diff --git a/404.html b/404.html index 4c04f125f9f3..9148004a7b81 100644 --- a/404.html +++ b/404.html @@ -2,7 +2,7 @@ - + Page Not Found · Polkadot Wiki @@ -20,9 +20,9 @@ - - + **If you need further assistance, you can reach out to [Polkadot Support](https://support.polkadot.network/support/tickets/new?ticket_form=i_have_a_support_request).**" data-modal-example-questions="Where can I store my DOT?,How can I create a DOT account?,How can I stake my DOT?,How does Polkadot OpenGov work?" data-search-mode-enabled="false" data-search-mode-default="false" data-button-position-top="120px" data-button-position-right="0px" data-search-include-source-names="["Polkadot Wiki"]"> + +
Skip to main content

Page Not Found

We could not find what you were looking for.

Please contact the owner of the site that linked you to the original URL and let them know their link is broken.

diff --git a/assets/css/styles.2aa743c9.css b/assets/css/styles.0e986b6a.css similarity index 96% rename from assets/css/styles.2aa743c9.css rename to assets/css/styles.0e986b6a.css index 753dd6800203..76cb832472ad 100644 --- a/assets/css/styles.2aa743c9.css +++ b/assets/css/styles.0e986b6a.css @@ -1 +1 @@ -.col,.container{padding:0 var(--ifm-spacing-horizontal);width:100%}.markdown>h2,.markdown>h3,.markdown>h4,.markdown>h5,.markdown>h6{margin-bottom:calc(var(--ifm-heading-vertical-rhythm-bottom)*var(--ifm-leading))}pre,table{overflow:auto}blockquote,pre{margin:0 0 var(--ifm-spacing-vertical)}.breadcrumbs__link,.button{transition-timing-function:var(--ifm-transition-timing-default)}.DocSearch-Button,.button{-webkit-user-select:none;-moz-user-select:none}.button,code{vertical-align:middle}.button--outline.button--active,.button--outline:active,.button--outline:hover,:root{--ifm-button-color:var(--ifm-font-color-base-inverse)}.dropdown,pre{position:relative}.menu__link:hover,a{transition:color var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.navbar--dark,:root{--ifm-navbar-link-hover-color:var(--ifm-color-primary)}.menu,.navbar-sidebar{overflow-x:hidden}:root,html[data-theme=dark]{--ifm-color-emphasis-500:var(--ifm-color-gray-500)}.markdown li,body{word-wrap:break-word}*,.DocSearch-Container,.DocSearch-Container *{box-sizing:border-box}.toggleButton_gllP,html{-webkit-tap-highlight-color:transparent}:root{--ifm-color-scheme:light;--ifm-dark-value:10%;--ifm-darker-value:15%;--ifm-darkest-value:30%;--ifm-light-value:15%;--ifm-lighter-value:30%;--ifm-lightest-value:50%;--ifm-contrast-background-value:90%;--ifm-contrast-foreground-value:70%;--ifm-contrast-background-dark-value:70%;--ifm-contrast-foreground-dark-value:90%;--ifm-color-primary:#3578e5;--ifm-color-secondary:#ebedf0;--ifm-color-success:#00a400;--ifm-color-info:#54c7ec;--ifm-color-warning:#ffba00;--ifm-color-danger:#fa383e;--ifm-color-primary-dark:#306cce;--ifm-color-primary-darker:#2d66c3;--ifm-color-primary-darkest:#2554a0;--ifm-color-primary-light:#538ce9;--ifm-color-primary-lighter:#72a1ed;--ifm-color-primary-lightest:#9abcf2;--ifm-color-primary-contrast-background:#ebf2fc;--ifm-color-primary-contrast-foreground:#102445;--ifm-color-secondary-dark:#d4d5d8;--ifm-color-secondary-darker:#c8c9cc;--ifm-color-secondary-darkest:#a4a6a8;--ifm-color-secondary-light:#eef0f2;--ifm-color-secondary-lighter:#f1f2f5;--ifm-color-secondary-lightest:#f5f6f8;--ifm-color-secondary-contrast-background:#fdfdfe;--ifm-color-secondary-contrast-foreground:#474748;--ifm-color-success-dark:#009400;--ifm-color-success-darker:#008b00;--ifm-color-success-darkest:#007300;--ifm-color-success-light:#26b226;--ifm-color-success-lighter:#4dbf4d;--ifm-color-success-lightest:#80d280;--ifm-color-success-contrast-background:#e6f6e6;--ifm-color-success-contrast-foreground:#003100;--ifm-color-info-dark:#4cb3d4;--ifm-color-info-darker:#47a9c9;--ifm-color-info-darkest:#3b8ba5;--ifm-color-info-light:#6ecfef;--ifm-color-info-lighter:#87d8f2;--ifm-color-info-lightest:#aae3f6;--ifm-color-info-contrast-background:#eef9fd;--ifm-color-info-contrast-foreground:#193c47;--ifm-color-warning-dark:#e6a700;--ifm-color-warning-darker:#d99e00;--ifm-color-warning-darkest:#b38200;--ifm-color-warning-light:#ffc426;--ifm-color-warning-lighter:#ffcf4d;--ifm-color-warning-lightest:#ffdd80;--ifm-color-warning-contrast-background:#fff8e6;--ifm-color-warning-contrast-foreground:#4d3800;--ifm-color-danger-dark:#e13238;--ifm-color-danger-darker:#d53035;--ifm-color-danger-darkest:#af272b;--ifm-color-danger-light:#fb565b;--ifm-color-danger-lighter:#fb7478;--ifm-color-danger-lightest:#fd9c9f;--ifm-color-danger-contrast-background:#ffebec;--ifm-color-danger-contrast-foreground:#4b1113;--ifm-color-white:#fff;--ifm-color-black:#000;--ifm-color-gray-0:var(--ifm-color-white);--ifm-color-gray-100:#f5f6f7;--ifm-color-gray-200:#ebedf0;--ifm-color-gray-300:#dadde1;--ifm-color-gray-400:#ccd0d5;--ifm-color-gray-500:#bec3c9;--ifm-color-gray-600:#8d949e;--ifm-color-gray-700:#606770;--ifm-color-gray-800:#444950;--ifm-color-gray-900:#1c1e21;--ifm-color-gray-1000:var(--ifm-color-black);--ifm-color-emphasis-0:var(--ifm-color-gray-0);--ifm-color-emphasis-100:var(--ifm-color-gray-100);--ifm-color-emphasis-200:var(--ifm-color-gray-200);--ifm-color-emphasis-300:var(--ifm-color-gray-300);--ifm-color-emphasis-400:var(--ifm-color-gray-400);--ifm-color-emphasis-600:var(--ifm-color-gray-600);--ifm-color-emphasis-700:var(--ifm-color-gray-700);--ifm-color-emphasis-800:var(--ifm-color-gray-800);--ifm-color-emphasis-900:var(--ifm-color-gray-900);--ifm-color-emphasis-1000:var(--ifm-color-gray-1000);--ifm-color-content:var(--ifm-color-emphasis-900);--ifm-color-content-inverse:var(--ifm-color-emphasis-0);--ifm-color-content-secondary:#525860;--ifm-background-color:transparent;--ifm-background-surface-color:var(--ifm-color-content-inverse);--ifm-global-border-width:1px;--ifm-global-radius:0.4rem;--ifm-hover-overlay:rgba(0,0,0,.05);--ifm-font-color-base:var(--ifm-color-content);--ifm-font-color-base-inverse:var(--ifm-color-content-inverse);--ifm-font-color-secondary:var(--ifm-color-content-secondary);--ifm-font-family-base:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";--ifm-font-family-monospace:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--ifm-font-size-base:100%;--ifm-font-weight-light:300;--ifm-font-weight-normal:400;--ifm-font-weight-semibold:500;--ifm-font-weight-bold:700;--ifm-font-weight-base:var(--ifm-font-weight-normal);--ifm-line-height-base:1.65;--ifm-global-spacing:1rem;--ifm-spacing-vertical:var(--ifm-global-spacing);--ifm-spacing-horizontal:var(--ifm-global-spacing);--ifm-transition-fast:200ms;--ifm-transition-slow:400ms;--ifm-transition-timing-default:cubic-bezier(0.08,0.52,0.52,1);--ifm-global-shadow-lw:0 1px 2px 0 rgba(0,0,0,.1);--ifm-global-shadow-md:0 5px 40px rgba(0,0,0,.2);--ifm-global-shadow-tl:0 12px 28px 0 rgba(0,0,0,.2),0 2px 4px 0 rgba(0,0,0,.1);--ifm-z-index-dropdown:100;--ifm-z-index-fixed:200;--ifm-z-index-overlay:400;--ifm-container-width:1140px;--ifm-container-width-xl:1320px;--ifm-code-background:#f6f7f8;--ifm-code-border-radius:var(--ifm-global-radius);--ifm-code-font-size:90%;--ifm-code-padding-horizontal:0.1rem;--ifm-code-padding-vertical:0.1rem;--ifm-pre-background:var(--ifm-code-background);--ifm-pre-border-radius:var(--ifm-code-border-radius);--ifm-pre-color:inherit;--ifm-pre-line-height:1.45;--ifm-pre-padding:1rem;--ifm-heading-color:inherit;--ifm-heading-margin-top:0;--ifm-heading-margin-bottom:var(--ifm-spacing-vertical);--ifm-heading-font-family:var(--ifm-font-family-base);--ifm-heading-font-weight:var(--ifm-font-weight-bold);--ifm-heading-line-height:1.25;--ifm-h1-font-size:2rem;--ifm-h2-font-size:1.5rem;--ifm-h3-font-size:1.25rem;--ifm-h4-font-size:1rem;--ifm-h5-font-size:0.875rem;--ifm-h6-font-size:0.85rem;--ifm-image-alignment-padding:1.25rem;--ifm-leading-desktop:1.25;--ifm-leading:calc(var(--ifm-leading-desktop)*1rem);--ifm-list-left-padding:2rem;--ifm-list-margin:1rem;--ifm-list-item-margin:0.25rem;--ifm-list-paragraph-margin:1rem;--ifm-table-cell-padding:0.75rem;--ifm-table-background:transparent;--ifm-table-stripe-background:rgba(0,0,0,.03);--ifm-table-border-width:1px;--ifm-table-border-color:var(--ifm-color-emphasis-300);--ifm-table-head-background:inherit;--ifm-table-head-color:inherit;--ifm-table-head-font-weight:var(--ifm-font-weight-bold);--ifm-table-cell-color:inherit;--ifm-link-color:var(--ifm-color-primary);--ifm-link-decoration:none;--ifm-link-hover-color:var(--ifm-link-color);--ifm-link-hover-decoration:underline;--ifm-paragraph-margin-bottom:var(--ifm-leading);--ifm-blockquote-font-size:var(--ifm-font-size-base);--ifm-blockquote-border-left-width:2px;--ifm-blockquote-padding-horizontal:var(--ifm-spacing-horizontal);--ifm-blockquote-padding-vertical:0;--ifm-blockquote-shadow:none;--ifm-blockquote-color:var(--ifm-color-emphasis-800);--ifm-blockquote-border-color:var(--ifm-color-emphasis-300);--ifm-hr-background-color:var(--ifm-color-emphasis-500);--ifm-hr-height:1px;--ifm-hr-margin-vertical:1.5rem;--ifm-scrollbar-size:7px;--ifm-scrollbar-track-background-color:#f1f1f1;--ifm-scrollbar-thumb-background-color:silver;--ifm-scrollbar-thumb-hover-background-color:#a7a7a7;--ifm-alert-background-color:inherit;--ifm-alert-border-color:inherit;--ifm-alert-border-radius:var(--ifm-global-radius);--ifm-alert-border-width:0px;--ifm-alert-border-left-width:5px;--ifm-alert-color:var(--ifm-font-color-base);--ifm-alert-padding-horizontal:var(--ifm-spacing-horizontal);--ifm-alert-padding-vertical:var(--ifm-spacing-vertical);--ifm-alert-shadow:var(--ifm-global-shadow-lw);--ifm-avatar-intro-margin:1rem;--ifm-avatar-intro-alignment:inherit;--ifm-avatar-photo-size:3rem;--ifm-badge-background-color:inherit;--ifm-badge-border-color:inherit;--ifm-badge-border-radius:var(--ifm-global-radius);--ifm-badge-border-width:var(--ifm-global-border-width);--ifm-badge-color:var(--ifm-color-white);--ifm-badge-padding-horizontal:calc(var(--ifm-spacing-horizontal)*0.5);--ifm-badge-padding-vertical:calc(var(--ifm-spacing-vertical)*0.25);--ifm-breadcrumb-border-radius:1.5rem;--ifm-breadcrumb-spacing:0.5rem;--ifm-breadcrumb-color-active:var(--ifm-color-primary);--ifm-breadcrumb-item-background-active:var(--ifm-hover-overlay);--ifm-breadcrumb-padding-horizontal:0.8rem;--ifm-breadcrumb-padding-vertical:0.4rem;--ifm-breadcrumb-size-multiplier:1;--ifm-breadcrumb-separator:url('data:image/svg+xml;utf8,');--ifm-breadcrumb-separator-filter:none;--ifm-breadcrumb-separator-size:0.5rem;--ifm-breadcrumb-separator-size-multiplier:1.25;--ifm-button-background-color:inherit;--ifm-button-border-color:var(--ifm-button-background-color);--ifm-button-border-width:var(--ifm-global-border-width);--ifm-button-font-weight:var(--ifm-font-weight-bold);--ifm-button-padding-horizontal:1.5rem;--ifm-button-padding-vertical:0.375rem;--ifm-button-size-multiplier:1;--ifm-button-transition-duration:var(--ifm-transition-fast);--ifm-button-border-radius:calc(var(--ifm-global-radius)*var(--ifm-button-size-multiplier));--ifm-button-group-spacing:2px;--ifm-card-background-color:var(--ifm-background-surface-color);--ifm-card-border-radius:calc(var(--ifm-global-radius)*2);--ifm-card-horizontal-spacing:var(--ifm-global-spacing);--ifm-card-vertical-spacing:var(--ifm-global-spacing);--ifm-toc-border-color:var(--ifm-color-emphasis-300);--ifm-toc-link-color:var(--ifm-color-content-secondary);--ifm-toc-padding-vertical:0.5rem;--ifm-toc-padding-horizontal:0.5rem;--ifm-dropdown-background-color:var(--ifm-background-surface-color);--ifm-dropdown-font-weight:var(--ifm-font-weight-semibold);--ifm-dropdown-link-color:var(--ifm-font-color-base);--ifm-dropdown-hover-background-color:var(--ifm-hover-overlay);--ifm-footer-background-color:var(--ifm-color-emphasis-100);--ifm-footer-color:inherit;--ifm-footer-link-color:var(--ifm-color-emphasis-700);--ifm-footer-link-hover-color:var(--ifm-color-primary);--ifm-footer-link-horizontal-spacing:0.5rem;--ifm-footer-padding-horizontal:calc(var(--ifm-spacing-horizontal)*2);--ifm-footer-padding-vertical:calc(var(--ifm-spacing-vertical)*2);--ifm-footer-title-color:inherit;--ifm-footer-logo-max-width:min(30rem,90vw);--ifm-hero-background-color:var(--ifm-background-surface-color);--ifm-hero-text-color:var(--ifm-color-emphasis-800);--ifm-menu-color:var(--ifm-color-emphasis-700);--ifm-menu-color-active:var(--ifm-color-primary);--ifm-menu-color-background-active:var(--ifm-hover-overlay);--ifm-menu-color-background-hover:var(--ifm-hover-overlay);--ifm-menu-link-padding-horizontal:0.75rem;--ifm-menu-link-padding-vertical:0.375rem;--ifm-menu-link-sublist-icon:url('data:image/svg+xml;utf8,');--ifm-menu-link-sublist-icon-filter:none;--ifm-navbar-background-color:var(--ifm-background-surface-color);--ifm-navbar-height:3.75rem;--ifm-navbar-item-padding-horizontal:0.75rem;--ifm-navbar-item-padding-vertical:0.25rem;--ifm-navbar-link-color:var(--ifm-font-color-base);--ifm-navbar-link-active-color:var(--ifm-link-color);--ifm-navbar-padding-horizontal:var(--ifm-spacing-horizontal);--ifm-navbar-padding-vertical:calc(var(--ifm-spacing-vertical)*0.5);--ifm-navbar-shadow:var(--ifm-global-shadow-lw);--ifm-navbar-search-input-background-color:var(--ifm-color-emphasis-200);--ifm-navbar-search-input-color:var(--ifm-color-emphasis-800);--ifm-navbar-search-input-placeholder-color:var(--ifm-color-emphasis-500);--ifm-navbar-search-input-icon:url('data:image/svg+xml;utf8,');--ifm-navbar-sidebar-width:83vw;--ifm-pagination-border-radius:var(--ifm-global-radius);--ifm-pagination-color-active:var(--ifm-color-primary);--ifm-pagination-font-size:1rem;--ifm-pagination-item-active-background:var(--ifm-hover-overlay);--ifm-pagination-page-spacing:0.2em;--ifm-pagination-padding-horizontal:calc(var(--ifm-spacing-horizontal)*1);--ifm-pagination-padding-vertical:calc(var(--ifm-spacing-vertical)*0.25);--ifm-pagination-nav-border-radius:var(--ifm-global-radius);--ifm-pagination-nav-color-hover:var(--ifm-color-primary);--ifm-pills-color-active:var(--ifm-color-primary);--ifm-pills-color-background-active:var(--ifm-hover-overlay);--ifm-pills-spacing:0.125rem;--ifm-tabs-color:var(--ifm-font-color-secondary);--ifm-tabs-color-active:var(--ifm-color-primary);--ifm-tabs-color-active-border:var(--ifm-tabs-color-active);--ifm-tabs-padding-horizontal:1rem;--ifm-tabs-padding-vertical:1rem;--docusaurus-progress-bar-color:var(--ifm-color-primary);--ifm-color-primary:#e6007a;--ifm-color-primary-dark:#cf006e;--ifm-color-primary-darker:#c40068;--ifm-color-primary-darkest:#a10055;--ifm-color-primary-light:#fd0086;--ifm-color-primary-lighter:#ff0a8c;--ifm-color-primary-lightest:#ff2c9c;--secondaryColor:#172026;--snowColor:#efefef;--silverColor:#b7b8bb;--nickelColor:#6d7278;--blackColor:#000;--ifm-navbar-height:50px;--sansFontFamily:"Inter",sans-serif!important;--headingFontFamily:"Unbounded",sans-serif!important;--docsearch-searchbox-background:#fff;--docsearch-searchbox-shadow:var(--snowColor);--docusaurus-announcement-bar-height:auto!important;--custom-code-block-background:#f6f8fa;--docusaurus-highlighted-code-line-bg:#e6ebf1;--custom-content-max-width:none;--docusaurus-tag-list-border:var(--ifm-color-emphasis-300);--docsearch-primary-color:#5468ff;--docsearch-text-color:#1c1e21;--docsearch-spacing:12px;--docsearch-icon-stroke-width:1.4;--docsearch-highlight-color:var(--docsearch-primary-color);--docsearch-muted-color:#969faf;--docsearch-container-background:rgba(101,108,133,.8);--docsearch-logo-color:#5468ff;--docsearch-modal-width:560px;--docsearch-modal-height:600px;--docsearch-modal-background:#f5f6f7;--docsearch-modal-shadow:inset 1px 1px 0 0 hsla(0,0%,100%,.5),0 3px 8px 0 #555a64;--docsearch-searchbox-height:56px;--docsearch-searchbox-background:#ebedf0;--docsearch-searchbox-focus-background:#fff;--docsearch-searchbox-shadow:inset 0 0 0 2px var(--docsearch-primary-color);--docsearch-hit-height:56px;--docsearch-hit-color:#444950;--docsearch-hit-active-color:#fff;--docsearch-hit-background:#fff;--docsearch-hit-shadow:0 1px 3px 0 #d4d9e1;--docsearch-key-gradient:linear-gradient(-225deg,#d5dbe4,#f8f8f8);--docsearch-key-shadow:inset 0 -2px 0 0 #cdcde6,inset 0 0 1px 1px #fff,0 1px 2px 1px rgba(30,35,90,.4);--docsearch-key-pressed-shadow:inset 0 -2px 0 0 #cdcde6,inset 0 0 1px 1px #fff,0 1px 1px 0 rgba(30,35,90,.4);--docsearch-footer-height:44px;--docsearch-footer-background:#fff;--docsearch-footer-shadow:0 -1px 0 0 #e0e3e8,0 -3px 6px 0 rgba(69,98,155,.12);--docsearch-primary-color:var(--ifm-color-primary);--docsearch-text-color:var(--ifm-font-color-base);--docusaurus-announcement-bar-height:auto;--docusaurus-collapse-button-bg:transparent;--docusaurus-collapse-button-bg-hover:rgba(0,0,0,.1);--doc-sidebar-width:300px;--doc-sidebar-hidden-width:30px}.badge--danger,.badge--info,.badge--primary,.badge--secondary,.badge--success,.badge--warning{--ifm-badge-border-color:var(--ifm-badge-background-color)}.button--link,.button--outline{--ifm-button-background-color:transparent}html{background-color:var(--ifm-background-color);color:var(--ifm-font-color-base);color-scheme:var(--ifm-color-scheme);font:var(--ifm-font-size-base)/var(--ifm-line-height-base) var(--ifm-font-family-base);-webkit-font-smoothing:antialiased;text-rendering:optimizelegibility;-webkit-text-size-adjust:100%;-moz-text-size-adjust:100%;text-size-adjust:100%}iframe{border:0;color-scheme:auto}.container{margin:0 auto;max-width:var(--ifm-container-width)}.container--fluid{max-width:inherit}.row{display:flex;flex-wrap:wrap;margin:0 calc(var(--ifm-spacing-horizontal)*-1)}.list_eTzJ article:last-child,.margin-bottom--none,.margin-vert--none,.markdown>:last-child{margin-bottom:0!important}.margin-top--none,.margin-vert--none,.tabItem_LNqP,footer .list-social-links li{margin-top:0!important}.row--no-gutters{margin-left:0;margin-right:0}.margin-horiz--none,.margin-right--none{margin-right:0!important}.row--no-gutters>.col{padding-left:0;padding-right:0}.row--align-top{align-items:flex-start}.row--align-bottom{align-items:flex-end}.menuExternalLink_NmtK,.row--align-center{align-items:center}.row--align-stretch{align-items:stretch}.row--align-baseline{align-items:baseline}.col{--ifm-col-width:100%;flex:1 0;margin-left:0;max-width:var(--ifm-col-width)}.padding-bottom--none,.padding-vert--none{padding-bottom:0!important}.padding-top--none,.padding-vert--none{padding-top:0!important}.padding-horiz--none,.padding-left--none{padding-left:0!important}.padding-horiz--none,.padding-right--none{padding-right:0!important}.col[class*=col--]{flex:0 0 var(--ifm-col-width)}.col--1{--ifm-col-width:8.33333%}.col--offset-1{margin-left:8.33333%}.col--2{--ifm-col-width:16.66667%}.col--offset-2{margin-left:16.66667%}.col--3{--ifm-col-width:25%}.col--offset-3{margin-left:25%}.col--4{--ifm-col-width:33.33333%}.col--offset-4{margin-left:33.33333%}.col--5{--ifm-col-width:41.66667%}.col--offset-5{margin-left:41.66667%}.col--6{--ifm-col-width:50%}.col--offset-6{margin-left:50%}.col--7{--ifm-col-width:58.33333%}.col--offset-7{margin-left:58.33333%}.col--8{--ifm-col-width:66.66667%}.col--offset-8{margin-left:66.66667%}.col--9{--ifm-col-width:75%}.col--offset-9{margin-left:75%}.col--10{--ifm-col-width:83.33333%}.col--offset-10{margin-left:83.33333%}.col--11{--ifm-col-width:91.66667%}.col--offset-11{margin-left:91.66667%}.col--12{--ifm-col-width:100%}.col--offset-12{margin-left:100%}.margin-horiz--none,.margin-left--none{margin-left:0!important}.margin--none{margin:0!important}.margin-bottom--xs,.margin-vert--xs{margin-bottom:.25rem!important}.margin-top--xs,.margin-vert--xs{margin-top:.25rem!important}.margin-horiz--xs,.margin-left--xs{margin-left:.25rem!important}.margin-horiz--xs,.margin-right--xs{margin-right:.25rem!important}.margin--xs{margin:.25rem!important}.margin-bottom--sm,.margin-vert--sm{margin-bottom:.5rem!important}.margin-top--sm,.margin-vert--sm{margin-top:.5rem!important}.margin-horiz--sm,.margin-left--sm{margin-left:.5rem!important}.margin-horiz--sm,.margin-right--sm{margin-right:.5rem!important}.margin--sm{margin:.5rem!important}.margin-bottom--md,.margin-vert--md{margin-bottom:1rem!important}.margin-top--md,.margin-vert--md{margin-top:1rem!important}.margin-horiz--md,.margin-left--md{margin-left:1rem!important}.margin-horiz--md,.margin-right--md{margin-right:1rem!important}.margin--md{margin:1rem!important}.margin-bottom--lg,.margin-vert--lg{margin-bottom:2rem!important}.margin-top--lg,.margin-vert--lg{margin-top:2rem!important}.margin-horiz--lg,.margin-left--lg{margin-left:2rem!important}.margin-horiz--lg,.margin-right--lg{margin-right:2rem!important}.margin--lg{margin:2rem!important}.margin-bottom--xl,.margin-vert--xl{margin-bottom:5rem!important}.margin-top--xl,.margin-vert--xl{margin-top:5rem!important}.margin-horiz--xl,.margin-left--xl{margin-left:5rem!important}.margin-horiz--xl,.margin-right--xl{margin-right:5rem!important}.margin--xl{margin:5rem!important}.padding--none{padding:0!important}.padding-bottom--xs,.padding-vert--xs{padding-bottom:.25rem!important}.padding-top--xs,.padding-vert--xs{padding-top:.25rem!important}.padding-horiz--xs,.padding-left--xs{padding-left:.25rem!important}.padding-horiz--xs,.padding-right--xs{padding-right:.25rem!important}.padding--xs{padding:.25rem!important}.padding-bottom--sm,.padding-vert--sm{padding-bottom:.5rem!important}.padding-top--sm,.padding-vert--sm{padding-top:.5rem!important}.padding-horiz--sm,.padding-left--sm{padding-left:.5rem!important}.padding-horiz--sm,.padding-right--sm{padding-right:.5rem!important}.padding--sm{padding:.5rem!important}.padding-bottom--md,.padding-vert--md{padding-bottom:1rem!important}.padding-top--md,.padding-vert--md{padding-top:1rem!important}.padding-horiz--md,.padding-left--md{padding-left:1rem!important}.padding-horiz--md,.padding-right--md{padding-right:1rem!important}.padding--md{padding:1rem!important}.padding-bottom--lg,.padding-vert--lg{padding-bottom:2rem!important}.padding-top--lg,.padding-vert--lg{padding-top:2rem!important}.padding-horiz--lg,.padding-left--lg{padding-left:2rem!important}.padding-horiz--lg,.padding-right--lg{padding-right:2rem!important}.padding--lg{padding:2rem!important}.padding-bottom--xl,.padding-vert--xl{padding-bottom:5rem!important}.padding-top--xl,.padding-vert--xl{padding-top:5rem!important}.padding-horiz--xl,.padding-left--xl{padding-left:5rem!important}.padding-horiz--xl,.padding-right--xl{padding-right:5rem!important}.padding--xl{padding:5rem!important}code{background-color:var(--ifm-code-background);border:.1rem solid rgba(0,0,0,.1);border-radius:var(--ifm-code-border-radius);font-family:var(--ifm-font-family-monospace);font-size:var(--ifm-code-font-size);padding:var(--ifm-code-padding-vertical) var(--ifm-code-padding-horizontal)}a code{color:inherit}pre{background-color:var(--ifm-pre-background);border-radius:var(--ifm-pre-border-radius);color:var(--ifm-pre-color);font:var(--ifm-code-font-size)/var(--ifm-pre-line-height) var(--ifm-font-family-monospace);padding:var(--ifm-pre-padding)}pre code{background-color:transparent;border:none;font-size:100%;line-height:inherit;padding:0}kbd{background-color:var(--ifm-color-emphasis-0);border:1px solid var(--ifm-color-emphasis-400);border-radius:.2rem;box-shadow:inset 0 -1px 0 var(--ifm-color-emphasis-400);color:var(--ifm-color-emphasis-800);font:80% var(--ifm-font-family-monospace);padding:.15rem .3rem}h1,h2,h3,h4,h5,h6{color:var(--ifm-heading-color);font-family:var(--ifm-heading-font-family);font-weight:var(--ifm-heading-font-weight);line-height:var(--ifm-heading-line-height);margin:var(--ifm-heading-margin-top) 0 var(--ifm-heading-margin-bottom) 0}h1{font-size:var(--ifm-h1-font-size)}h2{font-size:var(--ifm-h2-font-size)}h3{font-size:var(--ifm-h3-font-size)}h4{font-size:var(--ifm-h4-font-size)}h5{font-size:var(--ifm-h5-font-size)}h6{font-size:var(--ifm-h6-font-size)}.container_lyt7,.container_lyt7>svg,img{max-width:100%}img[align=right]{padding-left:var(--image-alignment-padding)}img[align=left]{padding-right:var(--image-alignment-padding)}.markdown{--ifm-h1-vertical-rhythm-top:3;--ifm-h2-vertical-rhythm-top:2;--ifm-h3-vertical-rhythm-top:1.5;--ifm-heading-vertical-rhythm-top:1.25;--ifm-h1-vertical-rhythm-bottom:1.25;--ifm-heading-vertical-rhythm-bottom:1}.markdown:after,.markdown:before{content:"";display:table}.markdown:after{clear:both}.markdown h1:first-child{--ifm-h1-font-size:3rem;margin-bottom:calc(var(--ifm-h1-vertical-rhythm-bottom)*var(--ifm-leading))}.markdown>h2{--ifm-h2-font-size:2rem;margin-top:calc(var(--ifm-h2-vertical-rhythm-top)*var(--ifm-leading))}.markdown>h3{--ifm-h3-font-size:1.5rem;margin-top:calc(var(--ifm-h3-vertical-rhythm-top)*var(--ifm-leading))}.markdown>h4,.markdown>h5,.markdown>h6{margin-top:calc(var(--ifm-heading-vertical-rhythm-top)*var(--ifm-leading))}.markdown>p,.markdown>pre,.markdown>ul,.tabList__CuJ{margin-bottom:var(--ifm-leading)}.markdown li>p{margin-top:var(--ifm-list-paragraph-margin)}.markdown li+li{margin-top:var(--ifm-list-item-margin)}ol,ul{margin:0 0 var(--ifm-list-margin);padding-left:var(--ifm-list-left-padding)}ol ol,ul ol{list-style-type:lower-roman}ol ol,ol ul,ul ol,ul ul{margin:0}ol ol ol,ol ul ol,ul ol ol,ul ul ol{list-style-type:lower-alpha}table{border-collapse:collapse;display:block;margin-bottom:var(--ifm-spacing-vertical)}table thead tr{border-bottom:2px solid var(--ifm-table-border-color)}table thead,table tr:nth-child(2n){background-color:var(--ifm-table-stripe-background)}table tr{background-color:var(--ifm-table-background);border-top:var(--ifm-table-border-width) solid var(--ifm-table-border-color)}table td,table th{border:var(--ifm-table-border-width) solid var(--ifm-table-border-color);padding:var(--ifm-table-cell-padding)}table th{background-color:var(--ifm-table-head-background);color:var(--ifm-table-head-color);font-weight:var(--ifm-table-head-font-weight)}table td{color:var(--ifm-table-cell-color)}strong{font-weight:var(--ifm-font-weight-bold)}a{color:var(--ifm-link-color);text-decoration:var(--ifm-link-decoration)}a:hover{color:var(--ifm-link-hover-color);text-decoration:var(--ifm-link-hover-decoration)}.button:hover,.text--no-decoration,.text--no-decoration:hover,a:not([href]){text-decoration:none}p{margin:0 0 var(--ifm-paragraph-margin-bottom)}blockquote{border-left:var(--ifm-blockquote-border-left-width) solid var(--ifm-blockquote-border-color);box-shadow:var(--ifm-blockquote-shadow);color:var(--ifm-blockquote-color);font-size:var(--ifm-blockquote-font-size);padding:var(--ifm-blockquote-padding-vertical) var(--ifm-blockquote-padding-horizontal)}blockquote>:first-child{margin-top:0}blockquote>:last-child{margin-bottom:0}hr{background-color:var(--ifm-hr-background-color);border:0;height:var(--ifm-hr-height);margin:var(--ifm-hr-margin-vertical) 0}.shadow--lw{box-shadow:var(--ifm-global-shadow-lw)!important}.shadow--md{box-shadow:var(--ifm-global-shadow-md)!important}.shadow--tl{box-shadow:var(--ifm-global-shadow-tl)!important}.text--primary{color:var(--ifm-color-primary)}.text--secondary{color:var(--ifm-color-secondary)}.text--success{color:var(--ifm-color-success)}.text--info{color:var(--ifm-color-info)}.text--warning{color:var(--ifm-color-warning)}.text--danger{color:var(--ifm-color-danger)}.text--center{text-align:center}.text--left{text-align:left}.text--justify{text-align:justify}.text--right{text-align:right}.text--capitalize{text-transform:capitalize}.text--lowercase{text-transform:lowercase}.alert__heading,.text--uppercase{text-transform:uppercase}.text--light{font-weight:var(--ifm-font-weight-light)}.text--normal{font-weight:var(--ifm-font-weight-normal)}.text--semibold{font-weight:var(--ifm-font-weight-semibold)}.text--bold{font-weight:var(--ifm-font-weight-bold)}.text--italic{font-style:italic}.text--truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text--break{word-wrap:break-word!important;word-break:break-word!important}.clean-btn{background:none;border:none;color:inherit;cursor:pointer;font-family:inherit;padding:0}.alert,.alert .close{color:var(--ifm-alert-foreground-color)}.clean-list{list-style:none;padding-left:0}.alert--primary{--ifm-alert-background-color:var(--ifm-color-primary-contrast-background);--ifm-alert-background-color-highlight:rgba(53,120,229,.15);--ifm-alert-foreground-color:var(--ifm-color-primary-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-primary-dark)}.alert--secondary{--ifm-alert-background-color:var(--ifm-color-secondary-contrast-background);--ifm-alert-background-color-highlight:rgba(235,237,240,.15);--ifm-alert-foreground-color:var(--ifm-color-secondary-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-secondary-dark)}.alert--success{--ifm-alert-background-color:var(--ifm-color-success-contrast-background);--ifm-alert-background-color-highlight:rgba(0,164,0,.15);--ifm-alert-foreground-color:var(--ifm-color-success-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-success-dark)}.alert--info{--ifm-alert-background-color:var(--ifm-color-info-contrast-background);--ifm-alert-background-color-highlight:rgba(84,199,236,.15);--ifm-alert-foreground-color:var(--ifm-color-info-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-info-dark)}.alert--warning{--ifm-alert-background-color:var(--ifm-color-warning-contrast-background);--ifm-alert-background-color-highlight:rgba(255,186,0,.15);--ifm-alert-foreground-color:var(--ifm-color-warning-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-warning-dark)}.alert--danger{--ifm-alert-background-color:var(--ifm-color-danger-contrast-background);--ifm-alert-background-color-highlight:rgba(250,56,62,.15);--ifm-alert-foreground-color:var(--ifm-color-danger-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-danger-dark)}.alert{--ifm-code-background:var(--ifm-alert-background-color-highlight);--ifm-link-color:var(--ifm-alert-foreground-color);--ifm-link-hover-color:var(--ifm-alert-foreground-color);--ifm-link-decoration:underline;--ifm-tabs-color:var(--ifm-alert-foreground-color);--ifm-tabs-color-active:var(--ifm-alert-foreground-color);--ifm-tabs-color-active-border:var(--ifm-alert-border-color);background-color:var(--ifm-alert-background-color);border:var(--ifm-alert-border-width) solid var(--ifm-alert-border-color);border-left-width:var(--ifm-alert-border-left-width);border-radius:var(--ifm-alert-border-radius);box-shadow:var(--ifm-alert-shadow);padding:var(--ifm-alert-padding-vertical) var(--ifm-alert-padding-horizontal)}.alert__heading{align-items:center;display:flex;font:700 var(--ifm-h5-font-size)/var(--ifm-heading-line-height) var(--ifm-heading-font-family);margin-bottom:.5rem}.alert__icon{display:inline-flex;margin-right:.4em}.alert__icon svg{fill:var(--ifm-alert-foreground-color);stroke:var(--ifm-alert-foreground-color);stroke-width:0}.alert .close{margin:calc(var(--ifm-alert-padding-vertical)*-1) calc(var(--ifm-alert-padding-horizontal)*-1) 0 0;opacity:.75}.alert .close:focus,.alert .close:hover,.hash-link:focus,:hover>.hash-link{opacity:1}.alert a{text-decoration-color:var(--ifm-alert-border-color)}.alert a:hover{text-decoration-thickness:2px}.avatar{-moz-column-gap:var(--ifm-avatar-intro-margin);column-gap:var(--ifm-avatar-intro-margin);display:flex}.avatar__photo{border-radius:50%;display:block;height:var(--ifm-avatar-photo-size);overflow:hidden;width:var(--ifm-avatar-photo-size)}.card--full-height,.navbar__logo img,body,html{height:100%}.avatar__photo--sm{--ifm-avatar-photo-size:2rem}.avatar__photo--lg{--ifm-avatar-photo-size:4rem}.avatar__photo--xl{--ifm-avatar-photo-size:6rem}.avatar__intro{display:flex;flex:1 1;flex-direction:column;justify-content:center;text-align:var(--ifm-avatar-intro-alignment)}.badge,.breadcrumbs__item,.breadcrumbs__link,.button,.dropdown>.navbar__link:after{display:inline-block}.avatar__name{font:700 var(--ifm-h4-font-size)/var(--ifm-heading-line-height) var(--ifm-font-family-base)}.avatar__subtitle{margin-top:.25rem}.avatar--vertical{--ifm-avatar-intro-alignment:center;--ifm-avatar-intro-margin:0.5rem;align-items:center;flex-direction:column}.badge{background-color:var(--ifm-badge-background-color);border:var(--ifm-badge-border-width) solid var(--ifm-badge-border-color);border-radius:var(--ifm-badge-border-radius);color:var(--ifm-badge-color);font-size:75%;font-weight:var(--ifm-font-weight-bold);line-height:1;padding:var(--ifm-badge-padding-vertical) var(--ifm-badge-padding-horizontal)}.badge--primary{--ifm-badge-background-color:var(--ifm-color-primary)}.badge--secondary{--ifm-badge-background-color:var(--ifm-color-secondary);color:var(--ifm-color-black)}.breadcrumbs__link,.button.button--secondary.button--outline:not(.button--active):not(:hover){color:var(--ifm-font-color-base)}.badge--success{--ifm-badge-background-color:var(--ifm-color-success)}.badge--info{--ifm-badge-background-color:var(--ifm-color-info)}.badge--warning{--ifm-badge-background-color:var(--ifm-color-warning)}.badge--danger{--ifm-badge-background-color:var(--ifm-color-danger)}.breadcrumbs{margin-bottom:0;padding-left:0}.breadcrumbs__item:not(:last-child):after{background:var(--ifm-breadcrumb-separator) center;content:" ";display:inline-block;filter:var(--ifm-breadcrumb-separator-filter);height:calc(var(--ifm-breadcrumb-separator-size)*var(--ifm-breadcrumb-size-multiplier)*var(--ifm-breadcrumb-separator-size-multiplier));margin:0 var(--ifm-breadcrumb-spacing);opacity:.5;width:calc(var(--ifm-breadcrumb-separator-size)*var(--ifm-breadcrumb-size-multiplier)*var(--ifm-breadcrumb-separator-size-multiplier))}.breadcrumbs__item--active .breadcrumbs__link{background:var(--ifm-breadcrumb-item-background-active);color:var(--ifm-breadcrumb-color-active)}.breadcrumbs__link{border-radius:var(--ifm-breadcrumb-border-radius);font-size:calc(1rem*var(--ifm-breadcrumb-size-multiplier));padding:calc(var(--ifm-breadcrumb-padding-vertical)*var(--ifm-breadcrumb-size-multiplier)) calc(var(--ifm-breadcrumb-padding-horizontal)*var(--ifm-breadcrumb-size-multiplier));transition-duration:var(--ifm-transition-fast);transition-property:background,color}.breadcrumbs__link:link:hover,.breadcrumbs__link:visited:hover,area[href].breadcrumbs__link:hover{background:var(--ifm-breadcrumb-item-background-active);text-decoration:none}.breadcrumbs__link:-moz-any-link:hover{background:var(--ifm-breadcrumb-item-background-active);text-decoration:none}.breadcrumbs__link:any-link:hover{background:var(--ifm-breadcrumb-item-background-active);text-decoration:none}.breadcrumbs--sm{--ifm-breadcrumb-size-multiplier:0.8}.breadcrumbs--lg{--ifm-breadcrumb-size-multiplier:1.2}.button{background-color:var(--ifm-button-background-color);border:var(--ifm-button-border-width) solid var(--ifm-button-border-color);border-radius:var(--ifm-button-border-radius);cursor:pointer;font-size:calc(.875rem*var(--ifm-button-size-multiplier));font-weight:var(--ifm-button-font-weight);line-height:1.5;padding:calc(var(--ifm-button-padding-vertical)*var(--ifm-button-size-multiplier)) calc(var(--ifm-button-padding-horizontal)*var(--ifm-button-size-multiplier));text-align:center;transition-duration:var(--ifm-button-transition-duration);transition-property:color,background,border-color;user-select:none;white-space:nowrap}.button,.button:hover{color:var(--ifm-button-color)}.button--outline{--ifm-button-color:var(--ifm-button-border-color)}.button--outline:hover{--ifm-button-background-color:var(--ifm-button-border-color)}.button--link{--ifm-button-border-color:transparent;color:var(--ifm-link-color);text-decoration:var(--ifm-link-decoration)}.button--link.button--active,.button--link:active,.button--link:hover{color:var(--ifm-link-hover-color);text-decoration:var(--ifm-link-hover-decoration)}.button.disabled,.button:disabled,.button[disabled]{opacity:.65;pointer-events:none}.button--sm{--ifm-button-size-multiplier:0.8}.button--lg{--ifm-button-size-multiplier:1.35}.button--block{display:block;width:100%}.button.button--secondary{color:var(--ifm-color-gray-900)}:where(.button--primary){--ifm-button-background-color:var(--ifm-color-primary);--ifm-button-border-color:var(--ifm-color-primary)}:where(.button--primary):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-primary-dark);--ifm-button-border-color:var(--ifm-color-primary-dark)}.button--primary.button--active,.button--primary:active{--ifm-button-background-color:var(--ifm-color-primary-darker);--ifm-button-border-color:var(--ifm-color-primary-darker)}:where(.button--secondary){--ifm-button-background-color:var(--ifm-color-secondary);--ifm-button-border-color:var(--ifm-color-secondary)}:where(.button--secondary):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-secondary-dark);--ifm-button-border-color:var(--ifm-color-secondary-dark)}.button--secondary.button--active,.button--secondary:active{--ifm-button-background-color:var(--ifm-color-secondary-darker);--ifm-button-border-color:var(--ifm-color-secondary-darker)}:where(.button--success){--ifm-button-background-color:var(--ifm-color-success);--ifm-button-border-color:var(--ifm-color-success)}:where(.button--success):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-success-dark);--ifm-button-border-color:var(--ifm-color-success-dark)}.button--success.button--active,.button--success:active{--ifm-button-background-color:var(--ifm-color-success-darker);--ifm-button-border-color:var(--ifm-color-success-darker)}:where(.button--info){--ifm-button-background-color:var(--ifm-color-info);--ifm-button-border-color:var(--ifm-color-info)}:where(.button--info):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-info-dark);--ifm-button-border-color:var(--ifm-color-info-dark)}.button--info.button--active,.button--info:active{--ifm-button-background-color:var(--ifm-color-info-darker);--ifm-button-border-color:var(--ifm-color-info-darker)}:where(.button--warning){--ifm-button-background-color:var(--ifm-color-warning);--ifm-button-border-color:var(--ifm-color-warning)}:where(.button--warning):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-warning-dark);--ifm-button-border-color:var(--ifm-color-warning-dark)}.button--warning.button--active,.button--warning:active{--ifm-button-background-color:var(--ifm-color-warning-darker);--ifm-button-border-color:var(--ifm-color-warning-darker)}:where(.button--danger){--ifm-button-background-color:var(--ifm-color-danger);--ifm-button-border-color:var(--ifm-color-danger)}:where(.button--danger):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-danger-dark);--ifm-button-border-color:var(--ifm-color-danger-dark)}.button--danger.button--active,.button--danger:active{--ifm-button-background-color:var(--ifm-color-danger-darker);--ifm-button-border-color:var(--ifm-color-danger-darker)}.button-group{display:inline-flex;gap:var(--ifm-button-group-spacing)}.button-group>.button:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.button-group>.button:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.button-group--block{display:flex;justify-content:stretch}.button-group--block>.button{flex-grow:1}.card{background-color:var(--ifm-card-background-color);border-radius:var(--ifm-card-border-radius);box-shadow:var(--ifm-global-shadow-lw);display:flex;flex-direction:column;overflow:hidden}.card__image{padding-top:var(--ifm-card-vertical-spacing)}.card__image:first-child{padding-top:0}.card__body,.card__footer,.card__header{padding:var(--ifm-card-vertical-spacing) var(--ifm-card-horizontal-spacing)}.card__body:not(:last-child),.card__footer:not(:last-child),.card__header:not(:last-child){padding-bottom:0}.card__body>:last-child,.card__footer>:last-child,.card__header>:last-child{margin-bottom:0}.card__footer{margin-top:auto}.table-of-contents{font-size:.8rem;margin-bottom:0;padding:var(--ifm-toc-padding-vertical) 0}.table-of-contents,.table-of-contents ul{list-style:none;padding-left:var(--ifm-toc-padding-horizontal)}.table-of-contents li{margin:var(--ifm-toc-padding-vertical) var(--ifm-toc-padding-horizontal)}.table-of-contents__left-border{border-left:1px solid var(--ifm-toc-border-color)}.table-of-contents__link{color:var(--ifm-toc-link-color);display:block}.table-of-contents__link--active,.table-of-contents__link--active code,.table-of-contents__link:hover,.table-of-contents__link:hover code{color:var(--ifm-color-primary);text-decoration:none}.close{color:var(--ifm-color-black);float:right;font-size:1.5rem;font-weight:var(--ifm-font-weight-bold);line-height:1;opacity:.5;padding:1rem;transition:opacity var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.close:hover{opacity:.7}.close:focus,.theme-code-block-highlighted-line .codeLineNumber_Tfdd:before{opacity:.8}.dropdown{display:inline-flex;font-weight:var(--ifm-dropdown-font-weight);vertical-align:top}.dropdown--hoverable:hover .dropdown__menu,.dropdown--show .dropdown__menu{opacity:1;pointer-events:all;transform:translateY(-1px);visibility:visible}#nprogress,.dropdown__menu,.navbar__item.dropdown .navbar__link:not([href]){pointer-events:none}.dropdown--right .dropdown__menu{left:inherit;right:0}.dropdown--nocaret .navbar__link:after{content:none!important}.dropdown__menu{background-color:var(--ifm-dropdown-background-color);border-radius:var(--ifm-global-radius);box-shadow:var(--ifm-global-shadow-md);left:0;list-style:none;max-height:80vh;min-width:10rem;opacity:0;overflow-y:auto;padding:.5rem;position:absolute;top:calc(100% - var(--ifm-navbar-item-padding-vertical) + .3rem);transform:translateY(-.625rem);transition-duration:var(--ifm-transition-fast);transition-property:opacity,transform,visibility;transition-timing-function:var(--ifm-transition-timing-default);visibility:hidden;z-index:var(--ifm-z-index-dropdown)}.menu__caret,.menu__link,.menu__list-item-collapsible{border-radius:.25rem;transition:background var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.dropdown__link{border-radius:.25rem;color:var(--ifm-dropdown-link-color);display:block;font-size:.875rem;margin-top:.2rem;padding:.25rem .5rem;white-space:nowrap}.dropdown__link--active,.dropdown__link:hover{background-color:var(--ifm-dropdown-hover-background-color);color:var(--ifm-dropdown-link-color);text-decoration:none}.dropdown__link--active,.dropdown__link--active:hover{--ifm-dropdown-link-color:var(--ifm-link-color)}.dropdown>.navbar__link:after{border-color:currentcolor transparent;border-style:solid;border-width:.4em .4em 0;content:"";margin-left:.3em;position:relative;top:2px;transform:translateY(-50%)}.footer{background-color:var(--ifm-footer-background-color);color:var(--ifm-footer-color);padding:var(--ifm-footer-padding-vertical) var(--ifm-footer-padding-horizontal)}.footer--dark{--ifm-footer-background-color:#303846;--ifm-footer-color:var(--ifm-footer-link-color);--ifm-footer-link-color:var(--ifm-color-secondary);--ifm-footer-title-color:var(--ifm-color-white)}.footer__links{margin-bottom:1rem}.footer__link-item{color:var(--ifm-footer-link-color);line-height:2}.footer__link-item:hover{color:var(--ifm-footer-link-hover-color)}.footer__link-separator{margin:0 var(--ifm-footer-link-horizontal-spacing)}.footer__logo{margin-top:1rem;max-width:var(--ifm-footer-logo-max-width)}.docs-wrapper,.navbar__inner{max-width:var(--custom-content-max-width)}.footer__title{color:var(--ifm-footer-title-color);font:700 var(--ifm-h4-font-size)/var(--ifm-heading-line-height) var(--ifm-font-family-base);margin-bottom:var(--ifm-heading-margin-bottom)}.menu,.navbar__link{font-weight:var(--ifm-font-weight-semibold)}.docItemContainer_Djhp article>:first-child,.docItemContainer_Djhp header+*,.footer-legal li+li,.footer__item,.h1,.h2,.h3,.h4,.h5,.h6{margin-top:0}.admonitionContent_BuS1>:last-child,.cardContainer_fWXF :last-child,.collapsibleContent_i85q p:last-child,.details_lb9f>summary>p:last-child,.footer-legal ul,.footer__items,.tabItem_Ymn6>:last-child{margin-bottom:0}.codeBlockStandalone_MEMb,[type=checkbox]{padding:0}.hero{align-items:center;background-color:var(--ifm-hero-background-color);color:var(--ifm-hero-text-color);display:flex;padding:4rem 2rem}.hero--primary{--ifm-hero-background-color:var(--ifm-color-primary);--ifm-hero-text-color:var(--ifm-font-color-base-inverse)}.hero--dark{--ifm-hero-background-color:#303846;--ifm-hero-text-color:var(--ifm-color-white)}.hero__title,.homeNavItem h1{font-size:3rem}.hero__subtitle{font-size:1.5rem}.menu__list{list-style:none;margin:0;padding-left:0}.menu__caret,.menu__link{padding:var(--ifm-menu-link-padding-vertical) var(--ifm-menu-link-padding-horizontal)}.menu__list .menu__list{flex:0 0 100%;margin-top:.25rem;padding-left:var(--ifm-menu-link-padding-horizontal)}.menu__list-item:not(:first-child){margin-top:.25rem}.menu__list-item--collapsed .menu__list{height:0;overflow:hidden}.details_lb9f[data-collapsed=false].isBrowser_bmU9>summary:before,.details_lb9f[open]:not(.isBrowser_bmU9)>summary:before,.menu__list-item--collapsed .menu__caret:before,.menu__list-item--collapsed .menu__link--sublist:after{transform:rotate(90deg)}.menu__list-item-collapsible{display:flex;flex-wrap:wrap;position:relative}.menu__caret:hover,.menu__link:hover,.menu__list-item-collapsible--active,.menu__list-item-collapsible:hover{background:var(--ifm-menu-color-background-hover)}.menu__list-item-collapsible .menu__link--active,.menu__list-item-collapsible .menu__link:hover{background:none!important}.menu__caret,.menu__link{align-items:center;display:flex}.navbar-sidebar,.navbar-sidebar__backdrop{bottom:0;opacity:0;top:0;transition-duration:var(--ifm-transition-fast);transition-timing-function:ease-in-out;left:0;visibility:hidden}.menu__link{color:var(--ifm-menu-color);flex:1;line-height:1.25}.menu__link:hover{color:var(--ifm-menu-color);text-decoration:none}.menu__caret:before,.menu__link--sublist-caret:after{height:1.25rem;transform:rotate(180deg);transition:transform var(--ifm-transition-fast) linear;width:1.25rem;content:"";filter:var(--ifm-menu-link-sublist-icon-filter)}.menu__link--sublist-caret:after{background:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem;margin-left:auto;min-width:1.25rem}.navbar__items--center .navbar__brand,body{margin:0}.menu__link--active,.menu__link--active:hover{color:var(--ifm-menu-color-active)}.navbar__brand,.navbar__link{color:var(--ifm-navbar-link-color)}.menu__link--active:not(.menu__link--sublist){background-color:var(--ifm-menu-color-background-active)}.menu__caret:before{background:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem}.navbar--dark,html[data-theme=dark]{--ifm-menu-link-sublist-icon-filter:invert(100%) sepia(94%) saturate(17%) hue-rotate(223deg) brightness(104%) contrast(98%)}.navbar{background-color:var(--ifm-navbar-background-color);box-shadow:var(--ifm-navbar-shadow);height:var(--ifm-navbar-height);padding:var(--ifm-navbar-padding-vertical) var(--ifm-navbar-padding-horizontal)}.navbar,.navbar>.container,.navbar>.container-fluid{display:flex}.navbar--fixed-top{position:sticky;top:0;z-index:var(--ifm-z-index-fixed)}.navbar__inner{display:flex;flex-wrap:wrap;justify-content:space-between;width:100%}.navbar__brand{align-items:center;display:flex;margin-right:1rem;min-width:0}.DocSearch.DocSearch-Button .DocSearch-Button-Keys,.navbar__inner .navbar__item:last-child a:after,.navbar__inner a.navbar__item svg[class^=iconExternalLink]{display:none}.navbar__brand:hover{color:var(--ifm-navbar-link-hover-color);text-decoration:none}.announcementBarContent_xLdY,.navbar__title{flex:1 1 auto}.navbar__toggle{display:none;margin-right:.5rem}.navbar__logo{flex:0 0 auto;height:2rem;margin-right:.5rem}.navbar__items{align-items:center;display:flex;flex:1;min-width:0}.navbar__items--center{flex:0 0 auto}.navbar__items--center+.navbar__items--right{flex:1}.navbar__items--right{flex:0 0 auto;justify-content:flex-end}.navbar__items--right>:last-child{padding-right:0}.navbar__item{display:inline-block;padding:var(--ifm-navbar-item-padding-vertical) var(--ifm-navbar-item-padding-horizontal)}.navbar__link--active,.navbar__link:hover{color:var(--ifm-navbar-link-hover-color);text-decoration:none}.navbar--dark,.navbar--primary{--ifm-menu-color:var(--ifm-color-gray-300);--ifm-navbar-link-color:var(--ifm-color-gray-100);--ifm-navbar-search-input-background-color:hsla(0,0%,100%,.1);--ifm-navbar-search-input-placeholder-color:hsla(0,0%,100%,.5);color:var(--ifm-color-white)}.navbar--dark{--ifm-navbar-background-color:#242526;--ifm-menu-color-background-active:hsla(0,0%,100%,.05);--ifm-navbar-search-input-color:var(--ifm-color-white)}.navbar--primary{--ifm-navbar-background-color:var(--ifm-color-primary);--ifm-navbar-link-hover-color:var(--ifm-color-white);--ifm-menu-color-active:var(--ifm-color-white);--ifm-navbar-search-input-color:var(--ifm-color-emphasis-500)}.navbar__search-input{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:var(--ifm-navbar-search-input-background-color) var(--ifm-navbar-search-input-icon) no-repeat .75rem center/1rem 1rem;border:none;border-radius:2rem;color:var(--ifm-navbar-search-input-color);cursor:text;display:inline-block;font-size:1rem;height:2rem;padding:0 .5rem 0 2.25rem;width:12.5rem}.navbar__search-input::-moz-placeholder{color:var(--ifm-navbar-search-input-placeholder-color)}.navbar__search-input::placeholder{color:var(--ifm-navbar-search-input-placeholder-color)}.navbar-sidebar{background-color:var(--ifm-navbar-background-color);box-shadow:var(--ifm-global-shadow-md);position:fixed;transform:translate3d(-100%,0,0);transition-property:opacity,visibility,transform;width:var(--ifm-navbar-sidebar-width)}.navbar-sidebar--show .navbar-sidebar,.navbar-sidebar__items{transform:translateZ(0)}.navbar-sidebar--show .navbar-sidebar,.navbar-sidebar--show .navbar-sidebar__backdrop{opacity:1;visibility:visible}.navbar-sidebar__backdrop{background-color:rgba(0,0,0,.6);position:fixed;right:0;transition-property:opacity,visibility}.btn-primary,.cards,.nav-footer,.tagWithCount_h2kH{position:relative}.navbar-sidebar__brand{align-items:center;box-shadow:var(--ifm-navbar-shadow);display:flex;flex:1;height:var(--ifm-navbar-height);padding:var(--ifm-navbar-padding-vertical) var(--ifm-navbar-padding-horizontal)}.navbar-sidebar__items{display:flex;height:calc(100% - var(--ifm-navbar-height));transition:transform var(--ifm-transition-fast) ease-in-out}.navbar-sidebar__items--show-secondary{transform:translate3d(calc((var(--ifm-navbar-sidebar-width))*-1),0,0)}.navbar-sidebar__item{flex-shrink:0;padding:.5rem;width:calc(var(--ifm-navbar-sidebar-width))}.navbar-sidebar__back{background:var(--ifm-menu-color-background-active);font-size:15px;font-weight:var(--ifm-button-font-weight);margin:0 0 .2rem -.5rem;padding:.6rem 1.5rem;position:relative;text-align:left;top:-.5rem;width:calc(100% + 1rem)}.container.container-custom,.navbar__inner,article iframe,article img{margin-left:auto;margin-right:auto}.navbar-sidebar__close{display:flex;margin-left:auto}.pagination{-moz-column-gap:var(--ifm-pagination-page-spacing);column-gap:var(--ifm-pagination-page-spacing);display:flex;font-size:var(--ifm-pagination-font-size);padding-left:0}.pagination--sm{--ifm-pagination-font-size:0.8rem;--ifm-pagination-padding-horizontal:0.8rem;--ifm-pagination-padding-vertical:0.2rem}.pagination--lg{--ifm-pagination-font-size:1.2rem;--ifm-pagination-padding-horizontal:1.2rem;--ifm-pagination-padding-vertical:0.3rem}.pagination__item{display:inline-flex}.pagination__item>span{padding:var(--ifm-pagination-padding-vertical)}.pagination__item--active .pagination__link{color:var(--ifm-pagination-color-active)}.pagination__item--active .pagination__link,.pagination__item:not(.pagination__item--active):hover .pagination__link{background:var(--ifm-pagination-item-active-background)}.pagination__item--disabled,.pagination__item[disabled]{opacity:.25;pointer-events:none}.pagination__link{border-radius:var(--ifm-pagination-border-radius);color:var(--ifm-font-color-base);display:inline-block;padding:var(--ifm-pagination-padding-vertical) var(--ifm-pagination-padding-horizontal);transition:background var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.homeContainer a,.nav-footer a:hover,.pagination__link:hover{text-decoration:none}.pagination-nav{display:grid;grid-gap:var(--ifm-spacing-horizontal);gap:var(--ifm-spacing-horizontal);grid-template-columns:repeat(2,1fr)}.pagination-nav__link{border:1px solid var(--ifm-color-emphasis-300);border-radius:var(--ifm-pagination-nav-border-radius);display:block;height:100%;line-height:var(--ifm-heading-line-height);padding:var(--ifm-global-spacing);transition:border-color var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.text-heading,h1{line-height:1.333333}.pagination-nav__link:hover{border-color:var(--ifm-pagination-nav-color-hover);text-decoration:none}.pagination-nav__link--next{grid-column:2/3;text-align:right}.pagination-nav__label{font-size:var(--ifm-h4-font-size);font-weight:var(--ifm-heading-font-weight);word-break:break-word}.pagination-nav__link--prev .pagination-nav__label:before{content:"« "}.pagination-nav__link--next .pagination-nav__label:after{content:" »"}.pagination-nav__sublabel{color:var(--ifm-color-content-secondary);font-size:var(--ifm-h5-font-size);font-weight:var(--ifm-font-weight-semibold);margin-bottom:.25rem}.pills__item,.tabs{font-weight:var(--ifm-font-weight-bold)}.pills{display:flex;gap:var(--ifm-pills-spacing);padding-left:0}.pills__item{border-radius:.5rem;cursor:pointer;display:inline-block;padding:.25rem 1rem;transition:background var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.tabs,:not(.containsTaskList_mC6p>li)>.containsTaskList_mC6p{padding-left:0}.pills__item--active{color:var(--ifm-pills-color-active)}.pills__item--active,.pills__item:not(.pills__item--active):hover{background:var(--ifm-pills-color-background-active)}.pills--block{justify-content:stretch}.pills--block .pills__item{flex-grow:1;text-align:center}.tabs{color:var(--ifm-tabs-color);display:flex;margin-bottom:0;overflow-x:auto}.tabs__item{border-bottom:3px solid transparent;border-radius:var(--ifm-global-radius);cursor:pointer;display:inline-flex;padding:var(--ifm-tabs-padding-vertical) var(--ifm-tabs-padding-horizontal);transition:background-color var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.tabs__item--active{border-bottom-color:var(--ifm-tabs-color-active-border);border-bottom-left-radius:0;border-bottom-right-radius:0;color:var(--ifm-tabs-color-active)}.tabs__item:hover{background-color:var(--ifm-hover-overlay)}.tabs--block{justify-content:stretch}.tabs--block .tabs__item{flex-grow:1;justify-content:center}html[data-theme=dark]{--ifm-color-scheme:dark;--ifm-color-emphasis-0:var(--ifm-color-gray-1000);--ifm-color-emphasis-100:var(--ifm-color-gray-900);--ifm-color-emphasis-200:var(--ifm-color-gray-800);--ifm-color-emphasis-300:var(--ifm-color-gray-700);--ifm-color-emphasis-400:var(--ifm-color-gray-600);--ifm-color-emphasis-600:var(--ifm-color-gray-400);--ifm-color-emphasis-700:var(--ifm-color-gray-300);--ifm-color-emphasis-800:var(--ifm-color-gray-200);--ifm-color-emphasis-900:var(--ifm-color-gray-100);--ifm-color-emphasis-1000:var(--ifm-color-gray-0);--ifm-background-color:#1b1b1d;--ifm-background-surface-color:#242526;--ifm-hover-overlay:hsla(0,0%,100%,.05);--ifm-color-content:#e3e3e3;--ifm-color-content-secondary:#fff;--ifm-breadcrumb-separator-filter:invert(64%) sepia(11%) saturate(0%) hue-rotate(149deg) brightness(99%) contrast(95%);--ifm-code-background:hsla(0,0%,100%,.1);--ifm-scrollbar-track-background-color:#444;--ifm-scrollbar-thumb-background-color:#686868;--ifm-scrollbar-thumb-hover-background-color:#7a7a7a;--ifm-table-stripe-background:hsla(0,0%,100%,.07);--ifm-toc-border-color:var(--ifm-color-emphasis-200);--ifm-color-primary-contrast-background:#102445;--ifm-color-primary-contrast-foreground:#ebf2fc;--ifm-color-secondary-contrast-background:#474748;--ifm-color-secondary-contrast-foreground:#fdfdfe;--ifm-color-success-contrast-background:#003100;--ifm-color-success-contrast-foreground:#e6f6e6;--ifm-color-info-contrast-background:#193c47;--ifm-color-info-contrast-foreground:#eef9fd;--ifm-color-warning-contrast-background:#4d3800;--ifm-color-warning-contrast-foreground:#fff8e6;--ifm-color-danger-contrast-background:#4b1113;--ifm-color-danger-contrast-foreground:#ffebec;--docsearch-text-color:#f5f6f7;--docsearch-container-background:rgba(9,10,17,.8);--docsearch-modal-background:#15172a;--docsearch-modal-shadow:inset 1px 1px 0 0 #2c2e40,0 3px 8px 0 #000309;--docsearch-searchbox-background:#090a11;--docsearch-searchbox-focus-background:#000;--docsearch-hit-color:#bec3c9;--docsearch-hit-shadow:none;--docsearch-hit-background:#090a11;--docsearch-key-gradient:linear-gradient(-26.5deg,#565872,#31355b);--docsearch-key-shadow:inset 0 -2px 0 0 #282d55,inset 0 0 1px 1px #51577d,0 2px 2px 0 rgba(3,4,9,.3);--docsearch-key-pressed-shadow:inset 0 -2px 0 0 #282d55,inset 0 0 1px 1px #51577d,0 1px 1px 0 rgba(3,4,9,.302);--docsearch-footer-background:#1e2136;--docsearch-footer-shadow:inset 0 1px 0 0 rgba(73,76,106,.5),0 -4px 8px 0 rgba(0,0,0,.2);--docsearch-logo-color:#fff;--docsearch-muted-color:#7f8497}#nprogress .bar{background:var(--docusaurus-progress-bar-color);height:2px;left:0;position:fixed;top:0;width:100%;z-index:1031}#nprogress .peg{box-shadow:0 0 10px var(--docusaurus-progress-bar-color),0 0 5px var(--docusaurus-progress-bar-color);height:100%;opacity:1;position:absolute;right:0;transform:rotate(3deg) translateY(-4px);width:100px}@font-face{font-family:Unbounded;font-weight:100 900;src:url(/assets/fonts/Unbounded-Variable-a247d72576aff02445f8abeb96056589.woff2) format("woff2-variations")}body{font-family:var(--sansFontFamily)}h1{font-family:Unbounded,sans-serif!important;padding-top:1.2rem}h2,h3,h4,h5,h6{font-family:var(--sansFontFamily)}.text-heading{font-family:var(--headingFontFamily)}.font-weight-medium{font-weight:500!important}.font-weight-bolder{font-weight:900!important}button.menu__button{box-shadow:0 2px 5px 0 rgba(0,0,0,.26)}.img_ev3q,.navbar.navbar--fixed-top{height:auto}.DocSearch.DocSearch-Button{background-color:#fff;border:1px solid var(--snowColor);color:var(--silverColor);cursor:text;width:170px}.btn-primary:before,.btn-primary[type=submit]:active,.btn-primary[type=submit]:focus,.btn-primary[type=submit]:hover{background:var(--ifm-color-primary)}.DocSearch.DocSearch-Button .DocSearch-Search-Icon{color:var(--silverColor)}.DocSearch.DocSearch-Button:hover .DocSearch-Search-Icon{color:var(--secondaryColor)}.DocSearch.DocSearch-Button .DocSearch-Button-Placeholder{font-size:13px;font-weight:500}.navbar__inner .navbar__item:last-child{margin-left:5px;margin-right:5px;opacity:1}.navbar__inner .navbar__item:last-child .dropdown__menu{border-radius:1.5rem;box-shadow:0 1rem 3rem rgba(0,0,0,.175);right:0;text-align:center;top:32px}.navbar__inner .navbar__item:last-child .dropdown__menu>li a{color:var(--secondaryColor);padding:12px 24px}.navbar__inner .navbar__item:last-child .dropdown__menu>li a.dropdown__link--active{background-color:#fff;color:var(--blackColor)}.navbar__inner .navbar__item:last-child .dropdown__menu>li a.dropdown__link--active:hover,.wordWrapButtonEnabled_EoeP .wordWrapButtonIcon_Bwma{color:var(--ifm-color-primary)}.navbar__inner .navbar__item:last-child .dropdown__menu>li a:hover{background-color:var(--snowColor);color:var(--ifm-color-primary)}.homeContainer{background:#fff;text-align:center}.homeFooterContainer,div[role=banner]{background-image:linear-gradient(217deg,rgba(196,0,97,.8),rgba(196,0,97,0) 70%),linear-gradient(127deg,rgba(230,0,122,.8),rgba(230,0,122,0) 70%),linear-gradient(336deg,rgba(103,69,210,.7),rgba(103,69,210,0) 70%)}.text-dark{color:var(--secondaryColor)!important}.homeNavContainer,.homeNavItem{padding:3rem 0}.homeNavItem{border-radius:3.25rem!important;transition:.15s ease-in-out}.homeNavItem p{max-width:300px}div[role=banner]{padding:10px 0}div[role=banner] .close{color:#fff}div[role=banner] .close:focus,div[role=banner] .close:hover{color:#fff!important;opacity:1}div.sticky{background-color:#f5cbc4;font-family:Unbounded;font-size:20px;padding:30px;position:sticky;top:10}.homeFooterContainer{background-color:#e6007a;padding:6rem 0 4rem}.homeFooterContainer .col-lg-6{align-items:flex-start;display:flex;flex-flow:column nowrap;margin-bottom:2rem}.homeFooterContainer .col-lg-6>:first-child{margin-bottom:1.3rem}.homeFooterContainer p{margin-bottom:2.5rem}.docs-wrapper{margin:0 auto;padding-bottom:80px}article blockquote{background-color:rgba(255,229,100,.3);border-left:8px solid #ffe564}article iframe,article img{display:block;max-width:100%}.prism-code{background-color:var(--custom-code-block-background)!important}.prism-code>div{width:100px!important}.table-of-contents__link--active,.table-of-contents__link--active code,.table-of-contents__link:hover,.table-of-contents__link:hover code{font-weight:600}.btn{font-size:16px;font-weight:700;padding:8px 16px}.btn,.btn:before{border-radius:1.5rem}.btn:before{left:-42px;width:42px}.btn-group-lg>.btn,.btn-lg{border-radius:2rem;padding:16px 20px}.btn-group-lg>.btn:before,.btn-lg:before{border-radius:2rem;left:-58px;width:58px}.btn-group-sm>.btn,.btn-sm{border-radius:1.5rem;font-size:16px;padding:8px 16px}.btn-group-sm>.btn:before,.btn-sm:before{border-radius:1.5rem;left:-42px;width:42px}.btn-primary{background-color:transparent;border-color:var(--ifm-color-primary);color:var(--ifm-color-primary);overflow:hidden;transform:scale(.999);transition:.2s,border 1ms;z-index:1}.btn-primary,.btn-primary:before{border:1px solid var(--ifm-color-primary);will-change:transform}.btn-primary:before{color:transparent;content:"";height:100%;position:absolute;top:0;transition:.2s;z-index:-1}.btn-primary:active,.btn-primary:focus,.btn-primary:hover{background:none;border:1px solid transparent;color:#fff;transform:scale(1.05);will-change:transform}.btn-primary.focus,.btn-primary:focus{box-shadow:0 0 .2rem .2rem rgba(0,0,0,.1)}.btn-primary:not(:disabled):not(.disabled):active{background-color:transparent}.btn-primary:active:before,.btn-primary:focus:before,.btn-primary:hover:before{left:0;width:100%}.btn-bg-primary.btn-primary{border:1px solid #fff;color:#fff!important}.btn-bg-primary.btn-primary:active,.btn-bg-primary.btn-primary:focus,.btn-bg-primary.btn-primary:hover{background:#fff;color:var(--ifm-color-primary)!important}.btn-bg-primary.btn-primary:before{background:#fff;border:1px solid #fff;color:transparent;content:none;height:100%;position:absolute;top:0;transition:.2s;will-change:transform;z-index:-1}.btn-white,.footer-legal a.text-white:hover,.nav-footer a.text-white:hover{color:#fff!important}.nav-footer.spacer-y-4{padding-bottom:3rem;padding-top:3rem}.nav-footer.pb-4{padding-bottom:2.25rem!important}.nav-footer .text-small{font-size:.875rem}.nav-footer{background:var(--secondaryColor);border:none;color:#202020;font-size:16px;line-height:24px}.nav-footer h5{font-size:1.25rem;font-weight:400;margin-top:0}.nav-footer a.text-white,.nav-footer a.text-white:visited{color:var(--silverColor)!important}.nav-footer-item-pill{background-color:#e6007a;border-radius:10px;color:#fff;font-size:.75rem;font-weight:700;padding:1px 8px}.list-social-links{display:flex;list-style:none;padding:0}.cardTitle_rnsV,footer .list-social-links i{font-size:1.2rem}footer .list-social-links a{text-decoration:none;background:0 0!important;border:1px solid #fff;border-radius:50%;color:#fff;display:block;padding:.25rem .9rem}footer [class^=socicon-]{line-height:2}footer .list-social-links{margin-left:0}.footer-legal .navbar-brand{display:block;padding-bottom:0}.footer-legal .list-pipe-separator>li:not(:last-child)>a:after{content:"|";margin:0 .375rem;opacity:.5}.footer-legal a.text-white,.footer-legal a.text-white:visited{color:#b5aeae!important}.cards-container{flex-flow:row wrap;max-width:100%;min-width:0}.cards,.cards-container{align-items:center;display:flex;justify-content:center}.cards{border:1px solid var(--primaryColor);border-radius:10px;box-shadow:0 .1rem .1rem rgba(0,0,0,.4);height:80px;margin:5px;padding:10px;top:0;transition:top .2s;width:350px}.cards:hover{top:-5px}.cards-body{align-items:flex-start;color:#000;display:flex;flex:1 auto;flex-flow:column nowrap;margin-left:5px}.cards-title{align-content:center;color:var(--ifm-color-primary-dark);font-size:1rem;font-weight:700}.cards-text{margin:1px 1px 1px 5px}.docusaurus-highlight-code-line{background-color:#faff9f;display:block;margin:0 calc(var(--ifm-pre-padding)*-1);padding:0 var(--ifm-pre-padding)}.DocSearch-Button-Container,.btnIcon__body,.tagWithCount_h2kH{align-items:center;display:flex}html[data-theme=dark] .docusaurus-highlight-code-line{background-color:#646464}.container.container-custom{width:100%}pre .btnIcon{background-color:hsla(0,0%,100%,.7);border:1px solid transparent;color:#000;cursor:pointer;height:30px;padding:3px;position:absolute;top:4px;transition:.25s ease-out;z-index:2}pre .btnIcon:hover{border:1px solid silver;text-decoration:none}.btnIcon svg{fill:currentColor;margin-right:.4em}.btnIcon__label{font-size:11px}.btnClipboard{right:10px}@font-face{font-family:Socicon;font-style:normal;font-weight:400;src:url(/assets/fonts/Socicon-5e166614f1c831694816befaba8d03cf.eot);src:url(/assets/fonts/Socicon-5e166614f1c831694816befaba8d03cf.eot#iefix) format("embedded-opentype"),url(/assets/fonts/Socicon-d02985133d7e9e09bde470dd54104762.woff2) format("woff2"),url(/assets/fonts/Socicon-48b2d1e286d6b8d6ebefa630301dcf3b.ttf) format("truetype"),url(/assets/fonts/Socicon-9075c233656883ebc65aeb93d2fb76ba.woff) format("woff"),url(/assets/images/Socicon-620cd8c93935433c4e69112bb91768e8.svg#Socicon) format("svg")}[class*=" socicon-"],[class^=socicon-]{font-family:Socicon!important;speak:none;font-style:normal;font-variant:normal;font-weight:400;line-height:1;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.socicon-internet:before{content:"\e957"}.socicon-moddb:before{content:"\e94b"}.socicon-indiedb:before{content:"\e94c"}.socicon-traxsource:before{content:"\e94d"}.socicon-gamefor:before{content:"\e94e"}.socicon-pixiv:before{content:"\e94f"}.socicon-myanimelist:before{content:"\e950"}.socicon-blackberry:before{content:"\e951"}.socicon-wickr:before{content:"\e952"}.socicon-spip:before{content:"\e953"}.socicon-napster:before{content:"\e954"}.socicon-beatport:before{content:"\e955"}.socicon-hackerone:before{content:"\e956"}.socicon-hackernews:before{content:"\e946"}.socicon-smashwords:before{content:"\e947"}.socicon-kobo:before{content:"\e948"}.socicon-bookbub:before{content:"\e949"}.socicon-mailru:before{content:"\e94a"}.socicon-gitlab:before{content:"\e945"}.socicon-instructables:before{content:"\e944"}.socicon-portfolio:before{content:"\e943"}.socicon-codered:before{content:"\e940"}.socicon-origin:before{content:"\e941"}.socicon-nextdoor:before{content:"\e942"}.socicon-udemy:before{content:"\e93f"}.socicon-livemaster:before{content:"\e93e"}.socicon-crunchbase:before{content:"\e93b"}.socicon-homefy:before{content:"\e93c"}.socicon-calendly:before{content:"\e93d"}.socicon-realtor:before{content:"\e90f"}.socicon-tidal:before{content:"\e910"}.socicon-qobuz:before{content:"\e911"}.socicon-natgeo:before{content:"\e912"}.socicon-mastodon:before{content:"\e913"}.socicon-unsplash:before{content:"\e914"}.socicon-homeadvisor:before{content:"\e915"}.socicon-angieslist:before{content:"\e916"}.socicon-codepen:before{content:"\e917"}.socicon-slack:before{content:"\e918"}.socicon-openaigym:before{content:"\e919"}.socicon-logmein:before{content:"\e91a"}.socicon-fiverr:before{content:"\e91b"}.socicon-gotomeeting:before{content:"\e91c"}.socicon-aliexpress:before{content:"\e91d"}.socicon-guru:before{content:"\e91e"}.socicon-appstore:before{content:"\e91f"}.socicon-homes:before{content:"\e920"}.socicon-zoom:before{content:"\e921"}.socicon-alibaba:before{content:"\e922"}.socicon-craigslist:before{content:"\e923"}.socicon-wix:before{content:"\e924"}.socicon-redfin:before{content:"\e925"}.socicon-googlecalendar:before{content:"\e926"}.socicon-shopify:before{content:"\e927"}.socicon-freelancer:before{content:"\e928"}.socicon-seedrs:before{content:"\e929"}.socicon-bing:before{content:"\e92a"}.socicon-doodle:before{content:"\e92b"}.socicon-bonanza:before{content:"\e92c"}.socicon-squarespace:before{content:"\e92d"}.socicon-toptal:before{content:"\e92e"}.socicon-gust:before{content:"\e92f"}.socicon-ask:before{content:"\e930"}.socicon-trulia:before{content:"\e931"}.socicon-loomly:before{content:"\e932"}.socicon-ghost:before{content:"\e933"}.socicon-upwork:before{content:"\e934"}.socicon-fundable:before{content:"\e935"}.socicon-booking:before{content:"\e936"}.socicon-googlemaps:before{content:"\e937"}.socicon-zillow:before{content:"\e938"}.socicon-niconico:before{content:"\e939"}.socicon-toneden:before{content:"\e93a"}.socicon-augment:before{content:"\e908"}.socicon-bitbucket:before{content:"\e909"}.socicon-fyuse:before{content:"\e90a"}.socicon-yt-gaming:before{content:"\e90b"}.socicon-sketchfab:before{content:"\e90c"}.socicon-mobcrush:before{content:"\e90d"}.socicon-microsoft:before{content:"\e90e"}.socicon-pandora:before{content:"\e907"}.socicon-messenger:before{content:"\e906"}.socicon-gamewisp:before{content:"\e905"}.socicon-bloglovin:before{content:"\e904"}.socicon-tunein:before{content:"\e903"}.socicon-gamejolt:before{content:"\e901"}.socicon-trello:before{content:"\e902"}.socicon-spreadshirt:before{content:"\e900"}.socicon-500px:before{content:"\e000"}.socicon-8tracks:before{content:"\e001"}.socicon-airbnb:before{content:"\e002"}.socicon-alliance:before{content:"\e003"}.socicon-amazon:before{content:"\e004"}.socicon-amplement:before{content:"\e005"}.socicon-android:before{content:"\e006"}.socicon-angellist:before{content:"\e007"}.socicon-apple:before{content:"\e008"}.socicon-appnet:before{content:"\e009"}.socicon-baidu:before{content:"\e00a"}.socicon-bandcamp:before{content:"\e00b"}.socicon-battlenet:before{content:"\e00c"}.socicon-mixer:before{content:"\e00d"}.socicon-bebee:before{content:"\e00e"}.socicon-bebo:before{content:"\e00f"}.socicon-behance:before{content:"\e010"}.socicon-blizzard:before{content:"\e011"}.socicon-blogger:before{content:"\e012"}.socicon-buffer:before{content:"\e013"}.socicon-chrome:before{content:"\e014"}.socicon-coderwall:before{content:"\e015"}.socicon-curse:before{content:"\e016"}.socicon-dailymotion:before{content:"\e017"}.socicon-deezer:before{content:"\e018"}.socicon-delicious:before{content:"\e019"}.socicon-deviantart:before{content:"\e01a"}.socicon-diablo:before{content:"\e01b"}.socicon-digg:before{content:"\e01c"}.socicon-discord:before{content:"\e01d"}.socicon-disqus:before{content:"\e01e"}.socicon-douban:before{content:"\e01f"}.socicon-draugiem:before{content:"\e020"}.socicon-dribbble:before{content:"\e021"}.socicon-drupal:before{content:"\e022"}.socicon-ebay:before{content:"\e023"}.socicon-ello:before{content:"\e024"}.socicon-endomodo:before{content:"\e025"}.socicon-envato:before{content:"\e026"}.socicon-etsy:before{content:"\e027"}.socicon-facebook:before{content:"\e028"}.socicon-feedburner:before{content:"\e029"}.socicon-filmweb:before{content:"\e02a"}.socicon-firefox:before{content:"\e02b"}.socicon-flattr:before{content:"\e02c"}.socicon-flickr:before{content:"\e02d"}.socicon-formulr:before{content:"\e02e"}.socicon-forrst:before{content:"\e02f"}.socicon-foursquare:before{content:"\e030"}.socicon-friendfeed:before{content:"\e031"}.socicon-github:before{content:"\e032"}.socicon-goodreads:before{content:"\e033"}.socicon-google:before{content:"\e034"}.socicon-googlescholar:before{content:"\e035"}.socicon-googlegroups:before{content:"\e036"}.socicon-googlephotos:before{content:"\e037"}.socicon-googleplus:before{content:"\e038"}.socicon-grooveshark:before{content:"\e039"}.socicon-hackerrank:before{content:"\e03a"}.socicon-hearthstone:before{content:"\e03b"}.socicon-hellocoton:before{content:"\e03c"}.socicon-heroes:before{content:"\e03d"}.socicon-smashcast:before{content:"\e03e"}.socicon-horde:before{content:"\e03f"}.socicon-houzz:before{content:"\e040"}.socicon-icq:before{content:"\e041"}.socicon-identica:before{content:"\e042"}.socicon-imdb:before{content:"\e043"}.socicon-instagram:before{content:"\e044"}.socicon-issuu:before{content:"\e045"}.socicon-istock:before{content:"\e046"}.socicon-itunes:before{content:"\e047"}.socicon-keybase:before{content:"\e048"}.socicon-lanyrd:before{content:"\e049"}.socicon-lastfm:before{content:"\e04a"}.socicon-line:before{content:"\e04b"}.socicon-linkedin:before{content:"\e04c"}.socicon-livejournal:before{content:"\e04d"}.socicon-lyft:before{content:"\e04e"}.socicon-macos:before{content:"\e04f"}.socicon-mail:before{content:"\e050"}.socicon-medium:before{content:"\e051"}.socicon-meetup:before{content:"\e052"}.socicon-mixcloud:before{content:"\e053"}.socicon-modelmayhem:before{content:"\e054"}.socicon-mumble:before{content:"\e055"}.socicon-myspace:before{content:"\e056"}.socicon-newsvine:before{content:"\e057"}.socicon-nintendo:before{content:"\e058"}.socicon-npm:before{content:"\e059"}.socicon-odnoklassniki:before{content:"\e05a"}.socicon-openid:before{content:"\e05b"}.socicon-opera:before{content:"\e05c"}.socicon-outlook:before{content:"\e05d"}.socicon-overwatch:before{content:"\e05e"}.socicon-patreon:before{content:"\e05f"}.socicon-paypal:before{content:"\e060"}.socicon-periscope:before{content:"\e061"}.socicon-persona:before{content:"\e062"}.socicon-pinterest:before{content:"\e063"}.socicon-play:before{content:"\e064"}.socicon-player:before{content:"\e065"}.socicon-playstation:before{content:"\e066"}.socicon-pocket:before{content:"\e067"}.socicon-qq:before{content:"\e068"}.socicon-quora:before{content:"\e069"}.socicon-raidcall:before{content:"\e06a"}.socicon-ravelry:before{content:"\e06b"}.socicon-reddit:before{content:"\e06c"}.socicon-renren:before{content:"\e06d"}.socicon-researchgate:before{content:"\e06e"}.socicon-residentadvisor:before{content:"\e06f"}.socicon-reverbnation:before{content:"\e070"}.socicon-rss:before{content:"\e071"}.socicon-sharethis:before{content:"\e072"}.socicon-skype:before{content:"\e073"}.socicon-slideshare:before{content:"\e074"}.socicon-smugmug:before{content:"\e075"}.socicon-snapchat:before{content:"\e076"}.socicon-songkick:before{content:"\e077"}.socicon-soundcloud:before{content:"\e078"}.socicon-spotify:before{content:"\e079"}.socicon-stackexchange:before{content:"\e07a"}.socicon-stackoverflow:before{content:"\e07b"}.socicon-starcraft:before{content:"\e07c"}.socicon-stayfriends:before{content:"\e07d"}.socicon-steam:before{content:"\e07e"}.socicon-storehouse:before{content:"\e07f"}.socicon-strava:before{content:"\e080"}.socicon-streamjar:before{content:"\e081"}.socicon-stumbleupon:before{content:"\e082"}.socicon-swarm:before{content:"\e083"}.socicon-teamspeak:before{content:"\e084"}.socicon-teamviewer:before{content:"\e085"}.socicon-technorati:before{content:"\e086"}.socicon-telegram:before{content:"\e087"}.socicon-tripadvisor:before{content:"\e088"}.socicon-tripit:before{content:"\e089"}.socicon-triplej:before{content:"\e08a"}.socicon-tumblr:before{content:"\e08b"}.socicon-twitch:before{content:"\e08c"}.socicon-twitter:before{content:"\e08d"}.socicon-uber:before{content:"\e08e"}.socicon-ventrilo:before{content:"\e08f"}.socicon-viadeo:before{content:"\e090"}.socicon-viber:before{content:"\e091"}.socicon-viewbug:before{content:"\e092"}.socicon-vimeo:before{content:"\e093"}.socicon-vine:before{content:"\e094"}.socicon-vkontakte:before{content:"\e095"}.socicon-warcraft:before{content:"\e096"}.socicon-wechat:before{content:"\e097"}.socicon-weibo:before{content:"\e098"}.socicon-whatsapp:before{content:"\e099"}.socicon-wikipedia:before{content:"\e09a"}.socicon-windows:before{content:"\e09b"}.socicon-wordpress:before{content:"\e09c"}.socicon-wykop:before{content:"\e09d"}.socicon-xbox:before{content:"\e09e"}.socicon-xing:before{content:"\e09f"}.socicon-yahoo:before{content:"\e0a0"}.socicon-yammer:before{content:"\e0a1"}.socicon-yandex:before{content:"\e0a2"}.socicon-yelp:before{content:"\e0a3"}.socicon-younow:before{content:"\e0a4"}.socicon-youtube:before{content:"\e0a5"}.socicon-zapier:before{content:"\e0a6"}.socicon-zerply:before{content:"\e0a7"}.socicon-zomato:before{content:"\e0a8"}.socicon-zynga:before{content:"\e0a9"}.tag_zVej{border:1px solid var(--docusaurus-tag-list-border);transition:border var(--ifm-transition-fast)}.tag_zVej:hover{--docusaurus-tag-list-border:var(--ifm-link-color);text-decoration:none}.tagRegular_sFm0{border-radius:var(--ifm-global-radius);font-size:90%;padding:.2rem .5rem .3rem}.tagWithCount_h2kH{border-left:0;padding:0 .5rem 0 1rem}.tagWithCount_h2kH:after,.tagWithCount_h2kH:before{border:1px solid var(--docusaurus-tag-list-border);content:"";position:absolute;top:50%;transition:inherit}.tagWithCount_h2kH:before{border-bottom:0;border-right:0;height:1.18rem;right:100%;transform:translate(50%,-50%) rotate(-45deg);width:1.18rem}.tagWithCount_h2kH:after{border-radius:50%;height:.5rem;left:0;transform:translateY(-50%);width:.5rem}.tagWithCount_h2kH span{background:var(--ifm-color-secondary);border-radius:var(--ifm-global-radius);color:var(--ifm-color-black);font-size:.7rem;line-height:1.2;margin-left:.3rem;padding:.1rem .4rem}.tags_jXut{display:inline}.tag_QGVx{display:inline-block;margin:0 .4rem .5rem 0}.iconEdit_Z9Sw{margin-right:.3em;vertical-align:sub}.lastUpdated_JAkA{font-size:smaller;font-style:italic;margin-top:.2rem}.tocCollapsibleButton_TO0P{align-items:center;display:flex;font-size:inherit;justify-content:space-between;padding:.4rem .8rem;width:100%}.tocCollapsibleButton_TO0P:after{background:var(--ifm-menu-link-sublist-icon) 50% 50%/2rem 2rem no-repeat;content:"";filter:var(--ifm-menu-link-sublist-icon-filter);height:1.25rem;transform:rotate(180deg);transition:transform var(--ifm-transition-fast);width:1.25rem}.tocCollapsibleButtonExpanded_MG3E:after,.tocCollapsibleExpanded_sAul{transform:none}.tocCollapsible_ETCw{background-color:var(--ifm-menu-color-background-active);border-radius:var(--ifm-global-radius);margin:1rem 0}.tocCollapsibleContent_vkbj>ul{border-left:none;border-top:1px solid var(--ifm-color-emphasis-300);font-size:15px;padding:.2rem 0}.tocCollapsibleContent_vkbj ul li{margin:.4rem .8rem}.tocCollapsibleContent_vkbj a{display:block}.tableOfContents_bqdL{max-height:calc(100vh - var(--ifm-navbar-height) - 2rem);overflow-y:auto;position:sticky;top:calc(var(--ifm-navbar-height) + 1rem)}.backToTopButton_sjWU{background-color:var(--ifm-color-emphasis-200);border-radius:50%;bottom:1.3rem;box-shadow:var(--ifm-global-shadow-lw);height:3rem;opacity:0;position:fixed;right:1.3rem;transform:scale(0);transition:all var(--ifm-transition-fast) var(--ifm-transition-timing-default);visibility:hidden;width:3rem;z-index:calc(var(--ifm-z-index-fixed) - 1)}.backToTopButton_sjWU:after{background-color:var(--ifm-color-emphasis-1000);content:" ";display:inline-block;height:100%;-webkit-mask:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem no-repeat;mask:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem no-repeat;width:100%}.backToTopButtonShow_xfvO{opacity:1;transform:scale(1);visibility:visible}.DocSearch-Button{align-items:center;background:var(--docsearch-searchbox-background);border:0;border-radius:40px;color:var(--docsearch-muted-color);cursor:pointer;display:flex;font-weight:500;height:36px;justify-content:space-between;padding:0 8px;user-select:none}.DocSearch-Footer,.DocSearch-Help{-webkit-user-select:none;-moz-user-select:none}.DocSearch-Button:active,.DocSearch-Button:focus,.DocSearch-Button:hover{background:var(--docsearch-searchbox-focus-background);box-shadow:var(--docsearch-searchbox-shadow);color:var(--docsearch-text-color);outline:0}.DocSearch-Search-Icon{stroke-width:1.6}.DocSearch-Hit-Tree,.DocSearch-Hit-action,.DocSearch-Hit-icon,.DocSearch-Reset{stroke-width:var(--docsearch-icon-stroke-width)}.DocSearch-Button .DocSearch-Search-Icon{color:var(--docsearch-text-color)}.DocSearch-Button-Placeholder{font-size:1rem;padding:0 12px 0 6px}.DocSearch-Input,.DocSearch-Link{-webkit-appearance:none;-moz-appearance:none;font:inherit}.DocSearch-Button-Keys{display:flex;min-width:calc(40px + .8em)}.DocSearch-Button-Key{align-items:center;background:var(--docsearch-key-gradient);border:0;border-radius:3px;box-shadow:var(--docsearch-key-shadow);color:var(--docsearch-muted-color);display:flex;height:18px;justify-content:center;margin-right:.4em;padding:0 0 2px;position:relative;top:-1px;width:20px}.DocSearch-Button-Key--pressed{box-shadow:var(--docsearch-key-pressed-shadow);transform:translate3d(0,1px,0)}.DocSearch--active{overflow:hidden!important}.DocSearch-Container{background-color:var(--docsearch-container-background);height:100vh;left:0;position:fixed;top:0;width:100vw;z-index:200}.DocSearch-Container a{text-decoration:none}.DocSearch-Hit[aria-selected=true] mark,.content_knG7 a{text-decoration:underline}.DocSearch-Link{appearance:none;background:none;border:0;color:var(--docsearch-highlight-color);cursor:pointer;margin:0;padding:0}.DocSearch-Modal{background:var(--docsearch-modal-background);border-radius:6px;box-shadow:var(--docsearch-modal-shadow);flex-direction:column;margin:60px auto auto;max-width:var(--docsearch-modal-width);position:relative}.DocSearch-SearchBar{display:flex;padding:var(--docsearch-spacing) var(--docsearch-spacing) 0}.DocSearch-Form{align-items:center;background:var(--docsearch-searchbox-focus-background);border-radius:4px;box-shadow:var(--docsearch-searchbox-shadow);display:flex;height:var(--docsearch-searchbox-height);margin:0;padding:0 var(--docsearch-spacing);position:relative;width:100%}.DocSearch-Input{appearance:none;background:0 0;border:0;color:var(--docsearch-text-color);flex:1;font-size:1.2em;height:100%;outline:0;padding:0 0 0 8px;width:80%}.DocSearch-Hit-action-button,.DocSearch-Reset{-webkit-appearance:none;-moz-appearance:none;border:0;cursor:pointer}.DocSearch-Input::-moz-placeholder{color:var(--docsearch-muted-color);opacity:1}.DocSearch-Input::placeholder{color:var(--docsearch-muted-color);opacity:1}.DocSearch-Input::-webkit-search-cancel-button,.DocSearch-Input::-webkit-search-decoration,.DocSearch-Input::-webkit-search-results-button,.DocSearch-Input::-webkit-search-results-decoration{display:none}.DocSearch-LoadingIndicator,.DocSearch-MagnifierLabel,.DocSearch-Reset{margin:0;padding:0}.DocSearch-Container--Stalled .DocSearch-LoadingIndicator,.DocSearch-MagnifierLabel,.DocSearch-Reset{align-items:center;color:var(--docsearch-highlight-color);display:flex;justify-content:center}.DocSearch-Cancel,.DocSearch-Container--Stalled .DocSearch-MagnifierLabel,.DocSearch-LoadingIndicator,.DocSearch-Reset[hidden]{display:none}.DocSearch-Reset{animation:.1s ease-in forwards a;appearance:none;background:none;border-radius:50%;color:var(--docsearch-icon-color);padding:2px;right:0}.DocSearch-Help,.DocSearch-HitsFooter,.DocSearch-Label{color:var(--docsearch-muted-color)}.DocSearch-Reset:hover{color:var(--docsearch-highlight-color)}.DocSearch-LoadingIndicator svg,.DocSearch-MagnifierLabel svg{height:24px;width:24px}.DocSearch-Dropdown{max-height:calc(var(--docsearch-modal-height) - var(--docsearch-searchbox-height) - var(--docsearch-spacing) - var(--docsearch-footer-height));min-height:var(--docsearch-spacing);overflow-y:auto;overflow-y:overlay;padding:0 var(--docsearch-spacing);scrollbar-color:var(--docsearch-muted-color) var(--docsearch-modal-background);scrollbar-width:thin}.DocSearch-Dropdown::-webkit-scrollbar{width:12px}.DocSearch-Dropdown::-webkit-scrollbar-track{background:0 0}.DocSearch-Dropdown::-webkit-scrollbar-thumb{background-color:var(--docsearch-muted-color);border:3px solid var(--docsearch-modal-background);border-radius:20px}.DocSearch-Dropdown ul{list-style:none;margin:0;padding:0}.DocSearch-Label{font-size:.75em;line-height:1.6em}.DocSearch-Help{font-size:.9em;margin:0;user-select:none}.DocSearch-Title{font-size:1.2em}.DocSearch-Logo a{display:flex}.DocSearch-Logo svg{color:var(--docsearch-logo-color);margin-left:8px}.DocSearch-Hits:last-of-type{margin-bottom:24px}.DocSearch-Hits mark{background:none;color:var(--docsearch-highlight-color)}.DocSearch-HitsFooter{display:flex;font-size:.85em;justify-content:center;margin-bottom:var(--docsearch-spacing);padding:var(--docsearch-spacing)}.DocSearch-HitsFooter a{border-bottom:1px solid;color:inherit}.DocSearch-Hit{border-radius:4px;display:flex;padding-bottom:4px;position:relative}.DocSearch-Hit--deleting{opacity:0;transition:.25s linear}.DocSearch-Hit--favoriting{transform:scale(0);transform-origin:top center;transition:.25s linear .25s}.DocSearch-Hit a{background:var(--docsearch-hit-background);border-radius:4px;box-shadow:var(--docsearch-hit-shadow);display:block;padding-left:var(--docsearch-spacing);width:100%}.DocSearch-Hit-source{background:var(--docsearch-modal-background);color:var(--docsearch-highlight-color);font-size:.85em;font-weight:600;line-height:32px;margin:0 -4px;padding:8px 4px 0;position:sticky;top:0;z-index:10}.DocSearch-Hit-Tree{color:var(--docsearch-muted-color);height:var(--docsearch-hit-height);opacity:.5;width:24px}.DocSearch-Hit[aria-selected=true] a{background-color:var(--docsearch-highlight-color)}.DocSearch-Hit-Container{align-items:center;color:var(--docsearch-hit-color);display:flex;flex-direction:row;height:var(--docsearch-hit-height);padding:0 var(--docsearch-spacing) 0 0}.DocSearch-Hit-icon{height:20px;width:20px}.DocSearch-Hit-action,.DocSearch-Hit-icon{color:var(--docsearch-muted-color)}.DocSearch-Hit-action{align-items:center;display:flex;height:22px;width:22px}.DocSearch-Hit-action svg{display:block;height:18px;width:18px}.DocSearch-Hit-action+.DocSearch-Hit-action{margin-left:6px}.DocSearch-Hit-action-button{appearance:none;background:none;border-radius:50%;color:inherit;padding:2px}.docSidebarContainer_YfHR,.sidebarLogo_isFc,.themedComponent_mlkZ,[data-theme=dark] .lightToggleIcon_pyhR,[data-theme=light] .darkToggleIcon_wfgR,html[data-announcement-bar-initially-dismissed=true] .announcementBar_mb4j,svg.DocSearch-Hit-Select-Icon{display:none}.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-Select-Icon{display:block}.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{background:rgba(0,0,0,.2);transition:background-color .1s ease-in}.DocSearch-Hit-action-button:focus path,.DocSearch-Hit-action-button:hover path{fill:#fff}.DocSearch-Hit-content-wrapper{display:flex;flex:1 1 auto;flex-direction:column;font-weight:500;justify-content:center;line-height:1.2em;margin:0 8px;overflow-x:hidden;position:relative;text-overflow:ellipsis;white-space:nowrap;width:80%}.DocSearch-Hit-title{font-size:.9em}.DocSearch-Hit-path{color:var(--docsearch-muted-color);font-size:.75em}.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-Tree,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-action,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-icon,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-path,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-text,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-title,.DocSearch-Hit[aria-selected=true] mark{color:var(--docsearch-hit-active-color)!important}.DocSearch-ErrorScreen,.DocSearch-NoResults,.DocSearch-StartScreen{font-size:.9em;margin:0 auto;padding:36px 0;text-align:center;width:80%}.DocSearch-Screen-Icon{color:var(--docsearch-muted-color);padding-bottom:12px}.DocSearch-NoResults-Prefill-List{display:inline-block;padding-bottom:24px;text-align:left}.DocSearch-NoResults-Prefill-List ul{display:inline-block;padding:8px 0 0}.DocSearch-NoResults-Prefill-List li{list-style-position:inside;list-style-type:"» "}.DocSearch-Prefill{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;border-radius:1em;color:var(--docsearch-highlight-color);cursor:pointer;display:inline-block;font-size:1em;font-weight:700;padding:0}.DocSearch-Prefill:focus,.DocSearch-Prefill:hover{outline:0;text-decoration:underline}.DocSearch-Footer{align-items:center;background:var(--docsearch-footer-background);border-radius:0 0 8px 8px;box-shadow:var(--docsearch-footer-shadow);display:flex;flex-direction:row-reverse;flex-shrink:0;height:var(--docsearch-footer-height);justify-content:space-between;padding:0 var(--docsearch-spacing);position:relative;user-select:none;width:100%;z-index:300}.DocSearch-Commands li,.DocSearch-Commands-Key{align-items:center;display:flex}.DocSearch-Commands{color:var(--docsearch-muted-color);display:flex;list-style:none;margin:0;padding:0}.DocSearch-Commands li:not(:last-of-type){margin-right:.8em}.DocSearch-Commands-Key{background:var(--docsearch-key-gradient);border:0;border-radius:2px;box-shadow:var(--docsearch-key-shadow);color:var(--docsearch-muted-color);height:18px;justify-content:center;margin-right:.4em;padding:0 0 1px;width:20px}.DocSearch-VisuallyHiddenForAccessibility{clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}@keyframes a{0%{opacity:0}to{opacity:1}}.DocSearch-Button{margin:0;transition:all var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.DocSearch-Container{z-index:calc(var(--ifm-z-index-fixed) + 1)}.message-box{background-color:hwb(0 80% 2%);border:1px solid #ccc;border-radius:10px;bottom:20px;box-shadow:0 4px 8px #000;max-width:270px;padding:20px;position:fixed;right:10px;z-index:1000}.close-button{background:none;border:none;cursor:pointer;position:absolute;right:5px;top:5px}.messageContent{margin-top:10px}.skipToContent_fXgn{background-color:var(--ifm-background-surface-color);color:var(--ifm-color-emphasis-900);left:100%;padding:calc(var(--ifm-global-spacing)/2) var(--ifm-global-spacing);position:fixed;top:1rem;z-index:calc(var(--ifm-z-index-fixed) + 1)}.skipToContent_fXgn:focus{box-shadow:var(--ifm-global-shadow-md);left:1rem}.closeButton_CVFx{line-height:0;padding:0}.content_knG7{font-size:85%;padding:5px 0;text-align:center}.content_knG7 a{color:inherit}.announcementBar_mb4j{align-items:center;background-color:var(--ifm-color-white);border-bottom:1px solid var(--ifm-color-emphasis-100);color:var(--ifm-color-black);display:flex;height:var(--docusaurus-announcement-bar-height)}.buttonGroup__atx button,.codeBlockContainer_Ckt0{background:var(--prism-background-color);color:var(--prism-color)}.announcementBarPlaceholder_vyr4{flex:0 0 10px}.announcementBarClose_gvF7{align-self:stretch;flex:0 0 30px}.toggle_vylO{height:2rem;width:2rem}.toggleButton_gllP{align-items:center;border-radius:50%;display:flex;height:100%;justify-content:center;transition:background var(--ifm-transition-fast);width:100%}.toggleButton_gllP:hover{background:var(--ifm-color-emphasis-200)}.toggleButtonDisabled_aARS{cursor:not-allowed}.darkNavbarColorModeToggle_X3D1:hover{background:var(--ifm-color-gray-800)}[data-theme=dark] .themedComponent--dark_xIcU,[data-theme=light] .themedComponent--light_NVdE,html:not([data-theme]) .themedComponent--light_NVdE{display:initial}[data-theme=dark]:root{--docusaurus-collapse-button-bg:hsla(0,0%,100%,.05);--docusaurus-collapse-button-bg-hover:hsla(0,0%,100%,.1)}.collapseSidebarButton_PEFL{display:none;margin:0}.iconExternalLink_nPIU{margin-left:.3rem}.docMainContainer_TBSr,.docRoot_UBD9{display:flex;width:100%}.docsWrapper_hBAB{display:flex;flex:1 0 auto}.anchorWithStickyNavbar_LWe7{scroll-margin-top:calc(var(--ifm-navbar-height) + .5rem)}.anchorWithHideOnScrollNavbar_WYt5{scroll-margin-top:.5rem}.hash-link{opacity:0;padding-left:.5rem;transition:opacity var(--ifm-transition-fast);-webkit-user-select:none;-moz-user-select:none;user-select:none}.hash-link:before{content:"#"}.cardContainer_fWXF{--ifm-link-color:var(--ifm-color-emphasis-800);--ifm-link-hover-color:var(--ifm-color-emphasis-700);--ifm-link-hover-decoration:none;border:1px solid var(--ifm-color-emphasis-200);box-shadow:0 1.5px 3px 0 rgba(0,0,0,.15);transition:all var(--ifm-transition-fast) ease;transition-property:border,box-shadow}.cardContainer_fWXF:hover{border-color:var(--ifm-color-primary);box-shadow:0 3px 6px 0 rgba(0,0,0,.2)}.cardDescription_PWke{font-size:.8rem}.codeBlockContainer_Ckt0{border-radius:var(--ifm-code-border-radius);box-shadow:var(--ifm-global-shadow-lw);margin-bottom:var(--ifm-leading)}.codeBlockContent_biex{border-radius:inherit;direction:ltr;position:relative}.codeBlockTitle_Ktv7{border-bottom:1px solid var(--ifm-color-emphasis-300);border-top-left-radius:inherit;border-top-right-radius:inherit;font-size:var(--ifm-code-font-size);font-weight:500;padding:.75rem var(--ifm-pre-padding)}.codeBlock_bY9V{--ifm-pre-background:var(--prism-background-color);margin:0;padding:0}.codeBlockTitle_Ktv7+.codeBlockContent_biex .codeBlock_bY9V{border-top-left-radius:0;border-top-right-radius:0}.codeBlockLines_e6Vv{float:left;font:inherit;min-width:100%;padding:var(--ifm-pre-padding)}.codeBlockLinesWithNumbering_o6Pm{display:table;padding:var(--ifm-pre-padding) 0}.buttonGroup__atx{-moz-column-gap:.2rem;column-gap:.2rem;display:flex;position:absolute;right:calc(var(--ifm-pre-padding)/2);top:calc(var(--ifm-pre-padding)/2)}.buttonGroup__atx button{align-items:center;border:1px solid var(--ifm-color-emphasis-300);border-radius:var(--ifm-global-radius);display:flex;line-height:0;opacity:0;padding:.4rem;transition:opacity var(--ifm-transition-fast) ease-in-out}.buttonGroup__atx button:focus-visible,.buttonGroup__atx button:hover{opacity:1!important}.theme-code-block:hover .buttonGroup__atx button{opacity:.4}:where(:root){--docusaurus-highlighted-code-line-bg:#484d5b}:where([data-theme=dark]){--docusaurus-highlighted-code-line-bg:#646464}.theme-code-block-highlighted-line{background-color:var(--docusaurus-highlighted-code-line-bg);display:block;margin:0 calc(var(--ifm-pre-padding)*-1);padding:0 var(--ifm-pre-padding)}.codeLine_lJS_{counter-increment:a;display:table-row}.codeLineNumber_Tfdd{background:var(--ifm-pre-background);display:table-cell;left:0;overflow-wrap:normal;padding:0 var(--ifm-pre-padding);position:sticky;text-align:right;width:1%}.codeLineNumber_Tfdd:before{content:counter(a);opacity:.4}.codeLineContent_feaV{padding-right:var(--ifm-pre-padding)}.theme-code-block:hover .copyButtonCopied_obH4{opacity:1!important}.copyButtonIcons_eSgA{height:1.125rem;position:relative;width:1.125rem}.copyButtonIcon_y97N,.copyButtonSuccessIcon_LjdS{left:0;position:absolute;top:0;fill:currentColor;height:inherit;opacity:inherit;transition:all var(--ifm-transition-fast) ease;width:inherit}.copyButtonSuccessIcon_LjdS{color:#00d600;left:50%;opacity:0;top:50%;transform:translate(-50%,-50%) scale(.33)}.copyButtonCopied_obH4 .copyButtonIcon_y97N{opacity:0;transform:scale(.33)}.copyButtonCopied_obH4 .copyButtonSuccessIcon_LjdS{opacity:1;transform:translate(-50%,-50%) scale(1);transition-delay:75ms}.wordWrapButtonIcon_Bwma{height:1.2rem;width:1.2rem}.details_lb9f{--docusaurus-details-summary-arrow-size:0.38rem;--docusaurus-details-transition:transform 200ms ease;--docusaurus-details-decoration-color:grey}.details_lb9f>summary{cursor:pointer;list-style:none;padding-left:1rem;position:relative}.details_lb9f>summary::-webkit-details-marker{display:none}.details_lb9f>summary:before{border-color:transparent transparent transparent var(--docusaurus-details-decoration-color);border-style:solid;border-width:var(--docusaurus-details-summary-arrow-size);content:"";left:0;position:absolute;top:.45rem;transform:rotate(0);transform-origin:calc(var(--docusaurus-details-summary-arrow-size)/2) 50%;transition:var(--docusaurus-details-transition)}.collapsibleContent_i85q{border-top:1px solid var(--docusaurus-details-decoration-color);margin-top:1rem;padding-top:1rem}.details_b_Ee{--docusaurus-details-decoration-color:var(--ifm-alert-border-color);--docusaurus-details-transition:transform var(--ifm-transition-fast) ease;border:1px solid var(--ifm-alert-border-color);margin:0 0 var(--ifm-spacing-vertical)}.containsTaskList_mC6p{list-style:none}.admonition_xJq3{margin-bottom:1em}.admonitionHeading_Gvgb{font:var(--ifm-heading-font-weight) var(--ifm-h5-font-size)/var(--ifm-heading-line-height) var(--ifm-heading-font-family);text-transform:uppercase}.admonitionHeading_Gvgb:not(:last-child){margin-bottom:.3rem}.admonitionHeading_Gvgb code{text-transform:none}.admonitionIcon_Rf37{display:inline-block;margin-right:.4em;vertical-align:middle}.admonitionIcon_Rf37 svg{display:inline-block;height:1.6em;width:1.6em;fill:var(--ifm-alert-foreground-color)}.dropdownNavbarItemMobile_S0Fm{cursor:pointer}.iconLanguage_nlXk{margin-right:5px;vertical-align:text-bottom}#__docusaurus-base-url-issue-banner-container,.navbarSearchContainer_Bca1:empty{display:none}.navbarHideable_m1mJ{transition:transform var(--ifm-transition-fast) ease}.navbarHidden_jGov{transform:translate3d(0,calc(-100% - 2px),0)}body:not(.navigation-with-keyboard) :not(input):focus{outline:0}.errorBoundaryError_a6uf{color:red;white-space:pre-wrap}.errorBoundaryFallback_VBag{color:red;padding:.55rem}.mainWrapper_z2l0{display:flex;flex:1 0 auto;flex-direction:column}.docusaurus-mt-lg{margin-top:3rem}#__docusaurus{display:flex;flex-direction:column;min-height:100%}.breadcrumbHomeIcon_YNFT{height:1.1rem;position:relative;top:1px;vertical-align:top;width:1.1rem}.breadcrumbsContainer_Z_bl{--ifm-breadcrumb-size-multiplier:0.8;margin-bottom:.8rem}.title_kItE{--ifm-h1-font-size:3rem;margin-bottom:calc(var(--ifm-leading)*1.25)}.searchQueryInput_u2C7,.searchVersionInput_m0Ui{background:var(--docsearch-searchbox-focus-background);border:2px solid var(--ifm-toc-border-color);border-radius:var(--ifm-global-radius);color:var(--docsearch-text-color);font:var(--ifm-font-size-base) var(--ifm-font-family-base);margin-bottom:.5rem;padding:.8rem;transition:border var(--ifm-transition-fast) ease;width:100%}.searchQueryInput_u2C7:focus,.searchVersionInput_m0Ui:focus{border-color:var(--docsearch-primary-color);outline:0}.searchQueryInput_u2C7::-moz-placeholder{color:var(--docsearch-muted-color)}.searchQueryInput_u2C7::placeholder{color:var(--docsearch-muted-color)}.searchResultsColumn_JPFH{font-size:.9rem;font-weight:700}.algoliaLogo_rT1R{max-width:150px}.algoliaLogoPathFill_WdUC{fill:var(--ifm-font-color-base)}.searchResultItem_Tv2o{border-bottom:1px solid var(--ifm-toc-border-color);padding:1rem 0}.searchResultItemHeading_KbCB{font-weight:400;margin-bottom:0}.searchResultItemPath_lhe1{color:var(--ifm-color-content-secondary);font-size:.8rem;--ifm-breadcrumb-separator-size-multiplier:1}.searchResultItemSummary_AEaO{font-style:italic;margin:.5rem 0 0}.loadingSpinner_XVxU{animation:1s linear infinite b;border:.4em solid #eee;border-radius:50%;border-top:.4em solid var(--ifm-color-primary);height:3rem;margin:0 auto;width:3rem}@keyframes b{to{transform:rotate(1turn)}}.loader_vvXV{margin-top:2rem}.search-result-match{background:rgba(255,215,142,.25);color:var(--docsearch-hit-color);padding:.09em 0}.homeNavContainer{padding-bottom:1rem}@media (min-width:576px){.container.container-custom{max-width:540px}.homeNavContainer{padding-bottom:1rem}}@media (min-width:768px){.nav-footer.spacer-y-4{padding-bottom:6rem;padding-top:6rem}.nav-footer .py-md-1{padding-bottom:.375rem!important;padding-top:.375rem!important}.container.container-custom{max-width:720px}.homeNavContainer{padding-bottom:1rem}}@media (min-width:992px){.homeNavContainer{height:90vh;max-height:900px;min-height:600px;padding-bottom:50rem}.homeNavItem{border-radius:3.25rem!important;margin-top:-3rem;min-height:400px;transition:.15s ease-in-out}.homeNavItem:after{bottom:3rem;color:var(--silverColor);content:"arrow_upward";font-family:Material Icons;-webkit-font-feature-settings:"liga";font-size:1.5rem;left:50%;opacity:0;position:absolute;transform:translate(-50%);transition:.2s ease-in-out}.homeNavItem:hover{box-shadow:0 1rem 3rem rgba(0,0,0,.04);transform:translateY(-1rem)}.homeNavItem:hover:after{opacity:1}.homeNavItemContent{margin-top:10%}.homeNavItem h1{font-size:4.2vw}.container.container-custom{max-width:960px}}@media (min-width:997px){.collapseSidebarButton_PEFL,.expandButton_TmdG{background-color:var(--docusaurus-collapse-button-bg)}.lastUpdated_JAkA{text-align:right}.tocMobile_ITEo{display:none}:root{--docusaurus-announcement-bar-height:30px}.announcementBarClose_gvF7,.announcementBarPlaceholder_vyr4{flex-basis:50px}.collapseSidebarButton_PEFL{border:1px solid var(--ifm-toc-border-color);border-radius:0;bottom:0;display:block!important;height:40px;position:sticky}.collapseSidebarButtonIcon_kv0_{margin-top:4px;transform:rotate(180deg)}.expandButtonIcon_i1dp,[dir=rtl] .collapseSidebarButtonIcon_kv0_{transform:rotate(0)}.collapseSidebarButton_PEFL:focus,.collapseSidebarButton_PEFL:hover,.expandButton_TmdG:focus,.expandButton_TmdG:hover{background-color:var(--docusaurus-collapse-button-bg-hover)}.menuHtmlItem_M9Kj{padding:var(--ifm-menu-link-padding-vertical) var(--ifm-menu-link-padding-horizontal)}.menu_SIkG{flex-grow:1;padding:.5rem}@supports (scrollbar-gutter:stable){.menu_SIkG{padding:.5rem 0 .5rem .5rem;scrollbar-gutter:stable}}.menuWithAnnouncementBar_GW3s{margin-bottom:var(--docusaurus-announcement-bar-height)}.sidebar_njMd{display:flex;flex-direction:column;height:100%;padding-top:var(--ifm-navbar-height);width:var(--doc-sidebar-width)}.sidebarWithHideableNavbar_wUlq{padding-top:0}.sidebarHidden_VK0M{opacity:0;visibility:hidden}.sidebarLogo_isFc{align-items:center;color:inherit!important;display:flex!important;margin:0 var(--ifm-navbar-padding-horizontal);max-height:var(--ifm-navbar-height);min-height:var(--ifm-navbar-height);text-decoration:none!important}.sidebarLogo_isFc img{height:2rem;margin-right:.5rem}.expandButton_TmdG{align-items:center;display:flex;height:100%;justify-content:center;position:absolute;right:0;top:0;transition:background-color var(--ifm-transition-fast) ease;width:100%}[dir=rtl] .expandButtonIcon_i1dp{transform:rotate(180deg)}.docSidebarContainer_YfHR{border-right:1px solid var(--ifm-toc-border-color);clip-path:inset(0);display:block;margin-top:calc(var(--ifm-navbar-height)*-1);transition:width var(--ifm-transition-fast) ease;width:var(--doc-sidebar-width);will-change:width}.docSidebarContainerHidden_DPk8{cursor:pointer;width:var(--doc-sidebar-hidden-width)}.sidebarViewport_aRkj{height:100%;max-height:100vh;position:sticky;top:0}.docMainContainer_TBSr{flex-grow:1;max-width:calc(100% - var(--doc-sidebar-width))}.docMainContainerEnhanced_lQrH{max-width:calc(100% - var(--doc-sidebar-hidden-width))}.docItemWrapperEnhanced_JWYK{max-width:calc(var(--ifm-container-width) + var(--doc-sidebar-width))!important}.navbarSearchContainer_Bca1{padding:var(--ifm-navbar-item-padding-vertical) var(--ifm-navbar-item-padding-horizontal)}.docItemCol_VOVn,.generatedIndexPage_vN6x{max-width:75%!important}.list_eTzJ article:nth-last-child(-n+2){margin-bottom:0!important}}@media only screen and (min-width:1024px){.navbar__inner a.navbar__item[href*=contributing]{background:#fff;border:1px solid var(--ifm-color-primary);border-radius:20px;color:var(--ifm-color-primary);font-size:14px;font-weight:700;height:35px;line-height:35px;margin-left:16px;padding:0 16px}.navbar__inner a.navbar__item[href*=contributing]:hover{background:var(--ifm-color-primary);color:#fff}}@media (min-width:1200px){.homeNavItem h1{font-size:3.5rem;line-height:1.2}.container.container-custom{max-width:1140px}.homeNavContainer{padding-bottom:50rem}}@media (min-width:1440px){.container{max-width:var(--ifm-container-width-xl)}}@media (max-width:996px){.col{--ifm-col-width:100%;flex-basis:var(--ifm-col-width);margin-left:0}.footer{--ifm-footer-padding-horizontal:0}.colorModeToggle_DEke,.footer__link-separator,.navbar__item,.tableOfContents_bqdL{display:none}.footer__col{margin-bottom:calc(var(--ifm-spacing-vertical)*3)}.footer__link-item{display:block}.hero{padding-left:0;padding-right:0}.navbar>.container,.navbar>.container-fluid{padding:0}.navbar__toggle{display:inherit}.navbar__search-input{width:9rem}.pills--block,.tabs--block{flex-direction:column}.docItemContainer_F8PC{padding:0 .3rem}.navbarSearchContainer_Bca1{position:absolute;right:var(--ifm-navbar-padding-horizontal)}}@media only screen and (max-width:996px){.searchQueryColumn_RTkw,.searchResultsColumn_JPFH{max-width:60%!important}.searchLogoColumn_rJIA,.searchVersionColumn_ypXd{max-width:40%!important}.searchLogoColumn_rJIA{padding-left:0!important}}@media (max-width:768px){.DocSearch-Button-Keys,.DocSearch-Button-Placeholder,.DocSearch-Commands,.DocSearch-Hit-Tree{display:none}:root{--docsearch-spacing:10px;--docsearch-footer-height:40px}.DocSearch-Dropdown{height:100%;max-height:calc(var(--docsearch-vh,1vh)*100 - var(--docsearch-searchbox-height) - var(--docsearch-spacing) - var(--docsearch-footer-height))}.DocSearch-Container{height:100vh;height:-webkit-fill-available;height:calc(var(--docsearch-vh,1vh)*100);position:absolute}.DocSearch-Footer{border-radius:0;bottom:0;position:absolute}.DocSearch-Hit-content-wrapper{display:flex;position:relative;width:80%}.DocSearch-Modal{border-radius:0;box-shadow:none;height:100vh;height:-webkit-fill-available;height:calc(var(--docsearch-vh,1vh)*100);margin:0;max-width:100%;width:100%}.DocSearch-Cancel{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;color:var(--docsearch-highlight-color);cursor:pointer;display:inline-block;flex:none;font:inherit;font-size:1em;font-weight:500;margin-left:var(--docsearch-spacing);outline:0;overflow:hidden;padding:0;-webkit-user-select:none;-moz-user-select:none;user-select:none;white-space:nowrap}}@media only screen and (max-width:750px){.DocSearch.DocSearch-Button{width:38px}}@media (max-width:576px){.markdown h1:first-child{--ifm-h1-font-size:2rem}.markdown>h2{--ifm-h2-font-size:1.5rem}.markdown>h3{--ifm-h3-font-size:1.25rem}}@media screen and (max-width:576px){.searchQueryColumn_RTkw{max-width:100%!important}.searchVersionColumn_ypXd{max-width:100%!important;padding-left:var(--ifm-spacing-horizontal)!important}}@media (hover:hover){.backToTopButton_sjWU:hover{background-color:var(--ifm-color-emphasis-300)}}@media (pointer:fine){.thin-scrollbar{scrollbar-width:thin}.thin-scrollbar::-webkit-scrollbar{height:var(--ifm-scrollbar-size);width:var(--ifm-scrollbar-size)}.thin-scrollbar::-webkit-scrollbar-track{background:var(--ifm-scrollbar-track-background-color);border-radius:10px}.thin-scrollbar::-webkit-scrollbar-thumb{background:var(--ifm-scrollbar-thumb-background-color);border-radius:10px}.thin-scrollbar::-webkit-scrollbar-thumb:hover{background:var(--ifm-scrollbar-thumb-hover-background-color)}}@media (prefers-reduced-motion:reduce){:root{--ifm-transition-fast:0ms;--ifm-transition-slow:0ms}}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Reset{animation:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;border-radius:50%;color:var(--docsearch-icon-color);cursor:pointer;right:0;stroke-width:var(--docsearch-icon-stroke-width)}.DocSearch-Hit--deleting,.DocSearch-Hit--favoriting{transition:none}.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{background:rgba(0,0,0,.2);transition:none}}@media print{.announcementBar_mb4j,.footer,.menu,.navbar,.pagination-nav,.table-of-contents,.tocMobile_ITEo{display:none}.tabs{page-break-inside:avoid}.codeBlockLines_e6Vv{white-space:pre-wrap}} \ No newline at end of file +.col,.container{padding:0 var(--ifm-spacing-horizontal);width:100%}.markdown>h2,.markdown>h3,.markdown>h4,.markdown>h5,.markdown>h6{margin-bottom:calc(var(--ifm-heading-vertical-rhythm-bottom)*var(--ifm-leading))}pre,table{overflow:auto}blockquote,pre{margin:0 0 var(--ifm-spacing-vertical)}.breadcrumbs__link,.button{transition-timing-function:var(--ifm-transition-timing-default)}.DocSearch-Button,.button{-webkit-user-select:none;-moz-user-select:none}.button,code{vertical-align:middle}.button--outline.button--active,.button--outline:active,.button--outline:hover,:root{--ifm-button-color:var(--ifm-font-color-base-inverse)}.dropdown,pre{position:relative}.menu__link:hover,a{transition:color var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.navbar--dark,:root{--ifm-navbar-link-hover-color:var(--ifm-color-primary)}.menu,.navbar-sidebar{overflow-x:hidden}:root,html[data-theme=dark]{--ifm-color-emphasis-500:var(--ifm-color-gray-500)}.markdown li,body{word-wrap:break-word}*,.DocSearch-Container,.DocSearch-Container *{box-sizing:border-box}.toggleButton_gllP,html{-webkit-tap-highlight-color:transparent}:root{--ifm-color-scheme:light;--ifm-dark-value:10%;--ifm-darker-value:15%;--ifm-darkest-value:30%;--ifm-light-value:15%;--ifm-lighter-value:30%;--ifm-lightest-value:50%;--ifm-contrast-background-value:90%;--ifm-contrast-foreground-value:70%;--ifm-contrast-background-dark-value:70%;--ifm-contrast-foreground-dark-value:90%;--ifm-color-primary:#3578e5;--ifm-color-secondary:#ebedf0;--ifm-color-success:#00a400;--ifm-color-info:#54c7ec;--ifm-color-warning:#ffba00;--ifm-color-danger:#fa383e;--ifm-color-primary-dark:#306cce;--ifm-color-primary-darker:#2d66c3;--ifm-color-primary-darkest:#2554a0;--ifm-color-primary-light:#538ce9;--ifm-color-primary-lighter:#72a1ed;--ifm-color-primary-lightest:#9abcf2;--ifm-color-primary-contrast-background:#ebf2fc;--ifm-color-primary-contrast-foreground:#102445;--ifm-color-secondary-dark:#d4d5d8;--ifm-color-secondary-darker:#c8c9cc;--ifm-color-secondary-darkest:#a4a6a8;--ifm-color-secondary-light:#eef0f2;--ifm-color-secondary-lighter:#f1f2f5;--ifm-color-secondary-lightest:#f5f6f8;--ifm-color-secondary-contrast-background:#fdfdfe;--ifm-color-secondary-contrast-foreground:#474748;--ifm-color-success-dark:#009400;--ifm-color-success-darker:#008b00;--ifm-color-success-darkest:#007300;--ifm-color-success-light:#26b226;--ifm-color-success-lighter:#4dbf4d;--ifm-color-success-lightest:#80d280;--ifm-color-success-contrast-background:#e6f6e6;--ifm-color-success-contrast-foreground:#003100;--ifm-color-info-dark:#4cb3d4;--ifm-color-info-darker:#47a9c9;--ifm-color-info-darkest:#3b8ba5;--ifm-color-info-light:#6ecfef;--ifm-color-info-lighter:#87d8f2;--ifm-color-info-lightest:#aae3f6;--ifm-color-info-contrast-background:#eef9fd;--ifm-color-info-contrast-foreground:#193c47;--ifm-color-warning-dark:#e6a700;--ifm-color-warning-darker:#d99e00;--ifm-color-warning-darkest:#b38200;--ifm-color-warning-light:#ffc426;--ifm-color-warning-lighter:#ffcf4d;--ifm-color-warning-lightest:#ffdd80;--ifm-color-warning-contrast-background:#fff8e6;--ifm-color-warning-contrast-foreground:#4d3800;--ifm-color-danger-dark:#e13238;--ifm-color-danger-darker:#d53035;--ifm-color-danger-darkest:#af272b;--ifm-color-danger-light:#fb565b;--ifm-color-danger-lighter:#fb7478;--ifm-color-danger-lightest:#fd9c9f;--ifm-color-danger-contrast-background:#ffebec;--ifm-color-danger-contrast-foreground:#4b1113;--ifm-color-white:#fff;--ifm-color-black:#000;--ifm-color-gray-0:var(--ifm-color-white);--ifm-color-gray-100:#f5f6f7;--ifm-color-gray-200:#ebedf0;--ifm-color-gray-300:#dadde1;--ifm-color-gray-400:#ccd0d5;--ifm-color-gray-500:#bec3c9;--ifm-color-gray-600:#8d949e;--ifm-color-gray-700:#606770;--ifm-color-gray-800:#444950;--ifm-color-gray-900:#1c1e21;--ifm-color-gray-1000:var(--ifm-color-black);--ifm-color-emphasis-0:var(--ifm-color-gray-0);--ifm-color-emphasis-100:var(--ifm-color-gray-100);--ifm-color-emphasis-200:var(--ifm-color-gray-200);--ifm-color-emphasis-300:var(--ifm-color-gray-300);--ifm-color-emphasis-400:var(--ifm-color-gray-400);--ifm-color-emphasis-600:var(--ifm-color-gray-600);--ifm-color-emphasis-700:var(--ifm-color-gray-700);--ifm-color-emphasis-800:var(--ifm-color-gray-800);--ifm-color-emphasis-900:var(--ifm-color-gray-900);--ifm-color-emphasis-1000:var(--ifm-color-gray-1000);--ifm-color-content:var(--ifm-color-emphasis-900);--ifm-color-content-inverse:var(--ifm-color-emphasis-0);--ifm-color-content-secondary:#525860;--ifm-background-color:transparent;--ifm-background-surface-color:var(--ifm-color-content-inverse);--ifm-global-border-width:1px;--ifm-global-radius:0.4rem;--ifm-hover-overlay:rgba(0,0,0,.05);--ifm-font-color-base:var(--ifm-color-content);--ifm-font-color-base-inverse:var(--ifm-color-content-inverse);--ifm-font-color-secondary:var(--ifm-color-content-secondary);--ifm-font-family-base:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";--ifm-font-family-monospace:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--ifm-font-size-base:100%;--ifm-font-weight-light:300;--ifm-font-weight-normal:400;--ifm-font-weight-semibold:500;--ifm-font-weight-bold:700;--ifm-font-weight-base:var(--ifm-font-weight-normal);--ifm-line-height-base:1.65;--ifm-global-spacing:1rem;--ifm-spacing-vertical:var(--ifm-global-spacing);--ifm-spacing-horizontal:var(--ifm-global-spacing);--ifm-transition-fast:200ms;--ifm-transition-slow:400ms;--ifm-transition-timing-default:cubic-bezier(0.08,0.52,0.52,1);--ifm-global-shadow-lw:0 1px 2px 0 rgba(0,0,0,.1);--ifm-global-shadow-md:0 5px 40px rgba(0,0,0,.2);--ifm-global-shadow-tl:0 12px 28px 0 rgba(0,0,0,.2),0 2px 4px 0 rgba(0,0,0,.1);--ifm-z-index-dropdown:100;--ifm-z-index-fixed:200;--ifm-z-index-overlay:400;--ifm-container-width:1140px;--ifm-container-width-xl:1320px;--ifm-code-background:#f6f7f8;--ifm-code-border-radius:var(--ifm-global-radius);--ifm-code-font-size:90%;--ifm-code-padding-horizontal:0.1rem;--ifm-code-padding-vertical:0.1rem;--ifm-pre-background:var(--ifm-code-background);--ifm-pre-border-radius:var(--ifm-code-border-radius);--ifm-pre-color:inherit;--ifm-pre-line-height:1.45;--ifm-pre-padding:1rem;--ifm-heading-color:inherit;--ifm-heading-margin-top:0;--ifm-heading-margin-bottom:var(--ifm-spacing-vertical);--ifm-heading-font-family:var(--ifm-font-family-base);--ifm-heading-font-weight:var(--ifm-font-weight-bold);--ifm-heading-line-height:1.25;--ifm-h1-font-size:2rem;--ifm-h2-font-size:1.5rem;--ifm-h3-font-size:1.25rem;--ifm-h4-font-size:1rem;--ifm-h5-font-size:0.875rem;--ifm-h6-font-size:0.85rem;--ifm-image-alignment-padding:1.25rem;--ifm-leading-desktop:1.25;--ifm-leading:calc(var(--ifm-leading-desktop)*1rem);--ifm-list-left-padding:2rem;--ifm-list-margin:1rem;--ifm-list-item-margin:0.25rem;--ifm-list-paragraph-margin:1rem;--ifm-table-cell-padding:0.75rem;--ifm-table-background:transparent;--ifm-table-stripe-background:rgba(0,0,0,.03);--ifm-table-border-width:1px;--ifm-table-border-color:var(--ifm-color-emphasis-300);--ifm-table-head-background:inherit;--ifm-table-head-color:inherit;--ifm-table-head-font-weight:var(--ifm-font-weight-bold);--ifm-table-cell-color:inherit;--ifm-link-color:var(--ifm-color-primary);--ifm-link-decoration:none;--ifm-link-hover-color:var(--ifm-link-color);--ifm-link-hover-decoration:underline;--ifm-paragraph-margin-bottom:var(--ifm-leading);--ifm-blockquote-font-size:var(--ifm-font-size-base);--ifm-blockquote-border-left-width:2px;--ifm-blockquote-padding-horizontal:var(--ifm-spacing-horizontal);--ifm-blockquote-padding-vertical:0;--ifm-blockquote-shadow:none;--ifm-blockquote-color:var(--ifm-color-emphasis-800);--ifm-blockquote-border-color:var(--ifm-color-emphasis-300);--ifm-hr-background-color:var(--ifm-color-emphasis-500);--ifm-hr-height:1px;--ifm-hr-margin-vertical:1.5rem;--ifm-scrollbar-size:7px;--ifm-scrollbar-track-background-color:#f1f1f1;--ifm-scrollbar-thumb-background-color:silver;--ifm-scrollbar-thumb-hover-background-color:#a7a7a7;--ifm-alert-background-color:inherit;--ifm-alert-border-color:inherit;--ifm-alert-border-radius:var(--ifm-global-radius);--ifm-alert-border-width:0px;--ifm-alert-border-left-width:5px;--ifm-alert-color:var(--ifm-font-color-base);--ifm-alert-padding-horizontal:var(--ifm-spacing-horizontal);--ifm-alert-padding-vertical:var(--ifm-spacing-vertical);--ifm-alert-shadow:var(--ifm-global-shadow-lw);--ifm-avatar-intro-margin:1rem;--ifm-avatar-intro-alignment:inherit;--ifm-avatar-photo-size:3rem;--ifm-badge-background-color:inherit;--ifm-badge-border-color:inherit;--ifm-badge-border-radius:var(--ifm-global-radius);--ifm-badge-border-width:var(--ifm-global-border-width);--ifm-badge-color:var(--ifm-color-white);--ifm-badge-padding-horizontal:calc(var(--ifm-spacing-horizontal)*0.5);--ifm-badge-padding-vertical:calc(var(--ifm-spacing-vertical)*0.25);--ifm-breadcrumb-border-radius:1.5rem;--ifm-breadcrumb-spacing:0.5rem;--ifm-breadcrumb-color-active:var(--ifm-color-primary);--ifm-breadcrumb-item-background-active:var(--ifm-hover-overlay);--ifm-breadcrumb-padding-horizontal:0.8rem;--ifm-breadcrumb-padding-vertical:0.4rem;--ifm-breadcrumb-size-multiplier:1;--ifm-breadcrumb-separator:url('data:image/svg+xml;utf8,');--ifm-breadcrumb-separator-filter:none;--ifm-breadcrumb-separator-size:0.5rem;--ifm-breadcrumb-separator-size-multiplier:1.25;--ifm-button-background-color:inherit;--ifm-button-border-color:var(--ifm-button-background-color);--ifm-button-border-width:var(--ifm-global-border-width);--ifm-button-font-weight:var(--ifm-font-weight-bold);--ifm-button-padding-horizontal:1.5rem;--ifm-button-padding-vertical:0.375rem;--ifm-button-size-multiplier:1;--ifm-button-transition-duration:var(--ifm-transition-fast);--ifm-button-border-radius:calc(var(--ifm-global-radius)*var(--ifm-button-size-multiplier));--ifm-button-group-spacing:2px;--ifm-card-background-color:var(--ifm-background-surface-color);--ifm-card-border-radius:calc(var(--ifm-global-radius)*2);--ifm-card-horizontal-spacing:var(--ifm-global-spacing);--ifm-card-vertical-spacing:var(--ifm-global-spacing);--ifm-toc-border-color:var(--ifm-color-emphasis-300);--ifm-toc-link-color:var(--ifm-color-content-secondary);--ifm-toc-padding-vertical:0.5rem;--ifm-toc-padding-horizontal:0.5rem;--ifm-dropdown-background-color:var(--ifm-background-surface-color);--ifm-dropdown-font-weight:var(--ifm-font-weight-semibold);--ifm-dropdown-link-color:var(--ifm-font-color-base);--ifm-dropdown-hover-background-color:var(--ifm-hover-overlay);--ifm-footer-background-color:var(--ifm-color-emphasis-100);--ifm-footer-color:inherit;--ifm-footer-link-color:var(--ifm-color-emphasis-700);--ifm-footer-link-hover-color:var(--ifm-color-primary);--ifm-footer-link-horizontal-spacing:0.5rem;--ifm-footer-padding-horizontal:calc(var(--ifm-spacing-horizontal)*2);--ifm-footer-padding-vertical:calc(var(--ifm-spacing-vertical)*2);--ifm-footer-title-color:inherit;--ifm-footer-logo-max-width:min(30rem,90vw);--ifm-hero-background-color:var(--ifm-background-surface-color);--ifm-hero-text-color:var(--ifm-color-emphasis-800);--ifm-menu-color:var(--ifm-color-emphasis-700);--ifm-menu-color-active:var(--ifm-color-primary);--ifm-menu-color-background-active:var(--ifm-hover-overlay);--ifm-menu-color-background-hover:var(--ifm-hover-overlay);--ifm-menu-link-padding-horizontal:0.75rem;--ifm-menu-link-padding-vertical:0.375rem;--ifm-menu-link-sublist-icon:url('data:image/svg+xml;utf8,');--ifm-menu-link-sublist-icon-filter:none;--ifm-navbar-background-color:var(--ifm-background-surface-color);--ifm-navbar-height:3.75rem;--ifm-navbar-item-padding-horizontal:0.75rem;--ifm-navbar-item-padding-vertical:0.25rem;--ifm-navbar-link-color:var(--ifm-font-color-base);--ifm-navbar-link-active-color:var(--ifm-link-color);--ifm-navbar-padding-horizontal:var(--ifm-spacing-horizontal);--ifm-navbar-padding-vertical:calc(var(--ifm-spacing-vertical)*0.5);--ifm-navbar-shadow:var(--ifm-global-shadow-lw);--ifm-navbar-search-input-background-color:var(--ifm-color-emphasis-200);--ifm-navbar-search-input-color:var(--ifm-color-emphasis-800);--ifm-navbar-search-input-placeholder-color:var(--ifm-color-emphasis-500);--ifm-navbar-search-input-icon:url('data:image/svg+xml;utf8,');--ifm-navbar-sidebar-width:83vw;--ifm-pagination-border-radius:var(--ifm-global-radius);--ifm-pagination-color-active:var(--ifm-color-primary);--ifm-pagination-font-size:1rem;--ifm-pagination-item-active-background:var(--ifm-hover-overlay);--ifm-pagination-page-spacing:0.2em;--ifm-pagination-padding-horizontal:calc(var(--ifm-spacing-horizontal)*1);--ifm-pagination-padding-vertical:calc(var(--ifm-spacing-vertical)*0.25);--ifm-pagination-nav-border-radius:var(--ifm-global-radius);--ifm-pagination-nav-color-hover:var(--ifm-color-primary);--ifm-pills-color-active:var(--ifm-color-primary);--ifm-pills-color-background-active:var(--ifm-hover-overlay);--ifm-pills-spacing:0.125rem;--ifm-tabs-color:var(--ifm-font-color-secondary);--ifm-tabs-color-active:var(--ifm-color-primary);--ifm-tabs-color-active-border:var(--ifm-tabs-color-active);--ifm-tabs-padding-horizontal:1rem;--ifm-tabs-padding-vertical:1rem;--docusaurus-progress-bar-color:var(--ifm-color-primary);--ifm-color-primary:#e6007a;--ifm-color-primary-dark:#cf006e;--ifm-color-primary-darker:#c40068;--ifm-color-primary-darkest:#a10055;--ifm-color-primary-light:#fd0086;--ifm-color-primary-lighter:#ff0a8c;--ifm-color-primary-lightest:#ff2c9c;--secondaryColor:#172026;--snowColor:#efefef;--silverColor:#b7b8bb;--nickelColor:#6d7278;--blackColor:#000;--ifm-navbar-height:50px;--sansFontFamily:"Inter",sans-serif!important;--headingFontFamily:"Unbounded",sans-serif!important;--docsearch-searchbox-background:#fff;--docsearch-searchbox-shadow:var(--snowColor);--docusaurus-announcement-bar-height:auto!important;--custom-code-block-background:#f6f8fa;--docusaurus-highlighted-code-line-bg:#e6ebf1;--custom-content-max-width:none;--docusaurus-tag-list-border:var(--ifm-color-emphasis-300);--docsearch-primary-color:#5468ff;--docsearch-text-color:#1c1e21;--docsearch-spacing:12px;--docsearch-icon-stroke-width:1.4;--docsearch-highlight-color:var(--docsearch-primary-color);--docsearch-muted-color:#969faf;--docsearch-container-background:rgba(101,108,133,.8);--docsearch-logo-color:#5468ff;--docsearch-modal-width:560px;--docsearch-modal-height:600px;--docsearch-modal-background:#f5f6f7;--docsearch-modal-shadow:inset 1px 1px 0 0 hsla(0,0%,100%,.5),0 3px 8px 0 #555a64;--docsearch-searchbox-height:56px;--docsearch-searchbox-background:#ebedf0;--docsearch-searchbox-focus-background:#fff;--docsearch-searchbox-shadow:inset 0 0 0 2px var(--docsearch-primary-color);--docsearch-hit-height:56px;--docsearch-hit-color:#444950;--docsearch-hit-active-color:#fff;--docsearch-hit-background:#fff;--docsearch-hit-shadow:0 1px 3px 0 #d4d9e1;--docsearch-key-gradient:linear-gradient(-225deg,#d5dbe4,#f8f8f8);--docsearch-key-shadow:inset 0 -2px 0 0 #cdcde6,inset 0 0 1px 1px #fff,0 1px 2px 1px rgba(30,35,90,.4);--docsearch-key-pressed-shadow:inset 0 -2px 0 0 #cdcde6,inset 0 0 1px 1px #fff,0 1px 1px 0 rgba(30,35,90,.4);--docsearch-footer-height:44px;--docsearch-footer-background:#fff;--docsearch-footer-shadow:0 -1px 0 0 #e0e3e8,0 -3px 6px 0 rgba(69,98,155,.12);--docsearch-primary-color:var(--ifm-color-primary);--docsearch-text-color:var(--ifm-font-color-base);--docusaurus-announcement-bar-height:auto;--docusaurus-collapse-button-bg:transparent;--docusaurus-collapse-button-bg-hover:rgba(0,0,0,.1);--doc-sidebar-width:300px;--doc-sidebar-hidden-width:30px}.badge--danger,.badge--info,.badge--primary,.badge--secondary,.badge--success,.badge--warning{--ifm-badge-border-color:var(--ifm-badge-background-color)}.button--link,.button--outline{--ifm-button-background-color:transparent}html{background-color:var(--ifm-background-color);color:var(--ifm-font-color-base);color-scheme:var(--ifm-color-scheme);font:var(--ifm-font-size-base)/var(--ifm-line-height-base) var(--ifm-font-family-base);-webkit-font-smoothing:antialiased;text-rendering:optimizelegibility;-webkit-text-size-adjust:100%;-moz-text-size-adjust:100%;text-size-adjust:100%}iframe{border:0;color-scheme:auto}.container{margin:0 auto;max-width:var(--ifm-container-width)}.container--fluid{max-width:inherit}.row{display:flex;flex-wrap:wrap;margin:0 calc(var(--ifm-spacing-horizontal)*-1)}.list_eTzJ article:last-child,.margin-bottom--none,.margin-vert--none,.markdown>:last-child{margin-bottom:0!important}.margin-top--none,.margin-vert--none,.tabItem_LNqP,footer .list-social-links li{margin-top:0!important}.row--no-gutters{margin-left:0;margin-right:0}.margin-horiz--none,.margin-right--none{margin-right:0!important}.row--no-gutters>.col{padding-left:0;padding-right:0}.row--align-top{align-items:flex-start}.row--align-bottom{align-items:flex-end}.menuExternalLink_NmtK,.row--align-center{align-items:center}.row--align-stretch{align-items:stretch}.row--align-baseline{align-items:baseline}.col{--ifm-col-width:100%;flex:1 0;margin-left:0;max-width:var(--ifm-col-width)}.padding-bottom--none,.padding-vert--none{padding-bottom:0!important}.padding-top--none,.padding-vert--none{padding-top:0!important}.padding-horiz--none,.padding-left--none{padding-left:0!important}.padding-horiz--none,.padding-right--none{padding-right:0!important}.col[class*=col--]{flex:0 0 var(--ifm-col-width)}.col--1{--ifm-col-width:8.33333%}.col--offset-1{margin-left:8.33333%}.col--2{--ifm-col-width:16.66667%}.col--offset-2{margin-left:16.66667%}.col--3{--ifm-col-width:25%}.col--offset-3{margin-left:25%}.col--4{--ifm-col-width:33.33333%}.col--offset-4{margin-left:33.33333%}.col--5{--ifm-col-width:41.66667%}.col--offset-5{margin-left:41.66667%}.col--6{--ifm-col-width:50%}.col--offset-6{margin-left:50%}.col--7{--ifm-col-width:58.33333%}.col--offset-7{margin-left:58.33333%}.col--8{--ifm-col-width:66.66667%}.col--offset-8{margin-left:66.66667%}.col--9{--ifm-col-width:75%}.col--offset-9{margin-left:75%}.col--10{--ifm-col-width:83.33333%}.col--offset-10{margin-left:83.33333%}.col--11{--ifm-col-width:91.66667%}.col--offset-11{margin-left:91.66667%}.col--12{--ifm-col-width:100%}.col--offset-12{margin-left:100%}.margin-horiz--none,.margin-left--none{margin-left:0!important}.margin--none{margin:0!important}.margin-bottom--xs,.margin-vert--xs{margin-bottom:.25rem!important}.margin-top--xs,.margin-vert--xs{margin-top:.25rem!important}.margin-horiz--xs,.margin-left--xs{margin-left:.25rem!important}.margin-horiz--xs,.margin-right--xs{margin-right:.25rem!important}.margin--xs{margin:.25rem!important}.margin-bottom--sm,.margin-vert--sm{margin-bottom:.5rem!important}.margin-top--sm,.margin-vert--sm{margin-top:.5rem!important}.margin-horiz--sm,.margin-left--sm{margin-left:.5rem!important}.margin-horiz--sm,.margin-right--sm{margin-right:.5rem!important}.margin--sm{margin:.5rem!important}.margin-bottom--md,.margin-vert--md{margin-bottom:1rem!important}.margin-top--md,.margin-vert--md{margin-top:1rem!important}.margin-horiz--md,.margin-left--md{margin-left:1rem!important}.margin-horiz--md,.margin-right--md{margin-right:1rem!important}.margin--md{margin:1rem!important}.margin-bottom--lg,.margin-vert--lg{margin-bottom:2rem!important}.margin-top--lg,.margin-vert--lg{margin-top:2rem!important}.margin-horiz--lg,.margin-left--lg{margin-left:2rem!important}.margin-horiz--lg,.margin-right--lg{margin-right:2rem!important}.margin--lg{margin:2rem!important}.margin-bottom--xl,.margin-vert--xl{margin-bottom:5rem!important}.margin-top--xl,.margin-vert--xl{margin-top:5rem!important}.margin-horiz--xl,.margin-left--xl{margin-left:5rem!important}.margin-horiz--xl,.margin-right--xl{margin-right:5rem!important}.margin--xl{margin:5rem!important}.padding--none{padding:0!important}.padding-bottom--xs,.padding-vert--xs{padding-bottom:.25rem!important}.padding-top--xs,.padding-vert--xs{padding-top:.25rem!important}.padding-horiz--xs,.padding-left--xs{padding-left:.25rem!important}.padding-horiz--xs,.padding-right--xs{padding-right:.25rem!important}.padding--xs{padding:.25rem!important}.padding-bottom--sm,.padding-vert--sm{padding-bottom:.5rem!important}.padding-top--sm,.padding-vert--sm{padding-top:.5rem!important}.padding-horiz--sm,.padding-left--sm{padding-left:.5rem!important}.padding-horiz--sm,.padding-right--sm{padding-right:.5rem!important}.padding--sm{padding:.5rem!important}.padding-bottom--md,.padding-vert--md{padding-bottom:1rem!important}.padding-top--md,.padding-vert--md{padding-top:1rem!important}.padding-horiz--md,.padding-left--md{padding-left:1rem!important}.padding-horiz--md,.padding-right--md{padding-right:1rem!important}.padding--md{padding:1rem!important}.padding-bottom--lg,.padding-vert--lg{padding-bottom:2rem!important}.padding-top--lg,.padding-vert--lg{padding-top:2rem!important}.padding-horiz--lg,.padding-left--lg{padding-left:2rem!important}.padding-horiz--lg,.padding-right--lg{padding-right:2rem!important}.padding--lg{padding:2rem!important}.padding-bottom--xl,.padding-vert--xl{padding-bottom:5rem!important}.padding-top--xl,.padding-vert--xl{padding-top:5rem!important}.padding-horiz--xl,.padding-left--xl{padding-left:5rem!important}.padding-horiz--xl,.padding-right--xl{padding-right:5rem!important}.padding--xl{padding:5rem!important}code{background-color:var(--ifm-code-background);border:.1rem solid rgba(0,0,0,.1);border-radius:var(--ifm-code-border-radius);font-family:var(--ifm-font-family-monospace);font-size:var(--ifm-code-font-size);padding:var(--ifm-code-padding-vertical) var(--ifm-code-padding-horizontal)}a code{color:inherit}pre{background-color:var(--ifm-pre-background);border-radius:var(--ifm-pre-border-radius);color:var(--ifm-pre-color);font:var(--ifm-code-font-size)/var(--ifm-pre-line-height) var(--ifm-font-family-monospace);padding:var(--ifm-pre-padding)}pre code{background-color:transparent;border:none;font-size:100%;line-height:inherit;padding:0}kbd{background-color:var(--ifm-color-emphasis-0);border:1px solid var(--ifm-color-emphasis-400);border-radius:.2rem;box-shadow:inset 0 -1px 0 var(--ifm-color-emphasis-400);color:var(--ifm-color-emphasis-800);font:80% var(--ifm-font-family-monospace);padding:.15rem .3rem}h1,h2,h3,h4,h5,h6{color:var(--ifm-heading-color);font-family:var(--ifm-heading-font-family);font-weight:var(--ifm-heading-font-weight);line-height:var(--ifm-heading-line-height);margin:var(--ifm-heading-margin-top) 0 var(--ifm-heading-margin-bottom) 0}h1{font-size:var(--ifm-h1-font-size)}h2{font-size:var(--ifm-h2-font-size)}h3{font-size:var(--ifm-h3-font-size)}h4{font-size:var(--ifm-h4-font-size)}h5{font-size:var(--ifm-h5-font-size)}h6{font-size:var(--ifm-h6-font-size)}.container_lyt7,.container_lyt7>svg,img{max-width:100%}img[align=right]{padding-left:var(--image-alignment-padding)}img[align=left]{padding-right:var(--image-alignment-padding)}.markdown{--ifm-h1-vertical-rhythm-top:3;--ifm-h2-vertical-rhythm-top:2;--ifm-h3-vertical-rhythm-top:1.5;--ifm-heading-vertical-rhythm-top:1.25;--ifm-h1-vertical-rhythm-bottom:1.25;--ifm-heading-vertical-rhythm-bottom:1}.markdown:after,.markdown:before{content:"";display:table}.markdown:after{clear:both}.markdown h1:first-child{--ifm-h1-font-size:3rem;margin-bottom:calc(var(--ifm-h1-vertical-rhythm-bottom)*var(--ifm-leading))}.markdown>h2{--ifm-h2-font-size:2rem;margin-top:calc(var(--ifm-h2-vertical-rhythm-top)*var(--ifm-leading))}.markdown>h3{--ifm-h3-font-size:1.5rem;margin-top:calc(var(--ifm-h3-vertical-rhythm-top)*var(--ifm-leading))}.markdown>h4,.markdown>h5,.markdown>h6{margin-top:calc(var(--ifm-heading-vertical-rhythm-top)*var(--ifm-leading))}.markdown>p,.markdown>pre,.markdown>ul,.tabList__CuJ{margin-bottom:var(--ifm-leading)}.markdown li>p{margin-top:var(--ifm-list-paragraph-margin)}.markdown li+li{margin-top:var(--ifm-list-item-margin)}ol,ul{margin:0 0 var(--ifm-list-margin);padding-left:var(--ifm-list-left-padding)}ol ol,ul ol{list-style-type:lower-roman}ol ol,ol ul,ul ol,ul ul{margin:0}ol ol ol,ol ul ol,ul ol ol,ul ul ol{list-style-type:lower-alpha}table{border-collapse:collapse;display:block;margin-bottom:var(--ifm-spacing-vertical)}table thead tr{border-bottom:2px solid var(--ifm-table-border-color)}table thead,table tr:nth-child(2n){background-color:var(--ifm-table-stripe-background)}table tr{background-color:var(--ifm-table-background);border-top:var(--ifm-table-border-width) solid var(--ifm-table-border-color)}table td,table th{border:var(--ifm-table-border-width) solid var(--ifm-table-border-color);padding:var(--ifm-table-cell-padding)}table th{background-color:var(--ifm-table-head-background);color:var(--ifm-table-head-color);font-weight:var(--ifm-table-head-font-weight)}table td{color:var(--ifm-table-cell-color)}strong{font-weight:var(--ifm-font-weight-bold)}a{color:var(--ifm-link-color);text-decoration:var(--ifm-link-decoration)}a:hover{color:var(--ifm-link-hover-color);text-decoration:var(--ifm-link-hover-decoration)}.button:hover,.text--no-decoration,.text--no-decoration:hover,a:not([href]){text-decoration:none}p{margin:0 0 var(--ifm-paragraph-margin-bottom)}blockquote{border-left:var(--ifm-blockquote-border-left-width) solid var(--ifm-blockquote-border-color);box-shadow:var(--ifm-blockquote-shadow);color:var(--ifm-blockquote-color);font-size:var(--ifm-blockquote-font-size);padding:var(--ifm-blockquote-padding-vertical) var(--ifm-blockquote-padding-horizontal)}blockquote>:first-child{margin-top:0}blockquote>:last-child{margin-bottom:0}hr{background-color:var(--ifm-hr-background-color);border:0;height:var(--ifm-hr-height);margin:var(--ifm-hr-margin-vertical) 0}.shadow--lw{box-shadow:var(--ifm-global-shadow-lw)!important}.shadow--md{box-shadow:var(--ifm-global-shadow-md)!important}.shadow--tl{box-shadow:var(--ifm-global-shadow-tl)!important}.text--primary{color:var(--ifm-color-primary)}.text--secondary{color:var(--ifm-color-secondary)}.text--success{color:var(--ifm-color-success)}.text--info{color:var(--ifm-color-info)}.text--warning{color:var(--ifm-color-warning)}.text--danger{color:var(--ifm-color-danger)}.text--center{text-align:center}.text--left{text-align:left}.text--justify{text-align:justify}.text--right{text-align:right}.text--capitalize{text-transform:capitalize}.text--lowercase{text-transform:lowercase}.alert__heading,.text--uppercase{text-transform:uppercase}.text--light{font-weight:var(--ifm-font-weight-light)}.text--normal{font-weight:var(--ifm-font-weight-normal)}.text--semibold{font-weight:var(--ifm-font-weight-semibold)}.text--bold{font-weight:var(--ifm-font-weight-bold)}.text--italic{font-style:italic}.text--truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text--break{word-wrap:break-word!important;word-break:break-word!important}.clean-btn{background:none;border:none;color:inherit;cursor:pointer;font-family:inherit;padding:0}.alert,.alert .close{color:var(--ifm-alert-foreground-color)}.clean-list{list-style:none;padding-left:0}.alert--primary{--ifm-alert-background-color:var(--ifm-color-primary-contrast-background);--ifm-alert-background-color-highlight:rgba(53,120,229,.15);--ifm-alert-foreground-color:var(--ifm-color-primary-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-primary-dark)}.alert--secondary{--ifm-alert-background-color:var(--ifm-color-secondary-contrast-background);--ifm-alert-background-color-highlight:rgba(235,237,240,.15);--ifm-alert-foreground-color:var(--ifm-color-secondary-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-secondary-dark)}.alert--success{--ifm-alert-background-color:var(--ifm-color-success-contrast-background);--ifm-alert-background-color-highlight:rgba(0,164,0,.15);--ifm-alert-foreground-color:var(--ifm-color-success-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-success-dark)}.alert--info{--ifm-alert-background-color:var(--ifm-color-info-contrast-background);--ifm-alert-background-color-highlight:rgba(84,199,236,.15);--ifm-alert-foreground-color:var(--ifm-color-info-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-info-dark)}.alert--warning{--ifm-alert-background-color:var(--ifm-color-warning-contrast-background);--ifm-alert-background-color-highlight:rgba(255,186,0,.15);--ifm-alert-foreground-color:var(--ifm-color-warning-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-warning-dark)}.alert--danger{--ifm-alert-background-color:var(--ifm-color-danger-contrast-background);--ifm-alert-background-color-highlight:rgba(250,56,62,.15);--ifm-alert-foreground-color:var(--ifm-color-danger-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-danger-dark)}.alert{--ifm-code-background:var(--ifm-alert-background-color-highlight);--ifm-link-color:var(--ifm-alert-foreground-color);--ifm-link-hover-color:var(--ifm-alert-foreground-color);--ifm-link-decoration:underline;--ifm-tabs-color:var(--ifm-alert-foreground-color);--ifm-tabs-color-active:var(--ifm-alert-foreground-color);--ifm-tabs-color-active-border:var(--ifm-alert-border-color);background-color:var(--ifm-alert-background-color);border:var(--ifm-alert-border-width) solid var(--ifm-alert-border-color);border-left-width:var(--ifm-alert-border-left-width);border-radius:var(--ifm-alert-border-radius);box-shadow:var(--ifm-alert-shadow);padding:var(--ifm-alert-padding-vertical) var(--ifm-alert-padding-horizontal)}.alert__heading{align-items:center;display:flex;font:700 var(--ifm-h5-font-size)/var(--ifm-heading-line-height) var(--ifm-heading-font-family);margin-bottom:.5rem}.alert__icon{display:inline-flex;margin-right:.4em}.alert__icon svg{fill:var(--ifm-alert-foreground-color);stroke:var(--ifm-alert-foreground-color);stroke-width:0}.alert .close{margin:calc(var(--ifm-alert-padding-vertical)*-1) calc(var(--ifm-alert-padding-horizontal)*-1) 0 0;opacity:.75}.alert .close:focus,.alert .close:hover,.hash-link:focus,:hover>.hash-link{opacity:1}.alert a{text-decoration-color:var(--ifm-alert-border-color)}.alert a:hover{text-decoration-thickness:2px}.avatar{-moz-column-gap:var(--ifm-avatar-intro-margin);column-gap:var(--ifm-avatar-intro-margin);display:flex}.avatar__photo{border-radius:50%;display:block;height:var(--ifm-avatar-photo-size);overflow:hidden;width:var(--ifm-avatar-photo-size)}.card--full-height,.navbar__logo img,body,html{height:100%}.avatar__photo--sm{--ifm-avatar-photo-size:2rem}.avatar__photo--lg{--ifm-avatar-photo-size:4rem}.avatar__photo--xl{--ifm-avatar-photo-size:6rem}.avatar__intro{display:flex;flex:1 1;flex-direction:column;justify-content:center;text-align:var(--ifm-avatar-intro-alignment)}.badge,.breadcrumbs__item,.breadcrumbs__link,.button,.dropdown>.navbar__link:after{display:inline-block}.avatar__name{font:700 var(--ifm-h4-font-size)/var(--ifm-heading-line-height) var(--ifm-font-family-base)}.avatar__subtitle{margin-top:.25rem}.avatar--vertical{--ifm-avatar-intro-alignment:center;--ifm-avatar-intro-margin:0.5rem;align-items:center;flex-direction:column}.badge{background-color:var(--ifm-badge-background-color);border:var(--ifm-badge-border-width) solid var(--ifm-badge-border-color);border-radius:var(--ifm-badge-border-radius);color:var(--ifm-badge-color);font-size:75%;font-weight:var(--ifm-font-weight-bold);line-height:1;padding:var(--ifm-badge-padding-vertical) var(--ifm-badge-padding-horizontal)}.badge--primary{--ifm-badge-background-color:var(--ifm-color-primary)}.badge--secondary{--ifm-badge-background-color:var(--ifm-color-secondary);color:var(--ifm-color-black)}.breadcrumbs__link,.button.button--secondary.button--outline:not(.button--active):not(:hover){color:var(--ifm-font-color-base)}.badge--success{--ifm-badge-background-color:var(--ifm-color-success)}.badge--info{--ifm-badge-background-color:var(--ifm-color-info)}.badge--warning{--ifm-badge-background-color:var(--ifm-color-warning)}.badge--danger{--ifm-badge-background-color:var(--ifm-color-danger)}.breadcrumbs{margin-bottom:0;padding-left:0}.breadcrumbs__item:not(:last-child):after{background:var(--ifm-breadcrumb-separator) center;content:" ";display:inline-block;filter:var(--ifm-breadcrumb-separator-filter);height:calc(var(--ifm-breadcrumb-separator-size)*var(--ifm-breadcrumb-size-multiplier)*var(--ifm-breadcrumb-separator-size-multiplier));margin:0 var(--ifm-breadcrumb-spacing);opacity:.5;width:calc(var(--ifm-breadcrumb-separator-size)*var(--ifm-breadcrumb-size-multiplier)*var(--ifm-breadcrumb-separator-size-multiplier))}.breadcrumbs__item--active .breadcrumbs__link{background:var(--ifm-breadcrumb-item-background-active);color:var(--ifm-breadcrumb-color-active)}.breadcrumbs__link{border-radius:var(--ifm-breadcrumb-border-radius);font-size:calc(1rem*var(--ifm-breadcrumb-size-multiplier));padding:calc(var(--ifm-breadcrumb-padding-vertical)*var(--ifm-breadcrumb-size-multiplier)) calc(var(--ifm-breadcrumb-padding-horizontal)*var(--ifm-breadcrumb-size-multiplier));transition-duration:var(--ifm-transition-fast);transition-property:background,color}.breadcrumbs__link:link:hover,.breadcrumbs__link:visited:hover,area[href].breadcrumbs__link:hover{background:var(--ifm-breadcrumb-item-background-active);text-decoration:none}.breadcrumbs__link:-moz-any-link:hover{background:var(--ifm-breadcrumb-item-background-active);text-decoration:none}.breadcrumbs__link:any-link:hover{background:var(--ifm-breadcrumb-item-background-active);text-decoration:none}.breadcrumbs--sm{--ifm-breadcrumb-size-multiplier:0.8}.breadcrumbs--lg{--ifm-breadcrumb-size-multiplier:1.2}.button{background-color:var(--ifm-button-background-color);border:var(--ifm-button-border-width) solid var(--ifm-button-border-color);border-radius:var(--ifm-button-border-radius);cursor:pointer;font-size:calc(.875rem*var(--ifm-button-size-multiplier));font-weight:var(--ifm-button-font-weight);line-height:1.5;padding:calc(var(--ifm-button-padding-vertical)*var(--ifm-button-size-multiplier)) calc(var(--ifm-button-padding-horizontal)*var(--ifm-button-size-multiplier));text-align:center;transition-duration:var(--ifm-button-transition-duration);transition-property:color,background,border-color;user-select:none;white-space:nowrap}.button,.button:hover{color:var(--ifm-button-color)}.button--outline{--ifm-button-color:var(--ifm-button-border-color)}.button--outline:hover{--ifm-button-background-color:var(--ifm-button-border-color)}.button--link{--ifm-button-border-color:transparent;color:var(--ifm-link-color);text-decoration:var(--ifm-link-decoration)}.button--link.button--active,.button--link:active,.button--link:hover{color:var(--ifm-link-hover-color);text-decoration:var(--ifm-link-hover-decoration)}.button.disabled,.button:disabled,.button[disabled]{opacity:.65;pointer-events:none}.button--sm{--ifm-button-size-multiplier:0.8}.button--lg{--ifm-button-size-multiplier:1.35}.button--block{display:block;width:100%}.button.button--secondary{color:var(--ifm-color-gray-900)}:where(.button--primary){--ifm-button-background-color:var(--ifm-color-primary);--ifm-button-border-color:var(--ifm-color-primary)}:where(.button--primary):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-primary-dark);--ifm-button-border-color:var(--ifm-color-primary-dark)}.button--primary.button--active,.button--primary:active{--ifm-button-background-color:var(--ifm-color-primary-darker);--ifm-button-border-color:var(--ifm-color-primary-darker)}:where(.button--secondary){--ifm-button-background-color:var(--ifm-color-secondary);--ifm-button-border-color:var(--ifm-color-secondary)}:where(.button--secondary):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-secondary-dark);--ifm-button-border-color:var(--ifm-color-secondary-dark)}.button--secondary.button--active,.button--secondary:active{--ifm-button-background-color:var(--ifm-color-secondary-darker);--ifm-button-border-color:var(--ifm-color-secondary-darker)}:where(.button--success){--ifm-button-background-color:var(--ifm-color-success);--ifm-button-border-color:var(--ifm-color-success)}:where(.button--success):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-success-dark);--ifm-button-border-color:var(--ifm-color-success-dark)}.button--success.button--active,.button--success:active{--ifm-button-background-color:var(--ifm-color-success-darker);--ifm-button-border-color:var(--ifm-color-success-darker)}:where(.button--info){--ifm-button-background-color:var(--ifm-color-info);--ifm-button-border-color:var(--ifm-color-info)}:where(.button--info):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-info-dark);--ifm-button-border-color:var(--ifm-color-info-dark)}.button--info.button--active,.button--info:active{--ifm-button-background-color:var(--ifm-color-info-darker);--ifm-button-border-color:var(--ifm-color-info-darker)}:where(.button--warning){--ifm-button-background-color:var(--ifm-color-warning);--ifm-button-border-color:var(--ifm-color-warning)}:where(.button--warning):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-warning-dark);--ifm-button-border-color:var(--ifm-color-warning-dark)}.button--warning.button--active,.button--warning:active{--ifm-button-background-color:var(--ifm-color-warning-darker);--ifm-button-border-color:var(--ifm-color-warning-darker)}:where(.button--danger){--ifm-button-background-color:var(--ifm-color-danger);--ifm-button-border-color:var(--ifm-color-danger)}:where(.button--danger):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-danger-dark);--ifm-button-border-color:var(--ifm-color-danger-dark)}.button--danger.button--active,.button--danger:active{--ifm-button-background-color:var(--ifm-color-danger-darker);--ifm-button-border-color:var(--ifm-color-danger-darker)}.button-group{display:inline-flex;gap:var(--ifm-button-group-spacing)}.button-group>.button:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.button-group>.button:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.button-group--block{display:flex;justify-content:stretch}.button-group--block>.button{flex-grow:1}.card{background-color:var(--ifm-card-background-color);border-radius:var(--ifm-card-border-radius);box-shadow:var(--ifm-global-shadow-lw);display:flex;flex-direction:column;overflow:hidden}.card__image{padding-top:var(--ifm-card-vertical-spacing)}.card__image:first-child{padding-top:0}.card__body,.card__footer,.card__header{padding:var(--ifm-card-vertical-spacing) var(--ifm-card-horizontal-spacing)}.card__body:not(:last-child),.card__footer:not(:last-child),.card__header:not(:last-child){padding-bottom:0}.card__body>:last-child,.card__footer>:last-child,.card__header>:last-child{margin-bottom:0}.card__footer{margin-top:auto}.table-of-contents{font-size:.8rem;margin-bottom:0;padding:var(--ifm-toc-padding-vertical) 0}.table-of-contents,.table-of-contents ul{list-style:none;padding-left:var(--ifm-toc-padding-horizontal)}.table-of-contents li{margin:var(--ifm-toc-padding-vertical) var(--ifm-toc-padding-horizontal)}.table-of-contents__left-border{border-left:1px solid var(--ifm-toc-border-color)}.table-of-contents__link{color:var(--ifm-toc-link-color);display:block}.table-of-contents__link--active,.table-of-contents__link--active code,.table-of-contents__link:hover,.table-of-contents__link:hover code{color:var(--ifm-color-primary);text-decoration:none}.close{color:var(--ifm-color-black);float:right;font-size:1.5rem;font-weight:var(--ifm-font-weight-bold);line-height:1;opacity:.5;padding:1rem;transition:opacity var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.close:hover{opacity:.7}.close:focus,.theme-code-block-highlighted-line .codeLineNumber_Tfdd:before{opacity:.8}.dropdown{display:inline-flex;font-weight:var(--ifm-dropdown-font-weight);vertical-align:top}.dropdown--hoverable:hover .dropdown__menu,.dropdown--show .dropdown__menu{opacity:1;pointer-events:all;transform:translateY(-1px);visibility:visible}#nprogress,.dropdown__menu,.navbar__item.dropdown .navbar__link:not([href]){pointer-events:none}.dropdown--right .dropdown__menu{left:inherit;right:0}.dropdown--nocaret .navbar__link:after{content:none!important}.dropdown__menu{background-color:var(--ifm-dropdown-background-color);border-radius:var(--ifm-global-radius);box-shadow:var(--ifm-global-shadow-md);left:0;list-style:none;max-height:80vh;min-width:10rem;opacity:0;overflow-y:auto;padding:.5rem;position:absolute;top:calc(100% - var(--ifm-navbar-item-padding-vertical) + .3rem);transform:translateY(-.625rem);transition-duration:var(--ifm-transition-fast);transition-property:opacity,transform,visibility;transition-timing-function:var(--ifm-transition-timing-default);visibility:hidden;z-index:var(--ifm-z-index-dropdown)}.menu__caret,.menu__link,.menu__list-item-collapsible{border-radius:.25rem;transition:background var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.dropdown__link{border-radius:.25rem;color:var(--ifm-dropdown-link-color);display:block;font-size:.875rem;margin-top:.2rem;padding:.25rem .5rem;white-space:nowrap}.dropdown__link--active,.dropdown__link:hover{background-color:var(--ifm-dropdown-hover-background-color);color:var(--ifm-dropdown-link-color);text-decoration:none}.dropdown__link--active,.dropdown__link--active:hover{--ifm-dropdown-link-color:var(--ifm-link-color)}.dropdown>.navbar__link:after{border-color:currentcolor transparent;border-style:solid;border-width:.4em .4em 0;content:"";margin-left:.3em;position:relative;top:2px;transform:translateY(-50%)}.footer{background-color:var(--ifm-footer-background-color);color:var(--ifm-footer-color);padding:var(--ifm-footer-padding-vertical) var(--ifm-footer-padding-horizontal)}.footer--dark{--ifm-footer-background-color:#303846;--ifm-footer-color:var(--ifm-footer-link-color);--ifm-footer-link-color:var(--ifm-color-secondary);--ifm-footer-title-color:var(--ifm-color-white)}.footer__links{margin-bottom:1rem}.footer__link-item{color:var(--ifm-footer-link-color);line-height:2}.footer__link-item:hover{color:var(--ifm-footer-link-hover-color)}.footer__link-separator{margin:0 var(--ifm-footer-link-horizontal-spacing)}.footer__logo{margin-top:1rem;max-width:var(--ifm-footer-logo-max-width)}.docs-wrapper,.navbar__inner{max-width:var(--custom-content-max-width)}.footer__title{color:var(--ifm-footer-title-color);font:700 var(--ifm-h4-font-size)/var(--ifm-heading-line-height) var(--ifm-font-family-base);margin-bottom:var(--ifm-heading-margin-bottom)}.menu,.navbar__link{font-weight:var(--ifm-font-weight-semibold)}.docItemContainer_Djhp article>:first-child,.docItemContainer_Djhp header+*,.footer-legal li+li,.footer__item,.h1,.h2,.h3,.h4,.h5,.h6{margin-top:0}.admonitionContent_BuS1>:last-child,.cardContainer_fWXF :last-child,.collapsibleContent_i85q p:last-child,.details_lb9f>summary>p:last-child,.footer-legal ul,.footer__items,.tabItem_Ymn6>:last-child{margin-bottom:0}.codeBlockStandalone_MEMb,[type=checkbox]{padding:0}.hero{align-items:center;background-color:var(--ifm-hero-background-color);color:var(--ifm-hero-text-color);display:flex;padding:4rem 2rem}.hero--primary{--ifm-hero-background-color:var(--ifm-color-primary);--ifm-hero-text-color:var(--ifm-font-color-base-inverse)}.hero--dark{--ifm-hero-background-color:#303846;--ifm-hero-text-color:var(--ifm-color-white)}.hero__title,.homeNavItem h1{font-size:3rem}.hero__subtitle{font-size:1.5rem}.menu__list{list-style:none;margin:0;padding-left:0}.menu__caret,.menu__link{padding:var(--ifm-menu-link-padding-vertical) var(--ifm-menu-link-padding-horizontal)}.menu__list .menu__list{flex:0 0 100%;margin-top:.25rem;padding-left:var(--ifm-menu-link-padding-horizontal)}.menu__list-item:not(:first-child){margin-top:.25rem}.menu__list-item--collapsed .menu__list{height:0;overflow:hidden}.details_lb9f[data-collapsed=false].isBrowser_bmU9>summary:before,.details_lb9f[open]:not(.isBrowser_bmU9)>summary:before,.menu__list-item--collapsed .menu__caret:before,.menu__list-item--collapsed .menu__link--sublist:after{transform:rotate(90deg)}.menu__list-item-collapsible{display:flex;flex-wrap:wrap;position:relative}.menu__caret:hover,.menu__link:hover,.menu__list-item-collapsible--active,.menu__list-item-collapsible:hover{background:var(--ifm-menu-color-background-hover)}.menu__list-item-collapsible .menu__link--active,.menu__list-item-collapsible .menu__link:hover{background:none!important}.menu__caret,.menu__link{align-items:center;display:flex}.navbar-sidebar,.navbar-sidebar__backdrop{bottom:0;opacity:0;top:0;transition-duration:var(--ifm-transition-fast);transition-timing-function:ease-in-out;left:0;visibility:hidden}.menu__link{color:var(--ifm-menu-color);flex:1;line-height:1.25}.menu__link:hover{color:var(--ifm-menu-color);text-decoration:none}.menu__caret:before,.menu__link--sublist-caret:after{height:1.25rem;transform:rotate(180deg);transition:transform var(--ifm-transition-fast) linear;width:1.25rem;content:"";filter:var(--ifm-menu-link-sublist-icon-filter)}.menu__link--sublist-caret:after{background:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem;margin-left:auto;min-width:1.25rem}.navbar__items--center .navbar__brand,body{margin:0}.menu__link--active,.menu__link--active:hover{color:var(--ifm-menu-color-active)}.navbar__brand,.navbar__link{color:var(--ifm-navbar-link-color)}.menu__link--active:not(.menu__link--sublist){background-color:var(--ifm-menu-color-background-active)}.menu__caret:before{background:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem}.navbar--dark,html[data-theme=dark]{--ifm-menu-link-sublist-icon-filter:invert(100%) sepia(94%) saturate(17%) hue-rotate(223deg) brightness(104%) contrast(98%)}.navbar{background-color:var(--ifm-navbar-background-color);box-shadow:var(--ifm-navbar-shadow);height:var(--ifm-navbar-height);padding:var(--ifm-navbar-padding-vertical) var(--ifm-navbar-padding-horizontal)}.navbar,.navbar>.container,.navbar>.container-fluid{display:flex}.navbar--fixed-top{position:sticky;top:0;z-index:var(--ifm-z-index-fixed)}.navbar__inner{display:flex;flex-wrap:wrap;justify-content:space-between;width:100%}.navbar__brand{align-items:center;display:flex;margin-right:1rem;min-width:0}.DocSearch.DocSearch-Button .DocSearch-Button-Keys,.navbar__inner .navbar__item:last-child a:after,.navbar__inner a.navbar__item svg[class^=iconExternalLink]{display:none}.navbar__brand:hover{color:var(--ifm-navbar-link-hover-color);text-decoration:none}.announcementBarContent_xLdY,.navbar__title{flex:1 1 auto}.navbar__toggle{display:none;margin-right:.5rem}.navbar__logo{flex:0 0 auto;height:2rem;margin-right:.5rem}.navbar__items{align-items:center;display:flex;flex:1;min-width:0}.navbar__items--center{flex:0 0 auto}.navbar__items--center+.navbar__items--right{flex:1}.navbar__items--right{flex:0 0 auto;justify-content:flex-end}.navbar__items--right>:last-child{padding-right:0}.navbar__item{display:inline-block;padding:var(--ifm-navbar-item-padding-vertical) var(--ifm-navbar-item-padding-horizontal)}.navbar__link--active,.navbar__link:hover{color:var(--ifm-navbar-link-hover-color);text-decoration:none}.navbar--dark,.navbar--primary{--ifm-menu-color:var(--ifm-color-gray-300);--ifm-navbar-link-color:var(--ifm-color-gray-100);--ifm-navbar-search-input-background-color:hsla(0,0%,100%,.1);--ifm-navbar-search-input-placeholder-color:hsla(0,0%,100%,.5);color:var(--ifm-color-white)}.navbar--dark{--ifm-navbar-background-color:#242526;--ifm-menu-color-background-active:hsla(0,0%,100%,.05);--ifm-navbar-search-input-color:var(--ifm-color-white)}.navbar--primary{--ifm-navbar-background-color:var(--ifm-color-primary);--ifm-navbar-link-hover-color:var(--ifm-color-white);--ifm-menu-color-active:var(--ifm-color-white);--ifm-navbar-search-input-color:var(--ifm-color-emphasis-500)}.navbar__search-input{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:var(--ifm-navbar-search-input-background-color) var(--ifm-navbar-search-input-icon) no-repeat .75rem center/1rem 1rem;border:none;border-radius:2rem;color:var(--ifm-navbar-search-input-color);cursor:text;display:inline-block;font-size:1rem;height:2rem;padding:0 .5rem 0 2.25rem;width:12.5rem}.navbar__search-input::-moz-placeholder{color:var(--ifm-navbar-search-input-placeholder-color)}.navbar__search-input::placeholder{color:var(--ifm-navbar-search-input-placeholder-color)}.navbar-sidebar{background-color:var(--ifm-navbar-background-color);box-shadow:var(--ifm-global-shadow-md);position:fixed;transform:translate3d(-100%,0,0);transition-property:opacity,visibility,transform;width:var(--ifm-navbar-sidebar-width)}.navbar-sidebar--show .navbar-sidebar,.navbar-sidebar__items{transform:translateZ(0)}.navbar-sidebar--show .navbar-sidebar,.navbar-sidebar--show .navbar-sidebar__backdrop{opacity:1;visibility:visible}.navbar-sidebar__backdrop{background-color:rgba(0,0,0,.6);position:fixed;right:0;transition-property:opacity,visibility}.btn-primary,.cards,.nav-footer,.tagWithCount_h2kH{position:relative}.navbar-sidebar__brand{align-items:center;box-shadow:var(--ifm-navbar-shadow);display:flex;flex:1;height:var(--ifm-navbar-height);padding:var(--ifm-navbar-padding-vertical) var(--ifm-navbar-padding-horizontal)}.navbar-sidebar__items{display:flex;height:calc(100% - var(--ifm-navbar-height));transition:transform var(--ifm-transition-fast) ease-in-out}.navbar-sidebar__items--show-secondary{transform:translate3d(calc((var(--ifm-navbar-sidebar-width))*-1),0,0)}.navbar-sidebar__item{flex-shrink:0;padding:.5rem;width:calc(var(--ifm-navbar-sidebar-width))}.navbar-sidebar__back{background:var(--ifm-menu-color-background-active);font-size:15px;font-weight:var(--ifm-button-font-weight);margin:0 0 .2rem -.5rem;padding:.6rem 1.5rem;position:relative;text-align:left;top:-.5rem;width:calc(100% + 1rem)}.container.container-custom,.navbar__inner,article iframe,article img{margin-left:auto;margin-right:auto}.navbar-sidebar__close{display:flex;margin-left:auto}.pagination{-moz-column-gap:var(--ifm-pagination-page-spacing);column-gap:var(--ifm-pagination-page-spacing);display:flex;font-size:var(--ifm-pagination-font-size);padding-left:0}.pagination--sm{--ifm-pagination-font-size:0.8rem;--ifm-pagination-padding-horizontal:0.8rem;--ifm-pagination-padding-vertical:0.2rem}.pagination--lg{--ifm-pagination-font-size:1.2rem;--ifm-pagination-padding-horizontal:1.2rem;--ifm-pagination-padding-vertical:0.3rem}.pagination__item{display:inline-flex}.pagination__item>span{padding:var(--ifm-pagination-padding-vertical)}.pagination__item--active .pagination__link{color:var(--ifm-pagination-color-active)}.pagination__item--active .pagination__link,.pagination__item:not(.pagination__item--active):hover .pagination__link{background:var(--ifm-pagination-item-active-background)}.pagination__item--disabled,.pagination__item[disabled]{opacity:.25;pointer-events:none}.pagination__link{border-radius:var(--ifm-pagination-border-radius);color:var(--ifm-font-color-base);display:inline-block;padding:var(--ifm-pagination-padding-vertical) var(--ifm-pagination-padding-horizontal);transition:background var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.homeContainer a,.nav-footer a:hover,.pagination__link:hover{text-decoration:none}.pagination-nav{display:grid;grid-gap:var(--ifm-spacing-horizontal);gap:var(--ifm-spacing-horizontal);grid-template-columns:repeat(2,1fr)}.pagination-nav__link{border:1px solid var(--ifm-color-emphasis-300);border-radius:var(--ifm-pagination-nav-border-radius);display:block;height:100%;line-height:var(--ifm-heading-line-height);padding:var(--ifm-global-spacing);transition:border-color var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.text-heading,h1{line-height:1.333333}.pagination-nav__link:hover{border-color:var(--ifm-pagination-nav-color-hover);text-decoration:none}.pagination-nav__link--next{grid-column:2/3;text-align:right}.pagination-nav__label{font-size:var(--ifm-h4-font-size);font-weight:var(--ifm-heading-font-weight);word-break:break-word}.pagination-nav__link--prev .pagination-nav__label:before{content:"« "}.pagination-nav__link--next .pagination-nav__label:after{content:" »"}.pagination-nav__sublabel{color:var(--ifm-color-content-secondary);font-size:var(--ifm-h5-font-size);font-weight:var(--ifm-font-weight-semibold);margin-bottom:.25rem}.pills__item,.tabs{font-weight:var(--ifm-font-weight-bold)}.pills{display:flex;gap:var(--ifm-pills-spacing);padding-left:0}.pills__item{border-radius:.5rem;cursor:pointer;display:inline-block;padding:.25rem 1rem;transition:background var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.tabs,:not(.containsTaskList_mC6p>li)>.containsTaskList_mC6p{padding-left:0}.pills__item--active{color:var(--ifm-pills-color-active)}.pills__item--active,.pills__item:not(.pills__item--active):hover{background:var(--ifm-pills-color-background-active)}.pills--block{justify-content:stretch}.pills--block .pills__item{flex-grow:1;text-align:center}.tabs{color:var(--ifm-tabs-color);display:flex;margin-bottom:0;overflow-x:auto}.tabs__item{border-bottom:3px solid transparent;border-radius:var(--ifm-global-radius);cursor:pointer;display:inline-flex;padding:var(--ifm-tabs-padding-vertical) var(--ifm-tabs-padding-horizontal);transition:background-color var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.tabs__item--active{border-bottom-color:var(--ifm-tabs-color-active-border);border-bottom-left-radius:0;border-bottom-right-radius:0;color:var(--ifm-tabs-color-active)}.tabs__item:hover{background-color:var(--ifm-hover-overlay)}.tabs--block{justify-content:stretch}.tabs--block .tabs__item{flex-grow:1;justify-content:center}html[data-theme=dark]{--ifm-color-scheme:dark;--ifm-color-emphasis-0:var(--ifm-color-gray-1000);--ifm-color-emphasis-100:var(--ifm-color-gray-900);--ifm-color-emphasis-200:var(--ifm-color-gray-800);--ifm-color-emphasis-300:var(--ifm-color-gray-700);--ifm-color-emphasis-400:var(--ifm-color-gray-600);--ifm-color-emphasis-600:var(--ifm-color-gray-400);--ifm-color-emphasis-700:var(--ifm-color-gray-300);--ifm-color-emphasis-800:var(--ifm-color-gray-200);--ifm-color-emphasis-900:var(--ifm-color-gray-100);--ifm-color-emphasis-1000:var(--ifm-color-gray-0);--ifm-background-color:#1b1b1d;--ifm-background-surface-color:#242526;--ifm-hover-overlay:hsla(0,0%,100%,.05);--ifm-color-content:#e3e3e3;--ifm-color-content-secondary:#fff;--ifm-breadcrumb-separator-filter:invert(64%) sepia(11%) saturate(0%) hue-rotate(149deg) brightness(99%) contrast(95%);--ifm-code-background:hsla(0,0%,100%,.1);--ifm-scrollbar-track-background-color:#444;--ifm-scrollbar-thumb-background-color:#686868;--ifm-scrollbar-thumb-hover-background-color:#7a7a7a;--ifm-table-stripe-background:hsla(0,0%,100%,.07);--ifm-toc-border-color:var(--ifm-color-emphasis-200);--ifm-color-primary-contrast-background:#102445;--ifm-color-primary-contrast-foreground:#ebf2fc;--ifm-color-secondary-contrast-background:#474748;--ifm-color-secondary-contrast-foreground:#fdfdfe;--ifm-color-success-contrast-background:#003100;--ifm-color-success-contrast-foreground:#e6f6e6;--ifm-color-info-contrast-background:#193c47;--ifm-color-info-contrast-foreground:#eef9fd;--ifm-color-warning-contrast-background:#4d3800;--ifm-color-warning-contrast-foreground:#fff8e6;--ifm-color-danger-contrast-background:#4b1113;--ifm-color-danger-contrast-foreground:#ffebec;--docsearch-text-color:#f5f6f7;--docsearch-container-background:rgba(9,10,17,.8);--docsearch-modal-background:#15172a;--docsearch-modal-shadow:inset 1px 1px 0 0 #2c2e40,0 3px 8px 0 #000309;--docsearch-searchbox-background:#090a11;--docsearch-searchbox-focus-background:#000;--docsearch-hit-color:#bec3c9;--docsearch-hit-shadow:none;--docsearch-hit-background:#090a11;--docsearch-key-gradient:linear-gradient(-26.5deg,#565872,#31355b);--docsearch-key-shadow:inset 0 -2px 0 0 #282d55,inset 0 0 1px 1px #51577d,0 2px 2px 0 rgba(3,4,9,.3);--docsearch-key-pressed-shadow:inset 0 -2px 0 0 #282d55,inset 0 0 1px 1px #51577d,0 1px 1px 0 rgba(3,4,9,.302);--docsearch-footer-background:#1e2136;--docsearch-footer-shadow:inset 0 1px 0 0 rgba(73,76,106,.5),0 -4px 8px 0 rgba(0,0,0,.2);--docsearch-logo-color:#fff;--docsearch-muted-color:#7f8497}#nprogress .bar{background:var(--docusaurus-progress-bar-color);height:2px;left:0;position:fixed;top:0;width:100%;z-index:1031}#nprogress .peg{box-shadow:0 0 10px var(--docusaurus-progress-bar-color),0 0 5px var(--docusaurus-progress-bar-color);height:100%;opacity:1;position:absolute;right:0;transform:rotate(3deg) translateY(-4px);width:100px}@font-face{font-family:Unbounded;font-weight:100 900;src:url(/assets/fonts/Unbounded-Variable-a247d72576aff02445f8abeb96056589.woff2) format("woff2-variations")}body{font-family:var(--sansFontFamily)}h1{font-family:Unbounded,sans-serif!important;padding-top:1.2rem}h2,h3,h4,h5,h6{font-family:var(--sansFontFamily)}.text-heading{font-family:var(--headingFontFamily)}.font-weight-medium{font-weight:500!important}.font-weight-bolder{font-weight:900!important}button.menu__button{box-shadow:0 2px 5px 0 rgba(0,0,0,.26)}.img_ev3q,.navbar.navbar--fixed-top{height:auto}.DocSearch.DocSearch-Button{background-color:#fff;border:1px solid var(--snowColor);color:var(--silverColor);cursor:text;width:170px}.btn-primary:before,.btn-primary[type=submit]:active,.btn-primary[type=submit]:focus,.btn-primary[type=submit]:hover{background:var(--ifm-color-primary)}.DocSearch.DocSearch-Button .DocSearch-Search-Icon{color:var(--silverColor)}.DocSearch.DocSearch-Button:hover .DocSearch-Search-Icon{color:var(--secondaryColor)}.DocSearch.DocSearch-Button .DocSearch-Button-Placeholder{font-size:13px;font-weight:500}.navbar__inner .navbar__item:last-child{margin-left:5px;margin-right:5px;opacity:1}.navbar__inner .navbar__item:last-child .dropdown__menu{border-radius:1.5rem;box-shadow:0 1rem 3rem rgba(0,0,0,.175);right:0;text-align:center;top:32px}.navbar__inner .navbar__item:last-child .dropdown__menu>li a{color:var(--secondaryColor);padding:12px 24px}.navbar__inner .navbar__item:last-child .dropdown__menu>li a.dropdown__link--active{background-color:#fff;color:var(--blackColor)}.navbar__inner .navbar__item:last-child .dropdown__menu>li a.dropdown__link--active:hover,.wordWrapButtonEnabled_EoeP .wordWrapButtonIcon_Bwma{color:var(--ifm-color-primary)}.navbar__inner .navbar__item:last-child .dropdown__menu>li a:hover{background-color:var(--snowColor);color:var(--ifm-color-primary)}.homeContainer{background:#fff;text-align:center}.homeFooterContainer,div[role=banner]{background-image:linear-gradient(217deg,rgba(196,0,97,.8),rgba(196,0,97,0) 70%),linear-gradient(127deg,rgba(230,0,122,.8),rgba(230,0,122,0) 70%),linear-gradient(336deg,rgba(103,69,210,.7),rgba(103,69,210,0) 70%)}.text-dark{color:var(--secondaryColor)!important}.homeNavContainer,.homeNavItem{padding:3rem 0}.homeNavItem{border-radius:3.25rem!important;transition:.15s ease-in-out}.homeNavItem p{max-width:300px}div[role=banner]{padding:10px 0}div[role=banner] .close{color:#fff}div[role=banner] .close:focus,div[role=banner] .close:hover{color:#fff!important;opacity:1}div.sticky{background-color:#f5cbc4;font-family:Unbounded;font-size:20px;padding:30px;position:sticky;top:10}.homeFooterContainer{background-color:#e6007a;padding:6rem 0 4rem}.homeFooterContainer .col-lg-6{align-items:flex-start;display:flex;flex-flow:column nowrap;margin-bottom:2rem}.homeFooterContainer .col-lg-6>:first-child{margin-bottom:1.3rem}.homeFooterContainer p{margin-bottom:2.5rem}.docs-wrapper{margin:0 auto;padding-bottom:80px}article blockquote{background-color:rgba(255,229,100,.3);border-left:8px solid #ffe564}article iframe,article img{display:block;max-width:100%}.prism-code{background-color:var(--custom-code-block-background)!important}.prism-code>div{width:100px!important}.table-of-contents__link--active,.table-of-contents__link--active code,.table-of-contents__link:hover,.table-of-contents__link:hover code{font-weight:600}.btn{font-size:16px;font-weight:700;padding:8px 16px}.btn,.btn:before{border-radius:1.5rem}.btn:before{left:-42px;width:42px}.btn-group-lg>.btn,.btn-lg{border-radius:2rem;padding:16px 20px}.btn-group-lg>.btn:before,.btn-lg:before{border-radius:2rem;left:-58px;width:58px}.btn-group-sm>.btn,.btn-sm{border-radius:1.5rem;font-size:16px;padding:8px 16px}.btn-group-sm>.btn:before,.btn-sm:before{border-radius:1.5rem;left:-42px;width:42px}.btn-primary{background-color:transparent;border-color:var(--ifm-color-primary);color:var(--ifm-color-primary);overflow:hidden;transform:scale(.999);transition:.2s,border 1ms;z-index:1}.btn-primary,.btn-primary:before{border:1px solid var(--ifm-color-primary);will-change:transform}.btn-primary:before{color:transparent;content:"";height:100%;position:absolute;top:0;transition:.2s;z-index:-1}.btn-primary:active,.btn-primary:focus,.btn-primary:hover{background:none;border:1px solid transparent;color:#fff;transform:scale(1.05);will-change:transform}.btn-primary.focus,.btn-primary:focus{box-shadow:0 0 .2rem .2rem rgba(0,0,0,.1)}.btn-primary:not(:disabled):not(.disabled):active{background-color:transparent}.btn-primary:active:before,.btn-primary:focus:before,.btn-primary:hover:before{left:0;width:100%}.btn-bg-primary.btn-primary{border:1px solid #fff;color:#fff!important}.btn-bg-primary.btn-primary:active,.btn-bg-primary.btn-primary:focus,.btn-bg-primary.btn-primary:hover{background:#fff;color:var(--ifm-color-primary)!important}.btn-bg-primary.btn-primary:before{background:#fff;border:1px solid #fff;color:transparent;content:none;height:100%;position:absolute;top:0;transition:.2s;will-change:transform;z-index:-1}.btn-white,.footer-legal a.text-white:hover,.nav-footer a.text-white:hover{color:#fff!important}.nav-footer.spacer-y-4{padding-bottom:3rem;padding-top:3rem}.nav-footer.pb-4{padding-bottom:2.25rem!important}.nav-footer .text-small{font-size:.875rem}.nav-footer{background:var(--secondaryColor);border:none;color:#202020;font-size:16px;line-height:24px}.nav-footer h5{font-size:1.25rem;font-weight:400;margin-top:0}.nav-footer a.text-white,.nav-footer a.text-white:visited{color:var(--silverColor)!important}.nav-footer-item-pill{background-color:#e6007a;border-radius:10px;color:#fff;font-size:.75rem;font-weight:700;padding:1px 8px}.list-social-links{display:flex;list-style:none;padding:0}.cardTitle_rnsV,footer .list-social-links i{font-size:1.2rem}footer .list-social-links a{text-decoration:none;background:0 0!important;border:1px solid #fff;border-radius:50%;color:#fff;display:block;padding:.25rem .9rem}footer [class^=socicon-]{line-height:2}footer .list-social-links{margin-left:0}.footer-legal .navbar-brand{display:block;padding-bottom:0}.footer-legal .list-pipe-separator>li:not(:last-child)>a:after{content:"|";margin:0 .375rem;opacity:.5}.footer-legal a.text-white,.footer-legal a.text-white:visited{color:#b5aeae!important}.cards-container{flex-flow:row wrap;max-width:100%;min-width:0}.cards,.cards-container{align-items:center;display:flex;justify-content:center}.cards{border:1px solid var(--primaryColor);border-radius:10px;box-shadow:0 .1rem .1rem rgba(0,0,0,.4);height:80px;margin:5px;padding:10px;top:0;transition:top .2s;width:350px}.cards:hover{top:-5px}.cards-body{align-items:flex-start;color:#000;display:flex;flex:1 auto;flex-flow:column nowrap;margin-left:5px}.cards-title{align-content:center;color:var(--ifm-color-primary-dark);font-size:1rem;font-weight:700}.cards-text{margin:1px 1px 1px 5px}.docusaurus-highlight-code-line{background-color:#faff9f;display:block;margin:0 calc(var(--ifm-pre-padding)*-1);padding:0 var(--ifm-pre-padding)}.DocSearch-Button-Container,.btnIcon__body,.tagWithCount_h2kH{align-items:center;display:flex}html[data-theme=dark] .docusaurus-highlight-code-line{background-color:#646464}.container.container-custom{width:100%}pre .btnIcon{background-color:hsla(0,0%,100%,.7);border:1px solid transparent;color:#000;cursor:pointer;height:30px;padding:3px;position:absolute;top:4px;transition:.25s ease-out;z-index:2}pre .btnIcon:hover{border:1px solid silver;text-decoration:none}.btnIcon svg{fill:currentColor;margin-right:.4em}.btnIcon__label{font-size:11px}.btnClipboard{right:10px}@font-face{font-family:Socicon;font-style:normal;font-weight:400;src:url(/assets/fonts/Socicon-5e166614f1c831694816befaba8d03cf.eot);src:url(/assets/fonts/Socicon-5e166614f1c831694816befaba8d03cf.eot#iefix) format("embedded-opentype"),url(/assets/fonts/Socicon-d02985133d7e9e09bde470dd54104762.woff2) format("woff2"),url(/assets/fonts/Socicon-48b2d1e286d6b8d6ebefa630301dcf3b.ttf) format("truetype"),url(/assets/fonts/Socicon-9075c233656883ebc65aeb93d2fb76ba.woff) format("woff"),url(/assets/images/Socicon-620cd8c93935433c4e69112bb91768e8.svg#Socicon) format("svg")}[class*=" socicon-"],[class^=socicon-]{font-family:Socicon!important;speak:none;font-style:normal;font-variant:normal;font-weight:400;line-height:1;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.socicon-internet:before{content:"\e957"}.socicon-moddb:before{content:"\e94b"}.socicon-indiedb:before{content:"\e94c"}.socicon-traxsource:before{content:"\e94d"}.socicon-gamefor:before{content:"\e94e"}.socicon-pixiv:before{content:"\e94f"}.socicon-myanimelist:before{content:"\e950"}.socicon-blackberry:before{content:"\e951"}.socicon-wickr:before{content:"\e952"}.socicon-spip:before{content:"\e953"}.socicon-napster:before{content:"\e954"}.socicon-beatport:before{content:"\e955"}.socicon-hackerone:before{content:"\e956"}.socicon-hackernews:before{content:"\e946"}.socicon-smashwords:before{content:"\e947"}.socicon-kobo:before{content:"\e948"}.socicon-bookbub:before{content:"\e949"}.socicon-mailru:before{content:"\e94a"}.socicon-gitlab:before{content:"\e945"}.socicon-instructables:before{content:"\e944"}.socicon-portfolio:before{content:"\e943"}.socicon-codered:before{content:"\e940"}.socicon-origin:before{content:"\e941"}.socicon-nextdoor:before{content:"\e942"}.socicon-udemy:before{content:"\e93f"}.socicon-livemaster:before{content:"\e93e"}.socicon-crunchbase:before{content:"\e93b"}.socicon-homefy:before{content:"\e93c"}.socicon-calendly:before{content:"\e93d"}.socicon-realtor:before{content:"\e90f"}.socicon-tidal:before{content:"\e910"}.socicon-qobuz:before{content:"\e911"}.socicon-natgeo:before{content:"\e912"}.socicon-mastodon:before{content:"\e913"}.socicon-unsplash:before{content:"\e914"}.socicon-homeadvisor:before{content:"\e915"}.socicon-angieslist:before{content:"\e916"}.socicon-codepen:before{content:"\e917"}.socicon-slack:before{content:"\e918"}.socicon-openaigym:before{content:"\e919"}.socicon-logmein:before{content:"\e91a"}.socicon-fiverr:before{content:"\e91b"}.socicon-gotomeeting:before{content:"\e91c"}.socicon-aliexpress:before{content:"\e91d"}.socicon-guru:before{content:"\e91e"}.socicon-appstore:before{content:"\e91f"}.socicon-homes:before{content:"\e920"}.socicon-zoom:before{content:"\e921"}.socicon-alibaba:before{content:"\e922"}.socicon-craigslist:before{content:"\e923"}.socicon-wix:before{content:"\e924"}.socicon-redfin:before{content:"\e925"}.socicon-googlecalendar:before{content:"\e926"}.socicon-shopify:before{content:"\e927"}.socicon-freelancer:before{content:"\e928"}.socicon-seedrs:before{content:"\e929"}.socicon-bing:before{content:"\e92a"}.socicon-doodle:before{content:"\e92b"}.socicon-bonanza:before{content:"\e92c"}.socicon-squarespace:before{content:"\e92d"}.socicon-toptal:before{content:"\e92e"}.socicon-gust:before{content:"\e92f"}.socicon-ask:before{content:"\e930"}.socicon-trulia:before{content:"\e931"}.socicon-loomly:before{content:"\e932"}.socicon-ghost:before{content:"\e933"}.socicon-upwork:before{content:"\e934"}.socicon-fundable:before{content:"\e935"}.socicon-booking:before{content:"\e936"}.socicon-googlemaps:before{content:"\e937"}.socicon-zillow:before{content:"\e938"}.socicon-niconico:before{content:"\e939"}.socicon-toneden:before{content:"\e93a"}.socicon-augment:before{content:"\e908"}.socicon-bitbucket:before{content:"\e909"}.socicon-fyuse:before{content:"\e90a"}.socicon-yt-gaming:before{content:"\e90b"}.socicon-sketchfab:before{content:"\e90c"}.socicon-mobcrush:before{content:"\e90d"}.socicon-microsoft:before{content:"\e90e"}.socicon-pandora:before{content:"\e907"}.socicon-messenger:before{content:"\e906"}.socicon-gamewisp:before{content:"\e905"}.socicon-bloglovin:before{content:"\e904"}.socicon-tunein:before{content:"\e903"}.socicon-gamejolt:before{content:"\e901"}.socicon-trello:before{content:"\e902"}.socicon-spreadshirt:before{content:"\e900"}.socicon-500px:before{content:"\e000"}.socicon-8tracks:before{content:"\e001"}.socicon-airbnb:before{content:"\e002"}.socicon-alliance:before{content:"\e003"}.socicon-amazon:before{content:"\e004"}.socicon-amplement:before{content:"\e005"}.socicon-android:before{content:"\e006"}.socicon-angellist:before{content:"\e007"}.socicon-apple:before{content:"\e008"}.socicon-appnet:before{content:"\e009"}.socicon-baidu:before{content:"\e00a"}.socicon-bandcamp:before{content:"\e00b"}.socicon-battlenet:before{content:"\e00c"}.socicon-mixer:before{content:"\e00d"}.socicon-bebee:before{content:"\e00e"}.socicon-bebo:before{content:"\e00f"}.socicon-behance:before{content:"\e010"}.socicon-blizzard:before{content:"\e011"}.socicon-blogger:before{content:"\e012"}.socicon-buffer:before{content:"\e013"}.socicon-chrome:before{content:"\e014"}.socicon-coderwall:before{content:"\e015"}.socicon-curse:before{content:"\e016"}.socicon-dailymotion:before{content:"\e017"}.socicon-deezer:before{content:"\e018"}.socicon-delicious:before{content:"\e019"}.socicon-deviantart:before{content:"\e01a"}.socicon-diablo:before{content:"\e01b"}.socicon-digg:before{content:"\e01c"}.socicon-discord:before{content:"\e01d"}.socicon-disqus:before{content:"\e01e"}.socicon-douban:before{content:"\e01f"}.socicon-draugiem:before{content:"\e020"}.socicon-dribbble:before{content:"\e021"}.socicon-drupal:before{content:"\e022"}.socicon-ebay:before{content:"\e023"}.socicon-ello:before{content:"\e024"}.socicon-endomodo:before{content:"\e025"}.socicon-envato:before{content:"\e026"}.socicon-etsy:before{content:"\e027"}.socicon-facebook:before{content:"\e028"}.socicon-feedburner:before{content:"\e029"}.socicon-filmweb:before{content:"\e02a"}.socicon-firefox:before{content:"\e02b"}.socicon-flattr:before{content:"\e02c"}.socicon-flickr:before{content:"\e02d"}.socicon-formulr:before{content:"\e02e"}.socicon-forrst:before{content:"\e02f"}.socicon-foursquare:before{content:"\e030"}.socicon-friendfeed:before{content:"\e031"}.socicon-github:before{content:"\e032"}.socicon-goodreads:before{content:"\e033"}.socicon-google:before{content:"\e034"}.socicon-googlescholar:before{content:"\e035"}.socicon-googlegroups:before{content:"\e036"}.socicon-googlephotos:before{content:"\e037"}.socicon-googleplus:before{content:"\e038"}.socicon-grooveshark:before{content:"\e039"}.socicon-hackerrank:before{content:"\e03a"}.socicon-hearthstone:before{content:"\e03b"}.socicon-hellocoton:before{content:"\e03c"}.socicon-heroes:before{content:"\e03d"}.socicon-smashcast:before{content:"\e03e"}.socicon-horde:before{content:"\e03f"}.socicon-houzz:before{content:"\e040"}.socicon-icq:before{content:"\e041"}.socicon-identica:before{content:"\e042"}.socicon-imdb:before{content:"\e043"}.socicon-instagram:before{content:"\e044"}.socicon-issuu:before{content:"\e045"}.socicon-istock:before{content:"\e046"}.socicon-itunes:before{content:"\e047"}.socicon-keybase:before{content:"\e048"}.socicon-lanyrd:before{content:"\e049"}.socicon-lastfm:before{content:"\e04a"}.socicon-line:before{content:"\e04b"}.socicon-linkedin:before{content:"\e04c"}.socicon-livejournal:before{content:"\e04d"}.socicon-lyft:before{content:"\e04e"}.socicon-macos:before{content:"\e04f"}.socicon-mail:before{content:"\e050"}.socicon-medium:before{content:"\e051"}.socicon-meetup:before{content:"\e052"}.socicon-mixcloud:before{content:"\e053"}.socicon-modelmayhem:before{content:"\e054"}.socicon-mumble:before{content:"\e055"}.socicon-myspace:before{content:"\e056"}.socicon-newsvine:before{content:"\e057"}.socicon-nintendo:before{content:"\e058"}.socicon-npm:before{content:"\e059"}.socicon-odnoklassniki:before{content:"\e05a"}.socicon-openid:before{content:"\e05b"}.socicon-opera:before{content:"\e05c"}.socicon-outlook:before{content:"\e05d"}.socicon-overwatch:before{content:"\e05e"}.socicon-patreon:before{content:"\e05f"}.socicon-paypal:before{content:"\e060"}.socicon-periscope:before{content:"\e061"}.socicon-persona:before{content:"\e062"}.socicon-pinterest:before{content:"\e063"}.socicon-play:before{content:"\e064"}.socicon-player:before{content:"\e065"}.socicon-playstation:before{content:"\e066"}.socicon-pocket:before{content:"\e067"}.socicon-qq:before{content:"\e068"}.socicon-quora:before{content:"\e069"}.socicon-raidcall:before{content:"\e06a"}.socicon-ravelry:before{content:"\e06b"}.socicon-reddit:before{content:"\e06c"}.socicon-renren:before{content:"\e06d"}.socicon-researchgate:before{content:"\e06e"}.socicon-residentadvisor:before{content:"\e06f"}.socicon-reverbnation:before{content:"\e070"}.socicon-rss:before{content:"\e071"}.socicon-sharethis:before{content:"\e072"}.socicon-skype:before{content:"\e073"}.socicon-slideshare:before{content:"\e074"}.socicon-smugmug:before{content:"\e075"}.socicon-snapchat:before{content:"\e076"}.socicon-songkick:before{content:"\e077"}.socicon-soundcloud:before{content:"\e078"}.socicon-spotify:before{content:"\e079"}.socicon-stackexchange:before{content:"\e07a"}.socicon-stackoverflow:before{content:"\e07b"}.socicon-starcraft:before{content:"\e07c"}.socicon-stayfriends:before{content:"\e07d"}.socicon-steam:before{content:"\e07e"}.socicon-storehouse:before{content:"\e07f"}.socicon-strava:before{content:"\e080"}.socicon-streamjar:before{content:"\e081"}.socicon-stumbleupon:before{content:"\e082"}.socicon-swarm:before{content:"\e083"}.socicon-teamspeak:before{content:"\e084"}.socicon-teamviewer:before{content:"\e085"}.socicon-technorati:before{content:"\e086"}.socicon-telegram:before{content:"\e087"}.socicon-tripadvisor:before{content:"\e088"}.socicon-tripit:before{content:"\e089"}.socicon-triplej:before{content:"\e08a"}.socicon-tumblr:before{content:"\e08b"}.socicon-twitch:before{content:"\e08c"}.socicon-twitter:before{content:"\e08d"}.socicon-uber:before{content:"\e08e"}.socicon-ventrilo:before{content:"\e08f"}.socicon-viadeo:before{content:"\e090"}.socicon-viber:before{content:"\e091"}.socicon-viewbug:before{content:"\e092"}.socicon-vimeo:before{content:"\e093"}.socicon-vine:before{content:"\e094"}.socicon-vkontakte:before{content:"\e095"}.socicon-warcraft:before{content:"\e096"}.socicon-wechat:before{content:"\e097"}.socicon-weibo:before{content:"\e098"}.socicon-whatsapp:before{content:"\e099"}.socicon-wikipedia:before{content:"\e09a"}.socicon-windows:before{content:"\e09b"}.socicon-wordpress:before{content:"\e09c"}.socicon-wykop:before{content:"\e09d"}.socicon-xbox:before{content:"\e09e"}.socicon-xing:before{content:"\e09f"}.socicon-yahoo:before{content:"\e0a0"}.socicon-yammer:before{content:"\e0a1"}.socicon-yandex:before{content:"\e0a2"}.socicon-yelp:before{content:"\e0a3"}.socicon-younow:before{content:"\e0a4"}.socicon-youtube:before{content:"\e0a5"}.socicon-zapier:before{content:"\e0a6"}.socicon-zerply:before{content:"\e0a7"}.socicon-zomato:before{content:"\e0a8"}.socicon-zynga:before{content:"\e0a9"}.tag_zVej{border:1px solid var(--docusaurus-tag-list-border);transition:border var(--ifm-transition-fast)}.tag_zVej:hover{--docusaurus-tag-list-border:var(--ifm-link-color);text-decoration:none}.tagRegular_sFm0{border-radius:var(--ifm-global-radius);font-size:90%;padding:.2rem .5rem .3rem}.tagWithCount_h2kH{border-left:0;padding:0 .5rem 0 1rem}.tagWithCount_h2kH:after,.tagWithCount_h2kH:before{border:1px solid var(--docusaurus-tag-list-border);content:"";position:absolute;top:50%;transition:inherit}.tagWithCount_h2kH:before{border-bottom:0;border-right:0;height:1.18rem;right:100%;transform:translate(50%,-50%) rotate(-45deg);width:1.18rem}.tagWithCount_h2kH:after{border-radius:50%;height:.5rem;left:0;transform:translateY(-50%);width:.5rem}.tagWithCount_h2kH span{background:var(--ifm-color-secondary);border-radius:var(--ifm-global-radius);color:var(--ifm-color-black);font-size:.7rem;line-height:1.2;margin-left:.3rem;padding:.1rem .4rem}.tags_jXut{display:inline}.tag_QGVx{display:inline-block;margin:0 .4rem .5rem 0}.iconEdit_Z9Sw{margin-right:.3em;vertical-align:sub}.lastUpdated_JAkA{font-size:smaller;font-style:italic;margin-top:.2rem}.tocCollapsibleButton_TO0P{align-items:center;display:flex;font-size:inherit;justify-content:space-between;padding:.4rem .8rem;width:100%}.tocCollapsibleButton_TO0P:after{background:var(--ifm-menu-link-sublist-icon) 50% 50%/2rem 2rem no-repeat;content:"";filter:var(--ifm-menu-link-sublist-icon-filter);height:1.25rem;transform:rotate(180deg);transition:transform var(--ifm-transition-fast);width:1.25rem}.tocCollapsibleButtonExpanded_MG3E:after,.tocCollapsibleExpanded_sAul{transform:none}.tocCollapsible_ETCw{background-color:var(--ifm-menu-color-background-active);border-radius:var(--ifm-global-radius);margin:1rem 0}.tocCollapsibleContent_vkbj>ul{border-left:none;border-top:1px solid var(--ifm-color-emphasis-300);font-size:15px;padding:.2rem 0}.tocCollapsibleContent_vkbj ul li{margin:.4rem .8rem}.tocCollapsibleContent_vkbj a{display:block}.tableOfContents_bqdL{max-height:calc(100vh - var(--ifm-navbar-height) - 2rem);overflow-y:auto;position:sticky;top:calc(var(--ifm-navbar-height) + 1rem)}.backToTopButton_sjWU{background-color:var(--ifm-color-emphasis-200);border-radius:50%;bottom:1.3rem;box-shadow:var(--ifm-global-shadow-lw);height:3rem;opacity:0;position:fixed;right:1.3rem;transform:scale(0);transition:all var(--ifm-transition-fast) var(--ifm-transition-timing-default);visibility:hidden;width:3rem;z-index:calc(var(--ifm-z-index-fixed) - 1)}.backToTopButton_sjWU:after{background-color:var(--ifm-color-emphasis-1000);content:" ";display:inline-block;height:100%;-webkit-mask:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem no-repeat;mask:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem no-repeat;width:100%}.backToTopButtonShow_xfvO{opacity:1;transform:scale(1);visibility:visible}.DocSearch-Button{align-items:center;background:var(--docsearch-searchbox-background);border:0;border-radius:40px;color:var(--docsearch-muted-color);cursor:pointer;display:flex;font-weight:500;height:36px;justify-content:space-between;padding:0 8px;user-select:none}.DocSearch-Footer,.DocSearch-Help{-webkit-user-select:none;-moz-user-select:none}.DocSearch-Button:active,.DocSearch-Button:focus,.DocSearch-Button:hover{background:var(--docsearch-searchbox-focus-background);box-shadow:var(--docsearch-searchbox-shadow);color:var(--docsearch-text-color);outline:0}.DocSearch-Search-Icon{stroke-width:1.6}.DocSearch-Hit-Tree,.DocSearch-Hit-action,.DocSearch-Hit-icon,.DocSearch-Reset{stroke-width:var(--docsearch-icon-stroke-width)}.DocSearch-Button .DocSearch-Search-Icon{color:var(--docsearch-text-color)}.DocSearch-Button-Placeholder{font-size:1rem;padding:0 12px 0 6px}.DocSearch-Input,.DocSearch-Link{-webkit-appearance:none;-moz-appearance:none;font:inherit}.DocSearch-Button-Keys{display:flex;min-width:calc(40px + .8em)}.DocSearch-Button-Key{align-items:center;background:var(--docsearch-key-gradient);border:0;border-radius:3px;box-shadow:var(--docsearch-key-shadow);color:var(--docsearch-muted-color);display:flex;height:18px;justify-content:center;margin-right:.4em;padding:0 0 2px;position:relative;top:-1px;width:20px}.DocSearch-Button-Key--pressed{box-shadow:var(--docsearch-key-pressed-shadow);transform:translate3d(0,1px,0)}.DocSearch--active{overflow:hidden!important}.DocSearch-Container{background-color:var(--docsearch-container-background);height:100vh;left:0;position:fixed;top:0;width:100vw;z-index:200}.DocSearch-Container a{text-decoration:none}.DocSearch-Hit[aria-selected=true] mark,.content_knG7 a{text-decoration:underline}.DocSearch-Link{appearance:none;background:none;border:0;color:var(--docsearch-highlight-color);cursor:pointer;margin:0;padding:0}.DocSearch-Modal{background:var(--docsearch-modal-background);border-radius:6px;box-shadow:var(--docsearch-modal-shadow);flex-direction:column;margin:60px auto auto;max-width:var(--docsearch-modal-width);position:relative}.DocSearch-SearchBar{display:flex;padding:var(--docsearch-spacing) var(--docsearch-spacing) 0}.DocSearch-Form{align-items:center;background:var(--docsearch-searchbox-focus-background);border-radius:4px;box-shadow:var(--docsearch-searchbox-shadow);display:flex;height:var(--docsearch-searchbox-height);margin:0;padding:0 var(--docsearch-spacing);position:relative;width:100%}.DocSearch-Input{appearance:none;background:0 0;border:0;color:var(--docsearch-text-color);flex:1;font-size:1.2em;height:100%;outline:0;padding:0 0 0 8px;width:80%}.DocSearch-Hit-action-button,.DocSearch-Reset{-webkit-appearance:none;-moz-appearance:none;border:0;cursor:pointer}.DocSearch-Input::-moz-placeholder{color:var(--docsearch-muted-color);opacity:1}.DocSearch-Input::placeholder{color:var(--docsearch-muted-color);opacity:1}.DocSearch-Input::-webkit-search-cancel-button,.DocSearch-Input::-webkit-search-decoration,.DocSearch-Input::-webkit-search-results-button,.DocSearch-Input::-webkit-search-results-decoration{display:none}.DocSearch-LoadingIndicator,.DocSearch-MagnifierLabel,.DocSearch-Reset{margin:0;padding:0}.DocSearch-Container--Stalled .DocSearch-LoadingIndicator,.DocSearch-MagnifierLabel,.DocSearch-Reset{align-items:center;color:var(--docsearch-highlight-color);display:flex;justify-content:center}.DocSearch-Cancel,.DocSearch-Container--Stalled .DocSearch-MagnifierLabel,.DocSearch-LoadingIndicator,.DocSearch-Reset[hidden]{display:none}.DocSearch-Reset{animation:.1s ease-in forwards a;appearance:none;background:none;border-radius:50%;color:var(--docsearch-icon-color);padding:2px;right:0}.DocSearch-Help,.DocSearch-HitsFooter,.DocSearch-Label{color:var(--docsearch-muted-color)}.DocSearch-Reset:hover{color:var(--docsearch-highlight-color)}.DocSearch-LoadingIndicator svg,.DocSearch-MagnifierLabel svg{height:24px;width:24px}.DocSearch-Dropdown{max-height:calc(var(--docsearch-modal-height) - var(--docsearch-searchbox-height) - var(--docsearch-spacing) - var(--docsearch-footer-height));min-height:var(--docsearch-spacing);overflow-y:auto;overflow-y:overlay;padding:0 var(--docsearch-spacing);scrollbar-color:var(--docsearch-muted-color) var(--docsearch-modal-background);scrollbar-width:thin}.DocSearch-Dropdown::-webkit-scrollbar{width:12px}.DocSearch-Dropdown::-webkit-scrollbar-track{background:0 0}.DocSearch-Dropdown::-webkit-scrollbar-thumb{background-color:var(--docsearch-muted-color);border:3px solid var(--docsearch-modal-background);border-radius:20px}.DocSearch-Dropdown ul{list-style:none;margin:0;padding:0}.DocSearch-Label{font-size:.75em;line-height:1.6em}.DocSearch-Help{font-size:.9em;margin:0;user-select:none}.DocSearch-Title{font-size:1.2em}.DocSearch-Logo a{display:flex}.DocSearch-Logo svg{color:var(--docsearch-logo-color);margin-left:8px}.DocSearch-Hits:last-of-type{margin-bottom:24px}.DocSearch-Hits mark{background:none;color:var(--docsearch-highlight-color)}.DocSearch-HitsFooter{display:flex;font-size:.85em;justify-content:center;margin-bottom:var(--docsearch-spacing);padding:var(--docsearch-spacing)}.DocSearch-HitsFooter a{border-bottom:1px solid;color:inherit}.DocSearch-Hit{border-radius:4px;display:flex;padding-bottom:4px;position:relative}.DocSearch-Hit--deleting{opacity:0;transition:.25s linear}.DocSearch-Hit--favoriting{transform:scale(0);transform-origin:top center;transition:.25s linear .25s}.DocSearch-Hit a{background:var(--docsearch-hit-background);border-radius:4px;box-shadow:var(--docsearch-hit-shadow);display:block;padding-left:var(--docsearch-spacing);width:100%}.DocSearch-Hit-source{background:var(--docsearch-modal-background);color:var(--docsearch-highlight-color);font-size:.85em;font-weight:600;line-height:32px;margin:0 -4px;padding:8px 4px 0;position:sticky;top:0;z-index:10}.DocSearch-Hit-Tree{color:var(--docsearch-muted-color);height:var(--docsearch-hit-height);opacity:.5;width:24px}.DocSearch-Hit[aria-selected=true] a{background-color:var(--docsearch-highlight-color)}.DocSearch-Hit-Container{align-items:center;color:var(--docsearch-hit-color);display:flex;flex-direction:row;height:var(--docsearch-hit-height);padding:0 var(--docsearch-spacing) 0 0}.DocSearch-Hit-icon{height:20px;width:20px}.DocSearch-Hit-action,.DocSearch-Hit-icon{color:var(--docsearch-muted-color)}.DocSearch-Hit-action{align-items:center;display:flex;height:22px;width:22px}.DocSearch-Hit-action svg{display:block;height:18px;width:18px}.DocSearch-Hit-action+.DocSearch-Hit-action{margin-left:6px}.DocSearch-Hit-action-button{appearance:none;background:none;border-radius:50%;color:inherit;padding:2px}.docSidebarContainer_YfHR,.sidebarLogo_isFc,.themedComponent_mlkZ,[data-theme=dark] .lightToggleIcon_pyhR,[data-theme=light] .darkToggleIcon_wfgR,html[data-announcement-bar-initially-dismissed=true] .announcementBar_mb4j,svg.DocSearch-Hit-Select-Icon{display:none}.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-Select-Icon{display:block}.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{background:rgba(0,0,0,.2);transition:background-color .1s ease-in}.DocSearch-Hit-action-button:focus path,.DocSearch-Hit-action-button:hover path{fill:#fff}.DocSearch-Hit-content-wrapper{display:flex;flex:1 1 auto;flex-direction:column;font-weight:500;justify-content:center;line-height:1.2em;margin:0 8px;overflow-x:hidden;position:relative;text-overflow:ellipsis;white-space:nowrap;width:80%}.DocSearch-Hit-title{font-size:.9em}.DocSearch-Hit-path{color:var(--docsearch-muted-color);font-size:.75em}.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-Tree,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-action,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-icon,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-path,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-text,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-title,.DocSearch-Hit[aria-selected=true] mark{color:var(--docsearch-hit-active-color)!important}.DocSearch-ErrorScreen,.DocSearch-NoResults,.DocSearch-StartScreen{font-size:.9em;margin:0 auto;padding:36px 0;text-align:center;width:80%}.DocSearch-Screen-Icon{color:var(--docsearch-muted-color);padding-bottom:12px}.DocSearch-NoResults-Prefill-List{display:inline-block;padding-bottom:24px;text-align:left}.DocSearch-NoResults-Prefill-List ul{display:inline-block;padding:8px 0 0}.DocSearch-NoResults-Prefill-List li{list-style-position:inside;list-style-type:"» "}.DocSearch-Prefill{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;border-radius:1em;color:var(--docsearch-highlight-color);cursor:pointer;display:inline-block;font-size:1em;font-weight:700;padding:0}.DocSearch-Prefill:focus,.DocSearch-Prefill:hover{outline:0;text-decoration:underline}.DocSearch-Footer{align-items:center;background:var(--docsearch-footer-background);border-radius:0 0 8px 8px;box-shadow:var(--docsearch-footer-shadow);display:flex;flex-direction:row-reverse;flex-shrink:0;height:var(--docsearch-footer-height);justify-content:space-between;padding:0 var(--docsearch-spacing);position:relative;user-select:none;width:100%;z-index:300}.DocSearch-Commands li,.DocSearch-Commands-Key{align-items:center;display:flex}.DocSearch-Commands{color:var(--docsearch-muted-color);display:flex;list-style:none;margin:0;padding:0}.DocSearch-Commands li:not(:last-of-type){margin-right:.8em}.DocSearch-Commands-Key{background:var(--docsearch-key-gradient);border:0;border-radius:2px;box-shadow:var(--docsearch-key-shadow);color:var(--docsearch-muted-color);height:18px;justify-content:center;margin-right:.4em;padding:0 0 1px;width:20px}.DocSearch-VisuallyHiddenForAccessibility{clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}@keyframes a{0%{opacity:0}to{opacity:1}}.DocSearch-Button{margin:0;transition:all var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.DocSearch-Container{z-index:calc(var(--ifm-z-index-fixed) + 1)}.message-box{background-color:hwb(0 80% 2%);border:1px solid #ccc;border-radius:10px;bottom:20px;box-shadow:0 4px 8px #000;max-width:270px;padding:20px;position:fixed;right:10px;z-index:1000}.close-button{background:none;border:none;cursor:pointer;position:absolute;right:5px;top:5px}.messageContent{margin-top:10px}.skipToContent_fXgn{background-color:var(--ifm-background-surface-color);color:var(--ifm-color-emphasis-900);left:100%;padding:calc(var(--ifm-global-spacing)/2) var(--ifm-global-spacing);position:fixed;top:1rem;z-index:calc(var(--ifm-z-index-fixed) + 1)}.skipToContent_fXgn:focus{box-shadow:var(--ifm-global-shadow-md);left:1rem}.closeButton_CVFx{line-height:0;padding:0}.content_knG7{font-size:85%;padding:5px 0;text-align:center}.content_knG7 a{color:inherit}.announcementBar_mb4j{align-items:center;background-color:var(--ifm-color-white);border-bottom:1px solid var(--ifm-color-emphasis-100);color:var(--ifm-color-black);display:flex;height:var(--docusaurus-announcement-bar-height)}.buttonGroup__atx button,.codeBlockContainer_Ckt0{background:var(--prism-background-color);color:var(--prism-color)}.announcementBarPlaceholder_vyr4{flex:0 0 10px}.announcementBarClose_gvF7{align-self:stretch;flex:0 0 30px}.toggle_vylO{height:2rem;width:2rem}.toggleButton_gllP{align-items:center;border-radius:50%;display:flex;height:100%;justify-content:center;transition:background var(--ifm-transition-fast);width:100%}.toggleButton_gllP:hover{background:var(--ifm-color-emphasis-200)}.toggleButtonDisabled_aARS{cursor:not-allowed}.darkNavbarColorModeToggle_X3D1:hover{background:var(--ifm-color-gray-800)}[data-theme=dark] .themedComponent--dark_xIcU,[data-theme=light] .themedComponent--light_NVdE,html:not([data-theme]) .themedComponent--light_NVdE{display:initial}[data-theme=dark]:root{--docusaurus-collapse-button-bg:hsla(0,0%,100%,.05);--docusaurus-collapse-button-bg-hover:hsla(0,0%,100%,.1)}.collapseSidebarButton_PEFL{display:none;margin:0}.iconExternalLink_nPIU{margin-left:.3rem}.docMainContainer_TBSr,.docRoot_UBD9{display:flex;width:100%}.docsWrapper_hBAB{display:flex;flex:1 0 auto}.anchorWithStickyNavbar_LWe7{scroll-margin-top:calc(var(--ifm-navbar-height) + .5rem)}.anchorWithHideOnScrollNavbar_WYt5{scroll-margin-top:.5rem}.hash-link{opacity:0;padding-left:.5rem;transition:opacity var(--ifm-transition-fast);-webkit-user-select:none;-moz-user-select:none;user-select:none}.hash-link:before{content:"#"}.cardContainer_fWXF{--ifm-link-color:var(--ifm-color-emphasis-800);--ifm-link-hover-color:var(--ifm-color-emphasis-700);--ifm-link-hover-decoration:none;border:1px solid var(--ifm-color-emphasis-200);box-shadow:0 1.5px 3px 0 rgba(0,0,0,.15);transition:all var(--ifm-transition-fast) ease;transition-property:border,box-shadow}.cardContainer_fWXF:hover{border-color:var(--ifm-color-primary);box-shadow:0 3px 6px 0 rgba(0,0,0,.2)}.cardDescription_PWke{font-size:.8rem}.codeBlockContainer_Ckt0{border-radius:var(--ifm-code-border-radius);box-shadow:var(--ifm-global-shadow-lw);margin-bottom:var(--ifm-leading)}.codeBlockContent_biex{border-radius:inherit;direction:ltr;position:relative}.codeBlockTitle_Ktv7{border-bottom:1px solid var(--ifm-color-emphasis-300);border-top-left-radius:inherit;border-top-right-radius:inherit;font-size:var(--ifm-code-font-size);font-weight:500;padding:.75rem var(--ifm-pre-padding)}.codeBlock_bY9V{--ifm-pre-background:var(--prism-background-color);margin:0;padding:0}.codeBlockTitle_Ktv7+.codeBlockContent_biex .codeBlock_bY9V{border-top-left-radius:0;border-top-right-radius:0}.codeBlockLines_e6Vv{float:left;font:inherit;min-width:100%;padding:var(--ifm-pre-padding)}.codeBlockLinesWithNumbering_o6Pm{display:table;padding:var(--ifm-pre-padding) 0}.buttonGroup__atx{-moz-column-gap:.2rem;column-gap:.2rem;display:flex;position:absolute;right:calc(var(--ifm-pre-padding)/2);top:calc(var(--ifm-pre-padding)/2)}.buttonGroup__atx button{align-items:center;border:1px solid var(--ifm-color-emphasis-300);border-radius:var(--ifm-global-radius);display:flex;line-height:0;opacity:0;padding:.4rem;transition:opacity var(--ifm-transition-fast) ease-in-out}.buttonGroup__atx button:focus-visible,.buttonGroup__atx button:hover{opacity:1!important}.theme-code-block:hover .buttonGroup__atx button{opacity:.4}:where(:root){--docusaurus-highlighted-code-line-bg:#484d5b}:where([data-theme=dark]){--docusaurus-highlighted-code-line-bg:#646464}.theme-code-block-highlighted-line{background-color:var(--docusaurus-highlighted-code-line-bg);display:block;margin:0 calc(var(--ifm-pre-padding)*-1);padding:0 var(--ifm-pre-padding)}.codeLine_lJS_{counter-increment:a;display:table-row}.codeLineNumber_Tfdd{background:var(--ifm-pre-background);display:table-cell;left:0;overflow-wrap:normal;padding:0 var(--ifm-pre-padding);position:sticky;text-align:right;width:1%}.codeLineNumber_Tfdd:before{content:counter(a);opacity:.4}.codeLineContent_feaV{padding-right:var(--ifm-pre-padding)}.theme-code-block:hover .copyButtonCopied_obH4{opacity:1!important}.copyButtonIcons_eSgA{height:1.125rem;position:relative;width:1.125rem}.copyButtonIcon_y97N,.copyButtonSuccessIcon_LjdS{left:0;position:absolute;top:0;fill:currentColor;height:inherit;opacity:inherit;transition:all var(--ifm-transition-fast) ease;width:inherit}.copyButtonSuccessIcon_LjdS{color:#00d600;left:50%;opacity:0;top:50%;transform:translate(-50%,-50%) scale(.33)}.copyButtonCopied_obH4 .copyButtonIcon_y97N{opacity:0;transform:scale(.33)}.copyButtonCopied_obH4 .copyButtonSuccessIcon_LjdS{opacity:1;transform:translate(-50%,-50%) scale(1);transition-delay:75ms}.wordWrapButtonIcon_Bwma{height:1.2rem;width:1.2rem}.details_lb9f{--docusaurus-details-summary-arrow-size:0.38rem;--docusaurus-details-transition:transform 200ms ease;--docusaurus-details-decoration-color:grey}.details_lb9f>summary{cursor:pointer;list-style:none;padding-left:1rem;position:relative}.details_lb9f>summary::-webkit-details-marker{display:none}.details_lb9f>summary:before{border-color:transparent transparent transparent var(--docusaurus-details-decoration-color);border-style:solid;border-width:var(--docusaurus-details-summary-arrow-size);content:"";left:0;position:absolute;top:.45rem;transform:rotate(0);transform-origin:calc(var(--docusaurus-details-summary-arrow-size)/2) 50%;transition:var(--docusaurus-details-transition)}.collapsibleContent_i85q{border-top:1px solid var(--docusaurus-details-decoration-color);margin-top:1rem;padding-top:1rem}.details_b_Ee{--docusaurus-details-decoration-color:var(--ifm-alert-border-color);--docusaurus-details-transition:transform var(--ifm-transition-fast) ease;border:1px solid var(--ifm-alert-border-color);margin:0 0 var(--ifm-spacing-vertical)}.containsTaskList_mC6p{list-style:none}.admonition_xJq3{margin-bottom:1em}.admonitionHeading_Gvgb{font:var(--ifm-heading-font-weight) var(--ifm-h5-font-size)/var(--ifm-heading-line-height) var(--ifm-heading-font-family);text-transform:uppercase}.admonitionHeading_Gvgb:not(:last-child){margin-bottom:.3rem}.admonitionHeading_Gvgb code{text-transform:none}.admonitionIcon_Rf37{display:inline-block;margin-right:.4em;vertical-align:middle}.admonitionIcon_Rf37 svg{display:inline-block;height:1.6em;width:1.6em;fill:var(--ifm-alert-foreground-color)}.dropdownNavbarItemMobile_S0Fm{cursor:pointer}.iconLanguage_nlXk{margin-right:5px;vertical-align:text-bottom}#__docusaurus-base-url-issue-banner-container,.navbarSearchContainer_Bca1:empty{display:none}.navbarHideable_m1mJ{transition:transform var(--ifm-transition-fast) ease}.navbarHidden_jGov{transform:translate3d(0,calc(-100% - 2px),0)}body:not(.navigation-with-keyboard) :not(input):focus{outline:0}.errorBoundaryError_a6uf{color:red;white-space:pre-wrap}.errorBoundaryFallback_VBag{color:red;padding:.55rem}.mainWrapper_z2l0{display:flex;flex:1 0 auto;flex-direction:column}.docusaurus-mt-lg{margin-top:3rem}#__docusaurus{display:flex;flex-direction:column;min-height:100%}.breadcrumbHomeIcon_YNFT{height:1.1rem;position:relative;top:1px;vertical-align:top;width:1.1rem}.breadcrumbsContainer_Z_bl{--ifm-breadcrumb-size-multiplier:0.8;margin-bottom:.8rem}.title_kItE{--ifm-h1-font-size:3rem;margin-bottom:calc(var(--ifm-leading)*1.25)}.searchQueryInput_u2C7,.searchVersionInput_m0Ui{background:var(--docsearch-searchbox-focus-background);border:2px solid var(--ifm-toc-border-color);border-radius:var(--ifm-global-radius);color:var(--docsearch-text-color);font:var(--ifm-font-size-base) var(--ifm-font-family-base);margin-bottom:.5rem;padding:.8rem;transition:border var(--ifm-transition-fast) ease;width:100%}.searchQueryInput_u2C7:focus,.searchVersionInput_m0Ui:focus{border-color:var(--docsearch-primary-color);outline:0}.searchQueryInput_u2C7::-moz-placeholder{color:var(--docsearch-muted-color)}.searchQueryInput_u2C7::placeholder{color:var(--docsearch-muted-color)}.searchResultsColumn_JPFH{font-size:.9rem;font-weight:700}.algoliaLogo_rT1R{max-width:150px}.algoliaLogoPathFill_WdUC{fill:var(--ifm-font-color-base)}.searchResultItem_Tv2o{border-bottom:1px solid var(--ifm-toc-border-color);padding:1rem 0}.searchResultItemHeading_KbCB{font-weight:400;margin-bottom:0}.searchResultItemPath_lhe1{color:var(--ifm-color-content-secondary);font-size:.8rem;--ifm-breadcrumb-separator-size-multiplier:1}.searchResultItemSummary_AEaO{font-style:italic;margin:.5rem 0 0}.loadingSpinner_XVxU{animation:1s linear infinite b;border:.4em solid #eee;border-radius:50%;border-top:.4em solid var(--ifm-color-primary);height:3rem;margin:0 auto;width:3rem}@keyframes b{to{transform:rotate(1turn)}}.loader_vvXV{margin-top:2rem}.search-result-match{background:rgba(255,215,142,.25);color:var(--docsearch-hit-color);padding:.09em 0}.homeNavContainer{padding-bottom:1rem}@media (min-width:576px){.container.container-custom{max-width:540px}.homeNavContainer{padding-bottom:1rem}}@media (min-width:768px){.nav-footer.spacer-y-4{padding-bottom:6rem;padding-top:6rem}.nav-footer .py-md-1{padding-bottom:.375rem!important;padding-top:.375rem!important}.container.container-custom{max-width:720px}.homeNavContainer{padding-bottom:1rem}}@media (min-width:992px){.homeNavContainer{height:90vh;max-height:900px;min-height:600px;padding-bottom:50rem}.homeNavItem{border-radius:3.25rem!important;margin-top:-3rem;min-height:400px;transition:.15s ease-in-out}.homeNavItem:after{bottom:3rem;color:var(--silverColor);content:"arrow_upward";font-family:Material Icons;-webkit-font-feature-settings:"liga";font-size:1.5rem;left:50%;opacity:0;position:absolute;transform:translate(-50%);transition:.2s ease-in-out}.homeNavItem:hover{box-shadow:0 1rem 3rem rgba(0,0,0,.04);transform:translateY(-1rem)}.homeNavItem:hover:after{opacity:1}.homeNavItemContent{margin-top:10%}.homeNavItem h1{font-size:4.2vw}.container.container-custom{max-width:960px}}@media (min-width:997px){.collapseSidebarButton_PEFL,.expandButton_TmdG{background-color:var(--docusaurus-collapse-button-bg)}.lastUpdated_JAkA{text-align:right}.tocMobile_ITEo{display:none}:root{--docusaurus-announcement-bar-height:30px}.announcementBarClose_gvF7,.announcementBarPlaceholder_vyr4{flex-basis:50px}.collapseSidebarButton_PEFL{border:1px solid var(--ifm-toc-border-color);border-radius:0;bottom:0;display:block!important;height:40px;position:sticky}.collapseSidebarButtonIcon_kv0_{margin-top:4px;transform:rotate(180deg)}.expandButtonIcon_i1dp,[dir=rtl] .collapseSidebarButtonIcon_kv0_{transform:rotate(0)}.collapseSidebarButton_PEFL:focus,.collapseSidebarButton_PEFL:hover,.expandButton_TmdG:focus,.expandButton_TmdG:hover{background-color:var(--docusaurus-collapse-button-bg-hover)}.menuHtmlItem_M9Kj{padding:var(--ifm-menu-link-padding-vertical) var(--ifm-menu-link-padding-horizontal)}.menu_SIkG{flex-grow:1;padding:.5rem}@supports (scrollbar-gutter:stable){.menu_SIkG{padding:.5rem 0 .5rem .5rem;scrollbar-gutter:stable}}.menuWithAnnouncementBar_GW3s{margin-bottom:var(--docusaurus-announcement-bar-height)}.sidebar_njMd{display:flex;flex-direction:column;height:100%;padding-top:var(--ifm-navbar-height);width:var(--doc-sidebar-width)}.sidebarWithHideableNavbar_wUlq{padding-top:0}.sidebarHidden_VK0M{opacity:0;visibility:hidden}.sidebarLogo_isFc{align-items:center;color:inherit!important;display:flex!important;margin:0 var(--ifm-navbar-padding-horizontal);max-height:var(--ifm-navbar-height);min-height:var(--ifm-navbar-height);text-decoration:none!important}.sidebarLogo_isFc img{height:2rem;margin-right:.5rem}.expandButton_TmdG{align-items:center;display:flex;height:100%;justify-content:center;position:absolute;right:0;top:0;transition:background-color var(--ifm-transition-fast) ease;width:100%}[dir=rtl] .expandButtonIcon_i1dp{transform:rotate(180deg)}.docSidebarContainer_YfHR{border-right:1px solid var(--ifm-toc-border-color);clip-path:inset(0);display:block;margin-top:calc(var(--ifm-navbar-height)*-1);transition:width var(--ifm-transition-fast) ease;width:var(--doc-sidebar-width);will-change:width}.docSidebarContainerHidden_DPk8{cursor:pointer;width:var(--doc-sidebar-hidden-width)}.sidebarViewport_aRkj{height:100%;max-height:100vh;position:sticky;top:0}.docMainContainer_TBSr{flex-grow:1;max-width:calc(100% - var(--doc-sidebar-width))}.docMainContainerEnhanced_lQrH{max-width:calc(100% - var(--doc-sidebar-hidden-width))}.docItemWrapperEnhanced_JWYK{max-width:calc(var(--ifm-container-width) + var(--doc-sidebar-width))!important}.navbarSearchContainer_Bca1{padding:var(--ifm-navbar-item-padding-vertical) var(--ifm-navbar-item-padding-horizontal)}.docItemCol_VOVn,.generatedIndexPage_vN6x{max-width:75%!important}.list_eTzJ article:nth-last-child(-n+2){margin-bottom:0!important}}@media only screen and (min-width:1024px){.navbar__inner a.navbar__item[href*=contributing]{background:#fff;border:1px solid var(--ifm-color-primary);border-radius:20px;color:var(--ifm-color-primary);font-size:14px;font-weight:700;height:35px;line-height:35px;margin-left:16px;padding:0 16px}.navbar__inner a.navbar__item[href*=contributing]:hover{background:var(--ifm-color-primary);color:#fff}}@media (min-width:1200px){.homeNavItem h1{font-size:3.5rem;line-height:1.2}.container.container-custom{max-width:1140px}.homeNavContainer{padding-bottom:50rem}}@media (min-width:1440px){.container{max-width:var(--ifm-container-width-xl)}}@media (max-width:996px){.col{--ifm-col-width:100%;flex-basis:var(--ifm-col-width);margin-left:0}.footer{--ifm-footer-padding-horizontal:0}.colorModeToggle_DEke,.footer__link-separator,.navbar__item,.tableOfContents_bqdL{display:none}.footer__col{margin-bottom:calc(var(--ifm-spacing-vertical)*3)}.footer__link-item{display:block;width:-moz-max-content;width:max-content}.hero{padding-left:0;padding-right:0}.navbar>.container,.navbar>.container-fluid{padding:0}.navbar__toggle{display:inherit}.navbar__search-input{width:9rem}.pills--block,.tabs--block{flex-direction:column}.docItemContainer_F8PC{padding:0 .3rem}.navbarSearchContainer_Bca1{position:absolute;right:var(--ifm-navbar-padding-horizontal)}}@media only screen and (max-width:996px){.searchQueryColumn_RTkw,.searchResultsColumn_JPFH{max-width:60%!important}.searchLogoColumn_rJIA,.searchVersionColumn_ypXd{max-width:40%!important}.searchLogoColumn_rJIA{padding-left:0!important}}@media (max-width:768px){.DocSearch-Button-Keys,.DocSearch-Button-Placeholder,.DocSearch-Commands,.DocSearch-Hit-Tree{display:none}:root{--docsearch-spacing:10px;--docsearch-footer-height:40px}.DocSearch-Dropdown{height:100%;max-height:calc(var(--docsearch-vh,1vh)*100 - var(--docsearch-searchbox-height) - var(--docsearch-spacing) - var(--docsearch-footer-height))}.DocSearch-Container{height:100vh;height:-webkit-fill-available;height:calc(var(--docsearch-vh,1vh)*100);position:absolute}.DocSearch-Footer{border-radius:0;bottom:0;position:absolute}.DocSearch-Hit-content-wrapper{display:flex;position:relative;width:80%}.DocSearch-Modal{border-radius:0;box-shadow:none;height:100vh;height:-webkit-fill-available;height:calc(var(--docsearch-vh,1vh)*100);margin:0;max-width:100%;width:100%}.DocSearch-Cancel{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;color:var(--docsearch-highlight-color);cursor:pointer;display:inline-block;flex:none;font:inherit;font-size:1em;font-weight:500;margin-left:var(--docsearch-spacing);outline:0;overflow:hidden;padding:0;-webkit-user-select:none;-moz-user-select:none;user-select:none;white-space:nowrap}}@media only screen and (max-width:750px){.DocSearch.DocSearch-Button{width:38px}}@media (max-width:576px){.markdown h1:first-child{--ifm-h1-font-size:2rem}.markdown>h2{--ifm-h2-font-size:1.5rem}.markdown>h3{--ifm-h3-font-size:1.25rem}}@media screen and (max-width:576px){.searchQueryColumn_RTkw{max-width:100%!important}.searchVersionColumn_ypXd{max-width:100%!important;padding-left:var(--ifm-spacing-horizontal)!important}}@media (hover:hover){.backToTopButton_sjWU:hover{background-color:var(--ifm-color-emphasis-300)}}@media (pointer:fine){.thin-scrollbar{scrollbar-width:thin}.thin-scrollbar::-webkit-scrollbar{height:var(--ifm-scrollbar-size);width:var(--ifm-scrollbar-size)}.thin-scrollbar::-webkit-scrollbar-track{background:var(--ifm-scrollbar-track-background-color);border-radius:10px}.thin-scrollbar::-webkit-scrollbar-thumb{background:var(--ifm-scrollbar-thumb-background-color);border-radius:10px}.thin-scrollbar::-webkit-scrollbar-thumb:hover{background:var(--ifm-scrollbar-thumb-hover-background-color)}}@media (prefers-reduced-motion:reduce){:root{--ifm-transition-fast:0ms;--ifm-transition-slow:0ms}}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Reset{animation:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;border-radius:50%;color:var(--docsearch-icon-color);cursor:pointer;right:0;stroke-width:var(--docsearch-icon-stroke-width)}.DocSearch-Hit--deleting,.DocSearch-Hit--favoriting{transition:none}.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{background:rgba(0,0,0,.2);transition:none}}@media print{.announcementBar_mb4j,.footer,.menu,.navbar,.pagination-nav,.table-of-contents,.tocMobile_ITEo{display:none}.tabs{page-break-inside:avoid}.codeBlockLines_e6Vv{white-space:pre-wrap}} \ No newline at end of file diff --git a/assets/images/hub-asset-1-6dac2fc07bfbe323a6795f85adfe6b19.png b/assets/images/hub-asset-1-6dac2fc07bfbe323a6795f85adfe6b19.png new file mode 100644 index 000000000000..32dd150fba46 Binary files /dev/null and b/assets/images/hub-asset-1-6dac2fc07bfbe323a6795f85adfe6b19.png differ diff --git a/assets/images/hub-asset-1-6f406281abdca9f5c2941ebd4d9479fd.png b/assets/images/hub-asset-1-6f406281abdca9f5c2941ebd4d9479fd.png deleted file mode 100644 index 13b6d41b7d83..000000000000 Binary files a/assets/images/hub-asset-1-6f406281abdca9f5c2941ebd4d9479fd.png and /dev/null differ diff --git a/assets/images/hub-asset-4-02cab90d3a97c942b1a545dc46674eb3.png b/assets/images/hub-asset-4-02cab90d3a97c942b1a545dc46674eb3.png new file mode 100644 index 000000000000..7c19cc8e98ba Binary files /dev/null and b/assets/images/hub-asset-4-02cab90d3a97c942b1a545dc46674eb3.png differ diff --git a/assets/js/06597bc8.869a1d13.js b/assets/js/06597bc8.869a1d13.js deleted file mode 100644 index 7e3ce78e59cf..000000000000 --- a/assets/js/06597bc8.869a1d13.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6417],{52877:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>h,contentTitle:()=>r,default:()=>u,frontMatter:()=>i,metadata:()=>l,toc:()=>d});var o=n(74848),a=n(28453),s=n(67141);const i={id:"learn-treasury",title:"Governance v1 Treasury",sidebar_label:"Gov1 Treasury",description:"The Polkadot's On-chain Treasury during Gov1.",keywords:["treasury","funds","funding","tips","tipping"],slug:"../learn-treasury"},r=void 0,l={id:"learn/archive/learn-treasury",title:"Governance v1 Treasury",description:"The Polkadot's On-chain Treasury during Gov1.",source:"@site/../docs/learn/archive/learn-treasury.md",sourceDirName:"learn/archive",slug:"/learn/learn-treasury",permalink:"/docs/learn/learn-treasury",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/archive/learn-treasury.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1729847256e3,frontMatter:{id:"learn-treasury",title:"Governance v1 Treasury",sidebar_label:"Gov1 Treasury",description:"The Polkadot's On-chain Treasury during Gov1.",keywords:["treasury","funds","funding","tips","tipping"],slug:"../learn-treasury"},sidebar:"docs",previous:{title:"Governance V1",permalink:"/docs/learn/learn-governance"},next:{title:"Polkadot Launch Phases",permalink:"/docs/learn/learn-launch"}},h={},d=[{value:"Funding the Treasury",id:"funding-the-treasury",level:2},{value:"Tipping",id:"tipping",level:2},{value:"Example",id:"example",level:3},{value:"Bounties Spending",id:"bounties-spending",level:2},{value:"Creating a Bounty Proposal",id:"creating-a-bounty-proposal",level:3},{value:"Closing a bounty",id:"closing-a-bounty",level:3},{value:"FAQ",id:"faq",level:2},{value:"What prevents the Treasury from being captured by a majority of the Council?",id:"what-prevents-the-treasury-from-being-captured-by-a-majority-of-the-council",level:3},{value:"Further Reading",id:"further-reading",level:2}];function c(e){const t={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",li:"li",p:"p",ul:"ul",...(0,a.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(s.A,{message:"The content on this page is archived. For up-to-date information about treasury, see the\n[Polkadot OpenGov Treasury page](../learn-polkadot-opengov-treasury)."}),"\n",(0,o.jsxs)(t.p,{children:["The Treasury is a pot of funds collected through a portion of block production rewards,\n",(0,o.jsx)(t.a,{href:"/docs/learn-transactions#transaction-fees",children:"transaction fees"}),", ",(0,o.jsx)(t.a,{href:"/docs/learn-offenses",children:"slashing"}),",\n",(0,o.jsx)(t.a,{href:"/docs/learn-staking#inflation",children:"staking inefficiencies"}),", etc."]}),"\n",(0,o.jsxs)(t.p,{children:["The Treasury funds are held in a ",(0,o.jsx)(t.a,{href:"/docs/learn-account-advanced#system-accounts",children:"system account"})," not\naccessible by anyone; only the system internal logic can access it. Funds can be spent by making a\nspending proposal that, if approved by the ",(0,o.jsx)(t.a,{href:"/docs/learn/learn-governance#council",children:"Council"}),", will enter a\nwaiting period before distribution. This waiting period is known as the\n",(0,o.jsx)(t.a,{href:"/docs/chain-state-values#treasury-spending-period",children:(0,o.jsx)(t.em,{children:"spend period"})}),", and its duration is\nsubject to ",(0,o.jsx)(t.a,{href:"/docs/learn/learn-governance",children:"governance"}),". The Treasury attempts to spend as many proposals in\nthe queue as it can without running out of funds."]}),"\n",(0,o.jsx)(t.p,{children:"Treasury payout is an automatic process:"}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsx)(t.li,{children:"If the Treasury funds run out with approved proposals left to fund, those proposals are kept in\nthe approved queue, and will receive funding in the following spend period."}),"\n",(0,o.jsxs)(t.li,{children:["If the Treasury ends a spend period without spending all of its funds, it suffers a burn of\n",(0,o.jsx)(t.a,{href:"/docs/chain-state-values#treasury-burn-factor",children:"a percentage of its funds"})," - thereby\ncausing deflationary pressure. This encourages the spending of the funds in the Treasury by\nPolkadot's governance system."]}),"\n"]}),"\n",(0,o.jsx)(t.p,{children:"When a stakeholder wishes to propose a spend from the Treasury, they must reserve a deposit of at\nleast 5% of the proposed spend (see below for variations). This deposit will be slashed if the\nproposal is rejected, and returned if it is accepted."}),"\n",(0,o.jsx)(t.p,{children:"Proposals may consist of (but are not limited to):"}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsx)(t.li,{children:"Infrastructure deployment and continued operation."}),"\n",(0,o.jsx)(t.li,{children:"Network security operations (monitoring services, continuous auditing)."}),"\n",(0,o.jsx)(t.li,{children:"Ecosystem provisions (collaborations with friendly chains)."}),"\n",(0,o.jsx)(t.li,{children:"Marketing activities (advertising, paid features, collaborations)."}),"\n",(0,o.jsx)(t.li,{children:"Community events and outreach (meetups, pizza parties, hackerspaces)."}),"\n",(0,o.jsx)(t.li,{children:"Software development (wallets and wallet integration, clients and client upgrades)."}),"\n"]}),"\n",(0,o.jsxs)(t.p,{children:["The ",(0,o.jsx)(t.a,{href:"learn-governance#council",children:"Council"})," governs the Treasury and how the funds are spent is up to\ntheir judgment."]}),"\n",(0,o.jsx)(t.admonition,{type:"caution",children:(0,o.jsx)(t.p,{children:"The Council does not approve or deny Treasury Proposals based on the available funds. Proposals are\nnot approved just because there are funds ready to spend but are subject to a burn."})}),"\n",(0,o.jsx)(t.h2,{id:"funding-the-treasury",children:"Funding the Treasury"}),"\n",(0,o.jsxs)(t.p,{children:["For more information about how the Polkadot Treasury is funded, see the\n",(0,o.jsx)(t.a,{href:"/docs/learn-polkadot-opengov-treasury#treasury-inflow-and-outflow",children:"treasury page"}),"."]}),"\n",(0,o.jsx)(t.h2,{id:"tipping",children:"Tipping"}),"\n",(0,o.jsx)(t.p,{children:"Next to the proposals process, a separate system for making tips exists for the Treasury. Tips can\nbe suggested by anyone and are supported by members of the Council. Tips do not have any definite\nvalue, and the final value of the tip is decided based on the median of all tips issued by the\ntippers."}),"\n",(0,o.jsx)(t.p,{children:"Currently, the tippers are the same as the members of the Council. However, being a tipper is not\nthe direct responsibility of the Council, and at some point the Council and the tippers may be\ndifferent groups of accounts."}),"\n",(0,o.jsxs)(t.p,{children:["A tip will enter a closing phase when more than a half plus one of the tipping group have endorsed a\ntip. During that time frame, the other members of the tipping group can still issue their tips, but\ndo not have to. Once the window closes, anyone can call the ",(0,o.jsx)(t.code,{children:"close_tip"})," extrinsic, and the tip will\nbe paid out."]}),"\n",(0,o.jsx)(t.p,{children:"There are two types of tips:"}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsx)(t.li,{children:"public: A small bond is required to place them. This bond depends on the tip message length, and a\nfixed bond constant defined on chain, currently 1 DOT (0.166 KSM on Kusama). Public tips carry a\nfinder's fee of 20% (same on Polkadot and Kusama) which is paid out from the total amount."}),"\n",(0,o.jsx)(t.li,{children:"tipper-initiated: Tips that a Council member published, do not have a finder's fee or a bond."}),"\n"]}),"\n",(0,o.jsx)(t.admonition,{type:"info",children:(0,o.jsxs)(t.p,{children:["For information about how to submit a tip from the Treasury you can read\n",(0,o.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181971",children:"this support article"}),"."]})}),"\n",(0,o.jsx)(t.p,{children:"To better understand the process a tip goes through until it is paid out, let's consider the example\nbelow."}),"\n",(0,o.jsx)(t.h3,{id:"example",children:"Example"}),"\n",(0,o.jsx)(t.p,{children:"Bob has done something great for Polkadot. Alice has noticed this and decides to report Bob as\ndeserving a tip from the Treasury. The Council is composed of three members Charlie, Dave, and Eve."}),"\n",(0,o.jsxs)(t.p,{children:["Alice begins the process by issuing the ",(0,o.jsx)(t.code,{children:"report_awesome"})," extrinsic. This extrinsic requires two\narguments, a reason and the beneficiary. Alice submits Bob's address with the reason being a UTF-8\nencoded URL to a post on ",(0,o.jsx)(t.a,{href:"https://polkadot.polkassembly.io",children:"Polkassembly"})," that explains her\nreasoning for why Bob deserves the tip."]}),"\n",(0,o.jsx)(t.p,{children:"As mentioned above, Alice must also lock up a deposit for making this report. The deposit is the\nbase deposit as set in the chain's parameter list, plus the additional deposit per byte contained in\nthe reason. This is why Alice submitted a URL as the reason instead of the explanation directly: it\nwas cheaper for her to do so. For her trouble, Alice is able to claim the eventual finder's fee if\nthe tip is approved by the tippers."}),"\n",(0,o.jsx)(t.p,{children:"Since the tipper group is the same as the Council, the Council must now collectively (but also\nindependently) decide on the value of the tip that Bob deserves. Charlie, Dave, and Eve all review\nthe report and make tips according to their personal valuation of the benefit Bob has provided to\nthe network. Charlie tips 10 DOT, Dave tips 30 DOT, and Eve tips 100 DOT."}),"\n",(0,o.jsx)(t.p,{children:"The tip could have been closed out with only two of the three tippers. Once more than half of the\ntippers group have issued tip valuations, the countdown to close the tip will begin. In this case,\nthe third tipper issued their tip before the end of the closing period, so all three were able to\nmake their tip valuations known."}),"\n",(0,o.jsxs)(t.p,{children:["The actual tip that will be paid out to Bob is the median of these tips, so Bob will be paid out 30\nDOT from the Treasury. In order for Bob to be paid his tip, some account must call the ",(0,o.jsx)(t.code,{children:"close_tip"}),"\nextrinsic at the end of the closing period for the tip. This extrinsic may be called by anyone."]}),"\n",(0,o.jsx)(t.h2,{id:"bounties-spending",children:"Bounties Spending"}),"\n",(0,o.jsx)(t.p,{children:"There are practical limits to Council Members curation capabilities when it comes to treasury\nproposals: Council members likely do not have the expertise to make a proper assessment of the\nactivities described in all proposals. Even if individual Councillors have that expertise, it is\nhighly unlikely that a majority of members are capable in such diverse topics."}),"\n",(0,o.jsx)(t.p,{children:"Bounties Spending proposals aim to delegate the curation activity of spending proposals to experts\ncalled Curators: They can be defined as addresses with agency over a portion of the Treasury with\nthe goal of fixing a bug or vulnerability, developing a strategy, or monitoring a set of tasks\nrelated to a specific topic: all for the benefit of the Polkadot ecosystem."}),"\n",(0,o.jsx)(t.p,{children:"A proposer can submit a bounty proposal for the Council to pass, with a curator to be defined later,\nwhose background and expertise is such that they are capable of determining when the task is\ncomplete. Curators are selected by the Council after the bounty proposal passes, and need to add an\nupfront payment to take the position. This deposit can be used to punish them if they act\nmaliciously. However, if they are successful in their task of getting someone to complete the bounty\nwork, they will receive their deposit back and part of the bounty reward."}),"\n",(0,o.jsx)(t.p,{children:"When submitting the value of the bounty, the proposer includes a reward for curators willing to\ninvest their time and expertise in the task: this amount is included in the total value of the\nbounty. In this sense, the curator's fee can be defined as the result of subtracting the value paid\nto the bounty rewardee from the total value of the bounty."}),"\n",(0,o.jsx)(t.p,{children:"In general terms, curators are expected to have a well-balanced track record related to the issues\nthe bounty tries to resolve: they should be at least knowledgeable on the topics the bounty touches,\nand show project management skills or experience. These recommendations ensure an effective use of\nthe mechanism. A Bounty Spending is a reward for a specified body of work - or specified set of\nobjectives - that needs to be executed for a predefined treasury amount to be paid out. The\nresponsibility of assigning a payout address once the specified set of objectives is completed is\ndelegated to the curator."}),"\n",(0,o.jsx)(t.p,{children:"After the Council has activated a bounty, it delegates the work that requires expertise to the\ncurator who gets to close the active bounty. Closing the active bounty enacts a delayed payout to\nthe payout address and a payout of the curator fee. The delay phase allows the Council to act if any\nissues arise."}),"\n",(0,o.jsxs)(t.p,{children:["To minimize storage on chain in the same way as any proposal, bounties don't contain contextual\ninformation. When a user submits a bounty spending proposal, they will probably need to find an\noff-chain way to explain the proposal (any of the available community forums serve this purpose).\n",(0,o.jsx)(t.a,{href:"https://docs.google.com/document/d/1-IBz_owspV5OcvezWXpksWDQReWowschD0TFuaVKKcU/edit?usp=sharing",children:"This template"}),"\ncan help as a checklist of all needed information for the Council to make an informed decision."]}),"\n",(0,o.jsx)(t.p,{children:"The bounty has a predetermined duration of 90 days with the possibility of being extended by the\ncurator. Aiming to maintain flexibility on the tasks\u2019 curation, the curator will be able to create\nsub-bounties for more granularity and allocation in the next iteration of the mechanism."}),"\n",(0,o.jsx)(t.h3,{id:"creating-a-bounty-proposal",children:"Creating a Bounty Proposal"}),"\n",(0,o.jsx)(t.p,{children:"Anyone can create a Bounty proposal using Polkadot-JS Apps: Users are able to submit a proposal on\nthe dedicated Bounty section under Governance. The development of a robust user interface to view\nand manage bounties in the Polkadot Apps is still under development and it will serve Council\nmembers, Curators and Beneficiaries of the bounties, as well as all users observing the on-chain\ntreasury governance. For now, the help of a Councillor is needed to open a bounty proposal as a\nmotion to be voted."}),"\n",(0,o.jsxs)(t.p,{children:["To submit a bounty, please visit ",(0,o.jsx)(t.a,{href:"https://polkadot.js.org/apps",children:"Polkadot-JS Apps"})," and click on the\ngovernance tab in the options bar on the top of the site. After, click on 'Bounties' and find the\nbutton '+ Add Bounty' on the upper-right side of the interface. Complete the bounty title, the\nrequested allocation (including curator's fee) and confirm the call."]}),"\n",(0,o.jsxs)(t.p,{children:["After this, a Council member will need to assist you to pass the bounty proposal for vote as a\nmotion. You can contact the Council by joining the main\n",(0,o.jsx)(t.a,{href:"/docs/community",children:"Direction Element Channel and Discord server"})," and publishing a short\ndescription of your bounty, with a link to one of the ",(0,o.jsx)(t.a,{href:"#announcing-the-proposal",children:"forums"})," for\ncontextual information."]}),"\n",(0,o.jsx)(t.p,{children:"A bounty can be cancelled by deleting the earmark for a specific treasury amount or be closed if the\ntasks have been completed. On the opposite side, the 90 days life of a bounty can be extended by\namending the expiry block number of the bounty to stay active."}),"\n",(0,o.jsx)(t.h3,{id:"closing-a-bounty",children:"Closing a bounty"}),"\n",(0,o.jsx)(t.p,{children:"The curator can close the bounty once they approve the completion of its tasks. The curator should\nmake sure to set up the payout address on the active bounty beforehand. Closing the Active bounty\nenacts a delayed payout to the payout address and a payout of the curator fee."}),"\n",(0,o.jsxs)(t.p,{children:["A bounty can be closed by using the extrinsics tab and selecting the Treasury pallet, then\n",(0,o.jsx)(t.code,{children:"Award_bounty"}),", making sure the right bounty is to be closed and finally sign the transaction. It is\nimportant to note that those who received a reward after the bounty is completed, must claim the\nspecific amount of the payout from the payout address, by calling ",(0,o.jsx)(t.code,{children:"Claim_bounty"})," after the curator\nclosed the allocation."]}),"\n",(0,o.jsxs)(t.p,{children:["To understand more about Bounties and how this new mechanism works, read this\n",(0,o.jsx)(t.a,{href:"https://polkadot.network/kusama-and-polkadot-now-reward-curators-helping-to-scale-councils-functions-join-the-force-moving-the-community-forward/",children:"Polkadot Blog post"}),"."]}),"\n",(0,o.jsx)(t.h2,{id:"faq",children:"FAQ"}),"\n",(0,o.jsx)(t.h3,{id:"what-prevents-the-treasury-from-being-captured-by-a-majority-of-the-council",children:"What prevents the Treasury from being captured by a majority of the Council?"}),"\n",(0,o.jsx)(t.p,{children:"The majority of the Council can decide the outcome of a treasury spend proposal. In an adversarial\nmindset, we may consider the possibility that the Council may at some point go rogue and attempt to\nsteal all of the treasury funds. It is a possibility that the treasury pot becomes so great, that a\nlarge financial incentive would present itself."}),"\n",(0,o.jsx)(t.p,{children:"For one, the Treasury has deflationary pressure due to the burn that is suffered every spend period.\nThe burn aims to incentivize the complete spend of all treasury funds at every burn period, so\nideally the treasury pot doesn't have time to accumulate mass amounts of wealth. However, it is the\ncase that the burn on the Treasury could be so little that it does not matter - as is the case\ncurrently on Kusama with a 0.2% burn."}),"\n",(0,o.jsx)(t.p,{children:"However, it is the case on Kusama that the Council is composed of mainly well-known members of the\ncommunity. Remember, the Council is voted in by the token holders, so they must do some campaigning\nor otherwise be recognized to earn votes. In the scenario of an attack, the Council members would\nlose their social credibility. Furthermore, members of the Council are usually externally motivated\nby the proper operation of the chain. This external motivation is either because they run businesses\nthat depend on the chain, or they have direct financial gain (through their holdings) of the token\nvalue remaining steady."}),"\n",(0,o.jsx)(t.p,{children:"Concretely, there are a couple on-chain methods that resist this kind of attack. One, the Council\nmajority may not be the token majority of the chain. This means that the token majority could vote\nto replace the Council if they attempted this attack - or even reverse the treasury spend. They\nwould do this through a normal referendum. Two, there are time delays to treasury spends. They are\nonly enacted every spend period. This means that there will be some time to observe this attack is\ntaking place. The time delay then allows chain participants time to respond. The response may take\nthe form of governance measures or - in the most extreme cases a liquidation of their holdings and a\nmigration to a minority fork. However, the possibility of this scenario is quite low."}),"\n",(0,o.jsx)(t.h2,{id:"further-reading",children:"Further Reading"}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsxs)(t.li,{children:["\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/treasury/src/lib.rs",children:"Substrate's Treasury Pallet"})}),"\n"]}),"\n",(0,o.jsxs)(t.li,{children:["\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.a,{href:"https://paritytech.github.io/substrate/master/pallet_treasury/index.html",children:"Documentation of the Rust implementation of the Treasury"})}),"\n"]}),"\n"]})]})}function u(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(c,{...e})}):c(e)}},67141:(e,t,n)=>{n.d(t,{A:()=>s});var o=n(96540),a=n(74848);const s=function(e){var t,n=e.message,s=(0,o.useState)(!0),i=s[0],r=s[1];return(0,a.jsx)(a.Fragment,{children:i&&(0,a.jsxs)("div",{className:"message-box",children:[(0,a.jsx)("button",{className:"close-button",onClick:function(){r(!1)},children:"\u2716 "}),(0,a.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(t=n,t.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},28453:(e,t,n)=>{n.d(t,{R:()=>i,x:()=>r});var o=n(96540);const a={},s=o.createContext(a);function i(e){const t=o.useContext(s);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:i(e.components),o.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/06597bc8.f7caf897.js b/assets/js/06597bc8.f7caf897.js new file mode 100644 index 000000000000..5b854fe7e9f9 --- /dev/null +++ b/assets/js/06597bc8.f7caf897.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6417],{67526:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>h,contentTitle:()=>l,default:()=>u,frontMatter:()=>r,metadata:()=>o,toc:()=>d});const o=JSON.parse('{"id":"learn/archive/learn-treasury","title":"Governance v1 Treasury","description":"The Polkadot\'s On-chain Treasury during Gov1.","source":"@site/../docs/learn/archive/learn-treasury.md","sourceDirName":"learn/archive","slug":"/learn/learn-treasury","permalink":"/docs/learn/learn-treasury","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/archive/learn-treasury.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1729847256000,"frontMatter":{"id":"learn-treasury","title":"Governance v1 Treasury","sidebar_label":"Gov1 Treasury","description":"The Polkadot\'s On-chain Treasury during Gov1.","keywords":["treasury","funds","funding","tips","tipping"],"slug":"../learn-treasury"},"sidebar":"docs","previous":{"title":"Governance V1","permalink":"/docs/learn/learn-governance"},"next":{"title":"Polkadot Launch Phases","permalink":"/docs/learn/learn-launch"}}');var a=n(74848),s=n(28453),i=n(67141);const r={id:"learn-treasury",title:"Governance v1 Treasury",sidebar_label:"Gov1 Treasury",description:"The Polkadot's On-chain Treasury during Gov1.",keywords:["treasury","funds","funding","tips","tipping"],slug:"../learn-treasury"},l=void 0,h={},d=[{value:"Funding the Treasury",id:"funding-the-treasury",level:2},{value:"Tipping",id:"tipping",level:2},{value:"Example",id:"example",level:3},{value:"Bounties Spending",id:"bounties-spending",level:2},{value:"Creating a Bounty Proposal",id:"creating-a-bounty-proposal",level:3},{value:"Closing a bounty",id:"closing-a-bounty",level:3},{value:"FAQ",id:"faq",level:2},{value:"What prevents the Treasury from being captured by a majority of the Council?",id:"what-prevents-the-treasury-from-being-captured-by-a-majority-of-the-council",level:3},{value:"Further Reading",id:"further-reading",level:2}];function c(e){const t={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",li:"li",p:"p",ul:"ul",...(0,s.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.A,{message:"The content on this page is archived. For up-to-date information about treasury, see the\n[Polkadot OpenGov Treasury page](../learn-polkadot-opengov-treasury)."}),"\n",(0,a.jsxs)(t.p,{children:["The Treasury is a pot of funds collected through a portion of block production rewards,\n",(0,a.jsx)(t.a,{href:"/docs/learn-transactions#transaction-fees",children:"transaction fees"}),", ",(0,a.jsx)(t.a,{href:"/docs/learn-offenses",children:"slashing"}),",\n",(0,a.jsx)(t.a,{href:"/docs/learn-staking#inflation",children:"staking inefficiencies"}),", etc."]}),"\n",(0,a.jsxs)(t.p,{children:["The Treasury funds are held in a ",(0,a.jsx)(t.a,{href:"/docs/learn-account-advanced#system-accounts",children:"system account"})," not\naccessible by anyone; only the system internal logic can access it. Funds can be spent by making a\nspending proposal that, if approved by the ",(0,a.jsx)(t.a,{href:"/docs/learn/learn-governance#council",children:"Council"}),", will enter a\nwaiting period before distribution. This waiting period is known as the\n",(0,a.jsx)(t.a,{href:"/docs/chain-state-values#treasury-spending-period",children:(0,a.jsx)(t.em,{children:"spend period"})}),", and its duration is\nsubject to ",(0,a.jsx)(t.a,{href:"/docs/learn/learn-governance",children:"governance"}),". The Treasury attempts to spend as many proposals in\nthe queue as it can without running out of funds."]}),"\n",(0,a.jsx)(t.p,{children:"Treasury payout is an automatic process:"}),"\n",(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsx)(t.li,{children:"If the Treasury funds run out with approved proposals left to fund, those proposals are kept in\nthe approved queue, and will receive funding in the following spend period."}),"\n",(0,a.jsxs)(t.li,{children:["If the Treasury ends a spend period without spending all of its funds, it suffers a burn of\n",(0,a.jsx)(t.a,{href:"/docs/chain-state-values#treasury-burn-factor",children:"a percentage of its funds"})," - thereby\ncausing deflationary pressure. This encourages the spending of the funds in the Treasury by\nPolkadot's governance system."]}),"\n"]}),"\n",(0,a.jsx)(t.p,{children:"When a stakeholder wishes to propose a spend from the Treasury, they must reserve a deposit of at\nleast 5% of the proposed spend (see below for variations). This deposit will be slashed if the\nproposal is rejected, and returned if it is accepted."}),"\n",(0,a.jsx)(t.p,{children:"Proposals may consist of (but are not limited to):"}),"\n",(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsx)(t.li,{children:"Infrastructure deployment and continued operation."}),"\n",(0,a.jsx)(t.li,{children:"Network security operations (monitoring services, continuous auditing)."}),"\n",(0,a.jsx)(t.li,{children:"Ecosystem provisions (collaborations with friendly chains)."}),"\n",(0,a.jsx)(t.li,{children:"Marketing activities (advertising, paid features, collaborations)."}),"\n",(0,a.jsx)(t.li,{children:"Community events and outreach (meetups, pizza parties, hackerspaces)."}),"\n",(0,a.jsx)(t.li,{children:"Software development (wallets and wallet integration, clients and client upgrades)."}),"\n"]}),"\n",(0,a.jsxs)(t.p,{children:["The ",(0,a.jsx)(t.a,{href:"learn-governance#council",children:"Council"})," governs the Treasury and how the funds are spent is up to\ntheir judgment."]}),"\n",(0,a.jsx)(t.admonition,{type:"caution",children:(0,a.jsx)(t.p,{children:"The Council does not approve or deny Treasury Proposals based on the available funds. Proposals are\nnot approved just because there are funds ready to spend but are subject to a burn."})}),"\n",(0,a.jsx)(t.h2,{id:"funding-the-treasury",children:"Funding the Treasury"}),"\n",(0,a.jsxs)(t.p,{children:["For more information about how the Polkadot Treasury is funded, see the\n",(0,a.jsx)(t.a,{href:"/docs/learn-polkadot-opengov-treasury#treasury-inflow-and-outflow",children:"treasury page"}),"."]}),"\n",(0,a.jsx)(t.h2,{id:"tipping",children:"Tipping"}),"\n",(0,a.jsx)(t.p,{children:"Next to the proposals process, a separate system for making tips exists for the Treasury. Tips can\nbe suggested by anyone and are supported by members of the Council. Tips do not have any definite\nvalue, and the final value of the tip is decided based on the median of all tips issued by the\ntippers."}),"\n",(0,a.jsx)(t.p,{children:"Currently, the tippers are the same as the members of the Council. However, being a tipper is not\nthe direct responsibility of the Council, and at some point the Council and the tippers may be\ndifferent groups of accounts."}),"\n",(0,a.jsxs)(t.p,{children:["A tip will enter a closing phase when more than a half plus one of the tipping group have endorsed a\ntip. During that time frame, the other members of the tipping group can still issue their tips, but\ndo not have to. Once the window closes, anyone can call the ",(0,a.jsx)(t.code,{children:"close_tip"})," extrinsic, and the tip will\nbe paid out."]}),"\n",(0,a.jsx)(t.p,{children:"There are two types of tips:"}),"\n",(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsx)(t.li,{children:"public: A small bond is required to place them. This bond depends on the tip message length, and a\nfixed bond constant defined on chain, currently 1 DOT (0.166 KSM on Kusama). Public tips carry a\nfinder's fee of 20% (same on Polkadot and Kusama) which is paid out from the total amount."}),"\n",(0,a.jsx)(t.li,{children:"tipper-initiated: Tips that a Council member published, do not have a finder's fee or a bond."}),"\n"]}),"\n",(0,a.jsx)(t.admonition,{type:"info",children:(0,a.jsxs)(t.p,{children:["For information about how to submit a tip from the Treasury you can read\n",(0,a.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181971",children:"this support article"}),"."]})}),"\n",(0,a.jsx)(t.p,{children:"To better understand the process a tip goes through until it is paid out, let's consider the example\nbelow."}),"\n",(0,a.jsx)(t.h3,{id:"example",children:"Example"}),"\n",(0,a.jsx)(t.p,{children:"Bob has done something great for Polkadot. Alice has noticed this and decides to report Bob as\ndeserving a tip from the Treasury. The Council is composed of three members Charlie, Dave, and Eve."}),"\n",(0,a.jsxs)(t.p,{children:["Alice begins the process by issuing the ",(0,a.jsx)(t.code,{children:"report_awesome"})," extrinsic. This extrinsic requires two\narguments, a reason and the beneficiary. Alice submits Bob's address with the reason being a UTF-8\nencoded URL to a post on ",(0,a.jsx)(t.a,{href:"https://polkadot.polkassembly.io",children:"Polkassembly"})," that explains her\nreasoning for why Bob deserves the tip."]}),"\n",(0,a.jsx)(t.p,{children:"As mentioned above, Alice must also lock up a deposit for making this report. The deposit is the\nbase deposit as set in the chain's parameter list, plus the additional deposit per byte contained in\nthe reason. This is why Alice submitted a URL as the reason instead of the explanation directly: it\nwas cheaper for her to do so. For her trouble, Alice is able to claim the eventual finder's fee if\nthe tip is approved by the tippers."}),"\n",(0,a.jsx)(t.p,{children:"Since the tipper group is the same as the Council, the Council must now collectively (but also\nindependently) decide on the value of the tip that Bob deserves. Charlie, Dave, and Eve all review\nthe report and make tips according to their personal valuation of the benefit Bob has provided to\nthe network. Charlie tips 10 DOT, Dave tips 30 DOT, and Eve tips 100 DOT."}),"\n",(0,a.jsx)(t.p,{children:"The tip could have been closed out with only two of the three tippers. Once more than half of the\ntippers group have issued tip valuations, the countdown to close the tip will begin. In this case,\nthe third tipper issued their tip before the end of the closing period, so all three were able to\nmake their tip valuations known."}),"\n",(0,a.jsxs)(t.p,{children:["The actual tip that will be paid out to Bob is the median of these tips, so Bob will be paid out 30\nDOT from the Treasury. In order for Bob to be paid his tip, some account must call the ",(0,a.jsx)(t.code,{children:"close_tip"}),"\nextrinsic at the end of the closing period for the tip. This extrinsic may be called by anyone."]}),"\n",(0,a.jsx)(t.h2,{id:"bounties-spending",children:"Bounties Spending"}),"\n",(0,a.jsx)(t.p,{children:"There are practical limits to Council Members curation capabilities when it comes to treasury\nproposals: Council members likely do not have the expertise to make a proper assessment of the\nactivities described in all proposals. Even if individual Councillors have that expertise, it is\nhighly unlikely that a majority of members are capable in such diverse topics."}),"\n",(0,a.jsx)(t.p,{children:"Bounties Spending proposals aim to delegate the curation activity of spending proposals to experts\ncalled Curators: They can be defined as addresses with agency over a portion of the Treasury with\nthe goal of fixing a bug or vulnerability, developing a strategy, or monitoring a set of tasks\nrelated to a specific topic: all for the benefit of the Polkadot ecosystem."}),"\n",(0,a.jsx)(t.p,{children:"A proposer can submit a bounty proposal for the Council to pass, with a curator to be defined later,\nwhose background and expertise is such that they are capable of determining when the task is\ncomplete. Curators are selected by the Council after the bounty proposal passes, and need to add an\nupfront payment to take the position. This deposit can be used to punish them if they act\nmaliciously. However, if they are successful in their task of getting someone to complete the bounty\nwork, they will receive their deposit back and part of the bounty reward."}),"\n",(0,a.jsx)(t.p,{children:"When submitting the value of the bounty, the proposer includes a reward for curators willing to\ninvest their time and expertise in the task: this amount is included in the total value of the\nbounty. In this sense, the curator's fee can be defined as the result of subtracting the value paid\nto the bounty rewardee from the total value of the bounty."}),"\n",(0,a.jsx)(t.p,{children:"In general terms, curators are expected to have a well-balanced track record related to the issues\nthe bounty tries to resolve: they should be at least knowledgeable on the topics the bounty touches,\nand show project management skills or experience. These recommendations ensure an effective use of\nthe mechanism. A Bounty Spending is a reward for a specified body of work - or specified set of\nobjectives - that needs to be executed for a predefined treasury amount to be paid out. The\nresponsibility of assigning a payout address once the specified set of objectives is completed is\ndelegated to the curator."}),"\n",(0,a.jsx)(t.p,{children:"After the Council has activated a bounty, it delegates the work that requires expertise to the\ncurator who gets to close the active bounty. Closing the active bounty enacts a delayed payout to\nthe payout address and a payout of the curator fee. The delay phase allows the Council to act if any\nissues arise."}),"\n",(0,a.jsxs)(t.p,{children:["To minimize storage on chain in the same way as any proposal, bounties don't contain contextual\ninformation. When a user submits a bounty spending proposal, they will probably need to find an\noff-chain way to explain the proposal (any of the available community forums serve this purpose).\n",(0,a.jsx)(t.a,{href:"https://docs.google.com/document/d/1-IBz_owspV5OcvezWXpksWDQReWowschD0TFuaVKKcU/edit?usp=sharing",children:"This template"}),"\ncan help as a checklist of all needed information for the Council to make an informed decision."]}),"\n",(0,a.jsx)(t.p,{children:"The bounty has a predetermined duration of 90 days with the possibility of being extended by the\ncurator. Aiming to maintain flexibility on the tasks\u2019 curation, the curator will be able to create\nsub-bounties for more granularity and allocation in the next iteration of the mechanism."}),"\n",(0,a.jsx)(t.h3,{id:"creating-a-bounty-proposal",children:"Creating a Bounty Proposal"}),"\n",(0,a.jsx)(t.p,{children:"Anyone can create a Bounty proposal using Polkadot-JS Apps: Users are able to submit a proposal on\nthe dedicated Bounty section under Governance. The development of a robust user interface to view\nand manage bounties in the Polkadot Apps is still under development and it will serve Council\nmembers, Curators and Beneficiaries of the bounties, as well as all users observing the on-chain\ntreasury governance. For now, the help of a Councillor is needed to open a bounty proposal as a\nmotion to be voted."}),"\n",(0,a.jsxs)(t.p,{children:["To submit a bounty, please visit ",(0,a.jsx)(t.a,{href:"https://polkadot.js.org/apps",children:"Polkadot-JS Apps"})," and click on the\ngovernance tab in the options bar on the top of the site. After, click on 'Bounties' and find the\nbutton '+ Add Bounty' on the upper-right side of the interface. Complete the bounty title, the\nrequested allocation (including curator's fee) and confirm the call."]}),"\n",(0,a.jsxs)(t.p,{children:["After this, a Council member will need to assist you to pass the bounty proposal for vote as a\nmotion. You can contact the Council by joining the main\n",(0,a.jsx)(t.a,{href:"/docs/community",children:"Direction Element Channel and Discord server"})," and publishing a short\ndescription of your bounty, with a link to one of the ",(0,a.jsx)(t.a,{href:"#announcing-the-proposal",children:"forums"})," for\ncontextual information."]}),"\n",(0,a.jsx)(t.p,{children:"A bounty can be cancelled by deleting the earmark for a specific treasury amount or be closed if the\ntasks have been completed. On the opposite side, the 90 days life of a bounty can be extended by\namending the expiry block number of the bounty to stay active."}),"\n",(0,a.jsx)(t.h3,{id:"closing-a-bounty",children:"Closing a bounty"}),"\n",(0,a.jsx)(t.p,{children:"The curator can close the bounty once they approve the completion of its tasks. The curator should\nmake sure to set up the payout address on the active bounty beforehand. Closing the Active bounty\nenacts a delayed payout to the payout address and a payout of the curator fee."}),"\n",(0,a.jsxs)(t.p,{children:["A bounty can be closed by using the extrinsics tab and selecting the Treasury pallet, then\n",(0,a.jsx)(t.code,{children:"Award_bounty"}),", making sure the right bounty is to be closed and finally sign the transaction. It is\nimportant to note that those who received a reward after the bounty is completed, must claim the\nspecific amount of the payout from the payout address, by calling ",(0,a.jsx)(t.code,{children:"Claim_bounty"})," after the curator\nclosed the allocation."]}),"\n",(0,a.jsxs)(t.p,{children:["To understand more about Bounties and how this new mechanism works, read this\n",(0,a.jsx)(t.a,{href:"https://polkadot.network/kusama-and-polkadot-now-reward-curators-helping-to-scale-councils-functions-join-the-force-moving-the-community-forward/",children:"Polkadot Blog post"}),"."]}),"\n",(0,a.jsx)(t.h2,{id:"faq",children:"FAQ"}),"\n",(0,a.jsx)(t.h3,{id:"what-prevents-the-treasury-from-being-captured-by-a-majority-of-the-council",children:"What prevents the Treasury from being captured by a majority of the Council?"}),"\n",(0,a.jsx)(t.p,{children:"The majority of the Council can decide the outcome of a treasury spend proposal. In an adversarial\nmindset, we may consider the possibility that the Council may at some point go rogue and attempt to\nsteal all of the treasury funds. It is a possibility that the treasury pot becomes so great, that a\nlarge financial incentive would present itself."}),"\n",(0,a.jsx)(t.p,{children:"For one, the Treasury has deflationary pressure due to the burn that is suffered every spend period.\nThe burn aims to incentivize the complete spend of all treasury funds at every burn period, so\nideally the treasury pot doesn't have time to accumulate mass amounts of wealth. However, it is the\ncase that the burn on the Treasury could be so little that it does not matter - as is the case\ncurrently on Kusama with a 0.2% burn."}),"\n",(0,a.jsx)(t.p,{children:"However, it is the case on Kusama that the Council is composed of mainly well-known members of the\ncommunity. Remember, the Council is voted in by the token holders, so they must do some campaigning\nor otherwise be recognized to earn votes. In the scenario of an attack, the Council members would\nlose their social credibility. Furthermore, members of the Council are usually externally motivated\nby the proper operation of the chain. This external motivation is either because they run businesses\nthat depend on the chain, or they have direct financial gain (through their holdings) of the token\nvalue remaining steady."}),"\n",(0,a.jsx)(t.p,{children:"Concretely, there are a couple on-chain methods that resist this kind of attack. One, the Council\nmajority may not be the token majority of the chain. This means that the token majority could vote\nto replace the Council if they attempted this attack - or even reverse the treasury spend. They\nwould do this through a normal referendum. Two, there are time delays to treasury spends. They are\nonly enacted every spend period. This means that there will be some time to observe this attack is\ntaking place. The time delay then allows chain participants time to respond. The response may take\nthe form of governance measures or - in the most extreme cases a liquidation of their holdings and a\nmigration to a minority fork. However, the possibility of this scenario is quite low."}),"\n",(0,a.jsx)(t.h2,{id:"further-reading",children:"Further Reading"}),"\n",(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsxs)(t.li,{children:["\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/treasury/src/lib.rs",children:"Substrate's Treasury Pallet"})}),"\n"]}),"\n",(0,a.jsxs)(t.li,{children:["\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.a,{href:"https://paritytech.github.io/substrate/master/pallet_treasury/index.html",children:"Documentation of the Rust implementation of the Treasury"})}),"\n"]}),"\n"]})]})}function u(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,a.jsx)(t,{...e,children:(0,a.jsx)(c,{...e})}):c(e)}},67141:(e,t,n)=>{n.d(t,{A:()=>s});var o=n(96540),a=n(74848);const s=function(e){var t,n=e.message,s=(0,o.useState)(!0),i=s[0],r=s[1];return(0,a.jsx)(a.Fragment,{children:i&&(0,a.jsxs)("div",{className:"message-box",children:[(0,a.jsx)("button",{className:"close-button",onClick:function(){r(!1)},children:"\u2716 "}),(0,a.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(t=n,t.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},28453:(e,t,n)=>{n.d(t,{R:()=>i,x:()=>r});var o=n(96540);const a={},s=o.createContext(a);function i(e){const t=o.useContext(s);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:i(e.components),o.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/078895e8.893e56a1.js b/assets/js/078895e8.893e56a1.js deleted file mode 100644 index 616fa81e5852..000000000000 --- a/assets/js/078895e8.893e56a1.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9909],{66232:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>i,contentTitle:()=>l,default:()=>u,frontMatter:()=>a,metadata:()=>c,toc:()=>d});var o=n(74848),s=n(28453),r=n(67141);const a={id:"learn-controller",title:"Controller Accounts",sidebar_label:"Controller Accounts",description:"Controller Accounts used in Staking.",keywords:["nominated proof of stake","staking","controller"],slug:"../learn-controller"},l=void 0,c={id:"learn/archive/learn-controller",title:"Controller Accounts",description:"Controller Accounts used in Staking.",source:"@site/../docs/learn/archive/learn-controller.md",sourceDirName:"learn/archive",slug:"/learn/learn-controller",permalink:"/docs/learn/learn-controller",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/archive/learn-controller.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1714545713e3,frontMatter:{id:"learn-controller",title:"Controller Accounts",sidebar_label:"Controller Accounts",description:"Controller Accounts used in Staking.",keywords:["nominated proof of stake","staking","controller"],slug:"../learn-controller"},sidebar:"docs",previous:{title:"Redenomination of DOT",permalink:"/docs/learn/learn-redenomination"},next:{title:"Parachain Slot Auctions",permalink:"/docs/learn/learn-auction"}},i={},d=[{value:"Stash as Controller",id:"stash-as-controller",level:2},{value:"Stash not as Controller",id:"stash-not-as-controller",level:2}];function h(e){const t={h2:"h2",img:"img",p:"p",...(0,s.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(r.A,{message:"The content on this page is archived. Controller accounts are deprecated. For more information, see\n[this discussion](https://forum.polkadot.network/t/staking-controller-deprecation-plan-staking-ui-leads-comms/2748)."}),"\n",(0,o.jsx)(t.p,{children:'Controller accounts were used for staking and were a "less-powerful" version of staking proxies.\nControllers could only sign for unbonding and rebonding funds, nominating and changing the reward\ndestination. The stash account was still used to bond more funds and change the controller.\nController accounts became redundant and added unnecessary complexity to the staking mechanics.'}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{alt:"controller-accounts",src:n(73768).A+"",width:"1920",height:"800"})}),"\n",(0,o.jsx)(t.p,{children:"With the setup shown above, the stash account was not entirely isolated. More complicated designs to\nfully isolate the stash account included having both controller and staking proxies (see below)."}),"\n",(0,o.jsx)(t.h2,{id:"stash-as-controller",children:"Stash as Controller"}),"\n",(0,o.jsx)(t.p,{children:"It was unnecessary to have a controller if you had a staking proxy. In this case the stash was also\nset to be the controller, and the account security would not have been compromised. The staking\nproxy was used to sign all staking-relate transactions. Note that you needed to sign with the stash\nto change the staking proxy."}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{alt:"stash-as-controller",src:n(50515).A+"",width:"1920",height:"800"})}),"\n",(0,o.jsx)(t.p,{children:'This past situation was similar to the present setup, except that now there is no option to set the\nstash as controller and that the action of "changing the controller" is missing. From a practical\nperspective, we need to use only one account and remember one password to sign for all\nstaking-related transactions. From a security perspective, who controls the staking proxy controls\nour staking actions.'}),"\n",(0,o.jsx)(t.h2,{id:"stash-not-as-controller",children:"Stash not as Controller"}),"\n",(0,o.jsx)(t.p,{children:"If the stash and controller were different accounts, the staking proxy was used to bond more funds\nand change the controller. Thus the staking proxy was used to sign for those transactions that were\nused less often and usually signed by the stash."}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{alt:"stash-not-as-controller",src:n(29331).A+"",width:"1920",height:"800"})}),"\n",(0,o.jsx)(t.p,{children:"From a practical perspective, there were two accounts, and we needed to remember two passwords. From\na security perspective, the party who wanted to control our staking actions was required to control\ntwo accounts."})]})}function u(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(h,{...e})}):h(e)}},67141:(e,t,n)=>{n.d(t,{A:()=>r});var o=n(96540),s=n(74848);const r=function(e){var t,n=e.message,r=(0,o.useState)(!0),a=r[0],l=r[1];return(0,s.jsx)(s.Fragment,{children:a&&(0,s.jsxs)("div",{className:"message-box",children:[(0,s.jsx)("button",{className:"close-button",onClick:function(){l(!1)},children:"\u2716 "}),(0,s.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(t=n,t.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},50515:(e,t,n)=>{n.d(t,{A:()=>o});const o=n.p+"assets/images/stash-as-controller-b9840d38c845fce713390da24c60e4a4.png"},73768:(e,t,n)=>{n.d(t,{A:()=>o});const o=n.p+"assets/images/stash-controller-978875461a51b1f2689c22bdadfde1e4.png"},29331:(e,t,n)=>{n.d(t,{A:()=>o});const o=n.p+"assets/images/stash-not-as-controller-8a6c27ea620379446da133a42f860029.png"},28453:(e,t,n)=>{n.d(t,{R:()=>a,x:()=>l});var o=n(96540);const s={},r=o.createContext(s);function a(e){const t=o.useContext(r);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function l(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:a(e.components),o.createElement(r.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/078895e8.e7d4aa3c.js b/assets/js/078895e8.e7d4aa3c.js new file mode 100644 index 000000000000..38b7215b4cb0 --- /dev/null +++ b/assets/js/078895e8.e7d4aa3c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9909],{13995:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>i,contentTitle:()=>c,default:()=>u,frontMatter:()=>l,metadata:()=>o,toc:()=>d});const o=JSON.parse('{"id":"learn/archive/learn-controller","title":"Controller Accounts","description":"Controller Accounts used in Staking.","source":"@site/../docs/learn/archive/learn-controller.md","sourceDirName":"learn/archive","slug":"/learn/learn-controller","permalink":"/docs/learn/learn-controller","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/archive/learn-controller.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1714545713000,"frontMatter":{"id":"learn-controller","title":"Controller Accounts","sidebar_label":"Controller Accounts","description":"Controller Accounts used in Staking.","keywords":["nominated proof of stake","staking","controller"],"slug":"../learn-controller"},"sidebar":"docs","previous":{"title":"Redenomination of DOT","permalink":"/docs/learn/learn-redenomination"},"next":{"title":"Parachain Slot Auctions","permalink":"/docs/learn/learn-auction"}}');var s=n(74848),r=n(28453),a=n(67141);const l={id:"learn-controller",title:"Controller Accounts",sidebar_label:"Controller Accounts",description:"Controller Accounts used in Staking.",keywords:["nominated proof of stake","staking","controller"],slug:"../learn-controller"},c=void 0,i={},d=[{value:"Stash as Controller",id:"stash-as-controller",level:2},{value:"Stash not as Controller",id:"stash-not-as-controller",level:2}];function h(e){const t={h2:"h2",img:"img",p:"p",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a.A,{message:"The content on this page is archived. Controller accounts are deprecated. For more information, see\n[this discussion](https://forum.polkadot.network/t/staking-controller-deprecation-plan-staking-ui-leads-comms/2748)."}),"\n",(0,s.jsx)(t.p,{children:'Controller accounts were used for staking and were a "less-powerful" version of staking proxies.\nControllers could only sign for unbonding and rebonding funds, nominating and changing the reward\ndestination. The stash account was still used to bond more funds and change the controller.\nController accounts became redundant and added unnecessary complexity to the staking mechanics.'}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{alt:"controller-accounts",src:n(73768).A+"",width:"1920",height:"800"})}),"\n",(0,s.jsx)(t.p,{children:"With the setup shown above, the stash account was not entirely isolated. More complicated designs to\nfully isolate the stash account included having both controller and staking proxies (see below)."}),"\n",(0,s.jsx)(t.h2,{id:"stash-as-controller",children:"Stash as Controller"}),"\n",(0,s.jsx)(t.p,{children:"It was unnecessary to have a controller if you had a staking proxy. In this case the stash was also\nset to be the controller, and the account security would not have been compromised. The staking\nproxy was used to sign all staking-relate transactions. Note that you needed to sign with the stash\nto change the staking proxy."}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{alt:"stash-as-controller",src:n(50515).A+"",width:"1920",height:"800"})}),"\n",(0,s.jsx)(t.p,{children:'This past situation was similar to the present setup, except that now there is no option to set the\nstash as controller and that the action of "changing the controller" is missing. From a practical\nperspective, we need to use only one account and remember one password to sign for all\nstaking-related transactions. From a security perspective, who controls the staking proxy controls\nour staking actions.'}),"\n",(0,s.jsx)(t.h2,{id:"stash-not-as-controller",children:"Stash not as Controller"}),"\n",(0,s.jsx)(t.p,{children:"If the stash and controller were different accounts, the staking proxy was used to bond more funds\nand change the controller. Thus the staking proxy was used to sign for those transactions that were\nused less often and usually signed by the stash."}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{alt:"stash-not-as-controller",src:n(29331).A+"",width:"1920",height:"800"})}),"\n",(0,s.jsx)(t.p,{children:"From a practical perspective, there were two accounts, and we needed to remember two passwords. From\na security perspective, the party who wanted to control our staking actions was required to control\ntwo accounts."})]})}function u(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}},67141:(e,t,n)=>{n.d(t,{A:()=>r});var o=n(96540),s=n(74848);const r=function(e){var t,n=e.message,r=(0,o.useState)(!0),a=r[0],l=r[1];return(0,s.jsx)(s.Fragment,{children:a&&(0,s.jsxs)("div",{className:"message-box",children:[(0,s.jsx)("button",{className:"close-button",onClick:function(){l(!1)},children:"\u2716 "}),(0,s.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(t=n,t.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},50515:(e,t,n)=>{n.d(t,{A:()=>o});const o=n.p+"assets/images/stash-as-controller-b9840d38c845fce713390da24c60e4a4.png"},73768:(e,t,n)=>{n.d(t,{A:()=>o});const o=n.p+"assets/images/stash-controller-978875461a51b1f2689c22bdadfde1e4.png"},29331:(e,t,n)=>{n.d(t,{A:()=>o});const o=n.p+"assets/images/stash-not-as-controller-8a6c27ea620379446da133a42f860029.png"},28453:(e,t,n)=>{n.d(t,{R:()=>a,x:()=>l});var o=n(96540);const s={},r=o.createContext(s);function a(e){const t=o.useContext(r);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function l(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:a(e.components),o.createElement(r.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/08c12c3a.7cb1087b.js b/assets/js/08c12c3a.7cb1087b.js new file mode 100644 index 000000000000..b37700f13612 --- /dev/null +++ b/assets/js/08c12c3a.7cb1087b.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5630],{84110:(e,n,a)=>{a.r(n),a.d(n,{assets:()=>l,contentTitle:()=>d,default:()=>h,frontMatter:()=>t,metadata:()=>i,toc:()=>o});const i=JSON.parse('{"id":"general/dune-analytics/parachain-dashboards/polimec-dashboards","title":"Polimec Dashboards","description":"Polimec offers a decentralized, transparent, and compliant method for fundraising.","source":"@site/../docs/general/dune-analytics/parachain-dashboards/polimec-dashboards.md","sourceDirName":"general/dune-analytics/parachain-dashboards","slug":"/general/dune-analytics/polimec-dashboards","permalink":"/docs/general/dune-analytics/polimec-dashboards","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/parachain-dashboards/polimec-dashboards.md","tags":[],"version":"current","lastUpdatedBy":"MK","lastUpdatedAt":1719215716000,"frontMatter":{"id":"polimec-dashboards","title":"Polimec Dashboards","sidebar_label":"Polimec","description":"Polimec offers a decentralized, transparent, and compliant method for fundraising.","keywords":["polkadot","dashboard","dune","polimec","PLMC","funding","staking"],"slug":"../polimec-dashboards"},"sidebar":"docs","previous":{"title":"Polkadex","permalink":"/docs/general/dune-analytics/polkadex-dashboards"},"next":{"title":"Snowbridge","permalink":"/docs/general/dune-analytics/snowbridge-dashboards"}}');var r=a(74848),s=a(28453);const t={id:"polimec-dashboards",title:"Polimec Dashboards",sidebar_label:"Polimec",description:"Polimec offers a decentralized, transparent, and compliant method for fundraising.",keywords:["polkadot","dashboard","dune","polimec","PLMC","funding","staking"],slug:"../polimec-dashboards"},d="Polimec Dashboards",l={},o=[{value:"Overview",id:"overview",level:2},{value:"Featured Dashboards on Dune",id:"featured-dashboards-on-dune",level:2},{value:"Key Tables",id:"key-tables",level:2},{value:"Useful Queries",id:"useful-queries",level:2},{value:"Getting Started with Queries",id:"getting-started-with-queries",level:2}];function c(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,s.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.header,{children:(0,r.jsx)(n.h1,{id:"polimec-dashboards",children:"Polimec Dashboards"})}),"\n",(0,r.jsx)(n.h2,{id:"overview",children:"Overview"}),"\n",(0,r.jsx)(n.p,{children:"Polimec offers a decentralized, transparent, and compliant method for fundraising, ensuring that\nstakeholder incentives are aligned both during and after the fundraising process."}),"\n",(0,r.jsx)(n.h2,{id:"featured-dashboards-on-dune",children:"Featured Dashboards on Dune"}),"\n",(0,r.jsx)(n.p,{children:"Here you will find a variety of dashboards that help visualize data from the Polimec parachain:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"https://dune.com/substrate/polimec",children:"Polimec"}),": A comprehensive analysis of Polimec, including:\nStaking, Funding, Asset Analysis."]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"key-tables",children:"Key Tables"}),"\n",(0,r.jsx)(n.p,{children:"Data from the polimec parachain is organized into several key tables:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"polimec.balances"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"polimec.blocks"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"polimec.calls"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"polimec.events"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"polimec.extrinsics"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"polimec.transfers"})}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:["Start building your own queries using granular data on Dune\n",(0,r.jsx)(n.a,{href:"https://dune.com/queries?category=canonical&namespace=polimec",children:"here"}),"."]}),"\n",(0,r.jsx)(n.h2,{id:"useful-queries",children:"Useful Queries"}),"\n",(0,r.jsx)(n.p,{children:"Some useful queries for Polimec are provided:"}),"\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Title"}),(0,r.jsx)(n.th,{children:"Query"}),(0,r.jsx)(n.th,{children:"Description"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Polimec Latest Collator Info"}),(0,r.jsx)(n.td,{children:(0,r.jsx)(n.a,{href:"https://dune.com/queries/3776548",children:"query_3776548"})}),(0,r.jsx)(n.td,{children:"Find the latest collator information on Polimec"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Plimec All Evaluations"}),(0,r.jsx)(n.td,{children:(0,r.jsx)(n.a,{href:"https://dune.com/queries/3802921",children:"query_3802921"})}),(0,r.jsx)(n.td,{children:"Get all evaluation information for all projects on Polimec"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Polimec All Funding Participations"}),(0,r.jsx)(n.td,{children:(0,r.jsx)(n.a,{href:"https://dune.com/queries/3850228",children:"query_3850228"})}),(0,r.jsx)(n.td,{children:"Get all funding participation information for all projects on Polimec"})]})]})]}),"\n",(0,r.jsx)(n.h2,{id:"getting-started-with-queries",children:"Getting Started with Queries"}),"\n",(0,r.jsx)(n.p,{children:"To get started with querying data from Unique, you are welcome to use the mentioned materialized\nqueries. You can use the following DuneSQL queries as examples:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-sql",metastring:'title="Polimec Latest Reward Distribution" showLineNumbers',children:"WITH latest_round AS (\n SELECT\n MAX(CAST(JSON_EXTRACT_SCALAR(data, '$[0]') AS BIGINT)) AS start_block\n FROM\n polimec.events\n WHERE\n section = 'parachainStaking'\n AND method = 'NewRound'\n),\nsummed AS (\n SELECT\n MAX(block_time) AS latest_time,\n JSON_EXTRACT_SCALAR(JSON_PARSE(data), '$[0]') AS delegator,\n SUM(\n CAST(JSON_EXTRACT_SCALAR(data, '$[1]') AS BIGINT) / POW(10, 10)\n ) AS reward\n FROM\n polimec.events\n WHERE\n section = 'parachainStaking'\n AND method = 'Rewarded'\n AND CAST(block_number AS BIGINT) >= (\n SELECT\n start_block\n FROM\n latest_round\n )\n GROUP BY\n JSON_EXTRACT_SCALAR(JSON_PARSE(data), '$[0]')\n)\nSELECT\n latest_time,\n delegator,\n get_href(\n 'https://explorer.polimec.org/polimec/account/' || delegator,\n CONCAT(\n SUBSTR(delegator, 1, 4),\n '...',\n SUBSTR(delegator, LENGTH(delegator) - 3)\n )\n ) AS delegator_url,\n reward\nFROM\n summed\nORDER BY\n reward DESC;\n"})}),"\n",(0,r.jsx)(n.p,{children:"Query result:"}),"\n",(0,r.jsx)("iframe",{src:"https://dune.com/embeds/3771979/6343454/",height:"350",width:"100%"}),"\n",(0,r.jsx)(n.admonition,{title:"DuneSQL Referece",type:"info",children:(0,r.jsxs)(n.p,{children:["For more information on DuneSQL, please refer to the ",(0,r.jsx)(n.a,{href:"/docs/general/dunesql-cheatsheet",children:"DuneSQL Cheatsheet"}),"\nand\n",(0,r.jsx)(n.a,{href:"https://docs.dune.com/query-engine/Functions-and-operators/index",children:"DuneSQL Official Documentation"}),"."]})})]})}function h(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(c,{...e})}):c(e)}},28453:(e,n,a)=>{a.d(n,{R:()=>t,x:()=>d});var i=a(96540);const r={},s=i.createContext(r);function t(e){const n=i.useContext(s);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:t(e.components),i.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/08c12c3a.ad46d377.js b/assets/js/08c12c3a.ad46d377.js deleted file mode 100644 index 8c03dbfd24e3..000000000000 --- a/assets/js/08c12c3a.ad46d377.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5630],{81329:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>l,contentTitle:()=>s,default:()=>h,frontMatter:()=>t,metadata:()=>d,toc:()=>o});var a=i(74848),r=i(28453);const t={id:"polimec-dashboards",title:"Polimec Dashboards",sidebar_label:"Polimec",description:"Polimec offers a decentralized, transparent, and compliant method for fundraising.",keywords:["polkadot","dashboard","dune","polimec","PLMC","funding","staking"],slug:"../polimec-dashboards"},s="Polimec Dashboards",d={id:"general/dune-analytics/parachain-dashboards/polimec-dashboards",title:"Polimec Dashboards",description:"Polimec offers a decentralized, transparent, and compliant method for fundraising.",source:"@site/../docs/general/dune-analytics/parachain-dashboards/polimec-dashboards.md",sourceDirName:"general/dune-analytics/parachain-dashboards",slug:"/general/dune-analytics/polimec-dashboards",permalink:"/docs/general/dune-analytics/polimec-dashboards",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/parachain-dashboards/polimec-dashboards.md",tags:[],version:"current",lastUpdatedBy:"MK",lastUpdatedAt:1719215716e3,frontMatter:{id:"polimec-dashboards",title:"Polimec Dashboards",sidebar_label:"Polimec",description:"Polimec offers a decentralized, transparent, and compliant method for fundraising.",keywords:["polkadot","dashboard","dune","polimec","PLMC","funding","staking"],slug:"../polimec-dashboards"},sidebar:"docs",previous:{title:"Polkadex",permalink:"/docs/general/dune-analytics/polkadex-dashboards"},next:{title:"Snowbridge",permalink:"/docs/general/dune-analytics/snowbridge-dashboards"}},l={},o=[{value:"Overview",id:"overview",level:2},{value:"Featured Dashboards on Dune",id:"featured-dashboards-on-dune",level:2},{value:"Key Tables",id:"key-tables",level:2},{value:"Useful Queries",id:"useful-queries",level:2},{value:"Getting Started with Queries",id:"getting-started-with-queries",level:2}];function c(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,r.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.header,{children:(0,a.jsx)(n.h1,{id:"polimec-dashboards",children:"Polimec Dashboards"})}),"\n",(0,a.jsx)(n.h2,{id:"overview",children:"Overview"}),"\n",(0,a.jsx)(n.p,{children:"Polimec offers a decentralized, transparent, and compliant method for fundraising, ensuring that\nstakeholder incentives are aligned both during and after the fundraising process."}),"\n",(0,a.jsx)(n.h2,{id:"featured-dashboards-on-dune",children:"Featured Dashboards on Dune"}),"\n",(0,a.jsx)(n.p,{children:"Here you will find a variety of dashboards that help visualize data from the Polimec parachain:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.a,{href:"https://dune.com/substrate/polimec",children:"Polimec"}),": A comprehensive analysis of Polimec, including:\nStaking, Funding, Asset Analysis."]}),"\n"]}),"\n",(0,a.jsx)(n.h2,{id:"key-tables",children:"Key Tables"}),"\n",(0,a.jsx)(n.p,{children:"Data from the polimec parachain is organized into several key tables:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.code,{children:"polimec.balances"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.code,{children:"polimec.blocks"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.code,{children:"polimec.calls"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.code,{children:"polimec.events"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.code,{children:"polimec.extrinsics"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.code,{children:"polimec.transfers"})}),"\n"]}),"\n",(0,a.jsxs)(n.p,{children:["Start building your own queries using granular data on Dune\n",(0,a.jsx)(n.a,{href:"https://dune.com/queries?category=canonical&namespace=polimec",children:"here"}),"."]}),"\n",(0,a.jsx)(n.h2,{id:"useful-queries",children:"Useful Queries"}),"\n",(0,a.jsx)(n.p,{children:"Some useful queries for Polimec are provided:"}),"\n",(0,a.jsxs)(n.table,{children:[(0,a.jsx)(n.thead,{children:(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.th,{children:"Title"}),(0,a.jsx)(n.th,{children:"Query"}),(0,a.jsx)(n.th,{children:"Description"})]})}),(0,a.jsxs)(n.tbody,{children:[(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:"Polimec Latest Collator Info"}),(0,a.jsx)(n.td,{children:(0,a.jsx)(n.a,{href:"https://dune.com/queries/3776548",children:"query_3776548"})}),(0,a.jsx)(n.td,{children:"Find the latest collator information on Polimec"})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:"Plimec All Evaluations"}),(0,a.jsx)(n.td,{children:(0,a.jsx)(n.a,{href:"https://dune.com/queries/3802921",children:"query_3802921"})}),(0,a.jsx)(n.td,{children:"Get all evaluation information for all projects on Polimec"})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:"Polimec All Funding Participations"}),(0,a.jsx)(n.td,{children:(0,a.jsx)(n.a,{href:"https://dune.com/queries/3850228",children:"query_3850228"})}),(0,a.jsx)(n.td,{children:"Get all funding participation information for all projects on Polimec"})]})]})]}),"\n",(0,a.jsx)(n.h2,{id:"getting-started-with-queries",children:"Getting Started with Queries"}),"\n",(0,a.jsx)(n.p,{children:"To get started with querying data from Unique, you are welcome to use the mentioned materialized\nqueries. You can use the following DuneSQL queries as examples:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-sql",metastring:'title="Polimec Latest Reward Distribution" showLineNumbers',children:"WITH latest_round AS (\n SELECT\n MAX(CAST(JSON_EXTRACT_SCALAR(data, '$[0]') AS BIGINT)) AS start_block\n FROM\n polimec.events\n WHERE\n section = 'parachainStaking'\n AND method = 'NewRound'\n),\nsummed AS (\n SELECT\n MAX(block_time) AS latest_time,\n JSON_EXTRACT_SCALAR(JSON_PARSE(data), '$[0]') AS delegator,\n SUM(\n CAST(JSON_EXTRACT_SCALAR(data, '$[1]') AS BIGINT) / POW(10, 10)\n ) AS reward\n FROM\n polimec.events\n WHERE\n section = 'parachainStaking'\n AND method = 'Rewarded'\n AND CAST(block_number AS BIGINT) >= (\n SELECT\n start_block\n FROM\n latest_round\n )\n GROUP BY\n JSON_EXTRACT_SCALAR(JSON_PARSE(data), '$[0]')\n)\nSELECT\n latest_time,\n delegator,\n get_href(\n 'https://explorer.polimec.org/polimec/account/' || delegator,\n CONCAT(\n SUBSTR(delegator, 1, 4),\n '...',\n SUBSTR(delegator, LENGTH(delegator) - 3)\n )\n ) AS delegator_url,\n reward\nFROM\n summed\nORDER BY\n reward DESC;\n"})}),"\n",(0,a.jsx)(n.p,{children:"Query result:"}),"\n",(0,a.jsx)("iframe",{src:"https://dune.com/embeds/3771979/6343454/",height:"350",width:"100%"}),"\n",(0,a.jsx)(n.admonition,{title:"DuneSQL Referece",type:"info",children:(0,a.jsxs)(n.p,{children:["For more information on DuneSQL, please refer to the ",(0,a.jsx)(n.a,{href:"/docs/general/dunesql-cheatsheet",children:"DuneSQL Cheatsheet"}),"\nand\n",(0,a.jsx)(n.a,{href:"https://docs.dune.com/query-engine/Functions-and-operators/index",children:"DuneSQL Official Documentation"}),"."]})})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(c,{...e})}):c(e)}},28453:(e,n,i)=>{i.d(n,{R:()=>s,x:()=>d});var a=i(96540);const r={},t=a.createContext(r);function s(e){const n=a.useContext(t);return a.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:s(e.components),a.createElement(t.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/09dda9ae.09170ba7.js b/assets/js/09dda9ae.09170ba7.js new file mode 100644 index 000000000000..e36ab7845b21 --- /dev/null +++ b/assets/js/09dda9ae.09170ba7.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2598],{26438:(e,a,n)=>{n.r(a),n.d(a,{assets:()=>o,contentTitle:()=>i,default:()=>h,frontMatter:()=>r,metadata:()=>d,toc:()=>l});const d=JSON.parse('{"id":"general/dune-analytics/parachain-dashboards/polkadex-dashboards","title":"Polkadex Dashboards","description":"Polkadex is a decentralized exchange parachain on Polkadot that combines the benefits of centralized and decentralized exchanges.","source":"@site/../docs/general/dune-analytics/parachain-dashboards/polkadex-dashboards.md","sourceDirName":"general/dune-analytics/parachain-dashboards","slug":"/general/dune-analytics/polkadex-dashboards","permalink":"/docs/general/dune-analytics/polkadex-dashboards","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/parachain-dashboards/polkadex-dashboards.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1727178265000,"frontMatter":{"id":"polkadex-dashboards","title":"Polkadex Dashboards","sidebar_label":"Polkadex","description":"Polkadex is a decentralized exchange parachain on Polkadot that combines the benefits of centralized and decentralized exchanges.","keywords":["polkadot","dashboard","dune","polkadex","decentralized exchange"],"slug":"../polkadex-dashboards"},"sidebar":"docs","previous":{"title":"Phala","permalink":"/docs/general/dune-analytics/phala-dashboards"},"next":{"title":"Polimec","permalink":"/docs/general/dune-analytics/polimec-dashboards"}}');var s=n(74848),t=n(28453);const r={id:"polkadex-dashboards",title:"Polkadex Dashboards",sidebar_label:"Polkadex",description:"Polkadex is a decentralized exchange parachain on Polkadot that combines the benefits of centralized and decentralized exchanges.",keywords:["polkadot","dashboard","dune","polkadex","decentralized exchange"],slug:"../polkadex-dashboards"},i="Polkadex Dashboards",o={},l=[{value:"Overview",id:"overview",level:2},{value:"Featured Dashboards on Dune",id:"featured-dashboards-on-dune",level:2},{value:"Key Tables",id:"key-tables",level:2},{value:"Useful Queries",id:"useful-queries",level:2},{value:"Getting Started with Queries",id:"getting-started-with-queries",level:2}];function c(e){const a={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,t.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a.header,{children:(0,s.jsx)(a.h1,{id:"polkadex-dashboards",children:"Polkadex Dashboards"})}),"\n",(0,s.jsx)(a.h2,{id:"overview",children:"Overview"}),"\n",(0,s.jsx)(a.p,{children:"Polkadex is a decentralized exchange parachain on Polkadot that combines the benefits of centralized\nand decentralized exchanges, offering a high-performance trading experience with trustless custody.\nIt aims to provide a seamless trading environment while ensuring the security of a decentralized\nplatform."}),"\n",(0,s.jsx)(a.h2,{id:"featured-dashboards-on-dune",children:"Featured Dashboards on Dune"}),"\n",(0,s.jsx)(a.p,{children:"Here you will find a variety of dashboards that help visualize data from the Polkadex parachain:"}),"\n",(0,s.jsxs)(a.ul,{children:["\n",(0,s.jsxs)(a.li,{children:[(0,s.jsx)(a.a,{href:"https://dune.com/substrate/polkadex",children:"Polkadex"}),": This dashboard provides a comprehensive view of\ntrading activities and token dynamics within the Polkadex network."]}),"\n"]}),"\n",(0,s.jsx)(a.h2,{id:"key-tables",children:"Key Tables"}),"\n",(0,s.jsx)(a.p,{children:"Data from the Polkadex parachain is organized into several key tables:"}),"\n",(0,s.jsxs)(a.ul,{children:["\n",(0,s.jsx)(a.li,{children:(0,s.jsx)(a.code,{children:"polkadex.balances"})}),"\n",(0,s.jsx)(a.li,{children:(0,s.jsx)(a.code,{children:"polkadex.blocks"})}),"\n",(0,s.jsx)(a.li,{children:(0,s.jsx)(a.code,{children:"polkadex.calls"})}),"\n",(0,s.jsx)(a.li,{children:(0,s.jsx)(a.code,{children:"polkadex.events"})}),"\n",(0,s.jsx)(a.li,{children:(0,s.jsx)(a.code,{children:"polkadex.extrinsics"})}),"\n",(0,s.jsx)(a.li,{children:(0,s.jsx)(a.code,{children:"polkadex.transfers"})}),"\n"]}),"\n",(0,s.jsxs)(a.p,{children:["Start building your own queries using granular data on Dune\n",(0,s.jsx)(a.a,{href:"https://dune.com/queries?category=canonical&namespace=polkadex",children:"here"}),"."]}),"\n",(0,s.jsx)(a.h2,{id:"useful-queries",children:"Useful Queries"}),"\n",(0,s.jsx)(a.p,{children:"Some useful queries for Polkadex are provided:"}),"\n",(0,s.jsxs)(a.table,{children:[(0,s.jsx)(a.thead,{children:(0,s.jsxs)(a.tr,{children:[(0,s.jsx)(a.th,{children:"Title"}),(0,s.jsx)(a.th,{children:"Query"}),(0,s.jsx)(a.th,{children:"Description"})]})}),(0,s.jsxs)(a.tbody,{children:[(0,s.jsxs)(a.tr,{children:[(0,s.jsx)(a.td,{children:"Polkadex MultiAssets Transfers"}),(0,s.jsx)(a.td,{children:(0,s.jsx)(a.a,{href:"https://dune.com/queries/3830615",children:"query_3830615"})}),(0,s.jsx)(a.td,{children:"Daily count of 'TransferredMultiAssets' observed on Polkadex parachain"})]}),(0,s.jsxs)(a.tr,{children:[(0,s.jsx)(a.td,{children:"Polkadex <-> AssetHub Table"}),(0,s.jsx)(a.td,{children:(0,s.jsx)(a.a,{href:"https://dune.com/queries/3824637",children:"query_3824637"})}),(0,s.jsx)(a.td,{children:"This query provides a comprehensive overview of the assets transferred between Polkadex parachain and AssetHub, including the amount, symbol, and section."})]})]})]}),"\n",(0,s.jsx)(a.h2,{id:"getting-started-with-queries",children:"Getting Started with Queries"}),"\n",(0,s.jsx)(a.p,{children:"To get started with querying data from Snowbridge, you are welcome to use the mentioned materialized\nqueries. You can use the following DuneSQL queries as examples:"}),"\n",(0,s.jsx)(a.pre,{children:(0,s.jsx)(a.code,{className:"language-sql",metastring:'title="Polkadot BridgeHub Outbound Msg Sent To Ethereum" showLineNumbers',children:"SELECT\n DATE_TRUNC('day', block_time) AS day,\n COUNT(method) AS cnt\nFROM\n polkadex.events\nWHERE\n method = 'TransferredMultiAssets'\nGROUP BY\n DATE_TRUNC('day', block_time);\n"})}),"\n",(0,s.jsx)(a.p,{children:"Query result:"}),"\n",(0,s.jsx)("iframe",{src:"https://dune.com/embeds/3830615/6442634/",height:"350",width:"100%"}),"\n",(0,s.jsx)("iframe",{src:"https://dune.com/embeds/3830615/6442645/",height:"350",width:"100%"}),"\n",(0,s.jsx)(a.admonition,{title:"DuneSQL Reference",type:"info",children:(0,s.jsxs)(a.p,{children:["For more information on DuneSQL, please refer to the ",(0,s.jsx)(a.a,{href:"/docs/general/dunesql-cheatsheet",children:"DuneSQL Cheatsheet"}),"\nand\n",(0,s.jsx)(a.a,{href:"https://docs.dune.com/query-engine/Functions-and-operators/index",children:"DuneSQL Official Documentation"}),"."]})})]})}function h(e={}){const{wrapper:a}={...(0,t.R)(),...e.components};return a?(0,s.jsx)(a,{...e,children:(0,s.jsx)(c,{...e})}):c(e)}},28453:(e,a,n)=>{n.d(a,{R:()=>r,x:()=>i});var d=n(96540);const s={},t=d.createContext(s);function r(e){const a=d.useContext(t);return d.useMemo((function(){return"function"==typeof e?e(a):{...a,...e}}),[a,e])}function i(e){let a;return a=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:r(e.components),d.createElement(t.Provider,{value:a},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/09dda9ae.1f2538b9.js b/assets/js/09dda9ae.1f2538b9.js deleted file mode 100644 index 9d0aeab73f0c..000000000000 --- a/assets/js/09dda9ae.1f2538b9.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2598],{42500:(e,a,n)=>{n.r(a),n.d(a,{assets:()=>o,contentTitle:()=>r,default:()=>h,frontMatter:()=>t,metadata:()=>i,toc:()=>l});var d=n(74848),s=n(28453);const t={id:"polkadex-dashboards",title:"Polkadex Dashboards",sidebar_label:"Polkadex",description:"Polkadex is a decentralized exchange parachain on Polkadot that combines the benefits of centralized and decentralized exchanges.",keywords:["polkadot","dashboard","dune","polkadex","decentralized exchange"],slug:"../polkadex-dashboards"},r="Polkadex Dashboards",i={id:"general/dune-analytics/parachain-dashboards/polkadex-dashboards",title:"Polkadex Dashboards",description:"Polkadex is a decentralized exchange parachain on Polkadot that combines the benefits of centralized and decentralized exchanges.",source:"@site/../docs/general/dune-analytics/parachain-dashboards/polkadex-dashboards.md",sourceDirName:"general/dune-analytics/parachain-dashboards",slug:"/general/dune-analytics/polkadex-dashboards",permalink:"/docs/general/dune-analytics/polkadex-dashboards",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/parachain-dashboards/polkadex-dashboards.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1727178265e3,frontMatter:{id:"polkadex-dashboards",title:"Polkadex Dashboards",sidebar_label:"Polkadex",description:"Polkadex is a decentralized exchange parachain on Polkadot that combines the benefits of centralized and decentralized exchanges.",keywords:["polkadot","dashboard","dune","polkadex","decentralized exchange"],slug:"../polkadex-dashboards"},sidebar:"docs",previous:{title:"Phala",permalink:"/docs/general/dune-analytics/phala-dashboards"},next:{title:"Polimec",permalink:"/docs/general/dune-analytics/polimec-dashboards"}},o={},l=[{value:"Overview",id:"overview",level:2},{value:"Featured Dashboards on Dune",id:"featured-dashboards-on-dune",level:2},{value:"Key Tables",id:"key-tables",level:2},{value:"Useful Queries",id:"useful-queries",level:2},{value:"Getting Started with Queries",id:"getting-started-with-queries",level:2}];function c(e){const a={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,s.R)(),...e.components};return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(a.header,{children:(0,d.jsx)(a.h1,{id:"polkadex-dashboards",children:"Polkadex Dashboards"})}),"\n",(0,d.jsx)(a.h2,{id:"overview",children:"Overview"}),"\n",(0,d.jsx)(a.p,{children:"Polkadex is a decentralized exchange parachain on Polkadot that combines the benefits of centralized\nand decentralized exchanges, offering a high-performance trading experience with trustless custody.\nIt aims to provide a seamless trading environment while ensuring the security of a decentralized\nplatform."}),"\n",(0,d.jsx)(a.h2,{id:"featured-dashboards-on-dune",children:"Featured Dashboards on Dune"}),"\n",(0,d.jsx)(a.p,{children:"Here you will find a variety of dashboards that help visualize data from the Polkadex parachain:"}),"\n",(0,d.jsxs)(a.ul,{children:["\n",(0,d.jsxs)(a.li,{children:[(0,d.jsx)(a.a,{href:"https://dune.com/substrate/polkadex",children:"Polkadex"}),": This dashboard provides a comprehensive view of\ntrading activities and token dynamics within the Polkadex network."]}),"\n"]}),"\n",(0,d.jsx)(a.h2,{id:"key-tables",children:"Key Tables"}),"\n",(0,d.jsx)(a.p,{children:"Data from the Polkadex parachain is organized into several key tables:"}),"\n",(0,d.jsxs)(a.ul,{children:["\n",(0,d.jsx)(a.li,{children:(0,d.jsx)(a.code,{children:"polkadex.balances"})}),"\n",(0,d.jsx)(a.li,{children:(0,d.jsx)(a.code,{children:"polkadex.blocks"})}),"\n",(0,d.jsx)(a.li,{children:(0,d.jsx)(a.code,{children:"polkadex.calls"})}),"\n",(0,d.jsx)(a.li,{children:(0,d.jsx)(a.code,{children:"polkadex.events"})}),"\n",(0,d.jsx)(a.li,{children:(0,d.jsx)(a.code,{children:"polkadex.extrinsics"})}),"\n",(0,d.jsx)(a.li,{children:(0,d.jsx)(a.code,{children:"polkadex.transfers"})}),"\n"]}),"\n",(0,d.jsxs)(a.p,{children:["Start building your own queries using granular data on Dune\n",(0,d.jsx)(a.a,{href:"https://dune.com/queries?category=canonical&namespace=polkadex",children:"here"}),"."]}),"\n",(0,d.jsx)(a.h2,{id:"useful-queries",children:"Useful Queries"}),"\n",(0,d.jsx)(a.p,{children:"Some useful queries for Polkadex are provided:"}),"\n",(0,d.jsxs)(a.table,{children:[(0,d.jsx)(a.thead,{children:(0,d.jsxs)(a.tr,{children:[(0,d.jsx)(a.th,{children:"Title"}),(0,d.jsx)(a.th,{children:"Query"}),(0,d.jsx)(a.th,{children:"Description"})]})}),(0,d.jsxs)(a.tbody,{children:[(0,d.jsxs)(a.tr,{children:[(0,d.jsx)(a.td,{children:"Polkadex MultiAssets Transfers"}),(0,d.jsx)(a.td,{children:(0,d.jsx)(a.a,{href:"https://dune.com/queries/3830615",children:"query_3830615"})}),(0,d.jsx)(a.td,{children:"Daily count of 'TransferredMultiAssets' observed on Polkadex parachain"})]}),(0,d.jsxs)(a.tr,{children:[(0,d.jsx)(a.td,{children:"Polkadex <-> AssetHub Table"}),(0,d.jsx)(a.td,{children:(0,d.jsx)(a.a,{href:"https://dune.com/queries/3824637",children:"query_3824637"})}),(0,d.jsx)(a.td,{children:"This query provides a comprehensive overview of the assets transferred between Polkadex parachain and AssetHub, including the amount, symbol, and section."})]})]})]}),"\n",(0,d.jsx)(a.h2,{id:"getting-started-with-queries",children:"Getting Started with Queries"}),"\n",(0,d.jsx)(a.p,{children:"To get started with querying data from Snowbridge, you are welcome to use the mentioned materialized\nqueries. You can use the following DuneSQL queries as examples:"}),"\n",(0,d.jsx)(a.pre,{children:(0,d.jsx)(a.code,{className:"language-sql",metastring:'title="Polkadot BridgeHub Outbound Msg Sent To Ethereum" showLineNumbers',children:"SELECT\n DATE_TRUNC('day', block_time) AS day,\n COUNT(method) AS cnt\nFROM\n polkadex.events\nWHERE\n method = 'TransferredMultiAssets'\nGROUP BY\n DATE_TRUNC('day', block_time);\n"})}),"\n",(0,d.jsx)(a.p,{children:"Query result:"}),"\n",(0,d.jsx)("iframe",{src:"https://dune.com/embeds/3830615/6442634/",height:"350",width:"100%"}),"\n",(0,d.jsx)("iframe",{src:"https://dune.com/embeds/3830615/6442645/",height:"350",width:"100%"}),"\n",(0,d.jsx)(a.admonition,{title:"DuneSQL Reference",type:"info",children:(0,d.jsxs)(a.p,{children:["For more information on DuneSQL, please refer to the ",(0,d.jsx)(a.a,{href:"/docs/general/dunesql-cheatsheet",children:"DuneSQL Cheatsheet"}),"\nand\n",(0,d.jsx)(a.a,{href:"https://docs.dune.com/query-engine/Functions-and-operators/index",children:"DuneSQL Official Documentation"}),"."]})})]})}function h(e={}){const{wrapper:a}={...(0,s.R)(),...e.components};return a?(0,d.jsx)(a,{...e,children:(0,d.jsx)(c,{...e})}):c(e)}},28453:(e,a,n)=>{n.d(a,{R:()=>r,x:()=>i});var d=n(96540);const s={},t=d.createContext(s);function r(e){const a=d.useContext(t);return d.useMemo((function(){return"function"==typeof e?e(a):{...a,...e}}),[a,e])}function i(e){let a;return a=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:r(e.components),d.createElement(t.Provider,{value:a},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/0a3f0c9b.db803b9b.js b/assets/js/0a3f0c9b.db803b9b.js new file mode 100644 index 000000000000..fbae1b772ef6 --- /dev/null +++ b/assets/js/0a3f0c9b.db803b9b.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6555],{96475:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>l,default:()=>p,frontMatter:()=>a,metadata:()=>i,toc:()=>c});const i=JSON.parse('{"id":"general/ledger","title":"Using the Polkadot Ledger Apps","description":"Use the Polkadot Ledger Application.","source":"@site/../docs/general/ledger.md","sourceDirName":"general","slug":"/ledger","permalink":"/docs/ledger","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/ledger.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1726730833000,"frontMatter":{"id":"ledger","title":"Using the Polkadot Ledger Apps","sidebar_label":"Ledger","description":"Use the Polkadot Ledger Application.","keywords":["ledger","staking","polkadot app"],"slug":"../ledger"},"sidebar":"docs","previous":{"title":"Wallets and Extensions","permalink":"/docs/wallets-and-extensions"},"next":{"title":"Polkadot Vault","permalink":"/docs/polkadot-vault"}}');var s=n(74848),o=n(28453),r=n(67141);const a={id:"ledger",title:"Using the Polkadot Ledger Apps",sidebar_label:"Ledger",description:"Use the Polkadot Ledger Application.",keywords:["ledger","staking","polkadot app"],slug:"../ledger"},l=void 0,d={},c=[{value:"Ledger Devices Compatibility",id:"ledger-devices-compatibility",level:2},{value:"Requirements",id:"requirements",level:2},{value:"Polkadot Ledger Apps",id:"polkadot-ledger-apps",level:2},{value:"Polkadot Migration App",id:"polkadot-migration-app",level:3},{value:"Polkadot (Generic) App",id:"polkadot-generic-app",level:3},{value:"Migration Process",id:"migration-process",level:2},{value:"Using Ledger Live",id:"using-ledger-live",level:2}];function h(e){const t={a:"a",admonition:"admonition",em:"em",h2:"h2",h3:"h3",hr:"hr",li:"li",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,o.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r.A,{message:"If you need help using Ledger, see [this support article](https://support.ledger.com/hc/en-us/articles/360016289919-Polkadot-DOT?docs=true). If the problem persists, you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home)."}),"\n",(0,s.jsxs)(t.p,{children:["The Polkadot ",(0,s.jsx)(t.a,{href:"https://www.ledger.com/",children:"Ledger"})," application is compatible with the Ledger Nano S,\nNano X, and Stax devices. Ledger devices are hardware wallets that keep your secret key secured on a\nphysical device that does not expose it to your computer or the internet. The private keys will not\nbe exposed even if you connect your Ledger device via USB to your computer."]}),"\n",(0,s.jsx)(t.p,{children:"Ledger devices are hierarchical deterministic wallets (HD wallets), where:"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.em,{children:"Deterministic"})," means that only one seed phrase generates all the accounts for different\nblockchain networks."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.em,{children:"Hierarchical"})," means that the accounts are generated in a tree-like structure for different\npurposes."]}),"\n"]}),"\n",(0,s.jsx)(t.h2,{id:"ledger-devices-compatibility",children:"Ledger Devices Compatibility"}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{style:{textAlign:"center"},children:"Device"}),(0,s.jsx)(t.th,{style:{textAlign:"center"},children:"Platform"}),(0,s.jsx)(t.th,{style:{textAlign:"center"},children:"Battery"}),(0,s.jsx)(t.th,{style:{textAlign:"center"},children:"Apps"}),(0,s.jsx)(t.th,{style:{textAlign:"center"},children:"Security"}),(0,s.jsx)(t.th,{style:{textAlign:"center"},children:"Status"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"Nano S"}),(0,s.jsxs)(t.td,{style:{textAlign:"center"},children:["PC",(0,s.jsx)("sup",{children:"1"})]}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"No"}),(0,s.jsxs)(t.td,{style:{textAlign:"center"},children:["All (lite, XL",(0,s.jsx)("sup",{children:"2"}),")"]}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"Certified Secure Element (CC EAL5+)"}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"Discontinued"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"Nano S Plus"}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"PC"}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"No"}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"All (lite, XL, plus)"}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"Certified Secure Element (CC EAL6+)"}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"In Production"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"Nano X"}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"PC, Mobile via bluetooth"}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"Yes"}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"All (lite, XL, plus)"}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"Certified Secure Element (CC EAL5+)"}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"In Production"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"Stax"}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"PC, Mobile via bluetooth"}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"Yes"}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"Dedicated"}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"Certified Secure Element (CC EAL6+)"}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"In Production"})]})]})]}),"\n",(0,s.jsxs)(t.p,{children:[(0,s.jsx)("sup",{children:"1"})," Because of required WebUSB support, Ledger wallets currently only work on\nChromium-based browsers like Google Chrome.",(0,s.jsx)("br",{}),(0,s.jsx)("br",{})]}),"\n",(0,s.jsxs)(t.p,{children:[(0,s.jsx)("sup",{children:"2"})," The lite version of the Polkadot Ledger App that you can install by default in the\nLedger Nano S has limited functionality. The Ledger Nano S is no longer produced and has limited\nmemory that is just right to accommodate the XL version of the Polkadot Ledger App, which gives the\nuser more functionalities.",(0,s.jsx)("br",{}),(0,s.jsx)("br",{})]}),"\n",(0,s.jsx)(t.p,{children:"If you do use a Nano S with the XL version, you will not be able to:"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:"Install any other Ledger application on your device"}),"\n",(0,s.jsx)(t.li,{children:"Add Polkadot accounts to the Ledger Live App."}),"\n"]}),"\n",(0,s.jsxs)(t.p,{children:["But you will be able to add them to ",(0,s.jsx)(t.a,{href:"/docs/wallets-and-extensions",children:"wallets and extensions"})," that\nsupport Ledger devices."]}),"\n",(0,s.jsxs)(t.p,{children:["More information on Ledger device comparisons\n",(0,s.jsx)(t.a,{href:"https://shop.ledger.com/pages/hardware-wallets-comparison",children:"here"}),"."]}),"\n",(0,s.jsx)(t.h2,{id:"requirements",children:"Requirements"}),"\n",(0,s.jsx)(t.p,{children:"Here is a list of what you will need before using Polkadot with Ledger:"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:"A Ledger Nano X, Stax, or Nano S plus (recommended for the Polkadot Ledger App space requirements\nand functionalities)."}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.a,{href:"https://www.ledger.com/ledger-live",children:"Ledger Live"})," installed and up-to-date."]}),"\n",(0,s.jsx)(t.li,{children:'The latest firmware of the Polkadot Ledger App installed (always check for updates in Ledger Live\nunder the "Manager" tab; you will need to allow access with your nano).'}),"\n",(0,s.jsx)(t.li,{children:"A Chromium-based web browser if you use a browser extension."}),"\n"]}),"\n",(0,s.jsx)(t.p,{children:"Ledger devices are tiny computers. They have an operating system (or firmware), and on top of it,\nyou can install applications. Every blockchain needs to develop its own application to use Ledger\ndevices. Make sure you have your Ledger devices with firmware and apps up-to-date."}),"\n",(0,s.jsx)(t.h2,{id:"polkadot-ledger-apps",children:"Polkadot Ledger Apps"}),"\n",(0,s.jsxs)(t.p,{children:["Ledger devices can be equipped with applications that are blockchain-specific. Third parties usually\ndevelop such applications, enabling users to transact securely on the blockchain network. Polkadot\nLedger apps are developed by ",(0,s.jsx)(t.a,{href:"https://zondax.ch/",children:"Zondax"})," and are available\n",(0,s.jsx)(t.a,{href:"https://github.com/Zondax/ledger-polkadot",children:"here"}),". The Polkadot Ledger application allows you to\nmanage Polkadot, Kusama and their parachains native tokens."]}),"\n",(0,s.jsx)(t.admonition,{title:"Ledger apps may not support all the transactions",type:"note",children:(0,s.jsxs)(t.p,{children:["Check the ",(0,s.jsx)(t.a,{href:"https://github.com/Zondax/ledger-polkadot",children:"Ledger Polkadot App"})," specification for the\nlist of transactions supported. Some transactions are supported only on a specific app version, and\nothers are not supported by any version. For instance, joining a\n",(0,s.jsx)(t.a,{href:"/docs/learn-nomination-pools",children:"nomination pool"})," is only possible with the ",(0,s.jsx)(t.strong,{children:"XL version"})," but\nnot on the ",(0,s.jsx)(t.strong,{children:"lite version"}),"."]})}),"\n",(0,s.jsx)(t.h3,{id:"polkadot-migration-app",children:"Polkadot Migration App"}),"\n",(0,s.jsx)(t.admonition,{title:"For Migration Only",type:"warning",children:(0,s.jsx)(t.p,{children:"This app is only meant for performing the migration to the Polkadot Generic App; do not use it\nfrequently. After you migrate your assets, delete the Migration app and use the Polkadot Generic\nApp."})}),"\n",(0,s.jsxs)(t.p,{children:["The Polkadot Migration app is for users having ",(0,s.jsxs)(t.strong,{children:["old Ledger accounts not on the Polkadot relay chain\nand ",(0,s.jsx)(t.a,{href:"/docs/glossary#system-parachains",children:"Polkadot System Chains"})]}),". Old Ledger accounts are accounts\nthat have been created using the old Kusama Ledger app and any parachain Ledger apps (for both\nKusama and Polkadot) except for Polkadot System Chains."]}),"\n",(0,s.jsx)(t.p,{children:"Suppose you have accounts on any Polkadot parachain, Kusama relay chain, and Kusama parachains. In\nthat case, you will need the Polkadot Migration app to move fungible and non-fungible assets (NFT),\nidentities, etc., from old Ledger accounts to a new one or an existing one created with the Polkadot\nLedger app."}),"\n",(0,s.jsx)(t.h3,{id:"polkadot-generic-app",children:"Polkadot (Generic) App"}),"\n",(0,s.jsxs)(t.p,{children:["The Polkadot Ledger Generic App will allow you to use your Ledger device on the relay chain and\nparachains without being affected by runtime upgrades. The goal is to provide a single application\nfor the entire Polkadot ecosystem without compromising security. This new app will also count with\nClear Signing, allowing you to see what you sign on a trusted display. This way, unintentionally\nsigning rogue transactions can be avoided. ",(0,s.jsx)(t.a,{href:"/docs/transaction-attacks",children:"See this page"})," to understand\nthe importance of verifying transactions before signing them."]}),"\n",(0,s.jsx)(t.p,{children:"The Polkadot Ledger Generic app brings the following benefits:"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:"Innovation Acceleration: Enabling teams to innovate and develop new features for relay chains,\nparachains, and current/future users."}),"\n",(0,s.jsx)(t.li,{children:"Network Adoption: Facilitating a smoother and more user-friendly adoption of the Polkadot\necosystem."}),"\n",(0,s.jsx)(t.li,{children:"Innovation without compromising security: The new Polkadot app comes with the highest security\nstandards so that users can keep their assets safe."}),"\n",(0,s.jsx)(t.li,{children:"Development Efficiency: The app helps developing teams save costs by having and maintaining their\napp."}),"\n"]}),"\n",(0,s.jsxs)(t.p,{children:["The Polkadot Ledger Generic app will be supported by Ledger Live,\n",(0,s.jsx)(t.a,{href:"https://novawallet.io/",children:"Nova Wallet"}),", ",(0,s.jsx)(t.a,{href:"https://www.talisman.xyz/",children:"Talisman"}),", and\n",(0,s.jsx)(t.a,{href:"https://www.subwallet.app/",children:"Subwallet"}),"."]}),"\n",(0,s.jsxs)(t.p,{children:["For more information about the Polkadot Generic App, see the\n",(0,s.jsx)(t.a,{href:"https://support.ledger.com/hc/en-us/articles/17550211746845-New-Polkadot-app-FAQ?docs=true%20:dot",children:"Ledger FAQ"}),",\nand ",(0,s.jsx)(t.a,{href:"https://substrate.beryx.io/new_polkadot_ledger_app",children:"Zondax beryx page"}),"."]}),"\n",(0,s.jsx)(t.h2,{id:"migration-process",children:"Migration Process"}),"\n",(0,s.jsx)(t.p,{children:"The migration process is not meant for Polkadot relay chain and System Chains users. Those users can\ninstall the Polkadot app and operate it as usual. For users of Kusama relay chain, Kusama System\nChains and parachains, and Polkadot parachains, see the procedure below:"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:"Install Polkadot Migration and Polkadot App."}),"\n",(0,s.jsxs)(t.li,{children:["Use a browser extension or mobile wallet that supports the new apps. No application will\nautomatically migrate your assets. You need to manually migrate your assets,\n",(0,s.jsx)(t.a,{href:"/docs/learn-identity",children:"identities"}),", ",(0,s.jsx)(t.a,{href:"/docs/learn-staking",children:"staking"}),", etc., to the\naccount controlled by the Polkadot app and sign in with the Migration app (some extensions and\nwallets UI will prompt which app you need to use to sign in depending on the chain you are in)."]}),"\n",(0,s.jsx)(t.li,{children:"When the migration process is finished, you can delete the Migration app, and everything will be\naccessible using the Polkadot Generic app."}),"\n"]}),"\n",(0,s.jsx)(t.admonition,{title:"Staking and Identities",type:"info",children:(0,s.jsx)(t.p,{children:"The migration process will also include removing identities from your old account and resetting them\nto the new one. You will also need to unstake, wait for the unbonding period, transfer the funds to\nthe new account, and stake again."})}),"\n",(0,s.jsx)(t.h2,{id:"using-ledger-live",children:"Using Ledger Live"}),"\n",(0,s.jsxs)(t.p,{children:["See\n",(0,s.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000175822-how-to-use-polkadot-and-stake-with-ledger-live",children:"this support article"}),"\nto learn how to use Polkadot with ledger live."]}),"\n",(0,s.jsx)(t.hr,{}),"\n",(0,s.jsx)(t.admonition,{title:"Polkadot-JS Guides",type:"info",children:(0,s.jsxs)(t.p,{children:["If you are an advanced user, see the\n",(0,s.jsx)(t.a,{href:"/docs/learn-guides-ledger",children:"Polkadot-JS guides about Ledger"}),"."]})})]})}function p(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}},67141:(e,t,n)=>{n.d(t,{A:()=>o});var i=n(96540),s=n(74848);const o=function(e){var t,n=e.message,o=(0,i.useState)(!0),r=o[0],a=o[1];return(0,s.jsx)(s.Fragment,{children:r&&(0,s.jsxs)("div",{className:"message-box",children:[(0,s.jsx)("button",{className:"close-button",onClick:function(){a(!1)},children:"\u2716 "}),(0,s.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(t=n,t.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},28453:(e,t,n)=>{n.d(t,{R:()=>r,x:()=>a});var i=n(96540);const s={},o=i.createContext(s);function r(e){const t=i.useContext(o);return i.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:r(e.components),i.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/0a3f0c9b.e27aad59.js b/assets/js/0a3f0c9b.e27aad59.js deleted file mode 100644 index eebfe527cc14..000000000000 --- a/assets/js/0a3f0c9b.e27aad59.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6555],{35209:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>a,default:()=>p,frontMatter:()=>r,metadata:()=>l,toc:()=>c});var i=n(74848),s=n(28453),o=n(67141);const r={id:"ledger",title:"Using the Polkadot Ledger Apps",sidebar_label:"Ledger",description:"Use the Polkadot Ledger Application.",keywords:["ledger","staking","polkadot app"],slug:"../ledger"},a=void 0,l={id:"general/ledger",title:"Using the Polkadot Ledger Apps",description:"Use the Polkadot Ledger Application.",source:"@site/../docs/general/ledger.md",sourceDirName:"general",slug:"/ledger",permalink:"/docs/ledger",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/ledger.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1726730833e3,frontMatter:{id:"ledger",title:"Using the Polkadot Ledger Apps",sidebar_label:"Ledger",description:"Use the Polkadot Ledger Application.",keywords:["ledger","staking","polkadot app"],slug:"../ledger"},sidebar:"docs",previous:{title:"Wallets and Extensions",permalink:"/docs/wallets-and-extensions"},next:{title:"Polkadot Vault",permalink:"/docs/polkadot-vault"}},d={},c=[{value:"Ledger Devices Compatibility",id:"ledger-devices-compatibility",level:2},{value:"Requirements",id:"requirements",level:2},{value:"Polkadot Ledger Apps",id:"polkadot-ledger-apps",level:2},{value:"Polkadot Migration App",id:"polkadot-migration-app",level:3},{value:"Polkadot (Generic) App",id:"polkadot-generic-app",level:3},{value:"Migration Process",id:"migration-process",level:2},{value:"Using Ledger Live",id:"using-ledger-live",level:2}];function h(e){const t={a:"a",admonition:"admonition",em:"em",h2:"h2",h3:"h3",hr:"hr",li:"li",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,s.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(o.A,{message:"If you need help using Ledger, see [this support article](https://support.ledger.com/hc/en-us/articles/360016289919-Polkadot-DOT?docs=true). If the problem persists, you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home)."}),"\n",(0,i.jsxs)(t.p,{children:["The Polkadot ",(0,i.jsx)(t.a,{href:"https://www.ledger.com/",children:"Ledger"})," application is compatible with the Ledger Nano S,\nNano X, and Stax devices. Ledger devices are hardware wallets that keep your secret key secured on a\nphysical device that does not expose it to your computer or the internet. The private keys will not\nbe exposed even if you connect your Ledger device via USB to your computer."]}),"\n",(0,i.jsx)(t.p,{children:"Ledger devices are hierarchical deterministic wallets (HD wallets), where:"}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.em,{children:"Deterministic"})," means that only one seed phrase generates all the accounts for different\nblockchain networks."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.em,{children:"Hierarchical"})," means that the accounts are generated in a tree-like structure for different\npurposes."]}),"\n"]}),"\n",(0,i.jsx)(t.h2,{id:"ledger-devices-compatibility",children:"Ledger Devices Compatibility"}),"\n",(0,i.jsxs)(t.table,{children:[(0,i.jsx)(t.thead,{children:(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.th,{style:{textAlign:"center"},children:"Device"}),(0,i.jsx)(t.th,{style:{textAlign:"center"},children:"Platform"}),(0,i.jsx)(t.th,{style:{textAlign:"center"},children:"Battery"}),(0,i.jsx)(t.th,{style:{textAlign:"center"},children:"Apps"}),(0,i.jsx)(t.th,{style:{textAlign:"center"},children:"Security"}),(0,i.jsx)(t.th,{style:{textAlign:"center"},children:"Status"})]})}),(0,i.jsxs)(t.tbody,{children:[(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"Nano S"}),(0,i.jsxs)(t.td,{style:{textAlign:"center"},children:["PC",(0,i.jsx)("sup",{children:"1"})]}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"No"}),(0,i.jsxs)(t.td,{style:{textAlign:"center"},children:["All (lite, XL",(0,i.jsx)("sup",{children:"2"}),")"]}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"Certified Secure Element (CC EAL5+)"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"Discontinued"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"Nano S Plus"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"PC"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"No"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"All (lite, XL, plus)"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"Certified Secure Element (CC EAL6+)"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"In Production"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"Nano X"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"PC, Mobile via bluetooth"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"Yes"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"All (lite, XL, plus)"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"Certified Secure Element (CC EAL5+)"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"In Production"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"Stax"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"PC, Mobile via bluetooth"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"Yes"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"Dedicated"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"Certified Secure Element (CC EAL6+)"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"In Production"})]})]})]}),"\n",(0,i.jsxs)(t.p,{children:[(0,i.jsx)("sup",{children:"1"})," Because of required WebUSB support, Ledger wallets currently only work on\nChromium-based browsers like Google Chrome.",(0,i.jsx)("br",{}),(0,i.jsx)("br",{})]}),"\n",(0,i.jsxs)(t.p,{children:[(0,i.jsx)("sup",{children:"2"})," The lite version of the Polkadot Ledger App that you can install by default in the\nLedger Nano S has limited functionality. The Ledger Nano S is no longer produced and has limited\nmemory that is just right to accommodate the XL version of the Polkadot Ledger App, which gives the\nuser more functionalities.",(0,i.jsx)("br",{}),(0,i.jsx)("br",{})]}),"\n",(0,i.jsx)(t.p,{children:"If you do use a Nano S with the XL version, you will not be able to:"}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsx)(t.li,{children:"Install any other Ledger application on your device"}),"\n",(0,i.jsx)(t.li,{children:"Add Polkadot accounts to the Ledger Live App."}),"\n"]}),"\n",(0,i.jsxs)(t.p,{children:["But you will be able to add them to ",(0,i.jsx)(t.a,{href:"/docs/wallets-and-extensions",children:"wallets and extensions"})," that\nsupport Ledger devices."]}),"\n",(0,i.jsxs)(t.p,{children:["More information on Ledger device comparisons\n",(0,i.jsx)(t.a,{href:"https://shop.ledger.com/pages/hardware-wallets-comparison",children:"here"}),"."]}),"\n",(0,i.jsx)(t.h2,{id:"requirements",children:"Requirements"}),"\n",(0,i.jsx)(t.p,{children:"Here is a list of what you will need before using Polkadot with Ledger:"}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsx)(t.li,{children:"A Ledger Nano X, Stax, or Nano S plus (recommended for the Polkadot Ledger App space requirements\nand functionalities)."}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://www.ledger.com/ledger-live",children:"Ledger Live"})," installed and up-to-date."]}),"\n",(0,i.jsx)(t.li,{children:'The latest firmware of the Polkadot Ledger App installed (always check for updates in Ledger Live\nunder the "Manager" tab; you will need to allow access with your nano).'}),"\n",(0,i.jsx)(t.li,{children:"A Chromium-based web browser if you use a browser extension."}),"\n"]}),"\n",(0,i.jsx)(t.p,{children:"Ledger devices are tiny computers. They have an operating system (or firmware), and on top of it,\nyou can install applications. Every blockchain needs to develop its own application to use Ledger\ndevices. Make sure you have your Ledger devices with firmware and apps up-to-date."}),"\n",(0,i.jsx)(t.h2,{id:"polkadot-ledger-apps",children:"Polkadot Ledger Apps"}),"\n",(0,i.jsxs)(t.p,{children:["Ledger devices can be equipped with applications that are blockchain-specific. Third parties usually\ndevelop such applications, enabling users to transact securely on the blockchain network. Polkadot\nLedger apps are developed by ",(0,i.jsx)(t.a,{href:"https://zondax.ch/",children:"Zondax"})," and are available\n",(0,i.jsx)(t.a,{href:"https://github.com/Zondax/ledger-polkadot",children:"here"}),". The Polkadot Ledger application allows you to\nmanage Polkadot, Kusama and their parachains native tokens."]}),"\n",(0,i.jsx)(t.admonition,{title:"Ledger apps may not support all the transactions",type:"note",children:(0,i.jsxs)(t.p,{children:["Check the ",(0,i.jsx)(t.a,{href:"https://github.com/Zondax/ledger-polkadot",children:"Ledger Polkadot App"})," specification for the\nlist of transactions supported. Some transactions are supported only on a specific app version, and\nothers are not supported by any version. For instance, joining a\n",(0,i.jsx)(t.a,{href:"/docs/learn-nomination-pools",children:"nomination pool"})," is only possible with the ",(0,i.jsx)(t.strong,{children:"XL version"})," but\nnot on the ",(0,i.jsx)(t.strong,{children:"lite version"}),"."]})}),"\n",(0,i.jsx)(t.h3,{id:"polkadot-migration-app",children:"Polkadot Migration App"}),"\n",(0,i.jsx)(t.admonition,{title:"For Migration Only",type:"warning",children:(0,i.jsx)(t.p,{children:"This app is only meant for performing the migration to the Polkadot Generic App; do not use it\nfrequently. After you migrate your assets, delete the Migration app and use the Polkadot Generic\nApp."})}),"\n",(0,i.jsxs)(t.p,{children:["The Polkadot Migration app is for users having ",(0,i.jsxs)(t.strong,{children:["old Ledger accounts not on the Polkadot relay chain\nand ",(0,i.jsx)(t.a,{href:"/docs/glossary#system-parachains",children:"Polkadot System Chains"})]}),". Old Ledger accounts are accounts\nthat have been created using the old Kusama Ledger app and any parachain Ledger apps (for both\nKusama and Polkadot) except for Polkadot System Chains."]}),"\n",(0,i.jsx)(t.p,{children:"Suppose you have accounts on any Polkadot parachain, Kusama relay chain, and Kusama parachains. In\nthat case, you will need the Polkadot Migration app to move fungible and non-fungible assets (NFT),\nidentities, etc., from old Ledger accounts to a new one or an existing one created with the Polkadot\nLedger app."}),"\n",(0,i.jsx)(t.h3,{id:"polkadot-generic-app",children:"Polkadot (Generic) App"}),"\n",(0,i.jsxs)(t.p,{children:["The Polkadot Ledger Generic App will allow you to use your Ledger device on the relay chain and\nparachains without being affected by runtime upgrades. The goal is to provide a single application\nfor the entire Polkadot ecosystem without compromising security. This new app will also count with\nClear Signing, allowing you to see what you sign on a trusted display. This way, unintentionally\nsigning rogue transactions can be avoided. ",(0,i.jsx)(t.a,{href:"/docs/transaction-attacks",children:"See this page"})," to understand\nthe importance of verifying transactions before signing them."]}),"\n",(0,i.jsx)(t.p,{children:"The Polkadot Ledger Generic app brings the following benefits:"}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsx)(t.li,{children:"Innovation Acceleration: Enabling teams to innovate and develop new features for relay chains,\nparachains, and current/future users."}),"\n",(0,i.jsx)(t.li,{children:"Network Adoption: Facilitating a smoother and more user-friendly adoption of the Polkadot\necosystem."}),"\n",(0,i.jsx)(t.li,{children:"Innovation without compromising security: The new Polkadot app comes with the highest security\nstandards so that users can keep their assets safe."}),"\n",(0,i.jsx)(t.li,{children:"Development Efficiency: The app helps developing teams save costs by having and maintaining their\napp."}),"\n"]}),"\n",(0,i.jsxs)(t.p,{children:["The Polkadot Ledger Generic app will be supported by Ledger Live,\n",(0,i.jsx)(t.a,{href:"https://novawallet.io/",children:"Nova Wallet"}),", ",(0,i.jsx)(t.a,{href:"https://www.talisman.xyz/",children:"Talisman"}),", and\n",(0,i.jsx)(t.a,{href:"https://www.subwallet.app/",children:"Subwallet"}),"."]}),"\n",(0,i.jsxs)(t.p,{children:["For more information about the Polkadot Generic App, see the\n",(0,i.jsx)(t.a,{href:"https://support.ledger.com/hc/en-us/articles/17550211746845-New-Polkadot-app-FAQ?docs=true%20:dot",children:"Ledger FAQ"}),",\nand ",(0,i.jsx)(t.a,{href:"https://substrate.beryx.io/new_polkadot_ledger_app",children:"Zondax beryx page"}),"."]}),"\n",(0,i.jsx)(t.h2,{id:"migration-process",children:"Migration Process"}),"\n",(0,i.jsx)(t.p,{children:"The migration process is not meant for Polkadot relay chain and System Chains users. Those users can\ninstall the Polkadot app and operate it as usual. For users of Kusama relay chain, Kusama System\nChains and parachains, and Polkadot parachains, see the procedure below:"}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsx)(t.li,{children:"Install Polkadot Migration and Polkadot App."}),"\n",(0,i.jsxs)(t.li,{children:["Use a browser extension or mobile wallet that supports the new apps. No application will\nautomatically migrate your assets. You need to manually migrate your assets,\n",(0,i.jsx)(t.a,{href:"/docs/learn-identity",children:"identities"}),", ",(0,i.jsx)(t.a,{href:"/docs/learn-staking",children:"staking"}),", etc., to the\naccount controlled by the Polkadot app and sign in with the Migration app (some extensions and\nwallets UI will prompt which app you need to use to sign in depending on the chain you are in)."]}),"\n",(0,i.jsx)(t.li,{children:"When the migration process is finished, you can delete the Migration app, and everything will be\naccessible using the Polkadot Generic app."}),"\n"]}),"\n",(0,i.jsx)(t.admonition,{title:"Staking and Identities",type:"info",children:(0,i.jsx)(t.p,{children:"The migration process will also include removing identities from your old account and resetting them\nto the new one. You will also need to unstake, wait for the unbonding period, transfer the funds to\nthe new account, and stake again."})}),"\n",(0,i.jsx)(t.h2,{id:"using-ledger-live",children:"Using Ledger Live"}),"\n",(0,i.jsxs)(t.p,{children:["See\n",(0,i.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000175822-how-to-use-polkadot-and-stake-with-ledger-live",children:"this support article"}),"\nto learn how to use Polkadot with ledger live."]}),"\n",(0,i.jsx)(t.hr,{}),"\n",(0,i.jsx)(t.admonition,{title:"Polkadot-JS Guides",type:"info",children:(0,i.jsxs)(t.p,{children:["If you are an advanced user, see the\n",(0,i.jsx)(t.a,{href:"/docs/learn-guides-ledger",children:"Polkadot-JS guides about Ledger"}),"."]})})]})}function p(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(h,{...e})}):h(e)}},67141:(e,t,n)=>{n.d(t,{A:()=>o});var i=n(96540),s=n(74848);const o=function(e){var t,n=e.message,o=(0,i.useState)(!0),r=o[0],a=o[1];return(0,s.jsx)(s.Fragment,{children:r&&(0,s.jsxs)("div",{className:"message-box",children:[(0,s.jsx)("button",{className:"close-button",onClick:function(){a(!1)},children:"\u2716 "}),(0,s.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(t=n,t.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},28453:(e,t,n)=>{n.d(t,{R:()=>r,x:()=>a});var i=n(96540);const s={},o=i.createContext(s);function r(e){const t=i.useContext(o);return i.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:r(e.components),i.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/0b632434.331eaeb0.js b/assets/js/0b632434.331eaeb0.js deleted file mode 100644 index 73b27feb23f7..000000000000 --- a/assets/js/0b632434.331eaeb0.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4739],{56705:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>o,default:()=>p,frontMatter:()=>s,metadata:()=>r,toc:()=>d});var a=t(74848),i=t(28453);const s={id:"parachains-apps",title:"Polkadot Parachain Apps",sidebar_label:"Parachain Apps",description:"Polkadot's Parachain Apps.",keywords:["parachains","apps","staking","liquid staking"],slug:"../parachains-apps"},o=void 0,r={id:"general/parachains-apps",title:"Polkadot Parachain Apps",description:"Polkadot's Parachain Apps.",source:"@site/../docs/general/parachains-apps.md",sourceDirName:"general",slug:"/parachains-apps",permalink:"/docs/parachains-apps",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/parachains-apps.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1727943421e3,frontMatter:{id:"parachains-apps",title:"Polkadot Parachain Apps",sidebar_label:"Parachain Apps",description:"Polkadot's Parachain Apps.",keywords:["parachains","apps","staking","liquid staking"],slug:"../parachains-apps"},sidebar:"docs",previous:{title:"NFT Projects",permalink:"/docs/learn-nft-projects"},next:{title:"Dashboards",permalink:"/docs/dashboards-index"}},l={},d=[{value:"Astar Network",id:"astar-network",level:2},{value:"Astar Portal",id:"astar-portal",level:3},{value:"Astar dApps",id:"astar-dapps",level:3},{value:"Bifrost Finance",id:"bifrost-finance",level:2},{value:"Bifrost dApp",id:"bifrost-dapp",level:3}];function c(e){const n={a:"a",admonition:"admonition",h2:"h2",h3:"h3",li:"li",p:"p",ul:"ul",...(0,i.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.admonition,{title:"Polkadot dApps",type:"tip",children:(0,a.jsxs)(n.p,{children:["Join the global Web3 movement \u2013 be among the first to try out innovative dapps running on Polkadot.\nYou can browse the list of dApps on\n",(0,a.jsx)(n.a,{href:"https://polkadot.network/ecosystem/dapps/",children:"the official Polkadot website"}),". This page also features\na form that can be submitted to showcase dApps that are not already listed."]})}),"\n",(0,a.jsx)(n.admonition,{title:"Community Page",type:"info",children:(0,a.jsxs)(n.p,{children:["It is recommended to have the parachain apps added to\n",(0,a.jsx)(n.a,{href:"https://polkadot.network/ecosystem/dapps/",children:"the official Polkadot website"})," and then use this page to\nelaborate their key features to the Pokadot Wiki readers. This page is open to contributions from\nthe community. Please follow the\n",(0,a.jsx)(n.a,{href:"https://github.com/w3f/polkadot-wiki#contributing-to-documentation",children:"Wiki contribution guidelines"}),"\nand add your parachain app to this page."]})}),"\n",(0,a.jsx)(n.h2,{id:"astar-network",children:"Astar Network"}),"\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.a,{href:"https://astar.network/",children:"Astar"})," is an interoperable smart contracts platform for Polkadot and\nEthereum ecosystems supporting both Wasm and EVM smart contracts. Astar provides native access to\nPolkadot and Ethereum through its Polkadot parachain and Layer 2 scaling solution, while also\noffering bridges into other major blockchain ecosystems."]}),"\n",(0,a.jsxs)(n.p,{children:["Through the ",(0,a.jsx)(n.a,{href:"https://docs.astar.network/docs/build/dapp-staking/",children:"dApp staking"}),", Astar offers a\nbasic income to dApp developers, which allows them to continue building and enhancing their dApps\nwithout a pressing need to apply for grant programs, issue tokens and fundraise to earn money. At\nevery block, a portion of the rewards goes to dApp staking and is then divided between operators\n(developers) and nominators. As a dApp grows in popularity, more members of the community nominate\nthe dApp, and this, in turn, enables the developers who built the dApp to receive a greater\npercentage of the block reward."]}),"\n",(0,a.jsx)(n.h3,{id:"astar-portal",children:"Astar Portal"}),"\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.a,{href:"https://portal.astar.network/",children:"Astar Portal"})," is a one-stop-place for interaction with Astar\necosystem, and an exclusive platform for Astar\n",(0,a.jsx)(n.a,{href:"https://docs.astar.network/docs/build/dapp-staking/",children:"dApp staking"})," \u2014 users can\n",(0,a.jsx)(n.a,{href:"https://docs.astar.network/docs/build/dapp-staking/for-stakers/staking/",children:"nominate"})," their\nAstar/Shiden tokens on specific dApps they wish to support and get a portion of the rewards\ndistributed at every block. Portal also allows unbonding, rewards compounding and nomination\ntransfer."]}),"\n",(0,a.jsx)(n.p,{children:"Astar Portal supports Polkadot native accounts (Polkadot.js, Talisman, SubWallet, Clover, Math\nWallet, Hana Wallet, OneKey), Multisig accounts (PolkaSafe) and EVM accounts (MetaMask, Talisman,\nSubWallet, Hana Wallet, OneKey)."}),"\n",(0,a.jsx)(n.h3,{id:"astar-dapps",children:"Astar dApps"}),"\n",(0,a.jsx)(n.p,{children:"Astar Network allows developers to use and build smart contracts in ways they never have before,\nleading to the realization of truly innovative solutions that can't be replicated in any other\nenvironment."}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"https://app.arthswap.org/#/swap",children:"ArthSwap"})}),"\n"]}),"\n",(0,a.jsx)(n.p,{children:"ArthSwap is a one-stop DeFi protocol that aspires to be the main DEX on the Astar Network. The\nprimary products are trading, staking, IDO launchpad, and liquidity farming, with other capabilities\nto be consistently added."}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"https://www.algem.io/",children:"Algem"})}),"\n"]}),"\n",(0,a.jsx)(n.p,{children:"Algem is a native liquid staking DeFi dApp on top of Astar Network, offering new ways for ASTR users\nand holders to earn more. It empowers users to increase their earnings potential by staking while\nyield farming."}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"https://astriddao.xyz/",children:"AstridDao"})}),"\n"]}),"\n",(0,a.jsx)(n.p,{children:"AstridDAO aims to be the leading decentralized money market protocol and the dominant stablecoin,\n$BAI, in the Astar/Polkadot ecosystem. AstridDAO is a decentralized borrowing protocol that allows\nusers to draw interest-free loans against multiple collateral assets (e.g., ASTR, ETH, BTC)."}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"https://starlay.finance/",children:"Starlay Finance"})}),"\n"]}),"\n",(0,a.jsx)(n.p,{children:"Starlay Finance is a protocol for users to quickly and easily deposit and borrow assets on Astar\nNetwork. In other words, users can do \u201cLow Risk Farming on Astar Network\u201d. Depositors can provide\nliquidity to earn interest as a stable passive income, while borrowers can leverage their assets\nwithout selling them out."}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"https://dex.zenlink.pro/#/swap",children:"Zenlink"})}),"\n"]}),"\n",(0,a.jsx)(n.p,{children:"Zenlink is an underlying cross-chain DEX protocol. By accessing the ultimate, open and universal\ncross-chain DEX protocol based on Substrate, Zenlink DEX Protocol enables all parachains to build\nDEX and achieve liquidity sharing in one click."}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"https://xy.finance/",children:"XY Finance"})}),"\n"]}),"\n",(0,a.jsx)(n.p,{children:"XY Finance is a cross-chain interoperability protocol aggregating DEXs & Bridges. Based on the data\nfrom DeFi Llama, XY Finance is the top bridge protocol on Astar, opening gateways to users who have\nyet to experience Astar\u2019s ecosystem."}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"https://www.sio2.finance/",children:"SiO2 Finance"})}),"\n"]}),"\n",(0,a.jsx)(n.p,{children:"SiO2 Finance is the Multi-VM Lending Hub on Astar for Polkadot, that supports both EVM and WASM.\nSiO2 Finance is the built of the community, by the community, for the community."}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"https://tofunft.com/",children:"tofuNFT"})}),"\n"]}),"\n",(0,a.jsx)(n.p,{children:"tofuNFT is a permissionless, decentralized and full-featured NFT marketplace, providing numerous\ncreative improvements to the existing marketplace experience like incentivized bidding, real-time\nnotification, attributes filtering, bulk listing, and rarity explorer."}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"https://bluez.app/",children:"Bluez NFT Marketplace"})}),"\n"]}),"\n",(0,a.jsx)(n.p,{children:"Bluez is a distinctive NFT marketplace that empowers users to create, purchase, and sell NFTs with\nthe power of XVM (Cross Virtual Machine). This community-driven platform offers a versatile and\nadaptable approach to NFT trading, enabling users to harness the benefits of both EVM and WASM for\ngreater flexibility and convenience."}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"https://www.cosmize.io/",children:"Cosmize"})}),"\n"]}),"\n",(0,a.jsx)(n.p,{children:"In Cosmize everybody can create and customize their own cosmic imagination. This platform allows for\ncreating community activities, events, quests, and more. It is a place for making imagination become\nreality, to embrace the spirit of decentralization through community-driven activities."}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"https://heal3.com/",children:"HEALTHREE"})}),"\n"]}),"\n",(0,a.jsx)(n.p,{children:"HEALTHREE platform allows users to earn unique tokens ($UHT: Utility Health Token / $GHT: Governance\nHealth Token) by engaging in ongoing healthy activities, especially diet, exercise, and sleep. In\naddition, users can earn additional tokens and rewards through gamification."}),"\n",(0,a.jsxs)(n.p,{children:["Discover more Astar dApps on\n",(0,a.jsx)(n.a,{href:"https://portal.astar.network/astar/dapp-staking/discover",children:"Astar Portal"}),"."]}),"\n",(0,a.jsx)(n.h2,{id:"bifrost-finance",children:"Bifrost Finance"}),"\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.a,{href:"https://bifrost.finance/",children:"Bifrost "}),"is a dedicated liquid staking middle layer built on Substrate,\npowered by Polkadot, providing non-custodial decentralized cross-chain liquid tokens for staked\nassets. By leveraging Polkadot\u2019s cross-consensus message format (XCM), Bifrost provides standardized\ncross-chain liquid staking solutions for multiple chains currently Polkadot (vDOT), Kusama (vKSM),\nMoonbeam (vGLMR), Moonriver (vMOVR) and other chains notably vASTR (Astar) and vFIL (Filecoin)."]}),"\n",(0,a.jsxs)(n.p,{children:["Through Bifrost Staking Liquidity Protocol\n(",(0,a.jsx)(n.a,{href:"https://bifrost-finance.medium.com/why-bifrost-slp-is-the-good-choice-for-decentralized-liquid-staking-ceb90091ef41",children:"SLP"}),"),\nBifost facilitates the issuance and deployment of liquid staked assets (\u201cvTokens' '), allowing users\nto earn staking rewards while retaining their governance rights and participating in DeFi, such as\nliquidity provisioning on DEXs, providing collateral on lending/borrowing protocols and for\nstablecoin issuance as well as restaking for securing decentralized solutions. Bifrost vTokens are\nreward-bearing liquid staking tokens representing the users staked asset, including returns from\nstaking. As staking rewards are received, vTokens increase in value without changing the quantity of\ntokens."]}),"\n",(0,a.jsx)(n.p,{children:"Bifrost aims to offer seamless staking and DeFi experience for Proof of Stake (PoS) users and enable\ndevelopers to build innovative applications around Bifrosts\u2019 liquid staking tokens."}),"\n",(0,a.jsx)(n.h3,{id:"bifrost-dapp",children:"Bifrost dApp"}),"\n",(0,a.jsxs)(n.p,{children:["Bifrost recent development of\n",(0,a.jsx)(n.a,{href:"https://bifrost-finance.medium.com/slpx-pallet-a-further-step-into-the-omni-chain-liquid-staking-68cb4d99c82f",children:"SLPx"}),",\nis an extension pallet to Bifrost SLP that will allow users to invoke SLP's functionality on a\nremote chain without crossing assets into the Bifrost chain, allowing users to mint, redeem, swap\nvTokens remotely on the target chain. Leveraging this, developers can use and build innovative\nsolutions around chain abstraction and solving liquidity and user fragmentation challenges."]}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"https://omni.ls/",children:"Omni LS"})}),"\n"]}),"\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.a,{href:"https://bifrost-finance.medium.com/omni-ls-dapp-the-easiest-fastest-and-most-secure-way-to-access-bifrost-liquid-staking-tokens-21ee080b03cd",children:"Omni LS DApp"}),"\nis a front-end application that supports remote minting and redemption of Bifrost liquid staking\ntokens (LST) \u201cvTokens\u201d, as well as remote exchange, and swapping of vTokens from any chain. The DApp\naims to simplify the cross-chain experience by providing a seamless interface for users to interact\nwith vTokens across different chains natively."]})]})}function p(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(c,{...e})}):c(e)}},28453:(e,n,t)=>{t.d(n,{R:()=>o,x:()=>r});var a=t(96540);const i={},s=a.createContext(i);function o(e){const n=a.useContext(s);return a.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:o(e.components),a.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/0b632434.f6b87d7c.js b/assets/js/0b632434.f6b87d7c.js new file mode 100644 index 000000000000..9b93156ba4ad --- /dev/null +++ b/assets/js/0b632434.f6b87d7c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4739],{69188:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>r,default:()=>p,frontMatter:()=>o,metadata:()=>a,toc:()=>d});const a=JSON.parse('{"id":"general/parachains-apps","title":"Polkadot Parachain Apps","description":"Polkadot\'s Parachain Apps.","source":"@site/../docs/general/parachains-apps.md","sourceDirName":"general","slug":"/parachains-apps","permalink":"/docs/parachains-apps","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/parachains-apps.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1727943421000,"frontMatter":{"id":"parachains-apps","title":"Polkadot Parachain Apps","sidebar_label":"Parachain Apps","description":"Polkadot\'s Parachain Apps.","keywords":["parachains","apps","staking","liquid staking"],"slug":"../parachains-apps"},"sidebar":"docs","previous":{"title":"NFT Projects","permalink":"/docs/learn-nft-projects"},"next":{"title":"Dashboards","permalink":"/docs/dashboards-index"}}');var i=t(74848),s=t(28453);const o={id:"parachains-apps",title:"Polkadot Parachain Apps",sidebar_label:"Parachain Apps",description:"Polkadot's Parachain Apps.",keywords:["parachains","apps","staking","liquid staking"],slug:"../parachains-apps"},r=void 0,l={},d=[{value:"Astar Network",id:"astar-network",level:2},{value:"Astar Portal",id:"astar-portal",level:3},{value:"Astar dApps",id:"astar-dapps",level:3},{value:"Bifrost Finance",id:"bifrost-finance",level:2},{value:"Bifrost dApp",id:"bifrost-dapp",level:3}];function c(e){const n={a:"a",admonition:"admonition",h2:"h2",h3:"h3",li:"li",p:"p",ul:"ul",...(0,s.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.admonition,{title:"Polkadot dApps",type:"tip",children:(0,i.jsxs)(n.p,{children:["Join the global Web3 movement \u2013 be among the first to try out innovative dapps running on Polkadot.\nYou can browse the list of dApps on\n",(0,i.jsx)(n.a,{href:"https://polkadot.network/ecosystem/dapps/",children:"the official Polkadot website"}),". This page also features\na form that can be submitted to showcase dApps that are not already listed."]})}),"\n",(0,i.jsx)(n.admonition,{title:"Community Page",type:"info",children:(0,i.jsxs)(n.p,{children:["It is recommended to have the parachain apps added to\n",(0,i.jsx)(n.a,{href:"https://polkadot.network/ecosystem/dapps/",children:"the official Polkadot website"})," and then use this page to\nelaborate their key features to the Pokadot Wiki readers. This page is open to contributions from\nthe community. Please follow the\n",(0,i.jsx)(n.a,{href:"https://github.com/w3f/polkadot-wiki#contributing-to-documentation",children:"Wiki contribution guidelines"}),"\nand add your parachain app to this page."]})}),"\n",(0,i.jsx)(n.h2,{id:"astar-network",children:"Astar Network"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.a,{href:"https://astar.network/",children:"Astar"})," is an interoperable smart contracts platform for Polkadot and\nEthereum ecosystems supporting both Wasm and EVM smart contracts. Astar provides native access to\nPolkadot and Ethereum through its Polkadot parachain and Layer 2 scaling solution, while also\noffering bridges into other major blockchain ecosystems."]}),"\n",(0,i.jsxs)(n.p,{children:["Through the ",(0,i.jsx)(n.a,{href:"https://docs.astar.network/docs/build/dapp-staking/",children:"dApp staking"}),", Astar offers a\nbasic income to dApp developers, which allows them to continue building and enhancing their dApps\nwithout a pressing need to apply for grant programs, issue tokens and fundraise to earn money. At\nevery block, a portion of the rewards goes to dApp staking and is then divided between operators\n(developers) and nominators. As a dApp grows in popularity, more members of the community nominate\nthe dApp, and this, in turn, enables the developers who built the dApp to receive a greater\npercentage of the block reward."]}),"\n",(0,i.jsx)(n.h3,{id:"astar-portal",children:"Astar Portal"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.a,{href:"https://portal.astar.network/",children:"Astar Portal"})," is a one-stop-place for interaction with Astar\necosystem, and an exclusive platform for Astar\n",(0,i.jsx)(n.a,{href:"https://docs.astar.network/docs/build/dapp-staking/",children:"dApp staking"})," \u2014 users can\n",(0,i.jsx)(n.a,{href:"https://docs.astar.network/docs/build/dapp-staking/for-stakers/staking/",children:"nominate"})," their\nAstar/Shiden tokens on specific dApps they wish to support and get a portion of the rewards\ndistributed at every block. Portal also allows unbonding, rewards compounding and nomination\ntransfer."]}),"\n",(0,i.jsx)(n.p,{children:"Astar Portal supports Polkadot native accounts (Polkadot.js, Talisman, SubWallet, Clover, Math\nWallet, Hana Wallet, OneKey), Multisig accounts (PolkaSafe) and EVM accounts (MetaMask, Talisman,\nSubWallet, Hana Wallet, OneKey)."}),"\n",(0,i.jsx)(n.h3,{id:"astar-dapps",children:"Astar dApps"}),"\n",(0,i.jsx)(n.p,{children:"Astar Network allows developers to use and build smart contracts in ways they never have before,\nleading to the realization of truly innovative solutions that can't be replicated in any other\nenvironment."}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://app.arthswap.org/#/swap",children:"ArthSwap"})}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"ArthSwap is a one-stop DeFi protocol that aspires to be the main DEX on the Astar Network. The\nprimary products are trading, staking, IDO launchpad, and liquidity farming, with other capabilities\nto be consistently added."}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://www.algem.io/",children:"Algem"})}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"Algem is a native liquid staking DeFi dApp on top of Astar Network, offering new ways for ASTR users\nand holders to earn more. It empowers users to increase their earnings potential by staking while\nyield farming."}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://astriddao.xyz/",children:"AstridDao"})}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"AstridDAO aims to be the leading decentralized money market protocol and the dominant stablecoin,\n$BAI, in the Astar/Polkadot ecosystem. AstridDAO is a decentralized borrowing protocol that allows\nusers to draw interest-free loans against multiple collateral assets (e.g., ASTR, ETH, BTC)."}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://starlay.finance/",children:"Starlay Finance"})}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"Starlay Finance is a protocol for users to quickly and easily deposit and borrow assets on Astar\nNetwork. In other words, users can do \u201cLow Risk Farming on Astar Network\u201d. Depositors can provide\nliquidity to earn interest as a stable passive income, while borrowers can leverage their assets\nwithout selling them out."}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://dex.zenlink.pro/#/swap",children:"Zenlink"})}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"Zenlink is an underlying cross-chain DEX protocol. By accessing the ultimate, open and universal\ncross-chain DEX protocol based on Substrate, Zenlink DEX Protocol enables all parachains to build\nDEX and achieve liquidity sharing in one click."}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://xy.finance/",children:"XY Finance"})}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"XY Finance is a cross-chain interoperability protocol aggregating DEXs & Bridges. Based on the data\nfrom DeFi Llama, XY Finance is the top bridge protocol on Astar, opening gateways to users who have\nyet to experience Astar\u2019s ecosystem."}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://www.sio2.finance/",children:"SiO2 Finance"})}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"SiO2 Finance is the Multi-VM Lending Hub on Astar for Polkadot, that supports both EVM and WASM.\nSiO2 Finance is the built of the community, by the community, for the community."}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://tofunft.com/",children:"tofuNFT"})}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"tofuNFT is a permissionless, decentralized and full-featured NFT marketplace, providing numerous\ncreative improvements to the existing marketplace experience like incentivized bidding, real-time\nnotification, attributes filtering, bulk listing, and rarity explorer."}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://bluez.app/",children:"Bluez NFT Marketplace"})}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"Bluez is a distinctive NFT marketplace that empowers users to create, purchase, and sell NFTs with\nthe power of XVM (Cross Virtual Machine). This community-driven platform offers a versatile and\nadaptable approach to NFT trading, enabling users to harness the benefits of both EVM and WASM for\ngreater flexibility and convenience."}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://www.cosmize.io/",children:"Cosmize"})}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"In Cosmize everybody can create and customize their own cosmic imagination. This platform allows for\ncreating community activities, events, quests, and more. It is a place for making imagination become\nreality, to embrace the spirit of decentralization through community-driven activities."}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://heal3.com/",children:"HEALTHREE"})}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"HEALTHREE platform allows users to earn unique tokens ($UHT: Utility Health Token / $GHT: Governance\nHealth Token) by engaging in ongoing healthy activities, especially diet, exercise, and sleep. In\naddition, users can earn additional tokens and rewards through gamification."}),"\n",(0,i.jsxs)(n.p,{children:["Discover more Astar dApps on\n",(0,i.jsx)(n.a,{href:"https://portal.astar.network/astar/dapp-staking/discover",children:"Astar Portal"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"bifrost-finance",children:"Bifrost Finance"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.a,{href:"https://bifrost.finance/",children:"Bifrost "}),"is a dedicated liquid staking middle layer built on Substrate,\npowered by Polkadot, providing non-custodial decentralized cross-chain liquid tokens for staked\nassets. By leveraging Polkadot\u2019s cross-consensus message format (XCM), Bifrost provides standardized\ncross-chain liquid staking solutions for multiple chains currently Polkadot (vDOT), Kusama (vKSM),\nMoonbeam (vGLMR), Moonriver (vMOVR) and other chains notably vASTR (Astar) and vFIL (Filecoin)."]}),"\n",(0,i.jsxs)(n.p,{children:["Through Bifrost Staking Liquidity Protocol\n(",(0,i.jsx)(n.a,{href:"https://bifrost-finance.medium.com/why-bifrost-slp-is-the-good-choice-for-decentralized-liquid-staking-ceb90091ef41",children:"SLP"}),"),\nBifost facilitates the issuance and deployment of liquid staked assets (\u201cvTokens' '), allowing users\nto earn staking rewards while retaining their governance rights and participating in DeFi, such as\nliquidity provisioning on DEXs, providing collateral on lending/borrowing protocols and for\nstablecoin issuance as well as restaking for securing decentralized solutions. Bifrost vTokens are\nreward-bearing liquid staking tokens representing the users staked asset, including returns from\nstaking. As staking rewards are received, vTokens increase in value without changing the quantity of\ntokens."]}),"\n",(0,i.jsx)(n.p,{children:"Bifrost aims to offer seamless staking and DeFi experience for Proof of Stake (PoS) users and enable\ndevelopers to build innovative applications around Bifrosts\u2019 liquid staking tokens."}),"\n",(0,i.jsx)(n.h3,{id:"bifrost-dapp",children:"Bifrost dApp"}),"\n",(0,i.jsxs)(n.p,{children:["Bifrost recent development of\n",(0,i.jsx)(n.a,{href:"https://bifrost-finance.medium.com/slpx-pallet-a-further-step-into-the-omni-chain-liquid-staking-68cb4d99c82f",children:"SLPx"}),",\nis an extension pallet to Bifrost SLP that will allow users to invoke SLP's functionality on a\nremote chain without crossing assets into the Bifrost chain, allowing users to mint, redeem, swap\nvTokens remotely on the target chain. Leveraging this, developers can use and build innovative\nsolutions around chain abstraction and solving liquidity and user fragmentation challenges."]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://omni.ls/",children:"Omni LS"})}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.a,{href:"https://bifrost-finance.medium.com/omni-ls-dapp-the-easiest-fastest-and-most-secure-way-to-access-bifrost-liquid-staking-tokens-21ee080b03cd",children:"Omni LS DApp"}),"\nis a front-end application that supports remote minting and redemption of Bifrost liquid staking\ntokens (LST) \u201cvTokens\u201d, as well as remote exchange, and swapping of vTokens from any chain. The DApp\naims to simplify the cross-chain experience by providing a seamless interface for users to interact\nwith vTokens across different chains natively."]})]})}function p(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(c,{...e})}):c(e)}},28453:(e,n,t)=>{t.d(n,{R:()=>o,x:()=>r});var a=t(96540);const i={},s=a.createContext(i);function o(e){const n=a.useContext(s);return a.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:o(e.components),a.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/0df78d26.0d09aba0.js b/assets/js/0df78d26.0d09aba0.js deleted file mode 100644 index c74bde53f7d6..000000000000 --- a/assets/js/0df78d26.0d09aba0.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[782],{87145:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>l,contentTitle:()=>r,default:()=>h,frontMatter:()=>a,metadata:()=>o,toc:()=>d});var s=i(74848),t=i(28453);const a={id:"maintain-guides-secure-validator",title:"Secure Validator",sidebar_label:"Secure Validator",description:"Tips for running a secure validator.",keywords:["secure validator","validator","configuration"],slug:"../maintain-guides-secure-validator"},r=void 0,o={id:"maintain/maintain-guides-secure-validator",title:"Secure Validator",description:"Tips for running a secure validator.",source:"@site/../docs/maintain/maintain-guides-secure-validator.md",sourceDirName:"maintain",slug:"/maintain-guides-secure-validator",permalink:"/docs/maintain-guides-secure-validator",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/maintain/maintain-guides-secure-validator.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1718028821e3,frontMatter:{id:"maintain-guides-secure-validator",title:"Secure Validator",sidebar_label:"Secure Validator",description:"Tips for running a secure validator.",keywords:["secure validator","validator","configuration"],slug:"../maintain-guides-secure-validator"},sidebar:"docs",previous:{title:"Using systemd for a Validator Node",permalink:"/docs/maintain-guides-how-to-systemd"},next:{title:"How to Upgrade Your Validator",permalink:"/docs/maintain-guides-how-to-upgrade"}},l={},d=[{value:"High Availability",id:"high-availability",level:2},{value:"Key Management",id:"key-management",level:2},{value:"Signing Outside the Client",id:"signing-outside-the-client",level:3},{value:"Secure-Validator Mode",id:"secure-validator-mode",level:3},{value:"Requirements",id:"requirements",level:4},{value:"Monitoring Tools",id:"monitoring-tools",level:2},{value:"Linux Best Practices",id:"linux-best-practices",level:2},{value:"Conclusions",id:"conclusions",level:2},{value:"Validators",id:"validators",level:3},{value:"Monitoring",id:"monitoring",level:3},{value:"Resources",id:"resources",level:2}];function c(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",h4:"h4",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,t.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.p,{children:"Validators in a Proof of Stake network are responsible for keeping the network in consensus and\nverifying state transitions. As the number of validators is limited, validators in the set have the\nresponsibility to be online and faithfully execute their tasks."}),"\n",(0,s.jsx)(n.p,{children:"This primarily means that validators:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Must be high availability."}),"\n",(0,s.jsxs)(n.li,{children:["Must have infrastructure that protects the validator's signing keys so that an attacker cannot\ntake control and commit ",(0,s.jsx)(n.a,{href:"/docs/learn-offenses",children:"slashable behavior"}),"."]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"high-availability",children:"High Availability"}),"\n",(0,s.jsxs)(n.p,{children:["High availability set-ups that involve redundant validator nodes may seem attractive at first.\nHowever, they can be ",(0,s.jsx)(n.strong,{children:"very dangerous"})," if they are not set up perfectly. The reason for this is\nthat the session keys used by a validator should always be isolated to just a single node.\nReplicating session keys across multiple nodes could lead to equivocation\n",(0,s.jsx)(n.a,{href:"/docs/learn-offenses",children:"slashes"})," or parachain validity slashes which can make you lose ",(0,s.jsx)(n.strong,{children:"100%\nof your staked funds"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["The good news is that 100% uptime of your validator is not really needed, as it has some buffer\nwithin eras in order to go offline for a little while and upgrade. For this reason, we advise that\nyou only attempt a high availability set-up if ",(0,s.jsx)(n.strong,{children:"you're confident you know exactly what you're\ndoing."})]}),"\n",(0,s.jsx)(n.p,{children:"Many expert validators have made mistakes in the past due to the handling of session keys."}),"\n",(0,s.jsx)(n.h2,{id:"key-management",children:"Key Management"}),"\n",(0,s.jsxs)(n.p,{children:["See the ",(0,s.jsx)(n.a,{href:"/docs/learn-cryptography",children:"Polkadot Keys guide"})," for more information on keys. The keys\nthat are of primary concern for validator infrastructure are the Session keys. These keys sign\nmessages related to consensus and parachains. Although Session keys are ",(0,s.jsx)(n.em,{children:"not"})," account keys and\ntherefore cannot transfer funds, an attacker could use them to commit slashable behavior."]}),"\n",(0,s.jsxs)(n.p,{children:["Session keys are generated inside the node via RPC call. See the\n",(0,s.jsx)(n.a,{href:"/docs/maintain-guides-how-to-validate-polkadot#set-session-keys",children:"How to Validate guide"})," for\ninstructions on setting Session keys. These should be generated and kept within your client. When\nyou generate new Session keys, you must submit an extrinsic (a Session certificate) from your\nstaking proxy key telling the chain your new Session keys."]}),"\n",(0,s.jsx)(n.admonition,{title:"Generating session keys",type:"info",children:(0,s.jsx)(n.p,{children:"Session keys can also be generated outside the client and inserted into the client's keystore via\nRPC. For most users, we recommend using the key generation functionality within the client."})}),"\n",(0,s.jsx)(n.h3,{id:"signing-outside-the-client",children:"Signing Outside the Client"}),"\n",(0,s.jsx)(n.p,{children:"In the future, Polkadot will support signing payloads outside the client so that keys can be stored\non another device, e.g. a hardware security module (HSM) or secure enclave. For the time being,\nhowever, Session key signatures are performed within the client."}),"\n",(0,s.jsx)(n.admonition,{title:"HSMs are not a panacea",type:"info",children:(0,s.jsx)(n.p,{children:"They do not incorporate any logic and will just sign and return whatever payload they receive.\nTherefore, an attacker who gains access to your validator node could still commit slashable\nbehavior."})}),"\n",(0,s.jsx)(n.h3,{id:"secure-validator-mode",children:"Secure-Validator Mode"}),"\n",(0,s.jsx)(n.p,{children:"Parity Polkadot has a Secure-Validator Mode, enabling several protections for keeping keys secure.\nThe protections include highly strict filesystem, networking, and process sandboxing on top of the\nexisting wasmtime sandbox."}),"\n",(0,s.jsxs)(n.p,{children:["This mode is ",(0,s.jsx)(n.strong,{children:"activated by default"})," if the machine meets the following requirements. If not, there\nis an error message with instructions on disabling Secure-Validator Mode, though this is not\nrecommended due to the security risks involved."]}),"\n",(0,s.jsx)(n.h4,{id:"requirements",children:"Requirements"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Linux on x86-64 family"})," (usually Intel or AMD)."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"seccomp enabled"}),". You can check that this is the case by running the following command:"]}),"\n"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"cat /boot/config-`uname -r` | grep CONFIG_SECCOMP=\n"})}),"\n",(0,s.jsx)(n.p,{children:"The expected output, if enabled, is:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"CONFIG_SECCOMP=y\n"})}),"\n",(0,s.jsxs)(n.ol,{start:"3",children:["\n",(0,s.jsxs)(n.li,{children:["OPTIONAL: ",(0,s.jsx)(n.strong,{children:"Linux 5.13"}),". Provides access to even more strict filesystem protections."]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"monitoring-tools",children:"Monitoring Tools"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.a,{href:"https://github.com/paritytech/substrate-telemetry",children:"Telemetry"})," This tracks your node details\nincluding the version you are running, block height, CPU & memory usage, block propagation time,\netc."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.a,{href:"https://prometheus.io/",children:"Prometheus"}),"-based monitoring stack, including\n",(0,s.jsx)(n.a,{href:"https://grafana.com",children:"Grafana"})," for dashboards and log aggregation. It includes alerting, querying,\nvisualization, and monitoring features and works for both cloud and on-premise systems. The data\nfrom ",(0,s.jsx)(n.code,{children:"substrate-telemetry"})," can be made available to Prometheus through exporters like\n",(0,s.jsx)(n.a,{href:"https://github.com/w3f/substrate-telemetry-exporter",children:"this"}),"."]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"linux-best-practices",children:"Linux Best Practices"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Never use the root user."}),"\n",(0,s.jsx)(n.li,{children:"Always update the security patches for your OS."}),"\n",(0,s.jsx)(n.li,{children:"Enable and set up a firewall."}),"\n",(0,s.jsx)(n.li,{children:"Never allow password-based SSH, only use key-based access."}),"\n",(0,s.jsxs)(n.li,{children:["Disable non-essential SSH subsystems (banner, motd, scp, X11 forwarding) and harden your SSH\nconfiguration\n(",(0,s.jsx)(n.a,{href:"https://stribika.github.io/2015/01/04/secure-secure-shell.html",children:"reasonable guide to begin with"}),")."]}),"\n",(0,s.jsx)(n.li,{children:"Back up your storage regularly."}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"conclusions",children:"Conclusions"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"At the moment, Polkadot/Substrate can't interact with HSM/SGX, so we need to provide the signing\nkey seeds to the validator machine. This key is kept in memory for signing operations and\npersisted to disk (encrypted with a password)."}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Given that HA setups would always be at risk of double-signing and there's currently no built-in\nmechanism to prevent it, we propose having a single instance of the validator to avoid slashing."}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"validators",children:"Validators"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Validators should only run the Polkadot binary, and they should not listen on any port other than\nthe configured p2p port."}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Validators should run on bare-metal machines, as opposed to VMs. This will prevent some of the\navailability issues with cloud providers, along with potential attacks from other VMs on the same\nhardware. The provisioning of the validator machine should be automated and defined in code. This\ncode should be kept in private version control, reviewed, audited, and tested."}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Session keys should be generated and provided in a secure way."}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Polkadot should be started at boot and restarted if stopped for any reason (supervisor process)."}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Polkadot should run as a non-root user."}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"monitoring",children:"Monitoring"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"There should be an on-call rotation for managing the alerts."}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"There should be a clear protocol with actions to perform for each level of each alert and an\nescalation policy."}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"resources",children:"Resources"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"https://medium.com/figment-networks/full-disclosure-figments-cosmos-validator-infrastructure-3bc707283967",children:"Figment Network's Full Disclosure of Cosmos Validator Infrastructure"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"https://kb.certus.one/",children:"Certus One's Knowledge Base"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"https://github.com/slowmist/eos-bp-nodes-security-checklist",children:"EOS Block Producer Security List"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"https://medium.com/loom-network/hsm-policies-and-the-importance-of-validator-security-ec8a4cc1b6f",children:"HSM Policies and the Important of Validator Security"})}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(c,{...e})}):c(e)}},28453:(e,n,i)=>{i.d(n,{R:()=>r,x:()=>o});var s=i(96540);const t={},a=s.createContext(t);function r(e){const n=s.useContext(a);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:r(e.components),s.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/0df78d26.7d16a2ec.js b/assets/js/0df78d26.7d16a2ec.js new file mode 100644 index 000000000000..1832addb189c --- /dev/null +++ b/assets/js/0df78d26.7d16a2ec.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[782],{79411:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>l,contentTitle:()=>o,default:()=>h,frontMatter:()=>r,metadata:()=>s,toc:()=>d});const s=JSON.parse('{"id":"maintain/maintain-guides-secure-validator","title":"Secure Validator","description":"Tips for running a secure validator.","source":"@site/../docs/maintain/maintain-guides-secure-validator.md","sourceDirName":"maintain","slug":"/maintain-guides-secure-validator","permalink":"/docs/maintain-guides-secure-validator","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/maintain/maintain-guides-secure-validator.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1718028821000,"frontMatter":{"id":"maintain-guides-secure-validator","title":"Secure Validator","sidebar_label":"Secure Validator","description":"Tips for running a secure validator.","keywords":["secure validator","validator","configuration"],"slug":"../maintain-guides-secure-validator"},"sidebar":"docs","previous":{"title":"Using systemd for a Validator Node","permalink":"/docs/maintain-guides-how-to-systemd"},"next":{"title":"How to Upgrade Your Validator","permalink":"/docs/maintain-guides-how-to-upgrade"}}');var t=i(74848),a=i(28453);const r={id:"maintain-guides-secure-validator",title:"Secure Validator",sidebar_label:"Secure Validator",description:"Tips for running a secure validator.",keywords:["secure validator","validator","configuration"],slug:"../maintain-guides-secure-validator"},o=void 0,l={},d=[{value:"High Availability",id:"high-availability",level:2},{value:"Key Management",id:"key-management",level:2},{value:"Signing Outside the Client",id:"signing-outside-the-client",level:3},{value:"Secure-Validator Mode",id:"secure-validator-mode",level:3},{value:"Requirements",id:"requirements",level:4},{value:"Monitoring Tools",id:"monitoring-tools",level:2},{value:"Linux Best Practices",id:"linux-best-practices",level:2},{value:"Conclusions",id:"conclusions",level:2},{value:"Validators",id:"validators",level:3},{value:"Monitoring",id:"monitoring",level:3},{value:"Resources",id:"resources",level:2}];function c(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",h4:"h4",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,a.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.p,{children:"Validators in a Proof of Stake network are responsible for keeping the network in consensus and\nverifying state transitions. As the number of validators is limited, validators in the set have the\nresponsibility to be online and faithfully execute their tasks."}),"\n",(0,t.jsx)(n.p,{children:"This primarily means that validators:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Must be high availability."}),"\n",(0,t.jsxs)(n.li,{children:["Must have infrastructure that protects the validator's signing keys so that an attacker cannot\ntake control and commit ",(0,t.jsx)(n.a,{href:"/docs/learn-offenses",children:"slashable behavior"}),"."]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"high-availability",children:"High Availability"}),"\n",(0,t.jsxs)(n.p,{children:["High availability set-ups that involve redundant validator nodes may seem attractive at first.\nHowever, they can be ",(0,t.jsx)(n.strong,{children:"very dangerous"})," if they are not set up perfectly. The reason for this is\nthat the session keys used by a validator should always be isolated to just a single node.\nReplicating session keys across multiple nodes could lead to equivocation\n",(0,t.jsx)(n.a,{href:"/docs/learn-offenses",children:"slashes"})," or parachain validity slashes which can make you lose ",(0,t.jsx)(n.strong,{children:"100%\nof your staked funds"}),"."]}),"\n",(0,t.jsxs)(n.p,{children:["The good news is that 100% uptime of your validator is not really needed, as it has some buffer\nwithin eras in order to go offline for a little while and upgrade. For this reason, we advise that\nyou only attempt a high availability set-up if ",(0,t.jsx)(n.strong,{children:"you're confident you know exactly what you're\ndoing."})]}),"\n",(0,t.jsx)(n.p,{children:"Many expert validators have made mistakes in the past due to the handling of session keys."}),"\n",(0,t.jsx)(n.h2,{id:"key-management",children:"Key Management"}),"\n",(0,t.jsxs)(n.p,{children:["See the ",(0,t.jsx)(n.a,{href:"/docs/learn-cryptography",children:"Polkadot Keys guide"})," for more information on keys. The keys\nthat are of primary concern for validator infrastructure are the Session keys. These keys sign\nmessages related to consensus and parachains. Although Session keys are ",(0,t.jsx)(n.em,{children:"not"})," account keys and\ntherefore cannot transfer funds, an attacker could use them to commit slashable behavior."]}),"\n",(0,t.jsxs)(n.p,{children:["Session keys are generated inside the node via RPC call. See the\n",(0,t.jsx)(n.a,{href:"/docs/maintain-guides-how-to-validate-polkadot#set-session-keys",children:"How to Validate guide"})," for\ninstructions on setting Session keys. These should be generated and kept within your client. When\nyou generate new Session keys, you must submit an extrinsic (a Session certificate) from your\nstaking proxy key telling the chain your new Session keys."]}),"\n",(0,t.jsx)(n.admonition,{title:"Generating session keys",type:"info",children:(0,t.jsx)(n.p,{children:"Session keys can also be generated outside the client and inserted into the client's keystore via\nRPC. For most users, we recommend using the key generation functionality within the client."})}),"\n",(0,t.jsx)(n.h3,{id:"signing-outside-the-client",children:"Signing Outside the Client"}),"\n",(0,t.jsx)(n.p,{children:"In the future, Polkadot will support signing payloads outside the client so that keys can be stored\non another device, e.g. a hardware security module (HSM) or secure enclave. For the time being,\nhowever, Session key signatures are performed within the client."}),"\n",(0,t.jsx)(n.admonition,{title:"HSMs are not a panacea",type:"info",children:(0,t.jsx)(n.p,{children:"They do not incorporate any logic and will just sign and return whatever payload they receive.\nTherefore, an attacker who gains access to your validator node could still commit slashable\nbehavior."})}),"\n",(0,t.jsx)(n.h3,{id:"secure-validator-mode",children:"Secure-Validator Mode"}),"\n",(0,t.jsx)(n.p,{children:"Parity Polkadot has a Secure-Validator Mode, enabling several protections for keeping keys secure.\nThe protections include highly strict filesystem, networking, and process sandboxing on top of the\nexisting wasmtime sandbox."}),"\n",(0,t.jsxs)(n.p,{children:["This mode is ",(0,t.jsx)(n.strong,{children:"activated by default"})," if the machine meets the following requirements. If not, there\nis an error message with instructions on disabling Secure-Validator Mode, though this is not\nrecommended due to the security risks involved."]}),"\n",(0,t.jsx)(n.h4,{id:"requirements",children:"Requirements"}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Linux on x86-64 family"})," (usually Intel or AMD)."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"seccomp enabled"}),". You can check that this is the case by running the following command:"]}),"\n"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"cat /boot/config-`uname -r` | grep CONFIG_SECCOMP=\n"})}),"\n",(0,t.jsx)(n.p,{children:"The expected output, if enabled, is:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"CONFIG_SECCOMP=y\n"})}),"\n",(0,t.jsxs)(n.ol,{start:"3",children:["\n",(0,t.jsxs)(n.li,{children:["OPTIONAL: ",(0,t.jsx)(n.strong,{children:"Linux 5.13"}),". Provides access to even more strict filesystem protections."]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"monitoring-tools",children:"Monitoring Tools"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.a,{href:"https://github.com/paritytech/substrate-telemetry",children:"Telemetry"})," This tracks your node details\nincluding the version you are running, block height, CPU & memory usage, block propagation time,\netc."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.a,{href:"https://prometheus.io/",children:"Prometheus"}),"-based monitoring stack, including\n",(0,t.jsx)(n.a,{href:"https://grafana.com",children:"Grafana"})," for dashboards and log aggregation. It includes alerting, querying,\nvisualization, and monitoring features and works for both cloud and on-premise systems. The data\nfrom ",(0,t.jsx)(n.code,{children:"substrate-telemetry"})," can be made available to Prometheus through exporters like\n",(0,t.jsx)(n.a,{href:"https://github.com/w3f/substrate-telemetry-exporter",children:"this"}),"."]}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"linux-best-practices",children:"Linux Best Practices"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Never use the root user."}),"\n",(0,t.jsx)(n.li,{children:"Always update the security patches for your OS."}),"\n",(0,t.jsx)(n.li,{children:"Enable and set up a firewall."}),"\n",(0,t.jsx)(n.li,{children:"Never allow password-based SSH, only use key-based access."}),"\n",(0,t.jsxs)(n.li,{children:["Disable non-essential SSH subsystems (banner, motd, scp, X11 forwarding) and harden your SSH\nconfiguration\n(",(0,t.jsx)(n.a,{href:"https://stribika.github.io/2015/01/04/secure-secure-shell.html",children:"reasonable guide to begin with"}),")."]}),"\n",(0,t.jsx)(n.li,{children:"Back up your storage regularly."}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"conclusions",children:"Conclusions"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"At the moment, Polkadot/Substrate can't interact with HSM/SGX, so we need to provide the signing\nkey seeds to the validator machine. This key is kept in memory for signing operations and\npersisted to disk (encrypted with a password)."}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Given that HA setups would always be at risk of double-signing and there's currently no built-in\nmechanism to prevent it, we propose having a single instance of the validator to avoid slashing."}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"validators",children:"Validators"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Validators should only run the Polkadot binary, and they should not listen on any port other than\nthe configured p2p port."}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Validators should run on bare-metal machines, as opposed to VMs. This will prevent some of the\navailability issues with cloud providers, along with potential attacks from other VMs on the same\nhardware. The provisioning of the validator machine should be automated and defined in code. This\ncode should be kept in private version control, reviewed, audited, and tested."}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Session keys should be generated and provided in a secure way."}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Polkadot should be started at boot and restarted if stopped for any reason (supervisor process)."}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Polkadot should run as a non-root user."}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"monitoring",children:"Monitoring"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"There should be an on-call rotation for managing the alerts."}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"There should be a clear protocol with actions to perform for each level of each alert and an\nescalation policy."}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"resources",children:"Resources"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://medium.com/figment-networks/full-disclosure-figments-cosmos-validator-infrastructure-3bc707283967",children:"Figment Network's Full Disclosure of Cosmos Validator Infrastructure"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://kb.certus.one/",children:"Certus One's Knowledge Base"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://github.com/slowmist/eos-bp-nodes-security-checklist",children:"EOS Block Producer Security List"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://medium.com/loom-network/hsm-policies-and-the-importance-of-validator-security-ec8a4cc1b6f",children:"HSM Policies and the Important of Validator Security"})}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(c,{...e})}):c(e)}},28453:(e,n,i)=>{i.d(n,{R:()=>r,x:()=>o});var s=i(96540);const t={},a=s.createContext(t);function r(e){const n=s.useContext(a);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:r(e.components),s.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/0eeb7a68.f57cab19.js b/assets/js/0eeb7a68.f57cab19.js new file mode 100644 index 000000000000..53bbb2658512 --- /dev/null +++ b/assets/js/0eeb7a68.f57cab19.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6869],{503:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>c,contentTitle:()=>d,default:()=>l,frontMatter:()=>i,metadata:()=>a,toc:()=>u});const a=JSON.parse('{"id":"learn/learn-guides-dot-ksm-bridge","title":"Polkadot and Kusama Bridge Guides","description":"Polkadot-JS Guides about Polkadot and Kusama Bridge.","source":"@site/../docs/learn/learn-guides-DOT-KSM-bridge.md","sourceDirName":"learn","slug":"/learn-guides-dot-ksm-bridge","permalink":"/docs/learn-guides-dot-ksm-bridge","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-DOT-KSM-bridge.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1729847256000,"frontMatter":{"id":"learn-guides-dot-ksm-bridge","title":"Polkadot and Kusama Bridge Guides","sidebar_label":"DOT <> KSM Bridge","description":"Polkadot-JS Guides about Polkadot and Kusama Bridge.","keywords":["Bridge","XCM","Bridge Hub","polkadot-js"],"slug":"../learn-guides-dot-ksm-bridge"},"sidebar":"docs","previous":{"title":"Bridge Hub Guides","permalink":"/docs/learn-guides-bridges"},"next":{"title":"Claim Guides","permalink":"/docs/learn-guides-claims"}}');var n=t(74848),o=t(28453),r=t(67141);const i={id:"learn-guides-dot-ksm-bridge",title:"Polkadot and Kusama Bridge Guides",sidebar_label:"DOT <> KSM Bridge",description:"Polkadot-JS Guides about Polkadot and Kusama Bridge.",keywords:["Bridge","XCM","Bridge Hub","polkadot-js"],slug:"../learn-guides-dot-ksm-bridge"},d=void 0,c={},u=[{value:"Transfer DOT to Kusama Asset Hub",id:"transfer-dot-to-kusama-asset-hub",level:2},{value:"Transfer DOT from Kusama Asset Hub to Polkadot Asset Hub",id:"transfer-dot-from-kusama-asset-hub-to-polkadot-asset-hub",level:2},{value:"Transfer KSM to Polkadot Asset Hub",id:"transfer-ksm-to-polkadot-asset-hub",level:2},{value:"Transfer KSM from Polkadot Asset Hub to Kusama Asset Hub",id:"transfer-ksm-from-polkadot-asset-hub-to-kusama-asset-hub",level:2},{value:"Transfer of arbitrary assets between Polkadot Asset Hub and Kusama Asset Hub",id:"transfer-of-arbitrary-assets-between-polkadot-asset-hub-and-kusama-asset-hub",level:2}];function h(e){const s={a:"a",admonition:"admonition",code:"code",h2:"h2",img:"img",p:"p",pre:"pre",...(0,o.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the Polkadot-JS UI, you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,n.jsxs)(s.p,{children:["The fully functional Polkadot < > Kusama bridge facilitates secure asset transfers between the\nchains in both the ecosystems. The progress of Polkadot < > Kusama bridge implementation can be\ntracked ",(0,n.jsx)(s.a,{href:"https://forum.polkadot.network/t/polkadot-kusama-bridge/2971/1",children:"here"}),"."]}),"\n",(0,n.jsx)(s.h2,{id:"transfer-dot-to-kusama-asset-hub",children:"Transfer DOT to Kusama Asset Hub"}),"\n",(0,n.jsx)(s.p,{children:"This tutorial shows how to transfer DOT on Polkadot Asset Hub to Kusama Asset Hub. The first step is\nto ensure that your account on Polkadot Asset Hub has enough DOT to cover the XCM transfer fee and\nthe bridge fee (which is around 2 DOT). The next step is to craft an XCM message to be sent from\nPolkadot Asset Hub."}),"\n",(0,n.jsxs)(s.p,{children:[(0,n.jsx)(s.a,{href:"https://xcmsend.com/#/builder",children:"BagPipes (formerly called xcmsend)"})," is an opensource application\nthat lets you create workflows in a drag and drop style interface in order to build execution flows\nof cross chain assets transfers using XCM. Check\n",(0,n.jsx)(s.a,{href:"https://xcmsend.github.io/workflows/dotksm.html",children:"Bagpipes docs"})," for more information on how to\ncreate workflows for crafting XCM transfers. The snapshot below shows a workflow on BagPipes that is\ndesigned to send 3 DOT from an account Polkadot Asset Hub to Kusama Asset Hub."]}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.img,{alt:"BagPipes Snapshot DOT Transfer",src:t(35918).A+"",width:"2035",height:"962"})}),"\n",(0,n.jsx)(s.p,{children:"This workflow crafts an XCM transfer as shown below."}),"\n",(0,n.jsx)(s.pre,{children:(0,n.jsx)(s.code,{children:'{\n "isSigned": false,\n "method": {\n "args": {\n "dest": {\n "V3": {\n "parents": "2",\n "interior": {\n "X2": [\n {\n "GlobalConsensus": "Kusama"\n },\n {\n "Parachain": "1,000"\n }\n ]\n }\n }\n },\n "beneficiary": {\n "V3": {\n "parents": "0",\n "interior": {\n "X1": {\n "AccountId32": {\n "network": null,\n "id": "0x9e4e7009937c56d267338762a60ed004293afd40e7c2081847c12cb63c76a818"\n }\n }\n }\n }\n },\n "assets": {\n "V3": [\n {\n "id": {\n "Concrete": {\n "parents": "1",\n "interior": "Here"\n }\n },\n "fun": {\n "Fungible": "30,000,000,000"\n }\n }\n ]\n },\n "fee_asset_item": "0",\n "weight_limit": "Unlimited"\n },\n "method": "limitedReserveTransferAssets",\n "section": "polkadotXcm"\n }\n}\n'})}),"\n",(0,n.jsxs)(s.p,{children:["Once this ",(0,n.jsx)(s.a,{href:"https://assethub-polkadot.subscan.io/extrinsic/6028374-2",children:"extrinsic"})," is signed and\nsubmitted, it is broadcast to Polkadot Asset Hub nodes. As this is a reserve asset transfer, the DOT\nis transferred to the destination's sovereign account on Polkadot Asset Hub and\n",(0,n.jsx)(s.a,{href:"https://assethub-kusama.subscan.io/extrinsic/6758392-0?event=6758392-1",children:"DOT is issued"})," as a foreign\nasset and deposited onto the destination account on Kusama Asset Hub. The foreign asset balances of\nany account on Kusama Asset Hub can be queried on-chain through the ",(0,n.jsx)(s.code,{children:"foreignAssets"}),"pallet as shown\nbelow."]}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.img,{alt:"DOT Balance Kusama Asset Hub",src:t(13777).A+"",width:"2820",height:"1874"})}),"\n",(0,n.jsx)(s.h2,{id:"transfer-dot-from-kusama-asset-hub-to-polkadot-asset-hub",children:"Transfer DOT from Kusama Asset Hub to Polkadot Asset Hub"}),"\n",(0,n.jsx)(s.p,{children:"This tutorial shows how to transfer DOT on Kusama Asset Hub to Polkadot Asset Hub. The first step is\nto ensure that your account on Kusama Asset Hub has enough KSM to cover the XCM transfer fee and the\nbridge fee (which is around 0.4 KSM). The next step is to craft an XCM message to be sent from\nKusama Asset Hub."}),"\n",(0,n.jsxs)(s.p,{children:["DOT which is registered as a foreign asset on Kusama Asset Hub can be transferred to Polkadot Asset\nHub through an extrinsic like the one below, whose call data is\n",(0,n.jsx)(s.a,{href:"https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fkusama-asset-hub-rpc.polkadot.io#/extrinsics/decode/0x1f0b040202090200a10f04000101009e4e7009937c56d267338762a60ed004293afd40e7c2081847c12cb63c76a818040402010902000700e40b54020000000000",children:(0,n.jsx)(s.code,{children:"0x1f0b040202090200a10f04000101009e4e7009937c56d267338762a60ed004293afd40e7c2081847c12cb63c76a818040402010902000700e40b54020000000000"})}),"."]}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.img,{alt:"DOT transferred out from Kusama Asset Hub",src:t(51308).A+"",width:"2834",height:"5018"})}),"\n",(0,n.jsxs)(s.p,{children:["For reference, this ",(0,n.jsx)(s.a,{href:"https://assethub-kusama.subscan.io/extrinsic/7015118-2",children:"extrinsic"})," is signed\nand submitted successfully, and the destination account on Polkadot Asset Hub received DOT."]}),"\n",(0,n.jsx)(s.h2,{id:"transfer-ksm-to-polkadot-asset-hub",children:"Transfer KSM to Polkadot Asset Hub"}),"\n",(0,n.jsx)(s.p,{children:"This tutorial shows how to transfer KSM on Kusama Asset Hub to Polkadot Asset Hub. The first step is\nto ensure that your account on Kusama Asset Hub has enough KSM to cover the XCM transfer fee and the\nbridge fee (which is around 0.4 KSM). The next step is to craft an XCM message to be sent from\nKusama Asset Hub."}),"\n",(0,n.jsxs)(s.p,{children:["The XCM transfer extrinsic shown below can be accessed\n",(0,n.jsx)(s.a,{href:"https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fkusama-asset-hub-rpc.polkadot.io#/extrinsics/decode/0x1f08030202090200a10f03000101008479c8ea5480acca5a847133cd97a87801b6e698a98f2eab0e8e9d5c51b14a33030400010000070088526a740000000000",children:"here."}),"\nIf you plan on reusing this extrinsic, ensure that you change the Account ID and the transfer amount\nhighlighted in the snapshot below."]}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.img,{alt:"PJS Snapshot KSM Transfer",src:t(65604).A+"",width:"2858",height:"4398"})}),"\n",(0,n.jsxs)(s.p,{children:["Once this ",(0,n.jsx)(s.a,{href:"https://assethub-kusama.subscan.io/extrinsic/6761480-2",children:"extrinsic"})," is signed and\nsubmitted, it is broadcast to Kusama Asset Hub nodes. As this is a reserve asset transfer, the KSM\nis transferred to the sovereign account on Kusama Asset Hub and\n",(0,n.jsx)(s.a,{href:"https://assethub-polkadot.subscan.io/extrinsic/6031467-0?event=6031467-6",children:"KSM is issued"})," as a\nforeign asset and deposited onto the destination account on Kusama Asset Hub. The foreign asset\nbalances of any account on Kusama Asset Hub can be queried on-chain through the\n",(0,n.jsx)(s.code,{children:"foreignAssets"}),"pallet as shown below."]}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.img,{alt:"KSM Balance on Polkadot Asset Hub",src:t(41412).A+"",width:"2854",height:"1960"})}),"\n",(0,n.jsx)(s.h2,{id:"transfer-ksm-from-polkadot-asset-hub-to-kusama-asset-hub",children:"Transfer KSM from Polkadot Asset Hub to Kusama Asset Hub"}),"\n",(0,n.jsx)(s.p,{children:"This tutorial shows how to transfer KSM on Polkadot Asset Hub to Kusama Asset Hub. The first step is\nto ensure that your account on Polkadot Asset Hub has enough DOT to cover the XCM transfer fee and\nthe bridge fee (which is around 2 DOT). The next step is to craft an XCM message to be sent from\nPolkadot Asset Hub."}),"\n",(0,n.jsxs)(s.p,{children:["KSM which is registered as a foreign asset on Polkadot Asset Hub can be transferred to Kusama Asset\nHub through an extrinsic like the one below, whose call data is\n",(0,n.jsx)(s.a,{href:"https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fpolkadot-asset-hub-rpc.polkadot.io#/extrinsics/decode/0x1f0b040202090300a10f04000101008479c8ea5480acca5a847133cd97a87801b6e698a98f2eab0e8e9d5c51b14a33040402010903000700a0db215d0000000000",children:(0,n.jsx)(s.code,{children:"0x1f0b040202090300a10f04000101008479c8ea5480acca5a847133cd97a87801b6e698a98f2eab0e8e9d5c51b14a33040402010903000700a0db215d0000000000"})})]}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.img,{alt:"KSM transferred out from Polkadot Asset Hub",src:t(25728).A+"",width:"2854",height:"4784"})}),"\n",(0,n.jsxs)(s.p,{children:["For reference, this ",(0,n.jsx)(s.a,{href:"https://assethub-polkadot.subscan.io/extrinsic/6303823-2",children:"extrinsic"})," was signed\nand submitted successfully, and the destination account on Kusama Asset Hub received KSM."]}),"\n",(0,n.jsx)(s.h2,{id:"transfer-of-arbitrary-assets-between-polkadot-asset-hub-and-kusama-asset-hub",children:"Transfer of arbitrary assets between Polkadot Asset Hub and Kusama Asset Hub"}),"\n",(0,n.jsx)(s.p,{children:"Transfer functionality of assets other than DOT and KSM between Asset Hubs is yet to be enabled.\nOnce this functionality is enabled, assets which are sufficient or non-sufficient on the Asset Hubs\ncan be bridged."}),"\n",(0,n.jsx)(s.admonition,{title:"Avoid Asset Traps",type:"caution",children:(0,n.jsxs)(s.p,{children:["To avoid issues on the receiving side for non-sufficient assets, make sure to call\n",(0,n.jsx)(s.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/0ef37c75401b78b61ed35ce27af8b964da27bb3c/substrate/frame/assets/src/lib.rs#L1531",children:"pallet_assets::touch()"}),"\nor\n",(0,n.jsx)(s.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/0ef37c75401b78b61ed35ce27af8b964da27bb3c/substrate/frame/assets/src/lib.rs#L1616",children:"pallet_assets::touch_other()"}),"\neffectively guaranteeing the ability to successfully receive and accept the bridged assets in your\naccount on the destination chain. This eliminates issues like your account on destination not\nexisting or not having enough ED or having reached the maximum limit of different assets it can\nhold. Without this sanity step, you risk that the bridged assets will make their way to the\ndestination chain but will not be accepted by your account, and instead get trapped in the Asset\nTrap on the destination chain."]})}),"\n",(0,n.jsx)(s.p,{children:"Once arbitrary asset transfers are enabled by the Asset Hubs, a guide will be posted to this Wiki\npage."})]})}function l(e={}){const{wrapper:s}={...(0,o.R)(),...e.components};return s?(0,n.jsx)(s,{...e,children:(0,n.jsx)(h,{...e})}):h(e)}},67141:(e,s,t)=>{t.d(s,{A:()=>o});var a=t(96540),n=t(74848);const o=function(e){var s,t=e.message,o=(0,a.useState)(!0),r=o[0],i=o[1];return(0,n.jsx)(n.Fragment,{children:r&&(0,n.jsxs)("div",{className:"message-box",children:[(0,n.jsx)("button",{className:"close-button",onClick:function(){i(!1)},children:"\u2716 "}),(0,n.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(s=t,s.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},13777:(e,s,t)=>{t.d(s,{A:()=>a});const a=t.p+"assets/images/KAH-DOT-Balance-f587755f88564c19d1578f162d9dd0ff.png"},51308:(e,s,t)=>{t.d(s,{A:()=>a});const a=t.p+"assets/images/KAH-DOT-transfer-PAH-a6dd9187db4d6f449092d026c726a8c6.png"},65604:(e,s,t)=>{t.d(s,{A:()=>a});const a=t.p+"assets/images/KAH-PAH-KSM-Transfer-PJS-Extrinsic-55c8a01313cec43f8119b6aca8904e23.png"},41412:(e,s,t)=>{t.d(s,{A:()=>a});const a=t.p+"assets/images/PAH-KSM-Balance-ffa6f6093f73aa45b0c1bc7b6d0c78c7.png"},25728:(e,s,t)=>{t.d(s,{A:()=>a});const a=t.p+"assets/images/PAH-KSM-Transfer-KAH-0d8843fc681b2cce6939cc6e607ff122.png"},35918:(e,s,t)=>{t.d(s,{A:()=>a});const a=t.p+"assets/images/PAH-to-KAH-DOT-transfer-b97431dce4c4cd85c5dc17007357fb9a.png"},28453:(e,s,t)=>{t.d(s,{R:()=>r,x:()=>i});var a=t(96540);const n={},o=a.createContext(n);function r(e){const s=a.useContext(o);return a.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function i(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:r(e.components),a.createElement(o.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/0eeb7a68.f6cf6746.js b/assets/js/0eeb7a68.f6cf6746.js deleted file mode 100644 index 4c69dee10ca2..000000000000 --- a/assets/js/0eeb7a68.f6cf6746.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6869],{5824:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>c,contentTitle:()=>i,default:()=>l,frontMatter:()=>r,metadata:()=>d,toc:()=>u});var a=t(74848),n=t(28453),o=t(67141);const r={id:"learn-guides-dot-ksm-bridge",title:"Polkadot and Kusama Bridge Guides",sidebar_label:"DOT <> KSM Bridge",description:"Polkadot-JS Guides about Polkadot and Kusama Bridge.",keywords:["Bridge","XCM","Bridge Hub","polkadot-js"],slug:"../learn-guides-dot-ksm-bridge"},i=void 0,d={id:"learn/learn-guides-dot-ksm-bridge",title:"Polkadot and Kusama Bridge Guides",description:"Polkadot-JS Guides about Polkadot and Kusama Bridge.",source:"@site/../docs/learn/learn-guides-DOT-KSM-bridge.md",sourceDirName:"learn",slug:"/learn-guides-dot-ksm-bridge",permalink:"/docs/learn-guides-dot-ksm-bridge",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-DOT-KSM-bridge.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1729847256e3,frontMatter:{id:"learn-guides-dot-ksm-bridge",title:"Polkadot and Kusama Bridge Guides",sidebar_label:"DOT <> KSM Bridge",description:"Polkadot-JS Guides about Polkadot and Kusama Bridge.",keywords:["Bridge","XCM","Bridge Hub","polkadot-js"],slug:"../learn-guides-dot-ksm-bridge"},sidebar:"docs",previous:{title:"Bridge Hub Guides",permalink:"/docs/learn-guides-bridges"},next:{title:"Claim Guides",permalink:"/docs/learn-guides-claims"}},c={},u=[{value:"Transfer DOT to Kusama Asset Hub",id:"transfer-dot-to-kusama-asset-hub",level:2},{value:"Transfer DOT from Kusama Asset Hub to Polkadot Asset Hub",id:"transfer-dot-from-kusama-asset-hub-to-polkadot-asset-hub",level:2},{value:"Transfer KSM to Polkadot Asset Hub",id:"transfer-ksm-to-polkadot-asset-hub",level:2},{value:"Transfer KSM from Polkadot Asset Hub to Kusama Asset Hub",id:"transfer-ksm-from-polkadot-asset-hub-to-kusama-asset-hub",level:2},{value:"Transfer of arbitrary assets between Polkadot Asset Hub and Kusama Asset Hub",id:"transfer-of-arbitrary-assets-between-polkadot-asset-hub-and-kusama-asset-hub",level:2}];function h(e){const s={a:"a",admonition:"admonition",code:"code",h2:"h2",img:"img",p:"p",pre:"pre",...(0,n.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(o.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the Polkadot-JS UI, you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,a.jsxs)(s.p,{children:["The fully functional Polkadot < > Kusama bridge facilitates secure asset transfers between the\nchains in both the ecosystems. The progress of Polkadot < > Kusama bridge implementation can be\ntracked ",(0,a.jsx)(s.a,{href:"https://forum.polkadot.network/t/polkadot-kusama-bridge/2971/1",children:"here"}),"."]}),"\n",(0,a.jsx)(s.h2,{id:"transfer-dot-to-kusama-asset-hub",children:"Transfer DOT to Kusama Asset Hub"}),"\n",(0,a.jsx)(s.p,{children:"This tutorial shows how to transfer DOT on Polkadot Asset Hub to Kusama Asset Hub. The first step is\nto ensure that your account on Polkadot Asset Hub has enough DOT to cover the XCM transfer fee and\nthe bridge fee (which is around 2 DOT). The next step is to craft an XCM message to be sent from\nPolkadot Asset Hub."}),"\n",(0,a.jsxs)(s.p,{children:[(0,a.jsx)(s.a,{href:"https://xcmsend.com/#/builder",children:"BagPipes (formerly called xcmsend)"})," is an opensource application\nthat lets you create workflows in a drag and drop style interface in order to build execution flows\nof cross chain assets transfers using XCM. Check\n",(0,a.jsx)(s.a,{href:"https://xcmsend.github.io/workflows/dotksm.html",children:"Bagpipes docs"})," for more information on how to\ncreate workflows for crafting XCM transfers. The snapshot below shows a workflow on BagPipes that is\ndesigned to send 3 DOT from an account Polkadot Asset Hub to Kusama Asset Hub."]}),"\n",(0,a.jsx)(s.p,{children:(0,a.jsx)(s.img,{alt:"BagPipes Snapshot DOT Transfer",src:t(35918).A+"",width:"2035",height:"962"})}),"\n",(0,a.jsx)(s.p,{children:"This workflow crafts an XCM transfer as shown below."}),"\n",(0,a.jsx)(s.pre,{children:(0,a.jsx)(s.code,{children:'{\n "isSigned": false,\n "method": {\n "args": {\n "dest": {\n "V3": {\n "parents": "2",\n "interior": {\n "X2": [\n {\n "GlobalConsensus": "Kusama"\n },\n {\n "Parachain": "1,000"\n }\n ]\n }\n }\n },\n "beneficiary": {\n "V3": {\n "parents": "0",\n "interior": {\n "X1": {\n "AccountId32": {\n "network": null,\n "id": "0x9e4e7009937c56d267338762a60ed004293afd40e7c2081847c12cb63c76a818"\n }\n }\n }\n }\n },\n "assets": {\n "V3": [\n {\n "id": {\n "Concrete": {\n "parents": "1",\n "interior": "Here"\n }\n },\n "fun": {\n "Fungible": "30,000,000,000"\n }\n }\n ]\n },\n "fee_asset_item": "0",\n "weight_limit": "Unlimited"\n },\n "method": "limitedReserveTransferAssets",\n "section": "polkadotXcm"\n }\n}\n'})}),"\n",(0,a.jsxs)(s.p,{children:["Once this ",(0,a.jsx)(s.a,{href:"https://assethub-polkadot.subscan.io/extrinsic/6028374-2",children:"extrinsic"})," is signed and\nsubmitted, it is broadcast to Polkadot Asset Hub nodes. As this is a reserve asset transfer, the DOT\nis transferred to the destination's sovereign account on Polkadot Asset Hub and\n",(0,a.jsx)(s.a,{href:"https://assethub-kusama.subscan.io/extrinsic/6758392-0?event=6758392-1",children:"DOT is issued"})," as a foreign\nasset and deposited onto the destination account on Kusama Asset Hub. The foreign asset balances of\nany account on Kusama Asset Hub can be queried on-chain through the ",(0,a.jsx)(s.code,{children:"foreignAssets"}),"pallet as shown\nbelow."]}),"\n",(0,a.jsx)(s.p,{children:(0,a.jsx)(s.img,{alt:"DOT Balance Kusama Asset Hub",src:t(13777).A+"",width:"2820",height:"1874"})}),"\n",(0,a.jsx)(s.h2,{id:"transfer-dot-from-kusama-asset-hub-to-polkadot-asset-hub",children:"Transfer DOT from Kusama Asset Hub to Polkadot Asset Hub"}),"\n",(0,a.jsx)(s.p,{children:"This tutorial shows how to transfer DOT on Kusama Asset Hub to Polkadot Asset Hub. The first step is\nto ensure that your account on Kusama Asset Hub has enough KSM to cover the XCM transfer fee and the\nbridge fee (which is around 0.4 KSM). The next step is to craft an XCM message to be sent from\nKusama Asset Hub."}),"\n",(0,a.jsxs)(s.p,{children:["DOT which is registered as a foreign asset on Kusama Asset Hub can be transferred to Polkadot Asset\nHub through an extrinsic like the one below, whose call data is\n",(0,a.jsx)(s.a,{href:"https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fkusama-asset-hub-rpc.polkadot.io#/extrinsics/decode/0x1f0b040202090200a10f04000101009e4e7009937c56d267338762a60ed004293afd40e7c2081847c12cb63c76a818040402010902000700e40b54020000000000",children:(0,a.jsx)(s.code,{children:"0x1f0b040202090200a10f04000101009e4e7009937c56d267338762a60ed004293afd40e7c2081847c12cb63c76a818040402010902000700e40b54020000000000"})}),"."]}),"\n",(0,a.jsx)(s.p,{children:(0,a.jsx)(s.img,{alt:"DOT transferred out from Kusama Asset Hub",src:t(51308).A+"",width:"2834",height:"5018"})}),"\n",(0,a.jsxs)(s.p,{children:["For reference, this ",(0,a.jsx)(s.a,{href:"https://assethub-kusama.subscan.io/extrinsic/7015118-2",children:"extrinsic"})," is signed\nand submitted successfully, and the destination account on Polkadot Asset Hub received DOT."]}),"\n",(0,a.jsx)(s.h2,{id:"transfer-ksm-to-polkadot-asset-hub",children:"Transfer KSM to Polkadot Asset Hub"}),"\n",(0,a.jsx)(s.p,{children:"This tutorial shows how to transfer KSM on Kusama Asset Hub to Polkadot Asset Hub. The first step is\nto ensure that your account on Kusama Asset Hub has enough KSM to cover the XCM transfer fee and the\nbridge fee (which is around 0.4 KSM). The next step is to craft an XCM message to be sent from\nKusama Asset Hub."}),"\n",(0,a.jsxs)(s.p,{children:["The XCM transfer extrinsic shown below can be accessed\n",(0,a.jsx)(s.a,{href:"https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fkusama-asset-hub-rpc.polkadot.io#/extrinsics/decode/0x1f08030202090200a10f03000101008479c8ea5480acca5a847133cd97a87801b6e698a98f2eab0e8e9d5c51b14a33030400010000070088526a740000000000",children:"here."}),"\nIf you plan on reusing this extrinsic, ensure that you change the Account ID and the transfer amount\nhighlighted in the snapshot below."]}),"\n",(0,a.jsx)(s.p,{children:(0,a.jsx)(s.img,{alt:"PJS Snapshot KSM Transfer",src:t(65604).A+"",width:"2858",height:"4398"})}),"\n",(0,a.jsxs)(s.p,{children:["Once this ",(0,a.jsx)(s.a,{href:"https://assethub-kusama.subscan.io/extrinsic/6761480-2",children:"extrinsic"})," is signed and\nsubmitted, it is broadcast to Kusama Asset Hub nodes. As this is a reserve asset transfer, the KSM\nis transferred to the sovereign account on Kusama Asset Hub and\n",(0,a.jsx)(s.a,{href:"https://assethub-polkadot.subscan.io/extrinsic/6031467-0?event=6031467-6",children:"KSM is issued"})," as a\nforeign asset and deposited onto the destination account on Kusama Asset Hub. The foreign asset\nbalances of any account on Kusama Asset Hub can be queried on-chain through the\n",(0,a.jsx)(s.code,{children:"foreignAssets"}),"pallet as shown below."]}),"\n",(0,a.jsx)(s.p,{children:(0,a.jsx)(s.img,{alt:"KSM Balance on Polkadot Asset Hub",src:t(41412).A+"",width:"2854",height:"1960"})}),"\n",(0,a.jsx)(s.h2,{id:"transfer-ksm-from-polkadot-asset-hub-to-kusama-asset-hub",children:"Transfer KSM from Polkadot Asset Hub to Kusama Asset Hub"}),"\n",(0,a.jsx)(s.p,{children:"This tutorial shows how to transfer KSM on Polkadot Asset Hub to Kusama Asset Hub. The first step is\nto ensure that your account on Polkadot Asset Hub has enough DOT to cover the XCM transfer fee and\nthe bridge fee (which is around 2 DOT). The next step is to craft an XCM message to be sent from\nPolkadot Asset Hub."}),"\n",(0,a.jsxs)(s.p,{children:["KSM which is registered as a foreign asset on Polkadot Asset Hub can be transferred to Kusama Asset\nHub through an extrinsic like the one below, whose call data is\n",(0,a.jsx)(s.a,{href:"https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fpolkadot-asset-hub-rpc.polkadot.io#/extrinsics/decode/0x1f0b040202090300a10f04000101008479c8ea5480acca5a847133cd97a87801b6e698a98f2eab0e8e9d5c51b14a33040402010903000700a0db215d0000000000",children:(0,a.jsx)(s.code,{children:"0x1f0b040202090300a10f04000101008479c8ea5480acca5a847133cd97a87801b6e698a98f2eab0e8e9d5c51b14a33040402010903000700a0db215d0000000000"})})]}),"\n",(0,a.jsx)(s.p,{children:(0,a.jsx)(s.img,{alt:"KSM transferred out from Polkadot Asset Hub",src:t(25728).A+"",width:"2854",height:"4784"})}),"\n",(0,a.jsxs)(s.p,{children:["For reference, this ",(0,a.jsx)(s.a,{href:"https://assethub-polkadot.subscan.io/extrinsic/6303823-2",children:"extrinsic"})," was signed\nand submitted successfully, and the destination account on Kusama Asset Hub received KSM."]}),"\n",(0,a.jsx)(s.h2,{id:"transfer-of-arbitrary-assets-between-polkadot-asset-hub-and-kusama-asset-hub",children:"Transfer of arbitrary assets between Polkadot Asset Hub and Kusama Asset Hub"}),"\n",(0,a.jsx)(s.p,{children:"Transfer functionality of assets other than DOT and KSM between Asset Hubs is yet to be enabled.\nOnce this functionality is enabled, assets which are sufficient or non-sufficient on the Asset Hubs\ncan be bridged."}),"\n",(0,a.jsx)(s.admonition,{title:"Avoid Asset Traps",type:"caution",children:(0,a.jsxs)(s.p,{children:["To avoid issues on the receiving side for non-sufficient assets, make sure to call\n",(0,a.jsx)(s.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/0ef37c75401b78b61ed35ce27af8b964da27bb3c/substrate/frame/assets/src/lib.rs#L1531",children:"pallet_assets::touch()"}),"\nor\n",(0,a.jsx)(s.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/0ef37c75401b78b61ed35ce27af8b964da27bb3c/substrate/frame/assets/src/lib.rs#L1616",children:"pallet_assets::touch_other()"}),"\neffectively guaranteeing the ability to successfully receive and accept the bridged assets in your\naccount on the destination chain. This eliminates issues like your account on destination not\nexisting or not having enough ED or having reached the maximum limit of different assets it can\nhold. Without this sanity step, you risk that the bridged assets will make their way to the\ndestination chain but will not be accepted by your account, and instead get trapped in the Asset\nTrap on the destination chain."]})}),"\n",(0,a.jsx)(s.p,{children:"Once arbitrary asset transfers are enabled by the Asset Hubs, a guide will be posted to this Wiki\npage."})]})}function l(e={}){const{wrapper:s}={...(0,n.R)(),...e.components};return s?(0,a.jsx)(s,{...e,children:(0,a.jsx)(h,{...e})}):h(e)}},67141:(e,s,t)=>{t.d(s,{A:()=>o});var a=t(96540),n=t(74848);const o=function(e){var s,t=e.message,o=(0,a.useState)(!0),r=o[0],i=o[1];return(0,n.jsx)(n.Fragment,{children:r&&(0,n.jsxs)("div",{className:"message-box",children:[(0,n.jsx)("button",{className:"close-button",onClick:function(){i(!1)},children:"\u2716 "}),(0,n.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(s=t,s.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},13777:(e,s,t)=>{t.d(s,{A:()=>a});const a=t.p+"assets/images/KAH-DOT-Balance-f587755f88564c19d1578f162d9dd0ff.png"},51308:(e,s,t)=>{t.d(s,{A:()=>a});const a=t.p+"assets/images/KAH-DOT-transfer-PAH-a6dd9187db4d6f449092d026c726a8c6.png"},65604:(e,s,t)=>{t.d(s,{A:()=>a});const a=t.p+"assets/images/KAH-PAH-KSM-Transfer-PJS-Extrinsic-55c8a01313cec43f8119b6aca8904e23.png"},41412:(e,s,t)=>{t.d(s,{A:()=>a});const a=t.p+"assets/images/PAH-KSM-Balance-ffa6f6093f73aa45b0c1bc7b6d0c78c7.png"},25728:(e,s,t)=>{t.d(s,{A:()=>a});const a=t.p+"assets/images/PAH-KSM-Transfer-KAH-0d8843fc681b2cce6939cc6e607ff122.png"},35918:(e,s,t)=>{t.d(s,{A:()=>a});const a=t.p+"assets/images/PAH-to-KAH-DOT-transfer-b97431dce4c4cd85c5dc17007357fb9a.png"},28453:(e,s,t)=>{t.d(s,{R:()=>r,x:()=>i});var a=t(96540);const n={},o=a.createContext(n);function r(e){const s=a.useContext(o);return a.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function i(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:r(e.components),a.createElement(o.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/104.6cbe5376.js b/assets/js/104.6cbe5376.js deleted file mode 100644 index 2de346266449..000000000000 --- a/assets/js/104.6cbe5376.js +++ /dev/null @@ -1,24006 +0,0 @@ -exports.id = 104; -exports.ids = [104]; -exports.modules = { - -/***/ 62954: -/***/ ((module) => { - -(function(f){if(true){module.exports=f()}else { var g; }})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c=undefined;if(!f&&c)return require(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u=undefined,i=0;i 0 && arguments[0] !== undefined ? arguments[0] : {}, - _ref$defaultLayoutOpt = _ref.defaultLayoutOptions, - defaultLayoutOptions = _ref$defaultLayoutOpt === undefined ? {} : _ref$defaultLayoutOpt, - _ref$algorithms = _ref.algorithms, - algorithms = _ref$algorithms === undefined ? ['layered', 'stress', 'mrtree', 'radial', 'force', 'disco', 'sporeOverlap', 'sporeCompaction', 'rectpacking'] : _ref$algorithms, - workerFactory = _ref.workerFactory, - workerUrl = _ref.workerUrl; - - _classCallCheck(this, ELK); - - this.defaultLayoutOptions = defaultLayoutOptions; - this.initialized = false; - - // check valid worker construction possible - if (typeof workerUrl === 'undefined' && typeof workerFactory === 'undefined') { - throw new Error("Cannot construct an ELK without both 'workerUrl' and 'workerFactory'."); - } - var factory = workerFactory; - if (typeof workerUrl !== 'undefined' && typeof workerFactory === 'undefined') { - // use default Web Worker - factory = function factory(url) { - return new Worker(url); - }; - } - - // create the worker - var worker = factory(workerUrl); - if (typeof worker.postMessage !== 'function') { - throw new TypeError("Created worker does not provide" + " the required 'postMessage' function."); - } - - // wrap the worker to return promises - this.worker = new PromisedWorker(worker); - - // initially register algorithms - this.worker.postMessage({ - cmd: 'register', - algorithms: algorithms - }).then(function (r) { - return _this.initialized = true; - }).catch(console.err); - } - - _createClass(ELK, [{ - key: 'layout', - value: function layout(graph) { - var _ref2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, - _ref2$layoutOptions = _ref2.layoutOptions, - layoutOptions = _ref2$layoutOptions === undefined ? this.defaultLayoutOptions : _ref2$layoutOptions, - _ref2$logging = _ref2.logging, - logging = _ref2$logging === undefined ? false : _ref2$logging, - _ref2$measureExecutio = _ref2.measureExecutionTime, - measureExecutionTime = _ref2$measureExecutio === undefined ? false : _ref2$measureExecutio; - - if (!graph) { - return Promise.reject(new Error("Missing mandatory parameter 'graph'.")); - } - return this.worker.postMessage({ - cmd: 'layout', - graph: graph, - layoutOptions: layoutOptions, - options: { - logging: logging, - measureExecutionTime: measureExecutionTime - } - }); - } - }, { - key: 'knownLayoutAlgorithms', - value: function knownLayoutAlgorithms() { - return this.worker.postMessage({ cmd: 'algorithms' }); - } - }, { - key: 'knownLayoutOptions', - value: function knownLayoutOptions() { - return this.worker.postMessage({ cmd: 'options' }); - } - }, { - key: 'knownLayoutCategories', - value: function knownLayoutCategories() { - return this.worker.postMessage({ cmd: 'categories' }); - } - }, { - key: 'terminateWorker', - value: function terminateWorker() { - if (this.worker) this.worker.terminate(); - } - }]); - - return ELK; -}(); - -exports.default = ELK; - -var PromisedWorker = function () { - function PromisedWorker(worker) { - var _this2 = this; - - _classCallCheck(this, PromisedWorker); - - if (worker === undefined) { - throw new Error("Missing mandatory parameter 'worker'."); - } - this.resolvers = {}; - this.worker = worker; - this.worker.onmessage = function (answer) { - // why is this necessary? - setTimeout(function () { - _this2.receive(_this2, answer); - }, 0); - }; - } - - _createClass(PromisedWorker, [{ - key: 'postMessage', - value: function postMessage(msg) { - var id = this.id || 0; - this.id = id + 1; - msg.id = id; - var self = this; - return new Promise(function (resolve, reject) { - // prepare the resolver - self.resolvers[id] = function (err, res) { - if (err) { - self.convertGwtStyleError(err); - reject(err); - } else { - resolve(res); - } - }; - // post the message - self.worker.postMessage(msg); - }); - } - }, { - key: 'receive', - value: function receive(self, answer) { - var json = answer.data; - var resolver = self.resolvers[json.id]; - if (resolver) { - delete self.resolvers[json.id]; - if (json.error) { - resolver(json.error); - } else { - resolver(null, json.data); - } - } - } - }, { - key: 'terminate', - value: function terminate() { - if (this.worker) { - this.worker.terminate(); - } - } - }, { - key: 'convertGwtStyleError', - value: function convertGwtStyleError(err) { - if (!err) { - return; - } - // Somewhat flatten the way GWT stores nested exception(s) - var javaException = err['__java$exception']; - if (javaException) { - // Note that the property name of the nested exception is different - // in the non-minified ('cause') and the minified (not deterministic) version. - // Hence, the version below only works for the non-minified version. - // However, as the minified stack trace is not of much use anyway, one - // should switch the used version for debugging in such a case. - if (javaException.cause && javaException.cause.backingJsObject) { - err.cause = javaException.cause.backingJsObject; - this.convertGwtStyleError(err.cause); - } - delete err['__java$exception']; - } - } - }]); - - return PromisedWorker; -}(); -},{}],2:[function(require,module,exports){ -(function (global){(function (){ -'use strict'; - -// -------------- FAKE ELEMENTS GWT ASSUMES EXIST -------------- -var $wnd; -if (typeof window !== 'undefined') - $wnd = window -else if (typeof global !== 'undefined') - $wnd = global // nodejs -else if (typeof self !== 'undefined') - $wnd = self // web worker - -var $moduleName, - $moduleBase; - -// -------------- WORKAROUND STRICT MODE, SEE #127 -------------- -var g, i, o; - -// -------------- GENERATED CODE -------------- -function nb(){} -function xb(){} -function Fd(){} -function hh(){} -function lq(){} -function Nq(){} -function ir(){} -function Ws(){} -function Zw(){} -function jx(){} -function rx(){} -function sx(){} -function My(){} -function bA(){} -function mA(){} -function tA(){} -function aB(){} -function dB(){} -function jB(){} -function dC(){} -function keb(){} -function geb(){} -function oeb(){} -function iob(){} -function Job(){} -function Rob(){} -function apb(){} -function ipb(){} -function nrb(){} -function wrb(){} -function Brb(){} -function Prb(){} -function ltb(){} -function svb(){} -function xvb(){} -function zvb(){} -function $xb(){} -function Gzb(){} -function NAb(){} -function VAb(){} -function rBb(){} -function RBb(){} -function TBb(){} -function XBb(){} -function ZBb(){} -function _Bb(){} -function bCb(){} -function dCb(){} -function fCb(){} -function jCb(){} -function rCb(){} -function uCb(){} -function wCb(){} -function yCb(){} -function ACb(){} -function ECb(){} -function FEb(){} -function IEb(){} -function KEb(){} -function MEb(){} -function gFb(){} -function FFb(){} -function JFb(){} -function xGb(){} -function AGb(){} -function YGb(){} -function oHb(){} -function tHb(){} -function xHb(){} -function pIb(){} -function BJb(){} -function kLb(){} -function mLb(){} -function oLb(){} -function qLb(){} -function FLb(){} -function JLb(){} -function KMb(){} -function MMb(){} -function OMb(){} -function YMb(){} -function MNb(){} -function ONb(){} -function aOb(){} -function eOb(){} -function xOb(){} -function BOb(){} -function DOb(){} -function FOb(){} -function IOb(){} -function MOb(){} -function POb(){} -function UOb(){} -function ZOb(){} -function cPb(){} -function gPb(){} -function nPb(){} -function qPb(){} -function tPb(){} -function wPb(){} -function CPb(){} -function qQb(){} -function GQb(){} -function bRb(){} -function gRb(){} -function kRb(){} -function pRb(){} -function wRb(){} -function xSb(){} -function TSb(){} -function VSb(){} -function XSb(){} -function ZSb(){} -function _Sb(){} -function tTb(){} -function DTb(){} -function FTb(){} -function FXb(){} -function hXb(){} -function hWb(){} -function mWb(){} -function CVb(){} -function XXb(){} -function $Xb(){} -function bYb(){} -function lYb(){} -function FYb(){} -function XYb(){} -function aZb(){} -function SZb(){} -function ZZb(){} -function Z_b(){} -function j_b(){} -function j$b(){} -function b$b(){} -function f$b(){} -function n$b(){} -function K_b(){} -function V_b(){} -function b0b(){} -function l0b(){} -function X1b(){} -function _1b(){} -function x3b(){} -function r4b(){} -function w4b(){} -function A4b(){} -function E4b(){} -function I4b(){} -function M4b(){} -function o5b(){} -function q5b(){} -function w5b(){} -function A5b(){} -function E5b(){} -function h6b(){} -function j6b(){} -function l6b(){} -function q6b(){} -function v6b(){} -function y6b(){} -function G6b(){} -function K6b(){} -function N6b(){} -function P6b(){} -function R6b(){} -function b7b(){} -function f7b(){} -function j7b(){} -function n7b(){} -function C7b(){} -function H7b(){} -function J7b(){} -function L7b(){} -function N7b(){} -function P7b(){} -function a8b(){} -function c8b(){} -function e8b(){} -function g8b(){} -function i8b(){} -function m8b(){} -function Z8b(){} -function f9b(){} -function i9b(){} -function o9b(){} -function C9b(){} -function F9b(){} -function K9b(){} -function Q9b(){} -function aac(){} -function bac(){} -function eac(){} -function mac(){} -function pac(){} -function rac(){} -function tac(){} -function xac(){} -function Aac(){} -function Dac(){} -function Iac(){} -function Oac(){} -function Uac(){} -function Ucc(){} -function scc(){} -function ycc(){} -function Acc(){} -function Ccc(){} -function Ncc(){} -function Wcc(){} -function ydc(){} -function Adc(){} -function Gdc(){} -function Ldc(){} -function Zdc(){} -function fec(){} -function Dec(){} -function Gec(){} -function Kec(){} -function efc(){} -function jfc(){} -function nfc(){} -function Bfc(){} -function Ifc(){} -function Lfc(){} -function Rfc(){} -function Ufc(){} -function Zfc(){} -function cgc(){} -function egc(){} -function ggc(){} -function igc(){} -function kgc(){} -function Dgc(){} -function Hgc(){} -function Lgc(){} -function Ngc(){} -function Pgc(){} -function Vgc(){} -function Ygc(){} -function chc(){} -function ehc(){} -function ghc(){} -function ihc(){} -function mhc(){} -function rhc(){} -function uhc(){} -function whc(){} -function yhc(){} -function Ahc(){} -function Chc(){} -function Ghc(){} -function Nhc(){} -function Phc(){} -function Rhc(){} -function Thc(){} -function $hc(){} -function aic(){} -function cic(){} -function eic(){} -function jic(){} -function nic(){} -function pic(){} -function ric(){} -function vic(){} -function yic(){} -function Dic(){} -function Ric(){} -function Zic(){} -function bjc(){} -function djc(){} -function jjc(){} -function njc(){} -function rjc(){} -function tjc(){} -function zjc(){} -function Djc(){} -function Fjc(){} -function Ljc(){} -function Pjc(){} -function Rjc(){} -function fkc(){} -function Kkc(){} -function Mkc(){} -function Okc(){} -function Qkc(){} -function Skc(){} -function Ukc(){} -function Wkc(){} -function clc(){} -function elc(){} -function klc(){} -function mlc(){} -function olc(){} -function qlc(){} -function wlc(){} -function ylc(){} -function Alc(){} -function Jlc(){} -function Joc(){} -function poc(){} -function roc(){} -function toc(){} -function voc(){} -function Boc(){} -function Foc(){} -function Hoc(){} -function Loc(){} -function Noc(){} -function Poc(){} -function qnc(){} -function unc(){} -function upc(){} -function kpc(){} -function mpc(){} -function opc(){} -function qpc(){} -function ypc(){} -function Cpc(){} -function Mpc(){} -function Qpc(){} -function dqc(){} -function jqc(){} -function Aqc(){} -function Eqc(){} -function Gqc(){} -function Sqc(){} -function arc(){} -function lrc(){} -function zrc(){} -function Hrc(){} -function bsc(){} -function dsc(){} -function fsc(){} -function ksc(){} -function msc(){} -function Asc(){} -function Csc(){} -function Esc(){} -function Ksc(){} -function Nsc(){} -function Ssc(){} -function CCc(){} -function tGc(){} -function aHc(){} -function gHc(){} -function nIc(){} -function PJc(){} -function XKc(){} -function fLc(){} -function hLc(){} -function lLc(){} -function eNc(){} -function IOc(){} -function MOc(){} -function WOc(){} -function YOc(){} -function $Oc(){} -function cPc(){} -function iPc(){} -function mPc(){} -function oPc(){} -function qPc(){} -function sPc(){} -function wPc(){} -function APc(){} -function FPc(){} -function HPc(){} -function NPc(){} -function PPc(){} -function TPc(){} -function VPc(){} -function ZPc(){} -function _Pc(){} -function bQc(){} -function dQc(){} -function SQc(){} -function hRc(){} -function HRc(){} -function HSc(){} -function pSc(){} -function xSc(){} -function zSc(){} -function BSc(){} -function DSc(){} -function FSc(){} -function CTc(){} -function ITc(){} -function KTc(){} -function MTc(){} -function XTc(){} -function ZTc(){} -function jVc(){} -function lVc(){} -function zVc(){} -function IVc(){} -function KVc(){} -function KWc(){} -function uWc(){} -function xWc(){} -function AWc(){} -function QWc(){} -function UWc(){} -function qXc(){} -function KXc(){} -function OXc(){} -function SXc(){} -function $Xc(){} -function mYc(){} -function rYc(){} -function zYc(){} -function DYc(){} -function FYc(){} -function HYc(){} -function JYc(){} -function cZc(){} -function gZc(){} -function iZc(){} -function pZc(){} -function tZc(){} -function vZc(){} -function AZc(){} -function GZc(){} -function l_c(){} -function l1c(){} -function b1c(){} -function d1c(){} -function h1c(){} -function n1c(){} -function r1c(){} -function v1c(){} -function x1c(){} -function D1c(){} -function H1c(){} -function L1c(){} -function R1c(){} -function V1c(){} -function Z1c(){} -function Z0c(){} -function a0c(){} -function c0c(){} -function e0c(){} -function k0c(){} -function o0c(){} -function b2c(){} -function l2c(){} -function p2c(){} -function Y2c(){} -function _2c(){} -function A3c(){} -function F3c(){} -function I3c(){} -function K3c(){} -function M3c(){} -function Q3c(){} -function U3c(){} -function c5c(){} -function D5c(){} -function G5c(){} -function J5c(){} -function N5c(){} -function V5c(){} -function p6c(){} -function s6c(){} -function H6c(){} -function K6c(){} -function _7c(){} -function h8c(){} -function j8c(){} -function o8c(){} -function r8c(){} -function u8c(){} -function R8c(){} -function X8c(){} -function o9c(){} -function s9c(){} -function x9c(){} -function Qad(){} -function rcd(){} -function Xcd(){} -function vdd(){} -function Tdd(){} -function _dd(){} -function qed(){} -function sed(){} -function ved(){} -function Hed(){} -function Zed(){} -function bfd(){} -function ifd(){} -function Gfd(){} -function Ifd(){} -function Igd(){} -function agd(){} -function dgd(){} -function pgd(){} -function Hgd(){} -function Kgd(){} -function Mgd(){} -function Ogd(){} -function Qgd(){} -function Sgd(){} -function Ugd(){} -function Wgd(){} -function Ygd(){} -function $gd(){} -function ahd(){} -function chd(){} -function ehd(){} -function ghd(){} -function ihd(){} -function khd(){} -function mhd(){} -function ohd(){} -function qhd(){} -function shd(){} -function Shd(){} -function lkd(){} -function znd(){} -function Jpd(){} -function jrd(){} -function Mrd(){} -function Qrd(){} -function Urd(){} -function Yrd(){} -function Yud(){} -function eud(){} -function asd(){} -function Lsd(){} -function btd(){} -function dtd(){} -function jtd(){} -function otd(){} -function ztd(){} -function Xxd(){} -function $yd(){} -function rzd(){} -function Rzd(){} -function KAd(){} -function hCd(){} -function _Cd(){} -function _Sd(){} -function OSd(){} -function BDd(){} -function BId(){} -function JId(){} -function YHd(){} -function fLd(){} -function cPd(){} -function hQd(){} -function AQd(){} -function kUd(){} -function VUd(){} -function pVd(){} -function W$d(){} -function Z$d(){} -function a_d(){} -function i_d(){} -function v_d(){} -function y_d(){} -function f1d(){} -function L5d(){} -function v6d(){} -function b8d(){} -function e8d(){} -function h8d(){} -function k8d(){} -function n8d(){} -function q8d(){} -function t8d(){} -function w8d(){} -function z8d(){} -function X9d(){} -function _9d(){} -function Mae(){} -function cbe(){} -function ebe(){} -function hbe(){} -function kbe(){} -function nbe(){} -function qbe(){} -function tbe(){} -function wbe(){} -function zbe(){} -function Cbe(){} -function Fbe(){} -function Ibe(){} -function Lbe(){} -function Obe(){} -function Rbe(){} -function Ube(){} -function Xbe(){} -function $be(){} -function bce(){} -function ece(){} -function hce(){} -function kce(){} -function nce(){} -function qce(){} -function tce(){} -function wce(){} -function zce(){} -function Cce(){} -function Fce(){} -function Ice(){} -function Lce(){} -function Oce(){} -function Rce(){} -function Uce(){} -function Xce(){} -function $ce(){} -function bde(){} -function ede(){} -function hde(){} -function kde(){} -function nde(){} -function qde(){} -function tde(){} -function wde(){} -function Hie(){} -function rke(){} -function rne(){} -function Ene(){} -function Gne(){} -function Jne(){} -function Mne(){} -function Pne(){} -function Sne(){} -function Vne(){} -function Yne(){} -function _ne(){} -function yme(){} -function coe(){} -function foe(){} -function ioe(){} -function loe(){} -function ooe(){} -function roe(){} -function uoe(){} -function xoe(){} -function Aoe(){} -function Doe(){} -function Goe(){} -function Joe(){} -function Moe(){} -function Poe(){} -function Soe(){} -function Voe(){} -function Yoe(){} -function _oe(){} -function cpe(){} -function fpe(){} -function ipe(){} -function lpe(){} -function ope(){} -function rpe(){} -function upe(){} -function xpe(){} -function Ape(){} -function Dpe(){} -function Gpe(){} -function Jpe(){} -function Mpe(){} -function Ppe(){} -function Spe(){} -function Vpe(){} -function Ype(){} -function _pe(){} -function cqe(){} -function fqe(){} -function iqe(){} -function lqe(){} -function oqe(){} -function rqe(){} -function uqe(){} -function Tqe(){} -function sue(){} -function Cue(){} -function A2b(a){} -function J3d(a){} -function zl(){wb()} -function z7b(){s7b()} -function ZHb(){YHb()} -function fSb(){eSb()} -function vSb(){tSb()} -function PUb(){OUb()} -function AVb(){yVb()} -function RVb(){QVb()} -function fWb(){dWb()} -function N5b(){H5b()} -function $9b(){U9b()} -function Lcc(){Hcc()} -function pdc(){Zcc()} -function pec(){iec()} -function pGc(){nGc()} -function jGc(){gGc()} -function YGc(){SGc()} -function cGc(){_Fc()} -function NFc(){KFc()} -function xgc(){sgc()} -function xHc(){tHc()} -function pHc(){lHc()} -function IHc(){CHc()} -function XHc(){RHc()} -function boc(){Mnc()} -function yqc(){mqc()} -function Pzc(){Ozc()} -function ACc(){yCc()} -function aKc(){YJc()} -function FLc(){DLc()} -function DNc(){ANc()} -function TNc(){JNc()} -function iQc(){gQc()} -function WRc(){TRc()} -function C$c(){B$c()} -function J0c(){B0c()} -function x0c(){r0c()} -function j_c(){h_c()} -function N_c(){H_c()} -function V_c(){R_c()} -function E4c(){D4c()} -function a5c(){$4c()} -function v7c(){u7c()} -function Z7c(){X7c()} -function pcd(){ncd()} -function Lcd(){Kcd()} -function Vcd(){Tcd()} -function fUd(){TTd()} -function Bfd(){Afd()} -function jkd(){hkd()} -function vmd(){umd()} -function xnd(){vnd()} -function Hpd(){Fpd()} -function HYd(){lYd()} -function yAd(){qAd()} -function gke(){rue()} -function Yxb(a){uFb(a)} -function Yb(a){this.a=a} -function cc(a){this.a=a} -function df(a){this.a=a} -function kf(a){this.a=a} -function kj(a){this.a=a} -function qj(a){this.a=a} -function Lj(a){this.a=a} -function jh(a){this.a=a} -function th(a){this.a=a} -function Bh(a){this.a=a} -function Xh(a){this.a=a} -function Xn(a){this.a=a} -function Di(a){this.a=a} -function Ki(a){this.a=a} -function Ik(a){this.a=a} -function Qk(a){this.a=a} -function mp(a){this.a=a} -function Lp(a){this.a=a} -function iq(a){this.a=a} -function Eq(a){this.a=a} -function Vq(a){this.a=a} -function Or(a){this.a=a} -function $r(a){this.b=a} -function Aj(a){this.c=a} -function vu(a){this.a=a} -function vw(a){this.a=a} -function gw(a){this.a=a} -function lw(a){this.a=a} -function Iw(a){this.a=a} -function Nw(a){this.a=a} -function Sw(a){this.a=a} -function ex(a){this.a=a} -function fx(a){this.a=a} -function lx(a){this.a=a} -function my(a){this.a=a} -function qy(a){this.a=a} -function Oy(a){this.a=a} -function NB(a){this.a=a} -function XB(a){this.a=a} -function hC(a){this.a=a} -function vC(a){this.a=a} -function MB(){this.a=[]} -function HEb(a,b){a.a=b} -function E2b(a,b){a.a=b} -function F2b(a,b){a.b=b} -function PRb(a,b){a.b=b} -function RRb(a,b){a.b=b} -function QJb(a,b){a.j=b} -function hQb(a,b){a.g=b} -function iQb(a,b){a.i=b} -function _Tb(a,b){a.c=b} -function G2b(a,b){a.c=b} -function H2b(a,b){a.d=b} -function aUb(a,b){a.d=b} -function h3b(a,b){a.k=b} -function O3b(a,b){a.c=b} -function Tmc(a,b){a.c=b} -function Smc(a,b){a.a=b} -function DJc(a,b){a.a=b} -function EJc(a,b){a.f=b} -function NSc(a,b){a.a=b} -function OSc(a,b){a.b=b} -function PSc(a,b){a.d=b} -function QSc(a,b){a.i=b} -function RSc(a,b){a.o=b} -function SSc(a,b){a.r=b} -function yUc(a,b){a.a=b} -function zUc(a,b){a.b=b} -function q3c(a,b){a.e=b} -function r3c(a,b){a.f=b} -function s3c(a,b){a.g=b} -function Y9c(a,b){a.e=b} -function Z9c(a,b){a.f=b} -function kad(a,b){a.f=b} -function Ntd(a,b){a.a=b} -function Otd(a,b){a.b=b} -function BWd(a,b){a.n=b} -function $ee(a,b){a.a=b} -function _ee(a,b){a.c=b} -function ife(a,b){a.c=b} -function Efe(a,b){a.c=b} -function hfe(a,b){a.a=b} -function Dfe(a,b){a.a=b} -function jfe(a,b){a.d=b} -function Ffe(a,b){a.d=b} -function kfe(a,b){a.e=b} -function Gfe(a,b){a.e=b} -function lfe(a,b){a.g=b} -function Hfe(a,b){a.f=b} -function Ife(a,b){a.j=b} -function wme(a,b){a.a=b} -function Fme(a,b){a.a=b} -function xme(a,b){a.b=b} -function gmc(a){a.b=a.a} -function Lg(a){a.c=a.d.d} -function fgb(a){this.a=a} -function zgb(a){this.a=a} -function Xgb(a){this.a=a} -function Xkb(a){this.a=a} -function mkb(a){this.a=a} -function reb(a){this.a=a} -function Seb(a){this.a=a} -function bfb(a){this.a=a} -function Tfb(a){this.a=a} -function blb(a){this.a=a} -function glb(a){this.a=a} -function llb(a){this.a=a} -function Ulb(a){this.a=a} -function _lb(a){this.a=a} -function Plb(a){this.b=a} -function Ppb(a){this.b=a} -function xpb(a){this.b=a} -function mpb(a){this.a=a} -function Yqb(a){this.a=a} -function uqb(a){this.c=a} -function Anb(a){this.c=a} -function zwb(a){this.c=a} -function Dkb(a){this.d=a} -function brb(a){this.a=a} -function Frb(a){this.a=a} -function hsb(a){this.a=a} -function ctb(a){this.a=a} -function cxb(a){this.a=a} -function axb(a){this.a=a} -function exb(a){this.a=a} -function gxb(a){this.a=a} -function wub(a){this.a=a} -function zAb(a){this.a=a} -function JAb(a){this.a=a} -function LAb(a){this.a=a} -function PAb(a){this.a=a} -function VBb(a){this.a=a} -function lCb(a){this.a=a} -function nCb(a){this.a=a} -function pCb(a){this.a=a} -function CCb(a){this.a=a} -function GCb(a){this.a=a} -function bDb(a){this.a=a} -function dDb(a){this.a=a} -function fDb(a){this.a=a} -function uDb(a){this.a=a} -function $Db(a){this.a=a} -function aEb(a){this.a=a} -function eEb(a){this.a=a} -function OEb(a){this.a=a} -function SEb(a){this.a=a} -function SFb(a){this.a=a} -function HFb(a){this.a=a} -function NFb(a){this.a=a} -function WGb(a){this.a=a} -function HJb(a){this.a=a} -function PJb(a){this.a=a} -function kNb(a){this.a=a} -function tOb(a){this.a=a} -function APb(a){this.a=a} -function IQb(a){this.a=a} -function bTb(a){this.a=a} -function dTb(a){this.a=a} -function wTb(a){this.a=a} -function GWb(a){this.a=a} -function UWb(a){this.a=a} -function WWb(a){this.a=a} -function fXb(a){this.a=a} -function jXb(a){this.a=a} -function M0b(a){this.a=a} -function r1b(a){this.a=a} -function D1b(a){this.e=a} -function T3b(a){this.a=a} -function W3b(a){this.a=a} -function _3b(a){this.a=a} -function c4b(a){this.a=a} -function s5b(a){this.a=a} -function u5b(a){this.a=a} -function y5b(a){this.a=a} -function C5b(a){this.a=a} -function Q5b(a){this.a=a} -function S5b(a){this.a=a} -function U5b(a){this.a=a} -function W5b(a){this.a=a} -function l7b(a){this.a=a} -function p7b(a){this.a=a} -function k8b(a){this.a=a} -function L8b(a){this.a=a} -function Rac(a){this.a=a} -function Xac(a){this.a=a} -function $ac(a){this.a=a} -function bbc(a){this.a=a} -function Cdc(a){this.a=a} -function Edc(a){this.a=a} -function Ehc(a){this.a=a} -function khc(a){this.a=a} -function Ihc(a){this.a=a} -function qfc(a){this.a=a} -function tfc(a){this.a=a} -function Wfc(a){this.a=a} -function Fic(a){this.a=a} -function Vic(a){this.a=a} -function fjc(a){this.a=a} -function pjc(a){this.a=a} -function ckc(a){this.a=a} -function hkc(a){this.a=a} -function Ykc(a){this.a=a} -function $kc(a){this.a=a} -function alc(a){this.a=a} -function glc(a){this.a=a} -function ilc(a){this.a=a} -function slc(a){this.a=a} -function Clc(a){this.a=a} -function xoc(a){this.a=a} -function zoc(a){this.a=a} -function spc(a){this.a=a} -function Vqc(a){this.a=a} -function Xqc(a){this.a=a} -function Gsc(a){this.a=a} -function Isc(a){this.a=a} -function JGc(a){this.a=a} -function NGc(a){this.a=a} -function MHc(a){this.a=a} -function JIc(a){this.a=a} -function fJc(a){this.a=a} -function BJc(a){this.a=a} -function dJc(a){this.c=a} -function Trc(a){this.b=a} -function eKc(a){this.a=a} -function IKc(a){this.a=a} -function KKc(a){this.a=a} -function MKc(a){this.a=a} -function yLc(a){this.a=a} -function HMc(a){this.a=a} -function LMc(a){this.a=a} -function PMc(a){this.a=a} -function TMc(a){this.a=a} -function XMc(a){this.a=a} -function ZMc(a){this.a=a} -function aNc(a){this.a=a} -function jNc(a){this.a=a} -function aPc(a){this.a=a} -function gPc(a){this.a=a} -function kPc(a){this.a=a} -function yPc(a){this.a=a} -function CPc(a){this.a=a} -function JPc(a){this.a=a} -function RPc(a){this.a=a} -function XPc(a){this.a=a} -function mRc(a){this.a=a} -function xTc(a){this.a=a} -function CWc(a){this.a=a} -function EWc(a){this.a=a} -function IWc(a){this.a=a} -function OWc(a){this.a=a} -function dXc(a){this.a=a} -function gXc(a){this.a=a} -function EXc(a){this.a=a} -function WXc(a){this.a=a} -function YXc(a){this.a=a} -function aYc(a){this.a=a} -function cYc(a){this.a=a} -function eYc(a){this.a=a} -function iYc(a){this.a=a} -function i0c(a){this.a=a} -function g0c(a){this.a=a} -function P1c(a){this.a=a} -function Sad(a){this.a=a} -function Uad(a){this.a=a} -function Wad(a){this.a=a} -function Yad(a){this.a=a} -function cbd(a){this.a=a} -function ydd(a){this.a=a} -function Kdd(a){this.a=a} -function Mdd(a){this.a=a} -function _ed(a){this.a=a} -function dfd(a){this.a=a} -function Kfd(a){this.a=a} -function prd(a){this.a=a} -function $rd(a){this.a=a} -function csd(a){this.a=a} -function Usd(a){this.a=a} -function Vtd(a){this.a=a} -function wud(a){this.a=a} -function Rud(a){this.f=a} -function LEd(a){this.a=a} -function UEd(a){this.a=a} -function VEd(a){this.a=a} -function WEd(a){this.a=a} -function XEd(a){this.a=a} -function YEd(a){this.a=a} -function ZEd(a){this.a=a} -function $Ed(a){this.a=a} -function _Ed(a){this.a=a} -function aFd(a){this.a=a} -function gFd(a){this.a=a} -function iFd(a){this.a=a} -function jFd(a){this.a=a} -function kFd(a){this.a=a} -function lFd(a){this.a=a} -function nFd(a){this.a=a} -function qFd(a){this.a=a} -function wFd(a){this.a=a} -function xFd(a){this.a=a} -function zFd(a){this.a=a} -function AFd(a){this.a=a} -function BFd(a){this.a=a} -function CFd(a){this.a=a} -function DFd(a){this.a=a} -function MFd(a){this.a=a} -function OFd(a){this.a=a} -function QFd(a){this.a=a} -function SFd(a){this.a=a} -function uGd(a){this.a=a} -function QGd(a){this.a=a} -function jGd(a){this.b=a} -function YOd(a){this.a=a} -function ePd(a){this.a=a} -function kPd(a){this.a=a} -function qPd(a){this.a=a} -function IPd(a){this.a=a} -function w$d(a){this.a=a} -function e_d(a){this.a=a} -function Q_d(a){this.b=a} -function c1d(a){this.a=a} -function c2d(a){this.a=a} -function l5d(a){this.a=a} -function I9d(a){this.a=a} -function L6d(a){this.c=a} -function t7d(a){this.e=a} -function pae(a){this.a=a} -function xae(a){this.a=a} -function Zde(a){this.a=a} -function Sde(a){this.d=a} -function mee(a){this.a=a} -function uje(a){this.a=a} -function Bte(a){this.a=a} -function Wse(a){this.e=a} -function Xsd(){this.a=0} -function Tsb(){akb(this)} -function bnb(){Pmb(this)} -function cHb(){bHb(this)} -function I2b(){A2b(this)} -function s2d(){this.c=d2d} -function Prc(a,b){a.b+=b} -function Uje(a,b){b.Wb(a)} -function UC(a){return a.a} -function nC(a){return a.a} -function BC(a){return a.a} -function TB(a){return a.a} -function _B(a){return a.a} -function Adb(a){return a.e} -function gC(){return null} -function MC(){return null} -function leb(){MId();OId()} -function qMb(a){a.b.Of(a.e)} -function A$b(a){a.b=new Ri} -function A8b(a,b){a.b=b-a.b} -function x8b(a,b){a.a=b-a.a} -function ZEb(a,b){a.push(b)} -function bFb(a,b){a.sort(b)} -function Q5c(a,b){b.jd(a.a)} -function Voc(a,b){Q3b(b,a)} -function tp(a,b,c){a.Yd(c,b)} -function Ss(a,b){a.e=b;b.b=a} -function im(a){_l();this.a=a} -function xq(a){_l();this.a=a} -function Gq(a){_l();this.a=a} -function Xq(a){tm();this.a=a} -function gA(a){fA();eA.le(a)} -function vA(){vA=geb;new Tsb} -function xz(){mz.call(this)} -function Ceb(){mz.call(this)} -function ueb(){xz.call(this)} -function yeb(){xz.call(this)} -function Hfb(){xz.call(this)} -function _fb(){xz.call(this)} -function cgb(){xz.call(this)} -function Ngb(){xz.call(this)} -function jib(){xz.call(this)} -function Jrb(){xz.call(this)} -function Srb(){xz.call(this)} -function Dvb(){xz.call(this)} -function Ied(){xz.call(this)} -function R1d(){this.a=this} -function k1d(){this.Bb|=256} -function vWb(){this.b=new Et} -function aFb(a,b){a.length=b} -function dyb(a,b){Rmb(a.a,b)} -function jNb(a,b){LKb(a.c,b)} -function qRc(a,b){Ysb(a.b,b)} -function VOd(a,b){UNd(a.a,b)} -function WOd(a,b){VNd(a.a,b)} -function eZd(a,b){qvd(a.e,b)} -function Cke(a){bge(a.c,a.b)} -function uj(a,b){a.kc().Nb(b)} -function Ufb(a){this.a=Zfb(a)} -function _sb(){this.a=new Tsb} -function $Ab(){this.a=new Tsb} -function xAb(){this.a=new dzb} -function gyb(){this.a=new bnb} -function BIb(){this.a=new bnb} -function GIb(){this.a=new bnb} -function wIb(){this.a=new pIb} -function gJb(){this.a=new DIb} -function TTb(){this.a=new DTb} -function jGb(){this.a=new fGb} -function qGb(){this.a=new kGb} -function q_b(){this.a=new bnb} -function E_b(){this.a=new bnb} -function EZb(){this.a=new bnb} -function J$b(){this.a=new bnb} -function YNb(){this.d=new bnb} -function lXb(){this.a=new RWb} -function y_b(){this.a=new _sb} -function k5b(){this.a=new Tsb} -function E0b(){this.b=new Tsb} -function jHc(){this.b=new bnb} -function ZNc(){this.e=new bnb} -function ahc(){this.a=new boc} -function UQc(){this.d=new bnb} -function uRc(){tRc.call(this)} -function BRc(){tRc.call(this)} -function VOc(){bnb.call(this)} -function web(){ueb.call(this)} -function Fyb(){gyb.call(this)} -function fKb(){RJb.call(this)} -function N$b(){J$b.call(this)} -function P2b(){I2b.call(this)} -function T2b(){P2b.call(this)} -function z3b(){I2b.call(this)} -function C3b(){z3b.call(this)} -function cUc(){aUc.call(this)} -function hUc(){aUc.call(this)} -function mUc(){aUc.call(this)} -function Hdd(){Ddd.call(this)} -function ACd(){$yd.call(this)} -function PCd(){$yd.call(this)} -function Ejd(){Yub.call(this)} -function LQd(){wQd.call(this)} -function lRd(){wQd.call(this)} -function MSd(){Tsb.call(this)} -function VSd(){Tsb.call(this)} -function eTd(){Tsb.call(this)} -function mXd(){HWd.call(this)} -function i1d(){_sb.call(this)} -function A1d(){k1d.call(this)} -function q4d(){dWd.call(this)} -function O5d(){Tsb.call(this)} -function R5d(){dWd.call(this)} -function lae(){Tsb.call(this)} -function Cae(){Tsb.call(this)} -function ome(){kUd.call(this)} -function Hme(){ome.call(this)} -function Nme(){kUd.call(this)} -function Gre(){Tqe.call(this)} -function aUc(){this.a=new _sb} -function nZc(){this.a=new Tsb} -function DZc(){this.a=new bnb} -function Ddd(){this.a=new Tsb} -function Oqd(){this.a=new Yub} -function Oed(){this.j=new bnb} -function obd(){this.a=new nbd} -function wQd(){this.a=new AQd} -function R5c(){this.a=new V5c} -function wb(){wb=geb;vb=new xb} -function Wk(){Wk=geb;Vk=new Xk} -function kl(){kl=geb;jl=new ll} -function ll(){Qk.call(this,'')} -function Xk(){Qk.call(this,'')} -function Dd(a){yd.call(this,a)} -function Hd(a){yd.call(this,a)} -function xh(a){th.call(this,a)} -function $h(a){Wc.call(this,a)} -function Qi(a){Wc.call(this,a)} -function wi(a){$h.call(this,a)} -function Sp(a){$h.call(this,a)} -function Js(a){$h.call(this,a)} -function Jp(a){Xo.call(this,a)} -function Qp(a){Xo.call(this,a)} -function dq(a){ho.call(this,a)} -function Fv(a){uv.call(this,a)} -function aw(a){Tr.call(this,a)} -function cw(a){Tr.call(this,a)} -function _w(a){Tr.call(this,a)} -function Mx(a){Gn.call(this,a)} -function Nx(a){Mx.call(this,a)} -function yz(a){nz.call(this,a)} -function aC(a){yz.call(this,a)} -function uC(){vC.call(this,{})} -function cC(){cC=geb;bC=new dC} -function zs(){zs=geb;ys=new As} -function Az(){Az=geb;zz=new nb} -function $z(){$z=geb;Zz=new bA} -function $A(){$A=geb;ZA=new aB} -function Ovb(a){Kvb();this.a=a} -function FKc(a){jKc();this.a=a} -function zud(a){nud();this.f=a} -function Bud(a){nud();this.f=a} -function Cde(a){KMd();this.a=a} -function Lyb(a){a.b=null;a.c=0} -function kz(a,b){a.e=b;hz(a,b)} -function NYb(a,b){a.a=b;PYb(a)} -function cLb(a,b,c){a.a[b.g]=c} -function zsd(a,b,c){Hsd(c,a,b)} -function shc(a,b){Xmc(b.i,a.n)} -function HCc(a,b){ICc(a).Cd(b)} -function yw(a,b){a.a.ec().Mc(b)} -function ns(a,b){return a.g-b.g} -function AUb(a,b){return a*a/b} -function Heb(a){return uFb(a),a} -function Kfb(a){return uFb(a),a} -function Mfb(a){return uFb(a),a} -function JC(a){return new hC(a)} -function LC(a){return new OC(a)} -function shb(a){return uFb(a),a} -function Chb(a){return uFb(a),a} -function teb(a){yz.call(this,a)} -function veb(a){yz.call(this,a)} -function zeb(a){yz.call(this,a)} -function Aeb(a){nz.call(this,a)} -function Ifb(a){yz.call(this,a)} -function agb(a){yz.call(this,a)} -function dgb(a){yz.call(this,a)} -function Mgb(a){yz.call(this,a)} -function Ogb(a){yz.call(this,a)} -function kib(a){yz.call(this,a)} -function Jed(a){yz.call(this,a)} -function Ked(a){yz.call(this,a)} -function CDd(a){yz.call(this,a)} -function Mle(a){yz.call(this,a)} -function Lqe(a){yz.call(this,a)} -function mob(a){uFb(a);this.a=a} -function yYb(a){sYb(a);return a} -function Nnb(a){Snb(a,a.length)} -function nmb(a){return a.b==a.c} -function Vyb(a){return !!a&&a.b} -function gLb(a){return !!a&&a.k} -function hLb(a){return !!a&&a.j} -function F_b(a,b,c){a.c.Ef(b,c)} -function Ts(a,b){a.be(b);b.ae(a)} -function Fy(a){_l();this.a=Qb(a)} -function Gb(){this.a=WD(Qb(pve))} -function jc(){throw Adb(new jib)} -function jn(){throw Adb(new jib)} -function Hh(){throw Adb(new jib)} -function Xi(){throw Adb(new jib)} -function Xj(){throw Adb(new jib)} -function Yj(){throw Adb(new jib)} -function Qz(){Qz=geb;!!(fA(),eA)} -function Qhb(){reb.call(this,'')} -function Rhb(){reb.call(this,'')} -function bib(){reb.call(this,'')} -function cib(){reb.call(this,'')} -function eib(a){veb.call(this,a)} -function xeb(a){veb.call(this,a)} -function Vgb(a){agb.call(this,a)} -function Lqb(a){xpb.call(this,a)} -function Sqb(a){Lqb.call(this,a)} -function irb(a){Upb.call(this,a)} -function pc(a){qc.call(this,a,0)} -function Ri(){Si.call(this,12,3)} -function WC(a,b){return xfb(a,b)} -function cFb(a,b){return dD(a,b)} -function Reb(a,b){return a.a-b.a} -function afb(a,b){return a.a-b.a} -function Wgb(a,b){return a.a-b.a} -function pC(b,a){return a in b.a} -function Vvb(a){return a.a?a.b:0} -function cwb(a){return a.a?a.b:0} -function Fxb(a,b,c){b.Cd(a.a[c])} -function Kxb(a,b,c){b.Pe(a.a[c])} -function uKb(a,b){a.b=new sjd(b)} -function QGb(a,b){a.b=b;return a} -function RGb(a,b){a.c=b;return a} -function SGb(a,b){a.f=b;return a} -function TGb(a,b){a.g=b;return a} -function yJb(a,b){a.a=b;return a} -function zJb(a,b){a.f=b;return a} -function AJb(a,b){a.k=b;return a} -function WNb(a,b){a.a=b;return a} -function XNb(a,b){a.e=b;return a} -function BYb(a,b){a.e=b;return a} -function CYb(a,b){a.f=b;return a} -function BRb(a,b){a.b=true;a.d=b} -function WNc(a,b){return a.b-b.b} -function KSc(a,b){return a.g-b.g} -function pmc(a,b){return a?0:b-1} -function qKc(a,b){return a?0:b-1} -function pKc(a,b){return a?b-1:0} -function uVc(a,b){return a.s-b.s} -function Xed(a,b){return b.rg(a)} -function Xfd(a,b){a.b=b;return a} -function Wfd(a,b){a.a=b;return a} -function Yfd(a,b){a.c=b;return a} -function Zfd(a,b){a.d=b;return a} -function $fd(a,b){a.e=b;return a} -function _fd(a,b){a.f=b;return a} -function mgd(a,b){a.a=b;return a} -function ngd(a,b){a.b=b;return a} -function ogd(a,b){a.c=b;return a} -function Khd(a,b){a.c=b;return a} -function Jhd(a,b){a.b=b;return a} -function Lhd(a,b){a.d=b;return a} -function Mhd(a,b){a.e=b;return a} -function Nhd(a,b){a.f=b;return a} -function Ohd(a,b){a.g=b;return a} -function Phd(a,b){a.a=b;return a} -function Qhd(a,b){a.i=b;return a} -function Rhd(a,b){a.j=b;return a} -function coc(a,b){Mnc();P3b(b,a)} -function bbd(a,b,c){_ad(a.a,b,c)} -function Fjd(a){Zub.call(this,a)} -function TRb(a){SRb.call(this,a)} -function pLc(a){CIc.call(this,a)} -function ILc(a){CIc.call(this,a)} -function gLd(a){ZHd.call(this,a)} -function DPd(a){xPd.call(this,a)} -function FPd(a){xPd.call(this,a)} -function x2b(){y2b.call(this,'')} -function pjd(){this.a=0;this.b=0} -function ATc(){this.b=0;this.a=0} -function lXd(a,b){a.b=0;bWd(a,b)} -function Kqd(a,b){a.k=b;return a} -function Lqd(a,b){a.j=b;return a} -function vfe(a,b){a.c=b;a.b=true} -function Etb(){Etb=geb;Dtb=Gtb()} -function bvd(){bvd=geb;avd=OAd()} -function dvd(){dvd=geb;cvd=aCd()} -function MId(){MId=geb;LId=ygd()} -function jTd(){jTd=geb;iTd=Qae()} -function Ole(){Ole=geb;Nle=vne()} -function Qle(){Qle=geb;Ple=Cne()} -function mfb(a){return a.e&&a.e()} -function FD(a){return a.l|a.m<<22} -function Oc(a,b){return a.c._b(b)} -function En(a,b){return Wv(a.b,b)} -function Vd(a){return !a?null:a.d} -function Vv(a){return !a?null:a.g} -function $v(a){return !a?null:a.i} -function nfb(a){lfb(a);return a.o} -function Khb(a,b){a.a+=b;return a} -function Lhb(a,b){a.a+=b;return a} -function Ohb(a,b){a.a+=b;return a} -function Uhb(a,b){a.a+=b;return a} -function _wb(a,b){while(a.Bd(b));} -function atb(a){this.a=new Usb(a)} -function $tb(){throw Adb(new jib)} -function qpb(){throw Adb(new jib)} -function rpb(){throw Adb(new jib)} -function spb(){throw Adb(new jib)} -function vpb(){throw Adb(new jib)} -function Opb(){throw Adb(new jib)} -function yAb(a){this.a=new ezb(a)} -function H2c(){this.a=new Wed(s0)} -function TVc(){this.b=new Wed(H$)} -function l6c(){this.a=new Wed(V0)} -function $ad(){this.b=new Wed(I1)} -function nbd(){this.b=new Wed(I1)} -function T2c(a){this.a=0;this.b=a} -function Bib(a){tib();vib(this,a)} -function QDb(a){LCb(a);return a.a} -function dvb(a){return a.b!=a.d.c} -function AMc(a,b){return a.d[b.p]} -function ued(a,b){return ned(a,b)} -function $Eb(a,b,c){a.splice(b,c)} -function ixb(a,b){while(a.Re(b));} -function NKb(a){a.c?MKb(a):OKb(a)} -function mQd(){throw Adb(new jib)} -function nQd(){throw Adb(new jib)} -function oQd(){throw Adb(new jib)} -function pQd(){throw Adb(new jib)} -function qQd(){throw Adb(new jib)} -function rQd(){throw Adb(new jib)} -function sQd(){throw Adb(new jib)} -function tQd(){throw Adb(new jib)} -function uQd(){throw Adb(new jib)} -function vQd(){throw Adb(new jib)} -function zue(){throw Adb(new Dvb)} -function Aue(){throw Adb(new Dvb)} -function oue(a){this.a=new Dte(a)} -function Dte(a){Cte(this,a,sse())} -function cve(a){return !a||bve(a)} -function Cqe(a){return xqe[a]!=-1} -function Yz(){Nz!=0&&(Nz=0);Pz=-1} -function beb(){_db==null&&(_db=[])} -function eg(a,b){zf.call(this,a,b)} -function gg(a,b){eg.call(this,a,b)} -function Nj(a,b){this.a=a;this.b=b} -function hk(a,b){this.a=a;this.b=b} -function nk(a,b){this.a=a;this.b=b} -function pk(a,b){this.a=a;this.b=b} -function xk(a,b){this.a=a;this.b=b} -function zk(a,b){this.a=a;this.b=b} -function Kk(a,b){this.a=a;this.b=b} -function ne(a,b){this.e=a;this.d=b} -function Hf(a,b){this.b=a;this.c=b} -function cp(a,b){this.b=a;this.a=b} -function Cp(a,b){this.b=a;this.a=b} -function qr(a,b){this.b=a;this.a=b} -function Rr(a,b){this.b=a;this.a=b} -function vr(a,b){this.a=a;this.b=b} -function su(a,b){this.a=a;this.b=b} -function Hu(a,b){this.a=a;this.f=b} -function gp(a,b){this.g=a;this.i=b} -function qs(a,b){this.f=a;this.g=b} -function Gv(a,b){this.b=a;this.c=b} -function Wc(a){Lb(a.dc());this.c=a} -function Ex(a,b){this.a=a;this.b=b} -function ey(a,b){this.a=a;this.b=b} -function pv(a){this.a=RD(Qb(a),15)} -function uv(a){this.a=RD(Qb(a),15)} -function nw(a){this.a=RD(Qb(a),85)} -function rf(a){this.b=RD(Qb(a),85)} -function Tr(a){this.b=RD(Qb(a),51)} -function uB(){this.q=new $wnd.Date} -function CC(a,b){this.a=a;this.b=b} -function Bt(a,b){return Ujb(a.b,b)} -function tpb(a,b){return a.b.Hc(b)} -function upb(a,b){return a.b.Ic(b)} -function wpb(a,b){return a.b.Qc(b)} -function Pqb(a,b){return a.b.Hc(b)} -function pqb(a,b){return a.c.uc(b)} -function rqb(a,b){return pb(a.c,b)} -function Zsb(a,b){return a.a._b(b)} -function Xp(a,b){return a>b&&b0} -function Ldb(a,b){return Ddb(a,b)<0} -function Urb(a,b){return Bsb(a.a,b)} -function Beb(a,b){oz.call(this,a,b)} -function Qx(a){Px();ho.call(this,a)} -function Lnb(a,b){Pnb(a,a.length,b)} -function Mnb(a,b){Rnb(a,a.length,b)} -function Ktb(a,b){return a.a.get(b)} -function bub(a,b){return Ujb(a.e,b)} -function Zxb(a){return uFb(a),false} -function zw(a){this.a=RD(Qb(a),229)} -function $wb(a){Swb.call(this,a,21)} -function dAb(a,b){qs.call(this,a,b)} -function yBb(a,b){qs.call(this,a,b)} -function ssb(a,b){this.b=a;this.a=b} -function xlb(a,b){this.d=a;this.e=b} -function jEb(a,b){this.a=a;this.b=b} -function pEb(a,b){this.a=a;this.b=b} -function vEb(a,b){this.a=a;this.b=b} -function BEb(a,b){this.a=a;this.b=b} -function TFb(a,b){this.a=a;this.b=b} -function QEb(a,b){this.b=a;this.a=b} -function sHb(a,b){this.b=a;this.a=b} -function EHb(a,b){qs.call(this,a,b)} -function MHb(a,b){qs.call(this,a,b)} -function jIb(a,b){qs.call(this,a,b)} -function $Jb(a,b){qs.call(this,a,b)} -function FKb(a,b){qs.call(this,a,b)} -function wLb(a,b){qs.call(this,a,b)} -function nOb(a,b){qs.call(this,a,b)} -function kPb(a,b){this.b=a;this.a=b} -function JPb(a,b){qs.call(this,a,b)} -function fRb(a,b){this.b=a;this.a=b} -function JRb(a,b){qs.call(this,a,b)} -function OTb(a,b){this.b=a;this.a=b} -function UUb(a,b){qs.call(this,a,b)} -function BWb(a,b){qs.call(this,a,b)} -function tXb(a,b){qs.call(this,a,b)} -function XEb(a,b,c){a.splice(b,0,c)} -function pr(a,b,c){a.Mb(c)&&b.Cd(c)} -function lEb(a,b,c){b.Pe(a.a.Ye(c))} -function rEb(a,b,c){b.Dd(a.a.Ze(c))} -function xEb(a,b,c){b.Cd(a.a.Kb(c))} -function eYb(a,b){return Csb(a.c,b)} -function cGb(a,b){return Csb(a.e,b)} -function qZb(a,b){qs.call(this,a,b)} -function V$b(a,b){qs.call(this,a,b)} -function s3b(a,b){qs.call(this,a,b)} -function Q8b(a,b){qs.call(this,a,b)} -function icc(a,b){qs.call(this,a,b)} -function xec(a,b){qs.call(this,a,b)} -function gic(a,b){this.a=a;this.b=b} -function Xic(a,b){this.a=a;this.b=b} -function h4b(a,b){this.a=a;this.b=b} -function vjc(a,b){this.a=a;this.b=b} -function xjc(a,b){this.a=a;this.b=b} -function Hjc(a,b){this.a=a;this.b=b} -function hjc(a,b){this.b=a;this.a=b} -function Jjc(a,b){this.b=a;this.a=b} -function _Yb(a,b){this.b=a;this.a=b} -function eZb(a,b){this.c=a;this.d=b} -function Q1b(a,b){this.e=a;this.d=b} -function Tjc(a,b){this.a=a;this.b=b} -function ulc(a,b){this.a=a;this.b=b} -function Elc(a,b){this.a=a;this.b=b} -function fqc(a,b){this.b=a;this.a=b} -function smc(a,b){this.b=b;this.c=a} -function fnc(a,b){qs.call(this,a,b)} -function Cnc(a,b){qs.call(this,a,b)} -function koc(a,b){qs.call(this,a,b)} -function ktc(a,b){qs.call(this,a,b)} -function ctc(a,b){qs.call(this,a,b)} -function utc(a,b){qs.call(this,a,b)} -function Ftc(a,b){qs.call(this,a,b)} -function Rtc(a,b){qs.call(this,a,b)} -function _tc(a,b){qs.call(this,a,b)} -function iuc(a,b){qs.call(this,a,b)} -function vuc(a,b){qs.call(this,a,b)} -function Duc(a,b){qs.call(this,a,b)} -function Puc(a,b){qs.call(this,a,b)} -function _uc(a,b){qs.call(this,a,b)} -function pvc(a,b){qs.call(this,a,b)} -function yvc(a,b){qs.call(this,a,b)} -function Hvc(a,b){qs.call(this,a,b)} -function Pvc(a,b){qs.call(this,a,b)} -function dxc(a,b){qs.call(this,a,b)} -function bDc(a,b){qs.call(this,a,b)} -function nDc(a,b){qs.call(this,a,b)} -function yDc(a,b){qs.call(this,a,b)} -function LDc(a,b){qs.call(this,a,b)} -function bEc(a,b){qs.call(this,a,b)} -function lEc(a,b){qs.call(this,a,b)} -function tEc(a,b){qs.call(this,a,b)} -function CEc(a,b){qs.call(this,a,b)} -function LEc(a,b){qs.call(this,a,b)} -function UEc(a,b){qs.call(this,a,b)} -function mFc(a,b){qs.call(this,a,b)} -function vFc(a,b){qs.call(this,a,b)} -function EFc(a,b){qs.call(this,a,b)} -function SKc(a,b){qs.call(this,a,b)} -function cNc(a,b){this.b=a;this.a=b} -function tNc(a,b){qs.call(this,a,b)} -function QOc(a,b){this.a=a;this.b=b} -function ePc(a,b){this.a=a;this.b=b} -function LPc(a,b){this.a=a;this.b=b} -function xQc(a,b){qs.call(this,a,b)} -function FQc(a,b){qs.call(this,a,b)} -function MQc(a,b){this.a=a;this.b=b} -function FMc(a,b){dMc();return b!=a} -function Uvb(a){sFb(a.a);return a.b} -function qYb(a){rYb(a,a.c);return a} -function Itb(){Etb();return new Dtb} -function _ec(){Rec();this.a=new e6b} -function lSc(){dSc();this.a=new _sb} -function aRc(){WQc();this.b=new _sb} -function xRc(a,b){this.b=a;this.d=b} -function nVc(a,b){this.a=a;this.b=b} -function pVc(a,b){this.a=a;this.b=b} -function GWc(a,b){this.a=a;this.b=b} -function IXc(a,b){this.b=a;this.a=b} -function gTc(a,b){qs.call(this,a,b)} -function eVc(a,b){qs.call(this,a,b)} -function $Vc(a,b){qs.call(this,a,b)} -function XYc(a,b){qs.call(this,a,b)} -function MZc(a,b){qs.call(this,a,b)} -function t_c(a,b){qs.call(this,a,b)} -function B_c(a,b){qs.call(this,a,b)} -function z2c(a,b){qs.call(this,a,b)} -function h3c(a,b){qs.call(this,a,b)} -function $3c(a,b){qs.call(this,a,b)} -function i4c(a,b){qs.call(this,a,b)} -function l5c(a,b){qs.call(this,a,b)} -function v5c(a,b){qs.call(this,a,b)} -function g6c(a,b){qs.call(this,a,b)} -function A6c(a,b){qs.call(this,a,b)} -function a7c(a,b){qs.call(this,a,b)} -function B8c(a,b){qs.call(this,a,b)} -function d9c(a,b){qs.call(this,a,b)} -function D9c(a,b){qs.call(this,a,b)} -function tad(a,b){qs.call(this,a,b)} -function hbd(a,b){qs.call(this,a,b)} -function Nbd(a,b){qs.call(this,a,b)} -function Ybd(a,b){qs.call(this,a,b)} -function ndd(a,b){qs.call(this,a,b)} -function z1c(a,b){this.b=a;this.a=b} -function B1c(a,b){this.b=a;this.a=b} -function d2c(a,b){this.b=a;this.a=b} -function f2c(a,b){this.b=a;this.a=b} -function m9c(a,b){this.a=a;this.b=b} -function xed(a,b){this.a=a;this.b=b} -function ffd(a,b){this.a=a;this.b=b} -function rjd(a,b){this.a=a;this.b=b} -function Sjd(a,b){qs.call(this,a,b)} -function Zhd(a,b){qs.call(this,a,b)} -function lid(a,b){qs.call(this,a,b)} -function vkd(a,b){qs.call(this,a,b)} -function Gmd(a,b){qs.call(this,a,b)} -function Pmd(a,b){qs.call(this,a,b)} -function Zmd(a,b){qs.call(this,a,b)} -function jnd(a,b){qs.call(this,a,b)} -function Gnd(a,b){qs.call(this,a,b)} -function Rnd(a,b){qs.call(this,a,b)} -function eod(a,b){qs.call(this,a,b)} -function qod(a,b){qs.call(this,a,b)} -function Eod(a,b){qs.call(this,a,b)} -function Qod(a,b){qs.call(this,a,b)} -function upd(a,b){qs.call(this,a,b)} -function Rpd(a,b){qs.call(this,a,b)} -function eqd(a,b){qs.call(this,a,b)} -function nqd(a,b){qs.call(this,a,b)} -function vqd(a,b){qs.call(this,a,b)} -function Hrd(a,b){qs.call(this,a,b)} -function esd(a,b){this.a=a;this.b=b} -function gsd(a,b){this.a=a;this.b=b} -function isd(a,b){this.a=a;this.b=b} -function Osd(a,b){this.a=a;this.b=b} -function Qsd(a,b){this.a=a;this.b=b} -function Ssd(a,b){this.a=a;this.b=b} -function Ptd(a,b){this.a=a;this.b=b} -function JEd(a,b){this.a=a;this.b=b} -function KEd(a,b){this.a=a;this.b=b} -function MEd(a,b){this.a=a;this.b=b} -function NEd(a,b){this.a=a;this.b=b} -function QEd(a,b){this.a=a;this.b=b} -function REd(a,b){this.a=a;this.b=b} -function SEd(a,b){this.b=a;this.a=b} -function TEd(a,b){this.b=a;this.a=b} -function bFd(a,b){this.b=a;this.a=b} -function dFd(a,b){this.b=a;this.a=b} -function fFd(a,b){this.a=a;this.b=b} -function hFd(a,b){this.a=a;this.b=b} -function utd(a,b){qs.call(this,a,b)} -function sFd(a,b){this.a=a;this.b=b} -function uFd(a,b){this.a=a;this.b=b} -function bGd(a,b){qs.call(this,a,b)} -function uId(a,b){this.f=a;this.c=b} -function Ofd(a,b){return Csb(a.g,b)} -function Tqc(a,b){return Csb(b.b,a)} -function HPd(a,b){return QNd(a.a,b)} -function Idd(a,b){return -a.b.af(b)} -function IId(a,b){!!a&&Zjb(CId,a,b)} -function yWd(a,b){a.i=null;zWd(a,b)} -function kEd(a,b,c){pDd(b,KDd(a,c))} -function lEd(a,b,c){pDd(b,KDd(a,c))} -function mFd(a,b){vEd(a.a,RD(b,58))} -function _Mc(a,b){GMc(a.a,RD(b,12))} -function KTd(a,b){this.a=a;this.b=b} -function NTd(a,b){this.a=a;this.b=b} -function B5d(a,b){this.a=a;this.b=b} -function Z6d(a,b){this.a=a;this.b=b} -function Ble(a,b){this.a=a;this.b=b} -function afe(a,b){this.d=a;this.b=b} -function wfe(a,b){this.e=a;this.a=b} -function Eke(a,b){this.b=a;this.c=b} -function zNd(a,b){this.i=a;this.g=b} -function kZd(a,b){this.d=a;this.e=b} -function ave(a,b){eve(new dMd(a),b)} -function Dke(a){return pge(a.c,a.b)} -function Wd(a){return !a?null:a.md()} -function dE(a){return a==null?null:a} -function bE(a){return typeof a===jve} -function $D(a){return typeof a===hve} -function _D(a){return typeof a===ive} -function Gdb(a,b){return Ddb(a,b)==0} -function Jdb(a,b){return Ddb(a,b)>=0} -function Pdb(a,b){return Ddb(a,b)!=0} -function ar(a,b){return zr(a.Kc(),b)} -function Qm(a,b){return a.Rd().Xb(b)} -function kg(a){ig(a);return a.d.gc()} -function fE(a){CFb(a==null);return a} -function Mhb(a,b){a.a+=''+b;return a} -function Nhb(a,b){a.a+=''+b;return a} -function Whb(a,b){a.a+=''+b;return a} -function Yhb(a,b){a.a+=''+b;return a} -function Zhb(a,b){a.a+=''+b;return a} -function Vhb(a,b){return a.a+=''+b,a} -function Pfb(a){return ''+(uFb(a),a)} -function Vsb(a){akb(this);Ld(this,a)} -function YFc(){RFc();UFc.call(this)} -function pxb(a,b){kxb.call(this,a,b)} -function txb(a,b){kxb.call(this,a,b)} -function xxb(a,b){kxb.call(this,a,b)} -function Oub(a,b){Pub(a,b,a.c.b,a.c)} -function Nub(a,b){Pub(a,b,a.a,a.a.a)} -function Iob(a){tFb(a,0);return null} -function Xvb(){this.b=0;this.a=false} -function dwb(){this.b=0;this.a=false} -function Et(){this.b=new Usb(Sv(12))} -function pMb(){pMb=geb;oMb=ss(nMb())} -function ncc(){ncc=geb;mcc=ss(lcc())} -function aZc(){aZc=geb;_Yc=ss($Yc())} -function WA(){WA=geb;vA();VA=new Tsb} -function hjd(a){a.a=0;a.b=0;return a} -function qfd(a,b){a.a=b.g+1;return a} -function yNd(a,b){aMd.call(this,a,b)} -function lGd(a,b){kGd.call(this,a,b)} -function N$d(a,b){zNd.call(this,a,b)} -function Whe(a,b){Q2d.call(this,a,b)} -function She(a,b){Phe.call(this,a,b)} -function RRd(a,b){PRd();Zjb(ORd,a,b)} -function sB(a,b){a.q.setTime(Xdb(b))} -function Xz(a){$wnd.clearTimeout(a)} -function cr(a){return Qb(a),new Dl(a)} -function mb(a,b){return dE(a)===dE(b)} -function Mw(a,b){return a.a.a.a.cc(b)} -function qeb(a,b){return zhb(a.a,0,b)} -function SSb(a){return MSb(RD(a,74))} -function Nfb(a){return eE((uFb(a),a))} -function Ofb(a){return eE((uFb(a),a))} -function gD(a){return hD(a.l,a.m,a.h)} -function egb(a,b){return hgb(a.a,b.a)} -function ygb(a,b){return Agb(a.a,b.a)} -function Sfb(a,b){return Qfb(a.a,b.a)} -function qhb(a,b){return a.indexOf(b)} -function nOc(a,b){return a.j[b.p]==2} -function cz(a,b){return a==b?0:a?1:-1} -function AB(a){return a<10?'0'+a:''+a} -function Kdb(a){return typeof a===ive} -function oZb(a){return a==jZb||a==mZb} -function pZb(a){return a==jZb||a==kZb} -function ELb(a,b){return hgb(a.g,b.g)} -function Q4b(a){return Wmb(a.b.b,a,0)} -function Q2b(){J2b.call(this,0,0,0,0)} -function Iub(){ctb.call(this,new gub)} -function Znb(a,b){Wnb(a,0,a.length,b)} -function Eyb(a,b){Rmb(a.a,b);return b} -function Fkc(a,b){lkc();return b.a+=a} -function Hkc(a,b){lkc();return b.a+=a} -function Gkc(a,b){lkc();return b.c+=a} -function ied(a,b){Rmb(a.c,b);return a} -function Ped(a,b){ofd(a.a,b);return a} -function ttb(a){this.a=Itb();this.b=a} -function Ntb(a){this.a=Itb();this.b=a} -function sjd(a){this.a=a.a;this.b=a.b} -function Dl(a){this.a=a;zl.call(this)} -function Gl(a){this.a=a;zl.call(this)} -function Tid(){Uid.call(this,0,0,0,0)} -function vfd(a){return ofd(new ufd,a)} -function Ksd(a){return iyd(RD(a,123))} -function Mvd(a){return a.vh()&&a.wh()} -function Dod(a){return a!=zod&&a!=Aod} -function Dmd(a){return a==ymd||a==zmd} -function Emd(a){return a==Bmd||a==xmd} -function xDc(a){return a==tDc||a==sDc} -function yrc(a,b){return hgb(a.g,b.g)} -function Yfe(a,b){return new Phe(b,a)} -function Zfe(a,b){return new Phe(b,a)} -function lr(a){return Dr(a.b.Kc(),a.a)} -function IXd(a,b){yXd(a,b);zXd(a,a.D)} -function Uxd(a,b,c){Vxd(a,b);Wxd(a,c)} -function zyd(a,b,c){Cyd(a,b);Ayd(a,c)} -function Byd(a,b,c){Dyd(a,b);Eyd(a,c)} -function Gzd(a,b,c){Hzd(a,b);Izd(a,c)} -function Nzd(a,b,c){Ozd(a,b);Pzd(a,c)} -function eh(a,b,c){bh.call(this,a,b,c)} -function zId(a){uId.call(this,a,true)} -function nAb(){dAb.call(this,'Tail',3)} -function iAb(){dAb.call(this,'Head',1)} -function ejb(a){Pib();fjb.call(this,a)} -function A3b(a){J2b.call(this,a,a,a,a)} -function Pmb(a){a.c=$C(jJ,rve,1,0,5,1)} -function yRb(a){a.b&&CRb(a);return a.a} -function zRb(a){a.b&&CRb(a);return a.c} -function mBb(a,b){if(dBb){return}a.b=b} -function YCb(a,b){return a[a.length]=b} -function _Cb(a,b){return a[a.length]=b} -function l5b(a,b){return NGd(b,MCd(a))} -function m5b(a,b){return NGd(b,MCd(a))} -function DDd(a,b){return lp(Co(a.d),b)} -function EDd(a,b){return lp(Co(a.g),b)} -function FDd(a,b){return lp(Co(a.j),b)} -function mGd(a,b){kGd.call(this,a.b,b)} -function s0d(a,b){WGd(tYd(a.a),v0d(b))} -function B4d(a,b){WGd(o4d(a.a),E4d(b))} -function Asd(a,b,c){Byd(c,c.i+a,c.j+b)} -function eFc(a,b,c){bD(a.c[b.g],b.g,c)} -function zVd(a,b,c){RD(a.c,71).Gi(b,c)} -function LMd(a,b,c){bD(a,b,c);return c} -function DJb(a){Umb(a.Sf(),new HJb(a))} -function Gvb(a){return a!=null?tb(a):0} -function aOd(a){return a==null?0:tb(a)} -function iue(a){Vse();Wse.call(this,a)} -function Ug(a){this.a=a;Og.call(this,a)} -function Zy(){Zy=geb;$wnd.Math.log(2)} -function s7d(){s7d=geb;r7d=($Sd(),ZSd)} -function FRc(){FRc=geb;ERc=new Zrb(u3)} -function Hde(){Hde=geb;new Ide;new bnb} -function Ide(){new Tsb;new Tsb;new Tsb} -function yue(){throw Adb(new kib(bMe))} -function Nue(){throw Adb(new kib(bMe))} -function Bue(){throw Adb(new kib(cMe))} -function Que(){throw Adb(new kib(cMe))} -function Gp(a){this.a=a;rf.call(this,a)} -function Np(a){this.a=a;rf.call(this,a)} -function Sq(a,b){tm();this.a=a;this.b=b} -function Jh(a,b){Qb(b);Ih(a).Jc(new jx)} -function _mb(a,b){Ynb(a.c,a.c.length,b)} -function xnb(a){return a.ab?1:0} -function Kgb(a,b){return Ddb(a,b)>0?a:b} -function hD(a,b,c){return {l:a,m:b,h:c}} -function Mvb(a,b){a.a!=null&&_Mc(b,a.a)} -function Lhc(a){Y0b(a,null);Z0b(a,null)} -function xkc(a,b,c){return Zjb(a.g,c,b)} -function bFc(a,b,c){return _Ec(b,c,a.c)} -function jOc(a,b,c){return Zjb(a.k,c,b)} -function pOc(a,b,c){qOc(a,b,c);return c} -function FOc(a,b){dOc();return b.n.b+=a} -function lUb(a){VTb.call(this);this.b=a} -function y2b(a){v2b.call(this);this.a=a} -function kAb(){dAb.call(this,'Range',2)} -function $Fb(a){this.b=a;this.a=new bnb} -function WQb(a){this.b=new gRb;this.a=a} -function Lub(a){a.a=new svb;a.c=new svb} -function nrc(a){a.a=new Tsb;a.d=new Tsb} -function $Sc(a){_Sc(a,null);aTc(a,null)} -function a2d(a,b){return xA(a.a,b,null)} -function Cdd(a,b){return Zjb(a.a,b.a,b)} -function ajd(a){return new rjd(a.a,a.b)} -function Pid(a){return new rjd(a.c,a.d)} -function Qid(a){return new rjd(a.c,a.d)} -function Ake(a,b){return Tfe(a.c,a.b,b)} -function ZD(a,b){return a!=null&&QD(a,b)} -function br(a,b){return Jr(a.Kc(),b)!=-1} -function Hr(a){return a.Ob()?a.Pb():null} -function _p(a){this.b=(yob(),new uqb(a))} -function zke(a){this.a=a;Tsb.call(this)} -function Uhe(){Q2d.call(this,null,null)} -function Yhe(){p3d.call(this,null,null)} -function As(){qs.call(this,'INSTANCE',0)} -function dXb(){_Wb();this.a=new Wed(UP)} -function Hhb(a){return Ihb(a,0,a.length)} -function Rv(a,b){return new ew(a.Kc(),b)} -function $sb(a,b){return a.a.Bc(b)!=null} -function hZd(a,b){sLd(a);a.Gc(RD(b,15))} -function ONd(a,b,c){a.c.bd(b,RD(c,136))} -function eOd(a,b,c){a.c.Ui(b,RD(c,136))} -function eub(a,b){if(a.c){rub(b);qub(b)}} -function oB(a,b){a.q.setHours(b);mB(a,b)} -function vTb(a,b){Zid(b,a.a.a.a,a.a.a.b)} -function tKb(a,b,c,d){bD(a.a[b.g],c.g,d)} -function oKb(a,b,c){return a.a[b.g][c.g]} -function AIc(a,b){return a.e[b.c.p][b.p]} -function TIc(a,b){return a.c[b.c.p][b.p]} -function pJc(a,b){return a.a[b.c.p][b.p]} -function mOc(a,b){return a.j[b.p]=AOc(b)} -function wAb(a,b){return a.a.Bc(b)!=null} -function wXc(a,b){return Kfb(UD(b.a))<=a} -function xXc(a,b){return Kfb(UD(b.a))>=a} -function vhd(a,b){return jhb(a.f,b.Pg())} -function cjd(a,b){return a.a*b.a+a.b*b.b} -function Wsd(a,b){return a.a0?b/(a*a):b*100} -function FUb(a,b){return a>0?b*b/a:b*b*100} -function $5b(a,b){return RD(cub(a.a,b),34)} -function doc(a,b){Mnc();return Rc(a,b.e,b)} -function NCc(a,b,c){GCc();return c.Mg(a,b)} -function L0c(a){B0c();return a.e.a+a.f.a/2} -function N0c(a,b,c){B0c();return c.e.a-a*b} -function V0c(a){B0c();return a.e.b+a.f.b/2} -function X0c(a,b,c){B0c();return c.e.b-a*b} -function _tb(a){a.d=new tub(a);a.e=new Tsb} -function x3c(){this.a=new Tp;this.b=new Tp} -function hmc(a){this.c=a;this.a=1;this.b=1} -function C$b(a){z$b();A$b(this);this.Ff(a)} -function Efd(a,b,c){Afd();a.pf(b)&&c.Cd(a)} -function Red(a,b,c){return Rmb(b,Ted(a,c))} -function Zid(a,b,c){a.a+=b;a.b+=c;return a} -function jjd(a,b,c){a.a*=b;a.b*=c;return a} -function mjd(a,b){a.a=b.a;a.b=b.b;return a} -function fjd(a){a.a=-a.a;a.b=-a.b;return a} -function njd(a,b,c){a.a-=b;a.b-=c;return a} -function Gjd(a){Yub.call(this);zjd(this,a)} -function Dbd(){qs.call(this,'GROW_TREE',0)} -function WRb(){qs.call(this,'POLYOMINO',0)} -function SVd(a,b,c){DVd.call(this,a,b,c,2)} -function r0d(a,b,c){VGd(tYd(a.a),b,v0d(c))} -function e3d(a,b){N2d();Q2d.call(this,a,b)} -function D3d(a,b){j3d();p3d.call(this,a,b)} -function F3d(a,b){j3d();D3d.call(this,a,b)} -function H3d(a,b){j3d();p3d.call(this,a,b)} -function PNd(a,b){return a.c.Fc(RD(b,136))} -function A4d(a,b,c){VGd(o4d(a.a),b,E4d(c))} -function Ard(a){this.c=a;Dyd(a,0);Eyd(a,0)} -function Z8d(a,b){s7d();N8d.call(this,a,b)} -function _8d(a,b){s7d();Z8d.call(this,a,b)} -function b9d(a,b){s7d();Z8d.call(this,a,b)} -function n9d(a,b){s7d();N8d.call(this,a,b)} -function d9d(a,b){s7d();b9d.call(this,a,b)} -function p9d(a,b){s7d();n9d.call(this,a,b)} -function v9d(a,b){s7d();N8d.call(this,a,b)} -function lge(a,b,c){return b.zl(a.e,a.c,c)} -function nge(a,b,c){return b.Al(a.e,a.c,c)} -function Wee(a,b,c){return tfe(Pee(a,b),c)} -function Age(a,b){return Vvd(a.e,RD(b,54))} -function _me(a){return a==null?null:Bqe(a)} -function dne(a){return a==null?null:Iqe(a)} -function gne(a){return a==null?null:jeb(a)} -function hne(a){return a==null?null:jeb(a)} -function TD(a){CFb(a==null||$D(a));return a} -function UD(a){CFb(a==null||_D(a));return a} -function WD(a){CFb(a==null||bE(a));return a} -function lfb(a){if(a.o!=null){return}Bfb(a)} -function lFb(a){if(!a){throw Adb(new _fb)}} -function pFb(a){if(!a){throw Adb(new yeb)}} -function sFb(a){if(!a){throw Adb(new Dvb)}} -function yFb(a){if(!a){throw Adb(new cgb)}} -function zmb(a){if(!a){throw Adb(new Jrb)}} -function jQd(){jQd=geb;iQd=new LQd;new lRd} -function u2c(){u2c=geb;t2c=new jGd('root')} -function d6d(){HWd.call(this);this.Bb|=txe} -function Pg(a,b){this.d=a;Lg(this);this.b=b} -function WCb(a,b){NCb.call(this,a);this.a=b} -function oDb(a,b){NCb.call(this,a);this.a=b} -function bh(a,b,c){lg.call(this,a,b,c,null)} -function fh(a,b,c){lg.call(this,a,b,c,null)} -function Mf(a,b){this.c=a;ne.call(this,a,b)} -function Uf(a,b){this.a=a;Mf.call(this,a,b)} -function wB(a){this.q=new $wnd.Date(Xdb(a))} -function OPb(a){if(a>8){return 0}return a+1} -function iBb(a,b){if(dBb){return}Rmb(a.a,b)} -function P5b(a,b){H5b();return n2b(b.d.i,a)} -function qdc(a,b){Zcc();return new xdc(b,a)} -function HAb(a,b,c){return a.Ne(b,c)<=0?c:b} -function IAb(a,b,c){return a.Ne(b,c)<=0?b:c} -function rgd(a,b){return RD(cub(a.b,b),143)} -function tgd(a,b){return RD(cub(a.c,b),233)} -function amc(a){return RD(Vmb(a.a,a.b),294)} -function Mid(a){return new rjd(a.c,a.d+a.a)} -function Jeb(a){return (uFb(a),a)?1231:1237} -function EPc(a){return dOc(),xDc(RD(a,203))} -function RMb(){RMb=geb;QMb=xsb((Qpd(),Ppd))} -function YQb(a,b){b.a?ZQb(a,b):wAb(a.a,b.b)} -function aJd(a,b,c){++a.j;a.tj();$Gd(a,b,c)} -function $Id(a,b,c){++a.j;a.qj(b,a.Zi(b,c))} -function B2d(a,b,c){var d;d=a.fd(b);d.Rb(c)} -function Bzd(a,b,c){c=xvd(a,b,6,c);return c} -function izd(a,b,c){c=xvd(a,b,3,c);return c} -function KCd(a,b,c){c=xvd(a,b,9,c);return c} -function SKb(a,b){Ivb(b,Pye);a.f=b;return a} -function bOd(a,b){return (b&lve)%a.d.length} -function Bke(a,b,c){return age(a.c,a.b,b,c)} -function ZLd(a,b){this.c=a;ZHd.call(this,b)} -function w0d(a,b){this.a=a;Q_d.call(this,b)} -function F4d(a,b){this.a=a;Q_d.call(this,b)} -function kGd(a,b){jGd.call(this,a);this.a=b} -function U6d(a,b){L6d.call(this,a);this.a=b} -function S9d(a,b){L6d.call(this,a);this.a=b} -function jQb(a){gQb.call(this,0,0);this.f=a} -function _hb(a,b,c){a.a+=Ihb(b,0,c);return a} -function _A(a){!a.a&&(a.a=new jB);return a.a} -function qlb(a,b){var c;c=a.e;a.e=b;return c} -function Clb(a,b){var c;c=b;return !!a.Fe(c)} -function Keb(a,b){Geb();return a==b?0:a?1:-1} -function Ikb(a,b){a.a.bd(a.b,b);++a.b;a.c=-1} -function hg(a){a.b?hg(a.b):a.f.c.zc(a.e,a.d)} -function aub(a){akb(a.e);a.d.b=a.d;a.d.a=a.d} -function VDb(a,b,c){xDb();HEb(a,b.Ve(a.a,c))} -function Xrb(a,b,c){return Wrb(a,RD(b,22),c)} -function WEb(a,b){return cFb(new Array(b),a)} -function Fgb(a){return Ydb(Udb(a,32))^Ydb(a)} -function XD(a){return String.fromCharCode(a)} -function Dz(a){return a==null?null:a.message} -function Rz(a,b,c){return a.apply(b,c);var d} -function Btb(a,b){var c;c=a[Jxe];c.call(a,b)} -function Ctb(a,b){var c;c=a[Jxe];c.call(a,b)} -function O5b(a,b){H5b();return !n2b(b.d.i,a)} -function R2b(a,b,c,d){J2b.call(this,a,b,c,d)} -function TJb(){RJb.call(this);this.a=new pjd} -function v2b(){this.n=new pjd;this.o=new pjd} -function kGb(){this.b=new pjd;this.c=new bnb} -function cUb(){this.a=new bnb;this.b=new bnb} -function kWb(){this.a=new DTb;this.b=new vWb} -function e6b(){this.b=new gub;this.a=new gub} -function jIc(){this.b=new _sb;this.a=new _sb} -function vYc(){this.b=new Tsb;this.a=new Tsb} -function fWc(){this.b=new TVc;this.a=new IVc} -function Yhc(){this.a=new yqc;this.b=new Sqc} -function lNc(){this.a=new bnb;this.d=new bnb} -function RJb(){this.n=new z3b;this.i=new Tid} -function hq(a){this.a=(dk(a,iwe),new cnb(a))} -function oq(a){this.a=(dk(a,iwe),new cnb(a))} -function tLd(a){return a<100?null:new gLd(a)} -function Lac(a,b){return a.n.a=(uFb(b),b)+10} -function Mac(a,b){return a.n.a=(uFb(b),b)+10} -function DYd(a,b){return b==a||PHd(sYd(b),a)} -function nae(a,b){return Zjb(a.a,b,'')==null} -function Hee(a,b){var c;c=b.qi(a.a);return c} -function $id(a,b){a.a+=b.a;a.b+=b.b;return a} -function ojd(a,b){a.a-=b.a;a.b-=b.b;return a} -function sfd(a){aFb(a.j.c,0);a.a=-1;return a} -function rCd(a,b,c){c=xvd(a,b,11,c);return c} -function SDd(a,b,c){c!=null&&Kzd(b,uEd(a,c))} -function TDd(a,b,c){c!=null&&Lzd(b,uEd(a,c))} -function G5d(a,b,c,d){C5d.call(this,a,b,c,d)} -function oie(a,b,c,d){C5d.call(this,a,b,c,d)} -function sie(a,b,c,d){oie.call(this,a,b,c,d)} -function Nie(a,b,c,d){Iie.call(this,a,b,c,d)} -function Pie(a,b,c,d){Iie.call(this,a,b,c,d)} -function Vie(a,b,c,d){Iie.call(this,a,b,c,d)} -function Tie(a,b,c,d){Pie.call(this,a,b,c,d)} -function $ie(a,b,c,d){Pie.call(this,a,b,c,d)} -function Yie(a,b,c,d){Vie.call(this,a,b,c,d)} -function bje(a,b,c,d){$ie.call(this,a,b,c,d)} -function Dje(a,b,c,d){wje.call(this,a,b,c,d)} -function aMd(a,b){veb.call(this,HJe+a+NIe+b)} -function Hje(a,b){return a.jk().wi().ri(a,b)} -function Ije(a,b){return a.jk().wi().ti(a,b)} -function Lfb(a,b){return uFb(a),dE(a)===dE(b)} -function lhb(a,b){return uFb(a),dE(a)===dE(b)} -function mEb(a,b){return a.b.Bd(new pEb(a,b))} -function sEb(a,b){return a.b.Bd(new vEb(a,b))} -function yEb(a,b){return a.b.Bd(new BEb(a,b))} -function Bk(a,b){return a.e=RD(a.d.Kb(b),159)} -function uhb(a,b,c){return a.lastIndexOf(b,c)} -function wWb(a,b,c){return Qfb(a[b.a],a[c.a])} -function TWb(a,b){return pQb(b,(yCc(),gAc),a)} -function Lpc(a,b){return hgb(b.a.d.p,a.a.d.p)} -function Kpc(a,b){return hgb(a.a.d.p,b.a.d.p)} -function zTc(a,b){return Qfb(a.c-a.s,b.c-b.s)} -function qWc(a,b){return Qfb(a.b.e.a,b.b.e.a)} -function sWc(a,b){return Qfb(a.c.e.a,b.c.e.a)} -function $2b(a){return !a.c?-1:Wmb(a.c.a,a,0)} -function Cod(a){return a==vod||a==xod||a==wod} -function CMd(a,b){this.c=a;nMd.call(this,a,b)} -function fq(a,b,c){this.a=a;qc.call(this,b,c)} -function YDb(a){this.c=a;xxb.call(this,Sve,0)} -function rk(a,b,c){this.c=b;this.b=c;this.a=a} -function DMc(a){dMc();this.d=a;this.a=new wmb} -function ho(a){_l();this.a=(yob(),new Lqb(a))} -function Xmc(a,b){Dmd(a.f)?Ymc(a,b):Zmc(a,b)} -function Lxb(a,b){Mxb.call(this,a,a.length,b)} -function nBb(a,b){if(dBb){return}!!b&&(a.d=b)} -function ZNd(a,b){return ZD(b,15)&&_Gd(a.c,b)} -function AVd(a,b,c){return RD(a.c,71).Wk(b,c)} -function BVd(a,b,c){return RD(a.c,71).Xk(b,c)} -function mge(a,b,c){return lge(a,RD(b,343),c)} -function oge(a,b,c){return nge(a,RD(b,343),c)} -function Ige(a,b,c){return Hge(a,RD(b,343),c)} -function Kge(a,b,c){return Jge(a,RD(b,343),c)} -function Fn(a,b){return b==null?null:Xv(a.b,b)} -function Qeb(a){return _D(a)?(uFb(a),a):a.ue()} -function Rfb(a){return !isNaN(a)&&!isFinite(a)} -function Zub(a){Lub(this);Xub(this);ye(this,a)} -function dnb(a){Pmb(this);YEb(this.c,0,a.Pc())} -function Fsb(a,b,c){this.a=a;this.b=b;this.c=c} -function Vtb(a,b,c){this.a=a;this.b=b;this.c=c} -function hvb(a,b,c){this.d=a;this.b=c;this.a=b} -function aBb(a){this.a=a;gib();Hdb(Date.now())} -function wzb(a){Ckb(a.a);Yyb(a.c,a.b);a.b=null} -function wvb(){wvb=geb;uvb=new xvb;vvb=new zvb} -function KMd(){KMd=geb;JMd=$C(jJ,rve,1,0,5,1)} -function TTd(){TTd=geb;STd=$C(jJ,rve,1,0,5,1)} -function yUd(){yUd=geb;xUd=$C(jJ,rve,1,0,5,1)} -function _l(){_l=geb;new im((yob(),yob(),vob))} -function gAb(a){cAb();return ws((qAb(),pAb),a)} -function zBb(a){xBb();return ws((CBb(),BBb),a)} -function FHb(a){DHb();return ws((IHb(),HHb),a)} -function NHb(a){LHb();return ws((QHb(),PHb),a)} -function kIb(a){iIb();return ws((nIb(),mIb),a)} -function _Jb(a){ZJb();return ws((cKb(),bKb),a)} -function GKb(a){EKb();return ws((JKb(),IKb),a)} -function xLb(a){vLb();return ws((ALb(),zLb),a)} -function mMb(a){hMb();return ws((pMb(),oMb),a)} -function oOb(a){mOb();return ws((rOb(),qOb),a)} -function KPb(a){IPb();return ws((NPb(),MPb),a)} -function KRb(a){IRb();return ws((NRb(),MRb),a)} -function XRb(a){VRb();return ws(($Rb(),ZRb),a)} -function VUb(a){TUb();return ws((YUb(),XUb),a)} -function CWb(a){AWb();return ws((FWb(),EWb),a)} -function uXb(a){sXb();return ws((xXb(),wXb),a)} -function tZb(a){nZb();return ws((wZb(),vZb),a)} -function W$b(a){U$b();return ws((Z$b(),Y$b),a)} -function Mb(a,b){if(!a){throw Adb(new agb(b))}} -function Vb(a){if(!a){throw Adb(new dgb(tve))}} -function rFb(a,b){if(a!=b){throw Adb(new Jrb)}} -function KQb(a,b,c){this.a=a;this.b=b;this.c=c} -function lRb(a,b,c){this.a=a;this.b=b;this.c=c} -function h7b(a,b,c){this.a=a;this.b=b;this.c=c} -function J0b(a,b,c){this.b=a;this.a=b;this.c=c} -function dNb(a,b,c){this.b=a;this.c=b;this.a=c} -function oac(a,b,c){this.a=a;this.b=b;this.c=c} -function F1b(a,b,c){this.e=b;this.b=a;this.d=c} -function Ecc(a,b,c){this.b=a;this.a=b;this.c=c} -function UDb(a,b,c){xDb();a.a.Yd(b,c);return b} -function CJb(a){var b;b=new BJb;b.e=a;return b} -function _Nb(a){var b;b=new YNb;b.b=a;return b} -function U9b(){U9b=geb;S9b=new bac;T9b=new eac} -function Rec(){Rec=geb;Qec=new efc;Pec=new jfc} -function lkc(){lkc=geb;jkc=new Mkc;kkc=new Okc} -function loc(a){joc();return ws((ooc(),noc),a)} -function kcc(a){hcc();return ws((ncc(),mcc),a)} -function yec(a){vec();return ws((Bec(),Aec),a)} -function gnc(a){enc();return ws((jnc(),inc),a)} -function Enc(a){Bnc();return ws((Hnc(),Gnc),a)} -function gpc(a){epc();return ws((jpc(),ipc),a)} -function dtc(a){btc();return ws((gtc(),ftc),a)} -function ltc(a){jtc();return ws((otc(),ntc),a)} -function xtc(a){stc();return ws((Atc(),ztc),a)} -function Gtc(a){Etc();return ws((Jtc(),Itc),a)} -function Utc(a){Ptc();return ws((Xtc(),Wtc),a)} -function auc(a){$tc();return ws((duc(),cuc),a)} -function avc(a){$uc();return ws((dvc(),cvc),a)} -function qvc(a){ovc();return ws((tvc(),svc),a)} -function zvc(a){xvc();return ws((Cvc(),Bvc),a)} -function Ivc(a){Gvc();return ws((Lvc(),Kvc),a)} -function Qvc(a){Ovc();return ws((Tvc(),Svc),a)} -function Quc(a){Ouc();return ws((Tuc(),Suc),a)} -function juc(a){huc();return ws((muc(),luc),a)} -function wuc(a){tuc();return ws((zuc(),yuc),a)} -function Euc(a){Cuc();return ws((Huc(),Guc),a)} -function exc(a){cxc();return ws((hxc(),gxc),a)} -function eDc(a){_Cc();return ws((hDc(),gDc),a)} -function oDc(a){lDc();return ws((rDc(),qDc),a)} -function ADc(a){wDc();return ws((DDc(),CDc),a)} -function ODc(a){JDc();return ws((RDc(),QDc),a)} -function cEc(a){aEc();return ws((fEc(),eEc),a)} -function mEc(a){kEc();return ws((pEc(),oEc),a)} -function uEc(a){sEc();return ws((xEc(),wEc),a)} -function DEc(a){BEc();return ws((GEc(),FEc),a)} -function MEc(a){KEc();return ws((PEc(),OEc),a)} -function VEc(a){TEc();return ws((YEc(),XEc),a)} -function nFc(a){lFc();return ws((qFc(),pFc),a)} -function wFc(a){uFc();return ws((zFc(),yFc),a)} -function FFc(a){DFc();return ws((IFc(),HFc),a)} -function TKc(a){RKc();return ws((WKc(),VKc),a)} -function uNc(a){sNc();return ws((xNc(),wNc),a)} -function yQc(a){wQc();return ws((BQc(),AQc),a)} -function GQc(a){EQc();return ws((JQc(),IQc),a)} -function hTc(a){fTc();return ws((kTc(),jTc),a)} -function fVc(a){dVc();return ws((iVc(),hVc),a)} -function bWc(a){YVc();return ws((eWc(),dWc),a)} -function ZYc(a){WYc();return ws((aZc(),_Yc),a)} -function NZc(a){LZc();return ws((QZc(),PZc),a)} -function u_c(a){s_c();return ws((x_c(),w_c),a)} -function C_c(a){A_c();return ws((F_c(),E_c),a)} -function C2c(a){x2c();return ws((F2c(),E2c),a)} -function j3c(a){g3c();return ws((m3c(),l3c),a)} -function j4c(a){g4c();return ws((m4c(),l4c),a)} -function _3c(a){Y3c();return ws((c4c(),b4c),a)} -function m5c(a){j5c();return ws((p5c(),o5c),a)} -function w5c(a){t5c();return ws((z5c(),y5c),a)} -function h6c(a){f6c();return ws((k6c(),j6c),a)} -function C6c(a){z6c();return ws((F6c(),E6c),a)} -function b7c(a){_6c();return ws((e7c(),d7c),a)} -function E8c(a){z8c();return ws((H8c(),G8c),a)} -function R8b(a){P8b();return ws((U8b(),T8b),a)} -function t3b(a){r3b();return ws((w3b(),v3b),a)} -function g9c(a){b9c();return ws((j9c(),i9c),a)} -function G9c(a){B9c();return ws((J9c(),I9c),a)} -function uad(a){sad();return ws((xad(),wad),a)} -function xbd(a){sbd();return ws((Abd(),zbd),a)} -function ibd(a){gbd();return ws((lbd(),kbd),a)} -function Gbd(a){Cbd();return ws((Jbd(),Ibd),a)} -function Obd(a){Mbd();return ws((Rbd(),Qbd),a)} -function Zbd(a){Xbd();return ws((acd(),_bd),a)} -function fdd(a){_cd();return ws((idd(),hdd),a)} -function qdd(a){ldd();return ws((tdd(),sdd),a)} -function $hd(a){Yhd();return ws((bid(),aid),a)} -function mid(a){kid();return ws((pid(),oid),a)} -function Tjd(a){Rjd();return ws((Wjd(),Vjd),a)} -function wkd(a){ukd();return ws((zkd(),ykd),a)} -function Hmd(a){Cmd();return ws((Kmd(),Jmd),a)} -function Qmd(a){Omd();return ws((Tmd(),Smd),a)} -function $md(a){Ymd();return ws((bnd(),and),a)} -function knd(a){ind();return ws((nnd(),mnd),a)} -function Hnd(a){Fnd();return ws((Knd(),Jnd),a)} -function Snd(a){Pnd();return ws((Vnd(),Und),a)} -function god(a){dod();return ws((jod(),iod),a)} -function rod(a){pod();return ws((uod(),tod),a)} -function Fod(a){Bod();return ws((Iod(),Hod),a)} -function Tod(a){Pod();return ws((Wod(),Vod),a)} -function wpd(a){qpd();return ws((zpd(),ypd),a)} -function Spd(a){Qpd();return ws((Vpd(),Upd),a)} -function fqd(a){dqd();return ws((iqd(),hqd),a)} -function oqd(a){mqd();return ws((rqd(),qqd),a)} -function zsc(a,b){return (uFb(a),a)+(uFb(b),b)} -function wqd(a){uqd();return ws((Eqd(),Dqd),a)} -function Ird(a){Grd();return ws((Lrd(),Krd),a)} -function vtd(a){ttd();return ws((ytd(),xtd),a)} -function dMc(){dMc=geb;bMc=(qpd(),ppd);cMc=Xod} -function uqd(){uqd=geb;sqd=new zqd;tqd=new Bqd} -function wJc(a){!a.e&&(a.e=new bnb);return a.e} -function BTc(a,b){this.c=a;this.a=b;this.b=b-a} -function g8c(a,b,c){this.a=a;this.b=b;this.c=c} -function gud(a,b,c){this.a=a;this.b=b;this.c=c} -function Wdd(a,b,c){this.a=a;this.b=b;this.c=c} -function ced(a,b,c){this.a=a;this.b=b;this.c=c} -function pFd(a,b,c){this.a=a;this.b=b;this.c=c} -function ZPd(a,b,c){this.a=a;this.b=b;this.c=c} -function g7d(a,b,c){this.e=a;this.a=b;this.c=c} -function K7d(a,b,c){s7d();C7d.call(this,a,b,c)} -function f9d(a,b,c){s7d();O8d.call(this,a,b,c)} -function r9d(a,b,c){s7d();O8d.call(this,a,b,c)} -function x9d(a,b,c){s7d();O8d.call(this,a,b,c)} -function h9d(a,b,c){s7d();f9d.call(this,a,b,c)} -function j9d(a,b,c){s7d();f9d.call(this,a,b,c)} -function l9d(a,b,c){s7d();j9d.call(this,a,b,c)} -function t9d(a,b,c){s7d();r9d.call(this,a,b,c)} -function z9d(a,b,c){s7d();x9d.call(this,a,b,c)} -function S2b(a){J2b.call(this,a.d,a.c,a.a,a.b)} -function B3b(a){J2b.call(this,a.d,a.c,a.a,a.b)} -function Og(a){this.d=a;Lg(this);this.b=ed(a.d)} -function cGd(a){aGd();return ws((fGd(),eGd),a)} -function gk(a,b){Qb(a);Qb(b);return new hk(a,b)} -function dr(a,b){Qb(a);Qb(b);return new mr(a,b)} -function hr(a,b){Qb(a);Qb(b);return new sr(a,b)} -function Dr(a,b){Qb(a);Qb(b);return new Rr(a,b)} -function Uub(a){sFb(a.b!=0);return Wub(a,a.a.a)} -function Vub(a){sFb(a.b!=0);return Wub(a,a.c.b)} -function q$d(a){!a.c&&(a.c=new X9d);return a.c} -function cv(a){var b;b=new bnb;xr(b,a);return b} -function Vx(a){var b;b=new _sb;xr(b,a);return b} -function Yx(a){var b;b=new xAb;_q(b,a);return b} -function gv(a){var b;b=new Yub;_q(b,a);return b} -function RD(a,b){CFb(a==null||QD(a,b));return a} -function Mxb(a,b,c){Axb.call(this,b,c);this.a=a} -function kB(a,b){this.c=a;this.b=b;this.a=false} -function hCb(){this.a=';,;';this.b='';this.c=''} -function $Cb(a,b,c){this.b=a;pxb.call(this,b,c)} -function uub(a,b,c){this.c=a;xlb.call(this,b,c)} -function fZb(a,b,c){eZb.call(this,a,b);this.b=c} -function YEb(a,b,c){VEb(c,0,a,b,c.length,false)} -function JYb(a,b,c,d,e){a.b=b;a.c=c;a.d=d;a.a=e} -function D2b(a,b,c,d,e){a.d=b;a.c=c;a.a=d;a.b=e} -function XDb(a,b){if(b){a.b=b;a.a=(LCb(b),b.a)}} -function mFb(a,b){if(!a){throw Adb(new agb(b))}} -function zFb(a,b){if(!a){throw Adb(new dgb(b))}} -function qFb(a,b){if(!a){throw Adb(new zeb(b))}} -function zqc(a,b){mqc();return hgb(a.d.p,b.d.p)} -function T0c(a,b){B0c();return Qfb(a.e.b,b.e.b)} -function U0c(a,b){B0c();return Qfb(a.e.a,b.e.a)} -function Xoc(a,b){return hgb(N3b(a.d),N3b(b.d))} -function Izb(a,b){return !!b&&Jzb(a,b.d)?b:null} -function $lc(a,b){return b==(qpd(),ppd)?a.c:a.d} -function Qdb(a){return Edb(yD(Kdb(a)?Wdb(a):a))} -function Nid(a){return new rjd(a.c+a.b,a.d+a.a)} -function GSd(a){return a!=null&&!mSd(a,aSd,bSd)} -function DSd(a,b){return (JSd(a)<<4|JSd(b))&Bwe} -function Rid(a,b,c,d,e){a.c=b;a.d=c;a.b=d;a.a=e} -function y8b(a){var b,c;b=a.b;c=a.c;a.b=c;a.c=b} -function B8b(a){var b,c;c=a.d;b=a.a;a.d=b;a.a=c} -function u6d(a,b){var c;c=a.c;t6d(a,b);return c} -function Nqd(a,b){b<0?(a.g=-1):(a.g=b);return a} -function kjd(a,b){gjd(a);a.a*=b;a.b*=b;return a} -function hrc(a,b,c){grc.call(this,b,c);this.d=a} -function PZd(a,b,c){kZd.call(this,a,b);this.c=c} -function Kfe(a,b,c){kZd.call(this,a,b);this.c=c} -function zUd(a){yUd();kUd.call(this);this.ci(a)} -function Yee(){ree();Zee.call(this,(YSd(),XSd))} -function Yse(a){Vse();++Use;return new Hte(0,a)} -function uke(){uke=geb;tke=(yob(),new mpb(eLe))} -function ux(){ux=geb;new wx((kl(),jl),(Wk(),Vk))} -function ugb(){ugb=geb;tgb=$C(bJ,Nve,17,256,0,1)} -function zUb(){this.b=Kfb(UD(iGd((yVb(),sVb))))} -function Pq(a){this.b=a;this.a=gn(this.b.a).Od()} -function mr(a,b){this.b=a;this.a=b;zl.call(this)} -function sr(a,b){this.a=a;this.b=b;zl.call(this)} -function s_d(a,b,c){this.a=a;N$d.call(this,b,c)} -function n_d(a,b,c){this.a=a;N$d.call(this,b,c)} -function sDd(a,b,c){var d;d=new OC(c);sC(a,b,d)} -function _Eb(a,b,c){var d;d=a[b];a[b]=c;return d} -function UEb(a){var b;b=a.slice();return dD(b,a)} -function SJb(a){var b;b=a.n;return a.a.b+b.d+b.a} -function PKb(a){var b;b=a.n;return a.e.b+b.d+b.a} -function QKb(a){var b;b=a.n;return a.e.a+b.b+b.c} -function rub(a){a.a.b=a.b;a.b.a=a.a;a.a=a.b=null} -function Mub(a,b){Pub(a,b,a.c.b,a.c);return true} -function w2b(a){if(a.a){return a.a}return R0b(a)} -function NSb(a){HSb();return JGd(a)==vCd(LGd(a))} -function OSb(a){HSb();return LGd(a)==vCd(JGd(a))} -function l_b(a,b){return k_b(a,new eZb(b.a,b.b))} -function xn(a,b){return fn(),ck(a,b),new zy(a,b)} -function fmc(a,b){return a.c=b){throw Adb(new web)}} -function JDb(a,b){return MDb(a,(uFb(b),new JAb(b)))} -function KDb(a,b){return MDb(a,(uFb(b),new LAb(b)))} -function prc(a,b,c){return qrc(a,RD(b,12),RD(c,12))} -function q4b(a){return J3b(),RD(a,12).g.c.length!=0} -function v4b(a){return J3b(),RD(a,12).e.c.length!=0} -function sdc(a,b){Zcc();return Qfb(b.a.o.a,a.a.o.a)} -function d_d(a,b){(b.Bb&QHe)!=0&&!a.a.o&&(a.a.o=b)} -function T3c(a,b){b.Ug("General 'Rotator",1);S3c(a)} -function MCc(a,b,c){b.qf(c,Kfb(UD(Wjb(a.b,c)))*a.a)} -function yid(a,b,c){tid();return xid(a,b)&&xid(a,c)} -function Rod(a){Pod();return !a.Hc(Lod)&&!a.Hc(Nod)} -function Nrc(a){if(a.e){return Src(a.e)}return null} -function Zdb(a){if(Kdb(a)){return ''+a}return GD(a)} -function XNc(a){var b;b=a;while(b.f){b=b.f}return b} -function HBb(a,b,c){bD(b,0,tCb(b[0],c[0]));return b} -function Gpc(a,b,c,d){var e;e=a.i;e.i=b;e.a=c;e.b=d} -function C5d(a,b,c,d){XZd.call(this,a,b,c);this.b=d} -function N3d(a,b,c,d,e){O3d.call(this,a,b,c,d,e,-1)} -function b4d(a,b,c,d,e){c4d.call(this,a,b,c,d,e,-1)} -function Iie(a,b,c,d){PZd.call(this,a,b,c);this.b=d} -function Xde(a){uId.call(this,a,false);this.a=false} -function Bqd(){vqd.call(this,'LOOKAHEAD_LAYOUT',1)} -function nNd(a){this.b=a;mMd.call(this,a);mNd(this)} -function vNd(a){this.b=a;BMd.call(this,a);uNd(this)} -function J5d(a,b,c){this.a=a;G5d.call(this,b,c,5,6)} -function wje(a,b,c,d){this.b=a;XZd.call(this,b,c,d)} -function Tj(a,b){this.b=a;Aj.call(this,a.b);this.a=b} -function NLc(a){this.a=LLc(a.a);this.b=new dnb(a.b)} -function Fx(a,b){tm();Ex.call(this,a,Pm(new mob(b)))} -function _se(a,b){Vse();++Use;return new aue(a,b,0)} -function bte(a,b){Vse();++Use;return new aue(6,a,b)} -function Ztb(a,b){uFb(b);while(a.Ob()){b.Cd(a.Pb())}} -function Ujb(a,b){return bE(b)?Yjb(a,b):!!qtb(a.f,b)} -function O_d(a,b){return b.Vh()?Vvd(a.b,RD(b,54)):b} -function whb(a,b){return lhb(a.substr(0,b.length),b)} -function Fl(a){return new is(new Il(a.a.length,a.a))} -function Oid(a){return new rjd(a.c+a.b/2,a.d+a.a/2)} -function yD(a){return hD(~a.l&dxe,~a.m&dxe,~a.h&exe)} -function cE(a){return typeof a===gve||typeof a===kve} -function akb(a){a.f=new ttb(a);a.i=new Ntb(a);++a.g} -function Klb(a){if(!a){throw Adb(new Dvb)}return a.d} -function smb(a){var b;b=omb(a);sFb(b!=null);return b} -function tmb(a){var b;b=pmb(a);sFb(b!=null);return b} -function tv(a,b){var c;c=a.a.gc();Sb(b,c);return c-b} -function Ysb(a,b){var c;c=a.a.zc(b,a);return c==null} -function rAb(a,b){return a.a.zc(b,(Geb(),Eeb))==null} -function _nb(a){return new SDb(null,$nb(a,a.length))} -function yPb(a,b,c){return zPb(a,RD(b,42),RD(c,176))} -function Wrb(a,b,c){zsb(a.a,b);return _Eb(a.b,b.g,c)} -function fyb(a,b,c){lyb(c,a.a.c.length);$mb(a.a,c,b)} -function Knb(a,b,c,d){nFb(b,c,a.length);Onb(a,b,c,d)} -function Onb(a,b,c,d){var e;for(e=b;e0?$wnd.Math.log(a/b):-100} -function Agb(a,b){return Ddb(a,b)<0?-1:Ddb(a,b)>0?1:0} -function Dge(a,b){hZd(a,ZD(b,160)?b:RD(b,2036).Rl())} -function vFb(a,b){if(a==null){throw Adb(new Ogb(b))}} -function $nb(a,b){return jxb(b,a.length),new Gxb(a,b)} -function hsc(a,b){if(!b){return false}return ye(a,b)} -function Gs(){zs();return cD(WC(RG,1),jwe,549,0,[ys])} -function Xib(a){return a.e==0?a:new cjb(-a.e,a.d,a.a)} -function $Nb(a,b){return Qfb(a.c.c+a.c.b,b.c.c+b.c.b)} -function cvb(a,b){Pub(a.d,b,a.b.b,a.b);++a.a;a.c=null} -function JCb(a,b){!a.c?Rmb(a.b,b):JCb(a.c,b);return a} -function KB(a,b,c){var d;d=JB(a,b);LB(a,b,c);return d} -function Rnb(a,b,c){var d;for(d=0;d=a.g} -function bD(a,b,c){pFb(c==null||VC(a,c));return a[b]=c} -function yhb(a,b){BFb(b,a.length+1);return a.substr(b)} -function yxb(a,b){uFb(b);while(a.c=a){return new rDb}return iDb(a-1)} -function Y2b(a){if(!a.a&&!!a.c){return a.c.b}return a.a} -function Zx(a){if(ZD(a,616)){return a}return new sy(a)} -function LCb(a){if(!a.c){MCb(a);a.d=true}else{LCb(a.c)}} -function ICb(a){if(!a.c){a.d=true;KCb(a)}else{a.c.$e()}} -function bHb(a){a.b=false;a.c=false;a.d=false;a.a=false} -function uMc(a){var b,c;b=a.c.i.c;c=a.d.i.c;return b==c} -function _vd(a,b){var c;c=a.Ih(b);c>=0?a.ki(c):Tvd(a,b)} -function mtd(a,b){a.c<0||a.b.b0){a=a<<1|(a<0?1:0)}return a} -function BGc(a,b){var c;c=new R4b(a);ZEb(b.c,c);return c} -function FMb(a,b){a.u.Hc((Pod(),Lod))&&DMb(a,b);HMb(a,b)} -function Fvb(a,b){return dE(a)===dE(b)||a!=null&&pb(a,b)} -function Vrb(a,b){return Bsb(a.a,b)?a.b[RD(b,22).g]:null} -function YRb(){VRb();return cD(WC($O,1),jwe,489,0,[URb])} -function ybd(){sbd();return cD(WC(M1,1),jwe,490,0,[rbd])} -function Hbd(){Cbd();return cD(WC(N1,1),jwe,558,0,[Bbd])} -function gdd(){_cd();return cD(WC(V1,1),jwe,539,0,[$cd])} -function iyd(a){!a.n&&(a.n=new C5d(I4,a,1,7));return a.n} -function wCd(a){!a.c&&(a.c=new C5d(K4,a,9,9));return a.c} -function mzd(a){!a.c&&(a.c=new Yie(E4,a,5,8));return a.c} -function lzd(a){!a.b&&(a.b=new Yie(E4,a,4,7));return a.b} -function Sed(a){a.j.c.length=0;Ae(a.c);sfd(a.a);return a} -function Afe(a){a.e==fLe&&Gfe(a,Aee(a.g,a.b));return a.e} -function Bfe(a){a.f==fLe&&Hfe(a,Bee(a.g,a.b));return a.f} -function xBd(a,b,c,d){wBd(a,b,c,false);j1d(a,d);return a} -function oNd(a,b){this.b=a;nMd.call(this,a,b);mNd(this)} -function wNd(a,b){this.b=a;CMd.call(this,a,b);uNd(this)} -function Kmb(a){this.d=a;this.a=this.d.b;this.b=this.d.c} -function oy(a,b){this.b=a;this.c=b;this.a=new Osb(this.b)} -function ihb(a,b){BFb(b,a.length);return a.charCodeAt(b)} -function NDd(a,b){CGd(a,Kfb(vDd(b,'x')),Kfb(vDd(b,'y')))} -function $Dd(a,b){CGd(a,Kfb(vDd(b,'x')),Kfb(vDd(b,'y')))} -function CDb(a,b){MCb(a);return new SDb(a,new hEb(b,a.a))} -function GDb(a,b){MCb(a);return new SDb(a,new zEb(b,a.a))} -function HDb(a,b){MCb(a);return new WCb(a,new nEb(b,a.a))} -function IDb(a,b){MCb(a);return new oDb(a,new tEb(b,a.a))} -function Ty(a,b){return new Ry(RD(Qb(a),50),RD(Qb(b),50))} -function nHb(a,b){return Qfb(a.d.c+a.d.b/2,b.d.c+b.d.b/2)} -function gTb(a,b,c){c.a?Eyd(a,b.b-a.f/2):Dyd(a,b.a-a.g/2)} -function WYb(a,b){return Qfb(a.g.c+a.g.b/2,b.g.c+b.g.b/2)} -function RZb(a,b){NZb();return Qfb((uFb(a),a),(uFb(b),b))} -function wSd(a){return a!=null&&tpb(eSd,a.toLowerCase())} -function Ae(a){var b;for(b=a.Kc();b.Ob();){b.Pb();b.Qb()}} -function Ih(a){var b;b=a.b;!b&&(a.b=b=new Xh(a));return b} -function R0b(a){var b;b=Z5b(a);if(b){return b}return null} -function BSb(a,b){var c,d;c=a/b;d=eE(c);c>d&&++d;return d} -function Ck(a,b,c){var d;d=RD(a.d.Kb(c),159);!!d&&d.Nb(b)} -function Vhc(a,b,c){tqc(a.a,c);Jpc(c);Kqc(a.b,c);bqc(b,c)} -function oNc(a,b,c,d){this.a=a;this.c=b;this.b=c;this.d=d} -function ROc(a,b,c,d){this.c=a;this.b=b;this.a=c;this.d=d} -function uPc(a,b,c,d){this.c=a;this.b=b;this.d=c;this.a=d} -function Uid(a,b,c,d){this.c=a;this.d=b;this.b=c;this.a=d} -function GTc(a,b,c,d){this.a=a;this.d=b;this.c=c;this.b=d} -function t1b(a,b,c,d){this.a=a;this.e=b;this.d=c;this.c=d} -function $td(a,b,c,d){this.a=a;this.c=b;this.d=c;this.b=d} -function ehb(a,b,c){this.a=ywe;this.d=a;this.b=b;this.c=c} -function fpc(a,b,c,d){qs.call(this,a,b);this.a=c;this.b=d} -function Uwb(a,b){this.d=(uFb(a),a);this.a=16449;this.c=b} -function CIc(a){this.a=new bnb;this.e=$C(kE,Nve,53,a,0,2)} -function ELc(a){a.Ug('No crossing minimization',1);a.Vg()} -function Evb(){yz.call(this,'There is no more element.')} -function OEd(a,b,c,d){this.a=a;this.b=b;this.c=c;this.d=d} -function PEd(a,b,c,d){this.a=a;this.b=b;this.c=c;this.d=d} -function h7d(a,b,c,d){this.e=a;this.a=b;this.c=c;this.d=d} -function x7d(a,b,c,d){this.a=a;this.c=b;this.d=c;this.b=d} -function C8d(a,b,c,d){s7d();M7d.call(this,b,c,d);this.a=a} -function J8d(a,b,c,d){s7d();M7d.call(this,b,c,d);this.a=a} -function lwd(a,b,c){var d,e;d=oSd(a);e=b.ti(c,d);return e} -function lBd(a){var b,c;c=(b=new s2d,b);l2d(c,a);return c} -function mBd(a){var b,c;c=(b=new s2d,b);p2d(c,a);return c} -function HDd(a,b){var c;c=Wjb(a.f,b);wEd(b,c);return null} -function uCd(a){!a.b&&(a.b=new C5d(G4,a,12,3));return a.b} -function VD(a){CFb(a==null||cE(a)&&!(a.Tm===keb));return a} -function gz(a){if(a.n){a.e!==rwe&&a.je();a.j=null}return a} -function Ng(a){ig(a.d);if(a.d.d!=a.c){throw Adb(new Jrb)}} -function Bkb(a){sFb(a.b0&&wPd(this)} -function Vg(a,b){this.a=a;Pg.call(this,a,RD(a.d,15).fd(b))} -function lrd(a,b){return Qfb(urd(a)*trd(a),urd(b)*trd(b))} -function mrd(a,b){return Qfb(urd(a)*trd(a),urd(b)*trd(b))} -function n5b(a){return ozd(a)&&Heb(TD(Gxd(a,(yCc(),OAc))))} -function Sfc(a,b){return Rc(a,RD(mQb(b,(yCc(),tBc)),17),b)} -function lic(a,b){RD(mQb(a,(Ywc(),qwc)),15).Fc(b);return b} -function C2b(a,b){a.b=b.b;a.c=b.c;a.d=b.d;a.a=b.a;return a} -function cEb(a,b,c,d){this.b=a;this.c=d;xxb.call(this,b,c)} -function Ulc(a,b,c){a.i=0;a.e=0;if(b==c){return}Qlc(a,b,c)} -function Vlc(a,b,c){a.i=0;a.e=0;if(b==c){return}Rlc(a,b,c)} -function akc(a,b,c){Wjc();return _Gb(RD(Wjb(a.e,b),529),c)} -function nd(a){var b;return b=a.f,!b?(a.f=new ne(a,a.c)):b} -function nTc(a,b){return VTc(a.j,b.s,b.c)+VTc(b.e,a.s,a.c)} -function Rrc(a,b){if(!!a.e&&!a.e.a){Prc(a.e,b);Rrc(a.e,b)}} -function Qrc(a,b){if(!!a.d&&!a.d.a){Prc(a.d,b);Qrc(a.d,b)}} -function krd(a,b){return -Qfb(urd(a)*trd(a),urd(b)*trd(b))} -function gtd(a){return RD(a.ld(),149).Pg()+':'+jeb(a.md())} -function EBd(){BBd(this,new yAd);this.wb=(lTd(),kTd);jTd()} -function G7b(a){this.b=new bnb;Tmb(this.b,this.b);this.a=a} -function WWc(a,b){new Yub;this.a=new Ejd;this.b=a;this.c=b} -function urb(){urb=geb;rrb=new wrb;srb=new wrb;trb=new Brb} -function yob(){yob=geb;vob=new Job;wob=new apb;xob=new ipb} -function FGb(){FGb=geb;CGb=new AGb;EGb=new fHb;DGb=new YGb} -function HSb(){HSb=geb;GSb=new bnb;FSb=new Tsb;ESb=new bnb} -function Rb(a,b){if(a==null){throw Adb(new Ogb(b))}return a} -function tCd(a){!a.a&&(a.a=new C5d(J4,a,10,11));return a.a} -function uYd(a){!a.q&&(a.q=new C5d(s7,a,11,10));return a.q} -function xYd(a){!a.s&&(a.s=new C5d(y7,a,21,17));return a.s} -function er(a){Qb(a);return Er(new is(Mr(a.a.Kc(),new ir)))} -function hfd(a,b){rb(a);rb(b);return ns(RD(a,22),RD(b,22))} -function qDd(a,b,c){var d,e;d=Qeb(c);e=new hC(d);sC(a,b,e)} -function d4d(a,b,c,d,e,f){c4d.call(this,a,b,c,d,e,f?-2:-1)} -function sje(a,b,c,d){kZd.call(this,b,c);this.b=a;this.a=d} -function Ry(a,b){wi.call(this,new ezb(a));this.a=a;this.b=b} -function Gu(a){this.b=a;this.c=a;a.e=null;a.c=null;this.a=1} -function Dkc(a){lkc();var b;b=RD(a.g,10);b.n.a=a.d.c+b.d.b} -function fA(){fA=geb;var a,b;b=!lA();a=new tA;eA=b?new mA:a} -function Hob(a){yob();return ZD(a,59)?new irb(a):new Upb(a)} -function Ux(a){return ZD(a,16)?new btb(RD(a,16)):Vx(a.Kc())} -function Vi(a){return new ij(a,a.e.Rd().gc()*a.c.Rd().gc())} -function fj(a){return new sj(a,a.e.Rd().gc()*a.c.Rd().gc())} -function Iz(a){return !!a&&!!a.hashCode?a.hashCode():kFb(a)} -function Yjb(a,b){return b==null?!!qtb(a.f,null):Jtb(a.i,b)} -function hYb(a,b){var c;c=$sb(a.a,b);c&&(b.d=null);return c} -function MGb(a,b,c){if(a.f){return a.f.ef(b,c)}return false} -function cFc(a,b,c,d){bD(a.c[b.g],c.g,d);bD(a.c[c.g],b.g,d)} -function fFc(a,b,c,d){bD(a.c[b.g],b.g,c);bD(a.b[b.g],b.g,d)} -function sXc(a,b,c){return Kfb(UD(c.a))<=a&&Kfb(UD(c.b))>=b} -function yJc(a,b){this.g=a;this.d=cD(WC(jR,1),WAe,10,0,[b])} -function lHb(a){this.c=a;this.b=new yAb(RD(Qb(new oHb),50))} -function UYb(a){this.c=a;this.b=new yAb(RD(Qb(new XYb),50))} -function $Qb(a){this.b=a;this.a=new yAb(RD(Qb(new bRb),50))} -function tRc(){this.b=new _sb;this.d=new Yub;this.e=new Fyb} -function VTb(){this.c=new pjd;this.d=new pjd;this.e=new pjd} -function a1b(){this.a=new Ejd;this.b=(dk(3,iwe),new cnb(3))} -function i7d(a,b){this.e=a;this.a=jJ;this.b=pje(b);this.c=b} -function Vid(a){this.c=a.c;this.d=a.d;this.b=a.b;this.a=a.a} -function VLd(a,b,c,d,e,f){this.a=a;NKd.call(this,b,c,d,e,f)} -function aLd(a,b,c,d,e,f){this.a=a;NKd.call(this,b,c,d,e,f)} -function fge(a,b,c,d,e,f,g){return new lle(a.e,b,c,d,e,f,g)} -function xhb(a,b,c){return c>=0&&lhb(a.substr(c,b.length),b)} -function hGd(a,b){return ZD(b,149)&&lhb(a.b,RD(b,149).Pg())} -function Tde(a,b){return a.a?b.Gh().Kc():RD(b.Gh(),71).Ii()} -function Qqb(a,b){var c;c=a.b.Qc(b);Rqb(c,a.b.gc());return c} -function Ivb(a,b){if(a==null){throw Adb(new Ogb(b))}return a} -function zYd(a){if(!a.u){yYd(a);a.u=new w0d(a,a)}return a.u} -function Kx(a){this.a=(yob(),ZD(a,59)?new irb(a):new Upb(a))} -function Uwd(a){var b;b=RD(Ywd(a,16),29);return !b?a.ii():b} -function lz(a,b){var c;c=nfb(a.Rm);return b==null?c:c+': '+b} -function zhb(a,b,c){AFb(b,c,a.length);return a.substr(b,c-b)} -function VKb(a,b){RJb.call(this);KKb(this);this.a=a;this.c=b} -function neb(a){!a?vve:lz(a,a.ie());String.fromCharCode(10)} -function Wz(a){Qz();$wnd.setTimeout(function(){throw a},0)} -function GHb(){DHb();return cD(WC(uN,1),jwe,436,0,[CHb,BHb])} -function OHb(){LHb();return cD(WC(vN,1),jwe,435,0,[JHb,KHb])} -function WUb(){TUb();return cD(WC(BP,1),jwe,432,0,[RUb,SUb])} -function S8b(){P8b();return cD(WC(vS,1),jwe,517,0,[O8b,N8b])} -function Rvc(){Ovc();return cD(WC(lX,1),jwe,429,0,[Mvc,Nvc])} -function buc(){$tc();return cD(WC(cX,1),jwe,428,0,[Ytc,Ztc])} -function mtc(){jtc();return cD(WC($W,1),jwe,431,0,[htc,itc])} -function vEc(){sEc();return cD(WC(xX,1),jwe,430,0,[qEc,rEc])} -function vNc(){sNc();return cD(WC(MY,1),jwe,531,0,[rNc,qNc])} -function D2c(){x2c();return cD(WC(s0,1),jwe,501,0,[v2c,w2c])} -function zQc(){wQc();return cD(WC(FZ,1),jwe,523,0,[vQc,uQc])} -function HQc(){EQc();return cD(WC(GZ,1),jwe,522,0,[CQc,DQc])} -function iTc(){fTc();return cD(WC(b$,1),jwe,528,0,[eTc,dTc])} -function Fuc(){Cuc();return cD(WC(fX,1),jwe,488,0,[Buc,Auc])} -function F8c(){z8c();return cD(WC(l1,1),jwe,491,0,[x8c,y8c])} -function H9c(){B9c();return cD(WC(t1,1),jwe,492,0,[z9c,A9c])} -function D_c(){A_c();return cD(WC(K_,1),jwe,433,0,[z_c,y_c])} -function a4c(){Y3c();return cD(WC(H0,1),jwe,434,0,[W3c,X3c])} -function gVc(){dVc();return cD(WC(w$,1),jwe,465,0,[bVc,cVc])} -function Pbd(){Mbd();return cD(WC(O1,1),jwe,438,0,[Lbd,Kbd])} -function rdd(){ldd();return cD(WC(W1,1),jwe,437,0,[kdd,jdd])} -function xqd(){uqd();return cD(WC(M3,1),jwe,347,0,[sqd,tqd])} -function Jvd(a,b,c,d){return c>=0?a.Uh(b,c,d):a.Ch(null,c,d)} -function ltd(a){if(a.b.b==0){return a.a.sf()}return Uub(a.b)} -function vKd(a){if(a.p!=5)throw Adb(new cgb);return Ydb(a.f)} -function EKd(a){if(a.p!=5)throw Adb(new cgb);return Ydb(a.k)} -function P$d(a){dE(a.a)===dE((lYd(),kYd))&&Q$d(a);return a.a} -function iad(a,b){a.b=b;a.c>0&&a.b>0&&(a.g=Aad(a.c,a.b,a.a))} -function jad(a,b){a.c=b;a.c>0&&a.b>0&&(a.g=Aad(a.c,a.b,a.a))} -function BUc(a,b){yUc(this,new rjd(a.a,a.b));zUc(this,gv(b))} -function Tp(){Sp.call(this,new Usb(Sv(12)));Lb(true);this.a=2} -function eue(a,b,c){Vse();Wse.call(this,a);this.b=b;this.a=c} -function C7d(a,b,c){s7d();t7d.call(this,b);this.a=a;this.b=c} -function qub(a){var b;b=a.c.d.b;a.b=b;a.a=a.c.d;b.a=a.c.d.b=a} -function Tub(a){return a.b==0?null:(sFb(a.b!=0),Wub(a,a.a.a))} -function Xjb(a,b){return b==null?Wd(qtb(a.f,null)):Ktb(a.i,b)} -function bzb(a,b,c,d,e){return new Kzb(a,(cAb(),aAb),b,c,d,e)} -function Fnb(a,b){oFb(b);return Hnb(a,$C(kE,Pwe,28,b,15,1),b)} -function Tx(a,b){Rb(a,'set1');Rb(b,'set2');return new ey(a,b)} -function Kz(a,b){var c=Jz[a.charCodeAt(0)];return c==null?a:c} -function Xyb(a,b){var c,d;c=b;d=new Gzb;Zyb(a,c,d);return d.d} -function EMb(a,b,c,d){var e;e=new TJb;b.a[c.g]=e;Wrb(a.b,d,e)} -function SXb(a,b){var c;c=BXb(a.f,b);return $id(fjd(c),a.f.d)} -function RFb(a){var b;EJb(a.a);DJb(a.a);b=new PJb(a.a);LJb(b)} -function _Mb(a,b){$Mb(a,true);Umb(a.e.Rf(),new dNb(a,true,b))} -function PSb(a,b){HSb();return a==vCd(JGd(b))||a==vCd(LGd(b))} -function R0c(a,b){B0c();return RD(mQb(b,(h_c(),f_c)),17).a==a} -function eE(a){return Math.max(Math.min(a,lve),-2147483648)|0} -function sy(a){this.a=RD(Qb(a),277);this.b=(yob(),new jrb(a))} -function qbd(a,b,c){this.i=new bnb;this.b=a;this.g=b;this.a=c} -function had(a,b,c){this.a=new bnb;this.e=a;this.f=b;this.c=c} -function _9c(a,b,c){this.c=new bnb;this.e=a;this.f=b;this.b=c} -function TKb(a){RJb.call(this);KKb(this);this.a=a;this.c=true} -function ieb(a){function b(){} -;b.prototype=a||{};return new b} -function zfb(a){if(a.Ae()){return null}var b=a.n;return eeb[b]} -function kzd(a){if(a.Db>>16!=3)return null;return RD(a.Cb,27)} -function MCd(a){if(a.Db>>16!=9)return null;return RD(a.Cb,27)} -function Fzd(a){if(a.Db>>16!=6)return null;return RD(a.Cb,74)} -function dVc(){dVc=geb;bVc=new eVc(Nye,0);cVc=new eVc(Oye,1)} -function wQc(){wQc=geb;vQc=new xQc(Oye,0);uQc=new xQc(Nye,1)} -function EQc(){EQc=geb;CQc=new FQc(Zye,0);DQc=new FQc('UP',1)} -function Is(){Is=geb;Hs=ss((zs(),cD(WC(RG,1),jwe,549,0,[ys])))} -function Wx(a){var b;b=new atb(Sv(a.length));zob(b,a);return b} -function B2b(a,b){a.b+=b.b;a.c+=b.c;a.d+=b.d;a.a+=b.a;return a} -function qmb(a,b){if(kmb(a,b)){Jmb(a);return true}return false} -function qC(a,b){if(b==null){throw Adb(new Ngb)}return rC(a,b)} -function nB(a,b){var c;c=a.q.getHours();a.q.setDate(b);mB(a,c)} -function Xvd(a,b,c){var d;d=a.Ih(b);d>=0?a.bi(d,c):Svd(a,b,c)} -function Lvd(a,b){var c;c=a.Ih(b);return c>=0?a.Wh(c):Rvd(a,b)} -function zo(a,b){var c;Qb(b);for(c=a.a;c;c=c.c){b.Yd(c.g,c.i)}} -function pMc(a,b,c){var d;d=qMc(a,b,c);a.b=new _Lc(d.c.length)} -function HId(a,b,c){EId();!!a&&Zjb(DId,a,b);!!a&&Zjb(CId,a,c)} -function bfc(a,b){Rec();return Geb(),RD(b.a,17).a0} -function sId(a){var b;b=a.d;b=a.bj(a.f);WGd(a,b);return b.Ob()} -function bHd(a,b){var c;c=new Kub(b);Ve(c,a);return new dnb(c)} -function qKd(a){if(a.p!=0)throw Adb(new cgb);return Pdb(a.f,0)} -function zKd(a){if(a.p!=0)throw Adb(new cgb);return Pdb(a.k,0)} -function gBd(a){if(a.Db>>16!=7)return null;return RD(a.Cb,241)} -function xXd(a){if(a.Db>>16!=6)return null;return RD(a.Cb,241)} -function dCd(a){if(a.Db>>16!=7)return null;return RD(a.Cb,167)} -function vCd(a){if(a.Db>>16!=11)return null;return RD(a.Cb,27)} -function uWd(a){if(a.Db>>16!=17)return null;return RD(a.Cb,29)} -function kVd(a){if(a.Db>>16!=3)return null;return RD(a.Cb,155)} -function BDb(a){var b;MCb(a);b=new _sb;return CDb(a,new aEb(b))} -function xfb(a,b){var c=a.a=a.a||[];return c[b]||(c[b]=a.ve(b))} -function qB(a,b){var c;c=a.q.getHours();a.q.setMonth(b);mB(a,c)} -function oz(a,b){ez(this);this.f=b;this.g=a;gz(this);this.je()} -function TQb(a,b){this.a=a;this.c=ajd(this.a);this.b=new Vid(b)} -function aGb(a,b,c){this.a=b;this.c=a;this.b=(Qb(c),new dnb(c))} -function s$b(a,b,c){this.a=b;this.c=a;this.b=(Qb(c),new dnb(c))} -function _Kc(a){this.a=a;this.b=$C(qY,Nve,2043,a.e.length,0,2)} -function fGb(){this.a=new Iub;this.e=new _sb;this.g=0;this.i=0} -function EId(){EId=geb;DId=new Tsb;CId=new Tsb;IId(zK,new JId)} -function KFc(){KFc=geb;JFc=nfd(new ufd,(sXb(),rXb),(hcc(),$bc))} -function RFc(){RFc=geb;QFc=nfd(new ufd,(sXb(),rXb),(hcc(),$bc))} -function gGc(){gGc=geb;fGc=nfd(new ufd,(sXb(),rXb),(hcc(),$bc))} -function ANc(){ANc=geb;zNc=pfd(new ufd,(sXb(),rXb),(hcc(),ybc))} -function dOc(){dOc=geb;cOc=pfd(new ufd,(sXb(),rXb),(hcc(),ybc))} -function gQc(){gQc=geb;fQc=pfd(new ufd,(sXb(),rXb),(hcc(),ybc))} -function WQc(){WQc=geb;VQc=pfd(new ufd,(sXb(),rXb),(hcc(),ybc))} -function dZd(a,b,c,d,e,f){return new P3d(a.e,b,a.Lj(),c,d,e,f)} -function $jb(a,b,c){return b==null?rtb(a.f,null,c):Ltb(a.i,b,c)} -function Y0b(a,b){!!a.c&&Ymb(a.c.g,a);a.c=b;!!a.c&&Rmb(a.c.g,a)} -function g3b(a,b){!!a.c&&Ymb(a.c.a,a);a.c=b;!!a.c&&Rmb(a.c.a,a)} -function P3b(a,b){!!a.i&&Ymb(a.i.j,a);a.i=b;!!a.i&&Rmb(a.i.j,a)} -function Z0b(a,b){!!a.d&&Ymb(a.d.e,a);a.d=b;!!a.d&&Rmb(a.d.e,a)} -function _Sc(a,b){!!a.a&&Ymb(a.a.k,a);a.a=b;!!a.a&&Rmb(a.a.k,a)} -function aTc(a,b){!!a.b&&Ymb(a.b.f,a);a.b=b;!!a.b&&Rmb(a.b.f,a)} -function Odd(a,b){Pdd(a,a.b,a.c);RD(a.b.b,68);!!b&&RD(b.b,68).b} -function j2c(a,b){return Qfb(RD(a.c,65).c.e.b,RD(b.c,65).c.e.b)} -function k2c(a,b){return Qfb(RD(a.c,65).c.e.a,RD(b.c,65).c.e.a)} -function YXb(a){NXb();return Geb(),RD(a.a,86).d.e!=0?true:false} -function LXd(a,b){ZD(a.Cb,184)&&(RD(a.Cb,184).tb=null);PAd(a,b)} -function CWd(a,b){ZD(a.Cb,90)&&v$d(yYd(RD(a.Cb,90)),4);PAd(a,b)} -function _5d(a,b){a6d(a,b);ZD(a.Cb,90)&&v$d(yYd(RD(a.Cb,90)),2)} -function JFd(a,b){var c,d;c=b.c;d=c!=null;d&&oDd(a,new OC(b.c))} -function v0d(a){var b,c;c=(jTd(),b=new s2d,b);l2d(c,a);return c} -function E4d(a){var b,c;c=(jTd(),b=new s2d,b);l2d(c,a);return c} -function Fr(a){var b;while(true){b=a.Pb();if(!a.Ob()){return b}}} -function nq(a,b,c){Rmb(a.a,(fn(),ck(b,c),new gp(b,c)));return a} -function rge(a,b){return nke(),wWd(b)?new ole(b,a):new Eke(b,a)} -function ojb(a){Pib();return Ddb(a,0)>=0?jjb(a):Xib(jjb(Odb(a)))} -function Asb(a){var b;b=RD(UEb(a.b),9);return new Fsb(a.a,b,a.c)} -function Qw(a,b){var c;c=RD(Xv(nd(a.a),b),16);return !c?0:c.gc()} -function Zmb(a,b,c){var d;xFb(b,c,a.c.length);d=c-b;$Eb(a.c,b,d)} -function Rkb(a,b,c){xFb(b,c,a.gc());this.c=a;this.a=b;this.b=c-b} -function fgd(a){this.c=new Yub;this.b=a.b;this.d=a.c;this.a=a.a} -function qjd(a){this.a=$wnd.Math.cos(a);this.b=$wnd.Math.sin(a)} -function bTc(a,b,c,d){this.c=a;this.d=d;_Sc(this,b);aTc(this,c)} -function Si(a,b){Qi.call(this,new Usb(Sv(a)));dk(b,Mve);this.a=b} -function Ryb(a,b,c){return new Kzb(a,(cAb(),_zb),null,false,b,c)} -function czb(a,b,c){return new Kzb(a,(cAb(),bAb),b,c,null,false)} -function ABb(){xBb();return cD(WC(QL,1),jwe,108,0,[uBb,vBb,wBb])} -function yLb(){vLb();return cD(WC(TN,1),jwe,472,0,[uLb,tLb,sLb])} -function HKb(){EKb();return cD(WC(MN,1),jwe,471,0,[CKb,BKb,DKb])} -function aKb(){ZJb();return cD(WC(JN,1),jwe,237,0,[WJb,XJb,YJb])} -function DWb(){AWb();return cD(WC(JP,1),jwe,391,0,[yWb,xWb,zWb])} -function moc(){joc();return cD(WC(UV,1),jwe,372,0,[ioc,hoc,goc])} -function ytc(){stc();return cD(WC(_W,1),jwe,322,0,[qtc,ptc,rtc])} -function Htc(){Etc();return cD(WC(aX,1),jwe,351,0,[Btc,Dtc,Ctc])} -function kuc(){huc();return cD(WC(dX,1),jwe,460,0,[fuc,euc,guc])} -function Avc(){xvc();return cD(WC(jX,1),jwe,299,0,[vvc,wvc,uvc])} -function Jvc(){Gvc();return cD(WC(kX,1),jwe,311,0,[Evc,Fvc,Dvc])} -function pDc(){lDc();return cD(WC(sX,1),jwe,390,0,[iDc,jDc,kDc])} -function EEc(){BEc();return cD(WC(yX,1),jwe,463,0,[AEc,yEc,zEc])} -function NEc(){KEc();return cD(WC(zX,1),jwe,387,0,[HEc,IEc,JEc])} -function WEc(){TEc();return cD(WC(AX,1),jwe,349,0,[SEc,QEc,REc])} -function oFc(){lFc();return cD(WC(CX,1),jwe,350,0,[iFc,jFc,kFc])} -function xFc(){uFc();return cD(WC(DX,1),jwe,352,0,[tFc,rFc,sFc])} -function GFc(){DFc();return cD(WC(EX,1),jwe,388,0,[BFc,CFc,AFc])} -function UKc(){RKc();return cD(WC(nY,1),jwe,464,0,[OKc,PKc,QKc])} -function K3b(a){return xjd(cD(WC(l3,1),Nve,8,0,[a.i.n,a.n,a.a]))} -function OZc(){LZc();return cD(WC(F_,1),jwe,392,0,[KZc,JZc,IZc])} -function H_c(){H_c=geb;G_c=nfd(new ufd,(YVc(),WVc),(WYc(),MYc))} -function A_c(){A_c=geb;z_c=new B_c('DFS',0);y_c=new B_c('BFS',1)} -function TQc(a,b,c){var d;d=new SQc;d.b=b;d.a=c;++b.b;Rmb(a.d,d)} -function NTb(a,b,c){var d;d=new sjd(c.d);$id(d,a);CGd(b,d.a,d.b)} -function Nwb(a,b){Mwb(a,Ydb(Cdb(Tdb(b,24),Pxe)),Ydb(Cdb(b,Pxe)))} -function wFb(a,b){if(a<0||a>b){throw Adb(new veb(cye+a+dye+b))}} -function tFb(a,b){if(a<0||a>=b){throw Adb(new veb(cye+a+dye+b))}} -function BFb(a,b){if(a<0||a>=b){throw Adb(new eib(cye+a+dye+b))}} -function Swb(a,b){this.b=(uFb(a),a);this.a=(b&qxe)==0?b|64|Ove:b} -function ODb(a){var b;MCb(a);b=(urb(),urb(),srb);return PDb(a,b)} -function R9c(a,b,c){var d;d=S9c(a,b,false);return d.b<=b&&d.a<=c} -function h9c(){b9c();return cD(WC(o1,1),jwe,439,0,[$8c,a9c,_8c])} -function c7c(){_6c();return cD(WC(a1,1),jwe,394,0,[Z6c,$6c,Y6c])} -function i6c(){f6c();return cD(WC(V0,1),jwe,445,0,[c6c,d6c,e6c])} -function D6c(){z6c();return cD(WC(Z0,1),jwe,456,0,[w6c,y6c,x6c])} -function k4c(){g4c();return cD(WC(I0,1),jwe,393,0,[d4c,e4c,f4c])} -function x5c(){t5c();return cD(WC(N0,1),jwe,300,0,[r5c,s5c,q5c])} -function Ind(){Fnd();return cD(WC(y3,1),jwe,346,0,[Dnd,Cnd,End])} -function jbd(){gbd();return cD(WC(I1,1),jwe,444,0,[dbd,ebd,fbd])} -function Rmd(){Omd();return cD(WC(t3,1),jwe,278,0,[Lmd,Mmd,Nmd])} -function pqd(){mqd();return cD(WC(J3,1),jwe,280,0,[kqd,jqd,lqd])} -function bv(a){Qb(a);return ZD(a,16)?new dnb(RD(a,16)):cv(a.Kc())} -function Hz(a,b){return !!a&&!!a.equals?a.equals(b):dE(a)===dE(b)} -function Cdb(a,b){return Edb(tD(Kdb(a)?Wdb(a):a,Kdb(b)?Wdb(b):b))} -function Rdb(a,b){return Edb(zD(Kdb(a)?Wdb(a):a,Kdb(b)?Wdb(b):b))} -function $db(a,b){return Edb(HD(Kdb(a)?Wdb(a):a,Kdb(b)?Wdb(b):b))} -function xs(a,b){var c;c=(uFb(a),a).g;lFb(!!c);uFb(b);return c(b)} -function rv(a,b){var c,d;d=tv(a,b);c=a.a.fd(d);return new Gv(a,c)} -function CXd(a){if(a.Db>>16!=6)return null;return RD(yvd(a),241)} -function sKd(a){if(a.p!=2)throw Adb(new cgb);return Ydb(a.f)&Bwe} -function BKd(a){if(a.p!=2)throw Adb(new cgb);return Ydb(a.k)&Bwe} -function ynb(a){sFb(a.ad?1:0} -function Hmc(a,b){var c,d;c=Gmc(b);d=c;return RD(Wjb(a.c,d),17).a} -function CMc(a,b,c){var d;d=a.d[b.p];a.d[b.p]=a.d[c.p];a.d[c.p]=d} -function Jqd(a,b,c){var d;if(a.n&&!!b&&!!c){d=new otd;Rmb(a.e,d)}} -function gYb(a,b){Ysb(a.a,b);if(b.d){throw Adb(new yz(jye))}b.d=a} -function Had(a,b){this.a=new bnb;this.d=new bnb;this.f=a;this.c=b} -function RWb(){this.c=new dXb;this.a=new I_b;this.b=new E0b;g0b()} -function med(){hed();this.b=new Tsb;this.a=new Tsb;this.c=new bnb} -function KKd(a,b,c){this.d=a;this.j=b;this.e=c;this.o=-1;this.p=3} -function LKd(a,b,c){this.d=a;this.k=b;this.f=c;this.o=-1;this.p=5} -function S3d(a,b,c,d,e,f){R3d.call(this,a,b,c,d,e);f&&(this.o=-2)} -function U3d(a,b,c,d,e,f){T3d.call(this,a,b,c,d,e);f&&(this.o=-2)} -function W3d(a,b,c,d,e,f){V3d.call(this,a,b,c,d,e);f&&(this.o=-2)} -function Y3d(a,b,c,d,e,f){X3d.call(this,a,b,c,d,e);f&&(this.o=-2)} -function $3d(a,b,c,d,e,f){Z3d.call(this,a,b,c,d,e);f&&(this.o=-2)} -function a4d(a,b,c,d,e,f){_3d.call(this,a,b,c,d,e);f&&(this.o=-2)} -function f4d(a,b,c,d,e,f){e4d.call(this,a,b,c,d,e);f&&(this.o=-2)} -function h4d(a,b,c,d,e,f){g4d.call(this,a,b,c,d,e);f&&(this.o=-2)} -function N7d(a,b,c,d){t7d.call(this,c);this.b=a;this.c=b;this.d=d} -function mfe(a,b){this.f=a;this.a=(ree(),pee);this.c=pee;this.b=b} -function Jfe(a,b){this.g=a;this.d=(ree(),qee);this.a=qee;this.b=b} -function Gme(a,b){!a.c&&(a.c=new Uge(a,0));Fge(a.c,(nme(),fme),b)} -function Oge(a,b){return Pge(a,b,ZD(b,102)&&(RD(b,19).Bb&txe)!=0)} -function lB(a,b){return Agb(Hdb(a.q.getTime()),Hdb(b.q.getTime()))} -function gj(a){return fk(a.e.Rd().gc()*a.c.Rd().gc(),16,new qj(a))} -function CYd(a){return !!a.u&&tYd(a.u.a).i!=0&&!(!!a.n&&d$d(a.n))} -function p4d(a){return !!a.a&&o4d(a.a.a).i!=0&&!(!!a.b&&o5d(a.b))} -function Cxd(a,b){if(b==0){return !!a.o&&a.o.f!=0}return Kvd(a,b)} -function Cc(a,b,c){var d;d=RD(a.Zb().xc(b),16);return !!d&&d.Hc(c)} -function Gc(a,b,c){var d;d=RD(a.Zb().xc(b),16);return !!d&&d.Mc(c)} -function _yb(a,b){var c;c=1-b;a.a[c]=azb(a.a[c],c);return azb(a,b)} -function DFb(a,b){var c,d;d=Cdb(a,yxe);c=Sdb(b,32);return Rdb(c,d)} -function bGb(a,b,c){var d;d=(Qb(a),new dnb(a));_Fb(new aGb(d,b,c))} -function t$b(a,b,c){var d;d=(Qb(a),new dnb(a));r$b(new s$b(d,b,c))} -function vBd(a,b,c,d,e,f){wBd(a,b,c,f);EYd(a,d);FYd(a,e);return a} -function Xhb(a,b,c,d){a.a+=''+zhb(b==null?vve:jeb(b),c,d);return a} -function Jkb(a,b){this.a=a;Dkb.call(this,a);wFb(b,a.gc());this.b=b} -function xmb(a){this.a=$C(jJ,rve,1,mgb($wnd.Math.max(8,a))<<1,5,1)} -function t2b(a){return RD(anb(a,$C(jR,WAe,10,a.c.length,0,1)),199)} -function s2b(a){return RD(anb(a,$C(WQ,VAe,18,a.c.length,0,1)),483)} -function Iyb(a){return !a.a?a.c:a.e.length==0?a.a.a:a.a.a+(''+a.e)} -function Rib(a){while(a.d>0&&a.a[--a.d]==0);a.a[a.d++]==0&&(a.e=0)} -function fvb(a){sFb(a.b.b!=a.d.a);a.c=a.b=a.b.b;--a.a;return a.c.c} -function sRc(a,b,c){a.a=b;a.c=c;a.b.a.$b();Xub(a.d);aFb(a.e.a.c,0)} -function Z5c(a,b){var c;a.e=new R5c;c=Q2c(b);_mb(c,a.c);$5c(a,c,0)} -function zgd(a,b,c,d){var e;e=new Hgd;e.a=b;e.b=c;e.c=d;Mub(a.a,e)} -function Agd(a,b,c,d){var e;e=new Hgd;e.a=b;e.b=c;e.c=d;Mub(a.b,e)} -function Tb(a,b,c){if(a<0||bc){throw Adb(new veb(Kb(a,b,c)))}} -function Pb(a,b){if(a<0||a>=b){throw Adb(new veb(Ib(a,b)))}return a} -function qz(b){if(!('stack' in b)){try{throw b}catch(a){}}return b} -function Zjc(a){Wjc();if(ZD(a.g,10)){return RD(a.g,10)}return null} -function nx(a){if(Ih(a).dc()){return false}Jh(a,new rx);return true} -function Xdb(a){var b;if(Kdb(a)){b=a;return b==-0.?0:b}return ED(a)} -function lkb(a,b){if(ZD(b,44)){return Jd(a.a,RD(b,44))}return false} -function gsb(a,b){if(ZD(b,44)){return Jd(a.a,RD(b,44))}return false} -function vub(a,b){if(ZD(b,44)){return Jd(a.a,RD(b,44))}return false} -function RCb(a){var b;LCb(a);b=new Prb;ixb(a.a,new fDb(b));return b} -function Vae(){var a,b,c;b=(c=(a=new s2d,a),c);Rmb(Rae,b);return b} -function mDb(a){var b;LCb(a);b=new ltb;ixb(a.a,new uDb(b));return b} -function jDb(a,b){if(a.a<=a.b){b.Dd(a.a++);return true}return false} -function xzb(a){yzb.call(this,a,(cAb(),$zb),null,false,null,false)} -function $Rb(){$Rb=geb;ZRb=ss((VRb(),cD(WC($O,1),jwe,489,0,[URb])))} -function CHc(){CHc=geb;BHc=yx(sgb(1),sgb(4));AHc=yx(sgb(1),sgb(2))} -function yXc(a,b){return new gud(b,njd(ajd(b.e),a,a),(Geb(),true))} -function fv(a){return new cnb((dk(a,lwe),dz(Bdb(Bdb(5,a),a/10|0))))} -function Wi(a){return fk(a.e.Rd().gc()*a.c.Rd().gc(),273,new kj(a))} -function u2b(a){return RD(anb(a,$C(xR,XAe,12,a.c.length,0,1)),2042)} -function COc(a){dOc();return !W0b(a)&&!(!W0b(a)&&a.c.i.c==a.d.i.c)} -function Y_c(a,b){R_c();return RD(mQb(b,(h_c(),W$c)),17).a>=a.gc()} -function q8b(a,b){w8b(b,a);y8b(a.d);y8b(RD(mQb(a,(yCc(),cBc)),214))} -function r8b(a,b){z8b(b,a);B8b(a.d);B8b(RD(mQb(a,(yCc(),cBc)),214))} -function $0b(a,b,c){!!a.d&&Ymb(a.d.e,a);a.d=b;!!a.d&&Qmb(a.d.e,c,a)} -function jPb(a,b,c){return c.f.c.length>0?yPb(a.a,b,c):yPb(a.b,b,c)} -function Uz(a,b,c){var d;d=Sz();try{return Rz(a,b,c)}finally{Vz(d)}} -function wDd(a,b){var c,d;c=qC(a,b);d=null;!!c&&(d=c.pe());return d} -function yDd(a,b){var c,d;c=qC(a,b);d=null;!!c&&(d=c.se());return d} -function xDd(a,b){var c,d;c=JB(a,b);d=null;!!c&&(d=c.se());return d} -function zDd(a,b){var c,d;c=qC(a,b);d=null;!!c&&(d=ADd(c));return d} -function rEd(a,b,c){var d;d=uDd(c);Do(a.g,d,b);Do(a.i,b,c);return b} -function UIc(a,b,c){this.d=new fJc(this);this.e=a;this.i=b;this.f=c} -function Mk(a,b,c,d){this.e=null;this.c=a;this.d=b;this.a=c;this.b=d} -function urc(a,b,c,d){nrc(this);this.c=a;this.e=b;this.f=c;this.b=d} -function MKd(a,b,c,d){this.d=a;this.n=b;this.g=c;this.o=d;this.p=-1} -function Vc(a,b,c,d){return ZD(c,59)?new Kg(a,b,c,d):new yg(a,b,c,d)} -function gr(a){if(ZD(a,16)){return RD(a,16).dc()}return !a.Kc().Ob()} -function Wo(a){if(a.e.g!=a.b){throw Adb(new Jrb)}return !!a.c&&a.d>0} -function evb(a){sFb(a.b!=a.d.c);a.c=a.b;a.b=a.b.a;++a.a;return a.c.c} -function imb(a,b){uFb(b);bD(a.a,a.c,b);a.c=a.c+1&a.a.length-1;mmb(a)} -function hmb(a,b){uFb(b);a.b=a.b-1&a.a.length-1;bD(a.a,a.b,b);mmb(a)} -function _je(a){var b;b=a.Gh();this.a=ZD(b,71)?RD(b,71).Ii():b.Kc()} -function px(a){return new Swb(Dob(RD(a.a.md(),16).gc(),a.a.ld()),16)} -function Abd(){Abd=geb;zbd=ss((sbd(),cD(WC(M1,1),jwe,490,0,[rbd])))} -function Jbd(){Jbd=geb;Ibd=ss((Cbd(),cD(WC(N1,1),jwe,558,0,[Bbd])))} -function idd(){idd=geb;hdd=ss((_cd(),cD(WC(V1,1),jwe,539,0,[$cd])))} -function X$b(){U$b();return cD(WC(CQ,1),jwe,389,0,[T$b,R$b,Q$b,S$b])} -function hAb(){cAb();return cD(WC(AL,1),jwe,304,0,[$zb,_zb,aAb,bAb])} -function LPb(){IPb();return cD(WC(DO,1),jwe,332,0,[FPb,EPb,GPb,HPb])} -function LRb(){IRb();return cD(WC(WO,1),jwe,406,0,[FRb,ERb,GRb,HRb])} -function pOb(){mOb();return cD(WC(hO,1),jwe,417,0,[lOb,iOb,jOb,kOb])} -function uZb(){nZb();return cD(WC(lQ,1),jwe,416,0,[jZb,mZb,kZb,lZb])} -function hnc(){enc();return cD(WC(LV,1),jwe,421,0,[anc,bnc,cnc,dnc])} -function zec(){vec();return cD(WC(qT,1),jwe,371,0,[uec,sec,tec,rec])} -function BDc(){wDc();return cD(WC(tX,1),jwe,203,0,[uDc,vDc,tDc,sDc])} -function nEc(){kEc();return cD(WC(wX,1),jwe,284,0,[hEc,gEc,iEc,jEc])} -function Unc(a){var b;return a.j==(qpd(),npd)&&(b=Vnc(a),Csb(b,Xod))} -function qhc(a,b){var c;c=b.a;Y0b(c,b.c.d);Z0b(c,b.d.d);Cjd(c.a,a.n)} -function _5b(a,b){var c;c=RD(cub(a.b,b),67);!c&&(c=new Yub);return c} -function $jc(a){Wjc();if(ZD(a.g,154)){return RD(a.g,154)}return null} -function gRc(a){a.a=null;a.e=null;aFb(a.b.c,0);aFb(a.f.c,0);a.c=null} -function Ovc(){Ovc=geb;Mvc=new Pvc(Kye,0);Nvc=new Pvc('TOP_LEFT',1)} -function sNc(){sNc=geb;rNc=new tNc('UPPER',0);qNc=new tNc('LOWER',1)} -function nWc(a,b){return cjd(new rjd(b.e.a+b.f.a/2,b.e.b+b.f.b/2),a)} -function wqc(a,b){return RD(Lvb(JDb(RD(Qc(a.k,b),15).Oc(),lqc)),113)} -function xqc(a,b){return RD(Lvb(KDb(RD(Qc(a.k,b),15).Oc(),lqc)),113)} -function cWc(){YVc();return cD(WC(H$,1),jwe,405,0,[UVc,VVc,WVc,XVc])} -function v_c(){s_c();return cD(WC(J_,1),jwe,353,0,[r_c,p_c,q_c,o_c])} -function n5c(){j5c();return cD(WC(M0,1),jwe,354,0,[i5c,g5c,h5c,f5c])} -function Tpd(){Qpd();return cD(WC(H3,1),jwe,386,0,[Opd,Ppd,Npd,Mpd])} -function Tnd(){Pnd();return cD(WC(z3,1),jwe,291,0,[Ond,Lnd,Mnd,Nnd])} -function _md(){Ymd();return cD(WC(u3,1),jwe,223,0,[Xmd,Vmd,Umd,Wmd])} -function Jrd(){Grd();return cD(WC(R3,1),jwe,320,0,[Frd,Crd,Erd,Drd])} -function wtd(){ttd();return cD(WC(n4,1),jwe,415,0,[qtd,rtd,ptd,std])} -function GId(a){EId();return Ujb(DId,a)?RD(Wjb(DId,a),341).Qg():null} -function Avd(a,b,c){return b<0?Rvd(a,c):RD(c,69).wk().Bk(a,a.hi(),b)} -function sEd(a,b,c){var d;d=uDd(c);Do(a.j,d,b);Zjb(a.k,b,c);return b} -function qEd(a,b,c){var d;d=uDd(c);Do(a.d,d,b);Zjb(a.e,b,c);return b} -function DGd(a){var b,c;b=(bvd(),c=new rzd,c);!!a&&pzd(b,a);return b} -function WHd(a){var b;b=a.aj(a.i);a.i>0&&hib(a.g,0,b,0,a.i);return b} -function Led(a,b){var c;for(c=a.j.c.length;c>24} -function AKd(a){if(a.p!=1)throw Adb(new cgb);return Ydb(a.k)<<24>>24} -function GKd(a){if(a.p!=7)throw Adb(new cgb);return Ydb(a.k)<<16>>16} -function xKd(a){if(a.p!=7)throw Adb(new cgb);return Ydb(a.f)<<16>>16} -function Wib(a,b){if(b.e==0||a.e==0){return Oib}return Ljb(),Mjb(a,b)} -function Nd(a,b){return dE(b)===dE(a)?'(this Map)':b==null?vve:jeb(b)} -function MFb(a,b,c){return Jfb(UD(Wd(qtb(a.f,b))),UD(Wd(qtb(a.f,c))))} -function wkc(a,b,c){var d;d=RD(Wjb(a.g,c),60);Rmb(a.a.c,new Ptd(b,d))} -function Slc(a,b,c){a.i=0;a.e=0;if(b==c){return}Rlc(a,b,c);Qlc(a,b,c)} -function rTc(a,b,c,d,e){var f;f=mTc(e,c,d);Rmb(b,TSc(e,f));vTc(a,e,b)} -function Jrc(a,b,c,d,e){this.i=a;this.a=b;this.e=c;this.j=d;this.f=e} -function iUb(a,b){VTb.call(this);this.a=a;this.b=b;Rmb(this.a.b,this)} -function rTb(a){this.b=new Tsb;this.c=new Tsb;this.d=new Tsb;this.a=a} -function Dx(a,b){var c;c=new cib;a.Gd(c);c.a+='..';b.Hd(c);return c.a} -function Fsd(a,b){var c;c=b;while(c){Zid(a,c.i,c.j);c=vCd(c)}return a} -function pEd(a,b,c){var d;d=uDd(c);Zjb(a.b,d,b);Zjb(a.c,b,c);return b} -function Kr(a){var b;b=0;while(a.Ob()){a.Pb();b=Bdb(b,1)}return dz(b)} -function oke(a,b){nke();var c;c=RD(a,69).vk();K6d(c,b);return c.xl(b)} -function tC(d,a,b){if(b){var c=b.oe();d.a[a]=c(b)}else{delete d.a[a]}} -function tB(a,b){var c;c=a.q.getHours();a.q.setFullYear(b+Owe);mB(a,c)} -function KSd(a,b){return RD(b==null?Wd(qtb(a.f,null)):Ktb(a.i,b),288)} -function hOc(a,b){return a==(r3b(),p3b)&&b==p3b?4:a==p3b||b==p3b?8:32} -function cge(a,b,c){return dge(a,b,c,ZD(b,102)&&(RD(b,19).Bb&txe)!=0)} -function jge(a,b,c){return kge(a,b,c,ZD(b,102)&&(RD(b,19).Bb&txe)!=0)} -function Qge(a,b,c){return Rge(a,b,c,ZD(b,102)&&(RD(b,19).Bb&txe)!=0)} -function jmb(a){if(a.b==a.c){return}a.a=$C(jJ,rve,1,8,5,1);a.b=0;a.c=0} -function Nsb(a){sFb(a.a=0&&a.a[c]===b[c];c--);return c<0} -function Xx(a){var b;if(a){return new Kub(a)}b=new Iub;_q(b,a);return b} -function nmc(a,b){var c,d;d=false;do{c=qmc(a,b);d=d|c}while(c);return d} -function Vz(a){a&&aA(($z(),Zz));--Nz;if(a){if(Pz!=-1){Xz(Pz);Pz=-1}}} -function Pwb(a){Hwb();Mwb(this,Ydb(Cdb(Tdb(a,24),Pxe)),Ydb(Cdb(a,Pxe)))} -function IHb(){IHb=geb;HHb=ss((DHb(),cD(WC(uN,1),jwe,436,0,[CHb,BHb])))} -function QHb(){QHb=geb;PHb=ss((LHb(),cD(WC(vN,1),jwe,435,0,[JHb,KHb])))} -function YUb(){YUb=geb;XUb=ss((TUb(),cD(WC(BP,1),jwe,432,0,[RUb,SUb])))} -function U8b(){U8b=geb;T8b=ss((P8b(),cD(WC(vS,1),jwe,517,0,[O8b,N8b])))} -function Tvc(){Tvc=geb;Svc=ss((Ovc(),cD(WC(lX,1),jwe,429,0,[Mvc,Nvc])))} -function duc(){duc=geb;cuc=ss(($tc(),cD(WC(cX,1),jwe,428,0,[Ytc,Ztc])))} -function Huc(){Huc=geb;Guc=ss((Cuc(),cD(WC(fX,1),jwe,488,0,[Buc,Auc])))} -function xEc(){xEc=geb;wEc=ss((sEc(),cD(WC(xX,1),jwe,430,0,[qEc,rEc])))} -function xNc(){xNc=geb;wNc=ss((sNc(),cD(WC(MY,1),jwe,531,0,[rNc,qNc])))} -function otc(){otc=geb;ntc=ss((jtc(),cD(WC($W,1),jwe,431,0,[htc,itc])))} -function F_c(){F_c=geb;E_c=ss((A_c(),cD(WC(K_,1),jwe,433,0,[z_c,y_c])))} -function F2c(){F2c=geb;E2c=ss((x2c(),cD(WC(s0,1),jwe,501,0,[v2c,w2c])))} -function BQc(){BQc=geb;AQc=ss((wQc(),cD(WC(FZ,1),jwe,523,0,[vQc,uQc])))} -function JQc(){JQc=geb;IQc=ss((EQc(),cD(WC(GZ,1),jwe,522,0,[CQc,DQc])))} -function kTc(){kTc=geb;jTc=ss((fTc(),cD(WC(b$,1),jwe,528,0,[eTc,dTc])))} -function iVc(){iVc=geb;hVc=ss((dVc(),cD(WC(w$,1),jwe,465,0,[bVc,cVc])))} -function c4c(){c4c=geb;b4c=ss((Y3c(),cD(WC(H0,1),jwe,434,0,[W3c,X3c])))} -function H8c(){H8c=geb;G8c=ss((z8c(),cD(WC(l1,1),jwe,491,0,[x8c,y8c])))} -function J9c(){J9c=geb;I9c=ss((B9c(),cD(WC(t1,1),jwe,492,0,[z9c,A9c])))} -function Rbd(){Rbd=geb;Qbd=ss((Mbd(),cD(WC(O1,1),jwe,438,0,[Lbd,Kbd])))} -function tdd(){tdd=geb;sdd=ss((ldd(),cD(WC(W1,1),jwe,437,0,[kdd,jdd])))} -function Eqd(){Eqd=geb;Dqd=ss((uqd(),cD(WC(M3,1),jwe,347,0,[sqd,tqd])))} -function Imd(){Cmd();return cD(WC(s3,1),jwe,88,0,[Amd,zmd,ymd,xmd,Bmd])} -function xpd(){qpd();return cD(WC(E3,1),NAe,64,0,[opd,Yod,Xod,npd,ppd])} -function LSd(a,b,c){return RD(b==null?rtb(a.f,null,c):Ltb(a.i,b,c),288)} -function L6b(a){return (a.k==(r3b(),p3b)||a.k==m3b)&&nQb(a,(Ywc(),cwc))} -function bUb(a){return !!a.c&&!!a.d?kUb(a.c)+'->'+kUb(a.d):'e_'+kFb(a)} -function xgb(a,b){var c,d;uFb(b);for(d=a.Kc();d.Ob();){c=d.Pb();b.Cd(c)}} -function jEd(a,b){var c;c=new uC;qDd(c,'x',b.a);qDd(c,'y',b.b);oDd(a,c)} -function mEd(a,b){var c;c=new uC;qDd(c,'x',b.a);qDd(c,'y',b.b);oDd(a,c)} -function Gsd(a,b){var c;c=b;while(c){Zid(a,-c.i,-c.j);c=vCd(c)}return a} -function ZLc(a,b){var c,d;c=b;d=0;while(c>0){d+=a.a[c];c-=c&-c}return d} -function $mb(a,b,c){var d;d=(tFb(b,a.c.length),a.c[b]);a.c[b]=c;return d} -function uIc(a,b,c){a.a.c.length=0;yIc(a,b,c);a.a.c.length==0||rIc(a,b)} -function wo(a){a.i=0;Mnb(a.b,null);Mnb(a.c,null);a.a=null;a.e=null;++a.g} -function gBb(){gBb=geb;dBb=true;bBb=false;cBb=false;fBb=false;eBb=false} -function oBb(a){gBb();if(dBb){return}this.c=a;this.e=true;this.a=new bnb} -function kDb(a,b){this.c=0;this.b=b;txb.call(this,a,17493);this.a=this.c} -function S_b(a){P_b();A$b(this);this.a=new Yub;Q_b(this,a);Mub(this.a,a)} -function m_b(){Pmb(this);this.b=new rjd(oxe,oxe);this.a=new rjd(pxe,pxe)} -function z8c(){z8c=geb;x8c=new B8c(CBe,0);y8c=new B8c('TARGET_WIDTH',1)} -function yDb(a,b){return (MCb(a),QDb(new SDb(a,new hEb(b,a.a)))).Bd(wDb)} -function vXb(){sXb();return cD(WC(UP,1),jwe,367,0,[nXb,oXb,pXb,qXb,rXb])} -function Fnc(){Bnc();return cD(WC(TV,1),jwe,375,0,[xnc,znc,Anc,ync,wnc])} -function Vtc(){Ptc();return cD(WC(bX,1),jwe,348,0,[Ltc,Ktc,Ntc,Otc,Mtc])} -function PDc(){JDc();return cD(WC(uX,1),jwe,323,0,[IDc,FDc,GDc,EDc,HDc])} -function fxc(){cxc();return cD(WC(mX,1),jwe,171,0,[bxc,Zwc,$wc,_wc,axc])} -function k3c(){g3c();return cD(WC(x0,1),jwe,368,0,[e3c,b3c,f3c,c3c,d3c])} -function vad(){sad();return cD(WC(x1,1),jwe,373,0,[oad,nad,qad,pad,rad])} -function $bd(){Xbd();return cD(WC(P1,1),jwe,324,0,[Sbd,Tbd,Wbd,Ubd,Vbd])} -function _hd(){Yhd();return cD(WC(d3,1),jwe,170,0,[Whd,Vhd,Thd,Xhd,Uhd])} -function sod(){pod();return cD(WC(B3,1),jwe,256,0,[mod,ood,kod,lod,nod])} -function Tz(b){Qz();return function(){return Uz(b,this,arguments);var a}} -function W0b(a){if(!a.c||!a.d){return false}return !!a.c.i&&a.c.i==a.d.i} -function Nfd(a,b){if(ZD(b,143)){return lhb(a.c,RD(b,143).c)}return false} -function yYd(a){if(!a.t){a.t=new w$d(a);VGd(new Cde(a),0,a.t)}return a.t} -function jNd(a){this.b=a;dMd.call(this,a);this.a=RD(Ywd(this.b.a,4),129)} -function sNd(a){this.b=a;yMd.call(this,a);this.a=RD(Ywd(this.b.a,4),129)} -function Q3d(a,b,c,d,e){OKd.call(this,b,d,e);J3d(this);this.c=a;this.b=c} -function V3d(a,b,c,d,e){KKd.call(this,b,d,e);J3d(this);this.c=a;this.a=c} -function Z3d(a,b,c,d,e){LKd.call(this,b,d,e);J3d(this);this.c=a;this.a=c} -function g4d(a,b,c,d,e){OKd.call(this,b,d,e);J3d(this);this.c=a;this.a=c} -function ugd(a,b){var c;c=RD(cub(a.d,b),23);return c?c:RD(cub(a.e,b),23)} -function Blb(a,b){var c,d;c=b.ld();d=a.Fe(c);return !!d&&Fvb(d.e,b.md())} -function me(a,b){var c;c=b.ld();return new gp(c,a.e.pc(c,RD(b.md(),16)))} -function ptb(a,b){var c;c=a.a.get(b);return c==null?$C(jJ,rve,1,0,5,1):c} -function khb(a){var b;b=a.length;return lhb(sxe.substr(sxe.length-b,b),a)} -function hs(a){if(gs(a)){a.c=a.a;return a.a.Pb()}else{throw Adb(new Dvb)}} -function $ib(a,b){if(b==0||a.e==0){return a}return b>0?tjb(a,b):qjb(a,-b)} -function Zib(a,b){if(b==0||a.e==0){return a}return b>0?qjb(a,b):tjb(a,-b)} -function Deb(a){Beb.call(this,a==null?vve:jeb(a),ZD(a,82)?RD(a,82):null)} -function Y5d(a){var b;if(!a.c){b=a.r;ZD(b,90)&&(a.c=RD(b,29))}return a.c} -function s0b(a){var b;b=new a1b;kQb(b,a);pQb(b,(yCc(),RAc),null);return b} -function lec(a){var b,c;b=a.c.i;c=a.d.i;return b.k==(r3b(),m3b)&&c.k==m3b} -function fD(a){var b,c,d;b=a&dxe;c=a>>22&dxe;d=a<0?exe:0;return hD(b,c,d)} -function Ky(a){var b,c,d,e;for(c=a,d=0,e=c.length;d=0?a.Lh(d,c,true):Qvd(a,b,c)} -function AXc(a,b,c){return Qfb(cjd(jWc(a),ajd(b.b)),cjd(jWc(a),ajd(c.b)))} -function BXc(a,b,c){return Qfb(cjd(jWc(a),ajd(b.e)),cjd(jWc(a),ajd(c.e)))} -function Kad(a,b){return $wnd.Math.min(bjd(b.a,a.d.d.c),bjd(b.b,a.d.d.c))} -function LHd(a,b){a._i(a.i+1);MHd(a,a.i,a.Zi(a.i,b));a.Mi(a.i++,b);a.Ni()} -function OHd(a){var b,c;++a.j;b=a.g;c=a.i;a.g=null;a.i=0;a.Oi(c,b);a.Ni()} -function yke(a,b,c){var d;d=new zke(a.a);Ld(d,a.a.a);rtb(d.f,b,c);a.a.a=d} -function mKb(a,b,c,d){var e;for(e=0;eb){throw Adb(new veb(Jb(a,b,'index')))}return a} -function Xmb(a,b){var c;c=(tFb(b,a.c.length),a.c[b]);$Eb(a.c,b,1);return c} -function jhb(a,b){var c,d;c=(uFb(a),a);d=(uFb(b),b);return c==d?0:cb.p){return -1}return 0} -function hXd(a){var b;if(!a.a){b=a.r;ZD(b,156)&&(a.a=RD(b,156))}return a.a} -function iOd(a,b,c){var d;++a.e;--a.f;d=RD(a.d[b].gd(c),136);return d.md()} -function fd(a){var b,c;b=a.ld();c=RD(a.md(),16);return gk(c.Nc(),new jh(b))} -function oae(a,b){if(Ujb(a.a,b)){_jb(a.a,b);return true}else{return false}} -function Ui(a,b,c){Pb(b,a.e.Rd().gc());Pb(c,a.c.Rd().gc());return a.a[b][c]} -function _Uc(a,b,c){this.a=a;this.b=b;this.c=c;Rmb(a.t,this);Rmb(b.i,this)} -function lg(a,b,c,d){this.f=a;this.e=b;this.d=c;this.b=d;this.c=!d?null:d.d} -function YWc(){this.b=new Yub;this.a=new Yub;this.b=new Yub;this.a=new Yub} -function ree(){ree=geb;var a,b;pee=(jTd(),b=new k1d,b);qee=(a=new mXd,a)} -function UCb(a){var b;MCb(a);b=new $Cb(a,a.a.e,a.a.d|4);return new WCb(a,b)} -function ADb(a){var b;LCb(a);b=0;while(a.a.Bd(new MEb)){b=Bdb(b,1)}return b} -function zxb(a,b){uFb(b);if(a.c=0,'Initial capacity must not be negative')} -function rid(){rid=geb;qid=new jGd('org.eclipse.elk.labels.labelManager')} -function iec(){iec=geb;hec=new kGd('separateLayerConnections',(vec(),uec))} -function fTc(){fTc=geb;eTc=new gTc('REGULAR',0);dTc=new gTc('CRITICAL',1)} -function Mbd(){Mbd=geb;Lbd=new Nbd('FIXED',0);Kbd=new Nbd('CENTER_NODE',1)} -function jtc(){jtc=geb;htc=new ktc('QUADRATIC',0);itc=new ktc('SCANLINE',1)} -function Atc(){Atc=geb;ztc=ss((stc(),cD(WC(_W,1),jwe,322,0,[qtc,ptc,rtc])))} -function Jtc(){Jtc=geb;Itc=ss((Etc(),cD(WC(aX,1),jwe,351,0,[Btc,Dtc,Ctc])))} -function ooc(){ooc=geb;noc=ss((joc(),cD(WC(UV,1),jwe,372,0,[ioc,hoc,goc])))} -function muc(){muc=geb;luc=ss((huc(),cD(WC(dX,1),jwe,460,0,[fuc,euc,guc])))} -function Cvc(){Cvc=geb;Bvc=ss((xvc(),cD(WC(jX,1),jwe,299,0,[vvc,wvc,uvc])))} -function Lvc(){Lvc=geb;Kvc=ss((Gvc(),cD(WC(kX,1),jwe,311,0,[Evc,Fvc,Dvc])))} -function rDc(){rDc=geb;qDc=ss((lDc(),cD(WC(sX,1),jwe,390,0,[iDc,jDc,kDc])))} -function PEc(){PEc=geb;OEc=ss((KEc(),cD(WC(zX,1),jwe,387,0,[HEc,IEc,JEc])))} -function YEc(){YEc=geb;XEc=ss((TEc(),cD(WC(AX,1),jwe,349,0,[SEc,QEc,REc])))} -function GEc(){GEc=geb;FEc=ss((BEc(),cD(WC(yX,1),jwe,463,0,[AEc,yEc,zEc])))} -function qFc(){qFc=geb;pFc=ss((lFc(),cD(WC(CX,1),jwe,350,0,[iFc,jFc,kFc])))} -function zFc(){zFc=geb;yFc=ss((uFc(),cD(WC(DX,1),jwe,352,0,[tFc,rFc,sFc])))} -function IFc(){IFc=geb;HFc=ss((DFc(),cD(WC(EX,1),jwe,388,0,[BFc,CFc,AFc])))} -function QZc(){QZc=geb;PZc=ss((LZc(),cD(WC(F_,1),jwe,392,0,[KZc,JZc,IZc])))} -function m4c(){m4c=geb;l4c=ss((g4c(),cD(WC(I0,1),jwe,393,0,[d4c,e4c,f4c])))} -function z5c(){z5c=geb;y5c=ss((t5c(),cD(WC(N0,1),jwe,300,0,[r5c,s5c,q5c])))} -function k6c(){k6c=geb;j6c=ss((f6c(),cD(WC(V0,1),jwe,445,0,[c6c,d6c,e6c])))} -function F6c(){F6c=geb;E6c=ss((z6c(),cD(WC(Z0,1),jwe,456,0,[w6c,y6c,x6c])))} -function e7c(){e7c=geb;d7c=ss((_6c(),cD(WC(a1,1),jwe,394,0,[Z6c,$6c,Y6c])))} -function j9c(){j9c=geb;i9c=ss((b9c(),cD(WC(o1,1),jwe,439,0,[$8c,a9c,_8c])))} -function WKc(){WKc=geb;VKc=ss((RKc(),cD(WC(nY,1),jwe,464,0,[OKc,PKc,QKc])))} -function JKb(){JKb=geb;IKb=ss((EKb(),cD(WC(MN,1),jwe,471,0,[CKb,BKb,DKb])))} -function cKb(){cKb=geb;bKb=ss((ZJb(),cD(WC(JN,1),jwe,237,0,[WJb,XJb,YJb])))} -function ALb(){ALb=geb;zLb=ss((vLb(),cD(WC(TN,1),jwe,472,0,[uLb,tLb,sLb])))} -function CBb(){CBb=geb;BBb=ss((xBb(),cD(WC(QL,1),jwe,108,0,[uBb,vBb,wBb])))} -function FWb(){FWb=geb;EWb=ss((AWb(),cD(WC(JP,1),jwe,391,0,[yWb,xWb,zWb])))} -function Knd(){Knd=geb;Jnd=ss((Fnd(),cD(WC(y3,1),jwe,346,0,[Dnd,Cnd,End])))} -function lbd(){lbd=geb;kbd=ss((gbd(),cD(WC(I1,1),jwe,444,0,[dbd,ebd,fbd])))} -function Tmd(){Tmd=geb;Smd=ss((Omd(),cD(WC(t3,1),jwe,278,0,[Lmd,Mmd,Nmd])))} -function rqd(){rqd=geb;qqd=ss((mqd(),cD(WC(J3,1),jwe,280,0,[kqd,jqd,lqd])))} -function Hxd(a,b){return !a.o&&(a.o=new DVd((pvd(),mvd),X4,a,0)),QNd(a.o,b)} -function HMb(a,b){var c;if(a.C){c=RD(Vrb(a.b,b),127).n;c.d=a.C.d;c.a=a.C.a}} -function F8b(a){var b,c,d,e;e=a.d;b=a.a;c=a.b;d=a.c;a.d=c;a.a=d;a.b=e;a.c=b} -function cOd(a){!a.g&&(a.g=new hQd);!a.g.b&&(a.g.b=new ePd(a));return a.g.b} -function dOd(a){!a.g&&(a.g=new hQd);!a.g.c&&(a.g.c=new IPd(a));return a.g.c} -function lOd(a){!a.g&&(a.g=new hQd);!a.g.d&&(a.g.d=new kPd(a));return a.g.d} -function YNd(a){!a.g&&(a.g=new hQd);!a.g.a&&(a.g.a=new qPd(a));return a.g.a} -function B9d(a,b,c,d){!!c&&(d=c.Rh(b,BYd(c.Dh(),a.c.uk()),null,d));return d} -function C9d(a,b,c,d){!!c&&(d=c.Th(b,BYd(c.Dh(),a.c.uk()),null,d));return d} -function Cjb(a,b,c,d){var e;e=$C(kE,Pwe,28,b+1,15,1);Djb(e,a,b,c,d);return e} -function $C(a,b,c,d,e,f){var g;g=_C(e,d);e!=10&&cD(WC(a,f),b,c,e,g);return g} -function $fe(a,b,c){var d,e;e=new Phe(b,a);for(d=0;dc||b=0?a.Lh(c,true,true):Qvd(a,b,true)} -function gMc(a,b,c){var d;d=qMc(a,b,c);a.b=new _Lc(d.c.length);return iMc(a,d)} -function Pue(a){if(a.b<=0)throw Adb(new Dvb);--a.b;a.a-=a.c.c;return sgb(a.a)} -function PGd(a){var b;if(!a.a){throw Adb(new Evb)}b=a.a;a.a=vCd(a.a);return b} -function WDb(a){while(!a.a){if(!yEb(a.c,new $Db(a))){return false}}return true} -function Nr(a){var b;Qb(a);if(ZD(a,204)){b=RD(a,204);return b}return new Or(a)} -function Cfd(a){Afd();RD(a.of((umd(),Lld)),181).Fc((Pod(),Mod));a.qf(Kld,null)} -function Afd(){Afd=geb;xfd=new Gfd;zfd=new Ifd;yfd=yn((umd(),Kld),xfd,pld,zfd)} -function Y3c(){Y3c=geb;W3c=new $3c('LEAF_NUMBER',0);X3c=new $3c('NODE_SIZE',1)} -function YLc(a){a.a=$C(kE,Pwe,28,a.b+1,15,1);a.c=$C(kE,Pwe,28,a.b,15,1);a.d=0} -function OZb(a,b){if(a.a.Ne(b.d,a.b)>0){Rmb(a.c,new fZb(b.c,b.d,a.d));a.b=b.d}} -function NHd(a,b){if(a.g==null||b>=a.i)throw Adb(new yNd(b,a.i));return a.g[b]} -function P_d(a,b,c){gHd(a,c);if(c!=null&&!a.fk(c)){throw Adb(new yeb)}return c} -function dD(a,b){XC(b)!=10&&cD(rb(b),b.Sm,b.__elementTypeId$,XC(b),a);return a} -function Wnb(a,b,c,d){var e;d=(urb(),!d?rrb:d);e=a.slice(b,c);Xnb(e,a,b,c,-b,d)} -function zvd(a,b,c,d,e){return b<0?Qvd(a,c,d):RD(c,69).wk().yk(a,a.hi(),b,d,e)} -function J9b(a,b){return Qfb(Kfb(UD(mQb(a,(Ywc(),Jwc)))),Kfb(UD(mQb(b,Jwc))))} -function qAb(){qAb=geb;pAb=ss((cAb(),cD(WC(AL,1),jwe,304,0,[$zb,_zb,aAb,bAb])))} -function cAb(){cAb=geb;$zb=new dAb('All',0);_zb=new iAb;aAb=new kAb;bAb=new nAb} -function EKb(){EKb=geb;CKb=new FKb(Nye,0);BKb=new FKb(Kye,1);DKb=new FKb(Oye,2)} -function Zme(){Zme=geb;qAd();Wme=oxe;Vme=pxe;Yme=new Tfb(oxe);Xme=new Tfb(pxe)} -function rOb(){rOb=geb;qOb=ss((mOb(),cD(WC(hO,1),jwe,417,0,[lOb,iOb,jOb,kOb])))} -function NRb(){NRb=geb;MRb=ss((IRb(),cD(WC(WO,1),jwe,406,0,[FRb,ERb,GRb,HRb])))} -function NPb(){NPb=geb;MPb=ss((IPb(),cD(WC(DO,1),jwe,332,0,[FPb,EPb,GPb,HPb])))} -function Z$b(){Z$b=geb;Y$b=ss((U$b(),cD(WC(CQ,1),jwe,389,0,[T$b,R$b,Q$b,S$b])))} -function wZb(){wZb=geb;vZb=ss((nZb(),cD(WC(lQ,1),jwe,416,0,[jZb,mZb,kZb,lZb])))} -function jnc(){jnc=geb;inc=ss((enc(),cD(WC(LV,1),jwe,421,0,[anc,bnc,cnc,dnc])))} -function Bec(){Bec=geb;Aec=ss((vec(),cD(WC(qT,1),jwe,371,0,[uec,sec,tec,rec])))} -function DDc(){DDc=geb;CDc=ss((wDc(),cD(WC(tX,1),jwe,203,0,[uDc,vDc,tDc,sDc])))} -function pEc(){pEc=geb;oEc=ss((kEc(),cD(WC(wX,1),jwe,284,0,[hEc,gEc,iEc,jEc])))} -function Cuc(){Cuc=geb;Buc=new Duc(LAe,0);Auc=new Duc('IMPROVE_STRAIGHTNESS',1)} -function _i(a,b){var c,d;d=b/a.c.Rd().gc()|0;c=b%a.c.Rd().gc();return Ui(a,d,c)} -function iZd(a){var b;if(a.nl()){for(b=a.i-1;b>=0;--b){QHd(a,b)}}return WHd(a)} -function Nyb(a){var b,c;if(!a.b){return null}c=a.b;while(b=c.a[0]){c=b}return c} -function Oyb(a){var b,c;if(!a.b){return null}c=a.b;while(b=c.a[1]){c=b}return c} -function Hae(a){if(ZD(a,180)){return ''+RD(a,180).a}return a==null?null:jeb(a)} -function Iae(a){if(ZD(a,180)){return ''+RD(a,180).a}return a==null?null:jeb(a)} -function eGb(a,b){if(b.a){throw Adb(new yz(jye))}Ysb(a.a,b);b.a=a;!a.j&&(a.j=b)} -function hEb(a,b){xxb.call(this,b.zd(),b.yd()&-16449);uFb(a);this.a=a;this.c=b} -function zXc(a,b){return new gud(b,Zid(ajd(b.e),b.f.a+a,b.f.b+a),(Geb(),false))} -function EMc(a,b){dMc();return Rmb(a,new Ptd(b,sgb(b.e.c.length+b.g.c.length)))} -function GMc(a,b){dMc();return Rmb(a,new Ptd(b,sgb(b.e.c.length+b.g.c.length)))} -function p5c(){p5c=geb;o5c=ss((j5c(),cD(WC(M0,1),jwe,354,0,[i5c,g5c,h5c,f5c])))} -function x_c(){x_c=geb;w_c=ss((s_c(),cD(WC(J_,1),jwe,353,0,[r_c,p_c,q_c,o_c])))} -function eWc(){eWc=geb;dWc=ss((YVc(),cD(WC(H$,1),jwe,405,0,[UVc,VVc,WVc,XVc])))} -function bnd(){bnd=geb;and=ss((Ymd(),cD(WC(u3,1),jwe,223,0,[Xmd,Vmd,Umd,Wmd])))} -function Vnd(){Vnd=geb;Und=ss((Pnd(),cD(WC(z3,1),jwe,291,0,[Ond,Lnd,Mnd,Nnd])))} -function Vpd(){Vpd=geb;Upd=ss((Qpd(),cD(WC(H3,1),jwe,386,0,[Opd,Ppd,Npd,Mpd])))} -function Lrd(){Lrd=geb;Krd=ss((Grd(),cD(WC(R3,1),jwe,320,0,[Frd,Crd,Erd,Drd])))} -function ytd(){ytd=geb;xtd=ss((ttd(),cD(WC(n4,1),jwe,415,0,[qtd,rtd,ptd,std])))} -function b9c(){b9c=geb;$8c=new d9c(iFe,0);a9c=new d9c(mEe,1);_8c=new d9c(LAe,2)} -function sBb(a,b,c,d,e){uFb(a);uFb(b);uFb(c);uFb(d);uFb(e);return new DBb(a,b,d)} -function fub(a,b){var c;c=RD(_jb(a.e,b),400);if(c){rub(c);return c.e}return null} -function Ymb(a,b){var c;c=Wmb(a,b,0);if(c==-1){return false}Xmb(a,c);return true} -function LDb(a,b,c){var d;LCb(a);d=new IEb;d.a=b;a.a.Nb(new QEb(d,c));return d.a} -function VCb(a){var b;LCb(a);b=$C(iE,vxe,28,0,15,1);ixb(a.a,new dDb(b));return b} -function yc(a){var b;if(!xc(a)){throw Adb(new Dvb)}a.e=1;b=a.d;a.d=null;return b} -function Odb(a){var b;if(Kdb(a)){b=0-a;if(!isNaN(b)){return b}}return Edb(xD(a))} -function Wmb(a,b,c){for(;c=0?Dvd(a,c,true,true):Qvd(a,b,true)} -function Vwd(a){var b;b=SD(Ywd(a,32));if(b==null){Wwd(a);b=SD(Ywd(a,32))}return b} -function Yvd(a){var b;if(!a.Oh()){b=AYd(a.Dh())-a.ji();a.$h().Mk(b)}return a.zh()} -function zQb(a,b){yQb=new kRb;wQb=b;xQb=a;RD(xQb.b,68);BQb(xQb,yQb,null);AQb(xQb)} -function AWb(){AWb=geb;yWb=new BWb('XY',0);xWb=new BWb('X',1);zWb=new BWb('Y',2)} -function vLb(){vLb=geb;uLb=new wLb('TOP',0);tLb=new wLb(Kye,1);sLb=new wLb(Qye,2)} -function Gvc(){Gvc=geb;Evc=new Hvc(LAe,0);Fvc=new Hvc('TOP',1);Dvc=new Hvc(Qye,2)} -function sEc(){sEc=geb;qEc=new tEc('INPUT_ORDER',0);rEc=new tEc('PORT_DEGREE',1)} -function MD(){MD=geb;ID=hD(dxe,dxe,524287);JD=hD(0,0,fxe);KD=fD(1);fD(2);LD=fD(0)} -function wWd(a){var b;if(a.d!=a.r){b=WVd(a);a.e=!!b&&b.lk()==aKe;a.d=b}return a.e} -function UHd(a,b,c){var d;d=a.g[b];MHd(a,b,a.Zi(b,c));a.Ri(b,c,d);a.Ni();return d} -function dHd(a,b){var c;c=a.dd(b);if(c>=0){a.gd(c);return true}else{return false}} -function xr(a,b){var c;Qb(a);Qb(b);c=false;while(b.Ob()){c=c|a.Fc(b.Pb())}return c} -function cub(a,b){var c;c=RD(Wjb(a.e,b),400);if(c){eub(a,c);return c.e}return null} -function iB(a){var b,c;b=a/60|0;c=a%60;if(c==0){return ''+b}return ''+b+':'+(''+c)} -function JB(d,a){var b=d.a[a];var c=(HC(),GC)[typeof b];return c?c(b):NC(typeof b)} -function EDb(a,b){var c,d;MCb(a);d=new zEb(b,a.a);c=new YDb(d);return new SDb(a,c)} -function mwb(a){var b;b=a.b.c.length==0?null:Vmb(a.b,0);b!=null&&owb(a,0);return b} -function ukc(a,b){var c,d,e;e=b.c.i;c=RD(Wjb(a.f,e),60);d=c.d.c-c.e.c;Bjd(b.a,d,0)} -function XLc(a,b){var c;++a.d;++a.c[b];c=b+1;while(c=0){++b[0]}} -function eEd(a,b){Dyd(a,b==null||Rfb((uFb(b),b))||isNaN((uFb(b),b))?0:(uFb(b),b))} -function fEd(a,b){Eyd(a,b==null||Rfb((uFb(b),b))||isNaN((uFb(b),b))?0:(uFb(b),b))} -function gEd(a,b){Cyd(a,b==null||Rfb((uFb(b),b))||isNaN((uFb(b),b))?0:(uFb(b),b))} -function hEd(a,b){Ayd(a,b==null||Rfb((uFb(b),b))||isNaN((uFb(b),b))?0:(uFb(b),b))} -function oWc(a,b,c){return cjd(new rjd(c.e.a+c.f.a/2,c.e.b+c.f.b/2),a)==(uFb(b),b)} -function qge(a,b){return ZD(b,102)&&(RD(b,19).Bb&txe)!=0?new She(b,a):new Phe(b,a)} -function sge(a,b){return ZD(b,102)&&(RD(b,19).Bb&txe)!=0?new She(b,a):new Phe(b,a)} -function XC(a){return a.__elementTypeCategory$==null?10:a.__elementTypeCategory$} -function Bhb(a,b){return b==(wvb(),wvb(),vvb)?a.toLocaleLowerCase():a.toLowerCase()} -function Mu(a){if(!a.e){throw Adb(new Dvb)}a.c=a.a=a.e;a.e=a.e.e;--a.d;return a.a.f} -function Lu(a){if(!a.c){throw Adb(new Dvb)}a.e=a.a=a.c;a.c=a.c.c;++a.d;return a.a.f} -function Lsb(a){var b;++a.a;for(b=a.c.a.length;a.aa.a[d]&&(d=c)}return d} -function Krc(a){var b;b=RD(mQb(a,(Ywc(),Wvc)),313);if(b){return b.a==a}return false} -function Lrc(a){var b;b=RD(mQb(a,(Ywc(),Wvc)),313);if(b){return b.i==a}return false} -function xXb(){xXb=geb;wXb=ss((sXb(),cD(WC(UP,1),jwe,367,0,[nXb,oXb,pXb,qXb,rXb])))} -function Hnc(){Hnc=geb;Gnc=ss((Bnc(),cD(WC(TV,1),jwe,375,0,[xnc,znc,Anc,ync,wnc])))} -function Xtc(){Xtc=geb;Wtc=ss((Ptc(),cD(WC(bX,1),jwe,348,0,[Ltc,Ktc,Ntc,Otc,Mtc])))} -function RDc(){RDc=geb;QDc=ss((JDc(),cD(WC(uX,1),jwe,323,0,[IDc,FDc,GDc,EDc,HDc])))} -function hxc(){hxc=geb;gxc=ss((cxc(),cD(WC(mX,1),jwe,171,0,[bxc,Zwc,$wc,_wc,axc])))} -function m3c(){m3c=geb;l3c=ss((g3c(),cD(WC(x0,1),jwe,368,0,[e3c,b3c,f3c,c3c,d3c])))} -function xad(){xad=geb;wad=ss((sad(),cD(WC(x1,1),jwe,373,0,[oad,nad,qad,pad,rad])))} -function acd(){acd=geb;_bd=ss((Xbd(),cD(WC(P1,1),jwe,324,0,[Sbd,Tbd,Wbd,Ubd,Vbd])))} -function Kmd(){Kmd=geb;Jmd=ss((Cmd(),cD(WC(s3,1),jwe,88,0,[Amd,zmd,ymd,xmd,Bmd])))} -function bid(){bid=geb;aid=ss((Yhd(),cD(WC(d3,1),jwe,170,0,[Whd,Vhd,Thd,Xhd,Uhd])))} -function uod(){uod=geb;tod=ss((pod(),cD(WC(B3,1),jwe,256,0,[mod,ood,kod,lod,nod])))} -function zpd(){zpd=geb;ypd=ss((qpd(),cD(WC(E3,1),NAe,64,0,[opd,Yod,Xod,npd,ppd])))} -function LHb(){LHb=geb;JHb=new MHb('BY_SIZE',0);KHb=new MHb('BY_SIZE_AND_SHAPE',1)} -function TUb(){TUb=geb;RUb=new UUb('EADES',0);SUb=new UUb('FRUCHTERMAN_REINGOLD',1)} -function $tc(){$tc=geb;Ytc=new _tc('READING_DIRECTION',0);Ztc=new _tc('ROTATION',1)} -function CZb(){CZb=geb;zZb=new ZZb;AZb=new b$b;xZb=new f$b;yZb=new j$b;BZb=new n$b} -function dGb(a){this.b=new bnb;this.a=new bnb;this.c=new bnb;this.d=new bnb;this.e=a} -function XZb(a){this.g=a;this.f=new bnb;this.a=$wnd.Math.min(this.g.c.c,this.g.d.c)} -function UKb(a,b,c){RJb.call(this);KKb(this);this.a=a;this.c=c;this.b=b.d;this.f=b.e} -function d6b(a,b,c){var d,e;for(e=new Anb(c);e.a=0&&b0?b-1:b;return Kqd(Lqd(Mqd(Nqd(new Oqd,c),a.n),a.j),a.k)} -function nBd(a){var b,c;c=(b=new q4d,b);WGd((!a.q&&(a.q=new C5d(s7,a,11,10)),a.q),c)} -function ofb(a){return ((a.i&2)!=0?'interface ':(a.i&1)!=0?'':'class ')+(lfb(a),a.o)} -function dz(a){if(Ddb(a,lve)>0){return lve}if(Ddb(a,qwe)<0){return qwe}return Ydb(a)} -function Sv(a){if(a<3){dk(a,fwe);return a+1}if(a=-0.01&&a.a<=Tye&&(a.a=0);a.b>=-0.01&&a.b<=Tye&&(a.b=0);return a} -function Hid(a){tid();var b,c;c=KEe;for(b=0;bc&&(c=a[b])}return c} -function Zvd(a,b){var c;c=wYd(a.Dh(),b);if(!c){throw Adb(new agb(KHe+b+NHe))}return c} -function NGd(a,b){var c;c=a;while(vCd(c)){c=vCd(c);if(c==b){return true}}return false} -function ix(a,b){var c,d,e;d=b.a.ld();c=RD(b.a.md(),16).gc();for(e=0;ea||a>b){throw Adb(new xeb('fromIndex: 0, toIndex: '+a+Qxe+b))}} -function ZHd(a){if(a<0){throw Adb(new agb('Illegal Capacity: '+a))}this.g=this.aj(a)} -function _y(a,b){Zy();bz(pwe);return $wnd.Math.abs(a-b)<=pwe||a==b||isNaN(a)&&isNaN(b)} -function xJc(a,b){var c,d,e,f;for(d=a.d,e=0,f=d.length;e0){a.a/=b;a.b/=b}return a} -function BXd(a){var b;if(a.w){return a.w}else{b=CXd(a);!!b&&!b.Vh()&&(a.w=b);return b}} -function l2d(a,b){var c,d;d=a.a;c=m2d(a,b,null);d!=b&&!a.e&&(c=o2d(a,b,c));!!c&&c.oj()} -function rQc(a,b,c){var d,e;d=b;do{e=Kfb(a.p[d.p])+c;a.p[d.p]=e;d=a.a[d.p]}while(d!=b)} -function heb(a,b,c){var d=function(){return a.apply(d,arguments)};b.apply(d,c);return d} -function Gae(a){var b;if(a==null){return null}else{b=RD(a,195);return sAd(b,b.length)}} -function QHd(a,b){if(a.g==null||b>=a.i)throw Adb(new yNd(b,a.i));return a.Wi(b,a.g[b])} -function Dob(a,b){yob();var c,d;d=new bnb;for(c=0;c=14&&b<=16)));return a} -function ws(a,b){var c;uFb(b);c=a[':'+b];mFb(!!c,'Enum constant undefined: '+b);return c} -function tfb(a,b,c,d,e,f){var g;g=rfb(a,b);Ffb(c,g);g.i=e?8:0;g.f=d;g.e=e;g.g=f;return g} -function R3d(a,b,c,d,e){this.d=b;this.k=d;this.f=e;this.o=-1;this.p=1;this.c=a;this.a=c} -function T3d(a,b,c,d,e){this.d=b;this.k=d;this.f=e;this.o=-1;this.p=2;this.c=a;this.a=c} -function _3d(a,b,c,d,e){this.d=b;this.k=d;this.f=e;this.o=-1;this.p=6;this.c=a;this.a=c} -function e4d(a,b,c,d,e){this.d=b;this.k=d;this.f=e;this.o=-1;this.p=7;this.c=a;this.a=c} -function X3d(a,b,c,d,e){this.d=b;this.j=d;this.e=e;this.o=-1;this.p=4;this.c=a;this.a=c} -function iGb(a,b){var c,d,e,f;for(d=b,e=0,f=d.length;e=0)){throw Adb(new agb('tolerance ('+a+') must be >= 0'))}return a} -function hOd(a,b){var c;if(ZD(b,44)){return a.c.Mc(b)}else{c=QNd(a,b);jOd(a,b);return c}} -function yBd(a,b,c){YVd(a,b);PAd(a,c);$Vd(a,0);bWd(a,1);aWd(a,true);_Vd(a,true);return a} -function ZGd(a,b){var c;c=a.gc();if(b<0||b>c)throw Adb(new aMd(b,c));return new CMd(a,b)} -function Cad(a,b){a.b=$wnd.Math.max(a.b,b.d);a.e+=b.r+(a.a.c.length==0?0:a.c);Rmb(a.a,b)} -function Jmb(a){yFb(a.c>=0);if(rmb(a.d,a.c)<0){a.a=a.a-1&a.d.a.length-1;a.b=a.d.c}a.c=-1} -function Nc(a){var b,c;for(c=a.c.Cc().Kc();c.Ob();){b=RD(c.Pb(),16);b.$b()}a.c.$b();a.d=0} -function Zi(a){var b,c,d,e;for(c=a.a,d=0,e=c.length;d=0} -function Iqd(a,b){if(a.r>0&&a.c0&&a.g!=0&&Iqd(a.i,b/a.r*a.i.d)}} -function $Cd(a,b){var c;c=a.c;a.c=b;(a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new N3d(a,1,1,c,a.c))} -function P1d(a,b){var c;c=a.c;a.c=b;(a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new N3d(a,1,4,c,a.c))} -function jyd(a,b){var c;c=a.k;a.k=b;(a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new N3d(a,1,2,c,a.k))} -function JXd(a,b){var c;c=a.D;a.D=b;(a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new N3d(a,1,2,c,a.D))} -function Kzd(a,b){var c;c=a.f;a.f=b;(a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new N3d(a,1,8,c,a.f))} -function Lzd(a,b){var c;c=a.i;a.i=b;(a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new N3d(a,1,7,c,a.i))} -function fCd(a,b){var c;c=a.a;a.a=b;(a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new N3d(a,1,8,c,a.a))} -function ZCd(a,b){var c;c=a.b;a.b=b;(a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new N3d(a,1,0,c,a.b))} -function s6d(a,b){var c;c=a.b;a.b=b;(a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new N3d(a,1,0,c,a.b))} -function t6d(a,b){var c;c=a.c;a.c=b;(a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new N3d(a,1,1,c,a.c))} -function nVd(a,b){var c;c=a.d;a.d=b;(a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new N3d(a,1,1,c,a.d))} -function Cte(a,b,c){var d;a.b=b;a.a=c;d=(a.a&512)==512?new Gre:new Tqe;a.c=Nqe(d,a.b,a.a)} -function Gge(a,b){return qke(a.e,b)?(nke(),wWd(b)?new ole(b,a):new Eke(b,a)):new Ble(b,a)} -function iDb(a){var b,c;if(0>a){return new rDb}b=a+1;c=new kDb(b,a);return new oDb(null,c)} -function Gob(a,b){yob();var c;c=new Usb(1);bE(a)?$jb(c,a,b):rtb(c.f,a,b);return new uqb(c)} -function pQc(a,b){var c,d;c=a.c;d=b.e[a.p];if(d>0){return RD(Vmb(c.a,d-1),10)}return null} -function TOb(a,b){var c,d;c=a.o+a.p;d=b.o+b.p;if(cb){b<<=1;return b>0?b:hwe}return b} -function xc(a){Ub(a.e!=3);switch(a.e){case 2:return false;case 0:return true;}return zc(a)} -function djd(a,b){var c;if(ZD(b,8)){c=RD(b,8);return a.a==c.a&&a.b==c.b}else{return false}} -function Ydd(a,b){var c;c=new kRb;RD(b.b,68);RD(b.b,68);RD(b.b,68);Umb(b.a,new ced(a,c,b))} -function gOd(a,b){var c,d;for(d=b.vc().Kc();d.Ob();){c=RD(d.Pb(),44);fOd(a,c.ld(),c.md())}} -function Jzd(a,b){var c;c=a.d;a.d=b;(a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new N3d(a,1,11,c,a.d))} -function zWd(a,b){var c;c=a.j;a.j=b;(a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new N3d(a,1,13,c,a.j))} -function b6d(a,b){var c;c=a.b;a.b=b;(a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new N3d(a,1,21,c,a.b))} -function YAb(a,b){((gBb(),dBb)?null:b.c).length==0&&iBb(b,new rBb);$jb(a.a,dBb?null:b.c,b)} -function b9b(a,b){b.Ug('Hierarchical port constraint processing',1);c9b(a);e9b(a);b.Vg()} -function joc(){joc=geb;ioc=new koc('START',0);hoc=new koc('MIDDLE',1);goc=new koc('END',2)} -function x2c(){x2c=geb;v2c=new z2c('P1_NODE_PLACEMENT',0);w2c=new z2c('P2_EDGE_ROUTING',1)} -function JVb(){JVb=geb;HVb=new jGd(rAe);IVb=new jGd(sAe);GVb=new jGd(tAe);FVb=new jGd(uAe)} -function tkb(a){var b;rFb(a.f.g,a.d);sFb(a.b);a.c=a.a;b=RD(a.a.Pb(),44);a.b=skb(a);return b} -function P2d(a){var b;if(a.b==null){return j3d(),j3d(),i3d}b=a.ul()?a.tl():a.sl();return b} -function nwb(a,b){var c;c=b==null?-1:Wmb(a.b,b,0);if(c<0){return false}owb(a,c);return true} -function zsb(a,b){var c;uFb(b);c=b.g;if(!a.b[c]){bD(a.b,c,b);++a.c;return true}return false} -function azb(a,b){var c,d;c=1-b;d=a.a[c];a.a[c]=d.a[b];d.a[b]=a;a.b=true;d.b=false;return d} -function xRb(a,b){var c,d;for(d=b.Kc();d.Ob();){c=RD(d.Pb(),272);a.b=true;Ysb(a.e,c);c.b=a}} -function kic(a,b){var c,d;c=RD(mQb(a,(yCc(),IBc)),8);d=RD(mQb(b,IBc),8);return Qfb(c.b,d.b)} -function SPb(a,b,c){var d,e,f;f=b>>5;e=b&31;d=Cdb(Udb(a.n[c][f],Ydb(Sdb(e,1))),3);return d} -function lmb(a,b,c){var d,e,f;f=a.a.length-1;for(e=a.b,d=0;d0?1:0}return (!a.c&&(a.c=ojb(Hdb(a.f))),a.c).e} -function GXd(a,b){if(b){if(a.B==null){a.B=a.D;a.D=null}}else if(a.B!=null){a.D=a.B;a.B=null}} -function rZb(a,b){nZb();return a==jZb&&b==mZb||a==mZb&&b==jZb||a==lZb&&b==kZb||a==kZb&&b==lZb} -function sZb(a,b){nZb();return a==jZb&&b==kZb||a==jZb&&b==lZb||a==mZb&&b==lZb||a==mZb&&b==kZb} -function zMb(a,b){return Zy(),bz(Tye),$wnd.Math.abs(0-b)<=Tye||0==b||isNaN(0)&&isNaN(b)?0:a/b} -function qsc(a,b){return Kfb(UD(Lvb(MDb(GDb(new SDb(null,new Swb(a.c.b,16)),new Isc(a)),b))))} -function tsc(a,b){return Kfb(UD(Lvb(MDb(GDb(new SDb(null,new Swb(a.c.b,16)),new Gsc(a)),b))))} -function rvc(){ovc();return cD(WC(iX,1),jwe,259,0,[fvc,hvc,ivc,jvc,kvc,lvc,nvc,evc,gvc,mvc])} -function dEc(){aEc();return cD(WC(vX,1),jwe,243,0,[$Dc,VDc,YDc,WDc,XDc,SDc,ZDc,_Dc,TDc,UDc])} -function z3c(a,b){var c;b.Ug('General Compactor',1);c=h4c(RD(Gxd(a,($4c(),I4c)),393));c.Cg(a)} -function T5c(a,b){var c,d;c=RD(Gxd(a,($4c(),P4c)),17);d=RD(Gxd(b,P4c),17);return hgb(c.a,d.a)} -function Bjd(a,b,c){var d,e;for(e=Sub(a,0);e.b!=e.d.c;){d=RD(evb(e),8);d.a+=b;d.b+=c}return a} -function Go(a,b,c){var d;for(d=a.b[c&a.f];d;d=d.b){if(c==d.a&&Hb(b,d.g)){return d}}return null} -function Ho(a,b,c){var d;for(d=a.c[c&a.f];d;d=d.d){if(c==d.f&&Hb(b,d.i)){return d}}return null} -function sjb(a,b,c){var d,e,f;d=0;for(e=0;e>>31}d!=0&&(a[c]=d)} -function yzb(a,b,c,d,e,f){var g;this.c=a;g=new bnb;Syb(a,g,b,a.b,c,d,e,f);this.a=new Jkb(g,0)} -function _5c(){this.c=new T2c(0);this.b=new T2c(FEe);this.d=new T2c(EEe);this.a=new T2c(Gze)} -function kMb(a,b,c,d,e,f,g){qs.call(this,a,b);this.d=c;this.e=d;this.c=e;this.b=f;this.a=dv(g)} -function tBd(a,b,c,d,e,f,g,h,i,j,k,l,m){ABd(a,b,c,d,e,f,g,h,i,j,k,l,m);kXd(a,false);return a} -function H0b(a){if(a.b.c.i.k==(r3b(),m3b)){return RD(mQb(a.b.c.i,(Ywc(),Awc)),12)}return a.b.c} -function I0b(a){if(a.b.d.i.k==(r3b(),m3b)){return RD(mQb(a.b.d.i,(Ywc(),Awc)),12)}return a.b.d} -function nDb(a){var b;b=mDb(a);if(Gdb(b.a,0)){return bwb(),bwb(),awb}return bwb(),new ewb(b.b)} -function SCb(a){var b;b=RCb(a);if(Gdb(b.a,0)){return Tvb(),Tvb(),Svb}return Tvb(),new Yvb(b.b)} -function TCb(a){var b;b=RCb(a);if(Gdb(b.a,0)){return Tvb(),Tvb(),Svb}return Tvb(),new Yvb(b.c)} -function o8b(a){switch(a.g){case 2:return qpd(),ppd;case 4:return qpd(),Xod;default:return a;}} -function p8b(a){switch(a.g){case 1:return qpd(),npd;case 3:return qpd(),Yod;default:return a;}} -function C9c(a){switch(a.g){case 0:return new s9c;case 1:return new x9c;default:return null;}} -function Zcc(){Zcc=geb;Ycc=new kGd('edgelabelcenterednessanalysis.includelabel',(Geb(),Eeb))} -function jKc(){jKc=geb;iKc=mfd(qfd(pfd(pfd(new ufd,(sXb(),pXb),(hcc(),Qbc)),qXb,Gbc),rXb),Pbc)} -function DLc(){DLc=geb;CLc=mfd(qfd(pfd(pfd(new ufd,(sXb(),pXb),(hcc(),Qbc)),qXb,Gbc),rXb),Pbc)} -function lYd(){lYd=geb;iYd=new i1d;kYd=cD(WC(y7,1),lKe,179,0,[]);jYd=cD(WC(s7,1),mKe,62,0,[])} -function P8b(){P8b=geb;O8b=new Q8b('TO_INTERNAL_LTR',0);N8b=new Q8b('TO_INPUT_DIRECTION',1)} -function J3b(){J3b=geb;G3b=new r4b;E3b=new w4b;F3b=new A4b;D3b=new E4b;H3b=new I4b;I3b=new M4b} -function Cac(a,b){b.Ug(iBe,1);LJb(KJb(new PJb((i1b(),new t1b(a,false,false,new _1b)))));b.Vg()} -function M_c(a,b,c){c.Ug('DFS Treeifying phase',1);L_c(a,b);J_c(a,b);a.a=null;a.b=null;c.Vg()} -function Leb(a,b){Geb();return bE(a)?jhb(a,WD(b)):_D(a)?Jfb(a,UD(b)):$D(a)?Ieb(a,TD(b)):a.Fd(b)} -function Ld(a,b){var c,d;uFb(b);for(d=b.vc().Kc();d.Ob();){c=RD(d.Pb(),44);a.zc(c.ld(),c.md())}} -function ege(a,b,c){var d;for(d=c.Kc();d.Ob();){if(!cge(a,b,d.Pb())){return false}}return true} -function S6d(a,b,c,d,e){var f;if(c){f=BYd(b.Dh(),a.c);e=c.Rh(b,-1-(f==-1?d:f),null,e)}return e} -function T6d(a,b,c,d,e){var f;if(c){f=BYd(b.Dh(),a.c);e=c.Th(b,-1-(f==-1?d:f),null,e)}return e} -function Uib(a){var b;if(a.b==-2){if(a.e==0){b=-1}else{for(b=0;a.a[b]==0;b++);}a.b=b}return a.b} -function fjb(a){uFb(a);if(a.length==0){throw Adb(new Vgb('Zero length BigInteger'))}mjb(this,a)} -function $Hd(a){this.i=a.gc();if(this.i>0){this.g=this.aj(this.i+(this.i/8|0)+1);a.Qc(this.g)}} -function dmc(a,b,c){this.g=a;this.d=b;this.e=c;this.a=new bnb;bmc(this);yob();_mb(this.a,null)} -function aad(a,b){b.q=a;a.d=$wnd.Math.max(a.d,b.r);a.b+=b.d+(a.a.c.length==0?0:a.c);Rmb(a.a,b)} -function xid(a,b){var c,d,e,f;e=a.c;c=a.c+a.b;f=a.d;d=a.d+a.a;return b.a>e&&b.af&&b.be?(c=e):BFb(b,c+1);a.a=zhb(a.a,0,b)+(''+d)+yhb(a.a,c)} -function ktb(a,b){a.a=Bdb(a.a,1);a.c=$wnd.Math.min(a.c,b);a.b=$wnd.Math.max(a.b,b);a.d=Bdb(a.d,b)} -function wdc(a,b){return b1||a.Ob()){++a.a;a.g=0;b=a.i;a.Ob();return b}else{throw Adb(new Dvb)}} -function GRc(a){switch(a.a.g){case 1:return new lSc;case 3:return new VUc;default:return new WRc;}} -function fyd(a,b){switch(b){case 1:return !!a.n&&a.n.i!=0;case 2:return a.k!=null;}return Cxd(a,b)} -function Hdb(a){if(jxe>22);e=a.h+b.h+(d>>22);return hD(c&dxe,d&dxe,e&exe)} -function DD(a,b){var c,d,e;c=a.l-b.l;d=a.m-b.m+(c>>22);e=a.h-b.h+(d>>22);return hD(c&dxe,d&dxe,e&exe)} -function Jpc(a){var b,c;Hpc(a);for(c=new Anb(a.d);c.ad)throw Adb(new aMd(b,d));a.Si()&&(c=bHd(a,c));return a.Ei(b,c)} -function eQb(a,b,c,d,e){var f,g;for(g=c;g<=e;g++){for(f=b;f<=d;f++){PPb(a,f,g)||TPb(a,f,g,true,false)}}} -function uid(a){tid();var b,c,d;c=$C(l3,Nve,8,2,0,1);d=0;for(b=0;b<2;b++){d+=0.5;c[b]=Cid(d,a)}return c} -function xD(a){var b,c,d;b=~a.l+1&dxe;c=~a.m+(b==0?1:0)&dxe;d=~a.h+(b==0&&c==0?1:0)&exe;return hD(b,c,d)} -function mgb(a){var b;if(a<0){return qwe}else if(a==0){return 0}else{for(b=hwe;(b&a)==0;b>>=1);return b}} -function zSd(a,b,c){if(a>=128)return false;return a<64?Pdb(Cdb(Sdb(1,a),c),0):Pdb(Cdb(Sdb(1,a-64),b),0)} -function oQb(a,b,c){return c==null?(!a.q&&(a.q=new Tsb),_jb(a.q,b)):(!a.q&&(a.q=new Tsb),Zjb(a.q,b,c)),a} -function pQb(a,b,c){c==null?(!a.q&&(a.q=new Tsb),_jb(a.q,b)):(!a.q&&(a.q=new Tsb),Zjb(a.q,b,c));return a} -function KTb(a){var b,c;c=new gUb;kQb(c,a);pQb(c,(JVb(),HVb),a);b=new Tsb;MTb(a,c,b);LTb(a,c,b);return c} -function cIc(a){var b,c;b=a.t-a.k[a.o.p]*a.d+a.j[a.o.p]>a.f;c=a.u+a.e[a.o.p]*a.d>a.f*a.s*a.d;return b||c} -function qmc(a,b){var c,d,e,f;c=false;d=a.a[b].length;for(f=0;f=0,'Negative initial capacity');mFb(b>=0,'Non-positive load factor');akb(this)} -function iib(a,b,c,d,e){var f,g;g=a.length;f=c.length;if(b<0||d<0||e<0||b+e>g||d+e>f){throw Adb(new ueb)}} -function zob(a,b){yob();var c,d,e,f,g;g=false;for(d=b,e=0,f=d.length;e1||b>=0&&a.b<3} -function nD(a){var b,c,d;b=~a.l+1&dxe;c=~a.m+(b==0?1:0)&dxe;d=~a.h+(b==0&&c==0?1:0)&exe;a.l=b;a.m=c;a.h=d} -function Cob(a){yob();var b,c,d;d=1;for(c=a.Kc();c.Ob();){b=c.Pb();d=31*d+(b!=null?tb(b):0);d=d|0}return d} -function kD(a,b,c,d,e){var f;f=BD(a,b);c&&nD(f);if(e){a=mD(a,b);d?(eD=xD(a)):(eD=hD(a.l,a.m,a.h))}return f} -function Qlc(a,b,c){a.g=Wlc(a,b,(qpd(),Xod),a.b);a.d=Wlc(a,c,Xod,a.b);if(a.g.c==0||a.d.c==0){return}Tlc(a)} -function Rlc(a,b,c){a.g=Wlc(a,b,(qpd(),ppd),a.j);a.d=Wlc(a,c,ppd,a.j);if(a.g.c==0||a.d.c==0){return}Tlc(a)} -function Xyd(a,b){switch(b){case 7:return !!a.e&&a.e.i!=0;case 8:return !!a.d&&a.d.i!=0;}return wyd(a,b)} -function STb(a,b){switch(b.g){case 0:ZD(a.b,641)||(a.b=new tUb);break;case 1:ZD(a.b,642)||(a.b=new zUb);}} -function tbd(a){switch(a.g){case 0:return new _dd;default:throw Adb(new agb(eGe+(a.f!=null?a.f:''+a.g)));}} -function bdd(a){switch(a.g){case 0:return new vdd;default:throw Adb(new agb(eGe+(a.f!=null?a.f:''+a.g)));}} -function LCc(a,b,c){return !QDb(CDb(new SDb(null,new Swb(a.c,16)),new PAb(new gsd(b,c)))).Bd((xDb(),wDb))} -function mWc(a,b){return cjd(jWc(RD(mQb(b,(h_c(),H$c)),88)),new rjd(a.c.e.a-a.b.e.a,a.c.e.b-a.b.e.b))<=0} -function dve(a,b){while(a.g==null&&!a.c?sId(a):a.g==null||a.i!=0&&RD(a.g[a.i-1],51).Ob()){mFd(b,tId(a))}} -function sYb(a){var b,c;for(c=new Anb(a.a.b);c.ad?1:0} -function ICc(a){Rmb(a.c,(hed(),fed));if(_y(a.a,Kfb(UD(iGd((QCc(),OCc)))))){return new asd}return new csd(a)} -function fs(a){while(!a.d||!a.d.Ob()){if(!!a.b&&!nmb(a.b)){a.d=RD(smb(a.b),51)}else{return null}}return a.d} -function BVc(a){switch(a.g){case 1:return EEe;default:case 2:return 0;case 3:return Gze;case 4:return FEe;}} -function fte(){Vse();var a;if(Cse)return Cse;a=Zse(hte('M',true));a=$se(hte('M',false),a);Cse=a;return Cse} -function ttd(){ttd=geb;qtd=new utd('ELK',0);rtd=new utd('JSON',1);ptd=new utd('DOT',2);std=new utd('SVG',3)} -function TEc(){TEc=geb;SEc=new UEc('STACKED',0);QEc=new UEc('REVERSE_STACKED',1);REc=new UEc('SEQUENCED',2)} -function LZc(){LZc=geb;KZc=new MZc(LAe,0);JZc=new MZc('MIDDLE_TO_MIDDLE',1);IZc=new MZc('AVOID_OVERLAP',2)} -function sgc(){sgc=geb;qgc=new Lgc;rgc=new Ngc;pgc=new Dgc;ogc=new Pgc;ngc=new Hgc;mgc=(uFb(ngc),new nrb)} -function vnd(){vnd=geb;tnd=new A3b(15);snd=new mGd((umd(),tld),tnd);und=Qld;ond=Ekd;pnd=kld;rnd=nld;qnd=mld} -function wgd(a,b){var c,d,e,f,g;for(d=b,e=0,f=d.length;e=a.b.c.length){return}jwb(a,2*b+1);c=2*b+2;c0){b.Cd(c);c.i&&zKc(c)}}} -function Ejb(a,b,c){var d;for(d=c-1;d>=0&&a[d]===b[d];d--);return d<0?0:Ldb(Cdb(a[d],yxe),Cdb(b[d],yxe))?-1:1} -function it(a,b,c){var d,e;this.g=a;this.c=b;this.a=this;this.d=this;e=Wp(c);d=$C(UG,ewe,227,e,0,1);this.b=d} -function fQb(a,b,c,d,e){var f,g;for(g=c;g<=e;g++){for(f=b;f<=d;f++){if(PPb(a,f,g)){return true}}}return false} -function Dc(a,b){var c,d;for(d=a.Zb().Cc().Kc();d.Ob();){c=RD(d.Pb(),16);if(c.Hc(b)){return true}}return false} -function iu(a,b,c){var d,e,f,g;uFb(c);g=false;f=a.fd(b);for(e=c.Kc();e.Ob();){d=e.Pb();f.Rb(d);g=true}return g} -function NMd(a,b){var c,d;d=RD(Ywd(a.a,4),129);c=$C(d6,IJe,424,b,0,1);d!=null&&hib(d,0,c,0,d.length);return c} -function hSd(a,b){var c;c=new lSd((a.f&256)!=0,a.i,a.a,a.d,(a.f&16)!=0,a.j,a.g,b);a.e!=null||(c.c=a);return c} -function Tv(a,b){var c;if(a===b){return true}else if(ZD(b,85)){c=RD(b,85);return Rx(gn(a),c.vc())}return false} -function Vjb(a,b,c){var d,e;for(e=c.Kc();e.Ob();){d=RD(e.Pb(),44);if(a.Be(b,d.md())){return true}}return false} -function lmc(a,b,c){if(!a.d[b.p][c.p]){kmc(a,b,c);a.d[b.p][c.p]=true;a.d[c.p][b.p]=true}return a.a[b.p][c.p]} -function vMc(a,b){var c;if(!a||a==b||!nQb(b,(Ywc(),pwc))){return false}c=RD(mQb(b,(Ywc(),pwc)),10);return c!=a} -function Bhe(a){switch(a.i){case 2:{return true}case 1:{return false}case -1:{++a.c}default:{return a.$l()}}} -function Che(a){switch(a.i){case -2:{return true}case -1:{return false}case 1:{--a.c}default:{return a._l()}}} -function bgb(a){oz.call(this,'The given string does not match the expected format for individual spacings.',a)} -function J6c(a,b){var c;b.Ug('Min Size Preprocessing',1);c=vsd(a);Ixd(a,(X6c(),U6c),c.a);Ixd(a,R6c,c.b);b.Vg()} -function Djd(a){var b,c,d;b=0;d=$C(l3,Nve,8,a.b,0,1);c=Sub(a,0);while(c.b!=c.d.c){d[b++]=RD(evb(c),8)}return d} -function Ajd(a,b,c){var d,e,f;d=new Yub;for(f=Sub(c,0);f.b!=f.d.c;){e=RD(evb(f),8);Mub(d,new sjd(e))}iu(a,b,d)} -function az(a,b){var c;c=Bdb(a,b);if(Ldb($db(a,b),0)|Jdb($db(a,c),0)){return c}return Bdb(Sve,$db(Udb(c,63),1))} -function le(a,b){var c,d;c=RD(a.d.Bc(b),16);if(!c){return null}d=a.e.hc();d.Gc(c);a.e.d-=c.gc();c.$b();return d} -function Dyb(a){var b;b=a.a.c.length;if(b>0){return lyb(b-1,a.a.c.length),Xmb(a.a,b-1)}else{throw Adb(new Srb)}} -function nFb(a,b,c){if(a>b){throw Adb(new agb(_xe+a+aye+b))}if(a<0||b>c){throw Adb(new xeb(_xe+a+bye+b+Qxe+c))}} -function yXd(a,b){if(a.D==null&&a.B!=null){a.D=a.B;a.B=null}JXd(a,b==null?null:(uFb(b),b));!!a.C&&a.hl(null)} -function JCc(a,b){var c;c=iGd((QCc(),OCc))!=null&&b.Sg()!=null?Kfb(UD(b.Sg()))/Kfb(UD(iGd(OCc))):1;Zjb(a.b,b,c)} -function $Lc(a,b){var c,d;d=a.c[b];if(d==0){return}a.c[b]=0;a.d-=d;c=b+1;while(cDEe?a-c>DEe:c-a>DEe} -function vjd(a,b){var c;for(c=0;ce){ead(b.q,e);d=c!=b.q.d}}return d} -function C3c(a,b){var c,d,e,f,g,h,i,j;i=b.i;j=b.j;d=a.f;e=d.i;f=d.j;g=i-e;h=j-f;c=$wnd.Math.sqrt(g*g+h*h);return c} -function pBd(a,b){var c,d;d=Hvd(a);if(!d){!$Ad&&($Ad=new L5d);c=(gSd(),nSd(b));d=new Sde(c);WGd(d.El(),a)}return d} -function Sc(a,b){var c,d;c=RD(a.c.Bc(b),16);if(!c){return a.jc()}d=a.hc();d.Gc(c);a.d-=c.gc();c.$b();return a.mc(d)} -function tKc(a,b){var c,d;d=Kwb(a.d,1)!=0;c=true;while(c){c=false;c=b.c.mg(b.e,d);c=c|DKc(a,b,d,false);d=!d}yKc(a)} -function omc(a,b,c,d){var e,f;a.a=b;f=d?0:1;a.f=(e=new mmc(a.c,a.a,c,f),new Pmc(c,a.a,e,a.e,a.b,a.c==(RKc(),PKc)))} -function Imb(a){var b;sFb(a.a!=a.b);b=a.d.a[a.a];zmb(a.b==a.d.c&&b!=null);a.c=a.a;a.a=a.a+1&a.d.a.length-1;return b} -function Vib(a){var b;if(a.c!=0){return a.c}for(b=0;b=a.c.b:a.a<=a.c.b)){throw Adb(new Dvb)}b=a.a;a.a+=a.c.c;++a.b;return sgb(b)} -function h5b(a){var b;b=new y2b(a.a);kQb(b,a);pQb(b,(Ywc(),Awc),a);b.o.a=a.g;b.o.b=a.f;b.n.a=a.i;b.n.b=a.j;return b} -function tVc(a){return (qpd(),hpd).Hc(a.j)?Kfb(UD(mQb(a,(Ywc(),Swc)))):xjd(cD(WC(l3,1),Nve,8,0,[a.i.n,a.n,a.a])).b} -function ZJc(a){var b;b=vfd(XJc);RD(mQb(a,(Ywc(),kwc)),21).Hc((ovc(),kvc))&&pfd(b,(sXb(),pXb),(hcc(),Ybc));return b} -function M2c(a){var b,c,d,e;e=new _sb;for(d=new Anb(a);d.a=0?b:-b;while(d>0){if(d%2==0){c*=c;d=d/2|0}else{e*=c;d-=1}}return b<0?1/e:e} -function Jid(a,b){var c,d,e;e=1;c=a;d=b>=0?b:-b;while(d>0){if(d%2==0){c*=c;d=d/2|0}else{e*=c;d-=1}}return b<0?1/e:e} -function Vvd(a,b){var c,d,e,f;f=(e=a?Hvd(a):null,Pje((d=b,e?e.Gl():null,d)));if(f==b){c=Hvd(a);!!c&&c.Gl()}return f} -function g2d(a,b,c){var d,e;e=a.f;a.f=b;if((a.Db&4)!=0&&(a.Db&1)==0){d=new N3d(a,1,0,e,b);!c?(c=d):c.nj(d)}return c} -function e2d(a,b,c){var d,e;e=a.b;a.b=b;if((a.Db&4)!=0&&(a.Db&1)==0){d=new N3d(a,1,3,e,b);!c?(c=d):c.nj(d)}return c} -function rAd(a,b,c){var d,e;e=a.a;a.a=b;if((a.Db&4)!=0&&(a.Db&1)==0){d=new N3d(a,1,1,e,b);!c?(c=d):c.nj(d)}return c} -function SNd(a){var b,c,d,e;if(a!=null){for(c=0;c=d||b-129&&a<128){return ugb(),b=a+128,c=tgb[b],!c&&(c=tgb[b]=new fgb(a)),c}return new fgb(a)} -function bhb(a){var b,c;if(a>-129&&a<128){return dhb(),b=a+128,c=chb[b],!c&&(c=chb[b]=new Xgb(a)),c}return new Xgb(a)} -function M$b(a,b){var c;if(a.a.c.length>0){c=RD(Vmb(a.a,a.a.c.length-1),579);if(Q_b(c,b)){return}}Rmb(a.a,new S_b(b))} -function Ekc(a){lkc();var b,c;b=a.d.c-a.e.c;c=RD(a.g,154);Umb(c.b,new Ykc(b));Umb(c.c,new $kc(b));xgb(c.i,new alc(b))} -function Mlc(a){var b;b=new bib;b.a+='VerticalSegment ';Yhb(b,a.e);b.a+=' ';Zhb(b,Eb(new Gb,new Anb(a.k)));return b.a} -function Fmc(a,b){var c,d,e;c=0;for(e=b3b(a,b).Kc();e.Ob();){d=RD(e.Pb(),12);c+=mQb(d,(Ywc(),Iwc))!=null?1:0}return c} -function VTc(a,b,c){var d,e,f;d=0;for(f=Sub(a,0);f.b!=f.d.c;){e=Kfb(UD(evb(f)));if(e>c){break}else e>=b&&++d}return d} -function Wv(b,c){Qb(b);try{return b._b(c)}catch(a){a=zdb(a);if(ZD(a,212)||ZD(a,169)){return false}else throw Adb(a)}} -function Nk(b,c){Qb(b);try{return b.Hc(c)}catch(a){a=zdb(a);if(ZD(a,212)||ZD(a,169)){return false}else throw Adb(a)}} -function Ok(b,c){Qb(b);try{return b.Mc(c)}catch(a){a=zdb(a);if(ZD(a,212)||ZD(a,169)){return false}else throw Adb(a)}} -function Xv(b,c){Qb(b);try{return b.xc(c)}catch(a){a=zdb(a);if(ZD(a,212)||ZD(a,169)){return null}else throw Adb(a)}} -function Yv(b,c){Qb(b);try{return b.Bc(c)}catch(a){a=zdb(a);if(ZD(a,212)||ZD(a,169)){return null}else throw Adb(a)}} -function aMc(a,b){switch(b.g){case 2:case 1:return b3b(a,b);case 3:case 4:return hv(b3b(a,b));}return yob(),yob(),vob} -function QAd(a){var b;if((a.Db&64)!=0)return awd(a);b=new Shb(awd(a));b.a+=' (name: ';Nhb(b,a.zb);b.a+=')';return b.a} -function Fgd(a){var b;b=RD(cub(a.c.c,''),233);if(!b){b=new fgd(ogd(ngd(new pgd,''),'Other'));dub(a.c.c,'',b)}return b} -function hBd(a,b,c){var d,e;e=a.sb;a.sb=b;if((a.Db&4)!=0&&(a.Db&1)==0){d=new N3d(a,1,4,e,b);!c?(c=d):c.nj(d)}return c} -function ZVd(a,b,c){var d,e;e=a.r;a.r=b;if((a.Db&4)!=0&&(a.Db&1)==0){d=new N3d(a,1,8,e,a.r);!c?(c=d):c.nj(d)}return c} -function q5d(a,b,c){var d,e;d=new P3d(a.e,4,13,(e=b.c,e?e:(JTd(),wTd)),null,fZd(a,b),false);!c?(c=d):c.nj(d);return c} -function p5d(a,b,c){var d,e;d=new P3d(a.e,3,13,null,(e=b.c,e?e:(JTd(),wTd)),fZd(a,b),false);!c?(c=d):c.nj(d);return c} -function Oee(a,b){var c,d;c=RD(b,691);d=c.el();!d&&c.fl(d=ZD(b,90)?new afe(a,RD(b,29)):new mfe(a,RD(b,156)));return d} -function KHd(a,b,c){var d;a._i(a.i+1);d=a.Zi(b,c);b!=a.i&&hib(a.g,b,a.g,b+1,a.i-b);bD(a.g,b,d);++a.i;a.Mi(b,c);a.Ni()} -function Hyb(a,b){var c;if(b.a){c=b.a.a.length;!a.a?(a.a=new dib(a.d)):Zhb(a.a,a.b);Xhb(a.a,b.a,b.d.length,c)}return a} -function wib(a,b){var c;a.c=b;a.a=pjb(b);a.a<54&&(a.f=(c=b.d>1?DFb(b.a[0],b.a[1]):DFb(b.a[0],0),Xdb(b.e>0?c:Odb(c))))} -function MDb(a,b){var c;c=new IEb;if(!a.a.Bd(c)){LCb(a);return Kvb(),Kvb(),Jvb}return Kvb(),new Ovb(uFb(LDb(a,c.a,b)))} -function t9b(a,b){var c;if(a.c.length==0){return}c=RD(anb(a,$C(jR,WAe,10,a.c.length,0,1)),199);Znb(c,new F9b);q9b(c,b)} -function z9b(a,b){var c;if(a.c.length==0){return}c=RD(anb(a,$C(jR,WAe,10,a.c.length,0,1)),199);Znb(c,new K9b);q9b(c,b)} -function pb(a,b){return bE(a)?lhb(a,b):_D(a)?Lfb(a,b):$D(a)?(uFb(a),dE(a)===dE(b)):YD(a)?a.Fb(b):aD(a)?mb(a,b):Hz(a,b)} -function Cvd(a,b,c){if(b<0){Tvd(a,c)}else{if(!c.rk()){throw Adb(new agb(KHe+c.xe()+LHe))}RD(c,69).wk().Ek(a,a.hi(),b)}} -function xFb(a,b,c){if(a<0||b>c){throw Adb(new veb(_xe+a+bye+b+', size: '+c))}if(a>b){throw Adb(new agb(_xe+a+aye+b))}} -function oVd(a){var b;if((a.Db&64)!=0)return awd(a);b=new Shb(awd(a));b.a+=' (source: ';Nhb(b,a.d);b.a+=')';return b.a} -function JSd(a){if(a>=65&&a<=70){return a-65+10}if(a>=97&&a<=102){return a-97+10}if(a>=48&&a<=57){return a-48}return 0} -function lMb(a){hMb();var b,c,d,e;for(c=nMb(),d=0,e=c.length;d=0?jjb(a):Xib(jjb(Odb(a)))))} -function G0b(a,b,c,d,e,f){this.e=new bnb;this.f=(BEc(),AEc);Rmb(this.e,a);this.d=b;this.a=c;this.b=d;this.f=e;this.c=f} -function bQb(a,b,c){a.n=YC(lE,[Nve,rxe],[376,28],14,[c,eE($wnd.Math.ceil(b/32))],2);a.o=b;a.p=c;a.j=b-1>>1;a.k=c-1>>1} -function ggb(a){a-=a>>1&1431655765;a=(a>>2&858993459)+(a&858993459);a=(a>>4)+a&252645135;a+=a>>8;a+=a>>16;return a&63} -function C4d(a,b){var c,d;for(d=new dMd(a);d.e!=d.i.gc();){c=RD(bMd(d),142);if(dE(b)===dE(c)){return true}}return false} -function Iee(a,b,c){var d,e,f;f=(e=N5d(a.b,b),e);if(f){d=RD(tfe(Pee(a,f),''),29);if(d){return Ree(a,d,b,c)}}return null} -function Lee(a,b,c){var d,e,f;f=(e=N5d(a.b,b),e);if(f){d=RD(tfe(Pee(a,f),''),29);if(d){return See(a,d,b,c)}}return null} -function IDd(a,b){var c;c=Ao(a.i,b);if(c==null){throw Adb(new CDd('Node did not exist in input.'))}wEd(b,c);return null} -function wvd(a,b){var c;c=wYd(a,b);if(ZD(c,331)){return RD(c,35)}throw Adb(new agb(KHe+b+"' is not a valid attribute"))} -function VGd(a,b,c){var d;d=a.gc();if(b>d)throw Adb(new aMd(b,d));if(a.Si()&&a.Hc(c)){throw Adb(new agb(LIe))}a.Gi(b,c)} -function w7b(a,b){b.Ug('Sort end labels',1);FDb(CDb(EDb(new SDb(null,new Swb(a.b,16)),new H7b),new J7b),new L7b);b.Vg()} -function Cmd(){Cmd=geb;Amd=new Gmd(Sye,0);zmd=new Gmd(Oye,1);ymd=new Gmd(Nye,2);xmd=new Gmd(Zye,3);Bmd=new Gmd('UP',4)} -function gbd(){gbd=geb;dbd=new hbd('P1_STRUCTURE',0);ebd=new hbd('P2_PROCESSING_ORDER',1);fbd=new hbd('P3_EXECUTION',2)} -function r0c(){r0c=geb;q0c=mfd(mfd(rfd(mfd(mfd(rfd(pfd(new ufd,(YVc(),VVc),(WYc(),VYc)),WVc),RYc),TYc),XVc),NYc),UYc)} -function s8b(a){switch(RD(mQb(a,(Ywc(),owc)),311).g){case 1:pQb(a,owc,(Gvc(),Dvc));break;case 2:pQb(a,owc,(Gvc(),Fvc));}} -function bUc(a){switch(a){case 0:return new mUc;case 1:return new cUc;case 2:return new hUc;default:throw Adb(new _fb);}} -function Fmd(a){switch(a.g){case 2:return zmd;case 1:return ymd;case 4:return xmd;case 3:return Bmd;default:return Amd;}} -function UNb(a,b){switch(a.b.g){case 0:case 1:return b;case 2:case 3:return new Uid(b.d,0,b.a,b.b);default:return null;}} -function rpd(a){switch(a.g){case 1:return ppd;case 2:return Yod;case 3:return Xod;case 4:return npd;default:return opd;}} -function spd(a){switch(a.g){case 1:return npd;case 2:return ppd;case 3:return Yod;case 4:return Xod;default:return opd;}} -function tpd(a){switch(a.g){case 1:return Xod;case 2:return npd;case 3:return ppd;case 4:return Yod;default:return opd;}} -function cyd(a,b,c,d){switch(b){case 1:return !a.n&&(a.n=new C5d(I4,a,1,7)),a.n;case 2:return a.k;}return Axd(a,b,c,d)} -function uLd(a,b,c){var d,e;if(a.Pj()){e=a.Qj();d=SHd(a,b,c);a.Jj(a.Ij(7,sgb(c),d,b,e));return d}else{return SHd(a,b,c)}} -function VNd(a,b){var c,d,e;if(a.d==null){++a.e;--a.f}else{e=b.ld();c=b.Bi();d=(c&lve)%a.d.length;iOd(a,d,XNd(a,d,c,e))}} -function xWd(a,b){var c;c=(a.Bb&gwe)!=0;b?(a.Bb|=gwe):(a.Bb&=-1025);(a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new Q3d(a,1,10,c,b))} -function DWd(a,b){var c;c=(a.Bb&qxe)!=0;b?(a.Bb|=qxe):(a.Bb&=-4097);(a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new Q3d(a,1,12,c,b))} -function EWd(a,b){var c;c=(a.Bb&bKe)!=0;b?(a.Bb|=bKe):(a.Bb&=-8193);(a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new Q3d(a,1,15,c,b))} -function FWd(a,b){var c;c=(a.Bb&cKe)!=0;b?(a.Bb|=cKe):(a.Bb&=-2049);(a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new Q3d(a,1,11,c,b))} -function zKc(a){var b;if(a.g){b=a.c.kg()?a.f:a.a;BKc(b.a,a.o,true);BKc(b.a,a.o,false);pQb(a.o,(yCc(),BBc),(Bod(),vod))}} -function Orc(a){var b;if(!a.a){throw Adb(new dgb('Cannot offset an unassigned cut.'))}b=a.c-a.b;a.b+=b;Qrc(a,b);Rrc(a,b)} -function JDd(a,b){var c;c=Wjb(a.k,b);if(c==null){throw Adb(new CDd('Port did not exist in input.'))}wEd(b,c);return null} -function Jje(a){var b,c;for(c=Kje(BXd(a)).Kc();c.Ob();){b=WD(c.Pb());if(bAd(a,b)){return USd((TSd(),SSd),b)}}return null} -function qJb(a){var b,c;for(c=a.p.a.ec().Kc();c.Ob();){b=RD(c.Pb(),218);if(b.f&&a.b[b.c]<-1.0E-10){return b}}return null} -function Lr(a){var b,c;c=Thb(new bib,91);b=true;while(a.Ob()){b||(c.a+=pve,c);b=false;Yhb(c,a.Pb())}return (c.a+=']',c).a} -function o_b(a){var b,c,d;b=new bnb;for(d=new Anb(a.b);d.ab){return 1}if(a==b){return a==0?Qfb(1/a,1/b):0}return isNaN(a)?isNaN(b)?0:1:-1} -function pmb(a){var b;b=a.a[a.c-1&a.a.length-1];if(b==null){return null}a.c=a.c-1&a.a.length-1;bD(a.a,a.c,null);return b} -function Dqe(a){var b,c,d;d=0;c=a.length;for(b=0;b=1?zmd:xmd}return c} -function Xhc(a){switch(RD(mQb(a,(yCc(),yAc)),223).g){case 1:return new jqc;case 3:return new arc;default:return new dqc;}} -function MCb(a){if(a.c){MCb(a.c)}else if(a.d){throw Adb(new dgb("Stream already terminated, can't be modified or used"))}} -function Ltb(a,b,c){var d;d=a.a.get(b);a.a.set(b,c===undefined?null:c);if(d===undefined){++a.c;++a.b.g}else{++a.d}return d} -function HHc(a,b,c){var d,e;for(e=a.a.ec().Kc();e.Ob();){d=RD(e.Pb(),10);if(Be(c,RD(Vmb(b,d.p),16))){return d}}return null} -function u0c(a,b,c){var d;d=0;!!b&&(Emd(a.a)?(d+=b.f.a/2):(d+=b.f.b/2));!!c&&(Emd(a.a)?(d+=c.f.a/2):(d+=c.f.b/2));return d} -function LWb(a,b,c){var d;d=c;!d&&(d=Nqd(new Oqd,0));d.Ug(EAe,2);y0b(a.b,b,d.eh(1));NWb(a,b,d.eh(1));h0b(b,d.eh(1));d.Vg()} -function CGd(a,b,c){var d,e;d=(bvd(),e=new Xxd,e);Vxd(d,b);Wxd(d,c);!!a&&WGd((!a.a&&(a.a=new XZd(D4,a,5)),a.a),d);return d} -function kyd(a){var b;if((a.Db&64)!=0)return awd(a);b=new Shb(awd(a));b.a+=' (identifier: ';Nhb(b,a.k);b.a+=')';return b.a} -function kXd(a,b){var c;c=(a.Bb&QHe)!=0;b?(a.Bb|=QHe):(a.Bb&=-32769);(a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new Q3d(a,1,18,c,b))} -function a6d(a,b){var c;c=(a.Bb&QHe)!=0;b?(a.Bb|=QHe):(a.Bb&=-32769);(a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new Q3d(a,1,18,c,b))} -function AWd(a,b){var c;c=(a.Bb&Ove)!=0;b?(a.Bb|=Ove):(a.Bb&=-16385);(a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new Q3d(a,1,16,c,b))} -function c6d(a,b){var c;c=(a.Bb&txe)!=0;b?(a.Bb|=txe):(a.Bb&=-65537);(a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new Q3d(a,1,20,c,b))} -function qse(a){var b;b=$C(hE,zwe,28,2,15,1);a-=txe;b[0]=(a>>10)+uxe&Bwe;b[1]=(a&1023)+56320&Bwe;return Ihb(b,0,b.length)} -function Zfb(a){var b;b=Neb(a);if(b>3.4028234663852886E38){return oxe}else if(b<-3.4028234663852886E38){return pxe}return b} -function Bdb(a,b){var c;if(Kdb(a)&&Kdb(b)){c=a+b;if(jxe'+aXc(b.c):'e_'+tb(b),!!a.b&&!!a.c?aXc(a.b)+'->'+aXc(a.c):'e_'+tb(a))} -function rWc(a,b){return lhb(!!b.b&&!!b.c?aXc(b.b)+'->'+aXc(b.c):'e_'+tb(b),!!a.b&&!!a.c?aXc(a.b)+'->'+aXc(a.c):'e_'+tb(a))} -function $y(a,b){Zy();return bz(pwe),$wnd.Math.abs(a-b)<=pwe||a==b||isNaN(a)&&isNaN(b)?0:ab?1:cz(isNaN(a),isNaN(b))} -function Ymd(){Ymd=geb;Xmd=new Zmd(Sye,0);Vmd=new Zmd('POLYLINE',1);Umd=new Zmd('ORTHOGONAL',2);Wmd=new Zmd('SPLINES',3)} -function _6c(){_6c=geb;Z6c=new a7c('ASPECT_RATIO_DRIVEN',0);$6c=new a7c('MAX_SCALE_DRIVEN',1);Y6c=new a7c('AREA_DRIVEN',2)} -function Db(b,c,d){var e;try{Cb(b,c,d)}catch(a){a=zdb(a);if(ZD(a,606)){e=a;throw Adb(new Deb(e))}else throw Adb(a)}return c} -function Im(a){var b,c,d;for(c=0,d=a.length;cb&&d.Ne(a[f-1],a[f])>0;--f){g=a[f];bD(a,f,a[f-1]);bD(a,f-1,g)}}} -function Egd(a,b){var c,d,e,f,g;c=b.f;dub(a.c.d,c,b);if(b.g!=null){for(e=b.g,f=0,g=e.length;fb){fvb(c);break}}cvb(c,b)} -function Kic(a,b){var c,d,e;d=Zjc(b);e=Kfb(UD(hFc(d,(yCc(),TBc))));c=$wnd.Math.max(0,e/2-0.5);Iic(b,c,1);Rmb(a,new hjc(b,c))} -function L5c(a,b,c){var d;c.Ug('Straight Line Edge Routing',1);c.dh(b,eFe);d=RD(Gxd(b,(u2c(),t2c)),27);M5c(a,d);c.dh(b,gFe)} -function K9c(a,b){a.n.c.length==0&&Rmb(a.n,new _9c(a.s,a.t,a.i));Rmb(a.b,b);W9c(RD(Vmb(a.n,a.n.c.length-1),209),b);M9c(a,b)} -function Zrb(a){var b;this.a=(b=RD(a.e&&a.e(),9),new Fsb(b,RD(WEb(b,b.length),9),0));this.b=$C(jJ,rve,1,this.a.a.length,5,1)} -function jeb(a){var b;if(Array.isArray(a)&&a.Tm===keb){return nfb(rb(a))+'@'+(b=tb(a)>>>0,b.toString(16))}return a.toString()} -function jD(a,b){if(a.h==fxe&&a.m==0&&a.l==0){b&&(eD=hD(0,0,0));return gD((MD(),KD))}b&&(eD=hD(a.l,a.m,a.h));return hD(0,0,0)} -function _Gb(a,b){switch(b.g){case 2:return a.b;case 1:return a.c;case 4:return a.d;case 3:return a.a;default:return false;}} -function IYb(a,b){switch(b.g){case 2:return a.b;case 1:return a.c;case 4:return a.d;case 3:return a.a;default:return false;}} -function vyd(a,b,c,d){switch(b){case 3:return a.f;case 4:return a.g;case 5:return a.i;case 6:return a.j;}return cyd(a,b,c,d)} -function oIb(a,b){if(b==a.d){return a.e}else if(b==a.e){return a.d}else{throw Adb(new agb('Node '+b+' not part of edge '+a))}} -function Uvd(a,b){var c;c=wYd(a.Dh(),b);if(ZD(c,102)){return RD(c,19)}throw Adb(new agb(KHe+b+"' is not a valid reference"))} -function Bvd(a,b,c,d){if(b<0){Svd(a,c,d)}else{if(!c.rk()){throw Adb(new agb(KHe+c.xe()+LHe))}RD(c,69).wk().Ck(a,a.hi(),b,d)}} -function ig(a){var b;if(a.b){ig(a.b);if(a.b.d!=a.c){throw Adb(new Jrb)}}else if(a.d.dc()){b=RD(a.f.c.xc(a.e),16);!!b&&(a.d=b)}} -function VMb(a){RMb();var b,c,d,e;b=a.o.b;for(d=RD(RD(Qc(a.r,(qpd(),npd)),21),87).Kc();d.Ob();){c=RD(d.Pb(),117);e=c.e;e.b+=b}} -function SRb(a){var b,c,d;this.a=new Iub;for(d=new Anb(a);d.a=e){return b.c+c}}return b.c+b.b.gc()} -function lQd(a,b){jQd();var c,d,e,f;d=iZd(a);e=b;Wnb(d,0,d.length,e);for(c=0;c0){d+=e;++c}}c>1&&(d+=a.d*(c-1));return d} -function FFd(a){var b,c,d,e,f;f=HFd(a);c=cve(a.c);d=!c;if(d){e=new MB;sC(f,'knownLayouters',e);b=new QFd(e);xgb(a.c,b)}return f} -function fHd(a){var b,c,d;d=new Qhb;d.a+='[';for(b=0,c=a.gc();b0&&(BFb(b-1,a.length),a.charCodeAt(b-1)==58)&&!mSd(a,aSd,bSd)} -function Sib(a,b){var c;if(dE(a)===dE(b)){return true}if(ZD(b,92)){c=RD(b,92);return a.e==c.e&&a.d==c.d&&Tib(a,c.a)}return false} -function vpd(a){qpd();switch(a.g){case 4:return Yod;case 1:return Xod;case 3:return npd;case 2:return ppd;default:return opd;}} -function jBb(a){var b,c;if(a.b){return a.b}c=dBb?null:a.d;while(c){b=dBb?null:c.b;if(b){return b}c=dBb?null:c.d}return SAb(),RAb} -function LJb(a){var b,c,d;d=Kfb(UD(a.a.of((umd(),cmd))));for(c=new Anb(a.a.Sf());c.a>5;b=a&31;d=$C(kE,Pwe,28,c+1,15,1);d[c]=1<3){e*=10;--f}a=(a+(e>>1))/e|0}d.i=a;return true} -function BYd(a,b){var c,d,e;c=(a.i==null&&rYd(a),a.i);d=b.Lj();if(d!=-1){for(e=c.length;d=0;--d){b=c[d];for(e=0;e>1;this.k=b-1>>1} -function Dfd(a){Afd();if(RD(a.of((umd(),pld)),181).Hc((dqd(),bqd))){RD(a.of(Lld),181).Fc((Pod(),Ood));RD(a.of(pld),181).Mc(bqd)}} -function ndc(a){var b,c;b=a.d==(btc(),Ysc);c=jdc(a);b&&!c||!b&&c?pQb(a.a,(yCc(),Rzc),(Rjd(),Pjd)):pQb(a.a,(yCc(),Rzc),(Rjd(),Ojd))} -function QCc(){QCc=geb;GCc();OCc=(yCc(),bCc);PCc=dv(cD(WC(V5,1),kEe,149,0,[SBc,TBc,VBc,WBc,ZBc,$Bc,_Bc,aCc,dCc,fCc,UBc,XBc,cCc]))} -function RDb(a,b){var c;c=RD(zDb(a,tBb(new ZBb,new XBb,new wCb,cD(WC(QL,1),jwe,108,0,[(xBb(),vBb)]))),15);return c.Qc(__c(c.gc()))} -function nXc(a,b){var c,d;d=new zAb(a.a.ad(b,true));if(d.a.gc()<=1){throw Adb(new Ngb)}c=d.a.ec().Kc();c.Pb();return RD(c.Pb(),40)} -function lQc(a,b,c){var d,e;d=Kfb(a.p[b.i.p])+Kfb(a.d[b.i.p])+b.n.b+b.a.b;e=Kfb(a.p[c.i.p])+Kfb(a.d[c.i.p])+c.n.b+c.a.b;return e-d} -function XHd(a,b){var c;if(a.i>0){if(b.lengtha.i&&bD(b,a.i,null);return b} -function MXd(a){var b;if((a.Db&64)!=0)return QAd(a);b=new Shb(QAd(a));b.a+=' (instanceClassName: ';Nhb(b,a.D);b.a+=')';return b.a} -function ySd(a){var b,c,d,e;e=0;for(c=0,d=a.length;c0){a._j();d=b==null?0:tb(b);e=(d&lve)%a.d.length;c=XNd(a,e,d,b);return c!=-1}else{return false}} -function Nrb(a,b){var c,d;a.a=Bdb(a.a,1);a.c=$wnd.Math.min(a.c,b);a.b=$wnd.Math.max(a.b,b);a.d+=b;c=b-a.f;d=a.e+c;a.f=d-a.e-c;a.e=d} -function yyd(a,b){switch(b){case 3:Ayd(a,0);return;case 4:Cyd(a,0);return;case 5:Dyd(a,0);return;case 6:Eyd(a,0);return;}hyd(a,b)} -function c3b(a,b){switch(b.g){case 1:return dr(a.j,(J3b(),E3b));case 2:return dr(a.j,(J3b(),G3b));default:return yob(),yob(),vob;}} -function zm(a){tm();var b;b=a.Pc();switch(b.length){case 0:return sm;case 1:return new Dy(Qb(b[0]));default:return new Kx(Im(b));}} -function kMd(b,c){b.Xj();try{b.d.bd(b.e++,c);b.f=b.d.j;b.g=-1}catch(a){a=zdb(a);if(ZD(a,77)){throw Adb(new Jrb)}else throw Adb(a)}} -function a8d(){a8d=geb;$7d=new b8d;T7d=new e8d;U7d=new h8d;V7d=new k8d;W7d=new n8d;X7d=new q8d;Y7d=new t8d;Z7d=new w8d;_7d=new z8d} -function YA(a,b){WA();var c,d;c=_A(($A(),$A(),ZA));d=null;b==c&&(d=RD(Xjb(VA,a),624));if(!d){d=new XA(a);b==c&&$jb(VA,a,d)}return d} -function zDc(a){wDc();var b;(!a.q?(yob(),yob(),wob):a.q)._b((yCc(),iBc))?(b=RD(mQb(a,iBc),203)):(b=RD(mQb(Y2b(a),jBc),203));return b} -function hFc(a,b){var c,d;d=null;if(nQb(a,(yCc(),YBc))){c=RD(mQb(a,YBc),96);c.pf(b)&&(d=c.of(b))}d==null&&(d=mQb(Y2b(a),b));return d} -function Ze(a,b){var c,d,e;if(ZD(b,44)){c=RD(b,44);d=c.ld();e=Xv(a.Rc(),d);return Hb(e,c.md())&&(e!=null||a.Rc()._b(d))}return false} -function $Nd(a,b){var c,d,e;if(a.f>0){a._j();d=b==null?0:tb(b);e=(d&lve)%a.d.length;c=WNd(a,e,d,b);if(c){return c.md()}}return null} -function qLd(a,b,c){var d,e,f;if(a.Pj()){d=a.i;f=a.Qj();KHd(a,d,b);e=a.Ij(3,null,b,d,f);!c?(c=e):c.nj(e)}else{KHd(a,a.i,b)}return c} -function f$d(a,b,c){var d,e;d=new P3d(a.e,4,10,(e=b.c,ZD(e,90)?RD(e,29):(JTd(),zTd)),null,fZd(a,b),false);!c?(c=d):c.nj(d);return c} -function e$d(a,b,c){var d,e;d=new P3d(a.e,3,10,null,(e=b.c,ZD(e,90)?RD(e,29):(JTd(),zTd)),fZd(a,b),false);!c?(c=d):c.nj(d);return c} -function SMb(a){RMb();var b;b=new sjd(RD(a.e.of((umd(),nld)),8));if(a.B.Hc((dqd(),Ypd))){b.a<=0&&(b.a=20);b.b<=0&&(b.b=20)}return b} -function jjb(a){Pib();var b,c;c=Ydb(a);b=Ydb(Udb(a,32));if(b!=0){return new bjb(c,b)}if(c>10||c<0){return new ajb(1,c)}return Lib[c]} -function Mdb(a,b){var c;if(Kdb(a)&&Kdb(b)){c=a%b;if(jxe=0){f=f.a[1]}else{e=f;f=f.a[0]}}return e} -function Qyb(a,b,c){var d,e,f;e=null;f=a.b;while(f){d=a.a.Ne(b,f.d);if(c&&d==0){return f}if(d<=0){f=f.a[0]}else{e=f;f=f.a[1]}}return e} -function rmc(a,b,c,d){var e,f,g;e=false;if(Lmc(a.f,c,d)){Omc(a.f,a.a[b][c],a.a[b][d]);f=a.a[b];g=f[d];f[d]=f[c];f[c]=g;e=true}return e} -function Nqc(a,b,c){var d,e,f,g;e=RD(Wjb(a.b,c),183);d=0;for(g=new Anb(b.j);g.a>5;b&=31;e=a.d+c+(b==0?0:1);d=$C(kE,Pwe,28,e,15,1);rjb(d,a.a,c,b);f=new cjb(a.e,e,d);Rib(f);return f} -function zGc(a,b){var c,d,e;for(d=new is(Mr(a3b(a).a.Kc(),new ir));gs(d);){c=RD(hs(d),18);e=c.d.i;if(e.c==b){return false}}return true} -function _Ec(a,b,c){var d,e,f,g,h;g=a.k;h=b.k;d=c[g.g][h.g];e=UD(hFc(a,d));f=UD(hFc(b,d));return $wnd.Math.max((uFb(e),e),(uFb(f),f))} -function lA(){if(Error.stackTraceLimit>0){$wnd.Error.stackTraceLimit=Error.stackTraceLimit=64;return true}return 'stack' in new Error} -function sGb(a,b){return Zy(),Zy(),bz(pwe),($wnd.Math.abs(a-b)<=pwe||a==b||isNaN(a)&&isNaN(b)?0:ab?1:cz(isNaN(a),isNaN(b)))>0} -function uGb(a,b){return Zy(),Zy(),bz(pwe),($wnd.Math.abs(a-b)<=pwe||a==b||isNaN(a)&&isNaN(b)?0:ab?1:cz(isNaN(a),isNaN(b)))<0} -function tGb(a,b){return Zy(),Zy(),bz(pwe),($wnd.Math.abs(a-b)<=pwe||a==b||isNaN(a)&&isNaN(b)?0:ab?1:cz(isNaN(a),isNaN(b)))<=0} -function Efb(a,b){var c=0;while(!b[c]||b[c]==''){c++}var d=b[c++];for(;c0&&this.b>0&&(this.g=Aad(this.c,this.b,this.a))} -function rC(f,a){var b=f.a;var c;a=String(a);b.hasOwnProperty(a)&&(c=b[a]);var d=(HC(),GC)[typeof c];var e=d?d(c):NC(typeof c);return e} -function uDd(a){var b,c,d;d=null;b=uIe in a.a;c=!b;if(c){throw Adb(new CDd('Every element must have an id.'))}d=tDd(qC(a,uIe));return d} -function Qqe(a){var b,c;c=Rqe(a);b=null;while(a.c==2){Mqe(a);if(!b){b=(Vse(),Vse(),++Use,new iue(2));hue(b,c);c=b}c.Jm(Rqe(a))}return c} -function jOd(a,b){var c,d,e;a._j();d=b==null?0:tb(b);e=(d&lve)%a.d.length;c=WNd(a,e,d,b);if(c){hOd(a,c);return c.md()}else{return null}} -function Qib(a,b){if(a.e>b.e){return 1}if(a.eb.d){return a.e}if(a.d=48&&a<48+$wnd.Math.min(10,10)){return a-48}if(a>=97&&a<97){return a-97+10}if(a>=65&&a<65){return a-65+10}return -1} -function UHc(a,b){if(b.c==a){return b.d}else if(b.d==a){return b.c}throw Adb(new agb('Input edge is not connected to the input port.'))} -function Fae(a){if(mhb(FGe,a)){return Geb(),Feb}else if(mhb(GGe,a)){return Geb(),Eeb}else{throw Adb(new agb('Expecting true or false'))}} -function jFb(a){switch(typeof(a)){case jve:return ohb(a);case ive:return Nfb(a);case hve:return Jeb(a);default:return a==null?0:kFb(a);}} -function mfd(a,b){if(a.a<0){throw Adb(new dgb('Did not call before(...) or after(...) before calling add(...).'))}tfd(a,a.a,b);return a} -function FId(a){EId();if(ZD(a,162)){return RD(Wjb(CId,zK),295).Rg(a)}if(Ujb(CId,rb(a))){return RD(Wjb(CId,rb(a)),295).Rg(a)}return null} -function Wwd(a){var b,c;if((a.Db&32)==0){c=(b=RD(Ywd(a,16),29),AYd(!b?a.ii():b)-AYd(a.ii()));c!=0&&$wd(a,32,$C(jJ,rve,1,c,5,1))}return a} -function $wd(a,b,c){var d;if((a.Db&b)!=0){if(c==null){Zwd(a,b)}else{d=Xwd(a,b);d==-1?(a.Eb=c):bD(SD(a.Eb),d,c)}}else c!=null&&Twd(a,b,c)} -function tTc(a,b,c,d){var e,f;if(b.c.length==0){return}e=pTc(c,d);f=oTc(b);FDb(PDb(new SDb(null,new Swb(f,1)),new CTc),new GTc(a,c,e,d))} -function rmb(a,b){var c,d,e,f;d=a.a.length-1;c=b-a.b&d;f=a.c-b&d;e=a.c-a.b&d;zmb(c=f){umb(a,b);return -1}else{vmb(a,b);return 1}} -function Hvd(a){var b,c,d;d=a.Jh();if(!d){b=0;for(c=a.Ph();c;c=c.Ph()){if(++b>wxe){return c.Qh()}d=c.Jh();if(!!d||c==a){break}}}return d} -function Ue(a,b){var c;if(dE(b)===dE(a)){return true}if(!ZD(b,21)){return false}c=RD(b,21);if(c.gc()!=a.gc()){return false}return a.Ic(c)} -function kNc(a,b){if(a.eb.e){return 1}else if(a.fb.f){return 1}return tb(a)-tb(b)} -function mhb(a,b){uFb(a);if(b==null){return false}if(lhb(a,b)){return true}return a.length==b.length&&lhb(a.toLowerCase(),b.toLowerCase())} -function Hgb(a){var b,c;if(Ddb(a,-129)>0&&Ddb(a,128)<0){return Jgb(),b=Ydb(a)+128,c=Igb[b],!c&&(c=Igb[b]=new zgb(a)),c}return new zgb(a)} -function U$b(){U$b=geb;T$b=new V$b(LAe,0);R$b=new V$b('INSIDE_PORT_SIDE_GROUPS',1);Q$b=new V$b('GROUP_MODEL_ORDER',2);S$b=new V$b(MAe,3)} -function ufe(a){var b;a.b||vfe(a,(b=Hee(a.e,a.a),!b||!lhb(GGe,$Nd((!b.b&&(b.b=new SVd((JTd(),FTd),C8,b)),b.b),'qualified'))));return a.c} -function BA(a,b){var c,d;c=(BFb(b,a.length),a.charCodeAt(b));d=b+1;while(d2000){Oz=a;Pz=$wnd.setTimeout(Yz,10)}}if(Nz++==0){_z(($z(),Zz));return true}return false} -function lBb(a,b,c){var d;(bBb?(jBb(a),true):cBb?(SAb(),true):fBb?(SAb(),true):eBb&&(SAb(),false))&&(d=new aBb(b),d.b=c,hBb(a,d),undefined)} -function oNb(a,b){var c;c=!a.A.Hc((Qpd(),Ppd))||a.q==(Bod(),wod);a.u.Hc((Pod(),Lod))?c?mNb(a,b):qNb(a,b):a.u.Hc(Nod)&&(c?nNb(a,b):rNb(a,b))} -function Bed(a){var b;if(dE(Gxd(a,(umd(),Xkd)))===dE((Fnd(),Dnd))){if(!vCd(a)){Ixd(a,Xkd,End)}else{b=RD(Gxd(vCd(a),Xkd),346);Ixd(a,Xkd,b)}}} -function _fc(a){var b,c;if(nQb(a.d.i,(yCc(),tBc))){b=RD(mQb(a.c.i,tBc),17);c=RD(mQb(a.d.i,tBc),17);return hgb(b.a,c.a)>0}else{return false}} -function g_b(a,b,c){return new Uid($wnd.Math.min(a.a,b.a)-c/2,$wnd.Math.min(a.b,b.b)-c/2,$wnd.Math.abs(a.a-b.a)+c,$wnd.Math.abs(a.b-b.b)+c)} -function _mc(a){var b;this.d=new bnb;this.j=new pjd;this.g=new pjd;b=a.g.b;this.f=RD(mQb(Y2b(b),(yCc(),rAc)),88);this.e=Kfb(UD(k2b(b,ZBc)))} -function onc(a){this.d=new bnb;this.e=new gub;this.c=$C(kE,Pwe,28,(qpd(),cD(WC(E3,1),NAe,64,0,[opd,Yod,Xod,npd,ppd])).length,15,1);this.b=a} -function $pc(a,b,c){var d;d=c[a.g][b];switch(a.g){case 1:case 3:return new rjd(0,d);case 2:case 4:return new rjd(d,0);default:return null;}} -function Ced(b,c,d){var e,f;f=RD(ltd(c.f),205);try{f.rf(b,d);mtd(c.f,f)}catch(a){a=zdb(a);if(ZD(a,103)){e=a;throw Adb(e)}else throw Adb(a)}} -function tEd(a,b,c){var d,e,f,g,h,i;d=null;h=vgd(ygd(),b);f=null;if(h){e=null;i=zhd(h,c);g=null;i!=null&&(g=a.qf(h,i));e=g;f=e}d=f;return d} -function sSd(a,b,c,d){var e;e=a.length;if(b>=e)return e;for(b=b>0?b:0;bd&&bD(b,d,null);return b} -function lob(a,b){var c,d;d=a.a.length;b.lengthd&&bD(b,d,null);return b} -function Bde(a,b){var c,d;++a.j;if(b!=null){c=(d=a.a.Cb,ZD(d,99)?RD(d,99).th():null);if(Jnb(b,c)){$wd(a.a,4,c);return}}$wd(a.a,4,RD(b,129))} -function mne(a){var b;if(a==null)return null;b=Hqe(nue(a,true));if(b==null){throw Adb(new Mle("Invalid hexBinary value: '"+a+"'"))}return b} -function wA(a,b,c){var d;if(b.a.length>0){Rmb(a.b,new kB(b.a,c));d=b.a.length;0d&&(b.a+=Hhb($C(hE,zwe,28,-d,15,1)))}} -function yIb(a,b,c){var d,e,f;if(c[b.d]){return}c[b.d]=true;for(e=new Anb(CIb(b));e.a=a.b>>1){d=a.c;for(c=a.b;c>b;--c){d=d.b}}else{d=a.a.a;for(c=0;c=0?a.Wh(e):Rvd(a,d)):c<0?Rvd(a,d):RD(d,69).wk().Bk(a,a.hi(),c)} -function Fxd(a){var b,c,d;d=(!a.o&&(a.o=new DVd((pvd(),mvd),X4,a,0)),a.o);for(c=d.c.Kc();c.e!=c.i.gc();){b=RD(c.Yj(),44);b.md()}return dOd(d)} -function iGd(a){var b;if(ZD(a.a,4)){b=FId(a.a);if(b==null){throw Adb(new dgb(HGe+a.b+"'. "+DGe+(lfb(b6),b6.k)+EGe))}return b}else{return a.a}} -function iSd(a,b){var c,d;if(a.j.length!=b.j.length)return false;for(c=0,d=a.j.length;c=64&&b<128&&(e=Rdb(e,Sdb(1,b-64)))}return e} -function k2b(a,b){var c,d;d=null;if(nQb(a,(umd(),amd))){c=RD(mQb(a,amd),96);c.pf(b)&&(d=c.of(b))}d==null&&!!Y2b(a)&&(d=mQb(Y2b(a),b));return d} -function i0b(a,b){var c;c=RD(mQb(a,(yCc(),RAc)),75);if(br(b,f0b)){if(!c){c=new Ejd;pQb(a,RAc,c)}else{Xub(c)}}else !!c&&pQb(a,RAc,null);return c} -function tSb(){tSb=geb;sSb=(umd(),Yld);mSb=Ukd;hSb=Dkd;nSb=tld;qSb=(YHb(),UHb);pSb=SHb;rSb=WHb;oSb=RHb;jSb=(eSb(),aSb);iSb=_Rb;kSb=cSb;lSb=dSb} -function PZb(a){NZb();this.c=new bnb;this.d=a;switch(a.g){case 0:case 2:this.a=Fob(MZb);this.b=oxe;break;case 3:case 1:this.a=MZb;this.b=pxe;}} -function c9b(a){var b;if(!Cod(RD(mQb(a,(yCc(),BBc)),101))){return}b=a.b;d9b((tFb(0,b.c.length),RD(b.c[0],30)));d9b(RD(Vmb(b,b.c.length-1),30))} -function ohc(a,b){b.Ug('Self-Loop post-processing',1);FDb(CDb(CDb(EDb(new SDb(null,new Swb(a.b,16)),new uhc),new whc),new yhc),new Ahc);b.Vg()} -function xrd(a,b,c){var d,e;if(a.c){Dyd(a.c,a.c.i+b);Eyd(a.c,a.c.j+c)}else{for(e=new Anb(a.b);e.a=0&&(c.d=a.t);break;case 3:a.t>=0&&(c.a=a.t);}if(a.C){c.b=a.C.b;c.c=a.C.c}} -function JDc(){JDc=geb;IDc=new LDc(mEe,0);FDc=new LDc(BBe,1);GDc=new LDc('LINEAR_SEGMENTS',2);EDc=new LDc('BRANDES_KOEPF',3);HDc=new LDc(lEe,4)} -function IRb(){IRb=geb;FRb=new JRb(_ye,0);ERb=new JRb(aze,1);GRb=new JRb(bze,2);HRb=new JRb(cze,3);FRb.a=false;ERb.a=true;GRb.a=false;HRb.a=true} -function IPb(){IPb=geb;FPb=new JPb(_ye,0);EPb=new JPb(aze,1);GPb=new JPb(bze,2);HPb=new JPb(cze,3);FPb.a=false;EPb.a=true;GPb.a=false;HPb.a=true} -function Ivd(a,b,c,d){var e;if(c>=0){return a.Sh(b,c,d)}else{!!a.Ph()&&(d=(e=a.Fh(),e>=0?a.Ah(d):a.Ph().Th(a,-1-e,null,d)));return a.Ch(b,c,d)}} -function Zyd(a,b){switch(b){case 7:!a.e&&(a.e=new Yie(G4,a,7,4));sLd(a.e);return;case 8:!a.d&&(a.d=new Yie(G4,a,8,5));sLd(a.d);return;}yyd(a,b)} -function Ixd(a,b,c){c==null?(!a.o&&(a.o=new DVd((pvd(),mvd),X4,a,0)),jOd(a.o,b)):(!a.o&&(a.o=new DVd((pvd(),mvd),X4,a,0)),fOd(a.o,b,c));return a} -function Aob(a,b){yob();var c,d,e,f;c=a;f=b;if(ZD(a,21)&&!ZD(b,21)){c=b;f=a}for(e=c.Kc();e.Ob();){d=e.Pb();if(f.Hc(d)){return false}}return true} -function qTc(a,b,c,d){if(b.ac.b){return true}}}return false} -function QD(a,b){if(bE(a)){return !!PD[b]}else if(a.Sm){return !!a.Sm[b]}else if(_D(a)){return !!OD[b]}else if($D(a)){return !!ND[b]}return false} -function udc(a){var b;b=a.a;do{b=RD(hs(new is(Mr(Z2b(b).a.Kc(),new ir))),18).c.i;b.k==(r3b(),o3b)&&a.b.Fc(b)}while(b.k==(r3b(),o3b));a.b=hv(a.b)} -function UGc(a,b){var c,d,e;e=a;for(d=new is(Mr(Z2b(b).a.Kc(),new ir));gs(d);){c=RD(hs(d),18);!!c.c.i.c&&(e=$wnd.Math.max(e,c.c.i.c.p))}return e} -function INb(a,b){var c,d,e;e=0;d=RD(RD(Qc(a.r,b),21),87).Kc();while(d.Ob()){c=RD(d.Pb(),117);e+=c.d.d+c.b.Mf().b+c.d.a;d.Ob()&&(e+=a.w)}return e} -function AMb(a,b){var c,d,e;e=0;d=RD(RD(Qc(a.r,b),21),87).Kc();while(d.Ob()){c=RD(d.Pb(),117);e+=c.d.b+c.b.Mf().a+c.d.c;d.Ob()&&(e+=a.w)}return e} -function O2c(a){var b,c,d,e;d=0;e=Q2c(a);if(e.c.length==0){return 1}else{for(c=new Anb(e);c.a=0?a.Lh(g,c,true):Qvd(a,f,c)):RD(f,69).wk().yk(a,a.hi(),e,c,d)} -function aNb(a,b,c,d){var e,f;f=b.pf((umd(),ild))?RD(b.of(ild),21):a.j;e=lMb(f);if(e==(hMb(),gMb)){return}if(c&&!jMb(e)){return}LKb(cNb(a,e,d),b)} -function Y6b(a){switch(a.g){case 1:return mOb(),lOb;case 3:return mOb(),iOb;case 2:return mOb(),kOb;case 4:return mOb(),jOb;default:return null;}} -function kmc(a,b,c){if(a.e){switch(a.b){case 1:Ulc(a.c,b,c);break;case 0:Vlc(a.c,b,c);}}else{Slc(a.c,b,c)}a.a[b.p][c.p]=a.c.i;a.a[c.p][b.p]=a.c.e} -function LLc(a){var b,c;if(a==null){return null}c=$C(jR,Nve,199,a.length,0,2);for(b=0;b=0)return e;if(a.ol()){for(d=0;d=e)throw Adb(new aMd(b,e));if(a.Si()){d=a.dd(c);if(d>=0&&d!=b){throw Adb(new agb(LIe))}}return a.Xi(b,c)} -function wx(a,b){this.a=RD(Qb(a),253);this.b=RD(Qb(b),253);if(a.Ed(b)>0||a==(Wk(),Vk)||b==(kl(),jl)){throw Adb(new agb('Invalid range: '+Dx(a,b)))}} -function p_b(a){var b,c;this.b=new bnb;this.c=a;this.a=false;for(c=new Anb(a.a);c.a0);if((b&-b)==b){return eE(b*Kwb(a,31)*4.6566128730773926E-10)}do{c=Kwb(a,31);d=c%b}while(c-d+(b-1)<0);return eE(d)} -function d2b(a,b,c){switch(c.g){case 1:a.a=b.a/2;a.b=0;break;case 2:a.a=b.a;a.b=b.b/2;break;case 3:a.a=b.a/2;a.b=b.b;break;case 4:a.a=0;a.b=b.b/2;}} -function Onc(a,b,c,d){var e,f;for(e=b;e1&&(f=xIb(a,b));return f} -function yqd(a){var b;b=Kfb(UD(Gxd(a,(umd(),lmd))))*$wnd.Math.sqrt((!a.a&&(a.a=new C5d(J4,a,10,11)),a.a).i);return new rjd(b,b/Kfb(UD(Gxd(a,kmd))))} -function Dzd(a){var b;if(!!a.f&&a.f.Vh()){b=RD(a.f,54);a.f=RD(Vvd(a,b),84);a.f!=b&&(a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new N3d(a,9,8,b,a.f))}return a.f} -function Ezd(a){var b;if(!!a.i&&a.i.Vh()){b=RD(a.i,54);a.i=RD(Vvd(a,b),84);a.i!=b&&(a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new N3d(a,9,7,b,a.i))}return a.i} -function Z5d(a){var b;if(!!a.b&&(a.b.Db&64)!=0){b=a.b;a.b=RD(Vvd(a,b),19);a.b!=b&&(a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new N3d(a,9,21,b,a.b))}return a.b} -function UNd(a,b){var c,d,e;if(a.d==null){++a.e;++a.f}else{d=b.Bi();_Nd(a,a.f+1);e=(d&lve)%a.d.length;c=a.d[e];!c&&(c=a.d[e]=a.dk());c.Fc(b);++a.f}} -function Mge(a,b,c){var d;if(b.tk()){return false}else if(b.Ik()!=-2){d=b.ik();return d==null?c==null:pb(d,c)}else return b.qk()==a.e.Dh()&&c==null} -function Io(){var a;dk(16,fwe);a=Wp(16);this.b=$C(XF,ewe,303,a,0,1);this.c=$C(XF,ewe,303,a,0,1);this.a=null;this.e=null;this.i=0;this.f=a-1;this.g=0} -function j3b(a){v2b.call(this);this.k=(r3b(),p3b);this.j=(dk(6,iwe),new cnb(6));this.b=(dk(2,iwe),new cnb(2));this.d=new T2b;this.f=new C3b;this.a=a} -function wgc(a){var b,c;if(a.c.length<=1){return}b=tgc(a,(qpd(),npd));vgc(a,RD(b.a,17).a,RD(b.b,17).a);c=tgc(a,ppd);vgc(a,RD(c.a,17).a,RD(c.b,17).a)} -function vHc(a,b,c){var d,e;e=a.a.b;for(d=e.c.length;d102)return -1;if(a<=57)return a-48;if(a<65)return -1;if(a<=70)return a-65+10;if(a<97)return -1;return a-97+10} -function ck(a,b){if(a==null){throw Adb(new Ogb('null key in entry: null='+b))}else if(b==null){throw Adb(new Ogb('null value in entry: '+a+'=null'))}} -function Cr(a,b){var c,d;while(a.Ob()){if(!b.Ob()){return false}c=a.Pb();d=b.Pb();if(!(dE(c)===dE(d)||c!=null&&pb(c,d))){return false}}return !b.Ob()} -function aLb(a,b){var c;c=cD(WC(iE,1),vxe,28,15,[gKb(a.a[0],b),gKb(a.a[1],b),gKb(a.a[2],b)]);if(a.d){c[0]=$wnd.Math.max(c[0],c[2]);c[2]=c[0]}return c} -function bLb(a,b){var c;c=cD(WC(iE,1),vxe,28,15,[hKb(a.a[0],b),hKb(a.a[1],b),hKb(a.a[2],b)]);if(a.d){c[0]=$wnd.Math.max(c[0],c[2]);c[2]=c[0]}return c} -function vIc(a,b,c){if(!Cod(RD(mQb(b,(yCc(),BBc)),101))){uIc(a,b,e3b(b,c));uIc(a,b,e3b(b,(qpd(),npd)));uIc(a,b,e3b(b,Yod));yob();_mb(b.j,new JIc(a))}} -function sUc(a){var b,c;a.c||vUc(a);c=new Ejd;b=new Anb(a.a);ynb(b);while(b.a0&&(BFb(0,b.length),b.charCodeAt(0)==43)?(BFb(1,b.length+1),b.substr(1)):b))} -function qne(a){var b;return a==null?null:new ejb((b=nue(a,true),b.length>0&&(BFb(0,b.length),b.charCodeAt(0)==43)?(BFb(1,b.length+1),b.substr(1)):b))} -function Syb(a,b,c,d,e,f,g,h){var i,j;if(!d){return}i=d.a[0];!!i&&Syb(a,b,c,i,e,f,g,h);Tyb(a,c,d.d,e,f,g,h)&&b.Fc(d);j=d.a[1];!!j&&Syb(a,b,c,j,e,f,g,h)} -function PPb(b,c,d){try{return Gdb(SPb(b,c,d),1)}catch(a){a=zdb(a);if(ZD(a,333)){throw Adb(new veb(fze+b.o+'*'+b.p+gze+c+pve+d+hze))}else throw Adb(a)}} -function QPb(b,c,d){try{return Gdb(SPb(b,c,d),0)}catch(a){a=zdb(a);if(ZD(a,333)){throw Adb(new veb(fze+b.o+'*'+b.p+gze+c+pve+d+hze))}else throw Adb(a)}} -function RPb(b,c,d){try{return Gdb(SPb(b,c,d),2)}catch(a){a=zdb(a);if(ZD(a,333)){throw Adb(new veb(fze+b.o+'*'+b.p+gze+c+pve+d+hze))}else throw Adb(a)}} -function lMd(b,c){if(b.g==-1){throw Adb(new cgb)}b.Xj();try{b.d.hd(b.g,c);b.f=b.d.j}catch(a){a=zdb(a);if(ZD(a,77)){throw Adb(new Jrb)}else throw Adb(a)}} -function Y7b(a){var b,c,d,e,f;for(d=new Anb(a.b);d.af&&bD(b,f,null);return b} -function av(a,b){var c,d;d=a.gc();if(b==null){for(c=0;c0&&(i+=e);j[k]=g;g+=h*(i+d)}} -function vsc(a){var b,c,d;d=a.f;a.n=$C(iE,vxe,28,d,15,1);a.d=$C(iE,vxe,28,d,15,1);for(b=0;b0?a.c:0);++e}a.b=d;a.d=f} -function rKb(a,b){var c;c=cD(WC(iE,1),vxe,28,15,[qKb(a,(ZJb(),WJb),b),qKb(a,XJb,b),qKb(a,YJb,b)]);if(a.f){c[0]=$wnd.Math.max(c[0],c[2]);c[2]=c[0]}return c} -function cQb(b,c,d){var e;try{TPb(b,c+b.j,d+b.k,false,true)}catch(a){a=zdb(a);if(ZD(a,77)){e=a;throw Adb(new veb(e.g+ize+c+pve+d+').'))}else throw Adb(a)}} -function dQb(b,c,d){var e;try{TPb(b,c+b.j,d+b.k,true,false)}catch(a){a=zdb(a);if(ZD(a,77)){e=a;throw Adb(new veb(e.g+ize+c+pve+d+').'))}else throw Adb(a)}} -function u8b(a){var b;if(!nQb(a,(yCc(),dBc))){return}b=RD(mQb(a,dBc),21);if(b.Hc((dod(),Xnd))){b.Mc(Xnd);b.Fc(Znd)}else if(b.Hc(Znd)){b.Mc(Znd);b.Fc(Xnd)}} -function v8b(a){var b;if(!nQb(a,(yCc(),dBc))){return}b=RD(mQb(a,dBc),21);if(b.Hc((dod(),cod))){b.Mc(cod);b.Fc(aod)}else if(b.Hc(aod)){b.Mc(aod);b.Fc(cod)}} -function oqc(a,b,c,d){var e,f,g,h;a.a==null&&rqc(a,b);g=b.b.j.c.length;f=c.d.p;h=d.d.p;e=h-1;e<0&&(e=g-1);return f<=e?a.a[e]-a.a[f]:a.a[g-1]-a.a[f]+a.a[e]} -function Cud(a){var b,c;if(!a.b){a.b=fv(RD(a.f,27).kh().i);for(c=new dMd(RD(a.f,27).kh());c.e!=c.i.gc();){b=RD(bMd(c),135);Rmb(a.b,new Bud(b))}}return a.b} -function Dud(a){var b,c;if(!a.e){a.e=fv(wCd(RD(a.f,27)).i);for(c=new dMd(wCd(RD(a.f,27)));c.e!=c.i.gc();){b=RD(bMd(c),123);Rmb(a.e,new Rud(b))}}return a.e} -function yud(a){var b,c;if(!a.a){a.a=fv(tCd(RD(a.f,27)).i);for(c=new dMd(tCd(RD(a.f,27)));c.e!=c.i.gc();){b=RD(bMd(c),27);Rmb(a.a,new Fud(a,b))}}return a.a} -function DXd(b){var c;if(!b.C&&(b.D!=null||b.B!=null)){c=EXd(b);if(c){b.hl(c)}else{try{b.hl(null)}catch(a){a=zdb(a);if(!ZD(a,63))throw Adb(a)}}}return b.C} -function xMb(a){switch(a.q.g){case 5:uMb(a,(qpd(),Yod));uMb(a,npd);break;case 4:vMb(a,(qpd(),Yod));vMb(a,npd);break;default:wMb(a,(qpd(),Yod));wMb(a,npd);}} -function GNb(a){switch(a.q.g){case 5:DNb(a,(qpd(),Xod));DNb(a,ppd);break;case 4:ENb(a,(qpd(),Xod));ENb(a,ppd);break;default:FNb(a,(qpd(),Xod));FNb(a,ppd);}} -function G$b(a,b){var c,d,e;e=new pjd;for(d=a.Kc();d.Ob();){c=RD(d.Pb(),36);w$b(c,e.a,0);e.a+=c.f.a+b;e.b=$wnd.Math.max(e.b,c.f.b)}e.b>0&&(e.b+=b);return e} -function I$b(a,b){var c,d,e;e=new pjd;for(d=a.Kc();d.Ob();){c=RD(d.Pb(),36);w$b(c,0,e.b);e.b+=c.f.b+b;e.a=$wnd.Math.max(e.a,c.f.a)}e.a>0&&(e.a+=b);return e} -function l2b(a){var b,c,d;d=lve;for(c=new Anb(a.a);c.a>16==6){return a.Cb.Th(a,5,t7,b)}return d=Z5d(RD(vYd((c=RD(Ywd(a,16),29),!c?a.ii():c),a.Db>>16),19)),a.Cb.Th(a,d.n,d.f,b)} -function kA(a){fA();var b=a.e;if(b&&b.stack){var c=b.stack;var d=b+'\n';c.substring(0,d.length)==d&&(c=c.substring(d.length));return c.split('\n')}return []} -function pgb(a){var b;b=(wgb(),vgb);return b[a>>>28]|b[a>>24&15]<<4|b[a>>20&15]<<8|b[a>>16&15]<<12|b[a>>12&15]<<16|b[a>>8&15]<<20|b[a>>4&15]<<24|b[a&15]<<28} -function mmb(a){var b,c,d;if(a.b!=a.c){return}d=a.a.length;c=mgb($wnd.Math.max(8,d))<<1;if(a.b!=0){b=WEb(a.a,c);lmb(a,b,d);a.a=b;a.b=0}else{aFb(a.a,c)}a.c=d} -function uNb(a,b){var c;c=a.b;return c.pf((umd(),Gld))?c.ag()==(qpd(),ppd)?-c.Mf().a-Kfb(UD(c.of(Gld))):b+Kfb(UD(c.of(Gld))):c.ag()==(qpd(),ppd)?-c.Mf().a:b} -function X2b(a){var b;if(a.b.c.length!=0&&!!RD(Vmb(a.b,0),72).a){return RD(Vmb(a.b,0),72).a}b=R0b(a);if(b!=null){return b}return ''+(!a.c?-1:Wmb(a.c.a,a,0))} -function M3b(a){var b;if(a.f.c.length!=0&&!!RD(Vmb(a.f,0),72).a){return RD(Vmb(a.f,0),72).a}b=R0b(a);if(b!=null){return b}return ''+(!a.i?-1:Wmb(a.i.j,a,0))} -function skc(a,b){var c,d;if(b<0||b>=a.gc()){return null}for(c=b;c0?a.c:0);e=$wnd.Math.max(e,b.d);++d}a.e=f;a.b=e} -function Qud(a){var b,c;if(!a.b){a.b=fv(RD(a.f,123).kh().i);for(c=new dMd(RD(a.f,123).kh());c.e!=c.i.gc();){b=RD(bMd(c),135);Rmb(a.b,new Bud(b))}}return a.b} -function aHd(a,b){var c,d,e;if(b.dc()){return jQd(),jQd(),iQd}else{c=new ZLd(a,b.gc());for(e=new dMd(a);e.e!=e.i.gc();){d=bMd(e);b.Hc(d)&&WGd(c,d)}return c}} -function Axd(a,b,c,d){if(b==0){return d?(!a.o&&(a.o=new DVd((pvd(),mvd),X4,a,0)),a.o):(!a.o&&(a.o=new DVd((pvd(),mvd),X4,a,0)),dOd(a.o))}return Dvd(a,b,c,d)} -function rBd(a){var b,c;if(a.rb){for(b=0,c=a.rb.i;b>22);e+=d>>22;if(e<0){return false}a.l=c&dxe;a.m=d&dxe;a.h=e&exe;return true} -function Tyb(a,b,c,d,e,f,g){var h,i;if(b.Te()&&(i=a.a.Ne(c,d),i<0||!e&&i==0)){return false}if(b.Ue()&&(h=a.a.Ne(c,f),h>0||!g&&h==0)){return false}return true} -function Agc(a,b){sgc();var c;c=a.j.g-b.j.g;if(c!=0){return 0}switch(a.j.g){case 2:return Cgc(b,rgc)-Cgc(a,rgc);case 4:return Cgc(a,qgc)-Cgc(b,qgc);}return 0} -function uuc(a){switch(a.g){case 0:return nuc;case 1:return ouc;case 2:return puc;case 3:return quc;case 4:return ruc;case 5:return suc;default:return null;}} -function cBd(a,b,c){var d,e;d=(e=new R5d,YVd(e,b),PAd(e,c),WGd((!a.c&&(a.c=new C5d(u7,a,12,10)),a.c),e),e);$Vd(d,0);bWd(d,1);aWd(d,true);_Vd(d,true);return d} -function THd(a,b){var c,d;if(b>=a.i)throw Adb(new yNd(b,a.i));++a.j;c=a.g[b];d=a.i-b-1;d>0&&hib(a.g,b+1,a.g,b,d);bD(a.g,--a.i,null);a.Qi(b,c);a.Ni();return c} -function sWd(a,b){var c,d;if(a.Db>>16==17){return a.Cb.Th(a,21,h7,b)}return d=Z5d(RD(vYd((c=RD(Ywd(a,16),29),!c?a.ii():c),a.Db>>16),19)),a.Cb.Th(a,d.n,d.f,b)} -function _Fb(a){var b,c,d,e;yob();_mb(a.c,a.a);for(e=new Anb(a.c);e.ac.a.c.length)){throw Adb(new agb('index must be >= 0 and <= layer node count'))}!!a.c&&Ymb(a.c.a,a);a.c=c;!!c&&Qmb(c.a,b,a)} -function Gac(a,b){var c,d,e;for(d=new is(Mr(W2b(a).a.Kc(),new ir));gs(d);){c=RD(hs(d),18);e=RD(b.Kb(c),10);return new cc(Qb(e.n.b+e.o.b/2))}return wb(),wb(),vb} -function RQc(a,b){this.c=new Tsb;this.a=a;this.b=b;this.d=RD(mQb(a,(Ywc(),Qwc)),312);dE(mQb(a,(yCc(),eBc)))===dE((Cuc(),Auc))?(this.e=new BRc):(this.e=new uRc)} -function ftd(a,b){var c,d;d=null;if(a.pf((umd(),amd))){c=RD(a.of(amd),96);c.pf(b)&&(d=c.of(b))}d==null&&!!a.Tf()&&(d=a.Tf().of(b));d==null&&(d=iGd(b));return d} -function ku(b,c){var d,e;d=b.fd(c);try{e=d.Pb();d.Qb();return e}catch(a){a=zdb(a);if(ZD(a,112)){throw Adb(new veb("Can't remove element "+c))}else throw Adb(a)}} -function GA(a,b){var c,d,e;d=new uB;e=new vB(d.q.getFullYear()-Owe,d.q.getMonth(),d.q.getDate());c=FA(a,b,e);if(c==0||c0?b:0);++c}return new rjd(d,e)} -function Czd(a,b){var c,d;if(a.Db>>16==6){return a.Cb.Th(a,6,G4,b)}return d=Z5d(RD(vYd((c=RD(Ywd(a,16),29),!c?(pvd(),hvd):c),a.Db>>16),19)),a.Cb.Th(a,d.n,d.f,b)} -function cCd(a,b){var c,d;if(a.Db>>16==7){return a.Cb.Th(a,1,H4,b)}return d=Z5d(RD(vYd((c=RD(Ywd(a,16),29),!c?(pvd(),jvd):c),a.Db>>16),19)),a.Cb.Th(a,d.n,d.f,b)} -function LCd(a,b){var c,d;if(a.Db>>16==9){return a.Cb.Th(a,9,J4,b)}return d=Z5d(RD(vYd((c=RD(Ywd(a,16),29),!c?(pvd(),lvd):c),a.Db>>16),19)),a.Cb.Th(a,d.n,d.f,b)} -function M1d(a,b){var c,d;if(a.Db>>16==5){return a.Cb.Th(a,9,m7,b)}return d=Z5d(RD(vYd((c=RD(Ywd(a,16),29),!c?(JTd(),tTd):c),a.Db>>16),19)),a.Cb.Th(a,d.n,d.f,b)} -function qBd(a,b){var c,d;if(a.Db>>16==7){return a.Cb.Th(a,6,t7,b)}return d=Z5d(RD(vYd((c=RD(Ywd(a,16),29),!c?(JTd(),CTd):c),a.Db>>16),19)),a.Cb.Th(a,d.n,d.f,b)} -function iVd(a,b){var c,d;if(a.Db>>16==3){return a.Cb.Th(a,0,p7,b)}return d=Z5d(RD(vYd((c=RD(Ywd(a,16),29),!c?(JTd(),mTd):c),a.Db>>16),19)),a.Cb.Th(a,d.n,d.f,b)} -function IEd(){this.a=new BDd;this.g=new Io;this.j=new Io;this.b=new Tsb;this.d=new Io;this.i=new Io;this.k=new Tsb;this.c=new Tsb;this.e=new Tsb;this.f=new Tsb} -function kQd(a,b,c){var d,e,f;c<0&&(c=0);f=a.i;for(e=c;ewxe){return Oje(a,d)}if(d==a){return true}}}return false} -function yNb(a){tNb();switch(a.q.g){case 5:vNb(a,(qpd(),Yod));vNb(a,npd);break;case 4:wNb(a,(qpd(),Yod));wNb(a,npd);break;default:xNb(a,(qpd(),Yod));xNb(a,npd);}} -function CNb(a){tNb();switch(a.q.g){case 5:zNb(a,(qpd(),Xod));zNb(a,ppd);break;case 4:ANb(a,(qpd(),Xod));ANb(a,ppd);break;default:BNb(a,(qpd(),Xod));BNb(a,ppd);}} -function RTb(a){var b,c;b=RD(mQb(a,(yVb(),mVb)),17);if(b){c=b.a;c==0?pQb(a,(JVb(),IVb),new Owb):pQb(a,(JVb(),IVb),new Pwb(c))}else{pQb(a,(JVb(),IVb),new Pwb(1))}} -function b2b(a,b){var c;c=a.i;switch(b.g){case 1:return -(a.n.b+a.o.b);case 2:return a.n.a-c.o.a;case 3:return a.n.b-c.o.b;case 4:return -(a.n.a+a.o.a);}return 0} -function wec(a,b){switch(a.g){case 0:return b==(cxc(),$wc)?sec:tec;case 1:return b==(cxc(),$wc)?sec:rec;case 2:return b==(cxc(),$wc)?rec:tec;default:return rec;}} -function Fad(a,b){var c,d,e;Ymb(a.a,b);a.e-=b.r+(a.a.c.length==0?0:a.c);e=fFe;for(d=new Anb(a.a);d.a>16==3){return a.Cb.Th(a,12,J4,b)}return d=Z5d(RD(vYd((c=RD(Ywd(a,16),29),!c?(pvd(),gvd):c),a.Db>>16),19)),a.Cb.Th(a,d.n,d.f,b)} -function sCd(a,b){var c,d;if(a.Db>>16==11){return a.Cb.Th(a,10,J4,b)}return d=Z5d(RD(vYd((c=RD(Ywd(a,16),29),!c?(pvd(),kvd):c),a.Db>>16),19)),a.Cb.Th(a,d.n,d.f,b)} -function n4d(a,b){var c,d;if(a.Db>>16==10){return a.Cb.Th(a,11,h7,b)}return d=Z5d(RD(vYd((c=RD(Ywd(a,16),29),!c?(JTd(),ATd):c),a.Db>>16),19)),a.Cb.Th(a,d.n,d.f,b)} -function Q5d(a,b){var c,d;if(a.Db>>16==10){return a.Cb.Th(a,12,s7,b)}return d=Z5d(RD(vYd((c=RD(Ywd(a,16),29),!c?(JTd(),DTd):c),a.Db>>16),19)),a.Cb.Th(a,d.n,d.f,b)} -function WVd(a){var b;if((a.Bb&1)==0&&!!a.r&&a.r.Vh()){b=RD(a.r,54);a.r=RD(Vvd(a,b),142);a.r!=b&&(a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new N3d(a,9,8,b,a.r))}return a.r} -function pKb(a,b,c){var d;d=cD(WC(iE,1),vxe,28,15,[sKb(a,(ZJb(),WJb),b,c),sKb(a,XJb,b,c),sKb(a,YJb,b,c)]);if(a.f){d[0]=$wnd.Math.max(d[0],d[2]);d[2]=d[0]}return d} -function ddc(a,b){var c,d,e;e=kdc(a,b);if(e.c.length==0){return}_mb(e,new Gdc);c=e.c.length;for(d=0;d>19;j=b.h>>19;if(i!=j){return j-i}e=a.h;h=b.h;if(e!=h){return e-h}d=a.m;g=b.m;if(d!=g){return d-g}c=a.l;f=b.l;return c-f} -function YHb(){YHb=geb;XHb=(iIb(),fIb);WHb=new lGd(Aye,XHb);VHb=(LHb(),KHb);UHb=new lGd(Bye,VHb);THb=(DHb(),CHb);SHb=new lGd(Cye,THb);RHb=new lGd(Dye,(Geb(),true))} -function Iic(a,b,c){var d,e;d=b*c;if(ZD(a.g,154)){e=$jc(a);if(e.f.d){e.f.a||(a.d.a+=d+Tye)}else{a.d.d-=d+Tye;a.d.a+=d+Tye}}else if(ZD(a.g,10)){a.d.d-=d;a.d.a+=2*d}} -function _pc(a,b,c){var d,e,f,g,h;e=a[c.g];for(h=new Anb(b.d);h.a0?a.b:0);++c}b.b=d;b.e=e} -function Fo(a){var b,c,d;d=a.b;if(Xp(a.i,d.length)){c=d.length*2;a.b=$C(XF,ewe,303,c,0,1);a.c=$C(XF,ewe,303,c,0,1);a.f=c-1;a.i=0;for(b=a.a;b;b=b.c){Bo(a,b,b)}++a.g}} -function VPb(a,b,c,d){var e,f,g,h;for(e=0;eg&&(h=g/d);e>f&&(i=f/e);ijd(a,$wnd.Math.min(h,i));return a} -function OAd(){qAd();var b,c;try{c=RD(M5d((YSd(),XSd),$He),2113);if(c){return c}}catch(a){a=zdb(a);if(ZD(a,103)){b=a;UId((Hde(),b))}else throw Adb(a)}return new KAd} -function Qae(){qAd();var b,c;try{c=RD(M5d((YSd(),XSd),AKe),2040);if(c){return c}}catch(a){a=zdb(a);if(ZD(a,103)){b=a;UId((Hde(),b))}else throw Adb(a)}return new Mae} -function vne(){Zme();var b,c;try{c=RD(M5d((YSd(),XSd),dLe),2122);if(c){return c}}catch(a){a=zdb(a);if(ZD(a,103)){b=a;UId((Hde(),b))}else throw Adb(a)}return new rne} -function f2d(a,b,c){var d,e;e=a.e;a.e=b;if((a.Db&4)!=0&&(a.Db&1)==0){d=new N3d(a,1,4,e,b);!c?(c=d):c.nj(d)}e!=b&&(b?(c=o2d(a,k2d(a,b),c)):(c=o2d(a,a.a,c)));return c} -function DB(){uB.call(this);this.e=-1;this.a=false;this.p=qwe;this.k=-1;this.c=-1;this.b=-1;this.g=false;this.f=-1;this.j=-1;this.n=-1;this.i=-1;this.d=-1;this.o=qwe} -function hHb(a,b){var c,d,e;d=a.b.d.d;a.a||(d+=a.b.d.a);e=b.b.d.d;b.a||(e+=b.b.d.a);c=Qfb(d,e);if(c==0){if(!a.a&&b.a){return -1}else if(!b.a&&a.a){return 1}}return c} -function XQb(a,b){var c,d,e;d=a.b.b.d;a.a||(d+=a.b.b.a);e=b.b.b.d;b.a||(e+=b.b.b.a);c=Qfb(d,e);if(c==0){if(!a.a&&b.a){return -1}else if(!b.a&&a.a){return 1}}return c} -function RYb(a,b){var c,d,e;d=a.b.g.d;a.a||(d+=a.b.g.a);e=b.b.g.d;b.a||(e+=b.b.g.a);c=Qfb(d,e);if(c==0){if(!a.a&&b.a){return -1}else if(!b.a&&a.a){return 1}}return c} -function _Wb(){_Wb=geb;YWb=nfd(pfd(pfd(pfd(new ufd,(sXb(),qXb),(hcc(),Dbc)),qXb,Hbc),rXb,Obc),rXb,rbc);$Wb=pfd(pfd(new ufd,qXb,hbc),qXb,sbc);ZWb=nfd(new ufd,rXb,ubc)} -function J6b(a){var b,c,d,e,f;b=RD(mQb(a,(Ywc(),cwc)),85);f=a.n;for(d=b.Cc().Kc();d.Ob();){c=RD(d.Pb(),314);e=c.i;e.c+=f.a;e.d+=f.b;c.c?MKb(c):OKb(c)}pQb(a,cwc,null)} -function Wpc(a,b,c){var d,e;e=a.b;d=e.d;switch(b.g){case 1:return -d.d-c;case 2:return e.o.a+d.c+c;case 3:return e.o.b+d.a+c;case 4:return -d.b-c;default:return -1;}} -function CNc(a,b,c){var d,e;c.Ug('Interactive node placement',1);a.a=RD(mQb(b,(Ywc(),Qwc)),312);for(e=new Anb(b.b);e.a0){g=(f&lve)%a.d.length;e=WNd(a,g,f,b);if(e){h=e.nd(c);return h}}d=a.ck(f,b,c);a.c.Fc(d);return null} -function Tee(a,b){var c,d,e,f;switch(Oee(a,b).Kl()){case 3:case 2:{c=mYd(b);for(e=0,f=c.i;e=0;d--){if(lhb(a[d].d,b)||lhb(a[d].d,c)){a.length>=d+1&&a.splice(0,d+1);break}}return a} -function Fdb(a,b){var c;if(Kdb(a)&&Kdb(b)){c=a/b;if(jxe0){a.b+=2;a.a+=d}}else{a.b+=1;a.a+=$wnd.Math.min(d,e)}} -function CVc(a){var b;b=RD(mQb(RD(ju(a.b,0),40),(h_c(),T$c)),107);pQb(a,(q$c(),SZc),new rjd(0,0));FVc(new YWc,a,b.b+b.c-Kfb(UD(mQb(a,ZZc))),b.d+b.a-Kfb(UD(mQb(a,_Zc))))} -function pDd(a,b){var c,d;d=false;if(bE(b)){d=true;oDd(a,new OC(WD(b)))}if(!d){if(ZD(b,242)){d=true;oDd(a,(c=Qeb(RD(b,242)),new hC(c)))}}if(!d){throw Adb(new Aeb(tIe))}} -function g$d(a,b,c,d){var e,f,g;e=new P3d(a.e,1,10,(g=b.c,ZD(g,90)?RD(g,29):(JTd(),zTd)),(f=c.c,ZD(f,90)?RD(f,29):(JTd(),zTd)),fZd(a,b),false);!d?(d=e):d.nj(e);return d} -function _2b(a){var b,c;switch(RD(mQb(Y2b(a),(yCc(),QAc)),429).g){case 0:b=a.n;c=a.o;return new rjd(b.a+c.a/2,b.b+c.b/2);case 1:return new sjd(a.n);default:return null;}} -function Ouc(){Ouc=geb;Luc=new Puc(LAe,0);Kuc=new Puc('LEFTUP',1);Nuc=new Puc('RIGHTUP',2);Juc=new Puc('LEFTDOWN',3);Muc=new Puc('RIGHTDOWN',4);Iuc=new Puc('BALANCED',5)} -function dKc(a,b,c){var d,e,f;d=Qfb(a.a[b.p],a.a[c.p]);if(d==0){e=RD(mQb(b,(Ywc(),qwc)),15);f=RD(mQb(c,qwc),15);if(e.Hc(c)){return -1}else if(f.Hc(b)){return 1}}return d} -function k5c(a){switch(a.g){case 1:return new K3c;case 2:return new M3c;case 3:return new I3c;case 0:return null;default:throw Adb(new agb(mFe+(a.f!=null?a.f:''+a.g)));}} -function gyd(a,b,c){switch(b){case 1:!a.n&&(a.n=new C5d(I4,a,1,7));sLd(a.n);!a.n&&(a.n=new C5d(I4,a,1,7));YGd(a.n,RD(c,16));return;case 2:jyd(a,WD(c));return;}Dxd(a,b,c)} -function xyd(a,b,c){switch(b){case 3:Ayd(a,Kfb(UD(c)));return;case 4:Cyd(a,Kfb(UD(c)));return;case 5:Dyd(a,Kfb(UD(c)));return;case 6:Eyd(a,Kfb(UD(c)));return;}gyd(a,b,c)} -function dBd(a,b,c){var d,e,f;f=(d=new R5d,d);e=XVd(f,b,null);!!e&&e.oj();PAd(f,c);WGd((!a.c&&(a.c=new C5d(u7,a,12,10)),a.c),f);$Vd(f,0);bWd(f,1);aWd(f,true);_Vd(f,true)} -function M5d(a,b){var c,d,e;c=Ktb(a.i,b);if(ZD(c,241)){e=RD(c,241);e.zi()==null&&undefined;return e.wi()}else if(ZD(c,507)){d=RD(c,2037);e=d.b;return e}else{return null}} -function aj(a,b,c,d){var e,f;Qb(b);Qb(c);f=RD(Fn(a.d,b),17);Ob(!!f,'Row %s not in %s',b,a.e);e=RD(Fn(a.b,c),17);Ob(!!e,'Column %s not in %s',c,a.c);return cj(a,f.a,e.a,d)} -function ZC(a,b,c,d,e,f,g){var h,i,j,k,l;k=e[f];j=f==g-1;h=j?d:0;l=_C(h,k);d!=10&&cD(WC(a,g-f),b[f],c[f],h,l);if(!j){++f;for(i=0;i1||h==-1){f=RD(i,15);e.Wb(Sje(a,f))}else{e.Wb(Rje(a,RD(i,58)))}}}} -function ceb(b,c,d,e){beb();var f=_db;$moduleName=c;$moduleBase=d;ydb=e;function g(){for(var a=0;a0){return false}}return true} -function okc(a){var b,c,d,e,f;for(d=new vkb((new mkb(a.b)).a);d.b;){c=tkb(d);b=RD(c.ld(),10);f=RD(RD(c.md(),42).a,10);e=RD(RD(c.md(),42).b,8);$id(hjd(b.n),$id(ajd(f.n),e))}} -function Roc(a){switch(RD(mQb(a.b,(yCc(),BAc)),387).g){case 1:FDb(GDb(EDb(new SDb(null,new Swb(a.d,16)),new kpc),new mpc),new opc);break;case 2:Toc(a);break;case 0:Soc(a);}} -function SVc(a,b,c){var d,e,f;d=c;!d&&(d=new Oqd);d.Ug('Layout',a.a.c.length);for(f=new Anb(a.a);f.aAEe){return c}else e>-1.0E-6&&++c}return c} -function n2d(a,b){var c;if(b!=a.b){c=null;!!a.b&&(c=Jvd(a.b,a,-4,c));!!b&&(c=Ivd(b,a,-4,c));c=e2d(a,b,c);!!c&&c.oj()}else (a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new N3d(a,1,3,b,b))} -function q2d(a,b){var c;if(b!=a.f){c=null;!!a.f&&(c=Jvd(a.f,a,-1,c));!!b&&(c=Ivd(b,a,-1,c));c=g2d(a,b,c);!!c&&c.oj()}else (a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new N3d(a,1,0,b,b))} -function Lge(a,b,c,d){var e,f,g,h;if(Mvd(a.e)){e=b.Lk();h=b.md();f=c.md();g=fge(a,1,e,h,f,e.Jk()?kge(a,e,f,ZD(e,102)&&(RD(e,19).Bb&txe)!=0):-1,true);d?d.nj(g):(d=g)}return d} -function bne(a){var b,c,d;if(a==null)return null;c=RD(a,15);if(c.dc())return '';d=new Qhb;for(b=c.Kc();b.Ob();){Nhb(d,(nme(),WD(b.Pb())));d.a+=' '}return qeb(d,d.a.length-1)} -function fne(a){var b,c,d;if(a==null)return null;c=RD(a,15);if(c.dc())return '';d=new Qhb;for(b=c.Kc();b.Ob();){Nhb(d,(nme(),WD(b.Pb())));d.a+=' '}return qeb(d,d.a.length-1)} -function QIc(a,b,c){var d,e;d=a.c[b.c.p][b.p];e=a.c[c.c.p][c.p];if(d.a!=null&&e.a!=null){return Jfb(d.a,e.a)}else if(d.a!=null){return -1}else if(e.a!=null){return 1}return 0} -function RVc(a,b,c){c.Ug('Tree layout',1);Sed(a.b);Ved(a.b,(YVc(),UVc),UVc);Ved(a.b,VVc,VVc);Ved(a.b,WVc,WVc);Ved(a.b,XVc,XVc);a.a=Qed(a.b,b);SVc(a,b,c.eh(1));c.Vg();return b} -function ZDd(a,b){var c,d,e,f,g,h;if(b){f=b.a.length;c=new vue(f);for(h=(c.b-c.a)*c.c<0?(uue(),tue):new Rue(c);h.Ob();){g=RD(h.Pb(),17);e=xDd(b,g.a);d=new aFd(a);$Dd(d.a,e)}}} -function oEd(a,b){var c,d,e,f,g,h;if(b){f=b.a.length;c=new vue(f);for(h=(c.b-c.a)*c.c<0?(uue(),tue):new Rue(c);h.Ob();){g=RD(h.Pb(),17);e=xDd(b,g.a);d=new LEd(a);NDd(d.a,e)}}} -function ESd(b){var c;if(b!=null&&b.length>0&&ihb(b,b.length-1)==33){try{c=nSd(zhb(b,0,b.length-1));return c.e==null}catch(a){a=zdb(a);if(!ZD(a,33))throw Adb(a)}}return false} -function u0b(a,b,c){var d,e,f;d=Y2b(b);e=i2b(d);f=new R3b;P3b(f,b);switch(c.g){case 1:Q3b(f,spd(vpd(e)));break;case 2:Q3b(f,vpd(e));}pQb(f,(yCc(),ABc),UD(mQb(a,ABc)));return f} -function jdc(a){var b,c;b=RD(hs(new is(Mr(Z2b(a.a).a.Kc(),new ir))),18);c=RD(hs(new is(Mr(a3b(a.a).a.Kc(),new ir))),18);return Heb(TD(mQb(b,(Ywc(),Nwc))))||Heb(TD(mQb(c,Nwc)))} -function Bnc(){Bnc=geb;xnc=new Cnc('ONE_SIDE',0);znc=new Cnc('TWO_SIDES_CORNER',1);Anc=new Cnc('TWO_SIDES_OPPOSING',2);ync=new Cnc('THREE_SIDES',3);wnc=new Cnc('FOUR_SIDES',4)} -function Usc(a,b){var c,d,e,f;f=new bnb;e=0;d=b.Kc();while(d.Ob()){c=sgb(RD(d.Pb(),17).a+e);while(c.a=a.f){break}ZEb(f.c,c)}return f} -function iIc(a,b){var c,d,e,f,g;for(f=new Anb(b.a);f.a0&&Xlc(this,this.c-1,(qpd(),Xod));this.c0&&a[0].length>0&&(this.c=Heb(TD(mQb(Y2b(a[0][0]),(Ywc(),rwc)))));this.a=$C(aY,Nve,2117,a.length,0,2);this.b=$C(dY,Nve,2118,a.length,0,2);this.d=new Ks} -function TOc(a){if(a.c.length==0){return false}if((tFb(0,a.c.length),RD(a.c[0],18)).c.i.k==(r3b(),o3b)){return true}return yDb(GDb(new SDb(null,new Swb(a,16)),new WOc),new YOc)} -function I5c(a,b){var c,d,e,f,g,h,i;h=Q2c(b);f=b.f;i=b.g;g=$wnd.Math.sqrt(f*f+i*i);e=0;for(d=new Anb(h);d.a=0){c=Fdb(a,ixe);d=Mdb(a,ixe)}else{b=Udb(a,1);c=Fdb(b,500000000);d=Mdb(b,500000000);d=Bdb(Sdb(d,1),Cdb(a,1))}return Rdb(Sdb(d,32),Cdb(c,yxe))} -function fTb(a,b,c){var d,e;d=(sFb(b.b!=0),RD(Wub(b,b.a.a),8));switch(c.g){case 0:d.b=0;break;case 2:d.b=a.f;break;case 3:d.a=0;break;default:d.a=a.g;}e=Sub(b,0);cvb(e,d);return b} -function Vpc(a,b,c,d){var e,f,g,h,i;i=a.b;f=b.d;g=f.j;h=$pc(g,i.d[g.g],c);e=$id(ajd(f.n),f.a);switch(f.j.g){case 1:case 3:h.a+=e.a;break;case 2:case 4:h.b+=e.b;}Pub(d,h,d.c.b,d.c)} -function YNc(a,b,c){var d,e,f,g;g=Wmb(a.e,b,0);f=new ZNc;f.b=c;d=new Jkb(a.e,g);while(d.b1;b>>=1){(b&1)!=0&&(d=Wib(d,c));c.d==1?(c=Wib(c,c)):(c=new djb(Tjb(c.a,c.d,$C(kE,Pwe,28,c.d<<1,15,1))))}d=Wib(d,c);return d} -function Hwb(){Hwb=geb;var a,b,c,d;Ewb=$C(iE,vxe,28,25,15,1);Fwb=$C(iE,vxe,28,33,15,1);d=1.52587890625E-5;for(b=32;b>=0;b--){Fwb[b]=d;d*=0.5}c=1;for(a=24;a>=0;a--){Ewb[a]=c;c*=0.5}} -function a5b(a){var b,c;if(Heb(TD(Gxd(a,(yCc(),NAc))))){for(c=new is(Mr(zGd(a).a.Kc(),new ir));gs(c);){b=RD(hs(c),74);if(ozd(b)){if(Heb(TD(Gxd(b,OAc)))){return true}}}}return false} -function Qmc(a,b){var c,d,e;if(Ysb(a.f,b)){b.b=a;d=b.c;Wmb(a.j,d,0)!=-1||Rmb(a.j,d);e=b.d;Wmb(a.j,e,0)!=-1||Rmb(a.j,e);c=b.a.b;if(c.c.length!=0){!a.i&&(a.i=new _mc(a));Wmc(a.i,c)}}} -function Xpc(a){var b,c,d,e,f;c=a.c.d;d=c.j;e=a.d.d;f=e.j;if(d==f){return c.p=0&&lhb(a.substr(b,'GMT'.length),'GMT')){c[0]=b+3;return JA(a,c,d)}if(b>=0&&lhb(a.substr(b,'UTC'.length),'UTC')){c[0]=b+3;return JA(a,c,d)}return JA(a,c,d)} -function Zmc(a,b){var c,d,e,f,g;f=a.g.a;g=a.g.b;for(d=new Anb(a.d);d.ac;f--){a[f]|=b[f-c-1]>>>g;a[f-1]=b[f-c-1]<0&&hib(a.g,b,a.g,b+d,h);g=c.Kc();a.i+=d;for(e=0;e>4&15;f=a[d]&15;g[e++]=oAd[c];g[e++]=oAd[f]}return Ihb(g,0,g.length)}} -function Fhb(a){var b,c;if(a>=txe){b=uxe+(a-txe>>10&1023)&Bwe;c=56320+(a-txe&1023)&Bwe;return String.fromCharCode(b)+(''+String.fromCharCode(c))}else{return String.fromCharCode(a&Bwe)}} -function UMb(a,b){RMb();var c,d,e,f;e=RD(RD(Qc(a.r,b),21),87);if(e.gc()>=2){d=RD(e.Kc().Pb(),117);c=a.u.Hc((Pod(),Kod));f=a.u.Hc(Ood);return !d.a&&!c&&(e.gc()==2||f)}else{return false}} -function v3c(a,b,c,d,e){var f,g,h;f=w3c(a,b,c,d,e);h=false;while(!f){n3c(a,e,true);h=true;f=w3c(a,b,c,d,e)}h&&n3c(a,e,false);g=N2c(e);if(g.c.length!=0){!!a.d&&a.d.Gg(g);v3c(a,e,c,d,g)}} -function ind(){ind=geb;gnd=new jnd(LAe,0);end=new jnd('DIRECTED',1);hnd=new jnd('UNDIRECTED',2);cnd=new jnd('ASSOCIATION',3);fnd=new jnd('GENERALIZATION',4);dnd=new jnd('DEPENDENCY',5)} -function nsd(a,b){var c;if(!MCd(a)){throw Adb(new dgb(sHe))}c=MCd(a);switch(b.g){case 1:return -(a.j+a.f);case 2:return a.i-c.g;case 3:return a.j-c.f;case 4:return -(a.i+a.g);}return 0} -function Jge(a,b,c){var d,e,f;d=b.Lk();f=b.md();e=d.Jk()?fge(a,4,d,f,null,kge(a,d,f,ZD(d,102)&&(RD(d,19).Bb&txe)!=0),true):fge(a,d.tk()?2:1,d,f,d.ik(),-1,true);c?c.nj(e):(c=e);return c} -function lwb(a,b){var c,d;uFb(b);d=a.b.c.length;Rmb(a.b,b);while(d>0){c=d;d=(d-1)/2|0;if(a.a.Ne(Vmb(a.b,d),b)<=0){$mb(a.b,c,b);return true}$mb(a.b,c,Vmb(a.b,d))}$mb(a.b,d,b);return true} -function sKb(a,b,c,d){var e,f;e=0;if(!c){for(f=0;f=h} -function A8c(a){switch(a.g){case 0:return new o8c;case 1:return new u8c;default:throw Adb(new agb('No implementation is available for the width approximator '+(a.f!=null?a.f:''+a.g)));}} -function rDd(a,b,c,d){var e;e=false;if(bE(d)){e=true;sDd(b,c,WD(d))}if(!e){if($D(d)){e=true;rDd(a,b,c,d)}}if(!e){if(ZD(d,242)){e=true;qDd(b,c,RD(d,242))}}if(!e){throw Adb(new Aeb(tIe))}} -function uee(a,b){var c,d,e;c=b.qi(a.a);if(c){e=$Nd((!c.b&&(c.b=new SVd((JTd(),FTd),C8,c)),c.b),rKe);if(e!=null){for(d=1;d<(lke(),hke).length;++d){if(lhb(hke[d],e)){return d}}}}return 0} -function vee(a,b){var c,d,e;c=b.qi(a.a);if(c){e=$Nd((!c.b&&(c.b=new SVd((JTd(),FTd),C8,c)),c.b),rKe);if(e!=null){for(d=1;d<(lke(),ike).length;++d){if(lhb(ike[d],e)){return d}}}}return 0} -function Ve(a,b){var c,d,e,f;uFb(b);f=a.a.gc();if(f0?1:0;while(f.a[e]!=c){f=f.a[e];e=a.a.Ne(c.d,f.d)>0?1:0}f.a[e]=d;d.b=c.b;d.a[0]=c.a[0];d.a[1]=c.a[1];c.a[0]=null;c.a[1]=null} -function zIb(a){var b,c,d,e;b=new bnb;c=$C(xdb,Hye,28,a.a.c.length,16,1);Snb(c,c.length);for(e=new Anb(a.a);e.a0&&O9b((tFb(0,c.c.length),RD(c.c[0],30)),a);c.c.length>1&&O9b(RD(Vmb(c,c.c.length-1),30),a);b.Vg()} -function Sod(a){Pod();var b,c;b=ysb(Lod,cD(WC(D3,1),jwe,279,0,[Nod]));if(dy(Tx(b,a))>1){return false}c=ysb(Kod,cD(WC(D3,1),jwe,279,0,[Jod,Ood]));if(dy(Tx(c,a))>1){return false}return true} -function FBd(a,b){var c;c=Xjb((YSd(),XSd),a);ZD(c,507)?$jb(XSd,a,new B5d(this,b)):$jb(XSd,a,this);BBd(this,b);if(b==(jTd(),iTd)){this.wb=RD(this,2038);RD(b,2040)}else{this.wb=(lTd(),kTd)}} -function Lae(b){var c,d,e;if(b==null){return null}c=null;for(d=0;d=Awe?'error':d>=900?'warn':d>=800?'info':'log');eFb(c,a.a);!!a.b&&fFb(b,c,a.b,'Exception: ',true)} -function mQb(a,b){var c,d;d=(!a.q&&(a.q=new Tsb),Wjb(a.q,b));if(d!=null){return d}c=b.Sg();ZD(c,4)&&(c==null?(!a.q&&(a.q=new Tsb),_jb(a.q,b)):(!a.q&&(a.q=new Tsb),Zjb(a.q,b,c)),a);return c} -function sXb(){sXb=geb;nXb=new tXb('P1_CYCLE_BREAKING',0);oXb=new tXb('P2_LAYERING',1);pXb=new tXb('P3_NODE_ORDERING',2);qXb=new tXb('P4_NODE_PLACEMENT',3);rXb=new tXb('P5_EDGE_ROUTING',4)} -function KZb(a,b){CZb();var c;if(a.c==b.c){if(a.b==b.b||rZb(a.b,b.b)){c=oZb(a.b)?1:-1;if(a.a&&!b.a){return c}else if(!a.a&&b.a){return -c}}return hgb(a.b.g,b.b.g)}else{return Qfb(a.c,b.c)}} -function E3c(a,b){var c,d,e;if(p3c(a,b)){return true}for(d=new Anb(b);d.a=e||b<0)throw Adb(new veb(MIe+b+NIe+e));if(c>=e||c<0)throw Adb(new veb(OIe+c+NIe+e));b!=c?(d=(f=a.Cj(c),a.qj(b,f),f)):(d=a.xj(c));return d} -function Lje(a){var b,c,d;d=a;if(a){b=0;for(c=a.Eh();c;c=c.Eh()){if(++b>wxe){return Lje(c)}d=c;if(c==a){throw Adb(new dgb('There is a cycle in the containment hierarchy of '+a))}}}return d} -function Fe(a){var b,c,d;d=new Jyb(pve,'[',']');for(c=a.Kc();c.Ob();){b=c.Pb();Gyb(d,dE(b)===dE(a)?'(this Collection)':b==null?vve:jeb(b))}return !d.a?d.c:d.e.length==0?d.a.a:d.a.a+(''+d.e)} -function p3c(a,b){var c,d;d=false;if(b.gc()<2){return false}for(c=0;c1&&(a.j.b+=a.e)}else{a.j.a+=c.a;a.j.b=$wnd.Math.max(a.j.b,c.b);a.d.c.length>1&&(a.j.a+=a.e)}} -function Mnc(){Mnc=geb;Jnc=cD(WC(E3,1),NAe,64,0,[(qpd(),Yod),Xod,npd]);Inc=cD(WC(E3,1),NAe,64,0,[Xod,npd,ppd]);Knc=cD(WC(E3,1),NAe,64,0,[npd,ppd,Yod]);Lnc=cD(WC(E3,1),NAe,64,0,[ppd,Yod,Xod])} -function Upc(a,b,c,d){var e,f,g,h,i,j,k;g=a.c.d;h=a.d.d;if(g.j==h.j){return}k=a.b;e=g.j;i=null;while(e!=h.j){i=b==0?tpd(e):rpd(e);f=$pc(e,k.d[e.g],c);j=$pc(i,k.d[i.g],c);Mub(d,$id(f,j));e=i}} -function OJc(a,b,c,d){var e,f,g,h,i;g=hMc(a.a,b,c);h=RD(g.a,17).a;f=RD(g.b,17).a;if(d){i=RD(mQb(b,(Ywc(),Iwc)),10);e=RD(mQb(c,Iwc),10);if(!!i&&!!e){Slc(a.b,i,e);h+=a.b.i;f+=a.b.e}}return h>f} -function OLc(a){var b,c,d,e,f,g,h,i,j;this.a=LLc(a);this.b=new bnb;for(c=a,d=0,e=c.length;damc(a.d).c){a.i+=a.g.c;cmc(a.d)}else if(amc(a.d).c>amc(a.g).c){a.e+=a.d.c;cmc(a.g)}else{a.i+=_lc(a.g);a.e+=_lc(a.d);cmc(a.g);cmc(a.d)}}} -function vTc(a,b,c){var d,e,f,g;f=b.q;g=b.r;new bTc((fTc(),dTc),b,f,1);new bTc(dTc,f,g,1);for(e=new Anb(c);e.ah&&(i=h/d);e>f&&(j=f/e);g=$wnd.Math.min(i,j);a.a+=g*(b.a-a.a);a.b+=g*(b.b-a.b)} -function I8c(a,b,c,d,e){var f,g;g=false;f=RD(Vmb(c.b,0),27);while(V8c(a,b,f,d,e)){g=true;T9c(c,f);if(c.b.c.length==0){break}f=RD(Vmb(c.b,0),27)}c.b.c.length==0&&Fad(c.j,c);g&&gad(b.q);return g} -function Eid(a,b){tid();var c,d,e,f;if(b.b<2){return false}f=Sub(b,0);c=RD(evb(f),8);d=c;while(f.b!=f.d.c){e=RD(evb(f),8);if(Did(a,d,e)){return true}d=e}if(Did(a,d,c)){return true}return false} -function Bxd(a,b,c,d){var e,f;if(c==0){return !a.o&&(a.o=new DVd((pvd(),mvd),X4,a,0)),BVd(a.o,b,d)}return f=RD(vYd((e=RD(Ywd(a,16),29),!e?a.ii():e),c),69),f.wk().Ak(a,Wwd(a),c-AYd(a.ii()),b,d)} -function BBd(a,b){var c;if(b!=a.sb){c=null;!!a.sb&&(c=RD(a.sb,54).Th(a,1,n7,c));!!b&&(c=RD(b,54).Rh(a,1,n7,c));c=hBd(a,b,c);!!c&&c.oj()}else (a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new N3d(a,1,4,b,b))} -function YDd(a,b){var c,d,e,f;if(b){e=vDd(b,'x');c=new ZEd(a);Hzd(c.a,(uFb(e),e));f=vDd(b,'y');d=new $Ed(a);Izd(d.a,(uFb(f),f))}else{throw Adb(new CDd('All edge sections need an end point.'))}} -function WDd(a,b){var c,d,e,f;if(b){e=vDd(b,'x');c=new WEd(a);Ozd(c.a,(uFb(e),e));f=vDd(b,'y');d=new XEd(a);Pzd(d.a,(uFb(f),f))}else{throw Adb(new CDd('All edge sections need a start point.'))}} -function hBb(a,b){var c,d,e,f,g,h,i;for(d=kBb(a),f=0,h=d.length;f>22-b;e=a.h<>22-b}else if(b<44){c=0;d=a.l<>44-b}else{c=0;d=0;e=a.l<a){throw Adb(new agb('k must be smaller than n'))}else return b==0||b==a?1:a==0?0:Bid(a)/(Bid(b)*Bid(a-b))} -function msd(a,b){var c,d,e,f;c=new zId(a);while(c.g==null&&!c.c?sId(c):c.g==null||c.i!=0&&RD(c.g[c.i-1],51).Ob()){f=RD(tId(c),58);if(ZD(f,167)){d=RD(f,167);for(e=0;e>4];b[c*2+1]=Fqe[f&15]}return Ihb(b,0,b.length)} -function sn(a){fn();var b,c,d;d=a.c.length;switch(d){case 0:return en;case 1:b=RD(Ir(new Anb(a)),44);return xn(b.ld(),b.md());default:c=RD(anb(a,$C(UK,Zve,44,a.c.length,0,1)),173);return new Mx(c);}} -function KWb(a){var b,c,d,e,f,g;b=new wmb;c=new wmb;hmb(b,a);hmb(c,a);while(c.b!=c.c){e=RD(smb(c),36);for(g=new Anb(e.a);g.a0&&uLc(a,c,b);return e}return rLc(a,b,c)} -function $4c(){$4c=geb;R4c=(umd(),Qld);Y4c=fmd;K4c=kld;L4c=nld;M4c=pld;J4c=ild;N4c=sld;Q4c=Lld;H4c=(D4c(),o4c);I4c=p4c;T4c=v4c;W4c=y4c;U4c=w4c;V4c=x4c;O4c=r4c;P4c=t4c;S4c=u4c;X4c=z4c;Z4c=B4c;G4c=n4c} -function P9c(a,b){var c,d,e,f,g;if(a.e<=b){return a.g}if(R9c(a,a.g,b)){return a.g}f=a.r;d=a.g;g=a.r;e=(f-d)/2+d;while(d+11&&(a.e.b+=a.a)}else{a.e.a+=c.a;a.e.b=$wnd.Math.max(a.e.b,c.b);a.d.c.length>1&&(a.e.a+=a.a)}} -function Ipc(a){var b,c,d,e;e=a.i;b=e.b;d=e.j;c=e.g;switch(e.a.g){case 0:c.a=(a.g.b.o.a-d.a)/2;break;case 1:c.a=b.d.n.a+b.d.a.a;break;case 2:c.a=b.d.n.a+b.d.a.a-d.a;break;case 3:c.b=b.d.n.b+b.d.a.b;}} -function oOc(a,b,c){var d,e,f;for(e=new is(Mr(W2b(c).a.Kc(),new ir));gs(e);){d=RD(hs(e),18);if(!(!W0b(d)&&!(!W0b(d)&&d.c.i.c==d.d.i.c))){continue}f=gOc(a,d,c,new VOc);f.c.length>1&&(ZEb(b.c,f),true)}} -function _id(a,b,c,d,e){if(dd&&(a.a=d);a.be&&(a.b=e);return a} -function LFd(a){if(ZD(a,143)){return EFd(RD(a,143))}else if(ZD(a,233)){return FFd(RD(a,233))}else if(ZD(a,23)){return GFd(RD(a,23))}else{throw Adb(new agb(wIe+Fe(new mob(cD(WC(jJ,1),rve,1,5,[a])))))}} -function ujb(a,b,c,d,e){var f,g,h;f=true;for(g=0;g>>e|c[g+d+1]<>>e;++g}return f} -function ZQc(a,b,c,d){var e,f,g;if(b.k==(r3b(),o3b)){for(f=new is(Mr(Z2b(b).a.Kc(),new ir));gs(f);){e=RD(hs(f),18);g=e.c.i.k;if(g==o3b&&a.c.a[e.c.i.c.p]==d&&a.c.a[b.c.p]==c){return true}}}return false} -function CD(a,b){var c,d,e,f;b&=63;c=a.h&exe;if(b<22){f=c>>>b;e=a.m>>b|c<<22-b;d=a.l>>b|a.m<<22-b}else if(b<44){f=0;e=c>>>b-22;d=a.m>>b-22|a.h<<44-b}else{f=0;e=0;d=c>>>b-44}return hD(d&dxe,e&dxe,f&exe)} -function mmc(a,b,c,d){var e;this.b=d;this.e=a==(RKc(),PKc);e=b[c];this.d=YC(xdb,[Nve,Hye],[183,28],16,[e.length,e.length],2);this.a=YC(kE,[Nve,Pwe],[53,28],15,[e.length,e.length],2);this.c=new Ylc(b,c)} -function Rmc(a){var b,c,d;a.k=new Si((qpd(),cD(WC(E3,1),NAe,64,0,[opd,Yod,Xod,npd,ppd])).length,a.j.c.length);for(d=new Anb(a.j);d.a=c){_cc(a,b,d.p);return true}}return false} -function EA(a,b,c,d){var e,f,g,h,i,j;g=c.length;f=0;e=-1;j=Bhb((BFb(b,a.length+1),a.substr(b)),(wvb(),uvb));for(h=0;hf&&whb(j,Bhb(c[h],uvb))){e=h;f=i}}e>=0&&(d[0]=b+f);return e} -function gCd(a){var b;if((a.Db&64)!=0)return Fyd(a);b=new dib(FHe);!a.a||Zhb(Zhb((b.a+=' "',b),a.a),'"');Zhb(Uhb(Zhb(Uhb(Zhb(Uhb(Zhb(Uhb((b.a+=' (',b),a.i),','),a.j),' | '),a.g),','),a.f),')');return b.a} -function xge(a,b,c){var d,e,f,g,h;h=pke(a.e.Dh(),b);e=RD(a.g,124);d=0;for(g=0;gc){return Jb(a,c,'start index')}if(b<0||b>c){return Jb(b,c,'end index')}return hc('end index (%s) must not be less than start index (%s)',cD(WC(jJ,1),rve,1,5,[sgb(b),sgb(a)]))} -function dA(b,c){var d,e,f,g;for(e=0,f=b.length;e0&&aGc(a,f,c))}}b.p=0} -function Ahd(a){var b;this.c=new Yub;this.f=a.e;this.e=a.d;this.i=a.g;this.d=a.c;this.b=a.b;this.k=a.j;this.a=a.a;!a.i?(this.j=(b=RD(mfb(d3),9),new Fsb(b,RD(WEb(b,b.length),9),0))):(this.j=a.i);this.g=a.f} -function Wb(a){var b,c,d,e;b=Thb(Zhb(new dib('Predicates.'),'and'),40);c=true;for(e=new Dkb(a);e.b0?h[g-1]:$C(jR,WAe,10,0,0,1);e=h[g];j=g=0?a.ki(e):Tvd(a,d)}else{throw Adb(new agb(KHe+d.xe()+LHe))}}else{Cvd(a,c,d)}} -function ADd(a){var b,c;c=null;b=false;if(ZD(a,211)){b=true;c=RD(a,211).a}if(!b){if(ZD(a,263)){b=true;c=''+RD(a,263).a}}if(!b){if(ZD(a,493)){b=true;c=''+RD(a,493).a}}if(!b){throw Adb(new Aeb(tIe))}return c} -function gge(a,b,c){var d,e,f,g,h,i;i=pke(a.e.Dh(),b);d=0;h=a.i;e=RD(a.g,124);for(g=0;g=a.d.b.c.length){b=new R4b(a.d);b.p=d.p-1;Rmb(a.d.b,b);c=new R4b(a.d);c.p=d.p;Rmb(a.d.b,c)}g3b(d,RD(Vmb(a.d.b,d.p),30))}} -function DVc(a,b,c){var d,e,f;if(!a.b[b.g]){a.b[b.g]=true;d=c;!d&&(d=new YWc);Mub(d.b,b);for(f=a.a[b.g].Kc();f.Ob();){e=RD(f.Pb(),65);e.b!=b&&DVc(a,e.b,d);e.c!=b&&DVc(a,e.c,d);Mub(d.a,e)}return d}return null} -function iMb(a){switch(a.g){case 0:case 1:case 2:return qpd(),Yod;case 3:case 4:case 5:return qpd(),npd;case 6:case 7:case 8:return qpd(),ppd;case 9:case 10:case 11:return qpd(),Xod;default:return qpd(),opd;}} -function SOc(a,b){var c;if(a.c.length==0){return false}c=zDc((tFb(0,a.c.length),RD(a.c[0],18)).c.i);dOc();if(c==(wDc(),tDc)||c==sDc){return true}return yDb(GDb(new SDb(null,new Swb(a,16)),new $Oc),new aPc(b))} -function KDd(a,b){if(ZD(b,207)){return EDd(a,RD(b,27))}else if(ZD(b,193)){return FDd(a,RD(b,123))}else if(ZD(b,452)){return DDd(a,RD(b,166))}else{throw Adb(new agb(wIe+Fe(new mob(cD(WC(jJ,1),rve,1,5,[b])))))}} -function Ou(a,b,c){var d,e;this.f=a;d=RD(Wjb(a.b,b),260);e=!d?0:d.a;Sb(c,e);if(c>=(e/2|0)){this.e=!d?null:d.c;this.d=e;while(c++0){Lu(this)}}this.b=b;this.a=null} -function iHb(a,b){var c,d;b.a?jHb(a,b):(c=RD(vAb(a.b,b.b),60),!!c&&c==a.a[b.b.f]&&!!c.a&&c.a!=b.b.a&&c.c.Fc(b.b),d=RD(uAb(a.b,b.b),60),!!d&&a.a[d.f]==b.b&&!!d.a&&d.a!=b.b.a&&b.b.c.Fc(d),wAb(a.b,b.b),undefined)} -function wMb(a,b){var c,d;c=RD(Vrb(a.b,b),127);if(RD(RD(Qc(a.r,b),21),87).dc()){c.n.b=0;c.n.c=0;return}c.n.b=a.C.b;c.n.c=a.C.c;a.A.Hc((Qpd(),Ppd))&&BMb(a,b);d=AMb(a,b);BLb(a,b)==(pod(),mod)&&(d+=2*a.w);c.a.a=d} -function FNb(a,b){var c,d;c=RD(Vrb(a.b,b),127);if(RD(RD(Qc(a.r,b),21),87).dc()){c.n.d=0;c.n.a=0;return}c.n.d=a.C.d;c.n.a=a.C.a;a.A.Hc((Qpd(),Ppd))&&JNb(a,b);d=INb(a,b);BLb(a,b)==(pod(),mod)&&(d+=2*a.w);c.a.b=d} -function VQb(a,b){var c,d,e,f;f=new bnb;for(d=new Anb(b);d.ad&&(BFb(b-1,a.length),a.charCodeAt(b-1)<=32)){--b}return d>0||bc.a&&(d.Hc((ukd(),okd))?(e=(b.a-c.a)/2):d.Hc(qkd)&&(e=b.a-c.a));b.b>c.b&&(d.Hc((ukd(),skd))?(f=(b.b-c.b)/2):d.Hc(rkd)&&(f=b.b-c.b));Isd(a,e,f)} -function ABd(a,b,c,d,e,f,g,h,i,j,k,l,m){ZD(a.Cb,90)&&v$d(yYd(RD(a.Cb,90)),4);PAd(a,c);a.f=g;DWd(a,h);FWd(a,i);xWd(a,j);EWd(a,k);aWd(a,l);AWd(a,m);_Vd(a,true);$Vd(a,e);a.Zk(f);YVd(a,b);d!=null&&(a.i=null,zWd(a,d))} -function Jb(a,b,c){if(a<0){return hc(qve,cD(WC(jJ,1),rve,1,5,[c,sgb(a)]))}else if(b<0){throw Adb(new agb(sve+b))}else{return hc('%s (%s) must not be greater than size (%s)',cD(WC(jJ,1),rve,1,5,[c,sgb(a),sgb(b)]))}} -function Xnb(a,b,c,d,e,f){var g,h,i,j;g=d-c;if(g<7){Unb(b,c,d,f);return}i=c+e;h=d+e;j=i+(h-i>>1);Xnb(b,a,i,j,-e,f);Xnb(b,a,j,h,-e,f);if(f.Ne(a[j-1],a[j])<=0){while(c=0?a.bi(f,c):Svd(a,e,c)}else{throw Adb(new agb(KHe+e.xe()+LHe))}}else{Bvd(a,d,e,c)}} -function n3d(a){var b,c;if(a.f){while(a.n>0){b=RD(a.k.Xb(a.n-1),76);c=b.Lk();if(ZD(c,102)&&(RD(c,19).Bb&QHe)!=0&&(!a.e||c.pk()!=C4||c.Lj()!=0)&&b.md()!=null){return true}else{--a.n}}return false}else{return a.n>0}} -function Pje(b){var c,d,e,f;d=RD(b,54)._h();if(d){try{e=null;c=N5d((YSd(),XSd),jSd(kSd(d)));if(c){f=c.ai();!!f&&(e=f.Fl(Chb(d.e)))}if(!!e&&e!=b){return Pje(e)}}catch(a){a=zdb(a);if(!ZD(a,63))throw Adb(a)}}return b} -function P3c(a,b,c){var d,e,f;c.Ug('Remove overlaps',1);c.dh(b,eFe);d=RD(Gxd(b,(u2c(),t2c)),27);a.f=d;a.a=u5c(RD(Gxd(b,($4c(),X4c)),300));e=UD(Gxd(b,(umd(),fmd)));s3c(a,(uFb(e),e));f=Q2c(d);O3c(a,b,f,c);c.dh(b,gFe)} -function Ded(a){var b,c,d;if(Heb(TD(Gxd(a,(umd(),$kd))))){d=new bnb;for(c=new is(Mr(zGd(a).a.Kc(),new ir));gs(c);){b=RD(hs(c),74);ozd(b)&&Heb(TD(Gxd(b,_kd)))&&(ZEb(d.c,b),true)}return d}else{return yob(),yob(),vob}} -function KC(a){if(!a){return cC(),bC}var b=a.valueOf?a.valueOf():a;if(b!==a){var c=GC[typeof b];return c?c(b):NC(typeof b)}else if(a instanceof Array||a instanceof $wnd.Array){return new NB(a)}else{return new vC(a)}} -function IMb(a,b,c){var d,e,f;f=a.o;d=RD(Vrb(a.p,c),252);e=d.i;e.b=ZKb(d);e.a=YKb(d);e.b=$wnd.Math.max(e.b,f.a);e.b>f.a&&!b&&(e.b=f.a);e.c=-(e.b-f.a)/2;switch(c.g){case 1:e.d=-e.a;break;case 3:e.d=f.b;}$Kb(d);_Kb(d)} -function JMb(a,b,c){var d,e,f;f=a.o;d=RD(Vrb(a.p,c),252);e=d.i;e.b=ZKb(d);e.a=YKb(d);e.a=$wnd.Math.max(e.a,f.b);e.a>f.b&&!b&&(e.a=f.b);e.d=-(e.a-f.b)/2;switch(c.g){case 4:e.c=-e.b;break;case 2:e.c=f.a;}$Kb(d);_Kb(d)} -function nkc(a,b){var c,d,e,f,g;if(b.dc()){return}e=RD(b.Xb(0),131);if(b.gc()==1){mkc(a,e,e,1,0,b);return}c=1;while(c0){try{f=Oeb(c,qwe,lve)}catch(a){a=zdb(a);if(ZD(a,130)){e=a;throw Adb(new RSd(e))}else throw Adb(a)}}d=(!b.a&&(b.a=new Zde(b)),b.a);return f=0?RD(QHd(d,f),58):null} -function Ib(a,b){if(a<0){return hc(qve,cD(WC(jJ,1),rve,1,5,['index',sgb(a)]))}else if(b<0){throw Adb(new agb(sve+b))}else{return hc('%s (%s) must be less than size (%s)',cD(WC(jJ,1),rve,1,5,['index',sgb(a),sgb(b)]))}} -function cob(a){var b,c,d,e,f;if(a==null){return vve}f=new Jyb(pve,'[',']');for(c=a,d=0,e=c.length;d=0?a.Lh(c,true,true):Qvd(a,e,true),160));RD(d,220).Zl(b)}else{throw Adb(new agb(KHe+b.xe()+LHe))}} -function Cib(a){var b,c;if(a>-140737488355328&&a<140737488355328){if(a==0){return 0}b=a<0;b&&(a=-a);c=eE($wnd.Math.floor($wnd.Math.log(a)/0.6931471805599453));(!b||a!=$wnd.Math.pow(2,c))&&++c;return c}return Dib(Hdb(a))} -function oTc(a){var b,c,d,e,f,g,h;f=new Iub;for(c=new Anb(a);c.a2&&h.e.b+h.j.b<=2){e=h;d=g}f.a.zc(e,f);e.q=d}return f} -function B5c(a,b,c){c.Ug('Eades radial',1);c.dh(b,gFe);a.d=RD(Gxd(b,(u2c(),t2c)),27);a.c=Kfb(UD(Gxd(b,($4c(),S4c))));a.e=u5c(RD(Gxd(b,X4c),300));a.a=Z3c(RD(Gxd(b,Z4c),434));a.b=k5c(RD(Gxd(b,O4c),354));C5c(a);c.dh(b,gFe)} -function t8c(a,b){b.Ug('Target Width Setter',1);if(Hxd(a,(X7c(),W7c))){Ixd(a,(X6c(),W6c),UD(Gxd(a,W7c)))}else{throw Adb(new Jed('A target width has to be set if the TargetWidthWidthApproximator should be used.'))}b.Vg()} -function _8b(a,b){var c,d,e;d=new j3b(a);kQb(d,b);pQb(d,(Ywc(),gwc),b);pQb(d,(yCc(),BBc),(Bod(),wod));pQb(d,Rzc,(Rjd(),Njd));h3b(d,(r3b(),m3b));c=new R3b;P3b(c,d);Q3b(c,(qpd(),ppd));e=new R3b;P3b(e,d);Q3b(e,Xod);return d} -function ttc(a){switch(a.g){case 0:return new FKc((RKc(),OKc));case 1:return new aKc;case 2:return new FLc;default:throw Adb(new agb('No implementation is available for the crossing minimizer '+(a.f!=null?a.f:''+a.g)));}} -function THc(a,b){var c,d,e,f,g;a.c[b.p]=true;Rmb(a.a,b);for(g=new Anb(b.j);g.a=f){g.$b()}else{e=g.Kc();for(d=0;d0?Hh():g<0&&Rw(a,b,-g);return true}else{return false}} -function YKb(a){var b,c,d,e,f,g,h;h=0;if(a.b==0){g=aLb(a,true);b=0;for(d=g,e=0,f=d.length;e0){h+=c;++b}}b>1&&(h+=a.c*(b-1))}else{h=Vvb(SCb(HDb(CDb(_nb(a.a),new oLb),new qLb)))}return h>0?h+a.n.d+a.n.a:0} -function ZKb(a){var b,c,d,e,f,g,h;h=0;if(a.b==0){h=Vvb(SCb(HDb(CDb(_nb(a.a),new kLb),new mLb)))}else{g=bLb(a,true);b=0;for(d=g,e=0,f=d.length;e0){h+=c;++b}}b>1&&(h+=a.c*(b-1))}return h>0?h+a.n.b+a.n.c:0} -function UOc(a){var b,c;if(a.c.length!=2){throw Adb(new dgb('Order only allowed for two paths.'))}b=(tFb(0,a.c.length),RD(a.c[0],18));c=(tFb(1,a.c.length),RD(a.c[1],18));if(b.d.i!=c.c.i){a.c.length=0;ZEb(a.c,c);ZEb(a.c,b)}} -function O8c(a,b,c){var d;zyd(c,b.g,b.f);Byd(c,b.i,b.j);for(d=0;d<(!b.a&&(b.a=new C5d(J4,b,10,11)),b.a).i;d++){O8c(a,RD(QHd((!b.a&&(b.a=new C5d(J4,b,10,11)),b.a),d),27),RD(QHd((!c.a&&(c.a=new C5d(J4,c,10,11)),c.a),d),27))}} -function DMb(a,b){var c,d,e,f;f=RD(Vrb(a.b,b),127);c=f.a;for(e=RD(RD(Qc(a.r,b),21),87).Kc();e.Ob();){d=RD(e.Pb(),117);!!d.c&&(c.a=$wnd.Math.max(c.a,QKb(d.c)))}if(c.a>0){switch(b.g){case 2:f.n.c=a.s;break;case 4:f.n.b=a.s;}}} -function ETb(a,b){var c,d,e;c=RD(mQb(b,(yVb(),lVb)),17).a-RD(mQb(a,lVb),17).a;if(c==0){d=ojd(ajd(RD(mQb(a,(JVb(),FVb)),8)),RD(mQb(a,GVb),8));e=ojd(ajd(RD(mQb(b,FVb),8)),RD(mQb(b,GVb),8));return Qfb(d.a*d.b,e.a*e.b)}return c} -function JVc(a,b){var c,d,e;c=RD(mQb(b,(h_c(),X$c)),17).a-RD(mQb(a,X$c),17).a;if(c==0){d=ojd(ajd(RD(mQb(a,(q$c(),RZc)),8)),RD(mQb(a,SZc),8));e=ojd(ajd(RD(mQb(b,RZc),8)),RD(mQb(b,SZc),8));return Qfb(d.a*d.b,e.a*e.b)}return c} -function _0b(a){var b,c;c=new bib;c.a+='e_';b=S0b(a);b!=null&&(c.a+=''+b,c);if(!!a.c&&!!a.d){Zhb((c.a+=' ',c),M3b(a.c));Zhb(Yhb((c.a+='[',c),a.c.i),']');Zhb((c.a+=SAe,c),M3b(a.d));Zhb(Yhb((c.a+='[',c),a.d.i),']')}return c.a} -function ZVc(a){switch(a.g){case 0:return new N_c;case 1:return new V_c;case 2:return new x0c;case 3:return new J0c;default:throw Adb(new agb('No implementation is available for the layout phase '+(a.f!=null?a.f:''+a.g)));}} -function qsd(a,b,c,d,e){var f;f=0;switch(e.g){case 1:f=$wnd.Math.max(0,b.b+a.b-(c.b+d));break;case 3:f=$wnd.Math.max(0,-a.b-d);break;case 2:f=$wnd.Math.max(0,-a.a-d);break;case 4:f=$wnd.Math.max(0,b.a+a.a-(c.a+d));}return f} -function MDd(a,b,c){var d,e,f,g,h;if(c){e=c.a.length;d=new vue(e);for(h=(d.b-d.a)*d.c<0?(uue(),tue):new Rue(d);h.Ob();){g=RD(h.Pb(),17);f=xDd(c,g.a);kIe in f.a||lIe in f.a?yEd(a,f,b):EEd(a,f,b);OGd(RD(Wjb(a.b,uDd(f)),74))}}} -function jXd(a){var b,c;switch(a.b){case -1:{return true}case 0:{c=a.t;if(c>1||c==-1){a.b=-1;return true}else{b=WVd(a);if(!!b&&(nke(),b.lk()==aKe)){a.b=-1;return true}else{a.b=1;return false}}}default:case 1:{return false}}} -function Sqe(a,b){var c,d,e,f;Mqe(a);if(a.c!=0||a.a!=123)throw Adb(new Lqe(TId((Hde(),eJe))));f=b==112;d=a.d;c=phb(a.i,125,d);if(c<0)throw Adb(new Lqe(TId((Hde(),fJe))));e=zhb(a.i,d,c);a.d=c+1;return ite(e,f,(a.e&512)==512)} -function YTb(a){var b,c,d,e,f,g,h;d=a.a.c.length;if(d>0){g=a.c.d;h=a.d.d;e=ijd(ojd(new rjd(h.a,h.b),g),1/(d+1));f=new rjd(g.a,g.b);for(c=new Anb(a.a);c.a=0&&f=0?a.Lh(c,true,true):Qvd(a,e,true),160));return RD(d,220).Wl(b)}else{throw Adb(new agb(KHe+b.xe()+NHe))}} -function _ae(){Tae();var a;if(Sae)return RD(N5d((YSd(),XSd),AKe),2038);RRd(UK,new hde);abe();a=RD(ZD(Xjb((YSd(),XSd),AKe),560)?Xjb(XSd,AKe):new $ae,560);Sae=true;Yae(a);Zae(a);Zjb((hTd(),gTd),a,new cbe);$jb(XSd,AKe,a);return a} -function Vfe(a,b){var c,d,e,f;a.j=-1;if(Mvd(a.e)){c=a.i;f=a.i!=0;LHd(a,b);d=new P3d(a.e,3,a.c,null,b,c,f);e=b.zl(a.e,a.c,null);e=Hge(a,b,e);if(!e){qvd(a.e,d)}else{e.nj(d);e.oj()}}else{LHd(a,b);e=b.zl(a.e,a.c,null);!!e&&e.oj()}} -function HA(a,b){var c,d,e;e=0;d=b[0];if(d>=a.length){return -1}c=(BFb(d,a.length),a.charCodeAt(d));while(c>=48&&c<=57){e=e*10+(c-48);++d;if(d>=a.length){break}c=(BFb(d,a.length),a.charCodeAt(d))}d>b[0]?(b[0]=d):(e=-1);return e} -function mPb(a){var b,c,d,e,f;e=RD(a.a,17).a;f=RD(a.b,17).a;c=e;d=f;b=$wnd.Math.max($wnd.Math.abs(e),$wnd.Math.abs(f));if(e<=0&&e==f){c=0;d=f-1}else{if(e==-b&&f!=b){c=f;d=e;f>=0&&++c}else{c=-f;d=e}}return new Ptd(sgb(c),sgb(d))} -function YPb(a,b,c,d){var e,f,g,h,i,j;for(e=0;e=0&&j>=0&&i=a.i)throw Adb(new veb(MIe+b+NIe+a.i));if(c>=a.i)throw Adb(new veb(OIe+c+NIe+a.i));d=a.g[c];if(b!=c){b>16);b=d>>16&16;c=16-b;a=a>>b;d=a-256;b=d>>16&8;c+=b;a<<=b;d=a-qxe;b=d>>16&4;c+=b;a<<=b;d=a-Ove;b=d>>16&2;c+=b;a<<=b;d=a>>14;b=d&~(d>>1);return c+2-b}} -function RSb(a){HSb();var b,c,d,e;GSb=new bnb;FSb=new Tsb;ESb=new bnb;b=(!a.a&&(a.a=new C5d(J4,a,10,11)),a.a);JSb(b);for(e=new dMd(b);e.e!=e.i.gc();){d=RD(bMd(e),27);if(Wmb(GSb,d,0)==-1){c=new bnb;Rmb(ESb,c);KSb(d,c)}}return ESb} -function sTb(a,b,c){var d,e,f,g;a.a=c.b.d;if(ZD(b,326)){e=IGd(RD(b,74),false,false);f=ssd(e);d=new wTb(a);xgb(f,d);lsd(f,e);b.of((umd(),cld))!=null&&xgb(RD(b.of(cld),75),d)}else{g=RD(b,422);g.rh(g.nh()+a.a.a);g.sh(g.oh()+a.a.b)}} -function hWc(a,b){var c,d,e;e=new bnb;for(d=Sub(b.a,0);d.b!=d.d.c;){c=RD(evb(d),65);c.c.g==a.g&&dE(mQb(c.b,(h_c(),f_c)))!==dE(mQb(c.c,f_c))&&!yDb(new SDb(null,new Swb(e,16)),new IWc(c))&&(ZEb(e.c,c),true)}_mb(e,new KWc);return e} -function fUb(a,b,c){var d,e,f,g;if(ZD(b,153)&&ZD(c,153)){f=RD(b,153);g=RD(c,153);return a.a[f.a][g.a]+a.a[g.a][f.a]}else if(ZD(b,250)&&ZD(c,250)){d=RD(b,250);e=RD(c,250);if(d.a==e.a){return RD(mQb(e.a,(yVb(),lVb)),17).a}}return 0} -function q9b(a,b){var c,d,e,f,g,h,i,j;j=Kfb(UD(mQb(b,(yCc(),fCc))));i=a[0].n.a+a[0].o.a+a[0].d.c+j;for(h=1;h=0){return c}h=ejd(ojd(new rjd(g.c+g.b/2,g.d+g.a/2),new rjd(f.c+f.b/2,f.d+f.a/2)));return -(oRb(f,g)-1)*h} -function ysd(a,b,c){var d;FDb(new SDb(null,(!c.a&&(c.a=new C5d(F4,c,6,6)),new Swb(c.a,16))),new Qsd(a,b));FDb(new SDb(null,(!c.n&&(c.n=new C5d(I4,c,1,7)),new Swb(c.n,16))),new Ssd(a,b));d=RD(Gxd(c,(umd(),cld)),75);!!d&&Bjd(d,a,b)} -function Qvd(a,b,c){var d,e,f;f=Eee((lke(),jke),a.Dh(),b);if(f){nke();RD(f,69).xk()||(f=zfe(Qee(jke,f)));e=(d=a.Ih(f),RD(d>=0?a.Lh(d,true,true):Qvd(a,f,true),160));return RD(e,220).Sl(b,c)}else{throw Adb(new agb(KHe+b.xe()+NHe))}} -function WNd(a,b,c,d){var e,f,g,h,i;e=a.d[b];if(e){f=e.g;i=e.i;if(d!=null){for(h=0;h=c){d=b;j=(i.c+i.a)/2;g=j-c;if(i.c<=j-c){e=new BTc(i.c,g);Qmb(a,d++,e)}h=j+c;if(h<=i.a){f=new BTc(h,i.a);wFb(d,a.c.length);XEb(a.c,d,f)}}} -function mZc(a,b,c){var d,e,f,g,h,i;if(!b.dc()){e=new Yub;for(i=b.Kc();i.Ob();){h=RD(i.Pb(),40);Zjb(a.a,sgb(h.g),sgb(c));for(g=(d=Sub((new dXc(h)).a.d,0),new gXc(d));dvb(g.a);){f=RD(evb(g.a),65).c;Pub(e,f,e.c.b,e.c)}}mZc(a,e,c+1)}} -function Ude(a){var b;if(!a.c&&a.g==null){a.d=a.bj(a.f);WGd(a,a.d);b=a.d}else{if(a.g==null){return true}else if(a.i==0){return false}else{b=RD(a.g[a.i-1],51)}}if(b==a.b&&null.Vm>=null.Um()){tId(a);return Ude(a)}else{return b.Ob()}} -function t_b(a){this.a=a;if(a.c.i.k==(r3b(),m3b)){this.c=a.c;this.d=RD(mQb(a.c.i,(Ywc(),hwc)),64)}else if(a.d.i.k==m3b){this.c=a.d;this.d=RD(mQb(a.d.i,(Ywc(),hwc)),64)}else{throw Adb(new agb('Edge '+a+' is not an external edge.'))}} -function O1d(a,b){var c,d,e;e=a.b;a.b=b;(a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new N3d(a,1,3,e,a.b));if(!b){PAd(a,null);Q1d(a,0);P1d(a,null)}else if(b!=a){PAd(a,b.zb);Q1d(a,b.d);c=(d=b.c,d==null?b.zb:d);P1d(a,c==null||lhb(c,b.zb)?null:c)}} -function hj(a,b){var c;this.e=(tm(),Qb(a),tm(),zm(a));this.c=(Qb(b),zm(b));Lb(this.e.Rd().dc()==this.c.Rd().dc());this.d=Uv(this.e);this.b=Uv(this.c);c=YC(jJ,[Nve,rve],[5,1],5,[this.e.Rd().gc(),this.c.Rd().gc()],2);this.a=c;Zi(this)} -function Lz(b){var c=(!Jz&&(Jz=Mz()),Jz);var d=b.replace(/[\x00-\x1f\xad\u0600-\u0603\u06dd\u070f\u17b4\u17b5\u200b-\u200f\u2028-\u202e\u2060-\u2064\u206a-\u206f\ufeff\ufff9-\ufffb"\\]/g,function(a){return Kz(a,c)});return '"'+d+'"'} -function VEb(a,b,c,d,e,f){var g,h,i,j,k;if(e==0){return}if(dE(a)===dE(c)){a=a.slice(b,b+e);b=0}i=c;for(h=b,j=b+e;h=g)throw Adb(new aMd(b,g));e=c[b];if(g==1){d=null}else{d=$C(d6,IJe,424,g-1,0,1);hib(c,0,d,0,b);f=g-b-1;f>0&&hib(c,b+1,d,b,f)}Bde(a,d);Ade(a,b,e);return e} -function l3d(a){var b,c;if(a.f){while(a.n0?(f=vpd(c)):(f=spd(vpd(c)))}Ixd(b,GBc,f)} -function agc(a,b){var c;b.Ug('Partition preprocessing',1);c=RD(zDb(CDb(EDb(CDb(new SDb(null,new Swb(a.a,16)),new egc),new ggc),new igc),tBb(new ZBb,new XBb,new wCb,cD(WC(QL,1),jwe,108,0,[(xBb(),vBb)]))),15);FDb(c.Oc(),new kgc);b.Vg()} -function Uoc(a,b){var c,d,e,f,g;g=a.j;b.a!=b.b&&_mb(g,new ypc);e=g.c.length/2|0;for(d=0;d0&&uLc(a,c,b);return f}else if(d.a!=null){uLc(a,b,c);return -1}else if(e.a!=null){uLc(a,c,b);return 1}return 0} -function EVc(a,b){var c,d,e,f,g;e=b.b.b;a.a=$C(QK,Ize,15,e,0,1);a.b=$C(xdb,Hye,28,e,16,1);for(g=Sub(b.b,0);g.b!=g.d.c;){f=RD(evb(g),40);a.a[f.g]=new Yub}for(d=Sub(b.a,0);d.b!=d.d.c;){c=RD(evb(d),65);a.a[c.b.g].Fc(c);a.a[c.c.g].Fc(c)}} -function SJd(a,b){var c,d,e,f;if(a.Pj()){c=a.Ej();f=a.Qj();++a.j;a.qj(c,a.Zi(c,b));d=a.Ij(3,null,b,c,f);if(a.Mj()){e=a.Nj(b,null);if(!e){a.Jj(d)}else{e.nj(d);e.oj()}}else{a.Jj(d)}}else{_Id(a,b);if(a.Mj()){e=a.Nj(b,null);!!e&&e.oj()}}} -function oLd(a,b,c){var d,e,f;if(a.Pj()){f=a.Qj();KHd(a,b,c);d=a.Ij(3,null,c,b,f);if(a.Mj()){e=a.Nj(c,null);a.Tj()&&(e=a.Uj(c,e));if(!e){a.Jj(d)}else{e.nj(d);e.oj()}}else{a.Jj(d)}}else{KHd(a,b,c);if(a.Mj()){e=a.Nj(c,null);!!e&&e.oj()}}} -function bge(a,b){var c,d,e,f,g;g=pke(a.e.Dh(),b);e=new YHd;c=RD(a.g,124);for(f=a.i;--f>=0;){d=c[f];g.am(d.Lk())&&WGd(e,d)}!wLd(a,e)&&Mvd(a.e)&&eZd(a,b.Jk()?fge(a,6,b,(yob(),vob),null,-1,false):fge(a,b.tk()?2:1,b,null,null,-1,false))} -function _7b(a,b){var c,d,e,f,g;if(a.a==($uc(),Yuc)){return true}f=b.a.c;c=b.a.c+b.a.b;if(b.j){d=b.A;g=d.c.c.a-d.o.a/2;e=f-(d.n.a+d.o.a);if(e>g){return false}}if(b.q){d=b.C;g=d.c.c.a-d.o.a/2;e=d.n.a-c;if(e>g){return false}}return true} -function bRc(a){WQc();var b,c,d,e,f,g,h;c=new gub;for(e=new Anb(a.e.b);e.a1?(a.e*=Kfb(a.a)):(a.f/=Kfb(a.a));uRb(a);vRb(a);rRb(a);pQb(a.b,(tSb(),lSb),a.g)} -function n9b(a,b,c){var d,e,f,g,h,i;d=0;i=c;if(!b){d=c*(a.c.length-1);i*=-1}for(f=new Anb(a);f.a=0?a.Ah(null):a.Ph().Th(a,-1-b,null,null));a.Bh(RD(e,54),c);!!d&&d.oj();a.vh()&&a.wh()&&c>-1&&qvd(a,new N3d(a,9,c,f,e));return e}}}return f} -function stb(a,b){var c,d,e,f,g;f=a.b.Ce(b);d=(c=a.a.get(f),c==null?$C(jJ,rve,1,0,5,1):c);for(g=0;g>5;if(e>=a.d){return a.e<0}c=a.a[e];b=1<<(b&31);if(a.e<0){d=Uib(a);if(e>16)),15).dd(f);if(h0){!(Dmd(a.a.c)&&b.n.d)&&!(Emd(a.a.c)&&b.n.b)&&(b.g.d+=$wnd.Math.max(0,d/2-0.5));!(Dmd(a.a.c)&&b.n.a)&&!(Emd(a.a.c)&&b.n.c)&&(b.g.a-=d-1)}}} -function c7b(a){var b,c,d,e,f;e=new bnb;f=d7b(a,e);b=RD(mQb(a,(Ywc(),Iwc)),10);if(b){for(d=new Anb(b.j);d.a>b;f=a.m>>b|c<<22-b;e=a.l>>b|a.m<<22-b}else if(b<44){g=d?exe:0;f=c>>b-22;e=a.m>>b-22|c<<44-b}else{g=d?exe:0;f=d?dxe:0;e=c>>b-44}return hD(e&dxe,f&dxe,g&exe)} -function ORb(a){var b,c,d,e,f,g;this.c=new bnb;this.d=a;d=oxe;e=oxe;b=pxe;c=pxe;for(g=Sub(a,0);g.b!=g.d.c;){f=RD(evb(g),8);d=$wnd.Math.min(d,f.a);e=$wnd.Math.min(e,f.b);b=$wnd.Math.max(b,f.a);c=$wnd.Math.max(c,f.b)}this.a=new Uid(d,e,b-d,c-e)} -function Udc(a,b){var c,d,e,f,g,h;for(f=new Anb(a.b);f.a0&&ZD(b,44)){a.a._j();j=RD(b,44);i=j.ld();f=i==null?0:tb(i);g=bOd(a.a,f);c=a.a.d[g];if(c){d=RD(c.g,379);k=c.i;for(h=0;h=2){c=e.Kc();b=UD(c.Pb());while(c.Ob()){f=b;b=UD(c.Pb());d=$wnd.Math.min(d,(uFb(b),b)-(uFb(f),f))}}return d} -function iWc(a,b){var c,d,e;e=new bnb;for(d=Sub(b.a,0);d.b!=d.d.c;){c=RD(evb(d),65);c.b.g==a.g&&!lhb(c.b.c,IEe)&&dE(mQb(c.b,(h_c(),f_c)))!==dE(mQb(c.c,f_c))&&!yDb(new SDb(null,new Swb(e,16)),new OWc(c))&&(ZEb(e.c,c),true)}_mb(e,new QWc);return e} -function $u(a,b){var c,d,e;if(dE(b)===dE(Qb(a))){return true}if(!ZD(b,15)){return false}d=RD(b,15);e=a.gc();if(e!=d.gc()){return false}if(ZD(d,59)){for(c=0;c0&&(e=c);for(g=new Anb(a.f.e);g.a0){b-=1;c-=1}else{if(d>=0&&e<0){b+=1;c+=1}else{if(d>0&&e>=0){b-=1;c+=1}else{b+=1;c-=1}}}}}return new Ptd(sgb(b),sgb(c))} -function nNc(a,b){if(a.cb.c){return 1}else if(a.bb.b){return 1}else if(a.a!=b.a){return tb(a.a)-tb(b.a)}else if(a.d==(sNc(),rNc)&&b.d==qNc){return -1}else if(a.d==qNc&&b.d==rNc){return 1}return 0} -function ARc(a,b){var c,d,e,f,g;f=b.a;f.c.i==b.b?(g=f.d):(g=f.c);f.c.i==b.b?(d=f.c):(d=f.d);e=lQc(a.a,g,d);if(e>0&&e0}else if(e<0&&-e0}return false} -function X9c(a,b,c,d){var e,f,g,h,i,j,k,l;e=(b-a.d)/a.c.c.length;f=0;a.a+=c;a.d=b;for(l=new Anb(a.c);l.a>24}return g} -function Bfb(a){if(a.ze()){var b=a.c;b.Ae()?(a.o='['+b.n):!b.ze()?(a.o='[L'+b.xe()+';'):(a.o='['+b.xe());a.b=b.we()+'[]';a.k=b.ye()+'[]';return}var c=a.j;var d=a.d;d=d.split('/');a.o=Efb('.',[c,Efb('$',d)]);a.b=Efb('.',[c,Efb('.',d)]);a.k=d[d.length-1]} -function hJb(a,b){var c,d,e,f,g;g=null;for(f=new Anb(a.e.a);f.a=0;b-=2){for(c=0;c<=b;c+=2){if(a.b[c]>a.b[c+2]||a.b[c]===a.b[c+2]&&a.b[c+1]>a.b[c+3]){d=a.b[c+2];a.b[c+2]=a.b[c];a.b[c]=d;d=a.b[c+3];a.b[c+3]=a.b[c+1];a.b[c+1]=d}}}a.c=true} -function nKc(a,b){var c,d,e,f,g,h,i,j,k;j=-1;k=0;for(g=a,h=0,i=g.length;h0&&++k}}++j}return k} -function awd(a){var b,c;c=new dib(nfb(a.Rm));c.a+='@';Zhb(c,(b=tb(a)>>>0,b.toString(16)));if(a.Vh()){c.a+=' (eProxyURI: ';Yhb(c,a._h());if(a.Kh()){c.a+=' eClass: ';Yhb(c,a.Kh())}c.a+=')'}else if(a.Kh()){c.a+=' (eClass: ';Yhb(c,a.Kh());c.a+=')'}return c.a} -function KGb(a){var b,c,d,e;if(a.e){throw Adb(new dgb((lfb(lN),lye+lN.k+mye)))}a.d==(Cmd(),Amd)&&JGb(a,ymd);for(c=new Anb(a.a.a);c.a>24}return c} -function cNb(a,b,c){var d,e,f;e=RD(Vrb(a.i,b),314);if(!e){e=new UKb(a.d,b,c);Wrb(a.i,b,e);if(jMb(b)){tKb(a.a,b.c,b.b,e)}else{f=iMb(b);d=RD(Vrb(a.p,f),252);switch(f.g){case 1:case 3:e.j=true;cLb(d,b.b,e);break;case 4:case 2:e.k=true;cLb(d,b.c,e);}}}return e} -function Ndc(a,b){var c,d,e,f,g,h,i,j,k;i=ev(a.c-a.b&a.a.length-1);j=null;k=null;for(f=new Kmb(a);f.a!=f.b;){e=RD(Imb(f),10);c=(h=RD(mQb(e,(Ywc(),vwc)),12),!h?null:h.i);d=(g=RD(mQb(e,wwc),12),!g?null:g.i);if(j!=c||k!=d){Rdc(i,b);j=c;k=d}ZEb(i.c,e)}Rdc(i,b)} -function Rge(a,b,c,d){var e,f,g,h,i,j;h=new YHd;i=pke(a.e.Dh(),b);e=RD(a.g,124);nke();if(RD(b,69).xk()){for(g=0;g=0){return e}else{f=1;for(h=new Anb(b.j);h.a=0){return e}else{f=1;for(h=new Anb(b.j);h.a0&&b.Ne((tFb(e-1,a.c.length),RD(a.c[e-1],10)),f)>0){$mb(a,e,(tFb(e-1,a.c.length),RD(a.c[e-1],10)));--e}tFb(e,a.c.length);a.c[e]=f}c.a=new Tsb;c.b=new Tsb} -function yhd(a,b,c){var d,e,f,g,h,i,j,k;k=(d=RD(b.e&&b.e(),9),new Fsb(d,RD(WEb(d,d.length),9),0));i=vhb(c,'[\\[\\]\\s,]+');for(f=i,g=0,h=f.length;g=0){if(!b){b=new Rhb;d>0&&Nhb(b,(AFb(0,d,a.length),a.substr(0,d)))}b.a+='\\';Jhb(b,c&Bwe)}else !!b&&Jhb(b,c&Bwe)}return b?b.a:a} -function MYb(a){var b,c,d;for(c=new Anb(a.a.a.b);c.a0){!(Dmd(a.a.c)&&b.n.d)&&!(Emd(a.a.c)&&b.n.b)&&(b.g.d-=$wnd.Math.max(0,d/2-0.5));!(Dmd(a.a.c)&&b.n.a)&&!(Emd(a.a.c)&&b.n.c)&&(b.g.a+=$wnd.Math.max(0,d-1))}}} -function Ydc(a,b,c){var d,e;if((a.c-a.b&a.a.length-1)==2){if(b==(qpd(),Yod)||b==Xod){Odc(RD(omb(a),15),(Pnd(),Lnd));Odc(RD(omb(a),15),Mnd)}else{Odc(RD(omb(a),15),(Pnd(),Mnd));Odc(RD(omb(a),15),Lnd)}}else{for(e=new Kmb(a);e.a!=e.b;){d=RD(Imb(e),15);Odc(d,c)}}} -function HGd(a,b){var c,d,e,f,g,h,i;e=cv(new QGd(a));h=new Jkb(e,e.c.length);f=cv(new QGd(b));i=new Jkb(f,f.c.length);g=null;while(h.b>0&&i.b>0){c=(sFb(h.b>0),RD(h.a.Xb(h.c=--h.b),27));d=(sFb(i.b>0),RD(i.a.Xb(i.c=--i.b),27));if(c==d){g=c}else{break}}return g} -function Dmc(a,b,c){var d,e,f,g;if(Hmc(a,b)>Hmc(a,c)){d=b3b(c,(qpd(),Xod));a.d=d.dc()?0:L3b(RD(d.Xb(0),12));g=b3b(b,ppd);a.b=g.dc()?0:L3b(RD(g.Xb(0),12))}else{e=b3b(c,(qpd(),ppd));a.d=e.dc()?0:L3b(RD(e.Xb(0),12));f=b3b(b,Xod);a.b=f.dc()?0:L3b(RD(f.Xb(0),12))}} -function wNb(a,b){var c,d,e,f;c=a.o.a;for(f=RD(RD(Qc(a.r,b),21),87).Kc();f.Ob();){e=RD(f.Pb(),117);e.e.a=c*Kfb(UD(e.b.of(sNb)));e.e.b=(d=e.b,d.pf((umd(),Gld))?d.ag()==(qpd(),Yod)?-d.Mf().b-Kfb(UD(d.of(Gld))):Kfb(UD(d.of(Gld))):d.ag()==(qpd(),Yod)?-d.Mf().b:0)}} -function Mhc(a,b){var c,d,e,f;b.Ug('Self-Loop pre-processing',1);for(d=new Anb(a.a);d.aa.c){break}else if(e.a>=a.s){f<0&&(f=g);h=g}}i=(a.s+a.c)/2;if(f>=0){d=lTc(a,b,f,h);i=yTc((tFb(d,b.c.length),RD(b.c[d],339)));wTc(b,d,c)}return i} -function _Ad(a,b,c){var d,e,f,g,h,i,j;g=(f=new pVd,f);nVd(g,(uFb(b),b));j=(!g.b&&(g.b=new SVd((JTd(),FTd),C8,g)),g.b);for(i=1;i0&&ASb(this,e)}} -function zTb(a,b,c,d,e,f){var g,h,i;if(!e[b.a]){e[b.a]=true;g=d;!g&&(g=new gUb);Rmb(g.e,b);for(i=f[b.a].Kc();i.Ob();){h=RD(i.Pb(),290);if(h.d==c||h.c==c){continue}h.c!=b&&zTb(a,h.c,b,g,e,f);h.d!=b&&zTb(a,h.d,b,g,e,f);Rmb(g.c,h);Tmb(g.d,h.b)}return g}return null} -function v7b(a){var b,c,d,e,f,g,h;b=0;for(e=new Anb(a.e);e.a=2} -function _qc(a,b,c,d,e){var f,g,h,i,j,k;f=a.c.d.j;g=RD(ju(c,0),8);for(k=1;k1){return false}b=ysb(Xnd,cD(WC(A3,1),jwe,95,0,[Wnd,Znd]));if(dy(Tx(b,a))>1){return false}d=ysb(cod,cD(WC(A3,1),jwe,95,0,[bod,aod]));if(dy(Tx(d,a))>1){return false}return true} -function $Uc(a,b,c){var d,e,f;for(f=new Anb(a.t);f.a0){d.b.n-=d.c;d.b.n<=0&&d.b.u>0&&Mub(b,d.b)}}for(e=new Anb(a.i);e.a0){d.a.u-=d.c;d.a.u<=0&&d.a.n>0&&Mub(c,d.a)}}} -function tId(a){var b,c,d,e,f;if(a.g==null){a.d=a.bj(a.f);WGd(a,a.d);if(a.c){f=a.f;return f}}b=RD(a.g[a.i-1],51);e=b.Pb();a.e=b;c=a.bj(e);if(c.Ob()){a.d=c;WGd(a,c)}else{a.d=null;while(!b.Ob()){bD(a.g,--a.i,null);if(a.i==0){break}d=RD(a.g[a.i-1],51);b=d}}return e} -function Rfe(a,b){var c,d,e,f,g,h;d=b;e=d.Lk();if(qke(a.e,e)){if(e.Si()&&cge(a,e,d.md())){return false}}else{h=pke(a.e.Dh(),e);c=RD(a.g,124);for(f=0;f1||c>1){return 2}}if(b+c==1){return 2}return 0} -function Kwb(a,b){var c,d,e,f,g,h;f=a.a*Mxe+a.b*1502;h=a.b*Mxe+11;c=$wnd.Math.floor(h*Nxe);f+=c;h-=c*Oxe;f%=Oxe;a.a=f;a.b=h;if(b<=24){return $wnd.Math.floor(a.a*Ewb[b])}else{e=a.a*(1<=2147483648&&(d-=4294967296);return d}} -function uSc(a,b,c){var d,e,f,g,h,i,j;f=new bnb;j=new Yub;g=new Yub;vSc(a,j,g,b);tSc(a,j,g,b,c);for(i=new Anb(a);i.ad.b.g&&(ZEb(f.c,d),true)}}return f} -function jed(a,b,c){var d,e,f,g,h,i;h=a.c;for(g=(!c.q?(yob(),yob(),wob):c.q).vc().Kc();g.Ob();){f=RD(g.Pb(),44);d=!QDb(CDb(new SDb(null,new Swb(h,16)),new PAb(new xed(b,f)))).Bd((xDb(),wDb));if(d){i=f.md();if(ZD(i,4)){e=FId(i);e!=null&&(i=e)}b.qf(RD(f.ld(),149),i)}}} -function mbd(a,b,c){var d,e;Sed(a.b);Ved(a.b,(gbd(),dbd),(_cd(),$cd));Ved(a.b,ebd,b.g);Ved(a.b,fbd,b.a);a.a=Qed(a.b,b);c.Ug('Compaction by shrinking a tree',a.a.c.length);if(b.i.c.length>1){for(e=new Anb(a.a);e.a=0?a.Lh(d,true,true):Qvd(a,f,true),160));RD(e,220).Xl(b,c)}else{throw Adb(new agb(KHe+b.xe()+LHe))}} -function k2d(a,b){var c,d,e,f,g;if(!b){return null}else{f=ZD(a.Cb,90)||ZD(a.Cb,102);g=!f&&ZD(a.Cb,331);for(d=new dMd((!b.a&&(b.a=new iae(b,o7,b)),b.a));d.e!=d.i.gc();){c=RD(bMd(d),89);e=i2d(c);if(f?ZD(e,90):g?ZD(e,156):!!e){return e}}return f?(JTd(),zTd):(JTd(),wTd)}} -function W8b(a,b){var c,d,e,f;b.Ug('Resize child graph to fit parent.',1);for(d=new Anb(a.b);d.a=2*b&&Rmb(c,new BTc(g[d-1]+b,g[d]-b))}return c} -function dEd(a,b,c){var d,e,f,g,h,j,k,l;if(c){f=c.a.length;d=new vue(f);for(h=(d.b-d.a)*d.c<0?(uue(),tue):new Rue(d);h.Ob();){g=RD(h.Pb(),17);e=xDd(c,g.a);!!e&&(i=null,j=sEd(a,(k=(bvd(),l=new PCd,l),!!b&&NCd(k,b),k),e),jyd(j,zDd(e,uIe)),GEd(e,j),HEd(e,j),CEd(a,e,j))}}} -function sYd(a){var b,c,d,e,f,g;if(!a.j){g=new f1d;b=iYd;f=b.a.zc(a,b);if(f==null){for(d=new dMd(zYd(a));d.e!=d.i.gc();){c=RD(bMd(d),29);e=sYd(c);YGd(g,e);WGd(g,c)}b.a.Bc(a)!=null}VHd(g);a.j=new N$d((RD(QHd(xYd((lTd(),kTd).o),11),19),g.i),g.g);yYd(a).b&=-33}return a.j} -function lne(a){var b,c,d,e;if(a==null){return null}else{d=nue(a,true);e=mLe.length;if(lhb(d.substr(d.length-e,e),mLe)){c=d.length;if(c==4){b=(BFb(0,d.length),d.charCodeAt(0));if(b==43){return Yme}else if(b==45){return Xme}}else if(c==3){return Yme}}return new Ufb(d)}} -function pD(a){var b,c,d;c=a.l;if((c&c-1)!=0){return -1}d=a.m;if((d&d-1)!=0){return -1}b=a.h;if((b&b-1)!=0){return -1}if(b==0&&d==0&&c==0){return -1}if(b==0&&d==0&&c!=0){return ogb(c)}if(b==0&&d!=0&&c==0){return ogb(d)+22}if(b!=0&&d==0&&c==0){return ogb(b)+44}return -1} -function yo(a,b){var c,d,e,f,g;e=b.a&a.f;f=null;for(d=a.b[e];true;d=d.b){if(d==b){!f?(a.b[e]=b.b):(f.b=b.b);break}f=d}g=b.f&a.f;f=null;for(c=a.c[g];true;c=c.d){if(c==b){!f?(a.c[g]=b.d):(f.d=b.d);break}f=c}!b.e?(a.a=b.c):(b.e.c=b.c);!b.c?(a.e=b.e):(b.c.e=b.e);--a.i;++a.g} -function Dt(a,b){var c;b.d?(b.d.b=b.b):(a.a=b.b);b.b?(b.b.d=b.d):(a.e=b.d);if(!b.e&&!b.c){c=RD(Hvb(RD(_jb(a.b,b.a),260)),260);c.a=0;++a.c}else{c=RD(Hvb(RD(Wjb(a.b,b.a),260)),260);--c.a;!b.e?(c.b=RD(Hvb(b.c),511)):(b.e.c=b.c);!b.c?(c.c=RD(Hvb(b.e),511)):(b.c.e=b.e)}--a.d} -function XPb(a){var b,c,d,e,f,g,h,i,j,k;c=a.o;b=a.p;g=lve;e=qwe;h=lve;f=qwe;for(j=0;j0);f.a.Xb(f.c=--f.b);Ikb(f,e);sFb(f.b3&&UA(a,0,b-3)}} -function eXb(a){var b,c,d,e;if(dE(mQb(a,(yCc(),IAc)))===dE((Fnd(),Cnd))){return !a.e&&dE(mQb(a,gAc))!==dE((xvc(),uvc))}d=RD(mQb(a,hAc),299);e=Heb(TD(mQb(a,nAc)))||dE(mQb(a,oAc))===dE((stc(),ptc));b=RD(mQb(a,fAc),17).a;c=a.a.c.length;return !e&&d!=(xvc(),uvc)&&(b==0||b>c)} -function Rnc(a){var b,c;c=0;for(;c0){break}}if(c>0&&c0){break}}if(b>0&&c>16!=6&&!!b){if(Oje(a,b))throw Adb(new agb(UHe+Qzd(a)));d=null;!!a.Cb&&(d=(c=a.Db>>16,c>=0?Czd(a,d):a.Cb.Th(a,-1-c,null,d)));!!b&&(d=Ivd(b,a,6,d));d=Bzd(a,b,d);!!d&&d.oj()}else (a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new N3d(a,1,6,b,b))} -function pzd(a,b){var c,d;if(b!=a.Cb||a.Db>>16!=3&&!!b){if(Oje(a,b))throw Adb(new agb(UHe+qzd(a)));d=null;!!a.Cb&&(d=(c=a.Db>>16,c>=0?jzd(a,d):a.Cb.Th(a,-1-c,null,d)));!!b&&(d=Ivd(b,a,12,d));d=izd(a,b,d);!!d&&d.oj()}else (a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new N3d(a,1,3,b,b))} -function NCd(a,b){var c,d;if(b!=a.Cb||a.Db>>16!=9&&!!b){if(Oje(a,b))throw Adb(new agb(UHe+OCd(a)));d=null;!!a.Cb&&(d=(c=a.Db>>16,c>=0?LCd(a,d):a.Cb.Th(a,-1-c,null,d)));!!b&&(d=Ivd(b,a,9,d));d=KCd(a,b,d);!!d&&d.oj()}else (a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new N3d(a,1,9,b,b))} -function tWd(b){var c,d,e,f,g;e=WVd(b);g=b.j;if(g==null&&!!e){return b.Jk()?null:e.ik()}else if(ZD(e,156)){d=e.jk();if(d){f=d.wi();if(f!=b.i){c=RD(e,156);if(c.nk()){try{b.g=f.ti(c,g)}catch(a){a=zdb(a);if(ZD(a,82)){b.g=null}else throw Adb(a)}}b.i=f}}return b.g}return null} -function nRb(a){var b;b=new bnb;Rmb(b,new TFb(new rjd(a.c,a.d),new rjd(a.c+a.b,a.d)));Rmb(b,new TFb(new rjd(a.c,a.d),new rjd(a.c,a.d+a.a)));Rmb(b,new TFb(new rjd(a.c+a.b,a.d+a.a),new rjd(a.c+a.b,a.d)));Rmb(b,new TFb(new rjd(a.c+a.b,a.d+a.a),new rjd(a.c,a.d+a.a)));return b} -function ic(b){var c,d,e;if(b==null){return vve}try{return jeb(b)}catch(a){a=zdb(a);if(ZD(a,103)){c=a;e=nfb(rb(b))+'@'+(d=(gib(),jFb(b))>>>0,d.toString(16));lBb(pBb(),(SAb(),'Exception during lenientFormat for '+e),c);return '<'+e+' threw '+nfb(c.Rm)+'>'}else throw Adb(a)}} -function mTb(a,b,c){var d,e,f;for(f=b.a.ec().Kc();f.Ob();){e=RD(f.Pb(),74);d=RD(Wjb(a.b,e),272);!d&&(vCd(JGd(e))==vCd(LGd(e))?lTb(a,e,c):JGd(e)==vCd(LGd(e))?Wjb(a.c,e)==null&&Wjb(a.b,LGd(e))!=null&&oTb(a,e,c,false):Wjb(a.d,e)==null&&Wjb(a.b,JGd(e))!=null&&oTb(a,e,c,true))}} -function Pfc(a,b){var c,d,e,f,g,h,i;for(e=a.Kc();e.Ob();){d=RD(e.Pb(),10);h=new R3b;P3b(h,d);Q3b(h,(qpd(),Xod));pQb(h,(Ywc(),Hwc),(Geb(),true));for(g=b.Kc();g.Ob();){f=RD(g.Pb(),10);i=new R3b;P3b(i,f);Q3b(i,ppd);pQb(i,Hwc,true);c=new a1b;pQb(c,Hwc,true);Y0b(c,h);Z0b(c,i)}}} -function Pqc(a,b,c,d){var e,f,g,h;e=Nqc(a,b,c);f=Nqc(a,c,b);g=RD(Wjb(a.c,b),118);h=RD(Wjb(a.c,c),118);if(e1){b=eJb((c=new gJb,++a.b,c),a.d);for(h=Sub(f,0);h.b!=h.d.c;){g=RD(evb(h),125);rIb(uIb(tIb(vIb(sIb(new wIb,1),0),b),g))}}} -function isc(a,b,c){var d,e,f,g,h;c.Ug('Breaking Point Removing',1);a.a=RD(mQb(b,(yCc(),yAc)),223);for(f=new Anb(b.b);f.a>16!=11&&!!b){if(Oje(a,b))throw Adb(new agb(UHe+zCd(a)));d=null;!!a.Cb&&(d=(c=a.Db>>16,c>=0?sCd(a,d):a.Cb.Th(a,-1-c,null,d)));!!b&&(d=Ivd(b,a,10,d));d=rCd(a,b,d);!!d&&d.oj()}else (a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new N3d(a,1,11,b,b))} -function C0b(a){var b,c,d,e;for(d=new vkb((new mkb(a.b)).a);d.b;){c=tkb(d);e=RD(c.ld(),12);b=RD(c.md(),10);pQb(b,(Ywc(),Awc),e);pQb(e,Iwc,b);pQb(e,nwc,(Geb(),true));Q3b(e,RD(mQb(b,hwc),64));mQb(b,hwc);pQb(e.i,(yCc(),BBc),(Bod(),yod));RD(mQb(Y2b(e.i),kwc),21).Fc((ovc(),kvc))}} -function X7b(a,b,c){var d,e,f,g,h,i;f=0;g=0;if(a.c){for(i=new Anb(a.d.i.j);i.af.a){return -1}else if(e.ai){k=a.d;a.d=$C(D6,KJe,66,2*i+4,0,1);for(f=0;f=9223372036854775807){return MD(),ID}e=false;if(a<0){e=true;a=-a}d=0;if(a>=hxe){d=eE(a/hxe);a-=d*hxe}c=0;if(a>=gxe){c=eE(a/gxe);a-=c*gxe}b=eE(a);f=hD(b,c,d);e&&nD(f);return f} -function KCb(a){var b,c,d,e,f;f=new bnb;Umb(a.b,new SEb(f));a.b.c.length=0;if(f.c.length!=0){b=(tFb(0,f.c.length),RD(f.c[0],82));for(c=1,d=f.c.length;c=-b&&d==b){return new Ptd(sgb(c-1),sgb(d))}return new Ptd(sgb(c),sgb(d-1))} -function lcc(){hcc();return cD(WC(YS,1),jwe,81,0,[nbc,kbc,obc,Ebc,Xbc,Ibc,bcc,Nbc,Vbc,zbc,Rbc,Mbc,Wbc,vbc,dcc,ebc,Qbc,Zbc,Fbc,Ybc,fcc,Tbc,fbc,Ubc,gcc,_bc,ecc,Gbc,sbc,Hbc,Dbc,ccc,ibc,qbc,Kbc,hbc,Lbc,Bbc,wbc,Obc,ybc,lbc,jbc,Cbc,xbc,Pbc,acc,gbc,Sbc,Abc,Jbc,tbc,rbc,$bc,pbc,ubc,mbc])} -function Cmc(a,b,c){a.d=0;a.b=0;b.k==(r3b(),q3b)&&c.k==q3b&&RD(mQb(b,(Ywc(),Awc)),10)==RD(mQb(c,Awc),10)&&(Gmc(b).j==(qpd(),Yod)?Dmc(a,b,c):Dmc(a,c,b));b.k==q3b&&c.k==o3b?Gmc(b).j==(qpd(),Yod)?(a.d=1):(a.b=1):c.k==q3b&&b.k==o3b&&(Gmc(c).j==(qpd(),Yod)?(a.b=1):(a.d=1));Imc(a,b,c)} -function EFd(a){var b,c,d,e,f,g,h,i,j,k,l;l=HFd(a);b=a.a;i=b!=null;i&&sDd(l,'category',a.a);e=cve(new Xkb(a.d));g=!e;if(g){j=new MB;sC(l,'knownOptions',j);c=new MFd(j);xgb(new Xkb(a.d),c)}f=cve(a.g);h=!f;if(h){k=new MB;sC(l,'supportedFeatures',k);d=new OFd(k);xgb(a.g,d)}return l} -function Ly(a){var b,c,d,e,f,g,h,i,j;d=false;b=336;c=0;f=new hq(a.length);for(h=a,i=0,j=h.length;i>16!=7&&!!b){if(Oje(a,b))throw Adb(new agb(UHe+gCd(a)));d=null;!!a.Cb&&(d=(c=a.Db>>16,c>=0?cCd(a,d):a.Cb.Th(a,-1-c,null,d)));!!b&&(d=RD(b,54).Rh(a,1,H4,d));d=bCd(a,b,d);!!d&&d.oj()}else (a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new N3d(a,1,7,b,b))} -function lVd(a,b){var c,d;if(b!=a.Cb||a.Db>>16!=3&&!!b){if(Oje(a,b))throw Adb(new agb(UHe+oVd(a)));d=null;!!a.Cb&&(d=(c=a.Db>>16,c>=0?iVd(a,d):a.Cb.Th(a,-1-c,null,d)));!!b&&(d=RD(b,54).Rh(a,0,p7,d));d=hVd(a,b,d);!!d&&d.oj()}else (a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new N3d(a,1,3,b,b))} -function Mjb(a,b){Ljb();var c,d,e,f,g,h,i,j,k;if(b.d>a.d){h=a;a=b;b=h}if(b.d<63){return Qjb(a,b)}g=(a.d&-2)<<4;j=$ib(a,g);k=$ib(b,g);d=Gjb(a,Zib(j,g));e=Gjb(b,Zib(k,g));i=Mjb(j,k);c=Mjb(d,e);f=Mjb(Gjb(j,d),Gjb(e,k));f=Bjb(Bjb(f,i),c);f=Zib(f,g);i=Zib(i,g<<1);return Bjb(Bjb(i,f),c)} -function _Cc(){_Cc=geb;ZCc=new bDc(lEe,0);WCc=new bDc('LONGEST_PATH',1);XCc=new bDc('LONGEST_PATH_SOURCE',2);TCc=new bDc('COFFMAN_GRAHAM',3);VCc=new bDc(BBe,4);$Cc=new bDc('STRETCH_WIDTH',5);YCc=new bDc('MIN_WIDTH',6);SCc=new bDc('BF_MODEL_ORDER',7);UCc=new bDc('DF_MODEL_ORDER',8)} -function AKc(a,b,c){var d,e,f,g,h;g=aMc(a,c);h=$C(jR,WAe,10,b.length,0,1);d=0;for(f=g.Kc();f.Ob();){e=RD(f.Pb(),12);Heb(TD(mQb(e,(Ywc(),nwc))))&&(h[d++]=RD(mQb(e,Iwc),10))}if(d=0;f+=c?1:-1){g=g|b.c.lg(i,f,c,d&&!Heb(TD(mQb(b.j,(Ywc(),jwc))))&&!Heb(TD(mQb(b.j,(Ywc(),Owc)))));g=g|b.q.ug(i,f,c);g=g|CKc(a,i[f],c,d)}Ysb(a.c,b);return g} -function F6b(a,b,c){var d,e,f,g,h,i,j,k,l,m;for(k=u2b(a.j),l=0,m=k.length;l1&&(a.a=true);QQb(RD(c.b,68),$id(ajd(RD(b.b,68).c),ijd(ojd(ajd(RD(c.b,68).a),RD(b.b,68).a),e)));Odd(a,b);Qdd(a,c)}} -function tYb(a){var b,c,d,e,f,g,h;for(f=new Anb(a.a.a);f.a0&&f>0?(g.p=b++):d>0?(g.p=c++):f>0?(g.p=e++):(g.p=c++);}}yob();_mb(a.j,new Lfc)} -function zic(a){var b,c;c=null;b=RD(Vmb(a.g,0),18);do{c=b.d.i;if(nQb(c,(Ywc(),wwc))){return RD(mQb(c,wwc),12).i}if(c.k!=(r3b(),p3b)&&gs(new is(Mr(a3b(c).a.Kc(),new ir)))){b=RD(hs(new is(Mr(a3b(c).a.Kc(),new ir))),18)}else if(c.k!=p3b){return null}}while(!!c&&c.k!=(r3b(),p3b));return c} -function sqc(a,b){var c,d,e,f,g,h,i,j,k;h=b.j;g=b.g;i=RD(Vmb(h,h.c.length-1),113);k=(tFb(0,h.c.length),RD(h.c[0],113));j=oqc(a,g,i,k);for(f=1;fj){i=c;k=e;j=d}}b.a=k;b.c=i} -function fMc(a,b,c){var d,e,f,g,h,i,j;j=new yAb(new TMc(a));for(g=cD(WC(xR,1),XAe,12,0,[b,c]),h=0,i=g.length;hi-a.b&&hi-a.a&&h0){if(f.a){h=f.b.Mf().a;if(c>h){e=(c-h)/2;f.d.b=e;f.d.c=e}}else{f.d.c=a.s+c}}else if(Rod(a.u)){d=wsd(f.b);d.c<0&&(f.d.b=-d.c);d.c+d.b>f.b.Mf().a&&(f.d.c=d.c+d.b-f.b.Mf().a)}}} -function RUc(a,b){var c,d,e,f,g;g=new bnb;c=b;do{f=RD(Wjb(a.b,c),131);f.B=c.c;f.D=c.d;ZEb(g.c,f);c=RD(Wjb(a.k,c),18)}while(c);d=(tFb(0,g.c.length),RD(g.c[0],131));d.j=true;d.A=RD(d.d.a.ec().Kc().Pb(),18).c.i;e=RD(Vmb(g,g.c.length-1),131);e.q=true;e.C=RD(e.d.a.ec().Kc().Pb(),18).d.i;return g} -function pPb(a){var b,c;b=RD(a.a,17).a;c=RD(a.b,17).a;if(b>=0){if(b==c){return new Ptd(sgb(-b-1),sgb(-b-1))}if(b==-c){return new Ptd(sgb(-b),sgb(c+1))}}if($wnd.Math.abs(b)>$wnd.Math.abs(c)){if(b<0){return new Ptd(sgb(-b),sgb(c))}return new Ptd(sgb(-b),sgb(c+1))}return new Ptd(sgb(b+1),sgb(c))} -function H8b(a){var b,c;c=RD(mQb(a,(yCc(),UAc)),171);b=RD(mQb(a,(Ywc(),owc)),311);if(c==(cxc(),$wc)){pQb(a,UAc,bxc);pQb(a,owc,(Gvc(),Fvc))}else if(c==axc){pQb(a,UAc,bxc);pQb(a,owc,(Gvc(),Dvc))}else if(b==(Gvc(),Fvc)){pQb(a,UAc,$wc);pQb(a,owc,Evc)}else if(b==Dvc){pQb(a,UAc,axc);pQb(a,owc,Evc)}} -function dSc(){dSc=geb;bSc=new pSc;ZRc=pfd(new ufd,(sXb(),pXb),(hcc(),Fbc));aSc=nfd(pfd(new ufd,pXb,Tbc),rXb,Sbc);cSc=mfd(mfd(rfd(nfd(pfd(new ufd,nXb,bcc),rXb,acc),qXb),_bc),ccc);$Rc=nfd(pfd(pfd(pfd(new ufd,oXb,Ibc),qXb,Kbc),qXb,Lbc),rXb,Jbc);_Rc=nfd(pfd(pfd(new ufd,qXb,Lbc),qXb,qbc),rXb,pbc)} -function HUc(){HUc=geb;CUc=pfd(nfd(new ufd,(sXb(),rXb),(hcc(),tbc)),pXb,Fbc);GUc=mfd(mfd(rfd(nfd(pfd(new ufd,nXb,bcc),rXb,acc),qXb),_bc),ccc);DUc=nfd(pfd(pfd(pfd(new ufd,oXb,Ibc),qXb,Kbc),qXb,Lbc),rXb,Jbc);FUc=pfd(pfd(new ufd,pXb,Tbc),rXb,Sbc);EUc=nfd(pfd(pfd(new ufd,qXb,Lbc),qXb,qbc),rXb,pbc)} -function eSc(a,b,c,d,e){var f,g;if((!W0b(b)&&b.c.i.c==b.d.i.c||!djd(xjd(cD(WC(l3,1),Nve,8,0,[e.i.n,e.n,e.a])),c))&&!W0b(b)){b.c==e?hu(b.a,0,new sjd(c)):Mub(b.a,new sjd(c));if(d&&!Zsb(a.a,c)){g=RD(mQb(b,(yCc(),RAc)),75);if(!g){g=new Ejd;pQb(b,RAc,g)}f=new sjd(c);Pub(g,f,g.c.b,g.c);Ysb(a.a,f)}}} -function ht(a,b){var c,d,e,f;f=Ydb(Ndb(cwe,qgb(Ydb(Ndb(b==null?0:tb(b),dwe)),15)));c=f&a.b.length-1;e=null;for(d=a.b[c];d;e=d,d=d.a){if(d.d==f&&Hb(d.i,b)){!e?(a.b[c]=d.a):(e.a=d.a);Ts(RD(Hvb(d.c),604),RD(Hvb(d.f),604));Ss(RD(Hvb(d.b),227),RD(Hvb(d.e),227));--a.f;++a.e;return true}}return false} -function dec(a){var b,c;for(c=new is(Mr(Z2b(a).a.Kc(),new ir));gs(c);){b=RD(hs(c),18);if(b.c.i.k!=(r3b(),n3b)){throw Adb(new Jed(nBe+X2b(a)+"' has its layer constraint set to FIRST, but has at least one incoming edge that "+' does not come from a FIRST_SEPARATE node. That must not happen.'))}}} -function Twd(a,b,c){var d,e,f,g,h,i,j;e=ggb(a.Db&254);if(e==0){a.Eb=c}else{if(e==1){h=$C(jJ,rve,1,2,5,1);f=Xwd(a,b);if(f==0){h[0]=c;h[1]=a.Eb}else{h[0]=a.Eb;h[1]=c}}else{h=$C(jJ,rve,1,e+1,5,1);g=SD(a.Eb);for(d=2,i=0,j=0;d<=128;d<<=1){d==b?(h[j++]=c):(a.Db&d)!=0&&(h[j++]=g[i++])}}a.Eb=h}a.Db|=b} -function vQb(a,b,c){var d,e,f,g;this.b=new bnb;e=0;d=0;for(g=new Anb(a);g.a0){f=RD(Vmb(this.b,0),176);e+=f.o;d+=f.p}e*=2;d*=2;b>1?(e=eE($wnd.Math.ceil(e*b))):(d=eE($wnd.Math.ceil(d/b)));this.a=new gQb(e,d)} -function mkc(a,b,c,d,e,f){var g,h,i,j,k,l,m,n,o,p,q,r;k=d;if(b.j&&b.o){n=RD(Wjb(a.f,b.A),60);p=n.d.c+n.d.b;--k}else{p=b.a.c+b.a.b}l=e;if(c.q&&c.o){n=RD(Wjb(a.f,c.C),60);j=n.d.c;++l}else{j=c.a.c}q=j-p;i=$wnd.Math.max(2,l-k);h=q/i;o=p+h;for(m=k;m=0;g+=e?1:-1){h=b[g];i=d==(qpd(),Xod)?e?b3b(h,d):hv(b3b(h,d)):e?hv(b3b(h,d)):b3b(h,d);f&&(a.c[h.p]=i.gc());for(l=i.Kc();l.Ob();){k=RD(l.Pb(),12);a.d[k.p]=j++}Tmb(c,i)}} -function AUc(a,b,c){var d,e,f,g,h,i,j,k;f=Kfb(UD(a.b.Kc().Pb()));j=Kfb(UD(fr(b.b)));d=ijd(ajd(a.a),j-c);e=ijd(ajd(b.a),c-f);k=$id(d,e);ijd(k,1/(j-f));this.a=k;this.b=new bnb;h=true;g=a.b.Kc();g.Pb();while(g.Ob()){i=Kfb(UD(g.Pb()));if(h&&i-c>AEe){this.b.Fc(c);h=false}this.b.Fc(i)}h&&this.b.Fc(c)} -function mJb(a){var b,c,d,e;pJb(a,a.n);if(a.d.c.length>0){Nnb(a.c);while(xJb(a,RD(ynb(new Anb(a.e.a)),125))>5;b&=31;if(d>=a.d){return a.e<0?(Pib(),Jib):(Pib(),Oib)}f=a.d-d;e=$C(kE,Pwe,28,f+1,15,1);ujb(e,f,a.a,d,b);if(a.e<0){for(c=0;c0&&a.a[c]<<32-b!=0){for(c=0;c=0){return false}else{c=Eee((lke(),jke),e,b);if(!c){return true}else{d=c.Ik();return (d>1||d==-1)&&yfe(Qee(jke,c))!=3}}}}else{return false}} -function _4b(a,b,c,d){var e,f,g,h,i;h=AGd(RD(QHd((!b.b&&(b.b=new Yie(E4,b,4,7)),b.b),0),84));i=AGd(RD(QHd((!b.c&&(b.c=new Yie(E4,b,5,8)),b.c),0),84));if(vCd(h)==vCd(i)){return null}if(NGd(i,h)){return null}g=kzd(b);if(g==c){return d}else{f=RD(Wjb(a.a,g),10);if(f){e=f.e;if(e){return e}}}return null} -function uHc(a,b,c){var d,e,f,g,h;c.Ug('Longest path to source layering',1);a.a=b;h=a.a.a;a.b=$C(kE,Pwe,28,h.c.length,15,1);d=0;for(g=new Anb(h);g.a0){c[0]+=a.d;g-=c[0]}if(c[2]>0){c[2]+=a.d;g-=c[2]}f=$wnd.Math.max(0,g);c[1]=$wnd.Math.max(c[1],g);mKb(a,XJb,e.c+d.b+c[0]-(c[1]-g)/2,c);if(b==XJb){a.c.b=f;a.c.c=e.c+d.b+(f-g)/2}} -function D_b(){this.c=$C(iE,vxe,28,(qpd(),cD(WC(E3,1),NAe,64,0,[opd,Yod,Xod,npd,ppd])).length,15,1);this.b=$C(iE,vxe,28,cD(WC(E3,1),NAe,64,0,[opd,Yod,Xod,npd,ppd]).length,15,1);this.a=$C(iE,vxe,28,cD(WC(E3,1),NAe,64,0,[opd,Yod,Xod,npd,ppd]).length,15,1);Lnb(this.c,oxe);Lnb(this.b,pxe);Lnb(this.a,pxe)} -function rte(a,b,c){var d,e,f,g;if(b<=c){e=b;f=c}else{e=c;f=b}d=0;if(a.b==null){a.b=$C(kE,Pwe,28,2,15,1);a.b[0]=e;a.b[1]=f;a.c=true}else{d=a.b.length;if(a.b[d-1]+1==e){a.b[d-1]=f;return}g=$C(kE,Pwe,28,d+2,15,1);hib(a.b,0,g,0,d);a.b=g;a.b[d-1]>=e&&(a.c=false,a.a=false);a.b[d++]=e;a.b[d]=f;a.c||vte(a)}} -function Oqc(a,b,c){var d,e,f,g,h,i,j;j=b.d;a.a=new cnb(j.c.length);a.c=new Tsb;for(h=new Anb(j);h.a=0?a.Lh(j,false,true):Qvd(a,c,false),61));n:for(f=l.Kc();f.Ob();){e=RD(f.Pb(),58);for(k=0;k1){vLd(e,e.i-1)}}return d}} -function Vdc(a,b){var c,d,e,f,g,h,i;c=new wmb;for(f=new Anb(a.b);f.aa.d[g.p]){c+=ZLc(a.b,f);hmb(a.a,sgb(f))}}while(!nmb(a.a)){XLc(a.b,RD(smb(a.a),17).a)}}return c} -function Uec(a){var b,c,d,e,f,g,h,i,j;a.a=new e6b;j=0;e=0;for(d=new Anb(a.i.b);d.ah.d&&(k=h.d+h.a+j)}}c.c.d=k;b.a.zc(c,b);i=$wnd.Math.max(i,c.c.d+c.c.a)}return i} -function ovc(){ovc=geb;fvc=new pvc('COMMENTS',0);hvc=new pvc('EXTERNAL_PORTS',1);ivc=new pvc('HYPEREDGES',2);jvc=new pvc('HYPERNODES',3);kvc=new pvc('NON_FREE_PORTS',4);lvc=new pvc('NORTH_SOUTH_PORTS',5);nvc=new pvc(FBe,6);evc=new pvc('CENTER_LABELS',7);gvc=new pvc('END_LABELS',8);mvc=new pvc('PARTITIONS',9)} -function PA(a,b,c,d,e){if(d<0){d=EA(a,e,cD(WC(qJ,1),Nve,2,6,[Cwe,Dwe,Ewe,Fwe,Gwe,Hwe,Iwe,Jwe,Kwe,Lwe,Mwe,Nwe]),b);d<0&&(d=EA(a,e,cD(WC(qJ,1),Nve,2,6,['Jan','Feb','Mar','Apr',Gwe,'Jun','Jul','Aug','Sep','Oct','Nov','Dec']),b));if(d<0){return false}c.k=d;return true}else if(d>0){c.k=d-1;return true}return false} -function RA(a,b,c,d,e){if(d<0){d=EA(a,e,cD(WC(qJ,1),Nve,2,6,[Cwe,Dwe,Ewe,Fwe,Gwe,Hwe,Iwe,Jwe,Kwe,Lwe,Mwe,Nwe]),b);d<0&&(d=EA(a,e,cD(WC(qJ,1),Nve,2,6,['Jan','Feb','Mar','Apr',Gwe,'Jun','Jul','Aug','Sep','Oct','Nov','Dec']),b));if(d<0){return false}c.k=d;return true}else if(d>0){c.k=d-1;return true}return false} -function TA(a,b,c,d,e,f){var g,h,i,j;h=32;if(d<0){if(b[0]>=a.length){return false}h=ihb(a,b[0]);if(h!=43&&h!=45){return false}++b[0];d=HA(a,b);if(d<0){return false}h==45&&(d=-d)}if(h==32&&b[0]-c==2&&e.b==2){i=new uB;j=i.q.getFullYear()-Owe+Owe-80;g=j%100;f.a=d==g;d+=(j/100|0)*100+(d=0?jjb(a):Xib(jjb(Odb(a))));Kjb[b]=Jdb(Sdb(a,b),0)?jjb(Sdb(a,b)):Xib(jjb(Odb(Sdb(a,b))));a=Ndb(a,5)}for(;b=j&&(i=d)}!!i&&(k=$wnd.Math.max(k,i.a.o.a));if(k>m){l=j;m=k}}return l} -function SNb(a){var b,c,d,e,f,g,h;f=new yAb(RD(Qb(new eOb),50));h=pxe;for(c=new Anb(a.d);c.aFFe?_mb(i,a.b):d<=FFe&&d>GFe?_mb(i,a.d):d<=GFe&&d>HFe?_mb(i,a.c):d<=HFe&&_mb(i,a.a);f=$5c(a,i,f)}return e} -function sTc(a,b,c,d){var e,f,g,h,i,j;e=(d.c+d.a)/2;Xub(b.j);Mub(b.j,e);Xub(c.e);Mub(c.e,e);j=new ATc;for(h=new Anb(a.f);h.a1;if(h){d=new rjd(e,c.b);Mub(b.a,d)}zjd(b.a,cD(WC(l3,1),Nve,8,0,[m,l]))} -function TGc(a,b,c){var d,e;if(b=48;c--){Eqe[c]=c-48<<24>>24}for(d=70;d>=65;d--){Eqe[d]=d-65+10<<24>>24}for(e=102;e>=97;e--){Eqe[e]=e-97+10<<24>>24}for(f=0;f<10;f++)Fqe[f]=48+f&Bwe;for(a=10;a<=15;a++)Fqe[a]=65+a-10&Bwe} -function yYc(a,b){b.Ug('Process graph bounds',1);pQb(a,(q$c(),ZZc),Uvb(TCb(HDb(new SDb(null,new Swb(a.b,16)),new DYc))));pQb(a,_Zc,Uvb(TCb(HDb(new SDb(null,new Swb(a.b,16)),new FYc))));pQb(a,YZc,Uvb(SCb(HDb(new SDb(null,new Swb(a.b,16)),new HYc))));pQb(a,$Zc,Uvb(SCb(HDb(new SDb(null,new Swb(a.b,16)),new JYc))));b.Vg()} -function PWb(a){var b,c,d,e,f;e=RD(mQb(a,(yCc(),lBc)),21);f=RD(mQb(a,oBc),21);c=new rjd(a.f.a+a.d.b+a.d.c,a.f.b+a.d.d+a.d.a);b=new sjd(c);if(e.Hc((Qpd(),Mpd))){d=RD(mQb(a,nBc),8);if(f.Hc((dqd(),Ypd))){d.a<=0&&(d.a=20);d.b<=0&&(d.b=20)}b.a=$wnd.Math.max(c.a,d.a);b.b=$wnd.Math.max(c.b,d.b)}Heb(TD(mQb(a,mBc)))||QWb(a,c,b)} -function lOc(a,b){var c,d,e,f;for(f=b3b(b,(qpd(),npd)).Kc();f.Ob();){d=RD(f.Pb(),12);c=RD(mQb(d,(Ywc(),Iwc)),10);!!c&&rIb(uIb(tIb(vIb(sIb(new wIb,0),0.1),a.i[b.p].d),a.i[c.p].a))}for(e=b3b(b,Yod).Kc();e.Ob();){d=RD(e.Pb(),12);c=RD(mQb(d,(Ywc(),Iwc)),10);!!c&&rIb(uIb(tIb(vIb(sIb(new wIb,0),0.1),a.i[c.p].d),a.i[b.p].a))}} -function oYd(a){var b,c,d,e,f,g;if(!a.c){g=new W$d;b=iYd;f=b.a.zc(a,b);if(f==null){for(d=new dMd(tYd(a));d.e!=d.i.gc();){c=RD(bMd(d),89);e=i2d(c);ZD(e,90)&&YGd(g,oYd(RD(e,29)));WGd(g,c)}b.a.Bc(a)!=null;b.a.gc()==0&&undefined}T$d(g);VHd(g);a.c=new N$d((RD(QHd(xYd((lTd(),kTd).o),15),19),g.i),g.g);yYd(a).b&=-33}return a.c} -function Dre(a){var b;if(a.c!=10)throw Adb(new Lqe(TId((Hde(),VIe))));b=a.a;switch(b){case 110:b=10;break;case 114:b=13;break;case 116:b=9;break;case 92:case 124:case 46:case 94:case 45:case 63:case 42:case 43:case 123:case 125:case 40:case 41:case 91:case 93:break;default:throw Adb(new Lqe(TId((Hde(),xJe))));}return b} -function GD(a){var b,c,d,e,f;if(a.l==0&&a.m==0&&a.h==0){return '0'}if(a.h==fxe&&a.m==0&&a.l==0){return '-9223372036854775808'}if(a.h>>19!=0){return '-'+GD(xD(a))}c=a;d='';while(!(c.l==0&&c.m==0&&c.h==0)){e=fD(ixe);c=iD(c,e,true);b=''+FD(eD);if(!(c.l==0&&c.m==0&&c.h==0)){f=9-b.length;for(;f>0;f--){b='0'+b}}d=b+d}return d} -function tkc(a){var b,c,d,e,f,g,h;b=false;c=0;for(e=new Anb(a.d.b);e.a=a.a){return -1}if(!W9b(b,c)){return -1}if(gr(RD(d.Kb(b),20))){return 1}e=0;for(g=RD(d.Kb(b),20).Kc();g.Ob();){f=RD(g.Pb(),18);i=f.c.i==b?f.d.i:f.c.i;h=X9b(a,i,c,d);if(h==-1){return -1}e=$wnd.Math.max(e,h);if(e>a.c-1){return -1}}return e+1} -function _Gd(a,b){var c,d,e,f,g,h;if(dE(b)===dE(a)){return true}if(!ZD(b,15)){return false}d=RD(b,15);h=a.gc();if(d.gc()!=h){return false}g=d.Kc();if(a.Yi()){for(c=0;c0){a._j();if(b!=null){for(f=0;f>24}case 97:case 98:case 99:case 100:case 101:case 102:{return a-97+10<<24>>24}case 65:case 66:case 67:case 68:case 69:case 70:{return a-65+10<<24>>24}default:{throw Adb(new Vgb('Invalid hexadecimal'))}}} -function iIb(){iIb=geb;hIb=new jIb('SPIRAL',0);cIb=new jIb('LINE_BY_LINE',1);dIb=new jIb('MANHATTAN',2);bIb=new jIb('JITTER',3);fIb=new jIb('QUADRANTS_LINE_BY_LINE',4);gIb=new jIb('QUADRANTS_MANHATTAN',5);eIb=new jIb('QUADRANTS_JITTER',6);aIb=new jIb('COMBINE_LINE_BY_LINE_MANHATTAN',7);_Hb=new jIb('COMBINE_JITTER_MANHATTAN',8)} -function Urc(a,b,c,d){var e,f,g,h,i,j;i=Zrc(a,c);j=Zrc(b,c);e=false;while(!!i&&!!j){if(d||Xrc(i,j,c)){g=Zrc(i,c);h=Zrc(j,c);asc(b);asc(a);f=i.c;Hec(i,false);Hec(j,false);if(c){f3b(b,j.p,f);b.p=j.p;f3b(a,i.p+1,f);a.p=i.p}else{f3b(a,i.p,f);a.p=i.p;f3b(b,j.p+1,f);b.p=j.p}g3b(i,null);g3b(j,null);i=g;j=h;e=true}else{break}}return e} -function aDc(a){switch(a.g){case 0:return new XHc;case 1:return new pHc;case 3:return new GGc;case 4:return new gHc;case 5:return new jIc;case 6:return new IHc;case 2:return new xHc;case 7:return new pGc;case 8:return new YGc;default:throw Adb(new agb('No implementation is available for the layerer '+(a.f!=null?a.f:''+a.g)));}} -function tIc(a,b,c,d){var e,f,g,h,i;e=false;f=false;for(h=new Anb(d.j);h.a=b.length){throw Adb(new veb('Greedy SwitchDecider: Free layer not in graph.'))}this.c=b[a];this.e=new DMc(d);rMc(this.e,this.c,(qpd(),ppd));this.i=new DMc(d);rMc(this.i,this.c,Xod);this.f=new Kmc(this.c);this.a=!f&&e.i&&!e.s&&this.c[0].k==(r3b(),m3b);this.a&&Nmc(this,a,b.length)} -function $Mb(a,b){var c,d,e,f,g,h;f=!a.B.Hc((dqd(),Wpd));g=a.B.Hc(Zpd);a.a=new wKb(g,f,a.c);!!a.n&&C2b(a.a.n,a.n);cLb(a.g,(ZJb(),XJb),a.a);if(!b){d=new dLb(1,f,a.c);d.n.a=a.k;Wrb(a.p,(qpd(),Yod),d);e=new dLb(1,f,a.c);e.n.d=a.k;Wrb(a.p,npd,e);h=new dLb(0,f,a.c);h.n.c=a.k;Wrb(a.p,ppd,h);c=new dLb(0,f,a.c);c.n.b=a.k;Wrb(a.p,Xod,c)}} -function zkc(a){var b,c,d;b=RD(mQb(a.d,(yCc(),yAc)),223);switch(b.g){case 2:c=rkc(a);break;case 3:c=(d=new bnb,FDb(CDb(GDb(EDb(EDb(new SDb(null,new Swb(a.d.b,16)),new wlc),new ylc),new Alc),new Kkc),new Clc(d)),d);break;default:throw Adb(new dgb('Compaction not supported for '+b+' edges.'));}ykc(a,c);xgb(new Xkb(a.g),new ilc(a))} -function qYc(a,b){var c,d,e,f,g,h,i;b.Ug('Process directions',1);c=RD(mQb(a,(h_c(),H$c)),88);if(c!=(Cmd(),xmd)){for(e=Sub(a.b,0);e.b!=e.d.c;){d=RD(evb(e),40);h=RD(mQb(d,(q$c(),o$c)),17).a;i=RD(mQb(d,p$c),17).a;switch(c.g){case 4:i*=-1;break;case 1:f=h;h=i;i=f;break;case 2:g=h;h=-i;i=g;}pQb(d,o$c,sgb(h));pQb(d,p$c,sgb(i))}}b.Vg()} -function led(a,b){var c;c=new qQb;!!b&&kQb(c,RD(Wjb(a.a,H4),96));ZD(b,422)&&kQb(c,RD(Wjb(a.a,L4),96));if(ZD(b,366)){kQb(c,RD(Wjb(a.a,I4),96));return c}ZD(b,84)&&kQb(c,RD(Wjb(a.a,E4),96));if(ZD(b,207)){kQb(c,RD(Wjb(a.a,J4),96));return c}if(ZD(b,193)){kQb(c,RD(Wjb(a.a,K4),96));return c}ZD(b,326)&&kQb(c,RD(Wjb(a.a,G4),96));return c} -function a_b(a){var b,c,d,e,f,g,h,i;i=new m_b;for(h=new Anb(a.a);h.a0&&b=0){return false}else{b.p=c.b;Rmb(c.e,b)}if(e==(r3b(),o3b)||e==q3b){for(g=new Anb(b.j);g.aa.d[h.p]){c+=ZLc(a.b,f);hmb(a.a,sgb(f))}}else{++g}}c+=a.b.d*g;while(!nmb(a.a)){XLc(a.b,RD(smb(a.a),17).a)}}return c} -function pje(a){var b,c,d,e,f,g;f=0;b=WVd(a);!!b.kk()&&(f|=4);(a.Bb&bKe)!=0&&(f|=2);if(ZD(a,102)){c=RD(a,19);e=Z5d(c);(c.Bb&QHe)!=0&&(f|=32);if(e){AYd(uWd(e));f|=8;g=e.t;(g>1||g==-1)&&(f|=16);(e.Bb&QHe)!=0&&(f|=64)}(c.Bb&txe)!=0&&(f|=cKe);f|=gwe}else{if(ZD(b,469)){f|=512}else{d=b.kk();!!d&&(d.i&1)!=0&&(f|=256)}}(a.Bb&512)!=0&&(f|=128);return f} -function vke(a,b){var c;if(a.f==tke){c=yfe(Qee((lke(),jke),b));return a.e?c==4&&b!=(Lle(),Jle)&&b!=(Lle(),Gle)&&b!=(Lle(),Hle)&&b!=(Lle(),Ile):c==2}if(!!a.d&&(a.d.Hc(b)||a.d.Hc(zfe(Qee((lke(),jke),b)))||a.d.Hc(Eee((lke(),jke),a.b,b)))){return true}if(a.f){if(Xee((lke(),a.f),Bfe(Qee(jke,b)))){c=yfe(Qee(jke,b));return a.e?c==4:c==2}}return false} -function oKc(a){var b,c,d,e,f,g,h,i,j,k,l,m,n;m=-1;n=0;for(j=a,k=0,l=j.length;k0&&++n}}}++m}return n} -function S2c(a,b,c,d){var e,f,g,h,i,j,k,l;g=RD(Gxd(c,(umd(),Qld)),8);i=g.a;k=g.b+a;e=$wnd.Math.atan2(k,i);e<0&&(e+=dFe);e+=b;e>dFe&&(e-=dFe);h=RD(Gxd(d,Qld),8);j=h.a;l=h.b+a;f=$wnd.Math.atan2(l,j);f<0&&(f+=dFe);f+=b;f>dFe&&(f-=dFe);return Zy(),bz(1.0E-10),$wnd.Math.abs(e-f)<=1.0E-10||e==f||isNaN(e)&&isNaN(f)?0:ef?1:cz(isNaN(e),isNaN(f))} -function PGb(a){var b,c,d,e,f,g,h;h=new Tsb;for(d=new Anb(a.a.b);d.a=b.o){throw Adb(new web)}i=c>>5;h=c&31;g=Sdb(1,Ydb(Sdb(h,1)));f?(b.n[d][i]=Rdb(b.n[d][i],g)):(b.n[d][i]=Cdb(b.n[d][i],Qdb(g)));g=Sdb(g,1);e?(b.n[d][i]=Rdb(b.n[d][i],g)):(b.n[d][i]=Cdb(b.n[d][i],Qdb(g)))}catch(a){a=zdb(a);if(ZD(a,333)){throw Adb(new veb(fze+b.o+'*'+b.p+gze+c+pve+d+hze))}else throw Adb(a)}} -function eMc(a,b,c,d){var e,f,g,h,i,j,k,l,m;m=new yAb(new PMc(a));for(h=cD(WC(jR,1),WAe,10,0,[b,c]),i=0,j=h.length;i0){d=(!a.n&&(a.n=new C5d(I4,a,1,7)),RD(QHd(a.n,0),135)).a;!d||Zhb(Zhb((b.a+=' "',b),d),'"')}}else{Zhb(Zhb((b.a+=' "',b),c),'"')}Zhb(Uhb(Zhb(Uhb(Zhb(Uhb(Zhb(Uhb((b.a+=' (',b),a.i),','),a.j),' | '),a.g),','),a.f),')');return b.a} -function OCd(a){var b,c,d;if((a.Db&64)!=0)return Fyd(a);b=new dib(HHe);c=a.k;if(!c){!a.n&&(a.n=new C5d(I4,a,1,7));if(a.n.i>0){d=(!a.n&&(a.n=new C5d(I4,a,1,7)),RD(QHd(a.n,0),135)).a;!d||Zhb(Zhb((b.a+=' "',b),d),'"')}}else{Zhb(Zhb((b.a+=' "',b),c),'"')}Zhb(Uhb(Zhb(Uhb(Zhb(Uhb(Zhb(Uhb((b.a+=' (',b),a.i),','),a.j),' | '),a.g),','),a.f),')');return b.a} -function Xnc(a,b){var c,d,e,f,g;b==(TEc(),QEc)&&Eob(RD(Qc(a.a,(Bnc(),xnc)),15));for(e=RD(Qc(a.a,(Bnc(),xnc)),15).Kc();e.Ob();){d=RD(e.Pb(),105);c=RD(Vmb(d.j,0),113).d.j;f=new dnb(d.j);_mb(f,new Boc);switch(b.g){case 2:Pnc(a,f,c,(joc(),hoc),1);break;case 1:case 0:g=Rnc(f);Pnc(a,new Rkb(f,0,g),c,(joc(),hoc),0);Pnc(a,new Rkb(f,g,f.c.length),c,hoc,1);}}} -function sgd(a,b){var c,d,e,f,g,h,i;if(b==null||b.length==0){return null}e=RD(Xjb(a.a,b),143);if(!e){for(d=(h=(new glb(a.b)).a.vc().Kc(),new llb(h));d.a.Ob();){c=(f=RD(d.a.Pb(),44),RD(f.md(),143));g=c.c;i=b.length;if(lhb(g.substr(g.length-i,i),b)&&(b.length==g.length||ihb(g,g.length-b.length-1)==46)){if(e){return null}e=c}}!!e&&$jb(a.a,b,e)}return e} -function HOb(a,b){var c,d,e,f;c=new MOb;d=RD(zDb(GDb(new SDb(null,new Swb(a.f,16)),c),sBb(new _Bb,new bCb,new yCb,new ACb,cD(WC(QL,1),jwe,108,0,[(xBb(),wBb),vBb]))),21);e=d.gc();d=RD(zDb(GDb(new SDb(null,new Swb(b.f,16)),c),sBb(new _Bb,new bCb,new yCb,new ACb,cD(WC(QL,1),jwe,108,0,[wBb,vBb]))),21);f=d.gc();if(ee.p){Q3b(f,npd);if(f.d){h=f.o.b;b=f.a.b;f.a.b=h-b}}else if(f.j==npd&&e.p>a.p){Q3b(f,Yod);if(f.d){h=f.o.b;b=f.a.b;f.a.b=-(h-b)}}break}}return e} -function nTb(a,b,c,d,e){var f,g,h,i,j,k,l;if(!(ZD(b,207)||ZD(b,366)||ZD(b,193))){throw Adb(new agb('Method only works for ElkNode-, ElkLabel and ElkPort-objects.'))}g=a.a/2;i=b.i+d-g;k=b.j+e-g;j=i+b.g+a.a;l=k+b.f+a.a;f=new Ejd;Mub(f,new rjd(i,k));Mub(f,new rjd(i,l));Mub(f,new rjd(j,l));Mub(f,new rjd(j,k));h=new ORb(f);kQb(h,b);c&&Zjb(a.b,b,h);return h} -function w$b(a,b,c){var d,e,f,g,h,i,j,k,l,m;f=new rjd(b,c);for(k=new Anb(a.a);k.a1;if(h){d=new rjd(e,c.b);Mub(b.a,d)}zjd(b.a,cD(WC(l3,1),Nve,8,0,[m,l]))} -function aEc(){aEc=geb;$Dc=new bEc(LAe,0);VDc=new bEc('NIKOLOV',1);YDc=new bEc('NIKOLOV_PIXEL',2);WDc=new bEc('NIKOLOV_IMPROVED',3);XDc=new bEc('NIKOLOV_IMPROVED_PIXEL',4);SDc=new bEc('DUMMYNODE_PERCENTAGE',5);ZDc=new bEc('NODECOUNT_PERCENTAGE',6);_Dc=new bEc('NO_BOUNDARY',7);TDc=new bEc('MODEL_ORDER_LEFT_TO_RIGHT',8);UDc=new bEc('MODEL_ORDER_RIGHT_TO_LEFT',9)} -function use(a){var b,c,d,e,f;d=a.length;b=new Rhb;f=0;while(f=40;g&&wJb(a);nJb(a);mJb(a);c=qJb(a);d=0;while(!!c&&d0&&Mub(a.f,f)}else{a.c[g]-=j+1;a.c[g]<=0&&a.a[g]>0&&Mub(a.e,f)}}}}} -function FVc(a,b,c,d){var e,f,g,h,i,j,k;i=new rjd(c,d);ojd(i,RD(mQb(b,(q$c(),SZc)),8));for(k=Sub(b.b,0);k.b!=k.d.c;){j=RD(evb(k),40);$id(j.e,i);Mub(a.b,j)}for(h=RD(zDb(BDb(new SDb(null,new Swb(b.a,16))),tBb(new ZBb,new XBb,new wCb,cD(WC(QL,1),jwe,108,0,[(xBb(),vBb)]))),15).Kc();h.Ob();){g=RD(h.Pb(),65);for(f=Sub(g.a,0);f.b!=f.d.c;){e=RD(evb(f),8);e.a+=i.a;e.b+=i.b}Mub(a.a,g)}} -function kWc(a,b){var c,d,e,f;if(0<(ZD(a,16)?RD(a,16).gc():Kr(a.Kc()))){e=b;if(1=0&&if*2){k=new zrd(l);j=urd(g)/trd(g);i=ird(k,b,new z3b,c,d,e,j);$id(hjd(k.e),i);l.c.length=0;f=0;ZEb(l.c,k);ZEb(l.c,g);f=urd(k)*trd(k)+urd(g)*trd(g)}else{ZEb(l.c,g);f+=urd(g)*trd(g)}}return l} -function O9b(a,b){var c,d,e,f,g,h;h=RD(mQb(b,(yCc(),BBc)),101);if(!(h==(Bod(),xod)||h==wod)){return}e=(new rjd(b.f.a+b.d.b+b.d.c,b.f.b+b.d.d+b.d.a)).b;for(g=new Anb(a.a);g.ac?b:c;j<=l;++j){if(j==c){h=d++}else{f=e[j];k=o.am(f.Lk());j==b&&(i=j==l&&!k?d-1:d);k&&++d}}m=RD(uLd(a,b,c),76);h!=i&&eZd(a,new c4d(a.e,7,g,sgb(h),n.md(),i));return m}}}else{return RD(SHd(a,b,c),76)}return RD(uLd(a,b,c),76)} -function ugc(a,b){var c,d,e,f,g,h,i;b.Ug('Port order processing',1);i=RD(mQb(a,(yCc(),HBc)),430);for(d=new Anb(a.b);d.a=0){h=rD(a,g);if(h){j<22?(i.l|=1<>>1;g.m=k>>>1|(l&1)<<21;g.l=m>>>1|(k&1)<<21;--j}c&&nD(i);if(f){if(d){eD=xD(a);e&&(eD=DD(eD,(MD(),KD)))}else{eD=hD(a.l,a.m,a.h)}}return i} -function rIc(a,b){var c,d,e,f,g,h,i,j,k,l;j=a.e[b.c.p][b.p]+1;i=b.c.a.c.length+1;for(h=new Anb(a.a);h.a0&&(BFb(0,a.length),a.charCodeAt(0)==45||(BFb(0,a.length),a.charCodeAt(0)==43))?1:0;for(d=g;dc){throw Adb(new Vgb(nxe+a+'"'))}return h} -function Jqc(a){var b,c,d,e,f,g,h;g=new Yub;for(f=new Anb(a.a);f.a1)&&b==1&&RD(a.a[a.b],10).k==(r3b(),n3b)){Qdc(RD(a.a[a.b],10),(Pnd(),Lnd))}else if(d&&(!c||(a.c-a.b&a.a.length-1)>1)&&b==1&&RD(a.a[a.c-1&a.a.length-1],10).k==(r3b(),n3b)){Qdc(RD(a.a[a.c-1&a.a.length-1],10),(Pnd(),Mnd))}else if((a.c-a.b&a.a.length-1)==2){Qdc(RD(omb(a),10),(Pnd(),Lnd));Qdc(RD(omb(a),10),Mnd)}else{Ndc(a,e)}jmb(a)} -function QVc(a,b,c){var d,e,f,g,h;f=0;for(e=new dMd((!a.a&&(a.a=new C5d(J4,a,10,11)),a.a));e.e!=e.i.gc();){d=RD(bMd(e),27);g='';(!d.n&&(d.n=new C5d(I4,d,1,7)),d.n).i==0||(g=RD(QHd((!d.n&&(d.n=new C5d(I4,d,1,7)),d.n),0),135).a);h=new bXc(f++,b,g);kQb(h,d);pQb(h,(q$c(),h$c),d);h.e.b=d.j+d.f/2;h.f.a=$wnd.Math.max(d.g,1);h.e.a=d.i+d.g/2;h.f.b=$wnd.Math.max(d.f,1);Mub(b.b,h);rtb(c.f,d,h)}} -function L5b(a){var b,c,d,e,f;d=RD(mQb(a,(Ywc(),Awc)),27);f=RD(Gxd(d,(yCc(),lBc)),181).Hc((Qpd(),Ppd));if(!a.e){e=RD(mQb(a,kwc),21);b=new rjd(a.f.a+a.d.b+a.d.c,a.f.b+a.d.d+a.d.a);if(e.Hc((ovc(),hvc))){Ixd(d,BBc,(Bod(),wod));Esd(d,b.a,b.b,false,true)}else{Heb(TD(Gxd(d,mBc)))||Esd(d,b.a,b.b,true,true)}}f?Ixd(d,lBc,xsb(Ppd)):Ixd(d,lBc,(c=RD(mfb(H3),9),new Fsb(c,RD(WEb(c,c.length),9),0)))} -function JA(a,b,c){var d,e,f,g;if(b[0]>=a.length){c.o=0;return true}switch(ihb(a,b[0])){case 43:e=1;break;case 45:e=-1;break;default:c.o=0;return true;}++b[0];f=b[0];g=HA(a,b);if(g==0&&b[0]==f){return false}if(b[0]h){h=e;k.c.length=0}e==h&&Rmb(k,new Ptd(c.c.i,c))}yob();_mb(k,a.c);Qmb(a.b,i.p,k)}}} -function kRc(a,b){var c,d,e,f,g,h,i,j,k;for(g=new Anb(b.b);g.ah){h=e;k.c.length=0}e==h&&Rmb(k,new Ptd(c.d.i,c))}yob();_mb(k,a.c);Qmb(a.f,i.p,k)}}} -function HVc(a,b){var c,d,e,f,g,h,i,j;j=TD(mQb(b,(h_c(),Z$c)));if(j==null||(uFb(j),j)){EVc(a,b);e=new bnb;for(i=Sub(b.b,0);i.b!=i.d.c;){g=RD(evb(i),40);c=DVc(a,g,null);if(c){kQb(c,b);ZEb(e.c,c)}}a.a=null;a.b=null;if(e.c.length>1){for(d=new Anb(e);d.a=0&&h!=c){f=new N3d(a,1,h,g,null);!d?(d=f):d.nj(f)}if(c>=0){f=new N3d(a,1,c,h==c?g:null,b);!d?(d=f):d.nj(f)}}return d} -function jSd(a){var b,c,d;if(a.b==null){d=new Qhb;if(a.i!=null){Nhb(d,a.i);d.a+=':'}if((a.f&256)!=0){if((a.f&256)!=0&&a.a!=null){wSd(a.i)||(d.a+='//',d);Nhb(d,a.a)}if(a.d!=null){d.a+='/';Nhb(d,a.d)}(a.f&16)!=0&&(d.a+='/',d);for(b=0,c=a.j.length;bm){return false}l=(i=S9c(d,m,false),i.a);if(k+h+l<=b.b){Q9c(c,f-c.s);c.c=true;Q9c(d,f-c.s);U9c(d,c.s,c.t+c.d+h);d.k=true;aad(c.q,d);n=true;if(e){Cad(b,d);d.j=b;if(a.c.length>g){Fad((tFb(g,a.c.length),RD(a.c[g],186)),d);(tFb(g,a.c.length),RD(a.c[g],186)).a.c.length==0&&Xmb(a,g)}}}return n} -function Qfc(a,b){var c,d,e,f,g,h;b.Ug('Partition midprocessing',1);e=new Tp;FDb(CDb(new SDb(null,new Swb(a.a,16)),new Ufc),new Wfc(e));if(e.d==0){return}h=RD(zDb(ODb((f=e.i,new SDb(null,(!f?(e.i=new zf(e,e.c)):f).Nc()))),tBb(new ZBb,new XBb,new wCb,cD(WC(QL,1),jwe,108,0,[(xBb(),vBb)]))),15);d=h.Kc();c=RD(d.Pb(),17);while(d.Ob()){g=RD(d.Pb(),17);Pfc(RD(Qc(e,c),21),RD(Qc(e,g),21));c=g}b.Vg()} -function G_b(a,b,c){var d,e,f,g,h,i,j,k;if(b.p==0){b.p=1;g=c;if(!g){e=new bnb;f=(d=RD(mfb(E3),9),new Fsb(d,RD(WEb(d,d.length),9),0));g=new Ptd(e,f)}RD(g.a,15).Fc(b);b.k==(r3b(),m3b)&&RD(g.b,21).Fc(RD(mQb(b,(Ywc(),hwc)),64));for(i=new Anb(b.j);i.a0){e=RD(a.Ab.g,2033);if(b==null){for(f=0;fc.s&&hg){return qpd(),Xod}break;case 4:case 3:if(k<0){return qpd(),Yod}else if(k+c>f){return qpd(),npd}}i=(j+h/2)/g;d=(k+c/2)/f;return i+d<=1&&i-d<=0?(qpd(),ppd):i+d>=1&&i-d>=0?(qpd(),Xod):d<0.5?(qpd(),Yod):(qpd(),npd)} -function PNc(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p;c=false;k=Kfb(UD(mQb(b,(yCc(),bCc))));o=pwe*k;for(e=new Anb(b.b);e.ai+o){p=l.g+m.g;m.a=(m.g*m.a+l.g*l.a)/p;m.g=p;l.f=m;c=true}}f=h;l=m}}return c} -function MJb(a,b,c,d,e,f,g){var h,i,j,k,l,m;m=new Tid;for(j=b.Kc();j.Ob();){h=RD(j.Pb(),853);for(l=new Anb(h.Rf());l.a0){if(h.a){j=h.b.Mf().b;if(e>j){if(a.v||h.c.d.c.length==1){g=(e-j)/2;h.d.d=g;h.d.a=g}else{c=RD(Vmb(h.c.d,0),187).Mf().b;d=(c-j)/2;h.d.d=$wnd.Math.max(0,d);h.d.a=e-d-j}}}else{h.d.a=a.t+e}}else if(Rod(a.u)){f=wsd(h.b);f.d<0&&(h.d.d=-f.d);f.d+f.a>h.b.Mf().b&&(h.d.a=f.d+f.a-h.b.Mf().b)}}} -function yVb(){yVb=geb;lVb=new mGd((umd(),Rld),sgb(1));rVb=new mGd(fmd,80);qVb=new mGd($ld,5);ZUb=new mGd(Dkd,Yze);mVb=new mGd(Sld,sgb(1));pVb=new mGd(Vld,(Geb(),true));iVb=new A3b(50);hVb=new mGd(tld,iVb);_Ub=ald;jVb=Hld;$Ub=new mGd(Pkd,false);gVb=sld;eVb=mld;fVb=pld;dVb=kld;cVb=ild;kVb=Lld;bVb=(OUb(),HUb);sVb=MUb;aVb=GUb;nVb=JUb;oVb=LUb;vVb=mmd;xVb=qmd;uVb=lmd;tVb=kmd;wVb=(mqd(),jqd);new mGd(nmd,wVb)} -function VC(a,b){var c;switch(XC(a)){case 6:return bE(b);case 7:return _D(b);case 8:return $D(b);case 3:return Array.isArray(b)&&(c=XC(b),!(c>=14&&c<=16));case 11:return b!=null&&typeof b===kve;case 12:return b!=null&&(typeof b===gve||typeof b==kve);case 0:return QD(b,a.__elementTypeId$);case 2:return cE(b)&&!(b.Tm===keb);case 1:return cE(b)&&!(b.Tm===keb)||QD(b,a.__elementTypeId$);default:return true;}} -function gNb(a){var b,c,d,e;d=a.o;RMb();if(a.A.dc()||pb(a.A,QMb)){e=d.a}else{a.D?(e=$wnd.Math.max(d.a,ZKb(a.f))):(e=ZKb(a.f));if(a.A.Hc((Qpd(),Npd))&&!a.B.Hc((dqd(),_pd))){e=$wnd.Math.max(e,ZKb(RD(Vrb(a.p,(qpd(),Yod)),252)));e=$wnd.Math.max(e,ZKb(RD(Vrb(a.p,npd),252)))}b=TMb(a);!!b&&(e=$wnd.Math.max(e,b.a))}Heb(TD(a.e.Tf().of((umd(),mld))))?(d.a=$wnd.Math.max(d.a,e)):(d.a=e);c=a.f.i;c.c=0;c.b=e;$Kb(a.f)} -function oRb(a,b){var c,d,e,f;d=$wnd.Math.min($wnd.Math.abs(a.c-(b.c+b.b)),$wnd.Math.abs(a.c+a.b-b.c));f=$wnd.Math.min($wnd.Math.abs(a.d-(b.d+b.a)),$wnd.Math.abs(a.d+a.a-b.d));c=$wnd.Math.abs(a.c+a.b/2-(b.c+b.b/2));if(c>a.b/2+b.b/2){return 1}e=$wnd.Math.abs(a.d+a.a/2-(b.d+b.a/2));if(e>a.a/2+b.a/2){return 1}if(c==0&&e==0){return 0}if(c==0){return f/e+1}if(e==0){return d/c+1}return $wnd.Math.min(d/c,f/e)+1} -function oWb(a,b){var c,d,e,f,g,h,i;f=0;h=0;i=0;for(e=new Anb(a.f.e);e.a0&&a.d!=(AWb(),zWb)&&(h+=g*(d.d.a+a.a[b.a][d.a]*(b.d.a-d.d.a)/c));c>0&&a.d!=(AWb(),xWb)&&(i+=g*(d.d.b+a.a[b.a][d.a]*(b.d.b-d.d.b)/c))}switch(a.d.g){case 1:return new rjd(h/f,b.d.b);case 2:return new rjd(b.d.a,i/f);default:return new rjd(h/f,i/f);}} -function xsd(a){var b,c,d,e,f,g;c=(!a.a&&(a.a=new XZd(D4,a,5)),a.a).i+2;g=new cnb(c);Rmb(g,new rjd(a.j,a.k));FDb(new SDb(null,(!a.a&&(a.a=new XZd(D4,a,5)),new Swb(a.a,16))),new Usd(g));Rmb(g,new rjd(a.b,a.c));b=1;while(b0){aHb(i,false,(Cmd(),ymd));aHb(i,true,zmd)}Umb(b.g,new Elc(a,c));Zjb(a.g,b,c)} -function Ugb(){Ugb=geb;var a;Qgb=cD(WC(kE,1),Pwe,28,15,[-1,-1,30,19,15,13,11,11,10,9,9,8,8,8,8,7,7,7,7,7,7,7,6,6,6,6,6,6,6,6,6,6,6,6,6,6,5]);Rgb=$C(kE,Pwe,28,37,15,1);Sgb=cD(WC(kE,1),Pwe,28,15,[-1,-1,63,40,32,28,25,23,21,20,19,19,18,18,17,17,16,16,16,15,15,15,15,14,14,14,14,14,14,13,13,13,13,13,13,13,13]);Tgb=$C(lE,rxe,28,37,14,1);for(a=2;a<=36;a++){Rgb[a]=eE($wnd.Math.pow(a,Qgb[a]));Tgb[a]=Fdb(Sve,Rgb[a])}} -function tsd(a){var b;if((!a.a&&(a.a=new C5d(F4,a,6,6)),a.a).i!=1){throw Adb(new agb(tHe+(!a.a&&(a.a=new C5d(F4,a,6,6)),a.a).i))}b=new Ejd;!!BGd(RD(QHd((!a.b&&(a.b=new Yie(E4,a,4,7)),a.b),0),84))&&ye(b,usd(a,BGd(RD(QHd((!a.b&&(a.b=new Yie(E4,a,4,7)),a.b),0),84)),false));!!BGd(RD(QHd((!a.c&&(a.c=new Yie(E4,a,5,8)),a.c),0),84))&&ye(b,usd(a,BGd(RD(QHd((!a.c&&(a.c=new Yie(E4,a,5,8)),a.c),0),84)),true));return b} -function zRc(a,b){var c,d,e,f,g;b.d?(e=a.a.c==(wQc(),vQc)?Z2b(b.b):a3b(b.b)):(e=a.a.c==(wQc(),uQc)?Z2b(b.b):a3b(b.b));f=false;for(d=new is(Mr(e.a.Kc(),new ir));gs(d);){c=RD(hs(d),18);g=Heb(a.a.f[a.a.g[b.b.p].p]);if(!g&&!W0b(c)&&c.c.i.c==c.d.i.c){continue}if(Heb(a.a.n[a.a.g[b.b.p].p])||Heb(a.a.n[a.a.g[b.b.p].p])){continue}f=true;if(Zsb(a.b,a.a.g[rRc(c,b.b).p])){b.c=true;b.a=c;return b}}b.c=f;b.a=null;return b} -function QJd(a,b,c){var d,e,f,g,h,i,j;d=c.gc();if(d==0){return false}else{if(a.Pj()){i=a.Qj();ZId(a,b,c);g=d==1?a.Ij(3,null,c.Kc().Pb(),b,i):a.Ij(5,null,c,b,i);if(a.Mj()){h=d<100?null:new gLd(d);f=b+d;for(e=b;e0){for(g=0;g>16==-15&&a.Cb.Yh()&&pKd(new O3d(a.Cb,9,13,c,a.c,fZd(o4d(RD(a.Cb,62)),a)))}else if(ZD(a.Cb,90)){if(a.Db>>16==-23&&a.Cb.Yh()){b=a.c;ZD(b,90)||(b=(JTd(),zTd));ZD(c,90)||(c=(JTd(),zTd));pKd(new O3d(a.Cb,9,10,c,b,fZd(tYd(RD(a.Cb,29)),a)))}}}}return a.c} -function lac(a,b,c){var d,e,f,g,h,i,j,k,l;c.Ug('Hyperedge merging',1);jac(a,b);i=new Jkb(b.b,0);while(i.b0;h=oIb(b,f);c?FIb(h.b,b):FIb(h.g,b);CIb(h).c.length==1&&(Pub(d,h,d.c.b,d.c),true);e=new Ptd(f,b);hmb(a.o,e);Ymb(a.e.a,f)}} -function SQb(a,b){var c,d,e,f,g,h,i;d=$wnd.Math.abs(Oid(a.b).a-Oid(b.b).a);h=$wnd.Math.abs(Oid(a.b).b-Oid(b.b).b);e=0;i=0;c=1;g=1;if(d>a.b.b/2+b.b.b/2){e=$wnd.Math.min($wnd.Math.abs(a.b.c-(b.b.c+b.b.b)),$wnd.Math.abs(a.b.c+a.b.b-b.b.c));c=1-e/d}if(h>a.b.a/2+b.b.a/2){i=$wnd.Math.min($wnd.Math.abs(a.b.d-(b.b.d+b.b.a)),$wnd.Math.abs(a.b.d+a.b.a-b.b.d));g=1-i/h}f=$wnd.Math.min(c,g);return (1-f)*$wnd.Math.sqrt(d*d+h*h)} -function LUc(a){var b,c,d,e;NUc(a,a.e,a.f,(dVc(),bVc),true,a.c,a.i);NUc(a,a.e,a.f,bVc,false,a.c,a.i);NUc(a,a.e,a.f,cVc,true,a.c,a.i);NUc(a,a.e,a.f,cVc,false,a.c,a.i);MUc(a,a.c,a.e,a.f,a.i);d=new Jkb(a.i,0);while(d.b=65;c--){xqe[c]=c-65<<24>>24}for(d=122;d>=97;d--){xqe[d]=d-97+26<<24>>24}for(e=57;e>=48;e--){xqe[e]=e-48+52<<24>>24}xqe[43]=62;xqe[47]=63;for(f=0;f<=25;f++)yqe[f]=65+f&Bwe;for(g=26,i=0;g<=51;++g,i++)yqe[g]=97+i&Bwe;for(a=52,h=0;a<=61;++a,h++)yqe[a]=48+h&Bwe;yqe[62]=43;yqe[63]=47} -function uib(a,b){var c,d,e,f,g,h;e=xib(a);h=xib(b);if(e==h){if(a.e==b.e&&a.a<54&&b.a<54){return a.fb.f?1:0}d=a.e-b.e;c=(a.d>0?a.d:$wnd.Math.floor((a.a-1)*xxe)+1)-(b.d>0?b.d:$wnd.Math.floor((b.a-1)*xxe)+1);if(c>d+1){return e}else if(c0&&(g=Wib(g,Sjb(d)));return Qib(f,g)}}else return ej){m=0;n+=i+b;i=0}w$b(g,m,n);c=$wnd.Math.max(c,m+k.a);i=$wnd.Math.max(i,k.b);m+=k.a+b}return new rjd(c+b,n+i+b)} -function osd(a,b){var c,d,e,f,g,h,i;if(!MCd(a)){throw Adb(new dgb(sHe))}d=MCd(a);f=d.g;e=d.f;if(f<=0&&e<=0){return qpd(),opd}h=a.i;i=a.j;switch(b.g){case 2:case 1:if(h<0){return qpd(),ppd}else if(h+a.g>f){return qpd(),Xod}break;case 4:case 3:if(i<0){return qpd(),Yod}else if(i+a.f>e){return qpd(),npd}}g=(h+a.g/2)/f;c=(i+a.f/2)/e;return g+c<=1&&g-c<=0?(qpd(),ppd):g+c>=1&&g-c>=0?(qpd(),Xod):c<0.5?(qpd(),Yod):(qpd(),npd)} -function Djb(a,b,c,d,e){var f,g;f=Bdb(Cdb(b[0],yxe),Cdb(d[0],yxe));a[0]=Ydb(f);f=Tdb(f,32);if(c>=e){for(g=1;g0){e.b[g++]=0;e.b[g++]=f.b[0]-1}for(b=1;b0){PSc(i,i.d-e.d);e.c==(fTc(),dTc)&&NSc(i,i.a-e.d);i.d<=0&&i.i>0&&(Pub(b,i,b.c.b,b.c),true)}}}for(f=new Anb(a.f);f.a0){QSc(h,h.i-e.d);e.c==(fTc(),dTc)&&OSc(h,h.b-e.d);h.i<=0&&h.d>0&&(Pub(c,h,c.c.b,c.c),true)}}}} -function drd(a,b,c,d,e){var f,g,h,i,j,k,l,m,n;yob();_mb(a,new Mrd);g=gv(a);n=new bnb;m=new bnb;h=null;i=0;while(g.b!=0){f=RD(g.b==0?null:(sFb(g.b!=0),Wub(g,g.a.a)),163);if(!h||urd(h)*trd(h)/21&&(i>urd(h)*trd(h)/2||g.b==0)){l=new zrd(m);k=urd(h)/trd(h);j=ird(l,b,new z3b,c,d,e,k);$id(hjd(l.e),j);h=l;ZEb(n.c,l);i=0;m.c.length=0}}}Tmb(n,m);return n} -function hib(a,b,c,d,e){gib();var f,g,h,i,j,k,l;vFb(a,'src');vFb(c,'dest');l=rb(a);i=rb(c);qFb((l.i&4)!=0,'srcType is not an array');qFb((i.i&4)!=0,'destType is not an array');k=l.c;g=i.c;qFb((k.i&1)!=0?k==g:(g.i&1)==0,"Array types don't match");iib(a,b,c,d,e);if((k.i&1)==0&&l!=i){j=SD(a);f=SD(c);if(dE(a)===dE(c)&&bd;){bD(f,h,j[--b])}}else{for(h=d+e;d0);d.a.Xb(d.c=--d.b);l>m+i&&Ckb(d)}for(g=new Anb(n);g.a0);d.a.Xb(d.c=--d.b)}}}} -function gte(){Vse();var a,b,c,d,e,f;if(Fse)return Fse;a=(++Use,new xte(4));ute(a,hte(WLe,true));wte(a,hte('M',true));wte(a,hte('C',true));f=(++Use,new xte(4));for(d=0;d<11;d++){rte(f,d,d)}b=(++Use,new xte(4));ute(b,hte('M',true));rte(b,4448,4607);rte(b,65438,65439);e=(++Use,new iue(2));hue(e,a);hue(e,Ese);c=(++Use,new iue(2));c.Jm($se(f,hte('L',true)));c.Jm(b);c=(++Use,new Kte(3,c));c=(++Use,new Qte(e,c));Fse=c;return Fse} -function vhb(a,b){var c,d,e,f,g,h,i,j;c=new RegExp(b,'g');i=$C(qJ,Nve,2,0,6,1);d=0;j=a;f=null;while(true){h=c.exec(j);if(h==null||j==''){i[d]=j;break}else{g=h.index;i[d]=(AFb(0,g,j.length),j.substr(0,g));j=zhb(j,g+h[0].length,j.length);c.lastIndex=0;if(f==j){i[d]=(AFb(0,1,j.length),j.substr(0,1));j=(BFb(1,j.length+1),j.substr(1))}f=j;++d}}if(a.length>0){e=i.length;while(e>0&&i[e-1]==''){--e}e0){l-=d[0]+a.c;d[0]+=a.c}d[2]>0&&(l-=d[2]+a.c);d[1]=$wnd.Math.max(d[1],l);dKb(a.a[1],c.c+b.b+d[0]-(d[1]-l)/2,d[1])}for(f=a.a,h=0,j=f.length;h0?(a.n.c.length-1)*a.i:0;for(d=new Anb(a.n);d.a1){for(d=Sub(e,0);d.b!=d.d.c;){c=RD(evb(d),235);f=0;for(i=new Anb(c.e);i.a0){b[0]+=a.c;l-=b[0]}b[2]>0&&(l-=b[2]+a.c);b[1]=$wnd.Math.max(b[1],l);eKb(a.a[1],d.d+c.d+b[0]-(b[1]-l)/2,b[1])}else{o=d.d+c.d;n=d.a-c.d-c.a;for(g=a.a,i=0,k=g.length;i0||$y(e.b.d,a.b.d+a.b.a)==0&&d.b<0||$y(e.b.d+e.b.a,a.b.d)==0&&d.b>0){h=0;break}}else{h=$wnd.Math.min(h,PQb(a,e,d))}h=$wnd.Math.min(h,FQb(a,f,h,d))}return h} -function lsd(a,b){var c,d,e,f,g,h,i;if(a.b<2){throw Adb(new agb('The vector chain must contain at least a source and a target point.'))}e=(sFb(a.b!=0),RD(a.a.a.c,8));Nzd(b,e.a,e.b);i=new mMd((!b.a&&(b.a=new XZd(D4,b,5)),b.a));g=Sub(a,1);while(g.a=0&&f!=c){throw Adb(new agb(LIe))}}e=0;for(i=0;iKfb(pJc(g.g,g.d[0]).a)){sFb(i.b>0);i.a.Xb(i.c=--i.b);Ikb(i,g);e=true}else if(!!h.e&&h.e.gc()>0){f=(!h.e&&(h.e=new bnb),h.e).Mc(b);j=(!h.e&&(h.e=new bnb),h.e).Mc(c);if(f||j){(!h.e&&(h.e=new bnb),h.e).Fc(g);++g.c}}}e||(ZEb(d.c,g),true)} -function H3c(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r;l=a.a.i+a.a.g/2;m=a.a.i+a.a.g/2;o=b.i+b.g/2;q=b.j+b.f/2;h=new rjd(o,q);j=RD(Gxd(b,(umd(),Qld)),8);j.a=j.a+l;j.b=j.b+m;f=(h.b-j.b)/(h.a-j.a);d=h.b-f*h.a;p=c.i+c.g/2;r=c.j+c.f/2;i=new rjd(p,r);k=RD(Gxd(c,Qld),8);k.a=k.a+l;k.b=k.b+m;g=(i.b-k.b)/(i.a-k.a);e=i.b-g*i.a;n=(d-e)/(g-f);if(j.a>>0,'0'+b.toString(16));d='\\x'+zhb(c,c.length-2,c.length)}else if(a>=txe){c=(b=a>>>0,'0'+b.toString(16));d='\\v'+zhb(c,c.length-6,c.length)}else d=''+String.fromCharCode(a&Bwe);}return d} -function Ugc(a){var b,c,d;if(Dod(RD(mQb(a,(yCc(),BBc)),101))){for(c=new Anb(a.j);c.a=b.o&&c.f<=b.f||b.a*0.5<=c.f&&b.a*1.5>=c.f){g=RD(Vmb(b.n,b.n.c.length-1),209);if(g.e+g.d+c.g+e<=d&&(f=RD(Vmb(b.n,b.n.c.length-1),209),f.f-a.f+c.f<=a.b||a.a.c.length==1)){K9c(b,c);return true}else if(b.s+c.g<=d&&(b.t+b.d+c.f+e<=a.b||a.a.c.length==1)){Rmb(b.b,c);h=RD(Vmb(b.n,b.n.c.length-1),209);Rmb(b.n,new _9c(b.s,h.f+h.a+b.i,b.i));W9c(RD(Vmb(b.n,b.n.c.length-1),209),c);M9c(b,c);return true}}return false} -function xLd(a,b,c){var d,e,f,g;if(a.Pj()){e=null;f=a.Qj();d=a.Ij(1,g=UHd(a,b,c),c,b,f);if(a.Mj()&&!(a.Yi()&&g!=null?pb(g,c):dE(g)===dE(c))){g!=null&&(e=a.Oj(g,e));e=a.Nj(c,e);a.Tj()&&(e=a.Wj(g,c,e));if(!e){a.Jj(d)}else{e.nj(d);e.oj()}}else{a.Tj()&&(e=a.Wj(g,c,e));if(!e){a.Jj(d)}else{e.nj(d);e.oj()}}return g}else{g=UHd(a,b,c);if(a.Mj()&&!(a.Yi()&&g!=null?pb(g,c):dE(g)===dE(c))){e=null;g!=null&&(e=a.Oj(g,null));e=a.Nj(c,e);!!e&&e.oj()}return g}} -function Rsc(a,b){var c,d,e,f,g;b.Ug('Path-Like Graph Wrapping',1);if(a.b.c.length==0){b.Vg();return}e=new ysc(a);g=(e.i==null&&(e.i=tsc(e,new Asc)),Kfb(e.i)*e.f);c=g/(e.i==null&&(e.i=tsc(e,new Asc)),Kfb(e.i));if(e.b>c){b.Vg();return}switch(RD(mQb(a,(yCc(),rCc)),351).g){case 2:f=new Ksc;break;case 0:f=new zrc;break;default:f=new Nsc;}d=f.og(a,e);if(!f.pg()){switch(RD(mQb(a,xCc),352).g){case 2:d=Wsc(e,d);break;case 1:d=Usc(e,d);}}Qsc(a,e,d);b.Vg()} -function mB(a,b){var c,d,e,f,g,h,i,j;b%=24;if(a.q.getHours()!=b){d=new $wnd.Date(a.q.getTime());d.setDate(d.getDate()+1);h=a.q.getTimezoneOffset()-d.getTimezoneOffset();if(h>0){i=h/60|0;j=h%60;e=a.q.getDate();c=a.q.getHours();c+i>=24&&++e;f=new $wnd.Date(a.q.getFullYear(),a.q.getMonth(),e,b+i,a.q.getMinutes()+j,a.q.getSeconds(),a.q.getMilliseconds());a.q.setTime(f.getTime())}}g=a.q.getTime();a.q.setTime(g+3600000);a.q.getHours()!=b&&a.q.setTime(g)} -function kKc(a,b){var c,d,e,f;Nwb(a.d,a.e);a.c.a.$b();if(Kfb(UD(mQb(b.j,(yCc(),Zzc))))!=0||Kfb(UD(mQb(b.j,Zzc)))!=0){c=Hze;dE(mQb(b.j,cAc))!==dE((kEc(),hEc))&&pQb(b.j,(Ywc(),jwc),(Geb(),true));f=RD(mQb(b.j,gCc),17).a;for(e=0;ee&&++j;Rmb(g,(tFb(h+j,b.c.length),RD(b.c[h+j],17)));i+=(tFb(h+j,b.c.length),RD(b.c[h+j],17)).a-d;++c;while(c=q&&a.e[i.p]>o*a.b||t>=c*q){ZEb(m.c,h);h=new bnb;ye(g,f);f.a.$b();j-=k;n=$wnd.Math.max(n,j*a.b+p);j+=t;s=t;t=0;k=0;p=0}}return new Ptd(n,m)} -function pYd(a){var b,c,d,e,f,g,h;if(!a.d){h=new v_d;b=iYd;f=b.a.zc(a,b);if(f==null){for(d=new dMd(zYd(a));d.e!=d.i.gc();){c=RD(bMd(d),29);YGd(h,pYd(c))}b.a.Bc(a)!=null;b.a.gc()==0&&undefined}g=h.i;for(e=(!a.q&&(a.q=new C5d(s7,a,11,10)),new dMd(a.q));e.e!=e.i.gc();++g){RD(bMd(e),411)}YGd(h,(!a.q&&(a.q=new C5d(s7,a,11,10)),a.q));VHd(h);a.d=new N$d((RD(QHd(xYd((lTd(),kTd).o),9),19),h.i),h.g);a.e=RD(h.g,688);a.e==null&&(a.e=jYd);yYd(a).b&=-17}return a.d} -function kge(a,b,c,d){var e,f,g,h,i,j;j=pke(a.e.Dh(),b);i=0;e=RD(a.g,124);nke();if(RD(b,69).xk()){for(g=0;g1||o==-1){l=RD(p,71);m=RD(k,71);if(l.dc()){m.$b()}else{g=!!Z5d(b);f=0;for(h=a.a?l.Kc():l.Ii();h.Ob();){j=RD(h.Pb(),58);e=RD(cub(a,j),58);if(!e){if(a.b&&!g){m.Gi(f,j);++f}}else{if(g){i=m.dd(e);i==-1?m.Gi(f,e):f!=i&&m.Ui(f,e)}else{m.Gi(f,e)}++f}}}}else{if(p==null){k.Wb(null)}else{e=cub(a,p);e==null?a.b&&!Z5d(b)&&k.Wb(p):k.Wb(e)}}}}} -function V9b(a,b){var c,d,e,f,g,h,i,j;c=new aac;for(e=new is(Mr(Z2b(b).a.Kc(),new ir));gs(e);){d=RD(hs(e),18);if(W0b(d)){continue}h=d.c.i;if(W9b(h,T9b)){j=X9b(a,h,T9b,S9b);if(j==-1){continue}c.b=$wnd.Math.max(c.b,j);!c.a&&(c.a=new bnb);Rmb(c.a,h)}}for(g=new is(Mr(a3b(b).a.Kc(),new ir));gs(g);){f=RD(hs(g),18);if(W0b(f)){continue}i=f.d.i;if(W9b(i,S9b)){j=X9b(a,i,S9b,T9b);if(j==-1){continue}c.d=$wnd.Math.max(c.d,j);!c.c&&(c.c=new bnb);Rmb(c.c,i)}}return c} -function pcc(a,b,c,d){var e,f,g,h,i,j,k;if(c.d.i==b.i){return}e=new j3b(a);h3b(e,(r3b(),o3b));pQb(e,(Ywc(),Awc),c);pQb(e,(yCc(),BBc),(Bod(),wod));ZEb(d.c,e);g=new R3b;P3b(g,e);Q3b(g,(qpd(),ppd));h=new R3b;P3b(h,e);Q3b(h,Xod);k=c.d;Z0b(c,g);f=new a1b;kQb(f,c);pQb(f,RAc,null);Y0b(f,h);Z0b(f,k);j=new Jkb(c.b,0);while(j.b1000000){throw Adb(new teb('power of ten too big'))}if(a<=lve){return Zib(Yib(Jjb[1],b),b)}d=Yib(Jjb[1],lve);e=d;c=Hdb(a-lve);b=eE(a%lve);while(Ddb(c,lve)>0){e=Wib(e,d);c=Vdb(c,lve)}e=Wib(e,Yib(Jjb[1],b));e=Zib(e,lve);c=Hdb(a-lve);while(Ddb(c,lve)>0){e=Zib(e,lve);c=Vdb(c,lve)}e=Zib(e,b);return e} -function s9b(a){var b,c,d,e,f,g,h,i,j,k;for(i=new Anb(a.a);i.aj&&d>j){k=h;j=Kfb(b.p[h.p])+Kfb(b.d[h.p])+h.o.b+h.d.a}else{e=false;c._g()&&c.bh('bk node placement breaks on '+h+' which should have been after '+k);break}}if(!e){break}}c._g()&&c.bh(b+' is feasible: '+e);return e} -function Dfc(a,b,c,d){var e,f,g,h,i,j,k,l,m;f=new j3b(a);h3b(f,(r3b(),q3b));pQb(f,(yCc(),BBc),(Bod(),wod));e=0;if(b){g=new R3b;pQb(g,(Ywc(),Awc),b);pQb(f,Awc,b.i);Q3b(g,(qpd(),ppd));P3b(g,f);m=s2b(b.e);for(j=m,k=0,l=j.length;k0){if(e<0&&k.a){e=i;f=j[0];d=0}if(e>=0){h=k.b;if(i==e){h-=d++;if(h==0){return 0}}if(!MA(b,j,k,h,g)){i=e-1;j[0]=f;continue}}else{e=-1;if(!MA(b,j,k,0,g)){return 0}}}else{e=-1;if(ihb(k.c,0)==32){l=j[0];KA(b,j);if(j[0]>l){continue}}else if(xhb(b,k.c,j[0])){j[0]+=k.c.length;continue}return 0}}if(!CB(g,c)){return 0}return j[0]} -function qWb(a,b,c){var d,e,f,g,h,i,j,k,l,m;k=new pwb(new GWb(c));h=$C(xdb,Hye,28,a.f.e.c.length,16,1);Snb(h,h.length);c[b.a]=0;for(j=new Anb(a.f.e);j.a=0&&!PPb(a,k,l)){--l}e[k]=l}for(n=0;n=0&&!PPb(a,h,o)){--h}f[o]=h}for(i=0;ib[m]&&md[i]&&TPb(a,i,m,false,true)}}} -function hUb(a){var b,c,d,e,f,g,h,i;c=Heb(TD(mQb(a,(yVb(),$Ub))));f=a.a.c.d;h=a.a.d.d;if(c){g=ijd(ojd(new rjd(h.a,h.b),f),0.5);i=ijd(ajd(a.e),0.5);b=ojd($id(new rjd(f.a,f.b),g),i);mjd(a.d,b)}else{e=Kfb(UD(mQb(a.a,qVb)));d=a.d;if(f.a>=h.a){if(f.b>=h.b){d.a=h.a+(f.a-h.a)/2+e;d.b=h.b+(f.b-h.b)/2-e-a.e.b}else{d.a=h.a+(f.a-h.a)/2+e;d.b=f.b+(h.b-f.b)/2+e}}else{if(f.b>=h.b){d.a=f.a+(h.a-f.a)/2+e;d.b=h.b+(f.b-h.b)/2+e}else{d.a=f.a+(h.a-f.a)/2+e;d.b=f.b+(h.b-f.b)/2-e-a.e.b}}}} -function qYd(a){var b,c,d,e,f,g,h,i;if(!a.f){i=new a_d;h=new a_d;b=iYd;g=b.a.zc(a,b);if(g==null){for(f=new dMd(zYd(a));f.e!=f.i.gc();){e=RD(bMd(f),29);YGd(i,qYd(e))}b.a.Bc(a)!=null;b.a.gc()==0&&undefined}for(d=(!a.s&&(a.s=new C5d(y7,a,21,17)),new dMd(a.s));d.e!=d.i.gc();){c=RD(bMd(d),179);ZD(c,102)&&WGd(h,RD(c,19))}VHd(h);a.r=new s_d(a,(RD(QHd(xYd((lTd(),kTd).o),6),19),h.i),h.g);YGd(i,a.r);VHd(i);a.f=new N$d((RD(QHd(xYd(kTd.o),5),19),i.i),i.g);yYd(a).b&=-3}return a.f} -function uSb(a){Cgd(a,new Pfd($fd(Xfd(Zfd(Yfd(new agd,Aze),'ELK DisCo'),'Layouter for arranging unconnected subgraphs. The subgraphs themselves are, by default, not laid out.'),new xSb)));Agd(a,Aze,Bze,iGd(sSb));Agd(a,Aze,Cze,iGd(mSb));Agd(a,Aze,Dze,iGd(hSb));Agd(a,Aze,Eze,iGd(nSb));Agd(a,Aze,Bye,iGd(qSb));Agd(a,Aze,Cye,iGd(pSb));Agd(a,Aze,Aye,iGd(rSb));Agd(a,Aze,Dye,iGd(oSb));Agd(a,Aze,vze,iGd(jSb));Agd(a,Aze,wze,iGd(iSb));Agd(a,Aze,xze,iGd(kSb));Agd(a,Aze,yze,iGd(lSb))} -function qAd(){qAd=geb;oAd=cD(WC(hE,1),zwe,28,15,[48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,70]);pAd=new RegExp('[ \t\n\r\f]+');try{nAd=cD(WC(h8,1),rve,2114,0,[new c2d((WA(),YA("yyyy-MM-dd'T'HH:mm:ss'.'SSSZ",_A(($A(),$A(),ZA))))),new c2d(YA("yyyy-MM-dd'T'HH:mm:ss'.'SSS",_A((null,ZA)))),new c2d(YA("yyyy-MM-dd'T'HH:mm:ss",_A((null,ZA)))),new c2d(YA("yyyy-MM-dd'T'HH:mm",_A((null,ZA)))),new c2d(YA('yyyy-MM-dd',_A((null,ZA))))])}catch(a){a=zdb(a);if(!ZD(a,82))throw Adb(a)}} -function uKc(a,b){var c,d,e,f;e=Kwb(a.d,1)!=0;d=mKc(a,b);if(d==0&&Heb(TD(mQb(b.j,(Ywc(),jwc))))){return 0}!Heb(TD(mQb(b.j,(Ywc(),jwc))))&&!Heb(TD(mQb(b.j,Owc)))||dE(mQb(b.j,(yCc(),cAc)))===dE((kEc(),hEc))?b.c.mg(b.e,e):(e=Heb(TD(mQb(b.j,jwc))));DKc(a,b,e,true);Heb(TD(mQb(b.j,Owc)))&&pQb(b.j,Owc,(Geb(),false));if(Heb(TD(mQb(b.j,jwc)))){pQb(b.j,jwc,(Geb(),false));pQb(b.j,Owc,true)}c=mKc(a,b);do{yKc(a);if(c==0){return 0}e=!e;f=c;DKc(a,b,e,false);c=mKc(a,b)}while(f>c);return f} -function vKc(a,b){var c,d,e,f;e=Kwb(a.d,1)!=0;d=lKc(a,b);if(d==0&&Heb(TD(mQb(b.j,(Ywc(),jwc))))){return 0}!Heb(TD(mQb(b.j,(Ywc(),jwc))))&&!Heb(TD(mQb(b.j,Owc)))||dE(mQb(b.j,(yCc(),cAc)))===dE((kEc(),hEc))?b.c.mg(b.e,e):(e=Heb(TD(mQb(b.j,jwc))));DKc(a,b,e,true);Heb(TD(mQb(b.j,Owc)))&&pQb(b.j,Owc,(Geb(),false));if(Heb(TD(mQb(b.j,jwc)))){pQb(b.j,jwc,(Geb(),false));pQb(b.j,Owc,true)}c=lKc(a,b);do{yKc(a);if(c==0){return 0}e=!e;f=c;DKc(a,b,e,false);c=lKc(a,b)}while(f>c);return f} -function Gid(a,b,c,d){var e,f,g,h,i,j,k,l,m;i=ojd(new rjd(c.a,c.b),a);j=i.a*b.b-i.b*b.a;k=b.a*d.b-b.b*d.a;l=(i.a*d.b-i.b*d.a)/k;m=j/k;if(k==0){if(j==0){e=$id(new rjd(c.a,c.b),ijd(new rjd(d.a,d.b),0.5));f=bjd(a,e);g=bjd($id(new rjd(a.a,a.b),b),e);h=$wnd.Math.sqrt(d.a*d.a+d.b*d.b)*0.5;if(f=0&&l<=1&&m>=0&&m<=1?$id(new rjd(a.a,a.b),ijd(new rjd(b.a,b.b),l)):null}} -function QWb(a,b,c){var d,e,f,g,h;d=RD(mQb(a,(yCc(),dAc)),21);c.a>b.a&&(d.Hc((ukd(),okd))?(a.c.a+=(c.a-b.a)/2):d.Hc(qkd)&&(a.c.a+=c.a-b.a));c.b>b.b&&(d.Hc((ukd(),skd))?(a.c.b+=(c.b-b.b)/2):d.Hc(rkd)&&(a.c.b+=c.b-b.b));if(RD(mQb(a,(Ywc(),kwc)),21).Hc((ovc(),hvc))&&(c.a>b.a||c.b>b.b)){for(h=new Anb(a.a);h.ab.a&&(d.Hc((ukd(),okd))?(a.c.a+=(c.a-b.a)/2):d.Hc(qkd)&&(a.c.a+=c.a-b.a));c.b>b.b&&(d.Hc((ukd(),skd))?(a.c.b+=(c.b-b.b)/2):d.Hc(rkd)&&(a.c.b+=c.b-b.b));if(RD(mQb(a,(Ywc(),kwc)),21).Hc((ovc(),hvc))&&(c.a>b.a||c.b>b.b)){for(g=new Anb(a.a);g.a0?a.i:0)>b&&i>0){f=0;g+=i+a.i;e=$wnd.Math.max(e,m);d+=i+a.i;i=0;m=0;if(c){++l;Rmb(a.n,new _9c(a.s,g,a.i))}h=0}m+=j.g+(h>0?a.i:0);i=$wnd.Math.max(i,j.f);c&&W9c(RD(Vmb(a.n,l),209),j);f+=j.g+(h>0?a.i:0);++h}e=$wnd.Math.max(e,m);d+=i;if(c){a.r=e;a.d=d;Ead(a.j)}return new Uid(a.s,a.t,e,d)} -function CRb(a){var b,c,d,e,f,g,h,i,j,k,l,m;a.b=false;l=oxe;i=pxe;m=oxe;j=pxe;for(d=a.e.a.ec().Kc();d.Ob();){c=RD(d.Pb(),272);e=c.a;l=$wnd.Math.min(l,e.c);i=$wnd.Math.max(i,e.c+e.b);m=$wnd.Math.min(m,e.d);j=$wnd.Math.max(j,e.d+e.a);for(g=new Anb(c.c);g.aa.o.a){k=(i-a.o.a)/2;h.b=$wnd.Math.max(h.b,k);h.c=$wnd.Math.max(h.c,k)}} -function RId(a){var b,c,d,e,f,g,h,i;f=new med;ied(f,(hed(),eed));for(d=(e=oC(a,$C(qJ,Nve,2,0,6,1)),new Dkb(new mob((new CC(a,e)).b)));d.bh?1:-1:Ejb(a.a,b.a,f);if(e==-1){l=-i;k=g==i?Hjb(b.a,h,a.a,f):Cjb(b.a,h,a.a,f)}else{l=g;if(g==i){if(e==0){return Pib(),Oib}k=Hjb(a.a,f,b.a,h)}else{k=Cjb(a.a,f,b.a,h)}}j=new cjb(l,k.length,k);Rib(j);return j} -function c5b(a,b){var c,d,e,f;f=Z4b(b);!b.c&&(b.c=new C5d(K4,b,9,9));FDb(new SDb(null,(!b.c&&(b.c=new C5d(K4,b,9,9)),new Swb(b.c,16))),new s5b(f));e=RD(mQb(f,(Ywc(),kwc)),21);Y4b(b,e);if(e.Hc((ovc(),hvc))){for(d=new dMd((!b.c&&(b.c=new C5d(K4,b,9,9)),b.c));d.e!=d.i.gc();){c=RD(bMd(d),123);g5b(a,b,f,c)}}RD(Gxd(b,(yCc(),lBc)),181).gc()!=0&&V4b(b,f);Heb(TD(mQb(f,sBc)))&&e.Fc(mvc);nQb(f,PBc)&&HCc(new RCc(Kfb(UD(mQb(f,PBc)))),f);dE(Gxd(b,IAc))===dE((Fnd(),Cnd))?d5b(a,b,f):b5b(a,b,f);return f} -function Vrc(a){var b,c,d,e,f,g,h,i;for(e=new Anb(a.b);e.a0?zhb(c.a,0,f-1):''}}else{return !c?a:c.a}} -function xic(a,b){var c,d,e,f,g,h,i;b.Ug('Sort By Input Model '+mQb(a,(yCc(),cAc)),1);e=0;for(d=new Anb(a.b);d.a=a.b.length){f[e++]=g.b[d++];f[e++]=g.b[d++]}else if(d>=g.b.length){f[e++]=a.b[c++];f[e++]=a.b[c++]}else if(g.b[d]0?a.i:0)}++b}Ce(a.n,i);a.d=c;a.r=d;a.g=0;a.f=0;a.e=0;a.o=oxe;a.p=oxe;for(f=new Anb(a.b);f.a0){e=(!a.n&&(a.n=new C5d(I4,a,1,7)),RD(QHd(a.n,0),135)).a;!e||Zhb(Zhb((b.a+=' "',b),e),'"')}}else{Zhb(Zhb((b.a+=' "',b),d),'"')}c=(!a.b&&(a.b=new Yie(E4,a,4,7)),!(a.b.i<=1&&(!a.c&&(a.c=new Yie(E4,a,5,8)),a.c.i<=1)));c?(b.a+=' [',b):(b.a+=' ',b);Zhb(b,Eb(new Gb,new dMd(a.b)));c&&(b.a+=']',b);b.a+=SAe;c&&(b.a+='[',b);Zhb(b,Eb(new Gb,new dMd(a.c)));c&&(b.a+=']',b);return b.a} -function odc(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D;v=a.c;w=b.c;c=Wmb(v.a,a,0);d=Wmb(w.a,b,0);t=RD(c3b(a,(BEc(),yEc)).Kc().Pb(),12);C=RD(c3b(a,zEc).Kc().Pb(),12);u=RD(c3b(b,yEc).Kc().Pb(),12);D=RD(c3b(b,zEc).Kc().Pb(),12);r=s2b(t.e);A=s2b(C.g);s=s2b(u.e);B=s2b(D.g);f3b(a,d,w);for(g=s,k=0,o=g.length;kk){new bTc((fTc(),eTc),c,b,j-k)}else if(j>0&&k>0){new bTc((fTc(),eTc),b,c,0);new bTc(eTc,c,b,0)}}return g} -function pXc(a,b,c){var d,e,f;a.a=new bnb;for(f=Sub(b.b,0);f.b!=f.d.c;){e=RD(evb(f),40);while(RD(mQb(e,(h_c(),f_c)),17).a>a.a.c.length-1){Rmb(a.a,new Ptd(Hze,KEe))}d=RD(mQb(e,f_c),17).a;if(c==(Cmd(),ymd)||c==zmd){e.e.aKfb(UD(RD(Vmb(a.a,d),42).b))&&Otd(RD(Vmb(a.a,d),42),e.e.a+e.f.a)}else{e.e.bKfb(UD(RD(Vmb(a.a,d),42).b))&&Otd(RD(Vmb(a.a,d),42),e.e.b+e.f.b)}}} -function g2b(a,b,c,d){var e,f,g,h,i,j,k;f=i2b(d);h=Heb(TD(mQb(d,(yCc(),aBc))));if((h||Heb(TD(mQb(a,MAc))))&&!Dod(RD(mQb(a,BBc),101))){e=vpd(f);i=q2b(a,c,c==(BEc(),zEc)?e:spd(e))}else{i=new R3b;P3b(i,a);if(b){k=i.n;k.a=b.a-a.n.a;k.b=b.b-a.n.b;_id(k,0,0,a.o.a,a.o.b);Q3b(i,c2b(i,f))}else{e=vpd(f);Q3b(i,c==(BEc(),zEc)?e:spd(e))}g=RD(mQb(d,(Ywc(),kwc)),21);j=i.j;switch(f.g){case 2:case 1:(j==(qpd(),Yod)||j==npd)&&g.Fc((ovc(),lvc));break;case 4:case 3:(j==(qpd(),Xod)||j==ppd)&&g.Fc((ovc(),lvc));}}return i} -function VXb(a,b){var c,d,e,f,g,h;for(g=new vkb((new mkb(a.f.b)).a);g.b;){f=tkb(g);e=RD(f.ld(),602);if(b==1){if(e.Af()!=(Cmd(),Bmd)&&e.Af()!=xmd){continue}}else{if(e.Af()!=(Cmd(),ymd)&&e.Af()!=zmd){continue}}d=RD(RD(f.md(),42).b,86);h=RD(RD(f.md(),42).a,194);c=h.c;switch(e.Af().g){case 2:d.g.c=a.e.a;d.g.b=$wnd.Math.max(1,d.g.b+c);break;case 1:d.g.c=d.g.c+c;d.g.b=$wnd.Math.max(1,d.g.b-c);break;case 4:d.g.d=a.e.b;d.g.a=$wnd.Math.max(1,d.g.a+c);break;case 3:d.g.d=d.g.d+c;d.g.a=$wnd.Math.max(1,d.g.a-c);}}} -function NNc(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p;h=$C(kE,Pwe,28,b.b.c.length,15,1);j=$C(hR,jwe,273,b.b.c.length,0,1);i=$C(jR,WAe,10,b.b.c.length,0,1);for(l=a.a,m=0,n=l.length;m0&&!!i[d]&&(o=bFc(a.b,i[d],e));p=$wnd.Math.max(p,e.c.c.b+o)}for(f=new Anb(k.e);f.a1){throw Adb(new agb(gLe))}if(!i){f=oke(b,d.Kc().Pb());g.Fc(f)}}return XGd(a,gge(a,b,c),g)} -function Fge(a,b,c){var d,e,f,g,h,i,j,k;if(qke(a.e,b)){i=(nke(),RD(b,69).xk()?new ole(b,a):new Eke(b,a));bge(i.c,i.b);Ake(i,RD(c,16))}else{k=pke(a.e.Dh(),b);d=RD(a.g,124);for(g=0;g'}i!=null&&(b.a+=''+i,b)}else if(a.e){h=a.e.zb;h!=null&&(b.a+=''+h,b)}else{b.a+='?';if(a.b){b.a+=' super ';r2d(a.b,b)}else{if(a.f){b.a+=' extends ';r2d(a.f,b)}}}} -function Uae(a){a.b=null;a.a=null;a.o=null;a.q=null;a.v=null;a.w=null;a.B=null;a.p=null;a.Q=null;a.R=null;a.S=null;a.T=null;a.U=null;a.V=null;a.W=null;a.bb=null;a.eb=null;a.ab=null;a.H=null;a.db=null;a.c=null;a.d=null;a.f=null;a.n=null;a.r=null;a.s=null;a.u=null;a.G=null;a.J=null;a.e=null;a.j=null;a.i=null;a.g=null;a.k=null;a.t=null;a.F=null;a.I=null;a.L=null;a.M=null;a.O=null;a.P=null;a.$=null;a.N=null;a.Z=null;a.cb=null;a.K=null;a.D=null;a.A=null;a.C=null;a._=null;a.fb=null;a.X=null;a.Y=null;a.gb=false;a.hb=false} -function yib(a){var b,c,d,e;d=Ajb((!a.c&&(a.c=ojb(Hdb(a.f))),a.c),0);if(a.e==0||a.a==0&&a.f!=-1&&a.e<0){return d}b=xib(a)<0?1:0;c=a.e;e=(d.length+1+$wnd.Math.abs(eE(a.e)),new cib);b==1&&(e.a+='-',e);if(a.e>0){c-=d.length-b;if(c>=0){e.a+='0.';for(;c>mib.length;c-=mib.length){$hb(e,mib)}_hb(e,mib,eE(c));Zhb(e,(BFb(b,d.length+1),d.substr(b)))}else{c=b-c;Zhb(e,zhb(d,b,eE(c)));e.a+='.';Zhb(e,yhb(d,eE(c)))}}else{Zhb(e,(BFb(b,d.length+1),d.substr(b)));for(;c<-mib.length;c+=mib.length){$hb(e,mib)}_hb(e,mib,eE(-c))}return e.a} -function BOc(a){var b,c,d,e,f,g,h,i,j;if(a.k!=(r3b(),p3b)){return false}if(a.j.c.length<=1){return false}f=RD(mQb(a,(yCc(),BBc)),101);if(f==(Bod(),wod)){return false}e=(wDc(),(!a.q?(yob(),yob(),wob):a.q)._b(iBc)?(d=RD(mQb(a,iBc),203)):(d=RD(mQb(Y2b(a),jBc),203)),d);if(e==uDc){return false}if(!(e==tDc||e==sDc)){g=Kfb(UD(hFc(a,fCc)));b=RD(mQb(a,eCc),140);!b&&(b=new R2b(g,g,g,g));j=b3b(a,(qpd(),ppd));i=b.d+b.a+(j.gc()-1)*g;if(i>a.o.b){return false}c=b3b(a,Xod);h=b.d+b.a+(c.gc()-1)*g;if(h>a.o.b){return false}}return true} -function VRc(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q;b.Ug('Orthogonal edge routing',1);j=Kfb(UD(mQb(a,(yCc(),cCc))));c=Kfb(UD(mQb(a,UBc)));d=Kfb(UD(mQb(a,XBc)));m=new TTc(0,c);q=0;g=new Jkb(a.b,0);h=null;k=null;i=null;l=null;do{k=g.b0){n=(o-1)*c;!!h&&(n+=d);!!k&&(n+=d);nb||Heb(TD(Gxd(i,(X7c(),D7c))))){e=0;f+=k.b+c;ZEb(l.c,k);k=new Had(f,c);d=new V9c(0,k.f,k,c);Cad(k,d);e=0}if(d.b.c.length==0||!Heb(TD(Gxd(vCd(i),(X7c(),L7c))))&&(i.f>=d.o&&i.f<=d.f||d.a*0.5<=i.f&&d.a*1.5>=i.f)){K9c(d,i)}else{g=new V9c(d.s+d.r+c,k.f,k,c);Cad(k,g);K9c(g,i)}e=i.i+i.g}ZEb(l.c,k);return l} -function ste(a){var b,c,d,e;if(a.b==null||a.b.length<=2)return;if(a.a)return;b=0;e=0;while(e=a.b[e+1]){e+=2}else if(c0){d=new dnb(RD(Qc(a.a,f),21));yob();_mb(d,new M0b(b));e=new Jkb(f.b,0);while(e.b0&&d>=-6){if(d>=0){aib(f,c-eE(a.e),String.fromCharCode(46))}else{peb(f,b-1,b-1,'0.');aib(f,b+1,Ihb(mib,0,-eE(d)-1))}}else{if(c-b>=1){aib(f,b,String.fromCharCode(46));++c}aib(f,c,String.fromCharCode(69));d>0&&aib(f,++c,String.fromCharCode(43));aib(f,++c,''+Zdb(Hdb(d)))}a.g=f.a;return a.g} -function KNc(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A;d=Kfb(UD(mQb(b,(yCc(),hBc))));v=RD(mQb(b,gCc),17).a;m=4;e=3;w=20/v;n=false;i=0;g=lve;do{f=i!=1;l=i!=0;A=0;for(q=a.a,s=0,u=q.length;sv)){i=2;g=lve}else if(i==0){i=1;g=A}else{i=0;g=A}}else{n=A>=g||g-A0?1:cz(isNaN(d),isNaN(0)))>=0^(null,bz(vEe),($wnd.Math.abs(h)<=vEe||h==0||isNaN(h)&&isNaN(0)?0:h<0?-1:h>0?1:cz(isNaN(h),isNaN(0)))>=0)){return $wnd.Math.max(h,d)}bz(vEe);if(($wnd.Math.abs(d)<=vEe||d==0||isNaN(d)&&isNaN(0)?0:d<0?-1:d>0?1:cz(isNaN(d),isNaN(0)))>0){return $wnd.Math.sqrt(h*h+d*d)}return -$wnd.Math.sqrt(h*h+d*d)} -function hue(a,b){var c,d,e,f,g,h;if(!b)return;!a.a&&(a.a=new gyb);if(a.e==2){dyb(a.a,b);return}if(b.e==1){for(e=0;e=txe?Nhb(c,qse(d)):Jhb(c,d&Bwe);g=(++Use,new eue(10,null,0));fyb(a.a,g,h-1)}else{c=(g.Mm().length+f,new Rhb);Nhb(c,g.Mm())}if(b.e==0){d=b.Km();d>=txe?Nhb(c,qse(d)):Jhb(c,d&Bwe)}else{Nhb(c,b.Mm())}RD(g,530).b=c.a} -function Qsc(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q;if(c.dc()){return}h=0;m=0;d=c.Kc();o=RD(d.Pb(),17).a;while(h1&&(i=j.Hg(i,a.a,h))}if(i.c.length==1){return RD(Vmb(i,i.c.length-1),238)}if(i.c.length==2){return e8c((tFb(0,i.c.length),RD(i.c[0],238)),(tFb(1,i.c.length),RD(i.c[1],238)),g,f)}return null} -function CZc(a,b,c){var d,e,f,g,h,i,j;c.Ug('Find roots',1);a.a.c.length=0;for(e=Sub(b.b,0);e.b!=e.d.c;){d=RD(evb(e),40);if(d.b.b==0){pQb(d,(q$c(),n$c),(Geb(),true));Rmb(a.a,d)}}switch(a.a.c.length){case 0:f=new bXc(0,b,'DUMMY_ROOT');pQb(f,(q$c(),n$c),(Geb(),true));pQb(f,WZc,true);Mub(b.b,f);break;case 1:break;default:g=new bXc(0,b,IEe);for(i=new Anb(a.a);i.a=$wnd.Math.abs(d.b)){d.b=0;f.d+f.a>g.d&&f.dg.c&&f.c0){b=new zNd(a.i,a.g);c=a.i;f=c<100?null:new gLd(c);if(a.Tj()){for(d=0;d0){h=a.g;j=a.i;OHd(a);f=j<100?null:new gLd(j);for(d=0;d>13|(a.m&15)<<9;e=a.m>>4&8191;f=a.m>>17|(a.h&255)<<5;g=(a.h&1048320)>>8;h=b.l&8191;i=b.l>>13|(b.m&15)<<9;j=b.m>>4&8191;k=b.m>>17|(b.h&255)<<5;l=(b.h&1048320)>>8;B=c*h;C=d*h;D=e*h;F=f*h;G=g*h;if(i!=0){C+=c*i;D+=d*i;F+=e*i;G+=f*i}if(j!=0){D+=c*j;F+=d*j;G+=e*j}if(k!=0){F+=c*k;G+=d*k}l!=0&&(G+=c*l);n=B&dxe;o=(C&511)<<13;m=n+o;q=B>>22;r=C>>9;s=(D&262143)<<4;t=(F&31)<<17;p=q+r+s+t;v=D>>18;w=F>>5;A=(G&4095)<<8;u=v+w+A;p+=m>>22;m&=dxe;u+=p>>22;p&=dxe;u&=exe;return hD(m,p,u)} -function Fac(a){var b,c,d,e,f,g,h;h=RD(Vmb(a.j,0),12);if(h.g.c.length!=0&&h.e.c.length!=0){throw Adb(new dgb('Interactive layout does not support NORTH/SOUTH ports with incoming _and_ outgoing edges.'))}if(h.g.c.length!=0){f=oxe;for(c=new Anb(h.g);c.a4){if(a.fk(b)){if(a.al()){e=RD(b,54);d=e.Eh();i=d==a.e&&(a.ml()?e.yh(e.Fh(),a.il())==a.jl():-1-e.Fh()==a.Lj());if(a.nl()&&!i&&!d&&!!e.Jh()){for(f=0;f0&&aGc(a,h,l)}for(e=new Anb(l);e.aa.d[g.p]){c+=ZLc(a.b,f)*RD(i.b,17).a;hmb(a.a,sgb(f))}}while(!nmb(a.a)){XLc(a.b,RD(smb(a.a),17).a)}}return c} -function x9b(a,b){var c,d,e,f,g,h,i,j,k,l;k=RD(mQb(a,(Ywc(),hwc)),64);d=RD(Vmb(a.j,0),12);k==(qpd(),Yod)?Q3b(d,npd):k==npd&&Q3b(d,Yod);if(RD(mQb(b,(yCc(),lBc)),181).Hc((Qpd(),Ppd))){i=Kfb(UD(mQb(a,_Bc)));j=Kfb(UD(mQb(a,aCc)));g=Kfb(UD(mQb(a,ZBc)));h=RD(mQb(b,EBc),21);if(h.Hc((Pod(),Lod))){c=j;l=a.o.a/2-d.n.a;for(f=new Anb(d.f);f.a0&&(j=a.n.a/f);break;case 2:case 4:e=a.i.o.b;e>0&&(j=a.n.b/e);}pQb(a,(Ywc(),Jwc),j)}i=a.o;g=a.a;if(d){g.a=d.a;g.b=d.b;a.d=true}else if(b!=zod&&b!=Aod&&h!=opd){switch(h.g){case 1:g.a=i.a/2;break;case 2:g.a=i.a;g.b=i.b/2;break;case 3:g.a=i.a/2;g.b=i.b;break;case 4:g.b=i.b/2;}}else{g.a=i.a/2;g.b=i.b/2}} -function VJd(a){var b,c,d,e,f,g,h,i,j,k;if(a.Pj()){k=a.Ej();i=a.Qj();if(k>0){b=new $Hd(a.pj());c=k;f=c<100?null:new gLd(c);aJd(a,c,b.g);e=c==1?a.Ij(4,QHd(b,0),null,0,i):a.Ij(6,b,null,-1,i);if(a.Mj()){for(d=new dMd(b);d.e!=d.i.gc();){f=a.Oj(bMd(d),f)}if(!f){a.Jj(e)}else{f.nj(e);f.oj()}}else{if(!f){a.Jj(e)}else{f.nj(e);f.oj()}}}else{aJd(a,a.Ej(),a.Fj());a.Jj(a.Ij(6,(yob(),vob),null,-1,i))}}else if(a.Mj()){k=a.Ej();if(k>0){h=a.Fj();j=k;aJd(a,k,h);f=j<100?null:new gLd(j);for(d=0;d1&&urd(g)*trd(g)/2>h[0]){f=0;while(fh[f]){++f}o=new Rkb(p,0,f+1);l=new zrd(o);k=urd(g)/trd(g);i=ird(l,b,new z3b,c,d,e,k);$id(hjd(l.e),i);zFb(lwb(m,l),Bxe);n=new Rkb(p,f+1,p.c.length);iwb(m,n);p.c.length=0;j=0;Pnb(h,h.length,0)}else{q=m.b.c.length==0?null:Vmb(m.b,0);q!=null&&owb(m,0);j>0&&(h[j]=h[j-1]);h[j]+=urd(g)*trd(g);++j;ZEb(p.c,g)}}return p} -function _nc(a,b){var c,d,e,f;c=b.b;f=new dnb(c.j);e=0;d=c.j;d.c.length=0;Nnc(RD($i(a.b,(qpd(),Yod),(joc(),ioc)),15),c);e=Onc(f,e,new Hoc,d);Nnc(RD($i(a.b,Yod,hoc),15),c);e=Onc(f,e,new Joc,d);Nnc(RD($i(a.b,Yod,goc),15),c);Nnc(RD($i(a.b,Xod,ioc),15),c);Nnc(RD($i(a.b,Xod,hoc),15),c);e=Onc(f,e,new Loc,d);Nnc(RD($i(a.b,Xod,goc),15),c);Nnc(RD($i(a.b,npd,ioc),15),c);e=Onc(f,e,new Noc,d);Nnc(RD($i(a.b,npd,hoc),15),c);e=Onc(f,e,new Poc,d);Nnc(RD($i(a.b,npd,goc),15),c);Nnc(RD($i(a.b,ppd,ioc),15),c);e=Onc(f,e,new toc,d);Nnc(RD($i(a.b,ppd,hoc),15),c);Nnc(RD($i(a.b,ppd,goc),15),c)} -function jJc(a,b,c){var d,e,f,g,h,i,j,k,l,m,n;for(h=new Anb(b);h.a0.5?(r-=g*2*(o-0.5)):o<0.5&&(r+=f*2*(0.5-o));e=h.d.b;rq.a-p-k&&(r=q.a-p-k);h.n.a=b+r}} -function jec(a){var b,c,d,e,f;d=RD(mQb(a,(yCc(),UAc)),171);if(d==(cxc(),$wc)){for(c=new is(Mr(Z2b(a).a.Kc(),new ir));gs(c);){b=RD(hs(c),18);if(!lec(b)){throw Adb(new Jed(nBe+X2b(a)+"' has its layer constraint set to FIRST_SEPARATE, but has at least one incoming edge. "+'FIRST_SEPARATE nodes must not have incoming edges.'))}}}else if(d==axc){for(f=new is(Mr(a3b(a).a.Kc(),new ir));gs(f);){e=RD(hs(f),18);if(!lec(e)){throw Adb(new Jed(nBe+X2b(a)+"' has its layer constraint set to LAST_SEPARATE, but has at least one outgoing edge. "+'LAST_SEPARATE nodes must not have outgoing edges.'))}}}} -function Qed(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o;if(a.e&&a.c.c>19!=0){b=xD(b);i=!i}g=pD(b);f=false;e=false;d=false;if(a.h==fxe&&a.m==0&&a.l==0){e=true;f=true;if(g==-1){a=gD((MD(),ID));d=true;i=!i}else{h=BD(a,g);i&&nD(h);c&&(eD=hD(0,0,0));return h}}else if(a.h>>19!=0){f=true;a=xD(a);d=true;i=!i}if(g!=-1){return kD(a,g,i,f,c)}if(uD(a,b)<0){c&&(f?(eD=xD(a)):(eD=hD(a.l,a.m,a.h)));return hD(0,0,0)}return lD(d?a:hD(a.l,a.m,a.h),b,i,f,e,c)} -function Bjb(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o;g=a.e;i=b.e;if(g==0){return b}if(i==0){return a}f=a.d;h=b.d;if(f+h==2){c=Cdb(a.a[0],yxe);d=Cdb(b.a[0],yxe);if(g==i){k=Bdb(c,d);o=Ydb(k);n=Ydb(Udb(k,32));return n==0?new ajb(g,o):new cjb(g,2,cD(WC(kE,1),Pwe,28,15,[o,n]))}return Pib(),Jdb(g<0?Vdb(d,c):Vdb(c,d),0)?jjb(g<0?Vdb(d,c):Vdb(c,d)):Xib(jjb(Odb(g<0?Vdb(d,c):Vdb(c,d))))}else if(g==i){m=g;l=f>=h?Cjb(a.a,f,b.a,h):Cjb(b.a,h,a.a,f)}else{e=f!=h?f>h?1:-1:Ejb(a.a,b.a,f);if(e==0){return Pib(),Oib}if(e==1){m=g;l=Hjb(a.a,f,b.a,h)}else{m=i;l=Hjb(b.a,h,a.a,f)}}j=new cjb(m,l.length,l);Rib(j);return j} -function KUc(a,b){var c,d,e,f,g,h,i;if(a.g>b.f||b.g>a.f){return}c=0;d=0;for(g=a.w.a.ec().Kc();g.Ob();){e=RD(g.Pb(),12);AVc(xjd(cD(WC(l3,1),Nve,8,0,[e.i.n,e.n,e.a])).b,b.g,b.f)&&++c}for(h=a.r.a.ec().Kc();h.Ob();){e=RD(h.Pb(),12);AVc(xjd(cD(WC(l3,1),Nve,8,0,[e.i.n,e.n,e.a])).b,b.g,b.f)&&--c}for(i=b.w.a.ec().Kc();i.Ob();){e=RD(i.Pb(),12);AVc(xjd(cD(WC(l3,1),Nve,8,0,[e.i.n,e.n,e.a])).b,a.g,a.f)&&++d}for(f=b.r.a.ec().Kc();f.Ob();){e=RD(f.Pb(),12);AVc(xjd(cD(WC(l3,1),Nve,8,0,[e.i.n,e.n,e.a])).b,a.g,a.f)&&--d}if(c=0){return c}switch(yfe(Qee(a,c))){case 2:{if(lhb('',Oee(a,c.qk()).xe())){i=Bfe(Qee(a,c));h=Afe(Qee(a,c));k=Ree(a,b,i,h);if(k){return k}e=Fee(a,b);for(g=0,l=e.gc();g1){throw Adb(new agb(gLe))}k=pke(a.e.Dh(),b);d=RD(a.g,124);for(g=0;g1;for(j=new l4b(m.b);xnb(j.a)||xnb(j.b);){i=RD(xnb(j.a)?ynb(j.a):ynb(j.b),18);l=i.c==m?i.d:i.c;$wnd.Math.abs(xjd(cD(WC(l3,1),Nve,8,0,[l.i.n,l.n,l.a])).b-g.b)>1&&eSc(a,i,g,f,m)}}} -function vUc(a){var b,c,d,e,f,g;e=new Jkb(a.e,0);d=new Jkb(a.a,0);if(a.d){for(c=0;cAEe){f=b;g=0;while($wnd.Math.abs(b-f)0);e.a.Xb(e.c=--e.b);uUc(a,a.b-g,f,d,e);sFb(e.b0);d.a.Xb(d.c=--d.b)}if(!a.d){for(c=0;c0){a.f[k.p]=n/(k.e.c.length+k.g.c.length);a.c=$wnd.Math.min(a.c,a.f[k.p]);a.b=$wnd.Math.max(a.b,a.f[k.p])}else h&&(a.f[k.p]=n)}} -function xne(a){a.b=null;a.bb=null;a.fb=null;a.qb=null;a.a=null;a.c=null;a.d=null;a.e=null;a.f=null;a.n=null;a.M=null;a.L=null;a.Q=null;a.R=null;a.K=null;a.db=null;a.eb=null;a.g=null;a.i=null;a.j=null;a.k=null;a.gb=null;a.o=null;a.p=null;a.q=null;a.r=null;a.$=null;a.ib=null;a.S=null;a.T=null;a.t=null;a.s=null;a.u=null;a.v=null;a.w=null;a.B=null;a.A=null;a.C=null;a.D=null;a.F=null;a.G=null;a.H=null;a.I=null;a.J=null;a.P=null;a.Z=null;a.U=null;a.V=null;a.W=null;a.X=null;a.Y=null;a._=null;a.ab=null;a.cb=null;a.hb=null;a.nb=null;a.lb=null;a.mb=null;a.ob=null;a.pb=null;a.jb=null;a.kb=null;a.N=false;a.O=false} -function C8b(a,b,c){var d,e,f,g;c.Ug('Graph transformation ('+a.a+')',1);g=bv(b.a);for(f=new Anb(b.b);f.a=h.b.c)&&(h.b=b);if(!h.c||b.c<=h.c.c){h.d=h.c;h.c=b}(!h.e||b.d>=h.e.d)&&(h.e=b);(!h.f||b.d<=h.f.d)&&(h.f=b)}d=new PZb((nZb(),jZb));t$b(a,AZb,new mob(cD(WC(wQ,1),rve,382,0,[d])));g=new PZb(mZb);t$b(a,zZb,new mob(cD(WC(wQ,1),rve,382,0,[g])));e=new PZb(kZb);t$b(a,yZb,new mob(cD(WC(wQ,1),rve,382,0,[e])));f=new PZb(lZb);t$b(a,xZb,new mob(cD(WC(wQ,1),rve,382,0,[f])));FZb(d.c,jZb);FZb(e.c,kZb);FZb(f.c,lZb);FZb(g.c,mZb);h.a.c.length=0;Tmb(h.a,d.c);Tmb(h.a,hv(e.c));Tmb(h.a,f.c);Tmb(h.a,hv(g.c));return h} -function n9c(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o;b.Ug(bGe,1);n=Kfb(UD(Gxd(a,(X6c(),W6c))));g=Kfb(UD(Gxd(a,(X7c(),Q7c))));h=RD(Gxd(a,N7c),107);Bad((!a.a&&(a.a=new C5d(J4,a,10,11)),a.a));k=U8c((!a.a&&(a.a=new C5d(J4,a,10,11)),a.a),n,g);!a.a&&(a.a=new C5d(J4,a,10,11));for(j=new Anb(k);j.a0){a.a=i+(n-1)*f;b.c.b+=a.a;b.f.b+=a.a}}if(o.a.gc()!=0){m=new TTc(1,f);n=STc(m,b,o,p,b.f.b+i-b.c.b);n>0&&(b.f.b+=i+(n-1)*f)}} -function osc(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;k=Kfb(UD(mQb(a,(yCc(),WBc))));d=Kfb(UD(mQb(a,nCc)));m=new dtd;pQb(m,WBc,k+d);j=b;r=j.d;p=j.c.i;s=j.d.i;q=Q4b(p.c);t=Q4b(s.c);e=new bnb;for(l=q;l<=t;l++){h=new j3b(a);h3b(h,(r3b(),o3b));pQb(h,(Ywc(),Awc),j);pQb(h,BBc,(Bod(),wod));pQb(h,YBc,m);n=RD(Vmb(a.b,l),30);l==q?f3b(h,n.a.c.length-c,n):g3b(h,n);u=Kfb(UD(mQb(j,FAc)));if(u<0){u=0;pQb(j,FAc,u)}h.o.b=u;o=$wnd.Math.floor(u/2);g=new R3b;Q3b(g,(qpd(),ppd));P3b(g,h);g.n.b=o;i=new R3b;Q3b(i,Xod);P3b(i,h);i.n.b=o;Z0b(j,g);f=new a1b;kQb(f,j);pQb(f,RAc,null);Y0b(f,i);Z0b(f,r);psc(h,j,f);ZEb(e.c,f);j=f}return e} -function Hec(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t;i=RD(e3b(a,(qpd(),ppd)).Kc().Pb(),12).e;n=RD(e3b(a,Xod).Kc().Pb(),12).g;h=i.c.length;t=K3b(RD(Vmb(a.j,0),12));while(h-->0){p=(tFb(0,i.c.length),RD(i.c[0],18));e=(tFb(0,n.c.length),RD(n.c[0],18));s=e.d.e;f=Wmb(s,e,0);$0b(p,e.d,f);Y0b(e,null);Z0b(e,null);o=p.a;b&&Mub(o,new sjd(t));for(d=Sub(e.a,0);d.b!=d.d.c;){c=RD(evb(d),8);Mub(o,new sjd(c))}r=p.b;for(m=new Anb(e.b);m.ag)&&Ysb(a.b,RD(q.b,18))}}++h}f=g}}}} -function zhd(b,c){var d;if(c==null||lhb(c,vve)){return null}if(c.length==0&&b.k!=(kid(),fid)){return null}switch(b.k.g){case 1:return mhb(c,FGe)?(Geb(),Feb):mhb(c,GGe)?(Geb(),Eeb):null;case 2:try{return sgb(Oeb(c,qwe,lve))}catch(a){a=zdb(a);if(ZD(a,130)){return null}else throw Adb(a)}case 4:try{return Neb(c)}catch(a){a=zdb(a);if(ZD(a,130)){return null}else throw Adb(a)}case 3:return c;case 5:uhd(b);return xhd(b,c);case 6:uhd(b);return yhd(b,b.a,c);case 7:try{d=whd(b);d.cg(c);return d}catch(a){a=zdb(a);if(ZD(a,33)){return null}else throw Adb(a)}default:throw Adb(new dgb('Invalid type set for this layout option.'));}} -function JKd(a){var b;switch(a.d){case 1:{if(a.Sj()){return a.o!=-2}break}case 2:{if(a.Sj()){return a.o==-2}break}case 3:case 5:case 4:case 6:case 7:{return a.o>-2}default:{return false}}b=a.Rj();switch(a.p){case 0:return b!=null&&Heb(TD(b))!=Pdb(a.k,0);case 1:return b!=null&&RD(b,222).a!=Ydb(a.k)<<24>>24;case 2:return b!=null&&RD(b,180).a!=(Ydb(a.k)&Bwe);case 6:return b!=null&&Pdb(RD(b,168).a,a.k);case 5:return b!=null&&RD(b,17).a!=Ydb(a.k);case 7:return b!=null&&RD(b,191).a!=Ydb(a.k)<<16>>16;case 3:return b!=null&&Kfb(UD(b))!=a.j;case 4:return b!=null&&RD(b,161).a!=a.j;default:return b==null?a.n!=null:!pb(b,a.n);}} -function N_d(a,b,c){var d,e,f,g;if(a.ol()&&a.nl()){g=O_d(a,RD(c,58));if(dE(g)!==dE(c)){a.xj(b);a.Dj(b,P_d(a,b,g));if(a.al()){f=(e=RD(c,54),a.ml()?a.kl()?e.Th(a.b,Z5d(RD(vYd(Uwd(a.b),a.Lj()),19)).n,RD(vYd(Uwd(a.b),a.Lj()).Hk(),29).kk(),null):e.Th(a.b,BYd(e.Dh(),Z5d(RD(vYd(Uwd(a.b),a.Lj()),19))),null,null):e.Th(a.b,-1-a.Lj(),null,null));!RD(g,54).Ph()&&(f=(d=RD(g,54),a.ml()?a.kl()?d.Rh(a.b,Z5d(RD(vYd(Uwd(a.b),a.Lj()),19)).n,RD(vYd(Uwd(a.b),a.Lj()).Hk(),29).kk(),f):d.Rh(a.b,BYd(d.Dh(),Z5d(RD(vYd(Uwd(a.b),a.Lj()),19))),null,f):d.Rh(a.b,-1-a.Lj(),null,f)));!!f&&f.oj()}Mvd(a.b)&&a.Jj(a.Ij(9,c,g,b,false));return g}}return c} -function iJb(a){var b,c,d,e,f,g,h,i,j,k;d=new bnb;for(g=new Anb(a.e.a);g.a0&&(g=$wnd.Math.max(g,zMb(a.C.b+d.d.b,e)))}else{n=m+k.d.c+a.w+d.d.b;g=$wnd.Math.max(g,(Zy(),bz(Tye),$wnd.Math.abs(l-e)<=Tye||l==e||isNaN(l)&&isNaN(e)?0:n/(e-l)))}k=d;l=e;m=f}if(!!a.C&&a.C.c>0){n=m+a.C.c;j&&(n+=k.d.c);g=$wnd.Math.max(g,(Zy(),bz(Tye),$wnd.Math.abs(l-1)<=Tye||l==1||isNaN(l)&&isNaN(1)?0:n/(1-l)))}c.n.b=0;c.a.a=g} -function ENb(a,b){var c,d,e,f,g,h,i,j,k,l,m,n;c=RD(Vrb(a.b,b),127);i=RD(RD(Qc(a.r,b),21),87);if(i.dc()){c.n.d=0;c.n.a=0;return}j=a.u.Hc((Pod(),Lod));g=0;a.A.Hc((Qpd(),Ppd))&&JNb(a,b);h=i.Kc();k=null;m=0;l=0;while(h.Ob()){d=RD(h.Pb(),117);f=Kfb(UD(d.b.of((tNb(),sNb))));e=d.b.Mf().b;if(!k){!!a.C&&a.C.d>0&&(g=$wnd.Math.max(g,zMb(a.C.d+d.d.d,f)))}else{n=l+k.d.a+a.w+d.d.d;g=$wnd.Math.max(g,(Zy(),bz(Tye),$wnd.Math.abs(m-f)<=Tye||m==f||isNaN(m)&&isNaN(f)?0:n/(f-m)))}k=d;m=f;l=e}if(!!a.C&&a.C.a>0){n=l+a.C.a;j&&(n+=k.d.a);g=$wnd.Math.max(g,(Zy(),bz(Tye),$wnd.Math.abs(m-1)<=Tye||m==1||isNaN(m)&&isNaN(1)?0:n/(1-m)))}c.n.d=0;c.a.b=g} -function L8c(a,b,c,d,e,f,g,h){var i,j,k,l,m,n,o,p,q,r;o=false;j=dad(c.q,b.f+b.b-c.q.f);n=d.f>b.b&&h;r=e-(c.q.e+j-g);l=(i=S9c(d,r,false),i.a);if(n&&l>d.f){return false}if(n){m=0;for(q=new Anb(b.d);q.a=(tFb(f,a.c.length),RD(a.c[f],186)).e;if(!n&&l>b.b&&!k){return false}if(k||n||l<=b.b){if(k&&l>b.b){c.d=l;Q9c(c,P9c(c,l))}else{ead(c.q,j);c.c=true}Q9c(d,e-(c.s+c.r));U9c(d,c.q.e+c.q.d,b.f);Cad(b,d);if(a.c.length>f){Fad((tFb(f,a.c.length),RD(a.c[f],186)),d);(tFb(f,a.c.length),RD(a.c[f],186)).a.c.length==0&&Xmb(a,f)}o=true}return o} -function zJc(a,b,c){var d,e,f,g,h,i;this.g=a;h=b.d.length;i=c.d.length;this.d=$C(jR,WAe,10,h+i,0,1);for(g=0;g0?xJc(this,this.f/this.a):pJc(b.g,b.d[0]).a!=null&&pJc(c.g,c.d[0]).a!=null?xJc(this,(Kfb(pJc(b.g,b.d[0]).a)+Kfb(pJc(c.g,c.d[0]).a))/2):pJc(b.g,b.d[0]).a!=null?xJc(this,pJc(b.g,b.d[0]).a):pJc(c.g,c.d[0]).a!=null&&xJc(this,pJc(c.g,c.d[0]).a)} -function DXb(a,b){var c,d,e,f,g,h,i,j,k,l;a.a=new fYb(wsb(s3));for(d=new Anb(b.a);d.a=1){if(q-g>0&&l>=0){i.n.a+=p;i.n.b+=f*g}else if(q-g<0&&k>=0){i.n.a+=p*q;i.n.b+=f}}}a.o.a=b.a;a.o.b=b.b;pQb(a,(yCc(),lBc),(Qpd(),d=RD(mfb(H3),9),new Fsb(d,RD(WEb(d,d.length),9),0)))} -function ISd(a,b,c,d,e,f){var g;if(!(b==null||!mSd(b,ZRd,$Rd))){throw Adb(new agb('invalid scheme: '+b))}if(!a&&!(c!=null&&qhb(c,Fhb(35))==-1&&c.length>0&&(BFb(0,c.length),c.charCodeAt(0)!=47))){throw Adb(new agb('invalid opaquePart: '+c))}if(a&&!(b!=null&&tpb(eSd,b.toLowerCase()))&&!(c==null||!mSd(c,aSd,bSd))){throw Adb(new agb(NJe+c))}if(a&&b!=null&&tpb(eSd,b.toLowerCase())&&!ESd(c)){throw Adb(new agb(NJe+c))}if(!FSd(d)){throw Adb(new agb('invalid device: '+d))}if(!HSd(e)){g=e==null?'invalid segments: null':'invalid segment: '+tSd(e);throw Adb(new agb(g))}if(!(f==null||qhb(f,Fhb(35))==-1)){throw Adb(new agb('invalid query: '+f))}} -function WHc(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r;c.Ug('Network simplex layering',1);a.b=b;r=RD(mQb(b,(yCc(),gCc)),17).a*4;q=a.b.a;if(q.c.length<1){c.Vg();return}f=SHc(a,q);p=null;for(e=Sub(f,0);e.b!=e.d.c;){d=RD(evb(e),15);h=r*eE($wnd.Math.sqrt(d.gc()));g=VHc(d);lJb(yJb(AJb(zJb(CJb(g),h),p),true),c.eh(1));m=a.b.b;for(o=new Anb(g.a);o.a1){p=$C(kE,Pwe,28,a.b.b.c.length,15,1);l=0;for(j=new Anb(a.b.b);j.a0){wA(a,c,0);c.a+=String.fromCharCode(d);e=BA(b,f);wA(a,c,e);f+=e-1;continue}if(d==39){if(f+10&&o.a<=0){i.c.length=0;ZEb(i.c,o);break}n=o.i-o.d;if(n>=h){if(n>h){i.c.length=0;h=n}ZEb(i.c,o)}}if(i.c.length!=0){g=RD(Vmb(i,Jwb(e,i.c.length)),118);t.a.Bc(g)!=null;g.g=k++;wSc(g,b,c,d);i.c.length=0}}q=a.c.length+1;for(m=new Anb(a);m.apxe||b.o==CQc&&k=h&&e<=i){if(h<=e&&f<=i){c[k++]=e;c[k++]=f;d+=2}else if(h<=e){c[k++]=e;c[k++]=i;a.b[d]=i+1;g+=2}else if(f<=i){c[k++]=h;c[k++]=f;d+=2}else{c[k++]=h;c[k++]=i;a.b[d]=i+1}}else if(ipwe)&&h<10);BYb(a.c,new bYb);QXb(a);xYb(a.c);AXb(a.f)} -function B9b(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p;c=RD(mQb(a,(yCc(),BBc)),101);g=a.f;f=a.d;h=g.a+f.b+f.c;i=0-f.d-a.c.b;k=g.b+f.d+f.a-a.c.b;j=new bnb;l=new bnb;for(e=new Anb(b);e.a=2){i=Sub(c,0);g=RD(evb(i),8);h=RD(evb(i),8);while(h.a0&&aHb(j,true,(Cmd(),zmd));h.k==(r3b(),m3b)&&bHb(j);Zjb(a.f,h,b)}}} -function OVc(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;e=RD(mQb(a,(q$c(),h$c)),27);j=lve;k=lve;h=qwe;i=qwe;for(t=Sub(a.b,0);t.b!=t.d.c;){r=RD(evb(t),40);n=r.e;o=r.f;j=$wnd.Math.min(j,n.a-o.a/2);k=$wnd.Math.min(k,n.b-o.b/2);h=$wnd.Math.max(h,n.a+o.a/2);i=$wnd.Math.max(i,n.b+o.b/2)}m=RD(Gxd(e,(h_c(),T$c)),107);for(s=Sub(a.b,0);s.b!=s.d.c;){r=RD(evb(s),40);l=mQb(r,h$c);if(ZD(l,207)){f=RD(l,27);Byd(f,r.e.a,r.e.b);zxd(f,r)}}for(q=Sub(a.a,0);q.b!=q.d.c;){p=RD(evb(q),65);d=RD(mQb(p,h$c),74);if(d){b=p.a;c=IGd(d,true,true);lsd(b,c)}}u=h-j+(m.b+m.c);g=i-k+(m.d+m.a);Heb(TD(Gxd(e,(umd(),mld))))||Esd(e,u,g,false,false);Ixd(e,Ikd,u-(m.b+m.c));Ixd(e,Hkd,g-(m.d+m.a))} -function Wec(a,b){var c,d,e,f,g,h,i,j,k,l;i=true;e=0;j=a.g[b.p];k=b.o.b+a.o;c=a.d[b.p][2];$mb(a.b,j,sgb(RD(Vmb(a.b,j),17).a-1+c));$mb(a.c,j,Kfb(UD(Vmb(a.c,j)))-k+c*a.f);++j;if(j>=a.j){++a.j;Rmb(a.b,sgb(1));Rmb(a.c,k)}else{d=a.d[b.p][1];$mb(a.b,j,sgb(RD(Vmb(a.b,j),17).a+1-d));$mb(a.c,j,Kfb(UD(Vmb(a.c,j)))+k-d*a.f)}(a.r==(aEc(),VDc)&&(RD(Vmb(a.b,j),17).a>a.k||RD(Vmb(a.b,j-1),17).a>a.k)||a.r==YDc&&(Kfb(UD(Vmb(a.c,j)))>a.n||Kfb(UD(Vmb(a.c,j-1)))>a.n))&&(i=false);for(g=new is(Mr(Z2b(b).a.Kc(),new ir));gs(g);){f=RD(hs(g),18);h=f.c.i;if(a.g[h.p]==j){l=Wec(a,h);e=e+RD(l.a,17).a;i=i&&Heb(TD(l.b))}}a.g[b.p]=j;e=e+a.d[b.p][0];return new Ptd(sgb(e),(Geb(),i?true:false))} -function cXb(a,b){var c,d,e,f,g;c=Kfb(UD(mQb(b,(yCc(),TBc))));c<2&&pQb(b,TBc,2);d=RD(mQb(b,rAc),88);d==(Cmd(),Amd)&&pQb(b,rAc,i2b(b));e=RD(mQb(b,NBc),17);e.a==0?pQb(b,(Ywc(),Lwc),new Owb):pQb(b,(Ywc(),Lwc),new Pwb(e.a));f=TD(mQb(b,gBc));f==null&&pQb(b,gBc,(Geb(),dE(mQb(b,yAc))===dE((Ymd(),Umd))?true:false));FDb(new SDb(null,new Swb(b.a,16)),new fXb(a));FDb(EDb(new SDb(null,new Swb(b.b,16)),new hXb),new jXb(a));g=new gFc(b);pQb(b,(Ywc(),Qwc),g);Sed(a.a);Ved(a.a,(sXb(),nXb),RD(mQb(b,pAc),188));Ved(a.a,oXb,RD(mQb(b,$Ac),188));Ved(a.a,pXb,RD(mQb(b,oAc),188));Ved(a.a,qXb,RD(mQb(b,kBc),188));Ved(a.a,rXb,KRc(RD(mQb(b,yAc),223)));Ped(a.a,bXb(b));pQb(b,Kwc,Qed(a.a,b))} -function STc(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q,r;l=new Tsb;g=new bnb;QTc(a,c,a.d.Ag(),g,l);QTc(a,d,a.d.Bg(),g,l);a.b=0.2*(p=RTc(EDb(new SDb(null,new Swb(g,16)),new XTc)),q=RTc(EDb(new SDb(null,new Swb(g,16)),new ZTc)),$wnd.Math.min(p,q));f=0;for(h=0;h=2&&(r=uSc(g,true,m),!a.e&&(a.e=new xTc(a)),tTc(a.e,r,g,a.b),undefined);UTc(g,m);WTc(g);n=-1;for(k=new Anb(g);k.ah} -function Iad(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s;j=oxe;k=oxe;h=pxe;i=pxe;for(m=new Anb(b.i);m.a-1){for(e=Sub(h,0);e.b!=e.d.c;){d=RD(evb(e),131);d.v=g}while(h.b!=0){d=RD(ku(h,0),131);for(c=new Anb(d.i);c.a-1){for(f=new Anb(h);f.a0){continue}RSc(i,$wnd.Math.min(i.o,e.o-1));QSc(i,i.i-1);i.i==0&&(ZEb(h.c,i),true)}}}} -function Lid(a,b,c,d,e){var f,g,h,i;i=oxe;g=false;h=Gid(a,ojd(new rjd(b.a,b.b),a),$id(new rjd(c.a,c.b),e),ojd(new rjd(d.a,d.b),c));f=!!h&&!($wnd.Math.abs(h.a-a.a)<=IGe&&$wnd.Math.abs(h.b-a.b)<=IGe||$wnd.Math.abs(h.a-b.a)<=IGe&&$wnd.Math.abs(h.b-b.b)<=IGe);h=Gid(a,ojd(new rjd(b.a,b.b),a),c,e);!!h&&(($wnd.Math.abs(h.a-a.a)<=IGe&&$wnd.Math.abs(h.b-a.b)<=IGe)==($wnd.Math.abs(h.a-b.a)<=IGe&&$wnd.Math.abs(h.b-b.b)<=IGe)||f?(i=$wnd.Math.min(i,ejd(ojd(h,c)))):(g=true));h=Gid(a,ojd(new rjd(b.a,b.b),a),d,e);!!h&&(g||($wnd.Math.abs(h.a-a.a)<=IGe&&$wnd.Math.abs(h.b-a.b)<=IGe)==($wnd.Math.abs(h.a-b.a)<=IGe&&$wnd.Math.abs(h.b-b.b)<=IGe)||f)&&(i=$wnd.Math.min(i,ejd(ojd(h,d))));return i} -function eWb(a){Cgd(a,new Pfd(Wfd($fd(Xfd(Zfd(Yfd(new agd,AAe),BAe),"Minimizes the stress within a layout using stress majorization. Stress exists if the euclidean distance between a pair of nodes doesn't match their graph theoretic distance, that is, the shortest path between the two nodes. The method allows to specify individual edge lengths."),new hWb),Zze)));Agd(a,AAe,dAe,iGd(XVb));Agd(a,AAe,fAe,(Geb(),true));Agd(a,AAe,jAe,iGd($Vb));Agd(a,AAe,CAe,iGd(_Vb));Agd(a,AAe,iAe,iGd(aWb));Agd(a,AAe,kAe,iGd(ZVb));Agd(a,AAe,gAe,iGd(bWb));Agd(a,AAe,lAe,iGd(cWb));Agd(a,AAe,vAe,iGd(WVb));Agd(a,AAe,xAe,iGd(UVb));Agd(a,AAe,yAe,iGd(VVb));Agd(a,AAe,zAe,iGd(YVb));Agd(a,AAe,wAe,iGd(TVb))} -function kJc(a){var b,c,d,e,f,g,h,i;b=null;for(d=new Anb(a);d.a0&&c.c==0){!b&&(b=new bnb);ZEb(b.c,c)}}if(b){while(b.c.length!=0){c=RD(Xmb(b,0),239);if(!!c.b&&c.b.c.length>0){for(f=(!c.b&&(c.b=new bnb),new Anb(c.b));f.aWmb(a,c,0)){return new Ptd(e,c)}}else if(Kfb(pJc(e.g,e.d[0]).a)>Kfb(pJc(c.g,c.d[0]).a)){return new Ptd(e,c)}}}for(h=(!c.e&&(c.e=new bnb),c.e).Kc();h.Ob();){g=RD(h.Pb(),239);i=(!g.b&&(g.b=new bnb),g.b);wFb(0,i.c.length);XEb(i.c,0,c);g.c==i.c.length&&(ZEb(b.c,g),true)}}}return null} -function _Jc(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r;b.Ug('Interactive crossing minimization',1);g=0;for(f=new Anb(a.b);f.a0){c+=i.n.a+i.o.a/2;++l}for(o=new Anb(i.j);o.a0&&(c/=l);r=$C(iE,vxe,28,d.a.c.length,15,1);h=0;for(j=new Anb(d.a);j.a=h&&e<=i){if(h<=e&&f<=i){d+=2}else if(h<=e){a.b[d]=i+1;g+=2}else if(f<=i){c[k++]=e;c[k++]=h-1;d+=2}else{c[k++]=e;c[k++]=h-1;a.b[d]=i+1;g+=2}}else if(i2){k=new bnb;Tmb(k,new Rkb(r,1,r.b));f=jTb(k,t+a.a);s=new ORb(f);kQb(s,b);ZEb(c.c,s)}else{d?(s=RD(Wjb(a.b,JGd(b)),272)):(s=RD(Wjb(a.b,LGd(b)),272))}i=JGd(b);d&&(i=LGd(b));g=qTb(q,i);j=t+a.a;if(g.a){j+=$wnd.Math.abs(q.b-l.b);p=new rjd(l.a,(l.b+q.b)/2)}else{j+=$wnd.Math.abs(q.a-l.a);p=new rjd((l.a+q.a)/2,l.b)}d?Zjb(a.d,b,new QRb(s,g,p,j)):Zjb(a.c,b,new QRb(s,g,p,j));Zjb(a.b,b,s);o=(!b.n&&(b.n=new C5d(I4,b,1,7)),b.n);for(n=new dMd(o);n.e!=n.i.gc();){m=RD(bMd(n),135);e=nTb(a,m,true,0,0);ZEb(c.c,e)}} -function sMb(a){var b,c,d,e,f,g,h;if(a.A.dc()){return}if(a.A.Hc((Qpd(),Opd))){RD(Vrb(a.b,(qpd(),Yod)),127).k=true;RD(Vrb(a.b,npd),127).k=true;b=a.q!=(Bod(),xod)&&a.q!=wod;QJb(RD(Vrb(a.b,Xod),127),b);QJb(RD(Vrb(a.b,ppd),127),b);QJb(a.g,b);if(a.A.Hc(Ppd)){RD(Vrb(a.b,Yod),127).j=true;RD(Vrb(a.b,npd),127).j=true;RD(Vrb(a.b,Xod),127).k=true;RD(Vrb(a.b,ppd),127).k=true;a.g.k=true}}if(a.A.Hc(Npd)){a.a.j=true;a.a.k=true;a.g.j=true;a.g.k=true;h=a.B.Hc((dqd(),_pd));for(e=nMb(),f=0,g=e.length;f0),RD(k.a.Xb(k.c=--k.b),18));while(f!=d&&k.b>0){a.a[f.p]=true;a.a[d.p]=true;f=(sFb(k.b>0),RD(k.a.Xb(k.c=--k.b),18))}k.b>0&&Ckb(k)}}}}} -function Zyb(a,b,c){var d,e,f,g,h,i,j,k,l,m,n;if(!a.b){return false}g=null;m=null;i=new Fzb(null,null);e=1;i.a[1]=a.b;l=i;while(l.a[e]){j=e;h=m;m=l;l=l.a[e];d=a.a.Ne(b,l.d);e=d<0?0:1;d==0&&(!c.c||Fvb(l.e,c.d))&&(g=l);if(!(!!l&&l.b)&&!Vyb(l.a[e])){if(Vyb(l.a[1-e])){m=m.a[j]=azb(l,e)}else if(!Vyb(l.a[1-e])){n=m.a[1-j];if(n){if(!Vyb(n.a[1-j])&&!Vyb(n.a[j])){m.b=false;n.b=true;l.b=true}else{f=h.a[1]==m?1:0;Vyb(n.a[j])?(h.a[f]=_yb(m,j)):Vyb(n.a[1-j])&&(h.a[f]=azb(m,j));l.b=h.a[f].b=true;h.a[f].a[0].b=false;h.a[f].a[1].b=false}}}}}if(g){c.b=true;c.d=g.e;if(l!=g){k=new Fzb(l.d,l.e);$yb(a,i,g,k);m==g&&(m=k)}m.a[m.a[1]==l?1:0]=l.a[!l.a[0]?1:0];--a.c}a.b=i.a[1];!!a.b&&(a.b.b=false);return c.b} -function Ilc(a){var b,c,d,e,f,g,h,i,j,k,l,m;for(e=new Anb(a.a.a.b);e.a0?(e-=86400000):(e+=86400000);i=new wB(Bdb(Hdb(b.q.getTime()),e))}k=new cib;j=a.a.length;for(f=0;f=97&&d<=122||d>=65&&d<=90){for(g=f+1;g=j){throw Adb(new agb("Missing trailing '"))}g+1=14&&k<=16))){if(b.a._b(d)){!c.a?(c.a=new dib(c.d)):Zhb(c.a,c.b);Whb(c.a,'[...]')}else{h=SD(d);j=new btb(b);Gyb(c,Inb(h,j))}}else ZD(d,183)?Gyb(c,hob(RD(d,183))):ZD(d,195)?Gyb(c,aob(RD(d,195))):ZD(d,201)?Gyb(c,bob(RD(d,201))):ZD(d,2111)?Gyb(c,gob(RD(d,2111))):ZD(d,53)?Gyb(c,eob(RD(d,53))):ZD(d,376)?Gyb(c,fob(RD(d,376))):ZD(d,846)?Gyb(c,dob(RD(d,846))):ZD(d,109)&&Gyb(c,cob(RD(d,109)))}else{Gyb(c,d==null?vve:jeb(d))}}return !c.a?c.c:c.e.length==0?c.a.a:c.a.a+(''+c.e)} -function KXd(a,b){var c,d,e,f;f=a.F;if(b==null){a.F=null;yXd(a,null)}else{a.F=(uFb(b),b);d=qhb(b,Fhb(60));if(d!=-1){e=(AFb(0,d,b.length),b.substr(0,d));qhb(b,Fhb(46))==-1&&!lhb(e,hve)&&!lhb(e,dKe)&&!lhb(e,eKe)&&!lhb(e,fKe)&&!lhb(e,gKe)&&!lhb(e,hKe)&&!lhb(e,iKe)&&!lhb(e,jKe)&&(e=kKe);c=thb(b,Fhb(62));c!=-1&&(e+=''+(BFb(c+1,b.length+1),b.substr(c+1)));yXd(a,e)}else{e=b;if(qhb(b,Fhb(46))==-1){d=qhb(b,Fhb(91));d!=-1&&(e=(AFb(0,d,b.length),b.substr(0,d)));if(!lhb(e,hve)&&!lhb(e,dKe)&&!lhb(e,eKe)&&!lhb(e,fKe)&&!lhb(e,gKe)&&!lhb(e,hKe)&&!lhb(e,iKe)&&!lhb(e,jKe)){e=kKe;d!=-1&&(e+=''+(BFb(d,b.length+1),b.substr(d)))}else{e=b}}yXd(a,e);e==b&&(a.F=a.D)}}(a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new N3d(a,1,5,f,b))} -function Pvd(b,c){var d,e,f,g,h,i,j,k,l,m;j=c.length-1;i=(BFb(j,c.length),c.charCodeAt(j));if(i==93){h=qhb(c,Fhb(91));if(h>=0){f=Uvd(b,(AFb(1,h,c.length),c.substr(1,h-1)));l=(AFb(h+1,j,c.length),c.substr(h+1,j-(h+1)));return Nvd(b,l,f)}}else{d=-1;_eb==null&&(_eb=new RegExp('\\d'));if(_eb.test(String.fromCharCode(i))){d=uhb(c,Fhb(46),j-1);if(d>=0){e=RD(Fvd(b,Zvd(b,(AFb(1,d,c.length),c.substr(1,d-1))),false),61);k=0;try{k=Oeb((BFb(d+1,c.length+1),c.substr(d+1)),qwe,lve)}catch(a){a=zdb(a);if(ZD(a,130)){g=a;throw Adb(new RSd(g))}else throw Adb(a)}if(k>16==-10){c=RD(a.Cb,292).Yk(b,c)}else if(a.Db>>16==-15){!b&&(b=(JTd(),wTd));!j&&(j=(JTd(),wTd));if(a.Cb.Yh()){i=new P3d(a.Cb,1,13,j,b,fZd(o4d(RD(a.Cb,62)),a),false);!c?(c=i):c.nj(i)}}}else if(ZD(a.Cb,90)){if(a.Db>>16==-23){ZD(b,90)||(b=(JTd(),zTd));ZD(j,90)||(j=(JTd(),zTd));if(a.Cb.Yh()){i=new P3d(a.Cb,1,10,j,b,fZd(tYd(RD(a.Cb,29)),a),false);!c?(c=i):c.nj(i)}}}else if(ZD(a.Cb,457)){h=RD(a.Cb,850);g=(!h.b&&(h.b=new pae(new lae)),h.b);for(f=(d=new vkb((new mkb(g.a)).a),new xae(d));f.a.b;){e=RD(tkb(f.a).ld(),89);c=o2d(e,k2d(e,h),c)}}}return c} -function Y4b(a,b){var c,d,e,f,g,h,i,j,k,l,m;g=Heb(TD(Gxd(a,(yCc(),NAc))));m=RD(Gxd(a,EBc),21);i=false;j=false;l=new dMd((!a.c&&(a.c=new C5d(K4,a,9,9)),a.c));while(l.e!=l.i.gc()&&(!i||!j)){f=RD(bMd(l),123);h=0;for(e=Fl(Al(cD(WC(cJ,1),rve,20,0,[(!f.d&&(f.d=new Yie(G4,f,8,5)),f.d),(!f.e&&(f.e=new Yie(G4,f,7,4)),f.e)])));gs(e);){d=RD(hs(e),74);k=g&&ozd(d)&&Heb(TD(Gxd(d,OAc)));c=cZd((!d.b&&(d.b=new Yie(E4,d,4,7)),d.b),f)?a==vCd(AGd(RD(QHd((!d.c&&(d.c=new Yie(E4,d,5,8)),d.c),0),84))):a==vCd(AGd(RD(QHd((!d.b&&(d.b=new Yie(E4,d,4,7)),d.b),0),84)));if(k||c){++h;if(h>1){break}}}h>0?(i=true):m.Hc((Pod(),Lod))&&(!f.n&&(f.n=new C5d(I4,f,1,7)),f.n).i>0&&(i=true);h>1&&(j=true)}i&&b.Fc((ovc(),hvc));j&&b.Fc((ovc(),ivc))} -function Dsd(a){var b,c,d,e,f,g,h,i,j,k,l,m;m=RD(Gxd(a,(umd(),kld)),21);if(m.dc()){return null}h=0;g=0;if(m.Hc((Qpd(),Opd))){k=RD(Gxd(a,Hld),101);d=2;c=2;e=2;f=2;b=!vCd(a)?RD(Gxd(a,Nkd),88):RD(Gxd(vCd(a),Nkd),88);for(j=new dMd((!a.c&&(a.c=new C5d(K4,a,9,9)),a.c));j.e!=j.i.gc();){i=RD(bMd(j),123);l=RD(Gxd(i,Old),64);if(l==(qpd(),opd)){l=osd(i,b);Ixd(i,Old,l)}if(k==(Bod(),wod)){switch(l.g){case 1:d=$wnd.Math.max(d,i.i+i.g);break;case 2:c=$wnd.Math.max(c,i.j+i.f);break;case 3:e=$wnd.Math.max(e,i.i+i.g);break;case 4:f=$wnd.Math.max(f,i.j+i.f);}}else{switch(l.g){case 1:d+=i.g+2;break;case 2:c+=i.f+2;break;case 3:e+=i.g+2;break;case 4:f+=i.f+2;}}}h=$wnd.Math.max(d,e);g=$wnd.Math.max(c,f)}return Esd(a,h,g,true,true)} -function Rqc(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;s=RD(zDb(PDb(CDb(new SDb(null,new Swb(b.d,16)),new Vqc(c)),new Xqc(c)),tBb(new ZBb,new XBb,new wCb,cD(WC(QL,1),jwe,108,0,[(xBb(),vBb)]))),15);l=lve;k=qwe;for(i=new Anb(b.b.j);i.a0;if(j){if(j){m=r.p;g?++m:--m;l=RD(Vmb(r.c.a,m),10);d=Z7b(l);n=!(Did(d,w,c[0])||yid(d,w,c[0]))}}else{n=true}}o=false;v=b.D.i;if(!!v&&!!v.c&&h.e){k=g&&v.p>0||!g&&v.p=0){i=null;h=new Jkb(k.a,j+1);while(h.bg?1:cz(isNaN(0),isNaN(g)))<0&&(null,bz(vEe),($wnd.Math.abs(g-1)<=vEe||g==1||isNaN(g)&&isNaN(1)?0:g<1?-1:g>1?1:cz(isNaN(g),isNaN(1)))<0)&&(null,bz(vEe),($wnd.Math.abs(0-h)<=vEe||0==h||isNaN(0)&&isNaN(h)?0:0h?1:cz(isNaN(0),isNaN(h)))<0)&&(null,bz(vEe),($wnd.Math.abs(h-1)<=vEe||h==1||isNaN(h)&&isNaN(1)?0:h<1?-1:h>1?1:cz(isNaN(h),isNaN(1)))<0));return f} -function EXd(b){var c,d,e,f;d=b.D!=null?b.D:b.B;c=qhb(d,Fhb(91));if(c!=-1){e=(AFb(0,c,d.length),d.substr(0,c));f=new Qhb;do f.a+='[';while((c=phb(d,91,++c))!=-1);if(lhb(e,hve))f.a+='Z';else if(lhb(e,dKe))f.a+='B';else if(lhb(e,eKe))f.a+='C';else if(lhb(e,fKe))f.a+='D';else if(lhb(e,gKe))f.a+='F';else if(lhb(e,hKe))f.a+='I';else if(lhb(e,iKe))f.a+='J';else if(lhb(e,jKe))f.a+='S';else{f.a+='L';f.a+=''+e;f.a+=';'}try{return null}catch(a){a=zdb(a);if(!ZD(a,63))throw Adb(a)}}else if(qhb(d,Fhb(46))==-1){if(lhb(d,hve))return xdb;else if(lhb(d,dKe))return gE;else if(lhb(d,eKe))return hE;else if(lhb(d,fKe))return iE;else if(lhb(d,gKe))return jE;else if(lhb(d,hKe))return kE;else if(lhb(d,iKe))return lE;else if(lhb(d,jKe))return wdb}return null} -function pTb(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A;a.e=b;h=RSb(b);w=new bnb;for(d=new Anb(h);d.a=0&&p=j.c.c.length?(k=hOc((r3b(),p3b),o3b)):(k=hOc((r3b(),o3b),o3b));k*=2;f=c.a.g;c.a.g=$wnd.Math.max(f,f+(k-f));g=c.b.g;c.b.g=$wnd.Math.max(g,g+(k-g));e=b}}} -function qkc(a){var b,c,d,e;FDb(CDb(new SDb(null,new Swb(a.a.b,16)),new Qkc),new Skc);okc(a);FDb(CDb(new SDb(null,new Swb(a.a.b,16)),new Ukc),new Wkc);if(a.c==(Ymd(),Wmd)){FDb(CDb(EDb(new SDb(null,new Swb(new Xkb(a.f),1)),new clc),new elc),new glc(a));FDb(CDb(GDb(EDb(EDb(new SDb(null,new Swb(a.d.b,16)),new klc),new mlc),new olc),new qlc),new slc(a))}e=new rjd(oxe,oxe);b=new rjd(pxe,pxe);for(d=new Anb(a.a.b);d.a0&&(b.a+=pve,b);Csd(RD(bMd(h),167),b)}b.a+=SAe;i=new mMd((!d.c&&(d.c=new Yie(E4,d,5,8)),d.c));while(i.e!=i.i.gc()){i.e>0&&(b.a+=pve,b);Csd(RD(bMd(i),167),b)}b.a+=')'}}} -function LTb(a,b,c){var d,e,f,g,h,i,j,k;for(i=new dMd((!a.a&&(a.a=new C5d(J4,a,10,11)),a.a));i.e!=i.i.gc();){h=RD(bMd(i),27);for(e=new is(Mr(zGd(h).a.Kc(),new ir));gs(e);){d=RD(hs(e),74);!d.b&&(d.b=new Yie(E4,d,4,7));if(!(d.b.i<=1&&(!d.c&&(d.c=new Yie(E4,d,5,8)),d.c.i<=1))){throw Adb(new Ked('Graph must not contain hyperedges.'))}if(!nzd(d)&&h!=AGd(RD(QHd((!d.c&&(d.c=new Yie(E4,d,5,8)),d.c),0),84))){j=new cUb;kQb(j,d);pQb(j,(JVb(),HVb),d);_Tb(j,RD(Wd(qtb(c.f,h)),153));aUb(j,RD(Wjb(c,AGd(RD(QHd((!d.c&&(d.c=new Yie(E4,d,5,8)),d.c),0),84))),153));Rmb(b.c,j);for(g=new dMd((!d.n&&(d.n=new C5d(I4,d,1,7)),d.n));g.e!=g.i.gc();){f=RD(bMd(g),135);k=new iUb(j,f.a);kQb(k,f);pQb(k,HVb,f);k.e.a=$wnd.Math.max(f.g,1);k.e.b=$wnd.Math.max(f.f,1);hUb(k);Rmb(b.d,k)}}}}} -function Vec(a,b,c){var d,e,f,g,h,i,j,k,l,m;c.Ug('Node promotion heuristic',1);a.i=b;a.r=RD(mQb(b,(yCc(),ZAc)),243);a.r!=(aEc(),TDc)&&a.r!=UDc?Tec(a):Uec(a);k=RD(mQb(a.i,YAc),17).a;f=new nfc;switch(a.r.g){case 2:case 1:Yec(a,f);break;case 3:a.r=_Dc;Yec(a,f);i=0;for(h=new Anb(a.b);h.aa.k){a.r=VDc;Yec(a,f)}break;case 4:a.r=_Dc;Yec(a,f);j=0;for(e=new Anb(a.c);e.aa.n){a.r=YDc;Yec(a,f)}break;case 6:m=eE($wnd.Math.ceil(a.g.length*k/100));Yec(a,new qfc(m));break;case 5:l=eE($wnd.Math.ceil(a.e*k/100));Yec(a,new tfc(l));break;case 8:Sec(a,true);break;case 9:Sec(a,false);break;default:Yec(a,f);}a.r!=TDc&&a.r!=UDc?Zec(a,b):$ec(a,b);c.Vg()} -function $rc(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t;l=a.b;k=new Jkb(l,0);Ikb(k,new R4b(a));s=false;g=1;while(k.b0){m.d+=k.n.d;m.d+=k.d}if(m.a>0){m.a+=k.n.a;m.a+=k.d}if(m.b>0){m.b+=k.n.b;m.b+=k.d}if(m.c>0){m.c+=k.n.c;m.c+=k.d}return m} -function u9b(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o;m=c.d;l=c.c;f=new rjd(c.f.a+c.d.b+c.d.c,c.f.b+c.d.d+c.d.a);g=f.b;for(j=new Anb(a.a);j.a0){a.c[b.c.p][b.p].d+=Kwb(a.i,24)*Nxe*0.07000000029802322-0.03500000014901161;a.c[b.c.p][b.p].a=a.c[b.c.p][b.p].d/a.c[b.c.p][b.p].b}} -function D8b(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q;for(o=new Anb(a);o.ad.d;d.d=$wnd.Math.max(d.d,b);if(h&&c){d.d=$wnd.Math.max(d.d,d.a);d.a=d.d+e}break;case 3:c=b>d.a;d.a=$wnd.Math.max(d.a,b);if(h&&c){d.a=$wnd.Math.max(d.a,d.d);d.d=d.a+e}break;case 2:c=b>d.c;d.c=$wnd.Math.max(d.c,b);if(h&&c){d.c=$wnd.Math.max(d.b,d.c);d.b=d.c+e}break;case 4:c=b>d.b;d.b=$wnd.Math.max(d.b,b);if(h&&c){d.b=$wnd.Math.max(d.b,d.c);d.c=d.b+e}}}}} -function pA(a,b){var c,d,e,f,g,h,i,j,k;j='';if(b.length==0){return a.ne(ywe,wwe,-1,-1)}k=Dhb(b);lhb(k.substr(0,3),'at ')&&(k=(BFb(3,k.length+1),k.substr(3)));k=k.replace(/\[.*?\]/g,'');g=k.indexOf('(');if(g==-1){g=k.indexOf('@');if(g==-1){j=k;k=''}else{j=Dhb((BFb(g+1,k.length+1),k.substr(g+1)));k=Dhb((AFb(0,g,k.length),k.substr(0,g)))}}else{c=k.indexOf(')',g);j=(AFb(g+1,c,k.length),k.substr(g+1,c-(g+1)));k=Dhb((AFb(0,g,k.length),k.substr(0,g)))}g=qhb(k,Fhb(46));g!=-1&&(k=(BFb(g+1,k.length+1),k.substr(g+1)));(k.length==0||lhb(k,'Anonymous function'))&&(k=wwe);h=thb(j,Fhb(58));e=uhb(j,Fhb(58),h-1);i=-1;d=-1;f=ywe;if(h!=-1&&e!=-1){f=(AFb(0,e,j.length),j.substr(0,e));i=jA((AFb(e+1,h,j.length),j.substr(e+1,h-(e+1))));d=jA((BFb(h+1,j.length+1),j.substr(h+1)))}return a.ne(f,k,i,d)} -function C6b(a){var b,c,d,e,f,g,h,i,j,k,l;for(j=new Anb(a);j.a0||k.j==ppd&&k.e.c.length-k.g.c.length<0)){b=false;break}for(e=new Anb(k.g);e.a=j&&v>=q){m+=o.n.b+p.n.b+p.a.b-u;++h}}}}if(c){for(g=new Anb(s.e);g.a=j&&v>=q){m+=o.n.b+p.n.b+p.a.b-u;++h}}}}}if(h>0){w+=m/h;++n}}if(n>0){b.a=e*w/n;b.g=n}else{b.a=0;b.g=0}} -function hTb(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A;f=a.f.b;m=f.a;k=f.b;o=a.e.g;n=a.e.f;zyd(a.e,f.a,f.b);w=m/o;A=k/n;for(j=new dMd(iyd(a.e));j.e!=j.i.gc();){i=RD(bMd(j),135);Dyd(i,i.i*w);Eyd(i,i.j*A)}for(s=new dMd(wCd(a.e));s.e!=s.i.gc();){r=RD(bMd(s),123);u=r.i;v=r.j;u>0&&Dyd(r,u*w);v>0&&Eyd(r,v*A)}Bvb(a.b,new tTb);b=new bnb;for(h=new vkb((new mkb(a.c)).a);h.b;){g=tkb(h);d=RD(g.ld(),74);c=RD(g.md(),407).a;e=IGd(d,false,false);l=fTb(JGd(d),ssd(e),c);lsd(l,e);t=KGd(d);if(!!t&&Wmb(b,t,0)==-1){ZEb(b.c,t);gTb(t,(sFb(l.b!=0),RD(l.a.a.c,8)),c)}}for(q=new vkb((new mkb(a.d)).a);q.b;){p=tkb(q);d=RD(p.ld(),74);c=RD(p.md(),407).a;e=IGd(d,false,false);l=fTb(LGd(d),Ijd(ssd(e)),c);l=Ijd(l);lsd(l,e);t=MGd(d);if(!!t&&Wmb(b,t,0)==-1){ZEb(b.c,t);gTb(t,(sFb(l.b!=0),RD(l.c.b.c,8)),c)}}} -function GJb(a,b,c,d){var e,f,g,h,i;h=new CLb(b);iNb(h,d);e=true;if(!!a&&a.pf((umd(),Nkd))){f=RD(a.of((umd(),Nkd)),88);e=f==(Cmd(),Amd)||f==ymd||f==zmd}$Mb(h,false);Umb(h.e.Rf(),new dNb(h,false,e));EMb(h,h.f,(ZJb(),WJb),(qpd(),Yod));EMb(h,h.f,YJb,npd);EMb(h,h.g,WJb,ppd);EMb(h,h.g,YJb,Xod);GMb(h,Yod);GMb(h,npd);FMb(h,Xod);FMb(h,ppd);RMb();g=h.A.Hc((Qpd(),Mpd))&&h.B.Hc((dqd(),$pd))?SMb(h):null;!!g&&uKb(h.a,g);XMb(h);xMb(h);GNb(h);sMb(h);gNb(h);yNb(h);oNb(h,Yod);oNb(h,npd);tMb(h);fNb(h);if(!c){return h.o}VMb(h);CNb(h);oNb(h,Xod);oNb(h,ppd);i=h.B.Hc((dqd(),_pd));IMb(h,i,Yod);IMb(h,i,npd);JMb(h,i,Xod);JMb(h,i,ppd);FDb(new SDb(null,new Swb(new glb(h.i),0)),new KMb);FDb(CDb(new SDb(null,ki(h.r).a.oc()),new MMb),new OMb);WMb(h);h.e.Pf(h.o);FDb(new SDb(null,ki(h.r).a.oc()),new YMb);return h.o} -function LYb(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p;j=oxe;for(d=new Anb(a.a.b);d.a1){n=new xVc(o,t,d);xgb(t,new nVc(a,n));ZEb(g.c,n);for(l=t.a.ec().Kc();l.Ob();){k=RD(l.Pb(),42);Ymb(f,k.b)}}if(h.a.gc()>1){n=new xVc(o,h,d);xgb(h,new pVc(a,n));ZEb(g.c,n);for(l=h.a.ec().Kc();l.Ob();){k=RD(l.Pb(),42);Ymb(f,k.b)}}}} -function p6b(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r;p=a.n;q=a.o;m=a.d;l=Kfb(UD(hFc(a,(yCc(),QBc))));if(b){k=l*(b.gc()-1);n=0;for(i=b.Kc();i.Ob();){g=RD(i.Pb(),10);k+=g.o.a;n=$wnd.Math.max(n,g.o.b)}r=p.a-(k-q.a)/2;f=p.b-m.d+n;d=q.a/(b.gc()+1);e=d;for(h=b.Kc();h.Ob();){g=RD(h.Pb(),10);g.n.a=r;g.n.b=f-g.o.b;r+=g.o.a+l;j=n6b(g);j.n.a=g.o.a/2-j.a.a;j.n.b=g.o.b;o=RD(mQb(g,(Ywc(),Xvc)),12);if(o.e.c.length+o.g.c.length==1){o.n.a=e-o.a.a;o.n.b=0;P3b(o,a)}e+=d}}if(c){k=l*(c.gc()-1);n=0;for(i=c.Kc();i.Ob();){g=RD(i.Pb(),10);k+=g.o.a;n=$wnd.Math.max(n,g.o.b)}r=p.a-(k-q.a)/2;f=p.b+q.b+m.a-n;d=q.a/(c.gc()+1);e=d;for(h=c.Kc();h.Ob();){g=RD(h.Pb(),10);g.n.a=r;g.n.b=f;r+=g.o.a+l;j=n6b(g);j.n.a=g.o.a/2-j.a.a;j.n.b=0;o=RD(mQb(g,(Ywc(),Xvc)),12);if(o.e.c.length+o.g.c.length==1){o.n.a=e-o.a.a;o.n.b=q.b;P3b(o,a)}e+=d}}} -function Hac(a,b){var c,d,e,f,g,h;if(!RD(mQb(b,(Ywc(),kwc)),21).Hc((ovc(),hvc))){return}for(h=new Anb(b.a);h.a=0&&g0&&(RD(Vrb(a.b,b),127).a.b=c)} -function wcc(a,b,c,d){var e,f,g,h,i,j,k,l,m,n,o,p;m=Kfb(UD(mQb(a,(yCc(),_Bc))));n=Kfb(UD(mQb(a,aCc)));l=Kfb(UD(mQb(a,ZBc)));h=a.o;f=RD(Vmb(a.j,0),12);g=f.n;p=ucc(f,l);if(!p){return}if(b.Hc((Pod(),Lod))){switch(RD(mQb(a,(Ywc(),hwc)),64).g){case 1:p.c=(h.a-p.b)/2-g.a;p.d=n;break;case 3:p.c=(h.a-p.b)/2-g.a;p.d=-n-p.a;break;case 2:if(c&&f.e.c.length==0&&f.g.c.length==0){k=d?p.a:RD(Vmb(f.f,0),72).o.b;p.d=(h.b-k)/2-g.b}else{p.d=h.b+n-g.b}p.c=-m-p.b;break;case 4:if(c&&f.e.c.length==0&&f.g.c.length==0){k=d?p.a:RD(Vmb(f.f,0),72).o.b;p.d=(h.b-k)/2-g.b}else{p.d=h.b+n-g.b}p.c=m;}}else if(b.Hc(Nod)){switch(RD(mQb(a,(Ywc(),hwc)),64).g){case 1:case 3:p.c=g.a+m;break;case 2:case 4:if(c&&!f.c){k=d?p.a:RD(Vmb(f.f,0),72).o.b;p.d=(h.b-k)/2-g.b}else{p.d=g.b+n}}}e=p.d;for(j=new Anb(f.f);j.a=b.length)return {done:true};var a=b[d++];return {value:[a,c.get(a)],done:false}}}};if(!Ftb()){e.prototype.createObject=function(){return {}};e.prototype.get=function(a){return this.obj[':'+a]};e.prototype.set=function(a,b){this.obj[':'+a]=b};e.prototype[Jxe]=function(a){delete this.obj[':'+a]};e.prototype.keys=function(){var a=[];for(var b in this.obj){b.charCodeAt(0)==58&&a.push(b.substring(1))}return a}}return e} -function q$c(){q$c=geb;h$c=new jGd(rAe);new jGd(sAe);new kGd('DEPTH',sgb(0));XZc=new kGd('FAN',sgb(0));VZc=new kGd(QEe,sgb(0));n$c=new kGd('ROOT',(Geb(),false));b$c=new kGd('LEFTNEIGHBOR',null);l$c=new kGd('RIGHTNEIGHBOR',null);c$c=new kGd('LEFTSIBLING',null);m$c=new kGd('RIGHTSIBLING',null);WZc=new kGd('DUMMY',false);new kGd('LEVEL',sgb(0));k$c=new kGd('REMOVABLE_EDGES',new Yub);o$c=new kGd('XCOOR',sgb(0));p$c=new kGd('YCOOR',sgb(0));d$c=new kGd('LEVELHEIGHT',0);f$c=new kGd('LEVELMIN',0);e$c=new kGd('LEVELMAX',0);ZZc=new kGd('GRAPH_XMIN',0);_Zc=new kGd('GRAPH_YMIN',0);YZc=new kGd('GRAPH_XMAX',0);$Zc=new kGd('GRAPH_YMAX',0);UZc=new kGd('COMPACT_LEVEL_ASCENSION',false);TZc=new kGd('COMPACT_CONSTRAINTS',new bnb);a$c=new kGd('ID','');i$c=new kGd('POSITION',sgb(0));j$c=new kGd('PRELIM',0);g$c=new kGd('MODIFIER',0);SZc=new jGd(tAe);RZc=new jGd(uAe)} -function Bqe(a){zqe();var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q;if(a==null)return null;l=a.length*8;if(l==0){return ''}h=l%24;n=l/24|0;m=h!=0?n+1:n;f=null;f=$C(hE,zwe,28,m*4,15,1);j=0;k=0;b=0;c=0;d=0;g=0;e=0;for(i=0;i>24;j=(b&3)<<24>>24;o=(b&-128)==0?b>>2<<24>>24:(b>>2^192)<<24>>24;p=(c&-128)==0?c>>4<<24>>24:(c>>4^240)<<24>>24;q=(d&-128)==0?d>>6<<24>>24:(d>>6^252)<<24>>24;f[g++]=yqe[o];f[g++]=yqe[p|j<<4];f[g++]=yqe[k<<2|q];f[g++]=yqe[d&63]}if(h==8){b=a[e];j=(b&3)<<24>>24;o=(b&-128)==0?b>>2<<24>>24:(b>>2^192)<<24>>24;f[g++]=yqe[o];f[g++]=yqe[j<<4];f[g++]=61;f[g++]=61}else if(h==16){b=a[e];c=a[e+1];k=(c&15)<<24>>24;j=(b&3)<<24>>24;o=(b&-128)==0?b>>2<<24>>24:(b>>2^192)<<24>>24;p=(c&-128)==0?c>>4<<24>>24:(c>>4^240)<<24>>24;f[g++]=yqe[o];f[g++]=yqe[p|j<<4];f[g++]=yqe[k<<2];f[g++]=61}return Ihb(f,0,f.length)} -function CB(a,b){var c,d,e,f,g,h,i;a.e==0&&a.p>0&&(a.p=-(a.p-1));a.p>qwe&&tB(b,a.p-Owe);g=b.q.getDate();nB(b,1);a.k>=0&&qB(b,a.k);if(a.c>=0){nB(b,a.c)}else if(a.k>=0){i=new vB(b.q.getFullYear()-Owe,b.q.getMonth(),35);d=35-i.q.getDate();nB(b,$wnd.Math.min(d,g))}else{nB(b,g)}a.f<0&&(a.f=b.q.getHours());a.b>0&&a.f<12&&(a.f+=12);oB(b,a.f==24&&a.g?0:a.f);a.j>=0&&pB(b,a.j);a.n>=0&&rB(b,a.n);a.i>=0&&sB(b,Bdb(Ndb(Fdb(Hdb(b.q.getTime()),Awe),Awe),a.i));if(a.a){e=new uB;tB(e,e.q.getFullYear()-Owe-80);Ldb(Hdb(b.q.getTime()),Hdb(e.q.getTime()))&&tB(b,e.q.getFullYear()-Owe+100)}if(a.d>=0){if(a.c==-1){c=(7+a.d-b.q.getDay())%7;c>3&&(c-=7);h=b.q.getMonth();nB(b,b.q.getDate()+c);b.q.getMonth()!=h&&nB(b,b.q.getDate()+(c>0?-7:7))}else{if(b.q.getDay()!=a.d){return false}}}if(a.o>qwe){f=b.q.getTimezoneOffset();sB(b,Bdb(Hdb(b.q.getTime()),(a.o-f)*60*Awe))}return true} -function J5b(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;e=mQb(b,(Ywc(),Awc));if(!ZD(e,207)){return}o=RD(e,27);p=b.e;m=new sjd(b.c);f=b.d;m.a+=f.b;m.b+=f.d;u=RD(Gxd(o,(yCc(),oBc)),181);if(Csb(u,(dqd(),Xpd))){n=RD(Gxd(o,qBc),107);E2b(n,f.a);H2b(n,f.d);F2b(n,f.b);G2b(n,f.c)}c=new bnb;for(k=new Anb(b.a);k.ad.c.length-1){Rmb(d,new Ptd(Hze,KEe))}c=RD(mQb(e,f_c),17).a;if(Dmd(RD(mQb(a,H$c),88))){e.e.aKfb(UD((tFb(c,d.c.length),RD(d.c[c],42)).b))&&Otd((tFb(c,d.c.length),RD(d.c[c],42)),e.e.a+e.f.a)}else{e.e.bKfb(UD((tFb(c,d.c.length),RD(d.c[c],42)).b))&&Otd((tFb(c,d.c.length),RD(d.c[c],42)),e.e.b+e.f.b)}}for(f=Sub(a.b,0);f.b!=f.d.c;){e=RD(evb(f),40);c=RD(mQb(e,(h_c(),f_c)),17).a;pQb(e,(q$c(),f$c),UD((tFb(c,d.c.length),RD(d.c[c],42)).a));pQb(e,e$c,UD((tFb(c,d.c.length),RD(d.c[c],42)).b))}b.Vg()} -function Tec(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p;a.o=Kfb(UD(mQb(a.i,(yCc(),bCc))));a.f=Kfb(UD(mQb(a.i,XBc)));a.j=a.i.b.c.length;h=a.j-1;m=0;a.k=0;a.n=0;a.b=dv($C(bJ,Nve,17,a.j,0,1));a.c=dv($C(VI,Nve,345,a.j,7,1));for(g=new Anb(a.i.b);g.a0&&Rmb(a.q,k);Rmb(a.p,k)}b-=d;n=i+b;j+=b*a.f;$mb(a.b,h,sgb(n));$mb(a.c,h,j);a.k=$wnd.Math.max(a.k,n);a.n=$wnd.Math.max(a.n,j);a.e+=b;b+=p}} -function qpd(){qpd=geb;var a;opd=new upd(Sye,0);Yod=new upd(_ye,1);Xod=new upd(aze,2);npd=new upd(bze,3);ppd=new upd(cze,4);bpd=(yob(),new Lqb((a=RD(mfb(E3),9),new Fsb(a,RD(WEb(a,a.length),9),0))));cpd=eq(ysb(Yod,cD(WC(E3,1),NAe,64,0,[])));Zod=eq(ysb(Xod,cD(WC(E3,1),NAe,64,0,[])));kpd=eq(ysb(npd,cD(WC(E3,1),NAe,64,0,[])));mpd=eq(ysb(ppd,cD(WC(E3,1),NAe,64,0,[])));hpd=eq(ysb(Yod,cD(WC(E3,1),NAe,64,0,[npd])));apd=eq(ysb(Xod,cD(WC(E3,1),NAe,64,0,[ppd])));jpd=eq(ysb(Yod,cD(WC(E3,1),NAe,64,0,[ppd])));dpd=eq(ysb(Yod,cD(WC(E3,1),NAe,64,0,[Xod])));lpd=eq(ysb(npd,cD(WC(E3,1),NAe,64,0,[ppd])));$od=eq(ysb(Xod,cD(WC(E3,1),NAe,64,0,[npd])));gpd=eq(ysb(Yod,cD(WC(E3,1),NAe,64,0,[Xod,ppd])));_od=eq(ysb(Xod,cD(WC(E3,1),NAe,64,0,[npd,ppd])));ipd=eq(ysb(Yod,cD(WC(E3,1),NAe,64,0,[npd,ppd])));epd=eq(ysb(Yod,cD(WC(E3,1),NAe,64,0,[Xod,npd])));fpd=eq(ysb(Yod,cD(WC(E3,1),NAe,64,0,[Xod,npd,ppd])))} -function Gfc(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A;b.Ug(qBe,1);p=new bnb;w=new bnb;for(j=new Anb(a.b);j.a0&&(t-=n);p2b(g,t);k=0;for(m=new Anb(g.a);m.a0);h.a.Xb(h.c=--h.b)}i=0.4*d*k;!f&&h.b0){j=(BFb(0,c.length),c.charCodeAt(0));if(j!=64){if(j==37){m=c.lastIndexOf('%');k=false;if(m!=0&&(m==n-1||(k=(BFb(m+1,c.length),c.charCodeAt(m+1)==46)))){h=(AFb(1,m,c.length),c.substr(1,m-1));u=lhb('%',h)?null:oSd(h);e=0;if(k){try{e=Oeb((BFb(m+2,c.length+1),c.substr(m+2)),qwe,lve)}catch(a){a=zdb(a);if(ZD(a,130)){i=a;throw Adb(new RSd(i))}else throw Adb(a)}}for(r=P2d(b.Gh());r.Ob();){p=k3d(r);if(ZD(p,519)){f=RD(p,598);t=f.d;if((u==null?t==null:lhb(u,t))&&e--==0){return f}}}return null}}l=c.lastIndexOf('.');o=l==-1?c:(AFb(0,l,c.length),c.substr(0,l));d=0;if(l!=-1){try{d=Oeb((BFb(l+1,c.length+1),c.substr(l+1)),qwe,lve)}catch(a){a=zdb(a);if(ZD(a,130)){o=c}else throw Adb(a)}}o=lhb('%',o)?null:oSd(o);for(q=P2d(b.Gh());q.Ob();){p=k3d(q);if(ZD(p,197)){g=RD(p,197);s=g.xe();if((o==null?s==null:lhb(o,s))&&d--==0){return g}}}return null}}return Pvd(b,c)} -function Hlc(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s;k=new Tsb;i=new Tp;for(d=new Anb(a.a.a.b);d.ab.d.c){n=a.c[b.a.d];q=a.c[l.a.d];if(n==q){continue}rIb(uIb(tIb(vIb(sIb(new wIb,1),100),n),q))}}}}}}} -function mNb(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w;m=RD(RD(Qc(a.r,b),21),87);if(b==(qpd(),Xod)||b==ppd){qNb(a,b);return}f=b==Yod?(mOb(),iOb):(mOb(),lOb);u=b==Yod?(vLb(),uLb):(vLb(),sLb);c=RD(Vrb(a.b,b),127);d=c.i;e=d.c+Hid(cD(WC(iE,1),vxe,28,15,[c.n.b,a.C.b,a.k]));r=d.c+d.b-Hid(cD(WC(iE,1),vxe,28,15,[c.n.c,a.C.c,a.k]));g=WNb(_Nb(f),a.t);s=b==Yod?pxe:oxe;for(l=m.Kc();l.Ob();){j=RD(l.Pb(),117);if(!j.c||j.c.d.c.length<=0){continue}q=j.b.Mf();p=j.e;n=j.c;o=n.i;o.b=(i=n.n,n.e.a+i.b+i.c);o.a=(h=n.n,n.e.b+h.d+h.a);Ivb(u,Pye);n.f=u;RKb(n,(EKb(),DKb));o.c=p.a-(o.b-q.a)/2;v=$wnd.Math.min(e,p.a);w=$wnd.Math.max(r,p.a+q.a);o.cw&&(o.c=w-o.b);Rmb(g.d,new sOb(o,UNb(g,o)));s=b==Yod?$wnd.Math.max(s,p.b+j.b.Mf().b):$wnd.Math.min(s,p.b)}s+=b==Yod?a.t:-a.t;t=VNb((g.e=s,g));t>0&&(RD(Vrb(a.b,b),127).a.b=t);for(k=m.Kc();k.Ob();){j=RD(k.Pb(),117);if(!j.c||j.c.d.c.length<=0){continue}o=j.c.i;o.c-=j.e.a;o.d-=j.e.b}} -function JSb(a){var b,c,d,e,f,g,h,i,j,k,l,m,n;b=new Tsb;for(i=new dMd(a);i.e!=i.i.gc();){h=RD(bMd(i),27);c=new _sb;Zjb(FSb,h,c);n=new TSb;e=RD(zDb(new SDb(null,new Twb(new is(Mr(yGd(h).a.Kc(),new ir)))),OBb(n,tBb(new ZBb,new XBb,new wCb,cD(WC(QL,1),jwe,108,0,[(xBb(),vBb)])))),85);ISb(c,RD(e.xc((Geb(),true)),16),new VSb);d=RD(zDb(CDb(RD(e.xc(false),15).Lc(),new XSb),tBb(new ZBb,new XBb,new wCb,cD(WC(QL,1),jwe,108,0,[vBb]))),15);for(g=d.Kc();g.Ob();){f=RD(g.Pb(),74);m=KGd(f);if(m){j=RD(Wd(qtb(b.f,m)),21);if(!j){j=LSb(m);rtb(b.f,m,j)}ye(c,j)}}e=RD(zDb(new SDb(null,new Twb(new is(Mr(zGd(h).a.Kc(),new ir)))),OBb(n,tBb(new ZBb,new XBb,new wCb,cD(WC(QL,1),jwe,108,0,[vBb])))),85);ISb(c,RD(e.xc(true),16),new ZSb);d=RD(zDb(CDb(RD(e.xc(false),15).Lc(),new _Sb),tBb(new ZBb,new XBb,new wCb,cD(WC(QL,1),jwe,108,0,[vBb]))),15);for(l=d.Kc();l.Ob();){k=RD(l.Pb(),74);m=MGd(k);if(m){j=RD(Wd(qtb(b.f,m)),21);if(!j){j=LSb(m);rtb(b.f,m,j)}ye(c,j)}}}} -function zjb(a,b){xjb();var c,d,e,f,g,h,i,j,k,l,m,n,o,p;i=Ddb(a,0)<0;i&&(a=Odb(a));if(Ddb(a,0)==0){switch(b){case 0:return '0';case 1:return zxe;case 2:return '0.00';case 3:return '0.000';case 4:return '0.0000';case 5:return '0.00000';case 6:return '0.000000';default:n=new bib;b<0?(n.a+='0E+',n):(n.a+='0E',n);n.a+=b==qwe?'2147483648':''+-b;return n.a;}}k=18;l=$C(hE,zwe,28,k+1,15,1);c=k;p=a;do{j=p;p=Fdb(p,10);l[--c]=Ydb(Bdb(48,Vdb(j,Ndb(p,10))))&Bwe}while(Ddb(p,0)!=0);e=Vdb(Vdb(Vdb(k,c),b),1);if(b==0){i&&(l[--c]=45);return Ihb(l,c,k-c)}if(b>0&&Ddb(e,-6)>=0){if(Ddb(e,0)>=0){f=c+Ydb(e);for(h=k-1;h>=f;h--){l[h+1]=l[h]}l[++f]=46;i&&(l[--c]=45);return Ihb(l,c,k-c+1)}for(g=2;Ldb(g,Bdb(Odb(e),1));g++){l[--c]=48}l[--c]=46;l[--c]=48;i&&(l[--c]=45);return Ihb(l,c,k-c)}o=c+1;d=k;m=new cib;i&&(m.a+='-',m);if(d-o>=1){Thb(m,l[c]);m.a+='.';m.a+=Ihb(l,c+1,k-c-1)}else{m.a+=Ihb(l,c,k-c)}m.a+='E';Ddb(e,0)>0&&(m.a+='+',m);m.a+=''+Zdb(e);return m.a} -function Esd(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w;q=new rjd(a.g,a.f);p=vsd(a);p.a=$wnd.Math.max(p.a,b);p.b=$wnd.Math.max(p.b,c);w=p.a/q.a;k=p.b/q.b;u=p.a-q.a;i=p.b-q.b;if(d){g=!vCd(a)?RD(Gxd(a,(umd(),Nkd)),88):RD(Gxd(vCd(a),(umd(),Nkd)),88);h=dE(Gxd(a,(umd(),Hld)))===dE((Bod(),wod));for(s=new dMd((!a.c&&(a.c=new C5d(K4,a,9,9)),a.c));s.e!=s.i.gc();){r=RD(bMd(s),123);t=RD(Gxd(r,Old),64);if(t==(qpd(),opd)){t=osd(r,g);Ixd(r,Old,t)}switch(t.g){case 1:h||Dyd(r,r.i*w);break;case 2:Dyd(r,r.i+u);h||Eyd(r,r.j*k);break;case 3:h||Dyd(r,r.i*w);Eyd(r,r.j+i);break;case 4:h||Eyd(r,r.j*k);}}}zyd(a,p.a,p.b);if(e){for(m=new dMd((!a.n&&(a.n=new C5d(I4,a,1,7)),a.n));m.e!=m.i.gc();){l=RD(bMd(m),135);n=l.i+l.g/2;o=l.j+l.f/2;v=n/q.a;j=o/q.b;if(v+j>=1){if(v-j>0&&o>=0){Dyd(l,l.i+u);Eyd(l,l.j+i*j)}else if(v-j<0&&n>=0){Dyd(l,l.i+u*v);Eyd(l,l.j+i)}}}}Ixd(a,(umd(),kld),(Qpd(),f=RD(mfb(H3),9),new Fsb(f,RD(WEb(f,f.length),9),0)));return new rjd(w,k)} -function _4c(a){Cgd(a,new Pfd(Wfd($fd(Xfd(Zfd(Yfd(new agd,CFe),'ELK Radial'),'A radial layout provider which is based on the algorithm of Peter Eades published in "Drawing free trees.", published by International Institute for Advanced Study of Social Information Science, Fujitsu Limited in 1991. The radial layouter takes a tree and places the nodes in radial order around the root. The nodes of the same tree level are placed on the same radius.'),new c5c),CFe)));Agd(a,CFe,fEe,iGd(R4c));Agd(a,CFe,_ze,iGd(Y4c));Agd(a,CFe,jAe,iGd(K4c));Agd(a,CFe,CAe,iGd(L4c));Agd(a,CFe,iAe,iGd(M4c));Agd(a,CFe,kAe,iGd(J4c));Agd(a,CFe,gAe,iGd(N4c));Agd(a,CFe,lAe,iGd(Q4c));Agd(a,CFe,tFe,iGd(H4c));Agd(a,CFe,sFe,iGd(I4c));Agd(a,CFe,rFe,iGd(T4c));Agd(a,CFe,xFe,iGd(W4c));Agd(a,CFe,yFe,iGd(U4c));Agd(a,CFe,zFe,iGd(V4c));Agd(a,CFe,wFe,iGd(O4c));Agd(a,CFe,pFe,iGd(P4c));Agd(a,CFe,qFe,iGd(S4c));Agd(a,CFe,uFe,iGd(X4c));Agd(a,CFe,vFe,iGd(Z4c));Agd(a,CFe,oFe,iGd(G4c))} -function Peb(a){var b,c,d,e,f,g,h,i,j,k,l;if(a==null){throw Adb(new Vgb(vve))}j=a;f=a.length;i=false;if(f>0){b=(BFb(0,a.length),a.charCodeAt(0));if(b==45||b==43){a=(BFb(1,a.length+1),a.substr(1));--f;i=b==45}}if(f==0){throw Adb(new Vgb(nxe+j+'"'))}while(a.length>0&&(BFb(0,a.length),a.charCodeAt(0)==48)){a=(BFb(1,a.length+1),a.substr(1));--f}if(f>(Ugb(),Sgb)[10]){throw Adb(new Vgb(nxe+j+'"'))}for(e=0;e0){l=-parseInt((AFb(0,d,a.length),a.substr(0,d)),10);a=(BFb(d,a.length+1),a.substr(d));f-=d;c=false}while(f>=g){d=parseInt((AFb(0,g,a.length),a.substr(0,g)),10);a=(BFb(g,a.length+1),a.substr(g));f-=g;if(c){c=false}else{if(Ddb(l,h)<0){throw Adb(new Vgb(nxe+j+'"'))}l=Ndb(l,k)}l=Vdb(l,d)}if(Ddb(l,0)>0){throw Adb(new Vgb(nxe+j+'"'))}if(!i){l=Odb(l);if(Ddb(l,0)<0){throw Adb(new Vgb(nxe+j+'"'))}}return l} -function oSd(a){gSd();var b,c,d,e,f,g,h,i;if(a==null)return null;e=qhb(a,Fhb(37));if(e<0){return a}else{i=new dib((AFb(0,e,a.length),a.substr(0,e)));b=$C(gE,YHe,28,4,15,1);h=0;d=0;for(g=a.length;ee+2&&zSd((BFb(e+1,a.length),a.charCodeAt(e+1)),XRd,YRd)&&zSd((BFb(e+2,a.length),a.charCodeAt(e+2)),XRd,YRd)){c=DSd((BFb(e+1,a.length),a.charCodeAt(e+1)),(BFb(e+2,a.length),a.charCodeAt(e+2)));e+=2;if(d>0){(c&192)==128?(b[h++]=c<<24>>24):(d=0)}else if(c>=128){if((c&224)==192){b[h++]=c<<24>>24;d=2}else if((c&240)==224){b[h++]=c<<24>>24;d=3}else if((c&248)==240){b[h++]=c<<24>>24;d=4}}if(d>0){if(h==d){switch(h){case 2:{Thb(i,((b[0]&31)<<6|b[1]&63)&Bwe);break}case 3:{Thb(i,((b[0]&15)<<12|(b[1]&63)<<6|b[2]&63)&Bwe);break}}h=0;d=0}}else{for(f=0;f=2){if((!a.a&&(a.a=new C5d(F4,a,6,6)),a.a).i==0){c=(bvd(),e=new Rzd,e);WGd((!a.a&&(a.a=new C5d(F4,a,6,6)),a.a),c)}else if((!a.a&&(a.a=new C5d(F4,a,6,6)),a.a).i>1){m=new mMd((!a.a&&(a.a=new C5d(F4,a,6,6)),a.a));while(m.e!=m.i.gc()){cMd(m)}}lsd(b,RD(QHd((!a.a&&(a.a=new C5d(F4,a,6,6)),a.a),0),166))}if(l){for(d=new dMd((!a.a&&(a.a=new C5d(F4,a,6,6)),a.a));d.e!=d.i.gc();){c=RD(bMd(d),166);for(j=new dMd((!c.a&&(c.a=new XZd(D4,c,5)),c.a));j.e!=j.i.gc();){i=RD(bMd(j),377);h.a=$wnd.Math.max(h.a,i.a);h.b=$wnd.Math.max(h.b,i.b)}}}for(g=new dMd((!a.n&&(a.n=new C5d(I4,a,1,7)),a.n));g.e!=g.i.gc();){f=RD(bMd(g),135);k=RD(Gxd(f,und),8);!!k&&Byd(f,k.a,k.b);if(l){h.a=$wnd.Math.max(h.a,f.i+f.g);h.b=$wnd.Math.max(h.b,f.j+f.f)}}return h} -function MA(a,b,c,d,e){var f,g,h;KA(a,b);g=b[0];f=ihb(c.c,0);h=-1;if(DA(c)){if(d>0){if(g+d>a.length){return false}h=HA((AFb(0,g+d,a.length),a.substr(0,g+d)),b)}else{h=HA(a,b)}}switch(f){case 71:h=EA(a,g,cD(WC(qJ,1),Nve,2,6,[Qwe,Rwe]),b);e.e=h;return true;case 77:return PA(a,b,e,h,g);case 76:return RA(a,b,e,h,g);case 69:return NA(a,b,g,e);case 99:return QA(a,b,g,e);case 97:h=EA(a,g,cD(WC(qJ,1),Nve,2,6,['AM','PM']),b);e.b=h;return true;case 121:return TA(a,b,g,h,c,e);case 100:if(h<=0){return false}e.c=h;return true;case 83:if(h<0){return false}return OA(h,g,b[0],e);case 104:h==12&&(h=0);case 75:case 72:if(h<0){return false}e.f=h;e.g=false;return true;case 107:if(h<0){return false}e.f=h;e.g=true;return true;case 109:if(h<0){return false}e.j=h;return true;case 115:if(h<0){return false}e.n=h;return true;case 90:if(gB[i]&&(q=i);for(l=new Anb(a.a.b);l.a1){e=N8c(b);l=f.g;o=RD(Gxd(b,N7c),107);p=Kfb(UD(Gxd(b,x7c)));(!b.a&&(b.a=new C5d(J4,b,10,11)),b.a).i>1&&Kfb(UD(Gxd(b,(X6c(),T6c))))!=oxe&&(f.c+(o.b+o.c))/(f.b+(o.d+o.a))1&&Kfb(UD(Gxd(b,(X6c(),S6c))))!=oxe&&(f.c+(o.b+o.c))/(f.b+(o.d+o.a))>p&&Ixd(e,(X6c(),W6c),$wnd.Math.max(Kfb(UD(Gxd(b,U6c))),Kfb(UD(Gxd(e,W6c)))-Kfb(UD(Gxd(b,S6c)))));n=new m9c(d,k);i=l9c(n,e,m);j=i.g;if(j>=l&&j==j){for(g=0;g<(!e.a&&(e.a=new C5d(J4,e,10,11)),e.a).i;g++){O8c(a,RD(QHd((!e.a&&(e.a=new C5d(J4,e,10,11)),e.a),g),27),RD(QHd((!b.a&&(b.a=new C5d(J4,b,10,11)),b.a),g),27))}P8c(b,n);jad(f,i.c);iad(f,i.b)}--h}Ixd(b,(X6c(),N6c),f.b);Ixd(b,O6c,f.c);c.Vg()} -function fHc(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s;b.Ug('Interactive node layering',1);c=new bnb;for(m=new Anb(a.a);m.a=h){sFb(s.b>0);s.a.Xb(s.c=--s.b);break}else if(q.a>i){if(!d){Rmb(q.b,k);q.c=$wnd.Math.min(q.c,i);q.a=$wnd.Math.max(q.a,h);d=q}else{Tmb(d.b,q.b);d.a=$wnd.Math.max(d.a,q.a);Ckb(s)}}}if(!d){d=new jHc;d.c=i;d.a=h;Ikb(s,d);Rmb(d.b,k)}}g=a.b;j=0;for(r=new Anb(c);r.an){if(f){Oub(w,m);Oub(B,sgb(j.b-1))}H=c.b;I+=m+b;m=0;k=$wnd.Math.max(k,c.b+c.c+G)}Dyd(h,H);Eyd(h,I);k=$wnd.Math.max(k,H+G+c.c);m=$wnd.Math.max(m,l);H+=G+b}k=$wnd.Math.max(k,d);F=I+m+c.a;if(FVze;C=$wnd.Math.abs(m.b-o.b)>Vze;(!c&&B&&C||c&&(B||C))&&Mub(q.a,u)}ye(q.a,d);d.b==0?(m=u):(m=(sFb(d.b!=0),RD(d.c.b.c,8)));j0b(n,l,p);if(I0b(e)==A){if(Y2b(A.i)!=e.a){p=new pjd;e2b(p,Y2b(A.i),s)}pQb(q,Wwc,p)}k0b(n,q,s);k.a.zc(n,k)}Y0b(q,v);Z0b(q,A)}for(j=k.a.ec().Kc();j.Ob();){i=RD(j.Pb(),18);Y0b(i,null);Z0b(i,null)}b.Vg()} -function lXc(a,b){var c,d,e,f,g,h,i,j,k,l,m;e=RD(mQb(a,(h_c(),H$c)),88);k=e==(Cmd(),ymd)||e==zmd?xmd:zmd;c=RD(zDb(CDb(new SDb(null,new Swb(a.b,16)),new $Xc),tBb(new ZBb,new XBb,new wCb,cD(WC(QL,1),jwe,108,0,[(xBb(),vBb)]))),15);i=RD(zDb(GDb(c.Oc(),new aYc(b)),tBb(new ZBb,new XBb,new wCb,cD(WC(QL,1),jwe,108,0,[vBb]))),15);i.Gc(RD(zDb(GDb(c.Oc(),new cYc(b)),tBb(new ZBb,new XBb,new wCb,cD(WC(QL,1),jwe,108,0,[vBb]))),16));i.jd(new eYc(k));m=new yAb(new iYc(e));d=new Tsb;for(h=i.Kc();h.Ob();){g=RD(h.Pb(),240);j=RD(g.a,40);if(Heb(TD(g.c))){m.a.zc(j,(Geb(),Eeb))==null;(new zAb(m.a.Zc(j,false))).a.gc()>0&&Zjb(d,j,RD((new zAb(m.a.Zc(j,false))).a.Vc(),40));(new zAb(m.a.ad(j,true))).a.gc()>1&&Zjb(d,nXc(m,j),j)}else{if((new zAb(m.a.Zc(j,false))).a.gc()>0){f=RD((new zAb(m.a.Zc(j,false))).a.Vc(),40);dE(f)===dE(Wd(qtb(d.f,j)))&&RD(mQb(j,(q$c(),TZc)),15).Fc(f)}if((new zAb(m.a.ad(j,true))).a.gc()>1){l=nXc(m,j);dE(Wd(qtb(d.f,l)))===dE(j)&&RD(mQb(l,(q$c(),TZc)),15).Fc(j)}m.a.Bc(j)!=null}}} -function BTb(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;if(a.gc()==1){return RD(a.Xb(0),235)}else if(a.gc()<=0){return new gUb}for(e=a.Kc();e.Ob();){c=RD(e.Pb(),235);o=0;k=lve;l=lve;i=qwe;j=qwe;for(n=new Anb(c.e);n.ah){t=0;u+=g+r;g=0}ATb(p,c,t,u);b=$wnd.Math.max(b,t+q.a);g=$wnd.Math.max(g,q.b);t+=q.a+r}return p} -function Aqe(a){zqe();var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q;if(a==null)return null;f=Ahb(a);o=Dqe(f);if(o%4!=0){return null}p=o/4|0;if(p==0)return $C(gE,YHe,28,0,15,1);l=null;b=0;c=0;d=0;e=0;g=0;h=0;i=0;j=0;n=0;m=0;k=0;l=$C(gE,YHe,28,p*3,15,1);for(;n>4)<<24>>24;l[m++]=((c&15)<<4|d>>2&15)<<24>>24;l[m++]=(d<<6|e)<<24>>24}if(!Cqe(g=f[k++])||!Cqe(h=f[k++])){return null}b=xqe[g];c=xqe[h];i=f[k++];j=f[k++];if(xqe[i]==-1||xqe[j]==-1){if(i==61&&j==61){if((c&15)!=0)return null;q=$C(gE,YHe,28,n*3+1,15,1);hib(l,0,q,0,n*3);q[m]=(b<<2|c>>4)<<24>>24;return q}else if(i!=61&&j==61){d=xqe[i];if((d&3)!=0)return null;q=$C(gE,YHe,28,n*3+2,15,1);hib(l,0,q,0,n*3);q[m++]=(b<<2|c>>4)<<24>>24;q[m]=((c&15)<<4|d>>2&15)<<24>>24;return q}else{return null}}else{d=xqe[i];e=xqe[j];l[m++]=(b<<2|c>>4)<<24>>24;l[m++]=((c&15)<<4|d>>2&15)<<24>>24;l[m++]=(d<<6|e)<<24>>24}return l} -function wfc(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v;b.Ug(qBe,1);o=RD(mQb(a,(yCc(),yAc)),223);for(e=new Anb(a.b);e.a=2){p=true;m=new Anb(f.j);c=RD(ynb(m),12);n=null;while(m.a0){d=l.gc();j=eE($wnd.Math.floor((d+1)/2))-1;e=eE($wnd.Math.ceil((d+1)/2))-1;if(b.o==DQc){for(k=e;k>=j;k--){if(b.a[u.p]==u){p=RD(l.Xb(k),42);o=RD(p.a,10);if(!Zsb(c,p.b)&&n>a.b.e[o.p]){b.a[o.p]=u;b.g[u.p]=b.g[o.p];b.a[u.p]=b.g[u.p];b.f[b.g[u.p].p]=(Geb(),Heb(b.f[b.g[u.p].p])&u.k==(r3b(),o3b)?true:false);n=a.b.e[o.p]}}}}else{for(k=j;k<=e;k++){if(b.a[u.p]==u){r=RD(l.Xb(k),42);q=RD(r.a,10);if(!Zsb(c,r.b)&&n0){e=RD(Vmb(q.c.a,w-1),10);g=a.i[e.p];B=$wnd.Math.ceil(bFc(a.n,e,q));f=v.a.e-q.d.d-(g.a.e+e.o.b+e.d.a)-B}j=oxe;if(w0&&A.a.e.e-A.a.a-(A.b.e.e-A.b.a)<0;o=t.a.e.e-t.a.a-(t.b.e.e-t.b.a)<0&&A.a.e.e-A.a.a-(A.b.e.e-A.b.a)>0;n=t.a.e.e+t.b.aA.b.e.e+A.a.a;u=0;!p&&!o&&(m?f+l>0?(u=l):j-d>0&&(u=d):n&&(f+h>0?(u=h):j-s>0&&(u=s)));v.a.e+=u;v.b&&(v.d.e+=u);return false} -function OJb(a,b,c){var d,e,f,g,h,i,j,k,l,m;d=new Uid(b.Lf().a,b.Lf().b,b.Mf().a,b.Mf().b);e=new Tid;if(a.c){for(g=new Anb(b.Rf());g.aj&&(d.a+=Hhb($C(hE,zwe,28,-j,15,1)));d.a+='Is';if(qhb(i,Fhb(32))>=0){for(e=0;e=d.o.b/2}else{s=!l}if(s){r=RD(mQb(d,(Ywc(),Xwc)),15);if(!r){f=new bnb;pQb(d,Xwc,f)}else if(m){f=r}else{e=RD(mQb(d,Vvc),15);if(!e){f=new bnb;pQb(d,Vvc,f)}else{r.gc()<=e.gc()?(f=r):(f=e)}}}else{e=RD(mQb(d,(Ywc(),Vvc)),15);if(!e){f=new bnb;pQb(d,Vvc,f)}else if(l){f=e}else{r=RD(mQb(d,Xwc),15);if(!r){f=new bnb;pQb(d,Xwc,f)}else{e.gc()<=r.gc()?(f=e):(f=r)}}}f.Fc(a);pQb(a,(Ywc(),Xvc),c);if(b.d==c){Z0b(b,null);c.e.c.length+c.g.c.length==0&&P3b(c,null);u6b(c)}else{Y0b(b,null);c.e.c.length+c.g.c.length==0&&P3b(c,null)}Xub(b.a)} -function GHc(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D,F,G,H,I;c.Ug('MinWidth layering',1);n=b.b;A=b.a;I=RD(mQb(b,(yCc(),WAc)),17).a;h=RD(mQb(b,XAc),17).a;a.b=Kfb(UD(mQb(b,TBc)));a.d=oxe;for(u=new Anb(A);u.a0){j=0;!!q&&(j+=h);j+=(C-1)*g;!!t&&(j+=h);B&&!!t&&(j=$wnd.Math.max(j,JUc(t,g,s,A)));if(j=a.a){d=V9b(a,s);k=$wnd.Math.max(k,d.b);u=$wnd.Math.max(u,d.d);Rmb(h,new Ptd(s,d))}}B=new bnb;for(j=0;j0),q.a.Xb(q.c=--q.b),C=new R4b(a.b),Ikb(q,C),sFb(q.b0){m=k<100?null:new gLd(k);j=new $Hd(b);o=j.g;r=$C(kE,Pwe,28,k,15,1);d=0;u=new ZHd(k);for(e=0;e=0;){if(n!=null?pb(n,o[i]):dE(n)===dE(o[i])){if(r.length<=d){q=r;r=$C(kE,Pwe,28,2*r.length,15,1);hib(q,0,r,0,d)}r[d++]=e;WGd(u,o[i]);break v}}n=n;if(dE(n)===dE(h)){break}}}j=u;o=u.g;k=d;if(d>r.length){q=r;r=$C(kE,Pwe,28,d,15,1);hib(q,0,r,0,d)}if(d>0){t=true;for(f=0;f=0;){THd(a,r[g])}if(d!=k){for(e=k;--e>=d;){THd(j,e)}q=r;r=$C(kE,Pwe,28,d,15,1);hib(q,0,r,0,d)}b=j}}}else{b=aHd(a,b);for(e=a.i;--e>=0;){if(b.Hc(a.g[e])){THd(a,e);t=true}}}if(t){if(r!=null){c=b.gc();l=c==1?dZd(a,4,b.Kc().Pb(),null,r[0],p):dZd(a,6,b,r,r[0],p);m=c<100?null:new gLd(c);for(e=b.Kc();e.Ob();){n=e.Pb();m=oge(a,RD(n,76),m)}if(!m){qvd(a.e,l)}else{m.nj(l);m.oj()}}else{m=tLd(b.gc());for(e=b.Kc();e.Ob();){n=e.Pb();m=oge(a,RD(n,76),m)}!!m&&m.oj()}return true}else{return false}} -function i_b(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t;c=new p_b(b);c.a||b_b(b);j=a_b(b);i=new Tp;q=new D_b;for(p=new Anb(b.a);p.a0||c.o==DQc&&e=c} -function zEd(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D,F,G;t=b;s=new Tp;u=new Tp;k=wDd(t,mIe);d=new OEd(a,c,s,u);QDd(d.a,d.b,d.c,d.d,k);i=(A=s.i,!A?(s.i=new zf(s,s.c)):A);for(C=i.Kc();C.Ob();){B=RD(C.Pb(),166);e=RD(Qc(s,B),21);for(p=e.Kc();p.Ob();){o=p.Pb();v=RD(Ao(a.d,o),166);if(v){h=(!B.e&&(B.e=new Yie(F4,B,10,9)),B.e);WGd(h,v)}else{g=zDd(t,uIe);m=AIe+o+BIe+g;n=m+zIe;throw Adb(new CDd(n))}}}j=(w=u.i,!w?(u.i=new zf(u,u.c)):w);for(F=j.Kc();F.Ob();){D=RD(F.Pb(),166);f=RD(Qc(u,D),21);for(r=f.Kc();r.Ob();){q=r.Pb();v=RD(Ao(a.d,q),166);if(v){l=(!D.g&&(D.g=new Yie(F4,D,9,10)),D.g);WGd(l,v)}else{g=zDd(t,uIe);m=AIe+q+BIe+g;n=m+zIe;throw Adb(new CDd(n))}}}!c.b&&(c.b=new Yie(E4,c,4,7));if(c.b.i!=0&&(!c.c&&(c.c=new Yie(E4,c,5,8)),c.c.i!=0)&&(!c.b&&(c.b=new Yie(E4,c,4,7)),c.b.i<=1&&(!c.c&&(c.c=new Yie(E4,c,5,8)),c.c.i<=1))&&(!c.a&&(c.a=new C5d(F4,c,6,6)),c.a).i==1){G=RD(QHd((!c.a&&(c.a=new C5d(F4,c,6,6)),c.a),0),166);if(!Dzd(G)&&!Ezd(G)){Kzd(G,RD(QHd((!c.b&&(c.b=new Yie(E4,c,4,7)),c.b),0),84));Lzd(G,RD(QHd((!c.c&&(c.c=new Yie(E4,c,5,8)),c.c),0),84))}}} -function QNc(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D;for(t=a.a,u=0,v=t.length;u0){l=RD(Vmb(m.c.a,g-1),10);B=bFc(a.b,m,l);q=m.n.b-m.d.d-(l.n.b+l.o.b+l.d.a+B)}else{q=m.n.b-m.d.d}j=$wnd.Math.min(q,j);if(g1&&(g=$wnd.Math.min(g,$wnd.Math.abs(RD(ju(h.a,1),8).b-k.b)))}}}}}else{for(p=new Anb(b.j);p.ae){f=m.a-e;g=lve;d.c.length=0;e=m.a}if(m.a>=e){ZEb(d.c,h);h.a.b>1&&(g=$wnd.Math.min(g,$wnd.Math.abs(RD(ju(h.a,h.a.b-2),8).b-m.b)))}}}}}if(d.c.length!=0&&f>b.o.a/2&&g>b.o.b/2){n=new R3b;P3b(n,b);Q3b(n,(qpd(),Yod));n.n.a=b.o.a/2;r=new R3b;P3b(r,b);Q3b(r,npd);r.n.a=b.o.a/2;r.n.b=b.o.b;for(i=new Anb(d);i.a=j.b?Y0b(h,r):Y0b(h,n)}else{j=RD(Vub(h.a),8);q=h.a.b==0?K3b(h.c):RD(Rub(h.a),8);q.b>=j.b?Z0b(h,r):Z0b(h,n)}l=RD(mQb(h,(yCc(),RAc)),75);!!l&&ze(l,j,true)}b.n.a=e-b.o.a/2}} -function E0c(a,b,c){var d,e,f,g,h,i,j,k,l,m;for(h=Sub(a.b,0);h.b!=h.d.c;){g=RD(evb(h),40);if(lhb(g.c,IEe)){continue}j=iWc(g,a);b==(Cmd(),ymd)||b==zmd?_mb(j,new D1c):_mb(j,new H1c);i=j.c.length;for(d=0;d=0?(n=vpd(h)):(n=spd(vpd(h)));a.qf(GBc,n)}j=new pjd;m=false;if(a.pf(zBc)){mjd(j,RD(a.of(zBc),8));m=true}else{ljd(j,g.a/2,g.b/2)}switch(n.g){case 4:pQb(k,UAc,(cxc(),$wc));pQb(k,bwc,(huc(),guc));k.o.b=g.b;p<0&&(k.o.a=-p);Q3b(l,(qpd(),Xod));m||(j.a=g.a);j.a-=g.a;break;case 2:pQb(k,UAc,(cxc(),axc));pQb(k,bwc,(huc(),euc));k.o.b=g.b;p<0&&(k.o.a=-p);Q3b(l,(qpd(),ppd));m||(j.a=0);break;case 1:pQb(k,owc,(Gvc(),Fvc));k.o.a=g.a;p<0&&(k.o.b=-p);Q3b(l,(qpd(),npd));m||(j.b=g.b);j.b-=g.b;break;case 3:pQb(k,owc,(Gvc(),Dvc));k.o.a=g.a;p<0&&(k.o.b=-p);Q3b(l,(qpd(),Yod));m||(j.b=0);}mjd(l.n,j);pQb(k,zBc,j);if(b==vod||b==xod||b==wod){o=0;if(b==vod&&a.pf(CBc)){switch(n.g){case 1:case 2:o=RD(a.of(CBc),17).a;break;case 3:case 4:o=-RD(a.of(CBc),17).a;}}else{switch(n.g){case 4:case 2:o=f.b;b==xod&&(o/=e.b);break;case 1:case 3:o=f.a;b==xod&&(o/=e.a);}}pQb(k,Jwc,o)}pQb(k,hwc,n);return k} -function OId(){MId();function h(f){var g=this;this.dispatch=function(a){var b=a.data;switch(b.cmd){case 'algorithms':var c=PId((yob(),new xpb(new glb(LId.b))));f.postMessage({id:b.id,data:c});break;case 'categories':var d=PId((yob(),new xpb(new glb(LId.c))));f.postMessage({id:b.id,data:d});break;case 'options':var e=PId((yob(),new xpb(new glb(LId.d))));f.postMessage({id:b.id,data:e});break;case 'register':SId(b.algorithms);f.postMessage({id:b.id});break;case 'layout':QId(b.graph,b.layoutOptions||{},b.options||{});f.postMessage({id:b.id,data:b.graph});break;}};this.saveDispatch=function(b){try{g.dispatch(b)}catch(a){f.postMessage({id:b.data.id,error:a})}}} -function j(b){var c=this;this.dispatcher=new h({postMessage:function(a){c.onmessage({data:a})}});this.postMessage=function(a){setTimeout(function(){c.dispatcher.saveDispatch({data:a})},0)}} -if(typeof document===Yxe&&typeof self!==Yxe){var i=new h(self);self.onmessage=i.saveDispatch}else if(typeof module!==Yxe&&module.exports){Object.defineProperty(exports,'__esModule',{value:true});module.exports={'default':j,Worker:j}}} -function i5b(a,b,c){var d,e,f,g,h,i,j,k,l,m;k=new j3b(c);kQb(k,b);pQb(k,(Ywc(),Awc),b);k.o.a=b.g;k.o.b=b.f;k.n.a=b.i;k.n.b=b.j;Rmb(c.a,k);Zjb(a.a,b,k);((!b.a&&(b.a=new C5d(J4,b,10,11)),b.a).i!=0||Heb(TD(Gxd(b,(yCc(),NAc)))))&&pQb(k,Yvc,(Geb(),true));j=RD(mQb(c,kwc),21);l=RD(mQb(k,(yCc(),BBc)),101);l==(Bod(),Aod)?pQb(k,BBc,zod):l!=zod&&j.Fc((ovc(),kvc));m=0;d=RD(mQb(c,rAc),88);for(i=new dMd((!b.c&&(b.c=new C5d(K4,b,9,9)),b.c));i.e!=i.i.gc();){h=RD(bMd(i),123);e=vCd(b);(dE(Gxd(e,cAc))!==dE((kEc(),hEc))||dE(Gxd(e,pAc))===dE((Ptc(),Otc))||dE(Gxd(e,pAc))===dE((Ptc(),Mtc))||Heb(TD(Gxd(e,eAc)))||dE(Gxd(e,Yzc))!==dE((U$b(),T$b))||dE(Gxd(e,ZAc))===dE((aEc(),TDc))||dE(Gxd(e,ZAc))===dE((aEc(),UDc))||dE(Gxd(e,$Ac))===dE((_Cc(),SCc))||dE(Gxd(e,$Ac))===dE((_Cc(),UCc)))&&!Heb(TD(Gxd(b,aAc)))&&Ixd(h,zwc,sgb(m++));Heb(TD(Gxd(h,pBc)))||j5b(a,h,k,j,d,l)}for(g=new dMd((!b.n&&(b.n=new C5d(I4,b,1,7)),b.n));g.e!=g.i.gc();){f=RD(bMd(g),135);!Heb(TD(Gxd(f,pBc)))&&!!f.a&&Rmb(k.b,h5b(f))}Heb(TD(mQb(k,Uzc)))&&j.Fc((ovc(),fvc));if(Heb(TD(mQb(k,MAc)))){j.Fc((ovc(),jvc));j.Fc(ivc);pQb(k,BBc,zod)}return k} -function ird(a,b,c,d,e,f,g){var h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D,F,G,H,I;p=0;D=0;for(j=new Anb(a.b);j.ap){if(f){Oub(w,n);Oub(B,sgb(k.b-1));Rmb(a.d,o);h.c.length=0}H=c.b;I+=n+b;n=0;l=$wnd.Math.max(l,c.b+c.c+G)}ZEb(h.c,i);xrd(i,H,I);l=$wnd.Math.max(l,H+G+c.c);n=$wnd.Math.max(n,m);H+=G+b;o=i}Tmb(a.a,h);Rmb(a.d,RD(Vmb(h,h.c.length-1),163));l=$wnd.Math.max(l,d);F=I+n+c.a;if(Fe.d.d+e.d.a){k.f.d=true}else{k.f.d=true;k.f.a=true}}}d.b!=d.d.c&&(b=c)}if(k){f=RD(Wjb(a.f,g.d.i),60);if(b.bf.d.d+f.d.a){k.f.d=true}else{k.f.d=true;k.f.a=true}}}}for(h=new is(Mr(Z2b(n).a.Kc(),new ir));gs(h);){g=RD(hs(h),18);if(g.a.b!=0){b=RD(Rub(g.a),8);if(g.d.j==(qpd(),Yod)){q=new Nlc(b,new rjd(b.a,e.d.d),e,g);q.f.a=true;q.a=g.d;ZEb(p.c,q)}if(g.d.j==npd){q=new Nlc(b,new rjd(b.a,e.d.d+e.d.a),e,g);q.f.d=true;q.a=g.d;ZEb(p.c,q)}}}}}return p} -function Nvd(a,b,c){var d,e,f,g,h,i,j,k,l,m;i=new bnb;l=b.length;g=$5d(c);for(j=0;j=o){if(s>o){n.c.length=0;o=s}ZEb(n.c,g)}}if(n.c.length!=0){m=RD(Vmb(n,Jwb(b,n.c.length)),131);F.a.Bc(m)!=null;m.s=p++;$Uc(m,C,w);n.c.length=0}}u=a.c.length+1;for(h=new Anb(a);h.aD.s){Ckb(c);Ymb(D.i,d);if(d.c>0){d.a=D;Rmb(D.t,d);d.b=A;Rmb(A.i,d)}}}}} -function Efc(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D,F;p=new cnb(b.b);u=new cnb(b.b);m=new cnb(b.b);B=new cnb(b.b);q=new cnb(b.b);for(A=Sub(b,0);A.b!=A.d.c;){v=RD(evb(A),12);for(h=new Anb(v.g);h.a0;r=v.g.c.length>0;j&&r?(ZEb(m.c,v),true):j?(ZEb(p.c,v),true):r&&(ZEb(u.c,v),true)}for(o=new Anb(p);o.as.nh()-j.b&&(m=s.nh()-j.b);n>s.oh()-j.d&&(n=s.oh()-j.d);k0){for(t=Sub(a.f,0);t.b!=t.d.c;){s=RD(evb(t),10);s.p+=m-a.e}WGc(a);Xub(a.f);TGc(a,d,n)}else{Mub(a.f,n);n.p=d;a.e=$wnd.Math.max(a.e,d);for(f=new is(Mr(Z2b(n).a.Kc(),new ir));gs(f);){e=RD(hs(f),18);if(!e.c.i.c&&e.c.i.k==(r3b(),n3b)){Mub(a.f,e.c.i);e.c.i.p=d-1}}a.c=d}}}else{WGc(a);Xub(a.f);d=0;if(gs(new is(Mr(Z2b(n).a.Kc(),new ir)))){m=0;m=UGc(m,n);d=m+2;TGc(a,d,n)}else{Mub(a.f,n);n.p=0;a.e=$wnd.Math.max(a.e,0);a.b=RD(Vmb(a.d.b,0),30);a.c=0}}}}a.f.b==0||WGc(a);a.d.a.c.length=0;r=new bnb;for(j=new Anb(a.d.b);j.a=48&&b<=57){d=b-48;while(e=48&&b<=57){d=d*10+b-48;if(d<0)throw Adb(new Lqe(TId((Hde(),CJe))))}}else{throw Adb(new Lqe(TId((Hde(),yJe))))}c=d;if(b==44){if(e>=a.j){throw Adb(new Lqe(TId((Hde(),AJe))))}else if((b=ihb(a.i,e++))>=48&&b<=57){c=b-48;while(e=48&&b<=57){c=c*10+b-48;if(c<0)throw Adb(new Lqe(TId((Hde(),CJe))))}if(d>c)throw Adb(new Lqe(TId((Hde(),BJe))))}else{c=-1}}if(b!=125)throw Adb(new Lqe(TId((Hde(),zJe))));if(a.bm(e)){f=(Vse(),Vse(),++Use,new Kte(9,f));a.d=e+1}else{f=(Vse(),Vse(),++Use,new Kte(3,f));a.d=e}f.Om(d);f.Nm(c);Mqe(a)}}return f} -function bXb(a){var b,c,d,e,f;c=RD(mQb(a,(Ywc(),kwc)),21);b=vfd(YWb);e=RD(mQb(a,(yCc(),IAc)),346);e==(Fnd(),Cnd)&&ofd(b,ZWb);Heb(TD(mQb(a,GAc)))?pfd(b,(sXb(),nXb),(hcc(),Zbc)):pfd(b,(sXb(),pXb),(hcc(),Zbc));mQb(a,(rid(),qid))!=null&&ofd(b,$Wb);(Heb(TD(mQb(a,PAc)))||Heb(TD(mQb(a,HAc))))&&nfd(b,(sXb(),rXb),(hcc(),lbc));switch(RD(mQb(a,rAc),88).g){case 2:case 3:case 4:nfd(pfd(b,(sXb(),nXb),(hcc(),nbc)),rXb,mbc);}c.Hc((ovc(),fvc))&&nfd(pfd(pfd(b,(sXb(),nXb),(hcc(),kbc)),qXb,ibc),rXb,jbc);dE(mQb(a,ZAc))!==dE((aEc(),$Dc))&&pfd(b,(sXb(),pXb),(hcc(),Rbc));if(c.Hc(mvc)){pfd(b,(sXb(),nXb),(hcc(),Xbc));pfd(b,oXb,Vbc);pfd(b,pXb,Wbc)}dE(mQb(a,Xzc))!==dE(($uc(),Yuc))&&dE(mQb(a,yAc))!==dE((Ymd(),Vmd))&&nfd(b,(sXb(),rXb),(hcc(),Abc));Heb(TD(mQb(a,KAc)))&&pfd(b,(sXb(),pXb),(hcc(),zbc));Heb(TD(mQb(a,nAc)))&&pfd(b,(sXb(),pXb),(hcc(),dcc));if(eXb(a)){dE(mQb(a,IAc))===dE(Cnd)?(d=RD(mQb(a,gAc),299)):(d=RD(mQb(a,hAc),299));f=d==(xvc(),vvc)?(hcc(),Ubc):(hcc(),gcc);pfd(b,(sXb(),qXb),f)}switch(RD(mQb(a,vCc),388).g){case 1:pfd(b,(sXb(),qXb),(hcc(),ecc));break;case 2:nfd(pfd(pfd(b,(sXb(),pXb),(hcc(),ebc)),qXb,fbc),rXb,gbc);}dE(mQb(a,cAc))!==dE((kEc(),hEc))&&pfd(b,(sXb(),pXb),(hcc(),fcc));return b} -function crc(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t;if(Ujb(a.a,b)){if(Zsb(RD(Wjb(a.a,b),49),c)){return 1}}else{Zjb(a.a,b,new _sb)}if(Ujb(a.a,c)){if(Zsb(RD(Wjb(a.a,c),49),b)){return -1}}else{Zjb(a.a,c,new _sb)}if(Ujb(a.e,b)){if(Zsb(RD(Wjb(a.e,b),49),c)){return -1}}else{Zjb(a.e,b,new _sb)}if(Ujb(a.e,c)){if(Zsb(RD(Wjb(a.a,c),49),b)){return 1}}else{Zjb(a.e,c,new _sb)}if(a.c==(kEc(),iEc)||!nQb(b,(Ywc(),zwc))||!nQb(c,(Ywc(),zwc))){l=null;for(j=new Anb(b.j);j.ag?erc(a,b,c):erc(a,c,b);return eg?1:0}}d=RD(mQb(b,(Ywc(),zwc)),17).a;f=RD(mQb(c,zwc),17).a;d>f?erc(a,b,c):erc(a,c,b);return df?1:0} -function uAd(b,c,d){var e,f,g,h,i,j,k,l,m,n,o,p,q,r;if(d==null){return null}if(b.a!=c.jk()){throw Adb(new agb(VHe+c.xe()+WHe))}if(ZD(c,469)){r=z1d(RD(c,685),d);if(!r){throw Adb(new agb(XHe+d+"' is not a valid enumerator of '"+c.xe()+"'"))}return r}switch(Oee((lke(),jke),c).Nl()){case 2:{d=nue(d,false);break}case 3:{d=nue(d,true);break}}e=Oee(jke,c).Jl();if(e){return e.jk().wi().ti(e,d)}n=Oee(jke,c).Ll();if(n){r=new bnb;for(k=xAd(d),l=0,m=k.length;l1){o=new mMd((!a.a&&(a.a=new C5d(F4,a,6,6)),a.a));while(o.e!=o.i.gc()){cMd(o)}}g=RD(QHd((!a.a&&(a.a=new C5d(F4,a,6,6)),a.a),0),166);q=H;H>v+u?(q=v+u):Hw+p?(r=w+p):Iv-u&&qw-p&&rH+G?(B=H+G):vI+A?(C=I+A):wH-G&&BI-A&&Cc&&(m=c-1);n=N+Kwb(b,24)*Nxe*l-l/2;n<0?(n=1):n>d&&(n=d-1);e=(bvd(),i=new Xxd,i);Vxd(e,m);Wxd(e,n);WGd((!g.a&&(g.a=new XZd(D4,g,5)),g.a),e)}} -function Y7c(a){Cgd(a,new Pfd($fd(Xfd(Zfd(Yfd(new agd,$Fe),'ELK Rectangle Packing'),'Algorithm for packing of unconnected boxes, i.e. graphs without edges. The given order of the boxes is always preserved and the main reading direction of the boxes is left to right. The algorithm is divided into two phases. One phase approximates the width in which the rectangles can be placed. The next phase places the rectangles in rows using the previously calculated width as bounding width and bundles rectangles with a similar height in blocks. A compaction step reduces the size of the drawing. Finally, the rectangles are expanded to fill their bounding box and eliminate empty unused spaces.'),new _7c)));Agd(a,$Fe,Dze,1.3);Agd(a,$Fe,hAe,(Geb(),false));Agd(a,$Fe,Eze,O7c);Agd(a,$Fe,_ze,15);Agd(a,$Fe,YDe,iGd(y7c));Agd(a,$Fe,jAe,iGd(F7c));Agd(a,$Fe,CAe,iGd(H7c));Agd(a,$Fe,iAe,iGd(I7c));Agd(a,$Fe,kAe,iGd(E7c));Agd(a,$Fe,gAe,iGd(J7c));Agd(a,$Fe,lAe,iGd(P7c));Agd(a,$Fe,RFe,iGd(U7c));Agd(a,$Fe,SFe,iGd(T7c));Agd(a,$Fe,QFe,iGd(W7c));Agd(a,$Fe,PFe,iGd(V7c));Agd(a,$Fe,TFe,iGd(M7c));Agd(a,$Fe,UFe,iGd(L7c));Agd(a,$Fe,VFe,iGd(K7c));Agd(a,$Fe,WFe,iGd(S7c));Agd(a,$Fe,dAe,iGd(B7c));Agd(a,$Fe,iEe,iGd(C7c));Agd(a,$Fe,NFe,iGd(A7c));Agd(a,$Fe,MFe,iGd(z7c));Agd(a,$Fe,OFe,iGd(D7c));Agd(a,$Fe,LFe,iGd(R7c))} -function Ajb(a,b){xjb();var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D,F,G,H;B=a.e;o=a.d;e=a.a;if(B==0){switch(b){case 0:return '0';case 1:return zxe;case 2:return '0.00';case 3:return '0.000';case 4:return '0.0000';case 5:return '0.00000';case 6:return '0.000000';default:w=new bib;b<0?(w.a+='0E+',w):(w.a+='0E',w);w.a+=-b;return w.a;}}t=o*10+1+7;u=$C(hE,zwe,28,t+1,15,1);c=t;if(o==1){h=e[0];if(h<0){H=Cdb(h,yxe);do{p=H;H=Fdb(H,10);u[--c]=48+Ydb(Vdb(p,Ndb(H,10)))&Bwe}while(Ddb(H,0)!=0)}else{H=h;do{p=H;H=H/10|0;u[--c]=48+(p-H*10)&Bwe}while(H!=0)}}else{D=$C(kE,Pwe,28,o,15,1);G=o;hib(e,0,D,0,G);I:while(true){A=0;for(j=G-1;j>=0;j--){F=Bdb(Sdb(A,32),Cdb(D[j],yxe));r=yjb(F);D[j]=Ydb(r);A=Ydb(Tdb(r,32))}s=Ydb(A);q=c;do{u[--c]=48+s%10&Bwe}while((s=s/10|0)!=0&&c!=0);d=9-q+c;for(i=0;i0;i++){u[--c]=48}l=G-1;for(;D[l]==0;l--){if(l==0){break I}}G=l+1}while(u[c]==48){++c}}n=B<0;g=t-c-b-1;if(b==0){n&&(u[--c]=45);return Ihb(u,c,t-c)}if(b>0&&g>=-6){if(g>=0){k=c+g;for(m=t-1;m>=k;m--){u[m+1]=u[m]}u[++k]=46;n&&(u[--c]=45);return Ihb(u,c,t-c+1)}for(l=2;l<-g+1;l++){u[--c]=48}u[--c]=46;u[--c]=48;n&&(u[--c]=45);return Ihb(u,c,t-c)}C=c+1;f=t;v=new cib;n&&(v.a+='-',v);if(f-C>=1){Thb(v,u[c]);v.a+='.';v.a+=Ihb(u,c+1,t-c-1)}else{v.a+=Ihb(u,c,t-c)}v.a+='E';g>0&&(v.a+='+',v);v.a+=''+g;return v.a} -function Jad(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w;a.c=b;a.g=new Tsb;c=(lud(),new zud(a.c));d=new PJb(c);LJb(d);t=WD(Gxd(a.c,(ncd(),gcd)));i=RD(Gxd(a.c,icd),324);v=RD(Gxd(a.c,jcd),437);g=RD(Gxd(a.c,bcd),490);u=RD(Gxd(a.c,hcd),438);a.j=Kfb(UD(Gxd(a.c,kcd)));h=a.a;switch(i.g){case 0:h=a.a;break;case 1:h=a.b;break;case 2:h=a.i;break;case 3:h=a.e;break;case 4:h=a.f;break;default:throw Adb(new agb(eGe+(i.f!=null?i.f:''+i.g)));}a.d=new qbd(h,v,g);pQb(a.d,(OQb(),MQb),TD(Gxd(a.c,dcd)));a.d.c=Heb(TD(Gxd(a.c,ccd)));if(tCd(a.c).i==0){return a.d}for(l=new dMd(tCd(a.c));l.e!=l.i.gc();){k=RD(bMd(l),27);n=k.g/2;m=k.f/2;w=new rjd(k.i+n,k.j+m);while(Ujb(a.g,w)){Zid(w,($wnd.Math.random()-0.5)*Vze,($wnd.Math.random()-0.5)*Vze)}p=RD(Gxd(k,(umd(),eld)),140);q=new TQb(w,new Uid(w.a-n-a.j/2-p.b,w.b-m-a.j/2-p.d,k.g+a.j+(p.b+p.c),k.f+a.j+(p.d+p.a)));Rmb(a.d.i,q);Zjb(a.g,w,new Ptd(q,k))}switch(u.g){case 0:if(t==null){a.d.d=RD(Vmb(a.d.i,0),68)}else{for(s=new Anb(a.d.i);s.a0?G+1:1}for(g=new Anb(w.g);g.a0?G+1:1}}a.c[j]==0?Mub(a.e,p):a.a[j]==0&&Mub(a.f,p);++j}o=-1;n=1;l=new bnb;a.d=RD(mQb(b,(Ywc(),Lwc)),234);while(L>0){while(a.e.b!=0){I=RD(Uub(a.e),10);a.b[I.p]=o--;TFc(a,I);--L}while(a.f.b!=0){J=RD(Uub(a.f),10);a.b[J.p]=n++;TFc(a,J);--L}if(L>0){m=qwe;for(s=new Anb(t);s.a=m){if(u>m){l.c.length=0;m=u}ZEb(l.c,p)}}}k=a.sg(l);a.b[k.p]=n++;TFc(a,k);--L}}H=t.c.length+1;for(j=0;ja.b[K]){X0b(d,true);pQb(b,awc,(Geb(),true))}}}}a.a=null;a.c=null;a.b=null;Xub(a.f);Xub(a.e);c.Vg()} -function usd(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w;v=RD(QHd((!a.a&&(a.a=new C5d(F4,a,6,6)),a.a),0),166);k=new Ejd;u=new Tsb;w=xsd(v);rtb(u.f,v,w);m=new Tsb;d=new Yub;for(o=Fl(Al(cD(WC(cJ,1),rve,20,0,[(!b.d&&(b.d=new Yie(G4,b,8,5)),b.d),(!b.e&&(b.e=new Yie(G4,b,7,4)),b.e)])));gs(o);){n=RD(hs(o),74);if((!a.a&&(a.a=new C5d(F4,a,6,6)),a.a).i!=1){throw Adb(new agb(tHe+(!a.a&&(a.a=new C5d(F4,a,6,6)),a.a).i))}if(n!=a){q=RD(QHd((!n.a&&(n.a=new C5d(F4,n,6,6)),n.a),0),166);Pub(d,q,d.c.b,d.c);p=RD(Wd(qtb(u.f,q)),13);if(!p){p=xsd(q);rtb(u.f,q,p)}l=c?ojd(new sjd(RD(Vmb(w,w.c.length-1),8)),RD(Vmb(p,p.c.length-1),8)):ojd(new sjd((tFb(0,w.c.length),RD(w.c[0],8))),(tFb(0,p.c.length),RD(p.c[0],8)));rtb(m.f,q,l)}}if(d.b!=0){r=RD(Vmb(w,c?w.c.length-1:0),8);for(j=1;j1&&(Pub(k,r,k.c.b,k.c),true);gvb(e)}}}r=s}}return k} -function S_c(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D;c.Ug(_Ee,1);D=RD(zDb(CDb(new SDb(null,new Swb(b,16)),new e0c),tBb(new ZBb,new XBb,new wCb,cD(WC(QL,1),jwe,108,0,[(xBb(),vBb)]))),15);k=RD(zDb(CDb(new SDb(null,new Swb(b,16)),new g0c(b)),tBb(new ZBb,new XBb,new wCb,cD(WC(QL,1),jwe,108,0,[vBb]))),15);o=RD(zDb(CDb(new SDb(null,new Swb(b,16)),new i0c(b)),tBb(new ZBb,new XBb,new wCb,cD(WC(QL,1),jwe,108,0,[vBb]))),15);p=$C(Z$,NEe,40,b.gc(),0,1);for(g=0;g=0&&C=0&&!p[n]){p[n]=e;k.gd(h);--h;break}n=C-m;if(n=0&&!p[n]){p[n]=e;k.gd(h);--h;break}}}o.jd(new k0c);for(i=p.length-1;i>=0;i--){if(!p[i]&&!o.dc()){p[i]=RD(o.Xb(0),40);o.gd(0)}}for(j=0;j=0;i--){Mub(c,(tFb(i,g.c.length),RD(g.c[i],8)))}return c} -function l9c(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;t=Kfb(UD(Gxd(b,(X6c(),W6c))));n=Kfb(UD(Gxd(b,U6c)));m=Kfb(UD(Gxd(b,R6c)));Bad((!b.a&&(b.a=new C5d(J4,b,10,11)),b.a));r=U8c((!b.a&&(b.a=new C5d(J4,b,10,11)),b.a),t,a.b);for(q=0;qm&&Fad((tFb(m,b.c.length),RD(b.c[m],186)),k);k=null;while(b.c.length>m&&(tFb(m,b.c.length),RD(b.c[m],186)).a.c.length==0){Ymb(b,(tFb(m,b.c.length),b.c[m]))}}if(!k){--g;continue}if(!Heb(TD(RD(Vmb(k.b,0),27).of((X7c(),D7c))))&&K8c(b,o,f,k,q,c,m,d)){p=true;continue}if(q){n=o.b;l=k.f;if(!Heb(TD(RD(Vmb(k.b,0),27).of(D7c)))&&L8c(b,o,f,k,c,m,d,e)){p=true;if(n=a.j){a.a=-1;a.c=1;return}b=ihb(a.i,a.d++);a.a=b;if(a.b==1){switch(b){case 92:d=10;if(a.d>=a.j)throw Adb(new Lqe(TId((Hde(),VIe))));a.a=ihb(a.i,a.d++);break;case 45:if((a.e&512)==512&&a.d=a.j)break;if(ihb(a.i,a.d)!=63)break;if(++a.d>=a.j)throw Adb(new Lqe(TId((Hde(),WIe))));b=ihb(a.i,a.d++);switch(b){case 58:d=13;break;case 61:d=14;break;case 33:d=15;break;case 91:d=19;break;case 62:d=18;break;case 60:if(a.d>=a.j)throw Adb(new Lqe(TId((Hde(),WIe))));b=ihb(a.i,a.d++);if(b==61){d=16}else if(b==33){d=17}else throw Adb(new Lqe(TId((Hde(),XIe))));break;case 35:while(a.d=a.j)throw Adb(new Lqe(TId((Hde(),VIe))));a.a=ihb(a.i,a.d++);break;default:d=0;}a.c=d} -function oXc(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q;c.Ug('Process compaction',1);if(!Heb(TD(mQb(b,(h_c(),F$c))))){return}e=RD(mQb(b,H$c),88);n=Kfb(UD(mQb(b,_$c)));pXc(a,b,e);lXc(b,n/2/2);o=b.b;tvb(o,new EXc(e));for(j=Sub(o,0);j.b!=j.d.c;){i=RD(evb(j),40);if(!Heb(TD(mQb(i,(q$c(),n$c))))){d=mXc(i,e);p=lWc(i,b);l=0;m=0;if(d){q=d.e;switch(e.g){case 2:l=q.a-n-i.f.a;p.e.a-n-i.f.al&&(l=p.e.a+p.f.a+n);m=l+i.f.a;break;case 4:l=q.b-n-i.f.b;p.e.b-n-i.f.bl&&(l=p.e.b+p.f.b+n);m=l+i.f.b;}}else if(p){switch(e.g){case 2:l=p.e.a-n-i.f.a;m=l+i.f.a;break;case 1:l=p.e.a+p.f.a+n;m=l+i.f.a;break;case 4:l=p.e.b-n-i.f.b;m=l+i.f.b;break;case 3:l=p.e.b+p.f.b+n;m=l+i.f.b;}}if(dE(mQb(b,K$c))===dE((LZc(),IZc))){f=l;g=m;h=DDb(CDb(new SDb(null,new Swb(a.a,16)),new IXc(f,g)));if(h.a!=null){e==(Cmd(),ymd)||e==zmd?(i.e.a=l):(i.e.b=l)}else{e==(Cmd(),ymd)||e==Bmd?(h=DDb(CDb(NDb(new SDb(null,new Swb(a.a,16))),new WXc(f)))):(h=DDb(CDb(NDb(new SDb(null,new Swb(a.a,16))),new YXc(f))));h.a!=null&&(e==ymd||e==zmd?(i.e.a=Kfb(UD((sFb(h.a!=null),RD(h.a,42)).a))):(i.e.b=Kfb(UD((sFb(h.a!=null),RD(h.a,42)).a))))}if(h.a!=null){k=Wmb(a.a,(sFb(h.a!=null),h.a),0);if(k>0&&k!=RD(mQb(i,f_c),17).a){pQb(i,UZc,(Geb(),true));pQb(i,f_c,sgb(k))}}}else{e==(Cmd(),ymd)||e==zmd?(i.e.a=l):(i.e.b=l)}}}c.Vg()} -function Fre(a){var b,c,d,e,f,g,h,i,j;a.b=1;Mqe(a);b=null;if(a.c==0&&a.a==94){Mqe(a);b=(Vse(),Vse(),++Use,new xte(4));rte(b,0,MLe);h=(null,++Use,new xte(4))}else{h=(Vse(),Vse(),++Use,new xte(4))}e=true;while((j=a.c)!=1){if(j==0&&a.a==93&&!e){if(b){wte(b,h);h=b}break}c=a.a;d=false;if(j==10){switch(c){case 100:case 68:case 119:case 87:case 115:case 83:ute(h,Ere(c));d=true;break;case 105:case 73:case 99:case 67:c=(ute(h,Ere(c)),-1);c<0&&(d=true);break;case 112:case 80:i=Sqe(a,c);if(!i)throw Adb(new Lqe(TId((Hde(),hJe))));ute(h,i);d=true;break;default:c=Dre(a);}}else if(j==24&&!e){if(b){wte(b,h);h=b}f=Fre(a);wte(h,f);if(a.c!=0||a.a!=93)throw Adb(new Lqe(TId((Hde(),lJe))));break}Mqe(a);if(!d){if(j==0){if(c==91)throw Adb(new Lqe(TId((Hde(),mJe))));if(c==93)throw Adb(new Lqe(TId((Hde(),nJe))));if(c==45&&!e&&a.a!=93)throw Adb(new Lqe(TId((Hde(),oJe))))}if(a.c!=0||a.a!=45||c==45&&e){rte(h,c,c)}else{Mqe(a);if((j=a.c)==1)throw Adb(new Lqe(TId((Hde(),jJe))));if(j==0&&a.a==93){rte(h,c,c);rte(h,45,45)}else if(j==0&&a.a==93||j==24){throw Adb(new Lqe(TId((Hde(),oJe))))}else{g=a.a;if(j==0){if(g==91)throw Adb(new Lqe(TId((Hde(),mJe))));if(g==93)throw Adb(new Lqe(TId((Hde(),nJe))));if(g==45)throw Adb(new Lqe(TId((Hde(),oJe))))}else j==10&&(g=Dre(a));Mqe(a);if(c>g)throw Adb(new Lqe(TId((Hde(),rJe))));rte(h,c,g)}}}e=false}if(a.c==1)throw Adb(new Lqe(TId((Hde(),jJe))));vte(h);ste(h);a.b=0;Mqe(a);return h} -function EGc(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v;c.Ug('Coffman-Graham Layering',1);if(b.a.c.length==0){c.Vg();return}v=RD(mQb(b,(yCc(),SAc)),17).a;i=0;g=0;for(m=new Anb(b.a);m.a=v||!zGc(r,d))&&(d=BGc(b,k));g3b(r,d);for(f=new is(Mr(Z2b(r).a.Kc(),new ir));gs(f);){e=RD(hs(f),18);if(a.a[e.p]){continue}p=e.c.i;--a.e[p.p];a.e[p.p]==0&&(zFb(lwb(n,p),Bxe),true)}}for(j=k.c.length-1;j>=0;--j){Rmb(b.b,(tFb(j,k.c.length),RD(k.c[j],30)))}b.a.c.length=0;c.Vg()} -function Sec(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;u=false;do{u=false;for(f=b?(new Xkb(a.a.b)).a.gc()-2:1;b?f>=0:f<(new Xkb(a.a.b)).a.gc();f+=b?-1:1){e=_5b(a.a,sgb(f));for(n=0;nRD(mQb(q,zwc),17).a)&&(t=false)}if(!t){continue}i=b?f+1:f-1;h=_5b(a.a,sgb(i));g=false;s=true;d=false;for(k=Sub(h,0);k.b!=k.d.c;){j=RD(evb(k),10);if(nQb(j,zwc)){if(j.p!=l.p){g=g|(b?RD(mQb(j,zwc),17).aRD(mQb(l,zwc),17).a);s=false}}else if(!g&&s){if(j.k==(r3b(),n3b)){d=true;b?(m=RD(hs(new is(Mr(Z2b(j).a.Kc(),new ir))),18).c.i):(m=RD(hs(new is(Mr(a3b(j).a.Kc(),new ir))),18).d.i);if(m==l){b?(c=RD(hs(new is(Mr(a3b(j).a.Kc(),new ir))),18).d.i):(c=RD(hs(new is(Mr(Z2b(j).a.Kc(),new ir))),18).c.i);(b?RD($5b(a.a,c),17).a-RD($5b(a.a,m),17).a:RD($5b(a.a,m),17).a-RD($5b(a.a,c),17).a)<=2&&(s=false)}}}}if(d&&s){b?(c=RD(hs(new is(Mr(a3b(l).a.Kc(),new ir))),18).d.i):(c=RD(hs(new is(Mr(Z2b(l).a.Kc(),new ir))),18).c.i);(b?RD($5b(a.a,c),17).a-RD($5b(a.a,l),17).a:RD($5b(a.a,l),17).a-RD($5b(a.a,c),17).a)<=2&&c.k==(r3b(),p3b)&&(s=false)}if(g||s){p=Xec(a,l,b);while(p.a.gc()!=0){o=RD(p.a.ec().Kc().Pb(),10);p.a.Bc(o)!=null;ye(p,Xec(a,o,b))}--n;u=true}}}}while(u)} -function Xae(a){_Ad(a.c,qKe,cD(WC(qJ,1),Nve,2,6,[DKe,'http://www.w3.org/2001/XMLSchema#decimal']));_Ad(a.d,qKe,cD(WC(qJ,1),Nve,2,6,[DKe,'http://www.w3.org/2001/XMLSchema#integer']));_Ad(a.e,qKe,cD(WC(qJ,1),Nve,2,6,[DKe,'http://www.w3.org/2001/XMLSchema#boolean']));_Ad(a.f,qKe,cD(WC(qJ,1),Nve,2,6,[DKe,'EBoolean',GIe,'EBoolean:Object']));_Ad(a.i,qKe,cD(WC(qJ,1),Nve,2,6,[DKe,'http://www.w3.org/2001/XMLSchema#byte']));_Ad(a.g,qKe,cD(WC(qJ,1),Nve,2,6,[DKe,'http://www.w3.org/2001/XMLSchema#hexBinary']));_Ad(a.j,qKe,cD(WC(qJ,1),Nve,2,6,[DKe,'EByte',GIe,'EByte:Object']));_Ad(a.n,qKe,cD(WC(qJ,1),Nve,2,6,[DKe,'EChar',GIe,'EChar:Object']));_Ad(a.t,qKe,cD(WC(qJ,1),Nve,2,6,[DKe,'http://www.w3.org/2001/XMLSchema#double']));_Ad(a.u,qKe,cD(WC(qJ,1),Nve,2,6,[DKe,'EDouble',GIe,'EDouble:Object']));_Ad(a.F,qKe,cD(WC(qJ,1),Nve,2,6,[DKe,'http://www.w3.org/2001/XMLSchema#float']));_Ad(a.G,qKe,cD(WC(qJ,1),Nve,2,6,[DKe,'EFloat',GIe,'EFloat:Object']));_Ad(a.I,qKe,cD(WC(qJ,1),Nve,2,6,[DKe,'http://www.w3.org/2001/XMLSchema#int']));_Ad(a.J,qKe,cD(WC(qJ,1),Nve,2,6,[DKe,'EInt',GIe,'EInt:Object']));_Ad(a.N,qKe,cD(WC(qJ,1),Nve,2,6,[DKe,'http://www.w3.org/2001/XMLSchema#long']));_Ad(a.O,qKe,cD(WC(qJ,1),Nve,2,6,[DKe,'ELong',GIe,'ELong:Object']));_Ad(a.Z,qKe,cD(WC(qJ,1),Nve,2,6,[DKe,'http://www.w3.org/2001/XMLSchema#short']));_Ad(a.$,qKe,cD(WC(qJ,1),Nve,2,6,[DKe,'EShort',GIe,'EShort:Object']));_Ad(a._,qKe,cD(WC(qJ,1),Nve,2,6,[DKe,'http://www.w3.org/2001/XMLSchema#string']))} -function C0c(a,b,c,d,e,f,g){var h,i,j,k,l,m,n,o;m=RD(d.a,17).a;n=RD(d.b,17).a;l=a.b;o=a.c;h=0;k=0;if(b==(Cmd(),ymd)||b==zmd){k=Uvb(QCb(HDb(GDb(new SDb(null,new Swb(c.b,16)),new b2c),new b1c)));if(l.e.b+l.f.b/2>k){j=++n;h=Kfb(UD(Lvb(JDb(GDb(new SDb(null,new Swb(c.b,16)),new d2c(e,j)),new d1c))))}else{i=++m;h=Kfb(UD(Lvb(KDb(GDb(new SDb(null,new Swb(c.b,16)),new f2c(e,i)),new h1c))))}}else{k=Uvb(QCb(HDb(GDb(new SDb(null,new Swb(c.b,16)),new x1c),new l1c)));if(l.e.a+l.f.a/2>k){j=++n;h=Kfb(UD(Lvb(JDb(GDb(new SDb(null,new Swb(c.b,16)),new z1c(e,j)),new n1c))))}else{i=++m;h=Kfb(UD(Lvb(KDb(GDb(new SDb(null,new Swb(c.b,16)),new B1c(e,i)),new r1c))))}}if(b==ymd){Oub(a.a,new rjd(Kfb(UD(mQb(l,(q$c(),f$c))))-e,h));Oub(a.a,new rjd(o.e.a+o.f.a+e+f,h));Oub(a.a,new rjd(o.e.a+o.f.a+e+f,o.e.b+o.f.b/2));Oub(a.a,new rjd(o.e.a+o.f.a,o.e.b+o.f.b/2))}else if(b==zmd){Oub(a.a,new rjd(Kfb(UD(mQb(l,(q$c(),e$c))))+e,l.e.b+l.f.b/2));Oub(a.a,new rjd(l.e.a+l.f.a+e,h));Oub(a.a,new rjd(o.e.a-e-f,h));Oub(a.a,new rjd(o.e.a-e-f,o.e.b+o.f.b/2));Oub(a.a,new rjd(o.e.a,o.e.b+o.f.b/2))}else if(b==Bmd){Oub(a.a,new rjd(h,Kfb(UD(mQb(l,(q$c(),f$c))))-e));Oub(a.a,new rjd(h,o.e.b+o.f.b+e+f));Oub(a.a,new rjd(o.e.a+o.f.a/2,o.e.b+o.f.b+e+f));Oub(a.a,new rjd(o.e.a+o.f.a/2,o.e.b+o.f.b+e))}else{a.a.b==0||(RD(Rub(a.a),8).b=Kfb(UD(mQb(l,(q$c(),e$c))))+e*RD(g.b,17).a);Oub(a.a,new rjd(h,Kfb(UD(mQb(l,(q$c(),e$c))))+e*RD(g.b,17).a));Oub(a.a,new rjd(h,o.e.b-e*RD(g.a,17).a-f))}return new Ptd(sgb(m),sgb(n))} -function ASd(a){var b,c,d,e,f,g,h,i,j,k,l,m,n;g=true;l=null;d=null;e=null;b=false;n=_Rd;j=null;f=null;h=0;i=sSd(a,h,ZRd,$Rd);if(i=0&&lhb(a.substr(h,'//'.length),'//')){h+=2;i=sSd(a,h,aSd,bSd);d=(AFb(h,i,a.length),a.substr(h,i-h));h=i}else if(l!=null&&(h==a.length||(BFb(h,a.length),a.charCodeAt(h)!=47))){g=false;i=rhb(a,Fhb(35),h);i==-1&&(i=a.length);d=(AFb(h,i,a.length),a.substr(h,i-h));h=i}if(!c&&h0&&ihb(k,k.length-1)==58){e=k;h=i}}if(hqQc(f))&&(l=f)}}!l&&(l=(tFb(0,q.c.length),RD(q.c[0],185)));for(p=new Anb(b.b);p.al){F=0;G+=k+A;k=0}FVc(v,g,F,G);b=$wnd.Math.max(b,F+w.a);k=$wnd.Math.max(k,w.b);F+=w.a+A}u=new Tsb;c=new Tsb;for(C=new Anb(a);C.a=-1900?1:0;c>=4?Zhb(a,cD(WC(qJ,1),Nve,2,6,[Qwe,Rwe])[h]):Zhb(a,cD(WC(qJ,1),Nve,2,6,['BC','AD'])[h]);break;case 121:AA(a,c,d);break;case 77:zA(a,c,d);break;case 107:i=e.q.getHours();i==0?UA(a,24,c):UA(a,i,c);break;case 83:yA(a,c,e);break;case 69:k=d.q.getDay();c==5?Zhb(a,cD(WC(qJ,1),Nve,2,6,['S','M','T','W','T','F','S'])[k]):c==4?Zhb(a,cD(WC(qJ,1),Nve,2,6,[Swe,Twe,Uwe,Vwe,Wwe,Xwe,Ywe])[k]):Zhb(a,cD(WC(qJ,1),Nve,2,6,['Sun','Mon','Tue','Wed','Thu','Fri','Sat'])[k]);break;case 97:e.q.getHours()>=12&&e.q.getHours()<24?Zhb(a,cD(WC(qJ,1),Nve,2,6,['AM','PM'])[1]):Zhb(a,cD(WC(qJ,1),Nve,2,6,['AM','PM'])[0]);break;case 104:l=e.q.getHours()%12;l==0?UA(a,12,c):UA(a,l,c);break;case 75:m=e.q.getHours()%12;UA(a,m,c);break;case 72:n=e.q.getHours();UA(a,n,c);break;case 99:o=d.q.getDay();c==5?Zhb(a,cD(WC(qJ,1),Nve,2,6,['S','M','T','W','T','F','S'])[o]):c==4?Zhb(a,cD(WC(qJ,1),Nve,2,6,[Swe,Twe,Uwe,Vwe,Wwe,Xwe,Ywe])[o]):c==3?Zhb(a,cD(WC(qJ,1),Nve,2,6,['Sun','Mon','Tue','Wed','Thu','Fri','Sat'])[o]):UA(a,o,1);break;case 76:p=d.q.getMonth();c==5?Zhb(a,cD(WC(qJ,1),Nve,2,6,['J','F','M','A','M','J','J','A','S','O','N','D'])[p]):c==4?Zhb(a,cD(WC(qJ,1),Nve,2,6,[Cwe,Dwe,Ewe,Fwe,Gwe,Hwe,Iwe,Jwe,Kwe,Lwe,Mwe,Nwe])[p]):c==3?Zhb(a,cD(WC(qJ,1),Nve,2,6,['Jan','Feb','Mar','Apr',Gwe,'Jun','Jul','Aug','Sep','Oct','Nov','Dec'])[p]):UA(a,p+1,c);break;case 81:q=d.q.getMonth()/3|0;c<4?Zhb(a,cD(WC(qJ,1),Nve,2,6,['Q1','Q2','Q3','Q4'])[q]):Zhb(a,cD(WC(qJ,1),Nve,2,6,['1st quarter','2nd quarter','3rd quarter','4th quarter'])[q]);break;case 100:r=d.q.getDate();UA(a,r,c);break;case 109:j=e.q.getMinutes();UA(a,j,c);break;case 115:g=e.q.getSeconds();UA(a,g,c);break;case 122:c<4?Zhb(a,f.c[0]):Zhb(a,f.c[1]);break;case 118:Zhb(a,f.b);break;case 90:c<3?Zhb(a,cB(f)):c==3?Zhb(a,bB(f)):Zhb(a,eB(f.a));break;default:return false;}return true} -function f5b(a,b,c,d){var e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D,F,G,H;X4b(b);i=RD(QHd((!b.b&&(b.b=new Yie(E4,b,4,7)),b.b),0),84);k=RD(QHd((!b.c&&(b.c=new Yie(E4,b,5,8)),b.c),0),84);h=AGd(i);j=AGd(k);g=(!b.a&&(b.a=new C5d(F4,b,6,6)),b.a).i==0?null:RD(QHd((!b.a&&(b.a=new C5d(F4,b,6,6)),b.a),0),166);A=RD(Wjb(a.a,h),10);F=RD(Wjb(a.a,j),10);B=null;G=null;if(ZD(i,193)){w=RD(Wjb(a.a,i),305);if(ZD(w,12)){B=RD(w,12)}else if(ZD(w,10)){A=RD(w,10);B=RD(Vmb(A.j,0),12)}}if(ZD(k,193)){D=RD(Wjb(a.a,k),305);if(ZD(D,12)){G=RD(D,12)}else if(ZD(D,10)){F=RD(D,10);G=RD(Vmb(F.j,0),12)}}if(!A||!F){throw Adb(new Ked('The source or the target of edge '+b+' could not be found. '+'This usually happens when an edge connects a node laid out by ELK Layered to a node in '+'another level of hierarchy laid out by either another instance of ELK Layered or another '+'layout algorithm alltogether. The former can be solved by setting the hierarchyHandling '+'option to INCLUDE_CHILDREN.'))}p=new a1b;kQb(p,b);pQb(p,(Ywc(),Awc),b);pQb(p,(yCc(),RAc),null);n=RD(mQb(d,kwc),21);A==F&&n.Fc((ovc(),nvc));if(!B){v=(BEc(),zEc);C=null;if(!!g&&Dod(RD(mQb(A,BBc),101))){C=new rjd(g.j,g.k);Fsd(C,kzd(b));Gsd(C,c);if(NGd(j,h)){v=yEc;$id(C,A.n)}}B=g2b(A,C,v,d)}if(!G){v=(BEc(),yEc);H=null;if(!!g&&Dod(RD(mQb(F,BBc),101))){H=new rjd(g.b,g.c);Fsd(H,kzd(b));Gsd(H,c)}G=g2b(F,H,v,Y2b(F))}Y0b(p,B);Z0b(p,G);(B.e.c.length>1||B.g.c.length>1||G.e.c.length>1||G.g.c.length>1)&&n.Fc((ovc(),ivc));for(m=new dMd((!b.n&&(b.n=new C5d(I4,b,1,7)),b.n));m.e!=m.i.gc();){l=RD(bMd(m),135);if(!Heb(TD(Gxd(l,pBc)))&&!!l.a){q=h5b(l);Rmb(p.b,q);switch(RD(mQb(q,wAc),278).g){case 1:case 2:n.Fc((ovc(),gvc));break;case 0:n.Fc((ovc(),evc));pQb(q,wAc,(Omd(),Lmd));}}}f=RD(mQb(d,oAc),322);r=RD(mQb(d,kBc),323);e=f==(stc(),ptc)||r==(JDc(),FDc);if(!!g&&(!g.a&&(g.a=new XZd(D4,g,5)),g.a).i!=0&&e){s=ssd(g);o=new Ejd;for(u=Sub(s,0);u.b!=u.d.c;){t=RD(evb(u),8);Mub(o,new sjd(t))}pQb(p,Bwc,o)}return p} -function F0c(a,b,c,d){var e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D,F,G,H,I;C=0;D=0;A=new Tsb;v=RD(Lvb(JDb(GDb(new SDb(null,new Swb(a.b,16)),new v1c),new Z0c)),17).a+1;B=$C(kE,Pwe,28,v,15,1);q=$C(kE,Pwe,28,v,15,1);for(p=0;p1){for(h=G+1;hj.b.e.b*(1-r)+j.c.e.b*r){break}}if(w.gc()>0){H=j.a.b==0?ajd(j.b.e):RD(Rub(j.a),8);t=$id(ajd(RD(w.Xb(w.gc()-1),40).e),RD(w.Xb(w.gc()-1),40).f);m=$id(ajd(RD(w.Xb(0),40).e),RD(w.Xb(0),40).f);if(o>=w.gc()-1&&H.b>t.b&&j.c.e.b>t.b){continue}if(o<=0&&H.bj.b.e.a*(1-r)+j.c.e.a*r){break}}if(w.gc()>0){H=j.a.b==0?ajd(j.b.e):RD(Rub(j.a),8);t=$id(ajd(RD(w.Xb(w.gc()-1),40).e),RD(w.Xb(w.gc()-1),40).f);m=$id(ajd(RD(w.Xb(0),40).e),RD(w.Xb(0),40).f);if(o>=w.gc()-1&&H.a>t.a&&j.c.e.a>t.a){continue}if(o<=0&&H.a=Kfb(UD(mQb(a,(q$c(),$Zc))))&&++D}else{n.f&&n.d.e.a<=Kfb(UD(mQb(a,(q$c(),ZZc))))&&++C;n.g&&n.c.e.a+n.c.f.a>=Kfb(UD(mQb(a,(q$c(),YZc))))&&++D}}}else if(u==0){H0c(j)}else if(u<0){++B[G];++q[I];F=C0c(j,b,a,new Ptd(sgb(C),sgb(D)),c,d,new Ptd(sgb(q[I]),sgb(B[G])));C=RD(F.a,17).a;D=RD(F.b,17).a}}} -function qrc(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s;d=b;i=c;if(a.b&&d.j==(qpd(),ppd)&&i.j==(qpd(),ppd)){s=d;d=i;i=s}if(Ujb(a.a,d)){if(Zsb(RD(Wjb(a.a,d),49),i)){return 1}}else{Zjb(a.a,d,new _sb)}if(Ujb(a.a,i)){if(Zsb(RD(Wjb(a.a,i),49),d)){return -1}}else{Zjb(a.a,i,new _sb)}if(Ujb(a.d,d)){if(Zsb(RD(Wjb(a.d,d),49),i)){return -1}}else{Zjb(a.d,d,new _sb)}if(Ujb(a.d,i)){if(Zsb(RD(Wjb(a.a,i),49),d)){return 1}}else{Zjb(a.d,i,new _sb)}if(d.j!=i.j){r=yrc(d.j,i.j);r==-1?rrc(a,i,d):rrc(a,d,i);return r}if(d.e.c.length!=0&&i.e.c.length!=0){if(a.b){r=orc(d,i);if(r!=0){r==-1?rrc(a,i,d):r==1&&rrc(a,d,i);return r}}f=RD(Vmb(d.e,0),18).c.i;k=RD(Vmb(i.e,0),18).c.i;if(f==k){e=RD(mQb(RD(Vmb(d.e,0),18),(Ywc(),zwc)),17).a;j=RD(mQb(RD(Vmb(i.e,0),18),zwc),17).a;e>j?rrc(a,d,i):rrc(a,i,d);return ej?1:0}for(o=a.c,p=0,q=o.length;pj?rrc(a,d,i):rrc(a,i,d);return ej?1:0}if(a.b){r=orc(d,i);if(r!=0){r==-1?rrc(a,i,d):r==1&&rrc(a,d,i);return r}}g=0;l=0;nQb(RD(Vmb(d.g,0),18),zwc)&&(g=RD(mQb(RD(Vmb(d.g,0),18),zwc),17).a);nQb(RD(Vmb(i.g,0),18),zwc)&&(l=RD(mQb(RD(Vmb(d.g,0),18),zwc),17).a);if(!!h&&h==m){if(Heb(TD(mQb(RD(Vmb(d.g,0),18),Nwc)))&&!Heb(TD(mQb(RD(Vmb(i.g,0),18),Nwc)))){rrc(a,d,i);return 1}else if(!Heb(TD(mQb(RD(Vmb(d.g,0),18),Nwc)))&&Heb(TD(mQb(RD(Vmb(i.g,0),18),Nwc)))){rrc(a,i,d);return -1}g>l?rrc(a,d,i):rrc(a,i,d);return gl?1:0}if(a.f){a.f._b(h)&&(g=RD(a.f.xc(h),17).a);a.f._b(m)&&(l=RD(a.f.xc(m),17).a)}g>l?rrc(a,d,i):rrc(a,i,d);return gl?1:0}if(d.e.c.length!=0&&i.g.c.length!=0){rrc(a,d,i);return 1}else if(d.g.c.length!=0&&i.e.c.length!=0){rrc(a,i,d);return -1}else if(nQb(d,(Ywc(),zwc))&&nQb(i,zwc)){e=RD(mQb(d,zwc),17).a;j=RD(mQb(i,zwc),17).a;e>j?rrc(a,d,i):rrc(a,i,d);return ej?1:0}else{rrc(a,i,d);return -1}} -function Yae(a){if(a.gb)return;a.gb=true;a.b=jBd(a,0);iBd(a.b,18);oBd(a.b,19);a.a=jBd(a,1);iBd(a.a,1);oBd(a.a,2);oBd(a.a,3);oBd(a.a,4);oBd(a.a,5);a.o=jBd(a,2);iBd(a.o,8);iBd(a.o,9);oBd(a.o,10);oBd(a.o,11);oBd(a.o,12);oBd(a.o,13);oBd(a.o,14);oBd(a.o,15);oBd(a.o,16);oBd(a.o,17);oBd(a.o,18);oBd(a.o,19);oBd(a.o,20);oBd(a.o,21);oBd(a.o,22);oBd(a.o,23);nBd(a.o);nBd(a.o);nBd(a.o);nBd(a.o);nBd(a.o);nBd(a.o);nBd(a.o);nBd(a.o);nBd(a.o);nBd(a.o);a.p=jBd(a,3);iBd(a.p,2);iBd(a.p,3);iBd(a.p,4);iBd(a.p,5);oBd(a.p,6);oBd(a.p,7);nBd(a.p);nBd(a.p);a.q=jBd(a,4);iBd(a.q,8);a.v=jBd(a,5);oBd(a.v,9);nBd(a.v);nBd(a.v);nBd(a.v);a.w=jBd(a,6);iBd(a.w,2);iBd(a.w,3);iBd(a.w,4);oBd(a.w,5);a.B=jBd(a,7);oBd(a.B,1);nBd(a.B);nBd(a.B);nBd(a.B);a.Q=jBd(a,8);oBd(a.Q,0);nBd(a.Q);a.R=jBd(a,9);iBd(a.R,1);a.S=jBd(a,10);nBd(a.S);nBd(a.S);nBd(a.S);nBd(a.S);nBd(a.S);nBd(a.S);nBd(a.S);nBd(a.S);nBd(a.S);nBd(a.S);nBd(a.S);nBd(a.S);nBd(a.S);nBd(a.S);nBd(a.S);a.T=jBd(a,11);oBd(a.T,10);oBd(a.T,11);oBd(a.T,12);oBd(a.T,13);oBd(a.T,14);nBd(a.T);nBd(a.T);a.U=jBd(a,12);iBd(a.U,2);iBd(a.U,3);oBd(a.U,4);oBd(a.U,5);oBd(a.U,6);oBd(a.U,7);nBd(a.U);a.V=jBd(a,13);oBd(a.V,10);a.W=jBd(a,14);iBd(a.W,18);iBd(a.W,19);iBd(a.W,20);oBd(a.W,21);oBd(a.W,22);oBd(a.W,23);a.bb=jBd(a,15);iBd(a.bb,10);iBd(a.bb,11);iBd(a.bb,12);iBd(a.bb,13);iBd(a.bb,14);iBd(a.bb,15);iBd(a.bb,16);oBd(a.bb,17);nBd(a.bb);nBd(a.bb);a.eb=jBd(a,16);iBd(a.eb,2);iBd(a.eb,3);iBd(a.eb,4);iBd(a.eb,5);iBd(a.eb,6);iBd(a.eb,7);oBd(a.eb,8);oBd(a.eb,9);a.ab=jBd(a,17);iBd(a.ab,0);iBd(a.ab,1);a.H=jBd(a,18);oBd(a.H,0);oBd(a.H,1);oBd(a.H,2);oBd(a.H,3);oBd(a.H,4);oBd(a.H,5);nBd(a.H);a.db=jBd(a,19);oBd(a.db,2);a.c=kBd(a,20);a.d=kBd(a,21);a.e=kBd(a,22);a.f=kBd(a,23);a.i=kBd(a,24);a.g=kBd(a,25);a.j=kBd(a,26);a.k=kBd(a,27);a.n=kBd(a,28);a.r=kBd(a,29);a.s=kBd(a,30);a.t=kBd(a,31);a.u=kBd(a,32);a.fb=kBd(a,33);a.A=kBd(a,34);a.C=kBd(a,35);a.D=kBd(a,36);a.F=kBd(a,37);a.G=kBd(a,38);a.I=kBd(a,39);a.J=kBd(a,40);a.L=kBd(a,41);a.M=kBd(a,42);a.N=kBd(a,43);a.O=kBd(a,44);a.P=kBd(a,45);a.X=kBd(a,46);a.Y=kBd(a,47);a.Z=kBd(a,48);a.$=kBd(a,49);a._=kBd(a,50);a.cb=kBd(a,51);a.K=kBd(a,52)} -function d5b(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D,F,G;g=new Yub;w=RD(mQb(c,(yCc(),rAc)),88);p=0;ye(g,(!b.a&&(b.a=new C5d(J4,b,10,11)),b.a));while(g.b!=0){k=RD(g.b==0?null:(sFb(g.b!=0),Wub(g,g.a.a)),27);j=vCd(k);(dE(Gxd(j,cAc))!==dE((kEc(),hEc))||dE(Gxd(j,pAc))===dE((Ptc(),Otc))||dE(Gxd(j,pAc))===dE((Ptc(),Mtc))||Heb(TD(Gxd(j,eAc)))||dE(Gxd(j,Yzc))!==dE((U$b(),T$b))||dE(Gxd(j,ZAc))===dE((aEc(),TDc))||dE(Gxd(j,ZAc))===dE((aEc(),UDc))||dE(Gxd(j,$Ac))===dE((_Cc(),SCc))||dE(Gxd(j,$Ac))===dE((_Cc(),UCc)))&&!Heb(TD(Gxd(k,aAc)))&&Ixd(k,(Ywc(),zwc),sgb(p++));r=!Heb(TD(Gxd(k,pBc)));if(r){m=(!k.a&&(k.a=new C5d(J4,k,10,11)),k.a).i!=0;o=a5b(k);n=dE(Gxd(k,IAc))===dE((Fnd(),Cnd));G=!Hxd(k,(umd(),Akd))||khb(WD(Gxd(k,Akd)));u=null;if(G&&n&&(m||o)){u=Z4b(k);pQb(u,rAc,w);nQb(u,PBc)&&HCc(new RCc(Kfb(UD(mQb(u,PBc)))),u);if(RD(Gxd(k,lBc),181).gc()!=0){l=u;FDb(new SDb(null,(!k.c&&(k.c=new C5d(K4,k,9,9)),new Swb(k.c,16))),new u5b(l));V4b(k,u)}}A=c;B=RD(Wjb(a.a,vCd(k)),10);!!B&&(A=B.e);t=i5b(a,k,A);if(u){t.e=u;u.e=t;ye(g,(!k.a&&(k.a=new C5d(J4,k,10,11)),k.a))}}}p=0;Pub(g,b,g.c.b,g.c);while(g.b!=0){f=RD(g.b==0?null:(sFb(g.b!=0),Wub(g,g.a.a)),27);for(i=new dMd((!f.b&&(f.b=new C5d(G4,f,12,3)),f.b));i.e!=i.i.gc();){h=RD(bMd(i),74);X4b(h);(dE(Gxd(b,cAc))!==dE((kEc(),hEc))||dE(Gxd(b,pAc))===dE((Ptc(),Otc))||dE(Gxd(b,pAc))===dE((Ptc(),Mtc))||Heb(TD(Gxd(b,eAc)))||dE(Gxd(b,Yzc))!==dE((U$b(),T$b))||dE(Gxd(b,ZAc))===dE((aEc(),TDc))||dE(Gxd(b,ZAc))===dE((aEc(),UDc))||dE(Gxd(b,$Ac))===dE((_Cc(),SCc))||dE(Gxd(b,$Ac))===dE((_Cc(),UCc)))&&Ixd(h,(Ywc(),zwc),sgb(p++));D=AGd(RD(QHd((!h.b&&(h.b=new Yie(E4,h,4,7)),h.b),0),84));F=AGd(RD(QHd((!h.c&&(h.c=new Yie(E4,h,5,8)),h.c),0),84));if(Heb(TD(Gxd(h,pBc)))||Heb(TD(Gxd(D,pBc)))||Heb(TD(Gxd(F,pBc)))){continue}q=ozd(h)&&Heb(TD(Gxd(D,NAc)))&&Heb(TD(Gxd(h,OAc)));v=f;q||NGd(F,D)?(v=D):NGd(D,F)&&(v=F);A=c;B=RD(Wjb(a.a,v),10);!!B&&(A=B.e);s=f5b(a,h,v,A);pQb(s,(Ywc(),Zvc),_4b(a,h,b,c))}n=dE(Gxd(f,IAc))===dE((Fnd(),Cnd));if(n){for(e=new dMd((!f.a&&(f.a=new C5d(J4,f,10,11)),f.a));e.e!=e.i.gc();){d=RD(bMd(e),27);G=!Hxd(d,(umd(),Akd))||khb(WD(Gxd(d,Akd)));C=dE(Gxd(d,IAc))===dE(Cnd);G&&C&&(Pub(g,d,g.c.b,g.c),true)}}}} -function Ywc(){Ywc=geb;var a,b;Awc=new jGd(rAe);Zvc=new jGd('coordinateOrigin');Kwc=new jGd('processors');Yvc=new kGd('compoundNode',(Geb(),false));nwc=new kGd('insideConnections',false);Bwc=new jGd('originalBendpoints');Cwc=new jGd('originalDummyNodePosition');Dwc=new jGd('originalLabelEdge');Mwc=new jGd('representedLabels');cwc=new jGd('endLabels');dwc=new jGd('endLabel.origin');swc=new kGd('labelSide',(Pnd(),Ond));ywc=new kGd('maxEdgeThickness',0);Nwc=new kGd('reversed',false);Lwc=new jGd(sAe);vwc=new kGd('longEdgeSource',null);wwc=new kGd('longEdgeTarget',null);uwc=new kGd('longEdgeHasLabelDummies',false);twc=new kGd('longEdgeBeforeLabelDummy',false);bwc=new kGd('edgeConstraint',(huc(),fuc));pwc=new jGd('inLayerLayoutUnit');owc=new kGd('inLayerConstraint',(Gvc(),Evc));qwc=new kGd('inLayerSuccessorConstraint',new bnb);rwc=new kGd('inLayerSuccessorConstraintBetweenNonDummies',false);Iwc=new jGd('portDummy');$vc=new kGd('crossingHint',sgb(0));kwc=new kGd('graphProperties',(b=RD(mfb(iX),9),new Fsb(b,RD(WEb(b,b.length),9),0)));hwc=new kGd('externalPortSide',(qpd(),opd));iwc=new kGd('externalPortSize',new pjd);fwc=new jGd('externalPortReplacedDummies');gwc=new jGd('externalPortReplacedDummy');ewc=new kGd('externalPortConnections',(a=RD(mfb(E3),9),new Fsb(a,RD(WEb(a,a.length),9),0)));Jwc=new kGd(Xye,0);Uvc=new jGd('barycenterAssociates');Xwc=new jGd('TopSideComments');Vvc=new jGd('BottomSideComments');Xvc=new jGd('CommentConnectionPort');mwc=new kGd('inputCollect',false);Gwc=new kGd('outputCollect',false);awc=new kGd('cyclic',false);_vc=new jGd('crossHierarchyMap');Wwc=new jGd('targetOffset');new kGd('splineLabelSize',new pjd);Qwc=new jGd('spacings');Hwc=new kGd('partitionConstraint',false);Wvc=new jGd('breakingPoint.info');Uwc=new jGd('splines.survivingEdge');Twc=new jGd('splines.route.start');Rwc=new jGd('splines.edgeChain');Fwc=new jGd('originalPortConstraints');Pwc=new jGd('selfLoopHolder');Swc=new jGd('splines.nsPortY');zwc=new jGd('modelOrder');xwc=new jGd('longEdgeTargetNode');jwc=new kGd(GBe,false);Owc=new kGd(GBe,false);lwc=new jGd('layerConstraints.hiddenNodes');Ewc=new jGd('layerConstraints.opposidePort');Vwc=new jGd('targetNode.modelOrder')} -function D0c(a,b,c,d){var e,f,g,h,i,j,k,l,m,n,o;for(l=Sub(a.b,0);l.b!=l.d.c;){k=RD(evb(l),40);if(lhb(k.c,IEe)){continue}f=RD(zDb(new SDb(null,new Swb(hWc(k,a),16)),tBb(new ZBb,new XBb,new wCb,cD(WC(QL,1),jwe,108,0,[(xBb(),vBb)]))),15);b==(Cmd(),ymd)||b==zmd?f.jd(new L1c):f.jd(new R1c);o=f.gc();for(e=0;e0){h=RD(Rub(RD(f.Xb(e),65).a),8).a;m=k.e.a+k.f.a/2;i=RD(Rub(RD(f.Xb(e),65).a),8).b;n=k.e.b+k.f.b/2;d>0&&$wnd.Math.abs(i-n)/($wnd.Math.abs(h-m)/40)>50&&(n>i?Oub(RD(f.Xb(e),65).a,new rjd(k.e.a+k.f.a+d/5.3,k.e.b+k.f.b*g-d/2)):Oub(RD(f.Xb(e),65).a,new rjd(k.e.a+k.f.a+d/5.3,k.e.b+k.f.b*g+d/2)))}Oub(RD(f.Xb(e),65).a,new rjd(k.e.a+k.f.a,k.e.b+k.f.b*g))}else if(b==zmd){j=Kfb(UD(mQb(k,(q$c(),f$c))));if(k.e.a-d>j){Oub(RD(f.Xb(e),65).a,new rjd(j-c,k.e.b+k.f.b*g))}else if(RD(f.Xb(e),65).a.b>0){h=RD(Rub(RD(f.Xb(e),65).a),8).a;m=k.e.a+k.f.a/2;i=RD(Rub(RD(f.Xb(e),65).a),8).b;n=k.e.b+k.f.b/2;d>0&&$wnd.Math.abs(i-n)/($wnd.Math.abs(h-m)/40)>50&&(n>i?Oub(RD(f.Xb(e),65).a,new rjd(k.e.a-d/5.3,k.e.b+k.f.b*g-d/2)):Oub(RD(f.Xb(e),65).a,new rjd(k.e.a-d/5.3,k.e.b+k.f.b*g+d/2)))}Oub(RD(f.Xb(e),65).a,new rjd(k.e.a,k.e.b+k.f.b*g))}else if(b==Bmd){j=Kfb(UD(mQb(k,(q$c(),e$c))));if(k.e.b+k.f.b+d0){h=RD(Rub(RD(f.Xb(e),65).a),8).a;m=k.e.a+k.f.a/2;i=RD(Rub(RD(f.Xb(e),65).a),8).b;n=k.e.b+k.f.b/2;d>0&&$wnd.Math.abs(h-m)/($wnd.Math.abs(i-n)/40)>50&&(m>h?Oub(RD(f.Xb(e),65).a,new rjd(k.e.a+k.f.a*g-d/2,k.e.b+d/5.3+k.f.b)):Oub(RD(f.Xb(e),65).a,new rjd(k.e.a+k.f.a*g+d/2,k.e.b+d/5.3+k.f.b)))}Oub(RD(f.Xb(e),65).a,new rjd(k.e.a+k.f.a*g,k.e.b+k.f.b))}else{j=Kfb(UD(mQb(k,(q$c(),f$c))));if(mWc(RD(f.Xb(e),65),a)){Oub(RD(f.Xb(e),65).a,new rjd(k.e.a+k.f.a*g,RD(Rub(RD(f.Xb(e),65).a),8).b))}else if(k.e.b-d>j){Oub(RD(f.Xb(e),65).a,new rjd(k.e.a+k.f.a*g,j-c))}else if(RD(f.Xb(e),65).a.b>0){h=RD(Rub(RD(f.Xb(e),65).a),8).a;m=k.e.a+k.f.a/2;i=RD(Rub(RD(f.Xb(e),65).a),8).b;n=k.e.b+k.f.b/2;d>0&&$wnd.Math.abs(h-m)/($wnd.Math.abs(i-n)/40)>50&&(m>h?Oub(RD(f.Xb(e),65).a,new rjd(k.e.a+k.f.a*g-d/2,k.e.b-d/5.3)):Oub(RD(f.Xb(e),65).a,new rjd(k.e.a+k.f.a*g+d/2,k.e.b-d/5.3)))}Oub(RD(f.Xb(e),65).a,new rjd(k.e.a+k.f.a*g,k.e.b))}}}} -function umd(){umd=geb;var a,b;Akd=new jGd(OGe);Tld=new jGd(PGe);Ckd=(Rjd(),Ljd);Bkd=new lGd(MDe,Ckd);new Xsd;Dkd=new lGd(Dze,null);Ekd=new jGd(QGe);Lkd=(ukd(),ysb(tkd,cD(WC(q3,1),jwe,298,0,[pkd])));Kkd=new lGd(YDe,Lkd);Mkd=new lGd(LDe,(Geb(),false));Okd=(Cmd(),Amd);Nkd=new lGd(PDe,Okd);Tkd=(Ymd(),Xmd);Skd=new lGd(kDe,Tkd);Wkd=new lGd(MGe,false);Ykd=(Fnd(),Dnd);Xkd=new lGd(fDe,Ykd);uld=new A3b(12);tld=new lGd(Eze,uld);ald=new lGd(dAe,false);bld=new lGd(iEe,false);sld=new lGd(gAe,false);Ild=(Bod(),Aod);Hld=new lGd(eAe,Ild);Qld=new jGd(fEe);Rld=new jGd($ze);Sld=new jGd(bAe);Vld=new jGd(cAe);dld=new Ejd;cld=new lGd(ZDe,dld);Jkd=new lGd(aEe,false);Zkd=new lGd(bEe,false);new jGd(RGe);fld=new P2b;eld=new lGd(gEe,fld);rld=new lGd(JDe,false);new Xsd;Uld=new lGd(SGe,1);Ikd=new jGd(TGe);Hkd=new jGd(UGe);mmd=new lGd(mAe,false);new lGd(VGe,true);sgb(0);new lGd(WGe,sgb(100));new lGd(XGe,false);sgb(0);new lGd(YGe,sgb(4000));sgb(0);new lGd(ZGe,sgb(400));new lGd($Ge,false);new lGd(_Ge,false);new lGd(aHe,true);new lGd(bHe,false);Gkd=(Grd(),Frd);Fkd=new lGd(NGe,Gkd);Wld=new lGd(xDe,10);Xld=new lGd(yDe,10);Yld=new lGd(Bze,20);Zld=new lGd(zDe,10);$ld=new lGd(aAe,2);_ld=new lGd(ADe,10);bmd=new lGd(BDe,0);cmd=new lGd(EDe,5);dmd=new lGd(CDe,1);emd=new lGd(DDe,1);fmd=new lGd(_ze,20);gmd=new lGd(FDe,10);jmd=new lGd(GDe,10);amd=new jGd(HDe);imd=new Q2b;hmd=new lGd(hEe,imd);xld=new jGd(eEe);wld=false;vld=new lGd(dEe,wld);hld=new A3b(5);gld=new lGd(QDe,hld);jld=(dod(),b=RD(mfb(A3),9),new Fsb(b,RD(WEb(b,b.length),9),0));ild=new lGd(kAe,jld);Ald=(pod(),mod);zld=new lGd(TDe,Ald);Cld=new jGd(UDe);Dld=new jGd(VDe);Eld=new jGd(WDe);Bld=new jGd(XDe);lld=(a=RD(mfb(H3),9),new Fsb(a,RD(WEb(a,a.length),9),0));kld=new lGd(jAe,lld);qld=xsb((dqd(),Ypd));pld=new lGd(iAe,qld);old=new rjd(0,0);nld=new lGd(CAe,old);mld=new lGd(hAe,false);Rkd=(Omd(),Lmd);Qkd=new lGd($De,Rkd);Pkd=new lGd(fAe,false);new jGd(cHe);sgb(1);new lGd(dHe,null);Fld=new jGd(cEe);Jld=new jGd(_De);Pld=(qpd(),opd);Old=new lGd(KDe,Pld);Gld=new jGd(IDe);Mld=(Pod(),xsb(Nod));Lld=new lGd(lAe,Mld);Kld=new lGd(RDe,false);Nld=new lGd(SDe,true);new Xsd;qmd=new lGd(nAe,1);smd=new lGd(eHe,null);lmd=new lGd(oAe,150);kmd=new lGd(pAe,1.414);nmd=new lGd(qAe,null);omd=new lGd(fHe,1);$kd=new lGd(NDe,false);_kd=new lGd(ODe,false);Ukd=new lGd(Cze,1);Vkd=(ind(),gnd);new lGd(gHe,Vkd);yld=true;rmd=(mqd(),jqd);tmd=jqd;pmd=jqd} -function hcc(){hcc=geb;nbc=new icc('DIRECTION_PREPROCESSOR',0);kbc=new icc('COMMENT_PREPROCESSOR',1);obc=new icc('EDGE_AND_LAYER_CONSTRAINT_EDGE_REVERSER',2);Ebc=new icc('INTERACTIVE_EXTERNAL_PORT_POSITIONER',3);Xbc=new icc('PARTITION_PREPROCESSOR',4);Ibc=new icc('LABEL_DUMMY_INSERTER',5);bcc=new icc('SELF_LOOP_PREPROCESSOR',6);Nbc=new icc('LAYER_CONSTRAINT_PREPROCESSOR',7);Vbc=new icc('PARTITION_MIDPROCESSOR',8);zbc=new icc('HIGH_DEGREE_NODE_LAYER_PROCESSOR',9);Rbc=new icc('NODE_PROMOTION',10);Mbc=new icc('LAYER_CONSTRAINT_POSTPROCESSOR',11);Wbc=new icc('PARTITION_POSTPROCESSOR',12);vbc=new icc('HIERARCHICAL_PORT_CONSTRAINT_PROCESSOR',13);dcc=new icc('SEMI_INTERACTIVE_CROSSMIN_PROCESSOR',14);ebc=new icc('BREAKING_POINT_INSERTER',15);Qbc=new icc('LONG_EDGE_SPLITTER',16);Zbc=new icc('PORT_SIDE_PROCESSOR',17);Fbc=new icc('INVERTED_PORT_PROCESSOR',18);Ybc=new icc('PORT_LIST_SORTER',19);fcc=new icc('SORT_BY_INPUT_ORDER_OF_MODEL',20);Tbc=new icc('NORTH_SOUTH_PORT_PREPROCESSOR',21);fbc=new icc('BREAKING_POINT_PROCESSOR',22);Ubc=new icc(jBe,23);gcc=new icc(kBe,24);_bc=new icc('SELF_LOOP_PORT_RESTORER',25);ecc=new icc('SINGLE_EDGE_GRAPH_WRAPPER',26);Gbc=new icc('IN_LAYER_CONSTRAINT_PROCESSOR',27);sbc=new icc('END_NODE_PORT_LABEL_MANAGEMENT_PROCESSOR',28);Hbc=new icc('LABEL_AND_NODE_SIZE_PROCESSOR',29);Dbc=new icc('INNERMOST_NODE_MARGIN_CALCULATOR',30);ccc=new icc('SELF_LOOP_ROUTER',31);ibc=new icc('COMMENT_NODE_MARGIN_CALCULATOR',32);qbc=new icc('END_LABEL_PREPROCESSOR',33);Kbc=new icc('LABEL_DUMMY_SWITCHER',34);hbc=new icc('CENTER_LABEL_MANAGEMENT_PROCESSOR',35);Lbc=new icc('LABEL_SIDE_SELECTOR',36);Bbc=new icc('HYPEREDGE_DUMMY_MERGER',37);wbc=new icc('HIERARCHICAL_PORT_DUMMY_SIZE_PROCESSOR',38);Obc=new icc('LAYER_SIZE_AND_GRAPH_HEIGHT_CALCULATOR',39);ybc=new icc('HIERARCHICAL_PORT_POSITION_PROCESSOR',40);lbc=new icc('CONSTRAINTS_POSTPROCESSOR',41);jbc=new icc('COMMENT_POSTPROCESSOR',42);Cbc=new icc('HYPERNODE_PROCESSOR',43);xbc=new icc('HIERARCHICAL_PORT_ORTHOGONAL_EDGE_ROUTER',44);Pbc=new icc('LONG_EDGE_JOINER',45);acc=new icc('SELF_LOOP_POSTPROCESSOR',46);gbc=new icc('BREAKING_POINT_REMOVER',47);Sbc=new icc('NORTH_SOUTH_PORT_POSTPROCESSOR',48);Abc=new icc('HORIZONTAL_COMPACTOR',49);Jbc=new icc('LABEL_DUMMY_REMOVER',50);tbc=new icc('FINAL_SPLINE_BENDPOINTS_CALCULATOR',51);rbc=new icc('END_LABEL_SORTER',52);$bc=new icc('REVERSED_EDGE_RESTORER',53);pbc=new icc('END_LABEL_POSTPROCESSOR',54);ubc=new icc('HIERARCHICAL_NODE_RESIZER',55);mbc=new icc('DIRECTION_POSTPROCESSOR',56)} -function Ozc(){Ozc=geb;Uxc=($tc(),Ytc);Txc=new lGd(HBe,Uxc);jyc=new lGd(IBe,(Geb(),false));pyc=(Ovc(),Mvc);oyc=new lGd(JBe,pyc);Hyc=new lGd(KBe,false);Iyc=new lGd(LBe,true);ixc=new lGd(MBe,false);azc=(sEc(),qEc);_yc=new lGd(NBe,azc);sgb(1);izc=new lGd(OBe,sgb(7));jzc=new lGd(PBe,false);kyc=new lGd(QBe,false);Sxc=(Ptc(),Ltc);Rxc=new lGd(RBe,Sxc);Gyc=(_Cc(),ZCc);Fyc=new lGd(SBe,Gyc);wyc=(cxc(),bxc);vyc=new lGd(TBe,wyc);sgb(-1);uyc=new lGd(UBe,null);sgb(-1);xyc=new lGd(VBe,sgb(-1));sgb(-1);yyc=new lGd(WBe,sgb(4));sgb(-1);Ayc=new lGd(XBe,sgb(2));Eyc=(aEc(),$Dc);Dyc=new lGd(YBe,Eyc);sgb(0);Cyc=new lGd(ZBe,sgb(0));syc=new lGd($Be,sgb(lve));Qxc=(stc(),qtc);Pxc=new lGd(_Be,Qxc);yxc=new lGd(aCe,false);Hxc=new lGd(bCe,0.1);Nxc=new lGd(cCe,false);Jxc=new lGd(dCe,null);Kxc=new lGd(eCe,null);sgb(-1);Lxc=new lGd(fCe,null);sgb(-1);Mxc=new lGd(gCe,sgb(-1));sgb(0);zxc=new lGd(hCe,sgb(40));Fxc=(xvc(),wvc);Exc=new lGd(iCe,Fxc);Bxc=uvc;Axc=new lGd(jCe,Bxc);$yc=(JDc(),EDc);Zyc=new lGd(kCe,$yc);Pyc=new jGd(lCe);Kyc=(Cuc(),Auc);Jyc=new lGd(mCe,Kyc);Nyc=(Ouc(),Luc);Myc=new lGd(nCe,Nyc);new Xsd;Syc=new lGd(oCe,0.3);Uyc=new jGd(pCe);Wyc=(wDc(),uDc);Vyc=new lGd(qCe,Wyc);ayc=(KEc(),IEc);_xc=new lGd(rCe,ayc);cyc=(TEc(),SEc);byc=new lGd(sCe,cyc);eyc=(lFc(),kFc);dyc=new lGd(tCe,eyc);gyc=new lGd(uCe,0.2);Zxc=new lGd(vCe,2);ezc=new lGd(wCe,null);gzc=new lGd(xCe,10);fzc=new lGd(yCe,10);hzc=new lGd(zCe,20);sgb(0);bzc=new lGd(ACe,sgb(0));sgb(0);czc=new lGd(BCe,sgb(0));sgb(0);dzc=new lGd(CCe,sgb(0));jxc=new lGd(DCe,false);nxc=($uc(),Yuc);mxc=new lGd(ECe,nxc);lxc=(jtc(),itc);kxc=new lGd(FCe,lxc);myc=new lGd(GCe,false);sgb(0);lyc=new lGd(HCe,sgb(16));sgb(0);nyc=new lGd(ICe,sgb(5));Gzc=(DFc(),BFc);Fzc=new lGd(JCe,Gzc);kzc=new lGd(KCe,10);nzc=new lGd(LCe,1);wzc=(Etc(),Dtc);vzc=new lGd(MCe,wzc);qzc=new jGd(NCe);tzc=sgb(1);sgb(0);szc=new lGd(OCe,tzc);Lzc=(uFc(),rFc);Kzc=new lGd(PCe,Lzc);Hzc=new jGd(QCe);Bzc=new lGd(RCe,true);zzc=new lGd(SCe,2);Dzc=new lGd(TCe,true);Yxc=(tuc(),ruc);Xxc=new lGd(UCe,Yxc);Wxc=(btc(),Zsc);Vxc=new lGd(VCe,Wxc);xxc=(kEc(),hEc);wxc=new lGd(WCe,xxc);vxc=new lGd(XCe,false);uxc=new lGd(YCe,false);pxc=(U$b(),T$b);oxc=new lGd(ZCe,pxc);txc=(lDc(),iDc);sxc=new lGd($Ce,txc);qxc=new lGd(_Ce,0);rxc=new lGd(aDe,0);ryc=Ntc;qyc=ptc;zyc=YCc;Byc=YCc;tyc=TCc;Ixc=(Fnd(),Cnd);Oxc=qtc;Gxc=qtc;Cxc=qtc;Dxc=Cnd;Qyc=HDc;Ryc=EDc;Lyc=EDc;Oyc=EDc;Tyc=GDc;Yyc=HDc;Xyc=HDc;fyc=(Ymd(),Wmd);hyc=Wmd;iyc=kFc;$xc=Vmd;lzc=CFc;mzc=AFc;ozc=CFc;pzc=AFc;xzc=CFc;yzc=AFc;rzc=Ctc;uzc=Dtc;Mzc=CFc;Nzc=AFc;Izc=CFc;Jzc=AFc;Czc=AFc;Azc=AFc;Ezc=AFc} -function iNc(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,$,ab,bb,cb,db,eb,fb,gb,hb,ib,jb,kb,lb;cb=0;for(H=b,K=0,N=H.length;K0&&(a.a[U.p]=cb++)}}hb=0;for(I=c,L=0,O=I.length;L0){U=(sFb(Y.b>0),RD(Y.a.Xb(Y.c=--Y.b),12));X=0;for(h=new Anb(U.e);h.a0){if(U.j==(qpd(),Yod)){a.a[U.p]=hb;++hb}else{a.a[U.p]=hb+P+R;++R}}}hb+=R}W=new Tsb;o=new Iub;for(G=b,J=0,M=G.length;Jj.b&&(j.b=Z)}else if(U.i.c==bb){Zj.c&&(j.c=Z)}}}Wnb(p,0,p.length,null);gb=$C(kE,Pwe,28,p.length,15,1);d=$C(kE,Pwe,28,hb+1,15,1);for(r=0;r0){A%2>0&&(e+=kb[A+1]);A=(A-1)/2|0;++kb[A]}}C=$C(NY,rve,374,p.length*2,0,1);for(u=0;u0&&(ltd(J.f),false)){if(RD(Gxd(r,nmd),280)==jqd){throw Adb(new Jed('Topdown Layout Providers should only be used on parallel nodes.'))}fE(ltd(J.f));null.Um();zyd(r,$wnd.Math.max(r.g,null.Vm),$wnd.Math.max(r.f,null.Vm))}else if(Gxd(r,smd)!=null){h=RD(Gxd(r,smd),347);W=h.Tg(r);zyd(r,$wnd.Math.max(r.g,W.a),$wnd.Math.max(r.f,W.b))}}}O=RD(Gxd(b,tld),107);n=b.g-(O.b+O.c);m=b.f-(O.d+O.a);Z.bh('Available Child Area: ('+n+'|'+m+')');Ixd(b,Dkd,n/m);Ced(b,e,d.eh(M));if(RD(Gxd(b,nmd),280)==lqd){psd(b);zyd(b,O.b+Kfb(UD(Gxd(b,Ikd)))+O.c,O.d+Kfb(UD(Gxd(b,Hkd)))+O.a)}Z.bh('Executed layout algorithm: '+WD(Gxd(b,Akd))+' on node '+b.k);if(RD(Gxd(b,nmd),280)==jqd){if(n<0||m<0){throw Adb(new Jed('The size defined by the parent parallel node is too small for the space provided by the paddings of the child hierarchical node. '+b.k))}Hxd(b,Ikd)||Hxd(b,Hkd)||psd(b);p=Kfb(UD(Gxd(b,Ikd)));o=Kfb(UD(Gxd(b,Hkd)));Z.bh('Desired Child Area: ('+p+'|'+o+')');Q=n/p;R=m/o;P=$wnd.Math.min(Q,$wnd.Math.min(R,Kfb(UD(Gxd(b,omd)))));Ixd(b,qmd,P);Z.bh(b.k+' -- Local Scale Factor (X|Y): ('+Q+'|'+R+')');u=RD(Gxd(b,Kkd),21);f=0;g=0;P'?":lhb(XIe,a)?"'(?<' or '(? toIndex: ',bye=', toIndex: ',cye='Index: ',dye=', Size: ',eye='org.eclipse.elk.alg.common',fye={50:1},gye='org.eclipse.elk.alg.common.compaction',hye='Scanline/EventHandler',iye='org.eclipse.elk.alg.common.compaction.oned',jye='CNode belongs to another CGroup.',kye='ISpacingsHandler/1',lye='The ',mye=' instance has been finished already.',nye='The direction ',oye=' is not supported by the CGraph instance.',pye='OneDimensionalCompactor',qye='OneDimensionalCompactor/lambda$0$Type',rye='Quadruplet',sye='ScanlineConstraintCalculator',tye='ScanlineConstraintCalculator/ConstraintsScanlineHandler',uye='ScanlineConstraintCalculator/ConstraintsScanlineHandler/lambda$0$Type',vye='ScanlineConstraintCalculator/Timestamp',wye='ScanlineConstraintCalculator/lambda$0$Type',xye={178:1,46:1},yye='org.eclipse.elk.alg.common.compaction.options',zye='org.eclipse.elk.core.data',Aye='org.eclipse.elk.polyomino.traversalStrategy',Bye='org.eclipse.elk.polyomino.lowLevelSort',Cye='org.eclipse.elk.polyomino.highLevelSort',Dye='org.eclipse.elk.polyomino.fill',Eye={134:1},Fye='polyomino',Gye='org.eclipse.elk.alg.common.networksimplex',Hye={183:1,3:1,4:1},Iye='org.eclipse.elk.alg.common.nodespacing',Jye='org.eclipse.elk.alg.common.nodespacing.cellsystem',Kye='CENTER',Lye={217:1,336:1},Mye={3:1,4:1,5:1,603:1},Nye='LEFT',Oye='RIGHT',Pye='Vertical alignment cannot be null',Qye='BOTTOM',Rye='org.eclipse.elk.alg.common.nodespacing.internal',Sye='UNDEFINED',Tye=0.01,Uye='org.eclipse.elk.alg.common.nodespacing.internal.algorithm',Vye='LabelPlacer/lambda$0$Type',Wye='LabelPlacer/lambda$1$Type',Xye='portRatioOrPosition',Yye='org.eclipse.elk.alg.common.overlaps',Zye='DOWN',$ye='org.eclipse.elk.alg.common.polyomino',_ye='NORTH',aze='EAST',bze='SOUTH',cze='WEST',dze='org.eclipse.elk.alg.common.polyomino.structures',eze='Direction',fze='Grid is only of size ',gze='. Requested point (',hze=') is out of bounds.',ize=' Given center based coordinates were (',jze='org.eclipse.elk.graph.properties',kze='IPropertyHolder',lze={3:1,96:1,137:1},mze='org.eclipse.elk.alg.common.spore',nze='org.eclipse.elk.alg.common.utils',oze={205:1},pze='org.eclipse.elk.core',qze='Connected Components Compaction',rze='org.eclipse.elk.alg.disco',sze='org.eclipse.elk.alg.disco.graph',tze='org.eclipse.elk.alg.disco.options',uze='CompactionStrategy',vze='org.eclipse.elk.disco.componentCompaction.strategy',wze='org.eclipse.elk.disco.componentCompaction.componentLayoutAlgorithm',xze='org.eclipse.elk.disco.debug.discoGraph',yze='org.eclipse.elk.disco.debug.discoPolys',zze='componentCompaction',Aze='org.eclipse.elk.disco',Bze='org.eclipse.elk.spacing.componentComponent',Cze='org.eclipse.elk.edge.thickness',Dze='org.eclipse.elk.aspectRatio',Eze='org.eclipse.elk.padding',Fze='org.eclipse.elk.alg.disco.transform',Gze=1.5707963267948966,Hze=1.7976931348623157E308,Ize={3:1,4:1,5:1,198:1},Jze={3:1,6:1,4:1,5:1,100:1,115:1},Kze='org.eclipse.elk.alg.force',Lze='ComponentsProcessor',Mze='ComponentsProcessor/1',Nze='ElkGraphImporter/lambda$0$Type',Oze='org.eclipse.elk.alg.force.graph',Pze='Component Layout',Qze='org.eclipse.elk.alg.force.model',Rze='org.eclipse.elk.force.model',Sze='org.eclipse.elk.force.iterations',Tze='org.eclipse.elk.force.repulsivePower',Uze='org.eclipse.elk.force.temperature',Vze=0.001,Wze='org.eclipse.elk.force.repulsion',Xze='org.eclipse.elk.alg.force.options',Yze=1.600000023841858,Zze='org.eclipse.elk.force',$ze='org.eclipse.elk.priority',_ze='org.eclipse.elk.spacing.nodeNode',aAe='org.eclipse.elk.spacing.edgeLabel',bAe='org.eclipse.elk.randomSeed',cAe='org.eclipse.elk.separateConnectedComponents',dAe='org.eclipse.elk.interactive',eAe='org.eclipse.elk.portConstraints',fAe='org.eclipse.elk.edgeLabels.inline',gAe='org.eclipse.elk.omitNodeMicroLayout',hAe='org.eclipse.elk.nodeSize.fixedGraphSize',iAe='org.eclipse.elk.nodeSize.options',jAe='org.eclipse.elk.nodeSize.constraints',kAe='org.eclipse.elk.nodeLabels.placement',lAe='org.eclipse.elk.portLabels.placement',mAe='org.eclipse.elk.topdownLayout',nAe='org.eclipse.elk.topdown.scaleFactor',oAe='org.eclipse.elk.topdown.hierarchicalNodeWidth',pAe='org.eclipse.elk.topdown.hierarchicalNodeAspectRatio',qAe='org.eclipse.elk.topdown.nodeType',rAe='origin',sAe='random',tAe='boundingBox.upLeft',uAe='boundingBox.lowRight',vAe='org.eclipse.elk.stress.fixed',wAe='org.eclipse.elk.stress.desiredEdgeLength',xAe='org.eclipse.elk.stress.dimension',yAe='org.eclipse.elk.stress.epsilon',zAe='org.eclipse.elk.stress.iterationLimit',AAe='org.eclipse.elk.stress',BAe='ELK Stress',CAe='org.eclipse.elk.nodeSize.minimum',DAe='org.eclipse.elk.alg.force.stress',EAe='Layered layout',FAe='org.eclipse.elk.alg.layered',GAe='org.eclipse.elk.alg.layered.compaction.components',HAe='org.eclipse.elk.alg.layered.compaction.oned',IAe='org.eclipse.elk.alg.layered.compaction.oned.algs',JAe='org.eclipse.elk.alg.layered.compaction.recthull',KAe='org.eclipse.elk.alg.layered.components',LAe='NONE',MAe='MODEL_ORDER',NAe={3:1,6:1,4:1,9:1,5:1,126:1},OAe={3:1,6:1,4:1,5:1,150:1,100:1,115:1},PAe='org.eclipse.elk.alg.layered.compound',QAe={47:1},RAe='org.eclipse.elk.alg.layered.graph',SAe=' -> ',TAe='Not supported by LGraph',UAe='Port side is undefined',VAe={3:1,6:1,4:1,5:1,483:1,150:1,100:1,115:1},WAe={3:1,6:1,4:1,5:1,150:1,199:1,210:1,100:1,115:1},XAe={3:1,6:1,4:1,5:1,150:1,2042:1,210:1,100:1,115:1},YAe='([{"\' \t\r\n',ZAe=')]}"\' \t\r\n',$Ae='The given string contains parts that cannot be parsed as numbers.',_Ae='org.eclipse.elk.core.math',aBe={3:1,4:1,140:1,214:1,423:1},bBe={3:1,4:1,107:1,214:1,423:1},cBe='org.eclipse.elk.alg.layered.graph.transform',dBe='ElkGraphImporter',eBe='ElkGraphImporter/lambda$1$Type',fBe='ElkGraphImporter/lambda$2$Type',gBe='ElkGraphImporter/lambda$4$Type',hBe='org.eclipse.elk.alg.layered.intermediate',iBe='Node margin calculation',jBe='ONE_SIDED_GREEDY_SWITCH',kBe='TWO_SIDED_GREEDY_SWITCH',lBe='No implementation is available for the layout processor ',mBe='IntermediateProcessorStrategy',nBe="Node '",oBe='FIRST_SEPARATE',pBe='LAST_SEPARATE',qBe='Odd port side processing',rBe='org.eclipse.elk.alg.layered.intermediate.compaction',sBe='org.eclipse.elk.alg.layered.intermediate.greedyswitch',tBe='org.eclipse.elk.alg.layered.p3order.counting',uBe={230:1},vBe='org.eclipse.elk.alg.layered.intermediate.loops',wBe='org.eclipse.elk.alg.layered.intermediate.loops.ordering',xBe='org.eclipse.elk.alg.layered.intermediate.loops.routing',yBe='org.eclipse.elk.alg.layered.intermediate.preserveorder',zBe='org.eclipse.elk.alg.layered.intermediate.wrapping',ABe='org.eclipse.elk.alg.layered.options',BBe='INTERACTIVE',CBe='GREEDY',DBe='DEPTH_FIRST',EBe='EDGE_LENGTH',FBe='SELF_LOOPS',GBe='firstTryWithInitialOrder',HBe='org.eclipse.elk.layered.directionCongruency',IBe='org.eclipse.elk.layered.feedbackEdges',JBe='org.eclipse.elk.layered.interactiveReferencePoint',KBe='org.eclipse.elk.layered.mergeEdges',LBe='org.eclipse.elk.layered.mergeHierarchyEdges',MBe='org.eclipse.elk.layered.allowNonFlowPortsToSwitchSides',NBe='org.eclipse.elk.layered.portSortingStrategy',OBe='org.eclipse.elk.layered.thoroughness',PBe='org.eclipse.elk.layered.unnecessaryBendpoints',QBe='org.eclipse.elk.layered.generatePositionAndLayerIds',RBe='org.eclipse.elk.layered.cycleBreaking.strategy',SBe='org.eclipse.elk.layered.layering.strategy',TBe='org.eclipse.elk.layered.layering.layerConstraint',UBe='org.eclipse.elk.layered.layering.layerChoiceConstraint',VBe='org.eclipse.elk.layered.layering.layerId',WBe='org.eclipse.elk.layered.layering.minWidth.upperBoundOnWidth',XBe='org.eclipse.elk.layered.layering.minWidth.upperLayerEstimationScalingFactor',YBe='org.eclipse.elk.layered.layering.nodePromotion.strategy',ZBe='org.eclipse.elk.layered.layering.nodePromotion.maxIterations',$Be='org.eclipse.elk.layered.layering.coffmanGraham.layerBound',_Be='org.eclipse.elk.layered.crossingMinimization.strategy',aCe='org.eclipse.elk.layered.crossingMinimization.forceNodeModelOrder',bCe='org.eclipse.elk.layered.crossingMinimization.hierarchicalSweepiness',cCe='org.eclipse.elk.layered.crossingMinimization.semiInteractive',dCe='org.eclipse.elk.layered.crossingMinimization.inLayerPredOf',eCe='org.eclipse.elk.layered.crossingMinimization.inLayerSuccOf',fCe='org.eclipse.elk.layered.crossingMinimization.positionChoiceConstraint',gCe='org.eclipse.elk.layered.crossingMinimization.positionId',hCe='org.eclipse.elk.layered.crossingMinimization.greedySwitch.activationThreshold',iCe='org.eclipse.elk.layered.crossingMinimization.greedySwitch.type',jCe='org.eclipse.elk.layered.crossingMinimization.greedySwitchHierarchical.type',kCe='org.eclipse.elk.layered.nodePlacement.strategy',lCe='org.eclipse.elk.layered.nodePlacement.favorStraightEdges',mCe='org.eclipse.elk.layered.nodePlacement.bk.edgeStraightening',nCe='org.eclipse.elk.layered.nodePlacement.bk.fixedAlignment',oCe='org.eclipse.elk.layered.nodePlacement.linearSegments.deflectionDampening',pCe='org.eclipse.elk.layered.nodePlacement.networkSimplex.nodeFlexibility',qCe='org.eclipse.elk.layered.nodePlacement.networkSimplex.nodeFlexibility.default',rCe='org.eclipse.elk.layered.edgeRouting.selfLoopDistribution',sCe='org.eclipse.elk.layered.edgeRouting.selfLoopOrdering',tCe='org.eclipse.elk.layered.edgeRouting.splines.mode',uCe='org.eclipse.elk.layered.edgeRouting.splines.sloppy.layerSpacingFactor',vCe='org.eclipse.elk.layered.edgeRouting.polyline.slopedEdgeZoneWidth',wCe='org.eclipse.elk.layered.spacing.baseValue',xCe='org.eclipse.elk.layered.spacing.edgeNodeBetweenLayers',yCe='org.eclipse.elk.layered.spacing.edgeEdgeBetweenLayers',zCe='org.eclipse.elk.layered.spacing.nodeNodeBetweenLayers',ACe='org.eclipse.elk.layered.priority.direction',BCe='org.eclipse.elk.layered.priority.shortness',CCe='org.eclipse.elk.layered.priority.straightness',DCe='org.eclipse.elk.layered.compaction.connectedComponents',ECe='org.eclipse.elk.layered.compaction.postCompaction.strategy',FCe='org.eclipse.elk.layered.compaction.postCompaction.constraints',GCe='org.eclipse.elk.layered.highDegreeNodes.treatment',HCe='org.eclipse.elk.layered.highDegreeNodes.threshold',ICe='org.eclipse.elk.layered.highDegreeNodes.treeHeight',JCe='org.eclipse.elk.layered.wrapping.strategy',KCe='org.eclipse.elk.layered.wrapping.additionalEdgeSpacing',LCe='org.eclipse.elk.layered.wrapping.correctionFactor',MCe='org.eclipse.elk.layered.wrapping.cutting.strategy',NCe='org.eclipse.elk.layered.wrapping.cutting.cuts',OCe='org.eclipse.elk.layered.wrapping.cutting.msd.freedom',PCe='org.eclipse.elk.layered.wrapping.validify.strategy',QCe='org.eclipse.elk.layered.wrapping.validify.forbiddenIndices',RCe='org.eclipse.elk.layered.wrapping.multiEdge.improveCuts',SCe='org.eclipse.elk.layered.wrapping.multiEdge.distancePenalty',TCe='org.eclipse.elk.layered.wrapping.multiEdge.improveWrappedEdges',UCe='org.eclipse.elk.layered.edgeLabels.sideSelection',VCe='org.eclipse.elk.layered.edgeLabels.centerLabelPlacementStrategy',WCe='org.eclipse.elk.layered.considerModelOrder.strategy',XCe='org.eclipse.elk.layered.considerModelOrder.portModelOrder',YCe='org.eclipse.elk.layered.considerModelOrder.noModelOrder',ZCe='org.eclipse.elk.layered.considerModelOrder.components',$Ce='org.eclipse.elk.layered.considerModelOrder.longEdgeStrategy',_Ce='org.eclipse.elk.layered.considerModelOrder.crossingCounterNodeInfluence',aDe='org.eclipse.elk.layered.considerModelOrder.crossingCounterPortInfluence',bDe='layering',cDe='layering.minWidth',dDe='layering.nodePromotion',eDe='crossingMinimization',fDe='org.eclipse.elk.hierarchyHandling',gDe='crossingMinimization.greedySwitch',hDe='nodePlacement',iDe='nodePlacement.bk',jDe='edgeRouting',kDe='org.eclipse.elk.edgeRouting',lDe='spacing',mDe='priority',nDe='compaction',oDe='compaction.postCompaction',pDe='Specifies whether and how post-process compaction is applied.',qDe='highDegreeNodes',rDe='wrapping',sDe='wrapping.cutting',tDe='wrapping.validify',uDe='wrapping.multiEdge',vDe='edgeLabels',wDe='considerModelOrder',xDe='org.eclipse.elk.spacing.commentComment',yDe='org.eclipse.elk.spacing.commentNode',zDe='org.eclipse.elk.spacing.edgeEdge',ADe='org.eclipse.elk.spacing.edgeNode',BDe='org.eclipse.elk.spacing.labelLabel',CDe='org.eclipse.elk.spacing.labelPortHorizontal',DDe='org.eclipse.elk.spacing.labelPortVertical',EDe='org.eclipse.elk.spacing.labelNode',FDe='org.eclipse.elk.spacing.nodeSelfLoop',GDe='org.eclipse.elk.spacing.portPort',HDe='org.eclipse.elk.spacing.individual',IDe='org.eclipse.elk.port.borderOffset',JDe='org.eclipse.elk.noLayout',KDe='org.eclipse.elk.port.side',LDe='org.eclipse.elk.debugMode',MDe='org.eclipse.elk.alignment',NDe='org.eclipse.elk.insideSelfLoops.activate',ODe='org.eclipse.elk.insideSelfLoops.yo',PDe='org.eclipse.elk.direction',QDe='org.eclipse.elk.nodeLabels.padding',RDe='org.eclipse.elk.portLabels.nextToPortIfPossible',SDe='org.eclipse.elk.portLabels.treatAsGroup',TDe='org.eclipse.elk.portAlignment.default',UDe='org.eclipse.elk.portAlignment.north',VDe='org.eclipse.elk.portAlignment.south',WDe='org.eclipse.elk.portAlignment.west',XDe='org.eclipse.elk.portAlignment.east',YDe='org.eclipse.elk.contentAlignment',ZDe='org.eclipse.elk.junctionPoints',$De='org.eclipse.elk.edgeLabels.placement',_De='org.eclipse.elk.port.index',aEe='org.eclipse.elk.commentBox',bEe='org.eclipse.elk.hypernode',cEe='org.eclipse.elk.port.anchor',dEe='org.eclipse.elk.partitioning.activate',eEe='org.eclipse.elk.partitioning.partition',fEe='org.eclipse.elk.position',gEe='org.eclipse.elk.margins',hEe='org.eclipse.elk.spacing.portsSurrounding',iEe='org.eclipse.elk.interactiveLayout',jEe='org.eclipse.elk.core.util',kEe={3:1,4:1,5:1,601:1},lEe='NETWORK_SIMPLEX',mEe='SIMPLE',nEe={106:1,47:1},oEe='org.eclipse.elk.alg.layered.p1cycles',pEe='org.eclipse.elk.alg.layered.p2layers',qEe={413:1,230:1},rEe={846:1,3:1,4:1},sEe='org.eclipse.elk.alg.layered.p3order',tEe='org.eclipse.elk.alg.layered.p4nodes',uEe={3:1,4:1,5:1,854:1},vEe=1.0E-5,wEe='org.eclipse.elk.alg.layered.p4nodes.bk',xEe='org.eclipse.elk.alg.layered.p5edges',yEe='org.eclipse.elk.alg.layered.p5edges.orthogonal',zEe='org.eclipse.elk.alg.layered.p5edges.orthogonal.direction',AEe=1.0E-6,BEe='org.eclipse.elk.alg.layered.p5edges.splines',CEe=0.09999999999999998,DEe=1.0E-8,EEe=4.71238898038469,FEe=3.141592653589793,GEe='org.eclipse.elk.alg.mrtree',HEe=0.10000000149011612,IEe='SUPER_ROOT',JEe='org.eclipse.elk.alg.mrtree.graph',KEe=-1.7976931348623157E308,LEe='org.eclipse.elk.alg.mrtree.intermediate',MEe='Processor compute fanout',NEe={3:1,6:1,4:1,5:1,534:1,100:1,115:1},OEe='Set neighbors in level',PEe='org.eclipse.elk.alg.mrtree.options',QEe='DESCENDANTS',REe='org.eclipse.elk.mrtree.compaction',SEe='org.eclipse.elk.mrtree.edgeEndTextureLength',TEe='org.eclipse.elk.mrtree.treeLevel',UEe='org.eclipse.elk.mrtree.positionConstraint',VEe='org.eclipse.elk.mrtree.weighting',WEe='org.eclipse.elk.mrtree.edgeRoutingMode',XEe='org.eclipse.elk.mrtree.searchOrder',YEe='Position Constraint',ZEe='org.eclipse.elk.mrtree',$Ee='org.eclipse.elk.tree',_Ee='Processor arrange level',aFe='org.eclipse.elk.alg.mrtree.p2order',bFe='org.eclipse.elk.alg.mrtree.p4route',cFe='org.eclipse.elk.alg.radial',dFe=6.283185307179586,eFe='Before',fFe=4.9E-324,gFe='After',hFe='org.eclipse.elk.alg.radial.intermediate',iFe='COMPACTION',jFe='org.eclipse.elk.alg.radial.intermediate.compaction',kFe={3:1,4:1,5:1,100:1},lFe='org.eclipse.elk.alg.radial.intermediate.optimization',mFe='No implementation is available for the layout option ',nFe='org.eclipse.elk.alg.radial.options',oFe='org.eclipse.elk.radial.centerOnRoot',pFe='org.eclipse.elk.radial.orderId',qFe='org.eclipse.elk.radial.radius',rFe='org.eclipse.elk.radial.rotate',sFe='org.eclipse.elk.radial.compactor',tFe='org.eclipse.elk.radial.compactionStepSize',uFe='org.eclipse.elk.radial.sorter',vFe='org.eclipse.elk.radial.wedgeCriteria',wFe='org.eclipse.elk.radial.optimizationCriteria',xFe='org.eclipse.elk.radial.rotation.targetAngle',yFe='org.eclipse.elk.radial.rotation.computeAdditionalWedgeSpace',zFe='org.eclipse.elk.radial.rotation.outgoingEdgeAngles',AFe='Compaction',BFe='rotation',CFe='org.eclipse.elk.radial',DFe='org.eclipse.elk.alg.radial.p1position.wedge',EFe='org.eclipse.elk.alg.radial.sorting',FFe=5.497787143782138,GFe=3.9269908169872414,HFe=2.356194490192345,IFe='org.eclipse.elk.alg.rectpacking',JFe='org.eclipse.elk.alg.rectpacking.intermediate',KFe='org.eclipse.elk.alg.rectpacking.options',LFe='org.eclipse.elk.rectpacking.trybox',MFe='org.eclipse.elk.rectpacking.currentPosition',NFe='org.eclipse.elk.rectpacking.desiredPosition',OFe='org.eclipse.elk.rectpacking.inNewRow',PFe='org.eclipse.elk.rectpacking.widthApproximation.strategy',QFe='org.eclipse.elk.rectpacking.widthApproximation.targetWidth',RFe='org.eclipse.elk.rectpacking.widthApproximation.optimizationGoal',SFe='org.eclipse.elk.rectpacking.widthApproximation.lastPlaceShift',TFe='org.eclipse.elk.rectpacking.packing.strategy',UFe='org.eclipse.elk.rectpacking.packing.compaction.rowHeightReevaluation',VFe='org.eclipse.elk.rectpacking.packing.compaction.iterations',WFe='org.eclipse.elk.rectpacking.whiteSpaceElimination.strategy',XFe='widthApproximation',YFe='Compaction Strategy',ZFe='packing.compaction',$Fe='org.eclipse.elk.rectpacking',_Fe='org.eclipse.elk.alg.rectpacking.p1widthapproximation',aGe='org.eclipse.elk.alg.rectpacking.p2packing',bGe='No Compaction',cGe='org.eclipse.elk.alg.rectpacking.p3whitespaceelimination',dGe='org.eclipse.elk.alg.rectpacking.util',eGe='No implementation available for ',fGe='org.eclipse.elk.alg.spore',gGe='org.eclipse.elk.alg.spore.options',hGe='org.eclipse.elk.sporeCompaction',iGe='org.eclipse.elk.underlyingLayoutAlgorithm',jGe='org.eclipse.elk.processingOrder.treeConstruction',kGe='org.eclipse.elk.processingOrder.spanningTreeCostFunction',lGe='org.eclipse.elk.processingOrder.preferredRoot',mGe='org.eclipse.elk.processingOrder.rootSelection',nGe='org.eclipse.elk.structure.structureExtractionStrategy',oGe='org.eclipse.elk.compaction.compactionStrategy',pGe='org.eclipse.elk.compaction.orthogonal',qGe='org.eclipse.elk.overlapRemoval.maxIterations',rGe='org.eclipse.elk.overlapRemoval.runScanline',sGe='processingOrder',tGe='overlapRemoval',uGe='org.eclipse.elk.sporeOverlap',vGe='org.eclipse.elk.alg.spore.p1structure',wGe='org.eclipse.elk.alg.spore.p2processingorder',xGe='org.eclipse.elk.alg.spore.p3execution',yGe='Topdown Layout',zGe='Invalid index: ',AGe='org.eclipse.elk.core.alg',BGe={341:1},CGe={295:1},DGe='Make sure its type is registered with the ',EGe=' utility class.',FGe='true',GGe='false',HGe="Couldn't clone property '",IGe=0.05,JGe='org.eclipse.elk.core.options',KGe=1.2999999523162842,LGe='org.eclipse.elk.box',MGe='org.eclipse.elk.expandNodes',NGe='org.eclipse.elk.box.packingMode',OGe='org.eclipse.elk.algorithm',PGe='org.eclipse.elk.resolvedAlgorithm',QGe='org.eclipse.elk.bendPoints',RGe='org.eclipse.elk.labelManager',SGe='org.eclipse.elk.scaleFactor',TGe='org.eclipse.elk.childAreaWidth',UGe='org.eclipse.elk.childAreaHeight',VGe='org.eclipse.elk.animate',WGe='org.eclipse.elk.animTimeFactor',XGe='org.eclipse.elk.layoutAncestors',YGe='org.eclipse.elk.maxAnimTime',ZGe='org.eclipse.elk.minAnimTime',$Ge='org.eclipse.elk.progressBar',_Ge='org.eclipse.elk.validateGraph',aHe='org.eclipse.elk.validateOptions',bHe='org.eclipse.elk.zoomToFit',cHe='org.eclipse.elk.font.name',dHe='org.eclipse.elk.font.size',eHe='org.eclipse.elk.topdown.sizeApproximator',fHe='org.eclipse.elk.topdown.scaleCap',gHe='org.eclipse.elk.edge.type',hHe='partitioning',iHe='nodeLabels',jHe='portAlignment',kHe='nodeSize',lHe='port',mHe='portLabels',nHe='topdown',oHe='insideSelfLoops',pHe='org.eclipse.elk.fixed',qHe='org.eclipse.elk.random',rHe={3:1,34:1,22:1,347:1},sHe='port must have a parent node to calculate the port side',tHe='The edge needs to have exactly one edge section. Found: ',uHe='org.eclipse.elk.core.util.adapters',vHe='org.eclipse.emf.ecore',wHe='org.eclipse.elk.graph',xHe='EMapPropertyHolder',yHe='ElkBendPoint',zHe='ElkGraphElement',AHe='ElkConnectableShape',BHe='ElkEdge',CHe='ElkEdgeSection',DHe='EModelElement',EHe='ENamedElement',FHe='ElkLabel',GHe='ElkNode',HHe='ElkPort',IHe={94:1,93:1},JHe='org.eclipse.emf.common.notify.impl',KHe="The feature '",LHe="' is not a valid changeable feature",MHe='Expecting null',NHe="' is not a valid feature",OHe='The feature ID',PHe=' is not a valid feature ID',QHe=32768,RHe={110:1,94:1,93:1,58:1,54:1,99:1},SHe='org.eclipse.emf.ecore.impl',THe='org.eclipse.elk.graph.impl',UHe='Recursive containment not allowed for ',VHe="The datatype '",WHe="' is not a valid classifier",XHe="The value '",YHe={195:1,3:1,4:1},ZHe="The class '",$He='http://www.eclipse.org/elk/ElkGraph',_He='property',aIe='value',bIe='source',cIe='properties',dIe='identifier',eIe='height',fIe='width',gIe='parent',hIe='text',iIe='children',jIe='hierarchical',kIe='sources',lIe='targets',mIe='sections',nIe='bendPoints',oIe='outgoingShape',pIe='incomingShape',qIe='outgoingSections',rIe='incomingSections',sIe='org.eclipse.emf.common.util',tIe='Severe implementation error in the Json to ElkGraph importer.',uIe='id',vIe='org.eclipse.elk.graph.json',wIe='Unhandled parameter types: ',xIe='startPoint',yIe="An edge must have at least one source and one target (edge id: '",zIe="').",AIe='Referenced edge section does not exist: ',BIe=" (edge id: '",CIe='target',DIe='sourcePoint',EIe='targetPoint',FIe='group',GIe='name',HIe='connectableShape cannot be null',IIe='edge cannot be null',JIe="Passed edge is not 'simple'.",KIe='org.eclipse.elk.graph.util',LIe="The 'no duplicates' constraint is violated",MIe='targetIndex=',NIe=', size=',OIe='sourceIndex=',PIe={3:1,4:1,20:1,31:1,56:1,16:1,15:1,59:1,70:1,66:1,61:1},QIe={3:1,4:1,20:1,31:1,56:1,16:1,51:1,15:1,59:1,70:1,66:1,61:1,596:1},RIe='logging',SIe='measureExecutionTime',TIe='parser.parse.1',UIe='parser.parse.2',VIe='parser.next.1',WIe='parser.next.2',XIe='parser.next.3',YIe='parser.next.4',ZIe='parser.factor.1',$Ie='parser.factor.2',_Ie='parser.factor.3',aJe='parser.factor.4',bJe='parser.factor.5',cJe='parser.factor.6',dJe='parser.atom.1',eJe='parser.atom.2',fJe='parser.atom.3',gJe='parser.atom.4',hJe='parser.atom.5',iJe='parser.cc.1',jJe='parser.cc.2',kJe='parser.cc.3',lJe='parser.cc.5',mJe='parser.cc.6',nJe='parser.cc.7',oJe='parser.cc.8',pJe='parser.ope.1',qJe='parser.ope.2',rJe='parser.ope.3',sJe='parser.descape.1',tJe='parser.descape.2',uJe='parser.descape.3',vJe='parser.descape.4',wJe='parser.descape.5',xJe='parser.process.1',yJe='parser.quantifier.1',zJe='parser.quantifier.2',AJe='parser.quantifier.3',BJe='parser.quantifier.4',CJe='parser.quantifier.5',DJe='org.eclipse.emf.common.notify',EJe={424:1,686:1},FJe={3:1,4:1,20:1,31:1,56:1,16:1,15:1,70:1,61:1},GJe={378:1,152:1},HJe='index=',IJe={3:1,4:1,5:1,129:1},JJe={3:1,4:1,20:1,31:1,56:1,16:1,15:1,59:1,70:1,61:1},KJe={3:1,6:1,4:1,5:1,198:1},LJe={3:1,4:1,5:1,173:1,379:1},MJe=';/?:@&=+$,',NJe='invalid authority: ',OJe='EAnnotation',PJe='ETypedElement',QJe='EStructuralFeature',RJe='EAttribute',SJe='EClassifier',TJe='EEnumLiteral',UJe='EGenericType',VJe='EOperation',WJe='EParameter',XJe='EReference',YJe='ETypeParameter',ZJe='org.eclipse.emf.ecore.util',$Je={79:1},_Je={3:1,20:1,16:1,15:1,61:1,597:1,79:1,71:1,97:1},aKe='org.eclipse.emf.ecore.util.FeatureMap$Entry',bKe=8192,cKe=2048,dKe='byte',eKe='char',fKe='double',gKe='float',hKe='int',iKe='long',jKe='short',kKe='java.lang.Object',lKe={3:1,4:1,5:1,254:1},mKe={3:1,4:1,5:1,688:1},nKe={3:1,4:1,20:1,31:1,56:1,16:1,15:1,59:1,70:1,66:1,61:1,71:1},oKe={3:1,4:1,20:1,31:1,56:1,16:1,15:1,59:1,70:1,66:1,61:1,79:1,71:1,97:1},pKe='mixed',qKe='http:///org/eclipse/emf/ecore/util/ExtendedMetaData',rKe='kind',sKe={3:1,4:1,5:1,689:1},tKe={3:1,4:1,20:1,31:1,56:1,16:1,15:1,70:1,61:1,79:1,71:1,97:1},uKe={20:1,31:1,56:1,16:1,15:1,61:1,71:1},vKe={51:1,128:1,287:1},wKe={76:1,343:1},xKe="The value of type '",yKe="' must be of type '",zKe=1352,AKe='http://www.eclipse.org/emf/2002/Ecore',BKe=-32768,CKe='constraints',DKe='baseType',EKe='getEStructuralFeature',FKe='getFeatureID',GKe='feature',HKe='getOperationID',IKe='operation',JKe='defaultValue',KKe='eTypeParameters',LKe='isInstance',MKe='getEEnumLiteral',NKe='eContainingClass',OKe={57:1},PKe={3:1,4:1,5:1,124:1},QKe='org.eclipse.emf.ecore.resource',RKe={94:1,93:1,599:1,2034:1},SKe='org.eclipse.emf.ecore.resource.impl',TKe='unspecified',UKe='simple',VKe='attribute',WKe='attributeWildcard',XKe='element',YKe='elementWildcard',ZKe='collapse',$Ke='itemType',_Ke='namespace',aLe='##targetNamespace',bLe='whiteSpace',cLe='wildcards',dLe='http://www.eclipse.org/emf/2003/XMLType',eLe='##any',fLe='uninitialized',gLe='The multiplicity constraint is violated',hLe='org.eclipse.emf.ecore.xml.type',iLe='ProcessingInstruction',jLe='SimpleAnyType',kLe='XMLTypeDocumentRoot',lLe='org.eclipse.emf.ecore.xml.type.impl',mLe='INF',nLe='processing',oLe='ENTITIES_._base',pLe='minLength',qLe='ENTITY',rLe='NCName',sLe='IDREFS_._base',tLe='integer',uLe='token',vLe='pattern',wLe='[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*',xLe='\\i\\c*',yLe='[\\i-[:]][\\c-[:]]*',zLe='nonPositiveInteger',ALe='maxInclusive',BLe='NMTOKEN',CLe='NMTOKENS_._base',DLe='nonNegativeInteger',ELe='minInclusive',FLe='normalizedString',GLe='unsignedByte',HLe='unsignedInt',ILe='18446744073709551615',JLe='unsignedShort',KLe='processingInstruction',LLe='org.eclipse.emf.ecore.xml.type.internal',MLe=1114111,NLe='Internal Error: shorthands: \\u',OLe='xml:isDigit',PLe='xml:isWord',QLe='xml:isSpace',RLe='xml:isNameChar',SLe='xml:isInitialNameChar',TLe='09\u0660\u0669\u06F0\u06F9\u0966\u096F\u09E6\u09EF\u0A66\u0A6F\u0AE6\u0AEF\u0B66\u0B6F\u0BE7\u0BEF\u0C66\u0C6F\u0CE6\u0CEF\u0D66\u0D6F\u0E50\u0E59\u0ED0\u0ED9\u0F20\u0F29',ULe='AZaz\xC0\xD6\xD8\xF6\xF8\u0131\u0134\u013E\u0141\u0148\u014A\u017E\u0180\u01C3\u01CD\u01F0\u01F4\u01F5\u01FA\u0217\u0250\u02A8\u02BB\u02C1\u0386\u0386\u0388\u038A\u038C\u038C\u038E\u03A1\u03A3\u03CE\u03D0\u03D6\u03DA\u03DA\u03DC\u03DC\u03DE\u03DE\u03E0\u03E0\u03E2\u03F3\u0401\u040C\u040E\u044F\u0451\u045C\u045E\u0481\u0490\u04C4\u04C7\u04C8\u04CB\u04CC\u04D0\u04EB\u04EE\u04F5\u04F8\u04F9\u0531\u0556\u0559\u0559\u0561\u0586\u05D0\u05EA\u05F0\u05F2\u0621\u063A\u0641\u064A\u0671\u06B7\u06BA\u06BE\u06C0\u06CE\u06D0\u06D3\u06D5\u06D5\u06E5\u06E6\u0905\u0939\u093D\u093D\u0958\u0961\u0985\u098C\u098F\u0990\u0993\u09A8\u09AA\u09B0\u09B2\u09B2\u09B6\u09B9\u09DC\u09DD\u09DF\u09E1\u09F0\u09F1\u0A05\u0A0A\u0A0F\u0A10\u0A13\u0A28\u0A2A\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59\u0A5C\u0A5E\u0A5E\u0A72\u0A74\u0A85\u0A8B\u0A8D\u0A8D\u0A8F\u0A91\u0A93\u0AA8\u0AAA\u0AB0\u0AB2\u0AB3\u0AB5\u0AB9\u0ABD\u0ABD\u0AE0\u0AE0\u0B05\u0B0C\u0B0F\u0B10\u0B13\u0B28\u0B2A\u0B30\u0B32\u0B33\u0B36\u0B39\u0B3D\u0B3D\u0B5C\u0B5D\u0B5F\u0B61\u0B85\u0B8A\u0B8E\u0B90\u0B92\u0B95\u0B99\u0B9A\u0B9C\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8\u0BAA\u0BAE\u0BB5\u0BB7\u0BB9\u0C05\u0C0C\u0C0E\u0C10\u0C12\u0C28\u0C2A\u0C33\u0C35\u0C39\u0C60\u0C61\u0C85\u0C8C\u0C8E\u0C90\u0C92\u0CA8\u0CAA\u0CB3\u0CB5\u0CB9\u0CDE\u0CDE\u0CE0\u0CE1\u0D05\u0D0C\u0D0E\u0D10\u0D12\u0D28\u0D2A\u0D39\u0D60\u0D61\u0E01\u0E2E\u0E30\u0E30\u0E32\u0E33\u0E40\u0E45\u0E81\u0E82\u0E84\u0E84\u0E87\u0E88\u0E8A\u0E8A\u0E8D\u0E8D\u0E94\u0E97\u0E99\u0E9F\u0EA1\u0EA3\u0EA5\u0EA5\u0EA7\u0EA7\u0EAA\u0EAB\u0EAD\u0EAE\u0EB0\u0EB0\u0EB2\u0EB3\u0EBD\u0EBD\u0EC0\u0EC4\u0F40\u0F47\u0F49\u0F69\u10A0\u10C5\u10D0\u10F6\u1100\u1100\u1102\u1103\u1105\u1107\u1109\u1109\u110B\u110C\u110E\u1112\u113C\u113C\u113E\u113E\u1140\u1140\u114C\u114C\u114E\u114E\u1150\u1150\u1154\u1155\u1159\u1159\u115F\u1161\u1163\u1163\u1165\u1165\u1167\u1167\u1169\u1169\u116D\u116E\u1172\u1173\u1175\u1175\u119E\u119E\u11A8\u11A8\u11AB\u11AB\u11AE\u11AF\u11B7\u11B8\u11BA\u11BA\u11BC\u11C2\u11EB\u11EB\u11F0\u11F0\u11F9\u11F9\u1E00\u1E9B\u1EA0\u1EF9\u1F00\u1F15\u1F18\u1F1D\u1F20\u1F45\u1F48\u1F4D\u1F50\u1F57\u1F59\u1F59\u1F5B\u1F5B\u1F5D\u1F5D\u1F5F\u1F7D\u1F80\u1FB4\u1FB6\u1FBC\u1FBE\u1FBE\u1FC2\u1FC4\u1FC6\u1FCC\u1FD0\u1FD3\u1FD6\u1FDB\u1FE0\u1FEC\u1FF2\u1FF4\u1FF6\u1FFC\u2126\u2126\u212A\u212B\u212E\u212E\u2180\u2182\u3007\u3007\u3021\u3029\u3041\u3094\u30A1\u30FA\u3105\u312C\u4E00\u9FA5\uAC00\uD7A3',VLe='Private Use',WLe='ASSIGNED',XLe='\x00\x7F\x80\xFF\u0100\u017F\u0180\u024F\u0250\u02AF\u02B0\u02FF\u0300\u036F\u0370\u03FF\u0400\u04FF\u0530\u058F\u0590\u05FF\u0600\u06FF\u0700\u074F\u0780\u07BF\u0900\u097F\u0980\u09FF\u0A00\u0A7F\u0A80\u0AFF\u0B00\u0B7F\u0B80\u0BFF\u0C00\u0C7F\u0C80\u0CFF\u0D00\u0D7F\u0D80\u0DFF\u0E00\u0E7F\u0E80\u0EFF\u0F00\u0FFF\u1000\u109F\u10A0\u10FF\u1100\u11FF\u1200\u137F\u13A0\u13FF\u1400\u167F\u1680\u169F\u16A0\u16FF\u1780\u17FF\u1800\u18AF\u1E00\u1EFF\u1F00\u1FFF\u2000\u206F\u2070\u209F\u20A0\u20CF\u20D0\u20FF\u2100\u214F\u2150\u218F\u2190\u21FF\u2200\u22FF\u2300\u23FF\u2400\u243F\u2440\u245F\u2460\u24FF\u2500\u257F\u2580\u259F\u25A0\u25FF\u2600\u26FF\u2700\u27BF\u2800\u28FF\u2E80\u2EFF\u2F00\u2FDF\u2FF0\u2FFF\u3000\u303F\u3040\u309F\u30A0\u30FF\u3100\u312F\u3130\u318F\u3190\u319F\u31A0\u31BF\u3200\u32FF\u3300\u33FF\u3400\u4DB5\u4E00\u9FFF\uA000\uA48F\uA490\uA4CF\uAC00\uD7A3\uE000\uF8FF\uF900\uFAFF\uFB00\uFB4F\uFB50\uFDFF\uFE20\uFE2F\uFE30\uFE4F\uFE50\uFE6F\uFE70\uFEFE\uFEFF\uFEFF\uFF00\uFFEF',YLe='UNASSIGNED',ZLe={3:1,122:1},$Le='org.eclipse.emf.ecore.xml.type.util',_Le={3:1,4:1,5:1,381:1},aMe='org.eclipse.xtext.xbase.lib',bMe='Cannot add elements to a Range',cMe='Cannot set elements in a Range',dMe='Cannot remove elements from a Range',eMe='user.agent';var _,eeb,_db,ydb=-1;$wnd.goog=$wnd.goog||{};$wnd.goog.global=$wnd.goog.global||$wnd;eeb={};feb(1,null,{},nb);_.Fb=function ob(a){return mb(this,a)};_.Gb=function qb(){return this.Rm};_.Hb=function sb(){return kFb(this)};_.Ib=function ub(){var a;return nfb(rb(this))+'@'+(a=tb(this)>>>0,a.toString(16))};_.equals=function(a){return this.Fb(a)};_.hashCode=function(){return this.Hb()};_.toString=function(){return this.Ib()};var ND,OD,PD;feb(297,1,{297:1,2124:1},pfb);_.ve=function qfb(a){var b;b=new pfb;b.i=4;a>1?(b.c=xfb(this,a-1)):(b.c=this);return b};_.we=function wfb(){lfb(this);return this.b};_.xe=function yfb(){return nfb(this)};_.ye=function Afb(){return lfb(this),this.k};_.ze=function Cfb(){return (this.i&4)!=0};_.Ae=function Dfb(){return (this.i&1)!=0};_.Ib=function Gfb(){return ofb(this)};_.i=0;var kfb=1;var jJ=sfb(mve,'Object',1);var UI=sfb(mve,'Class',297);feb(2096,1,nve);var oE=sfb(ove,'Optional',2096);feb(1191,2096,nve,xb);_.Fb=function yb(a){return a===this};_.Hb=function zb(){return 2040732332};_.Ib=function Ab(){return 'Optional.absent()'};_.Jb=function Bb(a){Qb(a);return wb(),vb};var vb;var mE=sfb(ove,'Absent',1191);feb(636,1,{},Gb);var nE=sfb(ove,'Joiner',636);var pE=ufb(ove,'Predicate');feb(589,1,{178:1,589:1,3:1,46:1},Yb);_.Mb=function ac(a){return Xb(this,a)};_.Lb=function Zb(a){return Xb(this,a)};_.Fb=function $b(a){var b;if(ZD(a,589)){b=RD(a,589);return Rt(this.a,b.a)}return false};_.Hb=function _b(){return Cob(this.a)+306654252};_.Ib=function bc(){return Wb(this.a)};var qE=sfb(ove,'Predicates/AndPredicate',589);feb(419,2096,{419:1,3:1},cc);_.Fb=function dc(a){var b;if(ZD(a,419)){b=RD(a,419);return pb(this.a,b.a)}return false};_.Hb=function ec(){return 1502476572+tb(this.a)};_.Ib=function fc(){return uve+this.a+')'};_.Jb=function gc(a){return new cc(Rb(a.Kb(this.a),'the Function passed to Optional.transform() must not return null.'))};var rE=sfb(ove,'Present',419);feb(204,1,wve);_.Nb=function kc(a){Ztb(this,a)};_.Qb=function lc(){jc()};var eI=sfb(xve,'UnmodifiableIterator',204);feb(2076,204,yve);_.Qb=function nc(){jc()};_.Rb=function mc(a){throw Adb(new jib)};_.Wb=function oc(a){throw Adb(new jib)};var fI=sfb(xve,'UnmodifiableListIterator',2076);feb(399,2076,yve);_.Ob=function rc(){return this.c0};_.Pb=function tc(){if(this.c>=this.d){throw Adb(new Dvb)}return this.Xb(this.c++)};_.Tb=function uc(){return this.c};_.Ub=function vc(){if(this.c<=0){throw Adb(new Dvb)}return this.Xb(--this.c)};_.Vb=function wc(){return this.c-1};_.c=0;_.d=0;var sE=sfb(xve,'AbstractIndexedListIterator',399);feb(713,204,wve);_.Ob=function Ac(){return xc(this)};_.Pb=function Bc(){return yc(this)};_.e=1;var tE=sfb(xve,'AbstractIterator',713);feb(2084,1,{229:1});_.Zb=function Hc(){var a;return a=this.f,!a?(this.f=this.ac()):a};_.Fb=function Ic(a){return xw(this,a)};_.Hb=function Jc(){return tb(this.Zb())};_.dc=function Kc(){return this.gc()==0};_.ec=function Lc(){return Ec(this)};_.Ib=function Mc(){return jeb(this.Zb())};var YE=sfb(xve,'AbstractMultimap',2084);feb(742,2084,zve);_.$b=function Xc(){Nc(this)};_._b=function Yc(a){return Oc(this,a)};_.ac=function Zc(){return new ne(this,this.c)};_.ic=function $c(a){return this.hc()};_.bc=function _c(){return new zf(this,this.c)};_.jc=function ad(){return this.mc(this.hc())};_.kc=function bd(){return new Hd(this)};_.lc=function cd(){return ek(this.c.vc().Nc(),new hh,64,this.d)};_.cc=function dd(a){return Qc(this,a)};_.fc=function gd(a){return Sc(this,a)};_.gc=function hd(){return this.d};_.mc=function jd(a){return yob(),new xpb(a)};_.nc=function kd(){return new Dd(this)};_.oc=function ld(){return ek(this.c.Cc().Nc(),new Fd,64,this.d)};_.pc=function md(a,b){return new lg(this,a,b,null)};_.d=0;var TE=sfb(xve,'AbstractMapBasedMultimap',742);feb(1696,742,zve);_.hc=function pd(){return new cnb(this.a)};_.jc=function qd(){return yob(),yob(),vob};_.cc=function sd(a){return RD(Qc(this,a),15)};_.fc=function ud(a){return RD(Sc(this,a),15)};_.Zb=function od(){return nd(this)};_.Fb=function rd(a){return xw(this,a)};_.qc=function td(a){return RD(Qc(this,a),15)};_.rc=function vd(a){return RD(Sc(this,a),15)};_.mc=function wd(a){return Hob(RD(a,15))};_.pc=function xd(a,b){return Vc(this,a,RD(b,15),null)};var uE=sfb(xve,'AbstractListMultimap',1696);feb(748,1,Ave);_.Nb=function zd(a){Ztb(this,a)};_.Ob=function Ad(){return this.c.Ob()||this.e.Ob()};_.Pb=function Bd(){var a;if(!this.e.Ob()){a=RD(this.c.Pb(),44);this.b=a.ld();this.a=RD(a.md(),16);this.e=this.a.Kc()}return this.sc(this.b,this.e.Pb())};_.Qb=function Cd(){this.e.Qb();RD(Hvb(this.a),16).dc()&&this.c.Qb();--this.d.d};var CE=sfb(xve,'AbstractMapBasedMultimap/Itr',748);feb(1129,748,Ave,Dd);_.sc=function Ed(a,b){return b};var vE=sfb(xve,'AbstractMapBasedMultimap/1',1129);feb(1130,1,{},Fd);_.Kb=function Gd(a){return RD(a,16).Nc()};var wE=sfb(xve,'AbstractMapBasedMultimap/1methodref$spliterator$Type',1130);feb(1131,748,Ave,Hd);_.sc=function Id(a,b){return new gp(a,b)};var xE=sfb(xve,'AbstractMapBasedMultimap/2',1131);var VK=ufb(Bve,'Map');feb(2065,1,Cve);_.wc=function Td(a){Bvb(this,a)};_.yc=function $d(a,b,c){return Cvb(this,a,b,c)};_.$b=function Od(){this.vc().$b()};_.tc=function Pd(a){return Jd(this,a)};_._b=function Qd(a){return !!Kd(this,a,false)};_.uc=function Rd(a){var b,c,d;for(c=this.vc().Kc();c.Ob();){b=RD(c.Pb(),44);d=b.md();if(dE(a)===dE(d)||a!=null&&pb(a,d)){return true}}return false};_.Fb=function Sd(a){var b,c,d;if(a===this){return true}if(!ZD(a,85)){return false}d=RD(a,85);if(this.gc()!=d.gc()){return false}for(c=d.vc().Kc();c.Ob();){b=RD(c.Pb(),44);if(!this.tc(b)){return false}}return true};_.xc=function Ud(a){return Wd(Kd(this,a,false))};_.Hb=function Xd(){return Bob(this.vc())};_.dc=function Yd(){return this.gc()==0};_.ec=function Zd(){return new Xkb(this)};_.zc=function _d(a,b){throw Adb(new kib('Put not supported on this map'))};_.Ac=function ae(a){Ld(this,a)};_.Bc=function be(a){return Wd(Kd(this,a,true))};_.gc=function ce(){return this.vc().gc()};_.Ib=function de(){return Md(this)};_.Cc=function ee(){return new glb(this)};var KJ=sfb(Bve,'AbstractMap',2065);feb(2085,2065,Cve);_.bc=function ge(){return new rf(this)};_.vc=function he(){return fe(this)};_.ec=function ie(){var a;a=this.g;return !a?(this.g=this.bc()):a};_.Cc=function je(){var a;a=this.i;return !a?(this.i=new nw(this)):a};var uH=sfb(xve,'Maps/ViewCachingAbstractMap',2085);feb(402,2085,Cve,ne);_.xc=function se(a){return ke(this,a)};_.Bc=function ve(a){return le(this,a)};_.$b=function oe(){this.d==this.e.c?this.e.$b():Ar(new mf(this))};_._b=function pe(a){return Wv(this.d,a)};_.Ec=function qe(){return new df(this)};_.Dc=function(){return this.Ec()};_.Fb=function re(a){return this===a||pb(this.d,a)};_.Hb=function te(){return tb(this.d)};_.ec=function ue(){return this.e.ec()};_.gc=function we(){return this.d.gc()};_.Ib=function xe(){return jeb(this.d)};var BE=sfb(xve,'AbstractMapBasedMultimap/AsMap',402);var cJ=ufb(mve,'Iterable');feb(31,1,Dve);_.Jc=function Le(a){xgb(this,a)};_.Lc=function Ne(){return this.Oc()};_.Nc=function Pe(){return new Swb(this,0)};_.Oc=function Qe(){return new SDb(null,this.Nc())};_.Fc=function Ge(a){throw Adb(new kib('Add not supported on this collection'))};_.Gc=function He(a){return ye(this,a)};_.$b=function Ie(){Ae(this)};_.Hc=function Je(a){return ze(this,a,false)};_.Ic=function Ke(a){return Be(this,a)};_.dc=function Me(){return this.gc()==0};_.Mc=function Oe(a){return ze(this,a,true)};_.Pc=function Re(){return De(this)};_.Qc=function Se(a){return Ee(this,a)};_.Ib=function Te(){return Fe(this)};var vJ=sfb(Bve,'AbstractCollection',31);var bL=ufb(Bve,'Set');feb(Eve,31,Fve);_.Nc=function Ye(){return new Swb(this,1)};_.Fb=function We(a){return Ue(this,a)};_.Hb=function Xe(){return Bob(this)};var RJ=sfb(Bve,'AbstractSet',Eve);feb(2068,Eve,Fve);var UH=sfb(xve,'Sets/ImprovedAbstractSet',2068);feb(2069,2068,Fve);_.$b=function $e(){this.Rc().$b()};_.Hc=function _e(a){return Ze(this,a)};_.dc=function af(){return this.Rc().dc()};_.Mc=function bf(a){var b;if(this.Hc(a)&&ZD(a,44)){b=RD(a,44);return this.Rc().ec().Mc(b.ld())}return false};_.gc=function cf(){return this.Rc().gc()};var nH=sfb(xve,'Maps/EntrySet',2069);feb(1127,2069,Fve,df);_.Hc=function ef(a){return Nk(this.a.d.vc(),a)};_.Kc=function ff(){return new mf(this.a)};_.Rc=function gf(){return this.a};_.Mc=function hf(a){var b;if(!Nk(this.a.d.vc(),a)){return false}b=RD(Hvb(RD(a,44)),44);Tc(this.a.e,b.ld());return true};_.Nc=function jf(){return gk(this.a.d.vc().Nc(),new kf(this.a))};var zE=sfb(xve,'AbstractMapBasedMultimap/AsMap/AsMapEntries',1127);feb(1128,1,{},kf);_.Kb=function lf(a){return me(this.a,RD(a,44))};var yE=sfb(xve,'AbstractMapBasedMultimap/AsMap/AsMapEntries/0methodref$wrapEntry$Type',1128);feb(746,1,Ave,mf);_.Nb=function nf(a){Ztb(this,a)};_.Pb=function pf(){var a;return a=RD(this.b.Pb(),44),this.a=RD(a.md(),16),me(this.c,a)};_.Ob=function of(){return this.b.Ob()};_.Qb=function qf(){Vb(!!this.a);this.b.Qb();this.c.e.d-=this.a.gc();this.a.$b();this.a=null};var AE=sfb(xve,'AbstractMapBasedMultimap/AsMap/AsMapIterator',746);feb(542,2068,Fve,rf);_.$b=function sf(){this.b.$b()};_.Hc=function tf(a){return this.b._b(a)};_.Jc=function uf(a){Qb(a);this.b.wc(new lw(a))};_.dc=function vf(){return this.b.dc()};_.Kc=function wf(){return new aw(this.b.vc().Kc())};_.Mc=function xf(a){if(this.b._b(a)){this.b.Bc(a);return true}return false};_.gc=function yf(){return this.b.gc()};var rH=sfb(xve,'Maps/KeySet',542);feb(327,542,Fve,zf);_.$b=function Af(){var a;Ar((a=this.b.vc().Kc(),new Hf(this,a)))};_.Ic=function Bf(a){return this.b.ec().Ic(a)};_.Fb=function Cf(a){return this===a||pb(this.b.ec(),a)};_.Hb=function Df(){return tb(this.b.ec())};_.Kc=function Ef(){var a;return a=this.b.vc().Kc(),new Hf(this,a)};_.Mc=function Ff(a){var b,c;c=0;b=RD(this.b.Bc(a),16);if(b){c=b.gc();b.$b();this.a.d-=c}return c>0};_.Nc=function Gf(){return this.b.ec().Nc()};var EE=sfb(xve,'AbstractMapBasedMultimap/KeySet',327);feb(747,1,Ave,Hf);_.Nb=function If(a){Ztb(this,a)};_.Ob=function Jf(){return this.c.Ob()};_.Pb=function Kf(){this.a=RD(this.c.Pb(),44);return this.a.ld()};_.Qb=function Lf(){var a;Vb(!!this.a);a=RD(this.a.md(),16);this.c.Qb();this.b.a.d-=a.gc();a.$b();this.a=null};var DE=sfb(xve,'AbstractMapBasedMultimap/KeySet/1',747);feb(503,402,{85:1,133:1},Mf);_.bc=function Nf(){return this.Sc()};_.ec=function Qf(){return this.Uc()};_.Sc=function Of(){return new eg(this.c,this.Wc())};_.Tc=function Pf(){return this.Wc().Tc()};_.Uc=function Rf(){var a;return a=this.b,!a?(this.b=this.Sc()):a};_.Vc=function Sf(){return this.Wc().Vc()};_.Wc=function Tf(){return RD(this.d,133)};var IE=sfb(xve,'AbstractMapBasedMultimap/SortedAsMap',503);feb(446,503,Gve,Uf);_.bc=function Wf(){return new gg(this.a,RD(RD(this.d,133),139))};_.Sc=function Xf(){return new gg(this.a,RD(RD(this.d,133),139))};_.ec=function _f(){var a;return a=this.b,RD(!a?(this.b=new gg(this.a,RD(RD(this.d,133),139))):a,277)};_.Uc=function ag(){var a;return a=this.b,RD(!a?(this.b=new gg(this.a,RD(RD(this.d,133),139))):a,277)};_.Wc=function cg(){return RD(RD(this.d,133),139)};_.Xc=function Vf(a){return RD(RD(this.d,133),139).Xc(a)};_.Yc=function Yf(a){return RD(RD(this.d,133),139).Yc(a)};_.Zc=function Zf(a,b){return new Uf(this.a,RD(RD(this.d,133),139).Zc(a,b))};_.$c=function $f(a){return RD(RD(this.d,133),139).$c(a)};_._c=function bg(a){return RD(RD(this.d,133),139)._c(a)};_.ad=function dg(a,b){return new Uf(this.a,RD(RD(this.d,133),139).ad(a,b))};var FE=sfb(xve,'AbstractMapBasedMultimap/NavigableAsMap',446);feb(502,327,Hve,eg);_.Nc=function fg(){return this.b.ec().Nc()};var JE=sfb(xve,'AbstractMapBasedMultimap/SortedKeySet',502);feb(401,502,Ive,gg);var GE=sfb(xve,'AbstractMapBasedMultimap/NavigableKeySet',401);feb(551,31,Dve,lg);_.Fc=function mg(a){var b,c;ig(this);c=this.d.dc();b=this.d.Fc(a);if(b){++this.f.d;c&&hg(this)}return b};_.Gc=function ng(a){var b,c,d;if(a.dc()){return false}d=(ig(this),this.d.gc());b=this.d.Gc(a);if(b){c=this.d.gc();this.f.d+=c-d;d==0&&hg(this)}return b};_.$b=function og(){var a;a=(ig(this),this.d.gc());if(a==0){return}this.d.$b();this.f.d-=a;jg(this)};_.Hc=function pg(a){ig(this);return this.d.Hc(a)};_.Ic=function qg(a){ig(this);return this.d.Ic(a)};_.Fb=function rg(a){if(a===this){return true}ig(this);return pb(this.d,a)};_.Hb=function sg(){ig(this);return tb(this.d)};_.Kc=function tg(){ig(this);return new Og(this)};_.Mc=function ug(a){var b;ig(this);b=this.d.Mc(a);if(b){--this.f.d;jg(this)}return b};_.gc=function vg(){return kg(this)};_.Nc=function wg(){return ig(this),this.d.Nc()};_.Ib=function xg(){ig(this);return jeb(this.d)};var LE=sfb(xve,'AbstractMapBasedMultimap/WrappedCollection',551);var QK=ufb(Bve,'List');feb(744,551,{20:1,31:1,16:1,15:1},yg);_.jd=function Hg(a){tvb(this,a)};_.Nc=function Ig(){return ig(this),this.d.Nc()};_.bd=function zg(a,b){var c;ig(this);c=this.d.dc();RD(this.d,15).bd(a,b);++this.a.d;c&&hg(this)};_.cd=function Ag(a,b){var c,d,e;if(b.dc()){return false}e=(ig(this),this.d.gc());c=RD(this.d,15).cd(a,b);if(c){d=this.d.gc();this.a.d+=d-e;e==0&&hg(this)}return c};_.Xb=function Bg(a){ig(this);return RD(this.d,15).Xb(a)};_.dd=function Cg(a){ig(this);return RD(this.d,15).dd(a)};_.ed=function Dg(){ig(this);return new Ug(this)};_.fd=function Eg(a){ig(this);return new Vg(this,a)};_.gd=function Fg(a){var b;ig(this);b=RD(this.d,15).gd(a);--this.a.d;jg(this);return b};_.hd=function Gg(a,b){ig(this);return RD(this.d,15).hd(a,b)};_.kd=function Jg(a,b){ig(this);return Vc(this.a,this.e,RD(this.d,15).kd(a,b),!this.b?this:this.b)};var NE=sfb(xve,'AbstractMapBasedMultimap/WrappedList',744);feb(1126,744,{20:1,31:1,16:1,15:1,59:1},Kg);var HE=sfb(xve,'AbstractMapBasedMultimap/RandomAccessWrappedList',1126);feb(628,1,Ave,Og);_.Nb=function Qg(a){Ztb(this,a)};_.Ob=function Rg(){Ng(this);return this.b.Ob()};_.Pb=function Sg(){Ng(this);return this.b.Pb()};_.Qb=function Tg(){Mg(this)};var KE=sfb(xve,'AbstractMapBasedMultimap/WrappedCollection/WrappedIterator',628);feb(745,628,Jve,Ug,Vg);_.Qb=function _g(){Mg(this)};_.Rb=function Wg(a){var b;b=kg(this.a)==0;(Ng(this),RD(this.b,128)).Rb(a);++this.a.a.d;b&&hg(this.a)};_.Sb=function Xg(){return (Ng(this),RD(this.b,128)).Sb()};_.Tb=function Yg(){return (Ng(this),RD(this.b,128)).Tb()};_.Ub=function Zg(){return (Ng(this),RD(this.b,128)).Ub()};_.Vb=function $g(){return (Ng(this),RD(this.b,128)).Vb()};_.Wb=function ah(a){(Ng(this),RD(this.b,128)).Wb(a)};var ME=sfb(xve,'AbstractMapBasedMultimap/WrappedList/WrappedListIterator',745);feb(743,551,Hve,bh);_.Nc=function dh(){return ig(this),this.d.Nc()};var QE=sfb(xve,'AbstractMapBasedMultimap/WrappedSortedSet',743);feb(1125,743,Ive,eh);var OE=sfb(xve,'AbstractMapBasedMultimap/WrappedNavigableSet',1125);feb(1124,551,Fve,fh);_.Nc=function gh(){return ig(this),this.d.Nc()};var PE=sfb(xve,'AbstractMapBasedMultimap/WrappedSet',1124);feb(1133,1,{},hh);_.Kb=function ih(a){return fd(RD(a,44))};var RE=sfb(xve,'AbstractMapBasedMultimap/lambda$1$Type',1133);feb(1132,1,{},jh);_.Kb=function kh(a){return new gp(this.a,a)};var SE=sfb(xve,'AbstractMapBasedMultimap/lambda$2$Type',1132);var UK=ufb(Bve,'Map/Entry');feb(358,1,Kve);_.Fb=function lh(a){var b;if(ZD(a,44)){b=RD(a,44);return Hb(this.ld(),b.ld())&&Hb(this.md(),b.md())}return false};_.Hb=function mh(){var a,b;a=this.ld();b=this.md();return (a==null?0:tb(a))^(b==null?0:tb(b))};_.nd=function nh(a){throw Adb(new jib)};_.Ib=function oh(){return this.ld()+'='+this.md()};var UE=sfb(xve,Lve,358);feb(2086,31,Dve);_.$b=function ph(){this.od().$b()};_.Hc=function qh(a){var b;if(ZD(a,44)){b=RD(a,44);return Cc(this.od(),b.ld(),b.md())}return false};_.Mc=function rh(a){var b;if(ZD(a,44)){b=RD(a,44);return Gc(this.od(),b.ld(),b.md())}return false};_.gc=function sh(){return this.od().d};var yH=sfb(xve,'Multimaps/Entries',2086);feb(749,2086,Dve,th);_.Kc=function uh(){return this.a.kc()};_.od=function vh(){return this.a};_.Nc=function wh(){return this.a.lc()};var VE=sfb(xve,'AbstractMultimap/Entries',749);feb(750,749,Fve,xh);_.Nc=function Ah(){return this.a.lc()};_.Fb=function yh(a){return Rx(this,a)};_.Hb=function zh(){return Sx(this)};var WE=sfb(xve,'AbstractMultimap/EntrySet',750);feb(751,31,Dve,Bh);_.$b=function Ch(){this.a.$b()};_.Hc=function Dh(a){return Dc(this.a,a)};_.Kc=function Eh(){return this.a.nc()};_.gc=function Fh(){return this.a.d};_.Nc=function Gh(){return this.a.oc()};var XE=sfb(xve,'AbstractMultimap/Values',751);feb(2087,31,{849:1,20:1,31:1,16:1});_.Jc=function Oh(a){Qb(a);Ih(this).Jc(new lx(a))};_.Nc=function Sh(){var a;return a=Ih(this).Nc(),ek(a,new sx,64|a.yd()&1296,this.a.d)};_.Fc=function Kh(a){Hh();return true};_.Gc=function Lh(a){return Qb(this),Qb(a),ZD(a,552)?nx(RD(a,849)):!a.dc()&&xr(this,a.Kc())};_.Hc=function Mh(a){var b;return b=RD(Xv(nd(this.a),a),16),(!b?0:b.gc())>0};_.Fb=function Nh(a){return ox(this,a)};_.Hb=function Ph(){return tb(Ih(this))};_.dc=function Qh(){return Ih(this).dc()};_.Mc=function Rh(a){return Rw(this,a,1)>0};_.Ib=function Th(){return jeb(Ih(this))};var $E=sfb(xve,'AbstractMultiset',2087);feb(2089,2068,Fve);_.$b=function Uh(){Nc(this.a.a)};_.Hc=function Vh(a){var b,c;if(ZD(a,504)){c=RD(a,425);if(RD(c.a.md(),16).gc()<=0){return false}b=Qw(this.a,c.a.ld());return b==RD(c.a.md(),16).gc()}return false};_.Mc=function Wh(a){var b,c,d,e;if(ZD(a,504)){c=RD(a,425);b=c.a.ld();d=RD(c.a.md(),16).gc();if(d!=0){e=this.a;return qx(e,b,d)}}return false};var IH=sfb(xve,'Multisets/EntrySet',2089);feb(1139,2089,Fve,Xh);_.Kc=function Yh(){return new _w(fe(nd(this.a.a)).Kc())};_.gc=function Zh(){return nd(this.a.a).gc()};var ZE=sfb(xve,'AbstractMultiset/EntrySet',1139);feb(627,742,zve);_.hc=function ai(){return this.pd()};_.jc=function bi(){return this.qd()};_.cc=function ei(a){return this.rd(a)};_.fc=function gi(a){return this.sd(a)};_.Zb=function _h(){var a;return a=this.f,!a?(this.f=this.ac()):a};_.qd=function ci(){return yob(),yob(),xob};_.Fb=function di(a){return xw(this,a)};_.rd=function fi(a){return RD(Qc(this,a),21)};_.sd=function hi(a){return RD(Sc(this,a),21)};_.mc=function ii(a){return yob(),new Lqb(RD(a,21))};_.pc=function ji(a,b){return new fh(this,a,RD(b,21))};var _E=sfb(xve,'AbstractSetMultimap',627);feb(1723,627,zve);_.hc=function mi(){return new yAb(this.b)};_.pd=function ni(){return new yAb(this.b)};_.jc=function oi(){return Zx(new yAb(this.b))};_.qd=function pi(){return Zx(new yAb(this.b))};_.cc=function qi(a){return RD(RD(Qc(this,a),21),87)};_.rd=function ri(a){return RD(RD(Qc(this,a),21),87)};_.fc=function si(a){return RD(RD(Sc(this,a),21),87)};_.sd=function ti(a){return RD(RD(Sc(this,a),21),87)};_.mc=function ui(a){return ZD(a,277)?Zx(RD(a,277)):(yob(),new jrb(RD(a,87)))};_.Zb=function li(){var a;return a=this.f,!a?(this.f=ZD(this.c,139)?new Uf(this,RD(this.c,139)):ZD(this.c,133)?new Mf(this,RD(this.c,133)):new ne(this,this.c)):a};_.pc=function vi(a,b){return ZD(b,277)?new eh(this,a,RD(b,277)):new bh(this,a,RD(b,87))};var bF=sfb(xve,'AbstractSortedSetMultimap',1723);feb(1724,1723,zve);_.Zb=function xi(){var a;return a=this.f,RD(RD(!a?(this.f=ZD(this.c,139)?new Uf(this,RD(this.c,139)):ZD(this.c,133)?new Mf(this,RD(this.c,133)):new ne(this,this.c)):a,133),139)};_.ec=function zi(){var a;return a=this.i,RD(RD(!a?(this.i=ZD(this.c,139)?new gg(this,RD(this.c,139)):ZD(this.c,133)?new eg(this,RD(this.c,133)):new zf(this,this.c)):a,87),277)};_.bc=function yi(){return ZD(this.c,139)?new gg(this,RD(this.c,139)):ZD(this.c,133)?new eg(this,RD(this.c,133)):new zf(this,this.c)};var aF=sfb(xve,'AbstractSortedKeySortedSetMultimap',1724);feb(2109,1,{2046:1});_.Fb=function Ai(a){return Qy(this,a)};_.Hb=function Bi(){var a;return Bob((a=this.g,!a?(this.g=new Di(this)):a))};_.Ib=function Ci(){var a;return Md((a=this.f,!a?(this.f=new Zj(this)):a))};var eF=sfb(xve,'AbstractTable',2109);feb(679,Eve,Fve,Di);_.$b=function Ei(){Xi()};_.Hc=function Fi(a){var b,c;if(ZD(a,479)){b=RD(a,697);c=RD(Xv(bj(this.a),Qm(b.c.e,b.b)),85);return !!c&&Nk(c.vc(),new gp(Qm(b.c.c,b.a),Ui(b.c,b.b,b.a)))}return false};_.Kc=function Gi(){return Vi(this.a)};_.Mc=function Hi(a){var b,c;if(ZD(a,479)){b=RD(a,697);c=RD(Xv(bj(this.a),Qm(b.c.e,b.b)),85);return !!c&&Ok(c.vc(),new gp(Qm(b.c.c,b.a),Ui(b.c,b.b,b.a)))}return false};_.gc=function Ii(){return dj(this.a)};_.Nc=function Ji(){return Wi(this.a)};var cF=sfb(xve,'AbstractTable/CellSet',679);feb(2025,31,Dve,Ki);_.$b=function Li(){Xi()};_.Hc=function Mi(a){return Yi(this.a,a)};_.Kc=function Ni(){return fj(this.a)};_.gc=function Oi(){return dj(this.a)};_.Nc=function Pi(){return gj(this.a)};var dF=sfb(xve,'AbstractTable/Values',2025);feb(1697,1696,zve);var fF=sfb(xve,'ArrayListMultimapGwtSerializationDependencies',1697);feb(520,1697,zve,Ri,Si);_.hc=function Ti(){return new cnb(this.a)};_.a=0;var gF=sfb(xve,'ArrayListMultimap',520);feb(678,2109,{678:1,2046:1,3:1},hj);var sF=sfb(xve,'ArrayTable',678);feb(2021,399,yve,ij);_.Xb=function jj(a){return new pj(this.a,a)};var hF=sfb(xve,'ArrayTable/1',2021);feb(2022,1,{},kj);_.td=function lj(a){return new pj(this.a,a)};var iF=sfb(xve,'ArrayTable/1methodref$getCell$Type',2022);feb(2110,1,{697:1});_.Fb=function mj(a){var b;if(a===this){return true}if(ZD(a,479)){b=RD(a,697);return Hb(Qm(this.c.e,this.b),Qm(b.c.e,b.b))&&Hb(Qm(this.c.c,this.a),Qm(b.c.c,b.a))&&Hb(Ui(this.c,this.b,this.a),Ui(b.c,b.b,b.a))}return false};_.Hb=function nj(){return Tnb(cD(WC(jJ,1),rve,1,5,[Qm(this.c.e,this.b),Qm(this.c.c,this.a),Ui(this.c,this.b,this.a)]))};_.Ib=function oj(){return '('+Qm(this.c.e,this.b)+','+Qm(this.c.c,this.a)+')='+Ui(this.c,this.b,this.a)};var bI=sfb(xve,'Tables/AbstractCell',2110);feb(479,2110,{479:1,697:1},pj);_.a=0;_.b=0;_.d=0;var jF=sfb(xve,'ArrayTable/2',479);feb(2024,1,{},qj);_.td=function rj(a){return _i(this.a,a)};var kF=sfb(xve,'ArrayTable/2methodref$getValue$Type',2024);feb(2023,399,yve,sj);_.Xb=function tj(a){return _i(this.a,a)};var lF=sfb(xve,'ArrayTable/3',2023);feb(2077,2065,Cve);_.$b=function vj(){Ar(this.kc())};_.vc=function wj(){return new gw(this)};_.lc=function xj(){return new Uwb(this.kc(),this.gc())};var pH=sfb(xve,'Maps/IteratorBasedAbstractMap',2077);feb(842,2077,Cve);_.$b=function Bj(){throw Adb(new jib)};_._b=function Cj(a){return En(this.c,a)};_.kc=function Dj(){return new Rj(this,this.c.b.c.gc())};_.lc=function Ej(){return fk(this.c.b.c.gc(),16,new Lj(this))};_.xc=function Fj(a){var b;b=RD(Fn(this.c,a),17);return !b?null:this.vd(b.a)};_.dc=function Gj(){return this.c.b.c.dc()};_.ec=function Hj(){return hn(this.c)};_.zc=function Ij(a,b){var c;c=RD(Fn(this.c,a),17);if(!c){throw Adb(new agb(this.ud()+' '+a+' not in '+hn(this.c)))}return this.wd(c.a,b)};_.Bc=function Jj(a){throw Adb(new jib)};_.gc=function Kj(){return this.c.b.c.gc()};var pF=sfb(xve,'ArrayTable/ArrayMap',842);feb(2020,1,{},Lj);_.td=function Mj(a){return yj(this.a,a)};var mF=sfb(xve,'ArrayTable/ArrayMap/0methodref$getEntry$Type',2020);feb(2018,358,Kve,Nj);_.ld=function Oj(){return zj(this.a,this.b)};_.md=function Pj(){return this.a.vd(this.b)};_.nd=function Qj(a){return this.a.wd(this.b,a)};_.b=0;var nF=sfb(xve,'ArrayTable/ArrayMap/1',2018);feb(2019,399,yve,Rj);_.Xb=function Sj(a){return yj(this.a,a)};var oF=sfb(xve,'ArrayTable/ArrayMap/2',2019);feb(2017,842,Cve,Tj);_.ud=function Uj(){return 'Column'};_.vd=function Vj(a){return Ui(this.b,this.a,a)};_.wd=function Wj(a,b){return cj(this.b,this.a,a,b)};_.a=0;var rF=sfb(xve,'ArrayTable/Row',2017);feb(843,842,Cve,Zj);_.vd=function _j(a){return new Tj(this.a,a)};_.zc=function ak(a,b){return RD(b,85),Xj()};_.wd=function bk(a,b){return RD(b,85),Yj()};_.ud=function $j(){return 'Row'};var qF=sfb(xve,'ArrayTable/RowMap',843);feb(1157,1,Pve,hk);_.Ad=function lk(a){return (this.a.yd()&-262&a)!=0};_.yd=function ik(){return this.a.yd()&-262};_.zd=function jk(){return this.a.zd()};_.Nb=function kk(a){this.a.Nb(new pk(a,this.b))};_.Bd=function mk(a){return this.a.Bd(new nk(a,this.b))};var yF=sfb(xve,'CollectSpliterators/1',1157);feb(1158,1,Qve,nk);_.Cd=function ok(a){this.a.Cd(this.b.Kb(a))};var tF=sfb(xve,'CollectSpliterators/1/lambda$0$Type',1158);feb(1159,1,Qve,pk);_.Cd=function qk(a){this.a.Cd(this.b.Kb(a))};var uF=sfb(xve,'CollectSpliterators/1/lambda$1$Type',1159);feb(1154,1,Pve,rk);_.Ad=function vk(a){return ((16464|this.b)&a)!=0};_.yd=function sk(){return 16464|this.b};_.zd=function tk(){return this.a.zd()};_.Nb=function uk(a){this.a.Qe(new zk(a,this.c))};_.Bd=function wk(a){return this.a.Re(new xk(a,this.c))};_.b=0;var xF=sfb(xve,'CollectSpliterators/1WithCharacteristics',1154);feb(1155,1,Rve,xk);_.Dd=function yk(a){this.a.Cd(this.b.td(a))};var vF=sfb(xve,'CollectSpliterators/1WithCharacteristics/lambda$0$Type',1155);feb(1156,1,Rve,zk);_.Dd=function Ak(a){this.a.Cd(this.b.td(a))};var wF=sfb(xve,'CollectSpliterators/1WithCharacteristics/lambda$1$Type',1156);feb(1150,1,Pve);_.Ad=function Gk(a){return (this.a&a)!=0};_.yd=function Dk(){return this.a};_.zd=function Ek(){!!this.e&&(this.b=Kgb(this.b,this.e.zd()));return Kgb(this.b,0)};_.Nb=function Fk(a){if(this.e){this.e.Nb(a);this.e=null}this.c.Nb(new Kk(this,a));this.b=0};_.Bd=function Hk(a){while(true){if(!!this.e&&this.e.Bd(a)){Pdb(this.b,Sve)&&(this.b=Vdb(this.b,1));return true}else{this.e=null}if(!this.c.Bd(new Ik(this))){return false}}};_.a=0;_.b=0;var CF=sfb(xve,'CollectSpliterators/FlatMapSpliterator',1150);feb(1152,1,Qve,Ik);_.Cd=function Jk(a){Bk(this.a,a)};var zF=sfb(xve,'CollectSpliterators/FlatMapSpliterator/lambda$0$Type',1152);feb(1153,1,Qve,Kk);_.Cd=function Lk(a){Ck(this.a,this.b,a)};var AF=sfb(xve,'CollectSpliterators/FlatMapSpliterator/lambda$1$Type',1153);feb(1151,1150,Pve,Mk);var BF=sfb(xve,'CollectSpliterators/FlatMapSpliteratorOfObject',1151);feb(253,1,Tve);_.Fd=function Sk(a){return this.Ed(RD(a,253))};_.Ed=function Rk(a){var b;if(a==(kl(),jl)){return 1}if(a==(Wk(),Vk)){return -1}b=(ux(),Leb(this.a,a.a));if(b!=0){return b}return ZD(this,526)==ZD(a,526)?0:ZD(this,526)?1:-1};_.Id=function Tk(){return this.a};_.Fb=function Uk(a){return Pk(this,a)};var HF=sfb(xve,'Cut',253);feb(1823,253,Tve,Xk);_.Ed=function Yk(a){return a==this?0:1};_.Gd=function Zk(a){throw Adb(new Ceb)};_.Hd=function $k(a){a.a+='+\u221E)'};_.Id=function _k(){throw Adb(new dgb(Uve))};_.Hb=function al(){return gib(),jFb(this)};_.Jd=function bl(a){return false};_.Ib=function cl(){return '+\u221E'};var Vk;var DF=sfb(xve,'Cut/AboveAll',1823);feb(526,253,{253:1,526:1,3:1,34:1},dl);_.Gd=function el(a){Yhb((a.a+='(',a),this.a)};_.Hd=function fl(a){Thb(Yhb(a,this.a),93)};_.Hb=function gl(){return ~tb(this.a)};_.Jd=function hl(a){return ux(),Leb(this.a,a)<0};_.Ib=function il(){return '/'+this.a+'\\'};var EF=sfb(xve,'Cut/AboveValue',526);feb(1822,253,Tve,ll);_.Ed=function ml(a){return a==this?0:-1};_.Gd=function nl(a){a.a+='(-\u221E'};_.Hd=function ol(a){throw Adb(new Ceb)};_.Id=function pl(){throw Adb(new dgb(Uve))};_.Hb=function ql(){return gib(),jFb(this)};_.Jd=function rl(a){return true};_.Ib=function sl(){return '-\u221E'};var jl;var FF=sfb(xve,'Cut/BelowAll',1822);feb(1824,253,Tve,tl);_.Gd=function ul(a){Yhb((a.a+='[',a),this.a)};_.Hd=function vl(a){Thb(Yhb(a,this.a),41)};_.Hb=function wl(){return tb(this.a)};_.Jd=function xl(a){return ux(),Leb(this.a,a)<=0};_.Ib=function yl(){return '\\'+this.a+'/'};var GF=sfb(xve,'Cut/BelowValue',1824);feb(547,1,Vve);_.Jc=function Bl(a){xgb(this,a)};_.Ib=function Cl(){return Lr(RD(Rb(this,'use Optional.orNull() instead of Optional.or(null)'),20).Kc())};var LF=sfb(xve,'FluentIterable',547);feb(442,547,Vve,Dl);_.Kc=function El(){return new is(Mr(this.a.Kc(),new ir))};var IF=sfb(xve,'FluentIterable/2',442);feb(1059,547,Vve,Gl);_.Kc=function Hl(){return Fl(this)};var KF=sfb(xve,'FluentIterable/3',1059);feb(724,399,yve,Il);_.Xb=function Jl(a){return this.a[a].Kc()};var JF=sfb(xve,'FluentIterable/3/1',724);feb(2070,1,{});_.Ib=function Kl(){return jeb(this.Kd().b)};var SF=sfb(xve,'ForwardingObject',2070);feb(2071,2070,Wve);_.Kd=function Ql(){return this.Ld()};_.Jc=function Rl(a){xgb(this,a)};_.Lc=function Ul(){return this.Oc()};_.Nc=function Xl(){return new Swb(this,0)};_.Oc=function Yl(){return new SDb(null,this.Nc())};_.Fc=function Ll(a){return this.Ld(),qpb()};_.Gc=function Ml(a){return this.Ld(),rpb()};_.$b=function Nl(){this.Ld(),spb()};_.Hc=function Ol(a){return this.Ld().Hc(a)};_.Ic=function Pl(a){return this.Ld().Ic(a)};_.dc=function Sl(){return this.Ld().b.dc()};_.Kc=function Tl(){return this.Ld().Kc()};_.Mc=function Vl(a){return this.Ld(),vpb()};_.gc=function Wl(){return this.Ld().b.gc()};_.Pc=function Zl(){return this.Ld().Pc()};_.Qc=function $l(a){return this.Ld().Qc(a)};var MF=sfb(xve,'ForwardingCollection',2071);feb(2078,31,Xve);_.Kc=function gm(){return this.Od()};_.Fc=function am(a){throw Adb(new jib)};_.Gc=function bm(a){throw Adb(new jib)};_.Md=function cm(){var a;a=this.c;return !a?(this.c=this.Nd()):a};_.$b=function dm(){throw Adb(new jib)};_.Hc=function em(a){return a!=null&&ze(this,a,false)};_.Nd=function fm(){switch(this.gc()){case 0:return tm(),tm(),sm;case 1:return tm(),new Dy(Qb(this.Od().Pb()));default:return new Fx(this,this.Pc());}};_.Mc=function hm(a){throw Adb(new jib)};var lG=sfb(xve,'ImmutableCollection',2078);feb(727,2078,Xve,im);_.Kc=function nm(){return Nr(this.a.Kc())};_.Hc=function jm(a){return a!=null&&this.a.Hc(a)};_.Ic=function km(a){return this.a.Ic(a)};_.dc=function lm(){return this.a.dc()};_.Od=function mm(){return Nr(this.a.Kc())};_.gc=function om(){return this.a.gc()};_.Pc=function pm(){return this.a.Pc()};_.Qc=function qm(a){return this.a.Qc(a)};_.Ib=function rm(){return jeb(this.a)};var NF=sfb(xve,'ForwardingImmutableCollection',727);feb(307,2078,Yve);_.Kc=function Em(){return this.Od()};_.ed=function Fm(){return this.Pd(0)};_.fd=function Hm(a){return this.Pd(a)};_.jd=function Lm(a){tvb(this,a)};_.Nc=function Mm(){return new Swb(this,16)};_.kd=function Om(a,b){return this.Qd(a,b)};_.bd=function wm(a,b){throw Adb(new jib)};_.cd=function xm(a,b){throw Adb(new jib)};_.Md=function ym(){return this};_.Fb=function Am(a){return $u(this,a)};_.Hb=function Bm(){return _u(this)};_.dd=function Cm(a){return a==null?-1:av(this,a)};_.Od=function Dm(){return this.Pd(0)};_.Pd=function Gm(a){return um(this,a)};_.gd=function Jm(a){throw Adb(new jib)};_.hd=function Km(a,b){throw Adb(new jib)};_.Qd=function Nm(a,b){var c;return Pm((c=new pv(this),new Rkb(c,a,b)))};var sm;var qG=sfb(xve,'ImmutableList',307);feb(2105,307,Yve);_.Kc=function Zm(){return Nr(this.Rd().Kc())};_.kd=function an(a,b){return Pm(this.Rd().kd(a,b))};_.Hc=function Rm(a){return a!=null&&this.Rd().Hc(a)};_.Ic=function Sm(a){return this.Rd().Ic(a)};_.Fb=function Tm(a){return pb(this.Rd(),a)};_.Xb=function Um(a){return Qm(this,a)};_.Hb=function Vm(){return tb(this.Rd())};_.dd=function Wm(a){return this.Rd().dd(a)};_.dc=function Xm(){return this.Rd().dc()};_.Od=function Ym(){return Nr(this.Rd().Kc())};_.gc=function $m(){return this.Rd().gc()};_.Qd=function _m(a,b){return Pm(this.Rd().kd(a,b))};_.Pc=function bn(){return this.Rd().Qc($C(jJ,rve,1,this.Rd().gc(),5,1))};_.Qc=function cn(a){return this.Rd().Qc(a)};_.Ib=function dn(){return jeb(this.Rd())};var OF=sfb(xve,'ForwardingImmutableList',2105);feb(729,1,$ve);_.vc=function pn(){return gn(this)};_.wc=function rn(a){Bvb(this,a)};_.ec=function vn(){return hn(this)};_.yc=function wn(a,b,c){return Cvb(this,a,b,c)};_.Cc=function Dn(){return this.Vd()};_.$b=function kn(){throw Adb(new jib)};_._b=function ln(a){return this.xc(a)!=null};_.uc=function mn(a){return this.Vd().Hc(a)};_.Td=function nn(){return new xq(this)};_.Ud=function on(){return new Gq(this)};_.Fb=function qn(a){return Tv(this,a)};_.Hb=function tn(){return gn(this).Hb()};_.dc=function un(){return this.gc()==0};_.zc=function zn(a,b){return jn()};_.Bc=function An(a){throw Adb(new jib)};_.Ib=function Bn(){return Zv(this)};_.Vd=function Cn(){if(this.e){return this.e}return this.e=this.Ud()};_.c=null;_.d=null;_.e=null;var en;var AG=sfb(xve,'ImmutableMap',729);feb(730,729,$ve);_._b=function Hn(a){return En(this,a)};_.uc=function In(a){return pqb(this.b,a)};_.Sd=function Jn(){return go(new Xn(this))};_.Td=function Kn(){return go(sqb(this.b))};_.Ud=function Ln(){return _l(),new im(tqb(this.b))};_.Fb=function Mn(a){return rqb(this.b,a)};_.xc=function Nn(a){return Fn(this,a)};_.Hb=function On(){return tb(this.b.c)};_.dc=function Pn(){return this.b.c.dc()};_.gc=function Qn(){return this.b.c.gc()};_.Ib=function Rn(){return jeb(this.b.c)};var QF=sfb(xve,'ForwardingImmutableMap',730);feb(2072,2071,_ve);_.Kd=function Sn(){return this.Wd()};_.Ld=function Tn(){return this.Wd()};_.Nc=function Wn(){return new Swb(this,1)};_.Fb=function Un(a){return a===this||this.Wd().Fb(a)};_.Hb=function Vn(){return this.Wd().Hb()};var TF=sfb(xve,'ForwardingSet',2072);feb(1085,2072,_ve,Xn);_.Kd=function Zn(){return qqb(this.a.b)};_.Ld=function $n(){return qqb(this.a.b)};_.Hc=function Yn(b){if(ZD(b,44)&&RD(b,44).ld()==null){return false}try{return Pqb(qqb(this.a.b),b)}catch(a){a=zdb(a);if(ZD(a,212)){return false}else throw Adb(a)}};_.Wd=function _n(){return qqb(this.a.b)};_.Qc=function ao(a){var b;b=Qqb(qqb(this.a.b),a);qqb(this.a.b).b.gc()=0?'+':'')+(c/60|0);b=AB($wnd.Math.abs(c)%60);return (Mrb(),Krb)[this.q.getDay()]+' '+Lrb[this.q.getMonth()]+' '+AB(this.q.getDate())+' '+AB(this.q.getHours())+':'+AB(this.q.getMinutes())+':'+AB(this.q.getSeconds())+' GMT'+a+b+' '+this.q.getFullYear()};var qK=sfb(Bve,'Date',206);feb(2015,206,bxe,DB);_.a=false;_.b=0;_.c=0;_.d=0;_.e=0;_.f=0;_.g=false;_.i=0;_.j=0;_.k=0;_.n=0;_.o=0;_.p=0;var xI=sfb('com.google.gwt.i18n.shared.impl','DateRecord',2015);feb(2064,1,{});_.pe=function EB(){return null};_.qe=function FB(){return null};_.re=function GB(){return null};_.se=function HB(){return null};_.te=function IB(){return null};var GI=sfb(cxe,'JSONValue',2064);feb(221,2064,{221:1},MB,NB);_.Fb=function OB(a){if(!ZD(a,221)){return false}return Hz(this.a,RD(a,221).a)};_.oe=function PB(){return TB};_.Hb=function QB(){return Iz(this.a)};_.pe=function RB(){return this};_.Ib=function SB(){var a,b,c;c=new dib('[');for(b=0,a=this.a.length;b0&&(c.a+=',',c);Yhb(c,JB(this,b))}c.a+=']';return c.a};var yI=sfb(cxe,'JSONArray',221);feb(493,2064,{493:1},XB);_.oe=function YB(){return _B};_.qe=function ZB(){return this};_.Ib=function $B(){return Geb(),''+this.a};_.a=false;var UB,VB;var zI=sfb(cxe,'JSONBoolean',493);feb(997,63,swe,aC);var AI=sfb(cxe,'JSONException',997);feb(1036,2064,{},dC);_.oe=function eC(){return gC};_.Ib=function fC(){return vve};var bC;var BI=sfb(cxe,'JSONNull',1036);feb(263,2064,{263:1},hC);_.Fb=function iC(a){if(!ZD(a,263)){return false}return this.a==RD(a,263).a};_.oe=function jC(){return nC};_.Hb=function kC(){return Nfb(this.a)};_.re=function lC(){return this};_.Ib=function mC(){return this.a+''};_.a=0;var CI=sfb(cxe,'JSONNumber',263);feb(190,2064,{190:1},uC,vC);_.Fb=function wC(a){if(!ZD(a,190)){return false}return Hz(this.a,RD(a,190).a)};_.oe=function xC(){return BC};_.Hb=function yC(){return Iz(this.a)};_.se=function zC(){return this};_.Ib=function AC(){var a,b,c,d,e,f,g;g=new dib('{');a=true;f=oC(this,$C(qJ,Nve,2,0,6,1));for(c=f,d=0,e=c.length;d=0?':'+this.c:'')+')'};_.c=0;var mJ=sfb(mve,'StackTraceElement',319);PD={3:1,484:1,34:1,2:1};var qJ=sfb(mve,uwe,2);feb(111,427,{484:1},Qhb,Rhb,Shb);var nJ=sfb(mve,'StringBuffer',111);feb(104,427,{484:1},bib,cib,dib);var oJ=sfb(mve,'StringBuilder',104);feb(702,77,lxe,eib);var pJ=sfb(mve,'StringIndexOutOfBoundsException',702);feb(2145,1,{});var fib;feb(48,63,{3:1,103:1,63:1,82:1,48:1},jib,kib);var sJ=sfb(mve,'UnsupportedOperationException',48);feb(247,242,{3:1,34:1,242:1,247:1},Aib,Bib);_.Fd=function Eib(a){return uib(this,RD(a,247))};_.ue=function Fib(){return Neb(zib(this))};_.Fb=function Gib(a){var b;if(this===a){return true}if(ZD(a,247)){b=RD(a,247);return this.e==b.e&&uib(this,b)==0}return false};_.Hb=function Hib(){var a;if(this.b!=0){return this.b}if(this.a<54){a=Hdb(this.f);this.b=Ydb(Cdb(a,-1));this.b=33*this.b+Ydb(Cdb(Tdb(a,32),-1));this.b=17*this.b+eE(this.e);return this.b}this.b=17*Vib(this.c)+eE(this.e);return this.b};_.Ib=function Iib(){return zib(this)};_.a=0;_.b=0;_.d=0;_.e=0;_.f=0;var lib,mib,nib,oib,pib,qib,rib,sib;var tJ=sfb('java.math','BigDecimal',247);feb(92,242,{3:1,34:1,242:1,92:1},ajb,bjb,cjb,djb,ejb);_.Fd=function gjb(a){return Qib(this,RD(a,92))};_.ue=function hjb(){return Neb(Ajb(this,0))};_.Fb=function ijb(a){return Sib(this,a)};_.Hb=function ljb(){return Vib(this)};_.Ib=function njb(){return Ajb(this,0)};_.b=-2;_.c=0;_.d=0;_.e=0;var Jib,Kib,Lib,Mib,Nib,Oib;var uJ=sfb('java.math','BigInteger',92);var vjb,wjb;var Jjb,Kjb;feb(498,2065,Cve);_.$b=function dkb(){akb(this)};_._b=function ekb(a){return Ujb(this,a)};_.uc=function fkb(a){return Vjb(this,a,this.i)||Vjb(this,a,this.f)};_.vc=function gkb(){return new mkb(this)};_.xc=function hkb(a){return Wjb(this,a)};_.zc=function ikb(a,b){return Zjb(this,a,b)};_.Bc=function jkb(a){return _jb(this,a)};_.gc=function kkb(){return bkb(this)};_.g=0;var yJ=sfb(Bve,'AbstractHashMap',498);feb(267,Eve,Fve,mkb);_.$b=function nkb(){this.a.$b()};_.Hc=function okb(a){return lkb(this,a)};_.Kc=function pkb(){return new vkb(this.a)};_.Mc=function qkb(a){var b;if(lkb(this,a)){b=RD(a,44).ld();this.a.Bc(b);return true}return false};_.gc=function rkb(){return this.a.gc()};var xJ=sfb(Bve,'AbstractHashMap/EntrySet',267);feb(268,1,Ave,vkb);_.Nb=function wkb(a){Ztb(this,a)};_.Pb=function ykb(){return tkb(this)};_.Ob=function xkb(){return this.b};_.Qb=function zkb(){ukb(this)};_.b=false;_.d=0;var wJ=sfb(Bve,'AbstractHashMap/EntrySetIterator',268);feb(426,1,Ave,Dkb);_.Nb=function Ekb(a){Ztb(this,a)};_.Ob=function Fkb(){return Akb(this)};_.Pb=function Gkb(){return Bkb(this)};_.Qb=function Hkb(){Ckb(this)};_.b=0;_.c=-1;var zJ=sfb(Bve,'AbstractList/IteratorImpl',426);feb(98,426,Jve,Jkb);_.Qb=function Pkb(){Ckb(this)};_.Rb=function Kkb(a){Ikb(this,a)};_.Sb=function Lkb(){return this.b>0};_.Tb=function Mkb(){return this.b};_.Ub=function Nkb(){return sFb(this.b>0),this.a.Xb(this.c=--this.b)};_.Vb=function Okb(){return this.b-1};_.Wb=function Qkb(a){yFb(this.c!=-1);this.a.hd(this.c,a)};var AJ=sfb(Bve,'AbstractList/ListIteratorImpl',98);feb(244,56,kwe,Rkb);_.bd=function Skb(a,b){wFb(a,this.b);this.c.bd(this.a+a,b);++this.b};_.Xb=function Tkb(a){tFb(a,this.b);return this.c.Xb(this.a+a)};_.gd=function Ukb(a){var b;tFb(a,this.b);b=this.c.gd(this.a+a);--this.b;return b};_.hd=function Vkb(a,b){tFb(a,this.b);return this.c.hd(this.a+a,b)};_.gc=function Wkb(){return this.b};_.a=0;_.b=0;var BJ=sfb(Bve,'AbstractList/SubList',244);feb(266,Eve,Fve,Xkb);_.$b=function Ykb(){this.a.$b()};_.Hc=function Zkb(a){return this.a._b(a)};_.Kc=function $kb(){var a;return a=this.a.vc().Kc(),new blb(a)};_.Mc=function _kb(a){if(this.a._b(a)){this.a.Bc(a);return true}return false};_.gc=function alb(){return this.a.gc()};var EJ=sfb(Bve,'AbstractMap/1',266);feb(541,1,Ave,blb);_.Nb=function clb(a){Ztb(this,a)};_.Ob=function dlb(){return this.a.Ob()};_.Pb=function elb(){var a;return a=RD(this.a.Pb(),44),a.ld()};_.Qb=function flb(){this.a.Qb()};var DJ=sfb(Bve,'AbstractMap/1/1',541);feb(231,31,Dve,glb);_.$b=function hlb(){this.a.$b()};_.Hc=function ilb(a){return this.a.uc(a)};_.Kc=function jlb(){var a;return a=this.a.vc().Kc(),new llb(a)};_.gc=function klb(){return this.a.gc()};var GJ=sfb(Bve,'AbstractMap/2',231);feb(301,1,Ave,llb);_.Nb=function mlb(a){Ztb(this,a)};_.Ob=function nlb(){return this.a.Ob()};_.Pb=function olb(){var a;return a=RD(this.a.Pb(),44),a.md()};_.Qb=function plb(){this.a.Qb()};var FJ=sfb(Bve,'AbstractMap/2/1',301);feb(494,1,{494:1,44:1});_.Fb=function rlb(a){var b;if(!ZD(a,44)){return false}b=RD(a,44);return Fvb(this.d,b.ld())&&Fvb(this.e,b.md())};_.ld=function slb(){return this.d};_.md=function tlb(){return this.e};_.Hb=function ulb(){return Gvb(this.d)^Gvb(this.e)};_.nd=function vlb(a){return qlb(this,a)};_.Ib=function wlb(){return this.d+'='+this.e};var HJ=sfb(Bve,'AbstractMap/AbstractEntry',494);feb(397,494,{494:1,397:1,44:1},xlb);var IJ=sfb(Bve,'AbstractMap/SimpleEntry',397);feb(2082,1,Axe);_.Fb=function ylb(a){var b;if(!ZD(a,44)){return false}b=RD(a,44);return Fvb(this.ld(),b.ld())&&Fvb(this.md(),b.md())};_.Hb=function zlb(){return Gvb(this.ld())^Gvb(this.md())};_.Ib=function Alb(){return this.ld()+'='+this.md()};var JJ=sfb(Bve,Lve,2082);feb(2090,2065,Gve);_.Xc=function Dlb(a){return Vd(this.Ee(a))};_.tc=function Elb(a){return Blb(this,a)};_._b=function Flb(a){return Clb(this,a)};_.vc=function Glb(){return new Plb(this)};_.Tc=function Hlb(){return Klb(this.Ge())};_.Yc=function Ilb(a){return Vd(this.He(a))};_.xc=function Jlb(a){var b;b=a;return Wd(this.Fe(b))};_.$c=function Llb(a){return Vd(this.Ie(a))};_.ec=function Mlb(){return new Ulb(this)};_.Vc=function Nlb(){return Klb(this.Je())};_._c=function Olb(a){return Vd(this.Ke(a))};var OJ=sfb(Bve,'AbstractNavigableMap',2090);feb(629,Eve,Fve,Plb);_.Hc=function Qlb(a){return ZD(a,44)&&Blb(this.b,RD(a,44))};_.Kc=function Rlb(){return this.b.De()};_.Mc=function Slb(a){var b;if(ZD(a,44)){b=RD(a,44);return this.b.Le(b)}return false};_.gc=function Tlb(){return this.b.gc()};var LJ=sfb(Bve,'AbstractNavigableMap/EntrySet',629);feb(1146,Eve,Ive,Ulb);_.Nc=function $lb(){return new $wb(this)};_.$b=function Vlb(){this.a.$b()};_.Hc=function Wlb(a){return Clb(this.a,a)};_.Kc=function Xlb(){var a;a=this.a.vc().b.De();return new _lb(a)};_.Mc=function Ylb(a){if(Clb(this.a,a)){this.a.Bc(a);return true}return false};_.gc=function Zlb(){return this.a.gc()};var NJ=sfb(Bve,'AbstractNavigableMap/NavigableKeySet',1146);feb(1147,1,Ave,_lb);_.Nb=function amb(a){Ztb(this,a)};_.Ob=function bmb(){return Akb(this.a.a)};_.Pb=function cmb(){var a;a=vzb(this.a);return a.ld()};_.Qb=function dmb(){wzb(this.a)};var MJ=sfb(Bve,'AbstractNavigableMap/NavigableKeySet/1',1147);feb(2103,31,Dve);_.Fc=function emb(a){return zFb(lwb(this,a),Bxe),true};_.Gc=function fmb(a){uFb(a);mFb(a!=this,"Can't add a queue to itself");return ye(this,a)};_.$b=function gmb(){while(mwb(this)!=null);};var PJ=sfb(Bve,'AbstractQueue',2103);feb(310,31,{4:1,20:1,31:1,16:1},wmb,xmb);_.Fc=function ymb(a){return imb(this,a),true};_.$b=function Amb(){jmb(this)};_.Hc=function Bmb(a){return kmb(new Kmb(this),a)};_.dc=function Cmb(){return nmb(this)};_.Kc=function Dmb(){return new Kmb(this)};_.Mc=function Emb(a){return qmb(new Kmb(this),a)};_.gc=function Fmb(){return this.c-this.b&this.a.length-1};_.Nc=function Gmb(){return new Swb(this,272)};_.Qc=function Hmb(a){var b;b=this.c-this.b&this.a.length-1;a.lengthb&&bD(a,b,null);return a};_.b=0;_.c=0;var TJ=sfb(Bve,'ArrayDeque',310);feb(459,1,Ave,Kmb);_.Nb=function Lmb(a){Ztb(this,a)};_.Ob=function Mmb(){return this.a!=this.b};_.Pb=function Nmb(){return Imb(this)};_.Qb=function Omb(){Jmb(this)};_.a=0;_.b=0;_.c=-1;var SJ=sfb(Bve,'ArrayDeque/IteratorImpl',459);feb(13,56,Cxe,bnb,cnb,dnb);_.bd=function enb(a,b){Qmb(this,a,b)};_.Fc=function fnb(a){return Rmb(this,a)};_.cd=function gnb(a,b){return Smb(this,a,b)};_.Gc=function hnb(a){return Tmb(this,a)};_.$b=function inb(){aFb(this.c,0)};_.Hc=function jnb(a){return Wmb(this,a,0)!=-1};_.Jc=function knb(a){Umb(this,a)};_.Xb=function lnb(a){return Vmb(this,a)};_.dd=function mnb(a){return Wmb(this,a,0)};_.dc=function nnb(){return this.c.length==0};_.Kc=function onb(){return new Anb(this)};_.gd=function pnb(a){return Xmb(this,a)};_.Mc=function qnb(a){return Ymb(this,a)};_.ce=function rnb(a,b){Zmb(this,a,b)};_.hd=function snb(a,b){return $mb(this,a,b)};_.gc=function tnb(){return this.c.length};_.jd=function unb(a){_mb(this,a)};_.Pc=function vnb(){return UEb(this.c)};_.Qc=function wnb(a){return anb(this,a)};var VJ=sfb(Bve,'ArrayList',13);feb(7,1,Ave,Anb);_.Nb=function Bnb(a){Ztb(this,a)};_.Ob=function Cnb(){return xnb(this)};_.Pb=function Dnb(){return ynb(this)};_.Qb=function Enb(){znb(this)};_.a=0;_.b=-1;var UJ=sfb(Bve,'ArrayList/1',7);feb(2112,$wnd.Function,{},iob);_.Me=function job(a,b){return Qfb(a,b)};feb(151,56,Dxe,mob);_.Hc=function nob(a){return St(this,a)!=-1};_.Jc=function oob(a){var b,c,d,e;uFb(a);for(c=this.a,d=0,e=c.length;d0){throw Adb(new agb(Sxe+a+' greater than '+this.e))}return this.f.Te()?bzb(this.c,this.b,this.a,a,b):Ryb(this.c,a,b)};_.zc=function Vzb(a,b){if(!Tyb(this.c,this.f,a,this.b,this.a,this.e,this.d)){throw Adb(new agb(a+' outside the range '+this.b+' to '+this.e))}return Wyb(this.c,a,b)};_.Bc=function Wzb(a){var b;b=a;if(!Tyb(this.c,this.f,b,this.b,this.a,this.e,this.d)){return null}return Xyb(this.c,b)};_.Le=function Xzb(a){return Jzb(this,a.ld())&&Yyb(this.c,a)};_.gc=function Yzb(){var a,b,c;this.f.Te()?this.a?(b=Pyb(this.c,this.b,true)):(b=Pyb(this.c,this.b,false)):(b=Nyb(this.c));if(!(!!b&&Jzb(this,b.d)?b:null)){return 0}a=0;for(c=new yzb(this.c,this.f,this.b,this.a,this.e,this.d);Akb(c.a);c.b=RD(Bkb(c.a),44)){++a}return a};_.ad=function Zzb(a,b){if(this.f.Te()&&this.c.a.Ne(a,this.b)<0){throw Adb(new agb(Sxe+a+Txe+this.b))}return this.f.Ue()?bzb(this.c,a,b,this.e,this.d):czb(this.c,a,b)};_.a=false;_.d=false;var BL=sfb(Bve,'TreeMap/SubMap',631);feb(304,22,Uxe,dAb);_.Te=function eAb(){return false};_.Ue=function fAb(){return false};var $zb,_zb,aAb,bAb;var AL=tfb(Bve,'TreeMap/SubMapType',304,WI,hAb,gAb);feb(1143,304,Uxe,iAb);_.Ue=function jAb(){return true};var xL=tfb(Bve,'TreeMap/SubMapType/1',1143,AL,null,null);feb(1144,304,Uxe,kAb);_.Te=function lAb(){return true};_.Ue=function mAb(){return true};var yL=tfb(Bve,'TreeMap/SubMapType/2',1144,AL,null,null);feb(1145,304,Uxe,nAb);_.Te=function oAb(){return true};var zL=tfb(Bve,'TreeMap/SubMapType/3',1145,AL,null,null);var pAb;feb(157,Eve,{3:1,20:1,31:1,16:1,277:1,21:1,87:1,157:1},xAb,yAb,zAb);_.Nc=function GAb(){return new $wb(this)};_.Fc=function AAb(a){return rAb(this,a)};_.$b=function BAb(){this.a.$b()};_.Hc=function CAb(a){return this.a._b(a)};_.Kc=function DAb(){return this.a.ec().Kc()};_.Mc=function EAb(a){return wAb(this,a)};_.gc=function FAb(){return this.a.gc()};var DL=sfb(Bve,'TreeSet',157);feb(1082,1,{},JAb);_.Ve=function KAb(a,b){return HAb(this.a,a,b)};var FL=sfb(Vxe,'BinaryOperator/lambda$0$Type',1082);feb(1083,1,{},LAb);_.Ve=function MAb(a,b){return IAb(this.a,a,b)};var GL=sfb(Vxe,'BinaryOperator/lambda$1$Type',1083);feb(952,1,{},NAb);_.Kb=function OAb(a){return a};var HL=sfb(Vxe,'Function/lambda$0$Type',952);feb(395,1,nwe,PAb);_.Mb=function QAb(a){return !this.a.Mb(a)};var IL=sfb(Vxe,'Predicate/lambda$2$Type',395);feb(581,1,{581:1});var JL=sfb(Wxe,'Handler',581);feb(2107,1,nve);_.xe=function TAb(){return 'DUMMY'};_.Ib=function UAb(){return this.xe()};var RAb;var LL=sfb(Wxe,'Level',2107);feb(1706,2107,nve,VAb);_.xe=function WAb(){return 'INFO'};var KL=sfb(Wxe,'Level/LevelInfo',1706);feb(1843,1,{},$Ab);var XAb;var ML=sfb(Wxe,'LogManager',1843);feb(1896,1,nve,aBb);_.b=null;var NL=sfb(Wxe,'LogRecord',1896);feb(525,1,{525:1},oBb);_.e=false;var bBb=false,cBb=false,dBb=false,eBb=false,fBb=false;var OL=sfb(Wxe,'Logger',525);feb(835,581,{581:1},rBb);var PL=sfb(Wxe,'SimpleConsoleLogHandler',835);feb(108,22,{3:1,34:1,22:1,108:1},yBb);var uBb,vBb,wBb;var QL=tfb(Zxe,'Collector/Characteristics',108,WI,ABb,zBb);var BBb;feb(758,1,{},DBb);var RL=sfb(Zxe,'CollectorImpl',758);feb(1074,1,{},RBb);_.Ve=function SBb(a,b){return Hyb(RD(a,213),RD(b,213))};var SL=sfb(Zxe,'Collectors/10methodref$merge$Type',1074);feb(1075,1,{},TBb);_.Kb=function UBb(a){return Iyb(RD(a,213))};var TL=sfb(Zxe,'Collectors/11methodref$toString$Type',1075);feb(1076,1,{},VBb);_.Kb=function WBb(a){return Geb(),SSb(a)?true:false};var UL=sfb(Zxe,'Collectors/12methodref$test$Type',1076);feb(144,1,{},XBb);_.Yd=function YBb(a,b){RD(a,16).Fc(b)};var VL=sfb(Zxe,'Collectors/20methodref$add$Type',144);feb(146,1,{},ZBb);_.Xe=function $Bb(){return new bnb};var WL=sfb(Zxe,'Collectors/21methodref$ctor$Type',146);feb(359,1,{},_Bb);_.Xe=function aCb(){return new _sb};var XL=sfb(Zxe,'Collectors/23methodref$ctor$Type',359);feb(360,1,{},bCb);_.Yd=function cCb(a,b){Ysb(RD(a,49),b)};var YL=sfb(Zxe,'Collectors/24methodref$add$Type',360);feb(1069,1,{},dCb);_.Ve=function eCb(a,b){return EBb(RD(a,15),RD(b,16))};var ZL=sfb(Zxe,'Collectors/4methodref$addAll$Type',1069);feb(1073,1,{},fCb);_.Yd=function gCb(a,b){Gyb(RD(a,213),RD(b,484))};var $L=sfb(Zxe,'Collectors/9methodref$add$Type',1073);feb(1072,1,{},hCb);_.Xe=function iCb(){return new Jyb(this.a,this.b,this.c)};var _L=sfb(Zxe,'Collectors/lambda$15$Type',1072);feb(1077,1,{},jCb);_.Xe=function kCb(){var a;return a=new gub,dub(a,(Geb(),false),new bnb),dub(a,true,new bnb),a};var aM=sfb(Zxe,'Collectors/lambda$22$Type',1077);feb(1078,1,{},lCb);_.Xe=function mCb(){return cD(WC(jJ,1),rve,1,5,[this.a])};var bM=sfb(Zxe,'Collectors/lambda$25$Type',1078);feb(1079,1,{},nCb);_.Yd=function oCb(a,b){GBb(this.a,SD(a))};var cM=sfb(Zxe,'Collectors/lambda$26$Type',1079);feb(1080,1,{},pCb);_.Ve=function qCb(a,b){return HBb(this.a,SD(a),SD(b))};var dM=sfb(Zxe,'Collectors/lambda$27$Type',1080);feb(1081,1,{},rCb);_.Kb=function sCb(a){return SD(a)[0]};var eM=sfb(Zxe,'Collectors/lambda$28$Type',1081);feb(728,1,{},uCb);_.Ve=function vCb(a,b){return tCb(a,b)};var fM=sfb(Zxe,'Collectors/lambda$4$Type',728);feb(145,1,{},wCb);_.Ve=function xCb(a,b){return JBb(RD(a,16),RD(b,16))};var gM=sfb(Zxe,'Collectors/lambda$42$Type',145);feb(361,1,{},yCb);_.Ve=function zCb(a,b){return KBb(RD(a,49),RD(b,49))};var hM=sfb(Zxe,'Collectors/lambda$50$Type',361);feb(362,1,{},ACb);_.Kb=function BCb(a){return RD(a,49)};var iM=sfb(Zxe,'Collectors/lambda$51$Type',362);feb(1068,1,{},CCb);_.Yd=function DCb(a,b){LBb(this.a,RD(a,85),b)};var jM=sfb(Zxe,'Collectors/lambda$7$Type',1068);feb(1070,1,{},ECb);_.Ve=function FCb(a,b){return NBb(RD(a,85),RD(b,85),new dCb)};var kM=sfb(Zxe,'Collectors/lambda$8$Type',1070);feb(1071,1,{},GCb);_.Kb=function HCb(a){return MBb(this.a,RD(a,85))};var lM=sfb(Zxe,'Collectors/lambda$9$Type',1071);feb(550,1,{});_.$e=function OCb(){ICb(this)};_.d=false;var TM=sfb(Zxe,'TerminatableStream',550);feb(827,550,$xe,WCb);_.$e=function XCb(){ICb(this)};var qM=sfb(Zxe,'DoubleStreamImpl',827);feb(1847,736,Pve,$Cb);_.Re=function aDb(a){return ZCb(this,RD(a,189))};_.a=null;var nM=sfb(Zxe,'DoubleStreamImpl/2',1847);feb(1848,1,Gxe,bDb);_.Pe=function cDb(a){_Cb(this.a,a)};var mM=sfb(Zxe,'DoubleStreamImpl/2/lambda$0$Type',1848);feb(1845,1,Gxe,dDb);_.Pe=function eDb(a){YCb(this.a,a)};var oM=sfb(Zxe,'DoubleStreamImpl/lambda$0$Type',1845);feb(1846,1,Gxe,fDb);_.Pe=function gDb(a){Nrb(this.a,a)};var pM=sfb(Zxe,'DoubleStreamImpl/lambda$2$Type',1846);feb(1397,735,Pve,kDb);_.Re=function lDb(a){return jDb(this,RD(a,202))};_.a=0;_.b=0;_.c=0;var rM=sfb(Zxe,'IntStream/5',1397);feb(806,550,$xe,oDb);_.$e=function pDb(){ICb(this)};_._e=function qDb(){return LCb(this),this.a};var vM=sfb(Zxe,'IntStreamImpl',806);feb(807,550,$xe,rDb);_.$e=function sDb(){ICb(this)};_._e=function tDb(){return LCb(this),Txb(),Sxb};var sM=sfb(Zxe,'IntStreamImpl/Empty',807);feb(1687,1,Rve,uDb);_.Dd=function vDb(a){ktb(this.a,a)};var uM=sfb(Zxe,'IntStreamImpl/lambda$4$Type',1687);var RM=ufb(Zxe,'Stream');feb(26,550,{533:1,687:1,848:1},SDb);_.$e=function TDb(){ICb(this)};var wDb;var QM=sfb(Zxe,'StreamImpl',26);feb(1102,500,Pve,YDb);_.Bd=function ZDb(a){while(WDb(this)){if(this.a.Bd(a)){return true}else{ICb(this.b);this.b=null;this.a=null}}return false};var xM=sfb(Zxe,'StreamImpl/1',1102);feb(1103,1,Qve,$Db);_.Cd=function _Db(a){XDb(this.a,RD(a,848))};var wM=sfb(Zxe,'StreamImpl/1/lambda$0$Type',1103);feb(1104,1,nwe,aEb);_.Mb=function bEb(a){return Ysb(this.a,a)};var yM=sfb(Zxe,'StreamImpl/1methodref$add$Type',1104);feb(1105,500,Pve,cEb);_.Bd=function dEb(a){var b;if(!this.a){b=new bnb;this.b.a.Nb(new eEb(b));yob();_mb(b,this.c);this.a=new Swb(b,16)}return Rwb(this.a,a)};_.a=null;var AM=sfb(Zxe,'StreamImpl/5',1105);feb(1106,1,Qve,eEb);_.Cd=function fEb(a){Rmb(this.a,a)};var zM=sfb(Zxe,'StreamImpl/5/2methodref$add$Type',1106);feb(737,500,Pve,hEb);_.Bd=function iEb(a){this.b=false;while(!this.b&&this.c.Bd(new jEb(this,a)));return this.b};_.b=false;var CM=sfb(Zxe,'StreamImpl/FilterSpliterator',737);feb(1096,1,Qve,jEb);_.Cd=function kEb(a){gEb(this.a,this.b,a)};var BM=sfb(Zxe,'StreamImpl/FilterSpliterator/lambda$0$Type',1096);feb(1091,736,Pve,nEb);_.Re=function oEb(a){return mEb(this,RD(a,189))};var EM=sfb(Zxe,'StreamImpl/MapToDoubleSpliterator',1091);feb(1095,1,Qve,pEb);_.Cd=function qEb(a){lEb(this.a,this.b,a)};var DM=sfb(Zxe,'StreamImpl/MapToDoubleSpliterator/lambda$0$Type',1095);feb(1090,735,Pve,tEb);_.Re=function uEb(a){return sEb(this,RD(a,202))};var GM=sfb(Zxe,'StreamImpl/MapToIntSpliterator',1090);feb(1094,1,Qve,vEb);_.Cd=function wEb(a){rEb(this.a,this.b,a)};var FM=sfb(Zxe,'StreamImpl/MapToIntSpliterator/lambda$0$Type',1094);feb(734,500,Pve,zEb);_.Bd=function AEb(a){return yEb(this,a)};var IM=sfb(Zxe,'StreamImpl/MapToObjSpliterator',734);feb(1093,1,Qve,BEb);_.Cd=function CEb(a){xEb(this.a,this.b,a)};var HM=sfb(Zxe,'StreamImpl/MapToObjSpliterator/lambda$0$Type',1093);feb(1092,500,Pve,DEb);_.Bd=function EEb(a){while(Idb(this.b,0)){if(!this.a.Bd(new FEb)){return false}this.b=Vdb(this.b,1)}return this.a.Bd(a)};_.b=0;var KM=sfb(Zxe,'StreamImpl/SkipSpliterator',1092);feb(1097,1,Qve,FEb);_.Cd=function GEb(a){};var JM=sfb(Zxe,'StreamImpl/SkipSpliterator/lambda$0$Type',1097);feb(626,1,Qve,IEb);_.Cd=function JEb(a){HEb(this,a)};var LM=sfb(Zxe,'StreamImpl/ValueConsumer',626);feb(1098,1,Qve,KEb);_.Cd=function LEb(a){xDb()};var MM=sfb(Zxe,'StreamImpl/lambda$0$Type',1098);feb(1099,1,Qve,MEb);_.Cd=function NEb(a){xDb()};var NM=sfb(Zxe,'StreamImpl/lambda$1$Type',1099);feb(1100,1,{},OEb);_.Ve=function PEb(a,b){return UDb(this.a,a,b)};var OM=sfb(Zxe,'StreamImpl/lambda$4$Type',1100);feb(1101,1,Qve,QEb);_.Cd=function REb(a){VDb(this.b,this.a,a)};var PM=sfb(Zxe,'StreamImpl/lambda$5$Type',1101);feb(1107,1,Qve,SEb);_.Cd=function TEb(a){PCb(this.a,RD(a,380))};var SM=sfb(Zxe,'TerminatableStream/lambda$0$Type',1107);feb(2142,1,{});feb(2014,1,{},gFb);var UM=sfb('javaemul.internal','ConsoleLogger',2014);var iFb=0;feb(2134,1,{});feb(1830,1,Qve,FFb);_.Cd=function GFb(a){RD(a,317)};var VM=sfb(eye,'BowyerWatsonTriangulation/lambda$0$Type',1830);feb(1831,1,Qve,HFb);_.Cd=function IFb(a){ye(this.a,RD(a,317).e)};var WM=sfb(eye,'BowyerWatsonTriangulation/lambda$1$Type',1831);feb(1832,1,Qve,JFb);_.Cd=function KFb(a){RD(a,177)};var XM=sfb(eye,'BowyerWatsonTriangulation/lambda$2$Type',1832);feb(1827,1,fye,NFb);_.Ne=function OFb(a,b){return MFb(this.a,RD(a,177),RD(b,177))};_.Fb=function PFb(a){return this===a};_.Oe=function QFb(){return new Frb(this)};var YM=sfb(eye,'NaiveMinST/lambda$0$Type',1827);feb(449,1,{},SFb);var ZM=sfb(eye,'NodeMicroLayout',449);feb(177,1,{177:1},TFb);_.Fb=function UFb(a){var b;if(ZD(a,177)){b=RD(a,177);return Fvb(this.a,b.a)&&Fvb(this.b,b.b)||Fvb(this.a,b.b)&&Fvb(this.b,b.a)}else{return false}};_.Hb=function VFb(){return Gvb(this.a)+Gvb(this.b)};var $M=sfb(eye,'TEdge',177);feb(317,1,{317:1},XFb);_.Fb=function YFb(a){var b;if(ZD(a,317)){b=RD(a,317);return WFb(this,b.a)&&WFb(this,b.b)&&WFb(this,b.c)}else{return false}};_.Hb=function ZFb(){return Gvb(this.a)+Gvb(this.b)+Gvb(this.c)};var _M=sfb(eye,'TTriangle',317);feb(225,1,{225:1},$Fb);var aN=sfb(eye,'Tree',225);feb(1218,1,{},aGb);var cN=sfb(gye,'Scanline',1218);var bN=ufb(gye,hye);feb(1758,1,{},dGb);var dN=sfb(iye,'CGraph',1758);feb(316,1,{316:1},fGb);_.b=0;_.c=0;_.d=0;_.g=0;_.i=0;_.k=pxe;var fN=sfb(iye,'CGroup',316);feb(830,1,{},jGb);var eN=sfb(iye,'CGroup/CGroupBuilder',830);feb(60,1,{60:1},kGb);_.Ib=function lGb(){var a;if(this.j){return WD(this.j.Kb(this))}return lfb(hN),hN.o+'@'+(a=kFb(this)>>>0,a.toString(16))};_.f=0;_.i=pxe;var hN=sfb(iye,'CNode',60);feb(829,1,{},qGb);var gN=sfb(iye,'CNode/CNodeBuilder',829);var vGb;feb(1590,1,{},xGb);_.ff=function yGb(a,b){return 0};_.gf=function zGb(a,b){return 0};var iN=sfb(iye,kye,1590);feb(1853,1,{},AGb);_.cf=function BGb(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p;j=oxe;for(d=new Anb(a.a.b);d.ad.d.c||d.d.c==f.d.c&&d.d.b0?a+this.n.d+this.n.a:0};_.kf=function yKb(){var a,b,c,d,e;e=0;if(this.e){this.b?(e=this.b.a):!!this.a[1][1]&&(e=this.a[1][1].kf())}else if(this.g){e=vKb(this,pKb(this,null,true))}else{for(b=(ZJb(),cD(WC(JN,1),jwe,237,0,[WJb,XJb,YJb])),c=0,d=b.length;c0?e+this.n.b+this.n.c:0};_.lf=function zKb(){var a,b,c,d,e;if(this.g){a=pKb(this,null,false);for(c=(ZJb(),cD(WC(JN,1),jwe,237,0,[WJb,XJb,YJb])),d=0,e=c.length;d0){d[0]+=this.d;c-=d[0]}if(d[2]>0){d[2]+=this.d;c-=d[2]}this.c.a=$wnd.Math.max(0,c);this.c.d=b.d+a.d+(this.c.a-c)/2;d[1]=$wnd.Math.max(d[1],c);lKb(this,XJb,b.d+a.d+d[0]-(d[1]-c)/2,d)};_.b=null;_.d=0;_.e=false;_.f=false;_.g=false;var iKb=0,jKb=0;var LN=sfb(Jye,'GridContainerCell',1538);feb(471,22,{3:1,34:1,22:1,471:1},FKb);var BKb,CKb,DKb;var MN=tfb(Jye,'HorizontalLabelAlignment',471,WI,HKb,GKb);var IKb;feb(314,217,{217:1,314:1},TKb,UKb,VKb);_.jf=function WKb(){return PKb(this)};_.kf=function XKb(){return QKb(this)};_.a=0;_.c=false;var NN=sfb(Jye,'LabelCell',314);feb(252,336,{217:1,336:1,252:1},dLb);_.jf=function eLb(){return YKb(this)};_.kf=function fLb(){return ZKb(this)};_.lf=function iLb(){$Kb(this)};_.mf=function jLb(){_Kb(this)};_.b=0;_.c=0;_.d=false;var SN=sfb(Jye,'StripContainerCell',252);feb(1691,1,nwe,kLb);_.Mb=function lLb(a){return gLb(RD(a,217))};var ON=sfb(Jye,'StripContainerCell/lambda$0$Type',1691);feb(1692,1,{},mLb);_.Ye=function nLb(a){return RD(a,217).kf()};var PN=sfb(Jye,'StripContainerCell/lambda$1$Type',1692);feb(1693,1,nwe,oLb);_.Mb=function pLb(a){return hLb(RD(a,217))};var QN=sfb(Jye,'StripContainerCell/lambda$2$Type',1693);feb(1694,1,{},qLb);_.Ye=function rLb(a){return RD(a,217).jf()};var RN=sfb(Jye,'StripContainerCell/lambda$3$Type',1694);feb(472,22,{3:1,34:1,22:1,472:1},wLb);var sLb,tLb,uLb;var TN=tfb(Jye,'VerticalLabelAlignment',472,WI,yLb,xLb);var zLb;feb(800,1,{},CLb);_.c=0;_.d=0;_.k=0;_.s=0;_.t=0;_.v=false;_.w=0;_.D=false;_.F=false;var WN=sfb(Rye,'NodeContext',800);feb(1536,1,fye,FLb);_.Ne=function GLb(a,b){return ELb(RD(a,64),RD(b,64))};_.Fb=function HLb(a){return this===a};_.Oe=function ILb(){return new Frb(this)};var UN=sfb(Rye,'NodeContext/0methodref$comparePortSides$Type',1536);feb(1537,1,fye,JLb);_.Ne=function KLb(a,b){return DLb(RD(a,117),RD(b,117))};_.Fb=function LLb(a){return this===a};_.Oe=function MLb(){return new Frb(this)};var VN=sfb(Rye,'NodeContext/1methodref$comparePortContexts$Type',1537);feb(164,22,{3:1,34:1,22:1,164:1},kMb);var NLb,OLb,PLb,QLb,RLb,SLb,TLb,ULb,VLb,WLb,XLb,YLb,ZLb,$Lb,_Lb,aMb,bMb,cMb,dMb,eMb,fMb,gMb;var XN=tfb(Rye,'NodeLabelLocation',164,WI,nMb,mMb);var oMb;feb(117,1,{117:1},rMb);_.a=false;var YN=sfb(Rye,'PortContext',117);feb(1541,1,Qve,KMb);_.Cd=function LMb(a){NKb(RD(a,314))};var ZN=sfb(Uye,Vye,1541);feb(1542,1,nwe,MMb);_.Mb=function NMb(a){return !!RD(a,117).c};var $N=sfb(Uye,Wye,1542);feb(1543,1,Qve,OMb);_.Cd=function PMb(a){NKb(RD(a,117).c)};var _N=sfb(Uye,'LabelPlacer/lambda$2$Type',1543);var QMb;feb(1540,1,Qve,YMb);_.Cd=function ZMb(a){RMb();qMb(RD(a,117))};var aO=sfb(Uye,'NodeLabelAndSizeUtilities/lambda$0$Type',1540);feb(801,1,Qve,dNb);_.Cd=function eNb(a){bNb(this.b,this.c,this.a,RD(a,187))};_.a=false;_.c=false;var bO=sfb(Uye,'NodeLabelCellCreator/lambda$0$Type',801);feb(1539,1,Qve,kNb);_.Cd=function lNb(a){jNb(this.a,RD(a,187))};var cO=sfb(Uye,'PortContextCreator/lambda$0$Type',1539);var sNb;feb(1902,1,{},MNb);var eO=sfb(Yye,'GreedyRectangleStripOverlapRemover',1902);feb(1903,1,fye,ONb);_.Ne=function PNb(a,b){return NNb(RD(a,226),RD(b,226))};_.Fb=function QNb(a){return this===a};_.Oe=function RNb(){return new Frb(this)};var dO=sfb(Yye,'GreedyRectangleStripOverlapRemover/0methodref$compareByYCoordinate$Type',1903);feb(1849,1,{},YNb);_.a=5;_.e=0;var kO=sfb(Yye,'RectangleStripOverlapRemover',1849);feb(1850,1,fye,aOb);_.Ne=function bOb(a,b){return ZNb(RD(a,226),RD(b,226))};_.Fb=function cOb(a){return this===a};_.Oe=function dOb(){return new Frb(this)};var fO=sfb(Yye,'RectangleStripOverlapRemover/0methodref$compareLeftRectangleBorders$Type',1850);feb(1852,1,fye,eOb);_.Ne=function fOb(a,b){return $Nb(RD(a,226),RD(b,226))};_.Fb=function gOb(a){return this===a};_.Oe=function hOb(){return new Frb(this)};var gO=sfb(Yye,'RectangleStripOverlapRemover/1methodref$compareRightRectangleBorders$Type',1852);feb(417,22,{3:1,34:1,22:1,417:1},nOb);var iOb,jOb,kOb,lOb;var hO=tfb(Yye,'RectangleStripOverlapRemover/OverlapRemovalDirection',417,WI,pOb,oOb);var qOb;feb(226,1,{226:1},sOb);var iO=sfb(Yye,'RectangleStripOverlapRemover/RectangleNode',226);feb(1851,1,Qve,tOb);_.Cd=function uOb(a){TNb(this.a,RD(a,226))};var jO=sfb(Yye,'RectangleStripOverlapRemover/lambda$1$Type',1851);feb(1323,1,fye,xOb);_.Ne=function yOb(a,b){return wOb(RD(a,176),RD(b,176))};_.Fb=function zOb(a){return this===a};_.Oe=function AOb(){return new Frb(this)};var oO=sfb($ye,'PolyominoCompactor/CornerCasesGreaterThanRestComparator',1323);feb(1326,1,{},BOb);_.Kb=function COb(a){return RD(a,334).a};var lO=sfb($ye,'PolyominoCompactor/CornerCasesGreaterThanRestComparator/lambda$0$Type',1326);feb(1327,1,nwe,DOb);_.Mb=function EOb(a){return RD(a,332).a};var mO=sfb($ye,'PolyominoCompactor/CornerCasesGreaterThanRestComparator/lambda$1$Type',1327);feb(1328,1,nwe,FOb);_.Mb=function GOb(a){return RD(a,332).a};var nO=sfb($ye,'PolyominoCompactor/CornerCasesGreaterThanRestComparator/lambda$2$Type',1328);feb(1321,1,fye,IOb);_.Ne=function JOb(a,b){return HOb(RD(a,176),RD(b,176))};_.Fb=function KOb(a){return this===a};_.Oe=function LOb(){return new Frb(this)};var qO=sfb($ye,'PolyominoCompactor/MinNumOfExtensionDirectionsComparator',1321);feb(1324,1,{},MOb);_.Kb=function NOb(a){return RD(a,334).a};var pO=sfb($ye,'PolyominoCompactor/MinNumOfExtensionDirectionsComparator/lambda$0$Type',1324);feb(781,1,fye,POb);_.Ne=function QOb(a,b){return OOb(RD(a,176),RD(b,176))};_.Fb=function ROb(a){return this===a};_.Oe=function SOb(){return new Frb(this)};var rO=sfb($ye,'PolyominoCompactor/MinNumOfExtensionsComparator',781);feb(1319,1,fye,UOb);_.Ne=function VOb(a,b){return TOb(RD(a,330),RD(b,330))};_.Fb=function WOb(a){return this===a};_.Oe=function XOb(){return new Frb(this)};var tO=sfb($ye,'PolyominoCompactor/MinPerimeterComparator',1319);feb(1320,1,fye,ZOb);_.Ne=function $Ob(a,b){return YOb(RD(a,330),RD(b,330))};_.Fb=function _Ob(a){return this===a};_.Oe=function aPb(){return new Frb(this)};var sO=sfb($ye,'PolyominoCompactor/MinPerimeterComparatorWithShape',1320);feb(1322,1,fye,cPb);_.Ne=function dPb(a,b){return bPb(RD(a,176),RD(b,176))};_.Fb=function ePb(a){return this===a};_.Oe=function fPb(){return new Frb(this)};var vO=sfb($ye,'PolyominoCompactor/SingleExtensionSideGreaterThanRestComparator',1322);feb(1325,1,{},gPb);_.Kb=function hPb(a){return RD(a,334).a};var uO=sfb($ye,'PolyominoCompactor/SingleExtensionSideGreaterThanRestComparator/lambda$0$Type',1325);feb(782,1,{},kPb);_.Ve=function lPb(a,b){return jPb(this,RD(a,42),RD(b,176))};var wO=sfb($ye,'SuccessorCombination',782);feb(649,1,{},nPb);_.Ve=function oPb(a,b){var c;return mPb((c=RD(a,42),RD(b,176),c))};var xO=sfb($ye,'SuccessorJitter',649);feb(648,1,{},qPb);_.Ve=function rPb(a,b){var c;return pPb((c=RD(a,42),RD(b,176),c))};var yO=sfb($ye,'SuccessorLineByLine',648);feb(573,1,{},tPb);_.Ve=function uPb(a,b){var c;return sPb((c=RD(a,42),RD(b,176),c))};var zO=sfb($ye,'SuccessorManhattan',573);feb(1344,1,{},wPb);_.Ve=function xPb(a,b){var c;return vPb((c=RD(a,42),RD(b,176),c))};var AO=sfb($ye,'SuccessorMaxNormWindingInMathPosSense',1344);feb(409,1,{},APb);_.Ve=function BPb(a,b){return yPb(this,a,b)};_.c=false;_.d=false;_.e=false;_.f=false;var CO=sfb($ye,'SuccessorQuadrantsGeneric',409);feb(1345,1,{},CPb);_.Kb=function DPb(a){return RD(a,334).a};var BO=sfb($ye,'SuccessorQuadrantsGeneric/lambda$0$Type',1345);feb(332,22,{3:1,34:1,22:1,332:1},JPb);_.a=false;var EPb,FPb,GPb,HPb;var DO=tfb(dze,eze,332,WI,LPb,KPb);var MPb;feb(1317,1,{});_.Ib=function UPb(){var a,b,c,d,e,f;c=' ';a=sgb(0);for(e=0;e=0?'b'+a+'['+bUb(this.a)+']':'b['+bUb(this.a)+']'}return 'b_'+kFb(this)};var rP=sfb(Oze,'FBendpoint',250);feb(290,137,{3:1,290:1,96:1,137:1},cUb);_.Ib=function dUb(){return bUb(this)};var sP=sfb(Oze,'FEdge',290);feb(235,137,{3:1,235:1,96:1,137:1},gUb);var tP=sfb(Oze,'FGraph',235);feb(454,309,{3:1,454:1,309:1,96:1,137:1},iUb);_.Ib=function jUb(){return this.b==null||this.b.length==0?'l['+bUb(this.a)+']':'l_'+this.b};var uP=sfb(Oze,'FLabel',454);feb(153,309,{3:1,153:1,309:1,96:1,137:1},lUb);_.Ib=function mUb(){return kUb(this)};_.a=0;var vP=sfb(Oze,'FNode',153);feb(2100,1,{});_.vf=function rUb(a){nUb(this,a)};_.wf=function sUb(){oUb(this)};_.d=0;var xP=sfb(Qze,'AbstractForceModel',2100);feb(641,2100,{641:1},tUb);_.uf=function vUb(a,b){var c,d,e,f,g;qUb(this.f,a,b);e=ojd(ajd(b.d),a.d);g=$wnd.Math.sqrt(e.a*e.a+e.b*e.b);d=$wnd.Math.max(0,g-ejd(a.e)/2-ejd(b.e)/2);c=fUb(this.e,a,b);c>0?(f=-uUb(d,this.c)*c):(f=yUb(d,this.b)*RD(mQb(a,(yVb(),lVb)),17).a);ijd(e,f/g);return e};_.vf=function wUb(a){nUb(this,a);this.a=RD(mQb(a,(yVb(),aVb)),17).a;this.c=Kfb(UD(mQb(a,rVb)));this.b=Kfb(UD(mQb(a,nVb)))};_.xf=function xUb(a){return a0&&(f-=AUb(d,this.a)*c);ijd(e,f*this.b/g);return e};_.vf=function CUb(a){var b,c,d,e,f,g,h;nUb(this,a);this.b=Kfb(UD(mQb(a,(yVb(),sVb))));this.c=this.b/RD(mQb(a,aVb),17).a;d=a.e.c.length;f=0;e=0;for(h=new Anb(a.e);h.a0};_.a=0;_.b=0;_.c=0;var zP=sfb(Qze,'FruchtermanReingoldModel',642);feb(860,1,Eye,PUb);_.hf=function QUb(a){Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,Rze),''),'Force Model'),'Determines the model for force calculation.'),IUb),(kid(),eid)),BP),xsb((Yhd(),Whd)))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,Sze),''),'Iterations'),'The number of iterations on the force model.'),sgb(300)),gid),bJ),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,Tze),''),'Repulsive Power'),'Determines how many bend points are added to the edge; such bend points are regarded as repelling particles in the force model'),sgb(0)),gid),bJ),xsb(Thd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,Uze),''),'FR Temperature'),'The temperature is used as a scaling factor for particle displacements.'),Vze),did),VI),xsb(Whd))));zgd(a,Uze,Rze,NUb);Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,Wze),''),'Eades Repulsion'),"Factor for repulsive forces in Eades' model."),5),did),VI),xsb(Whd))));zgd(a,Wze,Rze,KUb);zVb((new AVb,a))};var GUb,HUb,IUb,JUb,KUb,LUb,MUb,NUb;var AP=sfb(Xze,'ForceMetaDataProvider',860);feb(432,22,{3:1,34:1,22:1,432:1},UUb);var RUb,SUb;var BP=tfb(Xze,'ForceModelStrategy',432,WI,WUb,VUb);var XUb;feb(Awe,1,Eye,AVb);_.hf=function BVb(a){zVb(a)};var ZUb,$Ub,_Ub,aVb,bVb,cVb,dVb,eVb,fVb,gVb,hVb,iVb,jVb,kVb,lVb,mVb,nVb,oVb,pVb,qVb,rVb,sVb,tVb,uVb,vVb,wVb,xVb;var DP=sfb(Xze,'ForceOptions',Awe);feb(1001,1,{},CVb);_.sf=function DVb(){var a;return a=new TTb,a};_.tf=function EVb(a){};var CP=sfb(Xze,'ForceOptions/ForceFactory',1001);var FVb,GVb,HVb,IVb;feb(861,1,Eye,RVb);_.hf=function SVb(a){Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,vAe),''),'Fixed Position'),'Prevent that the node is moved by the layout algorithm.'),(Geb(),false)),(kid(),cid)),QI),xsb((Yhd(),Vhd)))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,wAe),''),'Desired Edge Length'),'Either specified for parent nodes or for individual edges, where the latter takes higher precedence.'),100),did),VI),ysb(Whd,cD(WC(d3,1),jwe,170,0,[Thd])))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,xAe),''),'Layout Dimension'),'Dimensions that are permitted to be altered during layout.'),MVb),eid),JP),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,yAe),''),'Stress Epsilon'),'Termination criterion for the iterative process.'),Vze),did),VI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,zAe),''),'Iteration Limit'),"Maximum number of performed iterations. Takes higher precedence than 'epsilon'."),sgb(lve)),gid),bJ),xsb(Whd))));eWb((new fWb,a))};var KVb,LVb,MVb,NVb,OVb,PVb;var EP=sfb(Xze,'StressMetaDataProvider',861);feb(1004,1,Eye,fWb);_.hf=function gWb(a){eWb(a)};var TVb,UVb,VVb,WVb,XVb,YVb,ZVb,$Vb,_Vb,aWb,bWb,cWb;var GP=sfb(Xze,'StressOptions',1004);feb(1005,1,{},hWb);_.sf=function iWb(){var a;return a=new kWb,a};_.tf=function jWb(a){};var FP=sfb(Xze,'StressOptions/StressFactory',1005);feb(1110,205,oze,kWb);_.rf=function lWb(a,b){var c,d,e,f,g;b.Ug(BAe,1);Heb(TD(Gxd(a,(dWb(),XVb))))?Heb(TD(Gxd(a,bWb)))||RFb((c=new SFb((lud(),new zud(a))),c)):QTb(new TTb,a,b.eh(1));e=KTb(a);d=CTb(this.a,e);for(g=d.Kc();g.Ob();){f=RD(g.Pb(),235);if(f.e.c.length<=1){continue}uWb(this.b,f);sWb(this.b);Umb(f.d,new mWb)}e=BTb(d);JTb(e);b.Vg()};var IP=sfb(DAe,'StressLayoutProvider',1110);feb(1111,1,Qve,mWb);_.Cd=function nWb(a){hUb(RD(a,454))};var HP=sfb(DAe,'StressLayoutProvider/lambda$0$Type',1111);feb(1002,1,{},vWb);_.c=0;_.e=0;_.g=0;var LP=sfb(DAe,'StressMajorization',1002);feb(391,22,{3:1,34:1,22:1,391:1},BWb);var xWb,yWb,zWb;var JP=tfb(DAe,'StressMajorization/Dimension',391,WI,DWb,CWb);var EWb;feb(1003,1,fye,GWb);_.Ne=function HWb(a,b){return wWb(this.a,RD(a,153),RD(b,153))};_.Fb=function IWb(a){return this===a};_.Oe=function JWb(){return new Frb(this)};var KP=sfb(DAe,'StressMajorization/lambda$0$Type',1003);feb(1192,1,{},RWb);var OP=sfb(FAe,'ElkLayered',1192);feb(1193,1,Qve,UWb);_.Cd=function VWb(a){SWb(this.a,RD(a,36))};var MP=sfb(FAe,'ElkLayered/lambda$0$Type',1193);feb(1194,1,Qve,WWb);_.Cd=function XWb(a){TWb(this.a,RD(a,36))};var NP=sfb(FAe,'ElkLayered/lambda$1$Type',1194);feb(1281,1,{},dXb);var YWb,ZWb,$Wb;var SP=sfb(FAe,'GraphConfigurator',1281);feb(770,1,Qve,fXb);_.Cd=function gXb(a){aXb(this.a,RD(a,10))};var PP=sfb(FAe,'GraphConfigurator/lambda$0$Type',770);feb(771,1,{},hXb);_.Kb=function iXb(a){return _Wb(),new SDb(null,new Swb(RD(a,30).a,16))};var QP=sfb(FAe,'GraphConfigurator/lambda$1$Type',771);feb(772,1,Qve,jXb);_.Cd=function kXb(a){aXb(this.a,RD(a,10))};var RP=sfb(FAe,'GraphConfigurator/lambda$2$Type',772);feb(1109,205,oze,lXb);_.rf=function mXb(a,b){var c;c=c5b(new k5b,a);dE(Gxd(a,(yCc(),IAc)))===dE((Fnd(),Cnd))?LWb(this.a,c,b):MWb(this.a,c,b);b.$g()||J5b(new N5b,c)};var TP=sfb(FAe,'LayeredLayoutProvider',1109);feb(367,22,{3:1,34:1,22:1,367:1},tXb);var nXb,oXb,pXb,qXb,rXb;var UP=tfb(FAe,'LayeredPhases',367,WI,vXb,uXb);var wXb;feb(1717,1,{},EXb);_.i=0;var yXb;var XP=sfb(GAe,'ComponentsToCGraphTransformer',1717);var jYb;feb(1718,1,{},FXb);_.yf=function GXb(a,b){return $wnd.Math.min(a.a!=null?Kfb(a.a):a.c.i,b.a!=null?Kfb(b.a):b.c.i)};_.zf=function HXb(a,b){return $wnd.Math.min(a.a!=null?Kfb(a.a):a.c.i,b.a!=null?Kfb(b.a):b.c.i)};var VP=sfb(GAe,'ComponentsToCGraphTransformer/1',1718);feb(86,1,{86:1});_.i=0;_.k=true;_.o=pxe;var bQ=sfb(HAe,'CNode',86);feb(470,86,{470:1,86:1},IXb,JXb);_.Ib=function KXb(){return ''};var WP=sfb(GAe,'ComponentsToCGraphTransformer/CRectNode',470);feb(1688,1,{},XXb);var LXb,MXb;var $P=sfb(GAe,'OneDimensionalComponentsCompaction',1688);feb(1689,1,{},$Xb);_.Kb=function _Xb(a){return YXb(RD(a,42))};_.Fb=function aYb(a){return this===a};var YP=sfb(GAe,'OneDimensionalComponentsCompaction/lambda$0$Type',1689);feb(1690,1,{},bYb);_.Kb=function cYb(a){return ZXb(RD(a,42))};_.Fb=function dYb(a){return this===a};var ZP=sfb(GAe,'OneDimensionalComponentsCompaction/lambda$1$Type',1690);feb(1720,1,{},fYb);var _P=sfb(HAe,'CGraph',1720);feb(194,1,{194:1},iYb);_.b=0;_.c=0;_.e=0;_.g=true;_.i=pxe;var aQ=sfb(HAe,'CGroup',194);feb(1719,1,{},lYb);_.yf=function mYb(a,b){return $wnd.Math.max(a.a!=null?Kfb(a.a):a.c.i,b.a!=null?Kfb(b.a):b.c.i)};_.zf=function nYb(a,b){return $wnd.Math.max(a.a!=null?Kfb(a.a):a.c.i,b.a!=null?Kfb(b.a):b.c.i)};var cQ=sfb(HAe,kye,1719);feb(1721,1,{},EYb);_.d=false;var oYb;var eQ=sfb(HAe,pye,1721);feb(1722,1,{},FYb);_.Kb=function GYb(a){return pYb(),Geb(),RD(RD(a,42).a,86).d.e!=0?true:false};_.Fb=function HYb(a){return this===a};var dQ=sfb(HAe,qye,1722);feb(833,1,{},KYb);_.a=false;_.b=false;_.c=false;_.d=false;var fQ=sfb(HAe,rye,833);feb(1898,1,{},QYb);var kQ=sfb(IAe,sye,1898);var wQ=ufb(JAe,hye);feb(1899,1,{382:1},UYb);_.bf=function VYb(a){SYb(this,RD(a,476))};var hQ=sfb(IAe,tye,1899);feb(Owe,1,fye,XYb);_.Ne=function YYb(a,b){return WYb(RD(a,86),RD(b,86))};_.Fb=function ZYb(a){return this===a};_.Oe=function $Yb(){return new Frb(this)};var gQ=sfb(IAe,uye,Owe);feb(476,1,{476:1},_Yb);_.a=false;var iQ=sfb(IAe,vye,476);feb(1901,1,fye,aZb);_.Ne=function bZb(a,b){return RYb(RD(a,476),RD(b,476))};_.Fb=function cZb(a){return this===a};_.Oe=function dZb(){return new Frb(this)};var jQ=sfb(IAe,wye,1901);feb(148,1,{148:1},eZb,fZb);_.Fb=function gZb(a){var b;if(a==null){return false}if(mQ!=rb(a)){return false}b=RD(a,148);return Fvb(this.c,b.c)&&Fvb(this.d,b.d)};_.Hb=function hZb(){return Tnb(cD(WC(jJ,1),rve,1,5,[this.c,this.d]))};_.Ib=function iZb(){return '('+this.c+pve+this.d+(this.a?'cx':'')+this.b+')'};_.a=true;_.c=0;_.d=0;var mQ=sfb(JAe,'Point',148);feb(416,22,{3:1,34:1,22:1,416:1},qZb);var jZb,kZb,lZb,mZb;var lQ=tfb(JAe,'Point/Quadrant',416,WI,uZb,tZb);var vZb;feb(1708,1,{},EZb);_.b=null;_.c=null;_.d=null;_.e=null;_.f=null;var xZb,yZb,zZb,AZb,BZb;var vQ=sfb(JAe,'RectilinearConvexHull',1708);feb(583,1,{382:1},PZb);_.bf=function QZb(a){OZb(this,RD(a,148))};_.b=0;var MZb;var oQ=sfb(JAe,'RectilinearConvexHull/MaximalElementsEventHandler',583);feb(1710,1,fye,SZb);_.Ne=function TZb(a,b){return RZb(UD(a),UD(b))};_.Fb=function UZb(a){return this===a};_.Oe=function VZb(){return new Frb(this)};var nQ=sfb(JAe,'RectilinearConvexHull/MaximalElementsEventHandler/lambda$0$Type',1710);feb(1709,1,{382:1},XZb);_.bf=function YZb(a){WZb(this,RD(a,148))};_.a=0;_.b=null;_.c=null;_.d=null;_.e=null;var pQ=sfb(JAe,'RectilinearConvexHull/RectangleEventHandler',1709);feb(1711,1,fye,ZZb);_.Ne=function $Zb(a,b){return GZb(RD(a,148),RD(b,148))};_.Fb=function _Zb(a){return this===a};_.Oe=function a$b(){return new Frb(this)};var qQ=sfb(JAe,'RectilinearConvexHull/lambda$0$Type',1711);feb(1712,1,fye,b$b);_.Ne=function c$b(a,b){return HZb(RD(a,148),RD(b,148))};_.Fb=function d$b(a){return this===a};_.Oe=function e$b(){return new Frb(this)};var rQ=sfb(JAe,'RectilinearConvexHull/lambda$1$Type',1712);feb(1713,1,fye,f$b);_.Ne=function g$b(a,b){return IZb(RD(a,148),RD(b,148))};_.Fb=function h$b(a){return this===a};_.Oe=function i$b(){return new Frb(this)};var sQ=sfb(JAe,'RectilinearConvexHull/lambda$2$Type',1713);feb(1714,1,fye,j$b);_.Ne=function k$b(a,b){return JZb(RD(a,148),RD(b,148))};_.Fb=function l$b(a){return this===a};_.Oe=function m$b(){return new Frb(this)};var tQ=sfb(JAe,'RectilinearConvexHull/lambda$3$Type',1714);feb(1715,1,fye,n$b);_.Ne=function o$b(a,b){return KZb(RD(a,148),RD(b,148))};_.Fb=function p$b(a){return this===a};_.Oe=function q$b(){return new Frb(this)};var uQ=sfb(JAe,'RectilinearConvexHull/lambda$4$Type',1715);feb(1716,1,{},s$b);var xQ=sfb(JAe,'Scanline',1716);feb(2104,1,{});var yQ=sfb(KAe,'AbstractGraphPlacer',2104);feb(335,1,{335:1},C$b);_.Ff=function D$b(a){if(this.Gf(a)){Rc(this.b,RD(mQb(a,(Ywc(),ewc)),21),a);return true}else{return false}};_.Gf=function E$b(a){var b,c,d,e;b=RD(mQb(a,(Ywc(),ewc)),21);e=RD(Qc(y$b,b),21);for(d=e.Kc();d.Ob();){c=RD(d.Pb(),21);if(!RD(Qc(this.b,c),15).dc()){return false}}return true};var y$b;var BQ=sfb(KAe,'ComponentGroup',335);feb(779,2104,{},J$b);_.Hf=function K$b(a){var b,c;for(c=new Anb(this.a);c.ac){k=0;l+=h+d;h=0}i=f.c;w$b(f,k+i.a,l+i.b);hjd(i);e=$wnd.Math.max(e,k+j.a);h=$wnd.Math.max(h,j.b);k+=j.a+d}b.f.a=e;b.f.b=l+h};_.Jf=function Y_b(a,b){var c,d,e,f,g;if(dE(mQb(b,(yCc(),Yzc)))===dE((U$b(),T$b))){for(d=a.Kc();d.Ob();){c=RD(d.Pb(),36);g=0;for(f=new Anb(c.a);f.ac&&!RD(mQb(f,(Ywc(),ewc)),21).Hc((qpd(),Yod))||!!i&&RD(mQb(i,(Ywc(),ewc)),21).Hc((qpd(),Xod))||RD(mQb(f,(Ywc(),ewc)),21).Hc((qpd(),ppd))){m=l;n+=h+d;h=0}j=f.c;RD(mQb(f,(Ywc(),ewc)),21).Hc((qpd(),Yod))&&(m=e+d);w$b(f,m+j.a,n+j.b);e=$wnd.Math.max(e,m+k.a);RD(mQb(f,ewc),21).Hc(npd)&&(l=$wnd.Math.max(l,m+k.a+d));hjd(j);h=$wnd.Math.max(h,k.b);m+=k.a+d;i=f}b.f.a=e;b.f.b=n+h};_.Jf=function __b(a,b){};var OQ=sfb(KAe,'ModelOrderRowGraphPlacer',1313);feb(1311,1,fye,b0b);_.Ne=function c0b(a,b){return a0b(RD(a,36),RD(b,36))};_.Fb=function d0b(a){return this===a};_.Oe=function e0b(){return new Frb(this)};var PQ=sfb(KAe,'SimpleRowGraphPlacer/1',1311);var f0b;feb(1280,1,xye,l0b);_.Lb=function m0b(a){var b;return b=RD(mQb(RD(a,249).b,(yCc(),RAc)),75),!!b&&b.b!=0};_.Fb=function n0b(a){return this===a};_.Mb=function o0b(a){var b;return b=RD(mQb(RD(a,249).b,(yCc(),RAc)),75),!!b&&b.b!=0};var RQ=sfb(PAe,'CompoundGraphPostprocessor/1',1280);feb(1279,1,QAe,E0b);_.Kf=function F0b(a,b){y0b(this,RD(a,36),b)};var TQ=sfb(PAe,'CompoundGraphPreprocessor',1279);feb(453,1,{453:1},G0b);_.c=false;var SQ=sfb(PAe,'CompoundGraphPreprocessor/ExternalPort',453);feb(249,1,{249:1},J0b);_.Ib=function K0b(){return ps(this.c)+':'+_0b(this.b)};var VQ=sfb(PAe,'CrossHierarchyEdge',249);feb(777,1,fye,M0b);_.Ne=function N0b(a,b){return L0b(this,RD(a,249),RD(b,249))};_.Fb=function O0b(a){return this===a};_.Oe=function Q0b(){return new Frb(this)};var UQ=sfb(PAe,'CrossHierarchyEdgeComparator',777);feb(305,137,{3:1,305:1,96:1,137:1});_.p=0;var dR=sfb(RAe,'LGraphElement',305);feb(18,305,{3:1,18:1,305:1,96:1,137:1},a1b);_.Ib=function b1b(){return _0b(this)};var WQ=sfb(RAe,'LEdge',18);feb(36,305,{3:1,20:1,36:1,305:1,96:1,137:1},d1b);_.Jc=function e1b(a){xgb(this,a)};_.Kc=function f1b(){return new Anb(this.b)};_.Ib=function g1b(){if(this.b.c.length==0){return 'G-unlayered'+Fe(this.a)}else if(this.a.c.length==0){return 'G-layered'+Fe(this.b)}return 'G[layerless'+Fe(this.a)+', layers'+Fe(this.b)+']'};var eR=sfb(RAe,'LGraph',36);var h1b;feb(666,1,{});_.Lf=function j1b(){return this.e.n};_.of=function k1b(a){return mQb(this.e,a)};_.Mf=function l1b(){return this.e.o};_.Nf=function m1b(){return this.e.p};_.pf=function n1b(a){return nQb(this.e,a)};_.Of=function o1b(a){this.e.n.a=a.a;this.e.n.b=a.b};_.Pf=function p1b(a){this.e.o.a=a.a;this.e.o.b=a.b};_.Qf=function q1b(a){this.e.p=a};var XQ=sfb(RAe,'LGraphAdapters/AbstractLShapeAdapter',666);feb(474,1,{853:1},r1b);_.Rf=function s1b(){var a,b;if(!this.b){this.b=ev(this.a.b.c.length);for(b=new Anb(this.a.b);b.a0&&M2b((BFb(c-1,b.length),b.charCodeAt(c-1)),ZAe)){--c}if(g> ',a),M3b(c));Zhb(Yhb((a.a+='[',a),c.i),']')}return a.a};_.c=true;_.d=false;var D3b,E3b,F3b,G3b,H3b,I3b;var xR=sfb(RAe,'LPort',12);feb(408,1,Vve,T3b);_.Jc=function U3b(a){xgb(this,a)};_.Kc=function V3b(){var a;a=new Anb(this.a.e);return new W3b(a)};var mR=sfb(RAe,'LPort/1',408);feb(1309,1,Ave,W3b);_.Nb=function X3b(a){Ztb(this,a)};_.Pb=function Z3b(){return RD(ynb(this.a),18).c};_.Ob=function Y3b(){return xnb(this.a)};_.Qb=function $3b(){znb(this.a)};var lR=sfb(RAe,'LPort/1/1',1309);feb(369,1,Vve,_3b);_.Jc=function a4b(a){xgb(this,a)};_.Kc=function b4b(){var a;return a=new Anb(this.a.g),new c4b(a)};var oR=sfb(RAe,'LPort/2',369);feb(776,1,Ave,c4b);_.Nb=function d4b(a){Ztb(this,a)};_.Pb=function f4b(){return RD(ynb(this.a),18).d};_.Ob=function e4b(){return xnb(this.a)};_.Qb=function g4b(){znb(this.a)};var nR=sfb(RAe,'LPort/2/1',776);feb(1302,1,Vve,h4b);_.Jc=function i4b(a){xgb(this,a)};_.Kc=function j4b(){return new l4b(this)};var qR=sfb(RAe,'LPort/CombineIter',1302);feb(208,1,Ave,l4b);_.Nb=function m4b(a){Ztb(this,a)};_.Qb=function p4b(){$tb()};_.Ob=function n4b(){return k4b(this)};_.Pb=function o4b(){return xnb(this.a)?ynb(this.a):ynb(this.b)};var pR=sfb(RAe,'LPort/CombineIter/1',208);feb(1303,1,xye,r4b);_.Lb=function s4b(a){return q4b(a)};_.Fb=function t4b(a){return this===a};_.Mb=function u4b(a){return J3b(),RD(a,12).g.c.length!=0};var rR=sfb(RAe,'LPort/lambda$0$Type',1303);feb(1304,1,xye,w4b);_.Lb=function x4b(a){return v4b(a)};_.Fb=function y4b(a){return this===a};_.Mb=function z4b(a){return J3b(),RD(a,12).e.c.length!=0};var sR=sfb(RAe,'LPort/lambda$1$Type',1304);feb(1305,1,xye,A4b);_.Lb=function B4b(a){return J3b(),RD(a,12).j==(qpd(),Yod)};_.Fb=function C4b(a){return this===a};_.Mb=function D4b(a){return J3b(),RD(a,12).j==(qpd(),Yod)};var tR=sfb(RAe,'LPort/lambda$2$Type',1305);feb(1306,1,xye,E4b);_.Lb=function F4b(a){return J3b(),RD(a,12).j==(qpd(),Xod)};_.Fb=function G4b(a){return this===a};_.Mb=function H4b(a){return J3b(),RD(a,12).j==(qpd(),Xod)};var uR=sfb(RAe,'LPort/lambda$3$Type',1306);feb(1307,1,xye,I4b);_.Lb=function J4b(a){return J3b(),RD(a,12).j==(qpd(),npd)};_.Fb=function K4b(a){return this===a};_.Mb=function L4b(a){return J3b(),RD(a,12).j==(qpd(),npd)};var vR=sfb(RAe,'LPort/lambda$4$Type',1307);feb(1308,1,xye,M4b);_.Lb=function N4b(a){return J3b(),RD(a,12).j==(qpd(),ppd)};_.Fb=function O4b(a){return this===a};_.Mb=function P4b(a){return J3b(),RD(a,12).j==(qpd(),ppd)};var wR=sfb(RAe,'LPort/lambda$5$Type',1308);feb(30,305,{3:1,20:1,305:1,30:1,96:1,137:1},R4b);_.Jc=function S4b(a){xgb(this,a)};_.Kc=function T4b(){return new Anb(this.a)};_.Ib=function U4b(){return 'L_'+Wmb(this.b.b,this,0)+Fe(this.a)};var zR=sfb(RAe,'Layer',30);feb(1330,1,{},k5b);var JR=sfb(cBe,dBe,1330);feb(1334,1,{},o5b);_.Kb=function p5b(a){return AGd(RD(a,84))};var AR=sfb(cBe,'ElkGraphImporter/0methodref$connectableShapeToNode$Type',1334);feb(1337,1,{},q5b);_.Kb=function r5b(a){return AGd(RD(a,84))};var BR=sfb(cBe,'ElkGraphImporter/1methodref$connectableShapeToNode$Type',1337);feb(1331,1,Qve,s5b);_.Cd=function t5b(a){$4b(this.a,RD(a,123))};var CR=sfb(cBe,Nze,1331);feb(1332,1,Qve,u5b);_.Cd=function v5b(a){$4b(this.a,RD(a,123))};var DR=sfb(cBe,eBe,1332);feb(1333,1,{},w5b);_.Kb=function x5b(a){return new SDb(null,new Swb(mzd(RD(a,74)),16))};var ER=sfb(cBe,fBe,1333);feb(1335,1,nwe,y5b);_.Mb=function z5b(a){return l5b(this.a,RD(a,27))};var FR=sfb(cBe,gBe,1335);feb(1336,1,{},A5b);_.Kb=function B5b(a){return new SDb(null,new Swb(lzd(RD(a,74)),16))};var GR=sfb(cBe,'ElkGraphImporter/lambda$5$Type',1336);feb(1338,1,nwe,C5b);_.Mb=function D5b(a){return m5b(this.a,RD(a,27))};var HR=sfb(cBe,'ElkGraphImporter/lambda$7$Type',1338);feb(1339,1,nwe,E5b);_.Mb=function F5b(a){return n5b(RD(a,74))};var IR=sfb(cBe,'ElkGraphImporter/lambda$8$Type',1339);feb(1297,1,{},N5b);var G5b;var OR=sfb(cBe,'ElkGraphLayoutTransferrer',1297);feb(1298,1,nwe,Q5b);_.Mb=function R5b(a){return O5b(this.a,RD(a,18))};var KR=sfb(cBe,'ElkGraphLayoutTransferrer/lambda$0$Type',1298);feb(1299,1,Qve,S5b);_.Cd=function T5b(a){H5b();Rmb(this.a,RD(a,18))};var LR=sfb(cBe,'ElkGraphLayoutTransferrer/lambda$1$Type',1299);feb(1300,1,nwe,U5b);_.Mb=function V5b(a){return P5b(this.a,RD(a,18))};var MR=sfb(cBe,'ElkGraphLayoutTransferrer/lambda$2$Type',1300);feb(1301,1,Qve,W5b);_.Cd=function X5b(a){H5b();Rmb(this.a,RD(a,18))};var NR=sfb(cBe,'ElkGraphLayoutTransferrer/lambda$3$Type',1301);feb(819,1,{},e6b);var PR=sfb(hBe,'BiLinkedHashMultiMap',819);feb(1550,1,QAe,h6b);_.Kf=function i6b(a,b){f6b(RD(a,36),b)};var SR=sfb(hBe,'CommentNodeMarginCalculator',1550);feb(1551,1,{},j6b);_.Kb=function k6b(a){return new SDb(null,new Swb(RD(a,30).a,16))};var QR=sfb(hBe,'CommentNodeMarginCalculator/lambda$0$Type',1551);feb(1552,1,Qve,l6b);_.Cd=function m6b(a){g6b(RD(a,10))};var RR=sfb(hBe,'CommentNodeMarginCalculator/lambda$1$Type',1552);feb(1553,1,QAe,q6b);_.Kf=function r6b(a,b){o6b(RD(a,36),b)};var TR=sfb(hBe,'CommentPostprocessor',1553);feb(1554,1,QAe,v6b);_.Kf=function w6b(a,b){s6b(RD(a,36),b)};var UR=sfb(hBe,'CommentPreprocessor',1554);feb(1555,1,QAe,y6b);_.Kf=function z6b(a,b){x6b(RD(a,36),b)};var VR=sfb(hBe,'ConstraintsPostprocessor',1555);feb(1556,1,QAe,G6b);_.Kf=function H6b(a,b){E6b(RD(a,36),b)};var WR=sfb(hBe,'EdgeAndLayerConstraintEdgeReverser',1556);feb(1557,1,QAe,K6b);_.Kf=function M6b(a,b){I6b(RD(a,36),b)};var $R=sfb(hBe,'EndLabelPostprocessor',1557);feb(1558,1,{},N6b);_.Kb=function O6b(a){return new SDb(null,new Swb(RD(a,30).a,16))};var XR=sfb(hBe,'EndLabelPostprocessor/lambda$0$Type',1558);feb(1559,1,nwe,P6b);_.Mb=function Q6b(a){return L6b(RD(a,10))};var YR=sfb(hBe,'EndLabelPostprocessor/lambda$1$Type',1559);feb(1560,1,Qve,R6b);_.Cd=function S6b(a){J6b(RD(a,10))};var ZR=sfb(hBe,'EndLabelPostprocessor/lambda$2$Type',1560);feb(1561,1,QAe,b7b);_.Kf=function e7b(a,b){Z6b(RD(a,36),b)};var fS=sfb(hBe,'EndLabelPreprocessor',1561);feb(1562,1,{},f7b);_.Kb=function g7b(a){return new SDb(null,new Swb(RD(a,30).a,16))};var _R=sfb(hBe,'EndLabelPreprocessor/lambda$0$Type',1562);feb(1563,1,Qve,h7b);_.Cd=function i7b(a){V6b(this.a,this.b,this.c,RD(a,10))};_.a=0;_.b=0;_.c=false;var aS=sfb(hBe,'EndLabelPreprocessor/lambda$1$Type',1563);feb(1564,1,nwe,j7b);_.Mb=function k7b(a){return dE(mQb(RD(a,72),(yCc(),wAc)))===dE((Omd(),Nmd))};var bS=sfb(hBe,'EndLabelPreprocessor/lambda$2$Type',1564);feb(1565,1,Qve,l7b);_.Cd=function m7b(a){Mub(this.a,RD(a,72))};var cS=sfb(hBe,'EndLabelPreprocessor/lambda$3$Type',1565);feb(1566,1,nwe,n7b);_.Mb=function o7b(a){return dE(mQb(RD(a,72),(yCc(),wAc)))===dE((Omd(),Mmd))};var dS=sfb(hBe,'EndLabelPreprocessor/lambda$4$Type',1566);feb(1567,1,Qve,p7b);_.Cd=function q7b(a){Mub(this.a,RD(a,72))};var eS=sfb(hBe,'EndLabelPreprocessor/lambda$5$Type',1567);feb(1615,1,QAe,z7b);_.Kf=function A7b(a,b){w7b(RD(a,36),b)};var r7b;var nS=sfb(hBe,'EndLabelSorter',1615);feb(1616,1,fye,C7b);_.Ne=function D7b(a,b){return B7b(RD(a,466),RD(b,466))};_.Fb=function E7b(a){return this===a};_.Oe=function F7b(){return new Frb(this)};var gS=sfb(hBe,'EndLabelSorter/1',1616);feb(466,1,{466:1},G7b);var hS=sfb(hBe,'EndLabelSorter/LabelGroup',466);feb(1617,1,{},H7b);_.Kb=function I7b(a){return s7b(),new SDb(null,new Swb(RD(a,30).a,16))};var iS=sfb(hBe,'EndLabelSorter/lambda$0$Type',1617);feb(1618,1,nwe,J7b);_.Mb=function K7b(a){return s7b(),RD(a,10).k==(r3b(),p3b)};var jS=sfb(hBe,'EndLabelSorter/lambda$1$Type',1618);feb(1619,1,Qve,L7b);_.Cd=function M7b(a){x7b(RD(a,10))};var kS=sfb(hBe,'EndLabelSorter/lambda$2$Type',1619);feb(1620,1,nwe,N7b);_.Mb=function O7b(a){return s7b(),dE(mQb(RD(a,72),(yCc(),wAc)))===dE((Omd(),Mmd))};var lS=sfb(hBe,'EndLabelSorter/lambda$3$Type',1620);feb(1621,1,nwe,P7b);_.Mb=function Q7b(a){return s7b(),dE(mQb(RD(a,72),(yCc(),wAc)))===dE((Omd(),Nmd))};var mS=sfb(hBe,'EndLabelSorter/lambda$4$Type',1621);feb(1568,1,QAe,a8b);_.Kf=function b8b(a,b){$7b(this,RD(a,36))};_.b=0;_.c=0;var uS=sfb(hBe,'FinalSplineBendpointsCalculator',1568);feb(1569,1,{},c8b);_.Kb=function d8b(a){return new SDb(null,new Swb(RD(a,30).a,16))};var oS=sfb(hBe,'FinalSplineBendpointsCalculator/lambda$0$Type',1569);feb(1570,1,{},e8b);_.Kb=function f8b(a){return new SDb(null,new Twb(new is(Mr(a3b(RD(a,10)).a.Kc(),new ir))))};var pS=sfb(hBe,'FinalSplineBendpointsCalculator/lambda$1$Type',1570);feb(1571,1,nwe,g8b);_.Mb=function h8b(a){return !W0b(RD(a,18))};var qS=sfb(hBe,'FinalSplineBendpointsCalculator/lambda$2$Type',1571);feb(1572,1,nwe,i8b);_.Mb=function j8b(a){return nQb(RD(a,18),(Ywc(),Twc))};var rS=sfb(hBe,'FinalSplineBendpointsCalculator/lambda$3$Type',1572);feb(1573,1,Qve,k8b);_.Cd=function l8b(a){T7b(this.a,RD(a,131))};var sS=sfb(hBe,'FinalSplineBendpointsCalculator/lambda$4$Type',1573);feb(1574,1,Qve,m8b);_.Cd=function n8b(a){Eob(RD(a,18).a)};var tS=sfb(hBe,'FinalSplineBendpointsCalculator/lambda$5$Type',1574);feb(803,1,QAe,L8b);_.Kf=function M8b(a,b){C8b(this,RD(a,36),b)};var wS=sfb(hBe,'GraphTransformer',803);feb(517,22,{3:1,34:1,22:1,517:1},Q8b);var N8b,O8b;var vS=tfb(hBe,'GraphTransformer/Mode',517,WI,S8b,R8b);var T8b;feb(1575,1,QAe,Z8b);_.Kf=function $8b(a,b){W8b(RD(a,36),b)};var xS=sfb(hBe,'HierarchicalNodeResizingProcessor',1575);feb(1576,1,QAe,f9b);_.Kf=function g9b(a,b){b9b(RD(a,36),b)};var zS=sfb(hBe,'HierarchicalPortConstraintProcessor',1576);feb(1577,1,fye,i9b);_.Ne=function j9b(a,b){return h9b(RD(a,10),RD(b,10))};_.Fb=function k9b(a){return this===a};_.Oe=function l9b(){return new Frb(this)};var yS=sfb(hBe,'HierarchicalPortConstraintProcessor/NodeComparator',1577);feb(1578,1,QAe,o9b);_.Kf=function p9b(a,b){m9b(RD(a,36),b)};var AS=sfb(hBe,'HierarchicalPortDummySizeProcessor',1578);feb(1579,1,QAe,C9b);_.Kf=function D9b(a,b){v9b(this,RD(a,36),b)};_.a=0;var DS=sfb(hBe,'HierarchicalPortOrthogonalEdgeRouter',1579);feb(1580,1,fye,F9b);_.Ne=function G9b(a,b){return E9b(RD(a,10),RD(b,10))};_.Fb=function H9b(a){return this===a};_.Oe=function I9b(){return new Frb(this)};var BS=sfb(hBe,'HierarchicalPortOrthogonalEdgeRouter/1',1580);feb(1581,1,fye,K9b);_.Ne=function L9b(a,b){return J9b(RD(a,10),RD(b,10))};_.Fb=function M9b(a){return this===a};_.Oe=function N9b(){return new Frb(this)};var CS=sfb(hBe,'HierarchicalPortOrthogonalEdgeRouter/2',1581);feb(1582,1,QAe,Q9b);_.Kf=function R9b(a,b){P9b(RD(a,36),b)};var ES=sfb(hBe,'HierarchicalPortPositionProcessor',1582);feb(1583,1,QAe,$9b);_.Kf=function _9b(a,b){Z9b(this,RD(a,36))};_.a=0;_.c=0;var S9b,T9b;var IS=sfb(hBe,'HighDegreeNodeLayeringProcessor',1583);feb(580,1,{580:1},aac);_.b=-1;_.d=-1;var FS=sfb(hBe,'HighDegreeNodeLayeringProcessor/HighDegreeNodeInformation',580);feb(1584,1,{},bac);_.Kb=function cac(a){return U9b(),Z2b(RD(a,10))};_.Fb=function dac(a){return this===a};var GS=sfb(hBe,'HighDegreeNodeLayeringProcessor/lambda$0$Type',1584);feb(1585,1,{},eac);_.Kb=function fac(a){return U9b(),a3b(RD(a,10))};_.Fb=function gac(a){return this===a};var HS=sfb(hBe,'HighDegreeNodeLayeringProcessor/lambda$1$Type',1585);feb(1591,1,QAe,mac);_.Kf=function nac(a,b){lac(this,RD(a,36),b)};var NS=sfb(hBe,'HyperedgeDummyMerger',1591);feb(804,1,{},oac);_.a=false;_.b=false;_.c=false;var JS=sfb(hBe,'HyperedgeDummyMerger/MergeState',804);feb(1592,1,{},pac);_.Kb=function qac(a){return new SDb(null,new Swb(RD(a,30).a,16))};var KS=sfb(hBe,'HyperedgeDummyMerger/lambda$0$Type',1592);feb(1593,1,{},rac);_.Kb=function sac(a){return new SDb(null,new Swb(RD(a,10).j,16))};var LS=sfb(hBe,'HyperedgeDummyMerger/lambda$1$Type',1593);feb(1594,1,Qve,tac);_.Cd=function uac(a){RD(a,12).p=-1};var MS=sfb(hBe,'HyperedgeDummyMerger/lambda$2$Type',1594);feb(1595,1,QAe,xac);_.Kf=function yac(a,b){wac(RD(a,36),b)};var OS=sfb(hBe,'HypernodesProcessor',1595);feb(1596,1,QAe,Aac);_.Kf=function Bac(a,b){zac(RD(a,36),b)};var PS=sfb(hBe,'InLayerConstraintProcessor',1596);feb(1597,1,QAe,Dac);_.Kf=function Eac(a,b){Cac(RD(a,36),b)};var QS=sfb(hBe,'InnermostNodeMarginCalculator',1597);feb(1598,1,QAe,Iac);_.Kf=function Nac(a,b){Hac(this,RD(a,36))};_.a=pxe;_.b=pxe;_.c=oxe;_.d=oxe;var XS=sfb(hBe,'InteractiveExternalPortPositioner',1598);feb(1599,1,{},Oac);_.Kb=function Pac(a){return RD(a,18).d.i};_.Fb=function Qac(a){return this===a};var RS=sfb(hBe,'InteractiveExternalPortPositioner/lambda$0$Type',1599);feb(1600,1,{},Rac);_.Kb=function Sac(a){return Jac(this.a,UD(a))};_.Fb=function Tac(a){return this===a};var SS=sfb(hBe,'InteractiveExternalPortPositioner/lambda$1$Type',1600);feb(1601,1,{},Uac);_.Kb=function Vac(a){return RD(a,18).c.i};_.Fb=function Wac(a){return this===a};var TS=sfb(hBe,'InteractiveExternalPortPositioner/lambda$2$Type',1601);feb(1602,1,{},Xac);_.Kb=function Yac(a){return Kac(this.a,UD(a))};_.Fb=function Zac(a){return this===a};var US=sfb(hBe,'InteractiveExternalPortPositioner/lambda$3$Type',1602);feb(1603,1,{},$ac);_.Kb=function _ac(a){return Lac(this.a,UD(a))};_.Fb=function abc(a){return this===a};var VS=sfb(hBe,'InteractiveExternalPortPositioner/lambda$4$Type',1603);feb(1604,1,{},bbc);_.Kb=function cbc(a){return Mac(this.a,UD(a))};_.Fb=function dbc(a){return this===a};var WS=sfb(hBe,'InteractiveExternalPortPositioner/lambda$5$Type',1604);feb(81,22,{3:1,34:1,22:1,81:1,196:1},icc);_.dg=function jcc(){switch(this.g){case 15:return new Hrc;case 22:return new bsc;case 47:return new ksc;case 28:case 35:return new Ldc;case 32:return new h6b;case 42:return new q6b;case 1:return new v6b;case 41:return new y6b;case 56:return new L8b((P8b(),O8b));case 0:return new L8b((P8b(),N8b));case 2:return new G6b;case 54:return new K6b;case 33:return new b7b;case 51:return new a8b;case 55:return new Z8b;case 13:return new f9b;case 38:return new o9b;case 44:return new C9b;case 40:return new Q9b;case 9:return new $9b;case 49:return new Yjc;case 37:return new mac;case 43:return new xac;case 27:return new Aac;case 30:return new Dac;case 3:return new Iac;case 18:return new scc;case 29:return new ycc;case 5:return new Lcc;case 50:return new Ucc;case 34:return new pdc;case 36:return new Zdc;case 52:return new z7b;case 11:return new fec;case 7:return new pec;case 39:return new Dec;case 45:return new Gec;case 16:return new Kec;case 10:return new _ec;case 48:return new Bfc;case 21:return new Ifc;case 23:return new FKc((RKc(),PKc));case 8:return new Rfc;case 12:return new Zfc;case 4:return new cgc;case 19:return new xgc;case 17:return new Vgc;case 53:return new Ygc;case 6:return new Nhc;case 25:return new ahc;case 46:return new rhc;case 31:return new Yhc;case 14:return new jic;case 26:return new Ssc;case 20:return new yic;case 24:return new FKc((RKc(),QKc));default:throw Adb(new agb(lBe+(this.f!=null?this.f:''+this.g)));}};var ebc,fbc,gbc,hbc,ibc,jbc,kbc,lbc,mbc,nbc,obc,pbc,qbc,rbc,sbc,tbc,ubc,vbc,wbc,xbc,ybc,zbc,Abc,Bbc,Cbc,Dbc,Ebc,Fbc,Gbc,Hbc,Ibc,Jbc,Kbc,Lbc,Mbc,Nbc,Obc,Pbc,Qbc,Rbc,Sbc,Tbc,Ubc,Vbc,Wbc,Xbc,Ybc,Zbc,$bc,_bc,acc,bcc,ccc,dcc,ecc,fcc,gcc;var YS=tfb(hBe,mBe,81,WI,lcc,kcc);var mcc;feb(1605,1,QAe,scc);_.Kf=function tcc(a,b){qcc(RD(a,36),b)};var ZS=sfb(hBe,'InvertedPortProcessor',1605);feb(1606,1,QAe,ycc);_.Kf=function zcc(a,b){xcc(RD(a,36),b)};var bT=sfb(hBe,'LabelAndNodeSizeProcessor',1606);feb(1607,1,nwe,Acc);_.Mb=function Bcc(a){return RD(a,10).k==(r3b(),p3b)};var $S=sfb(hBe,'LabelAndNodeSizeProcessor/lambda$0$Type',1607);feb(1608,1,nwe,Ccc);_.Mb=function Dcc(a){return RD(a,10).k==(r3b(),m3b)};var _S=sfb(hBe,'LabelAndNodeSizeProcessor/lambda$1$Type',1608);feb(1609,1,Qve,Ecc);_.Cd=function Fcc(a){vcc(this.b,this.a,this.c,RD(a,10))};_.a=false;_.c=false;var aT=sfb(hBe,'LabelAndNodeSizeProcessor/lambda$2$Type',1609);feb(1610,1,QAe,Lcc);_.Kf=function Mcc(a,b){Jcc(RD(a,36),b)};var Gcc;var dT=sfb(hBe,'LabelDummyInserter',1610);feb(1611,1,xye,Ncc);_.Lb=function Occ(a){return dE(mQb(RD(a,72),(yCc(),wAc)))===dE((Omd(),Lmd))};_.Fb=function Pcc(a){return this===a};_.Mb=function Qcc(a){return dE(mQb(RD(a,72),(yCc(),wAc)))===dE((Omd(),Lmd))};var cT=sfb(hBe,'LabelDummyInserter/1',1611);feb(1612,1,QAe,Ucc);_.Kf=function Vcc(a,b){Tcc(RD(a,36),b)};var fT=sfb(hBe,'LabelDummyRemover',1612);feb(1613,1,nwe,Wcc);_.Mb=function Xcc(a){return Heb(TD(mQb(RD(a,72),(yCc(),vAc))))};var eT=sfb(hBe,'LabelDummyRemover/lambda$0$Type',1613);feb(1378,1,QAe,pdc);_.Kf=function tdc(a,b){ldc(this,RD(a,36),b)};_.a=null;var Ycc;var mT=sfb(hBe,'LabelDummySwitcher',1378);feb(293,1,{293:1},xdc);_.c=0;_.d=null;_.f=0;var gT=sfb(hBe,'LabelDummySwitcher/LabelDummyInfo',293);feb(1379,1,{},ydc);_.Kb=function zdc(a){return Zcc(),new SDb(null,new Swb(RD(a,30).a,16))};var hT=sfb(hBe,'LabelDummySwitcher/lambda$0$Type',1379);feb(1380,1,nwe,Adc);_.Mb=function Bdc(a){return Zcc(),RD(a,10).k==(r3b(),n3b)};var iT=sfb(hBe,'LabelDummySwitcher/lambda$1$Type',1380);feb(1381,1,{},Cdc);_.Kb=function Ddc(a){return qdc(this.a,RD(a,10))};var jT=sfb(hBe,'LabelDummySwitcher/lambda$2$Type',1381);feb(1382,1,Qve,Edc);_.Cd=function Fdc(a){rdc(this.a,RD(a,293))};var kT=sfb(hBe,'LabelDummySwitcher/lambda$3$Type',1382);feb(1383,1,fye,Gdc);_.Ne=function Hdc(a,b){return sdc(RD(a,293),RD(b,293))};_.Fb=function Idc(a){return this===a};_.Oe=function Jdc(){return new Frb(this)};var lT=sfb(hBe,'LabelDummySwitcher/lambda$4$Type',1383);feb(802,1,QAe,Ldc);_.Kf=function Mdc(a,b){Kdc(RD(a,36),b)};var nT=sfb(hBe,'LabelManagementProcessor',802);feb(1614,1,QAe,Zdc);_.Kf=function $dc(a,b){Tdc(RD(a,36),b)};var oT=sfb(hBe,'LabelSideSelector',1614);feb(1622,1,QAe,fec);_.Kf=function gec(a,b){bec(RD(a,36),b)};var pT=sfb(hBe,'LayerConstraintPostprocessor',1622);feb(1623,1,QAe,pec);_.Kf=function qec(a,b){nec(RD(a,36),b)};var hec;var rT=sfb(hBe,'LayerConstraintPreprocessor',1623);feb(371,22,{3:1,34:1,22:1,371:1},xec);var rec,sec,tec,uec;var qT=tfb(hBe,'LayerConstraintPreprocessor/HiddenNodeConnections',371,WI,zec,yec);var Aec;feb(1624,1,QAe,Dec);_.Kf=function Eec(a,b){Cec(RD(a,36),b)};var sT=sfb(hBe,'LayerSizeAndGraphHeightCalculator',1624);feb(1625,1,QAe,Gec);_.Kf=function Iec(a,b){Fec(RD(a,36),b)};var tT=sfb(hBe,'LongEdgeJoiner',1625);feb(1626,1,QAe,Kec);_.Kf=function Mec(a,b){Jec(RD(a,36),b)};var uT=sfb(hBe,'LongEdgeSplitter',1626);feb(1627,1,QAe,_ec);_.Kf=function cfc(a,b){Vec(this,RD(a,36),b)};_.e=0;_.f=0;_.j=0;_.k=0;_.n=0;_.o=0;var Pec,Qec;var AT=sfb(hBe,'NodePromotion',1627);feb(1628,1,fye,efc);_.Ne=function ffc(a,b){return dfc(RD(a,10),RD(b,10))};_.Fb=function gfc(a){return this===a};_.Oe=function hfc(){return new Frb(this)};var vT=sfb(hBe,'NodePromotion/1',1628);feb(1629,1,fye,jfc);_.Ne=function kfc(a,b){return ifc(RD(a,10),RD(b,10))};_.Fb=function lfc(a){return this===a};_.Oe=function mfc(){return new Frb(this)};var wT=sfb(hBe,'NodePromotion/2',1629);feb(1630,1,{},nfc);_.Kb=function ofc(a){return RD(a,42),Rec(),Geb(),true};_.Fb=function pfc(a){return this===a};var xT=sfb(hBe,'NodePromotion/lambda$0$Type',1630);feb(1631,1,{},qfc);_.Kb=function rfc(a){return afc(this.a,RD(a,42))};_.Fb=function sfc(a){return this===a};_.a=0;var yT=sfb(hBe,'NodePromotion/lambda$1$Type',1631);feb(1632,1,{},tfc);_.Kb=function ufc(a){return bfc(this.a,RD(a,42))};_.Fb=function vfc(a){return this===a};_.a=0;var zT=sfb(hBe,'NodePromotion/lambda$2$Type',1632);feb(1633,1,QAe,Bfc);_.Kf=function Cfc(a,b){wfc(RD(a,36),b)};var BT=sfb(hBe,'NorthSouthPortPostprocessor',1633);feb(1634,1,QAe,Ifc);_.Kf=function Kfc(a,b){Gfc(RD(a,36),b)};var DT=sfb(hBe,'NorthSouthPortPreprocessor',1634);feb(1635,1,fye,Lfc);_.Ne=function Mfc(a,b){return Jfc(RD(a,12),RD(b,12))};_.Fb=function Nfc(a){return this===a};_.Oe=function Ofc(){return new Frb(this)};var CT=sfb(hBe,'NorthSouthPortPreprocessor/lambda$0$Type',1635);feb(1636,1,QAe,Rfc);_.Kf=function Tfc(a,b){Qfc(RD(a,36),b)};var GT=sfb(hBe,'PartitionMidprocessor',1636);feb(1637,1,nwe,Ufc);_.Mb=function Vfc(a){return nQb(RD(a,10),(yCc(),tBc))};var ET=sfb(hBe,'PartitionMidprocessor/lambda$0$Type',1637);feb(1638,1,Qve,Wfc);_.Cd=function Xfc(a){Sfc(this.a,RD(a,10))};var FT=sfb(hBe,'PartitionMidprocessor/lambda$1$Type',1638);feb(1639,1,QAe,Zfc);_.Kf=function $fc(a,b){Yfc(RD(a,36),b)};var HT=sfb(hBe,'PartitionPostprocessor',1639);feb(1640,1,QAe,cgc);_.Kf=function dgc(a,b){agc(RD(a,36),b)};var MT=sfb(hBe,'PartitionPreprocessor',1640);feb(1641,1,nwe,egc);_.Mb=function fgc(a){return nQb(RD(a,10),(yCc(),tBc))};var IT=sfb(hBe,'PartitionPreprocessor/lambda$0$Type',1641);feb(1642,1,{},ggc);_.Kb=function hgc(a){return new SDb(null,new Twb(new is(Mr(a3b(RD(a,10)).a.Kc(),new ir))))};var JT=sfb(hBe,'PartitionPreprocessor/lambda$1$Type',1642);feb(1643,1,nwe,igc);_.Mb=function jgc(a){return _fc(RD(a,18))};var KT=sfb(hBe,'PartitionPreprocessor/lambda$2$Type',1643);feb(1644,1,Qve,kgc);_.Cd=function lgc(a){bgc(RD(a,18))};var LT=sfb(hBe,'PartitionPreprocessor/lambda$3$Type',1644);feb(1645,1,QAe,xgc);_.Kf=function Bgc(a,b){ugc(RD(a,36),b)};var mgc,ngc,ogc,pgc,qgc,rgc;var ST=sfb(hBe,'PortListSorter',1645);feb(1648,1,fye,Dgc);_.Ne=function Egc(a,b){return ygc(RD(a,12),RD(b,12))};_.Fb=function Fgc(a){return this===a};_.Oe=function Ggc(){return new Frb(this)};var NT=sfb(hBe,'PortListSorter/lambda$0$Type',1648);feb(1650,1,fye,Hgc);_.Ne=function Igc(a,b){return zgc(RD(a,12),RD(b,12))};_.Fb=function Jgc(a){return this===a};_.Oe=function Kgc(){return new Frb(this)};var OT=sfb(hBe,'PortListSorter/lambda$1$Type',1650);feb(1646,1,{},Lgc);_.Kb=function Mgc(a){return sgc(),RD(a,12).e};var PT=sfb(hBe,'PortListSorter/lambda$2$Type',1646);feb(1647,1,{},Ngc);_.Kb=function Ogc(a){return sgc(),RD(a,12).g};var QT=sfb(hBe,'PortListSorter/lambda$3$Type',1647);feb(1649,1,fye,Pgc);_.Ne=function Qgc(a,b){return Agc(RD(a,12),RD(b,12))};_.Fb=function Rgc(a){return this===a};_.Oe=function Sgc(){return new Frb(this)};var RT=sfb(hBe,'PortListSorter/lambda$4$Type',1649);feb(1651,1,QAe,Vgc);_.Kf=function Wgc(a,b){Tgc(RD(a,36),b)};var TT=sfb(hBe,'PortSideProcessor',1651);feb(1652,1,QAe,Ygc);_.Kf=function Zgc(a,b){Xgc(RD(a,36),b)};var UT=sfb(hBe,'ReversedEdgeRestorer',1652);feb(1657,1,QAe,ahc);_.Kf=function bhc(a,b){$gc(this,RD(a,36),b)};var _T=sfb(hBe,'SelfLoopPortRestorer',1657);feb(1658,1,{},chc);_.Kb=function dhc(a){return new SDb(null,new Swb(RD(a,30).a,16))};var VT=sfb(hBe,'SelfLoopPortRestorer/lambda$0$Type',1658);feb(1659,1,nwe,ehc);_.Mb=function fhc(a){return RD(a,10).k==(r3b(),p3b)};var WT=sfb(hBe,'SelfLoopPortRestorer/lambda$1$Type',1659);feb(1660,1,nwe,ghc);_.Mb=function hhc(a){return nQb(RD(a,10),(Ywc(),Pwc))};var XT=sfb(hBe,'SelfLoopPortRestorer/lambda$2$Type',1660);feb(1661,1,{},ihc);_.Kb=function jhc(a){return RD(mQb(RD(a,10),(Ywc(),Pwc)),337)};var YT=sfb(hBe,'SelfLoopPortRestorer/lambda$3$Type',1661);feb(1662,1,Qve,khc);_.Cd=function lhc(a){_gc(this.a,RD(a,337))};var ZT=sfb(hBe,'SelfLoopPortRestorer/lambda$4$Type',1662);feb(805,1,Qve,mhc);_.Cd=function nhc(a){Rmc(RD(a,105))};var $T=sfb(hBe,'SelfLoopPortRestorer/lambda$5$Type',805);feb(1663,1,QAe,rhc);_.Kf=function thc(a,b){ohc(RD(a,36),b)};var iU=sfb(hBe,'SelfLoopPostProcessor',1663);feb(1664,1,{},uhc);_.Kb=function vhc(a){return new SDb(null,new Swb(RD(a,30).a,16))};var aU=sfb(hBe,'SelfLoopPostProcessor/lambda$0$Type',1664);feb(1665,1,nwe,whc);_.Mb=function xhc(a){return RD(a,10).k==(r3b(),p3b)};var bU=sfb(hBe,'SelfLoopPostProcessor/lambda$1$Type',1665);feb(1666,1,nwe,yhc);_.Mb=function zhc(a){return nQb(RD(a,10),(Ywc(),Pwc))};var cU=sfb(hBe,'SelfLoopPostProcessor/lambda$2$Type',1666);feb(1667,1,Qve,Ahc);_.Cd=function Bhc(a){phc(RD(a,10))};var dU=sfb(hBe,'SelfLoopPostProcessor/lambda$3$Type',1667);feb(1668,1,{},Chc);_.Kb=function Dhc(a){return new SDb(null,new Swb(RD(a,105).f,1))};var eU=sfb(hBe,'SelfLoopPostProcessor/lambda$4$Type',1668);feb(1669,1,Qve,Ehc);_.Cd=function Fhc(a){qhc(this.a,RD(a,340))};var fU=sfb(hBe,'SelfLoopPostProcessor/lambda$5$Type',1669);feb(1670,1,nwe,Ghc);_.Mb=function Hhc(a){return !!RD(a,105).i};var gU=sfb(hBe,'SelfLoopPostProcessor/lambda$6$Type',1670);feb(1671,1,Qve,Ihc);_.Cd=function Jhc(a){shc(this.a,RD(a,105))};var hU=sfb(hBe,'SelfLoopPostProcessor/lambda$7$Type',1671);feb(1653,1,QAe,Nhc);_.Kf=function Ohc(a,b){Mhc(RD(a,36),b)};var mU=sfb(hBe,'SelfLoopPreProcessor',1653);feb(1654,1,{},Phc);_.Kb=function Qhc(a){return new SDb(null,new Swb(RD(a,105).f,1))};var jU=sfb(hBe,'SelfLoopPreProcessor/lambda$0$Type',1654);feb(1655,1,{},Rhc);_.Kb=function Shc(a){return RD(a,340).a};var kU=sfb(hBe,'SelfLoopPreProcessor/lambda$1$Type',1655);feb(1656,1,Qve,Thc);_.Cd=function Uhc(a){Lhc(RD(a,18))};var lU=sfb(hBe,'SelfLoopPreProcessor/lambda$2$Type',1656);feb(1672,1,QAe,Yhc);_.Kf=function Zhc(a,b){Whc(this,RD(a,36),b)};var sU=sfb(hBe,'SelfLoopRouter',1672);feb(1673,1,{},$hc);_.Kb=function _hc(a){return new SDb(null,new Swb(RD(a,30).a,16))};var nU=sfb(hBe,'SelfLoopRouter/lambda$0$Type',1673);feb(1674,1,nwe,aic);_.Mb=function bic(a){return RD(a,10).k==(r3b(),p3b)};var oU=sfb(hBe,'SelfLoopRouter/lambda$1$Type',1674);feb(1675,1,nwe,cic);_.Mb=function dic(a){return nQb(RD(a,10),(Ywc(),Pwc))};var pU=sfb(hBe,'SelfLoopRouter/lambda$2$Type',1675);feb(1676,1,{},eic);_.Kb=function fic(a){return RD(mQb(RD(a,10),(Ywc(),Pwc)),337)};var qU=sfb(hBe,'SelfLoopRouter/lambda$3$Type',1676);feb(1677,1,Qve,gic);_.Cd=function hic(a){Vhc(this.a,this.b,RD(a,337))};var rU=sfb(hBe,'SelfLoopRouter/lambda$4$Type',1677);feb(1678,1,QAe,jic);_.Kf=function mic(a,b){iic(RD(a,36),b)};var xU=sfb(hBe,'SemiInteractiveCrossMinProcessor',1678);feb(1679,1,nwe,nic);_.Mb=function oic(a){return RD(a,10).k==(r3b(),p3b)};var tU=sfb(hBe,'SemiInteractiveCrossMinProcessor/lambda$0$Type',1679);feb(1680,1,nwe,pic);_.Mb=function qic(a){return lQb(RD(a,10))._b((yCc(),IBc))};var uU=sfb(hBe,'SemiInteractiveCrossMinProcessor/lambda$1$Type',1680);feb(1681,1,fye,ric);_.Ne=function sic(a,b){return kic(RD(a,10),RD(b,10))};_.Fb=function tic(a){return this===a};_.Oe=function uic(){return new Frb(this)};var vU=sfb(hBe,'SemiInteractiveCrossMinProcessor/lambda$2$Type',1681);feb(1682,1,{},vic);_.Ve=function wic(a,b){return lic(RD(a,10),RD(b,10))};var wU=sfb(hBe,'SemiInteractiveCrossMinProcessor/lambda$3$Type',1682);feb(1684,1,QAe,yic);_.Kf=function Cic(a,b){xic(RD(a,36),b)};var AU=sfb(hBe,'SortByInputModelProcessor',1684);feb(1685,1,nwe,Dic);_.Mb=function Eic(a){return RD(a,12).g.c.length!=0};var yU=sfb(hBe,'SortByInputModelProcessor/lambda$0$Type',1685);feb(1686,1,Qve,Fic);_.Cd=function Gic(a){Aic(this.a,RD(a,12))};var zU=sfb(hBe,'SortByInputModelProcessor/lambda$1$Type',1686);feb(1759,817,{},Pic);_.df=function Qic(a){var b,c,d,e;this.c=a;switch(this.a.g){case 2:b=new bnb;FDb(CDb(new SDb(null,new Swb(this.c.a.b,16)),new Rjc),new Tjc(this,b));eHb(this,new Zic);Umb(b,new bjc);b.c.length=0;FDb(CDb(new SDb(null,new Swb(this.c.a.b,16)),new djc),new fjc(b));eHb(this,new jjc);Umb(b,new njc);b.c.length=0;c=Wvb(TCb(HDb(new SDb(null,new Swb(this.c.a.b,16)),new pjc(this))),new rjc);FDb(new SDb(null,new Swb(this.c.a.a,16)),new vjc(c,b));eHb(this,new zjc);Umb(b,new Djc);b.c.length=0;break;case 3:d=new bnb;eHb(this,new Ric);e=Wvb(TCb(HDb(new SDb(null,new Swb(this.c.a.b,16)),new Vic(this))),new tjc);FDb(CDb(new SDb(null,new Swb(this.c.a.b,16)),new Fjc),new Hjc(e,d));eHb(this,new Ljc);Umb(d,new Pjc);d.c.length=0;break;default:throw Adb(new Ied);}};_.b=0;var ZU=sfb(rBe,'EdgeAwareScanlineConstraintCalculation',1759);feb(1760,1,xye,Ric);_.Lb=function Sic(a){return ZD(RD(a,60).g,154)};_.Fb=function Tic(a){return this===a};_.Mb=function Uic(a){return ZD(RD(a,60).g,154)};var BU=sfb(rBe,'EdgeAwareScanlineConstraintCalculation/lambda$0$Type',1760);feb(1761,1,{},Vic);_.Ye=function Wic(a){return Jic(this.a,RD(a,60))};var CU=sfb(rBe,'EdgeAwareScanlineConstraintCalculation/lambda$1$Type',1761);feb(1769,1,owe,Xic);_.de=function Yic(){Iic(this.a,this.b,-1)};_.b=0;var DU=sfb(rBe,'EdgeAwareScanlineConstraintCalculation/lambda$10$Type',1769);feb(1771,1,xye,Zic);_.Lb=function $ic(a){return ZD(RD(a,60).g,154)};_.Fb=function _ic(a){return this===a};_.Mb=function ajc(a){return ZD(RD(a,60).g,154)};var EU=sfb(rBe,'EdgeAwareScanlineConstraintCalculation/lambda$11$Type',1771);feb(1772,1,Qve,bjc);_.Cd=function cjc(a){RD(a,380).de()};var FU=sfb(rBe,'EdgeAwareScanlineConstraintCalculation/lambda$12$Type',1772);feb(1773,1,nwe,djc);_.Mb=function ejc(a){return ZD(RD(a,60).g,10)};var GU=sfb(rBe,'EdgeAwareScanlineConstraintCalculation/lambda$13$Type',1773);feb(1775,1,Qve,fjc);_.Cd=function gjc(a){Kic(this.a,RD(a,60))};var HU=sfb(rBe,'EdgeAwareScanlineConstraintCalculation/lambda$14$Type',1775);feb(1774,1,owe,hjc);_.de=function ijc(){Iic(this.b,this.a,-1)};_.a=0;var IU=sfb(rBe,'EdgeAwareScanlineConstraintCalculation/lambda$15$Type',1774);feb(1776,1,xye,jjc);_.Lb=function kjc(a){return ZD(RD(a,60).g,10)};_.Fb=function ljc(a){return this===a};_.Mb=function mjc(a){return ZD(RD(a,60).g,10)};var JU=sfb(rBe,'EdgeAwareScanlineConstraintCalculation/lambda$16$Type',1776);feb(1777,1,Qve,njc);_.Cd=function ojc(a){RD(a,380).de()};var KU=sfb(rBe,'EdgeAwareScanlineConstraintCalculation/lambda$17$Type',1777);feb(1778,1,{},pjc);_.Ye=function qjc(a){return Lic(this.a,RD(a,60))};var LU=sfb(rBe,'EdgeAwareScanlineConstraintCalculation/lambda$18$Type',1778);feb(1779,1,{},rjc);_.We=function sjc(){return 0};var MU=sfb(rBe,'EdgeAwareScanlineConstraintCalculation/lambda$19$Type',1779);feb(1762,1,{},tjc);_.We=function ujc(){return 0};var NU=sfb(rBe,'EdgeAwareScanlineConstraintCalculation/lambda$2$Type',1762);feb(1781,1,Qve,vjc);_.Cd=function wjc(a){Mic(this.a,this.b,RD(a,316))};_.a=0;var OU=sfb(rBe,'EdgeAwareScanlineConstraintCalculation/lambda$20$Type',1781);feb(1780,1,owe,xjc);_.de=function yjc(){Hic(this.a,this.b,-1)};_.b=0;var PU=sfb(rBe,'EdgeAwareScanlineConstraintCalculation/lambda$21$Type',1780);feb(1782,1,xye,zjc);_.Lb=function Ajc(a){return RD(a,60),true};_.Fb=function Bjc(a){return this===a};_.Mb=function Cjc(a){return RD(a,60),true};var QU=sfb(rBe,'EdgeAwareScanlineConstraintCalculation/lambda$22$Type',1782);feb(1783,1,Qve,Djc);_.Cd=function Ejc(a){RD(a,380).de()};var RU=sfb(rBe,'EdgeAwareScanlineConstraintCalculation/lambda$23$Type',1783);feb(1763,1,nwe,Fjc);_.Mb=function Gjc(a){return ZD(RD(a,60).g,10)};var SU=sfb(rBe,'EdgeAwareScanlineConstraintCalculation/lambda$3$Type',1763);feb(1765,1,Qve,Hjc);_.Cd=function Ijc(a){Nic(this.a,this.b,RD(a,60))};_.a=0;var TU=sfb(rBe,'EdgeAwareScanlineConstraintCalculation/lambda$4$Type',1765);feb(1764,1,owe,Jjc);_.de=function Kjc(){Iic(this.b,this.a,-1)};_.a=0;var UU=sfb(rBe,'EdgeAwareScanlineConstraintCalculation/lambda$5$Type',1764);feb(1766,1,xye,Ljc);_.Lb=function Mjc(a){return RD(a,60),true};_.Fb=function Njc(a){return this===a};_.Mb=function Ojc(a){return RD(a,60),true};var VU=sfb(rBe,'EdgeAwareScanlineConstraintCalculation/lambda$6$Type',1766);feb(1767,1,Qve,Pjc);_.Cd=function Qjc(a){RD(a,380).de()};var WU=sfb(rBe,'EdgeAwareScanlineConstraintCalculation/lambda$7$Type',1767);feb(1768,1,nwe,Rjc);_.Mb=function Sjc(a){return ZD(RD(a,60).g,154)};var XU=sfb(rBe,'EdgeAwareScanlineConstraintCalculation/lambda$8$Type',1768);feb(1770,1,Qve,Tjc);_.Cd=function Ujc(a){Oic(this.a,this.b,RD(a,60))};var YU=sfb(rBe,'EdgeAwareScanlineConstraintCalculation/lambda$9$Type',1770);feb(1586,1,QAe,Yjc);_.Kf=function bkc(a,b){Xjc(this,RD(a,36),b)};var Vjc;var bV=sfb(rBe,'HorizontalGraphCompactor',1586);feb(1587,1,{},ckc);_.ff=function dkc(a,b){var c,d,e;if(_jc(a,b)){return 0}c=Zjc(a);d=Zjc(b);if(!!c&&c.k==(r3b(),m3b)||!!d&&d.k==(r3b(),m3b)){return 0}e=RD(mQb(this.a.a,(Ywc(),Qwc)),312);return ZEc(e,c?c.k:(r3b(),o3b),d?d.k:(r3b(),o3b))};_.gf=function ekc(a,b){var c,d,e;if(_jc(a,b)){return 1}c=Zjc(a);d=Zjc(b);e=RD(mQb(this.a.a,(Ywc(),Qwc)),312);return aFc(e,c?c.k:(r3b(),o3b),d?d.k:(r3b(),o3b))};var $U=sfb(rBe,'HorizontalGraphCompactor/1',1587);feb(1588,1,{},fkc);_.ef=function gkc(a,b){return Wjc(),a.a.i==0};var _U=sfb(rBe,'HorizontalGraphCompactor/lambda$0$Type',1588);feb(1589,1,{},hkc);_.ef=function ikc(a,b){return akc(this.a,a,b)};var aV=sfb(rBe,'HorizontalGraphCompactor/lambda$1$Type',1589);feb(1730,1,{},Ckc);var jkc,kkc;var BV=sfb(rBe,'LGraphToCGraphTransformer',1730);feb(1738,1,nwe,Kkc);_.Mb=function Lkc(a){return a!=null};var cV=sfb(rBe,'LGraphToCGraphTransformer/0methodref$nonNull$Type',1738);feb(1731,1,{},Mkc);_.Kb=function Nkc(a){return lkc(),jeb(mQb(RD(RD(a,60).g,10),(Ywc(),Awc)))};var dV=sfb(rBe,'LGraphToCGraphTransformer/lambda$0$Type',1731);feb(1732,1,{},Okc);_.Kb=function Pkc(a){return lkc(),Mlc(RD(RD(a,60).g,154))};var eV=sfb(rBe,'LGraphToCGraphTransformer/lambda$1$Type',1732);feb(1741,1,nwe,Qkc);_.Mb=function Rkc(a){return lkc(),ZD(RD(a,60).g,10)};var fV=sfb(rBe,'LGraphToCGraphTransformer/lambda$10$Type',1741);feb(1742,1,Qve,Skc);_.Cd=function Tkc(a){Dkc(RD(a,60))};var gV=sfb(rBe,'LGraphToCGraphTransformer/lambda$11$Type',1742);feb(1743,1,nwe,Ukc);_.Mb=function Vkc(a){return lkc(),ZD(RD(a,60).g,154)};var hV=sfb(rBe,'LGraphToCGraphTransformer/lambda$12$Type',1743);feb(1747,1,Qve,Wkc);_.Cd=function Xkc(a){Ekc(RD(a,60))};var iV=sfb(rBe,'LGraphToCGraphTransformer/lambda$13$Type',1747);feb(1744,1,Qve,Ykc);_.Cd=function Zkc(a){Fkc(this.a,RD(a,8))};_.a=0;var jV=sfb(rBe,'LGraphToCGraphTransformer/lambda$14$Type',1744);feb(1745,1,Qve,$kc);_.Cd=function _kc(a){Gkc(this.a,RD(a,116))};_.a=0;var kV=sfb(rBe,'LGraphToCGraphTransformer/lambda$15$Type',1745);feb(1746,1,Qve,alc);_.Cd=function blc(a){Hkc(this.a,RD(a,8))};_.a=0;var lV=sfb(rBe,'LGraphToCGraphTransformer/lambda$16$Type',1746);feb(1748,1,{},clc);_.Kb=function dlc(a){return lkc(),new SDb(null,new Twb(new is(Mr(a3b(RD(a,10)).a.Kc(),new ir))))};var mV=sfb(rBe,'LGraphToCGraphTransformer/lambda$17$Type',1748);feb(1749,1,nwe,elc);_.Mb=function flc(a){return lkc(),W0b(RD(a,18))};var nV=sfb(rBe,'LGraphToCGraphTransformer/lambda$18$Type',1749);feb(1750,1,Qve,glc);_.Cd=function hlc(a){ukc(this.a,RD(a,18))};var oV=sfb(rBe,'LGraphToCGraphTransformer/lambda$19$Type',1750);feb(1734,1,Qve,ilc);_.Cd=function jlc(a){vkc(this.a,RD(a,154))};var pV=sfb(rBe,'LGraphToCGraphTransformer/lambda$2$Type',1734);feb(1751,1,{},klc);_.Kb=function llc(a){return lkc(),new SDb(null,new Swb(RD(a,30).a,16))};var qV=sfb(rBe,'LGraphToCGraphTransformer/lambda$20$Type',1751);feb(1752,1,{},mlc);_.Kb=function nlc(a){return lkc(),new SDb(null,new Twb(new is(Mr(a3b(RD(a,10)).a.Kc(),new ir))))};var rV=sfb(rBe,'LGraphToCGraphTransformer/lambda$21$Type',1752);feb(1753,1,{},olc);_.Kb=function plc(a){return lkc(),RD(mQb(RD(a,18),(Ywc(),Twc)),15)};var sV=sfb(rBe,'LGraphToCGraphTransformer/lambda$22$Type',1753);feb(1754,1,nwe,qlc);_.Mb=function rlc(a){return Ikc(RD(a,15))};var tV=sfb(rBe,'LGraphToCGraphTransformer/lambda$23$Type',1754);feb(1755,1,Qve,slc);_.Cd=function tlc(a){nkc(this.a,RD(a,15))};var uV=sfb(rBe,'LGraphToCGraphTransformer/lambda$24$Type',1755);feb(1733,1,Qve,ulc);_.Cd=function vlc(a){wkc(this.a,this.b,RD(a,154))};var vV=sfb(rBe,'LGraphToCGraphTransformer/lambda$3$Type',1733);feb(1735,1,{},wlc);_.Kb=function xlc(a){return lkc(),new SDb(null,new Swb(RD(a,30).a,16))};var wV=sfb(rBe,'LGraphToCGraphTransformer/lambda$4$Type',1735);feb(1736,1,{},ylc);_.Kb=function zlc(a){return lkc(),new SDb(null,new Twb(new is(Mr(a3b(RD(a,10)).a.Kc(),new ir))))};var xV=sfb(rBe,'LGraphToCGraphTransformer/lambda$5$Type',1736);feb(1737,1,{},Alc);_.Kb=function Blc(a){return lkc(),RD(mQb(RD(a,18),(Ywc(),Twc)),15)};var yV=sfb(rBe,'LGraphToCGraphTransformer/lambda$6$Type',1737);feb(1739,1,Qve,Clc);_.Cd=function Dlc(a){Jkc(this.a,RD(a,15))};var zV=sfb(rBe,'LGraphToCGraphTransformer/lambda$8$Type',1739);feb(1740,1,Qve,Elc);_.Cd=function Flc(a){xkc(this.a,this.b,RD(a,154))};var AV=sfb(rBe,'LGraphToCGraphTransformer/lambda$9$Type',1740);feb(1729,1,{},Jlc);_.cf=function Klc(a){var b,c,d,e,f;this.a=a;this.d=new BIb;this.c=$C(DN,rve,125,this.a.a.a.c.length,0,1);this.b=0;for(c=new Anb(this.a.a.a);c.a=p){Rmb(f,sgb(k));s=$wnd.Math.max(s,t[k-1]-l);h+=o;q+=t[k-1]-q;l=t[k-1];o=i[k]}o=$wnd.Math.max(o,i[k]);++k}h+=o}n=$wnd.Math.min(1/s,1/b.b/h);if(n>d){d=n;c=f}}return c};_.pg=function Psc(){return false};var XW=sfb(zBe,'MSDCutIndexHeuristic',816);feb(1683,1,QAe,Ssc);_.Kf=function Tsc(a,b){Rsc(RD(a,36),b)};var YW=sfb(zBe,'SingleEdgeGraphWrapper',1683);feb(232,22,{3:1,34:1,22:1,232:1},ctc);var Xsc,Ysc,Zsc,$sc,_sc,atc;var ZW=tfb(ABe,'CenterEdgeLabelPlacementStrategy',232,WI,etc,dtc);var ftc;feb(431,22,{3:1,34:1,22:1,431:1},ktc);var htc,itc;var $W=tfb(ABe,'ConstraintCalculationStrategy',431,WI,mtc,ltc);var ntc;feb(322,22,{3:1,34:1,22:1,322:1,188:1,196:1},utc);_.dg=function wtc(){return ttc(this)};_.qg=function vtc(){return ttc(this)};var ptc,qtc,rtc;var _W=tfb(ABe,'CrossingMinimizationStrategy',322,WI,ytc,xtc);var ztc;feb(351,22,{3:1,34:1,22:1,351:1},Ftc);var Btc,Ctc,Dtc;var aX=tfb(ABe,'CuttingStrategy',351,WI,Htc,Gtc);var Itc;feb(348,22,{3:1,34:1,22:1,348:1,188:1,196:1},Rtc);_.dg=function Ttc(){return Qtc(this)};_.qg=function Stc(){return Qtc(this)};var Ktc,Ltc,Mtc,Ntc,Otc;var bX=tfb(ABe,'CycleBreakingStrategy',348,WI,Vtc,Utc);var Wtc;feb(428,22,{3:1,34:1,22:1,428:1},_tc);var Ytc,Ztc;var cX=tfb(ABe,'DirectionCongruency',428,WI,buc,auc);var cuc;feb(460,22,{3:1,34:1,22:1,460:1},iuc);var euc,fuc,guc;var dX=tfb(ABe,'EdgeConstraint',460,WI,kuc,juc);var luc;feb(283,22,{3:1,34:1,22:1,283:1},vuc);var nuc,ouc,puc,quc,ruc,suc;var eX=tfb(ABe,'EdgeLabelSideSelection',283,WI,xuc,wuc);var yuc;feb(488,22,{3:1,34:1,22:1,488:1},Duc);var Auc,Buc;var fX=tfb(ABe,'EdgeStraighteningStrategy',488,WI,Fuc,Euc);var Guc;feb(281,22,{3:1,34:1,22:1,281:1},Puc);var Iuc,Juc,Kuc,Luc,Muc,Nuc;var gX=tfb(ABe,'FixedAlignment',281,WI,Ruc,Quc);var Suc;feb(282,22,{3:1,34:1,22:1,282:1},_uc);var Uuc,Vuc,Wuc,Xuc,Yuc,Zuc;var hX=tfb(ABe,'GraphCompactionStrategy',282,WI,bvc,avc);var cvc;feb(259,22,{3:1,34:1,22:1,259:1},pvc);var evc,fvc,gvc,hvc,ivc,jvc,kvc,lvc,mvc,nvc;var iX=tfb(ABe,'GraphProperties',259,WI,rvc,qvc);var svc;feb(299,22,{3:1,34:1,22:1,299:1},yvc);var uvc,vvc,wvc;var jX=tfb(ABe,'GreedySwitchType',299,WI,Avc,zvc);var Bvc;feb(311,22,{3:1,34:1,22:1,311:1},Hvc);var Dvc,Evc,Fvc;var kX=tfb(ABe,'InLayerConstraint',311,WI,Jvc,Ivc);var Kvc;feb(429,22,{3:1,34:1,22:1,429:1},Pvc);var Mvc,Nvc;var lX=tfb(ABe,'InteractiveReferencePoint',429,WI,Rvc,Qvc);var Svc;var Uvc,Vvc,Wvc,Xvc,Yvc,Zvc,$vc,_vc,awc,bwc,cwc,dwc,ewc,fwc,gwc,hwc,iwc,jwc,kwc,lwc,mwc,nwc,owc,pwc,qwc,rwc,swc,twc,uwc,vwc,wwc,xwc,ywc,zwc,Awc,Bwc,Cwc,Dwc,Ewc,Fwc,Gwc,Hwc,Iwc,Jwc,Kwc,Lwc,Mwc,Nwc,Owc,Pwc,Qwc,Rwc,Swc,Twc,Uwc,Vwc,Wwc,Xwc;feb(171,22,{3:1,34:1,22:1,171:1},dxc);var Zwc,$wc,_wc,axc,bxc;var mX=tfb(ABe,'LayerConstraint',171,WI,fxc,exc);var gxc;feb(859,1,Eye,Pzc);_.hf=function Qzc(a){Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,HBe),''),'Direction Congruency'),'Specifies how drawings of the same graph with different layout directions compare to each other: either a natural reading direction is preserved or the drawings are rotated versions of each other.'),Uxc),(kid(),eid)),cX),xsb((Yhd(),Whd)))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,IBe),''),'Feedback Edges'),'Whether feedback edges should be highlighted by routing around the nodes.'),(Geb(),false)),cid),QI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,JBe),''),'Interactive Reference Point'),'Determines which point of a node is considered by interactive layout phases.'),pyc),eid),lX),xsb(Whd))));zgd(a,JBe,RBe,ryc);zgd(a,JBe,_Be,qyc);Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,KBe),''),'Merge Edges'),'Edges that have no ports are merged so they touch the connected nodes at the same points. When this option is disabled, one port is created for each edge directly connected to a node. When it is enabled, all such incoming edges share an input port, and all outgoing edges share an output port.'),false),cid),QI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,LBe),''),'Merge Hierarchy-Crossing Edges'),'If hierarchical layout is active, hierarchy-crossing edges use as few hierarchical ports as possible. They are broken by the algorithm, with hierarchical ports inserted as required. Usually, one such port is created for each edge at each hierarchy crossing point. With this option set to true, we try to create as few hierarchical ports as possible in the process. In particular, all edges that form a hyperedge can share a port.'),true),cid),QI),xsb(Whd))));Egd(a,new Ahd(Nhd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,MBe),''),'Allow Non-Flow Ports To Switch Sides'),"Specifies whether non-flow ports may switch sides if their node's port constraints are either FIXED_SIDE or FIXED_ORDER. A non-flow port is a port on a side that is not part of the currently configured layout flow. For instance, given a left-to-right layout direction, north and south ports would be considered non-flow ports. Further note that the underlying criterium whether to switch sides or not solely relies on the minimization of edge crossings. Hence, edge length and other aesthetics criteria are not addressed."),false),cid),QI),xsb(Xhd)),cD(WC(qJ,1),Nve,2,6,['org.eclipse.elk.layered.northOrSouthPort']))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,NBe),''),'Port Sorting Strategy'),"Only relevant for nodes with FIXED_SIDE port constraints. Determines the way a node's ports are distributed on the sides of a node if their order is not prescribed. The option is set on parent nodes."),azc),eid),xX),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,OBe),''),'Thoroughness'),'How much effort should be spent to produce a nice layout.'),sgb(7)),gid),bJ),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,PBe),''),'Add Unnecessary Bendpoints'),'Adds bend points even if an edge does not change direction. If true, each long edge dummy will contribute a bend point to its edges and hierarchy-crossing edges will always get a bend point where they cross hierarchy boundaries. By default, bend points are only added where an edge changes direction.'),false),cid),QI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,QBe),''),'Generate Position and Layer IDs'),'If enabled position id and layer id are generated, which are usually only used internally when setting the interactiveLayout option. This option should be specified on the root node.'),false),cid),QI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,RBe),'cycleBreaking'),'Cycle Breaking Strategy'),'Strategy for cycle breaking. Cycle breaking looks for cycles in the graph and determines which edges to reverse to break the cycles. Reversed edges will end up pointing to the opposite direction of regular edges (that is, reversed edges will point left if edges usually point right).'),Sxc),eid),bX),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,SBe),bDe),'Node Layering Strategy'),'Strategy for node layering.'),Gyc),eid),rX),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,TBe),bDe),'Layer Constraint'),'Determines a constraint on the placement of the node regarding the layering.'),wyc),eid),mX),xsb(Vhd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,UBe),bDe),'Layer Choice Constraint'),"Allows to set a constraint regarding the layer placement of a node. Let i be the value of teh constraint. Assumed the drawing has n layers and i < n. If set to i, it expresses that the node should be placed in i-th layer. Should i>=n be true then the node is placed in the last layer of the drawing. Note that this option is not part of any of ELK Layered's default configurations but is only evaluated as part of the `InteractiveLayeredGraphVisitor`, which must be applied manually or used via the `DiagramLayoutEngine."),null),gid),bJ),xsb(Vhd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,VBe),bDe),'Layer ID'),'Layer identifier that was calculated by ELK Layered for a node. This is only generated if interactiveLayot or generatePositionAndLayerIds is set.'),sgb(-1)),gid),bJ),xsb(Vhd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,WBe),cDe),'Upper Bound On Width [MinWidth Layerer]'),"Defines a loose upper bound on the width of the MinWidth layerer. If set to '-1' multiple values are tested and the best result is selected."),sgb(4)),gid),bJ),xsb(Whd))));zgd(a,WBe,SBe,zyc);Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,XBe),cDe),'Upper Layer Estimation Scaling Factor [MinWidth Layerer]'),"Multiplied with Upper Bound On Width for defining an upper bound on the width of layers which haven't been determined yet, but whose maximum width had been (roughly) estimated by the MinWidth algorithm. Compensates for too high estimations. If set to '-1' multiple values are tested and the best result is selected."),sgb(2)),gid),bJ),xsb(Whd))));zgd(a,XBe,SBe,Byc);Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,YBe),dDe),'Node Promotion Strategy'),'Reduces number of dummy nodes after layering phase (if possible).'),Eyc),eid),vX),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,ZBe),dDe),'Max Node Promotion Iterations'),'Limits the number of iterations for node promotion.'),sgb(0)),gid),bJ),xsb(Whd))));zgd(a,ZBe,YBe,null);Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,$Be),'layering.coffmanGraham'),'Layer Bound'),'The maximum number of nodes allowed per layer.'),sgb(lve)),gid),bJ),xsb(Whd))));zgd(a,$Be,SBe,tyc);Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,_Be),eDe),'Crossing Minimization Strategy'),'Strategy for crossing minimization.'),Qxc),eid),_W),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,aCe),eDe),'Force Node Model Order'),'The node order given by the model does not change to produce a better layout. E.g. if node A is before node B in the model this is not changed during crossing minimization. This assumes that the node model order is already respected before crossing minimization. This can be achieved by setting considerModelOrder.strategy to NODES_AND_EDGES.'),false),cid),QI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,bCe),eDe),'Hierarchical Sweepiness'),'How likely it is to use cross-hierarchy (1) vs bottom-up (-1).'),0.1),did),VI),xsb(Whd))));zgd(a,bCe,fDe,Ixc);Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,cCe),eDe),'Semi-Interactive Crossing Minimization'),"Preserves the order of nodes within a layer but still minimizes crossings between edges connecting long edge dummies. Derives the desired order from positions specified by the 'org.eclipse.elk.position' layout option. Requires a crossing minimization strategy that is able to process 'in-layer' constraints."),false),cid),QI),xsb(Whd))));zgd(a,cCe,_Be,Oxc);Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,dCe),eDe),'In Layer Predecessor of'),"Allows to set a constraint which specifies of which node the current node is the predecessor. If set to 's' then the node is the predecessor of 's' and is in the same layer"),null),iid),qJ),xsb(Vhd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,eCe),eDe),'In Layer Successor of'),"Allows to set a constraint which specifies of which node the current node is the successor. If set to 's' then the node is the successor of 's' and is in the same layer"),null),iid),qJ),xsb(Vhd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,fCe),eDe),'Position Choice Constraint'),"Allows to set a constraint regarding the position placement of a node in a layer. Assumed the layer in which the node placed includes n other nodes and i < n. If set to i, it expresses that the node should be placed at the i-th position. Should i>=n be true then the node is placed at the last position in the layer. Note that this option is not part of any of ELK Layered's default configurations but is only evaluated as part of the `InteractiveLayeredGraphVisitor`, which must be applied manually or used via the `DiagramLayoutEngine."),null),gid),bJ),xsb(Vhd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,gCe),eDe),'Position ID'),'Position within a layer that was determined by ELK Layered for a node. This is only generated if interactiveLayot or generatePositionAndLayerIds is set.'),sgb(-1)),gid),bJ),xsb(Vhd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,hCe),gDe),'Greedy Switch Activation Threshold'),"By default it is decided automatically if the greedy switch is activated or not. The decision is based on whether the size of the input graph (without dummy nodes) is smaller than the value of this option. A '0' enforces the activation."),sgb(40)),gid),bJ),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,iCe),gDe),'Greedy Switch Crossing Minimization'),"Greedy Switch strategy for crossing minimization. The greedy switch heuristic is executed after the regular crossing minimization as a post-processor. Note that if 'hierarchyHandling' is set to 'INCLUDE_CHILDREN', the 'greedySwitchHierarchical.type' option must be used."),Fxc),eid),jX),xsb(Whd))));zgd(a,iCe,_Be,Gxc);Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,jCe),'crossingMinimization.greedySwitchHierarchical'),'Greedy Switch Crossing Minimization (hierarchical)'),"Activates the greedy switch heuristic in case hierarchical layout is used. The differences to the non-hierarchical case (see 'greedySwitch.type') are: 1) greedy switch is inactive by default, 3) only the option value set on the node at which hierarchical layout starts is relevant, and 2) if it's activated by the user, it properly addresses hierarchy-crossing edges."),Bxc),eid),jX),xsb(Whd))));zgd(a,jCe,_Be,Cxc);zgd(a,jCe,fDe,Dxc);Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,kCe),hDe),'Node Placement Strategy'),'Strategy for node placement.'),$yc),eid),uX),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Khd(Ohd(Lhd(Mhd(new Shd,lCe),hDe),'Favor Straight Edges Over Balancing'),"Favor straight edges over a balanced node placement. The default behavior is determined automatically based on the used 'edgeRouting'. For an orthogonal style it is set to true, for all other styles to false."),cid),QI),xsb(Whd))));zgd(a,lCe,kCe,Qyc);zgd(a,lCe,kCe,Ryc);Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,mCe),iDe),'BK Edge Straightening'),"Specifies whether the Brandes Koepf node placer tries to increase the number of straight edges at the expense of diagram size. There is a subtle difference to the 'favorStraightEdges' option, which decides whether a balanced placement of the nodes is desired, or not. In bk terms this means combining the four alignments into a single balanced one, or not. This option on the other hand tries to straighten additional edges during the creation of each of the four alignments."),Kyc),eid),fX),xsb(Whd))));zgd(a,mCe,kCe,Lyc);Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,nCe),iDe),'BK Fixed Alignment'),'Tells the BK node placer to use a certain alignment (out of its four) instead of the one producing the smallest height, or the combination of all four.'),Nyc),eid),gX),xsb(Whd))));zgd(a,nCe,kCe,Oyc);Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,oCe),'nodePlacement.linearSegments'),'Linear Segments Deflection Dampening'),'Dampens the movement of nodes to keep the diagram from getting too large.'),0.3),did),VI),xsb(Whd))));zgd(a,oCe,kCe,Tyc);Egd(a,new Ahd(Qhd(Phd(Rhd(Khd(Ohd(Lhd(Mhd(new Shd,pCe),'nodePlacement.networkSimplex'),'Node Flexibility'),"Aims at shorter and straighter edges. Two configurations are possible: (a) allow ports to move freely on the side they are assigned to (the order is always defined beforehand), (b) additionally allow to enlarge a node wherever it helps. If this option is not configured for a node, the 'nodeFlexibility.default' value is used, which is specified for the node's parent."),eid),tX),xsb(Vhd))));zgd(a,pCe,kCe,Yyc);Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,qCe),'nodePlacement.networkSimplex.nodeFlexibility'),'Node Flexibility Default'),"Default value of the 'nodeFlexibility' option for the children of a hierarchical node."),Wyc),eid),tX),xsb(Whd))));zgd(a,qCe,kCe,Xyc);Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,rCe),jDe),'Self-Loop Distribution'),'Alter the distribution of the loops around the node. It only takes effect for PortConstraints.FREE.'),ayc),eid),zX),xsb(Vhd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,sCe),jDe),'Self-Loop Ordering'),'Alter the ordering of the loops they can either be stacked or sequenced. It only takes effect for PortConstraints.FREE.'),cyc),eid),AX),xsb(Vhd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,tCe),'edgeRouting.splines'),'Spline Routing Mode'),'Specifies the way control points are assembled for each individual edge. CONSERVATIVE ensures that edges are properly routed around the nodes but feels rather orthogonal at times. SLOPPY uses fewer control points to obtain curvier edge routes but may result in edges overlapping nodes.'),eyc),eid),CX),xsb(Whd))));zgd(a,tCe,kDe,fyc);Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,uCe),'edgeRouting.splines.sloppy'),'Sloppy Spline Layer Spacing Factor'),'Spacing factor for routing area between layers when using sloppy spline routing.'),0.2),did),VI),xsb(Whd))));zgd(a,uCe,kDe,hyc);zgd(a,uCe,tCe,iyc);Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,vCe),'edgeRouting.polyline'),'Sloped Edge Zone Width'),'Width of the strip to the left and to the right of each layer where the polyline edge router is allowed to refrain from ensuring that edges are routed horizontally. This prevents awkward bend points for nodes that extent almost to the edge of their layer.'),2),did),VI),xsb(Whd))));zgd(a,vCe,kDe,$xc);Egd(a,new Ahd(Qhd(Phd(Rhd(Khd(Ohd(Lhd(Mhd(new Shd,wCe),lDe),'Spacing Base Value'),"An optional base value for all other layout options of the 'spacing' group. It can be used to conveniently alter the overall 'spaciousness' of the drawing. Whenever an explicit value is set for the other layout options, this base value will have no effect. The base value is not inherited, i.e. it must be set for each hierarchical node."),did),VI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,xCe),lDe),'Edge Node Between Layers Spacing'),"The spacing to be preserved between nodes and edges that are routed next to the node's layer. For the spacing between nodes and edges that cross the node's layer 'spacing.edgeNode' is used."),10),did),VI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,yCe),lDe),'Edge Edge Between Layer Spacing'),"Spacing to be preserved between pairs of edges that are routed between the same pair of layers. Note that 'spacing.edgeEdge' is used for the spacing between pairs of edges crossing the same layer."),10),did),VI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,zCe),lDe),'Node Node Between Layers Spacing'),"The spacing to be preserved between any pair of nodes of two adjacent layers. Note that 'spacing.nodeNode' is used for the spacing between nodes within the layer itself."),20),did),VI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,ACe),mDe),'Direction Priority'),'Defines how important it is to have a certain edge point into the direction of the overall layout. This option is evaluated during the cycle breaking phase.'),sgb(0)),gid),bJ),xsb(Thd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,BCe),mDe),'Shortness Priority'),'Defines how important it is to keep an edge as short as possible. This option is evaluated during the layering phase.'),sgb(0)),gid),bJ),xsb(Thd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,CCe),mDe),'Straightness Priority'),'Defines how important it is to keep an edge straight, i.e. aligned with one of the two axes. This option is evaluated during node placement.'),sgb(0)),gid),bJ),xsb(Thd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,DCe),nDe),qze),'Tries to further compact components (disconnected sub-graphs).'),false),cid),QI),xsb(Whd))));zgd(a,DCe,cAe,true);Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,ECe),oDe),'Post Compaction Strategy'),pDe),nxc),eid),hX),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,FCe),oDe),'Post Compaction Constraint Calculation'),pDe),lxc),eid),$W),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,GCe),qDe),'High Degree Node Treatment'),'Makes room around high degree nodes to place leafs and trees.'),false),cid),QI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,HCe),qDe),'High Degree Node Threshold'),'Whether a node is considered to have a high degree.'),sgb(16)),gid),bJ),xsb(Whd))));zgd(a,HCe,GCe,true);Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,ICe),qDe),'High Degree Node Maximum Tree Height'),'Maximum height of a subtree connected to a high degree node to be moved to separate layers.'),sgb(5)),gid),bJ),xsb(Whd))));zgd(a,ICe,GCe,true);Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,JCe),rDe),'Graph Wrapping Strategy'),"For certain graphs and certain prescribed drawing areas it may be desirable to split the laid out graph into chunks that are placed side by side. The edges that connect different chunks are 'wrapped' around from the end of one chunk to the start of the other chunk. The points between the chunks are referred to as 'cuts'."),Gzc),eid),EX),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,KCe),rDe),'Additional Wrapped Edges Spacing'),'To visually separate edges that are wrapped from regularly routed edges an additional spacing value can be specified in form of this layout option. The spacing is added to the regular edgeNode spacing.'),10),did),VI),xsb(Whd))));zgd(a,KCe,JCe,lzc);zgd(a,KCe,JCe,mzc);Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,LCe),rDe),'Correction Factor for Wrapping'),"At times and for certain types of graphs the executed wrapping may produce results that are consistently biased in the same fashion: either wrapping to often or to rarely. This factor can be used to correct the bias. Internally, it is simply multiplied with the 'aspect ratio' layout option."),1),did),VI),xsb(Whd))));zgd(a,LCe,JCe,ozc);zgd(a,LCe,JCe,pzc);Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,MCe),sDe),'Cutting Strategy'),'The strategy by which the layer indexes are determined at which the layering crumbles into chunks.'),wzc),eid),aX),xsb(Whd))));zgd(a,MCe,JCe,xzc);zgd(a,MCe,JCe,yzc);Egd(a,new Ahd(Qhd(Phd(Rhd(Khd(Ohd(Lhd(Mhd(new Shd,NCe),sDe),'Manually Specified Cuts'),'Allows the user to specify her own cuts for a certain graph.'),hid),QK),xsb(Whd))));zgd(a,NCe,MCe,rzc);Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,OCe),'wrapping.cutting.msd'),'MSD Freedom'),'The MSD cutting strategy starts with an initial guess on the number of chunks the graph should be split into. The freedom specifies how much the strategy may deviate from this guess. E.g. if an initial number of 3 is computed, a freedom of 1 allows 2, 3, and 4 cuts.'),tzc),gid),bJ),xsb(Whd))));zgd(a,OCe,MCe,uzc);Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,PCe),tDe),'Validification Strategy'),'When wrapping graphs, one can specify indices that are not allowed as split points. The validification strategy makes sure every computed split point is allowed.'),Lzc),eid),DX),xsb(Whd))));zgd(a,PCe,JCe,Mzc);zgd(a,PCe,JCe,Nzc);Egd(a,new Ahd(Qhd(Phd(Rhd(Khd(Ohd(Lhd(Mhd(new Shd,QCe),tDe),'Valid Indices for Wrapping'),null),hid),QK),xsb(Whd))));zgd(a,QCe,JCe,Izc);zgd(a,QCe,JCe,Jzc);Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,RCe),uDe),'Improve Cuts'),'For general graphs it is important that not too many edges wrap backwards. Thus a compromise between evenly-distributed cuts and the total number of cut edges is sought.'),true),cid),QI),xsb(Whd))));zgd(a,RCe,JCe,Czc);Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,SCe),uDe),'Distance Penalty When Improving Cuts'),null),2),did),VI),xsb(Whd))));zgd(a,SCe,JCe,Azc);zgd(a,SCe,RCe,true);Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,TCe),uDe),'Improve Wrapped Edges'),'The initial wrapping is performed in a very simple way. As a consequence, edges that wrap from one chunk to another may be unnecessarily long. Activating this option tries to shorten such edges.'),true),cid),QI),xsb(Whd))));zgd(a,TCe,JCe,Ezc);Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,UCe),vDe),'Edge Label Side Selection'),'Method to decide on edge label sides.'),Yxc),eid),eX),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,VCe),vDe),'Edge Center Label Placement Strategy'),'Determines in which layer center labels of long edges should be placed.'),Wxc),eid),ZW),ysb(Whd,cD(WC(d3,1),jwe,170,0,[Uhd])))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,WCe),wDe),'Consider Model Order'),'Preserves the order of nodes and edges in the model file if this does not lead to additional edge crossings. Depending on the strategy this is not always possible since the node and edge order might be conflicting.'),xxc),eid),wX),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,XCe),wDe),'Consider Port Order'),'If disabled the port order of output ports is derived from the edge order and input ports are ordered by their incoming connections. If enabled all ports are ordered by the port model order.'),false),cid),QI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,YCe),wDe),'No Model Order'),'Set on a node to not set a model order for this node even though it is a real node.'),false),cid),QI),xsb(Vhd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,ZCe),wDe),'Consider Model Order for Components'),'If set to NONE the usual ordering strategy (by cumulative node priority and size of nodes) is used. INSIDE_PORT_SIDES orders the components with external ports only inside the groups with the same port side. FORCE_MODEL_ORDER enforces the mode order on components. This option might produce bad alignments and sub optimal drawings in terms of used area since the ordering should be respected.'),pxc),eid),CQ),xsb(Whd))));zgd(a,ZCe,cAe,null);Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,$Ce),wDe),'Long Edge Ordering Strategy'),'Indicates whether long edges are sorted under, over, or equal to nodes that have no connection to a previous layer in a left-to-right or right-to-left layout. Under and over changes to right and left in a vertical layout.'),txc),eid),sX),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,_Ce),wDe),'Crossing Counter Node Order Influence'),'Indicates with what percentage (1 for 100%) violations of the node model order are weighted against the crossings e.g. a value of 0.5 means two model order violations are as important as on edge crossing. This allows some edge crossings in favor of preserving the model order. It is advised to set this value to a very small positive value (e.g. 0.001) to have minimal crossing and a optimal node order. Defaults to no influence (0).'),0),did),VI),xsb(Whd))));zgd(a,_Ce,WCe,null);Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,aDe),wDe),'Crossing Counter Port Order Influence'),'Indicates with what percentage (1 for 100%) violations of the port model order are weighted against the crossings e.g. a value of 0.5 means two model order violations are as important as on edge crossing. This allows some edge crossings in favor of preserving the model order. It is advised to set this value to a very small positive value (e.g. 0.001) to have minimal crossing and a optimal port order. Defaults to no influence (0).'),0),did),VI),xsb(Whd))));zgd(a,aDe,WCe,null);zCc((new ACc,a))};var ixc,jxc,kxc,lxc,mxc,nxc,oxc,pxc,qxc,rxc,sxc,txc,uxc,vxc,wxc,xxc,yxc,zxc,Axc,Bxc,Cxc,Dxc,Exc,Fxc,Gxc,Hxc,Ixc,Jxc,Kxc,Lxc,Mxc,Nxc,Oxc,Pxc,Qxc,Rxc,Sxc,Txc,Uxc,Vxc,Wxc,Xxc,Yxc,Zxc,$xc,_xc,ayc,byc,cyc,dyc,eyc,fyc,gyc,hyc,iyc,jyc,kyc,lyc,myc,nyc,oyc,pyc,qyc,ryc,syc,tyc,uyc,vyc,wyc,xyc,yyc,zyc,Ayc,Byc,Cyc,Dyc,Eyc,Fyc,Gyc,Hyc,Iyc,Jyc,Kyc,Lyc,Myc,Nyc,Oyc,Pyc,Qyc,Ryc,Syc,Tyc,Uyc,Vyc,Wyc,Xyc,Yyc,Zyc,$yc,_yc,azc,bzc,czc,dzc,ezc,fzc,gzc,hzc,izc,jzc,kzc,lzc,mzc,nzc,ozc,pzc,qzc,rzc,szc,tzc,uzc,vzc,wzc,xzc,yzc,zzc,Azc,Bzc,Czc,Dzc,Ezc,Fzc,Gzc,Hzc,Izc,Jzc,Kzc,Lzc,Mzc,Nzc;var nX=sfb(ABe,'LayeredMetaDataProvider',859);feb(998,1,Eye,ACc);_.hf=function BCc(a){zCc(a)};var Rzc,Szc,Tzc,Uzc,Vzc,Wzc,Xzc,Yzc,Zzc,$zc,_zc,aAc,bAc,cAc,dAc,eAc,fAc,gAc,hAc,iAc,jAc,kAc,lAc,mAc,nAc,oAc,pAc,qAc,rAc,sAc,tAc,uAc,vAc,wAc,xAc,yAc,zAc,AAc,BAc,CAc,DAc,EAc,FAc,GAc,HAc,IAc,JAc,KAc,LAc,MAc,NAc,OAc,PAc,QAc,RAc,SAc,TAc,UAc,VAc,WAc,XAc,YAc,ZAc,$Ac,_Ac,aBc,bBc,cBc,dBc,eBc,fBc,gBc,hBc,iBc,jBc,kBc,lBc,mBc,nBc,oBc,pBc,qBc,rBc,sBc,tBc,uBc,vBc,wBc,xBc,yBc,zBc,ABc,BBc,CBc,DBc,EBc,FBc,GBc,HBc,IBc,JBc,KBc,LBc,MBc,NBc,OBc,PBc,QBc,RBc,SBc,TBc,UBc,VBc,WBc,XBc,YBc,ZBc,$Bc,_Bc,aCc,bCc,cCc,dCc,eCc,fCc,gCc,hCc,iCc,jCc,kCc,lCc,mCc,nCc,oCc,pCc,qCc,rCc,sCc,tCc,uCc,vCc,wCc,xCc;var pX=sfb(ABe,'LayeredOptions',998);feb(999,1,{},CCc);_.sf=function DCc(){var a;return a=new lXb,a};_.tf=function ECc(a){};var oX=sfb(ABe,'LayeredOptions/LayeredFactory',999);feb(1391,1,{});_.a=0;var FCc;var b4=sfb(jEe,'ElkSpacings/AbstractSpacingsBuilder',1391);feb(792,1391,{},RCc);var OCc,PCc;var qX=sfb(ABe,'LayeredSpacings/LayeredSpacingsBuilder',792);feb(265,22,{3:1,34:1,22:1,265:1,188:1,196:1},bDc);_.dg=function dDc(){return aDc(this)};_.qg=function cDc(){return aDc(this)};var SCc,TCc,UCc,VCc,WCc,XCc,YCc,ZCc,$Cc;var rX=tfb(ABe,'LayeringStrategy',265,WI,fDc,eDc);var gDc;feb(390,22,{3:1,34:1,22:1,390:1},nDc);var iDc,jDc,kDc;var sX=tfb(ABe,'LongEdgeOrderingStrategy',390,WI,pDc,oDc);var qDc;feb(203,22,{3:1,34:1,22:1,203:1},yDc);var sDc,tDc,uDc,vDc;var tX=tfb(ABe,'NodeFlexibility',203,WI,BDc,ADc);var CDc;feb(323,22,{3:1,34:1,22:1,323:1,188:1,196:1},LDc);_.dg=function NDc(){return KDc(this)};_.qg=function MDc(){return KDc(this)};var EDc,FDc,GDc,HDc,IDc;var uX=tfb(ABe,'NodePlacementStrategy',323,WI,PDc,ODc);var QDc;feb(243,22,{3:1,34:1,22:1,243:1},bEc);var SDc,TDc,UDc,VDc,WDc,XDc,YDc,ZDc,$Dc,_Dc;var vX=tfb(ABe,'NodePromotionStrategy',243,WI,dEc,cEc);var eEc;feb(284,22,{3:1,34:1,22:1,284:1},lEc);var gEc,hEc,iEc,jEc;var wX=tfb(ABe,'OrderingStrategy',284,WI,nEc,mEc);var oEc;feb(430,22,{3:1,34:1,22:1,430:1},tEc);var qEc,rEc;var xX=tfb(ABe,'PortSortingStrategy',430,WI,vEc,uEc);var wEc;feb(463,22,{3:1,34:1,22:1,463:1},CEc);var yEc,zEc,AEc;var yX=tfb(ABe,'PortType',463,WI,EEc,DEc);var FEc;feb(387,22,{3:1,34:1,22:1,387:1},LEc);var HEc,IEc,JEc;var zX=tfb(ABe,'SelfLoopDistributionStrategy',387,WI,NEc,MEc);var OEc;feb(349,22,{3:1,34:1,22:1,349:1},UEc);var QEc,REc,SEc;var AX=tfb(ABe,'SelfLoopOrderingStrategy',349,WI,WEc,VEc);var XEc;feb(312,1,{312:1},gFc);var BX=sfb(ABe,'Spacings',312);feb(350,22,{3:1,34:1,22:1,350:1},mFc);var iFc,jFc,kFc;var CX=tfb(ABe,'SplineRoutingMode',350,WI,oFc,nFc);var pFc;feb(352,22,{3:1,34:1,22:1,352:1},vFc);var rFc,sFc,tFc;var DX=tfb(ABe,'ValidifyStrategy',352,WI,xFc,wFc);var yFc;feb(388,22,{3:1,34:1,22:1,388:1},EFc);var AFc,BFc,CFc;var EX=tfb(ABe,'WrappingStrategy',388,WI,GFc,FFc);var HFc;feb(1398,1,nEe,NFc);_.rg=function OFc(a){return RD(a,36),JFc};_.Kf=function PFc(a,b){MFc(this,RD(a,36),b)};var JFc;var FX=sfb(oEe,'DepthFirstCycleBreaker',1398);feb(793,1,nEe,UFc);_.rg=function WFc(a){return RD(a,36),QFc};_.Kf=function XFc(a,b){SFc(this,RD(a,36),b)};_.sg=function VFc(a){return RD(Vmb(a,Jwb(this.d,a.c.length)),10)};var QFc;var GX=sfb(oEe,'GreedyCycleBreaker',793);feb(1401,793,nEe,YFc);_.sg=function ZFc(a){var b,c,d,e;e=null;b=lve;for(d=new Anb(a);d.a1){Heb(TD(mQb(Y2b((tFb(0,a.c.length),RD(a.c[0],10))),(yCc(),eAc))))?wLc(a,this.d,RD(this,669)):(yob(),_mb(a,this.d));nJc(this.e,a)}};_.lg=function bJc(a,b,c,d){var e,f,g,h,i,j,k;if(b!=SIc(c,a.length)){f=a[b-(c?1:-1)];sIc(this.f,f,c?(BEc(),zEc):(BEc(),yEc))}e=a[b][0];k=!d||e.k==(r3b(),m3b);j=dv(a[b]);this.vg(j,k,false,c);g=0;for(i=new Anb(j);i.a');a0?(pMc(this.a,a[b-1],a[b]),undefined):!c&&b1){Heb(TD(mQb(Y2b((tFb(0,a.c.length),RD(a.c[0],10))),(yCc(),eAc))))?wLc(a,this.d,this):(yob(),_mb(a,this.d));Heb(TD(mQb(Y2b((tFb(0,a.c.length),RD(a.c[0],10))),eAc)))||nJc(this.e,a)}};var wY=sfb(sEe,'ModelOrderBarycenterHeuristic',669);feb(1866,1,fye,yLc);_.Ne=function zLc(a,b){return tLc(this.a,RD(a,10),RD(b,10))};_.Fb=function ALc(a){return this===a};_.Oe=function BLc(){return new Frb(this)};var vY=sfb(sEe,'ModelOrderBarycenterHeuristic/lambda$0$Type',1866);feb(1423,1,nEe,FLc);_.rg=function GLc(a){var b;return RD(a,36),b=vfd(CLc),pfd(b,(sXb(),pXb),(hcc(),Ybc)),b};_.Kf=function HLc(a,b){ELc((RD(a,36),b))};var CLc;var xY=sfb(sEe,'NoCrossingMinimizer',1423);feb(809,413,qEe,ILc);_.tg=function JLc(a,b,c){var d,e,f,g,h,i,j,k,l,m,n;l=this.g;switch(c.g){case 1:{e=0;f=0;for(k=new Anb(a.j);k.a1&&(e.j==(qpd(),Xod)?(this.b[a]=true):e.j==ppd&&a>0&&(this.b[a-1]=true))};_.f=0;var AY=sfb(tBe,'AllCrossingsCounter',1861);feb(595,1,{},_Lc);_.b=0;_.d=0;var BY=sfb(tBe,'BinaryIndexedTree',595);feb(532,1,{},DMc);var bMc,cMc;var LY=sfb(tBe,'CrossingsCounter',532);feb(1950,1,fye,HMc);_.Ne=function IMc(a,b){return wMc(this.a,RD(a,12),RD(b,12))};_.Fb=function JMc(a){return this===a};_.Oe=function KMc(){return new Frb(this)};var CY=sfb(tBe,'CrossingsCounter/lambda$0$Type',1950);feb(1951,1,fye,LMc);_.Ne=function MMc(a,b){return xMc(this.a,RD(a,12),RD(b,12))};_.Fb=function NMc(a){return this===a};_.Oe=function OMc(){return new Frb(this)};var DY=sfb(tBe,'CrossingsCounter/lambda$1$Type',1951);feb(1952,1,fye,PMc);_.Ne=function QMc(a,b){return yMc(this.a,RD(a,12),RD(b,12))};_.Fb=function RMc(a){return this===a};_.Oe=function SMc(){return new Frb(this)};var EY=sfb(tBe,'CrossingsCounter/lambda$2$Type',1952);feb(1953,1,fye,TMc);_.Ne=function UMc(a,b){return zMc(this.a,RD(a,12),RD(b,12))};_.Fb=function VMc(a){return this===a};_.Oe=function WMc(){return new Frb(this)};var FY=sfb(tBe,'CrossingsCounter/lambda$3$Type',1953);feb(1954,1,Qve,XMc);_.Cd=function YMc(a){EMc(this.a,RD(a,12))};var GY=sfb(tBe,'CrossingsCounter/lambda$4$Type',1954);feb(1955,1,nwe,ZMc);_.Mb=function $Mc(a){return FMc(this.a,RD(a,12))};var HY=sfb(tBe,'CrossingsCounter/lambda$5$Type',1955);feb(1956,1,Qve,aNc);_.Cd=function bNc(a){_Mc(this,a)};var IY=sfb(tBe,'CrossingsCounter/lambda$6$Type',1956);feb(1957,1,Qve,cNc);_.Cd=function dNc(a){var b;dMc();hmb(this.b,(b=this.a,RD(a,12),b))};var JY=sfb(tBe,'CrossingsCounter/lambda$7$Type',1957);feb(839,1,xye,eNc);_.Lb=function fNc(a){return dMc(),nQb(RD(a,12),(Ywc(),Iwc))};_.Fb=function gNc(a){return this===a};_.Mb=function hNc(a){return dMc(),nQb(RD(a,12),(Ywc(),Iwc))};var KY=sfb(tBe,'CrossingsCounter/lambda$8$Type',839);feb(1949,1,{},jNc);var PY=sfb(tBe,'HyperedgeCrossingsCounter',1949);feb(478,1,{34:1,478:1},lNc);_.Fd=function mNc(a){return kNc(this,RD(a,478))};_.b=0;_.c=0;_.e=0;_.f=0;var OY=sfb(tBe,'HyperedgeCrossingsCounter/Hyperedge',478);feb(374,1,{34:1,374:1},oNc);_.Fd=function pNc(a){return nNc(this,RD(a,374))};_.b=0;_.c=0;var NY=sfb(tBe,'HyperedgeCrossingsCounter/HyperedgeCorner',374);feb(531,22,{3:1,34:1,22:1,531:1},tNc);var qNc,rNc;var MY=tfb(tBe,'HyperedgeCrossingsCounter/HyperedgeCorner/Type',531,WI,vNc,uNc);var wNc;feb(1425,1,nEe,DNc);_.rg=function ENc(a){return RD(mQb(RD(a,36),(Ywc(),kwc)),21).Hc((ovc(),hvc))?zNc:null};_.Kf=function FNc(a,b){CNc(this,RD(a,36),b)};var zNc;var RY=sfb(tEe,'InteractiveNodePlacer',1425);feb(1426,1,nEe,TNc);_.rg=function UNc(a){return RD(mQb(RD(a,36),(Ywc(),kwc)),21).Hc((ovc(),hvc))?GNc:null};_.Kf=function VNc(a,b){RNc(this,RD(a,36),b)};var GNc,HNc,INc;var TY=sfb(tEe,'LinearSegmentsNodePlacer',1426);feb(261,1,{34:1,261:1},ZNc);_.Fd=function $Nc(a){return WNc(this,RD(a,261))};_.Fb=function _Nc(a){var b;if(ZD(a,261)){b=RD(a,261);return this.b==b.b}return false};_.Hb=function aOc(){return this.b};_.Ib=function bOc(){return 'ls'+Fe(this.e)};_.a=0;_.b=0;_.c=-1;_.d=-1;_.g=0;var SY=sfb(tEe,'LinearSegmentsNodePlacer/LinearSegment',261);feb(1428,1,nEe,yOc);_.rg=function zOc(a){return RD(mQb(RD(a,36),(Ywc(),kwc)),21).Hc((ovc(),hvc))?cOc:null};_.Kf=function HOc(a,b){uOc(this,RD(a,36),b)};_.b=0;_.g=0;var cOc;var DZ=sfb(tEe,'NetworkSimplexPlacer',1428);feb(1447,1,fye,IOc);_.Ne=function JOc(a,b){return hgb(RD(a,17).a,RD(b,17).a)};_.Fb=function KOc(a){return this===a};_.Oe=function LOc(){return new Frb(this)};var UY=sfb(tEe,'NetworkSimplexPlacer/0methodref$compare$Type',1447);feb(1449,1,fye,MOc);_.Ne=function NOc(a,b){return hgb(RD(a,17).a,RD(b,17).a)};_.Fb=function OOc(a){return this===a};_.Oe=function POc(){return new Frb(this)};var VY=sfb(tEe,'NetworkSimplexPlacer/1methodref$compare$Type',1449);feb(655,1,{655:1},QOc);var WY=sfb(tEe,'NetworkSimplexPlacer/EdgeRep',655);feb(412,1,{412:1},ROc);_.b=false;var XY=sfb(tEe,'NetworkSimplexPlacer/NodeRep',412);feb(515,13,{3:1,4:1,20:1,31:1,56:1,13:1,16:1,15:1,59:1,515:1},VOc);var aZ=sfb(tEe,'NetworkSimplexPlacer/Path',515);feb(1429,1,{},WOc);_.Kb=function XOc(a){return RD(a,18).d.i.k};var YY=sfb(tEe,'NetworkSimplexPlacer/Path/lambda$0$Type',1429);feb(1430,1,nwe,YOc);_.Mb=function ZOc(a){return RD(a,273)==(r3b(),o3b)};var ZY=sfb(tEe,'NetworkSimplexPlacer/Path/lambda$1$Type',1430);feb(1431,1,{},$Oc);_.Kb=function _Oc(a){return RD(a,18).d.i};var $Y=sfb(tEe,'NetworkSimplexPlacer/Path/lambda$2$Type',1431);feb(1432,1,nwe,aPc);_.Mb=function bPc(a){return EPc(zDc(RD(a,10)))};var _Y=sfb(tEe,'NetworkSimplexPlacer/Path/lambda$3$Type',1432);feb(1433,1,nwe,cPc);_.Mb=function dPc(a){return DOc(RD(a,12))};var bZ=sfb(tEe,'NetworkSimplexPlacer/lambda$0$Type',1433);feb(1434,1,Qve,ePc);_.Cd=function fPc(a){jOc(this.a,this.b,RD(a,12))};var cZ=sfb(tEe,'NetworkSimplexPlacer/lambda$1$Type',1434);feb(1443,1,Qve,gPc);_.Cd=function hPc(a){kOc(this.a,RD(a,18))};var dZ=sfb(tEe,'NetworkSimplexPlacer/lambda$10$Type',1443);feb(1444,1,{},iPc);_.Kb=function jPc(a){return dOc(),new SDb(null,new Swb(RD(a,30).a,16))};var eZ=sfb(tEe,'NetworkSimplexPlacer/lambda$11$Type',1444);feb(1445,1,Qve,kPc);_.Cd=function lPc(a){lOc(this.a,RD(a,10))};var fZ=sfb(tEe,'NetworkSimplexPlacer/lambda$12$Type',1445);feb(1446,1,{},mPc);_.Kb=function nPc(a){return dOc(),sgb(RD(a,125).e)};var gZ=sfb(tEe,'NetworkSimplexPlacer/lambda$13$Type',1446);feb(1448,1,{},oPc);_.Kb=function pPc(a){return dOc(),sgb(RD(a,125).e)};var hZ=sfb(tEe,'NetworkSimplexPlacer/lambda$15$Type',1448);feb(1450,1,nwe,qPc);_.Mb=function rPc(a){return dOc(),RD(a,412).c.k==(r3b(),p3b)};var iZ=sfb(tEe,'NetworkSimplexPlacer/lambda$17$Type',1450);feb(1451,1,nwe,sPc);_.Mb=function tPc(a){return dOc(),RD(a,412).c.j.c.length>1};var jZ=sfb(tEe,'NetworkSimplexPlacer/lambda$18$Type',1451);feb(1452,1,Qve,uPc);_.Cd=function vPc(a){EOc(this.c,this.b,this.d,this.a,RD(a,412))};_.c=0;_.d=0;var kZ=sfb(tEe,'NetworkSimplexPlacer/lambda$19$Type',1452);feb(1435,1,{},wPc);_.Kb=function xPc(a){return dOc(),new SDb(null,new Swb(RD(a,30).a,16))};var lZ=sfb(tEe,'NetworkSimplexPlacer/lambda$2$Type',1435);feb(1453,1,Qve,yPc);_.Cd=function zPc(a){FOc(this.a,RD(a,12))};_.a=0;var mZ=sfb(tEe,'NetworkSimplexPlacer/lambda$20$Type',1453);feb(1454,1,{},APc);_.Kb=function BPc(a){return dOc(),new SDb(null,new Swb(RD(a,30).a,16))};var nZ=sfb(tEe,'NetworkSimplexPlacer/lambda$21$Type',1454);feb(1455,1,Qve,CPc);_.Cd=function DPc(a){mOc(this.a,RD(a,10))};var oZ=sfb(tEe,'NetworkSimplexPlacer/lambda$22$Type',1455);feb(1456,1,nwe,FPc);_.Mb=function GPc(a){return EPc(a)};var pZ=sfb(tEe,'NetworkSimplexPlacer/lambda$23$Type',1456);feb(1457,1,{},HPc);_.Kb=function IPc(a){return dOc(),new SDb(null,new Swb(RD(a,30).a,16))};var qZ=sfb(tEe,'NetworkSimplexPlacer/lambda$24$Type',1457);feb(1458,1,nwe,JPc);_.Mb=function KPc(a){return nOc(this.a,RD(a,10))};var rZ=sfb(tEe,'NetworkSimplexPlacer/lambda$25$Type',1458);feb(1459,1,Qve,LPc);_.Cd=function MPc(a){oOc(this.a,this.b,RD(a,10))};var sZ=sfb(tEe,'NetworkSimplexPlacer/lambda$26$Type',1459);feb(1460,1,nwe,NPc);_.Mb=function OPc(a){return dOc(),!W0b(RD(a,18))};var tZ=sfb(tEe,'NetworkSimplexPlacer/lambda$27$Type',1460);feb(1461,1,nwe,PPc);_.Mb=function QPc(a){return dOc(),!W0b(RD(a,18))};var uZ=sfb(tEe,'NetworkSimplexPlacer/lambda$28$Type',1461);feb(1462,1,{},RPc);_.Ve=function SPc(a,b){return pOc(this.a,RD(a,30),RD(b,30))};var vZ=sfb(tEe,'NetworkSimplexPlacer/lambda$29$Type',1462);feb(1436,1,{},TPc);_.Kb=function UPc(a){return dOc(),new SDb(null,new Twb(new is(Mr(a3b(RD(a,10)).a.Kc(),new ir))))};var wZ=sfb(tEe,'NetworkSimplexPlacer/lambda$3$Type',1436);feb(1437,1,nwe,VPc);_.Mb=function WPc(a){return dOc(),COc(RD(a,18))};var xZ=sfb(tEe,'NetworkSimplexPlacer/lambda$4$Type',1437);feb(1438,1,Qve,XPc);_.Cd=function YPc(a){vOc(this.a,RD(a,18))};var yZ=sfb(tEe,'NetworkSimplexPlacer/lambda$5$Type',1438);feb(1439,1,{},ZPc);_.Kb=function $Pc(a){return dOc(),new SDb(null,new Swb(RD(a,30).a,16))};var zZ=sfb(tEe,'NetworkSimplexPlacer/lambda$6$Type',1439);feb(1440,1,nwe,_Pc);_.Mb=function aQc(a){return dOc(),RD(a,10).k==(r3b(),p3b)};var AZ=sfb(tEe,'NetworkSimplexPlacer/lambda$7$Type',1440);feb(1441,1,{},bQc);_.Kb=function cQc(a){return dOc(),new SDb(null,new Twb(new is(Mr(W2b(RD(a,10)).a.Kc(),new ir))))};var BZ=sfb(tEe,'NetworkSimplexPlacer/lambda$8$Type',1441);feb(1442,1,nwe,dQc);_.Mb=function eQc(a){return dOc(),V0b(RD(a,18))};var CZ=sfb(tEe,'NetworkSimplexPlacer/lambda$9$Type',1442);feb(1424,1,nEe,iQc);_.rg=function jQc(a){return RD(mQb(RD(a,36),(Ywc(),kwc)),21).Hc((ovc(),hvc))?fQc:null};_.Kf=function kQc(a,b){hQc(RD(a,36),b)};var fQc;var EZ=sfb(tEe,'SimpleNodePlacer',1424);feb(185,1,{185:1},sQc);_.Ib=function tQc(){var a;a='';this.c==(wQc(),vQc)?(a+=Oye):this.c==uQc&&(a+=Nye);this.o==(EQc(),CQc)?(a+=Zye):this.o==DQc?(a+='UP'):(a+='BALANCED');return a};var HZ=sfb(wEe,'BKAlignedLayout',185);feb(523,22,{3:1,34:1,22:1,523:1},xQc);var uQc,vQc;var FZ=tfb(wEe,'BKAlignedLayout/HDirection',523,WI,zQc,yQc);var AQc;feb(522,22,{3:1,34:1,22:1,522:1},FQc);var CQc,DQc;var GZ=tfb(wEe,'BKAlignedLayout/VDirection',522,WI,HQc,GQc);var IQc;feb(1699,1,{},MQc);var IZ=sfb(wEe,'BKAligner',1699);feb(1702,1,{},RQc);var LZ=sfb(wEe,'BKCompactor',1702);feb(663,1,{663:1},SQc);_.a=0;var JZ=sfb(wEe,'BKCompactor/ClassEdge',663);feb(467,1,{467:1},UQc);_.a=null;_.b=0;var KZ=sfb(wEe,'BKCompactor/ClassNode',467);feb(1427,1,nEe,aRc);_.rg=function eRc(a){return RD(mQb(RD(a,36),(Ywc(),kwc)),21).Hc((ovc(),hvc))?VQc:null};_.Kf=function fRc(a,b){_Qc(this,RD(a,36),b)};_.d=false;var VQc;var MZ=sfb(wEe,'BKNodePlacer',1427);feb(1700,1,{},hRc);_.d=0;var OZ=sfb(wEe,'NeighborhoodInformation',1700);feb(1701,1,fye,mRc);_.Ne=function nRc(a,b){return lRc(this,RD(a,42),RD(b,42))};_.Fb=function oRc(a){return this===a};_.Oe=function pRc(){return new Frb(this)};var NZ=sfb(wEe,'NeighborhoodInformation/NeighborComparator',1701);feb(823,1,{});var SZ=sfb(wEe,'ThresholdStrategy',823);feb(1825,823,{},uRc);_.wg=function vRc(a,b,c){return this.a.o==(EQc(),DQc)?oxe:pxe};_.xg=function wRc(){};var PZ=sfb(wEe,'ThresholdStrategy/NullThresholdStrategy',1825);feb(587,1,{587:1},xRc);_.c=false;_.d=false;var QZ=sfb(wEe,'ThresholdStrategy/Postprocessable',587);feb(1826,823,{},BRc);_.wg=function CRc(a,b,c){var d,e,f;e=b==c;d=this.a.a[c.p]==b;if(!(e||d)){return a}f=a;if(this.a.c==(wQc(),vQc)){e&&(f=yRc(this,b,true));!isNaN(f)&&!isFinite(f)&&d&&(f=yRc(this,c,false))}else{e&&(f=yRc(this,b,true));!isNaN(f)&&!isFinite(f)&&d&&(f=yRc(this,c,false))}return f};_.xg=function DRc(){var a,b,c,d,e;while(this.d.b!=0){e=RD(Tub(this.d),587);d=zRc(this,e);if(!d.a){continue}a=d.a;c=Heb(this.a.f[this.a.g[e.b.p].p]);if(!c&&!W0b(a)&&a.c.i.c==a.d.i.c){continue}b=ARc(this,e);b||Eyb(this.e,e)}while(this.e.a.c.length!=0){ARc(this,RD(Dyb(this.e),587))}};var RZ=sfb(wEe,'ThresholdStrategy/SimpleThresholdStrategy',1826);feb(645,1,{645:1,188:1,196:1},HRc);_.dg=function JRc(){return GRc(this)};_.qg=function IRc(){return GRc(this)};var ERc;var TZ=sfb(xEe,'EdgeRouterFactory',645);feb(1485,1,nEe,WRc);_.rg=function XRc(a){return URc(RD(a,36))};_.Kf=function YRc(a,b){VRc(RD(a,36),b)};var LRc,MRc,NRc,ORc,PRc,QRc,RRc,SRc;var UZ=sfb(xEe,'OrthogonalEdgeRouter',1485);feb(1478,1,nEe,lSc);_.rg=function mSc(a){return gSc(RD(a,36))};_.Kf=function nSc(a,b){iSc(this,RD(a,36),b)};var ZRc,$Rc,_Rc,aSc,bSc,cSc;var WZ=sfb(xEe,'PolylineEdgeRouter',1478);feb(1479,1,xye,pSc);_.Lb=function qSc(a){return oSc(RD(a,10))};_.Fb=function rSc(a){return this===a};_.Mb=function sSc(a){return oSc(RD(a,10))};var VZ=sfb(xEe,'PolylineEdgeRouter/1',1479);feb(1872,1,nwe,xSc);_.Mb=function ySc(a){return RD(a,132).c==(fTc(),dTc)};var XZ=sfb(yEe,'HyperEdgeCycleDetector/lambda$0$Type',1872);feb(1873,1,{},zSc);_.Ze=function ASc(a){return RD(a,132).d};var YZ=sfb(yEe,'HyperEdgeCycleDetector/lambda$1$Type',1873);feb(1874,1,nwe,BSc);_.Mb=function CSc(a){return RD(a,132).c==(fTc(),dTc)};var ZZ=sfb(yEe,'HyperEdgeCycleDetector/lambda$2$Type',1874);feb(1875,1,{},DSc);_.Ze=function ESc(a){return RD(a,132).d};var $Z=sfb(yEe,'HyperEdgeCycleDetector/lambda$3$Type',1875);feb(1876,1,{},FSc);_.Ze=function GSc(a){return RD(a,132).d};var _Z=sfb(yEe,'HyperEdgeCycleDetector/lambda$4$Type',1876);feb(1877,1,{},HSc);_.Ze=function ISc(a){return RD(a,132).d};var a$=sfb(yEe,'HyperEdgeCycleDetector/lambda$5$Type',1877);feb(118,1,{34:1,118:1},USc);_.Fd=function VSc(a){return KSc(this,RD(a,118))};_.Fb=function WSc(a){var b;if(ZD(a,118)){b=RD(a,118);return this.g==b.g}return false};_.Hb=function XSc(){return this.g};_.Ib=function ZSc(){var a,b,c,d;a=new dib('{');d=new Anb(this.n);while(d.a'+this.b+' ('+os(this.c)+')'};_.d=0;var c$=sfb(yEe,'HyperEdgeSegmentDependency',132);feb(528,22,{3:1,34:1,22:1,528:1},gTc);var dTc,eTc;var b$=tfb(yEe,'HyperEdgeSegmentDependency/DependencyType',528,WI,iTc,hTc);var jTc;feb(1878,1,{},xTc);var k$=sfb(yEe,'HyperEdgeSegmentSplitter',1878);feb(1879,1,{},ATc);_.a=0;_.b=0;var d$=sfb(yEe,'HyperEdgeSegmentSplitter/AreaRating',1879);feb(339,1,{339:1},BTc);_.a=0;_.b=0;_.c=0;var e$=sfb(yEe,'HyperEdgeSegmentSplitter/FreeArea',339);feb(1880,1,fye,CTc);_.Ne=function DTc(a,b){return zTc(RD(a,118),RD(b,118))};_.Fb=function ETc(a){return this===a};_.Oe=function FTc(){return new Frb(this)};var f$=sfb(yEe,'HyperEdgeSegmentSplitter/lambda$0$Type',1880);feb(1881,1,Qve,GTc);_.Cd=function HTc(a){rTc(this.a,this.d,this.c,this.b,RD(a,118))};_.b=0;var g$=sfb(yEe,'HyperEdgeSegmentSplitter/lambda$1$Type',1881);feb(1882,1,{},ITc);_.Kb=function JTc(a){return new SDb(null,new Swb(RD(a,118).e,16))};var h$=sfb(yEe,'HyperEdgeSegmentSplitter/lambda$2$Type',1882);feb(1883,1,{},KTc);_.Kb=function LTc(a){return new SDb(null,new Swb(RD(a,118).j,16))};var i$=sfb(yEe,'HyperEdgeSegmentSplitter/lambda$3$Type',1883);feb(1884,1,{},MTc);_.Ye=function NTc(a){return Kfb(UD(a))};var j$=sfb(yEe,'HyperEdgeSegmentSplitter/lambda$4$Type',1884);feb(664,1,{},TTc);_.a=0;_.b=0;_.c=0;var o$=sfb(yEe,'OrthogonalRoutingGenerator',664);feb(1703,1,{},XTc);_.Kb=function YTc(a){return new SDb(null,new Swb(RD(a,118).e,16))};var m$=sfb(yEe,'OrthogonalRoutingGenerator/lambda$0$Type',1703);feb(1704,1,{},ZTc);_.Kb=function $Tc(a){return new SDb(null,new Swb(RD(a,118).j,16))};var n$=sfb(yEe,'OrthogonalRoutingGenerator/lambda$1$Type',1704);feb(670,1,{});var p$=sfb(zEe,'BaseRoutingDirectionStrategy',670);feb(1870,670,{},cUc);_.yg=function dUc(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p;if(!!a.r&&!a.q){return}k=b+a.o*c;for(j=new Anb(a.n);j.aVze){f=k;e=a;d=new rjd(l,f);Mub(g.a,d);_Tc(this,g,e,d,false);m=a.r;if(m){n=Kfb(UD(ju(m.e,0)));d=new rjd(n,f);Mub(g.a,d);_Tc(this,g,e,d,false);f=b+m.o*c;e=m;d=new rjd(n,f);Mub(g.a,d);_Tc(this,g,e,d,false)}d=new rjd(p,f);Mub(g.a,d);_Tc(this,g,e,d,false)}}}}};_.zg=function eUc(a){return a.i.n.a+a.n.a+a.a.a};_.Ag=function fUc(){return qpd(),npd};_.Bg=function gUc(){return qpd(),Yod};var q$=sfb(zEe,'NorthToSouthRoutingStrategy',1870);feb(1871,670,{},hUc);_.yg=function iUc(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p;if(!!a.r&&!a.q){return}k=b-a.o*c;for(j=new Anb(a.n);j.aVze){f=k;e=a;d=new rjd(l,f);Mub(g.a,d);_Tc(this,g,e,d,false);m=a.r;if(m){n=Kfb(UD(ju(m.e,0)));d=new rjd(n,f);Mub(g.a,d);_Tc(this,g,e,d,false);f=b-m.o*c;e=m;d=new rjd(n,f);Mub(g.a,d);_Tc(this,g,e,d,false)}d=new rjd(p,f);Mub(g.a,d);_Tc(this,g,e,d,false)}}}}};_.zg=function jUc(a){return a.i.n.a+a.n.a+a.a.a};_.Ag=function kUc(){return qpd(),Yod};_.Bg=function lUc(){return qpd(),npd};var r$=sfb(zEe,'SouthToNorthRoutingStrategy',1871);feb(1869,670,{},mUc);_.yg=function nUc(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p;if(!!a.r&&!a.q){return}k=b+a.o*c;for(j=new Anb(a.n);j.aVze){f=k;e=a;d=new rjd(f,l);Mub(g.a,d);_Tc(this,g,e,d,true);m=a.r;if(m){n=Kfb(UD(ju(m.e,0)));d=new rjd(f,n);Mub(g.a,d);_Tc(this,g,e,d,true);f=b+m.o*c;e=m;d=new rjd(f,n);Mub(g.a,d);_Tc(this,g,e,d,true)}d=new rjd(f,p);Mub(g.a,d);_Tc(this,g,e,d,true)}}}}};_.zg=function oUc(a){return a.i.n.b+a.n.b+a.a.b};_.Ag=function pUc(){return qpd(),Xod};_.Bg=function qUc(){return qpd(),ppd};var s$=sfb(zEe,'WestToEastRoutingStrategy',1869);feb(828,1,{},wUc);_.Ib=function xUc(){return Fe(this.a)};_.b=0;_.c=false;_.d=false;_.f=0;var u$=sfb(BEe,'NubSpline',828);feb(418,1,{418:1},AUc,BUc);var t$=sfb(BEe,'NubSpline/PolarCP',418);feb(1480,1,nEe,VUc);_.rg=function XUc(a){return QUc(RD(a,36))};_.Kf=function YUc(a,b){UUc(this,RD(a,36),b)};var CUc,DUc,EUc,FUc,GUc;var B$=sfb(BEe,'SplineEdgeRouter',1480);feb(274,1,{274:1},_Uc);_.Ib=function aVc(){return this.a+' ->('+this.c+') '+this.b};_.c=0;var v$=sfb(BEe,'SplineEdgeRouter/Dependency',274);feb(465,22,{3:1,34:1,22:1,465:1},eVc);var bVc,cVc;var w$=tfb(BEe,'SplineEdgeRouter/SideToProcess',465,WI,gVc,fVc);var hVc;feb(1481,1,nwe,jVc);_.Mb=function kVc(a){return HUc(),!RD(a,131).o};var x$=sfb(BEe,'SplineEdgeRouter/lambda$0$Type',1481);feb(1482,1,{},lVc);_.Ze=function mVc(a){return HUc(),RD(a,131).v+1};var y$=sfb(BEe,'SplineEdgeRouter/lambda$1$Type',1482);feb(1483,1,Qve,nVc);_.Cd=function oVc(a){SUc(this.a,this.b,RD(a,42))};var z$=sfb(BEe,'SplineEdgeRouter/lambda$2$Type',1483);feb(1484,1,Qve,pVc);_.Cd=function qVc(a){TUc(this.a,this.b,RD(a,42))};var A$=sfb(BEe,'SplineEdgeRouter/lambda$3$Type',1484);feb(131,1,{34:1,131:1},wVc,xVc);_.Fd=function yVc(a){return uVc(this,RD(a,131))};_.b=0;_.e=false;_.f=0;_.g=0;_.j=false;_.k=false;_.n=0;_.o=false;_.p=false;_.q=false;_.s=0;_.u=0;_.v=0;_.F=0;var D$=sfb(BEe,'SplineSegment',131);feb(468,1,{468:1},zVc);_.a=0;_.b=false;_.c=false;_.d=false;_.e=false;_.f=0;var C$=sfb(BEe,'SplineSegment/EdgeInformation',468);feb(1198,1,{},IVc);var F$=sfb(GEe,Lze,1198);feb(1199,1,fye,KVc);_.Ne=function LVc(a,b){return JVc(RD(a,121),RD(b,121))};_.Fb=function MVc(a){return this===a};_.Oe=function NVc(){return new Frb(this)};var E$=sfb(GEe,Mze,1199);feb(1197,1,{},TVc);var G$=sfb(GEe,'MrTree',1197);feb(405,22,{3:1,34:1,22:1,405:1,188:1,196:1},$Vc);_.dg=function aWc(){return ZVc(this)};_.qg=function _Vc(){return ZVc(this)};var UVc,VVc,WVc,XVc;var H$=tfb(GEe,'TreeLayoutPhases',405,WI,cWc,bWc);var dWc;feb(1112,205,oze,fWc);_.rf=function gWc(a,b){var c,d,e,f,g,h,i,j;Heb(TD(Gxd(a,(h_c(),S$c))))||RFb((c=new SFb((lud(),new zud(a))),c));g=b.eh(HEe);g.Ug('build tGraph',1);h=(i=new YWc,kQb(i,a),pQb(i,(q$c(),h$c),a),j=new Tsb,QVc(a,i,j),PVc(a,i,j),i);g.Vg();g=b.eh(HEe);g.Ug('Split graph',1);f=HVc(this.a,h);g.Vg();for(e=new Anb(f);e.a'+aXc(this.c):'e_'+tb(this)};var U$=sfb(JEe,'TEdge',65);feb(121,137,{3:1,121:1,96:1,137:1},YWc);_.Ib=function ZWc(){var a,b,c,d,e;e=null;for(d=Sub(this.b,0);d.b!=d.d.c;){c=RD(evb(d),40);e+=(c.c==null||c.c.length==0?'n_'+c.g:'n_'+c.c)+'\n'}for(b=Sub(this.a,0);b.b!=b.d.c;){a=RD(evb(b),65);e+=(!!a.b&&!!a.c?aXc(a.b)+'->'+aXc(a.c):'e_'+tb(a))+'\n'}return e};var W$=sfb(JEe,'TGraph',121);feb(643,508,{3:1,508:1,643:1,96:1,137:1});var $$=sfb(JEe,'TShape',643);feb(40,643,{3:1,508:1,40:1,643:1,96:1,137:1},bXc);_.Ib=function cXc(){return aXc(this)};var Z$=sfb(JEe,'TNode',40);feb(236,1,Vve,dXc);_.Jc=function eXc(a){xgb(this,a)};_.Kc=function fXc(){var a;return a=Sub(this.a.d,0),new gXc(a)};var Y$=sfb(JEe,'TNode/2',236);feb(329,1,Ave,gXc);_.Nb=function hXc(a){Ztb(this,a)};_.Pb=function jXc(){return RD(evb(this.a),65).c};_.Ob=function iXc(){return dvb(this.a)};_.Qb=function kXc(){gvb(this.a)};var X$=sfb(JEe,'TNode/2/1',329);feb(1923,1,QAe,qXc);_.Kf=function DXc(a,b){oXc(this,RD(a,121),b)};var m_=sfb(LEe,'CompactionProcessor',1923);feb(1924,1,fye,EXc);_.Ne=function FXc(a,b){return rXc(this.a,RD(a,40),RD(b,40))};_.Fb=function GXc(a){return this===a};_.Oe=function HXc(){return new Frb(this)};var _$=sfb(LEe,'CompactionProcessor/lambda$0$Type',1924);feb(1925,1,nwe,IXc);_.Mb=function JXc(a){return sXc(this.b,this.a,RD(a,42))};_.a=0;_.b=0;var a_=sfb(LEe,'CompactionProcessor/lambda$1$Type',1925);feb(1934,1,fye,KXc);_.Ne=function LXc(a,b){return tXc(RD(a,40),RD(b,40))};_.Fb=function MXc(a){return this===a};_.Oe=function NXc(){return new Frb(this)};var b_=sfb(LEe,'CompactionProcessor/lambda$10$Type',1934);feb(1935,1,fye,OXc);_.Ne=function PXc(a,b){return uXc(RD(a,40),RD(b,40))};_.Fb=function QXc(a){return this===a};_.Oe=function RXc(){return new Frb(this)};var c_=sfb(LEe,'CompactionProcessor/lambda$11$Type',1935);feb(1936,1,fye,SXc);_.Ne=function TXc(a,b){return vXc(RD(a,40),RD(b,40))};_.Fb=function UXc(a){return this===a};_.Oe=function VXc(){return new Frb(this)};var d_=sfb(LEe,'CompactionProcessor/lambda$12$Type',1936);feb(1926,1,nwe,WXc);_.Mb=function XXc(a){return wXc(this.a,RD(a,42))};_.a=0;var e_=sfb(LEe,'CompactionProcessor/lambda$2$Type',1926);feb(1927,1,nwe,YXc);_.Mb=function ZXc(a){return xXc(this.a,RD(a,42))};_.a=0;var f_=sfb(LEe,'CompactionProcessor/lambda$3$Type',1927);feb(1928,1,nwe,$Xc);_.Mb=function _Xc(a){return RD(a,40).c.indexOf(IEe)==-1};var g_=sfb(LEe,'CompactionProcessor/lambda$4$Type',1928);feb(1929,1,{},aYc);_.Kb=function bYc(a){return yXc(this.a,RD(a,40))};_.a=0;var h_=sfb(LEe,'CompactionProcessor/lambda$5$Type',1929);feb(1930,1,{},cYc);_.Kb=function dYc(a){return zXc(this.a,RD(a,40))};_.a=0;var i_=sfb(LEe,'CompactionProcessor/lambda$6$Type',1930);feb(1931,1,fye,eYc);_.Ne=function fYc(a,b){return AXc(this.a,RD(a,240),RD(b,240))};_.Fb=function gYc(a){return this===a};_.Oe=function hYc(){return new Frb(this)};var j_=sfb(LEe,'CompactionProcessor/lambda$7$Type',1931);feb(1932,1,fye,iYc);_.Ne=function jYc(a,b){return BXc(this.a,RD(a,40),RD(b,40))};_.Fb=function kYc(a){return this===a};_.Oe=function lYc(){return new Frb(this)};var k_=sfb(LEe,'CompactionProcessor/lambda$8$Type',1932);feb(1933,1,fye,mYc);_.Ne=function nYc(a,b){return CXc(RD(a,40),RD(b,40))};_.Fb=function oYc(a){return this===a};_.Oe=function pYc(){return new Frb(this)};var l_=sfb(LEe,'CompactionProcessor/lambda$9$Type',1933);feb(1921,1,QAe,rYc);_.Kf=function sYc(a,b){qYc(RD(a,121),b)};var n_=sfb(LEe,'DirectionProcessor',1921);feb(1913,1,QAe,vYc);_.Kf=function xYc(a,b){uYc(this,RD(a,121),b)};var o_=sfb(LEe,'FanProcessor',1913);feb(1937,1,QAe,zYc);_.Kf=function CYc(a,b){yYc(RD(a,121),b)};var t_=sfb(LEe,'GraphBoundsProcessor',1937);feb(1938,1,{},DYc);_.Ye=function EYc(a){return RD(a,40).e.a};var p_=sfb(LEe,'GraphBoundsProcessor/lambda$0$Type',1938);feb(1939,1,{},FYc);_.Ye=function GYc(a){return RD(a,40).e.b};var q_=sfb(LEe,'GraphBoundsProcessor/lambda$1$Type',1939);feb(1940,1,{},HYc);_.Ye=function IYc(a){return AYc(RD(a,40))};var r_=sfb(LEe,'GraphBoundsProcessor/lambda$2$Type',1940);feb(1941,1,{},JYc);_.Ye=function KYc(a){return BYc(RD(a,40))};var s_=sfb(LEe,'GraphBoundsProcessor/lambda$3$Type',1941);feb(262,22,{3:1,34:1,22:1,262:1,196:1},XYc);_.dg=function YYc(){switch(this.g){case 0:return new DZc;case 1:return new vYc;case 2:return new nZc;case 3:return new tZc;case 4:return new gZc;case 8:return new cZc;case 5:return new rYc;case 6:return new AZc;case 7:return new qXc;case 9:return new zYc;case 10:return new GZc;default:throw Adb(new agb(lBe+(this.f!=null?this.f:''+this.g)));}};var LYc,MYc,NYc,OYc,PYc,QYc,RYc,SYc,TYc,UYc,VYc;var u_=tfb(LEe,mBe,262,WI,$Yc,ZYc);var _Yc;feb(1920,1,QAe,cZc);_.Kf=function dZc(a,b){bZc(RD(a,121),b)};var v_=sfb(LEe,'LevelCoordinatesProcessor',1920);feb(1918,1,QAe,gZc);_.Kf=function hZc(a,b){eZc(this,RD(a,121),b)};_.a=0;var x_=sfb(LEe,'LevelHeightProcessor',1918);feb(1919,1,Vve,iZc);_.Jc=function jZc(a){xgb(this,a)};_.Kc=function kZc(){return yob(),Qob(),Pob};var w_=sfb(LEe,'LevelHeightProcessor/1',1919);feb(1914,1,QAe,nZc);_.Kf=function oZc(a,b){lZc(this,RD(a,121),b)};var z_=sfb(LEe,'LevelProcessor',1914);feb(1915,1,nwe,pZc);_.Mb=function qZc(a){return Heb(TD(mQb(RD(a,40),(q$c(),n$c))))};var y_=sfb(LEe,'LevelProcessor/lambda$0$Type',1915);feb(1916,1,QAe,tZc);_.Kf=function uZc(a,b){rZc(this,RD(a,121),b)};_.a=0;var B_=sfb(LEe,'NeighborsProcessor',1916);feb(1917,1,Vve,vZc);_.Jc=function wZc(a){xgb(this,a)};_.Kc=function xZc(){return yob(),Qob(),Pob};var A_=sfb(LEe,'NeighborsProcessor/1',1917);feb(1922,1,QAe,AZc);_.Kf=function BZc(a,b){yZc(this,RD(a,121),b)};_.a=0;var C_=sfb(LEe,'NodePositionProcessor',1922);feb(1912,1,QAe,DZc);_.Kf=function EZc(a,b){CZc(this,RD(a,121),b)};var D_=sfb(LEe,'RootProcessor',1912);feb(1942,1,QAe,GZc);_.Kf=function HZc(a,b){FZc(RD(a,121),b)};var E_=sfb(LEe,'Untreeifyer',1942);feb(392,22,{3:1,34:1,22:1,392:1},MZc);var IZc,JZc,KZc;var F_=tfb(PEe,'EdgeRoutingMode',392,WI,OZc,NZc);var PZc;var RZc,SZc,TZc,UZc,VZc,WZc,XZc,YZc,ZZc,$Zc,_Zc,a$c,b$c,c$c,d$c,e$c,f$c,g$c,h$c,i$c,j$c,k$c,l$c,m$c,n$c,o$c,p$c;feb(862,1,Eye,C$c);_.hf=function D$c(a){Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,REe),''),YEe),'Turns on Tree compaction which decreases the size of the whole tree by placing nodes of multiple levels in one large level'),(Geb(),false)),(kid(),cid)),QI),xsb((Yhd(),Whd)))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,SEe),''),'Edge End Texture Length'),'Should be set to the length of the texture at the end of an edge. This value can be used to improve the Edge Routing.'),7),did),VI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,TEe),''),'Tree Level'),'The index for the tree level the node is in'),sgb(0)),gid),bJ),xsb(Vhd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,UEe),''),YEe),'When set to a positive number this option will force the algorithm to place the node to the specified position within the trees layer if weighting is set to constraint'),sgb(-1)),gid),bJ),xsb(Vhd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,VEe),''),'Weighting of Nodes'),'Which weighting to use when computing a node order.'),A$c),eid),J_),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,WEe),''),'Edge Routing Mode'),'Chooses an Edge Routing algorithm.'),u$c),eid),F_),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,XEe),''),'Search Order'),'Which search order to use when computing a spanning tree.'),x$c),eid),K_),xsb(Whd))));i_c((new j_c,a))};var r$c,s$c,t$c,u$c,v$c,w$c,x$c,y$c,z$c,A$c;var G_=sfb(PEe,'MrTreeMetaDataProvider',862);feb(1006,1,Eye,j_c);_.hf=function k_c(a){i_c(a)};var E$c,F$c,G$c,H$c,I$c,J$c,K$c,L$c,M$c,N$c,O$c,P$c,Q$c,R$c,S$c,T$c,U$c,V$c,W$c,X$c,Y$c,Z$c,$$c,_$c,a_c,b_c,c_c,d_c,e_c,f_c,g_c;var I_=sfb(PEe,'MrTreeOptions',1006);feb(1007,1,{},l_c);_.sf=function m_c(){var a;return a=new fWc,a};_.tf=function n_c(a){};var H_=sfb(PEe,'MrTreeOptions/MrtreeFactory',1007);feb(353,22,{3:1,34:1,22:1,353:1},t_c);var o_c,p_c,q_c,r_c;var J_=tfb(PEe,'OrderWeighting',353,WI,v_c,u_c);var w_c;feb(433,22,{3:1,34:1,22:1,433:1},B_c);var y_c,z_c;var K_=tfb(PEe,'TreeifyingOrder',433,WI,D_c,C_c);var E_c;feb(1486,1,nEe,N_c);_.rg=function O_c(a){return RD(a,121),G_c};_.Kf=function P_c(a,b){M_c(this,RD(a,121),b)};var G_c;var L_=sfb('org.eclipse.elk.alg.mrtree.p1treeify','DFSTreeifyer',1486);feb(1487,1,nEe,V_c);_.rg=function W_c(a){return RD(a,121),Q_c};_.Kf=function $_c(a,b){U_c(this,RD(a,121),b)};var Q_c;var T_=sfb(aFe,'NodeOrderer',1487);feb(1494,1,{},a0c);_.td=function b0c(a){return __c(a)};var M_=sfb(aFe,'NodeOrderer/0methodref$lambda$6$Type',1494);feb(1488,1,nwe,c0c);_.Mb=function d0c(a){return R_c(),Heb(TD(mQb(RD(a,40),(q$c(),n$c))))};var N_=sfb(aFe,'NodeOrderer/lambda$0$Type',1488);feb(1489,1,nwe,e0c);_.Mb=function f0c(a){return R_c(),RD(mQb(RD(a,40),(h_c(),W$c)),17).a<0};var O_=sfb(aFe,'NodeOrderer/lambda$1$Type',1489);feb(1490,1,nwe,g0c);_.Mb=function h0c(a){return X_c(this.a,RD(a,40))};var P_=sfb(aFe,'NodeOrderer/lambda$2$Type',1490);feb(1491,1,nwe,i0c);_.Mb=function j0c(a){return Y_c(this.a,RD(a,40))};var Q_=sfb(aFe,'NodeOrderer/lambda$3$Type',1491);feb(1492,1,fye,k0c);_.Ne=function l0c(a,b){return Z_c(RD(a,40),RD(b,40))};_.Fb=function m0c(a){return this===a};_.Oe=function n0c(){return new Frb(this)};var R_=sfb(aFe,'NodeOrderer/lambda$4$Type',1492);feb(1493,1,nwe,o0c);_.Mb=function p0c(a){return R_c(),RD(mQb(RD(a,40),(q$c(),XZc)),17).a!=0};var S_=sfb(aFe,'NodeOrderer/lambda$5$Type',1493);feb(1495,1,nEe,x0c);_.rg=function y0c(a){return RD(a,121),q0c};_.Kf=function z0c(a,b){v0c(this,RD(a,121),b)};_.b=0;var q0c;var U_=sfb('org.eclipse.elk.alg.mrtree.p3place','NodePlacer',1495);feb(1496,1,nEe,J0c);_.rg=function K0c(a){return RD(a,121),A0c};_.Kf=function Y0c(a,b){I0c(RD(a,121),b)};var A0c;var o0=sfb(bFe,'EdgeRouter',1496);feb(1498,1,fye,Z0c);_.Ne=function $0c(a,b){return hgb(RD(a,17).a,RD(b,17).a)};_.Fb=function _0c(a){return this===a};_.Oe=function a1c(){return new Frb(this)};var V_=sfb(bFe,'EdgeRouter/0methodref$compare$Type',1498);feb(1503,1,{},b1c);_.Ye=function c1c(a){return Kfb(UD(a))};var W_=sfb(bFe,'EdgeRouter/1methodref$doubleValue$Type',1503);feb(1505,1,fye,d1c);_.Ne=function e1c(a,b){return Qfb(Kfb(UD(a)),Kfb(UD(b)))};_.Fb=function f1c(a){return this===a};_.Oe=function g1c(){return new Frb(this)};var X_=sfb(bFe,'EdgeRouter/2methodref$compare$Type',1505);feb(1507,1,fye,h1c);_.Ne=function i1c(a,b){return Qfb(Kfb(UD(a)),Kfb(UD(b)))};_.Fb=function j1c(a){return this===a};_.Oe=function k1c(){return new Frb(this)};var Y_=sfb(bFe,'EdgeRouter/3methodref$compare$Type',1507);feb(1509,1,{},l1c);_.Ye=function m1c(a){return Kfb(UD(a))};var Z_=sfb(bFe,'EdgeRouter/4methodref$doubleValue$Type',1509);feb(1511,1,fye,n1c);_.Ne=function o1c(a,b){return Qfb(Kfb(UD(a)),Kfb(UD(b)))};_.Fb=function p1c(a){return this===a};_.Oe=function q1c(){return new Frb(this)};var $_=sfb(bFe,'EdgeRouter/5methodref$compare$Type',1511);feb(1513,1,fye,r1c);_.Ne=function s1c(a,b){return Qfb(Kfb(UD(a)),Kfb(UD(b)))};_.Fb=function t1c(a){return this===a};_.Oe=function u1c(){return new Frb(this)};var __=sfb(bFe,'EdgeRouter/6methodref$compare$Type',1513);feb(1497,1,{},v1c);_.Kb=function w1c(a){return B0c(),RD(mQb(RD(a,40),(h_c(),f_c)),17)};var a0=sfb(bFe,'EdgeRouter/lambda$0$Type',1497);feb(1508,1,{},x1c);_.Kb=function y1c(a){return L0c(RD(a,40))};var b0=sfb(bFe,'EdgeRouter/lambda$11$Type',1508);feb(1510,1,{},z1c);_.Kb=function A1c(a){return M0c(this.b,this.a,RD(a,40))};_.a=0;_.b=0;var c0=sfb(bFe,'EdgeRouter/lambda$13$Type',1510);feb(1512,1,{},B1c);_.Kb=function C1c(a){return N0c(this.b,this.a,RD(a,40))};_.a=0;_.b=0;var d0=sfb(bFe,'EdgeRouter/lambda$15$Type',1512);feb(1514,1,fye,D1c);_.Ne=function E1c(a,b){return O0c(RD(a,65),RD(b,65))};_.Fb=function F1c(a){return this===a};_.Oe=function G1c(){return new Frb(this)};var e0=sfb(bFe,'EdgeRouter/lambda$17$Type',1514);feb(1515,1,fye,H1c);_.Ne=function I1c(a,b){return P0c(RD(a,65),RD(b,65))};_.Fb=function J1c(a){return this===a};_.Oe=function K1c(){return new Frb(this)};var f0=sfb(bFe,'EdgeRouter/lambda$18$Type',1515);feb(1516,1,fye,L1c);_.Ne=function M1c(a,b){return Q0c(RD(a,65),RD(b,65))};_.Fb=function N1c(a){return this===a};_.Oe=function O1c(){return new Frb(this)};var g0=sfb(bFe,'EdgeRouter/lambda$19$Type',1516);feb(1499,1,nwe,P1c);_.Mb=function Q1c(a){return R0c(this.a,RD(a,40))};_.a=0;var h0=sfb(bFe,'EdgeRouter/lambda$2$Type',1499);feb(1517,1,fye,R1c);_.Ne=function S1c(a,b){return S0c(RD(a,65),RD(b,65))};_.Fb=function T1c(a){return this===a};_.Oe=function U1c(){return new Frb(this)};var i0=sfb(bFe,'EdgeRouter/lambda$20$Type',1517);feb(1500,1,fye,V1c);_.Ne=function W1c(a,b){return T0c(RD(a,40),RD(b,40))};_.Fb=function X1c(a){return this===a};_.Oe=function Y1c(){return new Frb(this)};var j0=sfb(bFe,'EdgeRouter/lambda$3$Type',1500);feb(1501,1,fye,Z1c);_.Ne=function $1c(a,b){return U0c(RD(a,40),RD(b,40))};_.Fb=function _1c(a){return this===a};_.Oe=function a2c(){return new Frb(this)};var k0=sfb(bFe,'EdgeRouter/lambda$4$Type',1501);feb(1502,1,{},b2c);_.Kb=function c2c(a){return V0c(RD(a,40))};var l0=sfb(bFe,'EdgeRouter/lambda$5$Type',1502);feb(1504,1,{},d2c);_.Kb=function e2c(a){return W0c(this.b,this.a,RD(a,40))};_.a=0;_.b=0;var m0=sfb(bFe,'EdgeRouter/lambda$7$Type',1504);feb(1506,1,{},f2c);_.Kb=function g2c(a){return X0c(this.b,this.a,RD(a,40))};_.a=0;_.b=0;var n0=sfb(bFe,'EdgeRouter/lambda$9$Type',1506);feb(675,1,{675:1},i2c);_.e=0;_.f=false;_.g=false;var r0=sfb(bFe,'MultiLevelEdgeNodeNodeGap',675);feb(1943,1,fye,l2c);_.Ne=function m2c(a,b){return j2c(RD(a,240),RD(b,240))};_.Fb=function n2c(a){return this===a};_.Oe=function o2c(){return new Frb(this)};var p0=sfb(bFe,'MultiLevelEdgeNodeNodeGap/lambda$0$Type',1943);feb(1944,1,fye,p2c);_.Ne=function q2c(a,b){return k2c(RD(a,240),RD(b,240))};_.Fb=function r2c(a){return this===a};_.Oe=function s2c(){return new Frb(this)};var q0=sfb(bFe,'MultiLevelEdgeNodeNodeGap/lambda$1$Type',1944);var t2c;feb(501,22,{3:1,34:1,22:1,501:1,188:1,196:1},z2c);_.dg=function B2c(){return y2c(this)};_.qg=function A2c(){return y2c(this)};var v2c,w2c;var s0=tfb(cFe,'RadialLayoutPhases',501,WI,D2c,C2c);var E2c;feb(1113,205,oze,H2c);_.rf=function I2c(a,b){var c,d,e,f,g,h;c=G2c(this,a);b.Ug('Radial layout',c.c.length);Heb(TD(Gxd(a,($4c(),N4c))))||RFb((d=new SFb((lud(),new zud(a))),d));h=K2c(a);Ixd(a,(u2c(),t2c),h);if(!h){throw Adb(new agb('The given graph is not a tree!'))}e=Kfb(UD(Gxd(a,S4c)));e==0&&(e=J2c(a));Ixd(a,S4c,e);for(g=new Anb(G2c(this,a));g.a=3){v=RD(QHd(t,0),27);w=RD(QHd(t,1),27);f=0;while(f+2=v.f+w.f+k||w.f>=u.f+v.f+k){B=true;break}else{++f}}}else{B=true}if(!B){m=t.i;for(h=new dMd(t);h.e!=h.i.gc();){g=RD(bMd(h),27);Ixd(g,(umd(),Rld),sgb(m));--m}crd(a,new Oqd);b.Vg();return}c=(Sed(this.a),Ved(this.a,(f6c(),c6c),RD(Gxd(a,V7c),188)),Ved(this.a,d6c,RD(Gxd(a,M7c),188)),Ved(this.a,e6c,RD(Gxd(a,S7c),188)),Ped(this.a,(D=new ufd,pfd(D,c6c,(z6c(),y6c)),pfd(D,d6c,x6c),Heb(TD(Gxd(a,B7c)))&&pfd(D,c6c,w6c),D)),Qed(this.a,a));j=1/c.c.length;A=0;for(o=new Anb(c);o.a0&&vjd((BFb(c-1,b.length),b.charCodeAt(c-1)),ZAe)){--c}if(e>=c){throw Adb(new agb('The given string does not contain any numbers.'))}f=vhb((AFb(e,c,b.length),b.substr(e,c-e)),',|;|\r|\n');if(f.length!=2){throw Adb(new agb('Exactly two numbers are expected, '+f.length+' were found.'))}try{this.a=Neb(Dhb(f[0]));this.b=Neb(Dhb(f[1]))}catch(a){a=zdb(a);if(ZD(a,130)){d=a;throw Adb(new agb($Ae+d))}else throw Adb(a)}};_.Ib=function yjd(){return '('+this.a+','+this.b+')'};_.a=0;_.b=0;var l3=sfb(_Ae,'KVector',8);feb(75,67,{3:1,4:1,20:1,31:1,56:1,16:1,67:1,15:1,75:1,423:1},Ejd,Fjd,Gjd);_.Pc=function Jjd(){return Djd(this)};_.cg=function Hjd(b){var c,d,e,f,g,h;e=vhb(b,',|;|\\(|\\)|\\[|\\]|\\{|\\}| |\t|\n');Xub(this);try{d=0;g=0;f=0;h=0;while(d0){g%2==0?(f=Neb(e[d])):(h=Neb(e[d]));g>0&&g%2!=0&&Mub(this,new rjd(f,h));++g}++d}}catch(a){a=zdb(a);if(ZD(a,130)){c=a;throw Adb(new agb('The given string does not match the expected format for vectors.'+c))}else throw Adb(a)}};_.Ib=function Kjd(){var a,b,c;a=new dib('(');b=Sub(this,0);while(b.b!=b.d.c){c=RD(evb(b),8);Zhb(a,c.a+','+c.b);b.b!=b.d.c&&(a.a+='; ',a)}return (a.a+=')',a).a};var k3=sfb(_Ae,'KVectorChain',75);feb(255,22,{3:1,34:1,22:1,255:1},Sjd);var Ljd,Mjd,Njd,Ojd,Pjd,Qjd;var n3=tfb(JGe,'Alignment',255,WI,Ujd,Tjd);var Vjd;feb(991,1,Eye,jkd);_.hf=function kkd(a){ikd(a)};var Xjd,Yjd,Zjd,$jd,_jd,akd,bkd,ckd,dkd,ekd,fkd,gkd;var p3=sfb(JGe,'BoxLayouterOptions',991);feb(992,1,{},lkd);_.sf=function mkd(){var a;return a=new jrd,a};_.tf=function nkd(a){};var o3=sfb(JGe,'BoxLayouterOptions/BoxFactory',992);feb(298,22,{3:1,34:1,22:1,298:1},vkd);var okd,pkd,qkd,rkd,skd,tkd;var q3=tfb(JGe,'ContentAlignment',298,WI,xkd,wkd);var ykd;feb(699,1,Eye,vmd);_.hf=function wmd(a){Egd(a,new Ahd(Qhd(Phd(Rhd(Khd(Ohd(Lhd(Mhd(new Shd,OGe),''),'Layout Algorithm'),'Select a specific layout algorithm.'),(kid(),iid)),qJ),xsb((Yhd(),Whd)))));Egd(a,new Ahd(Qhd(Phd(Rhd(Khd(Ohd(Lhd(Mhd(new Shd,PGe),''),'Resolved Layout Algorithm'),'Meta data associated with the selected algorithm.'),hid),D2),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,MDe),''),'Alignment'),'Alignment of the selected node relative to other nodes; the exact meaning depends on the used algorithm.'),Ckd),eid),n3),xsb(Vhd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Khd(Ohd(Lhd(Mhd(new Shd,Dze),''),'Aspect Ratio'),'The desired aspect ratio of the drawing, that is the quotient of width by height.'),did),VI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Khd(Ohd(Lhd(Mhd(new Shd,QGe),''),'Bend Points'),"A fixed list of bend points for the edge. This is used by the 'Fixed Layout' algorithm to specify a pre-defined routing for an edge. The vector chain must include the source point, any bend points, and the target point, so it must have at least two points."),hid),k3),xsb(Thd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,YDe),''),'Content Alignment'),'Specifies how the content of a node are aligned. Each node can individually control the alignment of its contents. I.e. if a node should be aligned top left in its parent node, the parent node should specify that option.'),Lkd),fid),q3),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,LDe),''),'Debug Mode'),'Whether additional debug information shall be generated.'),(Geb(),false)),cid),QI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,PDe),''),eze),'Overall direction of edges: horizontal (right / left) or vertical (down / up).'),Okd),eid),s3),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,kDe),''),'Edge Routing'),'What kind of edge routing style should be applied for the content of a parent node. Algorithms may also set this option to single edges in order to mark them as splines. The bend point list of edges with this option set to SPLINES must be interpreted as control points for a piecewise cubic spline.'),Tkd),eid),u3),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,MGe),''),'Expand Nodes'),'If active, nodes are expanded to fill the area of their parent.'),false),cid),QI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,fDe),''),'Hierarchy Handling'),"Determines whether separate layout runs are triggered for different compound nodes in a hierarchical graph. Setting a node's hierarchy handling to `INCLUDE_CHILDREN` will lay out that node and all of its descendants in a single layout run, until a descendant is encountered which has its hierarchy handling set to `SEPARATE_CHILDREN`. In general, `SEPARATE_CHILDREN` will ensure that a new layout run is triggered for a node with that setting. Including multiple levels of hierarchy in a single layout run may allow cross-hierarchical edges to be laid out properly. If the root node is set to `INHERIT` (or not set at all), the default behavior is `SEPARATE_CHILDREN`."),Ykd),eid),y3),ysb(Whd,cD(WC(d3,1),jwe,170,0,[Vhd])))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,Eze),''),'Padding'),"The padding to be left to a parent element's border when placing child elements. This can also serve as an output option of a layout algorithm if node size calculation is setup appropriately."),uld),hid),i3),ysb(Whd,cD(WC(d3,1),jwe,170,0,[Vhd])))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,dAe),''),'Interactive'),'Whether the algorithm should be run in interactive mode for the content of a parent node. What this means exactly depends on how the specific algorithm interprets this option. Usually in the interactive mode algorithms try to modify the current layout as little as possible.'),false),cid),QI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,iEe),''),'interactive Layout'),'Whether the graph should be changeable interactively and by setting constraints'),false),cid),QI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,gAe),''),'Omit Node Micro Layout'),"Node micro layout comprises the computation of node dimensions (if requested), the placement of ports and their labels, and the placement of node labels. The functionality is implemented independent of any specific layout algorithm and shouldn't have any negative impact on the layout algorithm's performance itself. Yet, if any unforeseen behavior occurs, this option allows to deactivate the micro layout."),false),cid),QI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,eAe),''),'Port Constraints'),'Defines constraints of the position of the ports of a node.'),Ild),eid),C3),xsb(Vhd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Khd(Ohd(Lhd(Mhd(new Shd,fEe),''),'Position'),"The position of a node, port, or label. This is used by the 'Fixed Layout' algorithm to specify a pre-defined position."),hid),l3),ysb(Vhd,cD(WC(d3,1),jwe,170,0,[Xhd,Uhd])))));Egd(a,new Ahd(Qhd(Phd(Rhd(Khd(Ohd(Lhd(Mhd(new Shd,$ze),''),'Priority'),'Defines the priority of an object; its meaning depends on the specific layout algorithm and the context where it is used.'),gid),bJ),ysb(Vhd,cD(WC(d3,1),jwe,170,0,[Thd])))));Egd(a,new Ahd(Qhd(Phd(Rhd(Khd(Ohd(Lhd(Mhd(new Shd,bAe),''),'Randomization Seed'),'Seed used for pseudo-random number generators to control the layout algorithm. If the value is 0, the seed shall be determined pseudo-randomly (e.g. from the system time).'),gid),bJ),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Khd(Ohd(Lhd(Mhd(new Shd,cAe),''),'Separate Connected Components'),'Whether each connected component should be processed separately.'),cid),QI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,ZDe),''),'Junction Points'),'This option is not used as option, but as output of the layout algorithms. It is attached to edges and determines the points where junction symbols should be drawn in order to represent hyperedges with orthogonal routing. Whether such points are computed depends on the chosen layout algorithm and edge routing style. The points are put into the vector chain with no specific order.'),dld),hid),k3),xsb(Thd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,aEe),''),'Comment Box'),'Whether the node should be regarded as a comment box instead of a regular node. In that case its placement should be similar to how labels are handled. Any edges incident to a comment box specify to which graph elements the comment is related.'),false),cid),QI),xsb(Vhd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,bEe),''),'Hypernode'),'Whether the node should be handled as a hypernode.'),false),cid),QI),xsb(Vhd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Khd(Ohd(Lhd(Mhd(new Shd,RGe),''),'Label Manager'),"Label managers can shorten labels upon a layout algorithm's request."),hid),g3),ysb(Whd,cD(WC(d3,1),jwe,170,0,[Uhd])))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,gEe),''),'Margins'),"Margins define additional space around the actual bounds of a graph element. For instance, ports or labels being placed on the outside of a node's border might introduce such a margin. The margin is used to guarantee non-overlap of other graph elements with those ports or labels."),fld),hid),h3),xsb(Vhd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,JDe),''),'No Layout'),"No layout is done for the associated element. This is used to mark parts of a diagram to avoid their inclusion in the layout graph, or to mark parts of the layout graph to prevent layout engines from processing them. If you wish to exclude the contents of a compound node from automatic layout, while the node itself is still considered on its own layer, use the 'Fixed Layout' algorithm for that node."),false),cid),QI),ysb(Vhd,cD(WC(d3,1),jwe,170,0,[Thd,Xhd,Uhd])))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,SGe),''),'Scale Factor'),"The scaling factor to be applied to the corresponding node in recursive layout. It causes the corresponding node's size to be adjusted, and its ports and labels to be sized and placed accordingly after the layout of that node has been determined (and before the node itself and its siblings are arranged). The scaling is not reverted afterwards, so the resulting layout graph contains the adjusted size and position data. This option is currently not supported if 'Layout Hierarchy' is set."),1),did),VI),xsb(Vhd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Khd(Ohd(Lhd(Mhd(new Shd,TGe),''),'Child Area Width'),'The width of the area occupied by the laid out children of a node.'),did),VI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Khd(Ohd(Lhd(Mhd(new Shd,UGe),''),'Child Area Height'),'The height of the area occupied by the laid out children of a node.'),did),VI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,mAe),''),yGe),"Turns topdown layout on and off. If this option is enabled, hierarchical layout will be computed first for the root node and then for its children recursively. Layouts are then scaled down to fit the area provided by their parents. Graphs must follow a certain structure for topdown layout to work properly. {@link TopdownNodeTypes.PARALLEL_NODE} nodes must have children of type {@link TopdownNodeTypes.HIERARCHICAL_NODE} and must define {@link topdown.hierarchicalNodeWidth} and {@link topdown.hierarchicalNodeAspectRatio} for their children. Furthermore they need to be laid out using an algorithm that is a {@link TopdownLayoutProvider}. Hierarchical nodes can also be parents of other hierarchical nodes and can optionally use a {@link TopdownSizeApproximator} to dynamically set sizes during topdown layout. In this case {@link topdown.hierarchicalNodeWidth} and {@link topdown.hierarchicalNodeAspectRatio} should be set on the node itself rather than the parent. The values are then used by the size approximator as base values. Hierarchical nodes require the layout option {@link nodeSize.fixedGraphSize} to be true to prevent the algorithm used there from resizing the hierarchical node. This option is not supported if 'Hierarchy Handling' is set to 'INCLUDE_CHILDREN'"),false),cid),QI),xsb(Whd))));zgd(a,mAe,qAe,null);Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,VGe),''),'Animate'),'Whether the shift from the old layout to the new computed layout shall be animated.'),true),cid),QI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,WGe),''),'Animation Time Factor'),"Factor for computation of animation time. The higher the value, the longer the animation time. If the value is 0, the resulting time is always equal to the minimum defined by 'Minimal Animation Time'."),sgb(100)),gid),bJ),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,XGe),''),'Layout Ancestors'),'Whether the hierarchy levels on the path from the selected element to the root of the diagram shall be included in the layout process.'),false),cid),QI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,YGe),''),'Maximal Animation Time'),'The maximal time for animations, in milliseconds.'),sgb(4000)),gid),bJ),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,ZGe),''),'Minimal Animation Time'),'The minimal time for animations, in milliseconds.'),sgb(400)),gid),bJ),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,$Ge),''),'Progress Bar'),'Whether a progress bar shall be displayed during layout computations.'),false),cid),QI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,_Ge),''),'Validate Graph'),'Whether the graph shall be validated before any layout algorithm is applied. If this option is enabled and at least one error is found, the layout process is aborted and a message is shown to the user.'),false),cid),QI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,aHe),''),'Validate Options'),'Whether layout options shall be validated before any layout algorithm is applied. If this option is enabled and at least one error is found, the layout process is aborted and a message is shown to the user.'),true),cid),QI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,bHe),''),'Zoom to Fit'),'Whether the zoom level shall be set to view the whole diagram after layout.'),false),cid),QI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,NGe),'box'),'Box Layout Mode'),'Configures the packing mode used by the {@link BoxLayoutProvider}. If SIMPLE is not required (neither priorities are used nor the interactive mode), GROUP_DEC can improve the packing and decrease the area. GROUP_MIXED and GROUP_INC may, in very specific scenarios, work better.'),Gkd),eid),R3),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,xDe),lDe),'Comment Comment Spacing'),'Spacing to be preserved between a comment box and other comment boxes connected to the same node. The space left between comment boxes of different nodes is controlled by the node-node spacing.'),10),did),VI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,yDe),lDe),'Comment Node Spacing'),'Spacing to be preserved between a node and its connected comment boxes. The space left between a node and the comments of another node is controlled by the node-node spacing.'),10),did),VI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,Bze),lDe),'Components Spacing'),"Spacing to be preserved between pairs of connected components. This option is only relevant if 'separateConnectedComponents' is activated."),20),did),VI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,zDe),lDe),'Edge Spacing'),'Spacing to be preserved between any two edges. Note that while this can somewhat easily be satisfied for the segments of orthogonally drawn edges, it is harder for general polylines or splines.'),10),did),VI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,aAe),lDe),'Edge Label Spacing'),"The minimal distance to be preserved between a label and the edge it is associated with. Note that the placement of a label is influenced by the 'edgelabels.placement' option."),2),did),VI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,ADe),lDe),'Edge Node Spacing'),'Spacing to be preserved between nodes and edges.'),10),did),VI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,BDe),lDe),'Label Spacing'),'Determines the amount of space to be left between two labels of the same graph element.'),0),did),VI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,EDe),lDe),'Label Node Spacing'),"Spacing to be preserved between labels and the border of node they are associated with. Note that the placement of a label is influenced by the 'nodelabels.placement' option."),5),did),VI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,CDe),lDe),'Horizontal spacing between Label and Port'),"Horizontal spacing to be preserved between labels and the ports they are associated with. Note that the placement of a label is influenced by the 'portlabels.placement' option."),1),did),VI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,DDe),lDe),'Vertical spacing between Label and Port'),"Vertical spacing to be preserved between labels and the ports they are associated with. Note that the placement of a label is influenced by the 'portlabels.placement' option."),1),did),VI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,_ze),lDe),'Node Spacing'),'The minimal distance to be preserved between each two nodes.'),20),did),VI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,FDe),lDe),'Node Self Loop Spacing'),'Spacing to be preserved between a node and its self loops.'),10),did),VI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,GDe),lDe),'Port Spacing'),'Spacing between pairs of ports of the same node.'),10),did),VI),ysb(Whd,cD(WC(d3,1),jwe,170,0,[Vhd])))));Egd(a,new Ahd(Qhd(Phd(Rhd(Khd(Ohd(Lhd(Mhd(new Shd,HDe),lDe),'Individual Spacing'),"Allows to specify individual spacing values for graph elements that shall be different from the value specified for the element's parent."),hid),l4),ysb(Vhd,cD(WC(d3,1),jwe,170,0,[Thd,Xhd,Uhd])))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,hEe),lDe),'Additional Port Space'),'Additional space around the sets of ports on each node side. For each side of a node, this option can reserve additional space before and after the ports on each side. For example, a top spacing of 20 makes sure that the first port on the western and eastern side is 20 units away from the northern border.'),imd),hid),h3),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Khd(Ohd(Lhd(Mhd(new Shd,eEe),hHe),'Layout Partition'),'Partition to which the node belongs. This requires Layout Partitioning to be active. Nodes with lower partition IDs will appear to the left of nodes with higher partition IDs (assuming a left-to-right layout direction).'),gid),bJ),ysb(Whd,cD(WC(d3,1),jwe,170,0,[Vhd])))));zgd(a,eEe,dEe,yld);Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,dEe),hHe),'Layout Partitioning'),'Whether to activate partitioned layout. This will allow to group nodes through the Layout Partition option. a pair of nodes with different partition indices is then placed such that the node with lower index is placed to the left of the other node (with left-to-right layout direction). Depending on the layout algorithm, this may only be guaranteed to work if all nodes have a layout partition configured, or at least if edges that cross partitions are not part of a partition-crossing cycle.'),wld),cid),QI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,QDe),iHe),'Node Label Padding'),'Define padding for node labels that are placed inside of a node.'),hld),hid),i3),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,kAe),iHe),'Node Label Placement'),"Hints for where node labels are to be placed; if empty, the node label's position is not modified."),jld),fid),A3),ysb(Vhd,cD(WC(d3,1),jwe,170,0,[Uhd])))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,TDe),jHe),'Port Alignment'),'Defines the default port distribution for a node. May be overridden for each side individually.'),Ald),eid),B3),xsb(Vhd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Khd(Ohd(Lhd(Mhd(new Shd,UDe),jHe),'Port Alignment (North)'),"Defines how ports on the northern side are placed, overriding the node's general port alignment."),eid),B3),xsb(Vhd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Khd(Ohd(Lhd(Mhd(new Shd,VDe),jHe),'Port Alignment (South)'),"Defines how ports on the southern side are placed, overriding the node's general port alignment."),eid),B3),xsb(Vhd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Khd(Ohd(Lhd(Mhd(new Shd,WDe),jHe),'Port Alignment (West)'),"Defines how ports on the western side are placed, overriding the node's general port alignment."),eid),B3),xsb(Vhd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Khd(Ohd(Lhd(Mhd(new Shd,XDe),jHe),'Port Alignment (East)'),"Defines how ports on the eastern side are placed, overriding the node's general port alignment."),eid),B3),xsb(Vhd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,jAe),kHe),'Node Size Constraints'),"What should be taken into account when calculating a node's size. Empty size constraints specify that a node's size is already fixed and should not be changed."),lld),fid),H3),xsb(Vhd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,iAe),kHe),'Node Size Options'),'Options modifying the behavior of the size constraints set on a node. Each member of the set specifies something that should be taken into account when calculating node sizes. The empty set corresponds to no further modifications.'),qld),fid),I3),xsb(Vhd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,CAe),kHe),'Node Size Minimum'),'The minimal size to which a node can be reduced.'),old),hid),l3),xsb(Vhd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,hAe),kHe),'Fixed Graph Size'),"By default, the fixed layout provider will enlarge a graph until it is large enough to contain its children. If this option is set, it won't do so."),false),cid),QI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,$De),vDe),'Edge Label Placement'),'Gives a hint on where to put edge labels.'),Rkd),eid),t3),xsb(Uhd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,fAe),vDe),'Inline Edge Labels'),"If true, an edge label is placed directly on its edge. May only apply to center edge labels. This kind of label placement is only advisable if the label's rendering is such that it is not crossed by its edge and thus stays legible."),false),cid),QI),xsb(Uhd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Khd(Ohd(Lhd(Mhd(new Shd,cHe),'font'),'Font Name'),'Font name used for a label.'),iid),qJ),xsb(Uhd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Khd(Ohd(Lhd(Mhd(new Shd,dHe),'font'),'Font Size'),'Font size used for a label.'),gid),bJ),xsb(Uhd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Khd(Ohd(Lhd(Mhd(new Shd,cEe),lHe),'Port Anchor Offset'),'The offset to the port position where connections shall be attached.'),hid),l3),xsb(Xhd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Khd(Ohd(Lhd(Mhd(new Shd,_De),lHe),'Port Index'),"The index of a port in the fixed order around a node. The order is assumed as clockwise, starting with the leftmost port on the top side. This option must be set if 'Port Constraints' is set to FIXED_ORDER and no specific positions are given for the ports. Additionally, the option 'Port Side' must be defined in this case."),gid),bJ),xsb(Xhd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,KDe),lHe),'Port Side'),"The side of a node on which a port is situated. This option must be set if 'Port Constraints' is set to FIXED_SIDE or FIXED_ORDER and no specific positions are given for the ports."),Pld),eid),E3),xsb(Xhd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Khd(Ohd(Lhd(Mhd(new Shd,IDe),lHe),'Port Border Offset'),"The offset of ports on the node border. With a positive offset the port is moved outside of the node, while with a negative offset the port is moved towards the inside. An offset of 0 means that the port is placed directly on the node border, i.e. if the port side is north, the port's south border touches the nodes's north border; if the port side is east, the port's west border touches the nodes's east border; if the port side is south, the port's north border touches the node's south border; if the port side is west, the port's east border touches the node's west border."),did),VI),xsb(Xhd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,lAe),mHe),'Port Label Placement'),"Decides on a placement method for port labels; if empty, the node label's position is not modified."),Mld),fid),D3),xsb(Vhd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,RDe),mHe),'Port Labels Next to Port'),"Use 'portLabels.placement': NEXT_TO_PORT_OF_POSSIBLE."),false),cid),QI),xsb(Vhd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,SDe),mHe),'Treat Port Labels as Group'),'If this option is true (default), the labels of a port will be treated as a group when it comes to centering them next to their port. If this option is false, only the first label will be centered next to the port, with the others being placed below. This only applies to labels of eastern and western ports and will have no effect if labels are not placed next to their port.'),true),cid),QI),xsb(Vhd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,nAe),nHe),'Topdown Scale Factor'),"The scaling factor to be applied to the nodes laid out within the node in recursive topdown layout. The difference to 'Scale Factor' is that the node itself is not scaled. This value has to be set on hierarchical nodes."),1),did),VI),xsb(Whd))));zgd(a,nAe,qAe,rmd);Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,eHe),nHe),'Topdown Size Approximator'),'The size approximator to be used to set sizes of hierarchical nodes during topdown layout. The default value is null, which results in nodes keeping whatever size is defined for them e.g. through parent parallel node or by manually setting the size.'),null),eid),M3),xsb(Vhd))));zgd(a,eHe,qAe,tmd);Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,oAe),nHe),'Topdown Hierarchical Node Width'),'The fixed size of a hierarchical node when using topdown layout. If this value is set on a parallel node it applies to its children, when set on a hierarchical node it applies to the node itself.'),150),did),VI),ysb(Whd,cD(WC(d3,1),jwe,170,0,[Vhd])))));zgd(a,oAe,qAe,null);Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,pAe),nHe),'Topdown Hierarchical Node Aspect Ratio'),'The fixed aspect ratio of a hierarchical node when using topdown layout. Default is 1/sqrt(2). If this value is set on a parallel node it applies to its children, when set on a hierarchical node it applies to the node itself.'),1.414),did),VI),ysb(Whd,cD(WC(d3,1),jwe,170,0,[Vhd])))));zgd(a,pAe,qAe,null);Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,qAe),nHe),'Topdown Node Type'),'The different node types used for topdown layout. If the node type is set to {@link TopdownNodeTypes.PARALLEL_NODE} the algorithm must be set to a {@link TopdownLayoutProvider} such as {@link TopdownPacking}. The {@link nodeSize.fixedGraphSize} option is technically only required for hierarchical nodes.'),null),eid),J3),xsb(Vhd))));zgd(a,qAe,hAe,null);Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,fHe),nHe),'Topdown Scale Cap'),'Determines the upper limit for the topdown scale factor. The default value is 1.0 which ensures that nested children never end up appearing larger than their parents in terms of unit sizes such as the font size. If the limit is larger, nodes will fully utilize the available space, but it is counteriniuitive for inner nodes to have a larger scale than outer nodes.'),1),did),VI),xsb(Whd))));zgd(a,fHe,qAe,pmd);Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,NDe),oHe),'Activate Inside Self Loops'),"Whether this node allows to route self loops inside of it instead of around it. If set to true, this will make the node a compound node if it isn't already, and will require the layout algorithm to support compound nodes with hierarchical ports."),false),cid),QI),xsb(Vhd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,ODe),oHe),'Inside Self Loop'),'Whether a self loop should be routed inside a node instead of around that node.'),false),cid),QI),xsb(Thd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,Cze),'edge'),'Edge Thickness'),'The thickness of an edge. This is a hint on the line width used to draw an edge, possibly requiring more space to be reserved for it.'),1),did),VI),xsb(Thd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,gHe),'edge'),'Edge Type'),'The type of an edge. This is usually used for UML class diagrams, where associations must be handled differently from generalizations.'),Vkd),eid),v3),xsb(Thd))));Dgd(a,new fgd(mgd(ogd(ngd(new pgd,sxe),'Layered'),'The layer-based method was introduced by Sugiyama, Tagawa and Toda in 1981. It emphasizes the direction of edges by pointing as many edges as possible into the same direction. The nodes are arranged in layers, which are sometimes called "hierarchies", and then reordered such that the number of edge crossings is minimized. Afterwards, concrete coordinates are computed for the nodes and edge bend points.')));Dgd(a,new fgd(mgd(ogd(ngd(new pgd,'org.eclipse.elk.orthogonal'),'Orthogonal'),'Orthogonal methods that follow the "topology-shape-metrics" approach by Batini, Nardelli and Tamassia \'86. The first phase determines the topology of the drawing by applying a planarization technique, which results in a planar representation of the graph. The orthogonal shape is computed in the second phase, which aims at minimizing the number of edge bends, and is called orthogonalization. The third phase leads to concrete coordinates for nodes and edge bend points by applying a compaction method, thus defining the metrics.')));Dgd(a,new fgd(mgd(ogd(ngd(new pgd,Zze),'Force'),'Layout algorithms that follow physical analogies by simulating a system of attractive and repulsive forces. The first successful method of this kind was proposed by Eades in 1984.')));Dgd(a,new fgd(mgd(ogd(ngd(new pgd,'org.eclipse.elk.circle'),'Circle'),'Circular layout algorithms emphasize cycles or biconnected components of a graph by arranging them in circles. This is useful if a drawing is desired where such components are clearly grouped, or where cycles are shown as prominent OPTIONS of the graph.')));Dgd(a,new fgd(mgd(ogd(ngd(new pgd,$Ee),'Tree'),'Specialized layout methods for trees, i.e. acyclic graphs. The regular structure of graphs that have no undirected cycles can be emphasized using an algorithm of this type.')));Dgd(a,new fgd(mgd(ogd(ngd(new pgd,'org.eclipse.elk.planar'),'Planar'),'Algorithms that require a planar or upward planar graph. Most of these algorithms are theoretically interesting, but not practically usable.')));Dgd(a,new fgd(mgd(ogd(ngd(new pgd,CFe),'Radial'),'Radial layout algorithms usually position the nodes of the graph on concentric circles.')));wnd((new xnd,a));ikd((new jkd,a));Gpd((new Hpd,a))};var Akd,Bkd,Ckd,Dkd,Ekd,Fkd,Gkd,Hkd,Ikd,Jkd,Kkd,Lkd,Mkd,Nkd,Okd,Pkd,Qkd,Rkd,Skd,Tkd,Ukd,Vkd,Wkd,Xkd,Ykd,Zkd,$kd,_kd,ald,bld,cld,dld,eld,fld,gld,hld,ild,jld,kld,lld,mld,nld,old,pld,qld,rld,sld,tld,uld,vld,wld,xld,yld,zld,Ald,Bld,Cld,Dld,Eld,Fld,Gld,Hld,Ild,Jld,Kld,Lld,Mld,Nld,Old,Pld,Qld,Rld,Sld,Tld,Uld,Vld,Wld,Xld,Yld,Zld,$ld,_ld,amd,bmd,cmd,dmd,emd,fmd,gmd,hmd,imd,jmd,kmd,lmd,mmd,nmd,omd,pmd,qmd,rmd,smd,tmd;var r3=sfb(JGe,'CoreOptions',699);feb(88,22,{3:1,34:1,22:1,88:1},Gmd);var xmd,ymd,zmd,Amd,Bmd;var s3=tfb(JGe,eze,88,WI,Imd,Hmd);var Jmd;feb(278,22,{3:1,34:1,22:1,278:1},Pmd);var Lmd,Mmd,Nmd;var t3=tfb(JGe,'EdgeLabelPlacement',278,WI,Rmd,Qmd);var Smd;feb(223,22,{3:1,34:1,22:1,223:1},Zmd);var Umd,Vmd,Wmd,Xmd;var u3=tfb(JGe,'EdgeRouting',223,WI,_md,$md);var and;feb(321,22,{3:1,34:1,22:1,321:1},jnd);var cnd,dnd,end,fnd,gnd,hnd;var v3=tfb(JGe,'EdgeType',321,WI,lnd,knd);var mnd;feb(989,1,Eye,xnd);_.hf=function ynd(a){wnd(a)};var ond,pnd,qnd,rnd,snd,tnd,und;var x3=sfb(JGe,'FixedLayouterOptions',989);feb(990,1,{},znd);_.sf=function And(){var a;return a=new btd,a};_.tf=function Bnd(a){};var w3=sfb(JGe,'FixedLayouterOptions/FixedFactory',990);feb(346,22,{3:1,34:1,22:1,346:1},Gnd);var Cnd,Dnd,End;var y3=tfb(JGe,'HierarchyHandling',346,WI,Ind,Hnd);var Jnd;feb(291,22,{3:1,34:1,22:1,291:1},Rnd);var Lnd,Mnd,Nnd,Ond;var z3=tfb(JGe,'LabelSide',291,WI,Tnd,Snd);var Und;feb(95,22,{3:1,34:1,22:1,95:1},eod);var Wnd,Xnd,Ynd,Znd,$nd,_nd,aod,bod,cod;var A3=tfb(JGe,'NodeLabelPlacement',95,WI,hod,god);var iod;feb(256,22,{3:1,34:1,22:1,256:1},qod);var kod,lod,mod,nod,ood;var B3=tfb(JGe,'PortAlignment',256,WI,sod,rod);var tod;feb(101,22,{3:1,34:1,22:1,101:1},Eod);var vod,wod,xod,yod,zod,Aod;var C3=tfb(JGe,'PortConstraints',101,WI,God,Fod);var Hod;feb(279,22,{3:1,34:1,22:1,279:1},Qod);var Jod,Kod,Lod,Mod,Nod,Ood;var D3=tfb(JGe,'PortLabelPlacement',279,WI,Uod,Tod);var Vod;feb(64,22,{3:1,34:1,22:1,64:1},upd);var Xod,Yod,Zod,$od,_od,apd,bpd,cpd,dpd,epd,fpd,gpd,hpd,ipd,jpd,kpd,lpd,mpd,npd,opd,ppd;var E3=tfb(JGe,'PortSide',64,WI,xpd,wpd);var ypd;feb(993,1,Eye,Hpd);_.hf=function Ipd(a){Gpd(a)};var Apd,Bpd,Cpd,Dpd,Epd;var G3=sfb(JGe,'RandomLayouterOptions',993);feb(994,1,{},Jpd);_.sf=function Kpd(){var a;return a=new eud,a};_.tf=function Lpd(a){};var F3=sfb(JGe,'RandomLayouterOptions/RandomFactory',994);feb(386,22,{3:1,34:1,22:1,386:1},Rpd);var Mpd,Npd,Opd,Ppd;var H3=tfb(JGe,'SizeConstraint',386,WI,Tpd,Spd);var Upd;feb(264,22,{3:1,34:1,22:1,264:1},eqd);var Wpd,Xpd,Ypd,Zpd,$pd,_pd,aqd,bqd,cqd;var I3=tfb(JGe,'SizeOptions',264,WI,gqd,fqd);var hqd;feb(280,22,{3:1,34:1,22:1,280:1},nqd);var jqd,kqd,lqd;var J3=tfb(JGe,'TopdownNodeTypes',280,WI,pqd,oqd);var qqd;feb(347,22,rHe);var sqd,tqd;var M3=tfb(JGe,'TopdownSizeApproximator',347,WI,xqd,wqd);feb(987,347,rHe,zqd);_.Tg=function Aqd(a){return yqd(a)};var K3=tfb(JGe,'TopdownSizeApproximator/1',987,M3,null,null);feb(988,347,rHe,Bqd);_.Tg=function Cqd(b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D;c=RD(Gxd(b,(umd(),Tld)),143);A=(bvd(),o=new ACd,o);zxd(A,b);B=new Tsb;for(g=new dMd((!b.a&&(b.a=new C5d(J4,b,10,11)),b.a));g.e!=g.i.gc();){e=RD(bMd(g),27);t=(n=new ACd,n);yCd(t,A);zxd(t,e);D=yqd(e);zyd(t,$wnd.Math.max(e.g,D.a),$wnd.Math.max(e.f,D.b));rtb(B.f,e,t)}for(f=new dMd((!b.a&&(b.a=new C5d(J4,b,10,11)),b.a));f.e!=f.i.gc();){e=RD(bMd(f),27);for(l=new dMd((!e.e&&(e.e=new Yie(G4,e,7,4)),e.e));l.e!=l.i.gc();){k=RD(bMd(l),74);v=RD(Wd(qtb(B.f,e)),27);w=RD(Wjb(B,QHd((!k.c&&(k.c=new Yie(E4,k,5,8)),k.c),0)),27);u=(m=new rzd,m);WGd((!u.b&&(u.b=new Yie(E4,u,4,7)),u.b),v);WGd((!u.c&&(u.c=new Yie(E4,u,5,8)),u.c),w);pzd(u,vCd(v));zxd(u,k)}}q=RD(ltd(c.f),205);try{q.rf(A,new ztd);mtd(c.f,q)}catch(a){a=zdb(a);if(ZD(a,103)){p=a;throw Adb(p)}else throw Adb(a)}Hxd(A,Ikd)||Hxd(A,Hkd)||psd(A);j=Kfb(UD(Gxd(A,Ikd)));i=Kfb(UD(Gxd(A,Hkd)));h=j/i;d=Kfb(UD(Gxd(A,lmd)))*$wnd.Math.sqrt((!A.a&&(A.a=new C5d(J4,A,10,11)),A.a).i);C=RD(Gxd(A,tld),107);s=C.b+C.c+1;r=C.d+C.a+1;return new rjd($wnd.Math.max(s,d),$wnd.Math.max(r,d/h))};var L3=tfb(JGe,'TopdownSizeApproximator/2',988,M3,null,null);var Dqd;feb(344,1,{871:1},Oqd);_.Ug=function Pqd(a,b){return Fqd(this,a,b)};_.Vg=function Qqd(){Hqd(this)};_.Wg=function Rqd(){return this.q};_.Xg=function Sqd(){return !this.f?null:Hob(this.f)};_.Yg=function Tqd(){return Hob(this.a)};_.Zg=function Uqd(){return this.p};_.$g=function Vqd(){return false};_._g=function Wqd(){return this.n};_.ah=function Xqd(){return this.p!=null&&!this.b};_.bh=function Yqd(a){var b;if(this.n){b=a;Rmb(this.f,b)}};_.dh=function Zqd(a,b){var c,d;this.n&&!!a&&Jqd(this,(c=new Zje,d=Rje(c,a),Yje(c),d),(ttd(),qtd))};_.eh=function $qd(a){var b;if(this.b){return null}else{b=Gqd(this,this.g);Mub(this.a,b);b.i=this;this.d=a;return b}};_.fh=function _qd(a){a>0&&!this.b&&Iqd(this,a)};_.b=false;_.c=0;_.d=-1;_.e=null;_.f=null;_.g=-1;_.j=false;_.k=false;_.n=false;_.o=0;_.q=0;_.r=0;var O3=sfb(jEe,'BasicProgressMonitor',344);feb(717,205,oze,jrd);_.rf=function nrd(a,b){crd(a,b)};var V3=sfb(jEe,'BoxLayoutProvider',717);feb(983,1,fye,prd);_.Ne=function qrd(a,b){return ord(this,RD(a,27),RD(b,27))};_.Fb=function rrd(a){return this===a};_.Oe=function srd(){return new Frb(this)};_.a=false;var P3=sfb(jEe,'BoxLayoutProvider/1',983);feb(163,1,{163:1},zrd,Ard);_.Ib=function Brd(){return this.c?zCd(this.c):Fe(this.b)};var Q3=sfb(jEe,'BoxLayoutProvider/Group',163);feb(320,22,{3:1,34:1,22:1,320:1},Hrd);var Crd,Drd,Erd,Frd;var R3=tfb(jEe,'BoxLayoutProvider/PackingMode',320,WI,Jrd,Ird);var Krd;feb(984,1,fye,Mrd);_.Ne=function Nrd(a,b){return krd(RD(a,163),RD(b,163))};_.Fb=function Ord(a){return this===a};_.Oe=function Prd(){return new Frb(this)};var S3=sfb(jEe,'BoxLayoutProvider/lambda$0$Type',984);feb(985,1,fye,Qrd);_.Ne=function Rrd(a,b){return lrd(RD(a,163),RD(b,163))};_.Fb=function Srd(a){return this===a};_.Oe=function Trd(){return new Frb(this)};var T3=sfb(jEe,'BoxLayoutProvider/lambda$1$Type',985);feb(986,1,fye,Urd);_.Ne=function Vrd(a,b){return mrd(RD(a,163),RD(b,163))};_.Fb=function Wrd(a){return this===a};_.Oe=function Xrd(){return new Frb(this)};var U3=sfb(jEe,'BoxLayoutProvider/lambda$2$Type',986);feb(1384,1,{845:1},Yrd);_.Mg=function Zrd(a,b){return GCc(),!ZD(b,167)||ued((hed(),ged,RD(a,167)),b)};var W3=sfb(jEe,'ElkSpacings/AbstractSpacingsBuilder/lambda$0$Type',1384);feb(1385,1,Qve,$rd);_.Cd=function _rd(a){JCc(this.a,RD(a,149))};var X3=sfb(jEe,'ElkSpacings/AbstractSpacingsBuilder/lambda$1$Type',1385);feb(1386,1,Qve,asd);_.Cd=function bsd(a){RD(a,96);GCc()};var Y3=sfb(jEe,'ElkSpacings/AbstractSpacingsBuilder/lambda$2$Type',1386);feb(1390,1,Qve,csd);_.Cd=function dsd(a){KCc(this.a,RD(a,96))};var Z3=sfb(jEe,'ElkSpacings/AbstractSpacingsBuilder/lambda$3$Type',1390);feb(1388,1,nwe,esd);_.Mb=function fsd(a){return LCc(this.a,this.b,RD(a,149))};var $3=sfb(jEe,'ElkSpacings/AbstractSpacingsBuilder/lambda$4$Type',1388);feb(1387,1,nwe,gsd);_.Mb=function hsd(a){return NCc(this.a,this.b,RD(a,845))};var _3=sfb(jEe,'ElkSpacings/AbstractSpacingsBuilder/lambda$5$Type',1387);feb(1389,1,Qve,isd);_.Cd=function jsd(a){MCc(this.a,this.b,RD(a,149))};var a4=sfb(jEe,'ElkSpacings/AbstractSpacingsBuilder/lambda$6$Type',1389);feb(947,1,{},Lsd);_.Kb=function Msd(a){return Ksd(a)};_.Fb=function Nsd(a){return this===a};var c4=sfb(jEe,'ElkUtil/lambda$0$Type',947);feb(948,1,Qve,Osd);_.Cd=function Psd(a){ysd(this.a,this.b,RD(a,74))};_.a=0;_.b=0;var d4=sfb(jEe,'ElkUtil/lambda$1$Type',948);feb(949,1,Qve,Qsd);_.Cd=function Rsd(a){zsd(this.a,this.b,RD(a,166))};_.a=0;_.b=0;var e4=sfb(jEe,'ElkUtil/lambda$2$Type',949);feb(950,1,Qve,Ssd);_.Cd=function Tsd(a){Asd(this.a,this.b,RD(a,135))};_.a=0;_.b=0;var f4=sfb(jEe,'ElkUtil/lambda$3$Type',950);feb(951,1,Qve,Usd);_.Cd=function Vsd(a){Bsd(this.a,RD(a,377))};var g4=sfb(jEe,'ElkUtil/lambda$4$Type',951);feb(325,1,{34:1,325:1},Xsd);_.Fd=function Ysd(a){return Wsd(this,RD(a,242))};_.Fb=function Zsd(a){var b;if(ZD(a,325)){b=RD(a,325);return this.a==b.a}return false};_.Hb=function $sd(){return eE(this.a)};_.Ib=function _sd(){return this.a+' (exclusive)'};_.a=0;var h4=sfb(jEe,'ExclusiveBounds/ExclusiveLowerBound',325);feb(1119,205,oze,btd);_.rf=function ctd(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B;b.Ug('Fixed Layout',1);f=RD(Gxd(a,(umd(),Skd)),223);l=0;m=0;for(s=new dMd((!a.a&&(a.a=new C5d(J4,a,10,11)),a.a));s.e!=s.i.gc();){q=RD(bMd(s),27);B=RD(Gxd(q,(vnd(),und)),8);if(B){Byd(q,B.a,B.b);if(RD(Gxd(q,pnd),181).Hc((Qpd(),Mpd))){n=RD(Gxd(q,rnd),8);n.a>0&&n.b>0&&Esd(q,n.a,n.b,true,true)}}l=$wnd.Math.max(l,q.i+q.g);m=$wnd.Math.max(m,q.j+q.f);for(j=new dMd((!q.n&&(q.n=new C5d(I4,q,1,7)),q.n));j.e!=j.i.gc();){h=RD(bMd(j),135);B=RD(Gxd(h,und),8);!!B&&Byd(h,B.a,B.b);l=$wnd.Math.max(l,q.i+h.i+h.g);m=$wnd.Math.max(m,q.j+h.j+h.f)}for(v=new dMd((!q.c&&(q.c=new C5d(K4,q,9,9)),q.c));v.e!=v.i.gc();){u=RD(bMd(v),123);B=RD(Gxd(u,und),8);!!B&&Byd(u,B.a,B.b);w=q.i+u.i;A=q.j+u.j;l=$wnd.Math.max(l,w+u.g);m=$wnd.Math.max(m,A+u.f);for(i=new dMd((!u.n&&(u.n=new C5d(I4,u,1,7)),u.n));i.e!=i.i.gc();){h=RD(bMd(i),135);B=RD(Gxd(h,und),8);!!B&&Byd(h,B.a,B.b);l=$wnd.Math.max(l,w+h.i+h.g);m=$wnd.Math.max(m,A+h.j+h.f)}}for(e=new is(Mr(zGd(q).a.Kc(),new ir));gs(e);){c=RD(hs(e),74);k=atd(c);l=$wnd.Math.max(l,k.a);m=$wnd.Math.max(m,k.b)}for(d=new is(Mr(yGd(q).a.Kc(),new ir));gs(d);){c=RD(hs(d),74);if(vCd(JGd(c))!=a){k=atd(c);l=$wnd.Math.max(l,k.a);m=$wnd.Math.max(m,k.b)}}}if(f==(Ymd(),Umd)){for(r=new dMd((!a.a&&(a.a=new C5d(J4,a,10,11)),a.a));r.e!=r.i.gc();){q=RD(bMd(r),27);for(d=new is(Mr(zGd(q).a.Kc(),new ir));gs(d);){c=RD(hs(d),74);g=tsd(c);g.b==0?Ixd(c,cld,null):Ixd(c,cld,g)}}}if(!Heb(TD(Gxd(a,(vnd(),qnd))))){t=RD(Gxd(a,snd),107);p=l+t.b+t.c;o=m+t.d+t.a;Esd(a,p,o,true,true)}b.Vg()};var i4=sfb(jEe,'FixedLayoutProvider',1119);feb(385,137,{3:1,423:1,385:1,96:1,137:1},dtd,etd);_.cg=function htd(b){var c,d,e,f,g,h,i,j,k;if(!b){return}try{j=vhb(b,';,;');for(g=j,h=0,i=g.length;h>16&Bwe|b^d<<16};_.Kc=function Ttd(){return new Vtd(this)};_.Ib=function Utd(){return this.a==null&&this.b==null?'pair(null,null)':this.a==null?'pair(null,'+jeb(this.b)+')':this.b==null?'pair('+jeb(this.a)+',null)':'pair('+jeb(this.a)+','+jeb(this.b)+')'};var r4=sfb(jEe,'Pair',42);feb(995,1,Ave,Vtd);_.Nb=function Wtd(a){Ztb(this,a)};_.Ob=function Xtd(){return !this.c&&(!this.b&&this.a.a!=null||this.a.b!=null)};_.Pb=function Ytd(){if(!this.c&&!this.b&&this.a.a!=null){this.b=true;return this.a.a}else if(!this.c&&this.a.b!=null){this.c=true;return this.a.b}throw Adb(new Dvb)};_.Qb=function Ztd(){this.c&&this.a.b!=null?(this.a.b=null):this.b&&this.a.a!=null&&(this.a.a=null);throw Adb(new cgb)};_.b=false;_.c=false;var q4=sfb(jEe,'Pair/1',995);feb(455,1,{455:1},$td);_.Fb=function _td(a){return Fvb(this.a,RD(a,455).a)&&Fvb(this.c,RD(a,455).c)&&Fvb(this.d,RD(a,455).d)&&Fvb(this.b,RD(a,455).b)};_.Hb=function aud(){return Tnb(cD(WC(jJ,1),rve,1,5,[this.a,this.c,this.d,this.b]))};_.Ib=function bud(){return '('+this.a+pve+this.c+pve+this.d+pve+this.b+')'};var s4=sfb(jEe,'Quadruple',455);feb(1108,205,oze,eud);_.rf=function fud(a,b){var c,d,e,f,g;b.Ug('Random Layout',1);if((!a.a&&(a.a=new C5d(J4,a,10,11)),a.a).i==0){b.Vg();return}f=RD(Gxd(a,(Fpd(),Dpd)),17);!!f&&f.a!=0?(e=new Pwb(f.a)):(e=new Owb);c=Mfb(UD(Gxd(a,Apd)));g=Mfb(UD(Gxd(a,Epd)));d=RD(Gxd(a,Bpd),107);dud(a,e,c,g,d);b.Vg()};var t4=sfb(jEe,'RandomLayoutProvider',1108);feb(240,1,{240:1},gud);_.Fb=function hud(a){return Fvb(this.a,RD(a,240).a)&&Fvb(this.b,RD(a,240).b)&&Fvb(this.c,RD(a,240).c)};_.Hb=function iud(){return Tnb(cD(WC(jJ,1),rve,1,5,[this.a,this.b,this.c]))};_.Ib=function jud(){return '('+this.a+pve+this.b+pve+this.c+')'};var u4=sfb(jEe,'Triple',240);var kud;feb(562,1,{});_.Lf=function oud(){return new rjd(this.f.i,this.f.j)};_.of=function pud(a){if(hGd(a,(umd(),Gld))){return Gxd(this.f,mud)}return Gxd(this.f,a)};_.Mf=function qud(){return new rjd(this.f.g,this.f.f)};_.Nf=function rud(){return this.g};_.pf=function sud(a){return Hxd(this.f,a)};_.Of=function tud(a){Dyd(this.f,a.a);Eyd(this.f,a.b)};_.Pf=function uud(a){Cyd(this.f,a.a);Ayd(this.f,a.b)};_.Qf=function vud(a){this.g=a};_.g=0;var mud;var v4=sfb(uHe,'ElkGraphAdapters/AbstractElkGraphElementAdapter',562);feb(563,1,{853:1},wud);_.Rf=function xud(){var a,b;if(!this.b){this.b=fv(iyd(this.a).i);for(b=new dMd(iyd(this.a));b.e!=b.i.gc();){a=RD(bMd(b),135);Rmb(this.b,new Bud(a))}}return this.b};_.b=null;var w4=sfb(uHe,'ElkGraphAdapters/ElkEdgeAdapter',563);feb(289,562,{},zud);_.Sf=function Aud(){return yud(this)};_.a=null;var x4=sfb(uHe,'ElkGraphAdapters/ElkGraphAdapter',289);feb(640,562,{187:1},Bud);var y4=sfb(uHe,'ElkGraphAdapters/ElkLabelAdapter',640);feb(639,562,{695:1},Fud);_.Rf=function Iud(){return Cud(this)};_.Vf=function Jud(){var a;return a=RD(Gxd(this.f,(umd(),eld)),140),!a&&(a=new P2b),a};_.Xf=function Lud(){return Dud(this)};_.Zf=function Nud(a){var b;b=new S2b(a);Ixd(this.f,(umd(),eld),b)};_.$f=function Oud(a){Ixd(this.f,(umd(),tld),new B3b(a))};_.Tf=function Gud(){return this.d};_.Uf=function Hud(){var a,b;if(!this.a){this.a=new bnb;for(b=new is(Mr(yGd(RD(this.f,27)).a.Kc(),new ir));gs(b);){a=RD(hs(b),74);Rmb(this.a,new wud(a))}}return this.a};_.Wf=function Kud(){var a,b;if(!this.c){this.c=new bnb;for(b=new is(Mr(zGd(RD(this.f,27)).a.Kc(),new ir));gs(b);){a=RD(hs(b),74);Rmb(this.c,new wud(a))}}return this.c};_.Yf=function Mud(){return tCd(RD(this.f,27)).i!=0||Heb(TD(RD(this.f,27).of((umd(),$kd))))};_._f=function Pud(){Eud(this,(lud(),kud))};_.a=null;_.b=null;_.c=null;_.d=null;_.e=null;var z4=sfb(uHe,'ElkGraphAdapters/ElkNodeAdapter',639);feb(1284,562,{852:1},Rud);_.Rf=function Tud(){return Qud(this)};_.Uf=function Sud(){var a,b;if(!this.a){this.a=ev(RD(this.f,123).hh().i);for(b=new dMd(RD(this.f,123).hh());b.e!=b.i.gc();){a=RD(bMd(b),74);Rmb(this.a,new wud(a))}}return this.a};_.Wf=function Uud(){var a,b;if(!this.c){this.c=ev(RD(this.f,123).ih().i);for(b=new dMd(RD(this.f,123).ih());b.e!=b.i.gc();){a=RD(bMd(b),74);Rmb(this.c,new wud(a))}}return this.c};_.ag=function Vud(){return RD(RD(this.f,123).of((umd(),Old)),64)};_.bg=function Wud(){var a,b,c,d,e,f,g,h;d=MCd(RD(this.f,123));for(c=new dMd(RD(this.f,123).ih());c.e!=c.i.gc();){a=RD(bMd(c),74);for(h=new dMd((!a.c&&(a.c=new Yie(E4,a,5,8)),a.c));h.e!=h.i.gc();){g=RD(bMd(h),84);if(NGd(AGd(g),d)){return true}else if(AGd(g)==d&&Heb(TD(Gxd(a,(umd(),_kd))))){return true}}}for(b=new dMd(RD(this.f,123).hh());b.e!=b.i.gc();){a=RD(bMd(b),74);for(f=new dMd((!a.b&&(a.b=new Yie(E4,a,4,7)),a.b));f.e!=f.i.gc();){e=RD(bMd(f),84);if(NGd(AGd(e),d)){return true}}}return false};_.a=null;_.b=null;_.c=null;var A4=sfb(uHe,'ElkGraphAdapters/ElkPortAdapter',1284);feb(1285,1,fye,Yud);_.Ne=function Zud(a,b){return Xud(RD(a,123),RD(b,123))};_.Fb=function $ud(a){return this===a};_.Oe=function _ud(){return new Frb(this)};var B4=sfb(uHe,'ElkGraphAdapters/PortComparator',1285);var r7=ufb(vHe,'EObject');var C4=ufb(wHe,xHe);var D4=ufb(wHe,yHe);var H4=ufb(wHe,zHe);var L4=ufb(wHe,'ElkShape');var E4=ufb(wHe,AHe);var G4=ufb(wHe,BHe);var F4=ufb(wHe,CHe);var p7=ufb(vHe,DHe);var n7=ufb(vHe,'EFactory');var avd;var q7=ufb(vHe,EHe);var t7=ufb(vHe,'EPackage');var cvd;var evd,fvd,gvd,hvd,ivd,jvd,kvd,lvd,mvd,nvd,ovd;var I4=ufb(wHe,FHe);var J4=ufb(wHe,GHe);var K4=ufb(wHe,HHe);feb(93,1,IHe);_.th=function rvd(){this.uh();return null};_.uh=function svd(){return null};_.vh=function tvd(){return this.uh(),false};_.wh=function uvd(){return false};_.xh=function vvd(a){qvd(this,a)};var g6=sfb(JHe,'BasicNotifierImpl',93);feb(99,93,RHe);_.Yh=function Dwd(){return Mvd(this)};_.yh=function bwd(a,b){return a};_.zh=function cwd(){throw Adb(new jib)};_.Ah=function dwd(a){var b;return b=Z5d(RD(vYd(this.Dh(),this.Fh()),19)),this.Ph().Th(this,b.n,b.f,a)};_.Bh=function ewd(a,b){throw Adb(new jib)};_.Ch=function fwd(a,b,c){return xvd(this,a,b,c)};_.Dh=function gwd(){var a;if(this.zh()){a=this.zh().Nk();if(a){return a}}return this.ii()};_.Eh=function hwd(){return yvd(this)};_.Fh=function iwd(){throw Adb(new jib)};_.Gh=function kwd(){var a,b;b=this.$h().Ok();!b&&this.zh().Tk(b=(N2d(),a=P$d(rYd(this.Dh())),a==null?M2d:new Q2d(this,a)));return b};_.Hh=function mwd(a,b){return a};_.Ih=function nwd(a){var b;b=a.pk();return !b?BYd(this.Dh(),a):a.Lj()};_.Jh=function owd(){var a;a=this.zh();return !a?null:a.Qk()};_.Kh=function pwd(){return !this.zh()?null:this.zh().Nk()};_.Lh=function qwd(a,b,c){return Dvd(this,a,b,c)};_.Mh=function rwd(a){return Evd(this,a)};_.Nh=function swd(a,b){return Fvd(this,a,b)};_.Oh=function twd(){var a;a=this.zh();return !!a&&a.Rk()};_.Ph=function uwd(){throw Adb(new jib)};_.Qh=function vwd(){return Hvd(this)};_.Rh=function wwd(a,b,c,d){return Ivd(this,a,b,d)};_.Sh=function xwd(a,b,c){var d;return d=RD(vYd(this.Dh(),b),69),d.wk().zk(this,this.hi(),b-this.ji(),a,c)};_.Th=function ywd(a,b,c,d){return Jvd(this,a,b,d)};_.Uh=function zwd(a,b,c){var d;return d=RD(vYd(this.Dh(),b),69),d.wk().Ak(this,this.hi(),b-this.ji(),a,c)};_.Vh=function Awd(){return !!this.zh()&&!!this.zh().Pk()};_.Wh=function Bwd(a){return Kvd(this,a)};_.Xh=function Cwd(a){return Lvd(this,a)};_.Zh=function Ewd(a){return Pvd(this,a)};_.$h=function Fwd(){throw Adb(new jib)};_._h=function Gwd(){return !this.zh()?null:this.zh().Pk()};_.ai=function Hwd(){return Hvd(this)};_.bi=function Iwd(a,b){Wvd(this,a,b)};_.ci=function Jwd(a){this.$h().Sk(a)};_.di=function Kwd(a){this.$h().Vk(a)};_.ei=function Lwd(a){this.$h().Uk(a)};_.fi=function Mwd(a,b){var c,d,e,f;f=this.Jh();if(!!f&&!!a){b=rLd(f.El(),this,b);f.Il(this)}d=this.Ph();if(d){if((jwd(this,this.Ph(),this.Fh()).Bb&txe)!=0){e=d.Qh();!!e&&(!a?e.Hl(this):!f&&e.Il(this))}else{b=(c=this.Fh(),c>=0?this.Ah(b):this.Ph().Th(this,-1-c,null,b));b=this.Ch(null,-1,b)}}this.di(a);return b};_.gi=function Nwd(a){var b,c,d,e,f,g,h,i;c=this.Dh();f=BYd(c,a);b=this.ji();if(f>=b){return RD(a,69).wk().Dk(this,this.hi(),f-b)}else if(f<=-1){g=Eee((lke(),jke),c,a);if(g){nke();RD(g,69).xk()||(g=zfe(Qee(jke,g)));e=(d=this.Ih(g),RD(d>=0?this.Lh(d,true,true):Qvd(this,g,true),160));i=g.Ik();if(i>1||i==-1){return RD(RD(e,220).Sl(a,false),79)}}else{throw Adb(new agb(KHe+a.xe()+NHe))}}else if(a.Jk()){return d=this.Ih(a),RD(d>=0?this.Lh(d,false,true):Qvd(this,a,false),79)}h=new NTd(this,a);return h};_.hi=function Owd(){return Yvd(this)};_.ii=function Pwd(){return (lTd(),kTd).S};_.ji=function Qwd(){return AYd(this.ii())};_.ki=function Rwd(a){$vd(this,a)};_.Ib=function Swd(){return awd(this)};var G7=sfb(SHe,'BasicEObjectImpl',99);var ZSd;feb(119,99,{110:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1});_.li=function _wd(a){var b;b=Vwd(this);return b[a]};_.mi=function axd(a,b){var c;c=Vwd(this);bD(c,a,b)};_.ni=function bxd(a){var b;b=Vwd(this);bD(b,a,null)};_.th=function cxd(){return RD(Ywd(this,4),129)};_.uh=function dxd(){throw Adb(new jib)};_.vh=function exd(){return (this.Db&4)!=0};_.zh=function fxd(){throw Adb(new jib)};_.oi=function gxd(a){$wd(this,2,a)};_.Bh=function hxd(a,b){this.Db=b<<16|this.Db&255;this.oi(a)};_.Dh=function ixd(){return Uwd(this)};_.Fh=function jxd(){return this.Db>>16};_.Gh=function kxd(){var a,b;return N2d(),b=P$d(rYd((a=RD(Ywd(this,16),29),!a?this.ii():a))),b==null?(null,M2d):new Q2d(this,b)};_.wh=function lxd(){return (this.Db&1)==0};_.Jh=function mxd(){return RD(Ywd(this,128),2034)};_.Kh=function nxd(){return RD(Ywd(this,16),29)};_.Oh=function oxd(){return (this.Db&32)!=0};_.Ph=function pxd(){return RD(Ywd(this,2),54)};_.Vh=function qxd(){return (this.Db&64)!=0};_.$h=function rxd(){throw Adb(new jib)};_._h=function sxd(){return RD(Ywd(this,64),288)};_.ci=function txd(a){$wd(this,16,a)};_.di=function uxd(a){$wd(this,128,a)};_.ei=function vxd(a){$wd(this,64,a)};_.hi=function wxd(){return Wwd(this)};_.Db=0;var xab=sfb(SHe,'MinimalEObjectImpl',119);feb(120,119,{110:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1,120:1});_.oi=function xxd(a){this.Cb=a};_.Ph=function yxd(){return this.Cb};var wab=sfb(SHe,'MinimalEObjectImpl/Container',120);feb(2083,120,{110:1,342:1,96:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1,120:1});_.Lh=function Jxd(a,b,c){return Axd(this,a,b,c)};_.Uh=function Kxd(a,b,c){return Bxd(this,a,b,c)};_.Wh=function Lxd(a){return Cxd(this,a)};_.bi=function Mxd(a,b){Dxd(this,a,b)};_.ii=function Nxd(){return pvd(),ovd};_.ki=function Oxd(a){Exd(this,a)};_.nf=function Pxd(){return Fxd(this)};_.gh=function Qxd(){return !this.o&&(this.o=new DVd((pvd(),mvd),X4,this,0)),this.o};_.of=function Rxd(a){return Gxd(this,a)};_.pf=function Sxd(a){return Hxd(this,a)};_.qf=function Txd(a,b){return Ixd(this,a,b)};var M4=sfb(THe,'EMapPropertyHolderImpl',2083);feb(572,120,{110:1,377:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1,120:1},Xxd);_.Lh=function Yxd(a,b,c){switch(a){case 0:return this.a;case 1:return this.b;}return Dvd(this,a,b,c)};_.Wh=function Zxd(a){switch(a){case 0:return this.a!=0;case 1:return this.b!=0;}return Kvd(this,a)};_.bi=function $xd(a,b){switch(a){case 0:Vxd(this,Kfb(UD(b)));return;case 1:Wxd(this,Kfb(UD(b)));return;}Wvd(this,a,b)};_.ii=function _xd(){return pvd(),evd};_.ki=function ayd(a){switch(a){case 0:Vxd(this,0);return;case 1:Wxd(this,0);return;}$vd(this,a)};_.Ib=function byd(){var a;if((this.Db&64)!=0)return awd(this);a=new Shb(awd(this));a.a+=' (x: ';Khb(a,this.a);a.a+=', y: ';Khb(a,this.b);a.a+=')';return a.a};_.a=0;_.b=0;var N4=sfb(THe,'ElkBendPointImpl',572);feb(739,2083,{110:1,342:1,167:1,96:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1,120:1});_.Lh=function lyd(a,b,c){return cyd(this,a,b,c)};_.Sh=function myd(a,b,c){return dyd(this,a,b,c)};_.Uh=function nyd(a,b,c){return eyd(this,a,b,c)};_.Wh=function oyd(a){return fyd(this,a)};_.bi=function pyd(a,b){gyd(this,a,b)};_.ii=function qyd(){return pvd(),ivd};_.ki=function ryd(a){hyd(this,a)};_.jh=function syd(){return this.k};_.kh=function tyd(){return iyd(this)};_.Ib=function uyd(){return kyd(this)};_.k=null;var R4=sfb(THe,'ElkGraphElementImpl',739);feb(740,739,{110:1,342:1,167:1,422:1,96:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1,120:1});_.Lh=function Gyd(a,b,c){return vyd(this,a,b,c)};_.Wh=function Hyd(a){return wyd(this,a)};_.bi=function Iyd(a,b){xyd(this,a,b)};_.ii=function Jyd(){return pvd(),nvd};_.ki=function Kyd(a){yyd(this,a)};_.lh=function Lyd(){return this.f};_.mh=function Myd(){return this.g};_.nh=function Nyd(){return this.i};_.oh=function Oyd(){return this.j};_.ph=function Pyd(a,b){zyd(this,a,b)};_.qh=function Qyd(a,b){Byd(this,a,b)};_.rh=function Ryd(a){Dyd(this,a)};_.sh=function Syd(a){Eyd(this,a)};_.Ib=function Tyd(){return Fyd(this)};_.f=0;_.g=0;_.i=0;_.j=0;var Y4=sfb(THe,'ElkShapeImpl',740);feb(741,740,{110:1,342:1,84:1,167:1,422:1,96:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1,120:1});_.Lh=function _yd(a,b,c){return Uyd(this,a,b,c)};_.Sh=function azd(a,b,c){return Vyd(this,a,b,c)};_.Uh=function bzd(a,b,c){return Wyd(this,a,b,c)};_.Wh=function czd(a){return Xyd(this,a)};_.bi=function dzd(a,b){Yyd(this,a,b)};_.ii=function ezd(){return pvd(),fvd};_.ki=function fzd(a){Zyd(this,a)};_.hh=function gzd(){return !this.d&&(this.d=new Yie(G4,this,8,5)),this.d};_.ih=function hzd(){return !this.e&&(this.e=new Yie(G4,this,7,4)),this.e};var O4=sfb(THe,'ElkConnectableShapeImpl',741);feb(326,739,{110:1,342:1,74:1,167:1,326:1,96:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1,120:1},rzd);_.Ah=function szd(a){return jzd(this,a)};_.Lh=function tzd(a,b,c){switch(a){case 3:return kzd(this);case 4:return !this.b&&(this.b=new Yie(E4,this,4,7)),this.b;case 5:return !this.c&&(this.c=new Yie(E4,this,5,8)),this.c;case 6:return !this.a&&(this.a=new C5d(F4,this,6,6)),this.a;case 7:return Geb(),!this.b&&(this.b=new Yie(E4,this,4,7)),this.b.i<=1&&(!this.c&&(this.c=new Yie(E4,this,5,8)),this.c.i<=1)?false:true;case 8:return Geb(),nzd(this)?true:false;case 9:return Geb(),ozd(this)?true:false;case 10:return Geb(),!this.b&&(this.b=new Yie(E4,this,4,7)),this.b.i!=0&&(!this.c&&(this.c=new Yie(E4,this,5,8)),this.c.i!=0)?true:false;}return cyd(this,a,b,c)};_.Sh=function uzd(a,b,c){var d;switch(b){case 3:!!this.Cb&&(c=(d=this.Db>>16,d>=0?jzd(this,c):this.Cb.Th(this,-1-d,null,c)));return izd(this,RD(a,27),c);case 4:return !this.b&&(this.b=new Yie(E4,this,4,7)),qLd(this.b,a,c);case 5:return !this.c&&(this.c=new Yie(E4,this,5,8)),qLd(this.c,a,c);case 6:return !this.a&&(this.a=new C5d(F4,this,6,6)),qLd(this.a,a,c);}return dyd(this,a,b,c)};_.Uh=function vzd(a,b,c){switch(b){case 3:return izd(this,null,c);case 4:return !this.b&&(this.b=new Yie(E4,this,4,7)),rLd(this.b,a,c);case 5:return !this.c&&(this.c=new Yie(E4,this,5,8)),rLd(this.c,a,c);case 6:return !this.a&&(this.a=new C5d(F4,this,6,6)),rLd(this.a,a,c);}return eyd(this,a,b,c)};_.Wh=function wzd(a){switch(a){case 3:return !!kzd(this);case 4:return !!this.b&&this.b.i!=0;case 5:return !!this.c&&this.c.i!=0;case 6:return !!this.a&&this.a.i!=0;case 7:return !this.b&&(this.b=new Yie(E4,this,4,7)),!(this.b.i<=1&&(!this.c&&(this.c=new Yie(E4,this,5,8)),this.c.i<=1));case 8:return nzd(this);case 9:return ozd(this);case 10:return !this.b&&(this.b=new Yie(E4,this,4,7)),this.b.i!=0&&(!this.c&&(this.c=new Yie(E4,this,5,8)),this.c.i!=0);}return fyd(this,a)};_.bi=function xzd(a,b){switch(a){case 3:pzd(this,RD(b,27));return;case 4:!this.b&&(this.b=new Yie(E4,this,4,7));sLd(this.b);!this.b&&(this.b=new Yie(E4,this,4,7));YGd(this.b,RD(b,16));return;case 5:!this.c&&(this.c=new Yie(E4,this,5,8));sLd(this.c);!this.c&&(this.c=new Yie(E4,this,5,8));YGd(this.c,RD(b,16));return;case 6:!this.a&&(this.a=new C5d(F4,this,6,6));sLd(this.a);!this.a&&(this.a=new C5d(F4,this,6,6));YGd(this.a,RD(b,16));return;}gyd(this,a,b)};_.ii=function yzd(){return pvd(),gvd};_.ki=function zzd(a){switch(a){case 3:pzd(this,null);return;case 4:!this.b&&(this.b=new Yie(E4,this,4,7));sLd(this.b);return;case 5:!this.c&&(this.c=new Yie(E4,this,5,8));sLd(this.c);return;case 6:!this.a&&(this.a=new C5d(F4,this,6,6));sLd(this.a);return;}hyd(this,a)};_.Ib=function Azd(){return qzd(this)};var P4=sfb(THe,'ElkEdgeImpl',326);feb(452,2083,{110:1,342:1,166:1,452:1,96:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1,120:1},Rzd);_.Ah=function Szd(a){return Czd(this,a)};_.Lh=function Tzd(a,b,c){switch(a){case 1:return this.j;case 2:return this.k;case 3:return this.b;case 4:return this.c;case 5:return !this.a&&(this.a=new XZd(D4,this,5)),this.a;case 6:return Fzd(this);case 7:if(b)return Ezd(this);return this.i;case 8:if(b)return Dzd(this);return this.f;case 9:return !this.g&&(this.g=new Yie(F4,this,9,10)),this.g;case 10:return !this.e&&(this.e=new Yie(F4,this,10,9)),this.e;case 11:return this.d;}return Axd(this,a,b,c)};_.Sh=function Uzd(a,b,c){var d,e,f;switch(b){case 6:!!this.Cb&&(c=(e=this.Db>>16,e>=0?Czd(this,c):this.Cb.Th(this,-1-e,null,c)));return Bzd(this,RD(a,74),c);case 9:return !this.g&&(this.g=new Yie(F4,this,9,10)),qLd(this.g,a,c);case 10:return !this.e&&(this.e=new Yie(F4,this,10,9)),qLd(this.e,a,c);}return f=RD(vYd((d=RD(Ywd(this,16),29),!d?(pvd(),hvd):d),b),69),f.wk().zk(this,Wwd(this),b-AYd((pvd(),hvd)),a,c)};_.Uh=function Vzd(a,b,c){switch(b){case 5:return !this.a&&(this.a=new XZd(D4,this,5)),rLd(this.a,a,c);case 6:return Bzd(this,null,c);case 9:return !this.g&&(this.g=new Yie(F4,this,9,10)),rLd(this.g,a,c);case 10:return !this.e&&(this.e=new Yie(F4,this,10,9)),rLd(this.e,a,c);}return Bxd(this,a,b,c)};_.Wh=function Wzd(a){switch(a){case 1:return this.j!=0;case 2:return this.k!=0;case 3:return this.b!=0;case 4:return this.c!=0;case 5:return !!this.a&&this.a.i!=0;case 6:return !!Fzd(this);case 7:return !!this.i;case 8:return !!this.f;case 9:return !!this.g&&this.g.i!=0;case 10:return !!this.e&&this.e.i!=0;case 11:return this.d!=null;}return Cxd(this,a)};_.bi=function Xzd(a,b){switch(a){case 1:Ozd(this,Kfb(UD(b)));return;case 2:Pzd(this,Kfb(UD(b)));return;case 3:Hzd(this,Kfb(UD(b)));return;case 4:Izd(this,Kfb(UD(b)));return;case 5:!this.a&&(this.a=new XZd(D4,this,5));sLd(this.a);!this.a&&(this.a=new XZd(D4,this,5));YGd(this.a,RD(b,16));return;case 6:Mzd(this,RD(b,74));return;case 7:Lzd(this,RD(b,84));return;case 8:Kzd(this,RD(b,84));return;case 9:!this.g&&(this.g=new Yie(F4,this,9,10));sLd(this.g);!this.g&&(this.g=new Yie(F4,this,9,10));YGd(this.g,RD(b,16));return;case 10:!this.e&&(this.e=new Yie(F4,this,10,9));sLd(this.e);!this.e&&(this.e=new Yie(F4,this,10,9));YGd(this.e,RD(b,16));return;case 11:Jzd(this,WD(b));return;}Dxd(this,a,b)};_.ii=function Yzd(){return pvd(),hvd};_.ki=function Zzd(a){switch(a){case 1:Ozd(this,0);return;case 2:Pzd(this,0);return;case 3:Hzd(this,0);return;case 4:Izd(this,0);return;case 5:!this.a&&(this.a=new XZd(D4,this,5));sLd(this.a);return;case 6:Mzd(this,null);return;case 7:Lzd(this,null);return;case 8:Kzd(this,null);return;case 9:!this.g&&(this.g=new Yie(F4,this,9,10));sLd(this.g);return;case 10:!this.e&&(this.e=new Yie(F4,this,10,9));sLd(this.e);return;case 11:Jzd(this,null);return;}Exd(this,a)};_.Ib=function $zd(){return Qzd(this)};_.b=0;_.c=0;_.d=null;_.j=0;_.k=0;var Q4=sfb(THe,'ElkEdgeSectionImpl',452);feb(158,120,{110:1,94:1,93:1,155:1,58:1,114:1,54:1,99:1,158:1,119:1,120:1});_.Lh=function cAd(a,b,c){var d;if(a==0){return !this.Ab&&(this.Ab=new C5d(f7,this,0,3)),this.Ab}return zvd(this,a-AYd(this.ii()),vYd((d=RD(Ywd(this,16),29),!d?this.ii():d),a),b,c)};_.Sh=function dAd(a,b,c){var d,e;if(b==0){return !this.Ab&&(this.Ab=new C5d(f7,this,0,3)),qLd(this.Ab,a,c)}return e=RD(vYd((d=RD(Ywd(this,16),29),!d?this.ii():d),b),69),e.wk().zk(this,Wwd(this),b-AYd(this.ii()),a,c)};_.Uh=function eAd(a,b,c){var d,e;if(b==0){return !this.Ab&&(this.Ab=new C5d(f7,this,0,3)),rLd(this.Ab,a,c)}return e=RD(vYd((d=RD(Ywd(this,16),29),!d?this.ii():d),b),69),e.wk().Ak(this,Wwd(this),b-AYd(this.ii()),a,c)};_.Wh=function fAd(a){var b;if(a==0){return !!this.Ab&&this.Ab.i!=0}return Avd(this,a-AYd(this.ii()),vYd((b=RD(Ywd(this,16),29),!b?this.ii():b),a))};_.Zh=function gAd(a){return _zd(this,a)};_.bi=function hAd(a,b){var c;switch(a){case 0:!this.Ab&&(this.Ab=new C5d(f7,this,0,3));sLd(this.Ab);!this.Ab&&(this.Ab=new C5d(f7,this,0,3));YGd(this.Ab,RD(b,16));return;}Bvd(this,a-AYd(this.ii()),vYd((c=RD(Ywd(this,16),29),!c?this.ii():c),a),b)};_.di=function iAd(a){$wd(this,128,a)};_.ii=function jAd(){return JTd(),xTd};_.ki=function kAd(a){var b;switch(a){case 0:!this.Ab&&(this.Ab=new C5d(f7,this,0,3));sLd(this.Ab);return;}Cvd(this,a-AYd(this.ii()),vYd((b=RD(Ywd(this,16),29),!b?this.ii():b),a))};_.pi=function lAd(){this.Bb|=1};_.qi=function mAd(a){return bAd(this,a)};_.Bb=0;var k8=sfb(SHe,'EModelElementImpl',158);feb(720,158,{110:1,94:1,93:1,480:1,155:1,58:1,114:1,54:1,99:1,158:1,119:1,120:1},yAd);_.ri=function zAd(a,b){return tAd(this,a,b)};_.si=function AAd(a){var b,c,d,e,f;if(this.a!=BXd(a)||(a.Bb&256)!=0){throw Adb(new agb(ZHe+a.zb+WHe))}for(d=zYd(a);tYd(d.a).i!=0;){c=RD(N_d(d,0,(b=RD(QHd(tYd(d.a),0),89),f=b.c,ZD(f,90)?RD(f,29):(JTd(),zTd))),29);if(DXd(c)){e=BXd(c).wi().si(c);RD(e,54).ci(a);return e}d=zYd(c)}return (a.D!=null?a.D:a.B)=='java.util.Map$Entry'?new LUd(a):new zUd(a)};_.ti=function BAd(a,b){return uAd(this,a,b)};_.Lh=function CAd(a,b,c){var d;switch(a){case 0:return !this.Ab&&(this.Ab=new C5d(f7,this,0,3)),this.Ab;case 1:return this.a;}return zvd(this,a-AYd((JTd(),uTd)),vYd((d=RD(Ywd(this,16),29),!d?uTd:d),a),b,c)};_.Sh=function DAd(a,b,c){var d,e;switch(b){case 0:return !this.Ab&&(this.Ab=new C5d(f7,this,0,3)),qLd(this.Ab,a,c);case 1:!!this.a&&(c=RD(this.a,54).Th(this,4,t7,c));return rAd(this,RD(a,241),c);}return e=RD(vYd((d=RD(Ywd(this,16),29),!d?(JTd(),uTd):d),b),69),e.wk().zk(this,Wwd(this),b-AYd((JTd(),uTd)),a,c)};_.Uh=function EAd(a,b,c){var d,e;switch(b){case 0:return !this.Ab&&(this.Ab=new C5d(f7,this,0,3)),rLd(this.Ab,a,c);case 1:return rAd(this,null,c);}return e=RD(vYd((d=RD(Ywd(this,16),29),!d?(JTd(),uTd):d),b),69),e.wk().Ak(this,Wwd(this),b-AYd((JTd(),uTd)),a,c)};_.Wh=function FAd(a){var b;switch(a){case 0:return !!this.Ab&&this.Ab.i!=0;case 1:return !!this.a;}return Avd(this,a-AYd((JTd(),uTd)),vYd((b=RD(Ywd(this,16),29),!b?uTd:b),a))};_.bi=function GAd(a,b){var c;switch(a){case 0:!this.Ab&&(this.Ab=new C5d(f7,this,0,3));sLd(this.Ab);!this.Ab&&(this.Ab=new C5d(f7,this,0,3));YGd(this.Ab,RD(b,16));return;case 1:wAd(this,RD(b,241));return;}Bvd(this,a-AYd((JTd(),uTd)),vYd((c=RD(Ywd(this,16),29),!c?uTd:c),a),b)};_.ii=function HAd(){return JTd(),uTd};_.ki=function IAd(a){var b;switch(a){case 0:!this.Ab&&(this.Ab=new C5d(f7,this,0,3));sLd(this.Ab);return;case 1:wAd(this,null);return;}Cvd(this,a-AYd((JTd(),uTd)),vYd((b=RD(Ywd(this,16),29),!b?uTd:b),a))};var nAd,oAd,pAd;var i8=sfb(SHe,'EFactoryImpl',720);feb(1037,720,{110:1,2113:1,94:1,93:1,480:1,155:1,58:1,114:1,54:1,99:1,158:1,119:1,120:1},KAd);_.ri=function LAd(a,b){switch(a.hk()){case 12:return RD(b,149).Pg();case 13:return jeb(b);default:throw Adb(new agb(VHe+a.xe()+WHe));}};_.si=function MAd(a){var b,c,d,e,f,g,h,i;switch(a.G==-1&&(a.G=(b=BXd(a),b?fZd(b.vi(),a):-1)),a.G){case 4:return f=new hCd,f;case 6:return g=new ACd,g;case 7:return h=new PCd,h;case 8:return d=new rzd,d;case 9:return c=new Xxd,c;case 10:return e=new Rzd,e;case 11:return i=new _Cd,i;default:throw Adb(new agb(ZHe+a.zb+WHe));}};_.ti=function NAd(a,b){switch(a.hk()){case 13:case 12:return null;default:throw Adb(new agb(VHe+a.xe()+WHe));}};var S4=sfb(THe,'ElkGraphFactoryImpl',1037);feb(448,158,{110:1,94:1,93:1,155:1,197:1,58:1,114:1,54:1,99:1,158:1,119:1,120:1});_.Gh=function RAd(){var a,b;b=(a=RD(Ywd(this,16),29),P$d(rYd(!a?this.ii():a)));return b==null?(N2d(),N2d(),M2d):new e3d(this,b)};_.Lh=function SAd(a,b,c){var d;switch(a){case 0:return !this.Ab&&(this.Ab=new C5d(f7,this,0,3)),this.Ab;case 1:return this.xe();}return zvd(this,a-AYd(this.ii()),vYd((d=RD(Ywd(this,16),29),!d?this.ii():d),a),b,c)};_.Wh=function TAd(a){var b;switch(a){case 0:return !!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;}return Avd(this,a-AYd(this.ii()),vYd((b=RD(Ywd(this,16),29),!b?this.ii():b),a))};_.bi=function UAd(a,b){var c;switch(a){case 0:!this.Ab&&(this.Ab=new C5d(f7,this,0,3));sLd(this.Ab);!this.Ab&&(this.Ab=new C5d(f7,this,0,3));YGd(this.Ab,RD(b,16));return;case 1:this.ui(WD(b));return;}Bvd(this,a-AYd(this.ii()),vYd((c=RD(Ywd(this,16),29),!c?this.ii():c),a),b)};_.ii=function VAd(){return JTd(),yTd};_.ki=function WAd(a){var b;switch(a){case 0:!this.Ab&&(this.Ab=new C5d(f7,this,0,3));sLd(this.Ab);return;case 1:this.ui(null);return;}Cvd(this,a-AYd(this.ii()),vYd((b=RD(Ywd(this,16),29),!b?this.ii():b),a))};_.xe=function XAd(){return this.zb};_.ui=function YAd(a){PAd(this,a)};_.Ib=function ZAd(){return QAd(this)};_.zb=null;var o8=sfb(SHe,'ENamedElementImpl',448);feb(184,448,{110:1,94:1,93:1,155:1,197:1,58:1,241:1,114:1,54:1,99:1,158:1,184:1,119:1,120:1,690:1},EBd);_.Ah=function GBd(a){return qBd(this,a)};_.Lh=function HBd(a,b,c){var d;switch(a){case 0:return !this.Ab&&(this.Ab=new C5d(f7,this,0,3)),this.Ab;case 1:return this.zb;case 2:return this.yb;case 3:return this.xb;case 4:return this.sb;case 5:return !this.rb&&(this.rb=new J5d(this,i7,this)),this.rb;case 6:return !this.vb&&(this.vb=new G5d(t7,this,6,7)),this.vb;case 7:if(b)return this.Db>>16==7?RD(this.Cb,241):null;return gBd(this);}return zvd(this,a-AYd((JTd(),CTd)),vYd((d=RD(Ywd(this,16),29),!d?CTd:d),a),b,c)};_.Sh=function IBd(a,b,c){var d,e,f;switch(b){case 0:return !this.Ab&&(this.Ab=new C5d(f7,this,0,3)),qLd(this.Ab,a,c);case 4:!!this.sb&&(c=RD(this.sb,54).Th(this,1,n7,c));return hBd(this,RD(a,480),c);case 5:return !this.rb&&(this.rb=new J5d(this,i7,this)),qLd(this.rb,a,c);case 6:return !this.vb&&(this.vb=new G5d(t7,this,6,7)),qLd(this.vb,a,c);case 7:!!this.Cb&&(c=(e=this.Db>>16,e>=0?qBd(this,c):this.Cb.Th(this,-1-e,null,c)));return xvd(this,a,7,c);}return f=RD(vYd((d=RD(Ywd(this,16),29),!d?(JTd(),CTd):d),b),69),f.wk().zk(this,Wwd(this),b-AYd((JTd(),CTd)),a,c)};_.Uh=function JBd(a,b,c){var d,e;switch(b){case 0:return !this.Ab&&(this.Ab=new C5d(f7,this,0,3)),rLd(this.Ab,a,c);case 4:return hBd(this,null,c);case 5:return !this.rb&&(this.rb=new J5d(this,i7,this)),rLd(this.rb,a,c);case 6:return !this.vb&&(this.vb=new G5d(t7,this,6,7)),rLd(this.vb,a,c);case 7:return xvd(this,null,7,c);}return e=RD(vYd((d=RD(Ywd(this,16),29),!d?(JTd(),CTd):d),b),69),e.wk().Ak(this,Wwd(this),b-AYd((JTd(),CTd)),a,c)};_.Wh=function KBd(a){var b;switch(a){case 0:return !!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return this.yb!=null;case 3:return this.xb!=null;case 4:return !!this.sb;case 5:return !!this.rb&&this.rb.i!=0;case 6:return !!this.vb&&this.vb.i!=0;case 7:return !!gBd(this);}return Avd(this,a-AYd((JTd(),CTd)),vYd((b=RD(Ywd(this,16),29),!b?CTd:b),a))};_.Zh=function LBd(a){var b;b=sBd(this,a);return b?b:_zd(this,a)};_.bi=function MBd(a,b){var c;switch(a){case 0:!this.Ab&&(this.Ab=new C5d(f7,this,0,3));sLd(this.Ab);!this.Ab&&(this.Ab=new C5d(f7,this,0,3));YGd(this.Ab,RD(b,16));return;case 1:PAd(this,WD(b));return;case 2:DBd(this,WD(b));return;case 3:CBd(this,WD(b));return;case 4:BBd(this,RD(b,480));return;case 5:!this.rb&&(this.rb=new J5d(this,i7,this));sLd(this.rb);!this.rb&&(this.rb=new J5d(this,i7,this));YGd(this.rb,RD(b,16));return;case 6:!this.vb&&(this.vb=new G5d(t7,this,6,7));sLd(this.vb);!this.vb&&(this.vb=new G5d(t7,this,6,7));YGd(this.vb,RD(b,16));return;}Bvd(this,a-AYd((JTd(),CTd)),vYd((c=RD(Ywd(this,16),29),!c?CTd:c),a),b)};_.ei=function NBd(a){var b,c;if(!!a&&!!this.rb){for(c=new dMd(this.rb);c.e!=c.i.gc();){b=bMd(c);ZD(b,364)&&(RD(b,364).w=null)}}$wd(this,64,a)};_.ii=function OBd(){return JTd(),CTd};_.ki=function PBd(a){var b;switch(a){case 0:!this.Ab&&(this.Ab=new C5d(f7,this,0,3));sLd(this.Ab);return;case 1:PAd(this,null);return;case 2:DBd(this,null);return;case 3:CBd(this,null);return;case 4:BBd(this,null);return;case 5:!this.rb&&(this.rb=new J5d(this,i7,this));sLd(this.rb);return;case 6:!this.vb&&(this.vb=new G5d(t7,this,6,7));sLd(this.vb);return;}Cvd(this,a-AYd((JTd(),CTd)),vYd((b=RD(Ywd(this,16),29),!b?CTd:b),a))};_.pi=function QBd(){rBd(this)};_.vi=function RBd(){return !this.rb&&(this.rb=new J5d(this,i7,this)),this.rb};_.wi=function SBd(){return this.sb};_.xi=function TBd(){return this.ub};_.yi=function UBd(){return this.xb};_.zi=function VBd(){return this.yb};_.Ai=function WBd(a){this.ub=a};_.Ib=function XBd(){var a;if((this.Db&64)!=0)return QAd(this);a=new Shb(QAd(this));a.a+=' (nsURI: ';Nhb(a,this.yb);a.a+=', nsPrefix: ';Nhb(a,this.xb);a.a+=')';return a.a};_.xb=null;_.yb=null;var $Ad;var y8=sfb(SHe,'EPackageImpl',184);feb(569,184,{110:1,2115:1,569:1,94:1,93:1,155:1,197:1,58:1,241:1,114:1,54:1,99:1,158:1,184:1,119:1,120:1,690:1},_Bd);_.q=false;_.r=false;var YBd=false;var T4=sfb(THe,'ElkGraphPackageImpl',569);feb(366,740,{110:1,342:1,167:1,135:1,422:1,366:1,96:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1,120:1},hCd);_.Ah=function iCd(a){return cCd(this,a)};_.Lh=function jCd(a,b,c){switch(a){case 7:return dCd(this);case 8:return this.a;}return vyd(this,a,b,c)};_.Sh=function kCd(a,b,c){var d;switch(b){case 7:!!this.Cb&&(c=(d=this.Db>>16,d>=0?cCd(this,c):this.Cb.Th(this,-1-d,null,c)));return bCd(this,RD(a,167),c);}return dyd(this,a,b,c)};_.Uh=function lCd(a,b,c){if(b==7){return bCd(this,null,c)}return eyd(this,a,b,c)};_.Wh=function mCd(a){switch(a){case 7:return !!dCd(this);case 8:return !lhb('',this.a);}return wyd(this,a)};_.bi=function nCd(a,b){switch(a){case 7:eCd(this,RD(b,167));return;case 8:fCd(this,WD(b));return;}xyd(this,a,b)};_.ii=function oCd(){return pvd(),jvd};_.ki=function pCd(a){switch(a){case 7:eCd(this,null);return;case 8:fCd(this,'');return;}yyd(this,a)};_.Ib=function qCd(){return gCd(this)};_.a='';var U4=sfb(THe,'ElkLabelImpl',366);feb(207,741,{110:1,342:1,84:1,167:1,27:1,422:1,207:1,96:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1,120:1},ACd);_.Ah=function BCd(a){return sCd(this,a)};_.Lh=function CCd(a,b,c){switch(a){case 9:return !this.c&&(this.c=new C5d(K4,this,9,9)),this.c;case 10:return !this.a&&(this.a=new C5d(J4,this,10,11)),this.a;case 11:return vCd(this);case 12:return !this.b&&(this.b=new C5d(G4,this,12,3)),this.b;case 13:return Geb(),!this.a&&(this.a=new C5d(J4,this,10,11)),this.a.i>0?true:false;}return Uyd(this,a,b,c)};_.Sh=function DCd(a,b,c){var d;switch(b){case 9:return !this.c&&(this.c=new C5d(K4,this,9,9)),qLd(this.c,a,c);case 10:return !this.a&&(this.a=new C5d(J4,this,10,11)),qLd(this.a,a,c);case 11:!!this.Cb&&(c=(d=this.Db>>16,d>=0?sCd(this,c):this.Cb.Th(this,-1-d,null,c)));return rCd(this,RD(a,27),c);case 12:return !this.b&&(this.b=new C5d(G4,this,12,3)),qLd(this.b,a,c);}return Vyd(this,a,b,c)};_.Uh=function ECd(a,b,c){switch(b){case 9:return !this.c&&(this.c=new C5d(K4,this,9,9)),rLd(this.c,a,c);case 10:return !this.a&&(this.a=new C5d(J4,this,10,11)),rLd(this.a,a,c);case 11:return rCd(this,null,c);case 12:return !this.b&&(this.b=new C5d(G4,this,12,3)),rLd(this.b,a,c);}return Wyd(this,a,b,c)};_.Wh=function FCd(a){switch(a){case 9:return !!this.c&&this.c.i!=0;case 10:return !!this.a&&this.a.i!=0;case 11:return !!vCd(this);case 12:return !!this.b&&this.b.i!=0;case 13:return !this.a&&(this.a=new C5d(J4,this,10,11)),this.a.i>0;}return Xyd(this,a)};_.bi=function GCd(a,b){switch(a){case 9:!this.c&&(this.c=new C5d(K4,this,9,9));sLd(this.c);!this.c&&(this.c=new C5d(K4,this,9,9));YGd(this.c,RD(b,16));return;case 10:!this.a&&(this.a=new C5d(J4,this,10,11));sLd(this.a);!this.a&&(this.a=new C5d(J4,this,10,11));YGd(this.a,RD(b,16));return;case 11:yCd(this,RD(b,27));return;case 12:!this.b&&(this.b=new C5d(G4,this,12,3));sLd(this.b);!this.b&&(this.b=new C5d(G4,this,12,3));YGd(this.b,RD(b,16));return;}Yyd(this,a,b)};_.ii=function HCd(){return pvd(),kvd};_.ki=function ICd(a){switch(a){case 9:!this.c&&(this.c=new C5d(K4,this,9,9));sLd(this.c);return;case 10:!this.a&&(this.a=new C5d(J4,this,10,11));sLd(this.a);return;case 11:yCd(this,null);return;case 12:!this.b&&(this.b=new C5d(G4,this,12,3));sLd(this.b);return;}Zyd(this,a)};_.Ib=function JCd(){return zCd(this)};var V4=sfb(THe,'ElkNodeImpl',207);feb(193,741,{110:1,342:1,84:1,167:1,123:1,422:1,193:1,96:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1,120:1},PCd);_.Ah=function QCd(a){return LCd(this,a)};_.Lh=function RCd(a,b,c){if(a==9){return MCd(this)}return Uyd(this,a,b,c)};_.Sh=function SCd(a,b,c){var d;switch(b){case 9:!!this.Cb&&(c=(d=this.Db>>16,d>=0?LCd(this,c):this.Cb.Th(this,-1-d,null,c)));return KCd(this,RD(a,27),c);}return Vyd(this,a,b,c)};_.Uh=function TCd(a,b,c){if(b==9){return KCd(this,null,c)}return Wyd(this,a,b,c)};_.Wh=function UCd(a){if(a==9){return !!MCd(this)}return Xyd(this,a)};_.bi=function VCd(a,b){switch(a){case 9:NCd(this,RD(b,27));return;}Yyd(this,a,b)};_.ii=function WCd(){return pvd(),lvd};_.ki=function XCd(a){switch(a){case 9:NCd(this,null);return;}Zyd(this,a)};_.Ib=function YCd(){return OCd(this)};var W4=sfb(THe,'ElkPortImpl',193);var O6=ufb(sIe,'BasicEMap/Entry');feb(1122,120,{110:1,44:1,94:1,93:1,136:1,58:1,114:1,54:1,99:1,119:1,120:1},_Cd);_.Fb=function fDd(a){return this===a};_.ld=function hDd(){return this.b};_.Hb=function jDd(){return kFb(this)};_.Di=function lDd(a){ZCd(this,RD(a,149))};_.Lh=function aDd(a,b,c){switch(a){case 0:return this.b;case 1:return this.c;}return Dvd(this,a,b,c)};_.Wh=function bDd(a){switch(a){case 0:return !!this.b;case 1:return this.c!=null;}return Kvd(this,a)};_.bi=function cDd(a,b){switch(a){case 0:ZCd(this,RD(b,149));return;case 1:$Cd(this,b);return;}Wvd(this,a,b)};_.ii=function dDd(){return pvd(),mvd};_.ki=function eDd(a){switch(a){case 0:ZCd(this,null);return;case 1:$Cd(this,null);return;}$vd(this,a)};_.Bi=function gDd(){var a;if(this.a==-1){a=this.b;this.a=!a?0:tb(a)}return this.a};_.md=function iDd(){return this.c};_.Ci=function kDd(a){this.a=a};_.nd=function mDd(a){var b;b=this.c;$Cd(this,a);return b};_.Ib=function nDd(){var a;if((this.Db&64)!=0)return awd(this);a=new bib;Zhb(Zhb(Zhb(a,this.b?this.b.Pg():vve),SAe),Ghb(this.c));return a.a};_.a=-1;_.c=null;var X4=sfb(THe,'ElkPropertyToValueMapEntryImpl',1122);feb(996,1,{},BDd);var Z4=sfb(vIe,'JsonAdapter',996);feb(216,63,swe,CDd);var $4=sfb(vIe,'JsonImportException',216);feb(868,1,{},IEd);var O5=sfb(vIe,'JsonImporter',868);feb(903,1,{},JEd);var _4=sfb(vIe,'JsonImporter/lambda$0$Type',903);feb(904,1,{},KEd);var a5=sfb(vIe,'JsonImporter/lambda$1$Type',904);feb(912,1,{},LEd);var b5=sfb(vIe,'JsonImporter/lambda$10$Type',912);feb(914,1,{},MEd);var c5=sfb(vIe,'JsonImporter/lambda$11$Type',914);feb(915,1,{},NEd);var d5=sfb(vIe,'JsonImporter/lambda$12$Type',915);feb(921,1,{},OEd);var e5=sfb(vIe,'JsonImporter/lambda$13$Type',921);feb(920,1,{},PEd);var f5=sfb(vIe,'JsonImporter/lambda$14$Type',920);feb(916,1,{},QEd);var g5=sfb(vIe,'JsonImporter/lambda$15$Type',916);feb(917,1,{},REd);var h5=sfb(vIe,'JsonImporter/lambda$16$Type',917);feb(918,1,{},SEd);var i5=sfb(vIe,'JsonImporter/lambda$17$Type',918);feb(919,1,{},TEd);var j5=sfb(vIe,'JsonImporter/lambda$18$Type',919);feb(924,1,{},UEd);var k5=sfb(vIe,'JsonImporter/lambda$19$Type',924);feb(905,1,{},VEd);var l5=sfb(vIe,'JsonImporter/lambda$2$Type',905);feb(922,1,{},WEd);var m5=sfb(vIe,'JsonImporter/lambda$20$Type',922);feb(923,1,{},XEd);var n5=sfb(vIe,'JsonImporter/lambda$21$Type',923);feb(927,1,{},YEd);var o5=sfb(vIe,'JsonImporter/lambda$22$Type',927);feb(925,1,{},ZEd);var p5=sfb(vIe,'JsonImporter/lambda$23$Type',925);feb(926,1,{},$Ed);var q5=sfb(vIe,'JsonImporter/lambda$24$Type',926);feb(929,1,{},_Ed);var r5=sfb(vIe,'JsonImporter/lambda$25$Type',929);feb(928,1,{},aFd);var s5=sfb(vIe,'JsonImporter/lambda$26$Type',928);feb(930,1,Qve,bFd);_.Cd=function cFd(a){_Dd(this.b,this.a,WD(a))};var t5=sfb(vIe,'JsonImporter/lambda$27$Type',930);feb(931,1,Qve,dFd);_.Cd=function eFd(a){aEd(this.b,this.a,WD(a))};var u5=sfb(vIe,'JsonImporter/lambda$28$Type',931);feb(932,1,{},fFd);var v5=sfb(vIe,'JsonImporter/lambda$29$Type',932);feb(908,1,{},gFd);var w5=sfb(vIe,'JsonImporter/lambda$3$Type',908);feb(933,1,{},hFd);var x5=sfb(vIe,'JsonImporter/lambda$30$Type',933);feb(934,1,{},iFd);var y5=sfb(vIe,'JsonImporter/lambda$31$Type',934);feb(935,1,{},jFd);var z5=sfb(vIe,'JsonImporter/lambda$32$Type',935);feb(936,1,{},kFd);var A5=sfb(vIe,'JsonImporter/lambda$33$Type',936);feb(937,1,{},lFd);var B5=sfb(vIe,'JsonImporter/lambda$34$Type',937);feb(870,1,{},nFd);var C5=sfb(vIe,'JsonImporter/lambda$35$Type',870);feb(941,1,{},pFd);var D5=sfb(vIe,'JsonImporter/lambda$36$Type',941);feb(938,1,Qve,qFd);_.Cd=function rFd(a){jEd(this.a,RD(a,377))};var E5=sfb(vIe,'JsonImporter/lambda$37$Type',938);feb(939,1,Qve,sFd);_.Cd=function tFd(a){kEd(this.a,this.b,RD(a,166))};var F5=sfb(vIe,'JsonImporter/lambda$38$Type',939);feb(940,1,Qve,uFd);_.Cd=function vFd(a){lEd(this.a,this.b,RD(a,166))};var G5=sfb(vIe,'JsonImporter/lambda$39$Type',940);feb(906,1,{},wFd);var H5=sfb(vIe,'JsonImporter/lambda$4$Type',906);feb(942,1,Qve,xFd);_.Cd=function yFd(a){mEd(this.a,RD(a,8))};var I5=sfb(vIe,'JsonImporter/lambda$40$Type',942);feb(907,1,{},zFd);var J5=sfb(vIe,'JsonImporter/lambda$5$Type',907);feb(911,1,{},AFd);var K5=sfb(vIe,'JsonImporter/lambda$6$Type',911);feb(909,1,{},BFd);var L5=sfb(vIe,'JsonImporter/lambda$7$Type',909);feb(910,1,{},CFd);var M5=sfb(vIe,'JsonImporter/lambda$8$Type',910);feb(913,1,{},DFd);var N5=sfb(vIe,'JsonImporter/lambda$9$Type',913);feb(961,1,Qve,MFd);_.Cd=function NFd(a){oDd(this.a,new OC(WD(a)))};var P5=sfb(vIe,'JsonMetaDataConverter/lambda$0$Type',961);feb(962,1,Qve,OFd);_.Cd=function PFd(a){IFd(this.a,RD(a,245))};var Q5=sfb(vIe,'JsonMetaDataConverter/lambda$1$Type',962);feb(963,1,Qve,QFd);_.Cd=function RFd(a){JFd(this.a,RD(a,143))};var R5=sfb(vIe,'JsonMetaDataConverter/lambda$2$Type',963);feb(964,1,Qve,SFd);_.Cd=function TFd(a){KFd(this.a,RD(a,170))};var S5=sfb(vIe,'JsonMetaDataConverter/lambda$3$Type',964);feb(245,22,{3:1,34:1,22:1,245:1},bGd);var UFd,VFd,WFd,XFd,YFd,ZFd,$Fd,_Fd;var T5=tfb(jze,'GraphFeature',245,WI,dGd,cGd);var eGd;feb(11,1,{34:1,149:1},jGd,kGd,lGd,mGd);_.Fd=function nGd(a){return gGd(this,RD(a,149))};_.Fb=function oGd(a){return hGd(this,a)};_.Sg=function pGd(){return iGd(this)};_.Pg=function qGd(){return this.b};_.Hb=function rGd(){return ohb(this.b)};_.Ib=function sGd(){return this.b};var Y5=sfb(jze,'Property',11);feb(671,1,fye,uGd);_.Ne=function vGd(a,b){return tGd(this,RD(a,96),RD(b,96))};_.Fb=function wGd(a){return this===a};_.Oe=function xGd(){return new Frb(this)};var X5=sfb(jze,'PropertyHolderComparator',671);feb(709,1,Ave,QGd);_.Nb=function RGd(a){Ztb(this,a)};_.Pb=function TGd(){return PGd(this)};_.Qb=function UGd(){$tb()};_.Ob=function SGd(){return !!this.a};var Z5=sfb(KIe,'ElkGraphUtil/AncestorIterator',709);var Y6=ufb(sIe,'EList');feb(70,56,{20:1,31:1,56:1,16:1,15:1,70:1,61:1});_.bd=function hHd(a,b){VGd(this,a,b)};_.Fc=function iHd(a){return WGd(this,a)};_.cd=function jHd(a,b){return XGd(this,a,b)};_.Gc=function kHd(a){return YGd(this,a)};_.Ii=function lHd(){return new yMd(this)};_.Ji=function mHd(){return new BMd(this)};_.Ki=function nHd(a){return ZGd(this,a)};_.Li=function oHd(){return true};_.Mi=function pHd(a,b){};_.Ni=function qHd(){};_.Oi=function rHd(a,b){$Gd(this,a,b)};_.Pi=function sHd(a,b,c){};_.Qi=function tHd(a,b){};_.Ri=function uHd(a,b,c){};_.Fb=function vHd(a){return _Gd(this,a)};_.Hb=function wHd(){return cHd(this)};_.Si=function xHd(){return false};_.Kc=function yHd(){return new dMd(this)};_.ed=function zHd(){return new mMd(this)};_.fd=function AHd(a){var b;b=this.gc();if(a<0||a>b)throw Adb(new aMd(a,b));return new nMd(this,a)};_.Ui=function BHd(a,b){this.Ti(a,this.dd(b))};_.Mc=function CHd(a){return dHd(this,a)};_.Wi=function DHd(a,b){return b};_.hd=function EHd(a,b){return eHd(this,a,b)};_.Ib=function FHd(){return fHd(this)};_.Yi=function GHd(){return true};_.Zi=function HHd(a,b){return gHd(this,b)};var u6=sfb(sIe,'AbstractEList',70);feb(66,70,PIe,YHd,ZHd,$Hd);_.Ei=function _Hd(a,b){return IHd(this,a,b)};_.Fi=function aId(a){return JHd(this,a)};_.Gi=function bId(a,b){KHd(this,a,b)};_.Hi=function cId(a){LHd(this,a)};_.$i=function dId(a){return NHd(this,a)};_.$b=function eId(){OHd(this)};_.Hc=function fId(a){return PHd(this,a)};_.Xb=function gId(a){return QHd(this,a)};_._i=function hId(a){var b,c,d;++this.j;c=this.g==null?0:this.g.length;if(a>c){d=this.g;b=c+(c/2|0)+4;b=0){this.gd(b);return true}else{return false}};_.Xi=function LJd(a,b){return this.Dj(a,this.Zi(a,b))};_.gc=function MJd(){return this.Ej()};_.Pc=function NJd(){return this.Fj()};_.Qc=function OJd(a){return this.Gj(a)};_.Ib=function PJd(){return this.Hj()};var R6=sfb(sIe,'DelegatingEList',2093);feb(2094,2093,FJe);_.Ei=function XJd(a,b){return QJd(this,a,b)};_.Fi=function YJd(a){return this.Ei(this.Ej(),a)};_.Gi=function ZJd(a,b){RJd(this,a,b)};_.Hi=function $Jd(a){SJd(this,a)};_.Li=function _Jd(){return !this.Mj()};_.$b=function aKd(){VJd(this)};_.Ij=function bKd(a,b,c,d,e){return new aLd(this,a,b,c,d,e)};_.Jj=function cKd(a){qvd(this.jj(),a)};_.Kj=function dKd(){return null};_.Lj=function eKd(){return -1};_.jj=function fKd(){return null};_.Mj=function gKd(){return false};_.Nj=function hKd(a,b){return b};_.Oj=function iKd(a,b){return b};_.Pj=function jKd(){return false};_.Qj=function kKd(){return !this.Aj()};_.Ti=function lKd(a,b){var c,d;if(this.Pj()){d=this.Qj();c=bJd(this,a,b);this.Jj(this.Ij(7,sgb(b),c,a,d));return c}else{return bJd(this,a,b)}};_.gd=function mKd(a){var b,c,d,e;if(this.Pj()){c=null;d=this.Qj();b=this.Ij(4,e=cJd(this,a),null,a,d);if(this.Mj()&&!!e){c=this.Oj(e,c);if(!c){this.Jj(b)}else{c.nj(b);c.oj()}}else{if(!c){this.Jj(b)}else{c.nj(b);c.oj()}}return e}else{e=cJd(this,a);if(this.Mj()&&!!e){c=this.Oj(e,null);!!c&&c.oj()}return e}};_.Xi=function nKd(a,b){return WJd(this,a,b)};var i6=sfb(JHe,'DelegatingNotifyingListImpl',2094);feb(152,1,GJe);_.nj=function PKd(a){return oKd(this,a)};_.oj=function QKd(){pKd(this)};_.gj=function RKd(){return this.d};_.Kj=function SKd(){return null};_.Rj=function TKd(){return null};_.hj=function UKd(a){return -1};_.ij=function VKd(){return yKd(this)};_.jj=function WKd(){return null};_.kj=function XKd(){return HKd(this)};_.lj=function YKd(){return this.o<0?this.o<-2?-2-this.o-1:-1:this.o};_.Sj=function ZKd(){return false};_.mj=function $Kd(a){var b,c,d,e,f,g,h,i,j,k,l;switch(this.d){case 1:case 2:{e=a.gj();switch(e){case 1:case 2:{f=a.jj();if(dE(f)===dE(this.jj())&&this.hj(null)==a.hj(null)){this.g=a.ij();a.gj()==1&&(this.d=1);return true}}}}case 4:{e=a.gj();switch(e){case 4:{f=a.jj();if(dE(f)===dE(this.jj())&&this.hj(null)==a.hj(null)){j=JKd(this);i=this.o<0?this.o<-2?-2-this.o-1:-1:this.o;g=a.lj();this.d=6;l=new ZHd(2);if(i<=g){WGd(l,this.n);WGd(l,a.kj());this.g=cD(WC(kE,1),Pwe,28,15,[this.o=i,g+1])}else{WGd(l,a.kj());WGd(l,this.n);this.g=cD(WC(kE,1),Pwe,28,15,[this.o=g,i])}this.n=l;j||(this.o=-2-this.o-1);return true}break}}break}case 6:{e=a.gj();switch(e){case 4:{f=a.jj();if(dE(f)===dE(this.jj())&&this.hj(null)==a.hj(null)){j=JKd(this);g=a.lj();k=RD(this.g,53);d=$C(kE,Pwe,28,k.length+1,15,1);b=0;while(b>>0,b.toString(16)));d.a+=' (eventType: ';switch(this.d){case 1:{d.a+='SET';break}case 2:{d.a+='UNSET';break}case 3:{d.a+='ADD';break}case 5:{d.a+='ADD_MANY';break}case 4:{d.a+='REMOVE';break}case 6:{d.a+='REMOVE_MANY';break}case 7:{d.a+='MOVE';break}case 8:{d.a+='REMOVING_ADAPTER';break}case 9:{d.a+='RESOLVE';break}default:{Lhb(d,this.d);break}}IKd(this)&&(d.a+=', touch: true',d);d.a+=', position: ';Lhb(d,this.o<0?this.o<-2?-2-this.o-1:-1:this.o);d.a+=', notifier: ';Mhb(d,this.jj());d.a+=', feature: ';Mhb(d,this.Kj());d.a+=', oldValue: ';Mhb(d,HKd(this));d.a+=', newValue: ';if(this.d==6&&ZD(this.g,53)){c=RD(this.g,53);d.a+='[';for(a=0;a10){if(!this.b||this.c.j!=this.a){this.b=new btb(this);this.a=this.j}return Zsb(this.b,a)}else{return PHd(this,a)}};_.Yi=function _Ld(){return true};_.a=0;var o6=sfb(sIe,'AbstractEList/1',966);feb(302,77,lxe,aMd);var p6=sfb(sIe,'AbstractEList/BasicIndexOutOfBoundsException',302);feb(37,1,Ave,dMd);_.Nb=function gMd(a){Ztb(this,a)};_.Xj=function eMd(){if(this.i.j!=this.f){throw Adb(new Jrb)}};_.Yj=function fMd(){return bMd(this)};_.Ob=function hMd(){return this.e!=this.i.gc()};_.Pb=function iMd(){return this.Yj()};_.Qb=function jMd(){cMd(this)};_.e=0;_.f=0;_.g=-1;var q6=sfb(sIe,'AbstractEList/EIterator',37);feb(286,37,Jve,mMd,nMd);_.Qb=function vMd(){cMd(this)};_.Rb=function oMd(a){kMd(this,a)};_.Zj=function pMd(){var b;try{b=this.d.Xb(--this.e);this.Xj();this.g=this.e;return b}catch(a){a=zdb(a);if(ZD(a,77)){this.Xj();throw Adb(new Dvb)}else throw Adb(a)}};_.$j=function qMd(a){lMd(this,a)};_.Sb=function rMd(){return this.e!=0};_.Tb=function sMd(){return this.e};_.Ub=function tMd(){return this.Zj()};_.Vb=function uMd(){return this.e-1};_.Wb=function wMd(a){this.$j(a)};var r6=sfb(sIe,'AbstractEList/EListIterator',286);feb(355,37,Ave,yMd);_.Yj=function zMd(){return xMd(this)};_.Qb=function AMd(){throw Adb(new jib)};var s6=sfb(sIe,'AbstractEList/NonResolvingEIterator',355);feb(398,286,Jve,BMd,CMd);_.Rb=function DMd(a){throw Adb(new jib)};_.Yj=function EMd(){var b;try{b=this.c.Vi(this.e);this.Xj();this.g=this.e++;return b}catch(a){a=zdb(a);if(ZD(a,77)){this.Xj();throw Adb(new Dvb)}else throw Adb(a)}};_.Zj=function FMd(){var b;try{b=this.c.Vi(--this.e);this.Xj();this.g=this.e;return b}catch(a){a=zdb(a);if(ZD(a,77)){this.Xj();throw Adb(new Dvb)}else throw Adb(a)}};_.Qb=function GMd(){throw Adb(new jib)};_.Wb=function HMd(a){throw Adb(new jib)};var t6=sfb(sIe,'AbstractEList/NonResolvingEListIterator',398);feb(2080,70,JJe);_.Ei=function PMd(a,b){var c,d,e,f,g,h,i,j,k,l,m;e=b.gc();if(e!=0){j=RD(Ywd(this.a,4),129);k=j==null?0:j.length;m=k+e;d=NMd(this,m);l=k-a;l>0&&hib(j,a,d,a+e,l);i=b.Kc();for(g=0;gc)throw Adb(new aMd(a,c));return new wNd(this,a)};_.$b=function WMd(){var a,b;++this.j;a=RD(Ywd(this.a,4),129);b=a==null?0:a.length;Bde(this,null);$Gd(this,b,a)};_.Hc=function XMd(a){var b,c,d,e,f;b=RD(Ywd(this.a,4),129);if(b!=null){if(a!=null){for(d=b,e=0,f=d.length;e=c)throw Adb(new aMd(a,c));return b[a]};_.dd=function ZMd(a){var b,c,d;b=RD(Ywd(this.a,4),129);if(b!=null){if(a!=null){for(c=0,d=b.length;cc)throw Adb(new aMd(a,c));return new oNd(this,a)};_.Ti=function cNd(a,b){var c,d,e;c=MMd(this);e=c==null?0:c.length;if(a>=e)throw Adb(new veb(MIe+a+NIe+e));if(b>=e)throw Adb(new veb(OIe+b+NIe+e));d=c[b];if(a!=b){a0&&hib(a,0,b,0,c);return b};_.Qc=function iNd(a){var b,c,d;b=RD(Ywd(this.a,4),129);d=b==null?0:b.length;if(d>0){if(a.lengthd&&bD(a,d,null);return a};var JMd;var A6=sfb(sIe,'ArrayDelegatingEList',2080);feb(1051,37,Ave,jNd);_.Xj=function kNd(){if(this.b.j!=this.f||dE(RD(Ywd(this.b.a,4),129))!==dE(this.a)){throw Adb(new Jrb)}};_.Qb=function lNd(){cMd(this);this.a=RD(Ywd(this.b.a,4),129)};var w6=sfb(sIe,'ArrayDelegatingEList/EIterator',1051);feb(722,286,Jve,nNd,oNd);_.Xj=function pNd(){if(this.b.j!=this.f||dE(RD(Ywd(this.b.a,4),129))!==dE(this.a)){throw Adb(new Jrb)}};_.$j=function qNd(a){lMd(this,a);this.a=RD(Ywd(this.b.a,4),129)};_.Qb=function rNd(){cMd(this);this.a=RD(Ywd(this.b.a,4),129)};var x6=sfb(sIe,'ArrayDelegatingEList/EListIterator',722);feb(1052,355,Ave,sNd);_.Xj=function tNd(){if(this.b.j!=this.f||dE(RD(Ywd(this.b.a,4),129))!==dE(this.a)){throw Adb(new Jrb)}};var y6=sfb(sIe,'ArrayDelegatingEList/NonResolvingEIterator',1052);feb(723,398,Jve,vNd,wNd);_.Xj=function xNd(){if(this.b.j!=this.f||dE(RD(Ywd(this.b.a,4),129))!==dE(this.a)){throw Adb(new Jrb)}};var z6=sfb(sIe,'ArrayDelegatingEList/NonResolvingEListIterator',723);feb(615,302,lxe,yNd);var B6=sfb(sIe,'BasicEList/BasicIndexOutOfBoundsException',615);feb(710,66,PIe,zNd);_.bd=function ANd(a,b){throw Adb(new jib)};_.Fc=function BNd(a){throw Adb(new jib)};_.cd=function CNd(a,b){throw Adb(new jib)};_.Gc=function DNd(a){throw Adb(new jib)};_.$b=function ENd(){throw Adb(new jib)};_._i=function FNd(a){throw Adb(new jib)};_.Kc=function GNd(){return this.Ii()};_.ed=function HNd(){return this.Ji()};_.fd=function INd(a){return this.Ki(a)};_.Ti=function JNd(a,b){throw Adb(new jib)};_.Ui=function KNd(a,b){throw Adb(new jib)};_.gd=function LNd(a){throw Adb(new jib)};_.Mc=function MNd(a){throw Adb(new jib)};_.hd=function NNd(a,b){throw Adb(new jib)};var C6=sfb(sIe,'BasicEList/UnmodifiableEList',710);feb(721,1,{3:1,20:1,16:1,15:1,61:1,597:1});_.bd=function mOd(a,b){ONd(this,a,RD(b,44))};_.Fc=function nOd(a){return PNd(this,RD(a,44))};_.Jc=function vOd(a){xgb(this,a)};_.Xb=function wOd(a){return RD(QHd(this.c,a),136)};_.Ti=function FOd(a,b){return RD(this.c.Ti(a,b),44)};_.Ui=function GOd(a,b){eOd(this,a,RD(b,44))};_.Lc=function JOd(){return new SDb(null,new Swb(this,16))};_.gd=function KOd(a){return RD(this.c.gd(a),44)};_.hd=function MOd(a,b){return kOd(this,a,RD(b,44))};_.jd=function OOd(a){tvb(this,a)};_.Nc=function POd(){return new Swb(this,16)};_.Oc=function QOd(){return new SDb(null,new Swb(this,16))};_.cd=function oOd(a,b){return this.c.cd(a,b)};_.Gc=function pOd(a){return this.c.Gc(a)};_.$b=function qOd(){this.c.$b()};_.Hc=function rOd(a){return this.c.Hc(a)};_.Ic=function sOd(a){return Be(this.c,a)};_._j=function tOd(){var a,b,c;if(this.d==null){this.d=$C(D6,KJe,66,2*this.f+1,0,1);c=this.e;this.f=0;for(b=this.c.Kc();b.e!=b.i.gc();){a=RD(b.Yj(),136);UNd(this,a)}this.e=c}};_.Fb=function uOd(a){return ZNd(this,a)};_.Hb=function xOd(){return cHd(this.c)};_.dd=function yOd(a){return this.c.dd(a)};_.ak=function zOd(){this.c=new YOd(this)};_.dc=function AOd(){return this.f==0};_.Kc=function BOd(){return this.c.Kc()};_.ed=function COd(){return this.c.ed()};_.fd=function DOd(a){return this.c.fd(a)};_.bk=function EOd(){return dOd(this)};_.ck=function HOd(a,b,c){return new ZPd(a,b,c)};_.dk=function IOd(){return new cPd};_.Mc=function LOd(a){return hOd(this,a)};_.gc=function NOd(){return this.f};_.kd=function ROd(a,b){return new Rkb(this.c,a,b)};_.Pc=function SOd(){return this.c.Pc()};_.Qc=function TOd(a){return this.c.Qc(a)};_.Ib=function UOd(){return fHd(this.c)};_.e=0;_.f=0;var Q6=sfb(sIe,'BasicEMap',721);feb(1046,66,PIe,YOd);_.Mi=function ZOd(a,b){VOd(this,RD(b,136))};_.Pi=function _Od(a,b,c){var d;++(d=this,RD(b,136),d).a.e};_.Qi=function aPd(a,b){WOd(this,RD(b,136))};_.Ri=function bPd(a,b,c){XOd(this,RD(b,136),RD(c,136))};_.Oi=function $Od(a,b){TNd(this.a)};var E6=sfb(sIe,'BasicEMap/1',1046);feb(1047,66,PIe,cPd);_.aj=function dPd(a){return $C(N6,LJe,621,a,0,1)};var F6=sfb(sIe,'BasicEMap/2',1047);feb(1048,Eve,Fve,ePd);_.$b=function fPd(){this.a.c.$b()};_.Hc=function gPd(a){return QNd(this.a,a)};_.Kc=function hPd(){return this.a.f==0?(jQd(),iQd.a):new DPd(this.a)};_.Mc=function iPd(a){var b;b=this.a.f;jOd(this.a,a);return this.a.f!=b};_.gc=function jPd(){return this.a.f};var G6=sfb(sIe,'BasicEMap/3',1048);feb(1049,31,Dve,kPd);_.$b=function lPd(){this.a.c.$b()};_.Hc=function mPd(a){return RNd(this.a,a)};_.Kc=function nPd(){return this.a.f==0?(jQd(),iQd.a):new FPd(this.a)};_.gc=function oPd(){return this.a.f};var H6=sfb(sIe,'BasicEMap/4',1049);feb(1050,Eve,Fve,qPd);_.$b=function rPd(){this.a.c.$b()};_.Hc=function sPd(a){var b,c,d,e,f,g,h,i,j;if(this.a.f>0&&ZD(a,44)){this.a._j();i=RD(a,44);h=i.ld();e=h==null?0:tb(h);f=bOd(this.a,e);b=this.a.d[f];if(b){c=RD(b.g,379);j=b.i;for(g=0;g'+this.c};_.a=0;var N6=sfb(sIe,'BasicEMap/EntryImpl',621);feb(546,1,{},hQd);var P6=sfb(sIe,'BasicEMap/View',546);var iQd;feb(783,1,{});_.Fb=function xQd(a){return Rt((yob(),vob),a)};_.Hb=function yQd(){return Cob((yob(),vob))};_.Ib=function zQd(){return Fe((yob(),vob))};var V6=sfb(sIe,'ECollections/BasicEmptyUnmodifiableEList',783);feb(1348,1,Jve,AQd);_.Nb=function CQd(a){Ztb(this,a)};_.Rb=function BQd(a){throw Adb(new jib)};_.Ob=function DQd(){return false};_.Sb=function EQd(){return false};_.Pb=function FQd(){throw Adb(new Dvb)};_.Tb=function GQd(){return 0};_.Ub=function HQd(){throw Adb(new Dvb)};_.Vb=function IQd(){return -1};_.Qb=function JQd(){throw Adb(new jib)};_.Wb=function KQd(a){throw Adb(new jib)};var U6=sfb(sIe,'ECollections/BasicEmptyUnmodifiableEList/1',1348);feb(1346,783,{20:1,16:1,15:1,61:1},LQd);_.bd=function MQd(a,b){mQd()};_.Fc=function NQd(a){return nQd()};_.cd=function OQd(a,b){return oQd()};_.Gc=function PQd(a){return pQd()};_.$b=function QQd(){qQd()};_.Hc=function RQd(a){return false};_.Ic=function SQd(a){return false};_.Jc=function TQd(a){xgb(this,a)};_.Xb=function UQd(a){return Iob((yob(),vob,a)),null};_.dd=function VQd(a){return -1};_.dc=function WQd(){return true};_.Kc=function XQd(){return this.a};_.ed=function YQd(){return this.a};_.fd=function ZQd(a){return this.a};_.Ti=function $Qd(a,b){return rQd()};_.Ui=function _Qd(a,b){sQd()};_.Lc=function aRd(){return new SDb(null,new Swb(this,16))};_.gd=function bRd(a){return tQd()};_.Mc=function cRd(a){return uQd()};_.hd=function dRd(a,b){return vQd()};_.gc=function eRd(){return 0};_.jd=function fRd(a){tvb(this,a)};_.Nc=function gRd(){return new Swb(this,16)};_.Oc=function hRd(){return new SDb(null,new Swb(this,16))};_.kd=function iRd(a,b){return yob(),new Rkb(vob,a,b)};_.Pc=function jRd(){return De((yob(),vob))};_.Qc=function kRd(a){return yob(),Ee(vob,a)};var W6=sfb(sIe,'ECollections/EmptyUnmodifiableEList',1346);feb(1347,783,{20:1,16:1,15:1,61:1,597:1},lRd);_.bd=function mRd(a,b){mQd()};_.Fc=function nRd(a){return nQd()};_.cd=function oRd(a,b){return oQd()};_.Gc=function pRd(a){return pQd()};_.$b=function qRd(){qQd()};_.Hc=function rRd(a){return false};_.Ic=function sRd(a){return false};_.Jc=function tRd(a){xgb(this,a)};_.Xb=function uRd(a){return Iob((yob(),vob,a)),null};_.dd=function vRd(a){return -1};_.dc=function wRd(){return true};_.Kc=function xRd(){return this.a};_.ed=function yRd(){return this.a};_.fd=function zRd(a){return this.a};_.Ti=function BRd(a,b){return rQd()};_.Ui=function CRd(a,b){sQd()};_.Lc=function DRd(){return new SDb(null,new Swb(this,16))};_.gd=function ERd(a){return tQd()};_.Mc=function FRd(a){return uQd()};_.hd=function GRd(a,b){return vQd()};_.gc=function HRd(){return 0};_.jd=function IRd(a){tvb(this,a)};_.Nc=function JRd(){return new Swb(this,16)};_.Oc=function KRd(){return new SDb(null,new Swb(this,16))};_.kd=function LRd(a,b){return yob(),new Rkb(vob,a,b)};_.Pc=function MRd(){return De((yob(),vob))};_.Qc=function NRd(a){return yob(),Ee(vob,a)};_.bk=function ARd(){return yob(),yob(),wob};var X6=sfb(sIe,'ECollections/EmptyUnmodifiableEMap',1347);var Z6=ufb(sIe,'Enumerator');var ORd;feb(288,1,{288:1},lSd);_.Fb=function pSd(a){var b;if(this===a)return true;if(!ZD(a,288))return false;b=RD(a,288);return this.f==b.f&&rSd(this.i,b.i)&&qSd(this.a,(this.f&256)!=0?(b.f&256)!=0?b.a:null:(b.f&256)!=0?null:b.a)&&qSd(this.d,b.d)&&qSd(this.g,b.g)&&qSd(this.e,b.e)&&iSd(this,b)};_.Hb=function uSd(){return this.f};_.Ib=function CSd(){return jSd(this)};_.f=0;var SRd=0,TRd=0,URd=0,VRd=0,WRd=0,XRd=0,YRd=0,ZRd=0,$Rd=0,_Rd,aSd=0,bSd=0,cSd=0,dSd=0,eSd,fSd;var c7=sfb(sIe,'URI',288);feb(1121,45,Hxe,MSd);_.zc=function NSd(a,b){return RD($jb(this,WD(a),RD(b,288)),288)};var b7=sfb(sIe,'URI/URICache',1121);feb(506,66,PIe,OSd,PSd);_.Si=function QSd(){return true};var d7=sfb(sIe,'UniqueEList',506);feb(590,63,swe,RSd);var e7=sfb(sIe,'WrappedException',590);var f7=ufb(vHe,OJe);var A7=ufb(vHe,PJe);var y7=ufb(vHe,QJe);var g7=ufb(vHe,RJe);var i7=ufb(vHe,SJe);var h7=ufb(vHe,'EClass');var k7=ufb(vHe,'EDataType');var SSd;feb(1233,45,Hxe,VSd);_.xc=function WSd(a){return bE(a)?Xjb(this,a):Wd(qtb(this.f,a))};var j7=sfb(vHe,'EDataType/Internal/ConversionDelegate/Factory/Registry/Impl',1233);var m7=ufb(vHe,'EEnum');var l7=ufb(vHe,TJe);var o7=ufb(vHe,UJe);var s7=ufb(vHe,VJe);var XSd;var u7=ufb(vHe,WJe);var v7=ufb(vHe,XJe);feb(1042,1,{},_Sd);_.Ib=function aTd(){return 'NIL'};var w7=sfb(vHe,'EStructuralFeature/Internal/DynamicValueHolder/1',1042);var bTd;feb(1041,45,Hxe,eTd);_.xc=function fTd(a){return bE(a)?Xjb(this,a):Wd(qtb(this.f,a))};var x7=sfb(vHe,'EStructuralFeature/Internal/SettingDelegate/Factory/Registry/Impl',1041);var z7=ufb(vHe,YJe);var B7=ufb(vHe,'EValidator/PatternMatcher');var gTd;var iTd;var kTd;var mTd,nTd,oTd,pTd,qTd,rTd,sTd,tTd,uTd,vTd,wTd,xTd,yTd,zTd,ATd,BTd,CTd,DTd,ETd,FTd,GTd,HTd,ITd;var Jbb=ufb(ZJe,'FeatureMap/Entry');feb(545,1,{76:1},KTd);_.Lk=function LTd(){return this.a};_.md=function MTd(){return this.b};var C7=sfb(SHe,'BasicEObjectImpl/1',545);feb(1040,1,$Je,NTd);_.Fk=function OTd(a){return Fvd(this.a,this.b,a)};_.Qj=function PTd(){return Lvd(this.a,this.b)};_.Wb=function QTd(a){Xvd(this.a,this.b,a)};_.Gk=function RTd(){_vd(this.a,this.b)};var D7=sfb(SHe,'BasicEObjectImpl/4',1040);feb(2081,1,{114:1});_.Mk=function UTd(a){this.e=a==0?STd:$C(jJ,rve,1,a,5,1)};_.li=function VTd(a){return this.e[a]};_.mi=function WTd(a,b){this.e[a]=b};_.ni=function XTd(a){this.e[a]=null};_.Nk=function YTd(){return this.c};_.Ok=function ZTd(){throw Adb(new jib)};_.Pk=function $Td(){throw Adb(new jib)};_.Qk=function _Td(){return this.d};_.Rk=function aUd(){return this.e!=null};_.Sk=function bUd(a){this.c=a};_.Tk=function cUd(a){throw Adb(new jib)};_.Uk=function dUd(a){throw Adb(new jib)};_.Vk=function eUd(a){this.d=a};var STd;var E7=sfb(SHe,'BasicEObjectImpl/EPropertiesHolderBaseImpl',2081);feb(192,2081,{114:1},fUd);_.Ok=function gUd(){return this.a};_.Pk=function hUd(){return this.b};_.Tk=function iUd(a){this.a=a};_.Uk=function jUd(a){this.b=a};var F7=sfb(SHe,'BasicEObjectImpl/EPropertiesHolderImpl',192);feb(516,99,RHe,kUd);_.uh=function lUd(){return this.f};_.zh=function mUd(){return this.k};_.Bh=function nUd(a,b){this.g=a;this.i=b};_.Dh=function oUd(){return (this.j&2)==0?this.ii():this.$h().Nk()};_.Fh=function pUd(){return this.i};_.wh=function qUd(){return (this.j&1)!=0};_.Ph=function rUd(){return this.g};_.Vh=function sUd(){return (this.j&4)!=0};_.$h=function tUd(){return !this.k&&(this.k=new fUd),this.k};_.ci=function uUd(a){this.$h().Sk(a);a?(this.j|=2):(this.j&=-3)};_.ei=function vUd(a){this.$h().Uk(a);a?(this.j|=4):(this.j&=-5)};_.ii=function wUd(){return (lTd(),kTd).S};_.i=0;_.j=1;var q8=sfb(SHe,'EObjectImpl',516);feb(798,516,{110:1,94:1,93:1,58:1,114:1,54:1,99:1},zUd);_.li=function AUd(a){return this.e[a]};_.mi=function BUd(a,b){this.e[a]=b};_.ni=function CUd(a){this.e[a]=null};_.Dh=function DUd(){return this.d};_.Ih=function EUd(a){return BYd(this.d,a)};_.Kh=function FUd(){return this.d};_.Oh=function GUd(){return this.e!=null};_.$h=function HUd(){!this.k&&(this.k=new VUd);return this.k};_.ci=function IUd(a){this.d=a};_.hi=function JUd(){var a;if(this.e==null){a=AYd(this.d);this.e=a==0?xUd:$C(jJ,rve,1,a,5,1)}return this};_.ji=function KUd(){return 0};var xUd;var J7=sfb(SHe,'DynamicEObjectImpl',798);feb(1522,798,{110:1,44:1,94:1,93:1,136:1,58:1,114:1,54:1,99:1},LUd);_.Fb=function NUd(a){return this===a};_.Hb=function RUd(){return kFb(this)};_.ci=function MUd(a){this.d=a;this.b=wYd(a,'key');this.c=wYd(a,aIe)};_.Bi=function OUd(){var a;if(this.a==-1){a=Gvd(this,this.b);this.a=a==null?0:tb(a)}return this.a};_.ld=function PUd(){return Gvd(this,this.b)};_.md=function QUd(){return Gvd(this,this.c)};_.Ci=function SUd(a){this.a=a};_.Di=function TUd(a){Xvd(this,this.b,a)};_.nd=function UUd(a){var b;b=Gvd(this,this.c);Xvd(this,this.c,a);return b};_.a=0;var H7=sfb(SHe,'DynamicEObjectImpl/BasicEMapEntry',1522);feb(1523,1,{114:1},VUd);_.Mk=function WUd(a){throw Adb(new jib)};_.li=function XUd(a){throw Adb(new jib)};_.mi=function YUd(a,b){throw Adb(new jib)};_.ni=function ZUd(a){throw Adb(new jib)};_.Nk=function $Ud(){throw Adb(new jib)};_.Ok=function _Ud(){return this.a};_.Pk=function aVd(){return this.b};_.Qk=function bVd(){return this.c};_.Rk=function cVd(){throw Adb(new jib)};_.Sk=function dVd(a){throw Adb(new jib)};_.Tk=function eVd(a){this.a=a};_.Uk=function fVd(a){this.b=a};_.Vk=function gVd(a){this.c=a};var I7=sfb(SHe,'DynamicEObjectImpl/DynamicEPropertiesHolderImpl',1523);feb(519,158,{110:1,94:1,93:1,598:1,155:1,58:1,114:1,54:1,99:1,519:1,158:1,119:1,120:1},pVd);_.Ah=function qVd(a){return iVd(this,a)};_.Lh=function rVd(a,b,c){var d;switch(a){case 0:return !this.Ab&&(this.Ab=new C5d(f7,this,0,3)),this.Ab;case 1:return this.d;case 2:return c?(!this.b&&(this.b=new SVd((JTd(),FTd),C8,this)),this.b):(!this.b&&(this.b=new SVd((JTd(),FTd),C8,this)),dOd(this.b));case 3:return kVd(this);case 4:return !this.a&&(this.a=new XZd(r7,this,4)),this.a;case 5:return !this.c&&(this.c=new zie(r7,this,5)),this.c;}return zvd(this,a-AYd((JTd(),mTd)),vYd((d=RD(Ywd(this,16),29),!d?mTd:d),a),b,c)};_.Sh=function sVd(a,b,c){var d,e,f;switch(b){case 0:return !this.Ab&&(this.Ab=new C5d(f7,this,0,3)),qLd(this.Ab,a,c);case 3:!!this.Cb&&(c=(e=this.Db>>16,e>=0?iVd(this,c):this.Cb.Th(this,-1-e,null,c)));return hVd(this,RD(a,155),c);}return f=RD(vYd((d=RD(Ywd(this,16),29),!d?(JTd(),mTd):d),b),69),f.wk().zk(this,Wwd(this),b-AYd((JTd(),mTd)),a,c)};_.Uh=function tVd(a,b,c){var d,e;switch(b){case 0:return !this.Ab&&(this.Ab=new C5d(f7,this,0,3)),rLd(this.Ab,a,c);case 2:return !this.b&&(this.b=new SVd((JTd(),FTd),C8,this)),BVd(this.b,a,c);case 3:return hVd(this,null,c);case 4:return !this.a&&(this.a=new XZd(r7,this,4)),rLd(this.a,a,c);}return e=RD(vYd((d=RD(Ywd(this,16),29),!d?(JTd(),mTd):d),b),69),e.wk().Ak(this,Wwd(this),b-AYd((JTd(),mTd)),a,c)};_.Wh=function uVd(a){var b;switch(a){case 0:return !!this.Ab&&this.Ab.i!=0;case 1:return this.d!=null;case 2:return !!this.b&&this.b.f!=0;case 3:return !!kVd(this);case 4:return !!this.a&&this.a.i!=0;case 5:return !!this.c&&this.c.i!=0;}return Avd(this,a-AYd((JTd(),mTd)),vYd((b=RD(Ywd(this,16),29),!b?mTd:b),a))};_.bi=function vVd(a,b){var c;switch(a){case 0:!this.Ab&&(this.Ab=new C5d(f7,this,0,3));sLd(this.Ab);!this.Ab&&(this.Ab=new C5d(f7,this,0,3));YGd(this.Ab,RD(b,16));return;case 1:mVd(this,WD(b));return;case 2:!this.b&&(this.b=new SVd((JTd(),FTd),C8,this));CVd(this.b,b);return;case 3:lVd(this,RD(b,155));return;case 4:!this.a&&(this.a=new XZd(r7,this,4));sLd(this.a);!this.a&&(this.a=new XZd(r7,this,4));YGd(this.a,RD(b,16));return;case 5:!this.c&&(this.c=new zie(r7,this,5));sLd(this.c);!this.c&&(this.c=new zie(r7,this,5));YGd(this.c,RD(b,16));return;}Bvd(this,a-AYd((JTd(),mTd)),vYd((c=RD(Ywd(this,16),29),!c?mTd:c),a),b)};_.ii=function wVd(){return JTd(),mTd};_.ki=function xVd(a){var b;switch(a){case 0:!this.Ab&&(this.Ab=new C5d(f7,this,0,3));sLd(this.Ab);return;case 1:nVd(this,null);return;case 2:!this.b&&(this.b=new SVd((JTd(),FTd),C8,this));this.b.c.$b();return;case 3:lVd(this,null);return;case 4:!this.a&&(this.a=new XZd(r7,this,4));sLd(this.a);return;case 5:!this.c&&(this.c=new zie(r7,this,5));sLd(this.c);return;}Cvd(this,a-AYd((JTd(),mTd)),vYd((b=RD(Ywd(this,16),29),!b?mTd:b),a))};_.Ib=function yVd(){return oVd(this)};_.d=null;var L7=sfb(SHe,'EAnnotationImpl',519);feb(141,721,_Je,DVd);_.Gi=function EVd(a,b){zVd(this,a,RD(b,44))};_.Wk=function FVd(a,b){return AVd(this,RD(a,44),b)};_.$i=function GVd(a){return RD(RD(this.c,71).$i(a),136)};_.Ii=function HVd(){return RD(this.c,71).Ii()};_.Ji=function IVd(){return RD(this.c,71).Ji()};_.Ki=function JVd(a){return RD(this.c,71).Ki(a)};_.Xk=function KVd(a,b){return BVd(this,a,b)};_.Fk=function LVd(a){return RD(this.c,79).Fk(a)};_.ak=function MVd(){};_.Qj=function NVd(){return RD(this.c,79).Qj()};_.ck=function OVd(a,b,c){var d;d=RD(BXd(this.b).wi().si(this.b),136);d.Ci(a);d.Di(b);d.nd(c);return d};_.dk=function PVd(){return new uje(this)};_.Wb=function QVd(a){CVd(this,a)};_.Gk=function RVd(){RD(this.c,79).Gk()};var Dbb=sfb(ZJe,'EcoreEMap',141);feb(165,141,_Je,SVd);_._j=function TVd(){var a,b,c,d,e,f;if(this.d==null){f=$C(D6,KJe,66,2*this.f+1,0,1);for(c=this.c.Kc();c.e!=c.i.gc();){b=RD(c.Yj(),136);d=b.Bi();e=(d&lve)%f.length;a=f[e];!a&&(a=f[e]=new uje(this));a.Fc(b)}this.d=f}};var K7=sfb(SHe,'EAnnotationImpl/1',165);feb(292,448,{110:1,94:1,93:1,155:1,197:1,58:1,114:1,481:1,54:1,99:1,158:1,292:1,119:1,120:1});_.Lh=function eWd(a,b,c){var d,e;switch(a){case 0:return !this.Ab&&(this.Ab=new C5d(f7,this,0,3)),this.Ab;case 1:return this.zb;case 2:return Geb(),(this.Bb&256)!=0?true:false;case 3:return Geb(),(this.Bb&512)!=0?true:false;case 4:return sgb(this.s);case 5:return sgb(this.t);case 6:return Geb(),this.Jk()?true:false;case 7:return Geb(),e=this.s,e>=1?true:false;case 8:if(b)return WVd(this);return this.r;case 9:return this.q;}return zvd(this,a-AYd(this.ii()),vYd((d=RD(Ywd(this,16),29),!d?this.ii():d),a),b,c)};_.Uh=function fWd(a,b,c){var d,e;switch(b){case 0:return !this.Ab&&(this.Ab=new C5d(f7,this,0,3)),rLd(this.Ab,a,c);case 9:return VVd(this,c);}return e=RD(vYd((d=RD(Ywd(this,16),29),!d?this.ii():d),b),69),e.wk().Ak(this,Wwd(this),b-AYd(this.ii()),a,c)};_.Wh=function gWd(a){var b,c;switch(a){case 0:return !!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return (this.Bb&256)==0;case 3:return (this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return this.Jk();case 7:return c=this.s,c>=1;case 8:return !!this.r&&!this.q.e&&j2d(this.q).i==0;case 9:return !!this.q&&!(!!this.r&&!this.q.e&&j2d(this.q).i==0);}return Avd(this,a-AYd(this.ii()),vYd((b=RD(Ywd(this,16),29),!b?this.ii():b),a))};_.bi=function hWd(a,b){var c,d;switch(a){case 0:!this.Ab&&(this.Ab=new C5d(f7,this,0,3));sLd(this.Ab);!this.Ab&&(this.Ab=new C5d(f7,this,0,3));YGd(this.Ab,RD(b,16));return;case 1:this.ui(WD(b));return;case 2:_Vd(this,Heb(TD(b)));return;case 3:aWd(this,Heb(TD(b)));return;case 4:$Vd(this,RD(b,17).a);return;case 5:this.Zk(RD(b,17).a);return;case 8:YVd(this,RD(b,142));return;case 9:d=XVd(this,RD(b,89),null);!!d&&d.oj();return;}Bvd(this,a-AYd(this.ii()),vYd((c=RD(Ywd(this,16),29),!c?this.ii():c),a),b)};_.ii=function iWd(){return JTd(),HTd};_.ki=function jWd(a){var b,c;switch(a){case 0:!this.Ab&&(this.Ab=new C5d(f7,this,0,3));sLd(this.Ab);return;case 1:this.ui(null);return;case 2:_Vd(this,true);return;case 3:aWd(this,true);return;case 4:$Vd(this,0);return;case 5:this.Zk(1);return;case 8:YVd(this,null);return;case 9:c=XVd(this,null,null);!!c&&c.oj();return;}Cvd(this,a-AYd(this.ii()),vYd((b=RD(Ywd(this,16),29),!b?this.ii():b),a))};_.pi=function kWd(){WVd(this);this.Bb|=1};_.Hk=function lWd(){return WVd(this)};_.Ik=function mWd(){return this.t};_.Jk=function nWd(){var a;return a=this.t,a>1||a==-1};_.Si=function oWd(){return (this.Bb&512)!=0};_.Yk=function pWd(a,b){return ZVd(this,a,b)};_.Zk=function qWd(a){bWd(this,a)};_.Ib=function rWd(){return cWd(this)};_.s=0;_.t=1;var A9=sfb(SHe,'ETypedElementImpl',292);feb(462,292,{110:1,94:1,93:1,155:1,197:1,58:1,179:1,69:1,114:1,481:1,54:1,99:1,158:1,462:1,292:1,119:1,120:1,692:1});_.Ah=function IWd(a){return sWd(this,a)};_.Lh=function JWd(a,b,c){var d,e;switch(a){case 0:return !this.Ab&&(this.Ab=new C5d(f7,this,0,3)),this.Ab;case 1:return this.zb;case 2:return Geb(),(this.Bb&256)!=0?true:false;case 3:return Geb(),(this.Bb&512)!=0?true:false;case 4:return sgb(this.s);case 5:return sgb(this.t);case 6:return Geb(),this.Jk()?true:false;case 7:return Geb(),e=this.s,e>=1?true:false;case 8:if(b)return WVd(this);return this.r;case 9:return this.q;case 10:return Geb(),(this.Bb&gwe)!=0?true:false;case 11:return Geb(),(this.Bb&cKe)!=0?true:false;case 12:return Geb(),(this.Bb&qxe)!=0?true:false;case 13:return this.j;case 14:return tWd(this);case 15:return Geb(),(this.Bb&bKe)!=0?true:false;case 16:return Geb(),(this.Bb&Ove)!=0?true:false;case 17:return uWd(this);}return zvd(this,a-AYd(this.ii()),vYd((d=RD(Ywd(this,16),29),!d?this.ii():d),a),b,c)};_.Sh=function KWd(a,b,c){var d,e,f;switch(b){case 0:return !this.Ab&&(this.Ab=new C5d(f7,this,0,3)),qLd(this.Ab,a,c);case 17:!!this.Cb&&(c=(e=this.Db>>16,e>=0?sWd(this,c):this.Cb.Th(this,-1-e,null,c)));return xvd(this,a,17,c);}return f=RD(vYd((d=RD(Ywd(this,16),29),!d?this.ii():d),b),69),f.wk().zk(this,Wwd(this),b-AYd(this.ii()),a,c)};_.Uh=function LWd(a,b,c){var d,e;switch(b){case 0:return !this.Ab&&(this.Ab=new C5d(f7,this,0,3)),rLd(this.Ab,a,c);case 9:return VVd(this,c);case 17:return xvd(this,null,17,c);}return e=RD(vYd((d=RD(Ywd(this,16),29),!d?this.ii():d),b),69),e.wk().Ak(this,Wwd(this),b-AYd(this.ii()),a,c)};_.Wh=function MWd(a){var b,c;switch(a){case 0:return !!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return (this.Bb&256)==0;case 3:return (this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return this.Jk();case 7:return c=this.s,c>=1;case 8:return !!this.r&&!this.q.e&&j2d(this.q).i==0;case 9:return !!this.q&&!(!!this.r&&!this.q.e&&j2d(this.q).i==0);case 10:return (this.Bb&gwe)==0;case 11:return (this.Bb&cKe)!=0;case 12:return (this.Bb&qxe)!=0;case 13:return this.j!=null;case 14:return tWd(this)!=null;case 15:return (this.Bb&bKe)!=0;case 16:return (this.Bb&Ove)!=0;case 17:return !!uWd(this);}return Avd(this,a-AYd(this.ii()),vYd((b=RD(Ywd(this,16),29),!b?this.ii():b),a))};_.bi=function NWd(a,b){var c,d;switch(a){case 0:!this.Ab&&(this.Ab=new C5d(f7,this,0,3));sLd(this.Ab);!this.Ab&&(this.Ab=new C5d(f7,this,0,3));YGd(this.Ab,RD(b,16));return;case 1:CWd(this,WD(b));return;case 2:_Vd(this,Heb(TD(b)));return;case 3:aWd(this,Heb(TD(b)));return;case 4:$Vd(this,RD(b,17).a);return;case 5:this.Zk(RD(b,17).a);return;case 8:YVd(this,RD(b,142));return;case 9:d=XVd(this,RD(b,89),null);!!d&&d.oj();return;case 10:xWd(this,Heb(TD(b)));return;case 11:FWd(this,Heb(TD(b)));return;case 12:DWd(this,Heb(TD(b)));return;case 13:yWd(this,WD(b));return;case 15:EWd(this,Heb(TD(b)));return;case 16:AWd(this,Heb(TD(b)));return;}Bvd(this,a-AYd(this.ii()),vYd((c=RD(Ywd(this,16),29),!c?this.ii():c),a),b)};_.ii=function OWd(){return JTd(),GTd};_.ki=function PWd(a){var b,c;switch(a){case 0:!this.Ab&&(this.Ab=new C5d(f7,this,0,3));sLd(this.Ab);return;case 1:ZD(this.Cb,90)&&v$d(yYd(RD(this.Cb,90)),4);PAd(this,null);return;case 2:_Vd(this,true);return;case 3:aWd(this,true);return;case 4:$Vd(this,0);return;case 5:this.Zk(1);return;case 8:YVd(this,null);return;case 9:c=XVd(this,null,null);!!c&&c.oj();return;case 10:xWd(this,true);return;case 11:FWd(this,false);return;case 12:DWd(this,false);return;case 13:this.i=null;zWd(this,null);return;case 15:EWd(this,false);return;case 16:AWd(this,false);return;}Cvd(this,a-AYd(this.ii()),vYd((b=RD(Ywd(this,16),29),!b?this.ii():b),a))};_.pi=function QWd(){Afe(Qee((lke(),jke),this));WVd(this);this.Bb|=1};_.pk=function RWd(){return this.f};_.ik=function SWd(){return tWd(this)};_.qk=function TWd(){return uWd(this)};_.uk=function UWd(){return null};_.$k=function VWd(){return this.k};_.Lj=function WWd(){return this.n};_.vk=function XWd(){return vWd(this)};_.wk=function YWd(){var a,b,c,d,e,f,g,h,i;if(!this.p){c=uWd(this);(c.i==null&&rYd(c),c.i).length;d=this.uk();!!d&&AYd(uWd(d));e=WVd(this);g=e.kk();a=!g?null:(g.i&1)!=0?g==xdb?QI:g==kE?bJ:g==jE?ZI:g==iE?VI:g==lE?eJ:g==wdb?lJ:g==gE?RI:SI:g;b=tWd(this);h=e.ik();Mje(this);(this.Bb&Ove)!=0&&(!!(f=Tee((lke(),jke),c))&&f!=this||!!(f=zfe(Qee(jke,this))))?(this.p=new Z6d(this,f)):this.Jk()?this.al()?!d?(this.Bb&bKe)!=0?!a?this.bl()?(this.p=new i7d(42,this)):(this.p=new i7d(0,this)):a==UK?(this.p=new g7d(50,O6,this)):this.bl()?(this.p=new g7d(43,a,this)):(this.p=new g7d(1,a,this)):!a?this.bl()?(this.p=new i7d(44,this)):(this.p=new i7d(2,this)):a==UK?(this.p=new g7d(41,O6,this)):this.bl()?(this.p=new g7d(45,a,this)):(this.p=new g7d(3,a,this)):(this.Bb&bKe)!=0?!a?this.bl()?(this.p=new j7d(46,this,d)):(this.p=new j7d(4,this,d)):this.bl()?(this.p=new h7d(47,a,this,d)):(this.p=new h7d(5,a,this,d)):!a?this.bl()?(this.p=new j7d(48,this,d)):(this.p=new j7d(6,this,d)):this.bl()?(this.p=new h7d(49,a,this,d)):(this.p=new h7d(7,a,this,d)):ZD(e,156)?a==Jbb?(this.p=new i7d(40,this)):(this.Bb&512)!=0?(this.Bb&bKe)!=0?!a?(this.p=new i7d(8,this)):(this.p=new g7d(9,a,this)):!a?(this.p=new i7d(10,this)):(this.p=new g7d(11,a,this)):(this.Bb&bKe)!=0?!a?(this.p=new i7d(12,this)):(this.p=new g7d(13,a,this)):!a?(this.p=new i7d(14,this)):(this.p=new g7d(15,a,this)):!d?this.bl()?(this.Bb&bKe)!=0?!a?(this.p=new i7d(16,this)):(this.p=new g7d(17,a,this)):!a?(this.p=new i7d(18,this)):(this.p=new g7d(19,a,this)):(this.Bb&bKe)!=0?!a?(this.p=new i7d(20,this)):(this.p=new g7d(21,a,this)):!a?(this.p=new i7d(22,this)):(this.p=new g7d(23,a,this)):(i=d.t,i>1||i==-1?this.bl()?(this.Bb&bKe)!=0?!a?(this.p=new j7d(24,this,d)):(this.p=new h7d(25,a,this,d)):!a?(this.p=new j7d(26,this,d)):(this.p=new h7d(27,a,this,d)):(this.Bb&bKe)!=0?!a?(this.p=new j7d(28,this,d)):(this.p=new h7d(29,a,this,d)):!a?(this.p=new j7d(30,this,d)):(this.p=new h7d(31,a,this,d)):this.bl()?(this.Bb&bKe)!=0?!a?(this.p=new j7d(32,this,d)):(this.p=new h7d(33,a,this,d)):!a?(this.p=new j7d(34,this,d)):(this.p=new h7d(35,a,this,d)):(this.Bb&bKe)!=0?!a?(this.p=new j7d(36,this,d)):(this.p=new h7d(37,a,this,d)):!a?(this.p=new j7d(38,this,d)):(this.p=new h7d(39,a,this,d))):this._k()?this.bl()?(this.p=new K7d(RD(e,29),this,d)):(this.p=new C7d(RD(e,29),this,d)):ZD(e,156)?a==Jbb?(this.p=new i7d(40,this)):(this.Bb&bKe)!=0?!a?(this.p=new J8d(RD(e,156),b,h,this)):(this.p=new L8d(b,h,this,(a8d(),g==kE?Y7d:g==xdb?T7d:g==lE?Z7d:g==jE?X7d:g==iE?W7d:g==wdb?_7d:g==gE?U7d:g==hE?V7d:$7d))):!a?(this.p=new C8d(RD(e,156),b,h,this)):(this.p=new E8d(b,h,this,(a8d(),g==kE?Y7d:g==xdb?T7d:g==lE?Z7d:g==jE?X7d:g==iE?W7d:g==wdb?_7d:g==gE?U7d:g==hE?V7d:$7d))):this.al()?!d?(this.Bb&bKe)!=0?this.bl()?(this.p=new d9d(RD(e,29),this)):(this.p=new b9d(RD(e,29),this)):this.bl()?(this.p=new _8d(RD(e,29),this)):(this.p=new Z8d(RD(e,29),this)):(this.Bb&bKe)!=0?this.bl()?(this.p=new l9d(RD(e,29),this,d)):(this.p=new j9d(RD(e,29),this,d)):this.bl()?(this.p=new h9d(RD(e,29),this,d)):(this.p=new f9d(RD(e,29),this,d)):this.bl()?!d?(this.Bb&bKe)!=0?(this.p=new p9d(RD(e,29),this)):(this.p=new n9d(RD(e,29),this)):(this.Bb&bKe)!=0?(this.p=new t9d(RD(e,29),this,d)):(this.p=new r9d(RD(e,29),this,d)):!d?(this.Bb&bKe)!=0?(this.p=new v9d(RD(e,29),this)):(this.p=new N8d(RD(e,29),this)):(this.Bb&bKe)!=0?(this.p=new z9d(RD(e,29),this,d)):(this.p=new x9d(RD(e,29),this,d))}return this.p};_.rk=function ZWd(){return (this.Bb&gwe)!=0};_._k=function $Wd(){return false};_.al=function _Wd(){return false};_.sk=function aXd(){return (this.Bb&Ove)!=0};_.xk=function bXd(){return wWd(this)};_.bl=function cXd(){return false};_.tk=function dXd(){return (this.Bb&bKe)!=0};_.cl=function eXd(a){this.k=a};_.ui=function fXd(a){CWd(this,a)};_.Ib=function gXd(){return GWd(this)};_.e=false;_.n=0;var s9=sfb(SHe,'EStructuralFeatureImpl',462);feb(331,462,{110:1,94:1,93:1,35:1,155:1,197:1,58:1,179:1,69:1,114:1,481:1,54:1,99:1,331:1,158:1,462:1,292:1,119:1,120:1,692:1},mXd);_.Lh=function nXd(a,b,c){var d,e;switch(a){case 0:return !this.Ab&&(this.Ab=new C5d(f7,this,0,3)),this.Ab;case 1:return this.zb;case 2:return Geb(),(this.Bb&256)!=0?true:false;case 3:return Geb(),(this.Bb&512)!=0?true:false;case 4:return sgb(this.s);case 5:return sgb(this.t);case 6:return Geb(),jXd(this)?true:false;case 7:return Geb(),e=this.s,e>=1?true:false;case 8:if(b)return WVd(this);return this.r;case 9:return this.q;case 10:return Geb(),(this.Bb&gwe)!=0?true:false;case 11:return Geb(),(this.Bb&cKe)!=0?true:false;case 12:return Geb(),(this.Bb&qxe)!=0?true:false;case 13:return this.j;case 14:return tWd(this);case 15:return Geb(),(this.Bb&bKe)!=0?true:false;case 16:return Geb(),(this.Bb&Ove)!=0?true:false;case 17:return uWd(this);case 18:return Geb(),(this.Bb&QHe)!=0?true:false;case 19:if(b)return iXd(this);return hXd(this);}return zvd(this,a-AYd((JTd(),nTd)),vYd((d=RD(Ywd(this,16),29),!d?nTd:d),a),b,c)};_.Wh=function oXd(a){var b,c;switch(a){case 0:return !!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return (this.Bb&256)==0;case 3:return (this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return jXd(this);case 7:return c=this.s,c>=1;case 8:return !!this.r&&!this.q.e&&j2d(this.q).i==0;case 9:return !!this.q&&!(!!this.r&&!this.q.e&&j2d(this.q).i==0);case 10:return (this.Bb&gwe)==0;case 11:return (this.Bb&cKe)!=0;case 12:return (this.Bb&qxe)!=0;case 13:return this.j!=null;case 14:return tWd(this)!=null;case 15:return (this.Bb&bKe)!=0;case 16:return (this.Bb&Ove)!=0;case 17:return !!uWd(this);case 18:return (this.Bb&QHe)!=0;case 19:return !!hXd(this);}return Avd(this,a-AYd((JTd(),nTd)),vYd((b=RD(Ywd(this,16),29),!b?nTd:b),a))};_.bi=function pXd(a,b){var c,d;switch(a){case 0:!this.Ab&&(this.Ab=new C5d(f7,this,0,3));sLd(this.Ab);!this.Ab&&(this.Ab=new C5d(f7,this,0,3));YGd(this.Ab,RD(b,16));return;case 1:CWd(this,WD(b));return;case 2:_Vd(this,Heb(TD(b)));return;case 3:aWd(this,Heb(TD(b)));return;case 4:$Vd(this,RD(b,17).a);return;case 5:lXd(this,RD(b,17).a);return;case 8:YVd(this,RD(b,142));return;case 9:d=XVd(this,RD(b,89),null);!!d&&d.oj();return;case 10:xWd(this,Heb(TD(b)));return;case 11:FWd(this,Heb(TD(b)));return;case 12:DWd(this,Heb(TD(b)));return;case 13:yWd(this,WD(b));return;case 15:EWd(this,Heb(TD(b)));return;case 16:AWd(this,Heb(TD(b)));return;case 18:kXd(this,Heb(TD(b)));return;}Bvd(this,a-AYd((JTd(),nTd)),vYd((c=RD(Ywd(this,16),29),!c?nTd:c),a),b)};_.ii=function qXd(){return JTd(),nTd};_.ki=function rXd(a){var b,c;switch(a){case 0:!this.Ab&&(this.Ab=new C5d(f7,this,0,3));sLd(this.Ab);return;case 1:ZD(this.Cb,90)&&v$d(yYd(RD(this.Cb,90)),4);PAd(this,null);return;case 2:_Vd(this,true);return;case 3:aWd(this,true);return;case 4:$Vd(this,0);return;case 5:this.b=0;bWd(this,1);return;case 8:YVd(this,null);return;case 9:c=XVd(this,null,null);!!c&&c.oj();return;case 10:xWd(this,true);return;case 11:FWd(this,false);return;case 12:DWd(this,false);return;case 13:this.i=null;zWd(this,null);return;case 15:EWd(this,false);return;case 16:AWd(this,false);return;case 18:kXd(this,false);return;}Cvd(this,a-AYd((JTd(),nTd)),vYd((b=RD(Ywd(this,16),29),!b?nTd:b),a))};_.pi=function sXd(){iXd(this);Afe(Qee((lke(),jke),this));WVd(this);this.Bb|=1};_.Jk=function tXd(){return jXd(this)};_.Yk=function uXd(a,b){this.b=0;this.a=null;return ZVd(this,a,b)};_.Zk=function vXd(a){lXd(this,a)};_.Ib=function wXd(){var a;if((this.Db&64)!=0)return GWd(this);a=new Shb(GWd(this));a.a+=' (iD: ';Ohb(a,(this.Bb&QHe)!=0);a.a+=')';return a.a};_.b=0;var M7=sfb(SHe,'EAttributeImpl',331);feb(364,448,{110:1,94:1,93:1,142:1,155:1,197:1,58:1,114:1,54:1,99:1,364:1,158:1,119:1,120:1,691:1});_.dl=function NXd(a){return a.Dh()==this};_.Ah=function OXd(a){return AXd(this,a)};_.Bh=function PXd(a,b){this.w=null;this.Db=b<<16|this.Db&255;this.Cb=a};_.Lh=function QXd(a,b,c){var d;switch(a){case 0:return !this.Ab&&(this.Ab=new C5d(f7,this,0,3)),this.Ab;case 1:return this.zb;case 2:return this.D!=null?this.D:this.B;case 3:return DXd(this);case 4:return this.ik();case 5:return this.F;case 6:if(b)return BXd(this);return xXd(this);case 7:return !this.A&&(this.A=new iie(z7,this,7)),this.A;}return zvd(this,a-AYd(this.ii()),vYd((d=RD(Ywd(this,16),29),!d?this.ii():d),a),b,c)};_.Sh=function RXd(a,b,c){var d,e,f;switch(b){case 0:return !this.Ab&&(this.Ab=new C5d(f7,this,0,3)),qLd(this.Ab,a,c);case 6:!!this.Cb&&(c=(e=this.Db>>16,e>=0?AXd(this,c):this.Cb.Th(this,-1-e,null,c)));return xvd(this,a,6,c);}return f=RD(vYd((d=RD(Ywd(this,16),29),!d?this.ii():d),b),69),f.wk().zk(this,Wwd(this),b-AYd(this.ii()),a,c)};_.Uh=function SXd(a,b,c){var d,e;switch(b){case 0:return !this.Ab&&(this.Ab=new C5d(f7,this,0,3)),rLd(this.Ab,a,c);case 6:return xvd(this,null,6,c);case 7:return !this.A&&(this.A=new iie(z7,this,7)),rLd(this.A,a,c);}return e=RD(vYd((d=RD(Ywd(this,16),29),!d?this.ii():d),b),69),e.wk().Ak(this,Wwd(this),b-AYd(this.ii()),a,c)};_.Wh=function TXd(a){var b;switch(a){case 0:return !!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return this.D!=null&&this.D==this.F;case 3:return !!DXd(this);case 4:return this.ik()!=null;case 5:return this.F!=null&&this.F!=this.D&&this.F!=this.B;case 6:return !!xXd(this);case 7:return !!this.A&&this.A.i!=0;}return Avd(this,a-AYd(this.ii()),vYd((b=RD(Ywd(this,16),29),!b?this.ii():b),a))};_.bi=function UXd(a,b){var c;switch(a){case 0:!this.Ab&&(this.Ab=new C5d(f7,this,0,3));sLd(this.Ab);!this.Ab&&(this.Ab=new C5d(f7,this,0,3));YGd(this.Ab,RD(b,16));return;case 1:LXd(this,WD(b));return;case 2:IXd(this,WD(b));return;case 5:KXd(this,WD(b));return;case 7:!this.A&&(this.A=new iie(z7,this,7));sLd(this.A);!this.A&&(this.A=new iie(z7,this,7));YGd(this.A,RD(b,16));return;}Bvd(this,a-AYd(this.ii()),vYd((c=RD(Ywd(this,16),29),!c?this.ii():c),a),b)};_.ii=function VXd(){return JTd(),pTd};_.ki=function WXd(a){var b;switch(a){case 0:!this.Ab&&(this.Ab=new C5d(f7,this,0,3));sLd(this.Ab);return;case 1:ZD(this.Cb,184)&&(RD(this.Cb,184).tb=null);PAd(this,null);return;case 2:yXd(this,null);zXd(this,this.D);return;case 5:KXd(this,null);return;case 7:!this.A&&(this.A=new iie(z7,this,7));sLd(this.A);return;}Cvd(this,a-AYd(this.ii()),vYd((b=RD(Ywd(this,16),29),!b?this.ii():b),a))};_.hk=function XXd(){var a;return this.G==-1&&(this.G=(a=BXd(this),a?fZd(a.vi(),this):-1)),this.G};_.ik=function YXd(){return null};_.jk=function ZXd(){return BXd(this)};_.el=function $Xd(){return this.v};_.kk=function _Xd(){return DXd(this)};_.lk=function aYd(){return this.D!=null?this.D:this.B};_.mk=function bYd(){return this.F};_.fk=function cYd(a){return FXd(this,a)};_.fl=function dYd(a){this.v=a};_.gl=function eYd(a){GXd(this,a)};_.hl=function fYd(a){this.C=a};_.ui=function gYd(a){LXd(this,a)};_.Ib=function hYd(){return MXd(this)};_.C=null;_.D=null;_.G=-1;var c8=sfb(SHe,'EClassifierImpl',364);feb(90,364,{110:1,94:1,93:1,29:1,142:1,155:1,197:1,58:1,114:1,54:1,99:1,90:1,364:1,158:1,482:1,119:1,120:1,691:1},HYd);_.dl=function IYd(a){return DYd(this,a.Dh())};_.Lh=function JYd(a,b,c){var d;switch(a){case 0:return !this.Ab&&(this.Ab=new C5d(f7,this,0,3)),this.Ab;case 1:return this.zb;case 2:return this.D!=null?this.D:this.B;case 3:return DXd(this);case 4:return null;case 5:return this.F;case 6:if(b)return BXd(this);return xXd(this);case 7:return !this.A&&(this.A=new iie(z7,this,7)),this.A;case 8:return Geb(),(this.Bb&256)!=0?true:false;case 9:return Geb(),(this.Bb&512)!=0?true:false;case 10:return zYd(this);case 11:return !this.q&&(this.q=new C5d(s7,this,11,10)),this.q;case 12:return mYd(this);case 13:return qYd(this);case 14:return qYd(this),this.r;case 15:return mYd(this),this.k;case 16:return nYd(this);case 17:return pYd(this);case 18:return rYd(this);case 19:return sYd(this);case 20:return mYd(this),this.o;case 21:return !this.s&&(this.s=new C5d(y7,this,21,17)),this.s;case 22:return tYd(this);case 23:return oYd(this);}return zvd(this,a-AYd((JTd(),oTd)),vYd((d=RD(Ywd(this,16),29),!d?oTd:d),a),b,c)};_.Sh=function KYd(a,b,c){var d,e,f;switch(b){case 0:return !this.Ab&&(this.Ab=new C5d(f7,this,0,3)),qLd(this.Ab,a,c);case 6:!!this.Cb&&(c=(e=this.Db>>16,e>=0?AXd(this,c):this.Cb.Th(this,-1-e,null,c)));return xvd(this,a,6,c);case 11:return !this.q&&(this.q=new C5d(s7,this,11,10)),qLd(this.q,a,c);case 21:return !this.s&&(this.s=new C5d(y7,this,21,17)),qLd(this.s,a,c);}return f=RD(vYd((d=RD(Ywd(this,16),29),!d?(JTd(),oTd):d),b),69),f.wk().zk(this,Wwd(this),b-AYd((JTd(),oTd)),a,c)};_.Uh=function LYd(a,b,c){var d,e;switch(b){case 0:return !this.Ab&&(this.Ab=new C5d(f7,this,0,3)),rLd(this.Ab,a,c);case 6:return xvd(this,null,6,c);case 7:return !this.A&&(this.A=new iie(z7,this,7)),rLd(this.A,a,c);case 11:return !this.q&&(this.q=new C5d(s7,this,11,10)),rLd(this.q,a,c);case 21:return !this.s&&(this.s=new C5d(y7,this,21,17)),rLd(this.s,a,c);case 22:return rLd(tYd(this),a,c);}return e=RD(vYd((d=RD(Ywd(this,16),29),!d?(JTd(),oTd):d),b),69),e.wk().Ak(this,Wwd(this),b-AYd((JTd(),oTd)),a,c)};_.Wh=function MYd(a){var b;switch(a){case 0:return !!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return this.D!=null&&this.D==this.F;case 3:return !!DXd(this);case 4:return false;case 5:return this.F!=null&&this.F!=this.D&&this.F!=this.B;case 6:return !!xXd(this);case 7:return !!this.A&&this.A.i!=0;case 8:return (this.Bb&256)!=0;case 9:return (this.Bb&512)!=0;case 10:return !!this.u&&tYd(this.u.a).i!=0&&!(!!this.n&&d$d(this.n));case 11:return !!this.q&&this.q.i!=0;case 12:return mYd(this).i!=0;case 13:return qYd(this).i!=0;case 14:return qYd(this),this.r.i!=0;case 15:return mYd(this),this.k.i!=0;case 16:return nYd(this).i!=0;case 17:return pYd(this).i!=0;case 18:return rYd(this).i!=0;case 19:return sYd(this).i!=0;case 20:return mYd(this),!!this.o;case 21:return !!this.s&&this.s.i!=0;case 22:return !!this.n&&d$d(this.n);case 23:return oYd(this).i!=0;}return Avd(this,a-AYd((JTd(),oTd)),vYd((b=RD(Ywd(this,16),29),!b?oTd:b),a))};_.Zh=function NYd(a){var b;b=this.i==null||!!this.q&&this.q.i!=0?null:wYd(this,a);return b?b:_zd(this,a)};_.bi=function OYd(a,b){var c;switch(a){case 0:!this.Ab&&(this.Ab=new C5d(f7,this,0,3));sLd(this.Ab);!this.Ab&&(this.Ab=new C5d(f7,this,0,3));YGd(this.Ab,RD(b,16));return;case 1:LXd(this,WD(b));return;case 2:IXd(this,WD(b));return;case 5:KXd(this,WD(b));return;case 7:!this.A&&(this.A=new iie(z7,this,7));sLd(this.A);!this.A&&(this.A=new iie(z7,this,7));YGd(this.A,RD(b,16));return;case 8:EYd(this,Heb(TD(b)));return;case 9:FYd(this,Heb(TD(b)));return;case 10:VJd(zYd(this));YGd(zYd(this),RD(b,16));return;case 11:!this.q&&(this.q=new C5d(s7,this,11,10));sLd(this.q);!this.q&&(this.q=new C5d(s7,this,11,10));YGd(this.q,RD(b,16));return;case 21:!this.s&&(this.s=new C5d(y7,this,21,17));sLd(this.s);!this.s&&(this.s=new C5d(y7,this,21,17));YGd(this.s,RD(b,16));return;case 22:sLd(tYd(this));YGd(tYd(this),RD(b,16));return;}Bvd(this,a-AYd((JTd(),oTd)),vYd((c=RD(Ywd(this,16),29),!c?oTd:c),a),b)};_.ii=function PYd(){return JTd(),oTd};_.ki=function QYd(a){var b;switch(a){case 0:!this.Ab&&(this.Ab=new C5d(f7,this,0,3));sLd(this.Ab);return;case 1:ZD(this.Cb,184)&&(RD(this.Cb,184).tb=null);PAd(this,null);return;case 2:yXd(this,null);zXd(this,this.D);return;case 5:KXd(this,null);return;case 7:!this.A&&(this.A=new iie(z7,this,7));sLd(this.A);return;case 8:EYd(this,false);return;case 9:FYd(this,false);return;case 10:!!this.u&&VJd(this.u);return;case 11:!this.q&&(this.q=new C5d(s7,this,11,10));sLd(this.q);return;case 21:!this.s&&(this.s=new C5d(y7,this,21,17));sLd(this.s);return;case 22:!!this.n&&sLd(this.n);return;}Cvd(this,a-AYd((JTd(),oTd)),vYd((b=RD(Ywd(this,16),29),!b?oTd:b),a))};_.pi=function RYd(){var a,b;mYd(this);qYd(this);nYd(this);pYd(this);rYd(this);sYd(this);oYd(this);OHd(q$d(yYd(this)));if(this.s){for(a=0,b=this.s.i;a=0;--b){QHd(this,b)}}return XHd(this,a)};_.Gk=function NZd(){sLd(this)};_.Zi=function OZd(a,b){return jZd(this,a,b)};var ybb=sfb(ZJe,'EcoreEList',632);feb(505,632,oKe,PZd);_.Li=function QZd(){return false};_.Lj=function RZd(){return this.c};_.Mj=function SZd(){return false};_.ol=function TZd(){return true};_.Si=function UZd(){return true};_.Wi=function VZd(a,b){return b};_.Yi=function WZd(){return false};_.c=0;var ibb=sfb(ZJe,'EObjectEList',505);feb(83,505,oKe,XZd);_.Mj=function YZd(){return true};_.ml=function ZZd(){return false};_.al=function $Zd(){return true};var cbb=sfb(ZJe,'EObjectContainmentEList',83);feb(555,83,oKe,_Zd);_.Ni=function a$d(){this.b=true};_.Qj=function b$d(){return this.b};_.Gk=function c$d(){var a;sLd(this);if(Mvd(this.e)){a=this.b;this.b=false;qvd(this.e,new Q3d(this.e,2,this.c,a,false))}else{this.b=false}};_.b=false;var bbb=sfb(ZJe,'EObjectContainmentEList/Unsettable',555);feb(1161,555,oKe,h$d);_.Ti=function l$d(a,b){var c,d;return c=RD(uLd(this,a,b),89),Mvd(this.e)&&eZd(this,new c4d(this.a,7,(JTd(),qTd),sgb(b),(d=c.c,ZD(d,90)?RD(d,29):zTd),a)),c};_.Uj=function m$d(a,b){return e$d(this,RD(a,89),b)};_.Vj=function n$d(a,b){return f$d(this,RD(a,89),b)};_.Wj=function o$d(a,b,c){return g$d(this,RD(a,89),RD(b,89),c)};_.Ij=function i$d(a,b,c,d,e){switch(a){case 3:{return dZd(this,a,b,c,d,this.i>1)}case 5:{return dZd(this,a,b,c,d,this.i-RD(c,15).gc()>0)}default:{return new P3d(this.e,a,this.c,b,c,d,true)}}};_.Tj=function j$d(){return true};_.Qj=function k$d(){return d$d(this)};_.Gk=function p$d(){sLd(this)};var S7=sfb(SHe,'EClassImpl/1',1161);feb(1175,1174,EJe);_.dj=function t$d(a){var b,c,d,e,f,g,h;c=a.gj();if(c!=8){d=s$d(a);if(d==0){switch(c){case 1:case 9:{h=a.kj();if(h!=null){b=yYd(RD(h,482));!b.c&&(b.c=new X9d);dHd(b.c,a.jj())}g=a.ij();if(g!=null){e=RD(g,482);if((e.Bb&1)==0){b=yYd(e);!b.c&&(b.c=new X9d);WGd(b.c,RD(a.jj(),29))}}break}case 3:{g=a.ij();if(g!=null){e=RD(g,482);if((e.Bb&1)==0){b=yYd(e);!b.c&&(b.c=new X9d);WGd(b.c,RD(a.jj(),29))}}break}case 5:{g=a.ij();if(g!=null){for(f=RD(g,16).Kc();f.Ob();){e=RD(f.Pb(),482);if((e.Bb&1)==0){b=yYd(e);!b.c&&(b.c=new X9d);WGd(b.c,RD(a.jj(),29))}}}break}case 4:{h=a.kj();if(h!=null){e=RD(h,482);if((e.Bb&1)==0){b=yYd(e);!b.c&&(b.c=new X9d);dHd(b.c,a.jj())}}break}case 6:{h=a.kj();if(h!=null){for(f=RD(h,16).Kc();f.Ob();){e=RD(f.Pb(),482);if((e.Bb&1)==0){b=yYd(e);!b.c&&(b.c=new X9d);dHd(b.c,a.jj())}}}break}}}this.ql(d)}};_.ql=function u$d(a){r$d(this,a)};_.b=63;var u9=sfb(SHe,'ESuperAdapter',1175);feb(1176,1175,EJe,w$d);_.ql=function x$d(a){v$d(this,a)};var N7=sfb(SHe,'EClassImpl/10',1176);feb(1165,710,oKe);_.Ei=function y$d(a,b){return IHd(this,a,b)};_.Fi=function z$d(a){return JHd(this,a)};_.Gi=function A$d(a,b){KHd(this,a,b)};_.Hi=function B$d(a){LHd(this,a)};_.$i=function D$d(a){return NHd(this,a)};_.Xi=function L$d(a,b){return UHd(this,a,b)};_.Wk=function C$d(a,b){throw Adb(new jib)};_.Ii=function E$d(){return new yMd(this)};_.Ji=function F$d(){return new BMd(this)};_.Ki=function G$d(a){return ZGd(this,a)};_.Xk=function H$d(a,b){throw Adb(new jib)};_.Fk=function I$d(a){return this};_.Qj=function J$d(){return this.i!=0};_.Wb=function K$d(a){throw Adb(new jib)};_.Gk=function M$d(){throw Adb(new jib)};var xbb=sfb(ZJe,'EcoreEList/UnmodifiableEList',1165);feb(328,1165,oKe,N$d);_.Yi=function O$d(){return false};var wbb=sfb(ZJe,'EcoreEList/UnmodifiableEList/FastCompare',328);feb(1168,328,oKe,R$d);_.dd=function S$d(a){var b,c,d;if(ZD(a,179)){b=RD(a,179);c=b.Lj();if(c!=-1){for(d=this.i;c4){if(this.fk(a)){if(this.al()){d=RD(a,54);c=d.Eh();h=c==this.b&&(this.ml()?d.yh(d.Fh(),RD(vYd(Uwd(this.b),this.Lj()).Hk(),29).kk())==Z5d(RD(vYd(Uwd(this.b),this.Lj()),19)).n:-1-d.Fh()==this.Lj());if(this.nl()&&!h&&!c&&!!d.Jh()){for(e=0;e1||d==-1)}else{return false}};_.ml=function a0d(){var a,b,c;b=vYd(Uwd(this.b),this.Lj());if(ZD(b,102)){a=RD(b,19);c=Z5d(a);return !!c}else{return false}};_.nl=function b0d(){var a,b;b=vYd(Uwd(this.b),this.Lj());if(ZD(b,102)){a=RD(b,19);return (a.Bb&txe)!=0}else{return false}};_.dd=function c0d(a){var b,c,d,e;d=this.zj(a);if(d>=0)return d;if(this.ol()){for(c=0,e=this.Ej();c=0;--a){N_d(this,a,this.xj(a))}}return this.Fj()};_.Qc=function o0d(a){var b;if(this.nl()){for(b=this.Ej()-1;b>=0;--b){N_d(this,b,this.xj(b))}}return this.Gj(a)};_.Gk=function p0d(){VJd(this)};_.Zi=function q0d(a,b){return P_d(this,a,b)};var Pab=sfb(ZJe,'DelegatingEcoreEList',756);feb(1171,756,tKe,w0d);_.qj=function z0d(a,b){r0d(this,a,RD(b,29))};_.rj=function A0d(a){s0d(this,RD(a,29))};_.xj=function G0d(a){var b,c;return b=RD(QHd(tYd(this.a),a),89),c=b.c,ZD(c,90)?RD(c,29):(JTd(),zTd)};_.Cj=function L0d(a){var b,c;return b=RD(vLd(tYd(this.a),a),89),c=b.c,ZD(c,90)?RD(c,29):(JTd(),zTd)};_.Dj=function M0d(a,b){return u0d(this,a,RD(b,29))};_.Li=function x0d(){return false};_.Ij=function y0d(a,b,c,d,e){return null};_.sj=function B0d(){return new c1d(this)};_.tj=function C0d(){sLd(tYd(this.a))};_.uj=function D0d(a){return t0d(this,a)};_.vj=function E0d(a){var b,c;for(c=a.Kc();c.Ob();){b=c.Pb();if(!t0d(this,b)){return false}}return true};_.wj=function F0d(a){var b,c,d;if(ZD(a,15)){d=RD(a,15);if(d.gc()==tYd(this.a).i){for(b=d.Kc(),c=new dMd(this);b.Ob();){if(dE(b.Pb())!==dE(bMd(c))){return false}}return true}}return false};_.yj=function H0d(){var a,b,c,d,e;c=1;for(b=new dMd(tYd(this.a));b.e!=b.i.gc();){a=RD(bMd(b),89);d=(e=a.c,ZD(e,90)?RD(e,29):(JTd(),zTd));c=31*c+(!d?0:kFb(d))}return c};_.zj=function I0d(a){var b,c,d,e;d=0;for(c=new dMd(tYd(this.a));c.e!=c.i.gc();){b=RD(bMd(c),89);if(dE(a)===dE((e=b.c,ZD(e,90)?RD(e,29):(JTd(),zTd)))){return d}++d}return -1};_.Aj=function J0d(){return tYd(this.a).i==0};_.Bj=function K0d(){return null};_.Ej=function N0d(){return tYd(this.a).i};_.Fj=function O0d(){var a,b,c,d,e,f;f=tYd(this.a).i;e=$C(jJ,rve,1,f,5,1);c=0;for(b=new dMd(tYd(this.a));b.e!=b.i.gc();){a=RD(bMd(b),89);e[c++]=(d=a.c,ZD(d,90)?RD(d,29):(JTd(),zTd))}return e};_.Gj=function P0d(a){var b,c,d,e,f,g,h;h=tYd(this.a).i;if(a.lengthh&&bD(a,h,null);d=0;for(c=new dMd(tYd(this.a));c.e!=c.i.gc();){b=RD(bMd(c),89);f=(g=b.c,ZD(g,90)?RD(g,29):(JTd(),zTd));bD(a,d++,f)}return a};_.Hj=function Q0d(){var a,b,c,d,e;e=new Qhb;e.a+='[';a=tYd(this.a);for(b=0,d=tYd(this.a).i;b>16,e>=0?AXd(this,c):this.Cb.Th(this,-1-e,null,c)));return xvd(this,a,6,c);case 9:return !this.a&&(this.a=new C5d(l7,this,9,5)),qLd(this.a,a,c);}return f=RD(vYd((d=RD(Ywd(this,16),29),!d?(JTd(),sTd):d),b),69),f.wk().zk(this,Wwd(this),b-AYd((JTd(),sTd)),a,c)};_.Uh=function D1d(a,b,c){var d,e;switch(b){case 0:return !this.Ab&&(this.Ab=new C5d(f7,this,0,3)),rLd(this.Ab,a,c);case 6:return xvd(this,null,6,c);case 7:return !this.A&&(this.A=new iie(z7,this,7)),rLd(this.A,a,c);case 9:return !this.a&&(this.a=new C5d(l7,this,9,5)),rLd(this.a,a,c);}return e=RD(vYd((d=RD(Ywd(this,16),29),!d?(JTd(),sTd):d),b),69),e.wk().Ak(this,Wwd(this),b-AYd((JTd(),sTd)),a,c)};_.Wh=function E1d(a){var b;switch(a){case 0:return !!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return this.D!=null&&this.D==this.F;case 3:return !!DXd(this);case 4:return !!y1d(this);case 5:return this.F!=null&&this.F!=this.D&&this.F!=this.B;case 6:return !!xXd(this);case 7:return !!this.A&&this.A.i!=0;case 8:return (this.Bb&256)==0;case 9:return !!this.a&&this.a.i!=0;}return Avd(this,a-AYd((JTd(),sTd)),vYd((b=RD(Ywd(this,16),29),!b?sTd:b),a))};_.bi=function F1d(a,b){var c;switch(a){case 0:!this.Ab&&(this.Ab=new C5d(f7,this,0,3));sLd(this.Ab);!this.Ab&&(this.Ab=new C5d(f7,this,0,3));YGd(this.Ab,RD(b,16));return;case 1:LXd(this,WD(b));return;case 2:IXd(this,WD(b));return;case 5:KXd(this,WD(b));return;case 7:!this.A&&(this.A=new iie(z7,this,7));sLd(this.A);!this.A&&(this.A=new iie(z7,this,7));YGd(this.A,RD(b,16));return;case 8:j1d(this,Heb(TD(b)));return;case 9:!this.a&&(this.a=new C5d(l7,this,9,5));sLd(this.a);!this.a&&(this.a=new C5d(l7,this,9,5));YGd(this.a,RD(b,16));return;}Bvd(this,a-AYd((JTd(),sTd)),vYd((c=RD(Ywd(this,16),29),!c?sTd:c),a),b)};_.ii=function G1d(){return JTd(),sTd};_.ki=function H1d(a){var b;switch(a){case 0:!this.Ab&&(this.Ab=new C5d(f7,this,0,3));sLd(this.Ab);return;case 1:ZD(this.Cb,184)&&(RD(this.Cb,184).tb=null);PAd(this,null);return;case 2:yXd(this,null);zXd(this,this.D);return;case 5:KXd(this,null);return;case 7:!this.A&&(this.A=new iie(z7,this,7));sLd(this.A);return;case 8:j1d(this,true);return;case 9:!this.a&&(this.a=new C5d(l7,this,9,5));sLd(this.a);return;}Cvd(this,a-AYd((JTd(),sTd)),vYd((b=RD(Ywd(this,16),29),!b?sTd:b),a))};_.pi=function I1d(){var a,b;if(this.a){for(a=0,b=this.a.i;a>16==5?RD(this.Cb,685):null;}return zvd(this,a-AYd((JTd(),tTd)),vYd((d=RD(Ywd(this,16),29),!d?tTd:d),a),b,c)};_.Sh=function U1d(a,b,c){var d,e,f;switch(b){case 0:return !this.Ab&&(this.Ab=new C5d(f7,this,0,3)),qLd(this.Ab,a,c);case 5:!!this.Cb&&(c=(e=this.Db>>16,e>=0?M1d(this,c):this.Cb.Th(this,-1-e,null,c)));return xvd(this,a,5,c);}return f=RD(vYd((d=RD(Ywd(this,16),29),!d?(JTd(),tTd):d),b),69),f.wk().zk(this,Wwd(this),b-AYd((JTd(),tTd)),a,c)};_.Uh=function V1d(a,b,c){var d,e;switch(b){case 0:return !this.Ab&&(this.Ab=new C5d(f7,this,0,3)),rLd(this.Ab,a,c);case 5:return xvd(this,null,5,c);}return e=RD(vYd((d=RD(Ywd(this,16),29),!d?(JTd(),tTd):d),b),69),e.wk().Ak(this,Wwd(this),b-AYd((JTd(),tTd)),a,c)};_.Wh=function W1d(a){var b;switch(a){case 0:return !!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return this.d!=0;case 3:return !!this.b;case 4:return this.c!=null;case 5:return !!(this.Db>>16==5?RD(this.Cb,685):null);}return Avd(this,a-AYd((JTd(),tTd)),vYd((b=RD(Ywd(this,16),29),!b?tTd:b),a))};_.bi=function X1d(a,b){var c;switch(a){case 0:!this.Ab&&(this.Ab=new C5d(f7,this,0,3));sLd(this.Ab);!this.Ab&&(this.Ab=new C5d(f7,this,0,3));YGd(this.Ab,RD(b,16));return;case 1:PAd(this,WD(b));return;case 2:Q1d(this,RD(b,17).a);return;case 3:O1d(this,RD(b,2039));return;case 4:P1d(this,WD(b));return;}Bvd(this,a-AYd((JTd(),tTd)),vYd((c=RD(Ywd(this,16),29),!c?tTd:c),a),b)};_.ii=function Y1d(){return JTd(),tTd};_.ki=function Z1d(a){var b;switch(a){case 0:!this.Ab&&(this.Ab=new C5d(f7,this,0,3));sLd(this.Ab);return;case 1:PAd(this,null);return;case 2:Q1d(this,0);return;case 3:O1d(this,null);return;case 4:P1d(this,null);return;}Cvd(this,a-AYd((JTd(),tTd)),vYd((b=RD(Ywd(this,16),29),!b?tTd:b),a))};_.Ib=function _1d(){var a;return a=this.c,a==null?this.zb:a};_.b=null;_.c=null;_.d=0;var f8=sfb(SHe,'EEnumLiteralImpl',582);var h8=ufb(SHe,'EFactoryImpl/InternalEDateTimeFormat');feb(499,1,{2114:1},c2d);var g8=sfb(SHe,'EFactoryImpl/1ClientInternalEDateTimeFormat',499);feb(248,120,{110:1,94:1,93:1,89:1,58:1,114:1,54:1,99:1,248:1,119:1,120:1},s2d);_.Ch=function t2d(a,b,c){var d;c=xvd(this,a,b,c);if(!!this.e&&ZD(a,179)){d=k2d(this,this.e);d!=this.c&&(c=o2d(this,d,c))}return c};_.Lh=function u2d(a,b,c){var d;switch(a){case 0:return this.f;case 1:return !this.d&&(this.d=new XZd(o7,this,1)),this.d;case 2:if(b)return i2d(this);return this.c;case 3:return this.b;case 4:return this.e;case 5:if(b)return h2d(this);return this.a;}return zvd(this,a-AYd((JTd(),vTd)),vYd((d=RD(Ywd(this,16),29),!d?vTd:d),a),b,c)};_.Uh=function v2d(a,b,c){var d,e;switch(b){case 0:return g2d(this,null,c);case 1:return !this.d&&(this.d=new XZd(o7,this,1)),rLd(this.d,a,c);case 3:return e2d(this,null,c);}return e=RD(vYd((d=RD(Ywd(this,16),29),!d?(JTd(),vTd):d),b),69),e.wk().Ak(this,Wwd(this),b-AYd((JTd(),vTd)),a,c)};_.Wh=function w2d(a){var b;switch(a){case 0:return !!this.f;case 1:return !!this.d&&this.d.i!=0;case 2:return !!this.c;case 3:return !!this.b;case 4:return !!this.e;case 5:return !!this.a;}return Avd(this,a-AYd((JTd(),vTd)),vYd((b=RD(Ywd(this,16),29),!b?vTd:b),a))};_.bi=function x2d(a,b){var c;switch(a){case 0:q2d(this,RD(b,89));return;case 1:!this.d&&(this.d=new XZd(o7,this,1));sLd(this.d);!this.d&&(this.d=new XZd(o7,this,1));YGd(this.d,RD(b,16));return;case 3:n2d(this,RD(b,89));return;case 4:p2d(this,RD(b,850));return;case 5:l2d(this,RD(b,142));return;}Bvd(this,a-AYd((JTd(),vTd)),vYd((c=RD(Ywd(this,16),29),!c?vTd:c),a),b)};_.ii=function y2d(){return JTd(),vTd};_.ki=function z2d(a){var b;switch(a){case 0:q2d(this,null);return;case 1:!this.d&&(this.d=new XZd(o7,this,1));sLd(this.d);return;case 3:n2d(this,null);return;case 4:p2d(this,null);return;case 5:l2d(this,null);return;}Cvd(this,a-AYd((JTd(),vTd)),vYd((b=RD(Ywd(this,16),29),!b?vTd:b),a))};_.Ib=function A2d(){var a;a=new dib(awd(this));a.a+=' (expression: ';r2d(this,a);a.a+=')';return a.a};var d2d;var j8=sfb(SHe,'EGenericTypeImpl',248);feb(2067,2062,uKe);_.Gi=function C2d(a,b){B2d(this,a,b)};_.Wk=function D2d(a,b){B2d(this,this.gc(),a);return b};_.$i=function E2d(a){return ju(this.pj(),a)};_.Ii=function F2d(){return this.Ji()};_.pj=function G2d(){return new mee(this)};_.Ji=function H2d(){return this.Ki(0)};_.Ki=function I2d(a){return this.pj().fd(a)};_.Xk=function J2d(a,b){ze(this,a,true);return b};_.Ti=function K2d(a,b){var c,d;d=ku(this,b);c=this.fd(a);c.Rb(d);return d};_.Ui=function L2d(a,b){var c;ze(this,b,true);c=this.fd(a);c.Rb(b)};var Gab=sfb(ZJe,'AbstractSequentialInternalEList',2067);feb(496,2067,uKe,Q2d);_.$i=function R2d(a){return ju(this.pj(),a)};_.Ii=function S2d(){if(this.b==null){return j3d(),j3d(),i3d}return this.sl()};_.pj=function T2d(){return new Whe(this.a,this.b)};_.Ji=function U2d(){if(this.b==null){return j3d(),j3d(),i3d}return this.sl()};_.Ki=function V2d(a){var b,c;if(this.b==null){if(a<0||a>1){throw Adb(new veb(HJe+a+', size=0'))}return j3d(),j3d(),i3d}c=this.sl();for(b=0;b0){b=this.c[--this.d];if((!this.e||b.pk()!=C4||b.Lj()!=0)&&(!this.vl()||this.b.Xh(b))){f=this.b.Nh(b,this.ul());this.f=(nke(),RD(b,69).xk());if(this.f||b.Jk()){if(this.ul()){d=RD(f,15);this.k=d}else{d=RD(f,71);this.k=this.j=d}if(ZD(this.k,59)){this.o=this.k.gc();this.n=this.o}else{this.p=!this.j?this.k.fd(this.k.gc()):this.j.Ki(this.k.gc())}if(!this.p?n3d(this):o3d(this,this.p)){e=!this.p?!this.j?this.k.Xb(--this.n):this.j.$i(--this.n):this.p.Ub();if(this.f){a=RD(e,76);a.Lk();c=a.md();this.i=c}else{c=e;this.i=c}this.g=-3;return true}}else if(f!=null){this.k=null;this.p=null;c=f;this.i=c;this.g=-2;return true}}}this.k=null;this.p=null;this.g=-1;return false}else{e=!this.p?!this.j?this.k.Xb(--this.n):this.j.$i(--this.n):this.p.Ub();if(this.f){a=RD(e,76);a.Lk();c=a.md();this.i=c}else{c=e;this.i=c}this.g=-3;return true}}}};_.Pb=function v3d(){return k3d(this)};_.Tb=function w3d(){return this.a};_.Ub=function x3d(){var a;if(this.g<-1||this.Sb()){--this.a;this.g=0;a=this.i;this.Sb();return a}else{throw Adb(new Dvb)}};_.Vb=function y3d(){return this.a-1};_.Qb=function z3d(){throw Adb(new jib)};_.ul=function A3d(){return false};_.Wb=function B3d(a){throw Adb(new jib)};_.vl=function C3d(){return true};_.a=0;_.d=0;_.f=false;_.g=0;_.n=0;_.o=0;var i3d;var Uab=sfb(ZJe,'EContentsEList/FeatureIteratorImpl',287);feb(711,287,vKe,D3d);_.ul=function E3d(){return true};var Vab=sfb(ZJe,'EContentsEList/ResolvingFeatureIteratorImpl',711);feb(1178,711,vKe,F3d);_.vl=function G3d(){return false};var l8=sfb(SHe,'ENamedElementImpl/1/1',1178);feb(1179,287,vKe,H3d);_.vl=function I3d(){return false};var m8=sfb(SHe,'ENamedElementImpl/1/2',1179);feb(39,152,GJe,L3d,M3d,N3d,O3d,P3d,Q3d,R3d,S3d,T3d,U3d,V3d,W3d,X3d,Y3d,Z3d,$3d,_3d,a4d,b4d,c4d,d4d,e4d,f4d,g4d,h4d);_.Kj=function i4d(){return K3d(this)};_.Rj=function j4d(){var a;a=K3d(this);if(a){return a.ik()}return null};_.hj=function k4d(a){this.b==-1&&!!this.a&&(this.b=this.c.Hh(this.a.Lj(),this.a.pk()));return this.c.yh(this.b,a)};_.jj=function l4d(){return this.c};_.Sj=function m4d(){var a;a=K3d(this);if(a){return a.tk()}return false};_.b=-1;var p8=sfb(SHe,'ENotificationImpl',39);feb(411,292,{110:1,94:1,93:1,155:1,197:1,58:1,62:1,114:1,481:1,54:1,99:1,158:1,411:1,292:1,119:1,120:1},q4d);_.Ah=function r4d(a){return n4d(this,a)};_.Lh=function s4d(a,b,c){var d,e,f;switch(a){case 0:return !this.Ab&&(this.Ab=new C5d(f7,this,0,3)),this.Ab;case 1:return this.zb;case 2:return Geb(),(this.Bb&256)!=0?true:false;case 3:return Geb(),(this.Bb&512)!=0?true:false;case 4:return sgb(this.s);case 5:return sgb(this.t);case 6:return Geb(),f=this.t,f>1||f==-1?true:false;case 7:return Geb(),e=this.s,e>=1?true:false;case 8:if(b)return WVd(this);return this.r;case 9:return this.q;case 10:return this.Db>>16==10?RD(this.Cb,29):null;case 11:return !this.d&&(this.d=new iie(z7,this,11)),this.d;case 12:return !this.c&&(this.c=new C5d(u7,this,12,10)),this.c;case 13:return !this.a&&(this.a=new F4d(this,this)),this.a;case 14:return o4d(this);}return zvd(this,a-AYd((JTd(),ATd)),vYd((d=RD(Ywd(this,16),29),!d?ATd:d),a),b,c)};_.Sh=function t4d(a,b,c){var d,e,f;switch(b){case 0:return !this.Ab&&(this.Ab=new C5d(f7,this,0,3)),qLd(this.Ab,a,c);case 10:!!this.Cb&&(c=(e=this.Db>>16,e>=0?n4d(this,c):this.Cb.Th(this,-1-e,null,c)));return xvd(this,a,10,c);case 12:return !this.c&&(this.c=new C5d(u7,this,12,10)),qLd(this.c,a,c);}return f=RD(vYd((d=RD(Ywd(this,16),29),!d?(JTd(),ATd):d),b),69),f.wk().zk(this,Wwd(this),b-AYd((JTd(),ATd)),a,c)};_.Uh=function u4d(a,b,c){var d,e;switch(b){case 0:return !this.Ab&&(this.Ab=new C5d(f7,this,0,3)),rLd(this.Ab,a,c);case 9:return VVd(this,c);case 10:return xvd(this,null,10,c);case 11:return !this.d&&(this.d=new iie(z7,this,11)),rLd(this.d,a,c);case 12:return !this.c&&(this.c=new C5d(u7,this,12,10)),rLd(this.c,a,c);case 14:return rLd(o4d(this),a,c);}return e=RD(vYd((d=RD(Ywd(this,16),29),!d?(JTd(),ATd):d),b),69),e.wk().Ak(this,Wwd(this),b-AYd((JTd(),ATd)),a,c)};_.Wh=function v4d(a){var b,c,d;switch(a){case 0:return !!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return (this.Bb&256)==0;case 3:return (this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return d=this.t,d>1||d==-1;case 7:return c=this.s,c>=1;case 8:return !!this.r&&!this.q.e&&j2d(this.q).i==0;case 9:return !!this.q&&!(!!this.r&&!this.q.e&&j2d(this.q).i==0);case 10:return !!(this.Db>>16==10?RD(this.Cb,29):null);case 11:return !!this.d&&this.d.i!=0;case 12:return !!this.c&&this.c.i!=0;case 13:return !!this.a&&o4d(this.a.a).i!=0&&!(!!this.b&&o5d(this.b));case 14:return !!this.b&&o5d(this.b);}return Avd(this,a-AYd((JTd(),ATd)),vYd((b=RD(Ywd(this,16),29),!b?ATd:b),a))};_.bi=function w4d(a,b){var c,d;switch(a){case 0:!this.Ab&&(this.Ab=new C5d(f7,this,0,3));sLd(this.Ab);!this.Ab&&(this.Ab=new C5d(f7,this,0,3));YGd(this.Ab,RD(b,16));return;case 1:PAd(this,WD(b));return;case 2:_Vd(this,Heb(TD(b)));return;case 3:aWd(this,Heb(TD(b)));return;case 4:$Vd(this,RD(b,17).a);return;case 5:bWd(this,RD(b,17).a);return;case 8:YVd(this,RD(b,142));return;case 9:d=XVd(this,RD(b,89),null);!!d&&d.oj();return;case 11:!this.d&&(this.d=new iie(z7,this,11));sLd(this.d);!this.d&&(this.d=new iie(z7,this,11));YGd(this.d,RD(b,16));return;case 12:!this.c&&(this.c=new C5d(u7,this,12,10));sLd(this.c);!this.c&&(this.c=new C5d(u7,this,12,10));YGd(this.c,RD(b,16));return;case 13:!this.a&&(this.a=new F4d(this,this));VJd(this.a);!this.a&&(this.a=new F4d(this,this));YGd(this.a,RD(b,16));return;case 14:sLd(o4d(this));YGd(o4d(this),RD(b,16));return;}Bvd(this,a-AYd((JTd(),ATd)),vYd((c=RD(Ywd(this,16),29),!c?ATd:c),a),b)};_.ii=function x4d(){return JTd(),ATd};_.ki=function y4d(a){var b,c;switch(a){case 0:!this.Ab&&(this.Ab=new C5d(f7,this,0,3));sLd(this.Ab);return;case 1:PAd(this,null);return;case 2:_Vd(this,true);return;case 3:aWd(this,true);return;case 4:$Vd(this,0);return;case 5:bWd(this,1);return;case 8:YVd(this,null);return;case 9:c=XVd(this,null,null);!!c&&c.oj();return;case 11:!this.d&&(this.d=new iie(z7,this,11));sLd(this.d);return;case 12:!this.c&&(this.c=new C5d(u7,this,12,10));sLd(this.c);return;case 13:!!this.a&&VJd(this.a);return;case 14:!!this.b&&sLd(this.b);return;}Cvd(this,a-AYd((JTd(),ATd)),vYd((b=RD(Ywd(this,16),29),!b?ATd:b),a))};_.pi=function z4d(){var a,b;if(this.c){for(a=0,b=this.c.i;ah&&bD(a,h,null);d=0;for(c=new dMd(o4d(this.a));c.e!=c.i.gc();){b=RD(bMd(c),89);f=(g=b.c,g?g:(JTd(),wTd));bD(a,d++,f)}return a};_.Hj=function Z4d(){var a,b,c,d,e;e=new Qhb;e.a+='[';a=o4d(this.a);for(b=0,d=o4d(this.a).i;b1)}case 5:{return dZd(this,a,b,c,d,this.i-RD(c,15).gc()>0)}default:{return new P3d(this.e,a,this.c,b,c,d,true)}}};_.Tj=function u5d(){return true};_.Qj=function v5d(){return o5d(this)};_.Gk=function A5d(){sLd(this)};var t8=sfb(SHe,'EOperationImpl/2',1377);feb(507,1,{2037:1,507:1},B5d);var v8=sfb(SHe,'EPackageImpl/1',507);feb(14,83,oKe,C5d);_.il=function D5d(){return this.d};_.jl=function E5d(){return this.b};_.ml=function F5d(){return true};_.b=0;var gbb=sfb(ZJe,'EObjectContainmentWithInverseEList',14);feb(365,14,oKe,G5d);_.nl=function H5d(){return true};_.Wi=function I5d(a,b){return gZd(this,a,RD(b,58))};var dbb=sfb(ZJe,'EObjectContainmentWithInverseEList/Resolving',365);feb(308,365,oKe,J5d);_.Ni=function K5d(){this.a.tb=null};var w8=sfb(SHe,'EPackageImpl/2',308);feb(1278,1,{},L5d);var x8=sfb(SHe,'EPackageImpl/3',1278);feb(733,45,Hxe,O5d);_._b=function P5d(a){return bE(a)?Yjb(this,a):!!qtb(this.f,a)};var z8=sfb(SHe,'EPackageRegistryImpl',733);feb(518,292,{110:1,94:1,93:1,155:1,197:1,58:1,2116:1,114:1,481:1,54:1,99:1,158:1,518:1,292:1,119:1,120:1},R5d);_.Ah=function S5d(a){return Q5d(this,a)};_.Lh=function T5d(a,b,c){var d,e,f;switch(a){case 0:return !this.Ab&&(this.Ab=new C5d(f7,this,0,3)),this.Ab;case 1:return this.zb;case 2:return Geb(),(this.Bb&256)!=0?true:false;case 3:return Geb(),(this.Bb&512)!=0?true:false;case 4:return sgb(this.s);case 5:return sgb(this.t);case 6:return Geb(),f=this.t,f>1||f==-1?true:false;case 7:return Geb(),e=this.s,e>=1?true:false;case 8:if(b)return WVd(this);return this.r;case 9:return this.q;case 10:return this.Db>>16==10?RD(this.Cb,62):null;}return zvd(this,a-AYd((JTd(),DTd)),vYd((d=RD(Ywd(this,16),29),!d?DTd:d),a),b,c)};_.Sh=function U5d(a,b,c){var d,e,f;switch(b){case 0:return !this.Ab&&(this.Ab=new C5d(f7,this,0,3)),qLd(this.Ab,a,c);case 10:!!this.Cb&&(c=(e=this.Db>>16,e>=0?Q5d(this,c):this.Cb.Th(this,-1-e,null,c)));return xvd(this,a,10,c);}return f=RD(vYd((d=RD(Ywd(this,16),29),!d?(JTd(),DTd):d),b),69),f.wk().zk(this,Wwd(this),b-AYd((JTd(),DTd)),a,c)};_.Uh=function V5d(a,b,c){var d,e;switch(b){case 0:return !this.Ab&&(this.Ab=new C5d(f7,this,0,3)),rLd(this.Ab,a,c);case 9:return VVd(this,c);case 10:return xvd(this,null,10,c);}return e=RD(vYd((d=RD(Ywd(this,16),29),!d?(JTd(),DTd):d),b),69),e.wk().Ak(this,Wwd(this),b-AYd((JTd(),DTd)),a,c)};_.Wh=function W5d(a){var b,c,d;switch(a){case 0:return !!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return (this.Bb&256)==0;case 3:return (this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return d=this.t,d>1||d==-1;case 7:return c=this.s,c>=1;case 8:return !!this.r&&!this.q.e&&j2d(this.q).i==0;case 9:return !!this.q&&!(!!this.r&&!this.q.e&&j2d(this.q).i==0);case 10:return !!(this.Db>>16==10?RD(this.Cb,62):null);}return Avd(this,a-AYd((JTd(),DTd)),vYd((b=RD(Ywd(this,16),29),!b?DTd:b),a))};_.ii=function X5d(){return JTd(),DTd};var A8=sfb(SHe,'EParameterImpl',518);feb(102,462,{110:1,94:1,93:1,155:1,197:1,58:1,19:1,179:1,69:1,114:1,481:1,54:1,99:1,158:1,102:1,462:1,292:1,119:1,120:1,692:1},d6d);_.Lh=function e6d(a,b,c){var d,e,f,g;switch(a){case 0:return !this.Ab&&(this.Ab=new C5d(f7,this,0,3)),this.Ab;case 1:return this.zb;case 2:return Geb(),(this.Bb&256)!=0?true:false;case 3:return Geb(),(this.Bb&512)!=0?true:false;case 4:return sgb(this.s);case 5:return sgb(this.t);case 6:return Geb(),g=this.t,g>1||g==-1?true:false;case 7:return Geb(),e=this.s,e>=1?true:false;case 8:if(b)return WVd(this);return this.r;case 9:return this.q;case 10:return Geb(),(this.Bb&gwe)!=0?true:false;case 11:return Geb(),(this.Bb&cKe)!=0?true:false;case 12:return Geb(),(this.Bb&qxe)!=0?true:false;case 13:return this.j;case 14:return tWd(this);case 15:return Geb(),(this.Bb&bKe)!=0?true:false;case 16:return Geb(),(this.Bb&Ove)!=0?true:false;case 17:return uWd(this);case 18:return Geb(),(this.Bb&QHe)!=0?true:false;case 19:return Geb(),f=Z5d(this),!!f&&(f.Bb&QHe)!=0?true:false;case 20:return Geb(),(this.Bb&txe)!=0?true:false;case 21:if(b)return Z5d(this);return this.b;case 22:if(b)return $5d(this);return Y5d(this);case 23:return !this.a&&(this.a=new zie(g7,this,23)),this.a;}return zvd(this,a-AYd((JTd(),ETd)),vYd((d=RD(Ywd(this,16),29),!d?ETd:d),a),b,c)};_.Wh=function f6d(a){var b,c,d,e;switch(a){case 0:return !!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return (this.Bb&256)==0;case 3:return (this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return e=this.t,e>1||e==-1;case 7:return c=this.s,c>=1;case 8:return !!this.r&&!this.q.e&&j2d(this.q).i==0;case 9:return !!this.q&&!(!!this.r&&!this.q.e&&j2d(this.q).i==0);case 10:return (this.Bb&gwe)==0;case 11:return (this.Bb&cKe)!=0;case 12:return (this.Bb&qxe)!=0;case 13:return this.j!=null;case 14:return tWd(this)!=null;case 15:return (this.Bb&bKe)!=0;case 16:return (this.Bb&Ove)!=0;case 17:return !!uWd(this);case 18:return (this.Bb&QHe)!=0;case 19:return d=Z5d(this),!!d&&(d.Bb&QHe)!=0;case 20:return (this.Bb&txe)==0;case 21:return !!this.b;case 22:return !!Y5d(this);case 23:return !!this.a&&this.a.i!=0;}return Avd(this,a-AYd((JTd(),ETd)),vYd((b=RD(Ywd(this,16),29),!b?ETd:b),a))};_.bi=function g6d(a,b){var c,d;switch(a){case 0:!this.Ab&&(this.Ab=new C5d(f7,this,0,3));sLd(this.Ab);!this.Ab&&(this.Ab=new C5d(f7,this,0,3));YGd(this.Ab,RD(b,16));return;case 1:CWd(this,WD(b));return;case 2:_Vd(this,Heb(TD(b)));return;case 3:aWd(this,Heb(TD(b)));return;case 4:$Vd(this,RD(b,17).a);return;case 5:bWd(this,RD(b,17).a);return;case 8:YVd(this,RD(b,142));return;case 9:d=XVd(this,RD(b,89),null);!!d&&d.oj();return;case 10:xWd(this,Heb(TD(b)));return;case 11:FWd(this,Heb(TD(b)));return;case 12:DWd(this,Heb(TD(b)));return;case 13:yWd(this,WD(b));return;case 15:EWd(this,Heb(TD(b)));return;case 16:AWd(this,Heb(TD(b)));return;case 18:_5d(this,Heb(TD(b)));return;case 20:c6d(this,Heb(TD(b)));return;case 21:b6d(this,RD(b,19));return;case 23:!this.a&&(this.a=new zie(g7,this,23));sLd(this.a);!this.a&&(this.a=new zie(g7,this,23));YGd(this.a,RD(b,16));return;}Bvd(this,a-AYd((JTd(),ETd)),vYd((c=RD(Ywd(this,16),29),!c?ETd:c),a),b)};_.ii=function h6d(){return JTd(),ETd};_.ki=function i6d(a){var b,c;switch(a){case 0:!this.Ab&&(this.Ab=new C5d(f7,this,0,3));sLd(this.Ab);return;case 1:ZD(this.Cb,90)&&v$d(yYd(RD(this.Cb,90)),4);PAd(this,null);return;case 2:_Vd(this,true);return;case 3:aWd(this,true);return;case 4:$Vd(this,0);return;case 5:bWd(this,1);return;case 8:YVd(this,null);return;case 9:c=XVd(this,null,null);!!c&&c.oj();return;case 10:xWd(this,true);return;case 11:FWd(this,false);return;case 12:DWd(this,false);return;case 13:this.i=null;zWd(this,null);return;case 15:EWd(this,false);return;case 16:AWd(this,false);return;case 18:a6d(this,false);ZD(this.Cb,90)&&v$d(yYd(RD(this.Cb,90)),2);return;case 20:c6d(this,true);return;case 21:b6d(this,null);return;case 23:!this.a&&(this.a=new zie(g7,this,23));sLd(this.a);return;}Cvd(this,a-AYd((JTd(),ETd)),vYd((b=RD(Ywd(this,16),29),!b?ETd:b),a))};_.pi=function j6d(){$5d(this);Afe(Qee((lke(),jke),this));WVd(this);this.Bb|=1};_.uk=function k6d(){return Z5d(this)};_._k=function l6d(){var a;return a=Z5d(this),!!a&&(a.Bb&QHe)!=0};_.al=function m6d(){return (this.Bb&QHe)!=0};_.bl=function n6d(){return (this.Bb&txe)!=0};_.Yk=function o6d(a,b){this.c=null;return ZVd(this,a,b)};_.Ib=function p6d(){var a;if((this.Db&64)!=0)return GWd(this);a=new Shb(GWd(this));a.a+=' (containment: ';Ohb(a,(this.Bb&QHe)!=0);a.a+=', resolveProxies: ';Ohb(a,(this.Bb&txe)!=0);a.a+=')';return a.a};var B8=sfb(SHe,'EReferenceImpl',102);feb(561,120,{110:1,44:1,94:1,93:1,136:1,58:1,114:1,54:1,99:1,561:1,119:1,120:1},v6d);_.Fb=function B6d(a){return this===a};_.ld=function D6d(){return this.b};_.md=function E6d(){return this.c};_.Hb=function F6d(){return kFb(this)};_.Di=function H6d(a){q6d(this,WD(a))};_.nd=function I6d(a){return u6d(this,WD(a))};_.Lh=function w6d(a,b,c){var d;switch(a){case 0:return this.b;case 1:return this.c;}return zvd(this,a-AYd((JTd(),FTd)),vYd((d=RD(Ywd(this,16),29),!d?FTd:d),a),b,c)};_.Wh=function x6d(a){var b;switch(a){case 0:return this.b!=null;case 1:return this.c!=null;}return Avd(this,a-AYd((JTd(),FTd)),vYd((b=RD(Ywd(this,16),29),!b?FTd:b),a))};_.bi=function y6d(a,b){var c;switch(a){case 0:r6d(this,WD(b));return;case 1:t6d(this,WD(b));return;}Bvd(this,a-AYd((JTd(),FTd)),vYd((c=RD(Ywd(this,16),29),!c?FTd:c),a),b)};_.ii=function z6d(){return JTd(),FTd};_.ki=function A6d(a){var b;switch(a){case 0:s6d(this,null);return;case 1:t6d(this,null);return;}Cvd(this,a-AYd((JTd(),FTd)),vYd((b=RD(Ywd(this,16),29),!b?FTd:b),a))};_.Bi=function C6d(){var a;if(this.a==-1){a=this.b;this.a=a==null?0:ohb(a)}return this.a};_.Ci=function G6d(a){this.a=a};_.Ib=function J6d(){var a;if((this.Db&64)!=0)return awd(this);a=new Shb(awd(this));a.a+=' (key: ';Nhb(a,this.b);a.a+=', value: ';Nhb(a,this.c);a.a+=')';return a.a};_.a=-1;_.b=null;_.c=null;var C8=sfb(SHe,'EStringToStringMapEntryImpl',561);var Ibb=ufb(ZJe,'FeatureMap/Entry/Internal');feb(576,1,wKe);_.xl=function M6d(a){return this.yl(RD(a,54))};_.yl=function N6d(a){return this.xl(a)};_.Fb=function O6d(a){var b,c;if(this===a){return true}else if(ZD(a,76)){b=RD(a,76);if(b.Lk()==this.c){c=this.md();return c==null?b.md()==null:pb(c,b.md())}else{return false}}else{return false}};_.Lk=function P6d(){return this.c};_.Hb=function Q6d(){var a;a=this.md();return tb(this.c)^(a==null?0:tb(a))};_.Ib=function R6d(){var a,b;a=this.c;b=BXd(a.qk()).yi();a.xe();return (b!=null&&b.length!=0?b+':'+a.xe():a.xe())+'='+this.md()};var D8=sfb(SHe,'EStructuralFeatureImpl/BasicFeatureMapEntry',576);feb(791,576,wKe,U6d);_.yl=function V6d(a){return new U6d(this.c,a)};_.md=function W6d(){return this.a};_.zl=function X6d(a,b,c){return S6d(this,a,this.a,b,c)};_.Al=function Y6d(a,b,c){return T6d(this,a,this.a,b,c)};var E8=sfb(SHe,'EStructuralFeatureImpl/ContainmentUpdatingFeatureMapEntry',791);feb(1350,1,{},Z6d);_.yk=function $6d(a,b,c,d,e){var f;f=RD(Evd(a,this.b),220);return f.Yl(this.a).Fk(d)};_.zk=function _6d(a,b,c,d,e){var f;f=RD(Evd(a,this.b),220);return f.Pl(this.a,d,e)};_.Ak=function a7d(a,b,c,d,e){var f;f=RD(Evd(a,this.b),220);return f.Ql(this.a,d,e)};_.Bk=function b7d(a,b,c){var d;d=RD(Evd(a,this.b),220);return d.Yl(this.a).Qj()};_.Ck=function c7d(a,b,c,d){var e;e=RD(Evd(a,this.b),220);e.Yl(this.a).Wb(d)};_.Dk=function d7d(a,b,c){return RD(Evd(a,this.b),220).Yl(this.a)};_.Ek=function e7d(a,b,c){var d;d=RD(Evd(a,this.b),220);d.Yl(this.a).Gk()};var F8=sfb(SHe,'EStructuralFeatureImpl/InternalSettingDelegateFeatureMapDelegator',1350);feb(91,1,{},g7d,h7d,i7d,j7d);_.yk=function k7d(a,b,c,d,e){var f;f=b.li(c);f==null&&b.mi(c,f=f7d(this,a));if(!e){switch(this.e){case 50:case 41:return RD(f,597).bk();case 40:return RD(f,220).Vl();}}return f};_.zk=function l7d(a,b,c,d,e){var f,g;g=b.li(c);g==null&&b.mi(c,g=f7d(this,a));f=RD(g,71).Wk(d,e);return f};_.Ak=function m7d(a,b,c,d,e){var f;f=b.li(c);f!=null&&(e=RD(f,71).Xk(d,e));return e};_.Bk=function n7d(a,b,c){var d;d=b.li(c);return d!=null&&RD(d,79).Qj()};_.Ck=function o7d(a,b,c,d){var e;e=RD(b.li(c),79);!e&&b.mi(c,e=f7d(this,a));e.Wb(d)};_.Dk=function p7d(a,b,c){var d,e;e=b.li(c);e==null&&b.mi(c,e=f7d(this,a));if(ZD(e,79)){return RD(e,79)}else{d=RD(b.li(c),15);return new I9d(d)}};_.Ek=function q7d(a,b,c){var d;d=RD(b.li(c),79);!d&&b.mi(c,d=f7d(this,a));d.Gk()};_.b=0;_.e=0;var G8=sfb(SHe,'EStructuralFeatureImpl/InternalSettingDelegateMany',91);feb(512,1,{});_.zk=function u7d(a,b,c,d,e){throw Adb(new jib)};_.Ak=function v7d(a,b,c,d,e){throw Adb(new jib)};_.Dk=function w7d(a,b,c){return new x7d(this,a,b,c)};var r7d;var n9=sfb(SHe,'EStructuralFeatureImpl/InternalSettingDelegateSingle',512);feb(1367,1,$Je,x7d);_.Fk=function y7d(a){return this.a.yk(this.c,this.d,this.b,a,true)};_.Qj=function z7d(){return this.a.Bk(this.c,this.d,this.b)};_.Wb=function A7d(a){this.a.Ck(this.c,this.d,this.b,a)};_.Gk=function B7d(){this.a.Ek(this.c,this.d,this.b)};_.b=0;var H8=sfb(SHe,'EStructuralFeatureImpl/InternalSettingDelegateSingle/1',1367);feb(784,512,{},C7d);_.yk=function D7d(a,b,c,d,e){return jwd(a,a.Ph(),a.Fh())==this.b?this.bl()&&d?yvd(a):a.Ph():null};_.zk=function E7d(a,b,c,d,e){var f,g;!!a.Ph()&&(e=(f=a.Fh(),f>=0?a.Ah(e):a.Ph().Th(a,-1-f,null,e)));g=BYd(a.Dh(),this.e);return a.Ch(d,g,e)};_.Ak=function F7d(a,b,c,d,e){var f;f=BYd(a.Dh(),this.e);return a.Ch(null,f,e)};_.Bk=function G7d(a,b,c){var d;d=BYd(a.Dh(),this.e);return !!a.Ph()&&a.Fh()==d};_.Ck=function H7d(a,b,c,d){var e,f,g,h,i;if(d!=null&&!FXd(this.a,d)){throw Adb(new Ifb(xKe+(ZD(d,58)?GYd(RD(d,58).Dh()):ofb(rb(d)))+yKe+this.a+"'"))}e=a.Ph();g=BYd(a.Dh(),this.e);if(dE(d)!==dE(e)||a.Fh()!=g&&d!=null){if(Oje(a,RD(d,58)))throw Adb(new agb(UHe+a.Ib()));i=null;!!e&&(i=(f=a.Fh(),f>=0?a.Ah(i):a.Ph().Th(a,-1-f,null,i)));h=RD(d,54);!!h&&(i=h.Rh(a,BYd(h.Dh(),this.b),null,i));i=a.Ch(h,g,i);!!i&&i.oj()}else{a.vh()&&a.wh()&&qvd(a,new N3d(a,1,g,d,d))}};_.Ek=function I7d(a,b,c){var d,e,f,g;d=a.Ph();if(d){g=(e=a.Fh(),e>=0?a.Ah(null):a.Ph().Th(a,-1-e,null,null));f=BYd(a.Dh(),this.e);g=a.Ch(null,f,g);!!g&&g.oj()}else{a.vh()&&a.wh()&&qvd(a,new b4d(a,1,this.e,null,null))}};_.bl=function J7d(){return false};var J8=sfb(SHe,'EStructuralFeatureImpl/InternalSettingDelegateSingleContainer',784);feb(1351,784,{},K7d);_.bl=function L7d(){return true};var I8=sfb(SHe,'EStructuralFeatureImpl/InternalSettingDelegateSingleContainerResolving',1351);feb(574,512,{});_.yk=function O7d(a,b,c,d,e){var f;return f=b.li(c),f==null?this.b:dE(f)===dE(r7d)?null:f};_.Bk=function P7d(a,b,c){var d;d=b.li(c);return d!=null&&(dE(d)===dE(r7d)||!pb(d,this.b))};_.Ck=function Q7d(a,b,c,d){var e,f;if(a.vh()&&a.wh()){e=(f=b.li(c),f==null?this.b:dE(f)===dE(r7d)?null:f);if(d==null){if(this.c!=null){b.mi(c,null);d=this.b}else this.b!=null?b.mi(c,r7d):b.mi(c,null)}else{this.Bl(d);b.mi(c,d)}qvd(a,this.d.Cl(a,1,this.e,e,d))}else{if(d==null){this.c!=null?b.mi(c,null):this.b!=null?b.mi(c,r7d):b.mi(c,null)}else{this.Bl(d);b.mi(c,d)}}};_.Ek=function R7d(a,b,c){var d,e;if(a.vh()&&a.wh()){d=(e=b.li(c),e==null?this.b:dE(e)===dE(r7d)?null:e);b.ni(c);qvd(a,this.d.Cl(a,1,this.e,d,this.b))}else{b.ni(c)}};_.Bl=function S7d(a){throw Adb(new Hfb)};var Y8=sfb(SHe,'EStructuralFeatureImpl/InternalSettingDelegateSingleData',574);feb(zKe,1,{},b8d);_.Cl=function c8d(a,b,c,d,e){return new b4d(a,b,c,d,e)};_.Dl=function d8d(a,b,c,d,e,f){return new d4d(a,b,c,d,e,f)};var T7d,U7d,V7d,W7d,X7d,Y7d,Z7d,$7d,_7d;var S8=sfb(SHe,'EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator',zKe);feb(1368,zKe,{},e8d);_.Cl=function f8d(a,b,c,d,e){return new g4d(a,b,c,Heb(TD(d)),Heb(TD(e)))};_.Dl=function g8d(a,b,c,d,e,f){return new h4d(a,b,c,Heb(TD(d)),Heb(TD(e)),f)};var K8=sfb(SHe,'EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/1',1368);feb(1369,zKe,{},h8d);_.Cl=function i8d(a,b,c,d,e){return new R3d(a,b,c,RD(d,222).a,RD(e,222).a)};_.Dl=function j8d(a,b,c,d,e,f){return new S3d(a,b,c,RD(d,222).a,RD(e,222).a,f)};var L8=sfb(SHe,'EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/2',1369);feb(1370,zKe,{},k8d);_.Cl=function l8d(a,b,c,d,e){return new T3d(a,b,c,RD(d,180).a,RD(e,180).a)};_.Dl=function m8d(a,b,c,d,e,f){return new U3d(a,b,c,RD(d,180).a,RD(e,180).a,f)};var M8=sfb(SHe,'EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/3',1370);feb(1371,zKe,{},n8d);_.Cl=function o8d(a,b,c,d,e){return new V3d(a,b,c,Kfb(UD(d)),Kfb(UD(e)))};_.Dl=function p8d(a,b,c,d,e,f){return new W3d(a,b,c,Kfb(UD(d)),Kfb(UD(e)),f)};var N8=sfb(SHe,'EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/4',1371);feb(1372,zKe,{},q8d);_.Cl=function r8d(a,b,c,d,e){return new X3d(a,b,c,RD(d,161).a,RD(e,161).a)};_.Dl=function s8d(a,b,c,d,e,f){return new Y3d(a,b,c,RD(d,161).a,RD(e,161).a,f)};var O8=sfb(SHe,'EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/5',1372);feb(1373,zKe,{},t8d);_.Cl=function u8d(a,b,c,d,e){return new Z3d(a,b,c,RD(d,17).a,RD(e,17).a)};_.Dl=function v8d(a,b,c,d,e,f){return new $3d(a,b,c,RD(d,17).a,RD(e,17).a,f)};var P8=sfb(SHe,'EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/6',1373);feb(1374,zKe,{},w8d);_.Cl=function x8d(a,b,c,d,e){return new _3d(a,b,c,RD(d,168).a,RD(e,168).a)};_.Dl=function y8d(a,b,c,d,e,f){return new a4d(a,b,c,RD(d,168).a,RD(e,168).a,f)};var Q8=sfb(SHe,'EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/7',1374);feb(1375,zKe,{},z8d);_.Cl=function A8d(a,b,c,d,e){return new e4d(a,b,c,RD(d,191).a,RD(e,191).a)};_.Dl=function B8d(a,b,c,d,e,f){return new f4d(a,b,c,RD(d,191).a,RD(e,191).a,f)};var R8=sfb(SHe,'EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/8',1375);feb(1353,574,{},C8d);_.Bl=function D8d(a){if(!this.a.fk(a)){throw Adb(new Ifb(xKe+rb(a)+yKe+this.a+"'"))}};var T8=sfb(SHe,'EStructuralFeatureImpl/InternalSettingDelegateSingleDataDynamic',1353);feb(1354,574,{},E8d);_.Bl=function F8d(a){};var U8=sfb(SHe,'EStructuralFeatureImpl/InternalSettingDelegateSingleDataStatic',1354);feb(785,574,{});_.Bk=function G8d(a,b,c){var d;d=b.li(c);return d!=null};_.Ck=function H8d(a,b,c,d){var e,f;if(a.vh()&&a.wh()){e=true;f=b.li(c);if(f==null){e=false;f=this.b}else dE(f)===dE(r7d)&&(f=null);if(d==null){if(this.c!=null){b.mi(c,null);d=this.b}else{b.mi(c,r7d)}}else{this.Bl(d);b.mi(c,d)}qvd(a,this.d.Dl(a,1,this.e,f,d,!e))}else{if(d==null){this.c!=null?b.mi(c,null):b.mi(c,r7d)}else{this.Bl(d);b.mi(c,d)}}};_.Ek=function I8d(a,b,c){var d,e;if(a.vh()&&a.wh()){d=true;e=b.li(c);if(e==null){d=false;e=this.b}else dE(e)===dE(r7d)&&(e=null);b.ni(c);qvd(a,this.d.Dl(a,2,this.e,e,this.b,d))}else{b.ni(c)}};var X8=sfb(SHe,'EStructuralFeatureImpl/InternalSettingDelegateSingleDataUnsettable',785);feb(1355,785,{},J8d);_.Bl=function K8d(a){if(!this.a.fk(a)){throw Adb(new Ifb(xKe+rb(a)+yKe+this.a+"'"))}};var V8=sfb(SHe,'EStructuralFeatureImpl/InternalSettingDelegateSingleDataUnsettableDynamic',1355);feb(1356,785,{},L8d);_.Bl=function M8d(a){};var W8=sfb(SHe,'EStructuralFeatureImpl/InternalSettingDelegateSingleDataUnsettableStatic',1356);feb(410,512,{},N8d);_.yk=function P8d(a,b,c,d,e){var f,g,h,i,j;j=b.li(c);if(this.tk()&&dE(j)===dE(r7d)){return null}else if(this.bl()&&d&&j!=null){h=RD(j,54);if(h.Vh()){i=Vvd(a,h);if(h!=i){if(!FXd(this.a,i)){throw Adb(new Ifb(xKe+rb(i)+yKe+this.a+"'"))}b.mi(c,j=i);if(this.al()){f=RD(i,54);g=h.Th(a,!this.b?-1-BYd(a.Dh(),this.e):BYd(h.Dh(),this.b),null,null);!f.Ph()&&(g=f.Rh(a,!this.b?-1-BYd(a.Dh(),this.e):BYd(f.Dh(),this.b),null,g));!!g&&g.oj()}a.vh()&&a.wh()&&qvd(a,new b4d(a,9,this.e,h,i))}}return j}else{return j}};_.zk=function Q8d(a,b,c,d,e){var f,g;g=b.li(c);dE(g)===dE(r7d)&&(g=null);b.mi(c,d);if(this.Mj()){if(dE(g)!==dE(d)&&g!=null){f=RD(g,54);e=f.Th(a,BYd(f.Dh(),this.b),null,e)}}else this.al()&&g!=null&&(e=RD(g,54).Th(a,-1-BYd(a.Dh(),this.e),null,e));if(a.vh()&&a.wh()){!e&&(e=new gLd(4));e.nj(new b4d(a,1,this.e,g,d))}return e};_.Ak=function R8d(a,b,c,d,e){var f;f=b.li(c);dE(f)===dE(r7d)&&(f=null);b.ni(c);if(a.vh()&&a.wh()){!e&&(e=new gLd(4));this.tk()?e.nj(new b4d(a,2,this.e,f,null)):e.nj(new b4d(a,1,this.e,f,null))}return e};_.Bk=function S8d(a,b,c){var d;d=b.li(c);return d!=null};_.Ck=function T8d(a,b,c,d){var e,f,g,h,i;if(d!=null&&!FXd(this.a,d)){throw Adb(new Ifb(xKe+(ZD(d,58)?GYd(RD(d,58).Dh()):ofb(rb(d)))+yKe+this.a+"'"))}i=b.li(c);h=i!=null;this.tk()&&dE(i)===dE(r7d)&&(i=null);g=null;if(this.Mj()){if(dE(i)!==dE(d)){if(i!=null){e=RD(i,54);g=e.Th(a,BYd(e.Dh(),this.b),null,g)}if(d!=null){e=RD(d,54);g=e.Rh(a,BYd(e.Dh(),this.b),null,g)}}}else if(this.al()){if(dE(i)!==dE(d)){i!=null&&(g=RD(i,54).Th(a,-1-BYd(a.Dh(),this.e),null,g));d!=null&&(g=RD(d,54).Rh(a,-1-BYd(a.Dh(),this.e),null,g))}}d==null&&this.tk()?b.mi(c,r7d):b.mi(c,d);if(a.vh()&&a.wh()){f=new d4d(a,1,this.e,i,d,this.tk()&&!h);if(!g){qvd(a,f)}else{g.nj(f);g.oj()}}else !!g&&g.oj()};_.Ek=function U8d(a,b,c){var d,e,f,g,h;h=b.li(c);g=h!=null;this.tk()&&dE(h)===dE(r7d)&&(h=null);f=null;if(h!=null){if(this.Mj()){d=RD(h,54);f=d.Th(a,BYd(d.Dh(),this.b),null,f)}else this.al()&&(f=RD(h,54).Th(a,-1-BYd(a.Dh(),this.e),null,f))}b.ni(c);if(a.vh()&&a.wh()){e=new d4d(a,this.tk()?2:1,this.e,h,null,g);if(!f){qvd(a,e)}else{f.nj(e);f.oj()}}else !!f&&f.oj()};_.Mj=function V8d(){return false};_.al=function W8d(){return false};_.bl=function X8d(){return false};_.tk=function Y8d(){return false};var m9=sfb(SHe,'EStructuralFeatureImpl/InternalSettingDelegateSingleEObject',410);feb(575,410,{},Z8d);_.al=function $8d(){return true};var e9=sfb(SHe,'EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainment',575);feb(1359,575,{},_8d);_.bl=function a9d(){return true};var Z8=sfb(SHe,'EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentResolving',1359);feb(787,575,{},b9d);_.tk=function c9d(){return true};var _8=sfb(SHe,'EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentUnsettable',787);feb(1361,787,{},d9d);_.bl=function e9d(){return true};var $8=sfb(SHe,'EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentUnsettableResolving',1361);feb(650,575,{},f9d);_.Mj=function g9d(){return true};var d9=sfb(SHe,'EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverse',650);feb(1360,650,{},h9d);_.bl=function i9d(){return true};var a9=sfb(SHe,'EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverseResolving',1360);feb(788,650,{},j9d);_.tk=function k9d(){return true};var c9=sfb(SHe,'EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverseUnsettable',788);feb(1362,788,{},l9d);_.bl=function m9d(){return true};var b9=sfb(SHe,'EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverseUnsettableResolving',1362);feb(651,410,{},n9d);_.bl=function o9d(){return true};var i9=sfb(SHe,'EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolving',651);feb(1363,651,{},p9d);_.tk=function q9d(){return true};var f9=sfb(SHe,'EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolvingUnsettable',1363);feb(789,651,{},r9d);_.Mj=function s9d(){return true};var h9=sfb(SHe,'EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolvingWithInverse',789);feb(1364,789,{},t9d);_.tk=function u9d(){return true};var g9=sfb(SHe,'EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolvingWithInverseUnsettable',1364);feb(1357,410,{},v9d);_.tk=function w9d(){return true};var j9=sfb(SHe,'EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectUnsettable',1357);feb(786,410,{},x9d);_.Mj=function y9d(){return true};var l9=sfb(SHe,'EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectWithInverse',786);feb(1358,786,{},z9d);_.tk=function A9d(){return true};var k9=sfb(SHe,'EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectWithInverseUnsettable',1358);feb(790,576,wKe,D9d);_.yl=function E9d(a){return new D9d(this.a,this.c,a)};_.md=function F9d(){return this.b};_.zl=function G9d(a,b,c){return B9d(this,a,this.b,c)};_.Al=function H9d(a,b,c){return C9d(this,a,this.b,c)};var o9=sfb(SHe,'EStructuralFeatureImpl/InverseUpdatingFeatureMapEntry',790);feb(1365,1,$Je,I9d);_.Fk=function J9d(a){return this.a};_.Qj=function K9d(){return ZD(this.a,97)?RD(this.a,97).Qj():!this.a.dc()};_.Wb=function L9d(a){this.a.$b();this.a.Gc(RD(a,15))};_.Gk=function M9d(){ZD(this.a,97)?RD(this.a,97).Gk():this.a.$b()};var p9=sfb(SHe,'EStructuralFeatureImpl/SettingMany',1365);feb(1366,576,wKe,N9d);_.xl=function O9d(a){return new S9d((nme(),mme),this.b.ri(this.a,a))};_.md=function P9d(){return null};_.zl=function Q9d(a,b,c){return c};_.Al=function R9d(a,b,c){return c};var q9=sfb(SHe,'EStructuralFeatureImpl/SimpleContentFeatureMapEntry',1366);feb(652,576,wKe,S9d);_.xl=function T9d(a){return new S9d(this.c,a)};_.md=function U9d(){return this.a};_.zl=function V9d(a,b,c){return c};_.Al=function W9d(a,b,c){return c};var r9=sfb(SHe,'EStructuralFeatureImpl/SimpleFeatureMapEntry',652);feb(403,506,PIe,X9d);_.aj=function Y9d(a){return $C(h7,rve,29,a,0,1)};_.Yi=function Z9d(){return false};var t9=sfb(SHe,'ESuperAdapter/1',403);feb(457,448,{110:1,94:1,93:1,155:1,197:1,58:1,114:1,850:1,54:1,99:1,158:1,457:1,119:1,120:1},_9d);_.Lh=function aae(a,b,c){var d;switch(a){case 0:return !this.Ab&&(this.Ab=new C5d(f7,this,0,3)),this.Ab;case 1:return this.zb;case 2:return !this.a&&(this.a=new iae(this,o7,this)),this.a;}return zvd(this,a-AYd((JTd(),ITd)),vYd((d=RD(Ywd(this,16),29),!d?ITd:d),a),b,c)};_.Uh=function bae(a,b,c){var d,e;switch(b){case 0:return !this.Ab&&(this.Ab=new C5d(f7,this,0,3)),rLd(this.Ab,a,c);case 2:return !this.a&&(this.a=new iae(this,o7,this)),rLd(this.a,a,c);}return e=RD(vYd((d=RD(Ywd(this,16),29),!d?(JTd(),ITd):d),b),69),e.wk().Ak(this,Wwd(this),b-AYd((JTd(),ITd)),a,c)};_.Wh=function cae(a){var b;switch(a){case 0:return !!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return !!this.a&&this.a.i!=0;}return Avd(this,a-AYd((JTd(),ITd)),vYd((b=RD(Ywd(this,16),29),!b?ITd:b),a))};_.bi=function dae(a,b){var c;switch(a){case 0:!this.Ab&&(this.Ab=new C5d(f7,this,0,3));sLd(this.Ab);!this.Ab&&(this.Ab=new C5d(f7,this,0,3));YGd(this.Ab,RD(b,16));return;case 1:PAd(this,WD(b));return;case 2:!this.a&&(this.a=new iae(this,o7,this));sLd(this.a);!this.a&&(this.a=new iae(this,o7,this));YGd(this.a,RD(b,16));return;}Bvd(this,a-AYd((JTd(),ITd)),vYd((c=RD(Ywd(this,16),29),!c?ITd:c),a),b)};_.ii=function eae(){return JTd(),ITd};_.ki=function fae(a){var b;switch(a){case 0:!this.Ab&&(this.Ab=new C5d(f7,this,0,3));sLd(this.Ab);return;case 1:PAd(this,null);return;case 2:!this.a&&(this.a=new iae(this,o7,this));sLd(this.a);return;}Cvd(this,a-AYd((JTd(),ITd)),vYd((b=RD(Ywd(this,16),29),!b?ITd:b),a))};var z9=sfb(SHe,'ETypeParameterImpl',457);feb(458,83,oKe,iae);_.Nj=function jae(a,b){return gae(this,RD(a,89),b)};_.Oj=function kae(a,b){return hae(this,RD(a,89),b)};var v9=sfb(SHe,'ETypeParameterImpl/1',458);feb(647,45,Hxe,lae);_.ec=function mae(){return new pae(this)};var y9=sfb(SHe,'ETypeParameterImpl/2',647);feb(570,Eve,Fve,pae);_.Fc=function qae(a){return nae(this,RD(a,89))};_.Gc=function rae(a){var b,c,d;d=false;for(c=a.Kc();c.Ob();){b=RD(c.Pb(),89);Zjb(this.a,b,'')==null&&(d=true)}return d};_.$b=function sae(){akb(this.a)};_.Hc=function tae(a){return Ujb(this.a,a)};_.Kc=function uae(){var a;return a=new vkb((new mkb(this.a)).a),new xae(a)};_.Mc=function vae(a){return oae(this,a)};_.gc=function wae(){return bkb(this.a)};var x9=sfb(SHe,'ETypeParameterImpl/2/1',570);feb(571,1,Ave,xae);_.Nb=function yae(a){Ztb(this,a)};_.Pb=function Aae(){return RD(tkb(this.a).ld(),89)};_.Ob=function zae(){return this.a.b};_.Qb=function Bae(){ukb(this.a)};var w9=sfb(SHe,'ETypeParameterImpl/2/1/1',571);feb(1329,45,Hxe,Cae);_._b=function Dae(a){return bE(a)?Yjb(this,a):!!qtb(this.f,a)};_.xc=function Eae(a){var b,c;b=bE(a)?Xjb(this,a):Wd(qtb(this.f,a));if(ZD(b,851)){c=RD(b,851);b=c.Kk();Zjb(this,RD(a,241),b);return b}else return b!=null?b:a==null?(Gie(),Fie):null};var B9=sfb(SHe,'EValidatorRegistryImpl',1329);feb(1349,720,{110:1,94:1,93:1,480:1,155:1,58:1,114:1,2040:1,54:1,99:1,158:1,119:1,120:1},Mae);_.ri=function Nae(a,b){switch(a.hk()){case 21:case 22:case 23:case 24:case 26:case 31:case 32:case 37:case 38:case 39:case 40:case 43:case 44:case 48:case 49:case 20:return b==null?null:jeb(b);case 25:return Gae(b);case 27:return Hae(b);case 28:return Iae(b);case 29:return b==null?null:a2d(nAd[0],RD(b,206));case 41:return b==null?'':nfb(RD(b,297));case 42:return jeb(b);case 50:return WD(b);default:throw Adb(new agb(VHe+a.xe()+WHe));}};_.si=function Oae(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q;switch(a.G==-1&&(a.G=(m=BXd(a),m?fZd(m.vi(),a):-1)),a.G){case 0:return c=new mXd,c;case 1:return b=new pVd,b;case 2:return d=new HYd,d;case 4:return e=new k1d,e;case 5:return f=new A1d,f;case 6:return g=new R1d,g;case 7:return h=new yAd,h;case 10:return j=new kUd,j;case 11:return k=new q4d,k;case 12:return l=new EBd,l;case 13:return n=new R5d,n;case 14:return o=new d6d,o;case 17:return p=new v6d,p;case 18:return i=new s2d,i;case 19:return q=new _9d,q;default:throw Adb(new agb(ZHe+a.zb+WHe));}};_.ti=function Pae(a,b){switch(a.hk()){case 20:return b==null?null:new Bib(b);case 21:return b==null?null:new ejb(b);case 23:case 22:return b==null?null:Fae(b);case 26:case 24:return b==null?null:$eb(Oeb(b,-128,127)<<24>>24);case 25:return vAd(b);case 27:return Jae(b);case 28:return Kae(b);case 29:return Lae(b);case 32:case 31:return b==null?null:Neb(b);case 38:case 37:return b==null?null:new Ufb(b);case 40:case 39:return b==null?null:sgb(Oeb(b,qwe,lve));case 41:return null;case 42:return b==null?null:null;case 44:case 43:return b==null?null:Hgb(Peb(b));case 49:case 48:return b==null?null:bhb(Oeb(b,BKe,32767)<<16>>16);case 50:return b;default:throw Adb(new agb(VHe+a.xe()+WHe));}};var C9=sfb(SHe,'EcoreFactoryImpl',1349);feb(560,184,{110:1,94:1,93:1,155:1,197:1,58:1,241:1,114:1,2038:1,54:1,99:1,158:1,184:1,560:1,119:1,120:1,690:1},$ae);_.gb=false;_.hb=false;var Rae,Sae=false;var tab=sfb(SHe,'EcorePackageImpl',560);feb(1234,1,{851:1},cbe);_.Kk=function dbe(){return fke(),eke};var N9=sfb(SHe,'EcorePackageImpl/1',1234);feb(1243,1,OKe,ebe);_.fk=function fbe(a){return ZD(a,155)};_.gk=function gbe(a){return $C(p7,rve,155,a,0,1)};var D9=sfb(SHe,'EcorePackageImpl/10',1243);feb(1244,1,OKe,hbe);_.fk=function ibe(a){return ZD(a,197)};_.gk=function jbe(a){return $C(q7,rve,197,a,0,1)};var E9=sfb(SHe,'EcorePackageImpl/11',1244);feb(1245,1,OKe,kbe);_.fk=function lbe(a){return ZD(a,58)};_.gk=function mbe(a){return $C(r7,rve,58,a,0,1)};var F9=sfb(SHe,'EcorePackageImpl/12',1245);feb(1246,1,OKe,nbe);_.fk=function obe(a){return ZD(a,411)};_.gk=function pbe(a){return $C(s7,mKe,62,a,0,1)};var G9=sfb(SHe,'EcorePackageImpl/13',1246);feb(1247,1,OKe,qbe);_.fk=function rbe(a){return ZD(a,241)};_.gk=function sbe(a){return $C(t7,rve,241,a,0,1)};var H9=sfb(SHe,'EcorePackageImpl/14',1247);feb(1248,1,OKe,tbe);_.fk=function ube(a){return ZD(a,518)};_.gk=function vbe(a){return $C(u7,rve,2116,a,0,1)};var I9=sfb(SHe,'EcorePackageImpl/15',1248);feb(1249,1,OKe,wbe);_.fk=function xbe(a){return ZD(a,102)};_.gk=function ybe(a){return $C(v7,lKe,19,a,0,1)};var J9=sfb(SHe,'EcorePackageImpl/16',1249);feb(1250,1,OKe,zbe);_.fk=function Abe(a){return ZD(a,179)};_.gk=function Bbe(a){return $C(y7,lKe,179,a,0,1)};var K9=sfb(SHe,'EcorePackageImpl/17',1250);feb(1251,1,OKe,Cbe);_.fk=function Dbe(a){return ZD(a,481)};_.gk=function Ebe(a){return $C(A7,rve,481,a,0,1)};var L9=sfb(SHe,'EcorePackageImpl/18',1251);feb(1252,1,OKe,Fbe);_.fk=function Gbe(a){return ZD(a,561)};_.gk=function Hbe(a){return $C(C8,LJe,561,a,0,1)};var M9=sfb(SHe,'EcorePackageImpl/19',1252);feb(1235,1,OKe,Ibe);_.fk=function Jbe(a){return ZD(a,331)};_.gk=function Kbe(a){return $C(g7,lKe,35,a,0,1)};var Y9=sfb(SHe,'EcorePackageImpl/2',1235);feb(1253,1,OKe,Lbe);_.fk=function Mbe(a){return ZD(a,248)};_.gk=function Nbe(a){return $C(o7,sKe,89,a,0,1)};var O9=sfb(SHe,'EcorePackageImpl/20',1253);feb(1254,1,OKe,Obe);_.fk=function Pbe(a){return ZD(a,457)};_.gk=function Qbe(a){return $C(z7,rve,850,a,0,1)};var P9=sfb(SHe,'EcorePackageImpl/21',1254);feb(1255,1,OKe,Rbe);_.fk=function Sbe(a){return $D(a)};_.gk=function Tbe(a){return $C(QI,Nve,485,a,8,1)};var Q9=sfb(SHe,'EcorePackageImpl/22',1255);feb(1256,1,OKe,Ube);_.fk=function Vbe(a){return ZD(a,195)};_.gk=function Wbe(a){return $C(gE,Nve,195,a,0,2)};var R9=sfb(SHe,'EcorePackageImpl/23',1256);feb(1257,1,OKe,Xbe);_.fk=function Ybe(a){return ZD(a,222)};_.gk=function Zbe(a){return $C(RI,Nve,222,a,0,1)};var S9=sfb(SHe,'EcorePackageImpl/24',1257);feb(1258,1,OKe,$be);_.fk=function _be(a){return ZD(a,180)};_.gk=function ace(a){return $C(SI,Nve,180,a,0,1)};var T9=sfb(SHe,'EcorePackageImpl/25',1258);feb(1259,1,OKe,bce);_.fk=function cce(a){return ZD(a,206)};_.gk=function dce(a){return $C(qK,Nve,206,a,0,1)};var U9=sfb(SHe,'EcorePackageImpl/26',1259);feb(1260,1,OKe,ece);_.fk=function fce(a){return false};_.gk=function gce(a){return $C(T6,rve,2215,a,0,1)};var V9=sfb(SHe,'EcorePackageImpl/27',1260);feb(1261,1,OKe,hce);_.fk=function ice(a){return _D(a)};_.gk=function jce(a){return $C(VI,Nve,345,a,7,1)};var W9=sfb(SHe,'EcorePackageImpl/28',1261);feb(1262,1,OKe,kce);_.fk=function lce(a){return ZD(a,61)};_.gk=function mce(a){return $C(Y6,Ize,61,a,0,1)};var X9=sfb(SHe,'EcorePackageImpl/29',1262);feb(1236,1,OKe,nce);_.fk=function oce(a){return ZD(a,519)};_.gk=function pce(a){return $C(f7,{3:1,4:1,5:1,2033:1},598,a,0,1)};var hab=sfb(SHe,'EcorePackageImpl/3',1236);feb(1263,1,OKe,qce);_.fk=function rce(a){return ZD(a,582)};_.gk=function sce(a){return $C(Z6,rve,2039,a,0,1)};var Z9=sfb(SHe,'EcorePackageImpl/30',1263);feb(1264,1,OKe,tce);_.fk=function uce(a){return ZD(a,160)};_.gk=function vce(a){return $C(Tbb,Ize,160,a,0,1)};var $9=sfb(SHe,'EcorePackageImpl/31',1264);feb(1265,1,OKe,wce);_.fk=function xce(a){return ZD(a,76)};_.gk=function yce(a){return $C(Jbb,PKe,76,a,0,1)};var _9=sfb(SHe,'EcorePackageImpl/32',1265);feb(1266,1,OKe,zce);_.fk=function Ace(a){return ZD(a,161)};_.gk=function Bce(a){return $C(ZI,Nve,161,a,0,1)};var aab=sfb(SHe,'EcorePackageImpl/33',1266);feb(1267,1,OKe,Cce);_.fk=function Dce(a){return ZD(a,17)};_.gk=function Ece(a){return $C(bJ,Nve,17,a,0,1)};var bab=sfb(SHe,'EcorePackageImpl/34',1267);feb(1268,1,OKe,Fce);_.fk=function Gce(a){return ZD(a,297)};_.gk=function Hce(a){return $C(UI,rve,297,a,0,1)};var cab=sfb(SHe,'EcorePackageImpl/35',1268);feb(1269,1,OKe,Ice);_.fk=function Jce(a){return ZD(a,168)};_.gk=function Kce(a){return $C(eJ,Nve,168,a,0,1)};var dab=sfb(SHe,'EcorePackageImpl/36',1269);feb(1270,1,OKe,Lce);_.fk=function Mce(a){return ZD(a,85)};_.gk=function Nce(a){return $C(VK,rve,85,a,0,1)};var eab=sfb(SHe,'EcorePackageImpl/37',1270);feb(1271,1,OKe,Oce);_.fk=function Pce(a){return ZD(a,599)};_.gk=function Qce(a){return $C(Aab,rve,599,a,0,1)};var fab=sfb(SHe,'EcorePackageImpl/38',1271);feb(1272,1,OKe,Rce);_.fk=function Sce(a){return false};_.gk=function Tce(a){return $C(zab,rve,2216,a,0,1)};var gab=sfb(SHe,'EcorePackageImpl/39',1272);feb(1237,1,OKe,Uce);_.fk=function Vce(a){return ZD(a,90)};_.gk=function Wce(a){return $C(h7,rve,29,a,0,1)};var nab=sfb(SHe,'EcorePackageImpl/4',1237);feb(1273,1,OKe,Xce);_.fk=function Yce(a){return ZD(a,191)};_.gk=function Zce(a){return $C(lJ,Nve,191,a,0,1)};var iab=sfb(SHe,'EcorePackageImpl/40',1273);feb(1274,1,OKe,$ce);_.fk=function _ce(a){return bE(a)};_.gk=function ade(a){return $C(qJ,Nve,2,a,6,1)};var jab=sfb(SHe,'EcorePackageImpl/41',1274);feb(1275,1,OKe,bde);_.fk=function cde(a){return ZD(a,596)};_.gk=function dde(a){return $C(a7,rve,596,a,0,1)};var kab=sfb(SHe,'EcorePackageImpl/42',1275);feb(1276,1,OKe,ede);_.fk=function fde(a){return false};_.gk=function gde(a){return $C($6,Nve,2217,a,0,1)};var lab=sfb(SHe,'EcorePackageImpl/43',1276);feb(1277,1,OKe,hde);_.fk=function ide(a){return ZD(a,44)};_.gk=function jde(a){return $C(UK,Zve,44,a,0,1)};var mab=sfb(SHe,'EcorePackageImpl/44',1277);feb(1238,1,OKe,kde);_.fk=function lde(a){return ZD(a,142)};_.gk=function mde(a){return $C(i7,rve,142,a,0,1)};var oab=sfb(SHe,'EcorePackageImpl/5',1238);feb(1239,1,OKe,nde);_.fk=function ode(a){return ZD(a,156)};_.gk=function pde(a){return $C(k7,rve,156,a,0,1)};var pab=sfb(SHe,'EcorePackageImpl/6',1239);feb(1240,1,OKe,qde);_.fk=function rde(a){return ZD(a,469)};_.gk=function sde(a){return $C(m7,rve,685,a,0,1)};var qab=sfb(SHe,'EcorePackageImpl/7',1240);feb(1241,1,OKe,tde);_.fk=function ude(a){return ZD(a,582)};_.gk=function vde(a){return $C(l7,rve,694,a,0,1)};var rab=sfb(SHe,'EcorePackageImpl/8',1241);feb(1242,1,OKe,wde);_.fk=function xde(a){return ZD(a,480)};_.gk=function yde(a){return $C(n7,rve,480,a,0,1)};var sab=sfb(SHe,'EcorePackageImpl/9',1242);feb(1038,2080,JJe,Cde);_.Mi=function Dde(a,b){zde(this,RD(b,424))};_.Qi=function Ede(a,b){Ade(this,a,RD(b,424))};var vab=sfb(SHe,'MinimalEObjectImpl/1ArrayDelegatingAdapterList',1038);feb(1039,152,GJe,Fde);_.jj=function Gde(){return this.a.a};var uab=sfb(SHe,'MinimalEObjectImpl/1ArrayDelegatingAdapterList/1',1039);feb(1067,1066,{},Ide);var yab=sfb('org.eclipse.emf.ecore.plugin','EcorePlugin',1067);var Aab=ufb(QKe,'Resource');feb(799,1524,RKe);_.Hl=function Mde(a){};_.Il=function Nde(a){};_.El=function Ode(){return !this.a&&(this.a=new Zde(this)),this.a};_.Fl=function Pde(a){var b,c,d,e,f;d=a.length;if(d>0){BFb(0,a.length);if(a.charCodeAt(0)==47){f=new cnb(4);e=1;for(b=1;b0&&(a=(AFb(0,c,a.length),a.substr(0,c)))}}}return Kde(this,a)};_.Gl=function Qde(){return this.c};_.Ib=function Rde(){var a;return nfb(this.Rm)+'@'+(a=tb(this)>>>0,a.toString(16))+" uri='"+this.d+"'"};_.b=false;var Eab=sfb(SKe,'ResourceImpl',799);feb(1525,799,RKe,Sde);var Bab=sfb(SKe,'BinaryResourceImpl',1525);feb(1190,708,QIe);_.bj=function Vde(a){return ZD(a,58)?Tde(this,RD(a,58)):ZD(a,599)?new dMd(RD(a,599).El()):dE(a)===dE(this.f)?RD(a,16).Kc():(jQd(),iQd.a)};_.Ob=function Wde(){return Ude(this)};_.a=false;var Ebb=sfb(ZJe,'EcoreUtil/ContentTreeIterator',1190);feb(1526,1190,QIe,Xde);_.bj=function Yde(a){return dE(a)===dE(this.f)?RD(a,15).Kc():new _je(RD(a,58))};var Cab=sfb(SKe,'ResourceImpl/5',1526);feb(658,2092,nKe,Zde);_.Hc=function $de(a){return this.i<=4?PHd(this,a):ZD(a,54)&&RD(a,54).Jh()==this.a};_.Mi=function _de(a,b){a==this.i-1&&(this.a.b||(this.a.b=true,null))};_.Oi=function aee(a,b){a==0?this.a.b||(this.a.b=true,null):$Gd(this,a,b)};_.Qi=function bee(a,b){};_.Ri=function cee(a,b,c){};_.Lj=function dee(){return 2};_.jj=function eee(){return this.a};_.Mj=function fee(){return true};_.Nj=function gee(a,b){var c;c=RD(a,54);b=c.fi(this.a,b);return b};_.Oj=function hee(a,b){var c;c=RD(a,54);return c.fi(null,b)};_.Pj=function iee(){return false};_.Si=function jee(){return true};_.aj=function kee(a){return $C(r7,rve,58,a,0,1)};_.Yi=function lee(){return false};var Dab=sfb(SKe,'ResourceImpl/ContentsEList',658);feb(970,2062,kwe,mee);_.fd=function nee(a){return this.a.Ki(a)};_.gc=function oee(){return this.a.gc()};var Fab=sfb(ZJe,'AbstractSequentialInternalEList/1',970);var hke,ike,jke,kke;feb(634,1,{},Yee);var pee,qee;var Lab=sfb(ZJe,'BasicExtendedMetaData',634);feb(1181,1,{},afe);_.Jl=function bfe(){return null};_.Kl=function cfe(){this.a==-2&&$ee(this,uee(this.d,this.b));return this.a};_.Ll=function dfe(){return null};_.Ml=function efe(){return yob(),yob(),vob};_.xe=function ffe(){this.c==fLe&&_ee(this,zee(this.d,this.b));return this.c};_.Nl=function gfe(){return 0};_.a=-2;_.c=fLe;var Hab=sfb(ZJe,'BasicExtendedMetaData/EClassExtendedMetaDataImpl',1181);feb(1182,1,{},mfe);_.Jl=function nfe(){this.a==(ree(),pee)&&hfe(this,tee(this.f,this.b));return this.a};_.Kl=function ofe(){return 0};_.Ll=function pfe(){this.c==(ree(),pee)&&ife(this,xee(this.f,this.b));return this.c};_.Ml=function qfe(){!this.d&&jfe(this,yee(this.f,this.b));return this.d};_.xe=function rfe(){this.e==fLe&&kfe(this,zee(this.f,this.b));return this.e};_.Nl=function sfe(){this.g==-2&&lfe(this,Cee(this.f,this.b));return this.g};_.e=fLe;_.g=-2;var Iab=sfb(ZJe,'BasicExtendedMetaData/EDataTypeExtendedMetaDataImpl',1182);feb(1180,1,{},wfe);_.b=false;_.c=false;var Jab=sfb(ZJe,'BasicExtendedMetaData/EPackageExtendedMetaDataImpl',1180);feb(1183,1,{},Jfe);_.c=-2;_.e=fLe;_.f=fLe;var Kab=sfb(ZJe,'BasicExtendedMetaData/EStructuralFeatureExtendedMetaDataImpl',1183);feb(593,632,oKe,Kfe);_.Lj=function Lfe(){return this.c};_.ol=function Mfe(){return false};_.Wi=function Nfe(a,b){return b};_.c=0;var Yab=sfb(ZJe,'EDataTypeEList',593);var Tbb=ufb(ZJe,'FeatureMap');feb(78,593,{3:1,4:1,20:1,31:1,56:1,16:1,15:1,59:1,70:1,66:1,61:1,79:1,160:1,220:1,2036:1,71:1,97:1},Uge);_.bd=function Vge(a,b){Ofe(this,a,RD(b,76))};_.Fc=function Wge(a){return Rfe(this,RD(a,76))};_.Hi=function _ge(a){Wfe(this,RD(a,76))};_.Nj=function khe(a,b){return mge(this,RD(a,76),b)};_.Oj=function lhe(a,b){return oge(this,RD(a,76),b)};_.Ti=function nhe(a,b){return uge(this,a,b)};_.Wi=function phe(a,b){return zge(this,a,RD(b,76))};_.hd=function rhe(a,b){return Cge(this,a,RD(b,76))};_.Uj=function vhe(a,b){return Ige(this,RD(a,76),b)};_.Vj=function whe(a,b){return Kge(this,RD(a,76),b)};_.Wj=function xhe(a,b,c){return Lge(this,RD(a,76),RD(b,76),c)};_.Zi=function zhe(a,b){return Tge(this,a,RD(b,76))};_.Ol=function Xge(a,b){return Qfe(this,a,b)};_.cd=function Yge(a,b){var c,d,e,f,g,h,i,j,k;j=new ZHd(b.gc());for(e=b.Kc();e.Ob();){d=RD(e.Pb(),76);f=d.Lk();if(qke(this.e,f)){(!f.Si()||!cge(this,f,d.md())&&!PHd(j,d))&&WGd(j,d)}else{k=pke(this.e.Dh(),f);c=RD(this.g,124);g=true;for(h=0;h=0){b=a[this.c];if(this.k.am(b.Lk())){this.j=this.f?b:b.md();this.i=-2;return true}}this.i=-1;this.g=-1;return false};var Mab=sfb(ZJe,'BasicFeatureMap/FeatureEIterator',420);feb(676,420,Jve,She);_.ul=function The(){return true};var Nab=sfb(ZJe,'BasicFeatureMap/ResolvingFeatureEIterator',676);feb(968,496,uKe,Uhe);_.pj=function Vhe(){return this};var Rab=sfb(ZJe,'EContentsEList/1',968);feb(969,496,uKe,Whe);_.ul=function Xhe(){return false};var Sab=sfb(ZJe,'EContentsEList/2',969);feb(967,287,vKe,Yhe);_.wl=function Zhe(a){};_.Ob=function $he(){return false};_.Sb=function _he(){return false};var Tab=sfb(ZJe,'EContentsEList/FeatureIteratorImpl/1',967);feb(840,593,oKe,aie);_.Ni=function bie(){this.a=true};_.Qj=function cie(){return this.a};_.Gk=function die(){var a;sLd(this);if(Mvd(this.e)){a=this.a;this.a=false;qvd(this.e,new Q3d(this.e,2,this.c,a,false))}else{this.a=false}};_.a=false;var Xab=sfb(ZJe,'EDataTypeEList/Unsettable',840);feb(1958,593,oKe,eie);_.Si=function fie(){return true};var $ab=sfb(ZJe,'EDataTypeUniqueEList',1958);feb(1959,840,oKe,gie);_.Si=function hie(){return true};var Zab=sfb(ZJe,'EDataTypeUniqueEList/Unsettable',1959);feb(147,83,oKe,iie);_.nl=function jie(){return true};_.Wi=function kie(a,b){return gZd(this,a,RD(b,58))};var _ab=sfb(ZJe,'EObjectContainmentEList/Resolving',147);feb(1184,555,oKe,lie);_.nl=function mie(){return true};_.Wi=function nie(a,b){return gZd(this,a,RD(b,58))};var abb=sfb(ZJe,'EObjectContainmentEList/Unsettable/Resolving',1184);feb(766,14,oKe,oie);_.Ni=function pie(){this.a=true};_.Qj=function qie(){return this.a};_.Gk=function rie(){var a;sLd(this);if(Mvd(this.e)){a=this.a;this.a=false;qvd(this.e,new Q3d(this.e,2,this.c,a,false))}else{this.a=false}};_.a=false;var fbb=sfb(ZJe,'EObjectContainmentWithInverseEList/Unsettable',766);feb(1222,766,oKe,sie);_.nl=function tie(){return true};_.Wi=function uie(a,b){return gZd(this,a,RD(b,58))};var ebb=sfb(ZJe,'EObjectContainmentWithInverseEList/Unsettable/Resolving',1222);feb(757,505,oKe,vie);_.Ni=function wie(){this.a=true};_.Qj=function xie(){return this.a};_.Gk=function yie(){var a;sLd(this);if(Mvd(this.e)){a=this.a;this.a=false;qvd(this.e,new Q3d(this.e,2,this.c,a,false))}else{this.a=false}};_.a=false;var hbb=sfb(ZJe,'EObjectEList/Unsettable',757);feb(338,505,oKe,zie);_.nl=function Aie(){return true};_.Wi=function Bie(a,b){return gZd(this,a,RD(b,58))};var kbb=sfb(ZJe,'EObjectResolvingEList',338);feb(1844,757,oKe,Cie);_.nl=function Die(){return true};_.Wi=function Eie(a,b){return gZd(this,a,RD(b,58))};var jbb=sfb(ZJe,'EObjectResolvingEList/Unsettable',1844);feb(1527,1,{},Hie);var Fie;var lbb=sfb(ZJe,'EObjectValidator',1527);feb(559,505,oKe,Iie);_.il=function Jie(){return this.d};_.jl=function Kie(){return this.b};_.Mj=function Lie(){return true};_.ml=function Mie(){return true};_.b=0;var pbb=sfb(ZJe,'EObjectWithInverseEList',559);feb(1225,559,oKe,Nie);_.ll=function Oie(){return true};var mbb=sfb(ZJe,'EObjectWithInverseEList/ManyInverse',1225);feb(635,559,oKe,Pie);_.Ni=function Qie(){this.a=true};_.Qj=function Rie(){return this.a};_.Gk=function Sie(){var a;sLd(this);if(Mvd(this.e)){a=this.a;this.a=false;qvd(this.e,new Q3d(this.e,2,this.c,a,false))}else{this.a=false}};_.a=false;var obb=sfb(ZJe,'EObjectWithInverseEList/Unsettable',635);feb(1224,635,oKe,Tie);_.ll=function Uie(){return true};var nbb=sfb(ZJe,'EObjectWithInverseEList/Unsettable/ManyInverse',1224);feb(767,559,oKe,Vie);_.nl=function Wie(){return true};_.Wi=function Xie(a,b){return gZd(this,a,RD(b,58))};var tbb=sfb(ZJe,'EObjectWithInverseResolvingEList',767);feb(32,767,oKe,Yie);_.ll=function Zie(){return true};var qbb=sfb(ZJe,'EObjectWithInverseResolvingEList/ManyInverse',32);feb(768,635,oKe,$ie);_.nl=function _ie(){return true};_.Wi=function aje(a,b){return gZd(this,a,RD(b,58))};var sbb=sfb(ZJe,'EObjectWithInverseResolvingEList/Unsettable',768);feb(1223,768,oKe,bje);_.ll=function cje(){return true};var rbb=sfb(ZJe,'EObjectWithInverseResolvingEList/Unsettable/ManyInverse',1223);feb(1185,632,oKe);_.Li=function dje(){return (this.b&1792)==0};_.Ni=function eje(){this.b|=1};_.kl=function fje(){return (this.b&4)!=0};_.Mj=function gje(){return (this.b&40)!=0};_.ll=function hje(){return (this.b&16)!=0};_.ml=function ije(){return (this.b&8)!=0};_.nl=function jje(){return (this.b&cKe)!=0};_.al=function kje(){return (this.b&32)!=0};_.ol=function lje(){return (this.b&gwe)!=0};_.fk=function mje(a){return !this.d?this.Lk().Hk().fk(a):QRd(this.d,a)};_.Qj=function nje(){return (this.b&2)!=0?(this.b&1)!=0:this.i!=0};_.Si=function oje(){return (this.b&128)!=0};_.Gk=function qje(){var a;sLd(this);if((this.b&2)!=0){if(Mvd(this.e)){a=(this.b&1)!=0;this.b&=-2;eZd(this,new Q3d(this.e,2,BYd(this.e.Dh(),this.Lk()),a,false))}else{this.b&=-2}}};_.Yi=function rje(){return (this.b&1536)==0};_.b=0;var vbb=sfb(ZJe,'EcoreEList/Generic',1185);feb(1186,1185,oKe,sje);_.Lk=function tje(){return this.a};var ubb=sfb(ZJe,'EcoreEList/Dynamic',1186);feb(765,66,PIe,uje);_.aj=function vje(a){return IMd(this.a.a,a)};var zbb=sfb(ZJe,'EcoreEMap/1',765);feb(764,83,oKe,wje);_.Mi=function xje(a,b){UNd(this.b,RD(b,136))};_.Oi=function yje(a,b){TNd(this.b)};_.Pi=function zje(a,b,c){var d;++(d=this.b,RD(b,136),d).e};_.Qi=function Aje(a,b){VNd(this.b,RD(b,136))};_.Ri=function Bje(a,b,c){VNd(this.b,RD(c,136));dE(c)===dE(b)&&RD(c,136).Ci(aOd(RD(b,136).ld()));UNd(this.b,RD(b,136))};var Abb=sfb(ZJe,'EcoreEMap/DelegateEObjectContainmentEList',764);feb(1220,141,_Je,Cje);var Cbb=sfb(ZJe,'EcoreEMap/Unsettable',1220);feb(1221,764,oKe,Dje);_.Ni=function Eje(){this.a=true};_.Qj=function Fje(){return this.a};_.Gk=function Gje(){var a;sLd(this);if(Mvd(this.e)){a=this.a;this.a=false;qvd(this.e,new Q3d(this.e,2,this.c,a,false))}else{this.a=false}};_.a=false;var Bbb=sfb(ZJe,'EcoreEMap/Unsettable/UnsettableDelegateEObjectContainmentEList',1221);feb(1189,215,Hxe,Zje);_.a=false;_.b=false;var Fbb=sfb(ZJe,'EcoreUtil/Copier',1189);feb(759,1,Ave,_je);_.Nb=function ake(a){Ztb(this,a)};_.Ob=function bke(){return $je(this)};_.Pb=function cke(){var a;$je(this);a=this.b;this.b=null;return a};_.Qb=function dke(){this.a.Qb()};var Gbb=sfb(ZJe,'EcoreUtil/ProperContentIterator',759);feb(1528,1527,{},gke);var eke;var Hbb=sfb(ZJe,'EcoreValidator',1528);var mke;var Sbb=ufb(ZJe,'FeatureMapUtil/Validator');feb(1295,1,{2041:1},rke);_.am=function ske(a){return true};var Kbb=sfb(ZJe,'FeatureMapUtil/1',1295);feb(773,1,{2041:1},wke);_.am=function xke(a){var b;if(this.c==a)return true;b=TD(Wjb(this.a,a));if(b==null){if(vke(this,a)){yke(this.a,a,(Geb(),Feb));return true}else{yke(this.a,a,(Geb(),Eeb));return false}}else{return b==(Geb(),Feb)}};_.e=false;var tke;var Nbb=sfb(ZJe,'FeatureMapUtil/BasicValidator',773);feb(774,45,Hxe,zke);var Mbb=sfb(ZJe,'FeatureMapUtil/BasicValidator/Cache',774);feb(509,56,{20:1,31:1,56:1,16:1,15:1,61:1,79:1,71:1,97:1},Eke);_.bd=function Fke(a,b){Pfe(this.c,this.b,a,b)};_.Fc=function Gke(a){return Qfe(this.c,this.b,a)};_.cd=function Hke(a,b){return Sfe(this.c,this.b,a,b)};_.Gc=function Ike(a){return Ake(this,a)};_.Gi=function Jke(a,b){Ufe(this.c,this.b,a,b)};_.Wk=function Kke(a,b){return Xfe(this.c,this.b,a,b)};_.$i=function Lke(a){return hge(this.c,this.b,a,false)};_.Ii=function Mke(){return Yfe(this.c,this.b)};_.Ji=function Nke(){return Zfe(this.c,this.b)};_.Ki=function Oke(a){return $fe(this.c,this.b,a)};_.Xk=function Pke(a,b){return Bke(this,a,b)};_.$b=function Qke(){Cke(this)};_.Hc=function Rke(a){return cge(this.c,this.b,a)};_.Ic=function Ske(a){return ege(this.c,this.b,a)};_.Xb=function Tke(a){return hge(this.c,this.b,a,true)};_.Fk=function Uke(a){return this};_.dd=function Vke(a){return jge(this.c,this.b,a)};_.dc=function Wke(){return Dke(this)};_.Qj=function Xke(){return !pge(this.c,this.b)};_.Kc=function Yke(){return qge(this.c,this.b)};_.ed=function Zke(){return sge(this.c,this.b)};_.fd=function $ke(a){return tge(this.c,this.b,a)};_.Ti=function _ke(a,b){return vge(this.c,this.b,a,b)};_.Ui=function ale(a,b){wge(this.c,this.b,a,b)};_.gd=function ble(a){return xge(this.c,this.b,a)};_.Mc=function cle(a){return yge(this.c,this.b,a)};_.hd=function dle(a,b){return Ege(this.c,this.b,a,b)};_.Wb=function ele(a){bge(this.c,this.b);Ake(this,RD(a,15))};_.gc=function fle(){return Nge(this.c,this.b)};_.Pc=function gle(){return Oge(this.c,this.b)};_.Qc=function hle(a){return Qge(this.c,this.b,a)};_.Ib=function ile(){var a,b;b=new Qhb;b.a+='[';for(a=Yfe(this.c,this.b);Bhe(a);){Nhb(b,Ghb(Dhe(a)));Bhe(a)&&(b.a+=pve,b)}b.a+=']';return b.a};_.Gk=function jle(){bge(this.c,this.b)};var Obb=sfb(ZJe,'FeatureMapUtil/FeatureEList',509);feb(644,39,GJe,lle);_.hj=function mle(a){return kle(this,a)};_.mj=function nle(a){var b,c,d,e,f,g,h;switch(this.d){case 1:case 2:{f=a.jj();if(dE(f)===dE(this.c)&&kle(this,null)==a.hj(null)){this.g=a.ij();a.gj()==1&&(this.d=1);return true}break}case 3:{e=a.gj();switch(e){case 3:{f=a.jj();if(dE(f)===dE(this.c)&&kle(this,null)==a.hj(null)){this.d=5;b=new ZHd(2);WGd(b,this.g);WGd(b,a.ij());this.g=b;return true}break}}break}case 5:{e=a.gj();switch(e){case 3:{f=a.jj();if(dE(f)===dE(this.c)&&kle(this,null)==a.hj(null)){c=RD(this.g,16);c.Fc(a.ij());return true}break}}break}case 4:{e=a.gj();switch(e){case 3:{f=a.jj();if(dE(f)===dE(this.c)&&kle(this,null)==a.hj(null)){this.d=1;this.g=a.ij();return true}break}case 4:{f=a.jj();if(dE(f)===dE(this.c)&&kle(this,null)==a.hj(null)){this.d=6;h=new ZHd(2);WGd(h,this.n);WGd(h,a.kj());this.n=h;g=cD(WC(kE,1),Pwe,28,15,[this.o,a.lj()]);this.g=g;return true}break}}break}case 6:{e=a.gj();switch(e){case 4:{f=a.jj();if(dE(f)===dE(this.c)&&kle(this,null)==a.hj(null)){c=RD(this.n,16);c.Fc(a.kj());g=RD(this.g,53);d=$C(kE,Pwe,28,g.length+1,15,1);hib(g,0,d,0,g.length);d[g.length]=a.lj();this.g=d;return true}break}}break}}return false};var Pbb=sfb(ZJe,'FeatureMapUtil/FeatureENotificationImpl',644);feb(564,509,{20:1,31:1,56:1,16:1,15:1,61:1,79:1,160:1,220:1,2036:1,71:1,97:1},ole);_.Ol=function ple(a,b){return Qfe(this.c,a,b)};_.Pl=function qle(a,b,c){return Xfe(this.c,a,b,c)};_.Ql=function rle(a,b,c){return age(this.c,a,b,c)};_.Rl=function sle(){return this};_.Sl=function tle(a,b){return ige(this.c,a,b)};_.Tl=function ule(a){return RD(hge(this.c,this.b,a,false),76).Lk()};_.Ul=function vle(a){return RD(hge(this.c,this.b,a,false),76).md()};_.Vl=function wle(){return this.a};_.Wl=function xle(a){return !pge(this.c,a)};_.Xl=function yle(a,b){Fge(this.c,a,b)};_.Yl=function zle(a){return Gge(this.c,a)};_.Zl=function Ale(a){Sge(this.c,a)};var Qbb=sfb(ZJe,'FeatureMapUtil/FeatureFeatureMap',564);feb(1294,1,$Je,Ble);_.Fk=function Cle(a){return hge(this.b,this.a,-1,a)};_.Qj=function Dle(){return !pge(this.b,this.a)};_.Wb=function Ele(a){Fge(this.b,this.a,a)};_.Gk=function Fle(){bge(this.b,this.a)};var Rbb=sfb(ZJe,'FeatureMapUtil/FeatureValue',1294);var Gle,Hle,Ile,Jle,Kle;var Vbb=ufb(hLe,'AnyType');feb(680,63,swe,Mle);var Wbb=sfb(hLe,'InvalidDatatypeValueException',680);var Xbb=ufb(hLe,iLe);var Ybb=ufb(hLe,jLe);var Zbb=ufb(hLe,kLe);var Nle;var Ple;var Rle,Sle,Tle,Ule,Vle,Wle,Xle,Yle,Zle,$le,_le,ame,bme,cme,dme,eme,fme,gme,hme,ime,jme,kme,lme,mme;feb(844,516,{110:1,94:1,93:1,58:1,54:1,99:1,857:1},ome);_.Lh=function pme(a,b,c){switch(a){case 0:if(c)return !this.c&&(this.c=new Uge(this,0)),this.c;return !this.c&&(this.c=new Uge(this,0)),this.c.b;case 1:if(c)return !this.c&&(this.c=new Uge(this,0)),RD(rge(this.c,(nme(),Sle)),160);return (!this.c&&(this.c=new Uge(this,0)),RD(RD(rge(this.c,(nme(),Sle)),160),220)).Vl();case 2:if(c)return !this.b&&(this.b=new Uge(this,2)),this.b;return !this.b&&(this.b=new Uge(this,2)),this.b.b;}return zvd(this,a-AYd(this.ii()),vYd((this.j&2)==0?this.ii():(!this.k&&(this.k=new fUd),this.k).Nk(),a),b,c)};_.Uh=function qme(a,b,c){var d;switch(b){case 0:return !this.c&&(this.c=new Uge(this,0)),_fe(this.c,a,c);case 1:return (!this.c&&(this.c=new Uge(this,0)),RD(RD(rge(this.c,(nme(),Sle)),160),71)).Xk(a,c);case 2:return !this.b&&(this.b=new Uge(this,2)),_fe(this.b,a,c);}return d=RD(vYd((this.j&2)==0?this.ii():(!this.k&&(this.k=new fUd),this.k).Nk(),b),69),d.wk().Ak(this,Yvd(this),b-AYd(this.ii()),a,c)};_.Wh=function rme(a){switch(a){case 0:return !!this.c&&this.c.i!=0;case 1:return !(!this.c&&(this.c=new Uge(this,0)),RD(rge(this.c,(nme(),Sle)),160)).dc();case 2:return !!this.b&&this.b.i!=0;}return Avd(this,a-AYd(this.ii()),vYd((this.j&2)==0?this.ii():(!this.k&&(this.k=new fUd),this.k).Nk(),a))};_.bi=function sme(a,b){switch(a){case 0:!this.c&&(this.c=new Uge(this,0));Dge(this.c,b);return;case 1:(!this.c&&(this.c=new Uge(this,0)),RD(RD(rge(this.c,(nme(),Sle)),160),220)).Wb(b);return;case 2:!this.b&&(this.b=new Uge(this,2));Dge(this.b,b);return;}Bvd(this,a-AYd(this.ii()),vYd((this.j&2)==0?this.ii():(!this.k&&(this.k=new fUd),this.k).Nk(),a),b)};_.ii=function tme(){return nme(),Rle};_.ki=function ume(a){switch(a){case 0:!this.c&&(this.c=new Uge(this,0));sLd(this.c);return;case 1:(!this.c&&(this.c=new Uge(this,0)),RD(rge(this.c,(nme(),Sle)),160)).$b();return;case 2:!this.b&&(this.b=new Uge(this,2));sLd(this.b);return;}Cvd(this,a-AYd(this.ii()),vYd((this.j&2)==0?this.ii():(!this.k&&(this.k=new fUd),this.k).Nk(),a))};_.Ib=function vme(){var a;if((this.j&4)!=0)return awd(this);a=new Shb(awd(this));a.a+=' (mixed: ';Mhb(a,this.c);a.a+=', anyAttribute: ';Mhb(a,this.b);a.a+=')';return a.a};var $bb=sfb(lLe,'AnyTypeImpl',844);feb(681,516,{110:1,94:1,93:1,58:1,54:1,99:1,2119:1,681:1},yme);_.Lh=function zme(a,b,c){switch(a){case 0:return this.a;case 1:return this.b;}return zvd(this,a-AYd((nme(),cme)),vYd((this.j&2)==0?cme:(!this.k&&(this.k=new fUd),this.k).Nk(),a),b,c)};_.Wh=function Ame(a){switch(a){case 0:return this.a!=null;case 1:return this.b!=null;}return Avd(this,a-AYd((nme(),cme)),vYd((this.j&2)==0?cme:(!this.k&&(this.k=new fUd),this.k).Nk(),a))};_.bi=function Bme(a,b){switch(a){case 0:wme(this,WD(b));return;case 1:xme(this,WD(b));return;}Bvd(this,a-AYd((nme(),cme)),vYd((this.j&2)==0?cme:(!this.k&&(this.k=new fUd),this.k).Nk(),a),b)};_.ii=function Cme(){return nme(),cme};_.ki=function Dme(a){switch(a){case 0:this.a=null;return;case 1:this.b=null;return;}Cvd(this,a-AYd((nme(),cme)),vYd((this.j&2)==0?cme:(!this.k&&(this.k=new fUd),this.k).Nk(),a))};_.Ib=function Eme(){var a;if((this.j&4)!=0)return awd(this);a=new Shb(awd(this));a.a+=' (data: ';Nhb(a,this.a);a.a+=', target: ';Nhb(a,this.b);a.a+=')';return a.a};_.a=null;_.b=null;var _bb=sfb(lLe,'ProcessingInstructionImpl',681);feb(682,844,{110:1,94:1,93:1,58:1,54:1,99:1,857:1,2120:1,682:1},Hme);_.Lh=function Ime(a,b,c){switch(a){case 0:if(c)return !this.c&&(this.c=new Uge(this,0)),this.c;return !this.c&&(this.c=new Uge(this,0)),this.c.b;case 1:if(c)return !this.c&&(this.c=new Uge(this,0)),RD(rge(this.c,(nme(),Sle)),160);return (!this.c&&(this.c=new Uge(this,0)),RD(RD(rge(this.c,(nme(),Sle)),160),220)).Vl();case 2:if(c)return !this.b&&(this.b=new Uge(this,2)),this.b;return !this.b&&(this.b=new Uge(this,2)),this.b.b;case 3:return !this.c&&(this.c=new Uge(this,0)),WD(ige(this.c,(nme(),fme),true));case 4:return Ije(this.a,(!this.c&&(this.c=new Uge(this,0)),WD(ige(this.c,(nme(),fme),true))));case 5:return this.a;}return zvd(this,a-AYd((nme(),eme)),vYd((this.j&2)==0?eme:(!this.k&&(this.k=new fUd),this.k).Nk(),a),b,c)};_.Wh=function Jme(a){switch(a){case 0:return !!this.c&&this.c.i!=0;case 1:return !(!this.c&&(this.c=new Uge(this,0)),RD(rge(this.c,(nme(),Sle)),160)).dc();case 2:return !!this.b&&this.b.i!=0;case 3:return !this.c&&(this.c=new Uge(this,0)),WD(ige(this.c,(nme(),fme),true))!=null;case 4:return Ije(this.a,(!this.c&&(this.c=new Uge(this,0)),WD(ige(this.c,(nme(),fme),true))))!=null;case 5:return !!this.a;}return Avd(this,a-AYd((nme(),eme)),vYd((this.j&2)==0?eme:(!this.k&&(this.k=new fUd),this.k).Nk(),a))};_.bi=function Kme(a,b){switch(a){case 0:!this.c&&(this.c=new Uge(this,0));Dge(this.c,b);return;case 1:(!this.c&&(this.c=new Uge(this,0)),RD(RD(rge(this.c,(nme(),Sle)),160),220)).Wb(b);return;case 2:!this.b&&(this.b=new Uge(this,2));Dge(this.b,b);return;case 3:Gme(this,WD(b));return;case 4:Gme(this,Hje(this.a,b));return;case 5:Fme(this,RD(b,156));return;}Bvd(this,a-AYd((nme(),eme)),vYd((this.j&2)==0?eme:(!this.k&&(this.k=new fUd),this.k).Nk(),a),b)};_.ii=function Lme(){return nme(),eme};_.ki=function Mme(a){switch(a){case 0:!this.c&&(this.c=new Uge(this,0));sLd(this.c);return;case 1:(!this.c&&(this.c=new Uge(this,0)),RD(rge(this.c,(nme(),Sle)),160)).$b();return;case 2:!this.b&&(this.b=new Uge(this,2));sLd(this.b);return;case 3:!this.c&&(this.c=new Uge(this,0));Fge(this.c,(nme(),fme),null);return;case 4:Gme(this,Hje(this.a,null));return;case 5:this.a=null;return;}Cvd(this,a-AYd((nme(),eme)),vYd((this.j&2)==0?eme:(!this.k&&(this.k=new fUd),this.k).Nk(),a))};var acb=sfb(lLe,'SimpleAnyTypeImpl',682);feb(683,516,{110:1,94:1,93:1,58:1,54:1,99:1,2121:1,683:1},Nme);_.Lh=function Ome(a,b,c){switch(a){case 0:if(c)return !this.a&&(this.a=new Uge(this,0)),this.a;return !this.a&&(this.a=new Uge(this,0)),this.a.b;case 1:return c?(!this.b&&(this.b=new DVd((JTd(),FTd),C8,this,1)),this.b):(!this.b&&(this.b=new DVd((JTd(),FTd),C8,this,1)),dOd(this.b));case 2:return c?(!this.c&&(this.c=new DVd((JTd(),FTd),C8,this,2)),this.c):(!this.c&&(this.c=new DVd((JTd(),FTd),C8,this,2)),dOd(this.c));case 3:return !this.a&&(this.a=new Uge(this,0)),rge(this.a,(nme(),ime));case 4:return !this.a&&(this.a=new Uge(this,0)),rge(this.a,(nme(),jme));case 5:return !this.a&&(this.a=new Uge(this,0)),rge(this.a,(nme(),lme));case 6:return !this.a&&(this.a=new Uge(this,0)),rge(this.a,(nme(),mme));}return zvd(this,a-AYd((nme(),hme)),vYd((this.j&2)==0?hme:(!this.k&&(this.k=new fUd),this.k).Nk(),a),b,c)};_.Uh=function Pme(a,b,c){var d;switch(b){case 0:return !this.a&&(this.a=new Uge(this,0)),_fe(this.a,a,c);case 1:return !this.b&&(this.b=new DVd((JTd(),FTd),C8,this,1)),BVd(this.b,a,c);case 2:return !this.c&&(this.c=new DVd((JTd(),FTd),C8,this,2)),BVd(this.c,a,c);case 5:return !this.a&&(this.a=new Uge(this,0)),Bke(rge(this.a,(nme(),lme)),a,c);}return d=RD(vYd((this.j&2)==0?(nme(),hme):(!this.k&&(this.k=new fUd),this.k).Nk(),b),69),d.wk().Ak(this,Yvd(this),b-AYd((nme(),hme)),a,c)};_.Wh=function Qme(a){switch(a){case 0:return !!this.a&&this.a.i!=0;case 1:return !!this.b&&this.b.f!=0;case 2:return !!this.c&&this.c.f!=0;case 3:return !this.a&&(this.a=new Uge(this,0)),!Dke(rge(this.a,(nme(),ime)));case 4:return !this.a&&(this.a=new Uge(this,0)),!Dke(rge(this.a,(nme(),jme)));case 5:return !this.a&&(this.a=new Uge(this,0)),!Dke(rge(this.a,(nme(),lme)));case 6:return !this.a&&(this.a=new Uge(this,0)),!Dke(rge(this.a,(nme(),mme)));}return Avd(this,a-AYd((nme(),hme)),vYd((this.j&2)==0?hme:(!this.k&&(this.k=new fUd),this.k).Nk(),a))};_.bi=function Rme(a,b){switch(a){case 0:!this.a&&(this.a=new Uge(this,0));Dge(this.a,b);return;case 1:!this.b&&(this.b=new DVd((JTd(),FTd),C8,this,1));CVd(this.b,b);return;case 2:!this.c&&(this.c=new DVd((JTd(),FTd),C8,this,2));CVd(this.c,b);return;case 3:!this.a&&(this.a=new Uge(this,0));Cke(rge(this.a,(nme(),ime)));!this.a&&(this.a=new Uge(this,0));Ake(rge(this.a,ime),RD(b,16));return;case 4:!this.a&&(this.a=new Uge(this,0));Cke(rge(this.a,(nme(),jme)));!this.a&&(this.a=new Uge(this,0));Ake(rge(this.a,jme),RD(b,16));return;case 5:!this.a&&(this.a=new Uge(this,0));Cke(rge(this.a,(nme(),lme)));!this.a&&(this.a=new Uge(this,0));Ake(rge(this.a,lme),RD(b,16));return;case 6:!this.a&&(this.a=new Uge(this,0));Cke(rge(this.a,(nme(),mme)));!this.a&&(this.a=new Uge(this,0));Ake(rge(this.a,mme),RD(b,16));return;}Bvd(this,a-AYd((nme(),hme)),vYd((this.j&2)==0?hme:(!this.k&&(this.k=new fUd),this.k).Nk(),a),b)};_.ii=function Sme(){return nme(),hme};_.ki=function Tme(a){switch(a){case 0:!this.a&&(this.a=new Uge(this,0));sLd(this.a);return;case 1:!this.b&&(this.b=new DVd((JTd(),FTd),C8,this,1));this.b.c.$b();return;case 2:!this.c&&(this.c=new DVd((JTd(),FTd),C8,this,2));this.c.c.$b();return;case 3:!this.a&&(this.a=new Uge(this,0));Cke(rge(this.a,(nme(),ime)));return;case 4:!this.a&&(this.a=new Uge(this,0));Cke(rge(this.a,(nme(),jme)));return;case 5:!this.a&&(this.a=new Uge(this,0));Cke(rge(this.a,(nme(),lme)));return;case 6:!this.a&&(this.a=new Uge(this,0));Cke(rge(this.a,(nme(),mme)));return;}Cvd(this,a-AYd((nme(),hme)),vYd((this.j&2)==0?hme:(!this.k&&(this.k=new fUd),this.k).Nk(),a))};_.Ib=function Ume(){var a;if((this.j&4)!=0)return awd(this);a=new Shb(awd(this));a.a+=' (mixed: ';Mhb(a,this.a);a.a+=')';return a.a};var bcb=sfb(lLe,'XMLTypeDocumentRootImpl',683);feb(2028,720,{110:1,94:1,93:1,480:1,155:1,58:1,114:1,54:1,99:1,158:1,119:1,120:1,2122:1},rne);_.ri=function sne(a,b){switch(a.hk()){case 7:case 8:case 9:case 10:case 16:case 22:case 23:case 24:case 25:case 26:case 32:case 33:case 34:case 36:case 37:case 44:case 45:case 50:case 51:case 53:case 55:case 56:case 57:case 58:case 60:case 61:case 4:return b==null?null:jeb(b);case 19:case 28:case 29:case 35:case 38:case 39:case 41:case 46:case 52:case 54:case 5:return WD(b);case 6:return _me(RD(b,195));case 12:case 47:case 49:case 11:return tAd(this,a,b);case 13:return b==null?null:yib(RD(b,247));case 15:case 14:return b==null?null:ane(Kfb(UD(b)));case 17:return bne((nme(),b));case 18:return bne(b);case 21:case 20:return b==null?null:cne(RD(b,161).a);case 27:return dne(RD(b,195));case 30:return ene((nme(),RD(b,15)));case 31:return ene(RD(b,15));case 40:return hne((nme(),b));case 42:return fne((nme(),b));case 43:return fne(b);case 59:case 48:return gne((nme(),b));default:throw Adb(new agb(VHe+a.xe()+WHe));}};_.si=function tne(a){var b,c,d,e,f;switch(a.G==-1&&(a.G=(c=BXd(a),c?fZd(c.vi(),a):-1)),a.G){case 0:return b=new ome,b;case 1:return d=new yme,d;case 2:return e=new Hme,e;case 3:return f=new Nme,f;default:throw Adb(new agb(ZHe+a.zb+WHe));}};_.ti=function une(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r;switch(a.hk()){case 5:case 52:case 4:return b;case 6:return ine(b);case 8:case 7:return b==null?null:$me(b);case 9:return b==null?null:$eb(Oeb((d=nue(b,true),d.length>0&&(BFb(0,d.length),d.charCodeAt(0)==43)?(BFb(1,d.length+1),d.substr(1)):d),-128,127)<<24>>24);case 10:return b==null?null:$eb(Oeb((e=nue(b,true),e.length>0&&(BFb(0,e.length),e.charCodeAt(0)==43)?(BFb(1,e.length+1),e.substr(1)):e),-128,127)<<24>>24);case 11:return WD(uAd(this,(nme(),Vle),b));case 12:return WD(uAd(this,(nme(),Wle),b));case 13:return b==null?null:new Bib(nue(b,true));case 15:case 14:return jne(b);case 16:return WD(uAd(this,(nme(),Xle),b));case 17:return kne((nme(),b));case 18:return kne(b);case 28:case 29:case 35:case 38:case 39:case 41:case 54:case 19:return nue(b,true);case 21:case 20:return lne(b);case 22:return WD(uAd(this,(nme(),Yle),b));case 23:return WD(uAd(this,(nme(),Zle),b));case 24:return WD(uAd(this,(nme(),$le),b));case 25:return WD(uAd(this,(nme(),_le),b));case 26:return WD(uAd(this,(nme(),ame),b));case 27:return mne(b);case 30:return nne((nme(),b));case 31:return nne(b);case 32:return b==null?null:sgb(Oeb((k=nue(b,true),k.length>0&&(BFb(0,k.length),k.charCodeAt(0)==43)?(BFb(1,k.length+1),k.substr(1)):k),qwe,lve));case 33:return b==null?null:new ejb((l=nue(b,true),l.length>0&&(BFb(0,l.length),l.charCodeAt(0)==43)?(BFb(1,l.length+1),l.substr(1)):l));case 34:return b==null?null:sgb(Oeb((m=nue(b,true),m.length>0&&(BFb(0,m.length),m.charCodeAt(0)==43)?(BFb(1,m.length+1),m.substr(1)):m),qwe,lve));case 36:return b==null?null:Hgb(Peb((n=nue(b,true),n.length>0&&(BFb(0,n.length),n.charCodeAt(0)==43)?(BFb(1,n.length+1),n.substr(1)):n)));case 37:return b==null?null:Hgb(Peb((o=nue(b,true),o.length>0&&(BFb(0,o.length),o.charCodeAt(0)==43)?(BFb(1,o.length+1),o.substr(1)):o)));case 40:return qne((nme(),b));case 42:return one((nme(),b));case 43:return one(b);case 44:return b==null?null:new ejb((p=nue(b,true),p.length>0&&(BFb(0,p.length),p.charCodeAt(0)==43)?(BFb(1,p.length+1),p.substr(1)):p));case 45:return b==null?null:new ejb((q=nue(b,true),q.length>0&&(BFb(0,q.length),q.charCodeAt(0)==43)?(BFb(1,q.length+1),q.substr(1)):q));case 46:return nue(b,false);case 47:return WD(uAd(this,(nme(),bme),b));case 59:case 48:return pne((nme(),b));case 49:return WD(uAd(this,(nme(),dme),b));case 50:return b==null?null:bhb(Oeb((r=nue(b,true),r.length>0&&(BFb(0,r.length),r.charCodeAt(0)==43)?(BFb(1,r.length+1),r.substr(1)):r),BKe,32767)<<16>>16);case 51:return b==null?null:bhb(Oeb((f=nue(b,true),f.length>0&&(BFb(0,f.length),f.charCodeAt(0)==43)?(BFb(1,f.length+1),f.substr(1)):f),BKe,32767)<<16>>16);case 53:return WD(uAd(this,(nme(),gme),b));case 55:return b==null?null:bhb(Oeb((g=nue(b,true),g.length>0&&(BFb(0,g.length),g.charCodeAt(0)==43)?(BFb(1,g.length+1),g.substr(1)):g),BKe,32767)<<16>>16);case 56:return b==null?null:bhb(Oeb((h=nue(b,true),h.length>0&&(BFb(0,h.length),h.charCodeAt(0)==43)?(BFb(1,h.length+1),h.substr(1)):h),BKe,32767)<<16>>16);case 57:return b==null?null:Hgb(Peb((i=nue(b,true),i.length>0&&(BFb(0,i.length),i.charCodeAt(0)==43)?(BFb(1,i.length+1),i.substr(1)):i)));case 58:return b==null?null:Hgb(Peb((j=nue(b,true),j.length>0&&(BFb(0,j.length),j.charCodeAt(0)==43)?(BFb(1,j.length+1),j.substr(1)):j)));case 60:return b==null?null:sgb(Oeb((c=nue(b,true),c.length>0&&(BFb(0,c.length),c.charCodeAt(0)==43)?(BFb(1,c.length+1),c.substr(1)):c),qwe,lve));case 61:return b==null?null:sgb(Oeb(nue(b,true),qwe,lve));default:throw Adb(new agb(VHe+a.xe()+WHe));}};var Vme,Wme,Xme,Yme;var ccb=sfb(lLe,'XMLTypeFactoryImpl',2028);feb(594,184,{110:1,94:1,93:1,155:1,197:1,58:1,241:1,114:1,54:1,99:1,158:1,184:1,119:1,120:1,690:1,2044:1,594:1},Bne);_.N=false;_.O=false;var wne=false;var bdb=sfb(lLe,'XMLTypePackageImpl',594);feb(1961,1,{851:1},Ene);_.Kk=function Fne(){return rue(),que};var ncb=sfb(lLe,'XMLTypePackageImpl/1',1961);feb(1970,1,OKe,Gne);_.fk=function Hne(a){return bE(a)};_.gk=function Ine(a){return $C(qJ,Nve,2,a,6,1)};var dcb=sfb(lLe,'XMLTypePackageImpl/10',1970);feb(1971,1,OKe,Jne);_.fk=function Kne(a){return bE(a)};_.gk=function Lne(a){return $C(qJ,Nve,2,a,6,1)};var ecb=sfb(lLe,'XMLTypePackageImpl/11',1971);feb(1972,1,OKe,Mne);_.fk=function Nne(a){return bE(a)};_.gk=function One(a){return $C(qJ,Nve,2,a,6,1)};var fcb=sfb(lLe,'XMLTypePackageImpl/12',1972);feb(1973,1,OKe,Pne);_.fk=function Qne(a){return _D(a)};_.gk=function Rne(a){return $C(VI,Nve,345,a,7,1)};var gcb=sfb(lLe,'XMLTypePackageImpl/13',1973);feb(1974,1,OKe,Sne);_.fk=function Tne(a){return bE(a)};_.gk=function Une(a){return $C(qJ,Nve,2,a,6,1)};var hcb=sfb(lLe,'XMLTypePackageImpl/14',1974);feb(1975,1,OKe,Vne);_.fk=function Wne(a){return ZD(a,15)};_.gk=function Xne(a){return $C(QK,Ize,15,a,0,1)};var icb=sfb(lLe,'XMLTypePackageImpl/15',1975);feb(1976,1,OKe,Yne);_.fk=function Zne(a){return ZD(a,15)};_.gk=function $ne(a){return $C(QK,Ize,15,a,0,1)};var jcb=sfb(lLe,'XMLTypePackageImpl/16',1976);feb(1977,1,OKe,_ne);_.fk=function aoe(a){return bE(a)};_.gk=function boe(a){return $C(qJ,Nve,2,a,6,1)};var kcb=sfb(lLe,'XMLTypePackageImpl/17',1977);feb(1978,1,OKe,coe);_.fk=function doe(a){return ZD(a,161)};_.gk=function eoe(a){return $C(ZI,Nve,161,a,0,1)};var lcb=sfb(lLe,'XMLTypePackageImpl/18',1978);feb(1979,1,OKe,foe);_.fk=function goe(a){return bE(a)};_.gk=function hoe(a){return $C(qJ,Nve,2,a,6,1)};var mcb=sfb(lLe,'XMLTypePackageImpl/19',1979);feb(1962,1,OKe,ioe);_.fk=function joe(a){return ZD(a,857)};_.gk=function koe(a){return $C(Vbb,rve,857,a,0,1)};var ycb=sfb(lLe,'XMLTypePackageImpl/2',1962);feb(1980,1,OKe,loe);_.fk=function moe(a){return bE(a)};_.gk=function noe(a){return $C(qJ,Nve,2,a,6,1)};var ocb=sfb(lLe,'XMLTypePackageImpl/20',1980);feb(1981,1,OKe,ooe);_.fk=function poe(a){return bE(a)};_.gk=function qoe(a){return $C(qJ,Nve,2,a,6,1)};var pcb=sfb(lLe,'XMLTypePackageImpl/21',1981);feb(1982,1,OKe,roe);_.fk=function soe(a){return bE(a)};_.gk=function toe(a){return $C(qJ,Nve,2,a,6,1)};var qcb=sfb(lLe,'XMLTypePackageImpl/22',1982);feb(1983,1,OKe,uoe);_.fk=function voe(a){return bE(a)};_.gk=function woe(a){return $C(qJ,Nve,2,a,6,1)};var rcb=sfb(lLe,'XMLTypePackageImpl/23',1983);feb(1984,1,OKe,xoe);_.fk=function yoe(a){return ZD(a,195)};_.gk=function zoe(a){return $C(gE,Nve,195,a,0,2)};var scb=sfb(lLe,'XMLTypePackageImpl/24',1984);feb(1985,1,OKe,Aoe);_.fk=function Boe(a){return bE(a)};_.gk=function Coe(a){return $C(qJ,Nve,2,a,6,1)};var tcb=sfb(lLe,'XMLTypePackageImpl/25',1985);feb(1986,1,OKe,Doe);_.fk=function Eoe(a){return bE(a)};_.gk=function Foe(a){return $C(qJ,Nve,2,a,6,1)};var ucb=sfb(lLe,'XMLTypePackageImpl/26',1986);feb(1987,1,OKe,Goe);_.fk=function Hoe(a){return ZD(a,15)};_.gk=function Ioe(a){return $C(QK,Ize,15,a,0,1)};var vcb=sfb(lLe,'XMLTypePackageImpl/27',1987);feb(1988,1,OKe,Joe);_.fk=function Koe(a){return ZD(a,15)};_.gk=function Loe(a){return $C(QK,Ize,15,a,0,1)};var wcb=sfb(lLe,'XMLTypePackageImpl/28',1988);feb(1989,1,OKe,Moe);_.fk=function Noe(a){return bE(a)};_.gk=function Ooe(a){return $C(qJ,Nve,2,a,6,1)};var xcb=sfb(lLe,'XMLTypePackageImpl/29',1989);feb(1963,1,OKe,Poe);_.fk=function Qoe(a){return ZD(a,681)};_.gk=function Roe(a){return $C(Xbb,rve,2119,a,0,1)};var Jcb=sfb(lLe,'XMLTypePackageImpl/3',1963);feb(1990,1,OKe,Soe);_.fk=function Toe(a){return ZD(a,17)};_.gk=function Uoe(a){return $C(bJ,Nve,17,a,0,1)};var zcb=sfb(lLe,'XMLTypePackageImpl/30',1990);feb(1991,1,OKe,Voe);_.fk=function Woe(a){return bE(a)};_.gk=function Xoe(a){return $C(qJ,Nve,2,a,6,1)};var Acb=sfb(lLe,'XMLTypePackageImpl/31',1991);feb(1992,1,OKe,Yoe);_.fk=function Zoe(a){return ZD(a,168)};_.gk=function $oe(a){return $C(eJ,Nve,168,a,0,1)};var Bcb=sfb(lLe,'XMLTypePackageImpl/32',1992);feb(1993,1,OKe,_oe);_.fk=function ape(a){return bE(a)};_.gk=function bpe(a){return $C(qJ,Nve,2,a,6,1)};var Ccb=sfb(lLe,'XMLTypePackageImpl/33',1993);feb(1994,1,OKe,cpe);_.fk=function dpe(a){return bE(a)};_.gk=function epe(a){return $C(qJ,Nve,2,a,6,1)};var Dcb=sfb(lLe,'XMLTypePackageImpl/34',1994);feb(1995,1,OKe,fpe);_.fk=function gpe(a){return bE(a)};_.gk=function hpe(a){return $C(qJ,Nve,2,a,6,1)};var Ecb=sfb(lLe,'XMLTypePackageImpl/35',1995);feb(1996,1,OKe,ipe);_.fk=function jpe(a){return bE(a)};_.gk=function kpe(a){return $C(qJ,Nve,2,a,6,1)};var Fcb=sfb(lLe,'XMLTypePackageImpl/36',1996);feb(1997,1,OKe,lpe);_.fk=function mpe(a){return ZD(a,15)};_.gk=function npe(a){return $C(QK,Ize,15,a,0,1)};var Gcb=sfb(lLe,'XMLTypePackageImpl/37',1997);feb(1998,1,OKe,ope);_.fk=function ppe(a){return ZD(a,15)};_.gk=function qpe(a){return $C(QK,Ize,15,a,0,1)};var Hcb=sfb(lLe,'XMLTypePackageImpl/38',1998);feb(1999,1,OKe,rpe);_.fk=function spe(a){return bE(a)};_.gk=function tpe(a){return $C(qJ,Nve,2,a,6,1)};var Icb=sfb(lLe,'XMLTypePackageImpl/39',1999);feb(1964,1,OKe,upe);_.fk=function vpe(a){return ZD(a,682)};_.gk=function wpe(a){return $C(Ybb,rve,2120,a,0,1)};var Ucb=sfb(lLe,'XMLTypePackageImpl/4',1964);feb(2000,1,OKe,xpe);_.fk=function ype(a){return bE(a)};_.gk=function zpe(a){return $C(qJ,Nve,2,a,6,1)};var Kcb=sfb(lLe,'XMLTypePackageImpl/40',2000);feb(2001,1,OKe,Ape);_.fk=function Bpe(a){return bE(a)};_.gk=function Cpe(a){return $C(qJ,Nve,2,a,6,1)};var Lcb=sfb(lLe,'XMLTypePackageImpl/41',2001);feb(2002,1,OKe,Dpe);_.fk=function Epe(a){return bE(a)};_.gk=function Fpe(a){return $C(qJ,Nve,2,a,6,1)};var Mcb=sfb(lLe,'XMLTypePackageImpl/42',2002);feb(2003,1,OKe,Gpe);_.fk=function Hpe(a){return bE(a)};_.gk=function Ipe(a){return $C(qJ,Nve,2,a,6,1)};var Ncb=sfb(lLe,'XMLTypePackageImpl/43',2003);feb(2004,1,OKe,Jpe);_.fk=function Kpe(a){return bE(a)};_.gk=function Lpe(a){return $C(qJ,Nve,2,a,6,1)};var Ocb=sfb(lLe,'XMLTypePackageImpl/44',2004);feb(2005,1,OKe,Mpe);_.fk=function Npe(a){return ZD(a,191)};_.gk=function Ope(a){return $C(lJ,Nve,191,a,0,1)};var Pcb=sfb(lLe,'XMLTypePackageImpl/45',2005);feb(2006,1,OKe,Ppe);_.fk=function Qpe(a){return bE(a)};_.gk=function Rpe(a){return $C(qJ,Nve,2,a,6,1)};var Qcb=sfb(lLe,'XMLTypePackageImpl/46',2006);feb(2007,1,OKe,Spe);_.fk=function Tpe(a){return bE(a)};_.gk=function Upe(a){return $C(qJ,Nve,2,a,6,1)};var Rcb=sfb(lLe,'XMLTypePackageImpl/47',2007);feb(2008,1,OKe,Vpe);_.fk=function Wpe(a){return bE(a)};_.gk=function Xpe(a){return $C(qJ,Nve,2,a,6,1)};var Scb=sfb(lLe,'XMLTypePackageImpl/48',2008);feb(2009,1,OKe,Ype);_.fk=function Zpe(a){return ZD(a,191)};_.gk=function $pe(a){return $C(lJ,Nve,191,a,0,1)};var Tcb=sfb(lLe,'XMLTypePackageImpl/49',2009);feb(1965,1,OKe,_pe);_.fk=function aqe(a){return ZD(a,683)};_.gk=function bqe(a){return $C(Zbb,rve,2121,a,0,1)};var Ycb=sfb(lLe,'XMLTypePackageImpl/5',1965);feb(2010,1,OKe,cqe);_.fk=function dqe(a){return ZD(a,168)};_.gk=function eqe(a){return $C(eJ,Nve,168,a,0,1)};var Vcb=sfb(lLe,'XMLTypePackageImpl/50',2010);feb(2011,1,OKe,fqe);_.fk=function gqe(a){return bE(a)};_.gk=function hqe(a){return $C(qJ,Nve,2,a,6,1)};var Wcb=sfb(lLe,'XMLTypePackageImpl/51',2011);feb(2012,1,OKe,iqe);_.fk=function jqe(a){return ZD(a,17)};_.gk=function kqe(a){return $C(bJ,Nve,17,a,0,1)};var Xcb=sfb(lLe,'XMLTypePackageImpl/52',2012);feb(1966,1,OKe,lqe);_.fk=function mqe(a){return bE(a)};_.gk=function nqe(a){return $C(qJ,Nve,2,a,6,1)};var Zcb=sfb(lLe,'XMLTypePackageImpl/6',1966);feb(1967,1,OKe,oqe);_.fk=function pqe(a){return ZD(a,195)};_.gk=function qqe(a){return $C(gE,Nve,195,a,0,2)};var $cb=sfb(lLe,'XMLTypePackageImpl/7',1967);feb(1968,1,OKe,rqe);_.fk=function sqe(a){return $D(a)};_.gk=function tqe(a){return $C(QI,Nve,485,a,8,1)};var _cb=sfb(lLe,'XMLTypePackageImpl/8',1968);feb(1969,1,OKe,uqe);_.fk=function vqe(a){return ZD(a,222)};_.gk=function wqe(a){return $C(RI,Nve,222,a,0,1)};var adb=sfb(lLe,'XMLTypePackageImpl/9',1969);var xqe,yqe;var Eqe,Fqe;var Jqe;feb(55,63,swe,Lqe);var cdb=sfb(LLe,'RegEx/ParseException',55);feb(836,1,{},Tqe);_.bm=function Uqe(a){return ac*16)throw Adb(new Lqe(TId((Hde(),tJe))));c=c*16+e}while(true);if(this.a!=125)throw Adb(new Lqe(TId((Hde(),uJe))));if(c>MLe)throw Adb(new Lqe(TId((Hde(),vJe))));a=c}else{e=0;if(this.c!=0||(e=Xqe(this.a))<0)throw Adb(new Lqe(TId((Hde(),sJe))));c=e;Mqe(this);if(this.c!=0||(e=Xqe(this.a))<0)throw Adb(new Lqe(TId((Hde(),sJe))));c=c*16+e;a=c}break;case 117:d=0;Mqe(this);if(this.c!=0||(d=Xqe(this.a))<0)throw Adb(new Lqe(TId((Hde(),sJe))));b=d;Mqe(this);if(this.c!=0||(d=Xqe(this.a))<0)throw Adb(new Lqe(TId((Hde(),sJe))));b=b*16+d;Mqe(this);if(this.c!=0||(d=Xqe(this.a))<0)throw Adb(new Lqe(TId((Hde(),sJe))));b=b*16+d;Mqe(this);if(this.c!=0||(d=Xqe(this.a))<0)throw Adb(new Lqe(TId((Hde(),sJe))));b=b*16+d;a=b;break;case 118:Mqe(this);if(this.c!=0||(d=Xqe(this.a))<0)throw Adb(new Lqe(TId((Hde(),sJe))));b=d;Mqe(this);if(this.c!=0||(d=Xqe(this.a))<0)throw Adb(new Lqe(TId((Hde(),sJe))));b=b*16+d;Mqe(this);if(this.c!=0||(d=Xqe(this.a))<0)throw Adb(new Lqe(TId((Hde(),sJe))));b=b*16+d;Mqe(this);if(this.c!=0||(d=Xqe(this.a))<0)throw Adb(new Lqe(TId((Hde(),sJe))));b=b*16+d;Mqe(this);if(this.c!=0||(d=Xqe(this.a))<0)throw Adb(new Lqe(TId((Hde(),sJe))));b=b*16+d;Mqe(this);if(this.c!=0||(d=Xqe(this.a))<0)throw Adb(new Lqe(TId((Hde(),sJe))));b=b*16+d;if(b>MLe)throw Adb(new Lqe(TId((Hde(),'parser.descappe.4'))));a=b;break;case 65:case 90:case 122:throw Adb(new Lqe(TId((Hde(),wJe))));}return a};_.dm=function Wqe(a){var b,c;switch(a){case 100:c=(this.e&32)==32?hte('Nd',true):(Vse(),Bse);break;case 68:c=(this.e&32)==32?hte('Nd',false):(Vse(),Ise);break;case 119:c=(this.e&32)==32?hte('IsWord',true):(Vse(),Rse);break;case 87:c=(this.e&32)==32?hte('IsWord',false):(Vse(),Kse);break;case 115:c=(this.e&32)==32?hte('IsSpace',true):(Vse(),Mse);break;case 83:c=(this.e&32)==32?hte('IsSpace',false):(Vse(),Jse);break;default:throw Adb(new yz((b=a,NLe+b.toString(16))));}return c};_.em=function Yqe(a){var b,c,d,e,f,g,h,i,j,k,l,m;this.b=1;Mqe(this);b=null;if(this.c==0&&this.a==94){Mqe(this);if(a){k=(Vse(),Vse(),++Use,new xte(5))}else{b=(Vse(),Vse(),++Use,new xte(4));rte(b,0,MLe);k=(null,++Use,new xte(4))}}else{k=(Vse(),Vse(),++Use,new xte(4))}e=true;while((m=this.c)!=1){if(m==0&&this.a==93&&!e)break;e=false;c=this.a;d=false;if(m==10){switch(c){case 100:case 68:case 119:case 87:case 115:case 83:ute(k,this.dm(c));d=true;break;case 105:case 73:case 99:case 67:c=this.um(k,c);c<0&&(d=true);break;case 112:case 80:l=Sqe(this,c);if(!l)throw Adb(new Lqe(TId((Hde(),hJe))));ute(k,l);d=true;break;default:c=this.cm();}}else if(m==20){g=phb(this.i,58,this.d);if(g<0)throw Adb(new Lqe(TId((Hde(),iJe))));h=true;if(ihb(this.i,this.d)==94){++this.d;h=false}f=zhb(this.i,this.d,g);i=ite(f,h,(this.e&512)==512);if(!i)throw Adb(new Lqe(TId((Hde(),kJe))));ute(k,i);d=true;if(g+1>=this.j||ihb(this.i,g+1)!=93)throw Adb(new Lqe(TId((Hde(),iJe))));this.d=g+2}Mqe(this);if(!d){if(this.c!=0||this.a!=45){rte(k,c,c)}else{Mqe(this);if((m=this.c)==1)throw Adb(new Lqe(TId((Hde(),jJe))));if(m==0&&this.a==93){rte(k,c,c);rte(k,45,45)}else{j=this.a;m==10&&(j=this.cm());Mqe(this);rte(k,c,j)}}}(this.e&gwe)==gwe&&this.c==0&&this.a==44&&Mqe(this)}if(this.c==1)throw Adb(new Lqe(TId((Hde(),jJe))));if(b){wte(b,k);k=b}vte(k);ste(k);this.b=0;Mqe(this);return k};_.fm=function Zqe(){var a,b,c,d;c=this.em(false);while((d=this.c)!=7){a=this.a;if(d==0&&(a==45||a==38)||d==4){Mqe(this);if(this.c!=9)throw Adb(new Lqe(TId((Hde(),pJe))));b=this.em(false);if(d==4)ute(c,b);else if(a==45)wte(c,b);else if(a==38)tte(c,b);else throw Adb(new yz('ASSERT'))}else{throw Adb(new Lqe(TId((Hde(),qJe))))}}Mqe(this);return c};_.gm=function $qe(){var a,b;a=this.a-48;b=(Vse(),Vse(),++Use,new eue(12,null,a));!this.g&&(this.g=new gyb);dyb(this.g,new Bte(a));Mqe(this);return b};_.hm=function _qe(){Mqe(this);return Vse(),Nse};_.im=function are(){Mqe(this);return Vse(),Lse};_.jm=function bre(){throw Adb(new Lqe(TId((Hde(),xJe))))};_.km=function cre(){throw Adb(new Lqe(TId((Hde(),xJe))))};_.lm=function dre(){Mqe(this);return fte()};_.mm=function ere(){Mqe(this);return Vse(),Pse};_.nm=function fre(){Mqe(this);return Vse(),Sse};_.om=function gre(){var a;if(this.d>=this.j||((a=ihb(this.i,this.d++))&65504)!=64)throw Adb(new Lqe(TId((Hde(),dJe))));Mqe(this);return Vse(),Vse(),++Use,new Hte(0,a-64)};_.pm=function hre(){Mqe(this);return gte()};_.qm=function ire(){Mqe(this);return Vse(),Tse};_.rm=function jre(){var a;a=(Vse(),Vse(),++Use,new Hte(0,105));Mqe(this);return a};_.sm=function kre(){Mqe(this);return Vse(),Qse};_.tm=function lre(){Mqe(this);return Vse(),Ose};_.um=function mre(a,b){return this.cm()};_.vm=function nre(){Mqe(this);return Vse(),Gse};_.wm=function ore(){var a,b,c,d,e;if(this.d+1>=this.j)throw Adb(new Lqe(TId((Hde(),aJe))));d=-1;b=null;a=ihb(this.i,this.d);if(49<=a&&a<=57){d=a-48;!this.g&&(this.g=new gyb);dyb(this.g,new Bte(d));++this.d;if(ihb(this.i,this.d)!=41)throw Adb(new Lqe(TId((Hde(),ZIe))));++this.d}else{a==63&&--this.d;Mqe(this);b=Pqe(this);switch(b.e){case 20:case 21:case 22:case 23:break;case 8:if(this.c!=7)throw Adb(new Lqe(TId((Hde(),ZIe))));break;default:throw Adb(new Lqe(TId((Hde(),bJe))));}}Mqe(this);e=Qqe(this);c=null;if(e.e==2){if(e.Pm()!=2)throw Adb(new Lqe(TId((Hde(),cJe))));c=e.Lm(1);e=e.Lm(0)}if(this.c!=7)throw Adb(new Lqe(TId((Hde(),ZIe))));Mqe(this);return Vse(),Vse(),++Use,new Ute(d,b,e,c)};_.xm=function pre(){Mqe(this);return Vse(),Hse};_.ym=function qre(){var a;Mqe(this);a=_se(24,Qqe(this));if(this.c!=7)throw Adb(new Lqe(TId((Hde(),ZIe))));Mqe(this);return a};_.zm=function rre(){var a;Mqe(this);a=_se(20,Qqe(this));if(this.c!=7)throw Adb(new Lqe(TId((Hde(),ZIe))));Mqe(this);return a};_.Am=function sre(){var a;Mqe(this);a=_se(22,Qqe(this));if(this.c!=7)throw Adb(new Lqe(TId((Hde(),ZIe))));Mqe(this);return a};_.Bm=function tre(){var a,b,c,d,e;a=0;c=0;b=-1;while(this.d=this.j)throw Adb(new Lqe(TId((Hde(),$Ie))));if(b==45){++this.d;while(this.d=this.j)throw Adb(new Lqe(TId((Hde(),$Ie))))}if(b==58){++this.d;Mqe(this);d=ate(Qqe(this),a,c);if(this.c!=7)throw Adb(new Lqe(TId((Hde(),ZIe))));Mqe(this)}else if(b==41){++this.d;Mqe(this);d=ate(Qqe(this),a,c)}else throw Adb(new Lqe(TId((Hde(),_Ie))));return d};_.Cm=function ure(){var a;Mqe(this);a=_se(21,Qqe(this));if(this.c!=7)throw Adb(new Lqe(TId((Hde(),ZIe))));Mqe(this);return a};_.Dm=function vre(){var a;Mqe(this);a=_se(23,Qqe(this));if(this.c!=7)throw Adb(new Lqe(TId((Hde(),ZIe))));Mqe(this);return a};_.Em=function wre(){var a,b;Mqe(this);a=this.f++;b=bte(Qqe(this),a);if(this.c!=7)throw Adb(new Lqe(TId((Hde(),ZIe))));Mqe(this);return b};_.Fm=function xre(){var a;Mqe(this);a=bte(Qqe(this),0);if(this.c!=7)throw Adb(new Lqe(TId((Hde(),ZIe))));Mqe(this);return a};_.Gm=function yre(a){Mqe(this);if(this.c==5){Mqe(this);return $se(a,(Vse(),Vse(),++Use,new Kte(9,a)))}else return $se(a,(Vse(),Vse(),++Use,new Kte(3,a)))};_.Hm=function zre(a){var b;Mqe(this);b=(Vse(),Vse(),++Use,new iue(2));if(this.c==5){Mqe(this);hue(b,(null,Ese));hue(b,a)}else{hue(b,a);hue(b,(null,Ese))}return b};_.Im=function Are(a){Mqe(this);if(this.c==5){Mqe(this);return Vse(),Vse(),++Use,new Kte(9,a)}else return Vse(),Vse(),++Use,new Kte(3,a)};_.a=0;_.b=0;_.c=0;_.d=0;_.e=0;_.f=1;_.g=null;_.j=0;var gdb=sfb(LLe,'RegEx/RegexParser',836);feb(1947,836,{},Gre);_.bm=function Hre(a){return false};_.cm=function Ire(){return Dre(this)};_.dm=function Kre(a){return Ere(a)};_.em=function Lre(a){return Fre(this)};_.fm=function Mre(){throw Adb(new Lqe(TId((Hde(),xJe))))};_.gm=function Nre(){throw Adb(new Lqe(TId((Hde(),xJe))))};_.hm=function Ore(){throw Adb(new Lqe(TId((Hde(),xJe))))};_.im=function Pre(){throw Adb(new Lqe(TId((Hde(),xJe))))};_.jm=function Qre(){Mqe(this);return Ere(67)};_.km=function Rre(){Mqe(this);return Ere(73)};_.lm=function Sre(){throw Adb(new Lqe(TId((Hde(),xJe))))};_.mm=function Tre(){throw Adb(new Lqe(TId((Hde(),xJe))))};_.nm=function Ure(){throw Adb(new Lqe(TId((Hde(),xJe))))};_.om=function Vre(){Mqe(this);return Ere(99)};_.pm=function Wre(){throw Adb(new Lqe(TId((Hde(),xJe))))};_.qm=function Xre(){throw Adb(new Lqe(TId((Hde(),xJe))))};_.rm=function Yre(){Mqe(this);return Ere(105)};_.sm=function Zre(){throw Adb(new Lqe(TId((Hde(),xJe))))};_.tm=function $re(){throw Adb(new Lqe(TId((Hde(),xJe))))};_.um=function _re(a,b){return ute(a,Ere(b)),-1};_.vm=function ase(){Mqe(this);return Vse(),Vse(),++Use,new Hte(0,94)};_.wm=function bse(){throw Adb(new Lqe(TId((Hde(),xJe))))};_.xm=function cse(){Mqe(this);return Vse(),Vse(),++Use,new Hte(0,36)};_.ym=function dse(){throw Adb(new Lqe(TId((Hde(),xJe))))};_.zm=function ese(){throw Adb(new Lqe(TId((Hde(),xJe))))};_.Am=function fse(){throw Adb(new Lqe(TId((Hde(),xJe))))};_.Bm=function gse(){throw Adb(new Lqe(TId((Hde(),xJe))))};_.Cm=function hse(){throw Adb(new Lqe(TId((Hde(),xJe))))};_.Dm=function ise(){throw Adb(new Lqe(TId((Hde(),xJe))))};_.Em=function jse(){var a;Mqe(this);a=bte(Qqe(this),0);if(this.c!=7)throw Adb(new Lqe(TId((Hde(),ZIe))));Mqe(this);return a};_.Fm=function kse(){throw Adb(new Lqe(TId((Hde(),xJe))))};_.Gm=function lse(a){Mqe(this);return $se(a,(Vse(),Vse(),++Use,new Kte(3,a)))};_.Hm=function mse(a){var b;Mqe(this);b=(Vse(),Vse(),++Use,new iue(2));hue(b,a);hue(b,(null,Ese));return b};_.Im=function nse(a){Mqe(this);return Vse(),Vse(),++Use,new Kte(3,a)};var Bre=null,Cre=null;var ddb=sfb(LLe,'RegEx/ParserForXMLSchema',1947);feb(122,1,ZLe,Wse);_.Jm=function Xse(a){throw Adb(new yz('Not supported.'))};_.Km=function dte(){return -1};_.Lm=function ete(a){return null};_.Mm=function jte(){return null};_.Nm=function mte(a){};_.Om=function nte(a){};_.Pm=function ote(){return 0};_.Ib=function pte(){return this.Qm(0)};_.Qm=function qte(a){return this.e==11?'.':''};_.e=0;var vse,wse,xse,yse,zse,Ase=null,Bse,Cse=null,Dse,Ese,Fse=null,Gse,Hse,Ise,Jse,Kse,Lse,Mse,Nse,Ose,Pse,Qse,Rse,Sse,Tse,Use=0;var qdb=sfb(LLe,'RegEx/Token',122);feb(138,122,{3:1,138:1,122:1},xte);_.Qm=function Ate(a){var b,c,d;if(this.e==4){if(this==Dse)c='.';else if(this==Bse)c='\\d';else if(this==Rse)c='\\w';else if(this==Mse)c='\\s';else{d=new Qhb;d.a+='[';for(b=0;b0&&(d.a+=',',d);if(this.b[b]===this.b[b+1]){Nhb(d,zte(this.b[b]))}else{Nhb(d,zte(this.b[b]));d.a+='-';Nhb(d,zte(this.b[b+1]))}}d.a+=']';c=d.a}}else{if(this==Ise)c='\\D';else if(this==Kse)c='\\W';else if(this==Jse)c='\\S';else{d=new Qhb;d.a+='[^';for(b=0;b0&&(d.a+=',',d);if(this.b[b]===this.b[b+1]){Nhb(d,zte(this.b[b]))}else{Nhb(d,zte(this.b[b]));d.a+='-';Nhb(d,zte(this.b[b+1]))}}d.a+=']';c=d.a}}return c};_.a=false;_.c=false;var edb=sfb(LLe,'RegEx/RangeToken',138);feb(592,1,{592:1},Bte);_.a=0;var fdb=sfb(LLe,'RegEx/RegexParser/ReferencePosition',592);feb(591,1,{3:1,591:1},Dte);_.Fb=function Ete(a){var b;if(a==null)return false;if(!ZD(a,591))return false;b=RD(a,591);return lhb(this.b,b.b)&&this.a==b.a};_.Hb=function Fte(){return ohb(this.b+'/'+pse(this.a))};_.Ib=function Gte(){return this.c.Qm(this.a)};_.a=0;var hdb=sfb(LLe,'RegEx/RegularExpression',591);feb(228,122,ZLe,Hte);_.Km=function Ite(){return this.a};_.Qm=function Jte(a){var b,c,d;switch(this.e){case 0:switch(this.a){case 124:case 42:case 43:case 63:case 40:case 41:case 46:case 91:case 123:case 92:d='\\'+XD(this.a&Bwe);break;case 12:d='\\f';break;case 10:d='\\n';break;case 13:d='\\r';break;case 9:d='\\t';break;case 27:d='\\e';break;default:if(this.a>=txe){c=(b=this.a>>>0,'0'+b.toString(16));d='\\v'+zhb(c,c.length-6,c.length)}else d=''+XD(this.a&Bwe);}break;case 8:this==Gse||this==Hse?(d=''+XD(this.a&Bwe)):(d='\\'+XD(this.a&Bwe));break;default:d=null;}return d};_.a=0;var idb=sfb(LLe,'RegEx/Token/CharToken',228);feb(318,122,ZLe,Kte);_.Lm=function Lte(a){return this.a};_.Nm=function Mte(a){this.b=a};_.Om=function Nte(a){this.c=a};_.Pm=function Ote(){return 1};_.Qm=function Pte(a){var b;if(this.e==3){if(this.c<0&&this.b<0){b=this.a.Qm(a)+'*'}else if(this.c==this.b){b=this.a.Qm(a)+'{'+this.c+'}'}else if(this.c>=0&&this.b>=0){b=this.a.Qm(a)+'{'+this.c+','+this.b+'}'}else if(this.c>=0&&this.b<0){b=this.a.Qm(a)+'{'+this.c+',}'}else throw Adb(new yz('Token#toString(): CLOSURE '+this.c+pve+this.b))}else{if(this.c<0&&this.b<0){b=this.a.Qm(a)+'*?'}else if(this.c==this.b){b=this.a.Qm(a)+'{'+this.c+'}?'}else if(this.c>=0&&this.b>=0){b=this.a.Qm(a)+'{'+this.c+','+this.b+'}?'}else if(this.c>=0&&this.b<0){b=this.a.Qm(a)+'{'+this.c+',}?'}else throw Adb(new yz('Token#toString(): NONGREEDYCLOSURE '+this.c+pve+this.b))}return b};_.b=0;_.c=0;var jdb=sfb(LLe,'RegEx/Token/ClosureToken',318);feb(837,122,ZLe,Qte);_.Lm=function Rte(a){return a==0?this.a:this.b};_.Pm=function Ste(){return 2};_.Qm=function Tte(a){var b;this.b.e==3&&this.b.Lm(0)==this.a?(b=this.a.Qm(a)+'+'):this.b.e==9&&this.b.Lm(0)==this.a?(b=this.a.Qm(a)+'+?'):(b=this.a.Qm(a)+(''+this.b.Qm(a)));return b};var kdb=sfb(LLe,'RegEx/Token/ConcatToken',837);feb(1945,122,ZLe,Ute);_.Lm=function Vte(a){if(a==0)return this.d;if(a==1)return this.b;throw Adb(new yz('Internal Error: '+a))};_.Pm=function Wte(){return !this.b?1:2};_.Qm=function Xte(a){var b;this.c>0?(b='(?('+this.c+')'):this.a.e==8?(b='(?('+this.a+')'):(b='(?'+this.a);!this.b?(b+=this.d+')'):(b+=this.d+'|'+this.b+')');return b};_.c=0;var ldb=sfb(LLe,'RegEx/Token/ConditionToken',1945);feb(1946,122,ZLe,Yte);_.Lm=function Zte(a){return this.b};_.Pm=function $te(){return 1};_.Qm=function _te(a){return '(?'+(this.a==0?'':pse(this.a))+(this.c==0?'':pse(this.c))+':'+this.b.Qm(a)+')'};_.a=0;_.c=0;var mdb=sfb(LLe,'RegEx/Token/ModifierToken',1946);feb(838,122,ZLe,aue);_.Lm=function bue(a){return this.a};_.Pm=function cue(){return 1};_.Qm=function due(a){var b;b=null;switch(this.e){case 6:this.b==0?(b='(?:'+this.a.Qm(a)+')'):(b='('+this.a.Qm(a)+')');break;case 20:b='(?='+this.a.Qm(a)+')';break;case 21:b='(?!'+this.a.Qm(a)+')';break;case 22:b='(?<='+this.a.Qm(a)+')';break;case 23:b='(?'+this.a.Qm(a)+')';}return b};_.b=0;var ndb=sfb(LLe,'RegEx/Token/ParenToken',838);feb(530,122,{3:1,122:1,530:1},eue);_.Mm=function fue(){return this.b};_.Qm=function gue(a){return this.e==12?'\\'+this.a:tse(this.b)};_.a=0;var odb=sfb(LLe,'RegEx/Token/StringToken',530);feb(477,122,ZLe,iue);_.Jm=function jue(a){hue(this,a)};_.Lm=function kue(a){return RD(eyb(this.a,a),122)};_.Pm=function lue(){return !this.a?0:this.a.a.c.length};_.Qm=function mue(a){var b,c,d,e,f;if(this.e==1){if(this.a.a.c.length==2){b=RD(eyb(this.a,0),122);c=RD(eyb(this.a,1),122);c.e==3&&c.Lm(0)==b?(e=b.Qm(a)+'+'):c.e==9&&c.Lm(0)==b?(e=b.Qm(a)+'+?'):(e=b.Qm(a)+(''+c.Qm(a)))}else{f=new Qhb;for(d=0;d=this.c.b:this.a<=this.c.b};_.Sb=function Vue(){return this.b>0};_.Tb=function Xue(){return this.b};_.Vb=function Zue(){return this.b-1};_.Qb=function $ue(){throw Adb(new kib(dMe))};_.a=0;_.b=0;var udb=sfb(aMe,'ExclusiveRange/RangeIterator',258);var hE=vfb(eKe,'C');var kE=vfb(hKe,'I');var xdb=vfb(hve,'Z');var lE=vfb(iKe,'J');var gE=vfb(dKe,'B');var iE=vfb(fKe,'D');var jE=vfb(gKe,'F');var wdb=vfb(jKe,'S');var g3=ufb('org.eclipse.elk.core.labels','ILabelManager');var T6=ufb(sIe,'DiagnosticChain');var zab=ufb(QKe,'ResourceSet');var $6=sfb(sIe,'InvocationTargetException',null);var fve=(Qz(),Tz);var gwtOnLoad=gwtOnLoad=ceb;aeb(leb);deb('permProps',[[['locale','default'],[eMe,'gecko1_8']],[['locale','default'],[eMe,'safari']]]); -// -------------- RUN GWT INITIALIZATION CODE -------------- -gwtOnLoad(null, 'elk', null); - -}).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{}],3:[function(require,module,exports){ -'use strict'; - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -/******************************************************************************* - * Copyright (c) 2021 Kiel University and others. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License 2.0 which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * SPDX-License-Identifier: EPL-2.0 - *******************************************************************************/ -var ELK = require('./elk-api.js').default; - -var ELKNode = function (_ELK) { - _inherits(ELKNode, _ELK); - - function ELKNode() { - var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - - _classCallCheck(this, ELKNode); - - var optionsClone = Object.assign({}, options); - - var workerThreadsExist = false; - try { - require.resolve('web-worker'); - workerThreadsExist = true; - } catch (e) {} - - // user requested a worker - if (options.workerUrl) { - if (workerThreadsExist) { - var Worker = require('web-worker'); - optionsClone.workerFactory = function (url) { - return new Worker(url); - }; - } else { - console.warn('Web worker requested but \'web-worker\' package not installed. \nConsider installing the package or pass your own \'workerFactory\' to ELK\'s constructor.\n... Falling back to non-web worker version.'); - } - } - - // unless no other workerFactory is registered, use the fake worker - if (!optionsClone.workerFactory) { - var _require = require('./elk-worker.min.js'), - _Worker = _require.Worker; - - optionsClone.workerFactory = function (url) { - return new _Worker(url); - }; - } - - return _possibleConstructorReturn(this, (ELKNode.__proto__ || Object.getPrototypeOf(ELKNode)).call(this, optionsClone)); - } - - return ELKNode; -}(ELK); - -Object.defineProperty(module.exports, "__esModule", { - value: true -}); -module.exports = ELKNode; -ELKNode.default = ELKNode; -},{"./elk-api.js":1,"./elk-worker.min.js":2,"web-worker":4}],4:[function(require,module,exports){ -/** - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -module.exports = Worker; -},{}]},{},[3])(3) -}); - - -/***/ }), - -/***/ 73743: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - a: () => (/* binding */ createText), - c: () => (/* binding */ computeDimensionOfText) -}); - -// NAMESPACE OBJECT: ./node_modules/mermaid/node_modules/micromark/lib/constructs.js -var constructs_namespaceObject = {}; -__webpack_require__.r(constructs_namespaceObject); -__webpack_require__.d(constructs_namespaceObject, { - attentionMarkers: () => (attentionMarkers), - contentInitial: () => (contentInitial), - disable: () => (disable), - document: () => (constructs_document), - flow: () => (constructs_flow), - flowInitial: () => (flowInitial), - insideSpan: () => (insideSpan), - string: () => (constructs_string), - text: () => (constructs_text) -}); - -// EXTERNAL MODULE: ./node_modules/mermaid/dist/mermaid-b5860b54.js + 8 modules -var mermaid_b5860b54 = __webpack_require__(86079); -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/mdast-util-to-string/lib/index.js -/** - * @typedef {import('mdast').Root|import('mdast').Content} Node - * - * @typedef Options - * Configuration (optional). - * @property {boolean | null | undefined} [includeImageAlt=true] - * Whether to use `alt` for `image`s. - * @property {boolean | null | undefined} [includeHtml=true] - * Whether to use `value` of HTML. - */ - -/** @type {Options} */ -const emptyOptions = {} - -/** - * Get the text content of a node or list of nodes. - * - * Prefers the node’s plain-text fields, otherwise serializes its children, - * and if the given value is an array, serialize the nodes in it. - * - * @param {unknown} value - * Thing to serialize, typically `Node`. - * @param {Options | null | undefined} [options] - * Configuration (optional). - * @returns {string} - * Serialized `value`. - */ -function lib_toString(value, options) { - const settings = options || emptyOptions - const includeImageAlt = - typeof settings.includeImageAlt === 'boolean' - ? settings.includeImageAlt - : true - const includeHtml = - typeof settings.includeHtml === 'boolean' ? settings.includeHtml : true - - return one(value, includeImageAlt, includeHtml) -} - -/** - * One node or several nodes. - * - * @param {unknown} value - * Thing to serialize. - * @param {boolean} includeImageAlt - * Include image `alt`s. - * @param {boolean} includeHtml - * Include HTML. - * @returns {string} - * Serialized node. - */ -function one(value, includeImageAlt, includeHtml) { - if (node(value)) { - if ('value' in value) { - return value.type === 'html' && !includeHtml ? '' : value.value - } - - if (includeImageAlt && 'alt' in value && value.alt) { - return value.alt - } - - if ('children' in value) { - return lib_all(value.children, includeImageAlt, includeHtml) - } - } - - if (Array.isArray(value)) { - return lib_all(value, includeImageAlt, includeHtml) - } - - return '' -} - -/** - * Serialize a list of nodes. - * - * @param {Array} values - * Thing to serialize. - * @param {boolean} includeImageAlt - * Include image `alt`s. - * @param {boolean} includeHtml - * Include HTML. - * @returns {string} - * Serialized nodes. - */ -function lib_all(values, includeImageAlt, includeHtml) { - /** @type {Array} */ - const result = [] - let index = -1 - - while (++index < values.length) { - result[index] = one(values[index], includeImageAlt, includeHtml) - } - - return result.join('') -} - -/** - * Check if `value` looks like a node. - * - * @param {unknown} value - * Thing. - * @returns {value is Node} - * Whether `value` is a node. - */ -function node(value) { - return Boolean(value && typeof value === 'object') -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-chunked/index.js -/** - * Like `Array#splice`, but smarter for giant arrays. - * - * `Array#splice` takes all items to be inserted as individual argument which - * causes a stack overflow in V8 when trying to insert 100k items for instance. - * - * Otherwise, this does not return the removed items, and takes `items` as an - * array instead of rest parameters. - * - * @template {unknown} T - * Item type. - * @param {Array} list - * List to operate on. - * @param {number} start - * Index to remove/insert at (can be negative). - * @param {number} remove - * Number of items to remove. - * @param {Array} items - * Items to inject into `list`. - * @returns {void} - * Nothing. - */ -function splice(list, start, remove, items) { - const end = list.length - let chunkStart = 0 - /** @type {Array} */ - let parameters - - // Make start between zero and `end` (included). - if (start < 0) { - start = -start > end ? 0 : end + start - } else { - start = start > end ? end : start - } - remove = remove > 0 ? remove : 0 - - // No need to chunk the items if there’s only a couple (10k) items. - if (items.length < 10000) { - parameters = Array.from(items) - parameters.unshift(start, remove) - // @ts-expect-error Hush, it’s fine. - list.splice(...parameters) - } else { - // Delete `remove` items starting from `start` - if (remove) list.splice(start, remove) - - // Insert the items in chunks to not cause stack overflows. - while (chunkStart < items.length) { - parameters = items.slice(chunkStart, chunkStart + 10000) - parameters.unshift(start, 0) - // @ts-expect-error Hush, it’s fine. - list.splice(...parameters) - chunkStart += 10000 - start += 10000 - } - } -} - -/** - * Append `items` (an array) at the end of `list` (another array). - * When `list` was empty, returns `items` instead. - * - * This prevents a potentially expensive operation when `list` is empty, - * and adds items in batches to prevent V8 from hanging. - * - * @template {unknown} T - * Item type. - * @param {Array} list - * List to operate on. - * @param {Array} items - * Items to add to `list`. - * @returns {Array} - * Either `list` or `items`. - */ -function push(list, items) { - if (list.length > 0) { - splice(list, list.length, 0, items) - return list - } - return items -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-combine-extensions/index.js -/** - * @typedef {import('micromark-util-types').Extension} Extension - * @typedef {import('micromark-util-types').Handles} Handles - * @typedef {import('micromark-util-types').HtmlExtension} HtmlExtension - * @typedef {import('micromark-util-types').NormalizedExtension} NormalizedExtension - */ - - - -const micromark_util_combine_extensions_hasOwnProperty = {}.hasOwnProperty - -/** - * Combine multiple syntax extensions into one. - * - * @param {Array} extensions - * List of syntax extensions. - * @returns {NormalizedExtension} - * A single combined extension. - */ -function combineExtensions(extensions) { - /** @type {NormalizedExtension} */ - const all = {} - let index = -1 - - while (++index < extensions.length) { - syntaxExtension(all, extensions[index]) - } - - return all -} - -/** - * Merge `extension` into `all`. - * - * @param {NormalizedExtension} all - * Extension to merge into. - * @param {Extension} extension - * Extension to merge. - * @returns {void} - */ -function syntaxExtension(all, extension) { - /** @type {keyof Extension} */ - let hook - - for (hook in extension) { - const maybe = micromark_util_combine_extensions_hasOwnProperty.call(all, hook) ? all[hook] : undefined - /** @type {Record} */ - const left = maybe || (all[hook] = {}) - /** @type {Record | undefined} */ - const right = extension[hook] - /** @type {string} */ - let code - - if (right) { - for (code in right) { - if (!micromark_util_combine_extensions_hasOwnProperty.call(left, code)) left[code] = [] - const value = right[code] - constructs( - // @ts-expect-error Looks like a list. - left[code], - Array.isArray(value) ? value : value ? [value] : [] - ) - } - } - } -} - -/** - * Merge `list` into `existing` (both lists of constructs). - * Mutates `existing`. - * - * @param {Array} existing - * @param {Array} list - * @returns {void} - */ -function constructs(existing, list) { - let index = -1 - /** @type {Array} */ - const before = [] - - while (++index < list.length) { - // @ts-expect-error Looks like an object. - ;(list[index].add === 'after' ? existing : before).push(list[index]) - } - - splice(existing, 0, 0, before) -} - -/** - * Combine multiple HTML extensions into one. - * - * @param {Array} htmlExtensions - * List of HTML extensions. - * @returns {HtmlExtension} - * A single combined HTML extension. - */ -function combineHtmlExtensions(htmlExtensions) { - /** @type {HtmlExtension} */ - const handlers = {} - let index = -1 - - while (++index < htmlExtensions.length) { - htmlExtension(handlers, htmlExtensions[index]) - } - - return handlers -} - -/** - * Merge `extension` into `all`. - * - * @param {HtmlExtension} all - * Extension to merge into. - * @param {HtmlExtension} extension - * Extension to merge. - * @returns {void} - */ -function htmlExtension(all, extension) { - /** @type {keyof HtmlExtension} */ - let hook - - for (hook in extension) { - const maybe = micromark_util_combine_extensions_hasOwnProperty.call(all, hook) ? all[hook] : undefined - const left = maybe || (all[hook] = {}) - const right = extension[hook] - /** @type {keyof Handles} */ - let type - - if (right) { - for (type in right) { - // @ts-expect-error assume document vs regular handler are managed correctly. - left[type] = right[type] - } - } - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-character/lib/unicode-punctuation-regex.js -// This module is generated by `script/`. -// -// CommonMark handles attention (emphasis, strong) markers based on what comes -// before or after them. -// One such difference is if those characters are Unicode punctuation. -// This script is generated from the Unicode data. - -/** - * Regular expression that matches a unicode punctuation character. - */ -const unicodePunctuationRegex = - /[!-\/:-@\[-`\{-~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/ - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-character/index.js -/** - * @typedef {import('micromark-util-types').Code} Code - */ - - - -/** - * Check whether the character code represents an ASCII alpha (`a` through `z`, - * case insensitive). - * - * An **ASCII alpha** is an ASCII upper alpha or ASCII lower alpha. - * - * An **ASCII upper alpha** is a character in the inclusive range U+0041 (`A`) - * to U+005A (`Z`). - * - * An **ASCII lower alpha** is a character in the inclusive range U+0061 (`a`) - * to U+007A (`z`). - * - * @param code - * Code. - * @returns - * Whether it matches. - */ -const asciiAlpha = regexCheck(/[A-Za-z]/) - -/** - * Check whether the character code represents an ASCII alphanumeric (`a` - * through `z`, case insensitive, or `0` through `9`). - * - * An **ASCII alphanumeric** is an ASCII digit (see `asciiDigit`) or ASCII alpha - * (see `asciiAlpha`). - * - * @param code - * Code. - * @returns - * Whether it matches. - */ -const asciiAlphanumeric = regexCheck(/[\dA-Za-z]/) - -/** - * Check whether the character code represents an ASCII atext. - * - * atext is an ASCII alphanumeric (see `asciiAlphanumeric`), or a character in - * the inclusive ranges U+0023 NUMBER SIGN (`#`) to U+0027 APOSTROPHE (`'`), - * U+002A ASTERISK (`*`), U+002B PLUS SIGN (`+`), U+002D DASH (`-`), U+002F - * SLASH (`/`), U+003D EQUALS TO (`=`), U+003F QUESTION MARK (`?`), U+005E - * CARET (`^`) to U+0060 GRAVE ACCENT (`` ` ``), or U+007B LEFT CURLY BRACE - * (`{`) to U+007E TILDE (`~`). - * - * See: - * **\[RFC5322]**: - * [Internet Message Format](https://tools.ietf.org/html/rfc5322). - * P. Resnick. - * IETF. - * - * @param code - * Code. - * @returns - * Whether it matches. - */ -const asciiAtext = regexCheck(/[#-'*+\--9=?A-Z^-~]/) - -/** - * Check whether a character code is an ASCII control character. - * - * An **ASCII control** is a character in the inclusive range U+0000 NULL (NUL) - * to U+001F (US), or U+007F (DEL). - * - * @param {Code} code - * Code. - * @returns {boolean} - * Whether it matches. - */ -function asciiControl(code) { - return ( - // Special whitespace codes (which have negative values), C0 and Control - // character DEL - code !== null && (code < 32 || code === 127) - ) -} - -/** - * Check whether the character code represents an ASCII digit (`0` through `9`). - * - * An **ASCII digit** is a character in the inclusive range U+0030 (`0`) to - * U+0039 (`9`). - * - * @param code - * Code. - * @returns - * Whether it matches. - */ -const asciiDigit = regexCheck(/\d/) - -/** - * Check whether the character code represents an ASCII hex digit (`a` through - * `f`, case insensitive, or `0` through `9`). - * - * An **ASCII hex digit** is an ASCII digit (see `asciiDigit`), ASCII upper hex - * digit, or an ASCII lower hex digit. - * - * An **ASCII upper hex digit** is a character in the inclusive range U+0041 - * (`A`) to U+0046 (`F`). - * - * An **ASCII lower hex digit** is a character in the inclusive range U+0061 - * (`a`) to U+0066 (`f`). - * - * @param code - * Code. - * @returns - * Whether it matches. - */ -const asciiHexDigit = regexCheck(/[\dA-Fa-f]/) - -/** - * Check whether the character code represents ASCII punctuation. - * - * An **ASCII punctuation** is a character in the inclusive ranges U+0021 - * EXCLAMATION MARK (`!`) to U+002F SLASH (`/`), U+003A COLON (`:`) to U+0040 AT - * SIGN (`@`), U+005B LEFT SQUARE BRACKET (`[`) to U+0060 GRAVE ACCENT - * (`` ` ``), or U+007B LEFT CURLY BRACE (`{`) to U+007E TILDE (`~`). - * - * @param code - * Code. - * @returns - * Whether it matches. - */ -const asciiPunctuation = regexCheck(/[!-/:-@[-`{-~]/) - -/** - * Check whether a character code is a markdown line ending. - * - * A **markdown line ending** is the virtual characters M-0003 CARRIAGE RETURN - * LINE FEED (CRLF), M-0004 LINE FEED (LF) and M-0005 CARRIAGE RETURN (CR). - * - * In micromark, the actual character U+000A LINE FEED (LF) and U+000D CARRIAGE - * RETURN (CR) are replaced by these virtual characters depending on whether - * they occurred together. - * - * @param {Code} code - * Code. - * @returns {boolean} - * Whether it matches. - */ -function markdownLineEnding(code) { - return code !== null && code < -2 -} - -/** - * Check whether a character code is a markdown line ending (see - * `markdownLineEnding`) or markdown space (see `markdownSpace`). - * - * @param {Code} code - * Code. - * @returns {boolean} - * Whether it matches. - */ -function markdownLineEndingOrSpace(code) { - return code !== null && (code < 0 || code === 32) -} - -/** - * Check whether a character code is a markdown space. - * - * A **markdown space** is the concrete character U+0020 SPACE (SP) and the - * virtual characters M-0001 VIRTUAL SPACE (VS) and M-0002 HORIZONTAL TAB (HT). - * - * In micromark, the actual character U+0009 CHARACTER TABULATION (HT) is - * replaced by one M-0002 HORIZONTAL TAB (HT) and between 0 and 3 M-0001 VIRTUAL - * SPACE (VS) characters, depending on the column at which the tab occurred. - * - * @param {Code} code - * Code. - * @returns {boolean} - * Whether it matches. - */ -function markdownSpace(code) { - return code === -2 || code === -1 || code === 32 -} - -// Size note: removing ASCII from the regex and using `asciiPunctuation` here -// In fact adds to the bundle size. -/** - * Check whether the character code represents Unicode punctuation. - * - * A **Unicode punctuation** is a character in the Unicode `Pc` (Punctuation, - * Connector), `Pd` (Punctuation, Dash), `Pe` (Punctuation, Close), `Pf` - * (Punctuation, Final quote), `Pi` (Punctuation, Initial quote), `Po` - * (Punctuation, Other), or `Ps` (Punctuation, Open) categories, or an ASCII - * punctuation (see `asciiPunctuation`). - * - * See: - * **\[UNICODE]**: - * [The Unicode Standard](https://www.unicode.org/versions/). - * Unicode Consortium. - * - * @param code - * Code. - * @returns - * Whether it matches. - */ -const unicodePunctuation = regexCheck(unicodePunctuationRegex) - -/** - * Check whether the character code represents Unicode whitespace. - * - * Note that this does handle micromark specific markdown whitespace characters. - * See `markdownLineEndingOrSpace` to check that. - * - * A **Unicode whitespace** is a character in the Unicode `Zs` (Separator, - * Space) category, or U+0009 CHARACTER TABULATION (HT), U+000A LINE FEED (LF), - * U+000C (FF), or U+000D CARRIAGE RETURN (CR) (**\[UNICODE]**). - * - * See: - * **\[UNICODE]**: - * [The Unicode Standard](https://www.unicode.org/versions/). - * Unicode Consortium. - * - * @param code - * Code. - * @returns - * Whether it matches. - */ -const unicodeWhitespace = regexCheck(/\s/) - -/** - * Create a code check from a regex. - * - * @param {RegExp} regex - * @returns {(code: Code) => boolean} - */ -function regexCheck(regex) { - return check - - /** - * Check whether a code matches the bound regex. - * - * @param {Code} code - * Character code. - * @returns {boolean} - * Whether the character code matches the bound regex. - */ - function check(code) { - return code !== null && regex.test(String.fromCharCode(code)) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-space/index.js -/** - * @typedef {import('micromark-util-types').Effects} Effects - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenType} TokenType - */ - - - -// To do: implement `spaceOrTab`, `spaceOrTabMinMax`, `spaceOrTabWithOptions`. - -/** - * Parse spaces and tabs. - * - * There is no `nok` parameter: - * - * * spaces in markdown are often optional, in which case this factory can be - * used and `ok` will be switched to whether spaces were found or not - * * one line ending or space can be detected with `markdownSpace(code)` right - * before using `factorySpace` - * - * ###### Examples - * - * Where `␉` represents a tab (plus how much it expands) and `␠` represents a - * single space. - * - * ```markdown - * ␉ - * ␠␠␠␠ - * ␉␠ - * ``` - * - * @param {Effects} effects - * Context. - * @param {State} ok - * State switched to when successful. - * @param {TokenType} type - * Type (`' \t'`). - * @param {number | undefined} [max=Infinity] - * Max (exclusive). - * @returns - * Start state. - */ -function factorySpace(effects, ok, type, max) { - const limit = max ? max - 1 : Number.POSITIVE_INFINITY - let size = 0 - return start - - /** @type {State} */ - function start(code) { - if (markdownSpace(code)) { - effects.enter(type) - return prefix(code) - } - return ok(code) - } - - /** @type {State} */ - function prefix(code) { - if (markdownSpace(code) && size++ < limit) { - effects.consume(code) - return prefix - } - effects.exit(type) - return ok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/initialize/content.js -/** - * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct - * @typedef {import('micromark-util-types').Initializer} Initializer - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').Token} Token - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - */ - - - -/** @type {InitialConstruct} */ -const content = { - tokenize: initializeContent -} - -/** - * @this {TokenizeContext} - * @type {Initializer} - */ -function initializeContent(effects) { - const contentStart = effects.attempt( - this.parser.constructs.contentInitial, - afterContentStartConstruct, - paragraphInitial - ) - /** @type {Token} */ - let previous - return contentStart - - /** @type {State} */ - function afterContentStartConstruct(code) { - if (code === null) { - effects.consume(code) - return - } - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return factorySpace(effects, contentStart, 'linePrefix') - } - - /** @type {State} */ - function paragraphInitial(code) { - effects.enter('paragraph') - return lineStart(code) - } - - /** @type {State} */ - function lineStart(code) { - const token = effects.enter('chunkText', { - contentType: 'text', - previous - }) - if (previous) { - previous.next = token - } - previous = token - return data(code) - } - - /** @type {State} */ - function data(code) { - if (code === null) { - effects.exit('chunkText') - effects.exit('paragraph') - effects.consume(code) - return - } - if (markdownLineEnding(code)) { - effects.consume(code) - effects.exit('chunkText') - return lineStart - } - - // Data. - effects.consume(code) - return data - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/initialize/document.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').ContainerState} ContainerState - * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct - * @typedef {import('micromark-util-types').Initializer} Initializer - * @typedef {import('micromark-util-types').Point} Point - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').Token} Token - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - -/** - * @typedef {[Construct, ContainerState]} StackItem - */ - - - - -/** @type {InitialConstruct} */ -const document_document = { - tokenize: initializeDocument -} - -/** @type {Construct} */ -const containerConstruct = { - tokenize: tokenizeContainer -} - -/** - * @this {TokenizeContext} - * @type {Initializer} - */ -function initializeDocument(effects) { - const self = this - /** @type {Array} */ - const stack = [] - let continued = 0 - /** @type {TokenizeContext | undefined} */ - let childFlow - /** @type {Token | undefined} */ - let childToken - /** @type {number} */ - let lineStartOffset - return start - - /** @type {State} */ - function start(code) { - // First we iterate through the open blocks, starting with the root - // document, and descending through last children down to the last open - // block. - // Each block imposes a condition that the line must satisfy if the block is - // to remain open. - // For example, a block quote requires a `>` character. - // A paragraph requires a non-blank line. - // In this phase we may match all or just some of the open blocks. - // But we cannot close unmatched blocks yet, because we may have a lazy - // continuation line. - if (continued < stack.length) { - const item = stack[continued] - self.containerState = item[1] - return effects.attempt( - item[0].continuation, - documentContinue, - checkNewContainers - )(code) - } - - // Done. - return checkNewContainers(code) - } - - /** @type {State} */ - function documentContinue(code) { - continued++ - - // Note: this field is called `_closeFlow` but it also closes containers. - // Perhaps a good idea to rename it but it’s already used in the wild by - // extensions. - if (self.containerState._closeFlow) { - self.containerState._closeFlow = undefined - if (childFlow) { - closeFlow() - } - - // Note: this algorithm for moving events around is similar to the - // algorithm when dealing with lazy lines in `writeToChild`. - const indexBeforeExits = self.events.length - let indexBeforeFlow = indexBeforeExits - /** @type {Point | undefined} */ - let point - - // Find the flow chunk. - while (indexBeforeFlow--) { - if ( - self.events[indexBeforeFlow][0] === 'exit' && - self.events[indexBeforeFlow][1].type === 'chunkFlow' - ) { - point = self.events[indexBeforeFlow][1].end - break - } - } - exitContainers(continued) - - // Fix positions. - let index = indexBeforeExits - while (index < self.events.length) { - self.events[index][1].end = Object.assign({}, point) - index++ - } - - // Inject the exits earlier (they’re still also at the end). - splice( - self.events, - indexBeforeFlow + 1, - 0, - self.events.slice(indexBeforeExits) - ) - - // Discard the duplicate exits. - self.events.length = index - return checkNewContainers(code) - } - return start(code) - } - - /** @type {State} */ - function checkNewContainers(code) { - // Next, after consuming the continuation markers for existing blocks, we - // look for new block starts (e.g. `>` for a block quote). - // If we encounter a new block start, we close any blocks unmatched in - // step 1 before creating the new block as a child of the last matched - // block. - if (continued === stack.length) { - // No need to `check` whether there’s a container, of `exitContainers` - // would be moot. - // We can instead immediately `attempt` to parse one. - if (!childFlow) { - return documentContinued(code) - } - - // If we have concrete content, such as block HTML or fenced code, - // we can’t have containers “pierce” into them, so we can immediately - // start. - if (childFlow.currentConstruct && childFlow.currentConstruct.concrete) { - return flowStart(code) - } - - // If we do have flow, it could still be a blank line, - // but we’d be interrupting it w/ a new container if there’s a current - // construct. - // To do: next major: remove `_gfmTableDynamicInterruptHack` (no longer - // needed in micromark-extension-gfm-table@1.0.6). - self.interrupt = Boolean( - childFlow.currentConstruct && !childFlow._gfmTableDynamicInterruptHack - ) - } - - // Check if there is a new container. - self.containerState = {} - return effects.check( - containerConstruct, - thereIsANewContainer, - thereIsNoNewContainer - )(code) - } - - /** @type {State} */ - function thereIsANewContainer(code) { - if (childFlow) closeFlow() - exitContainers(continued) - return documentContinued(code) - } - - /** @type {State} */ - function thereIsNoNewContainer(code) { - self.parser.lazy[self.now().line] = continued !== stack.length - lineStartOffset = self.now().offset - return flowStart(code) - } - - /** @type {State} */ - function documentContinued(code) { - // Try new containers. - self.containerState = {} - return effects.attempt( - containerConstruct, - containerContinue, - flowStart - )(code) - } - - /** @type {State} */ - function containerContinue(code) { - continued++ - stack.push([self.currentConstruct, self.containerState]) - // Try another. - return documentContinued(code) - } - - /** @type {State} */ - function flowStart(code) { - if (code === null) { - if (childFlow) closeFlow() - exitContainers(0) - effects.consume(code) - return - } - childFlow = childFlow || self.parser.flow(self.now()) - effects.enter('chunkFlow', { - contentType: 'flow', - previous: childToken, - _tokenizer: childFlow - }) - return flowContinue(code) - } - - /** @type {State} */ - function flowContinue(code) { - if (code === null) { - writeToChild(effects.exit('chunkFlow'), true) - exitContainers(0) - effects.consume(code) - return - } - if (markdownLineEnding(code)) { - effects.consume(code) - writeToChild(effects.exit('chunkFlow')) - // Get ready for the next line. - continued = 0 - self.interrupt = undefined - return start - } - effects.consume(code) - return flowContinue - } - - /** - * @param {Token} token - * @param {boolean | undefined} [eof] - * @returns {void} - */ - function writeToChild(token, eof) { - const stream = self.sliceStream(token) - if (eof) stream.push(null) - token.previous = childToken - if (childToken) childToken.next = token - childToken = token - childFlow.defineSkip(token.start) - childFlow.write(stream) - - // Alright, so we just added a lazy line: - // - // ```markdown - // > a - // b. - // - // Or: - // - // > ~~~c - // d - // - // Or: - // - // > | e | - // f - // ``` - // - // The construct in the second example (fenced code) does not accept lazy - // lines, so it marked itself as done at the end of its first line, and - // then the content construct parses `d`. - // Most constructs in markdown match on the first line: if the first line - // forms a construct, a non-lazy line can’t “unmake” it. - // - // The construct in the third example is potentially a GFM table, and - // those are *weird*. - // It *could* be a table, from the first line, if the following line - // matches a condition. - // In this case, that second line is lazy, which “unmakes” the first line - // and turns the whole into one content block. - // - // We’ve now parsed the non-lazy and the lazy line, and can figure out - // whether the lazy line started a new flow block. - // If it did, we exit the current containers between the two flow blocks. - if (self.parser.lazy[token.start.line]) { - let index = childFlow.events.length - while (index--) { - if ( - // The token starts before the line ending… - childFlow.events[index][1].start.offset < lineStartOffset && - // …and either is not ended yet… - (!childFlow.events[index][1].end || - // …or ends after it. - childFlow.events[index][1].end.offset > lineStartOffset) - ) { - // Exit: there’s still something open, which means it’s a lazy line - // part of something. - return - } - } - - // Note: this algorithm for moving events around is similar to the - // algorithm when closing flow in `documentContinue`. - const indexBeforeExits = self.events.length - let indexBeforeFlow = indexBeforeExits - /** @type {boolean | undefined} */ - let seen - /** @type {Point | undefined} */ - let point - - // Find the previous chunk (the one before the lazy line). - while (indexBeforeFlow--) { - if ( - self.events[indexBeforeFlow][0] === 'exit' && - self.events[indexBeforeFlow][1].type === 'chunkFlow' - ) { - if (seen) { - point = self.events[indexBeforeFlow][1].end - break - } - seen = true - } - } - exitContainers(continued) - - // Fix positions. - index = indexBeforeExits - while (index < self.events.length) { - self.events[index][1].end = Object.assign({}, point) - index++ - } - - // Inject the exits earlier (they’re still also at the end). - splice( - self.events, - indexBeforeFlow + 1, - 0, - self.events.slice(indexBeforeExits) - ) - - // Discard the duplicate exits. - self.events.length = index - } - } - - /** - * @param {number} size - * @returns {void} - */ - function exitContainers(size) { - let index = stack.length - - // Exit open containers. - while (index-- > size) { - const entry = stack[index] - self.containerState = entry[1] - entry[0].exit.call(self, effects) - } - stack.length = size - } - function closeFlow() { - childFlow.write([null]) - childToken = undefined - childFlow = undefined - self.containerState._closeFlow = undefined - } -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeContainer(effects, ok, nok) { - // Always populated by defaults. - - return factorySpace( - effects, - effects.attempt(this.parser.constructs.document, ok, nok), - 'linePrefix', - this.parser.constructs.disable.null.includes('codeIndented') ? undefined : 4 - ) -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/blank-line.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const blankLine = { - tokenize: tokenizeBlankLine, - partial: true -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeBlankLine(effects, ok, nok) { - return start - - /** - * Start of blank line. - * - * > 👉 **Note**: `␠` represents a space character. - * - * ```markdown - * > | ␠␠␊ - * ^ - * > | ␊ - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - return markdownSpace(code) - ? factorySpace(effects, after, 'linePrefix')(code) - : after(code) - } - - /** - * At eof/eol, after optional whitespace. - * - * > 👉 **Note**: `␠` represents a space character. - * - * ```markdown - * > | ␠␠␊ - * ^ - * > | ␊ - * ^ - * ``` - * - * @type {State} - */ - function after(code) { - return code === null || markdownLineEnding(code) ? ok(code) : nok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/micromark-util-subtokenize/node_modules/micromark-util-chunked/index.js -/** - * Like `Array#splice`, but smarter for giant arrays. - * - * `Array#splice` takes all items to be inserted as individual argument which - * causes a stack overflow in V8 when trying to insert 100k items for instance. - * - * Otherwise, this does not return the removed items, and takes `items` as an - * array instead of rest parameters. - * - * @template {unknown} T - * Item type. - * @param {Array} list - * List to operate on. - * @param {number} start - * Index to remove/insert at (can be negative). - * @param {number} remove - * Number of items to remove. - * @param {Array} items - * Items to inject into `list`. - * @returns {void} - * Nothing. - */ -function micromark_util_chunked_splice(list, start, remove, items) { - const end = list.length - let chunkStart = 0 - /** @type {Array} */ - let parameters - - // Make start between zero and `end` (included). - if (start < 0) { - start = -start > end ? 0 : end + start - } else { - start = start > end ? end : start - } - remove = remove > 0 ? remove : 0 - - // No need to chunk the items if there’s only a couple (10k) items. - if (items.length < 10000) { - parameters = Array.from(items) - parameters.unshift(start, remove) - // @ts-expect-error Hush, it’s fine. - list.splice(...parameters) - } else { - // Delete `remove` items starting from `start` - if (remove) list.splice(start, remove) - - // Insert the items in chunks to not cause stack overflows. - while (chunkStart < items.length) { - parameters = items.slice(chunkStart, chunkStart + 10000) - parameters.unshift(start, 0) - // @ts-expect-error Hush, it’s fine. - list.splice(...parameters) - chunkStart += 10000 - start += 10000 - } - } -} - -/** - * Append `items` (an array) at the end of `list` (another array). - * When `list` was empty, returns `items` instead. - * - * This prevents a potentially expensive operation when `list` is empty, - * and adds items in batches to prevent V8 from hanging. - * - * @template {unknown} T - * Item type. - * @param {Array} list - * List to operate on. - * @param {Array} items - * Items to add to `list`. - * @returns {Array} - * Either `list` or `items`. - */ -function micromark_util_chunked_push(list, items) { - if (list.length > 0) { - micromark_util_chunked_splice(list, list.length, 0, items) - return list - } - return items -} - -;// CONCATENATED MODULE: ./node_modules/micromark-util-subtokenize/index.js -/** - * @typedef {import('micromark-util-types').Chunk} Chunk - * @typedef {import('micromark-util-types').Event} Event - * @typedef {import('micromark-util-types').Token} Token - */ - - -/** - * Tokenize subcontent. - * - * @param {Array} events - * List of events. - * @returns {boolean} - * Whether subtokens were found. - */ -function subtokenize(events) { - /** @type {Record} */ - const jumps = {} - let index = -1 - /** @type {Event} */ - let event - /** @type {number | undefined} */ - let lineIndex - /** @type {number} */ - let otherIndex - /** @type {Event} */ - let otherEvent - /** @type {Array} */ - let parameters - /** @type {Array} */ - let subevents - /** @type {boolean | undefined} */ - let more - while (++index < events.length) { - while (index in jumps) { - index = jumps[index] - } - event = events[index] - - // Add a hook for the GFM tasklist extension, which needs to know if text - // is in the first content of a list item. - if ( - index && - event[1].type === 'chunkFlow' && - events[index - 1][1].type === 'listItemPrefix' - ) { - subevents = event[1]._tokenizer.events - otherIndex = 0 - if ( - otherIndex < subevents.length && - subevents[otherIndex][1].type === 'lineEndingBlank' - ) { - otherIndex += 2 - } - if ( - otherIndex < subevents.length && - subevents[otherIndex][1].type === 'content' - ) { - while (++otherIndex < subevents.length) { - if (subevents[otherIndex][1].type === 'content') { - break - } - if (subevents[otherIndex][1].type === 'chunkText') { - subevents[otherIndex][1]._isInFirstContentOfListItem = true - otherIndex++ - } - } - } - } - - // Enter. - if (event[0] === 'enter') { - if (event[1].contentType) { - Object.assign(jumps, subcontent(events, index)) - index = jumps[index] - more = true - } - } - // Exit. - else if (event[1]._container) { - otherIndex = index - lineIndex = undefined - while (otherIndex--) { - otherEvent = events[otherIndex] - if ( - otherEvent[1].type === 'lineEnding' || - otherEvent[1].type === 'lineEndingBlank' - ) { - if (otherEvent[0] === 'enter') { - if (lineIndex) { - events[lineIndex][1].type = 'lineEndingBlank' - } - otherEvent[1].type = 'lineEnding' - lineIndex = otherIndex - } - } else { - break - } - } - if (lineIndex) { - // Fix position. - event[1].end = Object.assign({}, events[lineIndex][1].start) - - // Switch container exit w/ line endings. - parameters = events.slice(lineIndex, index) - parameters.unshift(event) - micromark_util_chunked_splice(events, lineIndex, index - lineIndex + 1, parameters) - } - } - } - return !more -} - -/** - * Tokenize embedded tokens. - * - * @param {Array} events - * @param {number} eventIndex - * @returns {Record} - */ -function subcontent(events, eventIndex) { - const token = events[eventIndex][1] - const context = events[eventIndex][2] - let startPosition = eventIndex - 1 - /** @type {Array} */ - const startPositions = [] - const tokenizer = - token._tokenizer || context.parser[token.contentType](token.start) - const childEvents = tokenizer.events - /** @type {Array<[number, number]>} */ - const jumps = [] - /** @type {Record} */ - const gaps = {} - /** @type {Array} */ - let stream - /** @type {Token | undefined} */ - let previous - let index = -1 - /** @type {Token | undefined} */ - let current = token - let adjust = 0 - let start = 0 - const breaks = [start] - - // Loop forward through the linked tokens to pass them in order to the - // subtokenizer. - while (current) { - // Find the position of the event for this token. - while (events[++startPosition][1] !== current) { - // Empty. - } - startPositions.push(startPosition) - if (!current._tokenizer) { - stream = context.sliceStream(current) - if (!current.next) { - stream.push(null) - } - if (previous) { - tokenizer.defineSkip(current.start) - } - if (current._isInFirstContentOfListItem) { - tokenizer._gfmTasklistFirstContentOfListItem = true - } - tokenizer.write(stream) - if (current._isInFirstContentOfListItem) { - tokenizer._gfmTasklistFirstContentOfListItem = undefined - } - } - - // Unravel the next token. - previous = current - current = current.next - } - - // Now, loop back through all events (and linked tokens), to figure out which - // parts belong where. - current = token - while (++index < childEvents.length) { - if ( - // Find a void token that includes a break. - childEvents[index][0] === 'exit' && - childEvents[index - 1][0] === 'enter' && - childEvents[index][1].type === childEvents[index - 1][1].type && - childEvents[index][1].start.line !== childEvents[index][1].end.line - ) { - start = index + 1 - breaks.push(start) - // Help GC. - current._tokenizer = undefined - current.previous = undefined - current = current.next - } - } - - // Help GC. - tokenizer.events = [] - - // If there’s one more token (which is the cases for lines that end in an - // EOF), that’s perfect: the last point we found starts it. - // If there isn’t then make sure any remaining content is added to it. - if (current) { - // Help GC. - current._tokenizer = undefined - current.previous = undefined - } else { - breaks.pop() - } - - // Now splice the events from the subtokenizer into the current events, - // moving back to front so that splice indices aren’t affected. - index = breaks.length - while (index--) { - const slice = childEvents.slice(breaks[index], breaks[index + 1]) - const start = startPositions.pop() - jumps.unshift([start, start + slice.length - 1]) - micromark_util_chunked_splice(events, start, 2, slice) - } - index = -1 - while (++index < jumps.length) { - gaps[adjust + jumps[index][0]] = adjust + jumps[index][1] - adjust += jumps[index][1] - jumps[index][0] - 1 - } - return gaps -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/content.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').Resolver} Resolver - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').Token} Token - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - - -/** - * No name because it must not be turned off. - * @type {Construct} - */ -const content_content = { - tokenize: tokenizeContent, - resolve: resolveContent -} - -/** @type {Construct} */ -const continuationConstruct = { - tokenize: tokenizeContinuation, - partial: true -} - -/** - * Content is transparent: it’s parsed right now. That way, definitions are also - * parsed right now: before text in paragraphs (specifically, media) are parsed. - * - * @type {Resolver} - */ -function resolveContent(events) { - subtokenize(events) - return events -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeContent(effects, ok) { - /** @type {Token | undefined} */ - let previous - return chunkStart - - /** - * Before a content chunk. - * - * ```markdown - * > | abc - * ^ - * ``` - * - * @type {State} - */ - function chunkStart(code) { - effects.enter('content') - previous = effects.enter('chunkContent', { - contentType: 'content' - }) - return chunkInside(code) - } - - /** - * In a content chunk. - * - * ```markdown - * > | abc - * ^^^ - * ``` - * - * @type {State} - */ - function chunkInside(code) { - if (code === null) { - return contentEnd(code) - } - - // To do: in `markdown-rs`, each line is parsed on its own, and everything - // is stitched together resolving. - if (markdownLineEnding(code)) { - return effects.check( - continuationConstruct, - contentContinue, - contentEnd - )(code) - } - - // Data. - effects.consume(code) - return chunkInside - } - - /** - * - * - * @type {State} - */ - function contentEnd(code) { - effects.exit('chunkContent') - effects.exit('content') - return ok(code) - } - - /** - * - * - * @type {State} - */ - function contentContinue(code) { - effects.consume(code) - effects.exit('chunkContent') - previous.next = effects.enter('chunkContent', { - contentType: 'content', - previous - }) - previous = previous.next - return chunkInside - } -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeContinuation(effects, ok, nok) { - const self = this - return startLookahead - - /** - * - * - * @type {State} - */ - function startLookahead(code) { - effects.exit('chunkContent') - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return factorySpace(effects, prefixed, 'linePrefix') - } - - /** - * - * - * @type {State} - */ - function prefixed(code) { - if (code === null || markdownLineEnding(code)) { - return nok(code) - } - - // Always populated by defaults. - - const tail = self.events[self.events.length - 1] - if ( - !self.parser.constructs.disable.null.includes('codeIndented') && - tail && - tail[1].type === 'linePrefix' && - tail[2].sliceSerialize(tail[1], true).length >= 4 - ) { - return ok(code) - } - return effects.interrupt(self.parser.constructs.flow, nok, ok)(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/initialize/flow.js -/** - * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct - * @typedef {import('micromark-util-types').Initializer} Initializer - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - */ - - - - -/** @type {InitialConstruct} */ -const flow = { - tokenize: initializeFlow -} - -/** - * @this {TokenizeContext} - * @type {Initializer} - */ -function initializeFlow(effects) { - const self = this - const initial = effects.attempt( - // Try to parse a blank line. - blankLine, - atBlankEnding, - // Try to parse initial flow (essentially, only code). - effects.attempt( - this.parser.constructs.flowInitial, - afterConstruct, - factorySpace( - effects, - effects.attempt( - this.parser.constructs.flow, - afterConstruct, - effects.attempt(content_content, afterConstruct) - ), - 'linePrefix' - ) - ) - ) - return initial - - /** @type {State} */ - function atBlankEnding(code) { - if (code === null) { - effects.consume(code) - return - } - effects.enter('lineEndingBlank') - effects.consume(code) - effects.exit('lineEndingBlank') - self.currentConstruct = undefined - return initial - } - - /** @type {State} */ - function afterConstruct(code) { - if (code === null) { - effects.consume(code) - return - } - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - self.currentConstruct = undefined - return initial - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/initialize/text.js -/** - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct - * @typedef {import('micromark-util-types').Initializer} Initializer - * @typedef {import('micromark-util-types').Resolver} Resolver - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - */ - -const resolver = { - resolveAll: createResolver() -} -const string = initializeFactory('string') -const text_text = initializeFactory('text') - -/** - * @param {'string' | 'text'} field - * @returns {InitialConstruct} - */ -function initializeFactory(field) { - return { - tokenize: initializeText, - resolveAll: createResolver( - field === 'text' ? resolveAllLineSuffixes : undefined - ) - } - - /** - * @this {TokenizeContext} - * @type {Initializer} - */ - function initializeText(effects) { - const self = this - const constructs = this.parser.constructs[field] - const text = effects.attempt(constructs, start, notText) - return start - - /** @type {State} */ - function start(code) { - return atBreak(code) ? text(code) : notText(code) - } - - /** @type {State} */ - function notText(code) { - if (code === null) { - effects.consume(code) - return - } - effects.enter('data') - effects.consume(code) - return data - } - - /** @type {State} */ - function data(code) { - if (atBreak(code)) { - effects.exit('data') - return text(code) - } - - // Data. - effects.consume(code) - return data - } - - /** - * @param {Code} code - * @returns {boolean} - */ - function atBreak(code) { - if (code === null) { - return true - } - const list = constructs[code] - let index = -1 - if (list) { - // Always populated by defaults. - - while (++index < list.length) { - const item = list[index] - if (!item.previous || item.previous.call(self, self.previous)) { - return true - } - } - } - return false - } - } -} - -/** - * @param {Resolver | undefined} [extraResolver] - * @returns {Resolver} - */ -function createResolver(extraResolver) { - return resolveAllText - - /** @type {Resolver} */ - function resolveAllText(events, context) { - let index = -1 - /** @type {number | undefined} */ - let enter - - // A rather boring computation (to merge adjacent `data` events) which - // improves mm performance by 29%. - while (++index <= events.length) { - if (enter === undefined) { - if (events[index] && events[index][1].type === 'data') { - enter = index - index++ - } - } else if (!events[index] || events[index][1].type !== 'data') { - // Don’t do anything if there is one data token. - if (index !== enter + 2) { - events[enter][1].end = events[index - 1][1].end - events.splice(enter + 2, index - enter - 2) - index = enter + 2 - } - enter = undefined - } - } - return extraResolver ? extraResolver(events, context) : events - } -} - -/** - * A rather ugly set of instructions which again looks at chunks in the input - * stream. - * The reason to do this here is that it is *much* faster to parse in reverse. - * And that we can’t hook into `null` to split the line suffix before an EOF. - * To do: figure out if we can make this into a clean utility, or even in core. - * As it will be useful for GFMs literal autolink extension (and maybe even - * tables?) - * - * @type {Resolver} - */ -function resolveAllLineSuffixes(events, context) { - let eventIndex = 0 // Skip first. - - while (++eventIndex <= events.length) { - if ( - (eventIndex === events.length || - events[eventIndex][1].type === 'lineEnding') && - events[eventIndex - 1][1].type === 'data' - ) { - const data = events[eventIndex - 1][1] - const chunks = context.sliceStream(data) - let index = chunks.length - let bufferIndex = -1 - let size = 0 - /** @type {boolean | undefined} */ - let tabs - while (index--) { - const chunk = chunks[index] - if (typeof chunk === 'string') { - bufferIndex = chunk.length - while (chunk.charCodeAt(bufferIndex - 1) === 32) { - size++ - bufferIndex-- - } - if (bufferIndex) break - bufferIndex = -1 - } - // Number - else if (chunk === -2) { - tabs = true - size++ - } else if (chunk === -1) { - // Empty - } else { - // Replacement character, exit. - index++ - break - } - } - if (size) { - const token = { - type: - eventIndex === events.length || tabs || size < 2 - ? 'lineSuffix' - : 'hardBreakTrailing', - start: { - line: data.end.line, - column: data.end.column - size, - offset: data.end.offset - size, - _index: data.start._index + index, - _bufferIndex: index - ? bufferIndex - : data.start._bufferIndex + bufferIndex - }, - end: Object.assign({}, data.end) - } - data.end = Object.assign({}, token.start) - if (data.start.offset === data.end.offset) { - Object.assign(data, token) - } else { - events.splice( - eventIndex, - 0, - ['enter', token, context], - ['exit', token, context] - ) - eventIndex += 2 - } - } - eventIndex++ - } - } - return events -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-resolve-all/index.js -/** - * @typedef {import('micromark-util-types').Event} Event - * @typedef {import('micromark-util-types').Resolver} Resolver - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - */ - -/** - * Call all `resolveAll`s. - * - * @param {Array<{resolveAll?: Resolver | undefined}>} constructs - * List of constructs, optionally with `resolveAll`s. - * @param {Array} events - * List of events. - * @param {TokenizeContext} context - * Context used by `tokenize`. - * @returns {Array} - * Changed events. - */ -function resolveAll(constructs, events, context) { - /** @type {Array} */ - const called = [] - let index = -1 - - while (++index < constructs.length) { - const resolve = constructs[index].resolveAll - - if (resolve && !called.includes(resolve)) { - events = resolve(events, context) - called.push(resolve) - } - } - - return events -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/create-tokenizer.js -/** - * @typedef {import('micromark-util-types').Chunk} Chunk - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').ConstructRecord} ConstructRecord - * @typedef {import('micromark-util-types').Effects} Effects - * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct - * @typedef {import('micromark-util-types').ParseContext} ParseContext - * @typedef {import('micromark-util-types').Point} Point - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').Token} Token - * @typedef {import('micromark-util-types').TokenType} TokenType - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - */ - -/** - * @callback Restore - * @returns {void} - * - * @typedef Info - * @property {Restore} restore - * @property {number} from - * - * @callback ReturnHandle - * Handle a successful run. - * @param {Construct} construct - * @param {Info} info - * @returns {void} - */ - - - - -/** - * Create a tokenizer. - * Tokenizers deal with one type of data (e.g., containers, flow, text). - * The parser is the object dealing with it all. - * `initialize` works like other constructs, except that only its `tokenize` - * function is used, in which case it doesn’t receive an `ok` or `nok`. - * `from` can be given to set the point before the first character, although - * when further lines are indented, they must be set with `defineSkip`. - * - * @param {ParseContext} parser - * @param {InitialConstruct} initialize - * @param {Omit | undefined} [from] - * @returns {TokenizeContext} - */ -function createTokenizer(parser, initialize, from) { - /** @type {Point} */ - let point = Object.assign( - from - ? Object.assign({}, from) - : { - line: 1, - column: 1, - offset: 0 - }, - { - _index: 0, - _bufferIndex: -1 - } - ) - /** @type {Record} */ - const columnStart = {} - /** @type {Array} */ - const resolveAllConstructs = [] - /** @type {Array} */ - let chunks = [] - /** @type {Array} */ - let stack = [] - /** @type {boolean | undefined} */ - let consumed = true - - /** - * Tools used for tokenizing. - * - * @type {Effects} - */ - const effects = { - consume, - enter, - exit, - attempt: constructFactory(onsuccessfulconstruct), - check: constructFactory(onsuccessfulcheck), - interrupt: constructFactory(onsuccessfulcheck, { - interrupt: true - }) - } - - /** - * State and tools for resolving and serializing. - * - * @type {TokenizeContext} - */ - const context = { - previous: null, - code: null, - containerState: {}, - events: [], - parser, - sliceStream, - sliceSerialize, - now, - defineSkip, - write - } - - /** - * The state function. - * - * @type {State | void} - */ - let state = initialize.tokenize.call(context, effects) - - /** - * Track which character we expect to be consumed, to catch bugs. - * - * @type {Code} - */ - let expectedCode - if (initialize.resolveAll) { - resolveAllConstructs.push(initialize) - } - return context - - /** @type {TokenizeContext['write']} */ - function write(slice) { - chunks = push(chunks, slice) - main() - - // Exit if we’re not done, resolve might change stuff. - if (chunks[chunks.length - 1] !== null) { - return [] - } - addResult(initialize, 0) - - // Otherwise, resolve, and exit. - context.events = resolveAll(resolveAllConstructs, context.events, context) - return context.events - } - - // - // Tools. - // - - /** @type {TokenizeContext['sliceSerialize']} */ - function sliceSerialize(token, expandTabs) { - return serializeChunks(sliceStream(token), expandTabs) - } - - /** @type {TokenizeContext['sliceStream']} */ - function sliceStream(token) { - return sliceChunks(chunks, token) - } - - /** @type {TokenizeContext['now']} */ - function now() { - // This is a hot path, so we clone manually instead of `Object.assign({}, point)` - const {line, column, offset, _index, _bufferIndex} = point - return { - line, - column, - offset, - _index, - _bufferIndex - } - } - - /** @type {TokenizeContext['defineSkip']} */ - function defineSkip(value) { - columnStart[value.line] = value.column - accountForPotentialSkip() - } - - // - // State management. - // - - /** - * Main loop (note that `_index` and `_bufferIndex` in `point` are modified by - * `consume`). - * Here is where we walk through the chunks, which either include strings of - * several characters, or numerical character codes. - * The reason to do this in a loop instead of a call is so the stack can - * drain. - * - * @returns {void} - */ - function main() { - /** @type {number} */ - let chunkIndex - while (point._index < chunks.length) { - const chunk = chunks[point._index] - - // If we’re in a buffer chunk, loop through it. - if (typeof chunk === 'string') { - chunkIndex = point._index - if (point._bufferIndex < 0) { - point._bufferIndex = 0 - } - while ( - point._index === chunkIndex && - point._bufferIndex < chunk.length - ) { - go(chunk.charCodeAt(point._bufferIndex)) - } - } else { - go(chunk) - } - } - } - - /** - * Deal with one code. - * - * @param {Code} code - * @returns {void} - */ - function go(code) { - consumed = undefined - expectedCode = code - state = state(code) - } - - /** @type {Effects['consume']} */ - function consume(code) { - if (markdownLineEnding(code)) { - point.line++ - point.column = 1 - point.offset += code === -3 ? 2 : 1 - accountForPotentialSkip() - } else if (code !== -1) { - point.column++ - point.offset++ - } - - // Not in a string chunk. - if (point._bufferIndex < 0) { - point._index++ - } else { - point._bufferIndex++ - - // At end of string chunk. - // @ts-expect-error Points w/ non-negative `_bufferIndex` reference - // strings. - if (point._bufferIndex === chunks[point._index].length) { - point._bufferIndex = -1 - point._index++ - } - } - - // Expose the previous character. - context.previous = code - - // Mark as consumed. - consumed = true - } - - /** @type {Effects['enter']} */ - function enter(type, fields) { - /** @type {Token} */ - // @ts-expect-error Patch instead of assign required fields to help GC. - const token = fields || {} - token.type = type - token.start = now() - context.events.push(['enter', token, context]) - stack.push(token) - return token - } - - /** @type {Effects['exit']} */ - function exit(type) { - const token = stack.pop() - token.end = now() - context.events.push(['exit', token, context]) - return token - } - - /** - * Use results. - * - * @type {ReturnHandle} - */ - function onsuccessfulconstruct(construct, info) { - addResult(construct, info.from) - } - - /** - * Discard results. - * - * @type {ReturnHandle} - */ - function onsuccessfulcheck(_, info) { - info.restore() - } - - /** - * Factory to attempt/check/interrupt. - * - * @param {ReturnHandle} onreturn - * @param {{interrupt?: boolean | undefined} | undefined} [fields] - */ - function constructFactory(onreturn, fields) { - return hook - - /** - * Handle either an object mapping codes to constructs, a list of - * constructs, or a single construct. - * - * @param {Array | Construct | ConstructRecord} constructs - * @param {State} returnState - * @param {State | undefined} [bogusState] - * @returns {State} - */ - function hook(constructs, returnState, bogusState) { - /** @type {Array} */ - let listOfConstructs - /** @type {number} */ - let constructIndex - /** @type {Construct} */ - let currentConstruct - /** @type {Info} */ - let info - return Array.isArray(constructs) /* c8 ignore next 1 */ - ? handleListOfConstructs(constructs) - : 'tokenize' in constructs - ? // @ts-expect-error Looks like a construct. - handleListOfConstructs([constructs]) - : handleMapOfConstructs(constructs) - - /** - * Handle a list of construct. - * - * @param {ConstructRecord} map - * @returns {State} - */ - function handleMapOfConstructs(map) { - return start - - /** @type {State} */ - function start(code) { - const def = code !== null && map[code] - const all = code !== null && map.null - const list = [ - // To do: add more extension tests. - /* c8 ignore next 2 */ - ...(Array.isArray(def) ? def : def ? [def] : []), - ...(Array.isArray(all) ? all : all ? [all] : []) - ] - return handleListOfConstructs(list)(code) - } - } - - /** - * Handle a list of construct. - * - * @param {Array} list - * @returns {State} - */ - function handleListOfConstructs(list) { - listOfConstructs = list - constructIndex = 0 - if (list.length === 0) { - return bogusState - } - return handleConstruct(list[constructIndex]) - } - - /** - * Handle a single construct. - * - * @param {Construct} construct - * @returns {State} - */ - function handleConstruct(construct) { - return start - - /** @type {State} */ - function start(code) { - // To do: not needed to store if there is no bogus state, probably? - // Currently doesn’t work because `inspect` in document does a check - // w/o a bogus, which doesn’t make sense. But it does seem to help perf - // by not storing. - info = store() - currentConstruct = construct - if (!construct.partial) { - context.currentConstruct = construct - } - - // Always populated by defaults. - - if ( - construct.name && - context.parser.constructs.disable.null.includes(construct.name) - ) { - return nok(code) - } - return construct.tokenize.call( - // If we do have fields, create an object w/ `context` as its - // prototype. - // This allows a “live binding”, which is needed for `interrupt`. - fields ? Object.assign(Object.create(context), fields) : context, - effects, - ok, - nok - )(code) - } - } - - /** @type {State} */ - function ok(code) { - consumed = true - onreturn(currentConstruct, info) - return returnState - } - - /** @type {State} */ - function nok(code) { - consumed = true - info.restore() - if (++constructIndex < listOfConstructs.length) { - return handleConstruct(listOfConstructs[constructIndex]) - } - return bogusState - } - } - } - - /** - * @param {Construct} construct - * @param {number} from - * @returns {void} - */ - function addResult(construct, from) { - if (construct.resolveAll && !resolveAllConstructs.includes(construct)) { - resolveAllConstructs.push(construct) - } - if (construct.resolve) { - splice( - context.events, - from, - context.events.length - from, - construct.resolve(context.events.slice(from), context) - ) - } - if (construct.resolveTo) { - context.events = construct.resolveTo(context.events, context) - } - } - - /** - * Store state. - * - * @returns {Info} - */ - function store() { - const startPoint = now() - const startPrevious = context.previous - const startCurrentConstruct = context.currentConstruct - const startEventsIndex = context.events.length - const startStack = Array.from(stack) - return { - restore, - from: startEventsIndex - } - - /** - * Restore state. - * - * @returns {void} - */ - function restore() { - point = startPoint - context.previous = startPrevious - context.currentConstruct = startCurrentConstruct - context.events.length = startEventsIndex - stack = startStack - accountForPotentialSkip() - } - } - - /** - * Move the current point a bit forward in the line when it’s on a column - * skip. - * - * @returns {void} - */ - function accountForPotentialSkip() { - if (point.line in columnStart && point.column < 2) { - point.column = columnStart[point.line] - point.offset += columnStart[point.line] - 1 - } - } -} - -/** - * Get the chunks from a slice of chunks in the range of a token. - * - * @param {Array} chunks - * @param {Pick} token - * @returns {Array} - */ -function sliceChunks(chunks, token) { - const startIndex = token.start._index - const startBufferIndex = token.start._bufferIndex - const endIndex = token.end._index - const endBufferIndex = token.end._bufferIndex - /** @type {Array} */ - let view - if (startIndex === endIndex) { - // @ts-expect-error `_bufferIndex` is used on string chunks. - view = [chunks[startIndex].slice(startBufferIndex, endBufferIndex)] - } else { - view = chunks.slice(startIndex, endIndex) - if (startBufferIndex > -1) { - const head = view[0] - if (typeof head === 'string') { - view[0] = head.slice(startBufferIndex) - } else { - view.shift() - } - } - if (endBufferIndex > 0) { - // @ts-expect-error `_bufferIndex` is used on string chunks. - view.push(chunks[endIndex].slice(0, endBufferIndex)) - } - } - return view -} - -/** - * Get the string value of a slice of chunks. - * - * @param {Array} chunks - * @param {boolean | undefined} [expandTabs=false] - * @returns {string} - */ -function serializeChunks(chunks, expandTabs) { - let index = -1 - /** @type {Array} */ - const result = [] - /** @type {boolean | undefined} */ - let atTab - while (++index < chunks.length) { - const chunk = chunks[index] - /** @type {string} */ - let value - if (typeof chunk === 'string') { - value = chunk - } else - switch (chunk) { - case -5: { - value = '\r' - break - } - case -4: { - value = '\n' - break - } - case -3: { - value = '\r' + '\n' - break - } - case -2: { - value = expandTabs ? ' ' : '\t' - break - } - case -1: { - if (!expandTabs && atTab) continue - value = ' ' - break - } - default: { - // Currently only replacement character. - value = String.fromCharCode(chunk) - } - } - atTab = chunk === -2 - result.push(value) - } - return result.join('') -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/thematic-break.js -/** - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const thematicBreak = { - name: 'thematicBreak', - tokenize: tokenizeThematicBreak -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeThematicBreak(effects, ok, nok) { - let size = 0 - /** @type {NonNullable} */ - let marker - return start - - /** - * Start of thematic break. - * - * ```markdown - * > | *** - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter('thematicBreak') - // To do: parse indent like `markdown-rs`. - return before(code) - } - - /** - * After optional whitespace, at marker. - * - * ```markdown - * > | *** - * ^ - * ``` - * - * @type {State} - */ - function before(code) { - marker = code - return atBreak(code) - } - - /** - * After something, before something else. - * - * ```markdown - * > | *** - * ^ - * ``` - * - * @type {State} - */ - function atBreak(code) { - if (code === marker) { - effects.enter('thematicBreakSequence') - return sequence(code) - } - if (size >= 3 && (code === null || markdownLineEnding(code))) { - effects.exit('thematicBreak') - return ok(code) - } - return nok(code) - } - - /** - * In sequence. - * - * ```markdown - * > | *** - * ^ - * ``` - * - * @type {State} - */ - function sequence(code) { - if (code === marker) { - effects.consume(code) - size++ - return sequence - } - effects.exit('thematicBreakSequence') - return markdownSpace(code) - ? factorySpace(effects, atBreak, 'whitespace')(code) - : atBreak(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/list.js -/** - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').ContainerState} ContainerState - * @typedef {import('micromark-util-types').Exiter} Exiter - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - - - - -/** @type {Construct} */ -const list = { - name: 'list', - tokenize: tokenizeListStart, - continuation: { - tokenize: tokenizeListContinuation - }, - exit: tokenizeListEnd -} - -/** @type {Construct} */ -const listItemPrefixWhitespaceConstruct = { - tokenize: tokenizeListItemPrefixWhitespace, - partial: true -} - -/** @type {Construct} */ -const indentConstruct = { - tokenize: tokenizeIndent, - partial: true -} - -// To do: `markdown-rs` parses list items on their own and later stitches them -// together. - -/** - * @type {Tokenizer} - * @this {TokenizeContext} - */ -function tokenizeListStart(effects, ok, nok) { - const self = this - const tail = self.events[self.events.length - 1] - let initialSize = - tail && tail[1].type === 'linePrefix' - ? tail[2].sliceSerialize(tail[1], true).length - : 0 - let size = 0 - return start - - /** @type {State} */ - function start(code) { - const kind = - self.containerState.type || - (code === 42 || code === 43 || code === 45 - ? 'listUnordered' - : 'listOrdered') - if ( - kind === 'listUnordered' - ? !self.containerState.marker || code === self.containerState.marker - : asciiDigit(code) - ) { - if (!self.containerState.type) { - self.containerState.type = kind - effects.enter(kind, { - _container: true - }) - } - if (kind === 'listUnordered') { - effects.enter('listItemPrefix') - return code === 42 || code === 45 - ? effects.check(thematicBreak, nok, atMarker)(code) - : atMarker(code) - } - if (!self.interrupt || code === 49) { - effects.enter('listItemPrefix') - effects.enter('listItemValue') - return inside(code) - } - } - return nok(code) - } - - /** @type {State} */ - function inside(code) { - if (asciiDigit(code) && ++size < 10) { - effects.consume(code) - return inside - } - if ( - (!self.interrupt || size < 2) && - (self.containerState.marker - ? code === self.containerState.marker - : code === 41 || code === 46) - ) { - effects.exit('listItemValue') - return atMarker(code) - } - return nok(code) - } - - /** - * @type {State} - **/ - function atMarker(code) { - effects.enter('listItemMarker') - effects.consume(code) - effects.exit('listItemMarker') - self.containerState.marker = self.containerState.marker || code - return effects.check( - blankLine, - // Can’t be empty when interrupting. - self.interrupt ? nok : onBlank, - effects.attempt( - listItemPrefixWhitespaceConstruct, - endOfPrefix, - otherPrefix - ) - ) - } - - /** @type {State} */ - function onBlank(code) { - self.containerState.initialBlankLine = true - initialSize++ - return endOfPrefix(code) - } - - /** @type {State} */ - function otherPrefix(code) { - if (markdownSpace(code)) { - effects.enter('listItemPrefixWhitespace') - effects.consume(code) - effects.exit('listItemPrefixWhitespace') - return endOfPrefix - } - return nok(code) - } - - /** @type {State} */ - function endOfPrefix(code) { - self.containerState.size = - initialSize + - self.sliceSerialize(effects.exit('listItemPrefix'), true).length - return ok(code) - } -} - -/** - * @type {Tokenizer} - * @this {TokenizeContext} - */ -function tokenizeListContinuation(effects, ok, nok) { - const self = this - self.containerState._closeFlow = undefined - return effects.check(blankLine, onBlank, notBlank) - - /** @type {State} */ - function onBlank(code) { - self.containerState.furtherBlankLines = - self.containerState.furtherBlankLines || - self.containerState.initialBlankLine - - // We have a blank line. - // Still, try to consume at most the items size. - return factorySpace( - effects, - ok, - 'listItemIndent', - self.containerState.size + 1 - )(code) - } - - /** @type {State} */ - function notBlank(code) { - if (self.containerState.furtherBlankLines || !markdownSpace(code)) { - self.containerState.furtherBlankLines = undefined - self.containerState.initialBlankLine = undefined - return notInCurrentItem(code) - } - self.containerState.furtherBlankLines = undefined - self.containerState.initialBlankLine = undefined - return effects.attempt(indentConstruct, ok, notInCurrentItem)(code) - } - - /** @type {State} */ - function notInCurrentItem(code) { - // While we do continue, we signal that the flow should be closed. - self.containerState._closeFlow = true - // As we’re closing flow, we’re no longer interrupting. - self.interrupt = undefined - // Always populated by defaults. - - return factorySpace( - effects, - effects.attempt(list, ok, nok), - 'linePrefix', - self.parser.constructs.disable.null.includes('codeIndented') - ? undefined - : 4 - )(code) - } -} - -/** - * @type {Tokenizer} - * @this {TokenizeContext} - */ -function tokenizeIndent(effects, ok, nok) { - const self = this - return factorySpace( - effects, - afterPrefix, - 'listItemIndent', - self.containerState.size + 1 - ) - - /** @type {State} */ - function afterPrefix(code) { - const tail = self.events[self.events.length - 1] - return tail && - tail[1].type === 'listItemIndent' && - tail[2].sliceSerialize(tail[1], true).length === self.containerState.size - ? ok(code) - : nok(code) - } -} - -/** - * @type {Exiter} - * @this {TokenizeContext} - */ -function tokenizeListEnd(effects) { - effects.exit(this.containerState.type) -} - -/** - * @type {Tokenizer} - * @this {TokenizeContext} - */ -function tokenizeListItemPrefixWhitespace(effects, ok, nok) { - const self = this - - // Always populated by defaults. - - return factorySpace( - effects, - afterPrefix, - 'listItemPrefixWhitespace', - self.parser.constructs.disable.null.includes('codeIndented') - ? undefined - : 4 + 1 - ) - - /** @type {State} */ - function afterPrefix(code) { - const tail = self.events[self.events.length - 1] - return !markdownSpace(code) && - tail && - tail[1].type === 'listItemPrefixWhitespace' - ? ok(code) - : nok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/block-quote.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').Exiter} Exiter - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const blockQuote = { - name: 'blockQuote', - tokenize: tokenizeBlockQuoteStart, - continuation: { - tokenize: tokenizeBlockQuoteContinuation - }, - exit -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeBlockQuoteStart(effects, ok, nok) { - const self = this - return start - - /** - * Start of block quote. - * - * ```markdown - * > | > a - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - if (code === 62) { - const state = self.containerState - if (!state.open) { - effects.enter('blockQuote', { - _container: true - }) - state.open = true - } - effects.enter('blockQuotePrefix') - effects.enter('blockQuoteMarker') - effects.consume(code) - effects.exit('blockQuoteMarker') - return after - } - return nok(code) - } - - /** - * After `>`, before optional whitespace. - * - * ```markdown - * > | > a - * ^ - * ``` - * - * @type {State} - */ - function after(code) { - if (markdownSpace(code)) { - effects.enter('blockQuotePrefixWhitespace') - effects.consume(code) - effects.exit('blockQuotePrefixWhitespace') - effects.exit('blockQuotePrefix') - return ok - } - effects.exit('blockQuotePrefix') - return ok(code) - } -} - -/** - * Start of block quote continuation. - * - * ```markdown - * | > a - * > | > b - * ^ - * ``` - * - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeBlockQuoteContinuation(effects, ok, nok) { - const self = this - return contStart - - /** - * Start of block quote continuation. - * - * Also used to parse the first block quote opening. - * - * ```markdown - * | > a - * > | > b - * ^ - * ``` - * - * @type {State} - */ - function contStart(code) { - if (markdownSpace(code)) { - // Always populated by defaults. - - return factorySpace( - effects, - contBefore, - 'linePrefix', - self.parser.constructs.disable.null.includes('codeIndented') - ? undefined - : 4 - )(code) - } - return contBefore(code) - } - - /** - * At `>`, after optional whitespace. - * - * Also used to parse the first block quote opening. - * - * ```markdown - * | > a - * > | > b - * ^ - * ``` - * - * @type {State} - */ - function contBefore(code) { - return effects.attempt(blockQuote, ok, nok)(code) - } -} - -/** @type {Exiter} */ -function exit(effects) { - effects.exit('blockQuote') -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-destination/index.js -/** - * @typedef {import('micromark-util-types').Effects} Effects - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenType} TokenType - */ - - -/** - * Parse destinations. - * - * ###### Examples - * - * ```markdown - * - * b> - * - * - * a - * a\)b - * a(b)c - * a(b) - * ``` - * - * @param {Effects} effects - * Context. - * @param {State} ok - * State switched to when successful. - * @param {State} nok - * State switched to when unsuccessful. - * @param {TokenType} type - * Type for whole (`` or `b`). - * @param {TokenType} literalType - * Type when enclosed (``). - * @param {TokenType} literalMarkerType - * Type for enclosing (`<` and `>`). - * @param {TokenType} rawType - * Type when not enclosed (`b`). - * @param {TokenType} stringType - * Type for the value (`a` or `b`). - * @param {number | undefined} [max=Infinity] - * Depth of nested parens (inclusive). - * @returns {State} - * Start state. - */ // eslint-disable-next-line max-params -function factoryDestination( - effects, - ok, - nok, - type, - literalType, - literalMarkerType, - rawType, - stringType, - max -) { - const limit = max || Number.POSITIVE_INFINITY - let balance = 0 - return start - - /** - * Start of destination. - * - * ```markdown - * > | - * ^ - * > | aa - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - if (code === 60) { - effects.enter(type) - effects.enter(literalType) - effects.enter(literalMarkerType) - effects.consume(code) - effects.exit(literalMarkerType) - return enclosedBefore - } - - // ASCII control, space, closing paren. - if (code === null || code === 32 || code === 41 || asciiControl(code)) { - return nok(code) - } - effects.enter(type) - effects.enter(rawType) - effects.enter(stringType) - effects.enter('chunkString', { - contentType: 'string' - }) - return raw(code) - } - - /** - * After `<`, at an enclosed destination. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function enclosedBefore(code) { - if (code === 62) { - effects.enter(literalMarkerType) - effects.consume(code) - effects.exit(literalMarkerType) - effects.exit(literalType) - effects.exit(type) - return ok - } - effects.enter(stringType) - effects.enter('chunkString', { - contentType: 'string' - }) - return enclosed(code) - } - - /** - * In enclosed destination. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function enclosed(code) { - if (code === 62) { - effects.exit('chunkString') - effects.exit(stringType) - return enclosedBefore(code) - } - if (code === null || code === 60 || markdownLineEnding(code)) { - return nok(code) - } - effects.consume(code) - return code === 92 ? enclosedEscape : enclosed - } - - /** - * After `\`, at a special character. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function enclosedEscape(code) { - if (code === 60 || code === 62 || code === 92) { - effects.consume(code) - return enclosed - } - return enclosed(code) - } - - /** - * In raw destination. - * - * ```markdown - * > | aa - * ^ - * ``` - * - * @type {State} - */ - function raw(code) { - if ( - !balance && - (code === null || code === 41 || markdownLineEndingOrSpace(code)) - ) { - effects.exit('chunkString') - effects.exit(stringType) - effects.exit(rawType) - effects.exit(type) - return ok(code) - } - if (balance < limit && code === 40) { - effects.consume(code) - balance++ - return raw - } - if (code === 41) { - effects.consume(code) - balance-- - return raw - } - - // ASCII control (but *not* `\0`) and space and `(`. - // Note: in `markdown-rs`, `\0` exists in codes, in `micromark-js` it - // doesn’t. - if (code === null || code === 32 || code === 40 || asciiControl(code)) { - return nok(code) - } - effects.consume(code) - return code === 92 ? rawEscape : raw - } - - /** - * After `\`, at special character. - * - * ```markdown - * > | a\*a - * ^ - * ``` - * - * @type {State} - */ - function rawEscape(code) { - if (code === 40 || code === 41 || code === 92) { - effects.consume(code) - return raw - } - return raw(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-label/index.js -/** - * @typedef {import('micromark-util-types').Effects} Effects - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').TokenType} TokenType - */ - - -/** - * Parse labels. - * - * > 👉 **Note**: labels in markdown are capped at 999 characters in the string. - * - * ###### Examples - * - * ```markdown - * [a] - * [a - * b] - * [a\]b] - * ``` - * - * @this {TokenizeContext} - * Tokenize context. - * @param {Effects} effects - * Context. - * @param {State} ok - * State switched to when successful. - * @param {State} nok - * State switched to when unsuccessful. - * @param {TokenType} type - * Type of the whole label (`[a]`). - * @param {TokenType} markerType - * Type for the markers (`[` and `]`). - * @param {TokenType} stringType - * Type for the identifier (`a`). - * @returns {State} - * Start state. - */ // eslint-disable-next-line max-params -function factoryLabel(effects, ok, nok, type, markerType, stringType) { - const self = this - let size = 0 - /** @type {boolean} */ - let seen - return start - - /** - * Start of label. - * - * ```markdown - * > | [a] - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter(type) - effects.enter(markerType) - effects.consume(code) - effects.exit(markerType) - effects.enter(stringType) - return atBreak - } - - /** - * In label, at something, before something else. - * - * ```markdown - * > | [a] - * ^ - * ``` - * - * @type {State} - */ - function atBreak(code) { - if ( - size > 999 || - code === null || - code === 91 || - (code === 93 && !seen) || - // To do: remove in the future once we’ve switched from - // `micromark-extension-footnote` to `micromark-extension-gfm-footnote`, - // which doesn’t need this. - // Hidden footnotes hook. - /* c8 ignore next 3 */ - (code === 94 && - !size && - '_hiddenFootnoteSupport' in self.parser.constructs) - ) { - return nok(code) - } - if (code === 93) { - effects.exit(stringType) - effects.enter(markerType) - effects.consume(code) - effects.exit(markerType) - effects.exit(type) - return ok - } - - // To do: indent? Link chunks and EOLs together? - if (markdownLineEnding(code)) { - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return atBreak - } - effects.enter('chunkString', { - contentType: 'string' - }) - return labelInside(code) - } - - /** - * In label, in text. - * - * ```markdown - * > | [a] - * ^ - * ``` - * - * @type {State} - */ - function labelInside(code) { - if ( - code === null || - code === 91 || - code === 93 || - markdownLineEnding(code) || - size++ > 999 - ) { - effects.exit('chunkString') - return atBreak(code) - } - effects.consume(code) - if (!seen) seen = !markdownSpace(code) - return code === 92 ? labelEscape : labelInside - } - - /** - * After `\`, at a special character. - * - * ```markdown - * > | [a\*a] - * ^ - * ``` - * - * @type {State} - */ - function labelEscape(code) { - if (code === 91 || code === 92 || code === 93) { - effects.consume(code) - size++ - return labelInside - } - return labelInside(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-title/index.js -/** - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Effects} Effects - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenType} TokenType - */ - - - -/** - * Parse titles. - * - * ###### Examples - * - * ```markdown - * "a" - * 'b' - * (c) - * "a - * b" - * 'a - * b' - * (a\)b) - * ``` - * - * @param {Effects} effects - * Context. - * @param {State} ok - * State switched to when successful. - * @param {State} nok - * State switched to when unsuccessful. - * @param {TokenType} type - * Type of the whole title (`"a"`, `'b'`, `(c)`). - * @param {TokenType} markerType - * Type for the markers (`"`, `'`, `(`, and `)`). - * @param {TokenType} stringType - * Type for the value (`a`). - * @returns {State} - * Start state. - */ // eslint-disable-next-line max-params -function factoryTitle(effects, ok, nok, type, markerType, stringType) { - /** @type {NonNullable} */ - let marker - return start - - /** - * Start of title. - * - * ```markdown - * > | "a" - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - if (code === 34 || code === 39 || code === 40) { - effects.enter(type) - effects.enter(markerType) - effects.consume(code) - effects.exit(markerType) - marker = code === 40 ? 41 : code - return begin - } - return nok(code) - } - - /** - * After opening marker. - * - * This is also used at the closing marker. - * - * ```markdown - * > | "a" - * ^ - * ``` - * - * @type {State} - */ - function begin(code) { - if (code === marker) { - effects.enter(markerType) - effects.consume(code) - effects.exit(markerType) - effects.exit(type) - return ok - } - effects.enter(stringType) - return atBreak(code) - } - - /** - * At something, before something else. - * - * ```markdown - * > | "a" - * ^ - * ``` - * - * @type {State} - */ - function atBreak(code) { - if (code === marker) { - effects.exit(stringType) - return begin(marker) - } - if (code === null) { - return nok(code) - } - - // Note: blank lines can’t exist in content. - if (markdownLineEnding(code)) { - // To do: use `space_or_tab_eol_with_options`, connect. - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return factorySpace(effects, atBreak, 'linePrefix') - } - effects.enter('chunkString', { - contentType: 'string' - }) - return inside(code) - } - - /** - * - * - * @type {State} - */ - function inside(code) { - if (code === marker || code === null || markdownLineEnding(code)) { - effects.exit('chunkString') - return atBreak(code) - } - effects.consume(code) - return code === 92 ? escape : inside - } - - /** - * After `\`, at a special character. - * - * ```markdown - * > | "a\*b" - * ^ - * ``` - * - * @type {State} - */ - function escape(code) { - if (code === marker || code === 92) { - effects.consume(code) - return inside - } - return inside(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-whitespace/index.js -/** - * @typedef {import('micromark-util-types').Effects} Effects - * @typedef {import('micromark-util-types').State} State - */ - - - -/** - * Parse spaces and tabs. - * - * There is no `nok` parameter: - * - * * line endings or spaces in markdown are often optional, in which case this - * factory can be used and `ok` will be switched to whether spaces were found - * or not - * * one line ending or space can be detected with - * `markdownLineEndingOrSpace(code)` right before using `factoryWhitespace` - * - * @param {Effects} effects - * Context. - * @param {State} ok - * State switched to when successful. - * @returns - * Start state. - */ -function factoryWhitespace(effects, ok) { - /** @type {boolean} */ - let seen - return start - - /** @type {State} */ - function start(code) { - if (markdownLineEnding(code)) { - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - seen = true - return start - } - if (markdownSpace(code)) { - return factorySpace( - effects, - start, - seen ? 'linePrefix' : 'lineSuffix' - )(code) - } - return ok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-normalize-identifier/index.js -/** - * Normalize an identifier (as found in references, definitions). - * - * Collapses markdown whitespace, trim, and then lower- and uppercase. - * - * Some characters are considered “uppercase”, such as U+03F4 (`ϴ`), but if their - * lowercase counterpart (U+03B8 (`θ`)) is uppercased will result in a different - * uppercase character (U+0398 (`Θ`)). - * So, to get a canonical form, we perform both lower- and uppercase. - * - * Using uppercase last makes sure keys will never interact with default - * prototypal values (such as `constructor`): nothing in the prototype of - * `Object` is uppercase. - * - * @param {string} value - * Identifier to normalize. - * @returns {string} - * Normalized identifier. - */ -function normalizeIdentifier(value) { - return ( - value - // Collapse markdown whitespace. - .replace(/[\t\n\r ]+/g, ' ') - // Trim. - .replace(/^ | $/g, '') - // Some characters are considered “uppercase”, but if their lowercase - // counterpart is uppercased will result in a different uppercase - // character. - // Hence, to get that form, we perform both lower- and uppercase. - // Upper case makes sure keys will not interact with default prototypal - // methods: no method is uppercase. - .toLowerCase() - .toUpperCase() - ) -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/definition.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - - - - - - -/** @type {Construct} */ -const definition = { - name: 'definition', - tokenize: tokenizeDefinition -} - -/** @type {Construct} */ -const titleBefore = { - tokenize: tokenizeTitleBefore, - partial: true -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeDefinition(effects, ok, nok) { - const self = this - /** @type {string} */ - let identifier - return start - - /** - * At start of a definition. - * - * ```markdown - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - // Do not interrupt paragraphs (but do follow definitions). - // To do: do `interrupt` the way `markdown-rs` does. - // To do: parse whitespace the way `markdown-rs` does. - effects.enter('definition') - return before(code) - } - - /** - * After optional whitespace, at `[`. - * - * ```markdown - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function before(code) { - // To do: parse whitespace the way `markdown-rs` does. - - return factoryLabel.call( - self, - effects, - labelAfter, - // Note: we don’t need to reset the way `markdown-rs` does. - nok, - 'definitionLabel', - 'definitionLabelMarker', - 'definitionLabelString' - )(code) - } - - /** - * After label. - * - * ```markdown - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function labelAfter(code) { - identifier = normalizeIdentifier( - self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1) - ) - if (code === 58) { - effects.enter('definitionMarker') - effects.consume(code) - effects.exit('definitionMarker') - return markerAfter - } - return nok(code) - } - - /** - * After marker. - * - * ```markdown - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function markerAfter(code) { - // Note: whitespace is optional. - return markdownLineEndingOrSpace(code) - ? factoryWhitespace(effects, destinationBefore)(code) - : destinationBefore(code) - } - - /** - * Before destination. - * - * ```markdown - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function destinationBefore(code) { - return factoryDestination( - effects, - destinationAfter, - // Note: we don’t need to reset the way `markdown-rs` does. - nok, - 'definitionDestination', - 'definitionDestinationLiteral', - 'definitionDestinationLiteralMarker', - 'definitionDestinationRaw', - 'definitionDestinationString' - )(code) - } - - /** - * After destination. - * - * ```markdown - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function destinationAfter(code) { - return effects.attempt(titleBefore, after, after)(code) - } - - /** - * After definition. - * - * ```markdown - * > | [a]: b - * ^ - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function after(code) { - return markdownSpace(code) - ? factorySpace(effects, afterWhitespace, 'whitespace')(code) - : afterWhitespace(code) - } - - /** - * After definition, after optional whitespace. - * - * ```markdown - * > | [a]: b - * ^ - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function afterWhitespace(code) { - if (code === null || markdownLineEnding(code)) { - effects.exit('definition') - - // Note: we don’t care about uniqueness. - // It’s likely that that doesn’t happen very frequently. - // It is more likely that it wastes precious time. - self.parser.defined.push(identifier) - - // To do: `markdown-rs` interrupt. - // // You’d be interrupting. - // tokenizer.interrupt = true - return ok(code) - } - return nok(code) - } -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeTitleBefore(effects, ok, nok) { - return titleBefore - - /** - * After destination, at whitespace. - * - * ```markdown - * > | [a]: b - * ^ - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function titleBefore(code) { - return markdownLineEndingOrSpace(code) - ? factoryWhitespace(effects, beforeMarker)(code) - : nok(code) - } - - /** - * At title. - * - * ```markdown - * | [a]: b - * > | "c" - * ^ - * ``` - * - * @type {State} - */ - function beforeMarker(code) { - return factoryTitle( - effects, - titleAfter, - nok, - 'definitionTitle', - 'definitionTitleMarker', - 'definitionTitleString' - )(code) - } - - /** - * After title. - * - * ```markdown - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function titleAfter(code) { - return markdownSpace(code) - ? factorySpace(effects, titleAfterOptionalWhitespace, 'whitespace')(code) - : titleAfterOptionalWhitespace(code) - } - - /** - * After title, after optional whitespace. - * - * ```markdown - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function titleAfterOptionalWhitespace(code) { - return code === null || markdownLineEnding(code) ? ok(code) : nok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/code-indented.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const codeIndented = { - name: 'codeIndented', - tokenize: tokenizeCodeIndented -} - -/** @type {Construct} */ -const furtherStart = { - tokenize: tokenizeFurtherStart, - partial: true -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeCodeIndented(effects, ok, nok) { - const self = this - return start - - /** - * Start of code (indented). - * - * > **Parsing note**: it is not needed to check if this first line is a - * > filled line (that it has a non-whitespace character), because blank lines - * > are parsed already, so we never run into that. - * - * ```markdown - * > | aaa - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - // To do: manually check if interrupting like `markdown-rs`. - - effects.enter('codeIndented') - // To do: use an improved `space_or_tab` function like `markdown-rs`, - // so that we can drop the next state. - return factorySpace(effects, afterPrefix, 'linePrefix', 4 + 1)(code) - } - - /** - * At start, after 1 or 4 spaces. - * - * ```markdown - * > | aaa - * ^ - * ``` - * - * @type {State} - */ - function afterPrefix(code) { - const tail = self.events[self.events.length - 1] - return tail && - tail[1].type === 'linePrefix' && - tail[2].sliceSerialize(tail[1], true).length >= 4 - ? atBreak(code) - : nok(code) - } - - /** - * At a break. - * - * ```markdown - * > | aaa - * ^ ^ - * ``` - * - * @type {State} - */ - function atBreak(code) { - if (code === null) { - return after(code) - } - if (markdownLineEnding(code)) { - return effects.attempt(furtherStart, atBreak, after)(code) - } - effects.enter('codeFlowValue') - return inside(code) - } - - /** - * In code content. - * - * ```markdown - * > | aaa - * ^^^^ - * ``` - * - * @type {State} - */ - function inside(code) { - if (code === null || markdownLineEnding(code)) { - effects.exit('codeFlowValue') - return atBreak(code) - } - effects.consume(code) - return inside - } - - /** @type {State} */ - function after(code) { - effects.exit('codeIndented') - // To do: allow interrupting like `markdown-rs`. - // Feel free to interrupt. - // tokenizer.interrupt = false - return ok(code) - } -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeFurtherStart(effects, ok, nok) { - const self = this - return furtherStart - - /** - * At eol, trying to parse another indent. - * - * ```markdown - * > | aaa - * ^ - * | bbb - * ``` - * - * @type {State} - */ - function furtherStart(code) { - // To do: improve `lazy` / `pierce` handling. - // If this is a lazy line, it can’t be code. - if (self.parser.lazy[self.now().line]) { - return nok(code) - } - if (markdownLineEnding(code)) { - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return furtherStart - } - - // To do: the code here in `micromark-js` is a bit different from - // `markdown-rs` because there it can attempt spaces. - // We can’t yet. - // - // To do: use an improved `space_or_tab` function like `markdown-rs`, - // so that we can drop the next state. - return factorySpace(effects, afterPrefix, 'linePrefix', 4 + 1)(code) - } - - /** - * At start, after 1 or 4 spaces. - * - * ```markdown - * > | aaa - * ^ - * ``` - * - * @type {State} - */ - function afterPrefix(code) { - const tail = self.events[self.events.length - 1] - return tail && - tail[1].type === 'linePrefix' && - tail[2].sliceSerialize(tail[1], true).length >= 4 - ? ok(code) - : markdownLineEnding(code) - ? furtherStart(code) - : nok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/heading-atx.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').Resolver} Resolver - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').Token} Token - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - - -/** @type {Construct} */ -const headingAtx = { - name: 'headingAtx', - tokenize: tokenizeHeadingAtx, - resolve: resolveHeadingAtx -} - -/** @type {Resolver} */ -function resolveHeadingAtx(events, context) { - let contentEnd = events.length - 2 - let contentStart = 3 - /** @type {Token} */ - let content - /** @type {Token} */ - let text - - // Prefix whitespace, part of the opening. - if (events[contentStart][1].type === 'whitespace') { - contentStart += 2 - } - - // Suffix whitespace, part of the closing. - if ( - contentEnd - 2 > contentStart && - events[contentEnd][1].type === 'whitespace' - ) { - contentEnd -= 2 - } - if ( - events[contentEnd][1].type === 'atxHeadingSequence' && - (contentStart === contentEnd - 1 || - (contentEnd - 4 > contentStart && - events[contentEnd - 2][1].type === 'whitespace')) - ) { - contentEnd -= contentStart + 1 === contentEnd ? 2 : 4 - } - if (contentEnd > contentStart) { - content = { - type: 'atxHeadingText', - start: events[contentStart][1].start, - end: events[contentEnd][1].end - } - text = { - type: 'chunkText', - start: events[contentStart][1].start, - end: events[contentEnd][1].end, - contentType: 'text' - } - splice(events, contentStart, contentEnd - contentStart + 1, [ - ['enter', content, context], - ['enter', text, context], - ['exit', text, context], - ['exit', content, context] - ]) - } - return events -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeHeadingAtx(effects, ok, nok) { - let size = 0 - return start - - /** - * Start of a heading (atx). - * - * ```markdown - * > | ## aa - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - // To do: parse indent like `markdown-rs`. - effects.enter('atxHeading') - return before(code) - } - - /** - * After optional whitespace, at `#`. - * - * ```markdown - * > | ## aa - * ^ - * ``` - * - * @type {State} - */ - function before(code) { - effects.enter('atxHeadingSequence') - return sequenceOpen(code) - } - - /** - * In opening sequence. - * - * ```markdown - * > | ## aa - * ^ - * ``` - * - * @type {State} - */ - function sequenceOpen(code) { - if (code === 35 && size++ < 6) { - effects.consume(code) - return sequenceOpen - } - - // Always at least one `#`. - if (code === null || markdownLineEndingOrSpace(code)) { - effects.exit('atxHeadingSequence') - return atBreak(code) - } - return nok(code) - } - - /** - * After something, before something else. - * - * ```markdown - * > | ## aa - * ^ - * ``` - * - * @type {State} - */ - function atBreak(code) { - if (code === 35) { - effects.enter('atxHeadingSequence') - return sequenceFurther(code) - } - if (code === null || markdownLineEnding(code)) { - effects.exit('atxHeading') - // To do: interrupt like `markdown-rs`. - // // Feel free to interrupt. - // tokenizer.interrupt = false - return ok(code) - } - if (markdownSpace(code)) { - return factorySpace(effects, atBreak, 'whitespace')(code) - } - - // To do: generate `data` tokens, add the `text` token later. - // Needs edit map, see: `markdown.rs`. - effects.enter('atxHeadingText') - return data(code) - } - - /** - * In further sequence (after whitespace). - * - * Could be normal “visible” hashes in the heading or a final sequence. - * - * ```markdown - * > | ## aa ## - * ^ - * ``` - * - * @type {State} - */ - function sequenceFurther(code) { - if (code === 35) { - effects.consume(code) - return sequenceFurther - } - effects.exit('atxHeadingSequence') - return atBreak(code) - } - - /** - * In text. - * - * ```markdown - * > | ## aa - * ^ - * ``` - * - * @type {State} - */ - function data(code) { - if (code === null || code === 35 || markdownLineEndingOrSpace(code)) { - effects.exit('atxHeadingText') - return atBreak(code) - } - effects.consume(code) - return data - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/setext-underline.js -/** - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').Resolver} Resolver - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const setextUnderline = { - name: 'setextUnderline', - tokenize: tokenizeSetextUnderline, - resolveTo: resolveToSetextUnderline -} - -/** @type {Resolver} */ -function resolveToSetextUnderline(events, context) { - // To do: resolve like `markdown-rs`. - let index = events.length - /** @type {number | undefined} */ - let content - /** @type {number | undefined} */ - let text - /** @type {number | undefined} */ - let definition - - // Find the opening of the content. - // It’ll always exist: we don’t tokenize if it isn’t there. - while (index--) { - if (events[index][0] === 'enter') { - if (events[index][1].type === 'content') { - content = index - break - } - if (events[index][1].type === 'paragraph') { - text = index - } - } - // Exit - else { - if (events[index][1].type === 'content') { - // Remove the content end (if needed we’ll add it later) - events.splice(index, 1) - } - if (!definition && events[index][1].type === 'definition') { - definition = index - } - } - } - const heading = { - type: 'setextHeading', - start: Object.assign({}, events[text][1].start), - end: Object.assign({}, events[events.length - 1][1].end) - } - - // Change the paragraph to setext heading text. - events[text][1].type = 'setextHeadingText' - - // If we have definitions in the content, we’ll keep on having content, - // but we need move it. - if (definition) { - events.splice(text, 0, ['enter', heading, context]) - events.splice(definition + 1, 0, ['exit', events[content][1], context]) - events[content][1].end = Object.assign({}, events[definition][1].end) - } else { - events[content][1] = heading - } - - // Add the heading exit at the end. - events.push(['exit', heading, context]) - return events -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeSetextUnderline(effects, ok, nok) { - const self = this - /** @type {NonNullable} */ - let marker - return start - - /** - * At start of heading (setext) underline. - * - * ```markdown - * | aa - * > | == - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - let index = self.events.length - /** @type {boolean | undefined} */ - let paragraph - // Find an opening. - while (index--) { - // Skip enter/exit of line ending, line prefix, and content. - // We can now either have a definition or a paragraph. - if ( - self.events[index][1].type !== 'lineEnding' && - self.events[index][1].type !== 'linePrefix' && - self.events[index][1].type !== 'content' - ) { - paragraph = self.events[index][1].type === 'paragraph' - break - } - } - - // To do: handle lazy/pierce like `markdown-rs`. - // To do: parse indent like `markdown-rs`. - if (!self.parser.lazy[self.now().line] && (self.interrupt || paragraph)) { - effects.enter('setextHeadingLine') - marker = code - return before(code) - } - return nok(code) - } - - /** - * After optional whitespace, at `-` or `=`. - * - * ```markdown - * | aa - * > | == - * ^ - * ``` - * - * @type {State} - */ - function before(code) { - effects.enter('setextHeadingLineSequence') - return inside(code) - } - - /** - * In sequence. - * - * ```markdown - * | aa - * > | == - * ^ - * ``` - * - * @type {State} - */ - function inside(code) { - if (code === marker) { - effects.consume(code) - return inside - } - effects.exit('setextHeadingLineSequence') - return markdownSpace(code) - ? factorySpace(effects, after, 'lineSuffix')(code) - : after(code) - } - - /** - * After sequence, after optional whitespace. - * - * ```markdown - * | aa - * > | == - * ^ - * ``` - * - * @type {State} - */ - function after(code) { - if (code === null || markdownLineEnding(code)) { - effects.exit('setextHeadingLine') - return ok(code) - } - return nok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-html-tag-name/index.js -/** - * List of lowercase HTML “block” tag names. - * - * The list, when parsing HTML (flow), results in more relaxed rules (condition - * 6). - * Because they are known blocks, the HTML-like syntax doesn’t have to be - * strictly parsed. - * For tag names not in this list, a more strict algorithm (condition 7) is used - * to detect whether the HTML-like syntax is seen as HTML (flow) or not. - * - * This is copied from: - * . - * - * > 👉 **Note**: `search` was added in `CommonMark@0.31`. - */ -const htmlBlockNames = [ - 'address', - 'article', - 'aside', - 'base', - 'basefont', - 'blockquote', - 'body', - 'caption', - 'center', - 'col', - 'colgroup', - 'dd', - 'details', - 'dialog', - 'dir', - 'div', - 'dl', - 'dt', - 'fieldset', - 'figcaption', - 'figure', - 'footer', - 'form', - 'frame', - 'frameset', - 'h1', - 'h2', - 'h3', - 'h4', - 'h5', - 'h6', - 'head', - 'header', - 'hr', - 'html', - 'iframe', - 'legend', - 'li', - 'link', - 'main', - 'menu', - 'menuitem', - 'nav', - 'noframes', - 'ol', - 'optgroup', - 'option', - 'p', - 'param', - 'search', - 'section', - 'summary', - 'table', - 'tbody', - 'td', - 'tfoot', - 'th', - 'thead', - 'title', - 'tr', - 'track', - 'ul' -] - -/** - * List of lowercase HTML “raw” tag names. - * - * The list, when parsing HTML (flow), results in HTML that can include lines - * without exiting, until a closing tag also in this list is found (condition - * 1). - * - * This module is copied from: - * . - * - * > 👉 **Note**: `textarea` was added in `CommonMark@0.30`. - */ -const htmlRawNames = ['pre', 'script', 'style', 'textarea'] - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/html-flow.js -/** - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').Resolver} Resolver - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - - - -/** @type {Construct} */ -const htmlFlow = { - name: 'htmlFlow', - tokenize: tokenizeHtmlFlow, - resolveTo: resolveToHtmlFlow, - concrete: true -} - -/** @type {Construct} */ -const blankLineBefore = { - tokenize: tokenizeBlankLineBefore, - partial: true -} -const nonLazyContinuationStart = { - tokenize: tokenizeNonLazyContinuationStart, - partial: true -} - -/** @type {Resolver} */ -function resolveToHtmlFlow(events) { - let index = events.length - while (index--) { - if (events[index][0] === 'enter' && events[index][1].type === 'htmlFlow') { - break - } - } - if (index > 1 && events[index - 2][1].type === 'linePrefix') { - // Add the prefix start to the HTML token. - events[index][1].start = events[index - 2][1].start - // Add the prefix start to the HTML line token. - events[index + 1][1].start = events[index - 2][1].start - // Remove the line prefix. - events.splice(index - 2, 2) - } - return events -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeHtmlFlow(effects, ok, nok) { - const self = this - /** @type {number} */ - let marker - /** @type {boolean} */ - let closingTag - /** @type {string} */ - let buffer - /** @type {number} */ - let index - /** @type {Code} */ - let markerB - return start - - /** - * Start of HTML (flow). - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - // To do: parse indent like `markdown-rs`. - return before(code) - } - - /** - * At `<`, after optional whitespace. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function before(code) { - effects.enter('htmlFlow') - effects.enter('htmlFlowData') - effects.consume(code) - return open - } - - /** - * After `<`, at tag name or other stuff. - * - * ```markdown - * > | - * ^ - * > | - * ^ - * > | - * ^ - * ``` - * - * @type {State} - */ - function open(code) { - if (code === 33) { - effects.consume(code) - return declarationOpen - } - if (code === 47) { - effects.consume(code) - closingTag = true - return tagCloseStart - } - if (code === 63) { - effects.consume(code) - marker = 3 - // To do: - // tokenizer.concrete = true - // To do: use `markdown-rs` style interrupt. - // While we’re in an instruction instead of a declaration, we’re on a `?` - // right now, so we do need to search for `>`, similar to declarations. - return self.interrupt ? ok : continuationDeclarationInside - } - - // ASCII alphabetical. - if (asciiAlpha(code)) { - effects.consume(code) - // @ts-expect-error: not null. - buffer = String.fromCharCode(code) - return tagName - } - return nok(code) - } - - /** - * After ` | - * ^ - * > | - * ^ - * > | &<]]> - * ^ - * ``` - * - * @type {State} - */ - function declarationOpen(code) { - if (code === 45) { - effects.consume(code) - marker = 2 - return commentOpenInside - } - if (code === 91) { - effects.consume(code) - marker = 5 - index = 0 - return cdataOpenInside - } - - // ASCII alphabetical. - if (asciiAlpha(code)) { - effects.consume(code) - marker = 4 - // // Do not form containers. - // tokenizer.concrete = true - return self.interrupt ? ok : continuationDeclarationInside - } - return nok(code) - } - - /** - * After ` | - * ^ - * ``` - * - * @type {State} - */ - function commentOpenInside(code) { - if (code === 45) { - effects.consume(code) - // // Do not form containers. - // tokenizer.concrete = true - return self.interrupt ? ok : continuationDeclarationInside - } - return nok(code) - } - - /** - * After ` | &<]]> - * ^^^^^^ - * ``` - * - * @type {State} - */ - function cdataOpenInside(code) { - const value = 'CDATA[' - if (code === value.charCodeAt(index++)) { - effects.consume(code) - if (index === value.length) { - // // Do not form containers. - // tokenizer.concrete = true - return self.interrupt ? ok : continuation - } - return cdataOpenInside - } - return nok(code) - } - - /** - * After ` | - * ^ - * ``` - * - * @type {State} - */ - function tagCloseStart(code) { - if (asciiAlpha(code)) { - effects.consume(code) - // @ts-expect-error: not null. - buffer = String.fromCharCode(code) - return tagName - } - return nok(code) - } - - /** - * In tag name. - * - * ```markdown - * > | - * ^^ - * > | - * ^^ - * ``` - * - * @type {State} - */ - function tagName(code) { - if ( - code === null || - code === 47 || - code === 62 || - markdownLineEndingOrSpace(code) - ) { - const slash = code === 47 - const name = buffer.toLowerCase() - if (!slash && !closingTag && htmlRawNames.includes(name)) { - marker = 1 - // // Do not form containers. - // tokenizer.concrete = true - return self.interrupt ? ok(code) : continuation(code) - } - if (htmlBlockNames.includes(buffer.toLowerCase())) { - marker = 6 - if (slash) { - effects.consume(code) - return basicSelfClosing - } - - // // Do not form containers. - // tokenizer.concrete = true - return self.interrupt ? ok(code) : continuation(code) - } - marker = 7 - // Do not support complete HTML when interrupting. - return self.interrupt && !self.parser.lazy[self.now().line] - ? nok(code) - : closingTag - ? completeClosingTagAfter(code) - : completeAttributeNameBefore(code) - } - - // ASCII alphanumerical and `-`. - if (code === 45 || asciiAlphanumeric(code)) { - effects.consume(code) - buffer += String.fromCharCode(code) - return tagName - } - return nok(code) - } - - /** - * After closing slash of a basic tag name. - * - * ```markdown - * > |
- * ^ - * ``` - * - * @type {State} - */ - function basicSelfClosing(code) { - if (code === 62) { - effects.consume(code) - // // Do not form containers. - // tokenizer.concrete = true - return self.interrupt ? ok : continuation - } - return nok(code) - } - - /** - * After closing slash of a complete tag name. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function completeClosingTagAfter(code) { - if (markdownSpace(code)) { - effects.consume(code) - return completeClosingTagAfter - } - return completeEnd(code) - } - - /** - * At an attribute name. - * - * At first, this state is used after a complete tag name, after whitespace, - * where it expects optional attributes or the end of the tag. - * It is also reused after attributes, when expecting more optional - * attributes. - * - * ```markdown - * > | - * ^ - * > | - * ^ - * > | - * ^ - * > | - * ^ - * > | - * ^ - * ``` - * - * @type {State} - */ - function completeAttributeNameBefore(code) { - if (code === 47) { - effects.consume(code) - return completeEnd - } - - // ASCII alphanumerical and `:` and `_`. - if (code === 58 || code === 95 || asciiAlpha(code)) { - effects.consume(code) - return completeAttributeName - } - if (markdownSpace(code)) { - effects.consume(code) - return completeAttributeNameBefore - } - return completeEnd(code) - } - - /** - * In attribute name. - * - * ```markdown - * > | - * ^ - * > | - * ^ - * > | - * ^ - * ``` - * - * @type {State} - */ - function completeAttributeName(code) { - // ASCII alphanumerical and `-`, `.`, `:`, and `_`. - if ( - code === 45 || - code === 46 || - code === 58 || - code === 95 || - asciiAlphanumeric(code) - ) { - effects.consume(code) - return completeAttributeName - } - return completeAttributeNameAfter(code) - } - - /** - * After attribute name, at an optional initializer, the end of the tag, or - * whitespace. - * - * ```markdown - * > | - * ^ - * > | - * ^ - * ``` - * - * @type {State} - */ - function completeAttributeNameAfter(code) { - if (code === 61) { - effects.consume(code) - return completeAttributeValueBefore - } - if (markdownSpace(code)) { - effects.consume(code) - return completeAttributeNameAfter - } - return completeAttributeNameBefore(code) - } - - /** - * Before unquoted, double quoted, or single quoted attribute value, allowing - * whitespace. - * - * ```markdown - * > | - * ^ - * > | - * ^ - * ``` - * - * @type {State} - */ - function completeAttributeValueBefore(code) { - if ( - code === null || - code === 60 || - code === 61 || - code === 62 || - code === 96 - ) { - return nok(code) - } - if (code === 34 || code === 39) { - effects.consume(code) - markerB = code - return completeAttributeValueQuoted - } - if (markdownSpace(code)) { - effects.consume(code) - return completeAttributeValueBefore - } - return completeAttributeValueUnquoted(code) - } - - /** - * In double or single quoted attribute value. - * - * ```markdown - * > | - * ^ - * > | - * ^ - * ``` - * - * @type {State} - */ - function completeAttributeValueQuoted(code) { - if (code === markerB) { - effects.consume(code) - markerB = null - return completeAttributeValueQuotedAfter - } - if (code === null || markdownLineEnding(code)) { - return nok(code) - } - effects.consume(code) - return completeAttributeValueQuoted - } - - /** - * In unquoted attribute value. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function completeAttributeValueUnquoted(code) { - if ( - code === null || - code === 34 || - code === 39 || - code === 47 || - code === 60 || - code === 61 || - code === 62 || - code === 96 || - markdownLineEndingOrSpace(code) - ) { - return completeAttributeNameAfter(code) - } - effects.consume(code) - return completeAttributeValueUnquoted - } - - /** - * After double or single quoted attribute value, before whitespace or the - * end of the tag. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function completeAttributeValueQuotedAfter(code) { - if (code === 47 || code === 62 || markdownSpace(code)) { - return completeAttributeNameBefore(code) - } - return nok(code) - } - - /** - * In certain circumstances of a complete tag where only an `>` is allowed. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function completeEnd(code) { - if (code === 62) { - effects.consume(code) - return completeAfter - } - return nok(code) - } - - /** - * After `>` in a complete tag. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function completeAfter(code) { - if (code === null || markdownLineEnding(code)) { - // // Do not form containers. - // tokenizer.concrete = true - return continuation(code) - } - if (markdownSpace(code)) { - effects.consume(code) - return completeAfter - } - return nok(code) - } - - /** - * In continuation of any HTML kind. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function continuation(code) { - if (code === 45 && marker === 2) { - effects.consume(code) - return continuationCommentInside - } - if (code === 60 && marker === 1) { - effects.consume(code) - return continuationRawTagOpen - } - if (code === 62 && marker === 4) { - effects.consume(code) - return continuationClose - } - if (code === 63 && marker === 3) { - effects.consume(code) - return continuationDeclarationInside - } - if (code === 93 && marker === 5) { - effects.consume(code) - return continuationCdataInside - } - if (markdownLineEnding(code) && (marker === 6 || marker === 7)) { - effects.exit('htmlFlowData') - return effects.check( - blankLineBefore, - continuationAfter, - continuationStart - )(code) - } - if (code === null || markdownLineEnding(code)) { - effects.exit('htmlFlowData') - return continuationStart(code) - } - effects.consume(code) - return continuation - } - - /** - * In continuation, at eol. - * - * ```markdown - * > | - * ^ - * | asd - * ``` - * - * @type {State} - */ - function continuationStart(code) { - return effects.check( - nonLazyContinuationStart, - continuationStartNonLazy, - continuationAfter - )(code) - } - - /** - * In continuation, at eol, before non-lazy content. - * - * ```markdown - * > | - * ^ - * | asd - * ``` - * - * @type {State} - */ - function continuationStartNonLazy(code) { - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return continuationBefore - } - - /** - * In continuation, before non-lazy content. - * - * ```markdown - * | - * > | asd - * ^ - * ``` - * - * @type {State} - */ - function continuationBefore(code) { - if (code === null || markdownLineEnding(code)) { - return continuationStart(code) - } - effects.enter('htmlFlowData') - return continuation(code) - } - - /** - * In comment continuation, after one `-`, expecting another. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function continuationCommentInside(code) { - if (code === 45) { - effects.consume(code) - return continuationDeclarationInside - } - return continuation(code) - } - - /** - * In raw continuation, after `<`, at `/`. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function continuationRawTagOpen(code) { - if (code === 47) { - effects.consume(code) - buffer = '' - return continuationRawEndTag - } - return continuation(code) - } - - /** - * In raw continuation, after ` | - * ^^^^^^ - * ``` - * - * @type {State} - */ - function continuationRawEndTag(code) { - if (code === 62) { - const name = buffer.toLowerCase() - if (htmlRawNames.includes(name)) { - effects.consume(code) - return continuationClose - } - return continuation(code) - } - if (asciiAlpha(code) && buffer.length < 8) { - effects.consume(code) - // @ts-expect-error: not null. - buffer += String.fromCharCode(code) - return continuationRawEndTag - } - return continuation(code) - } - - /** - * In cdata continuation, after `]`, expecting `]>`. - * - * ```markdown - * > | &<]]> - * ^ - * ``` - * - * @type {State} - */ - function continuationCdataInside(code) { - if (code === 93) { - effects.consume(code) - return continuationDeclarationInside - } - return continuation(code) - } - - /** - * In declaration or instruction continuation, at `>`. - * - * ```markdown - * > | - * ^ - * > | - * ^ - * > | - * ^ - * > | - * ^ - * > | &<]]> - * ^ - * ``` - * - * @type {State} - */ - function continuationDeclarationInside(code) { - if (code === 62) { - effects.consume(code) - return continuationClose - } - - // More dashes. - if (code === 45 && marker === 2) { - effects.consume(code) - return continuationDeclarationInside - } - return continuation(code) - } - - /** - * In closed continuation: everything we get until the eol/eof is part of it. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function continuationClose(code) { - if (code === null || markdownLineEnding(code)) { - effects.exit('htmlFlowData') - return continuationAfter(code) - } - effects.consume(code) - return continuationClose - } - - /** - * Done. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function continuationAfter(code) { - effects.exit('htmlFlow') - // // Feel free to interrupt. - // tokenizer.interrupt = false - // // No longer concrete. - // tokenizer.concrete = false - return ok(code) - } -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeNonLazyContinuationStart(effects, ok, nok) { - const self = this - return start - - /** - * At eol, before continuation. - * - * ```markdown - * > | * ```js - * ^ - * | b - * ``` - * - * @type {State} - */ - function start(code) { - if (markdownLineEnding(code)) { - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return after - } - return nok(code) - } - - /** - * A continuation. - * - * ```markdown - * | * ```js - * > | b - * ^ - * ``` - * - * @type {State} - */ - function after(code) { - return self.parser.lazy[self.now().line] ? nok(code) : ok(code) - } -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeBlankLineBefore(effects, ok, nok) { - return start - - /** - * Before eol, expecting blank line. - * - * ```markdown - * > |
- * ^ - * | - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return effects.attempt(blankLine, ok, nok) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/code-fenced.js -/** - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const nonLazyContinuation = { - tokenize: tokenizeNonLazyContinuation, - partial: true -} - -/** @type {Construct} */ -const codeFenced = { - name: 'codeFenced', - tokenize: tokenizeCodeFenced, - concrete: true -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeCodeFenced(effects, ok, nok) { - const self = this - /** @type {Construct} */ - const closeStart = { - tokenize: tokenizeCloseStart, - partial: true - } - let initialPrefix = 0 - let sizeOpen = 0 - /** @type {NonNullable} */ - let marker - return start - - /** - * Start of code. - * - * ```markdown - * > | ~~~js - * ^ - * | alert(1) - * | ~~~ - * ``` - * - * @type {State} - */ - function start(code) { - // To do: parse whitespace like `markdown-rs`. - return beforeSequenceOpen(code) - } - - /** - * In opening fence, after prefix, at sequence. - * - * ```markdown - * > | ~~~js - * ^ - * | alert(1) - * | ~~~ - * ``` - * - * @type {State} - */ - function beforeSequenceOpen(code) { - const tail = self.events[self.events.length - 1] - initialPrefix = - tail && tail[1].type === 'linePrefix' - ? tail[2].sliceSerialize(tail[1], true).length - : 0 - marker = code - effects.enter('codeFenced') - effects.enter('codeFencedFence') - effects.enter('codeFencedFenceSequence') - return sequenceOpen(code) - } - - /** - * In opening fence sequence. - * - * ```markdown - * > | ~~~js - * ^ - * | alert(1) - * | ~~~ - * ``` - * - * @type {State} - */ - function sequenceOpen(code) { - if (code === marker) { - sizeOpen++ - effects.consume(code) - return sequenceOpen - } - if (sizeOpen < 3) { - return nok(code) - } - effects.exit('codeFencedFenceSequence') - return markdownSpace(code) - ? factorySpace(effects, infoBefore, 'whitespace')(code) - : infoBefore(code) - } - - /** - * In opening fence, after the sequence (and optional whitespace), before info. - * - * ```markdown - * > | ~~~js - * ^ - * | alert(1) - * | ~~~ - * ``` - * - * @type {State} - */ - function infoBefore(code) { - if (code === null || markdownLineEnding(code)) { - effects.exit('codeFencedFence') - return self.interrupt - ? ok(code) - : effects.check(nonLazyContinuation, atNonLazyBreak, after)(code) - } - effects.enter('codeFencedFenceInfo') - effects.enter('chunkString', { - contentType: 'string' - }) - return info(code) - } - - /** - * In info. - * - * ```markdown - * > | ~~~js - * ^ - * | alert(1) - * | ~~~ - * ``` - * - * @type {State} - */ - function info(code) { - if (code === null || markdownLineEnding(code)) { - effects.exit('chunkString') - effects.exit('codeFencedFenceInfo') - return infoBefore(code) - } - if (markdownSpace(code)) { - effects.exit('chunkString') - effects.exit('codeFencedFenceInfo') - return factorySpace(effects, metaBefore, 'whitespace')(code) - } - if (code === 96 && code === marker) { - return nok(code) - } - effects.consume(code) - return info - } - - /** - * In opening fence, after info and whitespace, before meta. - * - * ```markdown - * > | ~~~js eval - * ^ - * | alert(1) - * | ~~~ - * ``` - * - * @type {State} - */ - function metaBefore(code) { - if (code === null || markdownLineEnding(code)) { - return infoBefore(code) - } - effects.enter('codeFencedFenceMeta') - effects.enter('chunkString', { - contentType: 'string' - }) - return meta(code) - } - - /** - * In meta. - * - * ```markdown - * > | ~~~js eval - * ^ - * | alert(1) - * | ~~~ - * ``` - * - * @type {State} - */ - function meta(code) { - if (code === null || markdownLineEnding(code)) { - effects.exit('chunkString') - effects.exit('codeFencedFenceMeta') - return infoBefore(code) - } - if (code === 96 && code === marker) { - return nok(code) - } - effects.consume(code) - return meta - } - - /** - * At eol/eof in code, before a non-lazy closing fence or content. - * - * ```markdown - * > | ~~~js - * ^ - * > | alert(1) - * ^ - * | ~~~ - * ``` - * - * @type {State} - */ - function atNonLazyBreak(code) { - return effects.attempt(closeStart, after, contentBefore)(code) - } - - /** - * Before code content, not a closing fence, at eol. - * - * ```markdown - * | ~~~js - * > | alert(1) - * ^ - * | ~~~ - * ``` - * - * @type {State} - */ - function contentBefore(code) { - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return contentStart - } - - /** - * Before code content, not a closing fence. - * - * ```markdown - * | ~~~js - * > | alert(1) - * ^ - * | ~~~ - * ``` - * - * @type {State} - */ - function contentStart(code) { - return initialPrefix > 0 && markdownSpace(code) - ? factorySpace( - effects, - beforeContentChunk, - 'linePrefix', - initialPrefix + 1 - )(code) - : beforeContentChunk(code) - } - - /** - * Before code content, after optional prefix. - * - * ```markdown - * | ~~~js - * > | alert(1) - * ^ - * | ~~~ - * ``` - * - * @type {State} - */ - function beforeContentChunk(code) { - if (code === null || markdownLineEnding(code)) { - return effects.check(nonLazyContinuation, atNonLazyBreak, after)(code) - } - effects.enter('codeFlowValue') - return contentChunk(code) - } - - /** - * In code content. - * - * ```markdown - * | ~~~js - * > | alert(1) - * ^^^^^^^^ - * | ~~~ - * ``` - * - * @type {State} - */ - function contentChunk(code) { - if (code === null || markdownLineEnding(code)) { - effects.exit('codeFlowValue') - return beforeContentChunk(code) - } - effects.consume(code) - return contentChunk - } - - /** - * After code. - * - * ```markdown - * | ~~~js - * | alert(1) - * > | ~~~ - * ^ - * ``` - * - * @type {State} - */ - function after(code) { - effects.exit('codeFenced') - return ok(code) - } - - /** - * @this {TokenizeContext} - * @type {Tokenizer} - */ - function tokenizeCloseStart(effects, ok, nok) { - let size = 0 - return startBefore - - /** - * - * - * @type {State} - */ - function startBefore(code) { - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return start - } - - /** - * Before closing fence, at optional whitespace. - * - * ```markdown - * | ~~~js - * | alert(1) - * > | ~~~ - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - // Always populated by defaults. - - // To do: `enter` here or in next state? - effects.enter('codeFencedFence') - return markdownSpace(code) - ? factorySpace( - effects, - beforeSequenceClose, - 'linePrefix', - self.parser.constructs.disable.null.includes('codeIndented') - ? undefined - : 4 - )(code) - : beforeSequenceClose(code) - } - - /** - * In closing fence, after optional whitespace, at sequence. - * - * ```markdown - * | ~~~js - * | alert(1) - * > | ~~~ - * ^ - * ``` - * - * @type {State} - */ - function beforeSequenceClose(code) { - if (code === marker) { - effects.enter('codeFencedFenceSequence') - return sequenceClose(code) - } - return nok(code) - } - - /** - * In closing fence sequence. - * - * ```markdown - * | ~~~js - * | alert(1) - * > | ~~~ - * ^ - * ``` - * - * @type {State} - */ - function sequenceClose(code) { - if (code === marker) { - size++ - effects.consume(code) - return sequenceClose - } - if (size >= sizeOpen) { - effects.exit('codeFencedFenceSequence') - return markdownSpace(code) - ? factorySpace(effects, sequenceCloseAfter, 'whitespace')(code) - : sequenceCloseAfter(code) - } - return nok(code) - } - - /** - * After closing fence sequence, after optional whitespace. - * - * ```markdown - * | ~~~js - * | alert(1) - * > | ~~~ - * ^ - * ``` - * - * @type {State} - */ - function sequenceCloseAfter(code) { - if (code === null || markdownLineEnding(code)) { - effects.exit('codeFencedFence') - return ok(code) - } - return nok(code) - } - } -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeNonLazyContinuation(effects, ok, nok) { - const self = this - return start - - /** - * - * - * @type {State} - */ - function start(code) { - if (code === null) { - return nok(code) - } - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return lineStart - } - - /** - * - * - * @type {State} - */ - function lineStart(code) { - return self.parser.lazy[self.now().line] ? nok(code) : ok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/character-entities/index.js -/** - * Map of named character references. - * - * @type {Record} - */ -const characterEntities = { - AElig: 'Æ', - AMP: '&', - Aacute: 'Á', - Abreve: 'Ă', - Acirc: 'Â', - Acy: 'А', - Afr: '𝔄', - Agrave: 'À', - Alpha: 'Α', - Amacr: 'Ā', - And: '⩓', - Aogon: 'Ą', - Aopf: '𝔸', - ApplyFunction: '⁡', - Aring: 'Å', - Ascr: '𝒜', - Assign: '≔', - Atilde: 'Ã', - Auml: 'Ä', - Backslash: '∖', - Barv: '⫧', - Barwed: '⌆', - Bcy: 'Б', - Because: '∵', - Bernoullis: 'ℬ', - Beta: 'Β', - Bfr: '𝔅', - Bopf: '𝔹', - Breve: '˘', - Bscr: 'ℬ', - Bumpeq: '≎', - CHcy: 'Ч', - COPY: '©', - Cacute: 'Ć', - Cap: '⋒', - CapitalDifferentialD: 'ⅅ', - Cayleys: 'ℭ', - Ccaron: 'Č', - Ccedil: 'Ç', - Ccirc: 'Ĉ', - Cconint: '∰', - Cdot: 'Ċ', - Cedilla: '¸', - CenterDot: '·', - Cfr: 'ℭ', - Chi: 'Χ', - CircleDot: '⊙', - CircleMinus: '⊖', - CirclePlus: '⊕', - CircleTimes: '⊗', - ClockwiseContourIntegral: '∲', - CloseCurlyDoubleQuote: '”', - CloseCurlyQuote: '’', - Colon: '∷', - Colone: '⩴', - Congruent: '≡', - Conint: '∯', - ContourIntegral: '∮', - Copf: 'ℂ', - Coproduct: '∐', - CounterClockwiseContourIntegral: '∳', - Cross: '⨯', - Cscr: '𝒞', - Cup: '⋓', - CupCap: '≍', - DD: 'ⅅ', - DDotrahd: '⤑', - DJcy: 'Ђ', - DScy: 'Ѕ', - DZcy: 'Џ', - Dagger: '‡', - Darr: '↡', - Dashv: '⫤', - Dcaron: 'Ď', - Dcy: 'Д', - Del: '∇', - Delta: 'Δ', - Dfr: '𝔇', - DiacriticalAcute: '´', - DiacriticalDot: '˙', - DiacriticalDoubleAcute: '˝', - DiacriticalGrave: '`', - DiacriticalTilde: '˜', - Diamond: '⋄', - DifferentialD: 'ⅆ', - Dopf: '𝔻', - Dot: '¨', - DotDot: '⃜', - DotEqual: '≐', - DoubleContourIntegral: '∯', - DoubleDot: '¨', - DoubleDownArrow: '⇓', - DoubleLeftArrow: '⇐', - DoubleLeftRightArrow: '⇔', - DoubleLeftTee: '⫤', - DoubleLongLeftArrow: '⟸', - DoubleLongLeftRightArrow: '⟺', - DoubleLongRightArrow: '⟹', - DoubleRightArrow: '⇒', - DoubleRightTee: '⊨', - DoubleUpArrow: '⇑', - DoubleUpDownArrow: '⇕', - DoubleVerticalBar: '∥', - DownArrow: '↓', - DownArrowBar: '⤓', - DownArrowUpArrow: '⇵', - DownBreve: '̑', - DownLeftRightVector: '⥐', - DownLeftTeeVector: '⥞', - DownLeftVector: '↽', - DownLeftVectorBar: '⥖', - DownRightTeeVector: '⥟', - DownRightVector: '⇁', - DownRightVectorBar: '⥗', - DownTee: '⊤', - DownTeeArrow: '↧', - Downarrow: '⇓', - Dscr: '𝒟', - Dstrok: 'Đ', - ENG: 'Ŋ', - ETH: 'Ð', - Eacute: 'É', - Ecaron: 'Ě', - Ecirc: 'Ê', - Ecy: 'Э', - Edot: 'Ė', - Efr: '𝔈', - Egrave: 'È', - Element: '∈', - Emacr: 'Ē', - EmptySmallSquare: '◻', - EmptyVerySmallSquare: '▫', - Eogon: 'Ę', - Eopf: '𝔼', - Epsilon: 'Ε', - Equal: '⩵', - EqualTilde: '≂', - Equilibrium: '⇌', - Escr: 'ℰ', - Esim: '⩳', - Eta: 'Η', - Euml: 'Ë', - Exists: '∃', - ExponentialE: 'ⅇ', - Fcy: 'Ф', - Ffr: '𝔉', - FilledSmallSquare: '◼', - FilledVerySmallSquare: '▪', - Fopf: '𝔽', - ForAll: '∀', - Fouriertrf: 'ℱ', - Fscr: 'ℱ', - GJcy: 'Ѓ', - GT: '>', - Gamma: 'Γ', - Gammad: 'Ϝ', - Gbreve: 'Ğ', - Gcedil: 'Ģ', - Gcirc: 'Ĝ', - Gcy: 'Г', - Gdot: 'Ġ', - Gfr: '𝔊', - Gg: '⋙', - Gopf: '𝔾', - GreaterEqual: '≥', - GreaterEqualLess: '⋛', - GreaterFullEqual: '≧', - GreaterGreater: '⪢', - GreaterLess: '≷', - GreaterSlantEqual: '⩾', - GreaterTilde: '≳', - Gscr: '𝒢', - Gt: '≫', - HARDcy: 'Ъ', - Hacek: 'ˇ', - Hat: '^', - Hcirc: 'Ĥ', - Hfr: 'ℌ', - HilbertSpace: 'ℋ', - Hopf: 'ℍ', - HorizontalLine: '─', - Hscr: 'ℋ', - Hstrok: 'Ħ', - HumpDownHump: '≎', - HumpEqual: '≏', - IEcy: 'Е', - IJlig: 'IJ', - IOcy: 'Ё', - Iacute: 'Í', - Icirc: 'Î', - Icy: 'И', - Idot: 'İ', - Ifr: 'ℑ', - Igrave: 'Ì', - Im: 'ℑ', - Imacr: 'Ī', - ImaginaryI: 'ⅈ', - Implies: '⇒', - Int: '∬', - Integral: '∫', - Intersection: '⋂', - InvisibleComma: '⁣', - InvisibleTimes: '⁢', - Iogon: 'Į', - Iopf: '𝕀', - Iota: 'Ι', - Iscr: 'ℐ', - Itilde: 'Ĩ', - Iukcy: 'І', - Iuml: 'Ï', - Jcirc: 'Ĵ', - Jcy: 'Й', - Jfr: '𝔍', - Jopf: '𝕁', - Jscr: '𝒥', - Jsercy: 'Ј', - Jukcy: 'Є', - KHcy: 'Х', - KJcy: 'Ќ', - Kappa: 'Κ', - Kcedil: 'Ķ', - Kcy: 'К', - Kfr: '𝔎', - Kopf: '𝕂', - Kscr: '𝒦', - LJcy: 'Љ', - LT: '<', - Lacute: 'Ĺ', - Lambda: 'Λ', - Lang: '⟪', - Laplacetrf: 'ℒ', - Larr: '↞', - Lcaron: 'Ľ', - Lcedil: 'Ļ', - Lcy: 'Л', - LeftAngleBracket: '⟨', - LeftArrow: '←', - LeftArrowBar: '⇤', - LeftArrowRightArrow: '⇆', - LeftCeiling: '⌈', - LeftDoubleBracket: '⟦', - LeftDownTeeVector: '⥡', - LeftDownVector: '⇃', - LeftDownVectorBar: '⥙', - LeftFloor: '⌊', - LeftRightArrow: '↔', - LeftRightVector: '⥎', - LeftTee: '⊣', - LeftTeeArrow: '↤', - LeftTeeVector: '⥚', - LeftTriangle: '⊲', - LeftTriangleBar: '⧏', - LeftTriangleEqual: '⊴', - LeftUpDownVector: '⥑', - LeftUpTeeVector: '⥠', - LeftUpVector: '↿', - LeftUpVectorBar: '⥘', - LeftVector: '↼', - LeftVectorBar: '⥒', - Leftarrow: '⇐', - Leftrightarrow: '⇔', - LessEqualGreater: '⋚', - LessFullEqual: '≦', - LessGreater: '≶', - LessLess: '⪡', - LessSlantEqual: '⩽', - LessTilde: '≲', - Lfr: '𝔏', - Ll: '⋘', - Lleftarrow: '⇚', - Lmidot: 'Ŀ', - LongLeftArrow: '⟵', - LongLeftRightArrow: '⟷', - LongRightArrow: '⟶', - Longleftarrow: '⟸', - Longleftrightarrow: '⟺', - Longrightarrow: '⟹', - Lopf: '𝕃', - LowerLeftArrow: '↙', - LowerRightArrow: '↘', - Lscr: 'ℒ', - Lsh: '↰', - Lstrok: 'Ł', - Lt: '≪', - Map: '⤅', - Mcy: 'М', - MediumSpace: ' ', - Mellintrf: 'ℳ', - Mfr: '𝔐', - MinusPlus: '∓', - Mopf: '𝕄', - Mscr: 'ℳ', - Mu: 'Μ', - NJcy: 'Њ', - Nacute: 'Ń', - Ncaron: 'Ň', - Ncedil: 'Ņ', - Ncy: 'Н', - NegativeMediumSpace: '​', - NegativeThickSpace: '​', - NegativeThinSpace: '​', - NegativeVeryThinSpace: '​', - NestedGreaterGreater: '≫', - NestedLessLess: '≪', - NewLine: '\n', - Nfr: '𝔑', - NoBreak: '⁠', - NonBreakingSpace: ' ', - Nopf: 'ℕ', - Not: '⫬', - NotCongruent: '≢', - NotCupCap: '≭', - NotDoubleVerticalBar: '∦', - NotElement: '∉', - NotEqual: '≠', - NotEqualTilde: '≂̸', - NotExists: '∄', - NotGreater: '≯', - NotGreaterEqual: '≱', - NotGreaterFullEqual: '≧̸', - NotGreaterGreater: '≫̸', - NotGreaterLess: '≹', - NotGreaterSlantEqual: '⩾̸', - NotGreaterTilde: '≵', - NotHumpDownHump: '≎̸', - NotHumpEqual: '≏̸', - NotLeftTriangle: '⋪', - NotLeftTriangleBar: '⧏̸', - NotLeftTriangleEqual: '⋬', - NotLess: '≮', - NotLessEqual: '≰', - NotLessGreater: '≸', - NotLessLess: '≪̸', - NotLessSlantEqual: '⩽̸', - NotLessTilde: '≴', - NotNestedGreaterGreater: '⪢̸', - NotNestedLessLess: '⪡̸', - NotPrecedes: '⊀', - NotPrecedesEqual: '⪯̸', - NotPrecedesSlantEqual: '⋠', - NotReverseElement: '∌', - NotRightTriangle: '⋫', - NotRightTriangleBar: '⧐̸', - NotRightTriangleEqual: '⋭', - NotSquareSubset: '⊏̸', - NotSquareSubsetEqual: '⋢', - NotSquareSuperset: '⊐̸', - NotSquareSupersetEqual: '⋣', - NotSubset: '⊂⃒', - NotSubsetEqual: '⊈', - NotSucceeds: '⊁', - NotSucceedsEqual: '⪰̸', - NotSucceedsSlantEqual: '⋡', - NotSucceedsTilde: '≿̸', - NotSuperset: '⊃⃒', - NotSupersetEqual: '⊉', - NotTilde: '≁', - NotTildeEqual: '≄', - NotTildeFullEqual: '≇', - NotTildeTilde: '≉', - NotVerticalBar: '∤', - Nscr: '𝒩', - Ntilde: 'Ñ', - Nu: 'Ν', - OElig: 'Œ', - Oacute: 'Ó', - Ocirc: 'Ô', - Ocy: 'О', - Odblac: 'Ő', - Ofr: '𝔒', - Ograve: 'Ò', - Omacr: 'Ō', - Omega: 'Ω', - Omicron: 'Ο', - Oopf: '𝕆', - OpenCurlyDoubleQuote: '“', - OpenCurlyQuote: '‘', - Or: '⩔', - Oscr: '𝒪', - Oslash: 'Ø', - Otilde: 'Õ', - Otimes: '⨷', - Ouml: 'Ö', - OverBar: '‾', - OverBrace: '⏞', - OverBracket: '⎴', - OverParenthesis: '⏜', - PartialD: '∂', - Pcy: 'П', - Pfr: '𝔓', - Phi: 'Φ', - Pi: 'Π', - PlusMinus: '±', - Poincareplane: 'ℌ', - Popf: 'ℙ', - Pr: '⪻', - Precedes: '≺', - PrecedesEqual: '⪯', - PrecedesSlantEqual: '≼', - PrecedesTilde: '≾', - Prime: '″', - Product: '∏', - Proportion: '∷', - Proportional: '∝', - Pscr: '𝒫', - Psi: 'Ψ', - QUOT: '"', - Qfr: '𝔔', - Qopf: 'ℚ', - Qscr: '𝒬', - RBarr: '⤐', - REG: '®', - Racute: 'Ŕ', - Rang: '⟫', - Rarr: '↠', - Rarrtl: '⤖', - Rcaron: 'Ř', - Rcedil: 'Ŗ', - Rcy: 'Р', - Re: 'ℜ', - ReverseElement: '∋', - ReverseEquilibrium: '⇋', - ReverseUpEquilibrium: '⥯', - Rfr: 'ℜ', - Rho: 'Ρ', - RightAngleBracket: '⟩', - RightArrow: '→', - RightArrowBar: '⇥', - RightArrowLeftArrow: '⇄', - RightCeiling: '⌉', - RightDoubleBracket: '⟧', - RightDownTeeVector: '⥝', - RightDownVector: '⇂', - RightDownVectorBar: '⥕', - RightFloor: '⌋', - RightTee: '⊢', - RightTeeArrow: '↦', - RightTeeVector: '⥛', - RightTriangle: '⊳', - RightTriangleBar: '⧐', - RightTriangleEqual: '⊵', - RightUpDownVector: '⥏', - RightUpTeeVector: '⥜', - RightUpVector: '↾', - RightUpVectorBar: '⥔', - RightVector: '⇀', - RightVectorBar: '⥓', - Rightarrow: '⇒', - Ropf: 'ℝ', - RoundImplies: '⥰', - Rrightarrow: '⇛', - Rscr: 'ℛ', - Rsh: '↱', - RuleDelayed: '⧴', - SHCHcy: 'Щ', - SHcy: 'Ш', - SOFTcy: 'Ь', - Sacute: 'Ś', - Sc: '⪼', - Scaron: 'Š', - Scedil: 'Ş', - Scirc: 'Ŝ', - Scy: 'С', - Sfr: '𝔖', - ShortDownArrow: '↓', - ShortLeftArrow: '←', - ShortRightArrow: '→', - ShortUpArrow: '↑', - Sigma: 'Σ', - SmallCircle: '∘', - Sopf: '𝕊', - Sqrt: '√', - Square: '□', - SquareIntersection: '⊓', - SquareSubset: '⊏', - SquareSubsetEqual: '⊑', - SquareSuperset: '⊐', - SquareSupersetEqual: '⊒', - SquareUnion: '⊔', - Sscr: '𝒮', - Star: '⋆', - Sub: '⋐', - Subset: '⋐', - SubsetEqual: '⊆', - Succeeds: '≻', - SucceedsEqual: '⪰', - SucceedsSlantEqual: '≽', - SucceedsTilde: '≿', - SuchThat: '∋', - Sum: '∑', - Sup: '⋑', - Superset: '⊃', - SupersetEqual: '⊇', - Supset: '⋑', - THORN: 'Þ', - TRADE: '™', - TSHcy: 'Ћ', - TScy: 'Ц', - Tab: '\t', - Tau: 'Τ', - Tcaron: 'Ť', - Tcedil: 'Ţ', - Tcy: 'Т', - Tfr: '𝔗', - Therefore: '∴', - Theta: 'Θ', - ThickSpace: '  ', - ThinSpace: ' ', - Tilde: '∼', - TildeEqual: '≃', - TildeFullEqual: '≅', - TildeTilde: '≈', - Topf: '𝕋', - TripleDot: '⃛', - Tscr: '𝒯', - Tstrok: 'Ŧ', - Uacute: 'Ú', - Uarr: '↟', - Uarrocir: '⥉', - Ubrcy: 'Ў', - Ubreve: 'Ŭ', - Ucirc: 'Û', - Ucy: 'У', - Udblac: 'Ű', - Ufr: '𝔘', - Ugrave: 'Ù', - Umacr: 'Ū', - UnderBar: '_', - UnderBrace: '⏟', - UnderBracket: '⎵', - UnderParenthesis: '⏝', - Union: '⋃', - UnionPlus: '⊎', - Uogon: 'Ų', - Uopf: '𝕌', - UpArrow: '↑', - UpArrowBar: '⤒', - UpArrowDownArrow: '⇅', - UpDownArrow: '↕', - UpEquilibrium: '⥮', - UpTee: '⊥', - UpTeeArrow: '↥', - Uparrow: '⇑', - Updownarrow: '⇕', - UpperLeftArrow: '↖', - UpperRightArrow: '↗', - Upsi: 'ϒ', - Upsilon: 'Υ', - Uring: 'Ů', - Uscr: '𝒰', - Utilde: 'Ũ', - Uuml: 'Ü', - VDash: '⊫', - Vbar: '⫫', - Vcy: 'В', - Vdash: '⊩', - Vdashl: '⫦', - Vee: '⋁', - Verbar: '‖', - Vert: '‖', - VerticalBar: '∣', - VerticalLine: '|', - VerticalSeparator: '❘', - VerticalTilde: '≀', - VeryThinSpace: ' ', - Vfr: '𝔙', - Vopf: '𝕍', - Vscr: '𝒱', - Vvdash: '⊪', - Wcirc: 'Ŵ', - Wedge: '⋀', - Wfr: '𝔚', - Wopf: '𝕎', - Wscr: '𝒲', - Xfr: '𝔛', - Xi: 'Ξ', - Xopf: '𝕏', - Xscr: '𝒳', - YAcy: 'Я', - YIcy: 'Ї', - YUcy: 'Ю', - Yacute: 'Ý', - Ycirc: 'Ŷ', - Ycy: 'Ы', - Yfr: '𝔜', - Yopf: '𝕐', - Yscr: '𝒴', - Yuml: 'Ÿ', - ZHcy: 'Ж', - Zacute: 'Ź', - Zcaron: 'Ž', - Zcy: 'З', - Zdot: 'Ż', - ZeroWidthSpace: '​', - Zeta: 'Ζ', - Zfr: 'ℨ', - Zopf: 'ℤ', - Zscr: '𝒵', - aacute: 'á', - abreve: 'ă', - ac: '∾', - acE: '∾̳', - acd: '∿', - acirc: 'â', - acute: '´', - acy: 'а', - aelig: 'æ', - af: '⁡', - afr: '𝔞', - agrave: 'à', - alefsym: 'ℵ', - aleph: 'ℵ', - alpha: 'α', - amacr: 'ā', - amalg: '⨿', - amp: '&', - and: '∧', - andand: '⩕', - andd: '⩜', - andslope: '⩘', - andv: '⩚', - ang: '∠', - ange: '⦤', - angle: '∠', - angmsd: '∡', - angmsdaa: '⦨', - angmsdab: '⦩', - angmsdac: '⦪', - angmsdad: '⦫', - angmsdae: '⦬', - angmsdaf: '⦭', - angmsdag: '⦮', - angmsdah: '⦯', - angrt: '∟', - angrtvb: '⊾', - angrtvbd: '⦝', - angsph: '∢', - angst: 'Å', - angzarr: '⍼', - aogon: 'ą', - aopf: '𝕒', - ap: '≈', - apE: '⩰', - apacir: '⩯', - ape: '≊', - apid: '≋', - apos: "'", - approx: '≈', - approxeq: '≊', - aring: 'å', - ascr: '𝒶', - ast: '*', - asymp: '≈', - asympeq: '≍', - atilde: 'ã', - auml: 'ä', - awconint: '∳', - awint: '⨑', - bNot: '⫭', - backcong: '≌', - backepsilon: '϶', - backprime: '‵', - backsim: '∽', - backsimeq: '⋍', - barvee: '⊽', - barwed: '⌅', - barwedge: '⌅', - bbrk: '⎵', - bbrktbrk: '⎶', - bcong: '≌', - bcy: 'б', - bdquo: '„', - becaus: '∵', - because: '∵', - bemptyv: '⦰', - bepsi: '϶', - bernou: 'ℬ', - beta: 'β', - beth: 'ℶ', - between: '≬', - bfr: '𝔟', - bigcap: '⋂', - bigcirc: '◯', - bigcup: '⋃', - bigodot: '⨀', - bigoplus: '⨁', - bigotimes: '⨂', - bigsqcup: '⨆', - bigstar: '★', - bigtriangledown: '▽', - bigtriangleup: '△', - biguplus: '⨄', - bigvee: '⋁', - bigwedge: '⋀', - bkarow: '⤍', - blacklozenge: '⧫', - blacksquare: '▪', - blacktriangle: '▴', - blacktriangledown: '▾', - blacktriangleleft: '◂', - blacktriangleright: '▸', - blank: '␣', - blk12: '▒', - blk14: '░', - blk34: '▓', - block: '█', - bne: '=⃥', - bnequiv: '≡⃥', - bnot: '⌐', - bopf: '𝕓', - bot: '⊥', - bottom: '⊥', - bowtie: '⋈', - boxDL: '╗', - boxDR: '╔', - boxDl: '╖', - boxDr: '╓', - boxH: '═', - boxHD: '╦', - boxHU: '╩', - boxHd: '╤', - boxHu: '╧', - boxUL: '╝', - boxUR: '╚', - boxUl: '╜', - boxUr: '╙', - boxV: '║', - boxVH: '╬', - boxVL: '╣', - boxVR: '╠', - boxVh: '╫', - boxVl: '╢', - boxVr: '╟', - boxbox: '⧉', - boxdL: '╕', - boxdR: '╒', - boxdl: '┐', - boxdr: '┌', - boxh: '─', - boxhD: '╥', - boxhU: '╨', - boxhd: '┬', - boxhu: '┴', - boxminus: '⊟', - boxplus: '⊞', - boxtimes: '⊠', - boxuL: '╛', - boxuR: '╘', - boxul: '┘', - boxur: '└', - boxv: '│', - boxvH: '╪', - boxvL: '╡', - boxvR: '╞', - boxvh: '┼', - boxvl: '┤', - boxvr: '├', - bprime: '‵', - breve: '˘', - brvbar: '¦', - bscr: '𝒷', - bsemi: '⁏', - bsim: '∽', - bsime: '⋍', - bsol: '\\', - bsolb: '⧅', - bsolhsub: '⟈', - bull: '•', - bullet: '•', - bump: '≎', - bumpE: '⪮', - bumpe: '≏', - bumpeq: '≏', - cacute: 'ć', - cap: '∩', - capand: '⩄', - capbrcup: '⩉', - capcap: '⩋', - capcup: '⩇', - capdot: '⩀', - caps: '∩︀', - caret: '⁁', - caron: 'ˇ', - ccaps: '⩍', - ccaron: 'č', - ccedil: 'ç', - ccirc: 'ĉ', - ccups: '⩌', - ccupssm: '⩐', - cdot: 'ċ', - cedil: '¸', - cemptyv: '⦲', - cent: '¢', - centerdot: '·', - cfr: '𝔠', - chcy: 'ч', - check: '✓', - checkmark: '✓', - chi: 'χ', - cir: '○', - cirE: '⧃', - circ: 'ˆ', - circeq: '≗', - circlearrowleft: '↺', - circlearrowright: '↻', - circledR: '®', - circledS: 'Ⓢ', - circledast: '⊛', - circledcirc: '⊚', - circleddash: '⊝', - cire: '≗', - cirfnint: '⨐', - cirmid: '⫯', - cirscir: '⧂', - clubs: '♣', - clubsuit: '♣', - colon: ':', - colone: '≔', - coloneq: '≔', - comma: ',', - commat: '@', - comp: '∁', - compfn: '∘', - complement: '∁', - complexes: 'ℂ', - cong: '≅', - congdot: '⩭', - conint: '∮', - copf: '𝕔', - coprod: '∐', - copy: '©', - copysr: '℗', - crarr: '↵', - cross: '✗', - cscr: '𝒸', - csub: '⫏', - csube: '⫑', - csup: '⫐', - csupe: '⫒', - ctdot: '⋯', - cudarrl: '⤸', - cudarrr: '⤵', - cuepr: '⋞', - cuesc: '⋟', - cularr: '↶', - cularrp: '⤽', - cup: '∪', - cupbrcap: '⩈', - cupcap: '⩆', - cupcup: '⩊', - cupdot: '⊍', - cupor: '⩅', - cups: '∪︀', - curarr: '↷', - curarrm: '⤼', - curlyeqprec: '⋞', - curlyeqsucc: '⋟', - curlyvee: '⋎', - curlywedge: '⋏', - curren: '¤', - curvearrowleft: '↶', - curvearrowright: '↷', - cuvee: '⋎', - cuwed: '⋏', - cwconint: '∲', - cwint: '∱', - cylcty: '⌭', - dArr: '⇓', - dHar: '⥥', - dagger: '†', - daleth: 'ℸ', - darr: '↓', - dash: '‐', - dashv: '⊣', - dbkarow: '⤏', - dblac: '˝', - dcaron: 'ď', - dcy: 'д', - dd: 'ⅆ', - ddagger: '‡', - ddarr: '⇊', - ddotseq: '⩷', - deg: '°', - delta: 'δ', - demptyv: '⦱', - dfisht: '⥿', - dfr: '𝔡', - dharl: '⇃', - dharr: '⇂', - diam: '⋄', - diamond: '⋄', - diamondsuit: '♦', - diams: '♦', - die: '¨', - digamma: 'ϝ', - disin: '⋲', - div: '÷', - divide: '÷', - divideontimes: '⋇', - divonx: '⋇', - djcy: 'ђ', - dlcorn: '⌞', - dlcrop: '⌍', - dollar: '$', - dopf: '𝕕', - dot: '˙', - doteq: '≐', - doteqdot: '≑', - dotminus: '∸', - dotplus: '∔', - dotsquare: '⊡', - doublebarwedge: '⌆', - downarrow: '↓', - downdownarrows: '⇊', - downharpoonleft: '⇃', - downharpoonright: '⇂', - drbkarow: '⤐', - drcorn: '⌟', - drcrop: '⌌', - dscr: '𝒹', - dscy: 'ѕ', - dsol: '⧶', - dstrok: 'đ', - dtdot: '⋱', - dtri: '▿', - dtrif: '▾', - duarr: '⇵', - duhar: '⥯', - dwangle: '⦦', - dzcy: 'џ', - dzigrarr: '⟿', - eDDot: '⩷', - eDot: '≑', - eacute: 'é', - easter: '⩮', - ecaron: 'ě', - ecir: '≖', - ecirc: 'ê', - ecolon: '≕', - ecy: 'э', - edot: 'ė', - ee: 'ⅇ', - efDot: '≒', - efr: '𝔢', - eg: '⪚', - egrave: 'è', - egs: '⪖', - egsdot: '⪘', - el: '⪙', - elinters: '⏧', - ell: 'ℓ', - els: '⪕', - elsdot: '⪗', - emacr: 'ē', - empty: '∅', - emptyset: '∅', - emptyv: '∅', - emsp13: ' ', - emsp14: ' ', - emsp: ' ', - eng: 'ŋ', - ensp: ' ', - eogon: 'ę', - eopf: '𝕖', - epar: '⋕', - eparsl: '⧣', - eplus: '⩱', - epsi: 'ε', - epsilon: 'ε', - epsiv: 'ϵ', - eqcirc: '≖', - eqcolon: '≕', - eqsim: '≂', - eqslantgtr: '⪖', - eqslantless: '⪕', - equals: '=', - equest: '≟', - equiv: '≡', - equivDD: '⩸', - eqvparsl: '⧥', - erDot: '≓', - erarr: '⥱', - escr: 'ℯ', - esdot: '≐', - esim: '≂', - eta: 'η', - eth: 'ð', - euml: 'ë', - euro: '€', - excl: '!', - exist: '∃', - expectation: 'ℰ', - exponentiale: 'ⅇ', - fallingdotseq: '≒', - fcy: 'ф', - female: '♀', - ffilig: 'ffi', - fflig: 'ff', - ffllig: 'ffl', - ffr: '𝔣', - filig: 'fi', - fjlig: 'fj', - flat: '♭', - fllig: 'fl', - fltns: '▱', - fnof: 'ƒ', - fopf: '𝕗', - forall: '∀', - fork: '⋔', - forkv: '⫙', - fpartint: '⨍', - frac12: '½', - frac13: '⅓', - frac14: '¼', - frac15: '⅕', - frac16: '⅙', - frac18: '⅛', - frac23: '⅔', - frac25: '⅖', - frac34: '¾', - frac35: '⅗', - frac38: '⅜', - frac45: '⅘', - frac56: '⅚', - frac58: '⅝', - frac78: '⅞', - frasl: '⁄', - frown: '⌢', - fscr: '𝒻', - gE: '≧', - gEl: '⪌', - gacute: 'ǵ', - gamma: 'γ', - gammad: 'ϝ', - gap: '⪆', - gbreve: 'ğ', - gcirc: 'ĝ', - gcy: 'г', - gdot: 'ġ', - ge: '≥', - gel: '⋛', - geq: '≥', - geqq: '≧', - geqslant: '⩾', - ges: '⩾', - gescc: '⪩', - gesdot: '⪀', - gesdoto: '⪂', - gesdotol: '⪄', - gesl: '⋛︀', - gesles: '⪔', - gfr: '𝔤', - gg: '≫', - ggg: '⋙', - gimel: 'ℷ', - gjcy: 'ѓ', - gl: '≷', - glE: '⪒', - gla: '⪥', - glj: '⪤', - gnE: '≩', - gnap: '⪊', - gnapprox: '⪊', - gne: '⪈', - gneq: '⪈', - gneqq: '≩', - gnsim: '⋧', - gopf: '𝕘', - grave: '`', - gscr: 'ℊ', - gsim: '≳', - gsime: '⪎', - gsiml: '⪐', - gt: '>', - gtcc: '⪧', - gtcir: '⩺', - gtdot: '⋗', - gtlPar: '⦕', - gtquest: '⩼', - gtrapprox: '⪆', - gtrarr: '⥸', - gtrdot: '⋗', - gtreqless: '⋛', - gtreqqless: '⪌', - gtrless: '≷', - gtrsim: '≳', - gvertneqq: '≩︀', - gvnE: '≩︀', - hArr: '⇔', - hairsp: ' ', - half: '½', - hamilt: 'ℋ', - hardcy: 'ъ', - harr: '↔', - harrcir: '⥈', - harrw: '↭', - hbar: 'ℏ', - hcirc: 'ĥ', - hearts: '♥', - heartsuit: '♥', - hellip: '…', - hercon: '⊹', - hfr: '𝔥', - hksearow: '⤥', - hkswarow: '⤦', - hoarr: '⇿', - homtht: '∻', - hookleftarrow: '↩', - hookrightarrow: '↪', - hopf: '𝕙', - horbar: '―', - hscr: '𝒽', - hslash: 'ℏ', - hstrok: 'ħ', - hybull: '⁃', - hyphen: '‐', - iacute: 'í', - ic: '⁣', - icirc: 'î', - icy: 'и', - iecy: 'е', - iexcl: '¡', - iff: '⇔', - ifr: '𝔦', - igrave: 'ì', - ii: 'ⅈ', - iiiint: '⨌', - iiint: '∭', - iinfin: '⧜', - iiota: '℩', - ijlig: 'ij', - imacr: 'ī', - image: 'ℑ', - imagline: 'ℐ', - imagpart: 'ℑ', - imath: 'ı', - imof: '⊷', - imped: 'Ƶ', - in: '∈', - incare: '℅', - infin: '∞', - infintie: '⧝', - inodot: 'ı', - int: '∫', - intcal: '⊺', - integers: 'ℤ', - intercal: '⊺', - intlarhk: '⨗', - intprod: '⨼', - iocy: 'ё', - iogon: 'į', - iopf: '𝕚', - iota: 'ι', - iprod: '⨼', - iquest: '¿', - iscr: '𝒾', - isin: '∈', - isinE: '⋹', - isindot: '⋵', - isins: '⋴', - isinsv: '⋳', - isinv: '∈', - it: '⁢', - itilde: 'ĩ', - iukcy: 'і', - iuml: 'ï', - jcirc: 'ĵ', - jcy: 'й', - jfr: '𝔧', - jmath: 'ȷ', - jopf: '𝕛', - jscr: '𝒿', - jsercy: 'ј', - jukcy: 'є', - kappa: 'κ', - kappav: 'ϰ', - kcedil: 'ķ', - kcy: 'к', - kfr: '𝔨', - kgreen: 'ĸ', - khcy: 'х', - kjcy: 'ќ', - kopf: '𝕜', - kscr: '𝓀', - lAarr: '⇚', - lArr: '⇐', - lAtail: '⤛', - lBarr: '⤎', - lE: '≦', - lEg: '⪋', - lHar: '⥢', - lacute: 'ĺ', - laemptyv: '⦴', - lagran: 'ℒ', - lambda: 'λ', - lang: '⟨', - langd: '⦑', - langle: '⟨', - lap: '⪅', - laquo: '«', - larr: '←', - larrb: '⇤', - larrbfs: '⤟', - larrfs: '⤝', - larrhk: '↩', - larrlp: '↫', - larrpl: '⤹', - larrsim: '⥳', - larrtl: '↢', - lat: '⪫', - latail: '⤙', - late: '⪭', - lates: '⪭︀', - lbarr: '⤌', - lbbrk: '❲', - lbrace: '{', - lbrack: '[', - lbrke: '⦋', - lbrksld: '⦏', - lbrkslu: '⦍', - lcaron: 'ľ', - lcedil: 'ļ', - lceil: '⌈', - lcub: '{', - lcy: 'л', - ldca: '⤶', - ldquo: '“', - ldquor: '„', - ldrdhar: '⥧', - ldrushar: '⥋', - ldsh: '↲', - le: '≤', - leftarrow: '←', - leftarrowtail: '↢', - leftharpoondown: '↽', - leftharpoonup: '↼', - leftleftarrows: '⇇', - leftrightarrow: '↔', - leftrightarrows: '⇆', - leftrightharpoons: '⇋', - leftrightsquigarrow: '↭', - leftthreetimes: '⋋', - leg: '⋚', - leq: '≤', - leqq: '≦', - leqslant: '⩽', - les: '⩽', - lescc: '⪨', - lesdot: '⩿', - lesdoto: '⪁', - lesdotor: '⪃', - lesg: '⋚︀', - lesges: '⪓', - lessapprox: '⪅', - lessdot: '⋖', - lesseqgtr: '⋚', - lesseqqgtr: '⪋', - lessgtr: '≶', - lesssim: '≲', - lfisht: '⥼', - lfloor: '⌊', - lfr: '𝔩', - lg: '≶', - lgE: '⪑', - lhard: '↽', - lharu: '↼', - lharul: '⥪', - lhblk: '▄', - ljcy: 'љ', - ll: '≪', - llarr: '⇇', - llcorner: '⌞', - llhard: '⥫', - lltri: '◺', - lmidot: 'ŀ', - lmoust: '⎰', - lmoustache: '⎰', - lnE: '≨', - lnap: '⪉', - lnapprox: '⪉', - lne: '⪇', - lneq: '⪇', - lneqq: '≨', - lnsim: '⋦', - loang: '⟬', - loarr: '⇽', - lobrk: '⟦', - longleftarrow: '⟵', - longleftrightarrow: '⟷', - longmapsto: '⟼', - longrightarrow: '⟶', - looparrowleft: '↫', - looparrowright: '↬', - lopar: '⦅', - lopf: '𝕝', - loplus: '⨭', - lotimes: '⨴', - lowast: '∗', - lowbar: '_', - loz: '◊', - lozenge: '◊', - lozf: '⧫', - lpar: '(', - lparlt: '⦓', - lrarr: '⇆', - lrcorner: '⌟', - lrhar: '⇋', - lrhard: '⥭', - lrm: '‎', - lrtri: '⊿', - lsaquo: '‹', - lscr: '𝓁', - lsh: '↰', - lsim: '≲', - lsime: '⪍', - lsimg: '⪏', - lsqb: '[', - lsquo: '‘', - lsquor: '‚', - lstrok: 'ł', - lt: '<', - ltcc: '⪦', - ltcir: '⩹', - ltdot: '⋖', - lthree: '⋋', - ltimes: '⋉', - ltlarr: '⥶', - ltquest: '⩻', - ltrPar: '⦖', - ltri: '◃', - ltrie: '⊴', - ltrif: '◂', - lurdshar: '⥊', - luruhar: '⥦', - lvertneqq: '≨︀', - lvnE: '≨︀', - mDDot: '∺', - macr: '¯', - male: '♂', - malt: '✠', - maltese: '✠', - map: '↦', - mapsto: '↦', - mapstodown: '↧', - mapstoleft: '↤', - mapstoup: '↥', - marker: '▮', - mcomma: '⨩', - mcy: 'м', - mdash: '—', - measuredangle: '∡', - mfr: '𝔪', - mho: '℧', - micro: 'µ', - mid: '∣', - midast: '*', - midcir: '⫰', - middot: '·', - minus: '−', - minusb: '⊟', - minusd: '∸', - minusdu: '⨪', - mlcp: '⫛', - mldr: '…', - mnplus: '∓', - models: '⊧', - mopf: '𝕞', - mp: '∓', - mscr: '𝓂', - mstpos: '∾', - mu: 'μ', - multimap: '⊸', - mumap: '⊸', - nGg: '⋙̸', - nGt: '≫⃒', - nGtv: '≫̸', - nLeftarrow: '⇍', - nLeftrightarrow: '⇎', - nLl: '⋘̸', - nLt: '≪⃒', - nLtv: '≪̸', - nRightarrow: '⇏', - nVDash: '⊯', - nVdash: '⊮', - nabla: '∇', - nacute: 'ń', - nang: '∠⃒', - nap: '≉', - napE: '⩰̸', - napid: '≋̸', - napos: 'ʼn', - napprox: '≉', - natur: '♮', - natural: '♮', - naturals: 'ℕ', - nbsp: ' ', - nbump: '≎̸', - nbumpe: '≏̸', - ncap: '⩃', - ncaron: 'ň', - ncedil: 'ņ', - ncong: '≇', - ncongdot: '⩭̸', - ncup: '⩂', - ncy: 'н', - ndash: '–', - ne: '≠', - neArr: '⇗', - nearhk: '⤤', - nearr: '↗', - nearrow: '↗', - nedot: '≐̸', - nequiv: '≢', - nesear: '⤨', - nesim: '≂̸', - nexist: '∄', - nexists: '∄', - nfr: '𝔫', - ngE: '≧̸', - nge: '≱', - ngeq: '≱', - ngeqq: '≧̸', - ngeqslant: '⩾̸', - nges: '⩾̸', - ngsim: '≵', - ngt: '≯', - ngtr: '≯', - nhArr: '⇎', - nharr: '↮', - nhpar: '⫲', - ni: '∋', - nis: '⋼', - nisd: '⋺', - niv: '∋', - njcy: 'њ', - nlArr: '⇍', - nlE: '≦̸', - nlarr: '↚', - nldr: '‥', - nle: '≰', - nleftarrow: '↚', - nleftrightarrow: '↮', - nleq: '≰', - nleqq: '≦̸', - nleqslant: '⩽̸', - nles: '⩽̸', - nless: '≮', - nlsim: '≴', - nlt: '≮', - nltri: '⋪', - nltrie: '⋬', - nmid: '∤', - nopf: '𝕟', - not: '¬', - notin: '∉', - notinE: '⋹̸', - notindot: '⋵̸', - notinva: '∉', - notinvb: '⋷', - notinvc: '⋶', - notni: '∌', - notniva: '∌', - notnivb: '⋾', - notnivc: '⋽', - npar: '∦', - nparallel: '∦', - nparsl: '⫽⃥', - npart: '∂̸', - npolint: '⨔', - npr: '⊀', - nprcue: '⋠', - npre: '⪯̸', - nprec: '⊀', - npreceq: '⪯̸', - nrArr: '⇏', - nrarr: '↛', - nrarrc: '⤳̸', - nrarrw: '↝̸', - nrightarrow: '↛', - nrtri: '⋫', - nrtrie: '⋭', - nsc: '⊁', - nsccue: '⋡', - nsce: '⪰̸', - nscr: '𝓃', - nshortmid: '∤', - nshortparallel: '∦', - nsim: '≁', - nsime: '≄', - nsimeq: '≄', - nsmid: '∤', - nspar: '∦', - nsqsube: '⋢', - nsqsupe: '⋣', - nsub: '⊄', - nsubE: '⫅̸', - nsube: '⊈', - nsubset: '⊂⃒', - nsubseteq: '⊈', - nsubseteqq: '⫅̸', - nsucc: '⊁', - nsucceq: '⪰̸', - nsup: '⊅', - nsupE: '⫆̸', - nsupe: '⊉', - nsupset: '⊃⃒', - nsupseteq: '⊉', - nsupseteqq: '⫆̸', - ntgl: '≹', - ntilde: 'ñ', - ntlg: '≸', - ntriangleleft: '⋪', - ntrianglelefteq: '⋬', - ntriangleright: '⋫', - ntrianglerighteq: '⋭', - nu: 'ν', - num: '#', - numero: '№', - numsp: ' ', - nvDash: '⊭', - nvHarr: '⤄', - nvap: '≍⃒', - nvdash: '⊬', - nvge: '≥⃒', - nvgt: '>⃒', - nvinfin: '⧞', - nvlArr: '⤂', - nvle: '≤⃒', - nvlt: '<⃒', - nvltrie: '⊴⃒', - nvrArr: '⤃', - nvrtrie: '⊵⃒', - nvsim: '∼⃒', - nwArr: '⇖', - nwarhk: '⤣', - nwarr: '↖', - nwarrow: '↖', - nwnear: '⤧', - oS: 'Ⓢ', - oacute: 'ó', - oast: '⊛', - ocir: '⊚', - ocirc: 'ô', - ocy: 'о', - odash: '⊝', - odblac: 'ő', - odiv: '⨸', - odot: '⊙', - odsold: '⦼', - oelig: 'œ', - ofcir: '⦿', - ofr: '𝔬', - ogon: '˛', - ograve: 'ò', - ogt: '⧁', - ohbar: '⦵', - ohm: 'Ω', - oint: '∮', - olarr: '↺', - olcir: '⦾', - olcross: '⦻', - oline: '‾', - olt: '⧀', - omacr: 'ō', - omega: 'ω', - omicron: 'ο', - omid: '⦶', - ominus: '⊖', - oopf: '𝕠', - opar: '⦷', - operp: '⦹', - oplus: '⊕', - or: '∨', - orarr: '↻', - ord: '⩝', - order: 'ℴ', - orderof: 'ℴ', - ordf: 'ª', - ordm: 'º', - origof: '⊶', - oror: '⩖', - orslope: '⩗', - orv: '⩛', - oscr: 'ℴ', - oslash: 'ø', - osol: '⊘', - otilde: 'õ', - otimes: '⊗', - otimesas: '⨶', - ouml: 'ö', - ovbar: '⌽', - par: '∥', - para: '¶', - parallel: '∥', - parsim: '⫳', - parsl: '⫽', - part: '∂', - pcy: 'п', - percnt: '%', - period: '.', - permil: '‰', - perp: '⊥', - pertenk: '‱', - pfr: '𝔭', - phi: 'φ', - phiv: 'ϕ', - phmmat: 'ℳ', - phone: '☎', - pi: 'π', - pitchfork: '⋔', - piv: 'ϖ', - planck: 'ℏ', - planckh: 'ℎ', - plankv: 'ℏ', - plus: '+', - plusacir: '⨣', - plusb: '⊞', - pluscir: '⨢', - plusdo: '∔', - plusdu: '⨥', - pluse: '⩲', - plusmn: '±', - plussim: '⨦', - plustwo: '⨧', - pm: '±', - pointint: '⨕', - popf: '𝕡', - pound: '£', - pr: '≺', - prE: '⪳', - prap: '⪷', - prcue: '≼', - pre: '⪯', - prec: '≺', - precapprox: '⪷', - preccurlyeq: '≼', - preceq: '⪯', - precnapprox: '⪹', - precneqq: '⪵', - precnsim: '⋨', - precsim: '≾', - prime: '′', - primes: 'ℙ', - prnE: '⪵', - prnap: '⪹', - prnsim: '⋨', - prod: '∏', - profalar: '⌮', - profline: '⌒', - profsurf: '⌓', - prop: '∝', - propto: '∝', - prsim: '≾', - prurel: '⊰', - pscr: '𝓅', - psi: 'ψ', - puncsp: ' ', - qfr: '𝔮', - qint: '⨌', - qopf: '𝕢', - qprime: '⁗', - qscr: '𝓆', - quaternions: 'ℍ', - quatint: '⨖', - quest: '?', - questeq: '≟', - quot: '"', - rAarr: '⇛', - rArr: '⇒', - rAtail: '⤜', - rBarr: '⤏', - rHar: '⥤', - race: '∽̱', - racute: 'ŕ', - radic: '√', - raemptyv: '⦳', - rang: '⟩', - rangd: '⦒', - range: '⦥', - rangle: '⟩', - raquo: '»', - rarr: '→', - rarrap: '⥵', - rarrb: '⇥', - rarrbfs: '⤠', - rarrc: '⤳', - rarrfs: '⤞', - rarrhk: '↪', - rarrlp: '↬', - rarrpl: '⥅', - rarrsim: '⥴', - rarrtl: '↣', - rarrw: '↝', - ratail: '⤚', - ratio: '∶', - rationals: 'ℚ', - rbarr: '⤍', - rbbrk: '❳', - rbrace: '}', - rbrack: ']', - rbrke: '⦌', - rbrksld: '⦎', - rbrkslu: '⦐', - rcaron: 'ř', - rcedil: 'ŗ', - rceil: '⌉', - rcub: '}', - rcy: 'р', - rdca: '⤷', - rdldhar: '⥩', - rdquo: '”', - rdquor: '”', - rdsh: '↳', - real: 'ℜ', - realine: 'ℛ', - realpart: 'ℜ', - reals: 'ℝ', - rect: '▭', - reg: '®', - rfisht: '⥽', - rfloor: '⌋', - rfr: '𝔯', - rhard: '⇁', - rharu: '⇀', - rharul: '⥬', - rho: 'ρ', - rhov: 'ϱ', - rightarrow: '→', - rightarrowtail: '↣', - rightharpoondown: '⇁', - rightharpoonup: '⇀', - rightleftarrows: '⇄', - rightleftharpoons: '⇌', - rightrightarrows: '⇉', - rightsquigarrow: '↝', - rightthreetimes: '⋌', - ring: '˚', - risingdotseq: '≓', - rlarr: '⇄', - rlhar: '⇌', - rlm: '‏', - rmoust: '⎱', - rmoustache: '⎱', - rnmid: '⫮', - roang: '⟭', - roarr: '⇾', - robrk: '⟧', - ropar: '⦆', - ropf: '𝕣', - roplus: '⨮', - rotimes: '⨵', - rpar: ')', - rpargt: '⦔', - rppolint: '⨒', - rrarr: '⇉', - rsaquo: '›', - rscr: '𝓇', - rsh: '↱', - rsqb: ']', - rsquo: '’', - rsquor: '’', - rthree: '⋌', - rtimes: '⋊', - rtri: '▹', - rtrie: '⊵', - rtrif: '▸', - rtriltri: '⧎', - ruluhar: '⥨', - rx: '℞', - sacute: 'ś', - sbquo: '‚', - sc: '≻', - scE: '⪴', - scap: '⪸', - scaron: 'š', - sccue: '≽', - sce: '⪰', - scedil: 'ş', - scirc: 'ŝ', - scnE: '⪶', - scnap: '⪺', - scnsim: '⋩', - scpolint: '⨓', - scsim: '≿', - scy: 'с', - sdot: '⋅', - sdotb: '⊡', - sdote: '⩦', - seArr: '⇘', - searhk: '⤥', - searr: '↘', - searrow: '↘', - sect: '§', - semi: ';', - seswar: '⤩', - setminus: '∖', - setmn: '∖', - sext: '✶', - sfr: '𝔰', - sfrown: '⌢', - sharp: '♯', - shchcy: 'щ', - shcy: 'ш', - shortmid: '∣', - shortparallel: '∥', - shy: '­', - sigma: 'σ', - sigmaf: 'ς', - sigmav: 'ς', - sim: '∼', - simdot: '⩪', - sime: '≃', - simeq: '≃', - simg: '⪞', - simgE: '⪠', - siml: '⪝', - simlE: '⪟', - simne: '≆', - simplus: '⨤', - simrarr: '⥲', - slarr: '←', - smallsetminus: '∖', - smashp: '⨳', - smeparsl: '⧤', - smid: '∣', - smile: '⌣', - smt: '⪪', - smte: '⪬', - smtes: '⪬︀', - softcy: 'ь', - sol: '/', - solb: '⧄', - solbar: '⌿', - sopf: '𝕤', - spades: '♠', - spadesuit: '♠', - spar: '∥', - sqcap: '⊓', - sqcaps: '⊓︀', - sqcup: '⊔', - sqcups: '⊔︀', - sqsub: '⊏', - sqsube: '⊑', - sqsubset: '⊏', - sqsubseteq: '⊑', - sqsup: '⊐', - sqsupe: '⊒', - sqsupset: '⊐', - sqsupseteq: '⊒', - squ: '□', - square: '□', - squarf: '▪', - squf: '▪', - srarr: '→', - sscr: '𝓈', - ssetmn: '∖', - ssmile: '⌣', - sstarf: '⋆', - star: '☆', - starf: '★', - straightepsilon: 'ϵ', - straightphi: 'ϕ', - strns: '¯', - sub: '⊂', - subE: '⫅', - subdot: '⪽', - sube: '⊆', - subedot: '⫃', - submult: '⫁', - subnE: '⫋', - subne: '⊊', - subplus: '⪿', - subrarr: '⥹', - subset: '⊂', - subseteq: '⊆', - subseteqq: '⫅', - subsetneq: '⊊', - subsetneqq: '⫋', - subsim: '⫇', - subsub: '⫕', - subsup: '⫓', - succ: '≻', - succapprox: '⪸', - succcurlyeq: '≽', - succeq: '⪰', - succnapprox: '⪺', - succneqq: '⪶', - succnsim: '⋩', - succsim: '≿', - sum: '∑', - sung: '♪', - sup1: '¹', - sup2: '²', - sup3: '³', - sup: '⊃', - supE: '⫆', - supdot: '⪾', - supdsub: '⫘', - supe: '⊇', - supedot: '⫄', - suphsol: '⟉', - suphsub: '⫗', - suplarr: '⥻', - supmult: '⫂', - supnE: '⫌', - supne: '⊋', - supplus: '⫀', - supset: '⊃', - supseteq: '⊇', - supseteqq: '⫆', - supsetneq: '⊋', - supsetneqq: '⫌', - supsim: '⫈', - supsub: '⫔', - supsup: '⫖', - swArr: '⇙', - swarhk: '⤦', - swarr: '↙', - swarrow: '↙', - swnwar: '⤪', - szlig: 'ß', - target: '⌖', - tau: 'τ', - tbrk: '⎴', - tcaron: 'ť', - tcedil: 'ţ', - tcy: 'т', - tdot: '⃛', - telrec: '⌕', - tfr: '𝔱', - there4: '∴', - therefore: '∴', - theta: 'θ', - thetasym: 'ϑ', - thetav: 'ϑ', - thickapprox: '≈', - thicksim: '∼', - thinsp: ' ', - thkap: '≈', - thksim: '∼', - thorn: 'þ', - tilde: '˜', - times: '×', - timesb: '⊠', - timesbar: '⨱', - timesd: '⨰', - tint: '∭', - toea: '⤨', - top: '⊤', - topbot: '⌶', - topcir: '⫱', - topf: '𝕥', - topfork: '⫚', - tosa: '⤩', - tprime: '‴', - trade: '™', - triangle: '▵', - triangledown: '▿', - triangleleft: '◃', - trianglelefteq: '⊴', - triangleq: '≜', - triangleright: '▹', - trianglerighteq: '⊵', - tridot: '◬', - trie: '≜', - triminus: '⨺', - triplus: '⨹', - trisb: '⧍', - tritime: '⨻', - trpezium: '⏢', - tscr: '𝓉', - tscy: 'ц', - tshcy: 'ћ', - tstrok: 'ŧ', - twixt: '≬', - twoheadleftarrow: '↞', - twoheadrightarrow: '↠', - uArr: '⇑', - uHar: '⥣', - uacute: 'ú', - uarr: '↑', - ubrcy: 'ў', - ubreve: 'ŭ', - ucirc: 'û', - ucy: 'у', - udarr: '⇅', - udblac: 'ű', - udhar: '⥮', - ufisht: '⥾', - ufr: '𝔲', - ugrave: 'ù', - uharl: '↿', - uharr: '↾', - uhblk: '▀', - ulcorn: '⌜', - ulcorner: '⌜', - ulcrop: '⌏', - ultri: '◸', - umacr: 'ū', - uml: '¨', - uogon: 'ų', - uopf: '𝕦', - uparrow: '↑', - updownarrow: '↕', - upharpoonleft: '↿', - upharpoonright: '↾', - uplus: '⊎', - upsi: 'υ', - upsih: 'ϒ', - upsilon: 'υ', - upuparrows: '⇈', - urcorn: '⌝', - urcorner: '⌝', - urcrop: '⌎', - uring: 'ů', - urtri: '◹', - uscr: '𝓊', - utdot: '⋰', - utilde: 'ũ', - utri: '▵', - utrif: '▴', - uuarr: '⇈', - uuml: 'ü', - uwangle: '⦧', - vArr: '⇕', - vBar: '⫨', - vBarv: '⫩', - vDash: '⊨', - vangrt: '⦜', - varepsilon: 'ϵ', - varkappa: 'ϰ', - varnothing: '∅', - varphi: 'ϕ', - varpi: 'ϖ', - varpropto: '∝', - varr: '↕', - varrho: 'ϱ', - varsigma: 'ς', - varsubsetneq: '⊊︀', - varsubsetneqq: '⫋︀', - varsupsetneq: '⊋︀', - varsupsetneqq: '⫌︀', - vartheta: 'ϑ', - vartriangleleft: '⊲', - vartriangleright: '⊳', - vcy: 'в', - vdash: '⊢', - vee: '∨', - veebar: '⊻', - veeeq: '≚', - vellip: '⋮', - verbar: '|', - vert: '|', - vfr: '𝔳', - vltri: '⊲', - vnsub: '⊂⃒', - vnsup: '⊃⃒', - vopf: '𝕧', - vprop: '∝', - vrtri: '⊳', - vscr: '𝓋', - vsubnE: '⫋︀', - vsubne: '⊊︀', - vsupnE: '⫌︀', - vsupne: '⊋︀', - vzigzag: '⦚', - wcirc: 'ŵ', - wedbar: '⩟', - wedge: '∧', - wedgeq: '≙', - weierp: '℘', - wfr: '𝔴', - wopf: '𝕨', - wp: '℘', - wr: '≀', - wreath: '≀', - wscr: '𝓌', - xcap: '⋂', - xcirc: '◯', - xcup: '⋃', - xdtri: '▽', - xfr: '𝔵', - xhArr: '⟺', - xharr: '⟷', - xi: 'ξ', - xlArr: '⟸', - xlarr: '⟵', - xmap: '⟼', - xnis: '⋻', - xodot: '⨀', - xopf: '𝕩', - xoplus: '⨁', - xotime: '⨂', - xrArr: '⟹', - xrarr: '⟶', - xscr: '𝓍', - xsqcup: '⨆', - xuplus: '⨄', - xutri: '△', - xvee: '⋁', - xwedge: '⋀', - yacute: 'ý', - yacy: 'я', - ycirc: 'ŷ', - ycy: 'ы', - yen: '¥', - yfr: '𝔶', - yicy: 'ї', - yopf: '𝕪', - yscr: '𝓎', - yucy: 'ю', - yuml: 'ÿ', - zacute: 'ź', - zcaron: 'ž', - zcy: 'з', - zdot: 'ż', - zeetrf: 'ℨ', - zeta: 'ζ', - zfr: '𝔷', - zhcy: 'ж', - zigrarr: '⇝', - zopf: '𝕫', - zscr: '𝓏', - zwj: '‍', - zwnj: '‌' -} - -;// CONCATENATED MODULE: ./node_modules/decode-named-character-reference/index.js - - -const own = {}.hasOwnProperty - -/** - * Decode a single character reference (without the `&` or `;`). - * You probably only need this when you’re building parsers yourself that follow - * different rules compared to HTML. - * This is optimized to be tiny in browsers. - * - * @param {string} value - * `notin` (named), `#123` (deci), `#x123` (hexa). - * @returns {string|false} - * Decoded reference. - */ -function decodeNamedCharacterReference(value) { - return own.call(characterEntities, value) ? characterEntities[value] : false -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/character-reference.js -/** - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const characterReference = { - name: 'characterReference', - tokenize: tokenizeCharacterReference -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeCharacterReference(effects, ok, nok) { - const self = this - let size = 0 - /** @type {number} */ - let max - /** @type {(code: Code) => boolean} */ - let test - return start - - /** - * Start of character reference. - * - * ```markdown - * > | a&b - * ^ - * > | a{b - * ^ - * > | a b - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter('characterReference') - effects.enter('characterReferenceMarker') - effects.consume(code) - effects.exit('characterReferenceMarker') - return open - } - - /** - * After `&`, at `#` for numeric references or alphanumeric for named - * references. - * - * ```markdown - * > | a&b - * ^ - * > | a{b - * ^ - * > | a b - * ^ - * ``` - * - * @type {State} - */ - function open(code) { - if (code === 35) { - effects.enter('characterReferenceMarkerNumeric') - effects.consume(code) - effects.exit('characterReferenceMarkerNumeric') - return numeric - } - effects.enter('characterReferenceValue') - max = 31 - test = asciiAlphanumeric - return value(code) - } - - /** - * After `#`, at `x` for hexadecimals or digit for decimals. - * - * ```markdown - * > | a{b - * ^ - * > | a b - * ^ - * ``` - * - * @type {State} - */ - function numeric(code) { - if (code === 88 || code === 120) { - effects.enter('characterReferenceMarkerHexadecimal') - effects.consume(code) - effects.exit('characterReferenceMarkerHexadecimal') - effects.enter('characterReferenceValue') - max = 6 - test = asciiHexDigit - return value - } - effects.enter('characterReferenceValue') - max = 7 - test = asciiDigit - return value(code) - } - - /** - * After markers (`&#x`, `&#`, or `&`), in value, before `;`. - * - * The character reference kind defines what and how many characters are - * allowed. - * - * ```markdown - * > | a&b - * ^^^ - * > | a{b - * ^^^ - * > | a b - * ^ - * ``` - * - * @type {State} - */ - function value(code) { - if (code === 59 && size) { - const token = effects.exit('characterReferenceValue') - if ( - test === asciiAlphanumeric && - !decodeNamedCharacterReference(self.sliceSerialize(token)) - ) { - return nok(code) - } - - // To do: `markdown-rs` uses a different name: - // `CharacterReferenceMarkerSemi`. - effects.enter('characterReferenceMarker') - effects.consume(code) - effects.exit('characterReferenceMarker') - effects.exit('characterReference') - return ok - } - if (test(code) && size++ < max) { - effects.consume(code) - return value - } - return nok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/character-escape.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - -/** @type {Construct} */ -const characterEscape = { - name: 'characterEscape', - tokenize: tokenizeCharacterEscape -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeCharacterEscape(effects, ok, nok) { - return start - - /** - * Start of character escape. - * - * ```markdown - * > | a\*b - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter('characterEscape') - effects.enter('escapeMarker') - effects.consume(code) - effects.exit('escapeMarker') - return inside - } - - /** - * After `\`, at punctuation. - * - * ```markdown - * > | a\*b - * ^ - * ``` - * - * @type {State} - */ - function inside(code) { - // ASCII punctuation. - if (asciiPunctuation(code)) { - effects.enter('characterEscapeValue') - effects.consume(code) - effects.exit('characterEscapeValue') - effects.exit('characterEscape') - return ok - } - return nok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/line-ending.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const lineEnding = { - name: 'lineEnding', - tokenize: tokenizeLineEnding -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeLineEnding(effects, ok) { - return start - - /** @type {State} */ - function start(code) { - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return factorySpace(effects, ok, 'linePrefix') - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/label-end.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').Event} Event - * @typedef {import('micromark-util-types').Resolver} Resolver - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').Token} Token - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - - - - - - - -/** @type {Construct} */ -const labelEnd = { - name: 'labelEnd', - tokenize: tokenizeLabelEnd, - resolveTo: resolveToLabelEnd, - resolveAll: resolveAllLabelEnd -} - -/** @type {Construct} */ -const resourceConstruct = { - tokenize: tokenizeResource -} -/** @type {Construct} */ -const referenceFullConstruct = { - tokenize: tokenizeReferenceFull -} -/** @type {Construct} */ -const referenceCollapsedConstruct = { - tokenize: tokenizeReferenceCollapsed -} - -/** @type {Resolver} */ -function resolveAllLabelEnd(events) { - let index = -1 - while (++index < events.length) { - const token = events[index][1] - if ( - token.type === 'labelImage' || - token.type === 'labelLink' || - token.type === 'labelEnd' - ) { - // Remove the marker. - events.splice(index + 1, token.type === 'labelImage' ? 4 : 2) - token.type = 'data' - index++ - } - } - return events -} - -/** @type {Resolver} */ -function resolveToLabelEnd(events, context) { - let index = events.length - let offset = 0 - /** @type {Token} */ - let token - /** @type {number | undefined} */ - let open - /** @type {number | undefined} */ - let close - /** @type {Array} */ - let media - - // Find an opening. - while (index--) { - token = events[index][1] - if (open) { - // If we see another link, or inactive link label, we’ve been here before. - if ( - token.type === 'link' || - (token.type === 'labelLink' && token._inactive) - ) { - break - } - - // Mark other link openings as inactive, as we can’t have links in - // links. - if (events[index][0] === 'enter' && token.type === 'labelLink') { - token._inactive = true - } - } else if (close) { - if ( - events[index][0] === 'enter' && - (token.type === 'labelImage' || token.type === 'labelLink') && - !token._balanced - ) { - open = index - if (token.type !== 'labelLink') { - offset = 2 - break - } - } - } else if (token.type === 'labelEnd') { - close = index - } - } - const group = { - type: events[open][1].type === 'labelLink' ? 'link' : 'image', - start: Object.assign({}, events[open][1].start), - end: Object.assign({}, events[events.length - 1][1].end) - } - const label = { - type: 'label', - start: Object.assign({}, events[open][1].start), - end: Object.assign({}, events[close][1].end) - } - const text = { - type: 'labelText', - start: Object.assign({}, events[open + offset + 2][1].end), - end: Object.assign({}, events[close - 2][1].start) - } - media = [ - ['enter', group, context], - ['enter', label, context] - ] - - // Opening marker. - media = push(media, events.slice(open + 1, open + offset + 3)) - - // Text open. - media = push(media, [['enter', text, context]]) - - // Always populated by defaults. - - // Between. - media = push( - media, - resolveAll( - context.parser.constructs.insideSpan.null, - events.slice(open + offset + 4, close - 3), - context - ) - ) - - // Text close, marker close, label close. - media = push(media, [ - ['exit', text, context], - events[close - 2], - events[close - 1], - ['exit', label, context] - ]) - - // Reference, resource, or so. - media = push(media, events.slice(close + 1)) - - // Media close. - media = push(media, [['exit', group, context]]) - splice(events, open, events.length, media) - return events -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeLabelEnd(effects, ok, nok) { - const self = this - let index = self.events.length - /** @type {Token} */ - let labelStart - /** @type {boolean} */ - let defined - - // Find an opening. - while (index--) { - if ( - (self.events[index][1].type === 'labelImage' || - self.events[index][1].type === 'labelLink') && - !self.events[index][1]._balanced - ) { - labelStart = self.events[index][1] - break - } - } - return start - - /** - * Start of label end. - * - * ```markdown - * > | [a](b) c - * ^ - * > | [a][b] c - * ^ - * > | [a][] b - * ^ - * > | [a] b - * ``` - * - * @type {State} - */ - function start(code) { - // If there is not an okay opening. - if (!labelStart) { - return nok(code) - } - - // If the corresponding label (link) start is marked as inactive, - // it means we’d be wrapping a link, like this: - // - // ```markdown - // > | a [b [c](d) e](f) g. - // ^ - // ``` - // - // We can’t have that, so it’s just balanced brackets. - if (labelStart._inactive) { - return labelEndNok(code) - } - defined = self.parser.defined.includes( - normalizeIdentifier( - self.sliceSerialize({ - start: labelStart.end, - end: self.now() - }) - ) - ) - effects.enter('labelEnd') - effects.enter('labelMarker') - effects.consume(code) - effects.exit('labelMarker') - effects.exit('labelEnd') - return after - } - - /** - * After `]`. - * - * ```markdown - * > | [a](b) c - * ^ - * > | [a][b] c - * ^ - * > | [a][] b - * ^ - * > | [a] b - * ^ - * ``` - * - * @type {State} - */ - function after(code) { - // Note: `markdown-rs` also parses GFM footnotes here, which for us is in - // an extension. - - // Resource (`[asd](fgh)`)? - if (code === 40) { - return effects.attempt( - resourceConstruct, - labelEndOk, - defined ? labelEndOk : labelEndNok - )(code) - } - - // Full (`[asd][fgh]`) or collapsed (`[asd][]`) reference? - if (code === 91) { - return effects.attempt( - referenceFullConstruct, - labelEndOk, - defined ? referenceNotFull : labelEndNok - )(code) - } - - // Shortcut (`[asd]`) reference? - return defined ? labelEndOk(code) : labelEndNok(code) - } - - /** - * After `]`, at `[`, but not at a full reference. - * - * > 👉 **Note**: we only get here if the label is defined. - * - * ```markdown - * > | [a][] b - * ^ - * > | [a] b - * ^ - * ``` - * - * @type {State} - */ - function referenceNotFull(code) { - return effects.attempt( - referenceCollapsedConstruct, - labelEndOk, - labelEndNok - )(code) - } - - /** - * Done, we found something. - * - * ```markdown - * > | [a](b) c - * ^ - * > | [a][b] c - * ^ - * > | [a][] b - * ^ - * > | [a] b - * ^ - * ``` - * - * @type {State} - */ - function labelEndOk(code) { - // Note: `markdown-rs` does a bunch of stuff here. - return ok(code) - } - - /** - * Done, it’s nothing. - * - * There was an okay opening, but we didn’t match anything. - * - * ```markdown - * > | [a](b c - * ^ - * > | [a][b c - * ^ - * > | [a] b - * ^ - * ``` - * - * @type {State} - */ - function labelEndNok(code) { - labelStart._balanced = true - return nok(code) - } -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeResource(effects, ok, nok) { - return resourceStart - - /** - * At a resource. - * - * ```markdown - * > | [a](b) c - * ^ - * ``` - * - * @type {State} - */ - function resourceStart(code) { - effects.enter('resource') - effects.enter('resourceMarker') - effects.consume(code) - effects.exit('resourceMarker') - return resourceBefore - } - - /** - * In resource, after `(`, at optional whitespace. - * - * ```markdown - * > | [a](b) c - * ^ - * ``` - * - * @type {State} - */ - function resourceBefore(code) { - return markdownLineEndingOrSpace(code) - ? factoryWhitespace(effects, resourceOpen)(code) - : resourceOpen(code) - } - - /** - * In resource, after optional whitespace, at `)` or a destination. - * - * ```markdown - * > | [a](b) c - * ^ - * ``` - * - * @type {State} - */ - function resourceOpen(code) { - if (code === 41) { - return resourceEnd(code) - } - return factoryDestination( - effects, - resourceDestinationAfter, - resourceDestinationMissing, - 'resourceDestination', - 'resourceDestinationLiteral', - 'resourceDestinationLiteralMarker', - 'resourceDestinationRaw', - 'resourceDestinationString', - 32 - )(code) - } - - /** - * In resource, after destination, at optional whitespace. - * - * ```markdown - * > | [a](b) c - * ^ - * ``` - * - * @type {State} - */ - function resourceDestinationAfter(code) { - return markdownLineEndingOrSpace(code) - ? factoryWhitespace(effects, resourceBetween)(code) - : resourceEnd(code) - } - - /** - * At invalid destination. - * - * ```markdown - * > | [a](<<) b - * ^ - * ``` - * - * @type {State} - */ - function resourceDestinationMissing(code) { - return nok(code) - } - - /** - * In resource, after destination and whitespace, at `(` or title. - * - * ```markdown - * > | [a](b ) c - * ^ - * ``` - * - * @type {State} - */ - function resourceBetween(code) { - if (code === 34 || code === 39 || code === 40) { - return factoryTitle( - effects, - resourceTitleAfter, - nok, - 'resourceTitle', - 'resourceTitleMarker', - 'resourceTitleString' - )(code) - } - return resourceEnd(code) - } - - /** - * In resource, after title, at optional whitespace. - * - * ```markdown - * > | [a](b "c") d - * ^ - * ``` - * - * @type {State} - */ - function resourceTitleAfter(code) { - return markdownLineEndingOrSpace(code) - ? factoryWhitespace(effects, resourceEnd)(code) - : resourceEnd(code) - } - - /** - * In resource, at `)`. - * - * ```markdown - * > | [a](b) d - * ^ - * ``` - * - * @type {State} - */ - function resourceEnd(code) { - if (code === 41) { - effects.enter('resourceMarker') - effects.consume(code) - effects.exit('resourceMarker') - effects.exit('resource') - return ok - } - return nok(code) - } -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeReferenceFull(effects, ok, nok) { - const self = this - return referenceFull - - /** - * In a reference (full), at the `[`. - * - * ```markdown - * > | [a][b] d - * ^ - * ``` - * - * @type {State} - */ - function referenceFull(code) { - return factoryLabel.call( - self, - effects, - referenceFullAfter, - referenceFullMissing, - 'reference', - 'referenceMarker', - 'referenceString' - )(code) - } - - /** - * In a reference (full), after `]`. - * - * ```markdown - * > | [a][b] d - * ^ - * ``` - * - * @type {State} - */ - function referenceFullAfter(code) { - return self.parser.defined.includes( - normalizeIdentifier( - self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1) - ) - ) - ? ok(code) - : nok(code) - } - - /** - * In reference (full) that was missing. - * - * ```markdown - * > | [a][b d - * ^ - * ``` - * - * @type {State} - */ - function referenceFullMissing(code) { - return nok(code) - } -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeReferenceCollapsed(effects, ok, nok) { - return referenceCollapsedStart - - /** - * In reference (collapsed), at `[`. - * - * > 👉 **Note**: we only get here if the label is defined. - * - * ```markdown - * > | [a][] d - * ^ - * ``` - * - * @type {State} - */ - function referenceCollapsedStart(code) { - // We only attempt a collapsed label if there’s a `[`. - - effects.enter('reference') - effects.enter('referenceMarker') - effects.consume(code) - effects.exit('referenceMarker') - return referenceCollapsedOpen - } - - /** - * In reference (collapsed), at `]`. - * - * > 👉 **Note**: we only get here if the label is defined. - * - * ```markdown - * > | [a][] d - * ^ - * ``` - * - * @type {State} - */ - function referenceCollapsedOpen(code) { - if (code === 93) { - effects.enter('referenceMarker') - effects.consume(code) - effects.exit('referenceMarker') - effects.exit('reference') - return ok - } - return nok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/label-start-image.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const labelStartImage = { - name: 'labelStartImage', - tokenize: tokenizeLabelStartImage, - resolveAll: labelEnd.resolveAll -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeLabelStartImage(effects, ok, nok) { - const self = this - return start - - /** - * Start of label (image) start. - * - * ```markdown - * > | a ![b] c - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter('labelImage') - effects.enter('labelImageMarker') - effects.consume(code) - effects.exit('labelImageMarker') - return open - } - - /** - * After `!`, at `[`. - * - * ```markdown - * > | a ![b] c - * ^ - * ``` - * - * @type {State} - */ - function open(code) { - if (code === 91) { - effects.enter('labelMarker') - effects.consume(code) - effects.exit('labelMarker') - effects.exit('labelImage') - return after - } - return nok(code) - } - - /** - * After `![`. - * - * ```markdown - * > | a ![b] c - * ^ - * ``` - * - * This is needed in because, when GFM footnotes are enabled, images never - * form when started with a `^`. - * Instead, links form: - * - * ```markdown - * ![^a](b) - * - * ![^a][b] - * - * [b]: c - * ``` - * - * ```html - *

!^a

- *

!^a

- * ``` - * - * @type {State} - */ - function after(code) { - // To do: use a new field to do this, this is still needed for - // `micromark-extension-gfm-footnote`, but the `label-start-link` - // behavior isn’t. - // Hidden footnotes hook. - /* c8 ignore next 3 */ - return code === 94 && '_hiddenFootnoteSupport' in self.parser.constructs - ? nok(code) - : ok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-classify-character/index.js -/** - * @typedef {import('micromark-util-types').Code} Code - */ - - -/** - * Classify whether a code represents whitespace, punctuation, or something - * else. - * - * Used for attention (emphasis, strong), whose sequences can open or close - * based on the class of surrounding characters. - * - * > 👉 **Note**: eof (`null`) is seen as whitespace. - * - * @param {Code} code - * Code. - * @returns {typeof constants.characterGroupWhitespace | typeof constants.characterGroupPunctuation | undefined} - * Group. - */ -function classifyCharacter(code) { - if ( - code === null || - markdownLineEndingOrSpace(code) || - unicodeWhitespace(code) - ) { - return 1 - } - if (unicodePunctuation(code)) { - return 2 - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/attention.js -/** - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').Event} Event - * @typedef {import('micromark-util-types').Point} Point - * @typedef {import('micromark-util-types').Resolver} Resolver - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').Token} Token - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - - -/** @type {Construct} */ -const attention = { - name: 'attention', - tokenize: tokenizeAttention, - resolveAll: resolveAllAttention -} - -/** - * Take all events and resolve attention to emphasis or strong. - * - * @type {Resolver} - */ -function resolveAllAttention(events, context) { - let index = -1 - /** @type {number} */ - let open - /** @type {Token} */ - let group - /** @type {Token} */ - let text - /** @type {Token} */ - let openingSequence - /** @type {Token} */ - let closingSequence - /** @type {number} */ - let use - /** @type {Array} */ - let nextEvents - /** @type {number} */ - let offset - - // Walk through all events. - // - // Note: performance of this is fine on an mb of normal markdown, but it’s - // a bottleneck for malicious stuff. - while (++index < events.length) { - // Find a token that can close. - if ( - events[index][0] === 'enter' && - events[index][1].type === 'attentionSequence' && - events[index][1]._close - ) { - open = index - - // Now walk back to find an opener. - while (open--) { - // Find a token that can open the closer. - if ( - events[open][0] === 'exit' && - events[open][1].type === 'attentionSequence' && - events[open][1]._open && - // If the markers are the same: - context.sliceSerialize(events[open][1]).charCodeAt(0) === - context.sliceSerialize(events[index][1]).charCodeAt(0) - ) { - // If the opening can close or the closing can open, - // and the close size *is not* a multiple of three, - // but the sum of the opening and closing size *is* multiple of three, - // then don’t match. - if ( - (events[open][1]._close || events[index][1]._open) && - (events[index][1].end.offset - events[index][1].start.offset) % 3 && - !( - (events[open][1].end.offset - - events[open][1].start.offset + - events[index][1].end.offset - - events[index][1].start.offset) % - 3 - ) - ) { - continue - } - - // Number of markers to use from the sequence. - use = - events[open][1].end.offset - events[open][1].start.offset > 1 && - events[index][1].end.offset - events[index][1].start.offset > 1 - ? 2 - : 1 - const start = Object.assign({}, events[open][1].end) - const end = Object.assign({}, events[index][1].start) - movePoint(start, -use) - movePoint(end, use) - openingSequence = { - type: use > 1 ? 'strongSequence' : 'emphasisSequence', - start, - end: Object.assign({}, events[open][1].end) - } - closingSequence = { - type: use > 1 ? 'strongSequence' : 'emphasisSequence', - start: Object.assign({}, events[index][1].start), - end - } - text = { - type: use > 1 ? 'strongText' : 'emphasisText', - start: Object.assign({}, events[open][1].end), - end: Object.assign({}, events[index][1].start) - } - group = { - type: use > 1 ? 'strong' : 'emphasis', - start: Object.assign({}, openingSequence.start), - end: Object.assign({}, closingSequence.end) - } - events[open][1].end = Object.assign({}, openingSequence.start) - events[index][1].start = Object.assign({}, closingSequence.end) - nextEvents = [] - - // If there are more markers in the opening, add them before. - if (events[open][1].end.offset - events[open][1].start.offset) { - nextEvents = push(nextEvents, [ - ['enter', events[open][1], context], - ['exit', events[open][1], context] - ]) - } - - // Opening. - nextEvents = push(nextEvents, [ - ['enter', group, context], - ['enter', openingSequence, context], - ['exit', openingSequence, context], - ['enter', text, context] - ]) - - // Always populated by defaults. - - // Between. - nextEvents = push( - nextEvents, - resolveAll( - context.parser.constructs.insideSpan.null, - events.slice(open + 1, index), - context - ) - ) - - // Closing. - nextEvents = push(nextEvents, [ - ['exit', text, context], - ['enter', closingSequence, context], - ['exit', closingSequence, context], - ['exit', group, context] - ]) - - // If there are more markers in the closing, add them after. - if (events[index][1].end.offset - events[index][1].start.offset) { - offset = 2 - nextEvents = push(nextEvents, [ - ['enter', events[index][1], context], - ['exit', events[index][1], context] - ]) - } else { - offset = 0 - } - splice(events, open - 1, index - open + 3, nextEvents) - index = open + nextEvents.length - offset - 2 - break - } - } - } - } - - // Remove remaining sequences. - index = -1 - while (++index < events.length) { - if (events[index][1].type === 'attentionSequence') { - events[index][1].type = 'data' - } - } - return events -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeAttention(effects, ok) { - const attentionMarkers = this.parser.constructs.attentionMarkers.null - const previous = this.previous - const before = classifyCharacter(previous) - - /** @type {NonNullable} */ - let marker - return start - - /** - * Before a sequence. - * - * ```markdown - * > | ** - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - marker = code - effects.enter('attentionSequence') - return inside(code) - } - - /** - * In a sequence. - * - * ```markdown - * > | ** - * ^^ - * ``` - * - * @type {State} - */ - function inside(code) { - if (code === marker) { - effects.consume(code) - return inside - } - const token = effects.exit('attentionSequence') - - // To do: next major: move this to resolver, just like `markdown-rs`. - const after = classifyCharacter(code) - - // Always populated by defaults. - - const open = - !after || (after === 2 && before) || attentionMarkers.includes(code) - const close = - !before || (before === 2 && after) || attentionMarkers.includes(previous) - token._open = Boolean(marker === 42 ? open : open && (before || !close)) - token._close = Boolean(marker === 42 ? close : close && (after || !open)) - return ok(code) - } -} - -/** - * Move a point a bit. - * - * Note: `move` only works inside lines! It’s not possible to move past other - * chunks (replacement characters, tabs, or line endings). - * - * @param {Point} point - * @param {number} offset - * @returns {void} - */ -function movePoint(point, offset) { - point.column += offset - point.offset += offset - point._bufferIndex += offset -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/autolink.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - -/** @type {Construct} */ -const autolink = { - name: 'autolink', - tokenize: tokenizeAutolink -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeAutolink(effects, ok, nok) { - let size = 0 - return start - - /** - * Start of an autolink. - * - * ```markdown - * > | ab - * ^ - * > | ab - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter('autolink') - effects.enter('autolinkMarker') - effects.consume(code) - effects.exit('autolinkMarker') - effects.enter('autolinkProtocol') - return open - } - - /** - * After `<`, at protocol or atext. - * - * ```markdown - * > | ab - * ^ - * > | ab - * ^ - * ``` - * - * @type {State} - */ - function open(code) { - if (asciiAlpha(code)) { - effects.consume(code) - return schemeOrEmailAtext - } - return emailAtext(code) - } - - /** - * At second byte of protocol or atext. - * - * ```markdown - * > | ab - * ^ - * > | ab - * ^ - * ``` - * - * @type {State} - */ - function schemeOrEmailAtext(code) { - // ASCII alphanumeric and `+`, `-`, and `.`. - if (code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code)) { - // Count the previous alphabetical from `open` too. - size = 1 - return schemeInsideOrEmailAtext(code) - } - return emailAtext(code) - } - - /** - * In ambiguous protocol or atext. - * - * ```markdown - * > | ab - * ^ - * > | ab - * ^ - * ``` - * - * @type {State} - */ - function schemeInsideOrEmailAtext(code) { - if (code === 58) { - effects.consume(code) - size = 0 - return urlInside - } - - // ASCII alphanumeric and `+`, `-`, and `.`. - if ( - (code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code)) && - size++ < 32 - ) { - effects.consume(code) - return schemeInsideOrEmailAtext - } - size = 0 - return emailAtext(code) - } - - /** - * After protocol, in URL. - * - * ```markdown - * > | ab - * ^ - * ``` - * - * @type {State} - */ - function urlInside(code) { - if (code === 62) { - effects.exit('autolinkProtocol') - effects.enter('autolinkMarker') - effects.consume(code) - effects.exit('autolinkMarker') - effects.exit('autolink') - return ok - } - - // ASCII control, space, or `<`. - if (code === null || code === 32 || code === 60 || asciiControl(code)) { - return nok(code) - } - effects.consume(code) - return urlInside - } - - /** - * In email atext. - * - * ```markdown - * > | ab - * ^ - * ``` - * - * @type {State} - */ - function emailAtext(code) { - if (code === 64) { - effects.consume(code) - return emailAtSignOrDot - } - if (asciiAtext(code)) { - effects.consume(code) - return emailAtext - } - return nok(code) - } - - /** - * In label, after at-sign or dot. - * - * ```markdown - * > | ab - * ^ ^ - * ``` - * - * @type {State} - */ - function emailAtSignOrDot(code) { - return asciiAlphanumeric(code) ? emailLabel(code) : nok(code) - } - - /** - * In label, where `.` and `>` are allowed. - * - * ```markdown - * > | ab - * ^ - * ``` - * - * @type {State} - */ - function emailLabel(code) { - if (code === 46) { - effects.consume(code) - size = 0 - return emailAtSignOrDot - } - if (code === 62) { - // Exit, then change the token type. - effects.exit('autolinkProtocol').type = 'autolinkEmail' - effects.enter('autolinkMarker') - effects.consume(code) - effects.exit('autolinkMarker') - effects.exit('autolink') - return ok - } - return emailValue(code) - } - - /** - * In label, where `.` and `>` are *not* allowed. - * - * Though, this is also used in `emailLabel` to parse other values. - * - * ```markdown - * > | ab - * ^ - * ``` - * - * @type {State} - */ - function emailValue(code) { - // ASCII alphanumeric or `-`. - if ((code === 45 || asciiAlphanumeric(code)) && size++ < 63) { - const next = code === 45 ? emailValue : emailLabel - effects.consume(code) - return next - } - return nok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/html-text.js -/** - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const htmlText = { - name: 'htmlText', - tokenize: tokenizeHtmlText -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeHtmlText(effects, ok, nok) { - const self = this - /** @type {NonNullable | undefined} */ - let marker - /** @type {number} */ - let index - /** @type {State} */ - let returnState - return start - - /** - * Start of HTML (text). - * - * ```markdown - * > | a c - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter('htmlText') - effects.enter('htmlTextData') - effects.consume(code) - return open - } - - /** - * After `<`, at tag name or other stuff. - * - * ```markdown - * > | a c - * ^ - * > | a c - * ^ - * > | a c - * ^ - * ``` - * - * @type {State} - */ - function open(code) { - if (code === 33) { - effects.consume(code) - return declarationOpen - } - if (code === 47) { - effects.consume(code) - return tagCloseStart - } - if (code === 63) { - effects.consume(code) - return instruction - } - - // ASCII alphabetical. - if (asciiAlpha(code)) { - effects.consume(code) - return tagOpen - } - return nok(code) - } - - /** - * After ` | a c - * ^ - * > | a c - * ^ - * > | a &<]]> c - * ^ - * ``` - * - * @type {State} - */ - function declarationOpen(code) { - if (code === 45) { - effects.consume(code) - return commentOpenInside - } - if (code === 91) { - effects.consume(code) - index = 0 - return cdataOpenInside - } - if (asciiAlpha(code)) { - effects.consume(code) - return declaration - } - return nok(code) - } - - /** - * In a comment, after ` | a c - * ^ - * ``` - * - * @type {State} - */ - function commentOpenInside(code) { - if (code === 45) { - effects.consume(code) - return commentEnd - } - return nok(code) - } - - /** - * In comment. - * - * ```markdown - * > | a c - * ^ - * ``` - * - * @type {State} - */ - function comment(code) { - if (code === null) { - return nok(code) - } - if (code === 45) { - effects.consume(code) - return commentClose - } - if (markdownLineEnding(code)) { - returnState = comment - return lineEndingBefore(code) - } - effects.consume(code) - return comment - } - - /** - * In comment, after `-`. - * - * ```markdown - * > | a c - * ^ - * ``` - * - * @type {State} - */ - function commentClose(code) { - if (code === 45) { - effects.consume(code) - return commentEnd - } - return comment(code) - } - - /** - * In comment, after `--`. - * - * ```markdown - * > | a c - * ^ - * ``` - * - * @type {State} - */ - function commentEnd(code) { - return code === 62 - ? end(code) - : code === 45 - ? commentClose(code) - : comment(code) - } - - /** - * After ` | a &<]]> b - * ^^^^^^ - * ``` - * - * @type {State} - */ - function cdataOpenInside(code) { - const value = 'CDATA[' - if (code === value.charCodeAt(index++)) { - effects.consume(code) - return index === value.length ? cdata : cdataOpenInside - } - return nok(code) - } - - /** - * In CDATA. - * - * ```markdown - * > | a &<]]> b - * ^^^ - * ``` - * - * @type {State} - */ - function cdata(code) { - if (code === null) { - return nok(code) - } - if (code === 93) { - effects.consume(code) - return cdataClose - } - if (markdownLineEnding(code)) { - returnState = cdata - return lineEndingBefore(code) - } - effects.consume(code) - return cdata - } - - /** - * In CDATA, after `]`, at another `]`. - * - * ```markdown - * > | a &<]]> b - * ^ - * ``` - * - * @type {State} - */ - function cdataClose(code) { - if (code === 93) { - effects.consume(code) - return cdataEnd - } - return cdata(code) - } - - /** - * In CDATA, after `]]`, at `>`. - * - * ```markdown - * > | a &<]]> b - * ^ - * ``` - * - * @type {State} - */ - function cdataEnd(code) { - if (code === 62) { - return end(code) - } - if (code === 93) { - effects.consume(code) - return cdataEnd - } - return cdata(code) - } - - /** - * In declaration. - * - * ```markdown - * > | a c - * ^ - * ``` - * - * @type {State} - */ - function declaration(code) { - if (code === null || code === 62) { - return end(code) - } - if (markdownLineEnding(code)) { - returnState = declaration - return lineEndingBefore(code) - } - effects.consume(code) - return declaration - } - - /** - * In instruction. - * - * ```markdown - * > | a c - * ^ - * ``` - * - * @type {State} - */ - function instruction(code) { - if (code === null) { - return nok(code) - } - if (code === 63) { - effects.consume(code) - return instructionClose - } - if (markdownLineEnding(code)) { - returnState = instruction - return lineEndingBefore(code) - } - effects.consume(code) - return instruction - } - - /** - * In instruction, after `?`, at `>`. - * - * ```markdown - * > | a c - * ^ - * ``` - * - * @type {State} - */ - function instructionClose(code) { - return code === 62 ? end(code) : instruction(code) - } - - /** - * After ` | a c - * ^ - * ``` - * - * @type {State} - */ - function tagCloseStart(code) { - // ASCII alphabetical. - if (asciiAlpha(code)) { - effects.consume(code) - return tagClose - } - return nok(code) - } - - /** - * After ` | a c - * ^ - * ``` - * - * @type {State} - */ - function tagClose(code) { - // ASCII alphanumerical and `-`. - if (code === 45 || asciiAlphanumeric(code)) { - effects.consume(code) - return tagClose - } - return tagCloseBetween(code) - } - - /** - * In closing tag, after tag name. - * - * ```markdown - * > | a c - * ^ - * ``` - * - * @type {State} - */ - function tagCloseBetween(code) { - if (markdownLineEnding(code)) { - returnState = tagCloseBetween - return lineEndingBefore(code) - } - if (markdownSpace(code)) { - effects.consume(code) - return tagCloseBetween - } - return end(code) - } - - /** - * After ` | a c - * ^ - * ``` - * - * @type {State} - */ - function tagOpen(code) { - // ASCII alphanumerical and `-`. - if (code === 45 || asciiAlphanumeric(code)) { - effects.consume(code) - return tagOpen - } - if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) { - return tagOpenBetween(code) - } - return nok(code) - } - - /** - * In opening tag, after tag name. - * - * ```markdown - * > | a c - * ^ - * ``` - * - * @type {State} - */ - function tagOpenBetween(code) { - if (code === 47) { - effects.consume(code) - return end - } - - // ASCII alphabetical and `:` and `_`. - if (code === 58 || code === 95 || asciiAlpha(code)) { - effects.consume(code) - return tagOpenAttributeName - } - if (markdownLineEnding(code)) { - returnState = tagOpenBetween - return lineEndingBefore(code) - } - if (markdownSpace(code)) { - effects.consume(code) - return tagOpenBetween - } - return end(code) - } - - /** - * In attribute name. - * - * ```markdown - * > | a d - * ^ - * ``` - * - * @type {State} - */ - function tagOpenAttributeName(code) { - // ASCII alphabetical and `-`, `.`, `:`, and `_`. - if ( - code === 45 || - code === 46 || - code === 58 || - code === 95 || - asciiAlphanumeric(code) - ) { - effects.consume(code) - return tagOpenAttributeName - } - return tagOpenAttributeNameAfter(code) - } - - /** - * After attribute name, before initializer, the end of the tag, or - * whitespace. - * - * ```markdown - * > | a d - * ^ - * ``` - * - * @type {State} - */ - function tagOpenAttributeNameAfter(code) { - if (code === 61) { - effects.consume(code) - return tagOpenAttributeValueBefore - } - if (markdownLineEnding(code)) { - returnState = tagOpenAttributeNameAfter - return lineEndingBefore(code) - } - if (markdownSpace(code)) { - effects.consume(code) - return tagOpenAttributeNameAfter - } - return tagOpenBetween(code) - } - - /** - * Before unquoted, double quoted, or single quoted attribute value, allowing - * whitespace. - * - * ```markdown - * > | a e - * ^ - * ``` - * - * @type {State} - */ - function tagOpenAttributeValueBefore(code) { - if ( - code === null || - code === 60 || - code === 61 || - code === 62 || - code === 96 - ) { - return nok(code) - } - if (code === 34 || code === 39) { - effects.consume(code) - marker = code - return tagOpenAttributeValueQuoted - } - if (markdownLineEnding(code)) { - returnState = tagOpenAttributeValueBefore - return lineEndingBefore(code) - } - if (markdownSpace(code)) { - effects.consume(code) - return tagOpenAttributeValueBefore - } - effects.consume(code) - return tagOpenAttributeValueUnquoted - } - - /** - * In double or single quoted attribute value. - * - * ```markdown - * > | a e - * ^ - * ``` - * - * @type {State} - */ - function tagOpenAttributeValueQuoted(code) { - if (code === marker) { - effects.consume(code) - marker = undefined - return tagOpenAttributeValueQuotedAfter - } - if (code === null) { - return nok(code) - } - if (markdownLineEnding(code)) { - returnState = tagOpenAttributeValueQuoted - return lineEndingBefore(code) - } - effects.consume(code) - return tagOpenAttributeValueQuoted - } - - /** - * In unquoted attribute value. - * - * ```markdown - * > | a e - * ^ - * ``` - * - * @type {State} - */ - function tagOpenAttributeValueUnquoted(code) { - if ( - code === null || - code === 34 || - code === 39 || - code === 60 || - code === 61 || - code === 96 - ) { - return nok(code) - } - if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) { - return tagOpenBetween(code) - } - effects.consume(code) - return tagOpenAttributeValueUnquoted - } - - /** - * After double or single quoted attribute value, before whitespace or the end - * of the tag. - * - * ```markdown - * > | a e - * ^ - * ``` - * - * @type {State} - */ - function tagOpenAttributeValueQuotedAfter(code) { - if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) { - return tagOpenBetween(code) - } - return nok(code) - } - - /** - * In certain circumstances of a tag where only an `>` is allowed. - * - * ```markdown - * > | a e - * ^ - * ``` - * - * @type {State} - */ - function end(code) { - if (code === 62) { - effects.consume(code) - effects.exit('htmlTextData') - effects.exit('htmlText') - return ok - } - return nok(code) - } - - /** - * At eol. - * - * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about - * > empty tokens. - * - * ```markdown - * > | a - * ``` - * - * @type {State} - */ - function lineEndingBefore(code) { - effects.exit('htmlTextData') - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return lineEndingAfter - } - - /** - * After eol, at optional whitespace. - * - * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about - * > empty tokens. - * - * ```markdown - * | a - * ^ - * ``` - * - * @type {State} - */ - function lineEndingAfter(code) { - // Always populated by defaults. - - return markdownSpace(code) - ? factorySpace( - effects, - lineEndingAfterPrefix, - 'linePrefix', - self.parser.constructs.disable.null.includes('codeIndented') - ? undefined - : 4 - )(code) - : lineEndingAfterPrefix(code) - } - - /** - * After eol, after optional whitespace. - * - * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about - * > empty tokens. - * - * ```markdown - * | a - * ^ - * ``` - * - * @type {State} - */ - function lineEndingAfterPrefix(code) { - effects.enter('htmlTextData') - return returnState(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/label-start-link.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const labelStartLink = { - name: 'labelStartLink', - tokenize: tokenizeLabelStartLink, - resolveAll: labelEnd.resolveAll -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeLabelStartLink(effects, ok, nok) { - const self = this - return start - - /** - * Start of label (link) start. - * - * ```markdown - * > | a [b] c - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter('labelLink') - effects.enter('labelMarker') - effects.consume(code) - effects.exit('labelMarker') - effects.exit('labelLink') - return after - } - - /** @type {State} */ - function after(code) { - // To do: this isn’t needed in `micromark-extension-gfm-footnote`, - // remove. - // Hidden footnotes hook. - /* c8 ignore next 3 */ - return code === 94 && '_hiddenFootnoteSupport' in self.parser.constructs - ? nok(code) - : ok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/hard-break-escape.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - -/** @type {Construct} */ -const hardBreakEscape = { - name: 'hardBreakEscape', - tokenize: tokenizeHardBreakEscape -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeHardBreakEscape(effects, ok, nok) { - return start - - /** - * Start of a hard break (escape). - * - * ```markdown - * > | a\ - * ^ - * | b - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter('hardBreakEscape') - effects.consume(code) - return after - } - - /** - * After `\`, at eol. - * - * ```markdown - * > | a\ - * ^ - * | b - * ``` - * - * @type {State} - */ - function after(code) { - if (markdownLineEnding(code)) { - effects.exit('hardBreakEscape') - return ok(code) - } - return nok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/code-text.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').Previous} Previous - * @typedef {import('micromark-util-types').Resolver} Resolver - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').Token} Token - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - -/** @type {Construct} */ -const codeText = { - name: 'codeText', - tokenize: tokenizeCodeText, - resolve: resolveCodeText, - previous -} - -// To do: next major: don’t resolve, like `markdown-rs`. -/** @type {Resolver} */ -function resolveCodeText(events) { - let tailExitIndex = events.length - 4 - let headEnterIndex = 3 - /** @type {number} */ - let index - /** @type {number | undefined} */ - let enter - - // If we start and end with an EOL or a space. - if ( - (events[headEnterIndex][1].type === 'lineEnding' || - events[headEnterIndex][1].type === 'space') && - (events[tailExitIndex][1].type === 'lineEnding' || - events[tailExitIndex][1].type === 'space') - ) { - index = headEnterIndex - - // And we have data. - while (++index < tailExitIndex) { - if (events[index][1].type === 'codeTextData') { - // Then we have padding. - events[headEnterIndex][1].type = 'codeTextPadding' - events[tailExitIndex][1].type = 'codeTextPadding' - headEnterIndex += 2 - tailExitIndex -= 2 - break - } - } - } - - // Merge adjacent spaces and data. - index = headEnterIndex - 1 - tailExitIndex++ - while (++index <= tailExitIndex) { - if (enter === undefined) { - if (index !== tailExitIndex && events[index][1].type !== 'lineEnding') { - enter = index - } - } else if ( - index === tailExitIndex || - events[index][1].type === 'lineEnding' - ) { - events[enter][1].type = 'codeTextData' - if (index !== enter + 2) { - events[enter][1].end = events[index - 1][1].end - events.splice(enter + 2, index - enter - 2) - tailExitIndex -= index - enter - 2 - index = enter + 2 - } - enter = undefined - } - } - return events -} - -/** - * @this {TokenizeContext} - * @type {Previous} - */ -function previous(code) { - // If there is a previous code, there will always be a tail. - return ( - code !== 96 || - this.events[this.events.length - 1][1].type === 'characterEscape' - ) -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeCodeText(effects, ok, nok) { - const self = this - let sizeOpen = 0 - /** @type {number} */ - let size - /** @type {Token} */ - let token - return start - - /** - * Start of code (text). - * - * ```markdown - * > | `a` - * ^ - * > | \`a` - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter('codeText') - effects.enter('codeTextSequence') - return sequenceOpen(code) - } - - /** - * In opening sequence. - * - * ```markdown - * > | `a` - * ^ - * ``` - * - * @type {State} - */ - function sequenceOpen(code) { - if (code === 96) { - effects.consume(code) - sizeOpen++ - return sequenceOpen - } - effects.exit('codeTextSequence') - return between(code) - } - - /** - * Between something and something else. - * - * ```markdown - * > | `a` - * ^^ - * ``` - * - * @type {State} - */ - function between(code) { - // EOF. - if (code === null) { - return nok(code) - } - - // To do: next major: don’t do spaces in resolve, but when compiling, - // like `markdown-rs`. - // Tabs don’t work, and virtual spaces don’t make sense. - if (code === 32) { - effects.enter('space') - effects.consume(code) - effects.exit('space') - return between - } - - // Closing fence? Could also be data. - if (code === 96) { - token = effects.enter('codeTextSequence') - size = 0 - return sequenceClose(code) - } - if (markdownLineEnding(code)) { - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return between - } - - // Data. - effects.enter('codeTextData') - return data(code) - } - - /** - * In data. - * - * ```markdown - * > | `a` - * ^ - * ``` - * - * @type {State} - */ - function data(code) { - if ( - code === null || - code === 32 || - code === 96 || - markdownLineEnding(code) - ) { - effects.exit('codeTextData') - return between(code) - } - effects.consume(code) - return data - } - - /** - * In closing sequence. - * - * ```markdown - * > | `a` - * ^ - * ``` - * - * @type {State} - */ - function sequenceClose(code) { - // More. - if (code === 96) { - effects.consume(code) - size++ - return sequenceClose - } - - // Done! - if (size === sizeOpen) { - effects.exit('codeTextSequence') - effects.exit('codeText') - return ok(code) - } - - // More or less accents: mark as data. - token.type = 'codeTextData' - return data(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/constructs.js -/** - * @typedef {import('micromark-util-types').Extension} Extension - */ - - - - -/** @satisfies {Extension['document']} */ -const constructs_document = { - [42]: list, - [43]: list, - [45]: list, - [48]: list, - [49]: list, - [50]: list, - [51]: list, - [52]: list, - [53]: list, - [54]: list, - [55]: list, - [56]: list, - [57]: list, - [62]: blockQuote -} - -/** @satisfies {Extension['contentInitial']} */ -const contentInitial = { - [91]: definition -} - -/** @satisfies {Extension['flowInitial']} */ -const flowInitial = { - [-2]: codeIndented, - [-1]: codeIndented, - [32]: codeIndented -} - -/** @satisfies {Extension['flow']} */ -const constructs_flow = { - [35]: headingAtx, - [42]: thematicBreak, - [45]: [setextUnderline, thematicBreak], - [60]: htmlFlow, - [61]: setextUnderline, - [95]: thematicBreak, - [96]: codeFenced, - [126]: codeFenced -} - -/** @satisfies {Extension['string']} */ -const constructs_string = { - [38]: characterReference, - [92]: characterEscape -} - -/** @satisfies {Extension['text']} */ -const constructs_text = { - [-5]: lineEnding, - [-4]: lineEnding, - [-3]: lineEnding, - [33]: labelStartImage, - [38]: characterReference, - [42]: attention, - [60]: [autolink, htmlText], - [91]: labelStartLink, - [92]: [hardBreakEscape, characterEscape], - [93]: labelEnd, - [95]: attention, - [96]: codeText -} - -/** @satisfies {Extension['insideSpan']} */ -const insideSpan = { - null: [attention, resolver] -} - -/** @satisfies {Extension['attentionMarkers']} */ -const attentionMarkers = { - null: [42, 95] -} - -/** @satisfies {Extension['disable']} */ -const disable = { - null: [] -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/parse.js -/** - * @typedef {import('micromark-util-types').Create} Create - * @typedef {import('micromark-util-types').FullNormalizedExtension} FullNormalizedExtension - * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct - * @typedef {import('micromark-util-types').ParseContext} ParseContext - * @typedef {import('micromark-util-types').ParseOptions} ParseOptions - */ - - - - - - - - - -/** - * @param {ParseOptions | null | undefined} [options] - * @returns {ParseContext} - */ -function parse(options) { - const settings = options || {} - const constructs = - /** @type {FullNormalizedExtension} */ - combineExtensions([constructs_namespaceObject, ...(settings.extensions || [])]) - - /** @type {ParseContext} */ - const parser = { - defined: [], - lazy: {}, - constructs, - content: create(content), - document: create(document_document), - flow: create(flow), - string: create(string), - text: create(text_text) - } - return parser - - /** - * @param {InitialConstruct} initial - */ - function create(initial) { - return creator - /** @type {Create} */ - function creator(from) { - return createTokenizer(parser, initial, from) - } - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/preprocess.js -/** - * @typedef {import('micromark-util-types').Chunk} Chunk - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Encoding} Encoding - * @typedef {import('micromark-util-types').Value} Value - */ - -/** - * @callback Preprocessor - * @param {Value} value - * @param {Encoding | null | undefined} [encoding] - * @param {boolean | null | undefined} [end=false] - * @returns {Array} - */ - -const search = /[\0\t\n\r]/g - -/** - * @returns {Preprocessor} - */ -function preprocess() { - let column = 1 - let buffer = '' - /** @type {boolean | undefined} */ - let start = true - /** @type {boolean | undefined} */ - let atCarriageReturn - return preprocessor - - /** @type {Preprocessor} */ - function preprocessor(value, encoding, end) { - /** @type {Array} */ - const chunks = [] - /** @type {RegExpMatchArray | null} */ - let match - /** @type {number} */ - let next - /** @type {number} */ - let startPosition - /** @type {number} */ - let endPosition - /** @type {Code} */ - let code - - // @ts-expect-error `Buffer` does allow an encoding. - value = buffer + value.toString(encoding) - startPosition = 0 - buffer = '' - if (start) { - // To do: `markdown-rs` actually parses BOMs (byte order mark). - if (value.charCodeAt(0) === 65279) { - startPosition++ - } - start = undefined - } - while (startPosition < value.length) { - search.lastIndex = startPosition - match = search.exec(value) - endPosition = - match && match.index !== undefined ? match.index : value.length - code = value.charCodeAt(endPosition) - if (!match) { - buffer = value.slice(startPosition) - break - } - if (code === 10 && startPosition === endPosition && atCarriageReturn) { - chunks.push(-3) - atCarriageReturn = undefined - } else { - if (atCarriageReturn) { - chunks.push(-5) - atCarriageReturn = undefined - } - if (startPosition < endPosition) { - chunks.push(value.slice(startPosition, endPosition)) - column += endPosition - startPosition - } - switch (code) { - case 0: { - chunks.push(65533) - column++ - break - } - case 9: { - next = Math.ceil(column / 4) * 4 - chunks.push(-2) - while (column++ < next) chunks.push(-1) - break - } - case 10: { - chunks.push(-4) - column = 1 - break - } - default: { - atCarriageReturn = true - column = 1 - } - } - } - startPosition = endPosition + 1 - } - if (end) { - if (atCarriageReturn) chunks.push(-5) - if (buffer) chunks.push(buffer) - chunks.push(null) - } - return chunks - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/postprocess.js -/** - * @typedef {import('micromark-util-types').Event} Event - */ - - - -/** - * @param {Array} events - * @returns {Array} - */ -function postprocess(events) { - while (!subtokenize(events)) { - // Empty - } - return events -} - -;// CONCATENATED MODULE: ./node_modules/micromark-util-decode-numeric-character-reference/index.js -/** - * Turn the number (in string form as either hexa- or plain decimal) coming from - * a numeric character reference into a character. - * - * Sort of like `String.fromCharCode(Number.parseInt(value, base))`, but makes - * non-characters and control characters safe. - * - * @param {string} value - * Value to decode. - * @param {number} base - * Numeric base. - * @returns {string} - * Character. - */ -function decodeNumericCharacterReference(value, base) { - const code = Number.parseInt(value, base) - if ( - // C0 except for HT, LF, FF, CR, space. - code < 9 || - code === 11 || - (code > 13 && code < 32) || - // Control character (DEL) of C0, and C1 controls. - (code > 126 && code < 160) || - // Lone high surrogates and low surrogates. - (code > 55295 && code < 57344) || - // Noncharacters. - (code > 64975 && code < 65008) /* eslint-disable no-bitwise */ || - (code & 65535) === 65535 || - (code & 65535) === 65534 /* eslint-enable no-bitwise */ || - // Out of range - code > 1114111 - ) { - return '\uFFFD' - } - return String.fromCharCode(code) -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-decode-string/index.js - - -const characterEscapeOrReference = - /\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi - -/** - * Decode markdown strings (which occur in places such as fenced code info - * strings, destinations, labels, and titles). - * - * The “string” content type allows character escapes and -references. - * This decodes those. - * - * @param {string} value - * Value to decode. - * @returns {string} - * Decoded value. - */ -function decodeString(value) { - return value.replace(characterEscapeOrReference, decode) -} - -/** - * @param {string} $0 - * @param {string} $1 - * @param {string} $2 - * @returns {string} - */ -function decode($0, $1, $2) { - if ($1) { - // Escape. - return $1 - } - - // Reference. - const head = $2.charCodeAt(0) - if (head === 35) { - const head = $2.charCodeAt(1) - const hex = head === 120 || head === 88 - return decodeNumericCharacterReference($2.slice(hex ? 2 : 1), hex ? 16 : 10) - } - return decodeNamedCharacterReference($2) || $0 -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/unist-util-stringify-position/lib/index.js -/** - * @typedef {import('unist').Node} Node - * @typedef {import('unist').Point} Point - * @typedef {import('unist').Position} Position - */ - -/** - * @typedef NodeLike - * @property {string} type - * @property {PositionLike | null | undefined} [position] - * - * @typedef PositionLike - * @property {PointLike | null | undefined} [start] - * @property {PointLike | null | undefined} [end] - * - * @typedef PointLike - * @property {number | null | undefined} [line] - * @property {number | null | undefined} [column] - * @property {number | null | undefined} [offset] - */ - -/** - * Serialize the positional info of a point, position (start and end points), - * or node. - * - * @param {Node | NodeLike | Position | PositionLike | Point | PointLike | null | undefined} [value] - * Node, position, or point. - * @returns {string} - * Pretty printed positional info of a node (`string`). - * - * In the format of a range `ls:cs-le:ce` (when given `node` or `position`) - * or a point `l:c` (when given `point`), where `l` stands for line, `c` for - * column, `s` for `start`, and `e` for end. - * An empty string (`''`) is returned if the given value is neither `node`, - * `position`, nor `point`. - */ -function stringifyPosition(value) { - // Nothing. - if (!value || typeof value !== 'object') { - return '' - } - - // Node. - if ('position' in value || 'type' in value) { - return position(value.position) - } - - // Position. - if ('start' in value || 'end' in value) { - return position(value) - } - - // Point. - if ('line' in value || 'column' in value) { - return point(value) - } - - // ? - return '' -} - -/** - * @param {Point | PointLike | null | undefined} point - * @returns {string} - */ -function point(point) { - return index(point && point.line) + ':' + index(point && point.column) -} - -/** - * @param {Position | PositionLike | null | undefined} pos - * @returns {string} - */ -function position(pos) { - return point(pos && pos.start) + '-' + point(pos && pos.end) -} - -/** - * @param {number | null | undefined} value - * @returns {number} - */ -function index(value) { - return value && typeof value === 'number' ? value : 1 -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/mdast-util-from-markdown/lib/index.js -/** - * @typedef {import('micromark-util-types').Encoding} Encoding - * @typedef {import('micromark-util-types').Event} Event - * @typedef {import('micromark-util-types').ParseOptions} ParseOptions - * @typedef {import('micromark-util-types').Token} Token - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Value} Value - * - * @typedef {import('unist').Parent} UnistParent - * @typedef {import('unist').Point} Point - * - * @typedef {import('mdast').PhrasingContent} PhrasingContent - * @typedef {import('mdast').StaticPhrasingContent} StaticPhrasingContent - * @typedef {import('mdast').Content} Content - * @typedef {import('mdast').Break} Break - * @typedef {import('mdast').Blockquote} Blockquote - * @typedef {import('mdast').Code} Code - * @typedef {import('mdast').Definition} Definition - * @typedef {import('mdast').Emphasis} Emphasis - * @typedef {import('mdast').Heading} Heading - * @typedef {import('mdast').HTML} HTML - * @typedef {import('mdast').Image} Image - * @typedef {import('mdast').ImageReference} ImageReference - * @typedef {import('mdast').InlineCode} InlineCode - * @typedef {import('mdast').Link} Link - * @typedef {import('mdast').LinkReference} LinkReference - * @typedef {import('mdast').List} List - * @typedef {import('mdast').ListItem} ListItem - * @typedef {import('mdast').Paragraph} Paragraph - * @typedef {import('mdast').Root} Root - * @typedef {import('mdast').Strong} Strong - * @typedef {import('mdast').Text} Text - * @typedef {import('mdast').ThematicBreak} ThematicBreak - * @typedef {import('mdast').ReferenceType} ReferenceType - * @typedef {import('../index.js').CompileData} CompileData - */ - -/** - * @typedef {Root | Content} Node - * @typedef {Extract} Parent - * - * @typedef {Omit & {type: 'fragment', children: Array}} Fragment - */ - -/** - * @callback Transform - * Extra transform, to change the AST afterwards. - * @param {Root} tree - * Tree to transform. - * @returns {Root | undefined | null | void} - * New tree or nothing (in which case the current tree is used). - * - * @callback Handle - * Handle a token. - * @param {CompileContext} this - * Context. - * @param {Token} token - * Current token. - * @returns {void} - * Nothing. - * - * @typedef {Record} Handles - * Token types mapping to handles - * - * @callback OnEnterError - * Handle the case where the `right` token is open, but it is closed (by the - * `left` token) or because we reached the end of the document. - * @param {Omit} this - * Context. - * @param {Token | undefined} left - * Left token. - * @param {Token} right - * Right token. - * @returns {void} - * Nothing. - * - * @callback OnExitError - * Handle the case where the `right` token is open but it is closed by - * exiting the `left` token. - * @param {Omit} this - * Context. - * @param {Token} left - * Left token. - * @param {Token} right - * Right token. - * @returns {void} - * Nothing. - * - * @typedef {[Token, OnEnterError | undefined]} TokenTuple - * Open token on the stack, with an optional error handler for when - * that token isn’t closed properly. - */ - -/** - * @typedef Config - * Configuration. - * - * We have our defaults, but extensions will add more. - * @property {Array} canContainEols - * Token types where line endings are used. - * @property {Handles} enter - * Opening handles. - * @property {Handles} exit - * Closing handles. - * @property {Array} transforms - * Tree transforms. - * - * @typedef {Partial} Extension - * Change how markdown tokens from micromark are turned into mdast. - * - * @typedef CompileContext - * mdast compiler context. - * @property {Array} stack - * Stack of nodes. - * @property {Array} tokenStack - * Stack of tokens. - * @property {(key: Key) => CompileData[Key]} getData - * Get data from the key/value store. - * @property {(key: Key, value?: CompileData[Key]) => void} setData - * Set data into the key/value store. - * @property {(this: CompileContext) => void} buffer - * Capture some of the output data. - * @property {(this: CompileContext) => string} resume - * Stop capturing and access the output data. - * @property {(this: CompileContext, node: Kind, token: Token, onError?: OnEnterError) => Kind} enter - * Enter a token. - * @property {(this: CompileContext, token: Token, onError?: OnExitError) => Node} exit - * Exit a token. - * @property {TokenizeContext['sliceSerialize']} sliceSerialize - * Get the string value of a token. - * @property {Config} config - * Configuration. - * - * @typedef FromMarkdownOptions - * Configuration for how to build mdast. - * @property {Array> | null | undefined} [mdastExtensions] - * Extensions for this utility to change how tokens are turned into a tree. - * - * @typedef {ParseOptions & FromMarkdownOptions} Options - * Configuration. - */ - -// To do: micromark: create a registry of tokens? -// To do: next major: don’t return given `Node` from `enter`. -// To do: next major: remove setter/getter. - - - - - - - - - - -const lib_own = {}.hasOwnProperty - -/** - * @param value - * Markdown to parse. - * @param encoding - * Character encoding for when `value` is `Buffer`. - * @param options - * Configuration. - * @returns - * mdast tree. - */ -const fromMarkdown = - /** - * @type {( - * ((value: Value, encoding: Encoding, options?: Options | null | undefined) => Root) & - * ((value: Value, options?: Options | null | undefined) => Root) - * )} - */ - - /** - * @param {Value} value - * @param {Encoding | Options | null | undefined} [encoding] - * @param {Options | null | undefined} [options] - * @returns {Root} - */ - function (value, encoding, options) { - if (typeof encoding !== 'string') { - options = encoding - encoding = undefined - } - return compiler(options)( - postprocess( - parse(options).document().write(preprocess()(value, encoding, true)) - ) - ) - } - -/** - * Note this compiler only understand complete buffering, not streaming. - * - * @param {Options | null | undefined} [options] - */ -function compiler(options) { - /** @type {Config} */ - const config = { - transforms: [], - canContainEols: ['emphasis', 'fragment', 'heading', 'paragraph', 'strong'], - enter: { - autolink: opener(link), - autolinkProtocol: onenterdata, - autolinkEmail: onenterdata, - atxHeading: opener(heading), - blockQuote: opener(blockQuote), - characterEscape: onenterdata, - characterReference: onenterdata, - codeFenced: opener(codeFlow), - codeFencedFenceInfo: buffer, - codeFencedFenceMeta: buffer, - codeIndented: opener(codeFlow, buffer), - codeText: opener(codeText, buffer), - codeTextData: onenterdata, - data: onenterdata, - codeFlowValue: onenterdata, - definition: opener(definition), - definitionDestinationString: buffer, - definitionLabelString: buffer, - definitionTitleString: buffer, - emphasis: opener(emphasis), - hardBreakEscape: opener(hardBreak), - hardBreakTrailing: opener(hardBreak), - htmlFlow: opener(html, buffer), - htmlFlowData: onenterdata, - htmlText: opener(html, buffer), - htmlTextData: onenterdata, - image: opener(image), - label: buffer, - link: opener(link), - listItem: opener(listItem), - listItemValue: onenterlistitemvalue, - listOrdered: opener(list, onenterlistordered), - listUnordered: opener(list), - paragraph: opener(paragraph), - reference: onenterreference, - referenceString: buffer, - resourceDestinationString: buffer, - resourceTitleString: buffer, - setextHeading: opener(heading), - strong: opener(strong), - thematicBreak: opener(thematicBreak) - }, - exit: { - atxHeading: closer(), - atxHeadingSequence: onexitatxheadingsequence, - autolink: closer(), - autolinkEmail: onexitautolinkemail, - autolinkProtocol: onexitautolinkprotocol, - blockQuote: closer(), - characterEscapeValue: onexitdata, - characterReferenceMarkerHexadecimal: onexitcharacterreferencemarker, - characterReferenceMarkerNumeric: onexitcharacterreferencemarker, - characterReferenceValue: onexitcharacterreferencevalue, - codeFenced: closer(onexitcodefenced), - codeFencedFence: onexitcodefencedfence, - codeFencedFenceInfo: onexitcodefencedfenceinfo, - codeFencedFenceMeta: onexitcodefencedfencemeta, - codeFlowValue: onexitdata, - codeIndented: closer(onexitcodeindented), - codeText: closer(onexitcodetext), - codeTextData: onexitdata, - data: onexitdata, - definition: closer(), - definitionDestinationString: onexitdefinitiondestinationstring, - definitionLabelString: onexitdefinitionlabelstring, - definitionTitleString: onexitdefinitiontitlestring, - emphasis: closer(), - hardBreakEscape: closer(onexithardbreak), - hardBreakTrailing: closer(onexithardbreak), - htmlFlow: closer(onexithtmlflow), - htmlFlowData: onexitdata, - htmlText: closer(onexithtmltext), - htmlTextData: onexitdata, - image: closer(onexitimage), - label: onexitlabel, - labelText: onexitlabeltext, - lineEnding: onexitlineending, - link: closer(onexitlink), - listItem: closer(), - listOrdered: closer(), - listUnordered: closer(), - paragraph: closer(), - referenceString: onexitreferencestring, - resourceDestinationString: onexitresourcedestinationstring, - resourceTitleString: onexitresourcetitlestring, - resource: onexitresource, - setextHeading: closer(onexitsetextheading), - setextHeadingLineSequence: onexitsetextheadinglinesequence, - setextHeadingText: onexitsetextheadingtext, - strong: closer(), - thematicBreak: closer() - } - } - configure(config, (options || {}).mdastExtensions || []) - - /** @type {CompileData} */ - const data = {} - return compile - - /** - * Turn micromark events into an mdast tree. - * - * @param {Array} events - * Events. - * @returns {Root} - * mdast tree. - */ - function compile(events) { - /** @type {Root} */ - let tree = { - type: 'root', - children: [] - } - /** @type {Omit} */ - const context = { - stack: [tree], - tokenStack: [], - config, - enter, - exit, - buffer, - resume, - setData, - getData - } - /** @type {Array} */ - const listStack = [] - let index = -1 - while (++index < events.length) { - // We preprocess lists to add `listItem` tokens, and to infer whether - // items the list itself are spread out. - if ( - events[index][1].type === 'listOrdered' || - events[index][1].type === 'listUnordered' - ) { - if (events[index][0] === 'enter') { - listStack.push(index) - } else { - const tail = listStack.pop() - index = prepareList(events, tail, index) - } - } - } - index = -1 - while (++index < events.length) { - const handler = config[events[index][0]] - if (lib_own.call(handler, events[index][1].type)) { - handler[events[index][1].type].call( - Object.assign( - { - sliceSerialize: events[index][2].sliceSerialize - }, - context - ), - events[index][1] - ) - } - } - - // Handle tokens still being open. - if (context.tokenStack.length > 0) { - const tail = context.tokenStack[context.tokenStack.length - 1] - const handler = tail[1] || defaultOnError - handler.call(context, undefined, tail[0]) - } - - // Figure out `root` position. - tree.position = { - start: lib_point( - events.length > 0 - ? events[0][1].start - : { - line: 1, - column: 1, - offset: 0 - } - ), - end: lib_point( - events.length > 0 - ? events[events.length - 2][1].end - : { - line: 1, - column: 1, - offset: 0 - } - ) - } - - // Call transforms. - index = -1 - while (++index < config.transforms.length) { - tree = config.transforms[index](tree) || tree - } - return tree - } - - /** - * @param {Array} events - * @param {number} start - * @param {number} length - * @returns {number} - */ - function prepareList(events, start, length) { - let index = start - 1 - let containerBalance = -1 - let listSpread = false - /** @type {Token | undefined} */ - let listItem - /** @type {number | undefined} */ - let lineIndex - /** @type {number | undefined} */ - let firstBlankLineIndex - /** @type {boolean | undefined} */ - let atMarker - while (++index <= length) { - const event = events[index] - if ( - event[1].type === 'listUnordered' || - event[1].type === 'listOrdered' || - event[1].type === 'blockQuote' - ) { - if (event[0] === 'enter') { - containerBalance++ - } else { - containerBalance-- - } - atMarker = undefined - } else if (event[1].type === 'lineEndingBlank') { - if (event[0] === 'enter') { - if ( - listItem && - !atMarker && - !containerBalance && - !firstBlankLineIndex - ) { - firstBlankLineIndex = index - } - atMarker = undefined - } - } else if ( - event[1].type === 'linePrefix' || - event[1].type === 'listItemValue' || - event[1].type === 'listItemMarker' || - event[1].type === 'listItemPrefix' || - event[1].type === 'listItemPrefixWhitespace' - ) { - // Empty. - } else { - atMarker = undefined - } - if ( - (!containerBalance && - event[0] === 'enter' && - event[1].type === 'listItemPrefix') || - (containerBalance === -1 && - event[0] === 'exit' && - (event[1].type === 'listUnordered' || - event[1].type === 'listOrdered')) - ) { - if (listItem) { - let tailIndex = index - lineIndex = undefined - while (tailIndex--) { - const tailEvent = events[tailIndex] - if ( - tailEvent[1].type === 'lineEnding' || - tailEvent[1].type === 'lineEndingBlank' - ) { - if (tailEvent[0] === 'exit') continue - if (lineIndex) { - events[lineIndex][1].type = 'lineEndingBlank' - listSpread = true - } - tailEvent[1].type = 'lineEnding' - lineIndex = tailIndex - } else if ( - tailEvent[1].type === 'linePrefix' || - tailEvent[1].type === 'blockQuotePrefix' || - tailEvent[1].type === 'blockQuotePrefixWhitespace' || - tailEvent[1].type === 'blockQuoteMarker' || - tailEvent[1].type === 'listItemIndent' - ) { - // Empty - } else { - break - } - } - if ( - firstBlankLineIndex && - (!lineIndex || firstBlankLineIndex < lineIndex) - ) { - listItem._spread = true - } - - // Fix position. - listItem.end = Object.assign( - {}, - lineIndex ? events[lineIndex][1].start : event[1].end - ) - events.splice(lineIndex || index, 0, ['exit', listItem, event[2]]) - index++ - length++ - } - - // Create a new list item. - if (event[1].type === 'listItemPrefix') { - listItem = { - type: 'listItem', - _spread: false, - start: Object.assign({}, event[1].start), - // @ts-expect-error: we’ll add `end` in a second. - end: undefined - } - // @ts-expect-error: `listItem` is most definitely defined, TS... - events.splice(index, 0, ['enter', listItem, event[2]]) - index++ - length++ - firstBlankLineIndex = undefined - atMarker = true - } - } - } - events[start][1]._spread = listSpread - return length - } - - /** - * Set data. - * - * @template {keyof CompileData} Key - * Field type. - * @param {Key} key - * Key of field. - * @param {CompileData[Key]} [value] - * New value. - * @returns {void} - * Nothing. - */ - function setData(key, value) { - data[key] = value - } - - /** - * Get data. - * - * @template {keyof CompileData} Key - * Field type. - * @param {Key} key - * Key of field. - * @returns {CompileData[Key]} - * Value. - */ - function getData(key) { - return data[key] - } - - /** - * Create an opener handle. - * - * @param {(token: Token) => Node} create - * Create a node. - * @param {Handle} [and] - * Optional function to also run. - * @returns {Handle} - * Handle. - */ - function opener(create, and) { - return open - - /** - * @this {CompileContext} - * @param {Token} token - * @returns {void} - */ - function open(token) { - enter.call(this, create(token), token) - if (and) and.call(this, token) - } - } - - /** - * @this {CompileContext} - * @returns {void} - */ - function buffer() { - this.stack.push({ - type: 'fragment', - children: [] - }) - } - - /** - * @template {Node} Kind - * Node type. - * @this {CompileContext} - * Context. - * @param {Kind} node - * Node to enter. - * @param {Token} token - * Corresponding token. - * @param {OnEnterError | undefined} [errorHandler] - * Handle the case where this token is open, but it is closed by something else. - * @returns {Kind} - * The given node. - */ - function enter(node, token, errorHandler) { - const parent = this.stack[this.stack.length - 1] - // @ts-expect-error: Assume `Node` can exist as a child of `parent`. - parent.children.push(node) - this.stack.push(node) - this.tokenStack.push([token, errorHandler]) - // @ts-expect-error: `end` will be patched later. - node.position = { - start: lib_point(token.start) - } - return node - } - - /** - * Create a closer handle. - * - * @param {Handle} [and] - * Optional function to also run. - * @returns {Handle} - * Handle. - */ - function closer(and) { - return close - - /** - * @this {CompileContext} - * @param {Token} token - * @returns {void} - */ - function close(token) { - if (and) and.call(this, token) - exit.call(this, token) - } - } - - /** - * @this {CompileContext} - * Context. - * @param {Token} token - * Corresponding token. - * @param {OnExitError | undefined} [onExitError] - * Handle the case where another token is open. - * @returns {Node} - * The closed node. - */ - function exit(token, onExitError) { - const node = this.stack.pop() - const open = this.tokenStack.pop() - if (!open) { - throw new Error( - 'Cannot close `' + - token.type + - '` (' + - stringifyPosition({ - start: token.start, - end: token.end - }) + - '): it’s not open' - ) - } else if (open[0].type !== token.type) { - if (onExitError) { - onExitError.call(this, token, open[0]) - } else { - const handler = open[1] || defaultOnError - handler.call(this, token, open[0]) - } - } - node.position.end = lib_point(token.end) - return node - } - - /** - * @this {CompileContext} - * @returns {string} - */ - function resume() { - return lib_toString(this.stack.pop()) - } - - // - // Handlers. - // - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onenterlistordered() { - setData('expectingFirstListItemValue', true) - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onenterlistitemvalue(token) { - if (getData('expectingFirstListItemValue')) { - const ancestor = this.stack[this.stack.length - 2] - ancestor.start = Number.parseInt(this.sliceSerialize(token), 10) - setData('expectingFirstListItemValue') - } - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitcodefencedfenceinfo() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.lang = data - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitcodefencedfencemeta() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.meta = data - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitcodefencedfence() { - // Exit if this is the closing fence. - if (getData('flowCodeInside')) return - this.buffer() - setData('flowCodeInside', true) - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitcodefenced() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.value = data.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g, '') - setData('flowCodeInside') - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitcodeindented() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.value = data.replace(/(\r?\n|\r)$/g, '') - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitdefinitionlabelstring(token) { - const label = this.resume() - const node = this.stack[this.stack.length - 1] - node.label = label - node.identifier = normalizeIdentifier( - this.sliceSerialize(token) - ).toLowerCase() - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitdefinitiontitlestring() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.title = data - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitdefinitiondestinationstring() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.url = data - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitatxheadingsequence(token) { - const node = this.stack[this.stack.length - 1] - if (!node.depth) { - const depth = this.sliceSerialize(token).length - node.depth = depth - } - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitsetextheadingtext() { - setData('setextHeadingSlurpLineEnding', true) - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitsetextheadinglinesequence(token) { - const node = this.stack[this.stack.length - 1] - node.depth = this.sliceSerialize(token).charCodeAt(0) === 61 ? 1 : 2 - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitsetextheading() { - setData('setextHeadingSlurpLineEnding') - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onenterdata(token) { - const node = this.stack[this.stack.length - 1] - let tail = node.children[node.children.length - 1] - if (!tail || tail.type !== 'text') { - // Add a new text node. - tail = text() - // @ts-expect-error: we’ll add `end` later. - tail.position = { - start: lib_point(token.start) - } - // @ts-expect-error: Assume `parent` accepts `text`. - node.children.push(tail) - } - this.stack.push(tail) - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitdata(token) { - const tail = this.stack.pop() - tail.value += this.sliceSerialize(token) - tail.position.end = lib_point(token.end) - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitlineending(token) { - const context = this.stack[this.stack.length - 1] - // If we’re at a hard break, include the line ending in there. - if (getData('atHardBreak')) { - const tail = context.children[context.children.length - 1] - tail.position.end = lib_point(token.end) - setData('atHardBreak') - return - } - if ( - !getData('setextHeadingSlurpLineEnding') && - config.canContainEols.includes(context.type) - ) { - onenterdata.call(this, token) - onexitdata.call(this, token) - } - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexithardbreak() { - setData('atHardBreak', true) - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexithtmlflow() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.value = data - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexithtmltext() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.value = data - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitcodetext() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.value = data - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitlink() { - const node = this.stack[this.stack.length - 1] - // Note: there are also `identifier` and `label` fields on this link node! - // These are used / cleaned here. - // To do: clean. - if (getData('inReference')) { - /** @type {ReferenceType} */ - const referenceType = getData('referenceType') || 'shortcut' - node.type += 'Reference' - // @ts-expect-error: mutate. - node.referenceType = referenceType - // @ts-expect-error: mutate. - delete node.url - delete node.title - } else { - // @ts-expect-error: mutate. - delete node.identifier - // @ts-expect-error: mutate. - delete node.label - } - setData('referenceType') - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitimage() { - const node = this.stack[this.stack.length - 1] - // Note: there are also `identifier` and `label` fields on this link node! - // These are used / cleaned here. - // To do: clean. - if (getData('inReference')) { - /** @type {ReferenceType} */ - const referenceType = getData('referenceType') || 'shortcut' - node.type += 'Reference' - // @ts-expect-error: mutate. - node.referenceType = referenceType - // @ts-expect-error: mutate. - delete node.url - delete node.title - } else { - // @ts-expect-error: mutate. - delete node.identifier - // @ts-expect-error: mutate. - delete node.label - } - setData('referenceType') - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitlabeltext(token) { - const string = this.sliceSerialize(token) - const ancestor = this.stack[this.stack.length - 2] - // @ts-expect-error: stash this on the node, as it might become a reference - // later. - ancestor.label = decodeString(string) - // @ts-expect-error: same as above. - ancestor.identifier = normalizeIdentifier(string).toLowerCase() - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitlabel() { - const fragment = this.stack[this.stack.length - 1] - const value = this.resume() - const node = this.stack[this.stack.length - 1] - // Assume a reference. - setData('inReference', true) - if (node.type === 'link') { - /** @type {Array} */ - // @ts-expect-error: Assume static phrasing content. - const children = fragment.children - node.children = children - } else { - node.alt = value - } - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitresourcedestinationstring() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.url = data - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitresourcetitlestring() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.title = data - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitresource() { - setData('inReference') - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onenterreference() { - setData('referenceType', 'collapsed') - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitreferencestring(token) { - const label = this.resume() - const node = this.stack[this.stack.length - 1] - // @ts-expect-error: stash this on the node, as it might become a reference - // later. - node.label = label - // @ts-expect-error: same as above. - node.identifier = normalizeIdentifier( - this.sliceSerialize(token) - ).toLowerCase() - setData('referenceType', 'full') - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitcharacterreferencemarker(token) { - setData('characterReferenceType', token.type) - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitcharacterreferencevalue(token) { - const data = this.sliceSerialize(token) - const type = getData('characterReferenceType') - /** @type {string} */ - let value - if (type) { - value = decodeNumericCharacterReference( - data, - type === 'characterReferenceMarkerNumeric' ? 10 : 16 - ) - setData('characterReferenceType') - } else { - const result = decodeNamedCharacterReference(data) - value = result - } - const tail = this.stack.pop() - tail.value += value - tail.position.end = lib_point(token.end) - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitautolinkprotocol(token) { - onexitdata.call(this, token) - const node = this.stack[this.stack.length - 1] - node.url = this.sliceSerialize(token) - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitautolinkemail(token) { - onexitdata.call(this, token) - const node = this.stack[this.stack.length - 1] - node.url = 'mailto:' + this.sliceSerialize(token) - } - - // - // Creaters. - // - - /** @returns {Blockquote} */ - function blockQuote() { - return { - type: 'blockquote', - children: [] - } - } - - /** @returns {Code} */ - function codeFlow() { - return { - type: 'code', - lang: null, - meta: null, - value: '' - } - } - - /** @returns {InlineCode} */ - function codeText() { - return { - type: 'inlineCode', - value: '' - } - } - - /** @returns {Definition} */ - function definition() { - return { - type: 'definition', - identifier: '', - label: null, - title: null, - url: '' - } - } - - /** @returns {Emphasis} */ - function emphasis() { - return { - type: 'emphasis', - children: [] - } - } - - /** @returns {Heading} */ - function heading() { - // @ts-expect-error `depth` will be set later. - return { - type: 'heading', - depth: undefined, - children: [] - } - } - - /** @returns {Break} */ - function hardBreak() { - return { - type: 'break' - } - } - - /** @returns {HTML} */ - function html() { - return { - type: 'html', - value: '' - } - } - - /** @returns {Image} */ - function image() { - return { - type: 'image', - title: null, - url: '', - alt: null - } - } - - /** @returns {Link} */ - function link() { - return { - type: 'link', - title: null, - url: '', - children: [] - } - } - - /** - * @param {Token} token - * @returns {List} - */ - function list(token) { - return { - type: 'list', - ordered: token.type === 'listOrdered', - start: null, - spread: token._spread, - children: [] - } - } - - /** - * @param {Token} token - * @returns {ListItem} - */ - function listItem(token) { - return { - type: 'listItem', - spread: token._spread, - checked: null, - children: [] - } - } - - /** @returns {Paragraph} */ - function paragraph() { - return { - type: 'paragraph', - children: [] - } - } - - /** @returns {Strong} */ - function strong() { - return { - type: 'strong', - children: [] - } - } - - /** @returns {Text} */ - function text() { - return { - type: 'text', - value: '' - } - } - - /** @returns {ThematicBreak} */ - function thematicBreak() { - return { - type: 'thematicBreak' - } - } -} - -/** - * Copy a point-like value. - * - * @param {Point} d - * Point-like value. - * @returns {Point} - * unist point. - */ -function lib_point(d) { - return { - line: d.line, - column: d.column, - offset: d.offset - } -} - -/** - * @param {Config} combined - * @param {Array>} extensions - * @returns {void} - */ -function configure(combined, extensions) { - let index = -1 - while (++index < extensions.length) { - const value = extensions[index] - if (Array.isArray(value)) { - configure(combined, value) - } else { - extension(combined, value) - } - } -} - -/** - * @param {Config} combined - * @param {Extension} extension - * @returns {void} - */ -function extension(combined, extension) { - /** @type {keyof Extension} */ - let key - for (key in extension) { - if (lib_own.call(extension, key)) { - if (key === 'canContainEols') { - const right = extension[key] - if (right) { - combined[key].push(...right) - } - } else if (key === 'transforms') { - const right = extension[key] - if (right) { - combined[key].push(...right) - } - } else if (key === 'enter' || key === 'exit') { - const right = extension[key] - if (right) { - Object.assign(combined[key], right) - } - } - } - } -} - -/** @type {OnEnterError} */ -function defaultOnError(left, right) { - if (left) { - throw new Error( - 'Cannot close `' + - left.type + - '` (' + - stringifyPosition({ - start: left.start, - end: left.end - }) + - '): a different token (`' + - right.type + - '`, ' + - stringifyPosition({ - start: right.start, - end: right.end - }) + - ') is open' - ) - } else { - throw new Error( - 'Cannot close document, a token (`' + - right.type + - '`, ' + - stringifyPosition({ - start: right.start, - end: right.end - }) + - ') is still open' - ) - } -} - -// EXTERNAL MODULE: ./node_modules/ts-dedent/esm/index.js -var esm = __webpack_require__(60513); -;// CONCATENATED MODULE: ./node_modules/mermaid/dist/createText-2e5e7dd3.js - - - -function preprocessMarkdown(markdown) { - const withoutMultipleNewlines = markdown.replace(/\n{2,}/g, "\n"); - const withoutExtraSpaces = (0,esm/* dedent */.T)(withoutMultipleNewlines); - return withoutExtraSpaces; -} -function markdownToLines(markdown) { - const preprocessedMarkdown = preprocessMarkdown(markdown); - const { children } = fromMarkdown(preprocessedMarkdown); - const lines = [[]]; - let currentLine = 0; - function processNode(node, parentType = "normal") { - if (node.type === "text") { - const textLines = node.value.split("\n"); - textLines.forEach((textLine, index) => { - if (index !== 0) { - currentLine++; - lines.push([]); - } - textLine.split(" ").forEach((word) => { - if (word) { - lines[currentLine].push({ content: word, type: parentType }); - } - }); - }); - } else if (node.type === "strong" || node.type === "emphasis") { - node.children.forEach((contentNode) => { - processNode(contentNode, node.type); - }); - } - } - children.forEach((treeNode) => { - if (treeNode.type === "paragraph") { - treeNode.children.forEach((contentNode) => { - processNode(contentNode); - }); - } - }); - return lines; -} -function markdownToHTML(markdown) { - const { children } = fromMarkdown(markdown); - function output(node) { - if (node.type === "text") { - return node.value.replace(/\n/g, "
"); - } else if (node.type === "strong") { - return `${node.children.map(output).join("")}`; - } else if (node.type === "emphasis") { - return `${node.children.map(output).join("")}`; - } else if (node.type === "paragraph") { - return `

${node.children.map(output).join("")}

`; - } - return `Unsupported markdown: ${node.type}`; - } - return children.map(output).join(""); -} -function splitTextToChars(text) { - if (Intl.Segmenter) { - return [...new Intl.Segmenter().segment(text)].map((s) => s.segment); - } - return [...text]; -} -function splitWordToFitWidth(checkFit, word) { - const characters = splitTextToChars(word.content); - return splitWordToFitWidthRecursion(checkFit, [], characters, word.type); -} -function splitWordToFitWidthRecursion(checkFit, usedChars, remainingChars, type) { - if (remainingChars.length === 0) { - return [ - { content: usedChars.join(""), type }, - { content: "", type } - ]; - } - const [nextChar, ...rest] = remainingChars; - const newWord = [...usedChars, nextChar]; - if (checkFit([{ content: newWord.join(""), type }])) { - return splitWordToFitWidthRecursion(checkFit, newWord, rest, type); - } - if (usedChars.length === 0 && nextChar) { - usedChars.push(nextChar); - remainingChars.shift(); - } - return [ - { content: usedChars.join(""), type }, - { content: remainingChars.join(""), type } - ]; -} -function splitLineToFitWidth(line, checkFit) { - if (line.some(({ content }) => content.includes("\n"))) { - throw new Error("splitLineToFitWidth does not support newlines in the line"); - } - return splitLineToFitWidthRecursion(line, checkFit); -} -function splitLineToFitWidthRecursion(words, checkFit, lines = [], newLine = []) { - if (words.length === 0) { - if (newLine.length > 0) { - lines.push(newLine); - } - return lines.length > 0 ? lines : []; - } - let joiner = ""; - if (words[0].content === " ") { - joiner = " "; - words.shift(); - } - const nextWord = words.shift() ?? { content: " ", type: "normal" }; - const lineWithNextWord = [...newLine]; - if (joiner !== "") { - lineWithNextWord.push({ content: joiner, type: "normal" }); - } - lineWithNextWord.push(nextWord); - if (checkFit(lineWithNextWord)) { - return splitLineToFitWidthRecursion(words, checkFit, lines, lineWithNextWord); - } - if (newLine.length > 0) { - lines.push(newLine); - words.unshift(nextWord); - } else if (nextWord.content) { - const [line, rest] = splitWordToFitWidth(checkFit, nextWord); - lines.push([line]); - if (rest.content) { - words.unshift(rest); - } - } - return splitLineToFitWidthRecursion(words, checkFit, lines); -} -function applyStyle(dom, styleFn) { - if (styleFn) { - dom.attr("style", styleFn); - } -} -function addHtmlSpan(element, node, width, classes, addBackground = false) { - const fo = element.append("foreignObject"); - const div = fo.append("xhtml:div"); - const label = node.label; - const labelClass = node.isNode ? "nodeLabel" : "edgeLabel"; - div.html( - ` - " + label + "" - ); - applyStyle(div, node.labelStyle); - div.style("display", "table-cell"); - div.style("white-space", "nowrap"); - div.style("max-width", width + "px"); - div.attr("xmlns", "http://www.w3.org/1999/xhtml"); - if (addBackground) { - div.attr("class", "labelBkg"); - } - let bbox = div.node().getBoundingClientRect(); - if (bbox.width === width) { - div.style("display", "table"); - div.style("white-space", "break-spaces"); - div.style("width", width + "px"); - bbox = div.node().getBoundingClientRect(); - } - fo.style("width", bbox.width); - fo.style("height", bbox.height); - return fo.node(); -} -function createTspan(textElement, lineIndex, lineHeight) { - return textElement.append("tspan").attr("class", "text-outer-tspan").attr("x", 0).attr("y", lineIndex * lineHeight - 0.1 + "em").attr("dy", lineHeight + "em"); -} -function computeWidthOfText(parentNode, lineHeight, line) { - const testElement = parentNode.append("text"); - const testSpan = createTspan(testElement, 1, lineHeight); - updateTextContentAndStyles(testSpan, line); - const textLength = testSpan.node().getComputedTextLength(); - testElement.remove(); - return textLength; -} -function computeDimensionOfText(parentNode, lineHeight, text) { - var _a; - const testElement = parentNode.append("text"); - const testSpan = createTspan(testElement, 1, lineHeight); - updateTextContentAndStyles(testSpan, [{ content: text, type: "normal" }]); - const textDimension = (_a = testSpan.node()) == null ? void 0 : _a.getBoundingClientRect(); - if (textDimension) { - testElement.remove(); - } - return textDimension; -} -function createFormattedText(width, g, structuredText, addBackground = false) { - const lineHeight = 1.1; - const labelGroup = g.append("g"); - const bkg = labelGroup.insert("rect").attr("class", "background"); - const textElement = labelGroup.append("text").attr("y", "-10.1"); - let lineIndex = 0; - for (const line of structuredText) { - const checkWidth = (line2) => computeWidthOfText(labelGroup, lineHeight, line2) <= width; - const linesUnderWidth = checkWidth(line) ? [line] : splitLineToFitWidth(line, checkWidth); - for (const preparedLine of linesUnderWidth) { - const tspan = createTspan(textElement, lineIndex, lineHeight); - updateTextContentAndStyles(tspan, preparedLine); - lineIndex++; - } - } - if (addBackground) { - const bbox = textElement.node().getBBox(); - const padding = 2; - bkg.attr("x", -padding).attr("y", -padding).attr("width", bbox.width + 2 * padding).attr("height", bbox.height + 2 * padding); - return labelGroup.node(); - } else { - return textElement.node(); - } -} -function updateTextContentAndStyles(tspan, wrappedLine) { - tspan.text(""); - wrappedLine.forEach((word, index) => { - const innerTspan = tspan.append("tspan").attr("font-style", word.type === "emphasis" ? "italic" : "normal").attr("class", "text-inner-tspan").attr("font-weight", word.type === "strong" ? "bold" : "normal"); - if (index === 0) { - innerTspan.text(word.content); - } else { - innerTspan.text(" " + word.content); - } - }); -} -const createText = (el, text = "", { - style = "", - isTitle = false, - classes = "", - useHtmlLabels = true, - isNode = true, - width = 200, - addSvgBackground = false -} = {}) => { - mermaid_b5860b54.l.info("createText", text, style, isTitle, classes, useHtmlLabels, isNode, addSvgBackground); - if (useHtmlLabels) { - const htmlText = markdownToHTML(text); - const node = { - isNode, - label: (0,mermaid_b5860b54.M)(htmlText).replace( - /fa[blrs]?:fa-[\w-]+/g, - // cspell: disable-line - (s) => `` - ), - labelStyle: style.replace("fill:", "color:") - }; - const vertexNode = addHtmlSpan(el, node, width, classes, addSvgBackground); - return vertexNode; - } else { - const structuredText = markdownToLines(text); - const svgLabel = createFormattedText(width, el, structuredText, addSvgBackground); - return svgLabel; - } -}; - - - -/***/ }), - -/***/ 88146: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ a: () => (/* binding */ insertMarkers$1), -/* harmony export */ b: () => (/* binding */ clear$1), -/* harmony export */ c: () => (/* binding */ createLabel$1), -/* harmony export */ d: () => (/* binding */ clear), -/* harmony export */ e: () => (/* binding */ insertNode), -/* harmony export */ f: () => (/* binding */ insertEdgeLabel), -/* harmony export */ g: () => (/* binding */ getSubGraphTitleMargins), -/* harmony export */ h: () => (/* binding */ insertEdge), -/* harmony export */ i: () => (/* binding */ intersectRect$1), -/* harmony export */ j: () => (/* binding */ positionEdgeLabel), -/* harmony export */ k: () => (/* binding */ getLineFunctionsWithOffset), -/* harmony export */ l: () => (/* binding */ labelHelper), -/* harmony export */ m: () => (/* binding */ addEdgeMarkers), -/* harmony export */ p: () => (/* binding */ positionNode), -/* harmony export */ s: () => (/* binding */ setNodeElem), -/* harmony export */ u: () => (/* binding */ updateNodeBounds) -/* harmony export */ }); -/* harmony import */ var _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(86079); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(26312); -/* harmony import */ var _createText_2e5e7dd3_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(73743); - - - -const insertMarkers = (elem, markerArray, type, id) => { - markerArray.forEach((markerName) => { - markers[markerName](elem, type, id); - }); -}; -const extension = (elem, type, id) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.trace("Making markers for ", id); - elem.append("defs").append("marker").attr("id", id + "_" + type + "-extensionStart").attr("class", "marker extension " + type).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 1,7 L18,13 V 1 Z"); - elem.append("defs").append("marker").attr("id", id + "_" + type + "-extensionEnd").attr("class", "marker extension " + type).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 1,1 V 13 L18,7 Z"); -}; -const composition = (elem, type, id) => { - elem.append("defs").append("marker").attr("id", id + "_" + type + "-compositionStart").attr("class", "marker composition " + type).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"); - elem.append("defs").append("marker").attr("id", id + "_" + type + "-compositionEnd").attr("class", "marker composition " + type).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"); -}; -const aggregation = (elem, type, id) => { - elem.append("defs").append("marker").attr("id", id + "_" + type + "-aggregationStart").attr("class", "marker aggregation " + type).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"); - elem.append("defs").append("marker").attr("id", id + "_" + type + "-aggregationEnd").attr("class", "marker aggregation " + type).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"); -}; -const dependency = (elem, type, id) => { - elem.append("defs").append("marker").attr("id", id + "_" + type + "-dependencyStart").attr("class", "marker dependency " + type).attr("refX", 6).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 5,7 L9,13 L1,7 L9,1 Z"); - elem.append("defs").append("marker").attr("id", id + "_" + type + "-dependencyEnd").attr("class", "marker dependency " + type).attr("refX", 13).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z"); -}; -const lollipop = (elem, type, id) => { - elem.append("defs").append("marker").attr("id", id + "_" + type + "-lollipopStart").attr("class", "marker lollipop " + type).attr("refX", 13).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("circle").attr("stroke", "black").attr("fill", "transparent").attr("cx", 7).attr("cy", 7).attr("r", 6); - elem.append("defs").append("marker").attr("id", id + "_" + type + "-lollipopEnd").attr("class", "marker lollipop " + type).attr("refX", 1).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("circle").attr("stroke", "black").attr("fill", "transparent").attr("cx", 7).attr("cy", 7).attr("r", 6); -}; -const point = (elem, type, id) => { - elem.append("marker").attr("id", id + "_" + type + "-pointEnd").attr("class", "marker " + type).attr("viewBox", "0 0 10 10").attr("refX", 6).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"); - elem.append("marker").attr("id", id + "_" + type + "-pointStart").attr("class", "marker " + type).attr("viewBox", "0 0 10 10").attr("refX", 4.5).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 5 L 10 10 L 10 0 z").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"); -}; -const circle$1 = (elem, type, id) => { - elem.append("marker").attr("id", id + "_" + type + "-circleEnd").attr("class", "marker " + type).attr("viewBox", "0 0 10 10").attr("refX", 11).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"); - elem.append("marker").attr("id", id + "_" + type + "-circleStart").attr("class", "marker " + type).attr("viewBox", "0 0 10 10").attr("refX", -1).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"); -}; -const cross = (elem, type, id) => { - elem.append("marker").attr("id", id + "_" + type + "-crossEnd").attr("class", "marker cross " + type).attr("viewBox", "0 0 11 11").attr("refX", 12).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0"); - elem.append("marker").attr("id", id + "_" + type + "-crossStart").attr("class", "marker cross " + type).attr("viewBox", "0 0 11 11").attr("refX", -1).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0"); -}; -const barb = (elem, type, id) => { - elem.append("defs").append("marker").attr("id", id + "_" + type + "-barbEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 14).attr("markerUnits", "strokeWidth").attr("orient", "auto").append("path").attr("d", "M 19,7 L9,13 L14,7 L9,1 Z"); -}; -const markers = { - extension, - composition, - aggregation, - dependency, - lollipop, - point, - circle: circle$1, - cross, - barb -}; -const insertMarkers$1 = insertMarkers; -function applyStyle(dom, styleFn) { - if (styleFn) { - dom.attr("style", styleFn); - } -} -function addHtmlLabel(node) { - const fo = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(document.createElementNS("http://www.w3.org/2000/svg", "foreignObject")); - const div = fo.append("xhtml:div"); - const label = node.label; - const labelClass = node.isNode ? "nodeLabel" : "edgeLabel"; - div.html( - '" + label + "" - ); - applyStyle(div, node.labelStyle); - div.style("display", "inline-block"); - div.style("white-space", "nowrap"); - div.attr("xmlns", "http://www.w3.org/1999/xhtml"); - return fo.node(); -} -const createLabel = (_vertexText, style, isTitle, isNode) => { - let vertexText = _vertexText || ""; - if (typeof vertexText === "object") { - vertexText = vertexText[0]; - } - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { - vertexText = vertexText.replace(/\\n|\n/g, "
"); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("vertexText" + vertexText); - const node = { - isNode, - label: (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.M)(vertexText).replace( - /fa[blrs]?:fa-[\w-]+/g, - // cspell: disable-line - (s) => `` - ), - labelStyle: style.replace("fill:", "color:") - }; - let vertexNode = addHtmlLabel(node); - return vertexNode; - } else { - const svgLabel = document.createElementNS("http://www.w3.org/2000/svg", "text"); - svgLabel.setAttribute("style", style.replace("color:", "fill:")); - let rows = []; - if (typeof vertexText === "string") { - rows = vertexText.split(/\\n|\n|/gi); - } else if (Array.isArray(vertexText)) { - rows = vertexText; - } else { - rows = []; - } - for (const row of rows) { - const tspan = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); - tspan.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"); - tspan.setAttribute("dy", "1em"); - tspan.setAttribute("x", "0"); - if (isTitle) { - tspan.setAttribute("class", "title-row"); - } else { - tspan.setAttribute("class", "row"); - } - tspan.textContent = row.trim(); - svgLabel.appendChild(tspan); - } - return svgLabel; - } -}; -const createLabel$1 = createLabel; -const labelHelper = async (parent, node, _classes, isNode) => { - let classes; - const useHtmlLabels = node.useHtmlLabels || (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels); - if (!_classes) { - classes = "node default"; - } else { - classes = _classes; - } - const shapeSvg = parent.insert("g").attr("class", classes).attr("id", node.domId || node.id); - const label = shapeSvg.insert("g").attr("class", "label").attr("style", node.labelStyle); - let labelText; - if (node.labelText === void 0) { - labelText = ""; - } else { - labelText = typeof node.labelText === "string" ? node.labelText : node.labelText[0]; - } - const textNode = label.node(); - let text; - if (node.labelType === "markdown") { - text = (0,_createText_2e5e7dd3_js__WEBPACK_IMPORTED_MODULE_2__.a)(label, (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.d)((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.M)(labelText), (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)()), { - useHtmlLabels, - width: node.width || (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.wrappingWidth, - classes: "markdown-node-label" - }); - } else { - text = textNode.appendChild( - createLabel$1( - (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.d)((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.M)(labelText), (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)()), - node.labelStyle, - false, - isNode - ) - ); - } - let bbox = text.getBBox(); - const halfPadding = node.padding / 2; - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { - const div = text.children[0]; - const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(text); - const images = div.getElementsByTagName("img"); - if (images) { - const noImgText = labelText.replace(/]*>/g, "").trim() === ""; - await Promise.all( - [...images].map( - (img) => new Promise((res) => { - function setupImage() { - img.style.display = "flex"; - img.style.flexDirection = "column"; - if (noImgText) { - const bodyFontSize = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().fontSize ? (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().fontSize : window.getComputedStyle(document.body).fontSize; - const enlargingFactor = 5; - const width = parseInt(bodyFontSize, 10) * enlargingFactor + "px"; - img.style.minWidth = width; - img.style.maxWidth = width; - } else { - img.style.width = "100%"; - } - res(img); - } - setTimeout(() => { - if (img.complete) { - setupImage(); - } - }); - img.addEventListener("error", setupImage); - img.addEventListener("load", setupImage); - }) - ) - ); - } - bbox = div.getBoundingClientRect(); - dv.attr("width", bbox.width); - dv.attr("height", bbox.height); - } - if (useHtmlLabels) { - label.attr("transform", "translate(" + -bbox.width / 2 + ", " + -bbox.height / 2 + ")"); - } else { - label.attr("transform", "translate(0, " + -bbox.height / 2 + ")"); - } - if (node.centerLabel) { - label.attr("transform", "translate(" + -bbox.width / 2 + ", " + -bbox.height / 2 + ")"); - } - label.insert("rect", ":first-child"); - return { shapeSvg, bbox, halfPadding, label }; -}; -const updateNodeBounds = (node, element) => { - const bbox = element.node().getBBox(); - node.width = bbox.width; - node.height = bbox.height; -}; -function insertPolygonShape(parent, w, h, points) { - return parent.insert("polygon", ":first-child").attr( - "points", - points.map(function(d) { - return d.x + "," + d.y; - }).join(" ") - ).attr("class", "label-container").attr("transform", "translate(" + -w / 2 + "," + h / 2 + ")"); -} -function intersectNode(node, point2) { - return node.intersect(point2); -} -function intersectEllipse(node, rx, ry, point2) { - var cx = node.x; - var cy = node.y; - var px = cx - point2.x; - var py = cy - point2.y; - var det = Math.sqrt(rx * rx * py * py + ry * ry * px * px); - var dx = Math.abs(rx * ry * px / det); - if (point2.x < cx) { - dx = -dx; - } - var dy = Math.abs(rx * ry * py / det); - if (point2.y < cy) { - dy = -dy; - } - return { x: cx + dx, y: cy + dy }; -} -function intersectCircle(node, rx, point2) { - return intersectEllipse(node, rx, rx, point2); -} -function intersectLine(p1, p2, q1, q2) { - var a1, a2, b1, b2, c1, c2; - var r1, r2, r3, r4; - var denom, offset, num; - var x, y; - a1 = p2.y - p1.y; - b1 = p1.x - p2.x; - c1 = p2.x * p1.y - p1.x * p2.y; - r3 = a1 * q1.x + b1 * q1.y + c1; - r4 = a1 * q2.x + b1 * q2.y + c1; - if (r3 !== 0 && r4 !== 0 && sameSign(r3, r4)) { - return; - } - a2 = q2.y - q1.y; - b2 = q1.x - q2.x; - c2 = q2.x * q1.y - q1.x * q2.y; - r1 = a2 * p1.x + b2 * p1.y + c2; - r2 = a2 * p2.x + b2 * p2.y + c2; - if (r1 !== 0 && r2 !== 0 && sameSign(r1, r2)) { - return; - } - denom = a1 * b2 - a2 * b1; - if (denom === 0) { - return; - } - offset = Math.abs(denom / 2); - num = b1 * c2 - b2 * c1; - x = num < 0 ? (num - offset) / denom : (num + offset) / denom; - num = a2 * c1 - a1 * c2; - y = num < 0 ? (num - offset) / denom : (num + offset) / denom; - return { x, y }; -} -function sameSign(r1, r2) { - return r1 * r2 > 0; -} -function intersectPolygon(node, polyPoints, point2) { - var x1 = node.x; - var y1 = node.y; - var intersections = []; - var minX = Number.POSITIVE_INFINITY; - var minY = Number.POSITIVE_INFINITY; - if (typeof polyPoints.forEach === "function") { - polyPoints.forEach(function(entry) { - minX = Math.min(minX, entry.x); - minY = Math.min(minY, entry.y); - }); - } else { - minX = Math.min(minX, polyPoints.x); - minY = Math.min(minY, polyPoints.y); - } - var left = x1 - node.width / 2 - minX; - var top = y1 - node.height / 2 - minY; - for (var i = 0; i < polyPoints.length; i++) { - var p1 = polyPoints[i]; - var p2 = polyPoints[i < polyPoints.length - 1 ? i + 1 : 0]; - var intersect2 = intersectLine( - node, - point2, - { x: left + p1.x, y: top + p1.y }, - { x: left + p2.x, y: top + p2.y } - ); - if (intersect2) { - intersections.push(intersect2); - } - } - if (!intersections.length) { - return node; - } - if (intersections.length > 1) { - intersections.sort(function(p, q) { - var pdx = p.x - point2.x; - var pdy = p.y - point2.y; - var distp = Math.sqrt(pdx * pdx + pdy * pdy); - var qdx = q.x - point2.x; - var qdy = q.y - point2.y; - var distq = Math.sqrt(qdx * qdx + qdy * qdy); - return distp < distq ? -1 : distp === distq ? 0 : 1; - }); - } - return intersections[0]; -} -const intersectRect = (node, point2) => { - var x = node.x; - var y = node.y; - var dx = point2.x - x; - var dy = point2.y - y; - var w = node.width / 2; - var h = node.height / 2; - var sx, sy; - if (Math.abs(dy) * w > Math.abs(dx) * h) { - if (dy < 0) { - h = -h; - } - sx = dy === 0 ? 0 : h * dx / dy; - sy = h; - } else { - if (dx < 0) { - w = -w; - } - sx = w; - sy = dx === 0 ? 0 : w * dy / dx; - } - return { x: x + sx, y: y + sy }; -}; -const intersectRect$1 = intersectRect; -const intersect = { - node: intersectNode, - circle: intersectCircle, - ellipse: intersectEllipse, - polygon: intersectPolygon, - rect: intersectRect$1 -}; -const note = async (parent, node) => { - const useHtmlLabels = node.useHtmlLabels || (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels; - if (!useHtmlLabels) { - node.centerLabel = true; - } - const { shapeSvg, bbox, halfPadding } = await labelHelper( - parent, - node, - "node " + node.classes, - true - ); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Classes = ", node.classes); - const rect2 = shapeSvg.insert("rect", ":first-child"); - rect2.attr("rx", node.rx).attr("ry", node.ry).attr("x", -bbox.width / 2 - halfPadding).attr("y", -bbox.height / 2 - halfPadding).attr("width", bbox.width + node.padding).attr("height", bbox.height + node.padding); - updateNodeBounds(node, rect2); - node.intersect = function(point2) { - return intersect.rect(node, point2); - }; - return shapeSvg; -}; -const note$1 = note; -const expandAndDeduplicateDirections = (directions) => { - const uniqueDirections = /* @__PURE__ */ new Set(); - for (const direction of directions) { - switch (direction) { - case "x": - uniqueDirections.add("right"); - uniqueDirections.add("left"); - break; - case "y": - uniqueDirections.add("up"); - uniqueDirections.add("down"); - break; - default: - uniqueDirections.add(direction); - break; - } - } - return uniqueDirections; -}; -const getArrowPoints = (duplicatedDirections, bbox, node) => { - const directions = expandAndDeduplicateDirections(duplicatedDirections); - const f = 2; - const height = bbox.height + 2 * node.padding; - const midpoint = height / f; - const width = bbox.width + 2 * midpoint + node.padding; - const padding = node.padding / 2; - if (directions.has("right") && directions.has("left") && directions.has("up") && directions.has("down")) { - return [ - // Bottom - { x: 0, y: 0 }, - { x: midpoint, y: 0 }, - { x: width / 2, y: 2 * padding }, - { x: width - midpoint, y: 0 }, - { x: width, y: 0 }, - // Right - { x: width, y: -height / 3 }, - { x: width + 2 * padding, y: -height / 2 }, - { x: width, y: -2 * height / 3 }, - { x: width, y: -height }, - // Top - { x: width - midpoint, y: -height }, - { x: width / 2, y: -height - 2 * padding }, - { x: midpoint, y: -height }, - // Left - { x: 0, y: -height }, - { x: 0, y: -2 * height / 3 }, - { x: -2 * padding, y: -height / 2 }, - { x: 0, y: -height / 3 } - ]; - } - if (directions.has("right") && directions.has("left") && directions.has("up")) { - return [ - { x: midpoint, y: 0 }, - { x: width - midpoint, y: 0 }, - { x: width, y: -height / 2 }, - { x: width - midpoint, y: -height }, - { x: midpoint, y: -height }, - { x: 0, y: -height / 2 } - ]; - } - if (directions.has("right") && directions.has("left") && directions.has("down")) { - return [ - { x: 0, y: 0 }, - { x: midpoint, y: -height }, - { x: width - midpoint, y: -height }, - { x: width, y: 0 } - ]; - } - if (directions.has("right") && directions.has("up") && directions.has("down")) { - return [ - { x: 0, y: 0 }, - { x: width, y: -midpoint }, - { x: width, y: -height + midpoint }, - { x: 0, y: -height } - ]; - } - if (directions.has("left") && directions.has("up") && directions.has("down")) { - return [ - { x: width, y: 0 }, - { x: 0, y: -midpoint }, - { x: 0, y: -height + midpoint }, - { x: width, y: -height } - ]; - } - if (directions.has("right") && directions.has("left")) { - return [ - { x: midpoint, y: 0 }, - { x: midpoint, y: -padding }, - { x: width - midpoint, y: -padding }, - { x: width - midpoint, y: 0 }, - { x: width, y: -height / 2 }, - { x: width - midpoint, y: -height }, - { x: width - midpoint, y: -height + padding }, - { x: midpoint, y: -height + padding }, - { x: midpoint, y: -height }, - { x: 0, y: -height / 2 } - ]; - } - if (directions.has("up") && directions.has("down")) { - return [ - // Bottom center - { x: width / 2, y: 0 }, - // Left pont of bottom arrow - { x: 0, y: -padding }, - { x: midpoint, y: -padding }, - // Left top over vertical section - { x: midpoint, y: -height + padding }, - { x: 0, y: -height + padding }, - // Top of arrow - { x: width / 2, y: -height }, - { x: width, y: -height + padding }, - // Top of right vertical bar - { x: width - midpoint, y: -height + padding }, - { x: width - midpoint, y: -padding }, - { x: width, y: -padding } - ]; - } - if (directions.has("right") && directions.has("up")) { - return [ - { x: 0, y: 0 }, - { x: width, y: -midpoint }, - { x: 0, y: -height } - ]; - } - if (directions.has("right") && directions.has("down")) { - return [ - { x: 0, y: 0 }, - { x: width, y: 0 }, - { x: 0, y: -height } - ]; - } - if (directions.has("left") && directions.has("up")) { - return [ - { x: width, y: 0 }, - { x: 0, y: -midpoint }, - { x: width, y: -height } - ]; - } - if (directions.has("left") && directions.has("down")) { - return [ - { x: width, y: 0 }, - { x: 0, y: 0 }, - { x: width, y: -height } - ]; - } - if (directions.has("right")) { - return [ - { x: midpoint, y: -padding }, - { x: midpoint, y: -padding }, - { x: width - midpoint, y: -padding }, - { x: width - midpoint, y: 0 }, - { x: width, y: -height / 2 }, - { x: width - midpoint, y: -height }, - { x: width - midpoint, y: -height + padding }, - // top left corner of arrow - { x: midpoint, y: -height + padding }, - { x: midpoint, y: -height + padding } - ]; - } - if (directions.has("left")) { - return [ - { x: midpoint, y: 0 }, - { x: midpoint, y: -padding }, - // Two points, the right corners - { x: width - midpoint, y: -padding }, - { x: width - midpoint, y: -height + padding }, - { x: midpoint, y: -height + padding }, - { x: midpoint, y: -height }, - { x: 0, y: -height / 2 } - ]; - } - if (directions.has("up")) { - return [ - // Bottom center - { x: midpoint, y: -padding }, - // Left top over vertical section - { x: midpoint, y: -height + padding }, - { x: 0, y: -height + padding }, - // Top of arrow - { x: width / 2, y: -height }, - { x: width, y: -height + padding }, - // Top of right vertical bar - { x: width - midpoint, y: -height + padding }, - { x: width - midpoint, y: -padding } - ]; - } - if (directions.has("down")) { - return [ - // Bottom center - { x: width / 2, y: 0 }, - // Left pont of bottom arrow - { x: 0, y: -padding }, - { x: midpoint, y: -padding }, - // Left top over vertical section - { x: midpoint, y: -height + padding }, - { x: width - midpoint, y: -height + padding }, - { x: width - midpoint, y: -padding }, - { x: width, y: -padding } - ]; - } - return [{ x: 0, y: 0 }]; -}; -const formatClass = (str) => { - if (str) { - return " " + str; - } - return ""; -}; -const getClassesFromNode = (node, otherClasses) => { - return `${otherClasses ? otherClasses : "node default"}${formatClass(node.classes)} ${formatClass( - node.class - )}`; -}; -const question = async (parent, node) => { - const { shapeSvg, bbox } = await labelHelper( - parent, - node, - getClassesFromNode(node, void 0), - true - ); - const w = bbox.width + node.padding; - const h = bbox.height + node.padding; - const s = w + h; - const points = [ - { x: s / 2, y: 0 }, - { x: s, y: -s / 2 }, - { x: s / 2, y: -s }, - { x: 0, y: -s / 2 } - ]; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Question main (Circle)"); - const questionElem = insertPolygonShape(shapeSvg, s, s, points); - questionElem.attr("style", node.style); - updateNodeBounds(node, questionElem); - node.intersect = function(point2) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.warn("Intersect called"); - return intersect.polygon(node, points, point2); - }; - return shapeSvg; -}; -const choice = (parent, node) => { - const shapeSvg = parent.insert("g").attr("class", "node default").attr("id", node.domId || node.id); - const s = 28; - const points = [ - { x: 0, y: s / 2 }, - { x: s / 2, y: 0 }, - { x: 0, y: -s / 2 }, - { x: -s / 2, y: 0 } - ]; - const choice2 = shapeSvg.insert("polygon", ":first-child").attr( - "points", - points.map(function(d) { - return d.x + "," + d.y; - }).join(" ") - ); - choice2.attr("class", "state-start").attr("r", 7).attr("width", 28).attr("height", 28); - node.width = 28; - node.height = 28; - node.intersect = function(point2) { - return intersect.circle(node, 14, point2); - }; - return shapeSvg; -}; -const hexagon = async (parent, node) => { - const { shapeSvg, bbox } = await labelHelper( - parent, - node, - getClassesFromNode(node, void 0), - true - ); - const f = 4; - const h = bbox.height + node.padding; - const m = h / f; - const w = bbox.width + 2 * m + node.padding; - const points = [ - { x: m, y: 0 }, - { x: w - m, y: 0 }, - { x: w, y: -h / 2 }, - { x: w - m, y: -h }, - { x: m, y: -h }, - { x: 0, y: -h / 2 } - ]; - const hex = insertPolygonShape(shapeSvg, w, h, points); - hex.attr("style", node.style); - updateNodeBounds(node, hex); - node.intersect = function(point2) { - return intersect.polygon(node, points, point2); - }; - return shapeSvg; -}; -const block_arrow = async (parent, node) => { - const { shapeSvg, bbox } = await labelHelper(parent, node, void 0, true); - const f = 2; - const h = bbox.height + 2 * node.padding; - const m = h / f; - const w = bbox.width + 2 * m + node.padding; - const points = getArrowPoints(node.directions, bbox, node); - const blockArrow = insertPolygonShape(shapeSvg, w, h, points); - blockArrow.attr("style", node.style); - updateNodeBounds(node, blockArrow); - node.intersect = function(point2) { - return intersect.polygon(node, points, point2); - }; - return shapeSvg; -}; -const rect_left_inv_arrow = async (parent, node) => { - const { shapeSvg, bbox } = await labelHelper( - parent, - node, - getClassesFromNode(node, void 0), - true - ); - const w = bbox.width + node.padding; - const h = bbox.height + node.padding; - const points = [ - { x: -h / 2, y: 0 }, - { x: w, y: 0 }, - { x: w, y: -h }, - { x: -h / 2, y: -h }, - { x: 0, y: -h / 2 } - ]; - const el = insertPolygonShape(shapeSvg, w, h, points); - el.attr("style", node.style); - node.width = w + h; - node.height = h; - node.intersect = function(point2) { - return intersect.polygon(node, points, point2); - }; - return shapeSvg; -}; -const lean_right = async (parent, node) => { - const { shapeSvg, bbox } = await labelHelper(parent, node, getClassesFromNode(node), true); - const w = bbox.width + node.padding; - const h = bbox.height + node.padding; - const points = [ - { x: -2 * h / 6, y: 0 }, - { x: w - h / 6, y: 0 }, - { x: w + 2 * h / 6, y: -h }, - { x: h / 6, y: -h } - ]; - const el = insertPolygonShape(shapeSvg, w, h, points); - el.attr("style", node.style); - updateNodeBounds(node, el); - node.intersect = function(point2) { - return intersect.polygon(node, points, point2); - }; - return shapeSvg; -}; -const lean_left = async (parent, node) => { - const { shapeSvg, bbox } = await labelHelper( - parent, - node, - getClassesFromNode(node, void 0), - true - ); - const w = bbox.width + node.padding; - const h = bbox.height + node.padding; - const points = [ - { x: 2 * h / 6, y: 0 }, - { x: w + h / 6, y: 0 }, - { x: w - 2 * h / 6, y: -h }, - { x: -h / 6, y: -h } - ]; - const el = insertPolygonShape(shapeSvg, w, h, points); - el.attr("style", node.style); - updateNodeBounds(node, el); - node.intersect = function(point2) { - return intersect.polygon(node, points, point2); - }; - return shapeSvg; -}; -const trapezoid = async (parent, node) => { - const { shapeSvg, bbox } = await labelHelper( - parent, - node, - getClassesFromNode(node, void 0), - true - ); - const w = bbox.width + node.padding; - const h = bbox.height + node.padding; - const points = [ - { x: -2 * h / 6, y: 0 }, - { x: w + 2 * h / 6, y: 0 }, - { x: w - h / 6, y: -h }, - { x: h / 6, y: -h } - ]; - const el = insertPolygonShape(shapeSvg, w, h, points); - el.attr("style", node.style); - updateNodeBounds(node, el); - node.intersect = function(point2) { - return intersect.polygon(node, points, point2); - }; - return shapeSvg; -}; -const inv_trapezoid = async (parent, node) => { - const { shapeSvg, bbox } = await labelHelper( - parent, - node, - getClassesFromNode(node, void 0), - true - ); - const w = bbox.width + node.padding; - const h = bbox.height + node.padding; - const points = [ - { x: h / 6, y: 0 }, - { x: w - h / 6, y: 0 }, - { x: w + 2 * h / 6, y: -h }, - { x: -2 * h / 6, y: -h } - ]; - const el = insertPolygonShape(shapeSvg, w, h, points); - el.attr("style", node.style); - updateNodeBounds(node, el); - node.intersect = function(point2) { - return intersect.polygon(node, points, point2); - }; - return shapeSvg; -}; -const rect_right_inv_arrow = async (parent, node) => { - const { shapeSvg, bbox } = await labelHelper( - parent, - node, - getClassesFromNode(node, void 0), - true - ); - const w = bbox.width + node.padding; - const h = bbox.height + node.padding; - const points = [ - { x: 0, y: 0 }, - { x: w + h / 2, y: 0 }, - { x: w, y: -h / 2 }, - { x: w + h / 2, y: -h }, - { x: 0, y: -h } - ]; - const el = insertPolygonShape(shapeSvg, w, h, points); - el.attr("style", node.style); - updateNodeBounds(node, el); - node.intersect = function(point2) { - return intersect.polygon(node, points, point2); - }; - return shapeSvg; -}; -const cylinder = async (parent, node) => { - const { shapeSvg, bbox } = await labelHelper( - parent, - node, - getClassesFromNode(node, void 0), - true - ); - const w = bbox.width + node.padding; - const rx = w / 2; - const ry = rx / (2.5 + w / 50); - const h = bbox.height + ry + node.padding; - const shape = "M 0," + ry + " a " + rx + "," + ry + " 0,0,0 " + w + " 0 a " + rx + "," + ry + " 0,0,0 " + -w + " 0 l 0," + h + " a " + rx + "," + ry + " 0,0,0 " + w + " 0 l 0," + -h; - const el = shapeSvg.attr("label-offset-y", ry).insert("path", ":first-child").attr("style", node.style).attr("d", shape).attr("transform", "translate(" + -w / 2 + "," + -(h / 2 + ry) + ")"); - updateNodeBounds(node, el); - node.intersect = function(point2) { - const pos = intersect.rect(node, point2); - const x = pos.x - node.x; - if (rx != 0 && (Math.abs(x) < node.width / 2 || Math.abs(x) == node.width / 2 && Math.abs(pos.y - node.y) > node.height / 2 - ry)) { - let y = ry * ry * (1 - x * x / (rx * rx)); - if (y != 0) { - y = Math.sqrt(y); - } - y = ry - y; - if (point2.y - node.y > 0) { - y = -y; - } - pos.y += y; - } - return pos; - }; - return shapeSvg; -}; -const rect = async (parent, node) => { - const { shapeSvg, bbox, halfPadding } = await labelHelper( - parent, - node, - "node " + node.classes + " " + node.class, - true - ); - const rect2 = shapeSvg.insert("rect", ":first-child"); - const totalWidth = node.positioned ? node.width : bbox.width + node.padding; - const totalHeight = node.positioned ? node.height : bbox.height + node.padding; - const x = node.positioned ? -totalWidth / 2 : -bbox.width / 2 - halfPadding; - const y = node.positioned ? -totalHeight / 2 : -bbox.height / 2 - halfPadding; - rect2.attr("class", "basic label-container").attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("x", x).attr("y", y).attr("width", totalWidth).attr("height", totalHeight); - if (node.props) { - const propKeys = new Set(Object.keys(node.props)); - if (node.props.borders) { - applyNodePropertyBorders(rect2, node.props.borders, totalWidth, totalHeight); - propKeys.delete("borders"); - } - propKeys.forEach((propKey) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.warn(`Unknown node property ${propKey}`); - }); - } - updateNodeBounds(node, rect2); - node.intersect = function(point2) { - return intersect.rect(node, point2); - }; - return shapeSvg; -}; -const composite = async (parent, node) => { - const { shapeSvg, bbox, halfPadding } = await labelHelper( - parent, - node, - "node " + node.classes, - true - ); - const rect2 = shapeSvg.insert("rect", ":first-child"); - const totalWidth = node.positioned ? node.width : bbox.width + node.padding; - const totalHeight = node.positioned ? node.height : bbox.height + node.padding; - const x = node.positioned ? -totalWidth / 2 : -bbox.width / 2 - halfPadding; - const y = node.positioned ? -totalHeight / 2 : -bbox.height / 2 - halfPadding; - rect2.attr("class", "basic cluster composite label-container").attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("x", x).attr("y", y).attr("width", totalWidth).attr("height", totalHeight); - if (node.props) { - const propKeys = new Set(Object.keys(node.props)); - if (node.props.borders) { - applyNodePropertyBorders(rect2, node.props.borders, totalWidth, totalHeight); - propKeys.delete("borders"); - } - propKeys.forEach((propKey) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.warn(`Unknown node property ${propKey}`); - }); - } - updateNodeBounds(node, rect2); - node.intersect = function(point2) { - return intersect.rect(node, point2); - }; - return shapeSvg; -}; -const labelRect = async (parent, node) => { - const { shapeSvg } = await labelHelper(parent, node, "label", true); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.trace("Classes = ", node.class); - const rect2 = shapeSvg.insert("rect", ":first-child"); - const totalWidth = 0; - const totalHeight = 0; - rect2.attr("width", totalWidth).attr("height", totalHeight); - shapeSvg.attr("class", "label edgeLabel"); - if (node.props) { - const propKeys = new Set(Object.keys(node.props)); - if (node.props.borders) { - applyNodePropertyBorders(rect2, node.props.borders, totalWidth, totalHeight); - propKeys.delete("borders"); - } - propKeys.forEach((propKey) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.warn(`Unknown node property ${propKey}`); - }); - } - updateNodeBounds(node, rect2); - node.intersect = function(point2) { - return intersect.rect(node, point2); - }; - return shapeSvg; -}; -function applyNodePropertyBorders(rect2, borders, totalWidth, totalHeight) { - const strokeDashArray = []; - const addBorder = (length) => { - strokeDashArray.push(length, 0); - }; - const skipBorder = (length) => { - strokeDashArray.push(0, length); - }; - if (borders.includes("t")) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("add top border"); - addBorder(totalWidth); - } else { - skipBorder(totalWidth); - } - if (borders.includes("r")) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("add right border"); - addBorder(totalHeight); - } else { - skipBorder(totalHeight); - } - if (borders.includes("b")) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("add bottom border"); - addBorder(totalWidth); - } else { - skipBorder(totalWidth); - } - if (borders.includes("l")) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("add left border"); - addBorder(totalHeight); - } else { - skipBorder(totalHeight); - } - rect2.attr("stroke-dasharray", strokeDashArray.join(" ")); -} -const rectWithTitle = (parent, node) => { - let classes; - if (!node.classes) { - classes = "node default"; - } else { - classes = "node " + node.classes; - } - const shapeSvg = parent.insert("g").attr("class", classes).attr("id", node.domId || node.id); - const rect2 = shapeSvg.insert("rect", ":first-child"); - const innerLine = shapeSvg.insert("line"); - const label = shapeSvg.insert("g").attr("class", "label"); - const text2 = node.labelText.flat ? node.labelText.flat() : node.labelText; - let title = ""; - if (typeof text2 === "object") { - title = text2[0]; - } else { - title = text2; - } - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Label text abc79", title, text2, typeof text2 === "object"); - const text = label.node().appendChild(createLabel$1(title, node.labelStyle, true, true)); - let bbox = { width: 0, height: 0 }; - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { - const div = text.children[0]; - const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(text); - bbox = div.getBoundingClientRect(); - dv.attr("width", bbox.width); - dv.attr("height", bbox.height); - } - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Text 2", text2); - const textRows = text2.slice(1, text2.length); - let titleBox = text.getBBox(); - const descr = label.node().appendChild( - createLabel$1(textRows.join ? textRows.join("
") : textRows, node.labelStyle, true, true) - ); - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { - const div = descr.children[0]; - const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(descr); - bbox = div.getBoundingClientRect(); - dv.attr("width", bbox.width); - dv.attr("height", bbox.height); - } - const halfPadding = node.padding / 2; - (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(descr).attr( - "transform", - "translate( " + // (titleBox.width - bbox.width) / 2 + - (bbox.width > titleBox.width ? 0 : (titleBox.width - bbox.width) / 2) + ", " + (titleBox.height + halfPadding + 5) + ")" - ); - (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(text).attr( - "transform", - "translate( " + // (titleBox.width - bbox.width) / 2 + - (bbox.width < titleBox.width ? 0 : -(titleBox.width - bbox.width) / 2) + ", 0)" - ); - bbox = label.node().getBBox(); - label.attr( - "transform", - "translate(" + -bbox.width / 2 + ", " + (-bbox.height / 2 - halfPadding + 3) + ")" - ); - rect2.attr("class", "outer title-state").attr("x", -bbox.width / 2 - halfPadding).attr("y", -bbox.height / 2 - halfPadding).attr("width", bbox.width + node.padding).attr("height", bbox.height + node.padding); - innerLine.attr("class", "divider").attr("x1", -bbox.width / 2 - halfPadding).attr("x2", bbox.width / 2 + halfPadding).attr("y1", -bbox.height / 2 - halfPadding + titleBox.height + halfPadding).attr("y2", -bbox.height / 2 - halfPadding + titleBox.height + halfPadding); - updateNodeBounds(node, rect2); - node.intersect = function(point2) { - return intersect.rect(node, point2); - }; - return shapeSvg; -}; -const stadium = async (parent, node) => { - const { shapeSvg, bbox } = await labelHelper( - parent, - node, - getClassesFromNode(node, void 0), - true - ); - const h = bbox.height + node.padding; - const w = bbox.width + h / 4 + node.padding; - const rect2 = shapeSvg.insert("rect", ":first-child").attr("style", node.style).attr("rx", h / 2).attr("ry", h / 2).attr("x", -w / 2).attr("y", -h / 2).attr("width", w).attr("height", h); - updateNodeBounds(node, rect2); - node.intersect = function(point2) { - return intersect.rect(node, point2); - }; - return shapeSvg; -}; -const circle = async (parent, node) => { - const { shapeSvg, bbox, halfPadding } = await labelHelper( - parent, - node, - getClassesFromNode(node, void 0), - true - ); - const circle2 = shapeSvg.insert("circle", ":first-child"); - circle2.attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("r", bbox.width / 2 + halfPadding).attr("width", bbox.width + node.padding).attr("height", bbox.height + node.padding); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Circle main"); - updateNodeBounds(node, circle2); - node.intersect = function(point2) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Circle intersect", node, bbox.width / 2 + halfPadding, point2); - return intersect.circle(node, bbox.width / 2 + halfPadding, point2); - }; - return shapeSvg; -}; -const doublecircle = async (parent, node) => { - const { shapeSvg, bbox, halfPadding } = await labelHelper( - parent, - node, - getClassesFromNode(node, void 0), - true - ); - const gap = 5; - const circleGroup = shapeSvg.insert("g", ":first-child"); - const outerCircle = circleGroup.insert("circle"); - const innerCircle = circleGroup.insert("circle"); - circleGroup.attr("class", node.class); - outerCircle.attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("r", bbox.width / 2 + halfPadding + gap).attr("width", bbox.width + node.padding + gap * 2).attr("height", bbox.height + node.padding + gap * 2); - innerCircle.attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("r", bbox.width / 2 + halfPadding).attr("width", bbox.width + node.padding).attr("height", bbox.height + node.padding); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.info("DoubleCircle main"); - updateNodeBounds(node, outerCircle); - node.intersect = function(point2) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.info("DoubleCircle intersect", node, bbox.width / 2 + halfPadding + gap, point2); - return intersect.circle(node, bbox.width / 2 + halfPadding + gap, point2); - }; - return shapeSvg; -}; -const subroutine = async (parent, node) => { - const { shapeSvg, bbox } = await labelHelper( - parent, - node, - getClassesFromNode(node, void 0), - true - ); - const w = bbox.width + node.padding; - const h = bbox.height + node.padding; - const points = [ - { x: 0, y: 0 }, - { x: w, y: 0 }, - { x: w, y: -h }, - { x: 0, y: -h }, - { x: 0, y: 0 }, - { x: -8, y: 0 }, - { x: w + 8, y: 0 }, - { x: w + 8, y: -h }, - { x: -8, y: -h }, - { x: -8, y: 0 } - ]; - const el = insertPolygonShape(shapeSvg, w, h, points); - el.attr("style", node.style); - updateNodeBounds(node, el); - node.intersect = function(point2) { - return intersect.polygon(node, points, point2); - }; - return shapeSvg; -}; -const start = (parent, node) => { - const shapeSvg = parent.insert("g").attr("class", "node default").attr("id", node.domId || node.id); - const circle2 = shapeSvg.insert("circle", ":first-child"); - circle2.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14); - updateNodeBounds(node, circle2); - node.intersect = function(point2) { - return intersect.circle(node, 7, point2); - }; - return shapeSvg; -}; -const forkJoin = (parent, node, dir) => { - const shapeSvg = parent.insert("g").attr("class", "node default").attr("id", node.domId || node.id); - let width = 70; - let height = 10; - if (dir === "LR") { - width = 10; - height = 70; - } - const shape = shapeSvg.append("rect").attr("x", -1 * width / 2).attr("y", -1 * height / 2).attr("width", width).attr("height", height).attr("class", "fork-join"); - updateNodeBounds(node, shape); - node.height = node.height + node.padding / 2; - node.width = node.width + node.padding / 2; - node.intersect = function(point2) { - return intersect.rect(node, point2); - }; - return shapeSvg; -}; -const end = (parent, node) => { - const shapeSvg = parent.insert("g").attr("class", "node default").attr("id", node.domId || node.id); - const innerCircle = shapeSvg.insert("circle", ":first-child"); - const circle2 = shapeSvg.insert("circle", ":first-child"); - circle2.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14); - innerCircle.attr("class", "state-end").attr("r", 5).attr("width", 10).attr("height", 10); - updateNodeBounds(node, circle2); - node.intersect = function(point2) { - return intersect.circle(node, 7, point2); - }; - return shapeSvg; -}; -const class_box = (parent, node) => { - const halfPadding = node.padding / 2; - const rowPadding = 4; - const lineHeight = 8; - let classes; - if (!node.classes) { - classes = "node default"; - } else { - classes = "node " + node.classes; - } - const shapeSvg = parent.insert("g").attr("class", classes).attr("id", node.domId || node.id); - const rect2 = shapeSvg.insert("rect", ":first-child"); - const topLine = shapeSvg.insert("line"); - const bottomLine = shapeSvg.insert("line"); - let maxWidth = 0; - let maxHeight = rowPadding; - const labelContainer = shapeSvg.insert("g").attr("class", "label"); - let verticalPos = 0; - const hasInterface = node.classData.annotations && node.classData.annotations[0]; - const interfaceLabelText = node.classData.annotations[0] ? "«" + node.classData.annotations[0] + "»" : ""; - const interfaceLabel = labelContainer.node().appendChild(createLabel$1(interfaceLabelText, node.labelStyle, true, true)); - let interfaceBBox = interfaceLabel.getBBox(); - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { - const div = interfaceLabel.children[0]; - const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(interfaceLabel); - interfaceBBox = div.getBoundingClientRect(); - dv.attr("width", interfaceBBox.width); - dv.attr("height", interfaceBBox.height); - } - if (node.classData.annotations[0]) { - maxHeight += interfaceBBox.height + rowPadding; - maxWidth += interfaceBBox.width; - } - let classTitleString = node.classData.label; - if (node.classData.type !== void 0 && node.classData.type !== "") { - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels) { - classTitleString += "<" + node.classData.type + ">"; - } else { - classTitleString += "<" + node.classData.type + ">"; - } - } - const classTitleLabel = labelContainer.node().appendChild(createLabel$1(classTitleString, node.labelStyle, true, true)); - (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(classTitleLabel).attr("class", "classTitle"); - let classTitleBBox = classTitleLabel.getBBox(); - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { - const div = classTitleLabel.children[0]; - const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(classTitleLabel); - classTitleBBox = div.getBoundingClientRect(); - dv.attr("width", classTitleBBox.width); - dv.attr("height", classTitleBBox.height); - } - maxHeight += classTitleBBox.height + rowPadding; - if (classTitleBBox.width > maxWidth) { - maxWidth = classTitleBBox.width; - } - const classAttributes = []; - node.classData.members.forEach((member) => { - const parsedInfo = member.getDisplayDetails(); - let parsedText = parsedInfo.displayText; - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels) { - parsedText = parsedText.replace(//g, ">"); - } - const lbl = labelContainer.node().appendChild( - createLabel$1( - parsedText, - parsedInfo.cssStyle ? parsedInfo.cssStyle : node.labelStyle, - true, - true - ) - ); - let bbox = lbl.getBBox(); - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { - const div = lbl.children[0]; - const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(lbl); - bbox = div.getBoundingClientRect(); - dv.attr("width", bbox.width); - dv.attr("height", bbox.height); - } - if (bbox.width > maxWidth) { - maxWidth = bbox.width; - } - maxHeight += bbox.height + rowPadding; - classAttributes.push(lbl); - }); - maxHeight += lineHeight; - const classMethods = []; - node.classData.methods.forEach((member) => { - const parsedInfo = member.getDisplayDetails(); - let displayText = parsedInfo.displayText; - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels) { - displayText = displayText.replace(//g, ">"); - } - const lbl = labelContainer.node().appendChild( - createLabel$1( - displayText, - parsedInfo.cssStyle ? parsedInfo.cssStyle : node.labelStyle, - true, - true - ) - ); - let bbox = lbl.getBBox(); - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { - const div = lbl.children[0]; - const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(lbl); - bbox = div.getBoundingClientRect(); - dv.attr("width", bbox.width); - dv.attr("height", bbox.height); - } - if (bbox.width > maxWidth) { - maxWidth = bbox.width; - } - maxHeight += bbox.height + rowPadding; - classMethods.push(lbl); - }); - maxHeight += lineHeight; - if (hasInterface) { - let diffX2 = (maxWidth - interfaceBBox.width) / 2; - (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(interfaceLabel).attr( - "transform", - "translate( " + (-1 * maxWidth / 2 + diffX2) + ", " + -1 * maxHeight / 2 + ")" - ); - verticalPos = interfaceBBox.height + rowPadding; - } - let diffX = (maxWidth - classTitleBBox.width) / 2; - (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(classTitleLabel).attr( - "transform", - "translate( " + (-1 * maxWidth / 2 + diffX) + ", " + (-1 * maxHeight / 2 + verticalPos) + ")" - ); - verticalPos += classTitleBBox.height + rowPadding; - topLine.attr("class", "divider").attr("x1", -maxWidth / 2 - halfPadding).attr("x2", maxWidth / 2 + halfPadding).attr("y1", -maxHeight / 2 - halfPadding + lineHeight + verticalPos).attr("y2", -maxHeight / 2 - halfPadding + lineHeight + verticalPos); - verticalPos += lineHeight; - classAttributes.forEach((lbl) => { - (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(lbl).attr( - "transform", - "translate( " + -maxWidth / 2 + ", " + (-1 * maxHeight / 2 + verticalPos + lineHeight / 2) + ")" - ); - const memberBBox = lbl == null ? void 0 : lbl.getBBox(); - verticalPos += ((memberBBox == null ? void 0 : memberBBox.height) ?? 0) + rowPadding; - }); - verticalPos += lineHeight; - bottomLine.attr("class", "divider").attr("x1", -maxWidth / 2 - halfPadding).attr("x2", maxWidth / 2 + halfPadding).attr("y1", -maxHeight / 2 - halfPadding + lineHeight + verticalPos).attr("y2", -maxHeight / 2 - halfPadding + lineHeight + verticalPos); - verticalPos += lineHeight; - classMethods.forEach((lbl) => { - (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(lbl).attr( - "transform", - "translate( " + -maxWidth / 2 + ", " + (-1 * maxHeight / 2 + verticalPos) + ")" - ); - const memberBBox = lbl == null ? void 0 : lbl.getBBox(); - verticalPos += ((memberBBox == null ? void 0 : memberBBox.height) ?? 0) + rowPadding; - }); - rect2.attr("style", node.style).attr("class", "outer title-state").attr("x", -maxWidth / 2 - halfPadding).attr("y", -(maxHeight / 2) - halfPadding).attr("width", maxWidth + node.padding).attr("height", maxHeight + node.padding); - updateNodeBounds(node, rect2); - node.intersect = function(point2) { - return intersect.rect(node, point2); - }; - return shapeSvg; -}; -const shapes = { - rhombus: question, - composite, - question, - rect, - labelRect, - rectWithTitle, - choice, - circle, - doublecircle, - stadium, - hexagon, - block_arrow, - rect_left_inv_arrow, - lean_right, - lean_left, - trapezoid, - inv_trapezoid, - rect_right_inv_arrow, - cylinder, - start, - end, - note: note$1, - subroutine, - fork: forkJoin, - join: forkJoin, - class_box -}; -let nodeElems = {}; -const insertNode = async (elem, node, dir) => { - let newEl; - let el; - if (node.link) { - let target; - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().securityLevel === "sandbox") { - target = "_top"; - } else if (node.linkTarget) { - target = node.linkTarget || "_blank"; - } - newEl = elem.insert("svg:a").attr("xlink:href", node.link).attr("target", target); - el = await shapes[node.shape](newEl, node, dir); - } else { - el = await shapes[node.shape](elem, node, dir); - newEl = el; - } - if (node.tooltip) { - el.attr("title", node.tooltip); - } - if (node.class) { - el.attr("class", "node default " + node.class); - } - newEl.attr("data-node", "true"); - newEl.attr("data-id", node.id); - nodeElems[node.id] = newEl; - if (node.haveCallback) { - nodeElems[node.id].attr("class", nodeElems[node.id].attr("class") + " clickable"); - } - return newEl; -}; -const setNodeElem = (elem, node) => { - nodeElems[node.id] = elem; -}; -const clear$1 = () => { - nodeElems = {}; -}; -const positionNode = (node) => { - const el = nodeElems[node.id]; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.trace( - "Transforming node", - node.diff, - node, - "translate(" + (node.x - node.width / 2 - 5) + ", " + node.width / 2 + ")" - ); - const padding = 8; - const diff = node.diff || 0; - if (node.clusterNode) { - el.attr( - "transform", - "translate(" + (node.x + diff - node.width / 2) + ", " + (node.y - node.height / 2 - padding) + ")" - ); - } else { - el.attr("transform", "translate(" + node.x + ", " + node.y + ")"); - } - return diff; -}; -const getSubGraphTitleMargins = ({ - flowchart -}) => { - var _a, _b; - const subGraphTitleTopMargin = ((_a = flowchart == null ? void 0 : flowchart.subGraphTitleMargin) == null ? void 0 : _a.top) ?? 0; - const subGraphTitleBottomMargin = ((_b = flowchart == null ? void 0 : flowchart.subGraphTitleMargin) == null ? void 0 : _b.bottom) ?? 0; - const subGraphTitleTotalMargin = subGraphTitleTopMargin + subGraphTitleBottomMargin; - return { - subGraphTitleTopMargin, - subGraphTitleBottomMargin, - subGraphTitleTotalMargin - }; -}; -const markerOffsets = { - aggregation: 18, - extension: 18, - composition: 18, - dependency: 6, - lollipop: 13.5, - arrow_point: 5.3 -}; -function calculateDeltaAndAngle(point1, point2) { - if (point1 === void 0 || point2 === void 0) { - return { angle: 0, deltaX: 0, deltaY: 0 }; - } - point1 = pointTransformer(point1); - point2 = pointTransformer(point2); - const [x1, y1] = [point1.x, point1.y]; - const [x2, y2] = [point2.x, point2.y]; - const deltaX = x2 - x1; - const deltaY = y2 - y1; - return { angle: Math.atan(deltaY / deltaX), deltaX, deltaY }; -} -const pointTransformer = (data) => { - if (Array.isArray(data)) { - return { x: data[0], y: data[1] }; - } - return data; -}; -const getLineFunctionsWithOffset = (edge) => { - return { - x: function(d, i, data) { - let offset = 0; - if (i === 0 && Object.hasOwn(markerOffsets, edge.arrowTypeStart)) { - const { angle, deltaX } = calculateDeltaAndAngle(data[0], data[1]); - offset = markerOffsets[edge.arrowTypeStart] * Math.cos(angle) * (deltaX >= 0 ? 1 : -1); - } else if (i === data.length - 1 && Object.hasOwn(markerOffsets, edge.arrowTypeEnd)) { - const { angle, deltaX } = calculateDeltaAndAngle( - data[data.length - 1], - data[data.length - 2] - ); - offset = markerOffsets[edge.arrowTypeEnd] * Math.cos(angle) * (deltaX >= 0 ? 1 : -1); - } - return pointTransformer(d).x + offset; - }, - y: function(d, i, data) { - let offset = 0; - if (i === 0 && Object.hasOwn(markerOffsets, edge.arrowTypeStart)) { - const { angle, deltaY } = calculateDeltaAndAngle(data[0], data[1]); - offset = markerOffsets[edge.arrowTypeStart] * Math.abs(Math.sin(angle)) * (deltaY >= 0 ? 1 : -1); - } else if (i === data.length - 1 && Object.hasOwn(markerOffsets, edge.arrowTypeEnd)) { - const { angle, deltaY } = calculateDeltaAndAngle( - data[data.length - 1], - data[data.length - 2] - ); - offset = markerOffsets[edge.arrowTypeEnd] * Math.abs(Math.sin(angle)) * (deltaY >= 0 ? 1 : -1); - } - return pointTransformer(d).y + offset; - } - }; -}; -const addEdgeMarkers = (svgPath, edge, url, id, diagramType) => { - if (edge.arrowTypeStart) { - addEdgeMarker(svgPath, "start", edge.arrowTypeStart, url, id, diagramType); - } - if (edge.arrowTypeEnd) { - addEdgeMarker(svgPath, "end", edge.arrowTypeEnd, url, id, diagramType); - } -}; -const arrowTypesMap = { - arrow_cross: "cross", - arrow_point: "point", - arrow_barb: "barb", - arrow_circle: "circle", - aggregation: "aggregation", - extension: "extension", - composition: "composition", - dependency: "dependency", - lollipop: "lollipop" -}; -const addEdgeMarker = (svgPath, position, arrowType, url, id, diagramType) => { - const endMarkerType = arrowTypesMap[arrowType]; - if (!endMarkerType) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.warn(`Unknown arrow type: ${arrowType}`); - return; - } - const suffix = position === "start" ? "Start" : "End"; - svgPath.attr(`marker-${position}`, `url(${url}#${id}_${diagramType}-${endMarkerType}${suffix})`); -}; -let edgeLabels = {}; -let terminalLabels = {}; -const clear = () => { - edgeLabels = {}; - terminalLabels = {}; -}; -const insertEdgeLabel = (elem, edge) => { - const useHtmlLabels = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels); - const labelElement = edge.labelType === "markdown" ? (0,_createText_2e5e7dd3_js__WEBPACK_IMPORTED_MODULE_2__.a)(elem, edge.label, { - style: edge.labelStyle, - useHtmlLabels, - addSvgBackground: true - }) : createLabel$1(edge.label, edge.labelStyle); - const edgeLabel = elem.insert("g").attr("class", "edgeLabel"); - const label = edgeLabel.insert("g").attr("class", "label"); - label.node().appendChild(labelElement); - let bbox = labelElement.getBBox(); - if (useHtmlLabels) { - const div = labelElement.children[0]; - const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(labelElement); - bbox = div.getBoundingClientRect(); - dv.attr("width", bbox.width); - dv.attr("height", bbox.height); - } - label.attr("transform", "translate(" + -bbox.width / 2 + ", " + -bbox.height / 2 + ")"); - edgeLabels[edge.id] = edgeLabel; - edge.width = bbox.width; - edge.height = bbox.height; - let fo; - if (edge.startLabelLeft) { - const startLabelElement = createLabel$1(edge.startLabelLeft, edge.labelStyle); - const startEdgeLabelLeft = elem.insert("g").attr("class", "edgeTerminals"); - const inner = startEdgeLabelLeft.insert("g").attr("class", "inner"); - fo = inner.node().appendChild(startLabelElement); - const slBox = startLabelElement.getBBox(); - inner.attr("transform", "translate(" + -slBox.width / 2 + ", " + -slBox.height / 2 + ")"); - if (!terminalLabels[edge.id]) { - terminalLabels[edge.id] = {}; - } - terminalLabels[edge.id].startLeft = startEdgeLabelLeft; - setTerminalWidth(fo, edge.startLabelLeft); - } - if (edge.startLabelRight) { - const startLabelElement = createLabel$1(edge.startLabelRight, edge.labelStyle); - const startEdgeLabelRight = elem.insert("g").attr("class", "edgeTerminals"); - const inner = startEdgeLabelRight.insert("g").attr("class", "inner"); - fo = startEdgeLabelRight.node().appendChild(startLabelElement); - inner.node().appendChild(startLabelElement); - const slBox = startLabelElement.getBBox(); - inner.attr("transform", "translate(" + -slBox.width / 2 + ", " + -slBox.height / 2 + ")"); - if (!terminalLabels[edge.id]) { - terminalLabels[edge.id] = {}; - } - terminalLabels[edge.id].startRight = startEdgeLabelRight; - setTerminalWidth(fo, edge.startLabelRight); - } - if (edge.endLabelLeft) { - const endLabelElement = createLabel$1(edge.endLabelLeft, edge.labelStyle); - const endEdgeLabelLeft = elem.insert("g").attr("class", "edgeTerminals"); - const inner = endEdgeLabelLeft.insert("g").attr("class", "inner"); - fo = inner.node().appendChild(endLabelElement); - const slBox = endLabelElement.getBBox(); - inner.attr("transform", "translate(" + -slBox.width / 2 + ", " + -slBox.height / 2 + ")"); - endEdgeLabelLeft.node().appendChild(endLabelElement); - if (!terminalLabels[edge.id]) { - terminalLabels[edge.id] = {}; - } - terminalLabels[edge.id].endLeft = endEdgeLabelLeft; - setTerminalWidth(fo, edge.endLabelLeft); - } - if (edge.endLabelRight) { - const endLabelElement = createLabel$1(edge.endLabelRight, edge.labelStyle); - const endEdgeLabelRight = elem.insert("g").attr("class", "edgeTerminals"); - const inner = endEdgeLabelRight.insert("g").attr("class", "inner"); - fo = inner.node().appendChild(endLabelElement); - const slBox = endLabelElement.getBBox(); - inner.attr("transform", "translate(" + -slBox.width / 2 + ", " + -slBox.height / 2 + ")"); - endEdgeLabelRight.node().appendChild(endLabelElement); - if (!terminalLabels[edge.id]) { - terminalLabels[edge.id] = {}; - } - terminalLabels[edge.id].endRight = endEdgeLabelRight; - setTerminalWidth(fo, edge.endLabelRight); - } - return labelElement; -}; -function setTerminalWidth(fo, value) { - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels && fo) { - fo.style.width = value.length * 9 + "px"; - fo.style.height = "12px"; - } -} -const positionEdgeLabel = (edge, paths) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("Moving label abc88 ", edge.id, edge.label, edgeLabels[edge.id], paths); - let path = paths.updatedPath ? paths.updatedPath : paths.originalPath; - const siteConfig = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)(); - const { subGraphTitleTotalMargin } = getSubGraphTitleMargins(siteConfig); - if (edge.label) { - const el = edgeLabels[edge.id]; - let x = edge.x; - let y = edge.y; - if (path) { - const pos = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.u.calcLabelPosition(path); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug( - "Moving label " + edge.label + " from (", - x, - ",", - y, - ") to (", - pos.x, - ",", - pos.y, - ") abc88" - ); - if (paths.updatedPath) { - x = pos.x; - y = pos.y; - } - } - el.attr("transform", `translate(${x}, ${y + subGraphTitleTotalMargin / 2})`); - } - if (edge.startLabelLeft) { - const el = terminalLabels[edge.id].startLeft; - let x = edge.x; - let y = edge.y; - if (path) { - const pos = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.u.calcTerminalLabelPosition(edge.arrowTypeStart ? 10 : 0, "start_left", path); - x = pos.x; - y = pos.y; - } - el.attr("transform", `translate(${x}, ${y})`); - } - if (edge.startLabelRight) { - const el = terminalLabels[edge.id].startRight; - let x = edge.x; - let y = edge.y; - if (path) { - const pos = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.u.calcTerminalLabelPosition( - edge.arrowTypeStart ? 10 : 0, - "start_right", - path - ); - x = pos.x; - y = pos.y; - } - el.attr("transform", `translate(${x}, ${y})`); - } - if (edge.endLabelLeft) { - const el = terminalLabels[edge.id].endLeft; - let x = edge.x; - let y = edge.y; - if (path) { - const pos = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.u.calcTerminalLabelPosition(edge.arrowTypeEnd ? 10 : 0, "end_left", path); - x = pos.x; - y = pos.y; - } - el.attr("transform", `translate(${x}, ${y})`); - } - if (edge.endLabelRight) { - const el = terminalLabels[edge.id].endRight; - let x = edge.x; - let y = edge.y; - if (path) { - const pos = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.u.calcTerminalLabelPosition(edge.arrowTypeEnd ? 10 : 0, "end_right", path); - x = pos.x; - y = pos.y; - } - el.attr("transform", `translate(${x}, ${y})`); - } -}; -const outsideNode = (node, point2) => { - const x = node.x; - const y = node.y; - const dx = Math.abs(point2.x - x); - const dy = Math.abs(point2.y - y); - const w = node.width / 2; - const h = node.height / 2; - if (dx >= w || dy >= h) { - return true; - } - return false; -}; -const intersection = (node, outsidePoint, insidePoint) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug(`intersection calc abc89: - outsidePoint: ${JSON.stringify(outsidePoint)} - insidePoint : ${JSON.stringify(insidePoint)} - node : x:${node.x} y:${node.y} w:${node.width} h:${node.height}`); - const x = node.x; - const y = node.y; - const dx = Math.abs(x - insidePoint.x); - const w = node.width / 2; - let r = insidePoint.x < outsidePoint.x ? w - dx : w + dx; - const h = node.height / 2; - const Q = Math.abs(outsidePoint.y - insidePoint.y); - const R = Math.abs(outsidePoint.x - insidePoint.x); - if (Math.abs(y - outsidePoint.y) * w > Math.abs(x - outsidePoint.x) * h) { - let q = insidePoint.y < outsidePoint.y ? outsidePoint.y - h - y : y - h - outsidePoint.y; - r = R * q / Q; - const res = { - x: insidePoint.x < outsidePoint.x ? insidePoint.x + r : insidePoint.x - R + r, - y: insidePoint.y < outsidePoint.y ? insidePoint.y + Q - q : insidePoint.y - Q + q - }; - if (r === 0) { - res.x = outsidePoint.x; - res.y = outsidePoint.y; - } - if (R === 0) { - res.x = outsidePoint.x; - } - if (Q === 0) { - res.y = outsidePoint.y; - } - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug(`abc89 topp/bott calc, Q ${Q}, q ${q}, R ${R}, r ${r}`, res); - return res; - } else { - if (insidePoint.x < outsidePoint.x) { - r = outsidePoint.x - w - x; - } else { - r = x - w - outsidePoint.x; - } - let q = Q * r / R; - let _x = insidePoint.x < outsidePoint.x ? insidePoint.x + R - r : insidePoint.x - R + r; - let _y = insidePoint.y < outsidePoint.y ? insidePoint.y + q : insidePoint.y - q; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug(`sides calc abc89, Q ${Q}, q ${q}, R ${R}, r ${r}`, { _x, _y }); - if (r === 0) { - _x = outsidePoint.x; - _y = outsidePoint.y; - } - if (R === 0) { - _x = outsidePoint.x; - } - if (Q === 0) { - _y = outsidePoint.y; - } - return { x: _x, y: _y }; - } -}; -const cutPathAtIntersect = (_points, boundaryNode) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("abc88 cutPathAtIntersect", _points, boundaryNode); - let points = []; - let lastPointOutside = _points[0]; - let isInside = false; - _points.forEach((point2) => { - if (!outsideNode(boundaryNode, point2) && !isInside) { - const inter = intersection(boundaryNode, lastPointOutside, point2); - let pointPresent = false; - points.forEach((p) => { - pointPresent = pointPresent || p.x === inter.x && p.y === inter.y; - }); - if (!points.some((e) => e.x === inter.x && e.y === inter.y)) { - points.push(inter); - } - isInside = true; - } else { - lastPointOutside = point2; - if (!isInside) { - points.push(point2); - } - } - }); - return points; -}; -const insertEdge = function(elem, e, edge, clusterDb, diagramType, graph, id) { - let points = edge.points; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("abc88 InsertEdge: edge=", edge, "e=", e); - let pointsHasChanged = false; - const tail = graph.node(e.v); - var head = graph.node(e.w); - if ((head == null ? void 0 : head.intersect) && (tail == null ? void 0 : tail.intersect)) { - points = points.slice(1, edge.points.length - 1); - points.unshift(tail.intersect(points[0])); - points.push(head.intersect(points[points.length - 1])); - } - if (edge.toCluster) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("to cluster abc88", clusterDb[edge.toCluster]); - points = cutPathAtIntersect(edge.points, clusterDb[edge.toCluster].node); - pointsHasChanged = true; - } - if (edge.fromCluster) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("from cluster abc88", clusterDb[edge.fromCluster]); - points = cutPathAtIntersect(points.reverse(), clusterDb[edge.fromCluster].node).reverse(); - pointsHasChanged = true; - } - const lineData = points.filter((p) => !Number.isNaN(p.y)); - let curve = d3__WEBPACK_IMPORTED_MODULE_0__/* .curveBasis */ .qrM; - if (edge.curve && (diagramType === "graph" || diagramType === "flowchart")) { - curve = edge.curve; - } - const { x, y } = getLineFunctionsWithOffset(edge); - const lineFunction = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .line */ .n8j)().x(x).y(y).curve(curve); - let strokeClasses; - switch (edge.thickness) { - case "normal": - strokeClasses = "edge-thickness-normal"; - break; - case "thick": - strokeClasses = "edge-thickness-thick"; - break; - case "invisible": - strokeClasses = "edge-thickness-thick"; - break; - default: - strokeClasses = ""; - } - switch (edge.pattern) { - case "solid": - strokeClasses += " edge-pattern-solid"; - break; - case "dotted": - strokeClasses += " edge-pattern-dotted"; - break; - case "dashed": - strokeClasses += " edge-pattern-dashed"; - break; - } - const svgPath = elem.append("path").attr("d", lineFunction(lineData)).attr("id", edge.id).attr("class", " " + strokeClasses + (edge.classes ? " " + edge.classes : "")).attr("style", edge.style); - let url = ""; - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.arrowMarkerAbsolute || (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().state.arrowMarkerAbsolute) { - url = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search; - url = url.replace(/\(/g, "\\("); - url = url.replace(/\)/g, "\\)"); - } - addEdgeMarkers(svgPath, edge, url, id, diagramType); - let paths = {}; - if (pointsHasChanged) { - paths.updatedPath = points; - } - paths.originalPath = edge.points; - return paths; -}; - - - -/***/ }), - -/***/ 35860: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ d: () => (/* binding */ db), -/* harmony export */ f: () => (/* binding */ flowDb), -/* harmony export */ p: () => (/* binding */ parser$1) -/* harmony export */ }); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(26312); -/* harmony import */ var _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(86079); - - -var parser = function() { - var o = function(k, v, o2, l) { - for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) - ; - return o2; - }, $V0 = [1, 4], $V1 = [1, 3], $V2 = [1, 5], $V3 = [1, 8, 9, 10, 11, 27, 34, 36, 38, 42, 58, 81, 82, 83, 84, 85, 86, 99, 102, 103, 106, 108, 111, 112, 113, 118, 119, 120, 121], $V4 = [2, 2], $V5 = [1, 13], $V6 = [1, 14], $V7 = [1, 15], $V8 = [1, 16], $V9 = [1, 23], $Va = [1, 25], $Vb = [1, 26], $Vc = [1, 27], $Vd = [1, 49], $Ve = [1, 48], $Vf = [1, 29], $Vg = [1, 30], $Vh = [1, 31], $Vi = [1, 32], $Vj = [1, 33], $Vk = [1, 44], $Vl = [1, 46], $Vm = [1, 42], $Vn = [1, 47], $Vo = [1, 43], $Vp = [1, 50], $Vq = [1, 45], $Vr = [1, 51], $Vs = [1, 52], $Vt = [1, 34], $Vu = [1, 35], $Vv = [1, 36], $Vw = [1, 37], $Vx = [1, 57], $Vy = [1, 8, 9, 10, 11, 27, 32, 34, 36, 38, 42, 58, 81, 82, 83, 84, 85, 86, 99, 102, 103, 106, 108, 111, 112, 113, 118, 119, 120, 121], $Vz = [1, 61], $VA = [1, 60], $VB = [1, 62], $VC = [8, 9, 11, 73, 75], $VD = [1, 88], $VE = [1, 93], $VF = [1, 92], $VG = [1, 89], $VH = [1, 85], $VI = [1, 91], $VJ = [1, 87], $VK = [1, 94], $VL = [1, 90], $VM = [1, 95], $VN = [1, 86], $VO = [8, 9, 10, 11, 73, 75], $VP = [8, 9, 10, 11, 44, 73, 75], $VQ = [8, 9, 10, 11, 29, 42, 44, 46, 48, 50, 52, 54, 56, 58, 61, 63, 65, 66, 68, 73, 75, 86, 99, 102, 103, 106, 108, 111, 112, 113], $VR = [8, 9, 11, 42, 58, 73, 75, 86, 99, 102, 103, 106, 108, 111, 112, 113], $VS = [42, 58, 86, 99, 102, 103, 106, 108, 111, 112, 113], $VT = [1, 121], $VU = [1, 120], $VV = [1, 128], $VW = [1, 142], $VX = [1, 143], $VY = [1, 144], $VZ = [1, 145], $V_ = [1, 130], $V$ = [1, 132], $V01 = [1, 136], $V11 = [1, 137], $V21 = [1, 138], $V31 = [1, 139], $V41 = [1, 140], $V51 = [1, 141], $V61 = [1, 146], $V71 = [1, 147], $V81 = [1, 126], $V91 = [1, 127], $Va1 = [1, 134], $Vb1 = [1, 129], $Vc1 = [1, 133], $Vd1 = [1, 131], $Ve1 = [8, 9, 10, 11, 27, 32, 34, 36, 38, 42, 58, 81, 82, 83, 84, 85, 86, 99, 102, 103, 106, 108, 111, 112, 113, 118, 119, 120, 121], $Vf1 = [1, 149], $Vg1 = [8, 9, 11], $Vh1 = [8, 9, 10, 11, 14, 42, 58, 86, 102, 103, 106, 108, 111, 112, 113], $Vi1 = [1, 169], $Vj1 = [1, 165], $Vk1 = [1, 166], $Vl1 = [1, 170], $Vm1 = [1, 167], $Vn1 = [1, 168], $Vo1 = [75, 113, 116], $Vp1 = [8, 9, 10, 11, 12, 14, 27, 29, 32, 42, 58, 73, 81, 82, 83, 84, 85, 86, 87, 102, 106, 108, 111, 112, 113], $Vq1 = [10, 103], $Vr1 = [31, 47, 49, 51, 53, 55, 60, 62, 64, 65, 67, 69, 113, 114, 115], $Vs1 = [1, 235], $Vt1 = [1, 233], $Vu1 = [1, 237], $Vv1 = [1, 231], $Vw1 = [1, 232], $Vx1 = [1, 234], $Vy1 = [1, 236], $Vz1 = [1, 238], $VA1 = [1, 255], $VB1 = [8, 9, 11, 103], $VC1 = [8, 9, 10, 11, 58, 81, 102, 103, 106, 107, 108, 109]; - var parser2 = { - trace: function trace() { - }, - yy: {}, - symbols_: { "error": 2, "start": 3, "graphConfig": 4, "document": 5, "line": 6, "statement": 7, "SEMI": 8, "NEWLINE": 9, "SPACE": 10, "EOF": 11, "GRAPH": 12, "NODIR": 13, "DIR": 14, "FirstStmtSeparator": 15, "ending": 16, "endToken": 17, "spaceList": 18, "spaceListNewline": 19, "vertexStatement": 20, "separator": 21, "styleStatement": 22, "linkStyleStatement": 23, "classDefStatement": 24, "classStatement": 25, "clickStatement": 26, "subgraph": 27, "textNoTags": 28, "SQS": 29, "text": 30, "SQE": 31, "end": 32, "direction": 33, "acc_title": 34, "acc_title_value": 35, "acc_descr": 36, "acc_descr_value": 37, "acc_descr_multiline_value": 38, "link": 39, "node": 40, "styledVertex": 41, "AMP": 42, "vertex": 43, "STYLE_SEPARATOR": 44, "idString": 45, "DOUBLECIRCLESTART": 46, "DOUBLECIRCLEEND": 47, "PS": 48, "PE": 49, "(-": 50, "-)": 51, "STADIUMSTART": 52, "STADIUMEND": 53, "SUBROUTINESTART": 54, "SUBROUTINEEND": 55, "VERTEX_WITH_PROPS_START": 56, "NODE_STRING[field]": 57, "COLON": 58, "NODE_STRING[value]": 59, "PIPE": 60, "CYLINDERSTART": 61, "CYLINDEREND": 62, "DIAMOND_START": 63, "DIAMOND_STOP": 64, "TAGEND": 65, "TRAPSTART": 66, "TRAPEND": 67, "INVTRAPSTART": 68, "INVTRAPEND": 69, "linkStatement": 70, "arrowText": 71, "TESTSTR": 72, "START_LINK": 73, "edgeText": 74, "LINK": 75, "edgeTextToken": 76, "STR": 77, "MD_STR": 78, "textToken": 79, "keywords": 80, "STYLE": 81, "LINKSTYLE": 82, "CLASSDEF": 83, "CLASS": 84, "CLICK": 85, "DOWN": 86, "UP": 87, "textNoTagsToken": 88, "stylesOpt": 89, "idString[vertex]": 90, "idString[class]": 91, "CALLBACKNAME": 92, "CALLBACKARGS": 93, "HREF": 94, "LINK_TARGET": 95, "STR[link]": 96, "STR[tooltip]": 97, "alphaNum": 98, "DEFAULT": 99, "numList": 100, "INTERPOLATE": 101, "NUM": 102, "COMMA": 103, "style": 104, "styleComponent": 105, "NODE_STRING": 106, "UNIT": 107, "BRKT": 108, "PCT": 109, "idStringToken": 110, "MINUS": 111, "MULT": 112, "UNICODE_TEXT": 113, "TEXT": 114, "TAGSTART": 115, "EDGE_TEXT": 116, "alphaNumToken": 117, "direction_tb": 118, "direction_bt": 119, "direction_rl": 120, "direction_lr": 121, "$accept": 0, "$end": 1 }, - terminals_: { 2: "error", 8: "SEMI", 9: "NEWLINE", 10: "SPACE", 11: "EOF", 12: "GRAPH", 13: "NODIR", 14: "DIR", 27: "subgraph", 29: "SQS", 31: "SQE", 32: "end", 34: "acc_title", 35: "acc_title_value", 36: "acc_descr", 37: "acc_descr_value", 38: "acc_descr_multiline_value", 42: "AMP", 44: "STYLE_SEPARATOR", 46: "DOUBLECIRCLESTART", 47: "DOUBLECIRCLEEND", 48: "PS", 49: "PE", 50: "(-", 51: "-)", 52: "STADIUMSTART", 53: "STADIUMEND", 54: "SUBROUTINESTART", 55: "SUBROUTINEEND", 56: "VERTEX_WITH_PROPS_START", 57: "NODE_STRING[field]", 58: "COLON", 59: "NODE_STRING[value]", 60: "PIPE", 61: "CYLINDERSTART", 62: "CYLINDEREND", 63: "DIAMOND_START", 64: "DIAMOND_STOP", 65: "TAGEND", 66: "TRAPSTART", 67: "TRAPEND", 68: "INVTRAPSTART", 69: "INVTRAPEND", 72: "TESTSTR", 73: "START_LINK", 75: "LINK", 77: "STR", 78: "MD_STR", 81: "STYLE", 82: "LINKSTYLE", 83: "CLASSDEF", 84: "CLASS", 85: "CLICK", 86: "DOWN", 87: "UP", 90: "idString[vertex]", 91: "idString[class]", 92: "CALLBACKNAME", 93: "CALLBACKARGS", 94: "HREF", 95: "LINK_TARGET", 96: "STR[link]", 97: "STR[tooltip]", 99: "DEFAULT", 101: "INTERPOLATE", 102: "NUM", 103: "COMMA", 106: "NODE_STRING", 107: "UNIT", 108: "BRKT", 109: "PCT", 111: "MINUS", 112: "MULT", 113: "UNICODE_TEXT", 114: "TEXT", 115: "TAGSTART", 116: "EDGE_TEXT", 118: "direction_tb", 119: "direction_bt", 120: "direction_rl", 121: "direction_lr" }, - productions_: [0, [3, 2], [5, 0], [5, 2], [6, 1], [6, 1], [6, 1], [6, 1], [6, 1], [4, 2], [4, 2], [4, 2], [4, 3], [16, 2], [16, 1], [17, 1], [17, 1], [17, 1], [15, 1], [15, 1], [15, 2], [19, 2], [19, 2], [19, 1], [19, 1], [18, 2], [18, 1], [7, 2], [7, 2], [7, 2], [7, 2], [7, 2], [7, 2], [7, 9], [7, 6], [7, 4], [7, 1], [7, 2], [7, 2], [7, 1], [21, 1], [21, 1], [21, 1], [20, 3], [20, 4], [20, 2], [20, 1], [40, 1], [40, 5], [41, 1], [41, 3], [43, 4], [43, 4], [43, 6], [43, 4], [43, 4], [43, 4], [43, 8], [43, 4], [43, 4], [43, 4], [43, 6], [43, 4], [43, 4], [43, 4], [43, 4], [43, 4], [43, 1], [39, 2], [39, 3], [39, 3], [39, 1], [39, 3], [74, 1], [74, 2], [74, 1], [74, 1], [70, 1], [71, 3], [30, 1], [30, 2], [30, 1], [30, 1], [80, 1], [80, 1], [80, 1], [80, 1], [80, 1], [80, 1], [80, 1], [80, 1], [80, 1], [80, 1], [80, 1], [28, 1], [28, 2], [28, 1], [28, 1], [24, 5], [25, 5], [26, 2], [26, 4], [26, 3], [26, 5], [26, 3], [26, 5], [26, 5], [26, 7], [26, 2], [26, 4], [26, 2], [26, 4], [26, 4], [26, 6], [22, 5], [23, 5], [23, 5], [23, 9], [23, 9], [23, 7], [23, 7], [100, 1], [100, 3], [89, 1], [89, 3], [104, 1], [104, 2], [105, 1], [105, 1], [105, 1], [105, 1], [105, 1], [105, 1], [105, 1], [105, 1], [110, 1], [110, 1], [110, 1], [110, 1], [110, 1], [110, 1], [110, 1], [110, 1], [110, 1], [110, 1], [110, 1], [79, 1], [79, 1], [79, 1], [79, 1], [88, 1], [88, 1], [88, 1], [88, 1], [88, 1], [88, 1], [88, 1], [88, 1], [88, 1], [88, 1], [88, 1], [76, 1], [76, 1], [117, 1], [117, 1], [117, 1], [117, 1], [117, 1], [117, 1], [117, 1], [117, 1], [117, 1], [117, 1], [117, 1], [45, 1], [45, 2], [98, 1], [98, 2], [33, 1], [33, 1], [33, 1], [33, 1]], - performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { - var $0 = $$.length - 1; - switch (yystate) { - case 2: - this.$ = []; - break; - case 3: - if (!Array.isArray($$[$0]) || $$[$0].length > 0) { - $$[$0 - 1].push($$[$0]); - } - this.$ = $$[$0 - 1]; - break; - case 4: - case 176: - this.$ = $$[$0]; - break; - case 11: - yy.setDirection("TB"); - this.$ = "TB"; - break; - case 12: - yy.setDirection($$[$0 - 1]); - this.$ = $$[$0 - 1]; - break; - case 27: - this.$ = $$[$0 - 1].nodes; - break; - case 28: - case 29: - case 30: - case 31: - case 32: - this.$ = []; - break; - case 33: - this.$ = yy.addSubGraph($$[$0 - 6], $$[$0 - 1], $$[$0 - 4]); - break; - case 34: - this.$ = yy.addSubGraph($$[$0 - 3], $$[$0 - 1], $$[$0 - 3]); - break; - case 35: - this.$ = yy.addSubGraph(void 0, $$[$0 - 1], void 0); - break; - case 37: - this.$ = $$[$0].trim(); - yy.setAccTitle(this.$); - break; - case 38: - case 39: - this.$ = $$[$0].trim(); - yy.setAccDescription(this.$); - break; - case 43: - yy.addLink($$[$0 - 2].stmt, $$[$0], $$[$0 - 1]); - this.$ = { stmt: $$[$0], nodes: $$[$0].concat($$[$0 - 2].nodes) }; - break; - case 44: - yy.addLink($$[$0 - 3].stmt, $$[$0 - 1], $$[$0 - 2]); - this.$ = { stmt: $$[$0 - 1], nodes: $$[$0 - 1].concat($$[$0 - 3].nodes) }; - break; - case 45: - this.$ = { stmt: $$[$0 - 1], nodes: $$[$0 - 1] }; - break; - case 46: - this.$ = { stmt: $$[$0], nodes: $$[$0] }; - break; - case 47: - this.$ = [$$[$0]]; - break; - case 48: - this.$ = $$[$0 - 4].concat($$[$0]); - break; - case 49: - this.$ = $$[$0]; - break; - case 50: - this.$ = $$[$0 - 2]; - yy.setClass($$[$0 - 2], $$[$0]); - break; - case 51: - this.$ = $$[$0 - 3]; - yy.addVertex($$[$0 - 3], $$[$0 - 1], "square"); - break; - case 52: - this.$ = $$[$0 - 3]; - yy.addVertex($$[$0 - 3], $$[$0 - 1], "doublecircle"); - break; - case 53: - this.$ = $$[$0 - 5]; - yy.addVertex($$[$0 - 5], $$[$0 - 2], "circle"); - break; - case 54: - this.$ = $$[$0 - 3]; - yy.addVertex($$[$0 - 3], $$[$0 - 1], "ellipse"); - break; - case 55: - this.$ = $$[$0 - 3]; - yy.addVertex($$[$0 - 3], $$[$0 - 1], "stadium"); - break; - case 56: - this.$ = $$[$0 - 3]; - yy.addVertex($$[$0 - 3], $$[$0 - 1], "subroutine"); - break; - case 57: - this.$ = $$[$0 - 7]; - yy.addVertex($$[$0 - 7], $$[$0 - 1], "rect", void 0, void 0, void 0, Object.fromEntries([[$$[$0 - 5], $$[$0 - 3]]])); - break; - case 58: - this.$ = $$[$0 - 3]; - yy.addVertex($$[$0 - 3], $$[$0 - 1], "cylinder"); - break; - case 59: - this.$ = $$[$0 - 3]; - yy.addVertex($$[$0 - 3], $$[$0 - 1], "round"); - break; - case 60: - this.$ = $$[$0 - 3]; - yy.addVertex($$[$0 - 3], $$[$0 - 1], "diamond"); - break; - case 61: - this.$ = $$[$0 - 5]; - yy.addVertex($$[$0 - 5], $$[$0 - 2], "hexagon"); - break; - case 62: - this.$ = $$[$0 - 3]; - yy.addVertex($$[$0 - 3], $$[$0 - 1], "odd"); - break; - case 63: - this.$ = $$[$0 - 3]; - yy.addVertex($$[$0 - 3], $$[$0 - 1], "trapezoid"); - break; - case 64: - this.$ = $$[$0 - 3]; - yy.addVertex($$[$0 - 3], $$[$0 - 1], "inv_trapezoid"); - break; - case 65: - this.$ = $$[$0 - 3]; - yy.addVertex($$[$0 - 3], $$[$0 - 1], "lean_right"); - break; - case 66: - this.$ = $$[$0 - 3]; - yy.addVertex($$[$0 - 3], $$[$0 - 1], "lean_left"); - break; - case 67: - this.$ = $$[$0]; - yy.addVertex($$[$0]); - break; - case 68: - $$[$0 - 1].text = $$[$0]; - this.$ = $$[$0 - 1]; - break; - case 69: - case 70: - $$[$0 - 2].text = $$[$0 - 1]; - this.$ = $$[$0 - 2]; - break; - case 71: - this.$ = $$[$0]; - break; - case 72: - var inf = yy.destructLink($$[$0], $$[$0 - 2]); - this.$ = { "type": inf.type, "stroke": inf.stroke, "length": inf.length, "text": $$[$0 - 1] }; - break; - case 73: - this.$ = { text: $$[$0], type: "text" }; - break; - case 74: - this.$ = { text: $$[$0 - 1].text + "" + $$[$0], type: $$[$0 - 1].type }; - break; - case 75: - this.$ = { text: $$[$0], type: "string" }; - break; - case 76: - this.$ = { text: $$[$0], type: "markdown" }; - break; - case 77: - var inf = yy.destructLink($$[$0]); - this.$ = { "type": inf.type, "stroke": inf.stroke, "length": inf.length }; - break; - case 78: - this.$ = $$[$0 - 1]; - break; - case 79: - this.$ = { text: $$[$0], type: "text" }; - break; - case 80: - this.$ = { text: $$[$0 - 1].text + "" + $$[$0], type: $$[$0 - 1].type }; - break; - case 81: - this.$ = { text: $$[$0], type: "string" }; - break; - case 82: - case 97: - this.$ = { text: $$[$0], type: "markdown" }; - break; - case 94: - this.$ = { text: $$[$0], type: "text" }; - break; - case 95: - this.$ = { text: $$[$0 - 1].text + "" + $$[$0], type: $$[$0 - 1].type }; - break; - case 96: - this.$ = { text: $$[$0], type: "text" }; - break; - case 98: - this.$ = $$[$0 - 4]; - yy.addClass($$[$0 - 2], $$[$0]); - break; - case 99: - this.$ = $$[$0 - 4]; - yy.setClass($$[$0 - 2], $$[$0]); - break; - case 100: - case 108: - this.$ = $$[$0 - 1]; - yy.setClickEvent($$[$0 - 1], $$[$0]); - break; - case 101: - case 109: - this.$ = $$[$0 - 3]; - yy.setClickEvent($$[$0 - 3], $$[$0 - 2]); - yy.setTooltip($$[$0 - 3], $$[$0]); - break; - case 102: - this.$ = $$[$0 - 2]; - yy.setClickEvent($$[$0 - 2], $$[$0 - 1], $$[$0]); - break; - case 103: - this.$ = $$[$0 - 4]; - yy.setClickEvent($$[$0 - 4], $$[$0 - 3], $$[$0 - 2]); - yy.setTooltip($$[$0 - 4], $$[$0]); - break; - case 104: - this.$ = $$[$0 - 2]; - yy.setLink($$[$0 - 2], $$[$0]); - break; - case 105: - this.$ = $$[$0 - 4]; - yy.setLink($$[$0 - 4], $$[$0 - 2]); - yy.setTooltip($$[$0 - 4], $$[$0]); - break; - case 106: - this.$ = $$[$0 - 4]; - yy.setLink($$[$0 - 4], $$[$0 - 2], $$[$0]); - break; - case 107: - this.$ = $$[$0 - 6]; - yy.setLink($$[$0 - 6], $$[$0 - 4], $$[$0]); - yy.setTooltip($$[$0 - 6], $$[$0 - 2]); - break; - case 110: - this.$ = $$[$0 - 1]; - yy.setLink($$[$0 - 1], $$[$0]); - break; - case 111: - this.$ = $$[$0 - 3]; - yy.setLink($$[$0 - 3], $$[$0 - 2]); - yy.setTooltip($$[$0 - 3], $$[$0]); - break; - case 112: - this.$ = $$[$0 - 3]; - yy.setLink($$[$0 - 3], $$[$0 - 2], $$[$0]); - break; - case 113: - this.$ = $$[$0 - 5]; - yy.setLink($$[$0 - 5], $$[$0 - 4], $$[$0]); - yy.setTooltip($$[$0 - 5], $$[$0 - 2]); - break; - case 114: - this.$ = $$[$0 - 4]; - yy.addVertex($$[$0 - 2], void 0, void 0, $$[$0]); - break; - case 115: - this.$ = $$[$0 - 4]; - yy.updateLink([$$[$0 - 2]], $$[$0]); - break; - case 116: - this.$ = $$[$0 - 4]; - yy.updateLink($$[$0 - 2], $$[$0]); - break; - case 117: - this.$ = $$[$0 - 8]; - yy.updateLinkInterpolate([$$[$0 - 6]], $$[$0 - 2]); - yy.updateLink([$$[$0 - 6]], $$[$0]); - break; - case 118: - this.$ = $$[$0 - 8]; - yy.updateLinkInterpolate($$[$0 - 6], $$[$0 - 2]); - yy.updateLink($$[$0 - 6], $$[$0]); - break; - case 119: - this.$ = $$[$0 - 6]; - yy.updateLinkInterpolate([$$[$0 - 4]], $$[$0]); - break; - case 120: - this.$ = $$[$0 - 6]; - yy.updateLinkInterpolate($$[$0 - 4], $$[$0]); - break; - case 121: - case 123: - this.$ = [$$[$0]]; - break; - case 122: - case 124: - $$[$0 - 2].push($$[$0]); - this.$ = $$[$0 - 2]; - break; - case 126: - this.$ = $$[$0 - 1] + $$[$0]; - break; - case 174: - this.$ = $$[$0]; - break; - case 175: - this.$ = $$[$0 - 1] + "" + $$[$0]; - break; - case 177: - this.$ = $$[$0 - 1] + "" + $$[$0]; - break; - case 178: - this.$ = { stmt: "dir", value: "TB" }; - break; - case 179: - this.$ = { stmt: "dir", value: "BT" }; - break; - case 180: - this.$ = { stmt: "dir", value: "RL" }; - break; - case 181: - this.$ = { stmt: "dir", value: "LR" }; - break; - } - }, - table: [{ 3: 1, 4: 2, 9: $V0, 10: $V1, 12: $V2 }, { 1: [3] }, o($V3, $V4, { 5: 6 }), { 4: 7, 9: $V0, 10: $V1, 12: $V2 }, { 4: 8, 9: $V0, 10: $V1, 12: $V2 }, { 13: [1, 9], 14: [1, 10] }, { 1: [2, 1], 6: 11, 7: 12, 8: $V5, 9: $V6, 10: $V7, 11: $V8, 20: 17, 22: 18, 23: 19, 24: 20, 25: 21, 26: 22, 27: $V9, 33: 24, 34: $Va, 36: $Vb, 38: $Vc, 40: 28, 41: 38, 42: $Vd, 43: 39, 45: 40, 58: $Ve, 81: $Vf, 82: $Vg, 83: $Vh, 84: $Vi, 85: $Vj, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs, 118: $Vt, 119: $Vu, 120: $Vv, 121: $Vw }, o($V3, [2, 9]), o($V3, [2, 10]), o($V3, [2, 11]), { 8: [1, 54], 9: [1, 55], 10: $Vx, 15: 53, 18: 56 }, o($Vy, [2, 3]), o($Vy, [2, 4]), o($Vy, [2, 5]), o($Vy, [2, 6]), o($Vy, [2, 7]), o($Vy, [2, 8]), { 8: $Vz, 9: $VA, 11: $VB, 21: 58, 39: 59, 70: 63, 73: [1, 64], 75: [1, 65] }, { 8: $Vz, 9: $VA, 11: $VB, 21: 66 }, { 8: $Vz, 9: $VA, 11: $VB, 21: 67 }, { 8: $Vz, 9: $VA, 11: $VB, 21: 68 }, { 8: $Vz, 9: $VA, 11: $VB, 21: 69 }, { 8: $Vz, 9: $VA, 11: $VB, 21: 70 }, { 8: $Vz, 9: $VA, 10: [1, 71], 11: $VB, 21: 72 }, o($Vy, [2, 36]), { 35: [1, 73] }, { 37: [1, 74] }, o($Vy, [2, 39]), o($VC, [2, 46], { 18: 75, 10: $Vx }), { 10: [1, 76] }, { 10: [1, 77] }, { 10: [1, 78] }, { 10: [1, 79] }, { 14: $VD, 42: $VE, 58: $VF, 77: [1, 83], 86: $VG, 92: [1, 80], 94: [1, 81], 98: 82, 102: $VH, 103: $VI, 106: $VJ, 108: $VK, 111: $VL, 112: $VM, 113: $VN, 117: 84 }, o($Vy, [2, 178]), o($Vy, [2, 179]), o($Vy, [2, 180]), o($Vy, [2, 181]), o($VO, [2, 47]), o($VO, [2, 49], { 44: [1, 96] }), o($VP, [2, 67], { 110: 109, 29: [1, 97], 42: $Vd, 46: [1, 98], 48: [1, 99], 50: [1, 100], 52: [1, 101], 54: [1, 102], 56: [1, 103], 58: $Ve, 61: [1, 104], 63: [1, 105], 65: [1, 106], 66: [1, 107], 68: [1, 108], 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 111: $Vq, 112: $Vr, 113: $Vs }), o($VQ, [2, 174]), o($VQ, [2, 135]), o($VQ, [2, 136]), o($VQ, [2, 137]), o($VQ, [2, 138]), o($VQ, [2, 139]), o($VQ, [2, 140]), o($VQ, [2, 141]), o($VQ, [2, 142]), o($VQ, [2, 143]), o($VQ, [2, 144]), o($VQ, [2, 145]), o($V3, [2, 12]), o($V3, [2, 18]), o($V3, [2, 19]), { 9: [1, 110] }, o($VR, [2, 26], { 18: 111, 10: $Vx }), o($Vy, [2, 27]), { 40: 112, 41: 38, 42: $Vd, 43: 39, 45: 40, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs }, o($Vy, [2, 40]), o($Vy, [2, 41]), o($Vy, [2, 42]), o($VS, [2, 71], { 71: 113, 60: [1, 115], 72: [1, 114] }), { 74: 116, 76: 117, 77: [1, 118], 78: [1, 119], 113: $VT, 116: $VU }, o([42, 58, 60, 72, 86, 99, 102, 103, 106, 108, 111, 112, 113], [2, 77]), o($Vy, [2, 28]), o($Vy, [2, 29]), o($Vy, [2, 30]), o($Vy, [2, 31]), o($Vy, [2, 32]), { 10: $VV, 12: $VW, 14: $VX, 27: $VY, 28: 122, 32: $VZ, 42: $V_, 58: $V$, 73: $V01, 77: [1, 124], 78: [1, 125], 80: 135, 81: $V11, 82: $V21, 83: $V31, 84: $V41, 85: $V51, 86: $V61, 87: $V71, 88: 123, 102: $V81, 106: $V91, 108: $Va1, 111: $Vb1, 112: $Vc1, 113: $Vd1 }, o($Ve1, $V4, { 5: 148 }), o($Vy, [2, 37]), o($Vy, [2, 38]), o($VC, [2, 45], { 42: $Vf1 }), { 42: $Vd, 45: 150, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs }, { 99: [1, 151], 100: 152, 102: [1, 153] }, { 42: $Vd, 45: 154, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs }, { 42: $Vd, 45: 155, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs }, o($Vg1, [2, 100], { 10: [1, 156], 93: [1, 157] }), { 77: [1, 158] }, o($Vg1, [2, 108], { 117: 160, 10: [1, 159], 14: $VD, 42: $VE, 58: $VF, 86: $VG, 102: $VH, 103: $VI, 106: $VJ, 108: $VK, 111: $VL, 112: $VM, 113: $VN }), o($Vg1, [2, 110], { 10: [1, 161] }), o($Vh1, [2, 176]), o($Vh1, [2, 163]), o($Vh1, [2, 164]), o($Vh1, [2, 165]), o($Vh1, [2, 166]), o($Vh1, [2, 167]), o($Vh1, [2, 168]), o($Vh1, [2, 169]), o($Vh1, [2, 170]), o($Vh1, [2, 171]), o($Vh1, [2, 172]), o($Vh1, [2, 173]), { 42: $Vd, 45: 162, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs }, { 30: 163, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 171, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 173, 48: [1, 172], 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 174, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 175, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 176, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 106: [1, 177] }, { 30: 178, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 179, 63: [1, 180], 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 181, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 182, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 183, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($VQ, [2, 175]), o($V3, [2, 20]), o($VR, [2, 25]), o($VC, [2, 43], { 18: 184, 10: $Vx }), o($VS, [2, 68], { 10: [1, 185] }), { 10: [1, 186] }, { 30: 187, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 75: [1, 188], 76: 189, 113: $VT, 116: $VU }, o($Vo1, [2, 73]), o($Vo1, [2, 75]), o($Vo1, [2, 76]), o($Vo1, [2, 161]), o($Vo1, [2, 162]), { 8: $Vz, 9: $VA, 10: $VV, 11: $VB, 12: $VW, 14: $VX, 21: 191, 27: $VY, 29: [1, 190], 32: $VZ, 42: $V_, 58: $V$, 73: $V01, 80: 135, 81: $V11, 82: $V21, 83: $V31, 84: $V41, 85: $V51, 86: $V61, 87: $V71, 88: 192, 102: $V81, 106: $V91, 108: $Va1, 111: $Vb1, 112: $Vc1, 113: $Vd1 }, o($Vp1, [2, 94]), o($Vp1, [2, 96]), o($Vp1, [2, 97]), o($Vp1, [2, 150]), o($Vp1, [2, 151]), o($Vp1, [2, 152]), o($Vp1, [2, 153]), o($Vp1, [2, 154]), o($Vp1, [2, 155]), o($Vp1, [2, 156]), o($Vp1, [2, 157]), o($Vp1, [2, 158]), o($Vp1, [2, 159]), o($Vp1, [2, 160]), o($Vp1, [2, 83]), o($Vp1, [2, 84]), o($Vp1, [2, 85]), o($Vp1, [2, 86]), o($Vp1, [2, 87]), o($Vp1, [2, 88]), o($Vp1, [2, 89]), o($Vp1, [2, 90]), o($Vp1, [2, 91]), o($Vp1, [2, 92]), o($Vp1, [2, 93]), { 6: 11, 7: 12, 8: $V5, 9: $V6, 10: $V7, 11: $V8, 20: 17, 22: 18, 23: 19, 24: 20, 25: 21, 26: 22, 27: $V9, 32: [1, 193], 33: 24, 34: $Va, 36: $Vb, 38: $Vc, 40: 28, 41: 38, 42: $Vd, 43: 39, 45: 40, 58: $Ve, 81: $Vf, 82: $Vg, 83: $Vh, 84: $Vi, 85: $Vj, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs, 118: $Vt, 119: $Vu, 120: $Vv, 121: $Vw }, { 10: $Vx, 18: 194 }, { 10: [1, 195], 42: $Vd, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 109, 111: $Vq, 112: $Vr, 113: $Vs }, { 10: [1, 196] }, { 10: [1, 197], 103: [1, 198] }, o($Vq1, [2, 121]), { 10: [1, 199], 42: $Vd, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 109, 111: $Vq, 112: $Vr, 113: $Vs }, { 10: [1, 200], 42: $Vd, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 109, 111: $Vq, 112: $Vr, 113: $Vs }, { 77: [1, 201] }, o($Vg1, [2, 102], { 10: [1, 202] }), o($Vg1, [2, 104], { 10: [1, 203] }), { 77: [1, 204] }, o($Vh1, [2, 177]), { 77: [1, 205], 95: [1, 206] }, o($VO, [2, 50], { 110: 109, 42: $Vd, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 111: $Vq, 112: $Vr, 113: $Vs }), { 31: [1, 207], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($Vr1, [2, 79]), o($Vr1, [2, 81]), o($Vr1, [2, 82]), o($Vr1, [2, 146]), o($Vr1, [2, 147]), o($Vr1, [2, 148]), o($Vr1, [2, 149]), { 47: [1, 209], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 210, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 49: [1, 211], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 51: [1, 212], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 53: [1, 213], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 55: [1, 214], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 58: [1, 215] }, { 62: [1, 216], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 64: [1, 217], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 218, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 31: [1, 219], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 65: $Vi1, 67: [1, 220], 69: [1, 221], 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 65: $Vi1, 67: [1, 223], 69: [1, 222], 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($VC, [2, 44], { 42: $Vf1 }), o($VS, [2, 70]), o($VS, [2, 69]), { 60: [1, 224], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($VS, [2, 72]), o($Vo1, [2, 74]), { 30: 225, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($Ve1, $V4, { 5: 226 }), o($Vp1, [2, 95]), o($Vy, [2, 35]), { 41: 227, 42: $Vd, 43: 39, 45: 40, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs }, { 10: $Vs1, 58: $Vt1, 81: $Vu1, 89: 228, 102: $Vv1, 104: 229, 105: 230, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }, { 10: $Vs1, 58: $Vt1, 81: $Vu1, 89: 239, 101: [1, 240], 102: $Vv1, 104: 229, 105: 230, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }, { 10: $Vs1, 58: $Vt1, 81: $Vu1, 89: 241, 101: [1, 242], 102: $Vv1, 104: 229, 105: 230, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }, { 102: [1, 243] }, { 10: $Vs1, 58: $Vt1, 81: $Vu1, 89: 244, 102: $Vv1, 104: 229, 105: 230, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }, { 42: $Vd, 45: 245, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs }, o($Vg1, [2, 101]), { 77: [1, 246] }, { 77: [1, 247], 95: [1, 248] }, o($Vg1, [2, 109]), o($Vg1, [2, 111], { 10: [1, 249] }), o($Vg1, [2, 112]), o($VP, [2, 51]), o($Vr1, [2, 80]), o($VP, [2, 52]), { 49: [1, 250], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($VP, [2, 59]), o($VP, [2, 54]), o($VP, [2, 55]), o($VP, [2, 56]), { 106: [1, 251] }, o($VP, [2, 58]), o($VP, [2, 60]), { 64: [1, 252], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($VP, [2, 62]), o($VP, [2, 63]), o($VP, [2, 65]), o($VP, [2, 64]), o($VP, [2, 66]), o([10, 42, 58, 86, 99, 102, 103, 106, 108, 111, 112, 113], [2, 78]), { 31: [1, 253], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 6: 11, 7: 12, 8: $V5, 9: $V6, 10: $V7, 11: $V8, 20: 17, 22: 18, 23: 19, 24: 20, 25: 21, 26: 22, 27: $V9, 32: [1, 254], 33: 24, 34: $Va, 36: $Vb, 38: $Vc, 40: 28, 41: 38, 42: $Vd, 43: 39, 45: 40, 58: $Ve, 81: $Vf, 82: $Vg, 83: $Vh, 84: $Vi, 85: $Vj, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs, 118: $Vt, 119: $Vu, 120: $Vv, 121: $Vw }, o($VO, [2, 48]), o($Vg1, [2, 114], { 103: $VA1 }), o($VB1, [2, 123], { 105: 256, 10: $Vs1, 58: $Vt1, 81: $Vu1, 102: $Vv1, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }), o($VC1, [2, 125]), o($VC1, [2, 127]), o($VC1, [2, 128]), o($VC1, [2, 129]), o($VC1, [2, 130]), o($VC1, [2, 131]), o($VC1, [2, 132]), o($VC1, [2, 133]), o($VC1, [2, 134]), o($Vg1, [2, 115], { 103: $VA1 }), { 10: [1, 257] }, o($Vg1, [2, 116], { 103: $VA1 }), { 10: [1, 258] }, o($Vq1, [2, 122]), o($Vg1, [2, 98], { 103: $VA1 }), o($Vg1, [2, 99], { 110: 109, 42: $Vd, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 111: $Vq, 112: $Vr, 113: $Vs }), o($Vg1, [2, 103]), o($Vg1, [2, 105], { 10: [1, 259] }), o($Vg1, [2, 106]), { 95: [1, 260] }, { 49: [1, 261] }, { 60: [1, 262] }, { 64: [1, 263] }, { 8: $Vz, 9: $VA, 11: $VB, 21: 264 }, o($Vy, [2, 34]), { 10: $Vs1, 58: $Vt1, 81: $Vu1, 102: $Vv1, 104: 265, 105: 230, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }, o($VC1, [2, 126]), { 14: $VD, 42: $VE, 58: $VF, 86: $VG, 98: 266, 102: $VH, 103: $VI, 106: $VJ, 108: $VK, 111: $VL, 112: $VM, 113: $VN, 117: 84 }, { 14: $VD, 42: $VE, 58: $VF, 86: $VG, 98: 267, 102: $VH, 103: $VI, 106: $VJ, 108: $VK, 111: $VL, 112: $VM, 113: $VN, 117: 84 }, { 95: [1, 268] }, o($Vg1, [2, 113]), o($VP, [2, 53]), { 30: 269, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($VP, [2, 61]), o($Ve1, $V4, { 5: 270 }), o($VB1, [2, 124], { 105: 256, 10: $Vs1, 58: $Vt1, 81: $Vu1, 102: $Vv1, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }), o($Vg1, [2, 119], { 117: 160, 10: [1, 271], 14: $VD, 42: $VE, 58: $VF, 86: $VG, 102: $VH, 103: $VI, 106: $VJ, 108: $VK, 111: $VL, 112: $VM, 113: $VN }), o($Vg1, [2, 120], { 117: 160, 10: [1, 272], 14: $VD, 42: $VE, 58: $VF, 86: $VG, 102: $VH, 103: $VI, 106: $VJ, 108: $VK, 111: $VL, 112: $VM, 113: $VN }), o($Vg1, [2, 107]), { 31: [1, 273], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 6: 11, 7: 12, 8: $V5, 9: $V6, 10: $V7, 11: $V8, 20: 17, 22: 18, 23: 19, 24: 20, 25: 21, 26: 22, 27: $V9, 32: [1, 274], 33: 24, 34: $Va, 36: $Vb, 38: $Vc, 40: 28, 41: 38, 42: $Vd, 43: 39, 45: 40, 58: $Ve, 81: $Vf, 82: $Vg, 83: $Vh, 84: $Vi, 85: $Vj, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs, 118: $Vt, 119: $Vu, 120: $Vv, 121: $Vw }, { 10: $Vs1, 58: $Vt1, 81: $Vu1, 89: 275, 102: $Vv1, 104: 229, 105: 230, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }, { 10: $Vs1, 58: $Vt1, 81: $Vu1, 89: 276, 102: $Vv1, 104: 229, 105: 230, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }, o($VP, [2, 57]), o($Vy, [2, 33]), o($Vg1, [2, 117], { 103: $VA1 }), o($Vg1, [2, 118], { 103: $VA1 })], - defaultActions: {}, - parseError: function parseError(str, hash) { - if (hash.recoverable) { - this.trace(str); - } else { - var error = new Error(str); - error.hash = hash; - throw error; - } - }, - parse: function parse(input) { - var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; - var args = lstack.slice.call(arguments, 1); - var lexer2 = Object.create(this.lexer); - var sharedState = { yy: {} }; - for (var k in this.yy) { - if (Object.prototype.hasOwnProperty.call(this.yy, k)) { - sharedState.yy[k] = this.yy[k]; - } - } - lexer2.setInput(input, sharedState.yy); - sharedState.yy.lexer = lexer2; - sharedState.yy.parser = this; - if (typeof lexer2.yylloc == "undefined") { - lexer2.yylloc = {}; - } - var yyloc = lexer2.yylloc; - lstack.push(yyloc); - var ranges = lexer2.options && lexer2.options.ranges; - if (typeof sharedState.yy.parseError === "function") { - this.parseError = sharedState.yy.parseError; - } else { - this.parseError = Object.getPrototypeOf(this).parseError; - } - function lex2() { - var token; - token = tstack.pop() || lexer2.lex() || EOF; - if (typeof token !== "number") { - if (token instanceof Array) { - tstack = token; - token = tstack.pop(); - } - token = self.symbols_[token] || token; - } - return token; - } - var symbol, state, action, r, yyval = {}, p, len, newState, expected; - while (true) { - state = stack[stack.length - 1]; - if (this.defaultActions[state]) { - action = this.defaultActions[state]; - } else { - if (symbol === null || typeof symbol == "undefined") { - symbol = lex2(); - } - action = table[state] && table[state][symbol]; - } - if (typeof action === "undefined" || !action.length || !action[0]) { - var errStr = ""; - expected = []; - for (p in table[state]) { - if (this.terminals_[p] && p > TERROR) { - expected.push("'" + this.terminals_[p] + "'"); - } - } - if (lexer2.showPosition) { - errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; - } else { - errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); - } - this.parseError(errStr, { - text: lexer2.match, - token: this.terminals_[symbol] || symbol, - line: lexer2.yylineno, - loc: yyloc, - expected - }); - } - if (action[0] instanceof Array && action.length > 1) { - throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); - } - switch (action[0]) { - case 1: - stack.push(symbol); - vstack.push(lexer2.yytext); - lstack.push(lexer2.yylloc); - stack.push(action[1]); - symbol = null; - { - yyleng = lexer2.yyleng; - yytext = lexer2.yytext; - yylineno = lexer2.yylineno; - yyloc = lexer2.yylloc; - } - break; - case 2: - len = this.productions_[action[1]][1]; - yyval.$ = vstack[vstack.length - len]; - yyval._$ = { - first_line: lstack[lstack.length - (len || 1)].first_line, - last_line: lstack[lstack.length - 1].last_line, - first_column: lstack[lstack.length - (len || 1)].first_column, - last_column: lstack[lstack.length - 1].last_column - }; - if (ranges) { - yyval._$.range = [ - lstack[lstack.length - (len || 1)].range[0], - lstack[lstack.length - 1].range[1] - ]; - } - r = this.performAction.apply(yyval, [ - yytext, - yyleng, - yylineno, - sharedState.yy, - action[1], - vstack, - lstack - ].concat(args)); - if (typeof r !== "undefined") { - return r; - } - if (len) { - stack = stack.slice(0, -1 * len * 2); - vstack = vstack.slice(0, -1 * len); - lstack = lstack.slice(0, -1 * len); - } - stack.push(this.productions_[action[1]][0]); - vstack.push(yyval.$); - lstack.push(yyval._$); - newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; - stack.push(newState); - break; - case 3: - return true; - } - } - return true; - } - }; - var lexer = function() { - var lexer2 = { - EOF: 1, - parseError: function parseError(str, hash) { - if (this.yy.parser) { - this.yy.parser.parseError(str, hash); - } else { - throw new Error(str); - } - }, - // resets the lexer, sets new input - setInput: function(input, yy) { - this.yy = yy || this.yy || {}; - this._input = input; - this._more = this._backtrack = this.done = false; - this.yylineno = this.yyleng = 0; - this.yytext = this.matched = this.match = ""; - this.conditionStack = ["INITIAL"]; - this.yylloc = { - first_line: 1, - first_column: 0, - last_line: 1, - last_column: 0 - }; - if (this.options.ranges) { - this.yylloc.range = [0, 0]; - } - this.offset = 0; - return this; - }, - // consumes and returns one char from the input - input: function() { - var ch = this._input[0]; - this.yytext += ch; - this.yyleng++; - this.offset++; - this.match += ch; - this.matched += ch; - var lines = ch.match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno++; - this.yylloc.last_line++; - } else { - this.yylloc.last_column++; - } - if (this.options.ranges) { - this.yylloc.range[1]++; - } - this._input = this._input.slice(1); - return ch; - }, - // unshifts one char (or a string) into the input - unput: function(ch) { - var len = ch.length; - var lines = ch.split(/(?:\r\n?|\n)/g); - this._input = ch + this._input; - this.yytext = this.yytext.substr(0, this.yytext.length - len); - this.offset -= len; - var oldLines = this.match.split(/(?:\r\n?|\n)/g); - this.match = this.match.substr(0, this.match.length - 1); - this.matched = this.matched.substr(0, this.matched.length - 1); - if (lines.length - 1) { - this.yylineno -= lines.length - 1; - } - var r = this.yylloc.range; - this.yylloc = { - first_line: this.yylloc.first_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.first_column, - last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len - }; - if (this.options.ranges) { - this.yylloc.range = [r[0], r[0] + this.yyleng - len]; - } - this.yyleng = this.yytext.length; - return this; - }, - // When called from action, caches matched text and appends it on next action - more: function() { - this._more = true; - return this; - }, - // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. - reject: function() { - if (this.options.backtrack_lexer) { - this._backtrack = true; - } else { - return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), { - text: "", - token: null, - line: this.yylineno - }); - } - return this; - }, - // retain first n characters of the match - less: function(n) { - this.unput(this.match.slice(n)); - }, - // displays already matched input, i.e. for error messages - pastInput: function() { - var past = this.matched.substr(0, this.matched.length - this.match.length); - return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); - }, - // displays upcoming input, i.e. for error messages - upcomingInput: function() { - var next = this.match; - if (next.length < 20) { - next += this._input.substr(0, 20 - next.length); - } - return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); - }, - // displays the character position where the lexing error occurred, i.e. for error messages - showPosition: function() { - var pre = this.pastInput(); - var c = new Array(pre.length + 1).join("-"); - return pre + this.upcomingInput() + "\n" + c + "^"; - }, - // test the lexed token: return FALSE when not a match, otherwise return token - test_match: function(match, indexed_rule) { - var token, lines, backup; - if (this.options.backtrack_lexer) { - backup = { - yylineno: this.yylineno, - yylloc: { - first_line: this.yylloc.first_line, - last_line: this.last_line, - first_column: this.yylloc.first_column, - last_column: this.yylloc.last_column - }, - yytext: this.yytext, - match: this.match, - matches: this.matches, - matched: this.matched, - yyleng: this.yyleng, - offset: this.offset, - _more: this._more, - _input: this._input, - yy: this.yy, - conditionStack: this.conditionStack.slice(0), - done: this.done - }; - if (this.options.ranges) { - backup.yylloc.range = this.yylloc.range.slice(0); - } - } - lines = match[0].match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno += lines.length; - } - this.yylloc = { - first_line: this.yylloc.last_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.last_column, - last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length - }; - this.yytext += match[0]; - this.match += match[0]; - this.matches = match; - this.yyleng = this.yytext.length; - if (this.options.ranges) { - this.yylloc.range = [this.offset, this.offset += this.yyleng]; - } - this._more = false; - this._backtrack = false; - this._input = this._input.slice(match[0].length); - this.matched += match[0]; - token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); - if (this.done && this._input) { - this.done = false; - } - if (token) { - return token; - } else if (this._backtrack) { - for (var k in backup) { - this[k] = backup[k]; - } - return false; - } - return false; - }, - // return next match in input - next: function() { - if (this.done) { - return this.EOF; - } - if (!this._input) { - this.done = true; - } - var token, match, tempMatch, index; - if (!this._more) { - this.yytext = ""; - this.match = ""; - } - var rules = this._currentRules(); - for (var i = 0; i < rules.length; i++) { - tempMatch = this._input.match(this.rules[rules[i]]); - if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { - match = tempMatch; - index = i; - if (this.options.backtrack_lexer) { - token = this.test_match(tempMatch, rules[i]); - if (token !== false) { - return token; - } else if (this._backtrack) { - match = false; - continue; - } else { - return false; - } - } else if (!this.options.flex) { - break; - } - } - } - if (match) { - token = this.test_match(match, rules[index]); - if (token !== false) { - return token; - } - return false; - } - if (this._input === "") { - return this.EOF; - } else { - return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { - text: "", - token: null, - line: this.yylineno - }); - } - }, - // return next match that has a token - lex: function lex2() { - var r = this.next(); - if (r) { - return r; - } else { - return this.lex(); - } - }, - // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) - begin: function begin(condition) { - this.conditionStack.push(condition); - }, - // pop the previously active lexer condition state off the condition stack - popState: function popState() { - var n = this.conditionStack.length - 1; - if (n > 0) { - return this.conditionStack.pop(); - } else { - return this.conditionStack[0]; - } - }, - // produce the lexer rule set which is active for the currently active lexer condition state - _currentRules: function _currentRules() { - if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { - return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; - } else { - return this.conditions["INITIAL"].rules; - } - }, - // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available - topState: function topState(n) { - n = this.conditionStack.length - 1 - Math.abs(n || 0); - if (n >= 0) { - return this.conditionStack[n]; - } else { - return "INITIAL"; - } - }, - // alias for begin(condition) - pushState: function pushState(condition) { - this.begin(condition); - }, - // return the number of states currently on the stack - stateStackSize: function stateStackSize() { - return this.conditionStack.length; - }, - options: {}, - performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { - switch ($avoiding_name_collisions) { - case 0: - this.begin("acc_title"); - return 34; - case 1: - this.popState(); - return "acc_title_value"; - case 2: - this.begin("acc_descr"); - return 36; - case 3: - this.popState(); - return "acc_descr_value"; - case 4: - this.begin("acc_descr_multiline"); - break; - case 5: - this.popState(); - break; - case 6: - return "acc_descr_multiline_value"; - case 7: - this.begin("callbackname"); - break; - case 8: - this.popState(); - break; - case 9: - this.popState(); - this.begin("callbackargs"); - break; - case 10: - return 92; - case 11: - this.popState(); - break; - case 12: - return 93; - case 13: - return "MD_STR"; - case 14: - this.popState(); - break; - case 15: - this.begin("md_string"); - break; - case 16: - return "STR"; - case 17: - this.popState(); - break; - case 18: - this.pushState("string"); - break; - case 19: - return 81; - case 20: - return 99; - case 21: - return 82; - case 22: - return 101; - case 23: - return 83; - case 24: - return 84; - case 25: - return 94; - case 26: - this.begin("click"); - break; - case 27: - this.popState(); - break; - case 28: - return 85; - case 29: - if (yy.lex.firstGraph()) { - this.begin("dir"); - } - return 12; - case 30: - if (yy.lex.firstGraph()) { - this.begin("dir"); - } - return 12; - case 31: - if (yy.lex.firstGraph()) { - this.begin("dir"); - } - return 12; - case 32: - return 27; - case 33: - return 32; - case 34: - return 95; - case 35: - return 95; - case 36: - return 95; - case 37: - return 95; - case 38: - this.popState(); - return 13; - case 39: - this.popState(); - return 14; - case 40: - this.popState(); - return 14; - case 41: - this.popState(); - return 14; - case 42: - this.popState(); - return 14; - case 43: - this.popState(); - return 14; - case 44: - this.popState(); - return 14; - case 45: - this.popState(); - return 14; - case 46: - this.popState(); - return 14; - case 47: - this.popState(); - return 14; - case 48: - this.popState(); - return 14; - case 49: - return 118; - case 50: - return 119; - case 51: - return 120; - case 52: - return 121; - case 53: - return 102; - case 54: - return 108; - case 55: - return 44; - case 56: - return 58; - case 57: - return 42; - case 58: - return 8; - case 59: - return 103; - case 60: - return 112; - case 61: - this.popState(); - return 75; - case 62: - this.pushState("edgeText"); - return 73; - case 63: - return 116; - case 64: - this.popState(); - return 75; - case 65: - this.pushState("thickEdgeText"); - return 73; - case 66: - return 116; - case 67: - this.popState(); - return 75; - case 68: - this.pushState("dottedEdgeText"); - return 73; - case 69: - return 116; - case 70: - return 75; - case 71: - this.popState(); - return 51; - case 72: - return "TEXT"; - case 73: - this.pushState("ellipseText"); - return 50; - case 74: - this.popState(); - return 53; - case 75: - this.pushState("text"); - return 52; - case 76: - this.popState(); - return 55; - case 77: - this.pushState("text"); - return 54; - case 78: - return 56; - case 79: - this.pushState("text"); - return 65; - case 80: - this.popState(); - return 62; - case 81: - this.pushState("text"); - return 61; - case 82: - this.popState(); - return 47; - case 83: - this.pushState("text"); - return 46; - case 84: - this.popState(); - return 67; - case 85: - this.popState(); - return 69; - case 86: - return 114; - case 87: - this.pushState("trapText"); - return 66; - case 88: - this.pushState("trapText"); - return 68; - case 89: - return 115; - case 90: - return 65; - case 91: - return 87; - case 92: - return "SEP"; - case 93: - return 86; - case 94: - return 112; - case 95: - return 108; - case 96: - return 42; - case 97: - return 106; - case 98: - return 111; - case 99: - return 113; - case 100: - this.popState(); - return 60; - case 101: - this.pushState("text"); - return 60; - case 102: - this.popState(); - return 49; - case 103: - this.pushState("text"); - return 48; - case 104: - this.popState(); - return 31; - case 105: - this.pushState("text"); - return 29; - case 106: - this.popState(); - return 64; - case 107: - this.pushState("text"); - return 63; - case 108: - return "TEXT"; - case 109: - return "QUOTE"; - case 110: - return 9; - case 111: - return 10; - case 112: - return 11; - } - }, - rules: [/^(?:accTitle\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*\{\s*)/, /^(?:[\}])/, /^(?:[^\}]*)/, /^(?:call[\s]+)/, /^(?:\([\s]*\))/, /^(?:\()/, /^(?:[^(]*)/, /^(?:\))/, /^(?:[^)]*)/, /^(?:[^`"]+)/, /^(?:[`]["])/, /^(?:["][`])/, /^(?:[^"]+)/, /^(?:["])/, /^(?:["])/, /^(?:style\b)/, /^(?:default\b)/, /^(?:linkStyle\b)/, /^(?:interpolate\b)/, /^(?:classDef\b)/, /^(?:class\b)/, /^(?:href[\s])/, /^(?:click[\s]+)/, /^(?:[\s\n])/, /^(?:[^\s\n]*)/, /^(?:flowchart-elk\b)/, /^(?:graph\b)/, /^(?:flowchart\b)/, /^(?:subgraph\b)/, /^(?:end\b\s*)/, /^(?:_self\b)/, /^(?:_blank\b)/, /^(?:_parent\b)/, /^(?:_top\b)/, /^(?:(\r?\n)*\s*\n)/, /^(?:\s*LR\b)/, /^(?:\s*RL\b)/, /^(?:\s*TB\b)/, /^(?:\s*BT\b)/, /^(?:\s*TD\b)/, /^(?:\s*BR\b)/, /^(?:\s*<)/, /^(?:\s*>)/, /^(?:\s*\^)/, /^(?:\s*v\b)/, /^(?:.*direction\s+TB[^\n]*)/, /^(?:.*direction\s+BT[^\n]*)/, /^(?:.*direction\s+RL[^\n]*)/, /^(?:.*direction\s+LR[^\n]*)/, /^(?:[0-9]+)/, /^(?:#)/, /^(?::::)/, /^(?::)/, /^(?:&)/, /^(?:;)/, /^(?:,)/, /^(?:\*)/, /^(?:\s*[xo<]?--+[-xo>]\s*)/, /^(?:\s*[xo<]?--\s*)/, /^(?:[^-]|-(?!-)+)/, /^(?:\s*[xo<]?==+[=xo>]\s*)/, /^(?:\s*[xo<]?==\s*)/, /^(?:[^=]|=(?!))/, /^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/, /^(?:\s*[xo<]?-\.\s*)/, /^(?:[^\.]|\.(?!))/, /^(?:\s*~~[\~]+\s*)/, /^(?:[-/\)][\)])/, /^(?:[^\(\)\[\]\{\}]|!\)+)/, /^(?:\(-)/, /^(?:\]\))/, /^(?:\(\[)/, /^(?:\]\])/, /^(?:\[\[)/, /^(?:\[\|)/, /^(?:>)/, /^(?:\)\])/, /^(?:\[\()/, /^(?:\)\)\))/, /^(?:\(\(\()/, /^(?:[\\(?=\])][\]])/, /^(?:\/(?=\])\])/, /^(?:\/(?!\])|\\(?!\])|[^\\\[\]\(\)\{\}\/]+)/, /^(?:\[\/)/, /^(?:\[\\)/, /^(?:<)/, /^(?:>)/, /^(?:\^)/, /^(?:\\\|)/, /^(?:v\b)/, /^(?:\*)/, /^(?:#)/, /^(?:&)/, /^(?:([A-Za-z0-9!"\#$%&'*+\.`?\\_\/]|-(?=[^\>\-\.])|(?!))+)/, /^(?:-)/, /^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/, /^(?:\|)/, /^(?:\|)/, /^(?:\))/, /^(?:\()/, /^(?:\])/, /^(?:\[)/, /^(?:(\}))/, /^(?:\{)/, /^(?:[^\[\]\(\)\{\}\|\"]+)/, /^(?:")/, /^(?:(\r?\n)+)/, /^(?:\s)/, /^(?:$)/], - conditions: { "callbackargs": { "rules": [11, 12, 15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "callbackname": { "rules": [8, 9, 10, 15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "href": { "rules": [15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "click": { "rules": [15, 18, 27, 28, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "dottedEdgeText": { "rules": [15, 18, 67, 69, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "thickEdgeText": { "rules": [15, 18, 64, 66, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "edgeText": { "rules": [15, 18, 61, 63, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "trapText": { "rules": [15, 18, 70, 73, 75, 77, 81, 83, 84, 85, 86, 87, 88, 101, 103, 105, 107], "inclusive": false }, "ellipseText": { "rules": [15, 18, 70, 71, 72, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "text": { "rules": [15, 18, 70, 73, 74, 75, 76, 77, 80, 81, 82, 83, 87, 88, 100, 101, 102, 103, 104, 105, 106, 107, 108], "inclusive": false }, "vertex": { "rules": [15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "dir": { "rules": [15, 18, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "acc_descr_multiline": { "rules": [5, 6, 15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "acc_descr": { "rules": [3, 15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "acc_title": { "rules": [1, 15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "md_string": { "rules": [13, 14, 15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "string": { "rules": [15, 16, 17, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "INITIAL": { "rules": [0, 2, 4, 7, 15, 18, 19, 20, 21, 22, 23, 24, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 64, 65, 67, 68, 70, 73, 75, 77, 78, 79, 81, 83, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 101, 103, 105, 107, 109, 110, 111, 112], "inclusive": true } } - }; - return lexer2; - }(); - parser2.lexer = lexer; - function Parser() { - this.yy = {}; - } - Parser.prototype = parser2; - parser2.Parser = Parser; - return new Parser(); -}(); -parser.parser = parser; -const parser$1 = parser; -const MERMAID_DOM_ID_PREFIX = "flowchart-"; -let vertexCounter = 0; -let config = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)(); -let vertices = {}; -let edges = []; -let classes = {}; -let subGraphs = []; -let subGraphLookup = {}; -let tooltips = {}; -let subCount = 0; -let firstGraphFlag = true; -let direction; -let version; -let funs = []; -const sanitizeText = (txt) => _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.e.sanitizeText(txt, config); -const lookUpDomId = function(id) { - const vertexKeys = Object.keys(vertices); - for (const vertexKey of vertexKeys) { - if (vertices[vertexKey].id === id) { - return vertices[vertexKey].domId; - } - } - return id; -}; -const addVertex = function(_id, textObj, type, style, classes2, dir, props = {}) { - let txt; - let id = _id; - if (id === void 0) { - return; - } - if (id.trim().length === 0) { - return; - } - if (vertices[id] === void 0) { - vertices[id] = { - id, - labelType: "text", - domId: MERMAID_DOM_ID_PREFIX + id + "-" + vertexCounter, - styles: [], - classes: [] - }; - } - vertexCounter++; - if (textObj !== void 0) { - config = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)(); - txt = sanitizeText(textObj.text.trim()); - vertices[id].labelType = textObj.type; - if (txt[0] === '"' && txt[txt.length - 1] === '"') { - txt = txt.substring(1, txt.length - 1); - } - vertices[id].text = txt; - } else { - if (vertices[id].text === void 0) { - vertices[id].text = _id; - } - } - if (type !== void 0) { - vertices[id].type = type; - } - if (style !== void 0 && style !== null) { - style.forEach(function(s) { - vertices[id].styles.push(s); - }); - } - if (classes2 !== void 0 && classes2 !== null) { - classes2.forEach(function(s) { - vertices[id].classes.push(s); - }); - } - if (dir !== void 0) { - vertices[id].dir = dir; - } - if (vertices[id].props === void 0) { - vertices[id].props = props; - } else if (props !== void 0) { - Object.assign(vertices[id].props, props); - } -}; -const addSingleLink = function(_start, _end, type) { - let start = _start; - let end = _end; - const edge = { start, end, type: void 0, text: "", labelType: "text" }; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.info("abc78 Got edge...", edge); - const linkTextObj = type.text; - if (linkTextObj !== void 0) { - edge.text = sanitizeText(linkTextObj.text.trim()); - if (edge.text[0] === '"' && edge.text[edge.text.length - 1] === '"') { - edge.text = edge.text.substring(1, edge.text.length - 1); - } - edge.labelType = linkTextObj.type; - } - if (type !== void 0) { - edge.type = type.type; - edge.stroke = type.stroke; - edge.length = type.length; - } - if ((edge == null ? void 0 : edge.length) > 10) { - edge.length = 10; - } - if (edges.length < (config.maxEdges ?? 500)) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.info("abc78 pushing edge..."); - edges.push(edge); - } else { - throw new Error( - `Edge limit exceeded. ${edges.length} edges found, but the limit is ${config.maxEdges}. - -Initialize mermaid with maxEdges set to a higher number to allow more edges. -You cannot set this config via configuration inside the diagram as it is a secure config. -You have to call mermaid.initialize.` - ); - } -}; -const addLink = function(_start, _end, type) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.info("addLink (abc78)", _start, _end, type); - let i, j; - for (i = 0; i < _start.length; i++) { - for (j = 0; j < _end.length; j++) { - addSingleLink(_start[i], _end[j], type); - } - } -}; -const updateLinkInterpolate = function(positions, interp) { - positions.forEach(function(pos) { - if (pos === "default") { - edges.defaultInterpolate = interp; - } else { - edges[pos].interpolate = interp; - } - }); -}; -const updateLink = function(positions, style) { - positions.forEach(function(pos) { - if (pos >= edges.length) { - throw new Error( - `The index ${pos} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${edges.length - 1}. (Help: Ensure that the index is within the range of existing edges.)` - ); - } - if (pos === "default") { - edges.defaultStyle = style; - } else { - if (_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.u.isSubstringInArray("fill", style) === -1) { - style.push("fill:none"); - } - edges[pos].style = style; - } - }); -}; -const addClass = function(ids, style) { - ids.split(",").forEach(function(id) { - if (classes[id] === void 0) { - classes[id] = { id, styles: [], textStyles: [] }; - } - if (style !== void 0 && style !== null) { - style.forEach(function(s) { - if (s.match("color")) { - const newStyle = s.replace("fill", "bgFill").replace("color", "fill"); - classes[id].textStyles.push(newStyle); - } - classes[id].styles.push(s); - }); - } - }); -}; -const setDirection = function(dir) { - direction = dir; - if (direction.match(/.*/)) { - direction = "LR"; - } - if (direction.match(/.*v/)) { - direction = "TB"; - } - if (direction === "TD") { - direction = "TB"; - } -}; -const setClass = function(ids, className) { - ids.split(",").forEach(function(_id) { - let id = _id; - if (vertices[id] !== void 0) { - vertices[id].classes.push(className); - } - if (subGraphLookup[id] !== void 0) { - subGraphLookup[id].classes.push(className); - } - }); -}; -const setTooltip = function(ids, tooltip) { - ids.split(",").forEach(function(id) { - if (tooltip !== void 0) { - tooltips[version === "gen-1" ? lookUpDomId(id) : id] = sanitizeText(tooltip); - } - }); -}; -const setClickFun = function(id, functionName, functionArgs) { - let domId = lookUpDomId(id); - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().securityLevel !== "loose") { - return; - } - if (functionName === void 0) { - return; - } - let argList = []; - if (typeof functionArgs === "string") { - argList = functionArgs.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/); - for (let i = 0; i < argList.length; i++) { - let item = argList[i].trim(); - if (item.charAt(0) === '"' && item.charAt(item.length - 1) === '"') { - item = item.substr(1, item.length - 2); - } - argList[i] = item; - } - } - if (argList.length === 0) { - argList.push(id); - } - if (vertices[id] !== void 0) { - vertices[id].haveCallback = true; - funs.push(function() { - const elem = document.querySelector(`[id="${domId}"]`); - if (elem !== null) { - elem.addEventListener( - "click", - function() { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.u.runFunc(functionName, ...argList); - }, - false - ); - } - }); - } -}; -const setLink = function(ids, linkStr, target) { - ids.split(",").forEach(function(id) { - if (vertices[id] !== void 0) { - vertices[id].link = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.u.formatUrl(linkStr, config); - vertices[id].linkTarget = target; - } - }); - setClass(ids, "clickable"); -}; -const getTooltip = function(id) { - if (tooltips.hasOwnProperty(id)) { - return tooltips[id]; - } - return void 0; -}; -const setClickEvent = function(ids, functionName, functionArgs) { - ids.split(",").forEach(function(id) { - setClickFun(id, functionName, functionArgs); - }); - setClass(ids, "clickable"); -}; -const bindFunctions = function(element) { - funs.forEach(function(fun) { - fun(element); - }); -}; -const getDirection = function() { - return direction.trim(); -}; -const getVertices = function() { - return vertices; -}; -const getEdges = function() { - return edges; -}; -const getClasses = function() { - return classes; -}; -const setupToolTips = function(element) { - let tooltipElem = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(".mermaidTooltip"); - if ((tooltipElem._groups || tooltipElem)[0][0] === null) { - tooltipElem = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)("body").append("div").attr("class", "mermaidTooltip").style("opacity", 0); - } - const svg = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(element).select("svg"); - const nodes = svg.selectAll("g.node"); - nodes.on("mouseover", function() { - const el = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(this); - const title = el.attr("title"); - if (title === null) { - return; - } - const rect = this.getBoundingClientRect(); - tooltipElem.transition().duration(200).style("opacity", ".9"); - tooltipElem.text(el.attr("title")).style("left", window.scrollX + rect.left + (rect.right - rect.left) / 2 + "px").style("top", window.scrollY + rect.bottom + "px"); - tooltipElem.html(tooltipElem.html().replace(/<br\/>/g, "
")); - el.classed("hover", true); - }).on("mouseout", function() { - tooltipElem.transition().duration(500).style("opacity", 0); - const el = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(this); - el.classed("hover", false); - }); -}; -funs.push(setupToolTips); -const clear = function(ver = "gen-1") { - vertices = {}; - classes = {}; - edges = []; - funs = [setupToolTips]; - subGraphs = []; - subGraphLookup = {}; - subCount = 0; - tooltips = {}; - firstGraphFlag = true; - version = ver; - config = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)(); - (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.v)(); -}; -const setGen = (ver) => { - version = ver || "gen-2"; -}; -const defaultStyle = function() { - return "fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"; -}; -const addSubGraph = function(_id, list, _title) { - let id = _id.text.trim(); - let title = _title.text; - if (_id === _title && _title.text.match(/\s/)) { - id = void 0; - } - function uniq(a) { - const prims = { boolean: {}, number: {}, string: {} }; - const objs = []; - let dir2; - const nodeList2 = a.filter(function(item) { - const type = typeof item; - if (item.stmt && item.stmt === "dir") { - dir2 = item.value; - return false; - } - if (item.trim() === "") { - return false; - } - if (type in prims) { - return prims[type].hasOwnProperty(item) ? false : prims[type][item] = true; - } else { - return objs.includes(item) ? false : objs.push(item); - } - }); - return { nodeList: nodeList2, dir: dir2 }; - } - let nodeList = []; - const { nodeList: nl, dir } = uniq(nodeList.concat.apply(nodeList, list)); - nodeList = nl; - if (version === "gen-1") { - for (let i = 0; i < nodeList.length; i++) { - nodeList[i] = lookUpDomId(nodeList[i]); - } - } - id = id || "subGraph" + subCount; - title = title || ""; - title = sanitizeText(title); - subCount = subCount + 1; - const subGraph = { - id, - nodes: nodeList, - title: title.trim(), - classes: [], - dir, - labelType: _title.type - }; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Adding", subGraph.id, subGraph.nodes, subGraph.dir); - subGraph.nodes = makeUniq(subGraph, subGraphs).nodes; - subGraphs.push(subGraph); - subGraphLookup[id] = subGraph; - return id; -}; -const getPosForId = function(id) { - for (const [i, subGraph] of subGraphs.entries()) { - if (subGraph.id === id) { - return i; - } - } - return -1; -}; -let secCount = -1; -const posCrossRef = []; -const indexNodes2 = function(id, pos) { - const nodes = subGraphs[pos].nodes; - secCount = secCount + 1; - if (secCount > 2e3) { - return; - } - posCrossRef[secCount] = pos; - if (subGraphs[pos].id === id) { - return { - result: true, - count: 0 - }; - } - let count = 0; - let posCount = 1; - while (count < nodes.length) { - const childPos = getPosForId(nodes[count]); - if (childPos >= 0) { - const res = indexNodes2(id, childPos); - if (res.result) { - return { - result: true, - count: posCount + res.count - }; - } else { - posCount = posCount + res.count; - } - } - count = count + 1; - } - return { - result: false, - count: posCount - }; -}; -const getDepthFirstPos = function(pos) { - return posCrossRef[pos]; -}; -const indexNodes = function() { - secCount = -1; - if (subGraphs.length > 0) { - indexNodes2("none", subGraphs.length - 1); - } -}; -const getSubGraphs = function() { - return subGraphs; -}; -const firstGraph = () => { - if (firstGraphFlag) { - firstGraphFlag = false; - return true; - } - return false; -}; -const destructStartLink = (_str) => { - let str = _str.trim(); - let type = "arrow_open"; - switch (str[0]) { - case "<": - type = "arrow_point"; - str = str.slice(1); - break; - case "x": - type = "arrow_cross"; - str = str.slice(1); - break; - case "o": - type = "arrow_circle"; - str = str.slice(1); - break; - } - let stroke = "normal"; - if (str.includes("=")) { - stroke = "thick"; - } - if (str.includes(".")) { - stroke = "dotted"; - } - return { type, stroke }; -}; -const countChar = (char, str) => { - const length = str.length; - let count = 0; - for (let i = 0; i < length; ++i) { - if (str[i] === char) { - ++count; - } - } - return count; -}; -const destructEndLink = (_str) => { - const str = _str.trim(); - let line = str.slice(0, -1); - let type = "arrow_open"; - switch (str.slice(-1)) { - case "x": - type = "arrow_cross"; - if (str[0] === "x") { - type = "double_" + type; - line = line.slice(1); - } - break; - case ">": - type = "arrow_point"; - if (str[0] === "<") { - type = "double_" + type; - line = line.slice(1); - } - break; - case "o": - type = "arrow_circle"; - if (str[0] === "o") { - type = "double_" + type; - line = line.slice(1); - } - break; - } - let stroke = "normal"; - let length = line.length - 1; - if (line[0] === "=") { - stroke = "thick"; - } - if (line[0] === "~") { - stroke = "invisible"; - } - let dots = countChar(".", line); - if (dots) { - stroke = "dotted"; - length = dots; - } - return { type, stroke, length }; -}; -const destructLink = (_str, _startStr) => { - const info = destructEndLink(_str); - let startInfo; - if (_startStr) { - startInfo = destructStartLink(_startStr); - if (startInfo.stroke !== info.stroke) { - return { type: "INVALID", stroke: "INVALID" }; - } - if (startInfo.type === "arrow_open") { - startInfo.type = info.type; - } else { - if (startInfo.type !== info.type) { - return { type: "INVALID", stroke: "INVALID" }; - } - startInfo.type = "double_" + startInfo.type; - } - if (startInfo.type === "double_arrow") { - startInfo.type = "double_arrow_point"; - } - startInfo.length = info.length; - return startInfo; - } - return info; -}; -const exists = (allSgs, _id) => { - let res = false; - allSgs.forEach((sg) => { - const pos = sg.nodes.indexOf(_id); - if (pos >= 0) { - res = true; - } - }); - return res; -}; -const makeUniq = (sg, allSubgraphs) => { - const res = []; - sg.nodes.forEach((_id, pos) => { - if (!exists(allSubgraphs, _id)) { - res.push(sg.nodes[pos]); - } - }); - return { nodes: res }; -}; -const lex = { - firstGraph -}; -const flowDb = { - defaultConfig: () => _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.K.flowchart, - setAccTitle: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.s, - getAccTitle: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.g, - getAccDescription: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.a, - setAccDescription: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.b, - addVertex, - lookUpDomId, - addLink, - updateLinkInterpolate, - updateLink, - addClass, - setDirection, - setClass, - setTooltip, - getTooltip, - setClickEvent, - setLink, - bindFunctions, - getDirection, - getVertices, - getEdges, - getClasses, - clear, - setGen, - defaultStyle, - addSubGraph, - getDepthFirstPos, - indexNodes, - getSubGraphs, - destructLink, - lex, - exists, - makeUniq, - setDiagramTitle: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.q, - getDiagramTitle: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.t -}; -const db = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ - __proto__: null, - addClass, - addLink, - addSingleLink, - addSubGraph, - addVertex, - bindFunctions, - clear, - default: flowDb, - defaultStyle, - destructLink, - firstGraph, - getClasses, - getDepthFirstPos, - getDirection, - getEdges, - getSubGraphs, - getTooltip, - getVertices, - indexNodes, - lex, - lookUpDomId, - setClass, - setClickEvent, - setDirection, - setGen, - setLink, - updateLink, - updateLinkInterpolate -}, Symbol.toStringTag, { value: "Module" })); - - - -/***/ }), - -/***/ 24104: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ diagram: () => (/* binding */ diagram) -/* harmony export */ }); -/* harmony import */ var _flowDb_956e92f1_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(35860); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(26312); -/* harmony import */ var _edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(88146); -/* harmony import */ var _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(86079); -/* harmony import */ var elkjs_lib_elk_bundled_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(62954); -/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(74353); -/* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(16750); -/* harmony import */ var dompurify__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(99418); - - - - - - - - - - - - - - - - -const findCommonAncestor = (id1, id2, treeData) => { - const { parentById } = treeData; - const visited = /* @__PURE__ */ new Set(); - let currentId = id1; - while (currentId) { - visited.add(currentId); - if (currentId === id2) { - return currentId; - } - currentId = parentById[currentId]; - } - currentId = id2; - while (currentId) { - if (visited.has(currentId)) { - return currentId; - } - currentId = parentById[currentId]; - } - return "root"; -}; -const elk = new elkjs_lib_elk_bundled_js__WEBPACK_IMPORTED_MODULE_1__(); -let portPos = {}; -const conf = {}; -let nodeDb = {}; -const addVertices = async function(vert, svgId, root, doc, diagObj, parentLookupDb, graph) { - const svg = root.select(`[id="${svgId}"]`); - const nodes = svg.insert("g").attr("class", "nodes"); - const keys = Object.keys(vert); - await Promise.all( - keys.map(async function(id) { - const vertex = vert[id]; - let classStr = "default"; - if (vertex.classes.length > 0) { - classStr = vertex.classes.join(" "); - } - classStr = classStr + " flowchart-label"; - const styles2 = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__.k)(vertex.styles); - let vertexText = vertex.text !== void 0 ? vertex.text : vertex.id; - const labelData = { width: 0, height: 0 }; - const ports = [ - { - id: vertex.id + "-west", - layoutOptions: { - "port.side": "WEST" - } - }, - { - id: vertex.id + "-east", - layoutOptions: { - "port.side": "EAST" - } - }, - { - id: vertex.id + "-south", - layoutOptions: { - "port.side": "SOUTH" - } - }, - { - id: vertex.id + "-north", - layoutOptions: { - "port.side": "NORTH" - } - } - ]; - let radius = 0; - let _shape = ""; - let layoutOptions = {}; - switch (vertex.type) { - case "round": - radius = 5; - _shape = "rect"; - break; - case "square": - _shape = "rect"; - break; - case "diamond": - _shape = "question"; - layoutOptions = { - portConstraints: "FIXED_SIDE" - }; - break; - case "hexagon": - _shape = "hexagon"; - break; - case "odd": - _shape = "rect_left_inv_arrow"; - break; - case "lean_right": - _shape = "lean_right"; - break; - case "lean_left": - _shape = "lean_left"; - break; - case "trapezoid": - _shape = "trapezoid"; - break; - case "inv_trapezoid": - _shape = "inv_trapezoid"; - break; - case "odd_right": - _shape = "rect_left_inv_arrow"; - break; - case "circle": - _shape = "circle"; - break; - case "ellipse": - _shape = "ellipse"; - break; - case "stadium": - _shape = "stadium"; - break; - case "subroutine": - _shape = "subroutine"; - break; - case "cylinder": - _shape = "cylinder"; - break; - case "group": - _shape = "rect"; - break; - case "doublecircle": - _shape = "doublecircle"; - break; - default: - _shape = "rect"; - } - const node = { - labelStyle: styles2.labelStyle, - shape: _shape, - labelText: vertexText, - labelType: vertex.labelType, - rx: radius, - ry: radius, - class: classStr, - style: styles2.style, - id: vertex.id, - link: vertex.link, - linkTarget: vertex.linkTarget, - tooltip: diagObj.db.getTooltip(vertex.id) || "", - domId: diagObj.db.lookUpDomId(vertex.id), - haveCallback: vertex.haveCallback, - width: vertex.type === "group" ? 500 : void 0, - dir: vertex.dir, - type: vertex.type, - props: vertex.props, - padding: (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__.F)().flowchart.padding - }; - let boundingBox; - let nodeEl; - if (node.type !== "group") { - nodeEl = await (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.e)(nodes, node, vertex.dir); - boundingBox = nodeEl.node().getBBox(); - } else { - doc.createElementNS("http://www.w3.org/2000/svg", "text"); - const { shapeSvg, bbox } = await (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.l)(nodes, node, void 0, true); - labelData.width = bbox.width; - labelData.wrappingWidth = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__.F)().flowchart.wrappingWidth; - labelData.height = bbox.height; - labelData.labelNode = shapeSvg.node(); - node.labelData = labelData; - } - const data = { - id: vertex.id, - ports: vertex.type === "diamond" ? ports : [], - // labelStyle: styles.labelStyle, - // shape: _shape, - layoutOptions, - labelText: vertexText, - labelData, - // labels: [{ text: vertexText }], - // rx: radius, - // ry: radius, - // class: classStr, - // style: styles.style, - // link: vertex.link, - // linkTarget: vertex.linkTarget, - // tooltip: diagObj.db.getTooltip(vertex.id) || '', - domId: diagObj.db.lookUpDomId(vertex.id), - // haveCallback: vertex.haveCallback, - width: boundingBox == null ? void 0 : boundingBox.width, - height: boundingBox == null ? void 0 : boundingBox.height, - // dir: vertex.dir, - type: vertex.type, - // props: vertex.props, - // padding: getConfig().flowchart.padding, - // boundingBox, - el: nodeEl, - parent: parentLookupDb.parentById[vertex.id] - }; - nodeDb[node.id] = data; - }) - ); - return graph; -}; -const getNextPosition = (position, edgeDirection, graphDirection) => { - const portPos2 = { - TB: { - in: { - north: "north" - }, - out: { - south: "west", - west: "east", - east: "south" - } - }, - LR: { - in: { - west: "west" - }, - out: { - east: "south", - south: "north", - north: "east" - } - }, - RL: { - in: { - east: "east" - }, - out: { - west: "north", - north: "south", - south: "west" - } - }, - BT: { - in: { - south: "south" - }, - out: { - north: "east", - east: "west", - west: "north" - } - } - }; - portPos2.TD = portPos2.TB; - return portPos2[graphDirection][edgeDirection][position]; -}; -const getNextPort = (node, edgeDirection, graphDirection) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__.l.info("getNextPort", { node, edgeDirection, graphDirection }); - if (!portPos[node]) { - switch (graphDirection) { - case "TB": - case "TD": - portPos[node] = { - inPosition: "north", - outPosition: "south" - }; - break; - case "BT": - portPos[node] = { - inPosition: "south", - outPosition: "north" - }; - break; - case "RL": - portPos[node] = { - inPosition: "east", - outPosition: "west" - }; - break; - case "LR": - portPos[node] = { - inPosition: "west", - outPosition: "east" - }; - break; - } - } - const result = edgeDirection === "in" ? portPos[node].inPosition : portPos[node].outPosition; - if (edgeDirection === "in") { - portPos[node].inPosition = getNextPosition( - portPos[node].inPosition, - edgeDirection, - graphDirection - ); - } else { - portPos[node].outPosition = getNextPosition( - portPos[node].outPosition, - edgeDirection, - graphDirection - ); - } - return result; -}; -const getEdgeStartEndPoint = (edge, dir) => { - let source = edge.start; - let target = edge.end; - const sourceId = source; - const targetId = target; - const startNode = nodeDb[source]; - const endNode = nodeDb[target]; - if (!startNode || !endNode) { - return { source, target }; - } - if (startNode.type === "diamond") { - source = `${source}-${getNextPort(source, "out", dir)}`; - } - if (endNode.type === "diamond") { - target = `${target}-${getNextPort(target, "in", dir)}`; - } - return { source, target, sourceId, targetId }; -}; -const addEdges = function(edges, diagObj, graph, svg) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__.l.info("abc78 edges = ", edges); - const labelsEl = svg.insert("g").attr("class", "edgeLabels"); - let linkIdCnt = {}; - let dir = diagObj.db.getDirection(); - let defaultStyle; - let defaultLabelStyle; - if (edges.defaultStyle !== void 0) { - const defaultStyles = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__.k)(edges.defaultStyle); - defaultStyle = defaultStyles.style; - defaultLabelStyle = defaultStyles.labelStyle; - } - edges.forEach(function(edge) { - const linkIdBase = "L-" + edge.start + "-" + edge.end; - if (linkIdCnt[linkIdBase] === void 0) { - linkIdCnt[linkIdBase] = 0; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__.l.info("abc78 new entry", linkIdBase, linkIdCnt[linkIdBase]); - } else { - linkIdCnt[linkIdBase]++; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__.l.info("abc78 new entry", linkIdBase, linkIdCnt[linkIdBase]); - } - let linkId = linkIdBase + "-" + linkIdCnt[linkIdBase]; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__.l.info("abc78 new link id to be used is", linkIdBase, linkId, linkIdCnt[linkIdBase]); - const linkNameStart = "LS-" + edge.start; - const linkNameEnd = "LE-" + edge.end; - const edgeData = { style: "", labelStyle: "" }; - edgeData.minlen = edge.length || 1; - if (edge.type === "arrow_open") { - edgeData.arrowhead = "none"; - } else { - edgeData.arrowhead = "normal"; - } - edgeData.arrowTypeStart = "arrow_open"; - edgeData.arrowTypeEnd = "arrow_open"; - switch (edge.type) { - case "double_arrow_cross": - edgeData.arrowTypeStart = "arrow_cross"; - case "arrow_cross": - edgeData.arrowTypeEnd = "arrow_cross"; - break; - case "double_arrow_point": - edgeData.arrowTypeStart = "arrow_point"; - case "arrow_point": - edgeData.arrowTypeEnd = "arrow_point"; - break; - case "double_arrow_circle": - edgeData.arrowTypeStart = "arrow_circle"; - case "arrow_circle": - edgeData.arrowTypeEnd = "arrow_circle"; - break; - } - let style = ""; - let labelStyle = ""; - switch (edge.stroke) { - case "normal": - style = "fill:none;"; - if (defaultStyle !== void 0) { - style = defaultStyle; - } - if (defaultLabelStyle !== void 0) { - labelStyle = defaultLabelStyle; - } - edgeData.thickness = "normal"; - edgeData.pattern = "solid"; - break; - case "dotted": - edgeData.thickness = "normal"; - edgeData.pattern = "dotted"; - edgeData.style = "fill:none;stroke-width:2px;stroke-dasharray:3;"; - break; - case "thick": - edgeData.thickness = "thick"; - edgeData.pattern = "solid"; - edgeData.style = "stroke-width: 3.5px;fill:none;"; - break; - } - if (edge.style !== void 0) { - const styles2 = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__.k)(edge.style); - style = styles2.style; - labelStyle = styles2.labelStyle; - } - edgeData.style = edgeData.style += style; - edgeData.labelStyle = edgeData.labelStyle += labelStyle; - if (edge.interpolate !== void 0) { - edgeData.curve = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__.n)(edge.interpolate, d3__WEBPACK_IMPORTED_MODULE_0__/* .curveLinear */ .lUB); - } else if (edges.defaultInterpolate !== void 0) { - edgeData.curve = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__.n)(edges.defaultInterpolate, d3__WEBPACK_IMPORTED_MODULE_0__/* .curveLinear */ .lUB); - } else { - edgeData.curve = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__.n)(conf.curve, d3__WEBPACK_IMPORTED_MODULE_0__/* .curveLinear */ .lUB); - } - if (edge.text === void 0) { - if (edge.style !== void 0) { - edgeData.arrowheadStyle = "fill: #333"; - } - } else { - edgeData.arrowheadStyle = "fill: #333"; - edgeData.labelpos = "c"; - } - edgeData.labelType = edge.labelType; - edgeData.label = edge.text.replace(_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__.e.lineBreakRegex, "\n"); - if (edge.style === void 0) { - edgeData.style = edgeData.style || "stroke: #333; stroke-width: 1.5px;fill:none;"; - } - edgeData.labelStyle = edgeData.labelStyle.replace("color:", "fill:"); - edgeData.id = linkId; - edgeData.classes = "flowchart-link " + linkNameStart + " " + linkNameEnd; - const labelEl = (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.f)(labelsEl, edgeData); - const { source, target, sourceId, targetId } = getEdgeStartEndPoint(edge, dir); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__.l.debug("abc78 source and target", source, target); - graph.edges.push({ - id: "e" + edge.start + edge.end, - sources: [source], - targets: [target], - sourceId, - targetId, - labelEl, - labels: [ - { - width: edgeData.width, - height: edgeData.height, - orgWidth: edgeData.width, - orgHeight: edgeData.height, - text: edgeData.label, - layoutOptions: { - "edgeLabels.inline": "true", - "edgeLabels.placement": "CENTER" - } - } - ], - edgeData - }); - }); - return graph; -}; -const addMarkersToEdge = function(svgPath, edgeData, diagramType, arrowMarkerAbsolute, id) { - let url = ""; - if (arrowMarkerAbsolute) { - url = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search; - url = url.replace(/\(/g, "\\("); - url = url.replace(/\)/g, "\\)"); - } - (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.m)(svgPath, edgeData, url, id, diagramType); -}; -const getClasses = function(text, diagObj) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__.l.info("Extracting classes"); - return diagObj.db.getClasses(); -}; -const addSubGraphs = function(db2) { - const parentLookupDb = { parentById: {}, childrenById: {} }; - const subgraphs = db2.getSubGraphs(); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__.l.info("Subgraphs - ", subgraphs); - subgraphs.forEach(function(subgraph) { - subgraph.nodes.forEach(function(node) { - parentLookupDb.parentById[node] = subgraph.id; - if (parentLookupDb.childrenById[subgraph.id] === void 0) { - parentLookupDb.childrenById[subgraph.id] = []; - } - parentLookupDb.childrenById[subgraph.id].push(node); - }); - }); - subgraphs.forEach(function(subgraph) { - ({ id: subgraph.id }); - if (parentLookupDb.parentById[subgraph.id] !== void 0) { - parentLookupDb.parentById[subgraph.id]; - } - }); - return parentLookupDb; -}; -const calcOffset = function(src, dest, parentLookupDb) { - const ancestor = findCommonAncestor(src, dest, parentLookupDb); - if (ancestor === void 0 || ancestor === "root") { - return { x: 0, y: 0 }; - } - const ancestorOffset = nodeDb[ancestor].offset; - return { x: ancestorOffset.posX, y: ancestorOffset.posY }; -}; -const insertEdge = function(edgesEl, edge, edgeData, diagObj, parentLookupDb, id) { - const offset = calcOffset(edge.sourceId, edge.targetId, parentLookupDb); - const src = edge.sections[0].startPoint; - const dest = edge.sections[0].endPoint; - const segments = edge.sections[0].bendPoints ? edge.sections[0].bendPoints : []; - const segPoints = segments.map((segment) => [segment.x + offset.x, segment.y + offset.y]); - const points = [ - [src.x + offset.x, src.y + offset.y], - ...segPoints, - [dest.x + offset.x, dest.y + offset.y] - ]; - const { x, y } = (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.k)(edge.edgeData); - const curve = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .line */ .n8j)().x(x).y(y).curve(d3__WEBPACK_IMPORTED_MODULE_0__/* .curveLinear */ .lUB); - const edgePath = edgesEl.insert("path").attr("d", curve(points)).attr("class", "path " + edgeData.classes).attr("fill", "none"); - const edgeG = edgesEl.insert("g").attr("class", "edgeLabel"); - const edgeWithLabel = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(edgeG.node().appendChild(edge.labelEl)); - const box = edgeWithLabel.node().firstChild.getBoundingClientRect(); - edgeWithLabel.attr("width", box.width); - edgeWithLabel.attr("height", box.height); - edgeG.attr( - "transform", - `translate(${edge.labels[0].x + offset.x}, ${edge.labels[0].y + offset.y})` - ); - addMarkersToEdge(edgePath, edgeData, diagObj.type, diagObj.arrowMarkerAbsolute, id); -}; -const insertChildren = (nodeArray, parentLookupDb) => { - nodeArray.forEach((node) => { - if (!node.children) { - node.children = []; - } - const childIds = parentLookupDb.childrenById[node.id]; - if (childIds) { - childIds.forEach((childId) => { - node.children.push(nodeDb[childId]); - }); - } - insertChildren(node.children, parentLookupDb); - }); -}; -const draw = async function(text, id, _version, diagObj) { - var _a; - diagObj.db.clear(); - nodeDb = {}; - portPos = {}; - diagObj.db.setGen("gen-2"); - diagObj.parser.parse(text); - const renderEl = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)("body").append("div").attr("style", "height:400px").attr("id", "cy"); - let graph = { - id: "root", - layoutOptions: { - "elk.hierarchyHandling": "INCLUDE_CHILDREN", - "org.eclipse.elk.padding": "[top=100, left=100, bottom=110, right=110]", - "elk.layered.spacing.edgeNodeBetweenLayers": "30", - // 'elk.layered.mergeEdges': 'true', - "elk.direction": "DOWN" - // 'elk.ports.sameLayerEdges': true, - // 'nodePlacement.strategy': 'SIMPLE', - }, - children: [], - edges: [] - }; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__.l.info("Drawing flowchart using v3 renderer", elk); - let dir = diagObj.db.getDirection(); - switch (dir) { - case "BT": - graph.layoutOptions["elk.direction"] = "UP"; - break; - case "TB": - graph.layoutOptions["elk.direction"] = "DOWN"; - break; - case "LR": - graph.layoutOptions["elk.direction"] = "RIGHT"; - break; - case "RL": - graph.layoutOptions["elk.direction"] = "LEFT"; - break; - } - const { securityLevel, flowchart: conf2 } = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__.F)(); - let sandboxElement; - if (securityLevel === "sandbox") { - sandboxElement = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)("#i" + id); - } - const root = securityLevel === "sandbox" ? (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(sandboxElement.nodes()[0].contentDocument.body) : (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)("body"); - const doc = securityLevel === "sandbox" ? sandboxElement.nodes()[0].contentDocument : document; - const svg = root.select(`[id="${id}"]`); - const markers = ["point", "circle", "cross"]; - (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.a)(svg, markers, diagObj.type, id); - const vert = diagObj.db.getVertices(); - let subG; - const subGraphs = diagObj.db.getSubGraphs(); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__.l.info("Subgraphs - ", subGraphs); - for (let i = subGraphs.length - 1; i >= 0; i--) { - subG = subGraphs[i]; - diagObj.db.addVertex( - subG.id, - { text: subG.title, type: subG.labelType }, - "group", - void 0, - subG.classes, - subG.dir - ); - } - const subGraphsEl = svg.insert("g").attr("class", "subgraphs"); - const parentLookupDb = addSubGraphs(diagObj.db); - graph = await addVertices(vert, id, root, doc, diagObj, parentLookupDb, graph); - const edgesEl = svg.insert("g").attr("class", "edges edgePath"); - const edges = diagObj.db.getEdges(); - graph = addEdges(edges, diagObj, graph, svg); - const nodes = Object.keys(nodeDb); - nodes.forEach((nodeId) => { - const node = nodeDb[nodeId]; - if (!node.parent) { - graph.children.push(node); - } - if (parentLookupDb.childrenById[nodeId] !== void 0) { - node.labels = [ - { - text: node.labelText, - layoutOptions: { - "nodeLabels.placement": "[H_CENTER, V_TOP, INSIDE]" - }, - width: node.labelData.width, - height: node.labelData.height - // width: 100, - // height: 100, - } - ]; - delete node.x; - delete node.y; - delete node.width; - delete node.height; - } - }); - insertChildren(graph.children, parentLookupDb); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__.l.info("after layout", JSON.stringify(graph, null, 2)); - const g = await elk.layout(graph); - drawNodes(0, 0, g.children, svg, subGraphsEl, diagObj, 0); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__.l.info("after layout", g); - (_a = g.edges) == null ? void 0 : _a.map((edge) => { - insertEdge(edgesEl, edge, edge.edgeData, diagObj, parentLookupDb, id); - }); - (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__.o)({}, svg, conf2.diagramPadding, conf2.useMaxWidth); - renderEl.remove(); -}; -const drawNodes = (relX, relY, nodeArray, svg, subgraphsEl, diagObj, depth) => { - nodeArray.forEach(function(node) { - if (node) { - nodeDb[node.id].offset = { - posX: node.x + relX, - posY: node.y + relY, - x: relX, - y: relY, - depth, - width: node.width, - height: node.height - }; - if (node.type === "group") { - const subgraphEl = subgraphsEl.insert("g").attr("class", "subgraph"); - subgraphEl.insert("rect").attr("class", "subgraph subgraph-lvl-" + depth % 5 + " node").attr("x", node.x + relX).attr("y", node.y + relY).attr("width", node.width).attr("height", node.height); - const label = subgraphEl.insert("g").attr("class", "label"); - const labelCentering = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__.F)().flowchart.htmlLabels ? node.labelData.width / 2 : 0; - label.attr( - "transform", - `translate(${node.labels[0].x + relX + node.x + labelCentering}, ${node.labels[0].y + relY + node.y + 3})` - ); - label.node().appendChild(node.labelData.labelNode); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__.l.info("Id (UGH)= ", node.type, node.labels); - } else { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__.l.info("Id (UGH)= ", node.id); - node.el.attr( - "transform", - `translate(${node.x + relX + node.width / 2}, ${node.y + relY + node.height / 2})` - ); - } - } - }); - nodeArray.forEach(function(node) { - if (node && node.type === "group") { - drawNodes(relX + node.x, relY + node.y, node.children, svg, subgraphsEl, diagObj, depth + 1); - } - }); -}; -const renderer = { - getClasses, - draw -}; -const genSections = (options) => { - let sections = ""; - for (let i = 0; i < 5; i++) { - sections += ` - .subgraph-lvl-${i} { - fill: ${options[`surface${i}`]}; - stroke: ${options[`surfacePeer${i}`]}; - } - `; - } - return sections; -}; -const getStyles = (options) => `.label { - font-family: ${options.fontFamily}; - color: ${options.nodeTextColor || options.textColor}; - } - .cluster-label text { - fill: ${options.titleColor}; - } - .cluster-label span { - color: ${options.titleColor}; - } - - .label text,span { - fill: ${options.nodeTextColor || options.textColor}; - color: ${options.nodeTextColor || options.textColor}; - } - - .node rect, - .node circle, - .node ellipse, - .node polygon, - .node path { - fill: ${options.mainBkg}; - stroke: ${options.nodeBorder}; - stroke-width: 1px; - } - - .node .label { - text-align: center; - } - .node.clickable { - cursor: pointer; - } - - .arrowheadPath { - fill: ${options.arrowheadColor}; - } - - .edgePath .path { - stroke: ${options.lineColor}; - stroke-width: 2.0px; - } - - .flowchart-link { - stroke: ${options.lineColor}; - fill: none; - } - - .edgeLabel { - background-color: ${options.edgeLabelBackground}; - rect { - opacity: 0.85; - background-color: ${options.edgeLabelBackground}; - fill: ${options.edgeLabelBackground}; - } - text-align: center; - } - - .cluster rect { - fill: ${options.clusterBkg}; - stroke: ${options.clusterBorder}; - stroke-width: 1px; - } - - .cluster text { - fill: ${options.titleColor}; - } - - .cluster span { - color: ${options.titleColor}; - } - /* .cluster div { - color: ${options.titleColor}; - } */ - - div.mermaidTooltip { - position: absolute; - text-align: center; - max-width: 200px; - padding: 2px; - font-family: ${options.fontFamily}; - font-size: 12px; - background: ${options.tertiaryColor}; - border: 1px solid ${options.border2}; - border-radius: 2px; - pointer-events: none; - z-index: 100; - } - - .flowchartTitleText { - text-anchor: middle; - font-size: 18px; - fill: ${options.textColor}; - } - .subgraph { - stroke-width:2; - rx:3; - } - // .subgraph-lvl-1 { - // fill:#ccc; - // // stroke:black; - // } - - .flowchart-label text { - text-anchor: middle; - } - - ${genSections(options)} -`; -const styles = getStyles; -const diagram = { - db: _flowDb_956e92f1_js__WEBPACK_IMPORTED_MODULE_7__.d, - renderer, - parser: _flowDb_956e92f1_js__WEBPACK_IMPORTED_MODULE_7__.p, - styles -}; - - - -/***/ }) - -}; -; \ No newline at end of file diff --git a/assets/js/113faa87.5d9a7b64.js b/assets/js/113faa87.5d9a7b64.js deleted file mode 100644 index b44ed7d292c0..000000000000 --- a/assets/js/113faa87.5d9a7b64.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6011],{30862:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>c,contentTitle:()=>l,default:()=>p,frontMatter:()=>i,metadata:()=>u,toc:()=>d});var r=s(74848),n=s(28453),a=s(67141),o=s(3514);const i={id:"learn-guides-assets",title:"Polkadot-JS Guides about Asset Hub",sidebar_label:"Asset Hub Guides",description:"Polkadot-JS Guides about Asset Hub.",keywords:["asset hub","assets","statemine","statemint","polkadot-js"],slug:"../learn-guides-assets"},l=void 0,u={id:"learn/learn-guides-assets",title:"Polkadot-JS Guides about Asset Hub",description:"Polkadot-JS Guides about Asset Hub.",source:"@site/../docs/learn/learn-guides-assets.md",sourceDirName:"learn",slug:"/learn-guides-assets",permalink:"/docs/learn-guides-assets",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-assets.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1729847256e3,frontMatter:{id:"learn-guides-assets",title:"Polkadot-JS Guides about Asset Hub",sidebar_label:"Asset Hub Guides",description:"Polkadot-JS Guides about Asset Hub.",keywords:["asset hub","assets","statemine","statemint","polkadot-js"],slug:"../learn-guides-assets"},sidebar:"docs",previous:{title:"Polkadot Vault Guides",permalink:"/docs/learn-guides-vault"},next:{title:"Create Asset Guides",permalink:"/docs/learn-guides-assets-create"}},c={},d=[];function m(e){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(a.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the Polkadot-JS UI, you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,r.jsx)(o.A,{})]})}function p(e={}){const{wrapper:t}={...(0,n.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(m,{...e})}):m()}},67141:(e,t,s)=>{s.d(t,{A:()=>a});var r=s(96540),n=s(74848);const a=function(e){var t,s=e.message,a=(0,r.useState)(!0),o=a[0],i=a[1];return(0,n.jsx)(n.Fragment,{children:o&&(0,n.jsxs)("div",{className:"message-box",children:[(0,n.jsx)("button",{className:"close-button",onClick:function(){i(!1)},children:"\u2716 "}),(0,n.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(t=s,t.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},3514:(e,t,s)=>{s.d(t,{A:()=>x});s(96540);var r=s(34164),n=s(26972),a=s(28774),o=s(53465),i=s(16654),l=s(21312),u=s(51107);const c={cardContainer:"cardContainer_fWXF",cardTitle:"cardTitle_rnsV",cardDescription:"cardDescription_PWke"};var d=s(74848);function m(e){var t=e.href,s=e.children;return(0,d.jsx)(a.A,{href:t,className:(0,r.A)("card padding--lg",c.cardContainer),children:s})}function p(e){var t=e.href,s=e.icon,n=e.title,a=e.description;return(0,d.jsxs)(m,{href:t,children:[(0,d.jsxs)(u.A,{as:"h2",className:(0,r.A)("text--truncate",c.cardTitle),title:n,children:[s," ",n]}),a&&(0,d.jsx)("p",{className:(0,r.A)("text--truncate",c.cardDescription),title:a,children:a})]})}function f(e){var t,s,r=e.item,a=(0,n.Nr)(r),i=(s=(0,o.W)().selectMessage,function(e){return s(e,(0,l.T)({message:"1 item|{count} items",id:"theme.docs.DocCard.categoryDescription.plurals",description:"The default description for a category card in the generated index about how many items this category includes"},{count:e}))});return a?(0,d.jsx)(p,{href:a,icon:"\ud83d\uddc3\ufe0f",title:r.label,description:null!=(t=r.description)?t:i(r.items.length)}):null}function h(e){var t,s,r=e.item,a=(0,i.A)(r.href)?"\ud83d\udcc4\ufe0f":"\ud83d\udd17",o=(0,n.cC)(null!=(t=r.docId)?t:void 0);return(0,d.jsx)(p,{href:r.href,icon:a,title:r.label,description:null!=(s=r.description)?s:null==o?void 0:o.description})}function g(e){var t=e.item;switch(t.type){case"link":return(0,d.jsx)(h,{item:t});case"category":return(0,d.jsx)(f,{item:t});default:throw new Error("unknown item type "+JSON.stringify(t))}}function b(e){var t=e.className,s=(0,n.$S)();return(0,d.jsx)(x,{items:s.items,className:t})}function x(e){var t=e.items,s=e.className;if(!t)return(0,d.jsx)(b,Object.assign({},e));var a=(0,n.d1)(t);return(0,d.jsx)("section",{className:(0,r.A)("row",s),children:a.map((function(e,t){return(0,d.jsx)("article",{className:"col col--6 margin-bottom--lg",children:(0,d.jsx)(g,{item:e})},t)}))})}},53465:(e,t,s)=>{s.d(t,{W:()=>u});var r=s(96540),n=s(44586),a=["zero","one","two","few","many","other"];function o(e){return a.filter((function(t){return e.includes(t)}))}var i={locale:"en",pluralForms:o(["one","other"]),select:function(e){return 1===e?"one":"other"}};function l(){var e=(0,n.A)().i18n.currentLocale;return(0,r.useMemo)((function(){try{return t=e,s=new Intl.PluralRules(t),{locale:t,pluralForms:o(s.resolvedOptions().pluralCategories),select:function(e){return s.select(e)}}}catch(r){return console.error('Failed to use Intl.PluralRules for locale "'+e+'".\nDocusaurus will fallback to the default (English) implementation.\nError: '+r.message+"\n"),i}var t,s}),[e])}function u(){var e=l();return{selectMessage:function(t,s){return function(e,t,s){var r=e.split("|");if(1===r.length)return r[0];r.length>s.pluralForms.length&&console.error("For locale="+s.locale+", a maximum of "+s.pluralForms.length+" plural forms are expected ("+s.pluralForms.join(",")+"), but the message contains "+r.length+": "+e);var n=s.select(t),a=s.pluralForms.indexOf(n);return r[Math.min(a,r.length-1)]}(s,t,e)}}}},28453:(e,t,s)=>{s.d(t,{R:()=>o,x:()=>i});var r=s(96540);const n={},a=r.createContext(n);function o(e){const t=r.useContext(a);return r.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:o(e.components),r.createElement(a.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/113faa87.de6ca05b.js b/assets/js/113faa87.de6ca05b.js new file mode 100644 index 000000000000..a022c238eb30 --- /dev/null +++ b/assets/js/113faa87.de6ca05b.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6011],{74860:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>u,contentTitle:()=>c,default:()=>p,frontMatter:()=>l,metadata:()=>r,toc:()=>d});const r=JSON.parse('{"id":"learn/learn-guides-assets","title":"Polkadot-JS Guides about Asset Hub","description":"Polkadot-JS Guides about Asset Hub.","source":"@site/../docs/learn/learn-guides-assets.md","sourceDirName":"learn","slug":"/learn-guides-assets","permalink":"/docs/learn-guides-assets","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-assets.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1729847256000,"frontMatter":{"id":"learn-guides-assets","title":"Polkadot-JS Guides about Asset Hub","sidebar_label":"Asset Hub Guides","description":"Polkadot-JS Guides about Asset Hub.","keywords":["asset hub","assets","statemine","statemint","polkadot-js"],"slug":"../learn-guides-assets"},"sidebar":"docs","previous":{"title":"Polkadot Vault Guides","permalink":"/docs/learn-guides-vault"},"next":{"title":"Create Asset Guides","permalink":"/docs/learn-guides-assets-create"}}');var n=s(74848),a=s(28453),o=s(67141),i=s(3514);const l={id:"learn-guides-assets",title:"Polkadot-JS Guides about Asset Hub",sidebar_label:"Asset Hub Guides",description:"Polkadot-JS Guides about Asset Hub.",keywords:["asset hub","assets","statemine","statemint","polkadot-js"],slug:"../learn-guides-assets"},c=void 0,u={},d=[];function m(e){return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(o.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the Polkadot-JS UI, you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,n.jsx)(i.A,{})]})}function p(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(m,{...e})}):m()}},67141:(e,t,s)=>{s.d(t,{A:()=>a});var r=s(96540),n=s(74848);const a=function(e){var t,s=e.message,a=(0,r.useState)(!0),o=a[0],i=a[1];return(0,n.jsx)(n.Fragment,{children:o&&(0,n.jsxs)("div",{className:"message-box",children:[(0,n.jsx)("button",{className:"close-button",onClick:function(){i(!1)},children:"\u2716 "}),(0,n.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(t=s,t.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},3514:(e,t,s)=>{s.d(t,{A:()=>x});s(96540);var r=s(34164),n=s(26972),a=s(28774),o=s(53465),i=s(16654),l=s(21312),c=s(51107);const u={cardContainer:"cardContainer_fWXF",cardTitle:"cardTitle_rnsV",cardDescription:"cardDescription_PWke"};var d=s(74848);function m(e){var t=e.href,s=e.children;return(0,d.jsx)(a.A,{href:t,className:(0,r.A)("card padding--lg",u.cardContainer),children:s})}function p(e){var t=e.href,s=e.icon,n=e.title,a=e.description;return(0,d.jsxs)(m,{href:t,children:[(0,d.jsxs)(c.A,{as:"h2",className:(0,r.A)("text--truncate",u.cardTitle),title:n,children:[s," ",n]}),a&&(0,d.jsx)("p",{className:(0,r.A)("text--truncate",u.cardDescription),title:a,children:a})]})}function f(e){var t,s,r=e.item,a=(0,n.Nr)(r),i=(s=(0,o.W)().selectMessage,function(e){return s(e,(0,l.T)({message:"1 item|{count} items",id:"theme.docs.DocCard.categoryDescription.plurals",description:"The default description for a category card in the generated index about how many items this category includes"},{count:e}))});return a?(0,d.jsx)(p,{href:a,icon:"\ud83d\uddc3\ufe0f",title:r.label,description:null!=(t=r.description)?t:i(r.items.length)}):null}function h(e){var t,s,r=e.item,a=(0,i.A)(r.href)?"\ud83d\udcc4\ufe0f":"\ud83d\udd17",o=(0,n.cC)(null!=(t=r.docId)?t:void 0);return(0,d.jsx)(p,{href:r.href,icon:a,title:r.label,description:null!=(s=r.description)?s:null==o?void 0:o.description})}function g(e){var t=e.item;switch(t.type){case"link":return(0,d.jsx)(h,{item:t});case"category":return(0,d.jsx)(f,{item:t});default:throw new Error("unknown item type "+JSON.stringify(t))}}function b(e){var t=e.className,s=(0,n.$S)();return(0,d.jsx)(x,{items:s.items,className:t})}function x(e){var t=e.items,s=e.className;if(!t)return(0,d.jsx)(b,Object.assign({},e));var a=(0,n.d1)(t);return(0,d.jsx)("section",{className:(0,r.A)("row",s),children:a.map((function(e,t){return(0,d.jsx)("article",{className:"col col--6 margin-bottom--lg",children:(0,d.jsx)(g,{item:e})},t)}))})}},53465:(e,t,s)=>{s.d(t,{W:()=>c});var r=s(96540),n=s(44586),a=["zero","one","two","few","many","other"];function o(e){return a.filter((function(t){return e.includes(t)}))}var i={locale:"en",pluralForms:o(["one","other"]),select:function(e){return 1===e?"one":"other"}};function l(){var e=(0,n.A)().i18n.currentLocale;return(0,r.useMemo)((function(){try{return t=e,s=new Intl.PluralRules(t),{locale:t,pluralForms:o(s.resolvedOptions().pluralCategories),select:function(e){return s.select(e)}}}catch(r){return console.error('Failed to use Intl.PluralRules for locale "'+e+'".\nDocusaurus will fallback to the default (English) implementation.\nError: '+r.message+"\n"),i}var t,s}),[e])}function c(){var e=l();return{selectMessage:function(t,s){return function(e,t,s){var r=e.split("|");if(1===r.length)return r[0];r.length>s.pluralForms.length&&console.error("For locale="+s.locale+", a maximum of "+s.pluralForms.length+" plural forms are expected ("+s.pluralForms.join(",")+"), but the message contains "+r.length+": "+e);var n=s.select(t),a=s.pluralForms.indexOf(n);return r[Math.min(a,r.length-1)]}(s,t,e)}}}},28453:(e,t,s)=>{s.d(t,{R:()=>o,x:()=>i});var r=s(96540);const n={},a=r.createContext(n);function o(e){const t=r.useContext(a);return r.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:o(e.components),r.createElement(a.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/1169.68ec4289.js b/assets/js/1169.68ec4289.js deleted file mode 100644 index 0ed38520539f..000000000000 --- a/assets/js/1169.68ec4289.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1169],{73046:(t,e,r)=>{r.d(e,{T:()=>P});var n=r(48585),o=r(39142),i=r(89610),s=r(27422),u=r(11662),c=r(66401),a=r(8058),f=r(69592),h=r(13588),A=r(24326),d=r(62062),l=r(25707);const v=function(t){return t!=t};const b=function(t,e,r){for(var n=r-1,o=t.length;++n-1};const g=function(t,e,r){for(var n=-1,o=null==t?0:t.length;++n=200){var a=e?null:C(t);if(a)return(0,w.A)(a);s=!1,o=j.A,c=new d.A}else c=e?[]:u;t:for(;++n1?n.setNode(t,e):n.setNode(t)})),this}setNode(t,e){return n.A(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=e),this):(this._nodes[t]=arguments.length>1?e:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=F,this._children[t]={},this._children[F][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)}node(t){return this._nodes[t]}hasNode(t){return n.A(this._nodes,t)}removeNode(t){var e=this;if(n.A(this._nodes,t)){var r=function(t){e.removeEdge(e._edgeObjs[t])};delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],a.A(this.children(t),(function(t){e.setParent(t)})),delete this._children[t]),a.A(s.A(this._in[t]),r),delete this._in[t],delete this._preds[t],a.A(s.A(this._out[t]),r),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this}setParent(t,e){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(f.A(e))e=F;else{for(var r=e+="";!f.A(r);r=this.parent(r))if(r===t)throw new Error("Setting "+e+" as parent of "+t+" would create a cycle");this.setNode(e)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=e,this._children[e][t]=!0,this}_removeFromParentsChildList(t){delete this._children[this._parent[t]][t]}parent(t){if(this._isCompound){var e=this._parent[t];if(e!==F)return e}}children(t){if(f.A(t)&&(t=F),this._isCompound){var e=this._children[t];if(e)return s.A(e)}else{if(t===F)return this.nodes();if(this.hasNode(t))return[]}}predecessors(t){var e=this._preds[t];if(e)return s.A(e)}successors(t){var e=this._sucs[t];if(e)return s.A(e)}neighbors(t){var e=this.predecessors(t);if(e)return N(e,this.successors(t))}isLeaf(t){return 0===(this.isDirected()?this.successors(t):this.neighbors(t)).length}filterNodes(t){var e=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});e.setGraph(this.graph());var r=this;a.A(this._nodes,(function(r,n){t(n)&&e.setNode(n,r)})),a.A(this._edgeObjs,(function(t){e.hasNode(t.v)&&e.hasNode(t.w)&&e.setEdge(t,r.edge(t))}));var n={};function o(t){var i=r.parent(t);return void 0===i||e.hasNode(i)?(n[t]=i,i):i in n?n[i]:o(i)}return this._isCompound&&a.A(e.nodes(),(function(t){e.setParent(t,o(t))})),e}setDefaultEdgeLabel(t){return i.A(t)||(t=o.A(t)),this._defaultEdgeLabelFn=t,this}edgeCount(){return this._edgeCount}edges(){return D.A(this._edgeObjs)}setPath(t,e){var r=this,n=arguments;return S.A(t,(function(t,o){return n.length>1?r.setEdge(t,o,e):r.setEdge(t,o),o})),this}setEdge(){var t,e,r,o,i=!1,s=arguments[0];"object"==typeof s&&null!==s&&"v"in s?(t=s.v,e=s.w,r=s.name,2===arguments.length&&(o=arguments[1],i=!0)):(t=s,e=arguments[1],r=arguments[3],arguments.length>2&&(o=arguments[2],i=!0)),t=""+t,e=""+e,f.A(r)||(r=""+r);var u=x(this._isDirected,t,e,r);if(n.A(this._edgeLabels,u))return i&&(this._edgeLabels[u]=o),this;if(!f.A(r)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(e),this._edgeLabels[u]=i?o:this._defaultEdgeLabelFn(t,e,r);var c=function(t,e,r,n){var o=""+e,i=""+r;if(!t&&o>i){var s=o;o=i,i=s}var u={v:o,w:i};n&&(u.name=n);return u}(this._isDirected,t,e,r);return t=c.v,e=c.w,Object.freeze(c),this._edgeObjs[u]=c,M(this._preds[e],t),M(this._sucs[t],e),this._in[e][u]=c,this._out[t][u]=c,this._edgeCount++,this}edge(t,e,r){var n=1===arguments.length?I(this._isDirected,arguments[0]):x(this._isDirected,t,e,r);return this._edgeLabels[n]}hasEdge(t,e,r){var o=1===arguments.length?I(this._isDirected,arguments[0]):x(this._isDirected,t,e,r);return n.A(this._edgeLabels,o)}removeEdge(t,e,r){var n=1===arguments.length?I(this._isDirected,arguments[0]):x(this._isDirected,t,e,r),o=this._edgeObjs[n];return o&&(t=o.v,e=o.w,delete this._edgeLabels[n],delete this._edgeObjs[n],k(this._preds[e],t),k(this._sucs[t],e),delete this._in[e][n],delete this._out[t][n],this._edgeCount--),this}inEdges(t,e){var r=this._in[t];if(r){var n=D.A(r);return e?u.A(n,(function(t){return t.v===e})):n}}outEdges(t,e){var r=this._out[t];if(r){var n=D.A(r);return e?u.A(n,(function(t){return t.w===e})):n}}nodeEdges(t,e){var r=this.inEdges(t,e);if(r)return r.concat(this.outEdges(t,e))}}function M(t,e){t[e]?t[e]++:t[e]=1}function k(t,e){--t[e]||delete t[e]}function x(t,e,r,n){var o=""+e,i=""+r;if(!t&&o>i){var s=o;o=i,i=s}return o+"\x01"+i+"\x01"+(f.A(n)?"\0":n)}function I(t,e){return x(t,e.v,e.w,e.name)}P.prototype._nodeCount=0,P.prototype._edgeCount=0},697:(t,e,r)=>{r.d(e,{T:()=>n.T});var n=r(73046)},62062:(t,e,r)=>{r.d(e,{A:()=>u});var n=r(29471);const o=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this};const i=function(t){return this.__data__.has(t)};function s(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new n.A;++e{r.d(e,{A:()=>n});const n=function(t,e){for(var r=-1,n=null==t?0:t.length;++r{r.d(e,{A:()=>n});const n=function(t,e){for(var r=-1,n=null==t?0:t.length,o=0,i=[];++r{r.d(e,{A:()=>n});const n=function(t,e){for(var r=-1,n=null==t?0:t.length,o=Array(n);++r{r.d(e,{A:()=>n});const n=function(t,e){for(var r=-1,n=e.length,o=t.length;++r{r.d(e,{A:()=>Z});var n=r(11754),o=r(72641),i=r(52851),s=r(22031),u=r(27422);const c=function(t,e){return t&&(0,s.A)(e,(0,u.A)(e),t)};var a=r(55615);const f=function(t,e){return t&&(0,s.A)(e,(0,a.A)(e),t)};var h=r(80154),A=r(39759),d=r(14792);const l=function(t,e){return(0,s.A)(t,(0,d.A)(t),e)};var v=r(76912),b=r(15647),_=r(13153);const p=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)(0,v.A)(e,(0,d.A)(t)),t=(0,b.A)(t);return e}:_.A;const g=function(t,e){return(0,s.A)(t,p(t),e)};var j=r(19042),y=r(33831);const m=function(t){return(0,y.A)(t,a.A,p)};var w=r(9779),O=Object.prototype.hasOwnProperty;const C=function(t){var e=t.length,r=new t.constructor(e);return e&&"string"==typeof t[0]&&O.call(t,"index")&&(r.index=t.index,r.input=t.input),r};var E=r(90565);const L=function(t,e){var r=e?(0,E.A)(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)};var N=/\w*$/;const D=function(t){var e=new t.constructor(t.source,N.exec(t));return e.lastIndex=t.lastIndex,e};var S=r(241),F=S.A?S.A.prototype:void 0,P=F?F.valueOf:void 0;const M=function(t){return P?Object(P.call(t)):{}};var k=r(1801);const x=function(t,e,r){var n=t.constructor;switch(e){case"[object ArrayBuffer]":return(0,E.A)(t);case"[object Boolean]":case"[object Date]":return new n(+t);case"[object DataView]":return L(t,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return(0,k.A)(t,r);case"[object Map]":case"[object Set]":return new n;case"[object Number]":case"[object String]":return new n(t);case"[object RegExp]":return D(t);case"[object Symbol]":return M(t)}};var I=r(18598),U=r(92049),z=r(99912),B=r(53098);const $=function(t){return(0,B.A)(t)&&"[object Map]"==(0,w.A)(t)};var G=r(52789),R=r(64841),T=R.A&&R.A.isMap;const V=T?(0,G.A)(T):$;var W=r(23149);const q=function(t){return(0,B.A)(t)&&"[object Set]"==(0,w.A)(t)};var H=R.A&&R.A.isSet;const J=H?(0,G.A)(H):q;var K="[object Arguments]",Q="[object Function]",X="[object Object]",Y={};Y[K]=Y["[object Array]"]=Y["[object ArrayBuffer]"]=Y["[object DataView]"]=Y["[object Boolean]"]=Y["[object Date]"]=Y["[object Float32Array]"]=Y["[object Float64Array]"]=Y["[object Int8Array]"]=Y["[object Int16Array]"]=Y["[object Int32Array]"]=Y["[object Map]"]=Y["[object Number]"]=Y[X]=Y["[object RegExp]"]=Y["[object Set]"]=Y["[object String]"]=Y["[object Symbol]"]=Y["[object Uint8Array]"]=Y["[object Uint8ClampedArray]"]=Y["[object Uint16Array]"]=Y["[object Uint32Array]"]=!0,Y["[object Error]"]=Y[Q]=Y["[object WeakMap]"]=!1;const Z=function t(e,r,s,d,v,b){var _,p=1&r,y=2&r,O=4&r;if(s&&(_=v?s(e,d,v,b):s(e)),void 0!==_)return _;if(!(0,W.A)(e))return e;var E=(0,U.A)(e);if(E){if(_=C(e),!p)return(0,A.A)(e,_)}else{var L=(0,w.A)(e),N=L==Q||"[object GeneratorFunction]"==L;if((0,z.A)(e))return(0,h.A)(e,p);if(L==X||L==K||N&&!v){if(_=y||N?{}:(0,I.A)(e),!p)return y?g(e,f(_,e)):l(e,c(_,e))}else{if(!Y[L])return v?e:{};_=x(e,L,p)}}b||(b=new n.A);var D=b.get(e);if(D)return D;b.set(e,_),J(e)?e.forEach((function(n){_.add(t(n,r,s,n,e,b))})):V(e)&&e.forEach((function(n,o){_.set(o,t(n,r,s,o,e,b))}));var S=O?y?m:j.A:y?a.A:u.A,F=E?void 0:S(e);return(0,o.A)(F||e,(function(n,o){F&&(n=e[o=n]),(0,i.A)(_,o,t(n,r,s,o,e,b))})),_}},6240:(t,e,r)=>{r.d(e,{A:()=>i});var n=r(79841),o=r(38446);const i=function(t,e){return function(r,n){if(null==r)return r;if(!(0,o.A)(r))return t(r,n);for(var i=r.length,s=e?i:-1,u=Object(r);(e?s--:++s{r.d(e,{A:()=>n});const n=function(t,e,r,n){for(var o=t.length,i=r+(n?1:-1);n?i--:++i{r.d(e,{A:()=>a});var n=r(76912),o=r(241),i=r(52274),s=r(92049),u=o.A?o.A.isConcatSpreadable:void 0;const c=function(t){return(0,s.A)(t)||(0,i.A)(t)||!!(u&&t&&t[u])};const a=function t(e,r,o,i,s){var u=-1,a=e.length;for(o||(o=c),s||(s=[]);++u0&&o(f)?r>1?t(f,r-1,o,i,s):(0,n.A)(s,f):i||(s[s.length]=f)}return s}},79841:(t,e,r)=>{r.d(e,{A:()=>i});var n=r(4574),o=r(27422);const i=function(t,e){return t&&(0,n.A)(t,e,o.A)}},66318:(t,e,r)=>{r.d(e,{A:()=>i});var n=r(7819),o=r(30901);const i=function(t,e){for(var r=0,i=(e=(0,n.A)(e,t)).length;null!=t&&r{r.d(e,{A:()=>i});var n=r(76912),o=r(92049);const i=function(t,e,r){var i=e(t);return(0,o.A)(t)?i:(0,n.A)(i,r(t))}},49574:(t,e,r)=>{r.d(e,{A:()=>H});var n=r(11754),o=r(62062);const i=function(t,e){for(var r=-1,n=null==t?0:t.length;++rf))return!1;var A=c.get(t),d=c.get(e);if(A&&d)return A==e&&d==t;var l=-1,v=!0,b=2&r?new o.A:void 0;for(c.set(t,e),c.set(e,t);++l{r.d(e,{A:()=>n});const n=function(t){return function(e){return null==e?void 0:e[t]}}},64099:(t,e,r)=>{r.d(e,{A:()=>n});const n=function(t,e){return t.has(e)}},99922:(t,e,r)=>{r.d(e,{A:()=>o});var n=r(29008);const o=function(t){return"function"==typeof t?t:n.A}},7819:(t,e,r)=>{r.d(e,{A:()=>f});var n=r(92049),o=r(86586),i=r(46632);var s=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,u=/\\(\\)?/g;const c=function(t){var e=(0,i.A)(t,(function(t){return 500===r.size&&r.clear(),t})),r=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(s,(function(t,r,n,o){e.push(n?o.replace(u,"$1"):r||t)})),e}));var a=r(28894);const f=function(t,e){return(0,n.A)(t)?t:(0,o.A)(t,e)?[t]:c((0,a.A)(t))}},19042:(t,e,r)=>{r.d(e,{A:()=>s});var n=r(33831),o=r(14792),i=r(27422);const s=function(t){return(0,n.A)(t,i.A,o.A)}},14792:(t,e,r)=>{r.d(e,{A:()=>u});var n=r(2634),o=r(13153),i=Object.prototype.propertyIsEnumerable,s=Object.getOwnPropertySymbols;const u=s?function(t){return null==t?[]:(t=Object(t),(0,n.A)(s(t),(function(e){return i.call(t,e)})))}:o.A},85054:(t,e,r)=>{r.d(e,{A:()=>a});var n=r(7819),o=r(52274),i=r(92049),s=r(25353),u=r(5254),c=r(30901);const a=function(t,e,r){for(var a=-1,f=(e=(0,n.A)(e,t)).length,h=!1;++a{r.d(e,{A:()=>u});var n=r(92049),o=r(61882),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;const u=function(t,e){if((0,n.A)(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!(0,o.A)(t))||(s.test(t)||!i.test(t)||null!=e&&t in Object(e))}},29959:(t,e,r)=>{r.d(e,{A:()=>n});const n=function(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=t})),r}},30901:(t,e,r)=>{r.d(e,{A:()=>o});var n=r(61882);const o=function(t){if("string"==typeof t||(0,n.A)(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}},11662:(t,e,r)=>{r.d(e,{A:()=>c});var n=r(2634),o=r(6240);const i=function(t,e){var r=[];return(0,o.A)(t,(function(t,n,o){e(t,n,o)&&r.push(t)})),r};var s=r(49574),u=r(92049);const c=function(t,e){return((0,u.A)(t)?n.A:i)(t,(0,s.A)(e,3))}},8058:(t,e,r)=>{r.d(e,{A:()=>u});var n=r(72641),o=r(6240),i=r(99922),s=r(92049);const u=function(t,e){return((0,s.A)(t)?n.A:o.A)(t,(0,i.A)(e))}},48585:(t,e,r)=>{r.d(e,{A:()=>s});var n=Object.prototype.hasOwnProperty;const o=function(t,e){return null!=t&&n.call(t,e)};var i=r(85054);const s=function(t,e){return null!=t&&(0,i.A)(t,e,o)}},39188:(t,e,r)=>{r.d(e,{A:()=>i});const n=function(t,e){return null!=t&&e in Object(t)};var o=r(85054);const i=function(t,e){return null!=t&&(0,o.A)(t,e,n)}},61882:(t,e,r)=>{r.d(e,{A:()=>i});var n=r(88496),o=r(53098);const i=function(t){return"symbol"==typeof t||(0,o.A)(t)&&"[object Symbol]"==(0,n.A)(t)}},69592:(t,e,r)=>{r.d(e,{A:()=>n});const n=function(t){return void 0===t}},27422:(t,e,r)=>{r.d(e,{A:()=>s});var n=r(83607),o=r(69471),i=r(38446);const s=function(t){return(0,i.A)(t)?(0,n.A)(t):(0,o.A)(t)}},89463:(t,e,r)=>{r.d(e,{A:()=>c});const n=function(t,e,r,n){var o=-1,i=null==t?0:t.length;for(n&&i&&(r=t[++o]);++o{r.d(e,{A:()=>n});const n=function(){return[]}},28894:(t,e,r)=>{r.d(e,{A:()=>f});var n=r(241),o=r(45572),i=r(92049),s=r(61882),u=n.A?n.A.prototype:void 0,c=u?u.toString:void 0;const a=function t(e){if("string"==typeof e)return e;if((0,i.A)(e))return(0,o.A)(e,t)+"";if((0,s.A)(e))return c?c.call(e):"";var r=e+"";return"0"==r&&1/e==-1/0?"-0":r};const f=function(t){return null==t?"":a(t)}},38207:(t,e,r)=>{r.d(e,{A:()=>s});var n=r(45572);const o=function(t,e){return(0,n.A)(e,(function(e){return t[e]}))};var i=r(27422);const s=function(t){return null==t?[]:o(t,(0,i.A)(t))}}}]); \ No newline at end of file diff --git a/assets/js/1176.e4977b7c.js b/assets/js/1176.e4977b7c.js deleted file mode 100644 index d7aeddc4c520..000000000000 --- a/assets/js/1176.e4977b7c.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1176],{21176:(n,e,r)=>{r.d(e,{Zp:()=>Ce});var t=r(8058),o=r(5664),i=r(48585),u=r(39142),a=r(34098),d=r(74722),c=r(91395),f=r(697);class s{constructor(){var n={};n._next=n._prev=n,this._sentinel=n}dequeue(){var n=this._sentinel,e=n._prev;if(e!==n)return v(e),e}enqueue(n){var e=this._sentinel;n._prev&&n._next&&v(n),n._next=e._next,e._next._prev=n,e._next=n,n._prev=e}toString(){for(var n=[],e=this._sentinel,r=e._prev;r!==e;)n.push(JSON.stringify(r,g)),r=r._prev;return"["+n.join(", ")+"]"}}function v(n){n._prev._next=n._next,n._next._prev=n._prev,delete n._next,delete n._prev}function g(n,e){if("_next"!==n&&"_prev"!==n)return e}var h=u.A(1);function l(n,e){if(n.nodeCount()<=1)return[];var r=function(n,e){var r=new f.T,o=0,i=0;t.A(n.nodes(),(function(n){r.setNode(n,{v:n,in:0,out:0})})),t.A(n.edges(),(function(n){var t=r.edge(n.v,n.w)||0,u=e(n),a=t+u;r.setEdge(n.v,n.w,a),i=Math.max(i,r.node(n.v).out+=u),o=Math.max(o,r.node(n.w).in+=u)}));var u=c.A(i+o+3).map((function(){return new s})),a=o+1;return t.A(r.nodes(),(function(n){p(u,a,r.node(n))})),{graph:r,buckets:u,zeroIdx:a}}(n,e||h),o=function(n,e,r){var t,o=[],i=e[e.length-1],u=e[0];for(;n.nodeCount();){for(;t=u.dequeue();)A(n,e,r,t);for(;t=i.dequeue();)A(n,e,r,t);if(n.nodeCount())for(var a=e.length-2;a>0;--a)if(t=e[a].dequeue()){o=o.concat(A(n,e,r,t,!0));break}}return o}(r.graph,r.buckets,r.zeroIdx);return a.A(d.A(o,(function(e){return n.outEdges(e.v,e.w)})))}function A(n,e,r,o,i){var u=i?[]:void 0;return t.A(n.inEdges(o.v),(function(t){var o=n.edge(t),a=n.node(t.v);i&&u.push({v:t.v,w:t.w}),a.out-=o,p(e,r,a)})),t.A(n.outEdges(o.v),(function(t){var o=n.edge(t),i=t.w,u=n.node(i);u.in-=o,p(e,r,u)})),n.removeNode(o.v),u}function p(n,e,r){r.out?r.in?n[r.out-r.in+e].enqueue(r):n[n.length-1].enqueue(r):n[0].enqueue(r)}function w(n){var e="greedy"===n.graph().acyclicer?l(n,function(n){return function(e){return n.edge(e).weight}}(n)):function(n){var e=[],r={},o={};function u(a){i.A(o,a)||(o[a]=!0,r[a]=!0,t.A(n.outEdges(a),(function(n){i.A(r,n.w)?e.push(n):u(n.w)})),delete r[a])}return t.A(n.nodes(),u),e}(n);t.A(e,(function(e){var r=n.edge(e);n.removeEdge(e),r.forwardName=e.name,r.reversed=!0,n.setEdge(e.w,e.v,r,o.A("rev"))}))}var m=r(98879),b=r(81942),y=r(23068),x=r(61882);const k=function(n,e,r){for(var t=-1,o=n.length;++te};var N=r(29008);const _=function(n){return n&&n.length?k(n,N.A,E):void 0};const I=function(n){var e=null==n?0:n.length;return e?n[e-1]:void 0};var T=r(52528),R=r(79841),M=r(49574);const L=function(n,e){var r={};return e=(0,M.A)(e,3),(0,R.A)(n,(function(n,t,o){(0,T.A)(r,t,e(n,t,o))})),r};var C=r(69592);const O=function(n,e){return nMath.abs(u)*c?(a<0&&(c=-c),r=c*u/a,t=c):(u<0&&(d=-d),r=d,t=d*a/u),{x:o+r,y:i+t}}function B(n){var e=d.A(c.A(Y(n)+1),(function(){return[]}));return t.A(n.nodes(),(function(r){var t=n.node(r),o=t.rank;C.A(o)||(e[o][t.order]=r)})),e}function q(n,e,r,t){var o={width:0,height:0};return arguments.length>=4&&(o.rank=r,o.order=t),F(n,"border",o,e)}function Y(n){return _(d.A(n.nodes(),(function(e){var r=n.node(e).rank;if(!C.A(r))return r})))}function z(n,e){var r=j();try{return e()}finally{console.log(n+" time: "+(j()-r)+"ms")}}function D(n,e){return e()}function $(n,e,r,t,o,i){var u={width:0,height:0,rank:i,borderType:e},a=o[e][i-1],d=F(n,"border",u,r);o[e][i]=d,n.setParent(d,t),a&&n.setEdge(a,d,{weight:1})}function J(n){var e=n.graph().rankdir.toLowerCase();"bt"!==e&&"rl"!==e||function(n){t.A(n.nodes(),(function(e){K(n.node(e))})),t.A(n.edges(),(function(e){var r=n.edge(e);t.A(r.points,K),i.A(r,"y")&&K(r)}))}(n),"lr"!==e&&"rl"!==e||(!function(n){t.A(n.nodes(),(function(e){Q(n.node(e))})),t.A(n.edges(),(function(e){var r=n.edge(e);t.A(r.points,Q),i.A(r,"x")&&Q(r)}))}(n),Z(n))}function Z(n){t.A(n.nodes(),(function(e){H(n.node(e))})),t.A(n.edges(),(function(e){H(n.edge(e))}))}function H(n){var e=n.width;n.width=n.height,n.height=e}function K(n){n.y=-n.y}function Q(n){var e=n.x;n.x=n.y,n.y=e}function U(n){n.graph().dummyChains=[],t.A(n.edges(),(function(e){!function(n,e){var r,t,o,i=e.v,u=n.node(i).rank,a=e.w,d=n.node(a).rank,c=e.name,f=n.edge(e),s=f.labelRank;if(d===u+1)return;for(n.removeEdge(e),o=0,++u;u-1?o[i?e[u]:u]:void 0}};var cn=r(25707),fn=r(74342);const sn=function(n){var e=(0,fn.A)(n),r=e%1;return e==e?r?e-r:e:0};var vn=Math.max;const gn=dn((function(n,e,r){var t=null==n?0:n.length;if(!t)return-1;var o=null==r?0:sn(r);return o<0&&(o=vn(t+o,0)),(0,cn.A)(n,(0,M.A)(e,3),o)}));var hn=r(11662);u.A(1);u.A(1);r(69471),r(9779),r(88496);var ln=r(92049);r(53098);(0,r(70805).A)("length");RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");var An="\\ud800-\\udfff",pn="["+An+"]",wn="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",mn="\\ud83c[\\udffb-\\udfff]",bn="[^"+An+"]",yn="(?:\\ud83c[\\udde6-\\uddff]){2}",xn="[\\ud800-\\udbff][\\udc00-\\udfff]",kn="(?:"+wn+"|"+mn+")"+"?",En="[\\ufe0e\\ufe0f]?",Nn=En+kn+("(?:\\u200d(?:"+[bn,yn,xn].join("|")+")"+En+kn+")*"),_n="(?:"+[bn+wn+"?",wn,yn,xn,pn].join("|")+")";RegExp(mn+"(?="+mn+")|"+_n+Nn,"g");function In(){}function Tn(n,e,r){ln.A(e)||(e=[e]);var o=(n.isDirected()?n.successors:n.neighbors).bind(n),i=[],u={};return t.A(e,(function(e){if(!n.hasNode(e))throw new Error("Graph does not have node: "+e);Rn(n,e,"post"===r,u,o,i)})),i}function Rn(n,e,r,o,u,a){i.A(o,e)||(o[e]=!0,r||a.push(e),t.A(u(e),(function(e){Rn(n,e,r,o,u,a)})),r&&a.push(e))}In.prototype=new Error;r(73046);function Mn(n){n=function(n){var e=(new f.T).setGraph(n.graph());return t.A(n.nodes(),(function(r){e.setNode(r,n.node(r))})),t.A(n.edges(),(function(r){var t=e.edge(r.v,r.w)||{weight:0,minlen:1},o=n.edge(r);e.setEdge(r.v,r.w,{weight:t.weight+o.weight,minlen:Math.max(t.minlen,o.minlen)})})),e}(n),X(n);var e,r=en(n);for(On(r),Ln(r,n);e=Sn(r);)Fn(r,n,e,jn(r,n,e))}function Ln(n,e){var r=function(n,e){return Tn(n,e,"post")}(n,n.nodes());r=r.slice(0,r.length-1),t.A(r,(function(r){!function(n,e,r){var t=n.node(r),o=t.parent;n.edge(r,o).cutvalue=Cn(n,e,r)}(n,e,r)}))}function Cn(n,e,r){var o=n.node(r).parent,i=!0,u=e.edge(r,o),a=0;return u||(i=!1,u=e.edge(o,r)),a=u.weight,t.A(e.nodeEdges(r),(function(t){var u,d,c=t.v===r,f=c?t.w:t.v;if(f!==o){var s=c===i,v=e.edge(t).weight;if(a+=s?v:-v,u=r,d=f,n.hasEdge(u,d)){var g=n.edge(r,f).cutvalue;a+=s?-g:g}}})),a}function On(n,e){arguments.length<2&&(e=n.nodes()[0]),Pn(n,{},1,e)}function Pn(n,e,r,o,u){var a=r,d=n.node(o);return e[o]=!0,t.A(n.neighbors(o),(function(t){i.A(e,t)||(r=Pn(n,e,r,t,o))})),d.low=a,d.lim=r++,u?d.parent=u:delete d.parent,r}function Sn(n){return gn(n.edges(),(function(e){return n.edge(e).cutvalue<0}))}function jn(n,e,r){var t=r.v,o=r.w;e.hasEdge(t,o)||(t=r.w,o=r.v);var i=n.node(t),u=n.node(o),a=i,d=!1;i.lim>u.lim&&(a=u,d=!0);var c=hn.A(e.edges(),(function(e){return d===Gn(n,n.node(e.v),a)&&d!==Gn(n,n.node(e.w),a)}));return W(c,(function(n){return nn(e,n)}))}function Fn(n,e,r,o){var i=r.v,u=r.w;n.removeEdge(i,u),n.setEdge(o.v,o.w,{}),On(n),Ln(n,e),function(n,e){var r=gn(n.nodes(),(function(n){return!e.node(n).parent})),o=function(n,e){return Tn(n,e,"pre")}(n,r);o=o.slice(1),t.A(o,(function(r){var t=n.node(r).parent,o=e.edge(r,t),i=!1;o||(o=e.edge(t,r),i=!0),e.node(r).rank=e.node(t).rank+(i?o.minlen:-o.minlen)}))}(n,e)}function Gn(n,e,r){return r.low<=e.lim&&e.lim<=r.lim}function Vn(n){switch(n.graph().ranker){case"network-simplex":default:qn(n);break;case"tight-tree":!function(n){X(n),en(n)}(n);break;case"longest-path":Bn(n)}}Mn.initLowLimValues=On,Mn.initCutValues=Ln,Mn.calcCutValue=Cn,Mn.leaveEdge=Sn,Mn.enterEdge=jn,Mn.exchangeEdges=Fn;var Bn=X;function qn(n){Mn(n)}var Yn=r(38207),zn=r(89463);function Dn(n){var e=F(n,"root",{},"_root"),r=function(n){var e={};function r(o,i){var u=n.children(o);u&&u.length&&t.A(u,(function(n){r(n,i+1)})),e[o]=i}return t.A(n.children(),(function(n){r(n,1)})),e}(n),o=_(Yn.A(r))-1,i=2*o+1;n.graph().nestingRoot=e,t.A(n.edges(),(function(e){n.edge(e).minlen*=i}));var u=function(n){return zn.A(n.edges(),(function(e,r){return e+n.edge(r).weight}),0)}(n)+1;t.A(n.children(),(function(t){$n(n,e,i,u,o,r,t)})),n.graph().nodeRankFactor=i}function $n(n,e,r,o,i,u,a){var d=n.children(a);if(d.length){var c=q(n,"_bt"),f=q(n,"_bb"),s=n.node(a);n.setParent(c,a),s.borderTop=c,n.setParent(f,a),s.borderBottom=f,t.A(d,(function(t){$n(n,e,r,o,i,u,t);var d=n.node(t),s=d.borderTop?d.borderTop:t,v=d.borderBottom?d.borderBottom:t,g=d.borderTop?o:2*o,h=s!==v?1:i-u[a]+1;n.setEdge(c,s,{weight:g,minlen:h,nestingEdge:!0}),n.setEdge(v,f,{weight:g,minlen:h,nestingEdge:!0})})),n.parent(a)||n.setEdge(e,c,{weight:0,minlen:i+u[a]})}else a!==e&&n.setEdge(e,a,{weight:0,minlen:r})}var Jn=r(91641);const Zn=function(n){return(0,Jn.A)(n,5)};function Hn(n,e,r){var u=function(n){var e;for(;n.hasNode(e=o.A("_root")););return e}(n),a=new f.T({compound:!0}).setGraph({root:u}).setDefaultNodeLabel((function(e){return n.node(e)}));return t.A(n.nodes(),(function(o){var d=n.node(o),c=n.parent(o);(d.rank===e||d.minRank<=e&&e<=d.maxRank)&&(a.setNode(o),a.setParent(o,c||u),t.A(n[r](o),(function(e){var r=e.v===o?e.w:e.v,t=a.edge(r,o),i=C.A(t)?0:t.weight;a.setEdge(r,o,{weight:n.edge(e).weight+i})})),i.A(d,"minRank")&&a.setNode(o,{borderLeft:d.borderLeft[e],borderRight:d.borderRight[e]}))})),a}var Kn=r(52851);const Qn=function(n,e,r){for(var t=-1,o=n.length,i=e.length,u={};++te||i&&u&&d&&!a&&!c||t&&u&&d||!r&&d||!o)return 1;if(!t&&!i&&!c&&n=a?d:d*("desc"==r[t]?-1:1)}return n.index-e.index};const ue=function(n,e,r){e=e.length?(0,Xn.A)(e,(function(n){return(0,ln.A)(n)?function(e){return(0,ne.A)(e,1===n.length?n[0]:n)}:n})):[N.A];var t=-1;e=(0,Xn.A)(e,(0,te.A)(M.A));var o=(0,ee.A)(n,(function(n,r,o){return{criteria:(0,Xn.A)(e,(function(e){return e(n)})),index:++t,value:n}}));return re(o,(function(n,e){return ie(n,e,r)}))};var ae=r(24326),de=r(6832);const ce=(0,ae.A)((function(n,e){if(null==n)return[];var r=e.length;return r>1&&(0,de.A)(n,e[0],e[1])?e=[]:r>2&&(0,de.A)(e[0],e[1],e[2])&&(e=[e[0]]),ue(n,(0,Wn.A)(e,1),[])}));function fe(n,e){for(var r=0,t=1;t0;)e%2&&(r+=f[e+1]),f[e=e-1>>1]+=n.weight;s+=n.weight*r}))),s}function ve(n,e){var r={};return t.A(n,(function(n,e){var t=r[n.v]={indegree:0,in:[],out:[],vs:[n.v],i:e};C.A(n.barycenter)||(t.barycenter=n.barycenter,t.weight=n.weight)})),t.A(e.edges(),(function(n){var e=r[n.v],t=r[n.w];C.A(e)||C.A(t)||(t.indegree++,e.out.push(r[n.w]))})),function(n){var e=[];function r(n){return function(e){e.merged||(C.A(e.barycenter)||C.A(n.barycenter)||e.barycenter>=n.barycenter)&&function(n,e){var r=0,t=0;n.weight&&(r+=n.barycenter*n.weight,t+=n.weight);e.weight&&(r+=e.barycenter*e.weight,t+=e.weight);n.vs=e.vs.concat(n.vs),n.barycenter=r/t,n.weight=t,n.i=Math.min(e.i,n.i),e.merged=!0}(n,e)}}function o(e){return function(r){r.in.push(e),0==--r.indegree&&n.push(r)}}for(;n.length;){var i=n.pop();e.push(i),t.A(i.in.reverse(),r(i)),t.A(i.out,o(i))}return d.A(hn.A(e,(function(n){return!n.merged})),(function(n){return b.A(n,["vs","i","barycenter","weight"])}))}(hn.A(r,(function(n){return!n.indegree})))}function ge(n,e){var r,o=function(n,e){var r={lhs:[],rhs:[]};return t.A(n,(function(n){e(n)?r.lhs.push(n):r.rhs.push(n)})),r}(n,(function(n){return i.A(n,"barycenter")})),u=o.lhs,d=ce(o.rhs,(function(n){return-n.i})),c=[],f=0,s=0,v=0;u.sort((r=!!e,function(n,e){return n.barycentere.barycenter?1:r?e.i-n.i:n.i-e.i})),v=he(c,d,v),t.A(u,(function(n){v+=n.vs.length,c.push(n.vs),f+=n.barycenter*n.weight,s+=n.weight,v=he(c,d,v)}));var g={vs:a.A(c)};return s&&(g.barycenter=f/s,g.weight=s),g}function he(n,e,r){for(var t;e.length&&(t=I(e)).i<=r;)e.pop(),n.push(t.vs),r++;return r}function le(n,e,r,o){var u=n.children(e),c=n.node(e),f=c?c.borderLeft:void 0,s=c?c.borderRight:void 0,v={};f&&(u=hn.A(u,(function(n){return n!==f&&n!==s})));var g=function(n,e){return d.A(e,(function(e){var r=n.inEdges(e);if(r.length){var t=zn.A(r,(function(e,r){var t=n.edge(r),o=n.node(r.v);return{sum:e.sum+t.weight*o.order,weight:e.weight+t.weight}}),{sum:0,weight:0});return{v:e,barycenter:t.sum/t.weight,weight:t.weight}}return{v:e}}))}(n,u);t.A(g,(function(e){if(n.children(e.v).length){var t=le(n,e.v,r,o);v[e.v]=t,i.A(t,"barycenter")&&(u=e,a=t,C.A(u.barycenter)?(u.barycenter=a.barycenter,u.weight=a.weight):(u.barycenter=(u.barycenter*u.weight+a.barycenter*a.weight)/(u.weight+a.weight),u.weight+=a.weight))}var u,a}));var h=ve(g,r);!function(n,e){t.A(n,(function(n){n.vs=a.A(n.vs.map((function(n){return e[n]?e[n].vs:n})))}))}(h,v);var l=ge(h,o);if(f&&(l.vs=a.A([f,l.vs,s]),n.predecessors(f).length)){var A=n.node(n.predecessors(f)[0]),p=n.node(n.predecessors(s)[0]);i.A(l,"barycenter")||(l.barycenter=0,l.weight=0),l.barycenter=(l.barycenter*l.weight+A.order+p.order)/(l.weight+2),l.weight+=2}return l}function Ae(n){var e=Y(n),r=pe(n,c.A(1,e+1),"inEdges"),o=pe(n,c.A(e-1,-1,-1),"outEdges"),u=function(n){var e={},r=hn.A(n.nodes(),(function(e){return!n.children(e).length})),o=_(d.A(r,(function(e){return n.node(e).rank}))),u=d.A(c.A(o+1),(function(){return[]})),a=ce(r,(function(e){return n.node(e).rank}));return t.A(a,(function r(o){if(!i.A(e,o)){e[o]=!0;var a=n.node(o);u[a.rank].push(o),t.A(n.successors(o),r)}})),u}(n);me(n,u);for(var a,f=Number.POSITIVE_INFINITY,s=0,v=0;v<4;++s,++v){we(s%2?r:o,s%4>=2);var g=fe(n,u=B(n));gd||c>e[o].lim));i=o,o=t;for(;(o=n.parent(o))!==i;)a.push(o);return{path:u.concat(a.reverse()),lca:i}}(n,e,o.v,o.w),u=i.path,a=i.lca,d=0,c=u[d],f=!0;r!==o.w;){if(t=n.node(r),f){for(;(c=u[d])!==a&&n.node(c).maxRankr){var t=e;e=r,r=t}var o=n[e];o||(n[e]=o={}),o[r]=!0}function Te(n,e,r){if(e>r){var t=e;e=r,r=t}return i.A(n[e],r)}function Re(n,e,r,o,u){var a={},d=function(n,e,r,o){var u=new f.T,a=n.graph(),d=function(n,e,r){return function(t,o,u){var a,d=t.node(o),c=t.node(u),f=0;if(f+=d.width/2,i.A(d,"labelpos"))switch(d.labelpos.toLowerCase()){case"l":a=-d.width/2;break;case"r":a=d.width/2}if(a&&(f+=r?a:-a),a=0,f+=(d.dummy?e:n)/2,f+=(c.dummy?e:n)/2,f+=c.width/2,i.A(c,"labelpos"))switch(c.labelpos.toLowerCase()){case"l":a=c.width/2;break;case"r":a=-c.width/2}return a&&(f+=r?a:-a),a=0,f}}(a.nodesep,a.edgesep,o);return t.A(e,(function(e){var o;t.A(e,(function(e){var t=r[e];if(u.setNode(t),o){var i=r[o],a=u.edge(i,t);u.setEdge(i,t,Math.max(d(n,e,o),a||0))}o=e}))})),u}(n,e,r,u),c=u?"borderLeft":"borderRight";function s(n,e){for(var r=d.nodes(),t=r.pop(),o={};t;)o[t]?n(t):(o[t]=!0,r.push(t),r=r.concat(e(t))),t=r.pop()}return s((function(n){a[n]=d.inEdges(n).reduce((function(n,e){return Math.max(n,a[e.v]+d.edge(e))}),0)}),d.predecessors.bind(d)),s((function(e){var r=d.outEdges(e).reduce((function(n,e){return Math.min(n,a[e.w]-d.edge(e))}),Number.POSITIVE_INFINITY),t=n.node(e);r!==Number.POSITIVE_INFINITY&&t.borderType!==c&&(a[e]=Math.max(a[e],r))}),d.successors.bind(d)),t.A(o,(function(n){a[n]=a[r[n]]})),a}function Me(n){var e,r=B(n),o=m.A(_e(n,r),function(n,e){var r={};function o(e,o,i,u,a){var d;t.A(c.A(o,i),(function(o){d=e[o],n.node(d).dummy&&t.A(n.predecessors(d),(function(e){var t=n.node(e);t.dummy&&(t.ordera)&&Ie(r,e,d)}))}))}return zn.A(e,(function(e,r){var i,u=-1,a=0;return t.A(r,(function(t,d){if("border"===n.node(t).dummy){var c=n.predecessors(t);c.length&&(i=n.node(c[0]).order,o(r,a,d,u,i),a=d,u=i)}o(r,a,r.length,i,e.length)})),r})),r}(n,r)),i={};t.A(["u","d"],(function(u){e="u"===u?r:Yn.A(r).reverse(),t.A(["l","r"],(function(r){"r"===r&&(e=d.A(e,(function(n){return Yn.A(n).reverse()})));var a=("u"===u?n.predecessors:n.successors).bind(n),c=function(n,e,r,o){var i={},u={},a={};return t.A(e,(function(n){t.A(n,(function(n,e){i[n]=n,u[n]=n,a[n]=e}))})),t.A(e,(function(n){var e=-1;t.A(n,(function(n){var t=o(n);if(t.length){t=ce(t,(function(n){return a[n]}));for(var d=(t.length-1)/2,c=Math.floor(d),f=Math.ceil(d);c<=f;++c){var s=t[c];u[n]===n&&e{r.d(e,{A:()=>i});var t=r(6240),o=r(38446);const i=function(n,e){var r=-1,i=(0,o.A)(n)?Array(n.length):[];return(0,t.A)(n,(function(n,t,o){i[++r]=e(n,t,o)})),i}},23068:(n,e,r)=>{r.d(e,{A:()=>c});var t=r(24326),o=r(66984),i=r(6832),u=r(55615),a=Object.prototype,d=a.hasOwnProperty;const c=(0,t.A)((function(n,e){n=Object(n);var r=-1,t=e.length,c=t>2?e[2]:void 0;for(c&&(0,i.A)(e[0],e[1],c)&&(t=1);++r{r.d(e,{A:()=>o});var t=r(13588);const o=function(n){return(null==n?0:n.length)?(0,t.A)(n,1):[]}},74722:(n,e,r)=>{r.d(e,{A:()=>a});var t=r(45572),o=r(49574),i=r(52568),u=r(92049);const a=function(n,e){return((0,u.A)(n)?t.A:i.A)(n,(0,o.A)(e,3))}},81942:(n,e,r)=>{r.d(e,{A:()=>A});var t=r(66318),o=r(52851),i=r(7819),u=r(25353),a=r(23149),d=r(30901);const c=function(n,e,r,t){if(!(0,a.A)(n))return n;for(var c=-1,f=(e=(0,i.A)(e,n)).length,s=f-1,v=n;null!=v&&++c{r.d(e,{A:()=>d});var t=Math.ceil,o=Math.max;const i=function(n,e,r,i){for(var u=-1,a=o(t((e-n)/(r||1)),0),d=Array(a);a--;)d[i?a:++u]=n,n+=r;return d};var u=r(6832),a=r(74342);const d=function(n){return function(e,r,t){return t&&"number"!=typeof t&&(0,u.A)(e,r,t)&&(r=t=void 0),e=(0,a.A)(e),void 0===r?(r=e,e=0):r=(0,a.A)(r),t=void 0===t?e{r.d(e,{A:()=>l});var t=/\s/;const o=function(n){for(var e=n.length;e--&&t.test(n.charAt(e)););return e};var i=/^\s+/;const u=function(n){return n?n.slice(0,o(n)+1).replace(i,""):n};var a=r(23149),d=r(61882),c=/^[-+]0x[0-9a-f]+$/i,f=/^0b[01]+$/i,s=/^0o[0-7]+$/i,v=parseInt;const g=function(n){if("number"==typeof n)return n;if((0,d.A)(n))return NaN;if((0,a.A)(n)){var e="function"==typeof n.valueOf?n.valueOf():n;n=(0,a.A)(e)?e+"":e}if("string"!=typeof n)return 0===n?n:+n;n=u(n);var r=f.test(n);return r||s.test(n)?v(n.slice(2),r?2:8):c.test(n)?NaN:+n};var h=1/0;const l=function(n){return n?(n=g(n))===h||n===-1/0?17976931348623157e292*(n<0?-1:1):n==n?n:0:0===n?n:0}},5664:(n,e,r)=>{r.d(e,{A:()=>i});var t=r(28894),o=0;const i=function(n){var e=++o;return(0,t.A)(n)+e}}}]); \ No newline at end of file diff --git a/assets/js/1186.c80cf4c8.js b/assets/js/1186.c80cf4c8.js new file mode 100644 index 000000000000..76a65860d968 --- /dev/null +++ b/assets/js/1186.c80cf4c8.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1186],{86022:(t,e,a)=>{function r(t,e){t.accDescr&&e.setAccDescription?.(t.accDescr),t.accTitle&&e.setAccTitle?.(t.accTitle),t.title&&e.setDiagramTitle?.(t.title)}a.d(e,{S:()=>r}),(0,a(45567).K2)(r,"populateCommonDb")},51186:(t,e,a)=>{a.d(e,{diagram:()=>x});var r=a(86022),n=a(85039),l=a(61021),o=a(45567),i=a(78731),c={packet:[]},s=structuredClone(c),d=o.UI.packet,k=(0,o.K2)((()=>{const t=(0,n.$t)({...d,...(0,o.zj)().packet});return t.showBits&&(t.paddingY+=10),t}),"getConfig"),p=(0,o.K2)((()=>s.packet),"getPacket"),b={pushWord:(0,o.K2)((t=>{t.length>0&&s.packet.push(t)}),"pushWord"),getPacket:p,getConfig:k,clear:(0,o.K2)((()=>{(0,o.IU)(),s=structuredClone(c)}),"clear"),setAccTitle:o.SV,getAccTitle:o.iN,setDiagramTitle:o.ke,getDiagramTitle:o.ab,getAccDescription:o.m7,setAccDescription:o.EI},g=(0,o.K2)((t=>{(0,r.S)(t,b);let e=-1,a=[],n=1;const{bitsPerRow:l}=b.getConfig();for(let{start:r,end:i,label:c}of t.blocks){if(i&&i{if(void 0===t.end&&(t.end=t.start),t.start>t.end)throw new Error(`Block start ${t.start} is greater than block end ${t.end}.`);return t.end+1<=e*a?[t,void 0]:[{start:t.start,end:e*a-1,label:t.label},{start:e*a,end:t.end,label:t.label}]}),"getNextFittingBlock"),f={parse:(0,o.K2)((async t=>{const e=await(0,i.qg)("packet",t);o.Rm.debug(e),g(e)}),"parse")},u=(0,o.K2)(((t,e,a,r)=>{const n=r.db,i=n.getConfig(),{rowHeight:c,paddingY:s,bitWidth:d,bitsPerRow:k}=i,p=n.getPacket(),b=n.getDiagramTitle(),g=c+s,h=g*(p.length+1)-(b?0:c),f=d*k+2,u=(0,l.D)(e);u.attr("viewbox",`0 0 ${f} ${h}`),(0,o.a$)(u,h,f,i.useMaxWidth);for(const[l,o]of p.entries())$(u,o,l,i);u.append("text").text(b).attr("x",f/2).attr("y",h-g/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")}),"draw"),$=(0,o.K2)(((t,e,a,{rowHeight:r,paddingX:n,paddingY:l,bitWidth:o,bitsPerRow:i,showBits:c})=>{const s=t.append("g"),d=a*(r+l)+l;for(const k of e){const t=k.start%i*o+1,e=(k.end-k.start+1)*o-n;if(s.append("rect").attr("x",t).attr("y",d).attr("width",e).attr("height",r).attr("class","packetBlock"),s.append("text").attr("x",t+e/2).attr("y",d+r/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(k.label),!c)continue;const a=k.end===k.start,l=d-2;s.append("text").attr("x",t+(a?e/2:0)).attr("y",l).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",a?"middle":"start").text(k.start),a||s.append("text").attr("x",t+e).attr("y",l).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(k.end)}}),"drawWord"),w={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},x={parser:f,db:b,renderer:{draw:u},styles:(0,o.K2)((({packet:t}={})=>{const e=(0,n.$t)(w,t);return`\n\t.packetByte {\n\t\tfont-size: ${e.byteFontSize};\n\t}\n\t.packetByte.start {\n\t\tfill: ${e.startByteColor};\n\t}\n\t.packetByte.end {\n\t\tfill: ${e.endByteColor};\n\t}\n\t.packetLabel {\n\t\tfill: ${e.labelColor};\n\t\tfont-size: ${e.labelFontSize};\n\t}\n\t.packetTitle {\n\t\tfill: ${e.titleColor};\n\t\tfont-size: ${e.titleFontSize};\n\t}\n\t.packetBlock {\n\t\tstroke: ${e.blockStrokeColor};\n\t\tstroke-width: ${e.blockStrokeWidth};\n\t\tfill: ${e.blockFillColor};\n\t}\n\t`}),"styles")}}}]); \ No newline at end of file diff --git a/assets/js/12331e8b.6b478ecf.js b/assets/js/12331e8b.6b478ecf.js deleted file mode 100644 index ab82847320d6..000000000000 --- a/assets/js/12331e8b.6b478ecf.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2244],{48725:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>r,default:()=>p,frontMatter:()=>i,metadata:()=>l,toc:()=>c});var o=n(74848),s=n(28453),a=n(67141);const i={id:"polkadotjs",title:"Polkadot-JS Tooling",sidebar_label:"Polkadot-JS Tooling",description:"The Polkadot-JS Tool Collection.",keywords:["polkadotjs","polkadotjs apps","apps UI","extension"],slug:"../polkadotjs"},r=void 0,l={id:"general/polkadotjs",title:"Polkadot-JS Tooling",description:"The Polkadot-JS Tool Collection.",source:"@site/../docs/general/polkadotjs.md",sourceDirName:"general",slug:"/polkadotjs",permalink:"/docs/polkadotjs",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/polkadotjs.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1729847256e3,frontMatter:{id:"polkadotjs",title:"Polkadot-JS Tooling",sidebar_label:"Polkadot-JS Tooling",description:"The Polkadot-JS Tool Collection.",keywords:["polkadotjs","polkadotjs apps","apps UI","extension"],slug:"../polkadotjs"},sidebar:"docs",previous:{title:"Polkadot-JS",permalink:"/docs/learn-polkadotjs"},next:{title:"Polkadot-JS UI",permalink:"/docs/polkadotjs-ui"}},d={},c=[{value:"Polkadot-JS UI",id:"polkadot-js-ui",level:2},{value:"Polkadot-JS UI Desktop App",id:"polkadot-js-ui-desktop-app",level:3},{value:"Polkadot-JS Extension",id:"polkadot-js-extension",level:2},{value:"Polkadot-JS Phishing List",id:"polkadot-js-phishing-list",level:2},{value:"Polkadot-JS API",id:"polkadot-js-api",level:2},{value:"Querying On-chain Data",id:"querying-on-chain-data",level:3},{value:"Issuing Extrinsics",id:"issuing-extrinsics",level:3}];function h(e){const t={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(a.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the Polkadot-JS UI, you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,o.jsxs)(t.p,{children:[(0,o.jsx)(t.a,{href:"https://polkadot.js.org/",children:(0,o.jsx)(t.strong,{children:"Polkadot-JS"})})," is a collection of tools that interfaces with Relay\nChains and parachains in a granular way. Below we describe the different components of Polkadot-JS.\nFor more information about Polkadot-JS you can consult the\n",(0,o.jsx)(t.a,{href:"https://polkadot.js.org/docs/",children:(0,o.jsx)(t.strong,{children:"official documentation"})}),"."]}),"\n",(0,o.jsx)(t.h2,{id:"polkadot-js-ui",children:"Polkadot-JS UI"}),"\n",(0,o.jsx)(t.admonition,{title:"For Developers and Power Users Only",type:"info",children:(0,o.jsxs)(t.p,{children:["Please note that this wallet UI is oriented toward developers and power users. Explore Polkadot with\na secure and user-friendly wallets listed on the\n",(0,o.jsx)(t.a,{href:"https://www.polkadot.network/ecosystem/wallets/",children:"Polkadot website"}),". If you need help using the\nPolkadot-JS UI you can contact the\n",(0,o.jsx)(t.a,{href:"https://support.polkadot.network/support/home",children:(0,o.jsx)(t.strong,{children:"Polkadot Support Team"})}),"."]})}),"\n",(0,o.jsxs)(t.p,{children:["The Polkadot-JS UI is an application that loads in your browser. There is a standard DNS\n",(0,o.jsx)(t.a,{href:"https://polkadot.js.org/",children:(0,o.jsx)(t.strong,{children:"hosted version"})}),", which always has the latest features, and an\n",(0,o.jsx)(t.a,{href:"https://dotapps.io/",children:(0,o.jsx)(t.strong,{children:"IPFS version"})})," that is less frequently updated but is more decentralized.\nThis is also often referred to as Polkadot-JS Apps, UI or the Apps UI. In the Wiki pages we will\nalways refer to Polkadot-JS UI."]}),"\n",(0,o.jsxs)(t.p,{children:["Polkadot-JS Apps has many capabilities that go beyond basic wallet functions such as account\ncreation and sending or receiving transactions. See the ",(0,o.jsx)(t.a,{href:"/docs/polkadotjs-ui",children:(0,o.jsx)(t.strong,{children:"dedicated section"})}),"\nfor more information about the UI."]}),"\n",(0,o.jsx)(t.h3,{id:"polkadot-js-ui-desktop-app",children:"Polkadot-JS UI Desktop App"}),"\n",(0,o.jsxs)(t.p,{children:["The Polkadot-JS UI also exists as a\n",(0,o.jsx)(t.a,{href:"https://github.com/polkadot-js/apps/releases/",children:(0,o.jsx)(t.strong,{children:"desktop application"})})," for Windows, Mac and Linux.\nThe main advantage of using it is that by default it stores encrypted accounts on the filesystem\ninstead of browser's local storage. Local storage is susceptible to attacks using XSS (Cross-Site\nScripting). There's no such risk when with files stored on disk."]}),"\n",(0,o.jsxs)(t.p,{children:["The desktop app uses the ",(0,o.jsx)(t.a,{href:"https://www.electronjs.org/",children:(0,o.jsx)(t.strong,{children:"Electron"})})," framework. It provides the same\nfeatures as web app, the only difference being different account storage."]}),"\n",(0,o.jsx)(t.admonition,{title:"Ledger not supported",type:"info",children:(0,o.jsx)(t.p,{children:"The desktop application does not support Ledger accounts. If you need a cold storage solution you\ncan try Parity Signer (aka Polkadot Vault)."})}),"\n",(0,o.jsx)(t.h2,{id:"polkadot-js-extension",children:"Polkadot-JS Extension"}),"\n",(0,o.jsxs)(t.p,{children:["The ",(0,o.jsx)(t.a,{href:"https://polkadot.js.org/extension/",children:(0,o.jsx)(t.strong,{children:"Polkadot-JS browser extension"})})," is not a wallet ",(0,o.jsx)(t.em,{children:"per se"}),"\nbut an account management tool. It allows you to create accounts and also import accounts from\n",(0,o.jsx)(t.a,{href:"/docs/ledger",children:(0,o.jsx)(t.strong,{children:"Ledger"})})," devices or Parity Signer, allowing the signing of\n",(0,o.jsx)(t.a,{href:"/docs/learn-transactions",children:(0,o.jsx)(t.strong,{children:"extrinsics"})})," using these accounts. It also allows you export\nexisting accounts and restore accounts (given you have the required information to restore them)."]}),"\n",(0,o.jsx)(t.p,{children:"The extension is a robust key storage tool, i.e. even if you clear the cache of your browser your\naccounts will be retained. The extension will recognize any websites that have been flagged for\nmalicious activity. For additional security, the extension will always ask if you want a specific\nwebsite to access the account information on it."}),"\n",(0,o.jsxs)(t.p,{children:["The extension does not let users interact directly with on-chain functions as one would find on a\nwallet app like Metamask, i.e. it does not allow you to transact or do anything else other than\nadding and managing accounts. However, it provides a simple interface for interacting with\nextension-compliant dApps such as the ",(0,o.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/explorer",children:(0,o.jsx)(t.strong,{children:"Polkadot-JS UI"})}),"\nand the ",(0,o.jsx)(t.a,{href:"https://staking.polkadot.cloud/#/overview",children:(0,o.jsx)(t.strong,{children:"Polkadot Staking Dashboard"})}),". Check\n",(0,o.jsx)(t.a,{href:"/docs/wallets-and-extensions",children:"wallets and extensions"})," page for wallets that are capable of\ntransacting on-chain directly."]}),"\n",(0,o.jsx)(t.admonition,{title:"Metadata Updates",type:"info",children:(0,o.jsxs)(t.p,{children:["The browser extension is a tool that interacts with the Polkadot network, but it is disconnected\nfrom it when it is not in use. It is important you\n",(0,o.jsx)(t.a,{href:"/docs/learn-guides-accounts#metadata-updates-with-the-polkadot-js-browser-extension",children:(0,o.jsx)(t.strong,{children:"always check for metadata updates"})}),"\nbefore using the extension or other account management tools such as Parity Signer (aka Polkadot\nVault)."]})}),"\n",(0,o.jsx)(t.h2,{id:"polkadot-js-phishing-list",children:"Polkadot-JS Phishing List"}),"\n",(0,o.jsxs)(t.p,{children:["The ",(0,o.jsx)(t.a,{href:"https://polkadot.js.org/phishing/",children:(0,o.jsx)(t.strong,{children:"Polkadot-JS phishing list"})})," website is a community-driven\ncuration of malicious actors and operators. The Polkadot-JS extension uses this list to warn a user\nabout suspicious URLs and addresses that are part of the list, and automatically blocks the account\naddress."]}),"\n",(0,o.jsx)(t.h2,{id:"polkadot-js-api",children:"Polkadot-JS API"}),"\n",(0,o.jsxs)(t.p,{children:["The ",(0,o.jsx)(t.a,{href:"https://github.com/polkadot-js/api",children:(0,o.jsx)(t.strong,{children:"Polkadot-JS API"})})," is a JavaScript API allowing for\nprograms to interface with the functionalities of Polkadot."]}),"\n",(0,o.jsxs)(t.p,{children:["While interacting with the underlying\n",(0,o.jsx)(t.a,{href:"https://www.npmjs.com/package/@polkadot/api",children:(0,o.jsx)(t.strong,{children:"@polkadot/api"})}),", most interfaces are generated\nautomatically when connecting to an available node. This is quite a departure from many other API\ndesigns where the interfaces are commonly static."]}),"\n",(0,o.jsxs)(t.p,{children:["When the API connects to a node, it initially retrieves the\n",(0,o.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/runtime",children:(0,o.jsx)(t.strong,{children:"metadata"})}),' which is used to "decorate" the API based on\nits contents. The metadata provides data in the form of ',(0,o.jsx)(t.code,{children:"api...
"})," where ",(0,o.jsx)(t.code,{children:"type"}),"\nfits into one of the following categories:"]}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.code,{children:"consts"})," - runtime constants (these are not functions so the values are returned directly as they\nare defined by the endpoint)"]}),"\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.code,{children:"query"})," - chain state values"]}),"\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.code,{children:"tx"})," - all extrinsics"]}),"\n"]}),"\n",(0,o.jsxs)(t.p,{children:["The metadata also provides information on\n",(0,o.jsx)(t.a,{href:"https://polkadot.js.org/docs/substrate/events/",children:(0,o.jsx)(t.strong,{children:"events"})}),", which can be queried using the\n",(0,o.jsx)(t.code,{children:"api.query.system.events()"})," interface."]}),"\n",(0,o.jsxs)(t.p,{children:["None of the information contained within the ",(0,o.jsx)(t.code,{children:"api.{consts, query, tx}.."})," endpoints\nare hard-coded in the API. These values are defined by the decoration applied from the initial\nmetadata response and are therefore completely dynamic. This suggests that when you connect to\ndifferent parachains, the metadata and API decoration will change and provide varying interfaces\nbased on the chain."]}),"\n",(0,o.jsxs)(t.p,{children:["A developer can use Polkadot-JS Apps to test code's functionality. Interacting with the Polkadot-JS\ncomes down to either ",(0,o.jsx)(t.a,{href:"#querying-on-chain-data",children:(0,o.jsx)(t.strong,{children:"querying on-chain data"})})," or\n",(0,o.jsx)(t.a,{href:"#issuing-extrinsics",children:(0,o.jsx)(t.strong,{children:"issuing an extrinsic"})}),"."]}),"\n",(0,o.jsx)(t.h3,{id:"querying-on-chain-data",children:"Querying On-chain Data"}),"\n",(0,o.jsx)(t.p,{children:"To populate the Apps UI, the web app queries the Polkadot-JS API. The API then queries a node and\nuses JavaScript to return information that the UI will display on the screen. You can choose which\nnode to connect to by changing it in the upper-left-hand corner of the screen."}),"\n",(0,o.jsxs)(t.p,{children:["Let's see how we can query on-chain data with Polkadot-JS UI on the Polkadot network with an\nexample. To find out the current value for existential deposit, navigate to Developer > Chain\nstate > Constants and query the balances pallet for existential deposit as shown in the snapshot\nbelow. You need to click on the plus button to execute the query. The value displayed is in\n",(0,o.jsx)(t.a,{href:"learn-DOT#polkadot",children:"plancks"})]}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{alt:"query chain state",src:n(70044).A+"",width:"1728",height:"380"})}),"\n",(0,o.jsx)(t.h3,{id:"issuing-extrinsics",children:"Issuing Extrinsics"}),"\n",(0,o.jsx)(t.p,{children:"Extrinsics are pieces of information that come from outside the chain and are included in a block.\nExtrinsics can be one of three types: inherents, signed, and unsigned transactions."}),"\n",(0,o.jsx)(t.p,{children:"Most extrinsics displayed on Polkadot-JS Apps are signed transactions. Inherits are non-signed and\nnon-gossiped pieces of information included in blocks by the block author, such as timestamps, which\nare \u201ctrue\u201d because a sufficient number of validators have agreed about validity."}),"\n",(0,o.jsx)(t.p,{children:"Unsigned transactions are information that does not require a signature but will require some sort\nof spam prevention, whereas signed transactions are issued by the originator account of a\ntransaction which contains a signature of that account, which will be subject to a fee to include it\non the chain."})]})}function p(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(h,{...e})}):h(e)}},67141:(e,t,n)=>{n.d(t,{A:()=>a});var o=n(96540),s=n(74848);const a=function(e){var t,n=e.message,a=(0,o.useState)(!0),i=a[0],r=a[1];return(0,s.jsx)(s.Fragment,{children:i&&(0,s.jsxs)("div",{className:"message-box",children:[(0,s.jsx)("button",{className:"close-button",onClick:function(){r(!1)},children:"\u2716 "}),(0,s.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(t=n,t.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},70044:(e,t,n)=>{n.d(t,{A:()=>o});const o=n.p+"assets/images/chain-state-constant-8663ba40c98411da3308fdaf40cb13ee.png"},28453:(e,t,n)=>{n.d(t,{R:()=>i,x:()=>r});var o=n(96540);const s={},a=o.createContext(s);function i(e){const t=o.useContext(a);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),o.createElement(a.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/12331e8b.cbb9aae2.js b/assets/js/12331e8b.cbb9aae2.js new file mode 100644 index 000000000000..cf55e0c75f1e --- /dev/null +++ b/assets/js/12331e8b.cbb9aae2.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2244],{38517:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>l,default:()=>p,frontMatter:()=>r,metadata:()=>o,toc:()=>c});const o=JSON.parse('{"id":"general/polkadotjs","title":"Polkadot-JS Tooling","description":"The Polkadot-JS Tool Collection.","source":"@site/../docs/general/polkadotjs.md","sourceDirName":"general","slug":"/polkadotjs","permalink":"/docs/polkadotjs","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/polkadotjs.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1729847256000,"frontMatter":{"id":"polkadotjs","title":"Polkadot-JS Tooling","sidebar_label":"Polkadot-JS Tooling","description":"The Polkadot-JS Tool Collection.","keywords":["polkadotjs","polkadotjs apps","apps UI","extension"],"slug":"../polkadotjs"},"sidebar":"docs","previous":{"title":"Polkadot-JS","permalink":"/docs/learn-polkadotjs"},"next":{"title":"Polkadot-JS UI","permalink":"/docs/polkadotjs-ui"}}');var s=n(74848),a=n(28453),i=n(67141);const r={id:"polkadotjs",title:"Polkadot-JS Tooling",sidebar_label:"Polkadot-JS Tooling",description:"The Polkadot-JS Tool Collection.",keywords:["polkadotjs","polkadotjs apps","apps UI","extension"],slug:"../polkadotjs"},l=void 0,d={},c=[{value:"Polkadot-JS UI",id:"polkadot-js-ui",level:2},{value:"Polkadot-JS UI Desktop App",id:"polkadot-js-ui-desktop-app",level:3},{value:"Polkadot-JS Extension",id:"polkadot-js-extension",level:2},{value:"Polkadot-JS Phishing List",id:"polkadot-js-phishing-list",level:2},{value:"Polkadot-JS API",id:"polkadot-js-api",level:2},{value:"Querying On-chain Data",id:"querying-on-chain-data",level:3},{value:"Issuing Extrinsics",id:"issuing-extrinsics",level:3}];function h(e){const t={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",strong:"strong",ul:"ul",...(0,a.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(i.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the Polkadot-JS UI, you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.a,{href:"https://polkadot.js.org/",children:(0,s.jsx)(t.strong,{children:"Polkadot-JS"})})," is a collection of tools that interfaces with Relay\nChains and parachains in a granular way. Below we describe the different components of Polkadot-JS.\nFor more information about Polkadot-JS you can consult the\n",(0,s.jsx)(t.a,{href:"https://polkadot.js.org/docs/",children:(0,s.jsx)(t.strong,{children:"official documentation"})}),"."]}),"\n",(0,s.jsx)(t.h2,{id:"polkadot-js-ui",children:"Polkadot-JS UI"}),"\n",(0,s.jsx)(t.admonition,{title:"For Developers and Power Users Only",type:"info",children:(0,s.jsxs)(t.p,{children:["Please note that this wallet UI is oriented toward developers and power users. Explore Polkadot with\na secure and user-friendly wallets listed on the\n",(0,s.jsx)(t.a,{href:"https://www.polkadot.network/ecosystem/wallets/",children:"Polkadot website"}),". If you need help using the\nPolkadot-JS UI you can contact the\n",(0,s.jsx)(t.a,{href:"https://support.polkadot.network/support/home",children:(0,s.jsx)(t.strong,{children:"Polkadot Support Team"})}),"."]})}),"\n",(0,s.jsxs)(t.p,{children:["The Polkadot-JS UI is an application that loads in your browser. There is a standard DNS\n",(0,s.jsx)(t.a,{href:"https://polkadot.js.org/",children:(0,s.jsx)(t.strong,{children:"hosted version"})}),", which always has the latest features, and an\n",(0,s.jsx)(t.a,{href:"https://dotapps.io/",children:(0,s.jsx)(t.strong,{children:"IPFS version"})})," that is less frequently updated but is more decentralized.\nThis is also often referred to as Polkadot-JS Apps, UI or the Apps UI. In the Wiki pages we will\nalways refer to Polkadot-JS UI."]}),"\n",(0,s.jsxs)(t.p,{children:["Polkadot-JS Apps has many capabilities that go beyond basic wallet functions such as account\ncreation and sending or receiving transactions. See the ",(0,s.jsx)(t.a,{href:"/docs/polkadotjs-ui",children:(0,s.jsx)(t.strong,{children:"dedicated section"})}),"\nfor more information about the UI."]}),"\n",(0,s.jsx)(t.h3,{id:"polkadot-js-ui-desktop-app",children:"Polkadot-JS UI Desktop App"}),"\n",(0,s.jsxs)(t.p,{children:["The Polkadot-JS UI also exists as a\n",(0,s.jsx)(t.a,{href:"https://github.com/polkadot-js/apps/releases/",children:(0,s.jsx)(t.strong,{children:"desktop application"})})," for Windows, Mac and Linux.\nThe main advantage of using it is that by default it stores encrypted accounts on the filesystem\ninstead of browser's local storage. Local storage is susceptible to attacks using XSS (Cross-Site\nScripting). There's no such risk when with files stored on disk."]}),"\n",(0,s.jsxs)(t.p,{children:["The desktop app uses the ",(0,s.jsx)(t.a,{href:"https://www.electronjs.org/",children:(0,s.jsx)(t.strong,{children:"Electron"})})," framework. It provides the same\nfeatures as web app, the only difference being different account storage."]}),"\n",(0,s.jsx)(t.admonition,{title:"Ledger not supported",type:"info",children:(0,s.jsx)(t.p,{children:"The desktop application does not support Ledger accounts. If you need a cold storage solution you\ncan try Parity Signer (aka Polkadot Vault)."})}),"\n",(0,s.jsx)(t.h2,{id:"polkadot-js-extension",children:"Polkadot-JS Extension"}),"\n",(0,s.jsxs)(t.p,{children:["The ",(0,s.jsx)(t.a,{href:"https://polkadot.js.org/extension/",children:(0,s.jsx)(t.strong,{children:"Polkadot-JS browser extension"})})," is not a wallet ",(0,s.jsx)(t.em,{children:"per se"}),"\nbut an account management tool. It allows you to create accounts and also import accounts from\n",(0,s.jsx)(t.a,{href:"/docs/ledger",children:(0,s.jsx)(t.strong,{children:"Ledger"})})," devices or Parity Signer, allowing the signing of\n",(0,s.jsx)(t.a,{href:"/docs/learn-transactions",children:(0,s.jsx)(t.strong,{children:"extrinsics"})})," using these accounts. It also allows you export\nexisting accounts and restore accounts (given you have the required information to restore them)."]}),"\n",(0,s.jsx)(t.p,{children:"The extension is a robust key storage tool, i.e. even if you clear the cache of your browser your\naccounts will be retained. The extension will recognize any websites that have been flagged for\nmalicious activity. For additional security, the extension will always ask if you want a specific\nwebsite to access the account information on it."}),"\n",(0,s.jsxs)(t.p,{children:["The extension does not let users interact directly with on-chain functions as one would find on a\nwallet app like Metamask, i.e. it does not allow you to transact or do anything else other than\nadding and managing accounts. However, it provides a simple interface for interacting with\nextension-compliant dApps such as the ",(0,s.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/explorer",children:(0,s.jsx)(t.strong,{children:"Polkadot-JS UI"})}),"\nand the ",(0,s.jsx)(t.a,{href:"https://staking.polkadot.cloud/#/overview",children:(0,s.jsx)(t.strong,{children:"Polkadot Staking Dashboard"})}),". Check\n",(0,s.jsx)(t.a,{href:"/docs/wallets-and-extensions",children:"wallets and extensions"})," page for wallets that are capable of\ntransacting on-chain directly."]}),"\n",(0,s.jsx)(t.admonition,{title:"Metadata Updates",type:"info",children:(0,s.jsxs)(t.p,{children:["The browser extension is a tool that interacts with the Polkadot network, but it is disconnected\nfrom it when it is not in use. It is important you\n",(0,s.jsx)(t.a,{href:"/docs/learn-guides-accounts#metadata-updates-with-the-polkadot-js-browser-extension",children:(0,s.jsx)(t.strong,{children:"always check for metadata updates"})}),"\nbefore using the extension or other account management tools such as Parity Signer (aka Polkadot\nVault)."]})}),"\n",(0,s.jsx)(t.h2,{id:"polkadot-js-phishing-list",children:"Polkadot-JS Phishing List"}),"\n",(0,s.jsxs)(t.p,{children:["The ",(0,s.jsx)(t.a,{href:"https://polkadot.js.org/phishing/",children:(0,s.jsx)(t.strong,{children:"Polkadot-JS phishing list"})})," website is a community-driven\ncuration of malicious actors and operators. The Polkadot-JS extension uses this list to warn a user\nabout suspicious URLs and addresses that are part of the list, and automatically blocks the account\naddress."]}),"\n",(0,s.jsx)(t.h2,{id:"polkadot-js-api",children:"Polkadot-JS API"}),"\n",(0,s.jsxs)(t.p,{children:["The ",(0,s.jsx)(t.a,{href:"https://github.com/polkadot-js/api",children:(0,s.jsx)(t.strong,{children:"Polkadot-JS API"})})," is a JavaScript API allowing for\nprograms to interface with the functionalities of Polkadot."]}),"\n",(0,s.jsxs)(t.p,{children:["While interacting with the underlying\n",(0,s.jsx)(t.a,{href:"https://www.npmjs.com/package/@polkadot/api",children:(0,s.jsx)(t.strong,{children:"@polkadot/api"})}),", most interfaces are generated\nautomatically when connecting to an available node. This is quite a departure from many other API\ndesigns where the interfaces are commonly static."]}),"\n",(0,s.jsxs)(t.p,{children:["When the API connects to a node, it initially retrieves the\n",(0,s.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/runtime",children:(0,s.jsx)(t.strong,{children:"metadata"})}),' which is used to "decorate" the API based on\nits contents. The metadata provides data in the form of ',(0,s.jsx)(t.code,{children:"api...
"})," where ",(0,s.jsx)(t.code,{children:"type"}),"\nfits into one of the following categories:"]}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"consts"})," - runtime constants (these are not functions so the values are returned directly as they\nare defined by the endpoint)"]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"query"})," - chain state values"]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"tx"})," - all extrinsics"]}),"\n"]}),"\n",(0,s.jsxs)(t.p,{children:["The metadata also provides information on\n",(0,s.jsx)(t.a,{href:"https://polkadot.js.org/docs/substrate/events/",children:(0,s.jsx)(t.strong,{children:"events"})}),", which can be queried using the\n",(0,s.jsx)(t.code,{children:"api.query.system.events()"})," interface."]}),"\n",(0,s.jsxs)(t.p,{children:["None of the information contained within the ",(0,s.jsx)(t.code,{children:"api.{consts, query, tx}.."})," endpoints\nare hard-coded in the API. These values are defined by the decoration applied from the initial\nmetadata response and are therefore completely dynamic. This suggests that when you connect to\ndifferent parachains, the metadata and API decoration will change and provide varying interfaces\nbased on the chain."]}),"\n",(0,s.jsxs)(t.p,{children:["A developer can use Polkadot-JS Apps to test code's functionality. Interacting with the Polkadot-JS\ncomes down to either ",(0,s.jsx)(t.a,{href:"#querying-on-chain-data",children:(0,s.jsx)(t.strong,{children:"querying on-chain data"})})," or\n",(0,s.jsx)(t.a,{href:"#issuing-extrinsics",children:(0,s.jsx)(t.strong,{children:"issuing an extrinsic"})}),"."]}),"\n",(0,s.jsx)(t.h3,{id:"querying-on-chain-data",children:"Querying On-chain Data"}),"\n",(0,s.jsx)(t.p,{children:"To populate the Apps UI, the web app queries the Polkadot-JS API. The API then queries a node and\nuses JavaScript to return information that the UI will display on the screen. You can choose which\nnode to connect to by changing it in the upper-left-hand corner of the screen."}),"\n",(0,s.jsxs)(t.p,{children:["Let's see how we can query on-chain data with Polkadot-JS UI on the Polkadot network with an\nexample. To find out the current value for existential deposit, navigate to Developer > Chain\nstate > Constants and query the balances pallet for existential deposit as shown in the snapshot\nbelow. You need to click on the plus button to execute the query. The value displayed is in\n",(0,s.jsx)(t.a,{href:"learn-DOT#polkadot",children:"plancks"})]}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{alt:"query chain state",src:n(70044).A+"",width:"1728",height:"380"})}),"\n",(0,s.jsx)(t.h3,{id:"issuing-extrinsics",children:"Issuing Extrinsics"}),"\n",(0,s.jsx)(t.p,{children:"Extrinsics are pieces of information that come from outside the chain and are included in a block.\nExtrinsics can be one of three types: inherents, signed, and unsigned transactions."}),"\n",(0,s.jsx)(t.p,{children:"Most extrinsics displayed on Polkadot-JS Apps are signed transactions. Inherits are non-signed and\nnon-gossiped pieces of information included in blocks by the block author, such as timestamps, which\nare \u201ctrue\u201d because a sufficient number of validators have agreed about validity."}),"\n",(0,s.jsx)(t.p,{children:"Unsigned transactions are information that does not require a signature but will require some sort\nof spam prevention, whereas signed transactions are issued by the originator account of a\ntransaction which contains a signature of that account, which will be subject to a fee to include it\non the chain."})]})}function p(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}},67141:(e,t,n)=>{n.d(t,{A:()=>a});var o=n(96540),s=n(74848);const a=function(e){var t,n=e.message,a=(0,o.useState)(!0),i=a[0],r=a[1];return(0,s.jsx)(s.Fragment,{children:i&&(0,s.jsxs)("div",{className:"message-box",children:[(0,s.jsx)("button",{className:"close-button",onClick:function(){r(!1)},children:"\u2716 "}),(0,s.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(t=n,t.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},70044:(e,t,n)=>{n.d(t,{A:()=>o});const o=n.p+"assets/images/chain-state-constant-8663ba40c98411da3308fdaf40cb13ee.png"},28453:(e,t,n)=>{n.d(t,{R:()=>i,x:()=>r});var o=n(96540);const s={},a=o.createContext(s);function i(e){const t=o.useContext(a);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),o.createElement(a.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/130.16be6ef6.js b/assets/js/130.16be6ef6.js deleted file mode 100644 index d4e8dfa1b66f..000000000000 --- a/assets/js/130.16be6ef6.js +++ /dev/null @@ -1,18475 +0,0 @@ -"use strict"; -exports.id = 130; -exports.ids = [130]; -exports.modules = { - -/***/ 22130: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ katex) -/* harmony export */ }); -/** - * Lexing or parsing positional information for error reporting. - * This object is immutable. - */ -class SourceLocation { - // The + prefix indicates that these fields aren't writeable - // Lexer holding the input string. - // Start offset, zero-based inclusive. - // End offset, zero-based exclusive. - constructor(lexer, start, end) { - this.lexer = void 0; - this.start = void 0; - this.end = void 0; - this.lexer = lexer; - this.start = start; - this.end = end; - } - /** - * Merges two `SourceLocation`s from location providers, given they are - * provided in order of appearance. - * - Returns the first one's location if only the first is provided. - * - Returns a merged range of the first and the last if both are provided - * and their lexers match. - * - Otherwise, returns null. - */ - - - static range(first, second) { - if (!second) { - return first && first.loc; - } else if (!first || !first.loc || !second.loc || first.loc.lexer !== second.loc.lexer) { - return null; - } else { - return new SourceLocation(first.loc.lexer, first.loc.start, second.loc.end); - } - } - -} - -/** - * Interface required to break circular dependency between Token, Lexer, and - * ParseError. - */ - -/** - * The resulting token returned from `lex`. - * - * It consists of the token text plus some position information. - * The position information is essentially a range in an input string, - * but instead of referencing the bare input string, we refer to the lexer. - * That way it is possible to attach extra metadata to the input string, - * like for example a file name or similar. - * - * The position information is optional, so it is OK to construct synthetic - * tokens if appropriate. Not providing available position information may - * lead to degraded error reporting, though. - */ -class Token { - // don't expand the token - // used in \noexpand - constructor(text, // the text of this token - loc) { - this.text = void 0; - this.loc = void 0; - this.noexpand = void 0; - this.treatAsRelax = void 0; - this.text = text; - this.loc = loc; - } - /** - * Given a pair of tokens (this and endToken), compute a `Token` encompassing - * the whole input range enclosed by these two. - */ - - - range(endToken, // last token of the range, inclusive - text // the text of the newly constructed token - ) { - return new Token(text, SourceLocation.range(this, endToken)); - } - -} - -/** - * This is the ParseError class, which is the main error thrown by KaTeX - * functions when something has gone wrong. This is used to distinguish internal - * errors from errors in the expression that the user provided. - * - * If possible, a caller should provide a Token or ParseNode with information - * about where in the source string the problem occurred. - */ -class ParseError { - // Error start position based on passed-in Token or ParseNode. - // Length of affected text based on passed-in Token or ParseNode. - // The underlying error message without any context added. - constructor(message, // The error message - token // An object providing position information - ) { - this.name = void 0; - this.position = void 0; - this.length = void 0; - this.rawMessage = void 0; - var error = "KaTeX parse error: " + message; - var start; - var end; - var loc = token && token.loc; - - if (loc && loc.start <= loc.end) { - // If we have the input and a position, make the error a bit fancier - // Get the input - var input = loc.lexer.input; // Prepend some information - - start = loc.start; - end = loc.end; - - if (start === input.length) { - error += " at end of input: "; - } else { - error += " at position " + (start + 1) + ": "; - } // Underline token in question using combining underscores - - - var underlined = input.slice(start, end).replace(/[^]/g, "$&\u0332"); // Extract some context from the input and add it to the error - - var left; - - if (start > 15) { - left = "…" + input.slice(start - 15, start); - } else { - left = input.slice(0, start); - } - - var right; - - if (end + 15 < input.length) { - right = input.slice(end, end + 15) + "…"; - } else { - right = input.slice(end); - } - - error += left + underlined + right; - } // Some hackery to make ParseError a prototype of Error - // See http://stackoverflow.com/a/8460753 - // $FlowFixMe - - - var self = new Error(error); - self.name = "ParseError"; // $FlowFixMe - - self.__proto__ = ParseError.prototype; - self.position = start; - - if (start != null && end != null) { - self.length = end - start; - } - - self.rawMessage = message; - return self; - } - -} // $FlowFixMe More hackery - - -ParseError.prototype.__proto__ = Error.prototype; - -/** - * This file contains a list of utility functions which are useful in other - * files. - */ - -/** - * Return whether an element is contained in a list - */ -var contains = function contains(list, elem) { - return list.indexOf(elem) !== -1; -}; -/** - * Provide a default value if a setting is undefined - * NOTE: Couldn't use `T` as the output type due to facebook/flow#5022. - */ - - -var deflt = function deflt(setting, defaultIfUndefined) { - return setting === undefined ? defaultIfUndefined : setting; -}; // hyphenate and escape adapted from Facebook's React under Apache 2 license - - -var uppercase = /([A-Z])/g; - -var hyphenate = function hyphenate(str) { - return str.replace(uppercase, "-$1").toLowerCase(); -}; - -var ESCAPE_LOOKUP = { - "&": "&", - ">": ">", - "<": "<", - "\"": """, - "'": "'" -}; -var ESCAPE_REGEX = /[&><"']/g; -/** - * Escapes text to prevent scripting attacks. - */ - -function escape(text) { - return String(text).replace(ESCAPE_REGEX, match => ESCAPE_LOOKUP[match]); -} -/** - * Sometimes we want to pull out the innermost element of a group. In most - * cases, this will just be the group itself, but when ordgroups and colors have - * a single element, we want to pull that out. - */ - - -var getBaseElem = function getBaseElem(group) { - if (group.type === "ordgroup") { - if (group.body.length === 1) { - return getBaseElem(group.body[0]); - } else { - return group; - } - } else if (group.type === "color") { - if (group.body.length === 1) { - return getBaseElem(group.body[0]); - } else { - return group; - } - } else if (group.type === "font") { - return getBaseElem(group.body); - } else { - return group; - } -}; -/** - * TeXbook algorithms often reference "character boxes", which are simply groups - * with a single character in them. To decide if something is a character box, - * we find its innermost group, and see if it is a single character. - */ - - -var isCharacterBox = function isCharacterBox(group) { - var baseElem = getBaseElem(group); // These are all they types of groups which hold single characters - - return baseElem.type === "mathord" || baseElem.type === "textord" || baseElem.type === "atom"; -}; - -var assert = function assert(value) { - if (!value) { - throw new Error('Expected non-null, but got ' + String(value)); - } - - return value; -}; -/** - * Return the protocol of a URL, or "_relative" if the URL does not specify a - * protocol (and thus is relative), or `null` if URL has invalid protocol - * (so should be outright rejected). - */ - -var protocolFromUrl = function protocolFromUrl(url) { - // Check for possible leading protocol. - // https://url.spec.whatwg.org/#url-parsing strips leading whitespace - // (U+20) or C0 control (U+00-U+1F) characters. - // eslint-disable-next-line no-control-regex - var protocol = /^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(url); - - if (!protocol) { - return "_relative"; - } // Reject weird colons - - - if (protocol[2] !== ":") { - return null; - } // Reject invalid characters in scheme according to - // https://datatracker.ietf.org/doc/html/rfc3986#section-3.1 - - - if (!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(protocol[1])) { - return null; - } // Lowercase the protocol - - - return protocol[1].toLowerCase(); -}; -var utils = { - contains, - deflt, - escape, - hyphenate, - getBaseElem, - isCharacterBox, - protocolFromUrl -}; - -/* eslint no-console:0 */ -// TODO: automatically generate documentation -// TODO: check all properties on Settings exist -// TODO: check the type of a property on Settings matches -var SETTINGS_SCHEMA = { - displayMode: { - type: "boolean", - description: "Render math in display mode, which puts the math in " + "display style (so \\int and \\sum are large, for example), and " + "centers the math on the page on its own line.", - cli: "-d, --display-mode" - }, - output: { - type: { - enum: ["htmlAndMathml", "html", "mathml"] - }, - description: "Determines the markup language of the output.", - cli: "-F, --format " - }, - leqno: { - type: "boolean", - description: "Render display math in leqno style (left-justified tags)." - }, - fleqn: { - type: "boolean", - description: "Render display math flush left." - }, - throwOnError: { - type: "boolean", - default: true, - cli: "-t, --no-throw-on-error", - cliDescription: "Render errors (in the color given by --error-color) ins" + "tead of throwing a ParseError exception when encountering an error." - }, - errorColor: { - type: "string", - default: "#cc0000", - cli: "-c, --error-color ", - cliDescription: "A color string given in the format 'rgb' or 'rrggbb' " + "(no #). This option determines the color of errors rendered by the " + "-t option.", - cliProcessor: color => "#" + color - }, - macros: { - type: "object", - cli: "-m, --macro ", - cliDescription: "Define custom macro of the form '\\foo:expansion' (use " + "multiple -m arguments for multiple macros).", - cliDefault: [], - cliProcessor: (def, defs) => { - defs.push(def); - return defs; - } - }, - minRuleThickness: { - type: "number", - description: "Specifies a minimum thickness, in ems, for fraction lines," + " `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, " + "`\\hdashline`, `\\underline`, `\\overline`, and the borders of " + "`\\fbox`, `\\boxed`, and `\\fcolorbox`.", - processor: t => Math.max(0, t), - cli: "--min-rule-thickness ", - cliProcessor: parseFloat - }, - colorIsTextColor: { - type: "boolean", - description: "Makes \\color behave like LaTeX's 2-argument \\textcolor, " + "instead of LaTeX's one-argument \\color mode change.", - cli: "-b, --color-is-text-color" - }, - strict: { - type: [{ - enum: ["warn", "ignore", "error"] - }, "boolean", "function"], - description: "Turn on strict / LaTeX faithfulness mode, which throws an " + "error if the input uses features that are not supported by LaTeX.", - cli: "-S, --strict", - cliDefault: false - }, - trust: { - type: ["boolean", "function"], - description: "Trust the input, enabling all HTML features such as \\url.", - cli: "-T, --trust" - }, - maxSize: { - type: "number", - default: Infinity, - description: "If non-zero, all user-specified sizes, e.g. in " + "\\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, " + "elements and spaces can be arbitrarily large", - processor: s => Math.max(0, s), - cli: "-s, --max-size ", - cliProcessor: parseInt - }, - maxExpand: { - type: "number", - default: 1000, - description: "Limit the number of macro expansions to the specified " + "number, to prevent e.g. infinite macro loops. If set to Infinity, " + "the macro expander will try to fully expand as in LaTeX.", - processor: n => Math.max(0, n), - cli: "-e, --max-expand ", - cliProcessor: n => n === "Infinity" ? Infinity : parseInt(n) - }, - globalGroup: { - type: "boolean", - cli: false - } -}; - -function getDefaultValue(schema) { - if (schema.default) { - return schema.default; - } - - var type = schema.type; - var defaultType = Array.isArray(type) ? type[0] : type; - - if (typeof defaultType !== 'string') { - return defaultType.enum[0]; - } - - switch (defaultType) { - case 'boolean': - return false; - - case 'string': - return ''; - - case 'number': - return 0; - - case 'object': - return {}; - } -} -/** - * The main Settings object - * - * The current options stored are: - * - displayMode: Whether the expression should be typeset as inline math - * (false, the default), meaning that the math starts in - * \textstyle and is placed in an inline-block); or as display - * math (true), meaning that the math starts in \displaystyle - * and is placed in a block with vertical margin. - */ - - -class Settings { - constructor(options) { - this.displayMode = void 0; - this.output = void 0; - this.leqno = void 0; - this.fleqn = void 0; - this.throwOnError = void 0; - this.errorColor = void 0; - this.macros = void 0; - this.minRuleThickness = void 0; - this.colorIsTextColor = void 0; - this.strict = void 0; - this.trust = void 0; - this.maxSize = void 0; - this.maxExpand = void 0; - this.globalGroup = void 0; - // allow null options - options = options || {}; - - for (var prop in SETTINGS_SCHEMA) { - if (SETTINGS_SCHEMA.hasOwnProperty(prop)) { - // $FlowFixMe - var schema = SETTINGS_SCHEMA[prop]; // TODO: validate options - // $FlowFixMe - - this[prop] = options[prop] !== undefined ? schema.processor ? schema.processor(options[prop]) : options[prop] : getDefaultValue(schema); - } - } - } - /** - * Report nonstrict (non-LaTeX-compatible) input. - * Can safely not be called if `this.strict` is false in JavaScript. - */ - - - reportNonstrict(errorCode, errorMsg, token) { - var strict = this.strict; - - if (typeof strict === "function") { - // Allow return value of strict function to be boolean or string - // (or null/undefined, meaning no further processing). - strict = strict(errorCode, errorMsg, token); - } - - if (!strict || strict === "ignore") { - return; - } else if (strict === true || strict === "error") { - throw new ParseError("LaTeX-incompatible input and strict mode is set to 'error': " + (errorMsg + " [" + errorCode + "]"), token); - } else if (strict === "warn") { - typeof console !== "undefined" && console.warn("LaTeX-incompatible input and strict mode is set to 'warn': " + (errorMsg + " [" + errorCode + "]")); - } else { - // won't happen in type-safe code - typeof console !== "undefined" && console.warn("LaTeX-incompatible input and strict mode is set to " + ("unrecognized '" + strict + "': " + errorMsg + " [" + errorCode + "]")); - } - } - /** - * Check whether to apply strict (LaTeX-adhering) behavior for unusual - * input (like `\\`). Unlike `nonstrict`, will not throw an error; - * instead, "error" translates to a return value of `true`, while "ignore" - * translates to a return value of `false`. May still print a warning: - * "warn" prints a warning and returns `false`. - * This is for the second category of `errorCode`s listed in the README. - */ - - - useStrictBehavior(errorCode, errorMsg, token) { - var strict = this.strict; - - if (typeof strict === "function") { - // Allow return value of strict function to be boolean or string - // (or null/undefined, meaning no further processing). - // But catch any exceptions thrown by function, treating them - // like "error". - try { - strict = strict(errorCode, errorMsg, token); - } catch (error) { - strict = "error"; - } - } - - if (!strict || strict === "ignore") { - return false; - } else if (strict === true || strict === "error") { - return true; - } else if (strict === "warn") { - typeof console !== "undefined" && console.warn("LaTeX-incompatible input and strict mode is set to 'warn': " + (errorMsg + " [" + errorCode + "]")); - return false; - } else { - // won't happen in type-safe code - typeof console !== "undefined" && console.warn("LaTeX-incompatible input and strict mode is set to " + ("unrecognized '" + strict + "': " + errorMsg + " [" + errorCode + "]")); - return false; - } - } - /** - * Check whether to test potentially dangerous input, and return - * `true` (trusted) or `false` (untrusted). The sole argument `context` - * should be an object with `command` field specifying the relevant LaTeX - * command (as a string starting with `\`), and any other arguments, etc. - * If `context` has a `url` field, a `protocol` field will automatically - * get added by this function (changing the specified object). - */ - - - isTrusted(context) { - if (context.url && !context.protocol) { - var protocol = utils.protocolFromUrl(context.url); - - if (protocol == null) { - return false; - } - - context.protocol = protocol; - } - - var trust = typeof this.trust === "function" ? this.trust(context) : this.trust; - return Boolean(trust); - } - -} - -/** - * This file contains information and classes for the various kinds of styles - * used in TeX. It provides a generic `Style` class, which holds information - * about a specific style. It then provides instances of all the different kinds - * of styles possible, and provides functions to move between them and get - * information about them. - */ - -/** - * The main style class. Contains a unique id for the style, a size (which is - * the same for cramped and uncramped version of a style), and a cramped flag. - */ -class Style { - constructor(id, size, cramped) { - this.id = void 0; - this.size = void 0; - this.cramped = void 0; - this.id = id; - this.size = size; - this.cramped = cramped; - } - /** - * Get the style of a superscript given a base in the current style. - */ - - - sup() { - return styles[sup[this.id]]; - } - /** - * Get the style of a subscript given a base in the current style. - */ - - - sub() { - return styles[sub[this.id]]; - } - /** - * Get the style of a fraction numerator given the fraction in the current - * style. - */ - - - fracNum() { - return styles[fracNum[this.id]]; - } - /** - * Get the style of a fraction denominator given the fraction in the current - * style. - */ - - - fracDen() { - return styles[fracDen[this.id]]; - } - /** - * Get the cramped version of a style (in particular, cramping a cramped style - * doesn't change the style). - */ - - - cramp() { - return styles[cramp[this.id]]; - } - /** - * Get a text or display version of this style. - */ - - - text() { - return styles[text$1[this.id]]; - } - /** - * Return true if this style is tightly spaced (scriptstyle/scriptscriptstyle) - */ - - - isTight() { - return this.size >= 2; - } - -} // Export an interface for type checking, but don't expose the implementation. -// This way, no more styles can be generated. - - -// IDs of the different styles -var D = 0; -var Dc = 1; -var T = 2; -var Tc = 3; -var S = 4; -var Sc = 5; -var SS = 6; -var SSc = 7; // Instances of the different styles - -var styles = [new Style(D, 0, false), new Style(Dc, 0, true), new Style(T, 1, false), new Style(Tc, 1, true), new Style(S, 2, false), new Style(Sc, 2, true), new Style(SS, 3, false), new Style(SSc, 3, true)]; // Lookup tables for switching from one style to another - -var sup = [S, Sc, S, Sc, SS, SSc, SS, SSc]; -var sub = [Sc, Sc, Sc, Sc, SSc, SSc, SSc, SSc]; -var fracNum = [T, Tc, S, Sc, SS, SSc, SS, SSc]; -var fracDen = [Tc, Tc, Sc, Sc, SSc, SSc, SSc, SSc]; -var cramp = [Dc, Dc, Tc, Tc, Sc, Sc, SSc, SSc]; -var text$1 = [D, Dc, T, Tc, T, Tc, T, Tc]; // We only export some of the styles. - -var Style$1 = { - DISPLAY: styles[D], - TEXT: styles[T], - SCRIPT: styles[S], - SCRIPTSCRIPT: styles[SS] -}; - -/* - * This file defines the Unicode scripts and script families that we - * support. To add new scripts or families, just add a new entry to the - * scriptData array below. Adding scripts to the scriptData array allows - * characters from that script to appear in \text{} environments. - */ - -/** - * Each script or script family has a name and an array of blocks. - * Each block is an array of two numbers which specify the start and - * end points (inclusive) of a block of Unicode codepoints. - */ - -/** - * Unicode block data for the families of scripts we support in \text{}. - * Scripts only need to appear here if they do not have font metrics. - */ -var scriptData = [{ - // Latin characters beyond the Latin-1 characters we have metrics for. - // Needed for Czech, Hungarian and Turkish text, for example. - name: 'latin', - blocks: [[0x0100, 0x024f], // Latin Extended-A and Latin Extended-B - [0x0300, 0x036f] // Combining Diacritical marks - ] -}, { - // The Cyrillic script used by Russian and related languages. - // A Cyrillic subset used to be supported as explicitly defined - // symbols in symbols.js - name: 'cyrillic', - blocks: [[0x0400, 0x04ff]] -}, { - // Armenian - name: 'armenian', - blocks: [[0x0530, 0x058F]] -}, { - // The Brahmic scripts of South and Southeast Asia - // Devanagari (0900–097F) - // Bengali (0980–09FF) - // Gurmukhi (0A00–0A7F) - // Gujarati (0A80–0AFF) - // Oriya (0B00–0B7F) - // Tamil (0B80–0BFF) - // Telugu (0C00–0C7F) - // Kannada (0C80–0CFF) - // Malayalam (0D00–0D7F) - // Sinhala (0D80–0DFF) - // Thai (0E00–0E7F) - // Lao (0E80–0EFF) - // Tibetan (0F00–0FFF) - // Myanmar (1000–109F) - name: 'brahmic', - blocks: [[0x0900, 0x109F]] -}, { - name: 'georgian', - blocks: [[0x10A0, 0x10ff]] -}, { - // Chinese and Japanese. - // The "k" in cjk is for Korean, but we've separated Korean out - name: "cjk", - blocks: [[0x3000, 0x30FF], // CJK symbols and punctuation, Hiragana, Katakana - [0x4E00, 0x9FAF], // CJK ideograms - [0xFF00, 0xFF60] // Fullwidth punctuation - // TODO: add halfwidth Katakana and Romanji glyphs - ] -}, { - // Korean - name: 'hangul', - blocks: [[0xAC00, 0xD7AF]] -}]; -/** - * Given a codepoint, return the name of the script or script family - * it is from, or null if it is not part of a known block - */ - -function scriptFromCodepoint(codepoint) { - for (var i = 0; i < scriptData.length; i++) { - var script = scriptData[i]; - - for (var _i = 0; _i < script.blocks.length; _i++) { - var block = script.blocks[_i]; - - if (codepoint >= block[0] && codepoint <= block[1]) { - return script.name; - } - } - } - - return null; -} -/** - * A flattened version of all the supported blocks in a single array. - * This is an optimization to make supportedCodepoint() fast. - */ - -var allBlocks = []; -scriptData.forEach(s => s.blocks.forEach(b => allBlocks.push(...b))); -/** - * Given a codepoint, return true if it falls within one of the - * scripts or script families defined above and false otherwise. - * - * Micro benchmarks shows that this is faster than - * /[\u3000-\u30FF\u4E00-\u9FAF\uFF00-\uFF60\uAC00-\uD7AF\u0900-\u109F]/.test() - * in Firefox, Chrome and Node. - */ - -function supportedCodepoint(codepoint) { - for (var i = 0; i < allBlocks.length; i += 2) { - if (codepoint >= allBlocks[i] && codepoint <= allBlocks[i + 1]) { - return true; - } - } - - return false; -} - -/** - * This file provides support to domTree.js and delimiter.js. - * It's a storehouse of path geometry for SVG images. - */ -// In all paths below, the viewBox-to-em scale is 1000:1. -var hLinePad = 80; // padding above a sqrt vinculum. Prevents image cropping. -// The vinculum of a \sqrt can be made thicker by a KaTeX rendering option. -// Think of variable extraVinculum as two detours in the SVG path. -// The detour begins at the lower left of the area labeled extraVinculum below. -// The detour proceeds one extraVinculum distance up and slightly to the right, -// displacing the radiused corner between surd and vinculum. The radius is -// traversed as usual, then the detour resumes. It goes right, to the end of -// the very long vinculum, then down one extraVinculum distance, -// after which it resumes regular path geometry for the radical. - -/* vinculum - / - /▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒←extraVinculum - / █████████████████████←0.04em (40 unit) std vinculum thickness - / / - / / - / /\ - / / surd -*/ - -var sqrtMain = function sqrtMain(extraVinculum, hLinePad) { - // sqrtMain path geometry is from glyph U221A in the font KaTeX Main - return "M95," + (622 + extraVinculum + hLinePad) + "\nc-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14\nc0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54\nc44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10\ns173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429\nc69,-144,104.5,-217.7,106.5,-221\nl" + extraVinculum / 2.075 + " -" + extraVinculum + "\nc5.3,-9.3,12,-14,20,-14\nH400000v" + (40 + extraVinculum) + "H845.2724\ns-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7\nc-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z\nM" + (834 + extraVinculum) + " " + hLinePad + "h400000v" + (40 + extraVinculum) + "h-400000z"; -}; - -var sqrtSize1 = function sqrtSize1(extraVinculum, hLinePad) { - // size1 is from glyph U221A in the font KaTeX_Size1-Regular - return "M263," + (601 + extraVinculum + hLinePad) + "c0.7,0,18,39.7,52,119\nc34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120\nc340,-704.7,510.7,-1060.3,512,-1067\nl" + extraVinculum / 2.084 + " -" + extraVinculum + "\nc4.7,-7.3,11,-11,19,-11\nH40000v" + (40 + extraVinculum) + "H1012.3\ns-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232\nc-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1\ns-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26\nc-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z\nM" + (1001 + extraVinculum) + " " + hLinePad + "h400000v" + (40 + extraVinculum) + "h-400000z"; -}; - -var sqrtSize2 = function sqrtSize2(extraVinculum, hLinePad) { - // size2 is from glyph U221A in the font KaTeX_Size2-Regular - return "M983 " + (10 + extraVinculum + hLinePad) + "\nl" + extraVinculum / 3.13 + " -" + extraVinculum + "\nc4,-6.7,10,-10,18,-10 H400000v" + (40 + extraVinculum) + "\nH1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7\ns-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744\nc-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30\nc26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722\nc56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5\nc53.7,-170.3,84.5,-266.8,92.5,-289.5z\nM" + (1001 + extraVinculum) + " " + hLinePad + "h400000v" + (40 + extraVinculum) + "h-400000z"; -}; - -var sqrtSize3 = function sqrtSize3(extraVinculum, hLinePad) { - // size3 is from glyph U221A in the font KaTeX_Size3-Regular - return "M424," + (2398 + extraVinculum + hLinePad) + "\nc-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514\nc0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20\ns-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121\ns209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081\nl" + extraVinculum / 4.223 + " -" + extraVinculum + "c4,-6.7,10,-10,18,-10 H400000\nv" + (40 + extraVinculum) + "H1014.6\ns-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185\nc-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2z M" + (1001 + extraVinculum) + " " + hLinePad + "\nh400000v" + (40 + extraVinculum) + "h-400000z"; -}; - -var sqrtSize4 = function sqrtSize4(extraVinculum, hLinePad) { - // size4 is from glyph U221A in the font KaTeX_Size4-Regular - return "M473," + (2713 + extraVinculum + hLinePad) + "\nc339.3,-1799.3,509.3,-2700,510,-2702 l" + extraVinculum / 5.298 + " -" + extraVinculum + "\nc3.3,-7.3,9.3,-11,18,-11 H400000v" + (40 + extraVinculum) + "H1017.7\ns-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200\nc0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26\ns76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,\n606zM" + (1001 + extraVinculum) + " " + hLinePad + "h400000v" + (40 + extraVinculum) + "H1017.7z"; -}; - -var phasePath = function phasePath(y) { - var x = y / 2; // x coordinate at top of angle - - return "M400000 " + y + " H0 L" + x + " 0 l65 45 L145 " + (y - 80) + " H400000z"; -}; - -var sqrtTall = function sqrtTall(extraVinculum, hLinePad, viewBoxHeight) { - // sqrtTall is from glyph U23B7 in the font KaTeX_Size4-Regular - // One path edge has a variable length. It runs vertically from the vinculum - // to a point near (14 units) the bottom of the surd. The vinculum - // is normally 40 units thick. So the length of the line in question is: - var vertSegment = viewBoxHeight - 54 - hLinePad - extraVinculum; - return "M702 " + (extraVinculum + hLinePad) + "H400000" + (40 + extraVinculum) + "\nH742v" + vertSegment + "l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1\nh-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170\nc-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667\n219 661 l218 661zM702 " + hLinePad + "H400000v" + (40 + extraVinculum) + "H742z"; -}; - -var sqrtPath = function sqrtPath(size, extraVinculum, viewBoxHeight) { - extraVinculum = 1000 * extraVinculum; // Convert from document ems to viewBox. - - var path = ""; - - switch (size) { - case "sqrtMain": - path = sqrtMain(extraVinculum, hLinePad); - break; - - case "sqrtSize1": - path = sqrtSize1(extraVinculum, hLinePad); - break; - - case "sqrtSize2": - path = sqrtSize2(extraVinculum, hLinePad); - break; - - case "sqrtSize3": - path = sqrtSize3(extraVinculum, hLinePad); - break; - - case "sqrtSize4": - path = sqrtSize4(extraVinculum, hLinePad); - break; - - case "sqrtTall": - path = sqrtTall(extraVinculum, hLinePad, viewBoxHeight); - } - - return path; -}; -var innerPath = function innerPath(name, height) { - // The inner part of stretchy tall delimiters - switch (name) { - case "\u239c": - return "M291 0 H417 V" + height + " H291z M291 0 H417 V" + height + " H291z"; - - case "\u2223": - return "M145 0 H188 V" + height + " H145z M145 0 H188 V" + height + " H145z"; - - case "\u2225": - return "M145 0 H188 V" + height + " H145z M145 0 H188 V" + height + " H145z" + ("M367 0 H410 V" + height + " H367z M367 0 H410 V" + height + " H367z"); - - case "\u239f": - return "M457 0 H583 V" + height + " H457z M457 0 H583 V" + height + " H457z"; - - case "\u23a2": - return "M319 0 H403 V" + height + " H319z M319 0 H403 V" + height + " H319z"; - - case "\u23a5": - return "M263 0 H347 V" + height + " H263z M263 0 H347 V" + height + " H263z"; - - case "\u23aa": - return "M384 0 H504 V" + height + " H384z M384 0 H504 V" + height + " H384z"; - - case "\u23d0": - return "M312 0 H355 V" + height + " H312z M312 0 H355 V" + height + " H312z"; - - case "\u2016": - return "M257 0 H300 V" + height + " H257z M257 0 H300 V" + height + " H257z" + ("M478 0 H521 V" + height + " H478z M478 0 H521 V" + height + " H478z"); - - default: - return ""; - } -}; -var path = { - // The doubleleftarrow geometry is from glyph U+21D0 in the font KaTeX Main - doubleleftarrow: "M262 157\nl10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3\n 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28\n 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5\nc2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5\n 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87\n-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7\n-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z\nm8 0v40h399730v-40zm0 194v40h399730v-40z", - // doublerightarrow is from glyph U+21D2 in font KaTeX Main - doublerightarrow: "M399738 392l\n-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5\n 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88\n-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68\n-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18\n-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782\nc-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3\n-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z", - // leftarrow is from glyph U+2190 in font KaTeX Main - leftarrow: "M400000 241H110l3-3c68.7-52.7 113.7-120\n 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8\n-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247\nc-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208\n 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3\n 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202\n l-3-3h399890zM100 241v40h399900v-40z", - // overbrace is from glyphs U+23A9/23A8/23A7 in font KaTeX_Size4-Regular - leftbrace: "M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117\n-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7\n 5-6 9-10 13-.7 1-7.3 1-20 1H6z", - leftbraceunder: "M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13\n 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688\n 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7\n-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z", - // overgroup is from the MnSymbol package (public domain) - leftgroup: "M400000 80\nH435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0\n 435 0h399565z", - leftgroupunder: "M400000 262\nH435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219\n 435 219h399565z", - // Harpoons are from glyph U+21BD in font KaTeX Main - leftharpoon: "M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3\n-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5\n-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7\n-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z", - leftharpoonplus: "M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5\n 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3\n-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7\n-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z\nm0 0v40h400000v-40z", - leftharpoondown: "M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333\n 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5\n 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667\n-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z", - leftharpoondownplus: "M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12\n 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7\n-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0\nv40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z", - // hook is from glyph U+21A9 in font KaTeX Main - lefthook: "M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5\n-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3\n-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21\n 71.5 23h399859zM103 281v-40h399897v40z", - leftlinesegment: "M40 281 V428 H0 V94 H40 V241 H400000 v40z\nM40 281 V428 H0 V94 H40 V241 H400000 v40z", - leftmapsto: "M40 281 V448H0V74H40V241H400000v40z\nM40 281 V448H0V74H40V241H400000v40z", - // tofrom is from glyph U+21C4 in font KaTeX AMS Regular - leftToFrom: "M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23\n-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8\nc28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3\n 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z", - longequal: "M0 50 h400000 v40H0z m0 194h40000v40H0z\nM0 50 h400000 v40H0z m0 194h40000v40H0z", - midbrace: "M200428 334\nc-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14\n-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7\n 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11\n 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z", - midbraceunder: "M199572 214\nc100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14\n 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3\n 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0\n-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z", - oiintSize1: "M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6\n-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z\nm368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8\n60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z", - oiintSize2: "M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8\n-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z\nm502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2\nc0 110 84 276 504 276s502.4-166 502.4-276z", - oiiintSize1: "M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6\n-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z\nm525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0\n85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z", - oiiintSize2: "M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8\n-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z\nm770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1\nc0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z", - rightarrow: "M0 241v40h399891c-47.3 35.3-84 78-110 128\n-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20\n 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7\n 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85\n-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n 151.7 139 205zm0 0v40h399900v-40z", - rightbrace: "M400000 542l\n-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5\ns-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1\nc124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z", - rightbraceunder: "M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3\n 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237\n-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z", - rightgroup: "M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0\n 3-1 3-3v-38c-76-158-257-219-435-219H0z", - rightgroupunder: "M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18\n 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z", - rightharpoon: "M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3\n-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2\n-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58\n 69.2 92 94.5zm0 0v40h399900v-40z", - rightharpoonplus: "M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11\n-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7\n 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z\nm0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z", - rightharpoondown: "M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8\n 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5\n-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95\n-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z", - rightharpoondownplus: "M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8\n 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3\n 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3\n-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z\nm0-194v40h400000v-40zm0 0v40h400000v-40z", - righthook: "M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3\n 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0\n-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21\n 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z", - rightlinesegment: "M399960 241 V94 h40 V428 h-40 V281 H0 v-40z\nM399960 241 V94 h40 V428 h-40 V281 H0 v-40z", - rightToFrom: "M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23\n 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32\n-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142\n-167z M100 147v40h399900v-40zM0 341v40h399900v-40z", - // twoheadleftarrow is from glyph U+219E in font KaTeX AMS Regular - twoheadleftarrow: "M0 167c68 40\n 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69\n-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3\n-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19\n-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101\n 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z", - twoheadrightarrow: "M400000 167\nc-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3\n 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42\n 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333\n-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70\n 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z", - // tilde1 is a modified version of a glyph from the MnSymbol package - tilde1: "M200 55.538c-77 0-168 73.953-177 73.953-3 0-7\n-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0\n 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0\n 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128\n-68.267.847-113-73.952-191-73.952z", - // ditto tilde2, tilde3, & tilde4 - tilde2: "M344 55.266c-142 0-300.638 81.316-311.5 86.418\n-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9\n 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114\nc1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751\n 181.476 676 181.476c-149 0-189-126.21-332-126.21z", - tilde3: "M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457\n-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0\n 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697\n 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696\n -338 0-409-156.573-744-156.573z", - tilde4: "M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345\n-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409\n 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9\n 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409\n -175.236-744-175.236z", - // vec is from glyph U+20D7 in font KaTeX Main - vec: "M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5\n3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11\n10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63\n-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1\n-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59\nH213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359\nc-16-25.333-24-45-24-59z", - // widehat1 is a modified version of a glyph from the MnSymbol package - widehat1: "M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22\nc-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z", - // ditto widehat2, widehat3, & widehat4 - widehat2: "M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z", - widehat3: "M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z", - widehat4: "M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z", - // widecheck paths are all inverted versions of widehat - widecheck1: "M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,\n-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z", - widecheck2: "M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z", - widecheck3: "M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z", - widecheck4: "M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z", - // The next ten paths support reaction arrows from the mhchem package. - // Arrows for \ce{<-->} are offset from xAxis by 0.22ex, per mhchem in LaTeX - // baraboveleftarrow is mostly from glyph U+2190 in font KaTeX Main - baraboveleftarrow: "M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202\nc4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5\nc-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130\ns-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47\n121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6\ns2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11\nc0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z\nM100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z", - // rightarrowabovebar is mostly from glyph U+2192, KaTeX Main - rightarrowabovebar: "M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32\n-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0\n13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39\n-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5\n-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z", - // The short left harpoon has 0.5em (i.e. 500 units) kern on the left end. - // Ref from mhchem.sty: \rlap{\raisebox{-.22ex}{$\kern0.5em - baraboveshortleftharpoon: "M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17\nc2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21\nc-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40\nc-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z\nM0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z", - rightharpoonaboveshortbar: "M0,241 l0,40c399126,0,399993,0,399993,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z", - shortbaraboveleftharpoon: "M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,\n1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,\n-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z\nM93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z", - shortrightharpoonabovebar: "M53,241l0,40c398570,0,399437,0,399437,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z" -}; -var tallDelim = function tallDelim(label, midHeight) { - switch (label) { - case "lbrack": - return "M403 1759 V84 H666 V0 H319 V1759 v" + midHeight + " v1759 h347 v-84\nH403z M403 1759 V0 H319 V1759 v" + midHeight + " v1759 h84z"; - - case "rbrack": - return "M347 1759 V0 H0 V84 H263 V1759 v" + midHeight + " v1759 H0 v84 H347z\nM347 1759 V0 H263 V1759 v" + midHeight + " v1759 h84z"; - - case "vert": - return "M145 15 v585 v" + midHeight + " v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v" + -midHeight + " v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v" + midHeight + " v585 h43z"; - - case "doublevert": - return "M145 15 v585 v" + midHeight + " v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v" + -midHeight + " v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v" + midHeight + " v585 h43z\nM367 15 v585 v" + midHeight + " v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v" + -midHeight + " v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M410 15 H367 v585 v" + midHeight + " v585 h43z"; - - case "lfloor": - return "M319 602 V0 H403 V602 v" + midHeight + " v1715 h263 v84 H319z\nMM319 602 V0 H403 V602 v" + midHeight + " v1715 H319z"; - - case "rfloor": - return "M319 602 V0 H403 V602 v" + midHeight + " v1799 H0 v-84 H319z\nMM319 602 V0 H403 V602 v" + midHeight + " v1715 H319z"; - - case "lceil": - return "M403 1759 V84 H666 V0 H319 V1759 v" + midHeight + " v602 h84z\nM403 1759 V0 H319 V1759 v" + midHeight + " v602 h84z"; - - case "rceil": - return "M347 1759 V0 H0 V84 H263 V1759 v" + midHeight + " v602 h84z\nM347 1759 V0 h-84 V1759 v" + midHeight + " v602 h84z"; - - case "lparen": - return "M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1\nc-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,\n-36,557 l0," + (midHeight + 84) + "c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,\n949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9\nc0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,\n-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189\nl0,-" + (midHeight + 92) + "c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,\n-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z"; - - case "rparen": - return "M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,\n63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5\nc11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0," + (midHeight + 9) + "\nc-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664\nc-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11\nc0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17\nc242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558\nl0,-" + (midHeight + 144) + "c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,\n-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z"; - - default: - // We should not ever get here. - throw new Error("Unknown stretchy delimiter."); - } -}; - -/** - * This node represents a document fragment, which contains elements, but when - * placed into the DOM doesn't have any representation itself. It only contains - * children and doesn't have any DOM node properties. - */ -class DocumentFragment { - // HtmlDomNode - // Never used; needed for satisfying interface. - constructor(children) { - this.children = void 0; - this.classes = void 0; - this.height = void 0; - this.depth = void 0; - this.maxFontSize = void 0; - this.style = void 0; - this.children = children; - this.classes = []; - this.height = 0; - this.depth = 0; - this.maxFontSize = 0; - this.style = {}; - } - - hasClass(className) { - return utils.contains(this.classes, className); - } - /** Convert the fragment into a node. */ - - - toNode() { - var frag = document.createDocumentFragment(); - - for (var i = 0; i < this.children.length; i++) { - frag.appendChild(this.children[i].toNode()); - } - - return frag; - } - /** Convert the fragment into HTML markup. */ - - - toMarkup() { - var markup = ""; // Simply concatenate the markup for the children together. - - for (var i = 0; i < this.children.length; i++) { - markup += this.children[i].toMarkup(); - } - - return markup; - } - /** - * Converts the math node into a string, similar to innerText. Applies to - * MathDomNode's only. - */ - - - toText() { - // To avoid this, we would subclass documentFragment separately for - // MathML, but polyfills for subclassing is expensive per PR 1469. - // $FlowFixMe: Only works for ChildType = MathDomNode. - var toText = child => child.toText(); - - return this.children.map(toText).join(""); - } - -} - -// This file is GENERATED by buildMetrics.sh. DO NOT MODIFY. -var fontMetricsData = { - "AMS-Regular": { - "32": [0, 0, 0, 0, 0.25], - "65": [0, 0.68889, 0, 0, 0.72222], - "66": [0, 0.68889, 0, 0, 0.66667], - "67": [0, 0.68889, 0, 0, 0.72222], - "68": [0, 0.68889, 0, 0, 0.72222], - "69": [0, 0.68889, 0, 0, 0.66667], - "70": [0, 0.68889, 0, 0, 0.61111], - "71": [0, 0.68889, 0, 0, 0.77778], - "72": [0, 0.68889, 0, 0, 0.77778], - "73": [0, 0.68889, 0, 0, 0.38889], - "74": [0.16667, 0.68889, 0, 0, 0.5], - "75": [0, 0.68889, 0, 0, 0.77778], - "76": [0, 0.68889, 0, 0, 0.66667], - "77": [0, 0.68889, 0, 0, 0.94445], - "78": [0, 0.68889, 0, 0, 0.72222], - "79": [0.16667, 0.68889, 0, 0, 0.77778], - "80": [0, 0.68889, 0, 0, 0.61111], - "81": [0.16667, 0.68889, 0, 0, 0.77778], - "82": [0, 0.68889, 0, 0, 0.72222], - "83": [0, 0.68889, 0, 0, 0.55556], - "84": [0, 0.68889, 0, 0, 0.66667], - "85": [0, 0.68889, 0, 0, 0.72222], - "86": [0, 0.68889, 0, 0, 0.72222], - "87": [0, 0.68889, 0, 0, 1.0], - "88": [0, 0.68889, 0, 0, 0.72222], - "89": [0, 0.68889, 0, 0, 0.72222], - "90": [0, 0.68889, 0, 0, 0.66667], - "107": [0, 0.68889, 0, 0, 0.55556], - "160": [0, 0, 0, 0, 0.25], - "165": [0, 0.675, 0.025, 0, 0.75], - "174": [0.15559, 0.69224, 0, 0, 0.94666], - "240": [0, 0.68889, 0, 0, 0.55556], - "295": [0, 0.68889, 0, 0, 0.54028], - "710": [0, 0.825, 0, 0, 2.33334], - "732": [0, 0.9, 0, 0, 2.33334], - "770": [0, 0.825, 0, 0, 2.33334], - "771": [0, 0.9, 0, 0, 2.33334], - "989": [0.08167, 0.58167, 0, 0, 0.77778], - "1008": [0, 0.43056, 0.04028, 0, 0.66667], - "8245": [0, 0.54986, 0, 0, 0.275], - "8463": [0, 0.68889, 0, 0, 0.54028], - "8487": [0, 0.68889, 0, 0, 0.72222], - "8498": [0, 0.68889, 0, 0, 0.55556], - "8502": [0, 0.68889, 0, 0, 0.66667], - "8503": [0, 0.68889, 0, 0, 0.44445], - "8504": [0, 0.68889, 0, 0, 0.66667], - "8513": [0, 0.68889, 0, 0, 0.63889], - "8592": [-0.03598, 0.46402, 0, 0, 0.5], - "8594": [-0.03598, 0.46402, 0, 0, 0.5], - "8602": [-0.13313, 0.36687, 0, 0, 1.0], - "8603": [-0.13313, 0.36687, 0, 0, 1.0], - "8606": [0.01354, 0.52239, 0, 0, 1.0], - "8608": [0.01354, 0.52239, 0, 0, 1.0], - "8610": [0.01354, 0.52239, 0, 0, 1.11111], - "8611": [0.01354, 0.52239, 0, 0, 1.11111], - "8619": [0, 0.54986, 0, 0, 1.0], - "8620": [0, 0.54986, 0, 0, 1.0], - "8621": [-0.13313, 0.37788, 0, 0, 1.38889], - "8622": [-0.13313, 0.36687, 0, 0, 1.0], - "8624": [0, 0.69224, 0, 0, 0.5], - "8625": [0, 0.69224, 0, 0, 0.5], - "8630": [0, 0.43056, 0, 0, 1.0], - "8631": [0, 0.43056, 0, 0, 1.0], - "8634": [0.08198, 0.58198, 0, 0, 0.77778], - "8635": [0.08198, 0.58198, 0, 0, 0.77778], - "8638": [0.19444, 0.69224, 0, 0, 0.41667], - "8639": [0.19444, 0.69224, 0, 0, 0.41667], - "8642": [0.19444, 0.69224, 0, 0, 0.41667], - "8643": [0.19444, 0.69224, 0, 0, 0.41667], - "8644": [0.1808, 0.675, 0, 0, 1.0], - "8646": [0.1808, 0.675, 0, 0, 1.0], - "8647": [0.1808, 0.675, 0, 0, 1.0], - "8648": [0.19444, 0.69224, 0, 0, 0.83334], - "8649": [0.1808, 0.675, 0, 0, 1.0], - "8650": [0.19444, 0.69224, 0, 0, 0.83334], - "8651": [0.01354, 0.52239, 0, 0, 1.0], - "8652": [0.01354, 0.52239, 0, 0, 1.0], - "8653": [-0.13313, 0.36687, 0, 0, 1.0], - "8654": [-0.13313, 0.36687, 0, 0, 1.0], - "8655": [-0.13313, 0.36687, 0, 0, 1.0], - "8666": [0.13667, 0.63667, 0, 0, 1.0], - "8667": [0.13667, 0.63667, 0, 0, 1.0], - "8669": [-0.13313, 0.37788, 0, 0, 1.0], - "8672": [-0.064, 0.437, 0, 0, 1.334], - "8674": [-0.064, 0.437, 0, 0, 1.334], - "8705": [0, 0.825, 0, 0, 0.5], - "8708": [0, 0.68889, 0, 0, 0.55556], - "8709": [0.08167, 0.58167, 0, 0, 0.77778], - "8717": [0, 0.43056, 0, 0, 0.42917], - "8722": [-0.03598, 0.46402, 0, 0, 0.5], - "8724": [0.08198, 0.69224, 0, 0, 0.77778], - "8726": [0.08167, 0.58167, 0, 0, 0.77778], - "8733": [0, 0.69224, 0, 0, 0.77778], - "8736": [0, 0.69224, 0, 0, 0.72222], - "8737": [0, 0.69224, 0, 0, 0.72222], - "8738": [0.03517, 0.52239, 0, 0, 0.72222], - "8739": [0.08167, 0.58167, 0, 0, 0.22222], - "8740": [0.25142, 0.74111, 0, 0, 0.27778], - "8741": [0.08167, 0.58167, 0, 0, 0.38889], - "8742": [0.25142, 0.74111, 0, 0, 0.5], - "8756": [0, 0.69224, 0, 0, 0.66667], - "8757": [0, 0.69224, 0, 0, 0.66667], - "8764": [-0.13313, 0.36687, 0, 0, 0.77778], - "8765": [-0.13313, 0.37788, 0, 0, 0.77778], - "8769": [-0.13313, 0.36687, 0, 0, 0.77778], - "8770": [-0.03625, 0.46375, 0, 0, 0.77778], - "8774": [0.30274, 0.79383, 0, 0, 0.77778], - "8776": [-0.01688, 0.48312, 0, 0, 0.77778], - "8778": [0.08167, 0.58167, 0, 0, 0.77778], - "8782": [0.06062, 0.54986, 0, 0, 0.77778], - "8783": [0.06062, 0.54986, 0, 0, 0.77778], - "8785": [0.08198, 0.58198, 0, 0, 0.77778], - "8786": [0.08198, 0.58198, 0, 0, 0.77778], - "8787": [0.08198, 0.58198, 0, 0, 0.77778], - "8790": [0, 0.69224, 0, 0, 0.77778], - "8791": [0.22958, 0.72958, 0, 0, 0.77778], - "8796": [0.08198, 0.91667, 0, 0, 0.77778], - "8806": [0.25583, 0.75583, 0, 0, 0.77778], - "8807": [0.25583, 0.75583, 0, 0, 0.77778], - "8808": [0.25142, 0.75726, 0, 0, 0.77778], - "8809": [0.25142, 0.75726, 0, 0, 0.77778], - "8812": [0.25583, 0.75583, 0, 0, 0.5], - "8814": [0.20576, 0.70576, 0, 0, 0.77778], - "8815": [0.20576, 0.70576, 0, 0, 0.77778], - "8816": [0.30274, 0.79383, 0, 0, 0.77778], - "8817": [0.30274, 0.79383, 0, 0, 0.77778], - "8818": [0.22958, 0.72958, 0, 0, 0.77778], - "8819": [0.22958, 0.72958, 0, 0, 0.77778], - "8822": [0.1808, 0.675, 0, 0, 0.77778], - "8823": [0.1808, 0.675, 0, 0, 0.77778], - "8828": [0.13667, 0.63667, 0, 0, 0.77778], - "8829": [0.13667, 0.63667, 0, 0, 0.77778], - "8830": [0.22958, 0.72958, 0, 0, 0.77778], - "8831": [0.22958, 0.72958, 0, 0, 0.77778], - "8832": [0.20576, 0.70576, 0, 0, 0.77778], - "8833": [0.20576, 0.70576, 0, 0, 0.77778], - "8840": [0.30274, 0.79383, 0, 0, 0.77778], - "8841": [0.30274, 0.79383, 0, 0, 0.77778], - "8842": [0.13597, 0.63597, 0, 0, 0.77778], - "8843": [0.13597, 0.63597, 0, 0, 0.77778], - "8847": [0.03517, 0.54986, 0, 0, 0.77778], - "8848": [0.03517, 0.54986, 0, 0, 0.77778], - "8858": [0.08198, 0.58198, 0, 0, 0.77778], - "8859": [0.08198, 0.58198, 0, 0, 0.77778], - "8861": [0.08198, 0.58198, 0, 0, 0.77778], - "8862": [0, 0.675, 0, 0, 0.77778], - "8863": [0, 0.675, 0, 0, 0.77778], - "8864": [0, 0.675, 0, 0, 0.77778], - "8865": [0, 0.675, 0, 0, 0.77778], - "8872": [0, 0.69224, 0, 0, 0.61111], - "8873": [0, 0.69224, 0, 0, 0.72222], - "8874": [0, 0.69224, 0, 0, 0.88889], - "8876": [0, 0.68889, 0, 0, 0.61111], - "8877": [0, 0.68889, 0, 0, 0.61111], - "8878": [0, 0.68889, 0, 0, 0.72222], - "8879": [0, 0.68889, 0, 0, 0.72222], - "8882": [0.03517, 0.54986, 0, 0, 0.77778], - "8883": [0.03517, 0.54986, 0, 0, 0.77778], - "8884": [0.13667, 0.63667, 0, 0, 0.77778], - "8885": [0.13667, 0.63667, 0, 0, 0.77778], - "8888": [0, 0.54986, 0, 0, 1.11111], - "8890": [0.19444, 0.43056, 0, 0, 0.55556], - "8891": [0.19444, 0.69224, 0, 0, 0.61111], - "8892": [0.19444, 0.69224, 0, 0, 0.61111], - "8901": [0, 0.54986, 0, 0, 0.27778], - "8903": [0.08167, 0.58167, 0, 0, 0.77778], - "8905": [0.08167, 0.58167, 0, 0, 0.77778], - "8906": [0.08167, 0.58167, 0, 0, 0.77778], - "8907": [0, 0.69224, 0, 0, 0.77778], - "8908": [0, 0.69224, 0, 0, 0.77778], - "8909": [-0.03598, 0.46402, 0, 0, 0.77778], - "8910": [0, 0.54986, 0, 0, 0.76042], - "8911": [0, 0.54986, 0, 0, 0.76042], - "8912": [0.03517, 0.54986, 0, 0, 0.77778], - "8913": [0.03517, 0.54986, 0, 0, 0.77778], - "8914": [0, 0.54986, 0, 0, 0.66667], - "8915": [0, 0.54986, 0, 0, 0.66667], - "8916": [0, 0.69224, 0, 0, 0.66667], - "8918": [0.0391, 0.5391, 0, 0, 0.77778], - "8919": [0.0391, 0.5391, 0, 0, 0.77778], - "8920": [0.03517, 0.54986, 0, 0, 1.33334], - "8921": [0.03517, 0.54986, 0, 0, 1.33334], - "8922": [0.38569, 0.88569, 0, 0, 0.77778], - "8923": [0.38569, 0.88569, 0, 0, 0.77778], - "8926": [0.13667, 0.63667, 0, 0, 0.77778], - "8927": [0.13667, 0.63667, 0, 0, 0.77778], - "8928": [0.30274, 0.79383, 0, 0, 0.77778], - "8929": [0.30274, 0.79383, 0, 0, 0.77778], - "8934": [0.23222, 0.74111, 0, 0, 0.77778], - "8935": [0.23222, 0.74111, 0, 0, 0.77778], - "8936": [0.23222, 0.74111, 0, 0, 0.77778], - "8937": [0.23222, 0.74111, 0, 0, 0.77778], - "8938": [0.20576, 0.70576, 0, 0, 0.77778], - "8939": [0.20576, 0.70576, 0, 0, 0.77778], - "8940": [0.30274, 0.79383, 0, 0, 0.77778], - "8941": [0.30274, 0.79383, 0, 0, 0.77778], - "8994": [0.19444, 0.69224, 0, 0, 0.77778], - "8995": [0.19444, 0.69224, 0, 0, 0.77778], - "9416": [0.15559, 0.69224, 0, 0, 0.90222], - "9484": [0, 0.69224, 0, 0, 0.5], - "9488": [0, 0.69224, 0, 0, 0.5], - "9492": [0, 0.37788, 0, 0, 0.5], - "9496": [0, 0.37788, 0, 0, 0.5], - "9585": [0.19444, 0.68889, 0, 0, 0.88889], - "9586": [0.19444, 0.74111, 0, 0, 0.88889], - "9632": [0, 0.675, 0, 0, 0.77778], - "9633": [0, 0.675, 0, 0, 0.77778], - "9650": [0, 0.54986, 0, 0, 0.72222], - "9651": [0, 0.54986, 0, 0, 0.72222], - "9654": [0.03517, 0.54986, 0, 0, 0.77778], - "9660": [0, 0.54986, 0, 0, 0.72222], - "9661": [0, 0.54986, 0, 0, 0.72222], - "9664": [0.03517, 0.54986, 0, 0, 0.77778], - "9674": [0.11111, 0.69224, 0, 0, 0.66667], - "9733": [0.19444, 0.69224, 0, 0, 0.94445], - "10003": [0, 0.69224, 0, 0, 0.83334], - "10016": [0, 0.69224, 0, 0, 0.83334], - "10731": [0.11111, 0.69224, 0, 0, 0.66667], - "10846": [0.19444, 0.75583, 0, 0, 0.61111], - "10877": [0.13667, 0.63667, 0, 0, 0.77778], - "10878": [0.13667, 0.63667, 0, 0, 0.77778], - "10885": [0.25583, 0.75583, 0, 0, 0.77778], - "10886": [0.25583, 0.75583, 0, 0, 0.77778], - "10887": [0.13597, 0.63597, 0, 0, 0.77778], - "10888": [0.13597, 0.63597, 0, 0, 0.77778], - "10889": [0.26167, 0.75726, 0, 0, 0.77778], - "10890": [0.26167, 0.75726, 0, 0, 0.77778], - "10891": [0.48256, 0.98256, 0, 0, 0.77778], - "10892": [0.48256, 0.98256, 0, 0, 0.77778], - "10901": [0.13667, 0.63667, 0, 0, 0.77778], - "10902": [0.13667, 0.63667, 0, 0, 0.77778], - "10933": [0.25142, 0.75726, 0, 0, 0.77778], - "10934": [0.25142, 0.75726, 0, 0, 0.77778], - "10935": [0.26167, 0.75726, 0, 0, 0.77778], - "10936": [0.26167, 0.75726, 0, 0, 0.77778], - "10937": [0.26167, 0.75726, 0, 0, 0.77778], - "10938": [0.26167, 0.75726, 0, 0, 0.77778], - "10949": [0.25583, 0.75583, 0, 0, 0.77778], - "10950": [0.25583, 0.75583, 0, 0, 0.77778], - "10955": [0.28481, 0.79383, 0, 0, 0.77778], - "10956": [0.28481, 0.79383, 0, 0, 0.77778], - "57350": [0.08167, 0.58167, 0, 0, 0.22222], - "57351": [0.08167, 0.58167, 0, 0, 0.38889], - "57352": [0.08167, 0.58167, 0, 0, 0.77778], - "57353": [0, 0.43056, 0.04028, 0, 0.66667], - "57356": [0.25142, 0.75726, 0, 0, 0.77778], - "57357": [0.25142, 0.75726, 0, 0, 0.77778], - "57358": [0.41951, 0.91951, 0, 0, 0.77778], - "57359": [0.30274, 0.79383, 0, 0, 0.77778], - "57360": [0.30274, 0.79383, 0, 0, 0.77778], - "57361": [0.41951, 0.91951, 0, 0, 0.77778], - "57366": [0.25142, 0.75726, 0, 0, 0.77778], - "57367": [0.25142, 0.75726, 0, 0, 0.77778], - "57368": [0.25142, 0.75726, 0, 0, 0.77778], - "57369": [0.25142, 0.75726, 0, 0, 0.77778], - "57370": [0.13597, 0.63597, 0, 0, 0.77778], - "57371": [0.13597, 0.63597, 0, 0, 0.77778] - }, - "Caligraphic-Regular": { - "32": [0, 0, 0, 0, 0.25], - "65": [0, 0.68333, 0, 0.19445, 0.79847], - "66": [0, 0.68333, 0.03041, 0.13889, 0.65681], - "67": [0, 0.68333, 0.05834, 0.13889, 0.52653], - "68": [0, 0.68333, 0.02778, 0.08334, 0.77139], - "69": [0, 0.68333, 0.08944, 0.11111, 0.52778], - "70": [0, 0.68333, 0.09931, 0.11111, 0.71875], - "71": [0.09722, 0.68333, 0.0593, 0.11111, 0.59487], - "72": [0, 0.68333, 0.00965, 0.11111, 0.84452], - "73": [0, 0.68333, 0.07382, 0, 0.54452], - "74": [0.09722, 0.68333, 0.18472, 0.16667, 0.67778], - "75": [0, 0.68333, 0.01445, 0.05556, 0.76195], - "76": [0, 0.68333, 0, 0.13889, 0.68972], - "77": [0, 0.68333, 0, 0.13889, 1.2009], - "78": [0, 0.68333, 0.14736, 0.08334, 0.82049], - "79": [0, 0.68333, 0.02778, 0.11111, 0.79611], - "80": [0, 0.68333, 0.08222, 0.08334, 0.69556], - "81": [0.09722, 0.68333, 0, 0.11111, 0.81667], - "82": [0, 0.68333, 0, 0.08334, 0.8475], - "83": [0, 0.68333, 0.075, 0.13889, 0.60556], - "84": [0, 0.68333, 0.25417, 0, 0.54464], - "85": [0, 0.68333, 0.09931, 0.08334, 0.62583], - "86": [0, 0.68333, 0.08222, 0, 0.61278], - "87": [0, 0.68333, 0.08222, 0.08334, 0.98778], - "88": [0, 0.68333, 0.14643, 0.13889, 0.7133], - "89": [0.09722, 0.68333, 0.08222, 0.08334, 0.66834], - "90": [0, 0.68333, 0.07944, 0.13889, 0.72473], - "160": [0, 0, 0, 0, 0.25] - }, - "Fraktur-Regular": { - "32": [0, 0, 0, 0, 0.25], - "33": [0, 0.69141, 0, 0, 0.29574], - "34": [0, 0.69141, 0, 0, 0.21471], - "38": [0, 0.69141, 0, 0, 0.73786], - "39": [0, 0.69141, 0, 0, 0.21201], - "40": [0.24982, 0.74947, 0, 0, 0.38865], - "41": [0.24982, 0.74947, 0, 0, 0.38865], - "42": [0, 0.62119, 0, 0, 0.27764], - "43": [0.08319, 0.58283, 0, 0, 0.75623], - "44": [0, 0.10803, 0, 0, 0.27764], - "45": [0.08319, 0.58283, 0, 0, 0.75623], - "46": [0, 0.10803, 0, 0, 0.27764], - "47": [0.24982, 0.74947, 0, 0, 0.50181], - "48": [0, 0.47534, 0, 0, 0.50181], - "49": [0, 0.47534, 0, 0, 0.50181], - "50": [0, 0.47534, 0, 0, 0.50181], - "51": [0.18906, 0.47534, 0, 0, 0.50181], - "52": [0.18906, 0.47534, 0, 0, 0.50181], - "53": [0.18906, 0.47534, 0, 0, 0.50181], - "54": [0, 0.69141, 0, 0, 0.50181], - "55": [0.18906, 0.47534, 0, 0, 0.50181], - "56": [0, 0.69141, 0, 0, 0.50181], - "57": [0.18906, 0.47534, 0, 0, 0.50181], - "58": [0, 0.47534, 0, 0, 0.21606], - "59": [0.12604, 0.47534, 0, 0, 0.21606], - "61": [-0.13099, 0.36866, 0, 0, 0.75623], - "63": [0, 0.69141, 0, 0, 0.36245], - "65": [0, 0.69141, 0, 0, 0.7176], - "66": [0, 0.69141, 0, 0, 0.88397], - "67": [0, 0.69141, 0, 0, 0.61254], - "68": [0, 0.69141, 0, 0, 0.83158], - "69": [0, 0.69141, 0, 0, 0.66278], - "70": [0.12604, 0.69141, 0, 0, 0.61119], - "71": [0, 0.69141, 0, 0, 0.78539], - "72": [0.06302, 0.69141, 0, 0, 0.7203], - "73": [0, 0.69141, 0, 0, 0.55448], - "74": [0.12604, 0.69141, 0, 0, 0.55231], - "75": [0, 0.69141, 0, 0, 0.66845], - "76": [0, 0.69141, 0, 0, 0.66602], - "77": [0, 0.69141, 0, 0, 1.04953], - "78": [0, 0.69141, 0, 0, 0.83212], - "79": [0, 0.69141, 0, 0, 0.82699], - "80": [0.18906, 0.69141, 0, 0, 0.82753], - "81": [0.03781, 0.69141, 0, 0, 0.82699], - "82": [0, 0.69141, 0, 0, 0.82807], - "83": [0, 0.69141, 0, 0, 0.82861], - "84": [0, 0.69141, 0, 0, 0.66899], - "85": [0, 0.69141, 0, 0, 0.64576], - "86": [0, 0.69141, 0, 0, 0.83131], - "87": [0, 0.69141, 0, 0, 1.04602], - "88": [0, 0.69141, 0, 0, 0.71922], - "89": [0.18906, 0.69141, 0, 0, 0.83293], - "90": [0.12604, 0.69141, 0, 0, 0.60201], - "91": [0.24982, 0.74947, 0, 0, 0.27764], - "93": [0.24982, 0.74947, 0, 0, 0.27764], - "94": [0, 0.69141, 0, 0, 0.49965], - "97": [0, 0.47534, 0, 0, 0.50046], - "98": [0, 0.69141, 0, 0, 0.51315], - "99": [0, 0.47534, 0, 0, 0.38946], - "100": [0, 0.62119, 0, 0, 0.49857], - "101": [0, 0.47534, 0, 0, 0.40053], - "102": [0.18906, 0.69141, 0, 0, 0.32626], - "103": [0.18906, 0.47534, 0, 0, 0.5037], - "104": [0.18906, 0.69141, 0, 0, 0.52126], - "105": [0, 0.69141, 0, 0, 0.27899], - "106": [0, 0.69141, 0, 0, 0.28088], - "107": [0, 0.69141, 0, 0, 0.38946], - "108": [0, 0.69141, 0, 0, 0.27953], - "109": [0, 0.47534, 0, 0, 0.76676], - "110": [0, 0.47534, 0, 0, 0.52666], - "111": [0, 0.47534, 0, 0, 0.48885], - "112": [0.18906, 0.52396, 0, 0, 0.50046], - "113": [0.18906, 0.47534, 0, 0, 0.48912], - "114": [0, 0.47534, 0, 0, 0.38919], - "115": [0, 0.47534, 0, 0, 0.44266], - "116": [0, 0.62119, 0, 0, 0.33301], - "117": [0, 0.47534, 0, 0, 0.5172], - "118": [0, 0.52396, 0, 0, 0.5118], - "119": [0, 0.52396, 0, 0, 0.77351], - "120": [0.18906, 0.47534, 0, 0, 0.38865], - "121": [0.18906, 0.47534, 0, 0, 0.49884], - "122": [0.18906, 0.47534, 0, 0, 0.39054], - "160": [0, 0, 0, 0, 0.25], - "8216": [0, 0.69141, 0, 0, 0.21471], - "8217": [0, 0.69141, 0, 0, 0.21471], - "58112": [0, 0.62119, 0, 0, 0.49749], - "58113": [0, 0.62119, 0, 0, 0.4983], - "58114": [0.18906, 0.69141, 0, 0, 0.33328], - "58115": [0.18906, 0.69141, 0, 0, 0.32923], - "58116": [0.18906, 0.47534, 0, 0, 0.50343], - "58117": [0, 0.69141, 0, 0, 0.33301], - "58118": [0, 0.62119, 0, 0, 0.33409], - "58119": [0, 0.47534, 0, 0, 0.50073] - }, - "Main-Bold": { - "32": [0, 0, 0, 0, 0.25], - "33": [0, 0.69444, 0, 0, 0.35], - "34": [0, 0.69444, 0, 0, 0.60278], - "35": [0.19444, 0.69444, 0, 0, 0.95833], - "36": [0.05556, 0.75, 0, 0, 0.575], - "37": [0.05556, 0.75, 0, 0, 0.95833], - "38": [0, 0.69444, 0, 0, 0.89444], - "39": [0, 0.69444, 0, 0, 0.31944], - "40": [0.25, 0.75, 0, 0, 0.44722], - "41": [0.25, 0.75, 0, 0, 0.44722], - "42": [0, 0.75, 0, 0, 0.575], - "43": [0.13333, 0.63333, 0, 0, 0.89444], - "44": [0.19444, 0.15556, 0, 0, 0.31944], - "45": [0, 0.44444, 0, 0, 0.38333], - "46": [0, 0.15556, 0, 0, 0.31944], - "47": [0.25, 0.75, 0, 0, 0.575], - "48": [0, 0.64444, 0, 0, 0.575], - "49": [0, 0.64444, 0, 0, 0.575], - "50": [0, 0.64444, 0, 0, 0.575], - "51": [0, 0.64444, 0, 0, 0.575], - "52": [0, 0.64444, 0, 0, 0.575], - "53": [0, 0.64444, 0, 0, 0.575], - "54": [0, 0.64444, 0, 0, 0.575], - "55": [0, 0.64444, 0, 0, 0.575], - "56": [0, 0.64444, 0, 0, 0.575], - "57": [0, 0.64444, 0, 0, 0.575], - "58": [0, 0.44444, 0, 0, 0.31944], - "59": [0.19444, 0.44444, 0, 0, 0.31944], - "60": [0.08556, 0.58556, 0, 0, 0.89444], - "61": [-0.10889, 0.39111, 0, 0, 0.89444], - "62": [0.08556, 0.58556, 0, 0, 0.89444], - "63": [0, 0.69444, 0, 0, 0.54305], - "64": [0, 0.69444, 0, 0, 0.89444], - "65": [0, 0.68611, 0, 0, 0.86944], - "66": [0, 0.68611, 0, 0, 0.81805], - "67": [0, 0.68611, 0, 0, 0.83055], - "68": [0, 0.68611, 0, 0, 0.88194], - "69": [0, 0.68611, 0, 0, 0.75555], - "70": [0, 0.68611, 0, 0, 0.72361], - "71": [0, 0.68611, 0, 0, 0.90416], - "72": [0, 0.68611, 0, 0, 0.9], - "73": [0, 0.68611, 0, 0, 0.43611], - "74": [0, 0.68611, 0, 0, 0.59444], - "75": [0, 0.68611, 0, 0, 0.90138], - "76": [0, 0.68611, 0, 0, 0.69166], - "77": [0, 0.68611, 0, 0, 1.09166], - "78": [0, 0.68611, 0, 0, 0.9], - "79": [0, 0.68611, 0, 0, 0.86388], - "80": [0, 0.68611, 0, 0, 0.78611], - "81": [0.19444, 0.68611, 0, 0, 0.86388], - "82": [0, 0.68611, 0, 0, 0.8625], - "83": [0, 0.68611, 0, 0, 0.63889], - "84": [0, 0.68611, 0, 0, 0.8], - "85": [0, 0.68611, 0, 0, 0.88472], - "86": [0, 0.68611, 0.01597, 0, 0.86944], - "87": [0, 0.68611, 0.01597, 0, 1.18888], - "88": [0, 0.68611, 0, 0, 0.86944], - "89": [0, 0.68611, 0.02875, 0, 0.86944], - "90": [0, 0.68611, 0, 0, 0.70277], - "91": [0.25, 0.75, 0, 0, 0.31944], - "92": [0.25, 0.75, 0, 0, 0.575], - "93": [0.25, 0.75, 0, 0, 0.31944], - "94": [0, 0.69444, 0, 0, 0.575], - "95": [0.31, 0.13444, 0.03194, 0, 0.575], - "97": [0, 0.44444, 0, 0, 0.55902], - "98": [0, 0.69444, 0, 0, 0.63889], - "99": [0, 0.44444, 0, 0, 0.51111], - "100": [0, 0.69444, 0, 0, 0.63889], - "101": [0, 0.44444, 0, 0, 0.52708], - "102": [0, 0.69444, 0.10903, 0, 0.35139], - "103": [0.19444, 0.44444, 0.01597, 0, 0.575], - "104": [0, 0.69444, 0, 0, 0.63889], - "105": [0, 0.69444, 0, 0, 0.31944], - "106": [0.19444, 0.69444, 0, 0, 0.35139], - "107": [0, 0.69444, 0, 0, 0.60694], - "108": [0, 0.69444, 0, 0, 0.31944], - "109": [0, 0.44444, 0, 0, 0.95833], - "110": [0, 0.44444, 0, 0, 0.63889], - "111": [0, 0.44444, 0, 0, 0.575], - "112": [0.19444, 0.44444, 0, 0, 0.63889], - "113": [0.19444, 0.44444, 0, 0, 0.60694], - "114": [0, 0.44444, 0, 0, 0.47361], - "115": [0, 0.44444, 0, 0, 0.45361], - "116": [0, 0.63492, 0, 0, 0.44722], - "117": [0, 0.44444, 0, 0, 0.63889], - "118": [0, 0.44444, 0.01597, 0, 0.60694], - "119": [0, 0.44444, 0.01597, 0, 0.83055], - "120": [0, 0.44444, 0, 0, 0.60694], - "121": [0.19444, 0.44444, 0.01597, 0, 0.60694], - "122": [0, 0.44444, 0, 0, 0.51111], - "123": [0.25, 0.75, 0, 0, 0.575], - "124": [0.25, 0.75, 0, 0, 0.31944], - "125": [0.25, 0.75, 0, 0, 0.575], - "126": [0.35, 0.34444, 0, 0, 0.575], - "160": [0, 0, 0, 0, 0.25], - "163": [0, 0.69444, 0, 0, 0.86853], - "168": [0, 0.69444, 0, 0, 0.575], - "172": [0, 0.44444, 0, 0, 0.76666], - "176": [0, 0.69444, 0, 0, 0.86944], - "177": [0.13333, 0.63333, 0, 0, 0.89444], - "184": [0.17014, 0, 0, 0, 0.51111], - "198": [0, 0.68611, 0, 0, 1.04166], - "215": [0.13333, 0.63333, 0, 0, 0.89444], - "216": [0.04861, 0.73472, 0, 0, 0.89444], - "223": [0, 0.69444, 0, 0, 0.59722], - "230": [0, 0.44444, 0, 0, 0.83055], - "247": [0.13333, 0.63333, 0, 0, 0.89444], - "248": [0.09722, 0.54167, 0, 0, 0.575], - "305": [0, 0.44444, 0, 0, 0.31944], - "338": [0, 0.68611, 0, 0, 1.16944], - "339": [0, 0.44444, 0, 0, 0.89444], - "567": [0.19444, 0.44444, 0, 0, 0.35139], - "710": [0, 0.69444, 0, 0, 0.575], - "711": [0, 0.63194, 0, 0, 0.575], - "713": [0, 0.59611, 0, 0, 0.575], - "714": [0, 0.69444, 0, 0, 0.575], - "715": [0, 0.69444, 0, 0, 0.575], - "728": [0, 0.69444, 0, 0, 0.575], - "729": [0, 0.69444, 0, 0, 0.31944], - "730": [0, 0.69444, 0, 0, 0.86944], - "732": [0, 0.69444, 0, 0, 0.575], - "733": [0, 0.69444, 0, 0, 0.575], - "915": [0, 0.68611, 0, 0, 0.69166], - "916": [0, 0.68611, 0, 0, 0.95833], - "920": [0, 0.68611, 0, 0, 0.89444], - "923": [0, 0.68611, 0, 0, 0.80555], - "926": [0, 0.68611, 0, 0, 0.76666], - "928": [0, 0.68611, 0, 0, 0.9], - "931": [0, 0.68611, 0, 0, 0.83055], - "933": [0, 0.68611, 0, 0, 0.89444], - "934": [0, 0.68611, 0, 0, 0.83055], - "936": [0, 0.68611, 0, 0, 0.89444], - "937": [0, 0.68611, 0, 0, 0.83055], - "8211": [0, 0.44444, 0.03194, 0, 0.575], - "8212": [0, 0.44444, 0.03194, 0, 1.14999], - "8216": [0, 0.69444, 0, 0, 0.31944], - "8217": [0, 0.69444, 0, 0, 0.31944], - "8220": [0, 0.69444, 0, 0, 0.60278], - "8221": [0, 0.69444, 0, 0, 0.60278], - "8224": [0.19444, 0.69444, 0, 0, 0.51111], - "8225": [0.19444, 0.69444, 0, 0, 0.51111], - "8242": [0, 0.55556, 0, 0, 0.34444], - "8407": [0, 0.72444, 0.15486, 0, 0.575], - "8463": [0, 0.69444, 0, 0, 0.66759], - "8465": [0, 0.69444, 0, 0, 0.83055], - "8467": [0, 0.69444, 0, 0, 0.47361], - "8472": [0.19444, 0.44444, 0, 0, 0.74027], - "8476": [0, 0.69444, 0, 0, 0.83055], - "8501": [0, 0.69444, 0, 0, 0.70277], - "8592": [-0.10889, 0.39111, 0, 0, 1.14999], - "8593": [0.19444, 0.69444, 0, 0, 0.575], - "8594": [-0.10889, 0.39111, 0, 0, 1.14999], - "8595": [0.19444, 0.69444, 0, 0, 0.575], - "8596": [-0.10889, 0.39111, 0, 0, 1.14999], - "8597": [0.25, 0.75, 0, 0, 0.575], - "8598": [0.19444, 0.69444, 0, 0, 1.14999], - "8599": [0.19444, 0.69444, 0, 0, 1.14999], - "8600": [0.19444, 0.69444, 0, 0, 1.14999], - "8601": [0.19444, 0.69444, 0, 0, 1.14999], - "8636": [-0.10889, 0.39111, 0, 0, 1.14999], - "8637": [-0.10889, 0.39111, 0, 0, 1.14999], - "8640": [-0.10889, 0.39111, 0, 0, 1.14999], - "8641": [-0.10889, 0.39111, 0, 0, 1.14999], - "8656": [-0.10889, 0.39111, 0, 0, 1.14999], - "8657": [0.19444, 0.69444, 0, 0, 0.70277], - "8658": [-0.10889, 0.39111, 0, 0, 1.14999], - "8659": [0.19444, 0.69444, 0, 0, 0.70277], - "8660": [-0.10889, 0.39111, 0, 0, 1.14999], - "8661": [0.25, 0.75, 0, 0, 0.70277], - "8704": [0, 0.69444, 0, 0, 0.63889], - "8706": [0, 0.69444, 0.06389, 0, 0.62847], - "8707": [0, 0.69444, 0, 0, 0.63889], - "8709": [0.05556, 0.75, 0, 0, 0.575], - "8711": [0, 0.68611, 0, 0, 0.95833], - "8712": [0.08556, 0.58556, 0, 0, 0.76666], - "8715": [0.08556, 0.58556, 0, 0, 0.76666], - "8722": [0.13333, 0.63333, 0, 0, 0.89444], - "8723": [0.13333, 0.63333, 0, 0, 0.89444], - "8725": [0.25, 0.75, 0, 0, 0.575], - "8726": [0.25, 0.75, 0, 0, 0.575], - "8727": [-0.02778, 0.47222, 0, 0, 0.575], - "8728": [-0.02639, 0.47361, 0, 0, 0.575], - "8729": [-0.02639, 0.47361, 0, 0, 0.575], - "8730": [0.18, 0.82, 0, 0, 0.95833], - "8733": [0, 0.44444, 0, 0, 0.89444], - "8734": [0, 0.44444, 0, 0, 1.14999], - "8736": [0, 0.69224, 0, 0, 0.72222], - "8739": [0.25, 0.75, 0, 0, 0.31944], - "8741": [0.25, 0.75, 0, 0, 0.575], - "8743": [0, 0.55556, 0, 0, 0.76666], - "8744": [0, 0.55556, 0, 0, 0.76666], - "8745": [0, 0.55556, 0, 0, 0.76666], - "8746": [0, 0.55556, 0, 0, 0.76666], - "8747": [0.19444, 0.69444, 0.12778, 0, 0.56875], - "8764": [-0.10889, 0.39111, 0, 0, 0.89444], - "8768": [0.19444, 0.69444, 0, 0, 0.31944], - "8771": [0.00222, 0.50222, 0, 0, 0.89444], - "8773": [0.027, 0.638, 0, 0, 0.894], - "8776": [0.02444, 0.52444, 0, 0, 0.89444], - "8781": [0.00222, 0.50222, 0, 0, 0.89444], - "8801": [0.00222, 0.50222, 0, 0, 0.89444], - "8804": [0.19667, 0.69667, 0, 0, 0.89444], - "8805": [0.19667, 0.69667, 0, 0, 0.89444], - "8810": [0.08556, 0.58556, 0, 0, 1.14999], - "8811": [0.08556, 0.58556, 0, 0, 1.14999], - "8826": [0.08556, 0.58556, 0, 0, 0.89444], - "8827": [0.08556, 0.58556, 0, 0, 0.89444], - "8834": [0.08556, 0.58556, 0, 0, 0.89444], - "8835": [0.08556, 0.58556, 0, 0, 0.89444], - "8838": [0.19667, 0.69667, 0, 0, 0.89444], - "8839": [0.19667, 0.69667, 0, 0, 0.89444], - "8846": [0, 0.55556, 0, 0, 0.76666], - "8849": [0.19667, 0.69667, 0, 0, 0.89444], - "8850": [0.19667, 0.69667, 0, 0, 0.89444], - "8851": [0, 0.55556, 0, 0, 0.76666], - "8852": [0, 0.55556, 0, 0, 0.76666], - "8853": [0.13333, 0.63333, 0, 0, 0.89444], - "8854": [0.13333, 0.63333, 0, 0, 0.89444], - "8855": [0.13333, 0.63333, 0, 0, 0.89444], - "8856": [0.13333, 0.63333, 0, 0, 0.89444], - "8857": [0.13333, 0.63333, 0, 0, 0.89444], - "8866": [0, 0.69444, 0, 0, 0.70277], - "8867": [0, 0.69444, 0, 0, 0.70277], - "8868": [0, 0.69444, 0, 0, 0.89444], - "8869": [0, 0.69444, 0, 0, 0.89444], - "8900": [-0.02639, 0.47361, 0, 0, 0.575], - "8901": [-0.02639, 0.47361, 0, 0, 0.31944], - "8902": [-0.02778, 0.47222, 0, 0, 0.575], - "8968": [0.25, 0.75, 0, 0, 0.51111], - "8969": [0.25, 0.75, 0, 0, 0.51111], - "8970": [0.25, 0.75, 0, 0, 0.51111], - "8971": [0.25, 0.75, 0, 0, 0.51111], - "8994": [-0.13889, 0.36111, 0, 0, 1.14999], - "8995": [-0.13889, 0.36111, 0, 0, 1.14999], - "9651": [0.19444, 0.69444, 0, 0, 1.02222], - "9657": [-0.02778, 0.47222, 0, 0, 0.575], - "9661": [0.19444, 0.69444, 0, 0, 1.02222], - "9667": [-0.02778, 0.47222, 0, 0, 0.575], - "9711": [0.19444, 0.69444, 0, 0, 1.14999], - "9824": [0.12963, 0.69444, 0, 0, 0.89444], - "9825": [0.12963, 0.69444, 0, 0, 0.89444], - "9826": [0.12963, 0.69444, 0, 0, 0.89444], - "9827": [0.12963, 0.69444, 0, 0, 0.89444], - "9837": [0, 0.75, 0, 0, 0.44722], - "9838": [0.19444, 0.69444, 0, 0, 0.44722], - "9839": [0.19444, 0.69444, 0, 0, 0.44722], - "10216": [0.25, 0.75, 0, 0, 0.44722], - "10217": [0.25, 0.75, 0, 0, 0.44722], - "10815": [0, 0.68611, 0, 0, 0.9], - "10927": [0.19667, 0.69667, 0, 0, 0.89444], - "10928": [0.19667, 0.69667, 0, 0, 0.89444], - "57376": [0.19444, 0.69444, 0, 0, 0] - }, - "Main-BoldItalic": { - "32": [0, 0, 0, 0, 0.25], - "33": [0, 0.69444, 0.11417, 0, 0.38611], - "34": [0, 0.69444, 0.07939, 0, 0.62055], - "35": [0.19444, 0.69444, 0.06833, 0, 0.94444], - "37": [0.05556, 0.75, 0.12861, 0, 0.94444], - "38": [0, 0.69444, 0.08528, 0, 0.88555], - "39": [0, 0.69444, 0.12945, 0, 0.35555], - "40": [0.25, 0.75, 0.15806, 0, 0.47333], - "41": [0.25, 0.75, 0.03306, 0, 0.47333], - "42": [0, 0.75, 0.14333, 0, 0.59111], - "43": [0.10333, 0.60333, 0.03306, 0, 0.88555], - "44": [0.19444, 0.14722, 0, 0, 0.35555], - "45": [0, 0.44444, 0.02611, 0, 0.41444], - "46": [0, 0.14722, 0, 0, 0.35555], - "47": [0.25, 0.75, 0.15806, 0, 0.59111], - "48": [0, 0.64444, 0.13167, 0, 0.59111], - "49": [0, 0.64444, 0.13167, 0, 0.59111], - "50": [0, 0.64444, 0.13167, 0, 0.59111], - "51": [0, 0.64444, 0.13167, 0, 0.59111], - "52": [0.19444, 0.64444, 0.13167, 0, 0.59111], - "53": [0, 0.64444, 0.13167, 0, 0.59111], - "54": [0, 0.64444, 0.13167, 0, 0.59111], - "55": [0.19444, 0.64444, 0.13167, 0, 0.59111], - "56": [0, 0.64444, 0.13167, 0, 0.59111], - "57": [0, 0.64444, 0.13167, 0, 0.59111], - "58": [0, 0.44444, 0.06695, 0, 0.35555], - "59": [0.19444, 0.44444, 0.06695, 0, 0.35555], - "61": [-0.10889, 0.39111, 0.06833, 0, 0.88555], - "63": [0, 0.69444, 0.11472, 0, 0.59111], - "64": [0, 0.69444, 0.09208, 0, 0.88555], - "65": [0, 0.68611, 0, 0, 0.86555], - "66": [0, 0.68611, 0.0992, 0, 0.81666], - "67": [0, 0.68611, 0.14208, 0, 0.82666], - "68": [0, 0.68611, 0.09062, 0, 0.87555], - "69": [0, 0.68611, 0.11431, 0, 0.75666], - "70": [0, 0.68611, 0.12903, 0, 0.72722], - "71": [0, 0.68611, 0.07347, 0, 0.89527], - "72": [0, 0.68611, 0.17208, 0, 0.8961], - "73": [0, 0.68611, 0.15681, 0, 0.47166], - "74": [0, 0.68611, 0.145, 0, 0.61055], - "75": [0, 0.68611, 0.14208, 0, 0.89499], - "76": [0, 0.68611, 0, 0, 0.69777], - "77": [0, 0.68611, 0.17208, 0, 1.07277], - "78": [0, 0.68611, 0.17208, 0, 0.8961], - "79": [0, 0.68611, 0.09062, 0, 0.85499], - "80": [0, 0.68611, 0.0992, 0, 0.78721], - "81": [0.19444, 0.68611, 0.09062, 0, 0.85499], - "82": [0, 0.68611, 0.02559, 0, 0.85944], - "83": [0, 0.68611, 0.11264, 0, 0.64999], - "84": [0, 0.68611, 0.12903, 0, 0.7961], - "85": [0, 0.68611, 0.17208, 0, 0.88083], - "86": [0, 0.68611, 0.18625, 0, 0.86555], - "87": [0, 0.68611, 0.18625, 0, 1.15999], - "88": [0, 0.68611, 0.15681, 0, 0.86555], - "89": [0, 0.68611, 0.19803, 0, 0.86555], - "90": [0, 0.68611, 0.14208, 0, 0.70888], - "91": [0.25, 0.75, 0.1875, 0, 0.35611], - "93": [0.25, 0.75, 0.09972, 0, 0.35611], - "94": [0, 0.69444, 0.06709, 0, 0.59111], - "95": [0.31, 0.13444, 0.09811, 0, 0.59111], - "97": [0, 0.44444, 0.09426, 0, 0.59111], - "98": [0, 0.69444, 0.07861, 0, 0.53222], - "99": [0, 0.44444, 0.05222, 0, 0.53222], - "100": [0, 0.69444, 0.10861, 0, 0.59111], - "101": [0, 0.44444, 0.085, 0, 0.53222], - "102": [0.19444, 0.69444, 0.21778, 0, 0.4], - "103": [0.19444, 0.44444, 0.105, 0, 0.53222], - "104": [0, 0.69444, 0.09426, 0, 0.59111], - "105": [0, 0.69326, 0.11387, 0, 0.35555], - "106": [0.19444, 0.69326, 0.1672, 0, 0.35555], - "107": [0, 0.69444, 0.11111, 0, 0.53222], - "108": [0, 0.69444, 0.10861, 0, 0.29666], - "109": [0, 0.44444, 0.09426, 0, 0.94444], - "110": [0, 0.44444, 0.09426, 0, 0.64999], - "111": [0, 0.44444, 0.07861, 0, 0.59111], - "112": [0.19444, 0.44444, 0.07861, 0, 0.59111], - "113": [0.19444, 0.44444, 0.105, 0, 0.53222], - "114": [0, 0.44444, 0.11111, 0, 0.50167], - "115": [0, 0.44444, 0.08167, 0, 0.48694], - "116": [0, 0.63492, 0.09639, 0, 0.385], - "117": [0, 0.44444, 0.09426, 0, 0.62055], - "118": [0, 0.44444, 0.11111, 0, 0.53222], - "119": [0, 0.44444, 0.11111, 0, 0.76777], - "120": [0, 0.44444, 0.12583, 0, 0.56055], - "121": [0.19444, 0.44444, 0.105, 0, 0.56166], - "122": [0, 0.44444, 0.13889, 0, 0.49055], - "126": [0.35, 0.34444, 0.11472, 0, 0.59111], - "160": [0, 0, 0, 0, 0.25], - "168": [0, 0.69444, 0.11473, 0, 0.59111], - "176": [0, 0.69444, 0, 0, 0.94888], - "184": [0.17014, 0, 0, 0, 0.53222], - "198": [0, 0.68611, 0.11431, 0, 1.02277], - "216": [0.04861, 0.73472, 0.09062, 0, 0.88555], - "223": [0.19444, 0.69444, 0.09736, 0, 0.665], - "230": [0, 0.44444, 0.085, 0, 0.82666], - "248": [0.09722, 0.54167, 0.09458, 0, 0.59111], - "305": [0, 0.44444, 0.09426, 0, 0.35555], - "338": [0, 0.68611, 0.11431, 0, 1.14054], - "339": [0, 0.44444, 0.085, 0, 0.82666], - "567": [0.19444, 0.44444, 0.04611, 0, 0.385], - "710": [0, 0.69444, 0.06709, 0, 0.59111], - "711": [0, 0.63194, 0.08271, 0, 0.59111], - "713": [0, 0.59444, 0.10444, 0, 0.59111], - "714": [0, 0.69444, 0.08528, 0, 0.59111], - "715": [0, 0.69444, 0, 0, 0.59111], - "728": [0, 0.69444, 0.10333, 0, 0.59111], - "729": [0, 0.69444, 0.12945, 0, 0.35555], - "730": [0, 0.69444, 0, 0, 0.94888], - "732": [0, 0.69444, 0.11472, 0, 0.59111], - "733": [0, 0.69444, 0.11472, 0, 0.59111], - "915": [0, 0.68611, 0.12903, 0, 0.69777], - "916": [0, 0.68611, 0, 0, 0.94444], - "920": [0, 0.68611, 0.09062, 0, 0.88555], - "923": [0, 0.68611, 0, 0, 0.80666], - "926": [0, 0.68611, 0.15092, 0, 0.76777], - "928": [0, 0.68611, 0.17208, 0, 0.8961], - "931": [0, 0.68611, 0.11431, 0, 0.82666], - "933": [0, 0.68611, 0.10778, 0, 0.88555], - "934": [0, 0.68611, 0.05632, 0, 0.82666], - "936": [0, 0.68611, 0.10778, 0, 0.88555], - "937": [0, 0.68611, 0.0992, 0, 0.82666], - "8211": [0, 0.44444, 0.09811, 0, 0.59111], - "8212": [0, 0.44444, 0.09811, 0, 1.18221], - "8216": [0, 0.69444, 0.12945, 0, 0.35555], - "8217": [0, 0.69444, 0.12945, 0, 0.35555], - "8220": [0, 0.69444, 0.16772, 0, 0.62055], - "8221": [0, 0.69444, 0.07939, 0, 0.62055] - }, - "Main-Italic": { - "32": [0, 0, 0, 0, 0.25], - "33": [0, 0.69444, 0.12417, 0, 0.30667], - "34": [0, 0.69444, 0.06961, 0, 0.51444], - "35": [0.19444, 0.69444, 0.06616, 0, 0.81777], - "37": [0.05556, 0.75, 0.13639, 0, 0.81777], - "38": [0, 0.69444, 0.09694, 0, 0.76666], - "39": [0, 0.69444, 0.12417, 0, 0.30667], - "40": [0.25, 0.75, 0.16194, 0, 0.40889], - "41": [0.25, 0.75, 0.03694, 0, 0.40889], - "42": [0, 0.75, 0.14917, 0, 0.51111], - "43": [0.05667, 0.56167, 0.03694, 0, 0.76666], - "44": [0.19444, 0.10556, 0, 0, 0.30667], - "45": [0, 0.43056, 0.02826, 0, 0.35778], - "46": [0, 0.10556, 0, 0, 0.30667], - "47": [0.25, 0.75, 0.16194, 0, 0.51111], - "48": [0, 0.64444, 0.13556, 0, 0.51111], - "49": [0, 0.64444, 0.13556, 0, 0.51111], - "50": [0, 0.64444, 0.13556, 0, 0.51111], - "51": [0, 0.64444, 0.13556, 0, 0.51111], - "52": [0.19444, 0.64444, 0.13556, 0, 0.51111], - "53": [0, 0.64444, 0.13556, 0, 0.51111], - "54": [0, 0.64444, 0.13556, 0, 0.51111], - "55": [0.19444, 0.64444, 0.13556, 0, 0.51111], - "56": [0, 0.64444, 0.13556, 0, 0.51111], - "57": [0, 0.64444, 0.13556, 0, 0.51111], - "58": [0, 0.43056, 0.0582, 0, 0.30667], - "59": [0.19444, 0.43056, 0.0582, 0, 0.30667], - "61": [-0.13313, 0.36687, 0.06616, 0, 0.76666], - "63": [0, 0.69444, 0.1225, 0, 0.51111], - "64": [0, 0.69444, 0.09597, 0, 0.76666], - "65": [0, 0.68333, 0, 0, 0.74333], - "66": [0, 0.68333, 0.10257, 0, 0.70389], - "67": [0, 0.68333, 0.14528, 0, 0.71555], - "68": [0, 0.68333, 0.09403, 0, 0.755], - "69": [0, 0.68333, 0.12028, 0, 0.67833], - "70": [0, 0.68333, 0.13305, 0, 0.65277], - "71": [0, 0.68333, 0.08722, 0, 0.77361], - "72": [0, 0.68333, 0.16389, 0, 0.74333], - "73": [0, 0.68333, 0.15806, 0, 0.38555], - "74": [0, 0.68333, 0.14028, 0, 0.525], - "75": [0, 0.68333, 0.14528, 0, 0.76888], - "76": [0, 0.68333, 0, 0, 0.62722], - "77": [0, 0.68333, 0.16389, 0, 0.89666], - "78": [0, 0.68333, 0.16389, 0, 0.74333], - "79": [0, 0.68333, 0.09403, 0, 0.76666], - "80": [0, 0.68333, 0.10257, 0, 0.67833], - "81": [0.19444, 0.68333, 0.09403, 0, 0.76666], - "82": [0, 0.68333, 0.03868, 0, 0.72944], - "83": [0, 0.68333, 0.11972, 0, 0.56222], - "84": [0, 0.68333, 0.13305, 0, 0.71555], - "85": [0, 0.68333, 0.16389, 0, 0.74333], - "86": [0, 0.68333, 0.18361, 0, 0.74333], - "87": [0, 0.68333, 0.18361, 0, 0.99888], - "88": [0, 0.68333, 0.15806, 0, 0.74333], - "89": [0, 0.68333, 0.19383, 0, 0.74333], - "90": [0, 0.68333, 0.14528, 0, 0.61333], - "91": [0.25, 0.75, 0.1875, 0, 0.30667], - "93": [0.25, 0.75, 0.10528, 0, 0.30667], - "94": [0, 0.69444, 0.06646, 0, 0.51111], - "95": [0.31, 0.12056, 0.09208, 0, 0.51111], - "97": [0, 0.43056, 0.07671, 0, 0.51111], - "98": [0, 0.69444, 0.06312, 0, 0.46], - "99": [0, 0.43056, 0.05653, 0, 0.46], - "100": [0, 0.69444, 0.10333, 0, 0.51111], - "101": [0, 0.43056, 0.07514, 0, 0.46], - "102": [0.19444, 0.69444, 0.21194, 0, 0.30667], - "103": [0.19444, 0.43056, 0.08847, 0, 0.46], - "104": [0, 0.69444, 0.07671, 0, 0.51111], - "105": [0, 0.65536, 0.1019, 0, 0.30667], - "106": [0.19444, 0.65536, 0.14467, 0, 0.30667], - "107": [0, 0.69444, 0.10764, 0, 0.46], - "108": [0, 0.69444, 0.10333, 0, 0.25555], - "109": [0, 0.43056, 0.07671, 0, 0.81777], - "110": [0, 0.43056, 0.07671, 0, 0.56222], - "111": [0, 0.43056, 0.06312, 0, 0.51111], - "112": [0.19444, 0.43056, 0.06312, 0, 0.51111], - "113": [0.19444, 0.43056, 0.08847, 0, 0.46], - "114": [0, 0.43056, 0.10764, 0, 0.42166], - "115": [0, 0.43056, 0.08208, 0, 0.40889], - "116": [0, 0.61508, 0.09486, 0, 0.33222], - "117": [0, 0.43056, 0.07671, 0, 0.53666], - "118": [0, 0.43056, 0.10764, 0, 0.46], - "119": [0, 0.43056, 0.10764, 0, 0.66444], - "120": [0, 0.43056, 0.12042, 0, 0.46389], - "121": [0.19444, 0.43056, 0.08847, 0, 0.48555], - "122": [0, 0.43056, 0.12292, 0, 0.40889], - "126": [0.35, 0.31786, 0.11585, 0, 0.51111], - "160": [0, 0, 0, 0, 0.25], - "168": [0, 0.66786, 0.10474, 0, 0.51111], - "176": [0, 0.69444, 0, 0, 0.83129], - "184": [0.17014, 0, 0, 0, 0.46], - "198": [0, 0.68333, 0.12028, 0, 0.88277], - "216": [0.04861, 0.73194, 0.09403, 0, 0.76666], - "223": [0.19444, 0.69444, 0.10514, 0, 0.53666], - "230": [0, 0.43056, 0.07514, 0, 0.71555], - "248": [0.09722, 0.52778, 0.09194, 0, 0.51111], - "338": [0, 0.68333, 0.12028, 0, 0.98499], - "339": [0, 0.43056, 0.07514, 0, 0.71555], - "710": [0, 0.69444, 0.06646, 0, 0.51111], - "711": [0, 0.62847, 0.08295, 0, 0.51111], - "713": [0, 0.56167, 0.10333, 0, 0.51111], - "714": [0, 0.69444, 0.09694, 0, 0.51111], - "715": [0, 0.69444, 0, 0, 0.51111], - "728": [0, 0.69444, 0.10806, 0, 0.51111], - "729": [0, 0.66786, 0.11752, 0, 0.30667], - "730": [0, 0.69444, 0, 0, 0.83129], - "732": [0, 0.66786, 0.11585, 0, 0.51111], - "733": [0, 0.69444, 0.1225, 0, 0.51111], - "915": [0, 0.68333, 0.13305, 0, 0.62722], - "916": [0, 0.68333, 0, 0, 0.81777], - "920": [0, 0.68333, 0.09403, 0, 0.76666], - "923": [0, 0.68333, 0, 0, 0.69222], - "926": [0, 0.68333, 0.15294, 0, 0.66444], - "928": [0, 0.68333, 0.16389, 0, 0.74333], - "931": [0, 0.68333, 0.12028, 0, 0.71555], - "933": [0, 0.68333, 0.11111, 0, 0.76666], - "934": [0, 0.68333, 0.05986, 0, 0.71555], - "936": [0, 0.68333, 0.11111, 0, 0.76666], - "937": [0, 0.68333, 0.10257, 0, 0.71555], - "8211": [0, 0.43056, 0.09208, 0, 0.51111], - "8212": [0, 0.43056, 0.09208, 0, 1.02222], - "8216": [0, 0.69444, 0.12417, 0, 0.30667], - "8217": [0, 0.69444, 0.12417, 0, 0.30667], - "8220": [0, 0.69444, 0.1685, 0, 0.51444], - "8221": [0, 0.69444, 0.06961, 0, 0.51444], - "8463": [0, 0.68889, 0, 0, 0.54028] - }, - "Main-Regular": { - "32": [0, 0, 0, 0, 0.25], - "33": [0, 0.69444, 0, 0, 0.27778], - "34": [0, 0.69444, 0, 0, 0.5], - "35": [0.19444, 0.69444, 0, 0, 0.83334], - "36": [0.05556, 0.75, 0, 0, 0.5], - "37": [0.05556, 0.75, 0, 0, 0.83334], - "38": [0, 0.69444, 0, 0, 0.77778], - "39": [0, 0.69444, 0, 0, 0.27778], - "40": [0.25, 0.75, 0, 0, 0.38889], - "41": [0.25, 0.75, 0, 0, 0.38889], - "42": [0, 0.75, 0, 0, 0.5], - "43": [0.08333, 0.58333, 0, 0, 0.77778], - "44": [0.19444, 0.10556, 0, 0, 0.27778], - "45": [0, 0.43056, 0, 0, 0.33333], - "46": [0, 0.10556, 0, 0, 0.27778], - "47": [0.25, 0.75, 0, 0, 0.5], - "48": [0, 0.64444, 0, 0, 0.5], - "49": [0, 0.64444, 0, 0, 0.5], - "50": [0, 0.64444, 0, 0, 0.5], - "51": [0, 0.64444, 0, 0, 0.5], - "52": [0, 0.64444, 0, 0, 0.5], - "53": [0, 0.64444, 0, 0, 0.5], - "54": [0, 0.64444, 0, 0, 0.5], - "55": [0, 0.64444, 0, 0, 0.5], - "56": [0, 0.64444, 0, 0, 0.5], - "57": [0, 0.64444, 0, 0, 0.5], - "58": [0, 0.43056, 0, 0, 0.27778], - "59": [0.19444, 0.43056, 0, 0, 0.27778], - "60": [0.0391, 0.5391, 0, 0, 0.77778], - "61": [-0.13313, 0.36687, 0, 0, 0.77778], - "62": [0.0391, 0.5391, 0, 0, 0.77778], - "63": [0, 0.69444, 0, 0, 0.47222], - "64": [0, 0.69444, 0, 0, 0.77778], - "65": [0, 0.68333, 0, 0, 0.75], - "66": [0, 0.68333, 0, 0, 0.70834], - "67": [0, 0.68333, 0, 0, 0.72222], - "68": [0, 0.68333, 0, 0, 0.76389], - "69": [0, 0.68333, 0, 0, 0.68056], - "70": [0, 0.68333, 0, 0, 0.65278], - "71": [0, 0.68333, 0, 0, 0.78472], - "72": [0, 0.68333, 0, 0, 0.75], - "73": [0, 0.68333, 0, 0, 0.36111], - "74": [0, 0.68333, 0, 0, 0.51389], - "75": [0, 0.68333, 0, 0, 0.77778], - "76": [0, 0.68333, 0, 0, 0.625], - "77": [0, 0.68333, 0, 0, 0.91667], - "78": [0, 0.68333, 0, 0, 0.75], - "79": [0, 0.68333, 0, 0, 0.77778], - "80": [0, 0.68333, 0, 0, 0.68056], - "81": [0.19444, 0.68333, 0, 0, 0.77778], - "82": [0, 0.68333, 0, 0, 0.73611], - "83": [0, 0.68333, 0, 0, 0.55556], - "84": [0, 0.68333, 0, 0, 0.72222], - "85": [0, 0.68333, 0, 0, 0.75], - "86": [0, 0.68333, 0.01389, 0, 0.75], - "87": [0, 0.68333, 0.01389, 0, 1.02778], - "88": [0, 0.68333, 0, 0, 0.75], - "89": [0, 0.68333, 0.025, 0, 0.75], - "90": [0, 0.68333, 0, 0, 0.61111], - "91": [0.25, 0.75, 0, 0, 0.27778], - "92": [0.25, 0.75, 0, 0, 0.5], - "93": [0.25, 0.75, 0, 0, 0.27778], - "94": [0, 0.69444, 0, 0, 0.5], - "95": [0.31, 0.12056, 0.02778, 0, 0.5], - "97": [0, 0.43056, 0, 0, 0.5], - "98": [0, 0.69444, 0, 0, 0.55556], - "99": [0, 0.43056, 0, 0, 0.44445], - "100": [0, 0.69444, 0, 0, 0.55556], - "101": [0, 0.43056, 0, 0, 0.44445], - "102": [0, 0.69444, 0.07778, 0, 0.30556], - "103": [0.19444, 0.43056, 0.01389, 0, 0.5], - "104": [0, 0.69444, 0, 0, 0.55556], - "105": [0, 0.66786, 0, 0, 0.27778], - "106": [0.19444, 0.66786, 0, 0, 0.30556], - "107": [0, 0.69444, 0, 0, 0.52778], - "108": [0, 0.69444, 0, 0, 0.27778], - "109": [0, 0.43056, 0, 0, 0.83334], - "110": [0, 0.43056, 0, 0, 0.55556], - "111": [0, 0.43056, 0, 0, 0.5], - "112": [0.19444, 0.43056, 0, 0, 0.55556], - "113": [0.19444, 0.43056, 0, 0, 0.52778], - "114": [0, 0.43056, 0, 0, 0.39167], - "115": [0, 0.43056, 0, 0, 0.39445], - "116": [0, 0.61508, 0, 0, 0.38889], - "117": [0, 0.43056, 0, 0, 0.55556], - "118": [0, 0.43056, 0.01389, 0, 0.52778], - "119": [0, 0.43056, 0.01389, 0, 0.72222], - "120": [0, 0.43056, 0, 0, 0.52778], - "121": [0.19444, 0.43056, 0.01389, 0, 0.52778], - "122": [0, 0.43056, 0, 0, 0.44445], - "123": [0.25, 0.75, 0, 0, 0.5], - "124": [0.25, 0.75, 0, 0, 0.27778], - "125": [0.25, 0.75, 0, 0, 0.5], - "126": [0.35, 0.31786, 0, 0, 0.5], - "160": [0, 0, 0, 0, 0.25], - "163": [0, 0.69444, 0, 0, 0.76909], - "167": [0.19444, 0.69444, 0, 0, 0.44445], - "168": [0, 0.66786, 0, 0, 0.5], - "172": [0, 0.43056, 0, 0, 0.66667], - "176": [0, 0.69444, 0, 0, 0.75], - "177": [0.08333, 0.58333, 0, 0, 0.77778], - "182": [0.19444, 0.69444, 0, 0, 0.61111], - "184": [0.17014, 0, 0, 0, 0.44445], - "198": [0, 0.68333, 0, 0, 0.90278], - "215": [0.08333, 0.58333, 0, 0, 0.77778], - "216": [0.04861, 0.73194, 0, 0, 0.77778], - "223": [0, 0.69444, 0, 0, 0.5], - "230": [0, 0.43056, 0, 0, 0.72222], - "247": [0.08333, 0.58333, 0, 0, 0.77778], - "248": [0.09722, 0.52778, 0, 0, 0.5], - "305": [0, 0.43056, 0, 0, 0.27778], - "338": [0, 0.68333, 0, 0, 1.01389], - "339": [0, 0.43056, 0, 0, 0.77778], - "567": [0.19444, 0.43056, 0, 0, 0.30556], - "710": [0, 0.69444, 0, 0, 0.5], - "711": [0, 0.62847, 0, 0, 0.5], - "713": [0, 0.56778, 0, 0, 0.5], - "714": [0, 0.69444, 0, 0, 0.5], - "715": [0, 0.69444, 0, 0, 0.5], - "728": [0, 0.69444, 0, 0, 0.5], - "729": [0, 0.66786, 0, 0, 0.27778], - "730": [0, 0.69444, 0, 0, 0.75], - "732": [0, 0.66786, 0, 0, 0.5], - "733": [0, 0.69444, 0, 0, 0.5], - "915": [0, 0.68333, 0, 0, 0.625], - "916": [0, 0.68333, 0, 0, 0.83334], - "920": [0, 0.68333, 0, 0, 0.77778], - "923": [0, 0.68333, 0, 0, 0.69445], - "926": [0, 0.68333, 0, 0, 0.66667], - "928": [0, 0.68333, 0, 0, 0.75], - "931": [0, 0.68333, 0, 0, 0.72222], - "933": [0, 0.68333, 0, 0, 0.77778], - "934": [0, 0.68333, 0, 0, 0.72222], - "936": [0, 0.68333, 0, 0, 0.77778], - "937": [0, 0.68333, 0, 0, 0.72222], - "8211": [0, 0.43056, 0.02778, 0, 0.5], - "8212": [0, 0.43056, 0.02778, 0, 1.0], - "8216": [0, 0.69444, 0, 0, 0.27778], - "8217": [0, 0.69444, 0, 0, 0.27778], - "8220": [0, 0.69444, 0, 0, 0.5], - "8221": [0, 0.69444, 0, 0, 0.5], - "8224": [0.19444, 0.69444, 0, 0, 0.44445], - "8225": [0.19444, 0.69444, 0, 0, 0.44445], - "8230": [0, 0.123, 0, 0, 1.172], - "8242": [0, 0.55556, 0, 0, 0.275], - "8407": [0, 0.71444, 0.15382, 0, 0.5], - "8463": [0, 0.68889, 0, 0, 0.54028], - "8465": [0, 0.69444, 0, 0, 0.72222], - "8467": [0, 0.69444, 0, 0.11111, 0.41667], - "8472": [0.19444, 0.43056, 0, 0.11111, 0.63646], - "8476": [0, 0.69444, 0, 0, 0.72222], - "8501": [0, 0.69444, 0, 0, 0.61111], - "8592": [-0.13313, 0.36687, 0, 0, 1.0], - "8593": [0.19444, 0.69444, 0, 0, 0.5], - "8594": [-0.13313, 0.36687, 0, 0, 1.0], - "8595": [0.19444, 0.69444, 0, 0, 0.5], - "8596": [-0.13313, 0.36687, 0, 0, 1.0], - "8597": [0.25, 0.75, 0, 0, 0.5], - "8598": [0.19444, 0.69444, 0, 0, 1.0], - "8599": [0.19444, 0.69444, 0, 0, 1.0], - "8600": [0.19444, 0.69444, 0, 0, 1.0], - "8601": [0.19444, 0.69444, 0, 0, 1.0], - "8614": [0.011, 0.511, 0, 0, 1.0], - "8617": [0.011, 0.511, 0, 0, 1.126], - "8618": [0.011, 0.511, 0, 0, 1.126], - "8636": [-0.13313, 0.36687, 0, 0, 1.0], - "8637": [-0.13313, 0.36687, 0, 0, 1.0], - "8640": [-0.13313, 0.36687, 0, 0, 1.0], - "8641": [-0.13313, 0.36687, 0, 0, 1.0], - "8652": [0.011, 0.671, 0, 0, 1.0], - "8656": [-0.13313, 0.36687, 0, 0, 1.0], - "8657": [0.19444, 0.69444, 0, 0, 0.61111], - "8658": [-0.13313, 0.36687, 0, 0, 1.0], - "8659": [0.19444, 0.69444, 0, 0, 0.61111], - "8660": [-0.13313, 0.36687, 0, 0, 1.0], - "8661": [0.25, 0.75, 0, 0, 0.61111], - "8704": [0, 0.69444, 0, 0, 0.55556], - "8706": [0, 0.69444, 0.05556, 0.08334, 0.5309], - "8707": [0, 0.69444, 0, 0, 0.55556], - "8709": [0.05556, 0.75, 0, 0, 0.5], - "8711": [0, 0.68333, 0, 0, 0.83334], - "8712": [0.0391, 0.5391, 0, 0, 0.66667], - "8715": [0.0391, 0.5391, 0, 0, 0.66667], - "8722": [0.08333, 0.58333, 0, 0, 0.77778], - "8723": [0.08333, 0.58333, 0, 0, 0.77778], - "8725": [0.25, 0.75, 0, 0, 0.5], - "8726": [0.25, 0.75, 0, 0, 0.5], - "8727": [-0.03472, 0.46528, 0, 0, 0.5], - "8728": [-0.05555, 0.44445, 0, 0, 0.5], - "8729": [-0.05555, 0.44445, 0, 0, 0.5], - "8730": [0.2, 0.8, 0, 0, 0.83334], - "8733": [0, 0.43056, 0, 0, 0.77778], - "8734": [0, 0.43056, 0, 0, 1.0], - "8736": [0, 0.69224, 0, 0, 0.72222], - "8739": [0.25, 0.75, 0, 0, 0.27778], - "8741": [0.25, 0.75, 0, 0, 0.5], - "8743": [0, 0.55556, 0, 0, 0.66667], - "8744": [0, 0.55556, 0, 0, 0.66667], - "8745": [0, 0.55556, 0, 0, 0.66667], - "8746": [0, 0.55556, 0, 0, 0.66667], - "8747": [0.19444, 0.69444, 0.11111, 0, 0.41667], - "8764": [-0.13313, 0.36687, 0, 0, 0.77778], - "8768": [0.19444, 0.69444, 0, 0, 0.27778], - "8771": [-0.03625, 0.46375, 0, 0, 0.77778], - "8773": [-0.022, 0.589, 0, 0, 0.778], - "8776": [-0.01688, 0.48312, 0, 0, 0.77778], - "8781": [-0.03625, 0.46375, 0, 0, 0.77778], - "8784": [-0.133, 0.673, 0, 0, 0.778], - "8801": [-0.03625, 0.46375, 0, 0, 0.77778], - "8804": [0.13597, 0.63597, 0, 0, 0.77778], - "8805": [0.13597, 0.63597, 0, 0, 0.77778], - "8810": [0.0391, 0.5391, 0, 0, 1.0], - "8811": [0.0391, 0.5391, 0, 0, 1.0], - "8826": [0.0391, 0.5391, 0, 0, 0.77778], - "8827": [0.0391, 0.5391, 0, 0, 0.77778], - "8834": [0.0391, 0.5391, 0, 0, 0.77778], - "8835": [0.0391, 0.5391, 0, 0, 0.77778], - "8838": [0.13597, 0.63597, 0, 0, 0.77778], - "8839": [0.13597, 0.63597, 0, 0, 0.77778], - "8846": [0, 0.55556, 0, 0, 0.66667], - "8849": [0.13597, 0.63597, 0, 0, 0.77778], - "8850": [0.13597, 0.63597, 0, 0, 0.77778], - "8851": [0, 0.55556, 0, 0, 0.66667], - "8852": [0, 0.55556, 0, 0, 0.66667], - "8853": [0.08333, 0.58333, 0, 0, 0.77778], - "8854": [0.08333, 0.58333, 0, 0, 0.77778], - "8855": [0.08333, 0.58333, 0, 0, 0.77778], - "8856": [0.08333, 0.58333, 0, 0, 0.77778], - "8857": [0.08333, 0.58333, 0, 0, 0.77778], - "8866": [0, 0.69444, 0, 0, 0.61111], - "8867": [0, 0.69444, 0, 0, 0.61111], - "8868": [0, 0.69444, 0, 0, 0.77778], - "8869": [0, 0.69444, 0, 0, 0.77778], - "8872": [0.249, 0.75, 0, 0, 0.867], - "8900": [-0.05555, 0.44445, 0, 0, 0.5], - "8901": [-0.05555, 0.44445, 0, 0, 0.27778], - "8902": [-0.03472, 0.46528, 0, 0, 0.5], - "8904": [0.005, 0.505, 0, 0, 0.9], - "8942": [0.03, 0.903, 0, 0, 0.278], - "8943": [-0.19, 0.313, 0, 0, 1.172], - "8945": [-0.1, 0.823, 0, 0, 1.282], - "8968": [0.25, 0.75, 0, 0, 0.44445], - "8969": [0.25, 0.75, 0, 0, 0.44445], - "8970": [0.25, 0.75, 0, 0, 0.44445], - "8971": [0.25, 0.75, 0, 0, 0.44445], - "8994": [-0.14236, 0.35764, 0, 0, 1.0], - "8995": [-0.14236, 0.35764, 0, 0, 1.0], - "9136": [0.244, 0.744, 0, 0, 0.412], - "9137": [0.244, 0.745, 0, 0, 0.412], - "9651": [0.19444, 0.69444, 0, 0, 0.88889], - "9657": [-0.03472, 0.46528, 0, 0, 0.5], - "9661": [0.19444, 0.69444, 0, 0, 0.88889], - "9667": [-0.03472, 0.46528, 0, 0, 0.5], - "9711": [0.19444, 0.69444, 0, 0, 1.0], - "9824": [0.12963, 0.69444, 0, 0, 0.77778], - "9825": [0.12963, 0.69444, 0, 0, 0.77778], - "9826": [0.12963, 0.69444, 0, 0, 0.77778], - "9827": [0.12963, 0.69444, 0, 0, 0.77778], - "9837": [0, 0.75, 0, 0, 0.38889], - "9838": [0.19444, 0.69444, 0, 0, 0.38889], - "9839": [0.19444, 0.69444, 0, 0, 0.38889], - "10216": [0.25, 0.75, 0, 0, 0.38889], - "10217": [0.25, 0.75, 0, 0, 0.38889], - "10222": [0.244, 0.744, 0, 0, 0.412], - "10223": [0.244, 0.745, 0, 0, 0.412], - "10229": [0.011, 0.511, 0, 0, 1.609], - "10230": [0.011, 0.511, 0, 0, 1.638], - "10231": [0.011, 0.511, 0, 0, 1.859], - "10232": [0.024, 0.525, 0, 0, 1.609], - "10233": [0.024, 0.525, 0, 0, 1.638], - "10234": [0.024, 0.525, 0, 0, 1.858], - "10236": [0.011, 0.511, 0, 0, 1.638], - "10815": [0, 0.68333, 0, 0, 0.75], - "10927": [0.13597, 0.63597, 0, 0, 0.77778], - "10928": [0.13597, 0.63597, 0, 0, 0.77778], - "57376": [0.19444, 0.69444, 0, 0, 0] - }, - "Math-BoldItalic": { - "32": [0, 0, 0, 0, 0.25], - "48": [0, 0.44444, 0, 0, 0.575], - "49": [0, 0.44444, 0, 0, 0.575], - "50": [0, 0.44444, 0, 0, 0.575], - "51": [0.19444, 0.44444, 0, 0, 0.575], - "52": [0.19444, 0.44444, 0, 0, 0.575], - "53": [0.19444, 0.44444, 0, 0, 0.575], - "54": [0, 0.64444, 0, 0, 0.575], - "55": [0.19444, 0.44444, 0, 0, 0.575], - "56": [0, 0.64444, 0, 0, 0.575], - "57": [0.19444, 0.44444, 0, 0, 0.575], - "65": [0, 0.68611, 0, 0, 0.86944], - "66": [0, 0.68611, 0.04835, 0, 0.8664], - "67": [0, 0.68611, 0.06979, 0, 0.81694], - "68": [0, 0.68611, 0.03194, 0, 0.93812], - "69": [0, 0.68611, 0.05451, 0, 0.81007], - "70": [0, 0.68611, 0.15972, 0, 0.68889], - "71": [0, 0.68611, 0, 0, 0.88673], - "72": [0, 0.68611, 0.08229, 0, 0.98229], - "73": [0, 0.68611, 0.07778, 0, 0.51111], - "74": [0, 0.68611, 0.10069, 0, 0.63125], - "75": [0, 0.68611, 0.06979, 0, 0.97118], - "76": [0, 0.68611, 0, 0, 0.75555], - "77": [0, 0.68611, 0.11424, 0, 1.14201], - "78": [0, 0.68611, 0.11424, 0, 0.95034], - "79": [0, 0.68611, 0.03194, 0, 0.83666], - "80": [0, 0.68611, 0.15972, 0, 0.72309], - "81": [0.19444, 0.68611, 0, 0, 0.86861], - "82": [0, 0.68611, 0.00421, 0, 0.87235], - "83": [0, 0.68611, 0.05382, 0, 0.69271], - "84": [0, 0.68611, 0.15972, 0, 0.63663], - "85": [0, 0.68611, 0.11424, 0, 0.80027], - "86": [0, 0.68611, 0.25555, 0, 0.67778], - "87": [0, 0.68611, 0.15972, 0, 1.09305], - "88": [0, 0.68611, 0.07778, 0, 0.94722], - "89": [0, 0.68611, 0.25555, 0, 0.67458], - "90": [0, 0.68611, 0.06979, 0, 0.77257], - "97": [0, 0.44444, 0, 0, 0.63287], - "98": [0, 0.69444, 0, 0, 0.52083], - "99": [0, 0.44444, 0, 0, 0.51342], - "100": [0, 0.69444, 0, 0, 0.60972], - "101": [0, 0.44444, 0, 0, 0.55361], - "102": [0.19444, 0.69444, 0.11042, 0, 0.56806], - "103": [0.19444, 0.44444, 0.03704, 0, 0.5449], - "104": [0, 0.69444, 0, 0, 0.66759], - "105": [0, 0.69326, 0, 0, 0.4048], - "106": [0.19444, 0.69326, 0.0622, 0, 0.47083], - "107": [0, 0.69444, 0.01852, 0, 0.6037], - "108": [0, 0.69444, 0.0088, 0, 0.34815], - "109": [0, 0.44444, 0, 0, 1.0324], - "110": [0, 0.44444, 0, 0, 0.71296], - "111": [0, 0.44444, 0, 0, 0.58472], - "112": [0.19444, 0.44444, 0, 0, 0.60092], - "113": [0.19444, 0.44444, 0.03704, 0, 0.54213], - "114": [0, 0.44444, 0.03194, 0, 0.5287], - "115": [0, 0.44444, 0, 0, 0.53125], - "116": [0, 0.63492, 0, 0, 0.41528], - "117": [0, 0.44444, 0, 0, 0.68102], - "118": [0, 0.44444, 0.03704, 0, 0.56666], - "119": [0, 0.44444, 0.02778, 0, 0.83148], - "120": [0, 0.44444, 0, 0, 0.65903], - "121": [0.19444, 0.44444, 0.03704, 0, 0.59028], - "122": [0, 0.44444, 0.04213, 0, 0.55509], - "160": [0, 0, 0, 0, 0.25], - "915": [0, 0.68611, 0.15972, 0, 0.65694], - "916": [0, 0.68611, 0, 0, 0.95833], - "920": [0, 0.68611, 0.03194, 0, 0.86722], - "923": [0, 0.68611, 0, 0, 0.80555], - "926": [0, 0.68611, 0.07458, 0, 0.84125], - "928": [0, 0.68611, 0.08229, 0, 0.98229], - "931": [0, 0.68611, 0.05451, 0, 0.88507], - "933": [0, 0.68611, 0.15972, 0, 0.67083], - "934": [0, 0.68611, 0, 0, 0.76666], - "936": [0, 0.68611, 0.11653, 0, 0.71402], - "937": [0, 0.68611, 0.04835, 0, 0.8789], - "945": [0, 0.44444, 0, 0, 0.76064], - "946": [0.19444, 0.69444, 0.03403, 0, 0.65972], - "947": [0.19444, 0.44444, 0.06389, 0, 0.59003], - "948": [0, 0.69444, 0.03819, 0, 0.52222], - "949": [0, 0.44444, 0, 0, 0.52882], - "950": [0.19444, 0.69444, 0.06215, 0, 0.50833], - "951": [0.19444, 0.44444, 0.03704, 0, 0.6], - "952": [0, 0.69444, 0.03194, 0, 0.5618], - "953": [0, 0.44444, 0, 0, 0.41204], - "954": [0, 0.44444, 0, 0, 0.66759], - "955": [0, 0.69444, 0, 0, 0.67083], - "956": [0.19444, 0.44444, 0, 0, 0.70787], - "957": [0, 0.44444, 0.06898, 0, 0.57685], - "958": [0.19444, 0.69444, 0.03021, 0, 0.50833], - "959": [0, 0.44444, 0, 0, 0.58472], - "960": [0, 0.44444, 0.03704, 0, 0.68241], - "961": [0.19444, 0.44444, 0, 0, 0.6118], - "962": [0.09722, 0.44444, 0.07917, 0, 0.42361], - "963": [0, 0.44444, 0.03704, 0, 0.68588], - "964": [0, 0.44444, 0.13472, 0, 0.52083], - "965": [0, 0.44444, 0.03704, 0, 0.63055], - "966": [0.19444, 0.44444, 0, 0, 0.74722], - "967": [0.19444, 0.44444, 0, 0, 0.71805], - "968": [0.19444, 0.69444, 0.03704, 0, 0.75833], - "969": [0, 0.44444, 0.03704, 0, 0.71782], - "977": [0, 0.69444, 0, 0, 0.69155], - "981": [0.19444, 0.69444, 0, 0, 0.7125], - "982": [0, 0.44444, 0.03194, 0, 0.975], - "1009": [0.19444, 0.44444, 0, 0, 0.6118], - "1013": [0, 0.44444, 0, 0, 0.48333], - "57649": [0, 0.44444, 0, 0, 0.39352], - "57911": [0.19444, 0.44444, 0, 0, 0.43889] - }, - "Math-Italic": { - "32": [0, 0, 0, 0, 0.25], - "48": [0, 0.43056, 0, 0, 0.5], - "49": [0, 0.43056, 0, 0, 0.5], - "50": [0, 0.43056, 0, 0, 0.5], - "51": [0.19444, 0.43056, 0, 0, 0.5], - "52": [0.19444, 0.43056, 0, 0, 0.5], - "53": [0.19444, 0.43056, 0, 0, 0.5], - "54": [0, 0.64444, 0, 0, 0.5], - "55": [0.19444, 0.43056, 0, 0, 0.5], - "56": [0, 0.64444, 0, 0, 0.5], - "57": [0.19444, 0.43056, 0, 0, 0.5], - "65": [0, 0.68333, 0, 0.13889, 0.75], - "66": [0, 0.68333, 0.05017, 0.08334, 0.75851], - "67": [0, 0.68333, 0.07153, 0.08334, 0.71472], - "68": [0, 0.68333, 0.02778, 0.05556, 0.82792], - "69": [0, 0.68333, 0.05764, 0.08334, 0.7382], - "70": [0, 0.68333, 0.13889, 0.08334, 0.64306], - "71": [0, 0.68333, 0, 0.08334, 0.78625], - "72": [0, 0.68333, 0.08125, 0.05556, 0.83125], - "73": [0, 0.68333, 0.07847, 0.11111, 0.43958], - "74": [0, 0.68333, 0.09618, 0.16667, 0.55451], - "75": [0, 0.68333, 0.07153, 0.05556, 0.84931], - "76": [0, 0.68333, 0, 0.02778, 0.68056], - "77": [0, 0.68333, 0.10903, 0.08334, 0.97014], - "78": [0, 0.68333, 0.10903, 0.08334, 0.80347], - "79": [0, 0.68333, 0.02778, 0.08334, 0.76278], - "80": [0, 0.68333, 0.13889, 0.08334, 0.64201], - "81": [0.19444, 0.68333, 0, 0.08334, 0.79056], - "82": [0, 0.68333, 0.00773, 0.08334, 0.75929], - "83": [0, 0.68333, 0.05764, 0.08334, 0.6132], - "84": [0, 0.68333, 0.13889, 0.08334, 0.58438], - "85": [0, 0.68333, 0.10903, 0.02778, 0.68278], - "86": [0, 0.68333, 0.22222, 0, 0.58333], - "87": [0, 0.68333, 0.13889, 0, 0.94445], - "88": [0, 0.68333, 0.07847, 0.08334, 0.82847], - "89": [0, 0.68333, 0.22222, 0, 0.58056], - "90": [0, 0.68333, 0.07153, 0.08334, 0.68264], - "97": [0, 0.43056, 0, 0, 0.52859], - "98": [0, 0.69444, 0, 0, 0.42917], - "99": [0, 0.43056, 0, 0.05556, 0.43276], - "100": [0, 0.69444, 0, 0.16667, 0.52049], - "101": [0, 0.43056, 0, 0.05556, 0.46563], - "102": [0.19444, 0.69444, 0.10764, 0.16667, 0.48959], - "103": [0.19444, 0.43056, 0.03588, 0.02778, 0.47697], - "104": [0, 0.69444, 0, 0, 0.57616], - "105": [0, 0.65952, 0, 0, 0.34451], - "106": [0.19444, 0.65952, 0.05724, 0, 0.41181], - "107": [0, 0.69444, 0.03148, 0, 0.5206], - "108": [0, 0.69444, 0.01968, 0.08334, 0.29838], - "109": [0, 0.43056, 0, 0, 0.87801], - "110": [0, 0.43056, 0, 0, 0.60023], - "111": [0, 0.43056, 0, 0.05556, 0.48472], - "112": [0.19444, 0.43056, 0, 0.08334, 0.50313], - "113": [0.19444, 0.43056, 0.03588, 0.08334, 0.44641], - "114": [0, 0.43056, 0.02778, 0.05556, 0.45116], - "115": [0, 0.43056, 0, 0.05556, 0.46875], - "116": [0, 0.61508, 0, 0.08334, 0.36111], - "117": [0, 0.43056, 0, 0.02778, 0.57246], - "118": [0, 0.43056, 0.03588, 0.02778, 0.48472], - "119": [0, 0.43056, 0.02691, 0.08334, 0.71592], - "120": [0, 0.43056, 0, 0.02778, 0.57153], - "121": [0.19444, 0.43056, 0.03588, 0.05556, 0.49028], - "122": [0, 0.43056, 0.04398, 0.05556, 0.46505], - "160": [0, 0, 0, 0, 0.25], - "915": [0, 0.68333, 0.13889, 0.08334, 0.61528], - "916": [0, 0.68333, 0, 0.16667, 0.83334], - "920": [0, 0.68333, 0.02778, 0.08334, 0.76278], - "923": [0, 0.68333, 0, 0.16667, 0.69445], - "926": [0, 0.68333, 0.07569, 0.08334, 0.74236], - "928": [0, 0.68333, 0.08125, 0.05556, 0.83125], - "931": [0, 0.68333, 0.05764, 0.08334, 0.77986], - "933": [0, 0.68333, 0.13889, 0.05556, 0.58333], - "934": [0, 0.68333, 0, 0.08334, 0.66667], - "936": [0, 0.68333, 0.11, 0.05556, 0.61222], - "937": [0, 0.68333, 0.05017, 0.08334, 0.7724], - "945": [0, 0.43056, 0.0037, 0.02778, 0.6397], - "946": [0.19444, 0.69444, 0.05278, 0.08334, 0.56563], - "947": [0.19444, 0.43056, 0.05556, 0, 0.51773], - "948": [0, 0.69444, 0.03785, 0.05556, 0.44444], - "949": [0, 0.43056, 0, 0.08334, 0.46632], - "950": [0.19444, 0.69444, 0.07378, 0.08334, 0.4375], - "951": [0.19444, 0.43056, 0.03588, 0.05556, 0.49653], - "952": [0, 0.69444, 0.02778, 0.08334, 0.46944], - "953": [0, 0.43056, 0, 0.05556, 0.35394], - "954": [0, 0.43056, 0, 0, 0.57616], - "955": [0, 0.69444, 0, 0, 0.58334], - "956": [0.19444, 0.43056, 0, 0.02778, 0.60255], - "957": [0, 0.43056, 0.06366, 0.02778, 0.49398], - "958": [0.19444, 0.69444, 0.04601, 0.11111, 0.4375], - "959": [0, 0.43056, 0, 0.05556, 0.48472], - "960": [0, 0.43056, 0.03588, 0, 0.57003], - "961": [0.19444, 0.43056, 0, 0.08334, 0.51702], - "962": [0.09722, 0.43056, 0.07986, 0.08334, 0.36285], - "963": [0, 0.43056, 0.03588, 0, 0.57141], - "964": [0, 0.43056, 0.1132, 0.02778, 0.43715], - "965": [0, 0.43056, 0.03588, 0.02778, 0.54028], - "966": [0.19444, 0.43056, 0, 0.08334, 0.65417], - "967": [0.19444, 0.43056, 0, 0.05556, 0.62569], - "968": [0.19444, 0.69444, 0.03588, 0.11111, 0.65139], - "969": [0, 0.43056, 0.03588, 0, 0.62245], - "977": [0, 0.69444, 0, 0.08334, 0.59144], - "981": [0.19444, 0.69444, 0, 0.08334, 0.59583], - "982": [0, 0.43056, 0.02778, 0, 0.82813], - "1009": [0.19444, 0.43056, 0, 0.08334, 0.51702], - "1013": [0, 0.43056, 0, 0.05556, 0.4059], - "57649": [0, 0.43056, 0, 0.02778, 0.32246], - "57911": [0.19444, 0.43056, 0, 0.08334, 0.38403] - }, - "SansSerif-Bold": { - "32": [0, 0, 0, 0, 0.25], - "33": [0, 0.69444, 0, 0, 0.36667], - "34": [0, 0.69444, 0, 0, 0.55834], - "35": [0.19444, 0.69444, 0, 0, 0.91667], - "36": [0.05556, 0.75, 0, 0, 0.55], - "37": [0.05556, 0.75, 0, 0, 1.02912], - "38": [0, 0.69444, 0, 0, 0.83056], - "39": [0, 0.69444, 0, 0, 0.30556], - "40": [0.25, 0.75, 0, 0, 0.42778], - "41": [0.25, 0.75, 0, 0, 0.42778], - "42": [0, 0.75, 0, 0, 0.55], - "43": [0.11667, 0.61667, 0, 0, 0.85556], - "44": [0.10556, 0.13056, 0, 0, 0.30556], - "45": [0, 0.45833, 0, 0, 0.36667], - "46": [0, 0.13056, 0, 0, 0.30556], - "47": [0.25, 0.75, 0, 0, 0.55], - "48": [0, 0.69444, 0, 0, 0.55], - "49": [0, 0.69444, 0, 0, 0.55], - "50": [0, 0.69444, 0, 0, 0.55], - "51": [0, 0.69444, 0, 0, 0.55], - "52": [0, 0.69444, 0, 0, 0.55], - "53": [0, 0.69444, 0, 0, 0.55], - "54": [0, 0.69444, 0, 0, 0.55], - "55": [0, 0.69444, 0, 0, 0.55], - "56": [0, 0.69444, 0, 0, 0.55], - "57": [0, 0.69444, 0, 0, 0.55], - "58": [0, 0.45833, 0, 0, 0.30556], - "59": [0.10556, 0.45833, 0, 0, 0.30556], - "61": [-0.09375, 0.40625, 0, 0, 0.85556], - "63": [0, 0.69444, 0, 0, 0.51945], - "64": [0, 0.69444, 0, 0, 0.73334], - "65": [0, 0.69444, 0, 0, 0.73334], - "66": [0, 0.69444, 0, 0, 0.73334], - "67": [0, 0.69444, 0, 0, 0.70278], - "68": [0, 0.69444, 0, 0, 0.79445], - "69": [0, 0.69444, 0, 0, 0.64167], - "70": [0, 0.69444, 0, 0, 0.61111], - "71": [0, 0.69444, 0, 0, 0.73334], - "72": [0, 0.69444, 0, 0, 0.79445], - "73": [0, 0.69444, 0, 0, 0.33056], - "74": [0, 0.69444, 0, 0, 0.51945], - "75": [0, 0.69444, 0, 0, 0.76389], - "76": [0, 0.69444, 0, 0, 0.58056], - "77": [0, 0.69444, 0, 0, 0.97778], - "78": [0, 0.69444, 0, 0, 0.79445], - "79": [0, 0.69444, 0, 0, 0.79445], - "80": [0, 0.69444, 0, 0, 0.70278], - "81": [0.10556, 0.69444, 0, 0, 0.79445], - "82": [0, 0.69444, 0, 0, 0.70278], - "83": [0, 0.69444, 0, 0, 0.61111], - "84": [0, 0.69444, 0, 0, 0.73334], - "85": [0, 0.69444, 0, 0, 0.76389], - "86": [0, 0.69444, 0.01528, 0, 0.73334], - "87": [0, 0.69444, 0.01528, 0, 1.03889], - "88": [0, 0.69444, 0, 0, 0.73334], - "89": [0, 0.69444, 0.0275, 0, 0.73334], - "90": [0, 0.69444, 0, 0, 0.67223], - "91": [0.25, 0.75, 0, 0, 0.34306], - "93": [0.25, 0.75, 0, 0, 0.34306], - "94": [0, 0.69444, 0, 0, 0.55], - "95": [0.35, 0.10833, 0.03056, 0, 0.55], - "97": [0, 0.45833, 0, 0, 0.525], - "98": [0, 0.69444, 0, 0, 0.56111], - "99": [0, 0.45833, 0, 0, 0.48889], - "100": [0, 0.69444, 0, 0, 0.56111], - "101": [0, 0.45833, 0, 0, 0.51111], - "102": [0, 0.69444, 0.07639, 0, 0.33611], - "103": [0.19444, 0.45833, 0.01528, 0, 0.55], - "104": [0, 0.69444, 0, 0, 0.56111], - "105": [0, 0.69444, 0, 0, 0.25556], - "106": [0.19444, 0.69444, 0, 0, 0.28611], - "107": [0, 0.69444, 0, 0, 0.53056], - "108": [0, 0.69444, 0, 0, 0.25556], - "109": [0, 0.45833, 0, 0, 0.86667], - "110": [0, 0.45833, 0, 0, 0.56111], - "111": [0, 0.45833, 0, 0, 0.55], - "112": [0.19444, 0.45833, 0, 0, 0.56111], - "113": [0.19444, 0.45833, 0, 0, 0.56111], - "114": [0, 0.45833, 0.01528, 0, 0.37222], - "115": [0, 0.45833, 0, 0, 0.42167], - "116": [0, 0.58929, 0, 0, 0.40417], - "117": [0, 0.45833, 0, 0, 0.56111], - "118": [0, 0.45833, 0.01528, 0, 0.5], - "119": [0, 0.45833, 0.01528, 0, 0.74445], - "120": [0, 0.45833, 0, 0, 0.5], - "121": [0.19444, 0.45833, 0.01528, 0, 0.5], - "122": [0, 0.45833, 0, 0, 0.47639], - "126": [0.35, 0.34444, 0, 0, 0.55], - "160": [0, 0, 0, 0, 0.25], - "168": [0, 0.69444, 0, 0, 0.55], - "176": [0, 0.69444, 0, 0, 0.73334], - "180": [0, 0.69444, 0, 0, 0.55], - "184": [0.17014, 0, 0, 0, 0.48889], - "305": [0, 0.45833, 0, 0, 0.25556], - "567": [0.19444, 0.45833, 0, 0, 0.28611], - "710": [0, 0.69444, 0, 0, 0.55], - "711": [0, 0.63542, 0, 0, 0.55], - "713": [0, 0.63778, 0, 0, 0.55], - "728": [0, 0.69444, 0, 0, 0.55], - "729": [0, 0.69444, 0, 0, 0.30556], - "730": [0, 0.69444, 0, 0, 0.73334], - "732": [0, 0.69444, 0, 0, 0.55], - "733": [0, 0.69444, 0, 0, 0.55], - "915": [0, 0.69444, 0, 0, 0.58056], - "916": [0, 0.69444, 0, 0, 0.91667], - "920": [0, 0.69444, 0, 0, 0.85556], - "923": [0, 0.69444, 0, 0, 0.67223], - "926": [0, 0.69444, 0, 0, 0.73334], - "928": [0, 0.69444, 0, 0, 0.79445], - "931": [0, 0.69444, 0, 0, 0.79445], - "933": [0, 0.69444, 0, 0, 0.85556], - "934": [0, 0.69444, 0, 0, 0.79445], - "936": [0, 0.69444, 0, 0, 0.85556], - "937": [0, 0.69444, 0, 0, 0.79445], - "8211": [0, 0.45833, 0.03056, 0, 0.55], - "8212": [0, 0.45833, 0.03056, 0, 1.10001], - "8216": [0, 0.69444, 0, 0, 0.30556], - "8217": [0, 0.69444, 0, 0, 0.30556], - "8220": [0, 0.69444, 0, 0, 0.55834], - "8221": [0, 0.69444, 0, 0, 0.55834] - }, - "SansSerif-Italic": { - "32": [0, 0, 0, 0, 0.25], - "33": [0, 0.69444, 0.05733, 0, 0.31945], - "34": [0, 0.69444, 0.00316, 0, 0.5], - "35": [0.19444, 0.69444, 0.05087, 0, 0.83334], - "36": [0.05556, 0.75, 0.11156, 0, 0.5], - "37": [0.05556, 0.75, 0.03126, 0, 0.83334], - "38": [0, 0.69444, 0.03058, 0, 0.75834], - "39": [0, 0.69444, 0.07816, 0, 0.27778], - "40": [0.25, 0.75, 0.13164, 0, 0.38889], - "41": [0.25, 0.75, 0.02536, 0, 0.38889], - "42": [0, 0.75, 0.11775, 0, 0.5], - "43": [0.08333, 0.58333, 0.02536, 0, 0.77778], - "44": [0.125, 0.08333, 0, 0, 0.27778], - "45": [0, 0.44444, 0.01946, 0, 0.33333], - "46": [0, 0.08333, 0, 0, 0.27778], - "47": [0.25, 0.75, 0.13164, 0, 0.5], - "48": [0, 0.65556, 0.11156, 0, 0.5], - "49": [0, 0.65556, 0.11156, 0, 0.5], - "50": [0, 0.65556, 0.11156, 0, 0.5], - "51": [0, 0.65556, 0.11156, 0, 0.5], - "52": [0, 0.65556, 0.11156, 0, 0.5], - "53": [0, 0.65556, 0.11156, 0, 0.5], - "54": [0, 0.65556, 0.11156, 0, 0.5], - "55": [0, 0.65556, 0.11156, 0, 0.5], - "56": [0, 0.65556, 0.11156, 0, 0.5], - "57": [0, 0.65556, 0.11156, 0, 0.5], - "58": [0, 0.44444, 0.02502, 0, 0.27778], - "59": [0.125, 0.44444, 0.02502, 0, 0.27778], - "61": [-0.13, 0.37, 0.05087, 0, 0.77778], - "63": [0, 0.69444, 0.11809, 0, 0.47222], - "64": [0, 0.69444, 0.07555, 0, 0.66667], - "65": [0, 0.69444, 0, 0, 0.66667], - "66": [0, 0.69444, 0.08293, 0, 0.66667], - "67": [0, 0.69444, 0.11983, 0, 0.63889], - "68": [0, 0.69444, 0.07555, 0, 0.72223], - "69": [0, 0.69444, 0.11983, 0, 0.59722], - "70": [0, 0.69444, 0.13372, 0, 0.56945], - "71": [0, 0.69444, 0.11983, 0, 0.66667], - "72": [0, 0.69444, 0.08094, 0, 0.70834], - "73": [0, 0.69444, 0.13372, 0, 0.27778], - "74": [0, 0.69444, 0.08094, 0, 0.47222], - "75": [0, 0.69444, 0.11983, 0, 0.69445], - "76": [0, 0.69444, 0, 0, 0.54167], - "77": [0, 0.69444, 0.08094, 0, 0.875], - "78": [0, 0.69444, 0.08094, 0, 0.70834], - "79": [0, 0.69444, 0.07555, 0, 0.73611], - "80": [0, 0.69444, 0.08293, 0, 0.63889], - "81": [0.125, 0.69444, 0.07555, 0, 0.73611], - "82": [0, 0.69444, 0.08293, 0, 0.64584], - "83": [0, 0.69444, 0.09205, 0, 0.55556], - "84": [0, 0.69444, 0.13372, 0, 0.68056], - "85": [0, 0.69444, 0.08094, 0, 0.6875], - "86": [0, 0.69444, 0.1615, 0, 0.66667], - "87": [0, 0.69444, 0.1615, 0, 0.94445], - "88": [0, 0.69444, 0.13372, 0, 0.66667], - "89": [0, 0.69444, 0.17261, 0, 0.66667], - "90": [0, 0.69444, 0.11983, 0, 0.61111], - "91": [0.25, 0.75, 0.15942, 0, 0.28889], - "93": [0.25, 0.75, 0.08719, 0, 0.28889], - "94": [0, 0.69444, 0.0799, 0, 0.5], - "95": [0.35, 0.09444, 0.08616, 0, 0.5], - "97": [0, 0.44444, 0.00981, 0, 0.48056], - "98": [0, 0.69444, 0.03057, 0, 0.51667], - "99": [0, 0.44444, 0.08336, 0, 0.44445], - "100": [0, 0.69444, 0.09483, 0, 0.51667], - "101": [0, 0.44444, 0.06778, 0, 0.44445], - "102": [0, 0.69444, 0.21705, 0, 0.30556], - "103": [0.19444, 0.44444, 0.10836, 0, 0.5], - "104": [0, 0.69444, 0.01778, 0, 0.51667], - "105": [0, 0.67937, 0.09718, 0, 0.23889], - "106": [0.19444, 0.67937, 0.09162, 0, 0.26667], - "107": [0, 0.69444, 0.08336, 0, 0.48889], - "108": [0, 0.69444, 0.09483, 0, 0.23889], - "109": [0, 0.44444, 0.01778, 0, 0.79445], - "110": [0, 0.44444, 0.01778, 0, 0.51667], - "111": [0, 0.44444, 0.06613, 0, 0.5], - "112": [0.19444, 0.44444, 0.0389, 0, 0.51667], - "113": [0.19444, 0.44444, 0.04169, 0, 0.51667], - "114": [0, 0.44444, 0.10836, 0, 0.34167], - "115": [0, 0.44444, 0.0778, 0, 0.38333], - "116": [0, 0.57143, 0.07225, 0, 0.36111], - "117": [0, 0.44444, 0.04169, 0, 0.51667], - "118": [0, 0.44444, 0.10836, 0, 0.46111], - "119": [0, 0.44444, 0.10836, 0, 0.68334], - "120": [0, 0.44444, 0.09169, 0, 0.46111], - "121": [0.19444, 0.44444, 0.10836, 0, 0.46111], - "122": [0, 0.44444, 0.08752, 0, 0.43472], - "126": [0.35, 0.32659, 0.08826, 0, 0.5], - "160": [0, 0, 0, 0, 0.25], - "168": [0, 0.67937, 0.06385, 0, 0.5], - "176": [0, 0.69444, 0, 0, 0.73752], - "184": [0.17014, 0, 0, 0, 0.44445], - "305": [0, 0.44444, 0.04169, 0, 0.23889], - "567": [0.19444, 0.44444, 0.04169, 0, 0.26667], - "710": [0, 0.69444, 0.0799, 0, 0.5], - "711": [0, 0.63194, 0.08432, 0, 0.5], - "713": [0, 0.60889, 0.08776, 0, 0.5], - "714": [0, 0.69444, 0.09205, 0, 0.5], - "715": [0, 0.69444, 0, 0, 0.5], - "728": [0, 0.69444, 0.09483, 0, 0.5], - "729": [0, 0.67937, 0.07774, 0, 0.27778], - "730": [0, 0.69444, 0, 0, 0.73752], - "732": [0, 0.67659, 0.08826, 0, 0.5], - "733": [0, 0.69444, 0.09205, 0, 0.5], - "915": [0, 0.69444, 0.13372, 0, 0.54167], - "916": [0, 0.69444, 0, 0, 0.83334], - "920": [0, 0.69444, 0.07555, 0, 0.77778], - "923": [0, 0.69444, 0, 0, 0.61111], - "926": [0, 0.69444, 0.12816, 0, 0.66667], - "928": [0, 0.69444, 0.08094, 0, 0.70834], - "931": [0, 0.69444, 0.11983, 0, 0.72222], - "933": [0, 0.69444, 0.09031, 0, 0.77778], - "934": [0, 0.69444, 0.04603, 0, 0.72222], - "936": [0, 0.69444, 0.09031, 0, 0.77778], - "937": [0, 0.69444, 0.08293, 0, 0.72222], - "8211": [0, 0.44444, 0.08616, 0, 0.5], - "8212": [0, 0.44444, 0.08616, 0, 1.0], - "8216": [0, 0.69444, 0.07816, 0, 0.27778], - "8217": [0, 0.69444, 0.07816, 0, 0.27778], - "8220": [0, 0.69444, 0.14205, 0, 0.5], - "8221": [0, 0.69444, 0.00316, 0, 0.5] - }, - "SansSerif-Regular": { - "32": [0, 0, 0, 0, 0.25], - "33": [0, 0.69444, 0, 0, 0.31945], - "34": [0, 0.69444, 0, 0, 0.5], - "35": [0.19444, 0.69444, 0, 0, 0.83334], - "36": [0.05556, 0.75, 0, 0, 0.5], - "37": [0.05556, 0.75, 0, 0, 0.83334], - "38": [0, 0.69444, 0, 0, 0.75834], - "39": [0, 0.69444, 0, 0, 0.27778], - "40": [0.25, 0.75, 0, 0, 0.38889], - "41": [0.25, 0.75, 0, 0, 0.38889], - "42": [0, 0.75, 0, 0, 0.5], - "43": [0.08333, 0.58333, 0, 0, 0.77778], - "44": [0.125, 0.08333, 0, 0, 0.27778], - "45": [0, 0.44444, 0, 0, 0.33333], - "46": [0, 0.08333, 0, 0, 0.27778], - "47": [0.25, 0.75, 0, 0, 0.5], - "48": [0, 0.65556, 0, 0, 0.5], - "49": [0, 0.65556, 0, 0, 0.5], - "50": [0, 0.65556, 0, 0, 0.5], - "51": [0, 0.65556, 0, 0, 0.5], - "52": [0, 0.65556, 0, 0, 0.5], - "53": [0, 0.65556, 0, 0, 0.5], - "54": [0, 0.65556, 0, 0, 0.5], - "55": [0, 0.65556, 0, 0, 0.5], - "56": [0, 0.65556, 0, 0, 0.5], - "57": [0, 0.65556, 0, 0, 0.5], - "58": [0, 0.44444, 0, 0, 0.27778], - "59": [0.125, 0.44444, 0, 0, 0.27778], - "61": [-0.13, 0.37, 0, 0, 0.77778], - "63": [0, 0.69444, 0, 0, 0.47222], - "64": [0, 0.69444, 0, 0, 0.66667], - "65": [0, 0.69444, 0, 0, 0.66667], - "66": [0, 0.69444, 0, 0, 0.66667], - "67": [0, 0.69444, 0, 0, 0.63889], - "68": [0, 0.69444, 0, 0, 0.72223], - "69": [0, 0.69444, 0, 0, 0.59722], - "70": [0, 0.69444, 0, 0, 0.56945], - "71": [0, 0.69444, 0, 0, 0.66667], - "72": [0, 0.69444, 0, 0, 0.70834], - "73": [0, 0.69444, 0, 0, 0.27778], - "74": [0, 0.69444, 0, 0, 0.47222], - "75": [0, 0.69444, 0, 0, 0.69445], - "76": [0, 0.69444, 0, 0, 0.54167], - "77": [0, 0.69444, 0, 0, 0.875], - "78": [0, 0.69444, 0, 0, 0.70834], - "79": [0, 0.69444, 0, 0, 0.73611], - "80": [0, 0.69444, 0, 0, 0.63889], - "81": [0.125, 0.69444, 0, 0, 0.73611], - "82": [0, 0.69444, 0, 0, 0.64584], - "83": [0, 0.69444, 0, 0, 0.55556], - "84": [0, 0.69444, 0, 0, 0.68056], - "85": [0, 0.69444, 0, 0, 0.6875], - "86": [0, 0.69444, 0.01389, 0, 0.66667], - "87": [0, 0.69444, 0.01389, 0, 0.94445], - "88": [0, 0.69444, 0, 0, 0.66667], - "89": [0, 0.69444, 0.025, 0, 0.66667], - "90": [0, 0.69444, 0, 0, 0.61111], - "91": [0.25, 0.75, 0, 0, 0.28889], - "93": [0.25, 0.75, 0, 0, 0.28889], - "94": [0, 0.69444, 0, 0, 0.5], - "95": [0.35, 0.09444, 0.02778, 0, 0.5], - "97": [0, 0.44444, 0, 0, 0.48056], - "98": [0, 0.69444, 0, 0, 0.51667], - "99": [0, 0.44444, 0, 0, 0.44445], - "100": [0, 0.69444, 0, 0, 0.51667], - "101": [0, 0.44444, 0, 0, 0.44445], - "102": [0, 0.69444, 0.06944, 0, 0.30556], - "103": [0.19444, 0.44444, 0.01389, 0, 0.5], - "104": [0, 0.69444, 0, 0, 0.51667], - "105": [0, 0.67937, 0, 0, 0.23889], - "106": [0.19444, 0.67937, 0, 0, 0.26667], - "107": [0, 0.69444, 0, 0, 0.48889], - "108": [0, 0.69444, 0, 0, 0.23889], - "109": [0, 0.44444, 0, 0, 0.79445], - "110": [0, 0.44444, 0, 0, 0.51667], - "111": [0, 0.44444, 0, 0, 0.5], - "112": [0.19444, 0.44444, 0, 0, 0.51667], - "113": [0.19444, 0.44444, 0, 0, 0.51667], - "114": [0, 0.44444, 0.01389, 0, 0.34167], - "115": [0, 0.44444, 0, 0, 0.38333], - "116": [0, 0.57143, 0, 0, 0.36111], - "117": [0, 0.44444, 0, 0, 0.51667], - "118": [0, 0.44444, 0.01389, 0, 0.46111], - "119": [0, 0.44444, 0.01389, 0, 0.68334], - "120": [0, 0.44444, 0, 0, 0.46111], - "121": [0.19444, 0.44444, 0.01389, 0, 0.46111], - "122": [0, 0.44444, 0, 0, 0.43472], - "126": [0.35, 0.32659, 0, 0, 0.5], - "160": [0, 0, 0, 0, 0.25], - "168": [0, 0.67937, 0, 0, 0.5], - "176": [0, 0.69444, 0, 0, 0.66667], - "184": [0.17014, 0, 0, 0, 0.44445], - "305": [0, 0.44444, 0, 0, 0.23889], - "567": [0.19444, 0.44444, 0, 0, 0.26667], - "710": [0, 0.69444, 0, 0, 0.5], - "711": [0, 0.63194, 0, 0, 0.5], - "713": [0, 0.60889, 0, 0, 0.5], - "714": [0, 0.69444, 0, 0, 0.5], - "715": [0, 0.69444, 0, 0, 0.5], - "728": [0, 0.69444, 0, 0, 0.5], - "729": [0, 0.67937, 0, 0, 0.27778], - "730": [0, 0.69444, 0, 0, 0.66667], - "732": [0, 0.67659, 0, 0, 0.5], - "733": [0, 0.69444, 0, 0, 0.5], - "915": [0, 0.69444, 0, 0, 0.54167], - "916": [0, 0.69444, 0, 0, 0.83334], - "920": [0, 0.69444, 0, 0, 0.77778], - "923": [0, 0.69444, 0, 0, 0.61111], - "926": [0, 0.69444, 0, 0, 0.66667], - "928": [0, 0.69444, 0, 0, 0.70834], - "931": [0, 0.69444, 0, 0, 0.72222], - "933": [0, 0.69444, 0, 0, 0.77778], - "934": [0, 0.69444, 0, 0, 0.72222], - "936": [0, 0.69444, 0, 0, 0.77778], - "937": [0, 0.69444, 0, 0, 0.72222], - "8211": [0, 0.44444, 0.02778, 0, 0.5], - "8212": [0, 0.44444, 0.02778, 0, 1.0], - "8216": [0, 0.69444, 0, 0, 0.27778], - "8217": [0, 0.69444, 0, 0, 0.27778], - "8220": [0, 0.69444, 0, 0, 0.5], - "8221": [0, 0.69444, 0, 0, 0.5] - }, - "Script-Regular": { - "32": [0, 0, 0, 0, 0.25], - "65": [0, 0.7, 0.22925, 0, 0.80253], - "66": [0, 0.7, 0.04087, 0, 0.90757], - "67": [0, 0.7, 0.1689, 0, 0.66619], - "68": [0, 0.7, 0.09371, 0, 0.77443], - "69": [0, 0.7, 0.18583, 0, 0.56162], - "70": [0, 0.7, 0.13634, 0, 0.89544], - "71": [0, 0.7, 0.17322, 0, 0.60961], - "72": [0, 0.7, 0.29694, 0, 0.96919], - "73": [0, 0.7, 0.19189, 0, 0.80907], - "74": [0.27778, 0.7, 0.19189, 0, 1.05159], - "75": [0, 0.7, 0.31259, 0, 0.91364], - "76": [0, 0.7, 0.19189, 0, 0.87373], - "77": [0, 0.7, 0.15981, 0, 1.08031], - "78": [0, 0.7, 0.3525, 0, 0.9015], - "79": [0, 0.7, 0.08078, 0, 0.73787], - "80": [0, 0.7, 0.08078, 0, 1.01262], - "81": [0, 0.7, 0.03305, 0, 0.88282], - "82": [0, 0.7, 0.06259, 0, 0.85], - "83": [0, 0.7, 0.19189, 0, 0.86767], - "84": [0, 0.7, 0.29087, 0, 0.74697], - "85": [0, 0.7, 0.25815, 0, 0.79996], - "86": [0, 0.7, 0.27523, 0, 0.62204], - "87": [0, 0.7, 0.27523, 0, 0.80532], - "88": [0, 0.7, 0.26006, 0, 0.94445], - "89": [0, 0.7, 0.2939, 0, 0.70961], - "90": [0, 0.7, 0.24037, 0, 0.8212], - "160": [0, 0, 0, 0, 0.25] - }, - "Size1-Regular": { - "32": [0, 0, 0, 0, 0.25], - "40": [0.35001, 0.85, 0, 0, 0.45834], - "41": [0.35001, 0.85, 0, 0, 0.45834], - "47": [0.35001, 0.85, 0, 0, 0.57778], - "91": [0.35001, 0.85, 0, 0, 0.41667], - "92": [0.35001, 0.85, 0, 0, 0.57778], - "93": [0.35001, 0.85, 0, 0, 0.41667], - "123": [0.35001, 0.85, 0, 0, 0.58334], - "125": [0.35001, 0.85, 0, 0, 0.58334], - "160": [0, 0, 0, 0, 0.25], - "710": [0, 0.72222, 0, 0, 0.55556], - "732": [0, 0.72222, 0, 0, 0.55556], - "770": [0, 0.72222, 0, 0, 0.55556], - "771": [0, 0.72222, 0, 0, 0.55556], - "8214": [-0.00099, 0.601, 0, 0, 0.77778], - "8593": [1e-05, 0.6, 0, 0, 0.66667], - "8595": [1e-05, 0.6, 0, 0, 0.66667], - "8657": [1e-05, 0.6, 0, 0, 0.77778], - "8659": [1e-05, 0.6, 0, 0, 0.77778], - "8719": [0.25001, 0.75, 0, 0, 0.94445], - "8720": [0.25001, 0.75, 0, 0, 0.94445], - "8721": [0.25001, 0.75, 0, 0, 1.05556], - "8730": [0.35001, 0.85, 0, 0, 1.0], - "8739": [-0.00599, 0.606, 0, 0, 0.33333], - "8741": [-0.00599, 0.606, 0, 0, 0.55556], - "8747": [0.30612, 0.805, 0.19445, 0, 0.47222], - "8748": [0.306, 0.805, 0.19445, 0, 0.47222], - "8749": [0.306, 0.805, 0.19445, 0, 0.47222], - "8750": [0.30612, 0.805, 0.19445, 0, 0.47222], - "8896": [0.25001, 0.75, 0, 0, 0.83334], - "8897": [0.25001, 0.75, 0, 0, 0.83334], - "8898": [0.25001, 0.75, 0, 0, 0.83334], - "8899": [0.25001, 0.75, 0, 0, 0.83334], - "8968": [0.35001, 0.85, 0, 0, 0.47222], - "8969": [0.35001, 0.85, 0, 0, 0.47222], - "8970": [0.35001, 0.85, 0, 0, 0.47222], - "8971": [0.35001, 0.85, 0, 0, 0.47222], - "9168": [-0.00099, 0.601, 0, 0, 0.66667], - "10216": [0.35001, 0.85, 0, 0, 0.47222], - "10217": [0.35001, 0.85, 0, 0, 0.47222], - "10752": [0.25001, 0.75, 0, 0, 1.11111], - "10753": [0.25001, 0.75, 0, 0, 1.11111], - "10754": [0.25001, 0.75, 0, 0, 1.11111], - "10756": [0.25001, 0.75, 0, 0, 0.83334], - "10758": [0.25001, 0.75, 0, 0, 0.83334] - }, - "Size2-Regular": { - "32": [0, 0, 0, 0, 0.25], - "40": [0.65002, 1.15, 0, 0, 0.59722], - "41": [0.65002, 1.15, 0, 0, 0.59722], - "47": [0.65002, 1.15, 0, 0, 0.81111], - "91": [0.65002, 1.15, 0, 0, 0.47222], - "92": [0.65002, 1.15, 0, 0, 0.81111], - "93": [0.65002, 1.15, 0, 0, 0.47222], - "123": [0.65002, 1.15, 0, 0, 0.66667], - "125": [0.65002, 1.15, 0, 0, 0.66667], - "160": [0, 0, 0, 0, 0.25], - "710": [0, 0.75, 0, 0, 1.0], - "732": [0, 0.75, 0, 0, 1.0], - "770": [0, 0.75, 0, 0, 1.0], - "771": [0, 0.75, 0, 0, 1.0], - "8719": [0.55001, 1.05, 0, 0, 1.27778], - "8720": [0.55001, 1.05, 0, 0, 1.27778], - "8721": [0.55001, 1.05, 0, 0, 1.44445], - "8730": [0.65002, 1.15, 0, 0, 1.0], - "8747": [0.86225, 1.36, 0.44445, 0, 0.55556], - "8748": [0.862, 1.36, 0.44445, 0, 0.55556], - "8749": [0.862, 1.36, 0.44445, 0, 0.55556], - "8750": [0.86225, 1.36, 0.44445, 0, 0.55556], - "8896": [0.55001, 1.05, 0, 0, 1.11111], - "8897": [0.55001, 1.05, 0, 0, 1.11111], - "8898": [0.55001, 1.05, 0, 0, 1.11111], - "8899": [0.55001, 1.05, 0, 0, 1.11111], - "8968": [0.65002, 1.15, 0, 0, 0.52778], - "8969": [0.65002, 1.15, 0, 0, 0.52778], - "8970": [0.65002, 1.15, 0, 0, 0.52778], - "8971": [0.65002, 1.15, 0, 0, 0.52778], - "10216": [0.65002, 1.15, 0, 0, 0.61111], - "10217": [0.65002, 1.15, 0, 0, 0.61111], - "10752": [0.55001, 1.05, 0, 0, 1.51112], - "10753": [0.55001, 1.05, 0, 0, 1.51112], - "10754": [0.55001, 1.05, 0, 0, 1.51112], - "10756": [0.55001, 1.05, 0, 0, 1.11111], - "10758": [0.55001, 1.05, 0, 0, 1.11111] - }, - "Size3-Regular": { - "32": [0, 0, 0, 0, 0.25], - "40": [0.95003, 1.45, 0, 0, 0.73611], - "41": [0.95003, 1.45, 0, 0, 0.73611], - "47": [0.95003, 1.45, 0, 0, 1.04445], - "91": [0.95003, 1.45, 0, 0, 0.52778], - "92": [0.95003, 1.45, 0, 0, 1.04445], - "93": [0.95003, 1.45, 0, 0, 0.52778], - "123": [0.95003, 1.45, 0, 0, 0.75], - "125": [0.95003, 1.45, 0, 0, 0.75], - "160": [0, 0, 0, 0, 0.25], - "710": [0, 0.75, 0, 0, 1.44445], - "732": [0, 0.75, 0, 0, 1.44445], - "770": [0, 0.75, 0, 0, 1.44445], - "771": [0, 0.75, 0, 0, 1.44445], - "8730": [0.95003, 1.45, 0, 0, 1.0], - "8968": [0.95003, 1.45, 0, 0, 0.58334], - "8969": [0.95003, 1.45, 0, 0, 0.58334], - "8970": [0.95003, 1.45, 0, 0, 0.58334], - "8971": [0.95003, 1.45, 0, 0, 0.58334], - "10216": [0.95003, 1.45, 0, 0, 0.75], - "10217": [0.95003, 1.45, 0, 0, 0.75] - }, - "Size4-Regular": { - "32": [0, 0, 0, 0, 0.25], - "40": [1.25003, 1.75, 0, 0, 0.79167], - "41": [1.25003, 1.75, 0, 0, 0.79167], - "47": [1.25003, 1.75, 0, 0, 1.27778], - "91": [1.25003, 1.75, 0, 0, 0.58334], - "92": [1.25003, 1.75, 0, 0, 1.27778], - "93": [1.25003, 1.75, 0, 0, 0.58334], - "123": [1.25003, 1.75, 0, 0, 0.80556], - "125": [1.25003, 1.75, 0, 0, 0.80556], - "160": [0, 0, 0, 0, 0.25], - "710": [0, 0.825, 0, 0, 1.8889], - "732": [0, 0.825, 0, 0, 1.8889], - "770": [0, 0.825, 0, 0, 1.8889], - "771": [0, 0.825, 0, 0, 1.8889], - "8730": [1.25003, 1.75, 0, 0, 1.0], - "8968": [1.25003, 1.75, 0, 0, 0.63889], - "8969": [1.25003, 1.75, 0, 0, 0.63889], - "8970": [1.25003, 1.75, 0, 0, 0.63889], - "8971": [1.25003, 1.75, 0, 0, 0.63889], - "9115": [0.64502, 1.155, 0, 0, 0.875], - "9116": [1e-05, 0.6, 0, 0, 0.875], - "9117": [0.64502, 1.155, 0, 0, 0.875], - "9118": [0.64502, 1.155, 0, 0, 0.875], - "9119": [1e-05, 0.6, 0, 0, 0.875], - "9120": [0.64502, 1.155, 0, 0, 0.875], - "9121": [0.64502, 1.155, 0, 0, 0.66667], - "9122": [-0.00099, 0.601, 0, 0, 0.66667], - "9123": [0.64502, 1.155, 0, 0, 0.66667], - "9124": [0.64502, 1.155, 0, 0, 0.66667], - "9125": [-0.00099, 0.601, 0, 0, 0.66667], - "9126": [0.64502, 1.155, 0, 0, 0.66667], - "9127": [1e-05, 0.9, 0, 0, 0.88889], - "9128": [0.65002, 1.15, 0, 0, 0.88889], - "9129": [0.90001, 0, 0, 0, 0.88889], - "9130": [0, 0.3, 0, 0, 0.88889], - "9131": [1e-05, 0.9, 0, 0, 0.88889], - "9132": [0.65002, 1.15, 0, 0, 0.88889], - "9133": [0.90001, 0, 0, 0, 0.88889], - "9143": [0.88502, 0.915, 0, 0, 1.05556], - "10216": [1.25003, 1.75, 0, 0, 0.80556], - "10217": [1.25003, 1.75, 0, 0, 0.80556], - "57344": [-0.00499, 0.605, 0, 0, 1.05556], - "57345": [-0.00499, 0.605, 0, 0, 1.05556], - "57680": [0, 0.12, 0, 0, 0.45], - "57681": [0, 0.12, 0, 0, 0.45], - "57682": [0, 0.12, 0, 0, 0.45], - "57683": [0, 0.12, 0, 0, 0.45] - }, - "Typewriter-Regular": { - "32": [0, 0, 0, 0, 0.525], - "33": [0, 0.61111, 0, 0, 0.525], - "34": [0, 0.61111, 0, 0, 0.525], - "35": [0, 0.61111, 0, 0, 0.525], - "36": [0.08333, 0.69444, 0, 0, 0.525], - "37": [0.08333, 0.69444, 0, 0, 0.525], - "38": [0, 0.61111, 0, 0, 0.525], - "39": [0, 0.61111, 0, 0, 0.525], - "40": [0.08333, 0.69444, 0, 0, 0.525], - "41": [0.08333, 0.69444, 0, 0, 0.525], - "42": [0, 0.52083, 0, 0, 0.525], - "43": [-0.08056, 0.53055, 0, 0, 0.525], - "44": [0.13889, 0.125, 0, 0, 0.525], - "45": [-0.08056, 0.53055, 0, 0, 0.525], - "46": [0, 0.125, 0, 0, 0.525], - "47": [0.08333, 0.69444, 0, 0, 0.525], - "48": [0, 0.61111, 0, 0, 0.525], - "49": [0, 0.61111, 0, 0, 0.525], - "50": [0, 0.61111, 0, 0, 0.525], - "51": [0, 0.61111, 0, 0, 0.525], - "52": [0, 0.61111, 0, 0, 0.525], - "53": [0, 0.61111, 0, 0, 0.525], - "54": [0, 0.61111, 0, 0, 0.525], - "55": [0, 0.61111, 0, 0, 0.525], - "56": [0, 0.61111, 0, 0, 0.525], - "57": [0, 0.61111, 0, 0, 0.525], - "58": [0, 0.43056, 0, 0, 0.525], - "59": [0.13889, 0.43056, 0, 0, 0.525], - "60": [-0.05556, 0.55556, 0, 0, 0.525], - "61": [-0.19549, 0.41562, 0, 0, 0.525], - "62": [-0.05556, 0.55556, 0, 0, 0.525], - "63": [0, 0.61111, 0, 0, 0.525], - "64": [0, 0.61111, 0, 0, 0.525], - "65": [0, 0.61111, 0, 0, 0.525], - "66": [0, 0.61111, 0, 0, 0.525], - "67": [0, 0.61111, 0, 0, 0.525], - "68": [0, 0.61111, 0, 0, 0.525], - "69": [0, 0.61111, 0, 0, 0.525], - "70": [0, 0.61111, 0, 0, 0.525], - "71": [0, 0.61111, 0, 0, 0.525], - "72": [0, 0.61111, 0, 0, 0.525], - "73": [0, 0.61111, 0, 0, 0.525], - "74": [0, 0.61111, 0, 0, 0.525], - "75": [0, 0.61111, 0, 0, 0.525], - "76": [0, 0.61111, 0, 0, 0.525], - "77": [0, 0.61111, 0, 0, 0.525], - "78": [0, 0.61111, 0, 0, 0.525], - "79": [0, 0.61111, 0, 0, 0.525], - "80": [0, 0.61111, 0, 0, 0.525], - "81": [0.13889, 0.61111, 0, 0, 0.525], - "82": [0, 0.61111, 0, 0, 0.525], - "83": [0, 0.61111, 0, 0, 0.525], - "84": [0, 0.61111, 0, 0, 0.525], - "85": [0, 0.61111, 0, 0, 0.525], - "86": [0, 0.61111, 0, 0, 0.525], - "87": [0, 0.61111, 0, 0, 0.525], - "88": [0, 0.61111, 0, 0, 0.525], - "89": [0, 0.61111, 0, 0, 0.525], - "90": [0, 0.61111, 0, 0, 0.525], - "91": [0.08333, 0.69444, 0, 0, 0.525], - "92": [0.08333, 0.69444, 0, 0, 0.525], - "93": [0.08333, 0.69444, 0, 0, 0.525], - "94": [0, 0.61111, 0, 0, 0.525], - "95": [0.09514, 0, 0, 0, 0.525], - "96": [0, 0.61111, 0, 0, 0.525], - "97": [0, 0.43056, 0, 0, 0.525], - "98": [0, 0.61111, 0, 0, 0.525], - "99": [0, 0.43056, 0, 0, 0.525], - "100": [0, 0.61111, 0, 0, 0.525], - "101": [0, 0.43056, 0, 0, 0.525], - "102": [0, 0.61111, 0, 0, 0.525], - "103": [0.22222, 0.43056, 0, 0, 0.525], - "104": [0, 0.61111, 0, 0, 0.525], - "105": [0, 0.61111, 0, 0, 0.525], - "106": [0.22222, 0.61111, 0, 0, 0.525], - "107": [0, 0.61111, 0, 0, 0.525], - "108": [0, 0.61111, 0, 0, 0.525], - "109": [0, 0.43056, 0, 0, 0.525], - "110": [0, 0.43056, 0, 0, 0.525], - "111": [0, 0.43056, 0, 0, 0.525], - "112": [0.22222, 0.43056, 0, 0, 0.525], - "113": [0.22222, 0.43056, 0, 0, 0.525], - "114": [0, 0.43056, 0, 0, 0.525], - "115": [0, 0.43056, 0, 0, 0.525], - "116": [0, 0.55358, 0, 0, 0.525], - "117": [0, 0.43056, 0, 0, 0.525], - "118": [0, 0.43056, 0, 0, 0.525], - "119": [0, 0.43056, 0, 0, 0.525], - "120": [0, 0.43056, 0, 0, 0.525], - "121": [0.22222, 0.43056, 0, 0, 0.525], - "122": [0, 0.43056, 0, 0, 0.525], - "123": [0.08333, 0.69444, 0, 0, 0.525], - "124": [0.08333, 0.69444, 0, 0, 0.525], - "125": [0.08333, 0.69444, 0, 0, 0.525], - "126": [0, 0.61111, 0, 0, 0.525], - "127": [0, 0.61111, 0, 0, 0.525], - "160": [0, 0, 0, 0, 0.525], - "176": [0, 0.61111, 0, 0, 0.525], - "184": [0.19445, 0, 0, 0, 0.525], - "305": [0, 0.43056, 0, 0, 0.525], - "567": [0.22222, 0.43056, 0, 0, 0.525], - "711": [0, 0.56597, 0, 0, 0.525], - "713": [0, 0.56555, 0, 0, 0.525], - "714": [0, 0.61111, 0, 0, 0.525], - "715": [0, 0.61111, 0, 0, 0.525], - "728": [0, 0.61111, 0, 0, 0.525], - "730": [0, 0.61111, 0, 0, 0.525], - "770": [0, 0.61111, 0, 0, 0.525], - "771": [0, 0.61111, 0, 0, 0.525], - "776": [0, 0.61111, 0, 0, 0.525], - "915": [0, 0.61111, 0, 0, 0.525], - "916": [0, 0.61111, 0, 0, 0.525], - "920": [0, 0.61111, 0, 0, 0.525], - "923": [0, 0.61111, 0, 0, 0.525], - "926": [0, 0.61111, 0, 0, 0.525], - "928": [0, 0.61111, 0, 0, 0.525], - "931": [0, 0.61111, 0, 0, 0.525], - "933": [0, 0.61111, 0, 0, 0.525], - "934": [0, 0.61111, 0, 0, 0.525], - "936": [0, 0.61111, 0, 0, 0.525], - "937": [0, 0.61111, 0, 0, 0.525], - "8216": [0, 0.61111, 0, 0, 0.525], - "8217": [0, 0.61111, 0, 0, 0.525], - "8242": [0, 0.61111, 0, 0, 0.525], - "9251": [0.11111, 0.21944, 0, 0, 0.525] - } -}; - -/** - * This file contains metrics regarding fonts and individual symbols. The sigma - * and xi variables, as well as the metricMap map contain data extracted from - * TeX, TeX font metrics, and the TTF files. These data are then exposed via the - * `metrics` variable and the getCharacterMetrics function. - */ -// In TeX, there are actually three sets of dimensions, one for each of -// textstyle (size index 5 and higher: >=9pt), scriptstyle (size index 3 and 4: -// 7-8pt), and scriptscriptstyle (size index 1 and 2: 5-6pt). These are -// provided in the arrays below, in that order. -// -// The font metrics are stored in fonts cmsy10, cmsy7, and cmsy5 respectively. -// This was determined by running the following script: -// -// latex -interaction=nonstopmode \ -// '\documentclass{article}\usepackage{amsmath}\begin{document}' \ -// '$a$ \expandafter\show\the\textfont2' \ -// '\expandafter\show\the\scriptfont2' \ -// '\expandafter\show\the\scriptscriptfont2' \ -// '\stop' -// -// The metrics themselves were retrieved using the following commands: -// -// tftopl cmsy10 -// tftopl cmsy7 -// tftopl cmsy5 -// -// The output of each of these commands is quite lengthy. The only part we -// care about is the FONTDIMEN section. Each value is measured in EMs. -var sigmasAndXis = { - slant: [0.250, 0.250, 0.250], - // sigma1 - space: [0.000, 0.000, 0.000], - // sigma2 - stretch: [0.000, 0.000, 0.000], - // sigma3 - shrink: [0.000, 0.000, 0.000], - // sigma4 - xHeight: [0.431, 0.431, 0.431], - // sigma5 - quad: [1.000, 1.171, 1.472], - // sigma6 - extraSpace: [0.000, 0.000, 0.000], - // sigma7 - num1: [0.677, 0.732, 0.925], - // sigma8 - num2: [0.394, 0.384, 0.387], - // sigma9 - num3: [0.444, 0.471, 0.504], - // sigma10 - denom1: [0.686, 0.752, 1.025], - // sigma11 - denom2: [0.345, 0.344, 0.532], - // sigma12 - sup1: [0.413, 0.503, 0.504], - // sigma13 - sup2: [0.363, 0.431, 0.404], - // sigma14 - sup3: [0.289, 0.286, 0.294], - // sigma15 - sub1: [0.150, 0.143, 0.200], - // sigma16 - sub2: [0.247, 0.286, 0.400], - // sigma17 - supDrop: [0.386, 0.353, 0.494], - // sigma18 - subDrop: [0.050, 0.071, 0.100], - // sigma19 - delim1: [2.390, 1.700, 1.980], - // sigma20 - delim2: [1.010, 1.157, 1.420], - // sigma21 - axisHeight: [0.250, 0.250, 0.250], - // sigma22 - // These font metrics are extracted from TeX by using tftopl on cmex10.tfm; - // they correspond to the font parameters of the extension fonts (family 3). - // See the TeXbook, page 441. In AMSTeX, the extension fonts scale; to - // match cmex7, we'd use cmex7.tfm values for script and scriptscript - // values. - defaultRuleThickness: [0.04, 0.049, 0.049], - // xi8; cmex7: 0.049 - bigOpSpacing1: [0.111, 0.111, 0.111], - // xi9 - bigOpSpacing2: [0.166, 0.166, 0.166], - // xi10 - bigOpSpacing3: [0.2, 0.2, 0.2], - // xi11 - bigOpSpacing4: [0.6, 0.611, 0.611], - // xi12; cmex7: 0.611 - bigOpSpacing5: [0.1, 0.143, 0.143], - // xi13; cmex7: 0.143 - // The \sqrt rule width is taken from the height of the surd character. - // Since we use the same font at all sizes, this thickness doesn't scale. - sqrtRuleThickness: [0.04, 0.04, 0.04], - // This value determines how large a pt is, for metrics which are defined - // in terms of pts. - // This value is also used in katex.scss; if you change it make sure the - // values match. - ptPerEm: [10.0, 10.0, 10.0], - // The space between adjacent `|` columns in an array definition. From - // `\showthe\doublerulesep` in LaTeX. Equals 2.0 / ptPerEm. - doubleRuleSep: [0.2, 0.2, 0.2], - // The width of separator lines in {array} environments. From - // `\showthe\arrayrulewidth` in LaTeX. Equals 0.4 / ptPerEm. - arrayRuleWidth: [0.04, 0.04, 0.04], - // Two values from LaTeX source2e: - fboxsep: [0.3, 0.3, 0.3], - // 3 pt / ptPerEm - fboxrule: [0.04, 0.04, 0.04] // 0.4 pt / ptPerEm - -}; // This map contains a mapping from font name and character code to character -// should have Latin-1 and Cyrillic characters, but may not depending on the -// operating system. The metrics do not account for extra height from the -// accents. In the case of Cyrillic characters which have both ascenders and -// descenders we prefer approximations with ascenders, primarily to prevent -// the fraction bar or root line from intersecting the glyph. -// TODO(kevinb) allow union of multiple glyph metrics for better accuracy. - -var extraCharacterMap = { - // Latin-1 - 'Å': 'A', - 'Ð': 'D', - 'Þ': 'o', - 'å': 'a', - 'ð': 'd', - 'þ': 'o', - // Cyrillic - 'А': 'A', - 'Б': 'B', - 'В': 'B', - 'Г': 'F', - 'Д': 'A', - 'Е': 'E', - 'Ж': 'K', - 'З': '3', - 'И': 'N', - 'Й': 'N', - 'К': 'K', - 'Л': 'N', - 'М': 'M', - 'Н': 'H', - 'О': 'O', - 'П': 'N', - 'Р': 'P', - 'С': 'C', - 'Т': 'T', - 'У': 'y', - 'Ф': 'O', - 'Х': 'X', - 'Ц': 'U', - 'Ч': 'h', - 'Ш': 'W', - 'Щ': 'W', - 'Ъ': 'B', - 'Ы': 'X', - 'Ь': 'B', - 'Э': '3', - 'Ю': 'X', - 'Я': 'R', - 'а': 'a', - 'б': 'b', - 'в': 'a', - 'г': 'r', - 'д': 'y', - 'е': 'e', - 'ж': 'm', - 'з': 'e', - 'и': 'n', - 'й': 'n', - 'к': 'n', - 'л': 'n', - 'м': 'm', - 'н': 'n', - 'о': 'o', - 'п': 'n', - 'р': 'p', - 'с': 'c', - 'т': 'o', - 'у': 'y', - 'ф': 'b', - 'х': 'x', - 'ц': 'n', - 'ч': 'n', - 'ш': 'w', - 'щ': 'w', - 'ъ': 'a', - 'ы': 'm', - 'ь': 'a', - 'э': 'e', - 'ю': 'm', - 'я': 'r' -}; - -/** - * This function adds new font metrics to default metricMap - * It can also override existing metrics - */ -function setFontMetrics(fontName, metrics) { - fontMetricsData[fontName] = metrics; -} -/** - * This function is a convenience function for looking up information in the - * metricMap table. It takes a character as a string, and a font. - * - * Note: the `width` property may be undefined if fontMetricsData.js wasn't - * built using `Make extended_metrics`. - */ - -function getCharacterMetrics(character, font, mode) { - if (!fontMetricsData[font]) { - throw new Error("Font metrics not found for font: " + font + "."); - } - - var ch = character.charCodeAt(0); - var metrics = fontMetricsData[font][ch]; - - if (!metrics && character[0] in extraCharacterMap) { - ch = extraCharacterMap[character[0]].charCodeAt(0); - metrics = fontMetricsData[font][ch]; - } - - if (!metrics && mode === 'text') { - // We don't typically have font metrics for Asian scripts. - // But since we support them in text mode, we need to return - // some sort of metrics. - // So if the character is in a script we support but we - // don't have metrics for it, just use the metrics for - // the Latin capital letter M. This is close enough because - // we (currently) only care about the height of the glyph - // not its width. - if (supportedCodepoint(ch)) { - metrics = fontMetricsData[font][77]; // 77 is the charcode for 'M' - } - } - - if (metrics) { - return { - depth: metrics[0], - height: metrics[1], - italic: metrics[2], - skew: metrics[3], - width: metrics[4] - }; - } -} -var fontMetricsBySizeIndex = {}; -/** - * Get the font metrics for a given size. - */ - -function getGlobalMetrics(size) { - var sizeIndex; - - if (size >= 5) { - sizeIndex = 0; - } else if (size >= 3) { - sizeIndex = 1; - } else { - sizeIndex = 2; - } - - if (!fontMetricsBySizeIndex[sizeIndex]) { - var metrics = fontMetricsBySizeIndex[sizeIndex] = { - cssEmPerMu: sigmasAndXis.quad[sizeIndex] / 18 - }; - - for (var key in sigmasAndXis) { - if (sigmasAndXis.hasOwnProperty(key)) { - metrics[key] = sigmasAndXis[key][sizeIndex]; - } - } - } - - return fontMetricsBySizeIndex[sizeIndex]; -} - -/** - * This file contains information about the options that the Parser carries - * around with it while parsing. Data is held in an `Options` object, and when - * recursing, a new `Options` object can be created with the `.with*` and - * `.reset` functions. - */ -var sizeStyleMap = [// Each element contains [textsize, scriptsize, scriptscriptsize]. -// The size mappings are taken from TeX with \normalsize=10pt. -[1, 1, 1], // size1: [5, 5, 5] \tiny -[2, 1, 1], // size2: [6, 5, 5] -[3, 1, 1], // size3: [7, 5, 5] \scriptsize -[4, 2, 1], // size4: [8, 6, 5] \footnotesize -[5, 2, 1], // size5: [9, 6, 5] \small -[6, 3, 1], // size6: [10, 7, 5] \normalsize -[7, 4, 2], // size7: [12, 8, 6] \large -[8, 6, 3], // size8: [14.4, 10, 7] \Large -[9, 7, 6], // size9: [17.28, 12, 10] \LARGE -[10, 8, 7], // size10: [20.74, 14.4, 12] \huge -[11, 10, 9] // size11: [24.88, 20.74, 17.28] \HUGE -]; -var sizeMultipliers = [// fontMetrics.js:getGlobalMetrics also uses size indexes, so if -// you change size indexes, change that function. -0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.2, 1.44, 1.728, 2.074, 2.488]; - -var sizeAtStyle = function sizeAtStyle(size, style) { - return style.size < 2 ? size : sizeStyleMap[size - 1][style.size - 1]; -}; // In these types, "" (empty string) means "no change". - - -/** - * This is the main options class. It contains the current style, size, color, - * and font. - * - * Options objects should not be modified. To create a new Options with - * different properties, call a `.having*` method. - */ -class Options { - // A font family applies to a group of fonts (i.e. SansSerif), while a font - // represents a specific font (i.e. SansSerif Bold). - // See: https://tex.stackexchange.com/questions/22350/difference-between-textrm-and-mathrm - - /** - * The base size index. - */ - constructor(data) { - this.style = void 0; - this.color = void 0; - this.size = void 0; - this.textSize = void 0; - this.phantom = void 0; - this.font = void 0; - this.fontFamily = void 0; - this.fontWeight = void 0; - this.fontShape = void 0; - this.sizeMultiplier = void 0; - this.maxSize = void 0; - this.minRuleThickness = void 0; - this._fontMetrics = void 0; - this.style = data.style; - this.color = data.color; - this.size = data.size || Options.BASESIZE; - this.textSize = data.textSize || this.size; - this.phantom = !!data.phantom; - this.font = data.font || ""; - this.fontFamily = data.fontFamily || ""; - this.fontWeight = data.fontWeight || ''; - this.fontShape = data.fontShape || ''; - this.sizeMultiplier = sizeMultipliers[this.size - 1]; - this.maxSize = data.maxSize; - this.minRuleThickness = data.minRuleThickness; - this._fontMetrics = undefined; - } - /** - * Returns a new options object with the same properties as "this". Properties - * from "extension" will be copied to the new options object. - */ - - - extend(extension) { - var data = { - style: this.style, - size: this.size, - textSize: this.textSize, - color: this.color, - phantom: this.phantom, - font: this.font, - fontFamily: this.fontFamily, - fontWeight: this.fontWeight, - fontShape: this.fontShape, - maxSize: this.maxSize, - minRuleThickness: this.minRuleThickness - }; - - for (var key in extension) { - if (extension.hasOwnProperty(key)) { - data[key] = extension[key]; - } - } - - return new Options(data); - } - /** - * Return an options object with the given style. If `this.style === style`, - * returns `this`. - */ - - - havingStyle(style) { - if (this.style === style) { - return this; - } else { - return this.extend({ - style: style, - size: sizeAtStyle(this.textSize, style) - }); - } - } - /** - * Return an options object with a cramped version of the current style. If - * the current style is cramped, returns `this`. - */ - - - havingCrampedStyle() { - return this.havingStyle(this.style.cramp()); - } - /** - * Return an options object with the given size and in at least `\textstyle`. - * Returns `this` if appropriate. - */ - - - havingSize(size) { - if (this.size === size && this.textSize === size) { - return this; - } else { - return this.extend({ - style: this.style.text(), - size: size, - textSize: size, - sizeMultiplier: sizeMultipliers[size - 1] - }); - } - } - /** - * Like `this.havingSize(BASESIZE).havingStyle(style)`. If `style` is omitted, - * changes to at least `\textstyle`. - */ - - - havingBaseStyle(style) { - style = style || this.style.text(); - var wantSize = sizeAtStyle(Options.BASESIZE, style); - - if (this.size === wantSize && this.textSize === Options.BASESIZE && this.style === style) { - return this; - } else { - return this.extend({ - style: style, - size: wantSize - }); - } - } - /** - * Remove the effect of sizing changes such as \Huge. - * Keep the effect of the current style, such as \scriptstyle. - */ - - - havingBaseSizing() { - var size; - - switch (this.style.id) { - case 4: - case 5: - size = 3; // normalsize in scriptstyle - - break; - - case 6: - case 7: - size = 1; // normalsize in scriptscriptstyle - - break; - - default: - size = 6; - // normalsize in textstyle or displaystyle - } - - return this.extend({ - style: this.style.text(), - size: size - }); - } - /** - * Create a new options object with the given color. - */ - - - withColor(color) { - return this.extend({ - color: color - }); - } - /** - * Create a new options object with "phantom" set to true. - */ - - - withPhantom() { - return this.extend({ - phantom: true - }); - } - /** - * Creates a new options object with the given math font or old text font. - * @type {[type]} - */ - - - withFont(font) { - return this.extend({ - font - }); - } - /** - * Create a new options objects with the given fontFamily. - */ - - - withTextFontFamily(fontFamily) { - return this.extend({ - fontFamily, - font: "" - }); - } - /** - * Creates a new options object with the given font weight - */ - - - withTextFontWeight(fontWeight) { - return this.extend({ - fontWeight, - font: "" - }); - } - /** - * Creates a new options object with the given font weight - */ - - - withTextFontShape(fontShape) { - return this.extend({ - fontShape, - font: "" - }); - } - /** - * Return the CSS sizing classes required to switch from enclosing options - * `oldOptions` to `this`. Returns an array of classes. - */ - - - sizingClasses(oldOptions) { - if (oldOptions.size !== this.size) { - return ["sizing", "reset-size" + oldOptions.size, "size" + this.size]; - } else { - return []; - } - } - /** - * Return the CSS sizing classes required to switch to the base size. Like - * `this.havingSize(BASESIZE).sizingClasses(this)`. - */ - - - baseSizingClasses() { - if (this.size !== Options.BASESIZE) { - return ["sizing", "reset-size" + this.size, "size" + Options.BASESIZE]; - } else { - return []; - } - } - /** - * Return the font metrics for this size. - */ - - - fontMetrics() { - if (!this._fontMetrics) { - this._fontMetrics = getGlobalMetrics(this.size); - } - - return this._fontMetrics; - } - /** - * Gets the CSS color of the current options object - */ - - - getColor() { - if (this.phantom) { - return "transparent"; - } else { - return this.color; - } - } - -} - -Options.BASESIZE = 6; - -/** - * This file does conversion between units. In particular, it provides - * calculateSize to convert other units into ems. - */ -// Thus, multiplying a length by this number converts the length from units -// into pts. Dividing the result by ptPerEm gives the number of ems -// *assuming* a font size of ptPerEm (normal size, normal style). - -var ptPerUnit = { - // https://en.wikibooks.org/wiki/LaTeX/Lengths and - // https://tex.stackexchange.com/a/8263 - "pt": 1, - // TeX point - "mm": 7227 / 2540, - // millimeter - "cm": 7227 / 254, - // centimeter - "in": 72.27, - // inch - "bp": 803 / 800, - // big (PostScript) points - "pc": 12, - // pica - "dd": 1238 / 1157, - // didot - "cc": 14856 / 1157, - // cicero (12 didot) - "nd": 685 / 642, - // new didot - "nc": 1370 / 107, - // new cicero (12 new didot) - "sp": 1 / 65536, - // scaled point (TeX's internal smallest unit) - // https://tex.stackexchange.com/a/41371 - "px": 803 / 800 // \pdfpxdimen defaults to 1 bp in pdfTeX and LuaTeX - -}; // Dictionary of relative units, for fast validity testing. - -var relativeUnit = { - "ex": true, - "em": true, - "mu": true -}; - -/** - * Determine whether the specified unit (either a string defining the unit - * or a "size" parse node containing a unit field) is valid. - */ -var validUnit = function validUnit(unit) { - if (typeof unit !== "string") { - unit = unit.unit; - } - - return unit in ptPerUnit || unit in relativeUnit || unit === "ex"; -}; -/* - * Convert a "size" parse node (with numeric "number" and string "unit" fields, - * as parsed by functions.js argType "size") into a CSS em value for the - * current style/scale. `options` gives the current options. - */ - -var calculateSize = function calculateSize(sizeValue, options) { - var scale; - - if (sizeValue.unit in ptPerUnit) { - // Absolute units - scale = ptPerUnit[sizeValue.unit] // Convert unit to pt - / options.fontMetrics().ptPerEm // Convert pt to CSS em - / options.sizeMultiplier; // Unscale to make absolute units - } else if (sizeValue.unit === "mu") { - // `mu` units scale with scriptstyle/scriptscriptstyle. - scale = options.fontMetrics().cssEmPerMu; - } else { - // Other relative units always refer to the *textstyle* font - // in the current size. - var unitOptions; - - if (options.style.isTight()) { - // isTight() means current style is script/scriptscript. - unitOptions = options.havingStyle(options.style.text()); - } else { - unitOptions = options; - } // TODO: In TeX these units are relative to the quad of the current - // *text* font, e.g. cmr10. KaTeX instead uses values from the - // comparably-sized *Computer Modern symbol* font. At 10pt, these - // match. At 7pt and 5pt, they differ: cmr7=1.138894, cmsy7=1.170641; - // cmr5=1.361133, cmsy5=1.472241. Consider $\scriptsize a\kern1emb$. - // TeX \showlists shows a kern of 1.13889 * fontsize; - // KaTeX shows a kern of 1.171 * fontsize. - - - if (sizeValue.unit === "ex") { - scale = unitOptions.fontMetrics().xHeight; - } else if (sizeValue.unit === "em") { - scale = unitOptions.fontMetrics().quad; - } else { - throw new ParseError("Invalid unit: '" + sizeValue.unit + "'"); - } - - if (unitOptions !== options) { - scale *= unitOptions.sizeMultiplier / options.sizeMultiplier; - } - } - - return Math.min(sizeValue.number * scale, options.maxSize); -}; -/** - * Round `n` to 4 decimal places, or to the nearest 1/10,000th em. See - * https://github.com/KaTeX/KaTeX/pull/2460. - */ - -var makeEm = function makeEm(n) { - return +n.toFixed(4) + "em"; -}; - -/** - * These objects store the data about the DOM nodes we create, as well as some - * extra data. They can then be transformed into real DOM nodes with the - * `toNode` function or HTML markup using `toMarkup`. They are useful for both - * storing extra properties on the nodes, as well as providing a way to easily - * work with the DOM. - * - * Similar functions for working with MathML nodes exist in mathMLTree.js. - * - * TODO: refactor `span` and `anchor` into common superclass when - * target environments support class inheritance - */ - -/** - * Create an HTML className based on a list of classes. In addition to joining - * with spaces, we also remove empty classes. - */ -var createClass = function createClass(classes) { - return classes.filter(cls => cls).join(" "); -}; - -var initNode = function initNode(classes, options, style) { - this.classes = classes || []; - this.attributes = {}; - this.height = 0; - this.depth = 0; - this.maxFontSize = 0; - this.style = style || {}; - - if (options) { - if (options.style.isTight()) { - this.classes.push("mtight"); - } - - var color = options.getColor(); - - if (color) { - this.style.color = color; - } - } -}; -/** - * Convert into an HTML node - */ - - -var toNode = function toNode(tagName) { - var node = document.createElement(tagName); // Apply the class - - node.className = createClass(this.classes); // Apply inline styles - - for (var style in this.style) { - if (this.style.hasOwnProperty(style)) { - // $FlowFixMe Flow doesn't seem to understand span.style's type. - node.style[style] = this.style[style]; - } - } // Apply attributes - - - for (var attr in this.attributes) { - if (this.attributes.hasOwnProperty(attr)) { - node.setAttribute(attr, this.attributes[attr]); - } - } // Append the children, also as HTML nodes - - - for (var i = 0; i < this.children.length; i++) { - node.appendChild(this.children[i].toNode()); - } - - return node; -}; -/** - * Convert into an HTML markup string - */ - - -var toMarkup = function toMarkup(tagName) { - var markup = "<" + tagName; // Add the class - - if (this.classes.length) { - markup += " class=\"" + utils.escape(createClass(this.classes)) + "\""; - } - - var styles = ""; // Add the styles, after hyphenation - - for (var style in this.style) { - if (this.style.hasOwnProperty(style)) { - styles += utils.hyphenate(style) + ":" + this.style[style] + ";"; - } - } - - if (styles) { - markup += " style=\"" + utils.escape(styles) + "\""; - } // Add the attributes - - - for (var attr in this.attributes) { - if (this.attributes.hasOwnProperty(attr)) { - markup += " " + attr + "=\"" + utils.escape(this.attributes[attr]) + "\""; - } - } - - markup += ">"; // Add the markup of the children, also as markup - - for (var i = 0; i < this.children.length; i++) { - markup += this.children[i].toMarkup(); - } - - markup += ""; - return markup; -}; // Making the type below exact with all optional fields doesn't work due to -// - https://github.com/facebook/flow/issues/4582 -// - https://github.com/facebook/flow/issues/5688 -// However, since *all* fields are optional, $Shape<> works as suggested in 5688 -// above. -// This type does not include all CSS properties. Additional properties should -// be added as needed. - - -/** - * This node represents a span node, with a className, a list of children, and - * an inline style. It also contains information about its height, depth, and - * maxFontSize. - * - * Represents two types with different uses: SvgSpan to wrap an SVG and DomSpan - * otherwise. This typesafety is important when HTML builders access a span's - * children. - */ -class Span { - constructor(classes, children, options, style) { - this.children = void 0; - this.attributes = void 0; - this.classes = void 0; - this.height = void 0; - this.depth = void 0; - this.width = void 0; - this.maxFontSize = void 0; - this.style = void 0; - initNode.call(this, classes, options, style); - this.children = children || []; - } - /** - * Sets an arbitrary attribute on the span. Warning: use this wisely. Not - * all browsers support attributes the same, and having too many custom - * attributes is probably bad. - */ - - - setAttribute(attribute, value) { - this.attributes[attribute] = value; - } - - hasClass(className) { - return utils.contains(this.classes, className); - } - - toNode() { - return toNode.call(this, "span"); - } - - toMarkup() { - return toMarkup.call(this, "span"); - } - -} -/** - * This node represents an anchor () element with a hyperlink. See `span` - * for further details. - */ - -class Anchor { - constructor(href, classes, children, options) { - this.children = void 0; - this.attributes = void 0; - this.classes = void 0; - this.height = void 0; - this.depth = void 0; - this.maxFontSize = void 0; - this.style = void 0; - initNode.call(this, classes, options); - this.children = children || []; - this.setAttribute('href', href); - } - - setAttribute(attribute, value) { - this.attributes[attribute] = value; - } - - hasClass(className) { - return utils.contains(this.classes, className); - } - - toNode() { - return toNode.call(this, "a"); - } - - toMarkup() { - return toMarkup.call(this, "a"); - } - -} -/** - * This node represents an image embed () element. - */ - -class Img { - constructor(src, alt, style) { - this.src = void 0; - this.alt = void 0; - this.classes = void 0; - this.height = void 0; - this.depth = void 0; - this.maxFontSize = void 0; - this.style = void 0; - this.alt = alt; - this.src = src; - this.classes = ["mord"]; - this.style = style; - } - - hasClass(className) { - return utils.contains(this.classes, className); - } - - toNode() { - var node = document.createElement("img"); - node.src = this.src; - node.alt = this.alt; - node.className = "mord"; // Apply inline styles - - for (var style in this.style) { - if (this.style.hasOwnProperty(style)) { - // $FlowFixMe - node.style[style] = this.style[style]; - } - } - - return node; - } - - toMarkup() { - var markup = "\"" 0) { - span = document.createElement("span"); - span.style.marginRight = makeEm(this.italic); - } - - if (this.classes.length > 0) { - span = span || document.createElement("span"); - span.className = createClass(this.classes); - } - - for (var style in this.style) { - if (this.style.hasOwnProperty(style)) { - span = span || document.createElement("span"); // $FlowFixMe Flow doesn't seem to understand span.style's type. - - span.style[style] = this.style[style]; - } - } - - if (span) { - span.appendChild(node); - return span; - } else { - return node; - } - } - /** - * Creates markup for a symbol node. - */ - - - toMarkup() { - // TODO(alpert): More duplication than I'd like from - // span.prototype.toMarkup and symbolNode.prototype.toNode... - var needsSpan = false; - var markup = " 0) { - styles += "margin-right:" + this.italic + "em;"; - } - - for (var style in this.style) { - if (this.style.hasOwnProperty(style)) { - styles += utils.hyphenate(style) + ":" + this.style[style] + ";"; - } - } - - if (styles) { - needsSpan = true; - markup += " style=\"" + utils.escape(styles) + "\""; - } - - var escaped = utils.escape(this.text); - - if (needsSpan) { - markup += ">"; - markup += escaped; - markup += ""; - return markup; - } else { - return escaped; - } - } - -} -/** - * SVG nodes are used to render stretchy wide elements. - */ - -class SvgNode { - constructor(children, attributes) { - this.children = void 0; - this.attributes = void 0; - this.children = children || []; - this.attributes = attributes || {}; - } - - toNode() { - var svgNS = "http://www.w3.org/2000/svg"; - var node = document.createElementNS(svgNS, "svg"); // Apply attributes - - for (var attr in this.attributes) { - if (Object.prototype.hasOwnProperty.call(this.attributes, attr)) { - node.setAttribute(attr, this.attributes[attr]); - } - } - - for (var i = 0; i < this.children.length; i++) { - node.appendChild(this.children[i].toNode()); - } - - return node; - } - - toMarkup() { - var markup = ""; - } else { - return ""; - } - } - -} -class LineNode { - constructor(attributes) { - this.attributes = void 0; - this.attributes = attributes || {}; - } - - toNode() { - var svgNS = "http://www.w3.org/2000/svg"; - var node = document.createElementNS(svgNS, "line"); // Apply attributes - - for (var attr in this.attributes) { - if (Object.prototype.hasOwnProperty.call(this.attributes, attr)) { - node.setAttribute(attr, this.attributes[attr]); - } - } - - return node; - } - - toMarkup() { - var markup = " but got " + String(group) + "."); - } -} - -/** - * This file holds a list of all no-argument functions and single-character - * symbols (like 'a' or ';'). - * - * For each of the symbols, there are three properties they can have: - * - font (required): the font to be used for this symbol. Either "main" (the - normal font), or "ams" (the ams fonts). - * - group (required): the ParseNode group type the symbol should have (i.e. - "textord", "mathord", etc). - See https://github.com/KaTeX/KaTeX/wiki/Examining-TeX#group-types - * - replace: the character that this symbol or function should be - * replaced with (i.e. "\phi" has a replace value of "\u03d5", the phi - * character in the main font). - * - * The outermost map in the table indicates what mode the symbols should be - * accepted in (e.g. "math" or "text"). - */ -// Some of these have a "-token" suffix since these are also used as `ParseNode` -// types for raw text tokens, and we want to avoid conflicts with higher-level -// `ParseNode` types. These `ParseNode`s are constructed within `Parser` by -// looking up the `symbols` map. -var ATOMS = { - "bin": 1, - "close": 1, - "inner": 1, - "open": 1, - "punct": 1, - "rel": 1 -}; -var NON_ATOMS = { - "accent-token": 1, - "mathord": 1, - "op-token": 1, - "spacing": 1, - "textord": 1 -}; -var symbols = { - "math": {}, - "text": {} -}; -/** `acceptUnicodeChar = true` is only applicable if `replace` is set. */ - -function defineSymbol(mode, font, group, replace, name, acceptUnicodeChar) { - symbols[mode][name] = { - font, - group, - replace - }; - - if (acceptUnicodeChar && replace) { - symbols[mode][replace] = symbols[mode][name]; - } -} // Some abbreviations for commonly used strings. -// This helps minify the code, and also spotting typos using jshint. -// modes: - -var math = "math"; -var text = "text"; // fonts: - -var main = "main"; -var ams = "ams"; // groups: - -var accent = "accent-token"; -var bin = "bin"; -var close = "close"; -var inner = "inner"; -var mathord = "mathord"; -var op = "op-token"; -var open = "open"; -var punct = "punct"; -var rel = "rel"; -var spacing = "spacing"; -var textord = "textord"; // Now comes the symbol table -// Relation Symbols - -defineSymbol(math, main, rel, "\u2261", "\\equiv", true); -defineSymbol(math, main, rel, "\u227a", "\\prec", true); -defineSymbol(math, main, rel, "\u227b", "\\succ", true); -defineSymbol(math, main, rel, "\u223c", "\\sim", true); -defineSymbol(math, main, rel, "\u22a5", "\\perp"); -defineSymbol(math, main, rel, "\u2aaf", "\\preceq", true); -defineSymbol(math, main, rel, "\u2ab0", "\\succeq", true); -defineSymbol(math, main, rel, "\u2243", "\\simeq", true); -defineSymbol(math, main, rel, "\u2223", "\\mid", true); -defineSymbol(math, main, rel, "\u226a", "\\ll", true); -defineSymbol(math, main, rel, "\u226b", "\\gg", true); -defineSymbol(math, main, rel, "\u224d", "\\asymp", true); -defineSymbol(math, main, rel, "\u2225", "\\parallel"); -defineSymbol(math, main, rel, "\u22c8", "\\bowtie", true); -defineSymbol(math, main, rel, "\u2323", "\\smile", true); -defineSymbol(math, main, rel, "\u2291", "\\sqsubseteq", true); -defineSymbol(math, main, rel, "\u2292", "\\sqsupseteq", true); -defineSymbol(math, main, rel, "\u2250", "\\doteq", true); -defineSymbol(math, main, rel, "\u2322", "\\frown", true); -defineSymbol(math, main, rel, "\u220b", "\\ni", true); -defineSymbol(math, main, rel, "\u221d", "\\propto", true); -defineSymbol(math, main, rel, "\u22a2", "\\vdash", true); -defineSymbol(math, main, rel, "\u22a3", "\\dashv", true); -defineSymbol(math, main, rel, "\u220b", "\\owns"); // Punctuation - -defineSymbol(math, main, punct, "\u002e", "\\ldotp"); -defineSymbol(math, main, punct, "\u22c5", "\\cdotp"); // Misc Symbols - -defineSymbol(math, main, textord, "\u0023", "\\#"); -defineSymbol(text, main, textord, "\u0023", "\\#"); -defineSymbol(math, main, textord, "\u0026", "\\&"); -defineSymbol(text, main, textord, "\u0026", "\\&"); -defineSymbol(math, main, textord, "\u2135", "\\aleph", true); -defineSymbol(math, main, textord, "\u2200", "\\forall", true); -defineSymbol(math, main, textord, "\u210f", "\\hbar", true); -defineSymbol(math, main, textord, "\u2203", "\\exists", true); -defineSymbol(math, main, textord, "\u2207", "\\nabla", true); -defineSymbol(math, main, textord, "\u266d", "\\flat", true); -defineSymbol(math, main, textord, "\u2113", "\\ell", true); -defineSymbol(math, main, textord, "\u266e", "\\natural", true); -defineSymbol(math, main, textord, "\u2663", "\\clubsuit", true); -defineSymbol(math, main, textord, "\u2118", "\\wp", true); -defineSymbol(math, main, textord, "\u266f", "\\sharp", true); -defineSymbol(math, main, textord, "\u2662", "\\diamondsuit", true); -defineSymbol(math, main, textord, "\u211c", "\\Re", true); -defineSymbol(math, main, textord, "\u2661", "\\heartsuit", true); -defineSymbol(math, main, textord, "\u2111", "\\Im", true); -defineSymbol(math, main, textord, "\u2660", "\\spadesuit", true); -defineSymbol(math, main, textord, "\u00a7", "\\S", true); -defineSymbol(text, main, textord, "\u00a7", "\\S"); -defineSymbol(math, main, textord, "\u00b6", "\\P", true); -defineSymbol(text, main, textord, "\u00b6", "\\P"); // Math and Text - -defineSymbol(math, main, textord, "\u2020", "\\dag"); -defineSymbol(text, main, textord, "\u2020", "\\dag"); -defineSymbol(text, main, textord, "\u2020", "\\textdagger"); -defineSymbol(math, main, textord, "\u2021", "\\ddag"); -defineSymbol(text, main, textord, "\u2021", "\\ddag"); -defineSymbol(text, main, textord, "\u2021", "\\textdaggerdbl"); // Large Delimiters - -defineSymbol(math, main, close, "\u23b1", "\\rmoustache", true); -defineSymbol(math, main, open, "\u23b0", "\\lmoustache", true); -defineSymbol(math, main, close, "\u27ef", "\\rgroup", true); -defineSymbol(math, main, open, "\u27ee", "\\lgroup", true); // Binary Operators - -defineSymbol(math, main, bin, "\u2213", "\\mp", true); -defineSymbol(math, main, bin, "\u2296", "\\ominus", true); -defineSymbol(math, main, bin, "\u228e", "\\uplus", true); -defineSymbol(math, main, bin, "\u2293", "\\sqcap", true); -defineSymbol(math, main, bin, "\u2217", "\\ast"); -defineSymbol(math, main, bin, "\u2294", "\\sqcup", true); -defineSymbol(math, main, bin, "\u25ef", "\\bigcirc", true); -defineSymbol(math, main, bin, "\u2219", "\\bullet", true); -defineSymbol(math, main, bin, "\u2021", "\\ddagger"); -defineSymbol(math, main, bin, "\u2240", "\\wr", true); -defineSymbol(math, main, bin, "\u2a3f", "\\amalg"); -defineSymbol(math, main, bin, "\u0026", "\\And"); // from amsmath -// Arrow Symbols - -defineSymbol(math, main, rel, "\u27f5", "\\longleftarrow", true); -defineSymbol(math, main, rel, "\u21d0", "\\Leftarrow", true); -defineSymbol(math, main, rel, "\u27f8", "\\Longleftarrow", true); -defineSymbol(math, main, rel, "\u27f6", "\\longrightarrow", true); -defineSymbol(math, main, rel, "\u21d2", "\\Rightarrow", true); -defineSymbol(math, main, rel, "\u27f9", "\\Longrightarrow", true); -defineSymbol(math, main, rel, "\u2194", "\\leftrightarrow", true); -defineSymbol(math, main, rel, "\u27f7", "\\longleftrightarrow", true); -defineSymbol(math, main, rel, "\u21d4", "\\Leftrightarrow", true); -defineSymbol(math, main, rel, "\u27fa", "\\Longleftrightarrow", true); -defineSymbol(math, main, rel, "\u21a6", "\\mapsto", true); -defineSymbol(math, main, rel, "\u27fc", "\\longmapsto", true); -defineSymbol(math, main, rel, "\u2197", "\\nearrow", true); -defineSymbol(math, main, rel, "\u21a9", "\\hookleftarrow", true); -defineSymbol(math, main, rel, "\u21aa", "\\hookrightarrow", true); -defineSymbol(math, main, rel, "\u2198", "\\searrow", true); -defineSymbol(math, main, rel, "\u21bc", "\\leftharpoonup", true); -defineSymbol(math, main, rel, "\u21c0", "\\rightharpoonup", true); -defineSymbol(math, main, rel, "\u2199", "\\swarrow", true); -defineSymbol(math, main, rel, "\u21bd", "\\leftharpoondown", true); -defineSymbol(math, main, rel, "\u21c1", "\\rightharpoondown", true); -defineSymbol(math, main, rel, "\u2196", "\\nwarrow", true); -defineSymbol(math, main, rel, "\u21cc", "\\rightleftharpoons", true); // AMS Negated Binary Relations - -defineSymbol(math, ams, rel, "\u226e", "\\nless", true); // Symbol names preceded by "@" each have a corresponding macro. - -defineSymbol(math, ams, rel, "\ue010", "\\@nleqslant"); -defineSymbol(math, ams, rel, "\ue011", "\\@nleqq"); -defineSymbol(math, ams, rel, "\u2a87", "\\lneq", true); -defineSymbol(math, ams, rel, "\u2268", "\\lneqq", true); -defineSymbol(math, ams, rel, "\ue00c", "\\@lvertneqq"); -defineSymbol(math, ams, rel, "\u22e6", "\\lnsim", true); -defineSymbol(math, ams, rel, "\u2a89", "\\lnapprox", true); -defineSymbol(math, ams, rel, "\u2280", "\\nprec", true); // unicode-math maps \u22e0 to \npreccurlyeq. We'll use the AMS synonym. - -defineSymbol(math, ams, rel, "\u22e0", "\\npreceq", true); -defineSymbol(math, ams, rel, "\u22e8", "\\precnsim", true); -defineSymbol(math, ams, rel, "\u2ab9", "\\precnapprox", true); -defineSymbol(math, ams, rel, "\u2241", "\\nsim", true); -defineSymbol(math, ams, rel, "\ue006", "\\@nshortmid"); -defineSymbol(math, ams, rel, "\u2224", "\\nmid", true); -defineSymbol(math, ams, rel, "\u22ac", "\\nvdash", true); -defineSymbol(math, ams, rel, "\u22ad", "\\nvDash", true); -defineSymbol(math, ams, rel, "\u22ea", "\\ntriangleleft"); -defineSymbol(math, ams, rel, "\u22ec", "\\ntrianglelefteq", true); -defineSymbol(math, ams, rel, "\u228a", "\\subsetneq", true); -defineSymbol(math, ams, rel, "\ue01a", "\\@varsubsetneq"); -defineSymbol(math, ams, rel, "\u2acb", "\\subsetneqq", true); -defineSymbol(math, ams, rel, "\ue017", "\\@varsubsetneqq"); -defineSymbol(math, ams, rel, "\u226f", "\\ngtr", true); -defineSymbol(math, ams, rel, "\ue00f", "\\@ngeqslant"); -defineSymbol(math, ams, rel, "\ue00e", "\\@ngeqq"); -defineSymbol(math, ams, rel, "\u2a88", "\\gneq", true); -defineSymbol(math, ams, rel, "\u2269", "\\gneqq", true); -defineSymbol(math, ams, rel, "\ue00d", "\\@gvertneqq"); -defineSymbol(math, ams, rel, "\u22e7", "\\gnsim", true); -defineSymbol(math, ams, rel, "\u2a8a", "\\gnapprox", true); -defineSymbol(math, ams, rel, "\u2281", "\\nsucc", true); // unicode-math maps \u22e1 to \nsucccurlyeq. We'll use the AMS synonym. - -defineSymbol(math, ams, rel, "\u22e1", "\\nsucceq", true); -defineSymbol(math, ams, rel, "\u22e9", "\\succnsim", true); -defineSymbol(math, ams, rel, "\u2aba", "\\succnapprox", true); // unicode-math maps \u2246 to \simneqq. We'll use the AMS synonym. - -defineSymbol(math, ams, rel, "\u2246", "\\ncong", true); -defineSymbol(math, ams, rel, "\ue007", "\\@nshortparallel"); -defineSymbol(math, ams, rel, "\u2226", "\\nparallel", true); -defineSymbol(math, ams, rel, "\u22af", "\\nVDash", true); -defineSymbol(math, ams, rel, "\u22eb", "\\ntriangleright"); -defineSymbol(math, ams, rel, "\u22ed", "\\ntrianglerighteq", true); -defineSymbol(math, ams, rel, "\ue018", "\\@nsupseteqq"); -defineSymbol(math, ams, rel, "\u228b", "\\supsetneq", true); -defineSymbol(math, ams, rel, "\ue01b", "\\@varsupsetneq"); -defineSymbol(math, ams, rel, "\u2acc", "\\supsetneqq", true); -defineSymbol(math, ams, rel, "\ue019", "\\@varsupsetneqq"); -defineSymbol(math, ams, rel, "\u22ae", "\\nVdash", true); -defineSymbol(math, ams, rel, "\u2ab5", "\\precneqq", true); -defineSymbol(math, ams, rel, "\u2ab6", "\\succneqq", true); -defineSymbol(math, ams, rel, "\ue016", "\\@nsubseteqq"); -defineSymbol(math, ams, bin, "\u22b4", "\\unlhd"); -defineSymbol(math, ams, bin, "\u22b5", "\\unrhd"); // AMS Negated Arrows - -defineSymbol(math, ams, rel, "\u219a", "\\nleftarrow", true); -defineSymbol(math, ams, rel, "\u219b", "\\nrightarrow", true); -defineSymbol(math, ams, rel, "\u21cd", "\\nLeftarrow", true); -defineSymbol(math, ams, rel, "\u21cf", "\\nRightarrow", true); -defineSymbol(math, ams, rel, "\u21ae", "\\nleftrightarrow", true); -defineSymbol(math, ams, rel, "\u21ce", "\\nLeftrightarrow", true); // AMS Misc - -defineSymbol(math, ams, rel, "\u25b3", "\\vartriangle"); -defineSymbol(math, ams, textord, "\u210f", "\\hslash"); -defineSymbol(math, ams, textord, "\u25bd", "\\triangledown"); -defineSymbol(math, ams, textord, "\u25ca", "\\lozenge"); -defineSymbol(math, ams, textord, "\u24c8", "\\circledS"); -defineSymbol(math, ams, textord, "\u00ae", "\\circledR"); -defineSymbol(text, ams, textord, "\u00ae", "\\circledR"); -defineSymbol(math, ams, textord, "\u2221", "\\measuredangle", true); -defineSymbol(math, ams, textord, "\u2204", "\\nexists"); -defineSymbol(math, ams, textord, "\u2127", "\\mho"); -defineSymbol(math, ams, textord, "\u2132", "\\Finv", true); -defineSymbol(math, ams, textord, "\u2141", "\\Game", true); -defineSymbol(math, ams, textord, "\u2035", "\\backprime"); -defineSymbol(math, ams, textord, "\u25b2", "\\blacktriangle"); -defineSymbol(math, ams, textord, "\u25bc", "\\blacktriangledown"); -defineSymbol(math, ams, textord, "\u25a0", "\\blacksquare"); -defineSymbol(math, ams, textord, "\u29eb", "\\blacklozenge"); -defineSymbol(math, ams, textord, "\u2605", "\\bigstar"); -defineSymbol(math, ams, textord, "\u2222", "\\sphericalangle", true); -defineSymbol(math, ams, textord, "\u2201", "\\complement", true); // unicode-math maps U+F0 to \matheth. We map to AMS function \eth - -defineSymbol(math, ams, textord, "\u00f0", "\\eth", true); -defineSymbol(text, main, textord, "\u00f0", "\u00f0"); -defineSymbol(math, ams, textord, "\u2571", "\\diagup"); -defineSymbol(math, ams, textord, "\u2572", "\\diagdown"); -defineSymbol(math, ams, textord, "\u25a1", "\\square"); -defineSymbol(math, ams, textord, "\u25a1", "\\Box"); -defineSymbol(math, ams, textord, "\u25ca", "\\Diamond"); // unicode-math maps U+A5 to \mathyen. We map to AMS function \yen - -defineSymbol(math, ams, textord, "\u00a5", "\\yen", true); -defineSymbol(text, ams, textord, "\u00a5", "\\yen", true); -defineSymbol(math, ams, textord, "\u2713", "\\checkmark", true); -defineSymbol(text, ams, textord, "\u2713", "\\checkmark"); // AMS Hebrew - -defineSymbol(math, ams, textord, "\u2136", "\\beth", true); -defineSymbol(math, ams, textord, "\u2138", "\\daleth", true); -defineSymbol(math, ams, textord, "\u2137", "\\gimel", true); // AMS Greek - -defineSymbol(math, ams, textord, "\u03dd", "\\digamma", true); -defineSymbol(math, ams, textord, "\u03f0", "\\varkappa"); // AMS Delimiters - -defineSymbol(math, ams, open, "\u250c", "\\@ulcorner", true); -defineSymbol(math, ams, close, "\u2510", "\\@urcorner", true); -defineSymbol(math, ams, open, "\u2514", "\\@llcorner", true); -defineSymbol(math, ams, close, "\u2518", "\\@lrcorner", true); // AMS Binary Relations - -defineSymbol(math, ams, rel, "\u2266", "\\leqq", true); -defineSymbol(math, ams, rel, "\u2a7d", "\\leqslant", true); -defineSymbol(math, ams, rel, "\u2a95", "\\eqslantless", true); -defineSymbol(math, ams, rel, "\u2272", "\\lesssim", true); -defineSymbol(math, ams, rel, "\u2a85", "\\lessapprox", true); -defineSymbol(math, ams, rel, "\u224a", "\\approxeq", true); -defineSymbol(math, ams, bin, "\u22d6", "\\lessdot"); -defineSymbol(math, ams, rel, "\u22d8", "\\lll", true); -defineSymbol(math, ams, rel, "\u2276", "\\lessgtr", true); -defineSymbol(math, ams, rel, "\u22da", "\\lesseqgtr", true); -defineSymbol(math, ams, rel, "\u2a8b", "\\lesseqqgtr", true); -defineSymbol(math, ams, rel, "\u2251", "\\doteqdot"); -defineSymbol(math, ams, rel, "\u2253", "\\risingdotseq", true); -defineSymbol(math, ams, rel, "\u2252", "\\fallingdotseq", true); -defineSymbol(math, ams, rel, "\u223d", "\\backsim", true); -defineSymbol(math, ams, rel, "\u22cd", "\\backsimeq", true); -defineSymbol(math, ams, rel, "\u2ac5", "\\subseteqq", true); -defineSymbol(math, ams, rel, "\u22d0", "\\Subset", true); -defineSymbol(math, ams, rel, "\u228f", "\\sqsubset", true); -defineSymbol(math, ams, rel, "\u227c", "\\preccurlyeq", true); -defineSymbol(math, ams, rel, "\u22de", "\\curlyeqprec", true); -defineSymbol(math, ams, rel, "\u227e", "\\precsim", true); -defineSymbol(math, ams, rel, "\u2ab7", "\\precapprox", true); -defineSymbol(math, ams, rel, "\u22b2", "\\vartriangleleft"); -defineSymbol(math, ams, rel, "\u22b4", "\\trianglelefteq"); -defineSymbol(math, ams, rel, "\u22a8", "\\vDash", true); -defineSymbol(math, ams, rel, "\u22aa", "\\Vvdash", true); -defineSymbol(math, ams, rel, "\u2323", "\\smallsmile"); -defineSymbol(math, ams, rel, "\u2322", "\\smallfrown"); -defineSymbol(math, ams, rel, "\u224f", "\\bumpeq", true); -defineSymbol(math, ams, rel, "\u224e", "\\Bumpeq", true); -defineSymbol(math, ams, rel, "\u2267", "\\geqq", true); -defineSymbol(math, ams, rel, "\u2a7e", "\\geqslant", true); -defineSymbol(math, ams, rel, "\u2a96", "\\eqslantgtr", true); -defineSymbol(math, ams, rel, "\u2273", "\\gtrsim", true); -defineSymbol(math, ams, rel, "\u2a86", "\\gtrapprox", true); -defineSymbol(math, ams, bin, "\u22d7", "\\gtrdot"); -defineSymbol(math, ams, rel, "\u22d9", "\\ggg", true); -defineSymbol(math, ams, rel, "\u2277", "\\gtrless", true); -defineSymbol(math, ams, rel, "\u22db", "\\gtreqless", true); -defineSymbol(math, ams, rel, "\u2a8c", "\\gtreqqless", true); -defineSymbol(math, ams, rel, "\u2256", "\\eqcirc", true); -defineSymbol(math, ams, rel, "\u2257", "\\circeq", true); -defineSymbol(math, ams, rel, "\u225c", "\\triangleq", true); -defineSymbol(math, ams, rel, "\u223c", "\\thicksim"); -defineSymbol(math, ams, rel, "\u2248", "\\thickapprox"); -defineSymbol(math, ams, rel, "\u2ac6", "\\supseteqq", true); -defineSymbol(math, ams, rel, "\u22d1", "\\Supset", true); -defineSymbol(math, ams, rel, "\u2290", "\\sqsupset", true); -defineSymbol(math, ams, rel, "\u227d", "\\succcurlyeq", true); -defineSymbol(math, ams, rel, "\u22df", "\\curlyeqsucc", true); -defineSymbol(math, ams, rel, "\u227f", "\\succsim", true); -defineSymbol(math, ams, rel, "\u2ab8", "\\succapprox", true); -defineSymbol(math, ams, rel, "\u22b3", "\\vartriangleright"); -defineSymbol(math, ams, rel, "\u22b5", "\\trianglerighteq"); -defineSymbol(math, ams, rel, "\u22a9", "\\Vdash", true); -defineSymbol(math, ams, rel, "\u2223", "\\shortmid"); -defineSymbol(math, ams, rel, "\u2225", "\\shortparallel"); -defineSymbol(math, ams, rel, "\u226c", "\\between", true); -defineSymbol(math, ams, rel, "\u22d4", "\\pitchfork", true); -defineSymbol(math, ams, rel, "\u221d", "\\varpropto"); -defineSymbol(math, ams, rel, "\u25c0", "\\blacktriangleleft"); // unicode-math says that \therefore is a mathord atom. -// We kept the amssymb atom type, which is rel. - -defineSymbol(math, ams, rel, "\u2234", "\\therefore", true); -defineSymbol(math, ams, rel, "\u220d", "\\backepsilon"); -defineSymbol(math, ams, rel, "\u25b6", "\\blacktriangleright"); // unicode-math says that \because is a mathord atom. -// We kept the amssymb atom type, which is rel. - -defineSymbol(math, ams, rel, "\u2235", "\\because", true); -defineSymbol(math, ams, rel, "\u22d8", "\\llless"); -defineSymbol(math, ams, rel, "\u22d9", "\\gggtr"); -defineSymbol(math, ams, bin, "\u22b2", "\\lhd"); -defineSymbol(math, ams, bin, "\u22b3", "\\rhd"); -defineSymbol(math, ams, rel, "\u2242", "\\eqsim", true); -defineSymbol(math, main, rel, "\u22c8", "\\Join"); -defineSymbol(math, ams, rel, "\u2251", "\\Doteq", true); // AMS Binary Operators - -defineSymbol(math, ams, bin, "\u2214", "\\dotplus", true); -defineSymbol(math, ams, bin, "\u2216", "\\smallsetminus"); -defineSymbol(math, ams, bin, "\u22d2", "\\Cap", true); -defineSymbol(math, ams, bin, "\u22d3", "\\Cup", true); -defineSymbol(math, ams, bin, "\u2a5e", "\\doublebarwedge", true); -defineSymbol(math, ams, bin, "\u229f", "\\boxminus", true); -defineSymbol(math, ams, bin, "\u229e", "\\boxplus", true); -defineSymbol(math, ams, bin, "\u22c7", "\\divideontimes", true); -defineSymbol(math, ams, bin, "\u22c9", "\\ltimes", true); -defineSymbol(math, ams, bin, "\u22ca", "\\rtimes", true); -defineSymbol(math, ams, bin, "\u22cb", "\\leftthreetimes", true); -defineSymbol(math, ams, bin, "\u22cc", "\\rightthreetimes", true); -defineSymbol(math, ams, bin, "\u22cf", "\\curlywedge", true); -defineSymbol(math, ams, bin, "\u22ce", "\\curlyvee", true); -defineSymbol(math, ams, bin, "\u229d", "\\circleddash", true); -defineSymbol(math, ams, bin, "\u229b", "\\circledast", true); -defineSymbol(math, ams, bin, "\u22c5", "\\centerdot"); -defineSymbol(math, ams, bin, "\u22ba", "\\intercal", true); -defineSymbol(math, ams, bin, "\u22d2", "\\doublecap"); -defineSymbol(math, ams, bin, "\u22d3", "\\doublecup"); -defineSymbol(math, ams, bin, "\u22a0", "\\boxtimes", true); // AMS Arrows -// Note: unicode-math maps \u21e2 to their own function \rightdasharrow. -// We'll map it to AMS function \dashrightarrow. It produces the same atom. - -defineSymbol(math, ams, rel, "\u21e2", "\\dashrightarrow", true); // unicode-math maps \u21e0 to \leftdasharrow. We'll use the AMS synonym. - -defineSymbol(math, ams, rel, "\u21e0", "\\dashleftarrow", true); -defineSymbol(math, ams, rel, "\u21c7", "\\leftleftarrows", true); -defineSymbol(math, ams, rel, "\u21c6", "\\leftrightarrows", true); -defineSymbol(math, ams, rel, "\u21da", "\\Lleftarrow", true); -defineSymbol(math, ams, rel, "\u219e", "\\twoheadleftarrow", true); -defineSymbol(math, ams, rel, "\u21a2", "\\leftarrowtail", true); -defineSymbol(math, ams, rel, "\u21ab", "\\looparrowleft", true); -defineSymbol(math, ams, rel, "\u21cb", "\\leftrightharpoons", true); -defineSymbol(math, ams, rel, "\u21b6", "\\curvearrowleft", true); // unicode-math maps \u21ba to \acwopencirclearrow. We'll use the AMS synonym. - -defineSymbol(math, ams, rel, "\u21ba", "\\circlearrowleft", true); -defineSymbol(math, ams, rel, "\u21b0", "\\Lsh", true); -defineSymbol(math, ams, rel, "\u21c8", "\\upuparrows", true); -defineSymbol(math, ams, rel, "\u21bf", "\\upharpoonleft", true); -defineSymbol(math, ams, rel, "\u21c3", "\\downharpoonleft", true); -defineSymbol(math, main, rel, "\u22b6", "\\origof", true); // not in font - -defineSymbol(math, main, rel, "\u22b7", "\\imageof", true); // not in font - -defineSymbol(math, ams, rel, "\u22b8", "\\multimap", true); -defineSymbol(math, ams, rel, "\u21ad", "\\leftrightsquigarrow", true); -defineSymbol(math, ams, rel, "\u21c9", "\\rightrightarrows", true); -defineSymbol(math, ams, rel, "\u21c4", "\\rightleftarrows", true); -defineSymbol(math, ams, rel, "\u21a0", "\\twoheadrightarrow", true); -defineSymbol(math, ams, rel, "\u21a3", "\\rightarrowtail", true); -defineSymbol(math, ams, rel, "\u21ac", "\\looparrowright", true); -defineSymbol(math, ams, rel, "\u21b7", "\\curvearrowright", true); // unicode-math maps \u21bb to \cwopencirclearrow. We'll use the AMS synonym. - -defineSymbol(math, ams, rel, "\u21bb", "\\circlearrowright", true); -defineSymbol(math, ams, rel, "\u21b1", "\\Rsh", true); -defineSymbol(math, ams, rel, "\u21ca", "\\downdownarrows", true); -defineSymbol(math, ams, rel, "\u21be", "\\upharpoonright", true); -defineSymbol(math, ams, rel, "\u21c2", "\\downharpoonright", true); -defineSymbol(math, ams, rel, "\u21dd", "\\rightsquigarrow", true); -defineSymbol(math, ams, rel, "\u21dd", "\\leadsto"); -defineSymbol(math, ams, rel, "\u21db", "\\Rrightarrow", true); -defineSymbol(math, ams, rel, "\u21be", "\\restriction"); -defineSymbol(math, main, textord, "\u2018", "`"); -defineSymbol(math, main, textord, "$", "\\$"); -defineSymbol(text, main, textord, "$", "\\$"); -defineSymbol(text, main, textord, "$", "\\textdollar"); -defineSymbol(math, main, textord, "%", "\\%"); -defineSymbol(text, main, textord, "%", "\\%"); -defineSymbol(math, main, textord, "_", "\\_"); -defineSymbol(text, main, textord, "_", "\\_"); -defineSymbol(text, main, textord, "_", "\\textunderscore"); -defineSymbol(math, main, textord, "\u2220", "\\angle", true); -defineSymbol(math, main, textord, "\u221e", "\\infty", true); -defineSymbol(math, main, textord, "\u2032", "\\prime"); -defineSymbol(math, main, textord, "\u25b3", "\\triangle"); -defineSymbol(math, main, textord, "\u0393", "\\Gamma", true); -defineSymbol(math, main, textord, "\u0394", "\\Delta", true); -defineSymbol(math, main, textord, "\u0398", "\\Theta", true); -defineSymbol(math, main, textord, "\u039b", "\\Lambda", true); -defineSymbol(math, main, textord, "\u039e", "\\Xi", true); -defineSymbol(math, main, textord, "\u03a0", "\\Pi", true); -defineSymbol(math, main, textord, "\u03a3", "\\Sigma", true); -defineSymbol(math, main, textord, "\u03a5", "\\Upsilon", true); -defineSymbol(math, main, textord, "\u03a6", "\\Phi", true); -defineSymbol(math, main, textord, "\u03a8", "\\Psi", true); -defineSymbol(math, main, textord, "\u03a9", "\\Omega", true); -defineSymbol(math, main, textord, "A", "\u0391"); -defineSymbol(math, main, textord, "B", "\u0392"); -defineSymbol(math, main, textord, "E", "\u0395"); -defineSymbol(math, main, textord, "Z", "\u0396"); -defineSymbol(math, main, textord, "H", "\u0397"); -defineSymbol(math, main, textord, "I", "\u0399"); -defineSymbol(math, main, textord, "K", "\u039A"); -defineSymbol(math, main, textord, "M", "\u039C"); -defineSymbol(math, main, textord, "N", "\u039D"); -defineSymbol(math, main, textord, "O", "\u039F"); -defineSymbol(math, main, textord, "P", "\u03A1"); -defineSymbol(math, main, textord, "T", "\u03A4"); -defineSymbol(math, main, textord, "X", "\u03A7"); -defineSymbol(math, main, textord, "\u00ac", "\\neg", true); -defineSymbol(math, main, textord, "\u00ac", "\\lnot"); -defineSymbol(math, main, textord, "\u22a4", "\\top"); -defineSymbol(math, main, textord, "\u22a5", "\\bot"); -defineSymbol(math, main, textord, "\u2205", "\\emptyset"); -defineSymbol(math, ams, textord, "\u2205", "\\varnothing"); -defineSymbol(math, main, mathord, "\u03b1", "\\alpha", true); -defineSymbol(math, main, mathord, "\u03b2", "\\beta", true); -defineSymbol(math, main, mathord, "\u03b3", "\\gamma", true); -defineSymbol(math, main, mathord, "\u03b4", "\\delta", true); -defineSymbol(math, main, mathord, "\u03f5", "\\epsilon", true); -defineSymbol(math, main, mathord, "\u03b6", "\\zeta", true); -defineSymbol(math, main, mathord, "\u03b7", "\\eta", true); -defineSymbol(math, main, mathord, "\u03b8", "\\theta", true); -defineSymbol(math, main, mathord, "\u03b9", "\\iota", true); -defineSymbol(math, main, mathord, "\u03ba", "\\kappa", true); -defineSymbol(math, main, mathord, "\u03bb", "\\lambda", true); -defineSymbol(math, main, mathord, "\u03bc", "\\mu", true); -defineSymbol(math, main, mathord, "\u03bd", "\\nu", true); -defineSymbol(math, main, mathord, "\u03be", "\\xi", true); -defineSymbol(math, main, mathord, "\u03bf", "\\omicron", true); -defineSymbol(math, main, mathord, "\u03c0", "\\pi", true); -defineSymbol(math, main, mathord, "\u03c1", "\\rho", true); -defineSymbol(math, main, mathord, "\u03c3", "\\sigma", true); -defineSymbol(math, main, mathord, "\u03c4", "\\tau", true); -defineSymbol(math, main, mathord, "\u03c5", "\\upsilon", true); -defineSymbol(math, main, mathord, "\u03d5", "\\phi", true); -defineSymbol(math, main, mathord, "\u03c7", "\\chi", true); -defineSymbol(math, main, mathord, "\u03c8", "\\psi", true); -defineSymbol(math, main, mathord, "\u03c9", "\\omega", true); -defineSymbol(math, main, mathord, "\u03b5", "\\varepsilon", true); -defineSymbol(math, main, mathord, "\u03d1", "\\vartheta", true); -defineSymbol(math, main, mathord, "\u03d6", "\\varpi", true); -defineSymbol(math, main, mathord, "\u03f1", "\\varrho", true); -defineSymbol(math, main, mathord, "\u03c2", "\\varsigma", true); -defineSymbol(math, main, mathord, "\u03c6", "\\varphi", true); -defineSymbol(math, main, bin, "\u2217", "*", true); -defineSymbol(math, main, bin, "+", "+"); -defineSymbol(math, main, bin, "\u2212", "-", true); -defineSymbol(math, main, bin, "\u22c5", "\\cdot", true); -defineSymbol(math, main, bin, "\u2218", "\\circ", true); -defineSymbol(math, main, bin, "\u00f7", "\\div", true); -defineSymbol(math, main, bin, "\u00b1", "\\pm", true); -defineSymbol(math, main, bin, "\u00d7", "\\times", true); -defineSymbol(math, main, bin, "\u2229", "\\cap", true); -defineSymbol(math, main, bin, "\u222a", "\\cup", true); -defineSymbol(math, main, bin, "\u2216", "\\setminus", true); -defineSymbol(math, main, bin, "\u2227", "\\land"); -defineSymbol(math, main, bin, "\u2228", "\\lor"); -defineSymbol(math, main, bin, "\u2227", "\\wedge", true); -defineSymbol(math, main, bin, "\u2228", "\\vee", true); -defineSymbol(math, main, textord, "\u221a", "\\surd"); -defineSymbol(math, main, open, "\u27e8", "\\langle", true); -defineSymbol(math, main, open, "\u2223", "\\lvert"); -defineSymbol(math, main, open, "\u2225", "\\lVert"); -defineSymbol(math, main, close, "?", "?"); -defineSymbol(math, main, close, "!", "!"); -defineSymbol(math, main, close, "\u27e9", "\\rangle", true); -defineSymbol(math, main, close, "\u2223", "\\rvert"); -defineSymbol(math, main, close, "\u2225", "\\rVert"); -defineSymbol(math, main, rel, "=", "="); -defineSymbol(math, main, rel, ":", ":"); -defineSymbol(math, main, rel, "\u2248", "\\approx", true); -defineSymbol(math, main, rel, "\u2245", "\\cong", true); -defineSymbol(math, main, rel, "\u2265", "\\ge"); -defineSymbol(math, main, rel, "\u2265", "\\geq", true); -defineSymbol(math, main, rel, "\u2190", "\\gets"); -defineSymbol(math, main, rel, ">", "\\gt", true); -defineSymbol(math, main, rel, "\u2208", "\\in", true); -defineSymbol(math, main, rel, "\ue020", "\\@not"); -defineSymbol(math, main, rel, "\u2282", "\\subset", true); -defineSymbol(math, main, rel, "\u2283", "\\supset", true); -defineSymbol(math, main, rel, "\u2286", "\\subseteq", true); -defineSymbol(math, main, rel, "\u2287", "\\supseteq", true); -defineSymbol(math, ams, rel, "\u2288", "\\nsubseteq", true); -defineSymbol(math, ams, rel, "\u2289", "\\nsupseteq", true); -defineSymbol(math, main, rel, "\u22a8", "\\models"); -defineSymbol(math, main, rel, "\u2190", "\\leftarrow", true); -defineSymbol(math, main, rel, "\u2264", "\\le"); -defineSymbol(math, main, rel, "\u2264", "\\leq", true); -defineSymbol(math, main, rel, "<", "\\lt", true); -defineSymbol(math, main, rel, "\u2192", "\\rightarrow", true); -defineSymbol(math, main, rel, "\u2192", "\\to"); -defineSymbol(math, ams, rel, "\u2271", "\\ngeq", true); -defineSymbol(math, ams, rel, "\u2270", "\\nleq", true); -defineSymbol(math, main, spacing, "\u00a0", "\\ "); -defineSymbol(math, main, spacing, "\u00a0", "\\space"); // Ref: LaTeX Source 2e: \DeclareRobustCommand{\nobreakspace}{% - -defineSymbol(math, main, spacing, "\u00a0", "\\nobreakspace"); -defineSymbol(text, main, spacing, "\u00a0", "\\ "); -defineSymbol(text, main, spacing, "\u00a0", " "); -defineSymbol(text, main, spacing, "\u00a0", "\\space"); -defineSymbol(text, main, spacing, "\u00a0", "\\nobreakspace"); -defineSymbol(math, main, spacing, null, "\\nobreak"); -defineSymbol(math, main, spacing, null, "\\allowbreak"); -defineSymbol(math, main, punct, ",", ","); -defineSymbol(math, main, punct, ";", ";"); -defineSymbol(math, ams, bin, "\u22bc", "\\barwedge", true); -defineSymbol(math, ams, bin, "\u22bb", "\\veebar", true); -defineSymbol(math, main, bin, "\u2299", "\\odot", true); -defineSymbol(math, main, bin, "\u2295", "\\oplus", true); -defineSymbol(math, main, bin, "\u2297", "\\otimes", true); -defineSymbol(math, main, textord, "\u2202", "\\partial", true); -defineSymbol(math, main, bin, "\u2298", "\\oslash", true); -defineSymbol(math, ams, bin, "\u229a", "\\circledcirc", true); -defineSymbol(math, ams, bin, "\u22a1", "\\boxdot", true); -defineSymbol(math, main, bin, "\u25b3", "\\bigtriangleup"); -defineSymbol(math, main, bin, "\u25bd", "\\bigtriangledown"); -defineSymbol(math, main, bin, "\u2020", "\\dagger"); -defineSymbol(math, main, bin, "\u22c4", "\\diamond"); -defineSymbol(math, main, bin, "\u22c6", "\\star"); -defineSymbol(math, main, bin, "\u25c3", "\\triangleleft"); -defineSymbol(math, main, bin, "\u25b9", "\\triangleright"); -defineSymbol(math, main, open, "{", "\\{"); -defineSymbol(text, main, textord, "{", "\\{"); -defineSymbol(text, main, textord, "{", "\\textbraceleft"); -defineSymbol(math, main, close, "}", "\\}"); -defineSymbol(text, main, textord, "}", "\\}"); -defineSymbol(text, main, textord, "}", "\\textbraceright"); -defineSymbol(math, main, open, "{", "\\lbrace"); -defineSymbol(math, main, close, "}", "\\rbrace"); -defineSymbol(math, main, open, "[", "\\lbrack", true); -defineSymbol(text, main, textord, "[", "\\lbrack", true); -defineSymbol(math, main, close, "]", "\\rbrack", true); -defineSymbol(text, main, textord, "]", "\\rbrack", true); -defineSymbol(math, main, open, "(", "\\lparen", true); -defineSymbol(math, main, close, ")", "\\rparen", true); -defineSymbol(text, main, textord, "<", "\\textless", true); // in T1 fontenc - -defineSymbol(text, main, textord, ">", "\\textgreater", true); // in T1 fontenc - -defineSymbol(math, main, open, "\u230a", "\\lfloor", true); -defineSymbol(math, main, close, "\u230b", "\\rfloor", true); -defineSymbol(math, main, open, "\u2308", "\\lceil", true); -defineSymbol(math, main, close, "\u2309", "\\rceil", true); -defineSymbol(math, main, textord, "\\", "\\backslash"); -defineSymbol(math, main, textord, "\u2223", "|"); -defineSymbol(math, main, textord, "\u2223", "\\vert"); -defineSymbol(text, main, textord, "|", "\\textbar", true); // in T1 fontenc - -defineSymbol(math, main, textord, "\u2225", "\\|"); -defineSymbol(math, main, textord, "\u2225", "\\Vert"); -defineSymbol(text, main, textord, "\u2225", "\\textbardbl"); -defineSymbol(text, main, textord, "~", "\\textasciitilde"); -defineSymbol(text, main, textord, "\\", "\\textbackslash"); -defineSymbol(text, main, textord, "^", "\\textasciicircum"); -defineSymbol(math, main, rel, "\u2191", "\\uparrow", true); -defineSymbol(math, main, rel, "\u21d1", "\\Uparrow", true); -defineSymbol(math, main, rel, "\u2193", "\\downarrow", true); -defineSymbol(math, main, rel, "\u21d3", "\\Downarrow", true); -defineSymbol(math, main, rel, "\u2195", "\\updownarrow", true); -defineSymbol(math, main, rel, "\u21d5", "\\Updownarrow", true); -defineSymbol(math, main, op, "\u2210", "\\coprod"); -defineSymbol(math, main, op, "\u22c1", "\\bigvee"); -defineSymbol(math, main, op, "\u22c0", "\\bigwedge"); -defineSymbol(math, main, op, "\u2a04", "\\biguplus"); -defineSymbol(math, main, op, "\u22c2", "\\bigcap"); -defineSymbol(math, main, op, "\u22c3", "\\bigcup"); -defineSymbol(math, main, op, "\u222b", "\\int"); -defineSymbol(math, main, op, "\u222b", "\\intop"); -defineSymbol(math, main, op, "\u222c", "\\iint"); -defineSymbol(math, main, op, "\u222d", "\\iiint"); -defineSymbol(math, main, op, "\u220f", "\\prod"); -defineSymbol(math, main, op, "\u2211", "\\sum"); -defineSymbol(math, main, op, "\u2a02", "\\bigotimes"); -defineSymbol(math, main, op, "\u2a01", "\\bigoplus"); -defineSymbol(math, main, op, "\u2a00", "\\bigodot"); -defineSymbol(math, main, op, "\u222e", "\\oint"); -defineSymbol(math, main, op, "\u222f", "\\oiint"); -defineSymbol(math, main, op, "\u2230", "\\oiiint"); -defineSymbol(math, main, op, "\u2a06", "\\bigsqcup"); -defineSymbol(math, main, op, "\u222b", "\\smallint"); -defineSymbol(text, main, inner, "\u2026", "\\textellipsis"); -defineSymbol(math, main, inner, "\u2026", "\\mathellipsis"); -defineSymbol(text, main, inner, "\u2026", "\\ldots", true); -defineSymbol(math, main, inner, "\u2026", "\\ldots", true); -defineSymbol(math, main, inner, "\u22ef", "\\@cdots", true); -defineSymbol(math, main, inner, "\u22f1", "\\ddots", true); -defineSymbol(math, main, textord, "\u22ee", "\\varvdots"); // \vdots is a macro - -defineSymbol(math, main, accent, "\u02ca", "\\acute"); -defineSymbol(math, main, accent, "\u02cb", "\\grave"); -defineSymbol(math, main, accent, "\u00a8", "\\ddot"); -defineSymbol(math, main, accent, "\u007e", "\\tilde"); -defineSymbol(math, main, accent, "\u02c9", "\\bar"); -defineSymbol(math, main, accent, "\u02d8", "\\breve"); -defineSymbol(math, main, accent, "\u02c7", "\\check"); -defineSymbol(math, main, accent, "\u005e", "\\hat"); -defineSymbol(math, main, accent, "\u20d7", "\\vec"); -defineSymbol(math, main, accent, "\u02d9", "\\dot"); -defineSymbol(math, main, accent, "\u02da", "\\mathring"); // \imath and \jmath should be invariant to \mathrm, \mathbf, etc., so use PUA - -defineSymbol(math, main, mathord, "\ue131", "\\@imath"); -defineSymbol(math, main, mathord, "\ue237", "\\@jmath"); -defineSymbol(math, main, textord, "\u0131", "\u0131"); -defineSymbol(math, main, textord, "\u0237", "\u0237"); -defineSymbol(text, main, textord, "\u0131", "\\i", true); -defineSymbol(text, main, textord, "\u0237", "\\j", true); -defineSymbol(text, main, textord, "\u00df", "\\ss", true); -defineSymbol(text, main, textord, "\u00e6", "\\ae", true); -defineSymbol(text, main, textord, "\u0153", "\\oe", true); -defineSymbol(text, main, textord, "\u00f8", "\\o", true); -defineSymbol(text, main, textord, "\u00c6", "\\AE", true); -defineSymbol(text, main, textord, "\u0152", "\\OE", true); -defineSymbol(text, main, textord, "\u00d8", "\\O", true); -defineSymbol(text, main, accent, "\u02ca", "\\'"); // acute - -defineSymbol(text, main, accent, "\u02cb", "\\`"); // grave - -defineSymbol(text, main, accent, "\u02c6", "\\^"); // circumflex - -defineSymbol(text, main, accent, "\u02dc", "\\~"); // tilde - -defineSymbol(text, main, accent, "\u02c9", "\\="); // macron - -defineSymbol(text, main, accent, "\u02d8", "\\u"); // breve - -defineSymbol(text, main, accent, "\u02d9", "\\."); // dot above - -defineSymbol(text, main, accent, "\u00b8", "\\c"); // cedilla - -defineSymbol(text, main, accent, "\u02da", "\\r"); // ring above - -defineSymbol(text, main, accent, "\u02c7", "\\v"); // caron - -defineSymbol(text, main, accent, "\u00a8", '\\"'); // diaresis - -defineSymbol(text, main, accent, "\u02dd", "\\H"); // double acute - -defineSymbol(text, main, accent, "\u25ef", "\\textcircled"); // \bigcirc glyph -// These ligatures are detected and created in Parser.js's `formLigatures`. - -var ligatures = { - "--": true, - "---": true, - "``": true, - "''": true -}; -defineSymbol(text, main, textord, "\u2013", "--", true); -defineSymbol(text, main, textord, "\u2013", "\\textendash"); -defineSymbol(text, main, textord, "\u2014", "---", true); -defineSymbol(text, main, textord, "\u2014", "\\textemdash"); -defineSymbol(text, main, textord, "\u2018", "`", true); -defineSymbol(text, main, textord, "\u2018", "\\textquoteleft"); -defineSymbol(text, main, textord, "\u2019", "'", true); -defineSymbol(text, main, textord, "\u2019", "\\textquoteright"); -defineSymbol(text, main, textord, "\u201c", "``", true); -defineSymbol(text, main, textord, "\u201c", "\\textquotedblleft"); -defineSymbol(text, main, textord, "\u201d", "''", true); -defineSymbol(text, main, textord, "\u201d", "\\textquotedblright"); // \degree from gensymb package - -defineSymbol(math, main, textord, "\u00b0", "\\degree", true); -defineSymbol(text, main, textord, "\u00b0", "\\degree"); // \textdegree from inputenc package - -defineSymbol(text, main, textord, "\u00b0", "\\textdegree", true); // TODO: In LaTeX, \pounds can generate a different character in text and math -// mode, but among our fonts, only Main-Regular defines this character "163". - -defineSymbol(math, main, textord, "\u00a3", "\\pounds"); -defineSymbol(math, main, textord, "\u00a3", "\\mathsterling", true); -defineSymbol(text, main, textord, "\u00a3", "\\pounds"); -defineSymbol(text, main, textord, "\u00a3", "\\textsterling", true); -defineSymbol(math, ams, textord, "\u2720", "\\maltese"); -defineSymbol(text, ams, textord, "\u2720", "\\maltese"); // There are lots of symbols which are the same, so we add them in afterwards. -// All of these are textords in math mode - -var mathTextSymbols = "0123456789/@.\""; - -for (var i = 0; i < mathTextSymbols.length; i++) { - var ch = mathTextSymbols.charAt(i); - defineSymbol(math, main, textord, ch, ch); -} // All of these are textords in text mode - - -var textSymbols = "0123456789!@*()-=+\";:?/.,"; - -for (var _i = 0; _i < textSymbols.length; _i++) { - var _ch = textSymbols.charAt(_i); - - defineSymbol(text, main, textord, _ch, _ch); -} // All of these are textords in text mode, and mathords in math mode - - -var letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; - -for (var _i2 = 0; _i2 < letters.length; _i2++) { - var _ch2 = letters.charAt(_i2); - - defineSymbol(math, main, mathord, _ch2, _ch2); - defineSymbol(text, main, textord, _ch2, _ch2); -} // Blackboard bold and script letters in Unicode range - - -defineSymbol(math, ams, textord, "C", "\u2102"); // blackboard bold - -defineSymbol(text, ams, textord, "C", "\u2102"); -defineSymbol(math, ams, textord, "H", "\u210D"); -defineSymbol(text, ams, textord, "H", "\u210D"); -defineSymbol(math, ams, textord, "N", "\u2115"); -defineSymbol(text, ams, textord, "N", "\u2115"); -defineSymbol(math, ams, textord, "P", "\u2119"); -defineSymbol(text, ams, textord, "P", "\u2119"); -defineSymbol(math, ams, textord, "Q", "\u211A"); -defineSymbol(text, ams, textord, "Q", "\u211A"); -defineSymbol(math, ams, textord, "R", "\u211D"); -defineSymbol(text, ams, textord, "R", "\u211D"); -defineSymbol(math, ams, textord, "Z", "\u2124"); -defineSymbol(text, ams, textord, "Z", "\u2124"); -defineSymbol(math, main, mathord, "h", "\u210E"); // italic h, Planck constant - -defineSymbol(text, main, mathord, "h", "\u210E"); // The next loop loads wide (surrogate pair) characters. -// We support some letters in the Unicode range U+1D400 to U+1D7FF, -// Mathematical Alphanumeric Symbols. -// Some editors do not deal well with wide characters. So don't write the -// string into this file. Instead, create the string from the surrogate pair. - -var wideChar = ""; - -for (var _i3 = 0; _i3 < letters.length; _i3++) { - var _ch3 = letters.charAt(_i3); // The hex numbers in the next line are a surrogate pair. - // 0xD835 is the high surrogate for all letters in the range we support. - // 0xDC00 is the low surrogate for bold A. - - - wideChar = String.fromCharCode(0xD835, 0xDC00 + _i3); // A-Z a-z bold - - defineSymbol(math, main, mathord, _ch3, wideChar); - defineSymbol(text, main, textord, _ch3, wideChar); - wideChar = String.fromCharCode(0xD835, 0xDC34 + _i3); // A-Z a-z italic - - defineSymbol(math, main, mathord, _ch3, wideChar); - defineSymbol(text, main, textord, _ch3, wideChar); - wideChar = String.fromCharCode(0xD835, 0xDC68 + _i3); // A-Z a-z bold italic - - defineSymbol(math, main, mathord, _ch3, wideChar); - defineSymbol(text, main, textord, _ch3, wideChar); - wideChar = String.fromCharCode(0xD835, 0xDD04 + _i3); // A-Z a-z Fraktur - - defineSymbol(math, main, mathord, _ch3, wideChar); - defineSymbol(text, main, textord, _ch3, wideChar); - wideChar = String.fromCharCode(0xD835, 0xDD6C + _i3); // A-Z a-z bold Fraktur - - defineSymbol(math, main, mathord, _ch3, wideChar); - defineSymbol(text, main, textord, _ch3, wideChar); - wideChar = String.fromCharCode(0xD835, 0xDDA0 + _i3); // A-Z a-z sans-serif - - defineSymbol(math, main, mathord, _ch3, wideChar); - defineSymbol(text, main, textord, _ch3, wideChar); - wideChar = String.fromCharCode(0xD835, 0xDDD4 + _i3); // A-Z a-z sans bold - - defineSymbol(math, main, mathord, _ch3, wideChar); - defineSymbol(text, main, textord, _ch3, wideChar); - wideChar = String.fromCharCode(0xD835, 0xDE08 + _i3); // A-Z a-z sans italic - - defineSymbol(math, main, mathord, _ch3, wideChar); - defineSymbol(text, main, textord, _ch3, wideChar); - wideChar = String.fromCharCode(0xD835, 0xDE70 + _i3); // A-Z a-z monospace - - defineSymbol(math, main, mathord, _ch3, wideChar); - defineSymbol(text, main, textord, _ch3, wideChar); - - if (_i3 < 26) { - // KaTeX fonts have only capital letters for blackboard bold and script. - // See exception for k below. - wideChar = String.fromCharCode(0xD835, 0xDD38 + _i3); // A-Z double struck - - defineSymbol(math, main, mathord, _ch3, wideChar); - defineSymbol(text, main, textord, _ch3, wideChar); - wideChar = String.fromCharCode(0xD835, 0xDC9C + _i3); // A-Z script - - defineSymbol(math, main, mathord, _ch3, wideChar); - defineSymbol(text, main, textord, _ch3, wideChar); - } // TODO: Add bold script when it is supported by a KaTeX font. - -} // "k" is the only double struck lower case letter in the KaTeX fonts. - - -wideChar = String.fromCharCode(0xD835, 0xDD5C); // k double struck - -defineSymbol(math, main, mathord, "k", wideChar); -defineSymbol(text, main, textord, "k", wideChar); // Next, some wide character numerals - -for (var _i4 = 0; _i4 < 10; _i4++) { - var _ch4 = _i4.toString(); - - wideChar = String.fromCharCode(0xD835, 0xDFCE + _i4); // 0-9 bold - - defineSymbol(math, main, mathord, _ch4, wideChar); - defineSymbol(text, main, textord, _ch4, wideChar); - wideChar = String.fromCharCode(0xD835, 0xDFE2 + _i4); // 0-9 sans serif - - defineSymbol(math, main, mathord, _ch4, wideChar); - defineSymbol(text, main, textord, _ch4, wideChar); - wideChar = String.fromCharCode(0xD835, 0xDFEC + _i4); // 0-9 bold sans - - defineSymbol(math, main, mathord, _ch4, wideChar); - defineSymbol(text, main, textord, _ch4, wideChar); - wideChar = String.fromCharCode(0xD835, 0xDFF6 + _i4); // 0-9 monospace - - defineSymbol(math, main, mathord, _ch4, wideChar); - defineSymbol(text, main, textord, _ch4, wideChar); -} // We add these Latin-1 letters as symbols for backwards-compatibility, -// but they are not actually in the font, nor are they supported by the -// Unicode accent mechanism, so they fall back to Times font and look ugly. -// TODO(edemaine): Fix this. - - -var extraLatin = "\u00d0\u00de\u00fe"; - -for (var _i5 = 0; _i5 < extraLatin.length; _i5++) { - var _ch5 = extraLatin.charAt(_i5); - - defineSymbol(math, main, mathord, _ch5, _ch5); - defineSymbol(text, main, textord, _ch5, _ch5); -} - -/** - * This file provides support for Unicode range U+1D400 to U+1D7FF, - * Mathematical Alphanumeric Symbols. - * - * Function wideCharacterFont takes a wide character as input and returns - * the font information necessary to render it properly. - */ -/** - * Data below is from https://www.unicode.org/charts/PDF/U1D400.pdf - * That document sorts characters into groups by font type, say bold or italic. - * - * In the arrays below, each subarray consists three elements: - * * The CSS class of that group when in math mode. - * * The CSS class of that group when in text mode. - * * The font name, so that KaTeX can get font metrics. - */ - -var wideLatinLetterData = [["mathbf", "textbf", "Main-Bold"], // A-Z bold upright -["mathbf", "textbf", "Main-Bold"], // a-z bold upright -["mathnormal", "textit", "Math-Italic"], // A-Z italic -["mathnormal", "textit", "Math-Italic"], // a-z italic -["boldsymbol", "boldsymbol", "Main-BoldItalic"], // A-Z bold italic -["boldsymbol", "boldsymbol", "Main-BoldItalic"], // a-z bold italic -// Map fancy A-Z letters to script, not calligraphic. -// This aligns with unicode-math and math fonts (except Cambria Math). -["mathscr", "textscr", "Script-Regular"], // A-Z script -["", "", ""], // a-z script. No font -["", "", ""], // A-Z bold script. No font -["", "", ""], // a-z bold script. No font -["mathfrak", "textfrak", "Fraktur-Regular"], // A-Z Fraktur -["mathfrak", "textfrak", "Fraktur-Regular"], // a-z Fraktur -["mathbb", "textbb", "AMS-Regular"], // A-Z double-struck -["mathbb", "textbb", "AMS-Regular"], // k double-struck -// Note that we are using a bold font, but font metrics for regular Fraktur. -["mathboldfrak", "textboldfrak", "Fraktur-Regular"], // A-Z bold Fraktur -["mathboldfrak", "textboldfrak", "Fraktur-Regular"], // a-z bold Fraktur -["mathsf", "textsf", "SansSerif-Regular"], // A-Z sans-serif -["mathsf", "textsf", "SansSerif-Regular"], // a-z sans-serif -["mathboldsf", "textboldsf", "SansSerif-Bold"], // A-Z bold sans-serif -["mathboldsf", "textboldsf", "SansSerif-Bold"], // a-z bold sans-serif -["mathitsf", "textitsf", "SansSerif-Italic"], // A-Z italic sans-serif -["mathitsf", "textitsf", "SansSerif-Italic"], // a-z italic sans-serif -["", "", ""], // A-Z bold italic sans. No font -["", "", ""], // a-z bold italic sans. No font -["mathtt", "texttt", "Typewriter-Regular"], // A-Z monospace -["mathtt", "texttt", "Typewriter-Regular"] // a-z monospace -]; -var wideNumeralData = [["mathbf", "textbf", "Main-Bold"], // 0-9 bold -["", "", ""], // 0-9 double-struck. No KaTeX font. -["mathsf", "textsf", "SansSerif-Regular"], // 0-9 sans-serif -["mathboldsf", "textboldsf", "SansSerif-Bold"], // 0-9 bold sans-serif -["mathtt", "texttt", "Typewriter-Regular"] // 0-9 monospace -]; -var wideCharacterFont = function wideCharacterFont(wideChar, mode) { - // IE doesn't support codePointAt(). So work with the surrogate pair. - var H = wideChar.charCodeAt(0); // high surrogate - - var L = wideChar.charCodeAt(1); // low surrogate - - var codePoint = (H - 0xD800) * 0x400 + (L - 0xDC00) + 0x10000; - var j = mode === "math" ? 0 : 1; // column index for CSS class. - - if (0x1D400 <= codePoint && codePoint < 0x1D6A4) { - // wideLatinLetterData contains exactly 26 chars on each row. - // So we can calculate the relevant row. No traverse necessary. - var i = Math.floor((codePoint - 0x1D400) / 26); - return [wideLatinLetterData[i][2], wideLatinLetterData[i][j]]; - } else if (0x1D7CE <= codePoint && codePoint <= 0x1D7FF) { - // Numerals, ten per row. - var _i = Math.floor((codePoint - 0x1D7CE) / 10); - - return [wideNumeralData[_i][2], wideNumeralData[_i][j]]; - } else if (codePoint === 0x1D6A5 || codePoint === 0x1D6A6) { - // dotless i or j - return [wideLatinLetterData[0][2], wideLatinLetterData[0][j]]; - } else if (0x1D6A6 < codePoint && codePoint < 0x1D7CE) { - // Greek letters. Not supported, yet. - return ["", ""]; - } else { - // We don't support any wide characters outside 1D400–1D7FF. - throw new ParseError("Unsupported character: " + wideChar); - } -}; - -/* eslint no-console:0 */ - -/** - * Looks up the given symbol in fontMetrics, after applying any symbol - * replacements defined in symbol.js - */ -var lookupSymbol = function lookupSymbol(value, // TODO(#963): Use a union type for this. -fontName, mode) { - // Replace the value with its replaced value from symbol.js - if (symbols[mode][value] && symbols[mode][value].replace) { - value = symbols[mode][value].replace; - } - - return { - value: value, - metrics: getCharacterMetrics(value, fontName, mode) - }; -}; -/** - * Makes a symbolNode after translation via the list of symbols in symbols.js. - * Correctly pulls out metrics for the character, and optionally takes a list of - * classes to be attached to the node. - * - * TODO: make argument order closer to makeSpan - * TODO: add a separate argument for math class (e.g. `mop`, `mbin`), which - * should if present come first in `classes`. - * TODO(#953): Make `options` mandatory and always pass it in. - */ - - -var makeSymbol = function makeSymbol(value, fontName, mode, options, classes) { - var lookup = lookupSymbol(value, fontName, mode); - var metrics = lookup.metrics; - value = lookup.value; - var symbolNode; - - if (metrics) { - var italic = metrics.italic; - - if (mode === "text" || options && options.font === "mathit") { - italic = 0; - } - - symbolNode = new SymbolNode(value, metrics.height, metrics.depth, italic, metrics.skew, metrics.width, classes); - } else { - // TODO(emily): Figure out a good way to only print this in development - typeof console !== "undefined" && console.warn("No character metrics " + ("for '" + value + "' in style '" + fontName + "' and mode '" + mode + "'")); - symbolNode = new SymbolNode(value, 0, 0, 0, 0, 0, classes); - } - - if (options) { - symbolNode.maxFontSize = options.sizeMultiplier; - - if (options.style.isTight()) { - symbolNode.classes.push("mtight"); - } - - var color = options.getColor(); - - if (color) { - symbolNode.style.color = color; - } - } - - return symbolNode; -}; -/** - * Makes a symbol in Main-Regular or AMS-Regular. - * Used for rel, bin, open, close, inner, and punct. - */ - - -var mathsym = function mathsym(value, mode, options, classes) { - if (classes === void 0) { - classes = []; - } - - // Decide what font to render the symbol in by its entry in the symbols - // table. - // Have a special case for when the value = \ because the \ is used as a - // textord in unsupported command errors but cannot be parsed as a regular - // text ordinal and is therefore not present as a symbol in the symbols - // table for text, as well as a special case for boldsymbol because it - // can be used for bold + and - - if (options.font === "boldsymbol" && lookupSymbol(value, "Main-Bold", mode).metrics) { - return makeSymbol(value, "Main-Bold", mode, options, classes.concat(["mathbf"])); - } else if (value === "\\" || symbols[mode][value].font === "main") { - return makeSymbol(value, "Main-Regular", mode, options, classes); - } else { - return makeSymbol(value, "AMS-Regular", mode, options, classes.concat(["amsrm"])); - } -}; -/** - * Determines which of the two font names (Main-Bold and Math-BoldItalic) and - * corresponding style tags (mathbf or boldsymbol) to use for font "boldsymbol", - * depending on the symbol. Use this function instead of fontMap for font - * "boldsymbol". - */ - - -var boldsymbol = function boldsymbol(value, mode, options, classes, type) { - if (type !== "textord" && lookupSymbol(value, "Math-BoldItalic", mode).metrics) { - return { - fontName: "Math-BoldItalic", - fontClass: "boldsymbol" - }; - } else { - // Some glyphs do not exist in Math-BoldItalic so we need to use - // Main-Bold instead. - return { - fontName: "Main-Bold", - fontClass: "mathbf" - }; - } -}; -/** - * Makes either a mathord or textord in the correct font and color. - */ - - -var makeOrd = function makeOrd(group, options, type) { - var mode = group.mode; - var text = group.text; - var classes = ["mord"]; // Math mode or Old font (i.e. \rm) - - var isFont = mode === "math" || mode === "text" && options.font; - var fontOrFamily = isFont ? options.font : options.fontFamily; - var wideFontName = ""; - var wideFontClass = ""; - - if (text.charCodeAt(0) === 0xD835) { - [wideFontName, wideFontClass] = wideCharacterFont(text, mode); - } - - if (wideFontName.length > 0) { - // surrogate pairs get special treatment - return makeSymbol(text, wideFontName, mode, options, classes.concat(wideFontClass)); - } else if (fontOrFamily) { - var fontName; - var fontClasses; - - if (fontOrFamily === "boldsymbol") { - var fontData = boldsymbol(text, mode, options, classes, type); - fontName = fontData.fontName; - fontClasses = [fontData.fontClass]; - } else if (isFont) { - fontName = fontMap[fontOrFamily].fontName; - fontClasses = [fontOrFamily]; - } else { - fontName = retrieveTextFontName(fontOrFamily, options.fontWeight, options.fontShape); - fontClasses = [fontOrFamily, options.fontWeight, options.fontShape]; - } - - if (lookupSymbol(text, fontName, mode).metrics) { - return makeSymbol(text, fontName, mode, options, classes.concat(fontClasses)); - } else if (ligatures.hasOwnProperty(text) && fontName.slice(0, 10) === "Typewriter") { - // Deconstruct ligatures in monospace fonts (\texttt, \tt). - var parts = []; - - for (var i = 0; i < text.length; i++) { - parts.push(makeSymbol(text[i], fontName, mode, options, classes.concat(fontClasses))); - } - - return makeFragment(parts); - } - } // Makes a symbol in the default font for mathords and textords. - - - if (type === "mathord") { - return makeSymbol(text, "Math-Italic", mode, options, classes.concat(["mathnormal"])); - } else if (type === "textord") { - var font = symbols[mode][text] && symbols[mode][text].font; - - if (font === "ams") { - var _fontName = retrieveTextFontName("amsrm", options.fontWeight, options.fontShape); - - return makeSymbol(text, _fontName, mode, options, classes.concat("amsrm", options.fontWeight, options.fontShape)); - } else if (font === "main" || !font) { - var _fontName2 = retrieveTextFontName("textrm", options.fontWeight, options.fontShape); - - return makeSymbol(text, _fontName2, mode, options, classes.concat(options.fontWeight, options.fontShape)); - } else { - // fonts added by plugins - var _fontName3 = retrieveTextFontName(font, options.fontWeight, options.fontShape); // We add font name as a css class - - - return makeSymbol(text, _fontName3, mode, options, classes.concat(_fontName3, options.fontWeight, options.fontShape)); - } - } else { - throw new Error("unexpected type: " + type + " in makeOrd"); - } -}; -/** - * Returns true if subsequent symbolNodes have the same classes, skew, maxFont, - * and styles. - */ - - -var canCombine = (prev, next) => { - if (createClass(prev.classes) !== createClass(next.classes) || prev.skew !== next.skew || prev.maxFontSize !== next.maxFontSize) { - return false; - } // If prev and next both are just "mbin"s or "mord"s we don't combine them - // so that the proper spacing can be preserved. - - - if (prev.classes.length === 1) { - var cls = prev.classes[0]; - - if (cls === "mbin" || cls === "mord") { - return false; - } - } - - for (var style in prev.style) { - if (prev.style.hasOwnProperty(style) && prev.style[style] !== next.style[style]) { - return false; - } - } - - for (var _style in next.style) { - if (next.style.hasOwnProperty(_style) && prev.style[_style] !== next.style[_style]) { - return false; - } - } - - return true; -}; -/** - * Combine consecutive domTree.symbolNodes into a single symbolNode. - * Note: this function mutates the argument. - */ - - -var tryCombineChars = chars => { - for (var i = 0; i < chars.length - 1; i++) { - var prev = chars[i]; - var next = chars[i + 1]; - - if (prev instanceof SymbolNode && next instanceof SymbolNode && canCombine(prev, next)) { - prev.text += next.text; - prev.height = Math.max(prev.height, next.height); - prev.depth = Math.max(prev.depth, next.depth); // Use the last character's italic correction since we use - // it to add padding to the right of the span created from - // the combined characters. - - prev.italic = next.italic; - chars.splice(i + 1, 1); - i--; - } - } - - return chars; -}; -/** - * Calculate the height, depth, and maxFontSize of an element based on its - * children. - */ - - -var sizeElementFromChildren = function sizeElementFromChildren(elem) { - var height = 0; - var depth = 0; - var maxFontSize = 0; - - for (var i = 0; i < elem.children.length; i++) { - var child = elem.children[i]; - - if (child.height > height) { - height = child.height; - } - - if (child.depth > depth) { - depth = child.depth; - } - - if (child.maxFontSize > maxFontSize) { - maxFontSize = child.maxFontSize; - } - } - - elem.height = height; - elem.depth = depth; - elem.maxFontSize = maxFontSize; -}; -/** - * Makes a span with the given list of classes, list of children, and options. - * - * TODO(#953): Ensure that `options` is always provided (currently some call - * sites don't pass it) and make the type below mandatory. - * TODO: add a separate argument for math class (e.g. `mop`, `mbin`), which - * should if present come first in `classes`. - */ - - -var makeSpan$2 = function makeSpan(classes, children, options, style) { - var span = new Span(classes, children, options, style); - sizeElementFromChildren(span); - return span; -}; // SVG one is simpler -- doesn't require height, depth, max-font setting. -// This is also a separate method for typesafety. - - -var makeSvgSpan = (classes, children, options, style) => new Span(classes, children, options, style); - -var makeLineSpan = function makeLineSpan(className, options, thickness) { - var line = makeSpan$2([className], [], options); - line.height = Math.max(thickness || options.fontMetrics().defaultRuleThickness, options.minRuleThickness); - line.style.borderBottomWidth = makeEm(line.height); - line.maxFontSize = 1.0; - return line; -}; -/** - * Makes an anchor with the given href, list of classes, list of children, - * and options. - */ - - -var makeAnchor = function makeAnchor(href, classes, children, options) { - var anchor = new Anchor(href, classes, children, options); - sizeElementFromChildren(anchor); - return anchor; -}; -/** - * Makes a document fragment with the given list of children. - */ - - -var makeFragment = function makeFragment(children) { - var fragment = new DocumentFragment(children); - sizeElementFromChildren(fragment); - return fragment; -}; -/** - * Wraps group in a span if it's a document fragment, allowing to apply classes - * and styles - */ - - -var wrapFragment = function wrapFragment(group, options) { - if (group instanceof DocumentFragment) { - return makeSpan$2([], [group], options); - } - - return group; -}; // These are exact object types to catch typos in the names of the optional fields. - - -// Computes the updated `children` list and the overall depth. -// -// This helper function for makeVList makes it easier to enforce type safety by -// allowing early exits (returns) in the logic. -var getVListChildrenAndDepth = function getVListChildrenAndDepth(params) { - if (params.positionType === "individualShift") { - var oldChildren = params.children; - var children = [oldChildren[0]]; // Add in kerns to the list of params.children to get each element to be - // shifted to the correct specified shift - - var _depth = -oldChildren[0].shift - oldChildren[0].elem.depth; - - var currPos = _depth; - - for (var i = 1; i < oldChildren.length; i++) { - var diff = -oldChildren[i].shift - currPos - oldChildren[i].elem.depth; - var size = diff - (oldChildren[i - 1].elem.height + oldChildren[i - 1].elem.depth); - currPos = currPos + diff; - children.push({ - type: "kern", - size - }); - children.push(oldChildren[i]); - } - - return { - children, - depth: _depth - }; - } - - var depth; - - if (params.positionType === "top") { - // We always start at the bottom, so calculate the bottom by adding up - // all the sizes - var bottom = params.positionData; - - for (var _i = 0; _i < params.children.length; _i++) { - var child = params.children[_i]; - bottom -= child.type === "kern" ? child.size : child.elem.height + child.elem.depth; - } - - depth = bottom; - } else if (params.positionType === "bottom") { - depth = -params.positionData; - } else { - var firstChild = params.children[0]; - - if (firstChild.type !== "elem") { - throw new Error('First child must have type "elem".'); - } - - if (params.positionType === "shift") { - depth = -firstChild.elem.depth - params.positionData; - } else if (params.positionType === "firstBaseline") { - depth = -firstChild.elem.depth; - } else { - throw new Error("Invalid positionType " + params.positionType + "."); - } - } - - return { - children: params.children, - depth - }; -}; -/** - * Makes a vertical list by stacking elements and kerns on top of each other. - * Allows for many different ways of specifying the positioning method. - * - * See VListParam documentation above. - */ - - -var makeVList = function makeVList(params, options) { - var { - children, - depth - } = getVListChildrenAndDepth(params); // Create a strut that is taller than any list item. The strut is added to - // each item, where it will determine the item's baseline. Since it has - // `overflow:hidden`, the strut's top edge will sit on the item's line box's - // top edge and the strut's bottom edge will sit on the item's baseline, - // with no additional line-height spacing. This allows the item baseline to - // be positioned precisely without worrying about font ascent and - // line-height. - - var pstrutSize = 0; - - for (var i = 0; i < children.length; i++) { - var child = children[i]; - - if (child.type === "elem") { - var elem = child.elem; - pstrutSize = Math.max(pstrutSize, elem.maxFontSize, elem.height); - } - } - - pstrutSize += 2; - var pstrut = makeSpan$2(["pstrut"], []); - pstrut.style.height = makeEm(pstrutSize); // Create a new list of actual children at the correct offsets - - var realChildren = []; - var minPos = depth; - var maxPos = depth; - var currPos = depth; - - for (var _i2 = 0; _i2 < children.length; _i2++) { - var _child = children[_i2]; - - if (_child.type === "kern") { - currPos += _child.size; - } else { - var _elem = _child.elem; - var classes = _child.wrapperClasses || []; - var style = _child.wrapperStyle || {}; - var childWrap = makeSpan$2(classes, [pstrut, _elem], undefined, style); - childWrap.style.top = makeEm(-pstrutSize - currPos - _elem.depth); - - if (_child.marginLeft) { - childWrap.style.marginLeft = _child.marginLeft; - } - - if (_child.marginRight) { - childWrap.style.marginRight = _child.marginRight; - } - - realChildren.push(childWrap); - currPos += _elem.height + _elem.depth; - } - - minPos = Math.min(minPos, currPos); - maxPos = Math.max(maxPos, currPos); - } // The vlist contents go in a table-cell with `vertical-align:bottom`. - // This cell's bottom edge will determine the containing table's baseline - // without overly expanding the containing line-box. - - - var vlist = makeSpan$2(["vlist"], realChildren); - vlist.style.height = makeEm(maxPos); // A second row is used if necessary to represent the vlist's depth. - - var rows; - - if (minPos < 0) { - // We will define depth in an empty span with display: table-cell. - // It should render with the height that we define. But Chrome, in - // contenteditable mode only, treats that span as if it contains some - // text content. And that min-height over-rides our desired height. - // So we put another empty span inside the depth strut span. - var emptySpan = makeSpan$2([], []); - var depthStrut = makeSpan$2(["vlist"], [emptySpan]); - depthStrut.style.height = makeEm(-minPos); // Safari wants the first row to have inline content; otherwise it - // puts the bottom of the *second* row on the baseline. - - var topStrut = makeSpan$2(["vlist-s"], [new SymbolNode("\u200b")]); - rows = [makeSpan$2(["vlist-r"], [vlist, topStrut]), makeSpan$2(["vlist-r"], [depthStrut])]; - } else { - rows = [makeSpan$2(["vlist-r"], [vlist])]; - } - - var vtable = makeSpan$2(["vlist-t"], rows); - - if (rows.length === 2) { - vtable.classes.push("vlist-t2"); - } - - vtable.height = maxPos; - vtable.depth = -minPos; - return vtable; -}; // Glue is a concept from TeX which is a flexible space between elements in -// either a vertical or horizontal list. In KaTeX, at least for now, it's -// static space between elements in a horizontal layout. - - -var makeGlue = (measurement, options) => { - // Make an empty span for the space - var rule = makeSpan$2(["mspace"], [], options); - var size = calculateSize(measurement, options); - rule.style.marginRight = makeEm(size); - return rule; -}; // Takes font options, and returns the appropriate fontLookup name - - -var retrieveTextFontName = function retrieveTextFontName(fontFamily, fontWeight, fontShape) { - var baseFontName = ""; - - switch (fontFamily) { - case "amsrm": - baseFontName = "AMS"; - break; - - case "textrm": - baseFontName = "Main"; - break; - - case "textsf": - baseFontName = "SansSerif"; - break; - - case "texttt": - baseFontName = "Typewriter"; - break; - - default: - baseFontName = fontFamily; - // use fonts added by a plugin - } - - var fontStylesName; - - if (fontWeight === "textbf" && fontShape === "textit") { - fontStylesName = "BoldItalic"; - } else if (fontWeight === "textbf") { - fontStylesName = "Bold"; - } else if (fontWeight === "textit") { - fontStylesName = "Italic"; - } else { - fontStylesName = "Regular"; - } - - return baseFontName + "-" + fontStylesName; -}; -/** - * Maps TeX font commands to objects containing: - * - variant: string used for "mathvariant" attribute in buildMathML.js - * - fontName: the "style" parameter to fontMetrics.getCharacterMetrics - */ -// A map between tex font commands an MathML mathvariant attribute values - - -var fontMap = { - // styles - "mathbf": { - variant: "bold", - fontName: "Main-Bold" - }, - "mathrm": { - variant: "normal", - fontName: "Main-Regular" - }, - "textit": { - variant: "italic", - fontName: "Main-Italic" - }, - "mathit": { - variant: "italic", - fontName: "Main-Italic" - }, - "mathnormal": { - variant: "italic", - fontName: "Math-Italic" - }, - // "boldsymbol" is missing because they require the use of multiple fonts: - // Math-BoldItalic and Main-Bold. This is handled by a special case in - // makeOrd which ends up calling boldsymbol. - // families - "mathbb": { - variant: "double-struck", - fontName: "AMS-Regular" - }, - "mathcal": { - variant: "script", - fontName: "Caligraphic-Regular" - }, - "mathfrak": { - variant: "fraktur", - fontName: "Fraktur-Regular" - }, - "mathscr": { - variant: "script", - fontName: "Script-Regular" - }, - "mathsf": { - variant: "sans-serif", - fontName: "SansSerif-Regular" - }, - "mathtt": { - variant: "monospace", - fontName: "Typewriter-Regular" - } -}; -var svgData = { - // path, width, height - vec: ["vec", 0.471, 0.714], - // values from the font glyph - oiintSize1: ["oiintSize1", 0.957, 0.499], - // oval to overlay the integrand - oiintSize2: ["oiintSize2", 1.472, 0.659], - oiiintSize1: ["oiiintSize1", 1.304, 0.499], - oiiintSize2: ["oiiintSize2", 1.98, 0.659] -}; - -var staticSvg = function staticSvg(value, options) { - // Create a span with inline SVG for the element. - var [pathName, width, height] = svgData[value]; - var path = new PathNode(pathName); - var svgNode = new SvgNode([path], { - "width": makeEm(width), - "height": makeEm(height), - // Override CSS rule `.katex svg { width: 100% }` - "style": "width:" + makeEm(width), - "viewBox": "0 0 " + 1000 * width + " " + 1000 * height, - "preserveAspectRatio": "xMinYMin" - }); - var span = makeSvgSpan(["overlay"], [svgNode], options); - span.height = height; - span.style.height = makeEm(height); - span.style.width = makeEm(width); - return span; -}; - -var buildCommon = { - fontMap, - makeSymbol, - mathsym, - makeSpan: makeSpan$2, - makeSvgSpan, - makeLineSpan, - makeAnchor, - makeFragment, - wrapFragment, - makeVList, - makeOrd, - makeGlue, - staticSvg, - svgData, - tryCombineChars -}; - -/** - * Describes spaces between different classes of atoms. - */ -var thinspace = { - number: 3, - unit: "mu" -}; -var mediumspace = { - number: 4, - unit: "mu" -}; -var thickspace = { - number: 5, - unit: "mu" -}; // Making the type below exact with all optional fields doesn't work due to -// - https://github.com/facebook/flow/issues/4582 -// - https://github.com/facebook/flow/issues/5688 -// However, since *all* fields are optional, $Shape<> works as suggested in 5688 -// above. - -// Spacing relationships for display and text styles -var spacings = { - mord: { - mop: thinspace, - mbin: mediumspace, - mrel: thickspace, - minner: thinspace - }, - mop: { - mord: thinspace, - mop: thinspace, - mrel: thickspace, - minner: thinspace - }, - mbin: { - mord: mediumspace, - mop: mediumspace, - mopen: mediumspace, - minner: mediumspace - }, - mrel: { - mord: thickspace, - mop: thickspace, - mopen: thickspace, - minner: thickspace - }, - mopen: {}, - mclose: { - mop: thinspace, - mbin: mediumspace, - mrel: thickspace, - minner: thinspace - }, - mpunct: { - mord: thinspace, - mop: thinspace, - mrel: thickspace, - mopen: thinspace, - mclose: thinspace, - mpunct: thinspace, - minner: thinspace - }, - minner: { - mord: thinspace, - mop: thinspace, - mbin: mediumspace, - mrel: thickspace, - mopen: thinspace, - mpunct: thinspace, - minner: thinspace - } -}; // Spacing relationships for script and scriptscript styles - -var tightSpacings = { - mord: { - mop: thinspace - }, - mop: { - mord: thinspace, - mop: thinspace - }, - mbin: {}, - mrel: {}, - mopen: {}, - mclose: { - mop: thinspace - }, - mpunct: {}, - minner: { - mop: thinspace - } -}; - -/** Context provided to function handlers for error messages. */ -// Note: reverse the order of the return type union will cause a flow error. -// See https://github.com/facebook/flow/issues/3663. -// More general version of `HtmlBuilder` for nodes (e.g. \sum, accent types) -// whose presence impacts super/subscripting. In this case, ParseNode<"supsub"> -// delegates its HTML building to the HtmlBuilder corresponding to these nodes. - -/** - * Final function spec for use at parse time. - * This is almost identical to `FunctionPropSpec`, except it - * 1. includes the function handler, and - * 2. requires all arguments except argTypes. - * It is generated by `defineFunction()` below. - */ - -/** - * All registered functions. - * `functions.js` just exports this same dictionary again and makes it public. - * `Parser.js` requires this dictionary. - */ -var _functions = {}; -/** - * All HTML builders. Should be only used in the `define*` and the `build*ML` - * functions. - */ - -var _htmlGroupBuilders = {}; -/** - * All MathML builders. Should be only used in the `define*` and the `build*ML` - * functions. - */ - -var _mathmlGroupBuilders = {}; -function defineFunction(_ref) { - var { - type, - names, - props, - handler, - htmlBuilder, - mathmlBuilder - } = _ref; - // Set default values of functions - var data = { - type, - numArgs: props.numArgs, - argTypes: props.argTypes, - allowedInArgument: !!props.allowedInArgument, - allowedInText: !!props.allowedInText, - allowedInMath: props.allowedInMath === undefined ? true : props.allowedInMath, - numOptionalArgs: props.numOptionalArgs || 0, - infix: !!props.infix, - primitive: !!props.primitive, - handler: handler - }; - - for (var i = 0; i < names.length; ++i) { - _functions[names[i]] = data; - } - - if (type) { - if (htmlBuilder) { - _htmlGroupBuilders[type] = htmlBuilder; - } - - if (mathmlBuilder) { - _mathmlGroupBuilders[type] = mathmlBuilder; - } - } -} -/** - * Use this to register only the HTML and MathML builders for a function (e.g. - * if the function's ParseNode is generated in Parser.js rather than via a - * stand-alone handler provided to `defineFunction`). - */ - -function defineFunctionBuilders(_ref2) { - var { - type, - htmlBuilder, - mathmlBuilder - } = _ref2; - defineFunction({ - type, - names: [], - props: { - numArgs: 0 - }, - - handler() { - throw new Error('Should never be called.'); - }, - - htmlBuilder, - mathmlBuilder - }); -} -var normalizeArgument = function normalizeArgument(arg) { - return arg.type === "ordgroup" && arg.body.length === 1 ? arg.body[0] : arg; -}; // Since the corresponding buildHTML/buildMathML function expects a -// list of elements, we normalize for different kinds of arguments - -var ordargument = function ordargument(arg) { - return arg.type === "ordgroup" ? arg.body : [arg]; -}; - -/** - * This file does the main work of building a domTree structure from a parse - * tree. The entry point is the `buildHTML` function, which takes a parse tree. - * Then, the buildExpression, buildGroup, and various groupBuilders functions - * are called, to produce a final HTML tree. - */ -var makeSpan$1 = buildCommon.makeSpan; // Binary atoms (first class `mbin`) change into ordinary atoms (`mord`) -// depending on their surroundings. See TeXbook pg. 442-446, Rules 5 and 6, -// and the text before Rule 19. - -var binLeftCanceller = ["leftmost", "mbin", "mopen", "mrel", "mop", "mpunct"]; -var binRightCanceller = ["rightmost", "mrel", "mclose", "mpunct"]; -var styleMap$1 = { - "display": Style$1.DISPLAY, - "text": Style$1.TEXT, - "script": Style$1.SCRIPT, - "scriptscript": Style$1.SCRIPTSCRIPT -}; -var DomEnum = { - mord: "mord", - mop: "mop", - mbin: "mbin", - mrel: "mrel", - mopen: "mopen", - mclose: "mclose", - mpunct: "mpunct", - minner: "minner" -}; - -/** - * Take a list of nodes, build them in order, and return a list of the built - * nodes. documentFragments are flattened into their contents, so the - * returned list contains no fragments. `isRealGroup` is true if `expression` - * is a real group (no atoms will be added on either side), as opposed to - * a partial group (e.g. one created by \color). `surrounding` is an array - * consisting type of nodes that will be added to the left and right. - */ -var buildExpression$1 = function buildExpression(expression, options, isRealGroup, surrounding) { - if (surrounding === void 0) { - surrounding = [null, null]; - } - - // Parse expressions into `groups`. - var groups = []; - - for (var i = 0; i < expression.length; i++) { - var output = buildGroup$1(expression[i], options); - - if (output instanceof DocumentFragment) { - var children = output.children; - groups.push(...children); - } else { - groups.push(output); - } - } // Combine consecutive domTree.symbolNodes into a single symbolNode. - - - buildCommon.tryCombineChars(groups); // If `expression` is a partial group, let the parent handle spacings - // to avoid processing groups multiple times. - - if (!isRealGroup) { - return groups; - } - - var glueOptions = options; - - if (expression.length === 1) { - var node = expression[0]; - - if (node.type === "sizing") { - glueOptions = options.havingSize(node.size); - } else if (node.type === "styling") { - glueOptions = options.havingStyle(styleMap$1[node.style]); - } - } // Dummy spans for determining spacings between surrounding atoms. - // If `expression` has no atoms on the left or right, class "leftmost" - // or "rightmost", respectively, is used to indicate it. - - - var dummyPrev = makeSpan$1([surrounding[0] || "leftmost"], [], options); - var dummyNext = makeSpan$1([surrounding[1] || "rightmost"], [], options); // TODO: These code assumes that a node's math class is the first element - // of its `classes` array. A later cleanup should ensure this, for - // instance by changing the signature of `makeSpan`. - // Before determining what spaces to insert, perform bin cancellation. - // Binary operators change to ordinary symbols in some contexts. - - var isRoot = isRealGroup === "root"; - traverseNonSpaceNodes(groups, (node, prev) => { - var prevType = prev.classes[0]; - var type = node.classes[0]; - - if (prevType === "mbin" && utils.contains(binRightCanceller, type)) { - prev.classes[0] = "mord"; - } else if (type === "mbin" && utils.contains(binLeftCanceller, prevType)) { - node.classes[0] = "mord"; - } - }, { - node: dummyPrev - }, dummyNext, isRoot); - traverseNonSpaceNodes(groups, (node, prev) => { - var prevType = getTypeOfDomTree(prev); - var type = getTypeOfDomTree(node); // 'mtight' indicates that the node is script or scriptscript style. - - var space = prevType && type ? node.hasClass("mtight") ? tightSpacings[prevType][type] : spacings[prevType][type] : null; - - if (space) { - // Insert glue (spacing) after the `prev`. - return buildCommon.makeGlue(space, glueOptions); - } - }, { - node: dummyPrev - }, dummyNext, isRoot); - return groups; -}; // Depth-first traverse non-space `nodes`, calling `callback` with the current and -// previous node as arguments, optionally returning a node to insert after the -// previous node. `prev` is an object with the previous node and `insertAfter` -// function to insert after it. `next` is a node that will be added to the right. -// Used for bin cancellation and inserting spacings. - -var traverseNonSpaceNodes = function traverseNonSpaceNodes(nodes, callback, prev, next, isRoot) { - if (next) { - // temporarily append the right node, if exists - nodes.push(next); - } - - var i = 0; - - for (; i < nodes.length; i++) { - var node = nodes[i]; - var partialGroup = checkPartialGroup(node); - - if (partialGroup) { - // Recursive DFS - // $FlowFixMe: make nodes a $ReadOnlyArray by returning a new array - traverseNonSpaceNodes(partialGroup.children, callback, prev, null, isRoot); - continue; - } // Ignore explicit spaces (e.g., \;, \,) when determining what implicit - // spacing should go between atoms of different classes - - - var nonspace = !node.hasClass("mspace"); - - if (nonspace) { - var result = callback(node, prev.node); - - if (result) { - if (prev.insertAfter) { - prev.insertAfter(result); - } else { - // insert at front - nodes.unshift(result); - i++; - } - } - } - - if (nonspace) { - prev.node = node; - } else if (isRoot && node.hasClass("newline")) { - prev.node = makeSpan$1(["leftmost"]); // treat like beginning of line - } - - prev.insertAfter = (index => n => { - nodes.splice(index + 1, 0, n); - i++; - })(i); - } - - if (next) { - nodes.pop(); - } -}; // Check if given node is a partial group, i.e., does not affect spacing around. - - -var checkPartialGroup = function checkPartialGroup(node) { - if (node instanceof DocumentFragment || node instanceof Anchor || node instanceof Span && node.hasClass("enclosing")) { - return node; - } - - return null; -}; // Return the outermost node of a domTree. - - -var getOutermostNode = function getOutermostNode(node, side) { - var partialGroup = checkPartialGroup(node); - - if (partialGroup) { - var children = partialGroup.children; - - if (children.length) { - if (side === "right") { - return getOutermostNode(children[children.length - 1], "right"); - } else if (side === "left") { - return getOutermostNode(children[0], "left"); - } - } - } - - return node; -}; // Return math atom class (mclass) of a domTree. -// If `side` is given, it will get the type of the outermost node at given side. - - -var getTypeOfDomTree = function getTypeOfDomTree(node, side) { - if (!node) { - return null; - } - - if (side) { - node = getOutermostNode(node, side); - } // This makes a lot of assumptions as to where the type of atom - // appears. We should do a better job of enforcing this. - - - return DomEnum[node.classes[0]] || null; -}; -var makeNullDelimiter = function makeNullDelimiter(options, classes) { - var moreClasses = ["nulldelimiter"].concat(options.baseSizingClasses()); - return makeSpan$1(classes.concat(moreClasses)); -}; -/** - * buildGroup is the function that takes a group and calls the correct groupType - * function for it. It also handles the interaction of size and style changes - * between parents and children. - */ - -var buildGroup$1 = function buildGroup(group, options, baseOptions) { - if (!group) { - return makeSpan$1(); - } - - if (_htmlGroupBuilders[group.type]) { - // Call the groupBuilders function - // $FlowFixMe - var groupNode = _htmlGroupBuilders[group.type](group, options); // If the size changed between the parent and the current group, account - // for that size difference. - - if (baseOptions && options.size !== baseOptions.size) { - groupNode = makeSpan$1(options.sizingClasses(baseOptions), [groupNode], options); - var multiplier = options.sizeMultiplier / baseOptions.sizeMultiplier; - groupNode.height *= multiplier; - groupNode.depth *= multiplier; - } - - return groupNode; - } else { - throw new ParseError("Got group of unknown type: '" + group.type + "'"); - } -}; -/** - * Combine an array of HTML DOM nodes (e.g., the output of `buildExpression`) - * into an unbreakable HTML node of class .base, with proper struts to - * guarantee correct vertical extent. `buildHTML` calls this repeatedly to - * make up the entire expression as a sequence of unbreakable units. - */ - -function buildHTMLUnbreakable(children, options) { - // Compute height and depth of this chunk. - var body = makeSpan$1(["base"], children, options); // Add strut, which ensures that the top of the HTML element falls at - // the height of the expression, and the bottom of the HTML element - // falls at the depth of the expression. - - var strut = makeSpan$1(["strut"]); - strut.style.height = makeEm(body.height + body.depth); - - if (body.depth) { - strut.style.verticalAlign = makeEm(-body.depth); - } - - body.children.unshift(strut); - return body; -} -/** - * Take an entire parse tree, and build it into an appropriate set of HTML - * nodes. - */ - - -function buildHTML(tree, options) { - // Strip off outer tag wrapper for processing below. - var tag = null; - - if (tree.length === 1 && tree[0].type === "tag") { - tag = tree[0].tag; - tree = tree[0].body; - } // Build the expression contained in the tree - - - var expression = buildExpression$1(tree, options, "root"); - var eqnNum; - - if (expression.length === 2 && expression[1].hasClass("tag")) { - // An environment with automatic equation numbers, e.g. {gather}. - eqnNum = expression.pop(); - } - - var children = []; // Create one base node for each chunk between potential line breaks. - // The TeXBook [p.173] says "A formula will be broken only after a - // relation symbol like $=$ or $<$ or $\rightarrow$, or after a binary - // operation symbol like $+$ or $-$ or $\times$, where the relation or - // binary operation is on the ``outer level'' of the formula (i.e., not - // enclosed in {...} and not part of an \over construction)." - - var parts = []; - - for (var i = 0; i < expression.length; i++) { - parts.push(expression[i]); - - if (expression[i].hasClass("mbin") || expression[i].hasClass("mrel") || expression[i].hasClass("allowbreak")) { - // Put any post-operator glue on same line as operator. - // Watch for \nobreak along the way, and stop at \newline. - var nobreak = false; - - while (i < expression.length - 1 && expression[i + 1].hasClass("mspace") && !expression[i + 1].hasClass("newline")) { - i++; - parts.push(expression[i]); - - if (expression[i].hasClass("nobreak")) { - nobreak = true; - } - } // Don't allow break if \nobreak among the post-operator glue. - - - if (!nobreak) { - children.push(buildHTMLUnbreakable(parts, options)); - parts = []; - } - } else if (expression[i].hasClass("newline")) { - // Write the line except the newline - parts.pop(); - - if (parts.length > 0) { - children.push(buildHTMLUnbreakable(parts, options)); - parts = []; - } // Put the newline at the top level - - - children.push(expression[i]); - } - } - - if (parts.length > 0) { - children.push(buildHTMLUnbreakable(parts, options)); - } // Now, if there was a tag, build it too and append it as a final child. - - - var tagChild; - - if (tag) { - tagChild = buildHTMLUnbreakable(buildExpression$1(tag, options, true)); - tagChild.classes = ["tag"]; - children.push(tagChild); - } else if (eqnNum) { - children.push(eqnNum); - } - - var htmlNode = makeSpan$1(["katex-html"], children); - htmlNode.setAttribute("aria-hidden", "true"); // Adjust the strut of the tag to be the maximum height of all children - // (the height of the enclosing htmlNode) for proper vertical alignment. - - if (tagChild) { - var strut = tagChild.children[0]; - strut.style.height = makeEm(htmlNode.height + htmlNode.depth); - - if (htmlNode.depth) { - strut.style.verticalAlign = makeEm(-htmlNode.depth); - } - } - - return htmlNode; -} - -/** - * These objects store data about MathML nodes. This is the MathML equivalent - * of the types in domTree.js. Since MathML handles its own rendering, and - * since we're mainly using MathML to improve accessibility, we don't manage - * any of the styling state that the plain DOM nodes do. - * - * The `toNode` and `toMarkup` functions work similarly to how they do in - * domTree.js, creating namespaced DOM nodes and HTML text markup respectively. - */ -function newDocumentFragment(children) { - return new DocumentFragment(children); -} -/** - * This node represents a general purpose MathML node of any type. The - * constructor requires the type of node to create (for example, `"mo"` or - * `"mspace"`, corresponding to `` and `` tags). - */ - -class MathNode { - constructor(type, children, classes) { - this.type = void 0; - this.attributes = void 0; - this.children = void 0; - this.classes = void 0; - this.type = type; - this.attributes = {}; - this.children = children || []; - this.classes = classes || []; - } - /** - * Sets an attribute on a MathML node. MathML depends on attributes to convey a - * semantic content, so this is used heavily. - */ - - - setAttribute(name, value) { - this.attributes[name] = value; - } - /** - * Gets an attribute on a MathML node. - */ - - - getAttribute(name) { - return this.attributes[name]; - } - /** - * Converts the math node into a MathML-namespaced DOM element. - */ - - - toNode() { - var node = document.createElementNS("http://www.w3.org/1998/Math/MathML", this.type); - - for (var attr in this.attributes) { - if (Object.prototype.hasOwnProperty.call(this.attributes, attr)) { - node.setAttribute(attr, this.attributes[attr]); - } - } - - if (this.classes.length > 0) { - node.className = createClass(this.classes); - } - - for (var i = 0; i < this.children.length; i++) { - node.appendChild(this.children[i].toNode()); - } - - return node; - } - /** - * Converts the math node into an HTML markup string. - */ - - - toMarkup() { - var markup = "<" + this.type; // Add the attributes - - for (var attr in this.attributes) { - if (Object.prototype.hasOwnProperty.call(this.attributes, attr)) { - markup += " " + attr + "=\""; - markup += utils.escape(this.attributes[attr]); - markup += "\""; - } - } - - if (this.classes.length > 0) { - markup += " class =\"" + utils.escape(createClass(this.classes)) + "\""; - } - - markup += ">"; - - for (var i = 0; i < this.children.length; i++) { - markup += this.children[i].toMarkup(); - } - - markup += ""; - return markup; - } - /** - * Converts the math node into a string, similar to innerText, but escaped. - */ - - - toText() { - return this.children.map(child => child.toText()).join(""); - } - -} -/** - * This node represents a piece of text. - */ - -class TextNode { - constructor(text) { - this.text = void 0; - this.text = text; - } - /** - * Converts the text node into a DOM text node. - */ - - - toNode() { - return document.createTextNode(this.text); - } - /** - * Converts the text node into escaped HTML markup - * (representing the text itself). - */ - - - toMarkup() { - return utils.escape(this.toText()); - } - /** - * Converts the text node into a string - * (representing the text itself). - */ - - - toText() { - return this.text; - } - -} -/** - * This node represents a space, but may render as or as text, - * depending on the width. - */ - -class SpaceNode { - /** - * Create a Space node with width given in CSS ems. - */ - constructor(width) { - this.width = void 0; - this.character = void 0; - this.width = width; // See https://www.w3.org/TR/2000/WD-MathML2-20000328/chapter6.html - // for a table of space-like characters. We use Unicode - // representations instead of &LongNames; as it's not clear how to - // make the latter via document.createTextNode. - - if (width >= 0.05555 && width <= 0.05556) { - this.character = "\u200a"; //   - } else if (width >= 0.1666 && width <= 0.1667) { - this.character = "\u2009"; //   - } else if (width >= 0.2222 && width <= 0.2223) { - this.character = "\u2005"; //   - } else if (width >= 0.2777 && width <= 0.2778) { - this.character = "\u2005\u200a"; //    - } else if (width >= -0.05556 && width <= -0.05555) { - this.character = "\u200a\u2063"; // ​ - } else if (width >= -0.1667 && width <= -0.1666) { - this.character = "\u2009\u2063"; // ​ - } else if (width >= -0.2223 && width <= -0.2222) { - this.character = "\u205f\u2063"; // ​ - } else if (width >= -0.2778 && width <= -0.2777) { - this.character = "\u2005\u2063"; // ​ - } else { - this.character = null; - } - } - /** - * Converts the math node into a MathML-namespaced DOM element. - */ - - - toNode() { - if (this.character) { - return document.createTextNode(this.character); - } else { - var node = document.createElementNS("http://www.w3.org/1998/Math/MathML", "mspace"); - node.setAttribute("width", makeEm(this.width)); - return node; - } - } - /** - * Converts the math node into an HTML markup string. - */ - - - toMarkup() { - if (this.character) { - return "" + this.character + ""; - } else { - return ""; - } - } - /** - * Converts the math node into a string, similar to innerText. - */ - - - toText() { - if (this.character) { - return this.character; - } else { - return " "; - } - } - -} - -var mathMLTree = { - MathNode, - TextNode, - SpaceNode, - newDocumentFragment -}; - -/** - * This file converts a parse tree into a corresponding MathML tree. The main - * entry point is the `buildMathML` function, which takes a parse tree from the - * parser. - */ - -/** - * Takes a symbol and converts it into a MathML text node after performing - * optional replacement from symbols.js. - */ -var makeText = function makeText(text, mode, options) { - if (symbols[mode][text] && symbols[mode][text].replace && text.charCodeAt(0) !== 0xD835 && !(ligatures.hasOwnProperty(text) && options && (options.fontFamily && options.fontFamily.slice(4, 6) === "tt" || options.font && options.font.slice(4, 6) === "tt"))) { - text = symbols[mode][text].replace; - } - - return new mathMLTree.TextNode(text); -}; -/** - * Wrap the given array of nodes in an node if needed, i.e., - * unless the array has length 1. Always returns a single node. - */ - -var makeRow = function makeRow(body) { - if (body.length === 1) { - return body[0]; - } else { - return new mathMLTree.MathNode("mrow", body); - } -}; -/** - * Returns the math variant as a string or null if none is required. - */ - -var getVariant = function getVariant(group, options) { - // Handle \text... font specifiers as best we can. - // MathML has a limited list of allowable mathvariant specifiers; see - // https://www.w3.org/TR/MathML3/chapter3.html#presm.commatt - if (options.fontFamily === "texttt") { - return "monospace"; - } else if (options.fontFamily === "textsf") { - if (options.fontShape === "textit" && options.fontWeight === "textbf") { - return "sans-serif-bold-italic"; - } else if (options.fontShape === "textit") { - return "sans-serif-italic"; - } else if (options.fontWeight === "textbf") { - return "bold-sans-serif"; - } else { - return "sans-serif"; - } - } else if (options.fontShape === "textit" && options.fontWeight === "textbf") { - return "bold-italic"; - } else if (options.fontShape === "textit") { - return "italic"; - } else if (options.fontWeight === "textbf") { - return "bold"; - } - - var font = options.font; - - if (!font || font === "mathnormal") { - return null; - } - - var mode = group.mode; - - if (font === "mathit") { - return "italic"; - } else if (font === "boldsymbol") { - return group.type === "textord" ? "bold" : "bold-italic"; - } else if (font === "mathbf") { - return "bold"; - } else if (font === "mathbb") { - return "double-struck"; - } else if (font === "mathfrak") { - return "fraktur"; - } else if (font === "mathscr" || font === "mathcal") { - // MathML makes no distinction between script and calligraphic - return "script"; - } else if (font === "mathsf") { - return "sans-serif"; - } else if (font === "mathtt") { - return "monospace"; - } - - var text = group.text; - - if (utils.contains(["\\imath", "\\jmath"], text)) { - return null; - } - - if (symbols[mode][text] && symbols[mode][text].replace) { - text = symbols[mode][text].replace; - } - - var fontName = buildCommon.fontMap[font].fontName; - - if (getCharacterMetrics(text, fontName, mode)) { - return buildCommon.fontMap[font].variant; - } - - return null; -}; -/** - * Takes a list of nodes, builds them, and returns a list of the generated - * MathML nodes. Also combine consecutive outputs into a single - * tag. - */ - -var buildExpression = function buildExpression(expression, options, isOrdgroup) { - if (expression.length === 1) { - var group = buildGroup(expression[0], options); - - if (isOrdgroup && group instanceof MathNode && group.type === "mo") { - // When TeX writers want to suppress spacing on an operator, - // they often put the operator by itself inside braces. - group.setAttribute("lspace", "0em"); - group.setAttribute("rspace", "0em"); - } - - return [group]; - } - - var groups = []; - var lastGroup; - - for (var i = 0; i < expression.length; i++) { - var _group = buildGroup(expression[i], options); - - if (_group instanceof MathNode && lastGroup instanceof MathNode) { - // Concatenate adjacent s - if (_group.type === 'mtext' && lastGroup.type === 'mtext' && _group.getAttribute('mathvariant') === lastGroup.getAttribute('mathvariant')) { - lastGroup.children.push(..._group.children); - continue; // Concatenate adjacent s - } else if (_group.type === 'mn' && lastGroup.type === 'mn') { - lastGroup.children.push(..._group.children); - continue; // Concatenate ... followed by . - } else if (_group.type === 'mi' && _group.children.length === 1 && lastGroup.type === 'mn') { - var child = _group.children[0]; - - if (child instanceof TextNode && child.text === '.') { - lastGroup.children.push(..._group.children); - continue; - } - } else if (lastGroup.type === 'mi' && lastGroup.children.length === 1) { - var lastChild = lastGroup.children[0]; - - if (lastChild instanceof TextNode && lastChild.text === '\u0338' && (_group.type === 'mo' || _group.type === 'mi' || _group.type === 'mn')) { - var _child = _group.children[0]; - - if (_child instanceof TextNode && _child.text.length > 0) { - // Overlay with combining character long solidus - _child.text = _child.text.slice(0, 1) + "\u0338" + _child.text.slice(1); - groups.pop(); - } - } - } - } - - groups.push(_group); - lastGroup = _group; - } - - return groups; -}; -/** - * Equivalent to buildExpression, but wraps the elements in an - * if there's more than one. Returns a single node instead of an array. - */ - -var buildExpressionRow = function buildExpressionRow(expression, options, isOrdgroup) { - return makeRow(buildExpression(expression, options, isOrdgroup)); -}; -/** - * Takes a group from the parser and calls the appropriate groupBuilders function - * on it to produce a MathML node. - */ - -var buildGroup = function buildGroup(group, options) { - if (!group) { - return new mathMLTree.MathNode("mrow"); - } - - if (_mathmlGroupBuilders[group.type]) { - // Call the groupBuilders function - // $FlowFixMe - var result = _mathmlGroupBuilders[group.type](group, options); // $FlowFixMe - - return result; - } else { - throw new ParseError("Got group of unknown type: '" + group.type + "'"); - } -}; -/** - * Takes a full parse tree and settings and builds a MathML representation of - * it. In particular, we put the elements from building the parse tree into a - * tag so we can also include that TeX source as an annotation. - * - * Note that we actually return a domTree element with a `` inside it so - * we can do appropriate styling. - */ - -function buildMathML(tree, texExpression, options, isDisplayMode, forMathmlOnly) { - var expression = buildExpression(tree, options); // TODO: Make a pass thru the MathML similar to buildHTML.traverseNonSpaceNodes - // and add spacing nodes. This is necessary only adjacent to math operators - // like \sin or \lim or to subsup elements that contain math operators. - // MathML takes care of the other spacing issues. - // Wrap up the expression in an mrow so it is presented in the semantics - // tag correctly, unless it's a single or . - - var wrapper; - - if (expression.length === 1 && expression[0] instanceof MathNode && utils.contains(["mrow", "mtable"], expression[0].type)) { - wrapper = expression[0]; - } else { - wrapper = new mathMLTree.MathNode("mrow", expression); - } // Build a TeX annotation of the source - - - var annotation = new mathMLTree.MathNode("annotation", [new mathMLTree.TextNode(texExpression)]); - annotation.setAttribute("encoding", "application/x-tex"); - var semantics = new mathMLTree.MathNode("semantics", [wrapper, annotation]); - var math = new mathMLTree.MathNode("math", [semantics]); - math.setAttribute("xmlns", "http://www.w3.org/1998/Math/MathML"); - - if (isDisplayMode) { - math.setAttribute("display", "block"); - } // You can't style nodes, so we wrap the node in a span. - // NOTE: The span class is not typed to have nodes as children, and - // we don't want to make the children type more generic since the children - // of span are expected to have more fields in `buildHtml` contexts. - - - var wrapperClass = forMathmlOnly ? "katex" : "katex-mathml"; // $FlowFixMe - - return buildCommon.makeSpan([wrapperClass], [math]); -} - -var optionsFromSettings = function optionsFromSettings(settings) { - return new Options({ - style: settings.displayMode ? Style$1.DISPLAY : Style$1.TEXT, - maxSize: settings.maxSize, - minRuleThickness: settings.minRuleThickness - }); -}; - -var displayWrap = function displayWrap(node, settings) { - if (settings.displayMode) { - var classes = ["katex-display"]; - - if (settings.leqno) { - classes.push("leqno"); - } - - if (settings.fleqn) { - classes.push("fleqn"); - } - - node = buildCommon.makeSpan(classes, [node]); - } - - return node; -}; - -var buildTree = function buildTree(tree, expression, settings) { - var options = optionsFromSettings(settings); - var katexNode; - - if (settings.output === "mathml") { - return buildMathML(tree, expression, options, settings.displayMode, true); - } else if (settings.output === "html") { - var htmlNode = buildHTML(tree, options); - katexNode = buildCommon.makeSpan(["katex"], [htmlNode]); - } else { - var mathMLNode = buildMathML(tree, expression, options, settings.displayMode, false); - - var _htmlNode = buildHTML(tree, options); - - katexNode = buildCommon.makeSpan(["katex"], [mathMLNode, _htmlNode]); - } - - return displayWrap(katexNode, settings); -}; -var buildHTMLTree = function buildHTMLTree(tree, expression, settings) { - var options = optionsFromSettings(settings); - var htmlNode = buildHTML(tree, options); - var katexNode = buildCommon.makeSpan(["katex"], [htmlNode]); - return displayWrap(katexNode, settings); -}; - -/** - * This file provides support to buildMathML.js and buildHTML.js - * for stretchy wide elements rendered from SVG files - * and other CSS trickery. - */ -var stretchyCodePoint = { - widehat: "^", - widecheck: "ˇ", - widetilde: "~", - utilde: "~", - overleftarrow: "\u2190", - underleftarrow: "\u2190", - xleftarrow: "\u2190", - overrightarrow: "\u2192", - underrightarrow: "\u2192", - xrightarrow: "\u2192", - underbrace: "\u23df", - overbrace: "\u23de", - overgroup: "\u23e0", - undergroup: "\u23e1", - overleftrightarrow: "\u2194", - underleftrightarrow: "\u2194", - xleftrightarrow: "\u2194", - Overrightarrow: "\u21d2", - xRightarrow: "\u21d2", - overleftharpoon: "\u21bc", - xleftharpoonup: "\u21bc", - overrightharpoon: "\u21c0", - xrightharpoonup: "\u21c0", - xLeftarrow: "\u21d0", - xLeftrightarrow: "\u21d4", - xhookleftarrow: "\u21a9", - xhookrightarrow: "\u21aa", - xmapsto: "\u21a6", - xrightharpoondown: "\u21c1", - xleftharpoondown: "\u21bd", - xrightleftharpoons: "\u21cc", - xleftrightharpoons: "\u21cb", - xtwoheadleftarrow: "\u219e", - xtwoheadrightarrow: "\u21a0", - xlongequal: "=", - xtofrom: "\u21c4", - xrightleftarrows: "\u21c4", - xrightequilibrium: "\u21cc", - // Not a perfect match. - xleftequilibrium: "\u21cb", - // None better available. - "\\cdrightarrow": "\u2192", - "\\cdleftarrow": "\u2190", - "\\cdlongequal": "=" -}; - -var mathMLnode = function mathMLnode(label) { - var node = new mathMLTree.MathNode("mo", [new mathMLTree.TextNode(stretchyCodePoint[label.replace(/^\\/, '')])]); - node.setAttribute("stretchy", "true"); - return node; -}; // Many of the KaTeX SVG images have been adapted from glyphs in KaTeX fonts. -// Copyright (c) 2009-2010, Design Science, Inc. () -// Copyright (c) 2014-2017 Khan Academy () -// Licensed under the SIL Open Font License, Version 1.1. -// See \nhttp://scripts.sil.org/OFL -// Very Long SVGs -// Many of the KaTeX stretchy wide elements use a long SVG image and an -// overflow: hidden tactic to achieve a stretchy image while avoiding -// distortion of arrowheads or brace corners. -// The SVG typically contains a very long (400 em) arrow. -// The SVG is in a container span that has overflow: hidden, so the span -// acts like a window that exposes only part of the SVG. -// The SVG always has a longer, thinner aspect ratio than the container span. -// After the SVG fills 100% of the height of the container span, -// there is a long arrow shaft left over. That left-over shaft is not shown. -// Instead, it is sliced off because the span's CSS has overflow: hidden. -// Thus, the reader sees an arrow that matches the subject matter width -// without distortion. -// Some functions, such as \cancel, need to vary their aspect ratio. These -// functions do not get the overflow SVG treatment. -// Second Brush Stroke -// Low resolution monitors struggle to display images in fine detail. -// So browsers apply anti-aliasing. A long straight arrow shaft therefore -// will sometimes appear as if it has a blurred edge. -// To mitigate this, these SVG files contain a second "brush-stroke" on the -// arrow shafts. That is, a second long thin rectangular SVG path has been -// written directly on top of each arrow shaft. This reinforcement causes -// some of the screen pixels to display as black instead of the anti-aliased -// gray pixel that a single path would generate. So we get arrow shafts -// whose edges appear to be sharper. -// In the katexImagesData object just below, the dimensions all -// correspond to path geometry inside the relevant SVG. -// For example, \overrightarrow uses the same arrowhead as glyph U+2192 -// from the KaTeX Main font. The scaling factor is 1000. -// That is, inside the font, that arrowhead is 522 units tall, which -// corresponds to 0.522 em inside the document. - - -var katexImagesData = { - // path(s), minWidth, height, align - overrightarrow: [["rightarrow"], 0.888, 522, "xMaxYMin"], - overleftarrow: [["leftarrow"], 0.888, 522, "xMinYMin"], - underrightarrow: [["rightarrow"], 0.888, 522, "xMaxYMin"], - underleftarrow: [["leftarrow"], 0.888, 522, "xMinYMin"], - xrightarrow: [["rightarrow"], 1.469, 522, "xMaxYMin"], - "\\cdrightarrow": [["rightarrow"], 3.0, 522, "xMaxYMin"], - // CD minwwidth2.5pc - xleftarrow: [["leftarrow"], 1.469, 522, "xMinYMin"], - "\\cdleftarrow": [["leftarrow"], 3.0, 522, "xMinYMin"], - Overrightarrow: [["doublerightarrow"], 0.888, 560, "xMaxYMin"], - xRightarrow: [["doublerightarrow"], 1.526, 560, "xMaxYMin"], - xLeftarrow: [["doubleleftarrow"], 1.526, 560, "xMinYMin"], - overleftharpoon: [["leftharpoon"], 0.888, 522, "xMinYMin"], - xleftharpoonup: [["leftharpoon"], 0.888, 522, "xMinYMin"], - xleftharpoondown: [["leftharpoondown"], 0.888, 522, "xMinYMin"], - overrightharpoon: [["rightharpoon"], 0.888, 522, "xMaxYMin"], - xrightharpoonup: [["rightharpoon"], 0.888, 522, "xMaxYMin"], - xrightharpoondown: [["rightharpoondown"], 0.888, 522, "xMaxYMin"], - xlongequal: [["longequal"], 0.888, 334, "xMinYMin"], - "\\cdlongequal": [["longequal"], 3.0, 334, "xMinYMin"], - xtwoheadleftarrow: [["twoheadleftarrow"], 0.888, 334, "xMinYMin"], - xtwoheadrightarrow: [["twoheadrightarrow"], 0.888, 334, "xMaxYMin"], - overleftrightarrow: [["leftarrow", "rightarrow"], 0.888, 522], - overbrace: [["leftbrace", "midbrace", "rightbrace"], 1.6, 548], - underbrace: [["leftbraceunder", "midbraceunder", "rightbraceunder"], 1.6, 548], - underleftrightarrow: [["leftarrow", "rightarrow"], 0.888, 522], - xleftrightarrow: [["leftarrow", "rightarrow"], 1.75, 522], - xLeftrightarrow: [["doubleleftarrow", "doublerightarrow"], 1.75, 560], - xrightleftharpoons: [["leftharpoondownplus", "rightharpoonplus"], 1.75, 716], - xleftrightharpoons: [["leftharpoonplus", "rightharpoondownplus"], 1.75, 716], - xhookleftarrow: [["leftarrow", "righthook"], 1.08, 522], - xhookrightarrow: [["lefthook", "rightarrow"], 1.08, 522], - overlinesegment: [["leftlinesegment", "rightlinesegment"], 0.888, 522], - underlinesegment: [["leftlinesegment", "rightlinesegment"], 0.888, 522], - overgroup: [["leftgroup", "rightgroup"], 0.888, 342], - undergroup: [["leftgroupunder", "rightgroupunder"], 0.888, 342], - xmapsto: [["leftmapsto", "rightarrow"], 1.5, 522], - xtofrom: [["leftToFrom", "rightToFrom"], 1.75, 528], - // The next three arrows are from the mhchem package. - // In mhchem.sty, min-length is 2.0em. But these arrows might appear in the - // document as \xrightarrow or \xrightleftharpoons. Those have - // min-length = 1.75em, so we set min-length on these next three to match. - xrightleftarrows: [["baraboveleftarrow", "rightarrowabovebar"], 1.75, 901], - xrightequilibrium: [["baraboveshortleftharpoon", "rightharpoonaboveshortbar"], 1.75, 716], - xleftequilibrium: [["shortbaraboveleftharpoon", "shortrightharpoonabovebar"], 1.75, 716] -}; - -var groupLength = function groupLength(arg) { - if (arg.type === "ordgroup") { - return arg.body.length; - } else { - return 1; - } -}; - -var svgSpan = function svgSpan(group, options) { - // Create a span with inline SVG for the element. - function buildSvgSpan_() { - var viewBoxWidth = 400000; // default - - var label = group.label.slice(1); - - if (utils.contains(["widehat", "widecheck", "widetilde", "utilde"], label)) { - // Each type in the `if` statement corresponds to one of the ParseNode - // types below. This narrowing is required to access `grp.base`. - // $FlowFixMe - var grp = group; // There are four SVG images available for each function. - // Choose a taller image when there are more characters. - - var numChars = groupLength(grp.base); - var viewBoxHeight; - var pathName; - - var _height; - - if (numChars > 5) { - if (label === "widehat" || label === "widecheck") { - viewBoxHeight = 420; - viewBoxWidth = 2364; - _height = 0.42; - pathName = label + "4"; - } else { - viewBoxHeight = 312; - viewBoxWidth = 2340; - _height = 0.34; - pathName = "tilde4"; - } - } else { - var imgIndex = [1, 1, 2, 2, 3, 3][numChars]; - - if (label === "widehat" || label === "widecheck") { - viewBoxWidth = [0, 1062, 2364, 2364, 2364][imgIndex]; - viewBoxHeight = [0, 239, 300, 360, 420][imgIndex]; - _height = [0, 0.24, 0.3, 0.3, 0.36, 0.42][imgIndex]; - pathName = label + imgIndex; - } else { - viewBoxWidth = [0, 600, 1033, 2339, 2340][imgIndex]; - viewBoxHeight = [0, 260, 286, 306, 312][imgIndex]; - _height = [0, 0.26, 0.286, 0.3, 0.306, 0.34][imgIndex]; - pathName = "tilde" + imgIndex; - } - } - - var path = new PathNode(pathName); - var svgNode = new SvgNode([path], { - "width": "100%", - "height": makeEm(_height), - "viewBox": "0 0 " + viewBoxWidth + " " + viewBoxHeight, - "preserveAspectRatio": "none" - }); - return { - span: buildCommon.makeSvgSpan([], [svgNode], options), - minWidth: 0, - height: _height - }; - } else { - var spans = []; - var data = katexImagesData[label]; - var [paths, _minWidth, _viewBoxHeight] = data; - - var _height2 = _viewBoxHeight / 1000; - - var numSvgChildren = paths.length; - var widthClasses; - var aligns; - - if (numSvgChildren === 1) { - // $FlowFixMe: All these cases must be of the 4-tuple type. - var align1 = data[3]; - widthClasses = ["hide-tail"]; - aligns = [align1]; - } else if (numSvgChildren === 2) { - widthClasses = ["halfarrow-left", "halfarrow-right"]; - aligns = ["xMinYMin", "xMaxYMin"]; - } else if (numSvgChildren === 3) { - widthClasses = ["brace-left", "brace-center", "brace-right"]; - aligns = ["xMinYMin", "xMidYMin", "xMaxYMin"]; - } else { - throw new Error("Correct katexImagesData or update code here to support\n " + numSvgChildren + " children."); - } - - for (var i = 0; i < numSvgChildren; i++) { - var _path = new PathNode(paths[i]); - - var _svgNode = new SvgNode([_path], { - "width": "400em", - "height": makeEm(_height2), - "viewBox": "0 0 " + viewBoxWidth + " " + _viewBoxHeight, - "preserveAspectRatio": aligns[i] + " slice" - }); - - var _span = buildCommon.makeSvgSpan([widthClasses[i]], [_svgNode], options); - - if (numSvgChildren === 1) { - return { - span: _span, - minWidth: _minWidth, - height: _height2 - }; - } else { - _span.style.height = makeEm(_height2); - spans.push(_span); - } - } - - return { - span: buildCommon.makeSpan(["stretchy"], spans, options), - minWidth: _minWidth, - height: _height2 - }; - } - } // buildSvgSpan_() - - - var { - span, - minWidth, - height - } = buildSvgSpan_(); // Note that we are returning span.depth = 0. - // Any adjustments relative to the baseline must be done in buildHTML. - - span.height = height; - span.style.height = makeEm(height); - - if (minWidth > 0) { - span.style.minWidth = makeEm(minWidth); - } - - return span; -}; - -var encloseSpan = function encloseSpan(inner, label, topPad, bottomPad, options) { - // Return an image span for \cancel, \bcancel, \xcancel, \fbox, or \angl - var img; - var totalHeight = inner.height + inner.depth + topPad + bottomPad; - - if (/fbox|color|angl/.test(label)) { - img = buildCommon.makeSpan(["stretchy", label], [], options); - - if (label === "fbox") { - var color = options.color && options.getColor(); - - if (color) { - img.style.borderColor = color; - } - } - } else { - // \cancel, \bcancel, or \xcancel - // Since \cancel's SVG is inline and it omits the viewBox attribute, - // its stroke-width will not vary with span area. - var lines = []; - - if (/^[bx]cancel$/.test(label)) { - lines.push(new LineNode({ - "x1": "0", - "y1": "0", - "x2": "100%", - "y2": "100%", - "stroke-width": "0.046em" - })); - } - - if (/^x?cancel$/.test(label)) { - lines.push(new LineNode({ - "x1": "0", - "y1": "100%", - "x2": "100%", - "y2": "0", - "stroke-width": "0.046em" - })); - } - - var svgNode = new SvgNode(lines, { - "width": "100%", - "height": makeEm(totalHeight) - }); - img = buildCommon.makeSvgSpan([], [svgNode], options); - } - - img.height = totalHeight; - img.style.height = makeEm(totalHeight); - return img; -}; - -var stretchy = { - encloseSpan, - mathMLnode, - svgSpan -}; - -/** - * Asserts that the node is of the given type and returns it with stricter - * typing. Throws if the node's type does not match. - */ -function assertNodeType(node, type) { - if (!node || node.type !== type) { - throw new Error("Expected node of type " + type + ", but got " + (node ? "node of type " + node.type : String(node))); - } // $FlowFixMe, >=0.125 - - - return node; -} -/** - * Returns the node more strictly typed iff it is of the given type. Otherwise, - * returns null. - */ - -function assertSymbolNodeType(node) { - var typedNode = checkSymbolNodeType(node); - - if (!typedNode) { - throw new Error("Expected node of symbol group type, but got " + (node ? "node of type " + node.type : String(node))); - } - - return typedNode; -} -/** - * Returns the node more strictly typed iff it is of the given type. Otherwise, - * returns null. - */ - -function checkSymbolNodeType(node) { - if (node && (node.type === "atom" || NON_ATOMS.hasOwnProperty(node.type))) { - // $FlowFixMe - return node; - } - - return null; -} - -// NOTE: Unlike most `htmlBuilder`s, this one handles not only "accent", but -// also "supsub" since an accent can affect super/subscripting. -var htmlBuilder$a = (grp, options) => { - // Accents are handled in the TeXbook pg. 443, rule 12. - var base; - var group; - var supSubGroup; - - if (grp && grp.type === "supsub") { - // If our base is a character box, and we have superscripts and - // subscripts, the supsub will defer to us. In particular, we want - // to attach the superscripts and subscripts to the inner body (so - // that the position of the superscripts and subscripts won't be - // affected by the height of the accent). We accomplish this by - // sticking the base of the accent into the base of the supsub, and - // rendering that, while keeping track of where the accent is. - // The real accent group is the base of the supsub group - group = assertNodeType(grp.base, "accent"); // The character box is the base of the accent group - - base = group.base; // Stick the character box into the base of the supsub group - - grp.base = base; // Rerender the supsub group with its new base, and store that - // result. - - supSubGroup = assertSpan(buildGroup$1(grp, options)); // reset original base - - grp.base = group; - } else { - group = assertNodeType(grp, "accent"); - base = group.base; - } // Build the base group - - - var body = buildGroup$1(base, options.havingCrampedStyle()); // Does the accent need to shift for the skew of a character? - - var mustShift = group.isShifty && utils.isCharacterBox(base); // Calculate the skew of the accent. This is based on the line "If the - // nucleus is not a single character, let s = 0; otherwise set s to the - // kern amount for the nucleus followed by the \skewchar of its font." - // Note that our skew metrics are just the kern between each character - // and the skewchar. - - var skew = 0; - - if (mustShift) { - // If the base is a character box, then we want the skew of the - // innermost character. To do that, we find the innermost character: - var baseChar = utils.getBaseElem(base); // Then, we render its group to get the symbol inside it - - var baseGroup = buildGroup$1(baseChar, options.havingCrampedStyle()); // Finally, we pull the skew off of the symbol. - - skew = assertSymbolDomNode(baseGroup).skew; // Note that we now throw away baseGroup, because the layers we - // removed with getBaseElem might contain things like \color which - // we can't get rid of. - // TODO(emily): Find a better way to get the skew - } - - var accentBelow = group.label === "\\c"; // calculate the amount of space between the body and the accent - - var clearance = accentBelow ? body.height + body.depth : Math.min(body.height, options.fontMetrics().xHeight); // Build the accent - - var accentBody; - - if (!group.isStretchy) { - var accent; - var width; - - if (group.label === "\\vec") { - // Before version 0.9, \vec used the combining font glyph U+20D7. - // But browsers, especially Safari, are not consistent in how they - // render combining characters when not preceded by a character. - // So now we use an SVG. - // If Safari reforms, we should consider reverting to the glyph. - accent = buildCommon.staticSvg("vec", options); - width = buildCommon.svgData.vec[1]; - } else { - accent = buildCommon.makeOrd({ - mode: group.mode, - text: group.label - }, options, "textord"); - accent = assertSymbolDomNode(accent); // Remove the italic correction of the accent, because it only serves to - // shift the accent over to a place we don't want. - - accent.italic = 0; - width = accent.width; - - if (accentBelow) { - clearance += accent.depth; - } - } - - accentBody = buildCommon.makeSpan(["accent-body"], [accent]); // "Full" accents expand the width of the resulting symbol to be - // at least the width of the accent, and overlap directly onto the - // character without any vertical offset. - - var accentFull = group.label === "\\textcircled"; - - if (accentFull) { - accentBody.classes.push('accent-full'); - clearance = body.height; - } // Shift the accent over by the skew. - - - var left = skew; // CSS defines `.katex .accent .accent-body:not(.accent-full) { width: 0 }` - // so that the accent doesn't contribute to the bounding box. - // We need to shift the character by its width (effectively half - // its width) to compensate. - - if (!accentFull) { - left -= width / 2; - } - - accentBody.style.left = makeEm(left); // \textcircled uses the \bigcirc glyph, so it needs some - // vertical adjustment to match LaTeX. - - if (group.label === "\\textcircled") { - accentBody.style.top = ".2em"; - } - - accentBody = buildCommon.makeVList({ - positionType: "firstBaseline", - children: [{ - type: "elem", - elem: body - }, { - type: "kern", - size: -clearance - }, { - type: "elem", - elem: accentBody - }] - }, options); - } else { - accentBody = stretchy.svgSpan(group, options); - accentBody = buildCommon.makeVList({ - positionType: "firstBaseline", - children: [{ - type: "elem", - elem: body - }, { - type: "elem", - elem: accentBody, - wrapperClasses: ["svg-align"], - wrapperStyle: skew > 0 ? { - width: "calc(100% - " + makeEm(2 * skew) + ")", - marginLeft: makeEm(2 * skew) - } : undefined - }] - }, options); - } - - var accentWrap = buildCommon.makeSpan(["mord", "accent"], [accentBody], options); - - if (supSubGroup) { - // Here, we replace the "base" child of the supsub with our newly - // generated accent. - supSubGroup.children[0] = accentWrap; // Since we don't rerun the height calculation after replacing the - // accent, we manually recalculate height. - - supSubGroup.height = Math.max(accentWrap.height, supSubGroup.height); // Accents should always be ords, even when their innards are not. - - supSubGroup.classes[0] = "mord"; - return supSubGroup; - } else { - return accentWrap; - } -}; - -var mathmlBuilder$9 = (group, options) => { - var accentNode = group.isStretchy ? stretchy.mathMLnode(group.label) : new mathMLTree.MathNode("mo", [makeText(group.label, group.mode)]); - var node = new mathMLTree.MathNode("mover", [buildGroup(group.base, options), accentNode]); - node.setAttribute("accent", "true"); - return node; -}; - -var NON_STRETCHY_ACCENT_REGEX = new RegExp(["\\acute", "\\grave", "\\ddot", "\\tilde", "\\bar", "\\breve", "\\check", "\\hat", "\\vec", "\\dot", "\\mathring"].map(accent => "\\" + accent).join("|")); // Accents - -defineFunction({ - type: "accent", - names: ["\\acute", "\\grave", "\\ddot", "\\tilde", "\\bar", "\\breve", "\\check", "\\hat", "\\vec", "\\dot", "\\mathring", "\\widecheck", "\\widehat", "\\widetilde", "\\overrightarrow", "\\overleftarrow", "\\Overrightarrow", "\\overleftrightarrow", "\\overgroup", "\\overlinesegment", "\\overleftharpoon", "\\overrightharpoon"], - props: { - numArgs: 1 - }, - handler: (context, args) => { - var base = normalizeArgument(args[0]); - var isStretchy = !NON_STRETCHY_ACCENT_REGEX.test(context.funcName); - var isShifty = !isStretchy || context.funcName === "\\widehat" || context.funcName === "\\widetilde" || context.funcName === "\\widecheck"; - return { - type: "accent", - mode: context.parser.mode, - label: context.funcName, - isStretchy: isStretchy, - isShifty: isShifty, - base: base - }; - }, - htmlBuilder: htmlBuilder$a, - mathmlBuilder: mathmlBuilder$9 -}); // Text-mode accents - -defineFunction({ - type: "accent", - names: ["\\'", "\\`", "\\^", "\\~", "\\=", "\\u", "\\.", '\\"', "\\c", "\\r", "\\H", "\\v", "\\textcircled"], - props: { - numArgs: 1, - allowedInText: true, - allowedInMath: true, - // unless in strict mode - argTypes: ["primitive"] - }, - handler: (context, args) => { - var base = args[0]; - var mode = context.parser.mode; - - if (mode === "math") { - context.parser.settings.reportNonstrict("mathVsTextAccents", "LaTeX's accent " + context.funcName + " works only in text mode"); - mode = "text"; - } - - return { - type: "accent", - mode: mode, - label: context.funcName, - isStretchy: false, - isShifty: true, - base: base - }; - }, - htmlBuilder: htmlBuilder$a, - mathmlBuilder: mathmlBuilder$9 -}); - -// Horizontal overlap functions -defineFunction({ - type: "accentUnder", - names: ["\\underleftarrow", "\\underrightarrow", "\\underleftrightarrow", "\\undergroup", "\\underlinesegment", "\\utilde"], - props: { - numArgs: 1 - }, - handler: (_ref, args) => { - var { - parser, - funcName - } = _ref; - var base = args[0]; - return { - type: "accentUnder", - mode: parser.mode, - label: funcName, - base: base - }; - }, - htmlBuilder: (group, options) => { - // Treat under accents much like underlines. - var innerGroup = buildGroup$1(group.base, options); - var accentBody = stretchy.svgSpan(group, options); - var kern = group.label === "\\utilde" ? 0.12 : 0; // Generate the vlist, with the appropriate kerns - - var vlist = buildCommon.makeVList({ - positionType: "top", - positionData: innerGroup.height, - children: [{ - type: "elem", - elem: accentBody, - wrapperClasses: ["svg-align"] - }, { - type: "kern", - size: kern - }, { - type: "elem", - elem: innerGroup - }] - }, options); - return buildCommon.makeSpan(["mord", "accentunder"], [vlist], options); - }, - mathmlBuilder: (group, options) => { - var accentNode = stretchy.mathMLnode(group.label); - var node = new mathMLTree.MathNode("munder", [buildGroup(group.base, options), accentNode]); - node.setAttribute("accentunder", "true"); - return node; - } -}); - -// Helper function -var paddedNode = group => { - var node = new mathMLTree.MathNode("mpadded", group ? [group] : []); - node.setAttribute("width", "+0.6em"); - node.setAttribute("lspace", "0.3em"); - return node; -}; // Stretchy arrows with an optional argument - - -defineFunction({ - type: "xArrow", - names: ["\\xleftarrow", "\\xrightarrow", "\\xLeftarrow", "\\xRightarrow", "\\xleftrightarrow", "\\xLeftrightarrow", "\\xhookleftarrow", "\\xhookrightarrow", "\\xmapsto", "\\xrightharpoondown", "\\xrightharpoonup", "\\xleftharpoondown", "\\xleftharpoonup", "\\xrightleftharpoons", "\\xleftrightharpoons", "\\xlongequal", "\\xtwoheadrightarrow", "\\xtwoheadleftarrow", "\\xtofrom", // The next 3 functions are here to support the mhchem extension. - // Direct use of these functions is discouraged and may break someday. - "\\xrightleftarrows", "\\xrightequilibrium", "\\xleftequilibrium", // The next 3 functions are here only to support the {CD} environment. - "\\\\cdrightarrow", "\\\\cdleftarrow", "\\\\cdlongequal"], - props: { - numArgs: 1, - numOptionalArgs: 1 - }, - - handler(_ref, args, optArgs) { - var { - parser, - funcName - } = _ref; - return { - type: "xArrow", - mode: parser.mode, - label: funcName, - body: args[0], - below: optArgs[0] - }; - }, - - // Flow is unable to correctly infer the type of `group`, even though it's - // unambiguously determined from the passed-in `type` above. - htmlBuilder(group, options) { - var style = options.style; // Build the argument groups in the appropriate style. - // Ref: amsmath.dtx: \hbox{$\scriptstyle\mkern#3mu{#6}\mkern#4mu$}% - // Some groups can return document fragments. Handle those by wrapping - // them in a span. - - var newOptions = options.havingStyle(style.sup()); - var upperGroup = buildCommon.wrapFragment(buildGroup$1(group.body, newOptions, options), options); - var arrowPrefix = group.label.slice(0, 2) === "\\x" ? "x" : "cd"; - upperGroup.classes.push(arrowPrefix + "-arrow-pad"); - var lowerGroup; - - if (group.below) { - // Build the lower group - newOptions = options.havingStyle(style.sub()); - lowerGroup = buildCommon.wrapFragment(buildGroup$1(group.below, newOptions, options), options); - lowerGroup.classes.push(arrowPrefix + "-arrow-pad"); - } - - var arrowBody = stretchy.svgSpan(group, options); // Re shift: Note that stretchy.svgSpan returned arrowBody.depth = 0. - // The point we want on the math axis is at 0.5 * arrowBody.height. - - var arrowShift = -options.fontMetrics().axisHeight + 0.5 * arrowBody.height; // 2 mu kern. Ref: amsmath.dtx: #7\if0#2\else\mkern#2mu\fi - - var upperShift = -options.fontMetrics().axisHeight - 0.5 * arrowBody.height - 0.111; // 0.111 em = 2 mu - - if (upperGroup.depth > 0.25 || group.label === "\\xleftequilibrium") { - upperShift -= upperGroup.depth; // shift up if depth encroaches - } // Generate the vlist - - - var vlist; - - if (lowerGroup) { - var lowerShift = -options.fontMetrics().axisHeight + lowerGroup.height + 0.5 * arrowBody.height + 0.111; - vlist = buildCommon.makeVList({ - positionType: "individualShift", - children: [{ - type: "elem", - elem: upperGroup, - shift: upperShift - }, { - type: "elem", - elem: arrowBody, - shift: arrowShift - }, { - type: "elem", - elem: lowerGroup, - shift: lowerShift - }] - }, options); - } else { - vlist = buildCommon.makeVList({ - positionType: "individualShift", - children: [{ - type: "elem", - elem: upperGroup, - shift: upperShift - }, { - type: "elem", - elem: arrowBody, - shift: arrowShift - }] - }, options); - } // $FlowFixMe: Replace this with passing "svg-align" into makeVList. - - - vlist.children[0].children[0].children[1].classes.push("svg-align"); - return buildCommon.makeSpan(["mrel", "x-arrow"], [vlist], options); - }, - - mathmlBuilder(group, options) { - var arrowNode = stretchy.mathMLnode(group.label); - arrowNode.setAttribute("minsize", group.label.charAt(0) === "x" ? "1.75em" : "3.0em"); - var node; - - if (group.body) { - var upperNode = paddedNode(buildGroup(group.body, options)); - - if (group.below) { - var lowerNode = paddedNode(buildGroup(group.below, options)); - node = new mathMLTree.MathNode("munderover", [arrowNode, lowerNode, upperNode]); - } else { - node = new mathMLTree.MathNode("mover", [arrowNode, upperNode]); - } - } else if (group.below) { - var _lowerNode = paddedNode(buildGroup(group.below, options)); - - node = new mathMLTree.MathNode("munder", [arrowNode, _lowerNode]); - } else { - // This should never happen. - // Parser.js throws an error if there is no argument. - node = paddedNode(); - node = new mathMLTree.MathNode("mover", [arrowNode, node]); - } - - return node; - } - -}); - -var makeSpan = buildCommon.makeSpan; - -function htmlBuilder$9(group, options) { - var elements = buildExpression$1(group.body, options, true); - return makeSpan([group.mclass], elements, options); -} - -function mathmlBuilder$8(group, options) { - var node; - var inner = buildExpression(group.body, options); - - if (group.mclass === "minner") { - node = new mathMLTree.MathNode("mpadded", inner); - } else if (group.mclass === "mord") { - if (group.isCharacterBox) { - node = inner[0]; - node.type = "mi"; - } else { - node = new mathMLTree.MathNode("mi", inner); - } - } else { - if (group.isCharacterBox) { - node = inner[0]; - node.type = "mo"; - } else { - node = new mathMLTree.MathNode("mo", inner); - } // Set spacing based on what is the most likely adjacent atom type. - // See TeXbook p170. - - - if (group.mclass === "mbin") { - node.attributes.lspace = "0.22em"; // medium space - - node.attributes.rspace = "0.22em"; - } else if (group.mclass === "mpunct") { - node.attributes.lspace = "0em"; - node.attributes.rspace = "0.17em"; // thinspace - } else if (group.mclass === "mopen" || group.mclass === "mclose") { - node.attributes.lspace = "0em"; - node.attributes.rspace = "0em"; - } else if (group.mclass === "minner") { - node.attributes.lspace = "0.0556em"; // 1 mu is the most likely option - - node.attributes.width = "+0.1111em"; - } // MathML default space is 5/18 em, so needs no action. - // Ref: https://developer.mozilla.org/en-US/docs/Web/MathML/Element/mo - - } - - return node; -} // Math class commands except \mathop - - -defineFunction({ - type: "mclass", - names: ["\\mathord", "\\mathbin", "\\mathrel", "\\mathopen", "\\mathclose", "\\mathpunct", "\\mathinner"], - props: { - numArgs: 1, - primitive: true - }, - - handler(_ref, args) { - var { - parser, - funcName - } = _ref; - var body = args[0]; - return { - type: "mclass", - mode: parser.mode, - mclass: "m" + funcName.slice(5), - // TODO(kevinb): don't prefix with 'm' - body: ordargument(body), - isCharacterBox: utils.isCharacterBox(body) - }; - }, - - htmlBuilder: htmlBuilder$9, - mathmlBuilder: mathmlBuilder$8 -}); -var binrelClass = arg => { - // \binrel@ spacing varies with (bin|rel|ord) of the atom in the argument. - // (by rendering separately and with {}s before and after, and measuring - // the change in spacing). We'll do roughly the same by detecting the - // atom type directly. - var atom = arg.type === "ordgroup" && arg.body.length ? arg.body[0] : arg; - - if (atom.type === "atom" && (atom.family === "bin" || atom.family === "rel")) { - return "m" + atom.family; - } else { - return "mord"; - } -}; // \@binrel{x}{y} renders like y but as mbin/mrel/mord if x is mbin/mrel/mord. -// This is equivalent to \binrel@{x}\binrel@@{y} in AMSTeX. - -defineFunction({ - type: "mclass", - names: ["\\@binrel"], - props: { - numArgs: 2 - }, - - handler(_ref2, args) { - var { - parser - } = _ref2; - return { - type: "mclass", - mode: parser.mode, - mclass: binrelClass(args[0]), - body: ordargument(args[1]), - isCharacterBox: utils.isCharacterBox(args[1]) - }; - } - -}); // Build a relation or stacked op by placing one symbol on top of another - -defineFunction({ - type: "mclass", - names: ["\\stackrel", "\\overset", "\\underset"], - props: { - numArgs: 2 - }, - - handler(_ref3, args) { - var { - parser, - funcName - } = _ref3; - var baseArg = args[1]; - var shiftedArg = args[0]; - var mclass; - - if (funcName !== "\\stackrel") { - // LaTeX applies \binrel spacing to \overset and \underset. - mclass = binrelClass(baseArg); - } else { - mclass = "mrel"; // for \stackrel - } - - var baseOp = { - type: "op", - mode: baseArg.mode, - limits: true, - alwaysHandleSupSub: true, - parentIsSupSub: false, - symbol: false, - suppressBaseShift: funcName !== "\\stackrel", - body: ordargument(baseArg) - }; - var supsub = { - type: "supsub", - mode: shiftedArg.mode, - base: baseOp, - sup: funcName === "\\underset" ? null : shiftedArg, - sub: funcName === "\\underset" ? shiftedArg : null - }; - return { - type: "mclass", - mode: parser.mode, - mclass, - body: [supsub], - isCharacterBox: utils.isCharacterBox(supsub) - }; - }, - - htmlBuilder: htmlBuilder$9, - mathmlBuilder: mathmlBuilder$8 -}); - -// \pmb is a simulation of bold font. -// The version of \pmb in ambsy.sty works by typesetting three copies -// with small offsets. We use CSS text-shadow. -// It's a hack. Not as good as a real bold font. Better than nothing. -defineFunction({ - type: "pmb", - names: ["\\pmb"], - props: { - numArgs: 1, - allowedInText: true - }, - - handler(_ref, args) { - var { - parser - } = _ref; - return { - type: "pmb", - mode: parser.mode, - mclass: binrelClass(args[0]), - body: ordargument(args[0]) - }; - }, - - htmlBuilder(group, options) { - var elements = buildExpression$1(group.body, options, true); - var node = buildCommon.makeSpan([group.mclass], elements, options); - node.style.textShadow = "0.02em 0.01em 0.04px"; - return node; - }, - - mathmlBuilder(group, style) { - var inner = buildExpression(group.body, style); // Wrap with an element. - - var node = new mathMLTree.MathNode("mstyle", inner); - node.setAttribute("style", "text-shadow: 0.02em 0.01em 0.04px"); - return node; - } - -}); - -var cdArrowFunctionName = { - ">": "\\\\cdrightarrow", - "<": "\\\\cdleftarrow", - "=": "\\\\cdlongequal", - "A": "\\uparrow", - "V": "\\downarrow", - "|": "\\Vert", - ".": "no arrow" -}; - -var newCell = () => { - // Create an empty cell, to be filled below with parse nodes. - // The parseTree from this module must be constructed like the - // one created by parseArray(), so an empty CD cell must - // be a ParseNode<"styling">. And CD is always displaystyle. - // So these values are fixed and flow can do implicit typing. - return { - type: "styling", - body: [], - mode: "math", - style: "display" - }; -}; - -var isStartOfArrow = node => { - return node.type === "textord" && node.text === "@"; -}; - -var isLabelEnd = (node, endChar) => { - return (node.type === "mathord" || node.type === "atom") && node.text === endChar; -}; - -function cdArrow(arrowChar, labels, parser) { - // Return a parse tree of an arrow and its labels. - // This acts in a way similar to a macro expansion. - var funcName = cdArrowFunctionName[arrowChar]; - - switch (funcName) { - case "\\\\cdrightarrow": - case "\\\\cdleftarrow": - return parser.callFunction(funcName, [labels[0]], [labels[1]]); - - case "\\uparrow": - case "\\downarrow": - { - var leftLabel = parser.callFunction("\\\\cdleft", [labels[0]], []); - var bareArrow = { - type: "atom", - text: funcName, - mode: "math", - family: "rel" - }; - var sizedArrow = parser.callFunction("\\Big", [bareArrow], []); - var rightLabel = parser.callFunction("\\\\cdright", [labels[1]], []); - var arrowGroup = { - type: "ordgroup", - mode: "math", - body: [leftLabel, sizedArrow, rightLabel] - }; - return parser.callFunction("\\\\cdparent", [arrowGroup], []); - } - - case "\\\\cdlongequal": - return parser.callFunction("\\\\cdlongequal", [], []); - - case "\\Vert": - { - var arrow = { - type: "textord", - text: "\\Vert", - mode: "math" - }; - return parser.callFunction("\\Big", [arrow], []); - } - - default: - return { - type: "textord", - text: " ", - mode: "math" - }; - } -} - -function parseCD(parser) { - // Get the array's parse nodes with \\ temporarily mapped to \cr. - var parsedRows = []; - parser.gullet.beginGroup(); - parser.gullet.macros.set("\\cr", "\\\\\\relax"); - parser.gullet.beginGroup(); - - while (true) { - // eslint-disable-line no-constant-condition - // Get the parse nodes for the next row. - parsedRows.push(parser.parseExpression(false, "\\\\")); - parser.gullet.endGroup(); - parser.gullet.beginGroup(); - var next = parser.fetch().text; - - if (next === "&" || next === "\\\\") { - parser.consume(); - } else if (next === "\\end") { - if (parsedRows[parsedRows.length - 1].length === 0) { - parsedRows.pop(); // final row ended in \\ - } - - break; - } else { - throw new ParseError("Expected \\\\ or \\cr or \\end", parser.nextToken); - } - } - - var row = []; - var body = [row]; // Loop thru the parse nodes. Collect them into cells and arrows. - - for (var i = 0; i < parsedRows.length; i++) { - // Start a new row. - var rowNodes = parsedRows[i]; // Create the first cell. - - var cell = newCell(); - - for (var j = 0; j < rowNodes.length; j++) { - if (!isStartOfArrow(rowNodes[j])) { - // If a parseNode is not an arrow, it goes into a cell. - cell.body.push(rowNodes[j]); - } else { - // Parse node j is an "@", the start of an arrow. - // Before starting on the arrow, push the cell into `row`. - row.push(cell); // Now collect parseNodes into an arrow. - // The character after "@" defines the arrow type. - - j += 1; - var arrowChar = assertSymbolNodeType(rowNodes[j]).text; // Create two empty label nodes. We may or may not use them. - - var labels = new Array(2); - labels[0] = { - type: "ordgroup", - mode: "math", - body: [] - }; - labels[1] = { - type: "ordgroup", - mode: "math", - body: [] - }; // Process the arrow. - - if ("=|.".indexOf(arrowChar) > -1) ; else if ("<>AV".indexOf(arrowChar) > -1) { - // Four arrows, `@>>>`, `@<<<`, `@AAA`, and `@VVV`, each take - // two optional labels. E.g. the right-point arrow syntax is - // really: @>{optional label}>{optional label}> - // Collect parseNodes into labels. - for (var labelNum = 0; labelNum < 2; labelNum++) { - var inLabel = true; - - for (var k = j + 1; k < rowNodes.length; k++) { - if (isLabelEnd(rowNodes[k], arrowChar)) { - inLabel = false; - j = k; - break; - } - - if (isStartOfArrow(rowNodes[k])) { - throw new ParseError("Missing a " + arrowChar + " character to complete a CD arrow.", rowNodes[k]); - } - - labels[labelNum].body.push(rowNodes[k]); - } - - if (inLabel) { - // isLabelEnd never returned a true. - throw new ParseError("Missing a " + arrowChar + " character to complete a CD arrow.", rowNodes[j]); - } - } - } else { - throw new ParseError("Expected one of \"<>AV=|.\" after @", rowNodes[j]); - } // Now join the arrow to its labels. - - - var arrow = cdArrow(arrowChar, labels, parser); // Wrap the arrow in ParseNode<"styling">. - // This is done to match parseArray() behavior. - - var wrappedArrow = { - type: "styling", - body: [arrow], - mode: "math", - style: "display" // CD is always displaystyle. - - }; - row.push(wrappedArrow); // In CD's syntax, cells are implicit. That is, everything that - // is not an arrow gets collected into a cell. So create an empty - // cell now. It will collect upcoming parseNodes. - - cell = newCell(); - } - } - - if (i % 2 === 0) { - // Even-numbered rows consist of: cell, arrow, cell, arrow, ... cell - // The last cell is not yet pushed into `row`, so: - row.push(cell); - } else { - // Odd-numbered rows consist of: vert arrow, empty cell, ... vert arrow - // Remove the empty cell that was placed at the beginning of `row`. - row.shift(); - } - - row = []; - body.push(row); - } // End row group - - - parser.gullet.endGroup(); // End array group defining \\ - - parser.gullet.endGroup(); // define column separation. - - var cols = new Array(body[0].length).fill({ - type: "align", - align: "c", - pregap: 0.25, - // CD package sets \enskip between columns. - postgap: 0.25 // So pre and post each get half an \enskip, i.e. 0.25em. - - }); - return { - type: "array", - mode: "math", - body, - arraystretch: 1, - addJot: true, - rowGaps: [null], - cols, - colSeparationType: "CD", - hLinesBeforeRow: new Array(body.length + 1).fill([]) - }; -} // The functions below are not available for general use. -// They are here only for internal use by the {CD} environment in placing labels -// next to vertical arrows. -// We don't need any such functions for horizontal arrows because we can reuse -// the functionality that already exists for extensible arrows. - -defineFunction({ - type: "cdlabel", - names: ["\\\\cdleft", "\\\\cdright"], - props: { - numArgs: 1 - }, - - handler(_ref, args) { - var { - parser, - funcName - } = _ref; - return { - type: "cdlabel", - mode: parser.mode, - side: funcName.slice(4), - label: args[0] - }; - }, - - htmlBuilder(group, options) { - var newOptions = options.havingStyle(options.style.sup()); - var label = buildCommon.wrapFragment(buildGroup$1(group.label, newOptions, options), options); - label.classes.push("cd-label-" + group.side); - label.style.bottom = makeEm(0.8 - label.depth); // Zero out label height & depth, so vertical align of arrow is set - // by the arrow height, not by the label. - - label.height = 0; - label.depth = 0; - return label; - }, - - mathmlBuilder(group, options) { - var label = new mathMLTree.MathNode("mrow", [buildGroup(group.label, options)]); - label = new mathMLTree.MathNode("mpadded", [label]); - label.setAttribute("width", "0"); - - if (group.side === "left") { - label.setAttribute("lspace", "-1width"); - } // We have to guess at vertical alignment. We know the arrow is 1.8em tall, - // But we don't know the height or depth of the label. - - - label.setAttribute("voffset", "0.7em"); - label = new mathMLTree.MathNode("mstyle", [label]); - label.setAttribute("displaystyle", "false"); - label.setAttribute("scriptlevel", "1"); - return label; - } - -}); -defineFunction({ - type: "cdlabelparent", - names: ["\\\\cdparent"], - props: { - numArgs: 1 - }, - - handler(_ref2, args) { - var { - parser - } = _ref2; - return { - type: "cdlabelparent", - mode: parser.mode, - fragment: args[0] - }; - }, - - htmlBuilder(group, options) { - // Wrap the vertical arrow and its labels. - // The parent gets position: relative. The child gets position: absolute. - // So CSS can locate the label correctly. - var parent = buildCommon.wrapFragment(buildGroup$1(group.fragment, options), options); - parent.classes.push("cd-vert-arrow"); - return parent; - }, - - mathmlBuilder(group, options) { - return new mathMLTree.MathNode("mrow", [buildGroup(group.fragment, options)]); - } - -}); - -// {123} and converts into symbol with code 123. It is used by the *macro* -// \char defined in macros.js. - -defineFunction({ - type: "textord", - names: ["\\@char"], - props: { - numArgs: 1, - allowedInText: true - }, - - handler(_ref, args) { - var { - parser - } = _ref; - var arg = assertNodeType(args[0], "ordgroup"); - var group = arg.body; - var number = ""; - - for (var i = 0; i < group.length; i++) { - var node = assertNodeType(group[i], "textord"); - number += node.text; - } - - var code = parseInt(number); - var text; - - if (isNaN(code)) { - throw new ParseError("\\@char has non-numeric argument " + number); // If we drop IE support, the following code could be replaced with - // text = String.fromCodePoint(code) - } else if (code < 0 || code >= 0x10ffff) { - throw new ParseError("\\@char with invalid code point " + number); - } else if (code <= 0xffff) { - text = String.fromCharCode(code); - } else { - // Astral code point; split into surrogate halves - code -= 0x10000; - text = String.fromCharCode((code >> 10) + 0xd800, (code & 0x3ff) + 0xdc00); - } - - return { - type: "textord", - mode: parser.mode, - text: text - }; - } - -}); - -var htmlBuilder$8 = (group, options) => { - var elements = buildExpression$1(group.body, options.withColor(group.color), false); // \color isn't supposed to affect the type of the elements it contains. - // To accomplish this, we wrap the results in a fragment, so the inner - // elements will be able to directly interact with their neighbors. For - // example, `\color{red}{2 +} 3` has the same spacing as `2 + 3` - - return buildCommon.makeFragment(elements); -}; - -var mathmlBuilder$7 = (group, options) => { - var inner = buildExpression(group.body, options.withColor(group.color)); - var node = new mathMLTree.MathNode("mstyle", inner); - node.setAttribute("mathcolor", group.color); - return node; -}; - -defineFunction({ - type: "color", - names: ["\\textcolor"], - props: { - numArgs: 2, - allowedInText: true, - argTypes: ["color", "original"] - }, - - handler(_ref, args) { - var { - parser - } = _ref; - var color = assertNodeType(args[0], "color-token").color; - var body = args[1]; - return { - type: "color", - mode: parser.mode, - color, - body: ordargument(body) - }; - }, - - htmlBuilder: htmlBuilder$8, - mathmlBuilder: mathmlBuilder$7 -}); -defineFunction({ - type: "color", - names: ["\\color"], - props: { - numArgs: 1, - allowedInText: true, - argTypes: ["color"] - }, - - handler(_ref2, args) { - var { - parser, - breakOnTokenText - } = _ref2; - var color = assertNodeType(args[0], "color-token").color; // Set macro \current@color in current namespace to store the current - // color, mimicking the behavior of color.sty. - // This is currently used just to correctly color a \right - // that follows a \color command. - - parser.gullet.macros.set("\\current@color", color); // Parse out the implicit body that should be colored. - - var body = parser.parseExpression(true, breakOnTokenText); - return { - type: "color", - mode: parser.mode, - color, - body - }; - }, - - htmlBuilder: htmlBuilder$8, - mathmlBuilder: mathmlBuilder$7 -}); - -// Row breaks within tabular environments, and line breaks at top level - -defineFunction({ - type: "cr", - names: ["\\\\"], - props: { - numArgs: 0, - numOptionalArgs: 0, - allowedInText: true - }, - - handler(_ref, args, optArgs) { - var { - parser - } = _ref; - var size = parser.gullet.future().text === "[" ? parser.parseSizeGroup(true) : null; - var newLine = !parser.settings.displayMode || !parser.settings.useStrictBehavior("newLineInDisplayMode", "In LaTeX, \\\\ or \\newline " + "does nothing in display mode"); - return { - type: "cr", - mode: parser.mode, - newLine, - size: size && assertNodeType(size, "size").value - }; - }, - - // The following builders are called only at the top level, - // not within tabular/array environments. - htmlBuilder(group, options) { - var span = buildCommon.makeSpan(["mspace"], [], options); - - if (group.newLine) { - span.classes.push("newline"); - - if (group.size) { - span.style.marginTop = makeEm(calculateSize(group.size, options)); - } - } - - return span; - }, - - mathmlBuilder(group, options) { - var node = new mathMLTree.MathNode("mspace"); - - if (group.newLine) { - node.setAttribute("linebreak", "newline"); - - if (group.size) { - node.setAttribute("height", makeEm(calculateSize(group.size, options))); - } - } - - return node; - } - -}); - -var globalMap = { - "\\global": "\\global", - "\\long": "\\\\globallong", - "\\\\globallong": "\\\\globallong", - "\\def": "\\gdef", - "\\gdef": "\\gdef", - "\\edef": "\\xdef", - "\\xdef": "\\xdef", - "\\let": "\\\\globallet", - "\\futurelet": "\\\\globalfuture" -}; - -var checkControlSequence = tok => { - var name = tok.text; - - if (/^(?:[\\{}$&#^_]|EOF)$/.test(name)) { - throw new ParseError("Expected a control sequence", tok); - } - - return name; -}; - -var getRHS = parser => { - var tok = parser.gullet.popToken(); - - if (tok.text === "=") { - // consume optional equals - tok = parser.gullet.popToken(); - - if (tok.text === " ") { - // consume one optional space - tok = parser.gullet.popToken(); - } - } - - return tok; -}; - -var letCommand = (parser, name, tok, global) => { - var macro = parser.gullet.macros.get(tok.text); - - if (macro == null) { - // don't expand it later even if a macro with the same name is defined - // e.g., \let\foo=\frac \def\frac{\relax} \frac12 - tok.noexpand = true; - macro = { - tokens: [tok], - numArgs: 0, - // reproduce the same behavior in expansion - unexpandable: !parser.gullet.isExpandable(tok.text) - }; - } - - parser.gullet.macros.set(name, macro, global); -}; // -> | -// -> |\global -// -> | -// -> \global|\long|\outer - - -defineFunction({ - type: "internal", - names: ["\\global", "\\long", "\\\\globallong" // can’t be entered directly - ], - props: { - numArgs: 0, - allowedInText: true - }, - - handler(_ref) { - var { - parser, - funcName - } = _ref; - parser.consumeSpaces(); - var token = parser.fetch(); - - if (globalMap[token.text]) { - // KaTeX doesn't have \par, so ignore \long - if (funcName === "\\global" || funcName === "\\\\globallong") { - token.text = globalMap[token.text]; - } - - return assertNodeType(parser.parseFunction(), "internal"); - } - - throw new ParseError("Invalid token after macro prefix", token); - } - -}); // Basic support for macro definitions: \def, \gdef, \edef, \xdef -// -> -// -> \def|\gdef|\edef|\xdef -// -> - -defineFunction({ - type: "internal", - names: ["\\def", "\\gdef", "\\edef", "\\xdef"], - props: { - numArgs: 0, - allowedInText: true, - primitive: true - }, - - handler(_ref2) { - var { - parser, - funcName - } = _ref2; - var tok = parser.gullet.popToken(); - var name = tok.text; - - if (/^(?:[\\{}$&#^_]|EOF)$/.test(name)) { - throw new ParseError("Expected a control sequence", tok); - } - - var numArgs = 0; - var insert; - var delimiters = [[]]; // contains no braces - - while (parser.gullet.future().text !== "{") { - tok = parser.gullet.popToken(); - - if (tok.text === "#") { - // If the very last character of the is #, so that - // this # is immediately followed by {, TeX will behave as if the { - // had been inserted at the right end of both the parameter text - // and the replacement text. - if (parser.gullet.future().text === "{") { - insert = parser.gullet.future(); - delimiters[numArgs].push("{"); - break; - } // A parameter, the first appearance of # must be followed by 1, - // the next by 2, and so on; up to nine #’s are allowed - - - tok = parser.gullet.popToken(); - - if (!/^[1-9]$/.test(tok.text)) { - throw new ParseError("Invalid argument number \"" + tok.text + "\""); - } - - if (parseInt(tok.text) !== numArgs + 1) { - throw new ParseError("Argument number \"" + tok.text + "\" out of order"); - } - - numArgs++; - delimiters.push([]); - } else if (tok.text === "EOF") { - throw new ParseError("Expected a macro definition"); - } else { - delimiters[numArgs].push(tok.text); - } - } // replacement text, enclosed in '{' and '}' and properly nested - - - var { - tokens - } = parser.gullet.consumeArg(); - - if (insert) { - tokens.unshift(insert); - } - - if (funcName === "\\edef" || funcName === "\\xdef") { - tokens = parser.gullet.expandTokens(tokens); - tokens.reverse(); // to fit in with stack order - } // Final arg is the expansion of the macro - - - parser.gullet.macros.set(name, { - tokens, - numArgs, - delimiters - }, funcName === globalMap[funcName]); - return { - type: "internal", - mode: parser.mode - }; - } - -}); // -> -// -> \futurelet -// | \let -// -> |= - -defineFunction({ - type: "internal", - names: ["\\let", "\\\\globallet" // can’t be entered directly - ], - props: { - numArgs: 0, - allowedInText: true, - primitive: true - }, - - handler(_ref3) { - var { - parser, - funcName - } = _ref3; - var name = checkControlSequence(parser.gullet.popToken()); - parser.gullet.consumeSpaces(); - var tok = getRHS(parser); - letCommand(parser, name, tok, funcName === "\\\\globallet"); - return { - type: "internal", - mode: parser.mode - }; - } - -}); // ref: https://www.tug.org/TUGboat/tb09-3/tb22bechtolsheim.pdf - -defineFunction({ - type: "internal", - names: ["\\futurelet", "\\\\globalfuture" // can’t be entered directly - ], - props: { - numArgs: 0, - allowedInText: true, - primitive: true - }, - - handler(_ref4) { - var { - parser, - funcName - } = _ref4; - var name = checkControlSequence(parser.gullet.popToken()); - var middle = parser.gullet.popToken(); - var tok = parser.gullet.popToken(); - letCommand(parser, name, tok, funcName === "\\\\globalfuture"); - parser.gullet.pushToken(tok); - parser.gullet.pushToken(middle); - return { - type: "internal", - mode: parser.mode - }; - } - -}); - -/** - * This file deals with creating delimiters of various sizes. The TeXbook - * discusses these routines on page 441-442, in the "Another subroutine sets box - * x to a specified variable delimiter" paragraph. - * - * There are three main routines here. `makeSmallDelim` makes a delimiter in the - * normal font, but in either text, script, or scriptscript style. - * `makeLargeDelim` makes a delimiter in textstyle, but in one of the Size1, - * Size2, Size3, or Size4 fonts. `makeStackedDelim` makes a delimiter out of - * smaller pieces that are stacked on top of one another. - * - * The functions take a parameter `center`, which determines if the delimiter - * should be centered around the axis. - * - * Then, there are three exposed functions. `sizedDelim` makes a delimiter in - * one of the given sizes. This is used for things like `\bigl`. - * `customSizedDelim` makes a delimiter with a given total height+depth. It is - * called in places like `\sqrt`. `leftRightDelim` makes an appropriate - * delimiter which surrounds an expression of a given height an depth. It is - * used in `\left` and `\right`. - */ - -/** - * Get the metrics for a given symbol and font, after transformation (i.e. - * after following replacement from symbols.js) - */ -var getMetrics = function getMetrics(symbol, font, mode) { - var replace = symbols.math[symbol] && symbols.math[symbol].replace; - var metrics = getCharacterMetrics(replace || symbol, font, mode); - - if (!metrics) { - throw new Error("Unsupported symbol " + symbol + " and font size " + font + "."); - } - - return metrics; -}; -/** - * Puts a delimiter span in a given style, and adds appropriate height, depth, - * and maxFontSizes. - */ - - -var styleWrap = function styleWrap(delim, toStyle, options, classes) { - var newOptions = options.havingBaseStyle(toStyle); - var span = buildCommon.makeSpan(classes.concat(newOptions.sizingClasses(options)), [delim], options); - var delimSizeMultiplier = newOptions.sizeMultiplier / options.sizeMultiplier; - span.height *= delimSizeMultiplier; - span.depth *= delimSizeMultiplier; - span.maxFontSize = newOptions.sizeMultiplier; - return span; -}; - -var centerSpan = function centerSpan(span, options, style) { - var newOptions = options.havingBaseStyle(style); - var shift = (1 - options.sizeMultiplier / newOptions.sizeMultiplier) * options.fontMetrics().axisHeight; - span.classes.push("delimcenter"); - span.style.top = makeEm(shift); - span.height -= shift; - span.depth += shift; -}; -/** - * Makes a small delimiter. This is a delimiter that comes in the Main-Regular - * font, but is restyled to either be in textstyle, scriptstyle, or - * scriptscriptstyle. - */ - - -var makeSmallDelim = function makeSmallDelim(delim, style, center, options, mode, classes) { - var text = buildCommon.makeSymbol(delim, "Main-Regular", mode, options); - var span = styleWrap(text, style, options, classes); - - if (center) { - centerSpan(span, options, style); - } - - return span; -}; -/** - * Builds a symbol in the given font size (note size is an integer) - */ - - -var mathrmSize = function mathrmSize(value, size, mode, options) { - return buildCommon.makeSymbol(value, "Size" + size + "-Regular", mode, options); -}; -/** - * Makes a large delimiter. This is a delimiter that comes in the Size1, Size2, - * Size3, or Size4 fonts. It is always rendered in textstyle. - */ - - -var makeLargeDelim = function makeLargeDelim(delim, size, center, options, mode, classes) { - var inner = mathrmSize(delim, size, mode, options); - var span = styleWrap(buildCommon.makeSpan(["delimsizing", "size" + size], [inner], options), Style$1.TEXT, options, classes); - - if (center) { - centerSpan(span, options, Style$1.TEXT); - } - - return span; -}; -/** - * Make a span from a font glyph with the given offset and in the given font. - * This is used in makeStackedDelim to make the stacking pieces for the delimiter. - */ - - -var makeGlyphSpan = function makeGlyphSpan(symbol, font, mode) { - var sizeClass; // Apply the correct CSS class to choose the right font. - - if (font === "Size1-Regular") { - sizeClass = "delim-size1"; - } else - /* if (font === "Size4-Regular") */ - { - sizeClass = "delim-size4"; - } - - var corner = buildCommon.makeSpan(["delimsizinginner", sizeClass], [buildCommon.makeSpan([], [buildCommon.makeSymbol(symbol, font, mode)])]); // Since this will be passed into `makeVList` in the end, wrap the element - // in the appropriate tag that VList uses. - - return { - type: "elem", - elem: corner - }; -}; - -var makeInner = function makeInner(ch, height, options) { - // Create a span with inline SVG for the inner part of a tall stacked delimiter. - var width = fontMetricsData['Size4-Regular'][ch.charCodeAt(0)] ? fontMetricsData['Size4-Regular'][ch.charCodeAt(0)][4] : fontMetricsData['Size1-Regular'][ch.charCodeAt(0)][4]; - var path = new PathNode("inner", innerPath(ch, Math.round(1000 * height))); - var svgNode = new SvgNode([path], { - "width": makeEm(width), - "height": makeEm(height), - // Override CSS rule `.katex svg { width: 100% }` - "style": "width:" + makeEm(width), - "viewBox": "0 0 " + 1000 * width + " " + Math.round(1000 * height), - "preserveAspectRatio": "xMinYMin" - }); - var span = buildCommon.makeSvgSpan([], [svgNode], options); - span.height = height; - span.style.height = makeEm(height); - span.style.width = makeEm(width); - return { - type: "elem", - elem: span - }; -}; // Helpers for makeStackedDelim - - -var lapInEms = 0.008; -var lap = { - type: "kern", - size: -1 * lapInEms -}; -var verts = ["|", "\\lvert", "\\rvert", "\\vert"]; -var doubleVerts = ["\\|", "\\lVert", "\\rVert", "\\Vert"]; -/** - * Make a stacked delimiter out of a given delimiter, with the total height at - * least `heightTotal`. This routine is mentioned on page 442 of the TeXbook. - */ - -var makeStackedDelim = function makeStackedDelim(delim, heightTotal, center, options, mode, classes) { - // There are four parts, the top, an optional middle, a repeated part, and a - // bottom. - var top; - var middle; - var repeat; - var bottom; - var svgLabel = ""; - var viewBoxWidth = 0; - top = repeat = bottom = delim; - middle = null; // Also keep track of what font the delimiters are in - - var font = "Size1-Regular"; // We set the parts and font based on the symbol. Note that we use - // '\u23d0' instead of '|' and '\u2016' instead of '\\|' for the - // repeats of the arrows - - if (delim === "\\uparrow") { - repeat = bottom = "\u23d0"; - } else if (delim === "\\Uparrow") { - repeat = bottom = "\u2016"; - } else if (delim === "\\downarrow") { - top = repeat = "\u23d0"; - } else if (delim === "\\Downarrow") { - top = repeat = "\u2016"; - } else if (delim === "\\updownarrow") { - top = "\\uparrow"; - repeat = "\u23d0"; - bottom = "\\downarrow"; - } else if (delim === "\\Updownarrow") { - top = "\\Uparrow"; - repeat = "\u2016"; - bottom = "\\Downarrow"; - } else if (utils.contains(verts, delim)) { - repeat = "\u2223"; - svgLabel = "vert"; - viewBoxWidth = 333; - } else if (utils.contains(doubleVerts, delim)) { - repeat = "\u2225"; - svgLabel = "doublevert"; - viewBoxWidth = 556; - } else if (delim === "[" || delim === "\\lbrack") { - top = "\u23a1"; - repeat = "\u23a2"; - bottom = "\u23a3"; - font = "Size4-Regular"; - svgLabel = "lbrack"; - viewBoxWidth = 667; - } else if (delim === "]" || delim === "\\rbrack") { - top = "\u23a4"; - repeat = "\u23a5"; - bottom = "\u23a6"; - font = "Size4-Regular"; - svgLabel = "rbrack"; - viewBoxWidth = 667; - } else if (delim === "\\lfloor" || delim === "\u230a") { - repeat = top = "\u23a2"; - bottom = "\u23a3"; - font = "Size4-Regular"; - svgLabel = "lfloor"; - viewBoxWidth = 667; - } else if (delim === "\\lceil" || delim === "\u2308") { - top = "\u23a1"; - repeat = bottom = "\u23a2"; - font = "Size4-Regular"; - svgLabel = "lceil"; - viewBoxWidth = 667; - } else if (delim === "\\rfloor" || delim === "\u230b") { - repeat = top = "\u23a5"; - bottom = "\u23a6"; - font = "Size4-Regular"; - svgLabel = "rfloor"; - viewBoxWidth = 667; - } else if (delim === "\\rceil" || delim === "\u2309") { - top = "\u23a4"; - repeat = bottom = "\u23a5"; - font = "Size4-Regular"; - svgLabel = "rceil"; - viewBoxWidth = 667; - } else if (delim === "(" || delim === "\\lparen") { - top = "\u239b"; - repeat = "\u239c"; - bottom = "\u239d"; - font = "Size4-Regular"; - svgLabel = "lparen"; - viewBoxWidth = 875; - } else if (delim === ")" || delim === "\\rparen") { - top = "\u239e"; - repeat = "\u239f"; - bottom = "\u23a0"; - font = "Size4-Regular"; - svgLabel = "rparen"; - viewBoxWidth = 875; - } else if (delim === "\\{" || delim === "\\lbrace") { - top = "\u23a7"; - middle = "\u23a8"; - bottom = "\u23a9"; - repeat = "\u23aa"; - font = "Size4-Regular"; - } else if (delim === "\\}" || delim === "\\rbrace") { - top = "\u23ab"; - middle = "\u23ac"; - bottom = "\u23ad"; - repeat = "\u23aa"; - font = "Size4-Regular"; - } else if (delim === "\\lgroup" || delim === "\u27ee") { - top = "\u23a7"; - bottom = "\u23a9"; - repeat = "\u23aa"; - font = "Size4-Regular"; - } else if (delim === "\\rgroup" || delim === "\u27ef") { - top = "\u23ab"; - bottom = "\u23ad"; - repeat = "\u23aa"; - font = "Size4-Regular"; - } else if (delim === "\\lmoustache" || delim === "\u23b0") { - top = "\u23a7"; - bottom = "\u23ad"; - repeat = "\u23aa"; - font = "Size4-Regular"; - } else if (delim === "\\rmoustache" || delim === "\u23b1") { - top = "\u23ab"; - bottom = "\u23a9"; - repeat = "\u23aa"; - font = "Size4-Regular"; - } // Get the metrics of the four sections - - - var topMetrics = getMetrics(top, font, mode); - var topHeightTotal = topMetrics.height + topMetrics.depth; - var repeatMetrics = getMetrics(repeat, font, mode); - var repeatHeightTotal = repeatMetrics.height + repeatMetrics.depth; - var bottomMetrics = getMetrics(bottom, font, mode); - var bottomHeightTotal = bottomMetrics.height + bottomMetrics.depth; - var middleHeightTotal = 0; - var middleFactor = 1; - - if (middle !== null) { - var middleMetrics = getMetrics(middle, font, mode); - middleHeightTotal = middleMetrics.height + middleMetrics.depth; - middleFactor = 2; // repeat symmetrically above and below middle - } // Calculate the minimal height that the delimiter can have. - // It is at least the size of the top, bottom, and optional middle combined. - - - var minHeight = topHeightTotal + bottomHeightTotal + middleHeightTotal; // Compute the number of copies of the repeat symbol we will need - - var repeatCount = Math.max(0, Math.ceil((heightTotal - minHeight) / (middleFactor * repeatHeightTotal))); // Compute the total height of the delimiter including all the symbols - - var realHeightTotal = minHeight + repeatCount * middleFactor * repeatHeightTotal; // The center of the delimiter is placed at the center of the axis. Note - // that in this context, "center" means that the delimiter should be - // centered around the axis in the current style, while normally it is - // centered around the axis in textstyle. - - var axisHeight = options.fontMetrics().axisHeight; - - if (center) { - axisHeight *= options.sizeMultiplier; - } // Calculate the depth - - - var depth = realHeightTotal / 2 - axisHeight; // Now, we start building the pieces that will go into the vlist - // Keep a list of the pieces of the stacked delimiter - - var stack = []; - - if (svgLabel.length > 0) { - // Instead of stacking glyphs, create a single SVG. - // This evades browser problems with imprecise positioning of spans. - var midHeight = realHeightTotal - topHeightTotal - bottomHeightTotal; - var viewBoxHeight = Math.round(realHeightTotal * 1000); - var pathStr = tallDelim(svgLabel, Math.round(midHeight * 1000)); - var path = new PathNode(svgLabel, pathStr); - var width = (viewBoxWidth / 1000).toFixed(3) + "em"; - var height = (viewBoxHeight / 1000).toFixed(3) + "em"; - var svg = new SvgNode([path], { - "width": width, - "height": height, - "viewBox": "0 0 " + viewBoxWidth + " " + viewBoxHeight - }); - var wrapper = buildCommon.makeSvgSpan([], [svg], options); - wrapper.height = viewBoxHeight / 1000; - wrapper.style.width = width; - wrapper.style.height = height; - stack.push({ - type: "elem", - elem: wrapper - }); - } else { - // Stack glyphs - // Start by adding the bottom symbol - stack.push(makeGlyphSpan(bottom, font, mode)); - stack.push(lap); // overlap - - if (middle === null) { - // The middle section will be an SVG. Make it an extra 0.016em tall. - // We'll overlap by 0.008em at top and bottom. - var innerHeight = realHeightTotal - topHeightTotal - bottomHeightTotal + 2 * lapInEms; - stack.push(makeInner(repeat, innerHeight, options)); - } else { - // When there is a middle bit, we need the middle part and two repeated - // sections - var _innerHeight = (realHeightTotal - topHeightTotal - bottomHeightTotal - middleHeightTotal) / 2 + 2 * lapInEms; - - stack.push(makeInner(repeat, _innerHeight, options)); // Now insert the middle of the brace. - - stack.push(lap); - stack.push(makeGlyphSpan(middle, font, mode)); - stack.push(lap); - stack.push(makeInner(repeat, _innerHeight, options)); - } // Add the top symbol - - - stack.push(lap); - stack.push(makeGlyphSpan(top, font, mode)); - } // Finally, build the vlist - - - var newOptions = options.havingBaseStyle(Style$1.TEXT); - var inner = buildCommon.makeVList({ - positionType: "bottom", - positionData: depth, - children: stack - }, newOptions); - return styleWrap(buildCommon.makeSpan(["delimsizing", "mult"], [inner], newOptions), Style$1.TEXT, options, classes); -}; // All surds have 0.08em padding above the vinculum inside the SVG. -// That keeps browser span height rounding error from pinching the line. - - -var vbPad = 80; // padding above the surd, measured inside the viewBox. - -var emPad = 0.08; // padding, in ems, measured in the document. - -var sqrtSvg = function sqrtSvg(sqrtName, height, viewBoxHeight, extraVinculum, options) { - var path = sqrtPath(sqrtName, extraVinculum, viewBoxHeight); - var pathNode = new PathNode(sqrtName, path); - var svg = new SvgNode([pathNode], { - // Note: 1000:1 ratio of viewBox to document em width. - "width": "400em", - "height": makeEm(height), - "viewBox": "0 0 400000 " + viewBoxHeight, - "preserveAspectRatio": "xMinYMin slice" - }); - return buildCommon.makeSvgSpan(["hide-tail"], [svg], options); -}; -/** - * Make a sqrt image of the given height, - */ - - -var makeSqrtImage = function makeSqrtImage(height, options) { - // Define a newOptions that removes the effect of size changes such as \Huge. - // We don't pick different a height surd for \Huge. For it, we scale up. - var newOptions = options.havingBaseSizing(); // Pick the desired surd glyph from a sequence of surds. - - var delim = traverseSequence("\\surd", height * newOptions.sizeMultiplier, stackLargeDelimiterSequence, newOptions); - var sizeMultiplier = newOptions.sizeMultiplier; // default - // The standard sqrt SVGs each have a 0.04em thick vinculum. - // If Settings.minRuleThickness is larger than that, we add extraVinculum. - - var extraVinculum = Math.max(0, options.minRuleThickness - options.fontMetrics().sqrtRuleThickness); // Create a span containing an SVG image of a sqrt symbol. - - var span; - var spanHeight = 0; - var texHeight = 0; - var viewBoxHeight = 0; - var advanceWidth; // We create viewBoxes with 80 units of "padding" above each surd. - // Then browser rounding error on the parent span height will not - // encroach on the ink of the vinculum. But that padding is not - // included in the TeX-like `height` used for calculation of - // vertical alignment. So texHeight = span.height < span.style.height. - - if (delim.type === "small") { - // Get an SVG that is derived from glyph U+221A in font KaTeX-Main. - // 1000 unit normal glyph height. - viewBoxHeight = 1000 + 1000 * extraVinculum + vbPad; - - if (height < 1.0) { - sizeMultiplier = 1.0; // mimic a \textfont radical - } else if (height < 1.4) { - sizeMultiplier = 0.7; // mimic a \scriptfont radical - } - - spanHeight = (1.0 + extraVinculum + emPad) / sizeMultiplier; - texHeight = (1.00 + extraVinculum) / sizeMultiplier; - span = sqrtSvg("sqrtMain", spanHeight, viewBoxHeight, extraVinculum, options); - span.style.minWidth = "0.853em"; - advanceWidth = 0.833 / sizeMultiplier; // from the font. - } else if (delim.type === "large") { - // These SVGs come from fonts: KaTeX_Size1, _Size2, etc. - viewBoxHeight = (1000 + vbPad) * sizeToMaxHeight[delim.size]; - texHeight = (sizeToMaxHeight[delim.size] + extraVinculum) / sizeMultiplier; - spanHeight = (sizeToMaxHeight[delim.size] + extraVinculum + emPad) / sizeMultiplier; - span = sqrtSvg("sqrtSize" + delim.size, spanHeight, viewBoxHeight, extraVinculum, options); - span.style.minWidth = "1.02em"; - advanceWidth = 1.0 / sizeMultiplier; // 1.0 from the font. - } else { - // Tall sqrt. In TeX, this would be stacked using multiple glyphs. - // We'll use a single SVG to accomplish the same thing. - spanHeight = height + extraVinculum + emPad; - texHeight = height + extraVinculum; - viewBoxHeight = Math.floor(1000 * height + extraVinculum) + vbPad; - span = sqrtSvg("sqrtTall", spanHeight, viewBoxHeight, extraVinculum, options); - span.style.minWidth = "0.742em"; - advanceWidth = 1.056; - } - - span.height = texHeight; - span.style.height = makeEm(spanHeight); - return { - span, - advanceWidth, - // Calculate the actual line width. - // This actually should depend on the chosen font -- e.g. \boldmath - // should use the thicker surd symbols from e.g. KaTeX_Main-Bold, and - // have thicker rules. - ruleWidth: (options.fontMetrics().sqrtRuleThickness + extraVinculum) * sizeMultiplier - }; -}; // There are three kinds of delimiters, delimiters that stack when they become -// too large - - -var stackLargeDelimiters = ["(", "\\lparen", ")", "\\rparen", "[", "\\lbrack", "]", "\\rbrack", "\\{", "\\lbrace", "\\}", "\\rbrace", "\\lfloor", "\\rfloor", "\u230a", "\u230b", "\\lceil", "\\rceil", "\u2308", "\u2309", "\\surd"]; // delimiters that always stack - -var stackAlwaysDelimiters = ["\\uparrow", "\\downarrow", "\\updownarrow", "\\Uparrow", "\\Downarrow", "\\Updownarrow", "|", "\\|", "\\vert", "\\Vert", "\\lvert", "\\rvert", "\\lVert", "\\rVert", "\\lgroup", "\\rgroup", "\u27ee", "\u27ef", "\\lmoustache", "\\rmoustache", "\u23b0", "\u23b1"]; // and delimiters that never stack - -var stackNeverDelimiters = ["<", ">", "\\langle", "\\rangle", "/", "\\backslash", "\\lt", "\\gt"]; // Metrics of the different sizes. Found by looking at TeX's output of -// $\bigl| // \Bigl| \biggl| \Biggl| \showlists$ -// Used to create stacked delimiters of appropriate sizes in makeSizedDelim. - -var sizeToMaxHeight = [0, 1.2, 1.8, 2.4, 3.0]; -/** - * Used to create a delimiter of a specific size, where `size` is 1, 2, 3, or 4. - */ - -var makeSizedDelim = function makeSizedDelim(delim, size, options, mode, classes) { - // < and > turn into \langle and \rangle in delimiters - if (delim === "<" || delim === "\\lt" || delim === "\u27e8") { - delim = "\\langle"; - } else if (delim === ">" || delim === "\\gt" || delim === "\u27e9") { - delim = "\\rangle"; - } // Sized delimiters are never centered. - - - if (utils.contains(stackLargeDelimiters, delim) || utils.contains(stackNeverDelimiters, delim)) { - return makeLargeDelim(delim, size, false, options, mode, classes); - } else if (utils.contains(stackAlwaysDelimiters, delim)) { - return makeStackedDelim(delim, sizeToMaxHeight[size], false, options, mode, classes); - } else { - throw new ParseError("Illegal delimiter: '" + delim + "'"); - } -}; -/** - * There are three different sequences of delimiter sizes that the delimiters - * follow depending on the kind of delimiter. This is used when creating custom - * sized delimiters to decide whether to create a small, large, or stacked - * delimiter. - * - * In real TeX, these sequences aren't explicitly defined, but are instead - * defined inside the font metrics. Since there are only three sequences that - * are possible for the delimiters that TeX defines, it is easier to just encode - * them explicitly here. - */ - - -// Delimiters that never stack try small delimiters and large delimiters only -var stackNeverDelimiterSequence = [{ - type: "small", - style: Style$1.SCRIPTSCRIPT -}, { - type: "small", - style: Style$1.SCRIPT -}, { - type: "small", - style: Style$1.TEXT -}, { - type: "large", - size: 1 -}, { - type: "large", - size: 2 -}, { - type: "large", - size: 3 -}, { - type: "large", - size: 4 -}]; // Delimiters that always stack try the small delimiters first, then stack - -var stackAlwaysDelimiterSequence = [{ - type: "small", - style: Style$1.SCRIPTSCRIPT -}, { - type: "small", - style: Style$1.SCRIPT -}, { - type: "small", - style: Style$1.TEXT -}, { - type: "stack" -}]; // Delimiters that stack when large try the small and then large delimiters, and -// stack afterwards - -var stackLargeDelimiterSequence = [{ - type: "small", - style: Style$1.SCRIPTSCRIPT -}, { - type: "small", - style: Style$1.SCRIPT -}, { - type: "small", - style: Style$1.TEXT -}, { - type: "large", - size: 1 -}, { - type: "large", - size: 2 -}, { - type: "large", - size: 3 -}, { - type: "large", - size: 4 -}, { - type: "stack" -}]; -/** - * Get the font used in a delimiter based on what kind of delimiter it is. - * TODO(#963) Use more specific font family return type once that is introduced. - */ - -var delimTypeToFont = function delimTypeToFont(type) { - if (type.type === "small") { - return "Main-Regular"; - } else if (type.type === "large") { - return "Size" + type.size + "-Regular"; - } else if (type.type === "stack") { - return "Size4-Regular"; - } else { - throw new Error("Add support for delim type '" + type.type + "' here."); - } -}; -/** - * Traverse a sequence of types of delimiters to decide what kind of delimiter - * should be used to create a delimiter of the given height+depth. - */ - - -var traverseSequence = function traverseSequence(delim, height, sequence, options) { - // Here, we choose the index we should start at in the sequences. In smaller - // sizes (which correspond to larger numbers in style.size) we start earlier - // in the sequence. Thus, scriptscript starts at index 3-3=0, script starts - // at index 3-2=1, text starts at 3-1=2, and display starts at min(2,3-0)=2 - var start = Math.min(2, 3 - options.style.size); - - for (var i = start; i < sequence.length; i++) { - if (sequence[i].type === "stack") { - // This is always the last delimiter, so we just break the loop now. - break; - } - - var metrics = getMetrics(delim, delimTypeToFont(sequence[i]), "math"); - var heightDepth = metrics.height + metrics.depth; // Small delimiters are scaled down versions of the same font, so we - // account for the style change size. - - if (sequence[i].type === "small") { - var newOptions = options.havingBaseStyle(sequence[i].style); - heightDepth *= newOptions.sizeMultiplier; - } // Check if the delimiter at this size works for the given height. - - - if (heightDepth > height) { - return sequence[i]; - } - } // If we reached the end of the sequence, return the last sequence element. - - - return sequence[sequence.length - 1]; -}; -/** - * Make a delimiter of a given height+depth, with optional centering. Here, we - * traverse the sequences, and create a delimiter that the sequence tells us to. - */ - - -var makeCustomSizedDelim = function makeCustomSizedDelim(delim, height, center, options, mode, classes) { - if (delim === "<" || delim === "\\lt" || delim === "\u27e8") { - delim = "\\langle"; - } else if (delim === ">" || delim === "\\gt" || delim === "\u27e9") { - delim = "\\rangle"; - } // Decide what sequence to use - - - var sequence; - - if (utils.contains(stackNeverDelimiters, delim)) { - sequence = stackNeverDelimiterSequence; - } else if (utils.contains(stackLargeDelimiters, delim)) { - sequence = stackLargeDelimiterSequence; - } else { - sequence = stackAlwaysDelimiterSequence; - } // Look through the sequence - - - var delimType = traverseSequence(delim, height, sequence, options); // Get the delimiter from font glyphs. - // Depending on the sequence element we decided on, call the - // appropriate function. - - if (delimType.type === "small") { - return makeSmallDelim(delim, delimType.style, center, options, mode, classes); - } else if (delimType.type === "large") { - return makeLargeDelim(delim, delimType.size, center, options, mode, classes); - } else - /* if (delimType.type === "stack") */ - { - return makeStackedDelim(delim, height, center, options, mode, classes); - } -}; -/** - * Make a delimiter for use with `\left` and `\right`, given a height and depth - * of an expression that the delimiters surround. - */ - - -var makeLeftRightDelim = function makeLeftRightDelim(delim, height, depth, options, mode, classes) { - // We always center \left/\right delimiters, so the axis is always shifted - var axisHeight = options.fontMetrics().axisHeight * options.sizeMultiplier; // Taken from TeX source, tex.web, function make_left_right - - var delimiterFactor = 901; - var delimiterExtend = 5.0 / options.fontMetrics().ptPerEm; - var maxDistFromAxis = Math.max(height - axisHeight, depth + axisHeight); - var totalHeight = Math.max( // In real TeX, calculations are done using integral values which are - // 65536 per pt, or 655360 per em. So, the division here truncates in - // TeX but doesn't here, producing different results. If we wanted to - // exactly match TeX's calculation, we could do - // Math.floor(655360 * maxDistFromAxis / 500) * - // delimiterFactor / 655360 - // (To see the difference, compare - // x^{x^{\left(\rule{0.1em}{0.68em}\right)}} - // in TeX and KaTeX) - maxDistFromAxis / 500 * delimiterFactor, 2 * maxDistFromAxis - delimiterExtend); // Finally, we defer to `makeCustomSizedDelim` with our calculated total - // height - - return makeCustomSizedDelim(delim, totalHeight, true, options, mode, classes); -}; - -var delimiter = { - sqrtImage: makeSqrtImage, - sizedDelim: makeSizedDelim, - sizeToMaxHeight: sizeToMaxHeight, - customSizedDelim: makeCustomSizedDelim, - leftRightDelim: makeLeftRightDelim -}; - -// Extra data needed for the delimiter handler down below -var delimiterSizes = { - "\\bigl": { - mclass: "mopen", - size: 1 - }, - "\\Bigl": { - mclass: "mopen", - size: 2 - }, - "\\biggl": { - mclass: "mopen", - size: 3 - }, - "\\Biggl": { - mclass: "mopen", - size: 4 - }, - "\\bigr": { - mclass: "mclose", - size: 1 - }, - "\\Bigr": { - mclass: "mclose", - size: 2 - }, - "\\biggr": { - mclass: "mclose", - size: 3 - }, - "\\Biggr": { - mclass: "mclose", - size: 4 - }, - "\\bigm": { - mclass: "mrel", - size: 1 - }, - "\\Bigm": { - mclass: "mrel", - size: 2 - }, - "\\biggm": { - mclass: "mrel", - size: 3 - }, - "\\Biggm": { - mclass: "mrel", - size: 4 - }, - "\\big": { - mclass: "mord", - size: 1 - }, - "\\Big": { - mclass: "mord", - size: 2 - }, - "\\bigg": { - mclass: "mord", - size: 3 - }, - "\\Bigg": { - mclass: "mord", - size: 4 - } -}; -var delimiters = ["(", "\\lparen", ")", "\\rparen", "[", "\\lbrack", "]", "\\rbrack", "\\{", "\\lbrace", "\\}", "\\rbrace", "\\lfloor", "\\rfloor", "\u230a", "\u230b", "\\lceil", "\\rceil", "\u2308", "\u2309", "<", ">", "\\langle", "\u27e8", "\\rangle", "\u27e9", "\\lt", "\\gt", "\\lvert", "\\rvert", "\\lVert", "\\rVert", "\\lgroup", "\\rgroup", "\u27ee", "\u27ef", "\\lmoustache", "\\rmoustache", "\u23b0", "\u23b1", "/", "\\backslash", "|", "\\vert", "\\|", "\\Vert", "\\uparrow", "\\Uparrow", "\\downarrow", "\\Downarrow", "\\updownarrow", "\\Updownarrow", "."]; - -// Delimiter functions -function checkDelimiter(delim, context) { - var symDelim = checkSymbolNodeType(delim); - - if (symDelim && utils.contains(delimiters, symDelim.text)) { - return symDelim; - } else if (symDelim) { - throw new ParseError("Invalid delimiter '" + symDelim.text + "' after '" + context.funcName + "'", delim); - } else { - throw new ParseError("Invalid delimiter type '" + delim.type + "'", delim); - } -} - -defineFunction({ - type: "delimsizing", - names: ["\\bigl", "\\Bigl", "\\biggl", "\\Biggl", "\\bigr", "\\Bigr", "\\biggr", "\\Biggr", "\\bigm", "\\Bigm", "\\biggm", "\\Biggm", "\\big", "\\Big", "\\bigg", "\\Bigg"], - props: { - numArgs: 1, - argTypes: ["primitive"] - }, - handler: (context, args) => { - var delim = checkDelimiter(args[0], context); - return { - type: "delimsizing", - mode: context.parser.mode, - size: delimiterSizes[context.funcName].size, - mclass: delimiterSizes[context.funcName].mclass, - delim: delim.text - }; - }, - htmlBuilder: (group, options) => { - if (group.delim === ".") { - // Empty delimiters still count as elements, even though they don't - // show anything. - return buildCommon.makeSpan([group.mclass]); - } // Use delimiter.sizedDelim to generate the delimiter. - - - return delimiter.sizedDelim(group.delim, group.size, options, group.mode, [group.mclass]); - }, - mathmlBuilder: group => { - var children = []; - - if (group.delim !== ".") { - children.push(makeText(group.delim, group.mode)); - } - - var node = new mathMLTree.MathNode("mo", children); - - if (group.mclass === "mopen" || group.mclass === "mclose") { - // Only some of the delimsizing functions act as fences, and they - // return "mopen" or "mclose" mclass. - node.setAttribute("fence", "true"); - } else { - // Explicitly disable fencing if it's not a fence, to override the - // defaults. - node.setAttribute("fence", "false"); - } - - node.setAttribute("stretchy", "true"); - var size = makeEm(delimiter.sizeToMaxHeight[group.size]); - node.setAttribute("minsize", size); - node.setAttribute("maxsize", size); - return node; - } -}); - -function assertParsed(group) { - if (!group.body) { - throw new Error("Bug: The leftright ParseNode wasn't fully parsed."); - } -} - -defineFunction({ - type: "leftright-right", - names: ["\\right"], - props: { - numArgs: 1, - primitive: true - }, - handler: (context, args) => { - // \left case below triggers parsing of \right in - // `const right = parser.parseFunction();` - // uses this return value. - var color = context.parser.gullet.macros.get("\\current@color"); - - if (color && typeof color !== "string") { - throw new ParseError("\\current@color set to non-string in \\right"); - } - - return { - type: "leftright-right", - mode: context.parser.mode, - delim: checkDelimiter(args[0], context).text, - color // undefined if not set via \color - - }; - } -}); -defineFunction({ - type: "leftright", - names: ["\\left"], - props: { - numArgs: 1, - primitive: true - }, - handler: (context, args) => { - var delim = checkDelimiter(args[0], context); - var parser = context.parser; // Parse out the implicit body - - ++parser.leftrightDepth; // parseExpression stops before '\\right' - - var body = parser.parseExpression(false); - --parser.leftrightDepth; // Check the next token - - parser.expect("\\right", false); - var right = assertNodeType(parser.parseFunction(), "leftright-right"); - return { - type: "leftright", - mode: parser.mode, - body, - left: delim.text, - right: right.delim, - rightColor: right.color - }; - }, - htmlBuilder: (group, options) => { - assertParsed(group); // Build the inner expression - - var inner = buildExpression$1(group.body, options, true, ["mopen", "mclose"]); - var innerHeight = 0; - var innerDepth = 0; - var hadMiddle = false; // Calculate its height and depth - - for (var i = 0; i < inner.length; i++) { - // Property `isMiddle` not defined on `span`. See comment in - // "middle"'s htmlBuilder. - // $FlowFixMe - if (inner[i].isMiddle) { - hadMiddle = true; - } else { - innerHeight = Math.max(inner[i].height, innerHeight); - innerDepth = Math.max(inner[i].depth, innerDepth); - } - } // The size of delimiters is the same, regardless of what style we are - // in. Thus, to correctly calculate the size of delimiter we need around - // a group, we scale down the inner size based on the size. - - - innerHeight *= options.sizeMultiplier; - innerDepth *= options.sizeMultiplier; - var leftDelim; - - if (group.left === ".") { - // Empty delimiters in \left and \right make null delimiter spaces. - leftDelim = makeNullDelimiter(options, ["mopen"]); - } else { - // Otherwise, use leftRightDelim to generate the correct sized - // delimiter. - leftDelim = delimiter.leftRightDelim(group.left, innerHeight, innerDepth, options, group.mode, ["mopen"]); - } // Add it to the beginning of the expression - - - inner.unshift(leftDelim); // Handle middle delimiters - - if (hadMiddle) { - for (var _i = 1; _i < inner.length; _i++) { - var middleDelim = inner[_i]; // Property `isMiddle` not defined on `span`. See comment in - // "middle"'s htmlBuilder. - // $FlowFixMe - - var isMiddle = middleDelim.isMiddle; - - if (isMiddle) { - // Apply the options that were active when \middle was called - inner[_i] = delimiter.leftRightDelim(isMiddle.delim, innerHeight, innerDepth, isMiddle.options, group.mode, []); - } - } - } - - var rightDelim; // Same for the right delimiter, but using color specified by \color - - if (group.right === ".") { - rightDelim = makeNullDelimiter(options, ["mclose"]); - } else { - var colorOptions = group.rightColor ? options.withColor(group.rightColor) : options; - rightDelim = delimiter.leftRightDelim(group.right, innerHeight, innerDepth, colorOptions, group.mode, ["mclose"]); - } // Add it to the end of the expression. - - - inner.push(rightDelim); - return buildCommon.makeSpan(["minner"], inner, options); - }, - mathmlBuilder: (group, options) => { - assertParsed(group); - var inner = buildExpression(group.body, options); - - if (group.left !== ".") { - var leftNode = new mathMLTree.MathNode("mo", [makeText(group.left, group.mode)]); - leftNode.setAttribute("fence", "true"); - inner.unshift(leftNode); - } - - if (group.right !== ".") { - var rightNode = new mathMLTree.MathNode("mo", [makeText(group.right, group.mode)]); - rightNode.setAttribute("fence", "true"); - - if (group.rightColor) { - rightNode.setAttribute("mathcolor", group.rightColor); - } - - inner.push(rightNode); - } - - return makeRow(inner); - } -}); -defineFunction({ - type: "middle", - names: ["\\middle"], - props: { - numArgs: 1, - primitive: true - }, - handler: (context, args) => { - var delim = checkDelimiter(args[0], context); - - if (!context.parser.leftrightDepth) { - throw new ParseError("\\middle without preceding \\left", delim); - } - - return { - type: "middle", - mode: context.parser.mode, - delim: delim.text - }; - }, - htmlBuilder: (group, options) => { - var middleDelim; - - if (group.delim === ".") { - middleDelim = makeNullDelimiter(options, []); - } else { - middleDelim = delimiter.sizedDelim(group.delim, 1, options, group.mode, []); - var isMiddle = { - delim: group.delim, - options - }; // Property `isMiddle` not defined on `span`. It is only used in - // this file above. - // TODO: Fix this violation of the `span` type and possibly rename - // things since `isMiddle` sounds like a boolean, but is a struct. - // $FlowFixMe - - middleDelim.isMiddle = isMiddle; - } - - return middleDelim; - }, - mathmlBuilder: (group, options) => { - // A Firefox \middle will stretch a character vertically only if it - // is in the fence part of the operator dictionary at: - // https://www.w3.org/TR/MathML3/appendixc.html. - // So we need to avoid U+2223 and use plain "|" instead. - var textNode = group.delim === "\\vert" || group.delim === "|" ? makeText("|", "text") : makeText(group.delim, group.mode); - var middleNode = new mathMLTree.MathNode("mo", [textNode]); - middleNode.setAttribute("fence", "true"); // MathML gives 5/18em spacing to each element. - // \middle should get delimiter spacing instead. - - middleNode.setAttribute("lspace", "0.05em"); - middleNode.setAttribute("rspace", "0.05em"); - return middleNode; - } -}); - -var htmlBuilder$7 = (group, options) => { - // \cancel, \bcancel, \xcancel, \sout, \fbox, \colorbox, \fcolorbox, \phase - // Some groups can return document fragments. Handle those by wrapping - // them in a span. - var inner = buildCommon.wrapFragment(buildGroup$1(group.body, options), options); - var label = group.label.slice(1); - var scale = options.sizeMultiplier; - var img; - var imgShift = 0; // In the LaTeX cancel package, line geometry is slightly different - // depending on whether the subject is wider than it is tall, or vice versa. - // We don't know the width of a group, so as a proxy, we test if - // the subject is a single character. This captures most of the - // subjects that should get the "tall" treatment. - - var isSingleChar = utils.isCharacterBox(group.body); - - if (label === "sout") { - img = buildCommon.makeSpan(["stretchy", "sout"]); - img.height = options.fontMetrics().defaultRuleThickness / scale; - imgShift = -0.5 * options.fontMetrics().xHeight; - } else if (label === "phase") { - // Set a couple of dimensions from the steinmetz package. - var lineWeight = calculateSize({ - number: 0.6, - unit: "pt" - }, options); - var clearance = calculateSize({ - number: 0.35, - unit: "ex" - }, options); // Prevent size changes like \Huge from affecting line thickness - - var newOptions = options.havingBaseSizing(); - scale = scale / newOptions.sizeMultiplier; - var angleHeight = inner.height + inner.depth + lineWeight + clearance; // Reserve a left pad for the angle. - - inner.style.paddingLeft = makeEm(angleHeight / 2 + lineWeight); // Create an SVG - - var viewBoxHeight = Math.floor(1000 * angleHeight * scale); - var path = phasePath(viewBoxHeight); - var svgNode = new SvgNode([new PathNode("phase", path)], { - "width": "400em", - "height": makeEm(viewBoxHeight / 1000), - "viewBox": "0 0 400000 " + viewBoxHeight, - "preserveAspectRatio": "xMinYMin slice" - }); // Wrap it in a span with overflow: hidden. - - img = buildCommon.makeSvgSpan(["hide-tail"], [svgNode], options); - img.style.height = makeEm(angleHeight); - imgShift = inner.depth + lineWeight + clearance; - } else { - // Add horizontal padding - if (/cancel/.test(label)) { - if (!isSingleChar) { - inner.classes.push("cancel-pad"); - } - } else if (label === "angl") { - inner.classes.push("anglpad"); - } else { - inner.classes.push("boxpad"); - } // Add vertical padding - - - var topPad = 0; - var bottomPad = 0; - var ruleThickness = 0; // ref: cancel package: \advance\totalheight2\p@ % "+2" - - if (/box/.test(label)) { - ruleThickness = Math.max(options.fontMetrics().fboxrule, // default - options.minRuleThickness // User override. - ); - topPad = options.fontMetrics().fboxsep + (label === "colorbox" ? 0 : ruleThickness); - bottomPad = topPad; - } else if (label === "angl") { - ruleThickness = Math.max(options.fontMetrics().defaultRuleThickness, options.minRuleThickness); - topPad = 4 * ruleThickness; // gap = 3 × line, plus the line itself. - - bottomPad = Math.max(0, 0.25 - inner.depth); - } else { - topPad = isSingleChar ? 0.2 : 0; - bottomPad = topPad; - } - - img = stretchy.encloseSpan(inner, label, topPad, bottomPad, options); - - if (/fbox|boxed|fcolorbox/.test(label)) { - img.style.borderStyle = "solid"; - img.style.borderWidth = makeEm(ruleThickness); - } else if (label === "angl" && ruleThickness !== 0.049) { - img.style.borderTopWidth = makeEm(ruleThickness); - img.style.borderRightWidth = makeEm(ruleThickness); - } - - imgShift = inner.depth + bottomPad; - - if (group.backgroundColor) { - img.style.backgroundColor = group.backgroundColor; - - if (group.borderColor) { - img.style.borderColor = group.borderColor; - } - } - } - - var vlist; - - if (group.backgroundColor) { - vlist = buildCommon.makeVList({ - positionType: "individualShift", - children: [// Put the color background behind inner; - { - type: "elem", - elem: img, - shift: imgShift - }, { - type: "elem", - elem: inner, - shift: 0 - }] - }, options); - } else { - var classes = /cancel|phase/.test(label) ? ["svg-align"] : []; - vlist = buildCommon.makeVList({ - positionType: "individualShift", - children: [// Write the \cancel stroke on top of inner. - { - type: "elem", - elem: inner, - shift: 0 - }, { - type: "elem", - elem: img, - shift: imgShift, - wrapperClasses: classes - }] - }, options); - } - - if (/cancel/.test(label)) { - // The cancel package documentation says that cancel lines add their height - // to the expression, but tests show that isn't how it actually works. - vlist.height = inner.height; - vlist.depth = inner.depth; - } - - if (/cancel/.test(label) && !isSingleChar) { - // cancel does not create horiz space for its line extension. - return buildCommon.makeSpan(["mord", "cancel-lap"], [vlist], options); - } else { - return buildCommon.makeSpan(["mord"], [vlist], options); - } -}; - -var mathmlBuilder$6 = (group, options) => { - var fboxsep = 0; - var node = new mathMLTree.MathNode(group.label.indexOf("colorbox") > -1 ? "mpadded" : "menclose", [buildGroup(group.body, options)]); - - switch (group.label) { - case "\\cancel": - node.setAttribute("notation", "updiagonalstrike"); - break; - - case "\\bcancel": - node.setAttribute("notation", "downdiagonalstrike"); - break; - - case "\\phase": - node.setAttribute("notation", "phasorangle"); - break; - - case "\\sout": - node.setAttribute("notation", "horizontalstrike"); - break; - - case "\\fbox": - node.setAttribute("notation", "box"); - break; - - case "\\angl": - node.setAttribute("notation", "actuarial"); - break; - - case "\\fcolorbox": - case "\\colorbox": - // doesn't have a good notation option. So use - // instead. Set some attributes that come included with . - fboxsep = options.fontMetrics().fboxsep * options.fontMetrics().ptPerEm; - node.setAttribute("width", "+" + 2 * fboxsep + "pt"); - node.setAttribute("height", "+" + 2 * fboxsep + "pt"); - node.setAttribute("lspace", fboxsep + "pt"); // - - node.setAttribute("voffset", fboxsep + "pt"); - - if (group.label === "\\fcolorbox") { - var thk = Math.max(options.fontMetrics().fboxrule, // default - options.minRuleThickness // user override - ); - node.setAttribute("style", "border: " + thk + "em solid " + String(group.borderColor)); - } - - break; - - case "\\xcancel": - node.setAttribute("notation", "updiagonalstrike downdiagonalstrike"); - break; - } - - if (group.backgroundColor) { - node.setAttribute("mathbackground", group.backgroundColor); - } - - return node; -}; - -defineFunction({ - type: "enclose", - names: ["\\colorbox"], - props: { - numArgs: 2, - allowedInText: true, - argTypes: ["color", "text"] - }, - - handler(_ref, args, optArgs) { - var { - parser, - funcName - } = _ref; - var color = assertNodeType(args[0], "color-token").color; - var body = args[1]; - return { - type: "enclose", - mode: parser.mode, - label: funcName, - backgroundColor: color, - body - }; - }, - - htmlBuilder: htmlBuilder$7, - mathmlBuilder: mathmlBuilder$6 -}); -defineFunction({ - type: "enclose", - names: ["\\fcolorbox"], - props: { - numArgs: 3, - allowedInText: true, - argTypes: ["color", "color", "text"] - }, - - handler(_ref2, args, optArgs) { - var { - parser, - funcName - } = _ref2; - var borderColor = assertNodeType(args[0], "color-token").color; - var backgroundColor = assertNodeType(args[1], "color-token").color; - var body = args[2]; - return { - type: "enclose", - mode: parser.mode, - label: funcName, - backgroundColor, - borderColor, - body - }; - }, - - htmlBuilder: htmlBuilder$7, - mathmlBuilder: mathmlBuilder$6 -}); -defineFunction({ - type: "enclose", - names: ["\\fbox"], - props: { - numArgs: 1, - argTypes: ["hbox"], - allowedInText: true - }, - - handler(_ref3, args) { - var { - parser - } = _ref3; - return { - type: "enclose", - mode: parser.mode, - label: "\\fbox", - body: args[0] - }; - } - -}); -defineFunction({ - type: "enclose", - names: ["\\cancel", "\\bcancel", "\\xcancel", "\\sout", "\\phase"], - props: { - numArgs: 1 - }, - - handler(_ref4, args) { - var { - parser, - funcName - } = _ref4; - var body = args[0]; - return { - type: "enclose", - mode: parser.mode, - label: funcName, - body - }; - }, - - htmlBuilder: htmlBuilder$7, - mathmlBuilder: mathmlBuilder$6 -}); -defineFunction({ - type: "enclose", - names: ["\\angl"], - props: { - numArgs: 1, - argTypes: ["hbox"], - allowedInText: false - }, - - handler(_ref5, args) { - var { - parser - } = _ref5; - return { - type: "enclose", - mode: parser.mode, - label: "\\angl", - body: args[0] - }; - } - -}); - -/** - * All registered environments. - * `environments.js` exports this same dictionary again and makes it public. - * `Parser.js` requires this dictionary via `environments.js`. - */ -var _environments = {}; -function defineEnvironment(_ref) { - var { - type, - names, - props, - handler, - htmlBuilder, - mathmlBuilder - } = _ref; - // Set default values of environments. - var data = { - type, - numArgs: props.numArgs || 0, - allowedInText: false, - numOptionalArgs: 0, - handler - }; - - for (var i = 0; i < names.length; ++i) { - // TODO: The value type of _environments should be a type union of all - // possible `EnvSpec<>` possibilities instead of `EnvSpec<*>`, which is - // an existential type. - _environments[names[i]] = data; - } - - if (htmlBuilder) { - _htmlGroupBuilders[type] = htmlBuilder; - } - - if (mathmlBuilder) { - _mathmlGroupBuilders[type] = mathmlBuilder; - } -} - -/** - * All registered global/built-in macros. - * `macros.js` exports this same dictionary again and makes it public. - * `Parser.js` requires this dictionary via `macros.js`. - */ -var _macros = {}; // This function might one day accept an additional argument and do more things. - -function defineMacro(name, body) { - _macros[name] = body; -} - -// Helper functions -function getHLines(parser) { - // Return an array. The array length = number of hlines. - // Each element in the array tells if the line is dashed. - var hlineInfo = []; - parser.consumeSpaces(); - var nxt = parser.fetch().text; - - if (nxt === "\\relax") { - // \relax is an artifact of the \cr macro below - parser.consume(); - parser.consumeSpaces(); - nxt = parser.fetch().text; - } - - while (nxt === "\\hline" || nxt === "\\hdashline") { - parser.consume(); - hlineInfo.push(nxt === "\\hdashline"); - parser.consumeSpaces(); - nxt = parser.fetch().text; - } - - return hlineInfo; -} - -var validateAmsEnvironmentContext = context => { - var settings = context.parser.settings; - - if (!settings.displayMode) { - throw new ParseError("{" + context.envName + "} can be used only in" + " display mode."); - } -}; // autoTag (an argument to parseArray) can be one of three values: -// * undefined: Regular (not-top-level) array; no tags on each row -// * true: Automatic equation numbering, overridable by \tag -// * false: Tags allowed on each row, but no automatic numbering -// This function *doesn't* work with the "split" environment name. - - -function getAutoTag(name) { - if (name.indexOf("ed") === -1) { - return name.indexOf("*") === -1; - } // return undefined; - -} -/** - * Parse the body of the environment, with rows delimited by \\ and - * columns delimited by &, and create a nested list in row-major order - * with one group per cell. If given an optional argument style - * ("text", "display", etc.), then each cell is cast into that style. - */ - - -function parseArray(parser, _ref, style) { - var { - hskipBeforeAndAfter, - addJot, - cols, - arraystretch, - colSeparationType, - autoTag, - singleRow, - emptySingleRow, - maxNumCols, - leqno - } = _ref; - parser.gullet.beginGroup(); - - if (!singleRow) { - // \cr is equivalent to \\ without the optional size argument (see below) - // TODO: provide helpful error when \cr is used outside array environment - parser.gullet.macros.set("\\cr", "\\\\\\relax"); - } // Get current arraystretch if it's not set by the environment - - - if (!arraystretch) { - var stretch = parser.gullet.expandMacroAsText("\\arraystretch"); - - if (stretch == null) { - // Default \arraystretch from lttab.dtx - arraystretch = 1; - } else { - arraystretch = parseFloat(stretch); - - if (!arraystretch || arraystretch < 0) { - throw new ParseError("Invalid \\arraystretch: " + stretch); - } - } - } // Start group for first cell - - - parser.gullet.beginGroup(); - var row = []; - var body = [row]; - var rowGaps = []; - var hLinesBeforeRow = []; - var tags = autoTag != null ? [] : undefined; // amsmath uses \global\@eqnswtrue and \global\@eqnswfalse to represent - // whether this row should have an equation number. Simulate this with - // a \@eqnsw macro set to 1 or 0. - - function beginRow() { - if (autoTag) { - parser.gullet.macros.set("\\@eqnsw", "1", true); - } - } - - function endRow() { - if (tags) { - if (parser.gullet.macros.get("\\df@tag")) { - tags.push(parser.subparse([new Token("\\df@tag")])); - parser.gullet.macros.set("\\df@tag", undefined, true); - } else { - tags.push(Boolean(autoTag) && parser.gullet.macros.get("\\@eqnsw") === "1"); - } - } - } - - beginRow(); // Test for \hline at the top of the array. - - hLinesBeforeRow.push(getHLines(parser)); - - while (true) { - // eslint-disable-line no-constant-condition - // Parse each cell in its own group (namespace) - var cell = parser.parseExpression(false, singleRow ? "\\end" : "\\\\"); - parser.gullet.endGroup(); - parser.gullet.beginGroup(); - cell = { - type: "ordgroup", - mode: parser.mode, - body: cell - }; - - if (style) { - cell = { - type: "styling", - mode: parser.mode, - style, - body: [cell] - }; - } - - row.push(cell); - var next = parser.fetch().text; - - if (next === "&") { - if (maxNumCols && row.length === maxNumCols) { - if (singleRow || colSeparationType) { - // {equation} or {split} - throw new ParseError("Too many tab characters: &", parser.nextToken); - } else { - // {array} environment - parser.settings.reportNonstrict("textEnv", "Too few columns " + "specified in the {array} column argument."); - } - } - - parser.consume(); - } else if (next === "\\end") { - endRow(); // Arrays terminate newlines with `\crcr` which consumes a `\cr` if - // the last line is empty. However, AMS environments keep the - // empty row if it's the only one. - // NOTE: Currently, `cell` is the last item added into `row`. - - if (row.length === 1 && cell.type === "styling" && cell.body[0].body.length === 0 && (body.length > 1 || !emptySingleRow)) { - body.pop(); - } - - if (hLinesBeforeRow.length < body.length + 1) { - hLinesBeforeRow.push([]); - } - - break; - } else if (next === "\\\\") { - parser.consume(); - var size = void 0; // \def\Let@{\let\\\math@cr} - // \def\math@cr{...\math@cr@} - // \def\math@cr@{\new@ifnextchar[\math@cr@@{\math@cr@@[\z@]}} - // \def\math@cr@@[#1]{...\math@cr@@@...} - // \def\math@cr@@@{\cr} - - if (parser.gullet.future().text !== " ") { - size = parser.parseSizeGroup(true); - } - - rowGaps.push(size ? size.value : null); - endRow(); // check for \hline(s) following the row separator - - hLinesBeforeRow.push(getHLines(parser)); - row = []; - body.push(row); - beginRow(); - } else { - throw new ParseError("Expected & or \\\\ or \\cr or \\end", parser.nextToken); - } - } // End cell group - - - parser.gullet.endGroup(); // End array group defining \cr - - parser.gullet.endGroup(); - return { - type: "array", - mode: parser.mode, - addJot, - arraystretch, - body, - cols, - rowGaps, - hskipBeforeAndAfter, - hLinesBeforeRow, - colSeparationType, - tags, - leqno - }; -} // Decides on a style for cells in an array according to whether the given -// environment name starts with the letter 'd'. - - -function dCellStyle(envName) { - if (envName.slice(0, 1) === "d") { - return "display"; - } else { - return "text"; - } -} - -var htmlBuilder$6 = function htmlBuilder(group, options) { - var r; - var c; - var nr = group.body.length; - var hLinesBeforeRow = group.hLinesBeforeRow; - var nc = 0; - var body = new Array(nr); - var hlines = []; - var ruleThickness = Math.max( // From LaTeX \showthe\arrayrulewidth. Equals 0.04 em. - options.fontMetrics().arrayRuleWidth, options.minRuleThickness // User override. - ); // Horizontal spacing - - var pt = 1 / options.fontMetrics().ptPerEm; - var arraycolsep = 5 * pt; // default value, i.e. \arraycolsep in article.cls - - if (group.colSeparationType && group.colSeparationType === "small") { - // We're in a {smallmatrix}. Default column space is \thickspace, - // i.e. 5/18em = 0.2778em, per amsmath.dtx for {smallmatrix}. - // But that needs adjustment because LaTeX applies \scriptstyle to the - // entire array, including the colspace, but this function applies - // \scriptstyle only inside each element. - var localMultiplier = options.havingStyle(Style$1.SCRIPT).sizeMultiplier; - arraycolsep = 0.2778 * (localMultiplier / options.sizeMultiplier); - } // Vertical spacing - - - var baselineskip = group.colSeparationType === "CD" ? calculateSize({ - number: 3, - unit: "ex" - }, options) : 12 * pt; // see size10.clo - // Default \jot from ltmath.dtx - // TODO(edemaine): allow overriding \jot via \setlength (#687) - - var jot = 3 * pt; - var arrayskip = group.arraystretch * baselineskip; - var arstrutHeight = 0.7 * arrayskip; // \strutbox in ltfsstrc.dtx and - - var arstrutDepth = 0.3 * arrayskip; // \@arstrutbox in lttab.dtx - - var totalHeight = 0; // Set a position for \hline(s) at the top of the array, if any. - - function setHLinePos(hlinesInGap) { - for (var i = 0; i < hlinesInGap.length; ++i) { - if (i > 0) { - totalHeight += 0.25; - } - - hlines.push({ - pos: totalHeight, - isDashed: hlinesInGap[i] - }); - } - } - - setHLinePos(hLinesBeforeRow[0]); - - for (r = 0; r < group.body.length; ++r) { - var inrow = group.body[r]; - var height = arstrutHeight; // \@array adds an \@arstrut - - var depth = arstrutDepth; // to each tow (via the template) - - if (nc < inrow.length) { - nc = inrow.length; - } - - var outrow = new Array(inrow.length); - - for (c = 0; c < inrow.length; ++c) { - var elt = buildGroup$1(inrow[c], options); - - if (depth < elt.depth) { - depth = elt.depth; - } - - if (height < elt.height) { - height = elt.height; - } - - outrow[c] = elt; - } - - var rowGap = group.rowGaps[r]; - var gap = 0; - - if (rowGap) { - gap = calculateSize(rowGap, options); - - if (gap > 0) { - // \@argarraycr - gap += arstrutDepth; - - if (depth < gap) { - depth = gap; // \@xargarraycr - } - - gap = 0; - } - } // In AMS multiline environments such as aligned and gathered, rows - // correspond to lines that have additional \jot added to the - // \baselineskip via \openup. - - - if (group.addJot) { - depth += jot; - } - - outrow.height = height; - outrow.depth = depth; - totalHeight += height; - outrow.pos = totalHeight; - totalHeight += depth + gap; // \@yargarraycr - - body[r] = outrow; // Set a position for \hline(s), if any. - - setHLinePos(hLinesBeforeRow[r + 1]); - } - - var offset = totalHeight / 2 + options.fontMetrics().axisHeight; - var colDescriptions = group.cols || []; - var cols = []; - var colSep; - var colDescrNum; - var tagSpans = []; - - if (group.tags && group.tags.some(tag => tag)) { - // An environment with manual tags and/or automatic equation numbers. - // Create node(s), the latter of which trigger CSS counter increment. - for (r = 0; r < nr; ++r) { - var rw = body[r]; - var shift = rw.pos - offset; - var tag = group.tags[r]; - var tagSpan = void 0; - - if (tag === true) { - // automatic numbering - tagSpan = buildCommon.makeSpan(["eqn-num"], [], options); - } else if (tag === false) { - // \nonumber/\notag or starred environment - tagSpan = buildCommon.makeSpan([], [], options); - } else { - // manual \tag - tagSpan = buildCommon.makeSpan([], buildExpression$1(tag, options, true), options); - } - - tagSpan.depth = rw.depth; - tagSpan.height = rw.height; - tagSpans.push({ - type: "elem", - elem: tagSpan, - shift - }); - } - } - - for (c = 0, colDescrNum = 0; // Continue while either there are more columns or more column - // descriptions, so trailing separators don't get lost. - c < nc || colDescrNum < colDescriptions.length; ++c, ++colDescrNum) { - var colDescr = colDescriptions[colDescrNum] || {}; - var firstSeparator = true; - - while (colDescr.type === "separator") { - // If there is more than one separator in a row, add a space - // between them. - if (!firstSeparator) { - colSep = buildCommon.makeSpan(["arraycolsep"], []); - colSep.style.width = makeEm(options.fontMetrics().doubleRuleSep); - cols.push(colSep); - } - - if (colDescr.separator === "|" || colDescr.separator === ":") { - var lineType = colDescr.separator === "|" ? "solid" : "dashed"; - var separator = buildCommon.makeSpan(["vertical-separator"], [], options); - separator.style.height = makeEm(totalHeight); - separator.style.borderRightWidth = makeEm(ruleThickness); - separator.style.borderRightStyle = lineType; - separator.style.margin = "0 " + makeEm(-ruleThickness / 2); - - var _shift = totalHeight - offset; - - if (_shift) { - separator.style.verticalAlign = makeEm(-_shift); - } - - cols.push(separator); - } else { - throw new ParseError("Invalid separator type: " + colDescr.separator); - } - - colDescrNum++; - colDescr = colDescriptions[colDescrNum] || {}; - firstSeparator = false; - } - - if (c >= nc) { - continue; - } - - var sepwidth = void 0; - - if (c > 0 || group.hskipBeforeAndAfter) { - sepwidth = utils.deflt(colDescr.pregap, arraycolsep); - - if (sepwidth !== 0) { - colSep = buildCommon.makeSpan(["arraycolsep"], []); - colSep.style.width = makeEm(sepwidth); - cols.push(colSep); - } - } - - var col = []; - - for (r = 0; r < nr; ++r) { - var row = body[r]; - var elem = row[c]; - - if (!elem) { - continue; - } - - var _shift2 = row.pos - offset; - - elem.depth = row.depth; - elem.height = row.height; - col.push({ - type: "elem", - elem: elem, - shift: _shift2 - }); - } - - col = buildCommon.makeVList({ - positionType: "individualShift", - children: col - }, options); - col = buildCommon.makeSpan(["col-align-" + (colDescr.align || "c")], [col]); - cols.push(col); - - if (c < nc - 1 || group.hskipBeforeAndAfter) { - sepwidth = utils.deflt(colDescr.postgap, arraycolsep); - - if (sepwidth !== 0) { - colSep = buildCommon.makeSpan(["arraycolsep"], []); - colSep.style.width = makeEm(sepwidth); - cols.push(colSep); - } - } - } - - body = buildCommon.makeSpan(["mtable"], cols); // Add \hline(s), if any. - - if (hlines.length > 0) { - var line = buildCommon.makeLineSpan("hline", options, ruleThickness); - var dashes = buildCommon.makeLineSpan("hdashline", options, ruleThickness); - var vListElems = [{ - type: "elem", - elem: body, - shift: 0 - }]; - - while (hlines.length > 0) { - var hline = hlines.pop(); - var lineShift = hline.pos - offset; - - if (hline.isDashed) { - vListElems.push({ - type: "elem", - elem: dashes, - shift: lineShift - }); - } else { - vListElems.push({ - type: "elem", - elem: line, - shift: lineShift - }); - } - } - - body = buildCommon.makeVList({ - positionType: "individualShift", - children: vListElems - }, options); - } - - if (tagSpans.length === 0) { - return buildCommon.makeSpan(["mord"], [body], options); - } else { - var eqnNumCol = buildCommon.makeVList({ - positionType: "individualShift", - children: tagSpans - }, options); - eqnNumCol = buildCommon.makeSpan(["tag"], [eqnNumCol], options); - return buildCommon.makeFragment([body, eqnNumCol]); - } -}; - -var alignMap = { - c: "center ", - l: "left ", - r: "right " -}; - -var mathmlBuilder$5 = function mathmlBuilder(group, options) { - var tbl = []; - var glue = new mathMLTree.MathNode("mtd", [], ["mtr-glue"]); - var tag = new mathMLTree.MathNode("mtd", [], ["mml-eqn-num"]); - - for (var i = 0; i < group.body.length; i++) { - var rw = group.body[i]; - var row = []; - - for (var j = 0; j < rw.length; j++) { - row.push(new mathMLTree.MathNode("mtd", [buildGroup(rw[j], options)])); - } - - if (group.tags && group.tags[i]) { - row.unshift(glue); - row.push(glue); - - if (group.leqno) { - row.unshift(tag); - } else { - row.push(tag); - } - } - - tbl.push(new mathMLTree.MathNode("mtr", row)); - } - - var table = new mathMLTree.MathNode("mtable", tbl); // Set column alignment, row spacing, column spacing, and - // array lines by setting attributes on the table element. - // Set the row spacing. In MathML, we specify a gap distance. - // We do not use rowGap[] because MathML automatically increases - // cell height with the height/depth of the element content. - // LaTeX \arraystretch multiplies the row baseline-to-baseline distance. - // We simulate this by adding (arraystretch - 1)em to the gap. This - // does a reasonable job of adjusting arrays containing 1 em tall content. - // The 0.16 and 0.09 values are found empirically. They produce an array - // similar to LaTeX and in which content does not interfere with \hlines. - - var gap = group.arraystretch === 0.5 ? 0.1 // {smallmatrix}, {subarray} - : 0.16 + group.arraystretch - 1 + (group.addJot ? 0.09 : 0); - table.setAttribute("rowspacing", makeEm(gap)); // MathML table lines go only between cells. - // To place a line on an edge we'll use , if necessary. - - var menclose = ""; - var align = ""; - - if (group.cols && group.cols.length > 0) { - // Find column alignment, column spacing, and vertical lines. - var cols = group.cols; - var columnLines = ""; - var prevTypeWasAlign = false; - var iStart = 0; - var iEnd = cols.length; - - if (cols[0].type === "separator") { - menclose += "top "; - iStart = 1; - } - - if (cols[cols.length - 1].type === "separator") { - menclose += "bottom "; - iEnd -= 1; - } - - for (var _i = iStart; _i < iEnd; _i++) { - if (cols[_i].type === "align") { - align += alignMap[cols[_i].align]; - - if (prevTypeWasAlign) { - columnLines += "none "; - } - - prevTypeWasAlign = true; - } else if (cols[_i].type === "separator") { - // MathML accepts only single lines between cells. - // So we read only the first of consecutive separators. - if (prevTypeWasAlign) { - columnLines += cols[_i].separator === "|" ? "solid " : "dashed "; - prevTypeWasAlign = false; - } - } - } - - table.setAttribute("columnalign", align.trim()); - - if (/[sd]/.test(columnLines)) { - table.setAttribute("columnlines", columnLines.trim()); - } - } // Set column spacing. - - - if (group.colSeparationType === "align") { - var _cols = group.cols || []; - - var spacing = ""; - - for (var _i2 = 1; _i2 < _cols.length; _i2++) { - spacing += _i2 % 2 ? "0em " : "1em "; - } - - table.setAttribute("columnspacing", spacing.trim()); - } else if (group.colSeparationType === "alignat" || group.colSeparationType === "gather") { - table.setAttribute("columnspacing", "0em"); - } else if (group.colSeparationType === "small") { - table.setAttribute("columnspacing", "0.2778em"); - } else if (group.colSeparationType === "CD") { - table.setAttribute("columnspacing", "0.5em"); - } else { - table.setAttribute("columnspacing", "1em"); - } // Address \hline and \hdashline - - - var rowLines = ""; - var hlines = group.hLinesBeforeRow; - menclose += hlines[0].length > 0 ? "left " : ""; - menclose += hlines[hlines.length - 1].length > 0 ? "right " : ""; - - for (var _i3 = 1; _i3 < hlines.length - 1; _i3++) { - rowLines += hlines[_i3].length === 0 ? "none " // MathML accepts only a single line between rows. Read one element. - : hlines[_i3][0] ? "dashed " : "solid "; - } - - if (/[sd]/.test(rowLines)) { - table.setAttribute("rowlines", rowLines.trim()); - } - - if (menclose !== "") { - table = new mathMLTree.MathNode("menclose", [table]); - table.setAttribute("notation", menclose.trim()); - } - - if (group.arraystretch && group.arraystretch < 1) { - // A small array. Wrap in scriptstyle so row gap is not too large. - table = new mathMLTree.MathNode("mstyle", [table]); - table.setAttribute("scriptlevel", "1"); - } - - return table; -}; // Convenience function for align, align*, aligned, alignat, alignat*, alignedat. - - -var alignedHandler = function alignedHandler(context, args) { - if (context.envName.indexOf("ed") === -1) { - validateAmsEnvironmentContext(context); - } - - var cols = []; - var separationType = context.envName.indexOf("at") > -1 ? "alignat" : "align"; - var isSplit = context.envName === "split"; - var res = parseArray(context.parser, { - cols, - addJot: true, - autoTag: isSplit ? undefined : getAutoTag(context.envName), - emptySingleRow: true, - colSeparationType: separationType, - maxNumCols: isSplit ? 2 : undefined, - leqno: context.parser.settings.leqno - }, "display"); // Determining number of columns. - // 1. If the first argument is given, we use it as a number of columns, - // and makes sure that each row doesn't exceed that number. - // 2. Otherwise, just count number of columns = maximum number - // of cells in each row ("aligned" mode -- isAligned will be true). - // - // At the same time, prepend empty group {} at beginning of every second - // cell in each row (starting with second cell) so that operators become - // binary. This behavior is implemented in amsmath's \start@aligned. - - var numMaths; - var numCols = 0; - var emptyGroup = { - type: "ordgroup", - mode: context.mode, - body: [] - }; - - if (args[0] && args[0].type === "ordgroup") { - var arg0 = ""; - - for (var i = 0; i < args[0].body.length; i++) { - var textord = assertNodeType(args[0].body[i], "textord"); - arg0 += textord.text; - } - - numMaths = Number(arg0); - numCols = numMaths * 2; - } - - var isAligned = !numCols; - res.body.forEach(function (row) { - for (var _i4 = 1; _i4 < row.length; _i4 += 2) { - // Modify ordgroup node within styling node - var styling = assertNodeType(row[_i4], "styling"); - var ordgroup = assertNodeType(styling.body[0], "ordgroup"); - ordgroup.body.unshift(emptyGroup); - } - - if (!isAligned) { - // Case 1 - var curMaths = row.length / 2; - - if (numMaths < curMaths) { - throw new ParseError("Too many math in a row: " + ("expected " + numMaths + ", but got " + curMaths), row[0]); - } - } else if (numCols < row.length) { - // Case 2 - numCols = row.length; - } - }); // Adjusting alignment. - // In aligned mode, we add one \qquad between columns; - // otherwise we add nothing. - - for (var _i5 = 0; _i5 < numCols; ++_i5) { - var align = "r"; - var pregap = 0; - - if (_i5 % 2 === 1) { - align = "l"; - } else if (_i5 > 0 && isAligned) { - // "aligned" mode. - pregap = 1; // add one \quad - } - - cols[_i5] = { - type: "align", - align: align, - pregap: pregap, - postgap: 0 - }; - } - - res.colSeparationType = isAligned ? "align" : "alignat"; - return res; -}; // Arrays are part of LaTeX, defined in lttab.dtx so its documentation -// is part of the source2e.pdf file of LaTeX2e source documentation. -// {darray} is an {array} environment where cells are set in \displaystyle, -// as defined in nccmath.sty. - - -defineEnvironment({ - type: "array", - names: ["array", "darray"], - props: { - numArgs: 1 - }, - - handler(context, args) { - // Since no types are specified above, the two possibilities are - // - The argument is wrapped in {} or [], in which case Parser's - // parseGroup() returns an "ordgroup" wrapping some symbol node. - // - The argument is a bare symbol node. - var symNode = checkSymbolNodeType(args[0]); - var colalign = symNode ? [args[0]] : assertNodeType(args[0], "ordgroup").body; - var cols = colalign.map(function (nde) { - var node = assertSymbolNodeType(nde); - var ca = node.text; - - if ("lcr".indexOf(ca) !== -1) { - return { - type: "align", - align: ca - }; - } else if (ca === "|") { - return { - type: "separator", - separator: "|" - }; - } else if (ca === ":") { - return { - type: "separator", - separator: ":" - }; - } - - throw new ParseError("Unknown column alignment: " + ca, nde); - }); - var res = { - cols, - hskipBeforeAndAfter: true, - // \@preamble in lttab.dtx - maxNumCols: cols.length - }; - return parseArray(context.parser, res, dCellStyle(context.envName)); - }, - - htmlBuilder: htmlBuilder$6, - mathmlBuilder: mathmlBuilder$5 -}); // The matrix environments of amsmath builds on the array environment -// of LaTeX, which is discussed above. -// The mathtools package adds starred versions of the same environments. -// These have an optional argument to choose left|center|right justification. - -defineEnvironment({ - type: "array", - names: ["matrix", "pmatrix", "bmatrix", "Bmatrix", "vmatrix", "Vmatrix", "matrix*", "pmatrix*", "bmatrix*", "Bmatrix*", "vmatrix*", "Vmatrix*"], - props: { - numArgs: 0 - }, - - handler(context) { - var delimiters = { - "matrix": null, - "pmatrix": ["(", ")"], - "bmatrix": ["[", "]"], - "Bmatrix": ["\\{", "\\}"], - "vmatrix": ["|", "|"], - "Vmatrix": ["\\Vert", "\\Vert"] - }[context.envName.replace("*", "")]; // \hskip -\arraycolsep in amsmath - - var colAlign = "c"; - var payload = { - hskipBeforeAndAfter: false, - cols: [{ - type: "align", - align: colAlign - }] - }; - - if (context.envName.charAt(context.envName.length - 1) === "*") { - // It's one of the mathtools starred functions. - // Parse the optional alignment argument. - var parser = context.parser; - parser.consumeSpaces(); - - if (parser.fetch().text === "[") { - parser.consume(); - parser.consumeSpaces(); - colAlign = parser.fetch().text; - - if ("lcr".indexOf(colAlign) === -1) { - throw new ParseError("Expected l or c or r", parser.nextToken); - } - - parser.consume(); - parser.consumeSpaces(); - parser.expect("]"); - parser.consume(); - payload.cols = [{ - type: "align", - align: colAlign - }]; - } - } - - var res = parseArray(context.parser, payload, dCellStyle(context.envName)); // Populate cols with the correct number of column alignment specs. - - var numCols = Math.max(0, ...res.body.map(row => row.length)); - res.cols = new Array(numCols).fill({ - type: "align", - align: colAlign - }); - return delimiters ? { - type: "leftright", - mode: context.mode, - body: [res], - left: delimiters[0], - right: delimiters[1], - rightColor: undefined // \right uninfluenced by \color in array - - } : res; - }, - - htmlBuilder: htmlBuilder$6, - mathmlBuilder: mathmlBuilder$5 -}); -defineEnvironment({ - type: "array", - names: ["smallmatrix"], - props: { - numArgs: 0 - }, - - handler(context) { - var payload = { - arraystretch: 0.5 - }; - var res = parseArray(context.parser, payload, "script"); - res.colSeparationType = "small"; - return res; - }, - - htmlBuilder: htmlBuilder$6, - mathmlBuilder: mathmlBuilder$5 -}); -defineEnvironment({ - type: "array", - names: ["subarray"], - props: { - numArgs: 1 - }, - - handler(context, args) { - // Parsing of {subarray} is similar to {array} - var symNode = checkSymbolNodeType(args[0]); - var colalign = symNode ? [args[0]] : assertNodeType(args[0], "ordgroup").body; - var cols = colalign.map(function (nde) { - var node = assertSymbolNodeType(nde); - var ca = node.text; // {subarray} only recognizes "l" & "c" - - if ("lc".indexOf(ca) !== -1) { - return { - type: "align", - align: ca - }; - } - - throw new ParseError("Unknown column alignment: " + ca, nde); - }); - - if (cols.length > 1) { - throw new ParseError("{subarray} can contain only one column"); - } - - var res = { - cols, - hskipBeforeAndAfter: false, - arraystretch: 0.5 - }; - res = parseArray(context.parser, res, "script"); - - if (res.body.length > 0 && res.body[0].length > 1) { - throw new ParseError("{subarray} can contain only one column"); - } - - return res; - }, - - htmlBuilder: htmlBuilder$6, - mathmlBuilder: mathmlBuilder$5 -}); // A cases environment (in amsmath.sty) is almost equivalent to -// \def\arraystretch{1.2}% -// \left\{\begin{array}{@{}l@{\quad}l@{}} … \end{array}\right. -// {dcases} is a {cases} environment where cells are set in \displaystyle, -// as defined in mathtools.sty. -// {rcases} is another mathtools environment. It's brace is on the right side. - -defineEnvironment({ - type: "array", - names: ["cases", "dcases", "rcases", "drcases"], - props: { - numArgs: 0 - }, - - handler(context) { - var payload = { - arraystretch: 1.2, - cols: [{ - type: "align", - align: "l", - pregap: 0, - // TODO(kevinb) get the current style. - // For now we use the metrics for TEXT style which is what we were - // doing before. Before attempting to get the current style we - // should look at TeX's behavior especially for \over and matrices. - postgap: 1.0 - /* 1em quad */ - - }, { - type: "align", - align: "l", - pregap: 0, - postgap: 0 - }] - }; - var res = parseArray(context.parser, payload, dCellStyle(context.envName)); - return { - type: "leftright", - mode: context.mode, - body: [res], - left: context.envName.indexOf("r") > -1 ? "." : "\\{", - right: context.envName.indexOf("r") > -1 ? "\\}" : ".", - rightColor: undefined - }; - }, - - htmlBuilder: htmlBuilder$6, - mathmlBuilder: mathmlBuilder$5 -}); // In the align environment, one uses ampersands, &, to specify number of -// columns in each row, and to locate spacing between each column. -// align gets automatic numbering. align* and aligned do not. -// The alignedat environment can be used in math mode. -// Note that we assume \nomallineskiplimit to be zero, -// so that \strut@ is the same as \strut. - -defineEnvironment({ - type: "array", - names: ["align", "align*", "aligned", "split"], - props: { - numArgs: 0 - }, - handler: alignedHandler, - htmlBuilder: htmlBuilder$6, - mathmlBuilder: mathmlBuilder$5 -}); // A gathered environment is like an array environment with one centered -// column, but where rows are considered lines so get \jot line spacing -// and contents are set in \displaystyle. - -defineEnvironment({ - type: "array", - names: ["gathered", "gather", "gather*"], - props: { - numArgs: 0 - }, - - handler(context) { - if (utils.contains(["gather", "gather*"], context.envName)) { - validateAmsEnvironmentContext(context); - } - - var res = { - cols: [{ - type: "align", - align: "c" - }], - addJot: true, - colSeparationType: "gather", - autoTag: getAutoTag(context.envName), - emptySingleRow: true, - leqno: context.parser.settings.leqno - }; - return parseArray(context.parser, res, "display"); - }, - - htmlBuilder: htmlBuilder$6, - mathmlBuilder: mathmlBuilder$5 -}); // alignat environment is like an align environment, but one must explicitly -// specify maximum number of columns in each row, and can adjust spacing between -// each columns. - -defineEnvironment({ - type: "array", - names: ["alignat", "alignat*", "alignedat"], - props: { - numArgs: 1 - }, - handler: alignedHandler, - htmlBuilder: htmlBuilder$6, - mathmlBuilder: mathmlBuilder$5 -}); -defineEnvironment({ - type: "array", - names: ["equation", "equation*"], - props: { - numArgs: 0 - }, - - handler(context) { - validateAmsEnvironmentContext(context); - var res = { - autoTag: getAutoTag(context.envName), - emptySingleRow: true, - singleRow: true, - maxNumCols: 1, - leqno: context.parser.settings.leqno - }; - return parseArray(context.parser, res, "display"); - }, - - htmlBuilder: htmlBuilder$6, - mathmlBuilder: mathmlBuilder$5 -}); -defineEnvironment({ - type: "array", - names: ["CD"], - props: { - numArgs: 0 - }, - - handler(context) { - validateAmsEnvironmentContext(context); - return parseCD(context.parser); - }, - - htmlBuilder: htmlBuilder$6, - mathmlBuilder: mathmlBuilder$5 -}); -defineMacro("\\nonumber", "\\gdef\\@eqnsw{0}"); -defineMacro("\\notag", "\\nonumber"); // Catch \hline outside array environment - -defineFunction({ - type: "text", - // Doesn't matter what this is. - names: ["\\hline", "\\hdashline"], - props: { - numArgs: 0, - allowedInText: true, - allowedInMath: true - }, - - handler(context, args) { - throw new ParseError(context.funcName + " valid only within array environment"); - } - -}); - -var environments = _environments; - -// defineEnvironment definitions. - -defineFunction({ - type: "environment", - names: ["\\begin", "\\end"], - props: { - numArgs: 1, - argTypes: ["text"] - }, - - handler(_ref, args) { - var { - parser, - funcName - } = _ref; - var nameGroup = args[0]; - - if (nameGroup.type !== "ordgroup") { - throw new ParseError("Invalid environment name", nameGroup); - } - - var envName = ""; - - for (var i = 0; i < nameGroup.body.length; ++i) { - envName += assertNodeType(nameGroup.body[i], "textord").text; - } - - if (funcName === "\\begin") { - // begin...end is similar to left...right - if (!environments.hasOwnProperty(envName)) { - throw new ParseError("No such environment: " + envName, nameGroup); - } // Build the environment object. Arguments and other information will - // be made available to the begin and end methods using properties. - - - var env = environments[envName]; - var { - args: _args, - optArgs - } = parser.parseArguments("\\begin{" + envName + "}", env); - var context = { - mode: parser.mode, - envName, - parser - }; - var result = env.handler(context, _args, optArgs); - parser.expect("\\end", false); - var endNameToken = parser.nextToken; - var end = assertNodeType(parser.parseFunction(), "environment"); - - if (end.name !== envName) { - throw new ParseError("Mismatch: \\begin{" + envName + "} matched by \\end{" + end.name + "}", endNameToken); - } // $FlowFixMe, "environment" handler returns an environment ParseNode - - - return result; - } - - return { - type: "environment", - mode: parser.mode, - name: envName, - nameGroup - }; - } - -}); - -// TODO(kevinb): implement \\sl and \\sc - -var htmlBuilder$5 = (group, options) => { - var font = group.font; - var newOptions = options.withFont(font); - return buildGroup$1(group.body, newOptions); -}; - -var mathmlBuilder$4 = (group, options) => { - var font = group.font; - var newOptions = options.withFont(font); - return buildGroup(group.body, newOptions); -}; - -var fontAliases = { - "\\Bbb": "\\mathbb", - "\\bold": "\\mathbf", - "\\frak": "\\mathfrak", - "\\bm": "\\boldsymbol" -}; -defineFunction({ - type: "font", - names: [// styles, except \boldsymbol defined below - "\\mathrm", "\\mathit", "\\mathbf", "\\mathnormal", // families - "\\mathbb", "\\mathcal", "\\mathfrak", "\\mathscr", "\\mathsf", "\\mathtt", // aliases, except \bm defined below - "\\Bbb", "\\bold", "\\frak"], - props: { - numArgs: 1, - allowedInArgument: true - }, - handler: (_ref, args) => { - var { - parser, - funcName - } = _ref; - var body = normalizeArgument(args[0]); - var func = funcName; - - if (func in fontAliases) { - func = fontAliases[func]; - } - - return { - type: "font", - mode: parser.mode, - font: func.slice(1), - body - }; - }, - htmlBuilder: htmlBuilder$5, - mathmlBuilder: mathmlBuilder$4 -}); -defineFunction({ - type: "mclass", - names: ["\\boldsymbol", "\\bm"], - props: { - numArgs: 1 - }, - handler: (_ref2, args) => { - var { - parser - } = _ref2; - var body = args[0]; - var isCharacterBox = utils.isCharacterBox(body); // amsbsy.sty's \boldsymbol uses \binrel spacing to inherit the - // argument's bin|rel|ord status - - return { - type: "mclass", - mode: parser.mode, - mclass: binrelClass(body), - body: [{ - type: "font", - mode: parser.mode, - font: "boldsymbol", - body - }], - isCharacterBox: isCharacterBox - }; - } -}); // Old font changing functions - -defineFunction({ - type: "font", - names: ["\\rm", "\\sf", "\\tt", "\\bf", "\\it", "\\cal"], - props: { - numArgs: 0, - allowedInText: true - }, - handler: (_ref3, args) => { - var { - parser, - funcName, - breakOnTokenText - } = _ref3; - var { - mode - } = parser; - var body = parser.parseExpression(true, breakOnTokenText); - var style = "math" + funcName.slice(1); - return { - type: "font", - mode: mode, - font: style, - body: { - type: "ordgroup", - mode: parser.mode, - body - } - }; - }, - htmlBuilder: htmlBuilder$5, - mathmlBuilder: mathmlBuilder$4 -}); - -var adjustStyle = (size, originalStyle) => { - // Figure out what style this fraction should be in based on the - // function used - var style = originalStyle; - - if (size === "display") { - // Get display style as a default. - // If incoming style is sub/sup, use style.text() to get correct size. - style = style.id >= Style$1.SCRIPT.id ? style.text() : Style$1.DISPLAY; - } else if (size === "text" && style.size === Style$1.DISPLAY.size) { - // We're in a \tfrac but incoming style is displaystyle, so: - style = Style$1.TEXT; - } else if (size === "script") { - style = Style$1.SCRIPT; - } else if (size === "scriptscript") { - style = Style$1.SCRIPTSCRIPT; - } - - return style; -}; - -var htmlBuilder$4 = (group, options) => { - // Fractions are handled in the TeXbook on pages 444-445, rules 15(a-e). - var style = adjustStyle(group.size, options.style); - var nstyle = style.fracNum(); - var dstyle = style.fracDen(); - var newOptions; - newOptions = options.havingStyle(nstyle); - var numerm = buildGroup$1(group.numer, newOptions, options); - - if (group.continued) { - // \cfrac inserts a \strut into the numerator. - // Get \strut dimensions from TeXbook page 353. - var hStrut = 8.5 / options.fontMetrics().ptPerEm; - var dStrut = 3.5 / options.fontMetrics().ptPerEm; - numerm.height = numerm.height < hStrut ? hStrut : numerm.height; - numerm.depth = numerm.depth < dStrut ? dStrut : numerm.depth; - } - - newOptions = options.havingStyle(dstyle); - var denomm = buildGroup$1(group.denom, newOptions, options); - var rule; - var ruleWidth; - var ruleSpacing; - - if (group.hasBarLine) { - if (group.barSize) { - ruleWidth = calculateSize(group.barSize, options); - rule = buildCommon.makeLineSpan("frac-line", options, ruleWidth); - } else { - rule = buildCommon.makeLineSpan("frac-line", options); - } - - ruleWidth = rule.height; - ruleSpacing = rule.height; - } else { - rule = null; - ruleWidth = 0; - ruleSpacing = options.fontMetrics().defaultRuleThickness; - } // Rule 15b - - - var numShift; - var clearance; - var denomShift; - - if (style.size === Style$1.DISPLAY.size || group.size === "display") { - numShift = options.fontMetrics().num1; - - if (ruleWidth > 0) { - clearance = 3 * ruleSpacing; - } else { - clearance = 7 * ruleSpacing; - } - - denomShift = options.fontMetrics().denom1; - } else { - if (ruleWidth > 0) { - numShift = options.fontMetrics().num2; - clearance = ruleSpacing; - } else { - numShift = options.fontMetrics().num3; - clearance = 3 * ruleSpacing; - } - - denomShift = options.fontMetrics().denom2; - } - - var frac; - - if (!rule) { - // Rule 15c - var candidateClearance = numShift - numerm.depth - (denomm.height - denomShift); - - if (candidateClearance < clearance) { - numShift += 0.5 * (clearance - candidateClearance); - denomShift += 0.5 * (clearance - candidateClearance); - } - - frac = buildCommon.makeVList({ - positionType: "individualShift", - children: [{ - type: "elem", - elem: denomm, - shift: denomShift - }, { - type: "elem", - elem: numerm, - shift: -numShift - }] - }, options); - } else { - // Rule 15d - var axisHeight = options.fontMetrics().axisHeight; - - if (numShift - numerm.depth - (axisHeight + 0.5 * ruleWidth) < clearance) { - numShift += clearance - (numShift - numerm.depth - (axisHeight + 0.5 * ruleWidth)); - } - - if (axisHeight - 0.5 * ruleWidth - (denomm.height - denomShift) < clearance) { - denomShift += clearance - (axisHeight - 0.5 * ruleWidth - (denomm.height - denomShift)); - } - - var midShift = -(axisHeight - 0.5 * ruleWidth); - frac = buildCommon.makeVList({ - positionType: "individualShift", - children: [{ - type: "elem", - elem: denomm, - shift: denomShift - }, { - type: "elem", - elem: rule, - shift: midShift - }, { - type: "elem", - elem: numerm, - shift: -numShift - }] - }, options); - } // Since we manually change the style sometimes (with \dfrac or \tfrac), - // account for the possible size change here. - - - newOptions = options.havingStyle(style); - frac.height *= newOptions.sizeMultiplier / options.sizeMultiplier; - frac.depth *= newOptions.sizeMultiplier / options.sizeMultiplier; // Rule 15e - - var delimSize; - - if (style.size === Style$1.DISPLAY.size) { - delimSize = options.fontMetrics().delim1; - } else if (style.size === Style$1.SCRIPTSCRIPT.size) { - delimSize = options.havingStyle(Style$1.SCRIPT).fontMetrics().delim2; - } else { - delimSize = options.fontMetrics().delim2; - } - - var leftDelim; - var rightDelim; - - if (group.leftDelim == null) { - leftDelim = makeNullDelimiter(options, ["mopen"]); - } else { - leftDelim = delimiter.customSizedDelim(group.leftDelim, delimSize, true, options.havingStyle(style), group.mode, ["mopen"]); - } - - if (group.continued) { - rightDelim = buildCommon.makeSpan([]); // zero width for \cfrac - } else if (group.rightDelim == null) { - rightDelim = makeNullDelimiter(options, ["mclose"]); - } else { - rightDelim = delimiter.customSizedDelim(group.rightDelim, delimSize, true, options.havingStyle(style), group.mode, ["mclose"]); - } - - return buildCommon.makeSpan(["mord"].concat(newOptions.sizingClasses(options)), [leftDelim, buildCommon.makeSpan(["mfrac"], [frac]), rightDelim], options); -}; - -var mathmlBuilder$3 = (group, options) => { - var node = new mathMLTree.MathNode("mfrac", [buildGroup(group.numer, options), buildGroup(group.denom, options)]); - - if (!group.hasBarLine) { - node.setAttribute("linethickness", "0px"); - } else if (group.barSize) { - var ruleWidth = calculateSize(group.barSize, options); - node.setAttribute("linethickness", makeEm(ruleWidth)); - } - - var style = adjustStyle(group.size, options.style); - - if (style.size !== options.style.size) { - node = new mathMLTree.MathNode("mstyle", [node]); - var isDisplay = style.size === Style$1.DISPLAY.size ? "true" : "false"; - node.setAttribute("displaystyle", isDisplay); - node.setAttribute("scriptlevel", "0"); - } - - if (group.leftDelim != null || group.rightDelim != null) { - var withDelims = []; - - if (group.leftDelim != null) { - var leftOp = new mathMLTree.MathNode("mo", [new mathMLTree.TextNode(group.leftDelim.replace("\\", ""))]); - leftOp.setAttribute("fence", "true"); - withDelims.push(leftOp); - } - - withDelims.push(node); - - if (group.rightDelim != null) { - var rightOp = new mathMLTree.MathNode("mo", [new mathMLTree.TextNode(group.rightDelim.replace("\\", ""))]); - rightOp.setAttribute("fence", "true"); - withDelims.push(rightOp); - } - - return makeRow(withDelims); - } - - return node; -}; - -defineFunction({ - type: "genfrac", - names: ["\\dfrac", "\\frac", "\\tfrac", "\\dbinom", "\\binom", "\\tbinom", "\\\\atopfrac", // can’t be entered directly - "\\\\bracefrac", "\\\\brackfrac" // ditto - ], - props: { - numArgs: 2, - allowedInArgument: true - }, - handler: (_ref, args) => { - var { - parser, - funcName - } = _ref; - var numer = args[0]; - var denom = args[1]; - var hasBarLine; - var leftDelim = null; - var rightDelim = null; - var size = "auto"; - - switch (funcName) { - case "\\dfrac": - case "\\frac": - case "\\tfrac": - hasBarLine = true; - break; - - case "\\\\atopfrac": - hasBarLine = false; - break; - - case "\\dbinom": - case "\\binom": - case "\\tbinom": - hasBarLine = false; - leftDelim = "("; - rightDelim = ")"; - break; - - case "\\\\bracefrac": - hasBarLine = false; - leftDelim = "\\{"; - rightDelim = "\\}"; - break; - - case "\\\\brackfrac": - hasBarLine = false; - leftDelim = "["; - rightDelim = "]"; - break; - - default: - throw new Error("Unrecognized genfrac command"); - } - - switch (funcName) { - case "\\dfrac": - case "\\dbinom": - size = "display"; - break; - - case "\\tfrac": - case "\\tbinom": - size = "text"; - break; - } - - return { - type: "genfrac", - mode: parser.mode, - continued: false, - numer, - denom, - hasBarLine, - leftDelim, - rightDelim, - size, - barSize: null - }; - }, - htmlBuilder: htmlBuilder$4, - mathmlBuilder: mathmlBuilder$3 -}); -defineFunction({ - type: "genfrac", - names: ["\\cfrac"], - props: { - numArgs: 2 - }, - handler: (_ref2, args) => { - var { - parser, - funcName - } = _ref2; - var numer = args[0]; - var denom = args[1]; - return { - type: "genfrac", - mode: parser.mode, - continued: true, - numer, - denom, - hasBarLine: true, - leftDelim: null, - rightDelim: null, - size: "display", - barSize: null - }; - } -}); // Infix generalized fractions -- these are not rendered directly, but replaced -// immediately by one of the variants above. - -defineFunction({ - type: "infix", - names: ["\\over", "\\choose", "\\atop", "\\brace", "\\brack"], - props: { - numArgs: 0, - infix: true - }, - - handler(_ref3) { - var { - parser, - funcName, - token - } = _ref3; - var replaceWith; - - switch (funcName) { - case "\\over": - replaceWith = "\\frac"; - break; - - case "\\choose": - replaceWith = "\\binom"; - break; - - case "\\atop": - replaceWith = "\\\\atopfrac"; - break; - - case "\\brace": - replaceWith = "\\\\bracefrac"; - break; - - case "\\brack": - replaceWith = "\\\\brackfrac"; - break; - - default: - throw new Error("Unrecognized infix genfrac command"); - } - - return { - type: "infix", - mode: parser.mode, - replaceWith, - token - }; - } - -}); -var stylArray = ["display", "text", "script", "scriptscript"]; - -var delimFromValue = function delimFromValue(delimString) { - var delim = null; - - if (delimString.length > 0) { - delim = delimString; - delim = delim === "." ? null : delim; - } - - return delim; -}; - -defineFunction({ - type: "genfrac", - names: ["\\genfrac"], - props: { - numArgs: 6, - allowedInArgument: true, - argTypes: ["math", "math", "size", "text", "math", "math"] - }, - - handler(_ref4, args) { - var { - parser - } = _ref4; - var numer = args[4]; - var denom = args[5]; // Look into the parse nodes to get the desired delimiters. - - var leftNode = normalizeArgument(args[0]); - var leftDelim = leftNode.type === "atom" && leftNode.family === "open" ? delimFromValue(leftNode.text) : null; - var rightNode = normalizeArgument(args[1]); - var rightDelim = rightNode.type === "atom" && rightNode.family === "close" ? delimFromValue(rightNode.text) : null; - var barNode = assertNodeType(args[2], "size"); - var hasBarLine; - var barSize = null; - - if (barNode.isBlank) { - // \genfrac acts differently than \above. - // \genfrac treats an empty size group as a signal to use a - // standard bar size. \above would see size = 0 and omit the bar. - hasBarLine = true; - } else { - barSize = barNode.value; - hasBarLine = barSize.number > 0; - } // Find out if we want displaystyle, textstyle, etc. - - - var size = "auto"; - var styl = args[3]; - - if (styl.type === "ordgroup") { - if (styl.body.length > 0) { - var textOrd = assertNodeType(styl.body[0], "textord"); - size = stylArray[Number(textOrd.text)]; - } - } else { - styl = assertNodeType(styl, "textord"); - size = stylArray[Number(styl.text)]; - } - - return { - type: "genfrac", - mode: parser.mode, - numer, - denom, - continued: false, - hasBarLine, - barSize, - leftDelim, - rightDelim, - size - }; - }, - - htmlBuilder: htmlBuilder$4, - mathmlBuilder: mathmlBuilder$3 -}); // \above is an infix fraction that also defines a fraction bar size. - -defineFunction({ - type: "infix", - names: ["\\above"], - props: { - numArgs: 1, - argTypes: ["size"], - infix: true - }, - - handler(_ref5, args) { - var { - parser, - funcName, - token - } = _ref5; - return { - type: "infix", - mode: parser.mode, - replaceWith: "\\\\abovefrac", - size: assertNodeType(args[0], "size").value, - token - }; - } - -}); -defineFunction({ - type: "genfrac", - names: ["\\\\abovefrac"], - props: { - numArgs: 3, - argTypes: ["math", "size", "math"] - }, - handler: (_ref6, args) => { - var { - parser, - funcName - } = _ref6; - var numer = args[0]; - var barSize = assert(assertNodeType(args[1], "infix").size); - var denom = args[2]; - var hasBarLine = barSize.number > 0; - return { - type: "genfrac", - mode: parser.mode, - numer, - denom, - continued: false, - hasBarLine, - barSize, - leftDelim: null, - rightDelim: null, - size: "auto" - }; - }, - htmlBuilder: htmlBuilder$4, - mathmlBuilder: mathmlBuilder$3 -}); - -// NOTE: Unlike most `htmlBuilder`s, this one handles not only "horizBrace", but -// also "supsub" since an over/underbrace can affect super/subscripting. -var htmlBuilder$3 = (grp, options) => { - var style = options.style; // Pull out the `ParseNode<"horizBrace">` if `grp` is a "supsub" node. - - var supSubGroup; - var group; - - if (grp.type === "supsub") { - // Ref: LaTeX source2e: }}}}\limits} - // i.e. LaTeX treats the brace similar to an op and passes it - // with \limits, so we need to assign supsub style. - supSubGroup = grp.sup ? buildGroup$1(grp.sup, options.havingStyle(style.sup()), options) : buildGroup$1(grp.sub, options.havingStyle(style.sub()), options); - group = assertNodeType(grp.base, "horizBrace"); - } else { - group = assertNodeType(grp, "horizBrace"); - } // Build the base group - - - var body = buildGroup$1(group.base, options.havingBaseStyle(Style$1.DISPLAY)); // Create the stretchy element - - var braceBody = stretchy.svgSpan(group, options); // Generate the vlist, with the appropriate kerns ┏━━━━━━━━┓ - // This first vlist contains the content and the brace: equation - - var vlist; - - if (group.isOver) { - vlist = buildCommon.makeVList({ - positionType: "firstBaseline", - children: [{ - type: "elem", - elem: body - }, { - type: "kern", - size: 0.1 - }, { - type: "elem", - elem: braceBody - }] - }, options); // $FlowFixMe: Replace this with passing "svg-align" into makeVList. - - vlist.children[0].children[0].children[1].classes.push("svg-align"); - } else { - vlist = buildCommon.makeVList({ - positionType: "bottom", - positionData: body.depth + 0.1 + braceBody.height, - children: [{ - type: "elem", - elem: braceBody - }, { - type: "kern", - size: 0.1 - }, { - type: "elem", - elem: body - }] - }, options); // $FlowFixMe: Replace this with passing "svg-align" into makeVList. - - vlist.children[0].children[0].children[0].classes.push("svg-align"); - } - - if (supSubGroup) { - // To write the supsub, wrap the first vlist in another vlist: - // They can't all go in the same vlist, because the note might be - // wider than the equation. We want the equation to control the - // brace width. - // note long note long note - // ┏━━━━━━━━┓ or ┏━━━┓ not ┏━━━━━━━━━┓ - // equation eqn eqn - var vSpan = buildCommon.makeSpan(["mord", group.isOver ? "mover" : "munder"], [vlist], options); - - if (group.isOver) { - vlist = buildCommon.makeVList({ - positionType: "firstBaseline", - children: [{ - type: "elem", - elem: vSpan - }, { - type: "kern", - size: 0.2 - }, { - type: "elem", - elem: supSubGroup - }] - }, options); - } else { - vlist = buildCommon.makeVList({ - positionType: "bottom", - positionData: vSpan.depth + 0.2 + supSubGroup.height + supSubGroup.depth, - children: [{ - type: "elem", - elem: supSubGroup - }, { - type: "kern", - size: 0.2 - }, { - type: "elem", - elem: vSpan - }] - }, options); - } - } - - return buildCommon.makeSpan(["mord", group.isOver ? "mover" : "munder"], [vlist], options); -}; - -var mathmlBuilder$2 = (group, options) => { - var accentNode = stretchy.mathMLnode(group.label); - return new mathMLTree.MathNode(group.isOver ? "mover" : "munder", [buildGroup(group.base, options), accentNode]); -}; // Horizontal stretchy braces - - -defineFunction({ - type: "horizBrace", - names: ["\\overbrace", "\\underbrace"], - props: { - numArgs: 1 - }, - - handler(_ref, args) { - var { - parser, - funcName - } = _ref; - return { - type: "horizBrace", - mode: parser.mode, - label: funcName, - isOver: /^\\over/.test(funcName), - base: args[0] - }; - }, - - htmlBuilder: htmlBuilder$3, - mathmlBuilder: mathmlBuilder$2 -}); - -defineFunction({ - type: "href", - names: ["\\href"], - props: { - numArgs: 2, - argTypes: ["url", "original"], - allowedInText: true - }, - handler: (_ref, args) => { - var { - parser - } = _ref; - var body = args[1]; - var href = assertNodeType(args[0], "url").url; - - if (!parser.settings.isTrusted({ - command: "\\href", - url: href - })) { - return parser.formatUnsupportedCmd("\\href"); - } - - return { - type: "href", - mode: parser.mode, - href, - body: ordargument(body) - }; - }, - htmlBuilder: (group, options) => { - var elements = buildExpression$1(group.body, options, false); - return buildCommon.makeAnchor(group.href, [], elements, options); - }, - mathmlBuilder: (group, options) => { - var math = buildExpressionRow(group.body, options); - - if (!(math instanceof MathNode)) { - math = new MathNode("mrow", [math]); - } - - math.setAttribute("href", group.href); - return math; - } -}); -defineFunction({ - type: "href", - names: ["\\url"], - props: { - numArgs: 1, - argTypes: ["url"], - allowedInText: true - }, - handler: (_ref2, args) => { - var { - parser - } = _ref2; - var href = assertNodeType(args[0], "url").url; - - if (!parser.settings.isTrusted({ - command: "\\url", - url: href - })) { - return parser.formatUnsupportedCmd("\\url"); - } - - var chars = []; - - for (var i = 0; i < href.length; i++) { - var c = href[i]; - - if (c === "~") { - c = "\\textasciitilde"; - } - - chars.push({ - type: "textord", - mode: "text", - text: c - }); - } - - var body = { - type: "text", - mode: parser.mode, - font: "\\texttt", - body: chars - }; - return { - type: "href", - mode: parser.mode, - href, - body: ordargument(body) - }; - } -}); - -// In LaTeX, \vcenter can act only on a box, as in -// \vcenter{\hbox{$\frac{a+b}{\dfrac{c}{d}}$}} -// This function by itself doesn't do anything but prevent a soft line break. - -defineFunction({ - type: "hbox", - names: ["\\hbox"], - props: { - numArgs: 1, - argTypes: ["text"], - allowedInText: true, - primitive: true - }, - - handler(_ref, args) { - var { - parser - } = _ref; - return { - type: "hbox", - mode: parser.mode, - body: ordargument(args[0]) - }; - }, - - htmlBuilder(group, options) { - var elements = buildExpression$1(group.body, options, false); - return buildCommon.makeFragment(elements); - }, - - mathmlBuilder(group, options) { - return new mathMLTree.MathNode("mrow", buildExpression(group.body, options)); - } - -}); - -defineFunction({ - type: "html", - names: ["\\htmlClass", "\\htmlId", "\\htmlStyle", "\\htmlData"], - props: { - numArgs: 2, - argTypes: ["raw", "original"], - allowedInText: true - }, - handler: (_ref, args) => { - var { - parser, - funcName, - token - } = _ref; - var value = assertNodeType(args[0], "raw").string; - var body = args[1]; - - if (parser.settings.strict) { - parser.settings.reportNonstrict("htmlExtension", "HTML extension is disabled on strict mode"); - } - - var trustContext; - var attributes = {}; - - switch (funcName) { - case "\\htmlClass": - attributes.class = value; - trustContext = { - command: "\\htmlClass", - class: value - }; - break; - - case "\\htmlId": - attributes.id = value; - trustContext = { - command: "\\htmlId", - id: value - }; - break; - - case "\\htmlStyle": - attributes.style = value; - trustContext = { - command: "\\htmlStyle", - style: value - }; - break; - - case "\\htmlData": - { - var data = value.split(","); - - for (var i = 0; i < data.length; i++) { - var keyVal = data[i].split("="); - - if (keyVal.length !== 2) { - throw new ParseError("Error parsing key-value for \\htmlData"); - } - - attributes["data-" + keyVal[0].trim()] = keyVal[1].trim(); - } - - trustContext = { - command: "\\htmlData", - attributes - }; - break; - } - - default: - throw new Error("Unrecognized html command"); - } - - if (!parser.settings.isTrusted(trustContext)) { - return parser.formatUnsupportedCmd(funcName); - } - - return { - type: "html", - mode: parser.mode, - attributes, - body: ordargument(body) - }; - }, - htmlBuilder: (group, options) => { - var elements = buildExpression$1(group.body, options, false); - var classes = ["enclosing"]; - - if (group.attributes.class) { - classes.push(...group.attributes.class.trim().split(/\s+/)); - } - - var span = buildCommon.makeSpan(classes, elements, options); - - for (var attr in group.attributes) { - if (attr !== "class" && group.attributes.hasOwnProperty(attr)) { - span.setAttribute(attr, group.attributes[attr]); - } - } - - return span; - }, - mathmlBuilder: (group, options) => { - return buildExpressionRow(group.body, options); - } -}); - -defineFunction({ - type: "htmlmathml", - names: ["\\html@mathml"], - props: { - numArgs: 2, - allowedInText: true - }, - handler: (_ref, args) => { - var { - parser - } = _ref; - return { - type: "htmlmathml", - mode: parser.mode, - html: ordargument(args[0]), - mathml: ordargument(args[1]) - }; - }, - htmlBuilder: (group, options) => { - var elements = buildExpression$1(group.html, options, false); - return buildCommon.makeFragment(elements); - }, - mathmlBuilder: (group, options) => { - return buildExpressionRow(group.mathml, options); - } -}); - -var sizeData = function sizeData(str) { - if (/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(str)) { - // str is a number with no unit specified. - // default unit is bp, per graphix package. - return { - number: +str, - unit: "bp" - }; - } else { - var match = /([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(str); - - if (!match) { - throw new ParseError("Invalid size: '" + str + "' in \\includegraphics"); - } - - var data = { - number: +(match[1] + match[2]), - // sign + magnitude, cast to number - unit: match[3] - }; - - if (!validUnit(data)) { - throw new ParseError("Invalid unit: '" + data.unit + "' in \\includegraphics."); - } - - return data; - } -}; - -defineFunction({ - type: "includegraphics", - names: ["\\includegraphics"], - props: { - numArgs: 1, - numOptionalArgs: 1, - argTypes: ["raw", "url"], - allowedInText: false - }, - handler: (_ref, args, optArgs) => { - var { - parser - } = _ref; - var width = { - number: 0, - unit: "em" - }; - var height = { - number: 0.9, - unit: "em" - }; // sorta character sized. - - var totalheight = { - number: 0, - unit: "em" - }; - var alt = ""; - - if (optArgs[0]) { - var attributeStr = assertNodeType(optArgs[0], "raw").string; // Parser.js does not parse key/value pairs. We get a string. - - var attributes = attributeStr.split(","); - - for (var i = 0; i < attributes.length; i++) { - var keyVal = attributes[i].split("="); - - if (keyVal.length === 2) { - var str = keyVal[1].trim(); - - switch (keyVal[0].trim()) { - case "alt": - alt = str; - break; - - case "width": - width = sizeData(str); - break; - - case "height": - height = sizeData(str); - break; - - case "totalheight": - totalheight = sizeData(str); - break; - - default: - throw new ParseError("Invalid key: '" + keyVal[0] + "' in \\includegraphics."); - } - } - } - } - - var src = assertNodeType(args[0], "url").url; - - if (alt === "") { - // No alt given. Use the file name. Strip away the path. - alt = src; - alt = alt.replace(/^.*[\\/]/, ''); - alt = alt.substring(0, alt.lastIndexOf('.')); - } - - if (!parser.settings.isTrusted({ - command: "\\includegraphics", - url: src - })) { - return parser.formatUnsupportedCmd("\\includegraphics"); - } - - return { - type: "includegraphics", - mode: parser.mode, - alt: alt, - width: width, - height: height, - totalheight: totalheight, - src: src - }; - }, - htmlBuilder: (group, options) => { - var height = calculateSize(group.height, options); - var depth = 0; - - if (group.totalheight.number > 0) { - depth = calculateSize(group.totalheight, options) - height; - } - - var width = 0; - - if (group.width.number > 0) { - width = calculateSize(group.width, options); - } - - var style = { - height: makeEm(height + depth) - }; - - if (width > 0) { - style.width = makeEm(width); - } - - if (depth > 0) { - style.verticalAlign = makeEm(-depth); - } - - var node = new Img(group.src, group.alt, style); - node.height = height; - node.depth = depth; - return node; - }, - mathmlBuilder: (group, options) => { - var node = new mathMLTree.MathNode("mglyph", []); - node.setAttribute("alt", group.alt); - var height = calculateSize(group.height, options); - var depth = 0; - - if (group.totalheight.number > 0) { - depth = calculateSize(group.totalheight, options) - height; - node.setAttribute("valign", makeEm(-depth)); - } - - node.setAttribute("height", makeEm(height + depth)); - - if (group.width.number > 0) { - var width = calculateSize(group.width, options); - node.setAttribute("width", makeEm(width)); - } - - node.setAttribute("src", group.src); - return node; - } -}); - -// Horizontal spacing commands - -defineFunction({ - type: "kern", - names: ["\\kern", "\\mkern", "\\hskip", "\\mskip"], - props: { - numArgs: 1, - argTypes: ["size"], - primitive: true, - allowedInText: true - }, - - handler(_ref, args) { - var { - parser, - funcName - } = _ref; - var size = assertNodeType(args[0], "size"); - - if (parser.settings.strict) { - var mathFunction = funcName[1] === 'm'; // \mkern, \mskip - - var muUnit = size.value.unit === 'mu'; - - if (mathFunction) { - if (!muUnit) { - parser.settings.reportNonstrict("mathVsTextUnits", "LaTeX's " + funcName + " supports only mu units, " + ("not " + size.value.unit + " units")); - } - - if (parser.mode !== "math") { - parser.settings.reportNonstrict("mathVsTextUnits", "LaTeX's " + funcName + " works only in math mode"); - } - } else { - // !mathFunction - if (muUnit) { - parser.settings.reportNonstrict("mathVsTextUnits", "LaTeX's " + funcName + " doesn't support mu units"); - } - } - } - - return { - type: "kern", - mode: parser.mode, - dimension: size.value - }; - }, - - htmlBuilder(group, options) { - return buildCommon.makeGlue(group.dimension, options); - }, - - mathmlBuilder(group, options) { - var dimension = calculateSize(group.dimension, options); - return new mathMLTree.SpaceNode(dimension); - } - -}); - -// Horizontal overlap functions -defineFunction({ - type: "lap", - names: ["\\mathllap", "\\mathrlap", "\\mathclap"], - props: { - numArgs: 1, - allowedInText: true - }, - handler: (_ref, args) => { - var { - parser, - funcName - } = _ref; - var body = args[0]; - return { - type: "lap", - mode: parser.mode, - alignment: funcName.slice(5), - body - }; - }, - htmlBuilder: (group, options) => { - // mathllap, mathrlap, mathclap - var inner; - - if (group.alignment === "clap") { - // ref: https://www.math.lsu.edu/~aperlis/publications/mathclap/ - inner = buildCommon.makeSpan([], [buildGroup$1(group.body, options)]); // wrap, since CSS will center a .clap > .inner > span - - inner = buildCommon.makeSpan(["inner"], [inner], options); - } else { - inner = buildCommon.makeSpan(["inner"], [buildGroup$1(group.body, options)]); - } - - var fix = buildCommon.makeSpan(["fix"], []); - var node = buildCommon.makeSpan([group.alignment], [inner, fix], options); // At this point, we have correctly set horizontal alignment of the - // two items involved in the lap. - // Next, use a strut to set the height of the HTML bounding box. - // Otherwise, a tall argument may be misplaced. - // This code resolved issue #1153 - - var strut = buildCommon.makeSpan(["strut"]); - strut.style.height = makeEm(node.height + node.depth); - - if (node.depth) { - strut.style.verticalAlign = makeEm(-node.depth); - } - - node.children.unshift(strut); // Next, prevent vertical misplacement when next to something tall. - // This code resolves issue #1234 - - node = buildCommon.makeSpan(["thinbox"], [node], options); - return buildCommon.makeSpan(["mord", "vbox"], [node], options); - }, - mathmlBuilder: (group, options) => { - // mathllap, mathrlap, mathclap - var node = new mathMLTree.MathNode("mpadded", [buildGroup(group.body, options)]); - - if (group.alignment !== "rlap") { - var offset = group.alignment === "llap" ? "-1" : "-0.5"; - node.setAttribute("lspace", offset + "width"); - } - - node.setAttribute("width", "0px"); - return node; - } -}); - -defineFunction({ - type: "styling", - names: ["\\(", "$"], - props: { - numArgs: 0, - allowedInText: true, - allowedInMath: false - }, - - handler(_ref, args) { - var { - funcName, - parser - } = _ref; - var outerMode = parser.mode; - parser.switchMode("math"); - var close = funcName === "\\(" ? "\\)" : "$"; - var body = parser.parseExpression(false, close); - parser.expect(close); - parser.switchMode(outerMode); - return { - type: "styling", - mode: parser.mode, - style: "text", - body - }; - } - -}); // Check for extra closing math delimiters - -defineFunction({ - type: "text", - // Doesn't matter what this is. - names: ["\\)", "\\]"], - props: { - numArgs: 0, - allowedInText: true, - allowedInMath: false - }, - - handler(context, args) { - throw new ParseError("Mismatched " + context.funcName); - } - -}); - -var chooseMathStyle = (group, options) => { - switch (options.style.size) { - case Style$1.DISPLAY.size: - return group.display; - - case Style$1.TEXT.size: - return group.text; - - case Style$1.SCRIPT.size: - return group.script; - - case Style$1.SCRIPTSCRIPT.size: - return group.scriptscript; - - default: - return group.text; - } -}; - -defineFunction({ - type: "mathchoice", - names: ["\\mathchoice"], - props: { - numArgs: 4, - primitive: true - }, - handler: (_ref, args) => { - var { - parser - } = _ref; - return { - type: "mathchoice", - mode: parser.mode, - display: ordargument(args[0]), - text: ordargument(args[1]), - script: ordargument(args[2]), - scriptscript: ordargument(args[3]) - }; - }, - htmlBuilder: (group, options) => { - var body = chooseMathStyle(group, options); - var elements = buildExpression$1(body, options, false); - return buildCommon.makeFragment(elements); - }, - mathmlBuilder: (group, options) => { - var body = chooseMathStyle(group, options); - return buildExpressionRow(body, options); - } -}); - -var assembleSupSub = (base, supGroup, subGroup, options, style, slant, baseShift) => { - base = buildCommon.makeSpan([], [base]); - var subIsSingleCharacter = subGroup && utils.isCharacterBox(subGroup); - var sub; - var sup; // We manually have to handle the superscripts and subscripts. This, - // aside from the kern calculations, is copied from supsub. - - if (supGroup) { - var elem = buildGroup$1(supGroup, options.havingStyle(style.sup()), options); - sup = { - elem, - kern: Math.max(options.fontMetrics().bigOpSpacing1, options.fontMetrics().bigOpSpacing3 - elem.depth) - }; - } - - if (subGroup) { - var _elem = buildGroup$1(subGroup, options.havingStyle(style.sub()), options); - - sub = { - elem: _elem, - kern: Math.max(options.fontMetrics().bigOpSpacing2, options.fontMetrics().bigOpSpacing4 - _elem.height) - }; - } // Build the final group as a vlist of the possible subscript, base, - // and possible superscript. - - - var finalGroup; - - if (sup && sub) { - var bottom = options.fontMetrics().bigOpSpacing5 + sub.elem.height + sub.elem.depth + sub.kern + base.depth + baseShift; - finalGroup = buildCommon.makeVList({ - positionType: "bottom", - positionData: bottom, - children: [{ - type: "kern", - size: options.fontMetrics().bigOpSpacing5 - }, { - type: "elem", - elem: sub.elem, - marginLeft: makeEm(-slant) - }, { - type: "kern", - size: sub.kern - }, { - type: "elem", - elem: base - }, { - type: "kern", - size: sup.kern - }, { - type: "elem", - elem: sup.elem, - marginLeft: makeEm(slant) - }, { - type: "kern", - size: options.fontMetrics().bigOpSpacing5 - }] - }, options); - } else if (sub) { - var top = base.height - baseShift; // Shift the limits by the slant of the symbol. Note - // that we are supposed to shift the limits by 1/2 of the slant, - // but since we are centering the limits adding a full slant of - // margin will shift by 1/2 that. - - finalGroup = buildCommon.makeVList({ - positionType: "top", - positionData: top, - children: [{ - type: "kern", - size: options.fontMetrics().bigOpSpacing5 - }, { - type: "elem", - elem: sub.elem, - marginLeft: makeEm(-slant) - }, { - type: "kern", - size: sub.kern - }, { - type: "elem", - elem: base - }] - }, options); - } else if (sup) { - var _bottom = base.depth + baseShift; - - finalGroup = buildCommon.makeVList({ - positionType: "bottom", - positionData: _bottom, - children: [{ - type: "elem", - elem: base - }, { - type: "kern", - size: sup.kern - }, { - type: "elem", - elem: sup.elem, - marginLeft: makeEm(slant) - }, { - type: "kern", - size: options.fontMetrics().bigOpSpacing5 - }] - }, options); - } else { - // This case probably shouldn't occur (this would mean the - // supsub was sending us a group with no superscript or - // subscript) but be safe. - return base; - } - - var parts = [finalGroup]; - - if (sub && slant !== 0 && !subIsSingleCharacter) { - // A negative margin-left was applied to the lower limit. - // Avoid an overlap by placing a spacer on the left on the group. - var spacer = buildCommon.makeSpan(["mspace"], [], options); - spacer.style.marginRight = makeEm(slant); - parts.unshift(spacer); - } - - return buildCommon.makeSpan(["mop", "op-limits"], parts, options); -}; - -// Limits, symbols -// Most operators have a large successor symbol, but these don't. -var noSuccessor = ["\\smallint"]; // NOTE: Unlike most `htmlBuilder`s, this one handles not only "op", but also -// "supsub" since some of them (like \int) can affect super/subscripting. - -var htmlBuilder$2 = (grp, options) => { - // Operators are handled in the TeXbook pg. 443-444, rule 13(a). - var supGroup; - var subGroup; - var hasLimits = false; - var group; - - if (grp.type === "supsub") { - // If we have limits, supsub will pass us its group to handle. Pull - // out the superscript and subscript and set the group to the op in - // its base. - supGroup = grp.sup; - subGroup = grp.sub; - group = assertNodeType(grp.base, "op"); - hasLimits = true; - } else { - group = assertNodeType(grp, "op"); - } - - var style = options.style; - var large = false; - - if (style.size === Style$1.DISPLAY.size && group.symbol && !utils.contains(noSuccessor, group.name)) { - // Most symbol operators get larger in displaystyle (rule 13) - large = true; - } - - var base; - - if (group.symbol) { - // If this is a symbol, create the symbol. - var fontName = large ? "Size2-Regular" : "Size1-Regular"; - var stash = ""; - - if (group.name === "\\oiint" || group.name === "\\oiiint") { - // No font glyphs yet, so use a glyph w/o the oval. - // TODO: When font glyphs are available, delete this code. - stash = group.name.slice(1); - group.name = stash === "oiint" ? "\\iint" : "\\iiint"; - } - - base = buildCommon.makeSymbol(group.name, fontName, "math", options, ["mop", "op-symbol", large ? "large-op" : "small-op"]); - - if (stash.length > 0) { - // We're in \oiint or \oiiint. Overlay the oval. - // TODO: When font glyphs are available, delete this code. - var italic = base.italic; - var oval = buildCommon.staticSvg(stash + "Size" + (large ? "2" : "1"), options); - base = buildCommon.makeVList({ - positionType: "individualShift", - children: [{ - type: "elem", - elem: base, - shift: 0 - }, { - type: "elem", - elem: oval, - shift: large ? 0.08 : 0 - }] - }, options); - group.name = "\\" + stash; - base.classes.unshift("mop"); // $FlowFixMe - - base.italic = italic; - } - } else if (group.body) { - // If this is a list, compose that list. - var inner = buildExpression$1(group.body, options, true); - - if (inner.length === 1 && inner[0] instanceof SymbolNode) { - base = inner[0]; - base.classes[0] = "mop"; // replace old mclass - } else { - base = buildCommon.makeSpan(["mop"], inner, options); - } - } else { - // Otherwise, this is a text operator. Build the text from the - // operator's name. - var output = []; - - for (var i = 1; i < group.name.length; i++) { - output.push(buildCommon.mathsym(group.name[i], group.mode, options)); - } - - base = buildCommon.makeSpan(["mop"], output, options); - } // If content of op is a single symbol, shift it vertically. - - - var baseShift = 0; - var slant = 0; - - if ((base instanceof SymbolNode || group.name === "\\oiint" || group.name === "\\oiiint") && !group.suppressBaseShift) { - // We suppress the shift of the base of \overset and \underset. Otherwise, - // shift the symbol so its center lies on the axis (rule 13). It - // appears that our fonts have the centers of the symbols already - // almost on the axis, so these numbers are very small. Note we - // don't actually apply this here, but instead it is used either in - // the vlist creation or separately when there are no limits. - baseShift = (base.height - base.depth) / 2 - options.fontMetrics().axisHeight; // The slant of the symbol is just its italic correction. - // $FlowFixMe - - slant = base.italic; - } - - if (hasLimits) { - return assembleSupSub(base, supGroup, subGroup, options, style, slant, baseShift); - } else { - if (baseShift) { - base.style.position = "relative"; - base.style.top = makeEm(baseShift); - } - - return base; - } -}; - -var mathmlBuilder$1 = (group, options) => { - var node; - - if (group.symbol) { - // This is a symbol. Just add the symbol. - node = new MathNode("mo", [makeText(group.name, group.mode)]); - - if (utils.contains(noSuccessor, group.name)) { - node.setAttribute("largeop", "false"); - } - } else if (group.body) { - // This is an operator with children. Add them. - node = new MathNode("mo", buildExpression(group.body, options)); - } else { - // This is a text operator. Add all of the characters from the - // operator's name. - node = new MathNode("mi", [new TextNode(group.name.slice(1))]); // Append an . - // ref: https://www.w3.org/TR/REC-MathML/chap3_2.html#sec3.2.4 - - var operator = new MathNode("mo", [makeText("\u2061", "text")]); - - if (group.parentIsSupSub) { - node = new MathNode("mrow", [node, operator]); - } else { - node = newDocumentFragment([node, operator]); - } - } - - return node; -}; - -var singleCharBigOps = { - "\u220F": "\\prod", - "\u2210": "\\coprod", - "\u2211": "\\sum", - "\u22c0": "\\bigwedge", - "\u22c1": "\\bigvee", - "\u22c2": "\\bigcap", - "\u22c3": "\\bigcup", - "\u2a00": "\\bigodot", - "\u2a01": "\\bigoplus", - "\u2a02": "\\bigotimes", - "\u2a04": "\\biguplus", - "\u2a06": "\\bigsqcup" -}; -defineFunction({ - type: "op", - names: ["\\coprod", "\\bigvee", "\\bigwedge", "\\biguplus", "\\bigcap", "\\bigcup", "\\intop", "\\prod", "\\sum", "\\bigotimes", "\\bigoplus", "\\bigodot", "\\bigsqcup", "\\smallint", "\u220F", "\u2210", "\u2211", "\u22c0", "\u22c1", "\u22c2", "\u22c3", "\u2a00", "\u2a01", "\u2a02", "\u2a04", "\u2a06"], - props: { - numArgs: 0 - }, - handler: (_ref, args) => { - var { - parser, - funcName - } = _ref; - var fName = funcName; - - if (fName.length === 1) { - fName = singleCharBigOps[fName]; - } - - return { - type: "op", - mode: parser.mode, - limits: true, - parentIsSupSub: false, - symbol: true, - name: fName - }; - }, - htmlBuilder: htmlBuilder$2, - mathmlBuilder: mathmlBuilder$1 -}); // Note: calling defineFunction with a type that's already been defined only -// works because the same htmlBuilder and mathmlBuilder are being used. - -defineFunction({ - type: "op", - names: ["\\mathop"], - props: { - numArgs: 1, - primitive: true - }, - handler: (_ref2, args) => { - var { - parser - } = _ref2; - var body = args[0]; - return { - type: "op", - mode: parser.mode, - limits: false, - parentIsSupSub: false, - symbol: false, - body: ordargument(body) - }; - }, - htmlBuilder: htmlBuilder$2, - mathmlBuilder: mathmlBuilder$1 -}); // There are 2 flags for operators; whether they produce limits in -// displaystyle, and whether they are symbols and should grow in -// displaystyle. These four groups cover the four possible choices. - -var singleCharIntegrals = { - "\u222b": "\\int", - "\u222c": "\\iint", - "\u222d": "\\iiint", - "\u222e": "\\oint", - "\u222f": "\\oiint", - "\u2230": "\\oiiint" -}; // No limits, not symbols - -defineFunction({ - type: "op", - names: ["\\arcsin", "\\arccos", "\\arctan", "\\arctg", "\\arcctg", "\\arg", "\\ch", "\\cos", "\\cosec", "\\cosh", "\\cot", "\\cotg", "\\coth", "\\csc", "\\ctg", "\\cth", "\\deg", "\\dim", "\\exp", "\\hom", "\\ker", "\\lg", "\\ln", "\\log", "\\sec", "\\sin", "\\sinh", "\\sh", "\\tan", "\\tanh", "\\tg", "\\th"], - props: { - numArgs: 0 - }, - - handler(_ref3) { - var { - parser, - funcName - } = _ref3; - return { - type: "op", - mode: parser.mode, - limits: false, - parentIsSupSub: false, - symbol: false, - name: funcName - }; - }, - - htmlBuilder: htmlBuilder$2, - mathmlBuilder: mathmlBuilder$1 -}); // Limits, not symbols - -defineFunction({ - type: "op", - names: ["\\det", "\\gcd", "\\inf", "\\lim", "\\max", "\\min", "\\Pr", "\\sup"], - props: { - numArgs: 0 - }, - - handler(_ref4) { - var { - parser, - funcName - } = _ref4; - return { - type: "op", - mode: parser.mode, - limits: true, - parentIsSupSub: false, - symbol: false, - name: funcName - }; - }, - - htmlBuilder: htmlBuilder$2, - mathmlBuilder: mathmlBuilder$1 -}); // No limits, symbols - -defineFunction({ - type: "op", - names: ["\\int", "\\iint", "\\iiint", "\\oint", "\\oiint", "\\oiiint", "\u222b", "\u222c", "\u222d", "\u222e", "\u222f", "\u2230"], - props: { - numArgs: 0 - }, - - handler(_ref5) { - var { - parser, - funcName - } = _ref5; - var fName = funcName; - - if (fName.length === 1) { - fName = singleCharIntegrals[fName]; - } - - return { - type: "op", - mode: parser.mode, - limits: false, - parentIsSupSub: false, - symbol: true, - name: fName - }; - }, - - htmlBuilder: htmlBuilder$2, - mathmlBuilder: mathmlBuilder$1 -}); - -// NOTE: Unlike most `htmlBuilder`s, this one handles not only -// "operatorname", but also "supsub" since \operatorname* can -// affect super/subscripting. -var htmlBuilder$1 = (grp, options) => { - // Operators are handled in the TeXbook pg. 443-444, rule 13(a). - var supGroup; - var subGroup; - var hasLimits = false; - var group; - - if (grp.type === "supsub") { - // If we have limits, supsub will pass us its group to handle. Pull - // out the superscript and subscript and set the group to the op in - // its base. - supGroup = grp.sup; - subGroup = grp.sub; - group = assertNodeType(grp.base, "operatorname"); - hasLimits = true; - } else { - group = assertNodeType(grp, "operatorname"); - } - - var base; - - if (group.body.length > 0) { - var body = group.body.map(child => { - // $FlowFixMe: Check if the node has a string `text` property. - var childText = child.text; - - if (typeof childText === "string") { - return { - type: "textord", - mode: child.mode, - text: childText - }; - } else { - return child; - } - }); // Consolidate function names into symbol characters. - - var expression = buildExpression$1(body, options.withFont("mathrm"), true); - - for (var i = 0; i < expression.length; i++) { - var child = expression[i]; - - if (child instanceof SymbolNode) { - // Per amsopn package, - // change minus to hyphen and \ast to asterisk - child.text = child.text.replace(/\u2212/, "-").replace(/\u2217/, "*"); - } - } - - base = buildCommon.makeSpan(["mop"], expression, options); - } else { - base = buildCommon.makeSpan(["mop"], [], options); - } - - if (hasLimits) { - return assembleSupSub(base, supGroup, subGroup, options, options.style, 0, 0); - } else { - return base; - } -}; - -var mathmlBuilder = (group, options) => { - // The steps taken here are similar to the html version. - var expression = buildExpression(group.body, options.withFont("mathrm")); // Is expression a string or has it something like a fraction? - - var isAllString = true; // default - - for (var i = 0; i < expression.length; i++) { - var node = expression[i]; - - if (node instanceof mathMLTree.SpaceNode) ; else if (node instanceof mathMLTree.MathNode) { - switch (node.type) { - case "mi": - case "mn": - case "ms": - case "mspace": - case "mtext": - break; - // Do nothing yet. - - case "mo": - { - var child = node.children[0]; - - if (node.children.length === 1 && child instanceof mathMLTree.TextNode) { - child.text = child.text.replace(/\u2212/, "-").replace(/\u2217/, "*"); - } else { - isAllString = false; - } - - break; - } - - default: - isAllString = false; - } - } else { - isAllString = false; - } - } - - if (isAllString) { - // Write a single TextNode instead of multiple nested tags. - var word = expression.map(node => node.toText()).join(""); - expression = [new mathMLTree.TextNode(word)]; - } - - var identifier = new mathMLTree.MathNode("mi", expression); - identifier.setAttribute("mathvariant", "normal"); // \u2061 is the same as ⁡ - // ref: https://www.w3schools.com/charsets/ref_html_entities_a.asp - - var operator = new mathMLTree.MathNode("mo", [makeText("\u2061", "text")]); - - if (group.parentIsSupSub) { - return new mathMLTree.MathNode("mrow", [identifier, operator]); - } else { - return mathMLTree.newDocumentFragment([identifier, operator]); - } -}; // \operatorname -// amsopn.dtx: \mathop{#1\kern\z@\operator@font#3}\newmcodes@ - - -defineFunction({ - type: "operatorname", - names: ["\\operatorname@", "\\operatornamewithlimits"], - props: { - numArgs: 1 - }, - handler: (_ref, args) => { - var { - parser, - funcName - } = _ref; - var body = args[0]; - return { - type: "operatorname", - mode: parser.mode, - body: ordargument(body), - alwaysHandleSupSub: funcName === "\\operatornamewithlimits", - limits: false, - parentIsSupSub: false - }; - }, - htmlBuilder: htmlBuilder$1, - mathmlBuilder -}); -defineMacro("\\operatorname", "\\@ifstar\\operatornamewithlimits\\operatorname@"); - -defineFunctionBuilders({ - type: "ordgroup", - - htmlBuilder(group, options) { - if (group.semisimple) { - return buildCommon.makeFragment(buildExpression$1(group.body, options, false)); - } - - return buildCommon.makeSpan(["mord"], buildExpression$1(group.body, options, true), options); - }, - - mathmlBuilder(group, options) { - return buildExpressionRow(group.body, options, true); - } - -}); - -defineFunction({ - type: "overline", - names: ["\\overline"], - props: { - numArgs: 1 - }, - - handler(_ref, args) { - var { - parser - } = _ref; - var body = args[0]; - return { - type: "overline", - mode: parser.mode, - body - }; - }, - - htmlBuilder(group, options) { - // Overlines are handled in the TeXbook pg 443, Rule 9. - // Build the inner group in the cramped style. - var innerGroup = buildGroup$1(group.body, options.havingCrampedStyle()); // Create the line above the body - - var line = buildCommon.makeLineSpan("overline-line", options); // Generate the vlist, with the appropriate kerns - - var defaultRuleThickness = options.fontMetrics().defaultRuleThickness; - var vlist = buildCommon.makeVList({ - positionType: "firstBaseline", - children: [{ - type: "elem", - elem: innerGroup - }, { - type: "kern", - size: 3 * defaultRuleThickness - }, { - type: "elem", - elem: line - }, { - type: "kern", - size: defaultRuleThickness - }] - }, options); - return buildCommon.makeSpan(["mord", "overline"], [vlist], options); - }, - - mathmlBuilder(group, options) { - var operator = new mathMLTree.MathNode("mo", [new mathMLTree.TextNode("\u203e")]); - operator.setAttribute("stretchy", "true"); - var node = new mathMLTree.MathNode("mover", [buildGroup(group.body, options), operator]); - node.setAttribute("accent", "true"); - return node; - } - -}); - -defineFunction({ - type: "phantom", - names: ["\\phantom"], - props: { - numArgs: 1, - allowedInText: true - }, - handler: (_ref, args) => { - var { - parser - } = _ref; - var body = args[0]; - return { - type: "phantom", - mode: parser.mode, - body: ordargument(body) - }; - }, - htmlBuilder: (group, options) => { - var elements = buildExpression$1(group.body, options.withPhantom(), false); // \phantom isn't supposed to affect the elements it contains. - // See "color" for more details. - - return buildCommon.makeFragment(elements); - }, - mathmlBuilder: (group, options) => { - var inner = buildExpression(group.body, options); - return new mathMLTree.MathNode("mphantom", inner); - } -}); -defineFunction({ - type: "hphantom", - names: ["\\hphantom"], - props: { - numArgs: 1, - allowedInText: true - }, - handler: (_ref2, args) => { - var { - parser - } = _ref2; - var body = args[0]; - return { - type: "hphantom", - mode: parser.mode, - body - }; - }, - htmlBuilder: (group, options) => { - var node = buildCommon.makeSpan([], [buildGroup$1(group.body, options.withPhantom())]); - node.height = 0; - node.depth = 0; - - if (node.children) { - for (var i = 0; i < node.children.length; i++) { - node.children[i].height = 0; - node.children[i].depth = 0; - } - } // See smash for comment re: use of makeVList - - - node = buildCommon.makeVList({ - positionType: "firstBaseline", - children: [{ - type: "elem", - elem: node - }] - }, options); // For spacing, TeX treats \smash as a math group (same spacing as ord). - - return buildCommon.makeSpan(["mord"], [node], options); - }, - mathmlBuilder: (group, options) => { - var inner = buildExpression(ordargument(group.body), options); - var phantom = new mathMLTree.MathNode("mphantom", inner); - var node = new mathMLTree.MathNode("mpadded", [phantom]); - node.setAttribute("height", "0px"); - node.setAttribute("depth", "0px"); - return node; - } -}); -defineFunction({ - type: "vphantom", - names: ["\\vphantom"], - props: { - numArgs: 1, - allowedInText: true - }, - handler: (_ref3, args) => { - var { - parser - } = _ref3; - var body = args[0]; - return { - type: "vphantom", - mode: parser.mode, - body - }; - }, - htmlBuilder: (group, options) => { - var inner = buildCommon.makeSpan(["inner"], [buildGroup$1(group.body, options.withPhantom())]); - var fix = buildCommon.makeSpan(["fix"], []); - return buildCommon.makeSpan(["mord", "rlap"], [inner, fix], options); - }, - mathmlBuilder: (group, options) => { - var inner = buildExpression(ordargument(group.body), options); - var phantom = new mathMLTree.MathNode("mphantom", inner); - var node = new mathMLTree.MathNode("mpadded", [phantom]); - node.setAttribute("width", "0px"); - return node; - } -}); - -defineFunction({ - type: "raisebox", - names: ["\\raisebox"], - props: { - numArgs: 2, - argTypes: ["size", "hbox"], - allowedInText: true - }, - - handler(_ref, args) { - var { - parser - } = _ref; - var amount = assertNodeType(args[0], "size").value; - var body = args[1]; - return { - type: "raisebox", - mode: parser.mode, - dy: amount, - body - }; - }, - - htmlBuilder(group, options) { - var body = buildGroup$1(group.body, options); - var dy = calculateSize(group.dy, options); - return buildCommon.makeVList({ - positionType: "shift", - positionData: -dy, - children: [{ - type: "elem", - elem: body - }] - }, options); - }, - - mathmlBuilder(group, options) { - var node = new mathMLTree.MathNode("mpadded", [buildGroup(group.body, options)]); - var dy = group.dy.number + group.dy.unit; - node.setAttribute("voffset", dy); - return node; - } - -}); - -defineFunction({ - type: "internal", - names: ["\\relax"], - props: { - numArgs: 0, - allowedInText: true - }, - - handler(_ref) { - var { - parser - } = _ref; - return { - type: "internal", - mode: parser.mode - }; - } - -}); - -defineFunction({ - type: "rule", - names: ["\\rule"], - props: { - numArgs: 2, - numOptionalArgs: 1, - argTypes: ["size", "size", "size"] - }, - - handler(_ref, args, optArgs) { - var { - parser - } = _ref; - var shift = optArgs[0]; - var width = assertNodeType(args[0], "size"); - var height = assertNodeType(args[1], "size"); - return { - type: "rule", - mode: parser.mode, - shift: shift && assertNodeType(shift, "size").value, - width: width.value, - height: height.value - }; - }, - - htmlBuilder(group, options) { - // Make an empty span for the rule - var rule = buildCommon.makeSpan(["mord", "rule"], [], options); // Calculate the shift, width, and height of the rule, and account for units - - var width = calculateSize(group.width, options); - var height = calculateSize(group.height, options); - var shift = group.shift ? calculateSize(group.shift, options) : 0; // Style the rule to the right size - - rule.style.borderRightWidth = makeEm(width); - rule.style.borderTopWidth = makeEm(height); - rule.style.bottom = makeEm(shift); // Record the height and width - - rule.width = width; - rule.height = height + shift; - rule.depth = -shift; // Font size is the number large enough that the browser will - // reserve at least `absHeight` space above the baseline. - // The 1.125 factor was empirically determined - - rule.maxFontSize = height * 1.125 * options.sizeMultiplier; - return rule; - }, - - mathmlBuilder(group, options) { - var width = calculateSize(group.width, options); - var height = calculateSize(group.height, options); - var shift = group.shift ? calculateSize(group.shift, options) : 0; - var color = options.color && options.getColor() || "black"; - var rule = new mathMLTree.MathNode("mspace"); - rule.setAttribute("mathbackground", color); - rule.setAttribute("width", makeEm(width)); - rule.setAttribute("height", makeEm(height)); - var wrapper = new mathMLTree.MathNode("mpadded", [rule]); - - if (shift >= 0) { - wrapper.setAttribute("height", makeEm(shift)); - } else { - wrapper.setAttribute("height", makeEm(shift)); - wrapper.setAttribute("depth", makeEm(-shift)); - } - - wrapper.setAttribute("voffset", makeEm(shift)); - return wrapper; - } - -}); - -function sizingGroup(value, options, baseOptions) { - var inner = buildExpression$1(value, options, false); - var multiplier = options.sizeMultiplier / baseOptions.sizeMultiplier; // Add size-resetting classes to the inner list and set maxFontSize - // manually. Handle nested size changes. - - for (var i = 0; i < inner.length; i++) { - var pos = inner[i].classes.indexOf("sizing"); - - if (pos < 0) { - Array.prototype.push.apply(inner[i].classes, options.sizingClasses(baseOptions)); - } else if (inner[i].classes[pos + 1] === "reset-size" + options.size) { - // This is a nested size change: e.g., inner[i] is the "b" in - // `\Huge a \small b`. Override the old size (the `reset-` class) - // but not the new size. - inner[i].classes[pos + 1] = "reset-size" + baseOptions.size; - } - - inner[i].height *= multiplier; - inner[i].depth *= multiplier; - } - - return buildCommon.makeFragment(inner); -} -var sizeFuncs = ["\\tiny", "\\sixptsize", "\\scriptsize", "\\footnotesize", "\\small", "\\normalsize", "\\large", "\\Large", "\\LARGE", "\\huge", "\\Huge"]; -var htmlBuilder = (group, options) => { - // Handle sizing operators like \Huge. Real TeX doesn't actually allow - // these functions inside of math expressions, so we do some special - // handling. - var newOptions = options.havingSize(group.size); - return sizingGroup(group.body, newOptions, options); -}; -defineFunction({ - type: "sizing", - names: sizeFuncs, - props: { - numArgs: 0, - allowedInText: true - }, - handler: (_ref, args) => { - var { - breakOnTokenText, - funcName, - parser - } = _ref; - var body = parser.parseExpression(false, breakOnTokenText); - return { - type: "sizing", - mode: parser.mode, - // Figure out what size to use based on the list of functions above - size: sizeFuncs.indexOf(funcName) + 1, - body - }; - }, - htmlBuilder, - mathmlBuilder: (group, options) => { - var newOptions = options.havingSize(group.size); - var inner = buildExpression(group.body, newOptions); - var node = new mathMLTree.MathNode("mstyle", inner); // TODO(emily): This doesn't produce the correct size for nested size - // changes, because we don't keep state of what style we're currently - // in, so we can't reset the size to normal before changing it. Now - // that we're passing an options parameter we should be able to fix - // this. - - node.setAttribute("mathsize", makeEm(newOptions.sizeMultiplier)); - return node; - } -}); - -// smash, with optional [tb], as in AMS -defineFunction({ - type: "smash", - names: ["\\smash"], - props: { - numArgs: 1, - numOptionalArgs: 1, - allowedInText: true - }, - handler: (_ref, args, optArgs) => { - var { - parser - } = _ref; - var smashHeight = false; - var smashDepth = false; - var tbArg = optArgs[0] && assertNodeType(optArgs[0], "ordgroup"); - - if (tbArg) { - // Optional [tb] argument is engaged. - // ref: amsmath: \renewcommand{\smash}[1][tb]{% - // def\mb@t{\ht}\def\mb@b{\dp}\def\mb@tb{\ht\z@\z@\dp}% - var letter = ""; - - for (var i = 0; i < tbArg.body.length; ++i) { - var node = tbArg.body[i]; // $FlowFixMe: Not every node type has a `text` property. - - letter = node.text; - - if (letter === "t") { - smashHeight = true; - } else if (letter === "b") { - smashDepth = true; - } else { - smashHeight = false; - smashDepth = false; - break; - } - } - } else { - smashHeight = true; - smashDepth = true; - } - - var body = args[0]; - return { - type: "smash", - mode: parser.mode, - body, - smashHeight, - smashDepth - }; - }, - htmlBuilder: (group, options) => { - var node = buildCommon.makeSpan([], [buildGroup$1(group.body, options)]); - - if (!group.smashHeight && !group.smashDepth) { - return node; - } - - if (group.smashHeight) { - node.height = 0; // In order to influence makeVList, we have to reset the children. - - if (node.children) { - for (var i = 0; i < node.children.length; i++) { - node.children[i].height = 0; - } - } - } - - if (group.smashDepth) { - node.depth = 0; - - if (node.children) { - for (var _i = 0; _i < node.children.length; _i++) { - node.children[_i].depth = 0; - } - } - } // At this point, we've reset the TeX-like height and depth values. - // But the span still has an HTML line height. - // makeVList applies "display: table-cell", which prevents the browser - // from acting on that line height. So we'll call makeVList now. - - - var smashedNode = buildCommon.makeVList({ - positionType: "firstBaseline", - children: [{ - type: "elem", - elem: node - }] - }, options); // For spacing, TeX treats \hphantom as a math group (same spacing as ord). - - return buildCommon.makeSpan(["mord"], [smashedNode], options); - }, - mathmlBuilder: (group, options) => { - var node = new mathMLTree.MathNode("mpadded", [buildGroup(group.body, options)]); - - if (group.smashHeight) { - node.setAttribute("height", "0px"); - } - - if (group.smashDepth) { - node.setAttribute("depth", "0px"); - } - - return node; - } -}); - -defineFunction({ - type: "sqrt", - names: ["\\sqrt"], - props: { - numArgs: 1, - numOptionalArgs: 1 - }, - - handler(_ref, args, optArgs) { - var { - parser - } = _ref; - var index = optArgs[0]; - var body = args[0]; - return { - type: "sqrt", - mode: parser.mode, - body, - index - }; - }, - - htmlBuilder(group, options) { - // Square roots are handled in the TeXbook pg. 443, Rule 11. - // First, we do the same steps as in overline to build the inner group - // and line - var inner = buildGroup$1(group.body, options.havingCrampedStyle()); - - if (inner.height === 0) { - // Render a small surd. - inner.height = options.fontMetrics().xHeight; - } // Some groups can return document fragments. Handle those by wrapping - // them in a span. - - - inner = buildCommon.wrapFragment(inner, options); // Calculate the minimum size for the \surd delimiter - - var metrics = options.fontMetrics(); - var theta = metrics.defaultRuleThickness; - var phi = theta; - - if (options.style.id < Style$1.TEXT.id) { - phi = options.fontMetrics().xHeight; - } // Calculate the clearance between the body and line - - - var lineClearance = theta + phi / 4; - var minDelimiterHeight = inner.height + inner.depth + lineClearance + theta; // Create a sqrt SVG of the required minimum size - - var { - span: img, - ruleWidth, - advanceWidth - } = delimiter.sqrtImage(minDelimiterHeight, options); - var delimDepth = img.height - ruleWidth; // Adjust the clearance based on the delimiter size - - if (delimDepth > inner.height + inner.depth + lineClearance) { - lineClearance = (lineClearance + delimDepth - inner.height - inner.depth) / 2; - } // Shift the sqrt image - - - var imgShift = img.height - inner.height - lineClearance - ruleWidth; - inner.style.paddingLeft = makeEm(advanceWidth); // Overlay the image and the argument. - - var body = buildCommon.makeVList({ - positionType: "firstBaseline", - children: [{ - type: "elem", - elem: inner, - wrapperClasses: ["svg-align"] - }, { - type: "kern", - size: -(inner.height + imgShift) - }, { - type: "elem", - elem: img - }, { - type: "kern", - size: ruleWidth - }] - }, options); - - if (!group.index) { - return buildCommon.makeSpan(["mord", "sqrt"], [body], options); - } else { - // Handle the optional root index - // The index is always in scriptscript style - var newOptions = options.havingStyle(Style$1.SCRIPTSCRIPT); - var rootm = buildGroup$1(group.index, newOptions, options); // The amount the index is shifted by. This is taken from the TeX - // source, in the definition of `\r@@t`. - - var toShift = 0.6 * (body.height - body.depth); // Build a VList with the superscript shifted up correctly - - var rootVList = buildCommon.makeVList({ - positionType: "shift", - positionData: -toShift, - children: [{ - type: "elem", - elem: rootm - }] - }, options); // Add a class surrounding it so we can add on the appropriate - // kerning - - var rootVListWrap = buildCommon.makeSpan(["root"], [rootVList]); - return buildCommon.makeSpan(["mord", "sqrt"], [rootVListWrap, body], options); - } - }, - - mathmlBuilder(group, options) { - var { - body, - index - } = group; - return index ? new mathMLTree.MathNode("mroot", [buildGroup(body, options), buildGroup(index, options)]) : new mathMLTree.MathNode("msqrt", [buildGroup(body, options)]); - } - -}); - -var styleMap = { - "display": Style$1.DISPLAY, - "text": Style$1.TEXT, - "script": Style$1.SCRIPT, - "scriptscript": Style$1.SCRIPTSCRIPT -}; -defineFunction({ - type: "styling", - names: ["\\displaystyle", "\\textstyle", "\\scriptstyle", "\\scriptscriptstyle"], - props: { - numArgs: 0, - allowedInText: true, - primitive: true - }, - - handler(_ref, args) { - var { - breakOnTokenText, - funcName, - parser - } = _ref; - // parse out the implicit body - var body = parser.parseExpression(true, breakOnTokenText); // TODO: Refactor to avoid duplicating styleMap in multiple places (e.g. - // here and in buildHTML and de-dupe the enumeration of all the styles). - // $FlowFixMe: The names above exactly match the styles. - - var style = funcName.slice(1, funcName.length - 5); - return { - type: "styling", - mode: parser.mode, - // Figure out what style to use by pulling out the style from - // the function name - style, - body - }; - }, - - htmlBuilder(group, options) { - // Style changes are handled in the TeXbook on pg. 442, Rule 3. - var newStyle = styleMap[group.style]; - var newOptions = options.havingStyle(newStyle).withFont(''); - return sizingGroup(group.body, newOptions, options); - }, - - mathmlBuilder(group, options) { - // Figure out what style we're changing to. - var newStyle = styleMap[group.style]; - var newOptions = options.havingStyle(newStyle); - var inner = buildExpression(group.body, newOptions); - var node = new mathMLTree.MathNode("mstyle", inner); - var styleAttributes = { - "display": ["0", "true"], - "text": ["0", "false"], - "script": ["1", "false"], - "scriptscript": ["2", "false"] - }; - var attr = styleAttributes[group.style]; - node.setAttribute("scriptlevel", attr[0]); - node.setAttribute("displaystyle", attr[1]); - return node; - } - -}); - -/** - * Sometimes, groups perform special rules when they have superscripts or - * subscripts attached to them. This function lets the `supsub` group know that - * Sometimes, groups perform special rules when they have superscripts or - * its inner element should handle the superscripts and subscripts instead of - * handling them itself. - */ -var htmlBuilderDelegate = function htmlBuilderDelegate(group, options) { - var base = group.base; - - if (!base) { - return null; - } else if (base.type === "op") { - // Operators handle supsubs differently when they have limits - // (e.g. `\displaystyle\sum_2^3`) - var delegate = base.limits && (options.style.size === Style$1.DISPLAY.size || base.alwaysHandleSupSub); - return delegate ? htmlBuilder$2 : null; - } else if (base.type === "operatorname") { - var _delegate = base.alwaysHandleSupSub && (options.style.size === Style$1.DISPLAY.size || base.limits); - - return _delegate ? htmlBuilder$1 : null; - } else if (base.type === "accent") { - return utils.isCharacterBox(base.base) ? htmlBuilder$a : null; - } else if (base.type === "horizBrace") { - var isSup = !group.sub; - return isSup === base.isOver ? htmlBuilder$3 : null; - } else { - return null; - } -}; // Super scripts and subscripts, whose precise placement can depend on other -// functions that precede them. - - -defineFunctionBuilders({ - type: "supsub", - - htmlBuilder(group, options) { - // Superscript and subscripts are handled in the TeXbook on page - // 445-446, rules 18(a-f). - // Here is where we defer to the inner group if it should handle - // superscripts and subscripts itself. - var builderDelegate = htmlBuilderDelegate(group, options); - - if (builderDelegate) { - return builderDelegate(group, options); - } - - var { - base: valueBase, - sup: valueSup, - sub: valueSub - } = group; - var base = buildGroup$1(valueBase, options); - var supm; - var subm; - var metrics = options.fontMetrics(); // Rule 18a - - var supShift = 0; - var subShift = 0; - var isCharacterBox = valueBase && utils.isCharacterBox(valueBase); - - if (valueSup) { - var newOptions = options.havingStyle(options.style.sup()); - supm = buildGroup$1(valueSup, newOptions, options); - - if (!isCharacterBox) { - supShift = base.height - newOptions.fontMetrics().supDrop * newOptions.sizeMultiplier / options.sizeMultiplier; - } - } - - if (valueSub) { - var _newOptions = options.havingStyle(options.style.sub()); - - subm = buildGroup$1(valueSub, _newOptions, options); - - if (!isCharacterBox) { - subShift = base.depth + _newOptions.fontMetrics().subDrop * _newOptions.sizeMultiplier / options.sizeMultiplier; - } - } // Rule 18c - - - var minSupShift; - - if (options.style === Style$1.DISPLAY) { - minSupShift = metrics.sup1; - } else if (options.style.cramped) { - minSupShift = metrics.sup3; - } else { - minSupShift = metrics.sup2; - } // scriptspace is a font-size-independent size, so scale it - // appropriately for use as the marginRight. - - - var multiplier = options.sizeMultiplier; - var marginRight = makeEm(0.5 / metrics.ptPerEm / multiplier); - var marginLeft = null; - - if (subm) { - // Subscripts shouldn't be shifted by the base's italic correction. - // Account for that by shifting the subscript back the appropriate - // amount. Note we only do this when the base is a single symbol. - var isOiint = group.base && group.base.type === "op" && group.base.name && (group.base.name === "\\oiint" || group.base.name === "\\oiiint"); - - if (base instanceof SymbolNode || isOiint) { - // $FlowFixMe - marginLeft = makeEm(-base.italic); - } - } - - var supsub; - - if (supm && subm) { - supShift = Math.max(supShift, minSupShift, supm.depth + 0.25 * metrics.xHeight); - subShift = Math.max(subShift, metrics.sub2); - var ruleWidth = metrics.defaultRuleThickness; // Rule 18e - - var maxWidth = 4 * ruleWidth; - - if (supShift - supm.depth - (subm.height - subShift) < maxWidth) { - subShift = maxWidth - (supShift - supm.depth) + subm.height; - var psi = 0.8 * metrics.xHeight - (supShift - supm.depth); - - if (psi > 0) { - supShift += psi; - subShift -= psi; - } - } - - var vlistElem = [{ - type: "elem", - elem: subm, - shift: subShift, - marginRight, - marginLeft - }, { - type: "elem", - elem: supm, - shift: -supShift, - marginRight - }]; - supsub = buildCommon.makeVList({ - positionType: "individualShift", - children: vlistElem - }, options); - } else if (subm) { - // Rule 18b - subShift = Math.max(subShift, metrics.sub1, subm.height - 0.8 * metrics.xHeight); - var _vlistElem = [{ - type: "elem", - elem: subm, - marginLeft, - marginRight - }]; - supsub = buildCommon.makeVList({ - positionType: "shift", - positionData: subShift, - children: _vlistElem - }, options); - } else if (supm) { - // Rule 18c, d - supShift = Math.max(supShift, minSupShift, supm.depth + 0.25 * metrics.xHeight); - supsub = buildCommon.makeVList({ - positionType: "shift", - positionData: -supShift, - children: [{ - type: "elem", - elem: supm, - marginRight - }] - }, options); - } else { - throw new Error("supsub must have either sup or sub."); - } // Wrap the supsub vlist in a span.msupsub to reset text-align. - - - var mclass = getTypeOfDomTree(base, "right") || "mord"; - return buildCommon.makeSpan([mclass], [base, buildCommon.makeSpan(["msupsub"], [supsub])], options); - }, - - mathmlBuilder(group, options) { - // Is the inner group a relevant horizonal brace? - var isBrace = false; - var isOver; - var isSup; - - if (group.base && group.base.type === "horizBrace") { - isSup = !!group.sup; - - if (isSup === group.base.isOver) { - isBrace = true; - isOver = group.base.isOver; - } - } - - if (group.base && (group.base.type === "op" || group.base.type === "operatorname")) { - group.base.parentIsSupSub = true; - } - - var children = [buildGroup(group.base, options)]; - - if (group.sub) { - children.push(buildGroup(group.sub, options)); - } - - if (group.sup) { - children.push(buildGroup(group.sup, options)); - } - - var nodeType; - - if (isBrace) { - nodeType = isOver ? "mover" : "munder"; - } else if (!group.sub) { - var base = group.base; - - if (base && base.type === "op" && base.limits && (options.style === Style$1.DISPLAY || base.alwaysHandleSupSub)) { - nodeType = "mover"; - } else if (base && base.type === "operatorname" && base.alwaysHandleSupSub && (base.limits || options.style === Style$1.DISPLAY)) { - nodeType = "mover"; - } else { - nodeType = "msup"; - } - } else if (!group.sup) { - var _base = group.base; - - if (_base && _base.type === "op" && _base.limits && (options.style === Style$1.DISPLAY || _base.alwaysHandleSupSub)) { - nodeType = "munder"; - } else if (_base && _base.type === "operatorname" && _base.alwaysHandleSupSub && (_base.limits || options.style === Style$1.DISPLAY)) { - nodeType = "munder"; - } else { - nodeType = "msub"; - } - } else { - var _base2 = group.base; - - if (_base2 && _base2.type === "op" && _base2.limits && options.style === Style$1.DISPLAY) { - nodeType = "munderover"; - } else if (_base2 && _base2.type === "operatorname" && _base2.alwaysHandleSupSub && (options.style === Style$1.DISPLAY || _base2.limits)) { - nodeType = "munderover"; - } else { - nodeType = "msubsup"; - } - } - - return new mathMLTree.MathNode(nodeType, children); - } - -}); - -defineFunctionBuilders({ - type: "atom", - - htmlBuilder(group, options) { - return buildCommon.mathsym(group.text, group.mode, options, ["m" + group.family]); - }, - - mathmlBuilder(group, options) { - var node = new mathMLTree.MathNode("mo", [makeText(group.text, group.mode)]); - - if (group.family === "bin") { - var variant = getVariant(group, options); - - if (variant === "bold-italic") { - node.setAttribute("mathvariant", variant); - } - } else if (group.family === "punct") { - node.setAttribute("separator", "true"); - } else if (group.family === "open" || group.family === "close") { - // Delims built here should not stretch vertically. - // See delimsizing.js for stretchy delims. - node.setAttribute("stretchy", "false"); - } - - return node; - } - -}); - -// "mathord" and "textord" ParseNodes created in Parser.js from symbol Groups in -// src/symbols.js. -var defaultVariant = { - "mi": "italic", - "mn": "normal", - "mtext": "normal" -}; -defineFunctionBuilders({ - type: "mathord", - - htmlBuilder(group, options) { - return buildCommon.makeOrd(group, options, "mathord"); - }, - - mathmlBuilder(group, options) { - var node = new mathMLTree.MathNode("mi", [makeText(group.text, group.mode, options)]); - var variant = getVariant(group, options) || "italic"; - - if (variant !== defaultVariant[node.type]) { - node.setAttribute("mathvariant", variant); - } - - return node; - } - -}); -defineFunctionBuilders({ - type: "textord", - - htmlBuilder(group, options) { - return buildCommon.makeOrd(group, options, "textord"); - }, - - mathmlBuilder(group, options) { - var text = makeText(group.text, group.mode, options); - var variant = getVariant(group, options) || "normal"; - var node; - - if (group.mode === 'text') { - node = new mathMLTree.MathNode("mtext", [text]); - } else if (/[0-9]/.test(group.text)) { - node = new mathMLTree.MathNode("mn", [text]); - } else if (group.text === "\\prime") { - node = new mathMLTree.MathNode("mo", [text]); - } else { - node = new mathMLTree.MathNode("mi", [text]); - } - - if (variant !== defaultVariant[node.type]) { - node.setAttribute("mathvariant", variant); - } - - return node; - } - -}); - -var cssSpace = { - "\\nobreak": "nobreak", - "\\allowbreak": "allowbreak" -}; // A lookup table to determine whether a spacing function/symbol should be -// treated like a regular space character. If a symbol or command is a key -// in this table, then it should be a regular space character. Furthermore, -// the associated value may have a `className` specifying an extra CSS class -// to add to the created `span`. - -var regularSpace = { - " ": {}, - "\\ ": {}, - "~": { - className: "nobreak" - }, - "\\space": {}, - "\\nobreakspace": { - className: "nobreak" - } -}; // ParseNode<"spacing"> created in Parser.js from the "spacing" symbol Groups in -// src/symbols.js. - -defineFunctionBuilders({ - type: "spacing", - - htmlBuilder(group, options) { - if (regularSpace.hasOwnProperty(group.text)) { - var className = regularSpace[group.text].className || ""; // Spaces are generated by adding an actual space. Each of these - // things has an entry in the symbols table, so these will be turned - // into appropriate outputs. - - if (group.mode === "text") { - var ord = buildCommon.makeOrd(group, options, "textord"); - ord.classes.push(className); - return ord; - } else { - return buildCommon.makeSpan(["mspace", className], [buildCommon.mathsym(group.text, group.mode, options)], options); - } - } else if (cssSpace.hasOwnProperty(group.text)) { - // Spaces based on just a CSS class. - return buildCommon.makeSpan(["mspace", cssSpace[group.text]], [], options); - } else { - throw new ParseError("Unknown type of space \"" + group.text + "\""); - } - }, - - mathmlBuilder(group, options) { - var node; - - if (regularSpace.hasOwnProperty(group.text)) { - node = new mathMLTree.MathNode("mtext", [new mathMLTree.TextNode("\u00a0")]); - } else if (cssSpace.hasOwnProperty(group.text)) { - // CSS-based MathML spaces (\nobreak, \allowbreak) are ignored - return new mathMLTree.MathNode("mspace"); - } else { - throw new ParseError("Unknown type of space \"" + group.text + "\""); - } - - return node; - } - -}); - -var pad = () => { - var padNode = new mathMLTree.MathNode("mtd", []); - padNode.setAttribute("width", "50%"); - return padNode; -}; - -defineFunctionBuilders({ - type: "tag", - - mathmlBuilder(group, options) { - var table = new mathMLTree.MathNode("mtable", [new mathMLTree.MathNode("mtr", [pad(), new mathMLTree.MathNode("mtd", [buildExpressionRow(group.body, options)]), pad(), new mathMLTree.MathNode("mtd", [buildExpressionRow(group.tag, options)])])]); - table.setAttribute("width", "100%"); - return table; // TODO: Left-aligned tags. - // Currently, the group and options passed here do not contain - // enough info to set tag alignment. `leqno` is in Settings but it is - // not passed to Options. On the HTML side, leqno is - // set by a CSS class applied in buildTree.js. That would have worked - // in MathML if browsers supported . Since they don't, we - // need to rewrite the way this function is called. - } - -}); - -var textFontFamilies = { - "\\text": undefined, - "\\textrm": "textrm", - "\\textsf": "textsf", - "\\texttt": "texttt", - "\\textnormal": "textrm" -}; -var textFontWeights = { - "\\textbf": "textbf", - "\\textmd": "textmd" -}; -var textFontShapes = { - "\\textit": "textit", - "\\textup": "textup" -}; - -var optionsWithFont = (group, options) => { - var font = group.font; // Checks if the argument is a font family or a font style. - - if (!font) { - return options; - } else if (textFontFamilies[font]) { - return options.withTextFontFamily(textFontFamilies[font]); - } else if (textFontWeights[font]) { - return options.withTextFontWeight(textFontWeights[font]); - } else if (font === "\\emph") { - return options.fontShape === "textit" ? options.withTextFontShape("textup") : options.withTextFontShape("textit"); - } - - return options.withTextFontShape(textFontShapes[font]); -}; - -defineFunction({ - type: "text", - names: [// Font families - "\\text", "\\textrm", "\\textsf", "\\texttt", "\\textnormal", // Font weights - "\\textbf", "\\textmd", // Font Shapes - "\\textit", "\\textup", "\\emph"], - props: { - numArgs: 1, - argTypes: ["text"], - allowedInArgument: true, - allowedInText: true - }, - - handler(_ref, args) { - var { - parser, - funcName - } = _ref; - var body = args[0]; - return { - type: "text", - mode: parser.mode, - body: ordargument(body), - font: funcName - }; - }, - - htmlBuilder(group, options) { - var newOptions = optionsWithFont(group, options); - var inner = buildExpression$1(group.body, newOptions, true); - return buildCommon.makeSpan(["mord", "text"], inner, newOptions); - }, - - mathmlBuilder(group, options) { - var newOptions = optionsWithFont(group, options); - return buildExpressionRow(group.body, newOptions); - } - -}); - -defineFunction({ - type: "underline", - names: ["\\underline"], - props: { - numArgs: 1, - allowedInText: true - }, - - handler(_ref, args) { - var { - parser - } = _ref; - return { - type: "underline", - mode: parser.mode, - body: args[0] - }; - }, - - htmlBuilder(group, options) { - // Underlines are handled in the TeXbook pg 443, Rule 10. - // Build the inner group. - var innerGroup = buildGroup$1(group.body, options); // Create the line to go below the body - - var line = buildCommon.makeLineSpan("underline-line", options); // Generate the vlist, with the appropriate kerns - - var defaultRuleThickness = options.fontMetrics().defaultRuleThickness; - var vlist = buildCommon.makeVList({ - positionType: "top", - positionData: innerGroup.height, - children: [{ - type: "kern", - size: defaultRuleThickness - }, { - type: "elem", - elem: line - }, { - type: "kern", - size: 3 * defaultRuleThickness - }, { - type: "elem", - elem: innerGroup - }] - }, options); - return buildCommon.makeSpan(["mord", "underline"], [vlist], options); - }, - - mathmlBuilder(group, options) { - var operator = new mathMLTree.MathNode("mo", [new mathMLTree.TextNode("\u203e")]); - operator.setAttribute("stretchy", "true"); - var node = new mathMLTree.MathNode("munder", [buildGroup(group.body, options), operator]); - node.setAttribute("accentunder", "true"); - return node; - } - -}); - -defineFunction({ - type: "vcenter", - names: ["\\vcenter"], - props: { - numArgs: 1, - argTypes: ["original"], - // In LaTeX, \vcenter can act only on a box. - allowedInText: false - }, - - handler(_ref, args) { - var { - parser - } = _ref; - return { - type: "vcenter", - mode: parser.mode, - body: args[0] - }; - }, - - htmlBuilder(group, options) { - var body = buildGroup$1(group.body, options); - var axisHeight = options.fontMetrics().axisHeight; - var dy = 0.5 * (body.height - axisHeight - (body.depth + axisHeight)); - return buildCommon.makeVList({ - positionType: "shift", - positionData: dy, - children: [{ - type: "elem", - elem: body - }] - }, options); - }, - - mathmlBuilder(group, options) { - // There is no way to do this in MathML. - // Write a class as a breadcrumb in case some post-processor wants - // to perform a vcenter adjustment. - return new mathMLTree.MathNode("mpadded", [buildGroup(group.body, options)], ["vcenter"]); - } - -}); - -defineFunction({ - type: "verb", - names: ["\\verb"], - props: { - numArgs: 0, - allowedInText: true - }, - - handler(context, args, optArgs) { - // \verb and \verb* are dealt with directly in Parser.js. - // If we end up here, it's because of a failure to match the two delimiters - // in the regex in Lexer.js. LaTeX raises the following error when \verb is - // terminated by end of line (or file). - throw new ParseError("\\verb ended by end of line instead of matching delimiter"); - }, - - htmlBuilder(group, options) { - var text = makeVerb(group); - var body = []; // \verb enters text mode and therefore is sized like \textstyle - - var newOptions = options.havingStyle(options.style.text()); - - for (var i = 0; i < text.length; i++) { - var c = text[i]; - - if (c === '~') { - c = '\\textasciitilde'; - } - - body.push(buildCommon.makeSymbol(c, "Typewriter-Regular", group.mode, newOptions, ["mord", "texttt"])); - } - - return buildCommon.makeSpan(["mord", "text"].concat(newOptions.sizingClasses(options)), buildCommon.tryCombineChars(body), newOptions); - }, - - mathmlBuilder(group, options) { - var text = new mathMLTree.TextNode(makeVerb(group)); - var node = new mathMLTree.MathNode("mtext", [text]); - node.setAttribute("mathvariant", "monospace"); - return node; - } - -}); -/** - * Converts verb group into body string. - * - * \verb* replaces each space with an open box \u2423 - * \verb replaces each space with a no-break space \xA0 - */ - -var makeVerb = group => group.body.replace(/ /g, group.star ? '\u2423' : '\xA0'); - -/** Include this to ensure that all functions are defined. */ -var functions = _functions; - -/** - * The Lexer class handles tokenizing the input in various ways. Since our - * parser expects us to be able to backtrack, the lexer allows lexing from any - * given starting point. - * - * Its main exposed function is the `lex` function, which takes a position to - * lex from and a type of token to lex. It defers to the appropriate `_innerLex` - * function. - * - * The various `_innerLex` functions perform the actual lexing of different - * kinds. - */ - -/* The following tokenRegex - * - matches typical whitespace (but not NBSP etc.) using its first group - * - does not match any control character \x00-\x1f except whitespace - * - does not match a bare backslash - * - matches any ASCII character except those just mentioned - * - does not match the BMP private use area \uE000-\uF8FF - * - does not match bare surrogate code units - * - matches any BMP character except for those just described - * - matches any valid Unicode surrogate pair - * - matches a backslash followed by one or more whitespace characters - * - matches a backslash followed by one or more letters then whitespace - * - matches a backslash followed by any BMP character - * Capturing groups: - * [1] regular whitespace - * [2] backslash followed by whitespace - * [3] anything else, which may include: - * [4] left character of \verb* - * [5] left character of \verb - * [6] backslash followed by word, excluding any trailing whitespace - * Just because the Lexer matches something doesn't mean it's valid input: - * If there is no matching function or symbol definition, the Parser will - * still reject the input. - */ -var spaceRegexString = "[ \r\n\t]"; -var controlWordRegexString = "\\\\[a-zA-Z@]+"; -var controlSymbolRegexString = "\\\\[^\uD800-\uDFFF]"; -var controlWordWhitespaceRegexString = "(" + controlWordRegexString + ")" + spaceRegexString + "*"; -var controlSpaceRegexString = "\\\\(\n|[ \r\t]+\n?)[ \r\t]*"; -var combiningDiacriticalMarkString = "[\u0300-\u036f]"; -var combiningDiacriticalMarksEndRegex = new RegExp(combiningDiacriticalMarkString + "+$"); -var tokenRegexString = "(" + spaceRegexString + "+)|" + ( // whitespace -controlSpaceRegexString + "|") + // \whitespace -"([!-\\[\\]-\u2027\u202A-\uD7FF\uF900-\uFFFF]" + ( // single codepoint -combiningDiacriticalMarkString + "*") + // ...plus accents -"|[\uD800-\uDBFF][\uDC00-\uDFFF]" + ( // surrogate pair -combiningDiacriticalMarkString + "*") + // ...plus accents -"|\\\\verb\\*([^]).*?\\4" + // \verb* -"|\\\\verb([^*a-zA-Z]).*?\\5" + ( // \verb unstarred -"|" + controlWordWhitespaceRegexString) + ( // \macroName + spaces -"|" + controlSymbolRegexString + ")"); // \\, \', etc. - -/** Main Lexer class */ - -class Lexer { - // Category codes. The lexer only supports comment characters (14) for now. - // MacroExpander additionally distinguishes active (13). - constructor(input, settings) { - this.input = void 0; - this.settings = void 0; - this.tokenRegex = void 0; - this.catcodes = void 0; - // Separate accents from characters - this.input = input; - this.settings = settings; - this.tokenRegex = new RegExp(tokenRegexString, 'g'); - this.catcodes = { - "%": 14, - // comment character - "~": 13 // active character - - }; - } - - setCatcode(char, code) { - this.catcodes[char] = code; - } - /** - * This function lexes a single token. - */ - - - lex() { - var input = this.input; - var pos = this.tokenRegex.lastIndex; - - if (pos === input.length) { - return new Token("EOF", new SourceLocation(this, pos, pos)); - } - - var match = this.tokenRegex.exec(input); - - if (match === null || match.index !== pos) { - throw new ParseError("Unexpected character: '" + input[pos] + "'", new Token(input[pos], new SourceLocation(this, pos, pos + 1))); - } - - var text = match[6] || match[3] || (match[2] ? "\\ " : " "); - - if (this.catcodes[text] === 14) { - // comment character - var nlIndex = input.indexOf('\n', this.tokenRegex.lastIndex); - - if (nlIndex === -1) { - this.tokenRegex.lastIndex = input.length; // EOF - - this.settings.reportNonstrict("commentAtEnd", "% comment has no terminating newline; LaTeX would " + "fail because of commenting the end of math mode (e.g. $)"); - } else { - this.tokenRegex.lastIndex = nlIndex + 1; - } - - return this.lex(); - } - - return new Token(text, new SourceLocation(this, pos, this.tokenRegex.lastIndex)); - } - -} - -/** - * A `Namespace` refers to a space of nameable things like macros or lengths, - * which can be `set` either globally or local to a nested group, using an - * undo stack similar to how TeX implements this functionality. - * Performance-wise, `get` and local `set` take constant time, while global - * `set` takes time proportional to the depth of group nesting. - */ -class Namespace { - /** - * Both arguments are optional. The first argument is an object of - * built-in mappings which never change. The second argument is an object - * of initial (global-level) mappings, which will constantly change - * according to any global/top-level `set`s done. - */ - constructor(builtins, globalMacros) { - if (builtins === void 0) { - builtins = {}; - } - - if (globalMacros === void 0) { - globalMacros = {}; - } - - this.current = void 0; - this.builtins = void 0; - this.undefStack = void 0; - this.current = globalMacros; - this.builtins = builtins; - this.undefStack = []; - } - /** - * Start a new nested group, affecting future local `set`s. - */ - - - beginGroup() { - this.undefStack.push({}); - } - /** - * End current nested group, restoring values before the group began. - */ - - - endGroup() { - if (this.undefStack.length === 0) { - throw new ParseError("Unbalanced namespace destruction: attempt " + "to pop global namespace; please report this as a bug"); - } - - var undefs = this.undefStack.pop(); - - for (var undef in undefs) { - if (undefs.hasOwnProperty(undef)) { - if (undefs[undef] == null) { - delete this.current[undef]; - } else { - this.current[undef] = undefs[undef]; - } - } - } - } - /** - * Ends all currently nested groups (if any), restoring values before the - * groups began. Useful in case of an error in the middle of parsing. - */ - - - endGroups() { - while (this.undefStack.length > 0) { - this.endGroup(); - } - } - /** - * Detect whether `name` has a definition. Equivalent to - * `get(name) != null`. - */ - - - has(name) { - return this.current.hasOwnProperty(name) || this.builtins.hasOwnProperty(name); - } - /** - * Get the current value of a name, or `undefined` if there is no value. - * - * Note: Do not use `if (namespace.get(...))` to detect whether a macro - * is defined, as the definition may be the empty string which evaluates - * to `false` in JavaScript. Use `if (namespace.get(...) != null)` or - * `if (namespace.has(...))`. - */ - - - get(name) { - if (this.current.hasOwnProperty(name)) { - return this.current[name]; - } else { - return this.builtins[name]; - } - } - /** - * Set the current value of a name, and optionally set it globally too. - * Local set() sets the current value and (when appropriate) adds an undo - * operation to the undo stack. Global set() may change the undo - * operation at every level, so takes time linear in their number. - * A value of undefined means to delete existing definitions. - */ - - - set(name, value, global) { - if (global === void 0) { - global = false; - } - - if (global) { - // Global set is equivalent to setting in all groups. Simulate this - // by destroying any undos currently scheduled for this name, - // and adding an undo with the *new* value (in case it later gets - // locally reset within this environment). - for (var i = 0; i < this.undefStack.length; i++) { - delete this.undefStack[i][name]; - } - - if (this.undefStack.length > 0) { - this.undefStack[this.undefStack.length - 1][name] = value; - } - } else { - // Undo this set at end of this group (possibly to `undefined`), - // unless an undo is already in place, in which case that older - // value is the correct one. - var top = this.undefStack[this.undefStack.length - 1]; - - if (top && !top.hasOwnProperty(name)) { - top[name] = this.current[name]; - } - } - - if (value == null) { - delete this.current[name]; - } else { - this.current[name] = value; - } - } - -} - -/** - * Predefined macros for KaTeX. - * This can be used to define some commands in terms of others. - */ -var macros = _macros; -// macro tools - -defineMacro("\\noexpand", function (context) { - // The expansion is the token itself; but that token is interpreted - // as if its meaning were ‘\relax’ if it is a control sequence that - // would ordinarily be expanded by TeX’s expansion rules. - var t = context.popToken(); - - if (context.isExpandable(t.text)) { - t.noexpand = true; - t.treatAsRelax = true; - } - - return { - tokens: [t], - numArgs: 0 - }; -}); -defineMacro("\\expandafter", function (context) { - // TeX first reads the token that comes immediately after \expandafter, - // without expanding it; let’s call this token t. Then TeX reads the - // token that comes after t (and possibly more tokens, if that token - // has an argument), replacing it by its expansion. Finally TeX puts - // t back in front of that expansion. - var t = context.popToken(); - context.expandOnce(true); // expand only an expandable token - - return { - tokens: [t], - numArgs: 0 - }; -}); // LaTeX's \@firstoftwo{#1}{#2} expands to #1, skipping #2 -// TeX source: \long\def\@firstoftwo#1#2{#1} - -defineMacro("\\@firstoftwo", function (context) { - var args = context.consumeArgs(2); - return { - tokens: args[0], - numArgs: 0 - }; -}); // LaTeX's \@secondoftwo{#1}{#2} expands to #2, skipping #1 -// TeX source: \long\def\@secondoftwo#1#2{#2} - -defineMacro("\\@secondoftwo", function (context) { - var args = context.consumeArgs(2); - return { - tokens: args[1], - numArgs: 0 - }; -}); // LaTeX's \@ifnextchar{#1}{#2}{#3} looks ahead to the next (unexpanded) -// symbol that isn't a space, consuming any spaces but not consuming the -// first nonspace character. If that nonspace character matches #1, then -// the macro expands to #2; otherwise, it expands to #3. - -defineMacro("\\@ifnextchar", function (context) { - var args = context.consumeArgs(3); // symbol, if, else - - context.consumeSpaces(); - var nextToken = context.future(); - - if (args[0].length === 1 && args[0][0].text === nextToken.text) { - return { - tokens: args[1], - numArgs: 0 - }; - } else { - return { - tokens: args[2], - numArgs: 0 - }; - } -}); // LaTeX's \@ifstar{#1}{#2} looks ahead to the next (unexpanded) symbol. -// If it is `*`, then it consumes the symbol, and the macro expands to #1; -// otherwise, the macro expands to #2 (without consuming the symbol). -// TeX source: \def\@ifstar#1{\@ifnextchar *{\@firstoftwo{#1}}} - -defineMacro("\\@ifstar", "\\@ifnextchar *{\\@firstoftwo{#1}}"); // LaTeX's \TextOrMath{#1}{#2} expands to #1 in text mode, #2 in math mode - -defineMacro("\\TextOrMath", function (context) { - var args = context.consumeArgs(2); - - if (context.mode === 'text') { - return { - tokens: args[0], - numArgs: 0 - }; - } else { - return { - tokens: args[1], - numArgs: 0 - }; - } -}); // Lookup table for parsing numbers in base 8 through 16 - -var digitToNumber = { - "0": 0, - "1": 1, - "2": 2, - "3": 3, - "4": 4, - "5": 5, - "6": 6, - "7": 7, - "8": 8, - "9": 9, - "a": 10, - "A": 10, - "b": 11, - "B": 11, - "c": 12, - "C": 12, - "d": 13, - "D": 13, - "e": 14, - "E": 14, - "f": 15, - "F": 15 -}; // TeX \char makes a literal character (catcode 12) using the following forms: -// (see The TeXBook, p. 43) -// \char123 -- decimal -// \char'123 -- octal -// \char"123 -- hex -// \char`x -- character that can be written (i.e. isn't active) -// \char`\x -- character that cannot be written (e.g. %) -// These all refer to characters from the font, so we turn them into special -// calls to a function \@char dealt with in the Parser. - -defineMacro("\\char", function (context) { - var token = context.popToken(); - var base; - var number = ''; - - if (token.text === "'") { - base = 8; - token = context.popToken(); - } else if (token.text === '"') { - base = 16; - token = context.popToken(); - } else if (token.text === "`") { - token = context.popToken(); - - if (token.text[0] === "\\") { - number = token.text.charCodeAt(1); - } else if (token.text === "EOF") { - throw new ParseError("\\char` missing argument"); - } else { - number = token.text.charCodeAt(0); - } - } else { - base = 10; - } - - if (base) { - // Parse a number in the given base, starting with first `token`. - number = digitToNumber[token.text]; - - if (number == null || number >= base) { - throw new ParseError("Invalid base-" + base + " digit " + token.text); - } - - var digit; - - while ((digit = digitToNumber[context.future().text]) != null && digit < base) { - number *= base; - number += digit; - context.popToken(); - } - } - - return "\\@char{" + number + "}"; -}); // \newcommand{\macro}[args]{definition} -// \renewcommand{\macro}[args]{definition} -// TODO: Optional arguments: \newcommand{\macro}[args][default]{definition} - -var newcommand = (context, existsOK, nonexistsOK) => { - var arg = context.consumeArg().tokens; - - if (arg.length !== 1) { - throw new ParseError("\\newcommand's first argument must be a macro name"); - } - - var name = arg[0].text; - var exists = context.isDefined(name); - - if (exists && !existsOK) { - throw new ParseError("\\newcommand{" + name + "} attempting to redefine " + (name + "; use \\renewcommand")); - } - - if (!exists && !nonexistsOK) { - throw new ParseError("\\renewcommand{" + name + "} when command " + name + " " + "does not yet exist; use \\newcommand"); - } - - var numArgs = 0; - arg = context.consumeArg().tokens; - - if (arg.length === 1 && arg[0].text === "[") { - var argText = ''; - var token = context.expandNextToken(); - - while (token.text !== "]" && token.text !== "EOF") { - // TODO: Should properly expand arg, e.g., ignore {}s - argText += token.text; - token = context.expandNextToken(); - } - - if (!argText.match(/^\s*[0-9]+\s*$/)) { - throw new ParseError("Invalid number of arguments: " + argText); - } - - numArgs = parseInt(argText); - arg = context.consumeArg().tokens; - } // Final arg is the expansion of the macro - - - context.macros.set(name, { - tokens: arg, - numArgs - }); - return ''; -}; - -defineMacro("\\newcommand", context => newcommand(context, false, true)); -defineMacro("\\renewcommand", context => newcommand(context, true, false)); -defineMacro("\\providecommand", context => newcommand(context, true, true)); // terminal (console) tools - -defineMacro("\\message", context => { - var arg = context.consumeArgs(1)[0]; // eslint-disable-next-line no-console - - console.log(arg.reverse().map(token => token.text).join("")); - return ''; -}); -defineMacro("\\errmessage", context => { - var arg = context.consumeArgs(1)[0]; // eslint-disable-next-line no-console - - console.error(arg.reverse().map(token => token.text).join("")); - return ''; -}); -defineMacro("\\show", context => { - var tok = context.popToken(); - var name = tok.text; // eslint-disable-next-line no-console - - console.log(tok, context.macros.get(name), functions[name], symbols.math[name], symbols.text[name]); - return ''; -}); ////////////////////////////////////////////////////////////////////// -// Grouping -// \let\bgroup={ \let\egroup=} - -defineMacro("\\bgroup", "{"); -defineMacro("\\egroup", "}"); // Symbols from latex.ltx: -// \def~{\nobreakspace{}} -// \def\lq{`} -// \def\rq{'} -// \def \aa {\r a} -// \def \AA {\r A} - -defineMacro("~", "\\nobreakspace"); -defineMacro("\\lq", "`"); -defineMacro("\\rq", "'"); -defineMacro("\\aa", "\\r a"); -defineMacro("\\AA", "\\r A"); // Copyright (C) and registered (R) symbols. Use raw symbol in MathML. -// \DeclareTextCommandDefault{\textcopyright}{\textcircled{c}} -// \DeclareTextCommandDefault{\textregistered}{\textcircled{% -// \check@mathfonts\fontsize\sf@size\z@\math@fontsfalse\selectfont R}} -// \DeclareRobustCommand{\copyright}{% -// \ifmmode{\nfss@text{\textcopyright}}\else\textcopyright\fi} - -defineMacro("\\textcopyright", "\\html@mathml{\\textcircled{c}}{\\char`©}"); -defineMacro("\\copyright", "\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"); -defineMacro("\\textregistered", "\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"); // Characters omitted from Unicode range 1D400–1D7FF - -defineMacro("\u212C", "\\mathscr{B}"); // script - -defineMacro("\u2130", "\\mathscr{E}"); -defineMacro("\u2131", "\\mathscr{F}"); -defineMacro("\u210B", "\\mathscr{H}"); -defineMacro("\u2110", "\\mathscr{I}"); -defineMacro("\u2112", "\\mathscr{L}"); -defineMacro("\u2133", "\\mathscr{M}"); -defineMacro("\u211B", "\\mathscr{R}"); -defineMacro("\u212D", "\\mathfrak{C}"); // Fraktur - -defineMacro("\u210C", "\\mathfrak{H}"); -defineMacro("\u2128", "\\mathfrak{Z}"); // Define \Bbbk with a macro that works in both HTML and MathML. - -defineMacro("\\Bbbk", "\\Bbb{k}"); // Unicode middle dot -// The KaTeX fonts do not contain U+00B7. Instead, \cdotp displays -// the dot at U+22C5 and gives it punct spacing. - -defineMacro("\u00b7", "\\cdotp"); // \llap and \rlap render their contents in text mode - -defineMacro("\\llap", "\\mathllap{\\textrm{#1}}"); -defineMacro("\\rlap", "\\mathrlap{\\textrm{#1}}"); -defineMacro("\\clap", "\\mathclap{\\textrm{#1}}"); // \mathstrut from the TeXbook, p 360 - -defineMacro("\\mathstrut", "\\vphantom{(}"); // \underbar from TeXbook p 353 - -defineMacro("\\underbar", "\\underline{\\text{#1}}"); // \not is defined by base/fontmath.ltx via -// \DeclareMathSymbol{\not}{\mathrel}{symbols}{"36} -// It's thus treated like a \mathrel, but defined by a symbol that has zero -// width but extends to the right. We use \rlap to get that spacing. -// For MathML we write U+0338 here. buildMathML.js will then do the overlay. - -defineMacro("\\not", '\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}'); // Negated symbols from base/fontmath.ltx: -// \def\neq{\not=} \let\ne=\neq -// \DeclareRobustCommand -// \notin{\mathrel{\m@th\mathpalette\c@ncel\in}} -// \def\c@ncel#1#2{\m@th\ooalign{$\hfil#1\mkern1mu/\hfil$\crcr$#1#2$}} - -defineMacro("\\neq", "\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"); -defineMacro("\\ne", "\\neq"); -defineMacro("\u2260", "\\neq"); -defineMacro("\\notin", "\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}" + "{\\mathrel{\\char`∉}}"); -defineMacro("\u2209", "\\notin"); // Unicode stacked relations - -defineMacro("\u2258", "\\html@mathml{" + "\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}" + "}{\\mathrel{\\char`\u2258}}"); -defineMacro("\u2259", "\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`\u2258}}"); -defineMacro("\u225A", "\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`\u225A}}"); -defineMacro("\u225B", "\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}" + "{\\mathrel{\\char`\u225B}}"); -defineMacro("\u225D", "\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}" + "{\\mathrel{\\char`\u225D}}"); -defineMacro("\u225E", "\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}" + "{\\mathrel{\\char`\u225E}}"); -defineMacro("\u225F", "\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`\u225F}}"); // Misc Unicode - -defineMacro("\u27C2", "\\perp"); -defineMacro("\u203C", "\\mathclose{!\\mkern-0.8mu!}"); -defineMacro("\u220C", "\\notni"); -defineMacro("\u231C", "\\ulcorner"); -defineMacro("\u231D", "\\urcorner"); -defineMacro("\u231E", "\\llcorner"); -defineMacro("\u231F", "\\lrcorner"); -defineMacro("\u00A9", "\\copyright"); -defineMacro("\u00AE", "\\textregistered"); -defineMacro("\uFE0F", "\\textregistered"); // The KaTeX fonts have corners at codepoints that don't match Unicode. -// For MathML purposes, use the Unicode code point. - -defineMacro("\\ulcorner", "\\html@mathml{\\@ulcorner}{\\mathop{\\char\"231c}}"); -defineMacro("\\urcorner", "\\html@mathml{\\@urcorner}{\\mathop{\\char\"231d}}"); -defineMacro("\\llcorner", "\\html@mathml{\\@llcorner}{\\mathop{\\char\"231e}}"); -defineMacro("\\lrcorner", "\\html@mathml{\\@lrcorner}{\\mathop{\\char\"231f}}"); ////////////////////////////////////////////////////////////////////// -// LaTeX_2ε -// \vdots{\vbox{\baselineskip4\p@ \lineskiplimit\z@ -// \kern6\p@\hbox{.}\hbox{.}\hbox{.}}} -// We'll call \varvdots, which gets a glyph from symbols.js. -// The zero-width rule gets us an equivalent to the vertical 6pt kern. - -defineMacro("\\vdots", "\\mathord{\\varvdots\\rule{0pt}{15pt}}"); -defineMacro("\u22ee", "\\vdots"); ////////////////////////////////////////////////////////////////////// -// amsmath.sty -// http://mirrors.concertpass.com/tex-archive/macros/latex/required/amsmath/amsmath.pdf -// Italic Greek capital letters. AMS defines these with \DeclareMathSymbol, -// but they are equivalent to \mathit{\Letter}. - -defineMacro("\\varGamma", "\\mathit{\\Gamma}"); -defineMacro("\\varDelta", "\\mathit{\\Delta}"); -defineMacro("\\varTheta", "\\mathit{\\Theta}"); -defineMacro("\\varLambda", "\\mathit{\\Lambda}"); -defineMacro("\\varXi", "\\mathit{\\Xi}"); -defineMacro("\\varPi", "\\mathit{\\Pi}"); -defineMacro("\\varSigma", "\\mathit{\\Sigma}"); -defineMacro("\\varUpsilon", "\\mathit{\\Upsilon}"); -defineMacro("\\varPhi", "\\mathit{\\Phi}"); -defineMacro("\\varPsi", "\\mathit{\\Psi}"); -defineMacro("\\varOmega", "\\mathit{\\Omega}"); //\newcommand{\substack}[1]{\subarray{c}#1\endsubarray} - -defineMacro("\\substack", "\\begin{subarray}{c}#1\\end{subarray}"); // \renewcommand{\colon}{\nobreak\mskip2mu\mathpunct{}\nonscript -// \mkern-\thinmuskip{:}\mskip6muplus1mu\relax} - -defineMacro("\\colon", "\\nobreak\\mskip2mu\\mathpunct{}" + "\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax"); // \newcommand{\boxed}[1]{\fbox{\m@th$\displaystyle#1$}} - -defineMacro("\\boxed", "\\fbox{$\\displaystyle{#1}$}"); // \def\iff{\DOTSB\;\Longleftrightarrow\;} -// \def\implies{\DOTSB\;\Longrightarrow\;} -// \def\impliedby{\DOTSB\;\Longleftarrow\;} - -defineMacro("\\iff", "\\DOTSB\\;\\Longleftrightarrow\\;"); -defineMacro("\\implies", "\\DOTSB\\;\\Longrightarrow\\;"); -defineMacro("\\impliedby", "\\DOTSB\\;\\Longleftarrow\\;"); // AMSMath's automatic \dots, based on \mdots@@ macro. - -var dotsByToken = { - ',': '\\dotsc', - '\\not': '\\dotsb', - // \keybin@ checks for the following: - '+': '\\dotsb', - '=': '\\dotsb', - '<': '\\dotsb', - '>': '\\dotsb', - '-': '\\dotsb', - '*': '\\dotsb', - ':': '\\dotsb', - // Symbols whose definition starts with \DOTSB: - '\\DOTSB': '\\dotsb', - '\\coprod': '\\dotsb', - '\\bigvee': '\\dotsb', - '\\bigwedge': '\\dotsb', - '\\biguplus': '\\dotsb', - '\\bigcap': '\\dotsb', - '\\bigcup': '\\dotsb', - '\\prod': '\\dotsb', - '\\sum': '\\dotsb', - '\\bigotimes': '\\dotsb', - '\\bigoplus': '\\dotsb', - '\\bigodot': '\\dotsb', - '\\bigsqcup': '\\dotsb', - '\\And': '\\dotsb', - '\\longrightarrow': '\\dotsb', - '\\Longrightarrow': '\\dotsb', - '\\longleftarrow': '\\dotsb', - '\\Longleftarrow': '\\dotsb', - '\\longleftrightarrow': '\\dotsb', - '\\Longleftrightarrow': '\\dotsb', - '\\mapsto': '\\dotsb', - '\\longmapsto': '\\dotsb', - '\\hookrightarrow': '\\dotsb', - '\\doteq': '\\dotsb', - // Symbols whose definition starts with \mathbin: - '\\mathbin': '\\dotsb', - // Symbols whose definition starts with \mathrel: - '\\mathrel': '\\dotsb', - '\\relbar': '\\dotsb', - '\\Relbar': '\\dotsb', - '\\xrightarrow': '\\dotsb', - '\\xleftarrow': '\\dotsb', - // Symbols whose definition starts with \DOTSI: - '\\DOTSI': '\\dotsi', - '\\int': '\\dotsi', - '\\oint': '\\dotsi', - '\\iint': '\\dotsi', - '\\iiint': '\\dotsi', - '\\iiiint': '\\dotsi', - '\\idotsint': '\\dotsi', - // Symbols whose definition starts with \DOTSX: - '\\DOTSX': '\\dotsx' -}; -defineMacro("\\dots", function (context) { - // TODO: If used in text mode, should expand to \textellipsis. - // However, in KaTeX, \textellipsis and \ldots behave the same - // (in text mode), and it's unlikely we'd see any of the math commands - // that affect the behavior of \dots when in text mode. So fine for now - // (until we support \ifmmode ... \else ... \fi). - var thedots = '\\dotso'; - var next = context.expandAfterFuture().text; - - if (next in dotsByToken) { - thedots = dotsByToken[next]; - } else if (next.slice(0, 4) === '\\not') { - thedots = '\\dotsb'; - } else if (next in symbols.math) { - if (utils.contains(['bin', 'rel'], symbols.math[next].group)) { - thedots = '\\dotsb'; - } - } - - return thedots; -}); -var spaceAfterDots = { - // \rightdelim@ checks for the following: - ')': true, - ']': true, - '\\rbrack': true, - '\\}': true, - '\\rbrace': true, - '\\rangle': true, - '\\rceil': true, - '\\rfloor': true, - '\\rgroup': true, - '\\rmoustache': true, - '\\right': true, - '\\bigr': true, - '\\biggr': true, - '\\Bigr': true, - '\\Biggr': true, - // \extra@ also tests for the following: - '$': true, - // \extrap@ checks for the following: - ';': true, - '.': true, - ',': true -}; -defineMacro("\\dotso", function (context) { - var next = context.future().text; - - if (next in spaceAfterDots) { - return "\\ldots\\,"; - } else { - return "\\ldots"; - } -}); -defineMacro("\\dotsc", function (context) { - var next = context.future().text; // \dotsc uses \extra@ but not \extrap@, instead specially checking for - // ';' and '.', but doesn't check for ','. - - if (next in spaceAfterDots && next !== ',') { - return "\\ldots\\,"; - } else { - return "\\ldots"; - } -}); -defineMacro("\\cdots", function (context) { - var next = context.future().text; - - if (next in spaceAfterDots) { - return "\\@cdots\\,"; - } else { - return "\\@cdots"; - } -}); -defineMacro("\\dotsb", "\\cdots"); -defineMacro("\\dotsm", "\\cdots"); -defineMacro("\\dotsi", "\\!\\cdots"); // amsmath doesn't actually define \dotsx, but \dots followed by a macro -// starting with \DOTSX implies \dotso, and then \extra@ detects this case -// and forces the added `\,`. - -defineMacro("\\dotsx", "\\ldots\\,"); // \let\DOTSI\relax -// \let\DOTSB\relax -// \let\DOTSX\relax - -defineMacro("\\DOTSI", "\\relax"); -defineMacro("\\DOTSB", "\\relax"); -defineMacro("\\DOTSX", "\\relax"); // Spacing, based on amsmath.sty's override of LaTeX defaults -// \DeclareRobustCommand{\tmspace}[3]{% -// \ifmmode\mskip#1#2\else\kern#1#3\fi\relax} - -defineMacro("\\tmspace", "\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"); // \renewcommand{\,}{\tmspace+\thinmuskip{.1667em}} -// TODO: math mode should use \thinmuskip - -defineMacro("\\,", "\\tmspace+{3mu}{.1667em}"); // \let\thinspace\, - -defineMacro("\\thinspace", "\\,"); // \def\>{\mskip\medmuskip} -// \renewcommand{\:}{\tmspace+\medmuskip{.2222em}} -// TODO: \> and math mode of \: should use \medmuskip = 4mu plus 2mu minus 4mu - -defineMacro("\\>", "\\mskip{4mu}"); -defineMacro("\\:", "\\tmspace+{4mu}{.2222em}"); // \let\medspace\: - -defineMacro("\\medspace", "\\:"); // \renewcommand{\;}{\tmspace+\thickmuskip{.2777em}} -// TODO: math mode should use \thickmuskip = 5mu plus 5mu - -defineMacro("\\;", "\\tmspace+{5mu}{.2777em}"); // \let\thickspace\; - -defineMacro("\\thickspace", "\\;"); // \renewcommand{\!}{\tmspace-\thinmuskip{.1667em}} -// TODO: math mode should use \thinmuskip - -defineMacro("\\!", "\\tmspace-{3mu}{.1667em}"); // \let\negthinspace\! - -defineMacro("\\negthinspace", "\\!"); // \newcommand{\negmedspace}{\tmspace-\medmuskip{.2222em}} -// TODO: math mode should use \medmuskip - -defineMacro("\\negmedspace", "\\tmspace-{4mu}{.2222em}"); // \newcommand{\negthickspace}{\tmspace-\thickmuskip{.2777em}} -// TODO: math mode should use \thickmuskip - -defineMacro("\\negthickspace", "\\tmspace-{5mu}{.277em}"); // \def\enspace{\kern.5em } - -defineMacro("\\enspace", "\\kern.5em "); // \def\enskip{\hskip.5em\relax} - -defineMacro("\\enskip", "\\hskip.5em\\relax"); // \def\quad{\hskip1em\relax} - -defineMacro("\\quad", "\\hskip1em\\relax"); // \def\qquad{\hskip2em\relax} - -defineMacro("\\qquad", "\\hskip2em\\relax"); // \tag@in@display form of \tag - -defineMacro("\\tag", "\\@ifstar\\tag@literal\\tag@paren"); -defineMacro("\\tag@paren", "\\tag@literal{({#1})}"); -defineMacro("\\tag@literal", context => { - if (context.macros.get("\\df@tag")) { - throw new ParseError("Multiple \\tag"); - } - - return "\\gdef\\df@tag{\\text{#1}}"; -}); // \renewcommand{\bmod}{\nonscript\mskip-\medmuskip\mkern5mu\mathbin -// {\operator@font mod}\penalty900 -// \mkern5mu\nonscript\mskip-\medmuskip} -// \newcommand{\pod}[1]{\allowbreak -// \if@display\mkern18mu\else\mkern8mu\fi(#1)} -// \renewcommand{\pmod}[1]{\pod{{\operator@font mod}\mkern6mu#1}} -// \newcommand{\mod}[1]{\allowbreak\if@display\mkern18mu -// \else\mkern12mu\fi{\operator@font mod}\,\,#1} -// TODO: math mode should use \medmuskip = 4mu plus 2mu minus 4mu - -defineMacro("\\bmod", "\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}" + "\\mathbin{\\rm mod}" + "\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"); -defineMacro("\\pod", "\\allowbreak" + "\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"); -defineMacro("\\pmod", "\\pod{{\\rm mod}\\mkern6mu#1}"); -defineMacro("\\mod", "\\allowbreak" + "\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}" + "{\\rm mod}\\,\\,#1"); ////////////////////////////////////////////////////////////////////// -// LaTeX source2e -// \expandafter\let\expandafter\@normalcr -// \csname\expandafter\@gobble\string\\ \endcsname -// \DeclareRobustCommand\newline{\@normalcr\relax} - -defineMacro("\\newline", "\\\\\\relax"); // \def\TeX{T\kern-.1667em\lower.5ex\hbox{E}\kern-.125emX\@} -// TODO: Doesn't normally work in math mode because \@ fails. KaTeX doesn't -// support \@ yet, so that's omitted, and we add \text so that the result -// doesn't look funny in math mode. - -defineMacro("\\TeX", "\\textrm{\\html@mathml{" + "T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX" + "}{TeX}}"); // \DeclareRobustCommand{\LaTeX}{L\kern-.36em% -// {\sbox\z@ T% -// \vbox to\ht\z@{\hbox{\check@mathfonts -// \fontsize\sf@size\z@ -// \math@fontsfalse\selectfont -// A}% -// \vss}% -// }% -// \kern-.15em% -// \TeX} -// This code aligns the top of the A with the T (from the perspective of TeX's -// boxes, though visually the A appears to extend above slightly). -// We compute the corresponding \raisebox when A is rendered in \normalsize -// \scriptstyle, which has a scale factor of 0.7 (see Options.js). - -var latexRaiseA = makeEm(fontMetricsData['Main-Regular']["T".charCodeAt(0)][1] - 0.7 * fontMetricsData['Main-Regular']["A".charCodeAt(0)][1]); -defineMacro("\\LaTeX", "\\textrm{\\html@mathml{" + ("L\\kern-.36em\\raisebox{" + latexRaiseA + "}{\\scriptstyle A}") + "\\kern-.15em\\TeX}{LaTeX}}"); // New KaTeX logo based on tweaking LaTeX logo - -defineMacro("\\KaTeX", "\\textrm{\\html@mathml{" + ("K\\kern-.17em\\raisebox{" + latexRaiseA + "}{\\scriptstyle A}") + "\\kern-.15em\\TeX}{KaTeX}}"); // \DeclareRobustCommand\hspace{\@ifstar\@hspacer\@hspace} -// \def\@hspace#1{\hskip #1\relax} -// \def\@hspacer#1{\vrule \@width\z@\nobreak -// \hskip #1\hskip \z@skip} - -defineMacro("\\hspace", "\\@ifstar\\@hspacer\\@hspace"); -defineMacro("\\@hspace", "\\hskip #1\\relax"); -defineMacro("\\@hspacer", "\\rule{0pt}{0pt}\\hskip #1\\relax"); ////////////////////////////////////////////////////////////////////// -// mathtools.sty -//\providecommand\ordinarycolon{:} - -defineMacro("\\ordinarycolon", ":"); //\def\vcentcolon{\mathrel{\mathop\ordinarycolon}} -//TODO(edemaine): Not yet centered. Fix via \raisebox or #726 - -defineMacro("\\vcentcolon", "\\mathrel{\\mathop\\ordinarycolon}"); // \providecommand*\dblcolon{\vcentcolon\mathrel{\mkern-.9mu}\vcentcolon} - -defineMacro("\\dblcolon", "\\html@mathml{" + "\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}" + "{\\mathop{\\char\"2237}}"); // \providecommand*\coloneqq{\vcentcolon\mathrel{\mkern-1.2mu}=} - -defineMacro("\\coloneqq", "\\html@mathml{" + "\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}" + "{\\mathop{\\char\"2254}}"); // ≔ -// \providecommand*\Coloneqq{\dblcolon\mathrel{\mkern-1.2mu}=} - -defineMacro("\\Coloneqq", "\\html@mathml{" + "\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}" + "{\\mathop{\\char\"2237\\char\"3d}}"); // \providecommand*\coloneq{\vcentcolon\mathrel{\mkern-1.2mu}\mathrel{-}} - -defineMacro("\\coloneq", "\\html@mathml{" + "\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}" + "{\\mathop{\\char\"3a\\char\"2212}}"); // \providecommand*\Coloneq{\dblcolon\mathrel{\mkern-1.2mu}\mathrel{-}} - -defineMacro("\\Coloneq", "\\html@mathml{" + "\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}" + "{\\mathop{\\char\"2237\\char\"2212}}"); // \providecommand*\eqqcolon{=\mathrel{\mkern-1.2mu}\vcentcolon} - -defineMacro("\\eqqcolon", "\\html@mathml{" + "\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}" + "{\\mathop{\\char\"2255}}"); // ≕ -// \providecommand*\Eqqcolon{=\mathrel{\mkern-1.2mu}\dblcolon} - -defineMacro("\\Eqqcolon", "\\html@mathml{" + "\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}" + "{\\mathop{\\char\"3d\\char\"2237}}"); // \providecommand*\eqcolon{\mathrel{-}\mathrel{\mkern-1.2mu}\vcentcolon} - -defineMacro("\\eqcolon", "\\html@mathml{" + "\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}" + "{\\mathop{\\char\"2239}}"); // \providecommand*\Eqcolon{\mathrel{-}\mathrel{\mkern-1.2mu}\dblcolon} - -defineMacro("\\Eqcolon", "\\html@mathml{" + "\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}" + "{\\mathop{\\char\"2212\\char\"2237}}"); // \providecommand*\colonapprox{\vcentcolon\mathrel{\mkern-1.2mu}\approx} - -defineMacro("\\colonapprox", "\\html@mathml{" + "\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}" + "{\\mathop{\\char\"3a\\char\"2248}}"); // \providecommand*\Colonapprox{\dblcolon\mathrel{\mkern-1.2mu}\approx} - -defineMacro("\\Colonapprox", "\\html@mathml{" + "\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}" + "{\\mathop{\\char\"2237\\char\"2248}}"); // \providecommand*\colonsim{\vcentcolon\mathrel{\mkern-1.2mu}\sim} - -defineMacro("\\colonsim", "\\html@mathml{" + "\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}" + "{\\mathop{\\char\"3a\\char\"223c}}"); // \providecommand*\Colonsim{\dblcolon\mathrel{\mkern-1.2mu}\sim} - -defineMacro("\\Colonsim", "\\html@mathml{" + "\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}" + "{\\mathop{\\char\"2237\\char\"223c}}"); // Some Unicode characters are implemented with macros to mathtools functions. - -defineMacro("\u2237", "\\dblcolon"); // :: - -defineMacro("\u2239", "\\eqcolon"); // -: - -defineMacro("\u2254", "\\coloneqq"); // := - -defineMacro("\u2255", "\\eqqcolon"); // =: - -defineMacro("\u2A74", "\\Coloneqq"); // ::= -////////////////////////////////////////////////////////////////////// -// colonequals.sty -// Alternate names for mathtools's macros: - -defineMacro("\\ratio", "\\vcentcolon"); -defineMacro("\\coloncolon", "\\dblcolon"); -defineMacro("\\colonequals", "\\coloneqq"); -defineMacro("\\coloncolonequals", "\\Coloneqq"); -defineMacro("\\equalscolon", "\\eqqcolon"); -defineMacro("\\equalscoloncolon", "\\Eqqcolon"); -defineMacro("\\colonminus", "\\coloneq"); -defineMacro("\\coloncolonminus", "\\Coloneq"); -defineMacro("\\minuscolon", "\\eqcolon"); -defineMacro("\\minuscoloncolon", "\\Eqcolon"); // \colonapprox name is same in mathtools and colonequals. - -defineMacro("\\coloncolonapprox", "\\Colonapprox"); // \colonsim name is same in mathtools and colonequals. - -defineMacro("\\coloncolonsim", "\\Colonsim"); // Additional macros, implemented by analogy with mathtools definitions: - -defineMacro("\\simcolon", "\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"); -defineMacro("\\simcoloncolon", "\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"); -defineMacro("\\approxcolon", "\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"); -defineMacro("\\approxcoloncolon", "\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"); // Present in newtxmath, pxfonts and txfonts - -defineMacro("\\notni", "\\html@mathml{\\not\\ni}{\\mathrel{\\char`\u220C}}"); -defineMacro("\\limsup", "\\DOTSB\\operatorname*{lim\\,sup}"); -defineMacro("\\liminf", "\\DOTSB\\operatorname*{lim\\,inf}"); ////////////////////////////////////////////////////////////////////// -// From amsopn.sty - -defineMacro("\\injlim", "\\DOTSB\\operatorname*{inj\\,lim}"); -defineMacro("\\projlim", "\\DOTSB\\operatorname*{proj\\,lim}"); -defineMacro("\\varlimsup", "\\DOTSB\\operatorname*{\\overline{lim}}"); -defineMacro("\\varliminf", "\\DOTSB\\operatorname*{\\underline{lim}}"); -defineMacro("\\varinjlim", "\\DOTSB\\operatorname*{\\underrightarrow{lim}}"); -defineMacro("\\varprojlim", "\\DOTSB\\operatorname*{\\underleftarrow{lim}}"); ////////////////////////////////////////////////////////////////////// -// MathML alternates for KaTeX glyphs in the Unicode private area - -defineMacro("\\gvertneqq", "\\html@mathml{\\@gvertneqq}{\u2269}"); -defineMacro("\\lvertneqq", "\\html@mathml{\\@lvertneqq}{\u2268}"); -defineMacro("\\ngeqq", "\\html@mathml{\\@ngeqq}{\u2271}"); -defineMacro("\\ngeqslant", "\\html@mathml{\\@ngeqslant}{\u2271}"); -defineMacro("\\nleqq", "\\html@mathml{\\@nleqq}{\u2270}"); -defineMacro("\\nleqslant", "\\html@mathml{\\@nleqslant}{\u2270}"); -defineMacro("\\nshortmid", "\\html@mathml{\\@nshortmid}{∤}"); -defineMacro("\\nshortparallel", "\\html@mathml{\\@nshortparallel}{∦}"); -defineMacro("\\nsubseteqq", "\\html@mathml{\\@nsubseteqq}{\u2288}"); -defineMacro("\\nsupseteqq", "\\html@mathml{\\@nsupseteqq}{\u2289}"); -defineMacro("\\varsubsetneq", "\\html@mathml{\\@varsubsetneq}{⊊}"); -defineMacro("\\varsubsetneqq", "\\html@mathml{\\@varsubsetneqq}{⫋}"); -defineMacro("\\varsupsetneq", "\\html@mathml{\\@varsupsetneq}{⊋}"); -defineMacro("\\varsupsetneqq", "\\html@mathml{\\@varsupsetneqq}{⫌}"); -defineMacro("\\imath", "\\html@mathml{\\@imath}{\u0131}"); -defineMacro("\\jmath", "\\html@mathml{\\@jmath}{\u0237}"); ////////////////////////////////////////////////////////////////////// -// stmaryrd and semantic -// The stmaryrd and semantic packages render the next four items by calling a -// glyph. Those glyphs do not exist in the KaTeX fonts. Hence the macros. - -defineMacro("\\llbracket", "\\html@mathml{" + "\\mathopen{[\\mkern-3.2mu[}}" + "{\\mathopen{\\char`\u27e6}}"); -defineMacro("\\rrbracket", "\\html@mathml{" + "\\mathclose{]\\mkern-3.2mu]}}" + "{\\mathclose{\\char`\u27e7}}"); -defineMacro("\u27e6", "\\llbracket"); // blackboard bold [ - -defineMacro("\u27e7", "\\rrbracket"); // blackboard bold ] - -defineMacro("\\lBrace", "\\html@mathml{" + "\\mathopen{\\{\\mkern-3.2mu[}}" + "{\\mathopen{\\char`\u2983}}"); -defineMacro("\\rBrace", "\\html@mathml{" + "\\mathclose{]\\mkern-3.2mu\\}}}" + "{\\mathclose{\\char`\u2984}}"); -defineMacro("\u2983", "\\lBrace"); // blackboard bold { - -defineMacro("\u2984", "\\rBrace"); // blackboard bold } -// TODO: Create variable sized versions of the last two items. I believe that -// will require new font glyphs. -// The stmaryrd function `\minuso` provides a "Plimsoll" symbol that -// superimposes the characters \circ and \mathminus. Used in chemistry. - -defineMacro("\\minuso", "\\mathbin{\\html@mathml{" + "{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}" + "{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}" + "{\\char`⦵}}"); -defineMacro("⦵", "\\minuso"); ////////////////////////////////////////////////////////////////////// -// texvc.sty -// The texvc package contains macros available in mediawiki pages. -// We omit the functions deprecated at -// https://en.wikipedia.org/wiki/Help:Displaying_a_formula#Deprecated_syntax -// We also omit texvc's \O, which conflicts with \text{\O} - -defineMacro("\\darr", "\\downarrow"); -defineMacro("\\dArr", "\\Downarrow"); -defineMacro("\\Darr", "\\Downarrow"); -defineMacro("\\lang", "\\langle"); -defineMacro("\\rang", "\\rangle"); -defineMacro("\\uarr", "\\uparrow"); -defineMacro("\\uArr", "\\Uparrow"); -defineMacro("\\Uarr", "\\Uparrow"); -defineMacro("\\N", "\\mathbb{N}"); -defineMacro("\\R", "\\mathbb{R}"); -defineMacro("\\Z", "\\mathbb{Z}"); -defineMacro("\\alef", "\\aleph"); -defineMacro("\\alefsym", "\\aleph"); -defineMacro("\\Alpha", "\\mathrm{A}"); -defineMacro("\\Beta", "\\mathrm{B}"); -defineMacro("\\bull", "\\bullet"); -defineMacro("\\Chi", "\\mathrm{X}"); -defineMacro("\\clubs", "\\clubsuit"); -defineMacro("\\cnums", "\\mathbb{C}"); -defineMacro("\\Complex", "\\mathbb{C}"); -defineMacro("\\Dagger", "\\ddagger"); -defineMacro("\\diamonds", "\\diamondsuit"); -defineMacro("\\empty", "\\emptyset"); -defineMacro("\\Epsilon", "\\mathrm{E}"); -defineMacro("\\Eta", "\\mathrm{H}"); -defineMacro("\\exist", "\\exists"); -defineMacro("\\harr", "\\leftrightarrow"); -defineMacro("\\hArr", "\\Leftrightarrow"); -defineMacro("\\Harr", "\\Leftrightarrow"); -defineMacro("\\hearts", "\\heartsuit"); -defineMacro("\\image", "\\Im"); -defineMacro("\\infin", "\\infty"); -defineMacro("\\Iota", "\\mathrm{I}"); -defineMacro("\\isin", "\\in"); -defineMacro("\\Kappa", "\\mathrm{K}"); -defineMacro("\\larr", "\\leftarrow"); -defineMacro("\\lArr", "\\Leftarrow"); -defineMacro("\\Larr", "\\Leftarrow"); -defineMacro("\\lrarr", "\\leftrightarrow"); -defineMacro("\\lrArr", "\\Leftrightarrow"); -defineMacro("\\Lrarr", "\\Leftrightarrow"); -defineMacro("\\Mu", "\\mathrm{M}"); -defineMacro("\\natnums", "\\mathbb{N}"); -defineMacro("\\Nu", "\\mathrm{N}"); -defineMacro("\\Omicron", "\\mathrm{O}"); -defineMacro("\\plusmn", "\\pm"); -defineMacro("\\rarr", "\\rightarrow"); -defineMacro("\\rArr", "\\Rightarrow"); -defineMacro("\\Rarr", "\\Rightarrow"); -defineMacro("\\real", "\\Re"); -defineMacro("\\reals", "\\mathbb{R}"); -defineMacro("\\Reals", "\\mathbb{R}"); -defineMacro("\\Rho", "\\mathrm{P}"); -defineMacro("\\sdot", "\\cdot"); -defineMacro("\\sect", "\\S"); -defineMacro("\\spades", "\\spadesuit"); -defineMacro("\\sub", "\\subset"); -defineMacro("\\sube", "\\subseteq"); -defineMacro("\\supe", "\\supseteq"); -defineMacro("\\Tau", "\\mathrm{T}"); -defineMacro("\\thetasym", "\\vartheta"); // TODO: defineMacro("\\varcoppa", "\\\mbox{\\coppa}"); - -defineMacro("\\weierp", "\\wp"); -defineMacro("\\Zeta", "\\mathrm{Z}"); ////////////////////////////////////////////////////////////////////// -// statmath.sty -// https://ctan.math.illinois.edu/macros/latex/contrib/statmath/statmath.pdf - -defineMacro("\\argmin", "\\DOTSB\\operatorname*{arg\\,min}"); -defineMacro("\\argmax", "\\DOTSB\\operatorname*{arg\\,max}"); -defineMacro("\\plim", "\\DOTSB\\mathop{\\operatorname{plim}}\\limits"); ////////////////////////////////////////////////////////////////////// -// braket.sty -// http://ctan.math.washington.edu/tex-archive/macros/latex/contrib/braket/braket.pdf - -defineMacro("\\bra", "\\mathinner{\\langle{#1}|}"); -defineMacro("\\ket", "\\mathinner{|{#1}\\rangle}"); -defineMacro("\\braket", "\\mathinner{\\langle{#1}\\rangle}"); -defineMacro("\\Bra", "\\left\\langle#1\\right|"); -defineMacro("\\Ket", "\\left|#1\\right\\rangle"); - -var braketHelper = one => context => { - var left = context.consumeArg().tokens; - var middle = context.consumeArg().tokens; - var middleDouble = context.consumeArg().tokens; - var right = context.consumeArg().tokens; - var oldMiddle = context.macros.get("|"); - var oldMiddleDouble = context.macros.get("\\|"); - context.macros.beginGroup(); - - var midMacro = double => context => { - if (one) { - // Only modify the first instance of | or \| - context.macros.set("|", oldMiddle); - - if (middleDouble.length) { - context.macros.set("\\|", oldMiddleDouble); - } - } - - var doubled = double; - - if (!double && middleDouble.length) { - // Mimic \@ifnextchar - var nextToken = context.future(); - - if (nextToken.text === "|") { - context.popToken(); - doubled = true; - } - } - - return { - tokens: doubled ? middleDouble : middle, - numArgs: 0 - }; - }; - - context.macros.set("|", midMacro(false)); - - if (middleDouble.length) { - context.macros.set("\\|", midMacro(true)); - } - - var arg = context.consumeArg().tokens; - var expanded = context.expandTokens([...right, ...arg, ...left // reversed - ]); - context.macros.endGroup(); - return { - tokens: expanded.reverse(), - numArgs: 0 - }; -}; - -defineMacro("\\bra@ket", braketHelper(false)); -defineMacro("\\bra@set", braketHelper(true)); -defineMacro("\\Braket", "\\bra@ket{\\left\\langle}" + "{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"); -defineMacro("\\Set", "\\bra@set{\\left\\{\\:}" + "{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"); -defineMacro("\\set", "\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"); // has no support for special || or \| -////////////////////////////////////////////////////////////////////// -// actuarialangle.dtx - -defineMacro("\\angln", "{\\angl n}"); // Custom Khan Academy colors, should be moved to an optional package - -defineMacro("\\blue", "\\textcolor{##6495ed}{#1}"); -defineMacro("\\orange", "\\textcolor{##ffa500}{#1}"); -defineMacro("\\pink", "\\textcolor{##ff00af}{#1}"); -defineMacro("\\red", "\\textcolor{##df0030}{#1}"); -defineMacro("\\green", "\\textcolor{##28ae7b}{#1}"); -defineMacro("\\gray", "\\textcolor{gray}{#1}"); -defineMacro("\\purple", "\\textcolor{##9d38bd}{#1}"); -defineMacro("\\blueA", "\\textcolor{##ccfaff}{#1}"); -defineMacro("\\blueB", "\\textcolor{##80f6ff}{#1}"); -defineMacro("\\blueC", "\\textcolor{##63d9ea}{#1}"); -defineMacro("\\blueD", "\\textcolor{##11accd}{#1}"); -defineMacro("\\blueE", "\\textcolor{##0c7f99}{#1}"); -defineMacro("\\tealA", "\\textcolor{##94fff5}{#1}"); -defineMacro("\\tealB", "\\textcolor{##26edd5}{#1}"); -defineMacro("\\tealC", "\\textcolor{##01d1c1}{#1}"); -defineMacro("\\tealD", "\\textcolor{##01a995}{#1}"); -defineMacro("\\tealE", "\\textcolor{##208170}{#1}"); -defineMacro("\\greenA", "\\textcolor{##b6ffb0}{#1}"); -defineMacro("\\greenB", "\\textcolor{##8af281}{#1}"); -defineMacro("\\greenC", "\\textcolor{##74cf70}{#1}"); -defineMacro("\\greenD", "\\textcolor{##1fab54}{#1}"); -defineMacro("\\greenE", "\\textcolor{##0d923f}{#1}"); -defineMacro("\\goldA", "\\textcolor{##ffd0a9}{#1}"); -defineMacro("\\goldB", "\\textcolor{##ffbb71}{#1}"); -defineMacro("\\goldC", "\\textcolor{##ff9c39}{#1}"); -defineMacro("\\goldD", "\\textcolor{##e07d10}{#1}"); -defineMacro("\\goldE", "\\textcolor{##a75a05}{#1}"); -defineMacro("\\redA", "\\textcolor{##fca9a9}{#1}"); -defineMacro("\\redB", "\\textcolor{##ff8482}{#1}"); -defineMacro("\\redC", "\\textcolor{##f9685d}{#1}"); -defineMacro("\\redD", "\\textcolor{##e84d39}{#1}"); -defineMacro("\\redE", "\\textcolor{##bc2612}{#1}"); -defineMacro("\\maroonA", "\\textcolor{##ffbde0}{#1}"); -defineMacro("\\maroonB", "\\textcolor{##ff92c6}{#1}"); -defineMacro("\\maroonC", "\\textcolor{##ed5fa6}{#1}"); -defineMacro("\\maroonD", "\\textcolor{##ca337c}{#1}"); -defineMacro("\\maroonE", "\\textcolor{##9e034e}{#1}"); -defineMacro("\\purpleA", "\\textcolor{##ddd7ff}{#1}"); -defineMacro("\\purpleB", "\\textcolor{##c6b9fc}{#1}"); -defineMacro("\\purpleC", "\\textcolor{##aa87ff}{#1}"); -defineMacro("\\purpleD", "\\textcolor{##7854ab}{#1}"); -defineMacro("\\purpleE", "\\textcolor{##543b78}{#1}"); -defineMacro("\\mintA", "\\textcolor{##f5f9e8}{#1}"); -defineMacro("\\mintB", "\\textcolor{##edf2df}{#1}"); -defineMacro("\\mintC", "\\textcolor{##e0e5cc}{#1}"); -defineMacro("\\grayA", "\\textcolor{##f6f7f7}{#1}"); -defineMacro("\\grayB", "\\textcolor{##f0f1f2}{#1}"); -defineMacro("\\grayC", "\\textcolor{##e3e5e6}{#1}"); -defineMacro("\\grayD", "\\textcolor{##d6d8da}{#1}"); -defineMacro("\\grayE", "\\textcolor{##babec2}{#1}"); -defineMacro("\\grayF", "\\textcolor{##888d93}{#1}"); -defineMacro("\\grayG", "\\textcolor{##626569}{#1}"); -defineMacro("\\grayH", "\\textcolor{##3b3e40}{#1}"); -defineMacro("\\grayI", "\\textcolor{##21242c}{#1}"); -defineMacro("\\kaBlue", "\\textcolor{##314453}{#1}"); -defineMacro("\\kaGreen", "\\textcolor{##71B307}{#1}"); - -/** - * This file contains the “gullet” where macros are expanded - * until only non-macro tokens remain. - */ -// List of commands that act like macros but aren't defined as a macro, -// function, or symbol. Used in `isDefined`. -var implicitCommands = { - "^": true, - // Parser.js - "_": true, - // Parser.js - "\\limits": true, - // Parser.js - "\\nolimits": true // Parser.js - -}; -class MacroExpander { - constructor(input, settings, mode) { - this.settings = void 0; - this.expansionCount = void 0; - this.lexer = void 0; - this.macros = void 0; - this.stack = void 0; - this.mode = void 0; - this.settings = settings; - this.expansionCount = 0; - this.feed(input); // Make new global namespace - - this.macros = new Namespace(macros, settings.macros); - this.mode = mode; - this.stack = []; // contains tokens in REVERSE order - } - /** - * Feed a new input string to the same MacroExpander - * (with existing macros etc.). - */ - - - feed(input) { - this.lexer = new Lexer(input, this.settings); - } - /** - * Switches between "text" and "math" modes. - */ - - - switchMode(newMode) { - this.mode = newMode; - } - /** - * Start a new group nesting within all namespaces. - */ - - - beginGroup() { - this.macros.beginGroup(); - } - /** - * End current group nesting within all namespaces. - */ - - - endGroup() { - this.macros.endGroup(); - } - /** - * Ends all currently nested groups (if any), restoring values before the - * groups began. Useful in case of an error in the middle of parsing. - */ - - - endGroups() { - this.macros.endGroups(); - } - /** - * Returns the topmost token on the stack, without expanding it. - * Similar in behavior to TeX's `\futurelet`. - */ - - - future() { - if (this.stack.length === 0) { - this.pushToken(this.lexer.lex()); - } - - return this.stack[this.stack.length - 1]; - } - /** - * Remove and return the next unexpanded token. - */ - - - popToken() { - this.future(); // ensure non-empty stack - - return this.stack.pop(); - } - /** - * Add a given token to the token stack. In particular, this get be used - * to put back a token returned from one of the other methods. - */ - - - pushToken(token) { - this.stack.push(token); - } - /** - * Append an array of tokens to the token stack. - */ - - - pushTokens(tokens) { - this.stack.push(...tokens); - } - /** - * Find an macro argument without expanding tokens and append the array of - * tokens to the token stack. Uses Token as a container for the result. - */ - - - scanArgument(isOptional) { - var start; - var end; - var tokens; - - if (isOptional) { - this.consumeSpaces(); // \@ifnextchar gobbles any space following it - - if (this.future().text !== "[") { - return null; - } - - start = this.popToken(); // don't include [ in tokens - - ({ - tokens, - end - } = this.consumeArg(["]"])); - } else { - ({ - tokens, - start, - end - } = this.consumeArg()); - } // indicate the end of an argument - - - this.pushToken(new Token("EOF", end.loc)); - this.pushTokens(tokens); - return start.range(end, ""); - } - /** - * Consume all following space tokens, without expansion. - */ - - - consumeSpaces() { - for (;;) { - var token = this.future(); - - if (token.text === " ") { - this.stack.pop(); - } else { - break; - } - } - } - /** - * Consume an argument from the token stream, and return the resulting array - * of tokens and start/end token. - */ - - - consumeArg(delims) { - // The argument for a delimited parameter is the shortest (possibly - // empty) sequence of tokens with properly nested {...} groups that is - // followed ... by this particular list of non-parameter tokens. - // The argument for an undelimited parameter is the next nonblank - // token, unless that token is ‘{’, when the argument will be the - // entire {...} group that follows. - var tokens = []; - var isDelimited = delims && delims.length > 0; - - if (!isDelimited) { - // Ignore spaces between arguments. As the TeXbook says: - // "After you have said ‘\def\row#1#2{...}’, you are allowed to - // put spaces between the arguments (e.g., ‘\row x n’), because - // TeX doesn’t use single spaces as undelimited arguments." - this.consumeSpaces(); - } - - var start = this.future(); - var tok; - var depth = 0; - var match = 0; - - do { - tok = this.popToken(); - tokens.push(tok); - - if (tok.text === "{") { - ++depth; - } else if (tok.text === "}") { - --depth; - - if (depth === -1) { - throw new ParseError("Extra }", tok); - } - } else if (tok.text === "EOF") { - throw new ParseError("Unexpected end of input in a macro argument" + ", expected '" + (delims && isDelimited ? delims[match] : "}") + "'", tok); - } - - if (delims && isDelimited) { - if ((depth === 0 || depth === 1 && delims[match] === "{") && tok.text === delims[match]) { - ++match; - - if (match === delims.length) { - // don't include delims in tokens - tokens.splice(-match, match); - break; - } - } else { - match = 0; - } - } - } while (depth !== 0 || isDelimited); // If the argument found ... has the form ‘{}’, - // ... the outermost braces enclosing the argument are removed - - - if (start.text === "{" && tokens[tokens.length - 1].text === "}") { - tokens.pop(); - tokens.shift(); - } - - tokens.reverse(); // to fit in with stack order - - return { - tokens, - start, - end: tok - }; - } - /** - * Consume the specified number of (delimited) arguments from the token - * stream and return the resulting array of arguments. - */ - - - consumeArgs(numArgs, delimiters) { - if (delimiters) { - if (delimiters.length !== numArgs + 1) { - throw new ParseError("The length of delimiters doesn't match the number of args!"); - } - - var delims = delimiters[0]; - - for (var i = 0; i < delims.length; i++) { - var tok = this.popToken(); - - if (delims[i] !== tok.text) { - throw new ParseError("Use of the macro doesn't match its definition", tok); - } - } - } - - var args = []; - - for (var _i = 0; _i < numArgs; _i++) { - args.push(this.consumeArg(delimiters && delimiters[_i + 1]).tokens); - } - - return args; - } - /** - * Increment `expansionCount` by the specified amount. - * Throw an error if it exceeds `maxExpand`. - */ - - - countExpansion(amount) { - this.expansionCount += amount; - - if (this.expansionCount > this.settings.maxExpand) { - throw new ParseError("Too many expansions: infinite loop or " + "need to increase maxExpand setting"); - } - } - /** - * Expand the next token only once if possible. - * - * If the token is expanded, the resulting tokens will be pushed onto - * the stack in reverse order, and the number of such tokens will be - * returned. This number might be zero or positive. - * - * If not, the return value is `false`, and the next token remains at the - * top of the stack. - * - * In either case, the next token will be on the top of the stack, - * or the stack will be empty (in case of empty expansion - * and no other tokens). - * - * Used to implement `expandAfterFuture` and `expandNextToken`. - * - * If expandableOnly, only expandable tokens are expanded and - * an undefined control sequence results in an error. - */ - - - expandOnce(expandableOnly) { - var topToken = this.popToken(); - var name = topToken.text; - var expansion = !topToken.noexpand ? this._getExpansion(name) : null; - - if (expansion == null || expandableOnly && expansion.unexpandable) { - if (expandableOnly && expansion == null && name[0] === "\\" && !this.isDefined(name)) { - throw new ParseError("Undefined control sequence: " + name); - } - - this.pushToken(topToken); - return false; - } - - this.countExpansion(1); - var tokens = expansion.tokens; - var args = this.consumeArgs(expansion.numArgs, expansion.delimiters); - - if (expansion.numArgs) { - // paste arguments in place of the placeholders - tokens = tokens.slice(); // make a shallow copy - - for (var i = tokens.length - 1; i >= 0; --i) { - var tok = tokens[i]; - - if (tok.text === "#") { - if (i === 0) { - throw new ParseError("Incomplete placeholder at end of macro body", tok); - } - - tok = tokens[--i]; // next token on stack - - if (tok.text === "#") { - // ## → # - tokens.splice(i + 1, 1); // drop first # - } else if (/^[1-9]$/.test(tok.text)) { - // replace the placeholder with the indicated argument - tokens.splice(i, 2, ...args[+tok.text - 1]); - } else { - throw new ParseError("Not a valid argument number", tok); - } - } - } - } // Concatenate expansion onto top of stack. - - - this.pushTokens(tokens); - return tokens.length; - } - /** - * Expand the next token only once (if possible), and return the resulting - * top token on the stack (without removing anything from the stack). - * Similar in behavior to TeX's `\expandafter\futurelet`. - * Equivalent to expandOnce() followed by future(). - */ - - - expandAfterFuture() { - this.expandOnce(); - return this.future(); - } - /** - * Recursively expand first token, then return first non-expandable token. - */ - - - expandNextToken() { - for (;;) { - if (this.expandOnce() === false) { - // fully expanded - var token = this.stack.pop(); // the token after \noexpand is interpreted as if its meaning - // were ‘\relax’ - - if (token.treatAsRelax) { - token.text = "\\relax"; - } - - return token; - } - } // Flow unable to figure out that this pathway is impossible. - // https://github.com/facebook/flow/issues/4808 - - - throw new Error(); // eslint-disable-line no-unreachable - } - /** - * Fully expand the given macro name and return the resulting list of - * tokens, or return `undefined` if no such macro is defined. - */ - - - expandMacro(name) { - return this.macros.has(name) ? this.expandTokens([new Token(name)]) : undefined; - } - /** - * Fully expand the given token stream and return the resulting list of - * tokens. Note that the input tokens are in reverse order, but the - * output tokens are in forward order. - */ - - - expandTokens(tokens) { - var output = []; - var oldStackLength = this.stack.length; - this.pushTokens(tokens); - - while (this.stack.length > oldStackLength) { - // Expand only expandable tokens - if (this.expandOnce(true) === false) { - // fully expanded - var token = this.stack.pop(); - - if (token.treatAsRelax) { - // the expansion of \noexpand is the token itself - token.noexpand = false; - token.treatAsRelax = false; - } - - output.push(token); - } - } // Count all of these tokens as additional expansions, to prevent - // exponential blowup from linearly many \edef's. - - - this.countExpansion(output.length); - return output; - } - /** - * Fully expand the given macro name and return the result as a string, - * or return `undefined` if no such macro is defined. - */ - - - expandMacroAsText(name) { - var tokens = this.expandMacro(name); - - if (tokens) { - return tokens.map(token => token.text).join(""); - } else { - return tokens; - } - } - /** - * Returns the expanded macro as a reversed array of tokens and a macro - * argument count. Or returns `null` if no such macro. - */ - - - _getExpansion(name) { - var definition = this.macros.get(name); - - if (definition == null) { - // mainly checking for undefined here - return definition; - } // If a single character has an associated catcode other than 13 - // (active character), then don't expand it. - - - if (name.length === 1) { - var catcode = this.lexer.catcodes[name]; - - if (catcode != null && catcode !== 13) { - return; - } - } - - var expansion = typeof definition === "function" ? definition(this) : definition; - - if (typeof expansion === "string") { - var numArgs = 0; - - if (expansion.indexOf("#") !== -1) { - var stripped = expansion.replace(/##/g, ""); - - while (stripped.indexOf("#" + (numArgs + 1)) !== -1) { - ++numArgs; - } - } - - var bodyLexer = new Lexer(expansion, this.settings); - var tokens = []; - var tok = bodyLexer.lex(); - - while (tok.text !== "EOF") { - tokens.push(tok); - tok = bodyLexer.lex(); - } - - tokens.reverse(); // to fit in with stack using push and pop - - var expanded = { - tokens, - numArgs - }; - return expanded; - } - - return expansion; - } - /** - * Determine whether a command is currently "defined" (has some - * functionality), meaning that it's a macro (in the current group), - * a function, a symbol, or one of the special commands listed in - * `implicitCommands`. - */ - - - isDefined(name) { - return this.macros.has(name) || functions.hasOwnProperty(name) || symbols.math.hasOwnProperty(name) || symbols.text.hasOwnProperty(name) || implicitCommands.hasOwnProperty(name); - } - /** - * Determine whether a command is expandable. - */ - - - isExpandable(name) { - var macro = this.macros.get(name); - return macro != null ? typeof macro === "string" || typeof macro === "function" || !macro.unexpandable : functions.hasOwnProperty(name) && !functions[name].primitive; - } - -} - -// Helpers for Parser.js handling of Unicode (sub|super)script characters. -var unicodeSubRegEx = /^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/; -var uSubsAndSups = Object.freeze({ - '₊': '+', - '₋': '-', - '₌': '=', - '₍': '(', - '₎': ')', - '₀': '0', - '₁': '1', - '₂': '2', - '₃': '3', - '₄': '4', - '₅': '5', - '₆': '6', - '₇': '7', - '₈': '8', - '₉': '9', - '\u2090': 'a', - '\u2091': 'e', - '\u2095': 'h', - '\u1D62': 'i', - '\u2C7C': 'j', - '\u2096': 'k', - '\u2097': 'l', - '\u2098': 'm', - '\u2099': 'n', - '\u2092': 'o', - '\u209A': 'p', - '\u1D63': 'r', - '\u209B': 's', - '\u209C': 't', - '\u1D64': 'u', - '\u1D65': 'v', - '\u2093': 'x', - '\u1D66': 'β', - '\u1D67': 'γ', - '\u1D68': 'ρ', - '\u1D69': '\u03d5', - '\u1D6A': 'χ', - '⁺': '+', - '⁻': '-', - '⁼': '=', - '⁽': '(', - '⁾': ')', - '⁰': '0', - '¹': '1', - '²': '2', - '³': '3', - '⁴': '4', - '⁵': '5', - '⁶': '6', - '⁷': '7', - '⁸': '8', - '⁹': '9', - '\u1D2C': 'A', - '\u1D2E': 'B', - '\u1D30': 'D', - '\u1D31': 'E', - '\u1D33': 'G', - '\u1D34': 'H', - '\u1D35': 'I', - '\u1D36': 'J', - '\u1D37': 'K', - '\u1D38': 'L', - '\u1D39': 'M', - '\u1D3A': 'N', - '\u1D3C': 'O', - '\u1D3E': 'P', - '\u1D3F': 'R', - '\u1D40': 'T', - '\u1D41': 'U', - '\u2C7D': 'V', - '\u1D42': 'W', - '\u1D43': 'a', - '\u1D47': 'b', - '\u1D9C': 'c', - '\u1D48': 'd', - '\u1D49': 'e', - '\u1DA0': 'f', - '\u1D4D': 'g', - '\u02B0': 'h', - '\u2071': 'i', - '\u02B2': 'j', - '\u1D4F': 'k', - '\u02E1': 'l', - '\u1D50': 'm', - '\u207F': 'n', - '\u1D52': 'o', - '\u1D56': 'p', - '\u02B3': 'r', - '\u02E2': 's', - '\u1D57': 't', - '\u1D58': 'u', - '\u1D5B': 'v', - '\u02B7': 'w', - '\u02E3': 'x', - '\u02B8': 'y', - '\u1DBB': 'z', - '\u1D5D': 'β', - '\u1D5E': 'γ', - '\u1D5F': 'δ', - '\u1D60': '\u03d5', - '\u1D61': 'χ', - '\u1DBF': 'θ' -}); - -/* eslint no-constant-condition:0 */ - -var unicodeAccents = { - "́": { - "text": "\\'", - "math": "\\acute" - }, - "̀": { - "text": "\\`", - "math": "\\grave" - }, - "̈": { - "text": "\\\"", - "math": "\\ddot" - }, - "̃": { - "text": "\\~", - "math": "\\tilde" - }, - "̄": { - "text": "\\=", - "math": "\\bar" - }, - "̆": { - "text": "\\u", - "math": "\\breve" - }, - "̌": { - "text": "\\v", - "math": "\\check" - }, - "̂": { - "text": "\\^", - "math": "\\hat" - }, - "̇": { - "text": "\\.", - "math": "\\dot" - }, - "̊": { - "text": "\\r", - "math": "\\mathring" - }, - "̋": { - "text": "\\H" - }, - "̧": { - "text": "\\c" - } -}; -var unicodeSymbols = { - "á": "á", - "à": "à", - "ä": "ä", - "ǟ": "ǟ", - "ã": "ã", - "ā": "ā", - "ă": "ă", - "ắ": "ắ", - "ằ": "ằ", - "ẵ": "ẵ", - "ǎ": "ǎ", - "â": "â", - "ấ": "ấ", - "ầ": "ầ", - "ẫ": "ẫ", - "ȧ": "ȧ", - "ǡ": "ǡ", - "å": "å", - "ǻ": "ǻ", - "ḃ": "ḃ", - "ć": "ć", - "ḉ": "ḉ", - "č": "č", - "ĉ": "ĉ", - "ċ": "ċ", - "ç": "ç", - "ď": "ď", - "ḋ": "ḋ", - "ḑ": "ḑ", - "é": "é", - "è": "è", - "ë": "ë", - "ẽ": "ẽ", - "ē": "ē", - "ḗ": "ḗ", - "ḕ": "ḕ", - "ĕ": "ĕ", - "ḝ": "ḝ", - "ě": "ě", - "ê": "ê", - "ế": "ế", - "ề": "ề", - "ễ": "ễ", - "ė": "ė", - "ȩ": "ȩ", - "ḟ": "ḟ", - "ǵ": "ǵ", - "ḡ": "ḡ", - "ğ": "ğ", - "ǧ": "ǧ", - "ĝ": "ĝ", - "ġ": "ġ", - "ģ": "ģ", - "ḧ": "ḧ", - "ȟ": "ȟ", - "ĥ": "ĥ", - "ḣ": "ḣ", - "ḩ": "ḩ", - "í": "í", - "ì": "ì", - "ï": "ï", - "ḯ": "ḯ", - "ĩ": "ĩ", - "ī": "ī", - "ĭ": "ĭ", - "ǐ": "ǐ", - "î": "î", - "ǰ": "ǰ", - "ĵ": "ĵ", - "ḱ": "ḱ", - "ǩ": "ǩ", - "ķ": "ķ", - "ĺ": "ĺ", - "ľ": "ľ", - "ļ": "ļ", - "ḿ": "ḿ", - "ṁ": "ṁ", - "ń": "ń", - "ǹ": "ǹ", - "ñ": "ñ", - "ň": "ň", - "ṅ": "ṅ", - "ņ": "ņ", - "ó": "ó", - "ò": "ò", - "ö": "ö", - "ȫ": "ȫ", - "õ": "õ", - "ṍ": "ṍ", - "ṏ": "ṏ", - "ȭ": "ȭ", - "ō": "ō", - "ṓ": "ṓ", - "ṑ": "ṑ", - "ŏ": "ŏ", - "ǒ": "ǒ", - "ô": "ô", - "ố": "ố", - "ồ": "ồ", - "ỗ": "ỗ", - "ȯ": "ȯ", - "ȱ": "ȱ", - "ő": "ő", - "ṕ": "ṕ", - "ṗ": "ṗ", - "ŕ": "ŕ", - "ř": "ř", - "ṙ": "ṙ", - "ŗ": "ŗ", - "ś": "ś", - "ṥ": "ṥ", - "š": "š", - "ṧ": "ṧ", - "ŝ": "ŝ", - "ṡ": "ṡ", - "ş": "ş", - "ẗ": "ẗ", - "ť": "ť", - "ṫ": "ṫ", - "ţ": "ţ", - "ú": "ú", - "ù": "ù", - "ü": "ü", - "ǘ": "ǘ", - "ǜ": "ǜ", - "ǖ": "ǖ", - "ǚ": "ǚ", - "ũ": "ũ", - "ṹ": "ṹ", - "ū": "ū", - "ṻ": "ṻ", - "ŭ": "ŭ", - "ǔ": "ǔ", - "û": "û", - "ů": "ů", - "ű": "ű", - "ṽ": "ṽ", - "ẃ": "ẃ", - "ẁ": "ẁ", - "ẅ": "ẅ", - "ŵ": "ŵ", - "ẇ": "ẇ", - "ẘ": "ẘ", - "ẍ": "ẍ", - "ẋ": "ẋ", - "ý": "ý", - "ỳ": "ỳ", - "ÿ": "ÿ", - "ỹ": "ỹ", - "ȳ": "ȳ", - "ŷ": "ŷ", - "ẏ": "ẏ", - "ẙ": "ẙ", - "ź": "ź", - "ž": "ž", - "ẑ": "ẑ", - "ż": "ż", - "Á": "Á", - "À": "À", - "Ä": "Ä", - "Ǟ": "Ǟ", - "Ã": "Ã", - "Ā": "Ā", - "Ă": "Ă", - "Ắ": "Ắ", - "Ằ": "Ằ", - "Ẵ": "Ẵ", - "Ǎ": "Ǎ", - "Â": "Â", - "Ấ": "Ấ", - "Ầ": "Ầ", - "Ẫ": "Ẫ", - "Ȧ": "Ȧ", - "Ǡ": "Ǡ", - "Å": "Å", - "Ǻ": "Ǻ", - "Ḃ": "Ḃ", - "Ć": "Ć", - "Ḉ": "Ḉ", - "Č": "Č", - "Ĉ": "Ĉ", - "Ċ": "Ċ", - "Ç": "Ç", - "Ď": "Ď", - "Ḋ": "Ḋ", - "Ḑ": "Ḑ", - "É": "É", - "È": "È", - "Ë": "Ë", - "Ẽ": "Ẽ", - "Ē": "Ē", - "Ḗ": "Ḗ", - "Ḕ": "Ḕ", - "Ĕ": "Ĕ", - "Ḝ": "Ḝ", - "Ě": "Ě", - "Ê": "Ê", - "Ế": "Ế", - "Ề": "Ề", - "Ễ": "Ễ", - "Ė": "Ė", - "Ȩ": "Ȩ", - "Ḟ": "Ḟ", - "Ǵ": "Ǵ", - "Ḡ": "Ḡ", - "Ğ": "Ğ", - "Ǧ": "Ǧ", - "Ĝ": "Ĝ", - "Ġ": "Ġ", - "Ģ": "Ģ", - "Ḧ": "Ḧ", - "Ȟ": "Ȟ", - "Ĥ": "Ĥ", - "Ḣ": "Ḣ", - "Ḩ": "Ḩ", - "Í": "Í", - "Ì": "Ì", - "Ï": "Ï", - "Ḯ": "Ḯ", - "Ĩ": "Ĩ", - "Ī": "Ī", - "Ĭ": "Ĭ", - "Ǐ": "Ǐ", - "Î": "Î", - "İ": "İ", - "Ĵ": "Ĵ", - "Ḱ": "Ḱ", - "Ǩ": "Ǩ", - "Ķ": "Ķ", - "Ĺ": "Ĺ", - "Ľ": "Ľ", - "Ļ": "Ļ", - "Ḿ": "Ḿ", - "Ṁ": "Ṁ", - "Ń": "Ń", - "Ǹ": "Ǹ", - "Ñ": "Ñ", - "Ň": "Ň", - "Ṅ": "Ṅ", - "Ņ": "Ņ", - "Ó": "Ó", - "Ò": "Ò", - "Ö": "Ö", - "Ȫ": "Ȫ", - "Õ": "Õ", - "Ṍ": "Ṍ", - "Ṏ": "Ṏ", - "Ȭ": "Ȭ", - "Ō": "Ō", - "Ṓ": "Ṓ", - "Ṑ": "Ṑ", - "Ŏ": "Ŏ", - "Ǒ": "Ǒ", - "Ô": "Ô", - "Ố": "Ố", - "Ồ": "Ồ", - "Ỗ": "Ỗ", - "Ȯ": "Ȯ", - "Ȱ": "Ȱ", - "Ő": "Ő", - "Ṕ": "Ṕ", - "Ṗ": "Ṗ", - "Ŕ": "Ŕ", - "Ř": "Ř", - "Ṙ": "Ṙ", - "Ŗ": "Ŗ", - "Ś": "Ś", - "Ṥ": "Ṥ", - "Š": "Š", - "Ṧ": "Ṧ", - "Ŝ": "Ŝ", - "Ṡ": "Ṡ", - "Ş": "Ş", - "Ť": "Ť", - "Ṫ": "Ṫ", - "Ţ": "Ţ", - "Ú": "Ú", - "Ù": "Ù", - "Ü": "Ü", - "Ǘ": "Ǘ", - "Ǜ": "Ǜ", - "Ǖ": "Ǖ", - "Ǚ": "Ǚ", - "Ũ": "Ũ", - "Ṹ": "Ṹ", - "Ū": "Ū", - "Ṻ": "Ṻ", - "Ŭ": "Ŭ", - "Ǔ": "Ǔ", - "Û": "Û", - "Ů": "Ů", - "Ű": "Ű", - "Ṽ": "Ṽ", - "Ẃ": "Ẃ", - "Ẁ": "Ẁ", - "Ẅ": "Ẅ", - "Ŵ": "Ŵ", - "Ẇ": "Ẇ", - "Ẍ": "Ẍ", - "Ẋ": "Ẋ", - "Ý": "Ý", - "Ỳ": "Ỳ", - "Ÿ": "Ÿ", - "Ỹ": "Ỹ", - "Ȳ": "Ȳ", - "Ŷ": "Ŷ", - "Ẏ": "Ẏ", - "Ź": "Ź", - "Ž": "Ž", - "Ẑ": "Ẑ", - "Ż": "Ż", - "ά": "ά", - "ὰ": "ὰ", - "ᾱ": "ᾱ", - "ᾰ": "ᾰ", - "έ": "έ", - "ὲ": "ὲ", - "ή": "ή", - "ὴ": "ὴ", - "ί": "ί", - "ὶ": "ὶ", - "ϊ": "ϊ", - "ΐ": "ΐ", - "ῒ": "ῒ", - "ῑ": "ῑ", - "ῐ": "ῐ", - "ό": "ό", - "ὸ": "ὸ", - "ύ": "ύ", - "ὺ": "ὺ", - "ϋ": "ϋ", - "ΰ": "ΰ", - "ῢ": "ῢ", - "ῡ": "ῡ", - "ῠ": "ῠ", - "ώ": "ώ", - "ὼ": "ὼ", - "Ύ": "Ύ", - "Ὺ": "Ὺ", - "Ϋ": "Ϋ", - "Ῡ": "Ῡ", - "Ῠ": "Ῠ", - "Ώ": "Ώ", - "Ὼ": "Ὼ" -}; - -/** - * This file contains the parser used to parse out a TeX expression from the - * input. Since TeX isn't context-free, standard parsers don't work particularly - * well. - * - * The strategy of this parser is as such: - * - * The main functions (the `.parse...` ones) take a position in the current - * parse string to parse tokens from. The lexer (found in Lexer.js, stored at - * this.gullet.lexer) also supports pulling out tokens at arbitrary places. When - * individual tokens are needed at a position, the lexer is called to pull out a - * token, which is then used. - * - * The parser has a property called "mode" indicating the mode that - * the parser is currently in. Currently it has to be one of "math" or - * "text", which denotes whether the current environment is a math-y - * one or a text-y one (e.g. inside \text). Currently, this serves to - * limit the functions which can be used in text mode. - * - * The main functions then return an object which contains the useful data that - * was parsed at its given point, and a new position at the end of the parsed - * data. The main functions can call each other and continue the parsing by - * using the returned position as a new starting point. - * - * There are also extra `.handle...` functions, which pull out some reused - * functionality into self-contained functions. - * - * The functions return ParseNodes. - */ -class Parser { - constructor(input, settings) { - this.mode = void 0; - this.gullet = void 0; - this.settings = void 0; - this.leftrightDepth = void 0; - this.nextToken = void 0; - // Start in math mode - this.mode = "math"; // Create a new macro expander (gullet) and (indirectly via that) also a - // new lexer (mouth) for this parser (stomach, in the language of TeX) - - this.gullet = new MacroExpander(input, settings, this.mode); // Store the settings for use in parsing - - this.settings = settings; // Count leftright depth (for \middle errors) - - this.leftrightDepth = 0; - } - /** - * Checks a result to make sure it has the right type, and throws an - * appropriate error otherwise. - */ - - - expect(text, consume) { - if (consume === void 0) { - consume = true; - } - - if (this.fetch().text !== text) { - throw new ParseError("Expected '" + text + "', got '" + this.fetch().text + "'", this.fetch()); - } - - if (consume) { - this.consume(); - } - } - /** - * Discards the current lookahead token, considering it consumed. - */ - - - consume() { - this.nextToken = null; - } - /** - * Return the current lookahead token, or if there isn't one (at the - * beginning, or if the previous lookahead token was consume()d), - * fetch the next token as the new lookahead token and return it. - */ - - - fetch() { - if (this.nextToken == null) { - this.nextToken = this.gullet.expandNextToken(); - } - - return this.nextToken; - } - /** - * Switches between "text" and "math" modes. - */ - - - switchMode(newMode) { - this.mode = newMode; - this.gullet.switchMode(newMode); - } - /** - * Main parsing function, which parses an entire input. - */ - - - parse() { - if (!this.settings.globalGroup) { - // Create a group namespace for the math expression. - // (LaTeX creates a new group for every $...$, $$...$$, \[...\].) - this.gullet.beginGroup(); - } // Use old \color behavior (same as LaTeX's \textcolor) if requested. - // We do this within the group for the math expression, so it doesn't - // pollute settings.macros. - - - if (this.settings.colorIsTextColor) { - this.gullet.macros.set("\\color", "\\textcolor"); - } - - try { - // Try to parse the input - var parse = this.parseExpression(false); // If we succeeded, make sure there's an EOF at the end - - this.expect("EOF"); // End the group namespace for the expression - - if (!this.settings.globalGroup) { - this.gullet.endGroup(); - } - - return parse; // Close any leftover groups in case of a parse error. - } finally { - this.gullet.endGroups(); - } - } - /** - * Fully parse a separate sequence of tokens as a separate job. - * Tokens should be specified in reverse order, as in a MacroDefinition. - */ - - - subparse(tokens) { - // Save the next token from the current job. - var oldToken = this.nextToken; - this.consume(); // Run the new job, terminating it with an excess '}' - - this.gullet.pushToken(new Token("}")); - this.gullet.pushTokens(tokens); - var parse = this.parseExpression(false); - this.expect("}"); // Restore the next token from the current job. - - this.nextToken = oldToken; - return parse; - } - - /** - * Parses an "expression", which is a list of atoms. - * - * `breakOnInfix`: Should the parsing stop when we hit infix nodes? This - * happens when functions have higher precedence han infix - * nodes in implicit parses. - * - * `breakOnTokenText`: The text of the token that the expression should end - * with, or `null` if something else should end the - * expression. - */ - parseExpression(breakOnInfix, breakOnTokenText) { - var body = []; // Keep adding atoms to the body until we can't parse any more atoms (either - // we reached the end, a }, or a \right) - - while (true) { - // Ignore spaces in math mode - if (this.mode === "math") { - this.consumeSpaces(); - } - - var lex = this.fetch(); - - if (Parser.endOfExpression.indexOf(lex.text) !== -1) { - break; - } - - if (breakOnTokenText && lex.text === breakOnTokenText) { - break; - } - - if (breakOnInfix && functions[lex.text] && functions[lex.text].infix) { - break; - } - - var atom = this.parseAtom(breakOnTokenText); - - if (!atom) { - break; - } else if (atom.type === "internal") { - continue; - } - - body.push(atom); - } - - if (this.mode === "text") { - this.formLigatures(body); - } - - return this.handleInfixNodes(body); - } - /** - * Rewrites infix operators such as \over with corresponding commands such - * as \frac. - * - * There can only be one infix operator per group. If there's more than one - * then the expression is ambiguous. This can be resolved by adding {}. - */ - - - handleInfixNodes(body) { - var overIndex = -1; - var funcName; - - for (var i = 0; i < body.length; i++) { - if (body[i].type === "infix") { - if (overIndex !== -1) { - throw new ParseError("only one infix operator per group", body[i].token); - } - - overIndex = i; - funcName = body[i].replaceWith; - } - } - - if (overIndex !== -1 && funcName) { - var numerNode; - var denomNode; - var numerBody = body.slice(0, overIndex); - var denomBody = body.slice(overIndex + 1); - - if (numerBody.length === 1 && numerBody[0].type === "ordgroup") { - numerNode = numerBody[0]; - } else { - numerNode = { - type: "ordgroup", - mode: this.mode, - body: numerBody - }; - } - - if (denomBody.length === 1 && denomBody[0].type === "ordgroup") { - denomNode = denomBody[0]; - } else { - denomNode = { - type: "ordgroup", - mode: this.mode, - body: denomBody - }; - } - - var node; - - if (funcName === "\\\\abovefrac") { - node = this.callFunction(funcName, [numerNode, body[overIndex], denomNode], []); - } else { - node = this.callFunction(funcName, [numerNode, denomNode], []); - } - - return [node]; - } else { - return body; - } - } - /** - * Handle a subscript or superscript with nice errors. - */ - - - handleSupSubscript(name // For error reporting. - ) { - var symbolToken = this.fetch(); - var symbol = symbolToken.text; - this.consume(); - this.consumeSpaces(); // ignore spaces before sup/subscript argument - - var group = this.parseGroup(name); - - if (!group) { - throw new ParseError("Expected group after '" + symbol + "'", symbolToken); - } - - return group; - } - /** - * Converts the textual input of an unsupported command into a text node - * contained within a color node whose color is determined by errorColor - */ - - - formatUnsupportedCmd(text) { - var textordArray = []; - - for (var i = 0; i < text.length; i++) { - textordArray.push({ - type: "textord", - mode: "text", - text: text[i] - }); - } - - var textNode = { - type: "text", - mode: this.mode, - body: textordArray - }; - var colorNode = { - type: "color", - mode: this.mode, - color: this.settings.errorColor, - body: [textNode] - }; - return colorNode; - } - /** - * Parses a group with optional super/subscripts. - */ - - - parseAtom(breakOnTokenText) { - // The body of an atom is an implicit group, so that things like - // \left(x\right)^2 work correctly. - var base = this.parseGroup("atom", breakOnTokenText); // In text mode, we don't have superscripts or subscripts - - if (this.mode === "text") { - return base; - } // Note that base may be empty (i.e. null) at this point. - - - var superscript; - var subscript; - - while (true) { - // Guaranteed in math mode, so eat any spaces first. - this.consumeSpaces(); // Lex the first token - - var lex = this.fetch(); - - if (lex.text === "\\limits" || lex.text === "\\nolimits") { - // We got a limit control - if (base && base.type === "op") { - var limits = lex.text === "\\limits"; - base.limits = limits; - base.alwaysHandleSupSub = true; - } else if (base && base.type === "operatorname") { - if (base.alwaysHandleSupSub) { - base.limits = lex.text === "\\limits"; - } - } else { - throw new ParseError("Limit controls must follow a math operator", lex); - } - - this.consume(); - } else if (lex.text === "^") { - // We got a superscript start - if (superscript) { - throw new ParseError("Double superscript", lex); - } - - superscript = this.handleSupSubscript("superscript"); - } else if (lex.text === "_") { - // We got a subscript start - if (subscript) { - throw new ParseError("Double subscript", lex); - } - - subscript = this.handleSupSubscript("subscript"); - } else if (lex.text === "'") { - // We got a prime - if (superscript) { - throw new ParseError("Double superscript", lex); - } - - var prime = { - type: "textord", - mode: this.mode, - text: "\\prime" - }; // Many primes can be grouped together, so we handle this here - - var primes = [prime]; - this.consume(); // Keep lexing tokens until we get something that's not a prime - - while (this.fetch().text === "'") { - // For each one, add another prime to the list - primes.push(prime); - this.consume(); - } // If there's a superscript following the primes, combine that - // superscript in with the primes. - - - if (this.fetch().text === "^") { - primes.push(this.handleSupSubscript("superscript")); - } // Put everything into an ordgroup as the superscript - - - superscript = { - type: "ordgroup", - mode: this.mode, - body: primes - }; - } else if (uSubsAndSups[lex.text]) { - // A Unicode subscript or superscript character. - // We treat these similarly to the unicode-math package. - // So we render a string of Unicode (sub|super)scripts the - // same as a (sub|super)script of regular characters. - var isSub = unicodeSubRegEx.test(lex.text); - var subsupTokens = []; - subsupTokens.push(new Token(uSubsAndSups[lex.text])); - this.consume(); // Continue fetching tokens to fill out the string. - - while (true) { - var token = this.fetch().text; - - if (!uSubsAndSups[token]) { - break; - } - - if (unicodeSubRegEx.test(token) !== isSub) { - break; - } - - subsupTokens.unshift(new Token(uSubsAndSups[token])); - this.consume(); - } // Now create a (sub|super)script. - - - var body = this.subparse(subsupTokens); - - if (isSub) { - subscript = { - type: "ordgroup", - mode: "math", - body - }; - } else { - superscript = { - type: "ordgroup", - mode: "math", - body - }; - } - } else { - // If it wasn't ^, _, or ', stop parsing super/subscripts - break; - } - } // Base must be set if superscript or subscript are set per logic above, - // but need to check here for type check to pass. - - - if (superscript || subscript) { - // If we got either a superscript or subscript, create a supsub - return { - type: "supsub", - mode: this.mode, - base: base, - sup: superscript, - sub: subscript - }; - } else { - // Otherwise return the original body - return base; - } - } - /** - * Parses an entire function, including its base and all of its arguments. - */ - - - parseFunction(breakOnTokenText, name // For determining its context - ) { - var token = this.fetch(); - var func = token.text; - var funcData = functions[func]; - - if (!funcData) { - return null; - } - - this.consume(); // consume command token - - if (name && name !== "atom" && !funcData.allowedInArgument) { - throw new ParseError("Got function '" + func + "' with no arguments" + (name ? " as " + name : ""), token); - } else if (this.mode === "text" && !funcData.allowedInText) { - throw new ParseError("Can't use function '" + func + "' in text mode", token); - } else if (this.mode === "math" && funcData.allowedInMath === false) { - throw new ParseError("Can't use function '" + func + "' in math mode", token); - } - - var { - args, - optArgs - } = this.parseArguments(func, funcData); - return this.callFunction(func, args, optArgs, token, breakOnTokenText); - } - /** - * Call a function handler with a suitable context and arguments. - */ - - - callFunction(name, args, optArgs, token, breakOnTokenText) { - var context = { - funcName: name, - parser: this, - token, - breakOnTokenText - }; - var func = functions[name]; - - if (func && func.handler) { - return func.handler(context, args, optArgs); - } else { - throw new ParseError("No function handler for " + name); - } - } - /** - * Parses the arguments of a function or environment - */ - - - parseArguments(func, // Should look like "\name" or "\begin{name}". - funcData) { - var totalArgs = funcData.numArgs + funcData.numOptionalArgs; - - if (totalArgs === 0) { - return { - args: [], - optArgs: [] - }; - } - - var args = []; - var optArgs = []; - - for (var i = 0; i < totalArgs; i++) { - var argType = funcData.argTypes && funcData.argTypes[i]; - var isOptional = i < funcData.numOptionalArgs; - - if (funcData.primitive && argType == null || // \sqrt expands into primitive if optional argument doesn't exist - funcData.type === "sqrt" && i === 1 && optArgs[0] == null) { - argType = "primitive"; - } - - var arg = this.parseGroupOfType("argument to '" + func + "'", argType, isOptional); - - if (isOptional) { - optArgs.push(arg); - } else if (arg != null) { - args.push(arg); - } else { - // should be unreachable - throw new ParseError("Null argument, please report this as a bug"); - } - } - - return { - args, - optArgs - }; - } - /** - * Parses a group when the mode is changing. - */ - - - parseGroupOfType(name, type, optional) { - switch (type) { - case "color": - return this.parseColorGroup(optional); - - case "size": - return this.parseSizeGroup(optional); - - case "url": - return this.parseUrlGroup(optional); - - case "math": - case "text": - return this.parseArgumentGroup(optional, type); - - case "hbox": - { - // hbox argument type wraps the argument in the equivalent of - // \hbox, which is like \text but switching to \textstyle size. - var group = this.parseArgumentGroup(optional, "text"); - return group != null ? { - type: "styling", - mode: group.mode, - body: [group], - style: "text" // simulate \textstyle - - } : null; - } - - case "raw": - { - var token = this.parseStringGroup("raw", optional); - return token != null ? { - type: "raw", - mode: "text", - string: token.text - } : null; - } - - case "primitive": - { - if (optional) { - throw new ParseError("A primitive argument cannot be optional"); - } - - var _group = this.parseGroup(name); - - if (_group == null) { - throw new ParseError("Expected group as " + name, this.fetch()); - } - - return _group; - } - - case "original": - case null: - case undefined: - return this.parseArgumentGroup(optional); - - default: - throw new ParseError("Unknown group type as " + name, this.fetch()); - } - } - /** - * Discard any space tokens, fetching the next non-space token. - */ - - - consumeSpaces() { - while (this.fetch().text === " ") { - this.consume(); - } - } - /** - * Parses a group, essentially returning the string formed by the - * brace-enclosed tokens plus some position information. - */ - - - parseStringGroup(modeName, // Used to describe the mode in error messages. - optional) { - var argToken = this.gullet.scanArgument(optional); - - if (argToken == null) { - return null; - } - - var str = ""; - var nextToken; - - while ((nextToken = this.fetch()).text !== "EOF") { - str += nextToken.text; - this.consume(); - } - - this.consume(); // consume the end of the argument - - argToken.text = str; - return argToken; - } - /** - * Parses a regex-delimited group: the largest sequence of tokens - * whose concatenated strings match `regex`. Returns the string - * formed by the tokens plus some position information. - */ - - - parseRegexGroup(regex, modeName // Used to describe the mode in error messages. - ) { - var firstToken = this.fetch(); - var lastToken = firstToken; - var str = ""; - var nextToken; - - while ((nextToken = this.fetch()).text !== "EOF" && regex.test(str + nextToken.text)) { - lastToken = nextToken; - str += lastToken.text; - this.consume(); - } - - if (str === "") { - throw new ParseError("Invalid " + modeName + ": '" + firstToken.text + "'", firstToken); - } - - return firstToken.range(lastToken, str); - } - /** - * Parses a color description. - */ - - - parseColorGroup(optional) { - var res = this.parseStringGroup("color", optional); - - if (res == null) { - return null; - } - - var match = /^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i.exec(res.text); - - if (!match) { - throw new ParseError("Invalid color: '" + res.text + "'", res); - } - - var color = match[0]; - - if (/^[0-9a-f]{6}$/i.test(color)) { - // We allow a 6-digit HTML color spec without a leading "#". - // This follows the xcolor package's HTML color model. - // Predefined color names are all missed by this RegEx pattern. - color = "#" + color; - } - - return { - type: "color-token", - mode: this.mode, - color - }; - } - /** - * Parses a size specification, consisting of magnitude and unit. - */ - - - parseSizeGroup(optional) { - var res; - var isBlank = false; // don't expand before parseStringGroup - - this.gullet.consumeSpaces(); - - if (!optional && this.gullet.future().text !== "{") { - res = this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/, "size"); - } else { - res = this.parseStringGroup("size", optional); - } - - if (!res) { - return null; - } - - if (!optional && res.text.length === 0) { - // Because we've tested for what is !optional, this block won't - // affect \kern, \hspace, etc. It will capture the mandatory arguments - // to \genfrac and \above. - res.text = "0pt"; // Enable \above{} - - isBlank = true; // This is here specifically for \genfrac - } - - var match = /([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(res.text); - - if (!match) { - throw new ParseError("Invalid size: '" + res.text + "'", res); - } - - var data = { - number: +(match[1] + match[2]), - // sign + magnitude, cast to number - unit: match[3] - }; - - if (!validUnit(data)) { - throw new ParseError("Invalid unit: '" + data.unit + "'", res); - } - - return { - type: "size", - mode: this.mode, - value: data, - isBlank - }; - } - /** - * Parses an URL, checking escaped letters and allowed protocols, - * and setting the catcode of % as an active character (as in \hyperref). - */ - - - parseUrlGroup(optional) { - this.gullet.lexer.setCatcode("%", 13); // active character - - this.gullet.lexer.setCatcode("~", 12); // other character - - var res = this.parseStringGroup("url", optional); - this.gullet.lexer.setCatcode("%", 14); // comment character - - this.gullet.lexer.setCatcode("~", 13); // active character - - if (res == null) { - return null; - } // hyperref package allows backslashes alone in href, but doesn't - // generate valid links in such cases; we interpret this as - // "undefined" behaviour, and keep them as-is. Some browser will - // replace backslashes with forward slashes. - - - var url = res.text.replace(/\\([#$%&~_^{}])/g, '$1'); - return { - type: "url", - mode: this.mode, - url - }; - } - /** - * Parses an argument with the mode specified. - */ - - - parseArgumentGroup(optional, mode) { - var argToken = this.gullet.scanArgument(optional); - - if (argToken == null) { - return null; - } - - var outerMode = this.mode; - - if (mode) { - // Switch to specified mode - this.switchMode(mode); - } - - this.gullet.beginGroup(); - var expression = this.parseExpression(false, "EOF"); // TODO: find an alternative way to denote the end - - this.expect("EOF"); // expect the end of the argument - - this.gullet.endGroup(); - var result = { - type: "ordgroup", - mode: this.mode, - loc: argToken.loc, - body: expression - }; - - if (mode) { - // Switch mode back - this.switchMode(outerMode); - } - - return result; - } - /** - * Parses an ordinary group, which is either a single nucleus (like "x") - * or an expression in braces (like "{x+y}") or an implicit group, a group - * that starts at the current position, and ends right before a higher explicit - * group ends, or at EOF. - */ - - - parseGroup(name, // For error reporting. - breakOnTokenText) { - var firstToken = this.fetch(); - var text = firstToken.text; - var result; // Try to parse an open brace or \begingroup - - if (text === "{" || text === "\\begingroup") { - this.consume(); - var groupEnd = text === "{" ? "}" : "\\endgroup"; - this.gullet.beginGroup(); // If we get a brace, parse an expression - - var expression = this.parseExpression(false, groupEnd); - var lastToken = this.fetch(); - this.expect(groupEnd); // Check that we got a matching closing brace - - this.gullet.endGroup(); - result = { - type: "ordgroup", - mode: this.mode, - loc: SourceLocation.range(firstToken, lastToken), - body: expression, - // A group formed by \begingroup...\endgroup is a semi-simple group - // which doesn't affect spacing in math mode, i.e., is transparent. - // https://tex.stackexchange.com/questions/1930/when-should-one- - // use-begingroup-instead-of-bgroup - semisimple: text === "\\begingroup" || undefined - }; - } else { - // If there exists a function with this name, parse the function. - // Otherwise, just return a nucleus - result = this.parseFunction(breakOnTokenText, name) || this.parseSymbol(); - - if (result == null && text[0] === "\\" && !implicitCommands.hasOwnProperty(text)) { - if (this.settings.throwOnError) { - throw new ParseError("Undefined control sequence: " + text, firstToken); - } - - result = this.formatUnsupportedCmd(text); - this.consume(); - } - } - - return result; - } - /** - * Form ligature-like combinations of characters for text mode. - * This includes inputs like "--", "---", "``" and "''". - * The result will simply replace multiple textord nodes with a single - * character in each value by a single textord node having multiple - * characters in its value. The representation is still ASCII source. - * The group will be modified in place. - */ - - - formLigatures(group) { - var n = group.length - 1; - - for (var i = 0; i < n; ++i) { - var a = group[i]; // $FlowFixMe: Not every node type has a `text` property. - - var v = a.text; - - if (v === "-" && group[i + 1].text === "-") { - if (i + 1 < n && group[i + 2].text === "-") { - group.splice(i, 3, { - type: "textord", - mode: "text", - loc: SourceLocation.range(a, group[i + 2]), - text: "---" - }); - n -= 2; - } else { - group.splice(i, 2, { - type: "textord", - mode: "text", - loc: SourceLocation.range(a, group[i + 1]), - text: "--" - }); - n -= 1; - } - } - - if ((v === "'" || v === "`") && group[i + 1].text === v) { - group.splice(i, 2, { - type: "textord", - mode: "text", - loc: SourceLocation.range(a, group[i + 1]), - text: v + v - }); - n -= 1; - } - } - } - /** - * Parse a single symbol out of the string. Here, we handle single character - * symbols and special functions like \verb. - */ - - - parseSymbol() { - var nucleus = this.fetch(); - var text = nucleus.text; - - if (/^\\verb[^a-zA-Z]/.test(text)) { - this.consume(); - var arg = text.slice(5); - var star = arg.charAt(0) === "*"; - - if (star) { - arg = arg.slice(1); - } // Lexer's tokenRegex is constructed to always have matching - // first/last characters. - - - if (arg.length < 2 || arg.charAt(0) !== arg.slice(-1)) { - throw new ParseError("\\verb assertion failed --\n please report what input caused this bug"); - } - - arg = arg.slice(1, -1); // remove first and last char - - return { - type: "verb", - mode: "text", - body: arg, - star - }; - } // At this point, we should have a symbol, possibly with accents. - // First expand any accented base symbol according to unicodeSymbols. - - - if (unicodeSymbols.hasOwnProperty(text[0]) && !symbols[this.mode][text[0]]) { - // This behavior is not strict (XeTeX-compatible) in math mode. - if (this.settings.strict && this.mode === "math") { - this.settings.reportNonstrict("unicodeTextInMathMode", "Accented Unicode text character \"" + text[0] + "\" used in " + "math mode", nucleus); - } - - text = unicodeSymbols[text[0]] + text.slice(1); - } // Strip off any combining characters - - - var match = combiningDiacriticalMarksEndRegex.exec(text); - - if (match) { - text = text.substring(0, match.index); - - if (text === 'i') { - text = '\u0131'; // dotless i, in math and text mode - } else if (text === 'j') { - text = '\u0237'; // dotless j, in math and text mode - } - } // Recognize base symbol - - - var symbol; - - if (symbols[this.mode][text]) { - if (this.settings.strict && this.mode === 'math' && extraLatin.indexOf(text) >= 0) { - this.settings.reportNonstrict("unicodeTextInMathMode", "Latin-1/Unicode text character \"" + text[0] + "\" used in " + "math mode", nucleus); - } - - var group = symbols[this.mode][text].group; - var loc = SourceLocation.range(nucleus); - var s; - - if (ATOMS.hasOwnProperty(group)) { - // $FlowFixMe - var family = group; - s = { - type: "atom", - mode: this.mode, - family, - loc, - text - }; - } else { - // $FlowFixMe - s = { - type: group, - mode: this.mode, - loc, - text - }; - } // $FlowFixMe - - - symbol = s; - } else if (text.charCodeAt(0) >= 0x80) { - // no symbol for e.g. ^ - if (this.settings.strict) { - if (!supportedCodepoint(text.charCodeAt(0))) { - this.settings.reportNonstrict("unknownSymbol", "Unrecognized Unicode character \"" + text[0] + "\"" + (" (" + text.charCodeAt(0) + ")"), nucleus); - } else if (this.mode === "math") { - this.settings.reportNonstrict("unicodeTextInMathMode", "Unicode text character \"" + text[0] + "\" used in math mode", nucleus); - } - } // All nonmathematical Unicode characters are rendered as if they - // are in text mode (wrapped in \text) because that's what it - // takes to render them in LaTeX. Setting `mode: this.mode` is - // another natural choice (the user requested math mode), but - // this makes it more difficult for getCharacterMetrics() to - // distinguish Unicode characters without metrics and those for - // which we want to simulate the letter M. - - - symbol = { - type: "textord", - mode: "text", - loc: SourceLocation.range(nucleus), - text - }; - } else { - return null; // EOF, ^, _, {, }, etc. - } - - this.consume(); // Transform combining characters into accents - - if (match) { - for (var i = 0; i < match[0].length; i++) { - var accent = match[0][i]; - - if (!unicodeAccents[accent]) { - throw new ParseError("Unknown accent ' " + accent + "'", nucleus); - } - - var command = unicodeAccents[accent][this.mode] || unicodeAccents[accent].text; - - if (!command) { - throw new ParseError("Accent " + accent + " unsupported in " + this.mode + " mode", nucleus); - } - - symbol = { - type: "accent", - mode: this.mode, - loc: SourceLocation.range(nucleus), - label: command, - isStretchy: false, - isShifty: true, - // $FlowFixMe - base: symbol - }; - } - } // $FlowFixMe - - - return symbol; - } - -} -Parser.endOfExpression = ["}", "\\endgroup", "\\end", "\\right", "&"]; - -/** - * Provides a single function for parsing an expression using a Parser - * TODO(emily): Remove this - */ - -/** - * Parses an expression using a Parser, then returns the parsed result. - */ -var parseTree = function parseTree(toParse, settings) { - if (!(typeof toParse === 'string' || toParse instanceof String)) { - throw new TypeError('KaTeX can only parse string typed expression'); - } - - var parser = new Parser(toParse, settings); // Blank out any \df@tag to avoid spurious "Duplicate \tag" errors - - delete parser.gullet.macros.current["\\df@tag"]; - var tree = parser.parse(); // Prevent a color definition from persisting between calls to katex.render(). - - delete parser.gullet.macros.current["\\current@color"]; - delete parser.gullet.macros.current["\\color"]; // If the input used \tag, it will set the \df@tag macro to the tag. - // In this case, we separately parse the tag and wrap the tree. - - if (parser.gullet.macros.get("\\df@tag")) { - if (!settings.displayMode) { - throw new ParseError("\\tag works only in display equations"); - } - - tree = [{ - type: "tag", - mode: "text", - body: tree, - tag: parser.subparse([new Token("\\df@tag")]) - }]; - } - - return tree; -}; - -/* eslint no-console:0 */ - -/** - * Parse and build an expression, and place that expression in the DOM node - * given. - */ -var render = function render(expression, baseNode, options) { - baseNode.textContent = ""; - var node = renderToDomTree(expression, options).toNode(); - baseNode.appendChild(node); -}; // KaTeX's styles don't work properly in quirks mode. Print out an error, and -// disable rendering. - - -if (typeof document !== "undefined") { - if (document.compatMode !== "CSS1Compat") { - typeof console !== "undefined" && console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your " + "website has a suitable doctype."); - - render = function render() { - throw new ParseError("KaTeX doesn't work in quirks mode."); - }; - } -} -/** - * Parse and build an expression, and return the markup for that. - */ - - -var renderToString = function renderToString(expression, options) { - var markup = renderToDomTree(expression, options).toMarkup(); - return markup; -}; -/** - * Parse an expression and return the parse tree. - */ - - -var generateParseTree = function generateParseTree(expression, options) { - var settings = new Settings(options); - return parseTree(expression, settings); -}; -/** - * If the given error is a KaTeX ParseError and options.throwOnError is false, - * renders the invalid LaTeX as a span with hover title giving the KaTeX - * error message. Otherwise, simply throws the error. - */ - - -var renderError = function renderError(error, expression, options) { - if (options.throwOnError || !(error instanceof ParseError)) { - throw error; - } - - var node = buildCommon.makeSpan(["katex-error"], [new SymbolNode(expression)]); - node.setAttribute("title", error.toString()); - node.setAttribute("style", "color:" + options.errorColor); - return node; -}; -/** - * Generates and returns the katex build tree. This is used for advanced - * use cases (like rendering to custom output). - */ - - -var renderToDomTree = function renderToDomTree(expression, options) { - var settings = new Settings(options); - - try { - var tree = parseTree(expression, settings); - return buildTree(tree, expression, settings); - } catch (error) { - return renderError(error, expression, settings); - } -}; -/** - * Generates and returns the katex build tree, with just HTML (no MathML). - * This is used for advanced use cases (like rendering to custom output). - */ - - -var renderToHTMLTree = function renderToHTMLTree(expression, options) { - var settings = new Settings(options); - - try { - var tree = parseTree(expression, settings); - return buildHTMLTree(tree, expression, settings); - } catch (error) { - return renderError(error, expression, settings); - } -}; - -var katex = { - /** - * Current KaTeX version - */ - version: "0.16.11", - - /** - * Renders the given LaTeX into an HTML+MathML combination, and adds - * it as a child to the specified DOM node. - */ - render, - - /** - * Renders the given LaTeX into an HTML+MathML combination string, - * for sending to the client. - */ - renderToString, - - /** - * KaTeX error, usually during parsing. - */ - ParseError, - - /** - * The shema of Settings - */ - SETTINGS_SCHEMA, - - /** - * Parses the given LaTeX into KaTeX's internal parse tree structure, - * without rendering to HTML or MathML. - * - * NOTE: This method is not currently recommended for public use. - * The internal tree representation is unstable and is very likely - * to change. Use at your own risk. - */ - __parse: generateParseTree, - - /** - * Renders the given LaTeX into an HTML+MathML internal DOM tree - * representation, without flattening that representation to a string. - * - * NOTE: This method is not currently recommended for public use. - * The internal tree representation is unstable and is very likely - * to change. Use at your own risk. - */ - __renderToDomTree: renderToDomTree, - - /** - * Renders the given LaTeX into an HTML internal DOM tree representation, - * without MathML and without flattening that representation to a string. - * - * NOTE: This method is not currently recommended for public use. - * The internal tree representation is unstable and is very likely - * to change. Use at your own risk. - */ - __renderToHTMLTree: renderToHTMLTree, - - /** - * extends internal font metrics object with a new object - * each key in the new object represents a font name - */ - __setFontMetrics: setFontMetrics, - - /** - * adds a new symbol to builtin symbols table - */ - __defineSymbol: defineSymbol, - - /** - * adds a new function to builtin function list, - * which directly produce parse tree elements - * and have their own html/mathml builders - */ - __defineFunction: defineFunction, - - /** - * adds a new macro to builtin macro list - */ - __defineMacro: defineMacro, - - /** - * Expose the dom tree node types, which can be useful for type checking nodes. - * - * NOTE: This method is not currently recommended for public use. - * The internal tree representation is unstable and is very likely - * to change. Use at your own risk. - */ - __domTree: { - Span, - Anchor, - SymbolNode, - SvgNode, - PathNode, - LineNode - } -}; - - - - -/***/ }) - -}; -; \ No newline at end of file diff --git a/assets/js/131c7f55.6df4c3fc.js b/assets/js/131c7f55.6df4c3fc.js new file mode 100644 index 000000000000..20be6f11990d --- /dev/null +++ b/assets/js/131c7f55.6df4c3fc.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2298],{97029:(e,a,t)=>{t.r(a),t.d(a,{assets:()=>l,contentTitle:()=>c,default:()=>u,frontMatter:()=>o,metadata:()=>r,toc:()=>h});const r=JSON.parse('{"id":"learn/learn-architecture","title":"Architecture","description":"Key Components to Polkadot\'s Architecture.","source":"@site/../docs/learn/learn-architecture.md","sourceDirName":"learn","slug":"/learn-architecture","permalink":"/docs/learn-architecture","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-architecture.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1727943421000,"frontMatter":{"id":"learn-architecture","title":"Architecture","sidebar_label":"Architecture","description":"Key Components to Polkadot\'s Architecture.","keywords":["polkadot","components","architecture"],"slug":"../learn-architecture"},"sidebar":"docs","previous":{"title":"Claim Guides","permalink":"/docs/learn-guides-claims"},"next":{"title":"Consensus","permalink":"/docs/learn-consensus"}}');var n=t(74848),i=t(28453),s=t(3514);const o={id:"learn-architecture",title:"Architecture",sidebar_label:"Architecture",description:"Key Components to Polkadot's Architecture.",keywords:["polkadot","components","architecture"],slug:"../learn-architecture"},c=void 0,l={},h=[{value:"Relay Chain",id:"relay-chain",level:2},{value:"Parachain Slots",id:"parachain-slots",level:2},{value:"Shared Security",id:"shared-security",level:3},{value:"Interoperability",id:"interoperability",level:2},{value:"XCM",id:"xcm",level:3},{value:"Bridges",id:"bridges",level:3},{value:"Validators",id:"validators",level:2},{value:"Nominators",id:"nominators",level:2},{value:"Collators",id:"collators",level:2}];function d(e){const a={a:"a",h1:"h1",h2:"h2",h3:"h3",p:"p",...(0,i.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(a.p,{children:"Polkadot is a heterogeneous multichain with shared security and interoperability."}),"\n",(0,n.jsx)(s.A,{}),"\n",(0,n.jsx)(a.h2,{id:"relay-chain",children:"Relay Chain"}),"\n",(0,n.jsx)(a.p,{children:"The relay chain is the central chain of Polkadot. All validators of are staked on the relay chain in\nDOT and validate for the relay chain. The relay chain is composed of a relatively small number of\ntransaction types that include ways to interact with the governance mechanism, and participating in\nNPoS. The relay chain has deliberately minimal functionality - for instance, smart contracts are not\nsupported. The main responsibility is to coordinate the system as a whole, including parachains.\nOther specific work is delegated to the parachains, which have different implementations and\nfeatures."}),"\n",(0,n.jsxs)(a.h2,{id:"parachain-slots",children:[(0,n.jsx)(a.a,{href:"/docs/learn-parachains",children:"Parachain"})," Slots"]}),"\n",(0,n.jsx)(a.p,{children:"The relay chain can support a number of execution cores, like cores on a computer's processor (a\nmodern laptop's processor may have eight cores, for example). Each one of these cores can run one\nprocess at a time. The relay chain allows these cores using two subscription models: parachains and\non-demand parachains. Parachains have a dedicated core for their chain and are like a process that\nruns constantly. On-demand parachains share (not simultaneously) cores amongst a group, and are thus\nmore like processes that need to be woken up and run less frequently (similarly to concurrency in\nmodern computers)."}),"\n",(0,n.jsx)(a.p,{children:"Most of the computation that happens across the network as a whole will be delegated to specific\nparachain implementations that handle various use cases. The relay chain places no constraints over\nwhat parachains can do besides that they must be able to generate a proof that can be validated by\nthe validators assigned to the parachain. This proof verifies the state transition of the parachain.\nSome parachains may be specific to a particular application, others may focus on specific features\nlike smart contracts, privacy, or scalability \u2014 still, others might be experimental\narchitectures that are not necessarily blockchain in nature."}),"\n",(0,n.jsxs)(a.p,{children:["The relay chain provides many ways to secure a core for a parachain for a particular length of time.\nOn-demand parachains share cores (not simultaneously) with other parachains. Both regular and\non-demand parachains have the same API and need to buy time on a core with DOT via\n",(0,n.jsx)(a.a,{href:"/docs/learn-agile-coretime",children:"coretime"}),". Parachains can switch between being on-demand and permanent."]}),"\n",(0,n.jsx)(a.h3,{id:"shared-security",children:(0,n.jsx)(a.a,{href:"/docs/learn-parachains",children:"Shared Security"})}),"\n",(0,n.jsx)(a.p,{children:"Parachains connected to the relay chain all share in the security of the relay chain. Polkadot has a\nshared state between the relay chain and all of the connected parachains. If the relay chain must\nrevert for any reason, then all of the parachains would also revert. This is to ensure that the\nvalidity of the entire system can persist and no individual part is corruptible."}),"\n",(0,n.jsx)(a.p,{children:"The shared state ensures that the trust assumptions when using parachains are only those of the\nrelay chain validator set and no other. Since the validator set on the relay chain is expected to be\nsecure with a large amount of stake put up to back it, parachains should benefit from this security."}),"\n",(0,n.jsx)(a.h2,{id:"interoperability",children:"Interoperability"}),"\n",(0,n.jsx)(a.h3,{id:"xcm",children:(0,n.jsx)(a.a,{href:"learn-xcm",children:"XCM"})}),"\n",(0,n.jsxs)(a.p,{children:["XCM, short for cross-consensus message, is a format and not a protocol. The format does not assume\nanything about the receiver or senders consensus mechanism, it only cares about the format in which\nthe messages must be structured in. The XCM format is how parachains will be able to communicate\nwith one another. Different from XCMP, which is short for cross-chain messaging protocol, XCM is\nwhat gets delivered, and XCMP is the delivery mechanism. The best way to learn more about XCM is by\nreading the ",(0,n.jsx)(a.a,{href:"https://github.com/paritytech/xcm-format",children:"specification"}),"."]}),"\n",(0,n.jsx)(a.h3,{id:"bridges",children:(0,n.jsx)(a.a,{href:"/docs/learn-bridges",children:"Bridges"})}),"\n",(0,n.jsxs)(a.p,{children:["A blockchain ",(0,n.jsx)(a.a,{href:"/docs/glossary#bridge",children:"bridge"})," is a connection that allows for arbitrary data\nto transfer from one network to another. These chains are interoperable through the bridge but can\nexist as standalone chains with different protocols, rules, and governance models. In Polkadot,\nbridges connect to the relay chain and are secured through the consensus mechanism, maintained by\n",(0,n.jsx)(a.a,{href:"#collators",children:"collators"}),"."]}),"\n",(0,n.jsx)(a.p,{children:"Polkadot uses bridges to bridge the future of Web 3.0, as bridges are fundamental to Polkadot's\ninteroperable architecture by acting as a secure and robust communication channel for chains in\nisolation."}),"\n",(0,n.jsx)(a.h1,{id:"main-actors",children:"Main Actors"}),"\n",(0,n.jsx)(a.h2,{id:"validators",children:"Validators"}),"\n",(0,n.jsxs)(a.p,{children:[(0,n.jsx)(a.a,{href:"/docs/glossary#validator",children:"Validators"}),", if elected to the validator set, produce blocks on\nthe relay chain. They also accept proofs of valid state transition from collators and receive\nstaking rewards in return."]}),"\n",(0,n.jsxs)(a.p,{children:["Validators are required to keep enough parachain blocks available for later use in their local\nstorage. Those blocks are retrievable by peers who lack that information, so that they can reliably\nconfirm the issued validity statements about parachain blocks. The\n",(0,n.jsx)(a.a,{href:"https://spec.polkadot.network/#chapter-anv",children:"Availability & Validity"})," (AnV) protocol consists of\nmultiple steps for successfully upholding those responsibilities."]}),"\n",(0,n.jsx)(a.h2,{id:"nominators",children:"Nominators"}),"\n",(0,n.jsxs)(a.p,{children:[(0,n.jsx)(a.a,{href:"/docs/glossary#nominator",children:"Nominators"})," bond their stake to particular validators in order to\nhelp them get into the active validator set and thus produce blocks for the chain. In return,\nnominators are generally rewarded with a portion of the staking rewards from that validator."]}),"\n",(0,n.jsx)(a.h2,{id:"collators",children:"Collators"}),"\n",(0,n.jsxs)(a.p,{children:[(0,n.jsx)(a.a,{href:"/docs/glossary#collator",children:"Collators"})," are full nodes on both a parachain and the relay chain.\nThey collect parachain transactions and produce state transition proofs for the validators on the\nrelay chain. They can also send and receive messages from other parachains using XCMP."]}),"\n",(0,n.jsx)(a.p,{children:"Parachain blocks themselves are produced by collators, whereas the relay chain validators only\nverify their validity (and later, their availability)."})]})}function u(e={}){const{wrapper:a}={...(0,i.R)(),...e.components};return a?(0,n.jsx)(a,{...e,children:(0,n.jsx)(d,{...e})}):d(e)}},3514:(e,a,t)=>{t.d(a,{A:()=>b});t(96540);var r=t(34164),n=t(26972),i=t(28774),s=t(53465),o=t(16654),c=t(21312),l=t(51107);const h={cardContainer:"cardContainer_fWXF",cardTitle:"cardTitle_rnsV",cardDescription:"cardDescription_PWke"};var d=t(74848);function u(e){var a=e.href,t=e.children;return(0,d.jsx)(i.A,{href:a,className:(0,r.A)("card padding--lg",h.cardContainer),children:t})}function p(e){var a=e.href,t=e.icon,n=e.title,i=e.description;return(0,d.jsxs)(u,{href:a,children:[(0,d.jsxs)(l.A,{as:"h2",className:(0,r.A)("text--truncate",h.cardTitle),title:n,children:[t," ",n]}),i&&(0,d.jsx)("p",{className:(0,r.A)("text--truncate",h.cardDescription),title:i,children:i})]})}function m(e){var a,t,r=e.item,i=(0,n.Nr)(r),o=(t=(0,s.W)().selectMessage,function(e){return t(e,(0,c.T)({message:"1 item|{count} items",id:"theme.docs.DocCard.categoryDescription.plurals",description:"The default description for a category card in the generated index about how many items this category includes"},{count:e}))});return i?(0,d.jsx)(p,{href:i,icon:"\ud83d\uddc3\ufe0f",title:r.label,description:null!=(a=r.description)?a:o(r.items.length)}):null}function f(e){var a,t,r=e.item,i=(0,o.A)(r.href)?"\ud83d\udcc4\ufe0f":"\ud83d\udd17",s=(0,n.cC)(null!=(a=r.docId)?a:void 0);return(0,d.jsx)(p,{href:r.href,icon:i,title:r.label,description:null!=(t=r.description)?t:null==s?void 0:s.description})}function y(e){var a=e.item;switch(a.type){case"link":return(0,d.jsx)(f,{item:a});case"category":return(0,d.jsx)(m,{item:a});default:throw new Error("unknown item type "+JSON.stringify(a))}}function v(e){var a=e.className,t=(0,n.$S)();return(0,d.jsx)(b,{items:t.items,className:a})}function b(e){var a=e.items,t=e.className;if(!a)return(0,d.jsx)(v,Object.assign({},e));var i=(0,n.d1)(a);return(0,d.jsx)("section",{className:(0,r.A)("row",t),children:i.map((function(e,a){return(0,d.jsx)("article",{className:"col col--6 margin-bottom--lg",children:(0,d.jsx)(y,{item:e})},a)}))})}},53465:(e,a,t)=>{t.d(a,{W:()=>l});var r=t(96540),n=t(44586),i=["zero","one","two","few","many","other"];function s(e){return i.filter((function(a){return e.includes(a)}))}var o={locale:"en",pluralForms:s(["one","other"]),select:function(e){return 1===e?"one":"other"}};function c(){var e=(0,n.A)().i18n.currentLocale;return(0,r.useMemo)((function(){try{return a=e,t=new Intl.PluralRules(a),{locale:a,pluralForms:s(t.resolvedOptions().pluralCategories),select:function(e){return t.select(e)}}}catch(r){return console.error('Failed to use Intl.PluralRules for locale "'+e+'".\nDocusaurus will fallback to the default (English) implementation.\nError: '+r.message+"\n"),o}var a,t}),[e])}function l(){var e=c();return{selectMessage:function(a,t){return function(e,a,t){var r=e.split("|");if(1===r.length)return r[0];r.length>t.pluralForms.length&&console.error("For locale="+t.locale+", a maximum of "+t.pluralForms.length+" plural forms are expected ("+t.pluralForms.join(",")+"), but the message contains "+r.length+": "+e);var n=t.select(a),i=t.pluralForms.indexOf(n);return r[Math.min(i,r.length-1)]}(t,a,e)}}}},28453:(e,a,t)=>{t.d(a,{R:()=>s,x:()=>o});var r=t(96540);const n={},i=r.createContext(n);function s(e){const a=r.useContext(i);return r.useMemo((function(){return"function"==typeof e?e(a):{...a,...e}}),[a,e])}function o(e){let a;return a=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:s(e.components),r.createElement(i.Provider,{value:a},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/131c7f55.fe7d4dcf.js b/assets/js/131c7f55.fe7d4dcf.js deleted file mode 100644 index da6075feeadb..000000000000 --- a/assets/js/131c7f55.fe7d4dcf.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2298],{2512:(e,a,t)=>{t.r(a),t.d(a,{assets:()=>l,contentTitle:()=>o,default:()=>u,frontMatter:()=>s,metadata:()=>c,toc:()=>h});var r=t(74848),n=t(28453),i=t(3514);const s={id:"learn-architecture",title:"Architecture",sidebar_label:"Architecture",description:"Key Components to Polkadot's Architecture.",keywords:["polkadot","components","architecture"],slug:"../learn-architecture"},o=void 0,c={id:"learn/learn-architecture",title:"Architecture",description:"Key Components to Polkadot's Architecture.",source:"@site/../docs/learn/learn-architecture.md",sourceDirName:"learn",slug:"/learn-architecture",permalink:"/docs/learn-architecture",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-architecture.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1727943421e3,frontMatter:{id:"learn-architecture",title:"Architecture",sidebar_label:"Architecture",description:"Key Components to Polkadot's Architecture.",keywords:["polkadot","components","architecture"],slug:"../learn-architecture"},sidebar:"docs",previous:{title:"Claim Guides",permalink:"/docs/learn-guides-claims"},next:{title:"Consensus",permalink:"/docs/learn-consensus"}},l={},h=[{value:"Relay Chain",id:"relay-chain",level:2},{value:"Parachain Slots",id:"parachain-slots",level:2},{value:"Shared Security",id:"shared-security",level:3},{value:"Interoperability",id:"interoperability",level:2},{value:"XCM",id:"xcm",level:3},{value:"Bridges",id:"bridges",level:3},{value:"Validators",id:"validators",level:2},{value:"Nominators",id:"nominators",level:2},{value:"Collators",id:"collators",level:2}];function d(e){const a={a:"a",h1:"h1",h2:"h2",h3:"h3",p:"p",...(0,n.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(a.p,{children:"Polkadot is a heterogeneous multichain with shared security and interoperability."}),"\n",(0,r.jsx)(i.A,{}),"\n",(0,r.jsx)(a.h2,{id:"relay-chain",children:"Relay Chain"}),"\n",(0,r.jsx)(a.p,{children:"The relay chain is the central chain of Polkadot. All validators of are staked on the relay chain in\nDOT and validate for the relay chain. The relay chain is composed of a relatively small number of\ntransaction types that include ways to interact with the governance mechanism, and participating in\nNPoS. The relay chain has deliberately minimal functionality - for instance, smart contracts are not\nsupported. The main responsibility is to coordinate the system as a whole, including parachains.\nOther specific work is delegated to the parachains, which have different implementations and\nfeatures."}),"\n",(0,r.jsxs)(a.h2,{id:"parachain-slots",children:[(0,r.jsx)(a.a,{href:"/docs/learn-parachains",children:"Parachain"})," Slots"]}),"\n",(0,r.jsx)(a.p,{children:"The relay chain can support a number of execution cores, like cores on a computer's processor (a\nmodern laptop's processor may have eight cores, for example). Each one of these cores can run one\nprocess at a time. The relay chain allows these cores using two subscription models: parachains and\non-demand parachains. Parachains have a dedicated core for their chain and are like a process that\nruns constantly. On-demand parachains share (not simultaneously) cores amongst a group, and are thus\nmore like processes that need to be woken up and run less frequently (similarly to concurrency in\nmodern computers)."}),"\n",(0,r.jsx)(a.p,{children:"Most of the computation that happens across the network as a whole will be delegated to specific\nparachain implementations that handle various use cases. The relay chain places no constraints over\nwhat parachains can do besides that they must be able to generate a proof that can be validated by\nthe validators assigned to the parachain. This proof verifies the state transition of the parachain.\nSome parachains may be specific to a particular application, others may focus on specific features\nlike smart contracts, privacy, or scalability \u2014 still, others might be experimental\narchitectures that are not necessarily blockchain in nature."}),"\n",(0,r.jsxs)(a.p,{children:["The relay chain provides many ways to secure a core for a parachain for a particular length of time.\nOn-demand parachains share cores (not simultaneously) with other parachains. Both regular and\non-demand parachains have the same API and need to buy time on a core with DOT via\n",(0,r.jsx)(a.a,{href:"/docs/learn-agile-coretime",children:"coretime"}),". Parachains can switch between being on-demand and permanent."]}),"\n",(0,r.jsx)(a.h3,{id:"shared-security",children:(0,r.jsx)(a.a,{href:"/docs/learn-parachains",children:"Shared Security"})}),"\n",(0,r.jsx)(a.p,{children:"Parachains connected to the relay chain all share in the security of the relay chain. Polkadot has a\nshared state between the relay chain and all of the connected parachains. If the relay chain must\nrevert for any reason, then all of the parachains would also revert. This is to ensure that the\nvalidity of the entire system can persist and no individual part is corruptible."}),"\n",(0,r.jsx)(a.p,{children:"The shared state ensures that the trust assumptions when using parachains are only those of the\nrelay chain validator set and no other. Since the validator set on the relay chain is expected to be\nsecure with a large amount of stake put up to back it, parachains should benefit from this security."}),"\n",(0,r.jsx)(a.h2,{id:"interoperability",children:"Interoperability"}),"\n",(0,r.jsx)(a.h3,{id:"xcm",children:(0,r.jsx)(a.a,{href:"learn-xcm",children:"XCM"})}),"\n",(0,r.jsxs)(a.p,{children:["XCM, short for cross-consensus message, is a format and not a protocol. The format does not assume\nanything about the receiver or senders consensus mechanism, it only cares about the format in which\nthe messages must be structured in. The XCM format is how parachains will be able to communicate\nwith one another. Different from XCMP, which is short for cross-chain messaging protocol, XCM is\nwhat gets delivered, and XCMP is the delivery mechanism. The best way to learn more about XCM is by\nreading the ",(0,r.jsx)(a.a,{href:"https://github.com/paritytech/xcm-format",children:"specification"}),"."]}),"\n",(0,r.jsx)(a.h3,{id:"bridges",children:(0,r.jsx)(a.a,{href:"/docs/learn-bridges",children:"Bridges"})}),"\n",(0,r.jsxs)(a.p,{children:["A blockchain ",(0,r.jsx)(a.a,{href:"/docs/glossary#bridge",children:"bridge"})," is a connection that allows for arbitrary data\nto transfer from one network to another. These chains are interoperable through the bridge but can\nexist as standalone chains with different protocols, rules, and governance models. In Polkadot,\nbridges connect to the relay chain and are secured through the consensus mechanism, maintained by\n",(0,r.jsx)(a.a,{href:"#collators",children:"collators"}),"."]}),"\n",(0,r.jsx)(a.p,{children:"Polkadot uses bridges to bridge the future of Web 3.0, as bridges are fundamental to Polkadot's\ninteroperable architecture by acting as a secure and robust communication channel for chains in\nisolation."}),"\n",(0,r.jsx)(a.h1,{id:"main-actors",children:"Main Actors"}),"\n",(0,r.jsx)(a.h2,{id:"validators",children:"Validators"}),"\n",(0,r.jsxs)(a.p,{children:[(0,r.jsx)(a.a,{href:"/docs/glossary#validator",children:"Validators"}),", if elected to the validator set, produce blocks on\nthe relay chain. They also accept proofs of valid state transition from collators and receive\nstaking rewards in return."]}),"\n",(0,r.jsxs)(a.p,{children:["Validators are required to keep enough parachain blocks available for later use in their local\nstorage. Those blocks are retrievable by peers who lack that information, so that they can reliably\nconfirm the issued validity statements about parachain blocks. The\n",(0,r.jsx)(a.a,{href:"https://spec.polkadot.network/#chapter-anv",children:"Availability & Validity"})," (AnV) protocol consists of\nmultiple steps for successfully upholding those responsibilities."]}),"\n",(0,r.jsx)(a.h2,{id:"nominators",children:"Nominators"}),"\n",(0,r.jsxs)(a.p,{children:[(0,r.jsx)(a.a,{href:"/docs/glossary#nominator",children:"Nominators"})," bond their stake to particular validators in order to\nhelp them get into the active validator set and thus produce blocks for the chain. In return,\nnominators are generally rewarded with a portion of the staking rewards from that validator."]}),"\n",(0,r.jsx)(a.h2,{id:"collators",children:"Collators"}),"\n",(0,r.jsxs)(a.p,{children:[(0,r.jsx)(a.a,{href:"/docs/glossary#collator",children:"Collators"})," are full nodes on both a parachain and the relay chain.\nThey collect parachain transactions and produce state transition proofs for the validators on the\nrelay chain. They can also send and receive messages from other parachains using XCMP."]}),"\n",(0,r.jsx)(a.p,{children:"Parachain blocks themselves are produced by collators, whereas the relay chain validators only\nverify their validity (and later, their availability)."})]})}function u(e={}){const{wrapper:a}={...(0,n.R)(),...e.components};return a?(0,r.jsx)(a,{...e,children:(0,r.jsx)(d,{...e})}):d(e)}},3514:(e,a,t)=>{t.d(a,{A:()=>b});t(96540);var r=t(34164),n=t(26972),i=t(28774),s=t(53465),o=t(16654),c=t(21312),l=t(51107);const h={cardContainer:"cardContainer_fWXF",cardTitle:"cardTitle_rnsV",cardDescription:"cardDescription_PWke"};var d=t(74848);function u(e){var a=e.href,t=e.children;return(0,d.jsx)(i.A,{href:a,className:(0,r.A)("card padding--lg",h.cardContainer),children:t})}function p(e){var a=e.href,t=e.icon,n=e.title,i=e.description;return(0,d.jsxs)(u,{href:a,children:[(0,d.jsxs)(l.A,{as:"h2",className:(0,r.A)("text--truncate",h.cardTitle),title:n,children:[t," ",n]}),i&&(0,d.jsx)("p",{className:(0,r.A)("text--truncate",h.cardDescription),title:i,children:i})]})}function m(e){var a,t,r=e.item,i=(0,n.Nr)(r),o=(t=(0,s.W)().selectMessage,function(e){return t(e,(0,c.T)({message:"1 item|{count} items",id:"theme.docs.DocCard.categoryDescription.plurals",description:"The default description for a category card in the generated index about how many items this category includes"},{count:e}))});return i?(0,d.jsx)(p,{href:i,icon:"\ud83d\uddc3\ufe0f",title:r.label,description:null!=(a=r.description)?a:o(r.items.length)}):null}function f(e){var a,t,r=e.item,i=(0,o.A)(r.href)?"\ud83d\udcc4\ufe0f":"\ud83d\udd17",s=(0,n.cC)(null!=(a=r.docId)?a:void 0);return(0,d.jsx)(p,{href:r.href,icon:i,title:r.label,description:null!=(t=r.description)?t:null==s?void 0:s.description})}function y(e){var a=e.item;switch(a.type){case"link":return(0,d.jsx)(f,{item:a});case"category":return(0,d.jsx)(m,{item:a});default:throw new Error("unknown item type "+JSON.stringify(a))}}function v(e){var a=e.className,t=(0,n.$S)();return(0,d.jsx)(b,{items:t.items,className:a})}function b(e){var a=e.items,t=e.className;if(!a)return(0,d.jsx)(v,Object.assign({},e));var i=(0,n.d1)(a);return(0,d.jsx)("section",{className:(0,r.A)("row",t),children:i.map((function(e,a){return(0,d.jsx)("article",{className:"col col--6 margin-bottom--lg",children:(0,d.jsx)(y,{item:e})},a)}))})}},53465:(e,a,t)=>{t.d(a,{W:()=>l});var r=t(96540),n=t(44586),i=["zero","one","two","few","many","other"];function s(e){return i.filter((function(a){return e.includes(a)}))}var o={locale:"en",pluralForms:s(["one","other"]),select:function(e){return 1===e?"one":"other"}};function c(){var e=(0,n.A)().i18n.currentLocale;return(0,r.useMemo)((function(){try{return a=e,t=new Intl.PluralRules(a),{locale:a,pluralForms:s(t.resolvedOptions().pluralCategories),select:function(e){return t.select(e)}}}catch(r){return console.error('Failed to use Intl.PluralRules for locale "'+e+'".\nDocusaurus will fallback to the default (English) implementation.\nError: '+r.message+"\n"),o}var a,t}),[e])}function l(){var e=c();return{selectMessage:function(a,t){return function(e,a,t){var r=e.split("|");if(1===r.length)return r[0];r.length>t.pluralForms.length&&console.error("For locale="+t.locale+", a maximum of "+t.pluralForms.length+" plural forms are expected ("+t.pluralForms.join(",")+"), but the message contains "+r.length+": "+e);var n=t.select(a),i=t.pluralForms.indexOf(n);return r[Math.min(i,r.length-1)]}(t,a,e)}}}},28453:(e,a,t)=>{t.d(a,{R:()=>s,x:()=>o});var r=t(96540);const n={},i=r.createContext(n);function s(e){const a=r.useContext(i);return r.useMemo((function(){return"function"==typeof e?e(a):{...a,...e}}),[a,e])}function o(e){let a;return a=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:s(e.components),r.createElement(i.Provider,{value:a},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/1329.7f6879d0.js b/assets/js/1329.7f6879d0.js deleted file mode 100644 index d876e474eeda..000000000000 --- a/assets/js/1329.7f6879d0.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1329],{31329:(t,i,e)=>{e.d(i,{diagram:()=>F});var s=e(86079),n=e(22519),a=e(26312),h=(e(74353),e(16750),e(42838),function(){var t=function(t,i,e,s){for(e=e||{},s=t.length;s--;e[t[s]]=i);return e},i=[1,10,12,14,16,18,19,21,23],e=[2,6],s=[1,3],n=[1,5],a=[1,6],h=[1,7],o=[1,5,10,12,14,16,18,19,21,23,34,35,36],r=[1,25],l=[1,26],c=[1,28],g=[1,29],u=[1,30],x=[1,31],d=[1,32],p=[1,33],f=[1,34],y=[1,35],m=[1,36],b=[1,37],A=[1,43],w=[1,42],S=[1,47],C=[1,50],k=[1,10,12,14,16,18,19,21,23,34,35,36],_=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],T=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],R=[1,64],D={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:function(t,i,e,s,n,a,h){var o=a.length-1;switch(n){case 5:s.setOrientation(a[o]);break;case 9:s.setDiagramTitle(a[o].text.trim());break;case 12:s.setLineData({text:"",type:"text"},a[o]);break;case 13:s.setLineData(a[o-1],a[o]);break;case 14:s.setBarData({text:"",type:"text"},a[o]);break;case 15:s.setBarData(a[o-1],a[o]);break;case 16:this.$=a[o].trim(),s.setAccTitle(this.$);break;case 17:case 18:this.$=a[o].trim(),s.setAccDescription(this.$);break;case 19:case 27:this.$=a[o-1];break;case 20:this.$=[Number(a[o-2]),...a[o]];break;case 21:this.$=[Number(a[o])];break;case 22:s.setXAxisTitle(a[o]);break;case 23:s.setXAxisTitle(a[o-1]);break;case 24:s.setXAxisTitle({type:"text",text:""});break;case 25:s.setXAxisBand(a[o]);break;case 26:s.setXAxisRangeData(Number(a[o-2]),Number(a[o]));break;case 28:this.$=[a[o-2],...a[o]];break;case 29:this.$=[a[o]];break;case 30:s.setYAxisTitle(a[o]);break;case 31:s.setYAxisTitle(a[o-1]);break;case 32:s.setYAxisTitle({type:"text",text:""});break;case 33:s.setYAxisRangeData(Number(a[o-2]),Number(a[o]));break;case 37:case 38:this.$={text:a[o],type:"text"};break;case 39:this.$={text:a[o],type:"markdown"};break;case 40:this.$=a[o];break;case 41:this.$=a[o-1]+""+a[o]}},table:[t(i,e,{3:1,4:2,7:4,5:s,34:n,35:a,36:h}),{1:[3]},t(i,e,{4:2,7:4,3:8,5:s,34:n,35:a,36:h}),t(i,e,{4:2,7:4,6:9,3:10,5:s,8:[1,11],34:n,35:a,36:h}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},t(o,[2,34]),t(o,[2,35]),t(o,[2,36]),{1:[2,1]},t(i,e,{4:2,7:4,3:21,5:s,34:n,35:a,36:h}),{1:[2,3]},t(o,[2,5]),t(i,[2,7],{4:22,34:n,35:a,36:h}),{11:23,37:24,38:r,39:l,40:27,41:c,42:g,43:u,44:x,45:d,46:p,47:f,48:y,49:m,50:b},{11:39,13:38,24:A,27:w,29:40,30:41,37:24,38:r,39:l,40:27,41:c,42:g,43:u,44:x,45:d,46:p,47:f,48:y,49:m,50:b},{11:45,15:44,27:S,33:46,37:24,38:r,39:l,40:27,41:c,42:g,43:u,44:x,45:d,46:p,47:f,48:y,49:m,50:b},{11:49,17:48,24:C,37:24,38:r,39:l,40:27,41:c,42:g,43:u,44:x,45:d,46:p,47:f,48:y,49:m,50:b},{11:52,17:51,24:C,37:24,38:r,39:l,40:27,41:c,42:g,43:u,44:x,45:d,46:p,47:f,48:y,49:m,50:b},{20:[1,53]},{22:[1,54]},t(k,[2,18]),{1:[2,2]},t(k,[2,8]),t(k,[2,9]),t(_,[2,37],{40:55,41:c,42:g,43:u,44:x,45:d,46:p,47:f,48:y,49:m,50:b}),t(_,[2,38]),t(_,[2,39]),t(T,[2,40]),t(T,[2,42]),t(T,[2,43]),t(T,[2,44]),t(T,[2,45]),t(T,[2,46]),t(T,[2,47]),t(T,[2,48]),t(T,[2,49]),t(T,[2,50]),t(T,[2,51]),t(k,[2,10]),t(k,[2,22],{30:41,29:56,24:A,27:w}),t(k,[2,24]),t(k,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:r,39:l,40:27,41:c,42:g,43:u,44:x,45:d,46:p,47:f,48:y,49:m,50:b},t(k,[2,11]),t(k,[2,30],{33:60,27:S}),t(k,[2,32]),{31:[1,61]},t(k,[2,12]),{17:62,24:C},{25:63,27:R},t(k,[2,14]),{17:65,24:C},t(k,[2,16]),t(k,[2,17]),t(T,[2,41]),t(k,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},t(k,[2,31]),{27:[1,69]},t(k,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},t(k,[2,15]),t(k,[2,26]),t(k,[2,27]),{11:59,32:72,37:24,38:r,39:l,40:27,41:c,42:g,43:u,44:x,45:d,46:p,47:f,48:y,49:m,50:b},t(k,[2,33]),t(k,[2,19]),{25:73,27:R},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:function(t,i){if(!i.recoverable){var e=new Error(t);throw e.hash=i,e}this.trace(t)},parse:function(t){var i=this,e=[0],s=[],n=[null],a=[],h=this.table,o="",r=0,l=0,c=a.slice.call(arguments,1),g=Object.create(this.lexer),u={yy:{}};for(var x in this.yy)Object.prototype.hasOwnProperty.call(this.yy,x)&&(u.yy[x]=this.yy[x]);g.setInput(t,u.yy),u.yy.lexer=g,u.yy.parser=this,void 0===g.yylloc&&(g.yylloc={});var d=g.yylloc;a.push(d);var p=g.options&&g.options.ranges;"function"==typeof u.yy.parseError?this.parseError=u.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var f,y,m,b,A,w,S,C,k,_={};;){if(y=e[e.length-1],this.defaultActions[y]?m=this.defaultActions[y]:(null==f&&(k=void 0,"number"!=typeof(k=s.pop()||g.lex()||1)&&(k instanceof Array&&(k=(s=k).pop()),k=i.symbols_[k]||k),f=k),m=h[y]&&h[y][f]),void 0===m||!m.length||!m[0]){var T="";for(A in C=[],h[y])this.terminals_[A]&&A>2&&C.push("'"+this.terminals_[A]+"'");T=g.showPosition?"Parse error on line "+(r+1)+":\n"+g.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[f]||f)+"'":"Parse error on line "+(r+1)+": Unexpected "+(1==f?"end of input":"'"+(this.terminals_[f]||f)+"'"),this.parseError(T,{text:g.match,token:this.terminals_[f]||f,line:g.yylineno,loc:d,expected:C})}if(m[0]instanceof Array&&m.length>1)throw new Error("Parse Error: multiple actions possible at state: "+y+", token: "+f);switch(m[0]){case 1:e.push(f),n.push(g.yytext),a.push(g.yylloc),e.push(m[1]),f=null,l=g.yyleng,o=g.yytext,r=g.yylineno,d=g.yylloc;break;case 2:if(w=this.productions_[m[1]][1],_.$=n[n.length-w],_._$={first_line:a[a.length-(w||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(w||1)].first_column,last_column:a[a.length-1].last_column},p&&(_._$.range=[a[a.length-(w||1)].range[0],a[a.length-1].range[1]]),void 0!==(b=this.performAction.apply(_,[o,l,r,u.yy,m[1],n,a].concat(c))))return b;w&&(e=e.slice(0,-1*w*2),n=n.slice(0,-1*w),a=a.slice(0,-1*w)),e.push(this.productions_[m[1]][0]),n.push(_.$),a.push(_._$),S=h[e[e.length-2]][e[e.length-1]],e.push(S);break;case 3:return!0}}return!0}},L={EOF:1,parseError:function(t,i){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,i)},setInput:function(t,i){return this.yy=i||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var i=t.length,e=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-i),this.offset-=i;var s=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),e.length-1&&(this.yylineno-=e.length-1);var n=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:e?(e.length===s.length?this.yylloc.first_column:0)+s[s.length-e.length].length-e[0].length:this.yylloc.first_column-i},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-i]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),i=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+i+"^"},test_match:function(t,i){var e,s,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(n.yylloc.range=this.yylloc.range.slice(0))),(s=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=s.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:s?s[s.length-1].length-s[s.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],e=this.performAction.call(this,this.yy,this,i,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e)return e;if(this._backtrack){for(var a in n)this[a]=n[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,i,e,s;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),a=0;ai[0].length)){if(i=e,s=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(e,n[a])))return t;if(this._backtrack){i=!1;continue}return!1}if(!this.options.flex)break}return i?!1!==(t=this.test_match(i,n[s]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,i,e,s){switch(e){case 0:case 1:case 5:case 43:break;case 2:case 3:return this.popState(),34;case 4:return 34;case 6:return 10;case 7:return this.pushState("acc_title"),19;case 8:return this.popState(),"acc_title_value";case 9:return this.pushState("acc_descr"),21;case 10:return this.popState(),"acc_descr_value";case 11:this.pushState("acc_descr_multiline");break;case 12:case 25:case 27:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 5;case 15:return 8;case 16:return this.pushState("axis_data"),"X_AXIS";case 17:return this.pushState("axis_data"),"Y_AXIS";case 18:return this.pushState("axis_band_data"),24;case 19:return 31;case 20:return this.pushState("data"),16;case 21:return this.pushState("data"),18;case 22:return this.pushState("data_inner"),24;case 23:return 27;case 24:return this.popState(),26;case 26:this.pushState("string");break;case 28:return"STR";case 29:return 24;case 30:return 26;case 31:return 43;case 32:return"COLON";case 33:return 44;case 34:return 28;case 35:return 45;case 36:return 46;case 37:return 48;case 38:return 50;case 39:return 47;case 40:return 41;case 41:return 49;case 42:return 42;case 44:return 35;case 45:return 36}},rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\{)/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,23,24,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,20,21,22,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,24,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,23,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[27,28],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0}}};function P(){this.yy={}}return D.lexer=L,P.prototype=D,D.Parser=P,new P}());h.parser=h;const o=h;function r(t){return"bar"===t.type}function l(t){return"band"===t.type}function c(t){return"linear"===t.type}class g{constructor(t){this.parentGroup=t}getMaxDimension(t,i){if(!this.parentGroup)return{width:t.reduce(((t,i)=>Math.max(i.length,t)),0)*i,height:i};const e={width:0,height:0},s=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",i);for(const a of t){const t=(0,n.c)(s,1,a),h=t?t.width:a.length*i,o=t?t.height:i;e.width=Math.max(e.width,h),e.height=Math.max(e.height,o)}return s.remove(),e}}class u{constructor(t,i,e,s){this.axisConfig=t,this.title=i,this.textDimensionCalculator=e,this.axisThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.showTitle=!1,this.showLabel=!1,this.showTick=!1,this.showAxisLine=!1,this.outerPadding=0,this.titleTextHeight=0,this.labelTextHeight=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left"}setRange(t){this.range=t,"left"===this.axisPosition||"right"===this.axisPosition?this.boundingRect.height=t[1]-t[0]:this.boundingRect.width=t[1]-t[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(t){this.axisPosition=t,this.setRange(this.range)}getTickDistance(){const t=this.getRange();return Math.abs(t[0]-t[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map((t=>t.toString())),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){.7*this.getTickDistance()>2*this.outerPadding&&(this.outerPadding=Math.floor(.7*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(t){let i=t.height;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const e=this.getLabelDimension(),s=.2*t.width;this.outerPadding=Math.min(e.width/2,s);const n=e.height+2*this.axisConfig.labelPadding;this.labelTextHeight=e.height,n<=i&&(i-=n,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const t=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),e=t.height+2*this.axisConfig.titlePadding;this.titleTextHeight=t.height,e<=i&&(i-=e,this.showTitle=!0)}this.boundingRect.width=t.width,this.boundingRect.height=t.height-i}calculateSpaceIfDrawnVertical(t){let i=t.width;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const e=this.getLabelDimension(),s=.2*t.height;this.outerPadding=Math.min(e.height/2,s);const n=e.width+2*this.axisConfig.labelPadding;n<=i&&(i-=n,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const t=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),e=t.height+2*this.axisConfig.titlePadding;this.titleTextHeight=t.height,e<=i&&(i-=e,this.showTitle=!0)}this.boundingRect.width=t.width-i,this.boundingRect.height=t.height}calculateSpace(t){return"left"===this.axisPosition||"right"===this.axisPosition?this.calculateSpaceIfDrawnVertical(t):this.calculateSpaceIfDrawnHorizontally(t),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}getDrawableElementsForLeftAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${i},${this.boundingRect.y} L ${i},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map((t=>({text:t.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(t),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"})))}),this.showTick){const i=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map((t=>({path:`M ${i},${this.getScaleValue(t)} L ${i-this.axisConfig.tickLength},${this.getScaleValue(t)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth})))})}return this.showTitle&&t.push({type:"text",groupTexts:["left-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForBottomAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.y+this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map((t=>({text:t.toString(),x:this.getScaleValue(t),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"})))}),this.showTick){const i=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map((t=>({path:`M ${this.getScaleValue(t)},${i} L ${this.getScaleValue(t)},${i+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth})))})}return this.showTitle&&t.push({type:"text",groupTexts:["bottom-axis","title"],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForTopAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map((t=>({text:t.toString(),x:this.getScaleValue(t),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+2*this.axisConfig.titlePadding:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"})))}),this.showTick){const i=this.boundingRect.y;t.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map((t=>({path:`M ${this.getScaleValue(t)},${i+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(t)},${i+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth})))})}return this.showTitle&&t.push({type:"text",groupTexts:["top-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElements(){if("left"===this.axisPosition)return this.getDrawableElementsForLeftAxis();if("right"===this.axisPosition)throw Error("Drawing of right axis is not implemented");return"bottom"===this.axisPosition?this.getDrawableElementsForBottomAxis():"top"===this.axisPosition?this.getDrawableElementsForTopAxis():[]}}class x extends u{constructor(t,i,e,s,n){super(t,s,n,i),this.categories=e,this.scale=(0,a.WH)().domain(this.categories).range(this.getRange())}setRange(t){super.setRange(t)}recalculateScale(){this.scale=(0,a.WH)().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),s.l.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(t){return this.scale(t)||this.getRange()[0]}}class d extends u{constructor(t,i,e,s,n){super(t,s,n,i),this.domain=e,this.scale=(0,a.m4Y)().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){const t=[...this.domain];"left"===this.axisPosition&&t.reverse(),this.scale=(0,a.m4Y)().domain(t).range(this.getRange())}getScaleValue(t){return this.scale(t)}}function p(t,i,e,s){const n=new g(s);return l(t)?new x(i,e,t.categories,t.title,n):new d(i,e,[t.min,t.max],t.title,n)}class f{constructor(t,i,e,s){this.textDimensionCalculator=t,this.chartConfig=i,this.chartData=e,this.chartThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){const i=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),e=Math.max(i.width,t.width),s=i.height+2*this.chartConfig.titlePadding;return i.width<=e&&i.height<=s&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=e,this.boundingRect.height=s,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){const t=[];return this.showChartTitle&&t.push({groupTexts:["chart-title"],type:"text",data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:"middle",horizontalPos:"center",x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]}),t}}function y(t,i,e,s){const n=new g(s);return new f(n,t,i,e)}class m{constructor(t,i,e,s,n){this.plotData=t,this.xAxis=i,this.yAxis=e,this.orientation=s,this.plotIndex=n}getDrawableElement(){const t=this.plotData.data.map((t=>[this.xAxis.getScaleValue(t[0]),this.yAxis.getScaleValue(t[1])]));let i;return i="horizontal"===this.orientation?(0,a.n8j)().y((t=>t[0])).x((t=>t[1]))(t):(0,a.n8j)().x((t=>t[0])).y((t=>t[1]))(t),i?[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:i,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}]:[]}}class b{constructor(t,i,e,s,n,a){this.barData=t,this.boundingRect=i,this.xAxis=e,this.yAxis=s,this.orientation=n,this.plotIndex=a}getDrawableElement(){const t=this.barData.data.map((t=>[this.xAxis.getScaleValue(t[0]),this.yAxis.getScaleValue(t[1])])),i=.95*Math.min(2*this.xAxis.getAxisOuterPadding(),this.xAxis.getTickDistance()),e=i/2;return"horizontal"===this.orientation?[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map((t=>({x:this.boundingRect.x,y:t[0]-e,height:i,width:t[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill})))}]:[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map((t=>({x:t[0]-e,y:t[1],width:i,height:this.boundingRect.y+this.boundingRect.height-t[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill})))}]}}class A{constructor(t,i,e){this.chartConfig=t,this.chartData=i,this.chartThemeConfig=e,this.boundingRect={x:0,y:0,width:0,height:0}}setAxes(t,i){this.xAxis=t,this.yAxis=i}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){return this.boundingRect.width=t.width,this.boundingRect.height=t.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!this.xAxis||!this.yAxis)throw Error("Axes must be passed to render Plots");const t=[];for(const[i,e]of this.chartData.plots.entries())switch(e.type){case"line":{const s=new m(e,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...s.getDrawableElement())}break;case"bar":{const s=new b(e,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...s.getDrawableElement())}}return t}}function w(t,i,e){return new A(t,i,e)}class S{constructor(t,i,e,s){this.chartConfig=t,this.chartData=i,this.componentStore={title:y(t,i,e,s),plot:w(t,i,e),xAxis:p(i.xAxis,t.xAxis,{titleColor:e.xAxisTitleColor,labelColor:e.xAxisLabelColor,tickColor:e.xAxisTickColor,axisLineColor:e.xAxisLineColor},s),yAxis:p(i.yAxis,t.yAxis,{titleColor:e.yAxisTitleColor,labelColor:e.yAxisLabelColor,tickColor:e.yAxisTickColor,axisLineColor:e.yAxisLineColor},s)}}calculateVerticalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,e=0,s=0,n=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),a=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),h=this.componentStore.plot.calculateSpace({width:n,height:a});t-=h.width,i-=h.height,h=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),s=h.height,i-=h.height,this.componentStore.xAxis.setAxisPosition("bottom"),h=this.componentStore.xAxis.calculateSpace({width:t,height:i}),i-=h.height,this.componentStore.yAxis.setAxisPosition("left"),h=this.componentStore.yAxis.calculateSpace({width:t,height:i}),e=h.width,t-=h.width,t>0&&(n+=t,t=0),i>0&&(a+=i,i=0),this.componentStore.plot.calculateSpace({width:n,height:a}),this.componentStore.plot.setBoundingBoxXY({x:e,y:s}),this.componentStore.xAxis.setRange([e,e+n]),this.componentStore.xAxis.setBoundingBoxXY({x:e,y:s+a}),this.componentStore.yAxis.setRange([s,s+a]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:s}),this.chartData.plots.some((t=>r(t)))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,e=0,s=0,n=0,a=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),h=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),o=this.componentStore.plot.calculateSpace({width:a,height:h});t-=o.width,i-=o.height,o=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),e=o.height,i-=o.height,this.componentStore.xAxis.setAxisPosition("left"),o=this.componentStore.xAxis.calculateSpace({width:t,height:i}),t-=o.width,s=o.width,this.componentStore.yAxis.setAxisPosition("top"),o=this.componentStore.yAxis.calculateSpace({width:t,height:i}),i-=o.height,n=e+o.height,t>0&&(a+=t,t=0),i>0&&(h+=i,i=0),this.componentStore.plot.calculateSpace({width:a,height:h}),this.componentStore.plot.setBoundingBoxXY({x:s,y:n}),this.componentStore.yAxis.setRange([s,s+a]),this.componentStore.yAxis.setBoundingBoxXY({x:s,y:e}),this.componentStore.xAxis.setRange([n,n+h]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:n}),this.chartData.plots.some((t=>r(t)))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){"horizontal"===this.chartConfig.chartOrientation?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();const t=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(const i of Object.values(this.componentStore))t.push(...i.getDrawableElements());return t}}class C{static build(t,i,e,s){return new S(t,i,e,s).getDrawableElement()}}let k,_=0,T=I(),R=v(),D=M(),L=R.plotColorPalette.split(",").map((t=>t.trim())),P=!1,E=!1;function v(){const t=(0,s.E)(),i=(0,s.F)();return(0,s.C)(t.xyChart,i.themeVariables.xyChart)}function I(){const t=(0,s.F)();return(0,s.C)(s.B.xyChart,t.xyChart)}function M(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}function $(t){const i=(0,s.F)();return(0,s.d)(t.trim(),i)}function z(t,i){D.xAxis={type:"linear",title:D.xAxis.title,min:t,max:i},P=!0}function B(t){let i=[];if(0===t.length)return i;if(!P){const i=c(D.xAxis)?D.xAxis.min:1/0,e=c(D.xAxis)?D.xAxis.max:-1/0;z(Math.min(i,1),Math.max(e,t.length))}if(E||function(t){const i=Math.min(...t),e=Math.max(...t),s=c(D.yAxis)?D.yAxis.min:1/0,n=c(D.yAxis)?D.yAxis.max:-1/0;D.yAxis={type:"linear",title:D.yAxis.title,min:Math.min(s,i),max:Math.max(n,e)}}(t),l(D.xAxis)&&(i=D.xAxis.categories.map(((i,e)=>[i,t[e]]))),c(D.xAxis)){const e=D.xAxis.min,s=D.xAxis.max,n=(s-e+1)/t.length,a=[];for(let t=e;t<=s;t+=n)a.push(`${t}`);i=a.map(((i,e)=>[i,t[e]]))}return i}function W(t){return L[0===t?0:t%L.length]}const F={parser:o,db:{getDrawableElem:function(){if(0===D.plots.length)throw Error("No Plot to render, please provide a plot with some data");return D.title=(0,s.t)(),C.build(T,D,R,k)},clear:function(){(0,s.v)(),_=0,T=I(),D={yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]},R=v(),L=R.plotColorPalette.split(",").map((t=>t.trim())),P=!1,E=!1},setAccTitle:s.s,getAccTitle:s.g,setDiagramTitle:s.q,getDiagramTitle:s.t,getAccDescription:s.a,setAccDescription:s.b,setOrientation:function(t){T.chartOrientation="horizontal"===t?"horizontal":"vertical"},setXAxisTitle:function(t){D.xAxis.title=$(t.text)},setXAxisRangeData:z,setXAxisBand:function(t){D.xAxis={type:"band",title:D.xAxis.title,categories:t.map((t=>$(t.text)))},P=!0},setYAxisTitle:function(t){D.yAxis.title=$(t.text)},setYAxisRangeData:function(t,i){D.yAxis={type:"linear",title:D.yAxis.title,min:t,max:i},E=!0},setLineData:function(t,i){const e=B(i);D.plots.push({type:"line",strokeFill:W(_),strokeWidth:2,data:e}),_++},setBarData:function(t,i){const e=B(i);D.plots.push({type:"bar",fill:W(_),data:e}),_++},setTmpSVGG:function(t){k=t},getChartThemeConfig:function(){return R},getChartConfig:function(){return T}},renderer:{draw:(t,i,e,n)=>{const a=n.db,h=a.getChartThemeConfig(),o=a.getChartConfig();function r(t){return`translate(${t.x}, ${t.y}) rotate(${t.rotation||0})`}s.l.debug("Rendering xychart chart\n"+t);const l=(0,s.A)(i),c=l.append("g").attr("class","main"),g=c.append("rect").attr("width",o.width).attr("height",o.height).attr("class","background");(0,s.i)(l,o.height,o.width,!0),l.attr("viewBox",`0 0 ${o.width} ${o.height}`),g.attr("fill",h.backgroundColor),a.setTmpSVGG(l.append("g").attr("class","mermaid-tmp-group"));const u=a.getDrawableElem(),x={};function d(t){let i=c,e="";for(const[s]of t.entries()){let n=c;s>0&&x[e]&&(n=x[e]),e+=t[s],i=x[e],i||(i=x[e]=n.append("g").attr("class",t[s]))}return i}for(const s of u){if(0===s.data.length)continue;const t=d(s.groupTexts);switch(s.type){case"rect":t.selectAll("rect").data(s.data).enter().append("rect").attr("x",(t=>t.x)).attr("y",(t=>t.y)).attr("width",(t=>t.width)).attr("height",(t=>t.height)).attr("fill",(t=>t.fill)).attr("stroke",(t=>t.strokeFill)).attr("stroke-width",(t=>t.strokeWidth));break;case"text":t.selectAll("text").data(s.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",(t=>t.fill)).attr("font-size",(t=>t.fontSize)).attr("dominant-baseline",(t=>"top"===t.verticalPos?"text-before-edge":"middle")).attr("text-anchor",(t=>{return"left"===(i=t.horizontalPos)?"start":"right"===i?"end":"middle";var i})).attr("transform",(t=>r(t))).text((t=>t.text));break;case"path":t.selectAll("path").data(s.data).enter().append("path").attr("d",(t=>t.path)).attr("fill",(t=>t.fill?t.fill:"none")).attr("stroke",(t=>t.strokeFill)).attr("stroke-width",(t=>t.strokeWidth))}}}}}}}]); \ No newline at end of file diff --git a/assets/js/141.c027049c.js b/assets/js/141.c027049c.js deleted file mode 100644 index 0294f963b6b2..000000000000 --- a/assets/js/141.c027049c.js +++ /dev/null @@ -1,26176 +0,0 @@ -"use strict"; -exports.id = 141; -exports.ids = [141]; -exports.modules = { - -/***/ 21176: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - Zp: () => (/* reexport */ layout) -}); - -// UNUSED EXPORTS: acyclic, normalize, rank - -// EXTERNAL MODULE: ./node_modules/lodash-es/forEach.js -var forEach = __webpack_require__(8058); -// EXTERNAL MODULE: ./node_modules/lodash-es/uniqueId.js -var uniqueId = __webpack_require__(5664); -// EXTERNAL MODULE: ./node_modules/lodash-es/has.js + 1 modules -var has = __webpack_require__(48585); -// EXTERNAL MODULE: ./node_modules/lodash-es/constant.js -var constant = __webpack_require__(39142); -// EXTERNAL MODULE: ./node_modules/lodash-es/flatten.js -var flatten = __webpack_require__(34098); -// EXTERNAL MODULE: ./node_modules/lodash-es/map.js -var map = __webpack_require__(74722); -// EXTERNAL MODULE: ./node_modules/lodash-es/range.js + 2 modules -var range = __webpack_require__(91395); -// EXTERNAL MODULE: ./node_modules/dagre-d3-es/src/graphlib/index.js -var graphlib = __webpack_require__(697); -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/data/list.js -/* - * Simple doubly linked list implementation derived from Cormen, et al., - * "Introduction to Algorithms". - */ - - - -class List { - constructor() { - var sentinel = {}; - sentinel._next = sentinel._prev = sentinel; - this._sentinel = sentinel; - } - dequeue() { - var sentinel = this._sentinel; - var entry = sentinel._prev; - if (entry !== sentinel) { - unlink(entry); - return entry; - } - } - enqueue(entry) { - var sentinel = this._sentinel; - if (entry._prev && entry._next) { - unlink(entry); - } - entry._next = sentinel._next; - sentinel._next._prev = entry; - sentinel._next = entry; - entry._prev = sentinel; - } - toString() { - var strs = []; - var sentinel = this._sentinel; - var curr = sentinel._prev; - while (curr !== sentinel) { - strs.push(JSON.stringify(curr, filterOutLinks)); - curr = curr._prev; - } - return '[' + strs.join(', ') + ']'; - } -} - -function unlink(entry) { - entry._prev._next = entry._next; - entry._next._prev = entry._prev; - delete entry._next; - delete entry._prev; -} - -function filterOutLinks(k, v) { - if (k !== '_next' && k !== '_prev') { - return v; - } -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/greedy-fas.js - - - - -/* - * A greedy heuristic for finding a feedback arc set for a graph. A feedback - * arc set is a set of edges that can be removed to make a graph acyclic. - * The algorithm comes from: P. Eades, X. Lin, and W. F. Smyth, "A fast and - * effective heuristic for the feedback arc set problem." This implementation - * adjusts that from the paper to allow for weighted edges. - */ - - -var DEFAULT_WEIGHT_FN = constant/* default */.A(1); - -function greedyFAS(g, weightFn) { - if (g.nodeCount() <= 1) { - return []; - } - var state = buildState(g, weightFn || DEFAULT_WEIGHT_FN); - var results = doGreedyFAS(state.graph, state.buckets, state.zeroIdx); - - // Expand multi-edges - return flatten/* default */.A( - map/* default */.A(results, function (e) { - return g.outEdges(e.v, e.w); - }) - ); -} - -function doGreedyFAS(g, buckets, zeroIdx) { - var results = []; - var sources = buckets[buckets.length - 1]; - var sinks = buckets[0]; - - var entry; - while (g.nodeCount()) { - while ((entry = sinks.dequeue())) { - removeNode(g, buckets, zeroIdx, entry); - } - while ((entry = sources.dequeue())) { - removeNode(g, buckets, zeroIdx, entry); - } - if (g.nodeCount()) { - for (var i = buckets.length - 2; i > 0; --i) { - entry = buckets[i].dequeue(); - if (entry) { - results = results.concat(removeNode(g, buckets, zeroIdx, entry, true)); - break; - } - } - } - } - - return results; -} - -function removeNode(g, buckets, zeroIdx, entry, collectPredecessors) { - var results = collectPredecessors ? [] : undefined; - - forEach/* default */.A(g.inEdges(entry.v), function (edge) { - var weight = g.edge(edge); - var uEntry = g.node(edge.v); - - if (collectPredecessors) { - results.push({ v: edge.v, w: edge.w }); - } - - uEntry.out -= weight; - assignBucket(buckets, zeroIdx, uEntry); - }); - - forEach/* default */.A(g.outEdges(entry.v), function (edge) { - var weight = g.edge(edge); - var w = edge.w; - var wEntry = g.node(w); - wEntry['in'] -= weight; - assignBucket(buckets, zeroIdx, wEntry); - }); - - g.removeNode(entry.v); - - return results; -} - -function buildState(g, weightFn) { - var fasGraph = new graphlib/* Graph */.T(); - var maxIn = 0; - var maxOut = 0; - - forEach/* default */.A(g.nodes(), function (v) { - fasGraph.setNode(v, { v: v, in: 0, out: 0 }); - }); - - // Aggregate weights on nodes, but also sum the weights across multi-edges - // into a single edge for the fasGraph. - forEach/* default */.A(g.edges(), function (e) { - var prevWeight = fasGraph.edge(e.v, e.w) || 0; - var weight = weightFn(e); - var edgeWeight = prevWeight + weight; - fasGraph.setEdge(e.v, e.w, edgeWeight); - maxOut = Math.max(maxOut, (fasGraph.node(e.v).out += weight)); - maxIn = Math.max(maxIn, (fasGraph.node(e.w)['in'] += weight)); - }); - - var buckets = range/* default */.A(maxOut + maxIn + 3).map(function () { - return new List(); - }); - var zeroIdx = maxIn + 1; - - forEach/* default */.A(fasGraph.nodes(), function (v) { - assignBucket(buckets, zeroIdx, fasGraph.node(v)); - }); - - return { graph: fasGraph, buckets: buckets, zeroIdx: zeroIdx }; -} - -function assignBucket(buckets, zeroIdx, entry) { - if (!entry.out) { - buckets[0].enqueue(entry); - } else if (!entry['in']) { - buckets[buckets.length - 1].enqueue(entry); - } else { - buckets[entry.out - entry['in'] + zeroIdx].enqueue(entry); - } -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/acyclic.js - - - - - -function run(g) { - var fas = g.graph().acyclicer === 'greedy' ? greedyFAS(g, weightFn(g)) : dfsFAS(g); - forEach/* default */.A(fas, function (e) { - var label = g.edge(e); - g.removeEdge(e); - label.forwardName = e.name; - label.reversed = true; - g.setEdge(e.w, e.v, label, uniqueId/* default */.A('rev')); - }); - - function weightFn(g) { - return function (e) { - return g.edge(e).weight; - }; - } -} - -function dfsFAS(g) { - var fas = []; - var stack = {}; - var visited = {}; - - function dfs(v) { - if (has/* default */.A(visited, v)) { - return; - } - visited[v] = true; - stack[v] = true; - forEach/* default */.A(g.outEdges(v), function (e) { - if (has/* default */.A(stack, e.w)) { - fas.push(e); - } else { - dfs(e.w); - } - }); - delete stack[v]; - } - - forEach/* default */.A(g.nodes(), dfs); - return fas; -} - -function undo(g) { - forEach/* default */.A(g.edges(), function (e) { - var label = g.edge(e); - if (label.reversed) { - g.removeEdge(e); - - var forwardName = label.forwardName; - delete label.reversed; - delete label.forwardName; - g.setEdge(e.w, e.v, label, forwardName); - } - }); -} - -// EXTERNAL MODULE: ./node_modules/lodash-es/merge.js + 6 modules -var merge = __webpack_require__(98879); -// EXTERNAL MODULE: ./node_modules/lodash-es/pick.js + 4 modules -var pick = __webpack_require__(81942); -// EXTERNAL MODULE: ./node_modules/lodash-es/defaults.js -var defaults = __webpack_require__(23068); -// EXTERNAL MODULE: ./node_modules/lodash-es/isSymbol.js -var isSymbol = __webpack_require__(61882); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseExtremum.js - - -/** - * The base implementation of methods like `_.max` and `_.min` which accepts a - * `comparator` to determine the extremum value. - * - * @private - * @param {Array} array The array to iterate over. - * @param {Function} iteratee The iteratee invoked per iteration. - * @param {Function} comparator The comparator used to compare values. - * @returns {*} Returns the extremum value. - */ -function baseExtremum(array, iteratee, comparator) { - var index = -1, - length = array.length; - - while (++index < length) { - var value = array[index], - current = iteratee(value); - - if (current != null && (computed === undefined - ? (current === current && !(0,isSymbol/* default */.A)(current)) - : comparator(current, computed) - )) { - var computed = current, - result = value; - } - } - return result; -} - -/* harmony default export */ const _baseExtremum = (baseExtremum); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseGt.js -/** - * The base implementation of `_.gt` which doesn't coerce arguments. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if `value` is greater than `other`, - * else `false`. - */ -function baseGt(value, other) { - return value > other; -} - -/* harmony default export */ const _baseGt = (baseGt); - -// EXTERNAL MODULE: ./node_modules/lodash-es/identity.js -var identity = __webpack_require__(29008); -;// CONCATENATED MODULE: ./node_modules/lodash-es/max.js - - - - -/** - * Computes the maximum value of `array`. If `array` is empty or falsey, - * `undefined` is returned. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Math - * @param {Array} array The array to iterate over. - * @returns {*} Returns the maximum value. - * @example - * - * _.max([4, 2, 8, 6]); - * // => 8 - * - * _.max([]); - * // => undefined - */ -function max(array) { - return (array && array.length) - ? _baseExtremum(array, identity/* default */.A, _baseGt) - : undefined; -} - -/* harmony default export */ const lodash_es_max = (max); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/last.js -/** - * Gets the last element of `array`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to query. - * @returns {*} Returns the last element of `array`. - * @example - * - * _.last([1, 2, 3]); - * // => 3 - */ -function last(array) { - var length = array == null ? 0 : array.length; - return length ? array[length - 1] : undefined; -} - -/* harmony default export */ const lodash_es_last = (last); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseAssignValue.js -var _baseAssignValue = __webpack_require__(52528); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseForOwn.js -var _baseForOwn = __webpack_require__(79841); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseIteratee.js + 16 modules -var _baseIteratee = __webpack_require__(49574); -;// CONCATENATED MODULE: ./node_modules/lodash-es/mapValues.js - - - - -/** - * Creates an object with the same keys as `object` and values generated - * by running each own enumerable string keyed property of `object` thru - * `iteratee`. The iteratee is invoked with three arguments: - * (value, key, object). - * - * @static - * @memberOf _ - * @since 2.4.0 - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Object} Returns the new mapped object. - * @see _.mapKeys - * @example - * - * var users = { - * 'fred': { 'user': 'fred', 'age': 40 }, - * 'pebbles': { 'user': 'pebbles', 'age': 1 } - * }; - * - * _.mapValues(users, function(o) { return o.age; }); - * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) - * - * // The `_.property` iteratee shorthand. - * _.mapValues(users, 'age'); - * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) - */ -function mapValues(object, iteratee) { - var result = {}; - iteratee = (0,_baseIteratee/* default */.A)(iteratee, 3); - - (0,_baseForOwn/* default */.A)(object, function(value, key, object) { - (0,_baseAssignValue/* default */.A)(result, key, iteratee(value, key, object)); - }); - return result; -} - -/* harmony default export */ const lodash_es_mapValues = (mapValues); - -// EXTERNAL MODULE: ./node_modules/lodash-es/isUndefined.js -var isUndefined = __webpack_require__(69592); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseLt.js -/** - * The base implementation of `_.lt` which doesn't coerce arguments. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if `value` is less than `other`, - * else `false`. - */ -function baseLt(value, other) { - return value < other; -} - -/* harmony default export */ const _baseLt = (baseLt); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/min.js - - - - -/** - * Computes the minimum value of `array`. If `array` is empty or falsey, - * `undefined` is returned. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Math - * @param {Array} array The array to iterate over. - * @returns {*} Returns the minimum value. - * @example - * - * _.min([4, 2, 8, 6]); - * // => 2 - * - * _.min([]); - * // => undefined - */ -function min(array) { - return (array && array.length) - ? _baseExtremum(array, identity/* default */.A, _baseLt) - : undefined; -} - -/* harmony default export */ const lodash_es_min = (min); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_root.js -var _root = __webpack_require__(41917); -;// CONCATENATED MODULE: ./node_modules/lodash-es/now.js - - -/** - * Gets the timestamp of the number of milliseconds that have elapsed since - * the Unix epoch (1 January 1970 00:00:00 UTC). - * - * @static - * @memberOf _ - * @since 2.4.0 - * @category Date - * @returns {number} Returns the timestamp. - * @example - * - * _.defer(function(stamp) { - * console.log(_.now() - stamp); - * }, _.now()); - * // => Logs the number of milliseconds it took for the deferred invocation. - */ -var now = function() { - return _root/* default */.A.Date.now(); -}; - -/* harmony default export */ const lodash_es_now = (now); - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/util.js - - - - - -/* - * Adds a dummy node to the graph and return v. - */ -function addDummyNode(g, type, attrs, name) { - var v; - do { - v = uniqueId/* default */.A(name); - } while (g.hasNode(v)); - - attrs.dummy = type; - g.setNode(v, attrs); - return v; -} - -/* - * Returns a new graph with only simple edges. Handles aggregation of data - * associated with multi-edges. - */ -function simplify(g) { - var simplified = new graphlib/* Graph */.T().setGraph(g.graph()); - forEach/* default */.A(g.nodes(), function (v) { - simplified.setNode(v, g.node(v)); - }); - forEach/* default */.A(g.edges(), function (e) { - var simpleLabel = simplified.edge(e.v, e.w) || { weight: 0, minlen: 1 }; - var label = g.edge(e); - simplified.setEdge(e.v, e.w, { - weight: simpleLabel.weight + label.weight, - minlen: Math.max(simpleLabel.minlen, label.minlen), - }); - }); - return simplified; -} - -function asNonCompoundGraph(g) { - var simplified = new graphlib/* Graph */.T({ multigraph: g.isMultigraph() }).setGraph(g.graph()); - forEach/* default */.A(g.nodes(), function (v) { - if (!g.children(v).length) { - simplified.setNode(v, g.node(v)); - } - }); - forEach/* default */.A(g.edges(), function (e) { - simplified.setEdge(e, g.edge(e)); - }); - return simplified; -} - -function successorWeights(g) { - var weightMap = _.map(g.nodes(), function (v) { - var sucs = {}; - _.forEach(g.outEdges(v), function (e) { - sucs[e.w] = (sucs[e.w] || 0) + g.edge(e).weight; - }); - return sucs; - }); - return _.zipObject(g.nodes(), weightMap); -} - -function predecessorWeights(g) { - var weightMap = _.map(g.nodes(), function (v) { - var preds = {}; - _.forEach(g.inEdges(v), function (e) { - preds[e.v] = (preds[e.v] || 0) + g.edge(e).weight; - }); - return preds; - }); - return _.zipObject(g.nodes(), weightMap); -} - -/* - * Finds where a line starting at point ({x, y}) would intersect a rectangle - * ({x, y, width, height}) if it were pointing at the rectangle's center. - */ -function intersectRect(rect, point) { - var x = rect.x; - var y = rect.y; - - // Rectangle intersection algorithm from: - // http://math.stackexchange.com/questions/108113/find-edge-between-two-boxes - var dx = point.x - x; - var dy = point.y - y; - var w = rect.width / 2; - var h = rect.height / 2; - - if (!dx && !dy) { - throw new Error('Not possible to find intersection inside of the rectangle'); - } - - var sx, sy; - if (Math.abs(dy) * w > Math.abs(dx) * h) { - // Intersection is top or bottom of rect. - if (dy < 0) { - h = -h; - } - sx = (h * dx) / dy; - sy = h; - } else { - // Intersection is left or right of rect. - if (dx < 0) { - w = -w; - } - sx = w; - sy = (w * dy) / dx; - } - - return { x: x + sx, y: y + sy }; -} - -/* - * Given a DAG with each node assigned "rank" and "order" properties, this - * function will produce a matrix with the ids of each node. - */ -function buildLayerMatrix(g) { - var layering = map/* default */.A(range/* default */.A(util_maxRank(g) + 1), function () { - return []; - }); - forEach/* default */.A(g.nodes(), function (v) { - var node = g.node(v); - var rank = node.rank; - if (!isUndefined/* default */.A(rank)) { - layering[rank][node.order] = v; - } - }); - return layering; -} - -/* - * Adjusts the ranks for all nodes in the graph such that all nodes v have - * rank(v) >= 0 and at least one node w has rank(w) = 0. - */ -function normalizeRanks(g) { - var min = lodash_es_min( - map/* default */.A(g.nodes(), function (v) { - return g.node(v).rank; - }) - ); - forEach/* default */.A(g.nodes(), function (v) { - var node = g.node(v); - if (has/* default */.A(node, 'rank')) { - node.rank -= min; - } - }); -} - -function removeEmptyRanks(g) { - // Ranks may not start at 0, so we need to offset them - var offset = lodash_es_min( - map/* default */.A(g.nodes(), function (v) { - return g.node(v).rank; - }) - ); - - var layers = []; - forEach/* default */.A(g.nodes(), function (v) { - var rank = g.node(v).rank - offset; - if (!layers[rank]) { - layers[rank] = []; - } - layers[rank].push(v); - }); - - var delta = 0; - var nodeRankFactor = g.graph().nodeRankFactor; - forEach/* default */.A(layers, function (vs, i) { - if (isUndefined/* default */.A(vs) && i % nodeRankFactor !== 0) { - --delta; - } else if (delta) { - forEach/* default */.A(vs, function (v) { - g.node(v).rank += delta; - }); - } - }); -} - -function addBorderNode(g, prefix, rank, order) { - var node = { - width: 0, - height: 0, - }; - if (arguments.length >= 4) { - node.rank = rank; - node.order = order; - } - return addDummyNode(g, 'border', node, prefix); -} - -function util_maxRank(g) { - return lodash_es_max( - map/* default */.A(g.nodes(), function (v) { - var rank = g.node(v).rank; - if (!isUndefined/* default */.A(rank)) { - return rank; - } - }) - ); -} - -/* - * Partition a collection into two groups: `lhs` and `rhs`. If the supplied - * function returns true for an entry it goes into `lhs`. Otherwise it goes - * into `rhs. - */ -function partition(collection, fn) { - var result = { lhs: [], rhs: [] }; - forEach/* default */.A(collection, function (value) { - if (fn(value)) { - result.lhs.push(value); - } else { - result.rhs.push(value); - } - }); - return result; -} - -/* - * Returns a new function that wraps `fn` with a timer. The wrapper logs the - * time it takes to execute the function. - */ -function util_time(name, fn) { - var start = lodash_es_now(); - try { - return fn(); - } finally { - console.log(name + ' time: ' + (lodash_es_now() - start) + 'ms'); - } -} - -function notime(name, fn) { - return fn(); -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/add-border-segments.js - - - - - -function addBorderSegments(g) { - function dfs(v) { - var children = g.children(v); - var node = g.node(v); - if (children.length) { - forEach/* default */.A(children, dfs); - } - - if (has/* default */.A(node, 'minRank')) { - node.borderLeft = []; - node.borderRight = []; - for (var rank = node.minRank, maxRank = node.maxRank + 1; rank < maxRank; ++rank) { - add_border_segments_addBorderNode(g, 'borderLeft', '_bl', v, node, rank); - add_border_segments_addBorderNode(g, 'borderRight', '_br', v, node, rank); - } - } - } - - forEach/* default */.A(g.children(), dfs); -} - -function add_border_segments_addBorderNode(g, prop, prefix, sg, sgNode, rank) { - var label = { width: 0, height: 0, rank: rank, borderType: prop }; - var prev = sgNode[prop][rank - 1]; - var curr = addDummyNode(g, 'border', label, prefix); - sgNode[prop][rank] = curr; - g.setParent(curr, sg); - if (prev) { - g.setEdge(prev, curr, { weight: 1 }); - } -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/coordinate-system.js - - - - -function adjust(g) { - var rankDir = g.graph().rankdir.toLowerCase(); - if (rankDir === 'lr' || rankDir === 'rl') { - swapWidthHeight(g); - } -} - -function coordinate_system_undo(g) { - var rankDir = g.graph().rankdir.toLowerCase(); - if (rankDir === 'bt' || rankDir === 'rl') { - reverseY(g); - } - - if (rankDir === 'lr' || rankDir === 'rl') { - swapXY(g); - swapWidthHeight(g); - } -} - -function swapWidthHeight(g) { - forEach/* default */.A(g.nodes(), function (v) { - swapWidthHeightOne(g.node(v)); - }); - forEach/* default */.A(g.edges(), function (e) { - swapWidthHeightOne(g.edge(e)); - }); -} - -function swapWidthHeightOne(attrs) { - var w = attrs.width; - attrs.width = attrs.height; - attrs.height = w; -} - -function reverseY(g) { - forEach/* default */.A(g.nodes(), function (v) { - reverseYOne(g.node(v)); - }); - - forEach/* default */.A(g.edges(), function (e) { - var edge = g.edge(e); - forEach/* default */.A(edge.points, reverseYOne); - if (has/* default */.A(edge, 'y')) { - reverseYOne(edge); - } - }); -} - -function reverseYOne(attrs) { - attrs.y = -attrs.y; -} - -function swapXY(g) { - forEach/* default */.A(g.nodes(), function (v) { - swapXYOne(g.node(v)); - }); - - forEach/* default */.A(g.edges(), function (e) { - var edge = g.edge(e); - forEach/* default */.A(edge.points, swapXYOne); - if (has/* default */.A(edge, 'x')) { - swapXYOne(edge); - } - }); -} - -function swapXYOne(attrs) { - var x = attrs.x; - attrs.x = attrs.y; - attrs.y = x; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/normalize.js - - - - - -/* - * Breaks any long edges in the graph into short segments that span 1 layer - * each. This operation is undoable with the denormalize function. - * - * Pre-conditions: - * - * 1. The input graph is a DAG. - * 2. Each node in the graph has a "rank" property. - * - * Post-condition: - * - * 1. All edges in the graph have a length of 1. - * 2. Dummy nodes are added where edges have been split into segments. - * 3. The graph is augmented with a "dummyChains" attribute which contains - * the first dummy in each chain of dummy nodes produced. - */ -function normalize_run(g) { - g.graph().dummyChains = []; - forEach/* default */.A(g.edges(), function (edge) { - normalizeEdge(g, edge); - }); -} - -function normalizeEdge(g, e) { - var v = e.v; - var vRank = g.node(v).rank; - var w = e.w; - var wRank = g.node(w).rank; - var name = e.name; - var edgeLabel = g.edge(e); - var labelRank = edgeLabel.labelRank; - - if (wRank === vRank + 1) return; - - g.removeEdge(e); - - var dummy, attrs, i; - for (i = 0, ++vRank; vRank < wRank; ++i, ++vRank) { - edgeLabel.points = []; - attrs = { - width: 0, - height: 0, - edgeLabel: edgeLabel, - edgeObj: e, - rank: vRank, - }; - dummy = addDummyNode(g, 'edge', attrs, '_d'); - if (vRank === labelRank) { - attrs.width = edgeLabel.width; - attrs.height = edgeLabel.height; - // @ts-expect-error - attrs.dummy = 'edge-label'; - // @ts-expect-error - attrs.labelpos = edgeLabel.labelpos; - } - g.setEdge(v, dummy, { weight: edgeLabel.weight }, name); - if (i === 0) { - g.graph().dummyChains.push(dummy); - } - v = dummy; - } - - g.setEdge(v, w, { weight: edgeLabel.weight }, name); -} - -function normalize_undo(g) { - forEach/* default */.A(g.graph().dummyChains, function (v) { - var node = g.node(v); - var origLabel = node.edgeLabel; - var w; - g.setEdge(node.edgeObj, origLabel); - while (node.dummy) { - w = g.successors(v)[0]; - g.removeNode(v); - origLabel.points.push({ x: node.x, y: node.y }); - if (node.dummy === 'edge-label') { - origLabel.x = node.x; - origLabel.y = node.y; - origLabel.width = node.width; - origLabel.height = node.height; - } - v = w; - node = g.node(v); - } - }); -} - -;// CONCATENATED MODULE: ./node_modules/lodash-es/minBy.js - - - - -/** - * This method is like `_.min` except that it accepts `iteratee` which is - * invoked for each element in `array` to generate the criterion by which - * the value is ranked. The iteratee is invoked with one argument: (value). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Math - * @param {Array} array The array to iterate over. - * @param {Function} [iteratee=_.identity] The iteratee invoked per element. - * @returns {*} Returns the minimum value. - * @example - * - * var objects = [{ 'n': 1 }, { 'n': 2 }]; - * - * _.minBy(objects, function(o) { return o.n; }); - * // => { 'n': 1 } - * - * // The `_.property` iteratee shorthand. - * _.minBy(objects, 'n'); - * // => { 'n': 1 } - */ -function minBy(array, iteratee) { - return (array && array.length) - ? _baseExtremum(array, (0,_baseIteratee/* default */.A)(iteratee, 2), _baseLt) - : undefined; -} - -/* harmony default export */ const lodash_es_minBy = (minBy); - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/rank/util.js - - - - -/* - * Initializes ranks for the input graph using the longest path algorithm. This - * algorithm scales well and is fast in practice, it yields rather poor - * solutions. Nodes are pushed to the lowest layer possible, leaving the bottom - * ranks wide and leaving edges longer than necessary. However, due to its - * speed, this algorithm is good for getting an initial ranking that can be fed - * into other algorithms. - * - * This algorithm does not normalize layers because it will be used by other - * algorithms in most cases. If using this algorithm directly, be sure to - * run normalize at the end. - * - * Pre-conditions: - * - * 1. Input graph is a DAG. - * 2. Input graph node labels can be assigned properties. - * - * Post-conditions: - * - * 1. Each node will be assign an (unnormalized) "rank" property. - */ -function longestPath(g) { - var visited = {}; - - function dfs(v) { - var label = g.node(v); - if (has/* default */.A(visited, v)) { - return label.rank; - } - visited[v] = true; - - var rank = lodash_es_min( - map/* default */.A(g.outEdges(v), function (e) { - return dfs(e.w) - g.edge(e).minlen; - }) - ); - - if ( - rank === Number.POSITIVE_INFINITY || // return value of _.map([]) for Lodash 3 - rank === undefined || // return value of _.map([]) for Lodash 4 - rank === null - ) { - // return value of _.map([null]) - rank = 0; - } - - return (label.rank = rank); - } - - forEach/* default */.A(g.sources(), dfs); -} - -/* - * Returns the amount of slack for the given edge. The slack is defined as the - * difference between the length of the edge and its minimum length. - */ -function slack(g, e) { - return g.node(e.w).rank - g.node(e.v).rank - g.edge(e).minlen; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/rank/feasible-tree.js - - - - - - -/* - * Constructs a spanning tree with tight edges and adjusted the input node's - * ranks to achieve this. A tight edge is one that is has a length that matches - * its "minlen" attribute. - * - * The basic structure for this function is derived from Gansner, et al., "A - * Technique for Drawing Directed Graphs." - * - * Pre-conditions: - * - * 1. Graph must be a DAG. - * 2. Graph must be connected. - * 3. Graph must have at least one node. - * 5. Graph nodes must have been previously assigned a "rank" property that - * respects the "minlen" property of incident edges. - * 6. Graph edges must have a "minlen" property. - * - * Post-conditions: - * - * - Graph nodes will have their rank adjusted to ensure that all edges are - * tight. - * - * Returns a tree (undirected graph) that is constructed using only "tight" - * edges. - */ -function feasibleTree(g) { - var t = new graphlib/* Graph */.T({ directed: false }); - - // Choose arbitrary node from which to start our tree - var start = g.nodes()[0]; - var size = g.nodeCount(); - t.setNode(start, {}); - - var edge, delta; - while (tightTree(t, g) < size) { - edge = findMinSlackEdge(t, g); - delta = t.hasNode(edge.v) ? slack(g, edge) : -slack(g, edge); - shiftRanks(t, g, delta); - } - - return t; -} - -/* - * Finds a maximal tree of tight edges and returns the number of nodes in the - * tree. - */ -function tightTree(t, g) { - function dfs(v) { - forEach/* default */.A(g.nodeEdges(v), function (e) { - var edgeV = e.v, - w = v === edgeV ? e.w : edgeV; - if (!t.hasNode(w) && !slack(g, e)) { - t.setNode(w, {}); - t.setEdge(v, w, {}); - dfs(w); - } - }); - } - - forEach/* default */.A(t.nodes(), dfs); - return t.nodeCount(); -} - -/* - * Finds the edge with the smallest slack that is incident on tree and returns - * it. - */ -function findMinSlackEdge(t, g) { - return lodash_es_minBy(g.edges(), function (e) { - if (t.hasNode(e.v) !== t.hasNode(e.w)) { - return slack(g, e); - } - }); -} - -function shiftRanks(t, g, delta) { - forEach/* default */.A(t.nodes(), function (v) { - g.node(v).rank += delta; - }); -} - -// EXTERNAL MODULE: ./node_modules/lodash-es/isArrayLike.js -var isArrayLike = __webpack_require__(38446); -// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js -var keys = __webpack_require__(27422); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_createFind.js - - - - -/** - * Creates a `_.find` or `_.findLast` function. - * - * @private - * @param {Function} findIndexFunc The function to find the collection index. - * @returns {Function} Returns the new find function. - */ -function createFind(findIndexFunc) { - return function(collection, predicate, fromIndex) { - var iterable = Object(collection); - if (!(0,isArrayLike/* default */.A)(collection)) { - var iteratee = (0,_baseIteratee/* default */.A)(predicate, 3); - collection = (0,keys/* default */.A)(collection); - predicate = function(key) { return iteratee(iterable[key], key, iterable); }; - } - var index = findIndexFunc(collection, predicate, fromIndex); - return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined; - }; -} - -/* harmony default export */ const _createFind = (createFind); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFindIndex.js -var _baseFindIndex = __webpack_require__(25707); -// EXTERNAL MODULE: ./node_modules/lodash-es/toFinite.js + 3 modules -var toFinite = __webpack_require__(74342); -;// CONCATENATED MODULE: ./node_modules/lodash-es/toInteger.js - - -/** - * Converts `value` to an integer. - * - * **Note:** This method is loosely based on - * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {number} Returns the converted integer. - * @example - * - * _.toInteger(3.2); - * // => 3 - * - * _.toInteger(Number.MIN_VALUE); - * // => 0 - * - * _.toInteger(Infinity); - * // => 1.7976931348623157e+308 - * - * _.toInteger('3.2'); - * // => 3 - */ -function toInteger(value) { - var result = (0,toFinite/* default */.A)(value), - remainder = result % 1; - - return result === result ? (remainder ? result - remainder : result) : 0; -} - -/* harmony default export */ const lodash_es_toInteger = (toInteger); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/findIndex.js - - - - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max; - -/** - * This method is like `_.find` except that it returns the index of the first - * element `predicate` returns truthy for instead of the element itself. - * - * @static - * @memberOf _ - * @since 1.1.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @param {number} [fromIndex=0] The index to search from. - * @returns {number} Returns the index of the found element, else `-1`. - * @example - * - * var users = [ - * { 'user': 'barney', 'active': false }, - * { 'user': 'fred', 'active': false }, - * { 'user': 'pebbles', 'active': true } - * ]; - * - * _.findIndex(users, function(o) { return o.user == 'barney'; }); - * // => 0 - * - * // The `_.matches` iteratee shorthand. - * _.findIndex(users, { 'user': 'fred', 'active': false }); - * // => 1 - * - * // The `_.matchesProperty` iteratee shorthand. - * _.findIndex(users, ['active', false]); - * // => 0 - * - * // The `_.property` iteratee shorthand. - * _.findIndex(users, 'active'); - * // => 2 - */ -function findIndex(array, predicate, fromIndex) { - var length = array == null ? 0 : array.length; - if (!length) { - return -1; - } - var index = fromIndex == null ? 0 : lodash_es_toInteger(fromIndex); - if (index < 0) { - index = nativeMax(length + index, 0); - } - return (0,_baseFindIndex/* default */.A)(array, (0,_baseIteratee/* default */.A)(predicate, 3), index); -} - -/* harmony default export */ const lodash_es_findIndex = (findIndex); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/find.js - - - -/** - * Iterates over elements of `collection`, returning the first element - * `predicate` returns truthy for. The predicate is invoked with three - * arguments: (value, index|key, collection). - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to inspect. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @param {number} [fromIndex=0] The index to search from. - * @returns {*} Returns the matched element, else `undefined`. - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': true }, - * { 'user': 'fred', 'age': 40, 'active': false }, - * { 'user': 'pebbles', 'age': 1, 'active': true } - * ]; - * - * _.find(users, function(o) { return o.age < 40; }); - * // => object for 'barney' - * - * // The `_.matches` iteratee shorthand. - * _.find(users, { 'age': 1, 'active': true }); - * // => object for 'pebbles' - * - * // The `_.matchesProperty` iteratee shorthand. - * _.find(users, ['active', false]); - * // => object for 'fred' - * - * // The `_.property` iteratee shorthand. - * _.find(users, 'active'); - * // => object for 'barney' - */ -var find = _createFind(lodash_es_findIndex); - -/* harmony default export */ const lodash_es_find = (find); - -// EXTERNAL MODULE: ./node_modules/lodash-es/filter.js + 1 modules -var filter = __webpack_require__(11662); -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/dijkstra.js - - - - - -var DEFAULT_WEIGHT_FUNC = constant/* default */.A(1); - -function dijkstra_dijkstra(g, source, weightFn, edgeFn) { - return runDijkstra( - g, - String(source), - weightFn || DEFAULT_WEIGHT_FUNC, - edgeFn || - function (v) { - return g.outEdges(v); - } - ); -} - -function runDijkstra(g, source, weightFn, edgeFn) { - var results = {}; - var pq = new PriorityQueue(); - var v, vEntry; - - var updateNeighbors = function (edge) { - var w = edge.v !== v ? edge.v : edge.w; - var wEntry = results[w]; - var weight = weightFn(edge); - var distance = vEntry.distance + weight; - - if (weight < 0) { - throw new Error( - 'dijkstra does not allow negative edge weights. ' + - 'Bad edge: ' + - edge + - ' Weight: ' + - weight - ); - } - - if (distance < wEntry.distance) { - wEntry.distance = distance; - wEntry.predecessor = v; - pq.decrease(w, distance); - } - }; - - g.nodes().forEach(function (v) { - var distance = v === source ? 0 : Number.POSITIVE_INFINITY; - results[v] = { distance: distance }; - pq.add(v, distance); - }); - - while (pq.size() > 0) { - v = pq.removeMin(); - vEntry = results[v]; - if (vEntry.distance === Number.POSITIVE_INFINITY) { - break; - } - - edgeFn(v).forEach(updateNeighbors); - } - - return results; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/dijkstra-all.js - - - - - -function dijkstraAll(g, weightFunc, edgeFunc) { - return _.transform( - g.nodes(), - function (acc, v) { - acc[v] = dijkstra(g, v, weightFunc, edgeFunc); - }, - {} - ); -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/floyd-warshall.js - - - - -var floyd_warshall_DEFAULT_WEIGHT_FUNC = constant/* default */.A(1); - -function floydWarshall(g, weightFn, edgeFn) { - return runFloydWarshall( - g, - weightFn || floyd_warshall_DEFAULT_WEIGHT_FUNC, - edgeFn || - function (v) { - return g.outEdges(v); - } - ); -} - -function runFloydWarshall(g, weightFn, edgeFn) { - var results = {}; - var nodes = g.nodes(); - - nodes.forEach(function (v) { - results[v] = {}; - results[v][v] = { distance: 0 }; - nodes.forEach(function (w) { - if (v !== w) { - results[v][w] = { distance: Number.POSITIVE_INFINITY }; - } - }); - edgeFn(v).forEach(function (edge) { - var w = edge.v === v ? edge.w : edge.v; - var d = weightFn(edge); - results[v][w] = { distance: d, predecessor: v }; - }); - }); - - nodes.forEach(function (k) { - var rowK = results[k]; - nodes.forEach(function (i) { - var rowI = results[i]; - nodes.forEach(function (j) { - var ik = rowI[k]; - var kj = rowK[j]; - var ij = rowI[j]; - var altDistance = ik.distance + kj.distance; - if (altDistance < ij.distance) { - ij.distance = altDistance; - ij.predecessor = kj.predecessor; - } - }); - }); - }); - - return results; -} - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseKeys.js + 1 modules -var _baseKeys = __webpack_require__(69471); -// EXTERNAL MODULE: ./node_modules/lodash-es/_getTag.js + 3 modules -var _getTag = __webpack_require__(9779); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGetTag.js + 2 modules -var _baseGetTag = __webpack_require__(88496); -// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js -var isArray = __webpack_require__(92049); -// EXTERNAL MODULE: ./node_modules/lodash-es/isObjectLike.js -var isObjectLike = __webpack_require__(53098); -;// CONCATENATED MODULE: ./node_modules/lodash-es/isString.js - - - - -/** `Object#toString` result references. */ -var stringTag = '[object String]'; - -/** - * Checks if `value` is classified as a `String` primitive or object. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a string, else `false`. - * @example - * - * _.isString('abc'); - * // => true - * - * _.isString(1); - * // => false - */ -function isString(value) { - return typeof value == 'string' || - (!(0,isArray/* default */.A)(value) && (0,isObjectLike/* default */.A)(value) && (0,_baseGetTag/* default */.A)(value) == stringTag); -} - -/* harmony default export */ const lodash_es_isString = (isString); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseProperty.js -var _baseProperty = __webpack_require__(70805); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_asciiSize.js - - -/** - * Gets the size of an ASCII `string`. - * - * @private - * @param {string} string The string inspect. - * @returns {number} Returns the string size. - */ -var asciiSize = (0,_baseProperty/* default */.A)('length'); - -/* harmony default export */ const _asciiSize = (asciiSize); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_hasUnicode.js -/** Used to compose unicode character classes. */ -var rsAstralRange = '\\ud800-\\udfff', - rsComboMarksRange = '\\u0300-\\u036f', - reComboHalfMarksRange = '\\ufe20-\\ufe2f', - rsComboSymbolsRange = '\\u20d0-\\u20ff', - rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, - rsVarRange = '\\ufe0e\\ufe0f'; - -/** Used to compose unicode capture groups. */ -var rsZWJ = '\\u200d'; - -/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ -var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']'); - -/** - * Checks if `string` contains Unicode symbols. - * - * @private - * @param {string} string The string to inspect. - * @returns {boolean} Returns `true` if a symbol is found, else `false`. - */ -function hasUnicode(string) { - return reHasUnicode.test(string); -} - -/* harmony default export */ const _hasUnicode = (hasUnicode); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_unicodeSize.js -/** Used to compose unicode character classes. */ -var _unicodeSize_rsAstralRange = '\\ud800-\\udfff', - _unicodeSize_rsComboMarksRange = '\\u0300-\\u036f', - _unicodeSize_reComboHalfMarksRange = '\\ufe20-\\ufe2f', - _unicodeSize_rsComboSymbolsRange = '\\u20d0-\\u20ff', - _unicodeSize_rsComboRange = _unicodeSize_rsComboMarksRange + _unicodeSize_reComboHalfMarksRange + _unicodeSize_rsComboSymbolsRange, - _unicodeSize_rsVarRange = '\\ufe0e\\ufe0f'; - -/** Used to compose unicode capture groups. */ -var rsAstral = '[' + _unicodeSize_rsAstralRange + ']', - rsCombo = '[' + _unicodeSize_rsComboRange + ']', - rsFitz = '\\ud83c[\\udffb-\\udfff]', - rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', - rsNonAstral = '[^' + _unicodeSize_rsAstralRange + ']', - rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', - rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', - _unicodeSize_rsZWJ = '\\u200d'; - -/** Used to compose unicode regexes. */ -var reOptMod = rsModifier + '?', - rsOptVar = '[' + _unicodeSize_rsVarRange + ']?', - rsOptJoin = '(?:' + _unicodeSize_rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', - rsSeq = rsOptVar + reOptMod + rsOptJoin, - rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; - -/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ -var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); - -/** - * Gets the size of a Unicode `string`. - * - * @private - * @param {string} string The string inspect. - * @returns {number} Returns the string size. - */ -function unicodeSize(string) { - var result = reUnicode.lastIndex = 0; - while (reUnicode.test(string)) { - ++result; - } - return result; -} - -/* harmony default export */ const _unicodeSize = (unicodeSize); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_stringSize.js - - - - -/** - * Gets the number of symbols in `string`. - * - * @private - * @param {string} string The string to inspect. - * @returns {number} Returns the string size. - */ -function stringSize(string) { - return _hasUnicode(string) - ? _unicodeSize(string) - : _asciiSize(string); -} - -/* harmony default export */ const _stringSize = (stringSize); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/size.js - - - - - - -/** `Object#toString` result references. */ -var mapTag = '[object Map]', - setTag = '[object Set]'; - -/** - * Gets the size of `collection` by returning its length for array-like - * values or the number of own enumerable string keyed properties for objects. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object|string} collection The collection to inspect. - * @returns {number} Returns the collection size. - * @example - * - * _.size([1, 2, 3]); - * // => 3 - * - * _.size({ 'a': 1, 'b': 2 }); - * // => 2 - * - * _.size('pebbles'); - * // => 7 - */ -function size(collection) { - if (collection == null) { - return 0; - } - if ((0,isArrayLike/* default */.A)(collection)) { - return lodash_es_isString(collection) ? _stringSize(collection) : collection.length; - } - var tag = (0,_getTag/* default */.A)(collection); - if (tag == mapTag || tag == setTag) { - return collection.size; - } - return (0,_baseKeys/* default */.A)(collection).length; -} - -/* harmony default export */ const lodash_es_size = (size); - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/topsort.js - - - - -topsort_topsort.CycleException = topsort_CycleException; - -function topsort_topsort(g) { - var visited = {}; - var stack = {}; - var results = []; - - function visit(node) { - if (has/* default */.A(stack, node)) { - throw new topsort_CycleException(); - } - - if (!has/* default */.A(visited, node)) { - stack[node] = true; - visited[node] = true; - forEach/* default */.A(g.predecessors(node), visit); - delete stack[node]; - results.push(node); - } - } - - forEach/* default */.A(g.sinks(), visit); - - if (lodash_es_size(visited) !== g.nodeCount()) { - throw new topsort_CycleException(); - } - - return results; -} - -function topsort_CycleException() {} -topsort_CycleException.prototype = new Error(); // must be an instance of Error to pass testing - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/is-acyclic.js - - - - -function isAcyclic(g) { - try { - topsort(g); - } catch (e) { - if (e instanceof CycleException) { - return false; - } - throw e; - } - return true; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/dfs.js - - - - -/* - * A helper that preforms a pre- or post-order traversal on the input graph - * and returns the nodes in the order they were visited. If the graph is - * undirected then this algorithm will navigate using neighbors. If the graph - * is directed then this algorithm will navigate using successors. - * - * Order must be one of "pre" or "post". - */ -function dfs(g, vs, order) { - if (!isArray/* default */.A(vs)) { - vs = [vs]; - } - - var navigation = (g.isDirected() ? g.successors : g.neighbors).bind(g); - - var acc = []; - var visited = {}; - forEach/* default */.A(vs, function (v) { - if (!g.hasNode(v)) { - throw new Error('Graph does not have node: ' + v); - } - - doDfs(g, v, order === 'post', visited, navigation, acc); - }); - return acc; -} - -function doDfs(g, v, postorder, visited, navigation, acc) { - if (!has/* default */.A(visited, v)) { - visited[v] = true; - - if (!postorder) { - acc.push(v); - } - forEach/* default */.A(navigation(v), function (w) { - doDfs(g, w, postorder, visited, navigation, acc); - }); - if (postorder) { - acc.push(v); - } - } -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/postorder.js - - - - -function postorder(g, vs) { - return dfs(g, vs, 'post'); -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/preorder.js - - - - -function preorder(g, vs) { - return dfs(g, vs, 'pre'); -} - -// EXTERNAL MODULE: ./node_modules/dagre-d3-es/src/graphlib/graph.js + 9 modules -var graph = __webpack_require__(73046); -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/prim.js - - - - - - -function prim(g, weightFunc) { - var result = new Graph(); - var parents = {}; - var pq = new PriorityQueue(); - var v; - - function updateNeighbors(edge) { - var w = edge.v === v ? edge.w : edge.v; - var pri = pq.priority(w); - if (pri !== undefined) { - var edgeWeight = weightFunc(edge); - if (edgeWeight < pri) { - parents[w] = v; - pq.decrease(w, edgeWeight); - } - } - } - - if (g.nodeCount() === 0) { - return result; - } - - _.each(g.nodes(), function (v) { - pq.add(v, Number.POSITIVE_INFINITY); - result.setNode(v); - }); - - // Start from an arbitrary node - pq.decrease(g.nodes()[0], 0); - - var init = false; - while (pq.size() > 0) { - v = pq.removeMin(); - if (_.has(parents, v)) { - result.setEdge(v, parents[v]); - } else if (init) { - throw new Error('Input graph is not connected: ' + g); - } else { - init = true; - } - - g.nodeEdges(v).forEach(updateNeighbors); - } - - return result; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/index.js - - - - - - - - - - - - - - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/rank/network-simplex.js - - - - - - - - -// Expose some internals for testing purposes -networkSimplex.initLowLimValues = initLowLimValues; -networkSimplex.initCutValues = initCutValues; -networkSimplex.calcCutValue = calcCutValue; -networkSimplex.leaveEdge = leaveEdge; -networkSimplex.enterEdge = enterEdge; -networkSimplex.exchangeEdges = exchangeEdges; - -/* - * The network simplex algorithm assigns ranks to each node in the input graph - * and iteratively improves the ranking to reduce the length of edges. - * - * Preconditions: - * - * 1. The input graph must be a DAG. - * 2. All nodes in the graph must have an object value. - * 3. All edges in the graph must have "minlen" and "weight" attributes. - * - * Postconditions: - * - * 1. All nodes in the graph will have an assigned "rank" attribute that has - * been optimized by the network simplex algorithm. Ranks start at 0. - * - * - * A rough sketch of the algorithm is as follows: - * - * 1. Assign initial ranks to each node. We use the longest path algorithm, - * which assigns ranks to the lowest position possible. In general this - * leads to very wide bottom ranks and unnecessarily long edges. - * 2. Construct a feasible tight tree. A tight tree is one such that all - * edges in the tree have no slack (difference between length of edge - * and minlen for the edge). This by itself greatly improves the assigned - * rankings by shorting edges. - * 3. Iteratively find edges that have negative cut values. Generally a - * negative cut value indicates that the edge could be removed and a new - * tree edge could be added to produce a more compact graph. - * - * Much of the algorithms here are derived from Gansner, et al., "A Technique - * for Drawing Directed Graphs." The structure of the file roughly follows the - * structure of the overall algorithm. - */ -function networkSimplex(g) { - g = simplify(g); - longestPath(g); - var t = feasibleTree(g); - initLowLimValues(t); - initCutValues(t, g); - - var e, f; - while ((e = leaveEdge(t))) { - f = enterEdge(t, g, e); - exchangeEdges(t, g, e, f); - } -} - -/* - * Initializes cut values for all edges in the tree. - */ -function initCutValues(t, g) { - var vs = postorder(t, t.nodes()); - vs = vs.slice(0, vs.length - 1); - forEach/* default */.A(vs, function (v) { - assignCutValue(t, g, v); - }); -} - -function assignCutValue(t, g, child) { - var childLab = t.node(child); - var parent = childLab.parent; - t.edge(child, parent).cutvalue = calcCutValue(t, g, child); -} - -/* - * Given the tight tree, its graph, and a child in the graph calculate and - * return the cut value for the edge between the child and its parent. - */ -function calcCutValue(t, g, child) { - var childLab = t.node(child); - var parent = childLab.parent; - // True if the child is on the tail end of the edge in the directed graph - var childIsTail = true; - // The graph's view of the tree edge we're inspecting - var graphEdge = g.edge(child, parent); - // The accumulated cut value for the edge between this node and its parent - var cutValue = 0; - - if (!graphEdge) { - childIsTail = false; - graphEdge = g.edge(parent, child); - } - - cutValue = graphEdge.weight; - - forEach/* default */.A(g.nodeEdges(child), function (e) { - var isOutEdge = e.v === child, - other = isOutEdge ? e.w : e.v; - - if (other !== parent) { - var pointsToHead = isOutEdge === childIsTail, - otherWeight = g.edge(e).weight; - - cutValue += pointsToHead ? otherWeight : -otherWeight; - if (isTreeEdge(t, child, other)) { - var otherCutValue = t.edge(child, other).cutvalue; - cutValue += pointsToHead ? -otherCutValue : otherCutValue; - } - } - }); - - return cutValue; -} - -function initLowLimValues(tree, root) { - if (arguments.length < 2) { - root = tree.nodes()[0]; - } - dfsAssignLowLim(tree, {}, 1, root); -} - -function dfsAssignLowLim(tree, visited, nextLim, v, parent) { - var low = nextLim; - var label = tree.node(v); - - visited[v] = true; - forEach/* default */.A(tree.neighbors(v), function (w) { - if (!has/* default */.A(visited, w)) { - nextLim = dfsAssignLowLim(tree, visited, nextLim, w, v); - } - }); - - label.low = low; - label.lim = nextLim++; - if (parent) { - label.parent = parent; - } else { - // TODO should be able to remove this when we incrementally update low lim - delete label.parent; - } - - return nextLim; -} - -function leaveEdge(tree) { - return lodash_es_find(tree.edges(), function (e) { - return tree.edge(e).cutvalue < 0; - }); -} - -function enterEdge(t, g, edge) { - var v = edge.v; - var w = edge.w; - - // For the rest of this function we assume that v is the tail and w is the - // head, so if we don't have this edge in the graph we should flip it to - // match the correct orientation. - if (!g.hasEdge(v, w)) { - v = edge.w; - w = edge.v; - } - - var vLabel = t.node(v); - var wLabel = t.node(w); - var tailLabel = vLabel; - var flip = false; - - // If the root is in the tail of the edge then we need to flip the logic that - // checks for the head and tail nodes in the candidates function below. - if (vLabel.lim > wLabel.lim) { - tailLabel = wLabel; - flip = true; - } - - var candidates = filter/* default */.A(g.edges(), function (edge) { - return ( - flip === isDescendant(t, t.node(edge.v), tailLabel) && - flip !== isDescendant(t, t.node(edge.w), tailLabel) - ); - }); - - return lodash_es_minBy(candidates, function (edge) { - return slack(g, edge); - }); -} - -function exchangeEdges(t, g, e, f) { - var v = e.v; - var w = e.w; - t.removeEdge(v, w); - t.setEdge(f.v, f.w, {}); - initLowLimValues(t); - initCutValues(t, g); - updateRanks(t, g); -} - -function updateRanks(t, g) { - var root = lodash_es_find(t.nodes(), function (v) { - return !g.node(v).parent; - }); - var vs = preorder(t, root); - vs = vs.slice(1); - forEach/* default */.A(vs, function (v) { - var parent = t.node(v).parent, - edge = g.edge(v, parent), - flipped = false; - - if (!edge) { - edge = g.edge(parent, v); - flipped = true; - } - - g.node(v).rank = g.node(parent).rank + (flipped ? edge.minlen : -edge.minlen); - }); -} - -/* - * Returns true if the edge is in the tree. - */ -function isTreeEdge(tree, u, v) { - return tree.hasEdge(u, v); -} - -/* - * Returns true if the specified node is descendant of the root node per the - * assigned low and lim attributes in the tree. - */ -function isDescendant(tree, vLabel, rootLabel) { - return rootLabel.low <= vLabel.lim && vLabel.lim <= rootLabel.lim; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/rank/index.js - - - - - - -/* - * Assigns a rank to each node in the input graph that respects the "minlen" - * constraint specified on edges between nodes. - * - * This basic structure is derived from Gansner, et al., "A Technique for - * Drawing Directed Graphs." - * - * Pre-conditions: - * - * 1. Graph must be a connected DAG - * 2. Graph nodes must be objects - * 3. Graph edges must have "weight" and "minlen" attributes - * - * Post-conditions: - * - * 1. Graph nodes will have a "rank" attribute based on the results of the - * algorithm. Ranks can start at any index (including negative), we'll - * fix them up later. - */ -function rank(g) { - switch (g.graph().ranker) { - case 'network-simplex': - networkSimplexRanker(g); - break; - case 'tight-tree': - tightTreeRanker(g); - break; - case 'longest-path': - longestPathRanker(g); - break; - default: - networkSimplexRanker(g); - } -} - -// A fast and simple ranker, but results are far from optimal. -var longestPathRanker = longestPath; - -function tightTreeRanker(g) { - longestPath(g); - feasibleTree(g); -} - -function networkSimplexRanker(g) { - networkSimplex(g); -} - -// EXTERNAL MODULE: ./node_modules/lodash-es/values.js + 1 modules -var values = __webpack_require__(38207); -// EXTERNAL MODULE: ./node_modules/lodash-es/reduce.js + 2 modules -var reduce = __webpack_require__(89463); -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/nesting-graph.js - - - - - -/* - * A nesting graph creates dummy nodes for the tops and bottoms of subgraphs, - * adds appropriate edges to ensure that all cluster nodes are placed between - * these boundries, and ensures that the graph is connected. - * - * In addition we ensure, through the use of the minlen property, that nodes - * and subgraph border nodes to not end up on the same rank. - * - * Preconditions: - * - * 1. Input graph is a DAG - * 2. Nodes in the input graph has a minlen attribute - * - * Postconditions: - * - * 1. Input graph is connected. - * 2. Dummy nodes are added for the tops and bottoms of subgraphs. - * 3. The minlen attribute for nodes is adjusted to ensure nodes do not - * get placed on the same rank as subgraph border nodes. - * - * The nesting graph idea comes from Sander, "Layout of Compound Directed - * Graphs." - */ -function nesting_graph_run(g) { - var root = addDummyNode(g, 'root', {}, '_root'); - var depths = treeDepths(g); - var height = lodash_es_max(values/* default */.A(depths)) - 1; // Note: depths is an Object not an array - var nodeSep = 2 * height + 1; - - g.graph().nestingRoot = root; - - // Multiply minlen by nodeSep to align nodes on non-border ranks. - forEach/* default */.A(g.edges(), function (e) { - g.edge(e).minlen *= nodeSep; - }); - - // Calculate a weight that is sufficient to keep subgraphs vertically compact - var weight = sumWeights(g) + 1; - - // Create border nodes and link them up - forEach/* default */.A(g.children(), function (child) { - nesting_graph_dfs(g, root, nodeSep, weight, height, depths, child); - }); - - // Save the multiplier for node layers for later removal of empty border - // layers. - g.graph().nodeRankFactor = nodeSep; -} - -function nesting_graph_dfs(g, root, nodeSep, weight, height, depths, v) { - var children = g.children(v); - if (!children.length) { - if (v !== root) { - g.setEdge(root, v, { weight: 0, minlen: nodeSep }); - } - return; - } - - var top = addBorderNode(g, '_bt'); - var bottom = addBorderNode(g, '_bb'); - var label = g.node(v); - - g.setParent(top, v); - label.borderTop = top; - g.setParent(bottom, v); - label.borderBottom = bottom; - - forEach/* default */.A(children, function (child) { - nesting_graph_dfs(g, root, nodeSep, weight, height, depths, child); - - var childNode = g.node(child); - var childTop = childNode.borderTop ? childNode.borderTop : child; - var childBottom = childNode.borderBottom ? childNode.borderBottom : child; - var thisWeight = childNode.borderTop ? weight : 2 * weight; - var minlen = childTop !== childBottom ? 1 : height - depths[v] + 1; - - g.setEdge(top, childTop, { - weight: thisWeight, - minlen: minlen, - nestingEdge: true, - }); - - g.setEdge(childBottom, bottom, { - weight: thisWeight, - minlen: minlen, - nestingEdge: true, - }); - }); - - if (!g.parent(v)) { - g.setEdge(root, top, { weight: 0, minlen: height + depths[v] }); - } -} - -function treeDepths(g) { - var depths = {}; - function dfs(v, depth) { - var children = g.children(v); - if (children && children.length) { - forEach/* default */.A(children, function (child) { - dfs(child, depth + 1); - }); - } - depths[v] = depth; - } - forEach/* default */.A(g.children(), function (v) { - dfs(v, 1); - }); - return depths; -} - -function sumWeights(g) { - return reduce/* default */.A( - g.edges(), - function (acc, e) { - return acc + g.edge(e).weight; - }, - 0 - ); -} - -function cleanup(g) { - var graphLabel = g.graph(); - g.removeNode(graphLabel.nestingRoot); - delete graphLabel.nestingRoot; - forEach/* default */.A(g.edges(), function (e) { - var edge = g.edge(e); - if (edge.nestingEdge) { - g.removeEdge(e); - } - }); -} - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseClone.js + 15 modules -var _baseClone = __webpack_require__(91641); -;// CONCATENATED MODULE: ./node_modules/lodash-es/cloneDeep.js - - -/** Used to compose bitmasks for cloning. */ -var CLONE_DEEP_FLAG = 1, - CLONE_SYMBOLS_FLAG = 4; - -/** - * This method is like `_.clone` except that it recursively clones `value`. - * - * @static - * @memberOf _ - * @since 1.0.0 - * @category Lang - * @param {*} value The value to recursively clone. - * @returns {*} Returns the deep cloned value. - * @see _.clone - * @example - * - * var objects = [{ 'a': 1 }, { 'b': 2 }]; - * - * var deep = _.cloneDeep(objects); - * console.log(deep[0] === objects[0]); - * // => false - */ -function cloneDeep(value) { - return (0,_baseClone/* default */.A)(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); -} - -/* harmony default export */ const lodash_es_cloneDeep = (cloneDeep); - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/add-subgraph-constraints.js - - - - -function addSubgraphConstraints(g, cg, vs) { - var prev = {}, - rootPrev; - - forEach/* default */.A(vs, function (v) { - var child = g.parent(v), - parent, - prevChild; - while (child) { - parent = g.parent(child); - if (parent) { - prevChild = prev[parent]; - prev[parent] = child; - } else { - prevChild = rootPrev; - rootPrev = child; - } - if (prevChild && prevChild !== child) { - cg.setEdge(prevChild, child); - return; - } - child = parent; - } - }); - - /* - function dfs(v) { - var children = v ? g.children(v) : g.children(); - if (children.length) { - var min = Number.POSITIVE_INFINITY, - subgraphs = []; - _.each(children, function(child) { - var childMin = dfs(child); - if (g.children(child).length) { - subgraphs.push({ v: child, order: childMin }); - } - min = Math.min(min, childMin); - }); - _.reduce(_.sortBy(subgraphs, "order"), function(prev, curr) { - cg.setEdge(prev.v, curr.v); - return curr; - }); - return min; - } - return g.node(v).order; - } - dfs(undefined); - */ -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/build-layer-graph.js - - - - - -/* - * Constructs a graph that can be used to sort a layer of nodes. The graph will - * contain all base and subgraph nodes from the request layer in their original - * hierarchy and any edges that are incident on these nodes and are of the type - * requested by the "relationship" parameter. - * - * Nodes from the requested rank that do not have parents are assigned a root - * node in the output graph, which is set in the root graph attribute. This - * makes it easy to walk the hierarchy of movable nodes during ordering. - * - * Pre-conditions: - * - * 1. Input graph is a DAG - * 2. Base nodes in the input graph have a rank attribute - * 3. Subgraph nodes in the input graph has minRank and maxRank attributes - * 4. Edges have an assigned weight - * - * Post-conditions: - * - * 1. Output graph has all nodes in the movable rank with preserved - * hierarchy. - * 2. Root nodes in the movable layer are made children of the node - * indicated by the root attribute of the graph. - * 3. Non-movable nodes incident on movable nodes, selected by the - * relationship parameter, are included in the graph (without hierarchy). - * 4. Edges incident on movable nodes, selected by the relationship - * parameter, are added to the output graph. - * 5. The weights for copied edges are aggregated as need, since the output - * graph is not a multi-graph. - */ -function buildLayerGraph(g, rank, relationship) { - var root = createRootNode(g), - result = new graphlib/* Graph */.T({ compound: true }) - .setGraph({ root: root }) - .setDefaultNodeLabel(function (v) { - return g.node(v); - }); - - forEach/* default */.A(g.nodes(), function (v) { - var node = g.node(v), - parent = g.parent(v); - - if (node.rank === rank || (node.minRank <= rank && rank <= node.maxRank)) { - result.setNode(v); - result.setParent(v, parent || root); - - // This assumes we have only short edges! - forEach/* default */.A(g[relationship](v), function (e) { - var u = e.v === v ? e.w : e.v, - edge = result.edge(u, v), - weight = !isUndefined/* default */.A(edge) ? edge.weight : 0; - result.setEdge(u, v, { weight: g.edge(e).weight + weight }); - }); - - if (has/* default */.A(node, 'minRank')) { - result.setNode(v, { - borderLeft: node.borderLeft[rank], - borderRight: node.borderRight[rank], - }); - } - } - }); - - return result; -} - -function createRootNode(g) { - var v; - while (g.hasNode((v = uniqueId/* default */.A('_root')))); - return v; -} - -// EXTERNAL MODULE: ./node_modules/lodash-es/_assignValue.js -var _assignValue = __webpack_require__(52851); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseZipObject.js -/** - * This base implementation of `_.zipObject` which assigns values using `assignFunc`. - * - * @private - * @param {Array} props The property identifiers. - * @param {Array} values The property values. - * @param {Function} assignFunc The function to assign values. - * @returns {Object} Returns the new object. - */ -function baseZipObject(props, values, assignFunc) { - var index = -1, - length = props.length, - valsLength = values.length, - result = {}; - - while (++index < length) { - var value = index < valsLength ? values[index] : undefined; - assignFunc(result, props[index], value); - } - return result; -} - -/* harmony default export */ const _baseZipObject = (baseZipObject); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/zipObject.js - - - -/** - * This method is like `_.fromPairs` except that it accepts two arrays, - * one of property identifiers and one of corresponding values. - * - * @static - * @memberOf _ - * @since 0.4.0 - * @category Array - * @param {Array} [props=[]] The property identifiers. - * @param {Array} [values=[]] The property values. - * @returns {Object} Returns the new object. - * @example - * - * _.zipObject(['a', 'b'], [1, 2]); - * // => { 'a': 1, 'b': 2 } - */ -function zipObject(props, values) { - return _baseZipObject(props || [], values || [], _assignValue/* default */.A); -} - -/* harmony default export */ const lodash_es_zipObject = (zipObject); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFlatten.js + 1 modules -var _baseFlatten = __webpack_require__(13588); -// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayMap.js -var _arrayMap = __webpack_require__(45572); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGet.js -var _baseGet = __webpack_require__(66318); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseMap.js -var _baseMap = __webpack_require__(52568); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseSortBy.js -/** - * The base implementation of `_.sortBy` which uses `comparer` to define the - * sort order of `array` and replaces criteria objects with their corresponding - * values. - * - * @private - * @param {Array} array The array to sort. - * @param {Function} comparer The function to define sort order. - * @returns {Array} Returns `array`. - */ -function baseSortBy(array, comparer) { - var length = array.length; - - array.sort(comparer); - while (length--) { - array[length] = array[length].value; - } - return array; -} - -/* harmony default export */ const _baseSortBy = (baseSortBy); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseUnary.js -var _baseUnary = __webpack_require__(52789); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_compareAscending.js - - -/** - * Compares values to sort them in ascending order. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {number} Returns the sort order indicator for `value`. - */ -function compareAscending(value, other) { - if (value !== other) { - var valIsDefined = value !== undefined, - valIsNull = value === null, - valIsReflexive = value === value, - valIsSymbol = (0,isSymbol/* default */.A)(value); - - var othIsDefined = other !== undefined, - othIsNull = other === null, - othIsReflexive = other === other, - othIsSymbol = (0,isSymbol/* default */.A)(other); - - if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) || - (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) || - (valIsNull && othIsDefined && othIsReflexive) || - (!valIsDefined && othIsReflexive) || - !valIsReflexive) { - return 1; - } - if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) || - (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) || - (othIsNull && valIsDefined && valIsReflexive) || - (!othIsDefined && valIsReflexive) || - !othIsReflexive) { - return -1; - } - } - return 0; -} - -/* harmony default export */ const _compareAscending = (compareAscending); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_compareMultiple.js - - -/** - * Used by `_.orderBy` to compare multiple properties of a value to another - * and stable sort them. - * - * If `orders` is unspecified, all values are sorted in ascending order. Otherwise, - * specify an order of "desc" for descending or "asc" for ascending sort order - * of corresponding values. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {boolean[]|string[]} orders The order to sort by for each property. - * @returns {number} Returns the sort order indicator for `object`. - */ -function compareMultiple(object, other, orders) { - var index = -1, - objCriteria = object.criteria, - othCriteria = other.criteria, - length = objCriteria.length, - ordersLength = orders.length; - - while (++index < length) { - var result = _compareAscending(objCriteria[index], othCriteria[index]); - if (result) { - if (index >= ordersLength) { - return result; - } - var order = orders[index]; - return result * (order == 'desc' ? -1 : 1); - } - } - // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications - // that causes it, under certain circumstances, to provide the same value for - // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247 - // for more details. - // - // This also ensures a stable sort in V8 and other engines. - // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details. - return object.index - other.index; -} - -/* harmony default export */ const _compareMultiple = (compareMultiple); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseOrderBy.js - - - - - - - - - - -/** - * The base implementation of `_.orderBy` without param guards. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. - * @param {string[]} orders The sort orders of `iteratees`. - * @returns {Array} Returns the new sorted array. - */ -function baseOrderBy(collection, iteratees, orders) { - if (iteratees.length) { - iteratees = (0,_arrayMap/* default */.A)(iteratees, function(iteratee) { - if ((0,isArray/* default */.A)(iteratee)) { - return function(value) { - return (0,_baseGet/* default */.A)(value, iteratee.length === 1 ? iteratee[0] : iteratee); - } - } - return iteratee; - }); - } else { - iteratees = [identity/* default */.A]; - } - - var index = -1; - iteratees = (0,_arrayMap/* default */.A)(iteratees, (0,_baseUnary/* default */.A)(_baseIteratee/* default */.A)); - - var result = (0,_baseMap/* default */.A)(collection, function(value, key, collection) { - var criteria = (0,_arrayMap/* default */.A)(iteratees, function(iteratee) { - return iteratee(value); - }); - return { 'criteria': criteria, 'index': ++index, 'value': value }; - }); - - return _baseSortBy(result, function(object, other) { - return _compareMultiple(object, other, orders); - }); -} - -/* harmony default export */ const _baseOrderBy = (baseOrderBy); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseRest.js -var _baseRest = __webpack_require__(24326); -// EXTERNAL MODULE: ./node_modules/lodash-es/_isIterateeCall.js -var _isIterateeCall = __webpack_require__(6832); -;// CONCATENATED MODULE: ./node_modules/lodash-es/sortBy.js - - - - - -/** - * Creates an array of elements, sorted in ascending order by the results of - * running each element in a collection thru each iteratee. This method - * performs a stable sort, that is, it preserves the original sort order of - * equal elements. The iteratees are invoked with one argument: (value). - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {...(Function|Function[])} [iteratees=[_.identity]] - * The iteratees to sort by. - * @returns {Array} Returns the new sorted array. - * @example - * - * var users = [ - * { 'user': 'fred', 'age': 48 }, - * { 'user': 'barney', 'age': 36 }, - * { 'user': 'fred', 'age': 30 }, - * { 'user': 'barney', 'age': 34 } - * ]; - * - * _.sortBy(users, [function(o) { return o.user; }]); - * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]] - * - * _.sortBy(users, ['user', 'age']); - * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]] - */ -var sortBy = (0,_baseRest/* default */.A)(function(collection, iteratees) { - if (collection == null) { - return []; - } - var length = iteratees.length; - if (length > 1 && (0,_isIterateeCall/* default */.A)(collection, iteratees[0], iteratees[1])) { - iteratees = []; - } else if (length > 2 && (0,_isIterateeCall/* default */.A)(iteratees[0], iteratees[1], iteratees[2])) { - iteratees = [iteratees[0]]; - } - return _baseOrderBy(collection, (0,_baseFlatten/* default */.A)(iteratees, 1), []); -}); - -/* harmony default export */ const lodash_es_sortBy = (sortBy); - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/cross-count.js - - - - -/* - * A function that takes a layering (an array of layers, each with an array of - * ordererd nodes) and a graph and returns a weighted crossing count. - * - * Pre-conditions: - * - * 1. Input graph must be simple (not a multigraph), directed, and include - * only simple edges. - * 2. Edges in the input graph must have assigned weights. - * - * Post-conditions: - * - * 1. The graph and layering matrix are left unchanged. - * - * This algorithm is derived from Barth, et al., "Bilayer Cross Counting." - */ -function crossCount(g, layering) { - var cc = 0; - for (var i = 1; i < layering.length; ++i) { - cc += twoLayerCrossCount(g, layering[i - 1], layering[i]); - } - return cc; -} - -function twoLayerCrossCount(g, northLayer, southLayer) { - // Sort all of the edges between the north and south layers by their position - // in the north layer and then the south. Map these edges to the position of - // their head in the south layer. - var southPos = lodash_es_zipObject( - southLayer, - map/* default */.A(southLayer, function (v, i) { - return i; - }) - ); - var southEntries = flatten/* default */.A( - map/* default */.A(northLayer, function (v) { - return lodash_es_sortBy( - map/* default */.A(g.outEdges(v), function (e) { - return { pos: southPos[e.w], weight: g.edge(e).weight }; - }), - 'pos' - ); - }) - ); - - // Build the accumulator tree - var firstIndex = 1; - while (firstIndex < southLayer.length) firstIndex <<= 1; - var treeSize = 2 * firstIndex - 1; - firstIndex -= 1; - var tree = map/* default */.A(new Array(treeSize), function () { - return 0; - }); - - // Calculate the weighted crossings - var cc = 0; - forEach/* default */.A( - // @ts-expect-error - southEntries.forEach(function (entry) { - var index = entry.pos + firstIndex; - tree[index] += entry.weight; - var weightSum = 0; - // @ts-expect-error - while (index > 0) { - // @ts-expect-error - if (index % 2) { - weightSum += tree[index + 1]; - } - // @ts-expect-error - index = (index - 1) >> 1; - tree[index] += entry.weight; - } - cc += entry.weight * weightSum; - }) - ); - - return cc; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/init-order.js - - - - -/* - * Assigns an initial order value for each node by performing a DFS search - * starting from nodes in the first rank. Nodes are assigned an order in their - * rank as they are first visited. - * - * This approach comes from Gansner, et al., "A Technique for Drawing Directed - * Graphs." - * - * Returns a layering matrix with an array per layer and each layer sorted by - * the order of its nodes. - */ -function initOrder(g) { - var visited = {}; - var simpleNodes = filter/* default */.A(g.nodes(), function (v) { - return !g.children(v).length; - }); - var maxRank = lodash_es_max( - map/* default */.A(simpleNodes, function (v) { - return g.node(v).rank; - }) - ); - var layers = map/* default */.A(range/* default */.A(maxRank + 1), function () { - return []; - }); - - function dfs(v) { - if (has/* default */.A(visited, v)) return; - visited[v] = true; - var node = g.node(v); - layers[node.rank].push(v); - forEach/* default */.A(g.successors(v), dfs); - } - - var orderedVs = lodash_es_sortBy(simpleNodes, function (v) { - return g.node(v).rank; - }); - forEach/* default */.A(orderedVs, dfs); - - return layers; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/barycenter.js - - - - -function barycenter(g, movable) { - return map/* default */.A(movable, function (v) { - var inV = g.inEdges(v); - if (!inV.length) { - return { v: v }; - } else { - var result = reduce/* default */.A( - inV, - function (acc, e) { - var edge = g.edge(e), - nodeU = g.node(e.v); - return { - sum: acc.sum + edge.weight * nodeU.order, - weight: acc.weight + edge.weight, - }; - }, - { sum: 0, weight: 0 } - ); - - return { - v: v, - barycenter: result.sum / result.weight, - weight: result.weight, - }; - } - }); -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/resolve-conflicts.js - - - - -/* - * Given a list of entries of the form {v, barycenter, weight} and a - * constraint graph this function will resolve any conflicts between the - * constraint graph and the barycenters for the entries. If the barycenters for - * an entry would violate a constraint in the constraint graph then we coalesce - * the nodes in the conflict into a new node that respects the contraint and - * aggregates barycenter and weight information. - * - * This implementation is based on the description in Forster, "A Fast and - * Simple Hueristic for Constrained Two-Level Crossing Reduction," thought it - * differs in some specific details. - * - * Pre-conditions: - * - * 1. Each entry has the form {v, barycenter, weight}, or if the node has - * no barycenter, then {v}. - * - * Returns: - * - * A new list of entries of the form {vs, i, barycenter, weight}. The list - * `vs` may either be a singleton or it may be an aggregation of nodes - * ordered such that they do not violate constraints from the constraint - * graph. The property `i` is the lowest original index of any of the - * elements in `vs`. - */ -function resolveConflicts(entries, cg) { - var mappedEntries = {}; - forEach/* default */.A(entries, function (entry, i) { - var tmp = (mappedEntries[entry.v] = { - indegree: 0, - in: [], - out: [], - vs: [entry.v], - i: i, - }); - if (!isUndefined/* default */.A(entry.barycenter)) { - // @ts-expect-error - tmp.barycenter = entry.barycenter; - // @ts-expect-error - tmp.weight = entry.weight; - } - }); - - forEach/* default */.A(cg.edges(), function (e) { - var entryV = mappedEntries[e.v]; - var entryW = mappedEntries[e.w]; - if (!isUndefined/* default */.A(entryV) && !isUndefined/* default */.A(entryW)) { - entryW.indegree++; - entryV.out.push(mappedEntries[e.w]); - } - }); - - var sourceSet = filter/* default */.A(mappedEntries, function (entry) { - // @ts-expect-error - return !entry.indegree; - }); - - return doResolveConflicts(sourceSet); -} - -function doResolveConflicts(sourceSet) { - var entries = []; - - function handleIn(vEntry) { - return function (uEntry) { - if (uEntry.merged) { - return; - } - if ( - isUndefined/* default */.A(uEntry.barycenter) || - isUndefined/* default */.A(vEntry.barycenter) || - uEntry.barycenter >= vEntry.barycenter - ) { - mergeEntries(vEntry, uEntry); - } - }; - } - - function handleOut(vEntry) { - return function (wEntry) { - wEntry['in'].push(vEntry); - if (--wEntry.indegree === 0) { - sourceSet.push(wEntry); - } - }; - } - - while (sourceSet.length) { - var entry = sourceSet.pop(); - entries.push(entry); - forEach/* default */.A(entry['in'].reverse(), handleIn(entry)); - forEach/* default */.A(entry.out, handleOut(entry)); - } - - return map/* default */.A( - filter/* default */.A(entries, function (entry) { - return !entry.merged; - }), - function (entry) { - return pick/* default */.A(entry, ['vs', 'i', 'barycenter', 'weight']); - } - ); -} - -function mergeEntries(target, source) { - var sum = 0; - var weight = 0; - - if (target.weight) { - sum += target.barycenter * target.weight; - weight += target.weight; - } - - if (source.weight) { - sum += source.barycenter * source.weight; - weight += source.weight; - } - - target.vs = source.vs.concat(target.vs); - target.barycenter = sum / weight; - target.weight = weight; - target.i = Math.min(source.i, target.i); - source.merged = true; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/sort.js - - - - - -function sort(entries, biasRight) { - var parts = partition(entries, function (entry) { - return has/* default */.A(entry, 'barycenter'); - }); - var sortable = parts.lhs, - unsortable = lodash_es_sortBy(parts.rhs, function (entry) { - return -entry.i; - }), - vs = [], - sum = 0, - weight = 0, - vsIndex = 0; - - sortable.sort(compareWithBias(!!biasRight)); - - vsIndex = consumeUnsortable(vs, unsortable, vsIndex); - - forEach/* default */.A(sortable, function (entry) { - vsIndex += entry.vs.length; - vs.push(entry.vs); - sum += entry.barycenter * entry.weight; - weight += entry.weight; - vsIndex = consumeUnsortable(vs, unsortable, vsIndex); - }); - - var result = { vs: flatten/* default */.A(vs) }; - if (weight) { - result.barycenter = sum / weight; - result.weight = weight; - } - return result; -} - -function consumeUnsortable(vs, unsortable, index) { - var last; - while (unsortable.length && (last = lodash_es_last(unsortable)).i <= index) { - unsortable.pop(); - vs.push(last.vs); - index++; - } - return index; -} - -function compareWithBias(bias) { - return function (entryV, entryW) { - if (entryV.barycenter < entryW.barycenter) { - return -1; - } else if (entryV.barycenter > entryW.barycenter) { - return 1; - } - - return !bias ? entryV.i - entryW.i : entryW.i - entryV.i; - }; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/sort-subgraph.js - - - - - - - -function sortSubgraph(g, v, cg, biasRight) { - var movable = g.children(v); - var node = g.node(v); - var bl = node ? node.borderLeft : undefined; - var br = node ? node.borderRight : undefined; - var subgraphs = {}; - - if (bl) { - movable = filter/* default */.A(movable, function (w) { - return w !== bl && w !== br; - }); - } - - var barycenters = barycenter(g, movable); - forEach/* default */.A(barycenters, function (entry) { - if (g.children(entry.v).length) { - var subgraphResult = sortSubgraph(g, entry.v, cg, biasRight); - subgraphs[entry.v] = subgraphResult; - if (has/* default */.A(subgraphResult, 'barycenter')) { - mergeBarycenters(entry, subgraphResult); - } - } - }); - - var entries = resolveConflicts(barycenters, cg); - expandSubgraphs(entries, subgraphs); - - var result = sort(entries, biasRight); - - if (bl) { - result.vs = flatten/* default */.A([bl, result.vs, br]); - if (g.predecessors(bl).length) { - var blPred = g.node(g.predecessors(bl)[0]), - brPred = g.node(g.predecessors(br)[0]); - if (!has/* default */.A(result, 'barycenter')) { - result.barycenter = 0; - result.weight = 0; - } - result.barycenter = - (result.barycenter * result.weight + blPred.order + brPred.order) / (result.weight + 2); - result.weight += 2; - } - } - - return result; -} - -function expandSubgraphs(entries, subgraphs) { - forEach/* default */.A(entries, function (entry) { - entry.vs = flatten/* default */.A( - entry.vs.map(function (v) { - if (subgraphs[v]) { - return subgraphs[v].vs; - } - return v; - }) - ); - }); -} - -function mergeBarycenters(target, other) { - if (!isUndefined/* default */.A(target.barycenter)) { - target.barycenter = - (target.barycenter * target.weight + other.barycenter * other.weight) / - (target.weight + other.weight); - target.weight += other.weight; - } else { - target.barycenter = other.barycenter; - target.weight = other.weight; - } -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/index.js - - - - - - - - - - - -/* - * Applies heuristics to minimize edge crossings in the graph and sets the best - * order solution as an order attribute on each node. - * - * Pre-conditions: - * - * 1. Graph must be DAG - * 2. Graph nodes must be objects with a "rank" attribute - * 3. Graph edges must have the "weight" attribute - * - * Post-conditions: - * - * 1. Graph nodes will have an "order" attribute based on the results of the - * algorithm. - */ -function order(g) { - var maxRank = util_maxRank(g), - downLayerGraphs = buildLayerGraphs(g, range/* default */.A(1, maxRank + 1), 'inEdges'), - upLayerGraphs = buildLayerGraphs(g, range/* default */.A(maxRank - 1, -1, -1), 'outEdges'); - - var layering = initOrder(g); - assignOrder(g, layering); - - var bestCC = Number.POSITIVE_INFINITY, - best; - - for (var i = 0, lastBest = 0; lastBest < 4; ++i, ++lastBest) { - sweepLayerGraphs(i % 2 ? downLayerGraphs : upLayerGraphs, i % 4 >= 2); - - layering = buildLayerMatrix(g); - var cc = crossCount(g, layering); - if (cc < bestCC) { - lastBest = 0; - best = lodash_es_cloneDeep(layering); - bestCC = cc; - } - } - - assignOrder(g, best); -} - -function buildLayerGraphs(g, ranks, relationship) { - return map/* default */.A(ranks, function (rank) { - return buildLayerGraph(g, rank, relationship); - }); -} - -function sweepLayerGraphs(layerGraphs, biasRight) { - var cg = new graphlib/* Graph */.T(); - forEach/* default */.A(layerGraphs, function (lg) { - var root = lg.graph().root; - var sorted = sortSubgraph(lg, root, cg, biasRight); - forEach/* default */.A(sorted.vs, function (v, i) { - lg.node(v).order = i; - }); - addSubgraphConstraints(lg, cg, sorted.vs); - }); -} - -function assignOrder(g, layering) { - forEach/* default */.A(layering, function (layer) { - forEach/* default */.A(layer, function (v, i) { - g.node(v).order = i; - }); - }); -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/parent-dummy-chains.js - - - - -function parentDummyChains(g) { - var postorderNums = parent_dummy_chains_postorder(g); - - forEach/* default */.A(g.graph().dummyChains, function (v) { - var node = g.node(v); - var edgeObj = node.edgeObj; - var pathData = findPath(g, postorderNums, edgeObj.v, edgeObj.w); - var path = pathData.path; - var lca = pathData.lca; - var pathIdx = 0; - var pathV = path[pathIdx]; - var ascending = true; - - while (v !== edgeObj.w) { - node = g.node(v); - - if (ascending) { - while ((pathV = path[pathIdx]) !== lca && g.node(pathV).maxRank < node.rank) { - pathIdx++; - } - - if (pathV === lca) { - ascending = false; - } - } - - if (!ascending) { - while ( - pathIdx < path.length - 1 && - g.node((pathV = path[pathIdx + 1])).minRank <= node.rank - ) { - pathIdx++; - } - pathV = path[pathIdx]; - } - - g.setParent(v, pathV); - v = g.successors(v)[0]; - } - }); -} - -// Find a path from v to w through the lowest common ancestor (LCA). Return the -// full path and the LCA. -function findPath(g, postorderNums, v, w) { - var vPath = []; - var wPath = []; - var low = Math.min(postorderNums[v].low, postorderNums[w].low); - var lim = Math.max(postorderNums[v].lim, postorderNums[w].lim); - var parent; - var lca; - - // Traverse up from v to find the LCA - parent = v; - do { - parent = g.parent(parent); - vPath.push(parent); - } while (parent && (postorderNums[parent].low > low || lim > postorderNums[parent].lim)); - lca = parent; - - // Traverse from w to LCA - parent = w; - while ((parent = g.parent(parent)) !== lca) { - wPath.push(parent); - } - - return { path: vPath.concat(wPath.reverse()), lca: lca }; -} - -function parent_dummy_chains_postorder(g) { - var result = {}; - var lim = 0; - - function dfs(v) { - var low = lim; - forEach/* default */.A(g.children(v), dfs); - result[v] = { low: low, lim: lim++ }; - } - forEach/* default */.A(g.children(), dfs); - - return result; -} - -// EXTERNAL MODULE: ./node_modules/lodash-es/_castFunction.js -var _castFunction = __webpack_require__(99922); -;// CONCATENATED MODULE: ./node_modules/lodash-es/forOwn.js - - - -/** - * Iterates over own enumerable string keyed properties of an object and - * invokes `iteratee` for each property. The iteratee is invoked with three - * arguments: (value, key, object). Iteratee functions may exit iteration - * early by explicitly returning `false`. - * - * @static - * @memberOf _ - * @since 0.3.0 - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Object} Returns `object`. - * @see _.forOwnRight - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.forOwn(new Foo, function(value, key) { - * console.log(key); - * }); - * // => Logs 'a' then 'b' (iteration order is not guaranteed). - */ -function forOwn(object, iteratee) { - return object && (0,_baseForOwn/* default */.A)(object, (0,_castFunction/* default */.A)(iteratee)); -} - -/* harmony default export */ const lodash_es_forOwn = (forOwn); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFor.js + 1 modules -var _baseFor = __webpack_require__(4574); -// EXTERNAL MODULE: ./node_modules/lodash-es/keysIn.js + 2 modules -var keysIn = __webpack_require__(55615); -;// CONCATENATED MODULE: ./node_modules/lodash-es/forIn.js - - - - -/** - * Iterates over own and inherited enumerable string keyed properties of an - * object and invokes `iteratee` for each property. The iteratee is invoked - * with three arguments: (value, key, object). Iteratee functions may exit - * iteration early by explicitly returning `false`. - * - * @static - * @memberOf _ - * @since 0.3.0 - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Object} Returns `object`. - * @see _.forInRight - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.forIn(new Foo, function(value, key) { - * console.log(key); - * }); - * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed). - */ -function forIn(object, iteratee) { - return object == null - ? object - : (0,_baseFor/* default */.A)(object, (0,_castFunction/* default */.A)(iteratee), keysIn/* default */.A); -} - -/* harmony default export */ const lodash_es_forIn = (forIn); - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/position/bk.js - - - - -/* - * This module provides coordinate assignment based on Brandes and Köpf, "Fast - * and Simple Horizontal Coordinate Assignment." - */ - - - -/* - * Marks all edges in the graph with a type-1 conflict with the "type1Conflict" - * property. A type-1 conflict is one where a non-inner segment crosses an - * inner segment. An inner segment is an edge with both incident nodes marked - * with the "dummy" property. - * - * This algorithm scans layer by layer, starting with the second, for type-1 - * conflicts between the current layer and the previous layer. For each layer - * it scans the nodes from left to right until it reaches one that is incident - * on an inner segment. It then scans predecessors to determine if they have - * edges that cross that inner segment. At the end a final scan is done for all - * nodes on the current rank to see if they cross the last visited inner - * segment. - * - * This algorithm (safely) assumes that a dummy node will only be incident on a - * single node in the layers being scanned. - */ -function findType1Conflicts(g, layering) { - var conflicts = {}; - - function visitLayer(prevLayer, layer) { - var // last visited node in the previous layer that is incident on an inner - // segment. - k0 = 0, - // Tracks the last node in this layer scanned for crossings with a type-1 - // segment. - scanPos = 0, - prevLayerLength = prevLayer.length, - lastNode = lodash_es_last(layer); - - forEach/* default */.A(layer, function (v, i) { - var w = findOtherInnerSegmentNode(g, v), - k1 = w ? g.node(w).order : prevLayerLength; - - if (w || v === lastNode) { - forEach/* default */.A(layer.slice(scanPos, i + 1), function (scanNode) { - forEach/* default */.A(g.predecessors(scanNode), function (u) { - var uLabel = g.node(u), - uPos = uLabel.order; - if ((uPos < k0 || k1 < uPos) && !(uLabel.dummy && g.node(scanNode).dummy)) { - addConflict(conflicts, u, scanNode); - } - }); - }); - // @ts-expect-error - scanPos = i + 1; - k0 = k1; - } - }); - - return layer; - } - - reduce/* default */.A(layering, visitLayer); - return conflicts; -} - -function findType2Conflicts(g, layering) { - var conflicts = {}; - - function scan(south, southPos, southEnd, prevNorthBorder, nextNorthBorder) { - var v; - forEach/* default */.A(range/* default */.A(southPos, southEnd), function (i) { - v = south[i]; - if (g.node(v).dummy) { - forEach/* default */.A(g.predecessors(v), function (u) { - var uNode = g.node(u); - if (uNode.dummy && (uNode.order < prevNorthBorder || uNode.order > nextNorthBorder)) { - addConflict(conflicts, u, v); - } - }); - } - }); - } - - function visitLayer(north, south) { - var prevNorthPos = -1, - nextNorthPos, - southPos = 0; - - forEach/* default */.A(south, function (v, southLookahead) { - if (g.node(v).dummy === 'border') { - var predecessors = g.predecessors(v); - if (predecessors.length) { - nextNorthPos = g.node(predecessors[0]).order; - scan(south, southPos, southLookahead, prevNorthPos, nextNorthPos); - // @ts-expect-error - southPos = southLookahead; - prevNorthPos = nextNorthPos; - } - } - scan(south, southPos, south.length, nextNorthPos, north.length); - }); - - return south; - } - - reduce/* default */.A(layering, visitLayer); - return conflicts; -} - -function findOtherInnerSegmentNode(g, v) { - if (g.node(v).dummy) { - return lodash_es_find(g.predecessors(v), function (u) { - return g.node(u).dummy; - }); - } -} - -function addConflict(conflicts, v, w) { - if (v > w) { - var tmp = v; - v = w; - w = tmp; - } - - var conflictsV = conflicts[v]; - if (!conflictsV) { - conflicts[v] = conflictsV = {}; - } - conflictsV[w] = true; -} - -function hasConflict(conflicts, v, w) { - if (v > w) { - var tmp = v; - v = w; - w = tmp; - } - return has/* default */.A(conflicts[v], w); -} - -/* - * Try to align nodes into vertical "blocks" where possible. This algorithm - * attempts to align a node with one of its median neighbors. If the edge - * connecting a neighbor is a type-1 conflict then we ignore that possibility. - * If a previous node has already formed a block with a node after the node - * we're trying to form a block with, we also ignore that possibility - our - * blocks would be split in that scenario. - */ -function verticalAlignment(g, layering, conflicts, neighborFn) { - var root = {}, - align = {}, - pos = {}; - - // We cache the position here based on the layering because the graph and - // layering may be out of sync. The layering matrix is manipulated to - // generate different extreme alignments. - forEach/* default */.A(layering, function (layer) { - forEach/* default */.A(layer, function (v, order) { - root[v] = v; - align[v] = v; - pos[v] = order; - }); - }); - - forEach/* default */.A(layering, function (layer) { - var prevIdx = -1; - forEach/* default */.A(layer, function (v) { - var ws = neighborFn(v); - if (ws.length) { - ws = lodash_es_sortBy(ws, function (w) { - return pos[w]; - }); - var mp = (ws.length - 1) / 2; - for (var i = Math.floor(mp), il = Math.ceil(mp); i <= il; ++i) { - var w = ws[i]; - if (align[v] === v && prevIdx < pos[w] && !hasConflict(conflicts, v, w)) { - align[w] = v; - align[v] = root[v] = root[w]; - prevIdx = pos[w]; - } - } - } - }); - }); - - return { root: root, align: align }; -} - -function horizontalCompaction(g, layering, root, align, reverseSep) { - // This portion of the algorithm differs from BK due to a number of problems. - // Instead of their algorithm we construct a new block graph and do two - // sweeps. The first sweep places blocks with the smallest possible - // coordinates. The second sweep removes unused space by moving blocks to the - // greatest coordinates without violating separation. - var xs = {}, - blockG = buildBlockGraph(g, layering, root, reverseSep), - borderType = reverseSep ? 'borderLeft' : 'borderRight'; - - function iterate(setXsFunc, nextNodesFunc) { - var stack = blockG.nodes(); - var elem = stack.pop(); - var visited = {}; - while (elem) { - if (visited[elem]) { - setXsFunc(elem); - } else { - visited[elem] = true; - stack.push(elem); - stack = stack.concat(nextNodesFunc(elem)); - } - - elem = stack.pop(); - } - } - - // First pass, assign smallest coordinates - function pass1(elem) { - xs[elem] = blockG.inEdges(elem).reduce(function (acc, e) { - return Math.max(acc, xs[e.v] + blockG.edge(e)); - }, 0); - } - - // Second pass, assign greatest coordinates - function pass2(elem) { - var min = blockG.outEdges(elem).reduce(function (acc, e) { - return Math.min(acc, xs[e.w] - blockG.edge(e)); - }, Number.POSITIVE_INFINITY); - - var node = g.node(elem); - if (min !== Number.POSITIVE_INFINITY && node.borderType !== borderType) { - xs[elem] = Math.max(xs[elem], min); - } - } - - iterate(pass1, blockG.predecessors.bind(blockG)); - iterate(pass2, blockG.successors.bind(blockG)); - - // Assign x coordinates to all nodes - forEach/* default */.A(align, function (v) { - xs[v] = xs[root[v]]; - }); - - return xs; -} - -function buildBlockGraph(g, layering, root, reverseSep) { - var blockGraph = new graphlib/* Graph */.T(), - graphLabel = g.graph(), - sepFn = sep(graphLabel.nodesep, graphLabel.edgesep, reverseSep); - - forEach/* default */.A(layering, function (layer) { - var u; - forEach/* default */.A(layer, function (v) { - var vRoot = root[v]; - blockGraph.setNode(vRoot); - if (u) { - var uRoot = root[u], - prevMax = blockGraph.edge(uRoot, vRoot); - blockGraph.setEdge(uRoot, vRoot, Math.max(sepFn(g, v, u), prevMax || 0)); - } - u = v; - }); - }); - - return blockGraph; -} - -/* - * Returns the alignment that has the smallest width of the given alignments. - */ -function findSmallestWidthAlignment(g, xss) { - return lodash_es_minBy(values/* default */.A(xss), function (xs) { - var max = Number.NEGATIVE_INFINITY; - var min = Number.POSITIVE_INFINITY; - - lodash_es_forIn(xs, function (x, v) { - var halfWidth = width(g, v) / 2; - - max = Math.max(x + halfWidth, max); - min = Math.min(x - halfWidth, min); - }); - - return max - min; - }); -} - -/* - * Align the coordinates of each of the layout alignments such that - * left-biased alignments have their minimum coordinate at the same point as - * the minimum coordinate of the smallest width alignment and right-biased - * alignments have their maximum coordinate at the same point as the maximum - * coordinate of the smallest width alignment. - */ -function alignCoordinates(xss, alignTo) { - var alignToVals = values/* default */.A(alignTo), - alignToMin = lodash_es_min(alignToVals), - alignToMax = lodash_es_max(alignToVals); - - forEach/* default */.A(['u', 'd'], function (vert) { - forEach/* default */.A(['l', 'r'], function (horiz) { - var alignment = vert + horiz, - xs = xss[alignment], - delta; - if (xs === alignTo) return; - - var xsVals = values/* default */.A(xs); - delta = horiz === 'l' ? alignToMin - lodash_es_min(xsVals) : alignToMax - lodash_es_max(xsVals); - - if (delta) { - xss[alignment] = lodash_es_mapValues(xs, function (x) { - return x + delta; - }); - } - }); - }); -} - -function balance(xss, align) { - return lodash_es_mapValues(xss.ul, function (ignore, v) { - if (align) { - return xss[align.toLowerCase()][v]; - } else { - var xs = lodash_es_sortBy(map/* default */.A(xss, v)); - return (xs[1] + xs[2]) / 2; - } - }); -} - -function positionX(g) { - var layering = buildLayerMatrix(g); - var conflicts = merge/* default */.A(findType1Conflicts(g, layering), findType2Conflicts(g, layering)); - - var xss = {}; - var adjustedLayering; - forEach/* default */.A(['u', 'd'], function (vert) { - adjustedLayering = vert === 'u' ? layering : values/* default */.A(layering).reverse(); - forEach/* default */.A(['l', 'r'], function (horiz) { - if (horiz === 'r') { - adjustedLayering = map/* default */.A(adjustedLayering, function (inner) { - return values/* default */.A(inner).reverse(); - }); - } - - var neighborFn = (vert === 'u' ? g.predecessors : g.successors).bind(g); - var align = verticalAlignment(g, adjustedLayering, conflicts, neighborFn); - var xs = horizontalCompaction(g, adjustedLayering, align.root, align.align, horiz === 'r'); - if (horiz === 'r') { - xs = lodash_es_mapValues(xs, function (x) { - return -x; - }); - } - xss[vert + horiz] = xs; - }); - }); - - var smallestWidth = findSmallestWidthAlignment(g, xss); - alignCoordinates(xss, smallestWidth); - return balance(xss, g.graph().align); -} - -function sep(nodeSep, edgeSep, reverseSep) { - return function (g, v, w) { - var vLabel = g.node(v); - var wLabel = g.node(w); - var sum = 0; - var delta; - - sum += vLabel.width / 2; - if (has/* default */.A(vLabel, 'labelpos')) { - switch (vLabel.labelpos.toLowerCase()) { - case 'l': - delta = -vLabel.width / 2; - break; - case 'r': - delta = vLabel.width / 2; - break; - } - } - if (delta) { - sum += reverseSep ? delta : -delta; - } - delta = 0; - - sum += (vLabel.dummy ? edgeSep : nodeSep) / 2; - sum += (wLabel.dummy ? edgeSep : nodeSep) / 2; - - sum += wLabel.width / 2; - if (has/* default */.A(wLabel, 'labelpos')) { - switch (wLabel.labelpos.toLowerCase()) { - case 'l': - delta = wLabel.width / 2; - break; - case 'r': - delta = -wLabel.width / 2; - break; - } - } - if (delta) { - sum += reverseSep ? delta : -delta; - } - delta = 0; - - return sum; - }; -} - -function width(g, v) { - return g.node(v).width; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/position/index.js - - - - - - -function position(g) { - g = asNonCompoundGraph(g); - - positionY(g); - lodash_es_forOwn(positionX(g), function (x, v) { - g.node(v).x = x; - }); -} - -function positionY(g) { - var layering = buildLayerMatrix(g); - var rankSep = g.graph().ranksep; - var prevY = 0; - forEach/* default */.A(layering, function (layer) { - var maxHeight = lodash_es_max( - map/* default */.A(layer, function (v) { - return g.node(v).height; - }) - ); - forEach/* default */.A(layer, function (v) { - g.node(v).y = prevY + maxHeight / 2; - }); - prevY += maxHeight + rankSep; - }); -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/layout.js - - - - - - - - - - - - - - - -function layout(g, opts) { - var time = opts && opts.debugTiming ? util_time : notime; - time('layout', function () { - var layoutGraph = time(' buildLayoutGraph', function () { - return buildLayoutGraph(g); - }); - time(' runLayout', function () { - runLayout(layoutGraph, time); - }); - time(' updateInputGraph', function () { - updateInputGraph(g, layoutGraph); - }); - }); -} - -function runLayout(g, time) { - time(' makeSpaceForEdgeLabels', function () { - makeSpaceForEdgeLabels(g); - }); - time(' removeSelfEdges', function () { - removeSelfEdges(g); - }); - time(' acyclic', function () { - run(g); - }); - time(' nestingGraph.run', function () { - nesting_graph_run(g); - }); - time(' rank', function () { - rank(asNonCompoundGraph(g)); - }); - time(' injectEdgeLabelProxies', function () { - injectEdgeLabelProxies(g); - }); - time(' removeEmptyRanks', function () { - removeEmptyRanks(g); - }); - time(' nestingGraph.cleanup', function () { - cleanup(g); - }); - time(' normalizeRanks', function () { - normalizeRanks(g); - }); - time(' assignRankMinMax', function () { - assignRankMinMax(g); - }); - time(' removeEdgeLabelProxies', function () { - removeEdgeLabelProxies(g); - }); - time(' normalize.run', function () { - normalize_run(g); - }); - time(' parentDummyChains', function () { - parentDummyChains(g); - }); - time(' addBorderSegments', function () { - addBorderSegments(g); - }); - time(' order', function () { - order(g); - }); - time(' insertSelfEdges', function () { - insertSelfEdges(g); - }); - time(' adjustCoordinateSystem', function () { - adjust(g); - }); - time(' position', function () { - position(g); - }); - time(' positionSelfEdges', function () { - positionSelfEdges(g); - }); - time(' removeBorderNodes', function () { - removeBorderNodes(g); - }); - time(' normalize.undo', function () { - normalize_undo(g); - }); - time(' fixupEdgeLabelCoords', function () { - fixupEdgeLabelCoords(g); - }); - time(' undoCoordinateSystem', function () { - coordinate_system_undo(g); - }); - time(' translateGraph', function () { - translateGraph(g); - }); - time(' assignNodeIntersects', function () { - assignNodeIntersects(g); - }); - time(' reversePoints', function () { - reversePointsForReversedEdges(g); - }); - time(' acyclic.undo', function () { - undo(g); - }); -} - -/* - * Copies final layout information from the layout graph back to the input - * graph. This process only copies whitelisted attributes from the layout graph - * to the input graph, so it serves as a good place to determine what - * attributes can influence layout. - */ -function updateInputGraph(inputGraph, layoutGraph) { - forEach/* default */.A(inputGraph.nodes(), function (v) { - var inputLabel = inputGraph.node(v); - var layoutLabel = layoutGraph.node(v); - - if (inputLabel) { - inputLabel.x = layoutLabel.x; - inputLabel.y = layoutLabel.y; - - if (layoutGraph.children(v).length) { - inputLabel.width = layoutLabel.width; - inputLabel.height = layoutLabel.height; - } - } - }); - - forEach/* default */.A(inputGraph.edges(), function (e) { - var inputLabel = inputGraph.edge(e); - var layoutLabel = layoutGraph.edge(e); - - inputLabel.points = layoutLabel.points; - if (has/* default */.A(layoutLabel, 'x')) { - inputLabel.x = layoutLabel.x; - inputLabel.y = layoutLabel.y; - } - }); - - inputGraph.graph().width = layoutGraph.graph().width; - inputGraph.graph().height = layoutGraph.graph().height; -} - -var graphNumAttrs = ['nodesep', 'edgesep', 'ranksep', 'marginx', 'marginy']; -var graphDefaults = { ranksep: 50, edgesep: 20, nodesep: 50, rankdir: 'tb' }; -var graphAttrs = ['acyclicer', 'ranker', 'rankdir', 'align']; -var nodeNumAttrs = ['width', 'height']; -var nodeDefaults = { width: 0, height: 0 }; -var edgeNumAttrs = ['minlen', 'weight', 'width', 'height', 'labeloffset']; -var edgeDefaults = { - minlen: 1, - weight: 1, - width: 0, - height: 0, - labeloffset: 10, - labelpos: 'r', -}; -var edgeAttrs = ['labelpos']; - -/* - * Constructs a new graph from the input graph, which can be used for layout. - * This process copies only whitelisted attributes from the input graph to the - * layout graph. Thus this function serves as a good place to determine what - * attributes can influence layout. - */ -function buildLayoutGraph(inputGraph) { - var g = new graphlib/* Graph */.T({ multigraph: true, compound: true }); - var graph = canonicalize(inputGraph.graph()); - - g.setGraph( - merge/* default */.A({}, graphDefaults, selectNumberAttrs(graph, graphNumAttrs), pick/* default */.A(graph, graphAttrs)) - ); - - forEach/* default */.A(inputGraph.nodes(), function (v) { - var node = canonicalize(inputGraph.node(v)); - g.setNode(v, defaults/* default */.A(selectNumberAttrs(node, nodeNumAttrs), nodeDefaults)); - g.setParent(v, inputGraph.parent(v)); - }); - - forEach/* default */.A(inputGraph.edges(), function (e) { - var edge = canonicalize(inputGraph.edge(e)); - g.setEdge( - e, - merge/* default */.A({}, edgeDefaults, selectNumberAttrs(edge, edgeNumAttrs), pick/* default */.A(edge, edgeAttrs)) - ); - }); - - return g; -} - -/* - * This idea comes from the Gansner paper: to account for edge labels in our - * layout we split each rank in half by doubling minlen and halving ranksep. - * Then we can place labels at these mid-points between nodes. - * - * We also add some minimal padding to the width to push the label for the edge - * away from the edge itself a bit. - */ -function makeSpaceForEdgeLabels(g) { - var graph = g.graph(); - graph.ranksep /= 2; - forEach/* default */.A(g.edges(), function (e) { - var edge = g.edge(e); - edge.minlen *= 2; - if (edge.labelpos.toLowerCase() !== 'c') { - if (graph.rankdir === 'TB' || graph.rankdir === 'BT') { - edge.width += edge.labeloffset; - } else { - edge.height += edge.labeloffset; - } - } - }); -} - -/* - * Creates temporary dummy nodes that capture the rank in which each edge's - * label is going to, if it has one of non-zero width and height. We do this - * so that we can safely remove empty ranks while preserving balance for the - * label's position. - */ -function injectEdgeLabelProxies(g) { - forEach/* default */.A(g.edges(), function (e) { - var edge = g.edge(e); - if (edge.width && edge.height) { - var v = g.node(e.v); - var w = g.node(e.w); - var label = { rank: (w.rank - v.rank) / 2 + v.rank, e: e }; - addDummyNode(g, 'edge-proxy', label, '_ep'); - } - }); -} - -function assignRankMinMax(g) { - var maxRank = 0; - forEach/* default */.A(g.nodes(), function (v) { - var node = g.node(v); - if (node.borderTop) { - node.minRank = g.node(node.borderTop).rank; - node.maxRank = g.node(node.borderBottom).rank; - // @ts-expect-error - maxRank = lodash_es_max(maxRank, node.maxRank); - } - }); - g.graph().maxRank = maxRank; -} - -function removeEdgeLabelProxies(g) { - forEach/* default */.A(g.nodes(), function (v) { - var node = g.node(v); - if (node.dummy === 'edge-proxy') { - g.edge(node.e).labelRank = node.rank; - g.removeNode(v); - } - }); -} - -function translateGraph(g) { - var minX = Number.POSITIVE_INFINITY; - var maxX = 0; - var minY = Number.POSITIVE_INFINITY; - var maxY = 0; - var graphLabel = g.graph(); - var marginX = graphLabel.marginx || 0; - var marginY = graphLabel.marginy || 0; - - function getExtremes(attrs) { - var x = attrs.x; - var y = attrs.y; - var w = attrs.width; - var h = attrs.height; - minX = Math.min(minX, x - w / 2); - maxX = Math.max(maxX, x + w / 2); - minY = Math.min(minY, y - h / 2); - maxY = Math.max(maxY, y + h / 2); - } - - forEach/* default */.A(g.nodes(), function (v) { - getExtremes(g.node(v)); - }); - forEach/* default */.A(g.edges(), function (e) { - var edge = g.edge(e); - if (has/* default */.A(edge, 'x')) { - getExtremes(edge); - } - }); - - minX -= marginX; - minY -= marginY; - - forEach/* default */.A(g.nodes(), function (v) { - var node = g.node(v); - node.x -= minX; - node.y -= minY; - }); - - forEach/* default */.A(g.edges(), function (e) { - var edge = g.edge(e); - forEach/* default */.A(edge.points, function (p) { - p.x -= minX; - p.y -= minY; - }); - if (has/* default */.A(edge, 'x')) { - edge.x -= minX; - } - if (has/* default */.A(edge, 'y')) { - edge.y -= minY; - } - }); - - graphLabel.width = maxX - minX + marginX; - graphLabel.height = maxY - minY + marginY; -} - -function assignNodeIntersects(g) { - forEach/* default */.A(g.edges(), function (e) { - var edge = g.edge(e); - var nodeV = g.node(e.v); - var nodeW = g.node(e.w); - var p1, p2; - if (!edge.points) { - edge.points = []; - p1 = nodeW; - p2 = nodeV; - } else { - p1 = edge.points[0]; - p2 = edge.points[edge.points.length - 1]; - } - edge.points.unshift(intersectRect(nodeV, p1)); - edge.points.push(intersectRect(nodeW, p2)); - }); -} - -function fixupEdgeLabelCoords(g) { - forEach/* default */.A(g.edges(), function (e) { - var edge = g.edge(e); - if (has/* default */.A(edge, 'x')) { - if (edge.labelpos === 'l' || edge.labelpos === 'r') { - edge.width -= edge.labeloffset; - } - switch (edge.labelpos) { - case 'l': - edge.x -= edge.width / 2 + edge.labeloffset; - break; - case 'r': - edge.x += edge.width / 2 + edge.labeloffset; - break; - } - } - }); -} - -function reversePointsForReversedEdges(g) { - forEach/* default */.A(g.edges(), function (e) { - var edge = g.edge(e); - if (edge.reversed) { - edge.points.reverse(); - } - }); -} - -function removeBorderNodes(g) { - forEach/* default */.A(g.nodes(), function (v) { - if (g.children(v).length) { - var node = g.node(v); - var t = g.node(node.borderTop); - var b = g.node(node.borderBottom); - var l = g.node(lodash_es_last(node.borderLeft)); - var r = g.node(lodash_es_last(node.borderRight)); - - node.width = Math.abs(r.x - l.x); - node.height = Math.abs(b.y - t.y); - node.x = l.x + node.width / 2; - node.y = t.y + node.height / 2; - } - }); - - forEach/* default */.A(g.nodes(), function (v) { - if (g.node(v).dummy === 'border') { - g.removeNode(v); - } - }); -} - -function removeSelfEdges(g) { - forEach/* default */.A(g.edges(), function (e) { - if (e.v === e.w) { - var node = g.node(e.v); - if (!node.selfEdges) { - node.selfEdges = []; - } - node.selfEdges.push({ e: e, label: g.edge(e) }); - g.removeEdge(e); - } - }); -} - -function insertSelfEdges(g) { - var layers = buildLayerMatrix(g); - forEach/* default */.A(layers, function (layer) { - var orderShift = 0; - forEach/* default */.A(layer, function (v, i) { - var node = g.node(v); - node.order = i + orderShift; - forEach/* default */.A(node.selfEdges, function (selfEdge) { - addDummyNode( - g, - 'selfedge', - { - width: selfEdge.label.width, - height: selfEdge.label.height, - rank: node.rank, - order: i + ++orderShift, - e: selfEdge.e, - label: selfEdge.label, - }, - '_se' - ); - }); - delete node.selfEdges; - }); - }); -} - -function positionSelfEdges(g) { - forEach/* default */.A(g.nodes(), function (v) { - var node = g.node(v); - if (node.dummy === 'selfedge') { - var selfNode = g.node(node.e.v); - var x = selfNode.x + selfNode.width / 2; - var y = selfNode.y; - var dx = node.x - x; - var dy = selfNode.height / 2; - g.setEdge(node.e, node.label); - g.removeNode(v); - node.label.points = [ - { x: x + (2 * dx) / 3, y: y - dy }, - { x: x + (5 * dx) / 6, y: y - dy }, - { x: x + dx, y: y }, - { x: x + (5 * dx) / 6, y: y + dy }, - { x: x + (2 * dx) / 3, y: y + dy }, - ]; - node.label.x = node.x; - node.label.y = node.y; - } - }); -} - -function selectNumberAttrs(obj, attrs) { - return lodash_es_mapValues(pick/* default */.A(obj, attrs), Number); -} - -function canonicalize(attrs) { - var newAttrs = {}; - forEach/* default */.A(attrs, function (v, k) { - newAttrs[k.toLowerCase()] = v; - }); - return newAttrs; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/index.js - - - - - - - - -/***/ }), - -/***/ 73046: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - T: () => (/* binding */ Graph) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/has.js + 1 modules -var has = __webpack_require__(48585); -// EXTERNAL MODULE: ./node_modules/lodash-es/constant.js -var constant = __webpack_require__(39142); -// EXTERNAL MODULE: ./node_modules/lodash-es/isFunction.js -var isFunction = __webpack_require__(89610); -// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js -var keys = __webpack_require__(27422); -// EXTERNAL MODULE: ./node_modules/lodash-es/filter.js + 1 modules -var filter = __webpack_require__(11662); -// EXTERNAL MODULE: ./node_modules/lodash-es/isEmpty.js -var isEmpty = __webpack_require__(66401); -// EXTERNAL MODULE: ./node_modules/lodash-es/forEach.js -var forEach = __webpack_require__(8058); -// EXTERNAL MODULE: ./node_modules/lodash-es/isUndefined.js -var isUndefined = __webpack_require__(69592); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFlatten.js + 1 modules -var _baseFlatten = __webpack_require__(13588); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseRest.js -var _baseRest = __webpack_require__(24326); -// EXTERNAL MODULE: ./node_modules/lodash-es/_SetCache.js + 2 modules -var _SetCache = __webpack_require__(62062); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFindIndex.js -var _baseFindIndex = __webpack_require__(25707); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsNaN.js -/** - * The base implementation of `_.isNaN` without support for number objects. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. - */ -function baseIsNaN(value) { - return value !== value; -} - -/* harmony default export */ const _baseIsNaN = (baseIsNaN); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_strictIndexOf.js -/** - * A specialized version of `_.indexOf` which performs strict equality - * comparisons of values, i.e. `===`. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} fromIndex The index to search from. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function strictIndexOf(array, value, fromIndex) { - var index = fromIndex - 1, - length = array.length; - - while (++index < length) { - if (array[index] === value) { - return index; - } - } - return -1; -} - -/* harmony default export */ const _strictIndexOf = (strictIndexOf); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIndexOf.js - - - - -/** - * The base implementation of `_.indexOf` without `fromIndex` bounds checks. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} fromIndex The index to search from. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function baseIndexOf(array, value, fromIndex) { - return value === value - ? _strictIndexOf(array, value, fromIndex) - : (0,_baseFindIndex/* default */.A)(array, _baseIsNaN, fromIndex); -} - -/* harmony default export */ const _baseIndexOf = (baseIndexOf); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_arrayIncludes.js - - -/** - * A specialized version of `_.includes` for arrays without support for - * specifying an index to search from. - * - * @private - * @param {Array} [array] The array to inspect. - * @param {*} target The value to search for. - * @returns {boolean} Returns `true` if `target` is found, else `false`. - */ -function arrayIncludes(array, value) { - var length = array == null ? 0 : array.length; - return !!length && _baseIndexOf(array, value, 0) > -1; -} - -/* harmony default export */ const _arrayIncludes = (arrayIncludes); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_arrayIncludesWith.js -/** - * This function is like `arrayIncludes` except that it accepts a comparator. - * - * @private - * @param {Array} [array] The array to inspect. - * @param {*} target The value to search for. - * @param {Function} comparator The comparator invoked per element. - * @returns {boolean} Returns `true` if `target` is found, else `false`. - */ -function arrayIncludesWith(array, value, comparator) { - var index = -1, - length = array == null ? 0 : array.length; - - while (++index < length) { - if (comparator(value, array[index])) { - return true; - } - } - return false; -} - -/* harmony default export */ const _arrayIncludesWith = (arrayIncludesWith); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_cacheHas.js -var _cacheHas = __webpack_require__(64099); -// EXTERNAL MODULE: ./node_modules/lodash-es/_Set.js -var _Set = __webpack_require__(39857); -;// CONCATENATED MODULE: ./node_modules/lodash-es/noop.js -/** - * This method returns `undefined`. - * - * @static - * @memberOf _ - * @since 2.3.0 - * @category Util - * @example - * - * _.times(2, _.noop); - * // => [undefined, undefined] - */ -function noop() { - // No operation performed. -} - -/* harmony default export */ const lodash_es_noop = (noop); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_setToArray.js -var _setToArray = __webpack_require__(29959); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_createSet.js - - - - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0; - -/** - * Creates a set object of `values`. - * - * @private - * @param {Array} values The values to add to the set. - * @returns {Object} Returns the new set. - */ -var createSet = !(_Set/* default */.A && (1 / (0,_setToArray/* default */.A)(new _Set/* default */.A([,-0]))[1]) == INFINITY) ? lodash_es_noop : function(values) { - return new _Set/* default */.A(values); -}; - -/* harmony default export */ const _createSet = (createSet); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseUniq.js - - - - - - - -/** Used as the size to enable large array optimizations. */ -var LARGE_ARRAY_SIZE = 200; - -/** - * The base implementation of `_.uniqBy` without support for iteratee shorthands. - * - * @private - * @param {Array} array The array to inspect. - * @param {Function} [iteratee] The iteratee invoked per element. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new duplicate free array. - */ -function baseUniq(array, iteratee, comparator) { - var index = -1, - includes = _arrayIncludes, - length = array.length, - isCommon = true, - result = [], - seen = result; - - if (comparator) { - isCommon = false; - includes = _arrayIncludesWith; - } - else if (length >= LARGE_ARRAY_SIZE) { - var set = iteratee ? null : _createSet(array); - if (set) { - return (0,_setToArray/* default */.A)(set); - } - isCommon = false; - includes = _cacheHas/* default */.A; - seen = new _SetCache/* default */.A; - } - else { - seen = iteratee ? [] : result; - } - outer: - while (++index < length) { - var value = array[index], - computed = iteratee ? iteratee(value) : value; - - value = (comparator || value !== 0) ? value : 0; - if (isCommon && computed === computed) { - var seenIndex = seen.length; - while (seenIndex--) { - if (seen[seenIndex] === computed) { - continue outer; - } - } - if (iteratee) { - seen.push(computed); - } - result.push(value); - } - else if (!includes(seen, computed, comparator)) { - if (seen !== result) { - seen.push(computed); - } - result.push(value); - } - } - return result; -} - -/* harmony default export */ const _baseUniq = (baseUniq); - -// EXTERNAL MODULE: ./node_modules/lodash-es/isArrayLikeObject.js -var isArrayLikeObject = __webpack_require__(53533); -;// CONCATENATED MODULE: ./node_modules/lodash-es/union.js - - - - - -/** - * Creates an array of unique values, in order, from all given arrays using - * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @returns {Array} Returns the new array of combined values. - * @example - * - * _.union([2], [1, 2]); - * // => [2, 1] - */ -var union = (0,_baseRest/* default */.A)(function(arrays) { - return _baseUniq((0,_baseFlatten/* default */.A)(arrays, 1, isArrayLikeObject/* default */.A, true)); -}); - -/* harmony default export */ const lodash_es_union = (union); - -// EXTERNAL MODULE: ./node_modules/lodash-es/values.js + 1 modules -var values = __webpack_require__(38207); -// EXTERNAL MODULE: ./node_modules/lodash-es/reduce.js + 2 modules -var reduce = __webpack_require__(89463); -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/graph.js - - -var DEFAULT_EDGE_NAME = '\x00'; -var GRAPH_NODE = '\x00'; -var EDGE_KEY_DELIM = '\x01'; - -// Implementation notes: -// -// * Node id query functions should return string ids for the nodes -// * Edge id query functions should return an "edgeObj", edge object, that is -// composed of enough information to uniquely identify an edge: {v, w, name}. -// * Internally we use an "edgeId", a stringified form of the edgeObj, to -// reference edges. This is because we need a performant way to look these -// edges up and, object properties, which have string keys, are the closest -// we're going to get to a performant hashtable in JavaScript. - -// Implementation notes: -// -// * Node id query functions should return string ids for the nodes -// * Edge id query functions should return an "edgeObj", edge object, that is -// composed of enough information to uniquely identify an edge: {v, w, name}. -// * Internally we use an "edgeId", a stringified form of the edgeObj, to -// reference edges. This is because we need a performant way to look these -// edges up and, object properties, which have string keys, are the closest -// we're going to get to a performant hashtable in JavaScript. -class Graph { - constructor(opts = {}) { - this._isDirected = has/* default */.A(opts, 'directed') ? opts.directed : true; - this._isMultigraph = has/* default */.A(opts, 'multigraph') ? opts.multigraph : false; - this._isCompound = has/* default */.A(opts, 'compound') ? opts.compound : false; - - // Label for the graph itself - this._label = undefined; - - // Defaults to be set when creating a new node - this._defaultNodeLabelFn = constant/* default */.A(undefined); - - // Defaults to be set when creating a new edge - this._defaultEdgeLabelFn = constant/* default */.A(undefined); - - // v -> label - this._nodes = {}; - - if (this._isCompound) { - // v -> parent - this._parent = {}; - - // v -> children - this._children = {}; - this._children[GRAPH_NODE] = {}; - } - - // v -> edgeObj - this._in = {}; - - // u -> v -> Number - this._preds = {}; - - // v -> edgeObj - this._out = {}; - - // v -> w -> Number - this._sucs = {}; - - // e -> edgeObj - this._edgeObjs = {}; - - // e -> label - this._edgeLabels = {}; - } - /* === Graph functions ========= */ - isDirected() { - return this._isDirected; - } - isMultigraph() { - return this._isMultigraph; - } - isCompound() { - return this._isCompound; - } - setGraph(label) { - this._label = label; - return this; - } - graph() { - return this._label; - } - /* === Node functions ========== */ - setDefaultNodeLabel(newDefault) { - if (!isFunction/* default */.A(newDefault)) { - newDefault = constant/* default */.A(newDefault); - } - this._defaultNodeLabelFn = newDefault; - return this; - } - nodeCount() { - return this._nodeCount; - } - nodes() { - return keys/* default */.A(this._nodes); - } - sources() { - var self = this; - return filter/* default */.A(this.nodes(), function (v) { - return isEmpty/* default */.A(self._in[v]); - }); - } - sinks() { - var self = this; - return filter/* default */.A(this.nodes(), function (v) { - return isEmpty/* default */.A(self._out[v]); - }); - } - setNodes(vs, value) { - var args = arguments; - var self = this; - forEach/* default */.A(vs, function (v) { - if (args.length > 1) { - self.setNode(v, value); - } else { - self.setNode(v); - } - }); - return this; - } - setNode(v, value) { - if (has/* default */.A(this._nodes, v)) { - if (arguments.length > 1) { - this._nodes[v] = value; - } - return this; - } - - // @ts-expect-error - this._nodes[v] = arguments.length > 1 ? value : this._defaultNodeLabelFn(v); - if (this._isCompound) { - this._parent[v] = GRAPH_NODE; - this._children[v] = {}; - this._children[GRAPH_NODE][v] = true; - } - this._in[v] = {}; - this._preds[v] = {}; - this._out[v] = {}; - this._sucs[v] = {}; - ++this._nodeCount; - return this; - } - node(v) { - return this._nodes[v]; - } - hasNode(v) { - return has/* default */.A(this._nodes, v); - } - removeNode(v) { - var self = this; - if (has/* default */.A(this._nodes, v)) { - var removeEdge = function (e) { - self.removeEdge(self._edgeObjs[e]); - }; - delete this._nodes[v]; - if (this._isCompound) { - this._removeFromParentsChildList(v); - delete this._parent[v]; - forEach/* default */.A(this.children(v), function (child) { - self.setParent(child); - }); - delete this._children[v]; - } - forEach/* default */.A(keys/* default */.A(this._in[v]), removeEdge); - delete this._in[v]; - delete this._preds[v]; - forEach/* default */.A(keys/* default */.A(this._out[v]), removeEdge); - delete this._out[v]; - delete this._sucs[v]; - --this._nodeCount; - } - return this; - } - setParent(v, parent) { - if (!this._isCompound) { - throw new Error('Cannot set parent in a non-compound graph'); - } - - if (isUndefined/* default */.A(parent)) { - parent = GRAPH_NODE; - } else { - // Coerce parent to string - parent += ''; - for (var ancestor = parent; !isUndefined/* default */.A(ancestor); ancestor = this.parent(ancestor)) { - if (ancestor === v) { - throw new Error('Setting ' + parent + ' as parent of ' + v + ' would create a cycle'); - } - } - - this.setNode(parent); - } - - this.setNode(v); - this._removeFromParentsChildList(v); - this._parent[v] = parent; - this._children[parent][v] = true; - return this; - } - _removeFromParentsChildList(v) { - delete this._children[this._parent[v]][v]; - } - parent(v) { - if (this._isCompound) { - var parent = this._parent[v]; - if (parent !== GRAPH_NODE) { - return parent; - } - } - } - children(v) { - if (isUndefined/* default */.A(v)) { - v = GRAPH_NODE; - } - - if (this._isCompound) { - var children = this._children[v]; - if (children) { - return keys/* default */.A(children); - } - } else if (v === GRAPH_NODE) { - return this.nodes(); - } else if (this.hasNode(v)) { - return []; - } - } - predecessors(v) { - var predsV = this._preds[v]; - if (predsV) { - return keys/* default */.A(predsV); - } - } - successors(v) { - var sucsV = this._sucs[v]; - if (sucsV) { - return keys/* default */.A(sucsV); - } - } - neighbors(v) { - var preds = this.predecessors(v); - if (preds) { - return lodash_es_union(preds, this.successors(v)); - } - } - isLeaf(v) { - var neighbors; - if (this.isDirected()) { - neighbors = this.successors(v); - } else { - neighbors = this.neighbors(v); - } - return neighbors.length === 0; - } - filterNodes(filter) { - // @ts-expect-error - var copy = new this.constructor({ - directed: this._isDirected, - multigraph: this._isMultigraph, - compound: this._isCompound, - }); - - copy.setGraph(this.graph()); - - var self = this; - forEach/* default */.A(this._nodes, function (value, v) { - if (filter(v)) { - copy.setNode(v, value); - } - }); - - forEach/* default */.A(this._edgeObjs, function (e) { - // @ts-expect-error - if (copy.hasNode(e.v) && copy.hasNode(e.w)) { - copy.setEdge(e, self.edge(e)); - } - }); - - var parents = {}; - function findParent(v) { - var parent = self.parent(v); - if (parent === undefined || copy.hasNode(parent)) { - parents[v] = parent; - return parent; - } else if (parent in parents) { - return parents[parent]; - } else { - return findParent(parent); - } - } - - if (this._isCompound) { - forEach/* default */.A(copy.nodes(), function (v) { - copy.setParent(v, findParent(v)); - }); - } - - return copy; - } - /* === Edge functions ========== */ - setDefaultEdgeLabel(newDefault) { - if (!isFunction/* default */.A(newDefault)) { - newDefault = constant/* default */.A(newDefault); - } - this._defaultEdgeLabelFn = newDefault; - return this; - } - edgeCount() { - return this._edgeCount; - } - edges() { - return values/* default */.A(this._edgeObjs); - } - setPath(vs, value) { - var self = this; - var args = arguments; - reduce/* default */.A(vs, function (v, w) { - if (args.length > 1) { - self.setEdge(v, w, value); - } else { - self.setEdge(v, w); - } - return w; - }); - return this; - } - /* - * setEdge(v, w, [value, [name]]) - * setEdge({ v, w, [name] }, [value]) - */ - setEdge() { - var v, w, name, value; - var valueSpecified = false; - var arg0 = arguments[0]; - - if (typeof arg0 === 'object' && arg0 !== null && 'v' in arg0) { - v = arg0.v; - w = arg0.w; - name = arg0.name; - if (arguments.length === 2) { - value = arguments[1]; - valueSpecified = true; - } - } else { - v = arg0; - w = arguments[1]; - name = arguments[3]; - if (arguments.length > 2) { - value = arguments[2]; - valueSpecified = true; - } - } - - v = '' + v; - w = '' + w; - if (!isUndefined/* default */.A(name)) { - name = '' + name; - } - - var e = edgeArgsToId(this._isDirected, v, w, name); - if (has/* default */.A(this._edgeLabels, e)) { - if (valueSpecified) { - this._edgeLabels[e] = value; - } - return this; - } - - if (!isUndefined/* default */.A(name) && !this._isMultigraph) { - throw new Error('Cannot set a named edge when isMultigraph = false'); - } - - // It didn't exist, so we need to create it. - // First ensure the nodes exist. - this.setNode(v); - this.setNode(w); - - // @ts-expect-error - this._edgeLabels[e] = valueSpecified ? value : this._defaultEdgeLabelFn(v, w, name); - - var edgeObj = edgeArgsToObj(this._isDirected, v, w, name); - // Ensure we add undirected edges in a consistent way. - v = edgeObj.v; - w = edgeObj.w; - - Object.freeze(edgeObj); - this._edgeObjs[e] = edgeObj; - incrementOrInitEntry(this._preds[w], v); - incrementOrInitEntry(this._sucs[v], w); - this._in[w][e] = edgeObj; - this._out[v][e] = edgeObj; - this._edgeCount++; - return this; - } - edge(v, w, name) { - var e = - arguments.length === 1 - ? edgeObjToId(this._isDirected, arguments[0]) - : edgeArgsToId(this._isDirected, v, w, name); - return this._edgeLabels[e]; - } - hasEdge(v, w, name) { - var e = - arguments.length === 1 - ? edgeObjToId(this._isDirected, arguments[0]) - : edgeArgsToId(this._isDirected, v, w, name); - return has/* default */.A(this._edgeLabels, e); - } - removeEdge(v, w, name) { - var e = - arguments.length === 1 - ? edgeObjToId(this._isDirected, arguments[0]) - : edgeArgsToId(this._isDirected, v, w, name); - var edge = this._edgeObjs[e]; - if (edge) { - v = edge.v; - w = edge.w; - delete this._edgeLabels[e]; - delete this._edgeObjs[e]; - decrementOrRemoveEntry(this._preds[w], v); - decrementOrRemoveEntry(this._sucs[v], w); - delete this._in[w][e]; - delete this._out[v][e]; - this._edgeCount--; - } - return this; - } - inEdges(v, u) { - var inV = this._in[v]; - if (inV) { - var edges = values/* default */.A(inV); - if (!u) { - return edges; - } - return filter/* default */.A(edges, function (edge) { - return edge.v === u; - }); - } - } - outEdges(v, w) { - var outV = this._out[v]; - if (outV) { - var edges = values/* default */.A(outV); - if (!w) { - return edges; - } - return filter/* default */.A(edges, function (edge) { - return edge.w === w; - }); - } - } - nodeEdges(v, w) { - var inEdges = this.inEdges(v, w); - if (inEdges) { - return inEdges.concat(this.outEdges(v, w)); - } - } -} - -/* Number of nodes in the graph. Should only be changed by the implementation. */ -Graph.prototype._nodeCount = 0; - -/* Number of edges in the graph. Should only be changed by the implementation. */ -Graph.prototype._edgeCount = 0; - -function incrementOrInitEntry(map, k) { - if (map[k]) { - map[k]++; - } else { - map[k] = 1; - } -} - -function decrementOrRemoveEntry(map, k) { - if (!--map[k]) { - delete map[k]; - } -} - -function edgeArgsToId(isDirected, v_, w_, name) { - var v = '' + v_; - var w = '' + w_; - if (!isDirected && v > w) { - var tmp = v; - v = w; - w = tmp; - } - return v + EDGE_KEY_DELIM + w + EDGE_KEY_DELIM + (isUndefined/* default */.A(name) ? DEFAULT_EDGE_NAME : name); -} - -function edgeArgsToObj(isDirected, v_, w_, name) { - var v = '' + v_; - var w = '' + w_; - if (!isDirected && v > w) { - var tmp = v; - v = w; - w = tmp; - } - var edgeObj = { v: v, w: w }; - if (name) { - edgeObj.name = name; - } - return edgeObj; -} - -function edgeObjToId(isDirected, edgeObj) { - return edgeArgsToId(isDirected, edgeObj.v, edgeObj.w, edgeObj.name); -} - - -/***/ }), - -/***/ 697: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ T: () => (/* reexport safe */ _graph_js__WEBPACK_IMPORTED_MODULE_0__.T) -/* harmony export */ }); -/* unused harmony export version */ -/* harmony import */ var _graph_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(73046); -// Includes only the "core" of graphlib - - - -const version = '2.1.9-pre'; - - - - -/***/ }), - -/***/ 14075: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ M: () => (/* binding */ write) -/* harmony export */ }); -/* unused harmony export read */ -/* harmony import */ var lodash_es__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(69592); -/* harmony import */ var lodash_es__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(50053); -/* harmony import */ var lodash_es__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(74722); -/* harmony import */ var _graph_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(73046); - - - - - -function write(g) { - var json = { - options: { - directed: g.isDirected(), - multigraph: g.isMultigraph(), - compound: g.isCompound(), - }, - nodes: writeNodes(g), - edges: writeEdges(g), - }; - if (!lodash_es__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A(g.graph())) { - json.value = lodash_es__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A(g.graph()); - } - return json; -} - -function writeNodes(g) { - return lodash_es__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A(g.nodes(), function (v) { - var nodeValue = g.node(v); - var parent = g.parent(v); - var node = { v: v }; - if (!lodash_es__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A(nodeValue)) { - node.value = nodeValue; - } - if (!lodash_es__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A(parent)) { - node.parent = parent; - } - return node; - }); -} - -function writeEdges(g) { - return lodash_es__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A(g.edges(), function (e) { - var edgeValue = g.edge(e); - var edge = { v: e.v, w: e.w }; - if (!lodash_es__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A(e.name)) { - edge.name = e.name; - } - if (!lodash_es__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A(edgeValue)) { - edge.value = edgeValue; - } - return edge; - }); -} - -function read(json) { - var g = new Graph(json.options).setGraph(json.value); - _.each(json.nodes, function (entry) { - g.setNode(entry.v, entry.value); - if (entry.parent) { - g.setParent(entry.v, entry.parent); - } - }); - _.each(json.edges, function (entry) { - g.setEdge({ v: entry.v, w: entry.w, name: entry.name }, entry.value); - }); - return g; -} - - -/***/ }), - -/***/ 62062: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ _SetCache) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_MapCache.js + 14 modules -var _MapCache = __webpack_require__(29471); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_setCacheAdd.js -/** Used to stand-in for `undefined` hash values. */ -var HASH_UNDEFINED = '__lodash_hash_undefined__'; - -/** - * Adds `value` to the array cache. - * - * @private - * @name add - * @memberOf SetCache - * @alias push - * @param {*} value The value to cache. - * @returns {Object} Returns the cache instance. - */ -function setCacheAdd(value) { - this.__data__.set(value, HASH_UNDEFINED); - return this; -} - -/* harmony default export */ const _setCacheAdd = (setCacheAdd); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_setCacheHas.js -/** - * Checks if `value` is in the array cache. - * - * @private - * @name has - * @memberOf SetCache - * @param {*} value The value to search for. - * @returns {number} Returns `true` if `value` is found, else `false`. - */ -function setCacheHas(value) { - return this.__data__.has(value); -} - -/* harmony default export */ const _setCacheHas = (setCacheHas); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_SetCache.js - - - - -/** - * - * Creates an array cache object to store unique values. - * - * @private - * @constructor - * @param {Array} [values] The values to cache. - */ -function SetCache(values) { - var index = -1, - length = values == null ? 0 : values.length; - - this.__data__ = new _MapCache/* default */.A; - while (++index < length) { - this.add(values[index]); - } -} - -// Add methods to `SetCache`. -SetCache.prototype.add = SetCache.prototype.push = _setCacheAdd; -SetCache.prototype.has = _setCacheHas; - -/* harmony default export */ const _SetCache = (SetCache); - - -/***/ }), - -/***/ 72641: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * A specialized version of `_.forEach` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns `array`. - */ -function arrayEach(array, iteratee) { - var index = -1, - length = array == null ? 0 : array.length; - - while (++index < length) { - if (iteratee(array[index], index, array) === false) { - break; - } - } - return array; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (arrayEach); - - -/***/ }), - -/***/ 2634: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * A specialized version of `_.filter` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {Array} Returns the new filtered array. - */ -function arrayFilter(array, predicate) { - var index = -1, - length = array == null ? 0 : array.length, - resIndex = 0, - result = []; - - while (++index < length) { - var value = array[index]; - if (predicate(value, index, array)) { - result[resIndex++] = value; - } - } - return result; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (arrayFilter); - - -/***/ }), - -/***/ 45572: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * A specialized version of `_.map` for arrays without support for iteratee - * shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the new mapped array. - */ -function arrayMap(array, iteratee) { - var index = -1, - length = array == null ? 0 : array.length, - result = Array(length); - - while (++index < length) { - result[index] = iteratee(array[index], index, array); - } - return result; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (arrayMap); - - -/***/ }), - -/***/ 76912: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * Appends the elements of `values` to `array`. - * - * @private - * @param {Array} array The array to modify. - * @param {Array} values The values to append. - * @returns {Array} Returns `array`. - */ -function arrayPush(array, values) { - var index = -1, - length = values.length, - offset = array.length; - - while (++index < length) { - array[offset + index] = values[index]; - } - return array; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (arrayPush); - - -/***/ }), - -/***/ 91641: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ _baseClone) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_Stack.js + 5 modules -var _Stack = __webpack_require__(11754); -// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayEach.js -var _arrayEach = __webpack_require__(72641); -// EXTERNAL MODULE: ./node_modules/lodash-es/_assignValue.js -var _assignValue = __webpack_require__(52851); -// EXTERNAL MODULE: ./node_modules/lodash-es/_copyObject.js -var _copyObject = __webpack_require__(22031); -// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js -var keys = __webpack_require__(27422); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseAssign.js - - - -/** - * The base implementation of `_.assign` without support for multiple sources - * or `customizer` functions. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @returns {Object} Returns `object`. - */ -function baseAssign(object, source) { - return object && (0,_copyObject/* default */.A)(source, (0,keys/* default */.A)(source), object); -} - -/* harmony default export */ const _baseAssign = (baseAssign); - -// EXTERNAL MODULE: ./node_modules/lodash-es/keysIn.js + 2 modules -var keysIn = __webpack_require__(55615); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseAssignIn.js - - - -/** - * The base implementation of `_.assignIn` without support for multiple sources - * or `customizer` functions. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @returns {Object} Returns `object`. - */ -function baseAssignIn(object, source) { - return object && (0,_copyObject/* default */.A)(source, (0,keysIn/* default */.A)(source), object); -} - -/* harmony default export */ const _baseAssignIn = (baseAssignIn); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_cloneBuffer.js -var _cloneBuffer = __webpack_require__(80154); -// EXTERNAL MODULE: ./node_modules/lodash-es/_copyArray.js -var _copyArray = __webpack_require__(39759); -// EXTERNAL MODULE: ./node_modules/lodash-es/_getSymbols.js -var _getSymbols = __webpack_require__(14792); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_copySymbols.js - - - -/** - * Copies own symbols of `source` to `object`. - * - * @private - * @param {Object} source The object to copy symbols from. - * @param {Object} [object={}] The object to copy symbols to. - * @returns {Object} Returns `object`. - */ -function copySymbols(source, object) { - return (0,_copyObject/* default */.A)(source, (0,_getSymbols/* default */.A)(source), object); -} - -/* harmony default export */ const _copySymbols = (copySymbols); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayPush.js -var _arrayPush = __webpack_require__(76912); -// EXTERNAL MODULE: ./node_modules/lodash-es/_getPrototype.js -var _getPrototype = __webpack_require__(15647); -// EXTERNAL MODULE: ./node_modules/lodash-es/stubArray.js -var stubArray = __webpack_require__(13153); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_getSymbolsIn.js - - - - - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeGetSymbols = Object.getOwnPropertySymbols; - -/** - * Creates an array of the own and inherited enumerable symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of symbols. - */ -var getSymbolsIn = !nativeGetSymbols ? stubArray/* default */.A : function(object) { - var result = []; - while (object) { - (0,_arrayPush/* default */.A)(result, (0,_getSymbols/* default */.A)(object)); - object = (0,_getPrototype/* default */.A)(object); - } - return result; -}; - -/* harmony default export */ const _getSymbolsIn = (getSymbolsIn); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_copySymbolsIn.js - - - -/** - * Copies own and inherited symbols of `source` to `object`. - * - * @private - * @param {Object} source The object to copy symbols from. - * @param {Object} [object={}] The object to copy symbols to. - * @returns {Object} Returns `object`. - */ -function copySymbolsIn(source, object) { - return (0,_copyObject/* default */.A)(source, _getSymbolsIn(source), object); -} - -/* harmony default export */ const _copySymbolsIn = (copySymbolsIn); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_getAllKeys.js -var _getAllKeys = __webpack_require__(19042); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGetAllKeys.js -var _baseGetAllKeys = __webpack_require__(33831); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_getAllKeysIn.js - - - - -/** - * Creates an array of own and inherited enumerable property names and - * symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names and symbols. - */ -function getAllKeysIn(object) { - return (0,_baseGetAllKeys/* default */.A)(object, keysIn/* default */.A, _getSymbolsIn); -} - -/* harmony default export */ const _getAllKeysIn = (getAllKeysIn); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_getTag.js + 3 modules -var _getTag = __webpack_require__(9779); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_initCloneArray.js -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var _initCloneArray_hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Initializes an array clone. - * - * @private - * @param {Array} array The array to clone. - * @returns {Array} Returns the initialized clone. - */ -function initCloneArray(array) { - var length = array.length, - result = new array.constructor(length); - - // Add properties assigned by `RegExp#exec`. - if (length && typeof array[0] == 'string' && _initCloneArray_hasOwnProperty.call(array, 'index')) { - result.index = array.index; - result.input = array.input; - } - return result; -} - -/* harmony default export */ const _initCloneArray = (initCloneArray); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_cloneArrayBuffer.js -var _cloneArrayBuffer = __webpack_require__(90565); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_cloneDataView.js - - -/** - * Creates a clone of `dataView`. - * - * @private - * @param {Object} dataView The data view to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the cloned data view. - */ -function cloneDataView(dataView, isDeep) { - var buffer = isDeep ? (0,_cloneArrayBuffer/* default */.A)(dataView.buffer) : dataView.buffer; - return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); -} - -/* harmony default export */ const _cloneDataView = (cloneDataView); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_cloneRegExp.js -/** Used to match `RegExp` flags from their coerced string values. */ -var reFlags = /\w*$/; - -/** - * Creates a clone of `regexp`. - * - * @private - * @param {Object} regexp The regexp to clone. - * @returns {Object} Returns the cloned regexp. - */ -function cloneRegExp(regexp) { - var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); - result.lastIndex = regexp.lastIndex; - return result; -} - -/* harmony default export */ const _cloneRegExp = (cloneRegExp); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_Symbol.js -var _Symbol = __webpack_require__(241); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_cloneSymbol.js - - -/** Used to convert symbols to primitives and strings. */ -var symbolProto = _Symbol/* default */.A ? _Symbol/* default */.A.prototype : undefined, - symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; - -/** - * Creates a clone of the `symbol` object. - * - * @private - * @param {Object} symbol The symbol object to clone. - * @returns {Object} Returns the cloned symbol object. - */ -function cloneSymbol(symbol) { - return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; -} - -/* harmony default export */ const _cloneSymbol = (cloneSymbol); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_cloneTypedArray.js -var _cloneTypedArray = __webpack_require__(1801); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_initCloneByTag.js - - - - - - -/** `Object#toString` result references. */ -var boolTag = '[object Boolean]', - dateTag = '[object Date]', - mapTag = '[object Map]', - numberTag = '[object Number]', - regexpTag = '[object RegExp]', - setTag = '[object Set]', - stringTag = '[object String]', - symbolTag = '[object Symbol]'; - -var arrayBufferTag = '[object ArrayBuffer]', - dataViewTag = '[object DataView]', - float32Tag = '[object Float32Array]', - float64Tag = '[object Float64Array]', - int8Tag = '[object Int8Array]', - int16Tag = '[object Int16Array]', - int32Tag = '[object Int32Array]', - uint8Tag = '[object Uint8Array]', - uint8ClampedTag = '[object Uint8ClampedArray]', - uint16Tag = '[object Uint16Array]', - uint32Tag = '[object Uint32Array]'; - -/** - * Initializes an object clone based on its `toStringTag`. - * - * **Note:** This function only supports cloning values with tags of - * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`. - * - * @private - * @param {Object} object The object to clone. - * @param {string} tag The `toStringTag` of the object to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the initialized clone. - */ -function initCloneByTag(object, tag, isDeep) { - var Ctor = object.constructor; - switch (tag) { - case arrayBufferTag: - return (0,_cloneArrayBuffer/* default */.A)(object); - - case boolTag: - case dateTag: - return new Ctor(+object); - - case dataViewTag: - return _cloneDataView(object, isDeep); - - case float32Tag: case float64Tag: - case int8Tag: case int16Tag: case int32Tag: - case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: - return (0,_cloneTypedArray/* default */.A)(object, isDeep); - - case mapTag: - return new Ctor; - - case numberTag: - case stringTag: - return new Ctor(object); - - case regexpTag: - return _cloneRegExp(object); - - case setTag: - return new Ctor; - - case symbolTag: - return _cloneSymbol(object); - } -} - -/* harmony default export */ const _initCloneByTag = (initCloneByTag); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_initCloneObject.js + 1 modules -var _initCloneObject = __webpack_require__(18598); -// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js -var isArray = __webpack_require__(92049); -// EXTERNAL MODULE: ./node_modules/lodash-es/isBuffer.js + 1 modules -var isBuffer = __webpack_require__(99912); -// EXTERNAL MODULE: ./node_modules/lodash-es/isObjectLike.js -var isObjectLike = __webpack_require__(53098); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsMap.js - - - -/** `Object#toString` result references. */ -var _baseIsMap_mapTag = '[object Map]'; - -/** - * The base implementation of `_.isMap` without Node.js optimizations. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a map, else `false`. - */ -function baseIsMap(value) { - return (0,isObjectLike/* default */.A)(value) && (0,_getTag/* default */.A)(value) == _baseIsMap_mapTag; -} - -/* harmony default export */ const _baseIsMap = (baseIsMap); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseUnary.js -var _baseUnary = __webpack_require__(52789); -// EXTERNAL MODULE: ./node_modules/lodash-es/_nodeUtil.js -var _nodeUtil = __webpack_require__(64841); -;// CONCATENATED MODULE: ./node_modules/lodash-es/isMap.js - - - - -/* Node.js helper references. */ -var nodeIsMap = _nodeUtil/* default */.A && _nodeUtil/* default */.A.isMap; - -/** - * Checks if `value` is classified as a `Map` object. - * - * @static - * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a map, else `false`. - * @example - * - * _.isMap(new Map); - * // => true - * - * _.isMap(new WeakMap); - * // => false - */ -var isMap = nodeIsMap ? (0,_baseUnary/* default */.A)(nodeIsMap) : _baseIsMap; - -/* harmony default export */ const lodash_es_isMap = (isMap); - -// EXTERNAL MODULE: ./node_modules/lodash-es/isObject.js -var isObject = __webpack_require__(23149); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsSet.js - - - -/** `Object#toString` result references. */ -var _baseIsSet_setTag = '[object Set]'; - -/** - * The base implementation of `_.isSet` without Node.js optimizations. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a set, else `false`. - */ -function baseIsSet(value) { - return (0,isObjectLike/* default */.A)(value) && (0,_getTag/* default */.A)(value) == _baseIsSet_setTag; -} - -/* harmony default export */ const _baseIsSet = (baseIsSet); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/isSet.js - - - - -/* Node.js helper references. */ -var nodeIsSet = _nodeUtil/* default */.A && _nodeUtil/* default */.A.isSet; - -/** - * Checks if `value` is classified as a `Set` object. - * - * @static - * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a set, else `false`. - * @example - * - * _.isSet(new Set); - * // => true - * - * _.isSet(new WeakSet); - * // => false - */ -var isSet = nodeIsSet ? (0,_baseUnary/* default */.A)(nodeIsSet) : _baseIsSet; - -/* harmony default export */ const lodash_es_isSet = (isSet); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseClone.js - - - - - - - - - - - - - - - - - - - - - - - -/** Used to compose bitmasks for cloning. */ -var CLONE_DEEP_FLAG = 1, - CLONE_FLAT_FLAG = 2, - CLONE_SYMBOLS_FLAG = 4; - -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - _baseClone_boolTag = '[object Boolean]', - _baseClone_dateTag = '[object Date]', - errorTag = '[object Error]', - funcTag = '[object Function]', - genTag = '[object GeneratorFunction]', - _baseClone_mapTag = '[object Map]', - _baseClone_numberTag = '[object Number]', - objectTag = '[object Object]', - _baseClone_regexpTag = '[object RegExp]', - _baseClone_setTag = '[object Set]', - _baseClone_stringTag = '[object String]', - _baseClone_symbolTag = '[object Symbol]', - weakMapTag = '[object WeakMap]'; - -var _baseClone_arrayBufferTag = '[object ArrayBuffer]', - _baseClone_dataViewTag = '[object DataView]', - _baseClone_float32Tag = '[object Float32Array]', - _baseClone_float64Tag = '[object Float64Array]', - _baseClone_int8Tag = '[object Int8Array]', - _baseClone_int16Tag = '[object Int16Array]', - _baseClone_int32Tag = '[object Int32Array]', - _baseClone_uint8Tag = '[object Uint8Array]', - _baseClone_uint8ClampedTag = '[object Uint8ClampedArray]', - _baseClone_uint16Tag = '[object Uint16Array]', - _baseClone_uint32Tag = '[object Uint32Array]'; - -/** Used to identify `toStringTag` values supported by `_.clone`. */ -var cloneableTags = {}; -cloneableTags[argsTag] = cloneableTags[arrayTag] = -cloneableTags[_baseClone_arrayBufferTag] = cloneableTags[_baseClone_dataViewTag] = -cloneableTags[_baseClone_boolTag] = cloneableTags[_baseClone_dateTag] = -cloneableTags[_baseClone_float32Tag] = cloneableTags[_baseClone_float64Tag] = -cloneableTags[_baseClone_int8Tag] = cloneableTags[_baseClone_int16Tag] = -cloneableTags[_baseClone_int32Tag] = cloneableTags[_baseClone_mapTag] = -cloneableTags[_baseClone_numberTag] = cloneableTags[objectTag] = -cloneableTags[_baseClone_regexpTag] = cloneableTags[_baseClone_setTag] = -cloneableTags[_baseClone_stringTag] = cloneableTags[_baseClone_symbolTag] = -cloneableTags[_baseClone_uint8Tag] = cloneableTags[_baseClone_uint8ClampedTag] = -cloneableTags[_baseClone_uint16Tag] = cloneableTags[_baseClone_uint32Tag] = true; -cloneableTags[errorTag] = cloneableTags[funcTag] = -cloneableTags[weakMapTag] = false; - -/** - * The base implementation of `_.clone` and `_.cloneDeep` which tracks - * traversed objects. - * - * @private - * @param {*} value The value to clone. - * @param {boolean} bitmask The bitmask flags. - * 1 - Deep clone - * 2 - Flatten inherited properties - * 4 - Clone symbols - * @param {Function} [customizer] The function to customize cloning. - * @param {string} [key] The key of `value`. - * @param {Object} [object] The parent object of `value`. - * @param {Object} [stack] Tracks traversed objects and their clone counterparts. - * @returns {*} Returns the cloned value. - */ -function baseClone(value, bitmask, customizer, key, object, stack) { - var result, - isDeep = bitmask & CLONE_DEEP_FLAG, - isFlat = bitmask & CLONE_FLAT_FLAG, - isFull = bitmask & CLONE_SYMBOLS_FLAG; - - if (customizer) { - result = object ? customizer(value, key, object, stack) : customizer(value); - } - if (result !== undefined) { - return result; - } - if (!(0,isObject/* default */.A)(value)) { - return value; - } - var isArr = (0,isArray/* default */.A)(value); - if (isArr) { - result = _initCloneArray(value); - if (!isDeep) { - return (0,_copyArray/* default */.A)(value, result); - } - } else { - var tag = (0,_getTag/* default */.A)(value), - isFunc = tag == funcTag || tag == genTag; - - if ((0,isBuffer/* default */.A)(value)) { - return (0,_cloneBuffer/* default */.A)(value, isDeep); - } - if (tag == objectTag || tag == argsTag || (isFunc && !object)) { - result = (isFlat || isFunc) ? {} : (0,_initCloneObject/* default */.A)(value); - if (!isDeep) { - return isFlat - ? _copySymbolsIn(value, _baseAssignIn(result, value)) - : _copySymbols(value, _baseAssign(result, value)); - } - } else { - if (!cloneableTags[tag]) { - return object ? value : {}; - } - result = _initCloneByTag(value, tag, isDeep); - } - } - // Check for circular references and return its corresponding clone. - stack || (stack = new _Stack/* default */.A); - var stacked = stack.get(value); - if (stacked) { - return stacked; - } - stack.set(value, result); - - if (lodash_es_isSet(value)) { - value.forEach(function(subValue) { - result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack)); - }); - } else if (lodash_es_isMap(value)) { - value.forEach(function(subValue, key) { - result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack)); - }); - } - - var keysFunc = isFull - ? (isFlat ? _getAllKeysIn : _getAllKeys/* default */.A) - : (isFlat ? keysIn/* default */.A : keys/* default */.A); - - var props = isArr ? undefined : keysFunc(value); - (0,_arrayEach/* default */.A)(props || value, function(subValue, key) { - if (props) { - key = subValue; - subValue = value[key]; - } - // Recursively populate clone (susceptible to call stack limits). - (0,_assignValue/* default */.A)(result, key, baseClone(subValue, bitmask, customizer, key, value, stack)); - }); - return result; -} - -/* harmony default export */ const _baseClone = (baseClone); - - -/***/ }), - -/***/ 6240: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ _baseEach) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseForOwn.js -var _baseForOwn = __webpack_require__(79841); -// EXTERNAL MODULE: ./node_modules/lodash-es/isArrayLike.js -var isArrayLike = __webpack_require__(38446); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_createBaseEach.js - - -/** - * Creates a `baseEach` or `baseEachRight` function. - * - * @private - * @param {Function} eachFunc The function to iterate over a collection. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new base function. - */ -function createBaseEach(eachFunc, fromRight) { - return function(collection, iteratee) { - if (collection == null) { - return collection; - } - if (!(0,isArrayLike/* default */.A)(collection)) { - return eachFunc(collection, iteratee); - } - var length = collection.length, - index = fromRight ? length : -1, - iterable = Object(collection); - - while ((fromRight ? index-- : ++index < length)) { - if (iteratee(iterable[index], index, iterable) === false) { - break; - } - } - return collection; - }; -} - -/* harmony default export */ const _createBaseEach = (createBaseEach); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseEach.js - - - -/** - * The base implementation of `_.forEach` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array|Object} Returns `collection`. - */ -var baseEach = _createBaseEach(_baseForOwn/* default */.A); - -/* harmony default export */ const _baseEach = (baseEach); - - -/***/ }), - -/***/ 25707: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * The base implementation of `_.findIndex` and `_.findLastIndex` without - * support for iteratee shorthands. - * - * @private - * @param {Array} array The array to inspect. - * @param {Function} predicate The function invoked per iteration. - * @param {number} fromIndex The index to search from. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function baseFindIndex(array, predicate, fromIndex, fromRight) { - var length = array.length, - index = fromIndex + (fromRight ? 1 : -1); - - while ((fromRight ? index-- : ++index < length)) { - if (predicate(array[index], index, array)) { - return index; - } - } - return -1; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseFindIndex); - - -/***/ }), - -/***/ 13588: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ _baseFlatten) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayPush.js -var _arrayPush = __webpack_require__(76912); -// EXTERNAL MODULE: ./node_modules/lodash-es/_Symbol.js -var _Symbol = __webpack_require__(241); -// EXTERNAL MODULE: ./node_modules/lodash-es/isArguments.js + 1 modules -var isArguments = __webpack_require__(52274); -// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js -var isArray = __webpack_require__(92049); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_isFlattenable.js - - - - -/** Built-in value references. */ -var spreadableSymbol = _Symbol/* default */.A ? _Symbol/* default */.A.isConcatSpreadable : undefined; - -/** - * Checks if `value` is a flattenable `arguments` object or array. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. - */ -function isFlattenable(value) { - return (0,isArray/* default */.A)(value) || (0,isArguments/* default */.A)(value) || - !!(spreadableSymbol && value && value[spreadableSymbol]); -} - -/* harmony default export */ const _isFlattenable = (isFlattenable); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseFlatten.js - - - -/** - * The base implementation of `_.flatten` with support for restricting flattening. - * - * @private - * @param {Array} array The array to flatten. - * @param {number} depth The maximum recursion depth. - * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. - * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. - * @param {Array} [result=[]] The initial result value. - * @returns {Array} Returns the new flattened array. - */ -function baseFlatten(array, depth, predicate, isStrict, result) { - var index = -1, - length = array.length; - - predicate || (predicate = _isFlattenable); - result || (result = []); - - while (++index < length) { - var value = array[index]; - if (depth > 0 && predicate(value)) { - if (depth > 1) { - // Recursively flatten arrays (susceptible to call stack limits). - baseFlatten(value, depth - 1, predicate, isStrict, result); - } else { - (0,_arrayPush/* default */.A)(result, value); - } - } else if (!isStrict) { - result[result.length] = value; - } - } - return result; -} - -/* harmony default export */ const _baseFlatten = (baseFlatten); - - -/***/ }), - -/***/ 79841: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _baseFor_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4574); -/* harmony import */ var _keys_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(27422); - - - -/** - * The base implementation of `_.forOwn` without support for iteratee shorthands. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Object} Returns `object`. - */ -function baseForOwn(object, iteratee) { - return object && (0,_baseFor_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(object, iteratee, _keys_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseForOwn); - - -/***/ }), - -/***/ 66318: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _castPath_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7819); -/* harmony import */ var _toKey_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(30901); - - - -/** - * The base implementation of `_.get` without support for default values. - * - * @private - * @param {Object} object The object to query. - * @param {Array|string} path The path of the property to get. - * @returns {*} Returns the resolved value. - */ -function baseGet(object, path) { - path = (0,_castPath_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(path, object); - - var index = 0, - length = path.length; - - while (object != null && index < length) { - object = object[(0,_toKey_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(path[index++])]; - } - return (index && index == length) ? object : undefined; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseGet); - - -/***/ }), - -/***/ 33831: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _arrayPush_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(76912); -/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(92049); - - - -/** - * The base implementation of `getAllKeys` and `getAllKeysIn` which uses - * `keysFunc` and `symbolsFunc` to get the enumerable property names and - * symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @param {Function} keysFunc The function to get the keys of `object`. - * @param {Function} symbolsFunc The function to get the symbols of `object`. - * @returns {Array} Returns the array of property names and symbols. - */ -function baseGetAllKeys(object, keysFunc, symbolsFunc) { - var result = keysFunc(object); - return (0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(object) ? result : (0,_arrayPush_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(result, symbolsFunc(object)); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseGetAllKeys); - - -/***/ }), - -/***/ 49574: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ _baseIteratee) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_Stack.js + 5 modules -var _Stack = __webpack_require__(11754); -// EXTERNAL MODULE: ./node_modules/lodash-es/_SetCache.js + 2 modules -var _SetCache = __webpack_require__(62062); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_arraySome.js -/** - * A specialized version of `_.some` for arrays without support for iteratee - * shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {boolean} Returns `true` if any element passes the predicate check, - * else `false`. - */ -function arraySome(array, predicate) { - var index = -1, - length = array == null ? 0 : array.length; - - while (++index < length) { - if (predicate(array[index], index, array)) { - return true; - } - } - return false; -} - -/* harmony default export */ const _arraySome = (arraySome); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_cacheHas.js -var _cacheHas = __webpack_require__(64099); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_equalArrays.js - - - - -/** Used to compose bitmasks for value comparisons. */ -var COMPARE_PARTIAL_FLAG = 1, - COMPARE_UNORDERED_FLAG = 2; - -/** - * A specialized version of `baseIsEqualDeep` for arrays with support for - * partial deep comparisons. - * - * @private - * @param {Array} array The array to compare. - * @param {Array} other The other array to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} stack Tracks traversed `array` and `other` objects. - * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. - */ -function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { - var isPartial = bitmask & COMPARE_PARTIAL_FLAG, - arrLength = array.length, - othLength = other.length; - - if (arrLength != othLength && !(isPartial && othLength > arrLength)) { - return false; - } - // Check that cyclic values are equal. - var arrStacked = stack.get(array); - var othStacked = stack.get(other); - if (arrStacked && othStacked) { - return arrStacked == other && othStacked == array; - } - var index = -1, - result = true, - seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new _SetCache/* default */.A : undefined; - - stack.set(array, other); - stack.set(other, array); - - // Ignore non-index properties. - while (++index < arrLength) { - var arrValue = array[index], - othValue = other[index]; - - if (customizer) { - var compared = isPartial - ? customizer(othValue, arrValue, index, other, array, stack) - : customizer(arrValue, othValue, index, array, other, stack); - } - if (compared !== undefined) { - if (compared) { - continue; - } - result = false; - break; - } - // Recursively compare arrays (susceptible to call stack limits). - if (seen) { - if (!_arraySome(other, function(othValue, othIndex) { - if (!(0,_cacheHas/* default */.A)(seen, othIndex) && - (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { - return seen.push(othIndex); - } - })) { - result = false; - break; - } - } else if (!( - arrValue === othValue || - equalFunc(arrValue, othValue, bitmask, customizer, stack) - )) { - result = false; - break; - } - } - stack['delete'](array); - stack['delete'](other); - return result; -} - -/* harmony default export */ const _equalArrays = (equalArrays); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_Symbol.js -var _Symbol = __webpack_require__(241); -// EXTERNAL MODULE: ./node_modules/lodash-es/_Uint8Array.js -var _Uint8Array = __webpack_require__(43988); -// EXTERNAL MODULE: ./node_modules/lodash-es/eq.js -var eq = __webpack_require__(66984); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_mapToArray.js -/** - * Converts `map` to its key-value pairs. - * - * @private - * @param {Object} map The map to convert. - * @returns {Array} Returns the key-value pairs. - */ -function mapToArray(map) { - var index = -1, - result = Array(map.size); - - map.forEach(function(value, key) { - result[++index] = [key, value]; - }); - return result; -} - -/* harmony default export */ const _mapToArray = (mapToArray); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_setToArray.js -var _setToArray = __webpack_require__(29959); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_equalByTag.js - - - - - - - -/** Used to compose bitmasks for value comparisons. */ -var _equalByTag_COMPARE_PARTIAL_FLAG = 1, - _equalByTag_COMPARE_UNORDERED_FLAG = 2; - -/** `Object#toString` result references. */ -var boolTag = '[object Boolean]', - dateTag = '[object Date]', - errorTag = '[object Error]', - mapTag = '[object Map]', - numberTag = '[object Number]', - regexpTag = '[object RegExp]', - setTag = '[object Set]', - stringTag = '[object String]', - symbolTag = '[object Symbol]'; - -var arrayBufferTag = '[object ArrayBuffer]', - dataViewTag = '[object DataView]'; - -/** Used to convert symbols to primitives and strings. */ -var symbolProto = _Symbol/* default */.A ? _Symbol/* default */.A.prototype : undefined, - symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; - -/** - * A specialized version of `baseIsEqualDeep` for comparing objects of - * the same `toStringTag`. - * - * **Note:** This function only supports comparing values with tags of - * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {string} tag The `toStringTag` of the objects to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} stack Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ -function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { - switch (tag) { - case dataViewTag: - if ((object.byteLength != other.byteLength) || - (object.byteOffset != other.byteOffset)) { - return false; - } - object = object.buffer; - other = other.buffer; - - case arrayBufferTag: - if ((object.byteLength != other.byteLength) || - !equalFunc(new _Uint8Array/* default */.A(object), new _Uint8Array/* default */.A(other))) { - return false; - } - return true; - - case boolTag: - case dateTag: - case numberTag: - // Coerce booleans to `1` or `0` and dates to milliseconds. - // Invalid dates are coerced to `NaN`. - return (0,eq/* default */.A)(+object, +other); - - case errorTag: - return object.name == other.name && object.message == other.message; - - case regexpTag: - case stringTag: - // Coerce regexes to strings and treat strings, primitives and objects, - // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring - // for more details. - return object == (other + ''); - - case mapTag: - var convert = _mapToArray; - - case setTag: - var isPartial = bitmask & _equalByTag_COMPARE_PARTIAL_FLAG; - convert || (convert = _setToArray/* default */.A); - - if (object.size != other.size && !isPartial) { - return false; - } - // Assume cyclic values are equal. - var stacked = stack.get(object); - if (stacked) { - return stacked == other; - } - bitmask |= _equalByTag_COMPARE_UNORDERED_FLAG; - - // Recursively compare objects (susceptible to call stack limits). - stack.set(object, other); - var result = _equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); - stack['delete'](object); - return result; - - case symbolTag: - if (symbolValueOf) { - return symbolValueOf.call(object) == symbolValueOf.call(other); - } - } - return false; -} - -/* harmony default export */ const _equalByTag = (equalByTag); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_getAllKeys.js -var _getAllKeys = __webpack_require__(19042); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_equalObjects.js - - -/** Used to compose bitmasks for value comparisons. */ -var _equalObjects_COMPARE_PARTIAL_FLAG = 1; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var _equalObjects_hasOwnProperty = objectProto.hasOwnProperty; - -/** - * A specialized version of `baseIsEqualDeep` for objects with support for - * partial deep comparisons. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} stack Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ -function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { - var isPartial = bitmask & _equalObjects_COMPARE_PARTIAL_FLAG, - objProps = (0,_getAllKeys/* default */.A)(object), - objLength = objProps.length, - othProps = (0,_getAllKeys/* default */.A)(other), - othLength = othProps.length; - - if (objLength != othLength && !isPartial) { - return false; - } - var index = objLength; - while (index--) { - var key = objProps[index]; - if (!(isPartial ? key in other : _equalObjects_hasOwnProperty.call(other, key))) { - return false; - } - } - // Check that cyclic values are equal. - var objStacked = stack.get(object); - var othStacked = stack.get(other); - if (objStacked && othStacked) { - return objStacked == other && othStacked == object; - } - var result = true; - stack.set(object, other); - stack.set(other, object); - - var skipCtor = isPartial; - while (++index < objLength) { - key = objProps[index]; - var objValue = object[key], - othValue = other[key]; - - if (customizer) { - var compared = isPartial - ? customizer(othValue, objValue, key, other, object, stack) - : customizer(objValue, othValue, key, object, other, stack); - } - // Recursively compare objects (susceptible to call stack limits). - if (!(compared === undefined - ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) - : compared - )) { - result = false; - break; - } - skipCtor || (skipCtor = key == 'constructor'); - } - if (result && !skipCtor) { - var objCtor = object.constructor, - othCtor = other.constructor; - - // Non `Object` object instances with different constructors are not equal. - if (objCtor != othCtor && - ('constructor' in object && 'constructor' in other) && - !(typeof objCtor == 'function' && objCtor instanceof objCtor && - typeof othCtor == 'function' && othCtor instanceof othCtor)) { - result = false; - } - } - stack['delete'](object); - stack['delete'](other); - return result; -} - -/* harmony default export */ const _equalObjects = (equalObjects); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_getTag.js + 3 modules -var _getTag = __webpack_require__(9779); -// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js -var isArray = __webpack_require__(92049); -// EXTERNAL MODULE: ./node_modules/lodash-es/isBuffer.js + 1 modules -var isBuffer = __webpack_require__(99912); -// EXTERNAL MODULE: ./node_modules/lodash-es/isTypedArray.js + 1 modules -var isTypedArray = __webpack_require__(33858); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsEqualDeep.js - - - - - - - - - -/** Used to compose bitmasks for value comparisons. */ -var _baseIsEqualDeep_COMPARE_PARTIAL_FLAG = 1; - -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - objectTag = '[object Object]'; - -/** Used for built-in method references. */ -var _baseIsEqualDeep_objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var _baseIsEqualDeep_hasOwnProperty = _baseIsEqualDeep_objectProto.hasOwnProperty; - -/** - * A specialized version of `baseIsEqual` for arrays and objects which performs - * deep comparisons and tracks traversed objects enabling objects with circular - * references to be compared. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} [stack] Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ -function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { - var objIsArr = (0,isArray/* default */.A)(object), - othIsArr = (0,isArray/* default */.A)(other), - objTag = objIsArr ? arrayTag : (0,_getTag/* default */.A)(object), - othTag = othIsArr ? arrayTag : (0,_getTag/* default */.A)(other); - - objTag = objTag == argsTag ? objectTag : objTag; - othTag = othTag == argsTag ? objectTag : othTag; - - var objIsObj = objTag == objectTag, - othIsObj = othTag == objectTag, - isSameTag = objTag == othTag; - - if (isSameTag && (0,isBuffer/* default */.A)(object)) { - if (!(0,isBuffer/* default */.A)(other)) { - return false; - } - objIsArr = true; - objIsObj = false; - } - if (isSameTag && !objIsObj) { - stack || (stack = new _Stack/* default */.A); - return (objIsArr || (0,isTypedArray/* default */.A)(object)) - ? _equalArrays(object, other, bitmask, customizer, equalFunc, stack) - : _equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); - } - if (!(bitmask & _baseIsEqualDeep_COMPARE_PARTIAL_FLAG)) { - var objIsWrapped = objIsObj && _baseIsEqualDeep_hasOwnProperty.call(object, '__wrapped__'), - othIsWrapped = othIsObj && _baseIsEqualDeep_hasOwnProperty.call(other, '__wrapped__'); - - if (objIsWrapped || othIsWrapped) { - var objUnwrapped = objIsWrapped ? object.value() : object, - othUnwrapped = othIsWrapped ? other.value() : other; - - stack || (stack = new _Stack/* default */.A); - return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); - } - } - if (!isSameTag) { - return false; - } - stack || (stack = new _Stack/* default */.A); - return _equalObjects(object, other, bitmask, customizer, equalFunc, stack); -} - -/* harmony default export */ const _baseIsEqualDeep = (baseIsEqualDeep); - -// EXTERNAL MODULE: ./node_modules/lodash-es/isObjectLike.js -var isObjectLike = __webpack_require__(53098); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsEqual.js - - - -/** - * The base implementation of `_.isEqual` which supports partial comparisons - * and tracks traversed objects. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @param {boolean} bitmask The bitmask flags. - * 1 - Unordered comparison - * 2 - Partial comparison - * @param {Function} [customizer] The function to customize comparisons. - * @param {Object} [stack] Tracks traversed `value` and `other` objects. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - */ -function baseIsEqual(value, other, bitmask, customizer, stack) { - if (value === other) { - return true; - } - if (value == null || other == null || (!(0,isObjectLike/* default */.A)(value) && !(0,isObjectLike/* default */.A)(other))) { - return value !== value && other !== other; - } - return _baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); -} - -/* harmony default export */ const _baseIsEqual = (baseIsEqual); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsMatch.js - - - -/** Used to compose bitmasks for value comparisons. */ -var _baseIsMatch_COMPARE_PARTIAL_FLAG = 1, - _baseIsMatch_COMPARE_UNORDERED_FLAG = 2; - -/** - * The base implementation of `_.isMatch` without support for iteratee shorthands. - * - * @private - * @param {Object} object The object to inspect. - * @param {Object} source The object of property values to match. - * @param {Array} matchData The property names, values, and compare flags to match. - * @param {Function} [customizer] The function to customize comparisons. - * @returns {boolean} Returns `true` if `object` is a match, else `false`. - */ -function baseIsMatch(object, source, matchData, customizer) { - var index = matchData.length, - length = index, - noCustomizer = !customizer; - - if (object == null) { - return !length; - } - object = Object(object); - while (index--) { - var data = matchData[index]; - if ((noCustomizer && data[2]) - ? data[1] !== object[data[0]] - : !(data[0] in object) - ) { - return false; - } - } - while (++index < length) { - data = matchData[index]; - var key = data[0], - objValue = object[key], - srcValue = data[1]; - - if (noCustomizer && data[2]) { - if (objValue === undefined && !(key in object)) { - return false; - } - } else { - var stack = new _Stack/* default */.A; - if (customizer) { - var result = customizer(objValue, srcValue, key, object, source, stack); - } - if (!(result === undefined - ? _baseIsEqual(srcValue, objValue, _baseIsMatch_COMPARE_PARTIAL_FLAG | _baseIsMatch_COMPARE_UNORDERED_FLAG, customizer, stack) - : result - )) { - return false; - } - } - } - return true; -} - -/* harmony default export */ const _baseIsMatch = (baseIsMatch); - -// EXTERNAL MODULE: ./node_modules/lodash-es/isObject.js -var isObject = __webpack_require__(23149); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_isStrictComparable.js - - -/** - * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` if suitable for strict - * equality comparisons, else `false`. - */ -function isStrictComparable(value) { - return value === value && !(0,isObject/* default */.A)(value); -} - -/* harmony default export */ const _isStrictComparable = (isStrictComparable); - -// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js -var keys = __webpack_require__(27422); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_getMatchData.js - - - -/** - * Gets the property names, values, and compare flags of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the match data of `object`. - */ -function getMatchData(object) { - var result = (0,keys/* default */.A)(object), - length = result.length; - - while (length--) { - var key = result[length], - value = object[key]; - - result[length] = [key, value, _isStrictComparable(value)]; - } - return result; -} - -/* harmony default export */ const _getMatchData = (getMatchData); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_matchesStrictComparable.js -/** - * A specialized version of `matchesProperty` for source values suitable - * for strict equality comparisons, i.e. `===`. - * - * @private - * @param {string} key The key of the property to get. - * @param {*} srcValue The value to match. - * @returns {Function} Returns the new spec function. - */ -function matchesStrictComparable(key, srcValue) { - return function(object) { - if (object == null) { - return false; - } - return object[key] === srcValue && - (srcValue !== undefined || (key in Object(object))); - }; -} - -/* harmony default export */ const _matchesStrictComparable = (matchesStrictComparable); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseMatches.js - - - - -/** - * The base implementation of `_.matches` which doesn't clone `source`. - * - * @private - * @param {Object} source The object of property values to match. - * @returns {Function} Returns the new spec function. - */ -function baseMatches(source) { - var matchData = _getMatchData(source); - if (matchData.length == 1 && matchData[0][2]) { - return _matchesStrictComparable(matchData[0][0], matchData[0][1]); - } - return function(object) { - return object === source || _baseIsMatch(object, source, matchData); - }; -} - -/* harmony default export */ const _baseMatches = (baseMatches); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGet.js -var _baseGet = __webpack_require__(66318); -;// CONCATENATED MODULE: ./node_modules/lodash-es/get.js - - -/** - * Gets the value at `path` of `object`. If the resolved value is - * `undefined`, the `defaultValue` is returned in its place. - * - * @static - * @memberOf _ - * @since 3.7.0 - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path of the property to get. - * @param {*} [defaultValue] The value returned for `undefined` resolved values. - * @returns {*} Returns the resolved value. - * @example - * - * var object = { 'a': [{ 'b': { 'c': 3 } }] }; - * - * _.get(object, 'a[0].b.c'); - * // => 3 - * - * _.get(object, ['a', '0', 'b', 'c']); - * // => 3 - * - * _.get(object, 'a.b.c', 'default'); - * // => 'default' - */ -function get(object, path, defaultValue) { - var result = object == null ? undefined : (0,_baseGet/* default */.A)(object, path); - return result === undefined ? defaultValue : result; -} - -/* harmony default export */ const lodash_es_get = (get); - -// EXTERNAL MODULE: ./node_modules/lodash-es/hasIn.js + 1 modules -var hasIn = __webpack_require__(39188); -// EXTERNAL MODULE: ./node_modules/lodash-es/_isKey.js -var _isKey = __webpack_require__(86586); -// EXTERNAL MODULE: ./node_modules/lodash-es/_toKey.js -var _toKey = __webpack_require__(30901); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseMatchesProperty.js - - - - - - - - -/** Used to compose bitmasks for value comparisons. */ -var _baseMatchesProperty_COMPARE_PARTIAL_FLAG = 1, - _baseMatchesProperty_COMPARE_UNORDERED_FLAG = 2; - -/** - * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. - * - * @private - * @param {string} path The path of the property to get. - * @param {*} srcValue The value to match. - * @returns {Function} Returns the new spec function. - */ -function baseMatchesProperty(path, srcValue) { - if ((0,_isKey/* default */.A)(path) && _isStrictComparable(srcValue)) { - return _matchesStrictComparable((0,_toKey/* default */.A)(path), srcValue); - } - return function(object) { - var objValue = lodash_es_get(object, path); - return (objValue === undefined && objValue === srcValue) - ? (0,hasIn/* default */.A)(object, path) - : _baseIsEqual(srcValue, objValue, _baseMatchesProperty_COMPARE_PARTIAL_FLAG | _baseMatchesProperty_COMPARE_UNORDERED_FLAG); - }; -} - -/* harmony default export */ const _baseMatchesProperty = (baseMatchesProperty); - -// EXTERNAL MODULE: ./node_modules/lodash-es/identity.js -var identity = __webpack_require__(29008); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseProperty.js -var _baseProperty = __webpack_require__(70805); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_basePropertyDeep.js - - -/** - * A specialized version of `baseProperty` which supports deep paths. - * - * @private - * @param {Array|string} path The path of the property to get. - * @returns {Function} Returns the new accessor function. - */ -function basePropertyDeep(path) { - return function(object) { - return (0,_baseGet/* default */.A)(object, path); - }; -} - -/* harmony default export */ const _basePropertyDeep = (basePropertyDeep); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/property.js - - - - - -/** - * Creates a function that returns the value at `path` of a given object. - * - * @static - * @memberOf _ - * @since 2.4.0 - * @category Util - * @param {Array|string} path The path of the property to get. - * @returns {Function} Returns the new accessor function. - * @example - * - * var objects = [ - * { 'a': { 'b': 2 } }, - * { 'a': { 'b': 1 } } - * ]; - * - * _.map(objects, _.property('a.b')); - * // => [2, 1] - * - * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b'); - * // => [1, 2] - */ -function property(path) { - return (0,_isKey/* default */.A)(path) ? (0,_baseProperty/* default */.A)((0,_toKey/* default */.A)(path)) : _basePropertyDeep(path); -} - -/* harmony default export */ const lodash_es_property = (property); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIteratee.js - - - - - - -/** - * The base implementation of `_.iteratee`. - * - * @private - * @param {*} [value=_.identity] The value to convert to an iteratee. - * @returns {Function} Returns the iteratee. - */ -function baseIteratee(value) { - // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. - // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. - if (typeof value == 'function') { - return value; - } - if (value == null) { - return identity/* default */.A; - } - if (typeof value == 'object') { - return (0,isArray/* default */.A)(value) - ? _baseMatchesProperty(value[0], value[1]) - : _baseMatches(value); - } - return lodash_es_property(value); -} - -/* harmony default export */ const _baseIteratee = (baseIteratee); - - -/***/ }), - -/***/ 52568: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _baseEach_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6240); -/* harmony import */ var _isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(38446); - - - -/** - * The base implementation of `_.map` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the new mapped array. - */ -function baseMap(collection, iteratee) { - var index = -1, - result = (0,_isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(collection) ? Array(collection.length) : []; - - (0,_baseEach_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(collection, function(value, key, collection) { - result[++index] = iteratee(value, key, collection); - }); - return result; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseMap); - - -/***/ }), - -/***/ 70805: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * The base implementation of `_.property` without support for deep paths. - * - * @private - * @param {string} key The key of the property to get. - * @returns {Function} Returns the new accessor function. - */ -function baseProperty(key) { - return function(object) { - return object == null ? undefined : object[key]; - }; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseProperty); - - -/***/ }), - -/***/ 64099: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * Checks if a `cache` value for `key` exists. - * - * @private - * @param {Object} cache The cache to query. - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ -function cacheHas(cache, key) { - return cache.has(key); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (cacheHas); - - -/***/ }), - -/***/ 99922: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(29008); - - -/** - * Casts `value` to `identity` if it's not a function. - * - * @private - * @param {*} value The value to inspect. - * @returns {Function} Returns cast function. - */ -function castFunction(value) { - return typeof value == 'function' ? value : _identity_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (castFunction); - - -/***/ }), - -/***/ 7819: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ _castPath) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js -var isArray = __webpack_require__(92049); -// EXTERNAL MODULE: ./node_modules/lodash-es/_isKey.js -var _isKey = __webpack_require__(86586); -// EXTERNAL MODULE: ./node_modules/lodash-es/memoize.js -var memoize = __webpack_require__(46632); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_memoizeCapped.js - - -/** Used as the maximum memoize cache size. */ -var MAX_MEMOIZE_SIZE = 500; - -/** - * A specialized version of `_.memoize` which clears the memoized function's - * cache when it exceeds `MAX_MEMOIZE_SIZE`. - * - * @private - * @param {Function} func The function to have its output memoized. - * @returns {Function} Returns the new memoized function. - */ -function memoizeCapped(func) { - var result = (0,memoize/* default */.A)(func, function(key) { - if (cache.size === MAX_MEMOIZE_SIZE) { - cache.clear(); - } - return key; - }); - - var cache = result.cache; - return result; -} - -/* harmony default export */ const _memoizeCapped = (memoizeCapped); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_stringToPath.js - - -/** Used to match property names within property paths. */ -var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; - -/** Used to match backslashes in property paths. */ -var reEscapeChar = /\\(\\)?/g; - -/** - * Converts `string` to a property path array. - * - * @private - * @param {string} string The string to convert. - * @returns {Array} Returns the property path array. - */ -var stringToPath = _memoizeCapped(function(string) { - var result = []; - if (string.charCodeAt(0) === 46 /* . */) { - result.push(''); - } - string.replace(rePropName, function(match, number, quote, subString) { - result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match)); - }); - return result; -}); - -/* harmony default export */ const _stringToPath = (stringToPath); - -// EXTERNAL MODULE: ./node_modules/lodash-es/toString.js + 1 modules -var lodash_es_toString = __webpack_require__(28894); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_castPath.js - - - - - -/** - * Casts `value` to a path array if it's not one. - * - * @private - * @param {*} value The value to inspect. - * @param {Object} [object] The object to query keys on. - * @returns {Array} Returns the cast property path array. - */ -function castPath(value, object) { - if ((0,isArray/* default */.A)(value)) { - return value; - } - return (0,_isKey/* default */.A)(value, object) ? [value] : _stringToPath((0,lodash_es_toString/* default */.A)(value)); -} - -/* harmony default export */ const _castPath = (castPath); - - -/***/ }), - -/***/ 19042: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _baseGetAllKeys_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(33831); -/* harmony import */ var _getSymbols_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(14792); -/* harmony import */ var _keys_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(27422); - - - - -/** - * Creates an array of own enumerable property names and symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names and symbols. - */ -function getAllKeys(object) { - return (0,_baseGetAllKeys_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(object, _keys_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A, _getSymbols_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (getAllKeys); - - -/***/ }), - -/***/ 14792: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _arrayFilter_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2634); -/* harmony import */ var _stubArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13153); - - - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Built-in value references. */ -var propertyIsEnumerable = objectProto.propertyIsEnumerable; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeGetSymbols = Object.getOwnPropertySymbols; - -/** - * Creates an array of the own enumerable symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of symbols. - */ -var getSymbols = !nativeGetSymbols ? _stubArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A : function(object) { - if (object == null) { - return []; - } - object = Object(object); - return (0,_arrayFilter_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(nativeGetSymbols(object), function(symbol) { - return propertyIsEnumerable.call(object, symbol); - }); -}; - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (getSymbols); - - -/***/ }), - -/***/ 85054: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _castPath_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7819); -/* harmony import */ var _isArguments_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(52274); -/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(92049); -/* harmony import */ var _isIndex_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(25353); -/* harmony import */ var _isLength_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5254); -/* harmony import */ var _toKey_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(30901); - - - - - - - -/** - * Checks if `path` exists on `object`. - * - * @private - * @param {Object} object The object to query. - * @param {Array|string} path The path to check. - * @param {Function} hasFunc The function to check properties. - * @returns {boolean} Returns `true` if `path` exists, else `false`. - */ -function hasPath(object, path, hasFunc) { - path = (0,_castPath_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(path, object); - - var index = -1, - length = path.length, - result = false; - - while (++index < length) { - var key = (0,_toKey_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(path[index]); - if (!(result = object != null && hasFunc(object, key))) { - break; - } - object = object[key]; - } - if (result || ++index != length) { - return result; - } - length = object == null ? 0 : object.length; - return !!length && (0,_isLength_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)(length) && (0,_isIndex_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(key, length) && - ((0,_isArray_js__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .A)(object) || (0,_isArguments_js__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A)(object)); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (hasPath); - - -/***/ }), - -/***/ 86586: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(92049); -/* harmony import */ var _isSymbol_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(61882); - - - -/** Used to match property names within property paths. */ -var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, - reIsPlainProp = /^\w*$/; - -/** - * Checks if `value` is a property name and not a property path. - * - * @private - * @param {*} value The value to check. - * @param {Object} [object] The object to query keys on. - * @returns {boolean} Returns `true` if `value` is a property name, else `false`. - */ -function isKey(value, object) { - if ((0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(value)) { - return false; - } - var type = typeof value; - if (type == 'number' || type == 'symbol' || type == 'boolean' || - value == null || (0,_isSymbol_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(value)) { - return true; - } - return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || - (object != null && value in Object(object)); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isKey); - - -/***/ }), - -/***/ 29959: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * Converts `set` to an array of its values. - * - * @private - * @param {Object} set The set to convert. - * @returns {Array} Returns the values. - */ -function setToArray(set) { - var index = -1, - result = Array(set.size); - - set.forEach(function(value) { - result[++index] = value; - }); - return result; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (setToArray); - - -/***/ }), - -/***/ 30901: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _isSymbol_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(61882); - - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0; - -/** - * Converts `value` to a string key if it's not a string or symbol. - * - * @private - * @param {*} value The value to inspect. - * @returns {string|symbol} Returns the key. - */ -function toKey(value) { - if (typeof value == 'string' || (0,_isSymbol_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(value)) { - return value; - } - var result = (value + ''); - return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (toKey); - - -/***/ }), - -/***/ 50053: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _baseClone_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(91641); - - -/** Used to compose bitmasks for cloning. */ -var CLONE_SYMBOLS_FLAG = 4; - -/** - * Creates a shallow clone of `value`. - * - * **Note:** This method is loosely based on the - * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm) - * and supports cloning arrays, array buffers, booleans, date objects, maps, - * numbers, `Object` objects, regexes, sets, strings, symbols, and typed - * arrays. The own enumerable properties of `arguments` objects are cloned - * as plain objects. An empty object is returned for uncloneable values such - * as error objects, functions, DOM nodes, and WeakMaps. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to clone. - * @returns {*} Returns the cloned value. - * @see _.cloneDeep - * @example - * - * var objects = [{ 'a': 1 }, { 'b': 2 }]; - * - * var shallow = _.clone(objects); - * console.log(shallow[0] === objects[0]); - * // => true - */ -function clone(value) { - return (0,_baseClone_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(value, CLONE_SYMBOLS_FLAG); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (clone); - - -/***/ }), - -/***/ 23068: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _baseRest_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(24326); -/* harmony import */ var _eq_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(66984); -/* harmony import */ var _isIterateeCall_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6832); -/* harmony import */ var _keysIn_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(55615); - - - - - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Assigns own and inherited enumerable string keyed properties of source - * objects to the destination object for all destination properties that - * resolve to `undefined`. Source objects are applied from left to right. - * Once a property is set, additional values of the same property are ignored. - * - * **Note:** This method mutates `object`. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. - * @see _.defaultsDeep - * @example - * - * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); - * // => { 'a': 1, 'b': 2 } - */ -var defaults = (0,_baseRest_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(function(object, sources) { - object = Object(object); - - var index = -1; - var length = sources.length; - var guard = length > 2 ? sources[2] : undefined; - - if (guard && (0,_isIterateeCall_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(sources[0], sources[1], guard)) { - length = 1; - } - - while (++index < length) { - var source = sources[index]; - var props = (0,_keysIn_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)(source); - var propsIndex = -1; - var propsLength = props.length; - - while (++propsIndex < propsLength) { - var key = props[propsIndex]; - var value = object[key]; - - if (value === undefined || - ((0,_eq_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(value, objectProto[key]) && !hasOwnProperty.call(object, key))) { - object[key] = source[key]; - } - } - } - - return object; -}); - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (defaults); - - -/***/ }), - -/***/ 11662: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ lodash_es_filter) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayFilter.js -var _arrayFilter = __webpack_require__(2634); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseEach.js + 1 modules -var _baseEach = __webpack_require__(6240); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseFilter.js - - -/** - * The base implementation of `_.filter` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {Array} Returns the new filtered array. - */ -function baseFilter(collection, predicate) { - var result = []; - (0,_baseEach/* default */.A)(collection, function(value, index, collection) { - if (predicate(value, index, collection)) { - result.push(value); - } - }); - return result; -} - -/* harmony default export */ const _baseFilter = (baseFilter); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseIteratee.js + 16 modules -var _baseIteratee = __webpack_require__(49574); -// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js -var isArray = __webpack_require__(92049); -;// CONCATENATED MODULE: ./node_modules/lodash-es/filter.js - - - - - -/** - * Iterates over elements of `collection`, returning an array of all elements - * `predicate` returns truthy for. The predicate is invoked with three - * arguments: (value, index|key, collection). - * - * **Note:** Unlike `_.remove`, this method returns a new array. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @returns {Array} Returns the new filtered array. - * @see _.reject - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': true }, - * { 'user': 'fred', 'age': 40, 'active': false } - * ]; - * - * _.filter(users, function(o) { return !o.active; }); - * // => objects for ['fred'] - * - * // The `_.matches` iteratee shorthand. - * _.filter(users, { 'age': 36, 'active': true }); - * // => objects for ['barney'] - * - * // The `_.matchesProperty` iteratee shorthand. - * _.filter(users, ['active', false]); - * // => objects for ['fred'] - * - * // The `_.property` iteratee shorthand. - * _.filter(users, 'active'); - * // => objects for ['barney'] - * - * // Combining several predicates using `_.overEvery` or `_.overSome`. - * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]])); - * // => objects for ['fred', 'barney'] - */ -function filter(collection, predicate) { - var func = (0,isArray/* default */.A)(collection) ? _arrayFilter/* default */.A : _baseFilter; - return func(collection, (0,_baseIteratee/* default */.A)(predicate, 3)); -} - -/* harmony default export */ const lodash_es_filter = (filter); - - -/***/ }), - -/***/ 34098: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _baseFlatten_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13588); - - -/** - * Flattens `array` a single level deep. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to flatten. - * @returns {Array} Returns the new flattened array. - * @example - * - * _.flatten([1, [2, [3, [4]], 5]]); - * // => [1, 2, [3, [4]], 5] - */ -function flatten(array) { - var length = array == null ? 0 : array.length; - return length ? (0,_baseFlatten_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(array, 1) : []; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (flatten); - - -/***/ }), - -/***/ 8058: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _arrayEach_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(72641); -/* harmony import */ var _baseEach_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6240); -/* harmony import */ var _castFunction_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(99922); -/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(92049); - - - - - -/** - * Iterates over elements of `collection` and invokes `iteratee` for each element. - * The iteratee is invoked with three arguments: (value, index|key, collection). - * Iteratee functions may exit iteration early by explicitly returning `false`. - * - * **Note:** As with other "Collections" methods, objects with a "length" - * property are iterated like arrays. To avoid this behavior use `_.forIn` - * or `_.forOwn` for object iteration. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @alias each - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Array|Object} Returns `collection`. - * @see _.forEachRight - * @example - * - * _.forEach([1, 2], function(value) { - * console.log(value); - * }); - * // => Logs `1` then `2`. - * - * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { - * console.log(key); - * }); - * // => Logs 'a' then 'b' (iteration order is not guaranteed). - */ -function forEach(collection, iteratee) { - var func = (0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(collection) ? _arrayEach_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A : _baseEach_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A; - return func(collection, (0,_castFunction_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(iteratee)); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (forEach); - - -/***/ }), - -/***/ 48585: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ lodash_es_has) -}); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseHas.js -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var _baseHas_hasOwnProperty = objectProto.hasOwnProperty; - -/** - * The base implementation of `_.has` without support for deep paths. - * - * @private - * @param {Object} [object] The object to query. - * @param {Array|string} key The key to check. - * @returns {boolean} Returns `true` if `key` exists, else `false`. - */ -function baseHas(object, key) { - return object != null && _baseHas_hasOwnProperty.call(object, key); -} - -/* harmony default export */ const _baseHas = (baseHas); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_hasPath.js -var _hasPath = __webpack_require__(85054); -;// CONCATENATED MODULE: ./node_modules/lodash-es/has.js - - - -/** - * Checks if `path` is a direct property of `object`. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path to check. - * @returns {boolean} Returns `true` if `path` exists, else `false`. - * @example - * - * var object = { 'a': { 'b': 2 } }; - * var other = _.create({ 'a': _.create({ 'b': 2 }) }); - * - * _.has(object, 'a'); - * // => true - * - * _.has(object, 'a.b'); - * // => true - * - * _.has(object, ['a', 'b']); - * // => true - * - * _.has(other, 'a'); - * // => false - */ -function has(object, path) { - return object != null && (0,_hasPath/* default */.A)(object, path, _baseHas); -} - -/* harmony default export */ const lodash_es_has = (has); - - -/***/ }), - -/***/ 39188: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ lodash_es_hasIn) -}); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseHasIn.js -/** - * The base implementation of `_.hasIn` without support for deep paths. - * - * @private - * @param {Object} [object] The object to query. - * @param {Array|string} key The key to check. - * @returns {boolean} Returns `true` if `key` exists, else `false`. - */ -function baseHasIn(object, key) { - return object != null && key in Object(object); -} - -/* harmony default export */ const _baseHasIn = (baseHasIn); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_hasPath.js -var _hasPath = __webpack_require__(85054); -;// CONCATENATED MODULE: ./node_modules/lodash-es/hasIn.js - - - -/** - * Checks if `path` is a direct or inherited property of `object`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path to check. - * @returns {boolean} Returns `true` if `path` exists, else `false`. - * @example - * - * var object = _.create({ 'a': _.create({ 'b': 2 }) }); - * - * _.hasIn(object, 'a'); - * // => true - * - * _.hasIn(object, 'a.b'); - * // => true - * - * _.hasIn(object, ['a', 'b']); - * // => true - * - * _.hasIn(object, 'b'); - * // => false - */ -function hasIn(object, path) { - return object != null && (0,_hasPath/* default */.A)(object, path, _baseHasIn); -} - -/* harmony default export */ const lodash_es_hasIn = (hasIn); - - -/***/ }), - -/***/ 61882: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _baseGetTag_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(88496); -/* harmony import */ var _isObjectLike_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(53098); - - - -/** `Object#toString` result references. */ -var symbolTag = '[object Symbol]'; - -/** - * Checks if `value` is classified as a `Symbol` primitive or object. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. - * @example - * - * _.isSymbol(Symbol.iterator); - * // => true - * - * _.isSymbol('abc'); - * // => false - */ -function isSymbol(value) { - return typeof value == 'symbol' || - ((0,_isObjectLike_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(value) && (0,_baseGetTag_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(value) == symbolTag); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isSymbol); - - -/***/ }), - -/***/ 69592: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * Checks if `value` is `undefined`. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. - * @example - * - * _.isUndefined(void 0); - * // => true - * - * _.isUndefined(null); - * // => false - */ -function isUndefined(value) { - return value === undefined; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isUndefined); - - -/***/ }), - -/***/ 27422: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _arrayLikeKeys_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(83607); -/* harmony import */ var _baseKeys_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(69471); -/* harmony import */ var _isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(38446); - - - - -/** - * Creates an array of the own enumerable property names of `object`. - * - * **Note:** Non-object values are coerced to objects. See the - * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) - * for more details. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.keys(new Foo); - * // => ['a', 'b'] (iteration order is not guaranteed) - * - * _.keys('hi'); - * // => ['0', '1'] - */ -function keys(object) { - return (0,_isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(object) ? (0,_arrayLikeKeys_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(object) : (0,_baseKeys_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)(object); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (keys); - - -/***/ }), - -/***/ 74722: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _arrayMap_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(45572); -/* harmony import */ var _baseIteratee_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(49574); -/* harmony import */ var _baseMap_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(52568); -/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(92049); - - - - - -/** - * Creates an array of values by running each element in `collection` thru - * `iteratee`. The iteratee is invoked with three arguments: - * (value, index|key, collection). - * - * Many lodash methods are guarded to work as iteratees for methods like - * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. - * - * The guarded methods are: - * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, - * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`, - * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`, - * `template`, `trim`, `trimEnd`, `trimStart`, and `words` - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Array} Returns the new mapped array. - * @example - * - * function square(n) { - * return n * n; - * } - * - * _.map([4, 8], square); - * // => [16, 64] - * - * _.map({ 'a': 4, 'b': 8 }, square); - * // => [16, 64] (iteration order is not guaranteed) - * - * var users = [ - * { 'user': 'barney' }, - * { 'user': 'fred' } - * ]; - * - * // The `_.property` iteratee shorthand. - * _.map(users, 'user'); - * // => ['barney', 'fred'] - */ -function map(collection, iteratee) { - var func = (0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(collection) ? _arrayMap_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A : _baseMap_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A; - return func(collection, (0,_baseIteratee_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(iteratee, 3)); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (map); - - -/***/ }), - -/***/ 81942: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ lodash_es_pick) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGet.js -var _baseGet = __webpack_require__(66318); -// EXTERNAL MODULE: ./node_modules/lodash-es/_assignValue.js -var _assignValue = __webpack_require__(52851); -// EXTERNAL MODULE: ./node_modules/lodash-es/_castPath.js + 2 modules -var _castPath = __webpack_require__(7819); -// EXTERNAL MODULE: ./node_modules/lodash-es/_isIndex.js -var _isIndex = __webpack_require__(25353); -// EXTERNAL MODULE: ./node_modules/lodash-es/isObject.js -var isObject = __webpack_require__(23149); -// EXTERNAL MODULE: ./node_modules/lodash-es/_toKey.js -var _toKey = __webpack_require__(30901); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseSet.js - - - - - - -/** - * The base implementation of `_.set`. - * - * @private - * @param {Object} object The object to modify. - * @param {Array|string} path The path of the property to set. - * @param {*} value The value to set. - * @param {Function} [customizer] The function to customize path creation. - * @returns {Object} Returns `object`. - */ -function baseSet(object, path, value, customizer) { - if (!(0,isObject/* default */.A)(object)) { - return object; - } - path = (0,_castPath/* default */.A)(path, object); - - var index = -1, - length = path.length, - lastIndex = length - 1, - nested = object; - - while (nested != null && ++index < length) { - var key = (0,_toKey/* default */.A)(path[index]), - newValue = value; - - if (key === '__proto__' || key === 'constructor' || key === 'prototype') { - return object; - } - - if (index != lastIndex) { - var objValue = nested[key]; - newValue = customizer ? customizer(objValue, key, nested) : undefined; - if (newValue === undefined) { - newValue = (0,isObject/* default */.A)(objValue) - ? objValue - : ((0,_isIndex/* default */.A)(path[index + 1]) ? [] : {}); - } - } - (0,_assignValue/* default */.A)(nested, key, newValue); - nested = nested[key]; - } - return object; -} - -/* harmony default export */ const _baseSet = (baseSet); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_basePickBy.js - - - - -/** - * The base implementation of `_.pickBy` without support for iteratee shorthands. - * - * @private - * @param {Object} object The source object. - * @param {string[]} paths The property paths to pick. - * @param {Function} predicate The function invoked per property. - * @returns {Object} Returns the new object. - */ -function basePickBy(object, paths, predicate) { - var index = -1, - length = paths.length, - result = {}; - - while (++index < length) { - var path = paths[index], - value = (0,_baseGet/* default */.A)(object, path); - - if (predicate(value, path)) { - _baseSet(result, (0,_castPath/* default */.A)(path, object), value); - } - } - return result; -} - -/* harmony default export */ const _basePickBy = (basePickBy); - -// EXTERNAL MODULE: ./node_modules/lodash-es/hasIn.js + 1 modules -var hasIn = __webpack_require__(39188); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_basePick.js - - - -/** - * The base implementation of `_.pick` without support for individual - * property identifiers. - * - * @private - * @param {Object} object The source object. - * @param {string[]} paths The property paths to pick. - * @returns {Object} Returns the new object. - */ -function basePick(object, paths) { - return _basePickBy(object, paths, function(value, path) { - return (0,hasIn/* default */.A)(object, path); - }); -} - -/* harmony default export */ const _basePick = (basePick); - -// EXTERNAL MODULE: ./node_modules/lodash-es/flatten.js -var flatten = __webpack_require__(34098); -// EXTERNAL MODULE: ./node_modules/lodash-es/_overRest.js + 1 modules -var _overRest = __webpack_require__(76875); -// EXTERNAL MODULE: ./node_modules/lodash-es/_setToString.js + 2 modules -var _setToString = __webpack_require__(67525); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_flatRest.js - - - - -/** - * A specialized version of `baseRest` which flattens the rest array. - * - * @private - * @param {Function} func The function to apply a rest parameter to. - * @returns {Function} Returns the new function. - */ -function flatRest(func) { - return (0,_setToString/* default */.A)((0,_overRest/* default */.A)(func, undefined, flatten/* default */.A), func + ''); -} - -/* harmony default export */ const _flatRest = (flatRest); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/pick.js - - - -/** - * Creates an object composed of the picked `object` properties. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The source object. - * @param {...(string|string[])} [paths] The property paths to pick. - * @returns {Object} Returns the new object. - * @example - * - * var object = { 'a': 1, 'b': '2', 'c': 3 }; - * - * _.pick(object, ['a', 'c']); - * // => { 'a': 1, 'c': 3 } - */ -var pick = _flatRest(function(object, paths) { - return object == null ? {} : _basePick(object, paths); -}); - -/* harmony default export */ const lodash_es_pick = (pick); - - -/***/ }), - -/***/ 91395: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ lodash_es_range) -}); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseRange.js -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeCeil = Math.ceil, - nativeMax = Math.max; - -/** - * The base implementation of `_.range` and `_.rangeRight` which doesn't - * coerce arguments. - * - * @private - * @param {number} start The start of the range. - * @param {number} end The end of the range. - * @param {number} step The value to increment or decrement by. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Array} Returns the range of numbers. - */ -function baseRange(start, end, step, fromRight) { - var index = -1, - length = nativeMax(nativeCeil((end - start) / (step || 1)), 0), - result = Array(length); - - while (length--) { - result[fromRight ? length : ++index] = start; - start += step; - } - return result; -} - -/* harmony default export */ const _baseRange = (baseRange); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_isIterateeCall.js -var _isIterateeCall = __webpack_require__(6832); -// EXTERNAL MODULE: ./node_modules/lodash-es/toFinite.js + 3 modules -var toFinite = __webpack_require__(74342); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_createRange.js - - - - -/** - * Creates a `_.range` or `_.rangeRight` function. - * - * @private - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new range function. - */ -function createRange(fromRight) { - return function(start, end, step) { - if (step && typeof step != 'number' && (0,_isIterateeCall/* default */.A)(start, end, step)) { - end = step = undefined; - } - // Ensure the sign of `-0` is preserved. - start = (0,toFinite/* default */.A)(start); - if (end === undefined) { - end = start; - start = 0; - } else { - end = (0,toFinite/* default */.A)(end); - } - step = step === undefined ? (start < end ? 1 : -1) : (0,toFinite/* default */.A)(step); - return _baseRange(start, end, step, fromRight); - }; -} - -/* harmony default export */ const _createRange = (createRange); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/range.js - - -/** - * Creates an array of numbers (positive and/or negative) progressing from - * `start` up to, but not including, `end`. A step of `-1` is used if a negative - * `start` is specified without an `end` or `step`. If `end` is not specified, - * it's set to `start` with `start` then set to `0`. - * - * **Note:** JavaScript follows the IEEE-754 standard for resolving - * floating-point values which can produce unexpected results. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Util - * @param {number} [start=0] The start of the range. - * @param {number} end The end of the range. - * @param {number} [step=1] The value to increment or decrement by. - * @returns {Array} Returns the range of numbers. - * @see _.inRange, _.rangeRight - * @example - * - * _.range(4); - * // => [0, 1, 2, 3] - * - * _.range(-4); - * // => [0, -1, -2, -3] - * - * _.range(1, 5); - * // => [1, 2, 3, 4] - * - * _.range(0, 20, 5); - * // => [0, 5, 10, 15] - * - * _.range(0, -4, -1); - * // => [0, -1, -2, -3] - * - * _.range(1, 4, 0); - * // => [1, 1, 1] - * - * _.range(0); - * // => [] - */ -var range = _createRange(); - -/* harmony default export */ const lodash_es_range = (range); - - -/***/ }), - -/***/ 89463: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ lodash_es_reduce) -}); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_arrayReduce.js -/** - * A specialized version of `_.reduce` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {*} [accumulator] The initial value. - * @param {boolean} [initAccum] Specify using the first element of `array` as - * the initial value. - * @returns {*} Returns the accumulated value. - */ -function arrayReduce(array, iteratee, accumulator, initAccum) { - var index = -1, - length = array == null ? 0 : array.length; - - if (initAccum && length) { - accumulator = array[++index]; - } - while (++index < length) { - accumulator = iteratee(accumulator, array[index], index, array); - } - return accumulator; -} - -/* harmony default export */ const _arrayReduce = (arrayReduce); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseEach.js + 1 modules -var _baseEach = __webpack_require__(6240); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseIteratee.js + 16 modules -var _baseIteratee = __webpack_require__(49574); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseReduce.js -/** - * The base implementation of `_.reduce` and `_.reduceRight`, without support - * for iteratee shorthands, which iterates over `collection` using `eachFunc`. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {*} accumulator The initial value. - * @param {boolean} initAccum Specify using the first or last element of - * `collection` as the initial value. - * @param {Function} eachFunc The function to iterate over `collection`. - * @returns {*} Returns the accumulated value. - */ -function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { - eachFunc(collection, function(value, index, collection) { - accumulator = initAccum - ? (initAccum = false, value) - : iteratee(accumulator, value, index, collection); - }); - return accumulator; -} - -/* harmony default export */ const _baseReduce = (baseReduce); - -// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js -var isArray = __webpack_require__(92049); -;// CONCATENATED MODULE: ./node_modules/lodash-es/reduce.js - - - - - - -/** - * Reduces `collection` to a value which is the accumulated result of running - * each element in `collection` thru `iteratee`, where each successive - * invocation is supplied the return value of the previous. If `accumulator` - * is not given, the first element of `collection` is used as the initial - * value. The iteratee is invoked with four arguments: - * (accumulator, value, index|key, collection). - * - * Many lodash methods are guarded to work as iteratees for methods like - * `_.reduce`, `_.reduceRight`, and `_.transform`. - * - * The guarded methods are: - * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`, - * and `sortBy` - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @param {*} [accumulator] The initial value. - * @returns {*} Returns the accumulated value. - * @see _.reduceRight - * @example - * - * _.reduce([1, 2], function(sum, n) { - * return sum + n; - * }, 0); - * // => 3 - * - * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { - * (result[value] || (result[value] = [])).push(key); - * return result; - * }, {}); - * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed) - */ -function reduce(collection, iteratee, accumulator) { - var func = (0,isArray/* default */.A)(collection) ? _arrayReduce : _baseReduce, - initAccum = arguments.length < 3; - - return func(collection, (0,_baseIteratee/* default */.A)(iteratee, 4), accumulator, initAccum, _baseEach/* default */.A); -} - -/* harmony default export */ const lodash_es_reduce = (reduce); - - -/***/ }), - -/***/ 13153: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * This method returns a new empty array. - * - * @static - * @memberOf _ - * @since 4.13.0 - * @category Util - * @returns {Array} Returns the new empty array. - * @example - * - * var arrays = _.times(2, _.stubArray); - * - * console.log(arrays); - * // => [[], []] - * - * console.log(arrays[0] === arrays[1]); - * // => false - */ -function stubArray() { - return []; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (stubArray); - - -/***/ }), - -/***/ 74342: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ lodash_es_toFinite) -}); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_trimmedEndIndex.js -/** Used to match a single whitespace character. */ -var reWhitespace = /\s/; - -/** - * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace - * character of `string`. - * - * @private - * @param {string} string The string to inspect. - * @returns {number} Returns the index of the last non-whitespace character. - */ -function trimmedEndIndex(string) { - var index = string.length; - - while (index-- && reWhitespace.test(string.charAt(index))) {} - return index; -} - -/* harmony default export */ const _trimmedEndIndex = (trimmedEndIndex); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseTrim.js - - -/** Used to match leading whitespace. */ -var reTrimStart = /^\s+/; - -/** - * The base implementation of `_.trim`. - * - * @private - * @param {string} string The string to trim. - * @returns {string} Returns the trimmed string. - */ -function baseTrim(string) { - return string - ? string.slice(0, _trimmedEndIndex(string) + 1).replace(reTrimStart, '') - : string; -} - -/* harmony default export */ const _baseTrim = (baseTrim); - -// EXTERNAL MODULE: ./node_modules/lodash-es/isObject.js -var isObject = __webpack_require__(23149); -// EXTERNAL MODULE: ./node_modules/lodash-es/isSymbol.js -var isSymbol = __webpack_require__(61882); -;// CONCATENATED MODULE: ./node_modules/lodash-es/toNumber.js - - - - -/** Used as references for various `Number` constants. */ -var NAN = 0 / 0; - -/** Used to detect bad signed hexadecimal string values. */ -var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; - -/** Used to detect binary string values. */ -var reIsBinary = /^0b[01]+$/i; - -/** Used to detect octal string values. */ -var reIsOctal = /^0o[0-7]+$/i; - -/** Built-in method references without a dependency on `root`. */ -var freeParseInt = parseInt; - -/** - * Converts `value` to a number. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to process. - * @returns {number} Returns the number. - * @example - * - * _.toNumber(3.2); - * // => 3.2 - * - * _.toNumber(Number.MIN_VALUE); - * // => 5e-324 - * - * _.toNumber(Infinity); - * // => Infinity - * - * _.toNumber('3.2'); - * // => 3.2 - */ -function toNumber(value) { - if (typeof value == 'number') { - return value; - } - if ((0,isSymbol/* default */.A)(value)) { - return NAN; - } - if ((0,isObject/* default */.A)(value)) { - var other = typeof value.valueOf == 'function' ? value.valueOf() : value; - value = (0,isObject/* default */.A)(other) ? (other + '') : other; - } - if (typeof value != 'string') { - return value === 0 ? value : +value; - } - value = _baseTrim(value); - var isBinary = reIsBinary.test(value); - return (isBinary || reIsOctal.test(value)) - ? freeParseInt(value.slice(2), isBinary ? 2 : 8) - : (reIsBadHex.test(value) ? NAN : +value); -} - -/* harmony default export */ const lodash_es_toNumber = (toNumber); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/toFinite.js - - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0, - MAX_INTEGER = 1.7976931348623157e+308; - -/** - * Converts `value` to a finite number. - * - * @static - * @memberOf _ - * @since 4.12.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {number} Returns the converted number. - * @example - * - * _.toFinite(3.2); - * // => 3.2 - * - * _.toFinite(Number.MIN_VALUE); - * // => 5e-324 - * - * _.toFinite(Infinity); - * // => 1.7976931348623157e+308 - * - * _.toFinite('3.2'); - * // => 3.2 - */ -function toFinite(value) { - if (!value) { - return value === 0 ? value : 0; - } - value = lodash_es_toNumber(value); - if (value === INFINITY || value === -INFINITY) { - var sign = (value < 0 ? -1 : 1); - return sign * MAX_INTEGER; - } - return value === value ? value : 0; -} - -/* harmony default export */ const lodash_es_toFinite = (toFinite); - - -/***/ }), - -/***/ 28894: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ lodash_es_toString) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_Symbol.js -var _Symbol = __webpack_require__(241); -// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayMap.js -var _arrayMap = __webpack_require__(45572); -// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js -var isArray = __webpack_require__(92049); -// EXTERNAL MODULE: ./node_modules/lodash-es/isSymbol.js -var isSymbol = __webpack_require__(61882); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseToString.js - - - - - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0; - -/** Used to convert symbols to primitives and strings. */ -var symbolProto = _Symbol/* default */.A ? _Symbol/* default */.A.prototype : undefined, - symbolToString = symbolProto ? symbolProto.toString : undefined; - -/** - * The base implementation of `_.toString` which doesn't convert nullish - * values to empty strings. - * - * @private - * @param {*} value The value to process. - * @returns {string} Returns the string. - */ -function baseToString(value) { - // Exit early for strings to avoid a performance hit in some environments. - if (typeof value == 'string') { - return value; - } - if ((0,isArray/* default */.A)(value)) { - // Recursively convert values (susceptible to call stack limits). - return (0,_arrayMap/* default */.A)(value, baseToString) + ''; - } - if ((0,isSymbol/* default */.A)(value)) { - return symbolToString ? symbolToString.call(value) : ''; - } - var result = (value + ''); - return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; -} - -/* harmony default export */ const _baseToString = (baseToString); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/toString.js - - -/** - * Converts `value` to a string. An empty string is returned for `null` - * and `undefined` values. The sign of `-0` is preserved. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {string} Returns the converted string. - * @example - * - * _.toString(null); - * // => '' - * - * _.toString(-0); - * // => '-0' - * - * _.toString([1, 2, 3]); - * // => '1,2,3' - */ -function toString_toString(value) { - return value == null ? '' : _baseToString(value); -} - -/* harmony default export */ const lodash_es_toString = (toString_toString); - - -/***/ }), - -/***/ 5664: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _toString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(28894); - - -/** Used to generate unique IDs. */ -var idCounter = 0; - -/** - * Generates a unique ID. If `prefix` is given, the ID is appended to it. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Util - * @param {string} [prefix=''] The value to prefix the ID with. - * @returns {string} Returns the unique ID. - * @example - * - * _.uniqueId('contact_'); - * // => 'contact_104' - * - * _.uniqueId(); - * // => '105' - */ -function uniqueId(prefix) { - var id = ++idCounter; - return (0,_toString_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(prefix) + id; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (uniqueId); - - -/***/ }), - -/***/ 38207: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ lodash_es_values) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayMap.js -var _arrayMap = __webpack_require__(45572); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseValues.js - - -/** - * The base implementation of `_.values` and `_.valuesIn` which creates an - * array of `object` property values corresponding to the property names - * of `props`. - * - * @private - * @param {Object} object The object to query. - * @param {Array} props The property names to get values for. - * @returns {Object} Returns the array of property values. - */ -function baseValues(object, props) { - return (0,_arrayMap/* default */.A)(props, function(key) { - return object[key]; - }); -} - -/* harmony default export */ const _baseValues = (baseValues); - -// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js -var keys = __webpack_require__(27422); -;// CONCATENATED MODULE: ./node_modules/lodash-es/values.js - - - -/** - * Creates an array of the own enumerable string keyed property values of `object`. - * - * **Note:** Non-object values are coerced to objects. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property values. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.values(new Foo); - * // => [1, 2] (iteration order is not guaranteed) - * - * _.values('hi'); - * // => ['h', 'i'] - */ -function values(object) { - return object == null ? [] : _baseValues(object, (0,keys/* default */.A)(object)); -} - -/* harmony default export */ const lodash_es_values = (values); - - -/***/ }), - -/***/ 73743: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - a: () => (/* binding */ createText), - c: () => (/* binding */ computeDimensionOfText) -}); - -// NAMESPACE OBJECT: ./node_modules/mermaid/node_modules/micromark/lib/constructs.js -var constructs_namespaceObject = {}; -__webpack_require__.r(constructs_namespaceObject); -__webpack_require__.d(constructs_namespaceObject, { - attentionMarkers: () => (attentionMarkers), - contentInitial: () => (contentInitial), - disable: () => (disable), - document: () => (constructs_document), - flow: () => (constructs_flow), - flowInitial: () => (flowInitial), - insideSpan: () => (insideSpan), - string: () => (constructs_string), - text: () => (constructs_text) -}); - -// EXTERNAL MODULE: ./node_modules/mermaid/dist/mermaid-b5860b54.js + 8 modules -var mermaid_b5860b54 = __webpack_require__(86079); -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/mdast-util-to-string/lib/index.js -/** - * @typedef {import('mdast').Root|import('mdast').Content} Node - * - * @typedef Options - * Configuration (optional). - * @property {boolean | null | undefined} [includeImageAlt=true] - * Whether to use `alt` for `image`s. - * @property {boolean | null | undefined} [includeHtml=true] - * Whether to use `value` of HTML. - */ - -/** @type {Options} */ -const emptyOptions = {} - -/** - * Get the text content of a node or list of nodes. - * - * Prefers the node’s plain-text fields, otherwise serializes its children, - * and if the given value is an array, serialize the nodes in it. - * - * @param {unknown} value - * Thing to serialize, typically `Node`. - * @param {Options | null | undefined} [options] - * Configuration (optional). - * @returns {string} - * Serialized `value`. - */ -function lib_toString(value, options) { - const settings = options || emptyOptions - const includeImageAlt = - typeof settings.includeImageAlt === 'boolean' - ? settings.includeImageAlt - : true - const includeHtml = - typeof settings.includeHtml === 'boolean' ? settings.includeHtml : true - - return one(value, includeImageAlt, includeHtml) -} - -/** - * One node or several nodes. - * - * @param {unknown} value - * Thing to serialize. - * @param {boolean} includeImageAlt - * Include image `alt`s. - * @param {boolean} includeHtml - * Include HTML. - * @returns {string} - * Serialized node. - */ -function one(value, includeImageAlt, includeHtml) { - if (node(value)) { - if ('value' in value) { - return value.type === 'html' && !includeHtml ? '' : value.value - } - - if (includeImageAlt && 'alt' in value && value.alt) { - return value.alt - } - - if ('children' in value) { - return lib_all(value.children, includeImageAlt, includeHtml) - } - } - - if (Array.isArray(value)) { - return lib_all(value, includeImageAlt, includeHtml) - } - - return '' -} - -/** - * Serialize a list of nodes. - * - * @param {Array} values - * Thing to serialize. - * @param {boolean} includeImageAlt - * Include image `alt`s. - * @param {boolean} includeHtml - * Include HTML. - * @returns {string} - * Serialized nodes. - */ -function lib_all(values, includeImageAlt, includeHtml) { - /** @type {Array} */ - const result = [] - let index = -1 - - while (++index < values.length) { - result[index] = one(values[index], includeImageAlt, includeHtml) - } - - return result.join('') -} - -/** - * Check if `value` looks like a node. - * - * @param {unknown} value - * Thing. - * @returns {value is Node} - * Whether `value` is a node. - */ -function node(value) { - return Boolean(value && typeof value === 'object') -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-chunked/index.js -/** - * Like `Array#splice`, but smarter for giant arrays. - * - * `Array#splice` takes all items to be inserted as individual argument which - * causes a stack overflow in V8 when trying to insert 100k items for instance. - * - * Otherwise, this does not return the removed items, and takes `items` as an - * array instead of rest parameters. - * - * @template {unknown} T - * Item type. - * @param {Array} list - * List to operate on. - * @param {number} start - * Index to remove/insert at (can be negative). - * @param {number} remove - * Number of items to remove. - * @param {Array} items - * Items to inject into `list`. - * @returns {void} - * Nothing. - */ -function splice(list, start, remove, items) { - const end = list.length - let chunkStart = 0 - /** @type {Array} */ - let parameters - - // Make start between zero and `end` (included). - if (start < 0) { - start = -start > end ? 0 : end + start - } else { - start = start > end ? end : start - } - remove = remove > 0 ? remove : 0 - - // No need to chunk the items if there’s only a couple (10k) items. - if (items.length < 10000) { - parameters = Array.from(items) - parameters.unshift(start, remove) - // @ts-expect-error Hush, it’s fine. - list.splice(...parameters) - } else { - // Delete `remove` items starting from `start` - if (remove) list.splice(start, remove) - - // Insert the items in chunks to not cause stack overflows. - while (chunkStart < items.length) { - parameters = items.slice(chunkStart, chunkStart + 10000) - parameters.unshift(start, 0) - // @ts-expect-error Hush, it’s fine. - list.splice(...parameters) - chunkStart += 10000 - start += 10000 - } - } -} - -/** - * Append `items` (an array) at the end of `list` (another array). - * When `list` was empty, returns `items` instead. - * - * This prevents a potentially expensive operation when `list` is empty, - * and adds items in batches to prevent V8 from hanging. - * - * @template {unknown} T - * Item type. - * @param {Array} list - * List to operate on. - * @param {Array} items - * Items to add to `list`. - * @returns {Array} - * Either `list` or `items`. - */ -function push(list, items) { - if (list.length > 0) { - splice(list, list.length, 0, items) - return list - } - return items -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-combine-extensions/index.js -/** - * @typedef {import('micromark-util-types').Extension} Extension - * @typedef {import('micromark-util-types').Handles} Handles - * @typedef {import('micromark-util-types').HtmlExtension} HtmlExtension - * @typedef {import('micromark-util-types').NormalizedExtension} NormalizedExtension - */ - - - -const micromark_util_combine_extensions_hasOwnProperty = {}.hasOwnProperty - -/** - * Combine multiple syntax extensions into one. - * - * @param {Array} extensions - * List of syntax extensions. - * @returns {NormalizedExtension} - * A single combined extension. - */ -function combineExtensions(extensions) { - /** @type {NormalizedExtension} */ - const all = {} - let index = -1 - - while (++index < extensions.length) { - syntaxExtension(all, extensions[index]) - } - - return all -} - -/** - * Merge `extension` into `all`. - * - * @param {NormalizedExtension} all - * Extension to merge into. - * @param {Extension} extension - * Extension to merge. - * @returns {void} - */ -function syntaxExtension(all, extension) { - /** @type {keyof Extension} */ - let hook - - for (hook in extension) { - const maybe = micromark_util_combine_extensions_hasOwnProperty.call(all, hook) ? all[hook] : undefined - /** @type {Record} */ - const left = maybe || (all[hook] = {}) - /** @type {Record | undefined} */ - const right = extension[hook] - /** @type {string} */ - let code - - if (right) { - for (code in right) { - if (!micromark_util_combine_extensions_hasOwnProperty.call(left, code)) left[code] = [] - const value = right[code] - constructs( - // @ts-expect-error Looks like a list. - left[code], - Array.isArray(value) ? value : value ? [value] : [] - ) - } - } - } -} - -/** - * Merge `list` into `existing` (both lists of constructs). - * Mutates `existing`. - * - * @param {Array} existing - * @param {Array} list - * @returns {void} - */ -function constructs(existing, list) { - let index = -1 - /** @type {Array} */ - const before = [] - - while (++index < list.length) { - // @ts-expect-error Looks like an object. - ;(list[index].add === 'after' ? existing : before).push(list[index]) - } - - splice(existing, 0, 0, before) -} - -/** - * Combine multiple HTML extensions into one. - * - * @param {Array} htmlExtensions - * List of HTML extensions. - * @returns {HtmlExtension} - * A single combined HTML extension. - */ -function combineHtmlExtensions(htmlExtensions) { - /** @type {HtmlExtension} */ - const handlers = {} - let index = -1 - - while (++index < htmlExtensions.length) { - htmlExtension(handlers, htmlExtensions[index]) - } - - return handlers -} - -/** - * Merge `extension` into `all`. - * - * @param {HtmlExtension} all - * Extension to merge into. - * @param {HtmlExtension} extension - * Extension to merge. - * @returns {void} - */ -function htmlExtension(all, extension) { - /** @type {keyof HtmlExtension} */ - let hook - - for (hook in extension) { - const maybe = micromark_util_combine_extensions_hasOwnProperty.call(all, hook) ? all[hook] : undefined - const left = maybe || (all[hook] = {}) - const right = extension[hook] - /** @type {keyof Handles} */ - let type - - if (right) { - for (type in right) { - // @ts-expect-error assume document vs regular handler are managed correctly. - left[type] = right[type] - } - } - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-character/lib/unicode-punctuation-regex.js -// This module is generated by `script/`. -// -// CommonMark handles attention (emphasis, strong) markers based on what comes -// before or after them. -// One such difference is if those characters are Unicode punctuation. -// This script is generated from the Unicode data. - -/** - * Regular expression that matches a unicode punctuation character. - */ -const unicodePunctuationRegex = - /[!-\/:-@\[-`\{-~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/ - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-character/index.js -/** - * @typedef {import('micromark-util-types').Code} Code - */ - - - -/** - * Check whether the character code represents an ASCII alpha (`a` through `z`, - * case insensitive). - * - * An **ASCII alpha** is an ASCII upper alpha or ASCII lower alpha. - * - * An **ASCII upper alpha** is a character in the inclusive range U+0041 (`A`) - * to U+005A (`Z`). - * - * An **ASCII lower alpha** is a character in the inclusive range U+0061 (`a`) - * to U+007A (`z`). - * - * @param code - * Code. - * @returns - * Whether it matches. - */ -const asciiAlpha = regexCheck(/[A-Za-z]/) - -/** - * Check whether the character code represents an ASCII alphanumeric (`a` - * through `z`, case insensitive, or `0` through `9`). - * - * An **ASCII alphanumeric** is an ASCII digit (see `asciiDigit`) or ASCII alpha - * (see `asciiAlpha`). - * - * @param code - * Code. - * @returns - * Whether it matches. - */ -const asciiAlphanumeric = regexCheck(/[\dA-Za-z]/) - -/** - * Check whether the character code represents an ASCII atext. - * - * atext is an ASCII alphanumeric (see `asciiAlphanumeric`), or a character in - * the inclusive ranges U+0023 NUMBER SIGN (`#`) to U+0027 APOSTROPHE (`'`), - * U+002A ASTERISK (`*`), U+002B PLUS SIGN (`+`), U+002D DASH (`-`), U+002F - * SLASH (`/`), U+003D EQUALS TO (`=`), U+003F QUESTION MARK (`?`), U+005E - * CARET (`^`) to U+0060 GRAVE ACCENT (`` ` ``), or U+007B LEFT CURLY BRACE - * (`{`) to U+007E TILDE (`~`). - * - * See: - * **\[RFC5322]**: - * [Internet Message Format](https://tools.ietf.org/html/rfc5322). - * P. Resnick. - * IETF. - * - * @param code - * Code. - * @returns - * Whether it matches. - */ -const asciiAtext = regexCheck(/[#-'*+\--9=?A-Z^-~]/) - -/** - * Check whether a character code is an ASCII control character. - * - * An **ASCII control** is a character in the inclusive range U+0000 NULL (NUL) - * to U+001F (US), or U+007F (DEL). - * - * @param {Code} code - * Code. - * @returns {boolean} - * Whether it matches. - */ -function asciiControl(code) { - return ( - // Special whitespace codes (which have negative values), C0 and Control - // character DEL - code !== null && (code < 32 || code === 127) - ) -} - -/** - * Check whether the character code represents an ASCII digit (`0` through `9`). - * - * An **ASCII digit** is a character in the inclusive range U+0030 (`0`) to - * U+0039 (`9`). - * - * @param code - * Code. - * @returns - * Whether it matches. - */ -const asciiDigit = regexCheck(/\d/) - -/** - * Check whether the character code represents an ASCII hex digit (`a` through - * `f`, case insensitive, or `0` through `9`). - * - * An **ASCII hex digit** is an ASCII digit (see `asciiDigit`), ASCII upper hex - * digit, or an ASCII lower hex digit. - * - * An **ASCII upper hex digit** is a character in the inclusive range U+0041 - * (`A`) to U+0046 (`F`). - * - * An **ASCII lower hex digit** is a character in the inclusive range U+0061 - * (`a`) to U+0066 (`f`). - * - * @param code - * Code. - * @returns - * Whether it matches. - */ -const asciiHexDigit = regexCheck(/[\dA-Fa-f]/) - -/** - * Check whether the character code represents ASCII punctuation. - * - * An **ASCII punctuation** is a character in the inclusive ranges U+0021 - * EXCLAMATION MARK (`!`) to U+002F SLASH (`/`), U+003A COLON (`:`) to U+0040 AT - * SIGN (`@`), U+005B LEFT SQUARE BRACKET (`[`) to U+0060 GRAVE ACCENT - * (`` ` ``), or U+007B LEFT CURLY BRACE (`{`) to U+007E TILDE (`~`). - * - * @param code - * Code. - * @returns - * Whether it matches. - */ -const asciiPunctuation = regexCheck(/[!-/:-@[-`{-~]/) - -/** - * Check whether a character code is a markdown line ending. - * - * A **markdown line ending** is the virtual characters M-0003 CARRIAGE RETURN - * LINE FEED (CRLF), M-0004 LINE FEED (LF) and M-0005 CARRIAGE RETURN (CR). - * - * In micromark, the actual character U+000A LINE FEED (LF) and U+000D CARRIAGE - * RETURN (CR) are replaced by these virtual characters depending on whether - * they occurred together. - * - * @param {Code} code - * Code. - * @returns {boolean} - * Whether it matches. - */ -function markdownLineEnding(code) { - return code !== null && code < -2 -} - -/** - * Check whether a character code is a markdown line ending (see - * `markdownLineEnding`) or markdown space (see `markdownSpace`). - * - * @param {Code} code - * Code. - * @returns {boolean} - * Whether it matches. - */ -function markdownLineEndingOrSpace(code) { - return code !== null && (code < 0 || code === 32) -} - -/** - * Check whether a character code is a markdown space. - * - * A **markdown space** is the concrete character U+0020 SPACE (SP) and the - * virtual characters M-0001 VIRTUAL SPACE (VS) and M-0002 HORIZONTAL TAB (HT). - * - * In micromark, the actual character U+0009 CHARACTER TABULATION (HT) is - * replaced by one M-0002 HORIZONTAL TAB (HT) and between 0 and 3 M-0001 VIRTUAL - * SPACE (VS) characters, depending on the column at which the tab occurred. - * - * @param {Code} code - * Code. - * @returns {boolean} - * Whether it matches. - */ -function markdownSpace(code) { - return code === -2 || code === -1 || code === 32 -} - -// Size note: removing ASCII from the regex and using `asciiPunctuation` here -// In fact adds to the bundle size. -/** - * Check whether the character code represents Unicode punctuation. - * - * A **Unicode punctuation** is a character in the Unicode `Pc` (Punctuation, - * Connector), `Pd` (Punctuation, Dash), `Pe` (Punctuation, Close), `Pf` - * (Punctuation, Final quote), `Pi` (Punctuation, Initial quote), `Po` - * (Punctuation, Other), or `Ps` (Punctuation, Open) categories, or an ASCII - * punctuation (see `asciiPunctuation`). - * - * See: - * **\[UNICODE]**: - * [The Unicode Standard](https://www.unicode.org/versions/). - * Unicode Consortium. - * - * @param code - * Code. - * @returns - * Whether it matches. - */ -const unicodePunctuation = regexCheck(unicodePunctuationRegex) - -/** - * Check whether the character code represents Unicode whitespace. - * - * Note that this does handle micromark specific markdown whitespace characters. - * See `markdownLineEndingOrSpace` to check that. - * - * A **Unicode whitespace** is a character in the Unicode `Zs` (Separator, - * Space) category, or U+0009 CHARACTER TABULATION (HT), U+000A LINE FEED (LF), - * U+000C (FF), or U+000D CARRIAGE RETURN (CR) (**\[UNICODE]**). - * - * See: - * **\[UNICODE]**: - * [The Unicode Standard](https://www.unicode.org/versions/). - * Unicode Consortium. - * - * @param code - * Code. - * @returns - * Whether it matches. - */ -const unicodeWhitespace = regexCheck(/\s/) - -/** - * Create a code check from a regex. - * - * @param {RegExp} regex - * @returns {(code: Code) => boolean} - */ -function regexCheck(regex) { - return check - - /** - * Check whether a code matches the bound regex. - * - * @param {Code} code - * Character code. - * @returns {boolean} - * Whether the character code matches the bound regex. - */ - function check(code) { - return code !== null && regex.test(String.fromCharCode(code)) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-space/index.js -/** - * @typedef {import('micromark-util-types').Effects} Effects - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenType} TokenType - */ - - - -// To do: implement `spaceOrTab`, `spaceOrTabMinMax`, `spaceOrTabWithOptions`. - -/** - * Parse spaces and tabs. - * - * There is no `nok` parameter: - * - * * spaces in markdown are often optional, in which case this factory can be - * used and `ok` will be switched to whether spaces were found or not - * * one line ending or space can be detected with `markdownSpace(code)` right - * before using `factorySpace` - * - * ###### Examples - * - * Where `␉` represents a tab (plus how much it expands) and `␠` represents a - * single space. - * - * ```markdown - * ␉ - * ␠␠␠␠ - * ␉␠ - * ``` - * - * @param {Effects} effects - * Context. - * @param {State} ok - * State switched to when successful. - * @param {TokenType} type - * Type (`' \t'`). - * @param {number | undefined} [max=Infinity] - * Max (exclusive). - * @returns - * Start state. - */ -function factorySpace(effects, ok, type, max) { - const limit = max ? max - 1 : Number.POSITIVE_INFINITY - let size = 0 - return start - - /** @type {State} */ - function start(code) { - if (markdownSpace(code)) { - effects.enter(type) - return prefix(code) - } - return ok(code) - } - - /** @type {State} */ - function prefix(code) { - if (markdownSpace(code) && size++ < limit) { - effects.consume(code) - return prefix - } - effects.exit(type) - return ok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/initialize/content.js -/** - * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct - * @typedef {import('micromark-util-types').Initializer} Initializer - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').Token} Token - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - */ - - - -/** @type {InitialConstruct} */ -const content = { - tokenize: initializeContent -} - -/** - * @this {TokenizeContext} - * @type {Initializer} - */ -function initializeContent(effects) { - const contentStart = effects.attempt( - this.parser.constructs.contentInitial, - afterContentStartConstruct, - paragraphInitial - ) - /** @type {Token} */ - let previous - return contentStart - - /** @type {State} */ - function afterContentStartConstruct(code) { - if (code === null) { - effects.consume(code) - return - } - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return factorySpace(effects, contentStart, 'linePrefix') - } - - /** @type {State} */ - function paragraphInitial(code) { - effects.enter('paragraph') - return lineStart(code) - } - - /** @type {State} */ - function lineStart(code) { - const token = effects.enter('chunkText', { - contentType: 'text', - previous - }) - if (previous) { - previous.next = token - } - previous = token - return data(code) - } - - /** @type {State} */ - function data(code) { - if (code === null) { - effects.exit('chunkText') - effects.exit('paragraph') - effects.consume(code) - return - } - if (markdownLineEnding(code)) { - effects.consume(code) - effects.exit('chunkText') - return lineStart - } - - // Data. - effects.consume(code) - return data - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/initialize/document.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').ContainerState} ContainerState - * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct - * @typedef {import('micromark-util-types').Initializer} Initializer - * @typedef {import('micromark-util-types').Point} Point - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').Token} Token - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - -/** - * @typedef {[Construct, ContainerState]} StackItem - */ - - - - -/** @type {InitialConstruct} */ -const document_document = { - tokenize: initializeDocument -} - -/** @type {Construct} */ -const containerConstruct = { - tokenize: tokenizeContainer -} - -/** - * @this {TokenizeContext} - * @type {Initializer} - */ -function initializeDocument(effects) { - const self = this - /** @type {Array} */ - const stack = [] - let continued = 0 - /** @type {TokenizeContext | undefined} */ - let childFlow - /** @type {Token | undefined} */ - let childToken - /** @type {number} */ - let lineStartOffset - return start - - /** @type {State} */ - function start(code) { - // First we iterate through the open blocks, starting with the root - // document, and descending through last children down to the last open - // block. - // Each block imposes a condition that the line must satisfy if the block is - // to remain open. - // For example, a block quote requires a `>` character. - // A paragraph requires a non-blank line. - // In this phase we may match all or just some of the open blocks. - // But we cannot close unmatched blocks yet, because we may have a lazy - // continuation line. - if (continued < stack.length) { - const item = stack[continued] - self.containerState = item[1] - return effects.attempt( - item[0].continuation, - documentContinue, - checkNewContainers - )(code) - } - - // Done. - return checkNewContainers(code) - } - - /** @type {State} */ - function documentContinue(code) { - continued++ - - // Note: this field is called `_closeFlow` but it also closes containers. - // Perhaps a good idea to rename it but it’s already used in the wild by - // extensions. - if (self.containerState._closeFlow) { - self.containerState._closeFlow = undefined - if (childFlow) { - closeFlow() - } - - // Note: this algorithm for moving events around is similar to the - // algorithm when dealing with lazy lines in `writeToChild`. - const indexBeforeExits = self.events.length - let indexBeforeFlow = indexBeforeExits - /** @type {Point | undefined} */ - let point - - // Find the flow chunk. - while (indexBeforeFlow--) { - if ( - self.events[indexBeforeFlow][0] === 'exit' && - self.events[indexBeforeFlow][1].type === 'chunkFlow' - ) { - point = self.events[indexBeforeFlow][1].end - break - } - } - exitContainers(continued) - - // Fix positions. - let index = indexBeforeExits - while (index < self.events.length) { - self.events[index][1].end = Object.assign({}, point) - index++ - } - - // Inject the exits earlier (they’re still also at the end). - splice( - self.events, - indexBeforeFlow + 1, - 0, - self.events.slice(indexBeforeExits) - ) - - // Discard the duplicate exits. - self.events.length = index - return checkNewContainers(code) - } - return start(code) - } - - /** @type {State} */ - function checkNewContainers(code) { - // Next, after consuming the continuation markers for existing blocks, we - // look for new block starts (e.g. `>` for a block quote). - // If we encounter a new block start, we close any blocks unmatched in - // step 1 before creating the new block as a child of the last matched - // block. - if (continued === stack.length) { - // No need to `check` whether there’s a container, of `exitContainers` - // would be moot. - // We can instead immediately `attempt` to parse one. - if (!childFlow) { - return documentContinued(code) - } - - // If we have concrete content, such as block HTML or fenced code, - // we can’t have containers “pierce” into them, so we can immediately - // start. - if (childFlow.currentConstruct && childFlow.currentConstruct.concrete) { - return flowStart(code) - } - - // If we do have flow, it could still be a blank line, - // but we’d be interrupting it w/ a new container if there’s a current - // construct. - // To do: next major: remove `_gfmTableDynamicInterruptHack` (no longer - // needed in micromark-extension-gfm-table@1.0.6). - self.interrupt = Boolean( - childFlow.currentConstruct && !childFlow._gfmTableDynamicInterruptHack - ) - } - - // Check if there is a new container. - self.containerState = {} - return effects.check( - containerConstruct, - thereIsANewContainer, - thereIsNoNewContainer - )(code) - } - - /** @type {State} */ - function thereIsANewContainer(code) { - if (childFlow) closeFlow() - exitContainers(continued) - return documentContinued(code) - } - - /** @type {State} */ - function thereIsNoNewContainer(code) { - self.parser.lazy[self.now().line] = continued !== stack.length - lineStartOffset = self.now().offset - return flowStart(code) - } - - /** @type {State} */ - function documentContinued(code) { - // Try new containers. - self.containerState = {} - return effects.attempt( - containerConstruct, - containerContinue, - flowStart - )(code) - } - - /** @type {State} */ - function containerContinue(code) { - continued++ - stack.push([self.currentConstruct, self.containerState]) - // Try another. - return documentContinued(code) - } - - /** @type {State} */ - function flowStart(code) { - if (code === null) { - if (childFlow) closeFlow() - exitContainers(0) - effects.consume(code) - return - } - childFlow = childFlow || self.parser.flow(self.now()) - effects.enter('chunkFlow', { - contentType: 'flow', - previous: childToken, - _tokenizer: childFlow - }) - return flowContinue(code) - } - - /** @type {State} */ - function flowContinue(code) { - if (code === null) { - writeToChild(effects.exit('chunkFlow'), true) - exitContainers(0) - effects.consume(code) - return - } - if (markdownLineEnding(code)) { - effects.consume(code) - writeToChild(effects.exit('chunkFlow')) - // Get ready for the next line. - continued = 0 - self.interrupt = undefined - return start - } - effects.consume(code) - return flowContinue - } - - /** - * @param {Token} token - * @param {boolean | undefined} [eof] - * @returns {void} - */ - function writeToChild(token, eof) { - const stream = self.sliceStream(token) - if (eof) stream.push(null) - token.previous = childToken - if (childToken) childToken.next = token - childToken = token - childFlow.defineSkip(token.start) - childFlow.write(stream) - - // Alright, so we just added a lazy line: - // - // ```markdown - // > a - // b. - // - // Or: - // - // > ~~~c - // d - // - // Or: - // - // > | e | - // f - // ``` - // - // The construct in the second example (fenced code) does not accept lazy - // lines, so it marked itself as done at the end of its first line, and - // then the content construct parses `d`. - // Most constructs in markdown match on the first line: if the first line - // forms a construct, a non-lazy line can’t “unmake” it. - // - // The construct in the third example is potentially a GFM table, and - // those are *weird*. - // It *could* be a table, from the first line, if the following line - // matches a condition. - // In this case, that second line is lazy, which “unmakes” the first line - // and turns the whole into one content block. - // - // We’ve now parsed the non-lazy and the lazy line, and can figure out - // whether the lazy line started a new flow block. - // If it did, we exit the current containers between the two flow blocks. - if (self.parser.lazy[token.start.line]) { - let index = childFlow.events.length - while (index--) { - if ( - // The token starts before the line ending… - childFlow.events[index][1].start.offset < lineStartOffset && - // …and either is not ended yet… - (!childFlow.events[index][1].end || - // …or ends after it. - childFlow.events[index][1].end.offset > lineStartOffset) - ) { - // Exit: there’s still something open, which means it’s a lazy line - // part of something. - return - } - } - - // Note: this algorithm for moving events around is similar to the - // algorithm when closing flow in `documentContinue`. - const indexBeforeExits = self.events.length - let indexBeforeFlow = indexBeforeExits - /** @type {boolean | undefined} */ - let seen - /** @type {Point | undefined} */ - let point - - // Find the previous chunk (the one before the lazy line). - while (indexBeforeFlow--) { - if ( - self.events[indexBeforeFlow][0] === 'exit' && - self.events[indexBeforeFlow][1].type === 'chunkFlow' - ) { - if (seen) { - point = self.events[indexBeforeFlow][1].end - break - } - seen = true - } - } - exitContainers(continued) - - // Fix positions. - index = indexBeforeExits - while (index < self.events.length) { - self.events[index][1].end = Object.assign({}, point) - index++ - } - - // Inject the exits earlier (they’re still also at the end). - splice( - self.events, - indexBeforeFlow + 1, - 0, - self.events.slice(indexBeforeExits) - ) - - // Discard the duplicate exits. - self.events.length = index - } - } - - /** - * @param {number} size - * @returns {void} - */ - function exitContainers(size) { - let index = stack.length - - // Exit open containers. - while (index-- > size) { - const entry = stack[index] - self.containerState = entry[1] - entry[0].exit.call(self, effects) - } - stack.length = size - } - function closeFlow() { - childFlow.write([null]) - childToken = undefined - childFlow = undefined - self.containerState._closeFlow = undefined - } -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeContainer(effects, ok, nok) { - // Always populated by defaults. - - return factorySpace( - effects, - effects.attempt(this.parser.constructs.document, ok, nok), - 'linePrefix', - this.parser.constructs.disable.null.includes('codeIndented') ? undefined : 4 - ) -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/blank-line.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const blankLine = { - tokenize: tokenizeBlankLine, - partial: true -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeBlankLine(effects, ok, nok) { - return start - - /** - * Start of blank line. - * - * > 👉 **Note**: `␠` represents a space character. - * - * ```markdown - * > | ␠␠␊ - * ^ - * > | ␊ - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - return markdownSpace(code) - ? factorySpace(effects, after, 'linePrefix')(code) - : after(code) - } - - /** - * At eof/eol, after optional whitespace. - * - * > 👉 **Note**: `␠` represents a space character. - * - * ```markdown - * > | ␠␠␊ - * ^ - * > | ␊ - * ^ - * ``` - * - * @type {State} - */ - function after(code) { - return code === null || markdownLineEnding(code) ? ok(code) : nok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/micromark-util-subtokenize/node_modules/micromark-util-chunked/index.js -/** - * Like `Array#splice`, but smarter for giant arrays. - * - * `Array#splice` takes all items to be inserted as individual argument which - * causes a stack overflow in V8 when trying to insert 100k items for instance. - * - * Otherwise, this does not return the removed items, and takes `items` as an - * array instead of rest parameters. - * - * @template {unknown} T - * Item type. - * @param {Array} list - * List to operate on. - * @param {number} start - * Index to remove/insert at (can be negative). - * @param {number} remove - * Number of items to remove. - * @param {Array} items - * Items to inject into `list`. - * @returns {void} - * Nothing. - */ -function micromark_util_chunked_splice(list, start, remove, items) { - const end = list.length - let chunkStart = 0 - /** @type {Array} */ - let parameters - - // Make start between zero and `end` (included). - if (start < 0) { - start = -start > end ? 0 : end + start - } else { - start = start > end ? end : start - } - remove = remove > 0 ? remove : 0 - - // No need to chunk the items if there’s only a couple (10k) items. - if (items.length < 10000) { - parameters = Array.from(items) - parameters.unshift(start, remove) - // @ts-expect-error Hush, it’s fine. - list.splice(...parameters) - } else { - // Delete `remove` items starting from `start` - if (remove) list.splice(start, remove) - - // Insert the items in chunks to not cause stack overflows. - while (chunkStart < items.length) { - parameters = items.slice(chunkStart, chunkStart + 10000) - parameters.unshift(start, 0) - // @ts-expect-error Hush, it’s fine. - list.splice(...parameters) - chunkStart += 10000 - start += 10000 - } - } -} - -/** - * Append `items` (an array) at the end of `list` (another array). - * When `list` was empty, returns `items` instead. - * - * This prevents a potentially expensive operation when `list` is empty, - * and adds items in batches to prevent V8 from hanging. - * - * @template {unknown} T - * Item type. - * @param {Array} list - * List to operate on. - * @param {Array} items - * Items to add to `list`. - * @returns {Array} - * Either `list` or `items`. - */ -function micromark_util_chunked_push(list, items) { - if (list.length > 0) { - micromark_util_chunked_splice(list, list.length, 0, items) - return list - } - return items -} - -;// CONCATENATED MODULE: ./node_modules/micromark-util-subtokenize/index.js -/** - * @typedef {import('micromark-util-types').Chunk} Chunk - * @typedef {import('micromark-util-types').Event} Event - * @typedef {import('micromark-util-types').Token} Token - */ - - -/** - * Tokenize subcontent. - * - * @param {Array} events - * List of events. - * @returns {boolean} - * Whether subtokens were found. - */ -function subtokenize(events) { - /** @type {Record} */ - const jumps = {} - let index = -1 - /** @type {Event} */ - let event - /** @type {number | undefined} */ - let lineIndex - /** @type {number} */ - let otherIndex - /** @type {Event} */ - let otherEvent - /** @type {Array} */ - let parameters - /** @type {Array} */ - let subevents - /** @type {boolean | undefined} */ - let more - while (++index < events.length) { - while (index in jumps) { - index = jumps[index] - } - event = events[index] - - // Add a hook for the GFM tasklist extension, which needs to know if text - // is in the first content of a list item. - if ( - index && - event[1].type === 'chunkFlow' && - events[index - 1][1].type === 'listItemPrefix' - ) { - subevents = event[1]._tokenizer.events - otherIndex = 0 - if ( - otherIndex < subevents.length && - subevents[otherIndex][1].type === 'lineEndingBlank' - ) { - otherIndex += 2 - } - if ( - otherIndex < subevents.length && - subevents[otherIndex][1].type === 'content' - ) { - while (++otherIndex < subevents.length) { - if (subevents[otherIndex][1].type === 'content') { - break - } - if (subevents[otherIndex][1].type === 'chunkText') { - subevents[otherIndex][1]._isInFirstContentOfListItem = true - otherIndex++ - } - } - } - } - - // Enter. - if (event[0] === 'enter') { - if (event[1].contentType) { - Object.assign(jumps, subcontent(events, index)) - index = jumps[index] - more = true - } - } - // Exit. - else if (event[1]._container) { - otherIndex = index - lineIndex = undefined - while (otherIndex--) { - otherEvent = events[otherIndex] - if ( - otherEvent[1].type === 'lineEnding' || - otherEvent[1].type === 'lineEndingBlank' - ) { - if (otherEvent[0] === 'enter') { - if (lineIndex) { - events[lineIndex][1].type = 'lineEndingBlank' - } - otherEvent[1].type = 'lineEnding' - lineIndex = otherIndex - } - } else { - break - } - } - if (lineIndex) { - // Fix position. - event[1].end = Object.assign({}, events[lineIndex][1].start) - - // Switch container exit w/ line endings. - parameters = events.slice(lineIndex, index) - parameters.unshift(event) - micromark_util_chunked_splice(events, lineIndex, index - lineIndex + 1, parameters) - } - } - } - return !more -} - -/** - * Tokenize embedded tokens. - * - * @param {Array} events - * @param {number} eventIndex - * @returns {Record} - */ -function subcontent(events, eventIndex) { - const token = events[eventIndex][1] - const context = events[eventIndex][2] - let startPosition = eventIndex - 1 - /** @type {Array} */ - const startPositions = [] - const tokenizer = - token._tokenizer || context.parser[token.contentType](token.start) - const childEvents = tokenizer.events - /** @type {Array<[number, number]>} */ - const jumps = [] - /** @type {Record} */ - const gaps = {} - /** @type {Array} */ - let stream - /** @type {Token | undefined} */ - let previous - let index = -1 - /** @type {Token | undefined} */ - let current = token - let adjust = 0 - let start = 0 - const breaks = [start] - - // Loop forward through the linked tokens to pass them in order to the - // subtokenizer. - while (current) { - // Find the position of the event for this token. - while (events[++startPosition][1] !== current) { - // Empty. - } - startPositions.push(startPosition) - if (!current._tokenizer) { - stream = context.sliceStream(current) - if (!current.next) { - stream.push(null) - } - if (previous) { - tokenizer.defineSkip(current.start) - } - if (current._isInFirstContentOfListItem) { - tokenizer._gfmTasklistFirstContentOfListItem = true - } - tokenizer.write(stream) - if (current._isInFirstContentOfListItem) { - tokenizer._gfmTasklistFirstContentOfListItem = undefined - } - } - - // Unravel the next token. - previous = current - current = current.next - } - - // Now, loop back through all events (and linked tokens), to figure out which - // parts belong where. - current = token - while (++index < childEvents.length) { - if ( - // Find a void token that includes a break. - childEvents[index][0] === 'exit' && - childEvents[index - 1][0] === 'enter' && - childEvents[index][1].type === childEvents[index - 1][1].type && - childEvents[index][1].start.line !== childEvents[index][1].end.line - ) { - start = index + 1 - breaks.push(start) - // Help GC. - current._tokenizer = undefined - current.previous = undefined - current = current.next - } - } - - // Help GC. - tokenizer.events = [] - - // If there’s one more token (which is the cases for lines that end in an - // EOF), that’s perfect: the last point we found starts it. - // If there isn’t then make sure any remaining content is added to it. - if (current) { - // Help GC. - current._tokenizer = undefined - current.previous = undefined - } else { - breaks.pop() - } - - // Now splice the events from the subtokenizer into the current events, - // moving back to front so that splice indices aren’t affected. - index = breaks.length - while (index--) { - const slice = childEvents.slice(breaks[index], breaks[index + 1]) - const start = startPositions.pop() - jumps.unshift([start, start + slice.length - 1]) - micromark_util_chunked_splice(events, start, 2, slice) - } - index = -1 - while (++index < jumps.length) { - gaps[adjust + jumps[index][0]] = adjust + jumps[index][1] - adjust += jumps[index][1] - jumps[index][0] - 1 - } - return gaps -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/content.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').Resolver} Resolver - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').Token} Token - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - - -/** - * No name because it must not be turned off. - * @type {Construct} - */ -const content_content = { - tokenize: tokenizeContent, - resolve: resolveContent -} - -/** @type {Construct} */ -const continuationConstruct = { - tokenize: tokenizeContinuation, - partial: true -} - -/** - * Content is transparent: it’s parsed right now. That way, definitions are also - * parsed right now: before text in paragraphs (specifically, media) are parsed. - * - * @type {Resolver} - */ -function resolveContent(events) { - subtokenize(events) - return events -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeContent(effects, ok) { - /** @type {Token | undefined} */ - let previous - return chunkStart - - /** - * Before a content chunk. - * - * ```markdown - * > | abc - * ^ - * ``` - * - * @type {State} - */ - function chunkStart(code) { - effects.enter('content') - previous = effects.enter('chunkContent', { - contentType: 'content' - }) - return chunkInside(code) - } - - /** - * In a content chunk. - * - * ```markdown - * > | abc - * ^^^ - * ``` - * - * @type {State} - */ - function chunkInside(code) { - if (code === null) { - return contentEnd(code) - } - - // To do: in `markdown-rs`, each line is parsed on its own, and everything - // is stitched together resolving. - if (markdownLineEnding(code)) { - return effects.check( - continuationConstruct, - contentContinue, - contentEnd - )(code) - } - - // Data. - effects.consume(code) - return chunkInside - } - - /** - * - * - * @type {State} - */ - function contentEnd(code) { - effects.exit('chunkContent') - effects.exit('content') - return ok(code) - } - - /** - * - * - * @type {State} - */ - function contentContinue(code) { - effects.consume(code) - effects.exit('chunkContent') - previous.next = effects.enter('chunkContent', { - contentType: 'content', - previous - }) - previous = previous.next - return chunkInside - } -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeContinuation(effects, ok, nok) { - const self = this - return startLookahead - - /** - * - * - * @type {State} - */ - function startLookahead(code) { - effects.exit('chunkContent') - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return factorySpace(effects, prefixed, 'linePrefix') - } - - /** - * - * - * @type {State} - */ - function prefixed(code) { - if (code === null || markdownLineEnding(code)) { - return nok(code) - } - - // Always populated by defaults. - - const tail = self.events[self.events.length - 1] - if ( - !self.parser.constructs.disable.null.includes('codeIndented') && - tail && - tail[1].type === 'linePrefix' && - tail[2].sliceSerialize(tail[1], true).length >= 4 - ) { - return ok(code) - } - return effects.interrupt(self.parser.constructs.flow, nok, ok)(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/initialize/flow.js -/** - * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct - * @typedef {import('micromark-util-types').Initializer} Initializer - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - */ - - - - -/** @type {InitialConstruct} */ -const flow = { - tokenize: initializeFlow -} - -/** - * @this {TokenizeContext} - * @type {Initializer} - */ -function initializeFlow(effects) { - const self = this - const initial = effects.attempt( - // Try to parse a blank line. - blankLine, - atBlankEnding, - // Try to parse initial flow (essentially, only code). - effects.attempt( - this.parser.constructs.flowInitial, - afterConstruct, - factorySpace( - effects, - effects.attempt( - this.parser.constructs.flow, - afterConstruct, - effects.attempt(content_content, afterConstruct) - ), - 'linePrefix' - ) - ) - ) - return initial - - /** @type {State} */ - function atBlankEnding(code) { - if (code === null) { - effects.consume(code) - return - } - effects.enter('lineEndingBlank') - effects.consume(code) - effects.exit('lineEndingBlank') - self.currentConstruct = undefined - return initial - } - - /** @type {State} */ - function afterConstruct(code) { - if (code === null) { - effects.consume(code) - return - } - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - self.currentConstruct = undefined - return initial - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/initialize/text.js -/** - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct - * @typedef {import('micromark-util-types').Initializer} Initializer - * @typedef {import('micromark-util-types').Resolver} Resolver - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - */ - -const resolver = { - resolveAll: createResolver() -} -const string = initializeFactory('string') -const text_text = initializeFactory('text') - -/** - * @param {'string' | 'text'} field - * @returns {InitialConstruct} - */ -function initializeFactory(field) { - return { - tokenize: initializeText, - resolveAll: createResolver( - field === 'text' ? resolveAllLineSuffixes : undefined - ) - } - - /** - * @this {TokenizeContext} - * @type {Initializer} - */ - function initializeText(effects) { - const self = this - const constructs = this.parser.constructs[field] - const text = effects.attempt(constructs, start, notText) - return start - - /** @type {State} */ - function start(code) { - return atBreak(code) ? text(code) : notText(code) - } - - /** @type {State} */ - function notText(code) { - if (code === null) { - effects.consume(code) - return - } - effects.enter('data') - effects.consume(code) - return data - } - - /** @type {State} */ - function data(code) { - if (atBreak(code)) { - effects.exit('data') - return text(code) - } - - // Data. - effects.consume(code) - return data - } - - /** - * @param {Code} code - * @returns {boolean} - */ - function atBreak(code) { - if (code === null) { - return true - } - const list = constructs[code] - let index = -1 - if (list) { - // Always populated by defaults. - - while (++index < list.length) { - const item = list[index] - if (!item.previous || item.previous.call(self, self.previous)) { - return true - } - } - } - return false - } - } -} - -/** - * @param {Resolver | undefined} [extraResolver] - * @returns {Resolver} - */ -function createResolver(extraResolver) { - return resolveAllText - - /** @type {Resolver} */ - function resolveAllText(events, context) { - let index = -1 - /** @type {number | undefined} */ - let enter - - // A rather boring computation (to merge adjacent `data` events) which - // improves mm performance by 29%. - while (++index <= events.length) { - if (enter === undefined) { - if (events[index] && events[index][1].type === 'data') { - enter = index - index++ - } - } else if (!events[index] || events[index][1].type !== 'data') { - // Don’t do anything if there is one data token. - if (index !== enter + 2) { - events[enter][1].end = events[index - 1][1].end - events.splice(enter + 2, index - enter - 2) - index = enter + 2 - } - enter = undefined - } - } - return extraResolver ? extraResolver(events, context) : events - } -} - -/** - * A rather ugly set of instructions which again looks at chunks in the input - * stream. - * The reason to do this here is that it is *much* faster to parse in reverse. - * And that we can’t hook into `null` to split the line suffix before an EOF. - * To do: figure out if we can make this into a clean utility, or even in core. - * As it will be useful for GFMs literal autolink extension (and maybe even - * tables?) - * - * @type {Resolver} - */ -function resolveAllLineSuffixes(events, context) { - let eventIndex = 0 // Skip first. - - while (++eventIndex <= events.length) { - if ( - (eventIndex === events.length || - events[eventIndex][1].type === 'lineEnding') && - events[eventIndex - 1][1].type === 'data' - ) { - const data = events[eventIndex - 1][1] - const chunks = context.sliceStream(data) - let index = chunks.length - let bufferIndex = -1 - let size = 0 - /** @type {boolean | undefined} */ - let tabs - while (index--) { - const chunk = chunks[index] - if (typeof chunk === 'string') { - bufferIndex = chunk.length - while (chunk.charCodeAt(bufferIndex - 1) === 32) { - size++ - bufferIndex-- - } - if (bufferIndex) break - bufferIndex = -1 - } - // Number - else if (chunk === -2) { - tabs = true - size++ - } else if (chunk === -1) { - // Empty - } else { - // Replacement character, exit. - index++ - break - } - } - if (size) { - const token = { - type: - eventIndex === events.length || tabs || size < 2 - ? 'lineSuffix' - : 'hardBreakTrailing', - start: { - line: data.end.line, - column: data.end.column - size, - offset: data.end.offset - size, - _index: data.start._index + index, - _bufferIndex: index - ? bufferIndex - : data.start._bufferIndex + bufferIndex - }, - end: Object.assign({}, data.end) - } - data.end = Object.assign({}, token.start) - if (data.start.offset === data.end.offset) { - Object.assign(data, token) - } else { - events.splice( - eventIndex, - 0, - ['enter', token, context], - ['exit', token, context] - ) - eventIndex += 2 - } - } - eventIndex++ - } - } - return events -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-resolve-all/index.js -/** - * @typedef {import('micromark-util-types').Event} Event - * @typedef {import('micromark-util-types').Resolver} Resolver - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - */ - -/** - * Call all `resolveAll`s. - * - * @param {Array<{resolveAll?: Resolver | undefined}>} constructs - * List of constructs, optionally with `resolveAll`s. - * @param {Array} events - * List of events. - * @param {TokenizeContext} context - * Context used by `tokenize`. - * @returns {Array} - * Changed events. - */ -function resolveAll(constructs, events, context) { - /** @type {Array} */ - const called = [] - let index = -1 - - while (++index < constructs.length) { - const resolve = constructs[index].resolveAll - - if (resolve && !called.includes(resolve)) { - events = resolve(events, context) - called.push(resolve) - } - } - - return events -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/create-tokenizer.js -/** - * @typedef {import('micromark-util-types').Chunk} Chunk - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').ConstructRecord} ConstructRecord - * @typedef {import('micromark-util-types').Effects} Effects - * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct - * @typedef {import('micromark-util-types').ParseContext} ParseContext - * @typedef {import('micromark-util-types').Point} Point - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').Token} Token - * @typedef {import('micromark-util-types').TokenType} TokenType - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - */ - -/** - * @callback Restore - * @returns {void} - * - * @typedef Info - * @property {Restore} restore - * @property {number} from - * - * @callback ReturnHandle - * Handle a successful run. - * @param {Construct} construct - * @param {Info} info - * @returns {void} - */ - - - - -/** - * Create a tokenizer. - * Tokenizers deal with one type of data (e.g., containers, flow, text). - * The parser is the object dealing with it all. - * `initialize` works like other constructs, except that only its `tokenize` - * function is used, in which case it doesn’t receive an `ok` or `nok`. - * `from` can be given to set the point before the first character, although - * when further lines are indented, they must be set with `defineSkip`. - * - * @param {ParseContext} parser - * @param {InitialConstruct} initialize - * @param {Omit | undefined} [from] - * @returns {TokenizeContext} - */ -function createTokenizer(parser, initialize, from) { - /** @type {Point} */ - let point = Object.assign( - from - ? Object.assign({}, from) - : { - line: 1, - column: 1, - offset: 0 - }, - { - _index: 0, - _bufferIndex: -1 - } - ) - /** @type {Record} */ - const columnStart = {} - /** @type {Array} */ - const resolveAllConstructs = [] - /** @type {Array} */ - let chunks = [] - /** @type {Array} */ - let stack = [] - /** @type {boolean | undefined} */ - let consumed = true - - /** - * Tools used for tokenizing. - * - * @type {Effects} - */ - const effects = { - consume, - enter, - exit, - attempt: constructFactory(onsuccessfulconstruct), - check: constructFactory(onsuccessfulcheck), - interrupt: constructFactory(onsuccessfulcheck, { - interrupt: true - }) - } - - /** - * State and tools for resolving and serializing. - * - * @type {TokenizeContext} - */ - const context = { - previous: null, - code: null, - containerState: {}, - events: [], - parser, - sliceStream, - sliceSerialize, - now, - defineSkip, - write - } - - /** - * The state function. - * - * @type {State | void} - */ - let state = initialize.tokenize.call(context, effects) - - /** - * Track which character we expect to be consumed, to catch bugs. - * - * @type {Code} - */ - let expectedCode - if (initialize.resolveAll) { - resolveAllConstructs.push(initialize) - } - return context - - /** @type {TokenizeContext['write']} */ - function write(slice) { - chunks = push(chunks, slice) - main() - - // Exit if we’re not done, resolve might change stuff. - if (chunks[chunks.length - 1] !== null) { - return [] - } - addResult(initialize, 0) - - // Otherwise, resolve, and exit. - context.events = resolveAll(resolveAllConstructs, context.events, context) - return context.events - } - - // - // Tools. - // - - /** @type {TokenizeContext['sliceSerialize']} */ - function sliceSerialize(token, expandTabs) { - return serializeChunks(sliceStream(token), expandTabs) - } - - /** @type {TokenizeContext['sliceStream']} */ - function sliceStream(token) { - return sliceChunks(chunks, token) - } - - /** @type {TokenizeContext['now']} */ - function now() { - // This is a hot path, so we clone manually instead of `Object.assign({}, point)` - const {line, column, offset, _index, _bufferIndex} = point - return { - line, - column, - offset, - _index, - _bufferIndex - } - } - - /** @type {TokenizeContext['defineSkip']} */ - function defineSkip(value) { - columnStart[value.line] = value.column - accountForPotentialSkip() - } - - // - // State management. - // - - /** - * Main loop (note that `_index` and `_bufferIndex` in `point` are modified by - * `consume`). - * Here is where we walk through the chunks, which either include strings of - * several characters, or numerical character codes. - * The reason to do this in a loop instead of a call is so the stack can - * drain. - * - * @returns {void} - */ - function main() { - /** @type {number} */ - let chunkIndex - while (point._index < chunks.length) { - const chunk = chunks[point._index] - - // If we’re in a buffer chunk, loop through it. - if (typeof chunk === 'string') { - chunkIndex = point._index - if (point._bufferIndex < 0) { - point._bufferIndex = 0 - } - while ( - point._index === chunkIndex && - point._bufferIndex < chunk.length - ) { - go(chunk.charCodeAt(point._bufferIndex)) - } - } else { - go(chunk) - } - } - } - - /** - * Deal with one code. - * - * @param {Code} code - * @returns {void} - */ - function go(code) { - consumed = undefined - expectedCode = code - state = state(code) - } - - /** @type {Effects['consume']} */ - function consume(code) { - if (markdownLineEnding(code)) { - point.line++ - point.column = 1 - point.offset += code === -3 ? 2 : 1 - accountForPotentialSkip() - } else if (code !== -1) { - point.column++ - point.offset++ - } - - // Not in a string chunk. - if (point._bufferIndex < 0) { - point._index++ - } else { - point._bufferIndex++ - - // At end of string chunk. - // @ts-expect-error Points w/ non-negative `_bufferIndex` reference - // strings. - if (point._bufferIndex === chunks[point._index].length) { - point._bufferIndex = -1 - point._index++ - } - } - - // Expose the previous character. - context.previous = code - - // Mark as consumed. - consumed = true - } - - /** @type {Effects['enter']} */ - function enter(type, fields) { - /** @type {Token} */ - // @ts-expect-error Patch instead of assign required fields to help GC. - const token = fields || {} - token.type = type - token.start = now() - context.events.push(['enter', token, context]) - stack.push(token) - return token - } - - /** @type {Effects['exit']} */ - function exit(type) { - const token = stack.pop() - token.end = now() - context.events.push(['exit', token, context]) - return token - } - - /** - * Use results. - * - * @type {ReturnHandle} - */ - function onsuccessfulconstruct(construct, info) { - addResult(construct, info.from) - } - - /** - * Discard results. - * - * @type {ReturnHandle} - */ - function onsuccessfulcheck(_, info) { - info.restore() - } - - /** - * Factory to attempt/check/interrupt. - * - * @param {ReturnHandle} onreturn - * @param {{interrupt?: boolean | undefined} | undefined} [fields] - */ - function constructFactory(onreturn, fields) { - return hook - - /** - * Handle either an object mapping codes to constructs, a list of - * constructs, or a single construct. - * - * @param {Array | Construct | ConstructRecord} constructs - * @param {State} returnState - * @param {State | undefined} [bogusState] - * @returns {State} - */ - function hook(constructs, returnState, bogusState) { - /** @type {Array} */ - let listOfConstructs - /** @type {number} */ - let constructIndex - /** @type {Construct} */ - let currentConstruct - /** @type {Info} */ - let info - return Array.isArray(constructs) /* c8 ignore next 1 */ - ? handleListOfConstructs(constructs) - : 'tokenize' in constructs - ? // @ts-expect-error Looks like a construct. - handleListOfConstructs([constructs]) - : handleMapOfConstructs(constructs) - - /** - * Handle a list of construct. - * - * @param {ConstructRecord} map - * @returns {State} - */ - function handleMapOfConstructs(map) { - return start - - /** @type {State} */ - function start(code) { - const def = code !== null && map[code] - const all = code !== null && map.null - const list = [ - // To do: add more extension tests. - /* c8 ignore next 2 */ - ...(Array.isArray(def) ? def : def ? [def] : []), - ...(Array.isArray(all) ? all : all ? [all] : []) - ] - return handleListOfConstructs(list)(code) - } - } - - /** - * Handle a list of construct. - * - * @param {Array} list - * @returns {State} - */ - function handleListOfConstructs(list) { - listOfConstructs = list - constructIndex = 0 - if (list.length === 0) { - return bogusState - } - return handleConstruct(list[constructIndex]) - } - - /** - * Handle a single construct. - * - * @param {Construct} construct - * @returns {State} - */ - function handleConstruct(construct) { - return start - - /** @type {State} */ - function start(code) { - // To do: not needed to store if there is no bogus state, probably? - // Currently doesn’t work because `inspect` in document does a check - // w/o a bogus, which doesn’t make sense. But it does seem to help perf - // by not storing. - info = store() - currentConstruct = construct - if (!construct.partial) { - context.currentConstruct = construct - } - - // Always populated by defaults. - - if ( - construct.name && - context.parser.constructs.disable.null.includes(construct.name) - ) { - return nok(code) - } - return construct.tokenize.call( - // If we do have fields, create an object w/ `context` as its - // prototype. - // This allows a “live binding”, which is needed for `interrupt`. - fields ? Object.assign(Object.create(context), fields) : context, - effects, - ok, - nok - )(code) - } - } - - /** @type {State} */ - function ok(code) { - consumed = true - onreturn(currentConstruct, info) - return returnState - } - - /** @type {State} */ - function nok(code) { - consumed = true - info.restore() - if (++constructIndex < listOfConstructs.length) { - return handleConstruct(listOfConstructs[constructIndex]) - } - return bogusState - } - } - } - - /** - * @param {Construct} construct - * @param {number} from - * @returns {void} - */ - function addResult(construct, from) { - if (construct.resolveAll && !resolveAllConstructs.includes(construct)) { - resolveAllConstructs.push(construct) - } - if (construct.resolve) { - splice( - context.events, - from, - context.events.length - from, - construct.resolve(context.events.slice(from), context) - ) - } - if (construct.resolveTo) { - context.events = construct.resolveTo(context.events, context) - } - } - - /** - * Store state. - * - * @returns {Info} - */ - function store() { - const startPoint = now() - const startPrevious = context.previous - const startCurrentConstruct = context.currentConstruct - const startEventsIndex = context.events.length - const startStack = Array.from(stack) - return { - restore, - from: startEventsIndex - } - - /** - * Restore state. - * - * @returns {void} - */ - function restore() { - point = startPoint - context.previous = startPrevious - context.currentConstruct = startCurrentConstruct - context.events.length = startEventsIndex - stack = startStack - accountForPotentialSkip() - } - } - - /** - * Move the current point a bit forward in the line when it’s on a column - * skip. - * - * @returns {void} - */ - function accountForPotentialSkip() { - if (point.line in columnStart && point.column < 2) { - point.column = columnStart[point.line] - point.offset += columnStart[point.line] - 1 - } - } -} - -/** - * Get the chunks from a slice of chunks in the range of a token. - * - * @param {Array} chunks - * @param {Pick} token - * @returns {Array} - */ -function sliceChunks(chunks, token) { - const startIndex = token.start._index - const startBufferIndex = token.start._bufferIndex - const endIndex = token.end._index - const endBufferIndex = token.end._bufferIndex - /** @type {Array} */ - let view - if (startIndex === endIndex) { - // @ts-expect-error `_bufferIndex` is used on string chunks. - view = [chunks[startIndex].slice(startBufferIndex, endBufferIndex)] - } else { - view = chunks.slice(startIndex, endIndex) - if (startBufferIndex > -1) { - const head = view[0] - if (typeof head === 'string') { - view[0] = head.slice(startBufferIndex) - } else { - view.shift() - } - } - if (endBufferIndex > 0) { - // @ts-expect-error `_bufferIndex` is used on string chunks. - view.push(chunks[endIndex].slice(0, endBufferIndex)) - } - } - return view -} - -/** - * Get the string value of a slice of chunks. - * - * @param {Array} chunks - * @param {boolean | undefined} [expandTabs=false] - * @returns {string} - */ -function serializeChunks(chunks, expandTabs) { - let index = -1 - /** @type {Array} */ - const result = [] - /** @type {boolean | undefined} */ - let atTab - while (++index < chunks.length) { - const chunk = chunks[index] - /** @type {string} */ - let value - if (typeof chunk === 'string') { - value = chunk - } else - switch (chunk) { - case -5: { - value = '\r' - break - } - case -4: { - value = '\n' - break - } - case -3: { - value = '\r' + '\n' - break - } - case -2: { - value = expandTabs ? ' ' : '\t' - break - } - case -1: { - if (!expandTabs && atTab) continue - value = ' ' - break - } - default: { - // Currently only replacement character. - value = String.fromCharCode(chunk) - } - } - atTab = chunk === -2 - result.push(value) - } - return result.join('') -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/thematic-break.js -/** - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const thematicBreak = { - name: 'thematicBreak', - tokenize: tokenizeThematicBreak -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeThematicBreak(effects, ok, nok) { - let size = 0 - /** @type {NonNullable} */ - let marker - return start - - /** - * Start of thematic break. - * - * ```markdown - * > | *** - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter('thematicBreak') - // To do: parse indent like `markdown-rs`. - return before(code) - } - - /** - * After optional whitespace, at marker. - * - * ```markdown - * > | *** - * ^ - * ``` - * - * @type {State} - */ - function before(code) { - marker = code - return atBreak(code) - } - - /** - * After something, before something else. - * - * ```markdown - * > | *** - * ^ - * ``` - * - * @type {State} - */ - function atBreak(code) { - if (code === marker) { - effects.enter('thematicBreakSequence') - return sequence(code) - } - if (size >= 3 && (code === null || markdownLineEnding(code))) { - effects.exit('thematicBreak') - return ok(code) - } - return nok(code) - } - - /** - * In sequence. - * - * ```markdown - * > | *** - * ^ - * ``` - * - * @type {State} - */ - function sequence(code) { - if (code === marker) { - effects.consume(code) - size++ - return sequence - } - effects.exit('thematicBreakSequence') - return markdownSpace(code) - ? factorySpace(effects, atBreak, 'whitespace')(code) - : atBreak(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/list.js -/** - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').ContainerState} ContainerState - * @typedef {import('micromark-util-types').Exiter} Exiter - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - - - - -/** @type {Construct} */ -const list = { - name: 'list', - tokenize: tokenizeListStart, - continuation: { - tokenize: tokenizeListContinuation - }, - exit: tokenizeListEnd -} - -/** @type {Construct} */ -const listItemPrefixWhitespaceConstruct = { - tokenize: tokenizeListItemPrefixWhitespace, - partial: true -} - -/** @type {Construct} */ -const indentConstruct = { - tokenize: tokenizeIndent, - partial: true -} - -// To do: `markdown-rs` parses list items on their own and later stitches them -// together. - -/** - * @type {Tokenizer} - * @this {TokenizeContext} - */ -function tokenizeListStart(effects, ok, nok) { - const self = this - const tail = self.events[self.events.length - 1] - let initialSize = - tail && tail[1].type === 'linePrefix' - ? tail[2].sliceSerialize(tail[1], true).length - : 0 - let size = 0 - return start - - /** @type {State} */ - function start(code) { - const kind = - self.containerState.type || - (code === 42 || code === 43 || code === 45 - ? 'listUnordered' - : 'listOrdered') - if ( - kind === 'listUnordered' - ? !self.containerState.marker || code === self.containerState.marker - : asciiDigit(code) - ) { - if (!self.containerState.type) { - self.containerState.type = kind - effects.enter(kind, { - _container: true - }) - } - if (kind === 'listUnordered') { - effects.enter('listItemPrefix') - return code === 42 || code === 45 - ? effects.check(thematicBreak, nok, atMarker)(code) - : atMarker(code) - } - if (!self.interrupt || code === 49) { - effects.enter('listItemPrefix') - effects.enter('listItemValue') - return inside(code) - } - } - return nok(code) - } - - /** @type {State} */ - function inside(code) { - if (asciiDigit(code) && ++size < 10) { - effects.consume(code) - return inside - } - if ( - (!self.interrupt || size < 2) && - (self.containerState.marker - ? code === self.containerState.marker - : code === 41 || code === 46) - ) { - effects.exit('listItemValue') - return atMarker(code) - } - return nok(code) - } - - /** - * @type {State} - **/ - function atMarker(code) { - effects.enter('listItemMarker') - effects.consume(code) - effects.exit('listItemMarker') - self.containerState.marker = self.containerState.marker || code - return effects.check( - blankLine, - // Can’t be empty when interrupting. - self.interrupt ? nok : onBlank, - effects.attempt( - listItemPrefixWhitespaceConstruct, - endOfPrefix, - otherPrefix - ) - ) - } - - /** @type {State} */ - function onBlank(code) { - self.containerState.initialBlankLine = true - initialSize++ - return endOfPrefix(code) - } - - /** @type {State} */ - function otherPrefix(code) { - if (markdownSpace(code)) { - effects.enter('listItemPrefixWhitespace') - effects.consume(code) - effects.exit('listItemPrefixWhitespace') - return endOfPrefix - } - return nok(code) - } - - /** @type {State} */ - function endOfPrefix(code) { - self.containerState.size = - initialSize + - self.sliceSerialize(effects.exit('listItemPrefix'), true).length - return ok(code) - } -} - -/** - * @type {Tokenizer} - * @this {TokenizeContext} - */ -function tokenizeListContinuation(effects, ok, nok) { - const self = this - self.containerState._closeFlow = undefined - return effects.check(blankLine, onBlank, notBlank) - - /** @type {State} */ - function onBlank(code) { - self.containerState.furtherBlankLines = - self.containerState.furtherBlankLines || - self.containerState.initialBlankLine - - // We have a blank line. - // Still, try to consume at most the items size. - return factorySpace( - effects, - ok, - 'listItemIndent', - self.containerState.size + 1 - )(code) - } - - /** @type {State} */ - function notBlank(code) { - if (self.containerState.furtherBlankLines || !markdownSpace(code)) { - self.containerState.furtherBlankLines = undefined - self.containerState.initialBlankLine = undefined - return notInCurrentItem(code) - } - self.containerState.furtherBlankLines = undefined - self.containerState.initialBlankLine = undefined - return effects.attempt(indentConstruct, ok, notInCurrentItem)(code) - } - - /** @type {State} */ - function notInCurrentItem(code) { - // While we do continue, we signal that the flow should be closed. - self.containerState._closeFlow = true - // As we’re closing flow, we’re no longer interrupting. - self.interrupt = undefined - // Always populated by defaults. - - return factorySpace( - effects, - effects.attempt(list, ok, nok), - 'linePrefix', - self.parser.constructs.disable.null.includes('codeIndented') - ? undefined - : 4 - )(code) - } -} - -/** - * @type {Tokenizer} - * @this {TokenizeContext} - */ -function tokenizeIndent(effects, ok, nok) { - const self = this - return factorySpace( - effects, - afterPrefix, - 'listItemIndent', - self.containerState.size + 1 - ) - - /** @type {State} */ - function afterPrefix(code) { - const tail = self.events[self.events.length - 1] - return tail && - tail[1].type === 'listItemIndent' && - tail[2].sliceSerialize(tail[1], true).length === self.containerState.size - ? ok(code) - : nok(code) - } -} - -/** - * @type {Exiter} - * @this {TokenizeContext} - */ -function tokenizeListEnd(effects) { - effects.exit(this.containerState.type) -} - -/** - * @type {Tokenizer} - * @this {TokenizeContext} - */ -function tokenizeListItemPrefixWhitespace(effects, ok, nok) { - const self = this - - // Always populated by defaults. - - return factorySpace( - effects, - afterPrefix, - 'listItemPrefixWhitespace', - self.parser.constructs.disable.null.includes('codeIndented') - ? undefined - : 4 + 1 - ) - - /** @type {State} */ - function afterPrefix(code) { - const tail = self.events[self.events.length - 1] - return !markdownSpace(code) && - tail && - tail[1].type === 'listItemPrefixWhitespace' - ? ok(code) - : nok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/block-quote.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').Exiter} Exiter - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const blockQuote = { - name: 'blockQuote', - tokenize: tokenizeBlockQuoteStart, - continuation: { - tokenize: tokenizeBlockQuoteContinuation - }, - exit -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeBlockQuoteStart(effects, ok, nok) { - const self = this - return start - - /** - * Start of block quote. - * - * ```markdown - * > | > a - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - if (code === 62) { - const state = self.containerState - if (!state.open) { - effects.enter('blockQuote', { - _container: true - }) - state.open = true - } - effects.enter('blockQuotePrefix') - effects.enter('blockQuoteMarker') - effects.consume(code) - effects.exit('blockQuoteMarker') - return after - } - return nok(code) - } - - /** - * After `>`, before optional whitespace. - * - * ```markdown - * > | > a - * ^ - * ``` - * - * @type {State} - */ - function after(code) { - if (markdownSpace(code)) { - effects.enter('blockQuotePrefixWhitespace') - effects.consume(code) - effects.exit('blockQuotePrefixWhitespace') - effects.exit('blockQuotePrefix') - return ok - } - effects.exit('blockQuotePrefix') - return ok(code) - } -} - -/** - * Start of block quote continuation. - * - * ```markdown - * | > a - * > | > b - * ^ - * ``` - * - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeBlockQuoteContinuation(effects, ok, nok) { - const self = this - return contStart - - /** - * Start of block quote continuation. - * - * Also used to parse the first block quote opening. - * - * ```markdown - * | > a - * > | > b - * ^ - * ``` - * - * @type {State} - */ - function contStart(code) { - if (markdownSpace(code)) { - // Always populated by defaults. - - return factorySpace( - effects, - contBefore, - 'linePrefix', - self.parser.constructs.disable.null.includes('codeIndented') - ? undefined - : 4 - )(code) - } - return contBefore(code) - } - - /** - * At `>`, after optional whitespace. - * - * Also used to parse the first block quote opening. - * - * ```markdown - * | > a - * > | > b - * ^ - * ``` - * - * @type {State} - */ - function contBefore(code) { - return effects.attempt(blockQuote, ok, nok)(code) - } -} - -/** @type {Exiter} */ -function exit(effects) { - effects.exit('blockQuote') -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-destination/index.js -/** - * @typedef {import('micromark-util-types').Effects} Effects - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenType} TokenType - */ - - -/** - * Parse destinations. - * - * ###### Examples - * - * ```markdown - * - * b> - * - * - * a - * a\)b - * a(b)c - * a(b) - * ``` - * - * @param {Effects} effects - * Context. - * @param {State} ok - * State switched to when successful. - * @param {State} nok - * State switched to when unsuccessful. - * @param {TokenType} type - * Type for whole (`` or `b`). - * @param {TokenType} literalType - * Type when enclosed (``). - * @param {TokenType} literalMarkerType - * Type for enclosing (`<` and `>`). - * @param {TokenType} rawType - * Type when not enclosed (`b`). - * @param {TokenType} stringType - * Type for the value (`a` or `b`). - * @param {number | undefined} [max=Infinity] - * Depth of nested parens (inclusive). - * @returns {State} - * Start state. - */ // eslint-disable-next-line max-params -function factoryDestination( - effects, - ok, - nok, - type, - literalType, - literalMarkerType, - rawType, - stringType, - max -) { - const limit = max || Number.POSITIVE_INFINITY - let balance = 0 - return start - - /** - * Start of destination. - * - * ```markdown - * > | - * ^ - * > | aa - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - if (code === 60) { - effects.enter(type) - effects.enter(literalType) - effects.enter(literalMarkerType) - effects.consume(code) - effects.exit(literalMarkerType) - return enclosedBefore - } - - // ASCII control, space, closing paren. - if (code === null || code === 32 || code === 41 || asciiControl(code)) { - return nok(code) - } - effects.enter(type) - effects.enter(rawType) - effects.enter(stringType) - effects.enter('chunkString', { - contentType: 'string' - }) - return raw(code) - } - - /** - * After `<`, at an enclosed destination. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function enclosedBefore(code) { - if (code === 62) { - effects.enter(literalMarkerType) - effects.consume(code) - effects.exit(literalMarkerType) - effects.exit(literalType) - effects.exit(type) - return ok - } - effects.enter(stringType) - effects.enter('chunkString', { - contentType: 'string' - }) - return enclosed(code) - } - - /** - * In enclosed destination. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function enclosed(code) { - if (code === 62) { - effects.exit('chunkString') - effects.exit(stringType) - return enclosedBefore(code) - } - if (code === null || code === 60 || markdownLineEnding(code)) { - return nok(code) - } - effects.consume(code) - return code === 92 ? enclosedEscape : enclosed - } - - /** - * After `\`, at a special character. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function enclosedEscape(code) { - if (code === 60 || code === 62 || code === 92) { - effects.consume(code) - return enclosed - } - return enclosed(code) - } - - /** - * In raw destination. - * - * ```markdown - * > | aa - * ^ - * ``` - * - * @type {State} - */ - function raw(code) { - if ( - !balance && - (code === null || code === 41 || markdownLineEndingOrSpace(code)) - ) { - effects.exit('chunkString') - effects.exit(stringType) - effects.exit(rawType) - effects.exit(type) - return ok(code) - } - if (balance < limit && code === 40) { - effects.consume(code) - balance++ - return raw - } - if (code === 41) { - effects.consume(code) - balance-- - return raw - } - - // ASCII control (but *not* `\0`) and space and `(`. - // Note: in `markdown-rs`, `\0` exists in codes, in `micromark-js` it - // doesn’t. - if (code === null || code === 32 || code === 40 || asciiControl(code)) { - return nok(code) - } - effects.consume(code) - return code === 92 ? rawEscape : raw - } - - /** - * After `\`, at special character. - * - * ```markdown - * > | a\*a - * ^ - * ``` - * - * @type {State} - */ - function rawEscape(code) { - if (code === 40 || code === 41 || code === 92) { - effects.consume(code) - return raw - } - return raw(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-label/index.js -/** - * @typedef {import('micromark-util-types').Effects} Effects - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').TokenType} TokenType - */ - - -/** - * Parse labels. - * - * > 👉 **Note**: labels in markdown are capped at 999 characters in the string. - * - * ###### Examples - * - * ```markdown - * [a] - * [a - * b] - * [a\]b] - * ``` - * - * @this {TokenizeContext} - * Tokenize context. - * @param {Effects} effects - * Context. - * @param {State} ok - * State switched to when successful. - * @param {State} nok - * State switched to when unsuccessful. - * @param {TokenType} type - * Type of the whole label (`[a]`). - * @param {TokenType} markerType - * Type for the markers (`[` and `]`). - * @param {TokenType} stringType - * Type for the identifier (`a`). - * @returns {State} - * Start state. - */ // eslint-disable-next-line max-params -function factoryLabel(effects, ok, nok, type, markerType, stringType) { - const self = this - let size = 0 - /** @type {boolean} */ - let seen - return start - - /** - * Start of label. - * - * ```markdown - * > | [a] - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter(type) - effects.enter(markerType) - effects.consume(code) - effects.exit(markerType) - effects.enter(stringType) - return atBreak - } - - /** - * In label, at something, before something else. - * - * ```markdown - * > | [a] - * ^ - * ``` - * - * @type {State} - */ - function atBreak(code) { - if ( - size > 999 || - code === null || - code === 91 || - (code === 93 && !seen) || - // To do: remove in the future once we’ve switched from - // `micromark-extension-footnote` to `micromark-extension-gfm-footnote`, - // which doesn’t need this. - // Hidden footnotes hook. - /* c8 ignore next 3 */ - (code === 94 && - !size && - '_hiddenFootnoteSupport' in self.parser.constructs) - ) { - return nok(code) - } - if (code === 93) { - effects.exit(stringType) - effects.enter(markerType) - effects.consume(code) - effects.exit(markerType) - effects.exit(type) - return ok - } - - // To do: indent? Link chunks and EOLs together? - if (markdownLineEnding(code)) { - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return atBreak - } - effects.enter('chunkString', { - contentType: 'string' - }) - return labelInside(code) - } - - /** - * In label, in text. - * - * ```markdown - * > | [a] - * ^ - * ``` - * - * @type {State} - */ - function labelInside(code) { - if ( - code === null || - code === 91 || - code === 93 || - markdownLineEnding(code) || - size++ > 999 - ) { - effects.exit('chunkString') - return atBreak(code) - } - effects.consume(code) - if (!seen) seen = !markdownSpace(code) - return code === 92 ? labelEscape : labelInside - } - - /** - * After `\`, at a special character. - * - * ```markdown - * > | [a\*a] - * ^ - * ``` - * - * @type {State} - */ - function labelEscape(code) { - if (code === 91 || code === 92 || code === 93) { - effects.consume(code) - size++ - return labelInside - } - return labelInside(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-title/index.js -/** - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Effects} Effects - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenType} TokenType - */ - - - -/** - * Parse titles. - * - * ###### Examples - * - * ```markdown - * "a" - * 'b' - * (c) - * "a - * b" - * 'a - * b' - * (a\)b) - * ``` - * - * @param {Effects} effects - * Context. - * @param {State} ok - * State switched to when successful. - * @param {State} nok - * State switched to when unsuccessful. - * @param {TokenType} type - * Type of the whole title (`"a"`, `'b'`, `(c)`). - * @param {TokenType} markerType - * Type for the markers (`"`, `'`, `(`, and `)`). - * @param {TokenType} stringType - * Type for the value (`a`). - * @returns {State} - * Start state. - */ // eslint-disable-next-line max-params -function factoryTitle(effects, ok, nok, type, markerType, stringType) { - /** @type {NonNullable} */ - let marker - return start - - /** - * Start of title. - * - * ```markdown - * > | "a" - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - if (code === 34 || code === 39 || code === 40) { - effects.enter(type) - effects.enter(markerType) - effects.consume(code) - effects.exit(markerType) - marker = code === 40 ? 41 : code - return begin - } - return nok(code) - } - - /** - * After opening marker. - * - * This is also used at the closing marker. - * - * ```markdown - * > | "a" - * ^ - * ``` - * - * @type {State} - */ - function begin(code) { - if (code === marker) { - effects.enter(markerType) - effects.consume(code) - effects.exit(markerType) - effects.exit(type) - return ok - } - effects.enter(stringType) - return atBreak(code) - } - - /** - * At something, before something else. - * - * ```markdown - * > | "a" - * ^ - * ``` - * - * @type {State} - */ - function atBreak(code) { - if (code === marker) { - effects.exit(stringType) - return begin(marker) - } - if (code === null) { - return nok(code) - } - - // Note: blank lines can’t exist in content. - if (markdownLineEnding(code)) { - // To do: use `space_or_tab_eol_with_options`, connect. - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return factorySpace(effects, atBreak, 'linePrefix') - } - effects.enter('chunkString', { - contentType: 'string' - }) - return inside(code) - } - - /** - * - * - * @type {State} - */ - function inside(code) { - if (code === marker || code === null || markdownLineEnding(code)) { - effects.exit('chunkString') - return atBreak(code) - } - effects.consume(code) - return code === 92 ? escape : inside - } - - /** - * After `\`, at a special character. - * - * ```markdown - * > | "a\*b" - * ^ - * ``` - * - * @type {State} - */ - function escape(code) { - if (code === marker || code === 92) { - effects.consume(code) - return inside - } - return inside(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-whitespace/index.js -/** - * @typedef {import('micromark-util-types').Effects} Effects - * @typedef {import('micromark-util-types').State} State - */ - - - -/** - * Parse spaces and tabs. - * - * There is no `nok` parameter: - * - * * line endings or spaces in markdown are often optional, in which case this - * factory can be used and `ok` will be switched to whether spaces were found - * or not - * * one line ending or space can be detected with - * `markdownLineEndingOrSpace(code)` right before using `factoryWhitespace` - * - * @param {Effects} effects - * Context. - * @param {State} ok - * State switched to when successful. - * @returns - * Start state. - */ -function factoryWhitespace(effects, ok) { - /** @type {boolean} */ - let seen - return start - - /** @type {State} */ - function start(code) { - if (markdownLineEnding(code)) { - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - seen = true - return start - } - if (markdownSpace(code)) { - return factorySpace( - effects, - start, - seen ? 'linePrefix' : 'lineSuffix' - )(code) - } - return ok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-normalize-identifier/index.js -/** - * Normalize an identifier (as found in references, definitions). - * - * Collapses markdown whitespace, trim, and then lower- and uppercase. - * - * Some characters are considered “uppercase”, such as U+03F4 (`ϴ`), but if their - * lowercase counterpart (U+03B8 (`θ`)) is uppercased will result in a different - * uppercase character (U+0398 (`Θ`)). - * So, to get a canonical form, we perform both lower- and uppercase. - * - * Using uppercase last makes sure keys will never interact with default - * prototypal values (such as `constructor`): nothing in the prototype of - * `Object` is uppercase. - * - * @param {string} value - * Identifier to normalize. - * @returns {string} - * Normalized identifier. - */ -function normalizeIdentifier(value) { - return ( - value - // Collapse markdown whitespace. - .replace(/[\t\n\r ]+/g, ' ') - // Trim. - .replace(/^ | $/g, '') - // Some characters are considered “uppercase”, but if their lowercase - // counterpart is uppercased will result in a different uppercase - // character. - // Hence, to get that form, we perform both lower- and uppercase. - // Upper case makes sure keys will not interact with default prototypal - // methods: no method is uppercase. - .toLowerCase() - .toUpperCase() - ) -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/definition.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - - - - - - -/** @type {Construct} */ -const definition = { - name: 'definition', - tokenize: tokenizeDefinition -} - -/** @type {Construct} */ -const titleBefore = { - tokenize: tokenizeTitleBefore, - partial: true -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeDefinition(effects, ok, nok) { - const self = this - /** @type {string} */ - let identifier - return start - - /** - * At start of a definition. - * - * ```markdown - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - // Do not interrupt paragraphs (but do follow definitions). - // To do: do `interrupt` the way `markdown-rs` does. - // To do: parse whitespace the way `markdown-rs` does. - effects.enter('definition') - return before(code) - } - - /** - * After optional whitespace, at `[`. - * - * ```markdown - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function before(code) { - // To do: parse whitespace the way `markdown-rs` does. - - return factoryLabel.call( - self, - effects, - labelAfter, - // Note: we don’t need to reset the way `markdown-rs` does. - nok, - 'definitionLabel', - 'definitionLabelMarker', - 'definitionLabelString' - )(code) - } - - /** - * After label. - * - * ```markdown - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function labelAfter(code) { - identifier = normalizeIdentifier( - self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1) - ) - if (code === 58) { - effects.enter('definitionMarker') - effects.consume(code) - effects.exit('definitionMarker') - return markerAfter - } - return nok(code) - } - - /** - * After marker. - * - * ```markdown - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function markerAfter(code) { - // Note: whitespace is optional. - return markdownLineEndingOrSpace(code) - ? factoryWhitespace(effects, destinationBefore)(code) - : destinationBefore(code) - } - - /** - * Before destination. - * - * ```markdown - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function destinationBefore(code) { - return factoryDestination( - effects, - destinationAfter, - // Note: we don’t need to reset the way `markdown-rs` does. - nok, - 'definitionDestination', - 'definitionDestinationLiteral', - 'definitionDestinationLiteralMarker', - 'definitionDestinationRaw', - 'definitionDestinationString' - )(code) - } - - /** - * After destination. - * - * ```markdown - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function destinationAfter(code) { - return effects.attempt(titleBefore, after, after)(code) - } - - /** - * After definition. - * - * ```markdown - * > | [a]: b - * ^ - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function after(code) { - return markdownSpace(code) - ? factorySpace(effects, afterWhitespace, 'whitespace')(code) - : afterWhitespace(code) - } - - /** - * After definition, after optional whitespace. - * - * ```markdown - * > | [a]: b - * ^ - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function afterWhitespace(code) { - if (code === null || markdownLineEnding(code)) { - effects.exit('definition') - - // Note: we don’t care about uniqueness. - // It’s likely that that doesn’t happen very frequently. - // It is more likely that it wastes precious time. - self.parser.defined.push(identifier) - - // To do: `markdown-rs` interrupt. - // // You’d be interrupting. - // tokenizer.interrupt = true - return ok(code) - } - return nok(code) - } -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeTitleBefore(effects, ok, nok) { - return titleBefore - - /** - * After destination, at whitespace. - * - * ```markdown - * > | [a]: b - * ^ - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function titleBefore(code) { - return markdownLineEndingOrSpace(code) - ? factoryWhitespace(effects, beforeMarker)(code) - : nok(code) - } - - /** - * At title. - * - * ```markdown - * | [a]: b - * > | "c" - * ^ - * ``` - * - * @type {State} - */ - function beforeMarker(code) { - return factoryTitle( - effects, - titleAfter, - nok, - 'definitionTitle', - 'definitionTitleMarker', - 'definitionTitleString' - )(code) - } - - /** - * After title. - * - * ```markdown - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function titleAfter(code) { - return markdownSpace(code) - ? factorySpace(effects, titleAfterOptionalWhitespace, 'whitespace')(code) - : titleAfterOptionalWhitespace(code) - } - - /** - * After title, after optional whitespace. - * - * ```markdown - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function titleAfterOptionalWhitespace(code) { - return code === null || markdownLineEnding(code) ? ok(code) : nok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/code-indented.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const codeIndented = { - name: 'codeIndented', - tokenize: tokenizeCodeIndented -} - -/** @type {Construct} */ -const furtherStart = { - tokenize: tokenizeFurtherStart, - partial: true -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeCodeIndented(effects, ok, nok) { - const self = this - return start - - /** - * Start of code (indented). - * - * > **Parsing note**: it is not needed to check if this first line is a - * > filled line (that it has a non-whitespace character), because blank lines - * > are parsed already, so we never run into that. - * - * ```markdown - * > | aaa - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - // To do: manually check if interrupting like `markdown-rs`. - - effects.enter('codeIndented') - // To do: use an improved `space_or_tab` function like `markdown-rs`, - // so that we can drop the next state. - return factorySpace(effects, afterPrefix, 'linePrefix', 4 + 1)(code) - } - - /** - * At start, after 1 or 4 spaces. - * - * ```markdown - * > | aaa - * ^ - * ``` - * - * @type {State} - */ - function afterPrefix(code) { - const tail = self.events[self.events.length - 1] - return tail && - tail[1].type === 'linePrefix' && - tail[2].sliceSerialize(tail[1], true).length >= 4 - ? atBreak(code) - : nok(code) - } - - /** - * At a break. - * - * ```markdown - * > | aaa - * ^ ^ - * ``` - * - * @type {State} - */ - function atBreak(code) { - if (code === null) { - return after(code) - } - if (markdownLineEnding(code)) { - return effects.attempt(furtherStart, atBreak, after)(code) - } - effects.enter('codeFlowValue') - return inside(code) - } - - /** - * In code content. - * - * ```markdown - * > | aaa - * ^^^^ - * ``` - * - * @type {State} - */ - function inside(code) { - if (code === null || markdownLineEnding(code)) { - effects.exit('codeFlowValue') - return atBreak(code) - } - effects.consume(code) - return inside - } - - /** @type {State} */ - function after(code) { - effects.exit('codeIndented') - // To do: allow interrupting like `markdown-rs`. - // Feel free to interrupt. - // tokenizer.interrupt = false - return ok(code) - } -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeFurtherStart(effects, ok, nok) { - const self = this - return furtherStart - - /** - * At eol, trying to parse another indent. - * - * ```markdown - * > | aaa - * ^ - * | bbb - * ``` - * - * @type {State} - */ - function furtherStart(code) { - // To do: improve `lazy` / `pierce` handling. - // If this is a lazy line, it can’t be code. - if (self.parser.lazy[self.now().line]) { - return nok(code) - } - if (markdownLineEnding(code)) { - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return furtherStart - } - - // To do: the code here in `micromark-js` is a bit different from - // `markdown-rs` because there it can attempt spaces. - // We can’t yet. - // - // To do: use an improved `space_or_tab` function like `markdown-rs`, - // so that we can drop the next state. - return factorySpace(effects, afterPrefix, 'linePrefix', 4 + 1)(code) - } - - /** - * At start, after 1 or 4 spaces. - * - * ```markdown - * > | aaa - * ^ - * ``` - * - * @type {State} - */ - function afterPrefix(code) { - const tail = self.events[self.events.length - 1] - return tail && - tail[1].type === 'linePrefix' && - tail[2].sliceSerialize(tail[1], true).length >= 4 - ? ok(code) - : markdownLineEnding(code) - ? furtherStart(code) - : nok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/heading-atx.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').Resolver} Resolver - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').Token} Token - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - - -/** @type {Construct} */ -const headingAtx = { - name: 'headingAtx', - tokenize: tokenizeHeadingAtx, - resolve: resolveHeadingAtx -} - -/** @type {Resolver} */ -function resolveHeadingAtx(events, context) { - let contentEnd = events.length - 2 - let contentStart = 3 - /** @type {Token} */ - let content - /** @type {Token} */ - let text - - // Prefix whitespace, part of the opening. - if (events[contentStart][1].type === 'whitespace') { - contentStart += 2 - } - - // Suffix whitespace, part of the closing. - if ( - contentEnd - 2 > contentStart && - events[contentEnd][1].type === 'whitespace' - ) { - contentEnd -= 2 - } - if ( - events[contentEnd][1].type === 'atxHeadingSequence' && - (contentStart === contentEnd - 1 || - (contentEnd - 4 > contentStart && - events[contentEnd - 2][1].type === 'whitespace')) - ) { - contentEnd -= contentStart + 1 === contentEnd ? 2 : 4 - } - if (contentEnd > contentStart) { - content = { - type: 'atxHeadingText', - start: events[contentStart][1].start, - end: events[contentEnd][1].end - } - text = { - type: 'chunkText', - start: events[contentStart][1].start, - end: events[contentEnd][1].end, - contentType: 'text' - } - splice(events, contentStart, contentEnd - contentStart + 1, [ - ['enter', content, context], - ['enter', text, context], - ['exit', text, context], - ['exit', content, context] - ]) - } - return events -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeHeadingAtx(effects, ok, nok) { - let size = 0 - return start - - /** - * Start of a heading (atx). - * - * ```markdown - * > | ## aa - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - // To do: parse indent like `markdown-rs`. - effects.enter('atxHeading') - return before(code) - } - - /** - * After optional whitespace, at `#`. - * - * ```markdown - * > | ## aa - * ^ - * ``` - * - * @type {State} - */ - function before(code) { - effects.enter('atxHeadingSequence') - return sequenceOpen(code) - } - - /** - * In opening sequence. - * - * ```markdown - * > | ## aa - * ^ - * ``` - * - * @type {State} - */ - function sequenceOpen(code) { - if (code === 35 && size++ < 6) { - effects.consume(code) - return sequenceOpen - } - - // Always at least one `#`. - if (code === null || markdownLineEndingOrSpace(code)) { - effects.exit('atxHeadingSequence') - return atBreak(code) - } - return nok(code) - } - - /** - * After something, before something else. - * - * ```markdown - * > | ## aa - * ^ - * ``` - * - * @type {State} - */ - function atBreak(code) { - if (code === 35) { - effects.enter('atxHeadingSequence') - return sequenceFurther(code) - } - if (code === null || markdownLineEnding(code)) { - effects.exit('atxHeading') - // To do: interrupt like `markdown-rs`. - // // Feel free to interrupt. - // tokenizer.interrupt = false - return ok(code) - } - if (markdownSpace(code)) { - return factorySpace(effects, atBreak, 'whitespace')(code) - } - - // To do: generate `data` tokens, add the `text` token later. - // Needs edit map, see: `markdown.rs`. - effects.enter('atxHeadingText') - return data(code) - } - - /** - * In further sequence (after whitespace). - * - * Could be normal “visible” hashes in the heading or a final sequence. - * - * ```markdown - * > | ## aa ## - * ^ - * ``` - * - * @type {State} - */ - function sequenceFurther(code) { - if (code === 35) { - effects.consume(code) - return sequenceFurther - } - effects.exit('atxHeadingSequence') - return atBreak(code) - } - - /** - * In text. - * - * ```markdown - * > | ## aa - * ^ - * ``` - * - * @type {State} - */ - function data(code) { - if (code === null || code === 35 || markdownLineEndingOrSpace(code)) { - effects.exit('atxHeadingText') - return atBreak(code) - } - effects.consume(code) - return data - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/setext-underline.js -/** - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').Resolver} Resolver - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const setextUnderline = { - name: 'setextUnderline', - tokenize: tokenizeSetextUnderline, - resolveTo: resolveToSetextUnderline -} - -/** @type {Resolver} */ -function resolveToSetextUnderline(events, context) { - // To do: resolve like `markdown-rs`. - let index = events.length - /** @type {number | undefined} */ - let content - /** @type {number | undefined} */ - let text - /** @type {number | undefined} */ - let definition - - // Find the opening of the content. - // It’ll always exist: we don’t tokenize if it isn’t there. - while (index--) { - if (events[index][0] === 'enter') { - if (events[index][1].type === 'content') { - content = index - break - } - if (events[index][1].type === 'paragraph') { - text = index - } - } - // Exit - else { - if (events[index][1].type === 'content') { - // Remove the content end (if needed we’ll add it later) - events.splice(index, 1) - } - if (!definition && events[index][1].type === 'definition') { - definition = index - } - } - } - const heading = { - type: 'setextHeading', - start: Object.assign({}, events[text][1].start), - end: Object.assign({}, events[events.length - 1][1].end) - } - - // Change the paragraph to setext heading text. - events[text][1].type = 'setextHeadingText' - - // If we have definitions in the content, we’ll keep on having content, - // but we need move it. - if (definition) { - events.splice(text, 0, ['enter', heading, context]) - events.splice(definition + 1, 0, ['exit', events[content][1], context]) - events[content][1].end = Object.assign({}, events[definition][1].end) - } else { - events[content][1] = heading - } - - // Add the heading exit at the end. - events.push(['exit', heading, context]) - return events -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeSetextUnderline(effects, ok, nok) { - const self = this - /** @type {NonNullable} */ - let marker - return start - - /** - * At start of heading (setext) underline. - * - * ```markdown - * | aa - * > | == - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - let index = self.events.length - /** @type {boolean | undefined} */ - let paragraph - // Find an opening. - while (index--) { - // Skip enter/exit of line ending, line prefix, and content. - // We can now either have a definition or a paragraph. - if ( - self.events[index][1].type !== 'lineEnding' && - self.events[index][1].type !== 'linePrefix' && - self.events[index][1].type !== 'content' - ) { - paragraph = self.events[index][1].type === 'paragraph' - break - } - } - - // To do: handle lazy/pierce like `markdown-rs`. - // To do: parse indent like `markdown-rs`. - if (!self.parser.lazy[self.now().line] && (self.interrupt || paragraph)) { - effects.enter('setextHeadingLine') - marker = code - return before(code) - } - return nok(code) - } - - /** - * After optional whitespace, at `-` or `=`. - * - * ```markdown - * | aa - * > | == - * ^ - * ``` - * - * @type {State} - */ - function before(code) { - effects.enter('setextHeadingLineSequence') - return inside(code) - } - - /** - * In sequence. - * - * ```markdown - * | aa - * > | == - * ^ - * ``` - * - * @type {State} - */ - function inside(code) { - if (code === marker) { - effects.consume(code) - return inside - } - effects.exit('setextHeadingLineSequence') - return markdownSpace(code) - ? factorySpace(effects, after, 'lineSuffix')(code) - : after(code) - } - - /** - * After sequence, after optional whitespace. - * - * ```markdown - * | aa - * > | == - * ^ - * ``` - * - * @type {State} - */ - function after(code) { - if (code === null || markdownLineEnding(code)) { - effects.exit('setextHeadingLine') - return ok(code) - } - return nok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-html-tag-name/index.js -/** - * List of lowercase HTML “block” tag names. - * - * The list, when parsing HTML (flow), results in more relaxed rules (condition - * 6). - * Because they are known blocks, the HTML-like syntax doesn’t have to be - * strictly parsed. - * For tag names not in this list, a more strict algorithm (condition 7) is used - * to detect whether the HTML-like syntax is seen as HTML (flow) or not. - * - * This is copied from: - * . - * - * > 👉 **Note**: `search` was added in `CommonMark@0.31`. - */ -const htmlBlockNames = [ - 'address', - 'article', - 'aside', - 'base', - 'basefont', - 'blockquote', - 'body', - 'caption', - 'center', - 'col', - 'colgroup', - 'dd', - 'details', - 'dialog', - 'dir', - 'div', - 'dl', - 'dt', - 'fieldset', - 'figcaption', - 'figure', - 'footer', - 'form', - 'frame', - 'frameset', - 'h1', - 'h2', - 'h3', - 'h4', - 'h5', - 'h6', - 'head', - 'header', - 'hr', - 'html', - 'iframe', - 'legend', - 'li', - 'link', - 'main', - 'menu', - 'menuitem', - 'nav', - 'noframes', - 'ol', - 'optgroup', - 'option', - 'p', - 'param', - 'search', - 'section', - 'summary', - 'table', - 'tbody', - 'td', - 'tfoot', - 'th', - 'thead', - 'title', - 'tr', - 'track', - 'ul' -] - -/** - * List of lowercase HTML “raw” tag names. - * - * The list, when parsing HTML (flow), results in HTML that can include lines - * without exiting, until a closing tag also in this list is found (condition - * 1). - * - * This module is copied from: - * . - * - * > 👉 **Note**: `textarea` was added in `CommonMark@0.30`. - */ -const htmlRawNames = ['pre', 'script', 'style', 'textarea'] - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/html-flow.js -/** - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').Resolver} Resolver - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - - - -/** @type {Construct} */ -const htmlFlow = { - name: 'htmlFlow', - tokenize: tokenizeHtmlFlow, - resolveTo: resolveToHtmlFlow, - concrete: true -} - -/** @type {Construct} */ -const blankLineBefore = { - tokenize: tokenizeBlankLineBefore, - partial: true -} -const nonLazyContinuationStart = { - tokenize: tokenizeNonLazyContinuationStart, - partial: true -} - -/** @type {Resolver} */ -function resolveToHtmlFlow(events) { - let index = events.length - while (index--) { - if (events[index][0] === 'enter' && events[index][1].type === 'htmlFlow') { - break - } - } - if (index > 1 && events[index - 2][1].type === 'linePrefix') { - // Add the prefix start to the HTML token. - events[index][1].start = events[index - 2][1].start - // Add the prefix start to the HTML line token. - events[index + 1][1].start = events[index - 2][1].start - // Remove the line prefix. - events.splice(index - 2, 2) - } - return events -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeHtmlFlow(effects, ok, nok) { - const self = this - /** @type {number} */ - let marker - /** @type {boolean} */ - let closingTag - /** @type {string} */ - let buffer - /** @type {number} */ - let index - /** @type {Code} */ - let markerB - return start - - /** - * Start of HTML (flow). - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - // To do: parse indent like `markdown-rs`. - return before(code) - } - - /** - * At `<`, after optional whitespace. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function before(code) { - effects.enter('htmlFlow') - effects.enter('htmlFlowData') - effects.consume(code) - return open - } - - /** - * After `<`, at tag name or other stuff. - * - * ```markdown - * > | - * ^ - * > | - * ^ - * > | - * ^ - * ``` - * - * @type {State} - */ - function open(code) { - if (code === 33) { - effects.consume(code) - return declarationOpen - } - if (code === 47) { - effects.consume(code) - closingTag = true - return tagCloseStart - } - if (code === 63) { - effects.consume(code) - marker = 3 - // To do: - // tokenizer.concrete = true - // To do: use `markdown-rs` style interrupt. - // While we’re in an instruction instead of a declaration, we’re on a `?` - // right now, so we do need to search for `>`, similar to declarations. - return self.interrupt ? ok : continuationDeclarationInside - } - - // ASCII alphabetical. - if (asciiAlpha(code)) { - effects.consume(code) - // @ts-expect-error: not null. - buffer = String.fromCharCode(code) - return tagName - } - return nok(code) - } - - /** - * After ` | - * ^ - * > | - * ^ - * > | &<]]> - * ^ - * ``` - * - * @type {State} - */ - function declarationOpen(code) { - if (code === 45) { - effects.consume(code) - marker = 2 - return commentOpenInside - } - if (code === 91) { - effects.consume(code) - marker = 5 - index = 0 - return cdataOpenInside - } - - // ASCII alphabetical. - if (asciiAlpha(code)) { - effects.consume(code) - marker = 4 - // // Do not form containers. - // tokenizer.concrete = true - return self.interrupt ? ok : continuationDeclarationInside - } - return nok(code) - } - - /** - * After ` | - * ^ - * ``` - * - * @type {State} - */ - function commentOpenInside(code) { - if (code === 45) { - effects.consume(code) - // // Do not form containers. - // tokenizer.concrete = true - return self.interrupt ? ok : continuationDeclarationInside - } - return nok(code) - } - - /** - * After ` | &<]]> - * ^^^^^^ - * ``` - * - * @type {State} - */ - function cdataOpenInside(code) { - const value = 'CDATA[' - if (code === value.charCodeAt(index++)) { - effects.consume(code) - if (index === value.length) { - // // Do not form containers. - // tokenizer.concrete = true - return self.interrupt ? ok : continuation - } - return cdataOpenInside - } - return nok(code) - } - - /** - * After ` | - * ^ - * ``` - * - * @type {State} - */ - function tagCloseStart(code) { - if (asciiAlpha(code)) { - effects.consume(code) - // @ts-expect-error: not null. - buffer = String.fromCharCode(code) - return tagName - } - return nok(code) - } - - /** - * In tag name. - * - * ```markdown - * > | - * ^^ - * > | - * ^^ - * ``` - * - * @type {State} - */ - function tagName(code) { - if ( - code === null || - code === 47 || - code === 62 || - markdownLineEndingOrSpace(code) - ) { - const slash = code === 47 - const name = buffer.toLowerCase() - if (!slash && !closingTag && htmlRawNames.includes(name)) { - marker = 1 - // // Do not form containers. - // tokenizer.concrete = true - return self.interrupt ? ok(code) : continuation(code) - } - if (htmlBlockNames.includes(buffer.toLowerCase())) { - marker = 6 - if (slash) { - effects.consume(code) - return basicSelfClosing - } - - // // Do not form containers. - // tokenizer.concrete = true - return self.interrupt ? ok(code) : continuation(code) - } - marker = 7 - // Do not support complete HTML when interrupting. - return self.interrupt && !self.parser.lazy[self.now().line] - ? nok(code) - : closingTag - ? completeClosingTagAfter(code) - : completeAttributeNameBefore(code) - } - - // ASCII alphanumerical and `-`. - if (code === 45 || asciiAlphanumeric(code)) { - effects.consume(code) - buffer += String.fromCharCode(code) - return tagName - } - return nok(code) - } - - /** - * After closing slash of a basic tag name. - * - * ```markdown - * > |
- * ^ - * ``` - * - * @type {State} - */ - function basicSelfClosing(code) { - if (code === 62) { - effects.consume(code) - // // Do not form containers. - // tokenizer.concrete = true - return self.interrupt ? ok : continuation - } - return nok(code) - } - - /** - * After closing slash of a complete tag name. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function completeClosingTagAfter(code) { - if (markdownSpace(code)) { - effects.consume(code) - return completeClosingTagAfter - } - return completeEnd(code) - } - - /** - * At an attribute name. - * - * At first, this state is used after a complete tag name, after whitespace, - * where it expects optional attributes or the end of the tag. - * It is also reused after attributes, when expecting more optional - * attributes. - * - * ```markdown - * > | - * ^ - * > | - * ^ - * > | - * ^ - * > | - * ^ - * > | - * ^ - * ``` - * - * @type {State} - */ - function completeAttributeNameBefore(code) { - if (code === 47) { - effects.consume(code) - return completeEnd - } - - // ASCII alphanumerical and `:` and `_`. - if (code === 58 || code === 95 || asciiAlpha(code)) { - effects.consume(code) - return completeAttributeName - } - if (markdownSpace(code)) { - effects.consume(code) - return completeAttributeNameBefore - } - return completeEnd(code) - } - - /** - * In attribute name. - * - * ```markdown - * > | - * ^ - * > | - * ^ - * > | - * ^ - * ``` - * - * @type {State} - */ - function completeAttributeName(code) { - // ASCII alphanumerical and `-`, `.`, `:`, and `_`. - if ( - code === 45 || - code === 46 || - code === 58 || - code === 95 || - asciiAlphanumeric(code) - ) { - effects.consume(code) - return completeAttributeName - } - return completeAttributeNameAfter(code) - } - - /** - * After attribute name, at an optional initializer, the end of the tag, or - * whitespace. - * - * ```markdown - * > | - * ^ - * > | - * ^ - * ``` - * - * @type {State} - */ - function completeAttributeNameAfter(code) { - if (code === 61) { - effects.consume(code) - return completeAttributeValueBefore - } - if (markdownSpace(code)) { - effects.consume(code) - return completeAttributeNameAfter - } - return completeAttributeNameBefore(code) - } - - /** - * Before unquoted, double quoted, or single quoted attribute value, allowing - * whitespace. - * - * ```markdown - * > | - * ^ - * > | - * ^ - * ``` - * - * @type {State} - */ - function completeAttributeValueBefore(code) { - if ( - code === null || - code === 60 || - code === 61 || - code === 62 || - code === 96 - ) { - return nok(code) - } - if (code === 34 || code === 39) { - effects.consume(code) - markerB = code - return completeAttributeValueQuoted - } - if (markdownSpace(code)) { - effects.consume(code) - return completeAttributeValueBefore - } - return completeAttributeValueUnquoted(code) - } - - /** - * In double or single quoted attribute value. - * - * ```markdown - * > | - * ^ - * > | - * ^ - * ``` - * - * @type {State} - */ - function completeAttributeValueQuoted(code) { - if (code === markerB) { - effects.consume(code) - markerB = null - return completeAttributeValueQuotedAfter - } - if (code === null || markdownLineEnding(code)) { - return nok(code) - } - effects.consume(code) - return completeAttributeValueQuoted - } - - /** - * In unquoted attribute value. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function completeAttributeValueUnquoted(code) { - if ( - code === null || - code === 34 || - code === 39 || - code === 47 || - code === 60 || - code === 61 || - code === 62 || - code === 96 || - markdownLineEndingOrSpace(code) - ) { - return completeAttributeNameAfter(code) - } - effects.consume(code) - return completeAttributeValueUnquoted - } - - /** - * After double or single quoted attribute value, before whitespace or the - * end of the tag. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function completeAttributeValueQuotedAfter(code) { - if (code === 47 || code === 62 || markdownSpace(code)) { - return completeAttributeNameBefore(code) - } - return nok(code) - } - - /** - * In certain circumstances of a complete tag where only an `>` is allowed. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function completeEnd(code) { - if (code === 62) { - effects.consume(code) - return completeAfter - } - return nok(code) - } - - /** - * After `>` in a complete tag. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function completeAfter(code) { - if (code === null || markdownLineEnding(code)) { - // // Do not form containers. - // tokenizer.concrete = true - return continuation(code) - } - if (markdownSpace(code)) { - effects.consume(code) - return completeAfter - } - return nok(code) - } - - /** - * In continuation of any HTML kind. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function continuation(code) { - if (code === 45 && marker === 2) { - effects.consume(code) - return continuationCommentInside - } - if (code === 60 && marker === 1) { - effects.consume(code) - return continuationRawTagOpen - } - if (code === 62 && marker === 4) { - effects.consume(code) - return continuationClose - } - if (code === 63 && marker === 3) { - effects.consume(code) - return continuationDeclarationInside - } - if (code === 93 && marker === 5) { - effects.consume(code) - return continuationCdataInside - } - if (markdownLineEnding(code) && (marker === 6 || marker === 7)) { - effects.exit('htmlFlowData') - return effects.check( - blankLineBefore, - continuationAfter, - continuationStart - )(code) - } - if (code === null || markdownLineEnding(code)) { - effects.exit('htmlFlowData') - return continuationStart(code) - } - effects.consume(code) - return continuation - } - - /** - * In continuation, at eol. - * - * ```markdown - * > | - * ^ - * | asd - * ``` - * - * @type {State} - */ - function continuationStart(code) { - return effects.check( - nonLazyContinuationStart, - continuationStartNonLazy, - continuationAfter - )(code) - } - - /** - * In continuation, at eol, before non-lazy content. - * - * ```markdown - * > | - * ^ - * | asd - * ``` - * - * @type {State} - */ - function continuationStartNonLazy(code) { - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return continuationBefore - } - - /** - * In continuation, before non-lazy content. - * - * ```markdown - * | - * > | asd - * ^ - * ``` - * - * @type {State} - */ - function continuationBefore(code) { - if (code === null || markdownLineEnding(code)) { - return continuationStart(code) - } - effects.enter('htmlFlowData') - return continuation(code) - } - - /** - * In comment continuation, after one `-`, expecting another. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function continuationCommentInside(code) { - if (code === 45) { - effects.consume(code) - return continuationDeclarationInside - } - return continuation(code) - } - - /** - * In raw continuation, after `<`, at `/`. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function continuationRawTagOpen(code) { - if (code === 47) { - effects.consume(code) - buffer = '' - return continuationRawEndTag - } - return continuation(code) - } - - /** - * In raw continuation, after ` | - * ^^^^^^ - * ``` - * - * @type {State} - */ - function continuationRawEndTag(code) { - if (code === 62) { - const name = buffer.toLowerCase() - if (htmlRawNames.includes(name)) { - effects.consume(code) - return continuationClose - } - return continuation(code) - } - if (asciiAlpha(code) && buffer.length < 8) { - effects.consume(code) - // @ts-expect-error: not null. - buffer += String.fromCharCode(code) - return continuationRawEndTag - } - return continuation(code) - } - - /** - * In cdata continuation, after `]`, expecting `]>`. - * - * ```markdown - * > | &<]]> - * ^ - * ``` - * - * @type {State} - */ - function continuationCdataInside(code) { - if (code === 93) { - effects.consume(code) - return continuationDeclarationInside - } - return continuation(code) - } - - /** - * In declaration or instruction continuation, at `>`. - * - * ```markdown - * > | - * ^ - * > | - * ^ - * > | - * ^ - * > | - * ^ - * > | &<]]> - * ^ - * ``` - * - * @type {State} - */ - function continuationDeclarationInside(code) { - if (code === 62) { - effects.consume(code) - return continuationClose - } - - // More dashes. - if (code === 45 && marker === 2) { - effects.consume(code) - return continuationDeclarationInside - } - return continuation(code) - } - - /** - * In closed continuation: everything we get until the eol/eof is part of it. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function continuationClose(code) { - if (code === null || markdownLineEnding(code)) { - effects.exit('htmlFlowData') - return continuationAfter(code) - } - effects.consume(code) - return continuationClose - } - - /** - * Done. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function continuationAfter(code) { - effects.exit('htmlFlow') - // // Feel free to interrupt. - // tokenizer.interrupt = false - // // No longer concrete. - // tokenizer.concrete = false - return ok(code) - } -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeNonLazyContinuationStart(effects, ok, nok) { - const self = this - return start - - /** - * At eol, before continuation. - * - * ```markdown - * > | * ```js - * ^ - * | b - * ``` - * - * @type {State} - */ - function start(code) { - if (markdownLineEnding(code)) { - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return after - } - return nok(code) - } - - /** - * A continuation. - * - * ```markdown - * | * ```js - * > | b - * ^ - * ``` - * - * @type {State} - */ - function after(code) { - return self.parser.lazy[self.now().line] ? nok(code) : ok(code) - } -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeBlankLineBefore(effects, ok, nok) { - return start - - /** - * Before eol, expecting blank line. - * - * ```markdown - * > |
- * ^ - * | - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return effects.attempt(blankLine, ok, nok) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/code-fenced.js -/** - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const nonLazyContinuation = { - tokenize: tokenizeNonLazyContinuation, - partial: true -} - -/** @type {Construct} */ -const codeFenced = { - name: 'codeFenced', - tokenize: tokenizeCodeFenced, - concrete: true -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeCodeFenced(effects, ok, nok) { - const self = this - /** @type {Construct} */ - const closeStart = { - tokenize: tokenizeCloseStart, - partial: true - } - let initialPrefix = 0 - let sizeOpen = 0 - /** @type {NonNullable} */ - let marker - return start - - /** - * Start of code. - * - * ```markdown - * > | ~~~js - * ^ - * | alert(1) - * | ~~~ - * ``` - * - * @type {State} - */ - function start(code) { - // To do: parse whitespace like `markdown-rs`. - return beforeSequenceOpen(code) - } - - /** - * In opening fence, after prefix, at sequence. - * - * ```markdown - * > | ~~~js - * ^ - * | alert(1) - * | ~~~ - * ``` - * - * @type {State} - */ - function beforeSequenceOpen(code) { - const tail = self.events[self.events.length - 1] - initialPrefix = - tail && tail[1].type === 'linePrefix' - ? tail[2].sliceSerialize(tail[1], true).length - : 0 - marker = code - effects.enter('codeFenced') - effects.enter('codeFencedFence') - effects.enter('codeFencedFenceSequence') - return sequenceOpen(code) - } - - /** - * In opening fence sequence. - * - * ```markdown - * > | ~~~js - * ^ - * | alert(1) - * | ~~~ - * ``` - * - * @type {State} - */ - function sequenceOpen(code) { - if (code === marker) { - sizeOpen++ - effects.consume(code) - return sequenceOpen - } - if (sizeOpen < 3) { - return nok(code) - } - effects.exit('codeFencedFenceSequence') - return markdownSpace(code) - ? factorySpace(effects, infoBefore, 'whitespace')(code) - : infoBefore(code) - } - - /** - * In opening fence, after the sequence (and optional whitespace), before info. - * - * ```markdown - * > | ~~~js - * ^ - * | alert(1) - * | ~~~ - * ``` - * - * @type {State} - */ - function infoBefore(code) { - if (code === null || markdownLineEnding(code)) { - effects.exit('codeFencedFence') - return self.interrupt - ? ok(code) - : effects.check(nonLazyContinuation, atNonLazyBreak, after)(code) - } - effects.enter('codeFencedFenceInfo') - effects.enter('chunkString', { - contentType: 'string' - }) - return info(code) - } - - /** - * In info. - * - * ```markdown - * > | ~~~js - * ^ - * | alert(1) - * | ~~~ - * ``` - * - * @type {State} - */ - function info(code) { - if (code === null || markdownLineEnding(code)) { - effects.exit('chunkString') - effects.exit('codeFencedFenceInfo') - return infoBefore(code) - } - if (markdownSpace(code)) { - effects.exit('chunkString') - effects.exit('codeFencedFenceInfo') - return factorySpace(effects, metaBefore, 'whitespace')(code) - } - if (code === 96 && code === marker) { - return nok(code) - } - effects.consume(code) - return info - } - - /** - * In opening fence, after info and whitespace, before meta. - * - * ```markdown - * > | ~~~js eval - * ^ - * | alert(1) - * | ~~~ - * ``` - * - * @type {State} - */ - function metaBefore(code) { - if (code === null || markdownLineEnding(code)) { - return infoBefore(code) - } - effects.enter('codeFencedFenceMeta') - effects.enter('chunkString', { - contentType: 'string' - }) - return meta(code) - } - - /** - * In meta. - * - * ```markdown - * > | ~~~js eval - * ^ - * | alert(1) - * | ~~~ - * ``` - * - * @type {State} - */ - function meta(code) { - if (code === null || markdownLineEnding(code)) { - effects.exit('chunkString') - effects.exit('codeFencedFenceMeta') - return infoBefore(code) - } - if (code === 96 && code === marker) { - return nok(code) - } - effects.consume(code) - return meta - } - - /** - * At eol/eof in code, before a non-lazy closing fence or content. - * - * ```markdown - * > | ~~~js - * ^ - * > | alert(1) - * ^ - * | ~~~ - * ``` - * - * @type {State} - */ - function atNonLazyBreak(code) { - return effects.attempt(closeStart, after, contentBefore)(code) - } - - /** - * Before code content, not a closing fence, at eol. - * - * ```markdown - * | ~~~js - * > | alert(1) - * ^ - * | ~~~ - * ``` - * - * @type {State} - */ - function contentBefore(code) { - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return contentStart - } - - /** - * Before code content, not a closing fence. - * - * ```markdown - * | ~~~js - * > | alert(1) - * ^ - * | ~~~ - * ``` - * - * @type {State} - */ - function contentStart(code) { - return initialPrefix > 0 && markdownSpace(code) - ? factorySpace( - effects, - beforeContentChunk, - 'linePrefix', - initialPrefix + 1 - )(code) - : beforeContentChunk(code) - } - - /** - * Before code content, after optional prefix. - * - * ```markdown - * | ~~~js - * > | alert(1) - * ^ - * | ~~~ - * ``` - * - * @type {State} - */ - function beforeContentChunk(code) { - if (code === null || markdownLineEnding(code)) { - return effects.check(nonLazyContinuation, atNonLazyBreak, after)(code) - } - effects.enter('codeFlowValue') - return contentChunk(code) - } - - /** - * In code content. - * - * ```markdown - * | ~~~js - * > | alert(1) - * ^^^^^^^^ - * | ~~~ - * ``` - * - * @type {State} - */ - function contentChunk(code) { - if (code === null || markdownLineEnding(code)) { - effects.exit('codeFlowValue') - return beforeContentChunk(code) - } - effects.consume(code) - return contentChunk - } - - /** - * After code. - * - * ```markdown - * | ~~~js - * | alert(1) - * > | ~~~ - * ^ - * ``` - * - * @type {State} - */ - function after(code) { - effects.exit('codeFenced') - return ok(code) - } - - /** - * @this {TokenizeContext} - * @type {Tokenizer} - */ - function tokenizeCloseStart(effects, ok, nok) { - let size = 0 - return startBefore - - /** - * - * - * @type {State} - */ - function startBefore(code) { - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return start - } - - /** - * Before closing fence, at optional whitespace. - * - * ```markdown - * | ~~~js - * | alert(1) - * > | ~~~ - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - // Always populated by defaults. - - // To do: `enter` here or in next state? - effects.enter('codeFencedFence') - return markdownSpace(code) - ? factorySpace( - effects, - beforeSequenceClose, - 'linePrefix', - self.parser.constructs.disable.null.includes('codeIndented') - ? undefined - : 4 - )(code) - : beforeSequenceClose(code) - } - - /** - * In closing fence, after optional whitespace, at sequence. - * - * ```markdown - * | ~~~js - * | alert(1) - * > | ~~~ - * ^ - * ``` - * - * @type {State} - */ - function beforeSequenceClose(code) { - if (code === marker) { - effects.enter('codeFencedFenceSequence') - return sequenceClose(code) - } - return nok(code) - } - - /** - * In closing fence sequence. - * - * ```markdown - * | ~~~js - * | alert(1) - * > | ~~~ - * ^ - * ``` - * - * @type {State} - */ - function sequenceClose(code) { - if (code === marker) { - size++ - effects.consume(code) - return sequenceClose - } - if (size >= sizeOpen) { - effects.exit('codeFencedFenceSequence') - return markdownSpace(code) - ? factorySpace(effects, sequenceCloseAfter, 'whitespace')(code) - : sequenceCloseAfter(code) - } - return nok(code) - } - - /** - * After closing fence sequence, after optional whitespace. - * - * ```markdown - * | ~~~js - * | alert(1) - * > | ~~~ - * ^ - * ``` - * - * @type {State} - */ - function sequenceCloseAfter(code) { - if (code === null || markdownLineEnding(code)) { - effects.exit('codeFencedFence') - return ok(code) - } - return nok(code) - } - } -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeNonLazyContinuation(effects, ok, nok) { - const self = this - return start - - /** - * - * - * @type {State} - */ - function start(code) { - if (code === null) { - return nok(code) - } - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return lineStart - } - - /** - * - * - * @type {State} - */ - function lineStart(code) { - return self.parser.lazy[self.now().line] ? nok(code) : ok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/character-entities/index.js -/** - * Map of named character references. - * - * @type {Record} - */ -const characterEntities = { - AElig: 'Æ', - AMP: '&', - Aacute: 'Á', - Abreve: 'Ă', - Acirc: 'Â', - Acy: 'А', - Afr: '𝔄', - Agrave: 'À', - Alpha: 'Α', - Amacr: 'Ā', - And: '⩓', - Aogon: 'Ą', - Aopf: '𝔸', - ApplyFunction: '⁡', - Aring: 'Å', - Ascr: '𝒜', - Assign: '≔', - Atilde: 'Ã', - Auml: 'Ä', - Backslash: '∖', - Barv: '⫧', - Barwed: '⌆', - Bcy: 'Б', - Because: '∵', - Bernoullis: 'ℬ', - Beta: 'Β', - Bfr: '𝔅', - Bopf: '𝔹', - Breve: '˘', - Bscr: 'ℬ', - Bumpeq: '≎', - CHcy: 'Ч', - COPY: '©', - Cacute: 'Ć', - Cap: '⋒', - CapitalDifferentialD: 'ⅅ', - Cayleys: 'ℭ', - Ccaron: 'Č', - Ccedil: 'Ç', - Ccirc: 'Ĉ', - Cconint: '∰', - Cdot: 'Ċ', - Cedilla: '¸', - CenterDot: '·', - Cfr: 'ℭ', - Chi: 'Χ', - CircleDot: '⊙', - CircleMinus: '⊖', - CirclePlus: '⊕', - CircleTimes: '⊗', - ClockwiseContourIntegral: '∲', - CloseCurlyDoubleQuote: '”', - CloseCurlyQuote: '’', - Colon: '∷', - Colone: '⩴', - Congruent: '≡', - Conint: '∯', - ContourIntegral: '∮', - Copf: 'ℂ', - Coproduct: '∐', - CounterClockwiseContourIntegral: '∳', - Cross: '⨯', - Cscr: '𝒞', - Cup: '⋓', - CupCap: '≍', - DD: 'ⅅ', - DDotrahd: '⤑', - DJcy: 'Ђ', - DScy: 'Ѕ', - DZcy: 'Џ', - Dagger: '‡', - Darr: '↡', - Dashv: '⫤', - Dcaron: 'Ď', - Dcy: 'Д', - Del: '∇', - Delta: 'Δ', - Dfr: '𝔇', - DiacriticalAcute: '´', - DiacriticalDot: '˙', - DiacriticalDoubleAcute: '˝', - DiacriticalGrave: '`', - DiacriticalTilde: '˜', - Diamond: '⋄', - DifferentialD: 'ⅆ', - Dopf: '𝔻', - Dot: '¨', - DotDot: '⃜', - DotEqual: '≐', - DoubleContourIntegral: '∯', - DoubleDot: '¨', - DoubleDownArrow: '⇓', - DoubleLeftArrow: '⇐', - DoubleLeftRightArrow: '⇔', - DoubleLeftTee: '⫤', - DoubleLongLeftArrow: '⟸', - DoubleLongLeftRightArrow: '⟺', - DoubleLongRightArrow: '⟹', - DoubleRightArrow: '⇒', - DoubleRightTee: '⊨', - DoubleUpArrow: '⇑', - DoubleUpDownArrow: '⇕', - DoubleVerticalBar: '∥', - DownArrow: '↓', - DownArrowBar: '⤓', - DownArrowUpArrow: '⇵', - DownBreve: '̑', - DownLeftRightVector: '⥐', - DownLeftTeeVector: '⥞', - DownLeftVector: '↽', - DownLeftVectorBar: '⥖', - DownRightTeeVector: '⥟', - DownRightVector: '⇁', - DownRightVectorBar: '⥗', - DownTee: '⊤', - DownTeeArrow: '↧', - Downarrow: '⇓', - Dscr: '𝒟', - Dstrok: 'Đ', - ENG: 'Ŋ', - ETH: 'Ð', - Eacute: 'É', - Ecaron: 'Ě', - Ecirc: 'Ê', - Ecy: 'Э', - Edot: 'Ė', - Efr: '𝔈', - Egrave: 'È', - Element: '∈', - Emacr: 'Ē', - EmptySmallSquare: '◻', - EmptyVerySmallSquare: '▫', - Eogon: 'Ę', - Eopf: '𝔼', - Epsilon: 'Ε', - Equal: '⩵', - EqualTilde: '≂', - Equilibrium: '⇌', - Escr: 'ℰ', - Esim: '⩳', - Eta: 'Η', - Euml: 'Ë', - Exists: '∃', - ExponentialE: 'ⅇ', - Fcy: 'Ф', - Ffr: '𝔉', - FilledSmallSquare: '◼', - FilledVerySmallSquare: '▪', - Fopf: '𝔽', - ForAll: '∀', - Fouriertrf: 'ℱ', - Fscr: 'ℱ', - GJcy: 'Ѓ', - GT: '>', - Gamma: 'Γ', - Gammad: 'Ϝ', - Gbreve: 'Ğ', - Gcedil: 'Ģ', - Gcirc: 'Ĝ', - Gcy: 'Г', - Gdot: 'Ġ', - Gfr: '𝔊', - Gg: '⋙', - Gopf: '𝔾', - GreaterEqual: '≥', - GreaterEqualLess: '⋛', - GreaterFullEqual: '≧', - GreaterGreater: '⪢', - GreaterLess: '≷', - GreaterSlantEqual: '⩾', - GreaterTilde: '≳', - Gscr: '𝒢', - Gt: '≫', - HARDcy: 'Ъ', - Hacek: 'ˇ', - Hat: '^', - Hcirc: 'Ĥ', - Hfr: 'ℌ', - HilbertSpace: 'ℋ', - Hopf: 'ℍ', - HorizontalLine: '─', - Hscr: 'ℋ', - Hstrok: 'Ħ', - HumpDownHump: '≎', - HumpEqual: '≏', - IEcy: 'Е', - IJlig: 'IJ', - IOcy: 'Ё', - Iacute: 'Í', - Icirc: 'Î', - Icy: 'И', - Idot: 'İ', - Ifr: 'ℑ', - Igrave: 'Ì', - Im: 'ℑ', - Imacr: 'Ī', - ImaginaryI: 'ⅈ', - Implies: '⇒', - Int: '∬', - Integral: '∫', - Intersection: '⋂', - InvisibleComma: '⁣', - InvisibleTimes: '⁢', - Iogon: 'Į', - Iopf: '𝕀', - Iota: 'Ι', - Iscr: 'ℐ', - Itilde: 'Ĩ', - Iukcy: 'І', - Iuml: 'Ï', - Jcirc: 'Ĵ', - Jcy: 'Й', - Jfr: '𝔍', - Jopf: '𝕁', - Jscr: '𝒥', - Jsercy: 'Ј', - Jukcy: 'Є', - KHcy: 'Х', - KJcy: 'Ќ', - Kappa: 'Κ', - Kcedil: 'Ķ', - Kcy: 'К', - Kfr: '𝔎', - Kopf: '𝕂', - Kscr: '𝒦', - LJcy: 'Љ', - LT: '<', - Lacute: 'Ĺ', - Lambda: 'Λ', - Lang: '⟪', - Laplacetrf: 'ℒ', - Larr: '↞', - Lcaron: 'Ľ', - Lcedil: 'Ļ', - Lcy: 'Л', - LeftAngleBracket: '⟨', - LeftArrow: '←', - LeftArrowBar: '⇤', - LeftArrowRightArrow: '⇆', - LeftCeiling: '⌈', - LeftDoubleBracket: '⟦', - LeftDownTeeVector: '⥡', - LeftDownVector: '⇃', - LeftDownVectorBar: '⥙', - LeftFloor: '⌊', - LeftRightArrow: '↔', - LeftRightVector: '⥎', - LeftTee: '⊣', - LeftTeeArrow: '↤', - LeftTeeVector: '⥚', - LeftTriangle: '⊲', - LeftTriangleBar: '⧏', - LeftTriangleEqual: '⊴', - LeftUpDownVector: '⥑', - LeftUpTeeVector: '⥠', - LeftUpVector: '↿', - LeftUpVectorBar: '⥘', - LeftVector: '↼', - LeftVectorBar: '⥒', - Leftarrow: '⇐', - Leftrightarrow: '⇔', - LessEqualGreater: '⋚', - LessFullEqual: '≦', - LessGreater: '≶', - LessLess: '⪡', - LessSlantEqual: '⩽', - LessTilde: '≲', - Lfr: '𝔏', - Ll: '⋘', - Lleftarrow: '⇚', - Lmidot: 'Ŀ', - LongLeftArrow: '⟵', - LongLeftRightArrow: '⟷', - LongRightArrow: '⟶', - Longleftarrow: '⟸', - Longleftrightarrow: '⟺', - Longrightarrow: '⟹', - Lopf: '𝕃', - LowerLeftArrow: '↙', - LowerRightArrow: '↘', - Lscr: 'ℒ', - Lsh: '↰', - Lstrok: 'Ł', - Lt: '≪', - Map: '⤅', - Mcy: 'М', - MediumSpace: ' ', - Mellintrf: 'ℳ', - Mfr: '𝔐', - MinusPlus: '∓', - Mopf: '𝕄', - Mscr: 'ℳ', - Mu: 'Μ', - NJcy: 'Њ', - Nacute: 'Ń', - Ncaron: 'Ň', - Ncedil: 'Ņ', - Ncy: 'Н', - NegativeMediumSpace: '​', - NegativeThickSpace: '​', - NegativeThinSpace: '​', - NegativeVeryThinSpace: '​', - NestedGreaterGreater: '≫', - NestedLessLess: '≪', - NewLine: '\n', - Nfr: '𝔑', - NoBreak: '⁠', - NonBreakingSpace: ' ', - Nopf: 'ℕ', - Not: '⫬', - NotCongruent: '≢', - NotCupCap: '≭', - NotDoubleVerticalBar: '∦', - NotElement: '∉', - NotEqual: '≠', - NotEqualTilde: '≂̸', - NotExists: '∄', - NotGreater: '≯', - NotGreaterEqual: '≱', - NotGreaterFullEqual: '≧̸', - NotGreaterGreater: '≫̸', - NotGreaterLess: '≹', - NotGreaterSlantEqual: '⩾̸', - NotGreaterTilde: '≵', - NotHumpDownHump: '≎̸', - NotHumpEqual: '≏̸', - NotLeftTriangle: '⋪', - NotLeftTriangleBar: '⧏̸', - NotLeftTriangleEqual: '⋬', - NotLess: '≮', - NotLessEqual: '≰', - NotLessGreater: '≸', - NotLessLess: '≪̸', - NotLessSlantEqual: '⩽̸', - NotLessTilde: '≴', - NotNestedGreaterGreater: '⪢̸', - NotNestedLessLess: '⪡̸', - NotPrecedes: '⊀', - NotPrecedesEqual: '⪯̸', - NotPrecedesSlantEqual: '⋠', - NotReverseElement: '∌', - NotRightTriangle: '⋫', - NotRightTriangleBar: '⧐̸', - NotRightTriangleEqual: '⋭', - NotSquareSubset: '⊏̸', - NotSquareSubsetEqual: '⋢', - NotSquareSuperset: '⊐̸', - NotSquareSupersetEqual: '⋣', - NotSubset: '⊂⃒', - NotSubsetEqual: '⊈', - NotSucceeds: '⊁', - NotSucceedsEqual: '⪰̸', - NotSucceedsSlantEqual: '⋡', - NotSucceedsTilde: '≿̸', - NotSuperset: '⊃⃒', - NotSupersetEqual: '⊉', - NotTilde: '≁', - NotTildeEqual: '≄', - NotTildeFullEqual: '≇', - NotTildeTilde: '≉', - NotVerticalBar: '∤', - Nscr: '𝒩', - Ntilde: 'Ñ', - Nu: 'Ν', - OElig: 'Œ', - Oacute: 'Ó', - Ocirc: 'Ô', - Ocy: 'О', - Odblac: 'Ő', - Ofr: '𝔒', - Ograve: 'Ò', - Omacr: 'Ō', - Omega: 'Ω', - Omicron: 'Ο', - Oopf: '𝕆', - OpenCurlyDoubleQuote: '“', - OpenCurlyQuote: '‘', - Or: '⩔', - Oscr: '𝒪', - Oslash: 'Ø', - Otilde: 'Õ', - Otimes: '⨷', - Ouml: 'Ö', - OverBar: '‾', - OverBrace: '⏞', - OverBracket: '⎴', - OverParenthesis: '⏜', - PartialD: '∂', - Pcy: 'П', - Pfr: '𝔓', - Phi: 'Φ', - Pi: 'Π', - PlusMinus: '±', - Poincareplane: 'ℌ', - Popf: 'ℙ', - Pr: '⪻', - Precedes: '≺', - PrecedesEqual: '⪯', - PrecedesSlantEqual: '≼', - PrecedesTilde: '≾', - Prime: '″', - Product: '∏', - Proportion: '∷', - Proportional: '∝', - Pscr: '𝒫', - Psi: 'Ψ', - QUOT: '"', - Qfr: '𝔔', - Qopf: 'ℚ', - Qscr: '𝒬', - RBarr: '⤐', - REG: '®', - Racute: 'Ŕ', - Rang: '⟫', - Rarr: '↠', - Rarrtl: '⤖', - Rcaron: 'Ř', - Rcedil: 'Ŗ', - Rcy: 'Р', - Re: 'ℜ', - ReverseElement: '∋', - ReverseEquilibrium: '⇋', - ReverseUpEquilibrium: '⥯', - Rfr: 'ℜ', - Rho: 'Ρ', - RightAngleBracket: '⟩', - RightArrow: '→', - RightArrowBar: '⇥', - RightArrowLeftArrow: '⇄', - RightCeiling: '⌉', - RightDoubleBracket: '⟧', - RightDownTeeVector: '⥝', - RightDownVector: '⇂', - RightDownVectorBar: '⥕', - RightFloor: '⌋', - RightTee: '⊢', - RightTeeArrow: '↦', - RightTeeVector: '⥛', - RightTriangle: '⊳', - RightTriangleBar: '⧐', - RightTriangleEqual: '⊵', - RightUpDownVector: '⥏', - RightUpTeeVector: '⥜', - RightUpVector: '↾', - RightUpVectorBar: '⥔', - RightVector: '⇀', - RightVectorBar: '⥓', - Rightarrow: '⇒', - Ropf: 'ℝ', - RoundImplies: '⥰', - Rrightarrow: '⇛', - Rscr: 'ℛ', - Rsh: '↱', - RuleDelayed: '⧴', - SHCHcy: 'Щ', - SHcy: 'Ш', - SOFTcy: 'Ь', - Sacute: 'Ś', - Sc: '⪼', - Scaron: 'Š', - Scedil: 'Ş', - Scirc: 'Ŝ', - Scy: 'С', - Sfr: '𝔖', - ShortDownArrow: '↓', - ShortLeftArrow: '←', - ShortRightArrow: '→', - ShortUpArrow: '↑', - Sigma: 'Σ', - SmallCircle: '∘', - Sopf: '𝕊', - Sqrt: '√', - Square: '□', - SquareIntersection: '⊓', - SquareSubset: '⊏', - SquareSubsetEqual: '⊑', - SquareSuperset: '⊐', - SquareSupersetEqual: '⊒', - SquareUnion: '⊔', - Sscr: '𝒮', - Star: '⋆', - Sub: '⋐', - Subset: '⋐', - SubsetEqual: '⊆', - Succeeds: '≻', - SucceedsEqual: '⪰', - SucceedsSlantEqual: '≽', - SucceedsTilde: '≿', - SuchThat: '∋', - Sum: '∑', - Sup: '⋑', - Superset: '⊃', - SupersetEqual: '⊇', - Supset: '⋑', - THORN: 'Þ', - TRADE: '™', - TSHcy: 'Ћ', - TScy: 'Ц', - Tab: '\t', - Tau: 'Τ', - Tcaron: 'Ť', - Tcedil: 'Ţ', - Tcy: 'Т', - Tfr: '𝔗', - Therefore: '∴', - Theta: 'Θ', - ThickSpace: '  ', - ThinSpace: ' ', - Tilde: '∼', - TildeEqual: '≃', - TildeFullEqual: '≅', - TildeTilde: '≈', - Topf: '𝕋', - TripleDot: '⃛', - Tscr: '𝒯', - Tstrok: 'Ŧ', - Uacute: 'Ú', - Uarr: '↟', - Uarrocir: '⥉', - Ubrcy: 'Ў', - Ubreve: 'Ŭ', - Ucirc: 'Û', - Ucy: 'У', - Udblac: 'Ű', - Ufr: '𝔘', - Ugrave: 'Ù', - Umacr: 'Ū', - UnderBar: '_', - UnderBrace: '⏟', - UnderBracket: '⎵', - UnderParenthesis: '⏝', - Union: '⋃', - UnionPlus: '⊎', - Uogon: 'Ų', - Uopf: '𝕌', - UpArrow: '↑', - UpArrowBar: '⤒', - UpArrowDownArrow: '⇅', - UpDownArrow: '↕', - UpEquilibrium: '⥮', - UpTee: '⊥', - UpTeeArrow: '↥', - Uparrow: '⇑', - Updownarrow: '⇕', - UpperLeftArrow: '↖', - UpperRightArrow: '↗', - Upsi: 'ϒ', - Upsilon: 'Υ', - Uring: 'Ů', - Uscr: '𝒰', - Utilde: 'Ũ', - Uuml: 'Ü', - VDash: '⊫', - Vbar: '⫫', - Vcy: 'В', - Vdash: '⊩', - Vdashl: '⫦', - Vee: '⋁', - Verbar: '‖', - Vert: '‖', - VerticalBar: '∣', - VerticalLine: '|', - VerticalSeparator: '❘', - VerticalTilde: '≀', - VeryThinSpace: ' ', - Vfr: '𝔙', - Vopf: '𝕍', - Vscr: '𝒱', - Vvdash: '⊪', - Wcirc: 'Ŵ', - Wedge: '⋀', - Wfr: '𝔚', - Wopf: '𝕎', - Wscr: '𝒲', - Xfr: '𝔛', - Xi: 'Ξ', - Xopf: '𝕏', - Xscr: '𝒳', - YAcy: 'Я', - YIcy: 'Ї', - YUcy: 'Ю', - Yacute: 'Ý', - Ycirc: 'Ŷ', - Ycy: 'Ы', - Yfr: '𝔜', - Yopf: '𝕐', - Yscr: '𝒴', - Yuml: 'Ÿ', - ZHcy: 'Ж', - Zacute: 'Ź', - Zcaron: 'Ž', - Zcy: 'З', - Zdot: 'Ż', - ZeroWidthSpace: '​', - Zeta: 'Ζ', - Zfr: 'ℨ', - Zopf: 'ℤ', - Zscr: '𝒵', - aacute: 'á', - abreve: 'ă', - ac: '∾', - acE: '∾̳', - acd: '∿', - acirc: 'â', - acute: '´', - acy: 'а', - aelig: 'æ', - af: '⁡', - afr: '𝔞', - agrave: 'à', - alefsym: 'ℵ', - aleph: 'ℵ', - alpha: 'α', - amacr: 'ā', - amalg: '⨿', - amp: '&', - and: '∧', - andand: '⩕', - andd: '⩜', - andslope: '⩘', - andv: '⩚', - ang: '∠', - ange: '⦤', - angle: '∠', - angmsd: '∡', - angmsdaa: '⦨', - angmsdab: '⦩', - angmsdac: '⦪', - angmsdad: '⦫', - angmsdae: '⦬', - angmsdaf: '⦭', - angmsdag: '⦮', - angmsdah: '⦯', - angrt: '∟', - angrtvb: '⊾', - angrtvbd: '⦝', - angsph: '∢', - angst: 'Å', - angzarr: '⍼', - aogon: 'ą', - aopf: '𝕒', - ap: '≈', - apE: '⩰', - apacir: '⩯', - ape: '≊', - apid: '≋', - apos: "'", - approx: '≈', - approxeq: '≊', - aring: 'å', - ascr: '𝒶', - ast: '*', - asymp: '≈', - asympeq: '≍', - atilde: 'ã', - auml: 'ä', - awconint: '∳', - awint: '⨑', - bNot: '⫭', - backcong: '≌', - backepsilon: '϶', - backprime: '‵', - backsim: '∽', - backsimeq: '⋍', - barvee: '⊽', - barwed: '⌅', - barwedge: '⌅', - bbrk: '⎵', - bbrktbrk: '⎶', - bcong: '≌', - bcy: 'б', - bdquo: '„', - becaus: '∵', - because: '∵', - bemptyv: '⦰', - bepsi: '϶', - bernou: 'ℬ', - beta: 'β', - beth: 'ℶ', - between: '≬', - bfr: '𝔟', - bigcap: '⋂', - bigcirc: '◯', - bigcup: '⋃', - bigodot: '⨀', - bigoplus: '⨁', - bigotimes: '⨂', - bigsqcup: '⨆', - bigstar: '★', - bigtriangledown: '▽', - bigtriangleup: '△', - biguplus: '⨄', - bigvee: '⋁', - bigwedge: '⋀', - bkarow: '⤍', - blacklozenge: '⧫', - blacksquare: '▪', - blacktriangle: '▴', - blacktriangledown: '▾', - blacktriangleleft: '◂', - blacktriangleright: '▸', - blank: '␣', - blk12: '▒', - blk14: '░', - blk34: '▓', - block: '█', - bne: '=⃥', - bnequiv: '≡⃥', - bnot: '⌐', - bopf: '𝕓', - bot: '⊥', - bottom: '⊥', - bowtie: '⋈', - boxDL: '╗', - boxDR: '╔', - boxDl: '╖', - boxDr: '╓', - boxH: '═', - boxHD: '╦', - boxHU: '╩', - boxHd: '╤', - boxHu: '╧', - boxUL: '╝', - boxUR: '╚', - boxUl: '╜', - boxUr: '╙', - boxV: '║', - boxVH: '╬', - boxVL: '╣', - boxVR: '╠', - boxVh: '╫', - boxVl: '╢', - boxVr: '╟', - boxbox: '⧉', - boxdL: '╕', - boxdR: '╒', - boxdl: '┐', - boxdr: '┌', - boxh: '─', - boxhD: '╥', - boxhU: '╨', - boxhd: '┬', - boxhu: '┴', - boxminus: '⊟', - boxplus: '⊞', - boxtimes: '⊠', - boxuL: '╛', - boxuR: '╘', - boxul: '┘', - boxur: '└', - boxv: '│', - boxvH: '╪', - boxvL: '╡', - boxvR: '╞', - boxvh: '┼', - boxvl: '┤', - boxvr: '├', - bprime: '‵', - breve: '˘', - brvbar: '¦', - bscr: '𝒷', - bsemi: '⁏', - bsim: '∽', - bsime: '⋍', - bsol: '\\', - bsolb: '⧅', - bsolhsub: '⟈', - bull: '•', - bullet: '•', - bump: '≎', - bumpE: '⪮', - bumpe: '≏', - bumpeq: '≏', - cacute: 'ć', - cap: '∩', - capand: '⩄', - capbrcup: '⩉', - capcap: '⩋', - capcup: '⩇', - capdot: '⩀', - caps: '∩︀', - caret: '⁁', - caron: 'ˇ', - ccaps: '⩍', - ccaron: 'č', - ccedil: 'ç', - ccirc: 'ĉ', - ccups: '⩌', - ccupssm: '⩐', - cdot: 'ċ', - cedil: '¸', - cemptyv: '⦲', - cent: '¢', - centerdot: '·', - cfr: '𝔠', - chcy: 'ч', - check: '✓', - checkmark: '✓', - chi: 'χ', - cir: '○', - cirE: '⧃', - circ: 'ˆ', - circeq: '≗', - circlearrowleft: '↺', - circlearrowright: '↻', - circledR: '®', - circledS: 'Ⓢ', - circledast: '⊛', - circledcirc: '⊚', - circleddash: '⊝', - cire: '≗', - cirfnint: '⨐', - cirmid: '⫯', - cirscir: '⧂', - clubs: '♣', - clubsuit: '♣', - colon: ':', - colone: '≔', - coloneq: '≔', - comma: ',', - commat: '@', - comp: '∁', - compfn: '∘', - complement: '∁', - complexes: 'ℂ', - cong: '≅', - congdot: '⩭', - conint: '∮', - copf: '𝕔', - coprod: '∐', - copy: '©', - copysr: '℗', - crarr: '↵', - cross: '✗', - cscr: '𝒸', - csub: '⫏', - csube: '⫑', - csup: '⫐', - csupe: '⫒', - ctdot: '⋯', - cudarrl: '⤸', - cudarrr: '⤵', - cuepr: '⋞', - cuesc: '⋟', - cularr: '↶', - cularrp: '⤽', - cup: '∪', - cupbrcap: '⩈', - cupcap: '⩆', - cupcup: '⩊', - cupdot: '⊍', - cupor: '⩅', - cups: '∪︀', - curarr: '↷', - curarrm: '⤼', - curlyeqprec: '⋞', - curlyeqsucc: '⋟', - curlyvee: '⋎', - curlywedge: '⋏', - curren: '¤', - curvearrowleft: '↶', - curvearrowright: '↷', - cuvee: '⋎', - cuwed: '⋏', - cwconint: '∲', - cwint: '∱', - cylcty: '⌭', - dArr: '⇓', - dHar: '⥥', - dagger: '†', - daleth: 'ℸ', - darr: '↓', - dash: '‐', - dashv: '⊣', - dbkarow: '⤏', - dblac: '˝', - dcaron: 'ď', - dcy: 'д', - dd: 'ⅆ', - ddagger: '‡', - ddarr: '⇊', - ddotseq: '⩷', - deg: '°', - delta: 'δ', - demptyv: '⦱', - dfisht: '⥿', - dfr: '𝔡', - dharl: '⇃', - dharr: '⇂', - diam: '⋄', - diamond: '⋄', - diamondsuit: '♦', - diams: '♦', - die: '¨', - digamma: 'ϝ', - disin: '⋲', - div: '÷', - divide: '÷', - divideontimes: '⋇', - divonx: '⋇', - djcy: 'ђ', - dlcorn: '⌞', - dlcrop: '⌍', - dollar: '$', - dopf: '𝕕', - dot: '˙', - doteq: '≐', - doteqdot: '≑', - dotminus: '∸', - dotplus: '∔', - dotsquare: '⊡', - doublebarwedge: '⌆', - downarrow: '↓', - downdownarrows: '⇊', - downharpoonleft: '⇃', - downharpoonright: '⇂', - drbkarow: '⤐', - drcorn: '⌟', - drcrop: '⌌', - dscr: '𝒹', - dscy: 'ѕ', - dsol: '⧶', - dstrok: 'đ', - dtdot: '⋱', - dtri: '▿', - dtrif: '▾', - duarr: '⇵', - duhar: '⥯', - dwangle: '⦦', - dzcy: 'џ', - dzigrarr: '⟿', - eDDot: '⩷', - eDot: '≑', - eacute: 'é', - easter: '⩮', - ecaron: 'ě', - ecir: '≖', - ecirc: 'ê', - ecolon: '≕', - ecy: 'э', - edot: 'ė', - ee: 'ⅇ', - efDot: '≒', - efr: '𝔢', - eg: '⪚', - egrave: 'è', - egs: '⪖', - egsdot: '⪘', - el: '⪙', - elinters: '⏧', - ell: 'ℓ', - els: '⪕', - elsdot: '⪗', - emacr: 'ē', - empty: '∅', - emptyset: '∅', - emptyv: '∅', - emsp13: ' ', - emsp14: ' ', - emsp: ' ', - eng: 'ŋ', - ensp: ' ', - eogon: 'ę', - eopf: '𝕖', - epar: '⋕', - eparsl: '⧣', - eplus: '⩱', - epsi: 'ε', - epsilon: 'ε', - epsiv: 'ϵ', - eqcirc: '≖', - eqcolon: '≕', - eqsim: '≂', - eqslantgtr: '⪖', - eqslantless: '⪕', - equals: '=', - equest: '≟', - equiv: '≡', - equivDD: '⩸', - eqvparsl: '⧥', - erDot: '≓', - erarr: '⥱', - escr: 'ℯ', - esdot: '≐', - esim: '≂', - eta: 'η', - eth: 'ð', - euml: 'ë', - euro: '€', - excl: '!', - exist: '∃', - expectation: 'ℰ', - exponentiale: 'ⅇ', - fallingdotseq: '≒', - fcy: 'ф', - female: '♀', - ffilig: 'ffi', - fflig: 'ff', - ffllig: 'ffl', - ffr: '𝔣', - filig: 'fi', - fjlig: 'fj', - flat: '♭', - fllig: 'fl', - fltns: '▱', - fnof: 'ƒ', - fopf: '𝕗', - forall: '∀', - fork: '⋔', - forkv: '⫙', - fpartint: '⨍', - frac12: '½', - frac13: '⅓', - frac14: '¼', - frac15: '⅕', - frac16: '⅙', - frac18: '⅛', - frac23: '⅔', - frac25: '⅖', - frac34: '¾', - frac35: '⅗', - frac38: '⅜', - frac45: '⅘', - frac56: '⅚', - frac58: '⅝', - frac78: '⅞', - frasl: '⁄', - frown: '⌢', - fscr: '𝒻', - gE: '≧', - gEl: '⪌', - gacute: 'ǵ', - gamma: 'γ', - gammad: 'ϝ', - gap: '⪆', - gbreve: 'ğ', - gcirc: 'ĝ', - gcy: 'г', - gdot: 'ġ', - ge: '≥', - gel: '⋛', - geq: '≥', - geqq: '≧', - geqslant: '⩾', - ges: '⩾', - gescc: '⪩', - gesdot: '⪀', - gesdoto: '⪂', - gesdotol: '⪄', - gesl: '⋛︀', - gesles: '⪔', - gfr: '𝔤', - gg: '≫', - ggg: '⋙', - gimel: 'ℷ', - gjcy: 'ѓ', - gl: '≷', - glE: '⪒', - gla: '⪥', - glj: '⪤', - gnE: '≩', - gnap: '⪊', - gnapprox: '⪊', - gne: '⪈', - gneq: '⪈', - gneqq: '≩', - gnsim: '⋧', - gopf: '𝕘', - grave: '`', - gscr: 'ℊ', - gsim: '≳', - gsime: '⪎', - gsiml: '⪐', - gt: '>', - gtcc: '⪧', - gtcir: '⩺', - gtdot: '⋗', - gtlPar: '⦕', - gtquest: '⩼', - gtrapprox: '⪆', - gtrarr: '⥸', - gtrdot: '⋗', - gtreqless: '⋛', - gtreqqless: '⪌', - gtrless: '≷', - gtrsim: '≳', - gvertneqq: '≩︀', - gvnE: '≩︀', - hArr: '⇔', - hairsp: ' ', - half: '½', - hamilt: 'ℋ', - hardcy: 'ъ', - harr: '↔', - harrcir: '⥈', - harrw: '↭', - hbar: 'ℏ', - hcirc: 'ĥ', - hearts: '♥', - heartsuit: '♥', - hellip: '…', - hercon: '⊹', - hfr: '𝔥', - hksearow: '⤥', - hkswarow: '⤦', - hoarr: '⇿', - homtht: '∻', - hookleftarrow: '↩', - hookrightarrow: '↪', - hopf: '𝕙', - horbar: '―', - hscr: '𝒽', - hslash: 'ℏ', - hstrok: 'ħ', - hybull: '⁃', - hyphen: '‐', - iacute: 'í', - ic: '⁣', - icirc: 'î', - icy: 'и', - iecy: 'е', - iexcl: '¡', - iff: '⇔', - ifr: '𝔦', - igrave: 'ì', - ii: 'ⅈ', - iiiint: '⨌', - iiint: '∭', - iinfin: '⧜', - iiota: '℩', - ijlig: 'ij', - imacr: 'ī', - image: 'ℑ', - imagline: 'ℐ', - imagpart: 'ℑ', - imath: 'ı', - imof: '⊷', - imped: 'Ƶ', - in: '∈', - incare: '℅', - infin: '∞', - infintie: '⧝', - inodot: 'ı', - int: '∫', - intcal: '⊺', - integers: 'ℤ', - intercal: '⊺', - intlarhk: '⨗', - intprod: '⨼', - iocy: 'ё', - iogon: 'į', - iopf: '𝕚', - iota: 'ι', - iprod: '⨼', - iquest: '¿', - iscr: '𝒾', - isin: '∈', - isinE: '⋹', - isindot: '⋵', - isins: '⋴', - isinsv: '⋳', - isinv: '∈', - it: '⁢', - itilde: 'ĩ', - iukcy: 'і', - iuml: 'ï', - jcirc: 'ĵ', - jcy: 'й', - jfr: '𝔧', - jmath: 'ȷ', - jopf: '𝕛', - jscr: '𝒿', - jsercy: 'ј', - jukcy: 'є', - kappa: 'κ', - kappav: 'ϰ', - kcedil: 'ķ', - kcy: 'к', - kfr: '𝔨', - kgreen: 'ĸ', - khcy: 'х', - kjcy: 'ќ', - kopf: '𝕜', - kscr: '𝓀', - lAarr: '⇚', - lArr: '⇐', - lAtail: '⤛', - lBarr: '⤎', - lE: '≦', - lEg: '⪋', - lHar: '⥢', - lacute: 'ĺ', - laemptyv: '⦴', - lagran: 'ℒ', - lambda: 'λ', - lang: '⟨', - langd: '⦑', - langle: '⟨', - lap: '⪅', - laquo: '«', - larr: '←', - larrb: '⇤', - larrbfs: '⤟', - larrfs: '⤝', - larrhk: '↩', - larrlp: '↫', - larrpl: '⤹', - larrsim: '⥳', - larrtl: '↢', - lat: '⪫', - latail: '⤙', - late: '⪭', - lates: '⪭︀', - lbarr: '⤌', - lbbrk: '❲', - lbrace: '{', - lbrack: '[', - lbrke: '⦋', - lbrksld: '⦏', - lbrkslu: '⦍', - lcaron: 'ľ', - lcedil: 'ļ', - lceil: '⌈', - lcub: '{', - lcy: 'л', - ldca: '⤶', - ldquo: '“', - ldquor: '„', - ldrdhar: '⥧', - ldrushar: '⥋', - ldsh: '↲', - le: '≤', - leftarrow: '←', - leftarrowtail: '↢', - leftharpoondown: '↽', - leftharpoonup: '↼', - leftleftarrows: '⇇', - leftrightarrow: '↔', - leftrightarrows: '⇆', - leftrightharpoons: '⇋', - leftrightsquigarrow: '↭', - leftthreetimes: '⋋', - leg: '⋚', - leq: '≤', - leqq: '≦', - leqslant: '⩽', - les: '⩽', - lescc: '⪨', - lesdot: '⩿', - lesdoto: '⪁', - lesdotor: '⪃', - lesg: '⋚︀', - lesges: '⪓', - lessapprox: '⪅', - lessdot: '⋖', - lesseqgtr: '⋚', - lesseqqgtr: '⪋', - lessgtr: '≶', - lesssim: '≲', - lfisht: '⥼', - lfloor: '⌊', - lfr: '𝔩', - lg: '≶', - lgE: '⪑', - lhard: '↽', - lharu: '↼', - lharul: '⥪', - lhblk: '▄', - ljcy: 'љ', - ll: '≪', - llarr: '⇇', - llcorner: '⌞', - llhard: '⥫', - lltri: '◺', - lmidot: 'ŀ', - lmoust: '⎰', - lmoustache: '⎰', - lnE: '≨', - lnap: '⪉', - lnapprox: '⪉', - lne: '⪇', - lneq: '⪇', - lneqq: '≨', - lnsim: '⋦', - loang: '⟬', - loarr: '⇽', - lobrk: '⟦', - longleftarrow: '⟵', - longleftrightarrow: '⟷', - longmapsto: '⟼', - longrightarrow: '⟶', - looparrowleft: '↫', - looparrowright: '↬', - lopar: '⦅', - lopf: '𝕝', - loplus: '⨭', - lotimes: '⨴', - lowast: '∗', - lowbar: '_', - loz: '◊', - lozenge: '◊', - lozf: '⧫', - lpar: '(', - lparlt: '⦓', - lrarr: '⇆', - lrcorner: '⌟', - lrhar: '⇋', - lrhard: '⥭', - lrm: '‎', - lrtri: '⊿', - lsaquo: '‹', - lscr: '𝓁', - lsh: '↰', - lsim: '≲', - lsime: '⪍', - lsimg: '⪏', - lsqb: '[', - lsquo: '‘', - lsquor: '‚', - lstrok: 'ł', - lt: '<', - ltcc: '⪦', - ltcir: '⩹', - ltdot: '⋖', - lthree: '⋋', - ltimes: '⋉', - ltlarr: '⥶', - ltquest: '⩻', - ltrPar: '⦖', - ltri: '◃', - ltrie: '⊴', - ltrif: '◂', - lurdshar: '⥊', - luruhar: '⥦', - lvertneqq: '≨︀', - lvnE: '≨︀', - mDDot: '∺', - macr: '¯', - male: '♂', - malt: '✠', - maltese: '✠', - map: '↦', - mapsto: '↦', - mapstodown: '↧', - mapstoleft: '↤', - mapstoup: '↥', - marker: '▮', - mcomma: '⨩', - mcy: 'м', - mdash: '—', - measuredangle: '∡', - mfr: '𝔪', - mho: '℧', - micro: 'µ', - mid: '∣', - midast: '*', - midcir: '⫰', - middot: '·', - minus: '−', - minusb: '⊟', - minusd: '∸', - minusdu: '⨪', - mlcp: '⫛', - mldr: '…', - mnplus: '∓', - models: '⊧', - mopf: '𝕞', - mp: '∓', - mscr: '𝓂', - mstpos: '∾', - mu: 'μ', - multimap: '⊸', - mumap: '⊸', - nGg: '⋙̸', - nGt: '≫⃒', - nGtv: '≫̸', - nLeftarrow: '⇍', - nLeftrightarrow: '⇎', - nLl: '⋘̸', - nLt: '≪⃒', - nLtv: '≪̸', - nRightarrow: '⇏', - nVDash: '⊯', - nVdash: '⊮', - nabla: '∇', - nacute: 'ń', - nang: '∠⃒', - nap: '≉', - napE: '⩰̸', - napid: '≋̸', - napos: 'ʼn', - napprox: '≉', - natur: '♮', - natural: '♮', - naturals: 'ℕ', - nbsp: ' ', - nbump: '≎̸', - nbumpe: '≏̸', - ncap: '⩃', - ncaron: 'ň', - ncedil: 'ņ', - ncong: '≇', - ncongdot: '⩭̸', - ncup: '⩂', - ncy: 'н', - ndash: '–', - ne: '≠', - neArr: '⇗', - nearhk: '⤤', - nearr: '↗', - nearrow: '↗', - nedot: '≐̸', - nequiv: '≢', - nesear: '⤨', - nesim: '≂̸', - nexist: '∄', - nexists: '∄', - nfr: '𝔫', - ngE: '≧̸', - nge: '≱', - ngeq: '≱', - ngeqq: '≧̸', - ngeqslant: '⩾̸', - nges: '⩾̸', - ngsim: '≵', - ngt: '≯', - ngtr: '≯', - nhArr: '⇎', - nharr: '↮', - nhpar: '⫲', - ni: '∋', - nis: '⋼', - nisd: '⋺', - niv: '∋', - njcy: 'њ', - nlArr: '⇍', - nlE: '≦̸', - nlarr: '↚', - nldr: '‥', - nle: '≰', - nleftarrow: '↚', - nleftrightarrow: '↮', - nleq: '≰', - nleqq: '≦̸', - nleqslant: '⩽̸', - nles: '⩽̸', - nless: '≮', - nlsim: '≴', - nlt: '≮', - nltri: '⋪', - nltrie: '⋬', - nmid: '∤', - nopf: '𝕟', - not: '¬', - notin: '∉', - notinE: '⋹̸', - notindot: '⋵̸', - notinva: '∉', - notinvb: '⋷', - notinvc: '⋶', - notni: '∌', - notniva: '∌', - notnivb: '⋾', - notnivc: '⋽', - npar: '∦', - nparallel: '∦', - nparsl: '⫽⃥', - npart: '∂̸', - npolint: '⨔', - npr: '⊀', - nprcue: '⋠', - npre: '⪯̸', - nprec: '⊀', - npreceq: '⪯̸', - nrArr: '⇏', - nrarr: '↛', - nrarrc: '⤳̸', - nrarrw: '↝̸', - nrightarrow: '↛', - nrtri: '⋫', - nrtrie: '⋭', - nsc: '⊁', - nsccue: '⋡', - nsce: '⪰̸', - nscr: '𝓃', - nshortmid: '∤', - nshortparallel: '∦', - nsim: '≁', - nsime: '≄', - nsimeq: '≄', - nsmid: '∤', - nspar: '∦', - nsqsube: '⋢', - nsqsupe: '⋣', - nsub: '⊄', - nsubE: '⫅̸', - nsube: '⊈', - nsubset: '⊂⃒', - nsubseteq: '⊈', - nsubseteqq: '⫅̸', - nsucc: '⊁', - nsucceq: '⪰̸', - nsup: '⊅', - nsupE: '⫆̸', - nsupe: '⊉', - nsupset: '⊃⃒', - nsupseteq: '⊉', - nsupseteqq: '⫆̸', - ntgl: '≹', - ntilde: 'ñ', - ntlg: '≸', - ntriangleleft: '⋪', - ntrianglelefteq: '⋬', - ntriangleright: '⋫', - ntrianglerighteq: '⋭', - nu: 'ν', - num: '#', - numero: '№', - numsp: ' ', - nvDash: '⊭', - nvHarr: '⤄', - nvap: '≍⃒', - nvdash: '⊬', - nvge: '≥⃒', - nvgt: '>⃒', - nvinfin: '⧞', - nvlArr: '⤂', - nvle: '≤⃒', - nvlt: '<⃒', - nvltrie: '⊴⃒', - nvrArr: '⤃', - nvrtrie: '⊵⃒', - nvsim: '∼⃒', - nwArr: '⇖', - nwarhk: '⤣', - nwarr: '↖', - nwarrow: '↖', - nwnear: '⤧', - oS: 'Ⓢ', - oacute: 'ó', - oast: '⊛', - ocir: '⊚', - ocirc: 'ô', - ocy: 'о', - odash: '⊝', - odblac: 'ő', - odiv: '⨸', - odot: '⊙', - odsold: '⦼', - oelig: 'œ', - ofcir: '⦿', - ofr: '𝔬', - ogon: '˛', - ograve: 'ò', - ogt: '⧁', - ohbar: '⦵', - ohm: 'Ω', - oint: '∮', - olarr: '↺', - olcir: '⦾', - olcross: '⦻', - oline: '‾', - olt: '⧀', - omacr: 'ō', - omega: 'ω', - omicron: 'ο', - omid: '⦶', - ominus: '⊖', - oopf: '𝕠', - opar: '⦷', - operp: '⦹', - oplus: '⊕', - or: '∨', - orarr: '↻', - ord: '⩝', - order: 'ℴ', - orderof: 'ℴ', - ordf: 'ª', - ordm: 'º', - origof: '⊶', - oror: '⩖', - orslope: '⩗', - orv: '⩛', - oscr: 'ℴ', - oslash: 'ø', - osol: '⊘', - otilde: 'õ', - otimes: '⊗', - otimesas: '⨶', - ouml: 'ö', - ovbar: '⌽', - par: '∥', - para: '¶', - parallel: '∥', - parsim: '⫳', - parsl: '⫽', - part: '∂', - pcy: 'п', - percnt: '%', - period: '.', - permil: '‰', - perp: '⊥', - pertenk: '‱', - pfr: '𝔭', - phi: 'φ', - phiv: 'ϕ', - phmmat: 'ℳ', - phone: '☎', - pi: 'π', - pitchfork: '⋔', - piv: 'ϖ', - planck: 'ℏ', - planckh: 'ℎ', - plankv: 'ℏ', - plus: '+', - plusacir: '⨣', - plusb: '⊞', - pluscir: '⨢', - plusdo: '∔', - plusdu: '⨥', - pluse: '⩲', - plusmn: '±', - plussim: '⨦', - plustwo: '⨧', - pm: '±', - pointint: '⨕', - popf: '𝕡', - pound: '£', - pr: '≺', - prE: '⪳', - prap: '⪷', - prcue: '≼', - pre: '⪯', - prec: '≺', - precapprox: '⪷', - preccurlyeq: '≼', - preceq: '⪯', - precnapprox: '⪹', - precneqq: '⪵', - precnsim: '⋨', - precsim: '≾', - prime: '′', - primes: 'ℙ', - prnE: '⪵', - prnap: '⪹', - prnsim: '⋨', - prod: '∏', - profalar: '⌮', - profline: '⌒', - profsurf: '⌓', - prop: '∝', - propto: '∝', - prsim: '≾', - prurel: '⊰', - pscr: '𝓅', - psi: 'ψ', - puncsp: ' ', - qfr: '𝔮', - qint: '⨌', - qopf: '𝕢', - qprime: '⁗', - qscr: '𝓆', - quaternions: 'ℍ', - quatint: '⨖', - quest: '?', - questeq: '≟', - quot: '"', - rAarr: '⇛', - rArr: '⇒', - rAtail: '⤜', - rBarr: '⤏', - rHar: '⥤', - race: '∽̱', - racute: 'ŕ', - radic: '√', - raemptyv: '⦳', - rang: '⟩', - rangd: '⦒', - range: '⦥', - rangle: '⟩', - raquo: '»', - rarr: '→', - rarrap: '⥵', - rarrb: '⇥', - rarrbfs: '⤠', - rarrc: '⤳', - rarrfs: '⤞', - rarrhk: '↪', - rarrlp: '↬', - rarrpl: '⥅', - rarrsim: '⥴', - rarrtl: '↣', - rarrw: '↝', - ratail: '⤚', - ratio: '∶', - rationals: 'ℚ', - rbarr: '⤍', - rbbrk: '❳', - rbrace: '}', - rbrack: ']', - rbrke: '⦌', - rbrksld: '⦎', - rbrkslu: '⦐', - rcaron: 'ř', - rcedil: 'ŗ', - rceil: '⌉', - rcub: '}', - rcy: 'р', - rdca: '⤷', - rdldhar: '⥩', - rdquo: '”', - rdquor: '”', - rdsh: '↳', - real: 'ℜ', - realine: 'ℛ', - realpart: 'ℜ', - reals: 'ℝ', - rect: '▭', - reg: '®', - rfisht: '⥽', - rfloor: '⌋', - rfr: '𝔯', - rhard: '⇁', - rharu: '⇀', - rharul: '⥬', - rho: 'ρ', - rhov: 'ϱ', - rightarrow: '→', - rightarrowtail: '↣', - rightharpoondown: '⇁', - rightharpoonup: '⇀', - rightleftarrows: '⇄', - rightleftharpoons: '⇌', - rightrightarrows: '⇉', - rightsquigarrow: '↝', - rightthreetimes: '⋌', - ring: '˚', - risingdotseq: '≓', - rlarr: '⇄', - rlhar: '⇌', - rlm: '‏', - rmoust: '⎱', - rmoustache: '⎱', - rnmid: '⫮', - roang: '⟭', - roarr: '⇾', - robrk: '⟧', - ropar: '⦆', - ropf: '𝕣', - roplus: '⨮', - rotimes: '⨵', - rpar: ')', - rpargt: '⦔', - rppolint: '⨒', - rrarr: '⇉', - rsaquo: '›', - rscr: '𝓇', - rsh: '↱', - rsqb: ']', - rsquo: '’', - rsquor: '’', - rthree: '⋌', - rtimes: '⋊', - rtri: '▹', - rtrie: '⊵', - rtrif: '▸', - rtriltri: '⧎', - ruluhar: '⥨', - rx: '℞', - sacute: 'ś', - sbquo: '‚', - sc: '≻', - scE: '⪴', - scap: '⪸', - scaron: 'š', - sccue: '≽', - sce: '⪰', - scedil: 'ş', - scirc: 'ŝ', - scnE: '⪶', - scnap: '⪺', - scnsim: '⋩', - scpolint: '⨓', - scsim: '≿', - scy: 'с', - sdot: '⋅', - sdotb: '⊡', - sdote: '⩦', - seArr: '⇘', - searhk: '⤥', - searr: '↘', - searrow: '↘', - sect: '§', - semi: ';', - seswar: '⤩', - setminus: '∖', - setmn: '∖', - sext: '✶', - sfr: '𝔰', - sfrown: '⌢', - sharp: '♯', - shchcy: 'щ', - shcy: 'ш', - shortmid: '∣', - shortparallel: '∥', - shy: '­', - sigma: 'σ', - sigmaf: 'ς', - sigmav: 'ς', - sim: '∼', - simdot: '⩪', - sime: '≃', - simeq: '≃', - simg: '⪞', - simgE: '⪠', - siml: '⪝', - simlE: '⪟', - simne: '≆', - simplus: '⨤', - simrarr: '⥲', - slarr: '←', - smallsetminus: '∖', - smashp: '⨳', - smeparsl: '⧤', - smid: '∣', - smile: '⌣', - smt: '⪪', - smte: '⪬', - smtes: '⪬︀', - softcy: 'ь', - sol: '/', - solb: '⧄', - solbar: '⌿', - sopf: '𝕤', - spades: '♠', - spadesuit: '♠', - spar: '∥', - sqcap: '⊓', - sqcaps: '⊓︀', - sqcup: '⊔', - sqcups: '⊔︀', - sqsub: '⊏', - sqsube: '⊑', - sqsubset: '⊏', - sqsubseteq: '⊑', - sqsup: '⊐', - sqsupe: '⊒', - sqsupset: '⊐', - sqsupseteq: '⊒', - squ: '□', - square: '□', - squarf: '▪', - squf: '▪', - srarr: '→', - sscr: '𝓈', - ssetmn: '∖', - ssmile: '⌣', - sstarf: '⋆', - star: '☆', - starf: '★', - straightepsilon: 'ϵ', - straightphi: 'ϕ', - strns: '¯', - sub: '⊂', - subE: '⫅', - subdot: '⪽', - sube: '⊆', - subedot: '⫃', - submult: '⫁', - subnE: '⫋', - subne: '⊊', - subplus: '⪿', - subrarr: '⥹', - subset: '⊂', - subseteq: '⊆', - subseteqq: '⫅', - subsetneq: '⊊', - subsetneqq: '⫋', - subsim: '⫇', - subsub: '⫕', - subsup: '⫓', - succ: '≻', - succapprox: '⪸', - succcurlyeq: '≽', - succeq: '⪰', - succnapprox: '⪺', - succneqq: '⪶', - succnsim: '⋩', - succsim: '≿', - sum: '∑', - sung: '♪', - sup1: '¹', - sup2: '²', - sup3: '³', - sup: '⊃', - supE: '⫆', - supdot: '⪾', - supdsub: '⫘', - supe: '⊇', - supedot: '⫄', - suphsol: '⟉', - suphsub: '⫗', - suplarr: '⥻', - supmult: '⫂', - supnE: '⫌', - supne: '⊋', - supplus: '⫀', - supset: '⊃', - supseteq: '⊇', - supseteqq: '⫆', - supsetneq: '⊋', - supsetneqq: '⫌', - supsim: '⫈', - supsub: '⫔', - supsup: '⫖', - swArr: '⇙', - swarhk: '⤦', - swarr: '↙', - swarrow: '↙', - swnwar: '⤪', - szlig: 'ß', - target: '⌖', - tau: 'τ', - tbrk: '⎴', - tcaron: 'ť', - tcedil: 'ţ', - tcy: 'т', - tdot: '⃛', - telrec: '⌕', - tfr: '𝔱', - there4: '∴', - therefore: '∴', - theta: 'θ', - thetasym: 'ϑ', - thetav: 'ϑ', - thickapprox: '≈', - thicksim: '∼', - thinsp: ' ', - thkap: '≈', - thksim: '∼', - thorn: 'þ', - tilde: '˜', - times: '×', - timesb: '⊠', - timesbar: '⨱', - timesd: '⨰', - tint: '∭', - toea: '⤨', - top: '⊤', - topbot: '⌶', - topcir: '⫱', - topf: '𝕥', - topfork: '⫚', - tosa: '⤩', - tprime: '‴', - trade: '™', - triangle: '▵', - triangledown: '▿', - triangleleft: '◃', - trianglelefteq: '⊴', - triangleq: '≜', - triangleright: '▹', - trianglerighteq: '⊵', - tridot: '◬', - trie: '≜', - triminus: '⨺', - triplus: '⨹', - trisb: '⧍', - tritime: '⨻', - trpezium: '⏢', - tscr: '𝓉', - tscy: 'ц', - tshcy: 'ћ', - tstrok: 'ŧ', - twixt: '≬', - twoheadleftarrow: '↞', - twoheadrightarrow: '↠', - uArr: '⇑', - uHar: '⥣', - uacute: 'ú', - uarr: '↑', - ubrcy: 'ў', - ubreve: 'ŭ', - ucirc: 'û', - ucy: 'у', - udarr: '⇅', - udblac: 'ű', - udhar: '⥮', - ufisht: '⥾', - ufr: '𝔲', - ugrave: 'ù', - uharl: '↿', - uharr: '↾', - uhblk: '▀', - ulcorn: '⌜', - ulcorner: '⌜', - ulcrop: '⌏', - ultri: '◸', - umacr: 'ū', - uml: '¨', - uogon: 'ų', - uopf: '𝕦', - uparrow: '↑', - updownarrow: '↕', - upharpoonleft: '↿', - upharpoonright: '↾', - uplus: '⊎', - upsi: 'υ', - upsih: 'ϒ', - upsilon: 'υ', - upuparrows: '⇈', - urcorn: '⌝', - urcorner: '⌝', - urcrop: '⌎', - uring: 'ů', - urtri: '◹', - uscr: '𝓊', - utdot: '⋰', - utilde: 'ũ', - utri: '▵', - utrif: '▴', - uuarr: '⇈', - uuml: 'ü', - uwangle: '⦧', - vArr: '⇕', - vBar: '⫨', - vBarv: '⫩', - vDash: '⊨', - vangrt: '⦜', - varepsilon: 'ϵ', - varkappa: 'ϰ', - varnothing: '∅', - varphi: 'ϕ', - varpi: 'ϖ', - varpropto: '∝', - varr: '↕', - varrho: 'ϱ', - varsigma: 'ς', - varsubsetneq: '⊊︀', - varsubsetneqq: '⫋︀', - varsupsetneq: '⊋︀', - varsupsetneqq: '⫌︀', - vartheta: 'ϑ', - vartriangleleft: '⊲', - vartriangleright: '⊳', - vcy: 'в', - vdash: '⊢', - vee: '∨', - veebar: '⊻', - veeeq: '≚', - vellip: '⋮', - verbar: '|', - vert: '|', - vfr: '𝔳', - vltri: '⊲', - vnsub: '⊂⃒', - vnsup: '⊃⃒', - vopf: '𝕧', - vprop: '∝', - vrtri: '⊳', - vscr: '𝓋', - vsubnE: '⫋︀', - vsubne: '⊊︀', - vsupnE: '⫌︀', - vsupne: '⊋︀', - vzigzag: '⦚', - wcirc: 'ŵ', - wedbar: '⩟', - wedge: '∧', - wedgeq: '≙', - weierp: '℘', - wfr: '𝔴', - wopf: '𝕨', - wp: '℘', - wr: '≀', - wreath: '≀', - wscr: '𝓌', - xcap: '⋂', - xcirc: '◯', - xcup: '⋃', - xdtri: '▽', - xfr: '𝔵', - xhArr: '⟺', - xharr: '⟷', - xi: 'ξ', - xlArr: '⟸', - xlarr: '⟵', - xmap: '⟼', - xnis: '⋻', - xodot: '⨀', - xopf: '𝕩', - xoplus: '⨁', - xotime: '⨂', - xrArr: '⟹', - xrarr: '⟶', - xscr: '𝓍', - xsqcup: '⨆', - xuplus: '⨄', - xutri: '△', - xvee: '⋁', - xwedge: '⋀', - yacute: 'ý', - yacy: 'я', - ycirc: 'ŷ', - ycy: 'ы', - yen: '¥', - yfr: '𝔶', - yicy: 'ї', - yopf: '𝕪', - yscr: '𝓎', - yucy: 'ю', - yuml: 'ÿ', - zacute: 'ź', - zcaron: 'ž', - zcy: 'з', - zdot: 'ż', - zeetrf: 'ℨ', - zeta: 'ζ', - zfr: '𝔷', - zhcy: 'ж', - zigrarr: '⇝', - zopf: '𝕫', - zscr: '𝓏', - zwj: '‍', - zwnj: '‌' -} - -;// CONCATENATED MODULE: ./node_modules/decode-named-character-reference/index.js - - -const own = {}.hasOwnProperty - -/** - * Decode a single character reference (without the `&` or `;`). - * You probably only need this when you’re building parsers yourself that follow - * different rules compared to HTML. - * This is optimized to be tiny in browsers. - * - * @param {string} value - * `notin` (named), `#123` (deci), `#x123` (hexa). - * @returns {string|false} - * Decoded reference. - */ -function decodeNamedCharacterReference(value) { - return own.call(characterEntities, value) ? characterEntities[value] : false -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/character-reference.js -/** - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const characterReference = { - name: 'characterReference', - tokenize: tokenizeCharacterReference -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeCharacterReference(effects, ok, nok) { - const self = this - let size = 0 - /** @type {number} */ - let max - /** @type {(code: Code) => boolean} */ - let test - return start - - /** - * Start of character reference. - * - * ```markdown - * > | a&b - * ^ - * > | a{b - * ^ - * > | a b - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter('characterReference') - effects.enter('characterReferenceMarker') - effects.consume(code) - effects.exit('characterReferenceMarker') - return open - } - - /** - * After `&`, at `#` for numeric references or alphanumeric for named - * references. - * - * ```markdown - * > | a&b - * ^ - * > | a{b - * ^ - * > | a b - * ^ - * ``` - * - * @type {State} - */ - function open(code) { - if (code === 35) { - effects.enter('characterReferenceMarkerNumeric') - effects.consume(code) - effects.exit('characterReferenceMarkerNumeric') - return numeric - } - effects.enter('characterReferenceValue') - max = 31 - test = asciiAlphanumeric - return value(code) - } - - /** - * After `#`, at `x` for hexadecimals or digit for decimals. - * - * ```markdown - * > | a{b - * ^ - * > | a b - * ^ - * ``` - * - * @type {State} - */ - function numeric(code) { - if (code === 88 || code === 120) { - effects.enter('characterReferenceMarkerHexadecimal') - effects.consume(code) - effects.exit('characterReferenceMarkerHexadecimal') - effects.enter('characterReferenceValue') - max = 6 - test = asciiHexDigit - return value - } - effects.enter('characterReferenceValue') - max = 7 - test = asciiDigit - return value(code) - } - - /** - * After markers (`&#x`, `&#`, or `&`), in value, before `;`. - * - * The character reference kind defines what and how many characters are - * allowed. - * - * ```markdown - * > | a&b - * ^^^ - * > | a{b - * ^^^ - * > | a b - * ^ - * ``` - * - * @type {State} - */ - function value(code) { - if (code === 59 && size) { - const token = effects.exit('characterReferenceValue') - if ( - test === asciiAlphanumeric && - !decodeNamedCharacterReference(self.sliceSerialize(token)) - ) { - return nok(code) - } - - // To do: `markdown-rs` uses a different name: - // `CharacterReferenceMarkerSemi`. - effects.enter('characterReferenceMarker') - effects.consume(code) - effects.exit('characterReferenceMarker') - effects.exit('characterReference') - return ok - } - if (test(code) && size++ < max) { - effects.consume(code) - return value - } - return nok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/character-escape.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - -/** @type {Construct} */ -const characterEscape = { - name: 'characterEscape', - tokenize: tokenizeCharacterEscape -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeCharacterEscape(effects, ok, nok) { - return start - - /** - * Start of character escape. - * - * ```markdown - * > | a\*b - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter('characterEscape') - effects.enter('escapeMarker') - effects.consume(code) - effects.exit('escapeMarker') - return inside - } - - /** - * After `\`, at punctuation. - * - * ```markdown - * > | a\*b - * ^ - * ``` - * - * @type {State} - */ - function inside(code) { - // ASCII punctuation. - if (asciiPunctuation(code)) { - effects.enter('characterEscapeValue') - effects.consume(code) - effects.exit('characterEscapeValue') - effects.exit('characterEscape') - return ok - } - return nok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/line-ending.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const lineEnding = { - name: 'lineEnding', - tokenize: tokenizeLineEnding -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeLineEnding(effects, ok) { - return start - - /** @type {State} */ - function start(code) { - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return factorySpace(effects, ok, 'linePrefix') - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/label-end.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').Event} Event - * @typedef {import('micromark-util-types').Resolver} Resolver - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').Token} Token - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - - - - - - - -/** @type {Construct} */ -const labelEnd = { - name: 'labelEnd', - tokenize: tokenizeLabelEnd, - resolveTo: resolveToLabelEnd, - resolveAll: resolveAllLabelEnd -} - -/** @type {Construct} */ -const resourceConstruct = { - tokenize: tokenizeResource -} -/** @type {Construct} */ -const referenceFullConstruct = { - tokenize: tokenizeReferenceFull -} -/** @type {Construct} */ -const referenceCollapsedConstruct = { - tokenize: tokenizeReferenceCollapsed -} - -/** @type {Resolver} */ -function resolveAllLabelEnd(events) { - let index = -1 - while (++index < events.length) { - const token = events[index][1] - if ( - token.type === 'labelImage' || - token.type === 'labelLink' || - token.type === 'labelEnd' - ) { - // Remove the marker. - events.splice(index + 1, token.type === 'labelImage' ? 4 : 2) - token.type = 'data' - index++ - } - } - return events -} - -/** @type {Resolver} */ -function resolveToLabelEnd(events, context) { - let index = events.length - let offset = 0 - /** @type {Token} */ - let token - /** @type {number | undefined} */ - let open - /** @type {number | undefined} */ - let close - /** @type {Array} */ - let media - - // Find an opening. - while (index--) { - token = events[index][1] - if (open) { - // If we see another link, or inactive link label, we’ve been here before. - if ( - token.type === 'link' || - (token.type === 'labelLink' && token._inactive) - ) { - break - } - - // Mark other link openings as inactive, as we can’t have links in - // links. - if (events[index][0] === 'enter' && token.type === 'labelLink') { - token._inactive = true - } - } else if (close) { - if ( - events[index][0] === 'enter' && - (token.type === 'labelImage' || token.type === 'labelLink') && - !token._balanced - ) { - open = index - if (token.type !== 'labelLink') { - offset = 2 - break - } - } - } else if (token.type === 'labelEnd') { - close = index - } - } - const group = { - type: events[open][1].type === 'labelLink' ? 'link' : 'image', - start: Object.assign({}, events[open][1].start), - end: Object.assign({}, events[events.length - 1][1].end) - } - const label = { - type: 'label', - start: Object.assign({}, events[open][1].start), - end: Object.assign({}, events[close][1].end) - } - const text = { - type: 'labelText', - start: Object.assign({}, events[open + offset + 2][1].end), - end: Object.assign({}, events[close - 2][1].start) - } - media = [ - ['enter', group, context], - ['enter', label, context] - ] - - // Opening marker. - media = push(media, events.slice(open + 1, open + offset + 3)) - - // Text open. - media = push(media, [['enter', text, context]]) - - // Always populated by defaults. - - // Between. - media = push( - media, - resolveAll( - context.parser.constructs.insideSpan.null, - events.slice(open + offset + 4, close - 3), - context - ) - ) - - // Text close, marker close, label close. - media = push(media, [ - ['exit', text, context], - events[close - 2], - events[close - 1], - ['exit', label, context] - ]) - - // Reference, resource, or so. - media = push(media, events.slice(close + 1)) - - // Media close. - media = push(media, [['exit', group, context]]) - splice(events, open, events.length, media) - return events -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeLabelEnd(effects, ok, nok) { - const self = this - let index = self.events.length - /** @type {Token} */ - let labelStart - /** @type {boolean} */ - let defined - - // Find an opening. - while (index--) { - if ( - (self.events[index][1].type === 'labelImage' || - self.events[index][1].type === 'labelLink') && - !self.events[index][1]._balanced - ) { - labelStart = self.events[index][1] - break - } - } - return start - - /** - * Start of label end. - * - * ```markdown - * > | [a](b) c - * ^ - * > | [a][b] c - * ^ - * > | [a][] b - * ^ - * > | [a] b - * ``` - * - * @type {State} - */ - function start(code) { - // If there is not an okay opening. - if (!labelStart) { - return nok(code) - } - - // If the corresponding label (link) start is marked as inactive, - // it means we’d be wrapping a link, like this: - // - // ```markdown - // > | a [b [c](d) e](f) g. - // ^ - // ``` - // - // We can’t have that, so it’s just balanced brackets. - if (labelStart._inactive) { - return labelEndNok(code) - } - defined = self.parser.defined.includes( - normalizeIdentifier( - self.sliceSerialize({ - start: labelStart.end, - end: self.now() - }) - ) - ) - effects.enter('labelEnd') - effects.enter('labelMarker') - effects.consume(code) - effects.exit('labelMarker') - effects.exit('labelEnd') - return after - } - - /** - * After `]`. - * - * ```markdown - * > | [a](b) c - * ^ - * > | [a][b] c - * ^ - * > | [a][] b - * ^ - * > | [a] b - * ^ - * ``` - * - * @type {State} - */ - function after(code) { - // Note: `markdown-rs` also parses GFM footnotes here, which for us is in - // an extension. - - // Resource (`[asd](fgh)`)? - if (code === 40) { - return effects.attempt( - resourceConstruct, - labelEndOk, - defined ? labelEndOk : labelEndNok - )(code) - } - - // Full (`[asd][fgh]`) or collapsed (`[asd][]`) reference? - if (code === 91) { - return effects.attempt( - referenceFullConstruct, - labelEndOk, - defined ? referenceNotFull : labelEndNok - )(code) - } - - // Shortcut (`[asd]`) reference? - return defined ? labelEndOk(code) : labelEndNok(code) - } - - /** - * After `]`, at `[`, but not at a full reference. - * - * > 👉 **Note**: we only get here if the label is defined. - * - * ```markdown - * > | [a][] b - * ^ - * > | [a] b - * ^ - * ``` - * - * @type {State} - */ - function referenceNotFull(code) { - return effects.attempt( - referenceCollapsedConstruct, - labelEndOk, - labelEndNok - )(code) - } - - /** - * Done, we found something. - * - * ```markdown - * > | [a](b) c - * ^ - * > | [a][b] c - * ^ - * > | [a][] b - * ^ - * > | [a] b - * ^ - * ``` - * - * @type {State} - */ - function labelEndOk(code) { - // Note: `markdown-rs` does a bunch of stuff here. - return ok(code) - } - - /** - * Done, it’s nothing. - * - * There was an okay opening, but we didn’t match anything. - * - * ```markdown - * > | [a](b c - * ^ - * > | [a][b c - * ^ - * > | [a] b - * ^ - * ``` - * - * @type {State} - */ - function labelEndNok(code) { - labelStart._balanced = true - return nok(code) - } -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeResource(effects, ok, nok) { - return resourceStart - - /** - * At a resource. - * - * ```markdown - * > | [a](b) c - * ^ - * ``` - * - * @type {State} - */ - function resourceStart(code) { - effects.enter('resource') - effects.enter('resourceMarker') - effects.consume(code) - effects.exit('resourceMarker') - return resourceBefore - } - - /** - * In resource, after `(`, at optional whitespace. - * - * ```markdown - * > | [a](b) c - * ^ - * ``` - * - * @type {State} - */ - function resourceBefore(code) { - return markdownLineEndingOrSpace(code) - ? factoryWhitespace(effects, resourceOpen)(code) - : resourceOpen(code) - } - - /** - * In resource, after optional whitespace, at `)` or a destination. - * - * ```markdown - * > | [a](b) c - * ^ - * ``` - * - * @type {State} - */ - function resourceOpen(code) { - if (code === 41) { - return resourceEnd(code) - } - return factoryDestination( - effects, - resourceDestinationAfter, - resourceDestinationMissing, - 'resourceDestination', - 'resourceDestinationLiteral', - 'resourceDestinationLiteralMarker', - 'resourceDestinationRaw', - 'resourceDestinationString', - 32 - )(code) - } - - /** - * In resource, after destination, at optional whitespace. - * - * ```markdown - * > | [a](b) c - * ^ - * ``` - * - * @type {State} - */ - function resourceDestinationAfter(code) { - return markdownLineEndingOrSpace(code) - ? factoryWhitespace(effects, resourceBetween)(code) - : resourceEnd(code) - } - - /** - * At invalid destination. - * - * ```markdown - * > | [a](<<) b - * ^ - * ``` - * - * @type {State} - */ - function resourceDestinationMissing(code) { - return nok(code) - } - - /** - * In resource, after destination and whitespace, at `(` or title. - * - * ```markdown - * > | [a](b ) c - * ^ - * ``` - * - * @type {State} - */ - function resourceBetween(code) { - if (code === 34 || code === 39 || code === 40) { - return factoryTitle( - effects, - resourceTitleAfter, - nok, - 'resourceTitle', - 'resourceTitleMarker', - 'resourceTitleString' - )(code) - } - return resourceEnd(code) - } - - /** - * In resource, after title, at optional whitespace. - * - * ```markdown - * > | [a](b "c") d - * ^ - * ``` - * - * @type {State} - */ - function resourceTitleAfter(code) { - return markdownLineEndingOrSpace(code) - ? factoryWhitespace(effects, resourceEnd)(code) - : resourceEnd(code) - } - - /** - * In resource, at `)`. - * - * ```markdown - * > | [a](b) d - * ^ - * ``` - * - * @type {State} - */ - function resourceEnd(code) { - if (code === 41) { - effects.enter('resourceMarker') - effects.consume(code) - effects.exit('resourceMarker') - effects.exit('resource') - return ok - } - return nok(code) - } -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeReferenceFull(effects, ok, nok) { - const self = this - return referenceFull - - /** - * In a reference (full), at the `[`. - * - * ```markdown - * > | [a][b] d - * ^ - * ``` - * - * @type {State} - */ - function referenceFull(code) { - return factoryLabel.call( - self, - effects, - referenceFullAfter, - referenceFullMissing, - 'reference', - 'referenceMarker', - 'referenceString' - )(code) - } - - /** - * In a reference (full), after `]`. - * - * ```markdown - * > | [a][b] d - * ^ - * ``` - * - * @type {State} - */ - function referenceFullAfter(code) { - return self.parser.defined.includes( - normalizeIdentifier( - self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1) - ) - ) - ? ok(code) - : nok(code) - } - - /** - * In reference (full) that was missing. - * - * ```markdown - * > | [a][b d - * ^ - * ``` - * - * @type {State} - */ - function referenceFullMissing(code) { - return nok(code) - } -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeReferenceCollapsed(effects, ok, nok) { - return referenceCollapsedStart - - /** - * In reference (collapsed), at `[`. - * - * > 👉 **Note**: we only get here if the label is defined. - * - * ```markdown - * > | [a][] d - * ^ - * ``` - * - * @type {State} - */ - function referenceCollapsedStart(code) { - // We only attempt a collapsed label if there’s a `[`. - - effects.enter('reference') - effects.enter('referenceMarker') - effects.consume(code) - effects.exit('referenceMarker') - return referenceCollapsedOpen - } - - /** - * In reference (collapsed), at `]`. - * - * > 👉 **Note**: we only get here if the label is defined. - * - * ```markdown - * > | [a][] d - * ^ - * ``` - * - * @type {State} - */ - function referenceCollapsedOpen(code) { - if (code === 93) { - effects.enter('referenceMarker') - effects.consume(code) - effects.exit('referenceMarker') - effects.exit('reference') - return ok - } - return nok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/label-start-image.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const labelStartImage = { - name: 'labelStartImage', - tokenize: tokenizeLabelStartImage, - resolveAll: labelEnd.resolveAll -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeLabelStartImage(effects, ok, nok) { - const self = this - return start - - /** - * Start of label (image) start. - * - * ```markdown - * > | a ![b] c - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter('labelImage') - effects.enter('labelImageMarker') - effects.consume(code) - effects.exit('labelImageMarker') - return open - } - - /** - * After `!`, at `[`. - * - * ```markdown - * > | a ![b] c - * ^ - * ``` - * - * @type {State} - */ - function open(code) { - if (code === 91) { - effects.enter('labelMarker') - effects.consume(code) - effects.exit('labelMarker') - effects.exit('labelImage') - return after - } - return nok(code) - } - - /** - * After `![`. - * - * ```markdown - * > | a ![b] c - * ^ - * ``` - * - * This is needed in because, when GFM footnotes are enabled, images never - * form when started with a `^`. - * Instead, links form: - * - * ```markdown - * ![^a](b) - * - * ![^a][b] - * - * [b]: c - * ``` - * - * ```html - *

!^a

- *

!^a

- * ``` - * - * @type {State} - */ - function after(code) { - // To do: use a new field to do this, this is still needed for - // `micromark-extension-gfm-footnote`, but the `label-start-link` - // behavior isn’t. - // Hidden footnotes hook. - /* c8 ignore next 3 */ - return code === 94 && '_hiddenFootnoteSupport' in self.parser.constructs - ? nok(code) - : ok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-classify-character/index.js -/** - * @typedef {import('micromark-util-types').Code} Code - */ - - -/** - * Classify whether a code represents whitespace, punctuation, or something - * else. - * - * Used for attention (emphasis, strong), whose sequences can open or close - * based on the class of surrounding characters. - * - * > 👉 **Note**: eof (`null`) is seen as whitespace. - * - * @param {Code} code - * Code. - * @returns {typeof constants.characterGroupWhitespace | typeof constants.characterGroupPunctuation | undefined} - * Group. - */ -function classifyCharacter(code) { - if ( - code === null || - markdownLineEndingOrSpace(code) || - unicodeWhitespace(code) - ) { - return 1 - } - if (unicodePunctuation(code)) { - return 2 - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/attention.js -/** - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').Event} Event - * @typedef {import('micromark-util-types').Point} Point - * @typedef {import('micromark-util-types').Resolver} Resolver - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').Token} Token - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - - -/** @type {Construct} */ -const attention = { - name: 'attention', - tokenize: tokenizeAttention, - resolveAll: resolveAllAttention -} - -/** - * Take all events and resolve attention to emphasis or strong. - * - * @type {Resolver} - */ -function resolveAllAttention(events, context) { - let index = -1 - /** @type {number} */ - let open - /** @type {Token} */ - let group - /** @type {Token} */ - let text - /** @type {Token} */ - let openingSequence - /** @type {Token} */ - let closingSequence - /** @type {number} */ - let use - /** @type {Array} */ - let nextEvents - /** @type {number} */ - let offset - - // Walk through all events. - // - // Note: performance of this is fine on an mb of normal markdown, but it’s - // a bottleneck for malicious stuff. - while (++index < events.length) { - // Find a token that can close. - if ( - events[index][0] === 'enter' && - events[index][1].type === 'attentionSequence' && - events[index][1]._close - ) { - open = index - - // Now walk back to find an opener. - while (open--) { - // Find a token that can open the closer. - if ( - events[open][0] === 'exit' && - events[open][1].type === 'attentionSequence' && - events[open][1]._open && - // If the markers are the same: - context.sliceSerialize(events[open][1]).charCodeAt(0) === - context.sliceSerialize(events[index][1]).charCodeAt(0) - ) { - // If the opening can close or the closing can open, - // and the close size *is not* a multiple of three, - // but the sum of the opening and closing size *is* multiple of three, - // then don’t match. - if ( - (events[open][1]._close || events[index][1]._open) && - (events[index][1].end.offset - events[index][1].start.offset) % 3 && - !( - (events[open][1].end.offset - - events[open][1].start.offset + - events[index][1].end.offset - - events[index][1].start.offset) % - 3 - ) - ) { - continue - } - - // Number of markers to use from the sequence. - use = - events[open][1].end.offset - events[open][1].start.offset > 1 && - events[index][1].end.offset - events[index][1].start.offset > 1 - ? 2 - : 1 - const start = Object.assign({}, events[open][1].end) - const end = Object.assign({}, events[index][1].start) - movePoint(start, -use) - movePoint(end, use) - openingSequence = { - type: use > 1 ? 'strongSequence' : 'emphasisSequence', - start, - end: Object.assign({}, events[open][1].end) - } - closingSequence = { - type: use > 1 ? 'strongSequence' : 'emphasisSequence', - start: Object.assign({}, events[index][1].start), - end - } - text = { - type: use > 1 ? 'strongText' : 'emphasisText', - start: Object.assign({}, events[open][1].end), - end: Object.assign({}, events[index][1].start) - } - group = { - type: use > 1 ? 'strong' : 'emphasis', - start: Object.assign({}, openingSequence.start), - end: Object.assign({}, closingSequence.end) - } - events[open][1].end = Object.assign({}, openingSequence.start) - events[index][1].start = Object.assign({}, closingSequence.end) - nextEvents = [] - - // If there are more markers in the opening, add them before. - if (events[open][1].end.offset - events[open][1].start.offset) { - nextEvents = push(nextEvents, [ - ['enter', events[open][1], context], - ['exit', events[open][1], context] - ]) - } - - // Opening. - nextEvents = push(nextEvents, [ - ['enter', group, context], - ['enter', openingSequence, context], - ['exit', openingSequence, context], - ['enter', text, context] - ]) - - // Always populated by defaults. - - // Between. - nextEvents = push( - nextEvents, - resolveAll( - context.parser.constructs.insideSpan.null, - events.slice(open + 1, index), - context - ) - ) - - // Closing. - nextEvents = push(nextEvents, [ - ['exit', text, context], - ['enter', closingSequence, context], - ['exit', closingSequence, context], - ['exit', group, context] - ]) - - // If there are more markers in the closing, add them after. - if (events[index][1].end.offset - events[index][1].start.offset) { - offset = 2 - nextEvents = push(nextEvents, [ - ['enter', events[index][1], context], - ['exit', events[index][1], context] - ]) - } else { - offset = 0 - } - splice(events, open - 1, index - open + 3, nextEvents) - index = open + nextEvents.length - offset - 2 - break - } - } - } - } - - // Remove remaining sequences. - index = -1 - while (++index < events.length) { - if (events[index][1].type === 'attentionSequence') { - events[index][1].type = 'data' - } - } - return events -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeAttention(effects, ok) { - const attentionMarkers = this.parser.constructs.attentionMarkers.null - const previous = this.previous - const before = classifyCharacter(previous) - - /** @type {NonNullable} */ - let marker - return start - - /** - * Before a sequence. - * - * ```markdown - * > | ** - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - marker = code - effects.enter('attentionSequence') - return inside(code) - } - - /** - * In a sequence. - * - * ```markdown - * > | ** - * ^^ - * ``` - * - * @type {State} - */ - function inside(code) { - if (code === marker) { - effects.consume(code) - return inside - } - const token = effects.exit('attentionSequence') - - // To do: next major: move this to resolver, just like `markdown-rs`. - const after = classifyCharacter(code) - - // Always populated by defaults. - - const open = - !after || (after === 2 && before) || attentionMarkers.includes(code) - const close = - !before || (before === 2 && after) || attentionMarkers.includes(previous) - token._open = Boolean(marker === 42 ? open : open && (before || !close)) - token._close = Boolean(marker === 42 ? close : close && (after || !open)) - return ok(code) - } -} - -/** - * Move a point a bit. - * - * Note: `move` only works inside lines! It’s not possible to move past other - * chunks (replacement characters, tabs, or line endings). - * - * @param {Point} point - * @param {number} offset - * @returns {void} - */ -function movePoint(point, offset) { - point.column += offset - point.offset += offset - point._bufferIndex += offset -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/autolink.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - -/** @type {Construct} */ -const autolink = { - name: 'autolink', - tokenize: tokenizeAutolink -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeAutolink(effects, ok, nok) { - let size = 0 - return start - - /** - * Start of an autolink. - * - * ```markdown - * > | ab - * ^ - * > | ab - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter('autolink') - effects.enter('autolinkMarker') - effects.consume(code) - effects.exit('autolinkMarker') - effects.enter('autolinkProtocol') - return open - } - - /** - * After `<`, at protocol or atext. - * - * ```markdown - * > | ab - * ^ - * > | ab - * ^ - * ``` - * - * @type {State} - */ - function open(code) { - if (asciiAlpha(code)) { - effects.consume(code) - return schemeOrEmailAtext - } - return emailAtext(code) - } - - /** - * At second byte of protocol or atext. - * - * ```markdown - * > | ab - * ^ - * > | ab - * ^ - * ``` - * - * @type {State} - */ - function schemeOrEmailAtext(code) { - // ASCII alphanumeric and `+`, `-`, and `.`. - if (code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code)) { - // Count the previous alphabetical from `open` too. - size = 1 - return schemeInsideOrEmailAtext(code) - } - return emailAtext(code) - } - - /** - * In ambiguous protocol or atext. - * - * ```markdown - * > | ab - * ^ - * > | ab - * ^ - * ``` - * - * @type {State} - */ - function schemeInsideOrEmailAtext(code) { - if (code === 58) { - effects.consume(code) - size = 0 - return urlInside - } - - // ASCII alphanumeric and `+`, `-`, and `.`. - if ( - (code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code)) && - size++ < 32 - ) { - effects.consume(code) - return schemeInsideOrEmailAtext - } - size = 0 - return emailAtext(code) - } - - /** - * After protocol, in URL. - * - * ```markdown - * > | ab - * ^ - * ``` - * - * @type {State} - */ - function urlInside(code) { - if (code === 62) { - effects.exit('autolinkProtocol') - effects.enter('autolinkMarker') - effects.consume(code) - effects.exit('autolinkMarker') - effects.exit('autolink') - return ok - } - - // ASCII control, space, or `<`. - if (code === null || code === 32 || code === 60 || asciiControl(code)) { - return nok(code) - } - effects.consume(code) - return urlInside - } - - /** - * In email atext. - * - * ```markdown - * > | ab - * ^ - * ``` - * - * @type {State} - */ - function emailAtext(code) { - if (code === 64) { - effects.consume(code) - return emailAtSignOrDot - } - if (asciiAtext(code)) { - effects.consume(code) - return emailAtext - } - return nok(code) - } - - /** - * In label, after at-sign or dot. - * - * ```markdown - * > | ab - * ^ ^ - * ``` - * - * @type {State} - */ - function emailAtSignOrDot(code) { - return asciiAlphanumeric(code) ? emailLabel(code) : nok(code) - } - - /** - * In label, where `.` and `>` are allowed. - * - * ```markdown - * > | ab - * ^ - * ``` - * - * @type {State} - */ - function emailLabel(code) { - if (code === 46) { - effects.consume(code) - size = 0 - return emailAtSignOrDot - } - if (code === 62) { - // Exit, then change the token type. - effects.exit('autolinkProtocol').type = 'autolinkEmail' - effects.enter('autolinkMarker') - effects.consume(code) - effects.exit('autolinkMarker') - effects.exit('autolink') - return ok - } - return emailValue(code) - } - - /** - * In label, where `.` and `>` are *not* allowed. - * - * Though, this is also used in `emailLabel` to parse other values. - * - * ```markdown - * > | ab - * ^ - * ``` - * - * @type {State} - */ - function emailValue(code) { - // ASCII alphanumeric or `-`. - if ((code === 45 || asciiAlphanumeric(code)) && size++ < 63) { - const next = code === 45 ? emailValue : emailLabel - effects.consume(code) - return next - } - return nok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/html-text.js -/** - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const htmlText = { - name: 'htmlText', - tokenize: tokenizeHtmlText -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeHtmlText(effects, ok, nok) { - const self = this - /** @type {NonNullable | undefined} */ - let marker - /** @type {number} */ - let index - /** @type {State} */ - let returnState - return start - - /** - * Start of HTML (text). - * - * ```markdown - * > | a c - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter('htmlText') - effects.enter('htmlTextData') - effects.consume(code) - return open - } - - /** - * After `<`, at tag name or other stuff. - * - * ```markdown - * > | a c - * ^ - * > | a c - * ^ - * > | a c - * ^ - * ``` - * - * @type {State} - */ - function open(code) { - if (code === 33) { - effects.consume(code) - return declarationOpen - } - if (code === 47) { - effects.consume(code) - return tagCloseStart - } - if (code === 63) { - effects.consume(code) - return instruction - } - - // ASCII alphabetical. - if (asciiAlpha(code)) { - effects.consume(code) - return tagOpen - } - return nok(code) - } - - /** - * After ` | a c - * ^ - * > | a c - * ^ - * > | a &<]]> c - * ^ - * ``` - * - * @type {State} - */ - function declarationOpen(code) { - if (code === 45) { - effects.consume(code) - return commentOpenInside - } - if (code === 91) { - effects.consume(code) - index = 0 - return cdataOpenInside - } - if (asciiAlpha(code)) { - effects.consume(code) - return declaration - } - return nok(code) - } - - /** - * In a comment, after ` | a c - * ^ - * ``` - * - * @type {State} - */ - function commentOpenInside(code) { - if (code === 45) { - effects.consume(code) - return commentEnd - } - return nok(code) - } - - /** - * In comment. - * - * ```markdown - * > | a c - * ^ - * ``` - * - * @type {State} - */ - function comment(code) { - if (code === null) { - return nok(code) - } - if (code === 45) { - effects.consume(code) - return commentClose - } - if (markdownLineEnding(code)) { - returnState = comment - return lineEndingBefore(code) - } - effects.consume(code) - return comment - } - - /** - * In comment, after `-`. - * - * ```markdown - * > | a c - * ^ - * ``` - * - * @type {State} - */ - function commentClose(code) { - if (code === 45) { - effects.consume(code) - return commentEnd - } - return comment(code) - } - - /** - * In comment, after `--`. - * - * ```markdown - * > | a c - * ^ - * ``` - * - * @type {State} - */ - function commentEnd(code) { - return code === 62 - ? end(code) - : code === 45 - ? commentClose(code) - : comment(code) - } - - /** - * After ` | a &<]]> b - * ^^^^^^ - * ``` - * - * @type {State} - */ - function cdataOpenInside(code) { - const value = 'CDATA[' - if (code === value.charCodeAt(index++)) { - effects.consume(code) - return index === value.length ? cdata : cdataOpenInside - } - return nok(code) - } - - /** - * In CDATA. - * - * ```markdown - * > | a &<]]> b - * ^^^ - * ``` - * - * @type {State} - */ - function cdata(code) { - if (code === null) { - return nok(code) - } - if (code === 93) { - effects.consume(code) - return cdataClose - } - if (markdownLineEnding(code)) { - returnState = cdata - return lineEndingBefore(code) - } - effects.consume(code) - return cdata - } - - /** - * In CDATA, after `]`, at another `]`. - * - * ```markdown - * > | a &<]]> b - * ^ - * ``` - * - * @type {State} - */ - function cdataClose(code) { - if (code === 93) { - effects.consume(code) - return cdataEnd - } - return cdata(code) - } - - /** - * In CDATA, after `]]`, at `>`. - * - * ```markdown - * > | a &<]]> b - * ^ - * ``` - * - * @type {State} - */ - function cdataEnd(code) { - if (code === 62) { - return end(code) - } - if (code === 93) { - effects.consume(code) - return cdataEnd - } - return cdata(code) - } - - /** - * In declaration. - * - * ```markdown - * > | a c - * ^ - * ``` - * - * @type {State} - */ - function declaration(code) { - if (code === null || code === 62) { - return end(code) - } - if (markdownLineEnding(code)) { - returnState = declaration - return lineEndingBefore(code) - } - effects.consume(code) - return declaration - } - - /** - * In instruction. - * - * ```markdown - * > | a c - * ^ - * ``` - * - * @type {State} - */ - function instruction(code) { - if (code === null) { - return nok(code) - } - if (code === 63) { - effects.consume(code) - return instructionClose - } - if (markdownLineEnding(code)) { - returnState = instruction - return lineEndingBefore(code) - } - effects.consume(code) - return instruction - } - - /** - * In instruction, after `?`, at `>`. - * - * ```markdown - * > | a c - * ^ - * ``` - * - * @type {State} - */ - function instructionClose(code) { - return code === 62 ? end(code) : instruction(code) - } - - /** - * After ` | a c - * ^ - * ``` - * - * @type {State} - */ - function tagCloseStart(code) { - // ASCII alphabetical. - if (asciiAlpha(code)) { - effects.consume(code) - return tagClose - } - return nok(code) - } - - /** - * After ` | a c - * ^ - * ``` - * - * @type {State} - */ - function tagClose(code) { - // ASCII alphanumerical and `-`. - if (code === 45 || asciiAlphanumeric(code)) { - effects.consume(code) - return tagClose - } - return tagCloseBetween(code) - } - - /** - * In closing tag, after tag name. - * - * ```markdown - * > | a c - * ^ - * ``` - * - * @type {State} - */ - function tagCloseBetween(code) { - if (markdownLineEnding(code)) { - returnState = tagCloseBetween - return lineEndingBefore(code) - } - if (markdownSpace(code)) { - effects.consume(code) - return tagCloseBetween - } - return end(code) - } - - /** - * After ` | a c - * ^ - * ``` - * - * @type {State} - */ - function tagOpen(code) { - // ASCII alphanumerical and `-`. - if (code === 45 || asciiAlphanumeric(code)) { - effects.consume(code) - return tagOpen - } - if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) { - return tagOpenBetween(code) - } - return nok(code) - } - - /** - * In opening tag, after tag name. - * - * ```markdown - * > | a c - * ^ - * ``` - * - * @type {State} - */ - function tagOpenBetween(code) { - if (code === 47) { - effects.consume(code) - return end - } - - // ASCII alphabetical and `:` and `_`. - if (code === 58 || code === 95 || asciiAlpha(code)) { - effects.consume(code) - return tagOpenAttributeName - } - if (markdownLineEnding(code)) { - returnState = tagOpenBetween - return lineEndingBefore(code) - } - if (markdownSpace(code)) { - effects.consume(code) - return tagOpenBetween - } - return end(code) - } - - /** - * In attribute name. - * - * ```markdown - * > | a d - * ^ - * ``` - * - * @type {State} - */ - function tagOpenAttributeName(code) { - // ASCII alphabetical and `-`, `.`, `:`, and `_`. - if ( - code === 45 || - code === 46 || - code === 58 || - code === 95 || - asciiAlphanumeric(code) - ) { - effects.consume(code) - return tagOpenAttributeName - } - return tagOpenAttributeNameAfter(code) - } - - /** - * After attribute name, before initializer, the end of the tag, or - * whitespace. - * - * ```markdown - * > | a d - * ^ - * ``` - * - * @type {State} - */ - function tagOpenAttributeNameAfter(code) { - if (code === 61) { - effects.consume(code) - return tagOpenAttributeValueBefore - } - if (markdownLineEnding(code)) { - returnState = tagOpenAttributeNameAfter - return lineEndingBefore(code) - } - if (markdownSpace(code)) { - effects.consume(code) - return tagOpenAttributeNameAfter - } - return tagOpenBetween(code) - } - - /** - * Before unquoted, double quoted, or single quoted attribute value, allowing - * whitespace. - * - * ```markdown - * > | a e - * ^ - * ``` - * - * @type {State} - */ - function tagOpenAttributeValueBefore(code) { - if ( - code === null || - code === 60 || - code === 61 || - code === 62 || - code === 96 - ) { - return nok(code) - } - if (code === 34 || code === 39) { - effects.consume(code) - marker = code - return tagOpenAttributeValueQuoted - } - if (markdownLineEnding(code)) { - returnState = tagOpenAttributeValueBefore - return lineEndingBefore(code) - } - if (markdownSpace(code)) { - effects.consume(code) - return tagOpenAttributeValueBefore - } - effects.consume(code) - return tagOpenAttributeValueUnquoted - } - - /** - * In double or single quoted attribute value. - * - * ```markdown - * > | a e - * ^ - * ``` - * - * @type {State} - */ - function tagOpenAttributeValueQuoted(code) { - if (code === marker) { - effects.consume(code) - marker = undefined - return tagOpenAttributeValueQuotedAfter - } - if (code === null) { - return nok(code) - } - if (markdownLineEnding(code)) { - returnState = tagOpenAttributeValueQuoted - return lineEndingBefore(code) - } - effects.consume(code) - return tagOpenAttributeValueQuoted - } - - /** - * In unquoted attribute value. - * - * ```markdown - * > | a e - * ^ - * ``` - * - * @type {State} - */ - function tagOpenAttributeValueUnquoted(code) { - if ( - code === null || - code === 34 || - code === 39 || - code === 60 || - code === 61 || - code === 96 - ) { - return nok(code) - } - if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) { - return tagOpenBetween(code) - } - effects.consume(code) - return tagOpenAttributeValueUnquoted - } - - /** - * After double or single quoted attribute value, before whitespace or the end - * of the tag. - * - * ```markdown - * > | a e - * ^ - * ``` - * - * @type {State} - */ - function tagOpenAttributeValueQuotedAfter(code) { - if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) { - return tagOpenBetween(code) - } - return nok(code) - } - - /** - * In certain circumstances of a tag where only an `>` is allowed. - * - * ```markdown - * > | a e - * ^ - * ``` - * - * @type {State} - */ - function end(code) { - if (code === 62) { - effects.consume(code) - effects.exit('htmlTextData') - effects.exit('htmlText') - return ok - } - return nok(code) - } - - /** - * At eol. - * - * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about - * > empty tokens. - * - * ```markdown - * > | a - * ``` - * - * @type {State} - */ - function lineEndingBefore(code) { - effects.exit('htmlTextData') - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return lineEndingAfter - } - - /** - * After eol, at optional whitespace. - * - * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about - * > empty tokens. - * - * ```markdown - * | a - * ^ - * ``` - * - * @type {State} - */ - function lineEndingAfter(code) { - // Always populated by defaults. - - return markdownSpace(code) - ? factorySpace( - effects, - lineEndingAfterPrefix, - 'linePrefix', - self.parser.constructs.disable.null.includes('codeIndented') - ? undefined - : 4 - )(code) - : lineEndingAfterPrefix(code) - } - - /** - * After eol, after optional whitespace. - * - * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about - * > empty tokens. - * - * ```markdown - * | a - * ^ - * ``` - * - * @type {State} - */ - function lineEndingAfterPrefix(code) { - effects.enter('htmlTextData') - return returnState(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/label-start-link.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const labelStartLink = { - name: 'labelStartLink', - tokenize: tokenizeLabelStartLink, - resolveAll: labelEnd.resolveAll -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeLabelStartLink(effects, ok, nok) { - const self = this - return start - - /** - * Start of label (link) start. - * - * ```markdown - * > | a [b] c - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter('labelLink') - effects.enter('labelMarker') - effects.consume(code) - effects.exit('labelMarker') - effects.exit('labelLink') - return after - } - - /** @type {State} */ - function after(code) { - // To do: this isn’t needed in `micromark-extension-gfm-footnote`, - // remove. - // Hidden footnotes hook. - /* c8 ignore next 3 */ - return code === 94 && '_hiddenFootnoteSupport' in self.parser.constructs - ? nok(code) - : ok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/hard-break-escape.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - -/** @type {Construct} */ -const hardBreakEscape = { - name: 'hardBreakEscape', - tokenize: tokenizeHardBreakEscape -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeHardBreakEscape(effects, ok, nok) { - return start - - /** - * Start of a hard break (escape). - * - * ```markdown - * > | a\ - * ^ - * | b - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter('hardBreakEscape') - effects.consume(code) - return after - } - - /** - * After `\`, at eol. - * - * ```markdown - * > | a\ - * ^ - * | b - * ``` - * - * @type {State} - */ - function after(code) { - if (markdownLineEnding(code)) { - effects.exit('hardBreakEscape') - return ok(code) - } - return nok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/code-text.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').Previous} Previous - * @typedef {import('micromark-util-types').Resolver} Resolver - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').Token} Token - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - -/** @type {Construct} */ -const codeText = { - name: 'codeText', - tokenize: tokenizeCodeText, - resolve: resolveCodeText, - previous -} - -// To do: next major: don’t resolve, like `markdown-rs`. -/** @type {Resolver} */ -function resolveCodeText(events) { - let tailExitIndex = events.length - 4 - let headEnterIndex = 3 - /** @type {number} */ - let index - /** @type {number | undefined} */ - let enter - - // If we start and end with an EOL or a space. - if ( - (events[headEnterIndex][1].type === 'lineEnding' || - events[headEnterIndex][1].type === 'space') && - (events[tailExitIndex][1].type === 'lineEnding' || - events[tailExitIndex][1].type === 'space') - ) { - index = headEnterIndex - - // And we have data. - while (++index < tailExitIndex) { - if (events[index][1].type === 'codeTextData') { - // Then we have padding. - events[headEnterIndex][1].type = 'codeTextPadding' - events[tailExitIndex][1].type = 'codeTextPadding' - headEnterIndex += 2 - tailExitIndex -= 2 - break - } - } - } - - // Merge adjacent spaces and data. - index = headEnterIndex - 1 - tailExitIndex++ - while (++index <= tailExitIndex) { - if (enter === undefined) { - if (index !== tailExitIndex && events[index][1].type !== 'lineEnding') { - enter = index - } - } else if ( - index === tailExitIndex || - events[index][1].type === 'lineEnding' - ) { - events[enter][1].type = 'codeTextData' - if (index !== enter + 2) { - events[enter][1].end = events[index - 1][1].end - events.splice(enter + 2, index - enter - 2) - tailExitIndex -= index - enter - 2 - index = enter + 2 - } - enter = undefined - } - } - return events -} - -/** - * @this {TokenizeContext} - * @type {Previous} - */ -function previous(code) { - // If there is a previous code, there will always be a tail. - return ( - code !== 96 || - this.events[this.events.length - 1][1].type === 'characterEscape' - ) -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeCodeText(effects, ok, nok) { - const self = this - let sizeOpen = 0 - /** @type {number} */ - let size - /** @type {Token} */ - let token - return start - - /** - * Start of code (text). - * - * ```markdown - * > | `a` - * ^ - * > | \`a` - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter('codeText') - effects.enter('codeTextSequence') - return sequenceOpen(code) - } - - /** - * In opening sequence. - * - * ```markdown - * > | `a` - * ^ - * ``` - * - * @type {State} - */ - function sequenceOpen(code) { - if (code === 96) { - effects.consume(code) - sizeOpen++ - return sequenceOpen - } - effects.exit('codeTextSequence') - return between(code) - } - - /** - * Between something and something else. - * - * ```markdown - * > | `a` - * ^^ - * ``` - * - * @type {State} - */ - function between(code) { - // EOF. - if (code === null) { - return nok(code) - } - - // To do: next major: don’t do spaces in resolve, but when compiling, - // like `markdown-rs`. - // Tabs don’t work, and virtual spaces don’t make sense. - if (code === 32) { - effects.enter('space') - effects.consume(code) - effects.exit('space') - return between - } - - // Closing fence? Could also be data. - if (code === 96) { - token = effects.enter('codeTextSequence') - size = 0 - return sequenceClose(code) - } - if (markdownLineEnding(code)) { - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return between - } - - // Data. - effects.enter('codeTextData') - return data(code) - } - - /** - * In data. - * - * ```markdown - * > | `a` - * ^ - * ``` - * - * @type {State} - */ - function data(code) { - if ( - code === null || - code === 32 || - code === 96 || - markdownLineEnding(code) - ) { - effects.exit('codeTextData') - return between(code) - } - effects.consume(code) - return data - } - - /** - * In closing sequence. - * - * ```markdown - * > | `a` - * ^ - * ``` - * - * @type {State} - */ - function sequenceClose(code) { - // More. - if (code === 96) { - effects.consume(code) - size++ - return sequenceClose - } - - // Done! - if (size === sizeOpen) { - effects.exit('codeTextSequence') - effects.exit('codeText') - return ok(code) - } - - // More or less accents: mark as data. - token.type = 'codeTextData' - return data(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/constructs.js -/** - * @typedef {import('micromark-util-types').Extension} Extension - */ - - - - -/** @satisfies {Extension['document']} */ -const constructs_document = { - [42]: list, - [43]: list, - [45]: list, - [48]: list, - [49]: list, - [50]: list, - [51]: list, - [52]: list, - [53]: list, - [54]: list, - [55]: list, - [56]: list, - [57]: list, - [62]: blockQuote -} - -/** @satisfies {Extension['contentInitial']} */ -const contentInitial = { - [91]: definition -} - -/** @satisfies {Extension['flowInitial']} */ -const flowInitial = { - [-2]: codeIndented, - [-1]: codeIndented, - [32]: codeIndented -} - -/** @satisfies {Extension['flow']} */ -const constructs_flow = { - [35]: headingAtx, - [42]: thematicBreak, - [45]: [setextUnderline, thematicBreak], - [60]: htmlFlow, - [61]: setextUnderline, - [95]: thematicBreak, - [96]: codeFenced, - [126]: codeFenced -} - -/** @satisfies {Extension['string']} */ -const constructs_string = { - [38]: characterReference, - [92]: characterEscape -} - -/** @satisfies {Extension['text']} */ -const constructs_text = { - [-5]: lineEnding, - [-4]: lineEnding, - [-3]: lineEnding, - [33]: labelStartImage, - [38]: characterReference, - [42]: attention, - [60]: [autolink, htmlText], - [91]: labelStartLink, - [92]: [hardBreakEscape, characterEscape], - [93]: labelEnd, - [95]: attention, - [96]: codeText -} - -/** @satisfies {Extension['insideSpan']} */ -const insideSpan = { - null: [attention, resolver] -} - -/** @satisfies {Extension['attentionMarkers']} */ -const attentionMarkers = { - null: [42, 95] -} - -/** @satisfies {Extension['disable']} */ -const disable = { - null: [] -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/parse.js -/** - * @typedef {import('micromark-util-types').Create} Create - * @typedef {import('micromark-util-types').FullNormalizedExtension} FullNormalizedExtension - * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct - * @typedef {import('micromark-util-types').ParseContext} ParseContext - * @typedef {import('micromark-util-types').ParseOptions} ParseOptions - */ - - - - - - - - - -/** - * @param {ParseOptions | null | undefined} [options] - * @returns {ParseContext} - */ -function parse(options) { - const settings = options || {} - const constructs = - /** @type {FullNormalizedExtension} */ - combineExtensions([constructs_namespaceObject, ...(settings.extensions || [])]) - - /** @type {ParseContext} */ - const parser = { - defined: [], - lazy: {}, - constructs, - content: create(content), - document: create(document_document), - flow: create(flow), - string: create(string), - text: create(text_text) - } - return parser - - /** - * @param {InitialConstruct} initial - */ - function create(initial) { - return creator - /** @type {Create} */ - function creator(from) { - return createTokenizer(parser, initial, from) - } - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/preprocess.js -/** - * @typedef {import('micromark-util-types').Chunk} Chunk - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Encoding} Encoding - * @typedef {import('micromark-util-types').Value} Value - */ - -/** - * @callback Preprocessor - * @param {Value} value - * @param {Encoding | null | undefined} [encoding] - * @param {boolean | null | undefined} [end=false] - * @returns {Array} - */ - -const search = /[\0\t\n\r]/g - -/** - * @returns {Preprocessor} - */ -function preprocess() { - let column = 1 - let buffer = '' - /** @type {boolean | undefined} */ - let start = true - /** @type {boolean | undefined} */ - let atCarriageReturn - return preprocessor - - /** @type {Preprocessor} */ - function preprocessor(value, encoding, end) { - /** @type {Array} */ - const chunks = [] - /** @type {RegExpMatchArray | null} */ - let match - /** @type {number} */ - let next - /** @type {number} */ - let startPosition - /** @type {number} */ - let endPosition - /** @type {Code} */ - let code - - // @ts-expect-error `Buffer` does allow an encoding. - value = buffer + value.toString(encoding) - startPosition = 0 - buffer = '' - if (start) { - // To do: `markdown-rs` actually parses BOMs (byte order mark). - if (value.charCodeAt(0) === 65279) { - startPosition++ - } - start = undefined - } - while (startPosition < value.length) { - search.lastIndex = startPosition - match = search.exec(value) - endPosition = - match && match.index !== undefined ? match.index : value.length - code = value.charCodeAt(endPosition) - if (!match) { - buffer = value.slice(startPosition) - break - } - if (code === 10 && startPosition === endPosition && atCarriageReturn) { - chunks.push(-3) - atCarriageReturn = undefined - } else { - if (atCarriageReturn) { - chunks.push(-5) - atCarriageReturn = undefined - } - if (startPosition < endPosition) { - chunks.push(value.slice(startPosition, endPosition)) - column += endPosition - startPosition - } - switch (code) { - case 0: { - chunks.push(65533) - column++ - break - } - case 9: { - next = Math.ceil(column / 4) * 4 - chunks.push(-2) - while (column++ < next) chunks.push(-1) - break - } - case 10: { - chunks.push(-4) - column = 1 - break - } - default: { - atCarriageReturn = true - column = 1 - } - } - } - startPosition = endPosition + 1 - } - if (end) { - if (atCarriageReturn) chunks.push(-5) - if (buffer) chunks.push(buffer) - chunks.push(null) - } - return chunks - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/postprocess.js -/** - * @typedef {import('micromark-util-types').Event} Event - */ - - - -/** - * @param {Array} events - * @returns {Array} - */ -function postprocess(events) { - while (!subtokenize(events)) { - // Empty - } - return events -} - -;// CONCATENATED MODULE: ./node_modules/micromark-util-decode-numeric-character-reference/index.js -/** - * Turn the number (in string form as either hexa- or plain decimal) coming from - * a numeric character reference into a character. - * - * Sort of like `String.fromCharCode(Number.parseInt(value, base))`, but makes - * non-characters and control characters safe. - * - * @param {string} value - * Value to decode. - * @param {number} base - * Numeric base. - * @returns {string} - * Character. - */ -function decodeNumericCharacterReference(value, base) { - const code = Number.parseInt(value, base) - if ( - // C0 except for HT, LF, FF, CR, space. - code < 9 || - code === 11 || - (code > 13 && code < 32) || - // Control character (DEL) of C0, and C1 controls. - (code > 126 && code < 160) || - // Lone high surrogates and low surrogates. - (code > 55295 && code < 57344) || - // Noncharacters. - (code > 64975 && code < 65008) /* eslint-disable no-bitwise */ || - (code & 65535) === 65535 || - (code & 65535) === 65534 /* eslint-enable no-bitwise */ || - // Out of range - code > 1114111 - ) { - return '\uFFFD' - } - return String.fromCharCode(code) -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-decode-string/index.js - - -const characterEscapeOrReference = - /\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi - -/** - * Decode markdown strings (which occur in places such as fenced code info - * strings, destinations, labels, and titles). - * - * The “string” content type allows character escapes and -references. - * This decodes those. - * - * @param {string} value - * Value to decode. - * @returns {string} - * Decoded value. - */ -function decodeString(value) { - return value.replace(characterEscapeOrReference, decode) -} - -/** - * @param {string} $0 - * @param {string} $1 - * @param {string} $2 - * @returns {string} - */ -function decode($0, $1, $2) { - if ($1) { - // Escape. - return $1 - } - - // Reference. - const head = $2.charCodeAt(0) - if (head === 35) { - const head = $2.charCodeAt(1) - const hex = head === 120 || head === 88 - return decodeNumericCharacterReference($2.slice(hex ? 2 : 1), hex ? 16 : 10) - } - return decodeNamedCharacterReference($2) || $0 -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/unist-util-stringify-position/lib/index.js -/** - * @typedef {import('unist').Node} Node - * @typedef {import('unist').Point} Point - * @typedef {import('unist').Position} Position - */ - -/** - * @typedef NodeLike - * @property {string} type - * @property {PositionLike | null | undefined} [position] - * - * @typedef PositionLike - * @property {PointLike | null | undefined} [start] - * @property {PointLike | null | undefined} [end] - * - * @typedef PointLike - * @property {number | null | undefined} [line] - * @property {number | null | undefined} [column] - * @property {number | null | undefined} [offset] - */ - -/** - * Serialize the positional info of a point, position (start and end points), - * or node. - * - * @param {Node | NodeLike | Position | PositionLike | Point | PointLike | null | undefined} [value] - * Node, position, or point. - * @returns {string} - * Pretty printed positional info of a node (`string`). - * - * In the format of a range `ls:cs-le:ce` (when given `node` or `position`) - * or a point `l:c` (when given `point`), where `l` stands for line, `c` for - * column, `s` for `start`, and `e` for end. - * An empty string (`''`) is returned if the given value is neither `node`, - * `position`, nor `point`. - */ -function stringifyPosition(value) { - // Nothing. - if (!value || typeof value !== 'object') { - return '' - } - - // Node. - if ('position' in value || 'type' in value) { - return position(value.position) - } - - // Position. - if ('start' in value || 'end' in value) { - return position(value) - } - - // Point. - if ('line' in value || 'column' in value) { - return point(value) - } - - // ? - return '' -} - -/** - * @param {Point | PointLike | null | undefined} point - * @returns {string} - */ -function point(point) { - return index(point && point.line) + ':' + index(point && point.column) -} - -/** - * @param {Position | PositionLike | null | undefined} pos - * @returns {string} - */ -function position(pos) { - return point(pos && pos.start) + '-' + point(pos && pos.end) -} - -/** - * @param {number | null | undefined} value - * @returns {number} - */ -function index(value) { - return value && typeof value === 'number' ? value : 1 -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/mdast-util-from-markdown/lib/index.js -/** - * @typedef {import('micromark-util-types').Encoding} Encoding - * @typedef {import('micromark-util-types').Event} Event - * @typedef {import('micromark-util-types').ParseOptions} ParseOptions - * @typedef {import('micromark-util-types').Token} Token - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Value} Value - * - * @typedef {import('unist').Parent} UnistParent - * @typedef {import('unist').Point} Point - * - * @typedef {import('mdast').PhrasingContent} PhrasingContent - * @typedef {import('mdast').StaticPhrasingContent} StaticPhrasingContent - * @typedef {import('mdast').Content} Content - * @typedef {import('mdast').Break} Break - * @typedef {import('mdast').Blockquote} Blockquote - * @typedef {import('mdast').Code} Code - * @typedef {import('mdast').Definition} Definition - * @typedef {import('mdast').Emphasis} Emphasis - * @typedef {import('mdast').Heading} Heading - * @typedef {import('mdast').HTML} HTML - * @typedef {import('mdast').Image} Image - * @typedef {import('mdast').ImageReference} ImageReference - * @typedef {import('mdast').InlineCode} InlineCode - * @typedef {import('mdast').Link} Link - * @typedef {import('mdast').LinkReference} LinkReference - * @typedef {import('mdast').List} List - * @typedef {import('mdast').ListItem} ListItem - * @typedef {import('mdast').Paragraph} Paragraph - * @typedef {import('mdast').Root} Root - * @typedef {import('mdast').Strong} Strong - * @typedef {import('mdast').Text} Text - * @typedef {import('mdast').ThematicBreak} ThematicBreak - * @typedef {import('mdast').ReferenceType} ReferenceType - * @typedef {import('../index.js').CompileData} CompileData - */ - -/** - * @typedef {Root | Content} Node - * @typedef {Extract} Parent - * - * @typedef {Omit & {type: 'fragment', children: Array}} Fragment - */ - -/** - * @callback Transform - * Extra transform, to change the AST afterwards. - * @param {Root} tree - * Tree to transform. - * @returns {Root | undefined | null | void} - * New tree or nothing (in which case the current tree is used). - * - * @callback Handle - * Handle a token. - * @param {CompileContext} this - * Context. - * @param {Token} token - * Current token. - * @returns {void} - * Nothing. - * - * @typedef {Record} Handles - * Token types mapping to handles - * - * @callback OnEnterError - * Handle the case where the `right` token is open, but it is closed (by the - * `left` token) or because we reached the end of the document. - * @param {Omit} this - * Context. - * @param {Token | undefined} left - * Left token. - * @param {Token} right - * Right token. - * @returns {void} - * Nothing. - * - * @callback OnExitError - * Handle the case where the `right` token is open but it is closed by - * exiting the `left` token. - * @param {Omit} this - * Context. - * @param {Token} left - * Left token. - * @param {Token} right - * Right token. - * @returns {void} - * Nothing. - * - * @typedef {[Token, OnEnterError | undefined]} TokenTuple - * Open token on the stack, with an optional error handler for when - * that token isn’t closed properly. - */ - -/** - * @typedef Config - * Configuration. - * - * We have our defaults, but extensions will add more. - * @property {Array} canContainEols - * Token types where line endings are used. - * @property {Handles} enter - * Opening handles. - * @property {Handles} exit - * Closing handles. - * @property {Array} transforms - * Tree transforms. - * - * @typedef {Partial} Extension - * Change how markdown tokens from micromark are turned into mdast. - * - * @typedef CompileContext - * mdast compiler context. - * @property {Array} stack - * Stack of nodes. - * @property {Array} tokenStack - * Stack of tokens. - * @property {(key: Key) => CompileData[Key]} getData - * Get data from the key/value store. - * @property {(key: Key, value?: CompileData[Key]) => void} setData - * Set data into the key/value store. - * @property {(this: CompileContext) => void} buffer - * Capture some of the output data. - * @property {(this: CompileContext) => string} resume - * Stop capturing and access the output data. - * @property {(this: CompileContext, node: Kind, token: Token, onError?: OnEnterError) => Kind} enter - * Enter a token. - * @property {(this: CompileContext, token: Token, onError?: OnExitError) => Node} exit - * Exit a token. - * @property {TokenizeContext['sliceSerialize']} sliceSerialize - * Get the string value of a token. - * @property {Config} config - * Configuration. - * - * @typedef FromMarkdownOptions - * Configuration for how to build mdast. - * @property {Array> | null | undefined} [mdastExtensions] - * Extensions for this utility to change how tokens are turned into a tree. - * - * @typedef {ParseOptions & FromMarkdownOptions} Options - * Configuration. - */ - -// To do: micromark: create a registry of tokens? -// To do: next major: don’t return given `Node` from `enter`. -// To do: next major: remove setter/getter. - - - - - - - - - - -const lib_own = {}.hasOwnProperty - -/** - * @param value - * Markdown to parse. - * @param encoding - * Character encoding for when `value` is `Buffer`. - * @param options - * Configuration. - * @returns - * mdast tree. - */ -const fromMarkdown = - /** - * @type {( - * ((value: Value, encoding: Encoding, options?: Options | null | undefined) => Root) & - * ((value: Value, options?: Options | null | undefined) => Root) - * )} - */ - - /** - * @param {Value} value - * @param {Encoding | Options | null | undefined} [encoding] - * @param {Options | null | undefined} [options] - * @returns {Root} - */ - function (value, encoding, options) { - if (typeof encoding !== 'string') { - options = encoding - encoding = undefined - } - return compiler(options)( - postprocess( - parse(options).document().write(preprocess()(value, encoding, true)) - ) - ) - } - -/** - * Note this compiler only understand complete buffering, not streaming. - * - * @param {Options | null | undefined} [options] - */ -function compiler(options) { - /** @type {Config} */ - const config = { - transforms: [], - canContainEols: ['emphasis', 'fragment', 'heading', 'paragraph', 'strong'], - enter: { - autolink: opener(link), - autolinkProtocol: onenterdata, - autolinkEmail: onenterdata, - atxHeading: opener(heading), - blockQuote: opener(blockQuote), - characterEscape: onenterdata, - characterReference: onenterdata, - codeFenced: opener(codeFlow), - codeFencedFenceInfo: buffer, - codeFencedFenceMeta: buffer, - codeIndented: opener(codeFlow, buffer), - codeText: opener(codeText, buffer), - codeTextData: onenterdata, - data: onenterdata, - codeFlowValue: onenterdata, - definition: opener(definition), - definitionDestinationString: buffer, - definitionLabelString: buffer, - definitionTitleString: buffer, - emphasis: opener(emphasis), - hardBreakEscape: opener(hardBreak), - hardBreakTrailing: opener(hardBreak), - htmlFlow: opener(html, buffer), - htmlFlowData: onenterdata, - htmlText: opener(html, buffer), - htmlTextData: onenterdata, - image: opener(image), - label: buffer, - link: opener(link), - listItem: opener(listItem), - listItemValue: onenterlistitemvalue, - listOrdered: opener(list, onenterlistordered), - listUnordered: opener(list), - paragraph: opener(paragraph), - reference: onenterreference, - referenceString: buffer, - resourceDestinationString: buffer, - resourceTitleString: buffer, - setextHeading: opener(heading), - strong: opener(strong), - thematicBreak: opener(thematicBreak) - }, - exit: { - atxHeading: closer(), - atxHeadingSequence: onexitatxheadingsequence, - autolink: closer(), - autolinkEmail: onexitautolinkemail, - autolinkProtocol: onexitautolinkprotocol, - blockQuote: closer(), - characterEscapeValue: onexitdata, - characterReferenceMarkerHexadecimal: onexitcharacterreferencemarker, - characterReferenceMarkerNumeric: onexitcharacterreferencemarker, - characterReferenceValue: onexitcharacterreferencevalue, - codeFenced: closer(onexitcodefenced), - codeFencedFence: onexitcodefencedfence, - codeFencedFenceInfo: onexitcodefencedfenceinfo, - codeFencedFenceMeta: onexitcodefencedfencemeta, - codeFlowValue: onexitdata, - codeIndented: closer(onexitcodeindented), - codeText: closer(onexitcodetext), - codeTextData: onexitdata, - data: onexitdata, - definition: closer(), - definitionDestinationString: onexitdefinitiondestinationstring, - definitionLabelString: onexitdefinitionlabelstring, - definitionTitleString: onexitdefinitiontitlestring, - emphasis: closer(), - hardBreakEscape: closer(onexithardbreak), - hardBreakTrailing: closer(onexithardbreak), - htmlFlow: closer(onexithtmlflow), - htmlFlowData: onexitdata, - htmlText: closer(onexithtmltext), - htmlTextData: onexitdata, - image: closer(onexitimage), - label: onexitlabel, - labelText: onexitlabeltext, - lineEnding: onexitlineending, - link: closer(onexitlink), - listItem: closer(), - listOrdered: closer(), - listUnordered: closer(), - paragraph: closer(), - referenceString: onexitreferencestring, - resourceDestinationString: onexitresourcedestinationstring, - resourceTitleString: onexitresourcetitlestring, - resource: onexitresource, - setextHeading: closer(onexitsetextheading), - setextHeadingLineSequence: onexitsetextheadinglinesequence, - setextHeadingText: onexitsetextheadingtext, - strong: closer(), - thematicBreak: closer() - } - } - configure(config, (options || {}).mdastExtensions || []) - - /** @type {CompileData} */ - const data = {} - return compile - - /** - * Turn micromark events into an mdast tree. - * - * @param {Array} events - * Events. - * @returns {Root} - * mdast tree. - */ - function compile(events) { - /** @type {Root} */ - let tree = { - type: 'root', - children: [] - } - /** @type {Omit} */ - const context = { - stack: [tree], - tokenStack: [], - config, - enter, - exit, - buffer, - resume, - setData, - getData - } - /** @type {Array} */ - const listStack = [] - let index = -1 - while (++index < events.length) { - // We preprocess lists to add `listItem` tokens, and to infer whether - // items the list itself are spread out. - if ( - events[index][1].type === 'listOrdered' || - events[index][1].type === 'listUnordered' - ) { - if (events[index][0] === 'enter') { - listStack.push(index) - } else { - const tail = listStack.pop() - index = prepareList(events, tail, index) - } - } - } - index = -1 - while (++index < events.length) { - const handler = config[events[index][0]] - if (lib_own.call(handler, events[index][1].type)) { - handler[events[index][1].type].call( - Object.assign( - { - sliceSerialize: events[index][2].sliceSerialize - }, - context - ), - events[index][1] - ) - } - } - - // Handle tokens still being open. - if (context.tokenStack.length > 0) { - const tail = context.tokenStack[context.tokenStack.length - 1] - const handler = tail[1] || defaultOnError - handler.call(context, undefined, tail[0]) - } - - // Figure out `root` position. - tree.position = { - start: lib_point( - events.length > 0 - ? events[0][1].start - : { - line: 1, - column: 1, - offset: 0 - } - ), - end: lib_point( - events.length > 0 - ? events[events.length - 2][1].end - : { - line: 1, - column: 1, - offset: 0 - } - ) - } - - // Call transforms. - index = -1 - while (++index < config.transforms.length) { - tree = config.transforms[index](tree) || tree - } - return tree - } - - /** - * @param {Array} events - * @param {number} start - * @param {number} length - * @returns {number} - */ - function prepareList(events, start, length) { - let index = start - 1 - let containerBalance = -1 - let listSpread = false - /** @type {Token | undefined} */ - let listItem - /** @type {number | undefined} */ - let lineIndex - /** @type {number | undefined} */ - let firstBlankLineIndex - /** @type {boolean | undefined} */ - let atMarker - while (++index <= length) { - const event = events[index] - if ( - event[1].type === 'listUnordered' || - event[1].type === 'listOrdered' || - event[1].type === 'blockQuote' - ) { - if (event[0] === 'enter') { - containerBalance++ - } else { - containerBalance-- - } - atMarker = undefined - } else if (event[1].type === 'lineEndingBlank') { - if (event[0] === 'enter') { - if ( - listItem && - !atMarker && - !containerBalance && - !firstBlankLineIndex - ) { - firstBlankLineIndex = index - } - atMarker = undefined - } - } else if ( - event[1].type === 'linePrefix' || - event[1].type === 'listItemValue' || - event[1].type === 'listItemMarker' || - event[1].type === 'listItemPrefix' || - event[1].type === 'listItemPrefixWhitespace' - ) { - // Empty. - } else { - atMarker = undefined - } - if ( - (!containerBalance && - event[0] === 'enter' && - event[1].type === 'listItemPrefix') || - (containerBalance === -1 && - event[0] === 'exit' && - (event[1].type === 'listUnordered' || - event[1].type === 'listOrdered')) - ) { - if (listItem) { - let tailIndex = index - lineIndex = undefined - while (tailIndex--) { - const tailEvent = events[tailIndex] - if ( - tailEvent[1].type === 'lineEnding' || - tailEvent[1].type === 'lineEndingBlank' - ) { - if (tailEvent[0] === 'exit') continue - if (lineIndex) { - events[lineIndex][1].type = 'lineEndingBlank' - listSpread = true - } - tailEvent[1].type = 'lineEnding' - lineIndex = tailIndex - } else if ( - tailEvent[1].type === 'linePrefix' || - tailEvent[1].type === 'blockQuotePrefix' || - tailEvent[1].type === 'blockQuotePrefixWhitespace' || - tailEvent[1].type === 'blockQuoteMarker' || - tailEvent[1].type === 'listItemIndent' - ) { - // Empty - } else { - break - } - } - if ( - firstBlankLineIndex && - (!lineIndex || firstBlankLineIndex < lineIndex) - ) { - listItem._spread = true - } - - // Fix position. - listItem.end = Object.assign( - {}, - lineIndex ? events[lineIndex][1].start : event[1].end - ) - events.splice(lineIndex || index, 0, ['exit', listItem, event[2]]) - index++ - length++ - } - - // Create a new list item. - if (event[1].type === 'listItemPrefix') { - listItem = { - type: 'listItem', - _spread: false, - start: Object.assign({}, event[1].start), - // @ts-expect-error: we’ll add `end` in a second. - end: undefined - } - // @ts-expect-error: `listItem` is most definitely defined, TS... - events.splice(index, 0, ['enter', listItem, event[2]]) - index++ - length++ - firstBlankLineIndex = undefined - atMarker = true - } - } - } - events[start][1]._spread = listSpread - return length - } - - /** - * Set data. - * - * @template {keyof CompileData} Key - * Field type. - * @param {Key} key - * Key of field. - * @param {CompileData[Key]} [value] - * New value. - * @returns {void} - * Nothing. - */ - function setData(key, value) { - data[key] = value - } - - /** - * Get data. - * - * @template {keyof CompileData} Key - * Field type. - * @param {Key} key - * Key of field. - * @returns {CompileData[Key]} - * Value. - */ - function getData(key) { - return data[key] - } - - /** - * Create an opener handle. - * - * @param {(token: Token) => Node} create - * Create a node. - * @param {Handle} [and] - * Optional function to also run. - * @returns {Handle} - * Handle. - */ - function opener(create, and) { - return open - - /** - * @this {CompileContext} - * @param {Token} token - * @returns {void} - */ - function open(token) { - enter.call(this, create(token), token) - if (and) and.call(this, token) - } - } - - /** - * @this {CompileContext} - * @returns {void} - */ - function buffer() { - this.stack.push({ - type: 'fragment', - children: [] - }) - } - - /** - * @template {Node} Kind - * Node type. - * @this {CompileContext} - * Context. - * @param {Kind} node - * Node to enter. - * @param {Token} token - * Corresponding token. - * @param {OnEnterError | undefined} [errorHandler] - * Handle the case where this token is open, but it is closed by something else. - * @returns {Kind} - * The given node. - */ - function enter(node, token, errorHandler) { - const parent = this.stack[this.stack.length - 1] - // @ts-expect-error: Assume `Node` can exist as a child of `parent`. - parent.children.push(node) - this.stack.push(node) - this.tokenStack.push([token, errorHandler]) - // @ts-expect-error: `end` will be patched later. - node.position = { - start: lib_point(token.start) - } - return node - } - - /** - * Create a closer handle. - * - * @param {Handle} [and] - * Optional function to also run. - * @returns {Handle} - * Handle. - */ - function closer(and) { - return close - - /** - * @this {CompileContext} - * @param {Token} token - * @returns {void} - */ - function close(token) { - if (and) and.call(this, token) - exit.call(this, token) - } - } - - /** - * @this {CompileContext} - * Context. - * @param {Token} token - * Corresponding token. - * @param {OnExitError | undefined} [onExitError] - * Handle the case where another token is open. - * @returns {Node} - * The closed node. - */ - function exit(token, onExitError) { - const node = this.stack.pop() - const open = this.tokenStack.pop() - if (!open) { - throw new Error( - 'Cannot close `' + - token.type + - '` (' + - stringifyPosition({ - start: token.start, - end: token.end - }) + - '): it’s not open' - ) - } else if (open[0].type !== token.type) { - if (onExitError) { - onExitError.call(this, token, open[0]) - } else { - const handler = open[1] || defaultOnError - handler.call(this, token, open[0]) - } - } - node.position.end = lib_point(token.end) - return node - } - - /** - * @this {CompileContext} - * @returns {string} - */ - function resume() { - return lib_toString(this.stack.pop()) - } - - // - // Handlers. - // - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onenterlistordered() { - setData('expectingFirstListItemValue', true) - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onenterlistitemvalue(token) { - if (getData('expectingFirstListItemValue')) { - const ancestor = this.stack[this.stack.length - 2] - ancestor.start = Number.parseInt(this.sliceSerialize(token), 10) - setData('expectingFirstListItemValue') - } - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitcodefencedfenceinfo() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.lang = data - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitcodefencedfencemeta() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.meta = data - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitcodefencedfence() { - // Exit if this is the closing fence. - if (getData('flowCodeInside')) return - this.buffer() - setData('flowCodeInside', true) - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitcodefenced() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.value = data.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g, '') - setData('flowCodeInside') - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitcodeindented() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.value = data.replace(/(\r?\n|\r)$/g, '') - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitdefinitionlabelstring(token) { - const label = this.resume() - const node = this.stack[this.stack.length - 1] - node.label = label - node.identifier = normalizeIdentifier( - this.sliceSerialize(token) - ).toLowerCase() - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitdefinitiontitlestring() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.title = data - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitdefinitiondestinationstring() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.url = data - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitatxheadingsequence(token) { - const node = this.stack[this.stack.length - 1] - if (!node.depth) { - const depth = this.sliceSerialize(token).length - node.depth = depth - } - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitsetextheadingtext() { - setData('setextHeadingSlurpLineEnding', true) - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitsetextheadinglinesequence(token) { - const node = this.stack[this.stack.length - 1] - node.depth = this.sliceSerialize(token).charCodeAt(0) === 61 ? 1 : 2 - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitsetextheading() { - setData('setextHeadingSlurpLineEnding') - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onenterdata(token) { - const node = this.stack[this.stack.length - 1] - let tail = node.children[node.children.length - 1] - if (!tail || tail.type !== 'text') { - // Add a new text node. - tail = text() - // @ts-expect-error: we’ll add `end` later. - tail.position = { - start: lib_point(token.start) - } - // @ts-expect-error: Assume `parent` accepts `text`. - node.children.push(tail) - } - this.stack.push(tail) - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitdata(token) { - const tail = this.stack.pop() - tail.value += this.sliceSerialize(token) - tail.position.end = lib_point(token.end) - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitlineending(token) { - const context = this.stack[this.stack.length - 1] - // If we’re at a hard break, include the line ending in there. - if (getData('atHardBreak')) { - const tail = context.children[context.children.length - 1] - tail.position.end = lib_point(token.end) - setData('atHardBreak') - return - } - if ( - !getData('setextHeadingSlurpLineEnding') && - config.canContainEols.includes(context.type) - ) { - onenterdata.call(this, token) - onexitdata.call(this, token) - } - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexithardbreak() { - setData('atHardBreak', true) - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexithtmlflow() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.value = data - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexithtmltext() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.value = data - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitcodetext() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.value = data - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitlink() { - const node = this.stack[this.stack.length - 1] - // Note: there are also `identifier` and `label` fields on this link node! - // These are used / cleaned here. - // To do: clean. - if (getData('inReference')) { - /** @type {ReferenceType} */ - const referenceType = getData('referenceType') || 'shortcut' - node.type += 'Reference' - // @ts-expect-error: mutate. - node.referenceType = referenceType - // @ts-expect-error: mutate. - delete node.url - delete node.title - } else { - // @ts-expect-error: mutate. - delete node.identifier - // @ts-expect-error: mutate. - delete node.label - } - setData('referenceType') - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitimage() { - const node = this.stack[this.stack.length - 1] - // Note: there are also `identifier` and `label` fields on this link node! - // These are used / cleaned here. - // To do: clean. - if (getData('inReference')) { - /** @type {ReferenceType} */ - const referenceType = getData('referenceType') || 'shortcut' - node.type += 'Reference' - // @ts-expect-error: mutate. - node.referenceType = referenceType - // @ts-expect-error: mutate. - delete node.url - delete node.title - } else { - // @ts-expect-error: mutate. - delete node.identifier - // @ts-expect-error: mutate. - delete node.label - } - setData('referenceType') - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitlabeltext(token) { - const string = this.sliceSerialize(token) - const ancestor = this.stack[this.stack.length - 2] - // @ts-expect-error: stash this on the node, as it might become a reference - // later. - ancestor.label = decodeString(string) - // @ts-expect-error: same as above. - ancestor.identifier = normalizeIdentifier(string).toLowerCase() - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitlabel() { - const fragment = this.stack[this.stack.length - 1] - const value = this.resume() - const node = this.stack[this.stack.length - 1] - // Assume a reference. - setData('inReference', true) - if (node.type === 'link') { - /** @type {Array} */ - // @ts-expect-error: Assume static phrasing content. - const children = fragment.children - node.children = children - } else { - node.alt = value - } - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitresourcedestinationstring() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.url = data - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitresourcetitlestring() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.title = data - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitresource() { - setData('inReference') - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onenterreference() { - setData('referenceType', 'collapsed') - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitreferencestring(token) { - const label = this.resume() - const node = this.stack[this.stack.length - 1] - // @ts-expect-error: stash this on the node, as it might become a reference - // later. - node.label = label - // @ts-expect-error: same as above. - node.identifier = normalizeIdentifier( - this.sliceSerialize(token) - ).toLowerCase() - setData('referenceType', 'full') - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitcharacterreferencemarker(token) { - setData('characterReferenceType', token.type) - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitcharacterreferencevalue(token) { - const data = this.sliceSerialize(token) - const type = getData('characterReferenceType') - /** @type {string} */ - let value - if (type) { - value = decodeNumericCharacterReference( - data, - type === 'characterReferenceMarkerNumeric' ? 10 : 16 - ) - setData('characterReferenceType') - } else { - const result = decodeNamedCharacterReference(data) - value = result - } - const tail = this.stack.pop() - tail.value += value - tail.position.end = lib_point(token.end) - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitautolinkprotocol(token) { - onexitdata.call(this, token) - const node = this.stack[this.stack.length - 1] - node.url = this.sliceSerialize(token) - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitautolinkemail(token) { - onexitdata.call(this, token) - const node = this.stack[this.stack.length - 1] - node.url = 'mailto:' + this.sliceSerialize(token) - } - - // - // Creaters. - // - - /** @returns {Blockquote} */ - function blockQuote() { - return { - type: 'blockquote', - children: [] - } - } - - /** @returns {Code} */ - function codeFlow() { - return { - type: 'code', - lang: null, - meta: null, - value: '' - } - } - - /** @returns {InlineCode} */ - function codeText() { - return { - type: 'inlineCode', - value: '' - } - } - - /** @returns {Definition} */ - function definition() { - return { - type: 'definition', - identifier: '', - label: null, - title: null, - url: '' - } - } - - /** @returns {Emphasis} */ - function emphasis() { - return { - type: 'emphasis', - children: [] - } - } - - /** @returns {Heading} */ - function heading() { - // @ts-expect-error `depth` will be set later. - return { - type: 'heading', - depth: undefined, - children: [] - } - } - - /** @returns {Break} */ - function hardBreak() { - return { - type: 'break' - } - } - - /** @returns {HTML} */ - function html() { - return { - type: 'html', - value: '' - } - } - - /** @returns {Image} */ - function image() { - return { - type: 'image', - title: null, - url: '', - alt: null - } - } - - /** @returns {Link} */ - function link() { - return { - type: 'link', - title: null, - url: '', - children: [] - } - } - - /** - * @param {Token} token - * @returns {List} - */ - function list(token) { - return { - type: 'list', - ordered: token.type === 'listOrdered', - start: null, - spread: token._spread, - children: [] - } - } - - /** - * @param {Token} token - * @returns {ListItem} - */ - function listItem(token) { - return { - type: 'listItem', - spread: token._spread, - checked: null, - children: [] - } - } - - /** @returns {Paragraph} */ - function paragraph() { - return { - type: 'paragraph', - children: [] - } - } - - /** @returns {Strong} */ - function strong() { - return { - type: 'strong', - children: [] - } - } - - /** @returns {Text} */ - function text() { - return { - type: 'text', - value: '' - } - } - - /** @returns {ThematicBreak} */ - function thematicBreak() { - return { - type: 'thematicBreak' - } - } -} - -/** - * Copy a point-like value. - * - * @param {Point} d - * Point-like value. - * @returns {Point} - * unist point. - */ -function lib_point(d) { - return { - line: d.line, - column: d.column, - offset: d.offset - } -} - -/** - * @param {Config} combined - * @param {Array>} extensions - * @returns {void} - */ -function configure(combined, extensions) { - let index = -1 - while (++index < extensions.length) { - const value = extensions[index] - if (Array.isArray(value)) { - configure(combined, value) - } else { - extension(combined, value) - } - } -} - -/** - * @param {Config} combined - * @param {Extension} extension - * @returns {void} - */ -function extension(combined, extension) { - /** @type {keyof Extension} */ - let key - for (key in extension) { - if (lib_own.call(extension, key)) { - if (key === 'canContainEols') { - const right = extension[key] - if (right) { - combined[key].push(...right) - } - } else if (key === 'transforms') { - const right = extension[key] - if (right) { - combined[key].push(...right) - } - } else if (key === 'enter' || key === 'exit') { - const right = extension[key] - if (right) { - Object.assign(combined[key], right) - } - } - } - } -} - -/** @type {OnEnterError} */ -function defaultOnError(left, right) { - if (left) { - throw new Error( - 'Cannot close `' + - left.type + - '` (' + - stringifyPosition({ - start: left.start, - end: left.end - }) + - '): a different token (`' + - right.type + - '`, ' + - stringifyPosition({ - start: right.start, - end: right.end - }) + - ') is open' - ) - } else { - throw new Error( - 'Cannot close document, a token (`' + - right.type + - '`, ' + - stringifyPosition({ - start: right.start, - end: right.end - }) + - ') is still open' - ) - } -} - -// EXTERNAL MODULE: ./node_modules/ts-dedent/esm/index.js -var esm = __webpack_require__(60513); -;// CONCATENATED MODULE: ./node_modules/mermaid/dist/createText-2e5e7dd3.js - - - -function preprocessMarkdown(markdown) { - const withoutMultipleNewlines = markdown.replace(/\n{2,}/g, "\n"); - const withoutExtraSpaces = (0,esm/* dedent */.T)(withoutMultipleNewlines); - return withoutExtraSpaces; -} -function markdownToLines(markdown) { - const preprocessedMarkdown = preprocessMarkdown(markdown); - const { children } = fromMarkdown(preprocessedMarkdown); - const lines = [[]]; - let currentLine = 0; - function processNode(node, parentType = "normal") { - if (node.type === "text") { - const textLines = node.value.split("\n"); - textLines.forEach((textLine, index) => { - if (index !== 0) { - currentLine++; - lines.push([]); - } - textLine.split(" ").forEach((word) => { - if (word) { - lines[currentLine].push({ content: word, type: parentType }); - } - }); - }); - } else if (node.type === "strong" || node.type === "emphasis") { - node.children.forEach((contentNode) => { - processNode(contentNode, node.type); - }); - } - } - children.forEach((treeNode) => { - if (treeNode.type === "paragraph") { - treeNode.children.forEach((contentNode) => { - processNode(contentNode); - }); - } - }); - return lines; -} -function markdownToHTML(markdown) { - const { children } = fromMarkdown(markdown); - function output(node) { - if (node.type === "text") { - return node.value.replace(/\n/g, "
"); - } else if (node.type === "strong") { - return `${node.children.map(output).join("")}`; - } else if (node.type === "emphasis") { - return `${node.children.map(output).join("")}`; - } else if (node.type === "paragraph") { - return `

${node.children.map(output).join("")}

`; - } - return `Unsupported markdown: ${node.type}`; - } - return children.map(output).join(""); -} -function splitTextToChars(text) { - if (Intl.Segmenter) { - return [...new Intl.Segmenter().segment(text)].map((s) => s.segment); - } - return [...text]; -} -function splitWordToFitWidth(checkFit, word) { - const characters = splitTextToChars(word.content); - return splitWordToFitWidthRecursion(checkFit, [], characters, word.type); -} -function splitWordToFitWidthRecursion(checkFit, usedChars, remainingChars, type) { - if (remainingChars.length === 0) { - return [ - { content: usedChars.join(""), type }, - { content: "", type } - ]; - } - const [nextChar, ...rest] = remainingChars; - const newWord = [...usedChars, nextChar]; - if (checkFit([{ content: newWord.join(""), type }])) { - return splitWordToFitWidthRecursion(checkFit, newWord, rest, type); - } - if (usedChars.length === 0 && nextChar) { - usedChars.push(nextChar); - remainingChars.shift(); - } - return [ - { content: usedChars.join(""), type }, - { content: remainingChars.join(""), type } - ]; -} -function splitLineToFitWidth(line, checkFit) { - if (line.some(({ content }) => content.includes("\n"))) { - throw new Error("splitLineToFitWidth does not support newlines in the line"); - } - return splitLineToFitWidthRecursion(line, checkFit); -} -function splitLineToFitWidthRecursion(words, checkFit, lines = [], newLine = []) { - if (words.length === 0) { - if (newLine.length > 0) { - lines.push(newLine); - } - return lines.length > 0 ? lines : []; - } - let joiner = ""; - if (words[0].content === " ") { - joiner = " "; - words.shift(); - } - const nextWord = words.shift() ?? { content: " ", type: "normal" }; - const lineWithNextWord = [...newLine]; - if (joiner !== "") { - lineWithNextWord.push({ content: joiner, type: "normal" }); - } - lineWithNextWord.push(nextWord); - if (checkFit(lineWithNextWord)) { - return splitLineToFitWidthRecursion(words, checkFit, lines, lineWithNextWord); - } - if (newLine.length > 0) { - lines.push(newLine); - words.unshift(nextWord); - } else if (nextWord.content) { - const [line, rest] = splitWordToFitWidth(checkFit, nextWord); - lines.push([line]); - if (rest.content) { - words.unshift(rest); - } - } - return splitLineToFitWidthRecursion(words, checkFit, lines); -} -function applyStyle(dom, styleFn) { - if (styleFn) { - dom.attr("style", styleFn); - } -} -function addHtmlSpan(element, node, width, classes, addBackground = false) { - const fo = element.append("foreignObject"); - const div = fo.append("xhtml:div"); - const label = node.label; - const labelClass = node.isNode ? "nodeLabel" : "edgeLabel"; - div.html( - ` - " + label + "" - ); - applyStyle(div, node.labelStyle); - div.style("display", "table-cell"); - div.style("white-space", "nowrap"); - div.style("max-width", width + "px"); - div.attr("xmlns", "http://www.w3.org/1999/xhtml"); - if (addBackground) { - div.attr("class", "labelBkg"); - } - let bbox = div.node().getBoundingClientRect(); - if (bbox.width === width) { - div.style("display", "table"); - div.style("white-space", "break-spaces"); - div.style("width", width + "px"); - bbox = div.node().getBoundingClientRect(); - } - fo.style("width", bbox.width); - fo.style("height", bbox.height); - return fo.node(); -} -function createTspan(textElement, lineIndex, lineHeight) { - return textElement.append("tspan").attr("class", "text-outer-tspan").attr("x", 0).attr("y", lineIndex * lineHeight - 0.1 + "em").attr("dy", lineHeight + "em"); -} -function computeWidthOfText(parentNode, lineHeight, line) { - const testElement = parentNode.append("text"); - const testSpan = createTspan(testElement, 1, lineHeight); - updateTextContentAndStyles(testSpan, line); - const textLength = testSpan.node().getComputedTextLength(); - testElement.remove(); - return textLength; -} -function computeDimensionOfText(parentNode, lineHeight, text) { - var _a; - const testElement = parentNode.append("text"); - const testSpan = createTspan(testElement, 1, lineHeight); - updateTextContentAndStyles(testSpan, [{ content: text, type: "normal" }]); - const textDimension = (_a = testSpan.node()) == null ? void 0 : _a.getBoundingClientRect(); - if (textDimension) { - testElement.remove(); - } - return textDimension; -} -function createFormattedText(width, g, structuredText, addBackground = false) { - const lineHeight = 1.1; - const labelGroup = g.append("g"); - const bkg = labelGroup.insert("rect").attr("class", "background"); - const textElement = labelGroup.append("text").attr("y", "-10.1"); - let lineIndex = 0; - for (const line of structuredText) { - const checkWidth = (line2) => computeWidthOfText(labelGroup, lineHeight, line2) <= width; - const linesUnderWidth = checkWidth(line) ? [line] : splitLineToFitWidth(line, checkWidth); - for (const preparedLine of linesUnderWidth) { - const tspan = createTspan(textElement, lineIndex, lineHeight); - updateTextContentAndStyles(tspan, preparedLine); - lineIndex++; - } - } - if (addBackground) { - const bbox = textElement.node().getBBox(); - const padding = 2; - bkg.attr("x", -padding).attr("y", -padding).attr("width", bbox.width + 2 * padding).attr("height", bbox.height + 2 * padding); - return labelGroup.node(); - } else { - return textElement.node(); - } -} -function updateTextContentAndStyles(tspan, wrappedLine) { - tspan.text(""); - wrappedLine.forEach((word, index) => { - const innerTspan = tspan.append("tspan").attr("font-style", word.type === "emphasis" ? "italic" : "normal").attr("class", "text-inner-tspan").attr("font-weight", word.type === "strong" ? "bold" : "normal"); - if (index === 0) { - innerTspan.text(word.content); - } else { - innerTspan.text(" " + word.content); - } - }); -} -const createText = (el, text = "", { - style = "", - isTitle = false, - classes = "", - useHtmlLabels = true, - isNode = true, - width = 200, - addSvgBackground = false -} = {}) => { - mermaid_b5860b54.l.info("createText", text, style, isTitle, classes, useHtmlLabels, isNode, addSvgBackground); - if (useHtmlLabels) { - const htmlText = markdownToHTML(text); - const node = { - isNode, - label: (0,mermaid_b5860b54.M)(htmlText).replace( - /fa[blrs]?:fa-[\w-]+/g, - // cspell: disable-line - (s) => `` - ), - labelStyle: style.replace("fill:", "color:") - }; - const vertexNode = addHtmlSpan(el, node, width, classes, addSvgBackground); - return vertexNode; - } else { - const structuredText = markdownToLines(text); - const svgLabel = createFormattedText(width, el, structuredText, addSvgBackground); - return svgLabel; - } -}; - - - -/***/ }), - -/***/ 88146: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ a: () => (/* binding */ insertMarkers$1), -/* harmony export */ b: () => (/* binding */ clear$1), -/* harmony export */ c: () => (/* binding */ createLabel$1), -/* harmony export */ d: () => (/* binding */ clear), -/* harmony export */ e: () => (/* binding */ insertNode), -/* harmony export */ f: () => (/* binding */ insertEdgeLabel), -/* harmony export */ g: () => (/* binding */ getSubGraphTitleMargins), -/* harmony export */ h: () => (/* binding */ insertEdge), -/* harmony export */ i: () => (/* binding */ intersectRect$1), -/* harmony export */ j: () => (/* binding */ positionEdgeLabel), -/* harmony export */ k: () => (/* binding */ getLineFunctionsWithOffset), -/* harmony export */ l: () => (/* binding */ labelHelper), -/* harmony export */ m: () => (/* binding */ addEdgeMarkers), -/* harmony export */ p: () => (/* binding */ positionNode), -/* harmony export */ s: () => (/* binding */ setNodeElem), -/* harmony export */ u: () => (/* binding */ updateNodeBounds) -/* harmony export */ }); -/* harmony import */ var _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(86079); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(26312); -/* harmony import */ var _createText_2e5e7dd3_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(73743); - - - -const insertMarkers = (elem, markerArray, type, id) => { - markerArray.forEach((markerName) => { - markers[markerName](elem, type, id); - }); -}; -const extension = (elem, type, id) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.trace("Making markers for ", id); - elem.append("defs").append("marker").attr("id", id + "_" + type + "-extensionStart").attr("class", "marker extension " + type).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 1,7 L18,13 V 1 Z"); - elem.append("defs").append("marker").attr("id", id + "_" + type + "-extensionEnd").attr("class", "marker extension " + type).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 1,1 V 13 L18,7 Z"); -}; -const composition = (elem, type, id) => { - elem.append("defs").append("marker").attr("id", id + "_" + type + "-compositionStart").attr("class", "marker composition " + type).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"); - elem.append("defs").append("marker").attr("id", id + "_" + type + "-compositionEnd").attr("class", "marker composition " + type).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"); -}; -const aggregation = (elem, type, id) => { - elem.append("defs").append("marker").attr("id", id + "_" + type + "-aggregationStart").attr("class", "marker aggregation " + type).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"); - elem.append("defs").append("marker").attr("id", id + "_" + type + "-aggregationEnd").attr("class", "marker aggregation " + type).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"); -}; -const dependency = (elem, type, id) => { - elem.append("defs").append("marker").attr("id", id + "_" + type + "-dependencyStart").attr("class", "marker dependency " + type).attr("refX", 6).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 5,7 L9,13 L1,7 L9,1 Z"); - elem.append("defs").append("marker").attr("id", id + "_" + type + "-dependencyEnd").attr("class", "marker dependency " + type).attr("refX", 13).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z"); -}; -const lollipop = (elem, type, id) => { - elem.append("defs").append("marker").attr("id", id + "_" + type + "-lollipopStart").attr("class", "marker lollipop " + type).attr("refX", 13).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("circle").attr("stroke", "black").attr("fill", "transparent").attr("cx", 7).attr("cy", 7).attr("r", 6); - elem.append("defs").append("marker").attr("id", id + "_" + type + "-lollipopEnd").attr("class", "marker lollipop " + type).attr("refX", 1).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("circle").attr("stroke", "black").attr("fill", "transparent").attr("cx", 7).attr("cy", 7).attr("r", 6); -}; -const point = (elem, type, id) => { - elem.append("marker").attr("id", id + "_" + type + "-pointEnd").attr("class", "marker " + type).attr("viewBox", "0 0 10 10").attr("refX", 6).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"); - elem.append("marker").attr("id", id + "_" + type + "-pointStart").attr("class", "marker " + type).attr("viewBox", "0 0 10 10").attr("refX", 4.5).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 5 L 10 10 L 10 0 z").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"); -}; -const circle$1 = (elem, type, id) => { - elem.append("marker").attr("id", id + "_" + type + "-circleEnd").attr("class", "marker " + type).attr("viewBox", "0 0 10 10").attr("refX", 11).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"); - elem.append("marker").attr("id", id + "_" + type + "-circleStart").attr("class", "marker " + type).attr("viewBox", "0 0 10 10").attr("refX", -1).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"); -}; -const cross = (elem, type, id) => { - elem.append("marker").attr("id", id + "_" + type + "-crossEnd").attr("class", "marker cross " + type).attr("viewBox", "0 0 11 11").attr("refX", 12).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0"); - elem.append("marker").attr("id", id + "_" + type + "-crossStart").attr("class", "marker cross " + type).attr("viewBox", "0 0 11 11").attr("refX", -1).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0"); -}; -const barb = (elem, type, id) => { - elem.append("defs").append("marker").attr("id", id + "_" + type + "-barbEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 14).attr("markerUnits", "strokeWidth").attr("orient", "auto").append("path").attr("d", "M 19,7 L9,13 L14,7 L9,1 Z"); -}; -const markers = { - extension, - composition, - aggregation, - dependency, - lollipop, - point, - circle: circle$1, - cross, - barb -}; -const insertMarkers$1 = insertMarkers; -function applyStyle(dom, styleFn) { - if (styleFn) { - dom.attr("style", styleFn); - } -} -function addHtmlLabel(node) { - const fo = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(document.createElementNS("http://www.w3.org/2000/svg", "foreignObject")); - const div = fo.append("xhtml:div"); - const label = node.label; - const labelClass = node.isNode ? "nodeLabel" : "edgeLabel"; - div.html( - '" + label + "" - ); - applyStyle(div, node.labelStyle); - div.style("display", "inline-block"); - div.style("white-space", "nowrap"); - div.attr("xmlns", "http://www.w3.org/1999/xhtml"); - return fo.node(); -} -const createLabel = (_vertexText, style, isTitle, isNode) => { - let vertexText = _vertexText || ""; - if (typeof vertexText === "object") { - vertexText = vertexText[0]; - } - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { - vertexText = vertexText.replace(/\\n|\n/g, "
"); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("vertexText" + vertexText); - const node = { - isNode, - label: (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.M)(vertexText).replace( - /fa[blrs]?:fa-[\w-]+/g, - // cspell: disable-line - (s) => `` - ), - labelStyle: style.replace("fill:", "color:") - }; - let vertexNode = addHtmlLabel(node); - return vertexNode; - } else { - const svgLabel = document.createElementNS("http://www.w3.org/2000/svg", "text"); - svgLabel.setAttribute("style", style.replace("color:", "fill:")); - let rows = []; - if (typeof vertexText === "string") { - rows = vertexText.split(/\\n|\n|/gi); - } else if (Array.isArray(vertexText)) { - rows = vertexText; - } else { - rows = []; - } - for (const row of rows) { - const tspan = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); - tspan.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"); - tspan.setAttribute("dy", "1em"); - tspan.setAttribute("x", "0"); - if (isTitle) { - tspan.setAttribute("class", "title-row"); - } else { - tspan.setAttribute("class", "row"); - } - tspan.textContent = row.trim(); - svgLabel.appendChild(tspan); - } - return svgLabel; - } -}; -const createLabel$1 = createLabel; -const labelHelper = async (parent, node, _classes, isNode) => { - let classes; - const useHtmlLabels = node.useHtmlLabels || (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels); - if (!_classes) { - classes = "node default"; - } else { - classes = _classes; - } - const shapeSvg = parent.insert("g").attr("class", classes).attr("id", node.domId || node.id); - const label = shapeSvg.insert("g").attr("class", "label").attr("style", node.labelStyle); - let labelText; - if (node.labelText === void 0) { - labelText = ""; - } else { - labelText = typeof node.labelText === "string" ? node.labelText : node.labelText[0]; - } - const textNode = label.node(); - let text; - if (node.labelType === "markdown") { - text = (0,_createText_2e5e7dd3_js__WEBPACK_IMPORTED_MODULE_2__.a)(label, (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.d)((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.M)(labelText), (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)()), { - useHtmlLabels, - width: node.width || (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.wrappingWidth, - classes: "markdown-node-label" - }); - } else { - text = textNode.appendChild( - createLabel$1( - (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.d)((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.M)(labelText), (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)()), - node.labelStyle, - false, - isNode - ) - ); - } - let bbox = text.getBBox(); - const halfPadding = node.padding / 2; - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { - const div = text.children[0]; - const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(text); - const images = div.getElementsByTagName("img"); - if (images) { - const noImgText = labelText.replace(/]*>/g, "").trim() === ""; - await Promise.all( - [...images].map( - (img) => new Promise((res) => { - function setupImage() { - img.style.display = "flex"; - img.style.flexDirection = "column"; - if (noImgText) { - const bodyFontSize = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().fontSize ? (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().fontSize : window.getComputedStyle(document.body).fontSize; - const enlargingFactor = 5; - const width = parseInt(bodyFontSize, 10) * enlargingFactor + "px"; - img.style.minWidth = width; - img.style.maxWidth = width; - } else { - img.style.width = "100%"; - } - res(img); - } - setTimeout(() => { - if (img.complete) { - setupImage(); - } - }); - img.addEventListener("error", setupImage); - img.addEventListener("load", setupImage); - }) - ) - ); - } - bbox = div.getBoundingClientRect(); - dv.attr("width", bbox.width); - dv.attr("height", bbox.height); - } - if (useHtmlLabels) { - label.attr("transform", "translate(" + -bbox.width / 2 + ", " + -bbox.height / 2 + ")"); - } else { - label.attr("transform", "translate(0, " + -bbox.height / 2 + ")"); - } - if (node.centerLabel) { - label.attr("transform", "translate(" + -bbox.width / 2 + ", " + -bbox.height / 2 + ")"); - } - label.insert("rect", ":first-child"); - return { shapeSvg, bbox, halfPadding, label }; -}; -const updateNodeBounds = (node, element) => { - const bbox = element.node().getBBox(); - node.width = bbox.width; - node.height = bbox.height; -}; -function insertPolygonShape(parent, w, h, points) { - return parent.insert("polygon", ":first-child").attr( - "points", - points.map(function(d) { - return d.x + "," + d.y; - }).join(" ") - ).attr("class", "label-container").attr("transform", "translate(" + -w / 2 + "," + h / 2 + ")"); -} -function intersectNode(node, point2) { - return node.intersect(point2); -} -function intersectEllipse(node, rx, ry, point2) { - var cx = node.x; - var cy = node.y; - var px = cx - point2.x; - var py = cy - point2.y; - var det = Math.sqrt(rx * rx * py * py + ry * ry * px * px); - var dx = Math.abs(rx * ry * px / det); - if (point2.x < cx) { - dx = -dx; - } - var dy = Math.abs(rx * ry * py / det); - if (point2.y < cy) { - dy = -dy; - } - return { x: cx + dx, y: cy + dy }; -} -function intersectCircle(node, rx, point2) { - return intersectEllipse(node, rx, rx, point2); -} -function intersectLine(p1, p2, q1, q2) { - var a1, a2, b1, b2, c1, c2; - var r1, r2, r3, r4; - var denom, offset, num; - var x, y; - a1 = p2.y - p1.y; - b1 = p1.x - p2.x; - c1 = p2.x * p1.y - p1.x * p2.y; - r3 = a1 * q1.x + b1 * q1.y + c1; - r4 = a1 * q2.x + b1 * q2.y + c1; - if (r3 !== 0 && r4 !== 0 && sameSign(r3, r4)) { - return; - } - a2 = q2.y - q1.y; - b2 = q1.x - q2.x; - c2 = q2.x * q1.y - q1.x * q2.y; - r1 = a2 * p1.x + b2 * p1.y + c2; - r2 = a2 * p2.x + b2 * p2.y + c2; - if (r1 !== 0 && r2 !== 0 && sameSign(r1, r2)) { - return; - } - denom = a1 * b2 - a2 * b1; - if (denom === 0) { - return; - } - offset = Math.abs(denom / 2); - num = b1 * c2 - b2 * c1; - x = num < 0 ? (num - offset) / denom : (num + offset) / denom; - num = a2 * c1 - a1 * c2; - y = num < 0 ? (num - offset) / denom : (num + offset) / denom; - return { x, y }; -} -function sameSign(r1, r2) { - return r1 * r2 > 0; -} -function intersectPolygon(node, polyPoints, point2) { - var x1 = node.x; - var y1 = node.y; - var intersections = []; - var minX = Number.POSITIVE_INFINITY; - var minY = Number.POSITIVE_INFINITY; - if (typeof polyPoints.forEach === "function") { - polyPoints.forEach(function(entry) { - minX = Math.min(minX, entry.x); - minY = Math.min(minY, entry.y); - }); - } else { - minX = Math.min(minX, polyPoints.x); - minY = Math.min(minY, polyPoints.y); - } - var left = x1 - node.width / 2 - minX; - var top = y1 - node.height / 2 - minY; - for (var i = 0; i < polyPoints.length; i++) { - var p1 = polyPoints[i]; - var p2 = polyPoints[i < polyPoints.length - 1 ? i + 1 : 0]; - var intersect2 = intersectLine( - node, - point2, - { x: left + p1.x, y: top + p1.y }, - { x: left + p2.x, y: top + p2.y } - ); - if (intersect2) { - intersections.push(intersect2); - } - } - if (!intersections.length) { - return node; - } - if (intersections.length > 1) { - intersections.sort(function(p, q) { - var pdx = p.x - point2.x; - var pdy = p.y - point2.y; - var distp = Math.sqrt(pdx * pdx + pdy * pdy); - var qdx = q.x - point2.x; - var qdy = q.y - point2.y; - var distq = Math.sqrt(qdx * qdx + qdy * qdy); - return distp < distq ? -1 : distp === distq ? 0 : 1; - }); - } - return intersections[0]; -} -const intersectRect = (node, point2) => { - var x = node.x; - var y = node.y; - var dx = point2.x - x; - var dy = point2.y - y; - var w = node.width / 2; - var h = node.height / 2; - var sx, sy; - if (Math.abs(dy) * w > Math.abs(dx) * h) { - if (dy < 0) { - h = -h; - } - sx = dy === 0 ? 0 : h * dx / dy; - sy = h; - } else { - if (dx < 0) { - w = -w; - } - sx = w; - sy = dx === 0 ? 0 : w * dy / dx; - } - return { x: x + sx, y: y + sy }; -}; -const intersectRect$1 = intersectRect; -const intersect = { - node: intersectNode, - circle: intersectCircle, - ellipse: intersectEllipse, - polygon: intersectPolygon, - rect: intersectRect$1 -}; -const note = async (parent, node) => { - const useHtmlLabels = node.useHtmlLabels || (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels; - if (!useHtmlLabels) { - node.centerLabel = true; - } - const { shapeSvg, bbox, halfPadding } = await labelHelper( - parent, - node, - "node " + node.classes, - true - ); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Classes = ", node.classes); - const rect2 = shapeSvg.insert("rect", ":first-child"); - rect2.attr("rx", node.rx).attr("ry", node.ry).attr("x", -bbox.width / 2 - halfPadding).attr("y", -bbox.height / 2 - halfPadding).attr("width", bbox.width + node.padding).attr("height", bbox.height + node.padding); - updateNodeBounds(node, rect2); - node.intersect = function(point2) { - return intersect.rect(node, point2); - }; - return shapeSvg; -}; -const note$1 = note; -const expandAndDeduplicateDirections = (directions) => { - const uniqueDirections = /* @__PURE__ */ new Set(); - for (const direction of directions) { - switch (direction) { - case "x": - uniqueDirections.add("right"); - uniqueDirections.add("left"); - break; - case "y": - uniqueDirections.add("up"); - uniqueDirections.add("down"); - break; - default: - uniqueDirections.add(direction); - break; - } - } - return uniqueDirections; -}; -const getArrowPoints = (duplicatedDirections, bbox, node) => { - const directions = expandAndDeduplicateDirections(duplicatedDirections); - const f = 2; - const height = bbox.height + 2 * node.padding; - const midpoint = height / f; - const width = bbox.width + 2 * midpoint + node.padding; - const padding = node.padding / 2; - if (directions.has("right") && directions.has("left") && directions.has("up") && directions.has("down")) { - return [ - // Bottom - { x: 0, y: 0 }, - { x: midpoint, y: 0 }, - { x: width / 2, y: 2 * padding }, - { x: width - midpoint, y: 0 }, - { x: width, y: 0 }, - // Right - { x: width, y: -height / 3 }, - { x: width + 2 * padding, y: -height / 2 }, - { x: width, y: -2 * height / 3 }, - { x: width, y: -height }, - // Top - { x: width - midpoint, y: -height }, - { x: width / 2, y: -height - 2 * padding }, - { x: midpoint, y: -height }, - // Left - { x: 0, y: -height }, - { x: 0, y: -2 * height / 3 }, - { x: -2 * padding, y: -height / 2 }, - { x: 0, y: -height / 3 } - ]; - } - if (directions.has("right") && directions.has("left") && directions.has("up")) { - return [ - { x: midpoint, y: 0 }, - { x: width - midpoint, y: 0 }, - { x: width, y: -height / 2 }, - { x: width - midpoint, y: -height }, - { x: midpoint, y: -height }, - { x: 0, y: -height / 2 } - ]; - } - if (directions.has("right") && directions.has("left") && directions.has("down")) { - return [ - { x: 0, y: 0 }, - { x: midpoint, y: -height }, - { x: width - midpoint, y: -height }, - { x: width, y: 0 } - ]; - } - if (directions.has("right") && directions.has("up") && directions.has("down")) { - return [ - { x: 0, y: 0 }, - { x: width, y: -midpoint }, - { x: width, y: -height + midpoint }, - { x: 0, y: -height } - ]; - } - if (directions.has("left") && directions.has("up") && directions.has("down")) { - return [ - { x: width, y: 0 }, - { x: 0, y: -midpoint }, - { x: 0, y: -height + midpoint }, - { x: width, y: -height } - ]; - } - if (directions.has("right") && directions.has("left")) { - return [ - { x: midpoint, y: 0 }, - { x: midpoint, y: -padding }, - { x: width - midpoint, y: -padding }, - { x: width - midpoint, y: 0 }, - { x: width, y: -height / 2 }, - { x: width - midpoint, y: -height }, - { x: width - midpoint, y: -height + padding }, - { x: midpoint, y: -height + padding }, - { x: midpoint, y: -height }, - { x: 0, y: -height / 2 } - ]; - } - if (directions.has("up") && directions.has("down")) { - return [ - // Bottom center - { x: width / 2, y: 0 }, - // Left pont of bottom arrow - { x: 0, y: -padding }, - { x: midpoint, y: -padding }, - // Left top over vertical section - { x: midpoint, y: -height + padding }, - { x: 0, y: -height + padding }, - // Top of arrow - { x: width / 2, y: -height }, - { x: width, y: -height + padding }, - // Top of right vertical bar - { x: width - midpoint, y: -height + padding }, - { x: width - midpoint, y: -padding }, - { x: width, y: -padding } - ]; - } - if (directions.has("right") && directions.has("up")) { - return [ - { x: 0, y: 0 }, - { x: width, y: -midpoint }, - { x: 0, y: -height } - ]; - } - if (directions.has("right") && directions.has("down")) { - return [ - { x: 0, y: 0 }, - { x: width, y: 0 }, - { x: 0, y: -height } - ]; - } - if (directions.has("left") && directions.has("up")) { - return [ - { x: width, y: 0 }, - { x: 0, y: -midpoint }, - { x: width, y: -height } - ]; - } - if (directions.has("left") && directions.has("down")) { - return [ - { x: width, y: 0 }, - { x: 0, y: 0 }, - { x: width, y: -height } - ]; - } - if (directions.has("right")) { - return [ - { x: midpoint, y: -padding }, - { x: midpoint, y: -padding }, - { x: width - midpoint, y: -padding }, - { x: width - midpoint, y: 0 }, - { x: width, y: -height / 2 }, - { x: width - midpoint, y: -height }, - { x: width - midpoint, y: -height + padding }, - // top left corner of arrow - { x: midpoint, y: -height + padding }, - { x: midpoint, y: -height + padding } - ]; - } - if (directions.has("left")) { - return [ - { x: midpoint, y: 0 }, - { x: midpoint, y: -padding }, - // Two points, the right corners - { x: width - midpoint, y: -padding }, - { x: width - midpoint, y: -height + padding }, - { x: midpoint, y: -height + padding }, - { x: midpoint, y: -height }, - { x: 0, y: -height / 2 } - ]; - } - if (directions.has("up")) { - return [ - // Bottom center - { x: midpoint, y: -padding }, - // Left top over vertical section - { x: midpoint, y: -height + padding }, - { x: 0, y: -height + padding }, - // Top of arrow - { x: width / 2, y: -height }, - { x: width, y: -height + padding }, - // Top of right vertical bar - { x: width - midpoint, y: -height + padding }, - { x: width - midpoint, y: -padding } - ]; - } - if (directions.has("down")) { - return [ - // Bottom center - { x: width / 2, y: 0 }, - // Left pont of bottom arrow - { x: 0, y: -padding }, - { x: midpoint, y: -padding }, - // Left top over vertical section - { x: midpoint, y: -height + padding }, - { x: width - midpoint, y: -height + padding }, - { x: width - midpoint, y: -padding }, - { x: width, y: -padding } - ]; - } - return [{ x: 0, y: 0 }]; -}; -const formatClass = (str) => { - if (str) { - return " " + str; - } - return ""; -}; -const getClassesFromNode = (node, otherClasses) => { - return `${otherClasses ? otherClasses : "node default"}${formatClass(node.classes)} ${formatClass( - node.class - )}`; -}; -const question = async (parent, node) => { - const { shapeSvg, bbox } = await labelHelper( - parent, - node, - getClassesFromNode(node, void 0), - true - ); - const w = bbox.width + node.padding; - const h = bbox.height + node.padding; - const s = w + h; - const points = [ - { x: s / 2, y: 0 }, - { x: s, y: -s / 2 }, - { x: s / 2, y: -s }, - { x: 0, y: -s / 2 } - ]; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Question main (Circle)"); - const questionElem = insertPolygonShape(shapeSvg, s, s, points); - questionElem.attr("style", node.style); - updateNodeBounds(node, questionElem); - node.intersect = function(point2) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.warn("Intersect called"); - return intersect.polygon(node, points, point2); - }; - return shapeSvg; -}; -const choice = (parent, node) => { - const shapeSvg = parent.insert("g").attr("class", "node default").attr("id", node.domId || node.id); - const s = 28; - const points = [ - { x: 0, y: s / 2 }, - { x: s / 2, y: 0 }, - { x: 0, y: -s / 2 }, - { x: -s / 2, y: 0 } - ]; - const choice2 = shapeSvg.insert("polygon", ":first-child").attr( - "points", - points.map(function(d) { - return d.x + "," + d.y; - }).join(" ") - ); - choice2.attr("class", "state-start").attr("r", 7).attr("width", 28).attr("height", 28); - node.width = 28; - node.height = 28; - node.intersect = function(point2) { - return intersect.circle(node, 14, point2); - }; - return shapeSvg; -}; -const hexagon = async (parent, node) => { - const { shapeSvg, bbox } = await labelHelper( - parent, - node, - getClassesFromNode(node, void 0), - true - ); - const f = 4; - const h = bbox.height + node.padding; - const m = h / f; - const w = bbox.width + 2 * m + node.padding; - const points = [ - { x: m, y: 0 }, - { x: w - m, y: 0 }, - { x: w, y: -h / 2 }, - { x: w - m, y: -h }, - { x: m, y: -h }, - { x: 0, y: -h / 2 } - ]; - const hex = insertPolygonShape(shapeSvg, w, h, points); - hex.attr("style", node.style); - updateNodeBounds(node, hex); - node.intersect = function(point2) { - return intersect.polygon(node, points, point2); - }; - return shapeSvg; -}; -const block_arrow = async (parent, node) => { - const { shapeSvg, bbox } = await labelHelper(parent, node, void 0, true); - const f = 2; - const h = bbox.height + 2 * node.padding; - const m = h / f; - const w = bbox.width + 2 * m + node.padding; - const points = getArrowPoints(node.directions, bbox, node); - const blockArrow = insertPolygonShape(shapeSvg, w, h, points); - blockArrow.attr("style", node.style); - updateNodeBounds(node, blockArrow); - node.intersect = function(point2) { - return intersect.polygon(node, points, point2); - }; - return shapeSvg; -}; -const rect_left_inv_arrow = async (parent, node) => { - const { shapeSvg, bbox } = await labelHelper( - parent, - node, - getClassesFromNode(node, void 0), - true - ); - const w = bbox.width + node.padding; - const h = bbox.height + node.padding; - const points = [ - { x: -h / 2, y: 0 }, - { x: w, y: 0 }, - { x: w, y: -h }, - { x: -h / 2, y: -h }, - { x: 0, y: -h / 2 } - ]; - const el = insertPolygonShape(shapeSvg, w, h, points); - el.attr("style", node.style); - node.width = w + h; - node.height = h; - node.intersect = function(point2) { - return intersect.polygon(node, points, point2); - }; - return shapeSvg; -}; -const lean_right = async (parent, node) => { - const { shapeSvg, bbox } = await labelHelper(parent, node, getClassesFromNode(node), true); - const w = bbox.width + node.padding; - const h = bbox.height + node.padding; - const points = [ - { x: -2 * h / 6, y: 0 }, - { x: w - h / 6, y: 0 }, - { x: w + 2 * h / 6, y: -h }, - { x: h / 6, y: -h } - ]; - const el = insertPolygonShape(shapeSvg, w, h, points); - el.attr("style", node.style); - updateNodeBounds(node, el); - node.intersect = function(point2) { - return intersect.polygon(node, points, point2); - }; - return shapeSvg; -}; -const lean_left = async (parent, node) => { - const { shapeSvg, bbox } = await labelHelper( - parent, - node, - getClassesFromNode(node, void 0), - true - ); - const w = bbox.width + node.padding; - const h = bbox.height + node.padding; - const points = [ - { x: 2 * h / 6, y: 0 }, - { x: w + h / 6, y: 0 }, - { x: w - 2 * h / 6, y: -h }, - { x: -h / 6, y: -h } - ]; - const el = insertPolygonShape(shapeSvg, w, h, points); - el.attr("style", node.style); - updateNodeBounds(node, el); - node.intersect = function(point2) { - return intersect.polygon(node, points, point2); - }; - return shapeSvg; -}; -const trapezoid = async (parent, node) => { - const { shapeSvg, bbox } = await labelHelper( - parent, - node, - getClassesFromNode(node, void 0), - true - ); - const w = bbox.width + node.padding; - const h = bbox.height + node.padding; - const points = [ - { x: -2 * h / 6, y: 0 }, - { x: w + 2 * h / 6, y: 0 }, - { x: w - h / 6, y: -h }, - { x: h / 6, y: -h } - ]; - const el = insertPolygonShape(shapeSvg, w, h, points); - el.attr("style", node.style); - updateNodeBounds(node, el); - node.intersect = function(point2) { - return intersect.polygon(node, points, point2); - }; - return shapeSvg; -}; -const inv_trapezoid = async (parent, node) => { - const { shapeSvg, bbox } = await labelHelper( - parent, - node, - getClassesFromNode(node, void 0), - true - ); - const w = bbox.width + node.padding; - const h = bbox.height + node.padding; - const points = [ - { x: h / 6, y: 0 }, - { x: w - h / 6, y: 0 }, - { x: w + 2 * h / 6, y: -h }, - { x: -2 * h / 6, y: -h } - ]; - const el = insertPolygonShape(shapeSvg, w, h, points); - el.attr("style", node.style); - updateNodeBounds(node, el); - node.intersect = function(point2) { - return intersect.polygon(node, points, point2); - }; - return shapeSvg; -}; -const rect_right_inv_arrow = async (parent, node) => { - const { shapeSvg, bbox } = await labelHelper( - parent, - node, - getClassesFromNode(node, void 0), - true - ); - const w = bbox.width + node.padding; - const h = bbox.height + node.padding; - const points = [ - { x: 0, y: 0 }, - { x: w + h / 2, y: 0 }, - { x: w, y: -h / 2 }, - { x: w + h / 2, y: -h }, - { x: 0, y: -h } - ]; - const el = insertPolygonShape(shapeSvg, w, h, points); - el.attr("style", node.style); - updateNodeBounds(node, el); - node.intersect = function(point2) { - return intersect.polygon(node, points, point2); - }; - return shapeSvg; -}; -const cylinder = async (parent, node) => { - const { shapeSvg, bbox } = await labelHelper( - parent, - node, - getClassesFromNode(node, void 0), - true - ); - const w = bbox.width + node.padding; - const rx = w / 2; - const ry = rx / (2.5 + w / 50); - const h = bbox.height + ry + node.padding; - const shape = "M 0," + ry + " a " + rx + "," + ry + " 0,0,0 " + w + " 0 a " + rx + "," + ry + " 0,0,0 " + -w + " 0 l 0," + h + " a " + rx + "," + ry + " 0,0,0 " + w + " 0 l 0," + -h; - const el = shapeSvg.attr("label-offset-y", ry).insert("path", ":first-child").attr("style", node.style).attr("d", shape).attr("transform", "translate(" + -w / 2 + "," + -(h / 2 + ry) + ")"); - updateNodeBounds(node, el); - node.intersect = function(point2) { - const pos = intersect.rect(node, point2); - const x = pos.x - node.x; - if (rx != 0 && (Math.abs(x) < node.width / 2 || Math.abs(x) == node.width / 2 && Math.abs(pos.y - node.y) > node.height / 2 - ry)) { - let y = ry * ry * (1 - x * x / (rx * rx)); - if (y != 0) { - y = Math.sqrt(y); - } - y = ry - y; - if (point2.y - node.y > 0) { - y = -y; - } - pos.y += y; - } - return pos; - }; - return shapeSvg; -}; -const rect = async (parent, node) => { - const { shapeSvg, bbox, halfPadding } = await labelHelper( - parent, - node, - "node " + node.classes + " " + node.class, - true - ); - const rect2 = shapeSvg.insert("rect", ":first-child"); - const totalWidth = node.positioned ? node.width : bbox.width + node.padding; - const totalHeight = node.positioned ? node.height : bbox.height + node.padding; - const x = node.positioned ? -totalWidth / 2 : -bbox.width / 2 - halfPadding; - const y = node.positioned ? -totalHeight / 2 : -bbox.height / 2 - halfPadding; - rect2.attr("class", "basic label-container").attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("x", x).attr("y", y).attr("width", totalWidth).attr("height", totalHeight); - if (node.props) { - const propKeys = new Set(Object.keys(node.props)); - if (node.props.borders) { - applyNodePropertyBorders(rect2, node.props.borders, totalWidth, totalHeight); - propKeys.delete("borders"); - } - propKeys.forEach((propKey) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.warn(`Unknown node property ${propKey}`); - }); - } - updateNodeBounds(node, rect2); - node.intersect = function(point2) { - return intersect.rect(node, point2); - }; - return shapeSvg; -}; -const composite = async (parent, node) => { - const { shapeSvg, bbox, halfPadding } = await labelHelper( - parent, - node, - "node " + node.classes, - true - ); - const rect2 = shapeSvg.insert("rect", ":first-child"); - const totalWidth = node.positioned ? node.width : bbox.width + node.padding; - const totalHeight = node.positioned ? node.height : bbox.height + node.padding; - const x = node.positioned ? -totalWidth / 2 : -bbox.width / 2 - halfPadding; - const y = node.positioned ? -totalHeight / 2 : -bbox.height / 2 - halfPadding; - rect2.attr("class", "basic cluster composite label-container").attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("x", x).attr("y", y).attr("width", totalWidth).attr("height", totalHeight); - if (node.props) { - const propKeys = new Set(Object.keys(node.props)); - if (node.props.borders) { - applyNodePropertyBorders(rect2, node.props.borders, totalWidth, totalHeight); - propKeys.delete("borders"); - } - propKeys.forEach((propKey) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.warn(`Unknown node property ${propKey}`); - }); - } - updateNodeBounds(node, rect2); - node.intersect = function(point2) { - return intersect.rect(node, point2); - }; - return shapeSvg; -}; -const labelRect = async (parent, node) => { - const { shapeSvg } = await labelHelper(parent, node, "label", true); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.trace("Classes = ", node.class); - const rect2 = shapeSvg.insert("rect", ":first-child"); - const totalWidth = 0; - const totalHeight = 0; - rect2.attr("width", totalWidth).attr("height", totalHeight); - shapeSvg.attr("class", "label edgeLabel"); - if (node.props) { - const propKeys = new Set(Object.keys(node.props)); - if (node.props.borders) { - applyNodePropertyBorders(rect2, node.props.borders, totalWidth, totalHeight); - propKeys.delete("borders"); - } - propKeys.forEach((propKey) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.warn(`Unknown node property ${propKey}`); - }); - } - updateNodeBounds(node, rect2); - node.intersect = function(point2) { - return intersect.rect(node, point2); - }; - return shapeSvg; -}; -function applyNodePropertyBorders(rect2, borders, totalWidth, totalHeight) { - const strokeDashArray = []; - const addBorder = (length) => { - strokeDashArray.push(length, 0); - }; - const skipBorder = (length) => { - strokeDashArray.push(0, length); - }; - if (borders.includes("t")) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("add top border"); - addBorder(totalWidth); - } else { - skipBorder(totalWidth); - } - if (borders.includes("r")) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("add right border"); - addBorder(totalHeight); - } else { - skipBorder(totalHeight); - } - if (borders.includes("b")) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("add bottom border"); - addBorder(totalWidth); - } else { - skipBorder(totalWidth); - } - if (borders.includes("l")) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("add left border"); - addBorder(totalHeight); - } else { - skipBorder(totalHeight); - } - rect2.attr("stroke-dasharray", strokeDashArray.join(" ")); -} -const rectWithTitle = (parent, node) => { - let classes; - if (!node.classes) { - classes = "node default"; - } else { - classes = "node " + node.classes; - } - const shapeSvg = parent.insert("g").attr("class", classes).attr("id", node.domId || node.id); - const rect2 = shapeSvg.insert("rect", ":first-child"); - const innerLine = shapeSvg.insert("line"); - const label = shapeSvg.insert("g").attr("class", "label"); - const text2 = node.labelText.flat ? node.labelText.flat() : node.labelText; - let title = ""; - if (typeof text2 === "object") { - title = text2[0]; - } else { - title = text2; - } - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Label text abc79", title, text2, typeof text2 === "object"); - const text = label.node().appendChild(createLabel$1(title, node.labelStyle, true, true)); - let bbox = { width: 0, height: 0 }; - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { - const div = text.children[0]; - const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(text); - bbox = div.getBoundingClientRect(); - dv.attr("width", bbox.width); - dv.attr("height", bbox.height); - } - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Text 2", text2); - const textRows = text2.slice(1, text2.length); - let titleBox = text.getBBox(); - const descr = label.node().appendChild( - createLabel$1(textRows.join ? textRows.join("
") : textRows, node.labelStyle, true, true) - ); - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { - const div = descr.children[0]; - const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(descr); - bbox = div.getBoundingClientRect(); - dv.attr("width", bbox.width); - dv.attr("height", bbox.height); - } - const halfPadding = node.padding / 2; - (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(descr).attr( - "transform", - "translate( " + // (titleBox.width - bbox.width) / 2 + - (bbox.width > titleBox.width ? 0 : (titleBox.width - bbox.width) / 2) + ", " + (titleBox.height + halfPadding + 5) + ")" - ); - (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(text).attr( - "transform", - "translate( " + // (titleBox.width - bbox.width) / 2 + - (bbox.width < titleBox.width ? 0 : -(titleBox.width - bbox.width) / 2) + ", 0)" - ); - bbox = label.node().getBBox(); - label.attr( - "transform", - "translate(" + -bbox.width / 2 + ", " + (-bbox.height / 2 - halfPadding + 3) + ")" - ); - rect2.attr("class", "outer title-state").attr("x", -bbox.width / 2 - halfPadding).attr("y", -bbox.height / 2 - halfPadding).attr("width", bbox.width + node.padding).attr("height", bbox.height + node.padding); - innerLine.attr("class", "divider").attr("x1", -bbox.width / 2 - halfPadding).attr("x2", bbox.width / 2 + halfPadding).attr("y1", -bbox.height / 2 - halfPadding + titleBox.height + halfPadding).attr("y2", -bbox.height / 2 - halfPadding + titleBox.height + halfPadding); - updateNodeBounds(node, rect2); - node.intersect = function(point2) { - return intersect.rect(node, point2); - }; - return shapeSvg; -}; -const stadium = async (parent, node) => { - const { shapeSvg, bbox } = await labelHelper( - parent, - node, - getClassesFromNode(node, void 0), - true - ); - const h = bbox.height + node.padding; - const w = bbox.width + h / 4 + node.padding; - const rect2 = shapeSvg.insert("rect", ":first-child").attr("style", node.style).attr("rx", h / 2).attr("ry", h / 2).attr("x", -w / 2).attr("y", -h / 2).attr("width", w).attr("height", h); - updateNodeBounds(node, rect2); - node.intersect = function(point2) { - return intersect.rect(node, point2); - }; - return shapeSvg; -}; -const circle = async (parent, node) => { - const { shapeSvg, bbox, halfPadding } = await labelHelper( - parent, - node, - getClassesFromNode(node, void 0), - true - ); - const circle2 = shapeSvg.insert("circle", ":first-child"); - circle2.attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("r", bbox.width / 2 + halfPadding).attr("width", bbox.width + node.padding).attr("height", bbox.height + node.padding); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Circle main"); - updateNodeBounds(node, circle2); - node.intersect = function(point2) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Circle intersect", node, bbox.width / 2 + halfPadding, point2); - return intersect.circle(node, bbox.width / 2 + halfPadding, point2); - }; - return shapeSvg; -}; -const doublecircle = async (parent, node) => { - const { shapeSvg, bbox, halfPadding } = await labelHelper( - parent, - node, - getClassesFromNode(node, void 0), - true - ); - const gap = 5; - const circleGroup = shapeSvg.insert("g", ":first-child"); - const outerCircle = circleGroup.insert("circle"); - const innerCircle = circleGroup.insert("circle"); - circleGroup.attr("class", node.class); - outerCircle.attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("r", bbox.width / 2 + halfPadding + gap).attr("width", bbox.width + node.padding + gap * 2).attr("height", bbox.height + node.padding + gap * 2); - innerCircle.attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("r", bbox.width / 2 + halfPadding).attr("width", bbox.width + node.padding).attr("height", bbox.height + node.padding); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.info("DoubleCircle main"); - updateNodeBounds(node, outerCircle); - node.intersect = function(point2) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.info("DoubleCircle intersect", node, bbox.width / 2 + halfPadding + gap, point2); - return intersect.circle(node, bbox.width / 2 + halfPadding + gap, point2); - }; - return shapeSvg; -}; -const subroutine = async (parent, node) => { - const { shapeSvg, bbox } = await labelHelper( - parent, - node, - getClassesFromNode(node, void 0), - true - ); - const w = bbox.width + node.padding; - const h = bbox.height + node.padding; - const points = [ - { x: 0, y: 0 }, - { x: w, y: 0 }, - { x: w, y: -h }, - { x: 0, y: -h }, - { x: 0, y: 0 }, - { x: -8, y: 0 }, - { x: w + 8, y: 0 }, - { x: w + 8, y: -h }, - { x: -8, y: -h }, - { x: -8, y: 0 } - ]; - const el = insertPolygonShape(shapeSvg, w, h, points); - el.attr("style", node.style); - updateNodeBounds(node, el); - node.intersect = function(point2) { - return intersect.polygon(node, points, point2); - }; - return shapeSvg; -}; -const start = (parent, node) => { - const shapeSvg = parent.insert("g").attr("class", "node default").attr("id", node.domId || node.id); - const circle2 = shapeSvg.insert("circle", ":first-child"); - circle2.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14); - updateNodeBounds(node, circle2); - node.intersect = function(point2) { - return intersect.circle(node, 7, point2); - }; - return shapeSvg; -}; -const forkJoin = (parent, node, dir) => { - const shapeSvg = parent.insert("g").attr("class", "node default").attr("id", node.domId || node.id); - let width = 70; - let height = 10; - if (dir === "LR") { - width = 10; - height = 70; - } - const shape = shapeSvg.append("rect").attr("x", -1 * width / 2).attr("y", -1 * height / 2).attr("width", width).attr("height", height).attr("class", "fork-join"); - updateNodeBounds(node, shape); - node.height = node.height + node.padding / 2; - node.width = node.width + node.padding / 2; - node.intersect = function(point2) { - return intersect.rect(node, point2); - }; - return shapeSvg; -}; -const end = (parent, node) => { - const shapeSvg = parent.insert("g").attr("class", "node default").attr("id", node.domId || node.id); - const innerCircle = shapeSvg.insert("circle", ":first-child"); - const circle2 = shapeSvg.insert("circle", ":first-child"); - circle2.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14); - innerCircle.attr("class", "state-end").attr("r", 5).attr("width", 10).attr("height", 10); - updateNodeBounds(node, circle2); - node.intersect = function(point2) { - return intersect.circle(node, 7, point2); - }; - return shapeSvg; -}; -const class_box = (parent, node) => { - const halfPadding = node.padding / 2; - const rowPadding = 4; - const lineHeight = 8; - let classes; - if (!node.classes) { - classes = "node default"; - } else { - classes = "node " + node.classes; - } - const shapeSvg = parent.insert("g").attr("class", classes).attr("id", node.domId || node.id); - const rect2 = shapeSvg.insert("rect", ":first-child"); - const topLine = shapeSvg.insert("line"); - const bottomLine = shapeSvg.insert("line"); - let maxWidth = 0; - let maxHeight = rowPadding; - const labelContainer = shapeSvg.insert("g").attr("class", "label"); - let verticalPos = 0; - const hasInterface = node.classData.annotations && node.classData.annotations[0]; - const interfaceLabelText = node.classData.annotations[0] ? "«" + node.classData.annotations[0] + "»" : ""; - const interfaceLabel = labelContainer.node().appendChild(createLabel$1(interfaceLabelText, node.labelStyle, true, true)); - let interfaceBBox = interfaceLabel.getBBox(); - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { - const div = interfaceLabel.children[0]; - const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(interfaceLabel); - interfaceBBox = div.getBoundingClientRect(); - dv.attr("width", interfaceBBox.width); - dv.attr("height", interfaceBBox.height); - } - if (node.classData.annotations[0]) { - maxHeight += interfaceBBox.height + rowPadding; - maxWidth += interfaceBBox.width; - } - let classTitleString = node.classData.label; - if (node.classData.type !== void 0 && node.classData.type !== "") { - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels) { - classTitleString += "<" + node.classData.type + ">"; - } else { - classTitleString += "<" + node.classData.type + ">"; - } - } - const classTitleLabel = labelContainer.node().appendChild(createLabel$1(classTitleString, node.labelStyle, true, true)); - (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(classTitleLabel).attr("class", "classTitle"); - let classTitleBBox = classTitleLabel.getBBox(); - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { - const div = classTitleLabel.children[0]; - const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(classTitleLabel); - classTitleBBox = div.getBoundingClientRect(); - dv.attr("width", classTitleBBox.width); - dv.attr("height", classTitleBBox.height); - } - maxHeight += classTitleBBox.height + rowPadding; - if (classTitleBBox.width > maxWidth) { - maxWidth = classTitleBBox.width; - } - const classAttributes = []; - node.classData.members.forEach((member) => { - const parsedInfo = member.getDisplayDetails(); - let parsedText = parsedInfo.displayText; - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels) { - parsedText = parsedText.replace(//g, ">"); - } - const lbl = labelContainer.node().appendChild( - createLabel$1( - parsedText, - parsedInfo.cssStyle ? parsedInfo.cssStyle : node.labelStyle, - true, - true - ) - ); - let bbox = lbl.getBBox(); - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { - const div = lbl.children[0]; - const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(lbl); - bbox = div.getBoundingClientRect(); - dv.attr("width", bbox.width); - dv.attr("height", bbox.height); - } - if (bbox.width > maxWidth) { - maxWidth = bbox.width; - } - maxHeight += bbox.height + rowPadding; - classAttributes.push(lbl); - }); - maxHeight += lineHeight; - const classMethods = []; - node.classData.methods.forEach((member) => { - const parsedInfo = member.getDisplayDetails(); - let displayText = parsedInfo.displayText; - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels) { - displayText = displayText.replace(//g, ">"); - } - const lbl = labelContainer.node().appendChild( - createLabel$1( - displayText, - parsedInfo.cssStyle ? parsedInfo.cssStyle : node.labelStyle, - true, - true - ) - ); - let bbox = lbl.getBBox(); - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { - const div = lbl.children[0]; - const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(lbl); - bbox = div.getBoundingClientRect(); - dv.attr("width", bbox.width); - dv.attr("height", bbox.height); - } - if (bbox.width > maxWidth) { - maxWidth = bbox.width; - } - maxHeight += bbox.height + rowPadding; - classMethods.push(lbl); - }); - maxHeight += lineHeight; - if (hasInterface) { - let diffX2 = (maxWidth - interfaceBBox.width) / 2; - (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(interfaceLabel).attr( - "transform", - "translate( " + (-1 * maxWidth / 2 + diffX2) + ", " + -1 * maxHeight / 2 + ")" - ); - verticalPos = interfaceBBox.height + rowPadding; - } - let diffX = (maxWidth - classTitleBBox.width) / 2; - (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(classTitleLabel).attr( - "transform", - "translate( " + (-1 * maxWidth / 2 + diffX) + ", " + (-1 * maxHeight / 2 + verticalPos) + ")" - ); - verticalPos += classTitleBBox.height + rowPadding; - topLine.attr("class", "divider").attr("x1", -maxWidth / 2 - halfPadding).attr("x2", maxWidth / 2 + halfPadding).attr("y1", -maxHeight / 2 - halfPadding + lineHeight + verticalPos).attr("y2", -maxHeight / 2 - halfPadding + lineHeight + verticalPos); - verticalPos += lineHeight; - classAttributes.forEach((lbl) => { - (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(lbl).attr( - "transform", - "translate( " + -maxWidth / 2 + ", " + (-1 * maxHeight / 2 + verticalPos + lineHeight / 2) + ")" - ); - const memberBBox = lbl == null ? void 0 : lbl.getBBox(); - verticalPos += ((memberBBox == null ? void 0 : memberBBox.height) ?? 0) + rowPadding; - }); - verticalPos += lineHeight; - bottomLine.attr("class", "divider").attr("x1", -maxWidth / 2 - halfPadding).attr("x2", maxWidth / 2 + halfPadding).attr("y1", -maxHeight / 2 - halfPadding + lineHeight + verticalPos).attr("y2", -maxHeight / 2 - halfPadding + lineHeight + verticalPos); - verticalPos += lineHeight; - classMethods.forEach((lbl) => { - (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(lbl).attr( - "transform", - "translate( " + -maxWidth / 2 + ", " + (-1 * maxHeight / 2 + verticalPos) + ")" - ); - const memberBBox = lbl == null ? void 0 : lbl.getBBox(); - verticalPos += ((memberBBox == null ? void 0 : memberBBox.height) ?? 0) + rowPadding; - }); - rect2.attr("style", node.style).attr("class", "outer title-state").attr("x", -maxWidth / 2 - halfPadding).attr("y", -(maxHeight / 2) - halfPadding).attr("width", maxWidth + node.padding).attr("height", maxHeight + node.padding); - updateNodeBounds(node, rect2); - node.intersect = function(point2) { - return intersect.rect(node, point2); - }; - return shapeSvg; -}; -const shapes = { - rhombus: question, - composite, - question, - rect, - labelRect, - rectWithTitle, - choice, - circle, - doublecircle, - stadium, - hexagon, - block_arrow, - rect_left_inv_arrow, - lean_right, - lean_left, - trapezoid, - inv_trapezoid, - rect_right_inv_arrow, - cylinder, - start, - end, - note: note$1, - subroutine, - fork: forkJoin, - join: forkJoin, - class_box -}; -let nodeElems = {}; -const insertNode = async (elem, node, dir) => { - let newEl; - let el; - if (node.link) { - let target; - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().securityLevel === "sandbox") { - target = "_top"; - } else if (node.linkTarget) { - target = node.linkTarget || "_blank"; - } - newEl = elem.insert("svg:a").attr("xlink:href", node.link).attr("target", target); - el = await shapes[node.shape](newEl, node, dir); - } else { - el = await shapes[node.shape](elem, node, dir); - newEl = el; - } - if (node.tooltip) { - el.attr("title", node.tooltip); - } - if (node.class) { - el.attr("class", "node default " + node.class); - } - newEl.attr("data-node", "true"); - newEl.attr("data-id", node.id); - nodeElems[node.id] = newEl; - if (node.haveCallback) { - nodeElems[node.id].attr("class", nodeElems[node.id].attr("class") + " clickable"); - } - return newEl; -}; -const setNodeElem = (elem, node) => { - nodeElems[node.id] = elem; -}; -const clear$1 = () => { - nodeElems = {}; -}; -const positionNode = (node) => { - const el = nodeElems[node.id]; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.trace( - "Transforming node", - node.diff, - node, - "translate(" + (node.x - node.width / 2 - 5) + ", " + node.width / 2 + ")" - ); - const padding = 8; - const diff = node.diff || 0; - if (node.clusterNode) { - el.attr( - "transform", - "translate(" + (node.x + diff - node.width / 2) + ", " + (node.y - node.height / 2 - padding) + ")" - ); - } else { - el.attr("transform", "translate(" + node.x + ", " + node.y + ")"); - } - return diff; -}; -const getSubGraphTitleMargins = ({ - flowchart -}) => { - var _a, _b; - const subGraphTitleTopMargin = ((_a = flowchart == null ? void 0 : flowchart.subGraphTitleMargin) == null ? void 0 : _a.top) ?? 0; - const subGraphTitleBottomMargin = ((_b = flowchart == null ? void 0 : flowchart.subGraphTitleMargin) == null ? void 0 : _b.bottom) ?? 0; - const subGraphTitleTotalMargin = subGraphTitleTopMargin + subGraphTitleBottomMargin; - return { - subGraphTitleTopMargin, - subGraphTitleBottomMargin, - subGraphTitleTotalMargin - }; -}; -const markerOffsets = { - aggregation: 18, - extension: 18, - composition: 18, - dependency: 6, - lollipop: 13.5, - arrow_point: 5.3 -}; -function calculateDeltaAndAngle(point1, point2) { - if (point1 === void 0 || point2 === void 0) { - return { angle: 0, deltaX: 0, deltaY: 0 }; - } - point1 = pointTransformer(point1); - point2 = pointTransformer(point2); - const [x1, y1] = [point1.x, point1.y]; - const [x2, y2] = [point2.x, point2.y]; - const deltaX = x2 - x1; - const deltaY = y2 - y1; - return { angle: Math.atan(deltaY / deltaX), deltaX, deltaY }; -} -const pointTransformer = (data) => { - if (Array.isArray(data)) { - return { x: data[0], y: data[1] }; - } - return data; -}; -const getLineFunctionsWithOffset = (edge) => { - return { - x: function(d, i, data) { - let offset = 0; - if (i === 0 && Object.hasOwn(markerOffsets, edge.arrowTypeStart)) { - const { angle, deltaX } = calculateDeltaAndAngle(data[0], data[1]); - offset = markerOffsets[edge.arrowTypeStart] * Math.cos(angle) * (deltaX >= 0 ? 1 : -1); - } else if (i === data.length - 1 && Object.hasOwn(markerOffsets, edge.arrowTypeEnd)) { - const { angle, deltaX } = calculateDeltaAndAngle( - data[data.length - 1], - data[data.length - 2] - ); - offset = markerOffsets[edge.arrowTypeEnd] * Math.cos(angle) * (deltaX >= 0 ? 1 : -1); - } - return pointTransformer(d).x + offset; - }, - y: function(d, i, data) { - let offset = 0; - if (i === 0 && Object.hasOwn(markerOffsets, edge.arrowTypeStart)) { - const { angle, deltaY } = calculateDeltaAndAngle(data[0], data[1]); - offset = markerOffsets[edge.arrowTypeStart] * Math.abs(Math.sin(angle)) * (deltaY >= 0 ? 1 : -1); - } else if (i === data.length - 1 && Object.hasOwn(markerOffsets, edge.arrowTypeEnd)) { - const { angle, deltaY } = calculateDeltaAndAngle( - data[data.length - 1], - data[data.length - 2] - ); - offset = markerOffsets[edge.arrowTypeEnd] * Math.abs(Math.sin(angle)) * (deltaY >= 0 ? 1 : -1); - } - return pointTransformer(d).y + offset; - } - }; -}; -const addEdgeMarkers = (svgPath, edge, url, id, diagramType) => { - if (edge.arrowTypeStart) { - addEdgeMarker(svgPath, "start", edge.arrowTypeStart, url, id, diagramType); - } - if (edge.arrowTypeEnd) { - addEdgeMarker(svgPath, "end", edge.arrowTypeEnd, url, id, diagramType); - } -}; -const arrowTypesMap = { - arrow_cross: "cross", - arrow_point: "point", - arrow_barb: "barb", - arrow_circle: "circle", - aggregation: "aggregation", - extension: "extension", - composition: "composition", - dependency: "dependency", - lollipop: "lollipop" -}; -const addEdgeMarker = (svgPath, position, arrowType, url, id, diagramType) => { - const endMarkerType = arrowTypesMap[arrowType]; - if (!endMarkerType) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.warn(`Unknown arrow type: ${arrowType}`); - return; - } - const suffix = position === "start" ? "Start" : "End"; - svgPath.attr(`marker-${position}`, `url(${url}#${id}_${diagramType}-${endMarkerType}${suffix})`); -}; -let edgeLabels = {}; -let terminalLabels = {}; -const clear = () => { - edgeLabels = {}; - terminalLabels = {}; -}; -const insertEdgeLabel = (elem, edge) => { - const useHtmlLabels = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels); - const labelElement = edge.labelType === "markdown" ? (0,_createText_2e5e7dd3_js__WEBPACK_IMPORTED_MODULE_2__.a)(elem, edge.label, { - style: edge.labelStyle, - useHtmlLabels, - addSvgBackground: true - }) : createLabel$1(edge.label, edge.labelStyle); - const edgeLabel = elem.insert("g").attr("class", "edgeLabel"); - const label = edgeLabel.insert("g").attr("class", "label"); - label.node().appendChild(labelElement); - let bbox = labelElement.getBBox(); - if (useHtmlLabels) { - const div = labelElement.children[0]; - const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(labelElement); - bbox = div.getBoundingClientRect(); - dv.attr("width", bbox.width); - dv.attr("height", bbox.height); - } - label.attr("transform", "translate(" + -bbox.width / 2 + ", " + -bbox.height / 2 + ")"); - edgeLabels[edge.id] = edgeLabel; - edge.width = bbox.width; - edge.height = bbox.height; - let fo; - if (edge.startLabelLeft) { - const startLabelElement = createLabel$1(edge.startLabelLeft, edge.labelStyle); - const startEdgeLabelLeft = elem.insert("g").attr("class", "edgeTerminals"); - const inner = startEdgeLabelLeft.insert("g").attr("class", "inner"); - fo = inner.node().appendChild(startLabelElement); - const slBox = startLabelElement.getBBox(); - inner.attr("transform", "translate(" + -slBox.width / 2 + ", " + -slBox.height / 2 + ")"); - if (!terminalLabels[edge.id]) { - terminalLabels[edge.id] = {}; - } - terminalLabels[edge.id].startLeft = startEdgeLabelLeft; - setTerminalWidth(fo, edge.startLabelLeft); - } - if (edge.startLabelRight) { - const startLabelElement = createLabel$1(edge.startLabelRight, edge.labelStyle); - const startEdgeLabelRight = elem.insert("g").attr("class", "edgeTerminals"); - const inner = startEdgeLabelRight.insert("g").attr("class", "inner"); - fo = startEdgeLabelRight.node().appendChild(startLabelElement); - inner.node().appendChild(startLabelElement); - const slBox = startLabelElement.getBBox(); - inner.attr("transform", "translate(" + -slBox.width / 2 + ", " + -slBox.height / 2 + ")"); - if (!terminalLabels[edge.id]) { - terminalLabels[edge.id] = {}; - } - terminalLabels[edge.id].startRight = startEdgeLabelRight; - setTerminalWidth(fo, edge.startLabelRight); - } - if (edge.endLabelLeft) { - const endLabelElement = createLabel$1(edge.endLabelLeft, edge.labelStyle); - const endEdgeLabelLeft = elem.insert("g").attr("class", "edgeTerminals"); - const inner = endEdgeLabelLeft.insert("g").attr("class", "inner"); - fo = inner.node().appendChild(endLabelElement); - const slBox = endLabelElement.getBBox(); - inner.attr("transform", "translate(" + -slBox.width / 2 + ", " + -slBox.height / 2 + ")"); - endEdgeLabelLeft.node().appendChild(endLabelElement); - if (!terminalLabels[edge.id]) { - terminalLabels[edge.id] = {}; - } - terminalLabels[edge.id].endLeft = endEdgeLabelLeft; - setTerminalWidth(fo, edge.endLabelLeft); - } - if (edge.endLabelRight) { - const endLabelElement = createLabel$1(edge.endLabelRight, edge.labelStyle); - const endEdgeLabelRight = elem.insert("g").attr("class", "edgeTerminals"); - const inner = endEdgeLabelRight.insert("g").attr("class", "inner"); - fo = inner.node().appendChild(endLabelElement); - const slBox = endLabelElement.getBBox(); - inner.attr("transform", "translate(" + -slBox.width / 2 + ", " + -slBox.height / 2 + ")"); - endEdgeLabelRight.node().appendChild(endLabelElement); - if (!terminalLabels[edge.id]) { - terminalLabels[edge.id] = {}; - } - terminalLabels[edge.id].endRight = endEdgeLabelRight; - setTerminalWidth(fo, edge.endLabelRight); - } - return labelElement; -}; -function setTerminalWidth(fo, value) { - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels && fo) { - fo.style.width = value.length * 9 + "px"; - fo.style.height = "12px"; - } -} -const positionEdgeLabel = (edge, paths) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("Moving label abc88 ", edge.id, edge.label, edgeLabels[edge.id], paths); - let path = paths.updatedPath ? paths.updatedPath : paths.originalPath; - const siteConfig = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)(); - const { subGraphTitleTotalMargin } = getSubGraphTitleMargins(siteConfig); - if (edge.label) { - const el = edgeLabels[edge.id]; - let x = edge.x; - let y = edge.y; - if (path) { - const pos = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.u.calcLabelPosition(path); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug( - "Moving label " + edge.label + " from (", - x, - ",", - y, - ") to (", - pos.x, - ",", - pos.y, - ") abc88" - ); - if (paths.updatedPath) { - x = pos.x; - y = pos.y; - } - } - el.attr("transform", `translate(${x}, ${y + subGraphTitleTotalMargin / 2})`); - } - if (edge.startLabelLeft) { - const el = terminalLabels[edge.id].startLeft; - let x = edge.x; - let y = edge.y; - if (path) { - const pos = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.u.calcTerminalLabelPosition(edge.arrowTypeStart ? 10 : 0, "start_left", path); - x = pos.x; - y = pos.y; - } - el.attr("transform", `translate(${x}, ${y})`); - } - if (edge.startLabelRight) { - const el = terminalLabels[edge.id].startRight; - let x = edge.x; - let y = edge.y; - if (path) { - const pos = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.u.calcTerminalLabelPosition( - edge.arrowTypeStart ? 10 : 0, - "start_right", - path - ); - x = pos.x; - y = pos.y; - } - el.attr("transform", `translate(${x}, ${y})`); - } - if (edge.endLabelLeft) { - const el = terminalLabels[edge.id].endLeft; - let x = edge.x; - let y = edge.y; - if (path) { - const pos = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.u.calcTerminalLabelPosition(edge.arrowTypeEnd ? 10 : 0, "end_left", path); - x = pos.x; - y = pos.y; - } - el.attr("transform", `translate(${x}, ${y})`); - } - if (edge.endLabelRight) { - const el = terminalLabels[edge.id].endRight; - let x = edge.x; - let y = edge.y; - if (path) { - const pos = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.u.calcTerminalLabelPosition(edge.arrowTypeEnd ? 10 : 0, "end_right", path); - x = pos.x; - y = pos.y; - } - el.attr("transform", `translate(${x}, ${y})`); - } -}; -const outsideNode = (node, point2) => { - const x = node.x; - const y = node.y; - const dx = Math.abs(point2.x - x); - const dy = Math.abs(point2.y - y); - const w = node.width / 2; - const h = node.height / 2; - if (dx >= w || dy >= h) { - return true; - } - return false; -}; -const intersection = (node, outsidePoint, insidePoint) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug(`intersection calc abc89: - outsidePoint: ${JSON.stringify(outsidePoint)} - insidePoint : ${JSON.stringify(insidePoint)} - node : x:${node.x} y:${node.y} w:${node.width} h:${node.height}`); - const x = node.x; - const y = node.y; - const dx = Math.abs(x - insidePoint.x); - const w = node.width / 2; - let r = insidePoint.x < outsidePoint.x ? w - dx : w + dx; - const h = node.height / 2; - const Q = Math.abs(outsidePoint.y - insidePoint.y); - const R = Math.abs(outsidePoint.x - insidePoint.x); - if (Math.abs(y - outsidePoint.y) * w > Math.abs(x - outsidePoint.x) * h) { - let q = insidePoint.y < outsidePoint.y ? outsidePoint.y - h - y : y - h - outsidePoint.y; - r = R * q / Q; - const res = { - x: insidePoint.x < outsidePoint.x ? insidePoint.x + r : insidePoint.x - R + r, - y: insidePoint.y < outsidePoint.y ? insidePoint.y + Q - q : insidePoint.y - Q + q - }; - if (r === 0) { - res.x = outsidePoint.x; - res.y = outsidePoint.y; - } - if (R === 0) { - res.x = outsidePoint.x; - } - if (Q === 0) { - res.y = outsidePoint.y; - } - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug(`abc89 topp/bott calc, Q ${Q}, q ${q}, R ${R}, r ${r}`, res); - return res; - } else { - if (insidePoint.x < outsidePoint.x) { - r = outsidePoint.x - w - x; - } else { - r = x - w - outsidePoint.x; - } - let q = Q * r / R; - let _x = insidePoint.x < outsidePoint.x ? insidePoint.x + R - r : insidePoint.x - R + r; - let _y = insidePoint.y < outsidePoint.y ? insidePoint.y + q : insidePoint.y - q; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug(`sides calc abc89, Q ${Q}, q ${q}, R ${R}, r ${r}`, { _x, _y }); - if (r === 0) { - _x = outsidePoint.x; - _y = outsidePoint.y; - } - if (R === 0) { - _x = outsidePoint.x; - } - if (Q === 0) { - _y = outsidePoint.y; - } - return { x: _x, y: _y }; - } -}; -const cutPathAtIntersect = (_points, boundaryNode) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("abc88 cutPathAtIntersect", _points, boundaryNode); - let points = []; - let lastPointOutside = _points[0]; - let isInside = false; - _points.forEach((point2) => { - if (!outsideNode(boundaryNode, point2) && !isInside) { - const inter = intersection(boundaryNode, lastPointOutside, point2); - let pointPresent = false; - points.forEach((p) => { - pointPresent = pointPresent || p.x === inter.x && p.y === inter.y; - }); - if (!points.some((e) => e.x === inter.x && e.y === inter.y)) { - points.push(inter); - } - isInside = true; - } else { - lastPointOutside = point2; - if (!isInside) { - points.push(point2); - } - } - }); - return points; -}; -const insertEdge = function(elem, e, edge, clusterDb, diagramType, graph, id) { - let points = edge.points; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("abc88 InsertEdge: edge=", edge, "e=", e); - let pointsHasChanged = false; - const tail = graph.node(e.v); - var head = graph.node(e.w); - if ((head == null ? void 0 : head.intersect) && (tail == null ? void 0 : tail.intersect)) { - points = points.slice(1, edge.points.length - 1); - points.unshift(tail.intersect(points[0])); - points.push(head.intersect(points[points.length - 1])); - } - if (edge.toCluster) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("to cluster abc88", clusterDb[edge.toCluster]); - points = cutPathAtIntersect(edge.points, clusterDb[edge.toCluster].node); - pointsHasChanged = true; - } - if (edge.fromCluster) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("from cluster abc88", clusterDb[edge.fromCluster]); - points = cutPathAtIntersect(points.reverse(), clusterDb[edge.fromCluster].node).reverse(); - pointsHasChanged = true; - } - const lineData = points.filter((p) => !Number.isNaN(p.y)); - let curve = d3__WEBPACK_IMPORTED_MODULE_0__/* .curveBasis */ .qrM; - if (edge.curve && (diagramType === "graph" || diagramType === "flowchart")) { - curve = edge.curve; - } - const { x, y } = getLineFunctionsWithOffset(edge); - const lineFunction = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .line */ .n8j)().x(x).y(y).curve(curve); - let strokeClasses; - switch (edge.thickness) { - case "normal": - strokeClasses = "edge-thickness-normal"; - break; - case "thick": - strokeClasses = "edge-thickness-thick"; - break; - case "invisible": - strokeClasses = "edge-thickness-thick"; - break; - default: - strokeClasses = ""; - } - switch (edge.pattern) { - case "solid": - strokeClasses += " edge-pattern-solid"; - break; - case "dotted": - strokeClasses += " edge-pattern-dotted"; - break; - case "dashed": - strokeClasses += " edge-pattern-dashed"; - break; - } - const svgPath = elem.append("path").attr("d", lineFunction(lineData)).attr("id", edge.id).attr("class", " " + strokeClasses + (edge.classes ? " " + edge.classes : "")).attr("style", edge.style); - let url = ""; - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.arrowMarkerAbsolute || (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().state.arrowMarkerAbsolute) { - url = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search; - url = url.replace(/\(/g, "\\("); - url = url.replace(/\)/g, "\\)"); - } - addEdgeMarkers(svgPath, edge, url, id, diagramType); - let paths = {}; - if (pointsHasChanged) { - paths.updatedPath = points; - } - paths.originalPath = edge.points; - return paths; -}; - - - -/***/ }), - -/***/ 8995: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ r: () => (/* binding */ render) -/* harmony export */ }); -/* harmony import */ var dagre_d3_es_src_dagre_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(21176); -/* harmony import */ var dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(14075); -/* harmony import */ var _edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(88146); -/* harmony import */ var _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(86079); -/* harmony import */ var dagre_d3_es_src_graphlib_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(697); -/* harmony import */ var _createText_2e5e7dd3_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(73743); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(26312); - - - - - - - -let clusterDb = {}; -let descendants = {}; -let parents = {}; -const clear$1 = () => { - descendants = {}; - parents = {}; - clusterDb = {}; -}; -const isDescendant = (id, ancestorId) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("In isDescendant", ancestorId, " ", id, " = ", descendants[ancestorId].includes(id)); - if (descendants[ancestorId].includes(id)) { - return true; - } - return false; -}; -const edgeInCluster = (edge, clusterId) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Descendants of ", clusterId, " is ", descendants[clusterId]); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Edge is ", edge); - if (edge.v === clusterId) { - return false; - } - if (edge.w === clusterId) { - return false; - } - if (!descendants[clusterId]) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Tilt, ", clusterId, ",not in descendants"); - return false; - } - return descendants[clusterId].includes(edge.v) || isDescendant(edge.v, clusterId) || isDescendant(edge.w, clusterId) || descendants[clusterId].includes(edge.w); -}; -const copy = (clusterId, graph, newGraph, rootId) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn( - "Copying children of ", - clusterId, - "root", - rootId, - "data", - graph.node(clusterId), - rootId - ); - const nodes = graph.children(clusterId) || []; - if (clusterId !== rootId) { - nodes.push(clusterId); - } - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Copying (nodes) clusterId", clusterId, "nodes", nodes); - nodes.forEach((node) => { - if (graph.children(node).length > 0) { - copy(node, graph, newGraph, rootId); - } else { - const data = graph.node(node); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("cp ", node, " to ", rootId, " with parent ", clusterId); - newGraph.setNode(node, data); - if (rootId !== graph.parent(node)) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Setting parent", node, graph.parent(node)); - newGraph.setParent(node, graph.parent(node)); - } - if (clusterId !== rootId && node !== clusterId) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Setting parent", node, clusterId); - newGraph.setParent(node, clusterId); - } else { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("In copy ", clusterId, "root", rootId, "data", graph.node(clusterId), rootId); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug( - "Not Setting parent for node=", - node, - "cluster!==rootId", - clusterId !== rootId, - "node!==clusterId", - node !== clusterId - ); - } - const edges = graph.edges(node); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Copying Edges", edges); - edges.forEach((edge) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Edge", edge); - const data2 = graph.edge(edge.v, edge.w, edge.name); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Edge data", data2, rootId); - try { - if (edgeInCluster(edge, rootId)) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Copying as ", edge.v, edge.w, data2, edge.name); - newGraph.setEdge(edge.v, edge.w, data2, edge.name); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("newGraph edges ", newGraph.edges(), newGraph.edge(newGraph.edges()[0])); - } else { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info( - "Skipping copy of edge ", - edge.v, - "-->", - edge.w, - " rootId: ", - rootId, - " clusterId:", - clusterId - ); - } - } catch (e) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.error(e); - } - }); - } - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Removing node", node); - graph.removeNode(node); - }); -}; -const extractDescendants = (id, graph) => { - const children = graph.children(id); - let res = [...children]; - for (const child of children) { - parents[child] = id; - res = [...res, ...extractDescendants(child, graph)]; - } - return res; -}; -const findNonClusterChild = (id, graph) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("Searching", id); - const children = graph.children(id); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("Searching children of id ", id, children); - if (children.length < 1) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("This is a valid node", id); - return id; - } - for (const child of children) { - const _id = findNonClusterChild(child, graph); - if (_id) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("Found replacement for", id, " => ", _id); - return _id; - } - } -}; -const getAnchorId = (id) => { - if (!clusterDb[id]) { - return id; - } - if (!clusterDb[id].externalConnections) { - return id; - } - if (clusterDb[id]) { - return clusterDb[id].id; - } - return id; -}; -const adjustClustersAndEdges = (graph, depth) => { - if (!graph || depth > 10) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Opting out, no graph "); - return; - } else { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Opting in, graph "); - } - graph.nodes().forEach(function(id) { - const children = graph.children(id); - if (children.length > 0) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn( - "Cluster identified", - id, - " Replacement id in edges: ", - findNonClusterChild(id, graph) - ); - descendants[id] = extractDescendants(id, graph); - clusterDb[id] = { id: findNonClusterChild(id, graph), clusterData: graph.node(id) }; - } - }); - graph.nodes().forEach(function(id) { - const children = graph.children(id); - const edges = graph.edges(); - if (children.length > 0) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Cluster identified", id, descendants); - edges.forEach((edge) => { - if (edge.v !== id && edge.w !== id) { - const d1 = isDescendant(edge.v, id); - const d2 = isDescendant(edge.w, id); - if (d1 ^ d2) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Edge: ", edge, " leaves cluster ", id); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Descendants of XXX ", id, ": ", descendants[id]); - clusterDb[id].externalConnections = true; - } - } - }); - } else { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Not a cluster ", id, descendants); - } - }); - for (let id of Object.keys(clusterDb)) { - const nonClusterChild = clusterDb[id].id; - const parent = graph.parent(nonClusterChild); - if (parent !== id && clusterDb[parent] && !clusterDb[parent].externalConnections) { - clusterDb[id].id = parent; - } - } - graph.edges().forEach(function(e) { - const edge = graph.edge(e); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(e)); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(graph.edge(e))); - let v = e.v; - let w = e.w; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn( - "Fix XXX", - clusterDb, - "ids:", - e.v, - e.w, - "Translating: ", - clusterDb[e.v], - " --- ", - clusterDb[e.w] - ); - if (clusterDb[e.v] && clusterDb[e.w] && clusterDb[e.v] === clusterDb[e.w]) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Fixing and trixing link to self - removing XXX", e.v, e.w, e.name); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Fixing and trixing - removing XXX", e.v, e.w, e.name); - v = getAnchorId(e.v); - w = getAnchorId(e.w); - graph.removeEdge(e.v, e.w, e.name); - const specialId = e.w + "---" + e.v; - graph.setNode(specialId, { - domId: specialId, - id: specialId, - labelStyle: "", - labelText: edge.label, - padding: 0, - shape: "labelRect", - style: "" - }); - const edge1 = structuredClone(edge); - const edge2 = structuredClone(edge); - edge1.label = ""; - edge1.arrowTypeEnd = "none"; - edge2.label = ""; - edge1.fromCluster = e.v; - edge2.toCluster = e.v; - graph.setEdge(v, specialId, edge1, e.name + "-cyclic-special"); - graph.setEdge(specialId, w, edge2, e.name + "-cyclic-special"); - } else if (clusterDb[e.v] || clusterDb[e.w]) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Fixing and trixing - removing XXX", e.v, e.w, e.name); - v = getAnchorId(e.v); - w = getAnchorId(e.w); - graph.removeEdge(e.v, e.w, e.name); - if (v !== e.v) { - const parent = graph.parent(v); - clusterDb[parent].externalConnections = true; - edge.fromCluster = e.v; - } - if (w !== e.w) { - const parent = graph.parent(w); - clusterDb[parent].externalConnections = true; - edge.toCluster = e.w; - } - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Fix Replacing with XXX", v, w, e.name); - graph.setEdge(v, w, edge, e.name); - } - }); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Adjusted Graph", dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .M(graph)); - extractor(graph, 0); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.trace(clusterDb); -}; -const extractor = (graph, depth) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("extractor - ", depth, dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .M(graph), graph.children("D")); - if (depth > 10) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.error("Bailing out"); - return; - } - let nodes = graph.nodes(); - let hasChildren = false; - for (const node of nodes) { - const children = graph.children(node); - hasChildren = hasChildren || children.length > 0; - } - if (!hasChildren) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Done, no node has children", graph.nodes()); - return; - } - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Nodes = ", nodes, depth); - for (const node of nodes) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug( - "Extracting node", - node, - clusterDb, - clusterDb[node] && !clusterDb[node].externalConnections, - !graph.parent(node), - graph.node(node), - graph.children("D"), - " Depth ", - depth - ); - if (!clusterDb[node]) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Not a cluster", node, depth); - } else if (!clusterDb[node].externalConnections && // !graph.parent(node) && - graph.children(node) && graph.children(node).length > 0) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn( - "Cluster without external connections, without a parent and with children", - node, - depth - ); - const graphSettings = graph.graph(); - let dir = graphSettings.rankdir === "TB" ? "LR" : "TB"; - if (clusterDb[node] && clusterDb[node].clusterData && clusterDb[node].clusterData.dir) { - dir = clusterDb[node].clusterData.dir; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Fixing dir", clusterDb[node].clusterData.dir, dir); - } - const clusterGraph = new dagre_d3_es_src_graphlib_index_js__WEBPACK_IMPORTED_MODULE_2__/* .Graph */ .T({ - multigraph: true, - compound: true - }).setGraph({ - rankdir: dir, - // Todo: set proper spacing - nodesep: 50, - ranksep: 50, - marginx: 8, - marginy: 8 - }).setDefaultEdgeLabel(function() { - return {}; - }); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Old graph before copy", dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .M(graph)); - copy(node, graph, clusterGraph, node); - graph.setNode(node, { - clusterNode: true, - id: node, - clusterData: clusterDb[node].clusterData, - labelText: clusterDb[node].labelText, - graph: clusterGraph - }); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("New graph after copy node: (", node, ")", dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .M(clusterGraph)); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Old graph after copy", dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .M(graph)); - } else { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn( - "Cluster ** ", - node, - " **not meeting the criteria !externalConnections:", - !clusterDb[node].externalConnections, - " no parent: ", - !graph.parent(node), - " children ", - graph.children(node) && graph.children(node).length > 0, - graph.children("D"), - depth - ); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug(clusterDb); - } - } - nodes = graph.nodes(); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("New list of nodes", nodes); - for (const node of nodes) { - const data = graph.node(node); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn(" Now next level", node, data); - if (data.clusterNode) { - extractor(data.graph, depth + 1); - } - } -}; -const sorter = (graph, nodes) => { - if (nodes.length === 0) { - return []; - } - let result = Object.assign(nodes); - nodes.forEach((node) => { - const children = graph.children(node); - const sorted = sorter(graph, children); - result = [...result, ...sorted]; - }); - return result; -}; -const sortNodesByHierarchy = (graph) => sorter(graph, graph.children()); -const rect = (parent, node) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Creating subgraph rect for ", node.id, node); - const siteConfig = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.c)(); - const shapeSvg = parent.insert("g").attr("class", "cluster" + (node.class ? " " + node.class : "")).attr("id", node.id); - const rect2 = shapeSvg.insert("rect", ":first-child"); - const useHtmlLabels = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.m)(siteConfig.flowchart.htmlLabels); - const label = shapeSvg.insert("g").attr("class", "cluster-label"); - const text = node.labelType === "markdown" ? (0,_createText_2e5e7dd3_js__WEBPACK_IMPORTED_MODULE_5__.a)(label, node.labelText, { style: node.labelStyle, useHtmlLabels }) : label.node().appendChild((0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.c)(node.labelText, node.labelStyle, void 0, true)); - let bbox = text.getBBox(); - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.m)(siteConfig.flowchart.htmlLabels)) { - const div = text.children[0]; - const dv = (0,d3__WEBPACK_IMPORTED_MODULE_3__/* .select */ .Ltv)(text); - bbox = div.getBoundingClientRect(); - dv.attr("width", bbox.width); - dv.attr("height", bbox.height); - } - const padding = 0 * node.padding; - const halfPadding = padding / 2; - const width = node.width <= bbox.width + padding ? bbox.width + padding : node.width; - if (node.width <= bbox.width + padding) { - node.diff = (bbox.width - node.width) / 2 - node.padding / 2; - } else { - node.diff = -node.padding / 2; - } - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("Data ", node, JSON.stringify(node)); - rect2.attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("x", node.x - width / 2).attr("y", node.y - node.height / 2 - halfPadding).attr("width", width).attr("height", node.height + padding); - const { subGraphTitleTopMargin } = (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.g)(siteConfig); - if (useHtmlLabels) { - label.attr( - "transform", - // This puts the label on top of the box instead of inside it - `translate(${node.x - bbox.width / 2}, ${node.y - node.height / 2 + subGraphTitleTopMargin})` - ); - } else { - label.attr( - "transform", - // This puts the label on top of the box instead of inside it - `translate(${node.x}, ${node.y - node.height / 2 + subGraphTitleTopMargin})` - ); - } - const rectBox = rect2.node().getBBox(); - node.width = rectBox.width; - node.height = rectBox.height; - node.intersect = function(point) { - return (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.i)(node, point); - }; - return shapeSvg; -}; -const noteGroup = (parent, node) => { - const shapeSvg = parent.insert("g").attr("class", "note-cluster").attr("id", node.id); - const rect2 = shapeSvg.insert("rect", ":first-child"); - const padding = 0 * node.padding; - const halfPadding = padding / 2; - rect2.attr("rx", node.rx).attr("ry", node.ry).attr("x", node.x - node.width / 2 - halfPadding).attr("y", node.y - node.height / 2 - halfPadding).attr("width", node.width + padding).attr("height", node.height + padding).attr("fill", "none"); - const rectBox = rect2.node().getBBox(); - node.width = rectBox.width; - node.height = rectBox.height; - node.intersect = function(point) { - return (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.i)(node, point); - }; - return shapeSvg; -}; -const roundedWithTitle = (parent, node) => { - const siteConfig = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.c)(); - const shapeSvg = parent.insert("g").attr("class", node.classes).attr("id", node.id); - const rect2 = shapeSvg.insert("rect", ":first-child"); - const label = shapeSvg.insert("g").attr("class", "cluster-label"); - const innerRect = shapeSvg.append("rect"); - const text = label.node().appendChild((0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.c)(node.labelText, node.labelStyle, void 0, true)); - let bbox = text.getBBox(); - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.m)(siteConfig.flowchart.htmlLabels)) { - const div = text.children[0]; - const dv = (0,d3__WEBPACK_IMPORTED_MODULE_3__/* .select */ .Ltv)(text); - bbox = div.getBoundingClientRect(); - dv.attr("width", bbox.width); - dv.attr("height", bbox.height); - } - bbox = text.getBBox(); - const padding = 0 * node.padding; - const halfPadding = padding / 2; - const width = node.width <= bbox.width + node.padding ? bbox.width + node.padding : node.width; - if (node.width <= bbox.width + node.padding) { - node.diff = (bbox.width + node.padding * 0 - node.width) / 2; - } else { - node.diff = -node.padding / 2; - } - rect2.attr("class", "outer").attr("x", node.x - width / 2 - halfPadding).attr("y", node.y - node.height / 2 - halfPadding).attr("width", width + padding).attr("height", node.height + padding); - innerRect.attr("class", "inner").attr("x", node.x - width / 2 - halfPadding).attr("y", node.y - node.height / 2 - halfPadding + bbox.height - 1).attr("width", width + padding).attr("height", node.height + padding - bbox.height - 3); - const { subGraphTitleTopMargin } = (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.g)(siteConfig); - label.attr( - "transform", - `translate(${node.x - bbox.width / 2}, ${node.y - node.height / 2 - node.padding / 3 + ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.m)(siteConfig.flowchart.htmlLabels) ? 5 : 3) + subGraphTitleTopMargin})` - ); - const rectBox = rect2.node().getBBox(); - node.height = rectBox.height; - node.intersect = function(point) { - return (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.i)(node, point); - }; - return shapeSvg; -}; -const divider = (parent, node) => { - const shapeSvg = parent.insert("g").attr("class", node.classes).attr("id", node.id); - const rect2 = shapeSvg.insert("rect", ":first-child"); - const padding = 0 * node.padding; - const halfPadding = padding / 2; - rect2.attr("class", "divider").attr("x", node.x - node.width / 2 - halfPadding).attr("y", node.y - node.height / 2).attr("width", node.width + padding).attr("height", node.height + padding); - const rectBox = rect2.node().getBBox(); - node.width = rectBox.width; - node.height = rectBox.height; - node.diff = -node.padding / 2; - node.intersect = function(point) { - return (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.i)(node, point); - }; - return shapeSvg; -}; -const shapes = { rect, roundedWithTitle, noteGroup, divider }; -let clusterElems = {}; -const insertCluster = (elem, node) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("Inserting cluster"); - const shape = node.shape || "rect"; - clusterElems[node.id] = shapes[shape](elem, node); -}; -const clear = () => { - clusterElems = {}; -}; -const recursiveRender = async (_elem, graph, diagramType, id, parentCluster, siteConfig) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Graph in recursive render: XXX", dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .M(graph), parentCluster); - const dir = graph.graph().rankdir; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("Dir in recursive render - dir:", dir); - const elem = _elem.insert("g").attr("class", "root"); - if (!graph.nodes()) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("No nodes found for", graph); - } else { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Recursive render XXX", graph.nodes()); - } - if (graph.edges().length > 0) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("Recursive edges", graph.edge(graph.edges()[0])); - } - const clusters = elem.insert("g").attr("class", "clusters"); - const edgePaths = elem.insert("g").attr("class", "edgePaths"); - const edgeLabels = elem.insert("g").attr("class", "edgeLabels"); - const nodes = elem.insert("g").attr("class", "nodes"); - await Promise.all( - graph.nodes().map(async function(v) { - const node = graph.node(v); - if (parentCluster !== void 0) { - const data = JSON.parse(JSON.stringify(parentCluster.clusterData)); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Setting data for cluster XXX (", v, ") ", data, parentCluster); - graph.setNode(parentCluster.id, data); - if (!graph.parent(v)) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("Setting parent", v, parentCluster.id); - graph.setParent(v, parentCluster.id, data); - } - } - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("(Insert) Node XXX" + v + ": " + JSON.stringify(graph.node(v))); - if (node && node.clusterNode) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Cluster identified", v, node.width, graph.node(v)); - const o = await recursiveRender( - nodes, - node.graph, - diagramType, - id, - graph.node(v), - siteConfig - ); - const newEl = o.elem; - (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.u)(node, newEl); - node.diff = o.diff || 0; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Node bounds (abc123)", v, node, node.width, node.x, node.y); - (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.s)(newEl, node); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Recursive render complete ", newEl, node); - } else { - if (graph.children(v).length > 0) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Cluster - the non recursive path XXX", v, node.id, node, graph); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info(findNonClusterChild(node.id, graph)); - clusterDb[node.id] = { id: findNonClusterChild(node.id, graph), node }; - } else { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Node - the non recursive path", v, node.id, node); - await (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.e)(nodes, graph.node(v), dir); - } - } - }) - ); - graph.edges().forEach(function(e) { - const edge = graph.edge(e.v, e.w, e.name); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(e)); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Edge " + e.v + " -> " + e.w + ": ", e, " ", JSON.stringify(graph.edge(e))); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Fix", clusterDb, "ids:", e.v, e.w, "Translating: ", clusterDb[e.v], clusterDb[e.w]); - (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.f)(edgeLabels, edge); - }); - graph.edges().forEach(function(e) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(e)); - }); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("#############################################"); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("### Layout ###"); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("#############################################"); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info(graph); - (0,dagre_d3_es_src_dagre_index_js__WEBPACK_IMPORTED_MODULE_0__/* .layout */ .Zp)(graph); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Graph after layout:", dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .M(graph)); - let diff = 0; - const { subGraphTitleTotalMargin } = (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.g)(siteConfig); - sortNodesByHierarchy(graph).forEach(function(v) { - const node = graph.node(v); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Position " + v + ": " + JSON.stringify(graph.node(v))); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info( - "Position " + v + ": (" + node.x, - "," + node.y, - ") width: ", - node.width, - " height: ", - node.height - ); - if (node && node.clusterNode) { - node.y += subGraphTitleTotalMargin; - (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.p)(node); - } else { - if (graph.children(v).length > 0) { - node.height += subGraphTitleTotalMargin; - insertCluster(clusters, node); - clusterDb[node.id].node = node; - } else { - node.y += subGraphTitleTotalMargin / 2; - (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.p)(node); - } - } - }); - graph.edges().forEach(function(e) { - const edge = graph.edge(e); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(edge), edge); - edge.points.forEach((point) => point.y += subGraphTitleTotalMargin / 2); - const paths = (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.h)(edgePaths, e, edge, clusterDb, diagramType, graph, id); - (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.j)(edge, paths); - }); - graph.nodes().forEach(function(v) { - const n = graph.node(v); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info(v, n.type, n.diff); - if (n.type === "group") { - diff = n.diff; - } - }); - return { elem, diff }; -}; -const render = async (elem, graph, markers, diagramType, id) => { - (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.a)(elem, markers, diagramType, id); - (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.b)(); - (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.d)(); - clear(); - clear$1(); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Graph at first:", JSON.stringify(dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .M(graph))); - adjustClustersAndEdges(graph); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Graph after:", JSON.stringify(dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .M(graph))); - const siteConfig = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.c)(); - await recursiveRender(elem, graph, diagramType, id, void 0, siteConfig); -}; - - - -/***/ }), - -/***/ 50141: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ diagram: () => (/* binding */ diagram) -/* harmony export */ }); -/* harmony import */ var _styles_6aaf32cf_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(27899); -/* harmony import */ var dagre_d3_es_src_graphlib_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(697); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(26312); -/* harmony import */ var _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(86079); -/* harmony import */ var _index_3862675e_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(8995); -/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(74353); -/* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(16750); -/* harmony import */ var dompurify__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(99418); -/* harmony import */ var dagre_d3_es_src_dagre_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(21176); -/* harmony import */ var dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(14075); - - - - - - - - - - - - - - - - - - - -const SHAPE_STATE = "rect"; -const SHAPE_STATE_WITH_DESC = "rectWithTitle"; -const SHAPE_START = "start"; -const SHAPE_END = "end"; -const SHAPE_DIVIDER = "divider"; -const SHAPE_GROUP = "roundedWithTitle"; -const SHAPE_NOTE = "note"; -const SHAPE_NOTEGROUP = "noteGroup"; -const CSS_DIAGRAM = "statediagram"; -const CSS_STATE = "state"; -const CSS_DIAGRAM_STATE = `${CSS_DIAGRAM}-${CSS_STATE}`; -const CSS_EDGE = "transition"; -const CSS_NOTE = "note"; -const CSS_NOTE_EDGE = "note-edge"; -const CSS_EDGE_NOTE_EDGE = `${CSS_EDGE} ${CSS_NOTE_EDGE}`; -const CSS_DIAGRAM_NOTE = `${CSS_DIAGRAM}-${CSS_NOTE}`; -const CSS_CLUSTER = "cluster"; -const CSS_DIAGRAM_CLUSTER = `${CSS_DIAGRAM}-${CSS_CLUSTER}`; -const CSS_CLUSTER_ALT = "cluster-alt"; -const CSS_DIAGRAM_CLUSTER_ALT = `${CSS_DIAGRAM}-${CSS_CLUSTER_ALT}`; -const PARENT = "parent"; -const NOTE = "note"; -const DOMID_STATE = "state"; -const DOMID_TYPE_SPACER = "----"; -const NOTE_ID = `${DOMID_TYPE_SPACER}${NOTE}`; -const PARENT_ID = `${DOMID_TYPE_SPACER}${PARENT}`; -const G_EDGE_STYLE = "fill:none"; -const G_EDGE_ARROWHEADSTYLE = "fill: #333"; -const G_EDGE_LABELPOS = "c"; -const G_EDGE_LABELTYPE = "text"; -const G_EDGE_THICKNESS = "normal"; -let nodeDb = {}; -let graphItemCount = 0; -const setConf = function(cnf) { - const keys = Object.keys(cnf); - for (const key of keys) { - cnf[key]; - } -}; -const getClasses = function(text, diagramObj) { - diagramObj.db.extract(diagramObj.db.getRootDocV2()); - return diagramObj.db.getClasses(); -}; -function getClassesFromDbInfo(dbInfoItem) { - if (dbInfoItem === void 0 || dbInfoItem === null) { - return ""; - } else { - if (dbInfoItem.classes) { - return dbInfoItem.classes.join(" "); - } else { - return ""; - } - } -} -function stateDomId(itemId = "", counter = 0, type = "", typeSpacer = DOMID_TYPE_SPACER) { - const typeStr = type !== null && type.length > 0 ? `${typeSpacer}${type}` : ""; - return `${DOMID_STATE}-${itemId}${typeStr}-${counter}`; -} -const setupNode = (g, parent, parsedItem, diagramStates, diagramDb, altFlag) => { - const itemId = parsedItem.id; - const classStr = getClassesFromDbInfo(diagramStates[itemId]); - if (itemId !== "root") { - let shape = SHAPE_STATE; - if (parsedItem.start === true) { - shape = SHAPE_START; - } - if (parsedItem.start === false) { - shape = SHAPE_END; - } - if (parsedItem.type !== _styles_6aaf32cf_js__WEBPACK_IMPORTED_MODULE_7__.D) { - shape = parsedItem.type; - } - if (!nodeDb[itemId]) { - nodeDb[itemId] = { - id: itemId, - shape, - description: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_8__.e.sanitizeText(itemId, (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_8__.c)()), - classes: `${classStr} ${CSS_DIAGRAM_STATE}` - }; - } - const newNode = nodeDb[itemId]; - if (parsedItem.description) { - if (Array.isArray(newNode.description)) { - newNode.shape = SHAPE_STATE_WITH_DESC; - newNode.description.push(parsedItem.description); - } else { - if (newNode.description.length > 0) { - newNode.shape = SHAPE_STATE_WITH_DESC; - if (newNode.description === itemId) { - newNode.description = [parsedItem.description]; - } else { - newNode.description = [newNode.description, parsedItem.description]; - } - } else { - newNode.shape = SHAPE_STATE; - newNode.description = parsedItem.description; - } - } - newNode.description = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_8__.e.sanitizeTextOrArray(newNode.description, (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_8__.c)()); - } - if (newNode.description.length === 1 && newNode.shape === SHAPE_STATE_WITH_DESC) { - newNode.shape = SHAPE_STATE; - } - if (!newNode.type && parsedItem.doc) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_8__.l.info("Setting cluster for ", itemId, getDir(parsedItem)); - newNode.type = "group"; - newNode.dir = getDir(parsedItem); - newNode.shape = parsedItem.type === _styles_6aaf32cf_js__WEBPACK_IMPORTED_MODULE_7__.a ? SHAPE_DIVIDER : SHAPE_GROUP; - newNode.classes = newNode.classes + " " + CSS_DIAGRAM_CLUSTER + " " + (altFlag ? CSS_DIAGRAM_CLUSTER_ALT : ""); - } - const nodeData = { - labelStyle: "", - shape: newNode.shape, - labelText: newNode.description, - // typeof newNode.description === 'object' - // ? newNode.description[0] - // : newNode.description, - classes: newNode.classes, - style: "", - //styles.style, - id: itemId, - dir: newNode.dir, - domId: stateDomId(itemId, graphItemCount), - type: newNode.type, - padding: 15 - //getConfig().flowchart.padding - }; - nodeData.centerLabel = true; - if (parsedItem.note) { - const noteData = { - labelStyle: "", - shape: SHAPE_NOTE, - labelText: parsedItem.note.text, - classes: CSS_DIAGRAM_NOTE, - // useHtmlLabels: false, - style: "", - // styles.style, - id: itemId + NOTE_ID + "-" + graphItemCount, - domId: stateDomId(itemId, graphItemCount, NOTE), - type: newNode.type, - padding: 15 - //getConfig().flowchart.padding - }; - const groupData = { - labelStyle: "", - shape: SHAPE_NOTEGROUP, - labelText: parsedItem.note.text, - classes: newNode.classes, - style: "", - // styles.style, - id: itemId + PARENT_ID, - domId: stateDomId(itemId, graphItemCount, PARENT), - type: "group", - padding: 0 - //getConfig().flowchart.padding - }; - graphItemCount++; - const parentNodeId = itemId + PARENT_ID; - g.setNode(parentNodeId, groupData); - g.setNode(noteData.id, noteData); - g.setNode(itemId, nodeData); - g.setParent(itemId, parentNodeId); - g.setParent(noteData.id, parentNodeId); - let from = itemId; - let to = noteData.id; - if (parsedItem.note.position === "left of") { - from = noteData.id; - to = itemId; - } - g.setEdge(from, to, { - arrowhead: "none", - arrowType: "", - style: G_EDGE_STYLE, - labelStyle: "", - classes: CSS_EDGE_NOTE_EDGE, - arrowheadStyle: G_EDGE_ARROWHEADSTYLE, - labelpos: G_EDGE_LABELPOS, - labelType: G_EDGE_LABELTYPE, - thickness: G_EDGE_THICKNESS - }); - } else { - g.setNode(itemId, nodeData); - } - } - if (parent && parent.id !== "root") { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_8__.l.trace("Setting node ", itemId, " to be child of its parent ", parent.id); - g.setParent(itemId, parent.id); - } - if (parsedItem.doc) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_8__.l.trace("Adding nodes children "); - setupDoc(g, parsedItem, parsedItem.doc, diagramStates, diagramDb, !altFlag); - } -}; -const setupDoc = (g, parentParsedItem, doc, diagramStates, diagramDb, altFlag) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_8__.l.trace("items", doc); - doc.forEach((item) => { - switch (item.stmt) { - case _styles_6aaf32cf_js__WEBPACK_IMPORTED_MODULE_7__.b: - setupNode(g, parentParsedItem, item, diagramStates, diagramDb, altFlag); - break; - case _styles_6aaf32cf_js__WEBPACK_IMPORTED_MODULE_7__.D: - setupNode(g, parentParsedItem, item, diagramStates, diagramDb, altFlag); - break; - case _styles_6aaf32cf_js__WEBPACK_IMPORTED_MODULE_7__.S: - { - setupNode(g, parentParsedItem, item.state1, diagramStates, diagramDb, altFlag); - setupNode(g, parentParsedItem, item.state2, diagramStates, diagramDb, altFlag); - const edgeData = { - id: "edge" + graphItemCount, - arrowhead: "normal", - arrowTypeEnd: "arrow_barb", - style: G_EDGE_STYLE, - labelStyle: "", - label: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_8__.e.sanitizeText(item.description, (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_8__.c)()), - arrowheadStyle: G_EDGE_ARROWHEADSTYLE, - labelpos: G_EDGE_LABELPOS, - labelType: G_EDGE_LABELTYPE, - thickness: G_EDGE_THICKNESS, - classes: CSS_EDGE - }; - g.setEdge(item.state1.id, item.state2.id, edgeData, graphItemCount); - graphItemCount++; - } - break; - } - }); -}; -const getDir = (parsedItem, defaultDir = _styles_6aaf32cf_js__WEBPACK_IMPORTED_MODULE_7__.c) => { - let dir = defaultDir; - if (parsedItem.doc) { - for (let i = 0; i < parsedItem.doc.length; i++) { - const parsedItemDoc = parsedItem.doc[i]; - if (parsedItemDoc.stmt === "dir") { - dir = parsedItemDoc.value; - } - } - } - return dir; -}; -const draw = async function(text, id, _version, diag) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_8__.l.info("Drawing state diagram (v2)", id); - nodeDb = {}; - diag.db.getDirection(); - const { securityLevel, state: conf } = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_8__.c)(); - const nodeSpacing = conf.nodeSpacing || 50; - const rankSpacing = conf.rankSpacing || 50; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_8__.l.info(diag.db.getRootDocV2()); - diag.db.extract(diag.db.getRootDocV2()); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_8__.l.info(diag.db.getRootDocV2()); - const diagramStates = diag.db.getStates(); - const g = new dagre_d3_es_src_graphlib_index_js__WEBPACK_IMPORTED_MODULE_0__/* .Graph */ .T({ - multigraph: true, - compound: true - }).setGraph({ - rankdir: getDir(diag.db.getRootDocV2()), - nodesep: nodeSpacing, - ranksep: rankSpacing, - marginx: 8, - marginy: 8 - }).setDefaultEdgeLabel(function() { - return {}; - }); - setupNode(g, void 0, diag.db.getRootDocV2(), diagramStates, diag.db, true); - let sandboxElement; - if (securityLevel === "sandbox") { - sandboxElement = (0,d3__WEBPACK_IMPORTED_MODULE_1__/* .select */ .Ltv)("#i" + id); - } - const root = securityLevel === "sandbox" ? (0,d3__WEBPACK_IMPORTED_MODULE_1__/* .select */ .Ltv)(sandboxElement.nodes()[0].contentDocument.body) : (0,d3__WEBPACK_IMPORTED_MODULE_1__/* .select */ .Ltv)("body"); - const svg = root.select(`[id="${id}"]`); - const element = root.select("#" + id + " g"); - await (0,_index_3862675e_js__WEBPACK_IMPORTED_MODULE_9__.r)(element, g, ["barb"], CSS_DIAGRAM, id); - const padding = 8; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_8__.u.insertTitle(svg, "statediagramTitleText", conf.titleTopMargin, diag.db.getDiagramTitle()); - const bounds = svg.node().getBBox(); - const width = bounds.width + padding * 2; - const height = bounds.height + padding * 2; - svg.attr("class", CSS_DIAGRAM); - const svgBounds = svg.node().getBBox(); - (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_8__.i)(svg, height, width, conf.useMaxWidth); - const vBox = `${svgBounds.x - padding} ${svgBounds.y - padding} ${width} ${height}`; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_8__.l.debug(`viewBox ${vBox}`); - svg.attr("viewBox", vBox); - const labels = document.querySelectorAll('[id="' + id + '"] .edgeLabel .label'); - for (const label of labels) { - const dim = label.getBBox(); - const rect = document.createElementNS("http://www.w3.org/2000/svg", SHAPE_STATE); - rect.setAttribute("rx", 0); - rect.setAttribute("ry", 0); - rect.setAttribute("width", dim.width); - rect.setAttribute("height", dim.height); - label.insertBefore(rect, label.firstChild); - } -}; -const renderer = { - setConf, - getClasses, - draw -}; -const diagram = { - parser: _styles_6aaf32cf_js__WEBPACK_IMPORTED_MODULE_7__.p, - db: _styles_6aaf32cf_js__WEBPACK_IMPORTED_MODULE_7__.d, - renderer, - styles: _styles_6aaf32cf_js__WEBPACK_IMPORTED_MODULE_7__.s, - init: (cnf) => { - if (!cnf.state) { - cnf.state = {}; - } - cnf.state.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute; - _styles_6aaf32cf_js__WEBPACK_IMPORTED_MODULE_7__.d.clear(); - } -}; - - - -/***/ }), - -/***/ 27899: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ D: () => (/* binding */ DEFAULT_STATE_TYPE), -/* harmony export */ S: () => (/* binding */ STMT_RELATION), -/* harmony export */ a: () => (/* binding */ DIVIDER_TYPE), -/* harmony export */ b: () => (/* binding */ STMT_STATE), -/* harmony export */ c: () => (/* binding */ DEFAULT_NESTED_DOC_DIR), -/* harmony export */ d: () => (/* binding */ db), -/* harmony export */ p: () => (/* binding */ parser$1), -/* harmony export */ s: () => (/* binding */ styles) -/* harmony export */ }); -/* harmony import */ var _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(86079); - -var parser = function() { - var o = function(k, v, o2, l) { - for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) - ; - return o2; - }, $V0 = [1, 2], $V1 = [1, 3], $V2 = [1, 4], $V3 = [2, 4], $V4 = [1, 9], $V5 = [1, 11], $V6 = [1, 15], $V7 = [1, 16], $V8 = [1, 17], $V9 = [1, 18], $Va = [1, 30], $Vb = [1, 19], $Vc = [1, 20], $Vd = [1, 21], $Ve = [1, 22], $Vf = [1, 23], $Vg = [1, 25], $Vh = [1, 26], $Vi = [1, 27], $Vj = [1, 28], $Vk = [1, 29], $Vl = [1, 32], $Vm = [1, 33], $Vn = [1, 34], $Vo = [1, 35], $Vp = [1, 31], $Vq = [1, 4, 5, 15, 16, 18, 20, 21, 23, 24, 25, 26, 27, 28, 32, 34, 36, 37, 41, 44, 45, 46, 47, 50], $Vr = [1, 4, 5, 13, 14, 15, 16, 18, 20, 21, 23, 24, 25, 26, 27, 28, 32, 34, 36, 37, 41, 44, 45, 46, 47, 50], $Vs = [4, 5, 15, 16, 18, 20, 21, 23, 24, 25, 26, 27, 28, 32, 34, 36, 37, 41, 44, 45, 46, 47, 50]; - var parser2 = { - trace: function trace() { - }, - yy: {}, - symbols_: { "error": 2, "start": 3, "SPACE": 4, "NL": 5, "SD": 6, "document": 7, "line": 8, "statement": 9, "classDefStatement": 10, "cssClassStatement": 11, "idStatement": 12, "DESCR": 13, "-->": 14, "HIDE_EMPTY": 15, "scale": 16, "WIDTH": 17, "COMPOSIT_STATE": 18, "STRUCT_START": 19, "STRUCT_STOP": 20, "STATE_DESCR": 21, "AS": 22, "ID": 23, "FORK": 24, "JOIN": 25, "CHOICE": 26, "CONCURRENT": 27, "note": 28, "notePosition": 29, "NOTE_TEXT": 30, "direction": 31, "acc_title": 32, "acc_title_value": 33, "acc_descr": 34, "acc_descr_value": 35, "acc_descr_multiline_value": 36, "classDef": 37, "CLASSDEF_ID": 38, "CLASSDEF_STYLEOPTS": 39, "DEFAULT": 40, "class": 41, "CLASSENTITY_IDS": 42, "STYLECLASS": 43, "direction_tb": 44, "direction_bt": 45, "direction_rl": 46, "direction_lr": 47, "eol": 48, ";": 49, "EDGE_STATE": 50, "STYLE_SEPARATOR": 51, "left_of": 52, "right_of": 53, "$accept": 0, "$end": 1 }, - terminals_: { 2: "error", 4: "SPACE", 5: "NL", 6: "SD", 13: "DESCR", 14: "-->", 15: "HIDE_EMPTY", 16: "scale", 17: "WIDTH", 18: "COMPOSIT_STATE", 19: "STRUCT_START", 20: "STRUCT_STOP", 21: "STATE_DESCR", 22: "AS", 23: "ID", 24: "FORK", 25: "JOIN", 26: "CHOICE", 27: "CONCURRENT", 28: "note", 30: "NOTE_TEXT", 32: "acc_title", 33: "acc_title_value", 34: "acc_descr", 35: "acc_descr_value", 36: "acc_descr_multiline_value", 37: "classDef", 38: "CLASSDEF_ID", 39: "CLASSDEF_STYLEOPTS", 40: "DEFAULT", 41: "class", 42: "CLASSENTITY_IDS", 43: "STYLECLASS", 44: "direction_tb", 45: "direction_bt", 46: "direction_rl", 47: "direction_lr", 49: ";", 50: "EDGE_STATE", 51: "STYLE_SEPARATOR", 52: "left_of", 53: "right_of" }, - productions_: [0, [3, 2], [3, 2], [3, 2], [7, 0], [7, 2], [8, 2], [8, 1], [8, 1], [9, 1], [9, 1], [9, 1], [9, 2], [9, 3], [9, 4], [9, 1], [9, 2], [9, 1], [9, 4], [9, 3], [9, 6], [9, 1], [9, 1], [9, 1], [9, 1], [9, 4], [9, 4], [9, 1], [9, 2], [9, 2], [9, 1], [10, 3], [10, 3], [11, 3], [31, 1], [31, 1], [31, 1], [31, 1], [48, 1], [48, 1], [12, 1], [12, 1], [12, 3], [12, 3], [29, 1], [29, 1]], - performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { - var $0 = $$.length - 1; - switch (yystate) { - case 3: - yy.setRootDoc($$[$0]); - return $$[$0]; - case 4: - this.$ = []; - break; - case 5: - if ($$[$0] != "nl") { - $$[$0 - 1].push($$[$0]); - this.$ = $$[$0 - 1]; - } - break; - case 6: - case 7: - this.$ = $$[$0]; - break; - case 8: - this.$ = "nl"; - break; - case 11: - this.$ = $$[$0]; - break; - case 12: - const stateStmt = $$[$0 - 1]; - stateStmt.description = yy.trimColon($$[$0]); - this.$ = stateStmt; - break; - case 13: - this.$ = { stmt: "relation", state1: $$[$0 - 2], state2: $$[$0] }; - break; - case 14: - const relDescription = yy.trimColon($$[$0]); - this.$ = { stmt: "relation", state1: $$[$0 - 3], state2: $$[$0 - 1], description: relDescription }; - break; - case 18: - this.$ = { stmt: "state", id: $$[$0 - 3], type: "default", description: "", doc: $$[$0 - 1] }; - break; - case 19: - var id = $$[$0]; - var description = $$[$0 - 2].trim(); - if ($$[$0].match(":")) { - var parts = $$[$0].split(":"); - id = parts[0]; - description = [description, parts[1]]; - } - this.$ = { stmt: "state", id, type: "default", description }; - break; - case 20: - this.$ = { stmt: "state", id: $$[$0 - 3], type: "default", description: $$[$0 - 5], doc: $$[$0 - 1] }; - break; - case 21: - this.$ = { stmt: "state", id: $$[$0], type: "fork" }; - break; - case 22: - this.$ = { stmt: "state", id: $$[$0], type: "join" }; - break; - case 23: - this.$ = { stmt: "state", id: $$[$0], type: "choice" }; - break; - case 24: - this.$ = { stmt: "state", id: yy.getDividerId(), type: "divider" }; - break; - case 25: - this.$ = { stmt: "state", id: $$[$0 - 1].trim(), note: { position: $$[$0 - 2].trim(), text: $$[$0].trim() } }; - break; - case 28: - this.$ = $$[$0].trim(); - yy.setAccTitle(this.$); - break; - case 29: - case 30: - this.$ = $$[$0].trim(); - yy.setAccDescription(this.$); - break; - case 31: - case 32: - this.$ = { stmt: "classDef", id: $$[$0 - 1].trim(), classes: $$[$0].trim() }; - break; - case 33: - this.$ = { stmt: "applyClass", id: $$[$0 - 1].trim(), styleClass: $$[$0].trim() }; - break; - case 34: - yy.setDirection("TB"); - this.$ = { stmt: "dir", value: "TB" }; - break; - case 35: - yy.setDirection("BT"); - this.$ = { stmt: "dir", value: "BT" }; - break; - case 36: - yy.setDirection("RL"); - this.$ = { stmt: "dir", value: "RL" }; - break; - case 37: - yy.setDirection("LR"); - this.$ = { stmt: "dir", value: "LR" }; - break; - case 40: - case 41: - this.$ = { stmt: "state", id: $$[$0].trim(), type: "default", description: "" }; - break; - case 42: - this.$ = { stmt: "state", id: $$[$0 - 2].trim(), classes: [$$[$0].trim()], type: "default", description: "" }; - break; - case 43: - this.$ = { stmt: "state", id: $$[$0 - 2].trim(), classes: [$$[$0].trim()], type: "default", description: "" }; - break; - } - }, - table: [{ 3: 1, 4: $V0, 5: $V1, 6: $V2 }, { 1: [3] }, { 3: 5, 4: $V0, 5: $V1, 6: $V2 }, { 3: 6, 4: $V0, 5: $V1, 6: $V2 }, o([1, 4, 5, 15, 16, 18, 21, 23, 24, 25, 26, 27, 28, 32, 34, 36, 37, 41, 44, 45, 46, 47, 50], $V3, { 7: 7 }), { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 3], 4: $V4, 5: $V5, 8: 8, 9: 10, 10: 12, 11: 13, 12: 14, 15: $V6, 16: $V7, 18: $V8, 21: $V9, 23: $Va, 24: $Vb, 25: $Vc, 26: $Vd, 27: $Ve, 28: $Vf, 31: 24, 32: $Vg, 34: $Vh, 36: $Vi, 37: $Vj, 41: $Vk, 44: $Vl, 45: $Vm, 46: $Vn, 47: $Vo, 50: $Vp }, o($Vq, [2, 5]), { 9: 36, 10: 12, 11: 13, 12: 14, 15: $V6, 16: $V7, 18: $V8, 21: $V9, 23: $Va, 24: $Vb, 25: $Vc, 26: $Vd, 27: $Ve, 28: $Vf, 31: 24, 32: $Vg, 34: $Vh, 36: $Vi, 37: $Vj, 41: $Vk, 44: $Vl, 45: $Vm, 46: $Vn, 47: $Vo, 50: $Vp }, o($Vq, [2, 7]), o($Vq, [2, 8]), o($Vq, [2, 9]), o($Vq, [2, 10]), o($Vq, [2, 11], { 13: [1, 37], 14: [1, 38] }), o($Vq, [2, 15]), { 17: [1, 39] }, o($Vq, [2, 17], { 19: [1, 40] }), { 22: [1, 41] }, o($Vq, [2, 21]), o($Vq, [2, 22]), o($Vq, [2, 23]), o($Vq, [2, 24]), { 29: 42, 30: [1, 43], 52: [1, 44], 53: [1, 45] }, o($Vq, [2, 27]), { 33: [1, 46] }, { 35: [1, 47] }, o($Vq, [2, 30]), { 38: [1, 48], 40: [1, 49] }, { 42: [1, 50] }, o($Vr, [2, 40], { 51: [1, 51] }), o($Vr, [2, 41], { 51: [1, 52] }), o($Vq, [2, 34]), o($Vq, [2, 35]), o($Vq, [2, 36]), o($Vq, [2, 37]), o($Vq, [2, 6]), o($Vq, [2, 12]), { 12: 53, 23: $Va, 50: $Vp }, o($Vq, [2, 16]), o($Vs, $V3, { 7: 54 }), { 23: [1, 55] }, { 23: [1, 56] }, { 22: [1, 57] }, { 23: [2, 44] }, { 23: [2, 45] }, o($Vq, [2, 28]), o($Vq, [2, 29]), { 39: [1, 58] }, { 39: [1, 59] }, { 43: [1, 60] }, { 23: [1, 61] }, { 23: [1, 62] }, o($Vq, [2, 13], { 13: [1, 63] }), { 4: $V4, 5: $V5, 8: 8, 9: 10, 10: 12, 11: 13, 12: 14, 15: $V6, 16: $V7, 18: $V8, 20: [1, 64], 21: $V9, 23: $Va, 24: $Vb, 25: $Vc, 26: $Vd, 27: $Ve, 28: $Vf, 31: 24, 32: $Vg, 34: $Vh, 36: $Vi, 37: $Vj, 41: $Vk, 44: $Vl, 45: $Vm, 46: $Vn, 47: $Vo, 50: $Vp }, o($Vq, [2, 19], { 19: [1, 65] }), { 30: [1, 66] }, { 23: [1, 67] }, o($Vq, [2, 31]), o($Vq, [2, 32]), o($Vq, [2, 33]), o($Vr, [2, 42]), o($Vr, [2, 43]), o($Vq, [2, 14]), o($Vq, [2, 18]), o($Vs, $V3, { 7: 68 }), o($Vq, [2, 25]), o($Vq, [2, 26]), { 4: $V4, 5: $V5, 8: 8, 9: 10, 10: 12, 11: 13, 12: 14, 15: $V6, 16: $V7, 18: $V8, 20: [1, 69], 21: $V9, 23: $Va, 24: $Vb, 25: $Vc, 26: $Vd, 27: $Ve, 28: $Vf, 31: 24, 32: $Vg, 34: $Vh, 36: $Vi, 37: $Vj, 41: $Vk, 44: $Vl, 45: $Vm, 46: $Vn, 47: $Vo, 50: $Vp }, o($Vq, [2, 20])], - defaultActions: { 5: [2, 1], 6: [2, 2], 44: [2, 44], 45: [2, 45] }, - parseError: function parseError(str, hash) { - if (hash.recoverable) { - this.trace(str); - } else { - var error = new Error(str); - error.hash = hash; - throw error; - } - }, - parse: function parse(input) { - var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; - var args = lstack.slice.call(arguments, 1); - var lexer2 = Object.create(this.lexer); - var sharedState = { yy: {} }; - for (var k in this.yy) { - if (Object.prototype.hasOwnProperty.call(this.yy, k)) { - sharedState.yy[k] = this.yy[k]; - } - } - lexer2.setInput(input, sharedState.yy); - sharedState.yy.lexer = lexer2; - sharedState.yy.parser = this; - if (typeof lexer2.yylloc == "undefined") { - lexer2.yylloc = {}; - } - var yyloc = lexer2.yylloc; - lstack.push(yyloc); - var ranges = lexer2.options && lexer2.options.ranges; - if (typeof sharedState.yy.parseError === "function") { - this.parseError = sharedState.yy.parseError; - } else { - this.parseError = Object.getPrototypeOf(this).parseError; - } - function lex() { - var token; - token = tstack.pop() || lexer2.lex() || EOF; - if (typeof token !== "number") { - if (token instanceof Array) { - tstack = token; - token = tstack.pop(); - } - token = self.symbols_[token] || token; - } - return token; - } - var symbol, state, action, r, yyval = {}, p, len, newState, expected; - while (true) { - state = stack[stack.length - 1]; - if (this.defaultActions[state]) { - action = this.defaultActions[state]; - } else { - if (symbol === null || typeof symbol == "undefined") { - symbol = lex(); - } - action = table[state] && table[state][symbol]; - } - if (typeof action === "undefined" || !action.length || !action[0]) { - var errStr = ""; - expected = []; - for (p in table[state]) { - if (this.terminals_[p] && p > TERROR) { - expected.push("'" + this.terminals_[p] + "'"); - } - } - if (lexer2.showPosition) { - errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; - } else { - errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); - } - this.parseError(errStr, { - text: lexer2.match, - token: this.terminals_[symbol] || symbol, - line: lexer2.yylineno, - loc: yyloc, - expected - }); - } - if (action[0] instanceof Array && action.length > 1) { - throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); - } - switch (action[0]) { - case 1: - stack.push(symbol); - vstack.push(lexer2.yytext); - lstack.push(lexer2.yylloc); - stack.push(action[1]); - symbol = null; - { - yyleng = lexer2.yyleng; - yytext = lexer2.yytext; - yylineno = lexer2.yylineno; - yyloc = lexer2.yylloc; - } - break; - case 2: - len = this.productions_[action[1]][1]; - yyval.$ = vstack[vstack.length - len]; - yyval._$ = { - first_line: lstack[lstack.length - (len || 1)].first_line, - last_line: lstack[lstack.length - 1].last_line, - first_column: lstack[lstack.length - (len || 1)].first_column, - last_column: lstack[lstack.length - 1].last_column - }; - if (ranges) { - yyval._$.range = [ - lstack[lstack.length - (len || 1)].range[0], - lstack[lstack.length - 1].range[1] - ]; - } - r = this.performAction.apply(yyval, [ - yytext, - yyleng, - yylineno, - sharedState.yy, - action[1], - vstack, - lstack - ].concat(args)); - if (typeof r !== "undefined") { - return r; - } - if (len) { - stack = stack.slice(0, -1 * len * 2); - vstack = vstack.slice(0, -1 * len); - lstack = lstack.slice(0, -1 * len); - } - stack.push(this.productions_[action[1]][0]); - vstack.push(yyval.$); - lstack.push(yyval._$); - newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; - stack.push(newState); - break; - case 3: - return true; - } - } - return true; - } - }; - var lexer = function() { - var lexer2 = { - EOF: 1, - parseError: function parseError(str, hash) { - if (this.yy.parser) { - this.yy.parser.parseError(str, hash); - } else { - throw new Error(str); - } - }, - // resets the lexer, sets new input - setInput: function(input, yy) { - this.yy = yy || this.yy || {}; - this._input = input; - this._more = this._backtrack = this.done = false; - this.yylineno = this.yyleng = 0; - this.yytext = this.matched = this.match = ""; - this.conditionStack = ["INITIAL"]; - this.yylloc = { - first_line: 1, - first_column: 0, - last_line: 1, - last_column: 0 - }; - if (this.options.ranges) { - this.yylloc.range = [0, 0]; - } - this.offset = 0; - return this; - }, - // consumes and returns one char from the input - input: function() { - var ch = this._input[0]; - this.yytext += ch; - this.yyleng++; - this.offset++; - this.match += ch; - this.matched += ch; - var lines = ch.match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno++; - this.yylloc.last_line++; - } else { - this.yylloc.last_column++; - } - if (this.options.ranges) { - this.yylloc.range[1]++; - } - this._input = this._input.slice(1); - return ch; - }, - // unshifts one char (or a string) into the input - unput: function(ch) { - var len = ch.length; - var lines = ch.split(/(?:\r\n?|\n)/g); - this._input = ch + this._input; - this.yytext = this.yytext.substr(0, this.yytext.length - len); - this.offset -= len; - var oldLines = this.match.split(/(?:\r\n?|\n)/g); - this.match = this.match.substr(0, this.match.length - 1); - this.matched = this.matched.substr(0, this.matched.length - 1); - if (lines.length - 1) { - this.yylineno -= lines.length - 1; - } - var r = this.yylloc.range; - this.yylloc = { - first_line: this.yylloc.first_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.first_column, - last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len - }; - if (this.options.ranges) { - this.yylloc.range = [r[0], r[0] + this.yyleng - len]; - } - this.yyleng = this.yytext.length; - return this; - }, - // When called from action, caches matched text and appends it on next action - more: function() { - this._more = true; - return this; - }, - // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. - reject: function() { - if (this.options.backtrack_lexer) { - this._backtrack = true; - } else { - return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), { - text: "", - token: null, - line: this.yylineno - }); - } - return this; - }, - // retain first n characters of the match - less: function(n) { - this.unput(this.match.slice(n)); - }, - // displays already matched input, i.e. for error messages - pastInput: function() { - var past = this.matched.substr(0, this.matched.length - this.match.length); - return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); - }, - // displays upcoming input, i.e. for error messages - upcomingInput: function() { - var next = this.match; - if (next.length < 20) { - next += this._input.substr(0, 20 - next.length); - } - return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); - }, - // displays the character position where the lexing error occurred, i.e. for error messages - showPosition: function() { - var pre = this.pastInput(); - var c = new Array(pre.length + 1).join("-"); - return pre + this.upcomingInput() + "\n" + c + "^"; - }, - // test the lexed token: return FALSE when not a match, otherwise return token - test_match: function(match, indexed_rule) { - var token, lines, backup; - if (this.options.backtrack_lexer) { - backup = { - yylineno: this.yylineno, - yylloc: { - first_line: this.yylloc.first_line, - last_line: this.last_line, - first_column: this.yylloc.first_column, - last_column: this.yylloc.last_column - }, - yytext: this.yytext, - match: this.match, - matches: this.matches, - matched: this.matched, - yyleng: this.yyleng, - offset: this.offset, - _more: this._more, - _input: this._input, - yy: this.yy, - conditionStack: this.conditionStack.slice(0), - done: this.done - }; - if (this.options.ranges) { - backup.yylloc.range = this.yylloc.range.slice(0); - } - } - lines = match[0].match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno += lines.length; - } - this.yylloc = { - first_line: this.yylloc.last_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.last_column, - last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length - }; - this.yytext += match[0]; - this.match += match[0]; - this.matches = match; - this.yyleng = this.yytext.length; - if (this.options.ranges) { - this.yylloc.range = [this.offset, this.offset += this.yyleng]; - } - this._more = false; - this._backtrack = false; - this._input = this._input.slice(match[0].length); - this.matched += match[0]; - token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); - if (this.done && this._input) { - this.done = false; - } - if (token) { - return token; - } else if (this._backtrack) { - for (var k in backup) { - this[k] = backup[k]; - } - return false; - } - return false; - }, - // return next match in input - next: function() { - if (this.done) { - return this.EOF; - } - if (!this._input) { - this.done = true; - } - var token, match, tempMatch, index; - if (!this._more) { - this.yytext = ""; - this.match = ""; - } - var rules = this._currentRules(); - for (var i = 0; i < rules.length; i++) { - tempMatch = this._input.match(this.rules[rules[i]]); - if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { - match = tempMatch; - index = i; - if (this.options.backtrack_lexer) { - token = this.test_match(tempMatch, rules[i]); - if (token !== false) { - return token; - } else if (this._backtrack) { - match = false; - continue; - } else { - return false; - } - } else if (!this.options.flex) { - break; - } - } - } - if (match) { - token = this.test_match(match, rules[index]); - if (token !== false) { - return token; - } - return false; - } - if (this._input === "") { - return this.EOF; - } else { - return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { - text: "", - token: null, - line: this.yylineno - }); - } - }, - // return next match that has a token - lex: function lex() { - var r = this.next(); - if (r) { - return r; - } else { - return this.lex(); - } - }, - // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) - begin: function begin(condition) { - this.conditionStack.push(condition); - }, - // pop the previously active lexer condition state off the condition stack - popState: function popState() { - var n = this.conditionStack.length - 1; - if (n > 0) { - return this.conditionStack.pop(); - } else { - return this.conditionStack[0]; - } - }, - // produce the lexer rule set which is active for the currently active lexer condition state - _currentRules: function _currentRules() { - if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { - return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; - } else { - return this.conditions["INITIAL"].rules; - } - }, - // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available - topState: function topState(n) { - n = this.conditionStack.length - 1 - Math.abs(n || 0); - if (n >= 0) { - return this.conditionStack[n]; - } else { - return "INITIAL"; - } - }, - // alias for begin(condition) - pushState: function pushState(condition) { - this.begin(condition); - }, - // return the number of states currently on the stack - stateStackSize: function stateStackSize() { - return this.conditionStack.length; - }, - options: { "case-insensitive": true }, - performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { - switch ($avoiding_name_collisions) { - case 0: - return 40; - case 1: - return 44; - case 2: - return 45; - case 3: - return 46; - case 4: - return 47; - case 5: - break; - case 6: - break; - case 7: - return 5; - case 8: - break; - case 9: - break; - case 10: - break; - case 11: - break; - case 12: - this.pushState("SCALE"); - return 16; - case 13: - return 17; - case 14: - this.popState(); - break; - case 15: - this.begin("acc_title"); - return 32; - case 16: - this.popState(); - return "acc_title_value"; - case 17: - this.begin("acc_descr"); - return 34; - case 18: - this.popState(); - return "acc_descr_value"; - case 19: - this.begin("acc_descr_multiline"); - break; - case 20: - this.popState(); - break; - case 21: - return "acc_descr_multiline_value"; - case 22: - this.pushState("CLASSDEF"); - return 37; - case 23: - this.popState(); - this.pushState("CLASSDEFID"); - return "DEFAULT_CLASSDEF_ID"; - case 24: - this.popState(); - this.pushState("CLASSDEFID"); - return 38; - case 25: - this.popState(); - return 39; - case 26: - this.pushState("CLASS"); - return 41; - case 27: - this.popState(); - this.pushState("CLASS_STYLE"); - return 42; - case 28: - this.popState(); - return 43; - case 29: - this.pushState("SCALE"); - return 16; - case 30: - return 17; - case 31: - this.popState(); - break; - case 32: - this.pushState("STATE"); - break; - case 33: - this.popState(); - yy_.yytext = yy_.yytext.slice(0, -8).trim(); - return 24; - case 34: - this.popState(); - yy_.yytext = yy_.yytext.slice(0, -8).trim(); - return 25; - case 35: - this.popState(); - yy_.yytext = yy_.yytext.slice(0, -10).trim(); - return 26; - case 36: - this.popState(); - yy_.yytext = yy_.yytext.slice(0, -8).trim(); - return 24; - case 37: - this.popState(); - yy_.yytext = yy_.yytext.slice(0, -8).trim(); - return 25; - case 38: - this.popState(); - yy_.yytext = yy_.yytext.slice(0, -10).trim(); - return 26; - case 39: - return 44; - case 40: - return 45; - case 41: - return 46; - case 42: - return 47; - case 43: - this.pushState("STATE_STRING"); - break; - case 44: - this.pushState("STATE_ID"); - return "AS"; - case 45: - this.popState(); - return "ID"; - case 46: - this.popState(); - break; - case 47: - return "STATE_DESCR"; - case 48: - return 18; - case 49: - this.popState(); - break; - case 50: - this.popState(); - this.pushState("struct"); - return 19; - case 51: - break; - case 52: - this.popState(); - return 20; - case 53: - break; - case 54: - this.begin("NOTE"); - return 28; - case 55: - this.popState(); - this.pushState("NOTE_ID"); - return 52; - case 56: - this.popState(); - this.pushState("NOTE_ID"); - return 53; - case 57: - this.popState(); - this.pushState("FLOATING_NOTE"); - break; - case 58: - this.popState(); - this.pushState("FLOATING_NOTE_ID"); - return "AS"; - case 59: - break; - case 60: - return "NOTE_TEXT"; - case 61: - this.popState(); - return "ID"; - case 62: - this.popState(); - this.pushState("NOTE_TEXT"); - return 23; - case 63: - this.popState(); - yy_.yytext = yy_.yytext.substr(2).trim(); - return 30; - case 64: - this.popState(); - yy_.yytext = yy_.yytext.slice(0, -8).trim(); - return 30; - case 65: - return 6; - case 66: - return 6; - case 67: - return 15; - case 68: - return 50; - case 69: - return 23; - case 70: - yy_.yytext = yy_.yytext.trim(); - return 13; - case 71: - return 14; - case 72: - return 27; - case 73: - return 51; - case 74: - return 5; - case 75: - return "INVALID"; - } - }, - rules: [/^(?:default\b)/i, /^(?:.*direction\s+TB[^\n]*)/i, /^(?:.*direction\s+BT[^\n]*)/i, /^(?:.*direction\s+RL[^\n]*)/i, /^(?:.*direction\s+LR[^\n]*)/i, /^(?:%%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[\n]+)/i, /^(?:[\s]+)/i, /^(?:((?!\n)\s)+)/i, /^(?:#[^\n]*)/i, /^(?:%[^\n]*)/i, /^(?:scale\s+)/i, /^(?:\d+)/i, /^(?:\s+width\b)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:classDef\s+)/i, /^(?:DEFAULT\s+)/i, /^(?:\w+\s+)/i, /^(?:[^\n]*)/i, /^(?:class\s+)/i, /^(?:(\w+)+((,\s*\w+)*))/i, /^(?:[^\n]*)/i, /^(?:scale\s+)/i, /^(?:\d+)/i, /^(?:\s+width\b)/i, /^(?:state\s+)/i, /^(?:.*<>)/i, /^(?:.*<>)/i, /^(?:.*<>)/i, /^(?:.*\[\[fork\]\])/i, /^(?:.*\[\[join\]\])/i, /^(?:.*\[\[choice\]\])/i, /^(?:.*direction\s+TB[^\n]*)/i, /^(?:.*direction\s+BT[^\n]*)/i, /^(?:.*direction\s+RL[^\n]*)/i, /^(?:.*direction\s+LR[^\n]*)/i, /^(?:["])/i, /^(?:\s*as\s+)/i, /^(?:[^\n\{]*)/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:[^\n\s\{]+)/i, /^(?:\n)/i, /^(?:\{)/i, /^(?:%%(?!\{)[^\n]*)/i, /^(?:\})/i, /^(?:[\n])/i, /^(?:note\s+)/i, /^(?:left of\b)/i, /^(?:right of\b)/i, /^(?:")/i, /^(?:\s*as\s*)/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:[^\n]*)/i, /^(?:\s*[^:\n\s\-]+)/i, /^(?:\s*:[^:\n;]+)/i, /^(?:[\s\S]*?end note\b)/i, /^(?:stateDiagram\s+)/i, /^(?:stateDiagram-v2\s+)/i, /^(?:hide empty description\b)/i, /^(?:\[\*\])/i, /^(?:[^:\n\s\-\{]+)/i, /^(?:\s*:[^:\n;]+)/i, /^(?:-->)/i, /^(?:--)/i, /^(?::::)/i, /^(?:$)/i, /^(?:.)/i], - conditions: { "LINE": { "rules": [9, 10], "inclusive": false }, "struct": { "rules": [9, 10, 22, 26, 32, 39, 40, 41, 42, 51, 52, 53, 54, 68, 69, 70, 71, 72], "inclusive": false }, "FLOATING_NOTE_ID": { "rules": [61], "inclusive": false }, "FLOATING_NOTE": { "rules": [58, 59, 60], "inclusive": false }, "NOTE_TEXT": { "rules": [63, 64], "inclusive": false }, "NOTE_ID": { "rules": [62], "inclusive": false }, "NOTE": { "rules": [55, 56, 57], "inclusive": false }, "CLASS_STYLE": { "rules": [28], "inclusive": false }, "CLASS": { "rules": [27], "inclusive": false }, "CLASSDEFID": { "rules": [25], "inclusive": false }, "CLASSDEF": { "rules": [23, 24], "inclusive": false }, "acc_descr_multiline": { "rules": [20, 21], "inclusive": false }, "acc_descr": { "rules": [18], "inclusive": false }, "acc_title": { "rules": [16], "inclusive": false }, "SCALE": { "rules": [13, 14, 30, 31], "inclusive": false }, "ALIAS": { "rules": [], "inclusive": false }, "STATE_ID": { "rules": [45], "inclusive": false }, "STATE_STRING": { "rules": [46, 47], "inclusive": false }, "FORK_STATE": { "rules": [], "inclusive": false }, "STATE": { "rules": [9, 10, 33, 34, 35, 36, 37, 38, 43, 44, 48, 49, 50], "inclusive": false }, "ID": { "rules": [9, 10], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 15, 17, 19, 22, 26, 29, 32, 50, 54, 65, 66, 67, 68, 69, 70, 71, 73, 74, 75], "inclusive": true } } - }; - return lexer2; - }(); - parser2.lexer = lexer; - function Parser() { - this.yy = {}; - } - Parser.prototype = parser2; - parser2.Parser = Parser; - return new Parser(); -}(); -parser.parser = parser; -const parser$1 = parser; -const DEFAULT_DIAGRAM_DIRECTION = "LR"; -const DEFAULT_NESTED_DOC_DIR = "TB"; -const STMT_STATE = "state"; -const STMT_RELATION = "relation"; -const STMT_CLASSDEF = "classDef"; -const STMT_APPLYCLASS = "applyClass"; -const DEFAULT_STATE_TYPE = "default"; -const DIVIDER_TYPE = "divider"; -const START_NODE = "[*]"; -const START_TYPE = "start"; -const END_NODE = START_NODE; -const END_TYPE = "end"; -const COLOR_KEYWORD = "color"; -const FILL_KEYWORD = "fill"; -const BG_FILL = "bgFill"; -const STYLECLASS_SEP = ","; -function newClassesList() { - return {}; -} -let direction = DEFAULT_DIAGRAM_DIRECTION; -let rootDoc = []; -let classes = newClassesList(); -const newDoc = () => { - return { - relations: [], - states: {}, - documents: {} - }; -}; -let documents = { - root: newDoc() -}; -let currentDocument = documents.root; -let startEndCount = 0; -let dividerCnt = 0; -const lineType = { - LINE: 0, - DOTTED_LINE: 1 -}; -const relationType = { - AGGREGATION: 0, - EXTENSION: 1, - COMPOSITION: 2, - DEPENDENCY: 3 -}; -const clone = (o) => JSON.parse(JSON.stringify(o)); -const setRootDoc = (o) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_0__.l.info("Setting root doc", o); - rootDoc = o; -}; -const getRootDoc = () => rootDoc; -const docTranslator = (parent, node, first) => { - if (node.stmt === STMT_RELATION) { - docTranslator(parent, node.state1, true); - docTranslator(parent, node.state2, false); - } else { - if (node.stmt === STMT_STATE) { - if (node.id === "[*]") { - node.id = first ? parent.id + "_start" : parent.id + "_end"; - node.start = first; - } else { - node.id = node.id.trim(); - } - } - if (node.doc) { - const doc = []; - let currentDoc = []; - let i; - for (i = 0; i < node.doc.length; i++) { - if (node.doc[i].type === DIVIDER_TYPE) { - const newNode = clone(node.doc[i]); - newNode.doc = clone(currentDoc); - doc.push(newNode); - currentDoc = []; - } else { - currentDoc.push(node.doc[i]); - } - } - if (doc.length > 0 && currentDoc.length > 0) { - const newNode = { - stmt: STMT_STATE, - id: (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_0__.I)(), - type: "divider", - doc: clone(currentDoc) - }; - doc.push(clone(newNode)); - node.doc = doc; - } - node.doc.forEach((docNode) => docTranslator(node, docNode, true)); - } - } -}; -const getRootDocV2 = () => { - docTranslator({ id: "root" }, { id: "root", doc: rootDoc }, true); - return { id: "root", doc: rootDoc }; -}; -const extract = (_doc) => { - let doc; - if (_doc.doc) { - doc = _doc.doc; - } else { - doc = _doc; - } - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_0__.l.info(doc); - clear(true); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_0__.l.info("Extract", doc); - doc.forEach((item) => { - switch (item.stmt) { - case STMT_STATE: - addState( - item.id.trim(), - item.type, - item.doc, - item.description, - item.note, - item.classes, - item.styles, - item.textStyles - ); - break; - case STMT_RELATION: - addRelation(item.state1, item.state2, item.description); - break; - case STMT_CLASSDEF: - addStyleClass(item.id.trim(), item.classes); - break; - case STMT_APPLYCLASS: - setCssClass(item.id.trim(), item.styleClass); - break; - } - }); -}; -const addState = function(id, type = DEFAULT_STATE_TYPE, doc = null, descr = null, note = null, classes2 = null, styles2 = null, textStyles = null) { - const trimmedId = id == null ? void 0 : id.trim(); - if (currentDocument.states[trimmedId] === void 0) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_0__.l.info("Adding state ", trimmedId, descr); - currentDocument.states[trimmedId] = { - id: trimmedId, - descriptions: [], - type, - doc, - note, - classes: [], - styles: [], - textStyles: [] - }; - } else { - if (!currentDocument.states[trimmedId].doc) { - currentDocument.states[trimmedId].doc = doc; - } - if (!currentDocument.states[trimmedId].type) { - currentDocument.states[trimmedId].type = type; - } - } - if (descr) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_0__.l.info("Setting state description", trimmedId, descr); - if (typeof descr === "string") { - addDescription(trimmedId, descr.trim()); - } - if (typeof descr === "object") { - descr.forEach((des) => addDescription(trimmedId, des.trim())); - } - } - if (note) { - currentDocument.states[trimmedId].note = note; - currentDocument.states[trimmedId].note.text = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_0__.e.sanitizeText( - currentDocument.states[trimmedId].note.text, - (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_0__.c)() - ); - } - if (classes2) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_0__.l.info("Setting state classes", trimmedId, classes2); - const classesList = typeof classes2 === "string" ? [classes2] : classes2; - classesList.forEach((cssClass) => setCssClass(trimmedId, cssClass.trim())); - } - if (styles2) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_0__.l.info("Setting state styles", trimmedId, styles2); - const stylesList = typeof styles2 === "string" ? [styles2] : styles2; - stylesList.forEach((style) => setStyle(trimmedId, style.trim())); - } - if (textStyles) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_0__.l.info("Setting state styles", trimmedId, styles2); - const textStylesList = typeof textStyles === "string" ? [textStyles] : textStyles; - textStylesList.forEach((textStyle) => setTextStyle(trimmedId, textStyle.trim())); - } -}; -const clear = function(saveCommon) { - documents = { - root: newDoc() - }; - currentDocument = documents.root; - startEndCount = 0; - classes = newClassesList(); - if (!saveCommon) { - (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_0__.v)(); - } -}; -const getState = function(id) { - return currentDocument.states[id]; -}; -const getStates = function() { - return currentDocument.states; -}; -const logDocuments = function() { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_0__.l.info("Documents = ", documents); -}; -const getRelations = function() { - return currentDocument.relations; -}; -function startIdIfNeeded(id = "") { - let fixedId = id; - if (id === START_NODE) { - startEndCount++; - fixedId = `${START_TYPE}${startEndCount}`; - } - return fixedId; -} -function startTypeIfNeeded(id = "", type = DEFAULT_STATE_TYPE) { - return id === START_NODE ? START_TYPE : type; -} -function endIdIfNeeded(id = "") { - let fixedId = id; - if (id === END_NODE) { - startEndCount++; - fixedId = `${END_TYPE}${startEndCount}`; - } - return fixedId; -} -function endTypeIfNeeded(id = "", type = DEFAULT_STATE_TYPE) { - return id === END_NODE ? END_TYPE : type; -} -function addRelationObjs(item1, item2, relationTitle) { - let id1 = startIdIfNeeded(item1.id.trim()); - let type1 = startTypeIfNeeded(item1.id.trim(), item1.type); - let id2 = startIdIfNeeded(item2.id.trim()); - let type2 = startTypeIfNeeded(item2.id.trim(), item2.type); - addState( - id1, - type1, - item1.doc, - item1.description, - item1.note, - item1.classes, - item1.styles, - item1.textStyles - ); - addState( - id2, - type2, - item2.doc, - item2.description, - item2.note, - item2.classes, - item2.styles, - item2.textStyles - ); - currentDocument.relations.push({ - id1, - id2, - relationTitle: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_0__.e.sanitizeText(relationTitle, (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_0__.c)()) - }); -} -const addRelation = function(item1, item2, title) { - if (typeof item1 === "object") { - addRelationObjs(item1, item2, title); - } else { - const id1 = startIdIfNeeded(item1.trim()); - const type1 = startTypeIfNeeded(item1); - const id2 = endIdIfNeeded(item2.trim()); - const type2 = endTypeIfNeeded(item2); - addState(id1, type1); - addState(id2, type2); - currentDocument.relations.push({ - id1, - id2, - title: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_0__.e.sanitizeText(title, (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_0__.c)()) - }); - } -}; -const addDescription = function(id, descr) { - const theState = currentDocument.states[id]; - const _descr = descr.startsWith(":") ? descr.replace(":", "").trim() : descr; - theState.descriptions.push(_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_0__.e.sanitizeText(_descr, (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_0__.c)())); -}; -const cleanupLabel = function(label) { - if (label.substring(0, 1) === ":") { - return label.substr(2).trim(); - } else { - return label.trim(); - } -}; -const getDividerId = () => { - dividerCnt++; - return "divider-id-" + dividerCnt; -}; -const addStyleClass = function(id, styleAttributes = "") { - if (classes[id] === void 0) { - classes[id] = { id, styles: [], textStyles: [] }; - } - const foundClass = classes[id]; - if (styleAttributes !== void 0 && styleAttributes !== null) { - styleAttributes.split(STYLECLASS_SEP).forEach((attrib) => { - const fixedAttrib = attrib.replace(/([^;]*);/, "$1").trim(); - if (attrib.match(COLOR_KEYWORD)) { - const newStyle1 = fixedAttrib.replace(FILL_KEYWORD, BG_FILL); - const newStyle2 = newStyle1.replace(COLOR_KEYWORD, FILL_KEYWORD); - foundClass.textStyles.push(newStyle2); - } - foundClass.styles.push(fixedAttrib); - }); - } -}; -const getClasses = function() { - return classes; -}; -const setCssClass = function(itemIds, cssClassName) { - itemIds.split(",").forEach(function(id) { - let foundState = getState(id); - if (foundState === void 0) { - const trimmedId = id.trim(); - addState(trimmedId); - foundState = getState(trimmedId); - } - foundState.classes.push(cssClassName); - }); -}; -const setStyle = function(itemId, styleText) { - const item = getState(itemId); - if (item !== void 0) { - item.textStyles.push(styleText); - } -}; -const setTextStyle = function(itemId, cssClassName) { - const item = getState(itemId); - if (item !== void 0) { - item.textStyles.push(cssClassName); - } -}; -const getDirection = () => direction; -const setDirection = (dir) => { - direction = dir; -}; -const trimColon = (str) => str && str[0] === ":" ? str.substr(1).trim() : str.trim(); -const db = { - getConfig: () => (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_0__.c)().state, - addState, - clear, - getState, - getStates, - getRelations, - getClasses, - getDirection, - addRelation, - getDividerId, - setDirection, - cleanupLabel, - lineType, - relationType, - logDocuments, - getRootDoc, - setRootDoc, - getRootDocV2, - extract, - trimColon, - getAccTitle: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_0__.g, - setAccTitle: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_0__.s, - getAccDescription: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_0__.a, - setAccDescription: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_0__.b, - addStyleClass, - setCssClass, - addDescription, - setDiagramTitle: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_0__.q, - getDiagramTitle: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_0__.t -}; -const getStyles = (options) => ` -defs #statediagram-barbEnd { - fill: ${options.transitionColor}; - stroke: ${options.transitionColor}; - } -g.stateGroup text { - fill: ${options.nodeBorder}; - stroke: none; - font-size: 10px; -} -g.stateGroup text { - fill: ${options.textColor}; - stroke: none; - font-size: 10px; - -} -g.stateGroup .state-title { - font-weight: bolder; - fill: ${options.stateLabelColor}; -} - -g.stateGroup rect { - fill: ${options.mainBkg}; - stroke: ${options.nodeBorder}; -} - -g.stateGroup line { - stroke: ${options.lineColor}; - stroke-width: 1; -} - -.transition { - stroke: ${options.transitionColor}; - stroke-width: 1; - fill: none; -} - -.stateGroup .composit { - fill: ${options.background}; - border-bottom: 1px -} - -.stateGroup .alt-composit { - fill: #e0e0e0; - border-bottom: 1px -} - -.state-note { - stroke: ${options.noteBorderColor}; - fill: ${options.noteBkgColor}; - - text { - fill: ${options.noteTextColor}; - stroke: none; - font-size: 10px; - } -} - -.stateLabel .box { - stroke: none; - stroke-width: 0; - fill: ${options.mainBkg}; - opacity: 0.5; -} - -.edgeLabel .label rect { - fill: ${options.labelBackgroundColor}; - opacity: 0.5; -} -.edgeLabel .label text { - fill: ${options.transitionLabelColor || options.tertiaryTextColor}; -} -.label div .edgeLabel { - color: ${options.transitionLabelColor || options.tertiaryTextColor}; -} - -.stateLabel text { - fill: ${options.stateLabelColor}; - font-size: 10px; - font-weight: bold; -} - -.node circle.state-start { - fill: ${options.specialStateColor}; - stroke: ${options.specialStateColor}; -} - -.node .fork-join { - fill: ${options.specialStateColor}; - stroke: ${options.specialStateColor}; -} - -.node circle.state-end { - fill: ${options.innerEndBackground}; - stroke: ${options.background}; - stroke-width: 1.5 -} -.end-state-inner { - fill: ${options.compositeBackground || options.background}; - // stroke: ${options.background}; - stroke-width: 1.5 -} - -.node rect { - fill: ${options.stateBkg || options.mainBkg}; - stroke: ${options.stateBorder || options.nodeBorder}; - stroke-width: 1px; -} -.node polygon { - fill: ${options.mainBkg}; - stroke: ${options.stateBorder || options.nodeBorder};; - stroke-width: 1px; -} -#statediagram-barbEnd { - fill: ${options.lineColor}; -} - -.statediagram-cluster rect { - fill: ${options.compositeTitleBackground}; - stroke: ${options.stateBorder || options.nodeBorder}; - stroke-width: 1px; -} - -.cluster-label, .nodeLabel { - color: ${options.stateLabelColor}; -} - -.statediagram-cluster rect.outer { - rx: 5px; - ry: 5px; -} -.statediagram-state .divider { - stroke: ${options.stateBorder || options.nodeBorder}; -} - -.statediagram-state .title-state { - rx: 5px; - ry: 5px; -} -.statediagram-cluster.statediagram-cluster .inner { - fill: ${options.compositeBackground || options.background}; -} -.statediagram-cluster.statediagram-cluster-alt .inner { - fill: ${options.altBackground ? options.altBackground : "#efefef"}; -} - -.statediagram-cluster .inner { - rx:0; - ry:0; -} - -.statediagram-state rect.basic { - rx: 5px; - ry: 5px; -} -.statediagram-state rect.divider { - stroke-dasharray: 10,10; - fill: ${options.altBackground ? options.altBackground : "#efefef"}; -} - -.note-edge { - stroke-dasharray: 5; -} - -.statediagram-note rect { - fill: ${options.noteBkgColor}; - stroke: ${options.noteBorderColor}; - stroke-width: 1px; - rx: 0; - ry: 0; -} -.statediagram-note rect { - fill: ${options.noteBkgColor}; - stroke: ${options.noteBorderColor}; - stroke-width: 1px; - rx: 0; - ry: 0; -} - -.statediagram-note text { - fill: ${options.noteTextColor}; -} - -.statediagram-note .nodeLabel { - color: ${options.noteTextColor}; -} -.statediagram .edgeLabel { - color: red; // ${options.noteTextColor}; -} - -#dependencyStart, #dependencyEnd { - fill: ${options.lineColor}; - stroke: ${options.lineColor}; - stroke-width: 1; -} - -.statediagramTitleText { - text-anchor: middle; - font-size: 18px; - fill: ${options.textColor}; -} -`; -const styles = getStyles; - - - -/***/ }) - -}; -; \ No newline at end of file diff --git a/assets/js/141.dc6b2468.js b/assets/js/141.dc6b2468.js deleted file mode 100644 index a35b131acc96..000000000000 --- a/assets/js/141.dc6b2468.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[141],{50141:(e,t,s)=>{s.d(t,{diagram:()=>V});var o=s(27899),i=s(697),a=s(26312),r=s(86079),n=s(8995);s(74353),s(16750),s(42838),s(21176),s(14075);const d="rect",l="rectWithTitle",c="statediagram",p=`${c}-state`,b="transition",g=`${b} note-edge`,h=`${c}-note`,u=`${c}-cluster`,y=`${c}-cluster-alt`,f="parent",w="note",x="----",$=`${x}${w}`,m=`${x}${f}`,T="fill:none",S="fill: #333",k="text",v="normal";let D={},A=0;function B(e="",t=0,s="",o=x){return`state-${e}${null!==s&&s.length>0?`${o}${s}`:""}-${t}`}const L=(e,t,s,i,a,n)=>{const c=s.id,b=null==(x=i[c])?"":x.classes?x.classes.join(" "):"";var x;if("root"!==c){let t=d;!0===s.start&&(t="start"),!1===s.start&&(t="end"),s.type!==o.D&&(t=s.type),D[c]||(D[c]={id:c,shape:t,description:r.e.sanitizeText(c,(0,r.c)()),classes:`${b} ${p}`});const i=D[c];s.description&&(Array.isArray(i.description)?(i.shape=l,i.description.push(s.description)):i.description.length>0?(i.shape=l,i.description===c?i.description=[s.description]:i.description=[i.description,s.description]):(i.shape=d,i.description=s.description),i.description=r.e.sanitizeTextOrArray(i.description,(0,r.c)())),1===i.description.length&&i.shape===l&&(i.shape=d),!i.type&&s.doc&&(r.l.info("Setting cluster for ",c,E(s)),i.type="group",i.dir=E(s),i.shape=s.type===o.a?"divider":"roundedWithTitle",i.classes=i.classes+" "+u+" "+(n?y:""));const a={labelStyle:"",shape:i.shape,labelText:i.description,classes:i.classes,style:"",id:c,dir:i.dir,domId:B(c,A),type:i.type,padding:15,centerLabel:!0};if(s.note){const t={labelStyle:"",shape:"note",labelText:s.note.text,classes:h,style:"",id:c+$+"-"+A,domId:B(c,A,w),type:i.type,padding:15},o={labelStyle:"",shape:"noteGroup",labelText:s.note.text,classes:i.classes,style:"",id:c+m,domId:B(c,A,f),type:"group",padding:0};A++;const r=c+m;e.setNode(r,o),e.setNode(t.id,t),e.setNode(c,a),e.setParent(c,r),e.setParent(t.id,r);let n=c,d=t.id;"left of"===s.note.position&&(n=t.id,d=c),e.setEdge(n,d,{arrowhead:"none",arrowType:"",style:T,labelStyle:"",classes:g,arrowheadStyle:S,labelpos:"c",labelType:k,thickness:v})}else e.setNode(c,a)}t&&"root"!==t.id&&(r.l.trace("Setting node ",c," to be child of its parent ",t.id),e.setParent(c,t.id)),s.doc&&(r.l.trace("Adding nodes children "),C(e,s,s.doc,i,a,!n))},C=(e,t,s,i,a,n)=>{r.l.trace("items",s),s.forEach((s=>{switch(s.stmt){case o.b:case o.D:L(e,t,s,i,a,n);break;case o.S:{L(e,t,s.state1,i,a,n),L(e,t,s.state2,i,a,n);const o={id:"edge"+A,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:T,labelStyle:"",label:r.e.sanitizeText(s.description,(0,r.c)()),arrowheadStyle:S,labelpos:"c",labelType:k,thickness:v,classes:b};e.setEdge(s.state1.id,s.state2.id,o,A),A++}}}))},E=(e,t=o.c)=>{let s=t;if(e.doc)for(let o=0;o{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute,o.d.clear()}}}}]); \ No newline at end of file diff --git a/assets/js/144.5bfdb681.js b/assets/js/144.5bfdb681.js deleted file mode 100644 index 1e91d05dd00c..000000000000 --- a/assets/js/144.5bfdb681.js +++ /dev/null @@ -1,1323 +0,0 @@ -"use strict"; -exports.id = 144; -exports.ids = [144]; -exports.modules = { - -/***/ 82144: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ diagram: () => (/* binding */ diagram) -/* harmony export */ }); -/* harmony import */ var _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(86079); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(26312); -/* harmony import */ var _svgDrawCommon_08f97a94_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(79186); -/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(74353); -/* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(16750); -/* harmony import */ var dompurify__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(99418); - - - - - - - - - - - - -var parser = function() { - var o = function(k, v, o2, l) { - for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) - ; - return o2; - }, $V0 = [6, 8, 10, 11, 12, 14, 16, 17, 18], $V1 = [1, 9], $V2 = [1, 10], $V3 = [1, 11], $V4 = [1, 12], $V5 = [1, 13], $V6 = [1, 14]; - var parser2 = { - trace: function trace() { - }, - yy: {}, - symbols_: { "error": 2, "start": 3, "journey": 4, "document": 5, "EOF": 6, "line": 7, "SPACE": 8, "statement": 9, "NEWLINE": 10, "title": 11, "acc_title": 12, "acc_title_value": 13, "acc_descr": 14, "acc_descr_value": 15, "acc_descr_multiline_value": 16, "section": 17, "taskName": 18, "taskData": 19, "$accept": 0, "$end": 1 }, - terminals_: { 2: "error", 4: "journey", 6: "EOF", 8: "SPACE", 10: "NEWLINE", 11: "title", 12: "acc_title", 13: "acc_title_value", 14: "acc_descr", 15: "acc_descr_value", 16: "acc_descr_multiline_value", 17: "section", 18: "taskName", 19: "taskData" }, - productions_: [0, [3, 3], [5, 0], [5, 2], [7, 2], [7, 1], [7, 1], [7, 1], [9, 1], [9, 2], [9, 2], [9, 1], [9, 1], [9, 2]], - performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { - var $0 = $$.length - 1; - switch (yystate) { - case 1: - return $$[$0 - 1]; - case 2: - this.$ = []; - break; - case 3: - $$[$0 - 1].push($$[$0]); - this.$ = $$[$0 - 1]; - break; - case 4: - case 5: - this.$ = $$[$0]; - break; - case 6: - case 7: - this.$ = []; - break; - case 8: - yy.setDiagramTitle($$[$0].substr(6)); - this.$ = $$[$0].substr(6); - break; - case 9: - this.$ = $$[$0].trim(); - yy.setAccTitle(this.$); - break; - case 10: - case 11: - this.$ = $$[$0].trim(); - yy.setAccDescription(this.$); - break; - case 12: - yy.addSection($$[$0].substr(8)); - this.$ = $$[$0].substr(8); - break; - case 13: - yy.addTask($$[$0 - 1], $$[$0]); - this.$ = "task"; - break; - } - }, - table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, o($V0, [2, 2], { 5: 3 }), { 6: [1, 4], 7: 5, 8: [1, 6], 9: 7, 10: [1, 8], 11: $V1, 12: $V2, 14: $V3, 16: $V4, 17: $V5, 18: $V6 }, o($V0, [2, 7], { 1: [2, 1] }), o($V0, [2, 3]), { 9: 15, 11: $V1, 12: $V2, 14: $V3, 16: $V4, 17: $V5, 18: $V6 }, o($V0, [2, 5]), o($V0, [2, 6]), o($V0, [2, 8]), { 13: [1, 16] }, { 15: [1, 17] }, o($V0, [2, 11]), o($V0, [2, 12]), { 19: [1, 18] }, o($V0, [2, 4]), o($V0, [2, 9]), o($V0, [2, 10]), o($V0, [2, 13])], - defaultActions: {}, - parseError: function parseError(str, hash) { - if (hash.recoverable) { - this.trace(str); - } else { - var error = new Error(str); - error.hash = hash; - throw error; - } - }, - parse: function parse(input) { - var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; - var args = lstack.slice.call(arguments, 1); - var lexer2 = Object.create(this.lexer); - var sharedState = { yy: {} }; - for (var k in this.yy) { - if (Object.prototype.hasOwnProperty.call(this.yy, k)) { - sharedState.yy[k] = this.yy[k]; - } - } - lexer2.setInput(input, sharedState.yy); - sharedState.yy.lexer = lexer2; - sharedState.yy.parser = this; - if (typeof lexer2.yylloc == "undefined") { - lexer2.yylloc = {}; - } - var yyloc = lexer2.yylloc; - lstack.push(yyloc); - var ranges = lexer2.options && lexer2.options.ranges; - if (typeof sharedState.yy.parseError === "function") { - this.parseError = sharedState.yy.parseError; - } else { - this.parseError = Object.getPrototypeOf(this).parseError; - } - function lex() { - var token; - token = tstack.pop() || lexer2.lex() || EOF; - if (typeof token !== "number") { - if (token instanceof Array) { - tstack = token; - token = tstack.pop(); - } - token = self.symbols_[token] || token; - } - return token; - } - var symbol, state, action, r, yyval = {}, p, len, newState, expected; - while (true) { - state = stack[stack.length - 1]; - if (this.defaultActions[state]) { - action = this.defaultActions[state]; - } else { - if (symbol === null || typeof symbol == "undefined") { - symbol = lex(); - } - action = table[state] && table[state][symbol]; - } - if (typeof action === "undefined" || !action.length || !action[0]) { - var errStr = ""; - expected = []; - for (p in table[state]) { - if (this.terminals_[p] && p > TERROR) { - expected.push("'" + this.terminals_[p] + "'"); - } - } - if (lexer2.showPosition) { - errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; - } else { - errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); - } - this.parseError(errStr, { - text: lexer2.match, - token: this.terminals_[symbol] || symbol, - line: lexer2.yylineno, - loc: yyloc, - expected - }); - } - if (action[0] instanceof Array && action.length > 1) { - throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); - } - switch (action[0]) { - case 1: - stack.push(symbol); - vstack.push(lexer2.yytext); - lstack.push(lexer2.yylloc); - stack.push(action[1]); - symbol = null; - { - yyleng = lexer2.yyleng; - yytext = lexer2.yytext; - yylineno = lexer2.yylineno; - yyloc = lexer2.yylloc; - } - break; - case 2: - len = this.productions_[action[1]][1]; - yyval.$ = vstack[vstack.length - len]; - yyval._$ = { - first_line: lstack[lstack.length - (len || 1)].first_line, - last_line: lstack[lstack.length - 1].last_line, - first_column: lstack[lstack.length - (len || 1)].first_column, - last_column: lstack[lstack.length - 1].last_column - }; - if (ranges) { - yyval._$.range = [ - lstack[lstack.length - (len || 1)].range[0], - lstack[lstack.length - 1].range[1] - ]; - } - r = this.performAction.apply(yyval, [ - yytext, - yyleng, - yylineno, - sharedState.yy, - action[1], - vstack, - lstack - ].concat(args)); - if (typeof r !== "undefined") { - return r; - } - if (len) { - stack = stack.slice(0, -1 * len * 2); - vstack = vstack.slice(0, -1 * len); - lstack = lstack.slice(0, -1 * len); - } - stack.push(this.productions_[action[1]][0]); - vstack.push(yyval.$); - lstack.push(yyval._$); - newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; - stack.push(newState); - break; - case 3: - return true; - } - } - return true; - } - }; - var lexer = function() { - var lexer2 = { - EOF: 1, - parseError: function parseError(str, hash) { - if (this.yy.parser) { - this.yy.parser.parseError(str, hash); - } else { - throw new Error(str); - } - }, - // resets the lexer, sets new input - setInput: function(input, yy) { - this.yy = yy || this.yy || {}; - this._input = input; - this._more = this._backtrack = this.done = false; - this.yylineno = this.yyleng = 0; - this.yytext = this.matched = this.match = ""; - this.conditionStack = ["INITIAL"]; - this.yylloc = { - first_line: 1, - first_column: 0, - last_line: 1, - last_column: 0 - }; - if (this.options.ranges) { - this.yylloc.range = [0, 0]; - } - this.offset = 0; - return this; - }, - // consumes and returns one char from the input - input: function() { - var ch = this._input[0]; - this.yytext += ch; - this.yyleng++; - this.offset++; - this.match += ch; - this.matched += ch; - var lines = ch.match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno++; - this.yylloc.last_line++; - } else { - this.yylloc.last_column++; - } - if (this.options.ranges) { - this.yylloc.range[1]++; - } - this._input = this._input.slice(1); - return ch; - }, - // unshifts one char (or a string) into the input - unput: function(ch) { - var len = ch.length; - var lines = ch.split(/(?:\r\n?|\n)/g); - this._input = ch + this._input; - this.yytext = this.yytext.substr(0, this.yytext.length - len); - this.offset -= len; - var oldLines = this.match.split(/(?:\r\n?|\n)/g); - this.match = this.match.substr(0, this.match.length - 1); - this.matched = this.matched.substr(0, this.matched.length - 1); - if (lines.length - 1) { - this.yylineno -= lines.length - 1; - } - var r = this.yylloc.range; - this.yylloc = { - first_line: this.yylloc.first_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.first_column, - last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len - }; - if (this.options.ranges) { - this.yylloc.range = [r[0], r[0] + this.yyleng - len]; - } - this.yyleng = this.yytext.length; - return this; - }, - // When called from action, caches matched text and appends it on next action - more: function() { - this._more = true; - return this; - }, - // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. - reject: function() { - if (this.options.backtrack_lexer) { - this._backtrack = true; - } else { - return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), { - text: "", - token: null, - line: this.yylineno - }); - } - return this; - }, - // retain first n characters of the match - less: function(n) { - this.unput(this.match.slice(n)); - }, - // displays already matched input, i.e. for error messages - pastInput: function() { - var past = this.matched.substr(0, this.matched.length - this.match.length); - return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); - }, - // displays upcoming input, i.e. for error messages - upcomingInput: function() { - var next = this.match; - if (next.length < 20) { - next += this._input.substr(0, 20 - next.length); - } - return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); - }, - // displays the character position where the lexing error occurred, i.e. for error messages - showPosition: function() { - var pre = this.pastInput(); - var c = new Array(pre.length + 1).join("-"); - return pre + this.upcomingInput() + "\n" + c + "^"; - }, - // test the lexed token: return FALSE when not a match, otherwise return token - test_match: function(match, indexed_rule) { - var token, lines, backup; - if (this.options.backtrack_lexer) { - backup = { - yylineno: this.yylineno, - yylloc: { - first_line: this.yylloc.first_line, - last_line: this.last_line, - first_column: this.yylloc.first_column, - last_column: this.yylloc.last_column - }, - yytext: this.yytext, - match: this.match, - matches: this.matches, - matched: this.matched, - yyleng: this.yyleng, - offset: this.offset, - _more: this._more, - _input: this._input, - yy: this.yy, - conditionStack: this.conditionStack.slice(0), - done: this.done - }; - if (this.options.ranges) { - backup.yylloc.range = this.yylloc.range.slice(0); - } - } - lines = match[0].match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno += lines.length; - } - this.yylloc = { - first_line: this.yylloc.last_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.last_column, - last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length - }; - this.yytext += match[0]; - this.match += match[0]; - this.matches = match; - this.yyleng = this.yytext.length; - if (this.options.ranges) { - this.yylloc.range = [this.offset, this.offset += this.yyleng]; - } - this._more = false; - this._backtrack = false; - this._input = this._input.slice(match[0].length); - this.matched += match[0]; - token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); - if (this.done && this._input) { - this.done = false; - } - if (token) { - return token; - } else if (this._backtrack) { - for (var k in backup) { - this[k] = backup[k]; - } - return false; - } - return false; - }, - // return next match in input - next: function() { - if (this.done) { - return this.EOF; - } - if (!this._input) { - this.done = true; - } - var token, match, tempMatch, index; - if (!this._more) { - this.yytext = ""; - this.match = ""; - } - var rules = this._currentRules(); - for (var i = 0; i < rules.length; i++) { - tempMatch = this._input.match(this.rules[rules[i]]); - if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { - match = tempMatch; - index = i; - if (this.options.backtrack_lexer) { - token = this.test_match(tempMatch, rules[i]); - if (token !== false) { - return token; - } else if (this._backtrack) { - match = false; - continue; - } else { - return false; - } - } else if (!this.options.flex) { - break; - } - } - } - if (match) { - token = this.test_match(match, rules[index]); - if (token !== false) { - return token; - } - return false; - } - if (this._input === "") { - return this.EOF; - } else { - return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { - text: "", - token: null, - line: this.yylineno - }); - } - }, - // return next match that has a token - lex: function lex() { - var r = this.next(); - if (r) { - return r; - } else { - return this.lex(); - } - }, - // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) - begin: function begin(condition) { - this.conditionStack.push(condition); - }, - // pop the previously active lexer condition state off the condition stack - popState: function popState() { - var n = this.conditionStack.length - 1; - if (n > 0) { - return this.conditionStack.pop(); - } else { - return this.conditionStack[0]; - } - }, - // produce the lexer rule set which is active for the currently active lexer condition state - _currentRules: function _currentRules() { - if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { - return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; - } else { - return this.conditions["INITIAL"].rules; - } - }, - // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available - topState: function topState(n) { - n = this.conditionStack.length - 1 - Math.abs(n || 0); - if (n >= 0) { - return this.conditionStack[n]; - } else { - return "INITIAL"; - } - }, - // alias for begin(condition) - pushState: function pushState(condition) { - this.begin(condition); - }, - // return the number of states currently on the stack - stateStackSize: function stateStackSize() { - return this.conditionStack.length; - }, - options: { "case-insensitive": true }, - performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { - switch ($avoiding_name_collisions) { - case 0: - break; - case 1: - break; - case 2: - return 10; - case 3: - break; - case 4: - break; - case 5: - return 4; - case 6: - return 11; - case 7: - this.begin("acc_title"); - return 12; - case 8: - this.popState(); - return "acc_title_value"; - case 9: - this.begin("acc_descr"); - return 14; - case 10: - this.popState(); - return "acc_descr_value"; - case 11: - this.begin("acc_descr_multiline"); - break; - case 12: - this.popState(); - break; - case 13: - return "acc_descr_multiline_value"; - case 14: - return 17; - case 15: - return 18; - case 16: - return 19; - case 17: - return ":"; - case 18: - return 6; - case 19: - return "INVALID"; - } - }, - rules: [/^(?:%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:#[^\n]*)/i, /^(?:journey\b)/i, /^(?:title\s[^#\n;]+)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:section\s[^#:\n;]+)/i, /^(?:[^#:\n;]+)/i, /^(?::[^#\n;]+)/i, /^(?::)/i, /^(?:$)/i, /^(?:.)/i], - conditions: { "acc_descr_multiline": { "rules": [12, 13], "inclusive": false }, "acc_descr": { "rules": [10], "inclusive": false }, "acc_title": { "rules": [8], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 3, 4, 5, 6, 7, 9, 11, 14, 15, 16, 17, 18, 19], "inclusive": true } } - }; - return lexer2; - }(); - parser2.lexer = lexer; - function Parser() { - this.yy = {}; - } - Parser.prototype = parser2; - parser2.Parser = Parser; - return new Parser(); -}(); -parser.parser = parser; -const parser$1 = parser; -let currentSection = ""; -const sections = []; -const tasks = []; -const rawTasks = []; -const clear = function() { - sections.length = 0; - tasks.length = 0; - currentSection = ""; - rawTasks.length = 0; - (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.v)(); -}; -const addSection = function(txt) { - currentSection = txt; - sections.push(txt); -}; -const getSections = function() { - return sections; -}; -const getTasks = function() { - let allItemsProcessed = compileTasks(); - const maxDepth = 100; - let iterationCount = 0; - while (!allItemsProcessed && iterationCount < maxDepth) { - allItemsProcessed = compileTasks(); - iterationCount++; - } - tasks.push(...rawTasks); - return tasks; -}; -const updateActors = function() { - const tempActors = []; - tasks.forEach((task) => { - if (task.people) { - tempActors.push(...task.people); - } - }); - const unique = new Set(tempActors); - return [...unique].sort(); -}; -const addTask = function(descr, taskData) { - const pieces = taskData.substr(1).split(":"); - let score = 0; - let peeps = []; - if (pieces.length === 1) { - score = Number(pieces[0]); - peeps = []; - } else { - score = Number(pieces[0]); - peeps = pieces[1].split(","); - } - const peopleList = peeps.map((s) => s.trim()); - const rawTask = { - section: currentSection, - type: currentSection, - people: peopleList, - task: descr, - score - }; - rawTasks.push(rawTask); -}; -const addTaskOrg = function(descr) { - const newTask = { - section: currentSection, - type: currentSection, - description: descr, - task: descr, - classes: [] - }; - tasks.push(newTask); -}; -const compileTasks = function() { - const compileTask = function(pos) { - return rawTasks[pos].processed; - }; - let allProcessed = true; - for (const [i, rawTask] of rawTasks.entries()) { - compileTask(i); - allProcessed = allProcessed && rawTask.processed; - } - return allProcessed; -}; -const getActors = function() { - return updateActors(); -}; -const db = { - getConfig: () => (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.c)().journey, - clear, - setDiagramTitle: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.q, - getDiagramTitle: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.t, - setAccTitle: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.s, - getAccTitle: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.g, - setAccDescription: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.b, - getAccDescription: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.a, - addSection, - getSections, - getTasks, - addTask, - addTaskOrg, - getActors -}; -const getStyles = (options) => `.label { - font-family: 'trebuchet ms', verdana, arial, sans-serif; - font-family: var(--mermaid-font-family); - color: ${options.textColor}; - } - .mouth { - stroke: #666; - } - - line { - stroke: ${options.textColor} - } - - .legend { - fill: ${options.textColor}; - } - - .label text { - fill: #333; - } - .label { - color: ${options.textColor} - } - - .face { - ${options.faceColor ? `fill: ${options.faceColor}` : "fill: #FFF8DC"}; - stroke: #999; - } - - .node rect, - .node circle, - .node ellipse, - .node polygon, - .node path { - fill: ${options.mainBkg}; - stroke: ${options.nodeBorder}; - stroke-width: 1px; - } - - .node .label { - text-align: center; - } - .node.clickable { - cursor: pointer; - } - - .arrowheadPath { - fill: ${options.arrowheadColor}; - } - - .edgePath .path { - stroke: ${options.lineColor}; - stroke-width: 1.5px; - } - - .flowchart-link { - stroke: ${options.lineColor}; - fill: none; - } - - .edgeLabel { - background-color: ${options.edgeLabelBackground}; - rect { - opacity: 0.5; - } - text-align: center; - } - - .cluster rect { - } - - .cluster text { - fill: ${options.titleColor}; - } - - div.mermaidTooltip { - position: absolute; - text-align: center; - max-width: 200px; - padding: 2px; - font-family: 'trebuchet ms', verdana, arial, sans-serif; - font-family: var(--mermaid-font-family); - font-size: 12px; - background: ${options.tertiaryColor}; - border: 1px solid ${options.border2}; - border-radius: 2px; - pointer-events: none; - z-index: 100; - } - - .task-type-0, .section-type-0 { - ${options.fillType0 ? `fill: ${options.fillType0}` : ""}; - } - .task-type-1, .section-type-1 { - ${options.fillType0 ? `fill: ${options.fillType1}` : ""}; - } - .task-type-2, .section-type-2 { - ${options.fillType0 ? `fill: ${options.fillType2}` : ""}; - } - .task-type-3, .section-type-3 { - ${options.fillType0 ? `fill: ${options.fillType3}` : ""}; - } - .task-type-4, .section-type-4 { - ${options.fillType0 ? `fill: ${options.fillType4}` : ""}; - } - .task-type-5, .section-type-5 { - ${options.fillType0 ? `fill: ${options.fillType5}` : ""}; - } - .task-type-6, .section-type-6 { - ${options.fillType0 ? `fill: ${options.fillType6}` : ""}; - } - .task-type-7, .section-type-7 { - ${options.fillType0 ? `fill: ${options.fillType7}` : ""}; - } - - .actor-0 { - ${options.actor0 ? `fill: ${options.actor0}` : ""}; - } - .actor-1 { - ${options.actor1 ? `fill: ${options.actor1}` : ""}; - } - .actor-2 { - ${options.actor2 ? `fill: ${options.actor2}` : ""}; - } - .actor-3 { - ${options.actor3 ? `fill: ${options.actor3}` : ""}; - } - .actor-4 { - ${options.actor4 ? `fill: ${options.actor4}` : ""}; - } - .actor-5 { - ${options.actor5 ? `fill: ${options.actor5}` : ""}; - } -`; -const styles = getStyles; -const drawRect = function(elem, rectData) { - return (0,_svgDrawCommon_08f97a94_js__WEBPACK_IMPORTED_MODULE_5__.d)(elem, rectData); -}; -const drawFace = function(element, faceData) { - const radius = 15; - const circleElement = element.append("circle").attr("cx", faceData.cx).attr("cy", faceData.cy).attr("class", "face").attr("r", radius).attr("stroke-width", 2).attr("overflow", "visible"); - const face = element.append("g"); - face.append("circle").attr("cx", faceData.cx - radius / 3).attr("cy", faceData.cy - radius / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666"); - face.append("circle").attr("cx", faceData.cx + radius / 3).attr("cy", faceData.cy - radius / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666"); - function smile(face2) { - const arc$1 = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .arc */ .JLW)().startAngle(Math.PI / 2).endAngle(3 * (Math.PI / 2)).innerRadius(radius / 2).outerRadius(radius / 2.2); - face2.append("path").attr("class", "mouth").attr("d", arc$1).attr("transform", "translate(" + faceData.cx + "," + (faceData.cy + 2) + ")"); - } - function sad(face2) { - const arc$1 = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .arc */ .JLW)().startAngle(3 * Math.PI / 2).endAngle(5 * (Math.PI / 2)).innerRadius(radius / 2).outerRadius(radius / 2.2); - face2.append("path").attr("class", "mouth").attr("d", arc$1).attr("transform", "translate(" + faceData.cx + "," + (faceData.cy + 7) + ")"); - } - function ambivalent(face2) { - face2.append("line").attr("class", "mouth").attr("stroke", 2).attr("x1", faceData.cx - 5).attr("y1", faceData.cy + 7).attr("x2", faceData.cx + 5).attr("y2", faceData.cy + 7).attr("class", "mouth").attr("stroke-width", "1px").attr("stroke", "#666"); - } - if (faceData.score > 3) { - smile(face); - } else if (faceData.score < 3) { - sad(face); - } else { - ambivalent(face); - } - return circleElement; -}; -const drawCircle = function(element, circleData) { - const circleElement = element.append("circle"); - circleElement.attr("cx", circleData.cx); - circleElement.attr("cy", circleData.cy); - circleElement.attr("class", "actor-" + circleData.pos); - circleElement.attr("fill", circleData.fill); - circleElement.attr("stroke", circleData.stroke); - circleElement.attr("r", circleData.r); - if (circleElement.class !== void 0) { - circleElement.attr("class", circleElement.class); - } - if (circleData.title !== void 0) { - circleElement.append("title").text(circleData.title); - } - return circleElement; -}; -const drawText = function(elem, textData) { - return (0,_svgDrawCommon_08f97a94_js__WEBPACK_IMPORTED_MODULE_5__.f)(elem, textData); -}; -const drawLabel = function(elem, txtObject) { - function genPoints(x, y, width, height, cut) { - return x + "," + y + " " + (x + width) + "," + y + " " + (x + width) + "," + (y + height - cut) + " " + (x + width - cut * 1.2) + "," + (y + height) + " " + x + "," + (y + height); - } - const polygon = elem.append("polygon"); - polygon.attr("points", genPoints(txtObject.x, txtObject.y, 50, 20, 7)); - polygon.attr("class", "labelBox"); - txtObject.y = txtObject.y + txtObject.labelMargin; - txtObject.x = txtObject.x + 0.5 * txtObject.labelMargin; - drawText(elem, txtObject); -}; -const drawSection = function(elem, section, conf2) { - const g = elem.append("g"); - const rect = (0,_svgDrawCommon_08f97a94_js__WEBPACK_IMPORTED_MODULE_5__.g)(); - rect.x = section.x; - rect.y = section.y; - rect.fill = section.fill; - rect.width = conf2.width * section.taskCount + // width of the tasks - conf2.diagramMarginX * (section.taskCount - 1); - rect.height = conf2.height; - rect.class = "journey-section section-type-" + section.num; - rect.rx = 3; - rect.ry = 3; - drawRect(g, rect); - _drawTextCandidateFunc(conf2)( - section.text, - g, - rect.x, - rect.y, - rect.width, - rect.height, - { class: "journey-section section-type-" + section.num }, - conf2, - section.colour - ); -}; -let taskCount = -1; -const drawTask = function(elem, task, conf2) { - const center = task.x + conf2.width / 2; - const g = elem.append("g"); - taskCount++; - const maxHeight = 300 + 5 * 30; - g.append("line").attr("id", "task" + taskCount).attr("x1", center).attr("y1", task.y).attr("x2", center).attr("y2", maxHeight).attr("class", "task-line").attr("stroke-width", "1px").attr("stroke-dasharray", "4 2").attr("stroke", "#666"); - drawFace(g, { - cx: center, - cy: 300 + (5 - task.score) * 30, - score: task.score - }); - const rect = (0,_svgDrawCommon_08f97a94_js__WEBPACK_IMPORTED_MODULE_5__.g)(); - rect.x = task.x; - rect.y = task.y; - rect.fill = task.fill; - rect.width = conf2.width; - rect.height = conf2.height; - rect.class = "task task-type-" + task.num; - rect.rx = 3; - rect.ry = 3; - drawRect(g, rect); - let xPos = task.x + 14; - task.people.forEach((person) => { - const colour = task.actors[person].color; - const circle = { - cx: xPos, - cy: task.y, - r: 7, - fill: colour, - stroke: "#000", - title: person, - pos: task.actors[person].position - }; - drawCircle(g, circle); - xPos += 10; - }); - _drawTextCandidateFunc(conf2)( - task.task, - g, - rect.x, - rect.y, - rect.width, - rect.height, - { class: "task" }, - conf2, - task.colour - ); -}; -const drawBackgroundRect = function(elem, bounds2) { - (0,_svgDrawCommon_08f97a94_js__WEBPACK_IMPORTED_MODULE_5__.a)(elem, bounds2); -}; -const _drawTextCandidateFunc = function() { - function byText(content, g, x, y, width, height, textAttrs, colour) { - const text = g.append("text").attr("x", x + width / 2).attr("y", y + height / 2 + 5).style("font-color", colour).style("text-anchor", "middle").text(content); - _setTextAttrs(text, textAttrs); - } - function byTspan(content, g, x, y, width, height, textAttrs, conf2, colour) { - const { taskFontSize, taskFontFamily } = conf2; - const lines = content.split(//gi); - for (let i = 0; i < lines.length; i++) { - const dy = i * taskFontSize - taskFontSize * (lines.length - 1) / 2; - const text = g.append("text").attr("x", x + width / 2).attr("y", y).attr("fill", colour).style("text-anchor", "middle").style("font-size", taskFontSize).style("font-family", taskFontFamily); - text.append("tspan").attr("x", x + width / 2).attr("dy", dy).text(lines[i]); - text.attr("y", y + height / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"); - _setTextAttrs(text, textAttrs); - } - } - function byFo(content, g, x, y, width, height, textAttrs, conf2) { - const body = g.append("switch"); - const f = body.append("foreignObject").attr("x", x).attr("y", y).attr("width", width).attr("height", height).attr("position", "fixed"); - const text = f.append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%"); - text.append("div").attr("class", "label").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(content); - byTspan(content, body, x, y, width, height, textAttrs, conf2); - _setTextAttrs(text, textAttrs); - } - function _setTextAttrs(toText, fromTextAttrsDict) { - for (const key in fromTextAttrsDict) { - if (key in fromTextAttrsDict) { - toText.attr(key, fromTextAttrsDict[key]); - } - } - } - return function(conf2) { - return conf2.textPlacement === "fo" ? byFo : conf2.textPlacement === "old" ? byText : byTspan; - }; -}(); -const initGraphics = function(graphics) { - graphics.append("defs").append("marker").attr("id", "arrowhead").attr("refX", 5).attr("refY", 2).attr("markerWidth", 6).attr("markerHeight", 4).attr("orient", "auto").append("path").attr("d", "M 0,0 V 4 L6,2 Z"); -}; -const svgDraw = { - drawRect, - drawCircle, - drawSection, - drawText, - drawLabel, - drawTask, - drawBackgroundRect, - initGraphics -}; -const setConf = function(cnf) { - const keys = Object.keys(cnf); - keys.forEach(function(key) { - conf[key] = cnf[key]; - }); -}; -const actors = {}; -function drawActorLegend(diagram2) { - const conf2 = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.c)().journey; - let yPos = 60; - Object.keys(actors).forEach((person) => { - const colour = actors[person].color; - const circleData = { - cx: 20, - cy: yPos, - r: 7, - fill: colour, - stroke: "#000", - pos: actors[person].position - }; - svgDraw.drawCircle(diagram2, circleData); - const labelData = { - x: 40, - y: yPos + 7, - fill: "#666", - text: person, - textMargin: conf2.boxTextMargin | 5 - }; - svgDraw.drawText(diagram2, labelData); - yPos += 20; - }); -} -const conf = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.c)().journey; -const LEFT_MARGIN = conf.leftMargin; -const draw = function(text, id, version, diagObj) { - const conf2 = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.c)().journey; - const securityLevel = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.c)().securityLevel; - let sandboxElement; - if (securityLevel === "sandbox") { - sandboxElement = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)("#i" + id); - } - const root = securityLevel === "sandbox" ? (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(sandboxElement.nodes()[0].contentDocument.body) : (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)("body"); - bounds.init(); - const diagram2 = root.select("#" + id); - svgDraw.initGraphics(diagram2); - const tasks2 = diagObj.db.getTasks(); - const title = diagObj.db.getDiagramTitle(); - const actorNames = diagObj.db.getActors(); - for (const member in actors) { - delete actors[member]; - } - let actorPos = 0; - actorNames.forEach((actorName) => { - actors[actorName] = { - color: conf2.actorColours[actorPos % conf2.actorColours.length], - position: actorPos - }; - actorPos++; - }); - drawActorLegend(diagram2); - bounds.insert(0, 0, LEFT_MARGIN, Object.keys(actors).length * 50); - drawTasks(diagram2, tasks2, 0); - const box = bounds.getBounds(); - if (title) { - diagram2.append("text").text(title).attr("x", LEFT_MARGIN).attr("font-size", "4ex").attr("font-weight", "bold").attr("y", 25); - } - const height = box.stopy - box.starty + 2 * conf2.diagramMarginY; - const width = LEFT_MARGIN + box.stopx + 2 * conf2.diagramMarginX; - (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.i)(diagram2, height, width, conf2.useMaxWidth); - diagram2.append("line").attr("x1", LEFT_MARGIN).attr("y1", conf2.height * 4).attr("x2", width - LEFT_MARGIN - 4).attr("y2", conf2.height * 4).attr("stroke-width", 4).attr("stroke", "black").attr("marker-end", "url(#arrowhead)"); - const extraVertForTitle = title ? 70 : 0; - diagram2.attr("viewBox", `${box.startx} -25 ${width} ${height + extraVertForTitle}`); - diagram2.attr("preserveAspectRatio", "xMinYMin meet"); - diagram2.attr("height", height + extraVertForTitle + 25); -}; -const bounds = { - data: { - startx: void 0, - stopx: void 0, - starty: void 0, - stopy: void 0 - }, - verticalPos: 0, - sequenceItems: [], - init: function() { - this.sequenceItems = []; - this.data = { - startx: void 0, - stopx: void 0, - starty: void 0, - stopy: void 0 - }; - this.verticalPos = 0; - }, - updateVal: function(obj, key, val, fun) { - if (obj[key] === void 0) { - obj[key] = val; - } else { - obj[key] = fun(val, obj[key]); - } - }, - updateBounds: function(startx, starty, stopx, stopy) { - const conf2 = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.c)().journey; - const _self = this; - let cnt = 0; - function updateFn(type) { - return function updateItemBounds(item) { - cnt++; - const n = _self.sequenceItems.length - cnt + 1; - _self.updateVal(item, "starty", starty - n * conf2.boxMargin, Math.min); - _self.updateVal(item, "stopy", stopy + n * conf2.boxMargin, Math.max); - _self.updateVal(bounds.data, "startx", startx - n * conf2.boxMargin, Math.min); - _self.updateVal(bounds.data, "stopx", stopx + n * conf2.boxMargin, Math.max); - if (!(type === "activation")) { - _self.updateVal(item, "startx", startx - n * conf2.boxMargin, Math.min); - _self.updateVal(item, "stopx", stopx + n * conf2.boxMargin, Math.max); - _self.updateVal(bounds.data, "starty", starty - n * conf2.boxMargin, Math.min); - _self.updateVal(bounds.data, "stopy", stopy + n * conf2.boxMargin, Math.max); - } - }; - } - this.sequenceItems.forEach(updateFn()); - }, - insert: function(startx, starty, stopx, stopy) { - const _startx = Math.min(startx, stopx); - const _stopx = Math.max(startx, stopx); - const _starty = Math.min(starty, stopy); - const _stopy = Math.max(starty, stopy); - this.updateVal(bounds.data, "startx", _startx, Math.min); - this.updateVal(bounds.data, "starty", _starty, Math.min); - this.updateVal(bounds.data, "stopx", _stopx, Math.max); - this.updateVal(bounds.data, "stopy", _stopy, Math.max); - this.updateBounds(_startx, _starty, _stopx, _stopy); - }, - bumpVerticalPos: function(bump) { - this.verticalPos = this.verticalPos + bump; - this.data.stopy = this.verticalPos; - }, - getVerticalPos: function() { - return this.verticalPos; - }, - getBounds: function() { - return this.data; - } -}; -const fills = conf.sectionFills; -const textColours = conf.sectionColours; -const drawTasks = function(diagram2, tasks2, verticalPos) { - const conf2 = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.c)().journey; - let lastSection = ""; - const sectionVHeight = conf2.height * 2 + conf2.diagramMarginY; - const taskPos = verticalPos + sectionVHeight; - let sectionNumber = 0; - let fill = "#CCC"; - let colour = "black"; - let num = 0; - for (const [i, task] of tasks2.entries()) { - if (lastSection !== task.section) { - fill = fills[sectionNumber % fills.length]; - num = sectionNumber % fills.length; - colour = textColours[sectionNumber % textColours.length]; - let taskInSectionCount = 0; - const currentSection2 = task.section; - for (let taskIndex = i; taskIndex < tasks2.length; taskIndex++) { - if (tasks2[taskIndex].section == currentSection2) { - taskInSectionCount = taskInSectionCount + 1; - } else { - break; - } - } - const section = { - x: i * conf2.taskMargin + i * conf2.width + LEFT_MARGIN, - y: 50, - text: task.section, - fill, - num, - colour, - taskCount: taskInSectionCount - }; - svgDraw.drawSection(diagram2, section, conf2); - lastSection = task.section; - sectionNumber++; - } - const taskActors = task.people.reduce((acc, actorName) => { - if (actors[actorName]) { - acc[actorName] = actors[actorName]; - } - return acc; - }, {}); - task.x = i * conf2.taskMargin + i * conf2.width + LEFT_MARGIN; - task.y = taskPos; - task.width = conf2.diagramMarginX; - task.height = conf2.diagramMarginY; - task.colour = colour; - task.fill = fill; - task.num = num; - task.actors = taskActors; - svgDraw.drawTask(diagram2, task, conf2); - bounds.insert(task.x, task.y, task.x + task.width + conf2.taskMargin, 300 + 5 * 30); - } -}; -const renderer = { - setConf, - draw -}; -const diagram = { - parser: parser$1, - db, - renderer, - styles, - init: (cnf) => { - renderer.setConf(cnf.journey); - db.clear(); - } -}; - - - -/***/ }), - -/***/ 79186: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ a: () => (/* binding */ drawBackgroundRect), -/* harmony export */ b: () => (/* binding */ drawEmbeddedImage), -/* harmony export */ c: () => (/* binding */ drawImage), -/* harmony export */ d: () => (/* binding */ drawRect), -/* harmony export */ e: () => (/* binding */ getTextObj), -/* harmony export */ f: () => (/* binding */ drawText), -/* harmony export */ g: () => (/* binding */ getNoteRect) -/* harmony export */ }); -/* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(16750); -/* harmony import */ var _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(86079); - - -const drawRect = (element, rectData) => { - const rectElement = element.append("rect"); - rectElement.attr("x", rectData.x); - rectElement.attr("y", rectData.y); - rectElement.attr("fill", rectData.fill); - rectElement.attr("stroke", rectData.stroke); - rectElement.attr("width", rectData.width); - rectElement.attr("height", rectData.height); - if (rectData.name) { - rectElement.attr("name", rectData.name); - } - rectData.rx !== void 0 && rectElement.attr("rx", rectData.rx); - rectData.ry !== void 0 && rectElement.attr("ry", rectData.ry); - if (rectData.attrs !== void 0) { - for (const attrKey in rectData.attrs) { - rectElement.attr(attrKey, rectData.attrs[attrKey]); - } - } - rectData.class !== void 0 && rectElement.attr("class", rectData.class); - return rectElement; -}; -const drawBackgroundRect = (element, bounds) => { - const rectData = { - x: bounds.startx, - y: bounds.starty, - width: bounds.stopx - bounds.startx, - height: bounds.stopy - bounds.starty, - fill: bounds.fill, - stroke: bounds.stroke, - class: "rect" - }; - const rectElement = drawRect(element, rectData); - rectElement.lower(); -}; -const drawText = (element, textData) => { - const nText = textData.text.replace(_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.J, " "); - const textElem = element.append("text"); - textElem.attr("x", textData.x); - textElem.attr("y", textData.y); - textElem.attr("class", "legend"); - textElem.style("text-anchor", textData.anchor); - textData.class !== void 0 && textElem.attr("class", textData.class); - const tspan = textElem.append("tspan"); - tspan.attr("x", textData.x + textData.textMargin * 2); - tspan.text(nText); - return textElem; -}; -const drawImage = (elem, x, y, link) => { - const imageElement = elem.append("image"); - imageElement.attr("x", x); - imageElement.attr("y", y); - const sanitizedLink = (0,_braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_0__/* .sanitizeUrl */ .Jf)(link); - imageElement.attr("xlink:href", sanitizedLink); -}; -const drawEmbeddedImage = (element, x, y, link) => { - const imageElement = element.append("use"); - imageElement.attr("x", x); - imageElement.attr("y", y); - const sanitizedLink = (0,_braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_0__/* .sanitizeUrl */ .Jf)(link); - imageElement.attr("xlink:href", `#${sanitizedLink}`); -}; -const getNoteRect = () => { - const noteRectData = { - x: 0, - y: 0, - width: 100, - height: 100, - fill: "#EDF2AE", - stroke: "#666", - anchor: "start", - rx: 0, - ry: 0 - }; - return noteRectData; -}; -const getTextObj = () => { - const testObject = { - x: 0, - y: 0, - width: 100, - height: 100, - "text-anchor": "start", - style: "#666", - textMargin: 0, - rx: 0, - ry: 0, - tspan: true - }; - return testObject; -}; - - - -/***/ }) - -}; -; \ No newline at end of file diff --git a/assets/js/145746f5.1447e8a3.js b/assets/js/145746f5.1447e8a3.js deleted file mode 100644 index 83c34b0cc329..000000000000 --- a/assets/js/145746f5.1447e8a3.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6789],{3734:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>d,default:()=>x,frontMatter:()=>l,metadata:()=>o,toc:()=>h});var r=t(74848),s=t(28453),a=t(11470),i=t(19365);const l={id:"maintain-polkadot-parameters",title:"Polkadot Parameters",sidebar_label:"Parameters",description:"A description about fundamental Polkadot parameters.",keywords:["parameters","actions","attributes","behaviors"],slug:"../maintain-polkadot-parameters"},d=void 0,o={id:"maintain/maintain-polkadot-parameters",title:"Polkadot Parameters",description:"A description about fundamental Polkadot parameters.",source:"@site/../docs/maintain/maintain-polkadot-parameters.md",sourceDirName:"maintain",slug:"/maintain-polkadot-parameters",permalink:"/docs/maintain-polkadot-parameters",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/maintain/maintain-polkadot-parameters.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1727943421e3,frontMatter:{id:"maintain-polkadot-parameters",title:"Polkadot Parameters",sidebar_label:"Parameters",description:"A description about fundamental Polkadot parameters.",keywords:["parameters","actions","attributes","behaviors"],slug:"../maintain-polkadot-parameters"},sidebar:"docs",previous:{title:"Network Maintainers",permalink:"/docs/maintain-index"},next:{title:"Nodes and Dapps",permalink:"/docs/maintain-node-index"}},c={},h=[{value:"Periods of common actions and attributes",id:"periods-of-common-actions-and-attributes",level:3},{value:"Governance",id:"governance",level:3},{value:"Staking, Validating, and Nominating",id:"staking-validating-and-nominating",level:3},{value:"Treasury",id:"treasury",level:3},{value:"Precision",id:"precision",level:3}];function u(e){const n={a:"a",code:"code",em:"em",h3:"h3",li:"li",p:"p",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,s.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(n.p,{children:["Many of these parameter values can be updated via on-chain governance. If you require absolute\ncertainty of these parameter values, it is recommended you directly check the constants by looking\nat the ",(0,r.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/chainstate/constants",children:"chain state"})," and/or\n",(0,r.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/chainstate",children:"storage"}),"."]}),"\n",(0,r.jsx)(n.h3,{id:"periods-of-common-actions-and-attributes",children:"Periods of common actions and attributes"}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.em,{children:"NOTE: Polkadot generally runs at \xbcth the speed of Kusama, except in the time slot duration\nitself."})}),"\n",(0,r.jsxs)(a.A,{groupId:"periods",values:[{label:"Polkadot",value:"polkadot"},{label:"Kusama",value:"kusama"}],children:[(0,r.jsxs)(i.A,{value:"polkadot",children:[(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Slot: 6 seconds *(generally one block per slot, although see note below)"}),"\n",(0,r.jsx)(n.li,{children:"Epoch: 4 hours (2_400 slots x 6 seconds)"}),"\n",(0,r.jsx)(n.li,{children:"Session: 4 hours (Session and Epoch lengths are the same)"}),"\n",(0,r.jsx)(n.li,{children:"Era: 24 hours (6 sessions per Era, 2_400 slots x 6 epochs x 6 seconds)"}),"\n"]}),(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Polkadot"}),(0,r.jsx)(n.th,{children:"Time"}),(0,r.jsx)(n.th,{children:"Slots*"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Slot"}),(0,r.jsx)(n.td,{children:"6 seconds"}),(0,r.jsx)(n.td,{children:"1"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Epoch"}),(0,r.jsx)(n.td,{children:"4 hours"}),(0,r.jsx)(n.td,{children:"2_400"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Session"}),(0,r.jsx)(n.td,{children:"4 hours"}),(0,r.jsx)(n.td,{children:"2_400"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Era"}),(0,r.jsx)(n.td,{children:"24 hours"}),(0,r.jsx)(n.td,{children:"14_400"})]})]})]})]}),(0,r.jsxs)(i.A,{value:"kusama",children:[(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Slot: 6 seconds *(generally one block per slot, although see note below)"}),"\n",(0,r.jsx)(n.li,{children:"Epoch: 1 hour (600 slots x 6 seconds)"}),"\n",(0,r.jsx)(n.li,{children:"Session: 1 hour (6 sessions per Era)"}),"\n",(0,r.jsx)(n.li,{children:"Era: 6 hours (3600 slots x 6 seconds)"}),"\n"]}),(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Kusama"}),(0,r.jsx)(n.th,{children:"Time"}),(0,r.jsx)(n.th,{children:"Slots*"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Slot"}),(0,r.jsx)(n.td,{children:"6 seconds"}),(0,r.jsx)(n.td,{children:"1"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Epoch"}),(0,r.jsx)(n.td,{children:"1 hour"}),(0,r.jsx)(n.td,{children:"600"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Session"}),(0,r.jsx)(n.td,{children:"1 hour"}),(0,r.jsx)(n.td,{children:"600"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Era"}),(0,r.jsx)(n.td,{children:"6 hours"}),(0,r.jsx)(n.td,{children:"3_600"})]})]})]})]})]}),"\n",(0,r.jsxs)(n.p,{children:["*",(0,r.jsxs)(n.em,{children:["A maximum of one block per slot can be in a canonical chain. Occasionally, a slot will be without\na block in the chain. Thus, the times given are ",(0,r.jsx)(n.em,{children:"estimates"}),". See\n",(0,r.jsx)(n.a,{href:"/docs/learn-consensus",children:"Consensus"})," for more details."]})]}),"\n",(0,r.jsx)(n.h3,{id:"governance",children:"Governance"}),"\n",(0,r.jsxs)(a.A,{groupId:"governance",values:[{label:"Polkadot",value:"polkadot"},{label:"Kusama",value:"kusama"}],children:[(0,r.jsx)(i.A,{value:"polkadot",children:(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Parameter"}),(0,r.jsx)(n.th,{children:"Time"}),(0,r.jsx)(n.th,{children:"Slots"}),(0,r.jsx)(n.th,{children:"Description"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Voting period"}),(0,r.jsx)(n.td,{children:"28 days"}),(0,r.jsx)(n.td,{children:"403_200"}),(0,r.jsx)(n.td,{children:"How long the public can vote on a referendum."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Enactment period"}),(0,r.jsx)(n.td,{children:"28 days"}),(0,r.jsx)(n.td,{children:"403_200"}),(0,r.jsx)(n.td,{children:"Time it takes for a successful referendum to be implemented on the network."})]})]})]})}),(0,r.jsx)(i.A,{value:"kusama",children:(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Parameter"}),(0,r.jsx)(n.th,{children:"Time"}),(0,r.jsx)(n.th,{children:"Slots"}),(0,r.jsx)(n.th,{children:"Description"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Voting period"}),(0,r.jsx)(n.td,{children:"7 days"}),(0,r.jsx)(n.td,{children:"100_800"}),(0,r.jsx)(n.td,{children:"How long the public can vote on a referendum."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Enactment period"}),(0,r.jsx)(n.td,{children:"8 days"}),(0,r.jsx)(n.td,{children:"115_200"}),(0,r.jsx)(n.td,{children:"Time it takes for a successful referendum to be implemented on the network."})]})]})]})})]}),"\n",(0,r.jsx)(n.h3,{id:"staking-validating-and-nominating",children:"Staking, Validating, and Nominating"}),"\n",(0,r.jsxs)(n.p,{children:["The maximum number of validators that can be nominated by a nominator is can be see\n",(0,r.jsx)(n.a,{href:"/docs/chain-state-values#maximum-votes-per-nominator",children:"here"}),"."]}),"\n",(0,r.jsxs)(a.A,{groupId:"staking",values:[{label:"Polkadot",value:"polkadot"},{label:"Kusama",value:"kusama"}],children:[(0,r.jsx)(i.A,{value:"polkadot",children:(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Parameter"}),(0,r.jsx)(n.th,{children:"Time"}),(0,r.jsx)(n.th,{children:"Slots"}),(0,r.jsx)(n.th,{children:"Description"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Term duration"}),(0,r.jsx)(n.td,{children:"1 Day"}),(0,r.jsx)(n.td,{children:"14_400"}),(0,r.jsx)(n.td,{children:"The time for which a validator is in the set after being elected. Note, this duration can be shortened in the case that a validator misbehaves."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Nomination period"}),(0,r.jsx)(n.td,{children:"1 Day"}),(0,r.jsx)(n.td,{children:"14_400"}),(0,r.jsxs)(n.td,{children:["How often a new validator set is elected according to ",(0,r.jsx)(n.a,{href:"/docs/learn-phragmen",children:"Phragm\xe9n's method"}),"."]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Bonding duration"}),(0,r.jsx)(n.td,{children:"28 days"}),(0,r.jsx)(n.td,{children:"403_200"}),(0,r.jsx)(n.td,{children:"How long until your funds will be transferrable after unbonding. Note that the bonding duration is defined in eras, not directly by slots."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Slash defer duration"}),(0,r.jsx)(n.td,{children:"28 days"}),(0,r.jsx)(n.td,{children:"403_200"}),(0,r.jsx)(n.td,{children:'Prevents overslashing and validators "escaping" and getting their nominators slashed with no repercussions to themselves. Note that the bonding duration is defined in eras, not directly by slots.'})]})]})]})}),(0,r.jsx)(i.A,{value:"kusama",children:(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Parameter"}),(0,r.jsx)(n.th,{children:"Time"}),(0,r.jsx)(n.th,{children:"Slots"}),(0,r.jsx)(n.th,{children:"Description"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Term duration"}),(0,r.jsx)(n.td,{children:"6 hours"}),(0,r.jsx)(n.td,{children:"3_600"}),(0,r.jsx)(n.td,{children:"The time for which a validator is in the set after being elected. Note, this duration can be shortened in the case that a validator misbehaves."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Nomination period"}),(0,r.jsx)(n.td,{children:"6 hours"}),(0,r.jsx)(n.td,{children:"3_600"}),(0,r.jsxs)(n.td,{children:["How often a new validator set is elected according to ",(0,r.jsx)(n.a,{href:"/docs/learn-phragmen",children:"Phragm\xe9n's method"}),"."]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Bonding duration"}),(0,r.jsx)(n.td,{children:"7 days"}),(0,r.jsx)(n.td,{children:"604_800"}),(0,r.jsx)(n.td,{children:"How long until your funds will be transferrable after unbonding. Note that the bonding duration is defined in eras, not directly by slots."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Slash defer duration"}),(0,r.jsx)(n.td,{children:"7 days"}),(0,r.jsx)(n.td,{children:"604_800"}),(0,r.jsx)(n.td,{children:'Prevents overslashing and validators "escaping" and getting their nominators slashed with no repercussions to themselves. Note that the bonding duration is defined in eras, not directly by slots.'})]})]})]})})]}),"\n",(0,r.jsx)(n.h3,{id:"treasury",children:"Treasury"}),"\n",(0,r.jsxs)(a.A,{groupId:"treasury",values:[{label:"Polkadot",value:"polkadot"},{label:"Kusama",value:"kusama"}],children:[(0,r.jsxs)(i.A,{value:"polkadot",children:[(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Treasury"}),(0,r.jsx)(n.th,{children:"Time"}),(0,r.jsx)(n.th,{children:"Slots"}),(0,r.jsx)(n.th,{children:"Description"})]})}),(0,r.jsx)(n.tbody,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Periods between spends"}),(0,r.jsx)(n.td,{children:"24 days"}),(0,r.jsx)(n.td,{children:"345_600"}),(0,r.jsx)(n.td,{children:"When the treasury can spend again after spending previously."})]})})]}),(0,r.jsxs)(n.p,{children:["Burn percentage is currently ",(0,r.jsx)(n.code,{children:"1.00%"}),"."]})]}),(0,r.jsxs)(i.A,{value:"kusama",children:[(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Treasury"}),(0,r.jsx)(n.th,{children:"Time"}),(0,r.jsx)(n.th,{children:"Slots"}),(0,r.jsx)(n.th,{children:"Description"})]})}),(0,r.jsx)(n.tbody,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Periods between spends"}),(0,r.jsx)(n.td,{children:"6 days"}),(0,r.jsx)(n.td,{children:"86_400"}),(0,r.jsx)(n.td,{children:"When the treasury can spend again after spending previously."})]})})]}),(0,r.jsxs)(n.p,{children:["Burn percentage is currently ",(0,r.jsx)(n.code,{children:"0.20%"}),", though instead of being burned this amount is temporarily\nredirected into the ",(0,r.jsx)(n.a,{href:"/docs/maintain-guides-society-kusama",children:"Society"}),"'s treasury to\nfund growth."]})]})]}),"\n",(0,r.jsx)(n.h3,{id:"precision",children:"Precision"}),"\n",(0,r.jsxs)(a.A,{groupId:"precision",values:[{label:"Polkadot",value:"polkadot"},{label:"Kusama",value:"kusama"}],children:[(0,r.jsxs)(i.A,{value:"polkadot",children:[(0,r.jsx)(n.p,{children:"DOT have 10 decimals of precision. In other words, 10 ** 10 (10_000_000_000 or ten billion)\nPlancks make up a DOT."}),(0,r.jsxs)(n.p,{children:["The denomination of DOT was changed from 12 decimals of precision at block #1,248,328 in an event\nknown as ",(0,r.jsx)(n.em,{children:"Denomination Day"}),". See ",(0,r.jsx)(n.a,{href:"/docs/learn/learn-redenomination",children:"Redenomination"})," for\ndetails."]})]}),(0,r.jsx)(i.A,{value:"kusama",children:(0,r.jsx)(n.p,{children:"KSM have 12 decimals of precision. In other words, 1e12 (1_000_000_000_000, or one trillion) Plancks\nmake up a single KSM."})})]})]})}function x(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(u,{...e})}):u(e)}},19365:(e,n,t)=>{t.d(n,{A:()=>i});t(96540);var r=t(34164);const s={tabItem:"tabItem_Ymn6"};var a=t(74848);function i(e){var n=e.children,t=e.hidden,i=e.className;return(0,a.jsx)("div",{role:"tabpanel",className:(0,r.A)(s.tabItem,i),hidden:t,children:n})}},11470:(e,n,t)=>{t.d(n,{A:()=>k});var r=t(96540),s=t(34164),a=t(23104),i=t(56347),l=t(205),d=t(57485),o=t(31682),c=t(75376);function h(e){var n,t;return null!=(n=null==(t=r.Children.toArray(e).filter((function(e){return"\n"!==e})).map((function(e){if(!e||(0,r.isValidElement)(e)&&((n=e.props)&&"object"==typeof n&&"value"in n))return e;var n;throw new Error("Docusaurus error: Bad child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:t.filter(Boolean))?n:[]}function u(e){var n=e.values,t=e.children;return(0,r.useMemo)((function(){var e=null!=n?n:function(e){return h(e).map((function(e){var n=e.props;return{value:n.value,label:n.label,attributes:n.attributes,default:n.default}}))}(t);return function(e){var n=(0,o.XI)(e,(function(e,n){return e.value===n.value}));if(n.length>0)throw new Error('Docusaurus error: Duplicate values "'+n.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[n,t])}function x(e){var n=e.value;return e.tabValues.some((function(e){return e.value===n}))}function j(e){var n=e.queryString,t=void 0!==n&&n,s=e.groupId,a=(0,i.W6)(),l=function(e){var n=e.queryString,t=void 0!==n&&n,r=e.groupId;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!r)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=r?r:null}({queryString:t,groupId:s});return[(0,d.aZ)(l),(0,r.useCallback)((function(e){if(l){var n=new URLSearchParams(a.location.search);n.set(l,e),a.replace(Object.assign({},a.location,{search:n.toString()}))}}),[l,a])]}function m(e){var n,t,s,a,i=e.defaultValue,d=e.queryString,o=void 0!==d&&d,h=e.groupId,m=u(e),p=(0,r.useState)((function(){return function(e){var n,t=e.defaultValue,r=e.tabValues;if(0===r.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!x({value:t,tabValues:r}))throw new Error('Docusaurus error: The has a defaultValue "'+t+'" but none of its children has the corresponding value. Available values are: '+r.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return t}var s=null!=(n=r.find((function(e){return e.default})))?n:r[0];if(!s)throw new Error("Unexpected error: 0 tabValues");return s.value}({defaultValue:i,tabValues:m})})),b=p[0],v=p[1],f=j({queryString:o,groupId:h}),g=f[0],y=f[1],k=(n=function(e){return e?"docusaurus.tab."+e:null}({groupId:h}.groupId),t=(0,c.Dv)(n),s=t[0],a=t[1],[s,(0,r.useCallback)((function(e){n&&a.set(e)}),[n,a])]),w=k[0],T=k[1],P=function(){var e=null!=g?g:w;return x({value:e,tabValues:m})?e:null}();return(0,l.A)((function(){P&&v(P)}),[P]),{selectedValue:b,selectValue:(0,r.useCallback)((function(e){if(!x({value:e,tabValues:m}))throw new Error("Can't select invalid tab value="+e);v(e),y(e),T(e)}),[y,T,m]),tabValues:m}}var p=t(92303);const b={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var v=t(74848);function f(e){var n=e.className,t=e.block,r=e.selectedValue,i=e.selectValue,l=e.tabValues,d=[],o=(0,a.a_)().blockElementScrollPositionUntilNextRender,c=function(e){var n=e.currentTarget,t=d.indexOf(n),s=l[t].value;s!==r&&(o(n),i(s))},h=function(e){var n,t=null;switch(e.key){case"Enter":c(e);break;case"ArrowRight":var r,s=d.indexOf(e.currentTarget)+1;t=null!=(r=d[s])?r:d[0];break;case"ArrowLeft":var a,i=d.indexOf(e.currentTarget)-1;t=null!=(a=d[i])?a:d[d.length-1]}null==(n=t)||n.focus()};return(0,v.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,s.A)("tabs",{"tabs--block":t},n),children:l.map((function(e){var n=e.value,t=e.label,a=e.attributes;return(0,v.jsx)("li",Object.assign({role:"tab",tabIndex:r===n?0:-1,"aria-selected":r===n,ref:function(e){return d.push(e)},onKeyDown:h,onClick:c},a,{className:(0,s.A)("tabs__item",b.tabItem,null==a?void 0:a.className,{"tabs__item--active":r===n}),children:null!=t?t:n}),n)}))})}function g(e){var n=e.lazy,t=e.children,a=e.selectedValue,i=(Array.isArray(t)?t:[t]).filter(Boolean);if(n){var l=i.find((function(e){return e.props.value===a}));return l?(0,r.cloneElement)(l,{className:(0,s.A)("margin-top--md",l.props.className)}):null}return(0,v.jsx)("div",{className:"margin-top--md",children:i.map((function(e,n){return(0,r.cloneElement)(e,{key:n,hidden:e.props.value!==a})}))})}function y(e){var n=m(e);return(0,v.jsxs)("div",{className:(0,s.A)("tabs-container",b.tabList),children:[(0,v.jsx)(f,Object.assign({},n,e)),(0,v.jsx)(g,Object.assign({},n,e))]})}function k(e){var n=(0,p.A)();return(0,v.jsx)(y,Object.assign({},e,{children:h(e.children)}),String(n))}},28453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>l});var r=t(96540);const s={},a=r.createContext(s);function i(e){const n=r.useContext(a);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),r.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/145746f5.14df688b.js b/assets/js/145746f5.14df688b.js new file mode 100644 index 000000000000..7878d1f9ce2d --- /dev/null +++ b/assets/js/145746f5.14df688b.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6789],{61050:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>o,default:()=>x,frontMatter:()=>d,metadata:()=>r,toc:()=>h});const r=JSON.parse('{"id":"maintain/maintain-polkadot-parameters","title":"Polkadot Parameters","description":"A description about fundamental Polkadot parameters.","source":"@site/../docs/maintain/maintain-polkadot-parameters.md","sourceDirName":"maintain","slug":"/maintain-polkadot-parameters","permalink":"/docs/maintain-polkadot-parameters","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/maintain/maintain-polkadot-parameters.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1727943421000,"frontMatter":{"id":"maintain-polkadot-parameters","title":"Polkadot Parameters","sidebar_label":"Parameters","description":"A description about fundamental Polkadot parameters.","keywords":["parameters","actions","attributes","behaviors"],"slug":"../maintain-polkadot-parameters"},"sidebar":"docs","previous":{"title":"Network Maintainers","permalink":"/docs/maintain-index"},"next":{"title":"Nodes and Dapps","permalink":"/docs/maintain-node-index"}}');var s=t(74848),a=t(28453),i=t(11470),l=t(19365);const d={id:"maintain-polkadot-parameters",title:"Polkadot Parameters",sidebar_label:"Parameters",description:"A description about fundamental Polkadot parameters.",keywords:["parameters","actions","attributes","behaviors"],slug:"../maintain-polkadot-parameters"},o=void 0,c={},h=[{value:"Periods of common actions and attributes",id:"periods-of-common-actions-and-attributes",level:3},{value:"Governance",id:"governance",level:3},{value:"Staking, Validating, and Nominating",id:"staking-validating-and-nominating",level:3},{value:"Treasury",id:"treasury",level:3},{value:"Precision",id:"precision",level:3}];function u(e){const n={a:"a",code:"code",em:"em",h3:"h3",li:"li",p:"p",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,a.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(n.p,{children:["Many of these parameter values can be updated via on-chain governance. If you require absolute\ncertainty of these parameter values, it is recommended you directly check the constants by looking\nat the ",(0,s.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/chainstate/constants",children:"chain state"})," and/or\n",(0,s.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/chainstate",children:"storage"}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"periods-of-common-actions-and-attributes",children:"Periods of common actions and attributes"}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.em,{children:"NOTE: Polkadot generally runs at \xbcth the speed of Kusama, except in the time slot duration\nitself."})}),"\n",(0,s.jsxs)(i.A,{groupId:"periods",values:[{label:"Polkadot",value:"polkadot"},{label:"Kusama",value:"kusama"}],children:[(0,s.jsxs)(l.A,{value:"polkadot",children:[(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Slot: 6 seconds *(generally one block per slot, although see note below)"}),"\n",(0,s.jsx)(n.li,{children:"Epoch: 4 hours (2_400 slots x 6 seconds)"}),"\n",(0,s.jsx)(n.li,{children:"Session: 4 hours (Session and Epoch lengths are the same)"}),"\n",(0,s.jsx)(n.li,{children:"Era: 24 hours (6 sessions per Era, 2_400 slots x 6 epochs x 6 seconds)"}),"\n"]}),(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Polkadot"}),(0,s.jsx)(n.th,{children:"Time"}),(0,s.jsx)(n.th,{children:"Slots*"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Slot"}),(0,s.jsx)(n.td,{children:"6 seconds"}),(0,s.jsx)(n.td,{children:"1"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Epoch"}),(0,s.jsx)(n.td,{children:"4 hours"}),(0,s.jsx)(n.td,{children:"2_400"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Session"}),(0,s.jsx)(n.td,{children:"4 hours"}),(0,s.jsx)(n.td,{children:"2_400"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Era"}),(0,s.jsx)(n.td,{children:"24 hours"}),(0,s.jsx)(n.td,{children:"14_400"})]})]})]})]}),(0,s.jsxs)(l.A,{value:"kusama",children:[(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Slot: 6 seconds *(generally one block per slot, although see note below)"}),"\n",(0,s.jsx)(n.li,{children:"Epoch: 1 hour (600 slots x 6 seconds)"}),"\n",(0,s.jsx)(n.li,{children:"Session: 1 hour (6 sessions per Era)"}),"\n",(0,s.jsx)(n.li,{children:"Era: 6 hours (3600 slots x 6 seconds)"}),"\n"]}),(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Kusama"}),(0,s.jsx)(n.th,{children:"Time"}),(0,s.jsx)(n.th,{children:"Slots*"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Slot"}),(0,s.jsx)(n.td,{children:"6 seconds"}),(0,s.jsx)(n.td,{children:"1"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Epoch"}),(0,s.jsx)(n.td,{children:"1 hour"}),(0,s.jsx)(n.td,{children:"600"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Session"}),(0,s.jsx)(n.td,{children:"1 hour"}),(0,s.jsx)(n.td,{children:"600"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Era"}),(0,s.jsx)(n.td,{children:"6 hours"}),(0,s.jsx)(n.td,{children:"3_600"})]})]})]})]})]}),"\n",(0,s.jsxs)(n.p,{children:["*",(0,s.jsxs)(n.em,{children:["A maximum of one block per slot can be in a canonical chain. Occasionally, a slot will be without\na block in the chain. Thus, the times given are ",(0,s.jsx)(n.em,{children:"estimates"}),". See\n",(0,s.jsx)(n.a,{href:"/docs/learn-consensus",children:"Consensus"})," for more details."]})]}),"\n",(0,s.jsx)(n.h3,{id:"governance",children:"Governance"}),"\n",(0,s.jsxs)(i.A,{groupId:"governance",values:[{label:"Polkadot",value:"polkadot"},{label:"Kusama",value:"kusama"}],children:[(0,s.jsx)(l.A,{value:"polkadot",children:(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Parameter"}),(0,s.jsx)(n.th,{children:"Time"}),(0,s.jsx)(n.th,{children:"Slots"}),(0,s.jsx)(n.th,{children:"Description"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Voting period"}),(0,s.jsx)(n.td,{children:"28 days"}),(0,s.jsx)(n.td,{children:"403_200"}),(0,s.jsx)(n.td,{children:"How long the public can vote on a referendum."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Enactment period"}),(0,s.jsx)(n.td,{children:"28 days"}),(0,s.jsx)(n.td,{children:"403_200"}),(0,s.jsx)(n.td,{children:"Time it takes for a successful referendum to be implemented on the network."})]})]})]})}),(0,s.jsx)(l.A,{value:"kusama",children:(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Parameter"}),(0,s.jsx)(n.th,{children:"Time"}),(0,s.jsx)(n.th,{children:"Slots"}),(0,s.jsx)(n.th,{children:"Description"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Voting period"}),(0,s.jsx)(n.td,{children:"7 days"}),(0,s.jsx)(n.td,{children:"100_800"}),(0,s.jsx)(n.td,{children:"How long the public can vote on a referendum."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Enactment period"}),(0,s.jsx)(n.td,{children:"8 days"}),(0,s.jsx)(n.td,{children:"115_200"}),(0,s.jsx)(n.td,{children:"Time it takes for a successful referendum to be implemented on the network."})]})]})]})})]}),"\n",(0,s.jsx)(n.h3,{id:"staking-validating-and-nominating",children:"Staking, Validating, and Nominating"}),"\n",(0,s.jsxs)(n.p,{children:["The maximum number of validators that can be nominated by a nominator is can be see\n",(0,s.jsx)(n.a,{href:"/docs/chain-state-values#maximum-votes-per-nominator",children:"here"}),"."]}),"\n",(0,s.jsxs)(i.A,{groupId:"staking",values:[{label:"Polkadot",value:"polkadot"},{label:"Kusama",value:"kusama"}],children:[(0,s.jsx)(l.A,{value:"polkadot",children:(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Parameter"}),(0,s.jsx)(n.th,{children:"Time"}),(0,s.jsx)(n.th,{children:"Slots"}),(0,s.jsx)(n.th,{children:"Description"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Term duration"}),(0,s.jsx)(n.td,{children:"1 Day"}),(0,s.jsx)(n.td,{children:"14_400"}),(0,s.jsx)(n.td,{children:"The time for which a validator is in the set after being elected. Note, this duration can be shortened in the case that a validator misbehaves."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Nomination period"}),(0,s.jsx)(n.td,{children:"1 Day"}),(0,s.jsx)(n.td,{children:"14_400"}),(0,s.jsxs)(n.td,{children:["How often a new validator set is elected according to ",(0,s.jsx)(n.a,{href:"/docs/learn-phragmen",children:"Phragm\xe9n's method"}),"."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Bonding duration"}),(0,s.jsx)(n.td,{children:"28 days"}),(0,s.jsx)(n.td,{children:"403_200"}),(0,s.jsx)(n.td,{children:"How long until your funds will be transferrable after unbonding. Note that the bonding duration is defined in eras, not directly by slots."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Slash defer duration"}),(0,s.jsx)(n.td,{children:"28 days"}),(0,s.jsx)(n.td,{children:"403_200"}),(0,s.jsx)(n.td,{children:'Prevents overslashing and validators "escaping" and getting their nominators slashed with no repercussions to themselves. Note that the bonding duration is defined in eras, not directly by slots.'})]})]})]})}),(0,s.jsx)(l.A,{value:"kusama",children:(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Parameter"}),(0,s.jsx)(n.th,{children:"Time"}),(0,s.jsx)(n.th,{children:"Slots"}),(0,s.jsx)(n.th,{children:"Description"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Term duration"}),(0,s.jsx)(n.td,{children:"6 hours"}),(0,s.jsx)(n.td,{children:"3_600"}),(0,s.jsx)(n.td,{children:"The time for which a validator is in the set after being elected. Note, this duration can be shortened in the case that a validator misbehaves."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Nomination period"}),(0,s.jsx)(n.td,{children:"6 hours"}),(0,s.jsx)(n.td,{children:"3_600"}),(0,s.jsxs)(n.td,{children:["How often a new validator set is elected according to ",(0,s.jsx)(n.a,{href:"/docs/learn-phragmen",children:"Phragm\xe9n's method"}),"."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Bonding duration"}),(0,s.jsx)(n.td,{children:"7 days"}),(0,s.jsx)(n.td,{children:"604_800"}),(0,s.jsx)(n.td,{children:"How long until your funds will be transferrable after unbonding. Note that the bonding duration is defined in eras, not directly by slots."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Slash defer duration"}),(0,s.jsx)(n.td,{children:"7 days"}),(0,s.jsx)(n.td,{children:"604_800"}),(0,s.jsx)(n.td,{children:'Prevents overslashing and validators "escaping" and getting their nominators slashed with no repercussions to themselves. Note that the bonding duration is defined in eras, not directly by slots.'})]})]})]})})]}),"\n",(0,s.jsx)(n.h3,{id:"treasury",children:"Treasury"}),"\n",(0,s.jsxs)(i.A,{groupId:"treasury",values:[{label:"Polkadot",value:"polkadot"},{label:"Kusama",value:"kusama"}],children:[(0,s.jsxs)(l.A,{value:"polkadot",children:[(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Treasury"}),(0,s.jsx)(n.th,{children:"Time"}),(0,s.jsx)(n.th,{children:"Slots"}),(0,s.jsx)(n.th,{children:"Description"})]})}),(0,s.jsx)(n.tbody,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Periods between spends"}),(0,s.jsx)(n.td,{children:"24 days"}),(0,s.jsx)(n.td,{children:"345_600"}),(0,s.jsx)(n.td,{children:"When the treasury can spend again after spending previously."})]})})]}),(0,s.jsxs)(n.p,{children:["Burn percentage is currently ",(0,s.jsx)(n.code,{children:"1.00%"}),"."]})]}),(0,s.jsxs)(l.A,{value:"kusama",children:[(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Treasury"}),(0,s.jsx)(n.th,{children:"Time"}),(0,s.jsx)(n.th,{children:"Slots"}),(0,s.jsx)(n.th,{children:"Description"})]})}),(0,s.jsx)(n.tbody,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Periods between spends"}),(0,s.jsx)(n.td,{children:"6 days"}),(0,s.jsx)(n.td,{children:"86_400"}),(0,s.jsx)(n.td,{children:"When the treasury can spend again after spending previously."})]})})]}),(0,s.jsxs)(n.p,{children:["Burn percentage is currently ",(0,s.jsx)(n.code,{children:"0.20%"}),", though instead of being burned this amount is temporarily\nredirected into the ",(0,s.jsx)(n.a,{href:"/docs/maintain-guides-society-kusama",children:"Society"}),"'s treasury to\nfund growth."]})]})]}),"\n",(0,s.jsx)(n.h3,{id:"precision",children:"Precision"}),"\n",(0,s.jsxs)(i.A,{groupId:"precision",values:[{label:"Polkadot",value:"polkadot"},{label:"Kusama",value:"kusama"}],children:[(0,s.jsxs)(l.A,{value:"polkadot",children:[(0,s.jsx)(n.p,{children:"DOT have 10 decimals of precision. In other words, 10 ** 10 (10_000_000_000 or ten billion)\nPlancks make up a DOT."}),(0,s.jsxs)(n.p,{children:["The denomination of DOT was changed from 12 decimals of precision at block #1,248,328 in an event\nknown as ",(0,s.jsx)(n.em,{children:"Denomination Day"}),". See ",(0,s.jsx)(n.a,{href:"/docs/learn/learn-redenomination",children:"Redenomination"})," for\ndetails."]})]}),(0,s.jsx)(l.A,{value:"kusama",children:(0,s.jsx)(n.p,{children:"KSM have 12 decimals of precision. In other words, 1e12 (1_000_000_000_000, or one trillion) Plancks\nmake up a single KSM."})})]})]})}function x(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(u,{...e})}):u(e)}},19365:(e,n,t)=>{t.d(n,{A:()=>i});t(96540);var r=t(34164);const s={tabItem:"tabItem_Ymn6"};var a=t(74848);function i(e){var n=e.children,t=e.hidden,i=e.className;return(0,a.jsx)("div",{role:"tabpanel",className:(0,r.A)(s.tabItem,i),hidden:t,children:n})}},11470:(e,n,t)=>{t.d(n,{A:()=>k});var r=t(96540),s=t(34164),a=t(23104),i=t(56347),l=t(205),d=t(57485),o=t(31682),c=t(75376);function h(e){var n,t;return null!=(n=null==(t=r.Children.toArray(e).filter((function(e){return"\n"!==e})).map((function(e){if(!e||(0,r.isValidElement)(e)&&((n=e.props)&&"object"==typeof n&&"value"in n))return e;var n;throw new Error("Docusaurus error: Bad child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:t.filter(Boolean))?n:[]}function u(e){var n=e.values,t=e.children;return(0,r.useMemo)((function(){var e=null!=n?n:function(e){return h(e).map((function(e){var n=e.props;return{value:n.value,label:n.label,attributes:n.attributes,default:n.default}}))}(t);return function(e){var n=(0,o.XI)(e,(function(e,n){return e.value===n.value}));if(n.length>0)throw new Error('Docusaurus error: Duplicate values "'+n.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[n,t])}function x(e){var n=e.value;return e.tabValues.some((function(e){return e.value===n}))}function j(e){var n=e.queryString,t=void 0!==n&&n,s=e.groupId,a=(0,i.W6)(),l=function(e){var n=e.queryString,t=void 0!==n&&n,r=e.groupId;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!r)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=r?r:null}({queryString:t,groupId:s});return[(0,d.aZ)(l),(0,r.useCallback)((function(e){if(l){var n=new URLSearchParams(a.location.search);n.set(l,e),a.replace(Object.assign({},a.location,{search:n.toString()}))}}),[l,a])]}function m(e){var n,t,s,a,i=e.defaultValue,d=e.queryString,o=void 0!==d&&d,h=e.groupId,m=u(e),p=(0,r.useState)((function(){return function(e){var n,t=e.defaultValue,r=e.tabValues;if(0===r.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!x({value:t,tabValues:r}))throw new Error('Docusaurus error: The has a defaultValue "'+t+'" but none of its children has the corresponding value. Available values are: '+r.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return t}var s=null!=(n=r.find((function(e){return e.default})))?n:r[0];if(!s)throw new Error("Unexpected error: 0 tabValues");return s.value}({defaultValue:i,tabValues:m})})),b=p[0],v=p[1],f=j({queryString:o,groupId:h}),g=f[0],y=f[1],k=(n=function(e){return e?"docusaurus.tab."+e:null}({groupId:h}.groupId),t=(0,c.Dv)(n),s=t[0],a=t[1],[s,(0,r.useCallback)((function(e){n&&a.set(e)}),[n,a])]),w=k[0],T=k[1],P=function(){var e=null!=g?g:w;return x({value:e,tabValues:m})?e:null}();return(0,l.A)((function(){P&&v(P)}),[P]),{selectedValue:b,selectValue:(0,r.useCallback)((function(e){if(!x({value:e,tabValues:m}))throw new Error("Can't select invalid tab value="+e);v(e),y(e),T(e)}),[y,T,m]),tabValues:m}}var p=t(92303);const b={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var v=t(74848);function f(e){var n=e.className,t=e.block,r=e.selectedValue,i=e.selectValue,l=e.tabValues,d=[],o=(0,a.a_)().blockElementScrollPositionUntilNextRender,c=function(e){var n=e.currentTarget,t=d.indexOf(n),s=l[t].value;s!==r&&(o(n),i(s))},h=function(e){var n,t=null;switch(e.key){case"Enter":c(e);break;case"ArrowRight":var r,s=d.indexOf(e.currentTarget)+1;t=null!=(r=d[s])?r:d[0];break;case"ArrowLeft":var a,i=d.indexOf(e.currentTarget)-1;t=null!=(a=d[i])?a:d[d.length-1]}null==(n=t)||n.focus()};return(0,v.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,s.A)("tabs",{"tabs--block":t},n),children:l.map((function(e){var n=e.value,t=e.label,a=e.attributes;return(0,v.jsx)("li",Object.assign({role:"tab",tabIndex:r===n?0:-1,"aria-selected":r===n,ref:function(e){return d.push(e)},onKeyDown:h,onClick:c},a,{className:(0,s.A)("tabs__item",b.tabItem,null==a?void 0:a.className,{"tabs__item--active":r===n}),children:null!=t?t:n}),n)}))})}function g(e){var n=e.lazy,t=e.children,a=e.selectedValue,i=(Array.isArray(t)?t:[t]).filter(Boolean);if(n){var l=i.find((function(e){return e.props.value===a}));return l?(0,r.cloneElement)(l,{className:(0,s.A)("margin-top--md",l.props.className)}):null}return(0,v.jsx)("div",{className:"margin-top--md",children:i.map((function(e,n){return(0,r.cloneElement)(e,{key:n,hidden:e.props.value!==a})}))})}function y(e){var n=m(e);return(0,v.jsxs)("div",{className:(0,s.A)("tabs-container",b.tabList),children:[(0,v.jsx)(f,Object.assign({},n,e)),(0,v.jsx)(g,Object.assign({},n,e))]})}function k(e){var n=(0,p.A)();return(0,v.jsx)(y,Object.assign({},e,{children:h(e.children)}),String(n))}},28453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>l});var r=t(96540);const s={},a=r.createContext(s);function i(e){const n=r.useContext(a);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),r.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/1477.8e861da0.js b/assets/js/1477.8e861da0.js new file mode 100644 index 000000000000..6c80676cbc03 --- /dev/null +++ b/assets/js/1477.8e861da0.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1477],{50053:(e,n,t)=>{t.d(n,{A:()=>i});var r=t(68675);const i=function(e){return(0,r.A)(e,4)}},81477:(e,n,t)=>{t.r(n),t.d(n,{render:()=>O});var r=t(6396),i=t(5081),a=(t(34483),t(52294),t(62392)),o=(t(86825),t(85039),t(45567)),d=t(62334),s=t(69592),c=t(50053),g=t(74722);t(37981);function l(e){var n={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:f(e),edges:h(e)};return s.A(e.graph())||(n.value=c.A(e.graph())),n}function f(e){return g.A(e.nodes(),(function(n){var t=e.node(n),r=e.parent(n),i={v:n};return s.A(t)||(i.value=t),s.A(r)||(i.parent=r),i}))}function h(e){return g.A(e.edges(),(function(n){var t=e.edge(n),r={v:n.v,w:n.w};return s.A(n.name)||(r.name=n.name),s.A(t)||(r.value=t),r}))}var u=t(697),p=new Map,m=new Map,w=new Map,R=(0,o.K2)((()=>{m.clear(),w.clear(),p.clear()}),"clear"),v=(0,o.K2)(((e,n)=>{const t=m.get(n)||[];return o.Rm.trace("In isDescendant",n," ",e," = ",t.includes(e)),t.includes(e)}),"isDescendant"),y=(0,o.K2)(((e,n)=>{const t=m.get(n)||[];return o.Rm.info("Descendants of ",n," is ",t),o.Rm.info("Edge is ",e),e.v!==n&&e.w!==n&&(t?t.includes(e.v)||v(e.v,n)||v(e.w,n)||t.includes(e.w):(o.Rm.debug("Tilt, ",n,",not in descendants"),!1))}),"edgeInCluster"),X=(0,o.K2)(((e,n,t,r)=>{o.Rm.warn("Copying children of ",e,"root",r,"data",n.node(e),r);const i=n.children(e)||[];e!==r&&i.push(e),o.Rm.warn("Copying (nodes) clusterId",e,"nodes",i),i.forEach((i=>{if(n.children(i).length>0)X(i,n,t,r);else{const a=n.node(i);o.Rm.info("cp ",i," to ",r," with parent ",e),t.setNode(i,a),r!==n.parent(i)&&(o.Rm.warn("Setting parent",i,n.parent(i)),t.setParent(i,n.parent(i))),e!==r&&i!==e?(o.Rm.debug("Setting parent",i,e),t.setParent(i,e)):(o.Rm.info("In copy ",e,"root",r,"data",n.node(e),r),o.Rm.debug("Not Setting parent for node=",i,"cluster!==rootId",e!==r,"node!==clusterId",i!==e));const d=n.edges(i);o.Rm.debug("Copying Edges",d),d.forEach((i=>{o.Rm.info("Edge",i);const a=n.edge(i.v,i.w,i.name);o.Rm.info("Edge data",a,r);try{y(i,r)?(o.Rm.info("Copying as ",i.v,i.w,a,i.name),t.setEdge(i.v,i.w,a,i.name),o.Rm.info("newGraph edges ",t.edges(),t.edge(t.edges()[0]))):o.Rm.info("Skipping copy of edge ",i.v,"--\x3e",i.w," rootId: ",r," clusterId:",e)}catch(d){o.Rm.error(d)}}))}o.Rm.debug("Removing node",i),n.removeNode(i)}))}),"copy"),b=(0,o.K2)(((e,n)=>{const t=n.children(e);let r=[...t];for(const i of t)w.set(i,e),r=[...r,...b(i,n)];return r}),"extractDescendants"),E=(0,o.K2)(((e,n,t)=>{const r=e.edges().filter((e=>e.v===n||e.w===n)),i=e.edges().filter((e=>e.v===t||e.w===t)),a=r.map((e=>({v:e.v===n?t:e.v,w:e.w===n?n:e.w}))),o=i.map((e=>({v:e.v,w:e.w})));return a.filter((e=>o.some((n=>e.v===n.v&&e.w===n.w))))}),"findCommonEdges"),N=(0,o.K2)(((e,n,t)=>{const r=n.children(e);if(o.Rm.trace("Searching children of id ",e,r),r.length<1)return e;let i;for(const a of r){const e=N(a,n,t),r=E(n,t,e);if(e){if(!(r.length>0))return e;i=e}}return i}),"findNonClusterChild"),C=(0,o.K2)((e=>p.has(e)&&p.get(e).externalConnections&&p.has(e)?p.get(e).id:e),"getAnchorId"),x=(0,o.K2)(((e,n)=>{if(!e||n>10)o.Rm.debug("Opting out, no graph ");else{o.Rm.debug("Opting in, graph "),e.nodes().forEach((function(n){e.children(n).length>0&&(o.Rm.warn("Cluster identified",n," Replacement id in edges: ",N(n,e,n)),m.set(n,b(n,e)),p.set(n,{id:N(n,e,n),clusterData:e.node(n)}))})),e.nodes().forEach((function(n){const t=e.children(n),r=e.edges();t.length>0?(o.Rm.debug("Cluster identified",n,m),r.forEach((e=>{v(e.v,n)^v(e.w,n)&&(o.Rm.warn("Edge: ",e," leaves cluster ",n),o.Rm.warn("Descendants of XXX ",n,": ",m.get(n)),p.get(n).externalConnections=!0)}))):o.Rm.debug("Not a cluster ",n,m)}));for(let n of p.keys()){const t=p.get(n).id,r=e.parent(t);r!==n&&p.has(r)&&!p.get(r).externalConnections&&(p.get(n).id=r)}e.edges().forEach((function(n){const t=e.edge(n);o.Rm.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(n)),o.Rm.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(e.edge(n)));let r=n.v,i=n.w;if(o.Rm.warn("Fix XXX",p,"ids:",n.v,n.w,"Translating: ",p.get(n.v)," --- ",p.get(n.w)),p.get(n.v)||p.get(n.w)){if(o.Rm.warn("Fixing and trying - removing XXX",n.v,n.w,n.name),r=C(n.v),i=C(n.w),e.removeEdge(n.v,n.w,n.name),r!==n.v){const i=e.parent(r);p.get(i).externalConnections=!0,t.fromCluster=n.v}if(i!==n.w){const r=e.parent(i);p.get(r).externalConnections=!0,t.toCluster=n.w}o.Rm.warn("Fix Replacing with XXX",r,i,n.name),e.setEdge(r,i,t,n.name)}})),o.Rm.warn("Adjusted Graph",l(e)),I(e,0),o.Rm.trace(p)}}),"adjustClustersAndEdges"),I=(0,o.K2)(((e,n)=>{if(o.Rm.warn("extractor - ",n,l(e),e.children("D")),n>10)return void o.Rm.error("Bailing out");let t=e.nodes(),r=!1;for(const i of t){const n=e.children(i);r=r||n.length>0}if(r){o.Rm.debug("Nodes = ",t,n);for(const r of t)if(o.Rm.debug("Extracting node",r,p,p.has(r)&&!p.get(r).externalConnections,!e.parent(r),e.node(r),e.children("D")," Depth ",n),p.has(r))if(!p.get(r).externalConnections&&e.children(r)&&e.children(r).length>0){o.Rm.warn("Cluster without external connections, without a parent and with children",r,n);let t="TB"===e.graph().rankdir?"LR":"TB";p.get(r)?.clusterData?.dir&&(t=p.get(r).clusterData.dir,o.Rm.warn("Fixing dir",p.get(r).clusterData.dir,t));const i=new u.T({multigraph:!0,compound:!0}).setGraph({rankdir:t,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}}));o.Rm.warn("Old graph before copy",l(e)),X(r,e,i,r),e.setNode(r,{clusterNode:!0,id:r,clusterData:p.get(r).clusterData,label:p.get(r).label,graph:i}),o.Rm.warn("New graph after copy node: (",r,")",l(i)),o.Rm.debug("Old graph after copy",l(e))}else o.Rm.warn("Cluster ** ",r," **not meeting the criteria !externalConnections:",!p.get(r).externalConnections," no parent: ",!e.parent(r)," children ",e.children(r)&&e.children(r).length>0,e.children("D"),n),o.Rm.debug(p);else o.Rm.debug("Not a cluster",r,n);t=e.nodes(),o.Rm.warn("New list of nodes",t);for(const r of t){const t=e.node(r);o.Rm.warn(" Now next level",r,t),t?.clusterNode&&I(t.graph,n+1)}}else o.Rm.debug("Done, no node has children",e.nodes())}),"extractor"),S=(0,o.K2)(((e,n)=>{if(0===n.length)return[];let t=Object.assign([],n);return n.forEach((n=>{const r=e.children(n),i=S(e,r);t=[...t,...i]})),t}),"sorter"),D=(0,o.K2)((e=>S(e,e.children())),"sortNodesByHierarchy"),A=(0,o.K2)((async(e,n,t,s,c,g)=>{o.Rm.warn("Graph in recursive render:XAX",l(n),c);const f=n.graph().rankdir;o.Rm.trace("Dir in recursive render - dir:",f);const h=e.insert("g").attr("class","root");n.nodes()?o.Rm.info("Recursive render XXX",n.nodes()):o.Rm.info("No nodes found for",n),n.edges().length>0&&o.Rm.info("Recursive edges",n.edge(n.edges()[0]));const u=h.insert("g").attr("class","clusters"),m=h.insert("g").attr("class","edgePaths"),w=h.insert("g").attr("class","edgeLabels"),R=h.insert("g").attr("class","nodes");await Promise.all(n.nodes().map((async function(e){const r=n.node(e);if(void 0!==c){const t=JSON.parse(JSON.stringify(c.clusterData));o.Rm.trace("Setting data for parent cluster XXX\n Node.id = ",e,"\n data=",t.height,"\nParent cluster",c.height),n.setNode(c.id,t),n.parent(e)||(o.Rm.trace("Setting parent",e,c.id),n.setParent(e,c.id,t))}if(o.Rm.info("(Insert) Node XXX"+e+": "+JSON.stringify(n.node(e))),r?.clusterNode){o.Rm.info("Cluster identified XBX",e,r.width,n.node(e));const{ranksep:a,nodesep:d}=n.graph();r.graph.setGraph({...r.graph.graph(),ranksep:a+25,nodesep:d});const c=await A(R,r.graph,t,s,n.node(e),g),l=c.elem;(0,i.lC)(r,l),r.diff=c.diff||0,o.Rm.info("New compound node after recursive render XAX",e,"width",r.width,"height",r.height),(0,i.U7)(l,r)}else n.children(e).length>0?(o.Rm.trace("Cluster - the non recursive path XBX",e,r.id,r,r.width,"Graph:",n),o.Rm.trace(N(r.id,n)),p.set(r.id,{id:N(r.id,n),node:r})):(o.Rm.trace("Node - the non recursive path XAX",e,R,n.node(e),f),await(0,i.on)(R,n.node(e),{config:g,dir:f}))})));const v=(0,o.K2)((async()=>{const e=n.edges().map((async function(e){const t=n.edge(e.v,e.w,e.name);o.Rm.info("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(e)),o.Rm.info("Edge "+e.v+" -> "+e.w+": ",e," ",JSON.stringify(n.edge(e))),o.Rm.info("Fix",p,"ids:",e.v,e.w,"Translating: ",p.get(e.v),p.get(e.w)),await(0,r.jP)(w,t)}));await Promise.all(e)}),"processEdges");await v(),o.Rm.info("Graph before layout:",JSON.stringify(l(n))),o.Rm.info("############################################# XXX"),o.Rm.info("### Layout ### XXX"),o.Rm.info("############################################# XXX"),(0,d.Zp)(n),o.Rm.info("Graph after layout:",JSON.stringify(l(n)));let y=0,{subGraphTitleTotalMargin:X}=(0,a.O)(g);return await Promise.all(D(n).map((async function(e){const t=n.node(e);if(o.Rm.info("Position XBX => "+e+": ("+t.x,","+t.y,") width: ",t.width," height: ",t.height),t?.clusterNode)t.y+=X,o.Rm.info("A tainted cluster node XBX1",e,t.id,t.width,t.height,t.x,t.y,n.parent(e)),p.get(t.id).node=t,(0,i.U_)(t);else if(n.children(e).length>0){o.Rm.info("A pure cluster node XBX1",e,t.id,t.x,t.y,t.width,t.height,n.parent(e)),t.height+=X,n.node(t.parentId);const r=t?.padding/2||0,a=t?.labelBBox?.height||0,d=a-r||0;o.Rm.debug("OffsetY",d,"labelHeight",a,"halfPadding",r),await(0,i.U)(u,t),p.get(t.id).node=t}else{const e=n.node(t.parentId);t.y+=X/2,o.Rm.info("A regular node XBX1 - using the padding",t.id,"parent",t.parentId,t.width,t.height,t.x,t.y,"offsetY",t.offsetY,"parent",e,e?.offsetY,t),(0,i.U_)(t)}}))),n.edges().forEach((function(e){const i=n.edge(e);o.Rm.info("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(i),i),i.points.forEach((e=>e.y+=X/2));const a=n.node(e.v);var d=n.node(e.w);const c=(0,r.Jo)(m,i,p,t,a,d,s);(0,r.T_)(i,c)})),n.nodes().forEach((function(e){const t=n.node(e);o.Rm.info(e,t.type,t.diff),t.isGroup&&(y=t.diff)})),o.Rm.warn("Returning from recursive render XAX",h,y),{elem:h,diff:y}}),"recursiveRender"),O=(0,o.K2)((async(e,n)=>{const t=new u.T({multigraph:!0,compound:!0}).setGraph({rankdir:e.direction,nodesep:e.config?.nodeSpacing||e.config?.flowchart?.nodeSpacing||e.nodeSpacing,ranksep:e.config?.rankSpacing||e.config?.flowchart?.rankSpacing||e.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}})),a=n.select("g");(0,r.g0)(a,e.markers,e.type,e.diagramId),(0,i.gh)(),(0,r.IU)(),(0,i.IU)(),R(),e.nodes.forEach((e=>{t.setNode(e.id,{...e}),e.parentId&&t.setParent(e.id,e.parentId)})),o.Rm.debug("Edges:",e.edges),e.edges.forEach((e=>{if(e.start===e.end){const n=e.start,r=n+"---"+n+"---1",i=n+"---"+n+"---2",a=t.node(n);t.setNode(r,{domId:r,id:r,parentId:a.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),t.setParent(r,a.parentId),t.setNode(i,{domId:i,id:i,parentId:a.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),t.setParent(i,a.parentId);const o=structuredClone(e),d=structuredClone(e),s=structuredClone(e);o.label="",o.arrowTypeEnd="none",o.id=n+"-cyclic-special-1",d.arrowTypeEnd="none",d.id=n+"-cyclic-special-mid",s.label="",a.isGroup&&(o.fromCluster=n,s.toCluster=n),s.id=n+"-cyclic-special-2",t.setEdge(n,r,o,n+"-cyclic-special-0"),t.setEdge(r,i,d,n+"-cyclic-special-1"),t.setEdge(i,n,s,n+"-cyc{a.d(e,{diagram:()=>Nt});var n=a(59347),i=a(85039),r=a(45567),s=a(20007),l=a(16750),o=function(){var t=(0,r.K2)((function(t,e,a,n){for(a=a||{},n=t.length;n--;a[t[n]]=e);return a}),"o"),e=[1,24],a=[1,25],n=[1,26],i=[1,27],s=[1,28],l=[1,63],o=[1,64],h=[1,65],d=[1,66],u=[1,67],p=[1,68],y=[1,69],g=[1,29],f=[1,30],b=[1,31],x=[1,32],_=[1,33],m=[1,34],E=[1,35],S=[1,36],A=[1,37],C=[1,38],w=[1,39],k=[1,40],O=[1,41],T=[1,42],v=[1,43],R=[1,44],D=[1,45],N=[1,46],P=[1,47],B=[1,48],I=[1,50],M=[1,51],j=[1,52],K=[1,53],L=[1,54],Y=[1,55],U=[1,56],F=[1,57],X=[1,58],z=[1,59],W=[1,60],Q=[14,42],$=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],H=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],q=[1,82],V=[1,83],G=[1,84],J=[1,85],Z=[12,14,42],tt=[12,14,33,42],et=[12,14,33,42,76,77,79,80],at=[12,33],nt=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],it={trace:(0,r.K2)((function(){}),"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:(0,r.K2)((function(t,e,a,n,i,r,s){var l=r.length-1;switch(i){case 3:n.setDirection("TB");break;case 4:n.setDirection("BT");break;case 5:n.setDirection("RL");break;case 6:n.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:n.setC4Type(r[l-3]);break;case 19:n.setTitle(r[l].substring(6)),this.$=r[l].substring(6);break;case 20:n.setAccDescription(r[l].substring(15)),this.$=r[l].substring(15);break;case 21:this.$=r[l].trim(),n.setTitle(this.$);break;case 22:case 23:this.$=r[l].trim(),n.setAccDescription(this.$);break;case 28:r[l].splice(2,0,"ENTERPRISE"),n.addPersonOrSystemBoundary(...r[l]),this.$=r[l];break;case 29:r[l].splice(2,0,"SYSTEM"),n.addPersonOrSystemBoundary(...r[l]),this.$=r[l];break;case 30:n.addPersonOrSystemBoundary(...r[l]),this.$=r[l];break;case 31:r[l].splice(2,0,"CONTAINER"),n.addContainerBoundary(...r[l]),this.$=r[l];break;case 32:n.addDeploymentNode("node",...r[l]),this.$=r[l];break;case 33:n.addDeploymentNode("nodeL",...r[l]),this.$=r[l];break;case 34:n.addDeploymentNode("nodeR",...r[l]),this.$=r[l];break;case 35:n.popBoundaryParseStack();break;case 39:n.addPersonOrSystem("person",...r[l]),this.$=r[l];break;case 40:n.addPersonOrSystem("external_person",...r[l]),this.$=r[l];break;case 41:n.addPersonOrSystem("system",...r[l]),this.$=r[l];break;case 42:n.addPersonOrSystem("system_db",...r[l]),this.$=r[l];break;case 43:n.addPersonOrSystem("system_queue",...r[l]),this.$=r[l];break;case 44:n.addPersonOrSystem("external_system",...r[l]),this.$=r[l];break;case 45:n.addPersonOrSystem("external_system_db",...r[l]),this.$=r[l];break;case 46:n.addPersonOrSystem("external_system_queue",...r[l]),this.$=r[l];break;case 47:n.addContainer("container",...r[l]),this.$=r[l];break;case 48:n.addContainer("container_db",...r[l]),this.$=r[l];break;case 49:n.addContainer("container_queue",...r[l]),this.$=r[l];break;case 50:n.addContainer("external_container",...r[l]),this.$=r[l];break;case 51:n.addContainer("external_container_db",...r[l]),this.$=r[l];break;case 52:n.addContainer("external_container_queue",...r[l]),this.$=r[l];break;case 53:n.addComponent("component",...r[l]),this.$=r[l];break;case 54:n.addComponent("component_db",...r[l]),this.$=r[l];break;case 55:n.addComponent("component_queue",...r[l]),this.$=r[l];break;case 56:n.addComponent("external_component",...r[l]),this.$=r[l];break;case 57:n.addComponent("external_component_db",...r[l]),this.$=r[l];break;case 58:n.addComponent("external_component_queue",...r[l]),this.$=r[l];break;case 60:n.addRel("rel",...r[l]),this.$=r[l];break;case 61:n.addRel("birel",...r[l]),this.$=r[l];break;case 62:n.addRel("rel_u",...r[l]),this.$=r[l];break;case 63:n.addRel("rel_d",...r[l]),this.$=r[l];break;case 64:n.addRel("rel_l",...r[l]),this.$=r[l];break;case 65:n.addRel("rel_r",...r[l]),this.$=r[l];break;case 66:n.addRel("rel_b",...r[l]),this.$=r[l];break;case 67:r[l].splice(0,1),n.addRel("rel",...r[l]),this.$=r[l];break;case 68:n.updateElStyle("update_el_style",...r[l]),this.$=r[l];break;case 69:n.updateRelStyle("update_rel_style",...r[l]),this.$=r[l];break;case 70:n.updateLayoutConfig("update_layout_config",...r[l]),this.$=r[l];break;case 71:this.$=[r[l]];break;case 72:r[l].unshift(r[l-1]),this.$=r[l];break;case 73:case 75:this.$=r[l].trim();break;case 74:let t={};t[r[l-1].trim()]=r[l].trim(),this.$=t;break;case 76:this.$=""}}),"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:e,23:a,24:n,26:i,28:s,29:49,30:61,32:62,34:l,36:o,37:h,38:d,39:u,40:p,41:y,43:23,44:g,45:f,46:b,47:x,48:_,49:m,50:E,51:S,52:A,53:C,54:w,55:k,56:O,57:T,58:v,59:R,60:D,61:N,62:P,63:B,64:I,65:M,66:j,67:K,68:L,69:Y,70:U,71:F,72:X,73:z,74:W},{13:70,19:20,20:21,21:22,22:e,23:a,24:n,26:i,28:s,29:49,30:61,32:62,34:l,36:o,37:h,38:d,39:u,40:p,41:y,43:23,44:g,45:f,46:b,47:x,48:_,49:m,50:E,51:S,52:A,53:C,54:w,55:k,56:O,57:T,58:v,59:R,60:D,61:N,62:P,63:B,64:I,65:M,66:j,67:K,68:L,69:Y,70:U,71:F,72:X,73:z,74:W},{13:71,19:20,20:21,21:22,22:e,23:a,24:n,26:i,28:s,29:49,30:61,32:62,34:l,36:o,37:h,38:d,39:u,40:p,41:y,43:23,44:g,45:f,46:b,47:x,48:_,49:m,50:E,51:S,52:A,53:C,54:w,55:k,56:O,57:T,58:v,59:R,60:D,61:N,62:P,63:B,64:I,65:M,66:j,67:K,68:L,69:Y,70:U,71:F,72:X,73:z,74:W},{13:72,19:20,20:21,21:22,22:e,23:a,24:n,26:i,28:s,29:49,30:61,32:62,34:l,36:o,37:h,38:d,39:u,40:p,41:y,43:23,44:g,45:f,46:b,47:x,48:_,49:m,50:E,51:S,52:A,53:C,54:w,55:k,56:O,57:T,58:v,59:R,60:D,61:N,62:P,63:B,64:I,65:M,66:j,67:K,68:L,69:Y,70:U,71:F,72:X,73:z,74:W},{13:73,19:20,20:21,21:22,22:e,23:a,24:n,26:i,28:s,29:49,30:61,32:62,34:l,36:o,37:h,38:d,39:u,40:p,41:y,43:23,44:g,45:f,46:b,47:x,48:_,49:m,50:E,51:S,52:A,53:C,54:w,55:k,56:O,57:T,58:v,59:R,60:D,61:N,62:P,63:B,64:I,65:M,66:j,67:K,68:L,69:Y,70:U,71:F,72:X,73:z,74:W},{14:[1,74]},t(Q,[2,13],{43:23,29:49,30:61,32:62,20:75,34:l,36:o,37:h,38:d,39:u,40:p,41:y,44:g,45:f,46:b,47:x,48:_,49:m,50:E,51:S,52:A,53:C,54:w,55:k,56:O,57:T,58:v,59:R,60:D,61:N,62:P,63:B,64:I,65:M,66:j,67:K,68:L,69:Y,70:U,71:F,72:X,73:z,74:W}),t(Q,[2,14]),t($,[2,16],{12:[1,76]}),t(Q,[2,36],{12:[1,77]}),t(H,[2,19]),t(H,[2,20]),{25:[1,78]},{27:[1,79]},t(H,[2,23]),{35:80,75:81,76:q,77:V,79:G,80:J},{35:86,75:81,76:q,77:V,79:G,80:J},{35:87,75:81,76:q,77:V,79:G,80:J},{35:88,75:81,76:q,77:V,79:G,80:J},{35:89,75:81,76:q,77:V,79:G,80:J},{35:90,75:81,76:q,77:V,79:G,80:J},{35:91,75:81,76:q,77:V,79:G,80:J},{35:92,75:81,76:q,77:V,79:G,80:J},{35:93,75:81,76:q,77:V,79:G,80:J},{35:94,75:81,76:q,77:V,79:G,80:J},{35:95,75:81,76:q,77:V,79:G,80:J},{35:96,75:81,76:q,77:V,79:G,80:J},{35:97,75:81,76:q,77:V,79:G,80:J},{35:98,75:81,76:q,77:V,79:G,80:J},{35:99,75:81,76:q,77:V,79:G,80:J},{35:100,75:81,76:q,77:V,79:G,80:J},{35:101,75:81,76:q,77:V,79:G,80:J},{35:102,75:81,76:q,77:V,79:G,80:J},{35:103,75:81,76:q,77:V,79:G,80:J},{35:104,75:81,76:q,77:V,79:G,80:J},t(Z,[2,59]),{35:105,75:81,76:q,77:V,79:G,80:J},{35:106,75:81,76:q,77:V,79:G,80:J},{35:107,75:81,76:q,77:V,79:G,80:J},{35:108,75:81,76:q,77:V,79:G,80:J},{35:109,75:81,76:q,77:V,79:G,80:J},{35:110,75:81,76:q,77:V,79:G,80:J},{35:111,75:81,76:q,77:V,79:G,80:J},{35:112,75:81,76:q,77:V,79:G,80:J},{35:113,75:81,76:q,77:V,79:G,80:J},{35:114,75:81,76:q,77:V,79:G,80:J},{35:115,75:81,76:q,77:V,79:G,80:J},{20:116,29:49,30:61,32:62,34:l,36:o,37:h,38:d,39:u,40:p,41:y,43:23,44:g,45:f,46:b,47:x,48:_,49:m,50:E,51:S,52:A,53:C,54:w,55:k,56:O,57:T,58:v,59:R,60:D,61:N,62:P,63:B,64:I,65:M,66:j,67:K,68:L,69:Y,70:U,71:F,72:X,73:z,74:W},{12:[1,118],33:[1,117]},{35:119,75:81,76:q,77:V,79:G,80:J},{35:120,75:81,76:q,77:V,79:G,80:J},{35:121,75:81,76:q,77:V,79:G,80:J},{35:122,75:81,76:q,77:V,79:G,80:J},{35:123,75:81,76:q,77:V,79:G,80:J},{35:124,75:81,76:q,77:V,79:G,80:J},{35:125,75:81,76:q,77:V,79:G,80:J},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},t(Q,[2,15]),t($,[2,17],{21:22,19:130,22:e,23:a,24:n,26:i,28:s}),t(Q,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:e,23:a,24:n,26:i,28:s,34:l,36:o,37:h,38:d,39:u,40:p,41:y,44:g,45:f,46:b,47:x,48:_,49:m,50:E,51:S,52:A,53:C,54:w,55:k,56:O,57:T,58:v,59:R,60:D,61:N,62:P,63:B,64:I,65:M,66:j,67:K,68:L,69:Y,70:U,71:F,72:X,73:z,74:W}),t(H,[2,21]),t(H,[2,22]),t(Z,[2,39]),t(tt,[2,71],{75:81,35:132,76:q,77:V,79:G,80:J}),t(et,[2,73]),{78:[1,133]},t(et,[2,75]),t(et,[2,76]),t(Z,[2,40]),t(Z,[2,41]),t(Z,[2,42]),t(Z,[2,43]),t(Z,[2,44]),t(Z,[2,45]),t(Z,[2,46]),t(Z,[2,47]),t(Z,[2,48]),t(Z,[2,49]),t(Z,[2,50]),t(Z,[2,51]),t(Z,[2,52]),t(Z,[2,53]),t(Z,[2,54]),t(Z,[2,55]),t(Z,[2,56]),t(Z,[2,57]),t(Z,[2,58]),t(Z,[2,60]),t(Z,[2,61]),t(Z,[2,62]),t(Z,[2,63]),t(Z,[2,64]),t(Z,[2,65]),t(Z,[2,66]),t(Z,[2,67]),t(Z,[2,68]),t(Z,[2,69]),t(Z,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},t(at,[2,28]),t(at,[2,29]),t(at,[2,30]),t(at,[2,31]),t(at,[2,32]),t(at,[2,33]),t(at,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},t($,[2,18]),t(Q,[2,38]),t(tt,[2,72]),t(et,[2,74]),t(Z,[2,24]),t(Z,[2,35]),t(nt,[2,25]),t(nt,[2,26],{12:[1,138]}),t(nt,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:(0,r.K2)((function(t,e){if(!e.recoverable){var a=new Error(t);throw a.hash=e,a}this.trace(t)}),"parseError"),parse:(0,r.K2)((function(t){var e=this,a=[0],n=[],i=[null],s=[],l=this.table,o="",c=0,h=0,d=0,u=s.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y.yy[g]=this.yy[g]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var f=p.yylloc;s.push(f);var b=p.options&&p.options.ranges;function x(){var t;return"number"!=typeof(t=n.pop()||p.lex()||1)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,r.K2)((function(t){a.length=a.length-2*t,i.length=i.length-t,s.length=s.length-t}),"popStack"),(0,r.K2)(x,"lex");for(var _,m,E,S,A,C,w,k,O,T={};;){if(E=a[a.length-1],this.defaultActions[E]?S=this.defaultActions[E]:(null==_&&(_=x()),S=l[E]&&l[E][_]),void 0===S||!S.length||!S[0]){var v="";for(C in O=[],l[E])this.terminals_[C]&&C>2&&O.push("'"+this.terminals_[C]+"'");v=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+O.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==_?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(v,{text:p.match,token:this.terminals_[_]||_,line:p.yylineno,loc:f,expected:O})}if(S[0]instanceof Array&&S.length>1)throw new Error("Parse Error: multiple actions possible at state: "+E+", token: "+_);switch(S[0]){case 1:a.push(_),i.push(p.yytext),s.push(p.yylloc),a.push(S[1]),_=null,m?(_=m,m=null):(h=p.yyleng,o=p.yytext,c=p.yylineno,f=p.yylloc,d>0&&d--);break;case 2:if(w=this.productions_[S[1]][1],T.$=i[i.length-w],T._$={first_line:s[s.length-(w||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(w||1)].first_column,last_column:s[s.length-1].last_column},b&&(T._$.range=[s[s.length-(w||1)].range[0],s[s.length-1].range[1]]),void 0!==(A=this.performAction.apply(T,[o,h,c,y.yy,S[1],i,s].concat(u))))return A;w&&(a=a.slice(0,-1*w*2),i=i.slice(0,-1*w),s=s.slice(0,-1*w)),a.push(this.productions_[S[1]][0]),i.push(T.$),s.push(T._$),k=l[a[a.length-2]][a[a.length-1]],a.push(k);break;case 3:return!0}}return!0}),"parse")},rt=function(){return{EOF:1,parseError:(0,r.K2)((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:(0,r.K2)((function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this}),"setInput"),input:(0,r.K2)((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t}),"input"),unput:(0,r.K2)((function(t){var e=t.length,a=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),a.length-1&&(this.yylineno-=a.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:a?(a.length===n.length?this.yylloc.first_column:0)+n[n.length-a.length].length-a[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"unput"),more:(0,r.K2)((function(){return this._more=!0,this}),"more"),reject:(0,r.K2)((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:(0,r.K2)((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:(0,r.K2)((function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:(0,r.K2)((function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:(0,r.K2)((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:(0,r.K2)((function(t,e){var a,n,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],a=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a)return a;if(this._backtrack){for(var r in i)this[r]=i[r];return!1}return!1}),"test_match"),next:(0,r.K2)((function(){if(this.done)return this.EOF;var t,e,a,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),r=0;re[0].length)){if(e=a,n=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(a,i[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:(0,r.K2)((function(){var t=this.next();return t||this.lex()}),"lex"),begin:(0,r.K2)((function(t){this.conditionStack.push(t)}),"begin"),popState:(0,r.K2)((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:(0,r.K2)((function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules}),"_currentRules"),topState:(0,r.K2)((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:(0,r.K2)((function(t){this.begin(t)}),"pushState"),stateStackSize:(0,r.K2)((function(){return this.conditionStack.length}),"stateStackSize"),options:{},performAction:(0,r.K2)((function(t,e,a,n){switch(a){case 0:return 6;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 22;case 5:return 23;case 6:return this.begin("acc_title"),24;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),26;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:case 73:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:case 16:case 70:break;case 14:c;break;case 15:return 12;case 17:return 11;case 18:return 15;case 19:return 16;case 20:return 17;case 21:return 18;case 22:return this.begin("person_ext"),45;case 23:return this.begin("person"),44;case 24:return this.begin("system_ext_queue"),51;case 25:return this.begin("system_ext_db"),50;case 26:return this.begin("system_ext"),49;case 27:return this.begin("system_queue"),48;case 28:return this.begin("system_db"),47;case 29:return this.begin("system"),46;case 30:return this.begin("boundary"),37;case 31:return this.begin("enterprise_boundary"),34;case 32:return this.begin("system_boundary"),36;case 33:return this.begin("container_ext_queue"),57;case 34:return this.begin("container_ext_db"),56;case 35:return this.begin("container_ext"),55;case 36:return this.begin("container_queue"),54;case 37:return this.begin("container_db"),53;case 38:return this.begin("container"),52;case 39:return this.begin("container_boundary"),38;case 40:return this.begin("component_ext_queue"),63;case 41:return this.begin("component_ext_db"),62;case 42:return this.begin("component_ext"),61;case 43:return this.begin("component_queue"),60;case 44:return this.begin("component_db"),59;case 45:return this.begin("component"),58;case 46:case 47:return this.begin("node"),39;case 48:return this.begin("node_l"),40;case 49:return this.begin("node_r"),41;case 50:return this.begin("rel"),64;case 51:return this.begin("birel"),65;case 52:case 53:return this.begin("rel_u"),66;case 54:case 55:return this.begin("rel_d"),67;case 56:case 57:return this.begin("rel_l"),68;case 58:case 59:return this.begin("rel_r"),69;case 60:return this.begin("rel_b"),70;case 61:return this.begin("rel_index"),71;case 62:return this.begin("update_el_style"),72;case 63:return this.begin("update_rel_style"),73;case 64:return this.begin("update_layout_config"),74;case 65:return"EOF_IN_STRUCT";case 66:return this.begin("attribute"),"ATTRIBUTE_EMPTY";case 67:this.begin("attribute");break;case 68:case 79:this.popState(),this.popState();break;case 69:case 71:return 80;case 72:this.begin("string");break;case 74:case 80:return"STR";case 75:this.begin("string_kv");break;case 76:return this.begin("string_kv_key"),"STR_KEY";case 77:this.popState(),this.begin("string_kv_value");break;case 78:return"STR_VALUE";case 81:return"LBRACE";case 82:return"RBRACE";case 83:return"SPACE";case 84:return"EOL";case 85:return 14}}),"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:title\s[^#\n;]+)/,/^(?:accDescription\s[^#\n;]+)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:C4Context\b)/,/^(?:C4Container\b)/,/^(?:C4Component\b)/,/^(?:C4Dynamic\b)/,/^(?:C4Deployment\b)/,/^(?:Person_Ext\b)/,/^(?:Person\b)/,/^(?:SystemQueue_Ext\b)/,/^(?:SystemDb_Ext\b)/,/^(?:System_Ext\b)/,/^(?:SystemQueue\b)/,/^(?:SystemDb\b)/,/^(?:System\b)/,/^(?:Boundary\b)/,/^(?:Enterprise_Boundary\b)/,/^(?:System_Boundary\b)/,/^(?:ContainerQueue_Ext\b)/,/^(?:ContainerDb_Ext\b)/,/^(?:Container_Ext\b)/,/^(?:ContainerQueue\b)/,/^(?:ContainerDb\b)/,/^(?:Container\b)/,/^(?:Container_Boundary\b)/,/^(?:ComponentQueue_Ext\b)/,/^(?:ComponentDb_Ext\b)/,/^(?:Component_Ext\b)/,/^(?:ComponentQueue\b)/,/^(?:ComponentDb\b)/,/^(?:Component\b)/,/^(?:Deployment_Node\b)/,/^(?:Node\b)/,/^(?:Node_L\b)/,/^(?:Node_R\b)/,/^(?:Rel\b)/,/^(?:BiRel\b)/,/^(?:Rel_Up\b)/,/^(?:Rel_U\b)/,/^(?:Rel_Down\b)/,/^(?:Rel_D\b)/,/^(?:Rel_Left\b)/,/^(?:Rel_L\b)/,/^(?:Rel_Right\b)/,/^(?:Rel_R\b)/,/^(?:Rel_Back\b)/,/^(?:RelIndex\b)/,/^(?:UpdateElementStyle\b)/,/^(?:UpdateRelStyle\b)/,/^(?:UpdateLayoutConfig\b)/,/^(?:$)/,/^(?:[(][ ]*[,])/,/^(?:[(])/,/^(?:[)])/,/^(?:,,)/,/^(?:,)/,/^(?:[ ]*["]["])/,/^(?:[ ]*["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[ ]*[\$])/,/^(?:[^=]*)/,/^(?:[=][ ]*["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:[^,]+)/,/^(?:\{)/,/^(?:\})/,/^(?:[\s]+)/,/^(?:[\n\r]+)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},string_kv_value:{rules:[78,79],inclusive:!1},string_kv_key:{rules:[77],inclusive:!1},string_kv:{rules:[76],inclusive:!1},string:{rules:[73,74],inclusive:!1},attribute:{rules:[68,69,70,71,72,75,80],inclusive:!1},update_layout_config:{rules:[65,66,67,68],inclusive:!1},update_rel_style:{rules:[65,66,67,68],inclusive:!1},update_el_style:{rules:[65,66,67,68],inclusive:!1},rel_b:{rules:[65,66,67,68],inclusive:!1},rel_r:{rules:[65,66,67,68],inclusive:!1},rel_l:{rules:[65,66,67,68],inclusive:!1},rel_d:{rules:[65,66,67,68],inclusive:!1},rel_u:{rules:[65,66,67,68],inclusive:!1},rel_bi:{rules:[],inclusive:!1},rel:{rules:[65,66,67,68],inclusive:!1},node_r:{rules:[65,66,67,68],inclusive:!1},node_l:{rules:[65,66,67,68],inclusive:!1},node:{rules:[65,66,67,68],inclusive:!1},index:{rules:[],inclusive:!1},rel_index:{rules:[65,66,67,68],inclusive:!1},component_ext_queue:{rules:[],inclusive:!1},component_ext_db:{rules:[65,66,67,68],inclusive:!1},component_ext:{rules:[65,66,67,68],inclusive:!1},component_queue:{rules:[65,66,67,68],inclusive:!1},component_db:{rules:[65,66,67,68],inclusive:!1},component:{rules:[65,66,67,68],inclusive:!1},container_boundary:{rules:[65,66,67,68],inclusive:!1},container_ext_queue:{rules:[65,66,67,68],inclusive:!1},container_ext_db:{rules:[65,66,67,68],inclusive:!1},container_ext:{rules:[65,66,67,68],inclusive:!1},container_queue:{rules:[65,66,67,68],inclusive:!1},container_db:{rules:[65,66,67,68],inclusive:!1},container:{rules:[65,66,67,68],inclusive:!1},birel:{rules:[65,66,67,68],inclusive:!1},system_boundary:{rules:[65,66,67,68],inclusive:!1},enterprise_boundary:{rules:[65,66,67,68],inclusive:!1},boundary:{rules:[65,66,67,68],inclusive:!1},system_ext_queue:{rules:[65,66,67,68],inclusive:!1},system_ext_db:{rules:[65,66,67,68],inclusive:!1},system_ext:{rules:[65,66,67,68],inclusive:!1},system_queue:{rules:[65,66,67,68],inclusive:!1},system_db:{rules:[65,66,67,68],inclusive:!1},system:{rules:[65,66,67,68],inclusive:!1},person_ext:{rules:[65,66,67,68],inclusive:!1},person:{rules:[65,66,67,68],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,81,82,83,84,85],inclusive:!0}}}}();function st(){this.yy={}}return it.lexer=rt,(0,r.K2)(st,"Parser"),st.prototype=it,it.Parser=st,new st}();o.parser=o;var h,d=o,u=[],p=[""],y="global",g="",f=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],b=[],x="",_=!1,m=4,E=2,S=(0,r.K2)((function(){return h}),"getC4Type"),A=(0,r.K2)((function(t){let e=(0,r.jZ)(t,(0,r.D7)());h=e}),"setC4Type"),C=(0,r.K2)((function(t,e,a,n,i,r,s,l,o){if(null==t||null==e||null==a||null==n)return;let c={};const h=b.find((t=>t.from===e&&t.to===a));if(h?c=h:b.push(c),c.type=t,c.from=e,c.to=a,c.label={text:n},null==i)c.techn={text:""};else if("object"==typeof i){let[t,e]=Object.entries(i)[0];c[t]={text:e}}else c.techn={text:i};if(null==r)c.descr={text:""};else if("object"==typeof r){let[t,e]=Object.entries(r)[0];c[t]={text:e}}else c.descr={text:r};if("object"==typeof s){let[t,e]=Object.entries(s)[0];c[t]=e}else c.sprite=s;if("object"==typeof l){let[t,e]=Object.entries(l)[0];c[t]=e}else c.tags=l;if("object"==typeof o){let[t,e]=Object.entries(o)[0];c[t]=e}else c.link=o;c.wrap=$()}),"addRel"),w=(0,r.K2)((function(t,e,a,n,i,r,s){if(null===e||null===a)return;let l={};const o=u.find((t=>t.alias===e));if(o&&e===o.alias?l=o:(l.alias=e,u.push(l)),l.label=null==a?{text:""}:{text:a},null==n)l.descr={text:""};else if("object"==typeof n){let[t,e]=Object.entries(n)[0];l[t]={text:e}}else l.descr={text:n};if("object"==typeof i){let[t,e]=Object.entries(i)[0];l[t]=e}else l.sprite=i;if("object"==typeof r){let[t,e]=Object.entries(r)[0];l[t]=e}else l.tags=r;if("object"==typeof s){let[t,e]=Object.entries(s)[0];l[t]=e}else l.link=s;l.typeC4Shape={text:t},l.parentBoundary=y,l.wrap=$()}),"addPersonOrSystem"),k=(0,r.K2)((function(t,e,a,n,i,r,s,l){if(null===e||null===a)return;let o={};const c=u.find((t=>t.alias===e));if(c&&e===c.alias?o=c:(o.alias=e,u.push(o)),o.label=null==a?{text:""}:{text:a},null==n)o.techn={text:""};else if("object"==typeof n){let[t,e]=Object.entries(n)[0];o[t]={text:e}}else o.techn={text:n};if(null==i)o.descr={text:""};else if("object"==typeof i){let[t,e]=Object.entries(i)[0];o[t]={text:e}}else o.descr={text:i};if("object"==typeof r){let[t,e]=Object.entries(r)[0];o[t]=e}else o.sprite=r;if("object"==typeof s){let[t,e]=Object.entries(s)[0];o[t]=e}else o.tags=s;if("object"==typeof l){let[t,e]=Object.entries(l)[0];o[t]=e}else o.link=l;o.wrap=$(),o.typeC4Shape={text:t},o.parentBoundary=y}),"addContainer"),O=(0,r.K2)((function(t,e,a,n,i,r,s,l){if(null===e||null===a)return;let o={};const c=u.find((t=>t.alias===e));if(c&&e===c.alias?o=c:(o.alias=e,u.push(o)),o.label=null==a?{text:""}:{text:a},null==n)o.techn={text:""};else if("object"==typeof n){let[t,e]=Object.entries(n)[0];o[t]={text:e}}else o.techn={text:n};if(null==i)o.descr={text:""};else if("object"==typeof i){let[t,e]=Object.entries(i)[0];o[t]={text:e}}else o.descr={text:i};if("object"==typeof r){let[t,e]=Object.entries(r)[0];o[t]=e}else o.sprite=r;if("object"==typeof s){let[t,e]=Object.entries(s)[0];o[t]=e}else o.tags=s;if("object"==typeof l){let[t,e]=Object.entries(l)[0];o[t]=e}else o.link=l;o.wrap=$(),o.typeC4Shape={text:t},o.parentBoundary=y}),"addComponent"),T=(0,r.K2)((function(t,e,a,n,i){if(null===t||null===e)return;let r={};const s=f.find((e=>e.alias===t));if(s&&t===s.alias?r=s:(r.alias=t,f.push(r)),r.label=null==e?{text:""}:{text:e},null==a)r.type={text:"system"};else if("object"==typeof a){let[t,e]=Object.entries(a)[0];r[t]={text:e}}else r.type={text:a};if("object"==typeof n){let[t,e]=Object.entries(n)[0];r[t]=e}else r.tags=n;if("object"==typeof i){let[t,e]=Object.entries(i)[0];r[t]=e}else r.link=i;r.parentBoundary=y,r.wrap=$(),g=y,y=t,p.push(g)}),"addPersonOrSystemBoundary"),v=(0,r.K2)((function(t,e,a,n,i){if(null===t||null===e)return;let r={};const s=f.find((e=>e.alias===t));if(s&&t===s.alias?r=s:(r.alias=t,f.push(r)),r.label=null==e?{text:""}:{text:e},null==a)r.type={text:"container"};else if("object"==typeof a){let[t,e]=Object.entries(a)[0];r[t]={text:e}}else r.type={text:a};if("object"==typeof n){let[t,e]=Object.entries(n)[0];r[t]=e}else r.tags=n;if("object"==typeof i){let[t,e]=Object.entries(i)[0];r[t]=e}else r.link=i;r.parentBoundary=y,r.wrap=$(),g=y,y=t,p.push(g)}),"addContainerBoundary"),R=(0,r.K2)((function(t,e,a,n,i,r,s,l){if(null===e||null===a)return;let o={};const c=f.find((t=>t.alias===e));if(c&&e===c.alias?o=c:(o.alias=e,f.push(o)),o.label=null==a?{text:""}:{text:a},null==n)o.type={text:"node"};else if("object"==typeof n){let[t,e]=Object.entries(n)[0];o[t]={text:e}}else o.type={text:n};if(null==i)o.descr={text:""};else if("object"==typeof i){let[t,e]=Object.entries(i)[0];o[t]={text:e}}else o.descr={text:i};if("object"==typeof s){let[t,e]=Object.entries(s)[0];o[t]=e}else o.tags=s;if("object"==typeof l){let[t,e]=Object.entries(l)[0];o[t]=e}else o.link=l;o.nodeType=t,o.parentBoundary=y,o.wrap=$(),g=y,y=e,p.push(g)}),"addDeploymentNode"),D=(0,r.K2)((function(){y=g,p.pop(),g=p.pop(),p.push(g)}),"popBoundaryParseStack"),N=(0,r.K2)((function(t,e,a,n,i,r,s,l,o,c,h){let d=u.find((t=>t.alias===e));if(void 0!==d||(d=f.find((t=>t.alias===e)),void 0!==d)){if(null!=a)if("object"==typeof a){let[t,e]=Object.entries(a)[0];d[t]=e}else d.bgColor=a;if(null!=n)if("object"==typeof n){let[t,e]=Object.entries(n)[0];d[t]=e}else d.fontColor=n;if(null!=i)if("object"==typeof i){let[t,e]=Object.entries(i)[0];d[t]=e}else d.borderColor=i;if(null!=r)if("object"==typeof r){let[t,e]=Object.entries(r)[0];d[t]=e}else d.shadowing=r;if(null!=s)if("object"==typeof s){let[t,e]=Object.entries(s)[0];d[t]=e}else d.shape=s;if(null!=l)if("object"==typeof l){let[t,e]=Object.entries(l)[0];d[t]=e}else d.sprite=l;if(null!=o)if("object"==typeof o){let[t,e]=Object.entries(o)[0];d[t]=e}else d.techn=o;if(null!=c)if("object"==typeof c){let[t,e]=Object.entries(c)[0];d[t]=e}else d.legendText=c;if(null!=h)if("object"==typeof h){let[t,e]=Object.entries(h)[0];d[t]=e}else d.legendSprite=h}}),"updateElStyle"),P=(0,r.K2)((function(t,e,a,n,i,r,s){const l=b.find((t=>t.from===e&&t.to===a));if(void 0!==l){if(null!=n)if("object"==typeof n){let[t,e]=Object.entries(n)[0];l[t]=e}else l.textColor=n;if(null!=i)if("object"==typeof i){let[t,e]=Object.entries(i)[0];l[t]=e}else l.lineColor=i;if(null!=r)if("object"==typeof r){let[t,e]=Object.entries(r)[0];l[t]=parseInt(e)}else l.offsetX=parseInt(r);if(null!=s)if("object"==typeof s){let[t,e]=Object.entries(s)[0];l[t]=parseInt(e)}else l.offsetY=parseInt(s)}}),"updateRelStyle"),B=(0,r.K2)((function(t,e,a){let n=m,i=E;if("object"==typeof e){const t=Object.values(e)[0];n=parseInt(t)}else n=parseInt(e);if("object"==typeof a){const t=Object.values(a)[0];i=parseInt(t)}else i=parseInt(a);n>=1&&(m=n),i>=1&&(E=i)}),"updateLayoutConfig"),I=(0,r.K2)((function(){return m}),"getC4ShapeInRow"),M=(0,r.K2)((function(){return E}),"getC4BoundaryInRow"),j=(0,r.K2)((function(){return y}),"getCurrentBoundaryParse"),K=(0,r.K2)((function(){return g}),"getParentBoundaryParse"),L=(0,r.K2)((function(t){return null==t?u:u.filter((e=>e.parentBoundary===t))}),"getC4ShapeArray"),Y=(0,r.K2)((function(t){return u.find((e=>e.alias===t))}),"getC4Shape"),U=(0,r.K2)((function(t){return Object.keys(L(t))}),"getC4ShapeKeys"),F=(0,r.K2)((function(t){return null==t?f:f.filter((e=>e.parentBoundary===t))}),"getBoundaries"),X=F,z=(0,r.K2)((function(){return b}),"getRels"),W=(0,r.K2)((function(){return x}),"getTitle"),Q=(0,r.K2)((function(t){_=t}),"setWrap"),$=(0,r.K2)((function(){return _}),"autoWrap"),H=(0,r.K2)((function(){u=[],f=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],g="",y="global",p=[""],b=[],p=[""],x="",_=!1,m=4,E=2}),"clear"),q=(0,r.K2)((function(t){let e=(0,r.jZ)(t,(0,r.D7)());x=e}),"setTitle"),V={addPersonOrSystem:w,addPersonOrSystemBoundary:T,addContainer:k,addContainerBoundary:v,addComponent:O,addDeploymentNode:R,popBoundaryParseStack:D,addRel:C,updateElStyle:N,updateRelStyle:P,updateLayoutConfig:B,autoWrap:$,setWrap:Q,getC4ShapeArray:L,getC4Shape:Y,getC4ShapeKeys:U,getBoundaries:F,getBoundarys:X,getCurrentBoundaryParse:j,getParentBoundaryParse:K,getRels:z,getTitle:W,getC4Type:S,getC4ShapeInRow:I,getC4BoundaryInRow:M,setAccTitle:r.SV,getAccTitle:r.iN,getAccDescription:r.m7,setAccDescription:r.EI,getConfig:(0,r.K2)((()=>(0,r.D7)().c4),"getConfig"),clear:H,LINETYPE:{SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25},ARROWTYPE:{FILLED:0,OPEN:1},PLACEMENT:{LEFTOF:0,RIGHTOF:1,OVER:2},setTitle:q,setC4Type:A},G=(0,r.K2)((function(t,e){return(0,n.tk)(t,e)}),"drawRect"),J=(0,r.K2)((function(t,e,a,n,i,r){const s=t.append("image");s.attr("width",e),s.attr("height",a),s.attr("x",n),s.attr("y",i);let o=r.startsWith("data:image/png;base64")?r:(0,l.J)(r);s.attr("xlink:href",o)}),"drawImage"),Z=(0,r.K2)(((t,e,a)=>{const n=t.append("g");let i=0;for(let r of e){let t=r.textColor?r.textColor:"#444444",e=r.lineColor?r.lineColor:"#444444",s=r.offsetX?parseInt(r.offsetX):0,l=r.offsetY?parseInt(r.offsetY):0,o="";if(0===i){let t=n.append("line");t.attr("x1",r.startPoint.x),t.attr("y1",r.startPoint.y),t.attr("x2",r.endPoint.x),t.attr("y2",r.endPoint.y),t.attr("stroke-width","1"),t.attr("stroke",e),t.style("fill","none"),"rel_b"!==r.type&&t.attr("marker-end","url("+o+"#arrowhead)"),"birel"!==r.type&&"rel_b"!==r.type||t.attr("marker-start","url("+o+"#arrowend)"),i=-1}else{let t=n.append("path");t.attr("fill","none").attr("stroke-width","1").attr("stroke",e).attr("d","Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx",r.startPoint.x).replaceAll("starty",r.startPoint.y).replaceAll("controlx",r.startPoint.x+(r.endPoint.x-r.startPoint.x)/2-(r.endPoint.x-r.startPoint.x)/4).replaceAll("controly",r.startPoint.y+(r.endPoint.y-r.startPoint.y)/2).replaceAll("stopx",r.endPoint.x).replaceAll("stopy",r.endPoint.y)),"rel_b"!==r.type&&t.attr("marker-end","url("+o+"#arrowhead)"),"birel"!==r.type&&"rel_b"!==r.type||t.attr("marker-start","url("+o+"#arrowend)")}let c=a.messageFont();dt(a)(r.label.text,n,Math.min(r.startPoint.x,r.endPoint.x)+Math.abs(r.endPoint.x-r.startPoint.x)/2+s,Math.min(r.startPoint.y,r.endPoint.y)+Math.abs(r.endPoint.y-r.startPoint.y)/2+l,r.label.width,r.label.height,{fill:t},c),r.techn&&""!==r.techn.text&&(c=a.messageFont(),dt(a)("["+r.techn.text+"]",n,Math.min(r.startPoint.x,r.endPoint.x)+Math.abs(r.endPoint.x-r.startPoint.x)/2+s,Math.min(r.startPoint.y,r.endPoint.y)+Math.abs(r.endPoint.y-r.startPoint.y)/2+a.messageFontSize+5+l,Math.max(r.label.width,r.techn.width),r.techn.height,{fill:t,"font-style":"italic"},c))}}),"drawRels"),tt=(0,r.K2)((function(t,e,a){const n=t.append("g");let i=e.bgColor?e.bgColor:"none",r=e.borderColor?e.borderColor:"#444444",s=e.fontColor?e.fontColor:"black",l={"stroke-width":1,"stroke-dasharray":"7.0,7.0"};e.nodeType&&(l={"stroke-width":1});let o={x:e.x,y:e.y,fill:i,stroke:r,width:e.width,height:e.height,rx:2.5,ry:2.5,attrs:l};G(n,o);let c=a.boundaryFont();c.fontWeight="bold",c.fontSize=c.fontSize+2,c.fontColor=s,dt(a)(e.label.text,n,e.x,e.y+e.label.Y,e.width,e.height,{fill:"#444444"},c),e.type&&""!==e.type.text&&(c=a.boundaryFont(),c.fontColor=s,dt(a)(e.type.text,n,e.x,e.y+e.type.Y,e.width,e.height,{fill:"#444444"},c)),e.descr&&""!==e.descr.text&&(c=a.boundaryFont(),c.fontSize=c.fontSize-2,c.fontColor=s,dt(a)(e.descr.text,n,e.x,e.y+e.descr.Y,e.width,e.height,{fill:"#444444"},c))}),"drawBoundary"),et=(0,r.K2)((function(t,e,a){let i=e.bgColor?e.bgColor:a[e.typeC4Shape.text+"_bg_color"],r=e.borderColor?e.borderColor:a[e.typeC4Shape.text+"_border_color"],s=e.fontColor?e.fontColor:"#FFFFFF",l="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";switch(e.typeC4Shape.text){case"person":l="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";break;case"external_person":l="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII="}const o=t.append("g");o.attr("class","person-man");const c=(0,n.PB)();switch(e.typeC4Shape.text){case"person":case"external_person":case"system":case"external_system":case"container":case"external_container":case"component":case"external_component":c.x=e.x,c.y=e.y,c.fill=i,c.width=e.width,c.height=e.height,c.stroke=r,c.rx=2.5,c.ry=2.5,c.attrs={"stroke-width":.5},G(o,c);break;case"system_db":case"external_system_db":case"container_db":case"external_container_db":case"component_db":case"external_component_db":o.append("path").attr("fill",i).attr("stroke-width","0.5").attr("stroke",r).attr("d","Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("half",e.width/2).replaceAll("height",e.height)),o.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",r).attr("d","Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("half",e.width/2));break;case"system_queue":case"external_system_queue":case"container_queue":case"external_container_queue":case"component_queue":case"external_component_queue":o.append("path").attr("fill",i).attr("stroke-width","0.5").attr("stroke",r).attr("d","Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("width",e.width).replaceAll("half",e.height/2)),o.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",r).attr("d","Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx",e.x+e.width).replaceAll("starty",e.y).replaceAll("half",e.height/2))}let h=ht(a,e.typeC4Shape.text);switch(o.append("text").attr("fill",s).attr("font-family",h.fontFamily).attr("font-size",h.fontSize-2).attr("font-style","italic").attr("lengthAdjust","spacing").attr("textLength",e.typeC4Shape.width).attr("x",e.x+e.width/2-e.typeC4Shape.width/2).attr("y",e.y+e.typeC4Shape.Y).text("<<"+e.typeC4Shape.text+">>"),e.typeC4Shape.text){case"person":case"external_person":J(o,48,48,e.x+e.width/2-24,e.y+e.image.Y,l)}let d=a[e.typeC4Shape.text+"Font"]();return d.fontWeight="bold",d.fontSize=d.fontSize+2,d.fontColor=s,dt(a)(e.label.text,o,e.x,e.y+e.label.Y,e.width,e.height,{fill:s},d),d=a[e.typeC4Shape.text+"Font"](),d.fontColor=s,e.techn&&""!==e.techn?.text?dt(a)(e.techn.text,o,e.x,e.y+e.techn.Y,e.width,e.height,{fill:s,"font-style":"italic"},d):e.type&&""!==e.type.text&&dt(a)(e.type.text,o,e.x,e.y+e.type.Y,e.width,e.height,{fill:s,"font-style":"italic"},d),e.descr&&""!==e.descr.text&&(d=a.personFont(),d.fontColor=s,dt(a)(e.descr.text,o,e.x,e.y+e.descr.Y,e.width,e.height,{fill:s},d)),e.height}),"drawC4Shape"),at=(0,r.K2)((function(t){t.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")}),"insertDatabaseIcon"),nt=(0,r.K2)((function(t){t.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")}),"insertComputerIcon"),it=(0,r.K2)((function(t){t.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")}),"insertClockIcon"),rt=(0,r.K2)((function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")}),"insertArrowHead"),st=(0,r.K2)((function(t){t.append("defs").append("marker").attr("id","arrowend").attr("refX",1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z")}),"insertArrowEnd"),lt=(0,r.K2)((function(t){t.append("defs").append("marker").attr("id","filled-head").attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")}),"insertArrowFilledHead"),ot=(0,r.K2)((function(t){t.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)}),"insertDynamicNumber"),ct=(0,r.K2)((function(t){const e=t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);e.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),e.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")}),"insertArrowCrossHead"),ht=(0,r.K2)(((t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]})),"getC4ShapeFont"),dt=function(){function t(t,e,a,i,r,s,l){n(e.append("text").attr("x",a+r/2).attr("y",i+s/2+5).style("text-anchor","middle").text(t),l)}function e(t,e,a,i,s,l,o,c){const{fontSize:h,fontFamily:d,fontWeight:u}=c,p=t.split(r.Y2.lineBreakRegex);for(let r=0;r=this.data.widthLimit||a>=this.data.widthLimit||this.nextData.cnt>gt)&&(e=this.nextData.startx+t.margin+bt.nextLinePaddingX,n=this.nextData.stopy+2*t.margin,this.nextData.stopx=a=e+t.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=i=n+t.height,this.nextData.cnt=1),t.x=e,t.y=n,this.updateVal(this.data,"startx",e,Math.min),this.updateVal(this.data,"starty",n,Math.min),this.updateVal(this.data,"stopx",a,Math.max),this.updateVal(this.data,"stopy",i,Math.max),this.updateVal(this.nextData,"startx",e,Math.min),this.updateVal(this.nextData,"starty",n,Math.min),this.updateVal(this.nextData,"stopx",a,Math.max),this.updateVal(this.nextData,"stopy",i,Math.max)}init(t){this.name="",this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,widthLimit:void 0},this.nextData={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,cnt:0},_t(t.db.getConfig())}bumpLastMargin(t){this.data.stopx+=t,this.data.stopy+=t}},_t=(0,r.K2)((function(t){(0,r.hH)(bt,t),t.fontFamily&&(bt.personFontFamily=bt.systemFontFamily=bt.messageFontFamily=t.fontFamily),t.fontSize&&(bt.personFontSize=bt.systemFontSize=bt.messageFontSize=t.fontSize),t.fontWeight&&(bt.personFontWeight=bt.systemFontWeight=bt.messageFontWeight=t.fontWeight)}),"setConf"),mt=(0,r.K2)(((t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]})),"c4ShapeFont"),Et=(0,r.K2)((t=>({fontFamily:t.boundaryFontFamily,fontSize:t.boundaryFontSize,fontWeight:t.boundaryFontWeight})),"boundaryFont"),St=(0,r.K2)((t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight})),"messageFont");function At(t,e,a,n,s){if(!e[t].width)if(a)e[t].text=(0,i.bH)(e[t].text,s,n),e[t].textLines=e[t].text.split(r.Y2.lineBreakRegex).length,e[t].width=s,e[t].height=(0,i.ru)(e[t].text,n);else{let a=e[t].text.split(r.Y2.lineBreakRegex);e[t].textLines=a.length;let s=0;e[t].height=0,e[t].width=0;for(const r of a)e[t].width=Math.max((0,i.Un)(r,n),e[t].width),s=(0,i.ru)(r,n),e[t].height=e[t].height+s}}(0,r.K2)(At,"calcC4ShapeTextWH");var Ct=(0,r.K2)((function(t,e,a){e.x=a.data.startx,e.y=a.data.starty,e.width=a.data.stopx-a.data.startx,e.height=a.data.stopy-a.data.starty,e.label.y=bt.c4ShapeMargin-35;let n=e.wrap&&bt.wrap,r=Et(bt);r.fontSize=r.fontSize+2,r.fontWeight="bold",At("label",e,n,r,(0,i.Un)(e.label.text,r)),ut.drawBoundary(t,e,bt)}),"drawBoundary"),wt=(0,r.K2)((function(t,e,a,n){let r=0;for(const s of n){r=0;const n=a[s];let l=mt(bt,n.typeC4Shape.text);switch(l.fontSize=l.fontSize-2,n.typeC4Shape.width=(0,i.Un)("\xab"+n.typeC4Shape.text+"\xbb",l),n.typeC4Shape.height=l.fontSize+2,n.typeC4Shape.Y=bt.c4ShapePadding,r=n.typeC4Shape.Y+n.typeC4Shape.height-4,n.image={width:0,height:0,Y:0},n.typeC4Shape.text){case"person":case"external_person":n.image.width=48,n.image.height=48,n.image.Y=r,r=n.image.Y+n.image.height}n.sprite&&(n.image.width=48,n.image.height=48,n.image.Y=r,r=n.image.Y+n.image.height);let o=n.wrap&&bt.wrap,c=bt.width-2*bt.c4ShapePadding,h=mt(bt,n.typeC4Shape.text);if(h.fontSize=h.fontSize+2,h.fontWeight="bold",At("label",n,o,h,c),n.label.Y=r+8,r=n.label.Y+n.label.height,n.type&&""!==n.type.text){n.type.text="["+n.type.text+"]",At("type",n,o,mt(bt,n.typeC4Shape.text),c),n.type.Y=r+5,r=n.type.Y+n.type.height}else if(n.techn&&""!==n.techn.text){n.techn.text="["+n.techn.text+"]",At("techn",n,o,mt(bt,n.techn.text),c),n.techn.Y=r+5,r=n.techn.Y+n.techn.height}let d=r,u=n.label.width;if(n.descr&&""!==n.descr.text){At("descr",n,o,mt(bt,n.typeC4Shape.text),c),n.descr.Y=r+20,r=n.descr.Y+n.descr.height,u=Math.max(n.label.width,n.descr.width),d=r-5*n.descr.textLines}u+=bt.c4ShapePadding,n.width=Math.max(n.width||bt.width,u,bt.width),n.height=Math.max(n.height||bt.height,d,bt.height),n.margin=n.margin||bt.c4ShapeMargin,t.insert(n),ut.drawC4Shape(e,n,bt)}t.bumpLastMargin(bt.c4ShapeMargin)}),"drawC4ShapeArray"),kt=class{static{(0,r.K2)(this,"Point")}constructor(t,e){this.x=t,this.y=e}},Ot=(0,r.K2)((function(t,e){let a=t.x,n=t.y,i=e.x,r=e.y,s=a+t.width/2,l=n+t.height/2,o=Math.abs(a-i),c=Math.abs(n-r),h=c/o,d=t.height/t.width,u=null;return n==r&&ai?u=new kt(a,l):a==i&&nr&&(u=new kt(s,n)),a>i&&n=h?new kt(a,l+h*t.width/2):new kt(s-o/c*t.height/2,n+t.height):a=h?new kt(a+t.width,l+h*t.width/2):new kt(s+o/c*t.height/2,n+t.height):ar?u=d>=h?new kt(a+t.width,l-h*t.width/2):new kt(s+t.height/2*o/c,n):a>i&&n>r&&(u=d>=h?new kt(a,l-t.width/2*h):new kt(s-t.height/2*o/c,n)),u}),"getIntersectPoint"),Tt=(0,r.K2)((function(t,e){let a={x:0,y:0};a.x=e.x+e.width/2,a.y=e.y+e.height/2;let n=Ot(t,a);return a.x=t.x+t.width/2,a.y=t.y+t.height/2,{startPoint:n,endPoint:Ot(e,a)}}),"getIntersectPoints"),vt=(0,r.K2)((function(t,e,a,n){let r=0;for(let s of e){r+=1;let t=s.wrap&&bt.wrap,e=St(bt);"C4Dynamic"===n.db.getC4Type()&&(s.label.text=r+": "+s.label.text);let l=(0,i.Un)(s.label.text,e);At("label",s,t,e,l),s.techn&&""!==s.techn.text&&(l=(0,i.Un)(s.techn.text,e),At("techn",s,t,e,l)),s.descr&&""!==s.descr.text&&(l=(0,i.Un)(s.descr.text,e),At("descr",s,t,e,l));let o=a(s.from),c=a(s.to),h=Tt(o,c);s.startPoint=h.startPoint,s.endPoint=h.endPoint}ut.drawRels(t,e,bt)}),"drawRels");function Rt(t,e,a,n,i){let r=new xt(i);r.data.widthLimit=a.data.widthLimit/Math.min(ft,n.length);for(let[s,l]of n.entries()){let n=0;l.image={width:0,height:0,Y:0},l.sprite&&(l.image.width=48,l.image.height=48,l.image.Y=n,n=l.image.Y+l.image.height);let o=l.wrap&&bt.wrap,c=Et(bt);if(c.fontSize=c.fontSize+2,c.fontWeight="bold",At("label",l,o,c,r.data.widthLimit),l.label.Y=n+8,n=l.label.Y+l.label.height,l.type&&""!==l.type.text){l.type.text="["+l.type.text+"]",At("type",l,o,Et(bt),r.data.widthLimit),l.type.Y=n+5,n=l.type.Y+l.type.height}if(l.descr&&""!==l.descr.text){let t=Et(bt);t.fontSize=t.fontSize-2,At("descr",l,o,t,r.data.widthLimit),l.descr.Y=n+20,n=l.descr.Y+l.descr.height}if(0==s||s%ft==0){let t=a.data.startx+bt.diagramMarginX,e=a.data.stopy+bt.diagramMarginY+n;r.setData(t,t,e,e)}else{let t=r.data.stopx!==r.data.startx?r.data.stopx+bt.diagramMarginX:r.data.startx,e=r.data.starty;r.setData(t,t,e,e)}r.name=l.alias;let h=i.db.getC4ShapeArray(l.alias),d=i.db.getC4ShapeKeys(l.alias);d.length>0&&wt(r,t,h,d),e=l.alias;let u=i.db.getBoundarys(e);u.length>0&&Rt(t,e,r,u,i),"global"!==l.alias&&Ct(t,l,r),a.data.stopy=Math.max(r.data.stopy+bt.c4ShapeMargin,a.data.stopy),a.data.stopx=Math.max(r.data.stopx+bt.c4ShapeMargin,a.data.stopx),pt=Math.max(pt,a.data.stopx),yt=Math.max(yt,a.data.stopy)}}(0,r.K2)(Rt,"drawInsideBoundary");var Dt={drawPersonOrSystemArray:wt,drawBoundary:Ct,setConf:_t,draw:(0,r.K2)((function(t,e,a,n){bt=(0,r.D7)().c4;const i=(0,r.D7)().securityLevel;let l;"sandbox"===i&&(l=(0,s.Ltv)("#i"+e));const o="sandbox"===i?(0,s.Ltv)(l.nodes()[0].contentDocument.body):(0,s.Ltv)("body");let c=n.db;n.db.setWrap(bt.wrap),gt=c.getC4ShapeInRow(),ft=c.getC4BoundaryInRow(),r.Rm.debug(`C:${JSON.stringify(bt,null,2)}`);const h="sandbox"===i?o.select(`[id="${e}"]`):(0,s.Ltv)(`[id="${e}"]`);ut.insertComputerIcon(h),ut.insertDatabaseIcon(h),ut.insertClockIcon(h);let d=new xt(n);d.setData(bt.diagramMarginX,bt.diagramMarginX,bt.diagramMarginY,bt.diagramMarginY),d.data.widthLimit=screen.availWidth,pt=bt.diagramMarginX,yt=bt.diagramMarginY;const u=n.db.getTitle();Rt(h,"",d,n.db.getBoundarys(""),n),ut.insertArrowHead(h),ut.insertArrowEnd(h),ut.insertArrowCrossHead(h),ut.insertArrowFilledHead(h),vt(h,n.db.getRels(),n.db.getC4Shape,n),d.data.stopx=pt,d.data.stopy=yt;const p=d.data;let y=p.stopy-p.starty+2*bt.diagramMarginY;const g=p.stopx-p.startx+2*bt.diagramMarginX;u&&h.append("text").text(u).attr("x",(p.stopx-p.startx)/2-4*bt.diagramMarginX).attr("y",p.starty+bt.diagramMarginY),(0,r.a$)(h,y,g,bt.useMaxWidth);const f=u?60:0;h.attr("viewBox",p.startx-bt.diagramMarginX+" -"+(bt.diagramMarginY+f)+" "+g+" "+(y+f)),r.Rm.debug("models:",p)}),"draw")},Nt={parser:d,db:V,renderer:Dt,styles:(0,r.K2)((t=>`.person {\n stroke: ${t.personBorder};\n fill: ${t.personBkg};\n }\n`),"getStyles"),init:(0,r.K2)((({c4:t,wrap:e})=>{Dt.setConf(t),V.setWrap(e)}),"init")}},59347:(t,e,a)=>{a.d(e,{CP:()=>c,HT:()=>d,PB:()=>h,aC:()=>o,lC:()=>s,m:()=>l,tk:()=>r});var n=a(45567),i=a(16750),r=(0,n.K2)(((t,e)=>{const a=t.append("rect");if(a.attr("x",e.x),a.attr("y",e.y),a.attr("fill",e.fill),a.attr("stroke",e.stroke),a.attr("width",e.width),a.attr("height",e.height),e.name&&a.attr("name",e.name),e.rx&&a.attr("rx",e.rx),e.ry&&a.attr("ry",e.ry),void 0!==e.attrs)for(const n in e.attrs)a.attr(n,e.attrs[n]);return e.class&&a.attr("class",e.class),a}),"drawRect"),s=(0,n.K2)(((t,e)=>{const a={x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"};r(t,a).lower()}),"drawBackgroundRect"),l=(0,n.K2)(((t,e)=>{const a=e.text.replace(n.H1," "),i=t.append("text");i.attr("x",e.x),i.attr("y",e.y),i.attr("class","legend"),i.style("text-anchor",e.anchor),e.class&&i.attr("class",e.class);const r=i.append("tspan");return r.attr("x",e.x+2*e.textMargin),r.text(a),i}),"drawText"),o=(0,n.K2)(((t,e,a,n)=>{const r=t.append("image");r.attr("x",e),r.attr("y",a);const s=(0,i.J)(n);r.attr("xlink:href",s)}),"drawImage"),c=(0,n.K2)(((t,e,a,n)=>{const r=t.append("use");r.attr("x",e),r.attr("y",a);const s=(0,i.J)(n);r.attr("xlink:href",`#${s}`)}),"drawEmbeddedImage"),h=(0,n.K2)((()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0})),"getNoteRect"),d=(0,n.K2)((()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0})),"getTextObj")}}]); \ No newline at end of file diff --git a/assets/js/15985664.78ea0452.js b/assets/js/15985664.78ea0452.js deleted file mode 100644 index 3658e0f5dc33..000000000000 --- a/assets/js/15985664.78ea0452.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5881],{76248:(e,r,t)=>{t.r(r),t.d(r,{assets:()=>c,contentTitle:()=>a,default:()=>l,frontMatter:()=>o,metadata:()=>u,toc:()=>i});var n=t(74848),s=t(28453);const o={id:"learn-xcm-docs-journey-summary",title:"A Journey through XCM",sidebar_label:"Summary",description:"Summary of the Chapter.",keywords:["xcm","cross-consensus messaging"],slug:"../journey-summary"},a="A Journey through XCM",u={id:"learn/xcm/journey/learn-xcm-docs-journey-summary",title:"A Journey through XCM",description:"Summary of the Chapter.",source:"@site/../docs/learn/xcm/journey/summary.md",sourceDirName:"learn/xcm/journey",slug:"/learn/xcm/journey-summary",permalink:"/docs/learn/xcm/journey-summary",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/xcm/journey/summary.md",tags:[],version:"current",lastUpdatedBy:"Radha",lastUpdatedAt:1694074887e3,frontMatter:{id:"learn-xcm-docs-journey-summary",title:"A Journey through XCM",sidebar_label:"Summary",description:"Summary of the Chapter.",keywords:["xcm","cross-consensus messaging"],slug:"../journey-summary"},sidebar:"docs",previous:{title:"A Journey through XCM",permalink:"/docs/learn/xcm/journey"},next:{title:"Transfers",permalink:"/docs/learn/xcm/journey/transfers"}},c={},i=[];function m(e){const r={h1:"h1",header:"header",p:"p",...(0,s.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.header,{children:(0,n.jsx)(r.h1,{id:"a-journey-through-xcm",children:"A Journey through XCM"})}),"\n",(0,n.jsx)(r.p,{children:"This section will be a step-by-step, practical introduction to all the features XCM has. We'll\ncreate XCMs for a variety of use cases, learning about all the instructions available to us along\nthe way. Let's step right in."})]})}function l(e={}){const{wrapper:r}={...(0,s.R)(),...e.components};return r?(0,n.jsx)(r,{...e,children:(0,n.jsx)(m,{...e})}):m(e)}},28453:(e,r,t)=>{t.d(r,{R:()=>a,x:()=>u});var n=t(96540);const s={},o=n.createContext(s);function a(e){const r=n.useContext(o);return n.useMemo((function(){return"function"==typeof e?e(r):{...r,...e}}),[r,e])}function u(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:a(e.components),n.createElement(o.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/15985664.c99bb07c.js b/assets/js/15985664.c99bb07c.js new file mode 100644 index 000000000000..2f84f1c7bc25 --- /dev/null +++ b/assets/js/15985664.c99bb07c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5881],{40393:(e,r,t)=>{t.r(r),t.d(r,{assets:()=>c,contentTitle:()=>u,default:()=>l,frontMatter:()=>a,metadata:()=>n,toc:()=>i});const n=JSON.parse('{"id":"learn/xcm/journey/learn-xcm-docs-journey-summary","title":"A Journey through XCM","description":"Summary of the Chapter.","source":"@site/../docs/learn/xcm/journey/summary.md","sourceDirName":"learn/xcm/journey","slug":"/learn/xcm/journey-summary","permalink":"/docs/learn/xcm/journey-summary","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/xcm/journey/summary.md","tags":[],"version":"current","lastUpdatedBy":"Radha","lastUpdatedAt":1694074887000,"frontMatter":{"id":"learn-xcm-docs-journey-summary","title":"A Journey through XCM","sidebar_label":"Summary","description":"Summary of the Chapter.","keywords":["xcm","cross-consensus messaging"],"slug":"../journey-summary"},"sidebar":"docs","previous":{"title":"A Journey through XCM","permalink":"/docs/learn/xcm/journey"},"next":{"title":"Transfers","permalink":"/docs/learn/xcm/journey/transfers"}}');var s=t(74848),o=t(28453);const a={id:"learn-xcm-docs-journey-summary",title:"A Journey through XCM",sidebar_label:"Summary",description:"Summary of the Chapter.",keywords:["xcm","cross-consensus messaging"],slug:"../journey-summary"},u="A Journey through XCM",c={},i=[];function m(e){const r={h1:"h1",header:"header",p:"p",...(0,o.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r.header,{children:(0,s.jsx)(r.h1,{id:"a-journey-through-xcm",children:"A Journey through XCM"})}),"\n",(0,s.jsx)(r.p,{children:"This section will be a step-by-step, practical introduction to all the features XCM has. We'll\ncreate XCMs for a variety of use cases, learning about all the instructions available to us along\nthe way. Let's step right in."})]})}function l(e={}){const{wrapper:r}={...(0,o.R)(),...e.components};return r?(0,s.jsx)(r,{...e,children:(0,s.jsx)(m,{...e})}):m(e)}},28453:(e,r,t)=>{t.d(r,{R:()=>a,x:()=>u});var n=t(96540);const s={},o=n.createContext(s);function a(e){const r=n.useContext(o);return n.useMemo((function(){return"function"==typeof e?e(r):{...r,...e}}),[r,e])}function u(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:a(e.components),n.createElement(o.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/163.f773767b.js b/assets/js/163.f773767b.js deleted file mode 100644 index 74ac65641755..000000000000 --- a/assets/js/163.f773767b.js +++ /dev/null @@ -1,10814 +0,0 @@ -"use strict"; -exports.id = 163; -exports.ids = [163]; -exports.modules = { - -/***/ 21176: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - Zp: () => (/* reexport */ layout) -}); - -// UNUSED EXPORTS: acyclic, normalize, rank - -// EXTERNAL MODULE: ./node_modules/lodash-es/forEach.js -var forEach = __webpack_require__(8058); -// EXTERNAL MODULE: ./node_modules/lodash-es/uniqueId.js -var uniqueId = __webpack_require__(5664); -// EXTERNAL MODULE: ./node_modules/lodash-es/has.js + 1 modules -var has = __webpack_require__(48585); -// EXTERNAL MODULE: ./node_modules/lodash-es/constant.js -var constant = __webpack_require__(39142); -// EXTERNAL MODULE: ./node_modules/lodash-es/flatten.js -var flatten = __webpack_require__(34098); -// EXTERNAL MODULE: ./node_modules/lodash-es/map.js -var map = __webpack_require__(74722); -// EXTERNAL MODULE: ./node_modules/lodash-es/range.js + 2 modules -var range = __webpack_require__(91395); -// EXTERNAL MODULE: ./node_modules/dagre-d3-es/src/graphlib/index.js -var graphlib = __webpack_require__(697); -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/data/list.js -/* - * Simple doubly linked list implementation derived from Cormen, et al., - * "Introduction to Algorithms". - */ - - - -class List { - constructor() { - var sentinel = {}; - sentinel._next = sentinel._prev = sentinel; - this._sentinel = sentinel; - } - dequeue() { - var sentinel = this._sentinel; - var entry = sentinel._prev; - if (entry !== sentinel) { - unlink(entry); - return entry; - } - } - enqueue(entry) { - var sentinel = this._sentinel; - if (entry._prev && entry._next) { - unlink(entry); - } - entry._next = sentinel._next; - sentinel._next._prev = entry; - sentinel._next = entry; - entry._prev = sentinel; - } - toString() { - var strs = []; - var sentinel = this._sentinel; - var curr = sentinel._prev; - while (curr !== sentinel) { - strs.push(JSON.stringify(curr, filterOutLinks)); - curr = curr._prev; - } - return '[' + strs.join(', ') + ']'; - } -} - -function unlink(entry) { - entry._prev._next = entry._next; - entry._next._prev = entry._prev; - delete entry._next; - delete entry._prev; -} - -function filterOutLinks(k, v) { - if (k !== '_next' && k !== '_prev') { - return v; - } -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/greedy-fas.js - - - - -/* - * A greedy heuristic for finding a feedback arc set for a graph. A feedback - * arc set is a set of edges that can be removed to make a graph acyclic. - * The algorithm comes from: P. Eades, X. Lin, and W. F. Smyth, "A fast and - * effective heuristic for the feedback arc set problem." This implementation - * adjusts that from the paper to allow for weighted edges. - */ - - -var DEFAULT_WEIGHT_FN = constant/* default */.A(1); - -function greedyFAS(g, weightFn) { - if (g.nodeCount() <= 1) { - return []; - } - var state = buildState(g, weightFn || DEFAULT_WEIGHT_FN); - var results = doGreedyFAS(state.graph, state.buckets, state.zeroIdx); - - // Expand multi-edges - return flatten/* default */.A( - map/* default */.A(results, function (e) { - return g.outEdges(e.v, e.w); - }) - ); -} - -function doGreedyFAS(g, buckets, zeroIdx) { - var results = []; - var sources = buckets[buckets.length - 1]; - var sinks = buckets[0]; - - var entry; - while (g.nodeCount()) { - while ((entry = sinks.dequeue())) { - removeNode(g, buckets, zeroIdx, entry); - } - while ((entry = sources.dequeue())) { - removeNode(g, buckets, zeroIdx, entry); - } - if (g.nodeCount()) { - for (var i = buckets.length - 2; i > 0; --i) { - entry = buckets[i].dequeue(); - if (entry) { - results = results.concat(removeNode(g, buckets, zeroIdx, entry, true)); - break; - } - } - } - } - - return results; -} - -function removeNode(g, buckets, zeroIdx, entry, collectPredecessors) { - var results = collectPredecessors ? [] : undefined; - - forEach/* default */.A(g.inEdges(entry.v), function (edge) { - var weight = g.edge(edge); - var uEntry = g.node(edge.v); - - if (collectPredecessors) { - results.push({ v: edge.v, w: edge.w }); - } - - uEntry.out -= weight; - assignBucket(buckets, zeroIdx, uEntry); - }); - - forEach/* default */.A(g.outEdges(entry.v), function (edge) { - var weight = g.edge(edge); - var w = edge.w; - var wEntry = g.node(w); - wEntry['in'] -= weight; - assignBucket(buckets, zeroIdx, wEntry); - }); - - g.removeNode(entry.v); - - return results; -} - -function buildState(g, weightFn) { - var fasGraph = new graphlib/* Graph */.T(); - var maxIn = 0; - var maxOut = 0; - - forEach/* default */.A(g.nodes(), function (v) { - fasGraph.setNode(v, { v: v, in: 0, out: 0 }); - }); - - // Aggregate weights on nodes, but also sum the weights across multi-edges - // into a single edge for the fasGraph. - forEach/* default */.A(g.edges(), function (e) { - var prevWeight = fasGraph.edge(e.v, e.w) || 0; - var weight = weightFn(e); - var edgeWeight = prevWeight + weight; - fasGraph.setEdge(e.v, e.w, edgeWeight); - maxOut = Math.max(maxOut, (fasGraph.node(e.v).out += weight)); - maxIn = Math.max(maxIn, (fasGraph.node(e.w)['in'] += weight)); - }); - - var buckets = range/* default */.A(maxOut + maxIn + 3).map(function () { - return new List(); - }); - var zeroIdx = maxIn + 1; - - forEach/* default */.A(fasGraph.nodes(), function (v) { - assignBucket(buckets, zeroIdx, fasGraph.node(v)); - }); - - return { graph: fasGraph, buckets: buckets, zeroIdx: zeroIdx }; -} - -function assignBucket(buckets, zeroIdx, entry) { - if (!entry.out) { - buckets[0].enqueue(entry); - } else if (!entry['in']) { - buckets[buckets.length - 1].enqueue(entry); - } else { - buckets[entry.out - entry['in'] + zeroIdx].enqueue(entry); - } -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/acyclic.js - - - - - -function run(g) { - var fas = g.graph().acyclicer === 'greedy' ? greedyFAS(g, weightFn(g)) : dfsFAS(g); - forEach/* default */.A(fas, function (e) { - var label = g.edge(e); - g.removeEdge(e); - label.forwardName = e.name; - label.reversed = true; - g.setEdge(e.w, e.v, label, uniqueId/* default */.A('rev')); - }); - - function weightFn(g) { - return function (e) { - return g.edge(e).weight; - }; - } -} - -function dfsFAS(g) { - var fas = []; - var stack = {}; - var visited = {}; - - function dfs(v) { - if (has/* default */.A(visited, v)) { - return; - } - visited[v] = true; - stack[v] = true; - forEach/* default */.A(g.outEdges(v), function (e) { - if (has/* default */.A(stack, e.w)) { - fas.push(e); - } else { - dfs(e.w); - } - }); - delete stack[v]; - } - - forEach/* default */.A(g.nodes(), dfs); - return fas; -} - -function undo(g) { - forEach/* default */.A(g.edges(), function (e) { - var label = g.edge(e); - if (label.reversed) { - g.removeEdge(e); - - var forwardName = label.forwardName; - delete label.reversed; - delete label.forwardName; - g.setEdge(e.w, e.v, label, forwardName); - } - }); -} - -// EXTERNAL MODULE: ./node_modules/lodash-es/merge.js + 6 modules -var merge = __webpack_require__(98879); -// EXTERNAL MODULE: ./node_modules/lodash-es/pick.js + 4 modules -var pick = __webpack_require__(81942); -// EXTERNAL MODULE: ./node_modules/lodash-es/defaults.js -var defaults = __webpack_require__(23068); -// EXTERNAL MODULE: ./node_modules/lodash-es/isSymbol.js -var isSymbol = __webpack_require__(61882); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseExtremum.js - - -/** - * The base implementation of methods like `_.max` and `_.min` which accepts a - * `comparator` to determine the extremum value. - * - * @private - * @param {Array} array The array to iterate over. - * @param {Function} iteratee The iteratee invoked per iteration. - * @param {Function} comparator The comparator used to compare values. - * @returns {*} Returns the extremum value. - */ -function baseExtremum(array, iteratee, comparator) { - var index = -1, - length = array.length; - - while (++index < length) { - var value = array[index], - current = iteratee(value); - - if (current != null && (computed === undefined - ? (current === current && !(0,isSymbol/* default */.A)(current)) - : comparator(current, computed) - )) { - var computed = current, - result = value; - } - } - return result; -} - -/* harmony default export */ const _baseExtremum = (baseExtremum); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseGt.js -/** - * The base implementation of `_.gt` which doesn't coerce arguments. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if `value` is greater than `other`, - * else `false`. - */ -function baseGt(value, other) { - return value > other; -} - -/* harmony default export */ const _baseGt = (baseGt); - -// EXTERNAL MODULE: ./node_modules/lodash-es/identity.js -var identity = __webpack_require__(29008); -;// CONCATENATED MODULE: ./node_modules/lodash-es/max.js - - - - -/** - * Computes the maximum value of `array`. If `array` is empty or falsey, - * `undefined` is returned. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Math - * @param {Array} array The array to iterate over. - * @returns {*} Returns the maximum value. - * @example - * - * _.max([4, 2, 8, 6]); - * // => 8 - * - * _.max([]); - * // => undefined - */ -function max(array) { - return (array && array.length) - ? _baseExtremum(array, identity/* default */.A, _baseGt) - : undefined; -} - -/* harmony default export */ const lodash_es_max = (max); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/last.js -/** - * Gets the last element of `array`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to query. - * @returns {*} Returns the last element of `array`. - * @example - * - * _.last([1, 2, 3]); - * // => 3 - */ -function last(array) { - var length = array == null ? 0 : array.length; - return length ? array[length - 1] : undefined; -} - -/* harmony default export */ const lodash_es_last = (last); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseAssignValue.js -var _baseAssignValue = __webpack_require__(52528); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseForOwn.js -var _baseForOwn = __webpack_require__(79841); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseIteratee.js + 16 modules -var _baseIteratee = __webpack_require__(49574); -;// CONCATENATED MODULE: ./node_modules/lodash-es/mapValues.js - - - - -/** - * Creates an object with the same keys as `object` and values generated - * by running each own enumerable string keyed property of `object` thru - * `iteratee`. The iteratee is invoked with three arguments: - * (value, key, object). - * - * @static - * @memberOf _ - * @since 2.4.0 - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Object} Returns the new mapped object. - * @see _.mapKeys - * @example - * - * var users = { - * 'fred': { 'user': 'fred', 'age': 40 }, - * 'pebbles': { 'user': 'pebbles', 'age': 1 } - * }; - * - * _.mapValues(users, function(o) { return o.age; }); - * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) - * - * // The `_.property` iteratee shorthand. - * _.mapValues(users, 'age'); - * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) - */ -function mapValues(object, iteratee) { - var result = {}; - iteratee = (0,_baseIteratee/* default */.A)(iteratee, 3); - - (0,_baseForOwn/* default */.A)(object, function(value, key, object) { - (0,_baseAssignValue/* default */.A)(result, key, iteratee(value, key, object)); - }); - return result; -} - -/* harmony default export */ const lodash_es_mapValues = (mapValues); - -// EXTERNAL MODULE: ./node_modules/lodash-es/isUndefined.js -var isUndefined = __webpack_require__(69592); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseLt.js -/** - * The base implementation of `_.lt` which doesn't coerce arguments. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if `value` is less than `other`, - * else `false`. - */ -function baseLt(value, other) { - return value < other; -} - -/* harmony default export */ const _baseLt = (baseLt); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/min.js - - - - -/** - * Computes the minimum value of `array`. If `array` is empty or falsey, - * `undefined` is returned. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Math - * @param {Array} array The array to iterate over. - * @returns {*} Returns the minimum value. - * @example - * - * _.min([4, 2, 8, 6]); - * // => 2 - * - * _.min([]); - * // => undefined - */ -function min(array) { - return (array && array.length) - ? _baseExtremum(array, identity/* default */.A, _baseLt) - : undefined; -} - -/* harmony default export */ const lodash_es_min = (min); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_root.js -var _root = __webpack_require__(41917); -;// CONCATENATED MODULE: ./node_modules/lodash-es/now.js - - -/** - * Gets the timestamp of the number of milliseconds that have elapsed since - * the Unix epoch (1 January 1970 00:00:00 UTC). - * - * @static - * @memberOf _ - * @since 2.4.0 - * @category Date - * @returns {number} Returns the timestamp. - * @example - * - * _.defer(function(stamp) { - * console.log(_.now() - stamp); - * }, _.now()); - * // => Logs the number of milliseconds it took for the deferred invocation. - */ -var now = function() { - return _root/* default */.A.Date.now(); -}; - -/* harmony default export */ const lodash_es_now = (now); - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/util.js - - - - - -/* - * Adds a dummy node to the graph and return v. - */ -function addDummyNode(g, type, attrs, name) { - var v; - do { - v = uniqueId/* default */.A(name); - } while (g.hasNode(v)); - - attrs.dummy = type; - g.setNode(v, attrs); - return v; -} - -/* - * Returns a new graph with only simple edges. Handles aggregation of data - * associated with multi-edges. - */ -function simplify(g) { - var simplified = new graphlib/* Graph */.T().setGraph(g.graph()); - forEach/* default */.A(g.nodes(), function (v) { - simplified.setNode(v, g.node(v)); - }); - forEach/* default */.A(g.edges(), function (e) { - var simpleLabel = simplified.edge(e.v, e.w) || { weight: 0, minlen: 1 }; - var label = g.edge(e); - simplified.setEdge(e.v, e.w, { - weight: simpleLabel.weight + label.weight, - minlen: Math.max(simpleLabel.minlen, label.minlen), - }); - }); - return simplified; -} - -function asNonCompoundGraph(g) { - var simplified = new graphlib/* Graph */.T({ multigraph: g.isMultigraph() }).setGraph(g.graph()); - forEach/* default */.A(g.nodes(), function (v) { - if (!g.children(v).length) { - simplified.setNode(v, g.node(v)); - } - }); - forEach/* default */.A(g.edges(), function (e) { - simplified.setEdge(e, g.edge(e)); - }); - return simplified; -} - -function successorWeights(g) { - var weightMap = _.map(g.nodes(), function (v) { - var sucs = {}; - _.forEach(g.outEdges(v), function (e) { - sucs[e.w] = (sucs[e.w] || 0) + g.edge(e).weight; - }); - return sucs; - }); - return _.zipObject(g.nodes(), weightMap); -} - -function predecessorWeights(g) { - var weightMap = _.map(g.nodes(), function (v) { - var preds = {}; - _.forEach(g.inEdges(v), function (e) { - preds[e.v] = (preds[e.v] || 0) + g.edge(e).weight; - }); - return preds; - }); - return _.zipObject(g.nodes(), weightMap); -} - -/* - * Finds where a line starting at point ({x, y}) would intersect a rectangle - * ({x, y, width, height}) if it were pointing at the rectangle's center. - */ -function intersectRect(rect, point) { - var x = rect.x; - var y = rect.y; - - // Rectangle intersection algorithm from: - // http://math.stackexchange.com/questions/108113/find-edge-between-two-boxes - var dx = point.x - x; - var dy = point.y - y; - var w = rect.width / 2; - var h = rect.height / 2; - - if (!dx && !dy) { - throw new Error('Not possible to find intersection inside of the rectangle'); - } - - var sx, sy; - if (Math.abs(dy) * w > Math.abs(dx) * h) { - // Intersection is top or bottom of rect. - if (dy < 0) { - h = -h; - } - sx = (h * dx) / dy; - sy = h; - } else { - // Intersection is left or right of rect. - if (dx < 0) { - w = -w; - } - sx = w; - sy = (w * dy) / dx; - } - - return { x: x + sx, y: y + sy }; -} - -/* - * Given a DAG with each node assigned "rank" and "order" properties, this - * function will produce a matrix with the ids of each node. - */ -function buildLayerMatrix(g) { - var layering = map/* default */.A(range/* default */.A(util_maxRank(g) + 1), function () { - return []; - }); - forEach/* default */.A(g.nodes(), function (v) { - var node = g.node(v); - var rank = node.rank; - if (!isUndefined/* default */.A(rank)) { - layering[rank][node.order] = v; - } - }); - return layering; -} - -/* - * Adjusts the ranks for all nodes in the graph such that all nodes v have - * rank(v) >= 0 and at least one node w has rank(w) = 0. - */ -function normalizeRanks(g) { - var min = lodash_es_min( - map/* default */.A(g.nodes(), function (v) { - return g.node(v).rank; - }) - ); - forEach/* default */.A(g.nodes(), function (v) { - var node = g.node(v); - if (has/* default */.A(node, 'rank')) { - node.rank -= min; - } - }); -} - -function removeEmptyRanks(g) { - // Ranks may not start at 0, so we need to offset them - var offset = lodash_es_min( - map/* default */.A(g.nodes(), function (v) { - return g.node(v).rank; - }) - ); - - var layers = []; - forEach/* default */.A(g.nodes(), function (v) { - var rank = g.node(v).rank - offset; - if (!layers[rank]) { - layers[rank] = []; - } - layers[rank].push(v); - }); - - var delta = 0; - var nodeRankFactor = g.graph().nodeRankFactor; - forEach/* default */.A(layers, function (vs, i) { - if (isUndefined/* default */.A(vs) && i % nodeRankFactor !== 0) { - --delta; - } else if (delta) { - forEach/* default */.A(vs, function (v) { - g.node(v).rank += delta; - }); - } - }); -} - -function addBorderNode(g, prefix, rank, order) { - var node = { - width: 0, - height: 0, - }; - if (arguments.length >= 4) { - node.rank = rank; - node.order = order; - } - return addDummyNode(g, 'border', node, prefix); -} - -function util_maxRank(g) { - return lodash_es_max( - map/* default */.A(g.nodes(), function (v) { - var rank = g.node(v).rank; - if (!isUndefined/* default */.A(rank)) { - return rank; - } - }) - ); -} - -/* - * Partition a collection into two groups: `lhs` and `rhs`. If the supplied - * function returns true for an entry it goes into `lhs`. Otherwise it goes - * into `rhs. - */ -function partition(collection, fn) { - var result = { lhs: [], rhs: [] }; - forEach/* default */.A(collection, function (value) { - if (fn(value)) { - result.lhs.push(value); - } else { - result.rhs.push(value); - } - }); - return result; -} - -/* - * Returns a new function that wraps `fn` with a timer. The wrapper logs the - * time it takes to execute the function. - */ -function util_time(name, fn) { - var start = lodash_es_now(); - try { - return fn(); - } finally { - console.log(name + ' time: ' + (lodash_es_now() - start) + 'ms'); - } -} - -function notime(name, fn) { - return fn(); -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/add-border-segments.js - - - - - -function addBorderSegments(g) { - function dfs(v) { - var children = g.children(v); - var node = g.node(v); - if (children.length) { - forEach/* default */.A(children, dfs); - } - - if (has/* default */.A(node, 'minRank')) { - node.borderLeft = []; - node.borderRight = []; - for (var rank = node.minRank, maxRank = node.maxRank + 1; rank < maxRank; ++rank) { - add_border_segments_addBorderNode(g, 'borderLeft', '_bl', v, node, rank); - add_border_segments_addBorderNode(g, 'borderRight', '_br', v, node, rank); - } - } - } - - forEach/* default */.A(g.children(), dfs); -} - -function add_border_segments_addBorderNode(g, prop, prefix, sg, sgNode, rank) { - var label = { width: 0, height: 0, rank: rank, borderType: prop }; - var prev = sgNode[prop][rank - 1]; - var curr = addDummyNode(g, 'border', label, prefix); - sgNode[prop][rank] = curr; - g.setParent(curr, sg); - if (prev) { - g.setEdge(prev, curr, { weight: 1 }); - } -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/coordinate-system.js - - - - -function adjust(g) { - var rankDir = g.graph().rankdir.toLowerCase(); - if (rankDir === 'lr' || rankDir === 'rl') { - swapWidthHeight(g); - } -} - -function coordinate_system_undo(g) { - var rankDir = g.graph().rankdir.toLowerCase(); - if (rankDir === 'bt' || rankDir === 'rl') { - reverseY(g); - } - - if (rankDir === 'lr' || rankDir === 'rl') { - swapXY(g); - swapWidthHeight(g); - } -} - -function swapWidthHeight(g) { - forEach/* default */.A(g.nodes(), function (v) { - swapWidthHeightOne(g.node(v)); - }); - forEach/* default */.A(g.edges(), function (e) { - swapWidthHeightOne(g.edge(e)); - }); -} - -function swapWidthHeightOne(attrs) { - var w = attrs.width; - attrs.width = attrs.height; - attrs.height = w; -} - -function reverseY(g) { - forEach/* default */.A(g.nodes(), function (v) { - reverseYOne(g.node(v)); - }); - - forEach/* default */.A(g.edges(), function (e) { - var edge = g.edge(e); - forEach/* default */.A(edge.points, reverseYOne); - if (has/* default */.A(edge, 'y')) { - reverseYOne(edge); - } - }); -} - -function reverseYOne(attrs) { - attrs.y = -attrs.y; -} - -function swapXY(g) { - forEach/* default */.A(g.nodes(), function (v) { - swapXYOne(g.node(v)); - }); - - forEach/* default */.A(g.edges(), function (e) { - var edge = g.edge(e); - forEach/* default */.A(edge.points, swapXYOne); - if (has/* default */.A(edge, 'x')) { - swapXYOne(edge); - } - }); -} - -function swapXYOne(attrs) { - var x = attrs.x; - attrs.x = attrs.y; - attrs.y = x; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/normalize.js - - - - - -/* - * Breaks any long edges in the graph into short segments that span 1 layer - * each. This operation is undoable with the denormalize function. - * - * Pre-conditions: - * - * 1. The input graph is a DAG. - * 2. Each node in the graph has a "rank" property. - * - * Post-condition: - * - * 1. All edges in the graph have a length of 1. - * 2. Dummy nodes are added where edges have been split into segments. - * 3. The graph is augmented with a "dummyChains" attribute which contains - * the first dummy in each chain of dummy nodes produced. - */ -function normalize_run(g) { - g.graph().dummyChains = []; - forEach/* default */.A(g.edges(), function (edge) { - normalizeEdge(g, edge); - }); -} - -function normalizeEdge(g, e) { - var v = e.v; - var vRank = g.node(v).rank; - var w = e.w; - var wRank = g.node(w).rank; - var name = e.name; - var edgeLabel = g.edge(e); - var labelRank = edgeLabel.labelRank; - - if (wRank === vRank + 1) return; - - g.removeEdge(e); - - var dummy, attrs, i; - for (i = 0, ++vRank; vRank < wRank; ++i, ++vRank) { - edgeLabel.points = []; - attrs = { - width: 0, - height: 0, - edgeLabel: edgeLabel, - edgeObj: e, - rank: vRank, - }; - dummy = addDummyNode(g, 'edge', attrs, '_d'); - if (vRank === labelRank) { - attrs.width = edgeLabel.width; - attrs.height = edgeLabel.height; - // @ts-expect-error - attrs.dummy = 'edge-label'; - // @ts-expect-error - attrs.labelpos = edgeLabel.labelpos; - } - g.setEdge(v, dummy, { weight: edgeLabel.weight }, name); - if (i === 0) { - g.graph().dummyChains.push(dummy); - } - v = dummy; - } - - g.setEdge(v, w, { weight: edgeLabel.weight }, name); -} - -function normalize_undo(g) { - forEach/* default */.A(g.graph().dummyChains, function (v) { - var node = g.node(v); - var origLabel = node.edgeLabel; - var w; - g.setEdge(node.edgeObj, origLabel); - while (node.dummy) { - w = g.successors(v)[0]; - g.removeNode(v); - origLabel.points.push({ x: node.x, y: node.y }); - if (node.dummy === 'edge-label') { - origLabel.x = node.x; - origLabel.y = node.y; - origLabel.width = node.width; - origLabel.height = node.height; - } - v = w; - node = g.node(v); - } - }); -} - -;// CONCATENATED MODULE: ./node_modules/lodash-es/minBy.js - - - - -/** - * This method is like `_.min` except that it accepts `iteratee` which is - * invoked for each element in `array` to generate the criterion by which - * the value is ranked. The iteratee is invoked with one argument: (value). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Math - * @param {Array} array The array to iterate over. - * @param {Function} [iteratee=_.identity] The iteratee invoked per element. - * @returns {*} Returns the minimum value. - * @example - * - * var objects = [{ 'n': 1 }, { 'n': 2 }]; - * - * _.minBy(objects, function(o) { return o.n; }); - * // => { 'n': 1 } - * - * // The `_.property` iteratee shorthand. - * _.minBy(objects, 'n'); - * // => { 'n': 1 } - */ -function minBy(array, iteratee) { - return (array && array.length) - ? _baseExtremum(array, (0,_baseIteratee/* default */.A)(iteratee, 2), _baseLt) - : undefined; -} - -/* harmony default export */ const lodash_es_minBy = (minBy); - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/rank/util.js - - - - -/* - * Initializes ranks for the input graph using the longest path algorithm. This - * algorithm scales well and is fast in practice, it yields rather poor - * solutions. Nodes are pushed to the lowest layer possible, leaving the bottom - * ranks wide and leaving edges longer than necessary. However, due to its - * speed, this algorithm is good for getting an initial ranking that can be fed - * into other algorithms. - * - * This algorithm does not normalize layers because it will be used by other - * algorithms in most cases. If using this algorithm directly, be sure to - * run normalize at the end. - * - * Pre-conditions: - * - * 1. Input graph is a DAG. - * 2. Input graph node labels can be assigned properties. - * - * Post-conditions: - * - * 1. Each node will be assign an (unnormalized) "rank" property. - */ -function longestPath(g) { - var visited = {}; - - function dfs(v) { - var label = g.node(v); - if (has/* default */.A(visited, v)) { - return label.rank; - } - visited[v] = true; - - var rank = lodash_es_min( - map/* default */.A(g.outEdges(v), function (e) { - return dfs(e.w) - g.edge(e).minlen; - }) - ); - - if ( - rank === Number.POSITIVE_INFINITY || // return value of _.map([]) for Lodash 3 - rank === undefined || // return value of _.map([]) for Lodash 4 - rank === null - ) { - // return value of _.map([null]) - rank = 0; - } - - return (label.rank = rank); - } - - forEach/* default */.A(g.sources(), dfs); -} - -/* - * Returns the amount of slack for the given edge. The slack is defined as the - * difference between the length of the edge and its minimum length. - */ -function slack(g, e) { - return g.node(e.w).rank - g.node(e.v).rank - g.edge(e).minlen; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/rank/feasible-tree.js - - - - - - -/* - * Constructs a spanning tree with tight edges and adjusted the input node's - * ranks to achieve this. A tight edge is one that is has a length that matches - * its "minlen" attribute. - * - * The basic structure for this function is derived from Gansner, et al., "A - * Technique for Drawing Directed Graphs." - * - * Pre-conditions: - * - * 1. Graph must be a DAG. - * 2. Graph must be connected. - * 3. Graph must have at least one node. - * 5. Graph nodes must have been previously assigned a "rank" property that - * respects the "minlen" property of incident edges. - * 6. Graph edges must have a "minlen" property. - * - * Post-conditions: - * - * - Graph nodes will have their rank adjusted to ensure that all edges are - * tight. - * - * Returns a tree (undirected graph) that is constructed using only "tight" - * edges. - */ -function feasibleTree(g) { - var t = new graphlib/* Graph */.T({ directed: false }); - - // Choose arbitrary node from which to start our tree - var start = g.nodes()[0]; - var size = g.nodeCount(); - t.setNode(start, {}); - - var edge, delta; - while (tightTree(t, g) < size) { - edge = findMinSlackEdge(t, g); - delta = t.hasNode(edge.v) ? slack(g, edge) : -slack(g, edge); - shiftRanks(t, g, delta); - } - - return t; -} - -/* - * Finds a maximal tree of tight edges and returns the number of nodes in the - * tree. - */ -function tightTree(t, g) { - function dfs(v) { - forEach/* default */.A(g.nodeEdges(v), function (e) { - var edgeV = e.v, - w = v === edgeV ? e.w : edgeV; - if (!t.hasNode(w) && !slack(g, e)) { - t.setNode(w, {}); - t.setEdge(v, w, {}); - dfs(w); - } - }); - } - - forEach/* default */.A(t.nodes(), dfs); - return t.nodeCount(); -} - -/* - * Finds the edge with the smallest slack that is incident on tree and returns - * it. - */ -function findMinSlackEdge(t, g) { - return lodash_es_minBy(g.edges(), function (e) { - if (t.hasNode(e.v) !== t.hasNode(e.w)) { - return slack(g, e); - } - }); -} - -function shiftRanks(t, g, delta) { - forEach/* default */.A(t.nodes(), function (v) { - g.node(v).rank += delta; - }); -} - -// EXTERNAL MODULE: ./node_modules/lodash-es/isArrayLike.js -var isArrayLike = __webpack_require__(38446); -// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js -var keys = __webpack_require__(27422); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_createFind.js - - - - -/** - * Creates a `_.find` or `_.findLast` function. - * - * @private - * @param {Function} findIndexFunc The function to find the collection index. - * @returns {Function} Returns the new find function. - */ -function createFind(findIndexFunc) { - return function(collection, predicate, fromIndex) { - var iterable = Object(collection); - if (!(0,isArrayLike/* default */.A)(collection)) { - var iteratee = (0,_baseIteratee/* default */.A)(predicate, 3); - collection = (0,keys/* default */.A)(collection); - predicate = function(key) { return iteratee(iterable[key], key, iterable); }; - } - var index = findIndexFunc(collection, predicate, fromIndex); - return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined; - }; -} - -/* harmony default export */ const _createFind = (createFind); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFindIndex.js -var _baseFindIndex = __webpack_require__(25707); -// EXTERNAL MODULE: ./node_modules/lodash-es/toFinite.js + 3 modules -var toFinite = __webpack_require__(74342); -;// CONCATENATED MODULE: ./node_modules/lodash-es/toInteger.js - - -/** - * Converts `value` to an integer. - * - * **Note:** This method is loosely based on - * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {number} Returns the converted integer. - * @example - * - * _.toInteger(3.2); - * // => 3 - * - * _.toInteger(Number.MIN_VALUE); - * // => 0 - * - * _.toInteger(Infinity); - * // => 1.7976931348623157e+308 - * - * _.toInteger('3.2'); - * // => 3 - */ -function toInteger(value) { - var result = (0,toFinite/* default */.A)(value), - remainder = result % 1; - - return result === result ? (remainder ? result - remainder : result) : 0; -} - -/* harmony default export */ const lodash_es_toInteger = (toInteger); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/findIndex.js - - - - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max; - -/** - * This method is like `_.find` except that it returns the index of the first - * element `predicate` returns truthy for instead of the element itself. - * - * @static - * @memberOf _ - * @since 1.1.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @param {number} [fromIndex=0] The index to search from. - * @returns {number} Returns the index of the found element, else `-1`. - * @example - * - * var users = [ - * { 'user': 'barney', 'active': false }, - * { 'user': 'fred', 'active': false }, - * { 'user': 'pebbles', 'active': true } - * ]; - * - * _.findIndex(users, function(o) { return o.user == 'barney'; }); - * // => 0 - * - * // The `_.matches` iteratee shorthand. - * _.findIndex(users, { 'user': 'fred', 'active': false }); - * // => 1 - * - * // The `_.matchesProperty` iteratee shorthand. - * _.findIndex(users, ['active', false]); - * // => 0 - * - * // The `_.property` iteratee shorthand. - * _.findIndex(users, 'active'); - * // => 2 - */ -function findIndex(array, predicate, fromIndex) { - var length = array == null ? 0 : array.length; - if (!length) { - return -1; - } - var index = fromIndex == null ? 0 : lodash_es_toInteger(fromIndex); - if (index < 0) { - index = nativeMax(length + index, 0); - } - return (0,_baseFindIndex/* default */.A)(array, (0,_baseIteratee/* default */.A)(predicate, 3), index); -} - -/* harmony default export */ const lodash_es_findIndex = (findIndex); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/find.js - - - -/** - * Iterates over elements of `collection`, returning the first element - * `predicate` returns truthy for. The predicate is invoked with three - * arguments: (value, index|key, collection). - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to inspect. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @param {number} [fromIndex=0] The index to search from. - * @returns {*} Returns the matched element, else `undefined`. - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': true }, - * { 'user': 'fred', 'age': 40, 'active': false }, - * { 'user': 'pebbles', 'age': 1, 'active': true } - * ]; - * - * _.find(users, function(o) { return o.age < 40; }); - * // => object for 'barney' - * - * // The `_.matches` iteratee shorthand. - * _.find(users, { 'age': 1, 'active': true }); - * // => object for 'pebbles' - * - * // The `_.matchesProperty` iteratee shorthand. - * _.find(users, ['active', false]); - * // => object for 'fred' - * - * // The `_.property` iteratee shorthand. - * _.find(users, 'active'); - * // => object for 'barney' - */ -var find = _createFind(lodash_es_findIndex); - -/* harmony default export */ const lodash_es_find = (find); - -// EXTERNAL MODULE: ./node_modules/lodash-es/filter.js + 1 modules -var filter = __webpack_require__(11662); -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/dijkstra.js - - - - - -var DEFAULT_WEIGHT_FUNC = constant/* default */.A(1); - -function dijkstra_dijkstra(g, source, weightFn, edgeFn) { - return runDijkstra( - g, - String(source), - weightFn || DEFAULT_WEIGHT_FUNC, - edgeFn || - function (v) { - return g.outEdges(v); - } - ); -} - -function runDijkstra(g, source, weightFn, edgeFn) { - var results = {}; - var pq = new PriorityQueue(); - var v, vEntry; - - var updateNeighbors = function (edge) { - var w = edge.v !== v ? edge.v : edge.w; - var wEntry = results[w]; - var weight = weightFn(edge); - var distance = vEntry.distance + weight; - - if (weight < 0) { - throw new Error( - 'dijkstra does not allow negative edge weights. ' + - 'Bad edge: ' + - edge + - ' Weight: ' + - weight - ); - } - - if (distance < wEntry.distance) { - wEntry.distance = distance; - wEntry.predecessor = v; - pq.decrease(w, distance); - } - }; - - g.nodes().forEach(function (v) { - var distance = v === source ? 0 : Number.POSITIVE_INFINITY; - results[v] = { distance: distance }; - pq.add(v, distance); - }); - - while (pq.size() > 0) { - v = pq.removeMin(); - vEntry = results[v]; - if (vEntry.distance === Number.POSITIVE_INFINITY) { - break; - } - - edgeFn(v).forEach(updateNeighbors); - } - - return results; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/dijkstra-all.js - - - - - -function dijkstraAll(g, weightFunc, edgeFunc) { - return _.transform( - g.nodes(), - function (acc, v) { - acc[v] = dijkstra(g, v, weightFunc, edgeFunc); - }, - {} - ); -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/floyd-warshall.js - - - - -var floyd_warshall_DEFAULT_WEIGHT_FUNC = constant/* default */.A(1); - -function floydWarshall(g, weightFn, edgeFn) { - return runFloydWarshall( - g, - weightFn || floyd_warshall_DEFAULT_WEIGHT_FUNC, - edgeFn || - function (v) { - return g.outEdges(v); - } - ); -} - -function runFloydWarshall(g, weightFn, edgeFn) { - var results = {}; - var nodes = g.nodes(); - - nodes.forEach(function (v) { - results[v] = {}; - results[v][v] = { distance: 0 }; - nodes.forEach(function (w) { - if (v !== w) { - results[v][w] = { distance: Number.POSITIVE_INFINITY }; - } - }); - edgeFn(v).forEach(function (edge) { - var w = edge.v === v ? edge.w : edge.v; - var d = weightFn(edge); - results[v][w] = { distance: d, predecessor: v }; - }); - }); - - nodes.forEach(function (k) { - var rowK = results[k]; - nodes.forEach(function (i) { - var rowI = results[i]; - nodes.forEach(function (j) { - var ik = rowI[k]; - var kj = rowK[j]; - var ij = rowI[j]; - var altDistance = ik.distance + kj.distance; - if (altDistance < ij.distance) { - ij.distance = altDistance; - ij.predecessor = kj.predecessor; - } - }); - }); - }); - - return results; -} - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseKeys.js + 1 modules -var _baseKeys = __webpack_require__(69471); -// EXTERNAL MODULE: ./node_modules/lodash-es/_getTag.js + 3 modules -var _getTag = __webpack_require__(9779); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGetTag.js + 2 modules -var _baseGetTag = __webpack_require__(88496); -// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js -var isArray = __webpack_require__(92049); -// EXTERNAL MODULE: ./node_modules/lodash-es/isObjectLike.js -var isObjectLike = __webpack_require__(53098); -;// CONCATENATED MODULE: ./node_modules/lodash-es/isString.js - - - - -/** `Object#toString` result references. */ -var stringTag = '[object String]'; - -/** - * Checks if `value` is classified as a `String` primitive or object. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a string, else `false`. - * @example - * - * _.isString('abc'); - * // => true - * - * _.isString(1); - * // => false - */ -function isString(value) { - return typeof value == 'string' || - (!(0,isArray/* default */.A)(value) && (0,isObjectLike/* default */.A)(value) && (0,_baseGetTag/* default */.A)(value) == stringTag); -} - -/* harmony default export */ const lodash_es_isString = (isString); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseProperty.js -var _baseProperty = __webpack_require__(70805); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_asciiSize.js - - -/** - * Gets the size of an ASCII `string`. - * - * @private - * @param {string} string The string inspect. - * @returns {number} Returns the string size. - */ -var asciiSize = (0,_baseProperty/* default */.A)('length'); - -/* harmony default export */ const _asciiSize = (asciiSize); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_hasUnicode.js -/** Used to compose unicode character classes. */ -var rsAstralRange = '\\ud800-\\udfff', - rsComboMarksRange = '\\u0300-\\u036f', - reComboHalfMarksRange = '\\ufe20-\\ufe2f', - rsComboSymbolsRange = '\\u20d0-\\u20ff', - rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, - rsVarRange = '\\ufe0e\\ufe0f'; - -/** Used to compose unicode capture groups. */ -var rsZWJ = '\\u200d'; - -/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ -var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']'); - -/** - * Checks if `string` contains Unicode symbols. - * - * @private - * @param {string} string The string to inspect. - * @returns {boolean} Returns `true` if a symbol is found, else `false`. - */ -function hasUnicode(string) { - return reHasUnicode.test(string); -} - -/* harmony default export */ const _hasUnicode = (hasUnicode); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_unicodeSize.js -/** Used to compose unicode character classes. */ -var _unicodeSize_rsAstralRange = '\\ud800-\\udfff', - _unicodeSize_rsComboMarksRange = '\\u0300-\\u036f', - _unicodeSize_reComboHalfMarksRange = '\\ufe20-\\ufe2f', - _unicodeSize_rsComboSymbolsRange = '\\u20d0-\\u20ff', - _unicodeSize_rsComboRange = _unicodeSize_rsComboMarksRange + _unicodeSize_reComboHalfMarksRange + _unicodeSize_rsComboSymbolsRange, - _unicodeSize_rsVarRange = '\\ufe0e\\ufe0f'; - -/** Used to compose unicode capture groups. */ -var rsAstral = '[' + _unicodeSize_rsAstralRange + ']', - rsCombo = '[' + _unicodeSize_rsComboRange + ']', - rsFitz = '\\ud83c[\\udffb-\\udfff]', - rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', - rsNonAstral = '[^' + _unicodeSize_rsAstralRange + ']', - rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', - rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', - _unicodeSize_rsZWJ = '\\u200d'; - -/** Used to compose unicode regexes. */ -var reOptMod = rsModifier + '?', - rsOptVar = '[' + _unicodeSize_rsVarRange + ']?', - rsOptJoin = '(?:' + _unicodeSize_rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', - rsSeq = rsOptVar + reOptMod + rsOptJoin, - rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; - -/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ -var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); - -/** - * Gets the size of a Unicode `string`. - * - * @private - * @param {string} string The string inspect. - * @returns {number} Returns the string size. - */ -function unicodeSize(string) { - var result = reUnicode.lastIndex = 0; - while (reUnicode.test(string)) { - ++result; - } - return result; -} - -/* harmony default export */ const _unicodeSize = (unicodeSize); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_stringSize.js - - - - -/** - * Gets the number of symbols in `string`. - * - * @private - * @param {string} string The string to inspect. - * @returns {number} Returns the string size. - */ -function stringSize(string) { - return _hasUnicode(string) - ? _unicodeSize(string) - : _asciiSize(string); -} - -/* harmony default export */ const _stringSize = (stringSize); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/size.js - - - - - - -/** `Object#toString` result references. */ -var mapTag = '[object Map]', - setTag = '[object Set]'; - -/** - * Gets the size of `collection` by returning its length for array-like - * values or the number of own enumerable string keyed properties for objects. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object|string} collection The collection to inspect. - * @returns {number} Returns the collection size. - * @example - * - * _.size([1, 2, 3]); - * // => 3 - * - * _.size({ 'a': 1, 'b': 2 }); - * // => 2 - * - * _.size('pebbles'); - * // => 7 - */ -function size(collection) { - if (collection == null) { - return 0; - } - if ((0,isArrayLike/* default */.A)(collection)) { - return lodash_es_isString(collection) ? _stringSize(collection) : collection.length; - } - var tag = (0,_getTag/* default */.A)(collection); - if (tag == mapTag || tag == setTag) { - return collection.size; - } - return (0,_baseKeys/* default */.A)(collection).length; -} - -/* harmony default export */ const lodash_es_size = (size); - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/topsort.js - - - - -topsort_topsort.CycleException = topsort_CycleException; - -function topsort_topsort(g) { - var visited = {}; - var stack = {}; - var results = []; - - function visit(node) { - if (has/* default */.A(stack, node)) { - throw new topsort_CycleException(); - } - - if (!has/* default */.A(visited, node)) { - stack[node] = true; - visited[node] = true; - forEach/* default */.A(g.predecessors(node), visit); - delete stack[node]; - results.push(node); - } - } - - forEach/* default */.A(g.sinks(), visit); - - if (lodash_es_size(visited) !== g.nodeCount()) { - throw new topsort_CycleException(); - } - - return results; -} - -function topsort_CycleException() {} -topsort_CycleException.prototype = new Error(); // must be an instance of Error to pass testing - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/is-acyclic.js - - - - -function isAcyclic(g) { - try { - topsort(g); - } catch (e) { - if (e instanceof CycleException) { - return false; - } - throw e; - } - return true; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/dfs.js - - - - -/* - * A helper that preforms a pre- or post-order traversal on the input graph - * and returns the nodes in the order they were visited. If the graph is - * undirected then this algorithm will navigate using neighbors. If the graph - * is directed then this algorithm will navigate using successors. - * - * Order must be one of "pre" or "post". - */ -function dfs(g, vs, order) { - if (!isArray/* default */.A(vs)) { - vs = [vs]; - } - - var navigation = (g.isDirected() ? g.successors : g.neighbors).bind(g); - - var acc = []; - var visited = {}; - forEach/* default */.A(vs, function (v) { - if (!g.hasNode(v)) { - throw new Error('Graph does not have node: ' + v); - } - - doDfs(g, v, order === 'post', visited, navigation, acc); - }); - return acc; -} - -function doDfs(g, v, postorder, visited, navigation, acc) { - if (!has/* default */.A(visited, v)) { - visited[v] = true; - - if (!postorder) { - acc.push(v); - } - forEach/* default */.A(navigation(v), function (w) { - doDfs(g, w, postorder, visited, navigation, acc); - }); - if (postorder) { - acc.push(v); - } - } -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/postorder.js - - - - -function postorder(g, vs) { - return dfs(g, vs, 'post'); -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/preorder.js - - - - -function preorder(g, vs) { - return dfs(g, vs, 'pre'); -} - -// EXTERNAL MODULE: ./node_modules/dagre-d3-es/src/graphlib/graph.js + 9 modules -var graph = __webpack_require__(73046); -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/prim.js - - - - - - -function prim(g, weightFunc) { - var result = new Graph(); - var parents = {}; - var pq = new PriorityQueue(); - var v; - - function updateNeighbors(edge) { - var w = edge.v === v ? edge.w : edge.v; - var pri = pq.priority(w); - if (pri !== undefined) { - var edgeWeight = weightFunc(edge); - if (edgeWeight < pri) { - parents[w] = v; - pq.decrease(w, edgeWeight); - } - } - } - - if (g.nodeCount() === 0) { - return result; - } - - _.each(g.nodes(), function (v) { - pq.add(v, Number.POSITIVE_INFINITY); - result.setNode(v); - }); - - // Start from an arbitrary node - pq.decrease(g.nodes()[0], 0); - - var init = false; - while (pq.size() > 0) { - v = pq.removeMin(); - if (_.has(parents, v)) { - result.setEdge(v, parents[v]); - } else if (init) { - throw new Error('Input graph is not connected: ' + g); - } else { - init = true; - } - - g.nodeEdges(v).forEach(updateNeighbors); - } - - return result; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/index.js - - - - - - - - - - - - - - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/rank/network-simplex.js - - - - - - - - -// Expose some internals for testing purposes -networkSimplex.initLowLimValues = initLowLimValues; -networkSimplex.initCutValues = initCutValues; -networkSimplex.calcCutValue = calcCutValue; -networkSimplex.leaveEdge = leaveEdge; -networkSimplex.enterEdge = enterEdge; -networkSimplex.exchangeEdges = exchangeEdges; - -/* - * The network simplex algorithm assigns ranks to each node in the input graph - * and iteratively improves the ranking to reduce the length of edges. - * - * Preconditions: - * - * 1. The input graph must be a DAG. - * 2. All nodes in the graph must have an object value. - * 3. All edges in the graph must have "minlen" and "weight" attributes. - * - * Postconditions: - * - * 1. All nodes in the graph will have an assigned "rank" attribute that has - * been optimized by the network simplex algorithm. Ranks start at 0. - * - * - * A rough sketch of the algorithm is as follows: - * - * 1. Assign initial ranks to each node. We use the longest path algorithm, - * which assigns ranks to the lowest position possible. In general this - * leads to very wide bottom ranks and unnecessarily long edges. - * 2. Construct a feasible tight tree. A tight tree is one such that all - * edges in the tree have no slack (difference between length of edge - * and minlen for the edge). This by itself greatly improves the assigned - * rankings by shorting edges. - * 3. Iteratively find edges that have negative cut values. Generally a - * negative cut value indicates that the edge could be removed and a new - * tree edge could be added to produce a more compact graph. - * - * Much of the algorithms here are derived from Gansner, et al., "A Technique - * for Drawing Directed Graphs." The structure of the file roughly follows the - * structure of the overall algorithm. - */ -function networkSimplex(g) { - g = simplify(g); - longestPath(g); - var t = feasibleTree(g); - initLowLimValues(t); - initCutValues(t, g); - - var e, f; - while ((e = leaveEdge(t))) { - f = enterEdge(t, g, e); - exchangeEdges(t, g, e, f); - } -} - -/* - * Initializes cut values for all edges in the tree. - */ -function initCutValues(t, g) { - var vs = postorder(t, t.nodes()); - vs = vs.slice(0, vs.length - 1); - forEach/* default */.A(vs, function (v) { - assignCutValue(t, g, v); - }); -} - -function assignCutValue(t, g, child) { - var childLab = t.node(child); - var parent = childLab.parent; - t.edge(child, parent).cutvalue = calcCutValue(t, g, child); -} - -/* - * Given the tight tree, its graph, and a child in the graph calculate and - * return the cut value for the edge between the child and its parent. - */ -function calcCutValue(t, g, child) { - var childLab = t.node(child); - var parent = childLab.parent; - // True if the child is on the tail end of the edge in the directed graph - var childIsTail = true; - // The graph's view of the tree edge we're inspecting - var graphEdge = g.edge(child, parent); - // The accumulated cut value for the edge between this node and its parent - var cutValue = 0; - - if (!graphEdge) { - childIsTail = false; - graphEdge = g.edge(parent, child); - } - - cutValue = graphEdge.weight; - - forEach/* default */.A(g.nodeEdges(child), function (e) { - var isOutEdge = e.v === child, - other = isOutEdge ? e.w : e.v; - - if (other !== parent) { - var pointsToHead = isOutEdge === childIsTail, - otherWeight = g.edge(e).weight; - - cutValue += pointsToHead ? otherWeight : -otherWeight; - if (isTreeEdge(t, child, other)) { - var otherCutValue = t.edge(child, other).cutvalue; - cutValue += pointsToHead ? -otherCutValue : otherCutValue; - } - } - }); - - return cutValue; -} - -function initLowLimValues(tree, root) { - if (arguments.length < 2) { - root = tree.nodes()[0]; - } - dfsAssignLowLim(tree, {}, 1, root); -} - -function dfsAssignLowLim(tree, visited, nextLim, v, parent) { - var low = nextLim; - var label = tree.node(v); - - visited[v] = true; - forEach/* default */.A(tree.neighbors(v), function (w) { - if (!has/* default */.A(visited, w)) { - nextLim = dfsAssignLowLim(tree, visited, nextLim, w, v); - } - }); - - label.low = low; - label.lim = nextLim++; - if (parent) { - label.parent = parent; - } else { - // TODO should be able to remove this when we incrementally update low lim - delete label.parent; - } - - return nextLim; -} - -function leaveEdge(tree) { - return lodash_es_find(tree.edges(), function (e) { - return tree.edge(e).cutvalue < 0; - }); -} - -function enterEdge(t, g, edge) { - var v = edge.v; - var w = edge.w; - - // For the rest of this function we assume that v is the tail and w is the - // head, so if we don't have this edge in the graph we should flip it to - // match the correct orientation. - if (!g.hasEdge(v, w)) { - v = edge.w; - w = edge.v; - } - - var vLabel = t.node(v); - var wLabel = t.node(w); - var tailLabel = vLabel; - var flip = false; - - // If the root is in the tail of the edge then we need to flip the logic that - // checks for the head and tail nodes in the candidates function below. - if (vLabel.lim > wLabel.lim) { - tailLabel = wLabel; - flip = true; - } - - var candidates = filter/* default */.A(g.edges(), function (edge) { - return ( - flip === isDescendant(t, t.node(edge.v), tailLabel) && - flip !== isDescendant(t, t.node(edge.w), tailLabel) - ); - }); - - return lodash_es_minBy(candidates, function (edge) { - return slack(g, edge); - }); -} - -function exchangeEdges(t, g, e, f) { - var v = e.v; - var w = e.w; - t.removeEdge(v, w); - t.setEdge(f.v, f.w, {}); - initLowLimValues(t); - initCutValues(t, g); - updateRanks(t, g); -} - -function updateRanks(t, g) { - var root = lodash_es_find(t.nodes(), function (v) { - return !g.node(v).parent; - }); - var vs = preorder(t, root); - vs = vs.slice(1); - forEach/* default */.A(vs, function (v) { - var parent = t.node(v).parent, - edge = g.edge(v, parent), - flipped = false; - - if (!edge) { - edge = g.edge(parent, v); - flipped = true; - } - - g.node(v).rank = g.node(parent).rank + (flipped ? edge.minlen : -edge.minlen); - }); -} - -/* - * Returns true if the edge is in the tree. - */ -function isTreeEdge(tree, u, v) { - return tree.hasEdge(u, v); -} - -/* - * Returns true if the specified node is descendant of the root node per the - * assigned low and lim attributes in the tree. - */ -function isDescendant(tree, vLabel, rootLabel) { - return rootLabel.low <= vLabel.lim && vLabel.lim <= rootLabel.lim; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/rank/index.js - - - - - - -/* - * Assigns a rank to each node in the input graph that respects the "minlen" - * constraint specified on edges between nodes. - * - * This basic structure is derived from Gansner, et al., "A Technique for - * Drawing Directed Graphs." - * - * Pre-conditions: - * - * 1. Graph must be a connected DAG - * 2. Graph nodes must be objects - * 3. Graph edges must have "weight" and "minlen" attributes - * - * Post-conditions: - * - * 1. Graph nodes will have a "rank" attribute based on the results of the - * algorithm. Ranks can start at any index (including negative), we'll - * fix them up later. - */ -function rank(g) { - switch (g.graph().ranker) { - case 'network-simplex': - networkSimplexRanker(g); - break; - case 'tight-tree': - tightTreeRanker(g); - break; - case 'longest-path': - longestPathRanker(g); - break; - default: - networkSimplexRanker(g); - } -} - -// A fast and simple ranker, but results are far from optimal. -var longestPathRanker = longestPath; - -function tightTreeRanker(g) { - longestPath(g); - feasibleTree(g); -} - -function networkSimplexRanker(g) { - networkSimplex(g); -} - -// EXTERNAL MODULE: ./node_modules/lodash-es/values.js + 1 modules -var values = __webpack_require__(38207); -// EXTERNAL MODULE: ./node_modules/lodash-es/reduce.js + 2 modules -var reduce = __webpack_require__(89463); -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/nesting-graph.js - - - - - -/* - * A nesting graph creates dummy nodes for the tops and bottoms of subgraphs, - * adds appropriate edges to ensure that all cluster nodes are placed between - * these boundries, and ensures that the graph is connected. - * - * In addition we ensure, through the use of the minlen property, that nodes - * and subgraph border nodes to not end up on the same rank. - * - * Preconditions: - * - * 1. Input graph is a DAG - * 2. Nodes in the input graph has a minlen attribute - * - * Postconditions: - * - * 1. Input graph is connected. - * 2. Dummy nodes are added for the tops and bottoms of subgraphs. - * 3. The minlen attribute for nodes is adjusted to ensure nodes do not - * get placed on the same rank as subgraph border nodes. - * - * The nesting graph idea comes from Sander, "Layout of Compound Directed - * Graphs." - */ -function nesting_graph_run(g) { - var root = addDummyNode(g, 'root', {}, '_root'); - var depths = treeDepths(g); - var height = lodash_es_max(values/* default */.A(depths)) - 1; // Note: depths is an Object not an array - var nodeSep = 2 * height + 1; - - g.graph().nestingRoot = root; - - // Multiply minlen by nodeSep to align nodes on non-border ranks. - forEach/* default */.A(g.edges(), function (e) { - g.edge(e).minlen *= nodeSep; - }); - - // Calculate a weight that is sufficient to keep subgraphs vertically compact - var weight = sumWeights(g) + 1; - - // Create border nodes and link them up - forEach/* default */.A(g.children(), function (child) { - nesting_graph_dfs(g, root, nodeSep, weight, height, depths, child); - }); - - // Save the multiplier for node layers for later removal of empty border - // layers. - g.graph().nodeRankFactor = nodeSep; -} - -function nesting_graph_dfs(g, root, nodeSep, weight, height, depths, v) { - var children = g.children(v); - if (!children.length) { - if (v !== root) { - g.setEdge(root, v, { weight: 0, minlen: nodeSep }); - } - return; - } - - var top = addBorderNode(g, '_bt'); - var bottom = addBorderNode(g, '_bb'); - var label = g.node(v); - - g.setParent(top, v); - label.borderTop = top; - g.setParent(bottom, v); - label.borderBottom = bottom; - - forEach/* default */.A(children, function (child) { - nesting_graph_dfs(g, root, nodeSep, weight, height, depths, child); - - var childNode = g.node(child); - var childTop = childNode.borderTop ? childNode.borderTop : child; - var childBottom = childNode.borderBottom ? childNode.borderBottom : child; - var thisWeight = childNode.borderTop ? weight : 2 * weight; - var minlen = childTop !== childBottom ? 1 : height - depths[v] + 1; - - g.setEdge(top, childTop, { - weight: thisWeight, - minlen: minlen, - nestingEdge: true, - }); - - g.setEdge(childBottom, bottom, { - weight: thisWeight, - minlen: minlen, - nestingEdge: true, - }); - }); - - if (!g.parent(v)) { - g.setEdge(root, top, { weight: 0, minlen: height + depths[v] }); - } -} - -function treeDepths(g) { - var depths = {}; - function dfs(v, depth) { - var children = g.children(v); - if (children && children.length) { - forEach/* default */.A(children, function (child) { - dfs(child, depth + 1); - }); - } - depths[v] = depth; - } - forEach/* default */.A(g.children(), function (v) { - dfs(v, 1); - }); - return depths; -} - -function sumWeights(g) { - return reduce/* default */.A( - g.edges(), - function (acc, e) { - return acc + g.edge(e).weight; - }, - 0 - ); -} - -function cleanup(g) { - var graphLabel = g.graph(); - g.removeNode(graphLabel.nestingRoot); - delete graphLabel.nestingRoot; - forEach/* default */.A(g.edges(), function (e) { - var edge = g.edge(e); - if (edge.nestingEdge) { - g.removeEdge(e); - } - }); -} - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseClone.js + 15 modules -var _baseClone = __webpack_require__(91641); -;// CONCATENATED MODULE: ./node_modules/lodash-es/cloneDeep.js - - -/** Used to compose bitmasks for cloning. */ -var CLONE_DEEP_FLAG = 1, - CLONE_SYMBOLS_FLAG = 4; - -/** - * This method is like `_.clone` except that it recursively clones `value`. - * - * @static - * @memberOf _ - * @since 1.0.0 - * @category Lang - * @param {*} value The value to recursively clone. - * @returns {*} Returns the deep cloned value. - * @see _.clone - * @example - * - * var objects = [{ 'a': 1 }, { 'b': 2 }]; - * - * var deep = _.cloneDeep(objects); - * console.log(deep[0] === objects[0]); - * // => false - */ -function cloneDeep(value) { - return (0,_baseClone/* default */.A)(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); -} - -/* harmony default export */ const lodash_es_cloneDeep = (cloneDeep); - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/add-subgraph-constraints.js - - - - -function addSubgraphConstraints(g, cg, vs) { - var prev = {}, - rootPrev; - - forEach/* default */.A(vs, function (v) { - var child = g.parent(v), - parent, - prevChild; - while (child) { - parent = g.parent(child); - if (parent) { - prevChild = prev[parent]; - prev[parent] = child; - } else { - prevChild = rootPrev; - rootPrev = child; - } - if (prevChild && prevChild !== child) { - cg.setEdge(prevChild, child); - return; - } - child = parent; - } - }); - - /* - function dfs(v) { - var children = v ? g.children(v) : g.children(); - if (children.length) { - var min = Number.POSITIVE_INFINITY, - subgraphs = []; - _.each(children, function(child) { - var childMin = dfs(child); - if (g.children(child).length) { - subgraphs.push({ v: child, order: childMin }); - } - min = Math.min(min, childMin); - }); - _.reduce(_.sortBy(subgraphs, "order"), function(prev, curr) { - cg.setEdge(prev.v, curr.v); - return curr; - }); - return min; - } - return g.node(v).order; - } - dfs(undefined); - */ -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/build-layer-graph.js - - - - - -/* - * Constructs a graph that can be used to sort a layer of nodes. The graph will - * contain all base and subgraph nodes from the request layer in their original - * hierarchy and any edges that are incident on these nodes and are of the type - * requested by the "relationship" parameter. - * - * Nodes from the requested rank that do not have parents are assigned a root - * node in the output graph, which is set in the root graph attribute. This - * makes it easy to walk the hierarchy of movable nodes during ordering. - * - * Pre-conditions: - * - * 1. Input graph is a DAG - * 2. Base nodes in the input graph have a rank attribute - * 3. Subgraph nodes in the input graph has minRank and maxRank attributes - * 4. Edges have an assigned weight - * - * Post-conditions: - * - * 1. Output graph has all nodes in the movable rank with preserved - * hierarchy. - * 2. Root nodes in the movable layer are made children of the node - * indicated by the root attribute of the graph. - * 3. Non-movable nodes incident on movable nodes, selected by the - * relationship parameter, are included in the graph (without hierarchy). - * 4. Edges incident on movable nodes, selected by the relationship - * parameter, are added to the output graph. - * 5. The weights for copied edges are aggregated as need, since the output - * graph is not a multi-graph. - */ -function buildLayerGraph(g, rank, relationship) { - var root = createRootNode(g), - result = new graphlib/* Graph */.T({ compound: true }) - .setGraph({ root: root }) - .setDefaultNodeLabel(function (v) { - return g.node(v); - }); - - forEach/* default */.A(g.nodes(), function (v) { - var node = g.node(v), - parent = g.parent(v); - - if (node.rank === rank || (node.minRank <= rank && rank <= node.maxRank)) { - result.setNode(v); - result.setParent(v, parent || root); - - // This assumes we have only short edges! - forEach/* default */.A(g[relationship](v), function (e) { - var u = e.v === v ? e.w : e.v, - edge = result.edge(u, v), - weight = !isUndefined/* default */.A(edge) ? edge.weight : 0; - result.setEdge(u, v, { weight: g.edge(e).weight + weight }); - }); - - if (has/* default */.A(node, 'minRank')) { - result.setNode(v, { - borderLeft: node.borderLeft[rank], - borderRight: node.borderRight[rank], - }); - } - } - }); - - return result; -} - -function createRootNode(g) { - var v; - while (g.hasNode((v = uniqueId/* default */.A('_root')))); - return v; -} - -// EXTERNAL MODULE: ./node_modules/lodash-es/_assignValue.js -var _assignValue = __webpack_require__(52851); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseZipObject.js -/** - * This base implementation of `_.zipObject` which assigns values using `assignFunc`. - * - * @private - * @param {Array} props The property identifiers. - * @param {Array} values The property values. - * @param {Function} assignFunc The function to assign values. - * @returns {Object} Returns the new object. - */ -function baseZipObject(props, values, assignFunc) { - var index = -1, - length = props.length, - valsLength = values.length, - result = {}; - - while (++index < length) { - var value = index < valsLength ? values[index] : undefined; - assignFunc(result, props[index], value); - } - return result; -} - -/* harmony default export */ const _baseZipObject = (baseZipObject); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/zipObject.js - - - -/** - * This method is like `_.fromPairs` except that it accepts two arrays, - * one of property identifiers and one of corresponding values. - * - * @static - * @memberOf _ - * @since 0.4.0 - * @category Array - * @param {Array} [props=[]] The property identifiers. - * @param {Array} [values=[]] The property values. - * @returns {Object} Returns the new object. - * @example - * - * _.zipObject(['a', 'b'], [1, 2]); - * // => { 'a': 1, 'b': 2 } - */ -function zipObject(props, values) { - return _baseZipObject(props || [], values || [], _assignValue/* default */.A); -} - -/* harmony default export */ const lodash_es_zipObject = (zipObject); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFlatten.js + 1 modules -var _baseFlatten = __webpack_require__(13588); -// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayMap.js -var _arrayMap = __webpack_require__(45572); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGet.js -var _baseGet = __webpack_require__(66318); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseMap.js -var _baseMap = __webpack_require__(52568); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseSortBy.js -/** - * The base implementation of `_.sortBy` which uses `comparer` to define the - * sort order of `array` and replaces criteria objects with their corresponding - * values. - * - * @private - * @param {Array} array The array to sort. - * @param {Function} comparer The function to define sort order. - * @returns {Array} Returns `array`. - */ -function baseSortBy(array, comparer) { - var length = array.length; - - array.sort(comparer); - while (length--) { - array[length] = array[length].value; - } - return array; -} - -/* harmony default export */ const _baseSortBy = (baseSortBy); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseUnary.js -var _baseUnary = __webpack_require__(52789); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_compareAscending.js - - -/** - * Compares values to sort them in ascending order. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {number} Returns the sort order indicator for `value`. - */ -function compareAscending(value, other) { - if (value !== other) { - var valIsDefined = value !== undefined, - valIsNull = value === null, - valIsReflexive = value === value, - valIsSymbol = (0,isSymbol/* default */.A)(value); - - var othIsDefined = other !== undefined, - othIsNull = other === null, - othIsReflexive = other === other, - othIsSymbol = (0,isSymbol/* default */.A)(other); - - if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) || - (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) || - (valIsNull && othIsDefined && othIsReflexive) || - (!valIsDefined && othIsReflexive) || - !valIsReflexive) { - return 1; - } - if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) || - (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) || - (othIsNull && valIsDefined && valIsReflexive) || - (!othIsDefined && valIsReflexive) || - !othIsReflexive) { - return -1; - } - } - return 0; -} - -/* harmony default export */ const _compareAscending = (compareAscending); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_compareMultiple.js - - -/** - * Used by `_.orderBy` to compare multiple properties of a value to another - * and stable sort them. - * - * If `orders` is unspecified, all values are sorted in ascending order. Otherwise, - * specify an order of "desc" for descending or "asc" for ascending sort order - * of corresponding values. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {boolean[]|string[]} orders The order to sort by for each property. - * @returns {number} Returns the sort order indicator for `object`. - */ -function compareMultiple(object, other, orders) { - var index = -1, - objCriteria = object.criteria, - othCriteria = other.criteria, - length = objCriteria.length, - ordersLength = orders.length; - - while (++index < length) { - var result = _compareAscending(objCriteria[index], othCriteria[index]); - if (result) { - if (index >= ordersLength) { - return result; - } - var order = orders[index]; - return result * (order == 'desc' ? -1 : 1); - } - } - // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications - // that causes it, under certain circumstances, to provide the same value for - // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247 - // for more details. - // - // This also ensures a stable sort in V8 and other engines. - // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details. - return object.index - other.index; -} - -/* harmony default export */ const _compareMultiple = (compareMultiple); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseOrderBy.js - - - - - - - - - - -/** - * The base implementation of `_.orderBy` without param guards. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. - * @param {string[]} orders The sort orders of `iteratees`. - * @returns {Array} Returns the new sorted array. - */ -function baseOrderBy(collection, iteratees, orders) { - if (iteratees.length) { - iteratees = (0,_arrayMap/* default */.A)(iteratees, function(iteratee) { - if ((0,isArray/* default */.A)(iteratee)) { - return function(value) { - return (0,_baseGet/* default */.A)(value, iteratee.length === 1 ? iteratee[0] : iteratee); - } - } - return iteratee; - }); - } else { - iteratees = [identity/* default */.A]; - } - - var index = -1; - iteratees = (0,_arrayMap/* default */.A)(iteratees, (0,_baseUnary/* default */.A)(_baseIteratee/* default */.A)); - - var result = (0,_baseMap/* default */.A)(collection, function(value, key, collection) { - var criteria = (0,_arrayMap/* default */.A)(iteratees, function(iteratee) { - return iteratee(value); - }); - return { 'criteria': criteria, 'index': ++index, 'value': value }; - }); - - return _baseSortBy(result, function(object, other) { - return _compareMultiple(object, other, orders); - }); -} - -/* harmony default export */ const _baseOrderBy = (baseOrderBy); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseRest.js -var _baseRest = __webpack_require__(24326); -// EXTERNAL MODULE: ./node_modules/lodash-es/_isIterateeCall.js -var _isIterateeCall = __webpack_require__(6832); -;// CONCATENATED MODULE: ./node_modules/lodash-es/sortBy.js - - - - - -/** - * Creates an array of elements, sorted in ascending order by the results of - * running each element in a collection thru each iteratee. This method - * performs a stable sort, that is, it preserves the original sort order of - * equal elements. The iteratees are invoked with one argument: (value). - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {...(Function|Function[])} [iteratees=[_.identity]] - * The iteratees to sort by. - * @returns {Array} Returns the new sorted array. - * @example - * - * var users = [ - * { 'user': 'fred', 'age': 48 }, - * { 'user': 'barney', 'age': 36 }, - * { 'user': 'fred', 'age': 30 }, - * { 'user': 'barney', 'age': 34 } - * ]; - * - * _.sortBy(users, [function(o) { return o.user; }]); - * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]] - * - * _.sortBy(users, ['user', 'age']); - * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]] - */ -var sortBy = (0,_baseRest/* default */.A)(function(collection, iteratees) { - if (collection == null) { - return []; - } - var length = iteratees.length; - if (length > 1 && (0,_isIterateeCall/* default */.A)(collection, iteratees[0], iteratees[1])) { - iteratees = []; - } else if (length > 2 && (0,_isIterateeCall/* default */.A)(iteratees[0], iteratees[1], iteratees[2])) { - iteratees = [iteratees[0]]; - } - return _baseOrderBy(collection, (0,_baseFlatten/* default */.A)(iteratees, 1), []); -}); - -/* harmony default export */ const lodash_es_sortBy = (sortBy); - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/cross-count.js - - - - -/* - * A function that takes a layering (an array of layers, each with an array of - * ordererd nodes) and a graph and returns a weighted crossing count. - * - * Pre-conditions: - * - * 1. Input graph must be simple (not a multigraph), directed, and include - * only simple edges. - * 2. Edges in the input graph must have assigned weights. - * - * Post-conditions: - * - * 1. The graph and layering matrix are left unchanged. - * - * This algorithm is derived from Barth, et al., "Bilayer Cross Counting." - */ -function crossCount(g, layering) { - var cc = 0; - for (var i = 1; i < layering.length; ++i) { - cc += twoLayerCrossCount(g, layering[i - 1], layering[i]); - } - return cc; -} - -function twoLayerCrossCount(g, northLayer, southLayer) { - // Sort all of the edges between the north and south layers by their position - // in the north layer and then the south. Map these edges to the position of - // their head in the south layer. - var southPos = lodash_es_zipObject( - southLayer, - map/* default */.A(southLayer, function (v, i) { - return i; - }) - ); - var southEntries = flatten/* default */.A( - map/* default */.A(northLayer, function (v) { - return lodash_es_sortBy( - map/* default */.A(g.outEdges(v), function (e) { - return { pos: southPos[e.w], weight: g.edge(e).weight }; - }), - 'pos' - ); - }) - ); - - // Build the accumulator tree - var firstIndex = 1; - while (firstIndex < southLayer.length) firstIndex <<= 1; - var treeSize = 2 * firstIndex - 1; - firstIndex -= 1; - var tree = map/* default */.A(new Array(treeSize), function () { - return 0; - }); - - // Calculate the weighted crossings - var cc = 0; - forEach/* default */.A( - // @ts-expect-error - southEntries.forEach(function (entry) { - var index = entry.pos + firstIndex; - tree[index] += entry.weight; - var weightSum = 0; - // @ts-expect-error - while (index > 0) { - // @ts-expect-error - if (index % 2) { - weightSum += tree[index + 1]; - } - // @ts-expect-error - index = (index - 1) >> 1; - tree[index] += entry.weight; - } - cc += entry.weight * weightSum; - }) - ); - - return cc; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/init-order.js - - - - -/* - * Assigns an initial order value for each node by performing a DFS search - * starting from nodes in the first rank. Nodes are assigned an order in their - * rank as they are first visited. - * - * This approach comes from Gansner, et al., "A Technique for Drawing Directed - * Graphs." - * - * Returns a layering matrix with an array per layer and each layer sorted by - * the order of its nodes. - */ -function initOrder(g) { - var visited = {}; - var simpleNodes = filter/* default */.A(g.nodes(), function (v) { - return !g.children(v).length; - }); - var maxRank = lodash_es_max( - map/* default */.A(simpleNodes, function (v) { - return g.node(v).rank; - }) - ); - var layers = map/* default */.A(range/* default */.A(maxRank + 1), function () { - return []; - }); - - function dfs(v) { - if (has/* default */.A(visited, v)) return; - visited[v] = true; - var node = g.node(v); - layers[node.rank].push(v); - forEach/* default */.A(g.successors(v), dfs); - } - - var orderedVs = lodash_es_sortBy(simpleNodes, function (v) { - return g.node(v).rank; - }); - forEach/* default */.A(orderedVs, dfs); - - return layers; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/barycenter.js - - - - -function barycenter(g, movable) { - return map/* default */.A(movable, function (v) { - var inV = g.inEdges(v); - if (!inV.length) { - return { v: v }; - } else { - var result = reduce/* default */.A( - inV, - function (acc, e) { - var edge = g.edge(e), - nodeU = g.node(e.v); - return { - sum: acc.sum + edge.weight * nodeU.order, - weight: acc.weight + edge.weight, - }; - }, - { sum: 0, weight: 0 } - ); - - return { - v: v, - barycenter: result.sum / result.weight, - weight: result.weight, - }; - } - }); -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/resolve-conflicts.js - - - - -/* - * Given a list of entries of the form {v, barycenter, weight} and a - * constraint graph this function will resolve any conflicts between the - * constraint graph and the barycenters for the entries. If the barycenters for - * an entry would violate a constraint in the constraint graph then we coalesce - * the nodes in the conflict into a new node that respects the contraint and - * aggregates barycenter and weight information. - * - * This implementation is based on the description in Forster, "A Fast and - * Simple Hueristic for Constrained Two-Level Crossing Reduction," thought it - * differs in some specific details. - * - * Pre-conditions: - * - * 1. Each entry has the form {v, barycenter, weight}, or if the node has - * no barycenter, then {v}. - * - * Returns: - * - * A new list of entries of the form {vs, i, barycenter, weight}. The list - * `vs` may either be a singleton or it may be an aggregation of nodes - * ordered such that they do not violate constraints from the constraint - * graph. The property `i` is the lowest original index of any of the - * elements in `vs`. - */ -function resolveConflicts(entries, cg) { - var mappedEntries = {}; - forEach/* default */.A(entries, function (entry, i) { - var tmp = (mappedEntries[entry.v] = { - indegree: 0, - in: [], - out: [], - vs: [entry.v], - i: i, - }); - if (!isUndefined/* default */.A(entry.barycenter)) { - // @ts-expect-error - tmp.barycenter = entry.barycenter; - // @ts-expect-error - tmp.weight = entry.weight; - } - }); - - forEach/* default */.A(cg.edges(), function (e) { - var entryV = mappedEntries[e.v]; - var entryW = mappedEntries[e.w]; - if (!isUndefined/* default */.A(entryV) && !isUndefined/* default */.A(entryW)) { - entryW.indegree++; - entryV.out.push(mappedEntries[e.w]); - } - }); - - var sourceSet = filter/* default */.A(mappedEntries, function (entry) { - // @ts-expect-error - return !entry.indegree; - }); - - return doResolveConflicts(sourceSet); -} - -function doResolveConflicts(sourceSet) { - var entries = []; - - function handleIn(vEntry) { - return function (uEntry) { - if (uEntry.merged) { - return; - } - if ( - isUndefined/* default */.A(uEntry.barycenter) || - isUndefined/* default */.A(vEntry.barycenter) || - uEntry.barycenter >= vEntry.barycenter - ) { - mergeEntries(vEntry, uEntry); - } - }; - } - - function handleOut(vEntry) { - return function (wEntry) { - wEntry['in'].push(vEntry); - if (--wEntry.indegree === 0) { - sourceSet.push(wEntry); - } - }; - } - - while (sourceSet.length) { - var entry = sourceSet.pop(); - entries.push(entry); - forEach/* default */.A(entry['in'].reverse(), handleIn(entry)); - forEach/* default */.A(entry.out, handleOut(entry)); - } - - return map/* default */.A( - filter/* default */.A(entries, function (entry) { - return !entry.merged; - }), - function (entry) { - return pick/* default */.A(entry, ['vs', 'i', 'barycenter', 'weight']); - } - ); -} - -function mergeEntries(target, source) { - var sum = 0; - var weight = 0; - - if (target.weight) { - sum += target.barycenter * target.weight; - weight += target.weight; - } - - if (source.weight) { - sum += source.barycenter * source.weight; - weight += source.weight; - } - - target.vs = source.vs.concat(target.vs); - target.barycenter = sum / weight; - target.weight = weight; - target.i = Math.min(source.i, target.i); - source.merged = true; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/sort.js - - - - - -function sort(entries, biasRight) { - var parts = partition(entries, function (entry) { - return has/* default */.A(entry, 'barycenter'); - }); - var sortable = parts.lhs, - unsortable = lodash_es_sortBy(parts.rhs, function (entry) { - return -entry.i; - }), - vs = [], - sum = 0, - weight = 0, - vsIndex = 0; - - sortable.sort(compareWithBias(!!biasRight)); - - vsIndex = consumeUnsortable(vs, unsortable, vsIndex); - - forEach/* default */.A(sortable, function (entry) { - vsIndex += entry.vs.length; - vs.push(entry.vs); - sum += entry.barycenter * entry.weight; - weight += entry.weight; - vsIndex = consumeUnsortable(vs, unsortable, vsIndex); - }); - - var result = { vs: flatten/* default */.A(vs) }; - if (weight) { - result.barycenter = sum / weight; - result.weight = weight; - } - return result; -} - -function consumeUnsortable(vs, unsortable, index) { - var last; - while (unsortable.length && (last = lodash_es_last(unsortable)).i <= index) { - unsortable.pop(); - vs.push(last.vs); - index++; - } - return index; -} - -function compareWithBias(bias) { - return function (entryV, entryW) { - if (entryV.barycenter < entryW.barycenter) { - return -1; - } else if (entryV.barycenter > entryW.barycenter) { - return 1; - } - - return !bias ? entryV.i - entryW.i : entryW.i - entryV.i; - }; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/sort-subgraph.js - - - - - - - -function sortSubgraph(g, v, cg, biasRight) { - var movable = g.children(v); - var node = g.node(v); - var bl = node ? node.borderLeft : undefined; - var br = node ? node.borderRight : undefined; - var subgraphs = {}; - - if (bl) { - movable = filter/* default */.A(movable, function (w) { - return w !== bl && w !== br; - }); - } - - var barycenters = barycenter(g, movable); - forEach/* default */.A(barycenters, function (entry) { - if (g.children(entry.v).length) { - var subgraphResult = sortSubgraph(g, entry.v, cg, biasRight); - subgraphs[entry.v] = subgraphResult; - if (has/* default */.A(subgraphResult, 'barycenter')) { - mergeBarycenters(entry, subgraphResult); - } - } - }); - - var entries = resolveConflicts(barycenters, cg); - expandSubgraphs(entries, subgraphs); - - var result = sort(entries, biasRight); - - if (bl) { - result.vs = flatten/* default */.A([bl, result.vs, br]); - if (g.predecessors(bl).length) { - var blPred = g.node(g.predecessors(bl)[0]), - brPred = g.node(g.predecessors(br)[0]); - if (!has/* default */.A(result, 'barycenter')) { - result.barycenter = 0; - result.weight = 0; - } - result.barycenter = - (result.barycenter * result.weight + blPred.order + brPred.order) / (result.weight + 2); - result.weight += 2; - } - } - - return result; -} - -function expandSubgraphs(entries, subgraphs) { - forEach/* default */.A(entries, function (entry) { - entry.vs = flatten/* default */.A( - entry.vs.map(function (v) { - if (subgraphs[v]) { - return subgraphs[v].vs; - } - return v; - }) - ); - }); -} - -function mergeBarycenters(target, other) { - if (!isUndefined/* default */.A(target.barycenter)) { - target.barycenter = - (target.barycenter * target.weight + other.barycenter * other.weight) / - (target.weight + other.weight); - target.weight += other.weight; - } else { - target.barycenter = other.barycenter; - target.weight = other.weight; - } -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/index.js - - - - - - - - - - - -/* - * Applies heuristics to minimize edge crossings in the graph and sets the best - * order solution as an order attribute on each node. - * - * Pre-conditions: - * - * 1. Graph must be DAG - * 2. Graph nodes must be objects with a "rank" attribute - * 3. Graph edges must have the "weight" attribute - * - * Post-conditions: - * - * 1. Graph nodes will have an "order" attribute based on the results of the - * algorithm. - */ -function order(g) { - var maxRank = util_maxRank(g), - downLayerGraphs = buildLayerGraphs(g, range/* default */.A(1, maxRank + 1), 'inEdges'), - upLayerGraphs = buildLayerGraphs(g, range/* default */.A(maxRank - 1, -1, -1), 'outEdges'); - - var layering = initOrder(g); - assignOrder(g, layering); - - var bestCC = Number.POSITIVE_INFINITY, - best; - - for (var i = 0, lastBest = 0; lastBest < 4; ++i, ++lastBest) { - sweepLayerGraphs(i % 2 ? downLayerGraphs : upLayerGraphs, i % 4 >= 2); - - layering = buildLayerMatrix(g); - var cc = crossCount(g, layering); - if (cc < bestCC) { - lastBest = 0; - best = lodash_es_cloneDeep(layering); - bestCC = cc; - } - } - - assignOrder(g, best); -} - -function buildLayerGraphs(g, ranks, relationship) { - return map/* default */.A(ranks, function (rank) { - return buildLayerGraph(g, rank, relationship); - }); -} - -function sweepLayerGraphs(layerGraphs, biasRight) { - var cg = new graphlib/* Graph */.T(); - forEach/* default */.A(layerGraphs, function (lg) { - var root = lg.graph().root; - var sorted = sortSubgraph(lg, root, cg, biasRight); - forEach/* default */.A(sorted.vs, function (v, i) { - lg.node(v).order = i; - }); - addSubgraphConstraints(lg, cg, sorted.vs); - }); -} - -function assignOrder(g, layering) { - forEach/* default */.A(layering, function (layer) { - forEach/* default */.A(layer, function (v, i) { - g.node(v).order = i; - }); - }); -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/parent-dummy-chains.js - - - - -function parentDummyChains(g) { - var postorderNums = parent_dummy_chains_postorder(g); - - forEach/* default */.A(g.graph().dummyChains, function (v) { - var node = g.node(v); - var edgeObj = node.edgeObj; - var pathData = findPath(g, postorderNums, edgeObj.v, edgeObj.w); - var path = pathData.path; - var lca = pathData.lca; - var pathIdx = 0; - var pathV = path[pathIdx]; - var ascending = true; - - while (v !== edgeObj.w) { - node = g.node(v); - - if (ascending) { - while ((pathV = path[pathIdx]) !== lca && g.node(pathV).maxRank < node.rank) { - pathIdx++; - } - - if (pathV === lca) { - ascending = false; - } - } - - if (!ascending) { - while ( - pathIdx < path.length - 1 && - g.node((pathV = path[pathIdx + 1])).minRank <= node.rank - ) { - pathIdx++; - } - pathV = path[pathIdx]; - } - - g.setParent(v, pathV); - v = g.successors(v)[0]; - } - }); -} - -// Find a path from v to w through the lowest common ancestor (LCA). Return the -// full path and the LCA. -function findPath(g, postorderNums, v, w) { - var vPath = []; - var wPath = []; - var low = Math.min(postorderNums[v].low, postorderNums[w].low); - var lim = Math.max(postorderNums[v].lim, postorderNums[w].lim); - var parent; - var lca; - - // Traverse up from v to find the LCA - parent = v; - do { - parent = g.parent(parent); - vPath.push(parent); - } while (parent && (postorderNums[parent].low > low || lim > postorderNums[parent].lim)); - lca = parent; - - // Traverse from w to LCA - parent = w; - while ((parent = g.parent(parent)) !== lca) { - wPath.push(parent); - } - - return { path: vPath.concat(wPath.reverse()), lca: lca }; -} - -function parent_dummy_chains_postorder(g) { - var result = {}; - var lim = 0; - - function dfs(v) { - var low = lim; - forEach/* default */.A(g.children(v), dfs); - result[v] = { low: low, lim: lim++ }; - } - forEach/* default */.A(g.children(), dfs); - - return result; -} - -// EXTERNAL MODULE: ./node_modules/lodash-es/_castFunction.js -var _castFunction = __webpack_require__(99922); -;// CONCATENATED MODULE: ./node_modules/lodash-es/forOwn.js - - - -/** - * Iterates over own enumerable string keyed properties of an object and - * invokes `iteratee` for each property. The iteratee is invoked with three - * arguments: (value, key, object). Iteratee functions may exit iteration - * early by explicitly returning `false`. - * - * @static - * @memberOf _ - * @since 0.3.0 - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Object} Returns `object`. - * @see _.forOwnRight - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.forOwn(new Foo, function(value, key) { - * console.log(key); - * }); - * // => Logs 'a' then 'b' (iteration order is not guaranteed). - */ -function forOwn(object, iteratee) { - return object && (0,_baseForOwn/* default */.A)(object, (0,_castFunction/* default */.A)(iteratee)); -} - -/* harmony default export */ const lodash_es_forOwn = (forOwn); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFor.js + 1 modules -var _baseFor = __webpack_require__(4574); -// EXTERNAL MODULE: ./node_modules/lodash-es/keysIn.js + 2 modules -var keysIn = __webpack_require__(55615); -;// CONCATENATED MODULE: ./node_modules/lodash-es/forIn.js - - - - -/** - * Iterates over own and inherited enumerable string keyed properties of an - * object and invokes `iteratee` for each property. The iteratee is invoked - * with three arguments: (value, key, object). Iteratee functions may exit - * iteration early by explicitly returning `false`. - * - * @static - * @memberOf _ - * @since 0.3.0 - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Object} Returns `object`. - * @see _.forInRight - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.forIn(new Foo, function(value, key) { - * console.log(key); - * }); - * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed). - */ -function forIn(object, iteratee) { - return object == null - ? object - : (0,_baseFor/* default */.A)(object, (0,_castFunction/* default */.A)(iteratee), keysIn/* default */.A); -} - -/* harmony default export */ const lodash_es_forIn = (forIn); - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/position/bk.js - - - - -/* - * This module provides coordinate assignment based on Brandes and Köpf, "Fast - * and Simple Horizontal Coordinate Assignment." - */ - - - -/* - * Marks all edges in the graph with a type-1 conflict with the "type1Conflict" - * property. A type-1 conflict is one where a non-inner segment crosses an - * inner segment. An inner segment is an edge with both incident nodes marked - * with the "dummy" property. - * - * This algorithm scans layer by layer, starting with the second, for type-1 - * conflicts between the current layer and the previous layer. For each layer - * it scans the nodes from left to right until it reaches one that is incident - * on an inner segment. It then scans predecessors to determine if they have - * edges that cross that inner segment. At the end a final scan is done for all - * nodes on the current rank to see if they cross the last visited inner - * segment. - * - * This algorithm (safely) assumes that a dummy node will only be incident on a - * single node in the layers being scanned. - */ -function findType1Conflicts(g, layering) { - var conflicts = {}; - - function visitLayer(prevLayer, layer) { - var // last visited node in the previous layer that is incident on an inner - // segment. - k0 = 0, - // Tracks the last node in this layer scanned for crossings with a type-1 - // segment. - scanPos = 0, - prevLayerLength = prevLayer.length, - lastNode = lodash_es_last(layer); - - forEach/* default */.A(layer, function (v, i) { - var w = findOtherInnerSegmentNode(g, v), - k1 = w ? g.node(w).order : prevLayerLength; - - if (w || v === lastNode) { - forEach/* default */.A(layer.slice(scanPos, i + 1), function (scanNode) { - forEach/* default */.A(g.predecessors(scanNode), function (u) { - var uLabel = g.node(u), - uPos = uLabel.order; - if ((uPos < k0 || k1 < uPos) && !(uLabel.dummy && g.node(scanNode).dummy)) { - addConflict(conflicts, u, scanNode); - } - }); - }); - // @ts-expect-error - scanPos = i + 1; - k0 = k1; - } - }); - - return layer; - } - - reduce/* default */.A(layering, visitLayer); - return conflicts; -} - -function findType2Conflicts(g, layering) { - var conflicts = {}; - - function scan(south, southPos, southEnd, prevNorthBorder, nextNorthBorder) { - var v; - forEach/* default */.A(range/* default */.A(southPos, southEnd), function (i) { - v = south[i]; - if (g.node(v).dummy) { - forEach/* default */.A(g.predecessors(v), function (u) { - var uNode = g.node(u); - if (uNode.dummy && (uNode.order < prevNorthBorder || uNode.order > nextNorthBorder)) { - addConflict(conflicts, u, v); - } - }); - } - }); - } - - function visitLayer(north, south) { - var prevNorthPos = -1, - nextNorthPos, - southPos = 0; - - forEach/* default */.A(south, function (v, southLookahead) { - if (g.node(v).dummy === 'border') { - var predecessors = g.predecessors(v); - if (predecessors.length) { - nextNorthPos = g.node(predecessors[0]).order; - scan(south, southPos, southLookahead, prevNorthPos, nextNorthPos); - // @ts-expect-error - southPos = southLookahead; - prevNorthPos = nextNorthPos; - } - } - scan(south, southPos, south.length, nextNorthPos, north.length); - }); - - return south; - } - - reduce/* default */.A(layering, visitLayer); - return conflicts; -} - -function findOtherInnerSegmentNode(g, v) { - if (g.node(v).dummy) { - return lodash_es_find(g.predecessors(v), function (u) { - return g.node(u).dummy; - }); - } -} - -function addConflict(conflicts, v, w) { - if (v > w) { - var tmp = v; - v = w; - w = tmp; - } - - var conflictsV = conflicts[v]; - if (!conflictsV) { - conflicts[v] = conflictsV = {}; - } - conflictsV[w] = true; -} - -function hasConflict(conflicts, v, w) { - if (v > w) { - var tmp = v; - v = w; - w = tmp; - } - return has/* default */.A(conflicts[v], w); -} - -/* - * Try to align nodes into vertical "blocks" where possible. This algorithm - * attempts to align a node with one of its median neighbors. If the edge - * connecting a neighbor is a type-1 conflict then we ignore that possibility. - * If a previous node has already formed a block with a node after the node - * we're trying to form a block with, we also ignore that possibility - our - * blocks would be split in that scenario. - */ -function verticalAlignment(g, layering, conflicts, neighborFn) { - var root = {}, - align = {}, - pos = {}; - - // We cache the position here based on the layering because the graph and - // layering may be out of sync. The layering matrix is manipulated to - // generate different extreme alignments. - forEach/* default */.A(layering, function (layer) { - forEach/* default */.A(layer, function (v, order) { - root[v] = v; - align[v] = v; - pos[v] = order; - }); - }); - - forEach/* default */.A(layering, function (layer) { - var prevIdx = -1; - forEach/* default */.A(layer, function (v) { - var ws = neighborFn(v); - if (ws.length) { - ws = lodash_es_sortBy(ws, function (w) { - return pos[w]; - }); - var mp = (ws.length - 1) / 2; - for (var i = Math.floor(mp), il = Math.ceil(mp); i <= il; ++i) { - var w = ws[i]; - if (align[v] === v && prevIdx < pos[w] && !hasConflict(conflicts, v, w)) { - align[w] = v; - align[v] = root[v] = root[w]; - prevIdx = pos[w]; - } - } - } - }); - }); - - return { root: root, align: align }; -} - -function horizontalCompaction(g, layering, root, align, reverseSep) { - // This portion of the algorithm differs from BK due to a number of problems. - // Instead of their algorithm we construct a new block graph and do two - // sweeps. The first sweep places blocks with the smallest possible - // coordinates. The second sweep removes unused space by moving blocks to the - // greatest coordinates without violating separation. - var xs = {}, - blockG = buildBlockGraph(g, layering, root, reverseSep), - borderType = reverseSep ? 'borderLeft' : 'borderRight'; - - function iterate(setXsFunc, nextNodesFunc) { - var stack = blockG.nodes(); - var elem = stack.pop(); - var visited = {}; - while (elem) { - if (visited[elem]) { - setXsFunc(elem); - } else { - visited[elem] = true; - stack.push(elem); - stack = stack.concat(nextNodesFunc(elem)); - } - - elem = stack.pop(); - } - } - - // First pass, assign smallest coordinates - function pass1(elem) { - xs[elem] = blockG.inEdges(elem).reduce(function (acc, e) { - return Math.max(acc, xs[e.v] + blockG.edge(e)); - }, 0); - } - - // Second pass, assign greatest coordinates - function pass2(elem) { - var min = blockG.outEdges(elem).reduce(function (acc, e) { - return Math.min(acc, xs[e.w] - blockG.edge(e)); - }, Number.POSITIVE_INFINITY); - - var node = g.node(elem); - if (min !== Number.POSITIVE_INFINITY && node.borderType !== borderType) { - xs[elem] = Math.max(xs[elem], min); - } - } - - iterate(pass1, blockG.predecessors.bind(blockG)); - iterate(pass2, blockG.successors.bind(blockG)); - - // Assign x coordinates to all nodes - forEach/* default */.A(align, function (v) { - xs[v] = xs[root[v]]; - }); - - return xs; -} - -function buildBlockGraph(g, layering, root, reverseSep) { - var blockGraph = new graphlib/* Graph */.T(), - graphLabel = g.graph(), - sepFn = sep(graphLabel.nodesep, graphLabel.edgesep, reverseSep); - - forEach/* default */.A(layering, function (layer) { - var u; - forEach/* default */.A(layer, function (v) { - var vRoot = root[v]; - blockGraph.setNode(vRoot); - if (u) { - var uRoot = root[u], - prevMax = blockGraph.edge(uRoot, vRoot); - blockGraph.setEdge(uRoot, vRoot, Math.max(sepFn(g, v, u), prevMax || 0)); - } - u = v; - }); - }); - - return blockGraph; -} - -/* - * Returns the alignment that has the smallest width of the given alignments. - */ -function findSmallestWidthAlignment(g, xss) { - return lodash_es_minBy(values/* default */.A(xss), function (xs) { - var max = Number.NEGATIVE_INFINITY; - var min = Number.POSITIVE_INFINITY; - - lodash_es_forIn(xs, function (x, v) { - var halfWidth = width(g, v) / 2; - - max = Math.max(x + halfWidth, max); - min = Math.min(x - halfWidth, min); - }); - - return max - min; - }); -} - -/* - * Align the coordinates of each of the layout alignments such that - * left-biased alignments have their minimum coordinate at the same point as - * the minimum coordinate of the smallest width alignment and right-biased - * alignments have their maximum coordinate at the same point as the maximum - * coordinate of the smallest width alignment. - */ -function alignCoordinates(xss, alignTo) { - var alignToVals = values/* default */.A(alignTo), - alignToMin = lodash_es_min(alignToVals), - alignToMax = lodash_es_max(alignToVals); - - forEach/* default */.A(['u', 'd'], function (vert) { - forEach/* default */.A(['l', 'r'], function (horiz) { - var alignment = vert + horiz, - xs = xss[alignment], - delta; - if (xs === alignTo) return; - - var xsVals = values/* default */.A(xs); - delta = horiz === 'l' ? alignToMin - lodash_es_min(xsVals) : alignToMax - lodash_es_max(xsVals); - - if (delta) { - xss[alignment] = lodash_es_mapValues(xs, function (x) { - return x + delta; - }); - } - }); - }); -} - -function balance(xss, align) { - return lodash_es_mapValues(xss.ul, function (ignore, v) { - if (align) { - return xss[align.toLowerCase()][v]; - } else { - var xs = lodash_es_sortBy(map/* default */.A(xss, v)); - return (xs[1] + xs[2]) / 2; - } - }); -} - -function positionX(g) { - var layering = buildLayerMatrix(g); - var conflicts = merge/* default */.A(findType1Conflicts(g, layering), findType2Conflicts(g, layering)); - - var xss = {}; - var adjustedLayering; - forEach/* default */.A(['u', 'd'], function (vert) { - adjustedLayering = vert === 'u' ? layering : values/* default */.A(layering).reverse(); - forEach/* default */.A(['l', 'r'], function (horiz) { - if (horiz === 'r') { - adjustedLayering = map/* default */.A(adjustedLayering, function (inner) { - return values/* default */.A(inner).reverse(); - }); - } - - var neighborFn = (vert === 'u' ? g.predecessors : g.successors).bind(g); - var align = verticalAlignment(g, adjustedLayering, conflicts, neighborFn); - var xs = horizontalCompaction(g, adjustedLayering, align.root, align.align, horiz === 'r'); - if (horiz === 'r') { - xs = lodash_es_mapValues(xs, function (x) { - return -x; - }); - } - xss[vert + horiz] = xs; - }); - }); - - var smallestWidth = findSmallestWidthAlignment(g, xss); - alignCoordinates(xss, smallestWidth); - return balance(xss, g.graph().align); -} - -function sep(nodeSep, edgeSep, reverseSep) { - return function (g, v, w) { - var vLabel = g.node(v); - var wLabel = g.node(w); - var sum = 0; - var delta; - - sum += vLabel.width / 2; - if (has/* default */.A(vLabel, 'labelpos')) { - switch (vLabel.labelpos.toLowerCase()) { - case 'l': - delta = -vLabel.width / 2; - break; - case 'r': - delta = vLabel.width / 2; - break; - } - } - if (delta) { - sum += reverseSep ? delta : -delta; - } - delta = 0; - - sum += (vLabel.dummy ? edgeSep : nodeSep) / 2; - sum += (wLabel.dummy ? edgeSep : nodeSep) / 2; - - sum += wLabel.width / 2; - if (has/* default */.A(wLabel, 'labelpos')) { - switch (wLabel.labelpos.toLowerCase()) { - case 'l': - delta = wLabel.width / 2; - break; - case 'r': - delta = -wLabel.width / 2; - break; - } - } - if (delta) { - sum += reverseSep ? delta : -delta; - } - delta = 0; - - return sum; - }; -} - -function width(g, v) { - return g.node(v).width; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/position/index.js - - - - - - -function position(g) { - g = asNonCompoundGraph(g); - - positionY(g); - lodash_es_forOwn(positionX(g), function (x, v) { - g.node(v).x = x; - }); -} - -function positionY(g) { - var layering = buildLayerMatrix(g); - var rankSep = g.graph().ranksep; - var prevY = 0; - forEach/* default */.A(layering, function (layer) { - var maxHeight = lodash_es_max( - map/* default */.A(layer, function (v) { - return g.node(v).height; - }) - ); - forEach/* default */.A(layer, function (v) { - g.node(v).y = prevY + maxHeight / 2; - }); - prevY += maxHeight + rankSep; - }); -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/layout.js - - - - - - - - - - - - - - - -function layout(g, opts) { - var time = opts && opts.debugTiming ? util_time : notime; - time('layout', function () { - var layoutGraph = time(' buildLayoutGraph', function () { - return buildLayoutGraph(g); - }); - time(' runLayout', function () { - runLayout(layoutGraph, time); - }); - time(' updateInputGraph', function () { - updateInputGraph(g, layoutGraph); - }); - }); -} - -function runLayout(g, time) { - time(' makeSpaceForEdgeLabels', function () { - makeSpaceForEdgeLabels(g); - }); - time(' removeSelfEdges', function () { - removeSelfEdges(g); - }); - time(' acyclic', function () { - run(g); - }); - time(' nestingGraph.run', function () { - nesting_graph_run(g); - }); - time(' rank', function () { - rank(asNonCompoundGraph(g)); - }); - time(' injectEdgeLabelProxies', function () { - injectEdgeLabelProxies(g); - }); - time(' removeEmptyRanks', function () { - removeEmptyRanks(g); - }); - time(' nestingGraph.cleanup', function () { - cleanup(g); - }); - time(' normalizeRanks', function () { - normalizeRanks(g); - }); - time(' assignRankMinMax', function () { - assignRankMinMax(g); - }); - time(' removeEdgeLabelProxies', function () { - removeEdgeLabelProxies(g); - }); - time(' normalize.run', function () { - normalize_run(g); - }); - time(' parentDummyChains', function () { - parentDummyChains(g); - }); - time(' addBorderSegments', function () { - addBorderSegments(g); - }); - time(' order', function () { - order(g); - }); - time(' insertSelfEdges', function () { - insertSelfEdges(g); - }); - time(' adjustCoordinateSystem', function () { - adjust(g); - }); - time(' position', function () { - position(g); - }); - time(' positionSelfEdges', function () { - positionSelfEdges(g); - }); - time(' removeBorderNodes', function () { - removeBorderNodes(g); - }); - time(' normalize.undo', function () { - normalize_undo(g); - }); - time(' fixupEdgeLabelCoords', function () { - fixupEdgeLabelCoords(g); - }); - time(' undoCoordinateSystem', function () { - coordinate_system_undo(g); - }); - time(' translateGraph', function () { - translateGraph(g); - }); - time(' assignNodeIntersects', function () { - assignNodeIntersects(g); - }); - time(' reversePoints', function () { - reversePointsForReversedEdges(g); - }); - time(' acyclic.undo', function () { - undo(g); - }); -} - -/* - * Copies final layout information from the layout graph back to the input - * graph. This process only copies whitelisted attributes from the layout graph - * to the input graph, so it serves as a good place to determine what - * attributes can influence layout. - */ -function updateInputGraph(inputGraph, layoutGraph) { - forEach/* default */.A(inputGraph.nodes(), function (v) { - var inputLabel = inputGraph.node(v); - var layoutLabel = layoutGraph.node(v); - - if (inputLabel) { - inputLabel.x = layoutLabel.x; - inputLabel.y = layoutLabel.y; - - if (layoutGraph.children(v).length) { - inputLabel.width = layoutLabel.width; - inputLabel.height = layoutLabel.height; - } - } - }); - - forEach/* default */.A(inputGraph.edges(), function (e) { - var inputLabel = inputGraph.edge(e); - var layoutLabel = layoutGraph.edge(e); - - inputLabel.points = layoutLabel.points; - if (has/* default */.A(layoutLabel, 'x')) { - inputLabel.x = layoutLabel.x; - inputLabel.y = layoutLabel.y; - } - }); - - inputGraph.graph().width = layoutGraph.graph().width; - inputGraph.graph().height = layoutGraph.graph().height; -} - -var graphNumAttrs = ['nodesep', 'edgesep', 'ranksep', 'marginx', 'marginy']; -var graphDefaults = { ranksep: 50, edgesep: 20, nodesep: 50, rankdir: 'tb' }; -var graphAttrs = ['acyclicer', 'ranker', 'rankdir', 'align']; -var nodeNumAttrs = ['width', 'height']; -var nodeDefaults = { width: 0, height: 0 }; -var edgeNumAttrs = ['minlen', 'weight', 'width', 'height', 'labeloffset']; -var edgeDefaults = { - minlen: 1, - weight: 1, - width: 0, - height: 0, - labeloffset: 10, - labelpos: 'r', -}; -var edgeAttrs = ['labelpos']; - -/* - * Constructs a new graph from the input graph, which can be used for layout. - * This process copies only whitelisted attributes from the input graph to the - * layout graph. Thus this function serves as a good place to determine what - * attributes can influence layout. - */ -function buildLayoutGraph(inputGraph) { - var g = new graphlib/* Graph */.T({ multigraph: true, compound: true }); - var graph = canonicalize(inputGraph.graph()); - - g.setGraph( - merge/* default */.A({}, graphDefaults, selectNumberAttrs(graph, graphNumAttrs), pick/* default */.A(graph, graphAttrs)) - ); - - forEach/* default */.A(inputGraph.nodes(), function (v) { - var node = canonicalize(inputGraph.node(v)); - g.setNode(v, defaults/* default */.A(selectNumberAttrs(node, nodeNumAttrs), nodeDefaults)); - g.setParent(v, inputGraph.parent(v)); - }); - - forEach/* default */.A(inputGraph.edges(), function (e) { - var edge = canonicalize(inputGraph.edge(e)); - g.setEdge( - e, - merge/* default */.A({}, edgeDefaults, selectNumberAttrs(edge, edgeNumAttrs), pick/* default */.A(edge, edgeAttrs)) - ); - }); - - return g; -} - -/* - * This idea comes from the Gansner paper: to account for edge labels in our - * layout we split each rank in half by doubling minlen and halving ranksep. - * Then we can place labels at these mid-points between nodes. - * - * We also add some minimal padding to the width to push the label for the edge - * away from the edge itself a bit. - */ -function makeSpaceForEdgeLabels(g) { - var graph = g.graph(); - graph.ranksep /= 2; - forEach/* default */.A(g.edges(), function (e) { - var edge = g.edge(e); - edge.minlen *= 2; - if (edge.labelpos.toLowerCase() !== 'c') { - if (graph.rankdir === 'TB' || graph.rankdir === 'BT') { - edge.width += edge.labeloffset; - } else { - edge.height += edge.labeloffset; - } - } - }); -} - -/* - * Creates temporary dummy nodes that capture the rank in which each edge's - * label is going to, if it has one of non-zero width and height. We do this - * so that we can safely remove empty ranks while preserving balance for the - * label's position. - */ -function injectEdgeLabelProxies(g) { - forEach/* default */.A(g.edges(), function (e) { - var edge = g.edge(e); - if (edge.width && edge.height) { - var v = g.node(e.v); - var w = g.node(e.w); - var label = { rank: (w.rank - v.rank) / 2 + v.rank, e: e }; - addDummyNode(g, 'edge-proxy', label, '_ep'); - } - }); -} - -function assignRankMinMax(g) { - var maxRank = 0; - forEach/* default */.A(g.nodes(), function (v) { - var node = g.node(v); - if (node.borderTop) { - node.minRank = g.node(node.borderTop).rank; - node.maxRank = g.node(node.borderBottom).rank; - // @ts-expect-error - maxRank = lodash_es_max(maxRank, node.maxRank); - } - }); - g.graph().maxRank = maxRank; -} - -function removeEdgeLabelProxies(g) { - forEach/* default */.A(g.nodes(), function (v) { - var node = g.node(v); - if (node.dummy === 'edge-proxy') { - g.edge(node.e).labelRank = node.rank; - g.removeNode(v); - } - }); -} - -function translateGraph(g) { - var minX = Number.POSITIVE_INFINITY; - var maxX = 0; - var minY = Number.POSITIVE_INFINITY; - var maxY = 0; - var graphLabel = g.graph(); - var marginX = graphLabel.marginx || 0; - var marginY = graphLabel.marginy || 0; - - function getExtremes(attrs) { - var x = attrs.x; - var y = attrs.y; - var w = attrs.width; - var h = attrs.height; - minX = Math.min(minX, x - w / 2); - maxX = Math.max(maxX, x + w / 2); - minY = Math.min(minY, y - h / 2); - maxY = Math.max(maxY, y + h / 2); - } - - forEach/* default */.A(g.nodes(), function (v) { - getExtremes(g.node(v)); - }); - forEach/* default */.A(g.edges(), function (e) { - var edge = g.edge(e); - if (has/* default */.A(edge, 'x')) { - getExtremes(edge); - } - }); - - minX -= marginX; - minY -= marginY; - - forEach/* default */.A(g.nodes(), function (v) { - var node = g.node(v); - node.x -= minX; - node.y -= minY; - }); - - forEach/* default */.A(g.edges(), function (e) { - var edge = g.edge(e); - forEach/* default */.A(edge.points, function (p) { - p.x -= minX; - p.y -= minY; - }); - if (has/* default */.A(edge, 'x')) { - edge.x -= minX; - } - if (has/* default */.A(edge, 'y')) { - edge.y -= minY; - } - }); - - graphLabel.width = maxX - minX + marginX; - graphLabel.height = maxY - minY + marginY; -} - -function assignNodeIntersects(g) { - forEach/* default */.A(g.edges(), function (e) { - var edge = g.edge(e); - var nodeV = g.node(e.v); - var nodeW = g.node(e.w); - var p1, p2; - if (!edge.points) { - edge.points = []; - p1 = nodeW; - p2 = nodeV; - } else { - p1 = edge.points[0]; - p2 = edge.points[edge.points.length - 1]; - } - edge.points.unshift(intersectRect(nodeV, p1)); - edge.points.push(intersectRect(nodeW, p2)); - }); -} - -function fixupEdgeLabelCoords(g) { - forEach/* default */.A(g.edges(), function (e) { - var edge = g.edge(e); - if (has/* default */.A(edge, 'x')) { - if (edge.labelpos === 'l' || edge.labelpos === 'r') { - edge.width -= edge.labeloffset; - } - switch (edge.labelpos) { - case 'l': - edge.x -= edge.width / 2 + edge.labeloffset; - break; - case 'r': - edge.x += edge.width / 2 + edge.labeloffset; - break; - } - } - }); -} - -function reversePointsForReversedEdges(g) { - forEach/* default */.A(g.edges(), function (e) { - var edge = g.edge(e); - if (edge.reversed) { - edge.points.reverse(); - } - }); -} - -function removeBorderNodes(g) { - forEach/* default */.A(g.nodes(), function (v) { - if (g.children(v).length) { - var node = g.node(v); - var t = g.node(node.borderTop); - var b = g.node(node.borderBottom); - var l = g.node(lodash_es_last(node.borderLeft)); - var r = g.node(lodash_es_last(node.borderRight)); - - node.width = Math.abs(r.x - l.x); - node.height = Math.abs(b.y - t.y); - node.x = l.x + node.width / 2; - node.y = t.y + node.height / 2; - } - }); - - forEach/* default */.A(g.nodes(), function (v) { - if (g.node(v).dummy === 'border') { - g.removeNode(v); - } - }); -} - -function removeSelfEdges(g) { - forEach/* default */.A(g.edges(), function (e) { - if (e.v === e.w) { - var node = g.node(e.v); - if (!node.selfEdges) { - node.selfEdges = []; - } - node.selfEdges.push({ e: e, label: g.edge(e) }); - g.removeEdge(e); - } - }); -} - -function insertSelfEdges(g) { - var layers = buildLayerMatrix(g); - forEach/* default */.A(layers, function (layer) { - var orderShift = 0; - forEach/* default */.A(layer, function (v, i) { - var node = g.node(v); - node.order = i + orderShift; - forEach/* default */.A(node.selfEdges, function (selfEdge) { - addDummyNode( - g, - 'selfedge', - { - width: selfEdge.label.width, - height: selfEdge.label.height, - rank: node.rank, - order: i + ++orderShift, - e: selfEdge.e, - label: selfEdge.label, - }, - '_se' - ); - }); - delete node.selfEdges; - }); - }); -} - -function positionSelfEdges(g) { - forEach/* default */.A(g.nodes(), function (v) { - var node = g.node(v); - if (node.dummy === 'selfedge') { - var selfNode = g.node(node.e.v); - var x = selfNode.x + selfNode.width / 2; - var y = selfNode.y; - var dx = node.x - x; - var dy = selfNode.height / 2; - g.setEdge(node.e, node.label); - g.removeNode(v); - node.label.points = [ - { x: x + (2 * dx) / 3, y: y - dy }, - { x: x + (5 * dx) / 6, y: y - dy }, - { x: x + dx, y: y }, - { x: x + (5 * dx) / 6, y: y + dy }, - { x: x + (2 * dx) / 3, y: y + dy }, - ]; - node.label.x = node.x; - node.label.y = node.y; - } - }); -} - -function selectNumberAttrs(obj, attrs) { - return lodash_es_mapValues(pick/* default */.A(obj, attrs), Number); -} - -function canonicalize(attrs) { - var newAttrs = {}; - forEach/* default */.A(attrs, function (v, k) { - newAttrs[k.toLowerCase()] = v; - }); - return newAttrs; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/index.js - - - - - - - - -/***/ }), - -/***/ 73046: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - T: () => (/* binding */ Graph) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/has.js + 1 modules -var has = __webpack_require__(48585); -// EXTERNAL MODULE: ./node_modules/lodash-es/constant.js -var constant = __webpack_require__(39142); -// EXTERNAL MODULE: ./node_modules/lodash-es/isFunction.js -var isFunction = __webpack_require__(89610); -// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js -var keys = __webpack_require__(27422); -// EXTERNAL MODULE: ./node_modules/lodash-es/filter.js + 1 modules -var filter = __webpack_require__(11662); -// EXTERNAL MODULE: ./node_modules/lodash-es/isEmpty.js -var isEmpty = __webpack_require__(66401); -// EXTERNAL MODULE: ./node_modules/lodash-es/forEach.js -var forEach = __webpack_require__(8058); -// EXTERNAL MODULE: ./node_modules/lodash-es/isUndefined.js -var isUndefined = __webpack_require__(69592); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFlatten.js + 1 modules -var _baseFlatten = __webpack_require__(13588); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseRest.js -var _baseRest = __webpack_require__(24326); -// EXTERNAL MODULE: ./node_modules/lodash-es/_SetCache.js + 2 modules -var _SetCache = __webpack_require__(62062); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFindIndex.js -var _baseFindIndex = __webpack_require__(25707); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsNaN.js -/** - * The base implementation of `_.isNaN` without support for number objects. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. - */ -function baseIsNaN(value) { - return value !== value; -} - -/* harmony default export */ const _baseIsNaN = (baseIsNaN); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_strictIndexOf.js -/** - * A specialized version of `_.indexOf` which performs strict equality - * comparisons of values, i.e. `===`. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} fromIndex The index to search from. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function strictIndexOf(array, value, fromIndex) { - var index = fromIndex - 1, - length = array.length; - - while (++index < length) { - if (array[index] === value) { - return index; - } - } - return -1; -} - -/* harmony default export */ const _strictIndexOf = (strictIndexOf); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIndexOf.js - - - - -/** - * The base implementation of `_.indexOf` without `fromIndex` bounds checks. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} fromIndex The index to search from. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function baseIndexOf(array, value, fromIndex) { - return value === value - ? _strictIndexOf(array, value, fromIndex) - : (0,_baseFindIndex/* default */.A)(array, _baseIsNaN, fromIndex); -} - -/* harmony default export */ const _baseIndexOf = (baseIndexOf); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_arrayIncludes.js - - -/** - * A specialized version of `_.includes` for arrays without support for - * specifying an index to search from. - * - * @private - * @param {Array} [array] The array to inspect. - * @param {*} target The value to search for. - * @returns {boolean} Returns `true` if `target` is found, else `false`. - */ -function arrayIncludes(array, value) { - var length = array == null ? 0 : array.length; - return !!length && _baseIndexOf(array, value, 0) > -1; -} - -/* harmony default export */ const _arrayIncludes = (arrayIncludes); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_arrayIncludesWith.js -/** - * This function is like `arrayIncludes` except that it accepts a comparator. - * - * @private - * @param {Array} [array] The array to inspect. - * @param {*} target The value to search for. - * @param {Function} comparator The comparator invoked per element. - * @returns {boolean} Returns `true` if `target` is found, else `false`. - */ -function arrayIncludesWith(array, value, comparator) { - var index = -1, - length = array == null ? 0 : array.length; - - while (++index < length) { - if (comparator(value, array[index])) { - return true; - } - } - return false; -} - -/* harmony default export */ const _arrayIncludesWith = (arrayIncludesWith); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_cacheHas.js -var _cacheHas = __webpack_require__(64099); -// EXTERNAL MODULE: ./node_modules/lodash-es/_Set.js -var _Set = __webpack_require__(39857); -;// CONCATENATED MODULE: ./node_modules/lodash-es/noop.js -/** - * This method returns `undefined`. - * - * @static - * @memberOf _ - * @since 2.3.0 - * @category Util - * @example - * - * _.times(2, _.noop); - * // => [undefined, undefined] - */ -function noop() { - // No operation performed. -} - -/* harmony default export */ const lodash_es_noop = (noop); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_setToArray.js -var _setToArray = __webpack_require__(29959); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_createSet.js - - - - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0; - -/** - * Creates a set object of `values`. - * - * @private - * @param {Array} values The values to add to the set. - * @returns {Object} Returns the new set. - */ -var createSet = !(_Set/* default */.A && (1 / (0,_setToArray/* default */.A)(new _Set/* default */.A([,-0]))[1]) == INFINITY) ? lodash_es_noop : function(values) { - return new _Set/* default */.A(values); -}; - -/* harmony default export */ const _createSet = (createSet); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseUniq.js - - - - - - - -/** Used as the size to enable large array optimizations. */ -var LARGE_ARRAY_SIZE = 200; - -/** - * The base implementation of `_.uniqBy` without support for iteratee shorthands. - * - * @private - * @param {Array} array The array to inspect. - * @param {Function} [iteratee] The iteratee invoked per element. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new duplicate free array. - */ -function baseUniq(array, iteratee, comparator) { - var index = -1, - includes = _arrayIncludes, - length = array.length, - isCommon = true, - result = [], - seen = result; - - if (comparator) { - isCommon = false; - includes = _arrayIncludesWith; - } - else if (length >= LARGE_ARRAY_SIZE) { - var set = iteratee ? null : _createSet(array); - if (set) { - return (0,_setToArray/* default */.A)(set); - } - isCommon = false; - includes = _cacheHas/* default */.A; - seen = new _SetCache/* default */.A; - } - else { - seen = iteratee ? [] : result; - } - outer: - while (++index < length) { - var value = array[index], - computed = iteratee ? iteratee(value) : value; - - value = (comparator || value !== 0) ? value : 0; - if (isCommon && computed === computed) { - var seenIndex = seen.length; - while (seenIndex--) { - if (seen[seenIndex] === computed) { - continue outer; - } - } - if (iteratee) { - seen.push(computed); - } - result.push(value); - } - else if (!includes(seen, computed, comparator)) { - if (seen !== result) { - seen.push(computed); - } - result.push(value); - } - } - return result; -} - -/* harmony default export */ const _baseUniq = (baseUniq); - -// EXTERNAL MODULE: ./node_modules/lodash-es/isArrayLikeObject.js -var isArrayLikeObject = __webpack_require__(53533); -;// CONCATENATED MODULE: ./node_modules/lodash-es/union.js - - - - - -/** - * Creates an array of unique values, in order, from all given arrays using - * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @returns {Array} Returns the new array of combined values. - * @example - * - * _.union([2], [1, 2]); - * // => [2, 1] - */ -var union = (0,_baseRest/* default */.A)(function(arrays) { - return _baseUniq((0,_baseFlatten/* default */.A)(arrays, 1, isArrayLikeObject/* default */.A, true)); -}); - -/* harmony default export */ const lodash_es_union = (union); - -// EXTERNAL MODULE: ./node_modules/lodash-es/values.js + 1 modules -var values = __webpack_require__(38207); -// EXTERNAL MODULE: ./node_modules/lodash-es/reduce.js + 2 modules -var reduce = __webpack_require__(89463); -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/graph.js - - -var DEFAULT_EDGE_NAME = '\x00'; -var GRAPH_NODE = '\x00'; -var EDGE_KEY_DELIM = '\x01'; - -// Implementation notes: -// -// * Node id query functions should return string ids for the nodes -// * Edge id query functions should return an "edgeObj", edge object, that is -// composed of enough information to uniquely identify an edge: {v, w, name}. -// * Internally we use an "edgeId", a stringified form of the edgeObj, to -// reference edges. This is because we need a performant way to look these -// edges up and, object properties, which have string keys, are the closest -// we're going to get to a performant hashtable in JavaScript. - -// Implementation notes: -// -// * Node id query functions should return string ids for the nodes -// * Edge id query functions should return an "edgeObj", edge object, that is -// composed of enough information to uniquely identify an edge: {v, w, name}. -// * Internally we use an "edgeId", a stringified form of the edgeObj, to -// reference edges. This is because we need a performant way to look these -// edges up and, object properties, which have string keys, are the closest -// we're going to get to a performant hashtable in JavaScript. -class Graph { - constructor(opts = {}) { - this._isDirected = has/* default */.A(opts, 'directed') ? opts.directed : true; - this._isMultigraph = has/* default */.A(opts, 'multigraph') ? opts.multigraph : false; - this._isCompound = has/* default */.A(opts, 'compound') ? opts.compound : false; - - // Label for the graph itself - this._label = undefined; - - // Defaults to be set when creating a new node - this._defaultNodeLabelFn = constant/* default */.A(undefined); - - // Defaults to be set when creating a new edge - this._defaultEdgeLabelFn = constant/* default */.A(undefined); - - // v -> label - this._nodes = {}; - - if (this._isCompound) { - // v -> parent - this._parent = {}; - - // v -> children - this._children = {}; - this._children[GRAPH_NODE] = {}; - } - - // v -> edgeObj - this._in = {}; - - // u -> v -> Number - this._preds = {}; - - // v -> edgeObj - this._out = {}; - - // v -> w -> Number - this._sucs = {}; - - // e -> edgeObj - this._edgeObjs = {}; - - // e -> label - this._edgeLabels = {}; - } - /* === Graph functions ========= */ - isDirected() { - return this._isDirected; - } - isMultigraph() { - return this._isMultigraph; - } - isCompound() { - return this._isCompound; - } - setGraph(label) { - this._label = label; - return this; - } - graph() { - return this._label; - } - /* === Node functions ========== */ - setDefaultNodeLabel(newDefault) { - if (!isFunction/* default */.A(newDefault)) { - newDefault = constant/* default */.A(newDefault); - } - this._defaultNodeLabelFn = newDefault; - return this; - } - nodeCount() { - return this._nodeCount; - } - nodes() { - return keys/* default */.A(this._nodes); - } - sources() { - var self = this; - return filter/* default */.A(this.nodes(), function (v) { - return isEmpty/* default */.A(self._in[v]); - }); - } - sinks() { - var self = this; - return filter/* default */.A(this.nodes(), function (v) { - return isEmpty/* default */.A(self._out[v]); - }); - } - setNodes(vs, value) { - var args = arguments; - var self = this; - forEach/* default */.A(vs, function (v) { - if (args.length > 1) { - self.setNode(v, value); - } else { - self.setNode(v); - } - }); - return this; - } - setNode(v, value) { - if (has/* default */.A(this._nodes, v)) { - if (arguments.length > 1) { - this._nodes[v] = value; - } - return this; - } - - // @ts-expect-error - this._nodes[v] = arguments.length > 1 ? value : this._defaultNodeLabelFn(v); - if (this._isCompound) { - this._parent[v] = GRAPH_NODE; - this._children[v] = {}; - this._children[GRAPH_NODE][v] = true; - } - this._in[v] = {}; - this._preds[v] = {}; - this._out[v] = {}; - this._sucs[v] = {}; - ++this._nodeCount; - return this; - } - node(v) { - return this._nodes[v]; - } - hasNode(v) { - return has/* default */.A(this._nodes, v); - } - removeNode(v) { - var self = this; - if (has/* default */.A(this._nodes, v)) { - var removeEdge = function (e) { - self.removeEdge(self._edgeObjs[e]); - }; - delete this._nodes[v]; - if (this._isCompound) { - this._removeFromParentsChildList(v); - delete this._parent[v]; - forEach/* default */.A(this.children(v), function (child) { - self.setParent(child); - }); - delete this._children[v]; - } - forEach/* default */.A(keys/* default */.A(this._in[v]), removeEdge); - delete this._in[v]; - delete this._preds[v]; - forEach/* default */.A(keys/* default */.A(this._out[v]), removeEdge); - delete this._out[v]; - delete this._sucs[v]; - --this._nodeCount; - } - return this; - } - setParent(v, parent) { - if (!this._isCompound) { - throw new Error('Cannot set parent in a non-compound graph'); - } - - if (isUndefined/* default */.A(parent)) { - parent = GRAPH_NODE; - } else { - // Coerce parent to string - parent += ''; - for (var ancestor = parent; !isUndefined/* default */.A(ancestor); ancestor = this.parent(ancestor)) { - if (ancestor === v) { - throw new Error('Setting ' + parent + ' as parent of ' + v + ' would create a cycle'); - } - } - - this.setNode(parent); - } - - this.setNode(v); - this._removeFromParentsChildList(v); - this._parent[v] = parent; - this._children[parent][v] = true; - return this; - } - _removeFromParentsChildList(v) { - delete this._children[this._parent[v]][v]; - } - parent(v) { - if (this._isCompound) { - var parent = this._parent[v]; - if (parent !== GRAPH_NODE) { - return parent; - } - } - } - children(v) { - if (isUndefined/* default */.A(v)) { - v = GRAPH_NODE; - } - - if (this._isCompound) { - var children = this._children[v]; - if (children) { - return keys/* default */.A(children); - } - } else if (v === GRAPH_NODE) { - return this.nodes(); - } else if (this.hasNode(v)) { - return []; - } - } - predecessors(v) { - var predsV = this._preds[v]; - if (predsV) { - return keys/* default */.A(predsV); - } - } - successors(v) { - var sucsV = this._sucs[v]; - if (sucsV) { - return keys/* default */.A(sucsV); - } - } - neighbors(v) { - var preds = this.predecessors(v); - if (preds) { - return lodash_es_union(preds, this.successors(v)); - } - } - isLeaf(v) { - var neighbors; - if (this.isDirected()) { - neighbors = this.successors(v); - } else { - neighbors = this.neighbors(v); - } - return neighbors.length === 0; - } - filterNodes(filter) { - // @ts-expect-error - var copy = new this.constructor({ - directed: this._isDirected, - multigraph: this._isMultigraph, - compound: this._isCompound, - }); - - copy.setGraph(this.graph()); - - var self = this; - forEach/* default */.A(this._nodes, function (value, v) { - if (filter(v)) { - copy.setNode(v, value); - } - }); - - forEach/* default */.A(this._edgeObjs, function (e) { - // @ts-expect-error - if (copy.hasNode(e.v) && copy.hasNode(e.w)) { - copy.setEdge(e, self.edge(e)); - } - }); - - var parents = {}; - function findParent(v) { - var parent = self.parent(v); - if (parent === undefined || copy.hasNode(parent)) { - parents[v] = parent; - return parent; - } else if (parent in parents) { - return parents[parent]; - } else { - return findParent(parent); - } - } - - if (this._isCompound) { - forEach/* default */.A(copy.nodes(), function (v) { - copy.setParent(v, findParent(v)); - }); - } - - return copy; - } - /* === Edge functions ========== */ - setDefaultEdgeLabel(newDefault) { - if (!isFunction/* default */.A(newDefault)) { - newDefault = constant/* default */.A(newDefault); - } - this._defaultEdgeLabelFn = newDefault; - return this; - } - edgeCount() { - return this._edgeCount; - } - edges() { - return values/* default */.A(this._edgeObjs); - } - setPath(vs, value) { - var self = this; - var args = arguments; - reduce/* default */.A(vs, function (v, w) { - if (args.length > 1) { - self.setEdge(v, w, value); - } else { - self.setEdge(v, w); - } - return w; - }); - return this; - } - /* - * setEdge(v, w, [value, [name]]) - * setEdge({ v, w, [name] }, [value]) - */ - setEdge() { - var v, w, name, value; - var valueSpecified = false; - var arg0 = arguments[0]; - - if (typeof arg0 === 'object' && arg0 !== null && 'v' in arg0) { - v = arg0.v; - w = arg0.w; - name = arg0.name; - if (arguments.length === 2) { - value = arguments[1]; - valueSpecified = true; - } - } else { - v = arg0; - w = arguments[1]; - name = arguments[3]; - if (arguments.length > 2) { - value = arguments[2]; - valueSpecified = true; - } - } - - v = '' + v; - w = '' + w; - if (!isUndefined/* default */.A(name)) { - name = '' + name; - } - - var e = edgeArgsToId(this._isDirected, v, w, name); - if (has/* default */.A(this._edgeLabels, e)) { - if (valueSpecified) { - this._edgeLabels[e] = value; - } - return this; - } - - if (!isUndefined/* default */.A(name) && !this._isMultigraph) { - throw new Error('Cannot set a named edge when isMultigraph = false'); - } - - // It didn't exist, so we need to create it. - // First ensure the nodes exist. - this.setNode(v); - this.setNode(w); - - // @ts-expect-error - this._edgeLabels[e] = valueSpecified ? value : this._defaultEdgeLabelFn(v, w, name); - - var edgeObj = edgeArgsToObj(this._isDirected, v, w, name); - // Ensure we add undirected edges in a consistent way. - v = edgeObj.v; - w = edgeObj.w; - - Object.freeze(edgeObj); - this._edgeObjs[e] = edgeObj; - incrementOrInitEntry(this._preds[w], v); - incrementOrInitEntry(this._sucs[v], w); - this._in[w][e] = edgeObj; - this._out[v][e] = edgeObj; - this._edgeCount++; - return this; - } - edge(v, w, name) { - var e = - arguments.length === 1 - ? edgeObjToId(this._isDirected, arguments[0]) - : edgeArgsToId(this._isDirected, v, w, name); - return this._edgeLabels[e]; - } - hasEdge(v, w, name) { - var e = - arguments.length === 1 - ? edgeObjToId(this._isDirected, arguments[0]) - : edgeArgsToId(this._isDirected, v, w, name); - return has/* default */.A(this._edgeLabels, e); - } - removeEdge(v, w, name) { - var e = - arguments.length === 1 - ? edgeObjToId(this._isDirected, arguments[0]) - : edgeArgsToId(this._isDirected, v, w, name); - var edge = this._edgeObjs[e]; - if (edge) { - v = edge.v; - w = edge.w; - delete this._edgeLabels[e]; - delete this._edgeObjs[e]; - decrementOrRemoveEntry(this._preds[w], v); - decrementOrRemoveEntry(this._sucs[v], w); - delete this._in[w][e]; - delete this._out[v][e]; - this._edgeCount--; - } - return this; - } - inEdges(v, u) { - var inV = this._in[v]; - if (inV) { - var edges = values/* default */.A(inV); - if (!u) { - return edges; - } - return filter/* default */.A(edges, function (edge) { - return edge.v === u; - }); - } - } - outEdges(v, w) { - var outV = this._out[v]; - if (outV) { - var edges = values/* default */.A(outV); - if (!w) { - return edges; - } - return filter/* default */.A(edges, function (edge) { - return edge.w === w; - }); - } - } - nodeEdges(v, w) { - var inEdges = this.inEdges(v, w); - if (inEdges) { - return inEdges.concat(this.outEdges(v, w)); - } - } -} - -/* Number of nodes in the graph. Should only be changed by the implementation. */ -Graph.prototype._nodeCount = 0; - -/* Number of edges in the graph. Should only be changed by the implementation. */ -Graph.prototype._edgeCount = 0; - -function incrementOrInitEntry(map, k) { - if (map[k]) { - map[k]++; - } else { - map[k] = 1; - } -} - -function decrementOrRemoveEntry(map, k) { - if (!--map[k]) { - delete map[k]; - } -} - -function edgeArgsToId(isDirected, v_, w_, name) { - var v = '' + v_; - var w = '' + w_; - if (!isDirected && v > w) { - var tmp = v; - v = w; - w = tmp; - } - return v + EDGE_KEY_DELIM + w + EDGE_KEY_DELIM + (isUndefined/* default */.A(name) ? DEFAULT_EDGE_NAME : name); -} - -function edgeArgsToObj(isDirected, v_, w_, name) { - var v = '' + v_; - var w = '' + w_; - if (!isDirected && v > w) { - var tmp = v; - v = w; - w = tmp; - } - var edgeObj = { v: v, w: w }; - if (name) { - edgeObj.name = name; - } - return edgeObj; -} - -function edgeObjToId(isDirected, edgeObj) { - return edgeArgsToId(isDirected, edgeObj.v, edgeObj.w, edgeObj.name); -} - - -/***/ }), - -/***/ 697: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ T: () => (/* reexport safe */ _graph_js__WEBPACK_IMPORTED_MODULE_0__.T) -/* harmony export */ }); -/* unused harmony export version */ -/* harmony import */ var _graph_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(73046); -// Includes only the "core" of graphlib - - - -const version = '2.1.9-pre'; - - - - -/***/ }), - -/***/ 62062: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ _SetCache) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_MapCache.js + 14 modules -var _MapCache = __webpack_require__(29471); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_setCacheAdd.js -/** Used to stand-in for `undefined` hash values. */ -var HASH_UNDEFINED = '__lodash_hash_undefined__'; - -/** - * Adds `value` to the array cache. - * - * @private - * @name add - * @memberOf SetCache - * @alias push - * @param {*} value The value to cache. - * @returns {Object} Returns the cache instance. - */ -function setCacheAdd(value) { - this.__data__.set(value, HASH_UNDEFINED); - return this; -} - -/* harmony default export */ const _setCacheAdd = (setCacheAdd); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_setCacheHas.js -/** - * Checks if `value` is in the array cache. - * - * @private - * @name has - * @memberOf SetCache - * @param {*} value The value to search for. - * @returns {number} Returns `true` if `value` is found, else `false`. - */ -function setCacheHas(value) { - return this.__data__.has(value); -} - -/* harmony default export */ const _setCacheHas = (setCacheHas); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_SetCache.js - - - - -/** - * - * Creates an array cache object to store unique values. - * - * @private - * @constructor - * @param {Array} [values] The values to cache. - */ -function SetCache(values) { - var index = -1, - length = values == null ? 0 : values.length; - - this.__data__ = new _MapCache/* default */.A; - while (++index < length) { - this.add(values[index]); - } -} - -// Add methods to `SetCache`. -SetCache.prototype.add = SetCache.prototype.push = _setCacheAdd; -SetCache.prototype.has = _setCacheHas; - -/* harmony default export */ const _SetCache = (SetCache); - - -/***/ }), - -/***/ 72641: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * A specialized version of `_.forEach` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns `array`. - */ -function arrayEach(array, iteratee) { - var index = -1, - length = array == null ? 0 : array.length; - - while (++index < length) { - if (iteratee(array[index], index, array) === false) { - break; - } - } - return array; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (arrayEach); - - -/***/ }), - -/***/ 2634: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * A specialized version of `_.filter` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {Array} Returns the new filtered array. - */ -function arrayFilter(array, predicate) { - var index = -1, - length = array == null ? 0 : array.length, - resIndex = 0, - result = []; - - while (++index < length) { - var value = array[index]; - if (predicate(value, index, array)) { - result[resIndex++] = value; - } - } - return result; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (arrayFilter); - - -/***/ }), - -/***/ 45572: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * A specialized version of `_.map` for arrays without support for iteratee - * shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the new mapped array. - */ -function arrayMap(array, iteratee) { - var index = -1, - length = array == null ? 0 : array.length, - result = Array(length); - - while (++index < length) { - result[index] = iteratee(array[index], index, array); - } - return result; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (arrayMap); - - -/***/ }), - -/***/ 76912: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * Appends the elements of `values` to `array`. - * - * @private - * @param {Array} array The array to modify. - * @param {Array} values The values to append. - * @returns {Array} Returns `array`. - */ -function arrayPush(array, values) { - var index = -1, - length = values.length, - offset = array.length; - - while (++index < length) { - array[offset + index] = values[index]; - } - return array; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (arrayPush); - - -/***/ }), - -/***/ 91641: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ _baseClone) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_Stack.js + 5 modules -var _Stack = __webpack_require__(11754); -// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayEach.js -var _arrayEach = __webpack_require__(72641); -// EXTERNAL MODULE: ./node_modules/lodash-es/_assignValue.js -var _assignValue = __webpack_require__(52851); -// EXTERNAL MODULE: ./node_modules/lodash-es/_copyObject.js -var _copyObject = __webpack_require__(22031); -// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js -var keys = __webpack_require__(27422); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseAssign.js - - - -/** - * The base implementation of `_.assign` without support for multiple sources - * or `customizer` functions. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @returns {Object} Returns `object`. - */ -function baseAssign(object, source) { - return object && (0,_copyObject/* default */.A)(source, (0,keys/* default */.A)(source), object); -} - -/* harmony default export */ const _baseAssign = (baseAssign); - -// EXTERNAL MODULE: ./node_modules/lodash-es/keysIn.js + 2 modules -var keysIn = __webpack_require__(55615); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseAssignIn.js - - - -/** - * The base implementation of `_.assignIn` without support for multiple sources - * or `customizer` functions. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @returns {Object} Returns `object`. - */ -function baseAssignIn(object, source) { - return object && (0,_copyObject/* default */.A)(source, (0,keysIn/* default */.A)(source), object); -} - -/* harmony default export */ const _baseAssignIn = (baseAssignIn); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_cloneBuffer.js -var _cloneBuffer = __webpack_require__(80154); -// EXTERNAL MODULE: ./node_modules/lodash-es/_copyArray.js -var _copyArray = __webpack_require__(39759); -// EXTERNAL MODULE: ./node_modules/lodash-es/_getSymbols.js -var _getSymbols = __webpack_require__(14792); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_copySymbols.js - - - -/** - * Copies own symbols of `source` to `object`. - * - * @private - * @param {Object} source The object to copy symbols from. - * @param {Object} [object={}] The object to copy symbols to. - * @returns {Object} Returns `object`. - */ -function copySymbols(source, object) { - return (0,_copyObject/* default */.A)(source, (0,_getSymbols/* default */.A)(source), object); -} - -/* harmony default export */ const _copySymbols = (copySymbols); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayPush.js -var _arrayPush = __webpack_require__(76912); -// EXTERNAL MODULE: ./node_modules/lodash-es/_getPrototype.js -var _getPrototype = __webpack_require__(15647); -// EXTERNAL MODULE: ./node_modules/lodash-es/stubArray.js -var stubArray = __webpack_require__(13153); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_getSymbolsIn.js - - - - - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeGetSymbols = Object.getOwnPropertySymbols; - -/** - * Creates an array of the own and inherited enumerable symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of symbols. - */ -var getSymbolsIn = !nativeGetSymbols ? stubArray/* default */.A : function(object) { - var result = []; - while (object) { - (0,_arrayPush/* default */.A)(result, (0,_getSymbols/* default */.A)(object)); - object = (0,_getPrototype/* default */.A)(object); - } - return result; -}; - -/* harmony default export */ const _getSymbolsIn = (getSymbolsIn); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_copySymbolsIn.js - - - -/** - * Copies own and inherited symbols of `source` to `object`. - * - * @private - * @param {Object} source The object to copy symbols from. - * @param {Object} [object={}] The object to copy symbols to. - * @returns {Object} Returns `object`. - */ -function copySymbolsIn(source, object) { - return (0,_copyObject/* default */.A)(source, _getSymbolsIn(source), object); -} - -/* harmony default export */ const _copySymbolsIn = (copySymbolsIn); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_getAllKeys.js -var _getAllKeys = __webpack_require__(19042); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGetAllKeys.js -var _baseGetAllKeys = __webpack_require__(33831); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_getAllKeysIn.js - - - - -/** - * Creates an array of own and inherited enumerable property names and - * symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names and symbols. - */ -function getAllKeysIn(object) { - return (0,_baseGetAllKeys/* default */.A)(object, keysIn/* default */.A, _getSymbolsIn); -} - -/* harmony default export */ const _getAllKeysIn = (getAllKeysIn); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_getTag.js + 3 modules -var _getTag = __webpack_require__(9779); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_initCloneArray.js -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var _initCloneArray_hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Initializes an array clone. - * - * @private - * @param {Array} array The array to clone. - * @returns {Array} Returns the initialized clone. - */ -function initCloneArray(array) { - var length = array.length, - result = new array.constructor(length); - - // Add properties assigned by `RegExp#exec`. - if (length && typeof array[0] == 'string' && _initCloneArray_hasOwnProperty.call(array, 'index')) { - result.index = array.index; - result.input = array.input; - } - return result; -} - -/* harmony default export */ const _initCloneArray = (initCloneArray); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_cloneArrayBuffer.js -var _cloneArrayBuffer = __webpack_require__(90565); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_cloneDataView.js - - -/** - * Creates a clone of `dataView`. - * - * @private - * @param {Object} dataView The data view to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the cloned data view. - */ -function cloneDataView(dataView, isDeep) { - var buffer = isDeep ? (0,_cloneArrayBuffer/* default */.A)(dataView.buffer) : dataView.buffer; - return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); -} - -/* harmony default export */ const _cloneDataView = (cloneDataView); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_cloneRegExp.js -/** Used to match `RegExp` flags from their coerced string values. */ -var reFlags = /\w*$/; - -/** - * Creates a clone of `regexp`. - * - * @private - * @param {Object} regexp The regexp to clone. - * @returns {Object} Returns the cloned regexp. - */ -function cloneRegExp(regexp) { - var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); - result.lastIndex = regexp.lastIndex; - return result; -} - -/* harmony default export */ const _cloneRegExp = (cloneRegExp); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_Symbol.js -var _Symbol = __webpack_require__(241); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_cloneSymbol.js - - -/** Used to convert symbols to primitives and strings. */ -var symbolProto = _Symbol/* default */.A ? _Symbol/* default */.A.prototype : undefined, - symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; - -/** - * Creates a clone of the `symbol` object. - * - * @private - * @param {Object} symbol The symbol object to clone. - * @returns {Object} Returns the cloned symbol object. - */ -function cloneSymbol(symbol) { - return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; -} - -/* harmony default export */ const _cloneSymbol = (cloneSymbol); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_cloneTypedArray.js -var _cloneTypedArray = __webpack_require__(1801); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_initCloneByTag.js - - - - - - -/** `Object#toString` result references. */ -var boolTag = '[object Boolean]', - dateTag = '[object Date]', - mapTag = '[object Map]', - numberTag = '[object Number]', - regexpTag = '[object RegExp]', - setTag = '[object Set]', - stringTag = '[object String]', - symbolTag = '[object Symbol]'; - -var arrayBufferTag = '[object ArrayBuffer]', - dataViewTag = '[object DataView]', - float32Tag = '[object Float32Array]', - float64Tag = '[object Float64Array]', - int8Tag = '[object Int8Array]', - int16Tag = '[object Int16Array]', - int32Tag = '[object Int32Array]', - uint8Tag = '[object Uint8Array]', - uint8ClampedTag = '[object Uint8ClampedArray]', - uint16Tag = '[object Uint16Array]', - uint32Tag = '[object Uint32Array]'; - -/** - * Initializes an object clone based on its `toStringTag`. - * - * **Note:** This function only supports cloning values with tags of - * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`. - * - * @private - * @param {Object} object The object to clone. - * @param {string} tag The `toStringTag` of the object to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the initialized clone. - */ -function initCloneByTag(object, tag, isDeep) { - var Ctor = object.constructor; - switch (tag) { - case arrayBufferTag: - return (0,_cloneArrayBuffer/* default */.A)(object); - - case boolTag: - case dateTag: - return new Ctor(+object); - - case dataViewTag: - return _cloneDataView(object, isDeep); - - case float32Tag: case float64Tag: - case int8Tag: case int16Tag: case int32Tag: - case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: - return (0,_cloneTypedArray/* default */.A)(object, isDeep); - - case mapTag: - return new Ctor; - - case numberTag: - case stringTag: - return new Ctor(object); - - case regexpTag: - return _cloneRegExp(object); - - case setTag: - return new Ctor; - - case symbolTag: - return _cloneSymbol(object); - } -} - -/* harmony default export */ const _initCloneByTag = (initCloneByTag); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_initCloneObject.js + 1 modules -var _initCloneObject = __webpack_require__(18598); -// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js -var isArray = __webpack_require__(92049); -// EXTERNAL MODULE: ./node_modules/lodash-es/isBuffer.js + 1 modules -var isBuffer = __webpack_require__(99912); -// EXTERNAL MODULE: ./node_modules/lodash-es/isObjectLike.js -var isObjectLike = __webpack_require__(53098); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsMap.js - - - -/** `Object#toString` result references. */ -var _baseIsMap_mapTag = '[object Map]'; - -/** - * The base implementation of `_.isMap` without Node.js optimizations. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a map, else `false`. - */ -function baseIsMap(value) { - return (0,isObjectLike/* default */.A)(value) && (0,_getTag/* default */.A)(value) == _baseIsMap_mapTag; -} - -/* harmony default export */ const _baseIsMap = (baseIsMap); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseUnary.js -var _baseUnary = __webpack_require__(52789); -// EXTERNAL MODULE: ./node_modules/lodash-es/_nodeUtil.js -var _nodeUtil = __webpack_require__(64841); -;// CONCATENATED MODULE: ./node_modules/lodash-es/isMap.js - - - - -/* Node.js helper references. */ -var nodeIsMap = _nodeUtil/* default */.A && _nodeUtil/* default */.A.isMap; - -/** - * Checks if `value` is classified as a `Map` object. - * - * @static - * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a map, else `false`. - * @example - * - * _.isMap(new Map); - * // => true - * - * _.isMap(new WeakMap); - * // => false - */ -var isMap = nodeIsMap ? (0,_baseUnary/* default */.A)(nodeIsMap) : _baseIsMap; - -/* harmony default export */ const lodash_es_isMap = (isMap); - -// EXTERNAL MODULE: ./node_modules/lodash-es/isObject.js -var isObject = __webpack_require__(23149); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsSet.js - - - -/** `Object#toString` result references. */ -var _baseIsSet_setTag = '[object Set]'; - -/** - * The base implementation of `_.isSet` without Node.js optimizations. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a set, else `false`. - */ -function baseIsSet(value) { - return (0,isObjectLike/* default */.A)(value) && (0,_getTag/* default */.A)(value) == _baseIsSet_setTag; -} - -/* harmony default export */ const _baseIsSet = (baseIsSet); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/isSet.js - - - - -/* Node.js helper references. */ -var nodeIsSet = _nodeUtil/* default */.A && _nodeUtil/* default */.A.isSet; - -/** - * Checks if `value` is classified as a `Set` object. - * - * @static - * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a set, else `false`. - * @example - * - * _.isSet(new Set); - * // => true - * - * _.isSet(new WeakSet); - * // => false - */ -var isSet = nodeIsSet ? (0,_baseUnary/* default */.A)(nodeIsSet) : _baseIsSet; - -/* harmony default export */ const lodash_es_isSet = (isSet); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseClone.js - - - - - - - - - - - - - - - - - - - - - - - -/** Used to compose bitmasks for cloning. */ -var CLONE_DEEP_FLAG = 1, - CLONE_FLAT_FLAG = 2, - CLONE_SYMBOLS_FLAG = 4; - -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - _baseClone_boolTag = '[object Boolean]', - _baseClone_dateTag = '[object Date]', - errorTag = '[object Error]', - funcTag = '[object Function]', - genTag = '[object GeneratorFunction]', - _baseClone_mapTag = '[object Map]', - _baseClone_numberTag = '[object Number]', - objectTag = '[object Object]', - _baseClone_regexpTag = '[object RegExp]', - _baseClone_setTag = '[object Set]', - _baseClone_stringTag = '[object String]', - _baseClone_symbolTag = '[object Symbol]', - weakMapTag = '[object WeakMap]'; - -var _baseClone_arrayBufferTag = '[object ArrayBuffer]', - _baseClone_dataViewTag = '[object DataView]', - _baseClone_float32Tag = '[object Float32Array]', - _baseClone_float64Tag = '[object Float64Array]', - _baseClone_int8Tag = '[object Int8Array]', - _baseClone_int16Tag = '[object Int16Array]', - _baseClone_int32Tag = '[object Int32Array]', - _baseClone_uint8Tag = '[object Uint8Array]', - _baseClone_uint8ClampedTag = '[object Uint8ClampedArray]', - _baseClone_uint16Tag = '[object Uint16Array]', - _baseClone_uint32Tag = '[object Uint32Array]'; - -/** Used to identify `toStringTag` values supported by `_.clone`. */ -var cloneableTags = {}; -cloneableTags[argsTag] = cloneableTags[arrayTag] = -cloneableTags[_baseClone_arrayBufferTag] = cloneableTags[_baseClone_dataViewTag] = -cloneableTags[_baseClone_boolTag] = cloneableTags[_baseClone_dateTag] = -cloneableTags[_baseClone_float32Tag] = cloneableTags[_baseClone_float64Tag] = -cloneableTags[_baseClone_int8Tag] = cloneableTags[_baseClone_int16Tag] = -cloneableTags[_baseClone_int32Tag] = cloneableTags[_baseClone_mapTag] = -cloneableTags[_baseClone_numberTag] = cloneableTags[objectTag] = -cloneableTags[_baseClone_regexpTag] = cloneableTags[_baseClone_setTag] = -cloneableTags[_baseClone_stringTag] = cloneableTags[_baseClone_symbolTag] = -cloneableTags[_baseClone_uint8Tag] = cloneableTags[_baseClone_uint8ClampedTag] = -cloneableTags[_baseClone_uint16Tag] = cloneableTags[_baseClone_uint32Tag] = true; -cloneableTags[errorTag] = cloneableTags[funcTag] = -cloneableTags[weakMapTag] = false; - -/** - * The base implementation of `_.clone` and `_.cloneDeep` which tracks - * traversed objects. - * - * @private - * @param {*} value The value to clone. - * @param {boolean} bitmask The bitmask flags. - * 1 - Deep clone - * 2 - Flatten inherited properties - * 4 - Clone symbols - * @param {Function} [customizer] The function to customize cloning. - * @param {string} [key] The key of `value`. - * @param {Object} [object] The parent object of `value`. - * @param {Object} [stack] Tracks traversed objects and their clone counterparts. - * @returns {*} Returns the cloned value. - */ -function baseClone(value, bitmask, customizer, key, object, stack) { - var result, - isDeep = bitmask & CLONE_DEEP_FLAG, - isFlat = bitmask & CLONE_FLAT_FLAG, - isFull = bitmask & CLONE_SYMBOLS_FLAG; - - if (customizer) { - result = object ? customizer(value, key, object, stack) : customizer(value); - } - if (result !== undefined) { - return result; - } - if (!(0,isObject/* default */.A)(value)) { - return value; - } - var isArr = (0,isArray/* default */.A)(value); - if (isArr) { - result = _initCloneArray(value); - if (!isDeep) { - return (0,_copyArray/* default */.A)(value, result); - } - } else { - var tag = (0,_getTag/* default */.A)(value), - isFunc = tag == funcTag || tag == genTag; - - if ((0,isBuffer/* default */.A)(value)) { - return (0,_cloneBuffer/* default */.A)(value, isDeep); - } - if (tag == objectTag || tag == argsTag || (isFunc && !object)) { - result = (isFlat || isFunc) ? {} : (0,_initCloneObject/* default */.A)(value); - if (!isDeep) { - return isFlat - ? _copySymbolsIn(value, _baseAssignIn(result, value)) - : _copySymbols(value, _baseAssign(result, value)); - } - } else { - if (!cloneableTags[tag]) { - return object ? value : {}; - } - result = _initCloneByTag(value, tag, isDeep); - } - } - // Check for circular references and return its corresponding clone. - stack || (stack = new _Stack/* default */.A); - var stacked = stack.get(value); - if (stacked) { - return stacked; - } - stack.set(value, result); - - if (lodash_es_isSet(value)) { - value.forEach(function(subValue) { - result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack)); - }); - } else if (lodash_es_isMap(value)) { - value.forEach(function(subValue, key) { - result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack)); - }); - } - - var keysFunc = isFull - ? (isFlat ? _getAllKeysIn : _getAllKeys/* default */.A) - : (isFlat ? keysIn/* default */.A : keys/* default */.A); - - var props = isArr ? undefined : keysFunc(value); - (0,_arrayEach/* default */.A)(props || value, function(subValue, key) { - if (props) { - key = subValue; - subValue = value[key]; - } - // Recursively populate clone (susceptible to call stack limits). - (0,_assignValue/* default */.A)(result, key, baseClone(subValue, bitmask, customizer, key, value, stack)); - }); - return result; -} - -/* harmony default export */ const _baseClone = (baseClone); - - -/***/ }), - -/***/ 6240: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ _baseEach) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseForOwn.js -var _baseForOwn = __webpack_require__(79841); -// EXTERNAL MODULE: ./node_modules/lodash-es/isArrayLike.js -var isArrayLike = __webpack_require__(38446); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_createBaseEach.js - - -/** - * Creates a `baseEach` or `baseEachRight` function. - * - * @private - * @param {Function} eachFunc The function to iterate over a collection. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new base function. - */ -function createBaseEach(eachFunc, fromRight) { - return function(collection, iteratee) { - if (collection == null) { - return collection; - } - if (!(0,isArrayLike/* default */.A)(collection)) { - return eachFunc(collection, iteratee); - } - var length = collection.length, - index = fromRight ? length : -1, - iterable = Object(collection); - - while ((fromRight ? index-- : ++index < length)) { - if (iteratee(iterable[index], index, iterable) === false) { - break; - } - } - return collection; - }; -} - -/* harmony default export */ const _createBaseEach = (createBaseEach); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseEach.js - - - -/** - * The base implementation of `_.forEach` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array|Object} Returns `collection`. - */ -var baseEach = _createBaseEach(_baseForOwn/* default */.A); - -/* harmony default export */ const _baseEach = (baseEach); - - -/***/ }), - -/***/ 25707: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * The base implementation of `_.findIndex` and `_.findLastIndex` without - * support for iteratee shorthands. - * - * @private - * @param {Array} array The array to inspect. - * @param {Function} predicate The function invoked per iteration. - * @param {number} fromIndex The index to search from. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function baseFindIndex(array, predicate, fromIndex, fromRight) { - var length = array.length, - index = fromIndex + (fromRight ? 1 : -1); - - while ((fromRight ? index-- : ++index < length)) { - if (predicate(array[index], index, array)) { - return index; - } - } - return -1; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseFindIndex); - - -/***/ }), - -/***/ 13588: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ _baseFlatten) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayPush.js -var _arrayPush = __webpack_require__(76912); -// EXTERNAL MODULE: ./node_modules/lodash-es/_Symbol.js -var _Symbol = __webpack_require__(241); -// EXTERNAL MODULE: ./node_modules/lodash-es/isArguments.js + 1 modules -var isArguments = __webpack_require__(52274); -// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js -var isArray = __webpack_require__(92049); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_isFlattenable.js - - - - -/** Built-in value references. */ -var spreadableSymbol = _Symbol/* default */.A ? _Symbol/* default */.A.isConcatSpreadable : undefined; - -/** - * Checks if `value` is a flattenable `arguments` object or array. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. - */ -function isFlattenable(value) { - return (0,isArray/* default */.A)(value) || (0,isArguments/* default */.A)(value) || - !!(spreadableSymbol && value && value[spreadableSymbol]); -} - -/* harmony default export */ const _isFlattenable = (isFlattenable); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseFlatten.js - - - -/** - * The base implementation of `_.flatten` with support for restricting flattening. - * - * @private - * @param {Array} array The array to flatten. - * @param {number} depth The maximum recursion depth. - * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. - * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. - * @param {Array} [result=[]] The initial result value. - * @returns {Array} Returns the new flattened array. - */ -function baseFlatten(array, depth, predicate, isStrict, result) { - var index = -1, - length = array.length; - - predicate || (predicate = _isFlattenable); - result || (result = []); - - while (++index < length) { - var value = array[index]; - if (depth > 0 && predicate(value)) { - if (depth > 1) { - // Recursively flatten arrays (susceptible to call stack limits). - baseFlatten(value, depth - 1, predicate, isStrict, result); - } else { - (0,_arrayPush/* default */.A)(result, value); - } - } else if (!isStrict) { - result[result.length] = value; - } - } - return result; -} - -/* harmony default export */ const _baseFlatten = (baseFlatten); - - -/***/ }), - -/***/ 79841: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _baseFor_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4574); -/* harmony import */ var _keys_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(27422); - - - -/** - * The base implementation of `_.forOwn` without support for iteratee shorthands. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Object} Returns `object`. - */ -function baseForOwn(object, iteratee) { - return object && (0,_baseFor_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(object, iteratee, _keys_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseForOwn); - - -/***/ }), - -/***/ 66318: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _castPath_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7819); -/* harmony import */ var _toKey_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(30901); - - - -/** - * The base implementation of `_.get` without support for default values. - * - * @private - * @param {Object} object The object to query. - * @param {Array|string} path The path of the property to get. - * @returns {*} Returns the resolved value. - */ -function baseGet(object, path) { - path = (0,_castPath_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(path, object); - - var index = 0, - length = path.length; - - while (object != null && index < length) { - object = object[(0,_toKey_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(path[index++])]; - } - return (index && index == length) ? object : undefined; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseGet); - - -/***/ }), - -/***/ 33831: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _arrayPush_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(76912); -/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(92049); - - - -/** - * The base implementation of `getAllKeys` and `getAllKeysIn` which uses - * `keysFunc` and `symbolsFunc` to get the enumerable property names and - * symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @param {Function} keysFunc The function to get the keys of `object`. - * @param {Function} symbolsFunc The function to get the symbols of `object`. - * @returns {Array} Returns the array of property names and symbols. - */ -function baseGetAllKeys(object, keysFunc, symbolsFunc) { - var result = keysFunc(object); - return (0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(object) ? result : (0,_arrayPush_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(result, symbolsFunc(object)); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseGetAllKeys); - - -/***/ }), - -/***/ 49574: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ _baseIteratee) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_Stack.js + 5 modules -var _Stack = __webpack_require__(11754); -// EXTERNAL MODULE: ./node_modules/lodash-es/_SetCache.js + 2 modules -var _SetCache = __webpack_require__(62062); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_arraySome.js -/** - * A specialized version of `_.some` for arrays without support for iteratee - * shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {boolean} Returns `true` if any element passes the predicate check, - * else `false`. - */ -function arraySome(array, predicate) { - var index = -1, - length = array == null ? 0 : array.length; - - while (++index < length) { - if (predicate(array[index], index, array)) { - return true; - } - } - return false; -} - -/* harmony default export */ const _arraySome = (arraySome); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_cacheHas.js -var _cacheHas = __webpack_require__(64099); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_equalArrays.js - - - - -/** Used to compose bitmasks for value comparisons. */ -var COMPARE_PARTIAL_FLAG = 1, - COMPARE_UNORDERED_FLAG = 2; - -/** - * A specialized version of `baseIsEqualDeep` for arrays with support for - * partial deep comparisons. - * - * @private - * @param {Array} array The array to compare. - * @param {Array} other The other array to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} stack Tracks traversed `array` and `other` objects. - * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. - */ -function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { - var isPartial = bitmask & COMPARE_PARTIAL_FLAG, - arrLength = array.length, - othLength = other.length; - - if (arrLength != othLength && !(isPartial && othLength > arrLength)) { - return false; - } - // Check that cyclic values are equal. - var arrStacked = stack.get(array); - var othStacked = stack.get(other); - if (arrStacked && othStacked) { - return arrStacked == other && othStacked == array; - } - var index = -1, - result = true, - seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new _SetCache/* default */.A : undefined; - - stack.set(array, other); - stack.set(other, array); - - // Ignore non-index properties. - while (++index < arrLength) { - var arrValue = array[index], - othValue = other[index]; - - if (customizer) { - var compared = isPartial - ? customizer(othValue, arrValue, index, other, array, stack) - : customizer(arrValue, othValue, index, array, other, stack); - } - if (compared !== undefined) { - if (compared) { - continue; - } - result = false; - break; - } - // Recursively compare arrays (susceptible to call stack limits). - if (seen) { - if (!_arraySome(other, function(othValue, othIndex) { - if (!(0,_cacheHas/* default */.A)(seen, othIndex) && - (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { - return seen.push(othIndex); - } - })) { - result = false; - break; - } - } else if (!( - arrValue === othValue || - equalFunc(arrValue, othValue, bitmask, customizer, stack) - )) { - result = false; - break; - } - } - stack['delete'](array); - stack['delete'](other); - return result; -} - -/* harmony default export */ const _equalArrays = (equalArrays); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_Symbol.js -var _Symbol = __webpack_require__(241); -// EXTERNAL MODULE: ./node_modules/lodash-es/_Uint8Array.js -var _Uint8Array = __webpack_require__(43988); -// EXTERNAL MODULE: ./node_modules/lodash-es/eq.js -var eq = __webpack_require__(66984); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_mapToArray.js -/** - * Converts `map` to its key-value pairs. - * - * @private - * @param {Object} map The map to convert. - * @returns {Array} Returns the key-value pairs. - */ -function mapToArray(map) { - var index = -1, - result = Array(map.size); - - map.forEach(function(value, key) { - result[++index] = [key, value]; - }); - return result; -} - -/* harmony default export */ const _mapToArray = (mapToArray); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_setToArray.js -var _setToArray = __webpack_require__(29959); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_equalByTag.js - - - - - - - -/** Used to compose bitmasks for value comparisons. */ -var _equalByTag_COMPARE_PARTIAL_FLAG = 1, - _equalByTag_COMPARE_UNORDERED_FLAG = 2; - -/** `Object#toString` result references. */ -var boolTag = '[object Boolean]', - dateTag = '[object Date]', - errorTag = '[object Error]', - mapTag = '[object Map]', - numberTag = '[object Number]', - regexpTag = '[object RegExp]', - setTag = '[object Set]', - stringTag = '[object String]', - symbolTag = '[object Symbol]'; - -var arrayBufferTag = '[object ArrayBuffer]', - dataViewTag = '[object DataView]'; - -/** Used to convert symbols to primitives and strings. */ -var symbolProto = _Symbol/* default */.A ? _Symbol/* default */.A.prototype : undefined, - symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; - -/** - * A specialized version of `baseIsEqualDeep` for comparing objects of - * the same `toStringTag`. - * - * **Note:** This function only supports comparing values with tags of - * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {string} tag The `toStringTag` of the objects to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} stack Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ -function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { - switch (tag) { - case dataViewTag: - if ((object.byteLength != other.byteLength) || - (object.byteOffset != other.byteOffset)) { - return false; - } - object = object.buffer; - other = other.buffer; - - case arrayBufferTag: - if ((object.byteLength != other.byteLength) || - !equalFunc(new _Uint8Array/* default */.A(object), new _Uint8Array/* default */.A(other))) { - return false; - } - return true; - - case boolTag: - case dateTag: - case numberTag: - // Coerce booleans to `1` or `0` and dates to milliseconds. - // Invalid dates are coerced to `NaN`. - return (0,eq/* default */.A)(+object, +other); - - case errorTag: - return object.name == other.name && object.message == other.message; - - case regexpTag: - case stringTag: - // Coerce regexes to strings and treat strings, primitives and objects, - // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring - // for more details. - return object == (other + ''); - - case mapTag: - var convert = _mapToArray; - - case setTag: - var isPartial = bitmask & _equalByTag_COMPARE_PARTIAL_FLAG; - convert || (convert = _setToArray/* default */.A); - - if (object.size != other.size && !isPartial) { - return false; - } - // Assume cyclic values are equal. - var stacked = stack.get(object); - if (stacked) { - return stacked == other; - } - bitmask |= _equalByTag_COMPARE_UNORDERED_FLAG; - - // Recursively compare objects (susceptible to call stack limits). - stack.set(object, other); - var result = _equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); - stack['delete'](object); - return result; - - case symbolTag: - if (symbolValueOf) { - return symbolValueOf.call(object) == symbolValueOf.call(other); - } - } - return false; -} - -/* harmony default export */ const _equalByTag = (equalByTag); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_getAllKeys.js -var _getAllKeys = __webpack_require__(19042); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_equalObjects.js - - -/** Used to compose bitmasks for value comparisons. */ -var _equalObjects_COMPARE_PARTIAL_FLAG = 1; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var _equalObjects_hasOwnProperty = objectProto.hasOwnProperty; - -/** - * A specialized version of `baseIsEqualDeep` for objects with support for - * partial deep comparisons. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} stack Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ -function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { - var isPartial = bitmask & _equalObjects_COMPARE_PARTIAL_FLAG, - objProps = (0,_getAllKeys/* default */.A)(object), - objLength = objProps.length, - othProps = (0,_getAllKeys/* default */.A)(other), - othLength = othProps.length; - - if (objLength != othLength && !isPartial) { - return false; - } - var index = objLength; - while (index--) { - var key = objProps[index]; - if (!(isPartial ? key in other : _equalObjects_hasOwnProperty.call(other, key))) { - return false; - } - } - // Check that cyclic values are equal. - var objStacked = stack.get(object); - var othStacked = stack.get(other); - if (objStacked && othStacked) { - return objStacked == other && othStacked == object; - } - var result = true; - stack.set(object, other); - stack.set(other, object); - - var skipCtor = isPartial; - while (++index < objLength) { - key = objProps[index]; - var objValue = object[key], - othValue = other[key]; - - if (customizer) { - var compared = isPartial - ? customizer(othValue, objValue, key, other, object, stack) - : customizer(objValue, othValue, key, object, other, stack); - } - // Recursively compare objects (susceptible to call stack limits). - if (!(compared === undefined - ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) - : compared - )) { - result = false; - break; - } - skipCtor || (skipCtor = key == 'constructor'); - } - if (result && !skipCtor) { - var objCtor = object.constructor, - othCtor = other.constructor; - - // Non `Object` object instances with different constructors are not equal. - if (objCtor != othCtor && - ('constructor' in object && 'constructor' in other) && - !(typeof objCtor == 'function' && objCtor instanceof objCtor && - typeof othCtor == 'function' && othCtor instanceof othCtor)) { - result = false; - } - } - stack['delete'](object); - stack['delete'](other); - return result; -} - -/* harmony default export */ const _equalObjects = (equalObjects); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_getTag.js + 3 modules -var _getTag = __webpack_require__(9779); -// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js -var isArray = __webpack_require__(92049); -// EXTERNAL MODULE: ./node_modules/lodash-es/isBuffer.js + 1 modules -var isBuffer = __webpack_require__(99912); -// EXTERNAL MODULE: ./node_modules/lodash-es/isTypedArray.js + 1 modules -var isTypedArray = __webpack_require__(33858); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsEqualDeep.js - - - - - - - - - -/** Used to compose bitmasks for value comparisons. */ -var _baseIsEqualDeep_COMPARE_PARTIAL_FLAG = 1; - -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - objectTag = '[object Object]'; - -/** Used for built-in method references. */ -var _baseIsEqualDeep_objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var _baseIsEqualDeep_hasOwnProperty = _baseIsEqualDeep_objectProto.hasOwnProperty; - -/** - * A specialized version of `baseIsEqual` for arrays and objects which performs - * deep comparisons and tracks traversed objects enabling objects with circular - * references to be compared. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} [stack] Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ -function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { - var objIsArr = (0,isArray/* default */.A)(object), - othIsArr = (0,isArray/* default */.A)(other), - objTag = objIsArr ? arrayTag : (0,_getTag/* default */.A)(object), - othTag = othIsArr ? arrayTag : (0,_getTag/* default */.A)(other); - - objTag = objTag == argsTag ? objectTag : objTag; - othTag = othTag == argsTag ? objectTag : othTag; - - var objIsObj = objTag == objectTag, - othIsObj = othTag == objectTag, - isSameTag = objTag == othTag; - - if (isSameTag && (0,isBuffer/* default */.A)(object)) { - if (!(0,isBuffer/* default */.A)(other)) { - return false; - } - objIsArr = true; - objIsObj = false; - } - if (isSameTag && !objIsObj) { - stack || (stack = new _Stack/* default */.A); - return (objIsArr || (0,isTypedArray/* default */.A)(object)) - ? _equalArrays(object, other, bitmask, customizer, equalFunc, stack) - : _equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); - } - if (!(bitmask & _baseIsEqualDeep_COMPARE_PARTIAL_FLAG)) { - var objIsWrapped = objIsObj && _baseIsEqualDeep_hasOwnProperty.call(object, '__wrapped__'), - othIsWrapped = othIsObj && _baseIsEqualDeep_hasOwnProperty.call(other, '__wrapped__'); - - if (objIsWrapped || othIsWrapped) { - var objUnwrapped = objIsWrapped ? object.value() : object, - othUnwrapped = othIsWrapped ? other.value() : other; - - stack || (stack = new _Stack/* default */.A); - return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); - } - } - if (!isSameTag) { - return false; - } - stack || (stack = new _Stack/* default */.A); - return _equalObjects(object, other, bitmask, customizer, equalFunc, stack); -} - -/* harmony default export */ const _baseIsEqualDeep = (baseIsEqualDeep); - -// EXTERNAL MODULE: ./node_modules/lodash-es/isObjectLike.js -var isObjectLike = __webpack_require__(53098); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsEqual.js - - - -/** - * The base implementation of `_.isEqual` which supports partial comparisons - * and tracks traversed objects. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @param {boolean} bitmask The bitmask flags. - * 1 - Unordered comparison - * 2 - Partial comparison - * @param {Function} [customizer] The function to customize comparisons. - * @param {Object} [stack] Tracks traversed `value` and `other` objects. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - */ -function baseIsEqual(value, other, bitmask, customizer, stack) { - if (value === other) { - return true; - } - if (value == null || other == null || (!(0,isObjectLike/* default */.A)(value) && !(0,isObjectLike/* default */.A)(other))) { - return value !== value && other !== other; - } - return _baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); -} - -/* harmony default export */ const _baseIsEqual = (baseIsEqual); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsMatch.js - - - -/** Used to compose bitmasks for value comparisons. */ -var _baseIsMatch_COMPARE_PARTIAL_FLAG = 1, - _baseIsMatch_COMPARE_UNORDERED_FLAG = 2; - -/** - * The base implementation of `_.isMatch` without support for iteratee shorthands. - * - * @private - * @param {Object} object The object to inspect. - * @param {Object} source The object of property values to match. - * @param {Array} matchData The property names, values, and compare flags to match. - * @param {Function} [customizer] The function to customize comparisons. - * @returns {boolean} Returns `true` if `object` is a match, else `false`. - */ -function baseIsMatch(object, source, matchData, customizer) { - var index = matchData.length, - length = index, - noCustomizer = !customizer; - - if (object == null) { - return !length; - } - object = Object(object); - while (index--) { - var data = matchData[index]; - if ((noCustomizer && data[2]) - ? data[1] !== object[data[0]] - : !(data[0] in object) - ) { - return false; - } - } - while (++index < length) { - data = matchData[index]; - var key = data[0], - objValue = object[key], - srcValue = data[1]; - - if (noCustomizer && data[2]) { - if (objValue === undefined && !(key in object)) { - return false; - } - } else { - var stack = new _Stack/* default */.A; - if (customizer) { - var result = customizer(objValue, srcValue, key, object, source, stack); - } - if (!(result === undefined - ? _baseIsEqual(srcValue, objValue, _baseIsMatch_COMPARE_PARTIAL_FLAG | _baseIsMatch_COMPARE_UNORDERED_FLAG, customizer, stack) - : result - )) { - return false; - } - } - } - return true; -} - -/* harmony default export */ const _baseIsMatch = (baseIsMatch); - -// EXTERNAL MODULE: ./node_modules/lodash-es/isObject.js -var isObject = __webpack_require__(23149); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_isStrictComparable.js - - -/** - * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` if suitable for strict - * equality comparisons, else `false`. - */ -function isStrictComparable(value) { - return value === value && !(0,isObject/* default */.A)(value); -} - -/* harmony default export */ const _isStrictComparable = (isStrictComparable); - -// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js -var keys = __webpack_require__(27422); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_getMatchData.js - - - -/** - * Gets the property names, values, and compare flags of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the match data of `object`. - */ -function getMatchData(object) { - var result = (0,keys/* default */.A)(object), - length = result.length; - - while (length--) { - var key = result[length], - value = object[key]; - - result[length] = [key, value, _isStrictComparable(value)]; - } - return result; -} - -/* harmony default export */ const _getMatchData = (getMatchData); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_matchesStrictComparable.js -/** - * A specialized version of `matchesProperty` for source values suitable - * for strict equality comparisons, i.e. `===`. - * - * @private - * @param {string} key The key of the property to get. - * @param {*} srcValue The value to match. - * @returns {Function} Returns the new spec function. - */ -function matchesStrictComparable(key, srcValue) { - return function(object) { - if (object == null) { - return false; - } - return object[key] === srcValue && - (srcValue !== undefined || (key in Object(object))); - }; -} - -/* harmony default export */ const _matchesStrictComparable = (matchesStrictComparable); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseMatches.js - - - - -/** - * The base implementation of `_.matches` which doesn't clone `source`. - * - * @private - * @param {Object} source The object of property values to match. - * @returns {Function} Returns the new spec function. - */ -function baseMatches(source) { - var matchData = _getMatchData(source); - if (matchData.length == 1 && matchData[0][2]) { - return _matchesStrictComparable(matchData[0][0], matchData[0][1]); - } - return function(object) { - return object === source || _baseIsMatch(object, source, matchData); - }; -} - -/* harmony default export */ const _baseMatches = (baseMatches); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGet.js -var _baseGet = __webpack_require__(66318); -;// CONCATENATED MODULE: ./node_modules/lodash-es/get.js - - -/** - * Gets the value at `path` of `object`. If the resolved value is - * `undefined`, the `defaultValue` is returned in its place. - * - * @static - * @memberOf _ - * @since 3.7.0 - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path of the property to get. - * @param {*} [defaultValue] The value returned for `undefined` resolved values. - * @returns {*} Returns the resolved value. - * @example - * - * var object = { 'a': [{ 'b': { 'c': 3 } }] }; - * - * _.get(object, 'a[0].b.c'); - * // => 3 - * - * _.get(object, ['a', '0', 'b', 'c']); - * // => 3 - * - * _.get(object, 'a.b.c', 'default'); - * // => 'default' - */ -function get(object, path, defaultValue) { - var result = object == null ? undefined : (0,_baseGet/* default */.A)(object, path); - return result === undefined ? defaultValue : result; -} - -/* harmony default export */ const lodash_es_get = (get); - -// EXTERNAL MODULE: ./node_modules/lodash-es/hasIn.js + 1 modules -var hasIn = __webpack_require__(39188); -// EXTERNAL MODULE: ./node_modules/lodash-es/_isKey.js -var _isKey = __webpack_require__(86586); -// EXTERNAL MODULE: ./node_modules/lodash-es/_toKey.js -var _toKey = __webpack_require__(30901); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseMatchesProperty.js - - - - - - - - -/** Used to compose bitmasks for value comparisons. */ -var _baseMatchesProperty_COMPARE_PARTIAL_FLAG = 1, - _baseMatchesProperty_COMPARE_UNORDERED_FLAG = 2; - -/** - * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. - * - * @private - * @param {string} path The path of the property to get. - * @param {*} srcValue The value to match. - * @returns {Function} Returns the new spec function. - */ -function baseMatchesProperty(path, srcValue) { - if ((0,_isKey/* default */.A)(path) && _isStrictComparable(srcValue)) { - return _matchesStrictComparable((0,_toKey/* default */.A)(path), srcValue); - } - return function(object) { - var objValue = lodash_es_get(object, path); - return (objValue === undefined && objValue === srcValue) - ? (0,hasIn/* default */.A)(object, path) - : _baseIsEqual(srcValue, objValue, _baseMatchesProperty_COMPARE_PARTIAL_FLAG | _baseMatchesProperty_COMPARE_UNORDERED_FLAG); - }; -} - -/* harmony default export */ const _baseMatchesProperty = (baseMatchesProperty); - -// EXTERNAL MODULE: ./node_modules/lodash-es/identity.js -var identity = __webpack_require__(29008); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseProperty.js -var _baseProperty = __webpack_require__(70805); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_basePropertyDeep.js - - -/** - * A specialized version of `baseProperty` which supports deep paths. - * - * @private - * @param {Array|string} path The path of the property to get. - * @returns {Function} Returns the new accessor function. - */ -function basePropertyDeep(path) { - return function(object) { - return (0,_baseGet/* default */.A)(object, path); - }; -} - -/* harmony default export */ const _basePropertyDeep = (basePropertyDeep); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/property.js - - - - - -/** - * Creates a function that returns the value at `path` of a given object. - * - * @static - * @memberOf _ - * @since 2.4.0 - * @category Util - * @param {Array|string} path The path of the property to get. - * @returns {Function} Returns the new accessor function. - * @example - * - * var objects = [ - * { 'a': { 'b': 2 } }, - * { 'a': { 'b': 1 } } - * ]; - * - * _.map(objects, _.property('a.b')); - * // => [2, 1] - * - * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b'); - * // => [1, 2] - */ -function property(path) { - return (0,_isKey/* default */.A)(path) ? (0,_baseProperty/* default */.A)((0,_toKey/* default */.A)(path)) : _basePropertyDeep(path); -} - -/* harmony default export */ const lodash_es_property = (property); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIteratee.js - - - - - - -/** - * The base implementation of `_.iteratee`. - * - * @private - * @param {*} [value=_.identity] The value to convert to an iteratee. - * @returns {Function} Returns the iteratee. - */ -function baseIteratee(value) { - // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. - // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. - if (typeof value == 'function') { - return value; - } - if (value == null) { - return identity/* default */.A; - } - if (typeof value == 'object') { - return (0,isArray/* default */.A)(value) - ? _baseMatchesProperty(value[0], value[1]) - : _baseMatches(value); - } - return lodash_es_property(value); -} - -/* harmony default export */ const _baseIteratee = (baseIteratee); - - -/***/ }), - -/***/ 52568: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _baseEach_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6240); -/* harmony import */ var _isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(38446); - - - -/** - * The base implementation of `_.map` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the new mapped array. - */ -function baseMap(collection, iteratee) { - var index = -1, - result = (0,_isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(collection) ? Array(collection.length) : []; - - (0,_baseEach_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(collection, function(value, key, collection) { - result[++index] = iteratee(value, key, collection); - }); - return result; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseMap); - - -/***/ }), - -/***/ 70805: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * The base implementation of `_.property` without support for deep paths. - * - * @private - * @param {string} key The key of the property to get. - * @returns {Function} Returns the new accessor function. - */ -function baseProperty(key) { - return function(object) { - return object == null ? undefined : object[key]; - }; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseProperty); - - -/***/ }), - -/***/ 64099: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * Checks if a `cache` value for `key` exists. - * - * @private - * @param {Object} cache The cache to query. - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ -function cacheHas(cache, key) { - return cache.has(key); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (cacheHas); - - -/***/ }), - -/***/ 99922: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(29008); - - -/** - * Casts `value` to `identity` if it's not a function. - * - * @private - * @param {*} value The value to inspect. - * @returns {Function} Returns cast function. - */ -function castFunction(value) { - return typeof value == 'function' ? value : _identity_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (castFunction); - - -/***/ }), - -/***/ 7819: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ _castPath) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js -var isArray = __webpack_require__(92049); -// EXTERNAL MODULE: ./node_modules/lodash-es/_isKey.js -var _isKey = __webpack_require__(86586); -// EXTERNAL MODULE: ./node_modules/lodash-es/memoize.js -var memoize = __webpack_require__(46632); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_memoizeCapped.js - - -/** Used as the maximum memoize cache size. */ -var MAX_MEMOIZE_SIZE = 500; - -/** - * A specialized version of `_.memoize` which clears the memoized function's - * cache when it exceeds `MAX_MEMOIZE_SIZE`. - * - * @private - * @param {Function} func The function to have its output memoized. - * @returns {Function} Returns the new memoized function. - */ -function memoizeCapped(func) { - var result = (0,memoize/* default */.A)(func, function(key) { - if (cache.size === MAX_MEMOIZE_SIZE) { - cache.clear(); - } - return key; - }); - - var cache = result.cache; - return result; -} - -/* harmony default export */ const _memoizeCapped = (memoizeCapped); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_stringToPath.js - - -/** Used to match property names within property paths. */ -var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; - -/** Used to match backslashes in property paths. */ -var reEscapeChar = /\\(\\)?/g; - -/** - * Converts `string` to a property path array. - * - * @private - * @param {string} string The string to convert. - * @returns {Array} Returns the property path array. - */ -var stringToPath = _memoizeCapped(function(string) { - var result = []; - if (string.charCodeAt(0) === 46 /* . */) { - result.push(''); - } - string.replace(rePropName, function(match, number, quote, subString) { - result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match)); - }); - return result; -}); - -/* harmony default export */ const _stringToPath = (stringToPath); - -// EXTERNAL MODULE: ./node_modules/lodash-es/toString.js + 1 modules -var lodash_es_toString = __webpack_require__(28894); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_castPath.js - - - - - -/** - * Casts `value` to a path array if it's not one. - * - * @private - * @param {*} value The value to inspect. - * @param {Object} [object] The object to query keys on. - * @returns {Array} Returns the cast property path array. - */ -function castPath(value, object) { - if ((0,isArray/* default */.A)(value)) { - return value; - } - return (0,_isKey/* default */.A)(value, object) ? [value] : _stringToPath((0,lodash_es_toString/* default */.A)(value)); -} - -/* harmony default export */ const _castPath = (castPath); - - -/***/ }), - -/***/ 19042: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _baseGetAllKeys_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(33831); -/* harmony import */ var _getSymbols_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(14792); -/* harmony import */ var _keys_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(27422); - - - - -/** - * Creates an array of own enumerable property names and symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names and symbols. - */ -function getAllKeys(object) { - return (0,_baseGetAllKeys_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(object, _keys_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A, _getSymbols_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (getAllKeys); - - -/***/ }), - -/***/ 14792: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _arrayFilter_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2634); -/* harmony import */ var _stubArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13153); - - - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Built-in value references. */ -var propertyIsEnumerable = objectProto.propertyIsEnumerable; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeGetSymbols = Object.getOwnPropertySymbols; - -/** - * Creates an array of the own enumerable symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of symbols. - */ -var getSymbols = !nativeGetSymbols ? _stubArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A : function(object) { - if (object == null) { - return []; - } - object = Object(object); - return (0,_arrayFilter_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(nativeGetSymbols(object), function(symbol) { - return propertyIsEnumerable.call(object, symbol); - }); -}; - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (getSymbols); - - -/***/ }), - -/***/ 85054: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _castPath_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7819); -/* harmony import */ var _isArguments_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(52274); -/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(92049); -/* harmony import */ var _isIndex_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(25353); -/* harmony import */ var _isLength_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5254); -/* harmony import */ var _toKey_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(30901); - - - - - - - -/** - * Checks if `path` exists on `object`. - * - * @private - * @param {Object} object The object to query. - * @param {Array|string} path The path to check. - * @param {Function} hasFunc The function to check properties. - * @returns {boolean} Returns `true` if `path` exists, else `false`. - */ -function hasPath(object, path, hasFunc) { - path = (0,_castPath_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(path, object); - - var index = -1, - length = path.length, - result = false; - - while (++index < length) { - var key = (0,_toKey_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(path[index]); - if (!(result = object != null && hasFunc(object, key))) { - break; - } - object = object[key]; - } - if (result || ++index != length) { - return result; - } - length = object == null ? 0 : object.length; - return !!length && (0,_isLength_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)(length) && (0,_isIndex_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(key, length) && - ((0,_isArray_js__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .A)(object) || (0,_isArguments_js__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A)(object)); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (hasPath); - - -/***/ }), - -/***/ 86586: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(92049); -/* harmony import */ var _isSymbol_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(61882); - - - -/** Used to match property names within property paths. */ -var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, - reIsPlainProp = /^\w*$/; - -/** - * Checks if `value` is a property name and not a property path. - * - * @private - * @param {*} value The value to check. - * @param {Object} [object] The object to query keys on. - * @returns {boolean} Returns `true` if `value` is a property name, else `false`. - */ -function isKey(value, object) { - if ((0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(value)) { - return false; - } - var type = typeof value; - if (type == 'number' || type == 'symbol' || type == 'boolean' || - value == null || (0,_isSymbol_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(value)) { - return true; - } - return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || - (object != null && value in Object(object)); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isKey); - - -/***/ }), - -/***/ 29959: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * Converts `set` to an array of its values. - * - * @private - * @param {Object} set The set to convert. - * @returns {Array} Returns the values. - */ -function setToArray(set) { - var index = -1, - result = Array(set.size); - - set.forEach(function(value) { - result[++index] = value; - }); - return result; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (setToArray); - - -/***/ }), - -/***/ 30901: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _isSymbol_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(61882); - - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0; - -/** - * Converts `value` to a string key if it's not a string or symbol. - * - * @private - * @param {*} value The value to inspect. - * @returns {string|symbol} Returns the key. - */ -function toKey(value) { - if (typeof value == 'string' || (0,_isSymbol_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(value)) { - return value; - } - var result = (value + ''); - return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (toKey); - - -/***/ }), - -/***/ 23068: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _baseRest_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(24326); -/* harmony import */ var _eq_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(66984); -/* harmony import */ var _isIterateeCall_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6832); -/* harmony import */ var _keysIn_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(55615); - - - - - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Assigns own and inherited enumerable string keyed properties of source - * objects to the destination object for all destination properties that - * resolve to `undefined`. Source objects are applied from left to right. - * Once a property is set, additional values of the same property are ignored. - * - * **Note:** This method mutates `object`. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. - * @see _.defaultsDeep - * @example - * - * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); - * // => { 'a': 1, 'b': 2 } - */ -var defaults = (0,_baseRest_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(function(object, sources) { - object = Object(object); - - var index = -1; - var length = sources.length; - var guard = length > 2 ? sources[2] : undefined; - - if (guard && (0,_isIterateeCall_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(sources[0], sources[1], guard)) { - length = 1; - } - - while (++index < length) { - var source = sources[index]; - var props = (0,_keysIn_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)(source); - var propsIndex = -1; - var propsLength = props.length; - - while (++propsIndex < propsLength) { - var key = props[propsIndex]; - var value = object[key]; - - if (value === undefined || - ((0,_eq_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(value, objectProto[key]) && !hasOwnProperty.call(object, key))) { - object[key] = source[key]; - } - } - } - - return object; -}); - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (defaults); - - -/***/ }), - -/***/ 11662: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ lodash_es_filter) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayFilter.js -var _arrayFilter = __webpack_require__(2634); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseEach.js + 1 modules -var _baseEach = __webpack_require__(6240); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseFilter.js - - -/** - * The base implementation of `_.filter` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {Array} Returns the new filtered array. - */ -function baseFilter(collection, predicate) { - var result = []; - (0,_baseEach/* default */.A)(collection, function(value, index, collection) { - if (predicate(value, index, collection)) { - result.push(value); - } - }); - return result; -} - -/* harmony default export */ const _baseFilter = (baseFilter); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseIteratee.js + 16 modules -var _baseIteratee = __webpack_require__(49574); -// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js -var isArray = __webpack_require__(92049); -;// CONCATENATED MODULE: ./node_modules/lodash-es/filter.js - - - - - -/** - * Iterates over elements of `collection`, returning an array of all elements - * `predicate` returns truthy for. The predicate is invoked with three - * arguments: (value, index|key, collection). - * - * **Note:** Unlike `_.remove`, this method returns a new array. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @returns {Array} Returns the new filtered array. - * @see _.reject - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': true }, - * { 'user': 'fred', 'age': 40, 'active': false } - * ]; - * - * _.filter(users, function(o) { return !o.active; }); - * // => objects for ['fred'] - * - * // The `_.matches` iteratee shorthand. - * _.filter(users, { 'age': 36, 'active': true }); - * // => objects for ['barney'] - * - * // The `_.matchesProperty` iteratee shorthand. - * _.filter(users, ['active', false]); - * // => objects for ['fred'] - * - * // The `_.property` iteratee shorthand. - * _.filter(users, 'active'); - * // => objects for ['barney'] - * - * // Combining several predicates using `_.overEvery` or `_.overSome`. - * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]])); - * // => objects for ['fred', 'barney'] - */ -function filter(collection, predicate) { - var func = (0,isArray/* default */.A)(collection) ? _arrayFilter/* default */.A : _baseFilter; - return func(collection, (0,_baseIteratee/* default */.A)(predicate, 3)); -} - -/* harmony default export */ const lodash_es_filter = (filter); - - -/***/ }), - -/***/ 34098: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _baseFlatten_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13588); - - -/** - * Flattens `array` a single level deep. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to flatten. - * @returns {Array} Returns the new flattened array. - * @example - * - * _.flatten([1, [2, [3, [4]], 5]]); - * // => [1, 2, [3, [4]], 5] - */ -function flatten(array) { - var length = array == null ? 0 : array.length; - return length ? (0,_baseFlatten_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(array, 1) : []; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (flatten); - - -/***/ }), - -/***/ 8058: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _arrayEach_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(72641); -/* harmony import */ var _baseEach_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6240); -/* harmony import */ var _castFunction_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(99922); -/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(92049); - - - - - -/** - * Iterates over elements of `collection` and invokes `iteratee` for each element. - * The iteratee is invoked with three arguments: (value, index|key, collection). - * Iteratee functions may exit iteration early by explicitly returning `false`. - * - * **Note:** As with other "Collections" methods, objects with a "length" - * property are iterated like arrays. To avoid this behavior use `_.forIn` - * or `_.forOwn` for object iteration. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @alias each - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Array|Object} Returns `collection`. - * @see _.forEachRight - * @example - * - * _.forEach([1, 2], function(value) { - * console.log(value); - * }); - * // => Logs `1` then `2`. - * - * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { - * console.log(key); - * }); - * // => Logs 'a' then 'b' (iteration order is not guaranteed). - */ -function forEach(collection, iteratee) { - var func = (0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(collection) ? _arrayEach_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A : _baseEach_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A; - return func(collection, (0,_castFunction_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(iteratee)); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (forEach); - - -/***/ }), - -/***/ 48585: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ lodash_es_has) -}); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseHas.js -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var _baseHas_hasOwnProperty = objectProto.hasOwnProperty; - -/** - * The base implementation of `_.has` without support for deep paths. - * - * @private - * @param {Object} [object] The object to query. - * @param {Array|string} key The key to check. - * @returns {boolean} Returns `true` if `key` exists, else `false`. - */ -function baseHas(object, key) { - return object != null && _baseHas_hasOwnProperty.call(object, key); -} - -/* harmony default export */ const _baseHas = (baseHas); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_hasPath.js -var _hasPath = __webpack_require__(85054); -;// CONCATENATED MODULE: ./node_modules/lodash-es/has.js - - - -/** - * Checks if `path` is a direct property of `object`. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path to check. - * @returns {boolean} Returns `true` if `path` exists, else `false`. - * @example - * - * var object = { 'a': { 'b': 2 } }; - * var other = _.create({ 'a': _.create({ 'b': 2 }) }); - * - * _.has(object, 'a'); - * // => true - * - * _.has(object, 'a.b'); - * // => true - * - * _.has(object, ['a', 'b']); - * // => true - * - * _.has(other, 'a'); - * // => false - */ -function has(object, path) { - return object != null && (0,_hasPath/* default */.A)(object, path, _baseHas); -} - -/* harmony default export */ const lodash_es_has = (has); - - -/***/ }), - -/***/ 39188: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ lodash_es_hasIn) -}); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseHasIn.js -/** - * The base implementation of `_.hasIn` without support for deep paths. - * - * @private - * @param {Object} [object] The object to query. - * @param {Array|string} key The key to check. - * @returns {boolean} Returns `true` if `key` exists, else `false`. - */ -function baseHasIn(object, key) { - return object != null && key in Object(object); -} - -/* harmony default export */ const _baseHasIn = (baseHasIn); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_hasPath.js -var _hasPath = __webpack_require__(85054); -;// CONCATENATED MODULE: ./node_modules/lodash-es/hasIn.js - - - -/** - * Checks if `path` is a direct or inherited property of `object`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path to check. - * @returns {boolean} Returns `true` if `path` exists, else `false`. - * @example - * - * var object = _.create({ 'a': _.create({ 'b': 2 }) }); - * - * _.hasIn(object, 'a'); - * // => true - * - * _.hasIn(object, 'a.b'); - * // => true - * - * _.hasIn(object, ['a', 'b']); - * // => true - * - * _.hasIn(object, 'b'); - * // => false - */ -function hasIn(object, path) { - return object != null && (0,_hasPath/* default */.A)(object, path, _baseHasIn); -} - -/* harmony default export */ const lodash_es_hasIn = (hasIn); - - -/***/ }), - -/***/ 61882: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _baseGetTag_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(88496); -/* harmony import */ var _isObjectLike_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(53098); - - - -/** `Object#toString` result references. */ -var symbolTag = '[object Symbol]'; - -/** - * Checks if `value` is classified as a `Symbol` primitive or object. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. - * @example - * - * _.isSymbol(Symbol.iterator); - * // => true - * - * _.isSymbol('abc'); - * // => false - */ -function isSymbol(value) { - return typeof value == 'symbol' || - ((0,_isObjectLike_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(value) && (0,_baseGetTag_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(value) == symbolTag); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isSymbol); - - -/***/ }), - -/***/ 69592: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * Checks if `value` is `undefined`. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. - * @example - * - * _.isUndefined(void 0); - * // => true - * - * _.isUndefined(null); - * // => false - */ -function isUndefined(value) { - return value === undefined; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isUndefined); - - -/***/ }), - -/***/ 27422: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _arrayLikeKeys_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(83607); -/* harmony import */ var _baseKeys_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(69471); -/* harmony import */ var _isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(38446); - - - - -/** - * Creates an array of the own enumerable property names of `object`. - * - * **Note:** Non-object values are coerced to objects. See the - * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) - * for more details. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.keys(new Foo); - * // => ['a', 'b'] (iteration order is not guaranteed) - * - * _.keys('hi'); - * // => ['0', '1'] - */ -function keys(object) { - return (0,_isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(object) ? (0,_arrayLikeKeys_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(object) : (0,_baseKeys_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)(object); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (keys); - - -/***/ }), - -/***/ 74722: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _arrayMap_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(45572); -/* harmony import */ var _baseIteratee_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(49574); -/* harmony import */ var _baseMap_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(52568); -/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(92049); - - - - - -/** - * Creates an array of values by running each element in `collection` thru - * `iteratee`. The iteratee is invoked with three arguments: - * (value, index|key, collection). - * - * Many lodash methods are guarded to work as iteratees for methods like - * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. - * - * The guarded methods are: - * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, - * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`, - * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`, - * `template`, `trim`, `trimEnd`, `trimStart`, and `words` - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Array} Returns the new mapped array. - * @example - * - * function square(n) { - * return n * n; - * } - * - * _.map([4, 8], square); - * // => [16, 64] - * - * _.map({ 'a': 4, 'b': 8 }, square); - * // => [16, 64] (iteration order is not guaranteed) - * - * var users = [ - * { 'user': 'barney' }, - * { 'user': 'fred' } - * ]; - * - * // The `_.property` iteratee shorthand. - * _.map(users, 'user'); - * // => ['barney', 'fred'] - */ -function map(collection, iteratee) { - var func = (0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(collection) ? _arrayMap_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A : _baseMap_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A; - return func(collection, (0,_baseIteratee_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(iteratee, 3)); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (map); - - -/***/ }), - -/***/ 81942: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ lodash_es_pick) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGet.js -var _baseGet = __webpack_require__(66318); -// EXTERNAL MODULE: ./node_modules/lodash-es/_assignValue.js -var _assignValue = __webpack_require__(52851); -// EXTERNAL MODULE: ./node_modules/lodash-es/_castPath.js + 2 modules -var _castPath = __webpack_require__(7819); -// EXTERNAL MODULE: ./node_modules/lodash-es/_isIndex.js -var _isIndex = __webpack_require__(25353); -// EXTERNAL MODULE: ./node_modules/lodash-es/isObject.js -var isObject = __webpack_require__(23149); -// EXTERNAL MODULE: ./node_modules/lodash-es/_toKey.js -var _toKey = __webpack_require__(30901); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseSet.js - - - - - - -/** - * The base implementation of `_.set`. - * - * @private - * @param {Object} object The object to modify. - * @param {Array|string} path The path of the property to set. - * @param {*} value The value to set. - * @param {Function} [customizer] The function to customize path creation. - * @returns {Object} Returns `object`. - */ -function baseSet(object, path, value, customizer) { - if (!(0,isObject/* default */.A)(object)) { - return object; - } - path = (0,_castPath/* default */.A)(path, object); - - var index = -1, - length = path.length, - lastIndex = length - 1, - nested = object; - - while (nested != null && ++index < length) { - var key = (0,_toKey/* default */.A)(path[index]), - newValue = value; - - if (key === '__proto__' || key === 'constructor' || key === 'prototype') { - return object; - } - - if (index != lastIndex) { - var objValue = nested[key]; - newValue = customizer ? customizer(objValue, key, nested) : undefined; - if (newValue === undefined) { - newValue = (0,isObject/* default */.A)(objValue) - ? objValue - : ((0,_isIndex/* default */.A)(path[index + 1]) ? [] : {}); - } - } - (0,_assignValue/* default */.A)(nested, key, newValue); - nested = nested[key]; - } - return object; -} - -/* harmony default export */ const _baseSet = (baseSet); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_basePickBy.js - - - - -/** - * The base implementation of `_.pickBy` without support for iteratee shorthands. - * - * @private - * @param {Object} object The source object. - * @param {string[]} paths The property paths to pick. - * @param {Function} predicate The function invoked per property. - * @returns {Object} Returns the new object. - */ -function basePickBy(object, paths, predicate) { - var index = -1, - length = paths.length, - result = {}; - - while (++index < length) { - var path = paths[index], - value = (0,_baseGet/* default */.A)(object, path); - - if (predicate(value, path)) { - _baseSet(result, (0,_castPath/* default */.A)(path, object), value); - } - } - return result; -} - -/* harmony default export */ const _basePickBy = (basePickBy); - -// EXTERNAL MODULE: ./node_modules/lodash-es/hasIn.js + 1 modules -var hasIn = __webpack_require__(39188); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_basePick.js - - - -/** - * The base implementation of `_.pick` without support for individual - * property identifiers. - * - * @private - * @param {Object} object The source object. - * @param {string[]} paths The property paths to pick. - * @returns {Object} Returns the new object. - */ -function basePick(object, paths) { - return _basePickBy(object, paths, function(value, path) { - return (0,hasIn/* default */.A)(object, path); - }); -} - -/* harmony default export */ const _basePick = (basePick); - -// EXTERNAL MODULE: ./node_modules/lodash-es/flatten.js -var flatten = __webpack_require__(34098); -// EXTERNAL MODULE: ./node_modules/lodash-es/_overRest.js + 1 modules -var _overRest = __webpack_require__(76875); -// EXTERNAL MODULE: ./node_modules/lodash-es/_setToString.js + 2 modules -var _setToString = __webpack_require__(67525); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_flatRest.js - - - - -/** - * A specialized version of `baseRest` which flattens the rest array. - * - * @private - * @param {Function} func The function to apply a rest parameter to. - * @returns {Function} Returns the new function. - */ -function flatRest(func) { - return (0,_setToString/* default */.A)((0,_overRest/* default */.A)(func, undefined, flatten/* default */.A), func + ''); -} - -/* harmony default export */ const _flatRest = (flatRest); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/pick.js - - - -/** - * Creates an object composed of the picked `object` properties. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The source object. - * @param {...(string|string[])} [paths] The property paths to pick. - * @returns {Object} Returns the new object. - * @example - * - * var object = { 'a': 1, 'b': '2', 'c': 3 }; - * - * _.pick(object, ['a', 'c']); - * // => { 'a': 1, 'c': 3 } - */ -var pick = _flatRest(function(object, paths) { - return object == null ? {} : _basePick(object, paths); -}); - -/* harmony default export */ const lodash_es_pick = (pick); - - -/***/ }), - -/***/ 91395: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ lodash_es_range) -}); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseRange.js -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeCeil = Math.ceil, - nativeMax = Math.max; - -/** - * The base implementation of `_.range` and `_.rangeRight` which doesn't - * coerce arguments. - * - * @private - * @param {number} start The start of the range. - * @param {number} end The end of the range. - * @param {number} step The value to increment or decrement by. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Array} Returns the range of numbers. - */ -function baseRange(start, end, step, fromRight) { - var index = -1, - length = nativeMax(nativeCeil((end - start) / (step || 1)), 0), - result = Array(length); - - while (length--) { - result[fromRight ? length : ++index] = start; - start += step; - } - return result; -} - -/* harmony default export */ const _baseRange = (baseRange); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_isIterateeCall.js -var _isIterateeCall = __webpack_require__(6832); -// EXTERNAL MODULE: ./node_modules/lodash-es/toFinite.js + 3 modules -var toFinite = __webpack_require__(74342); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_createRange.js - - - - -/** - * Creates a `_.range` or `_.rangeRight` function. - * - * @private - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new range function. - */ -function createRange(fromRight) { - return function(start, end, step) { - if (step && typeof step != 'number' && (0,_isIterateeCall/* default */.A)(start, end, step)) { - end = step = undefined; - } - // Ensure the sign of `-0` is preserved. - start = (0,toFinite/* default */.A)(start); - if (end === undefined) { - end = start; - start = 0; - } else { - end = (0,toFinite/* default */.A)(end); - } - step = step === undefined ? (start < end ? 1 : -1) : (0,toFinite/* default */.A)(step); - return _baseRange(start, end, step, fromRight); - }; -} - -/* harmony default export */ const _createRange = (createRange); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/range.js - - -/** - * Creates an array of numbers (positive and/or negative) progressing from - * `start` up to, but not including, `end`. A step of `-1` is used if a negative - * `start` is specified without an `end` or `step`. If `end` is not specified, - * it's set to `start` with `start` then set to `0`. - * - * **Note:** JavaScript follows the IEEE-754 standard for resolving - * floating-point values which can produce unexpected results. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Util - * @param {number} [start=0] The start of the range. - * @param {number} end The end of the range. - * @param {number} [step=1] The value to increment or decrement by. - * @returns {Array} Returns the range of numbers. - * @see _.inRange, _.rangeRight - * @example - * - * _.range(4); - * // => [0, 1, 2, 3] - * - * _.range(-4); - * // => [0, -1, -2, -3] - * - * _.range(1, 5); - * // => [1, 2, 3, 4] - * - * _.range(0, 20, 5); - * // => [0, 5, 10, 15] - * - * _.range(0, -4, -1); - * // => [0, -1, -2, -3] - * - * _.range(1, 4, 0); - * // => [1, 1, 1] - * - * _.range(0); - * // => [] - */ -var range = _createRange(); - -/* harmony default export */ const lodash_es_range = (range); - - -/***/ }), - -/***/ 89463: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ lodash_es_reduce) -}); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_arrayReduce.js -/** - * A specialized version of `_.reduce` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {*} [accumulator] The initial value. - * @param {boolean} [initAccum] Specify using the first element of `array` as - * the initial value. - * @returns {*} Returns the accumulated value. - */ -function arrayReduce(array, iteratee, accumulator, initAccum) { - var index = -1, - length = array == null ? 0 : array.length; - - if (initAccum && length) { - accumulator = array[++index]; - } - while (++index < length) { - accumulator = iteratee(accumulator, array[index], index, array); - } - return accumulator; -} - -/* harmony default export */ const _arrayReduce = (arrayReduce); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseEach.js + 1 modules -var _baseEach = __webpack_require__(6240); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseIteratee.js + 16 modules -var _baseIteratee = __webpack_require__(49574); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseReduce.js -/** - * The base implementation of `_.reduce` and `_.reduceRight`, without support - * for iteratee shorthands, which iterates over `collection` using `eachFunc`. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {*} accumulator The initial value. - * @param {boolean} initAccum Specify using the first or last element of - * `collection` as the initial value. - * @param {Function} eachFunc The function to iterate over `collection`. - * @returns {*} Returns the accumulated value. - */ -function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { - eachFunc(collection, function(value, index, collection) { - accumulator = initAccum - ? (initAccum = false, value) - : iteratee(accumulator, value, index, collection); - }); - return accumulator; -} - -/* harmony default export */ const _baseReduce = (baseReduce); - -// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js -var isArray = __webpack_require__(92049); -;// CONCATENATED MODULE: ./node_modules/lodash-es/reduce.js - - - - - - -/** - * Reduces `collection` to a value which is the accumulated result of running - * each element in `collection` thru `iteratee`, where each successive - * invocation is supplied the return value of the previous. If `accumulator` - * is not given, the first element of `collection` is used as the initial - * value. The iteratee is invoked with four arguments: - * (accumulator, value, index|key, collection). - * - * Many lodash methods are guarded to work as iteratees for methods like - * `_.reduce`, `_.reduceRight`, and `_.transform`. - * - * The guarded methods are: - * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`, - * and `sortBy` - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @param {*} [accumulator] The initial value. - * @returns {*} Returns the accumulated value. - * @see _.reduceRight - * @example - * - * _.reduce([1, 2], function(sum, n) { - * return sum + n; - * }, 0); - * // => 3 - * - * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { - * (result[value] || (result[value] = [])).push(key); - * return result; - * }, {}); - * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed) - */ -function reduce(collection, iteratee, accumulator) { - var func = (0,isArray/* default */.A)(collection) ? _arrayReduce : _baseReduce, - initAccum = arguments.length < 3; - - return func(collection, (0,_baseIteratee/* default */.A)(iteratee, 4), accumulator, initAccum, _baseEach/* default */.A); -} - -/* harmony default export */ const lodash_es_reduce = (reduce); - - -/***/ }), - -/***/ 13153: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * This method returns a new empty array. - * - * @static - * @memberOf _ - * @since 4.13.0 - * @category Util - * @returns {Array} Returns the new empty array. - * @example - * - * var arrays = _.times(2, _.stubArray); - * - * console.log(arrays); - * // => [[], []] - * - * console.log(arrays[0] === arrays[1]); - * // => false - */ -function stubArray() { - return []; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (stubArray); - - -/***/ }), - -/***/ 74342: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ lodash_es_toFinite) -}); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_trimmedEndIndex.js -/** Used to match a single whitespace character. */ -var reWhitespace = /\s/; - -/** - * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace - * character of `string`. - * - * @private - * @param {string} string The string to inspect. - * @returns {number} Returns the index of the last non-whitespace character. - */ -function trimmedEndIndex(string) { - var index = string.length; - - while (index-- && reWhitespace.test(string.charAt(index))) {} - return index; -} - -/* harmony default export */ const _trimmedEndIndex = (trimmedEndIndex); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseTrim.js - - -/** Used to match leading whitespace. */ -var reTrimStart = /^\s+/; - -/** - * The base implementation of `_.trim`. - * - * @private - * @param {string} string The string to trim. - * @returns {string} Returns the trimmed string. - */ -function baseTrim(string) { - return string - ? string.slice(0, _trimmedEndIndex(string) + 1).replace(reTrimStart, '') - : string; -} - -/* harmony default export */ const _baseTrim = (baseTrim); - -// EXTERNAL MODULE: ./node_modules/lodash-es/isObject.js -var isObject = __webpack_require__(23149); -// EXTERNAL MODULE: ./node_modules/lodash-es/isSymbol.js -var isSymbol = __webpack_require__(61882); -;// CONCATENATED MODULE: ./node_modules/lodash-es/toNumber.js - - - - -/** Used as references for various `Number` constants. */ -var NAN = 0 / 0; - -/** Used to detect bad signed hexadecimal string values. */ -var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; - -/** Used to detect binary string values. */ -var reIsBinary = /^0b[01]+$/i; - -/** Used to detect octal string values. */ -var reIsOctal = /^0o[0-7]+$/i; - -/** Built-in method references without a dependency on `root`. */ -var freeParseInt = parseInt; - -/** - * Converts `value` to a number. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to process. - * @returns {number} Returns the number. - * @example - * - * _.toNumber(3.2); - * // => 3.2 - * - * _.toNumber(Number.MIN_VALUE); - * // => 5e-324 - * - * _.toNumber(Infinity); - * // => Infinity - * - * _.toNumber('3.2'); - * // => 3.2 - */ -function toNumber(value) { - if (typeof value == 'number') { - return value; - } - if ((0,isSymbol/* default */.A)(value)) { - return NAN; - } - if ((0,isObject/* default */.A)(value)) { - var other = typeof value.valueOf == 'function' ? value.valueOf() : value; - value = (0,isObject/* default */.A)(other) ? (other + '') : other; - } - if (typeof value != 'string') { - return value === 0 ? value : +value; - } - value = _baseTrim(value); - var isBinary = reIsBinary.test(value); - return (isBinary || reIsOctal.test(value)) - ? freeParseInt(value.slice(2), isBinary ? 2 : 8) - : (reIsBadHex.test(value) ? NAN : +value); -} - -/* harmony default export */ const lodash_es_toNumber = (toNumber); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/toFinite.js - - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0, - MAX_INTEGER = 1.7976931348623157e+308; - -/** - * Converts `value` to a finite number. - * - * @static - * @memberOf _ - * @since 4.12.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {number} Returns the converted number. - * @example - * - * _.toFinite(3.2); - * // => 3.2 - * - * _.toFinite(Number.MIN_VALUE); - * // => 5e-324 - * - * _.toFinite(Infinity); - * // => 1.7976931348623157e+308 - * - * _.toFinite('3.2'); - * // => 3.2 - */ -function toFinite(value) { - if (!value) { - return value === 0 ? value : 0; - } - value = lodash_es_toNumber(value); - if (value === INFINITY || value === -INFINITY) { - var sign = (value < 0 ? -1 : 1); - return sign * MAX_INTEGER; - } - return value === value ? value : 0; -} - -/* harmony default export */ const lodash_es_toFinite = (toFinite); - - -/***/ }), - -/***/ 28894: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ lodash_es_toString) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_Symbol.js -var _Symbol = __webpack_require__(241); -// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayMap.js -var _arrayMap = __webpack_require__(45572); -// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js -var isArray = __webpack_require__(92049); -// EXTERNAL MODULE: ./node_modules/lodash-es/isSymbol.js -var isSymbol = __webpack_require__(61882); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseToString.js - - - - - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0; - -/** Used to convert symbols to primitives and strings. */ -var symbolProto = _Symbol/* default */.A ? _Symbol/* default */.A.prototype : undefined, - symbolToString = symbolProto ? symbolProto.toString : undefined; - -/** - * The base implementation of `_.toString` which doesn't convert nullish - * values to empty strings. - * - * @private - * @param {*} value The value to process. - * @returns {string} Returns the string. - */ -function baseToString(value) { - // Exit early for strings to avoid a performance hit in some environments. - if (typeof value == 'string') { - return value; - } - if ((0,isArray/* default */.A)(value)) { - // Recursively convert values (susceptible to call stack limits). - return (0,_arrayMap/* default */.A)(value, baseToString) + ''; - } - if ((0,isSymbol/* default */.A)(value)) { - return symbolToString ? symbolToString.call(value) : ''; - } - var result = (value + ''); - return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; -} - -/* harmony default export */ const _baseToString = (baseToString); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/toString.js - - -/** - * Converts `value` to a string. An empty string is returned for `null` - * and `undefined` values. The sign of `-0` is preserved. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {string} Returns the converted string. - * @example - * - * _.toString(null); - * // => '' - * - * _.toString(-0); - * // => '-0' - * - * _.toString([1, 2, 3]); - * // => '1,2,3' - */ -function toString_toString(value) { - return value == null ? '' : _baseToString(value); -} - -/* harmony default export */ const lodash_es_toString = (toString_toString); - - -/***/ }), - -/***/ 5664: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _toString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(28894); - - -/** Used to generate unique IDs. */ -var idCounter = 0; - -/** - * Generates a unique ID. If `prefix` is given, the ID is appended to it. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Util - * @param {string} [prefix=''] The value to prefix the ID with. - * @returns {string} Returns the unique ID. - * @example - * - * _.uniqueId('contact_'); - * // => 'contact_104' - * - * _.uniqueId(); - * // => '105' - */ -function uniqueId(prefix) { - var id = ++idCounter; - return (0,_toString_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(prefix) + id; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (uniqueId); - - -/***/ }), - -/***/ 38207: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ lodash_es_values) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayMap.js -var _arrayMap = __webpack_require__(45572); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseValues.js - - -/** - * The base implementation of `_.values` and `_.valuesIn` which creates an - * array of `object` property values corresponding to the property names - * of `props`. - * - * @private - * @param {Object} object The object to query. - * @param {Array} props The property names to get values for. - * @returns {Object} Returns the array of property values. - */ -function baseValues(object, props) { - return (0,_arrayMap/* default */.A)(props, function(key) { - return object[key]; - }); -} - -/* harmony default export */ const _baseValues = (baseValues); - -// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js -var keys = __webpack_require__(27422); -;// CONCATENATED MODULE: ./node_modules/lodash-es/values.js - - - -/** - * Creates an array of the own enumerable string keyed property values of `object`. - * - * **Note:** Non-object values are coerced to objects. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property values. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.values(new Foo); - * // => [1, 2] (iteration order is not guaranteed) - * - * _.values('hi'); - * // => ['h', 'i'] - */ -function values(object) { - return object == null ? [] : _baseValues(object, (0,keys/* default */.A)(object)); -} - -/* harmony default export */ const lodash_es_values = (values); - - -/***/ }), - -/***/ 95163: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ diagram: () => (/* binding */ diagram) -/* harmony export */ }); -/* harmony import */ var _styles_6aaf32cf_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(27899); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(26312); -/* harmony import */ var dagre_d3_es_src_dagre_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(21176); -/* harmony import */ var dagre_d3_es_src_graphlib_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(697); -/* harmony import */ var _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(86079); -/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(74353); -/* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(16750); -/* harmony import */ var dompurify__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(99418); - - - - - - - - - - - - - - -const idCache = {}; -const set = (key, val) => { - idCache[key] = val; -}; -const get = (k) => idCache[k]; -const keys = () => Object.keys(idCache); -const size = () => keys().length; -const idCache$1 = { - get, - set, - keys, - size -}; -const drawStartState = (g) => g.append("circle").attr("class", "start-state").attr("r", (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.sizeUnit).attr("cx", (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.padding + (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.sizeUnit).attr("cy", (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.padding + (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.sizeUnit); -const drawDivider = (g) => g.append("line").style("stroke", "grey").style("stroke-dasharray", "3").attr("x1", (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.textHeight).attr("class", "divider").attr("x2", (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.textHeight * 2).attr("y1", 0).attr("y2", 0); -const drawSimpleState = (g, stateDef) => { - const state = g.append("text").attr("x", 2 * (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.padding).attr("y", (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.textHeight + 2 * (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.padding).attr("font-size", (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.fontSize).attr("class", "state-title").text(stateDef.id); - const classBox = state.node().getBBox(); - g.insert("rect", ":first-child").attr("x", (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.padding).attr("y", (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.padding).attr("width", classBox.width + 2 * (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.padding).attr("height", classBox.height + 2 * (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.padding).attr("rx", (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.radius); - return state; -}; -const drawDescrState = (g, stateDef) => { - const addTspan = function(textEl, txt, isFirst2) { - const tSpan = textEl.append("tspan").attr("x", 2 * (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.padding).text(txt); - if (!isFirst2) { - tSpan.attr("dy", (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.textHeight); - } - }; - const title = g.append("text").attr("x", 2 * (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.padding).attr("y", (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.textHeight + 1.3 * (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.padding).attr("font-size", (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.fontSize).attr("class", "state-title").text(stateDef.descriptions[0]); - const titleBox = title.node().getBBox(); - const titleHeight = titleBox.height; - const description = g.append("text").attr("x", (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.padding).attr( - "y", - titleHeight + (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.padding * 0.4 + (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.dividerMargin + (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.textHeight - ).attr("class", "state-description"); - let isFirst = true; - let isSecond = true; - stateDef.descriptions.forEach(function(descr) { - if (!isFirst) { - addTspan(description, descr, isSecond); - isSecond = false; - } - isFirst = false; - }); - const descrLine = g.append("line").attr("x1", (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.padding).attr("y1", (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.padding + titleHeight + (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.dividerMargin / 2).attr("y2", (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.padding + titleHeight + (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.dividerMargin / 2).attr("class", "descr-divider"); - const descrBox = description.node().getBBox(); - const width = Math.max(descrBox.width, titleBox.width); - descrLine.attr("x2", width + 3 * (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.padding); - g.insert("rect", ":first-child").attr("x", (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.padding).attr("y", (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.padding).attr("width", width + 2 * (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.padding).attr("height", descrBox.height + titleHeight + 2 * (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.padding).attr("rx", (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.radius); - return g; -}; -const addTitleAndBox = (g, stateDef, altBkg) => { - const pad = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.padding; - const dblPad = 2 * (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.padding; - const orgBox = g.node().getBBox(); - const orgWidth = orgBox.width; - const orgX = orgBox.x; - const title = g.append("text").attr("x", 0).attr("y", (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.titleShift).attr("font-size", (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.fontSize).attr("class", "state-title").text(stateDef.id); - const titleBox = title.node().getBBox(); - const titleWidth = titleBox.width + dblPad; - let width = Math.max(titleWidth, orgWidth); - if (width === orgWidth) { - width = width + dblPad; - } - let startX; - const graphBox = g.node().getBBox(); - if (stateDef.doc) - ; - startX = orgX - pad; - if (titleWidth > orgWidth) { - startX = (orgWidth - width) / 2 + pad; - } - if (Math.abs(orgX - graphBox.x) < pad && titleWidth > orgWidth) { - startX = orgX - (titleWidth - orgWidth) / 2; - } - const lineY = 1 - (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.textHeight; - g.insert("rect", ":first-child").attr("x", startX).attr("y", lineY).attr("class", altBkg ? "alt-composit" : "composit").attr("width", width).attr( - "height", - graphBox.height + (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.textHeight + (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.titleShift + 1 - ).attr("rx", "0"); - title.attr("x", startX + pad); - if (titleWidth <= orgWidth) { - title.attr("x", orgX + (width - dblPad) / 2 - titleWidth / 2 + pad); - } - g.insert("rect", ":first-child").attr("x", startX).attr( - "y", - (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.titleShift - (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.textHeight - (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.padding - ).attr("width", width).attr("height", (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.textHeight * 3).attr("rx", (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.radius); - g.insert("rect", ":first-child").attr("x", startX).attr( - "y", - (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.titleShift - (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.textHeight - (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.padding - ).attr("width", width).attr("height", graphBox.height + 3 + 2 * (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.textHeight).attr("rx", (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.radius); - return g; -}; -const drawEndState = (g) => { - g.append("circle").attr("class", "end-state-outer").attr("r", (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.sizeUnit + (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.miniPadding).attr( - "cx", - (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.padding + (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.sizeUnit + (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.miniPadding - ).attr( - "cy", - (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.padding + (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.sizeUnit + (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.miniPadding - ); - return g.append("circle").attr("class", "end-state-inner").attr("r", (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.sizeUnit).attr("cx", (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.padding + (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.sizeUnit + 2).attr("cy", (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.padding + (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.sizeUnit + 2); -}; -const drawForkJoinState = (g, stateDef) => { - let width = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.forkWidth; - let height = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.forkHeight; - if (stateDef.parentId) { - let tmp = width; - width = height; - height = tmp; - } - return g.append("rect").style("stroke", "black").style("fill", "black").attr("width", width).attr("height", height).attr("x", (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.padding).attr("y", (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.padding); -}; -const _drawLongText = (_text, x, y, g) => { - let textHeight = 0; - const textElem = g.append("text"); - textElem.style("text-anchor", "start"); - textElem.attr("class", "noteText"); - let text = _text.replace(/\r\n/g, "
"); - text = text.replace(/\n/g, "
"); - const lines = text.split(_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.e.lineBreakRegex); - let tHeight = 1.25 * (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.noteMargin; - for (const line2 of lines) { - const txt = line2.trim(); - if (txt.length > 0) { - const span = textElem.append("tspan"); - span.text(txt); - if (tHeight === 0) { - const textBounds = span.node().getBBox(); - tHeight += textBounds.height; - } - textHeight += tHeight; - span.attr("x", x + (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.noteMargin); - span.attr("y", y + textHeight + 1.25 * (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.noteMargin); - } - } - return { textWidth: textElem.node().getBBox().width, textHeight }; -}; -const drawNote = (text, g) => { - g.attr("class", "state-note"); - const note = g.append("rect").attr("x", 0).attr("y", (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.padding); - const rectElem = g.append("g"); - const { textWidth, textHeight } = _drawLongText(text, 0, 0, rectElem); - note.attr("height", textHeight + 2 * (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.noteMargin); - note.attr("width", textWidth + (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.noteMargin * 2); - return note; -}; -const drawState = function(elem, stateDef) { - const id = stateDef.id; - const stateInfo = { - id, - label: stateDef.id, - width: 0, - height: 0 - }; - const g = elem.append("g").attr("id", id).attr("class", "stateGroup"); - if (stateDef.type === "start") { - drawStartState(g); - } - if (stateDef.type === "end") { - drawEndState(g); - } - if (stateDef.type === "fork" || stateDef.type === "join") { - drawForkJoinState(g, stateDef); - } - if (stateDef.type === "note") { - drawNote(stateDef.note.text, g); - } - if (stateDef.type === "divider") { - drawDivider(g); - } - if (stateDef.type === "default" && stateDef.descriptions.length === 0) { - drawSimpleState(g, stateDef); - } - if (stateDef.type === "default" && stateDef.descriptions.length > 0) { - drawDescrState(g, stateDef); - } - const stateBox = g.node().getBBox(); - stateInfo.width = stateBox.width + 2 * (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.padding; - stateInfo.height = stateBox.height + 2 * (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.padding; - idCache$1.set(id, stateInfo); - return stateInfo; -}; -let edgeCount = 0; -const drawEdge = function(elem, path, relation) { - const getRelationType = function(type) { - switch (type) { - case _styles_6aaf32cf_js__WEBPACK_IMPORTED_MODULE_7__.d.relationType.AGGREGATION: - return "aggregation"; - case _styles_6aaf32cf_js__WEBPACK_IMPORTED_MODULE_7__.d.relationType.EXTENSION: - return "extension"; - case _styles_6aaf32cf_js__WEBPACK_IMPORTED_MODULE_7__.d.relationType.COMPOSITION: - return "composition"; - case _styles_6aaf32cf_js__WEBPACK_IMPORTED_MODULE_7__.d.relationType.DEPENDENCY: - return "dependency"; - } - }; - path.points = path.points.filter((p) => !Number.isNaN(p.y)); - const lineData = path.points; - const lineFunction = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .line */ .n8j)().x(function(d) { - return d.x; - }).y(function(d) { - return d.y; - }).curve(d3__WEBPACK_IMPORTED_MODULE_0__/* .curveBasis */ .qrM); - const svgPath = elem.append("path").attr("d", lineFunction(lineData)).attr("id", "edge" + edgeCount).attr("class", "transition"); - let url = ""; - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.arrowMarkerAbsolute) { - url = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search; - url = url.replace(/\(/g, "\\("); - url = url.replace(/\)/g, "\\)"); - } - svgPath.attr( - "marker-end", - "url(" + url + "#" + getRelationType(_styles_6aaf32cf_js__WEBPACK_IMPORTED_MODULE_7__.d.relationType.DEPENDENCY) + "End)" - ); - if (relation.title !== void 0) { - const label = elem.append("g").attr("class", "stateLabel"); - const { x, y } = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.u.calcLabelPosition(path.points); - const rows = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.e.getRows(relation.title); - let titleHeight = 0; - const titleRows = []; - let maxWidth = 0; - let minX = 0; - for (let i = 0; i <= rows.length; i++) { - const title = label.append("text").attr("text-anchor", "middle").text(rows[i]).attr("x", x).attr("y", y + titleHeight); - const boundsTmp = title.node().getBBox(); - maxWidth = Math.max(maxWidth, boundsTmp.width); - minX = Math.min(minX, boundsTmp.x); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.l.info(boundsTmp.x, x, y + titleHeight); - if (titleHeight === 0) { - const titleBox = title.node().getBBox(); - titleHeight = titleBox.height; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.l.info("Title height", titleHeight, y); - } - titleRows.push(title); - } - let boxHeight = titleHeight * rows.length; - if (rows.length > 1) { - const heightAdj = (rows.length - 1) * titleHeight * 0.5; - titleRows.forEach((title, i) => title.attr("y", y + i * titleHeight - heightAdj)); - boxHeight = titleHeight * rows.length; - } - const bounds = label.node().getBBox(); - label.insert("rect", ":first-child").attr("class", "box").attr("x", x - maxWidth / 2 - (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.padding / 2).attr("y", y - boxHeight / 2 - (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.padding / 2 - 3.5).attr("width", maxWidth + (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.padding).attr("height", boxHeight + (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.padding); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.l.info(bounds); - } - edgeCount++; -}; -let conf; -const transformationLog = {}; -const setConf = function() { -}; -const insertMarkers = function(elem) { - elem.append("defs").append("marker").attr("id", "dependencyEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 19,7 L9,13 L14,7 L9,1 Z"); -}; -const draw = function(text, id, _version, diagObj) { - conf = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().state; - const securityLevel = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().securityLevel; - let sandboxElement; - if (securityLevel === "sandbox") { - sandboxElement = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)("#i" + id); - } - const root = securityLevel === "sandbox" ? (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(sandboxElement.nodes()[0].contentDocument.body) : (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)("body"); - const doc = securityLevel === "sandbox" ? sandboxElement.nodes()[0].contentDocument : document; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.l.debug("Rendering diagram " + text); - const diagram2 = root.select(`[id='${id}']`); - insertMarkers(diagram2); - const rootDoc = diagObj.db.getRootDoc(); - renderDoc(rootDoc, diagram2, void 0, false, root, doc, diagObj); - const padding = conf.padding; - const bounds = diagram2.node().getBBox(); - const width = bounds.width + padding * 2; - const height = bounds.height + padding * 2; - const svgWidth = width * 1.75; - (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.i)(diagram2, height, svgWidth, conf.useMaxWidth); - diagram2.attr( - "viewBox", - `${bounds.x - conf.padding} ${bounds.y - conf.padding} ` + width + " " + height - ); -}; -const getLabelWidth = (text) => { - return text ? text.length * conf.fontSizeFactor : 1; -}; -const renderDoc = (doc, diagram2, parentId, altBkg, root, domDocument, diagObj) => { - const graph = new dagre_d3_es_src_graphlib_index_js__WEBPACK_IMPORTED_MODULE_2__/* .Graph */ .T({ - compound: true, - multigraph: true - }); - let i; - let edgeFreeDoc = true; - for (i = 0; i < doc.length; i++) { - if (doc[i].stmt === "relation") { - edgeFreeDoc = false; - break; - } - } - if (parentId) { - graph.setGraph({ - rankdir: "LR", - multigraph: true, - compound: true, - // acyclicer: 'greedy', - ranker: "tight-tree", - ranksep: edgeFreeDoc ? 1 : conf.edgeLengthFactor, - nodeSep: edgeFreeDoc ? 1 : 50, - isMultiGraph: true - // ranksep: 5, - // nodesep: 1 - }); - } else { - graph.setGraph({ - rankdir: "TB", - multigraph: true, - compound: true, - // isCompound: true, - // acyclicer: 'greedy', - // ranker: 'longest-path' - ranksep: edgeFreeDoc ? 1 : conf.edgeLengthFactor, - nodeSep: edgeFreeDoc ? 1 : 50, - ranker: "tight-tree", - // ranker: 'network-simplex' - isMultiGraph: true - }); - } - graph.setDefaultEdgeLabel(function() { - return {}; - }); - diagObj.db.extract(doc); - const states = diagObj.db.getStates(); - const relations = diagObj.db.getRelations(); - const keys2 = Object.keys(states); - for (const key of keys2) { - const stateDef = states[key]; - if (parentId) { - stateDef.parentId = parentId; - } - let node; - if (stateDef.doc) { - let sub = diagram2.append("g").attr("id", stateDef.id).attr("class", "stateGroup"); - node = renderDoc(stateDef.doc, sub, stateDef.id, !altBkg, root, domDocument, diagObj); - { - sub = addTitleAndBox(sub, stateDef, altBkg); - let boxBounds = sub.node().getBBox(); - node.width = boxBounds.width; - node.height = boxBounds.height + conf.padding / 2; - transformationLog[stateDef.id] = { y: conf.compositTitleSize }; - } - } else { - node = drawState(diagram2, stateDef); - } - if (stateDef.note) { - const noteDef = { - descriptions: [], - id: stateDef.id + "-note", - note: stateDef.note, - type: "note" - }; - const note = drawState(diagram2, noteDef); - if (stateDef.note.position === "left of") { - graph.setNode(node.id + "-note", note); - graph.setNode(node.id, node); - } else { - graph.setNode(node.id, node); - graph.setNode(node.id + "-note", note); - } - graph.setParent(node.id, node.id + "-group"); - graph.setParent(node.id + "-note", node.id + "-group"); - } else { - graph.setNode(node.id, node); - } - } - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.l.debug("Count=", graph.nodeCount(), graph); - let cnt = 0; - relations.forEach(function(relation) { - cnt++; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.l.debug("Setting edge", relation); - graph.setEdge( - relation.id1, - relation.id2, - { - relation, - width: getLabelWidth(relation.title), - height: conf.labelHeight * _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.e.getRows(relation.title).length, - labelpos: "c" - }, - "id" + cnt - ); - }); - (0,dagre_d3_es_src_dagre_index_js__WEBPACK_IMPORTED_MODULE_1__/* .layout */ .Zp)(graph); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.l.debug("Graph after layout", graph.nodes()); - const svgElem = diagram2.node(); - graph.nodes().forEach(function(v) { - if (v !== void 0 && graph.node(v) !== void 0) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.l.warn("Node " + v + ": " + JSON.stringify(graph.node(v))); - root.select("#" + svgElem.id + " #" + v).attr( - "transform", - "translate(" + (graph.node(v).x - graph.node(v).width / 2) + "," + (graph.node(v).y + (transformationLog[v] ? transformationLog[v].y : 0) - graph.node(v).height / 2) + " )" - ); - root.select("#" + svgElem.id + " #" + v).attr("data-x-shift", graph.node(v).x - graph.node(v).width / 2); - const dividers = domDocument.querySelectorAll("#" + svgElem.id + " #" + v + " .divider"); - dividers.forEach((divider) => { - const parent = divider.parentElement; - let pWidth = 0; - let pShift = 0; - if (parent) { - if (parent.parentElement) { - pWidth = parent.parentElement.getBBox().width; - } - pShift = parseInt(parent.getAttribute("data-x-shift"), 10); - if (Number.isNaN(pShift)) { - pShift = 0; - } - } - divider.setAttribute("x1", 0 - pShift + 8); - divider.setAttribute("x2", pWidth - pShift - 8); - }); - } else { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.l.debug("No Node " + v + ": " + JSON.stringify(graph.node(v))); - } - }); - let stateBox = svgElem.getBBox(); - graph.edges().forEach(function(e) { - if (e !== void 0 && graph.edge(e) !== void 0) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.l.debug("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(graph.edge(e))); - drawEdge(diagram2, graph.edge(e), graph.edge(e).relation); - } - }); - stateBox = svgElem.getBBox(); - const stateInfo = { - id: parentId ? parentId : "root", - label: parentId ? parentId : "root", - width: 0, - height: 0 - }; - stateInfo.width = stateBox.width + 2 * conf.padding; - stateInfo.height = stateBox.height + 2 * conf.padding; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.l.debug("Doc rendered", stateInfo, graph); - return stateInfo; -}; -const renderer = { - setConf, - draw -}; -const diagram = { - parser: _styles_6aaf32cf_js__WEBPACK_IMPORTED_MODULE_7__.p, - db: _styles_6aaf32cf_js__WEBPACK_IMPORTED_MODULE_7__.d, - renderer, - styles: _styles_6aaf32cf_js__WEBPACK_IMPORTED_MODULE_7__.s, - init: (cnf) => { - if (!cnf.state) { - cnf.state = {}; - } - cnf.state.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute; - _styles_6aaf32cf_js__WEBPACK_IMPORTED_MODULE_7__.d.clear(); - } -}; - - - -/***/ }), - -/***/ 27899: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ D: () => (/* binding */ DEFAULT_STATE_TYPE), -/* harmony export */ S: () => (/* binding */ STMT_RELATION), -/* harmony export */ a: () => (/* binding */ DIVIDER_TYPE), -/* harmony export */ b: () => (/* binding */ STMT_STATE), -/* harmony export */ c: () => (/* binding */ DEFAULT_NESTED_DOC_DIR), -/* harmony export */ d: () => (/* binding */ db), -/* harmony export */ p: () => (/* binding */ parser$1), -/* harmony export */ s: () => (/* binding */ styles) -/* harmony export */ }); -/* harmony import */ var _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(86079); - -var parser = function() { - var o = function(k, v, o2, l) { - for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) - ; - return o2; - }, $V0 = [1, 2], $V1 = [1, 3], $V2 = [1, 4], $V3 = [2, 4], $V4 = [1, 9], $V5 = [1, 11], $V6 = [1, 15], $V7 = [1, 16], $V8 = [1, 17], $V9 = [1, 18], $Va = [1, 30], $Vb = [1, 19], $Vc = [1, 20], $Vd = [1, 21], $Ve = [1, 22], $Vf = [1, 23], $Vg = [1, 25], $Vh = [1, 26], $Vi = [1, 27], $Vj = [1, 28], $Vk = [1, 29], $Vl = [1, 32], $Vm = [1, 33], $Vn = [1, 34], $Vo = [1, 35], $Vp = [1, 31], $Vq = [1, 4, 5, 15, 16, 18, 20, 21, 23, 24, 25, 26, 27, 28, 32, 34, 36, 37, 41, 44, 45, 46, 47, 50], $Vr = [1, 4, 5, 13, 14, 15, 16, 18, 20, 21, 23, 24, 25, 26, 27, 28, 32, 34, 36, 37, 41, 44, 45, 46, 47, 50], $Vs = [4, 5, 15, 16, 18, 20, 21, 23, 24, 25, 26, 27, 28, 32, 34, 36, 37, 41, 44, 45, 46, 47, 50]; - var parser2 = { - trace: function trace() { - }, - yy: {}, - symbols_: { "error": 2, "start": 3, "SPACE": 4, "NL": 5, "SD": 6, "document": 7, "line": 8, "statement": 9, "classDefStatement": 10, "cssClassStatement": 11, "idStatement": 12, "DESCR": 13, "-->": 14, "HIDE_EMPTY": 15, "scale": 16, "WIDTH": 17, "COMPOSIT_STATE": 18, "STRUCT_START": 19, "STRUCT_STOP": 20, "STATE_DESCR": 21, "AS": 22, "ID": 23, "FORK": 24, "JOIN": 25, "CHOICE": 26, "CONCURRENT": 27, "note": 28, "notePosition": 29, "NOTE_TEXT": 30, "direction": 31, "acc_title": 32, "acc_title_value": 33, "acc_descr": 34, "acc_descr_value": 35, "acc_descr_multiline_value": 36, "classDef": 37, "CLASSDEF_ID": 38, "CLASSDEF_STYLEOPTS": 39, "DEFAULT": 40, "class": 41, "CLASSENTITY_IDS": 42, "STYLECLASS": 43, "direction_tb": 44, "direction_bt": 45, "direction_rl": 46, "direction_lr": 47, "eol": 48, ";": 49, "EDGE_STATE": 50, "STYLE_SEPARATOR": 51, "left_of": 52, "right_of": 53, "$accept": 0, "$end": 1 }, - terminals_: { 2: "error", 4: "SPACE", 5: "NL", 6: "SD", 13: "DESCR", 14: "-->", 15: "HIDE_EMPTY", 16: "scale", 17: "WIDTH", 18: "COMPOSIT_STATE", 19: "STRUCT_START", 20: "STRUCT_STOP", 21: "STATE_DESCR", 22: "AS", 23: "ID", 24: "FORK", 25: "JOIN", 26: "CHOICE", 27: "CONCURRENT", 28: "note", 30: "NOTE_TEXT", 32: "acc_title", 33: "acc_title_value", 34: "acc_descr", 35: "acc_descr_value", 36: "acc_descr_multiline_value", 37: "classDef", 38: "CLASSDEF_ID", 39: "CLASSDEF_STYLEOPTS", 40: "DEFAULT", 41: "class", 42: "CLASSENTITY_IDS", 43: "STYLECLASS", 44: "direction_tb", 45: "direction_bt", 46: "direction_rl", 47: "direction_lr", 49: ";", 50: "EDGE_STATE", 51: "STYLE_SEPARATOR", 52: "left_of", 53: "right_of" }, - productions_: [0, [3, 2], [3, 2], [3, 2], [7, 0], [7, 2], [8, 2], [8, 1], [8, 1], [9, 1], [9, 1], [9, 1], [9, 2], [9, 3], [9, 4], [9, 1], [9, 2], [9, 1], [9, 4], [9, 3], [9, 6], [9, 1], [9, 1], [9, 1], [9, 1], [9, 4], [9, 4], [9, 1], [9, 2], [9, 2], [9, 1], [10, 3], [10, 3], [11, 3], [31, 1], [31, 1], [31, 1], [31, 1], [48, 1], [48, 1], [12, 1], [12, 1], [12, 3], [12, 3], [29, 1], [29, 1]], - performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { - var $0 = $$.length - 1; - switch (yystate) { - case 3: - yy.setRootDoc($$[$0]); - return $$[$0]; - case 4: - this.$ = []; - break; - case 5: - if ($$[$0] != "nl") { - $$[$0 - 1].push($$[$0]); - this.$ = $$[$0 - 1]; - } - break; - case 6: - case 7: - this.$ = $$[$0]; - break; - case 8: - this.$ = "nl"; - break; - case 11: - this.$ = $$[$0]; - break; - case 12: - const stateStmt = $$[$0 - 1]; - stateStmt.description = yy.trimColon($$[$0]); - this.$ = stateStmt; - break; - case 13: - this.$ = { stmt: "relation", state1: $$[$0 - 2], state2: $$[$0] }; - break; - case 14: - const relDescription = yy.trimColon($$[$0]); - this.$ = { stmt: "relation", state1: $$[$0 - 3], state2: $$[$0 - 1], description: relDescription }; - break; - case 18: - this.$ = { stmt: "state", id: $$[$0 - 3], type: "default", description: "", doc: $$[$0 - 1] }; - break; - case 19: - var id = $$[$0]; - var description = $$[$0 - 2].trim(); - if ($$[$0].match(":")) { - var parts = $$[$0].split(":"); - id = parts[0]; - description = [description, parts[1]]; - } - this.$ = { stmt: "state", id, type: "default", description }; - break; - case 20: - this.$ = { stmt: "state", id: $$[$0 - 3], type: "default", description: $$[$0 - 5], doc: $$[$0 - 1] }; - break; - case 21: - this.$ = { stmt: "state", id: $$[$0], type: "fork" }; - break; - case 22: - this.$ = { stmt: "state", id: $$[$0], type: "join" }; - break; - case 23: - this.$ = { stmt: "state", id: $$[$0], type: "choice" }; - break; - case 24: - this.$ = { stmt: "state", id: yy.getDividerId(), type: "divider" }; - break; - case 25: - this.$ = { stmt: "state", id: $$[$0 - 1].trim(), note: { position: $$[$0 - 2].trim(), text: $$[$0].trim() } }; - break; - case 28: - this.$ = $$[$0].trim(); - yy.setAccTitle(this.$); - break; - case 29: - case 30: - this.$ = $$[$0].trim(); - yy.setAccDescription(this.$); - break; - case 31: - case 32: - this.$ = { stmt: "classDef", id: $$[$0 - 1].trim(), classes: $$[$0].trim() }; - break; - case 33: - this.$ = { stmt: "applyClass", id: $$[$0 - 1].trim(), styleClass: $$[$0].trim() }; - break; - case 34: - yy.setDirection("TB"); - this.$ = { stmt: "dir", value: "TB" }; - break; - case 35: - yy.setDirection("BT"); - this.$ = { stmt: "dir", value: "BT" }; - break; - case 36: - yy.setDirection("RL"); - this.$ = { stmt: "dir", value: "RL" }; - break; - case 37: - yy.setDirection("LR"); - this.$ = { stmt: "dir", value: "LR" }; - break; - case 40: - case 41: - this.$ = { stmt: "state", id: $$[$0].trim(), type: "default", description: "" }; - break; - case 42: - this.$ = { stmt: "state", id: $$[$0 - 2].trim(), classes: [$$[$0].trim()], type: "default", description: "" }; - break; - case 43: - this.$ = { stmt: "state", id: $$[$0 - 2].trim(), classes: [$$[$0].trim()], type: "default", description: "" }; - break; - } - }, - table: [{ 3: 1, 4: $V0, 5: $V1, 6: $V2 }, { 1: [3] }, { 3: 5, 4: $V0, 5: $V1, 6: $V2 }, { 3: 6, 4: $V0, 5: $V1, 6: $V2 }, o([1, 4, 5, 15, 16, 18, 21, 23, 24, 25, 26, 27, 28, 32, 34, 36, 37, 41, 44, 45, 46, 47, 50], $V3, { 7: 7 }), { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 3], 4: $V4, 5: $V5, 8: 8, 9: 10, 10: 12, 11: 13, 12: 14, 15: $V6, 16: $V7, 18: $V8, 21: $V9, 23: $Va, 24: $Vb, 25: $Vc, 26: $Vd, 27: $Ve, 28: $Vf, 31: 24, 32: $Vg, 34: $Vh, 36: $Vi, 37: $Vj, 41: $Vk, 44: $Vl, 45: $Vm, 46: $Vn, 47: $Vo, 50: $Vp }, o($Vq, [2, 5]), { 9: 36, 10: 12, 11: 13, 12: 14, 15: $V6, 16: $V7, 18: $V8, 21: $V9, 23: $Va, 24: $Vb, 25: $Vc, 26: $Vd, 27: $Ve, 28: $Vf, 31: 24, 32: $Vg, 34: $Vh, 36: $Vi, 37: $Vj, 41: $Vk, 44: $Vl, 45: $Vm, 46: $Vn, 47: $Vo, 50: $Vp }, o($Vq, [2, 7]), o($Vq, [2, 8]), o($Vq, [2, 9]), o($Vq, [2, 10]), o($Vq, [2, 11], { 13: [1, 37], 14: [1, 38] }), o($Vq, [2, 15]), { 17: [1, 39] }, o($Vq, [2, 17], { 19: [1, 40] }), { 22: [1, 41] }, o($Vq, [2, 21]), o($Vq, [2, 22]), o($Vq, [2, 23]), o($Vq, [2, 24]), { 29: 42, 30: [1, 43], 52: [1, 44], 53: [1, 45] }, o($Vq, [2, 27]), { 33: [1, 46] }, { 35: [1, 47] }, o($Vq, [2, 30]), { 38: [1, 48], 40: [1, 49] }, { 42: [1, 50] }, o($Vr, [2, 40], { 51: [1, 51] }), o($Vr, [2, 41], { 51: [1, 52] }), o($Vq, [2, 34]), o($Vq, [2, 35]), o($Vq, [2, 36]), o($Vq, [2, 37]), o($Vq, [2, 6]), o($Vq, [2, 12]), { 12: 53, 23: $Va, 50: $Vp }, o($Vq, [2, 16]), o($Vs, $V3, { 7: 54 }), { 23: [1, 55] }, { 23: [1, 56] }, { 22: [1, 57] }, { 23: [2, 44] }, { 23: [2, 45] }, o($Vq, [2, 28]), o($Vq, [2, 29]), { 39: [1, 58] }, { 39: [1, 59] }, { 43: [1, 60] }, { 23: [1, 61] }, { 23: [1, 62] }, o($Vq, [2, 13], { 13: [1, 63] }), { 4: $V4, 5: $V5, 8: 8, 9: 10, 10: 12, 11: 13, 12: 14, 15: $V6, 16: $V7, 18: $V8, 20: [1, 64], 21: $V9, 23: $Va, 24: $Vb, 25: $Vc, 26: $Vd, 27: $Ve, 28: $Vf, 31: 24, 32: $Vg, 34: $Vh, 36: $Vi, 37: $Vj, 41: $Vk, 44: $Vl, 45: $Vm, 46: $Vn, 47: $Vo, 50: $Vp }, o($Vq, [2, 19], { 19: [1, 65] }), { 30: [1, 66] }, { 23: [1, 67] }, o($Vq, [2, 31]), o($Vq, [2, 32]), o($Vq, [2, 33]), o($Vr, [2, 42]), o($Vr, [2, 43]), o($Vq, [2, 14]), o($Vq, [2, 18]), o($Vs, $V3, { 7: 68 }), o($Vq, [2, 25]), o($Vq, [2, 26]), { 4: $V4, 5: $V5, 8: 8, 9: 10, 10: 12, 11: 13, 12: 14, 15: $V6, 16: $V7, 18: $V8, 20: [1, 69], 21: $V9, 23: $Va, 24: $Vb, 25: $Vc, 26: $Vd, 27: $Ve, 28: $Vf, 31: 24, 32: $Vg, 34: $Vh, 36: $Vi, 37: $Vj, 41: $Vk, 44: $Vl, 45: $Vm, 46: $Vn, 47: $Vo, 50: $Vp }, o($Vq, [2, 20])], - defaultActions: { 5: [2, 1], 6: [2, 2], 44: [2, 44], 45: [2, 45] }, - parseError: function parseError(str, hash) { - if (hash.recoverable) { - this.trace(str); - } else { - var error = new Error(str); - error.hash = hash; - throw error; - } - }, - parse: function parse(input) { - var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; - var args = lstack.slice.call(arguments, 1); - var lexer2 = Object.create(this.lexer); - var sharedState = { yy: {} }; - for (var k in this.yy) { - if (Object.prototype.hasOwnProperty.call(this.yy, k)) { - sharedState.yy[k] = this.yy[k]; - } - } - lexer2.setInput(input, sharedState.yy); - sharedState.yy.lexer = lexer2; - sharedState.yy.parser = this; - if (typeof lexer2.yylloc == "undefined") { - lexer2.yylloc = {}; - } - var yyloc = lexer2.yylloc; - lstack.push(yyloc); - var ranges = lexer2.options && lexer2.options.ranges; - if (typeof sharedState.yy.parseError === "function") { - this.parseError = sharedState.yy.parseError; - } else { - this.parseError = Object.getPrototypeOf(this).parseError; - } - function lex() { - var token; - token = tstack.pop() || lexer2.lex() || EOF; - if (typeof token !== "number") { - if (token instanceof Array) { - tstack = token; - token = tstack.pop(); - } - token = self.symbols_[token] || token; - } - return token; - } - var symbol, state, action, r, yyval = {}, p, len, newState, expected; - while (true) { - state = stack[stack.length - 1]; - if (this.defaultActions[state]) { - action = this.defaultActions[state]; - } else { - if (symbol === null || typeof symbol == "undefined") { - symbol = lex(); - } - action = table[state] && table[state][symbol]; - } - if (typeof action === "undefined" || !action.length || !action[0]) { - var errStr = ""; - expected = []; - for (p in table[state]) { - if (this.terminals_[p] && p > TERROR) { - expected.push("'" + this.terminals_[p] + "'"); - } - } - if (lexer2.showPosition) { - errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; - } else { - errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); - } - this.parseError(errStr, { - text: lexer2.match, - token: this.terminals_[symbol] || symbol, - line: lexer2.yylineno, - loc: yyloc, - expected - }); - } - if (action[0] instanceof Array && action.length > 1) { - throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); - } - switch (action[0]) { - case 1: - stack.push(symbol); - vstack.push(lexer2.yytext); - lstack.push(lexer2.yylloc); - stack.push(action[1]); - symbol = null; - { - yyleng = lexer2.yyleng; - yytext = lexer2.yytext; - yylineno = lexer2.yylineno; - yyloc = lexer2.yylloc; - } - break; - case 2: - len = this.productions_[action[1]][1]; - yyval.$ = vstack[vstack.length - len]; - yyval._$ = { - first_line: lstack[lstack.length - (len || 1)].first_line, - last_line: lstack[lstack.length - 1].last_line, - first_column: lstack[lstack.length - (len || 1)].first_column, - last_column: lstack[lstack.length - 1].last_column - }; - if (ranges) { - yyval._$.range = [ - lstack[lstack.length - (len || 1)].range[0], - lstack[lstack.length - 1].range[1] - ]; - } - r = this.performAction.apply(yyval, [ - yytext, - yyleng, - yylineno, - sharedState.yy, - action[1], - vstack, - lstack - ].concat(args)); - if (typeof r !== "undefined") { - return r; - } - if (len) { - stack = stack.slice(0, -1 * len * 2); - vstack = vstack.slice(0, -1 * len); - lstack = lstack.slice(0, -1 * len); - } - stack.push(this.productions_[action[1]][0]); - vstack.push(yyval.$); - lstack.push(yyval._$); - newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; - stack.push(newState); - break; - case 3: - return true; - } - } - return true; - } - }; - var lexer = function() { - var lexer2 = { - EOF: 1, - parseError: function parseError(str, hash) { - if (this.yy.parser) { - this.yy.parser.parseError(str, hash); - } else { - throw new Error(str); - } - }, - // resets the lexer, sets new input - setInput: function(input, yy) { - this.yy = yy || this.yy || {}; - this._input = input; - this._more = this._backtrack = this.done = false; - this.yylineno = this.yyleng = 0; - this.yytext = this.matched = this.match = ""; - this.conditionStack = ["INITIAL"]; - this.yylloc = { - first_line: 1, - first_column: 0, - last_line: 1, - last_column: 0 - }; - if (this.options.ranges) { - this.yylloc.range = [0, 0]; - } - this.offset = 0; - return this; - }, - // consumes and returns one char from the input - input: function() { - var ch = this._input[0]; - this.yytext += ch; - this.yyleng++; - this.offset++; - this.match += ch; - this.matched += ch; - var lines = ch.match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno++; - this.yylloc.last_line++; - } else { - this.yylloc.last_column++; - } - if (this.options.ranges) { - this.yylloc.range[1]++; - } - this._input = this._input.slice(1); - return ch; - }, - // unshifts one char (or a string) into the input - unput: function(ch) { - var len = ch.length; - var lines = ch.split(/(?:\r\n?|\n)/g); - this._input = ch + this._input; - this.yytext = this.yytext.substr(0, this.yytext.length - len); - this.offset -= len; - var oldLines = this.match.split(/(?:\r\n?|\n)/g); - this.match = this.match.substr(0, this.match.length - 1); - this.matched = this.matched.substr(0, this.matched.length - 1); - if (lines.length - 1) { - this.yylineno -= lines.length - 1; - } - var r = this.yylloc.range; - this.yylloc = { - first_line: this.yylloc.first_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.first_column, - last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len - }; - if (this.options.ranges) { - this.yylloc.range = [r[0], r[0] + this.yyleng - len]; - } - this.yyleng = this.yytext.length; - return this; - }, - // When called from action, caches matched text and appends it on next action - more: function() { - this._more = true; - return this; - }, - // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. - reject: function() { - if (this.options.backtrack_lexer) { - this._backtrack = true; - } else { - return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), { - text: "", - token: null, - line: this.yylineno - }); - } - return this; - }, - // retain first n characters of the match - less: function(n) { - this.unput(this.match.slice(n)); - }, - // displays already matched input, i.e. for error messages - pastInput: function() { - var past = this.matched.substr(0, this.matched.length - this.match.length); - return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); - }, - // displays upcoming input, i.e. for error messages - upcomingInput: function() { - var next = this.match; - if (next.length < 20) { - next += this._input.substr(0, 20 - next.length); - } - return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); - }, - // displays the character position where the lexing error occurred, i.e. for error messages - showPosition: function() { - var pre = this.pastInput(); - var c = new Array(pre.length + 1).join("-"); - return pre + this.upcomingInput() + "\n" + c + "^"; - }, - // test the lexed token: return FALSE when not a match, otherwise return token - test_match: function(match, indexed_rule) { - var token, lines, backup; - if (this.options.backtrack_lexer) { - backup = { - yylineno: this.yylineno, - yylloc: { - first_line: this.yylloc.first_line, - last_line: this.last_line, - first_column: this.yylloc.first_column, - last_column: this.yylloc.last_column - }, - yytext: this.yytext, - match: this.match, - matches: this.matches, - matched: this.matched, - yyleng: this.yyleng, - offset: this.offset, - _more: this._more, - _input: this._input, - yy: this.yy, - conditionStack: this.conditionStack.slice(0), - done: this.done - }; - if (this.options.ranges) { - backup.yylloc.range = this.yylloc.range.slice(0); - } - } - lines = match[0].match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno += lines.length; - } - this.yylloc = { - first_line: this.yylloc.last_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.last_column, - last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length - }; - this.yytext += match[0]; - this.match += match[0]; - this.matches = match; - this.yyleng = this.yytext.length; - if (this.options.ranges) { - this.yylloc.range = [this.offset, this.offset += this.yyleng]; - } - this._more = false; - this._backtrack = false; - this._input = this._input.slice(match[0].length); - this.matched += match[0]; - token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); - if (this.done && this._input) { - this.done = false; - } - if (token) { - return token; - } else if (this._backtrack) { - for (var k in backup) { - this[k] = backup[k]; - } - return false; - } - return false; - }, - // return next match in input - next: function() { - if (this.done) { - return this.EOF; - } - if (!this._input) { - this.done = true; - } - var token, match, tempMatch, index; - if (!this._more) { - this.yytext = ""; - this.match = ""; - } - var rules = this._currentRules(); - for (var i = 0; i < rules.length; i++) { - tempMatch = this._input.match(this.rules[rules[i]]); - if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { - match = tempMatch; - index = i; - if (this.options.backtrack_lexer) { - token = this.test_match(tempMatch, rules[i]); - if (token !== false) { - return token; - } else if (this._backtrack) { - match = false; - continue; - } else { - return false; - } - } else if (!this.options.flex) { - break; - } - } - } - if (match) { - token = this.test_match(match, rules[index]); - if (token !== false) { - return token; - } - return false; - } - if (this._input === "") { - return this.EOF; - } else { - return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { - text: "", - token: null, - line: this.yylineno - }); - } - }, - // return next match that has a token - lex: function lex() { - var r = this.next(); - if (r) { - return r; - } else { - return this.lex(); - } - }, - // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) - begin: function begin(condition) { - this.conditionStack.push(condition); - }, - // pop the previously active lexer condition state off the condition stack - popState: function popState() { - var n = this.conditionStack.length - 1; - if (n > 0) { - return this.conditionStack.pop(); - } else { - return this.conditionStack[0]; - } - }, - // produce the lexer rule set which is active for the currently active lexer condition state - _currentRules: function _currentRules() { - if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { - return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; - } else { - return this.conditions["INITIAL"].rules; - } - }, - // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available - topState: function topState(n) { - n = this.conditionStack.length - 1 - Math.abs(n || 0); - if (n >= 0) { - return this.conditionStack[n]; - } else { - return "INITIAL"; - } - }, - // alias for begin(condition) - pushState: function pushState(condition) { - this.begin(condition); - }, - // return the number of states currently on the stack - stateStackSize: function stateStackSize() { - return this.conditionStack.length; - }, - options: { "case-insensitive": true }, - performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { - switch ($avoiding_name_collisions) { - case 0: - return 40; - case 1: - return 44; - case 2: - return 45; - case 3: - return 46; - case 4: - return 47; - case 5: - break; - case 6: - break; - case 7: - return 5; - case 8: - break; - case 9: - break; - case 10: - break; - case 11: - break; - case 12: - this.pushState("SCALE"); - return 16; - case 13: - return 17; - case 14: - this.popState(); - break; - case 15: - this.begin("acc_title"); - return 32; - case 16: - this.popState(); - return "acc_title_value"; - case 17: - this.begin("acc_descr"); - return 34; - case 18: - this.popState(); - return "acc_descr_value"; - case 19: - this.begin("acc_descr_multiline"); - break; - case 20: - this.popState(); - break; - case 21: - return "acc_descr_multiline_value"; - case 22: - this.pushState("CLASSDEF"); - return 37; - case 23: - this.popState(); - this.pushState("CLASSDEFID"); - return "DEFAULT_CLASSDEF_ID"; - case 24: - this.popState(); - this.pushState("CLASSDEFID"); - return 38; - case 25: - this.popState(); - return 39; - case 26: - this.pushState("CLASS"); - return 41; - case 27: - this.popState(); - this.pushState("CLASS_STYLE"); - return 42; - case 28: - this.popState(); - return 43; - case 29: - this.pushState("SCALE"); - return 16; - case 30: - return 17; - case 31: - this.popState(); - break; - case 32: - this.pushState("STATE"); - break; - case 33: - this.popState(); - yy_.yytext = yy_.yytext.slice(0, -8).trim(); - return 24; - case 34: - this.popState(); - yy_.yytext = yy_.yytext.slice(0, -8).trim(); - return 25; - case 35: - this.popState(); - yy_.yytext = yy_.yytext.slice(0, -10).trim(); - return 26; - case 36: - this.popState(); - yy_.yytext = yy_.yytext.slice(0, -8).trim(); - return 24; - case 37: - this.popState(); - yy_.yytext = yy_.yytext.slice(0, -8).trim(); - return 25; - case 38: - this.popState(); - yy_.yytext = yy_.yytext.slice(0, -10).trim(); - return 26; - case 39: - return 44; - case 40: - return 45; - case 41: - return 46; - case 42: - return 47; - case 43: - this.pushState("STATE_STRING"); - break; - case 44: - this.pushState("STATE_ID"); - return "AS"; - case 45: - this.popState(); - return "ID"; - case 46: - this.popState(); - break; - case 47: - return "STATE_DESCR"; - case 48: - return 18; - case 49: - this.popState(); - break; - case 50: - this.popState(); - this.pushState("struct"); - return 19; - case 51: - break; - case 52: - this.popState(); - return 20; - case 53: - break; - case 54: - this.begin("NOTE"); - return 28; - case 55: - this.popState(); - this.pushState("NOTE_ID"); - return 52; - case 56: - this.popState(); - this.pushState("NOTE_ID"); - return 53; - case 57: - this.popState(); - this.pushState("FLOATING_NOTE"); - break; - case 58: - this.popState(); - this.pushState("FLOATING_NOTE_ID"); - return "AS"; - case 59: - break; - case 60: - return "NOTE_TEXT"; - case 61: - this.popState(); - return "ID"; - case 62: - this.popState(); - this.pushState("NOTE_TEXT"); - return 23; - case 63: - this.popState(); - yy_.yytext = yy_.yytext.substr(2).trim(); - return 30; - case 64: - this.popState(); - yy_.yytext = yy_.yytext.slice(0, -8).trim(); - return 30; - case 65: - return 6; - case 66: - return 6; - case 67: - return 15; - case 68: - return 50; - case 69: - return 23; - case 70: - yy_.yytext = yy_.yytext.trim(); - return 13; - case 71: - return 14; - case 72: - return 27; - case 73: - return 51; - case 74: - return 5; - case 75: - return "INVALID"; - } - }, - rules: [/^(?:default\b)/i, /^(?:.*direction\s+TB[^\n]*)/i, /^(?:.*direction\s+BT[^\n]*)/i, /^(?:.*direction\s+RL[^\n]*)/i, /^(?:.*direction\s+LR[^\n]*)/i, /^(?:%%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[\n]+)/i, /^(?:[\s]+)/i, /^(?:((?!\n)\s)+)/i, /^(?:#[^\n]*)/i, /^(?:%[^\n]*)/i, /^(?:scale\s+)/i, /^(?:\d+)/i, /^(?:\s+width\b)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:classDef\s+)/i, /^(?:DEFAULT\s+)/i, /^(?:\w+\s+)/i, /^(?:[^\n]*)/i, /^(?:class\s+)/i, /^(?:(\w+)+((,\s*\w+)*))/i, /^(?:[^\n]*)/i, /^(?:scale\s+)/i, /^(?:\d+)/i, /^(?:\s+width\b)/i, /^(?:state\s+)/i, /^(?:.*<>)/i, /^(?:.*<>)/i, /^(?:.*<>)/i, /^(?:.*\[\[fork\]\])/i, /^(?:.*\[\[join\]\])/i, /^(?:.*\[\[choice\]\])/i, /^(?:.*direction\s+TB[^\n]*)/i, /^(?:.*direction\s+BT[^\n]*)/i, /^(?:.*direction\s+RL[^\n]*)/i, /^(?:.*direction\s+LR[^\n]*)/i, /^(?:["])/i, /^(?:\s*as\s+)/i, /^(?:[^\n\{]*)/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:[^\n\s\{]+)/i, /^(?:\n)/i, /^(?:\{)/i, /^(?:%%(?!\{)[^\n]*)/i, /^(?:\})/i, /^(?:[\n])/i, /^(?:note\s+)/i, /^(?:left of\b)/i, /^(?:right of\b)/i, /^(?:")/i, /^(?:\s*as\s*)/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:[^\n]*)/i, /^(?:\s*[^:\n\s\-]+)/i, /^(?:\s*:[^:\n;]+)/i, /^(?:[\s\S]*?end note\b)/i, /^(?:stateDiagram\s+)/i, /^(?:stateDiagram-v2\s+)/i, /^(?:hide empty description\b)/i, /^(?:\[\*\])/i, /^(?:[^:\n\s\-\{]+)/i, /^(?:\s*:[^:\n;]+)/i, /^(?:-->)/i, /^(?:--)/i, /^(?::::)/i, /^(?:$)/i, /^(?:.)/i], - conditions: { "LINE": { "rules": [9, 10], "inclusive": false }, "struct": { "rules": [9, 10, 22, 26, 32, 39, 40, 41, 42, 51, 52, 53, 54, 68, 69, 70, 71, 72], "inclusive": false }, "FLOATING_NOTE_ID": { "rules": [61], "inclusive": false }, "FLOATING_NOTE": { "rules": [58, 59, 60], "inclusive": false }, "NOTE_TEXT": { "rules": [63, 64], "inclusive": false }, "NOTE_ID": { "rules": [62], "inclusive": false }, "NOTE": { "rules": [55, 56, 57], "inclusive": false }, "CLASS_STYLE": { "rules": [28], "inclusive": false }, "CLASS": { "rules": [27], "inclusive": false }, "CLASSDEFID": { "rules": [25], "inclusive": false }, "CLASSDEF": { "rules": [23, 24], "inclusive": false }, "acc_descr_multiline": { "rules": [20, 21], "inclusive": false }, "acc_descr": { "rules": [18], "inclusive": false }, "acc_title": { "rules": [16], "inclusive": false }, "SCALE": { "rules": [13, 14, 30, 31], "inclusive": false }, "ALIAS": { "rules": [], "inclusive": false }, "STATE_ID": { "rules": [45], "inclusive": false }, "STATE_STRING": { "rules": [46, 47], "inclusive": false }, "FORK_STATE": { "rules": [], "inclusive": false }, "STATE": { "rules": [9, 10, 33, 34, 35, 36, 37, 38, 43, 44, 48, 49, 50], "inclusive": false }, "ID": { "rules": [9, 10], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 15, 17, 19, 22, 26, 29, 32, 50, 54, 65, 66, 67, 68, 69, 70, 71, 73, 74, 75], "inclusive": true } } - }; - return lexer2; - }(); - parser2.lexer = lexer; - function Parser() { - this.yy = {}; - } - Parser.prototype = parser2; - parser2.Parser = Parser; - return new Parser(); -}(); -parser.parser = parser; -const parser$1 = parser; -const DEFAULT_DIAGRAM_DIRECTION = "LR"; -const DEFAULT_NESTED_DOC_DIR = "TB"; -const STMT_STATE = "state"; -const STMT_RELATION = "relation"; -const STMT_CLASSDEF = "classDef"; -const STMT_APPLYCLASS = "applyClass"; -const DEFAULT_STATE_TYPE = "default"; -const DIVIDER_TYPE = "divider"; -const START_NODE = "[*]"; -const START_TYPE = "start"; -const END_NODE = START_NODE; -const END_TYPE = "end"; -const COLOR_KEYWORD = "color"; -const FILL_KEYWORD = "fill"; -const BG_FILL = "bgFill"; -const STYLECLASS_SEP = ","; -function newClassesList() { - return {}; -} -let direction = DEFAULT_DIAGRAM_DIRECTION; -let rootDoc = []; -let classes = newClassesList(); -const newDoc = () => { - return { - relations: [], - states: {}, - documents: {} - }; -}; -let documents = { - root: newDoc() -}; -let currentDocument = documents.root; -let startEndCount = 0; -let dividerCnt = 0; -const lineType = { - LINE: 0, - DOTTED_LINE: 1 -}; -const relationType = { - AGGREGATION: 0, - EXTENSION: 1, - COMPOSITION: 2, - DEPENDENCY: 3 -}; -const clone = (o) => JSON.parse(JSON.stringify(o)); -const setRootDoc = (o) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_0__.l.info("Setting root doc", o); - rootDoc = o; -}; -const getRootDoc = () => rootDoc; -const docTranslator = (parent, node, first) => { - if (node.stmt === STMT_RELATION) { - docTranslator(parent, node.state1, true); - docTranslator(parent, node.state2, false); - } else { - if (node.stmt === STMT_STATE) { - if (node.id === "[*]") { - node.id = first ? parent.id + "_start" : parent.id + "_end"; - node.start = first; - } else { - node.id = node.id.trim(); - } - } - if (node.doc) { - const doc = []; - let currentDoc = []; - let i; - for (i = 0; i < node.doc.length; i++) { - if (node.doc[i].type === DIVIDER_TYPE) { - const newNode = clone(node.doc[i]); - newNode.doc = clone(currentDoc); - doc.push(newNode); - currentDoc = []; - } else { - currentDoc.push(node.doc[i]); - } - } - if (doc.length > 0 && currentDoc.length > 0) { - const newNode = { - stmt: STMT_STATE, - id: (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_0__.I)(), - type: "divider", - doc: clone(currentDoc) - }; - doc.push(clone(newNode)); - node.doc = doc; - } - node.doc.forEach((docNode) => docTranslator(node, docNode, true)); - } - } -}; -const getRootDocV2 = () => { - docTranslator({ id: "root" }, { id: "root", doc: rootDoc }, true); - return { id: "root", doc: rootDoc }; -}; -const extract = (_doc) => { - let doc; - if (_doc.doc) { - doc = _doc.doc; - } else { - doc = _doc; - } - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_0__.l.info(doc); - clear(true); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_0__.l.info("Extract", doc); - doc.forEach((item) => { - switch (item.stmt) { - case STMT_STATE: - addState( - item.id.trim(), - item.type, - item.doc, - item.description, - item.note, - item.classes, - item.styles, - item.textStyles - ); - break; - case STMT_RELATION: - addRelation(item.state1, item.state2, item.description); - break; - case STMT_CLASSDEF: - addStyleClass(item.id.trim(), item.classes); - break; - case STMT_APPLYCLASS: - setCssClass(item.id.trim(), item.styleClass); - break; - } - }); -}; -const addState = function(id, type = DEFAULT_STATE_TYPE, doc = null, descr = null, note = null, classes2 = null, styles2 = null, textStyles = null) { - const trimmedId = id == null ? void 0 : id.trim(); - if (currentDocument.states[trimmedId] === void 0) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_0__.l.info("Adding state ", trimmedId, descr); - currentDocument.states[trimmedId] = { - id: trimmedId, - descriptions: [], - type, - doc, - note, - classes: [], - styles: [], - textStyles: [] - }; - } else { - if (!currentDocument.states[trimmedId].doc) { - currentDocument.states[trimmedId].doc = doc; - } - if (!currentDocument.states[trimmedId].type) { - currentDocument.states[trimmedId].type = type; - } - } - if (descr) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_0__.l.info("Setting state description", trimmedId, descr); - if (typeof descr === "string") { - addDescription(trimmedId, descr.trim()); - } - if (typeof descr === "object") { - descr.forEach((des) => addDescription(trimmedId, des.trim())); - } - } - if (note) { - currentDocument.states[trimmedId].note = note; - currentDocument.states[trimmedId].note.text = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_0__.e.sanitizeText( - currentDocument.states[trimmedId].note.text, - (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_0__.c)() - ); - } - if (classes2) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_0__.l.info("Setting state classes", trimmedId, classes2); - const classesList = typeof classes2 === "string" ? [classes2] : classes2; - classesList.forEach((cssClass) => setCssClass(trimmedId, cssClass.trim())); - } - if (styles2) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_0__.l.info("Setting state styles", trimmedId, styles2); - const stylesList = typeof styles2 === "string" ? [styles2] : styles2; - stylesList.forEach((style) => setStyle(trimmedId, style.trim())); - } - if (textStyles) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_0__.l.info("Setting state styles", trimmedId, styles2); - const textStylesList = typeof textStyles === "string" ? [textStyles] : textStyles; - textStylesList.forEach((textStyle) => setTextStyle(trimmedId, textStyle.trim())); - } -}; -const clear = function(saveCommon) { - documents = { - root: newDoc() - }; - currentDocument = documents.root; - startEndCount = 0; - classes = newClassesList(); - if (!saveCommon) { - (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_0__.v)(); - } -}; -const getState = function(id) { - return currentDocument.states[id]; -}; -const getStates = function() { - return currentDocument.states; -}; -const logDocuments = function() { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_0__.l.info("Documents = ", documents); -}; -const getRelations = function() { - return currentDocument.relations; -}; -function startIdIfNeeded(id = "") { - let fixedId = id; - if (id === START_NODE) { - startEndCount++; - fixedId = `${START_TYPE}${startEndCount}`; - } - return fixedId; -} -function startTypeIfNeeded(id = "", type = DEFAULT_STATE_TYPE) { - return id === START_NODE ? START_TYPE : type; -} -function endIdIfNeeded(id = "") { - let fixedId = id; - if (id === END_NODE) { - startEndCount++; - fixedId = `${END_TYPE}${startEndCount}`; - } - return fixedId; -} -function endTypeIfNeeded(id = "", type = DEFAULT_STATE_TYPE) { - return id === END_NODE ? END_TYPE : type; -} -function addRelationObjs(item1, item2, relationTitle) { - let id1 = startIdIfNeeded(item1.id.trim()); - let type1 = startTypeIfNeeded(item1.id.trim(), item1.type); - let id2 = startIdIfNeeded(item2.id.trim()); - let type2 = startTypeIfNeeded(item2.id.trim(), item2.type); - addState( - id1, - type1, - item1.doc, - item1.description, - item1.note, - item1.classes, - item1.styles, - item1.textStyles - ); - addState( - id2, - type2, - item2.doc, - item2.description, - item2.note, - item2.classes, - item2.styles, - item2.textStyles - ); - currentDocument.relations.push({ - id1, - id2, - relationTitle: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_0__.e.sanitizeText(relationTitle, (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_0__.c)()) - }); -} -const addRelation = function(item1, item2, title) { - if (typeof item1 === "object") { - addRelationObjs(item1, item2, title); - } else { - const id1 = startIdIfNeeded(item1.trim()); - const type1 = startTypeIfNeeded(item1); - const id2 = endIdIfNeeded(item2.trim()); - const type2 = endTypeIfNeeded(item2); - addState(id1, type1); - addState(id2, type2); - currentDocument.relations.push({ - id1, - id2, - title: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_0__.e.sanitizeText(title, (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_0__.c)()) - }); - } -}; -const addDescription = function(id, descr) { - const theState = currentDocument.states[id]; - const _descr = descr.startsWith(":") ? descr.replace(":", "").trim() : descr; - theState.descriptions.push(_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_0__.e.sanitizeText(_descr, (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_0__.c)())); -}; -const cleanupLabel = function(label) { - if (label.substring(0, 1) === ":") { - return label.substr(2).trim(); - } else { - return label.trim(); - } -}; -const getDividerId = () => { - dividerCnt++; - return "divider-id-" + dividerCnt; -}; -const addStyleClass = function(id, styleAttributes = "") { - if (classes[id] === void 0) { - classes[id] = { id, styles: [], textStyles: [] }; - } - const foundClass = classes[id]; - if (styleAttributes !== void 0 && styleAttributes !== null) { - styleAttributes.split(STYLECLASS_SEP).forEach((attrib) => { - const fixedAttrib = attrib.replace(/([^;]*);/, "$1").trim(); - if (attrib.match(COLOR_KEYWORD)) { - const newStyle1 = fixedAttrib.replace(FILL_KEYWORD, BG_FILL); - const newStyle2 = newStyle1.replace(COLOR_KEYWORD, FILL_KEYWORD); - foundClass.textStyles.push(newStyle2); - } - foundClass.styles.push(fixedAttrib); - }); - } -}; -const getClasses = function() { - return classes; -}; -const setCssClass = function(itemIds, cssClassName) { - itemIds.split(",").forEach(function(id) { - let foundState = getState(id); - if (foundState === void 0) { - const trimmedId = id.trim(); - addState(trimmedId); - foundState = getState(trimmedId); - } - foundState.classes.push(cssClassName); - }); -}; -const setStyle = function(itemId, styleText) { - const item = getState(itemId); - if (item !== void 0) { - item.textStyles.push(styleText); - } -}; -const setTextStyle = function(itemId, cssClassName) { - const item = getState(itemId); - if (item !== void 0) { - item.textStyles.push(cssClassName); - } -}; -const getDirection = () => direction; -const setDirection = (dir) => { - direction = dir; -}; -const trimColon = (str) => str && str[0] === ":" ? str.substr(1).trim() : str.trim(); -const db = { - getConfig: () => (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_0__.c)().state, - addState, - clear, - getState, - getStates, - getRelations, - getClasses, - getDirection, - addRelation, - getDividerId, - setDirection, - cleanupLabel, - lineType, - relationType, - logDocuments, - getRootDoc, - setRootDoc, - getRootDocV2, - extract, - trimColon, - getAccTitle: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_0__.g, - setAccTitle: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_0__.s, - getAccDescription: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_0__.a, - setAccDescription: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_0__.b, - addStyleClass, - setCssClass, - addDescription, - setDiagramTitle: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_0__.q, - getDiagramTitle: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_0__.t -}; -const getStyles = (options) => ` -defs #statediagram-barbEnd { - fill: ${options.transitionColor}; - stroke: ${options.transitionColor}; - } -g.stateGroup text { - fill: ${options.nodeBorder}; - stroke: none; - font-size: 10px; -} -g.stateGroup text { - fill: ${options.textColor}; - stroke: none; - font-size: 10px; - -} -g.stateGroup .state-title { - font-weight: bolder; - fill: ${options.stateLabelColor}; -} - -g.stateGroup rect { - fill: ${options.mainBkg}; - stroke: ${options.nodeBorder}; -} - -g.stateGroup line { - stroke: ${options.lineColor}; - stroke-width: 1; -} - -.transition { - stroke: ${options.transitionColor}; - stroke-width: 1; - fill: none; -} - -.stateGroup .composit { - fill: ${options.background}; - border-bottom: 1px -} - -.stateGroup .alt-composit { - fill: #e0e0e0; - border-bottom: 1px -} - -.state-note { - stroke: ${options.noteBorderColor}; - fill: ${options.noteBkgColor}; - - text { - fill: ${options.noteTextColor}; - stroke: none; - font-size: 10px; - } -} - -.stateLabel .box { - stroke: none; - stroke-width: 0; - fill: ${options.mainBkg}; - opacity: 0.5; -} - -.edgeLabel .label rect { - fill: ${options.labelBackgroundColor}; - opacity: 0.5; -} -.edgeLabel .label text { - fill: ${options.transitionLabelColor || options.tertiaryTextColor}; -} -.label div .edgeLabel { - color: ${options.transitionLabelColor || options.tertiaryTextColor}; -} - -.stateLabel text { - fill: ${options.stateLabelColor}; - font-size: 10px; - font-weight: bold; -} - -.node circle.state-start { - fill: ${options.specialStateColor}; - stroke: ${options.specialStateColor}; -} - -.node .fork-join { - fill: ${options.specialStateColor}; - stroke: ${options.specialStateColor}; -} - -.node circle.state-end { - fill: ${options.innerEndBackground}; - stroke: ${options.background}; - stroke-width: 1.5 -} -.end-state-inner { - fill: ${options.compositeBackground || options.background}; - // stroke: ${options.background}; - stroke-width: 1.5 -} - -.node rect { - fill: ${options.stateBkg || options.mainBkg}; - stroke: ${options.stateBorder || options.nodeBorder}; - stroke-width: 1px; -} -.node polygon { - fill: ${options.mainBkg}; - stroke: ${options.stateBorder || options.nodeBorder};; - stroke-width: 1px; -} -#statediagram-barbEnd { - fill: ${options.lineColor}; -} - -.statediagram-cluster rect { - fill: ${options.compositeTitleBackground}; - stroke: ${options.stateBorder || options.nodeBorder}; - stroke-width: 1px; -} - -.cluster-label, .nodeLabel { - color: ${options.stateLabelColor}; -} - -.statediagram-cluster rect.outer { - rx: 5px; - ry: 5px; -} -.statediagram-state .divider { - stroke: ${options.stateBorder || options.nodeBorder}; -} - -.statediagram-state .title-state { - rx: 5px; - ry: 5px; -} -.statediagram-cluster.statediagram-cluster .inner { - fill: ${options.compositeBackground || options.background}; -} -.statediagram-cluster.statediagram-cluster-alt .inner { - fill: ${options.altBackground ? options.altBackground : "#efefef"}; -} - -.statediagram-cluster .inner { - rx:0; - ry:0; -} - -.statediagram-state rect.basic { - rx: 5px; - ry: 5px; -} -.statediagram-state rect.divider { - stroke-dasharray: 10,10; - fill: ${options.altBackground ? options.altBackground : "#efefef"}; -} - -.note-edge { - stroke-dasharray: 5; -} - -.statediagram-note rect { - fill: ${options.noteBkgColor}; - stroke: ${options.noteBorderColor}; - stroke-width: 1px; - rx: 0; - ry: 0; -} -.statediagram-note rect { - fill: ${options.noteBkgColor}; - stroke: ${options.noteBorderColor}; - stroke-width: 1px; - rx: 0; - ry: 0; -} - -.statediagram-note text { - fill: ${options.noteTextColor}; -} - -.statediagram-note .nodeLabel { - color: ${options.noteTextColor}; -} -.statediagram .edgeLabel { - color: red; // ${options.noteTextColor}; -} - -#dependencyStart, #dependencyEnd { - fill: ${options.lineColor}; - stroke: ${options.lineColor}; - stroke-width: 1; -} - -.statediagramTitleText { - text-anchor: middle; - font-size: 18px; - fill: ${options.textColor}; -} -`; -const styles = getStyles; - - - -/***/ }) - -}; -; \ No newline at end of file diff --git a/assets/js/1646726c.53344b10.js b/assets/js/1646726c.53344b10.js new file mode 100644 index 000000000000..f0d949781525 --- /dev/null +++ b/assets/js/1646726c.53344b10.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3266],{7244:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>l,default:()=>u,frontMatter:()=>r,metadata:()=>a,toc:()=>h});const a=JSON.parse('{"id":"learn/learn-staking","title":"Introduction to Staking","description":"Overview of Staking and NPoS on Polkadot.","source":"@site/../docs/learn/learn-staking.md","sourceDirName":"learn","slug":"/learn-staking","permalink":"/docs/learn-staking","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-staking.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1727168669000,"frontMatter":{"id":"learn-staking","title":"Introduction to Staking","sidebar_label":"Introduction to Staking","description":"Overview of Staking and NPoS on Polkadot.","keywords":["staking","stake","nominate","nominating","NPoS","faq"],"slug":"../learn-staking"},"sidebar":"docs","previous":{"title":"Staking","permalink":"/docs/learn-staking-index"},"next":{"title":"Nomination Pools","permalink":"/docs/learn-nomination-pools"}}');var o=t(74848),i=t(28453),s=t(67141);const r={id:"learn-staking",title:"Introduction to Staking",sidebar_label:"Introduction to Staking",description:"Overview of Staking and NPoS on Polkadot.",keywords:["staking","stake","nominate","nominating","NPoS","faq"],slug:"../learn-staking"},l=void 0,d={},h=[{value:"Proof-of-Stake (PoS)",id:"proof-of-stake-pos",level:2},{value:"Nominated Proof-of-Stake (NPoS)",id:"nominated-proof-of-stake-npos",level:2},{value:"Nominating Validators",id:"nominating-validators",level:3},{value:"Eras and Sessions",id:"eras-and-sessions",level:3},{value:"Staking Rewards",id:"staking-rewards",level:3},{value:"Skin in the game when Staking",id:"skin-in-the-game-when-staking",level:3},{value:"Being a Nominator",id:"being-a-nominator",level:2},{value:"Tasks and Responsibilities of a Nominator",id:"tasks-and-responsibilities-of-a-nominator",level:3},{value:"Selection of Validators",id:"selection-of-validators",level:3},{value:"Validator Selection Criteria",id:"validator-selection-criteria",level:4},{value:"Network Providers",id:"network-providers",level:4},{value:"Keeping Track of Nominated Validators",id:"keeping-track-of-nominated-validators",level:4},{value:"Stash Account and Staking Proxy",id:"stash-account-and-staking-proxy",level:3},{value:"Claiming Staking Rewards",id:"claiming-staking-rewards",level:3},{value:"Chilling",id:"chilling",level:3},{value:"Fast Unstake",id:"fast-unstake",level:3},{value:"Why and Why not to Stake?",id:"why-and-why-not-to-stake",level:2},{value:"Pros of Staking",id:"pros-of-staking",level:3},{value:"Cons of Staking",id:"cons-of-staking",level:3},{value:"Unbonding Period Length",id:"unbonding-period-length",level:4},{value:"How many Validators?",id:"how-many-validators",level:2},{value:"Why am I not receiving rewards?",id:"why-am-i-not-receiving-rewards",level:2},{value:"Staking FAQ",id:"staking-faq",level:2},{value:"Resources",id:"resources",level:2}];function c(e){const n={a:"a",admonition:"admonition",em:"em",h2:"h2",h3:"h3",h4:"h4",hr:"hr",img:"img",li:"li",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,i.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(s.A,{message:"Nomination Pools are evolving!\nSoon you'll be able to participate in a pool and in OpenGov with your pooled funds!\nYou do not need to do anything, unless you are participating in a pool and also staking solo from the same account. In this case, please check [this article](https://support.polkadot.network/support/solutions/articles/65000188140-changes-for-nomination-pool-members-and-opengov-participation) on the actions you need to take as soon as possible."}),"\n",(0,o.jsx)(n.admonition,{title:"New to Staking?",type:"tip",children:(0,o.jsxs)(n.p,{children:["Explore Polkadot with a secure and user-friendly wallets listed on the\n",(0,o.jsx)(n.a,{href:"https://www.polkadot.network/ecosystem/wallets/",children:"Polkadot website"})," and start your staking journey\nor explore more information about staking on\n",(0,o.jsx)(n.a,{href:"https://polkadot.network/staking/",children:"Polkadot's Staking Page"}),". Discover the new\n",(0,o.jsx)(n.a,{href:"https://staking.polkadot.cloud/#/overview",children:"Staking Dashboard"})," that makes staking much easier and\ncheck this\n",(0,o.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000182104",children:"extensive article list"})," to\nhelp you get started. The dashboard supports ",(0,o.jsx)(n.a,{href:"/docs/ledger",children:"Ledger"})," devices natively and\ndoes not require an extension or wallet as an interface."]})}),"\n",(0,o.jsx)(n.admonition,{title:"Stake through Nomination Pools",type:"info",children:(0,o.jsxs)(n.p,{children:["The minimum amount required to become an active nominator (i.e.\n",(0,o.jsx)(n.a,{href:"/docs/chain-state-values#minimum-active-bond",children:"the minimum active bond"}),") and earn rewards\nmay change from era to era. If you have less tokens than the minimum active nomination and still\nwant to participate in staking, you can join the nomination pools with a\n",(0,o.jsx)(n.a,{href:"/docs/chain-state-values#minimum-bond-to-join-a-nomination-pool",children:"minimal bond"})," and earn\nstaking rewards. For additional information, check out\n",(0,o.jsx)(n.a,{href:"https://polkadot.network/blog/nomination-pools-are-live-stake-natively-with-just-1-dot/",children:"this blog post"}),".\nCheck the wiki doc on ",(0,o.jsx)(n.a,{href:"/docs/learn-nomination-pools",children:"nomination pools"})," for more information."]})}),"\n",(0,o.jsx)(n.p,{children:"Here you will learn about what staking is, why it is important, and how it works."}),"\n",(0,o.jsx)(n.h2,{id:"proof-of-stake-pos",children:"Proof-of-Stake (PoS)"}),"\n",(0,o.jsxs)(n.p,{children:["Blockchain networks use ",(0,o.jsx)(n.a,{href:"/docs/faq#why-do-we-need-consensus",children:"consensus"})," mechanisms to\nfinalize blocks on the chain. Consensus is the process of agreeing on something, in this case, the\nprogression of the blockchain or how blocks are added to the chain. Consensus consists of two\nactions:"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Block production"}),", i.e. the way multiple blocks candidates are produced, and"]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Block finality"}),", i.e. the way only one block out of many candidates is selected and added to\nthe canonical chain (see ",(0,o.jsx)(n.a,{href:"learn-consensus.md/#probabilistic-vs-provable-finality",children:"this"})," article\nfor more information about finality)."]}),"\n"]}),"\n",(0,o.jsx)(n.p,{children:"Proof-of-Work (PoW) and Proof-of-Stake (PoS) are well-known mechanisms used to reach consensus in a\nsecure and trustless way on public blockchains, where there are many participants who do not know\neach other (and probably never will). In PoW, network security relies on the fact that the miners\nwho are responsible for adding blocks to the chain must compete to solve difficult mathematic\npuzzles to add blocks - a solution that has been criticized for the wastage of energy. For doing\nthis work, miners are typically rewarded with tokens."}),"\n",(0,o.jsxs)(n.p,{children:["In PoS networks like Polkadot, the security of the network depends on the amount of capital locked\non the chain: the more the capital locked, the lower the chance of an attack on the network, as the\nattacker needs to incur a heavy loss to orchestrate a successful attack (more on this later on). The\nprocess of locking tokens on the chain is called ",(0,o.jsx)(n.strong,{children:"staking"}),"."]}),"\n",(0,o.jsxs)(n.p,{children:["Similar to the miners in PoW networks, PoS networks have ",(0,o.jsx)(n.strong,{children:"validators"}),", but they do not have to\ncompete with each other to solve mathematical puzzles. They are instead pre-selected to produce the\nblocks based on the stake backing them. Token holders can lock funds on the chain and for doing so,\nthey are getting ",(0,o.jsx)(n.strong,{children:"staking rewards"}),". There is thus an economic incentive for token holders to\nbecome active participants who contribute to the economic security and stability of the network. PoS\nnetworks in general are therefore more inclusive than PoW networks, as participants do not need to\nhave either technical knowledge about blockchain technology or experience in running mining\nequipment."]}),"\n",(0,o.jsxs)(n.p,{children:['PoS ensures that everybody participating in the staking process has "skin in the game" and thus can\nbe held accountable. In case of misbehavior, participants in the staking process can be punished or\n',(0,o.jsx)(n.a,{href:"/docs/learn-offenses",children:(0,o.jsx)(n.strong,{children:"slashed"})}),", and depending on the gravity of the situation, their stake can\nbe partly or fully confiscated by the network. It is not in a staker's economic interest to\norchestrate an attack and risk losing tokens. Any rational actor staking on the network would want\nto get rewarded, and the PoS network rewards good behavior and punishes bad behavior."]}),"\n",(0,o.jsx)(n.h2,{id:"nominated-proof-of-stake-npos",children:"Nominated Proof-of-Stake (NPoS)"}),"\n",(0,o.jsxs)(n.p,{children:["Polkadot implements ",(0,o.jsx)(n.a,{href:"learn-consensus.md/#nominated-proof-of-stake",children:"Nominated Proof-of-Stake (NPoS)"}),",\na relatively novel and sophisticated mechanism to select the validators who are allowed to\nparticipate in its ",(0,o.jsx)(n.a,{href:"/docs/learn-consensus",children:"consensus"})," protocol. NPoS encourages token holders to\nparticipate as ",(0,o.jsx)(n.strong,{children:"nominators"}),"."]}),"\n",(0,o.jsxs)(n.p,{children:["Any potential validators can indicate their intention to be a validator candidate. Their candidacies\nare made public to all nominators, and a nominator, in turn, submits a\n",(0,o.jsx)(n.a,{href:"/docs/chain-state-values#maximum-votes-per-nominator",children:"capped list of candidates"})," that it\nsupports, and the network will automatically distribute the stake among validators in an even manner\nso that the economic security is maximized. In the next era, a certain number of validators having\nthe highest backing get elected and become active. For more information about the election algorithm\ngo to ",(0,o.jsx)(n.a,{href:"/docs/learn-phragmen",children:"this"})," page on the wiki or\n",(0,o.jsx)(n.a,{href:"https://research.web3.foundation/Polkadot/protocols/NPoS/Paper",children:"this"})," research article. As a\nnominator, a ",(0,o.jsx)(n.a,{href:"/docs/chain-state-values#minimum-bond-to-participate-in-staking",children:"minimum bond"}),"\nis required to submit an intention to nominate, which can be thought of as registering to be a\nnominator. Note that in NPoS the stake of both nominators and validators can be\n",(0,o.jsx)(n.a,{href:"/docs/learn-offenses",children:"slashed"}),". For an in-depth review of NPoS see\n",(0,o.jsx)(n.a,{href:"https://research.web3.foundation/Polkadot/protocols/NPoS/Overview",children:"this"})," research article."]}),"\n",(0,o.jsx)(n.admonition,{title:"Minimum Nomination to Receive Staking Rewards",type:"caution",children:(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.a,{href:"/docs/chain-state-values#minimum-bond-to-participate-in-staking",children:"The minimum nomination intent"}),"\ndoes not guarantee staking rewards. The nominated amount has to be greater than\n",(0,o.jsx)(n.a,{href:"/docs/chain-state-values#minimum-active-bond",children:"minimum active nomination"}),", which is a\ndynamic value that can be much higher than the minimum nomination intent. This dynamic value depends\non the amount of tokens being staked, in addition to the selected nominations."]})}),"\n",(0,o.jsx)(n.h3,{id:"nominating-validators",children:"Nominating Validators"}),"\n",(0,o.jsx)(n.p,{children:"Nominating requires 2 actions:"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"Locking tokens on-chain."}),"\n",(0,o.jsx)(n.li,{children:"Selecting a set of validators, to whom these locked tokens will automatically be allocated to."}),"\n"]}),"\n",(0,o.jsxs)(n.p,{children:["How many tokens you lock up is completely up to you - as are the validators you wish to select. The\naction of locking tokens is also known as ",(0,o.jsx)(n.strong,{children:"bonding"}),". You can also refer to your locked tokens as\nyour bonded tokens, or staked tokens. Likewise, selecting validators is also known as backing or\nnominating validators. These terms are used interchangeably by the community. From now on locked\ntokens will be referred to as bonded tokens."]}),"\n",(0,o.jsx)(n.p,{children:"Once the previous 2 steps are completed and you are nominating, your bonded tokens could be\nallocated to one or more of your selected validators, and this happens every time the active\nvalidator set changes. This validator set is updated every era."}),"\n",(0,o.jsx)(n.p,{children:"Unlike other staking systems, Polkadot automatically chooses which of your selected validators will\nbe backed by your bonded tokens. Selecting a group of validators increases your chances of\nconsistently backing at least one who is active. This results in your bonded tokens being allocated\nto validators more often, which means more network security and more rewards. This is in strong\ncontrast to other staking systems that only allow you to back one validator; if that validator is\nnot active, you as a staker will also not be."}),"\n",(0,o.jsxs)(n.p,{children:["Polkadot's nomination model solves this. It uses tools ranging from election theory to game theory\nto discrete optimization, to develop an efficient validator selection process that offers fair\nrepresentation and security, thus avoiding uneven power and influence among validators. The election\nalgorithms are based on the Proportional Justified Representation (PJR) methods like\n",(0,o.jsx)(n.a,{href:"/docs/learn-phragmen",children:"Phragmen"}),". For more information about PJR methods visit\n",(0,o.jsx)(n.a,{href:"https://research.web3.foundation/Polkadot/protocols/NPoS/Overview",children:"this"})," research article."]}),"\n",(0,o.jsx)(n.h3,{id:"eras-and-sessions",children:"Eras and Sessions"}),"\n",(0,o.jsxs)(n.p,{children:["The stake from nominators is used to increase the number of tokens held by such candidates,\nincreasing their chance of being selected by the election algorithm for block production during a\nspecific ",(0,o.jsx)(n.strong,{children:"era"}),". An era is a period of 24 hours (6 hours on Kusama) during which an ",(0,o.jsx)(n.strong,{children:"active set"}),"\nof validators is producing blocks and performing other actions on the chain. This means that not all\nvalidators are in the active set and such set changes between eras. Each era is divided into 6\nepochs or ",(0,o.jsx)(n.strong,{children:"sessions"})," during which validators are assigned as block producers to specific time\nframes or ",(0,o.jsx)(n.strong,{children:"slots"}),". This means that validators know the slots when they will be required to produce\na block within a specific session, but they do not know all the slots within a specific era. Having\nsessions adds a layer of security because it decreases the chance of having multiple validators\nassigned to a slot colluding to harm the network."]}),"\n",(0,o.jsx)(n.h3,{id:"staking-rewards",children:"Staking Rewards"}),"\n",(0,o.jsxs)(n.p,{children:["Validators who produce a block are rewarded with tokens, and they can share rewards with their\nnominators. Both validators and nominators can stake their tokens on chain and receive staking\nrewards at the end of each era. The staking system pays out rewards equally to all validators\nregardless of stake. Thus, having more stake in a validator does not influence the amount of block\nrewards it receives. This avoids the centralization of power to a few validators. There is a\nprobabilistic component in the calculation of rewards, so they may not be exactly equal for all\nvalidators. In fact, during each era validators can earn ",(0,o.jsx)(n.strong,{children:"era points"})," by doing different tasks on\nchain. The more the points, the higher the reward for a specific era. This promotes validators'\nactivity on chain. To know more about era points, and how and on which basis they are distributed\nvisit the ",(0,o.jsx)(n.a,{href:"/docs/maintain-guides-validator-payout",children:"dedicated page"}),". Distribution of the\nrewards is pro-rata to all stakers after the validator's commission is deducted."]}),"\n",(0,o.jsx)(n.h3,{id:"skin-in-the-game-when-staking",children:"Skin in the game when Staking"}),"\n",(0,o.jsx)(n.p,{children:"The security of PoS networks depends on the amount of staked tokens. To successfully attack the\nnetwork, a malicious actor would need to accrue a large number of tokens or would need different\nparticipants to collude and act maliciously. If there is an attack in the case of NPoS, both the\nvalidator(s) and nominators will be slashed resulting in their stake being partially or fully\nconfiscated by the network and then deposited to the treasury. There is little interest for a\nrational network participant to act in a harmful way because NPoS ensures that all participants can\nbe held accountable for their bad actions. In NPoS, validators are paid equal rewards regardless of\nthe amount of stake backing them, thus avoiding large payouts to few large validators which might\nlead to centralization."}),"\n",(0,o.jsx)(n.h2,{id:"being-a-nominator",children:"Being a Nominator"}),"\n",(0,o.jsx)(n.h3,{id:"tasks-and-responsibilities-of-a-nominator",children:"Tasks and Responsibilities of a Nominator"}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Validators."})," Since validator slots are limited, most of those who wish to stake their tokens and\ncontribute to the economic security of the network will be nominators, thus here we focus on the\nrole of nominators. However, it is worth mentioning that validators do most of the heavy lifting:\nthey run the validator nodes and manage\n",(0,o.jsx)(n.a,{href:"https://research.web3.foundation/Polkadot/security/keys/session",children:"session keys"}),", produce new block\ncandidates in ",(0,o.jsx)(n.a,{href:"learn-consensus.md/#block-production-babe",children:"BABE"}),", vote and come to consensus in\n",(0,o.jsx)(n.a,{href:"learn-consensus.md/#finality-gadget-grandpa",children:"GRANDPA"}),", validate the state transition function of\nparachains, and possibly some other responsibilities regarding data availability and\n",(0,o.jsx)(n.a,{href:"/docs/learn-xcm",children:"XCM"}),". For more information, you can take a look at the\n",(0,o.jsx)(n.a,{href:"/docs/learn-validator",children:"validator docs"})," to understand what you need to do as a validator. If you want\nto become a validator you can consult\n",(0,o.jsx)(n.a,{href:"/docs/maintain-guides-how-to-validate-polkadot",children:"this"})," guide."]}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Nominators."})," Nominators have far fewer responsibilities than validators. These include selecting\nvalidators and monitoring their performance, keeping an eye on changing commission rates (a\nvalidator can change commission at any time), and general health monitoring of their validators'\naccounts. Thus, while not being completely set-it-and-forget-it, a nominator's experience is\nrelatively hands-off compared to that of a validator, and even more with\n",(0,o.jsx)(n.a,{href:"/docs/learn-nomination-pools",children:"nomination pools"}),". For more information, you can take a look at the\nnominator ",(0,o.jsx)(n.a,{href:"/docs/learn-nominator",children:"guide"})," to understanding your responsibilities as a nominator."]}),"\n",(0,o.jsxs)(n.p,{children:["If you want to become a nominator, see ",(0,o.jsx)(n.a,{href:"/docs/learn-nominator",children:"this"})," guide. If you are a\nbeginner and would like to securely stake your tokens using the Polkadot-JS UI, refer to\n",(0,o.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000168057-how-do-i-stake-nominate-on-polkadot-",children:"this"}),"\nsupport article. The tutorial presented in the support article is demonstrated on Polkadot, but the\nprocedure is the same for Kusama."]}),"\n",(0,o.jsx)(n.admonition,{title:"Polkadot Staking Dashboard",type:"info",children:(0,o.jsxs)(n.p,{children:["The ",(0,o.jsx)(n.a,{href:"https://staking.polkadot.cloud/dashboard/#/overview",children:"Staking Dashboard"})," provides a more\nuser-friendly alternative to staking. See the instructions in\n",(0,o.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000182133-how-to-use-the-staking-dashboard-staking-your-dot",children:"this"}),"\nsupport article to learn how to stake with the dashboard."]})}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Pools."}),' Pools are "built" on top of NPoS to provide a very low barrier to entry to staking,\nwithout sacrificing Polkadot\'s strict security model.']}),"\n",(0,o.jsx)(n.h3,{id:"selection-of-validators",children:"Selection of Validators"}),"\n",(0,o.jsx)(n.p,{children:"The task of choosing validators is not simple, as it should take into account nominator reward and\nrisk preferences. Ideally one aims to maximize the reward-to-risk ratio by maximizing rewards and\nminimizing risks, with sometimes having to compromise between the two, as minimizing risks might\ndecrease rewards as well. Nominators should pay attention, especially to six criteria when\nnominating validators (not in order of importance):"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"recent history of the era points earned across eras"}),"\n",(0,o.jsx)(n.li,{children:"validator's self stake (shows skin in the game)"}),"\n",(0,o.jsx)(n.li,{children:"total stake backing the validator (which is the sum of self stake and the stake coming from\nnominators)"}),"\n",(0,o.jsx)(n.li,{children:"commission fees (i.e. how much validators charge nominators)"}),"\n",(0,o.jsx)(n.li,{children:"verified identity"}),"\n",(0,o.jsx)(n.li,{children:"previous slashes"}),"\n"]}),"\n",(0,o.jsx)(n.p,{children:"The diagram below shows how the selection of those criteria affects the reward-to-risk ratio."}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"rewards and risks diagram",src:t(90997).A+"",width:"1920",height:"800"})}),"\n",(0,o.jsx)(n.h4,{id:"validator-selection-criteria",children:"Validator Selection Criteria"}),"\n",(0,o.jsx)(n.p,{children:"To maximize rewards and minimize risk, one could select those validators that:"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"have era points above average (because they will get more rewards for being active),"}),"\n",(0,o.jsx)(n.li,{children:"have the total stake backing the validator below the average active validator stake (because they\nwill pay out more rewards per staked token),"}),"\n",(0,o.jsx)(n.li,{children:"have high own stake (because if slashed they have something to lose),"}),"\n",(0,o.jsx)(n.li,{children:"have low commission fees but not 0% (because it makes sense that for doing the heavy lifting,\nvalidators ask for a small commission),"}),"\n",(0,o.jsx)(n.li,{children:"have on-chain registered identity (because it adds a layer of trust and possibly provides access\nto their website and contact details),"}),"\n",(0,o.jsx)(n.li,{children:"and have not been slashed (meaning that their on-chain behavior is genuine)."}),"\n"]}),"\n",(0,o.jsx)(n.h4,{id:"network-providers",children:"Network Providers"}),"\n",(0,o.jsxs)(n.p,{children:["For successful operation, a Validator node should always be ensured to meet the required\n",(0,o.jsx)(n.a,{href:"/docs/maintain-guides-how-to-validate-polkadot#reference-hardware",children:"software, hardware, and network bandwidth specifications"}),".\nUnderstandably, most of the validator nodes run on cloud service providers that guarantee high\nhardware specifications and high levels of availability and connectivity. Keep in mind that a\nvalidator in the active set is supposed to be fully online and available for producing blocks. If\nthe active validator node goes offline due to network interruptions or a power outage, that\nvalidator will get fewer rewards."]}),"\n",(0,o.jsx)(n.admonition,{title:"Checking Validators using Network Providers",type:"tip",children:(0,o.jsxs)(n.p,{children:["You can connect your stash account to the ",(0,o.jsx)(n.a,{href:"https://polkawatch.app/",children:"Polkawatch app"}),". The app will\nshow your rewards earned in the past 60 eras divided by network provider and country. You will be\nable to see networks used by each validator and verify if your validators are using providers who\nsupport PoS. This is also a great tool to explore how decentralized your nominations are and act\naccordingly."]})}),"\n",(0,o.jsx)(n.h4,{id:"keeping-track-of-nominated-validators",children:"Keeping Track of Nominated Validators"}),"\n",(0,o.jsx)(n.admonition,{title:"Nominators must periodically check their validators",type:"caution",children:(0,o.jsxs)(n.p,{children:["Nominating is ",(0,o.jsx)(n.em,{children:"not"}),' a "set and forget" operation. The whole NPoS system is dynamic and nominators\nshould periodically monitor the performance and reputation of their validators. Failing to do so\ncould result in applied slashes and/or rewards not being paid out, possibly for a prolonged period.']})}),"\n",(0,o.jsxs)(n.p,{children:["Although the theory can be used as a general guideline, in practice it is more complicated and\nfollowing the theory might not necessarily lead to the desired result. Validators might have the\ntotal stake backing them below average, low commission and above average era points in one era and\nthen have a different profile in the next one. Selection based on the criteria like on-chain\nidentity, slash history and low commission make the staking rewards deterministic. But some criteria\nvary more than others, with era points being the most variable and thus one of the key probabilistic\ncomponents of staking rewards. Part of this probability is directly related to the fact that a\nvalidator can produce blocks for a parachain (i.e. para-validators) or the relay chain, with\npara-validators earning more era points per unit time (see\n",(0,o.jsx)(n.a,{href:"/docs/maintain-guides-validator-payout#era-points",children:"this"})," page for more information). The\nrole can switch between sessions, and you can look at\n",(0,o.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/staking",children:"the staking tab on the Polkadot-JS UI"})," to know which\nvalidator is producing blocks for the relay chain or parachains."]}),"\n",(0,o.jsxs)(n.p,{children:["It is not recommended to change nominations because of the low era points of a validator in a single\nera. Variability in rewards due to the era points should level out over time. If a validator\nconsistently gets era points below average, it makes sense to nominate a better-performing validator\nfor the health of the network and increased staking rewards. See\n",(0,o.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000150130-how-do-i-know-which-validators-to-choose-",children:"this"}),"\nsupport article to understand in detail how to select the set of validators to nominate."]}),"\n",(0,o.jsx)(n.h3,{id:"stash-account-and-staking-proxy",children:"Stash Account and Staking Proxy"}),"\n",(0,o.jsx)(n.p,{children:"Two different accounts can be used to securely manage your funds while staking."}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Stash:"})," This account holds funds bonded for staking, but delegates all staking functions to a\nstaking proxy account. You may actively participate in staking with a stash private key kept in a\ncold wallet like Ledger, meaning it stays offline all the time. Having a staking proxy will allow\nyou to sign all staking-related transactions with the proxy instead of using your Ledger device.\nThis will allow you:"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"to avoid carrying around your Ledger device just to sign staking-related transactions, and"}),"\n",(0,o.jsx)(n.li,{children:"to and to keep the transaction history of your stash clean"}),"\n"]}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Staking Proxy:"})," This account acts on behalf of the stash account, signalling decisions about\nnominating and validating. It can set preferences like commission (for validators) and the staking\nrewards payout account. The earned rewards can be bonded (locked) immediately for bonding on your\nstash account, which would effectively compound the rewards you receive over time. You could also\nchoose to have them deposited to a different account as a free (transferable) balance. If you are\na validator, it can also be used to set your ",(0,o.jsx)(n.a,{href:"/docs/learn-cryptography",children:"session keys"}),". Staking\nproxies only need sufficient funds to pay for the transaction fees."]}),"\n"]}),"\n"]}),"\n",(0,o.jsx)(n.admonition,{type:"warning",children:(0,o.jsx)(n.p,{children:'Never leave a high balance on a proxy account which are usually "hot" as their private key is stored\non the device (PC, phone) and it is always exposed to the internet for potential hacks and scams. It\nis good practice to deposit rewards on the stash account or to send them to another account on a\ncold wallet.'})}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"staking",src:t(5942).A+"",width:"1920",height:"800"})}),"\n",(0,o.jsxs)(n.p,{children:["This hierarchy of separate keys for stash and staking accounts was designed to add a layer of\nprotection to nominators and validator operators. The more often one exposes and uses a private key,\nthe higher its vulnerability for hacks or scams. So, if one uses a key for multiple roles on a\nblockchain network, it is likely that the account can get compromised. Note that the damage linked\nto stolen private keys is different depending on the type of account derivation. In the case of soft\nderivation, all derived accounts are compromised. More information about account derivation can be\nfound ",(0,o.jsx)(n.a,{href:"../learn/learn-accounts.md/#derivation-paths",children:"here"}),"."]}),"\n",(0,o.jsxs)(n.admonition,{type:"info",children:[(0,o.jsx)(n.p,{children:"For Ledger users staking directly on Ledger Live, currently, there is no option to use separate\nstash and staking proxy accounts."}),(0,o.jsxs)(n.p,{children:["Ledger devices are now supported in ",(0,o.jsx)(n.a,{href:"https://www.subwallet.app/download.html",children:"SubWallet"})," and\n",(0,o.jsx)(n.a,{href:"https://talisman.xyz/",children:"Talisman"})," extension. Users can import their Ledger accounts in the extension\nand use them as a stash in staking. You can find more information about SubWallet, Talisman and\nother wallets that officially secured funding from the treasury\n",(0,o.jsx)(n.a,{href:"/docs/wallets-and-extensions",children:"here"}),"."]})]}),"\n",(0,o.jsx)(n.h3,{id:"claiming-staking-rewards",children:"Claiming Staking Rewards"}),"\n",(0,o.jsx)(n.p,{children:"Note that Kusama runs approximately 4x as fast as Polkadot, except for block production times.\nPolkadot will also produce blocks at approximately six-second intervals."}),"\n",(0,o.jsxs)(n.p,{children:["Rewards are calculated per era (approximately six hours on Kusama and twenty-four hours on\nPolkadot). These rewards are calculated based on era points, which have a probabilistic component.\nIn other words, there may be slight differences in your rewards from era to era, and even amongst\nvalidators in the active set at the same time. These variations should cancel out over a long enough\ntimeline. See the page on ",(0,o.jsx)(n.a,{href:"/docs/maintain-guides-validator-payout",children:"Validator Payout Guide"}),"."]}),"\n",(0,o.jsxs)(n.p,{children:["The distribution of staking rewards to the nominators is not automatic and needs to be triggered by\nsomeone. Typically the validators take care of this, but anyone can permissionlessly trigger rewards\npayout for all the nominators whose stake has backed a specific validator in the active set of that\nera. Staking rewards are kept available for\n",(0,o.jsx)(n.a,{href:"/docs/chain-state-values#staking-reward-retention",children:"a limited amount of time"}),"."]}),"\n",(0,o.jsxs)(n.p,{children:["For more information on why this is so, see the page on ",(0,o.jsx)(n.a,{href:"/docs/learn-staking-advanced",children:"simple payouts"}),"."]}),"\n",(0,o.jsxs)(n.admonition,{title:"Payouts",type:"info",children:[(0,o.jsxs)(n.p,{children:["Payouts are unclaimed rewards waiting to be paid out to both validators and nominators. If you go to\nthe Staking payouts page on ",(0,o.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/staking",children:"Polkadot-JS"}),", you will see a\nlist of all validators that you have nominated in the past 84 eras and for which you have not yet\nreceived a payout. The payout page is visible only to stakers."]}),(0,o.jsx)(n.p,{children:"Each validator as well as their nominators have the option to trigger the payout for all unclaimed\neras. Note that this will pay everyone who was nominating that validator during those eras.\nTherefore, you may not see anything in this tab, yet still have received a payout if somebody\n(generally, but not necessarily, another nominator or the validator operator) has triggered the\npayout for that validator for that era."})]}),"\n",(0,o.jsx)(n.admonition,{title:"Time limit to claim staking rewards",type:"warning",children:(0,o.jsx)(n.p,{children:"If nobody claims your staking rewards within 84 eras, then you will not be able to claim them and\nthey will be lost. Additionally, if the validator unbonds all their own stake, any pending payouts\nwill also be lost."})}),"\n",(0,o.jsx)(n.p,{children:"Rewards can be directed to the same account used to sign the payout or to a completely unrelated\naccount. It is also possible to top-up / withdraw some bonded tokens without having to un-stake all\nstaked tokens."}),"\n",(0,o.jsxs)(n.p,{children:["If you wish to know if you received a payout, you will have to check via a block explorer. See\n",(0,o.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000168954-how-can-i-see-my-staking-rewards-",children:"the relevant Support page"}),"\nfor details. For specific details about validator payouts, please see\n",(0,o.jsx)(n.a,{href:"/docs/maintain-guides-validator-payout",children:"this guide"}),"."]}),"\n",(0,o.jsx)(n.h3,{id:"chilling",children:"Chilling"}),"\n",(0,o.jsx)(n.p,{children:"Chilling is the act of stepping back from any nominating or validating. It can be done by a\nvalidator or nominator at any time, taking effect in the next era."}),"\n",(0,o.jsx)(n.p,{children:"Chilling can be validator-initiated, e.g. if there is a planned outage in the validator's\nsurroundings or hosting provider, and the validator wants to exit to protect themselves against\nslashing. Chilling will keep the validator active in the current era, but will move them to the\ninactive set in the next. The validator will not lose their nominators."}),"\n",(0,o.jsxs)(n.p,{children:['For more on chilling, see the "',(0,o.jsx)(n.a,{href:"/docs/maintain-guides-how-to-chill",children:"How to Chill"}),'" page on\nthis wiki.']}),"\n",(0,o.jsx)(n.h3,{id:"fast-unstake",children:"Fast Unstake"}),"\n",(0,o.jsx)(n.admonition,{title:"Fast Unstaking feature is live!",type:"info",children:(0,o.jsx)(n.p,{children:"If you accidentally bonded your tokens or your bonded tokens never backed any active validator, you\ncan now unbond them immediately."})}),"\n",(0,o.jsxs)(n.p,{children:["If your bonded balance did not back any validators for a\n",(0,o.jsx)(n.a,{href:"/docs/chain-state-values#bounty-duration",children:"pre-determined period"}),", you are eligible to\nperform fast unstaking. The ",(0,o.jsx)(n.a,{href:"https://staking.polkadot.cloud/#/overview",children:"staking dashboard"})," will\nautomatically check if you qualify. For more information, visit the\n",(0,o.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000169433-can-i-transfer-dot-without-unbonding-and-waiting-28-days-",children:'"Fast Unstake" section in this support article'}),"."]}),"\n",(0,o.jsx)(n.h2,{id:"why-and-why-not-to-stake",children:"Why and Why not to Stake?"}),"\n",(0,o.jsx)(n.h3,{id:"pros-of-staking",children:"Pros of Staking"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"Earn rewards for contributing to the network's security through staking."}),"\n",(0,o.jsxs)(n.li,{children:["Low barrier of entry through ",(0,o.jsx)(n.a,{href:"/docs/learn-nomination-pools",children:"Nomination Pools"}),"."]}),"\n",(0,o.jsxs)(n.li,{children:["Can choose ",(0,o.jsx)(n.a,{href:"/docs/chain-state-values#maximum-votes-per-nominator",children:"multiple validators"}),"\nwhich can help to decentralize the network through the sophisticated\n",(0,o.jsx)(n.a,{href:"learn-consensus.md/#nominated-proof-of-stake",children:"NPoS system"})]}),"\n",(0,o.jsx)(n.li,{children:"10% inflation/year of the tokens is primarily intended for staking rewards."}),"\n"]}),"\n",(0,o.jsx)(n.p,{children:"When the system staking rate matches with the ideal staking rate, the entire inflation of the\nnetwork is given away as the staking rewards."}),"\n",(0,o.jsx)(n.p,{children:"The ideal staking rate is a dynamic value - as the number of active parachains influences the\navailable liquidity that is available to secure the network."}),"\n",(0,o.jsxs)(n.p,{children:["Any divergence from the ideal staking rate will result in the distribution of a proportion of the\nnewly minted tokens through inflation to go to the treasury. Keep in mind that when the system's\nstaking rate is lower than the ideal staking rate, the annual nominal return rate will be higher,\nencouraging more users to use their tokens for staking. On the contrary, when the system staking\nrate is higher than the ideal staking rate, the annual nominal return will be less, encouraging some\nusers to withdraw. For in-depth understanding, check the\n",(0,o.jsx)(n.a,{href:"/docs/learn-staking-advanced#inflation",children:"inflation"})," section on the Wiki."]}),"\n",(0,o.jsx)(n.h3,{id:"cons-of-staking",children:"Cons of Staking"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:["Tokens will be locked during the\n",(0,o.jsx)(n.a,{href:"/docs/chain-state-values#unbonding-duration",children:"unbonding period"})," and no rewards will be\nearned if you unbond."]}),"\n",(0,o.jsxs)(n.li,{children:["Possible punishment in case of the active validator found to be misbehaving (see\n",(0,o.jsx)(n.a,{href:"/docs/learn-offenses",children:"slashing"}),")."]}),"\n",(0,o.jsx)(n.li,{children:"Lack of liquidity i.e. You would not be able to use the tokens for participating in crowdloans or\ntransfer them to different account etc."}),"\n"]}),"\n",(0,o.jsx)(n.h4,{id:"unbonding-period-length",children:"Unbonding Period Length"}),"\n",(0,o.jsxs)(n.p,{children:["The ",(0,o.jsx)(n.a,{href:"/docs/chain-state-values#unbonding-duration",children:"unbonding period"})," provides a safety net\nfor slashing offenses identified in\n",(0,o.jsx)(n.a,{href:"https://research.web3.foundation/Polkadot/security/slashing/npos#slashing-in-past-eras",children:"past eras"}),",\nwhich can hold the respective validators and their nominators accountable. The unbonding period is\ncrucial in mitigating ex post facto slashing, particularly in guarding against long-range attacks.\nWhen a client encounters a chain finalized by\n",(0,o.jsx)(n.a,{href:"/docs/learn-consensus#finality-gadget-grandpa",children:"GRANDPA"})," that originates more than one\n",(0,o.jsx)(n.a,{href:"/docs/chain-state-values#unbonding-duration",children:"unbonding period"})," in the past, it lacks the\nsecurity of slashing protection."]}),"\n",(0,o.jsxs)(n.p,{children:["Essentially, this period establishes a cadence for synchronizing with the chain or acquiring a\ncheckpoint within a timeframe that engenders trust. It's worth noting that while the choice of\n",(0,o.jsx)(n.a,{href:"/docs/chain-state-values#unbonding-duration",children:"unbonding period length"})," is somewhat\narbitrary, it unquestionably provides a higher level of security compared to a shorter period."]}),"\n",(0,o.jsx)(n.h2,{id:"how-many-validators",children:"How many Validators?"}),"\n",(0,o.jsxs)(n.p,{children:["The top bound on the ",(0,o.jsx)(n.a,{href:"/docs/chain-state-values#active-validator-count",children:"number of validators"}),"\nhas not been determined yet, but should only be limited by the bandwidth strain of the network due\nto peer-to-peer message passing."]}),"\n",(0,o.jsx)(n.p,{children:"The estimate of the number of validators that Polkadot will have at maturity is around 1000, while\nKusama is already operating at this threshold."}),"\n",(0,o.jsx)(n.h2,{id:"why-am-i-not-receiving-rewards",children:"Why am I not receiving rewards?"}),"\n",(0,o.jsx)(n.p,{children:"Nominating is not a set-and-forget action. Nominators need to monitor their nominations and ensure\nthey are eligible to receive staking rewards. Otherwise, they would be risking their funds to secure\nthe chain with no reward. If you are bonding significantly more than the Minimum Active Bond and yet\nnot receiving rewards, your nominations are all waiting, or your active validator has 100%\ncommission. However, if you bond funds close to the Minimum Active Bond, there could be several\npossibilities for not receiving staking rewards. The table below can be used to troubleshoot why you\nmight not be receiving staking rewards using Polkadot-JS UI."}),"\n",(0,o.jsxs)(n.table,{children:[(0,o.jsx)(n.thead,{children:(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.th,{style:{textAlign:"center"},children:"Nomination Status"}),(0,o.jsx)(n.th,{style:{textAlign:"center"},children:"What's happening?"}),(0,o.jsx)(n.th,{style:{textAlign:"center"},children:"Causes"}),(0,o.jsx)(n.th,{style:{textAlign:"center"},children:"What to do?"})]})}),(0,o.jsxs)(n.tbody,{children:[(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{style:{textAlign:"center"},children:"Nominated validators are all in waiting status."}),(0,o.jsx)(n.td,{style:{textAlign:"center"},children:"Your stake has not been assigned to any of the nominated validators. You cannot earn rewards, nor be slashed in that era."}),(0,o.jsx)(n.td,{style:{textAlign:"center"},children:'Waiting validators are not in the active set in the current era and the stake backing them is not used to secure the network. In simple words, NPoS "does not see them".'}),(0,o.jsx)(n.td,{style:{textAlign:"center"},children:"Change your nominations. Try to select validators (with reasonable commission) that have high chances to end up in the active set."})]}),(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{style:{textAlign:"center"},children:"You have some inactive, and some waiting nominations."}),(0,o.jsx)(n.td,{style:{textAlign:"center"},children:'Validators shown as "Inactive" in your staking dashboard are still in the active set and are producing blocks in the current era, but your stake has not been assigned to any of them. You will not earn rewards if your stake is not backing an active validator. In this case, you cannot be slashed either.'}),(0,o.jsxs)(n.td,{style:{textAlign:"center"},children:[(0,o.jsx)(n.strong,{children:"Scenario 1:"})," You have bonded less than the Minimum Active Bond. ",(0,o.jsx)(n.strong,{children:"Scenario 2:"})," You have more than the Minimum Active Bond, but your account is at the tail end of the ",(0,o.jsx)(n.a,{href:"/docs/learn-staking-advanced#bags-list",children:"bags list"})," and within your bag there are accounts with less stake than you, in front of you."]}),(0,o.jsxs)(n.td,{style:{textAlign:"center"},children:[(0,o.jsx)(n.strong,{children:"Scenario 1:"})," Try bonding more funds. ",(0,o.jsx)(n.strong,{children:"Scenario 2:"})," Try to put your account in front of the accounts with less stake than you. Instructions available ",(0,o.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181018-i-have-more-than-the-minimum-bonded-but-i-m-not-getting-rewards",children:"here"})]})]})]})]}),"\n",(0,o.jsx)(n.admonition,{title:"Join a Nomination Pool",type:"tip",children:(0,o.jsxs)(n.p,{children:["By joining a ",(0,o.jsx)(n.a,{href:"/docs/learn-nomination-pools",children:"nomination pool"})," that is active and earning rewards, you\ncan start earning staking rewards with as low as 1 DOT. The nomination pools typically have a\ndedicated pool operator who ensures that the pool's stake is always backing an active validator and\nis receiving rewards."]})}),"\n",(0,o.jsx)(n.admonition,{title:"Bags List & Minimum Active Bond",type:"info",children:(0,o.jsxs)(n.p,{children:["You can find information about why you might not receive staking rewards on\n",(0,o.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000170805-why-am-i-not-getting-staking-rewards-",children:"this support page"}),"\nand ",(0,o.jsx)(n.a,{href:"https://youtu.be/hIIZRJLrBZA",children:"this video tutorial"}),"."]})}),"\n",(0,o.jsx)(n.h2,{id:"staking-faq",children:"Staking FAQ"}),"\n",(0,o.jsx)(n.admonition,{type:"info",children:(0,o.jsxs)(n.p,{children:["See\n",(0,o.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181959-staking-faq-s",children:"this support page"}),"\nfor the FAQs about staking."]})}),"\n",(0,o.jsx)(n.h2,{id:"resources",children:"Resources"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.a,{href:"https://medium.com/web3foundation/how-nominated-proof-of-stake-will-work-in-polkadot-377d70c6bd43",children:"How Nominated Proof of Stake will work in Polkadot"})," -\nBlog post by Web3 Foundation researcher Alfonso Cevallos covering NPoS in Polkadot."]}),"\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"/docs/maintain-guides-secure-validator",children:"Validator setup"})}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.a,{href:"https://decentradot.com/polkadot-validator-selector/",children:"Polkadot validator selector tool"})," - A tool\nthat helps nominators find reliable validators that meet quality-control criteria, including\ncommission rates, verified identity, etc."]}),"\n"]}),"\n",(0,o.jsx)(n.hr,{}),"\n",(0,o.jsx)(n.admonition,{title:"Polkadot-JS Guides",type:"info",children:(0,o.jsxs)(n.p,{children:["If you are an advanced user, see the ",(0,o.jsx)(n.a,{href:"./learn-guides-staking",children:"Polkadot-JS guides about staking"}),"."]})})]})}function u(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(c,{...e})}):c(e)}},67141:(e,n,t)=>{t.d(n,{A:()=>i});var a=t(96540),o=t(74848);const i=function(e){var n,t=e.message,i=(0,a.useState)(!0),s=i[0],r=i[1];return(0,o.jsx)(o.Fragment,{children:s&&(0,o.jsxs)("div",{className:"message-box",children:[(0,o.jsx)("button",{className:"close-button",onClick:function(){r(!1)},children:"\u2716 "}),(0,o.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(n=t,n.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},90997:(e,n,t)=>{t.d(n,{A:()=>a});const a=t.p+"assets/images/reward-risk-fee9f991186d4097ca3d3f0a713f4ad4.png"},5942:(e,n,t)=>{t.d(n,{A:()=>a});const a=t.p+"assets/images/stash-and-staking-proxy-ea4d09387a4b56d1349ee896427d9f1d.png"},28453:(e,n,t)=>{t.d(n,{R:()=>s,x:()=>r});var a=t(96540);const o={},i=a.createContext(o);function s(e){const n=a.useContext(i);return a.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:s(e.components),a.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/1646726c.7cd62949.js b/assets/js/1646726c.7cd62949.js deleted file mode 100644 index 14895c962d87..000000000000 --- a/assets/js/1646726c.7cd62949.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3266],{47002:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>r,default:()=>u,frontMatter:()=>s,metadata:()=>l,toc:()=>h});var a=t(74848),o=t(28453),i=t(67141);const s={id:"learn-staking",title:"Introduction to Staking",sidebar_label:"Introduction to Staking",description:"Overview of Staking and NPoS on Polkadot.",keywords:["staking","stake","nominate","nominating","NPoS","faq"],slug:"../learn-staking"},r=void 0,l={id:"learn/learn-staking",title:"Introduction to Staking",description:"Overview of Staking and NPoS on Polkadot.",source:"@site/../docs/learn/learn-staking.md",sourceDirName:"learn",slug:"/learn-staking",permalink:"/docs/learn-staking",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-staking.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1727168669e3,frontMatter:{id:"learn-staking",title:"Introduction to Staking",sidebar_label:"Introduction to Staking",description:"Overview of Staking and NPoS on Polkadot.",keywords:["staking","stake","nominate","nominating","NPoS","faq"],slug:"../learn-staking"},sidebar:"docs",previous:{title:"Staking",permalink:"/docs/learn-staking-index"},next:{title:"Nomination Pools",permalink:"/docs/learn-nomination-pools"}},d={},h=[{value:"Proof-of-Stake (PoS)",id:"proof-of-stake-pos",level:2},{value:"Nominated Proof-of-Stake (NPoS)",id:"nominated-proof-of-stake-npos",level:2},{value:"Nominating Validators",id:"nominating-validators",level:3},{value:"Eras and Sessions",id:"eras-and-sessions",level:3},{value:"Staking Rewards",id:"staking-rewards",level:3},{value:"Skin in the game when Staking",id:"skin-in-the-game-when-staking",level:3},{value:"Being a Nominator",id:"being-a-nominator",level:2},{value:"Tasks and Responsibilities of a Nominator",id:"tasks-and-responsibilities-of-a-nominator",level:3},{value:"Selection of Validators",id:"selection-of-validators",level:3},{value:"Validator Selection Criteria",id:"validator-selection-criteria",level:4},{value:"Network Providers",id:"network-providers",level:4},{value:"Keeping Track of Nominated Validators",id:"keeping-track-of-nominated-validators",level:4},{value:"Stash Account and Staking Proxy",id:"stash-account-and-staking-proxy",level:3},{value:"Claiming Staking Rewards",id:"claiming-staking-rewards",level:3},{value:"Chilling",id:"chilling",level:3},{value:"Fast Unstake",id:"fast-unstake",level:3},{value:"Why and Why not to Stake?",id:"why-and-why-not-to-stake",level:2},{value:"Pros of Staking",id:"pros-of-staking",level:3},{value:"Cons of Staking",id:"cons-of-staking",level:3},{value:"Unbonding Period Length",id:"unbonding-period-length",level:4},{value:"How many Validators?",id:"how-many-validators",level:2},{value:"Why am I not receiving rewards?",id:"why-am-i-not-receiving-rewards",level:2},{value:"Staking FAQ",id:"staking-faq",level:2},{value:"Resources",id:"resources",level:2}];function c(e){const n={a:"a",admonition:"admonition",em:"em",h2:"h2",h3:"h3",h4:"h4",hr:"hr",img:"img",li:"li",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,o.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.A,{message:"Nomination Pools are evolving!\nSoon you'll be able to participate in a pool and in OpenGov with your pooled funds!\nYou do not need to do anything, unless you are participating in a pool and also staking solo from the same account. In this case, please check [this article](https://support.polkadot.network/support/solutions/articles/65000188140-changes-for-nomination-pool-members-and-opengov-participation) on the actions you need to take as soon as possible."}),"\n",(0,a.jsx)(n.admonition,{title:"New to Staking?",type:"tip",children:(0,a.jsxs)(n.p,{children:["Explore Polkadot with a secure and user-friendly wallets listed on the\n",(0,a.jsx)(n.a,{href:"https://www.polkadot.network/ecosystem/wallets/",children:"Polkadot website"})," and start your staking journey\nor explore more information about staking on\n",(0,a.jsx)(n.a,{href:"https://polkadot.network/staking/",children:"Polkadot's Staking Page"}),". Discover the new\n",(0,a.jsx)(n.a,{href:"https://staking.polkadot.cloud/#/overview",children:"Staking Dashboard"})," that makes staking much easier and\ncheck this\n",(0,a.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000182104",children:"extensive article list"})," to\nhelp you get started. The dashboard supports ",(0,a.jsx)(n.a,{href:"/docs/ledger",children:"Ledger"})," devices natively and\ndoes not require an extension or wallet as an interface."]})}),"\n",(0,a.jsx)(n.admonition,{title:"Stake through Nomination Pools",type:"info",children:(0,a.jsxs)(n.p,{children:["The minimum amount required to become an active nominator (i.e.\n",(0,a.jsx)(n.a,{href:"/docs/chain-state-values#minimum-active-bond",children:"the minimum active bond"}),") and earn rewards\nmay change from era to era. If you have less tokens than the minimum active nomination and still\nwant to participate in staking, you can join the nomination pools with a\n",(0,a.jsx)(n.a,{href:"/docs/chain-state-values#minimum-bond-to-join-a-nomination-pool",children:"minimal bond"})," and earn\nstaking rewards. For additional information, check out\n",(0,a.jsx)(n.a,{href:"https://polkadot.network/blog/nomination-pools-are-live-stake-natively-with-just-1-dot/",children:"this blog post"}),".\nCheck the wiki doc on ",(0,a.jsx)(n.a,{href:"/docs/learn-nomination-pools",children:"nomination pools"})," for more information."]})}),"\n",(0,a.jsx)(n.p,{children:"Here you will learn about what staking is, why it is important, and how it works."}),"\n",(0,a.jsx)(n.h2,{id:"proof-of-stake-pos",children:"Proof-of-Stake (PoS)"}),"\n",(0,a.jsxs)(n.p,{children:["Blockchain networks use ",(0,a.jsx)(n.a,{href:"/docs/faq#why-do-we-need-consensus",children:"consensus"})," mechanisms to\nfinalize blocks on the chain. Consensus is the process of agreeing on something, in this case, the\nprogression of the blockchain or how blocks are added to the chain. Consensus consists of two\nactions:"]}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.strong,{children:"Block production"}),", i.e. the way multiple blocks candidates are produced, and"]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.strong,{children:"Block finality"}),", i.e. the way only one block out of many candidates is selected and added to\nthe canonical chain (see ",(0,a.jsx)(n.a,{href:"learn-consensus.md/#probabilistic-vs-provable-finality",children:"this"})," article\nfor more information about finality)."]}),"\n"]}),"\n",(0,a.jsx)(n.p,{children:"Proof-of-Work (PoW) and Proof-of-Stake (PoS) are well-known mechanisms used to reach consensus in a\nsecure and trustless way on public blockchains, where there are many participants who do not know\neach other (and probably never will). In PoW, network security relies on the fact that the miners\nwho are responsible for adding blocks to the chain must compete to solve difficult mathematic\npuzzles to add blocks - a solution that has been criticized for the wastage of energy. For doing\nthis work, miners are typically rewarded with tokens."}),"\n",(0,a.jsxs)(n.p,{children:["In PoS networks like Polkadot, the security of the network depends on the amount of capital locked\non the chain: the more the capital locked, the lower the chance of an attack on the network, as the\nattacker needs to incur a heavy loss to orchestrate a successful attack (more on this later on). The\nprocess of locking tokens on the chain is called ",(0,a.jsx)(n.strong,{children:"staking"}),"."]}),"\n",(0,a.jsxs)(n.p,{children:["Similar to the miners in PoW networks, PoS networks have ",(0,a.jsx)(n.strong,{children:"validators"}),", but they do not have to\ncompete with each other to solve mathematical puzzles. They are instead pre-selected to produce the\nblocks based on the stake backing them. Token holders can lock funds on the chain and for doing so,\nthey are getting ",(0,a.jsx)(n.strong,{children:"staking rewards"}),". There is thus an economic incentive for token holders to\nbecome active participants who contribute to the economic security and stability of the network. PoS\nnetworks in general are therefore more inclusive than PoW networks, as participants do not need to\nhave either technical knowledge about blockchain technology or experience in running mining\nequipment."]}),"\n",(0,a.jsxs)(n.p,{children:['PoS ensures that everybody participating in the staking process has "skin in the game" and thus can\nbe held accountable. In case of misbehavior, participants in the staking process can be punished or\n',(0,a.jsx)(n.a,{href:"/docs/learn-offenses",children:(0,a.jsx)(n.strong,{children:"slashed"})}),", and depending on the gravity of the situation, their stake can\nbe partly or fully confiscated by the network. It is not in a staker's economic interest to\norchestrate an attack and risk losing tokens. Any rational actor staking on the network would want\nto get rewarded, and the PoS network rewards good behavior and punishes bad behavior."]}),"\n",(0,a.jsx)(n.h2,{id:"nominated-proof-of-stake-npos",children:"Nominated Proof-of-Stake (NPoS)"}),"\n",(0,a.jsxs)(n.p,{children:["Polkadot implements ",(0,a.jsx)(n.a,{href:"learn-consensus.md/#nominated-proof-of-stake",children:"Nominated Proof-of-Stake (NPoS)"}),",\na relatively novel and sophisticated mechanism to select the validators who are allowed to\nparticipate in its ",(0,a.jsx)(n.a,{href:"/docs/learn-consensus",children:"consensus"})," protocol. NPoS encourages token holders to\nparticipate as ",(0,a.jsx)(n.strong,{children:"nominators"}),"."]}),"\n",(0,a.jsxs)(n.p,{children:["Any potential validators can indicate their intention to be a validator candidate. Their candidacies\nare made public to all nominators, and a nominator, in turn, submits a\n",(0,a.jsx)(n.a,{href:"/docs/chain-state-values#maximum-votes-per-nominator",children:"capped list of candidates"})," that it\nsupports, and the network will automatically distribute the stake among validators in an even manner\nso that the economic security is maximized. In the next era, a certain number of validators having\nthe highest backing get elected and become active. For more information about the election algorithm\ngo to ",(0,a.jsx)(n.a,{href:"/docs/learn-phragmen",children:"this"})," page on the wiki or\n",(0,a.jsx)(n.a,{href:"https://research.web3.foundation/Polkadot/protocols/NPoS/Paper",children:"this"})," research article. As a\nnominator, a ",(0,a.jsx)(n.a,{href:"/docs/chain-state-values#minimum-bond-to-participate-in-staking",children:"minimum bond"}),"\nis required to submit an intention to nominate, which can be thought of as registering to be a\nnominator. Note that in NPoS the stake of both nominators and validators can be\n",(0,a.jsx)(n.a,{href:"/docs/learn-offenses",children:"slashed"}),". For an in-depth review of NPoS see\n",(0,a.jsx)(n.a,{href:"https://research.web3.foundation/Polkadot/protocols/NPoS/Overview",children:"this"})," research article."]}),"\n",(0,a.jsx)(n.admonition,{title:"Minimum Nomination to Receive Staking Rewards",type:"caution",children:(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.a,{href:"/docs/chain-state-values#minimum-bond-to-participate-in-staking",children:"The minimum nomination intent"}),"\ndoes not guarantee staking rewards. The nominated amount has to be greater than\n",(0,a.jsx)(n.a,{href:"/docs/chain-state-values#minimum-active-bond",children:"minimum active nomination"}),", which is a\ndynamic value that can be much higher than the minimum nomination intent. This dynamic value depends\non the amount of tokens being staked, in addition to the selected nominations."]})}),"\n",(0,a.jsx)(n.h3,{id:"nominating-validators",children:"Nominating Validators"}),"\n",(0,a.jsx)(n.p,{children:"Nominating requires 2 actions:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:"Locking tokens on-chain."}),"\n",(0,a.jsx)(n.li,{children:"Selecting a set of validators, to whom these locked tokens will automatically be allocated to."}),"\n"]}),"\n",(0,a.jsxs)(n.p,{children:["How many tokens you lock up is completely up to you - as are the validators you wish to select. The\naction of locking tokens is also known as ",(0,a.jsx)(n.strong,{children:"bonding"}),". You can also refer to your locked tokens as\nyour bonded tokens, or staked tokens. Likewise, selecting validators is also known as backing or\nnominating validators. These terms are used interchangeably by the community. From now on locked\ntokens will be referred to as bonded tokens."]}),"\n",(0,a.jsx)(n.p,{children:"Once the previous 2 steps are completed and you are nominating, your bonded tokens could be\nallocated to one or more of your selected validators, and this happens every time the active\nvalidator set changes. This validator set is updated every era."}),"\n",(0,a.jsx)(n.p,{children:"Unlike other staking systems, Polkadot automatically chooses which of your selected validators will\nbe backed by your bonded tokens. Selecting a group of validators increases your chances of\nconsistently backing at least one who is active. This results in your bonded tokens being allocated\nto validators more often, which means more network security and more rewards. This is in strong\ncontrast to other staking systems that only allow you to back one validator; if that validator is\nnot active, you as a staker will also not be."}),"\n",(0,a.jsxs)(n.p,{children:["Polkadot's nomination model solves this. It uses tools ranging from election theory to game theory\nto discrete optimization, to develop an efficient validator selection process that offers fair\nrepresentation and security, thus avoiding uneven power and influence among validators. The election\nalgorithms are based on the Proportional Justified Representation (PJR) methods like\n",(0,a.jsx)(n.a,{href:"/docs/learn-phragmen",children:"Phragmen"}),". For more information about PJR methods visit\n",(0,a.jsx)(n.a,{href:"https://research.web3.foundation/Polkadot/protocols/NPoS/Overview",children:"this"})," research article."]}),"\n",(0,a.jsx)(n.h3,{id:"eras-and-sessions",children:"Eras and Sessions"}),"\n",(0,a.jsxs)(n.p,{children:["The stake from nominators is used to increase the number of tokens held by such candidates,\nincreasing their chance of being selected by the election algorithm for block production during a\nspecific ",(0,a.jsx)(n.strong,{children:"era"}),". An era is a period of 24 hours (6 hours on Kusama) during which an ",(0,a.jsx)(n.strong,{children:"active set"}),"\nof validators is producing blocks and performing other actions on the chain. This means that not all\nvalidators are in the active set and such set changes between eras. Each era is divided into 6\nepochs or ",(0,a.jsx)(n.strong,{children:"sessions"})," during which validators are assigned as block producers to specific time\nframes or ",(0,a.jsx)(n.strong,{children:"slots"}),". This means that validators know the slots when they will be required to produce\na block within a specific session, but they do not know all the slots within a specific era. Having\nsessions adds a layer of security because it decreases the chance of having multiple validators\nassigned to a slot colluding to harm the network."]}),"\n",(0,a.jsx)(n.h3,{id:"staking-rewards",children:"Staking Rewards"}),"\n",(0,a.jsxs)(n.p,{children:["Validators who produce a block are rewarded with tokens, and they can share rewards with their\nnominators. Both validators and nominators can stake their tokens on chain and receive staking\nrewards at the end of each era. The staking system pays out rewards equally to all validators\nregardless of stake. Thus, having more stake in a validator does not influence the amount of block\nrewards it receives. This avoids the centralization of power to a few validators. There is a\nprobabilistic component in the calculation of rewards, so they may not be exactly equal for all\nvalidators. In fact, during each era validators can earn ",(0,a.jsx)(n.strong,{children:"era points"})," by doing different tasks on\nchain. The more the points, the higher the reward for a specific era. This promotes validators'\nactivity on chain. To know more about era points, and how and on which basis they are distributed\nvisit the ",(0,a.jsx)(n.a,{href:"/docs/maintain-guides-validator-payout",children:"dedicated page"}),". Distribution of the\nrewards is pro-rata to all stakers after the validator's commission is deducted."]}),"\n",(0,a.jsx)(n.h3,{id:"skin-in-the-game-when-staking",children:"Skin in the game when Staking"}),"\n",(0,a.jsx)(n.p,{children:"The security of PoS networks depends on the amount of staked tokens. To successfully attack the\nnetwork, a malicious actor would need to accrue a large number of tokens or would need different\nparticipants to collude and act maliciously. If there is an attack in the case of NPoS, both the\nvalidator(s) and nominators will be slashed resulting in their stake being partially or fully\nconfiscated by the network and then deposited to the treasury. There is little interest for a\nrational network participant to act in a harmful way because NPoS ensures that all participants can\nbe held accountable for their bad actions. In NPoS, validators are paid equal rewards regardless of\nthe amount of stake backing them, thus avoiding large payouts to few large validators which might\nlead to centralization."}),"\n",(0,a.jsx)(n.h2,{id:"being-a-nominator",children:"Being a Nominator"}),"\n",(0,a.jsx)(n.h3,{id:"tasks-and-responsibilities-of-a-nominator",children:"Tasks and Responsibilities of a Nominator"}),"\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.strong,{children:"Validators."})," Since validator slots are limited, most of those who wish to stake their tokens and\ncontribute to the economic security of the network will be nominators, thus here we focus on the\nrole of nominators. However, it is worth mentioning that validators do most of the heavy lifting:\nthey run the validator nodes and manage\n",(0,a.jsx)(n.a,{href:"https://research.web3.foundation/Polkadot/security/keys/session",children:"session keys"}),", produce new block\ncandidates in ",(0,a.jsx)(n.a,{href:"learn-consensus.md/#block-production-babe",children:"BABE"}),", vote and come to consensus in\n",(0,a.jsx)(n.a,{href:"learn-consensus.md/#finality-gadget-grandpa",children:"GRANDPA"}),", validate the state transition function of\nparachains, and possibly some other responsibilities regarding data availability and\n",(0,a.jsx)(n.a,{href:"/docs/learn-xcm",children:"XCM"}),". For more information, you can take a look at the\n",(0,a.jsx)(n.a,{href:"/docs/learn-validator",children:"validator docs"})," to understand what you need to do as a validator. If you want\nto become a validator you can consult\n",(0,a.jsx)(n.a,{href:"/docs/maintain-guides-how-to-validate-polkadot",children:"this"})," guide."]}),"\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.strong,{children:"Nominators."})," Nominators have far fewer responsibilities than validators. These include selecting\nvalidators and monitoring their performance, keeping an eye on changing commission rates (a\nvalidator can change commission at any time), and general health monitoring of their validators'\naccounts. Thus, while not being completely set-it-and-forget-it, a nominator's experience is\nrelatively hands-off compared to that of a validator, and even more with\n",(0,a.jsx)(n.a,{href:"/docs/learn-nomination-pools",children:"nomination pools"}),". For more information, you can take a look at the\nnominator ",(0,a.jsx)(n.a,{href:"/docs/learn-nominator",children:"guide"})," to understanding your responsibilities as a nominator."]}),"\n",(0,a.jsxs)(n.p,{children:["If you want to become a nominator, see ",(0,a.jsx)(n.a,{href:"/docs/learn-nominator",children:"this"})," guide. If you are a\nbeginner and would like to securely stake your tokens using the Polkadot-JS UI, refer to\n",(0,a.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000168057-how-do-i-stake-nominate-on-polkadot-",children:"this"}),"\nsupport article. The tutorial presented in the support article is demonstrated on Polkadot, but the\nprocedure is the same for Kusama."]}),"\n",(0,a.jsx)(n.admonition,{title:"Polkadot Staking Dashboard",type:"info",children:(0,a.jsxs)(n.p,{children:["The ",(0,a.jsx)(n.a,{href:"https://staking.polkadot.cloud/dashboard/#/overview",children:"Staking Dashboard"})," provides a more\nuser-friendly alternative to staking. See the instructions in\n",(0,a.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000182133-how-to-use-the-staking-dashboard-staking-your-dot",children:"this"}),"\nsupport article to learn how to stake with the dashboard."]})}),"\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.strong,{children:"Pools."}),' Pools are "built" on top of NPoS to provide a very low barrier to entry to staking,\nwithout sacrificing Polkadot\'s strict security model.']}),"\n",(0,a.jsx)(n.h3,{id:"selection-of-validators",children:"Selection of Validators"}),"\n",(0,a.jsx)(n.p,{children:"The task of choosing validators is not simple, as it should take into account nominator reward and\nrisk preferences. Ideally one aims to maximize the reward-to-risk ratio by maximizing rewards and\nminimizing risks, with sometimes having to compromise between the two, as minimizing risks might\ndecrease rewards as well. Nominators should pay attention, especially to six criteria when\nnominating validators (not in order of importance):"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:"recent history of the era points earned across eras"}),"\n",(0,a.jsx)(n.li,{children:"validator's self stake (shows skin in the game)"}),"\n",(0,a.jsx)(n.li,{children:"total stake backing the validator (which is the sum of self stake and the stake coming from\nnominators)"}),"\n",(0,a.jsx)(n.li,{children:"commission fees (i.e. how much validators charge nominators)"}),"\n",(0,a.jsx)(n.li,{children:"verified identity"}),"\n",(0,a.jsx)(n.li,{children:"previous slashes"}),"\n"]}),"\n",(0,a.jsx)(n.p,{children:"The diagram below shows how the selection of those criteria affects the reward-to-risk ratio."}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.img,{alt:"rewards and risks diagram",src:t(90997).A+"",width:"1920",height:"800"})}),"\n",(0,a.jsx)(n.h4,{id:"validator-selection-criteria",children:"Validator Selection Criteria"}),"\n",(0,a.jsx)(n.p,{children:"To maximize rewards and minimize risk, one could select those validators that:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:"have era points above average (because they will get more rewards for being active),"}),"\n",(0,a.jsx)(n.li,{children:"have the total stake backing the validator below the average active validator stake (because they\nwill pay out more rewards per staked token),"}),"\n",(0,a.jsx)(n.li,{children:"have high own stake (because if slashed they have something to lose),"}),"\n",(0,a.jsx)(n.li,{children:"have low commission fees but not 0% (because it makes sense that for doing the heavy lifting,\nvalidators ask for a small commission),"}),"\n",(0,a.jsx)(n.li,{children:"have on-chain registered identity (because it adds a layer of trust and possibly provides access\nto their website and contact details),"}),"\n",(0,a.jsx)(n.li,{children:"and have not been slashed (meaning that their on-chain behavior is genuine)."}),"\n"]}),"\n",(0,a.jsx)(n.h4,{id:"network-providers",children:"Network Providers"}),"\n",(0,a.jsxs)(n.p,{children:["For successful operation, a Validator node should always be ensured to meet the required\n",(0,a.jsx)(n.a,{href:"/docs/maintain-guides-how-to-validate-polkadot#reference-hardware",children:"software, hardware, and network bandwidth specifications"}),".\nUnderstandably, most of the validator nodes run on cloud service providers that guarantee high\nhardware specifications and high levels of availability and connectivity. Keep in mind that a\nvalidator in the active set is supposed to be fully online and available for producing blocks. If\nthe active validator node goes offline due to network interruptions or a power outage, that\nvalidator will get fewer rewards."]}),"\n",(0,a.jsx)(n.admonition,{title:"Checking Validators using Network Providers",type:"tip",children:(0,a.jsxs)(n.p,{children:["You can connect your stash account to the ",(0,a.jsx)(n.a,{href:"https://polkawatch.app/",children:"Polkawatch app"}),". The app will\nshow your rewards earned in the past 60 eras divided by network provider and country. You will be\nable to see networks used by each validator and verify if your validators are using providers who\nsupport PoS. This is also a great tool to explore how decentralized your nominations are and act\naccordingly."]})}),"\n",(0,a.jsx)(n.h4,{id:"keeping-track-of-nominated-validators",children:"Keeping Track of Nominated Validators"}),"\n",(0,a.jsx)(n.admonition,{title:"Nominators must periodically check their validators",type:"caution",children:(0,a.jsxs)(n.p,{children:["Nominating is ",(0,a.jsx)(n.em,{children:"not"}),' a "set and forget" operation. The whole NPoS system is dynamic and nominators\nshould periodically monitor the performance and reputation of their validators. Failing to do so\ncould result in applied slashes and/or rewards not being paid out, possibly for a prolonged period.']})}),"\n",(0,a.jsxs)(n.p,{children:["Although the theory can be used as a general guideline, in practice it is more complicated and\nfollowing the theory might not necessarily lead to the desired result. Validators might have the\ntotal stake backing them below average, low commission and above average era points in one era and\nthen have a different profile in the next one. Selection based on the criteria like on-chain\nidentity, slash history and low commission make the staking rewards deterministic. But some criteria\nvary more than others, with era points being the most variable and thus one of the key probabilistic\ncomponents of staking rewards. Part of this probability is directly related to the fact that a\nvalidator can produce blocks for a parachain (i.e. para-validators) or the relay chain, with\npara-validators earning more era points per unit time (see\n",(0,a.jsx)(n.a,{href:"/docs/maintain-guides-validator-payout#era-points",children:"this"})," page for more information). The\nrole can switch between sessions, and you can look at\n",(0,a.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/staking",children:"the staking tab on the Polkadot-JS UI"})," to know which\nvalidator is producing blocks for the relay chain or parachains."]}),"\n",(0,a.jsxs)(n.p,{children:["It is not recommended to change nominations because of the low era points of a validator in a single\nera. Variability in rewards due to the era points should level out over time. If a validator\nconsistently gets era points below average, it makes sense to nominate a better-performing validator\nfor the health of the network and increased staking rewards. See\n",(0,a.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000150130-how-do-i-know-which-validators-to-choose-",children:"this"}),"\nsupport article to understand in detail how to select the set of validators to nominate."]}),"\n",(0,a.jsx)(n.h3,{id:"stash-account-and-staking-proxy",children:"Stash Account and Staking Proxy"}),"\n",(0,a.jsx)(n.p,{children:"Two different accounts can be used to securely manage your funds while staking."}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.strong,{children:"Stash:"})," This account holds funds bonded for staking, but delegates all staking functions to a\nstaking proxy account. You may actively participate in staking with a stash private key kept in a\ncold wallet like Ledger, meaning it stays offline all the time. Having a staking proxy will allow\nyou to sign all staking-related transactions with the proxy instead of using your Ledger device.\nThis will allow you:"]}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:"to avoid carrying around your Ledger device just to sign staking-related transactions, and"}),"\n",(0,a.jsx)(n.li,{children:"to and to keep the transaction history of your stash clean"}),"\n"]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.strong,{children:"Staking Proxy:"})," This account acts on behalf of the stash account, signalling decisions about\nnominating and validating. It can set preferences like commission (for validators) and the staking\nrewards payout account. The earned rewards can be bonded (locked) immediately for bonding on your\nstash account, which would effectively compound the rewards you receive over time. You could also\nchoose to have them deposited to a different account as a free (transferable) balance. If you are\na validator, it can also be used to set your ",(0,a.jsx)(n.a,{href:"/docs/learn-cryptography",children:"session keys"}),". Staking\nproxies only need sufficient funds to pay for the transaction fees."]}),"\n"]}),"\n"]}),"\n",(0,a.jsx)(n.admonition,{type:"warning",children:(0,a.jsx)(n.p,{children:'Never leave a high balance on a proxy account which are usually "hot" as their private key is stored\non the device (PC, phone) and it is always exposed to the internet for potential hacks and scams. It\nis good practice to deposit rewards on the stash account or to send them to another account on a\ncold wallet.'})}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.img,{alt:"staking",src:t(5942).A+"",width:"1920",height:"800"})}),"\n",(0,a.jsxs)(n.p,{children:["This hierarchy of separate keys for stash and staking accounts was designed to add a layer of\nprotection to nominators and validator operators. The more often one exposes and uses a private key,\nthe higher its vulnerability for hacks or scams. So, if one uses a key for multiple roles on a\nblockchain network, it is likely that the account can get compromised. Note that the damage linked\nto stolen private keys is different depending on the type of account derivation. In the case of soft\nderivation, all derived accounts are compromised. More information about account derivation can be\nfound ",(0,a.jsx)(n.a,{href:"../learn/learn-accounts.md/#derivation-paths",children:"here"}),"."]}),"\n",(0,a.jsxs)(n.admonition,{type:"info",children:[(0,a.jsx)(n.p,{children:"For Ledger users staking directly on Ledger Live, currently, there is no option to use separate\nstash and staking proxy accounts."}),(0,a.jsxs)(n.p,{children:["Ledger devices are now supported in ",(0,a.jsx)(n.a,{href:"https://www.subwallet.app/download.html",children:"SubWallet"})," and\n",(0,a.jsx)(n.a,{href:"https://talisman.xyz/",children:"Talisman"})," extension. Users can import their Ledger accounts in the extension\nand use them as a stash in staking. You can find more information about SubWallet, Talisman and\nother wallets that officially secured funding from the treasury\n",(0,a.jsx)(n.a,{href:"/docs/wallets-and-extensions",children:"here"}),"."]})]}),"\n",(0,a.jsx)(n.h3,{id:"claiming-staking-rewards",children:"Claiming Staking Rewards"}),"\n",(0,a.jsx)(n.p,{children:"Note that Kusama runs approximately 4x as fast as Polkadot, except for block production times.\nPolkadot will also produce blocks at approximately six-second intervals."}),"\n",(0,a.jsxs)(n.p,{children:["Rewards are calculated per era (approximately six hours on Kusama and twenty-four hours on\nPolkadot). These rewards are calculated based on era points, which have a probabilistic component.\nIn other words, there may be slight differences in your rewards from era to era, and even amongst\nvalidators in the active set at the same time. These variations should cancel out over a long enough\ntimeline. See the page on ",(0,a.jsx)(n.a,{href:"/docs/maintain-guides-validator-payout",children:"Validator Payout Guide"}),"."]}),"\n",(0,a.jsxs)(n.p,{children:["The distribution of staking rewards to the nominators is not automatic and needs to be triggered by\nsomeone. Typically the validators take care of this, but anyone can permissionlessly trigger rewards\npayout for all the nominators whose stake has backed a specific validator in the active set of that\nera. Staking rewards are kept available for\n",(0,a.jsx)(n.a,{href:"/docs/chain-state-values#staking-reward-retention",children:"a limited amount of time"}),"."]}),"\n",(0,a.jsxs)(n.p,{children:["For more information on why this is so, see the page on ",(0,a.jsx)(n.a,{href:"/docs/learn-staking-advanced",children:"simple payouts"}),"."]}),"\n",(0,a.jsxs)(n.admonition,{title:"Payouts",type:"info",children:[(0,a.jsxs)(n.p,{children:["Payouts are unclaimed rewards waiting to be paid out to both validators and nominators. If you go to\nthe Staking payouts page on ",(0,a.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/staking",children:"Polkadot-JS"}),", you will see a\nlist of all validators that you have nominated in the past 84 eras and for which you have not yet\nreceived a payout. The payout page is visible only to stakers."]}),(0,a.jsx)(n.p,{children:"Each validator as well as their nominators have the option to trigger the payout for all unclaimed\neras. Note that this will pay everyone who was nominating that validator during those eras.\nTherefore, you may not see anything in this tab, yet still have received a payout if somebody\n(generally, but not necessarily, another nominator or the validator operator) has triggered the\npayout for that validator for that era."})]}),"\n",(0,a.jsx)(n.admonition,{title:"Time limit to claim staking rewards",type:"warning",children:(0,a.jsx)(n.p,{children:"If nobody claims your staking rewards within 84 eras, then you will not be able to claim them and\nthey will be lost. Additionally, if the validator unbonds all their own stake, any pending payouts\nwill also be lost."})}),"\n",(0,a.jsx)(n.p,{children:"Rewards can be directed to the same account used to sign the payout or to a completely unrelated\naccount. It is also possible to top-up / withdraw some bonded tokens without having to un-stake all\nstaked tokens."}),"\n",(0,a.jsxs)(n.p,{children:["If you wish to know if you received a payout, you will have to check via a block explorer. See\n",(0,a.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000168954-how-can-i-see-my-staking-rewards-",children:"the relevant Support page"}),"\nfor details. For specific details about validator payouts, please see\n",(0,a.jsx)(n.a,{href:"/docs/maintain-guides-validator-payout",children:"this guide"}),"."]}),"\n",(0,a.jsx)(n.h3,{id:"chilling",children:"Chilling"}),"\n",(0,a.jsx)(n.p,{children:"Chilling is the act of stepping back from any nominating or validating. It can be done by a\nvalidator or nominator at any time, taking effect in the next era."}),"\n",(0,a.jsx)(n.p,{children:"Chilling can be validator-initiated, e.g. if there is a planned outage in the validator's\nsurroundings or hosting provider, and the validator wants to exit to protect themselves against\nslashing. Chilling will keep the validator active in the current era, but will move them to the\ninactive set in the next. The validator will not lose their nominators."}),"\n",(0,a.jsxs)(n.p,{children:['For more on chilling, see the "',(0,a.jsx)(n.a,{href:"/docs/maintain-guides-how-to-chill",children:"How to Chill"}),'" page on\nthis wiki.']}),"\n",(0,a.jsx)(n.h3,{id:"fast-unstake",children:"Fast Unstake"}),"\n",(0,a.jsx)(n.admonition,{title:"Fast Unstaking feature is live!",type:"info",children:(0,a.jsx)(n.p,{children:"If you accidentally bonded your tokens or your bonded tokens never backed any active validator, you\ncan now unbond them immediately."})}),"\n",(0,a.jsxs)(n.p,{children:["If your bonded balance did not back any validators for a\n",(0,a.jsx)(n.a,{href:"/docs/chain-state-values#bounty-duration",children:"pre-determined period"}),", you are eligible to\nperform fast unstaking. The ",(0,a.jsx)(n.a,{href:"https://staking.polkadot.cloud/#/overview",children:"staking dashboard"})," will\nautomatically check if you qualify. For more information, visit the\n",(0,a.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000169433-can-i-transfer-dot-without-unbonding-and-waiting-28-days-",children:'"Fast Unstake" section in this support article'}),"."]}),"\n",(0,a.jsx)(n.h2,{id:"why-and-why-not-to-stake",children:"Why and Why not to Stake?"}),"\n",(0,a.jsx)(n.h3,{id:"pros-of-staking",children:"Pros of Staking"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:"Earn rewards for contributing to the network's security through staking."}),"\n",(0,a.jsxs)(n.li,{children:["Low barrier of entry through ",(0,a.jsx)(n.a,{href:"/docs/learn-nomination-pools",children:"Nomination Pools"}),"."]}),"\n",(0,a.jsxs)(n.li,{children:["Can choose ",(0,a.jsx)(n.a,{href:"/docs/chain-state-values#maximum-votes-per-nominator",children:"multiple validators"}),"\nwhich can help to decentralize the network through the sophisticated\n",(0,a.jsx)(n.a,{href:"learn-consensus.md/#nominated-proof-of-stake",children:"NPoS system"})]}),"\n",(0,a.jsx)(n.li,{children:"10% inflation/year of the tokens is primarily intended for staking rewards."}),"\n"]}),"\n",(0,a.jsx)(n.p,{children:"When the system staking rate matches with the ideal staking rate, the entire inflation of the\nnetwork is given away as the staking rewards."}),"\n",(0,a.jsx)(n.p,{children:"The ideal staking rate is a dynamic value - as the number of active parachains influences the\navailable liquidity that is available to secure the network."}),"\n",(0,a.jsxs)(n.p,{children:["Any divergence from the ideal staking rate will result in the distribution of a proportion of the\nnewly minted tokens through inflation to go to the treasury. Keep in mind that when the system's\nstaking rate is lower than the ideal staking rate, the annual nominal return rate will be higher,\nencouraging more users to use their tokens for staking. On the contrary, when the system staking\nrate is higher than the ideal staking rate, the annual nominal return will be less, encouraging some\nusers to withdraw. For in-depth understanding, check the\n",(0,a.jsx)(n.a,{href:"/docs/learn-staking-advanced#inflation",children:"inflation"})," section on the Wiki."]}),"\n",(0,a.jsx)(n.h3,{id:"cons-of-staking",children:"Cons of Staking"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["Tokens will be locked during the\n",(0,a.jsx)(n.a,{href:"/docs/chain-state-values#unbonding-duration",children:"unbonding period"})," and no rewards will be\nearned if you unbond."]}),"\n",(0,a.jsxs)(n.li,{children:["Possible punishment in case of the active validator found to be misbehaving (see\n",(0,a.jsx)(n.a,{href:"/docs/learn-offenses",children:"slashing"}),")."]}),"\n",(0,a.jsx)(n.li,{children:"Lack of liquidity i.e. You would not be able to use the tokens for participating in crowdloans or\ntransfer them to different account etc."}),"\n"]}),"\n",(0,a.jsx)(n.h4,{id:"unbonding-period-length",children:"Unbonding Period Length"}),"\n",(0,a.jsxs)(n.p,{children:["The ",(0,a.jsx)(n.a,{href:"/docs/chain-state-values#unbonding-duration",children:"unbonding period"})," provides a safety net\nfor slashing offenses identified in\n",(0,a.jsx)(n.a,{href:"https://research.web3.foundation/Polkadot/security/slashing/npos#slashing-in-past-eras",children:"past eras"}),",\nwhich can hold the respective validators and their nominators accountable. The unbonding period is\ncrucial in mitigating ex post facto slashing, particularly in guarding against long-range attacks.\nWhen a client encounters a chain finalized by\n",(0,a.jsx)(n.a,{href:"/docs/learn-consensus#finality-gadget-grandpa",children:"GRANDPA"})," that originates more than one\n",(0,a.jsx)(n.a,{href:"/docs/chain-state-values#unbonding-duration",children:"unbonding period"})," in the past, it lacks the\nsecurity of slashing protection."]}),"\n",(0,a.jsxs)(n.p,{children:["Essentially, this period establishes a cadence for synchronizing with the chain or acquiring a\ncheckpoint within a timeframe that engenders trust. It's worth noting that while the choice of\n",(0,a.jsx)(n.a,{href:"/docs/chain-state-values#unbonding-duration",children:"unbonding period length"})," is somewhat\narbitrary, it unquestionably provides a higher level of security compared to a shorter period."]}),"\n",(0,a.jsx)(n.h2,{id:"how-many-validators",children:"How many Validators?"}),"\n",(0,a.jsxs)(n.p,{children:["The top bound on the ",(0,a.jsx)(n.a,{href:"/docs/chain-state-values#active-validator-count",children:"number of validators"}),"\nhas not been determined yet, but should only be limited by the bandwidth strain of the network due\nto peer-to-peer message passing."]}),"\n",(0,a.jsx)(n.p,{children:"The estimate of the number of validators that Polkadot will have at maturity is around 1000, while\nKusama is already operating at this threshold."}),"\n",(0,a.jsx)(n.h2,{id:"why-am-i-not-receiving-rewards",children:"Why am I not receiving rewards?"}),"\n",(0,a.jsx)(n.p,{children:"Nominating is not a set-and-forget action. Nominators need to monitor their nominations and ensure\nthey are eligible to receive staking rewards. Otherwise, they would be risking their funds to secure\nthe chain with no reward. If you are bonding significantly more than the Minimum Active Bond and yet\nnot receiving rewards, your nominations are all waiting, or your active validator has 100%\ncommission. However, if you bond funds close to the Minimum Active Bond, there could be several\npossibilities for not receiving staking rewards. The table below can be used to troubleshoot why you\nmight not be receiving staking rewards using Polkadot-JS UI."}),"\n",(0,a.jsxs)(n.table,{children:[(0,a.jsx)(n.thead,{children:(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.th,{style:{textAlign:"center"},children:"Nomination Status"}),(0,a.jsx)(n.th,{style:{textAlign:"center"},children:"What's happening?"}),(0,a.jsx)(n.th,{style:{textAlign:"center"},children:"Causes"}),(0,a.jsx)(n.th,{style:{textAlign:"center"},children:"What to do?"})]})}),(0,a.jsxs)(n.tbody,{children:[(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{style:{textAlign:"center"},children:"Nominated validators are all in waiting status."}),(0,a.jsx)(n.td,{style:{textAlign:"center"},children:"Your stake has not been assigned to any of the nominated validators. You cannot earn rewards, nor be slashed in that era."}),(0,a.jsx)(n.td,{style:{textAlign:"center"},children:'Waiting validators are not in the active set in the current era and the stake backing them is not used to secure the network. In simple words, NPoS "does not see them".'}),(0,a.jsx)(n.td,{style:{textAlign:"center"},children:"Change your nominations. Try to select validators (with reasonable commission) that have high chances to end up in the active set."})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{style:{textAlign:"center"},children:"You have some inactive, and some waiting nominations."}),(0,a.jsx)(n.td,{style:{textAlign:"center"},children:'Validators shown as "Inactive" in your staking dashboard are still in the active set and are producing blocks in the current era, but your stake has not been assigned to any of them. You will not earn rewards if your stake is not backing an active validator. In this case, you cannot be slashed either.'}),(0,a.jsxs)(n.td,{style:{textAlign:"center"},children:[(0,a.jsx)(n.strong,{children:"Scenario 1:"})," You have bonded less than the Minimum Active Bond. ",(0,a.jsx)(n.strong,{children:"Scenario 2:"})," You have more than the Minimum Active Bond, but your account is at the tail end of the ",(0,a.jsx)(n.a,{href:"/docs/learn-staking-advanced#bags-list",children:"bags list"})," and within your bag there are accounts with less stake than you, in front of you."]}),(0,a.jsxs)(n.td,{style:{textAlign:"center"},children:[(0,a.jsx)(n.strong,{children:"Scenario 1:"})," Try bonding more funds. ",(0,a.jsx)(n.strong,{children:"Scenario 2:"})," Try to put your account in front of the accounts with less stake than you. Instructions available ",(0,a.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181018-i-have-more-than-the-minimum-bonded-but-i-m-not-getting-rewards",children:"here"})]})]})]})]}),"\n",(0,a.jsx)(n.admonition,{title:"Join a Nomination Pool",type:"tip",children:(0,a.jsxs)(n.p,{children:["By joining a ",(0,a.jsx)(n.a,{href:"/docs/learn-nomination-pools",children:"nomination pool"})," that is active and earning rewards, you\ncan start earning staking rewards with as low as 1 DOT. The nomination pools typically have a\ndedicated pool operator who ensures that the pool's stake is always backing an active validator and\nis receiving rewards."]})}),"\n",(0,a.jsx)(n.admonition,{title:"Bags List & Minimum Active Bond",type:"info",children:(0,a.jsxs)(n.p,{children:["You can find information about why you might not receive staking rewards on\n",(0,a.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000170805-why-am-i-not-getting-staking-rewards-",children:"this support page"}),"\nand ",(0,a.jsx)(n.a,{href:"https://youtu.be/hIIZRJLrBZA",children:"this video tutorial"}),"."]})}),"\n",(0,a.jsx)(n.h2,{id:"staking-faq",children:"Staking FAQ"}),"\n",(0,a.jsx)(n.admonition,{type:"info",children:(0,a.jsxs)(n.p,{children:["See\n",(0,a.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181959-staking-faq-s",children:"this support page"}),"\nfor the FAQs about staking."]})}),"\n",(0,a.jsx)(n.h2,{id:"resources",children:"Resources"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.a,{href:"https://medium.com/web3foundation/how-nominated-proof-of-stake-will-work-in-polkadot-377d70c6bd43",children:"How Nominated Proof of Stake will work in Polkadot"})," -\nBlog post by Web3 Foundation researcher Alfonso Cevallos covering NPoS in Polkadot."]}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"/docs/maintain-guides-secure-validator",children:"Validator setup"})}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.a,{href:"https://decentradot.com/polkadot-validator-selector/",children:"Polkadot validator selector tool"})," - A tool\nthat helps nominators find reliable validators that meet quality-control criteria, including\ncommission rates, verified identity, etc."]}),"\n"]}),"\n",(0,a.jsx)(n.hr,{}),"\n",(0,a.jsx)(n.admonition,{title:"Polkadot-JS Guides",type:"info",children:(0,a.jsxs)(n.p,{children:["If you are an advanced user, see the ",(0,a.jsx)(n.a,{href:"./learn-guides-staking",children:"Polkadot-JS guides about staking"}),"."]})})]})}function u(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(c,{...e})}):c(e)}},67141:(e,n,t)=>{t.d(n,{A:()=>i});var a=t(96540),o=t(74848);const i=function(e){var n,t=e.message,i=(0,a.useState)(!0),s=i[0],r=i[1];return(0,o.jsx)(o.Fragment,{children:s&&(0,o.jsxs)("div",{className:"message-box",children:[(0,o.jsx)("button",{className:"close-button",onClick:function(){r(!1)},children:"\u2716 "}),(0,o.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(n=t,n.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},90997:(e,n,t)=>{t.d(n,{A:()=>a});const a=t.p+"assets/images/reward-risk-fee9f991186d4097ca3d3f0a713f4ad4.png"},5942:(e,n,t)=>{t.d(n,{A:()=>a});const a=t.p+"assets/images/stash-and-staking-proxy-ea4d09387a4b56d1349ee896427d9f1d.png"},28453:(e,n,t)=>{t.d(n,{R:()=>s,x:()=>r});var a=t(96540);const o={},i=a.createContext(o);function s(e){const n=a.useContext(i);return a.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:s(e.components),a.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/165.3f747033.js b/assets/js/165.3f747033.js new file mode 100644 index 000000000000..f239dbc3bd50 --- /dev/null +++ b/assets/js/165.3f747033.js @@ -0,0 +1,2 @@ +/*! For license information please see 165.3f747033.js.LICENSE.txt */ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[165],{90165:(e,t,n)=>{function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}}}n.d(t,{A:()=>Xc});var h="undefined"==typeof window?null:window,p=h?h.navigator:null;h&&h.document;var f=r(""),g=r({}),v=r((function(){})),y="undefined"==typeof HTMLElement?"undefined":r(HTMLElement),m=function(e){return e&&e.instanceString&&x(e.instanceString)?e.instanceString():null},b=function(e){return null!=e&&r(e)==f},x=function(e){return null!=e&&r(e)===v},w=function(e){return!S(e)&&(Array.isArray?Array.isArray(e):null!=e&&e instanceof Array)},E=function(e){return null!=e&&r(e)===g&&!w(e)&&e.constructor===Object},k=function(e){return null!=e&&r(e)===r(1)&&!isNaN(e)},C=function(e){return"undefined"===y?void 0:null!=e&&e instanceof HTMLElement},S=function(e){return P(e)||D(e)},P=function(e){return"collection"===m(e)&&e._private.single},D=function(e){return"collection"===m(e)&&!e._private.single},T=function(e){return"core"===m(e)},_=function(e){return"stylesheet"===m(e)},M=function(e){return null==e||!(""!==e&&!e.match(/^\s+$/))},B=function(e){return function(e){return null!=e&&r(e)===g}(e)&&x(e.then)},N=function(e,t){t||(t=function(){if(1===arguments.length)return arguments[0];if(0===arguments.length)return"undefined";for(var e=[],t=0;tt?1:0},Y=null!=Object.assign?Object.assign.bind(Object):function(e){for(var t=arguments,n=1;n255)return;t.push(Math.floor(i))}var o=r[1]||r[2]||r[3],s=r[1]&&r[2]&&r[3];if(o&&!s)return;var l=n[4];if(void 0!==l){if((l=parseFloat(l))<0||l>1)return;t.push(l)}}return t}(e)||function(e){var t,n,r,a,i,o,s,l;function u(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}var c=new RegExp("^"+F+"$").exec(e);if(c){if((n=parseInt(c[1]))<0?n=(360- -1*n%360)%360:n>360&&(n%=360),n/=360,(r=parseFloat(c[2]))<0||r>100)return;if(r/=100,(a=parseFloat(c[3]))<0||a>100)return;if(a/=100,void 0!==(i=c[4])&&((i=parseFloat(i))<0||i>1))return;if(0===r)o=s=l=Math.round(255*a);else{var d=a<.5?a*(1+r):a+r-a*r,h=2*a-d;o=Math.round(255*u(h,d,n+1/3)),s=Math.round(255*u(h,d,n)),l=Math.round(255*u(h,d,n-1/3))}t=[o,s,l,i]}return t}(e)},W={transparent:[0,0,0,0],aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],grey:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},H=function(e){for(var t=e.map,n=e.keys,r=n.length,a=0;a=t||n<0||d&&e-u>=i}function g(){var e=J();if(f(e))return v(e);s=setTimeout(g,function(e){var n=t-(e-l);return d?Ee(n,i-(e-u)):n}(e))}function v(e){return s=void 0,h&&r?p(e):(r=a=void 0,o)}function y(){var e=J(),n=f(e);if(r=arguments,a=this,l=e,n){if(void 0===s)return function(e){return u=e,s=setTimeout(g,t),c?p(e):o}(l);if(d)return clearTimeout(s),s=setTimeout(g,t),p(l)}return void 0===s&&(s=setTimeout(g,t)),o}return t=xe(t)||0,G(n)&&(c=!!n.leading,i=(d="maxWait"in n)?we(xe(n.maxWait)||0,t):i,h="trailing"in n?!!n.trailing:h),y.cancel=function(){void 0!==s&&clearTimeout(s),u=0,r=l=a=s=void 0},y.flush=function(){return void 0===s?o:v(J())},y},Ce=h?h.performance:null,Se=Ce&&Ce.now?function(){return Ce.now()}:function(){return Date.now()},Pe=function(){if(h){if(h.requestAnimationFrame)return function(e){h.requestAnimationFrame(e)};if(h.mozRequestAnimationFrame)return function(e){h.mozRequestAnimationFrame(e)};if(h.webkitRequestAnimationFrame)return function(e){h.webkitRequestAnimationFrame(e)};if(h.msRequestAnimationFrame)return function(e){h.msRequestAnimationFrame(e)}}return function(e){e&&setTimeout((function(){e(Se())}),1e3/60)}}(),De=function(e){return Pe(e)},Te=Se,_e=9261,Me=5381,Be=function(e){for(var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_e;!(t=e.next()).done;)n=65599*n+t.value|0;return n},Ne=function(e){return 65599*(arguments.length>1&&void 0!==arguments[1]?arguments[1]:_e)+e|0},ze=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Me;return(t<<5)+t+e|0},Ie=function(e){return 2097152*e[0]+e[1]},Ae=function(e,t){return[Ne(e[0],t[0]),ze(e[1],t[1])]},Le=function(e,t){var n={value:0,done:!1},r=0,a=e.length;return Be({next:function(){return r=0&&(e[r]!==t||(e.splice(r,1),!n));r--);},nt=function(e){e.splice(0,e.length)},rt=function(e,t,n){return n&&(t=A(n,t)),e[t]},at=function(e,t,n,r){n&&(t=A(n,t)),e[t]=r},it="undefined"!=typeof Map?Map:function(){function e(){a(this,e),this._obj={}}return o(e,[{key:"set",value:function(e,t){return this._obj[e]=t,this}},{key:"delete",value:function(e){return this._obj[e]=void 0,this}},{key:"clear",value:function(){this._obj={}}},{key:"has",value:function(e){return void 0!==this._obj[e]}},{key:"get",value:function(e){return this._obj[e]}}]),e}(),ot=function(){function e(t){if(a(this,e),this._obj=Object.create(null),this.size=0,null!=t){var n;n=null!=t.instanceString&&t.instanceString()===this.instanceString()?t.toArray():t;for(var r=0;r2&&void 0!==arguments[2])||arguments[2];if(void 0!==e&&void 0!==t&&T(e)){var r=t.group;if(null==r&&(r=t.data&&null!=t.data.source&&null!=t.data.target?"edges":"nodes"),"nodes"===r||"edges"===r){this.length=1,this[0]=this;var a=this._private={cy:e,single:!0,data:t.data||{},position:t.position||{x:0,y:0},autoWidth:void 0,autoHeight:void 0,autoPadding:void 0,compoundBoundsClean:!1,listeners:[],group:r,style:{},rstyle:{},styleCxts:[],styleKeys:{},removed:!0,selected:!!t.selected,selectable:void 0===t.selectable||!!t.selectable,locked:!!t.locked,grabbed:!1,grabbable:void 0===t.grabbable||!!t.grabbable,pannable:void 0===t.pannable?"edges"===r:!!t.pannable,active:!1,classes:new st,animation:{current:[],queue:[]},rscratch:{},scratch:t.scratch||{},edges:[],children:[],parent:t.parent&&t.parent.isNode()?t.parent:null,traversalCache:{},backgrounding:!1,bbCache:null,bbCacheShift:{x:0,y:0},bodyBounds:null,overlayBounds:null,labelBounds:{all:null,source:null,target:null,main:null},arrowBounds:{source:null,target:null,"mid-source":null,"mid-target":null}};if(null==a.position.x&&(a.position.x=0),null==a.position.y&&(a.position.y=0),t.renderedPosition){var i=t.renderedPosition,o=e.pan(),s=e.zoom();a.position={x:(i.x-o.x)/s,y:(i.y-o.y)/s}}var l=[];w(t.classes)?l=t.classes:b(t.classes)&&(l=t.classes.split(/\s+/));for(var u=0,c=l.length;ut?1:0},u=function(e,t,a,i,o){var s;if(null==a&&(a=0),null==o&&(o=n),a<0)throw new Error("lo must be non-negative");for(null==i&&(i=e.length);an;0<=n?t++:t--)u.push(t);return u}.apply(this).reverse()).length;ig;0<=g?++h:--h)v.push(i(e,r));return v},f=function(e,t,r,a){var i,o,s;for(null==a&&(a=n),i=e[r];r>t&&a(i,o=e[s=r-1>>1])<0;)e[r]=o,r=s;return e[r]=i},g=function(e,t,r){var a,i,o,s,l;for(null==r&&(r=n),i=e.length,l=t,o=e[t],a=2*t+1;a0;){var k=y.pop(),C=g(k),S=k.id();if(d[S]=C,C!==1/0)for(var P=k.neighborhood().intersect(p),D=0;D0)for(n.unshift(t);c[a];){var i=c[a];n.unshift(i.edge),n.unshift(i.node),a=(r=i.node).id()}return o.spawn(n)}}}},gt={kruskal:function(e){e=e||function(e){return 1};for(var t=this.byGroup(),n=t.nodes,r=t.edges,a=n.length,i=new Array(a),o=n,s=function(e){for(var t=0;t0;){if(l=g.pop(),u=l.id(),v.delete(u),w++,u===d){for(var E=[],k=a,C=d,S=m[C];E.unshift(k),null!=S&&E.unshift(S),null!=(k=y[C]);)S=m[C=k.id()];return{found:!0,distance:h[u],path:this.spawn(E),steps:w}}f[u]=!0;for(var P=l._private.edges,D=0;DD&&(p[P]=D,y[P]=S,m[P]=w),!a){var T=S*u+C;!a&&p[T]>D&&(p[T]=D,y[T]=C,m[T]=w)}}}for(var _=0;_1&&void 0!==arguments[1]?arguments[1]:i,r=[],a=m(e);;){if(null==a)return t.spawn();var o=y(a),l=o.edge,u=o.pred;if(r.unshift(a[0]),a.same(n)&&r.length>0)break;null!=l&&r.unshift(l),a=u}return s.spawn(r)},hasNegativeWeightCycle:f,negativeWeightCycles:g}}},Et=Math.sqrt(2),kt=function(e,t,n){0===n.length&&Ke("Karger-Stein must be run on a connected (sub)graph");for(var r=n[e],a=r[1],i=r[2],o=t[a],s=t[i],l=n,u=l.length-1;u>=0;u--){var c=l[u],d=c[1],h=c[2];(t[d]===o&&t[h]===s||t[d]===s&&t[h]===o)&&l.splice(u,1)}for(var p=0;pr;){var a=Math.floor(Math.random()*t.length);t=kt(a,e,t),n--}return t},St={kargerStein:function(){var e=this,t=this.byGroup(),n=t.nodes,r=t.edges;r.unmergeBy((function(e){return e.isLoop()}));var a=n.length,i=r.length,o=Math.ceil(Math.pow(Math.log(a)/Math.LN2,2)),s=Math.floor(a/Et);if(!(a<2)){for(var l=[],u=0;u0?1:e<0?-1:0},Nt=function(e,t){return Math.sqrt(zt(e,t))},zt=function(e,t){var n=t.x-e.x,r=t.y-e.y;return n*n+r*r},It=function(e){for(var t=e.length,n=0,r=0;r=e.x1&&e.y2>=e.y1)return{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,w:e.x2-e.x1,h:e.y2-e.y1};if(null!=e.w&&null!=e.h&&e.w>=0&&e.h>=0)return{x1:e.x1,y1:e.y1,x2:e.x1+e.w,y2:e.y1+e.h,w:e.w,h:e.h}}},Vt=function(e,t){e.x1=Math.min(e.x1,t.x1),e.x2=Math.max(e.x2,t.x2),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,t.y1),e.y2=Math.max(e.y2,t.y2),e.h=e.y2-e.y1},Ft=function(e,t,n){e.x1=Math.min(e.x1,t),e.x2=Math.max(e.x2,t),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,n),e.y2=Math.max(e.y2,n),e.h=e.y2-e.y1},jt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.x1-=t,e.x2+=t,e.y1-=t,e.y2+=t,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},qt=function(e){var t,n,r,a,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0];if(1===i.length)t=n=r=a=i[0];else if(2===i.length)t=r=i[0],a=n=i[1];else if(4===i.length){var o=l(i,4);t=o[0],n=o[1],r=o[2],a=o[3]}return e.x1-=a,e.x2+=n,e.y1-=t,e.y2+=r,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},Yt=function(e,t){e.x1=t.x1,e.y1=t.y1,e.x2=t.x2,e.y2=t.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1},Xt=function(e,t){return!(e.x1>t.x2)&&(!(t.x1>e.x2)&&(!(e.x2t.y2)&&!(t.y1>e.y2)))))))},Wt=function(e,t,n){return e.x1<=t&&t<=e.x2&&e.y1<=n&&n<=e.y2},Ht=function(e,t){return Wt(e,t.x1,t.y1)&&Wt(e,t.x2,t.y2)},Kt=function(e,t,n,r,a,i,o){var s,l,u=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"auto",c="auto"===u?hn(a,i):u,d=a/2,h=i/2,p=(c=Math.min(c,d,h))!==d,f=c!==h;if(p){var g=r-h-o;if((s=on(e,t,n,r,n-d+c-o,g,n+d-c+o,g,!1)).length>0)return s}if(f){var v=n+d+o;if((s=on(e,t,n,r,v,r-h+c-o,v,r+h-c+o,!1)).length>0)return s}if(p){var y=r+h+o;if((s=on(e,t,n,r,n-d+c-o,y,n+d-c+o,y,!1)).length>0)return s}if(f){var m=n-d-o;if((s=on(e,t,n,r,m,r-h+c-o,m,r+h-c+o,!1)).length>0)return s}var b=n-d+c,x=r-h+c;if((l=rn(e,t,n,r,b,x,c+o)).length>0&&l[0]<=b&&l[1]<=x)return[l[0],l[1]];var w=n+d-c,E=r-h+c;if((l=rn(e,t,n,r,w,E,c+o)).length>0&&l[0]>=w&&l[1]<=E)return[l[0],l[1]];var k=n+d-c,C=r+h-c;if((l=rn(e,t,n,r,k,C,c+o)).length>0&&l[0]>=k&&l[1]>=C)return[l[0],l[1]];var S=n-d+c,P=r+h-c;return(l=rn(e,t,n,r,S,P,c+o)).length>0&&l[0]<=S&&l[1]>=P?[l[0],l[1]]:[]},Gt=function(e,t,n,r,a,i,o){var s=o,l=Math.min(n,a),u=Math.max(n,a),c=Math.min(r,i),d=Math.max(r,i);return l-s<=e&&e<=u+s&&c-s<=t&&t<=d+s},Ut=function(e,t,n,r,a,i,o,s,l){var u=Math.min(n,o,a)-l,c=Math.max(n,o,a)+l,d=Math.min(r,s,i)-l,h=Math.max(r,s,i)+l;return!(ec||th)},Zt=function(e,t,n,r,a,i,o,s){var l=[];!function(e,t,n,r,a){var i,o,s,l,u,c,d,h;0===e&&(e=1e-5),s=-27*(r/=e)+(t/=e)*(9*(n/=e)-t*t*2),i=(o=(3*n-t*t)/9)*o*o+(s/=54)*s,a[1]=0,d=t/3,i>0?(u=(u=s+Math.sqrt(i))<0?-Math.pow(-u,1/3):Math.pow(u,1/3),c=(c=s-Math.sqrt(i))<0?-Math.pow(-c,1/3):Math.pow(c,1/3),a[0]=-d+u+c,d+=(u+c)/2,a[4]=a[2]=-d,d=Math.sqrt(3)*(-c+u)/2,a[3]=d,a[5]=-d):(a[5]=a[3]=0,0===i?(h=s<0?-Math.pow(-s,1/3):Math.pow(s,1/3),a[0]=2*h-d,a[4]=a[2]=-(h+d)):(l=(o=-o)*o*o,l=Math.acos(s/Math.sqrt(l)),h=2*Math.sqrt(o),a[0]=-d+h*Math.cos(l/3),a[2]=-d+h*Math.cos((l+2*Math.PI)/3),a[4]=-d+h*Math.cos((l+4*Math.PI)/3)))}(1*n*n-4*n*a+2*n*o+4*a*a-4*a*o+o*o+r*r-4*r*i+2*r*s+4*i*i-4*i*s+s*s,9*n*a-3*n*n-3*n*o-6*a*a+3*a*o+9*r*i-3*r*r-3*r*s-6*i*i+3*i*s,3*n*n-6*n*a+n*o-n*e+2*a*a+2*a*e-o*e+3*r*r-6*r*i+r*s-r*t+2*i*i+2*i*t-s*t,1*n*a-n*n+n*e-a*e+r*i-r*r+r*t-i*t,l);for(var u=[],c=0;c<6;c+=2)Math.abs(l[c+1])<1e-7&&l[c]>=0&&l[c]<=1&&u.push(l[c]);u.push(1),u.push(0);for(var d,h,p,f=-1,g=0;g=0?pl?(e-a)*(e-a)+(t-i)*(t-i):u-d},Qt=function(e,t,n){for(var r,a,i,o,s=0,l=0;l=e&&e>=i||r<=e&&e<=i))continue;(e-r)/(i-r)*(o-a)+a>t&&s++}return s%2!=0},Jt=function(e,t,n,r,a,i,o,s,l){var u,c=new Array(n.length);null!=s[0]?(u=Math.atan(s[1]/s[0]),s[0]<0?u+=Math.PI/2:u=-u-Math.PI/2):u=s;for(var d,h=Math.cos(-u),p=Math.sin(-u),f=0;f0){var g=tn(c,-l);d=en(g)}else d=c;return Qt(e,t,d)},en=function(e){for(var t,n,r,a,i,o,s,l,u=new Array(e.length/2),c=0;c=0&&f<=1&&v.push(f),g>=0&&g<=1&&v.push(g),0===v.length)return[];var y=v[0]*s[0]+e,m=v[0]*s[1]+t;return v.length>1?v[0]==v[1]?[y,m]:[y,m,v[1]*s[0]+e,v[1]*s[1]+t]:[y,m]},an=function(e,t,n){return t<=e&&e<=n||n<=e&&e<=t?e:e<=t&&t<=n||n<=t&&t<=e?t:n},on=function(e,t,n,r,a,i,o,s,l){var u=e-a,c=n-e,d=o-a,h=t-i,p=r-t,f=s-i,g=d*h-f*u,v=c*h-p*u,y=f*c-d*p;if(0!==y){var m=g/y,b=v/y,x=-.001;return x<=m&&m<=1.001&&x<=b&&b<=1.001||l?[e+m*c,t+m*p]:[]}return 0===g||0===v?an(e,n,o)===o?[o,s]:an(e,n,a)===a?[a,i]:an(a,o,n)===n?[n,r]:[]:[]},sn=function(e,t,n,r,a,i,o,s){var l,u,c,d,h,p,f=[],g=new Array(n.length),v=!0;if(null==i&&(v=!1),v){for(var y=0;y0){var m=tn(g,-s);u=en(m)}else u=g}else u=n;for(var b=0;bu&&(u=t)},d=function(e){return l[e]},h=0;h0?b.edgesTo(m)[0]:m.edgesTo(b)[0];var w=r(x);m=m.id(),h[m]>h[v]+w&&(h[m]=h[v]+w,p.nodes.indexOf(m)<0?p.push(m):p.updateItem(m),u[m]=0,l[m]=[]),h[m]==h[v]+w&&(u[m]=u[m]+u[v],l[m].push(v))}else for(var E=0;E0;){for(var P=n.pop(),D=0;D0&&o.push(n[s]);0!==o.length&&a.push(r.collection(o))}return a}(c,l,t,r);return b=function(e){for(var t=0;t5&&void 0!==arguments[5]?arguments[5]:zn,o=r,s=0;s=2?Vn(e,t,n,0,Ln,On):Vn(e,t,n,0,An)},squaredEuclidean:function(e,t,n){return Vn(e,t,n,0,Ln)},manhattan:function(e,t,n){return Vn(e,t,n,0,An)},max:function(e,t,n){return Vn(e,t,n,-1/0,Rn)}};function jn(e,t,n,r,a,i){var o;return o=x(e)?e:Fn[e]||Fn.euclidean,0===t&&x(e)?o(a,i):o(t,n,r,a,i)}Fn["squared-euclidean"]=Fn.squaredEuclidean,Fn.squaredeuclidean=Fn.squaredEuclidean;var qn=et({k:2,m:2,sensitivityThreshold:1e-4,distance:"euclidean",maxIterations:10,attributes:[],testMode:!1,testCentroids:null}),Yn=function(e){return qn(e)},Xn=function(e,t,n,r,a){var i="kMedoids"!==a?function(e){return n[e]}:function(e){return r[e](n)},o=n,s=t;return jn(e,r.length,i,(function(e){return r[e](t)}),o,s)},Wn=function(e,t,n){for(var r=n.length,a=new Array(r),i=new Array(r),o=new Array(t),s=null,l=0;ln)return!1}return!0},Zn=function(e,t,n){for(var r=0;ra&&(a=t[l][u],i=u);o[i].push(e[l])}for(var c=0;c=a.threshold||"dendrogram"===a.mode&&1===e.length)return!1;var p,f=t[o],g=t[r[o]];p="dendrogram"===a.mode?{left:f,right:g,key:f.key}:{value:f.value.concat(g.value),key:f.key},e[f.index]=p,e.splice(g.index,1),t[f.key]=p;for(var v=0;vn[g.key][y.key]&&(i=n[g.key][y.key])):"max"===a.linkage?(i=n[f.key][y.key],n[f.key][y.key]1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];arguments.length>3&&void 0!==arguments[3]&&!arguments[3]?(n0&&e.splice(0,t)):e=e.slice(t,n);for(var i=0,o=e.length-1;o>=0;o--){var s=e[o];a?isFinite(s)||(e[o]=-1/0,i++):e.splice(o,1)}r&&e.sort((function(e,t){return e-t}));var l=e.length,u=Math.floor(l/2);return l%2!=0?e[u+1+i]:(e[u-1+i]+e[u+i])/2}(e):"mean"===t?function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=0,a=0,i=t;i1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=1/0,a=t;a1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=-1/0,a=t;ao&&(i=l,o=t[a*e+l])}i>0&&r.push(i)}for(var u=0;u=D?(T=D,D=M,_=B):M>T&&(T=M);for(var N=0;N0?1:0;C[E%u.minIterations*t+R]=V,O+=V}if(O>0&&(E>=u.minIterations-1||E==u.maxIterations-1)){for(var F=0,j=0;j0&&r.push(a);return r}(t,i,o),X=function(e,t,n){for(var r=fr(e,t,n),a=0;al&&(s=u,l=c)}n[a]=i[s]}return fr(e,t,n)}(t,r,Y),W={},H=0;H1||o>1)&&(u=!0),c[t]=[],e.outgoers().forEach((function(e){e.isEdge()&&c[t].push(e.id())}))}else d[t]=[void 0,e.target().id()]})):l.forEach((function(e){var t=e.id();e.isNode()?(e.degree(!0)%2&&(n?r?u=!0:r=t:n=t),c[t]=[],e.connectedEdges().forEach((function(e){return c[t].push(e.id())}))):d[t]=[e.source().id(),e.target().id()]}));var h={found:!1,trail:void 0};if(u)return h;if(r&&n)if(s){if(a&&r!=a)return h;a=r}else{if(a&&r!=a&&n!=a)return h;a||(a=r)}else a||(a=l[0].id());var p=function(e){for(var t,n,r,a=e,i=[e];c[a].length;)t=c[a].shift(),n=d[t][0],a!=(r=d[t][1])?(c[r]=c[r].filter((function(e){return e!=t})),a=r):s||a==n||(c[n]=c[n].filter((function(e){return e!=t})),a=n),i.unshift(t),i.unshift(a);return i},f=[],g=[];for(g=p(a);1!=g.length;)0==c[g[0]].length?(f.unshift(l.getElementById(g.shift())),f.unshift(l.getElementById(g.shift()))):g=p(g.shift()).concat(g);for(var v in f.unshift(l.getElementById(g.shift())),c)if(c[v].length)return h;return h.found=!0,h.trail=this.spawn(f,!0),h}},br=function(){var e=this,t={},n=0,r=0,a=[],i=[],o={},s=function s(l,u,c){l===c&&(r+=1),t[u]={id:n,low:n++,cutVertex:!1};var d,h,p,f,g=e.getElementById(u).connectedEdges().intersection(e);0===g.size()?a.push(e.spawn(e.getElementById(u))):g.forEach((function(n){d=n.source().id(),h=n.target().id(),(p=d===u?h:d)!==c&&(f=n.id(),o[f]||(o[f]=!0,i.push({x:u,y:p,edge:n})),p in t?t[u].low=Math.min(t[u].low,t[p].id):(s(l,p,u),t[u].low=Math.min(t[u].low,t[p].low),t[u].id<=t[p].low&&(t[u].cutVertex=!0,function(n,r){for(var o=i.length-1,s=[],l=e.spawn();i[o].x!=n||i[o].y!=r;)s.push(i.pop().edge),o--;s.push(i.pop().edge),s.forEach((function(n){var r=n.connectedNodes().intersection(e);l.merge(n),r.forEach((function(n){var r=n.id(),a=n.connectedEdges().intersection(e);l.merge(n),t[r].cutVertex?l.merge(a.filter((function(e){return e.isLoop()}))):l.merge(a)}))})),a.push(l)}(u,p))))}))};e.forEach((function(e){if(e.isNode()){var n=e.id();n in t||(r=0,s(n,n),t[n].cutVertex=r>1)}}));var l=Object.keys(t).filter((function(e){return t[e].cutVertex})).map((function(t){return e.getElementById(t)}));return{cut:e.spawn(l),components:a}},xr=function(){var e=this,t={},n=0,r=[],a=[],i=e.spawn(e),o=function o(s){if(a.push(s),t[s]={index:n,low:n++,explored:!1},e.getElementById(s).connectedEdges().intersection(e).forEach((function(e){var n=e.target().id();n!==s&&(n in t||o(n),t[n].explored||(t[s].low=Math.min(t[s].low,t[n].low)))})),t[s].index===t[s].low){for(var l=e.spawn();;){var u=a.pop();if(l.merge(e.getElementById(u)),t[u].low=t[s].index,t[u].explored=!0,u===s)break}var c=l.edgesWith(l),d=l.merge(c);r.push(d),i=i.difference(d)}};return e.forEach((function(e){if(e.isNode()){var n=e.id();n in t||o(n)}})),{cut:i,components:r}},wr={};[ct,ft,gt,yt,bt,wt,St,vn,mn,xn,En,Nn,nr,cr,vr,mr,{hopcroftTarjanBiconnected:br,htbc:br,htb:br,hopcroftTarjanBiconnectedComponents:br},{tarjanStronglyConnected:xr,tsc:xr,tscc:xr,tarjanStronglyConnectedComponents:xr}].forEach((function(e){Y(wr,e)}));var Er=function e(t){if(!(this instanceof e))return new e(t);this.id="Thenable/1.0.7",this.state=0,this.fulfillValue=void 0,this.rejectReason=void 0,this.onFulfilled=[],this.onRejected=[],this.proxy={then:this.then.bind(this)},"function"==typeof t&&t.call(this,this.fulfill.bind(this),this.reject.bind(this))};Er.prototype={fulfill:function(e){return kr(this,1,"fulfillValue",e)},reject:function(e){return kr(this,2,"rejectReason",e)},then:function(e,t){var n=this,r=new Er;return n.onFulfilled.push(Pr(e,r,"fulfill")),n.onRejected.push(Pr(t,r,"reject")),Cr(n),r.proxy}};var kr=function(e,t,n,r){return 0===e.state&&(e.state=t,e[n]=r,Cr(e)),e},Cr=function(e){1===e.state?Sr(e,"onFulfilled",e.fulfillValue):2===e.state&&Sr(e,"onRejected",e.rejectReason)},Sr=function(e,t,n){if(0!==e[t].length){var r=e[t];e[t]=[];var a=function(){for(var e=0;e0:void 0}},clearQueue:function(){return function(){var e=this,t=void 0!==e.length?e:[e];if(!(this._private.cy||this).styleEnabled())return this;for(var n=0;n-1};var ga=function(e,t){var n=this.__data__,r=ca(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function va(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e0&&this.spawn(r).updateStyle().emit("class"),t},addClass:function(e){return this.toggleClass(e,!0)},hasClass:function(e){var t=this[0];return null!=t&&t._private.classes.has(e)},toggleClass:function(e,t){w(e)||(e=e.match(/\S+/g)||[]);for(var n=this,r=void 0===t,a=[],i=0,o=n.length;i0&&this.spawn(a).updateStyle().emit("class"),n},removeClass:function(e){return this.toggleClass(e,!1)},flashClass:function(e,t){var n=this;if(null==t)t=250;else if(0===t)return n;return n.addClass(e),setTimeout((function(){n.removeClass(e)}),t),n}};ai.className=ai.classNames=ai.classes;var ii={metaChar:"[\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:"\"(?:\\\\\"|[^\"])*\"|'(?:\\\\'|[^'])*'",number:O,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$",group:"node|edge|\\*",directedEdge:"\\s+->\\s+",undirectedEdge:"\\s+<->\\s+"};ii.variable="(?:[\\w-.]|(?:\\\\"+ii.metaChar+"))+",ii.className="(?:[\\w-]|(?:\\\\"+ii.metaChar+"))+",ii.value=ii.string+"|"+ii.number,ii.id=ii.variable,function(){var e,t,n;for(e=ii.comparatorOp.split("|"),n=0;n=0||"="!==t&&(ii.comparatorOp+="|\\!"+t)}();var oi=0,si=1,li=2,ui=3,ci=4,di=5,hi=6,pi=7,fi=8,gi=9,vi=10,yi=11,mi=12,bi=13,xi=14,wi=15,Ei=16,ki=17,Ci=18,Si=19,Pi=20,Di=[{selector:":selected",matches:function(e){return e.selected()}},{selector:":unselected",matches:function(e){return!e.selected()}},{selector:":selectable",matches:function(e){return e.selectable()}},{selector:":unselectable",matches:function(e){return!e.selectable()}},{selector:":locked",matches:function(e){return e.locked()}},{selector:":unlocked",matches:function(e){return!e.locked()}},{selector:":visible",matches:function(e){return e.visible()}},{selector:":hidden",matches:function(e){return!e.visible()}},{selector:":transparent",matches:function(e){return e.transparent()}},{selector:":grabbed",matches:function(e){return e.grabbed()}},{selector:":free",matches:function(e){return!e.grabbed()}},{selector:":removed",matches:function(e){return e.removed()}},{selector:":inside",matches:function(e){return!e.removed()}},{selector:":grabbable",matches:function(e){return e.grabbable()}},{selector:":ungrabbable",matches:function(e){return!e.grabbable()}},{selector:":animated",matches:function(e){return e.animated()}},{selector:":unanimated",matches:function(e){return!e.animated()}},{selector:":parent",matches:function(e){return e.isParent()}},{selector:":childless",matches:function(e){return e.isChildless()}},{selector:":child",matches:function(e){return e.isChild()}},{selector:":orphan",matches:function(e){return e.isOrphan()}},{selector:":nonorphan",matches:function(e){return e.isChild()}},{selector:":compound",matches:function(e){return e.isNode()?e.isParent():e.source().isParent()||e.target().isParent()}},{selector:":loop",matches:function(e){return e.isLoop()}},{selector:":simple",matches:function(e){return e.isSimple()}},{selector:":active",matches:function(e){return e.active()}},{selector:":inactive",matches:function(e){return!e.active()}},{selector:":backgrounding",matches:function(e){return e.backgrounding()}},{selector:":nonbackgrounding",matches:function(e){return!e.backgrounding()}}].sort((function(e,t){return function(e,t){return-1*q(e,t)}(e.selector,t.selector)})),Ti=function(){for(var e,t={},n=0;n0&&u.edgeCount>0)return Ue("The selector `"+e+"` is invalid because it uses both a compound selector and an edge selector"),!1;if(u.edgeCount>1)return Ue("The selector `"+e+"` is invalid because it uses multiple edge selectors"),!1;1===u.edgeCount&&Ue("The selector `"+e+"` is deprecated. Edge selectors do not take effect on changes to source and target nodes after an edge is added, for performance reasons. Use a class or data selector on edges instead, updating the class or data of an edge when your app detects a change in source or target nodes.")}return!0},toString:function(){if(null!=this.toStringCache)return this.toStringCache;for(var e=function(e){return null==e?"":e},t=function(t){return b(t)?'"'+t+'"':e(t)},n=function(e){return" "+e+" "},r=function(r,i){var o=r.type,s=r.value;switch(o){case oi:var l=e(s);return l.substring(0,l.length-1);case ui:var u=r.field,c=r.operator;return"["+u+n(e(c))+t(s)+"]";case di:var d=r.operator,h=r.field;return"["+e(d)+h+"]";case ci:return"["+r.field+"]";case hi:var p=r.operator;return"[["+r.field+n(e(p))+t(s)+"]]";case pi:return s;case fi:return"#"+s;case gi:return"."+s;case ki:case wi:return a(r.parent,i)+n(">")+a(r.child,i);case Ci:case Ei:return a(r.ancestor,i)+" "+a(r.descendant,i);case Si:var f=a(r.left,i),g=a(r.subject,i),v=a(r.right,i);return f+(f.length>0?" ":"")+g+v;case Pi:return""}},a=function(e,t){return e.checks.reduce((function(n,a,i){return n+(t===e&&0===i?"$":"")+r(a,t)}),"")},i="",o=0;o1&&o=0&&(t=t.replace("!",""),c=!0),t.indexOf("@")>=0&&(t=t.replace("@",""),u=!0),(o||l||u)&&(a=o||s?""+e:"",i=""+n),u&&(e=a=a.toLowerCase(),n=i=i.toLowerCase()),t){case"*=":r=a.indexOf(i)>=0;break;case"$=":r=a.indexOf(i,a.length-i.length)>=0;break;case"^=":r=0===a.indexOf(i);break;case"=":r=e===n;break;case">":d=!0,r=e>n;break;case">=":d=!0,r=e>=n;break;case"<":d=!0,r=e0;){var u=a.shift();t(u),i.add(u.id()),o&&r(a,i,u)}return e}function Gi(e,t,n){if(n.isParent())for(var r=n._private.children,a=0;a1&&void 0!==arguments[1])||arguments[1],Gi)},Hi.forEachUp=function(e){return Ki(this,e,!(arguments.length>1&&void 0!==arguments[1])||arguments[1],Ui)},Hi.forEachUpAndDown=function(e){return Ki(this,e,!(arguments.length>1&&void 0!==arguments[1])||arguments[1],Zi)},Hi.ancestors=Hi.parents,(Yi=Xi={data:ni.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),removeData:ni.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),scratch:ni.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:ni.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),rscratch:ni.data({field:"rscratch",allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}),removeRscratch:ni.removeData({field:"rscratch",triggerEvent:!1}),id:function(){var e=this[0];if(e)return e._private.data.id}}).attr=Yi.data,Yi.removeAttr=Yi.removeData;var $i,Qi,Ji=Xi,eo={};function to(e){return function(t){var n=this;if(void 0===t&&(t=!0),0!==n.length&&n.isNode()&&!n.removed()){for(var r=0,a=n[0],i=a._private.edges,o=0;ot})),minIndegree:no("indegree",(function(e,t){return et})),minOutdegree:no("outdegree",(function(e,t){return et}))}),Y(eo,{totalDegree:function(e){for(var t=0,n=this.nodes(),r=0;r0,c=u;u&&(l=l[0]);var d=c?l.position():{x:0,y:0};return a={x:s.x-d.x,y:s.y-d.y},void 0===e?a:a[e]}for(var h=0;h0,v=g;g&&(f=f[0]);var y=v?f.position():{x:0,y:0};void 0!==t?p.position(e,t+y[e]):void 0!==a&&p.position({x:a.x+y.x,y:a.y+y.y})}}else if(!i)return;return this}},$i.modelPosition=$i.point=$i.position,$i.modelPositions=$i.points=$i.positions,$i.renderedPoint=$i.renderedPosition,$i.relativePoint=$i.relativePosition;var io,oo,so=Qi;io=oo={},oo.renderedBoundingBox=function(e){var t=this.boundingBox(e),n=this.cy(),r=n.zoom(),a=n.pan(),i=t.x1*r+a.x,o=t.x2*r+a.x,s=t.y1*r+a.y,l=t.y2*r+a.y;return{x1:i,x2:o,y1:s,y2:l,w:o-i,h:l-s}},oo.dirtyCompoundBoundsCache=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.cy();return t.styleEnabled()&&t.hasCompoundNodes()?(this.forEachUp((function(t){if(t.isParent()){var n=t._private;n.compoundBoundsClean=!1,n.bbCache=null,e||t.emitAndNotify("bounds")}})),this):this},oo.updateCompoundBounds=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.cy();if(!t.styleEnabled()||!t.hasCompoundNodes())return this;if(!e&&t.batching())return this;function n(e){if(e.isParent()){var t=e._private,n=e.children(),r="include"===e.pstyle("compound-sizing-wrt-labels").value,a={width:{val:e.pstyle("min-width").pfValue,left:e.pstyle("min-width-bias-left"),right:e.pstyle("min-width-bias-right")},height:{val:e.pstyle("min-height").pfValue,top:e.pstyle("min-height-bias-top"),bottom:e.pstyle("min-height-bias-bottom")}},i=n.boundingBox({includeLabels:r,includeOverlays:!1,useCache:!1}),o=t.position;0!==i.w&&0!==i.h||((i={w:e.pstyle("width").pfValue,h:e.pstyle("height").pfValue}).x1=o.x-i.w/2,i.x2=o.x+i.w/2,i.y1=o.y-i.h/2,i.y2=o.y+i.h/2);var s=a.width.left.value;"px"===a.width.left.units&&a.width.val>0&&(s=100*s/a.width.val);var l=a.width.right.value;"px"===a.width.right.units&&a.width.val>0&&(l=100*l/a.width.val);var u=a.height.top.value;"px"===a.height.top.units&&a.height.val>0&&(u=100*u/a.height.val);var c=a.height.bottom.value;"px"===a.height.bottom.units&&a.height.val>0&&(c=100*c/a.height.val);var d=y(a.width.val-i.w,s,l),h=d.biasDiff,p=d.biasComplementDiff,f=y(a.height.val-i.h,u,c),g=f.biasDiff,v=f.biasComplementDiff;t.autoPadding=function(e,t,n,r){if("%"!==n.units)return"px"===n.units?n.pfValue:0;switch(r){case"width":return e>0?n.pfValue*e:0;case"height":return t>0?n.pfValue*t:0;case"average":return e>0&&t>0?n.pfValue*(e+t)/2:0;case"min":return e>0&&t>0?e>t?n.pfValue*t:n.pfValue*e:0;case"max":return e>0&&t>0?e>t?n.pfValue*e:n.pfValue*t:0;default:return 0}}(i.w,i.h,e.pstyle("padding"),e.pstyle("padding-relative-to").value),t.autoWidth=Math.max(i.w,a.width.val),o.x=(-h+i.x1+i.x2+p)/2,t.autoHeight=Math.max(i.h,a.height.val),o.y=(-g+i.y1+i.y2+v)/2}function y(e,t,n){var r=0,a=0,i=t+n;return e>0&&i>0&&(r=t/i*e,a=n/i*e),{biasDiff:r,biasComplementDiff:a}}}for(var r=0;re.x2?r:e.x2,e.y1=ne.y2?a:e.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1)},co=function(e,t){return null==t?e:uo(e,t.x1,t.y1,t.x2,t.y2)},ho=function(e,t,n){return rt(e,t,n)},po=function(e,t,n){if(!t.cy().headless()){var r,a,i=t._private,o=i.rstyle,s=o.arrowWidth/2;if("none"!==t.pstyle(n+"-arrow-shape").value){"source"===n?(r=o.srcX,a=o.srcY):"target"===n?(r=o.tgtX,a=o.tgtY):(r=o.midX,a=o.midY);var l=i.arrowBounds=i.arrowBounds||{},u=l[n]=l[n]||{};u.x1=r-s,u.y1=a-s,u.x2=r+s,u.y2=a+s,u.w=u.x2-u.x1,u.h=u.y2-u.y1,jt(u,1),uo(e,u.x1,u.y1,u.x2,u.y2)}}},fo=function(e,t,n){if(!t.cy().headless()){var r;r=n?n+"-":"";var a=t._private,i=a.rstyle;if(t.pstyle(r+"label").strValue){var o,s,l,u,c=t.pstyle("text-halign"),d=t.pstyle("text-valign"),h=ho(i,"labelWidth",n),p=ho(i,"labelHeight",n),f=ho(i,"labelX",n),g=ho(i,"labelY",n),v=t.pstyle(r+"text-margin-x").pfValue,y=t.pstyle(r+"text-margin-y").pfValue,m=t.isEdge(),b=t.pstyle(r+"text-rotation"),x=t.pstyle("text-outline-width").pfValue,w=t.pstyle("text-border-width").pfValue/2,E=t.pstyle("text-background-padding").pfValue,k=p,C=h,S=C/2,P=k/2;if(m)o=f-S,s=f+S,l=g-P,u=g+P;else{switch(c.value){case"left":o=f-C,s=f;break;case"center":o=f-S,s=f+S;break;case"right":o=f,s=f+C}switch(d.value){case"top":l=g-k,u=g;break;case"center":l=g-P,u=g+P;break;case"bottom":l=g,u=g+k}}var D=v-Math.max(x,w)-E-2,T=v+Math.max(x,w)+E+2,_=y-Math.max(x,w)-E-2,M=y+Math.max(x,w)+E+2;o+=D,s+=T,l+=_,u+=M;var B=n||"main",N=a.labelBounds,z=N[B]=N[B]||{};z.x1=o,z.y1=l,z.x2=s,z.y2=u,z.w=s-o,z.h=u-l,z.leftPad=D,z.rightPad=T,z.topPad=_,z.botPad=M;var I=m&&"autorotate"===b.strValue,A=null!=b.pfValue&&0!==b.pfValue;if(I||A){var L=I?ho(a.rstyle,"labelAngle",n):b.pfValue,O=Math.cos(L),R=Math.sin(L),V=(o+s)/2,F=(l+u)/2;if(!m){switch(c.value){case"left":V=s;break;case"right":V=o}switch(d.value){case"top":F=u;break;case"bottom":F=l}}var j=function(e,t){return{x:(e-=V)*O-(t-=F)*R+V,y:e*R+t*O+F}},q=j(o,l),Y=j(o,u),X=j(s,l),W=j(s,u);o=Math.min(q.x,Y.x,X.x,W.x),s=Math.max(q.x,Y.x,X.x,W.x),l=Math.min(q.y,Y.y,X.y,W.y),u=Math.max(q.y,Y.y,X.y,W.y)}var H=B+"Rot",K=N[H]=N[H]||{};K.x1=o,K.y1=l,K.x2=s,K.y2=u,K.w=s-o,K.h=u-l,uo(e,o,l,s,u),uo(a.labelBounds.all,o,l,s,u)}return e}},go=function(e,t){var n,r,a,i,o,s,l,u=e._private.cy,c=u.styleEnabled(),d=u.headless(),h=Rt(),p=e._private,f=e.isNode(),g=e.isEdge(),v=p.rstyle,y=f&&c?e.pstyle("bounds-expansion").pfValue:[0],m=function(e){return"none"!==e.pstyle("display").value},b=!c||m(e)&&(!g||m(e.source())&&m(e.target()));if(b){var x=0;c&&t.includeOverlays&&0!==e.pstyle("overlay-opacity").value&&(x=e.pstyle("overlay-padding").value);var w=0;c&&t.includeUnderlays&&0!==e.pstyle("underlay-opacity").value&&(w=e.pstyle("underlay-padding").value);var E=Math.max(x,w),k=0;if(c&&(k=e.pstyle("width").pfValue/2),f&&t.includeNodes){var C=e.position();o=C.x,s=C.y;var S=e.outerWidth()/2,P=e.outerHeight()/2;uo(h,n=o-S,a=s-P,r=o+S,i=s+P),c&&t.includeOutlines&&function(e,t){if(!t.cy().headless()){var n,r,a,i=t.pstyle("outline-opacity").value,o=t.pstyle("outline-width").value;if(i>0&&o>0){var s=t.pstyle("outline-offset").value,l=t.pstyle("shape").value,u=o+s,c=(e.w+2*u)/e.w,d=(e.h+2*u)/e.h,h=0;["diamond","pentagon","round-triangle"].includes(l)?(c=(e.w+2.4*u)/e.w,h=-u/3.6):["concave-hexagon","rhomboid","right-rhomboid"].includes(l)?c=(e.w+2.4*u)/e.w:"star"===l?(c=(e.w+2.8*u)/e.w,d=(e.h+2.6*u)/e.h,h=-u/3.8):"triangle"===l?(c=(e.w+2.8*u)/e.w,d=(e.h+2.4*u)/e.h,h=-u/1.4):"vee"===l&&(c=(e.w+4.4*u)/e.w,d=(e.h+3.8*u)/e.h,h=.5*-u);var p=e.h*d-e.h,f=e.w*c-e.w;if(qt(e,[Math.ceil(p/2),Math.ceil(f/2)]),0!==h){var g=(r=0,a=h,{x1:(n=e).x1+r,x2:n.x2+r,y1:n.y1+a,y2:n.y2+a,w:n.w,h:n.h});Vt(e,g)}}}}(h,e)}else if(g&&t.includeEdges)if(c&&!d){var D=e.pstyle("curve-style").strValue;if(n=Math.min(v.srcX,v.midX,v.tgtX),r=Math.max(v.srcX,v.midX,v.tgtX),a=Math.min(v.srcY,v.midY,v.tgtY),i=Math.max(v.srcY,v.midY,v.tgtY),uo(h,n-=k,a-=k,r+=k,i+=k),"haystack"===D){var T=v.haystackPts;if(T&&2===T.length){if(n=T[0].x,a=T[0].y,n>(r=T[1].x)){var _=n;n=r,r=_}if(a>(i=T[1].y)){var M=a;a=i,i=M}uo(h,n-k,a-k,r+k,i+k)}}else if("bezier"===D||"unbundled-bezier"===D||D.endsWith("segments")||D.endsWith("taxi")){var B;switch(D){case"bezier":case"unbundled-bezier":B=v.bezierPts;break;case"segments":case"taxi":case"round-segments":case"round-taxi":B=v.linePts}if(null!=B)for(var N=0;N(r=A.x)){var L=n;n=r,r=L}if((a=I.y)>(i=A.y)){var O=a;a=i,i=O}uo(h,n-=k,a-=k,r+=k,i+=k)}if(c&&t.includeEdges&&g&&(po(h,e,"mid-source"),po(h,e,"mid-target"),po(h,e,"source"),po(h,e,"target")),c)if("yes"===e.pstyle("ghost").value){var R=e.pstyle("ghost-offset-x").pfValue,V=e.pstyle("ghost-offset-y").pfValue;uo(h,h.x1+R,h.y1+V,h.x2+R,h.y2+V)}var F=p.bodyBounds=p.bodyBounds||{};Yt(F,h),qt(F,y),jt(F,1),c&&(n=h.x1,r=h.x2,a=h.y1,i=h.y2,uo(h,n-E,a-E,r+E,i+E));var j=p.overlayBounds=p.overlayBounds||{};Yt(j,h),qt(j,y),jt(j,1);var q=p.labelBounds=p.labelBounds||{};null!=q.all?((l=q.all).x1=1/0,l.y1=1/0,l.x2=-1/0,l.y2=-1/0,l.w=0,l.h=0):q.all=Rt(),c&&t.includeLabels&&(t.includeMainLabels&&fo(h,e,null),g&&(t.includeSourceLabels&&fo(h,e,"source"),t.includeTargetLabels&&fo(h,e,"target")))}return h.x1=lo(h.x1),h.y1=lo(h.y1),h.x2=lo(h.x2),h.y2=lo(h.y2),h.w=lo(h.x2-h.x1),h.h=lo(h.y2-h.y1),h.w>0&&h.h>0&&b&&(qt(h,y),jt(h,1)),h},vo=function(e){var t=0,n=function(e){return(e?1:0)<0&&void 0!==arguments[0]?arguments[0]:Lo,t=arguments.length>1?arguments[1]:void 0,n=0;n=0;s--)o(s);return this},Ro.removeAllListeners=function(){return this.removeListener("*")},Ro.emit=Ro.trigger=function(e,t,n){var r=this.listeners,a=r.length;return this.emitting++,w(t)||(t=[t]),jo(this,(function(e,i){null!=n&&(r=[{event:i.event,type:i.type,namespace:i.namespace,callback:n}],a=r.length);for(var o=function(n){var a=r[n];if(a.type===i.type&&(!a.namespace||a.namespace===i.namespace||".*"===a.namespace)&&e.eventMatches(e.context,a,i)){var o=[i];null!=t&&function(e,t){for(var n=0;n1&&!r){var a=this.length-1,i=this[a],o=i._private.data.id;this[a]=void 0,this[e]=i,n.set(o,{ele:i,index:e})}return this.length--,this},unmergeOne:function(e){e=e[0];var t=this._private,n=e._private.data.id,r=t.map.get(n);if(!r)return this;var a=r.index;return this.unmergeAt(a),this},unmerge:function(e){var t=this._private.cy;if(!e)return this;if(e&&b(e)){var n=e;e=t.mutableElements().filter(n)}for(var r=0;r=0;t--){e(this[t])&&this.unmergeAt(t)}return this},map:function(e,t){for(var n=[],r=this,a=0;ar&&(r=s,n=o)}return{value:r,ele:n}},min:function(e,t){for(var n,r=1/0,a=this,i=0;i=0&&a1&&void 0!==arguments[1])||arguments[1],n=this[0],r=n.cy();if(r.styleEnabled()&&n){this.cleanStyle();var a=n._private.style[e];return null!=a?a:t?r.style().getDefaultProperty(e):null}},numericStyle:function(e){var t=this[0];if(t.cy().styleEnabled()&&t){var n=t.pstyle(e);return void 0!==n.pfValue?n.pfValue:n.value}},numericStyleUnits:function(e){var t=this[0];if(t.cy().styleEnabled())return t?t.pstyle(e).units:void 0},renderedStyle:function(e){var t=this.cy();if(!t.styleEnabled())return this;var n=this[0];return n?t.style().getRenderedStyle(n,e):void 0},style:function(e,t){var n=this.cy();if(!n.styleEnabled())return this;var r=!1,a=n.style();if(E(e)){var i=e;a.applyBypass(this,i,r),this.emitAndNotify("style")}else if(b(e)){if(void 0===t){var o=this[0];return o?a.getStylePropertyValue(o,e):void 0}a.applyBypass(this,e,t,r),this.emitAndNotify("style")}else if(void 0===e){var s=this[0];return s?a.getRawStyle(s):void 0}return this},removeStyle:function(e){var t=this.cy();if(!t.styleEnabled())return this;var n=!1,r=t.style(),a=this;if(void 0===e)for(var i=0;i0&&t.push(c[0]),t.push(s[0])}return this.spawn(t,!0).filter(e)}),"neighborhood"),closedNeighborhood:function(e){return this.neighborhood().add(this).filter(e)},openNeighborhood:function(e){return this.neighborhood(e)}}),hs.neighbourhood=hs.neighborhood,hs.closedNeighbourhood=hs.closedNeighborhood,hs.openNeighbourhood=hs.openNeighborhood,Y(hs,{source:Wi((function(e){var t,n=this[0];return n&&(t=n._private.source||n.cy().collection()),t&&e?t.filter(e):t}),"source"),target:Wi((function(e){var t,n=this[0];return n&&(t=n._private.target||n.cy().collection()),t&&e?t.filter(e):t}),"target"),sources:vs({attr:"source"}),targets:vs({attr:"target"})}),Y(hs,{edgesWith:Wi(ys(),"edgesWith"),edgesTo:Wi(ys({thisIsSrc:!0}),"edgesTo")}),Y(hs,{connectedEdges:Wi((function(e){for(var t=[],n=0;n0);return i},component:function(){var e=this[0];return e.cy().mutableElements().components(e)[0]}}),hs.componentsOf=hs.components;var bs=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(void 0!==e){var a=new it,i=!1;if(t){if(t.length>0&&E(t[0])&&!P(t[0])){i=!0;for(var o=[],s=new st,l=0,u=t.length;l0&&void 0!==arguments[0])||arguments[0],r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],a=this,i=a.cy(),o=i._private,s=[],l=[],u=0,c=a.length;u0){for(var O=e.length===a.length?a:new bs(i,e),R=0;R0&&void 0!==arguments[0])||arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this,r=[],a={},i=n._private.cy;function o(e){var n=a[e.id()];t&&e.removed()||n||(a[e.id()]=!0,e.isNode()?(r.push(e),function(e){for(var t=e._private.edges,n=0;n0&&(e?k.emitAndNotify("remove"):t&&k.emit("remove"));for(var C=0;C=.001?function(t,r){for(var a=0;a<4;++a){var i=h(r,e,n);if(0===i)return r;r-=(d(r,e,n)-t)/i}return r}(t,o):0===l?o:function(t,r,a){var i,o,s=0;do{(i=d(o=r+(a-r)/2,e,n)-t)>0?a=o:r=o}while(Math.abs(i)>1e-7&&++s<10);return o}(t,r,r+a)}var f=!1;function g(){f=!0,e===t&&n===r||function(){for(var t=0;t<11;++t)s[t]=d(t*a,e,n)}()}var v=function(a){return f||g(),e===t&&n===r?a:0===a?0:1===a?1:d(p(a),t,r)};v.getControlPoints=function(){return[{x:e,y:t},{x:n,y:r}]};var y="generateBezier("+[e,t,n,r]+")";return v.toString=function(){return y},v}var ks=function(){function e(e){return-e.tension*e.x-e.friction*e.v}function t(t,n,r){var a={x:t.x+r.dx*n,v:t.v+r.dv*n,tension:t.tension,friction:t.friction};return{dx:a.v,dv:e(a)}}function n(n,r){var a={dx:n.v,dv:e(n)},i=t(n,.5*r,a),o=t(n,.5*r,i),s=t(n,r,o),l=1/6*(a.dx+2*(i.dx+o.dx)+s.dx),u=1/6*(a.dv+2*(i.dv+o.dv)+s.dv);return n.x=n.x+l*r,n.v=n.v+u*r,n}return function e(t,r,a){var i,o,s,l={x:-1,v:0,tension:null,friction:null},u=[0],c=0,d=1e-4;for(t=parseFloat(t)||500,r=parseFloat(r)||20,a=a||null,l.tension=t,l.friction=r,o=(i=null!==a)?(c=e(t,r))/a*.016:.016;s=n(s||l,o),u.push(1+s.x),c+=16,Math.abs(s.x)>d&&Math.abs(s.v)>d;);return i?function(e){return u[e*(u.length-1)|0]}:c}}(),Cs=function(e,t,n,r){var a=Es(e,t,n,r);return function(e,t,n){return e+(t-e)*a(n)}},Ss={linear:function(e,t,n){return e+(t-e)*n},ease:Cs(.25,.1,.25,1),"ease-in":Cs(.42,0,1,1),"ease-out":Cs(0,0,.58,1),"ease-in-out":Cs(.42,0,.58,1),"ease-in-sine":Cs(.47,0,.745,.715),"ease-out-sine":Cs(.39,.575,.565,1),"ease-in-out-sine":Cs(.445,.05,.55,.95),"ease-in-quad":Cs(.55,.085,.68,.53),"ease-out-quad":Cs(.25,.46,.45,.94),"ease-in-out-quad":Cs(.455,.03,.515,.955),"ease-in-cubic":Cs(.55,.055,.675,.19),"ease-out-cubic":Cs(.215,.61,.355,1),"ease-in-out-cubic":Cs(.645,.045,.355,1),"ease-in-quart":Cs(.895,.03,.685,.22),"ease-out-quart":Cs(.165,.84,.44,1),"ease-in-out-quart":Cs(.77,0,.175,1),"ease-in-quint":Cs(.755,.05,.855,.06),"ease-out-quint":Cs(.23,1,.32,1),"ease-in-out-quint":Cs(.86,0,.07,1),"ease-in-expo":Cs(.95,.05,.795,.035),"ease-out-expo":Cs(.19,1,.22,1),"ease-in-out-expo":Cs(1,0,0,1),"ease-in-circ":Cs(.6,.04,.98,.335),"ease-out-circ":Cs(.075,.82,.165,1),"ease-in-out-circ":Cs(.785,.135,.15,.86),spring:function(e,t,n){if(0===n)return Ss.linear;var r=ks(e,t,n);return function(e,t,n){return e+(t-e)*r(n)}},"cubic-bezier":Cs};function Ps(e,t,n,r,a){if(1===r)return n;if(t===n)return n;var i=a(t,n,r);return null==e||((e.roundValue||e.color)&&(i=Math.round(i)),void 0!==e.min&&(i=Math.max(i,e.min)),void 0!==e.max&&(i=Math.min(i,e.max))),i}function Ds(e,t){return null!=e.pfValue||null!=e.value?null==e.pfValue||null!=t&&"%"===t.type.units?e.value:e.pfValue:e}function Ts(e,t,n,r,a){var i=null!=a?a.type:null;n<0?n=0:n>1&&(n=1);var o=Ds(e,a),s=Ds(t,a);if(k(o)&&k(s))return Ps(i,o,s,n,r);if(w(o)&&w(s)){for(var l=[],u=0;u0?("spring"===d&&h.push(o.duration),o.easingImpl=Ss[d].apply(null,h)):o.easingImpl=Ss[d]}var p,f=o.easingImpl;if(p=0===o.duration?1:(n-l)/o.duration,o.applying&&(p=o.progress),p<0?p=0:p>1&&(p=1),null==o.delay){var g=o.startPosition,v=o.position;if(v&&a&&!e.locked()){var y={};Ms(g.x,v.x)&&(y.x=Ts(g.x,v.x,p,f)),Ms(g.y,v.y)&&(y.y=Ts(g.y,v.y,p,f)),e.position(y)}var m=o.startPan,x=o.pan,w=i.pan,E=null!=x&&r;E&&(Ms(m.x,x.x)&&(w.x=Ts(m.x,x.x,p,f)),Ms(m.y,x.y)&&(w.y=Ts(m.y,x.y,p,f)),e.emit("pan"));var k=o.startZoom,C=o.zoom,S=null!=C&&r;S&&(Ms(k,C)&&(i.zoom=Ot(i.minZoom,Ts(k,C,p,f),i.maxZoom)),e.emit("zoom")),(E||S)&&e.emit("viewport");var P=o.style;if(P&&P.length>0&&a){for(var D=0;D=0;t--){(0,e[t])()}e.splice(0,e.length)},c=i.length-1;c>=0;c--){var d=i[c],h=d._private;h.stopped?(i.splice(c,1),h.hooked=!1,h.playing=!1,h.started=!1,u(h.frames)):(h.playing||h.applying)&&(h.playing&&h.applying&&(h.applying=!1),h.started||Bs(0,d,e),_s(t,d,e,n),h.applying&&(h.applying=!1),u(h.frames),null!=h.step&&h.step(e),d.completed()&&(i.splice(c,1),h.hooked=!1,h.playing=!1,h.started=!1,u(h.completes)),s=!0)}return n||0!==i.length||0!==o.length||r.push(t),s}for(var i=!1,o=0;o0?t.notify("draw",n):t.notify("draw")),n.unmerge(r),t.emit("step")}var zs={animate:ni.animate(),animation:ni.animation(),animated:ni.animated(),clearQueue:ni.clearQueue(),delay:ni.delay(),delayAnimation:ni.delayAnimation(),stop:ni.stop(),addToAnimationPool:function(e){this.styleEnabled()&&this._private.aniEles.merge(e)},stopAnimationLoop:function(){this._private.animationsRunning=!1},startAnimationLoop:function(){var e=this;if(e._private.animationsRunning=!0,e.styleEnabled()){var t=e.renderer();t&&t.beforeRender?t.beforeRender((function(t,n){Ns(n,e)}),t.beforeRenderPriorities.animations):function t(){e._private.animationsRunning&&De((function(n){Ns(n,e),t()}))}()}}},Is={qualifierCompare:function(e,t){return null==e||null==t?null==e&&null==t:e.sameText(t)},eventMatches:function(e,t,n){var r=t.qualifier;return null==r||e!==n.target&&P(n.target)&&r.matches(n.target)},addEventFields:function(e,t){t.cy=e,t.target=e},callbackContext:function(e,t,n){return null!=t.qualifier?n.target:e}},As=function(e){return b(e)?new Fi(e):e},Ls={createEmitter:function(){var e=this._private;return e.emitter||(e.emitter=new Oo(Is,this)),this},emitter:function(){return this._private.emitter},on:function(e,t,n){return this.emitter().on(e,As(t),n),this},removeListener:function(e,t,n){return this.emitter().removeListener(e,As(t),n),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},one:function(e,t,n){return this.emitter().one(e,As(t),n),this},once:function(e,t,n){return this.emitter().one(e,As(t),n),this},emit:function(e,t){return this.emitter().emit(e,t),this},emitAndNotify:function(e,t){return this.emit(e),this.notify(e,t),this}};ni.eventAliasesOn(Ls);var Os={png:function(e){return e=e||{},this._private.renderer.png(e)},jpg:function(e){var t=this._private.renderer;return(e=e||{}).bg=e.bg||"#fff",t.jpg(e)}};Os.jpeg=Os.jpg;var Rs={layout:function(e){var t=this;if(null!=e)if(null!=e.name){var n=e.name,r=t.extension("layout",n);if(null!=r){var a;a=b(e.eles)?t.$(e.eles):null!=e.eles?e.eles:t.$();var i=new r(Y({},e,{cy:t,eles:a}));return i}Ke("No such layout `"+n+"` found. Did you forget to import it and `cytoscape.use()` it?")}else Ke("A `name` must be specified to make a layout");else Ke("Layout options must be specified to make a layout")}};Rs.createLayout=Rs.makeLayout=Rs.layout;var Vs={notify:function(e,t){var n=this._private;if(this.batching()){n.batchNotifications=n.batchNotifications||{};var r=n.batchNotifications[e]=n.batchNotifications[e]||this.collection();null!=t&&r.merge(t)}else if(n.notificationsEnabled){var a=this.renderer();!this.destroyed()&&a&&a.notify(e,t)}},notifications:function(e){var t=this._private;return void 0===e?t.notificationsEnabled:(t.notificationsEnabled=!!e,this)},noNotifications:function(e){this.notifications(!1),e(),this.notifications(!0)},batching:function(){return this._private.batchCount>0},startBatch:function(){var e=this._private;return null==e.batchCount&&(e.batchCount=0),0===e.batchCount&&(e.batchStyleEles=this.collection(),e.batchNotifications={}),e.batchCount++,this},endBatch:function(){var e=this._private;if(0===e.batchCount)return this;if(e.batchCount--,0===e.batchCount){e.batchStyleEles.updateStyle();var t=this.renderer();Object.keys(e.batchNotifications).forEach((function(n){var r=e.batchNotifications[n];r.empty()?t.notify(n):t.notify(n,r)}))}return this},batch:function(e){return this.startBatch(),e(),this.endBatch(),this},batchData:function(e){var t=this;return this.batch((function(){for(var n=Object.keys(e),r=0;r0;)t.removeChild(t.childNodes[0]);e._private.renderer=null,e.mutableElements().forEach((function(e){var t=e._private;t.rscratch={},t.rstyle={},t.animation.current=[],t.animation.queue=[]}))},onRender:function(e){return this.on("render",e)},offRender:function(e){return this.off("render",e)}};js.invalidateDimensions=js.resize;var qs={collection:function(e,t){return b(e)?this.$(e):S(e)?e.collection():w(e)?(t||(t={}),new bs(this,e,t.unique,t.removed)):new bs(this)},nodes:function(e){var t=this.$((function(e){return e.isNode()}));return e?t.filter(e):t},edges:function(e){var t=this.$((function(e){return e.isEdge()}));return e?t.filter(e):t},$:function(e){var t=this._private.elements;return e?t.filter(e):t.spawnSelf()},mutableElements:function(){return this._private.elements}};qs.elements=qs.filter=qs.$;var Ys={},Xs="t";Ys.apply=function(e){for(var t=this,n=t._private.cy.collection(),r=0;r0;if(h||d&&p){var f=void 0;h&&p||h?f=u.properties:p&&(f=u.mappedProperties);for(var g=0;g1&&(v=1),s.color){var w=a.valueMin[0],E=a.valueMax[0],C=a.valueMin[1],S=a.valueMax[1],P=a.valueMin[2],D=a.valueMax[2],T=null==a.valueMin[3]?1:a.valueMin[3],_=null==a.valueMax[3]?1:a.valueMax[3],M=[Math.round(w+(E-w)*v),Math.round(C+(S-C)*v),Math.round(P+(D-P)*v),Math.round(T+(_-T)*v)];n={bypass:a.bypass,name:a.name,value:M,strValue:"rgb("+M[0]+", "+M[1]+", "+M[2]+")"}}else{if(!s.number)return!1;var B=a.valueMin+(a.valueMax-a.valueMin)*v;n=this.parse(a.name,B,a.bypass,h)}if(!n)return g(),!1;n.mapping=a,a=n;break;case o.data:for(var N=a.field.split("."),z=d.data,I=0;I0&&i>0){for(var s={},l=!1,u=0;u0?e.delayAnimation(o).play().promise().then(t):t()})).then((function(){return e.animation({style:s,duration:i,easing:e.pstyle("transition-timing-function").value,queue:!1}).play().promise()})).then((function(){n.removeBypasses(e,a),e.emitAndNotify("style"),r.transitioning=!1}))}else r.transitioning&&(this.removeBypasses(e,a),e.emitAndNotify("style"),r.transitioning=!1)},Ys.checkTrigger=function(e,t,n,r,a,i){var o=this.properties[t],s=a(o);null!=s&&s(n,r)&&i(o)},Ys.checkZOrderTrigger=function(e,t,n,r){var a=this;this.checkTrigger(e,t,n,r,(function(e){return e.triggersZOrder}),(function(){a._private.cy.notify("zorder",e)}))},Ys.checkBoundsTrigger=function(e,t,n,r){this.checkTrigger(e,t,n,r,(function(e){return e.triggersBounds}),(function(a){e.dirtyCompoundBoundsCache(),e.dirtyBoundingBoxCache(),!a.triggersBoundsOfParallelBeziers||"curve-style"!==t||"bezier"!==n&&"bezier"!==r||e.parallelEdges().forEach((function(e){e.isBundledBezier()&&e.dirtyBoundingBoxCache()})),!a.triggersBoundsOfConnectedEdges||"display"!==t||"none"!==n&&"none"!==r||e.connectedEdges().forEach((function(e){e.dirtyBoundingBoxCache()}))}))},Ys.checkTriggers=function(e,t,n,r){e.dirtyStyleCache(),this.checkZOrderTrigger(e,t,n,r),this.checkBoundsTrigger(e,t,n,r)};var Ws={applyBypass:function(e,t,n,r){var a=[];if("*"===t||"**"===t){if(void 0!==n)for(var i=0;it.length?i.substr(t.length):""}function s(){n=n.length>r.length?n.substr(r.length):""}for(i=i.replace(/[/][*](\s|.)+?[*][/]/g,"");;){if(i.match(/^\s*$/))break;var l=i.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!l){Ue("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: "+i);break}t=l[0];var u=l[1];if("core"!==u)if(new Fi(u).invalid){Ue("Skipping parsing of block: Invalid selector found in string stylesheet: "+u),o();continue}var c=l[2],d=!1;n=c;for(var h=[];;){if(n.match(/^\s*$/))break;var p=n.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/);if(!p){Ue("Skipping parsing of block: Invalid formatting of style property and value definitions found in:"+c),d=!0;break}r=p[0];var f=p[1],g=p[2];if(this.properties[f])a.parse(f,g)?(h.push({name:f,val:g}),s()):(Ue("Skipping property: Invalid property definition in: "+r),s());else Ue("Skipping property: Invalid property name in: "+r),s()}if(d){o();break}a.selector(u);for(var v=0;v=7&&"d"===t[0]&&(u=new RegExp(s.data.regex).exec(t))){if(n)return!1;var h=s.data;return{name:e,value:u,strValue:""+t,mapped:h,field:u[1],bypass:n}}if(t.length>=10&&"m"===t[0]&&(c=new RegExp(s.mapData.regex).exec(t))){if(n)return!1;if(d.multiple)return!1;var p=s.mapData;if(!d.color&&!d.number)return!1;var f=this.parse(e,c[4]);if(!f||f.mapped)return!1;var g=this.parse(e,c[5]);if(!g||g.mapped)return!1;if(f.pfValue===g.pfValue||f.strValue===g.strValue)return Ue("`"+e+": "+t+"` is not a valid mapper because the output range is zero; converting to `"+e+": "+f.strValue+"`"),this.parse(e,f.strValue);if(d.color){var v=f.value,y=g.value;if(!(v[0]!==y[0]||v[1]!==y[1]||v[2]!==y[2]||v[3]!==y[3]&&(null!=v[3]&&1!==v[3]||null!=y[3]&&1!==y[3])))return!1}return{name:e,value:c,strValue:""+t,mapped:p,field:c[1],fieldMin:parseFloat(c[2]),fieldMax:parseFloat(c[3]),valueMin:f.value,valueMax:g.value,bypass:n}}}if(d.multiple&&"multiple"!==r){var m;if(m=l?t.split(/\s+/):w(t)?t:[t],d.evenMultiple&&m.length%2!=0)return null;for(var E=[],C=[],S=[],P="",D=!1,T=0;T0?" ":"")+_.strValue}return d.validate&&!d.validate(E,C)?null:d.singleEnum&&D?1===E.length&&b(E[0])?{name:e,value:E[0],strValue:E[0],bypass:n}:null:{name:e,value:E,pfValue:S,strValue:P,bypass:n,units:C}}var M,B,N=function(){for(var r=0;rd.max||d.strictMax&&t===d.max))return null;var V={name:e,value:t,strValue:""+t+(I||""),units:I,bypass:n};return d.unitless||"px"!==I&&"em"!==I?V.pfValue=t:V.pfValue="px"!==I&&I?this.getEmSizeInPixels()*t:t,"ms"!==I&&"s"!==I||(V.pfValue="ms"===I?t:1e3*t),"deg"!==I&&"rad"!==I||(V.pfValue="rad"===I?t:(M=t,Math.PI*M/180)),"%"===I&&(V.pfValue=t/100),V}if(d.propList){var F=[],j=""+t;if("none"===j);else{for(var q=j.split(/\s*,\s*|\s+/),Y=0;Y0&&l>0&&!isNaN(n.w)&&!isNaN(n.h)&&n.w>0&&n.h>0)return{zoom:o=(o=(o=Math.min((s-2*t)/n.w,(l-2*t)/n.h))>this._private.maxZoom?this._private.maxZoom:o)=n.minZoom&&(n.maxZoom=t),this},minZoom:function(e){return void 0===e?this._private.minZoom:this.zoomRange({min:e})},maxZoom:function(e){return void 0===e?this._private.maxZoom:this.zoomRange({max:e})},getZoomedViewport:function(e){var t,n,r=this._private,a=r.pan,i=r.zoom,o=!1;if(r.zoomingEnabled||(o=!0),k(e)?n=e:E(e)&&(n=e.level,null!=e.position?t=Pt(e.position,i,a):null!=e.renderedPosition&&(t=e.renderedPosition),null==t||r.panningEnabled||(o=!0)),n=(n=n>r.maxZoom?r.maxZoom:n)t.maxZoom||!t.zoomingEnabled?i=!0:(t.zoom=s,a.push("zoom"))}if(r&&(!i||!e.cancelOnFailedZoom)&&t.panningEnabled){var l=e.pan;k(l.x)&&(t.pan.x=l.x,o=!1),k(l.y)&&(t.pan.y=l.y,o=!1),o||a.push("pan")}return a.length>0&&(a.push("viewport"),this.emit(a.join(" ")),this.notify("viewport")),this},center:function(e){var t=this.getCenterPan(e);return t&&(this._private.pan=t,this.emit("pan viewport"),this.notify("viewport")),this},getCenterPan:function(e,t){if(this._private.panningEnabled){if(b(e)){var n=e;e=this.mutableElements().filter(n)}else S(e)||(e=this.mutableElements());if(0!==e.length){var r=e.boundingBox(),a=this.width(),i=this.height();return{x:(a-(t=void 0===t?this._private.zoom:t)*(r.x1+r.x2))/2,y:(i-t*(r.y1+r.y2))/2}}}},reset:function(){return this._private.panningEnabled&&this._private.zoomingEnabled?(this.viewport({pan:{x:0,y:0},zoom:1}),this):this},invalidateSize:function(){this._private.sizeCache=null},size:function(){var e,t,n=this._private,r=n.container,a=this;return n.sizeCache=n.sizeCache||(r?(e=a.window().getComputedStyle(r),t=function(t){return parseFloat(e.getPropertyValue(t))},{width:r.clientWidth-t("padding-left")-t("padding-right"),height:r.clientHeight-t("padding-top")-t("padding-bottom")}):{width:1,height:1})},width:function(){return this.size().width},height:function(){return this.size().height},extent:function(){var e=this._private.pan,t=this._private.zoom,n=this.renderedExtent(),r={x1:(n.x1-e.x)/t,x2:(n.x2-e.x)/t,y1:(n.y1-e.y)/t,y2:(n.y2-e.y)/t};return r.w=r.x2-r.x1,r.h=r.y2-r.y1,r},renderedExtent:function(){var e=this.width(),t=this.height();return{x1:0,y1:0,x2:e,y2:t,w:e,h:t}},multiClickDebounceTime:function(e){return e?(this._private.multiClickDebounceTime=e,this):this._private.multiClickDebounceTime}};tl.centre=tl.center,tl.autolockNodes=tl.autolock,tl.autoungrabifyNodes=tl.autoungrabify;var nl={data:ni.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeData:ni.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),scratch:ni.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:ni.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0})};nl.attr=nl.data,nl.removeAttr=nl.removeData;var rl=function(e){var t=this,n=(e=Y({},e)).container;n&&!C(n)&&C(n[0])&&(n=n[0]);var r=n?n._cyreg:null;(r=r||{})&&r.cy&&(r.cy.destroy(),r={});var a=r.readies=r.readies||[];n&&(n._cyreg=r),r.cy=t;var i=void 0!==h&&void 0!==n&&!e.headless,o=e;o.layout=Y({name:i?"grid":"null"},o.layout),o.renderer=Y({name:i?"canvas":"null"},o.renderer);var s=function(e,t,n){return void 0!==t?t:void 0!==n?n:e},l=this._private={container:n,ready:!1,options:o,elements:new bs(this),listeners:[],aniEles:new bs(this),data:o.data||{},scratch:{},layout:null,renderer:null,destroyed:!1,notificationsEnabled:!0,minZoom:1e-50,maxZoom:1e50,zoomingEnabled:s(!0,o.zoomingEnabled),userZoomingEnabled:s(!0,o.userZoomingEnabled),panningEnabled:s(!0,o.panningEnabled),userPanningEnabled:s(!0,o.userPanningEnabled),boxSelectionEnabled:s(!0,o.boxSelectionEnabled),autolock:s(!1,o.autolock,o.autolockNodes),autoungrabify:s(!1,o.autoungrabify,o.autoungrabifyNodes),autounselectify:s(!1,o.autounselectify),styleEnabled:void 0===o.styleEnabled?i:o.styleEnabled,zoom:k(o.zoom)?o.zoom:1,pan:{x:E(o.pan)&&k(o.pan.x)?o.pan.x:0,y:E(o.pan)&&k(o.pan.y)?o.pan.y:0},animation:{current:[],queue:[]},hasCompoundNodes:!1,multiClickDebounceTime:s(250,o.multiClickDebounceTime)};this.createEmitter(),this.selectionType(o.selectionType),this.zoomRange({min:o.minZoom,max:o.maxZoom});l.styleEnabled&&t.setStyle([]);var u=Y({},o,o.renderer);t.initRenderer(u);!function(e,t){if(e.some(B))return Tr.all(e).then(t);t(e)}([o.style,o.elements],(function(e){var n=e[0],i=e[1];l.styleEnabled&&t.style().append(n),function(e,n,r){t.notifications(!1);var a=t.mutableElements();a.length>0&&a.remove(),null!=e&&(E(e)||w(e))&&t.add(e),t.one("layoutready",(function(e){t.notifications(!0),t.emit(e),t.one("load",n),t.emitAndNotify("load")})).one("layoutstop",(function(){t.one("done",r),t.emit("done")}));var i=Y({},t._private.options.layout);i.eles=t.elements(),t.layout(i).run()}(i,(function(){t.startAnimationLoop(),l.ready=!0,x(o.ready)&&t.on("ready",o.ready);for(var e=0;e0,u=Rt(n.boundingBox?n.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()});if(S(n.roots))e=n.roots;else if(w(n.roots)){for(var c=[],d=0;d0;){var N=_.shift(),z=T(N,M);if(z)N.outgoers().filter((function(e){return e.isNode()&&a.has(e)})).forEach(B);else if(null===z){Ue("Detected double maximal shift for node `"+N.id()+"`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs.");break}}}D();var I=0;if(n.avoidOverlap)for(var A=0;A0&&y[0].length<=3?l/2:0),d=2*Math.PI/y[r].length*a;return 0===r&&1===y[0].length&&(c=1),{x:G+c*Math.cos(d),y:U+c*Math.sin(d)}}return{x:G+(a+1-(i+1)/2)*o,y:(r+1)*s}})),this};var cl={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,radius:void 0,startAngle:1.5*Math.PI,sweep:void 0,clockwise:!0,sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function dl(e){this.options=Y({},cl,e)}dl.prototype.run=function(){var e=this.options,t=e,n=e.cy,r=t.eles,a=void 0!==t.counterclockwise?!t.counterclockwise:t.clockwise,i=r.nodes().not(":parent");t.sort&&(i=i.sort(t.sort));for(var o,s=Rt(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:n.width(),h:n.height()}),l=s.x1+s.w/2,u=s.y1+s.h/2,c=(void 0===t.sweep?2*Math.PI-2*Math.PI/i.length:t.sweep)/Math.max(1,i.length-1),d=0,h=0;h1&&t.avoidOverlap){d*=1.75;var v=Math.cos(c)-Math.cos(0),y=Math.sin(c)-Math.sin(0),m=Math.sqrt(d*d/(v*v+y*y));o=Math.max(m,o)}return r.nodes().layoutPositions(this,t,(function(e,n){var r=t.startAngle+n*c*(a?1:-1),i=o*Math.cos(r),s=o*Math.sin(r);return{x:l+i,y:u+s}})),this};var hl,pl={fit:!0,padding:30,startAngle:1.5*Math.PI,sweep:void 0,clockwise:!0,equidistant:!1,minNodeSpacing:10,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,height:void 0,width:void 0,spacingFactor:void 0,concentric:function(e){return e.degree()},levelWidth:function(e){return e.maxDegree()/4},animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function fl(e){this.options=Y({},pl,e)}fl.prototype.run=function(){for(var e=this.options,t=e,n=void 0!==t.counterclockwise?!t.counterclockwise:t.clockwise,r=e.cy,a=t.eles,i=a.nodes().not(":parent"),o=Rt(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()}),s=o.x1+o.w/2,l=o.y1+o.h/2,u=[],c=0,d=0;d0)Math.abs(m[0].value-x.value)>=v&&(m=[],y.push(m));m.push(x)}var w=c+t.minNodeSpacing;if(!t.avoidOverlap){var E=y.length>0&&y[0].length>1,k=(Math.min(o.w,o.h)/2-w)/(y.length+E?1:0);w=Math.min(w,k)}for(var C=0,S=0;S1&&t.avoidOverlap){var _=Math.cos(T)-Math.cos(0),M=Math.sin(T)-Math.sin(0),B=Math.sqrt(w*w/(_*_+M*M));C=Math.max(B,C)}P.r=C,C+=w}if(t.equidistant){for(var N=0,z=0,I=0;I=e.numIter)&&(kl(r,e),r.temperature=r.temperature*e.coolingFactor,!(r.temperature=e.animationThreshold&&i(),De(t)):(Al(r,e),s())}()}else{for(;u;)u=o(l),l++;Al(r,e),s()}return this},vl.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this},vl.prototype.destroy=function(){return this.thread&&this.thread.stop(),this};var yl=function(e,t,n){for(var r=n.eles.edges(),a=n.eles.nodes(),i=Rt(n.boundingBox?n.boundingBox:{x1:0,y1:0,w:e.width(),h:e.height()}),o={isCompound:e.hasCompoundNodes(),layoutNodes:[],idToIndex:{},nodeSize:a.size(),graphSet:[],indexToGraph:[],layoutEdges:[],edgeSize:r.size(),temperature:n.initialTemp,clientWidth:i.w,clientHeight:i.h,boundingBox:i},s=n.eles.components(),l={},u=0;u0){o.graphSet.push(E);for(u=0;ur.count?0:r.graph},bl=function e(t,n,r,a){var i=a.graphSet[r];if(-10)var s=(u=r.nodeOverlap*o)*a/(g=Math.sqrt(a*a+i*i)),l=u*i/g;else{var u,c=Tl(e,a,i),d=Tl(t,-1*a,-1*i),h=d.x-c.x,p=d.y-c.y,f=h*h+p*p,g=Math.sqrt(f);s=(u=(e.nodeRepulsion+t.nodeRepulsion)/f)*h/g,l=u*p/g}e.isLocked||(e.offsetX-=s,e.offsetY-=l),t.isLocked||(t.offsetX+=s,t.offsetY+=l)}},Dl=function(e,t,n,r){if(n>0)var a=e.maxX-t.minX;else a=t.maxX-e.minX;if(r>0)var i=e.maxY-t.minY;else i=t.maxY-e.minY;return a>=0&&i>=0?Math.sqrt(a*a+i*i):0},Tl=function(e,t,n){var r=e.positionX,a=e.positionY,i=e.height||1,o=e.width||1,s=n/t,l=i/o,u={};return 0===t&&0n?(u.x=r,u.y=a+i/2,u):0t&&-1*l<=s&&s<=l?(u.x=r-o/2,u.y=a-o*n/2/t,u):0=l)?(u.x=r+i*t/2/n,u.y=a+i/2,u):0>n&&(s<=-1*l||s>=l)?(u.x=r-i*t/2/n,u.y=a-i/2,u):u},_l=function(e,t){for(var n=0;n1){var f=t.gravity*d/p,g=t.gravity*h/p;c.offsetX+=f,c.offsetY+=g}}}}},Bl=function(e,t){var n=[],r=0,a=-1;for(n.push.apply(n,e.graphSet[0]),a+=e.graphSet[0].length;r<=a;){var i=n[r++],o=e.idToIndex[i],s=e.layoutNodes[o],l=s.children;if(0n)var a={x:n*e/r,y:n*t/r};else a={x:e,y:t};return a},Il=function e(t,n){var r=t.parentId;if(null!=r){var a=n.layoutNodes[n.idToIndex[r]],i=!1;return(null==a.maxX||t.maxX+a.padRight>a.maxX)&&(a.maxX=t.maxX+a.padRight,i=!0),(null==a.minX||t.minX-a.padLefta.maxY)&&(a.maxY=t.maxY+a.padBottom,i=!0),(null==a.minY||t.minY-a.padTopf&&(d+=p+t.componentSpacing,c=0,h=0,p=0)}}},Ll={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,avoidOverlapPadding:10,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,condense:!1,rows:void 0,cols:void 0,position:function(e){},sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function Ol(e){this.options=Y({},Ll,e)}Ol.prototype.run=function(){var e=this.options,t=e,n=e.cy,r=t.eles,a=r.nodes().not(":parent");t.sort&&(a=a.sort(t.sort));var i=Rt(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:n.width(),h:n.height()});if(0===i.h||0===i.w)r.nodes().layoutPositions(this,t,(function(e){return{x:i.x1,y:i.y1}}));else{var o=a.size(),s=Math.sqrt(o*i.h/i.w),l=Math.round(s),u=Math.round(i.w/i.h*s),c=function(e){if(null==e)return Math.min(l,u);Math.min(l,u)==l?l=e:u=e},d=function(e){if(null==e)return Math.max(l,u);Math.max(l,u)==l?l=e:u=e},h=t.rows,p=null!=t.cols?t.cols:t.columns;if(null!=h&&null!=p)l=h,u=p;else if(null!=h&&null==p)l=h,u=Math.ceil(o/l);else if(null==h&&null!=p)u=p,l=Math.ceil(o/u);else if(u*l>o){var f=c(),g=d();(f-1)*g>=o?c(f-1):(g-1)*f>=o&&d(g-1)}else for(;u*l=o?d(y+1):c(v+1)}var m=i.w/u,b=i.h/l;if(t.condense&&(m=0,b=0),t.avoidOverlap)for(var x=0;x=u&&(B=0,M++)},z={},I=0;I(r=$t(e,t,x[w],x[w+1],x[w+2],x[w+3])))return v(n,r),!0}else if("bezier"===i.edgeType||"multibezier"===i.edgeType||"self"===i.edgeType||"compound"===i.edgeType)for(x=i.allpts,w=0;w+5(r=Zt(e,t,x[w],x[w+1],x[w+2],x[w+3],x[w+4],x[w+5])))return v(n,r),!0;m=m||a.source,b=b||a.target;var E=o.getArrowWidth(l,c),k=[{name:"source",x:i.arrowStartX,y:i.arrowStartY,angle:i.srcArrowAngle},{name:"target",x:i.arrowEndX,y:i.arrowEndY,angle:i.tgtArrowAngle},{name:"mid-source",x:i.midX,y:i.midY,angle:i.midsrcArrowAngle},{name:"mid-target",x:i.midX,y:i.midY,angle:i.midtgtArrowAngle}];for(w=0;w0&&(y(m),y(b))}function b(e,t,n){return rt(e,t,n)}function x(n,r){var a,i=n._private,o=f;a=r?r+"-":"",n.boundingBox();var s=i.labelBounds[r||"main"],l=n.pstyle(a+"label").value;if("yes"===n.pstyle("text-events").strValue&&l){var u=b(i.rscratch,"labelX",r),c=b(i.rscratch,"labelY",r),d=b(i.rscratch,"labelAngle",r),h=n.pstyle(a+"text-margin-x").pfValue,p=n.pstyle(a+"text-margin-y").pfValue,g=s.x1-o-h,y=s.x2+o-h,m=s.y1-o-p,x=s.y2+o-p;if(d){var w=Math.cos(d),E=Math.sin(d),k=function(e,t){return{x:(e-=u)*w-(t-=c)*E+u,y:e*E+t*w+c}},C=k(g,m),S=k(g,x),P=k(y,m),D=k(y,x),T=[C.x+h,C.y+p,P.x+h,P.y+p,D.x+h,D.y+p,S.x+h,S.y+p];if(Qt(e,t,T))return v(n),!0}else if(Wt(s,e,t))return v(n),!0}}n&&(l=l.interactive);for(var w=l.length-1;w>=0;w--){var E=l[w];E.isNode()?y(E)||x(E):m(E)||x(E)||x(E,"source")||x(E,"target")}return u},getAllInBox:function(e,t,n,r){for(var a,i,o=this.getCachedZSortedEles().interactive,s=[],l=Math.min(e,n),u=Math.max(e,n),c=Math.min(t,r),d=Math.max(t,r),h=Rt({x1:e=l,y1:t=c,x2:n=u,y2:r=d}),p=0;p0?-(Math.PI-i.ang):Math.PI+i.ang),vu(t,n,gu),Jl=fu.nx*gu.ny-fu.ny*gu.nx,eu=fu.nx*gu.nx-fu.ny*-gu.ny,ru=Math.asin(Math.max(-1,Math.min(1,Jl))),Math.abs(ru)<1e-6)return $l=t.x,Ql=t.y,void(iu=su=0);tu=1,nu=!1,eu<0?ru<0?ru=Math.PI+ru:(ru=Math.PI-ru,tu=-1,nu=!0):ru>0&&(tu=-1,nu=!0),su=void 0!==t.radius?t.radius:r,au=ru/2,lu=Math.min(fu.len/2,gu.len/2),a?(ou=Math.abs(Math.cos(au)*su/Math.sin(au)))>lu?(ou=lu,iu=Math.abs(ou*Math.sin(au)/Math.cos(au))):iu=su:(ou=Math.min(lu,su),iu=Math.abs(ou*Math.sin(au)/Math.cos(au))),du=t.x+gu.nx*ou,hu=t.y+gu.ny*ou,$l=du-gu.ny*iu*tu,Ql=hu+gu.nx*iu*tu,uu=t.x+fu.nx*ou,cu=t.y+fu.ny*ou,pu=t};function mu(e,t){0===t.radius?e.lineTo(t.cx,t.cy):e.arc(t.cx,t.cy,t.radius,t.startAngle,t.endAngle,t.counterClockwise)}function bu(e,t,n,r){var a=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];return 0===r||0===t.radius?{cx:t.x,cy:t.y,radius:0,startX:t.x,startY:t.y,stopX:t.x,stopY:t.y,startAngle:void 0,endAngle:void 0,counterClockwise:void 0}:(yu(e,t,n,r,a),{cx:$l,cy:Ql,radius:iu,startX:uu,startY:cu,stopX:du,stopY:hu,startAngle:fu.ang+Math.PI/2*tu,endAngle:gu.ang-Math.PI/2*tu,counterClockwise:nu})}var xu={};function wu(e){var t=[];if(null!=e){for(var n=0;n0?Math.max(e-t,0):Math.min(e+t,0)},D=P(C,E),T=P(S,k),_=!1;"auto"===v?g=Math.abs(D)>Math.abs(T)?a:r:v===l||v===s?(g=r,_=!0):v!==i&&v!==o||(g=a,_=!0);var M,B=g===r,N=B?T:D,z=B?S:C,I=Bt(z),A=!1;(_&&(m||x)||!(v===s&&z<0||v===l&&z>0||v===i&&z>0||v===o&&z<0)||(N=(I*=-1)*Math.abs(N),A=!0),m)?M=(b<0?1+b:b)*N:M=(b<0?N:0)+b*I;var L=function(e){return Math.abs(e)=Math.abs(N)},O=L(M),R=L(Math.abs(N)-Math.abs(M));if((O||R)&&!A)if(B){var V=Math.abs(z)<=d/2,F=Math.abs(C)<=h/2;if(V){var j=(u.x1+u.x2)/2,q=u.y1,Y=u.y2;n.segpts=[j,q,j,Y]}else if(F){var X=(u.y1+u.y2)/2,W=u.x1,H=u.x2;n.segpts=[W,X,H,X]}else n.segpts=[u.x1,u.y2]}else{var K=Math.abs(z)<=c/2,G=Math.abs(S)<=p/2;if(K){var U=(u.y1+u.y2)/2,Z=u.x1,$=u.x2;n.segpts=[Z,U,$,U]}else if(G){var Q=(u.x1+u.x2)/2,J=u.y1,ee=u.y2;n.segpts=[Q,J,Q,ee]}else n.segpts=[u.x2,u.y1]}else if(B){var te=u.y1+M+(f?d/2*I:0),ne=u.x1,re=u.x2;n.segpts=[ne,te,re,te]}else{var ae=u.x1+M+(f?c/2*I:0),ie=u.y1,oe=u.y2;n.segpts=[ae,ie,ae,oe]}if(n.isRound){var se=e.pstyle("taxi-radius").value,le="arc-radius"===e.pstyle("radius-type").value[0];n.radii=new Array(n.segpts.length/2).fill(se),n.isArcRadius=new Array(n.segpts.length/2).fill(le)}},xu.tryToCorrectInvalidPoints=function(e,t){var n=e._private.rscratch;if("bezier"===n.edgeType){var r=t.srcPos,a=t.tgtPos,i=t.srcW,o=t.srcH,s=t.tgtW,l=t.tgtH,u=t.srcShape,c=t.tgtShape,d=t.srcCornerRadius,h=t.tgtCornerRadius,p=t.srcRs,f=t.tgtRs,g=!k(n.startX)||!k(n.startY),v=!k(n.arrowStartX)||!k(n.arrowStartY),y=!k(n.endX)||!k(n.endY),m=!k(n.arrowEndX)||!k(n.arrowEndY),b=3*(this.getArrowWidth(e.pstyle("width").pfValue,e.pstyle("arrow-scale").value)*this.arrowShapeWidth),x=Nt({x:n.ctrlpts[0],y:n.ctrlpts[1]},{x:n.startX,y:n.startY}),w=xh.poolIndex()){var p=d;d=h,h=p}var f=s.srcPos=d.position(),g=s.tgtPos=h.position(),v=s.srcW=d.outerWidth(),y=s.srcH=d.outerHeight(),m=s.tgtW=h.outerWidth(),b=s.tgtH=h.outerHeight(),x=s.srcShape=n.nodeShapes[t.getNodeShape(d)],w=s.tgtShape=n.nodeShapes[t.getNodeShape(h)],E=s.srcCornerRadius="auto"===d.pstyle("corner-radius").value?"auto":d.pstyle("corner-radius").pfValue,C=s.tgtCornerRadius="auto"===h.pstyle("corner-radius").value?"auto":h.pstyle("corner-radius").pfValue,S=s.tgtRs=h._private.rscratch,P=s.srcRs=d._private.rscratch;s.dirCounts={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0};for(var D=0;D0){var H=u,K=zt(H,Tt(t)),G=zt(H,Tt(W)),U=K;if(G2)zt(H,{x:W[2],y:W[3]})0){var le=c,ue=zt(le,Tt(t)),ce=zt(le,Tt(se)),de=ue;if(ce2)zt(le,{x:se[2],y:se[3]})=u||m){c={cp:g,segment:y};break}}if(c)break}var b=c.cp,x=c.segment,w=(u-h)/x.length,E=x.t1-x.t0,k=s?x.t0+E*w:x.t1-E*w;k=Ot(0,k,1),t=Lt(b.p0,b.p1,b.p2,k),a=function(e,t,n,r){var a=Ot(0,r-.001,1),i=Ot(0,r+.001,1),o=Lt(e,t,n,a),s=Lt(e,t,n,i);return Du(o,s)}(b.p0,b.p1,b.p2,k);break;case"straight":case"segments":case"haystack":for(var C,S,P,D,T=0,_=r.allpts.length,M=0;M+3<_&&(s?(P={x:r.allpts[M],y:r.allpts[M+1]},D={x:r.allpts[M+2],y:r.allpts[M+3]}):(P={x:r.allpts[_-2-M],y:r.allpts[_-1-M]},D={x:r.allpts[_-4-M],y:r.allpts[_-3-M]}),S=T,!((T+=C=Nt(P,D))>=u));M+=2);var B=(u-S)/C;B=Ot(0,B,1),t=function(e,t,n,r){var a=t.x-e.x,i=t.y-e.y,o=Nt(e,t),s=a/o,l=i/o;return n=null==n?0:n,r=null!=r?r:n*o,{x:e.x+s*r,y:e.y+l*r}}(P,D,B),a=Du(P,D)}o("labelX",n,t.x),o("labelY",n,t.y),o("labelAutoAngle",n,a)}};u("source"),u("target"),this.applyLabelDimensions(e)}},Su.applyLabelDimensions=function(e){this.applyPrefixedLabelDimensions(e),e.isEdge()&&(this.applyPrefixedLabelDimensions(e,"source"),this.applyPrefixedLabelDimensions(e,"target"))},Su.applyPrefixedLabelDimensions=function(e,t){var n=e._private,r=this.getLabelText(e,t),a=this.calculateLabelDimensions(e,r),i=e.pstyle("line-height").pfValue,o=e.pstyle("text-wrap").strValue,s=rt(n.rscratch,"labelWrapCachedLines",t)||[],l="wrap"!==o?1:Math.max(s.length,1),u=a.height/l,c=u*i,d=a.width,h=a.height+(l-1)*(i-1)*u;at(n.rstyle,"labelWidth",t,d),at(n.rscratch,"labelWidth",t,d),at(n.rstyle,"labelHeight",t,h),at(n.rscratch,"labelHeight",t,h),at(n.rscratch,"labelLineHeight",t,c)},Su.getLabelText=function(e,t){var n=e._private,r=t?t+"-":"",a=e.pstyle(r+"label").strValue,i=e.pstyle("text-transform").value,o=function(e,r){return r?(at(n.rscratch,e,t,r),r):rt(n.rscratch,e,t)};if(!a)return"";"none"==i||("uppercase"==i?a=a.toUpperCase():"lowercase"==i&&(a=a.toLowerCase()));var s=e.pstyle("text-wrap").value;if("wrap"===s){var l=o("labelKey");if(null!=l&&o("labelWrapKey")===l)return o("labelWrapCachedText");for(var u=a.split("\n"),c=e.pstyle("text-max-width").pfValue,h="anywhere"===e.pstyle("text-overflow-wrap").value,p=[],f=/[\s\u200b]+|$/g,g=0;gc){var b,x="",w=0,E=d(v.matchAll(f));try{for(E.s();!(b=E.n()).done;){var k=b.value,C=k[0],S=v.substring(w,k.index);w=k.index+C.length;var P=0===x.length?S:x+S+C;this.calculateLabelDimensions(e,P).width<=c?x+=S+C:(x&&p.push(x),x=S+C)}}catch(B){E.e(B)}finally{E.f()}x.match(/^[\s\u200b]+$/)||p.push(x)}else p.push(v)}o("labelWrapCachedLines",p),a=o("labelWrapCachedText",p.join("\n")),o("labelWrapKey",l)}else if("ellipsis"===s){var D=e.pstyle("text-max-width").pfValue,T="",_=!1;if(this.calculateLabelDimensions(e,a).widthD)break;T+=a[M],M===a.length-1&&(_=!0)}return _||(T+="\u2026"),T}return a},Su.getLabelJustification=function(e){var t=e.pstyle("text-justification").strValue,n=e.pstyle("text-halign").strValue;if("auto"!==t)return t;if(!e.isNode())return"center";switch(n){case"left":return"right";case"right":return"left";default:return"center"}},Su.calculateLabelDimensions=function(e,t){var n=this,r=n.cy.window().document,a=Le(t,e._private.labelDimsKey),i=n.labelDimCache||(n.labelDimCache=[]),o=i[a];if(null!=o)return o;var s=e.pstyle("font-style").strValue,l=e.pstyle("font-size").pfValue,u=e.pstyle("font-family").strValue,c=e.pstyle("font-weight").strValue,d=this.labelCalcCanvas,h=this.labelCalcCanvasContext;if(!d){d=this.labelCalcCanvas=r.createElement("canvas"),h=this.labelCalcCanvasContext=d.getContext("2d");var p=d.style;p.position="absolute",p.left="-9999px",p.top="-9999px",p.zIndex="-1",p.visibility="hidden",p.pointerEvents="none"}h.font="".concat(s," ").concat(c," ").concat(l,"px ").concat(u);for(var f=0,g=0,v=t.split("\n"),y=0;y1&&void 0!==arguments[1])||arguments[1];if(t.merge(e),n)for(var r=0;r=e.desktopTapThreshold2}var D=a(t);v&&(e.hoverData.tapholdCancelled=!0);n=!0,r(g,["mousemove","vmousemove","tapdrag"],t,{x:c[0],y:c[1]});var T=function(){e.data.bgActivePosistion=void 0,e.hoverData.selecting||o.emit({originalEvent:t,type:"boxstart",position:{x:c[0],y:c[1]}}),f[4]=1,e.hoverData.selecting=!0,e.redrawHint("select",!0),e.redraw()};if(3===e.hoverData.which){if(v){var _={originalEvent:t,type:"cxtdrag",position:{x:c[0],y:c[1]}};b?b.emit(_):o.emit(_),e.hoverData.cxtDragged=!0,e.hoverData.cxtOver&&g===e.hoverData.cxtOver||(e.hoverData.cxtOver&&e.hoverData.cxtOver.emit({originalEvent:t,type:"cxtdragout",position:{x:c[0],y:c[1]}}),e.hoverData.cxtOver=g,g&&g.emit({originalEvent:t,type:"cxtdragover",position:{x:c[0],y:c[1]}}))}}else if(e.hoverData.dragging){if(n=!0,o.panningEnabled()&&o.userPanningEnabled()){var M;if(e.hoverData.justStartedPan){var B=e.hoverData.mdownPos;M={x:(c[0]-B[0])*s,y:(c[1]-B[1])*s},e.hoverData.justStartedPan=!1}else M={x:x[0]*s,y:x[1]*s};o.panBy(M),o.emit("dragpan"),e.hoverData.dragged=!0}c=e.projectIntoViewport(t.clientX,t.clientY)}else if(1!=f[4]||null!=b&&!b.pannable()){if(b&&b.pannable()&&b.active()&&b.unactivate(),b&&b.grabbed()||g==y||(y&&r(y,["mouseout","tapdragout"],t,{x:c[0],y:c[1]}),g&&r(g,["mouseover","tapdragover"],t,{x:c[0],y:c[1]}),e.hoverData.last=g),b)if(v){if(o.boxSelectionEnabled()&&D)b&&b.grabbed()&&(d(w),b.emit("freeon"),w.emit("free"),e.dragData.didDrag&&(b.emit("dragfreeon"),w.emit("dragfree"))),T();else if(b&&b.grabbed()&&e.nodeIsDraggable(b)){var N=!e.dragData.didDrag;N&&e.redrawHint("eles",!0),e.dragData.didDrag=!0,e.hoverData.draggingEles||u(w,{inDragLayer:!0});var z={x:0,y:0};if(k(x[0])&&k(x[1])&&(z.x+=x[0],z.y+=x[1],N)){var I=e.hoverData.dragDelta;I&&k(I[0])&&k(I[1])&&(z.x+=I[0],z.y+=I[1])}e.hoverData.draggingEles=!0,w.silentShift(z).emit("position drag"),e.redrawHint("drag",!0),e.redraw()}}else!function(){var t=e.hoverData.dragDelta=e.hoverData.dragDelta||[];0===t.length?(t.push(x[0]),t.push(x[1])):(t[0]+=x[0],t[1]+=x[1])}();n=!0}else if(v){if(e.hoverData.dragging||!o.boxSelectionEnabled()||!D&&o.panningEnabled()&&o.userPanningEnabled()){if(!e.hoverData.selecting&&o.panningEnabled()&&o.userPanningEnabled()){i(b,e.hoverData.downs)&&(e.hoverData.dragging=!0,e.hoverData.justStartedPan=!0,f[4]=0,e.data.bgActivePosistion=Tt(h),e.redrawHint("select",!0),e.redraw())}}else T();b&&b.pannable()&&b.active()&&b.unactivate()}return f[2]=c[0],f[3]=c[1],n?(t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),!1):void 0}}),!1),e.registerBinding(t,"mouseup",(function(t){if((1!==e.hoverData.which||1===t.which||!e.hoverData.capture)&&e.hoverData.capture){e.hoverData.capture=!1;var i=e.cy,o=e.projectIntoViewport(t.clientX,t.clientY),s=e.selection,l=e.findNearestElement(o[0],o[1],!0,!1),u=e.dragData.possibleDragElements,c=e.hoverData.down,h=a(t);if(e.data.bgActivePosistion&&(e.redrawHint("select",!0),e.redraw()),e.hoverData.tapholdCancelled=!0,e.data.bgActivePosistion=void 0,c&&c.unactivate(),3===e.hoverData.which){var p={originalEvent:t,type:"cxttapend",position:{x:o[0],y:o[1]}};if(c?c.emit(p):i.emit(p),!e.hoverData.cxtDragged){var f={originalEvent:t,type:"cxttap",position:{x:o[0],y:o[1]}};c?c.emit(f):i.emit(f)}e.hoverData.cxtDragged=!1,e.hoverData.which=null}else if(1===e.hoverData.which){if(r(l,["mouseup","tapend","vmouseup"],t,{x:o[0],y:o[1]}),e.dragData.didDrag||e.hoverData.dragged||e.hoverData.selecting||e.hoverData.isOverThresholdDrag||(r(c,["click","tap","vclick"],t,{x:o[0],y:o[1]}),x=!1,t.timeStamp-w<=i.multiClickDebounceTime()?(b&&clearTimeout(b),x=!0,w=null,r(c,["dblclick","dbltap","vdblclick"],t,{x:o[0],y:o[1]})):(b=setTimeout((function(){x||r(c,["oneclick","onetap","voneclick"],t,{x:o[0],y:o[1]})}),i.multiClickDebounceTime()),w=t.timeStamp)),null!=c||e.dragData.didDrag||e.hoverData.selecting||e.hoverData.dragged||a(t)||(i.$(n).unselect(["tapunselect"]),u.length>0&&e.redrawHint("eles",!0),e.dragData.possibleDragElements=u=i.collection()),l!=c||e.dragData.didDrag||e.hoverData.selecting||null!=l&&l._private.selectable&&(e.hoverData.dragging||("additive"===i.selectionType()||h?l.selected()?l.unselect(["tapunselect"]):l.select(["tapselect"]):h||(i.$(n).unmerge(l).unselect(["tapunselect"]),l.select(["tapselect"]))),e.redrawHint("eles",!0)),e.hoverData.selecting){var g=i.collection(e.getAllInBox(s[0],s[1],s[2],s[3]));e.redrawHint("select",!0),g.length>0&&e.redrawHint("eles",!0),i.emit({type:"boxend",originalEvent:t,position:{x:o[0],y:o[1]}});var v=function(e){return e.selectable()&&!e.selected()};"additive"===i.selectionType()||h||i.$(n).unmerge(g).unselect(),g.emit("box").stdFilter(v).select().emit("boxselect"),e.redraw()}if(e.hoverData.dragging&&(e.hoverData.dragging=!1,e.redrawHint("select",!0),e.redrawHint("eles",!0),e.redraw()),!s[4]){e.redrawHint("drag",!0),e.redrawHint("eles",!0);var y=c&&c.grabbed();d(u),y&&(c.emit("freeon"),u.emit("free"),e.dragData.didDrag&&(c.emit("dragfreeon"),u.emit("dragfree")))}}s[4]=0,e.hoverData.down=null,e.hoverData.cxtStarted=!1,e.hoverData.draggingEles=!1,e.hoverData.selecting=!1,e.hoverData.isOverThresholdDrag=!1,e.dragData.didDrag=!1,e.hoverData.dragged=!1,e.hoverData.dragDelta=[],e.hoverData.mdownPos=null,e.hoverData.mdownGPos=null,e.hoverData.which=null}}),!1);var C,S,P,D,T,_,M,B,N,z,I,A,L,O=function(t){if(!e.scrollingPage){var n=e.cy,r=n.zoom(),a=n.pan(),i=e.projectIntoViewport(t.clientX,t.clientY),o=[i[0]*r+a.x,i[1]*r+a.y];if(e.hoverData.draggingEles||e.hoverData.dragging||e.hoverData.cxtStarted||0!==e.selection[4])t.preventDefault();else if(n.panningEnabled()&&n.userPanningEnabled()&&n.zoomingEnabled()&&n.userZoomingEnabled()){var s;t.preventDefault(),e.data.wheelZooming=!0,clearTimeout(e.data.wheelTimeout),e.data.wheelTimeout=setTimeout((function(){e.data.wheelZooming=!1,e.redrawHint("eles",!0),e.redraw()}),150),s=null!=t.deltaY?t.deltaY/-250:null!=t.wheelDeltaY?t.wheelDeltaY/1e3:t.wheelDelta/1e3,s*=e.wheelSensitivity,1===t.deltaMode&&(s*=33);var l=n.zoom()*Math.pow(10,s);"gesturechange"===t.type&&(l=e.gestureStartZoom*t.scale),n.zoom({level:l,renderedPosition:{x:o[0],y:o[1]}}),n.emit("gesturechange"===t.type?"pinchzoom":"scrollzoom")}}};e.registerBinding(e.container,"wheel",O,!0),e.registerBinding(t,"scroll",(function(t){e.scrollingPage=!0,clearTimeout(e.scrollingPageTimeout),e.scrollingPageTimeout=setTimeout((function(){e.scrollingPage=!1}),250)}),!0),e.registerBinding(e.container,"gesturestart",(function(t){e.gestureStartZoom=e.cy.zoom(),e.hasTouchStarted||t.preventDefault()}),!0),e.registerBinding(e.container,"gesturechange",(function(t){e.hasTouchStarted||O(t)}),!0),e.registerBinding(e.container,"mouseout",(function(t){var n=e.projectIntoViewport(t.clientX,t.clientY);e.cy.emit({originalEvent:t,type:"mouseout",position:{x:n[0],y:n[1]}})}),!1),e.registerBinding(e.container,"mouseover",(function(t){var n=e.projectIntoViewport(t.clientX,t.clientY);e.cy.emit({originalEvent:t,type:"mouseover",position:{x:n[0],y:n[1]}})}),!1);var R,V,F,j,q,Y,X,W=function(e,t,n,r){return Math.sqrt((n-e)*(n-e)+(r-t)*(r-t))},H=function(e,t,n,r){return(n-e)*(n-e)+(r-t)*(r-t)};if(e.registerBinding(e.container,"touchstart",R=function(t){if(e.hasTouchStarted=!0,m(t)){p(),e.touchData.capture=!0,e.data.bgActivePosistion=void 0;var n=e.cy,a=e.touchData.now,i=e.touchData.earlier;if(t.touches[0]){var o=e.projectIntoViewport(t.touches[0].clientX,t.touches[0].clientY);a[0]=o[0],a[1]=o[1]}if(t.touches[1]){o=e.projectIntoViewport(t.touches[1].clientX,t.touches[1].clientY);a[2]=o[0],a[3]=o[1]}if(t.touches[2]){o=e.projectIntoViewport(t.touches[2].clientX,t.touches[2].clientY);a[4]=o[0],a[5]=o[1]}if(t.touches[1]){e.touchData.singleTouchMoved=!0,d(e.dragData.touchDragEles);var l=e.findContainerClientCoords();N=l[0],z=l[1],I=l[2],A=l[3],C=t.touches[0].clientX-N,S=t.touches[0].clientY-z,P=t.touches[1].clientX-N,D=t.touches[1].clientY-z,L=0<=C&&C<=I&&0<=P&&P<=I&&0<=S&&S<=A&&0<=D&&D<=A;var h=n.pan(),f=n.zoom();T=W(C,S,P,D),_=H(C,S,P,D),B=[((M=[(C+P)/2,(S+D)/2])[0]-h.x)/f,(M[1]-h.y)/f];if(_<4e4&&!t.touches[2]){var g=e.findNearestElement(a[0],a[1],!0,!0),v=e.findNearestElement(a[2],a[3],!0,!0);return g&&g.isNode()?(g.activate().emit({originalEvent:t,type:"cxttapstart",position:{x:a[0],y:a[1]}}),e.touchData.start=g):v&&v.isNode()?(v.activate().emit({originalEvent:t,type:"cxttapstart",position:{x:a[0],y:a[1]}}),e.touchData.start=v):n.emit({originalEvent:t,type:"cxttapstart",position:{x:a[0],y:a[1]}}),e.touchData.start&&(e.touchData.start._private.grabbed=!1),e.touchData.cxt=!0,e.touchData.cxtDragged=!1,e.data.bgActivePosistion=void 0,void e.redraw()}}if(t.touches[2])n.boxSelectionEnabled()&&t.preventDefault();else if(t.touches[1]);else if(t.touches[0]){var y=e.findNearestElements(a[0],a[1],!0,!0),b=y[0];if(null!=b&&(b.activate(),e.touchData.start=b,e.touchData.starts=y,e.nodeIsGrabbable(b))){var x=e.dragData.touchDragEles=n.collection(),w=null;e.redrawHint("eles",!0),e.redrawHint("drag",!0),b.selected()?(w=n.$((function(t){return t.selected()&&e.nodeIsGrabbable(t)})),u(w,{addToList:x})):c(b,{addToList:x}),s(b);var E=function(e){return{originalEvent:t,type:e,position:{x:a[0],y:a[1]}}};b.emit(E("grabon")),w?w.forEach((function(e){e.emit(E("grab"))})):b.emit(E("grab"))}r(b,["touchstart","tapstart","vmousedown"],t,{x:a[0],y:a[1]}),null==b&&(e.data.bgActivePosistion={x:o[0],y:o[1]},e.redrawHint("select",!0),e.redraw()),e.touchData.singleTouchMoved=!1,e.touchData.singleTouchStartTime=+new Date,clearTimeout(e.touchData.tapholdTimeout),e.touchData.tapholdTimeout=setTimeout((function(){!1!==e.touchData.singleTouchMoved||e.pinching||e.touchData.selecting||r(e.touchData.start,["taphold"],t,{x:a[0],y:a[1]})}),e.tapholdDuration)}if(t.touches.length>=1){for(var k=e.touchData.startPosition=[null,null,null,null,null,null],O=0;O=e.touchTapThreshold2}if(n&&e.touchData.cxt){t.preventDefault();var w=t.touches[0].clientX-N,E=t.touches[0].clientY-z,M=t.touches[1].clientX-N,I=t.touches[1].clientY-z,A=H(w,E,M,I);if(A/_>=2.25||A>=22500){e.touchData.cxt=!1,e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);var O={originalEvent:t,type:"cxttapend",position:{x:s[0],y:s[1]}};e.touchData.start?(e.touchData.start.unactivate().emit(O),e.touchData.start=null):o.emit(O)}}if(n&&e.touchData.cxt){O={originalEvent:t,type:"cxtdrag",position:{x:s[0],y:s[1]}};e.data.bgActivePosistion=void 0,e.redrawHint("select",!0),e.touchData.start?e.touchData.start.emit(O):o.emit(O),e.touchData.start&&(e.touchData.start._private.grabbed=!1),e.touchData.cxtDragged=!0;var R=e.findNearestElement(s[0],s[1],!0,!0);e.touchData.cxtOver&&R===e.touchData.cxtOver||(e.touchData.cxtOver&&e.touchData.cxtOver.emit({originalEvent:t,type:"cxtdragout",position:{x:s[0],y:s[1]}}),e.touchData.cxtOver=R,R&&R.emit({originalEvent:t,type:"cxtdragover",position:{x:s[0],y:s[1]}}))}else if(n&&t.touches[2]&&o.boxSelectionEnabled())t.preventDefault(),e.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,e.touchData.selecting||o.emit({originalEvent:t,type:"boxstart",position:{x:s[0],y:s[1]}}),e.touchData.selecting=!0,e.touchData.didSelect=!0,a[4]=1,a&&0!==a.length&&void 0!==a[0]?(a[2]=(s[0]+s[2]+s[4])/3,a[3]=(s[1]+s[3]+s[5])/3):(a[0]=(s[0]+s[2]+s[4])/3,a[1]=(s[1]+s[3]+s[5])/3,a[2]=(s[0]+s[2]+s[4])/3+1,a[3]=(s[1]+s[3]+s[5])/3+1),e.redrawHint("select",!0),e.redraw();else if(n&&t.touches[1]&&!e.touchData.didSelect&&o.zoomingEnabled()&&o.panningEnabled()&&o.userZoomingEnabled()&&o.userPanningEnabled()){if(t.preventDefault(),e.data.bgActivePosistion=void 0,e.redrawHint("select",!0),ee=e.dragData.touchDragEles){e.redrawHint("drag",!0);for(var V=0;V0&&!e.hoverData.draggingEles&&!e.swipePanning&&null!=e.data.bgActivePosistion&&(e.data.bgActivePosistion=void 0,e.redrawHint("select",!0),e.redraw())}},!1),e.registerBinding(t,"touchcancel",F=function(t){var n=e.touchData.start;e.touchData.capture=!1,n&&n.unactivate()}),e.registerBinding(t,"touchend",j=function(t){var a=e.touchData.start;if(e.touchData.capture){0===t.touches.length&&(e.touchData.capture=!1),t.preventDefault();var i=e.selection;e.swipePanning=!1,e.hoverData.draggingEles=!1;var o,s=e.cy,l=s.zoom(),u=e.touchData.now,c=e.touchData.earlier;if(t.touches[0]){var h=e.projectIntoViewport(t.touches[0].clientX,t.touches[0].clientY);u[0]=h[0],u[1]=h[1]}if(t.touches[1]){h=e.projectIntoViewport(t.touches[1].clientX,t.touches[1].clientY);u[2]=h[0],u[3]=h[1]}if(t.touches[2]){h=e.projectIntoViewport(t.touches[2].clientX,t.touches[2].clientY);u[4]=h[0],u[5]=h[1]}if(a&&a.unactivate(),e.touchData.cxt){if(o={originalEvent:t,type:"cxttapend",position:{x:u[0],y:u[1]}},a?a.emit(o):s.emit(o),!e.touchData.cxtDragged){var p={originalEvent:t,type:"cxttap",position:{x:u[0],y:u[1]}};a?a.emit(p):s.emit(p)}return e.touchData.start&&(e.touchData.start._private.grabbed=!1),e.touchData.cxt=!1,e.touchData.start=null,void e.redraw()}if(!t.touches[2]&&s.boxSelectionEnabled()&&e.touchData.selecting){e.touchData.selecting=!1;var f=s.collection(e.getAllInBox(i[0],i[1],i[2],i[3]));i[0]=void 0,i[1]=void 0,i[2]=void 0,i[3]=void 0,i[4]=0,e.redrawHint("select",!0),s.emit({type:"boxend",originalEvent:t,position:{x:u[0],y:u[1]}});f.emit("box").stdFilter((function(e){return e.selectable()&&!e.selected()})).select().emit("boxselect"),f.nonempty()&&e.redrawHint("eles",!0),e.redraw()}if(null!=a&&a.unactivate(),t.touches[2])e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);else if(t.touches[1]);else if(t.touches[0]);else if(!t.touches[0]){e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);var g=e.dragData.touchDragEles;if(null!=a){var v=a._private.grabbed;d(g),e.redrawHint("drag",!0),e.redrawHint("eles",!0),v&&(a.emit("freeon"),g.emit("free"),e.dragData.didDrag&&(a.emit("dragfreeon"),g.emit("dragfree"))),r(a,["touchend","tapend","vmouseup","tapdragout"],t,{x:u[0],y:u[1]}),a.unactivate(),e.touchData.start=null}else{var y=e.findNearestElement(u[0],u[1],!0,!0);r(y,["touchend","tapend","vmouseup","tapdragout"],t,{x:u[0],y:u[1]})}var m=e.touchData.startPosition[0]-u[0],b=m*m,x=e.touchData.startPosition[1]-u[1],w=(b+x*x)*l*l;e.touchData.singleTouchMoved||(a||s.$(":selected").unselect(["tapunselect"]),r(a,["tap","vclick"],t,{x:u[0],y:u[1]}),q=!1,t.timeStamp-X<=s.multiClickDebounceTime()?(Y&&clearTimeout(Y),q=!0,X=null,r(a,["dbltap","vdblclick"],t,{x:u[0],y:u[1]})):(Y=setTimeout((function(){q||r(a,["onetap","voneclick"],t,{x:u[0],y:u[1]})}),s.multiClickDebounceTime()),X=t.timeStamp)),null!=a&&!e.dragData.didDrag&&a._private.selectable&&w2){for(var p=[c[0],c[1]],f=Math.pow(p[0]-e,2)+Math.pow(p[1]-t,2),g=1;g0)return g[0]}return null},p=Object.keys(d),f=0;f0?u:Kt(a,i,e,t,n,r,o,s)},checkPoint:function(e,t,n,r,a,i,o,s){var l=2*(s="auto"===s?hn(r,a):s);if(Jt(e,t,this.points,i,o,r,a-l,[0,-1],n))return!0;if(Jt(e,t,this.points,i,o,r-l,a,[0,-1],n))return!0;var u=r/2+2*n,c=a/2+2*n;return!!Qt(e,t,[i-u,o-c,i-u,o,i+u,o,i+u,o-c])||(!!nn(e,t,l,l,i+r/2-s,o+a/2-s,n)||!!nn(e,t,l,l,i-r/2+s,o+a/2-s,n))}}},Au.registerNodeShapes=function(){var e=this.nodeShapes={},t=this;this.generateEllipse(),this.generatePolygon("triangle",un(3,0)),this.generateRoundPolygon("round-triangle",un(3,0)),this.generatePolygon("rectangle",un(4,0)),e.square=e.rectangle,this.generateRoundRectangle(),this.generateCutRectangle(),this.generateBarrel(),this.generateBottomRoundrectangle();var n=[0,1,1,0,0,-1,-1,0];this.generatePolygon("diamond",n),this.generateRoundPolygon("round-diamond",n),this.generatePolygon("pentagon",un(5,0)),this.generateRoundPolygon("round-pentagon",un(5,0)),this.generatePolygon("hexagon",un(6,0)),this.generateRoundPolygon("round-hexagon",un(6,0)),this.generatePolygon("heptagon",un(7,0)),this.generateRoundPolygon("round-heptagon",un(7,0)),this.generatePolygon("octagon",un(8,0)),this.generateRoundPolygon("round-octagon",un(8,0));var r=new Array(20),a=dn(5,0),i=dn(5,Math.PI/5),o=.5*(3-Math.sqrt(5));o*=1.57;for(var s=0;s=e.deqFastCost*g)break}else if(a){if(p>=e.deqCost*l||p>=e.deqAvgCost*s)break}else if(f>=e.deqNoDrawCost*Fu)break;var v=e.deq(t,d,c);if(!(v.length>0))break;for(var y=0;y0&&(e.onDeqd(t,u),!a&&e.shouldRedraw(t,u,d,c)&&r())}),a(t))}}},qu=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Xe;a(this,e),this.idsByKey=new it,this.keyForId=new it,this.cachesByLvl=new it,this.lvls=[],this.getKey=t,this.doesEleInvalidateKey=n}return o(e,[{key:"getIdsFor",value:function(e){null==e&&Ke("Can not get id list for null key");var t=this.idsByKey,n=this.idsByKey.get(e);return n||(n=new st,t.set(e,n)),n}},{key:"addIdForKey",value:function(e,t){null!=e&&this.getIdsFor(e).add(t)}},{key:"deleteIdForKey",value:function(e,t){null!=e&&this.getIdsFor(e).delete(t)}},{key:"getNumberOfIdsForKey",value:function(e){return null==e?0:this.getIdsFor(e).size}},{key:"updateKeyMappingFor",value:function(e){var t=e.id(),n=this.keyForId.get(t),r=this.getKey(e);this.deleteIdForKey(n,t),this.addIdForKey(r,t),this.keyForId.set(t,r)}},{key:"deleteKeyMappingFor",value:function(e){var t=e.id(),n=this.keyForId.get(t);this.deleteIdForKey(n,t),this.keyForId.delete(t)}},{key:"keyHasChangedFor",value:function(e){var t=e.id();return this.keyForId.get(t)!==this.getKey(e)}},{key:"isInvalid",value:function(e){return this.keyHasChangedFor(e)||this.doesEleInvalidateKey(e)}},{key:"getCachesAt",value:function(e){var t=this.cachesByLvl,n=this.lvls,r=t.get(e);return r||(r=new it,t.set(e,r),n.push(e)),r}},{key:"getCache",value:function(e,t){return this.getCachesAt(t).get(e)}},{key:"get",value:function(e,t){var n=this.getKey(e),r=this.getCache(n,t);return null!=r&&this.updateKeyMappingFor(e),r}},{key:"getForCachedKey",value:function(e,t){var n=this.keyForId.get(e.id());return this.getCache(n,t)}},{key:"hasCache",value:function(e,t){return this.getCachesAt(t).has(e)}},{key:"has",value:function(e,t){var n=this.getKey(e);return this.hasCache(n,t)}},{key:"setCache",value:function(e,t,n){n.key=e,this.getCachesAt(t).set(e,n)}},{key:"set",value:function(e,t,n){var r=this.getKey(e);this.setCache(r,t,n),this.updateKeyMappingFor(e)}},{key:"deleteCache",value:function(e,t){this.getCachesAt(t).delete(e)}},{key:"delete",value:function(e,t){var n=this.getKey(e);this.deleteCache(n,t)}},{key:"invalidateKey",value:function(e){var t=this;this.lvls.forEach((function(n){return t.deleteCache(e,n)}))}},{key:"invalidate",value:function(e){var t=e.id(),n=this.keyForId.get(t);this.deleteKeyMappingFor(e);var r=this.doesEleInvalidateKey(e);return r&&this.invalidateKey(n),r||0===this.getNumberOfIdsForKey(n)}}]),e}(),Yu={dequeue:"dequeue",downscale:"downscale",highQuality:"highQuality"},Xu=et({getKey:null,doesEleInvalidateKey:Xe,drawElement:null,getBoundingBox:null,getRotationPoint:null,getRotationOffset:null,isVisible:Ye,allowEdgeTxrCaching:!0,allowParentTxrCaching:!0}),Wu=function(e,t){var n=this;n.renderer=e,n.onDequeues=[];var r=Xu(t);Y(n,r),n.lookup=new qu(r.getKey,r.doesEleInvalidateKey),n.setupDequeueing()},Hu=Wu.prototype;Hu.reasons=Yu,Hu.getTextureQueue=function(e){var t=this;return t.eleImgCaches=t.eleImgCaches||{},t.eleImgCaches[e]=t.eleImgCaches[e]||[]},Hu.getRetiredTextureQueue=function(e){var t=this.eleImgCaches.retired=this.eleImgCaches.retired||{};return t[e]=t[e]||[]},Hu.getElementQueue=function(){return this.eleCacheQueue=this.eleCacheQueue||new ht((function(e,t){return t.reqs-e.reqs}))},Hu.getElementKeyToQueue=function(){return this.eleKeyToCacheQueue=this.eleKeyToCacheQueue||{}},Hu.getElement=function(e,t,n,r,a){var i=this,o=this.renderer,s=o.cy.zoom(),l=this.lookup;if(!t||0===t.w||0===t.h||isNaN(t.w)||isNaN(t.h)||!e.visible()||e.removed())return null;if(!i.allowEdgeTxrCaching&&e.isEdge()||!i.allowParentTxrCaching&&e.isParent())return null;if(null==r&&(r=Math.ceil(Mt(s*n))),r<-4)r=-4;else if(s>=7.99||r>3)return null;var u=Math.pow(2,r),c=t.h*u,d=t.w*u,h=o.eleTextBiggerThanMin(e,u);if(!this.isVisible(e,h))return null;var p,f=l.get(e,r);if(f&&f.invalidated&&(f.invalidated=!1,f.texture.invalidatedWidth-=f.width),f)return f;if(p=c<=25?25:c<=50?50:50*Math.ceil(c/50),c>1024||d>1024)return null;var g=i.getTextureQueue(p),v=g[g.length-2],y=function(){return i.recycleTexture(p,d)||i.addTexture(p,d)};v||(v=g[g.length-1]),v||(v=y()),v.width-v.usedWidthr;D--)S=i.getElement(e,t,n,D,Yu.downscale);P()}else{var T;if(!x&&!w&&!E)for(var _=r-1;_>=-4;_--){var M=l.get(e,_);if(M){T=M;break}}if(b(T))return i.queueElement(e,r),T;v.context.translate(v.usedWidth,0),v.context.scale(u,u),this.drawElement(v.context,e,t,h,!1),v.context.scale(1/u,1/u),v.context.translate(-v.usedWidth,0)}return f={x:v.usedWidth,texture:v,level:r,scale:u,width:d,height:c,scaledLabelShown:h},v.usedWidth+=Math.ceil(d+8),v.eleCaches.push(f),l.set(e,r,f),i.checkTextureFullness(v),f},Hu.invalidateElements=function(e){for(var t=0;t=.2*e.width&&this.retireTexture(e)},Hu.checkTextureFullness=function(e){var t=this.getTextureQueue(e.height);e.usedWidth/e.width>.8&&e.fullnessChecks>=10?tt(t,e):e.fullnessChecks++},Hu.retireTexture=function(e){var t=e.height,n=this.getTextureQueue(t),r=this.lookup;tt(n,e),e.retired=!0;for(var a=e.eleCaches,i=0;i=t)return i.retired=!1,i.usedWidth=0,i.invalidatedWidth=0,i.fullnessChecks=0,nt(i.eleCaches),i.context.setTransform(1,0,0,1,0,0),i.context.clearRect(0,0,i.width,i.height),tt(r,i),n.push(i),i}},Hu.queueElement=function(e,t){var n=this.getElementQueue(),r=this.getElementKeyToQueue(),a=this.getKey(e),i=r[a];if(i)i.level=Math.max(i.level,t),i.eles.merge(e),i.reqs++,n.updateItem(i);else{var o={eles:e.spawn().merge(e),level:t,reqs:1,key:a};n.push(o),r[a]=o}},Hu.dequeue=function(e){for(var t=this,n=t.getElementQueue(),r=t.getElementKeyToQueue(),a=[],i=t.lookup,o=0;o<1&&n.size()>0;o++){var s=n.pop(),l=s.key,u=s.eles[0],c=i.hasCache(u,s.level);if(r[l]=null,!c){a.push(s);var d=t.getBoundingBox(u);t.getElement(u,d,e,s.level,Yu.dequeue)}}return a},Hu.removeFromQueue=function(e){var t=this.getElementQueue(),n=this.getElementKeyToQueue(),r=this.getKey(e),a=n[r];null!=a&&(1===a.eles.length?(a.reqs=qe,t.updateItem(a),t.pop(),n[r]=null):a.eles.unmerge(e))},Hu.onDequeue=function(e){this.onDequeues.push(e)},Hu.offDequeue=function(e){tt(this.onDequeues,e)},Hu.setupDequeueing=ju({deqRedrawThreshold:100,deqCost:.15,deqAvgCost:.1,deqNoDrawCost:.9,deqFastCost:.9,deq:function(e,t,n){return e.dequeue(t,n)},onDeqd:function(e,t){for(var n=0;n=3.99||n>2)return null;r.validateLayersElesOrdering(n,e);var o,s,l=r.layersByLevel,u=Math.pow(2,n),c=l[n]=l[n]||[];if(r.levelIsComplete(n,e))return c;!function(){var t=function(t){if(r.validateLayersElesOrdering(t,e),r.levelIsComplete(t,e))return s=l[t],!0},a=function(e){if(!s)for(var r=n+e;-4<=r&&r<=2&&!t(r);r+=e);};a(1),a(-1);for(var i=c.length-1;i>=0;i--){var o=c[i];o.invalid&&tt(c,o)}}();var d=function(t){var a=(t=t||{}).after;!function(){if(!o){o=Rt();for(var t=0;t32767||s>32767)return null;if(i*s>16e6)return null;var l=r.makeLayer(o,n);if(null!=a){var d=c.indexOf(a)+1;c.splice(d,0,l)}else(void 0===t.insert||t.insert)&&c.unshift(l);return l};if(r.skipping&&!i)return null;for(var h=null,p=e.length/1,f=!i,g=0;g=p||!Ht(h.bb,v.boundingBox()))&&!(h=d({insert:!0,after:h})))return null;s||f?r.queueLayer(h,v):r.drawEleInLayer(h,v,n,t),h.eles.push(v),m[n]=h}}return s||(f?null:c)},Gu.getEleLevelForLayerLevel=function(e,t){return e},Gu.drawEleInLayer=function(e,t,n,r){var a=this.renderer,i=e.context,o=t.boundingBox();0!==o.w&&0!==o.h&&t.visible()&&(n=this.getEleLevelForLayerLevel(n,r),a.setImgSmoothing(i,!1),a.drawCachedElement(i,t,null,null,n,true),a.setImgSmoothing(i,!0))},Gu.levelIsComplete=function(e,t){var n=this.layersByLevel[e];if(!n||0===n.length)return!1;for(var r=0,a=0;a0)return!1;if(i.invalid)return!1;r+=i.eles.length}return r===t.length},Gu.validateLayersElesOrdering=function(e,t){var n=this.layersByLevel[e];if(n)for(var r=0;r0){e=!0;break}}return e},Gu.invalidateElements=function(e){var t=this;0!==e.length&&(t.lastInvalidationTime=Te(),0!==e.length&&t.haveLayers()&&t.updateElementsInLayers(e,(function(e,n,r){t.invalidateLayer(e)})))},Gu.invalidateLayer=function(e){if(this.lastInvalidationTime=Te(),!e.invalid){var t=e.level,n=e.eles,r=this.layersByLevel[t];tt(r,e),e.elesQueue=[],e.invalid=!0,e.replacement&&(e.replacement.invalid=!0);for(var a=0;a3&&void 0!==arguments[3])||arguments[3],a=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],o=this,s=t._private.rscratch;if((!i||t.visible())&&!s.badLine&&null!=s.allpts&&!isNaN(s.allpts[0])){var l;n&&(l=n,e.translate(-l.x1,-l.y1));var u=i?t.pstyle("opacity").value:1,c=i?t.pstyle("line-opacity").value:1,d=t.pstyle("curve-style").value,h=t.pstyle("line-style").value,p=t.pstyle("width").pfValue,f=t.pstyle("line-cap").value,g=t.pstyle("line-outline-width").value,v=t.pstyle("line-outline-color").value,y=u*c,m=u*c,b=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:y;"straight-triangle"===d?(o.eleStrokeStyle(e,t,n),o.drawEdgeTrianglePath(t,e,s.allpts)):(e.lineWidth=p,e.lineCap=f,o.eleStrokeStyle(e,t,n),o.drawEdgePath(t,e,s.allpts,h),e.lineCap="butt")},x=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:m;o.drawArrowheads(e,t,n)};if(e.lineJoin="round","yes"===t.pstyle("ghost").value){var w=t.pstyle("ghost-offset-x").pfValue,E=t.pstyle("ghost-offset-y").pfValue,k=t.pstyle("ghost-opacity").value,C=y*k;e.translate(w,E),b(C),x(C),e.translate(-w,-E)}else!function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:y;e.lineWidth=p+g,e.lineCap=f,g>0?(o.colorStrokeStyle(e,v[0],v[1],v[2],n),"straight-triangle"===d?o.drawEdgeTrianglePath(t,e,s.allpts):(o.drawEdgePath(t,e,s.allpts,h),e.lineCap="butt")):e.lineCap="butt"}();a&&o.drawEdgeUnderlay(e,t),b(),x(),a&&o.drawEdgeOverlay(e,t),o.drawElementText(e,t,null,r),n&&e.translate(l.x1,l.y1)}}},hc=function(e){if(!["overlay","underlay"].includes(e))throw new Error("Invalid state");return function(t,n){if(n.visible()){var r=n.pstyle("".concat(e,"-opacity")).value;if(0!==r){var a=this,i=a.usePaths(),o=n._private.rscratch,s=2*n.pstyle("".concat(e,"-padding")).pfValue,l=n.pstyle("".concat(e,"-color")).value;t.lineWidth=s,"self"!==o.edgeType||i?t.lineCap="round":t.lineCap="butt",a.colorStrokeStyle(t,l[0],l[1],l[2],r),a.drawEdgePath(n,t,o.allpts,"solid")}}}};dc.drawEdgeOverlay=hc("overlay"),dc.drawEdgeUnderlay=hc("underlay"),dc.drawEdgePath=function(e,t,n,r){var a,i=e._private.rscratch,o=t,s=!1,l=this.usePaths(),u=e.pstyle("line-dash-pattern").pfValue,c=e.pstyle("line-dash-offset").pfValue;if(l){var h=n.join("$");i.pathCacheKey&&i.pathCacheKey===h?(a=t=i.pathCache,s=!0):(a=t=new Path2D,i.pathCacheKey=h,i.pathCache=a)}if(o.setLineDash)switch(r){case"dotted":o.setLineDash([1,1]);break;case"dashed":o.setLineDash(u),o.lineDashOffset=c;break;case"solid":o.setLineDash([])}if(!s&&!i.badLine)switch(t.beginPath&&t.beginPath(),t.moveTo(n[0],n[1]),i.edgeType){case"bezier":case"self":case"compound":case"multibezier":for(var p=2;p+35&&void 0!==arguments[5]?arguments[5]:5,o=arguments.length>6?arguments[6]:void 0;e.beginPath(),e.moveTo(t+i,n),e.lineTo(t+r-i,n),e.quadraticCurveTo(t+r,n,t+r,n+i),e.lineTo(t+r,n+a-i),e.quadraticCurveTo(t+r,n+a,t+r-i,n+a),e.lineTo(t+i,n+a),e.quadraticCurveTo(t,n+a,t,n+a-i),e.lineTo(t,n+i),e.quadraticCurveTo(t,n,t+i,n),e.closePath(),o?e.stroke():e.fill()}fc.eleTextBiggerThanMin=function(e,t){if(!t){var n=e.cy().zoom(),r=this.getPixelRatio(),a=Math.ceil(Mt(n*r));t=Math.pow(2,a)}return!(e.pstyle("font-size").pfValue*t5&&void 0!==arguments[5])||arguments[5],o=this;if(null==r){if(i&&!o.eleTextBiggerThanMin(t))return}else if(!1===r)return;if(t.isNode()){var s=t.pstyle("label");if(!s||!s.value)return;var l=o.getLabelJustification(t);e.textAlign=l,e.textBaseline="bottom"}else{var u=t.element()._private.rscratch.badLine,c=t.pstyle("label"),d=t.pstyle("source-label"),h=t.pstyle("target-label");if(u||(!c||!c.value)&&(!d||!d.value)&&(!h||!h.value))return;e.textAlign="center",e.textBaseline="bottom"}var p,f=!n;n&&(p=n,e.translate(-p.x1,-p.y1)),null==a?(o.drawText(e,t,null,f,i),t.isEdge()&&(o.drawText(e,t,"source",f,i),o.drawText(e,t,"target",f,i))):o.drawText(e,t,a,f,i),n&&e.translate(p.x1,p.y1)},fc.getFontCache=function(e){var t;this.fontCaches=this.fontCaches||[];for(var n=0;n2&&void 0!==arguments[2])||arguments[2],r=t.pstyle("font-style").strValue,a=t.pstyle("font-size").pfValue+"px",i=t.pstyle("font-family").strValue,o=t.pstyle("font-weight").strValue,s=n?t.effectiveOpacity()*t.pstyle("text-opacity").value:1,l=t.pstyle("text-outline-opacity").value*s,u=t.pstyle("color").value,c=t.pstyle("text-outline-color").value;e.font=r+" "+o+" "+a+" "+i,e.lineJoin="round",this.colorFillStyle(e,u[0],u[1],u[2],s),this.colorStrokeStyle(e,c[0],c[1],c[2],l)},fc.getTextAngle=function(e,t){var n=e._private.rscratch,r=t?t+"-":"",a=e.pstyle(r+"text-rotation"),i=rt(n,"labelAngle",t);return"autorotate"===a.strValue?e.isEdge()?i:0:"none"===a.strValue?0:a.pfValue},fc.drawText=function(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],a=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=t._private.rscratch,o=a?t.effectiveOpacity():1;if(!a||0!==o&&0!==t.pstyle("text-opacity").value){"main"===n&&(n=null);var s,l,u=rt(i,"labelX",n),c=rt(i,"labelY",n),d=this.getLabelText(t,n);if(null!=d&&""!==d&&!isNaN(u)&&!isNaN(c)){this.setupTextStyle(e,t,a);var h,p=n?n+"-":"",f=rt(i,"labelWidth",n),g=rt(i,"labelHeight",n),v=t.pstyle(p+"text-margin-x").pfValue,y=t.pstyle(p+"text-margin-y").pfValue,m=t.isEdge(),b=t.pstyle("text-halign").value,x=t.pstyle("text-valign").value;switch(m&&(b="center",x="center"),u+=v,c+=y,0!==(h=r?this.getTextAngle(t,n):0)&&(s=u,l=c,e.translate(s,l),e.rotate(h),u=0,c=0),x){case"top":break;case"center":c+=g/2;break;case"bottom":c+=g}var w=t.pstyle("text-background-opacity").value,E=t.pstyle("text-border-opacity").value,k=t.pstyle("text-border-width").pfValue,C=t.pstyle("text-background-padding").pfValue,S=0===t.pstyle("text-background-shape").strValue.indexOf("round");if(w>0||k>0&&E>0){var P=u-C;switch(b){case"left":P-=f;break;case"center":P-=f/2}var D=c-g-C,T=f+2*C,_=g+2*C;if(w>0){var M=e.fillStyle,B=t.pstyle("text-background-color").value;e.fillStyle="rgba("+B[0]+","+B[1]+","+B[2]+","+w*o+")",S?gc(e,P,D,T,_,2):e.fillRect(P,D,T,_),e.fillStyle=M}if(k>0&&E>0){var N=e.strokeStyle,z=e.lineWidth,I=t.pstyle("text-border-color").value,A=t.pstyle("text-border-style").value;if(e.strokeStyle="rgba("+I[0]+","+I[1]+","+I[2]+","+E*o+")",e.lineWidth=k,e.setLineDash)switch(A){case"dotted":e.setLineDash([1,1]);break;case"dashed":e.setLineDash([4,2]);break;case"double":e.lineWidth=k/4,e.setLineDash([]);break;case"solid":e.setLineDash([])}if(S?gc(e,P,D,T,_,2,"stroke"):e.strokeRect(P,D,T,_),"double"===A){var L=k/2;S?gc(e,P+L,D+L,T-2*L,_-2*L,2,"stroke"):e.strokeRect(P+L,D+L,T-2*L,_-2*L)}e.setLineDash&&e.setLineDash([]),e.lineWidth=z,e.strokeStyle=N}}var O=2*t.pstyle("text-outline-width").pfValue;if(O>0&&(e.lineWidth=O),"wrap"===t.pstyle("text-wrap").value){var R=rt(i,"labelWrapCachedLines",n),V=rt(i,"labelLineHeight",n),F=f/2,j=this.getLabelJustification(t);switch("auto"===j||("left"===b?"left"===j?u+=-f:"center"===j&&(u+=-F):"center"===b?"left"===j?u+=-F:"right"===j&&(u+=F):"right"===b&&("center"===j?u+=F:"right"===j&&(u+=f))),x){case"top":case"center":case"bottom":c-=(R.length-1)*V}for(var q=0;q0&&e.strokeText(R[q],u,c),e.fillText(R[q],u,c),c+=V}else O>0&&e.strokeText(d,u,c),e.fillText(d,u,c);0!==h&&(e.rotate(-h),e.translate(-s,-l))}}};var vc={drawNode:function(e,t,n){var r,a,i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],s=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],l=this,u=t._private,c=u.rscratch,d=t.position();if(k(d.x)&&k(d.y)&&(!s||t.visible())){var h,p,f=s?t.effectiveOpacity():1,g=l.usePaths(),v=!1,y=t.padding();r=t.width()+2*y,a=t.height()+2*y,n&&(p=n,e.translate(-p.x1,-p.y1));for(var m=t.pstyle("background-image").value,b=new Array(m.length),x=new Array(m.length),w=0,E=0;E0&&void 0!==arguments[0]?arguments[0]:T;l.eleFillStyle(e,t,n)},X=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:L;l.colorStrokeStyle(e,_[0],_[1],_[2],t)},W=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:F;l.colorStrokeStyle(e,R[0],R[1],R[2],t)},H=function(e,t,n,r){var a,i=l.nodePathCache=l.nodePathCache||[],o=Oe("polygon"===n?n+","+r.join(","):n,""+t,""+e,""+q),s=i[o],u=!1;return null!=s?(a=s,u=!0,c.pathCache=a):(a=new Path2D,i[o]=c.pathCache=a),{path:a,cacheHit:u}},K=t.pstyle("shape").strValue,G=t.pstyle("shape-polygon-points").pfValue;if(g){e.translate(d.x,d.y);var U=H(r,a,K,G);h=U.path,v=U.cacheHit}var Z=function(){if(!v){var n=d;g&&(n={x:0,y:0}),l.nodeShapes[l.getNodeShape(t)].draw(h||e,n.x,n.y,r,a,q,c)}g?e.fill(h):e.fill()},$=function(){for(var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:f,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],a=u.backgrounding,i=0,o=0;o0&&void 0!==arguments[0]&&arguments[0],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f;l.hasPie(t)&&(l.drawPie(e,t,i),n&&(g||l.nodeShapes[l.getNodeShape(t)].draw(e,d.x,d.y,r,a,q,c)))},J=function(){var t=(P>0?P:-P)*(arguments.length>0&&void 0!==arguments[0]?arguments[0]:f),n=P>0?0:255;0!==P&&(l.colorFillStyle(e,n,n,n,t),g?e.fill(h):e.fill())},ee=function(){if(D>0){if(e.lineWidth=D,e.lineCap=N,e.lineJoin=B,e.setLineDash)switch(M){case"dotted":e.setLineDash([1,1]);break;case"dashed":e.setLineDash(I),e.lineDashOffset=A;break;case"solid":case"double":e.setLineDash([])}if("center"!==z){if(e.save(),e.lineWidth*=2,"inside"===z)g?e.clip(h):e.clip();else{var t=new Path2D;t.rect(-r/2-D,-a/2-D,r+2*D,a+2*D),t.addPath(h),e.clip(t,"evenodd")}g?e.stroke(h):e.stroke(),e.restore()}else g?e.stroke(h):e.stroke();if("double"===M){e.lineWidth=D/3;var n=e.globalCompositeOperation;e.globalCompositeOperation="destination-out",g?e.stroke(h):e.stroke(),e.globalCompositeOperation=n}e.setLineDash&&e.setLineDash([])}},te=function(){if(O>0){if(e.lineWidth=O,e.lineCap="butt",e.setLineDash)switch(V){case"dotted":e.setLineDash([1,1]);break;case"dashed":e.setLineDash([4,2]);break;case"solid":case"double":e.setLineDash([])}var n=d;g&&(n={x:0,y:0});var i=l.getNodeShape(t),o=D;"inside"===z&&(o=0),"outside"===z&&(o*=2);var s,u=(r+o+(O+j))/r,c=(a+o+(O+j))/a,h=r*u,p=a*c,f=l.nodeShapes[i].points;if(g)s=H(h,p,i,f).path;if("ellipse"===i)l.drawEllipsePath(s||e,n.x,n.y,h,p);else if(["round-diamond","round-heptagon","round-hexagon","round-octagon","round-pentagon","round-polygon","round-triangle","round-tag"].includes(i)){var v=0,y=0,m=0;"round-diamond"===i?v=1.4*(o+j+O):"round-heptagon"===i?(v=1.075*(o+j+O),m=-(o/2+j+O)/35):"round-hexagon"===i?v=1.12*(o+j+O):"round-pentagon"===i?(v=1.13*(o+j+O),m=-(o/2+j+O)/15):"round-tag"===i?(v=1.12*(o+j+O),y=.07*(o/2+O+j)):"round-triangle"===i&&(v=(o+j+O)*(Math.PI/2),m=-(o+j/2+O)/Math.PI),0!==v&&(h=r*(u=(r+v)/r),["round-hexagon","round-tag"].includes(i)||(p=a*(c=(a+v)/a)));for(var b=h/2,x=p/2,w=(q="auto"===q?pn(h,p):q)+(o+O+j)/2,E=new Array(f.length/2),k=new Array(f.length/2),C=0;C0){if(r=r||n.position(),null==a||null==i){var d=n.padding();a=n.width()+2*d,i=n.height()+2*d}this.colorFillStyle(t,l[0],l[1],l[2],s),this.nodeShapes[u].draw(t,r.x,r.y,a+2*o,i+2*o,c),t.fill()}}}};vc.drawNodeOverlay=yc("overlay"),vc.drawNodeUnderlay=yc("underlay"),vc.hasPie=function(e){return(e=e[0])._private.hasPie},vc.drawPie=function(e,t,n,r){t=t[0],r=r||t.position();var a=t.cy().style(),i=t.pstyle("pie-size"),o=r.x,s=r.y,l=t.width(),u=t.height(),c=Math.min(l,u)/2,d=0;this.usePaths()&&(o=0,s=0),"%"===i.units?c*=i.pfValue:void 0!==i.pfValue&&(c=i.pfValue/2);for(var h=1;h<=a.pieBackgroundN;h++){var p=t.pstyle("pie-"+h+"-background-size").value,f=t.pstyle("pie-"+h+"-background-color").value,g=t.pstyle("pie-"+h+"-background-opacity").value*n,v=p/100;v+d>1&&(v=1-d);var y=1.5*Math.PI+2*Math.PI*d,m=y+2*Math.PI*v;0===p||d>=1||d+v>1||(e.beginPath(),e.moveTo(o,s),e.arc(o,s,c,y,m),e.closePath(),this.colorFillStyle(e,f[0],f[1],f[2],g),e.fill(),d+=v)}};var mc={};mc.getPixelRatio=function(){var e=this.data.contexts[0];if(null!=this.forcedPixelRatio)return this.forcedPixelRatio;var t=this.cy.window(),n=e.backingStorePixelRatio||e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return(t.devicePixelRatio||1)/n},mc.paintCache=function(e){for(var t,n=this.paintCaches=this.paintCaches||[],r=!0,a=0;ao.minMbLowQualFrames&&(o.motionBlurPxRatio=o.mbPxRBlurry)),o.clearingMotionBlur&&(o.motionBlurPxRatio=1),o.textureDrawLastFrame&&!d&&(c[o.NODE]=!0,c[o.SELECT_BOX]=!0);var m=l.style(),b=l.zoom(),x=void 0!==a?a:b,w=l.pan(),E={x:w.x,y:w.y},k={zoom:b,pan:{x:w.x,y:w.y}},C=o.prevViewport;void 0===C||k.zoom!==C.zoom||k.pan.x!==C.pan.x||k.pan.y!==C.pan.y||g&&!f||(o.motionBlurPxRatio=1),i&&(E=i),x*=s,E.x*=s,E.y*=s;var S=o.getCachedZSortedEles();function P(e,t,n,r,a){var i=e.globalCompositeOperation;e.globalCompositeOperation="destination-out",o.colorFillStyle(e,255,255,255,o.motionBlurTransparency),e.fillRect(t,n,r,a),e.globalCompositeOperation=i}function D(e,r){var s,l,c,d;o.clearingMotionBlur||e!==u.bufferContexts[o.MOTIONBLUR_BUFFER_NODE]&&e!==u.bufferContexts[o.MOTIONBLUR_BUFFER_DRAG]?(s=E,l=x,c=o.canvasWidth,d=o.canvasHeight):(s={x:w.x*p,y:w.y*p},l=b*p,c=o.canvasWidth*p,d=o.canvasHeight*p),e.setTransform(1,0,0,1,0,0),"motionBlur"===r?P(e,0,0,c,d):t||void 0!==r&&!r||e.clearRect(0,0,c,d),n||(e.translate(s.x,s.y),e.scale(l,l)),i&&e.translate(i.x,i.y),a&&e.scale(a,a)}if(d||(o.textureDrawLastFrame=!1),d){if(o.textureDrawLastFrame=!0,!o.textureCache){o.textureCache={},o.textureCache.bb=l.mutableElements().boundingBox(),o.textureCache.texture=o.data.bufferCanvases[o.TEXTURE_BUFFER];var T=o.data.bufferContexts[o.TEXTURE_BUFFER];T.setTransform(1,0,0,1,0,0),T.clearRect(0,0,o.canvasWidth*o.textureMult,o.canvasHeight*o.textureMult),o.render({forcedContext:T,drawOnlyNodeLayer:!0,forcedPxRatio:s*o.textureMult}),(k=o.textureCache.viewport={zoom:l.zoom(),pan:l.pan(),width:o.canvasWidth,height:o.canvasHeight}).mpan={x:(0-k.pan.x)/k.zoom,y:(0-k.pan.y)/k.zoom}}c[o.DRAG]=!1,c[o.NODE]=!1;var _=u.contexts[o.NODE],M=o.textureCache.texture;k=o.textureCache.viewport;_.setTransform(1,0,0,1,0,0),h?P(_,0,0,k.width,k.height):_.clearRect(0,0,k.width,k.height);var B=m.core("outside-texture-bg-color").value,N=m.core("outside-texture-bg-opacity").value;o.colorFillStyle(_,B[0],B[1],B[2],N),_.fillRect(0,0,k.width,k.height);b=l.zoom();D(_,!1),_.clearRect(k.mpan.x,k.mpan.y,k.width/k.zoom/s,k.height/k.zoom/s),_.drawImage(M,k.mpan.x,k.mpan.y,k.width/k.zoom/s,k.height/k.zoom/s)}else o.textureOnViewport&&!t&&(o.textureCache=null);var z=l.extent(),I=o.pinching||o.hoverData.dragging||o.swipePanning||o.data.wheelZooming||o.hoverData.draggingEles||o.cy.animated(),A=o.hideEdgesOnViewport&&I,L=[];if(L[o.NODE]=!c[o.NODE]&&h&&!o.clearedForMotionBlur[o.NODE]||o.clearingMotionBlur,L[o.NODE]&&(o.clearedForMotionBlur[o.NODE]=!0),L[o.DRAG]=!c[o.DRAG]&&h&&!o.clearedForMotionBlur[o.DRAG]||o.clearingMotionBlur,L[o.DRAG]&&(o.clearedForMotionBlur[o.DRAG]=!0),c[o.NODE]||n||r||L[o.NODE]){var O=h&&!L[o.NODE]&&1!==p;D(_=t||(O?o.data.bufferContexts[o.MOTIONBLUR_BUFFER_NODE]:u.contexts[o.NODE]),h&&!O?"motionBlur":void 0),A?o.drawCachedNodes(_,S.nondrag,s,z):o.drawLayeredElements(_,S.nondrag,s,z),o.debug&&o.drawDebugPoints(_,S.nondrag),n||h||(c[o.NODE]=!1)}if(!r&&(c[o.DRAG]||n||L[o.DRAG])){O=h&&!L[o.DRAG]&&1!==p;D(_=t||(O?o.data.bufferContexts[o.MOTIONBLUR_BUFFER_DRAG]:u.contexts[o.DRAG]),h&&!O?"motionBlur":void 0),A?o.drawCachedNodes(_,S.drag,s,z):o.drawCachedElements(_,S.drag,s,z),o.debug&&o.drawDebugPoints(_,S.drag),n||h||(c[o.DRAG]=!1)}if(o.showFps||!r&&c[o.SELECT_BOX]&&!n){if(D(_=t||u.contexts[o.SELECT_BOX]),1==o.selection[4]&&(o.hoverData.selecting||o.touchData.selecting)){b=o.cy.zoom();var R=m.core("selection-box-border-width").value/b;_.lineWidth=R,_.fillStyle="rgba("+m.core("selection-box-color").value[0]+","+m.core("selection-box-color").value[1]+","+m.core("selection-box-color").value[2]+","+m.core("selection-box-opacity").value+")",_.fillRect(o.selection[0],o.selection[1],o.selection[2]-o.selection[0],o.selection[3]-o.selection[1]),R>0&&(_.strokeStyle="rgba("+m.core("selection-box-border-color").value[0]+","+m.core("selection-box-border-color").value[1]+","+m.core("selection-box-border-color").value[2]+","+m.core("selection-box-opacity").value+")",_.strokeRect(o.selection[0],o.selection[1],o.selection[2]-o.selection[0],o.selection[3]-o.selection[1]))}if(u.bgActivePosistion&&!o.hoverData.selecting){b=o.cy.zoom();var V=u.bgActivePosistion;_.fillStyle="rgba("+m.core("active-bg-color").value[0]+","+m.core("active-bg-color").value[1]+","+m.core("active-bg-color").value[2]+","+m.core("active-bg-opacity").value+")",_.beginPath(),_.arc(V.x,V.y,m.core("active-bg-size").pfValue/b,0,2*Math.PI),_.fill()}var F=o.lastRedrawTime;if(o.showFps&&F){F=Math.round(F);var j=Math.round(1e3/F);_.setTransform(1,0,0,1,0,0),_.fillStyle="rgba(255, 0, 0, 0.75)",_.strokeStyle="rgba(255, 0, 0, 0.75)",_.lineWidth=1,_.fillText("1 frame = "+F+" ms = "+j+" fps",0,20);_.strokeRect(0,30,250,20),_.fillRect(0,30,250*Math.min(j/60,1),20)}n||(c[o.SELECT_BOX]=!1)}if(h&&1!==p){var q=u.contexts[o.NODE],Y=o.data.bufferCanvases[o.MOTIONBLUR_BUFFER_NODE],X=u.contexts[o.DRAG],W=o.data.bufferCanvases[o.MOTIONBLUR_BUFFER_DRAG],H=function(e,t,n){e.setTransform(1,0,0,1,0,0),n||!y?e.clearRect(0,0,o.canvasWidth,o.canvasHeight):P(e,0,0,o.canvasWidth,o.canvasHeight);var r=p;e.drawImage(t,0,0,o.canvasWidth*r,o.canvasHeight*r,0,0,o.canvasWidth,o.canvasHeight)};(c[o.NODE]||L[o.NODE])&&(H(q,Y,L[o.NODE]),c[o.NODE]=!1),(c[o.DRAG]||L[o.DRAG])&&(H(X,W,L[o.DRAG]),c[o.DRAG]=!1)}o.prevViewport=k,o.clearingMotionBlur&&(o.clearingMotionBlur=!1,o.motionBlurCleared=!0,o.motionBlur=!0),h&&(o.motionBlurTimeout=setTimeout((function(){o.motionBlurTimeout=null,o.clearedForMotionBlur[o.NODE]=!1,o.clearedForMotionBlur[o.DRAG]=!1,o.motionBlur=!1,o.clearingMotionBlur=!d,o.mbFrames=0,c[o.NODE]=!0,c[o.DRAG]=!0,o.redraw()}),100)),t||l.emit("render")};for(var bc={drawPolygonPath:function(e,t,n,r,a,i){var o=r/2,s=a/2;e.beginPath&&e.beginPath(),e.moveTo(t+o*i[0],n+s*i[1]);for(var l=1;l0&&i>0){h.clearRect(0,0,a,i),h.globalCompositeOperation="source-over";var p=this.getCachedZSortedEles();if(e.full)h.translate(-n.x1*l,-n.y1*l),h.scale(l,l),this.drawElements(h,p),h.scale(1/l,1/l),h.translate(n.x1*l,n.y1*l);else{var f=t.pan(),g={x:f.x*l,y:f.y*l};l*=t.zoom(),h.translate(g.x,g.y),h.scale(l,l),this.drawElements(h,p),h.scale(1/l,1/l),h.translate(-g.x,-g.y)}e.bg&&(h.globalCompositeOperation="destination-over",h.fillStyle=e.bg,h.rect(0,0,a,i),h.fill())}return d},Pc.png=function(e){return Tc(e,this.bufferCanvasImage(e),"image/png")},Pc.jpg=function(e){return Tc(e,this.bufferCanvasImage(e),"image/jpeg")};var _c={nodeShapeImpl:function(e,t,n,r,a,i,o,s){switch(e){case"ellipse":return this.drawEllipsePath(t,n,r,a,i);case"polygon":return this.drawPolygonPath(t,n,r,a,i,o);case"round-polygon":return this.drawRoundPolygonPath(t,n,r,a,i,o,s);case"roundrectangle":case"round-rectangle":return this.drawRoundRectanglePath(t,n,r,a,i,s);case"cutrectangle":case"cut-rectangle":return this.drawCutRectanglePath(t,n,r,a,i,o,s);case"bottomroundrectangle":case"bottom-round-rectangle":return this.drawBottomRoundRectanglePath(t,n,r,a,i,s);case"barrel":return this.drawBarrelPath(t,n,r,a,i)}}},Mc=Nc,Bc=Nc.prototype;function Nc(e){var t=this,n=t.cy.window().document;t.data={canvases:new Array(Bc.CANVAS_LAYERS),contexts:new Array(Bc.CANVAS_LAYERS),canvasNeedsRedraw:new Array(Bc.CANVAS_LAYERS),bufferCanvases:new Array(Bc.BUFFER_COUNT),bufferContexts:new Array(Bc.CANVAS_LAYERS)};var r="-webkit-tap-highlight-color",a="rgba(0,0,0,0)";t.data.canvasContainer=n.createElement("div");var i=t.data.canvasContainer.style;t.data.canvasContainer.style[r]=a,i.position="relative",i.zIndex="0",i.overflow="hidden";var o=e.cy.container();o.appendChild(t.data.canvasContainer),o.style[r]=a;var s={"-webkit-user-select":"none","-moz-user-select":"-moz-none","user-select":"none","-webkit-tap-highlight-color":"rgba(0,0,0,0)","outline-style":"none"};p&&p.userAgent.match(/msie|trident|edge/i)&&(s["-ms-touch-action"]="none",s["touch-action"]="none");for(var l=0;l{n.d(t,{H:()=>l});var r=n(82933);function l(e,t){var n=e.append("foreignObject").attr("width","100000"),l=n.append("xhtml:div");l.attr("xmlns","http://www.w3.org/1999/xhtml");var o=t.label;switch(typeof o){case"function":l.insert(o);break;case"object":l.insert((function(){return o}));break;default:l.html(o)}r.AV(l,t.labelStyle),l.style("display","inline-block"),l.style("white-space","nowrap");var a=l.node().getBoundingClientRect();return n.attr("width",a.width).attr("height",a.height),n}},82933:(e,t,n)=>{n.d(t,{AV:()=>c,De:()=>o,c$:()=>p,gh:()=>a,nh:()=>d});var r=n(34963),l=n(89610);function o(e,t){return!!e.children(t).length}function a(e){return i(e.v)+":"+i(e.w)+":"+i(e.name)}var s=/:/g;function i(e){return e?String(e).replace(s,"\\:"):""}function c(e,t){t&&e.attr("style",t)}function d(e,t,n){t&&e.attr("class",t).attr("class",n+" "+e.attr("class"))}function p(e,t){var n=t.graph();if(r.A(n)){var o=n.transition;if(l.A(o))return o(e)}return e}},75937:(e,t,n)=>{n.d(t,{A:()=>o});var r=n(72453),l=n(74886);const o=(e,t)=>r.A.lang.round(l.A.parse(e)[t])},21689:(e,t,n)=>{n.d(t,{diagram:()=>a});var r=n(35860),l=n(35900),o=n(86079);n(26312),n(697),n(21176),n(14075),n(74353),n(16750),n(42838);const a={parser:r.p,db:r.f,renderer:l.f,styles:l.a,init:e=>{e.flowchart||(e.flowchart={}),e.flowchart.arrowMarkerAbsolute=e.arrowMarkerAbsolute,(0,o.p)({flowchart:{arrowMarkerAbsolute:e.arrowMarkerAbsolute}}),l.f.setConf(e.flowchart),r.f.clear(),r.f.setGen("gen-2")}}},35900:(e,t,n)=>{n.d(t,{a:()=>f,f:()=>w});var r=n(697),l=n(26312),o=n(86079),a=n(8995),s=n(10646),i=n(75937),c=n(25582);const d={},p=async function(e,t,n,r,l,a){const i=r.select(`[id="${n}"]`),c=Object.keys(e);for(const d of c){const n=e[d];let r="default";n.classes.length>0&&(r=n.classes.join(" ")),r+=" flowchart-label";const c=(0,o.k)(n.styles);let p,b=void 0!==n.text?n.text:n.id;if(o.l.info("vertex",n,n.labelType),"markdown"===n.labelType)o.l.info("vertex",n,n.labelType);else if((0,o.m)((0,o.c)().flowchart.htmlLabels)){const e={label:b};p=(0,s.H)(i,e).node(),p.parentNode.removeChild(p)}else{const e=l.createElementNS("http://www.w3.org/2000/svg","text");e.setAttribute("style",c.labelStyle.replace("color:","fill:"));const t=b.split(o.e.lineBreakRegex);for(const n of t){const t=l.createElementNS("http://www.w3.org/2000/svg","tspan");t.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),t.setAttribute("dy","1em"),t.setAttribute("x","1"),t.textContent=n,e.appendChild(t)}p=e}let w=0,f="";switch(n.type){case"round":w=5,f="rect";break;case"square":case"group":default:f="rect";break;case"diamond":f="question";break;case"hexagon":f="hexagon";break;case"odd":case"odd_right":f="rect_left_inv_arrow";break;case"lean_right":f="lean_right";break;case"lean_left":f="lean_left";break;case"trapezoid":f="trapezoid";break;case"inv_trapezoid":f="inv_trapezoid";break;case"circle":f="circle";break;case"ellipse":f="ellipse";break;case"stadium":f="stadium";break;case"subroutine":f="subroutine";break;case"cylinder":f="cylinder";break;case"doublecircle":f="doublecircle"}const h=await(0,o.r)(b,(0,o.c)());t.setNode(n.id,{labelStyle:c.labelStyle,shape:f,labelText:h,labelType:n.labelType,rx:w,ry:w,class:r,style:c.style,id:n.id,link:n.link,linkTarget:n.linkTarget,tooltip:a.db.getTooltip(n.id)||"",domId:a.db.lookUpDomId(n.id),haveCallback:n.haveCallback,width:"group"===n.type?500:void 0,dir:n.dir,type:n.type,props:n.props,padding:(0,o.c)().flowchart.padding}),o.l.info("setNode",{labelStyle:c.labelStyle,labelType:n.labelType,shape:f,labelText:h,rx:w,ry:w,class:r,style:c.style,id:n.id,domId:a.db.lookUpDomId(n.id),width:"group"===n.type?500:void 0,type:n.type,dir:n.dir,props:n.props,padding:(0,o.c)().flowchart.padding})}},b=async function(e,t,n){o.l.info("abc78 edges = ",e);let r,a,s=0,i={};if(void 0!==e.defaultStyle){const t=(0,o.k)(e.defaultStyle);r=t.style,a=t.labelStyle}for(const c of e){s++;const n="L-"+c.start+"-"+c.end;void 0===i[n]?(i[n]=0,o.l.info("abc78 new entry",n,i[n])):(i[n]++,o.l.info("abc78 new entry",n,i[n]));let p=n+"-"+i[n];o.l.info("abc78 new link id to be used is",n,p,i[n]);const b="LS-"+c.start,w="LE-"+c.end,f={style:"",labelStyle:""};switch(f.minlen=c.length||1,"arrow_open"===c.type?f.arrowhead="none":f.arrowhead="normal",f.arrowTypeStart="arrow_open",f.arrowTypeEnd="arrow_open",c.type){case"double_arrow_cross":f.arrowTypeStart="arrow_cross";case"arrow_cross":f.arrowTypeEnd="arrow_cross";break;case"double_arrow_point":f.arrowTypeStart="arrow_point";case"arrow_point":f.arrowTypeEnd="arrow_point";break;case"double_arrow_circle":f.arrowTypeStart="arrow_circle";case"arrow_circle":f.arrowTypeEnd="arrow_circle"}let h="",u="";switch(c.stroke){case"normal":h="fill:none;",void 0!==r&&(h=r),void 0!==a&&(u=a),f.thickness="normal",f.pattern="solid";break;case"dotted":f.thickness="normal",f.pattern="dotted",f.style="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":f.thickness="thick",f.pattern="solid",f.style="stroke-width: 3.5px;fill:none;";break;case"invisible":f.thickness="invisible",f.pattern="solid",f.style="stroke-width: 0;fill:none;"}if(void 0!==c.style){const e=(0,o.k)(c.style);h=e.style,u=e.labelStyle}f.style=f.style+=h,f.labelStyle=f.labelStyle+=u,void 0!==c.interpolate?f.curve=(0,o.n)(c.interpolate,l.lUB):void 0!==e.defaultInterpolate?f.curve=(0,o.n)(e.defaultInterpolate,l.lUB):f.curve=(0,o.n)(d.curve,l.lUB),void 0===c.text?void 0!==c.style&&(f.arrowheadStyle="fill: #333"):(f.arrowheadStyle="fill: #333",f.labelpos="c"),f.labelType=c.labelType,f.label=await(0,o.r)(c.text.replace(o.e.lineBreakRegex,"\n"),(0,o.c)()),void 0===c.style&&(f.style=f.style||"stroke: #333; stroke-width: 1.5px;fill:none;"),f.labelStyle=f.labelStyle.replace("color:","fill:"),f.id=p,f.classes="flowchart-link "+b+" "+w,t.setEdge(c.start,c.end,f,s)}},w={setConf:function(e){const t=Object.keys(e);for(const n of t)d[n]=e[n]},addVertices:p,addEdges:b,getClasses:function(e,t){return t.db.getClasses()},draw:async function(e,t,n,s){o.l.info("Drawing flowchart");let i=s.db.getDirection();void 0===i&&(i="TD");const{securityLevel:c,flowchart:d}=(0,o.c)(),w=d.nodeSpacing||50,f=d.rankSpacing||50;let h;"sandbox"===c&&(h=(0,l.Ltv)("#i"+t));const u="sandbox"===c?(0,l.Ltv)(h.nodes()[0].contentDocument.body):(0,l.Ltv)("body"),g="sandbox"===c?h.nodes()[0].contentDocument:document,y=new r.T({multigraph:!0,compound:!0}).setGraph({rankdir:i,nodesep:w,ranksep:f,marginx:0,marginy:0}).setDefaultEdgeLabel((function(){return{}}));let k;const x=s.db.getSubGraphs();o.l.info("Subgraphs - ",x);for(let r=x.length-1;r>=0;r--)k=x[r],o.l.info("Subgraph - ",k),s.db.addVertex(k.id,{text:k.title,type:k.labelType},"group",void 0,k.classes,k.dir);const v=s.db.getVertices(),m=s.db.getEdges();o.l.info("Edges",m);let S=0;for(S=x.length-1;S>=0;S--){k=x[S],(0,l.Ubm)("cluster").append("text");for(let e=0;e`.label {\n font-family: ${e.fontFamily};\n color: ${e.nodeTextColor||e.textColor};\n }\n .cluster-label text {\n fill: ${e.titleColor};\n }\n .cluster-label span,p {\n color: ${e.titleColor};\n }\n\n .label text,span,p {\n fill: ${e.nodeTextColor||e.textColor};\n color: ${e.nodeTextColor||e.textColor};\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${e.mainBkg};\n stroke: ${e.nodeBorder};\n stroke-width: 1px;\n }\n .flowchart-label text {\n text-anchor: middle;\n }\n // .flowchart-label .text-outer-tspan {\n // text-anchor: middle;\n // }\n // .flowchart-label .text-inner-tspan {\n // text-anchor: start;\n // }\n\n .node .katex path {\n fill: #000;\n stroke: #000;\n stroke-width: 1px;\n }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ${e.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${e.lineColor};\n stroke-width: 2.0px;\n }\n\n .flowchart-link {\n stroke: ${e.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${e.edgeLabelBackground};\n rect {\n opacity: 0.5;\n background-color: ${e.edgeLabelBackground};\n fill: ${e.edgeLabelBackground};\n }\n text-align: center;\n }\n\n /* For html labels only */\n .labelBkg {\n background-color: ${((e,t)=>{const n=i.A,r=n(e,"r"),l=n(e,"g"),o=n(e,"b");return c.A(r,l,o,t)})(e.edgeLabelBackground,.5)};\n // background-color: \n }\n\n .cluster rect {\n fill: ${e.clusterBkg};\n stroke: ${e.clusterBorder};\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ${e.titleColor};\n }\n\n .cluster span,p {\n color: ${e.titleColor};\n }\n /* .cluster div {\n color: ${e.titleColor};\n } */\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ${e.fontFamily};\n font-size: 12px;\n background: ${e.tertiaryColor};\n border: 1px solid ${e.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .flowchartTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${e.textColor};\n }\n`}}]); \ No newline at end of file diff --git a/assets/js/1689.dfb8682e.js b/assets/js/1689.dfb8682e.js new file mode 100644 index 000000000000..8c1e07a57a4b --- /dev/null +++ b/assets/js/1689.dfb8682e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1689],{75937:(t,e,s)=>{s.d(e,{A:()=>i});var n=s(72453),r=s(74886);const i=(t,e)=>n.A.lang.round(r.A.parse(t)[e])},79972:(t,e,s)=>{s.d(e,{A:()=>i,P:()=>u});var n=s(45567),r=s(20007),i=(0,n.K2)(((t,e)=>{let s;"sandbox"===e&&(s=(0,r.Ltv)("#i"+t));return("sandbox"===e?(0,r.Ltv)(s.nodes()[0].contentDocument.body):(0,r.Ltv)("body")).select(`[id="${t}"]`)}),"getDiagramElement"),u=(0,n.K2)(((t,e,s,r)=>{t.attr("class",s);const{width:i,height:u,x:c,y:l}=a(t,e);(0,n.a$)(t,u,i,r);const h=o(c,l,i,u,e);t.attr("viewBox",h),n.Rm.debug(`viewBox configured: ${h} with padding: ${e}`)}),"setupViewPortForSVG"),a=(0,n.K2)(((t,e)=>{const s=t.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:s.width+2*e,height:s.height+2*e,x:s.x,y:s.y}}),"calculateDimensionsWithPadding"),o=(0,n.K2)(((t,e,s,n,r)=>`${t-r} ${e-r} ${s} ${n}`),"createViewBox")},71689:(t,e,s)=>{s.d(e,{diagram:()=>Dt});var n,r,i=s(79972),u=s(79515),a=s(79740),o=(s(6396),s(5081)),c=(s(34483),s(52294),s(62392),s(86825),s(85039)),l=s(45567),h=s(20007),d=s(75937),p=s(25582),A=0,g=(0,l.D7)(),f=new Map,y=[],k=new Map,b=[],E=new Map,m=new Map,D=0,x=!0,C=[],T=(0,l.K2)((t=>l.Y2.sanitizeText(t,g)),"sanitizeText"),S=(0,l.K2)((function(t){for(const e of f.values())if(e.id===t)return e.domId;return t}),"lookUpDomId"),F=(0,l.K2)((function(t,e,s,n,r,i,a={},c){if(!t||0===t.trim().length)return;let h,d=f.get(t);if(void 0===d&&(d={id:t,labelType:"text",domId:"flowchart-"+t+"-"+A,styles:[],classes:[]},f.set(t,d)),A++,void 0!==e?(g=(0,l.D7)(),h=T(e.text.trim()),d.labelType=e.type,h.startsWith('"')&&h.endsWith('"')&&(h=h.substring(1,h.length-1)),d.text=h):void 0===d.text&&(d.text=t),void 0!==s&&(d.type=s),null!=n&&n.forEach((function(t){d.styles.push(t)})),null!=r&&r.forEach((function(t){d.classes.push(t)})),void 0!==i&&(d.dir=i),void 0===d.props?d.props=a:void 0!==a&&Object.assign(d.props,a),void 0!==c){let e;e=c.includes("\n")?c+"\n":"{\n"+c+"\n}";const s=(0,u.H)(e,{schema:u.r});if(s.shape){if(s.shape!==s.shape.toLowerCase()||s.shape.includes("_"))throw new Error(`No such shape: ${s.shape}. Shape names should be lowercase.`);if(!(0,o.aP)(s.shape))throw new Error(`No such shape: ${s.shape}.`);d.type=s?.shape}s?.label&&(d.text=s?.label),s?.icon&&(d.icon=s?.icon,s.label?.trim()||d.text!==t||(d.text="")),s?.form&&(d.form=s?.form),s?.pos&&(d.pos=s?.pos),s?.img&&(d.img=s?.img,s.label?.trim()||d.text!==t||(d.text="")),s?.constraint&&(d.constraint=s.constraint),s.w&&(d.assetWidth=Number(s.w)),s.h&&(d.assetHeight=Number(s.h))}}),"addVertex"),_=(0,l.K2)((function(t,e,s){const n={start:t,end:e,type:void 0,text:"",labelType:"text"};l.Rm.info("abc78 Got edge...",n);const r=s.text;if(void 0!==r&&(n.text=T(r.text.trim()),n.text.startsWith('"')&&n.text.endsWith('"')&&(n.text=n.text.substring(1,n.text.length-1)),n.labelType=r.type),void 0!==s&&(n.type=s.type,n.stroke=s.stroke,n.length=s.length>10?10:s.length),!(y.length<(g.maxEdges??500)))throw new Error(`Edge limit exceeded. ${y.length} edges found, but the limit is ${g.maxEdges}.\n\nInitialize mermaid with maxEdges set to a higher number to allow more edges.\nYou cannot set this config via configuration inside the diagram as it is a secure config.\nYou have to call mermaid.initialize.`);l.Rm.info("Pushing edge..."),y.push(n)}),"addSingleLink"),B=(0,l.K2)((function(t,e,s){l.Rm.info("addLink",t,e,s);for(const n of t)for(const t of e)_(n,t,s)}),"addLink"),v=(0,l.K2)((function(t,e){t.forEach((function(t){"default"===t?y.defaultInterpolate=e:y[t].interpolate=e}))}),"updateLinkInterpolate"),w=(0,l.K2)((function(t,e){t.forEach((function(t){if("number"==typeof t&&t>=y.length)throw new Error(`The index ${t} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${y.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);"default"===t?y.defaultStyle=e:(y[t].style=e,(y[t]?.style?.length??0)>0&&!y[t]?.style?.some((t=>t?.startsWith("fill")))&&y[t]?.style?.push("fill:none"))}))}),"updateLink"),$=(0,l.K2)((function(t,e){t.split(",").forEach((function(t){let s=k.get(t);void 0===s&&(s={id:t,styles:[],textStyles:[]},k.set(t,s)),null!=e&&e.forEach((function(t){if(/color/.exec(t)){const e=t.replace("fill","bgFill");s.textStyles.push(e)}s.styles.push(t)}))}))}),"addClass"),L=(0,l.K2)((function(t){/.*/.exec(n)&&(n="LR"),/.*v/.exec(n)&&(n="TB"),"TD"===n&&(n="TB")}),"setDirection"),R=(0,l.K2)((function(t,e){for(const s of t.split(",")){const t=f.get(s);t&&t.classes.push(e);const n=E.get(s);n&&n.classes.push(e)}}),"setClass"),I=(0,l.K2)((function(t,e){if(void 0!==e){e=T(e);for(const s of t.split(","))m.set("gen-1"===r?S(s):s,e)}}),"setTooltip"),K=(0,l.K2)((function(t,e,s){const n=S(t);if("loose"!==(0,l.D7)().securityLevel)return;if(void 0===e)return;let r=[];if("string"==typeof s){r=s.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let t=0;t")),t.classed("hover",!0)})).on("mouseout",(function(){e.transition().duration(500).style("opacity",0);(0,h.Ltv)(this).classed("hover",!1)}))}),"setupToolTips");C.push(Y);var j=(0,l.K2)((function(t="gen-1"){f=new Map,k=new Map,y=[],C=[Y],b=[],E=new Map,D=0,m=new Map,x=!0,r=t,g=(0,l.D7)(),(0,l.IU)()}),"clear"),X=(0,l.K2)((t=>{r=t||"gen-2"}),"setGen"),z=(0,l.K2)((function(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"}),"defaultStyle"),H=(0,l.K2)((function(t,e,s){let n=t.text.trim(),i=s.text;function u(t){const e={boolean:{},number:{},string:{}},s=[];let n;return{nodeList:t.filter((function(t){const r=typeof t;return t.stmt&&"dir"===t.stmt?(n=t.value,!1):""!==t.trim()&&(r in e?!e[r].hasOwnProperty(t)&&(e[r][t]=!0):!s.includes(t)&&s.push(t))})),dir:n}}t===s&&/\s/.exec(s.text)&&(n=void 0),(0,l.K2)(u,"uniq");const{nodeList:a,dir:o}=u(e.flat());if("gen-1"===r)for(let r=0;r2e3)return{result:!1,count:0};if(Z[Q]=e,b[e].id===t)return{result:!0,count:0};let n=0,r=1;for(;n=0){const s=J(t,e);if(s.result)return{result:!0,count:r+s.count};r+=s.count}n+=1}return{result:!1,count:r}}),"indexNodes2"),tt=(0,l.K2)((function(t){return Z[t]}),"getDepthFirstPos"),et=(0,l.K2)((function(){Q=-1,b.length>0&&J("none",b.length-1)}),"indexNodes"),st=(0,l.K2)((function(){return b}),"getSubGraphs"),nt=(0,l.K2)((()=>!!x&&(x=!1,!0)),"firstGraph"),rt=(0,l.K2)((t=>{let e=t.trim(),s="arrow_open";switch(e[0]){case"<":s="arrow_point",e=e.slice(1);break;case"x":s="arrow_cross",e=e.slice(1);break;case"o":s="arrow_circle",e=e.slice(1)}let n="normal";return e.includes("=")&&(n="thick"),e.includes(".")&&(n="dotted"),{type:s,stroke:n}}),"destructStartLink"),it=(0,l.K2)(((t,e)=>{const s=e.length;let n=0;for(let r=0;r{const e=t.trim();let s=e.slice(0,-1),n="arrow_open";switch(e.slice(-1)){case"x":n="arrow_cross",e.startsWith("x")&&(n="double_"+n,s=s.slice(1));break;case">":n="arrow_point",e.startsWith("<")&&(n="double_"+n,s=s.slice(1));break;case"o":n="arrow_circle",e.startsWith("o")&&(n="double_"+n,s=s.slice(1))}let r="normal",i=s.length-1;s.startsWith("=")&&(r="thick"),s.startsWith("~")&&(r="invisible");const u=it(".",s);return u&&(r="dotted",i=u),{type:n,stroke:r,length:i}}),"destructEndLink"),at=(0,l.K2)(((t,e)=>{const s=ut(t);let n;if(e){if(n=rt(e),n.stroke!==s.stroke)return{type:"INVALID",stroke:"INVALID"};if("arrow_open"===n.type)n.type=s.type;else{if(n.type!==s.type)return{type:"INVALID",stroke:"INVALID"};n.type="double_"+n.type}return"double_arrow"===n.type&&(n.type="double_arrow_point"),n.length=s.length,n}return s}),"destructLink"),ot=(0,l.K2)(((t,e)=>{for(const s of t)if(s.nodes.includes(e))return!0;return!1}),"exists"),ct=(0,l.K2)(((t,e)=>{const s=[];return t.nodes.forEach(((n,r)=>{ot(e,n)||s.push(t.nodes[r])})),{nodes:s}}),"makeUniq"),lt={firstGraph:nt},ht=(0,l.K2)((t=>{if(t.img)return"imageSquare";if(t.icon)return"circle"===t.form?"iconCircle":"square"===t.form?"iconSquare":"rounded"===t.form?"iconRounded":"icon";switch(t.type){case"square":case void 0:return"squareRect";case"round":return"roundedRect";case"ellipse":return"ellipse";default:return t.type}}),"getTypeFromVertex"),dt=(0,l.K2)(((t,e)=>t.find((t=>t.id===e))),"findNode"),pt=(0,l.K2)((t=>{let e="none",s="arrow_point";switch(t){case"arrow_point":case"arrow_circle":case"arrow_cross":s=t;break;case"double_arrow_point":case"double_arrow_circle":case"double_arrow_cross":e=t.replace("double_",""),s=e}return{arrowTypeStart:e,arrowTypeEnd:s}}),"destructEdgeType"),At=(0,l.K2)(((t,e,s,n,r,i)=>{const u=s.get(t.id),a=n.get(t.id)??!1,o=dt(e,t.id);if(o)o.cssStyles=t.styles,o.cssCompiledStyles=gt(t.classes),o.cssClasses=t.classes.join(" ");else{const s={id:t.id,label:t.text,labelStyle:"",parentId:u,padding:r.flowchart?.padding||8,cssStyles:t.styles,cssCompiledStyles:gt(["default","node",...t.classes]),cssClasses:"default "+t.classes.join(" "),dir:t.dir,domId:t.domId,look:i,link:t.link,linkTarget:t.linkTarget,tooltip:P(t.id),icon:t.icon,pos:t.pos,img:t.img,assetWidth:t.assetWidth,assetHeight:t.assetHeight,constraint:t.constraint};a?e.push({...s,isGroup:!0,shape:"rect"}):e.push({...s,isGroup:!1,shape:ht(t)})}}),"addNodeFromVertex");function gt(t){let e=[];for(const s of t){const t=k.get(s);t?.styles&&(e=[...e,...t.styles??[]].map((t=>t.trim()))),t?.textStyles&&(e=[...e,...t.textStyles??[]].map((t=>t.trim())))}return e}(0,l.K2)(gt,"getCompiledStyles");var ft=(0,l.K2)((()=>{const t=(0,l.D7)(),e=[],s=[],n=st(),r=new Map,i=new Map;for(let a=n.length-1;a>=0;a--){const t=n[a];t.nodes.length>0&&i.set(t.id,!0);for(const e of t.nodes)r.set(e,t.id)}for(let a=n.length-1;a>=0;a--){const s=n[a];e.push({id:s.id,label:s.title,labelStyle:"",parentId:r.get(s.id),padding:8,cssCompiledStyles:gt(s.classes),cssClasses:s.classes.join(" "),shape:"rect",dir:s.dir,isGroup:!0,look:t.look})}U().forEach((s=>{At(s,e,r,i,t,t.look||"classic")}));const u=G();return u.forEach(((e,n)=>{const{arrowTypeStart:r,arrowTypeEnd:i}=pt(e.type),a=[...u.defaultStyle??[]];e.style&&a.push(...e.style);const o={id:(0,c.rY)(e.start,e.end,{counter:n,prefix:"L"}),start:e.start,end:e.end,type:e.type??"normal",label:e.text,labelpos:"c",thickness:e.stroke,minlen:e.length,classes:"invisible"===e?.stroke?"":"edge-thickness-normal edge-pattern-solid flowchart-link",arrowTypeStart:"invisible"===e?.stroke?"none":r,arrowTypeEnd:"invisible"===e?.stroke?"none":i,arrowheadStyle:"fill: #333",labelStyle:a,style:a,pattern:e.stroke,look:t.look};s.push(o)})),{nodes:e,edges:s,other:{},config:t}}),"getData"),yt={defaultConfig:(0,l.K2)((()=>l.ME.flowchart),"defaultConfig"),setAccTitle:l.SV,getAccTitle:l.iN,getAccDescription:l.m7,getData:ft,setAccDescription:l.EI,addVertex:F,lookUpDomId:S,addLink:B,updateLinkInterpolate:v,updateLink:w,addClass:$,setDirection:L,setClass:R,setTooltip:I,getTooltip:P,setClickEvent:O,setLink:N,bindFunctions:M,getDirection:V,getVertices:U,getEdges:G,getClasses:W,clear:j,setGen:X,defaultStyle:z,addSubGraph:H,getDepthFirstPos:tt,indexNodes:et,getSubGraphs:st,destructLink:at,lex:lt,exists:ot,makeUniq:ct,setDiagramTitle:l.ke,getDiagramTitle:l.ab},kt={getClasses:(0,l.K2)((function(t,e){return e.db.getClasses()}),"getClasses"),draw:(0,l.K2)((async function(t,e,s,n){l.Rm.info("REF0:"),l.Rm.info("Drawing state diagram (v2)",e);const{securityLevel:r,flowchart:u,layout:o}=(0,l.D7)();let d;"sandbox"===r&&(d=(0,h.Ltv)("#i"+e));const p="sandbox"===r?d.nodes()[0].contentDocument:document;l.Rm.debug("Before getData: ");const A=n.db.getData();l.Rm.debug("Data: ",A);const g=(0,i.A)(e,r),f=V();A.type=n.type,A.layoutAlgorithm=(0,a.q7)(o),"dagre"===A.layoutAlgorithm&&"elk"===o&&l.Rm.warn("flowchart-elk was moved to an external package in Mermaid v11. Please refer [release notes](https://github.com/mermaid-js/mermaid/releases/tag/v11.0.0) for more details. This diagram will be rendered using `dagre` layout as a fallback."),A.direction=f,A.nodeSpacing=u?.nodeSpacing||50,A.rankSpacing=u?.rankSpacing||50,A.markers=["point","circle","cross"],A.diagramId=e,l.Rm.debug("REF1:",A),await(0,a.XX)(A,g);const y=A.config.flowchart?.diagramPadding??8;c._K.insertTitle(g,"flowchartTitleText",u?.titleTopMargin||0,n.db.getDiagramTitle()),(0,i.P)(g,y,"flowchart",u?.useMaxWidth||!1);for(const i of A.nodes){const t=(0,h.Ltv)(`#${e} [id="${i.id}"]`);if(!t||!i.link)continue;const s=p.createElementNS("http://www.w3.org/2000/svg","a");s.setAttributeNS("http://www.w3.org/2000/svg","class",i.cssClasses),s.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),"sandbox"===r?s.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):i.linkTarget&&s.setAttributeNS("http://www.w3.org/2000/svg","target",i.linkTarget);const n=t.insert((function(){return s}),":first-child"),u=t.select(".label-container");u&&n.append((function(){return u.node()}));const a=t.select(".label");a&&n.append((function(){return a.node()}))}}),"draw")},bt=function(){var t=(0,l.K2)((function(t,e,s,n){for(s=s||{},n=t.length;n--;s[t[n]]=e);return s}),"o"),e=[1,4],s=[1,3],n=[1,5],r=[1,8,9,10,11,27,34,36,38,44,60,83,84,85,86,87,88,101,104,105,108,110,113,114,115,120,121,122,123],i=[2,2],u=[1,13],a=[1,14],o=[1,15],c=[1,16],h=[1,23],d=[1,25],p=[1,26],A=[1,27],g=[1,49],f=[1,48],y=[1,29],k=[1,30],b=[1,31],E=[1,32],m=[1,33],D=[1,44],x=[1,46],C=[1,42],T=[1,47],S=[1,43],F=[1,50],_=[1,45],B=[1,51],v=[1,52],w=[1,34],$=[1,35],L=[1,36],R=[1,37],I=[1,57],K=[1,8,9,10,11,27,32,34,36,38,44,60,83,84,85,86,87,88,101,104,105,108,110,113,114,115,120,121,122,123],N=[1,61],P=[1,60],O=[1,62],M=[8,9,11,75,77],V=[1,77],U=[1,90],G=[1,95],W=[1,94],Y=[1,91],j=[1,87],X=[1,93],z=[1,89],H=[1,96],q=[1,92],Q=[1,97],Z=[1,88],J=[8,9,10,11,40,75,77],tt=[8,9,10,11,40,46,75,77],et=[8,9,10,11,29,40,44,46,48,50,52,54,56,58,60,63,65,67,68,70,75,77,88,101,104,105,108,110,113,114,115],st=[8,9,11,44,60,75,77,88,101,104,105,108,110,113,114,115],nt=[44,60,88,101,104,105,108,110,113,114,115],rt=[1,123],it=[1,122],ut=[1,130],at=[1,144],ot=[1,145],ct=[1,146],lt=[1,147],ht=[1,132],dt=[1,134],pt=[1,138],At=[1,139],gt=[1,140],ft=[1,141],yt=[1,142],kt=[1,143],bt=[1,148],Et=[1,149],mt=[1,128],Dt=[1,129],xt=[1,136],Ct=[1,131],Tt=[1,135],St=[1,133],Ft=[8,9,10,11,27,32,34,36,38,44,60,83,84,85,86,87,88,101,104,105,108,110,113,114,115,120,121,122,123],_t=[1,151],Bt=[1,153],vt=[8,9,11],wt=[8,9,10,11,14,44,60,88,104,105,108,110,113,114,115],$t=[1,173],Lt=[1,169],Rt=[1,170],It=[1,174],Kt=[1,171],Nt=[1,172],Pt=[77,115,118],Ot=[8,9,10,11,12,14,27,29,32,44,60,75,83,84,85,86,87,88,89,104,108,110,113,114,115],Mt=[10,105],Vt=[31,49,51,53,55,57,62,64,66,67,69,71,115,116,117],Ut=[1,242],Gt=[1,240],Wt=[1,244],Yt=[1,238],jt=[1,239],Xt=[1,241],zt=[1,243],Ht=[1,245],qt=[1,263],Qt=[8,9,11,105],Zt=[8,9,10,11,60,83,104,105,108,109,110,111],Jt={trace:(0,l.K2)((function(){}),"trace"),yy:{},symbols_:{error:2,start:3,graphConfig:4,document:5,line:6,statement:7,SEMI:8,NEWLINE:9,SPACE:10,EOF:11,GRAPH:12,NODIR:13,DIR:14,FirstStmtSeparator:15,ending:16,endToken:17,spaceList:18,spaceListNewline:19,vertexStatement:20,separator:21,styleStatement:22,linkStyleStatement:23,classDefStatement:24,classStatement:25,clickStatement:26,subgraph:27,textNoTags:28,SQS:29,text:30,SQE:31,end:32,direction:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,shapeData:39,SHAPE_DATA:40,link:41,node:42,styledVertex:43,AMP:44,vertex:45,STYLE_SEPARATOR:46,idString:47,DOUBLECIRCLESTART:48,DOUBLECIRCLEEND:49,PS:50,PE:51,"(-":52,"-)":53,STADIUMSTART:54,STADIUMEND:55,SUBROUTINESTART:56,SUBROUTINEEND:57,VERTEX_WITH_PROPS_START:58,"NODE_STRING[field]":59,COLON:60,"NODE_STRING[value]":61,PIPE:62,CYLINDERSTART:63,CYLINDEREND:64,DIAMOND_START:65,DIAMOND_STOP:66,TAGEND:67,TRAPSTART:68,TRAPEND:69,INVTRAPSTART:70,INVTRAPEND:71,linkStatement:72,arrowText:73,TESTSTR:74,START_LINK:75,edgeText:76,LINK:77,edgeTextToken:78,STR:79,MD_STR:80,textToken:81,keywords:82,STYLE:83,LINKSTYLE:84,CLASSDEF:85,CLASS:86,CLICK:87,DOWN:88,UP:89,textNoTagsToken:90,stylesOpt:91,"idString[vertex]":92,"idString[class]":93,CALLBACKNAME:94,CALLBACKARGS:95,HREF:96,LINK_TARGET:97,"STR[link]":98,"STR[tooltip]":99,alphaNum:100,DEFAULT:101,numList:102,INTERPOLATE:103,NUM:104,COMMA:105,style:106,styleComponent:107,NODE_STRING:108,UNIT:109,BRKT:110,PCT:111,idStringToken:112,MINUS:113,MULT:114,UNICODE_TEXT:115,TEXT:116,TAGSTART:117,EDGE_TEXT:118,alphaNumToken:119,direction_tb:120,direction_bt:121,direction_rl:122,direction_lr:123,$accept:0,$end:1},terminals_:{2:"error",8:"SEMI",9:"NEWLINE",10:"SPACE",11:"EOF",12:"GRAPH",13:"NODIR",14:"DIR",27:"subgraph",29:"SQS",31:"SQE",32:"end",34:"acc_title",35:"acc_title_value",36:"acc_descr",37:"acc_descr_value",38:"acc_descr_multiline_value",40:"SHAPE_DATA",44:"AMP",46:"STYLE_SEPARATOR",48:"DOUBLECIRCLESTART",49:"DOUBLECIRCLEEND",50:"PS",51:"PE",52:"(-",53:"-)",54:"STADIUMSTART",55:"STADIUMEND",56:"SUBROUTINESTART",57:"SUBROUTINEEND",58:"VERTEX_WITH_PROPS_START",59:"NODE_STRING[field]",60:"COLON",61:"NODE_STRING[value]",62:"PIPE",63:"CYLINDERSTART",64:"CYLINDEREND",65:"DIAMOND_START",66:"DIAMOND_STOP",67:"TAGEND",68:"TRAPSTART",69:"TRAPEND",70:"INVTRAPSTART",71:"INVTRAPEND",74:"TESTSTR",75:"START_LINK",77:"LINK",79:"STR",80:"MD_STR",83:"STYLE",84:"LINKSTYLE",85:"CLASSDEF",86:"CLASS",87:"CLICK",88:"DOWN",89:"UP",92:"idString[vertex]",93:"idString[class]",94:"CALLBACKNAME",95:"CALLBACKARGS",96:"HREF",97:"LINK_TARGET",98:"STR[link]",99:"STR[tooltip]",101:"DEFAULT",103:"INTERPOLATE",104:"NUM",105:"COMMA",108:"NODE_STRING",109:"UNIT",110:"BRKT",111:"PCT",113:"MINUS",114:"MULT",115:"UNICODE_TEXT",116:"TEXT",117:"TAGSTART",118:"EDGE_TEXT",120:"direction_tb",121:"direction_bt",122:"direction_rl",123:"direction_lr"},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,2],[4,3],[16,2],[16,1],[17,1],[17,1],[17,1],[15,1],[15,1],[15,2],[19,2],[19,2],[19,1],[19,1],[18,2],[18,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,9],[7,6],[7,4],[7,1],[7,2],[7,2],[7,1],[21,1],[21,1],[21,1],[39,2],[39,1],[20,4],[20,3],[20,4],[20,2],[20,2],[20,1],[42,1],[42,6],[42,5],[43,1],[43,3],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,8],[45,4],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,4],[45,4],[45,1],[41,2],[41,3],[41,3],[41,1],[41,3],[76,1],[76,2],[76,1],[76,1],[72,1],[73,3],[30,1],[30,2],[30,1],[30,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[28,1],[28,2],[28,1],[28,1],[24,5],[25,5],[26,2],[26,4],[26,3],[26,5],[26,3],[26,5],[26,5],[26,7],[26,2],[26,4],[26,2],[26,4],[26,4],[26,6],[22,5],[23,5],[23,5],[23,9],[23,9],[23,7],[23,7],[102,1],[102,3],[91,1],[91,3],[106,1],[106,2],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[81,1],[81,1],[81,1],[81,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[78,1],[78,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[47,1],[47,2],[100,1],[100,2],[33,1],[33,1],[33,1],[33,1]],performAction:(0,l.K2)((function(t,e,s,n,r,i,u){var a=i.length-1;switch(r){case 2:case 28:case 29:case 30:case 31:case 32:this.$=[];break;case 3:(!Array.isArray(i[a])||i[a].length>0)&&i[a-1].push(i[a]),this.$=i[a-1];break;case 4:case 181:case 44:case 54:case 76:case 179:this.$=i[a];break;case 11:n.setDirection("TB"),this.$="TB";break;case 12:n.setDirection(i[a-1]),this.$=i[a-1];break;case 27:this.$=i[a-1].nodes;break;case 33:this.$=n.addSubGraph(i[a-6],i[a-1],i[a-4]);break;case 34:this.$=n.addSubGraph(i[a-3],i[a-1],i[a-3]);break;case 35:this.$=n.addSubGraph(void 0,i[a-1],void 0);break;case 37:this.$=i[a].trim(),n.setAccTitle(this.$);break;case 38:case 39:this.$=i[a].trim(),n.setAccDescription(this.$);break;case 43:case 131:this.$=i[a-1]+i[a];break;case 45:n.addVertex(i[a-1][0],void 0,void 0,void 0,void 0,void 0,void 0,i[a]),n.addLink(i[a-3].stmt,i[a-1],i[a-2]),this.$={stmt:i[a-1],nodes:i[a-1].concat(i[a-3].nodes)};break;case 46:n.addLink(i[a-2].stmt,i[a],i[a-1]),this.$={stmt:i[a],nodes:i[a].concat(i[a-2].nodes)};break;case 47:n.addLink(i[a-3].stmt,i[a-1],i[a-2]),this.$={stmt:i[a-1],nodes:i[a-1].concat(i[a-3].nodes)};break;case 48:this.$={stmt:i[a-1],nodes:i[a-1]};break;case 49:n.addVertex(i[a-1][0],void 0,void 0,void 0,void 0,void 0,void 0,i[a]),this.$={stmt:i[a-1],nodes:i[a-1],shapeData:i[a]};break;case 50:this.$={stmt:i[a],nodes:i[a]};break;case 51:case 126:case 128:this.$=[i[a]];break;case 52:n.addVertex(i[a-5][0],void 0,void 0,void 0,void 0,void 0,void 0,i[a-4]),this.$=i[a-5].concat(i[a]);break;case 53:this.$=i[a-4].concat(i[a]);break;case 55:this.$=i[a-2],n.setClass(i[a-2],i[a]);break;case 56:this.$=i[a-3],n.addVertex(i[a-3],i[a-1],"square");break;case 57:this.$=i[a-3],n.addVertex(i[a-3],i[a-1],"doublecircle");break;case 58:this.$=i[a-5],n.addVertex(i[a-5],i[a-2],"circle");break;case 59:this.$=i[a-3],n.addVertex(i[a-3],i[a-1],"ellipse");break;case 60:this.$=i[a-3],n.addVertex(i[a-3],i[a-1],"stadium");break;case 61:this.$=i[a-3],n.addVertex(i[a-3],i[a-1],"subroutine");break;case 62:this.$=i[a-7],n.addVertex(i[a-7],i[a-1],"rect",void 0,void 0,void 0,Object.fromEntries([[i[a-5],i[a-3]]]));break;case 63:this.$=i[a-3],n.addVertex(i[a-3],i[a-1],"cylinder");break;case 64:this.$=i[a-3],n.addVertex(i[a-3],i[a-1],"round");break;case 65:this.$=i[a-3],n.addVertex(i[a-3],i[a-1],"diamond");break;case 66:this.$=i[a-5],n.addVertex(i[a-5],i[a-2],"hexagon");break;case 67:this.$=i[a-3],n.addVertex(i[a-3],i[a-1],"odd");break;case 68:this.$=i[a-3],n.addVertex(i[a-3],i[a-1],"trapezoid");break;case 69:this.$=i[a-3],n.addVertex(i[a-3],i[a-1],"inv_trapezoid");break;case 70:this.$=i[a-3],n.addVertex(i[a-3],i[a-1],"lean_right");break;case 71:this.$=i[a-3],n.addVertex(i[a-3],i[a-1],"lean_left");break;case 72:this.$=i[a],n.addVertex(i[a]);break;case 73:i[a-1].text=i[a],this.$=i[a-1];break;case 74:case 75:i[a-2].text=i[a-1],this.$=i[a-2];break;case 77:var o=n.destructLink(i[a],i[a-2]);this.$={type:o.type,stroke:o.stroke,length:o.length,text:i[a-1]};break;case 78:case 84:case 99:case 101:this.$={text:i[a],type:"text"};break;case 79:case 85:case 100:this.$={text:i[a-1].text+""+i[a],type:i[a-1].type};break;case 80:case 86:this.$={text:i[a],type:"string"};break;case 81:case 87:case 102:this.$={text:i[a],type:"markdown"};break;case 82:o=n.destructLink(i[a]);this.$={type:o.type,stroke:o.stroke,length:o.length};break;case 83:this.$=i[a-1];break;case 103:this.$=i[a-4],n.addClass(i[a-2],i[a]);break;case 104:this.$=i[a-4],n.setClass(i[a-2],i[a]);break;case 105:case 113:this.$=i[a-1],n.setClickEvent(i[a-1],i[a]);break;case 106:case 114:this.$=i[a-3],n.setClickEvent(i[a-3],i[a-2]),n.setTooltip(i[a-3],i[a]);break;case 107:this.$=i[a-2],n.setClickEvent(i[a-2],i[a-1],i[a]);break;case 108:this.$=i[a-4],n.setClickEvent(i[a-4],i[a-3],i[a-2]),n.setTooltip(i[a-4],i[a]);break;case 109:this.$=i[a-2],n.setLink(i[a-2],i[a]);break;case 110:this.$=i[a-4],n.setLink(i[a-4],i[a-2]),n.setTooltip(i[a-4],i[a]);break;case 111:this.$=i[a-4],n.setLink(i[a-4],i[a-2],i[a]);break;case 112:this.$=i[a-6],n.setLink(i[a-6],i[a-4],i[a]),n.setTooltip(i[a-6],i[a-2]);break;case 115:this.$=i[a-1],n.setLink(i[a-1],i[a]);break;case 116:this.$=i[a-3],n.setLink(i[a-3],i[a-2]),n.setTooltip(i[a-3],i[a]);break;case 117:this.$=i[a-3],n.setLink(i[a-3],i[a-2],i[a]);break;case 118:this.$=i[a-5],n.setLink(i[a-5],i[a-4],i[a]),n.setTooltip(i[a-5],i[a-2]);break;case 119:this.$=i[a-4],n.addVertex(i[a-2],void 0,void 0,i[a]);break;case 120:this.$=i[a-4],n.updateLink([i[a-2]],i[a]);break;case 121:this.$=i[a-4],n.updateLink(i[a-2],i[a]);break;case 122:this.$=i[a-8],n.updateLinkInterpolate([i[a-6]],i[a-2]),n.updateLink([i[a-6]],i[a]);break;case 123:this.$=i[a-8],n.updateLinkInterpolate(i[a-6],i[a-2]),n.updateLink(i[a-6],i[a]);break;case 124:this.$=i[a-6],n.updateLinkInterpolate([i[a-4]],i[a]);break;case 125:this.$=i[a-6],n.updateLinkInterpolate(i[a-4],i[a]);break;case 127:case 129:i[a-2].push(i[a]),this.$=i[a-2];break;case 180:case 182:this.$=i[a-1]+""+i[a];break;case 183:this.$={stmt:"dir",value:"TB"};break;case 184:this.$={stmt:"dir",value:"BT"};break;case 185:this.$={stmt:"dir",value:"RL"};break;case 186:this.$={stmt:"dir",value:"LR"}}}),"anonymous"),table:[{3:1,4:2,9:e,10:s,12:n},{1:[3]},t(r,i,{5:6}),{4:7,9:e,10:s,12:n},{4:8,9:e,10:s,12:n},{13:[1,9],14:[1,10]},{1:[2,1],6:11,7:12,8:u,9:a,10:o,11:c,20:17,22:18,23:19,24:20,25:21,26:22,27:h,33:24,34:d,36:p,38:A,42:28,43:38,44:g,45:39,47:40,60:f,83:y,84:k,85:b,86:E,87:m,88:D,101:x,104:C,105:T,108:S,110:F,112:41,113:_,114:B,115:v,120:w,121:$,122:L,123:R},t(r,[2,9]),t(r,[2,10]),t(r,[2,11]),{8:[1,54],9:[1,55],10:I,15:53,18:56},t(K,[2,3]),t(K,[2,4]),t(K,[2,5]),t(K,[2,6]),t(K,[2,7]),t(K,[2,8]),{8:N,9:P,11:O,21:58,41:59,72:63,75:[1,64],77:[1,65]},{8:N,9:P,11:O,21:66},{8:N,9:P,11:O,21:67},{8:N,9:P,11:O,21:68},{8:N,9:P,11:O,21:69},{8:N,9:P,11:O,21:70},{8:N,9:P,10:[1,71],11:O,21:72},t(K,[2,36]),{35:[1,73]},{37:[1,74]},t(K,[2,39]),t(M,[2,50],{18:75,39:76,10:I,40:V}),{10:[1,78]},{10:[1,79]},{10:[1,80]},{10:[1,81]},{14:U,44:G,60:W,79:[1,85],88:Y,94:[1,82],96:[1,83],100:84,104:j,105:X,108:z,110:H,113:q,114:Q,115:Z,119:86},t(K,[2,183]),t(K,[2,184]),t(K,[2,185]),t(K,[2,186]),t(J,[2,51]),t(J,[2,54],{46:[1,98]}),t(tt,[2,72],{112:111,29:[1,99],44:g,48:[1,100],50:[1,101],52:[1,102],54:[1,103],56:[1,104],58:[1,105],60:f,63:[1,106],65:[1,107],67:[1,108],68:[1,109],70:[1,110],88:D,101:x,104:C,105:T,108:S,110:F,113:_,114:B,115:v}),t(et,[2,179]),t(et,[2,140]),t(et,[2,141]),t(et,[2,142]),t(et,[2,143]),t(et,[2,144]),t(et,[2,145]),t(et,[2,146]),t(et,[2,147]),t(et,[2,148]),t(et,[2,149]),t(et,[2,150]),t(r,[2,12]),t(r,[2,18]),t(r,[2,19]),{9:[1,112]},t(st,[2,26],{18:113,10:I}),t(K,[2,27]),{42:114,43:38,44:g,45:39,47:40,60:f,88:D,101:x,104:C,105:T,108:S,110:F,112:41,113:_,114:B,115:v},t(K,[2,40]),t(K,[2,41]),t(K,[2,42]),t(nt,[2,76],{73:115,62:[1,117],74:[1,116]}),{76:118,78:119,79:[1,120],80:[1,121],115:rt,118:it},t([44,60,62,74,88,101,104,105,108,110,113,114,115],[2,82]),t(K,[2,28]),t(K,[2,29]),t(K,[2,30]),t(K,[2,31]),t(K,[2,32]),{10:ut,12:at,14:ot,27:ct,28:124,32:lt,44:ht,60:dt,75:pt,79:[1,126],80:[1,127],82:137,83:At,84:gt,85:ft,86:yt,87:kt,88:bt,89:Et,90:125,104:mt,108:Dt,110:xt,113:Ct,114:Tt,115:St},t(Ft,i,{5:150}),t(K,[2,37]),t(K,[2,38]),t(M,[2,48],{44:_t}),t(M,[2,49],{18:152,10:I,40:Bt}),t(J,[2,44]),{44:g,47:154,60:f,88:D,101:x,104:C,105:T,108:S,110:F,112:41,113:_,114:B,115:v},{101:[1,155],102:156,104:[1,157]},{44:g,47:158,60:f,88:D,101:x,104:C,105:T,108:S,110:F,112:41,113:_,114:B,115:v},{44:g,47:159,60:f,88:D,101:x,104:C,105:T,108:S,110:F,112:41,113:_,114:B,115:v},t(vt,[2,105],{10:[1,160],95:[1,161]}),{79:[1,162]},t(vt,[2,113],{119:164,10:[1,163],14:U,44:G,60:W,88:Y,104:j,105:X,108:z,110:H,113:q,114:Q,115:Z}),t(vt,[2,115],{10:[1,165]}),t(wt,[2,181]),t(wt,[2,168]),t(wt,[2,169]),t(wt,[2,170]),t(wt,[2,171]),t(wt,[2,172]),t(wt,[2,173]),t(wt,[2,174]),t(wt,[2,175]),t(wt,[2,176]),t(wt,[2,177]),t(wt,[2,178]),{44:g,47:166,60:f,88:D,101:x,104:C,105:T,108:S,110:F,112:41,113:_,114:B,115:v},{30:167,67:$t,79:Lt,80:Rt,81:168,115:It,116:Kt,117:Nt},{30:175,67:$t,79:Lt,80:Rt,81:168,115:It,116:Kt,117:Nt},{30:177,50:[1,176],67:$t,79:Lt,80:Rt,81:168,115:It,116:Kt,117:Nt},{30:178,67:$t,79:Lt,80:Rt,81:168,115:It,116:Kt,117:Nt},{30:179,67:$t,79:Lt,80:Rt,81:168,115:It,116:Kt,117:Nt},{30:180,67:$t,79:Lt,80:Rt,81:168,115:It,116:Kt,117:Nt},{108:[1,181]},{30:182,67:$t,79:Lt,80:Rt,81:168,115:It,116:Kt,117:Nt},{30:183,65:[1,184],67:$t,79:Lt,80:Rt,81:168,115:It,116:Kt,117:Nt},{30:185,67:$t,79:Lt,80:Rt,81:168,115:It,116:Kt,117:Nt},{30:186,67:$t,79:Lt,80:Rt,81:168,115:It,116:Kt,117:Nt},{30:187,67:$t,79:Lt,80:Rt,81:168,115:It,116:Kt,117:Nt},t(et,[2,180]),t(r,[2,20]),t(st,[2,25]),t(M,[2,46],{39:188,18:189,10:I,40:V}),t(nt,[2,73],{10:[1,190]}),{10:[1,191]},{30:192,67:$t,79:Lt,80:Rt,81:168,115:It,116:Kt,117:Nt},{77:[1,193],78:194,115:rt,118:it},t(Pt,[2,78]),t(Pt,[2,80]),t(Pt,[2,81]),t(Pt,[2,166]),t(Pt,[2,167]),{8:N,9:P,10:ut,11:O,12:at,14:ot,21:196,27:ct,29:[1,195],32:lt,44:ht,60:dt,75:pt,82:137,83:At,84:gt,85:ft,86:yt,87:kt,88:bt,89:Et,90:197,104:mt,108:Dt,110:xt,113:Ct,114:Tt,115:St},t(Ot,[2,99]),t(Ot,[2,101]),t(Ot,[2,102]),t(Ot,[2,155]),t(Ot,[2,156]),t(Ot,[2,157]),t(Ot,[2,158]),t(Ot,[2,159]),t(Ot,[2,160]),t(Ot,[2,161]),t(Ot,[2,162]),t(Ot,[2,163]),t(Ot,[2,164]),t(Ot,[2,165]),t(Ot,[2,88]),t(Ot,[2,89]),t(Ot,[2,90]),t(Ot,[2,91]),t(Ot,[2,92]),t(Ot,[2,93]),t(Ot,[2,94]),t(Ot,[2,95]),t(Ot,[2,96]),t(Ot,[2,97]),t(Ot,[2,98]),{6:11,7:12,8:u,9:a,10:o,11:c,20:17,22:18,23:19,24:20,25:21,26:22,27:h,32:[1,198],33:24,34:d,36:p,38:A,42:28,43:38,44:g,45:39,47:40,60:f,83:y,84:k,85:b,86:E,87:m,88:D,101:x,104:C,105:T,108:S,110:F,112:41,113:_,114:B,115:v,120:w,121:$,122:L,123:R},{10:I,18:199},{44:[1,200]},t(J,[2,43]),{10:[1,201],44:g,60:f,88:D,101:x,104:C,105:T,108:S,110:F,112:111,113:_,114:B,115:v},{10:[1,202]},{10:[1,203],105:[1,204]},t(Mt,[2,126]),{10:[1,205],44:g,60:f,88:D,101:x,104:C,105:T,108:S,110:F,112:111,113:_,114:B,115:v},{10:[1,206],44:g,60:f,88:D,101:x,104:C,105:T,108:S,110:F,112:111,113:_,114:B,115:v},{79:[1,207]},t(vt,[2,107],{10:[1,208]}),t(vt,[2,109],{10:[1,209]}),{79:[1,210]},t(wt,[2,182]),{79:[1,211],97:[1,212]},t(J,[2,55],{112:111,44:g,60:f,88:D,101:x,104:C,105:T,108:S,110:F,113:_,114:B,115:v}),{31:[1,213],67:$t,81:214,115:It,116:Kt,117:Nt},t(Vt,[2,84]),t(Vt,[2,86]),t(Vt,[2,87]),t(Vt,[2,151]),t(Vt,[2,152]),t(Vt,[2,153]),t(Vt,[2,154]),{49:[1,215],67:$t,81:214,115:It,116:Kt,117:Nt},{30:216,67:$t,79:Lt,80:Rt,81:168,115:It,116:Kt,117:Nt},{51:[1,217],67:$t,81:214,115:It,116:Kt,117:Nt},{53:[1,218],67:$t,81:214,115:It,116:Kt,117:Nt},{55:[1,219],67:$t,81:214,115:It,116:Kt,117:Nt},{57:[1,220],67:$t,81:214,115:It,116:Kt,117:Nt},{60:[1,221]},{64:[1,222],67:$t,81:214,115:It,116:Kt,117:Nt},{66:[1,223],67:$t,81:214,115:It,116:Kt,117:Nt},{30:224,67:$t,79:Lt,80:Rt,81:168,115:It,116:Kt,117:Nt},{31:[1,225],67:$t,81:214,115:It,116:Kt,117:Nt},{67:$t,69:[1,226],71:[1,227],81:214,115:It,116:Kt,117:Nt},{67:$t,69:[1,229],71:[1,228],81:214,115:It,116:Kt,117:Nt},t(M,[2,45],{18:152,10:I,40:Bt}),t(M,[2,47],{44:_t}),t(nt,[2,75]),t(nt,[2,74]),{62:[1,230],67:$t,81:214,115:It,116:Kt,117:Nt},t(nt,[2,77]),t(Pt,[2,79]),{30:231,67:$t,79:Lt,80:Rt,81:168,115:It,116:Kt,117:Nt},t(Ft,i,{5:232}),t(Ot,[2,100]),t(K,[2,35]),{43:233,44:g,45:39,47:40,60:f,88:D,101:x,104:C,105:T,108:S,110:F,112:41,113:_,114:B,115:v},{10:I,18:234},{10:Ut,60:Gt,83:Wt,91:235,104:Yt,106:236,107:237,108:jt,109:Xt,110:zt,111:Ht},{10:Ut,60:Gt,83:Wt,91:246,103:[1,247],104:Yt,106:236,107:237,108:jt,109:Xt,110:zt,111:Ht},{10:Ut,60:Gt,83:Wt,91:248,103:[1,249],104:Yt,106:236,107:237,108:jt,109:Xt,110:zt,111:Ht},{104:[1,250]},{10:Ut,60:Gt,83:Wt,91:251,104:Yt,106:236,107:237,108:jt,109:Xt,110:zt,111:Ht},{44:g,47:252,60:f,88:D,101:x,104:C,105:T,108:S,110:F,112:41,113:_,114:B,115:v},t(vt,[2,106]),{79:[1,253]},{79:[1,254],97:[1,255]},t(vt,[2,114]),t(vt,[2,116],{10:[1,256]}),t(vt,[2,117]),t(tt,[2,56]),t(Vt,[2,85]),t(tt,[2,57]),{51:[1,257],67:$t,81:214,115:It,116:Kt,117:Nt},t(tt,[2,64]),t(tt,[2,59]),t(tt,[2,60]),t(tt,[2,61]),{108:[1,258]},t(tt,[2,63]),t(tt,[2,65]),{66:[1,259],67:$t,81:214,115:It,116:Kt,117:Nt},t(tt,[2,67]),t(tt,[2,68]),t(tt,[2,70]),t(tt,[2,69]),t(tt,[2,71]),t([10,44,60,88,101,104,105,108,110,113,114,115],[2,83]),{31:[1,260],67:$t,81:214,115:It,116:Kt,117:Nt},{6:11,7:12,8:u,9:a,10:o,11:c,20:17,22:18,23:19,24:20,25:21,26:22,27:h,32:[1,261],33:24,34:d,36:p,38:A,42:28,43:38,44:g,45:39,47:40,60:f,83:y,84:k,85:b,86:E,87:m,88:D,101:x,104:C,105:T,108:S,110:F,112:41,113:_,114:B,115:v,120:w,121:$,122:L,123:R},t(J,[2,53]),{43:262,44:g,45:39,47:40,60:f,88:D,101:x,104:C,105:T,108:S,110:F,112:41,113:_,114:B,115:v},t(vt,[2,119],{105:qt}),t(Qt,[2,128],{107:264,10:Ut,60:Gt,83:Wt,104:Yt,108:jt,109:Xt,110:zt,111:Ht}),t(Zt,[2,130]),t(Zt,[2,132]),t(Zt,[2,133]),t(Zt,[2,134]),t(Zt,[2,135]),t(Zt,[2,136]),t(Zt,[2,137]),t(Zt,[2,138]),t(Zt,[2,139]),t(vt,[2,120],{105:qt}),{10:[1,265]},t(vt,[2,121],{105:qt}),{10:[1,266]},t(Mt,[2,127]),t(vt,[2,103],{105:qt}),t(vt,[2,104],{112:111,44:g,60:f,88:D,101:x,104:C,105:T,108:S,110:F,113:_,114:B,115:v}),t(vt,[2,108]),t(vt,[2,110],{10:[1,267]}),t(vt,[2,111]),{97:[1,268]},{51:[1,269]},{62:[1,270]},{66:[1,271]},{8:N,9:P,11:O,21:272},t(K,[2,34]),t(J,[2,52]),{10:Ut,60:Gt,83:Wt,104:Yt,106:273,107:237,108:jt,109:Xt,110:zt,111:Ht},t(Zt,[2,131]),{14:U,44:G,60:W,88:Y,100:274,104:j,105:X,108:z,110:H,113:q,114:Q,115:Z,119:86},{14:U,44:G,60:W,88:Y,100:275,104:j,105:X,108:z,110:H,113:q,114:Q,115:Z,119:86},{97:[1,276]},t(vt,[2,118]),t(tt,[2,58]),{30:277,67:$t,79:Lt,80:Rt,81:168,115:It,116:Kt,117:Nt},t(tt,[2,66]),t(Ft,i,{5:278}),t(Qt,[2,129],{107:264,10:Ut,60:Gt,83:Wt,104:Yt,108:jt,109:Xt,110:zt,111:Ht}),t(vt,[2,124],{119:164,10:[1,279],14:U,44:G,60:W,88:Y,104:j,105:X,108:z,110:H,113:q,114:Q,115:Z}),t(vt,[2,125],{119:164,10:[1,280],14:U,44:G,60:W,88:Y,104:j,105:X,108:z,110:H,113:q,114:Q,115:Z}),t(vt,[2,112]),{31:[1,281],67:$t,81:214,115:It,116:Kt,117:Nt},{6:11,7:12,8:u,9:a,10:o,11:c,20:17,22:18,23:19,24:20,25:21,26:22,27:h,32:[1,282],33:24,34:d,36:p,38:A,42:28,43:38,44:g,45:39,47:40,60:f,83:y,84:k,85:b,86:E,87:m,88:D,101:x,104:C,105:T,108:S,110:F,112:41,113:_,114:B,115:v,120:w,121:$,122:L,123:R},{10:Ut,60:Gt,83:Wt,91:283,104:Yt,106:236,107:237,108:jt,109:Xt,110:zt,111:Ht},{10:Ut,60:Gt,83:Wt,91:284,104:Yt,106:236,107:237,108:jt,109:Xt,110:zt,111:Ht},t(tt,[2,62]),t(K,[2,33]),t(vt,[2,122],{105:qt}),t(vt,[2,123],{105:qt})],defaultActions:{},parseError:(0,l.K2)((function(t,e){if(!e.recoverable){var s=new Error(t);throw s.hash=e,s}this.trace(t)}),"parseError"),parse:(0,l.K2)((function(t){var e=this,s=[0],n=[],r=[null],i=[],u=this.table,a="",o=0,c=0,h=0,d=i.slice.call(arguments,1),p=Object.create(this.lexer),A={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(A.yy[g]=this.yy[g]);p.setInput(t,A.yy),A.yy.lexer=p,A.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var f=p.yylloc;i.push(f);var y=p.options&&p.options.ranges;function k(){var t;return"number"!=typeof(t=n.pop()||p.lex()||1)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof A.yy.parseError?this.parseError=A.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,l.K2)((function(t){s.length=s.length-2*t,r.length=r.length-t,i.length=i.length-t}),"popStack"),(0,l.K2)(k,"lex");for(var b,E,m,D,x,C,T,S,F,_={};;){if(m=s[s.length-1],this.defaultActions[m]?D=this.defaultActions[m]:(null==b&&(b=k()),D=u[m]&&u[m][b]),void 0===D||!D.length||!D[0]){var B="";for(C in F=[],u[m])this.terminals_[C]&&C>2&&F.push("'"+this.terminals_[C]+"'");B=p.showPosition?"Parse error on line "+(o+1)+":\n"+p.showPosition()+"\nExpecting "+F.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(o+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(B,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:f,expected:F})}if(D[0]instanceof Array&&D.length>1)throw new Error("Parse Error: multiple actions possible at state: "+m+", token: "+b);switch(D[0]){case 1:s.push(b),r.push(p.yytext),i.push(p.yylloc),s.push(D[1]),b=null,E?(b=E,E=null):(c=p.yyleng,a=p.yytext,o=p.yylineno,f=p.yylloc,h>0&&h--);break;case 2:if(T=this.productions_[D[1]][1],_.$=r[r.length-T],_._$={first_line:i[i.length-(T||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(T||1)].first_column,last_column:i[i.length-1].last_column},y&&(_._$.range=[i[i.length-(T||1)].range[0],i[i.length-1].range[1]]),void 0!==(x=this.performAction.apply(_,[a,c,o,A.yy,D[1],r,i].concat(d))))return x;T&&(s=s.slice(0,-1*T*2),r=r.slice(0,-1*T),i=i.slice(0,-1*T)),s.push(this.productions_[D[1]][0]),r.push(_.$),i.push(_._$),S=u[s[s.length-2]][s[s.length-1]],s.push(S);break;case 3:return!0}}return!0}),"parse")},te=function(){return{EOF:1,parseError:(0,l.K2)((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:(0,l.K2)((function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this}),"setInput"),input:(0,l.K2)((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t}),"input"),unput:(0,l.K2)((function(t){var e=t.length,s=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),s.length-1&&(this.yylineno-=s.length-1);var r=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:s?(s.length===n.length?this.yylloc.first_column:0)+n[n.length-s.length].length-s[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"unput"),more:(0,l.K2)((function(){return this._more=!0,this}),"more"),reject:(0,l.K2)((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:(0,l.K2)((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:(0,l.K2)((function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:(0,l.K2)((function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:(0,l.K2)((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:(0,l.K2)((function(t,e){var s,n,r;if(this.options.backtrack_lexer&&(r={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(r.yylloc.range=this.yylloc.range.slice(0))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],s=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack){for(var i in r)this[i]=r[i];return!1}return!1}),"test_match"),next:(0,l.K2)((function(){if(this.done)return this.EOF;var t,e,s,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),i=0;ie[0].length)){if(e=s,n=i,this.options.backtrack_lexer){if(!1!==(t=this.test_match(s,r[i])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,r[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:(0,l.K2)((function(){var t=this.next();return t||this.lex()}),"lex"),begin:(0,l.K2)((function(t){this.conditionStack.push(t)}),"begin"),popState:(0,l.K2)((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:(0,l.K2)((function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules}),"_currentRules"),topState:(0,l.K2)((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:(0,l.K2)((function(t){this.begin(t)}),"pushState"),stateStackSize:(0,l.K2)((function(){return this.conditionStack.length}),"stateStackSize"),options:{},performAction:(0,l.K2)((function(t,e,s,n){switch(s){case 0:return this.begin("acc_title"),34;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),36;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:case 12:case 14:case 17:case 20:case 23:case 33:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return this.pushState("shapeData"),e.yytext="",40;case 8:return this.pushState("shapeDataStr"),40;case 9:return this.popState(),40;case 10:const s=/\n\s*/g;return e.yytext=e.yytext.replace(s,"
"),40;case 11:return 40;case 13:this.begin("callbackname");break;case 15:this.popState(),this.begin("callbackargs");break;case 16:return 94;case 18:return 95;case 19:return"MD_STR";case 21:this.begin("md_string");break;case 22:return"STR";case 24:this.pushState("string");break;case 25:return 83;case 26:return 101;case 27:return 84;case 28:return 103;case 29:return 85;case 30:return 86;case 31:return 96;case 32:this.begin("click");break;case 34:return 87;case 35:case 36:case 37:return t.lex.firstGraph()&&this.begin("dir"),12;case 38:return 27;case 39:return 32;case 40:case 41:case 42:case 43:return 97;case 44:return this.popState(),13;case 45:case 46:case 47:case 48:case 49:case 50:case 51:case 52:case 53:case 54:return this.popState(),14;case 55:return 120;case 56:return 121;case 57:return 122;case 58:return 123;case 59:return 104;case 60:case 101:return 110;case 61:return 46;case 62:return 60;case 63:case 102:return 44;case 64:return 8;case 65:return 105;case 66:case 100:return 114;case 67:case 70:case 73:return this.popState(),77;case 68:return this.pushState("edgeText"),75;case 69:case 72:case 75:return 118;case 71:return this.pushState("thickEdgeText"),75;case 74:return this.pushState("dottedEdgeText"),75;case 76:return 77;case 77:return this.popState(),53;case 78:case 114:return"TEXT";case 79:return this.pushState("ellipseText"),52;case 80:return this.popState(),55;case 81:return this.pushState("text"),54;case 82:return this.popState(),57;case 83:return this.pushState("text"),56;case 84:return 58;case 85:return this.pushState("text"),67;case 86:return this.popState(),64;case 87:return this.pushState("text"),63;case 88:return this.popState(),49;case 89:return this.pushState("text"),48;case 90:return this.popState(),69;case 91:return this.popState(),71;case 92:return 116;case 93:return this.pushState("trapText"),68;case 94:return this.pushState("trapText"),70;case 95:return 117;case 96:return 67;case 97:return 89;case 98:return"SEP";case 99:return 88;case 103:return 108;case 104:return 113;case 105:return 115;case 106:return this.popState(),62;case 107:return this.pushState("text"),62;case 108:return this.popState(),51;case 109:return this.pushState("text"),50;case 110:return this.popState(),31;case 111:return this.pushState("text"),29;case 112:return this.popState(),66;case 113:return this.pushState("text"),65;case 115:return"QUOTE";case 116:return 9;case 117:return 10;case 118:return 11}}),"anonymous"),rules:[/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:@\{)/,/^(?:["])/,/^(?:["])/,/^(?:[^\"]+)/,/^(?:[^}^"]+)/,/^(?:\})/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["][`])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:["])/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:href[\s])/,/^(?:click[\s]+)/,/^(?:[\s\n])/,/^(?:[^\s\n]*)/,/^(?:flowchart-elk\b)/,/^(?:graph\b)/,/^(?:flowchart\b)/,/^(?:subgraph\b)/,/^(?:end\b\s*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:(\r?\n)*\s*\n)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:[^-]|-(?!-)+)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:[^=]|=(?!))/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:[^\.]|\.(?!))/,/^(?:\s*~~[\~]+\s*)/,/^(?:[-/\)][\)])/,/^(?:[^\(\)\[\]\{\}]|!\)+)/,/^(?:\(-)/,/^(?:\]\))/,/^(?:\(\[)/,/^(?:\]\])/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:>)/,/^(?:\)\])/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\(\(\()/,/^(?:[\\(?=\])][\]])/,/^(?:\/(?=\])\])/,/^(?:\/(?!\])|\\(?!\])|[^\\\[\]\(\)\{\}\/]+)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:\*)/,/^(?:#)/,/^(?:&)/,/^(?:([A-Za-z0-9!"\#$%&'*+\.`?\\_\/]|-(?=[^\>\-\.])|(?!))+)/,/^(?:-)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\|)/,/^(?:\))/,/^(?:\()/,/^(?:\])/,/^(?:\[)/,/^(?:(\}))/,/^(?:\{)/,/^(?:[^\[\]\(\)\{\}\|\"]+)/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:\s)/,/^(?:$)/],conditions:{shapeDataEndBracket:{rules:[21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},shapeDataStr:{rules:[9,10,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},shapeData:{rules:[8,11,12,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},callbackargs:{rules:[17,18,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},callbackname:{rules:[14,15,16,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},href:{rules:[21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},click:{rules:[21,24,33,34,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},dottedEdgeText:{rules:[21,24,73,75,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},thickEdgeText:{rules:[21,24,70,72,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},edgeText:{rules:[21,24,67,69,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},trapText:{rules:[21,24,76,79,81,83,87,89,90,91,92,93,94,107,109,111,113],inclusive:!1},ellipseText:{rules:[21,24,76,77,78,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},text:{rules:[21,24,76,79,80,81,82,83,86,87,88,89,93,94,106,107,108,109,110,111,112,113,114],inclusive:!1},vertex:{rules:[21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},dir:{rules:[21,24,44,45,46,47,48,49,50,51,52,53,54,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},acc_descr_multiline:{rules:[5,6,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},acc_descr:{rules:[3,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},acc_title:{rules:[1,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},md_string:{rules:[19,20,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},string:{rules:[21,22,23,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},INITIAL:{rules:[0,2,4,7,13,21,24,25,26,27,28,29,30,31,32,35,36,37,38,39,40,41,42,43,55,56,57,58,59,60,61,62,63,64,65,66,67,68,70,71,73,74,76,79,81,83,84,85,87,89,93,94,95,96,97,98,99,100,101,102,103,104,105,107,109,111,113,115,116,117,118],inclusive:!0}}}}();function ee(){this.yy={}}return Jt.lexer=te,(0,l.K2)(ee,"Parser"),ee.prototype=Jt,Jt.Parser=ee,new ee}();bt.parser=bt;var Et=bt,mt=(0,l.K2)(((t,e)=>{const s=d.A,n=s(t,"r"),r=s(t,"g"),i=s(t,"b");return p.A(n,r,i,e)}),"fade"),Dt={parser:Et,db:yt,renderer:kt,styles:(0,l.K2)((t=>`.label {\n font-family: ${t.fontFamily};\n color: ${t.nodeTextColor||t.textColor};\n }\n .cluster-label text {\n fill: ${t.titleColor};\n }\n .cluster-label span {\n color: ${t.titleColor};\n }\n .cluster-label span p {\n background-color: transparent;\n }\n\n .label text,span {\n fill: ${t.nodeTextColor||t.textColor};\n color: ${t.nodeTextColor||t.textColor};\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n stroke-width: 1px;\n }\n .rough-node .label text , .node .label text, .image-shape .label, .icon-shape .label {\n text-anchor: middle;\n }\n // .flowchart-label .text-outer-tspan {\n // text-anchor: middle;\n // }\n // .flowchart-label .text-inner-tspan {\n // text-anchor: start;\n // }\n\n .node .katex path {\n fill: #000;\n stroke: #000;\n stroke-width: 1px;\n }\n\n .rough-node .label,.node .label, .image-shape .label, .icon-shape .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n\n .root .anchor path {\n fill: ${t.lineColor} !important;\n stroke-width: 0;\n stroke: ${t.lineColor};\n }\n\n .arrowheadPath {\n fill: ${t.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${t.lineColor};\n stroke-width: 2.0px;\n }\n\n .flowchart-link {\n stroke: ${t.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${t.edgeLabelBackground};\n p {\n background-color: ${t.edgeLabelBackground};\n }\n rect {\n opacity: 0.5;\n background-color: ${t.edgeLabelBackground};\n fill: ${t.edgeLabelBackground};\n }\n text-align: center;\n }\n\n /* For html labels only */\n .labelBkg {\n background-color: ${mt(t.edgeLabelBackground,.5)};\n // background-color:\n }\n\n .cluster rect {\n fill: ${t.clusterBkg};\n stroke: ${t.clusterBorder};\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ${t.titleColor};\n }\n\n .cluster span {\n color: ${t.titleColor};\n }\n /* .cluster div {\n color: ${t.titleColor};\n } */\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ${t.fontFamily};\n font-size: 12px;\n background: ${t.tertiaryColor};\n border: 1px solid ${t.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .flowchartTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n }\n\n rect.text {\n fill: none;\n stroke-width: 0;\n }\n\n .icon-shape, .image-shape {\n background-color: ${t.edgeLabelBackground};\n p {\n background-color: ${t.edgeLabelBackground};\n padding: 2px;\n }\n rect {\n opacity: 0.5;\n background-color: ${t.edgeLabelBackground};\n fill: ${t.edgeLabelBackground};\n }\n text-align: center;\n }\n`),"getStyles"),init:(0,l.K2)((t=>{t.flowchart||(t.flowchart={}),t.layout&&(0,l.XV)({layout:t.layout}),t.flowchart.arrowMarkerAbsolute=t.arrowMarkerAbsolute,(0,l.XV)({flowchart:{arrowMarkerAbsolute:t.arrowMarkerAbsolute}}),yt.clear(),yt.setGen("gen-2")}),"init")}}}]); \ No newline at end of file diff --git a/assets/js/171.813e541a.js b/assets/js/171.813e541a.js deleted file mode 100644 index 822f5c10859e..000000000000 --- a/assets/js/171.813e541a.js +++ /dev/null @@ -1,10323 +0,0 @@ -"use strict"; -exports.id = 171; -exports.ids = [171]; -exports.modules = { - -/***/ 21176: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - Zp: () => (/* reexport */ layout) -}); - -// UNUSED EXPORTS: acyclic, normalize, rank - -// EXTERNAL MODULE: ./node_modules/lodash-es/forEach.js -var forEach = __webpack_require__(8058); -// EXTERNAL MODULE: ./node_modules/lodash-es/uniqueId.js -var uniqueId = __webpack_require__(5664); -// EXTERNAL MODULE: ./node_modules/lodash-es/has.js + 1 modules -var has = __webpack_require__(48585); -// EXTERNAL MODULE: ./node_modules/lodash-es/constant.js -var constant = __webpack_require__(39142); -// EXTERNAL MODULE: ./node_modules/lodash-es/flatten.js -var flatten = __webpack_require__(34098); -// EXTERNAL MODULE: ./node_modules/lodash-es/map.js -var map = __webpack_require__(74722); -// EXTERNAL MODULE: ./node_modules/lodash-es/range.js + 2 modules -var range = __webpack_require__(91395); -// EXTERNAL MODULE: ./node_modules/dagre-d3-es/src/graphlib/index.js -var graphlib = __webpack_require__(697); -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/data/list.js -/* - * Simple doubly linked list implementation derived from Cormen, et al., - * "Introduction to Algorithms". - */ - - - -class List { - constructor() { - var sentinel = {}; - sentinel._next = sentinel._prev = sentinel; - this._sentinel = sentinel; - } - dequeue() { - var sentinel = this._sentinel; - var entry = sentinel._prev; - if (entry !== sentinel) { - unlink(entry); - return entry; - } - } - enqueue(entry) { - var sentinel = this._sentinel; - if (entry._prev && entry._next) { - unlink(entry); - } - entry._next = sentinel._next; - sentinel._next._prev = entry; - sentinel._next = entry; - entry._prev = sentinel; - } - toString() { - var strs = []; - var sentinel = this._sentinel; - var curr = sentinel._prev; - while (curr !== sentinel) { - strs.push(JSON.stringify(curr, filterOutLinks)); - curr = curr._prev; - } - return '[' + strs.join(', ') + ']'; - } -} - -function unlink(entry) { - entry._prev._next = entry._next; - entry._next._prev = entry._prev; - delete entry._next; - delete entry._prev; -} - -function filterOutLinks(k, v) { - if (k !== '_next' && k !== '_prev') { - return v; - } -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/greedy-fas.js - - - - -/* - * A greedy heuristic for finding a feedback arc set for a graph. A feedback - * arc set is a set of edges that can be removed to make a graph acyclic. - * The algorithm comes from: P. Eades, X. Lin, and W. F. Smyth, "A fast and - * effective heuristic for the feedback arc set problem." This implementation - * adjusts that from the paper to allow for weighted edges. - */ - - -var DEFAULT_WEIGHT_FN = constant/* default */.A(1); - -function greedyFAS(g, weightFn) { - if (g.nodeCount() <= 1) { - return []; - } - var state = buildState(g, weightFn || DEFAULT_WEIGHT_FN); - var results = doGreedyFAS(state.graph, state.buckets, state.zeroIdx); - - // Expand multi-edges - return flatten/* default */.A( - map/* default */.A(results, function (e) { - return g.outEdges(e.v, e.w); - }) - ); -} - -function doGreedyFAS(g, buckets, zeroIdx) { - var results = []; - var sources = buckets[buckets.length - 1]; - var sinks = buckets[0]; - - var entry; - while (g.nodeCount()) { - while ((entry = sinks.dequeue())) { - removeNode(g, buckets, zeroIdx, entry); - } - while ((entry = sources.dequeue())) { - removeNode(g, buckets, zeroIdx, entry); - } - if (g.nodeCount()) { - for (var i = buckets.length - 2; i > 0; --i) { - entry = buckets[i].dequeue(); - if (entry) { - results = results.concat(removeNode(g, buckets, zeroIdx, entry, true)); - break; - } - } - } - } - - return results; -} - -function removeNode(g, buckets, zeroIdx, entry, collectPredecessors) { - var results = collectPredecessors ? [] : undefined; - - forEach/* default */.A(g.inEdges(entry.v), function (edge) { - var weight = g.edge(edge); - var uEntry = g.node(edge.v); - - if (collectPredecessors) { - results.push({ v: edge.v, w: edge.w }); - } - - uEntry.out -= weight; - assignBucket(buckets, zeroIdx, uEntry); - }); - - forEach/* default */.A(g.outEdges(entry.v), function (edge) { - var weight = g.edge(edge); - var w = edge.w; - var wEntry = g.node(w); - wEntry['in'] -= weight; - assignBucket(buckets, zeroIdx, wEntry); - }); - - g.removeNode(entry.v); - - return results; -} - -function buildState(g, weightFn) { - var fasGraph = new graphlib/* Graph */.T(); - var maxIn = 0; - var maxOut = 0; - - forEach/* default */.A(g.nodes(), function (v) { - fasGraph.setNode(v, { v: v, in: 0, out: 0 }); - }); - - // Aggregate weights on nodes, but also sum the weights across multi-edges - // into a single edge for the fasGraph. - forEach/* default */.A(g.edges(), function (e) { - var prevWeight = fasGraph.edge(e.v, e.w) || 0; - var weight = weightFn(e); - var edgeWeight = prevWeight + weight; - fasGraph.setEdge(e.v, e.w, edgeWeight); - maxOut = Math.max(maxOut, (fasGraph.node(e.v).out += weight)); - maxIn = Math.max(maxIn, (fasGraph.node(e.w)['in'] += weight)); - }); - - var buckets = range/* default */.A(maxOut + maxIn + 3).map(function () { - return new List(); - }); - var zeroIdx = maxIn + 1; - - forEach/* default */.A(fasGraph.nodes(), function (v) { - assignBucket(buckets, zeroIdx, fasGraph.node(v)); - }); - - return { graph: fasGraph, buckets: buckets, zeroIdx: zeroIdx }; -} - -function assignBucket(buckets, zeroIdx, entry) { - if (!entry.out) { - buckets[0].enqueue(entry); - } else if (!entry['in']) { - buckets[buckets.length - 1].enqueue(entry); - } else { - buckets[entry.out - entry['in'] + zeroIdx].enqueue(entry); - } -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/acyclic.js - - - - - -function run(g) { - var fas = g.graph().acyclicer === 'greedy' ? greedyFAS(g, weightFn(g)) : dfsFAS(g); - forEach/* default */.A(fas, function (e) { - var label = g.edge(e); - g.removeEdge(e); - label.forwardName = e.name; - label.reversed = true; - g.setEdge(e.w, e.v, label, uniqueId/* default */.A('rev')); - }); - - function weightFn(g) { - return function (e) { - return g.edge(e).weight; - }; - } -} - -function dfsFAS(g) { - var fas = []; - var stack = {}; - var visited = {}; - - function dfs(v) { - if (has/* default */.A(visited, v)) { - return; - } - visited[v] = true; - stack[v] = true; - forEach/* default */.A(g.outEdges(v), function (e) { - if (has/* default */.A(stack, e.w)) { - fas.push(e); - } else { - dfs(e.w); - } - }); - delete stack[v]; - } - - forEach/* default */.A(g.nodes(), dfs); - return fas; -} - -function undo(g) { - forEach/* default */.A(g.edges(), function (e) { - var label = g.edge(e); - if (label.reversed) { - g.removeEdge(e); - - var forwardName = label.forwardName; - delete label.reversed; - delete label.forwardName; - g.setEdge(e.w, e.v, label, forwardName); - } - }); -} - -// EXTERNAL MODULE: ./node_modules/lodash-es/merge.js + 6 modules -var merge = __webpack_require__(98879); -// EXTERNAL MODULE: ./node_modules/lodash-es/pick.js + 4 modules -var pick = __webpack_require__(81942); -// EXTERNAL MODULE: ./node_modules/lodash-es/defaults.js -var defaults = __webpack_require__(23068); -// EXTERNAL MODULE: ./node_modules/lodash-es/isSymbol.js -var isSymbol = __webpack_require__(61882); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseExtremum.js - - -/** - * The base implementation of methods like `_.max` and `_.min` which accepts a - * `comparator` to determine the extremum value. - * - * @private - * @param {Array} array The array to iterate over. - * @param {Function} iteratee The iteratee invoked per iteration. - * @param {Function} comparator The comparator used to compare values. - * @returns {*} Returns the extremum value. - */ -function baseExtremum(array, iteratee, comparator) { - var index = -1, - length = array.length; - - while (++index < length) { - var value = array[index], - current = iteratee(value); - - if (current != null && (computed === undefined - ? (current === current && !(0,isSymbol/* default */.A)(current)) - : comparator(current, computed) - )) { - var computed = current, - result = value; - } - } - return result; -} - -/* harmony default export */ const _baseExtremum = (baseExtremum); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseGt.js -/** - * The base implementation of `_.gt` which doesn't coerce arguments. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if `value` is greater than `other`, - * else `false`. - */ -function baseGt(value, other) { - return value > other; -} - -/* harmony default export */ const _baseGt = (baseGt); - -// EXTERNAL MODULE: ./node_modules/lodash-es/identity.js -var identity = __webpack_require__(29008); -;// CONCATENATED MODULE: ./node_modules/lodash-es/max.js - - - - -/** - * Computes the maximum value of `array`. If `array` is empty or falsey, - * `undefined` is returned. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Math - * @param {Array} array The array to iterate over. - * @returns {*} Returns the maximum value. - * @example - * - * _.max([4, 2, 8, 6]); - * // => 8 - * - * _.max([]); - * // => undefined - */ -function max(array) { - return (array && array.length) - ? _baseExtremum(array, identity/* default */.A, _baseGt) - : undefined; -} - -/* harmony default export */ const lodash_es_max = (max); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/last.js -/** - * Gets the last element of `array`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to query. - * @returns {*} Returns the last element of `array`. - * @example - * - * _.last([1, 2, 3]); - * // => 3 - */ -function last(array) { - var length = array == null ? 0 : array.length; - return length ? array[length - 1] : undefined; -} - -/* harmony default export */ const lodash_es_last = (last); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseAssignValue.js -var _baseAssignValue = __webpack_require__(52528); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseForOwn.js -var _baseForOwn = __webpack_require__(79841); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseIteratee.js + 16 modules -var _baseIteratee = __webpack_require__(49574); -;// CONCATENATED MODULE: ./node_modules/lodash-es/mapValues.js - - - - -/** - * Creates an object with the same keys as `object` and values generated - * by running each own enumerable string keyed property of `object` thru - * `iteratee`. The iteratee is invoked with three arguments: - * (value, key, object). - * - * @static - * @memberOf _ - * @since 2.4.0 - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Object} Returns the new mapped object. - * @see _.mapKeys - * @example - * - * var users = { - * 'fred': { 'user': 'fred', 'age': 40 }, - * 'pebbles': { 'user': 'pebbles', 'age': 1 } - * }; - * - * _.mapValues(users, function(o) { return o.age; }); - * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) - * - * // The `_.property` iteratee shorthand. - * _.mapValues(users, 'age'); - * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) - */ -function mapValues(object, iteratee) { - var result = {}; - iteratee = (0,_baseIteratee/* default */.A)(iteratee, 3); - - (0,_baseForOwn/* default */.A)(object, function(value, key, object) { - (0,_baseAssignValue/* default */.A)(result, key, iteratee(value, key, object)); - }); - return result; -} - -/* harmony default export */ const lodash_es_mapValues = (mapValues); - -// EXTERNAL MODULE: ./node_modules/lodash-es/isUndefined.js -var isUndefined = __webpack_require__(69592); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseLt.js -/** - * The base implementation of `_.lt` which doesn't coerce arguments. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if `value` is less than `other`, - * else `false`. - */ -function baseLt(value, other) { - return value < other; -} - -/* harmony default export */ const _baseLt = (baseLt); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/min.js - - - - -/** - * Computes the minimum value of `array`. If `array` is empty or falsey, - * `undefined` is returned. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Math - * @param {Array} array The array to iterate over. - * @returns {*} Returns the minimum value. - * @example - * - * _.min([4, 2, 8, 6]); - * // => 2 - * - * _.min([]); - * // => undefined - */ -function min(array) { - return (array && array.length) - ? _baseExtremum(array, identity/* default */.A, _baseLt) - : undefined; -} - -/* harmony default export */ const lodash_es_min = (min); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_root.js -var _root = __webpack_require__(41917); -;// CONCATENATED MODULE: ./node_modules/lodash-es/now.js - - -/** - * Gets the timestamp of the number of milliseconds that have elapsed since - * the Unix epoch (1 January 1970 00:00:00 UTC). - * - * @static - * @memberOf _ - * @since 2.4.0 - * @category Date - * @returns {number} Returns the timestamp. - * @example - * - * _.defer(function(stamp) { - * console.log(_.now() - stamp); - * }, _.now()); - * // => Logs the number of milliseconds it took for the deferred invocation. - */ -var now = function() { - return _root/* default */.A.Date.now(); -}; - -/* harmony default export */ const lodash_es_now = (now); - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/util.js - - - - - -/* - * Adds a dummy node to the graph and return v. - */ -function addDummyNode(g, type, attrs, name) { - var v; - do { - v = uniqueId/* default */.A(name); - } while (g.hasNode(v)); - - attrs.dummy = type; - g.setNode(v, attrs); - return v; -} - -/* - * Returns a new graph with only simple edges. Handles aggregation of data - * associated with multi-edges. - */ -function simplify(g) { - var simplified = new graphlib/* Graph */.T().setGraph(g.graph()); - forEach/* default */.A(g.nodes(), function (v) { - simplified.setNode(v, g.node(v)); - }); - forEach/* default */.A(g.edges(), function (e) { - var simpleLabel = simplified.edge(e.v, e.w) || { weight: 0, minlen: 1 }; - var label = g.edge(e); - simplified.setEdge(e.v, e.w, { - weight: simpleLabel.weight + label.weight, - minlen: Math.max(simpleLabel.minlen, label.minlen), - }); - }); - return simplified; -} - -function asNonCompoundGraph(g) { - var simplified = new graphlib/* Graph */.T({ multigraph: g.isMultigraph() }).setGraph(g.graph()); - forEach/* default */.A(g.nodes(), function (v) { - if (!g.children(v).length) { - simplified.setNode(v, g.node(v)); - } - }); - forEach/* default */.A(g.edges(), function (e) { - simplified.setEdge(e, g.edge(e)); - }); - return simplified; -} - -function successorWeights(g) { - var weightMap = _.map(g.nodes(), function (v) { - var sucs = {}; - _.forEach(g.outEdges(v), function (e) { - sucs[e.w] = (sucs[e.w] || 0) + g.edge(e).weight; - }); - return sucs; - }); - return _.zipObject(g.nodes(), weightMap); -} - -function predecessorWeights(g) { - var weightMap = _.map(g.nodes(), function (v) { - var preds = {}; - _.forEach(g.inEdges(v), function (e) { - preds[e.v] = (preds[e.v] || 0) + g.edge(e).weight; - }); - return preds; - }); - return _.zipObject(g.nodes(), weightMap); -} - -/* - * Finds where a line starting at point ({x, y}) would intersect a rectangle - * ({x, y, width, height}) if it were pointing at the rectangle's center. - */ -function intersectRect(rect, point) { - var x = rect.x; - var y = rect.y; - - // Rectangle intersection algorithm from: - // http://math.stackexchange.com/questions/108113/find-edge-between-two-boxes - var dx = point.x - x; - var dy = point.y - y; - var w = rect.width / 2; - var h = rect.height / 2; - - if (!dx && !dy) { - throw new Error('Not possible to find intersection inside of the rectangle'); - } - - var sx, sy; - if (Math.abs(dy) * w > Math.abs(dx) * h) { - // Intersection is top or bottom of rect. - if (dy < 0) { - h = -h; - } - sx = (h * dx) / dy; - sy = h; - } else { - // Intersection is left or right of rect. - if (dx < 0) { - w = -w; - } - sx = w; - sy = (w * dy) / dx; - } - - return { x: x + sx, y: y + sy }; -} - -/* - * Given a DAG with each node assigned "rank" and "order" properties, this - * function will produce a matrix with the ids of each node. - */ -function buildLayerMatrix(g) { - var layering = map/* default */.A(range/* default */.A(util_maxRank(g) + 1), function () { - return []; - }); - forEach/* default */.A(g.nodes(), function (v) { - var node = g.node(v); - var rank = node.rank; - if (!isUndefined/* default */.A(rank)) { - layering[rank][node.order] = v; - } - }); - return layering; -} - -/* - * Adjusts the ranks for all nodes in the graph such that all nodes v have - * rank(v) >= 0 and at least one node w has rank(w) = 0. - */ -function normalizeRanks(g) { - var min = lodash_es_min( - map/* default */.A(g.nodes(), function (v) { - return g.node(v).rank; - }) - ); - forEach/* default */.A(g.nodes(), function (v) { - var node = g.node(v); - if (has/* default */.A(node, 'rank')) { - node.rank -= min; - } - }); -} - -function removeEmptyRanks(g) { - // Ranks may not start at 0, so we need to offset them - var offset = lodash_es_min( - map/* default */.A(g.nodes(), function (v) { - return g.node(v).rank; - }) - ); - - var layers = []; - forEach/* default */.A(g.nodes(), function (v) { - var rank = g.node(v).rank - offset; - if (!layers[rank]) { - layers[rank] = []; - } - layers[rank].push(v); - }); - - var delta = 0; - var nodeRankFactor = g.graph().nodeRankFactor; - forEach/* default */.A(layers, function (vs, i) { - if (isUndefined/* default */.A(vs) && i % nodeRankFactor !== 0) { - --delta; - } else if (delta) { - forEach/* default */.A(vs, function (v) { - g.node(v).rank += delta; - }); - } - }); -} - -function addBorderNode(g, prefix, rank, order) { - var node = { - width: 0, - height: 0, - }; - if (arguments.length >= 4) { - node.rank = rank; - node.order = order; - } - return addDummyNode(g, 'border', node, prefix); -} - -function util_maxRank(g) { - return lodash_es_max( - map/* default */.A(g.nodes(), function (v) { - var rank = g.node(v).rank; - if (!isUndefined/* default */.A(rank)) { - return rank; - } - }) - ); -} - -/* - * Partition a collection into two groups: `lhs` and `rhs`. If the supplied - * function returns true for an entry it goes into `lhs`. Otherwise it goes - * into `rhs. - */ -function partition(collection, fn) { - var result = { lhs: [], rhs: [] }; - forEach/* default */.A(collection, function (value) { - if (fn(value)) { - result.lhs.push(value); - } else { - result.rhs.push(value); - } - }); - return result; -} - -/* - * Returns a new function that wraps `fn` with a timer. The wrapper logs the - * time it takes to execute the function. - */ -function util_time(name, fn) { - var start = lodash_es_now(); - try { - return fn(); - } finally { - console.log(name + ' time: ' + (lodash_es_now() - start) + 'ms'); - } -} - -function notime(name, fn) { - return fn(); -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/add-border-segments.js - - - - - -function addBorderSegments(g) { - function dfs(v) { - var children = g.children(v); - var node = g.node(v); - if (children.length) { - forEach/* default */.A(children, dfs); - } - - if (has/* default */.A(node, 'minRank')) { - node.borderLeft = []; - node.borderRight = []; - for (var rank = node.minRank, maxRank = node.maxRank + 1; rank < maxRank; ++rank) { - add_border_segments_addBorderNode(g, 'borderLeft', '_bl', v, node, rank); - add_border_segments_addBorderNode(g, 'borderRight', '_br', v, node, rank); - } - } - } - - forEach/* default */.A(g.children(), dfs); -} - -function add_border_segments_addBorderNode(g, prop, prefix, sg, sgNode, rank) { - var label = { width: 0, height: 0, rank: rank, borderType: prop }; - var prev = sgNode[prop][rank - 1]; - var curr = addDummyNode(g, 'border', label, prefix); - sgNode[prop][rank] = curr; - g.setParent(curr, sg); - if (prev) { - g.setEdge(prev, curr, { weight: 1 }); - } -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/coordinate-system.js - - - - -function adjust(g) { - var rankDir = g.graph().rankdir.toLowerCase(); - if (rankDir === 'lr' || rankDir === 'rl') { - swapWidthHeight(g); - } -} - -function coordinate_system_undo(g) { - var rankDir = g.graph().rankdir.toLowerCase(); - if (rankDir === 'bt' || rankDir === 'rl') { - reverseY(g); - } - - if (rankDir === 'lr' || rankDir === 'rl') { - swapXY(g); - swapWidthHeight(g); - } -} - -function swapWidthHeight(g) { - forEach/* default */.A(g.nodes(), function (v) { - swapWidthHeightOne(g.node(v)); - }); - forEach/* default */.A(g.edges(), function (e) { - swapWidthHeightOne(g.edge(e)); - }); -} - -function swapWidthHeightOne(attrs) { - var w = attrs.width; - attrs.width = attrs.height; - attrs.height = w; -} - -function reverseY(g) { - forEach/* default */.A(g.nodes(), function (v) { - reverseYOne(g.node(v)); - }); - - forEach/* default */.A(g.edges(), function (e) { - var edge = g.edge(e); - forEach/* default */.A(edge.points, reverseYOne); - if (has/* default */.A(edge, 'y')) { - reverseYOne(edge); - } - }); -} - -function reverseYOne(attrs) { - attrs.y = -attrs.y; -} - -function swapXY(g) { - forEach/* default */.A(g.nodes(), function (v) { - swapXYOne(g.node(v)); - }); - - forEach/* default */.A(g.edges(), function (e) { - var edge = g.edge(e); - forEach/* default */.A(edge.points, swapXYOne); - if (has/* default */.A(edge, 'x')) { - swapXYOne(edge); - } - }); -} - -function swapXYOne(attrs) { - var x = attrs.x; - attrs.x = attrs.y; - attrs.y = x; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/normalize.js - - - - - -/* - * Breaks any long edges in the graph into short segments that span 1 layer - * each. This operation is undoable with the denormalize function. - * - * Pre-conditions: - * - * 1. The input graph is a DAG. - * 2. Each node in the graph has a "rank" property. - * - * Post-condition: - * - * 1. All edges in the graph have a length of 1. - * 2. Dummy nodes are added where edges have been split into segments. - * 3. The graph is augmented with a "dummyChains" attribute which contains - * the first dummy in each chain of dummy nodes produced. - */ -function normalize_run(g) { - g.graph().dummyChains = []; - forEach/* default */.A(g.edges(), function (edge) { - normalizeEdge(g, edge); - }); -} - -function normalizeEdge(g, e) { - var v = e.v; - var vRank = g.node(v).rank; - var w = e.w; - var wRank = g.node(w).rank; - var name = e.name; - var edgeLabel = g.edge(e); - var labelRank = edgeLabel.labelRank; - - if (wRank === vRank + 1) return; - - g.removeEdge(e); - - var dummy, attrs, i; - for (i = 0, ++vRank; vRank < wRank; ++i, ++vRank) { - edgeLabel.points = []; - attrs = { - width: 0, - height: 0, - edgeLabel: edgeLabel, - edgeObj: e, - rank: vRank, - }; - dummy = addDummyNode(g, 'edge', attrs, '_d'); - if (vRank === labelRank) { - attrs.width = edgeLabel.width; - attrs.height = edgeLabel.height; - // @ts-expect-error - attrs.dummy = 'edge-label'; - // @ts-expect-error - attrs.labelpos = edgeLabel.labelpos; - } - g.setEdge(v, dummy, { weight: edgeLabel.weight }, name); - if (i === 0) { - g.graph().dummyChains.push(dummy); - } - v = dummy; - } - - g.setEdge(v, w, { weight: edgeLabel.weight }, name); -} - -function normalize_undo(g) { - forEach/* default */.A(g.graph().dummyChains, function (v) { - var node = g.node(v); - var origLabel = node.edgeLabel; - var w; - g.setEdge(node.edgeObj, origLabel); - while (node.dummy) { - w = g.successors(v)[0]; - g.removeNode(v); - origLabel.points.push({ x: node.x, y: node.y }); - if (node.dummy === 'edge-label') { - origLabel.x = node.x; - origLabel.y = node.y; - origLabel.width = node.width; - origLabel.height = node.height; - } - v = w; - node = g.node(v); - } - }); -} - -;// CONCATENATED MODULE: ./node_modules/lodash-es/minBy.js - - - - -/** - * This method is like `_.min` except that it accepts `iteratee` which is - * invoked for each element in `array` to generate the criterion by which - * the value is ranked. The iteratee is invoked with one argument: (value). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Math - * @param {Array} array The array to iterate over. - * @param {Function} [iteratee=_.identity] The iteratee invoked per element. - * @returns {*} Returns the minimum value. - * @example - * - * var objects = [{ 'n': 1 }, { 'n': 2 }]; - * - * _.minBy(objects, function(o) { return o.n; }); - * // => { 'n': 1 } - * - * // The `_.property` iteratee shorthand. - * _.minBy(objects, 'n'); - * // => { 'n': 1 } - */ -function minBy(array, iteratee) { - return (array && array.length) - ? _baseExtremum(array, (0,_baseIteratee/* default */.A)(iteratee, 2), _baseLt) - : undefined; -} - -/* harmony default export */ const lodash_es_minBy = (minBy); - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/rank/util.js - - - - -/* - * Initializes ranks for the input graph using the longest path algorithm. This - * algorithm scales well and is fast in practice, it yields rather poor - * solutions. Nodes are pushed to the lowest layer possible, leaving the bottom - * ranks wide and leaving edges longer than necessary. However, due to its - * speed, this algorithm is good for getting an initial ranking that can be fed - * into other algorithms. - * - * This algorithm does not normalize layers because it will be used by other - * algorithms in most cases. If using this algorithm directly, be sure to - * run normalize at the end. - * - * Pre-conditions: - * - * 1. Input graph is a DAG. - * 2. Input graph node labels can be assigned properties. - * - * Post-conditions: - * - * 1. Each node will be assign an (unnormalized) "rank" property. - */ -function longestPath(g) { - var visited = {}; - - function dfs(v) { - var label = g.node(v); - if (has/* default */.A(visited, v)) { - return label.rank; - } - visited[v] = true; - - var rank = lodash_es_min( - map/* default */.A(g.outEdges(v), function (e) { - return dfs(e.w) - g.edge(e).minlen; - }) - ); - - if ( - rank === Number.POSITIVE_INFINITY || // return value of _.map([]) for Lodash 3 - rank === undefined || // return value of _.map([]) for Lodash 4 - rank === null - ) { - // return value of _.map([null]) - rank = 0; - } - - return (label.rank = rank); - } - - forEach/* default */.A(g.sources(), dfs); -} - -/* - * Returns the amount of slack for the given edge. The slack is defined as the - * difference between the length of the edge and its minimum length. - */ -function slack(g, e) { - return g.node(e.w).rank - g.node(e.v).rank - g.edge(e).minlen; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/rank/feasible-tree.js - - - - - - -/* - * Constructs a spanning tree with tight edges and adjusted the input node's - * ranks to achieve this. A tight edge is one that is has a length that matches - * its "minlen" attribute. - * - * The basic structure for this function is derived from Gansner, et al., "A - * Technique for Drawing Directed Graphs." - * - * Pre-conditions: - * - * 1. Graph must be a DAG. - * 2. Graph must be connected. - * 3. Graph must have at least one node. - * 5. Graph nodes must have been previously assigned a "rank" property that - * respects the "minlen" property of incident edges. - * 6. Graph edges must have a "minlen" property. - * - * Post-conditions: - * - * - Graph nodes will have their rank adjusted to ensure that all edges are - * tight. - * - * Returns a tree (undirected graph) that is constructed using only "tight" - * edges. - */ -function feasibleTree(g) { - var t = new graphlib/* Graph */.T({ directed: false }); - - // Choose arbitrary node from which to start our tree - var start = g.nodes()[0]; - var size = g.nodeCount(); - t.setNode(start, {}); - - var edge, delta; - while (tightTree(t, g) < size) { - edge = findMinSlackEdge(t, g); - delta = t.hasNode(edge.v) ? slack(g, edge) : -slack(g, edge); - shiftRanks(t, g, delta); - } - - return t; -} - -/* - * Finds a maximal tree of tight edges and returns the number of nodes in the - * tree. - */ -function tightTree(t, g) { - function dfs(v) { - forEach/* default */.A(g.nodeEdges(v), function (e) { - var edgeV = e.v, - w = v === edgeV ? e.w : edgeV; - if (!t.hasNode(w) && !slack(g, e)) { - t.setNode(w, {}); - t.setEdge(v, w, {}); - dfs(w); - } - }); - } - - forEach/* default */.A(t.nodes(), dfs); - return t.nodeCount(); -} - -/* - * Finds the edge with the smallest slack that is incident on tree and returns - * it. - */ -function findMinSlackEdge(t, g) { - return lodash_es_minBy(g.edges(), function (e) { - if (t.hasNode(e.v) !== t.hasNode(e.w)) { - return slack(g, e); - } - }); -} - -function shiftRanks(t, g, delta) { - forEach/* default */.A(t.nodes(), function (v) { - g.node(v).rank += delta; - }); -} - -// EXTERNAL MODULE: ./node_modules/lodash-es/isArrayLike.js -var isArrayLike = __webpack_require__(38446); -// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js -var keys = __webpack_require__(27422); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_createFind.js - - - - -/** - * Creates a `_.find` or `_.findLast` function. - * - * @private - * @param {Function} findIndexFunc The function to find the collection index. - * @returns {Function} Returns the new find function. - */ -function createFind(findIndexFunc) { - return function(collection, predicate, fromIndex) { - var iterable = Object(collection); - if (!(0,isArrayLike/* default */.A)(collection)) { - var iteratee = (0,_baseIteratee/* default */.A)(predicate, 3); - collection = (0,keys/* default */.A)(collection); - predicate = function(key) { return iteratee(iterable[key], key, iterable); }; - } - var index = findIndexFunc(collection, predicate, fromIndex); - return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined; - }; -} - -/* harmony default export */ const _createFind = (createFind); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFindIndex.js -var _baseFindIndex = __webpack_require__(25707); -// EXTERNAL MODULE: ./node_modules/lodash-es/toFinite.js + 3 modules -var toFinite = __webpack_require__(74342); -;// CONCATENATED MODULE: ./node_modules/lodash-es/toInteger.js - - -/** - * Converts `value` to an integer. - * - * **Note:** This method is loosely based on - * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {number} Returns the converted integer. - * @example - * - * _.toInteger(3.2); - * // => 3 - * - * _.toInteger(Number.MIN_VALUE); - * // => 0 - * - * _.toInteger(Infinity); - * // => 1.7976931348623157e+308 - * - * _.toInteger('3.2'); - * // => 3 - */ -function toInteger(value) { - var result = (0,toFinite/* default */.A)(value), - remainder = result % 1; - - return result === result ? (remainder ? result - remainder : result) : 0; -} - -/* harmony default export */ const lodash_es_toInteger = (toInteger); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/findIndex.js - - - - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max; - -/** - * This method is like `_.find` except that it returns the index of the first - * element `predicate` returns truthy for instead of the element itself. - * - * @static - * @memberOf _ - * @since 1.1.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @param {number} [fromIndex=0] The index to search from. - * @returns {number} Returns the index of the found element, else `-1`. - * @example - * - * var users = [ - * { 'user': 'barney', 'active': false }, - * { 'user': 'fred', 'active': false }, - * { 'user': 'pebbles', 'active': true } - * ]; - * - * _.findIndex(users, function(o) { return o.user == 'barney'; }); - * // => 0 - * - * // The `_.matches` iteratee shorthand. - * _.findIndex(users, { 'user': 'fred', 'active': false }); - * // => 1 - * - * // The `_.matchesProperty` iteratee shorthand. - * _.findIndex(users, ['active', false]); - * // => 0 - * - * // The `_.property` iteratee shorthand. - * _.findIndex(users, 'active'); - * // => 2 - */ -function findIndex(array, predicate, fromIndex) { - var length = array == null ? 0 : array.length; - if (!length) { - return -1; - } - var index = fromIndex == null ? 0 : lodash_es_toInteger(fromIndex); - if (index < 0) { - index = nativeMax(length + index, 0); - } - return (0,_baseFindIndex/* default */.A)(array, (0,_baseIteratee/* default */.A)(predicate, 3), index); -} - -/* harmony default export */ const lodash_es_findIndex = (findIndex); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/find.js - - - -/** - * Iterates over elements of `collection`, returning the first element - * `predicate` returns truthy for. The predicate is invoked with three - * arguments: (value, index|key, collection). - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to inspect. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @param {number} [fromIndex=0] The index to search from. - * @returns {*} Returns the matched element, else `undefined`. - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': true }, - * { 'user': 'fred', 'age': 40, 'active': false }, - * { 'user': 'pebbles', 'age': 1, 'active': true } - * ]; - * - * _.find(users, function(o) { return o.age < 40; }); - * // => object for 'barney' - * - * // The `_.matches` iteratee shorthand. - * _.find(users, { 'age': 1, 'active': true }); - * // => object for 'pebbles' - * - * // The `_.matchesProperty` iteratee shorthand. - * _.find(users, ['active', false]); - * // => object for 'fred' - * - * // The `_.property` iteratee shorthand. - * _.find(users, 'active'); - * // => object for 'barney' - */ -var find = _createFind(lodash_es_findIndex); - -/* harmony default export */ const lodash_es_find = (find); - -// EXTERNAL MODULE: ./node_modules/lodash-es/filter.js + 1 modules -var filter = __webpack_require__(11662); -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/dijkstra.js - - - - - -var DEFAULT_WEIGHT_FUNC = constant/* default */.A(1); - -function dijkstra_dijkstra(g, source, weightFn, edgeFn) { - return runDijkstra( - g, - String(source), - weightFn || DEFAULT_WEIGHT_FUNC, - edgeFn || - function (v) { - return g.outEdges(v); - } - ); -} - -function runDijkstra(g, source, weightFn, edgeFn) { - var results = {}; - var pq = new PriorityQueue(); - var v, vEntry; - - var updateNeighbors = function (edge) { - var w = edge.v !== v ? edge.v : edge.w; - var wEntry = results[w]; - var weight = weightFn(edge); - var distance = vEntry.distance + weight; - - if (weight < 0) { - throw new Error( - 'dijkstra does not allow negative edge weights. ' + - 'Bad edge: ' + - edge + - ' Weight: ' + - weight - ); - } - - if (distance < wEntry.distance) { - wEntry.distance = distance; - wEntry.predecessor = v; - pq.decrease(w, distance); - } - }; - - g.nodes().forEach(function (v) { - var distance = v === source ? 0 : Number.POSITIVE_INFINITY; - results[v] = { distance: distance }; - pq.add(v, distance); - }); - - while (pq.size() > 0) { - v = pq.removeMin(); - vEntry = results[v]; - if (vEntry.distance === Number.POSITIVE_INFINITY) { - break; - } - - edgeFn(v).forEach(updateNeighbors); - } - - return results; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/dijkstra-all.js - - - - - -function dijkstraAll(g, weightFunc, edgeFunc) { - return _.transform( - g.nodes(), - function (acc, v) { - acc[v] = dijkstra(g, v, weightFunc, edgeFunc); - }, - {} - ); -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/floyd-warshall.js - - - - -var floyd_warshall_DEFAULT_WEIGHT_FUNC = constant/* default */.A(1); - -function floydWarshall(g, weightFn, edgeFn) { - return runFloydWarshall( - g, - weightFn || floyd_warshall_DEFAULT_WEIGHT_FUNC, - edgeFn || - function (v) { - return g.outEdges(v); - } - ); -} - -function runFloydWarshall(g, weightFn, edgeFn) { - var results = {}; - var nodes = g.nodes(); - - nodes.forEach(function (v) { - results[v] = {}; - results[v][v] = { distance: 0 }; - nodes.forEach(function (w) { - if (v !== w) { - results[v][w] = { distance: Number.POSITIVE_INFINITY }; - } - }); - edgeFn(v).forEach(function (edge) { - var w = edge.v === v ? edge.w : edge.v; - var d = weightFn(edge); - results[v][w] = { distance: d, predecessor: v }; - }); - }); - - nodes.forEach(function (k) { - var rowK = results[k]; - nodes.forEach(function (i) { - var rowI = results[i]; - nodes.forEach(function (j) { - var ik = rowI[k]; - var kj = rowK[j]; - var ij = rowI[j]; - var altDistance = ik.distance + kj.distance; - if (altDistance < ij.distance) { - ij.distance = altDistance; - ij.predecessor = kj.predecessor; - } - }); - }); - }); - - return results; -} - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseKeys.js + 1 modules -var _baseKeys = __webpack_require__(69471); -// EXTERNAL MODULE: ./node_modules/lodash-es/_getTag.js + 3 modules -var _getTag = __webpack_require__(9779); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGetTag.js + 2 modules -var _baseGetTag = __webpack_require__(88496); -// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js -var isArray = __webpack_require__(92049); -// EXTERNAL MODULE: ./node_modules/lodash-es/isObjectLike.js -var isObjectLike = __webpack_require__(53098); -;// CONCATENATED MODULE: ./node_modules/lodash-es/isString.js - - - - -/** `Object#toString` result references. */ -var stringTag = '[object String]'; - -/** - * Checks if `value` is classified as a `String` primitive or object. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a string, else `false`. - * @example - * - * _.isString('abc'); - * // => true - * - * _.isString(1); - * // => false - */ -function isString(value) { - return typeof value == 'string' || - (!(0,isArray/* default */.A)(value) && (0,isObjectLike/* default */.A)(value) && (0,_baseGetTag/* default */.A)(value) == stringTag); -} - -/* harmony default export */ const lodash_es_isString = (isString); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseProperty.js -var _baseProperty = __webpack_require__(70805); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_asciiSize.js - - -/** - * Gets the size of an ASCII `string`. - * - * @private - * @param {string} string The string inspect. - * @returns {number} Returns the string size. - */ -var asciiSize = (0,_baseProperty/* default */.A)('length'); - -/* harmony default export */ const _asciiSize = (asciiSize); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_hasUnicode.js -/** Used to compose unicode character classes. */ -var rsAstralRange = '\\ud800-\\udfff', - rsComboMarksRange = '\\u0300-\\u036f', - reComboHalfMarksRange = '\\ufe20-\\ufe2f', - rsComboSymbolsRange = '\\u20d0-\\u20ff', - rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, - rsVarRange = '\\ufe0e\\ufe0f'; - -/** Used to compose unicode capture groups. */ -var rsZWJ = '\\u200d'; - -/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ -var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']'); - -/** - * Checks if `string` contains Unicode symbols. - * - * @private - * @param {string} string The string to inspect. - * @returns {boolean} Returns `true` if a symbol is found, else `false`. - */ -function hasUnicode(string) { - return reHasUnicode.test(string); -} - -/* harmony default export */ const _hasUnicode = (hasUnicode); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_unicodeSize.js -/** Used to compose unicode character classes. */ -var _unicodeSize_rsAstralRange = '\\ud800-\\udfff', - _unicodeSize_rsComboMarksRange = '\\u0300-\\u036f', - _unicodeSize_reComboHalfMarksRange = '\\ufe20-\\ufe2f', - _unicodeSize_rsComboSymbolsRange = '\\u20d0-\\u20ff', - _unicodeSize_rsComboRange = _unicodeSize_rsComboMarksRange + _unicodeSize_reComboHalfMarksRange + _unicodeSize_rsComboSymbolsRange, - _unicodeSize_rsVarRange = '\\ufe0e\\ufe0f'; - -/** Used to compose unicode capture groups. */ -var rsAstral = '[' + _unicodeSize_rsAstralRange + ']', - rsCombo = '[' + _unicodeSize_rsComboRange + ']', - rsFitz = '\\ud83c[\\udffb-\\udfff]', - rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', - rsNonAstral = '[^' + _unicodeSize_rsAstralRange + ']', - rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', - rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', - _unicodeSize_rsZWJ = '\\u200d'; - -/** Used to compose unicode regexes. */ -var reOptMod = rsModifier + '?', - rsOptVar = '[' + _unicodeSize_rsVarRange + ']?', - rsOptJoin = '(?:' + _unicodeSize_rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', - rsSeq = rsOptVar + reOptMod + rsOptJoin, - rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; - -/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ -var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); - -/** - * Gets the size of a Unicode `string`. - * - * @private - * @param {string} string The string inspect. - * @returns {number} Returns the string size. - */ -function unicodeSize(string) { - var result = reUnicode.lastIndex = 0; - while (reUnicode.test(string)) { - ++result; - } - return result; -} - -/* harmony default export */ const _unicodeSize = (unicodeSize); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_stringSize.js - - - - -/** - * Gets the number of symbols in `string`. - * - * @private - * @param {string} string The string to inspect. - * @returns {number} Returns the string size. - */ -function stringSize(string) { - return _hasUnicode(string) - ? _unicodeSize(string) - : _asciiSize(string); -} - -/* harmony default export */ const _stringSize = (stringSize); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/size.js - - - - - - -/** `Object#toString` result references. */ -var mapTag = '[object Map]', - setTag = '[object Set]'; - -/** - * Gets the size of `collection` by returning its length for array-like - * values or the number of own enumerable string keyed properties for objects. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object|string} collection The collection to inspect. - * @returns {number} Returns the collection size. - * @example - * - * _.size([1, 2, 3]); - * // => 3 - * - * _.size({ 'a': 1, 'b': 2 }); - * // => 2 - * - * _.size('pebbles'); - * // => 7 - */ -function size(collection) { - if (collection == null) { - return 0; - } - if ((0,isArrayLike/* default */.A)(collection)) { - return lodash_es_isString(collection) ? _stringSize(collection) : collection.length; - } - var tag = (0,_getTag/* default */.A)(collection); - if (tag == mapTag || tag == setTag) { - return collection.size; - } - return (0,_baseKeys/* default */.A)(collection).length; -} - -/* harmony default export */ const lodash_es_size = (size); - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/topsort.js - - - - -topsort_topsort.CycleException = topsort_CycleException; - -function topsort_topsort(g) { - var visited = {}; - var stack = {}; - var results = []; - - function visit(node) { - if (has/* default */.A(stack, node)) { - throw new topsort_CycleException(); - } - - if (!has/* default */.A(visited, node)) { - stack[node] = true; - visited[node] = true; - forEach/* default */.A(g.predecessors(node), visit); - delete stack[node]; - results.push(node); - } - } - - forEach/* default */.A(g.sinks(), visit); - - if (lodash_es_size(visited) !== g.nodeCount()) { - throw new topsort_CycleException(); - } - - return results; -} - -function topsort_CycleException() {} -topsort_CycleException.prototype = new Error(); // must be an instance of Error to pass testing - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/is-acyclic.js - - - - -function isAcyclic(g) { - try { - topsort(g); - } catch (e) { - if (e instanceof CycleException) { - return false; - } - throw e; - } - return true; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/dfs.js - - - - -/* - * A helper that preforms a pre- or post-order traversal on the input graph - * and returns the nodes in the order they were visited. If the graph is - * undirected then this algorithm will navigate using neighbors. If the graph - * is directed then this algorithm will navigate using successors. - * - * Order must be one of "pre" or "post". - */ -function dfs(g, vs, order) { - if (!isArray/* default */.A(vs)) { - vs = [vs]; - } - - var navigation = (g.isDirected() ? g.successors : g.neighbors).bind(g); - - var acc = []; - var visited = {}; - forEach/* default */.A(vs, function (v) { - if (!g.hasNode(v)) { - throw new Error('Graph does not have node: ' + v); - } - - doDfs(g, v, order === 'post', visited, navigation, acc); - }); - return acc; -} - -function doDfs(g, v, postorder, visited, navigation, acc) { - if (!has/* default */.A(visited, v)) { - visited[v] = true; - - if (!postorder) { - acc.push(v); - } - forEach/* default */.A(navigation(v), function (w) { - doDfs(g, w, postorder, visited, navigation, acc); - }); - if (postorder) { - acc.push(v); - } - } -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/postorder.js - - - - -function postorder(g, vs) { - return dfs(g, vs, 'post'); -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/preorder.js - - - - -function preorder(g, vs) { - return dfs(g, vs, 'pre'); -} - -// EXTERNAL MODULE: ./node_modules/dagre-d3-es/src/graphlib/graph.js + 9 modules -var graph = __webpack_require__(73046); -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/prim.js - - - - - - -function prim(g, weightFunc) { - var result = new Graph(); - var parents = {}; - var pq = new PriorityQueue(); - var v; - - function updateNeighbors(edge) { - var w = edge.v === v ? edge.w : edge.v; - var pri = pq.priority(w); - if (pri !== undefined) { - var edgeWeight = weightFunc(edge); - if (edgeWeight < pri) { - parents[w] = v; - pq.decrease(w, edgeWeight); - } - } - } - - if (g.nodeCount() === 0) { - return result; - } - - _.each(g.nodes(), function (v) { - pq.add(v, Number.POSITIVE_INFINITY); - result.setNode(v); - }); - - // Start from an arbitrary node - pq.decrease(g.nodes()[0], 0); - - var init = false; - while (pq.size() > 0) { - v = pq.removeMin(); - if (_.has(parents, v)) { - result.setEdge(v, parents[v]); - } else if (init) { - throw new Error('Input graph is not connected: ' + g); - } else { - init = true; - } - - g.nodeEdges(v).forEach(updateNeighbors); - } - - return result; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/index.js - - - - - - - - - - - - - - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/rank/network-simplex.js - - - - - - - - -// Expose some internals for testing purposes -networkSimplex.initLowLimValues = initLowLimValues; -networkSimplex.initCutValues = initCutValues; -networkSimplex.calcCutValue = calcCutValue; -networkSimplex.leaveEdge = leaveEdge; -networkSimplex.enterEdge = enterEdge; -networkSimplex.exchangeEdges = exchangeEdges; - -/* - * The network simplex algorithm assigns ranks to each node in the input graph - * and iteratively improves the ranking to reduce the length of edges. - * - * Preconditions: - * - * 1. The input graph must be a DAG. - * 2. All nodes in the graph must have an object value. - * 3. All edges in the graph must have "minlen" and "weight" attributes. - * - * Postconditions: - * - * 1. All nodes in the graph will have an assigned "rank" attribute that has - * been optimized by the network simplex algorithm. Ranks start at 0. - * - * - * A rough sketch of the algorithm is as follows: - * - * 1. Assign initial ranks to each node. We use the longest path algorithm, - * which assigns ranks to the lowest position possible. In general this - * leads to very wide bottom ranks and unnecessarily long edges. - * 2. Construct a feasible tight tree. A tight tree is one such that all - * edges in the tree have no slack (difference between length of edge - * and minlen for the edge). This by itself greatly improves the assigned - * rankings by shorting edges. - * 3. Iteratively find edges that have negative cut values. Generally a - * negative cut value indicates that the edge could be removed and a new - * tree edge could be added to produce a more compact graph. - * - * Much of the algorithms here are derived from Gansner, et al., "A Technique - * for Drawing Directed Graphs." The structure of the file roughly follows the - * structure of the overall algorithm. - */ -function networkSimplex(g) { - g = simplify(g); - longestPath(g); - var t = feasibleTree(g); - initLowLimValues(t); - initCutValues(t, g); - - var e, f; - while ((e = leaveEdge(t))) { - f = enterEdge(t, g, e); - exchangeEdges(t, g, e, f); - } -} - -/* - * Initializes cut values for all edges in the tree. - */ -function initCutValues(t, g) { - var vs = postorder(t, t.nodes()); - vs = vs.slice(0, vs.length - 1); - forEach/* default */.A(vs, function (v) { - assignCutValue(t, g, v); - }); -} - -function assignCutValue(t, g, child) { - var childLab = t.node(child); - var parent = childLab.parent; - t.edge(child, parent).cutvalue = calcCutValue(t, g, child); -} - -/* - * Given the tight tree, its graph, and a child in the graph calculate and - * return the cut value for the edge between the child and its parent. - */ -function calcCutValue(t, g, child) { - var childLab = t.node(child); - var parent = childLab.parent; - // True if the child is on the tail end of the edge in the directed graph - var childIsTail = true; - // The graph's view of the tree edge we're inspecting - var graphEdge = g.edge(child, parent); - // The accumulated cut value for the edge between this node and its parent - var cutValue = 0; - - if (!graphEdge) { - childIsTail = false; - graphEdge = g.edge(parent, child); - } - - cutValue = graphEdge.weight; - - forEach/* default */.A(g.nodeEdges(child), function (e) { - var isOutEdge = e.v === child, - other = isOutEdge ? e.w : e.v; - - if (other !== parent) { - var pointsToHead = isOutEdge === childIsTail, - otherWeight = g.edge(e).weight; - - cutValue += pointsToHead ? otherWeight : -otherWeight; - if (isTreeEdge(t, child, other)) { - var otherCutValue = t.edge(child, other).cutvalue; - cutValue += pointsToHead ? -otherCutValue : otherCutValue; - } - } - }); - - return cutValue; -} - -function initLowLimValues(tree, root) { - if (arguments.length < 2) { - root = tree.nodes()[0]; - } - dfsAssignLowLim(tree, {}, 1, root); -} - -function dfsAssignLowLim(tree, visited, nextLim, v, parent) { - var low = nextLim; - var label = tree.node(v); - - visited[v] = true; - forEach/* default */.A(tree.neighbors(v), function (w) { - if (!has/* default */.A(visited, w)) { - nextLim = dfsAssignLowLim(tree, visited, nextLim, w, v); - } - }); - - label.low = low; - label.lim = nextLim++; - if (parent) { - label.parent = parent; - } else { - // TODO should be able to remove this when we incrementally update low lim - delete label.parent; - } - - return nextLim; -} - -function leaveEdge(tree) { - return lodash_es_find(tree.edges(), function (e) { - return tree.edge(e).cutvalue < 0; - }); -} - -function enterEdge(t, g, edge) { - var v = edge.v; - var w = edge.w; - - // For the rest of this function we assume that v is the tail and w is the - // head, so if we don't have this edge in the graph we should flip it to - // match the correct orientation. - if (!g.hasEdge(v, w)) { - v = edge.w; - w = edge.v; - } - - var vLabel = t.node(v); - var wLabel = t.node(w); - var tailLabel = vLabel; - var flip = false; - - // If the root is in the tail of the edge then we need to flip the logic that - // checks for the head and tail nodes in the candidates function below. - if (vLabel.lim > wLabel.lim) { - tailLabel = wLabel; - flip = true; - } - - var candidates = filter/* default */.A(g.edges(), function (edge) { - return ( - flip === isDescendant(t, t.node(edge.v), tailLabel) && - flip !== isDescendant(t, t.node(edge.w), tailLabel) - ); - }); - - return lodash_es_minBy(candidates, function (edge) { - return slack(g, edge); - }); -} - -function exchangeEdges(t, g, e, f) { - var v = e.v; - var w = e.w; - t.removeEdge(v, w); - t.setEdge(f.v, f.w, {}); - initLowLimValues(t); - initCutValues(t, g); - updateRanks(t, g); -} - -function updateRanks(t, g) { - var root = lodash_es_find(t.nodes(), function (v) { - return !g.node(v).parent; - }); - var vs = preorder(t, root); - vs = vs.slice(1); - forEach/* default */.A(vs, function (v) { - var parent = t.node(v).parent, - edge = g.edge(v, parent), - flipped = false; - - if (!edge) { - edge = g.edge(parent, v); - flipped = true; - } - - g.node(v).rank = g.node(parent).rank + (flipped ? edge.minlen : -edge.minlen); - }); -} - -/* - * Returns true if the edge is in the tree. - */ -function isTreeEdge(tree, u, v) { - return tree.hasEdge(u, v); -} - -/* - * Returns true if the specified node is descendant of the root node per the - * assigned low and lim attributes in the tree. - */ -function isDescendant(tree, vLabel, rootLabel) { - return rootLabel.low <= vLabel.lim && vLabel.lim <= rootLabel.lim; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/rank/index.js - - - - - - -/* - * Assigns a rank to each node in the input graph that respects the "minlen" - * constraint specified on edges between nodes. - * - * This basic structure is derived from Gansner, et al., "A Technique for - * Drawing Directed Graphs." - * - * Pre-conditions: - * - * 1. Graph must be a connected DAG - * 2. Graph nodes must be objects - * 3. Graph edges must have "weight" and "minlen" attributes - * - * Post-conditions: - * - * 1. Graph nodes will have a "rank" attribute based on the results of the - * algorithm. Ranks can start at any index (including negative), we'll - * fix them up later. - */ -function rank(g) { - switch (g.graph().ranker) { - case 'network-simplex': - networkSimplexRanker(g); - break; - case 'tight-tree': - tightTreeRanker(g); - break; - case 'longest-path': - longestPathRanker(g); - break; - default: - networkSimplexRanker(g); - } -} - -// A fast and simple ranker, but results are far from optimal. -var longestPathRanker = longestPath; - -function tightTreeRanker(g) { - longestPath(g); - feasibleTree(g); -} - -function networkSimplexRanker(g) { - networkSimplex(g); -} - -// EXTERNAL MODULE: ./node_modules/lodash-es/values.js + 1 modules -var values = __webpack_require__(38207); -// EXTERNAL MODULE: ./node_modules/lodash-es/reduce.js + 2 modules -var reduce = __webpack_require__(89463); -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/nesting-graph.js - - - - - -/* - * A nesting graph creates dummy nodes for the tops and bottoms of subgraphs, - * adds appropriate edges to ensure that all cluster nodes are placed between - * these boundries, and ensures that the graph is connected. - * - * In addition we ensure, through the use of the minlen property, that nodes - * and subgraph border nodes to not end up on the same rank. - * - * Preconditions: - * - * 1. Input graph is a DAG - * 2. Nodes in the input graph has a minlen attribute - * - * Postconditions: - * - * 1. Input graph is connected. - * 2. Dummy nodes are added for the tops and bottoms of subgraphs. - * 3. The minlen attribute for nodes is adjusted to ensure nodes do not - * get placed on the same rank as subgraph border nodes. - * - * The nesting graph idea comes from Sander, "Layout of Compound Directed - * Graphs." - */ -function nesting_graph_run(g) { - var root = addDummyNode(g, 'root', {}, '_root'); - var depths = treeDepths(g); - var height = lodash_es_max(values/* default */.A(depths)) - 1; // Note: depths is an Object not an array - var nodeSep = 2 * height + 1; - - g.graph().nestingRoot = root; - - // Multiply minlen by nodeSep to align nodes on non-border ranks. - forEach/* default */.A(g.edges(), function (e) { - g.edge(e).minlen *= nodeSep; - }); - - // Calculate a weight that is sufficient to keep subgraphs vertically compact - var weight = sumWeights(g) + 1; - - // Create border nodes and link them up - forEach/* default */.A(g.children(), function (child) { - nesting_graph_dfs(g, root, nodeSep, weight, height, depths, child); - }); - - // Save the multiplier for node layers for later removal of empty border - // layers. - g.graph().nodeRankFactor = nodeSep; -} - -function nesting_graph_dfs(g, root, nodeSep, weight, height, depths, v) { - var children = g.children(v); - if (!children.length) { - if (v !== root) { - g.setEdge(root, v, { weight: 0, minlen: nodeSep }); - } - return; - } - - var top = addBorderNode(g, '_bt'); - var bottom = addBorderNode(g, '_bb'); - var label = g.node(v); - - g.setParent(top, v); - label.borderTop = top; - g.setParent(bottom, v); - label.borderBottom = bottom; - - forEach/* default */.A(children, function (child) { - nesting_graph_dfs(g, root, nodeSep, weight, height, depths, child); - - var childNode = g.node(child); - var childTop = childNode.borderTop ? childNode.borderTop : child; - var childBottom = childNode.borderBottom ? childNode.borderBottom : child; - var thisWeight = childNode.borderTop ? weight : 2 * weight; - var minlen = childTop !== childBottom ? 1 : height - depths[v] + 1; - - g.setEdge(top, childTop, { - weight: thisWeight, - minlen: minlen, - nestingEdge: true, - }); - - g.setEdge(childBottom, bottom, { - weight: thisWeight, - minlen: minlen, - nestingEdge: true, - }); - }); - - if (!g.parent(v)) { - g.setEdge(root, top, { weight: 0, minlen: height + depths[v] }); - } -} - -function treeDepths(g) { - var depths = {}; - function dfs(v, depth) { - var children = g.children(v); - if (children && children.length) { - forEach/* default */.A(children, function (child) { - dfs(child, depth + 1); - }); - } - depths[v] = depth; - } - forEach/* default */.A(g.children(), function (v) { - dfs(v, 1); - }); - return depths; -} - -function sumWeights(g) { - return reduce/* default */.A( - g.edges(), - function (acc, e) { - return acc + g.edge(e).weight; - }, - 0 - ); -} - -function cleanup(g) { - var graphLabel = g.graph(); - g.removeNode(graphLabel.nestingRoot); - delete graphLabel.nestingRoot; - forEach/* default */.A(g.edges(), function (e) { - var edge = g.edge(e); - if (edge.nestingEdge) { - g.removeEdge(e); - } - }); -} - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseClone.js + 15 modules -var _baseClone = __webpack_require__(91641); -;// CONCATENATED MODULE: ./node_modules/lodash-es/cloneDeep.js - - -/** Used to compose bitmasks for cloning. */ -var CLONE_DEEP_FLAG = 1, - CLONE_SYMBOLS_FLAG = 4; - -/** - * This method is like `_.clone` except that it recursively clones `value`. - * - * @static - * @memberOf _ - * @since 1.0.0 - * @category Lang - * @param {*} value The value to recursively clone. - * @returns {*} Returns the deep cloned value. - * @see _.clone - * @example - * - * var objects = [{ 'a': 1 }, { 'b': 2 }]; - * - * var deep = _.cloneDeep(objects); - * console.log(deep[0] === objects[0]); - * // => false - */ -function cloneDeep(value) { - return (0,_baseClone/* default */.A)(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); -} - -/* harmony default export */ const lodash_es_cloneDeep = (cloneDeep); - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/add-subgraph-constraints.js - - - - -function addSubgraphConstraints(g, cg, vs) { - var prev = {}, - rootPrev; - - forEach/* default */.A(vs, function (v) { - var child = g.parent(v), - parent, - prevChild; - while (child) { - parent = g.parent(child); - if (parent) { - prevChild = prev[parent]; - prev[parent] = child; - } else { - prevChild = rootPrev; - rootPrev = child; - } - if (prevChild && prevChild !== child) { - cg.setEdge(prevChild, child); - return; - } - child = parent; - } - }); - - /* - function dfs(v) { - var children = v ? g.children(v) : g.children(); - if (children.length) { - var min = Number.POSITIVE_INFINITY, - subgraphs = []; - _.each(children, function(child) { - var childMin = dfs(child); - if (g.children(child).length) { - subgraphs.push({ v: child, order: childMin }); - } - min = Math.min(min, childMin); - }); - _.reduce(_.sortBy(subgraphs, "order"), function(prev, curr) { - cg.setEdge(prev.v, curr.v); - return curr; - }); - return min; - } - return g.node(v).order; - } - dfs(undefined); - */ -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/build-layer-graph.js - - - - - -/* - * Constructs a graph that can be used to sort a layer of nodes. The graph will - * contain all base and subgraph nodes from the request layer in their original - * hierarchy and any edges that are incident on these nodes and are of the type - * requested by the "relationship" parameter. - * - * Nodes from the requested rank that do not have parents are assigned a root - * node in the output graph, which is set in the root graph attribute. This - * makes it easy to walk the hierarchy of movable nodes during ordering. - * - * Pre-conditions: - * - * 1. Input graph is a DAG - * 2. Base nodes in the input graph have a rank attribute - * 3. Subgraph nodes in the input graph has minRank and maxRank attributes - * 4. Edges have an assigned weight - * - * Post-conditions: - * - * 1. Output graph has all nodes in the movable rank with preserved - * hierarchy. - * 2. Root nodes in the movable layer are made children of the node - * indicated by the root attribute of the graph. - * 3. Non-movable nodes incident on movable nodes, selected by the - * relationship parameter, are included in the graph (without hierarchy). - * 4. Edges incident on movable nodes, selected by the relationship - * parameter, are added to the output graph. - * 5. The weights for copied edges are aggregated as need, since the output - * graph is not a multi-graph. - */ -function buildLayerGraph(g, rank, relationship) { - var root = createRootNode(g), - result = new graphlib/* Graph */.T({ compound: true }) - .setGraph({ root: root }) - .setDefaultNodeLabel(function (v) { - return g.node(v); - }); - - forEach/* default */.A(g.nodes(), function (v) { - var node = g.node(v), - parent = g.parent(v); - - if (node.rank === rank || (node.minRank <= rank && rank <= node.maxRank)) { - result.setNode(v); - result.setParent(v, parent || root); - - // This assumes we have only short edges! - forEach/* default */.A(g[relationship](v), function (e) { - var u = e.v === v ? e.w : e.v, - edge = result.edge(u, v), - weight = !isUndefined/* default */.A(edge) ? edge.weight : 0; - result.setEdge(u, v, { weight: g.edge(e).weight + weight }); - }); - - if (has/* default */.A(node, 'minRank')) { - result.setNode(v, { - borderLeft: node.borderLeft[rank], - borderRight: node.borderRight[rank], - }); - } - } - }); - - return result; -} - -function createRootNode(g) { - var v; - while (g.hasNode((v = uniqueId/* default */.A('_root')))); - return v; -} - -// EXTERNAL MODULE: ./node_modules/lodash-es/_assignValue.js -var _assignValue = __webpack_require__(52851); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseZipObject.js -/** - * This base implementation of `_.zipObject` which assigns values using `assignFunc`. - * - * @private - * @param {Array} props The property identifiers. - * @param {Array} values The property values. - * @param {Function} assignFunc The function to assign values. - * @returns {Object} Returns the new object. - */ -function baseZipObject(props, values, assignFunc) { - var index = -1, - length = props.length, - valsLength = values.length, - result = {}; - - while (++index < length) { - var value = index < valsLength ? values[index] : undefined; - assignFunc(result, props[index], value); - } - return result; -} - -/* harmony default export */ const _baseZipObject = (baseZipObject); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/zipObject.js - - - -/** - * This method is like `_.fromPairs` except that it accepts two arrays, - * one of property identifiers and one of corresponding values. - * - * @static - * @memberOf _ - * @since 0.4.0 - * @category Array - * @param {Array} [props=[]] The property identifiers. - * @param {Array} [values=[]] The property values. - * @returns {Object} Returns the new object. - * @example - * - * _.zipObject(['a', 'b'], [1, 2]); - * // => { 'a': 1, 'b': 2 } - */ -function zipObject(props, values) { - return _baseZipObject(props || [], values || [], _assignValue/* default */.A); -} - -/* harmony default export */ const lodash_es_zipObject = (zipObject); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFlatten.js + 1 modules -var _baseFlatten = __webpack_require__(13588); -// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayMap.js -var _arrayMap = __webpack_require__(45572); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGet.js -var _baseGet = __webpack_require__(66318); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseMap.js -var _baseMap = __webpack_require__(52568); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseSortBy.js -/** - * The base implementation of `_.sortBy` which uses `comparer` to define the - * sort order of `array` and replaces criteria objects with their corresponding - * values. - * - * @private - * @param {Array} array The array to sort. - * @param {Function} comparer The function to define sort order. - * @returns {Array} Returns `array`. - */ -function baseSortBy(array, comparer) { - var length = array.length; - - array.sort(comparer); - while (length--) { - array[length] = array[length].value; - } - return array; -} - -/* harmony default export */ const _baseSortBy = (baseSortBy); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseUnary.js -var _baseUnary = __webpack_require__(52789); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_compareAscending.js - - -/** - * Compares values to sort them in ascending order. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {number} Returns the sort order indicator for `value`. - */ -function compareAscending(value, other) { - if (value !== other) { - var valIsDefined = value !== undefined, - valIsNull = value === null, - valIsReflexive = value === value, - valIsSymbol = (0,isSymbol/* default */.A)(value); - - var othIsDefined = other !== undefined, - othIsNull = other === null, - othIsReflexive = other === other, - othIsSymbol = (0,isSymbol/* default */.A)(other); - - if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) || - (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) || - (valIsNull && othIsDefined && othIsReflexive) || - (!valIsDefined && othIsReflexive) || - !valIsReflexive) { - return 1; - } - if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) || - (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) || - (othIsNull && valIsDefined && valIsReflexive) || - (!othIsDefined && valIsReflexive) || - !othIsReflexive) { - return -1; - } - } - return 0; -} - -/* harmony default export */ const _compareAscending = (compareAscending); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_compareMultiple.js - - -/** - * Used by `_.orderBy` to compare multiple properties of a value to another - * and stable sort them. - * - * If `orders` is unspecified, all values are sorted in ascending order. Otherwise, - * specify an order of "desc" for descending or "asc" for ascending sort order - * of corresponding values. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {boolean[]|string[]} orders The order to sort by for each property. - * @returns {number} Returns the sort order indicator for `object`. - */ -function compareMultiple(object, other, orders) { - var index = -1, - objCriteria = object.criteria, - othCriteria = other.criteria, - length = objCriteria.length, - ordersLength = orders.length; - - while (++index < length) { - var result = _compareAscending(objCriteria[index], othCriteria[index]); - if (result) { - if (index >= ordersLength) { - return result; - } - var order = orders[index]; - return result * (order == 'desc' ? -1 : 1); - } - } - // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications - // that causes it, under certain circumstances, to provide the same value for - // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247 - // for more details. - // - // This also ensures a stable sort in V8 and other engines. - // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details. - return object.index - other.index; -} - -/* harmony default export */ const _compareMultiple = (compareMultiple); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseOrderBy.js - - - - - - - - - - -/** - * The base implementation of `_.orderBy` without param guards. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. - * @param {string[]} orders The sort orders of `iteratees`. - * @returns {Array} Returns the new sorted array. - */ -function baseOrderBy(collection, iteratees, orders) { - if (iteratees.length) { - iteratees = (0,_arrayMap/* default */.A)(iteratees, function(iteratee) { - if ((0,isArray/* default */.A)(iteratee)) { - return function(value) { - return (0,_baseGet/* default */.A)(value, iteratee.length === 1 ? iteratee[0] : iteratee); - } - } - return iteratee; - }); - } else { - iteratees = [identity/* default */.A]; - } - - var index = -1; - iteratees = (0,_arrayMap/* default */.A)(iteratees, (0,_baseUnary/* default */.A)(_baseIteratee/* default */.A)); - - var result = (0,_baseMap/* default */.A)(collection, function(value, key, collection) { - var criteria = (0,_arrayMap/* default */.A)(iteratees, function(iteratee) { - return iteratee(value); - }); - return { 'criteria': criteria, 'index': ++index, 'value': value }; - }); - - return _baseSortBy(result, function(object, other) { - return _compareMultiple(object, other, orders); - }); -} - -/* harmony default export */ const _baseOrderBy = (baseOrderBy); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseRest.js -var _baseRest = __webpack_require__(24326); -// EXTERNAL MODULE: ./node_modules/lodash-es/_isIterateeCall.js -var _isIterateeCall = __webpack_require__(6832); -;// CONCATENATED MODULE: ./node_modules/lodash-es/sortBy.js - - - - - -/** - * Creates an array of elements, sorted in ascending order by the results of - * running each element in a collection thru each iteratee. This method - * performs a stable sort, that is, it preserves the original sort order of - * equal elements. The iteratees are invoked with one argument: (value). - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {...(Function|Function[])} [iteratees=[_.identity]] - * The iteratees to sort by. - * @returns {Array} Returns the new sorted array. - * @example - * - * var users = [ - * { 'user': 'fred', 'age': 48 }, - * { 'user': 'barney', 'age': 36 }, - * { 'user': 'fred', 'age': 30 }, - * { 'user': 'barney', 'age': 34 } - * ]; - * - * _.sortBy(users, [function(o) { return o.user; }]); - * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]] - * - * _.sortBy(users, ['user', 'age']); - * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]] - */ -var sortBy = (0,_baseRest/* default */.A)(function(collection, iteratees) { - if (collection == null) { - return []; - } - var length = iteratees.length; - if (length > 1 && (0,_isIterateeCall/* default */.A)(collection, iteratees[0], iteratees[1])) { - iteratees = []; - } else if (length > 2 && (0,_isIterateeCall/* default */.A)(iteratees[0], iteratees[1], iteratees[2])) { - iteratees = [iteratees[0]]; - } - return _baseOrderBy(collection, (0,_baseFlatten/* default */.A)(iteratees, 1), []); -}); - -/* harmony default export */ const lodash_es_sortBy = (sortBy); - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/cross-count.js - - - - -/* - * A function that takes a layering (an array of layers, each with an array of - * ordererd nodes) and a graph and returns a weighted crossing count. - * - * Pre-conditions: - * - * 1. Input graph must be simple (not a multigraph), directed, and include - * only simple edges. - * 2. Edges in the input graph must have assigned weights. - * - * Post-conditions: - * - * 1. The graph and layering matrix are left unchanged. - * - * This algorithm is derived from Barth, et al., "Bilayer Cross Counting." - */ -function crossCount(g, layering) { - var cc = 0; - for (var i = 1; i < layering.length; ++i) { - cc += twoLayerCrossCount(g, layering[i - 1], layering[i]); - } - return cc; -} - -function twoLayerCrossCount(g, northLayer, southLayer) { - // Sort all of the edges between the north and south layers by their position - // in the north layer and then the south. Map these edges to the position of - // their head in the south layer. - var southPos = lodash_es_zipObject( - southLayer, - map/* default */.A(southLayer, function (v, i) { - return i; - }) - ); - var southEntries = flatten/* default */.A( - map/* default */.A(northLayer, function (v) { - return lodash_es_sortBy( - map/* default */.A(g.outEdges(v), function (e) { - return { pos: southPos[e.w], weight: g.edge(e).weight }; - }), - 'pos' - ); - }) - ); - - // Build the accumulator tree - var firstIndex = 1; - while (firstIndex < southLayer.length) firstIndex <<= 1; - var treeSize = 2 * firstIndex - 1; - firstIndex -= 1; - var tree = map/* default */.A(new Array(treeSize), function () { - return 0; - }); - - // Calculate the weighted crossings - var cc = 0; - forEach/* default */.A( - // @ts-expect-error - southEntries.forEach(function (entry) { - var index = entry.pos + firstIndex; - tree[index] += entry.weight; - var weightSum = 0; - // @ts-expect-error - while (index > 0) { - // @ts-expect-error - if (index % 2) { - weightSum += tree[index + 1]; - } - // @ts-expect-error - index = (index - 1) >> 1; - tree[index] += entry.weight; - } - cc += entry.weight * weightSum; - }) - ); - - return cc; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/init-order.js - - - - -/* - * Assigns an initial order value for each node by performing a DFS search - * starting from nodes in the first rank. Nodes are assigned an order in their - * rank as they are first visited. - * - * This approach comes from Gansner, et al., "A Technique for Drawing Directed - * Graphs." - * - * Returns a layering matrix with an array per layer and each layer sorted by - * the order of its nodes. - */ -function initOrder(g) { - var visited = {}; - var simpleNodes = filter/* default */.A(g.nodes(), function (v) { - return !g.children(v).length; - }); - var maxRank = lodash_es_max( - map/* default */.A(simpleNodes, function (v) { - return g.node(v).rank; - }) - ); - var layers = map/* default */.A(range/* default */.A(maxRank + 1), function () { - return []; - }); - - function dfs(v) { - if (has/* default */.A(visited, v)) return; - visited[v] = true; - var node = g.node(v); - layers[node.rank].push(v); - forEach/* default */.A(g.successors(v), dfs); - } - - var orderedVs = lodash_es_sortBy(simpleNodes, function (v) { - return g.node(v).rank; - }); - forEach/* default */.A(orderedVs, dfs); - - return layers; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/barycenter.js - - - - -function barycenter(g, movable) { - return map/* default */.A(movable, function (v) { - var inV = g.inEdges(v); - if (!inV.length) { - return { v: v }; - } else { - var result = reduce/* default */.A( - inV, - function (acc, e) { - var edge = g.edge(e), - nodeU = g.node(e.v); - return { - sum: acc.sum + edge.weight * nodeU.order, - weight: acc.weight + edge.weight, - }; - }, - { sum: 0, weight: 0 } - ); - - return { - v: v, - barycenter: result.sum / result.weight, - weight: result.weight, - }; - } - }); -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/resolve-conflicts.js - - - - -/* - * Given a list of entries of the form {v, barycenter, weight} and a - * constraint graph this function will resolve any conflicts between the - * constraint graph and the barycenters for the entries. If the barycenters for - * an entry would violate a constraint in the constraint graph then we coalesce - * the nodes in the conflict into a new node that respects the contraint and - * aggregates barycenter and weight information. - * - * This implementation is based on the description in Forster, "A Fast and - * Simple Hueristic for Constrained Two-Level Crossing Reduction," thought it - * differs in some specific details. - * - * Pre-conditions: - * - * 1. Each entry has the form {v, barycenter, weight}, or if the node has - * no barycenter, then {v}. - * - * Returns: - * - * A new list of entries of the form {vs, i, barycenter, weight}. The list - * `vs` may either be a singleton or it may be an aggregation of nodes - * ordered such that they do not violate constraints from the constraint - * graph. The property `i` is the lowest original index of any of the - * elements in `vs`. - */ -function resolveConflicts(entries, cg) { - var mappedEntries = {}; - forEach/* default */.A(entries, function (entry, i) { - var tmp = (mappedEntries[entry.v] = { - indegree: 0, - in: [], - out: [], - vs: [entry.v], - i: i, - }); - if (!isUndefined/* default */.A(entry.barycenter)) { - // @ts-expect-error - tmp.barycenter = entry.barycenter; - // @ts-expect-error - tmp.weight = entry.weight; - } - }); - - forEach/* default */.A(cg.edges(), function (e) { - var entryV = mappedEntries[e.v]; - var entryW = mappedEntries[e.w]; - if (!isUndefined/* default */.A(entryV) && !isUndefined/* default */.A(entryW)) { - entryW.indegree++; - entryV.out.push(mappedEntries[e.w]); - } - }); - - var sourceSet = filter/* default */.A(mappedEntries, function (entry) { - // @ts-expect-error - return !entry.indegree; - }); - - return doResolveConflicts(sourceSet); -} - -function doResolveConflicts(sourceSet) { - var entries = []; - - function handleIn(vEntry) { - return function (uEntry) { - if (uEntry.merged) { - return; - } - if ( - isUndefined/* default */.A(uEntry.barycenter) || - isUndefined/* default */.A(vEntry.barycenter) || - uEntry.barycenter >= vEntry.barycenter - ) { - mergeEntries(vEntry, uEntry); - } - }; - } - - function handleOut(vEntry) { - return function (wEntry) { - wEntry['in'].push(vEntry); - if (--wEntry.indegree === 0) { - sourceSet.push(wEntry); - } - }; - } - - while (sourceSet.length) { - var entry = sourceSet.pop(); - entries.push(entry); - forEach/* default */.A(entry['in'].reverse(), handleIn(entry)); - forEach/* default */.A(entry.out, handleOut(entry)); - } - - return map/* default */.A( - filter/* default */.A(entries, function (entry) { - return !entry.merged; - }), - function (entry) { - return pick/* default */.A(entry, ['vs', 'i', 'barycenter', 'weight']); - } - ); -} - -function mergeEntries(target, source) { - var sum = 0; - var weight = 0; - - if (target.weight) { - sum += target.barycenter * target.weight; - weight += target.weight; - } - - if (source.weight) { - sum += source.barycenter * source.weight; - weight += source.weight; - } - - target.vs = source.vs.concat(target.vs); - target.barycenter = sum / weight; - target.weight = weight; - target.i = Math.min(source.i, target.i); - source.merged = true; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/sort.js - - - - - -function sort(entries, biasRight) { - var parts = partition(entries, function (entry) { - return has/* default */.A(entry, 'barycenter'); - }); - var sortable = parts.lhs, - unsortable = lodash_es_sortBy(parts.rhs, function (entry) { - return -entry.i; - }), - vs = [], - sum = 0, - weight = 0, - vsIndex = 0; - - sortable.sort(compareWithBias(!!biasRight)); - - vsIndex = consumeUnsortable(vs, unsortable, vsIndex); - - forEach/* default */.A(sortable, function (entry) { - vsIndex += entry.vs.length; - vs.push(entry.vs); - sum += entry.barycenter * entry.weight; - weight += entry.weight; - vsIndex = consumeUnsortable(vs, unsortable, vsIndex); - }); - - var result = { vs: flatten/* default */.A(vs) }; - if (weight) { - result.barycenter = sum / weight; - result.weight = weight; - } - return result; -} - -function consumeUnsortable(vs, unsortable, index) { - var last; - while (unsortable.length && (last = lodash_es_last(unsortable)).i <= index) { - unsortable.pop(); - vs.push(last.vs); - index++; - } - return index; -} - -function compareWithBias(bias) { - return function (entryV, entryW) { - if (entryV.barycenter < entryW.barycenter) { - return -1; - } else if (entryV.barycenter > entryW.barycenter) { - return 1; - } - - return !bias ? entryV.i - entryW.i : entryW.i - entryV.i; - }; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/sort-subgraph.js - - - - - - - -function sortSubgraph(g, v, cg, biasRight) { - var movable = g.children(v); - var node = g.node(v); - var bl = node ? node.borderLeft : undefined; - var br = node ? node.borderRight : undefined; - var subgraphs = {}; - - if (bl) { - movable = filter/* default */.A(movable, function (w) { - return w !== bl && w !== br; - }); - } - - var barycenters = barycenter(g, movable); - forEach/* default */.A(barycenters, function (entry) { - if (g.children(entry.v).length) { - var subgraphResult = sortSubgraph(g, entry.v, cg, biasRight); - subgraphs[entry.v] = subgraphResult; - if (has/* default */.A(subgraphResult, 'barycenter')) { - mergeBarycenters(entry, subgraphResult); - } - } - }); - - var entries = resolveConflicts(barycenters, cg); - expandSubgraphs(entries, subgraphs); - - var result = sort(entries, biasRight); - - if (bl) { - result.vs = flatten/* default */.A([bl, result.vs, br]); - if (g.predecessors(bl).length) { - var blPred = g.node(g.predecessors(bl)[0]), - brPred = g.node(g.predecessors(br)[0]); - if (!has/* default */.A(result, 'barycenter')) { - result.barycenter = 0; - result.weight = 0; - } - result.barycenter = - (result.barycenter * result.weight + blPred.order + brPred.order) / (result.weight + 2); - result.weight += 2; - } - } - - return result; -} - -function expandSubgraphs(entries, subgraphs) { - forEach/* default */.A(entries, function (entry) { - entry.vs = flatten/* default */.A( - entry.vs.map(function (v) { - if (subgraphs[v]) { - return subgraphs[v].vs; - } - return v; - }) - ); - }); -} - -function mergeBarycenters(target, other) { - if (!isUndefined/* default */.A(target.barycenter)) { - target.barycenter = - (target.barycenter * target.weight + other.barycenter * other.weight) / - (target.weight + other.weight); - target.weight += other.weight; - } else { - target.barycenter = other.barycenter; - target.weight = other.weight; - } -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/index.js - - - - - - - - - - - -/* - * Applies heuristics to minimize edge crossings in the graph and sets the best - * order solution as an order attribute on each node. - * - * Pre-conditions: - * - * 1. Graph must be DAG - * 2. Graph nodes must be objects with a "rank" attribute - * 3. Graph edges must have the "weight" attribute - * - * Post-conditions: - * - * 1. Graph nodes will have an "order" attribute based on the results of the - * algorithm. - */ -function order(g) { - var maxRank = util_maxRank(g), - downLayerGraphs = buildLayerGraphs(g, range/* default */.A(1, maxRank + 1), 'inEdges'), - upLayerGraphs = buildLayerGraphs(g, range/* default */.A(maxRank - 1, -1, -1), 'outEdges'); - - var layering = initOrder(g); - assignOrder(g, layering); - - var bestCC = Number.POSITIVE_INFINITY, - best; - - for (var i = 0, lastBest = 0; lastBest < 4; ++i, ++lastBest) { - sweepLayerGraphs(i % 2 ? downLayerGraphs : upLayerGraphs, i % 4 >= 2); - - layering = buildLayerMatrix(g); - var cc = crossCount(g, layering); - if (cc < bestCC) { - lastBest = 0; - best = lodash_es_cloneDeep(layering); - bestCC = cc; - } - } - - assignOrder(g, best); -} - -function buildLayerGraphs(g, ranks, relationship) { - return map/* default */.A(ranks, function (rank) { - return buildLayerGraph(g, rank, relationship); - }); -} - -function sweepLayerGraphs(layerGraphs, biasRight) { - var cg = new graphlib/* Graph */.T(); - forEach/* default */.A(layerGraphs, function (lg) { - var root = lg.graph().root; - var sorted = sortSubgraph(lg, root, cg, biasRight); - forEach/* default */.A(sorted.vs, function (v, i) { - lg.node(v).order = i; - }); - addSubgraphConstraints(lg, cg, sorted.vs); - }); -} - -function assignOrder(g, layering) { - forEach/* default */.A(layering, function (layer) { - forEach/* default */.A(layer, function (v, i) { - g.node(v).order = i; - }); - }); -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/parent-dummy-chains.js - - - - -function parentDummyChains(g) { - var postorderNums = parent_dummy_chains_postorder(g); - - forEach/* default */.A(g.graph().dummyChains, function (v) { - var node = g.node(v); - var edgeObj = node.edgeObj; - var pathData = findPath(g, postorderNums, edgeObj.v, edgeObj.w); - var path = pathData.path; - var lca = pathData.lca; - var pathIdx = 0; - var pathV = path[pathIdx]; - var ascending = true; - - while (v !== edgeObj.w) { - node = g.node(v); - - if (ascending) { - while ((pathV = path[pathIdx]) !== lca && g.node(pathV).maxRank < node.rank) { - pathIdx++; - } - - if (pathV === lca) { - ascending = false; - } - } - - if (!ascending) { - while ( - pathIdx < path.length - 1 && - g.node((pathV = path[pathIdx + 1])).minRank <= node.rank - ) { - pathIdx++; - } - pathV = path[pathIdx]; - } - - g.setParent(v, pathV); - v = g.successors(v)[0]; - } - }); -} - -// Find a path from v to w through the lowest common ancestor (LCA). Return the -// full path and the LCA. -function findPath(g, postorderNums, v, w) { - var vPath = []; - var wPath = []; - var low = Math.min(postorderNums[v].low, postorderNums[w].low); - var lim = Math.max(postorderNums[v].lim, postorderNums[w].lim); - var parent; - var lca; - - // Traverse up from v to find the LCA - parent = v; - do { - parent = g.parent(parent); - vPath.push(parent); - } while (parent && (postorderNums[parent].low > low || lim > postorderNums[parent].lim)); - lca = parent; - - // Traverse from w to LCA - parent = w; - while ((parent = g.parent(parent)) !== lca) { - wPath.push(parent); - } - - return { path: vPath.concat(wPath.reverse()), lca: lca }; -} - -function parent_dummy_chains_postorder(g) { - var result = {}; - var lim = 0; - - function dfs(v) { - var low = lim; - forEach/* default */.A(g.children(v), dfs); - result[v] = { low: low, lim: lim++ }; - } - forEach/* default */.A(g.children(), dfs); - - return result; -} - -// EXTERNAL MODULE: ./node_modules/lodash-es/_castFunction.js -var _castFunction = __webpack_require__(99922); -;// CONCATENATED MODULE: ./node_modules/lodash-es/forOwn.js - - - -/** - * Iterates over own enumerable string keyed properties of an object and - * invokes `iteratee` for each property. The iteratee is invoked with three - * arguments: (value, key, object). Iteratee functions may exit iteration - * early by explicitly returning `false`. - * - * @static - * @memberOf _ - * @since 0.3.0 - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Object} Returns `object`. - * @see _.forOwnRight - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.forOwn(new Foo, function(value, key) { - * console.log(key); - * }); - * // => Logs 'a' then 'b' (iteration order is not guaranteed). - */ -function forOwn(object, iteratee) { - return object && (0,_baseForOwn/* default */.A)(object, (0,_castFunction/* default */.A)(iteratee)); -} - -/* harmony default export */ const lodash_es_forOwn = (forOwn); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFor.js + 1 modules -var _baseFor = __webpack_require__(4574); -// EXTERNAL MODULE: ./node_modules/lodash-es/keysIn.js + 2 modules -var keysIn = __webpack_require__(55615); -;// CONCATENATED MODULE: ./node_modules/lodash-es/forIn.js - - - - -/** - * Iterates over own and inherited enumerable string keyed properties of an - * object and invokes `iteratee` for each property. The iteratee is invoked - * with three arguments: (value, key, object). Iteratee functions may exit - * iteration early by explicitly returning `false`. - * - * @static - * @memberOf _ - * @since 0.3.0 - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Object} Returns `object`. - * @see _.forInRight - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.forIn(new Foo, function(value, key) { - * console.log(key); - * }); - * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed). - */ -function forIn(object, iteratee) { - return object == null - ? object - : (0,_baseFor/* default */.A)(object, (0,_castFunction/* default */.A)(iteratee), keysIn/* default */.A); -} - -/* harmony default export */ const lodash_es_forIn = (forIn); - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/position/bk.js - - - - -/* - * This module provides coordinate assignment based on Brandes and Köpf, "Fast - * and Simple Horizontal Coordinate Assignment." - */ - - - -/* - * Marks all edges in the graph with a type-1 conflict with the "type1Conflict" - * property. A type-1 conflict is one where a non-inner segment crosses an - * inner segment. An inner segment is an edge with both incident nodes marked - * with the "dummy" property. - * - * This algorithm scans layer by layer, starting with the second, for type-1 - * conflicts between the current layer and the previous layer. For each layer - * it scans the nodes from left to right until it reaches one that is incident - * on an inner segment. It then scans predecessors to determine if they have - * edges that cross that inner segment. At the end a final scan is done for all - * nodes on the current rank to see if they cross the last visited inner - * segment. - * - * This algorithm (safely) assumes that a dummy node will only be incident on a - * single node in the layers being scanned. - */ -function findType1Conflicts(g, layering) { - var conflicts = {}; - - function visitLayer(prevLayer, layer) { - var // last visited node in the previous layer that is incident on an inner - // segment. - k0 = 0, - // Tracks the last node in this layer scanned for crossings with a type-1 - // segment. - scanPos = 0, - prevLayerLength = prevLayer.length, - lastNode = lodash_es_last(layer); - - forEach/* default */.A(layer, function (v, i) { - var w = findOtherInnerSegmentNode(g, v), - k1 = w ? g.node(w).order : prevLayerLength; - - if (w || v === lastNode) { - forEach/* default */.A(layer.slice(scanPos, i + 1), function (scanNode) { - forEach/* default */.A(g.predecessors(scanNode), function (u) { - var uLabel = g.node(u), - uPos = uLabel.order; - if ((uPos < k0 || k1 < uPos) && !(uLabel.dummy && g.node(scanNode).dummy)) { - addConflict(conflicts, u, scanNode); - } - }); - }); - // @ts-expect-error - scanPos = i + 1; - k0 = k1; - } - }); - - return layer; - } - - reduce/* default */.A(layering, visitLayer); - return conflicts; -} - -function findType2Conflicts(g, layering) { - var conflicts = {}; - - function scan(south, southPos, southEnd, prevNorthBorder, nextNorthBorder) { - var v; - forEach/* default */.A(range/* default */.A(southPos, southEnd), function (i) { - v = south[i]; - if (g.node(v).dummy) { - forEach/* default */.A(g.predecessors(v), function (u) { - var uNode = g.node(u); - if (uNode.dummy && (uNode.order < prevNorthBorder || uNode.order > nextNorthBorder)) { - addConflict(conflicts, u, v); - } - }); - } - }); - } - - function visitLayer(north, south) { - var prevNorthPos = -1, - nextNorthPos, - southPos = 0; - - forEach/* default */.A(south, function (v, southLookahead) { - if (g.node(v).dummy === 'border') { - var predecessors = g.predecessors(v); - if (predecessors.length) { - nextNorthPos = g.node(predecessors[0]).order; - scan(south, southPos, southLookahead, prevNorthPos, nextNorthPos); - // @ts-expect-error - southPos = southLookahead; - prevNorthPos = nextNorthPos; - } - } - scan(south, southPos, south.length, nextNorthPos, north.length); - }); - - return south; - } - - reduce/* default */.A(layering, visitLayer); - return conflicts; -} - -function findOtherInnerSegmentNode(g, v) { - if (g.node(v).dummy) { - return lodash_es_find(g.predecessors(v), function (u) { - return g.node(u).dummy; - }); - } -} - -function addConflict(conflicts, v, w) { - if (v > w) { - var tmp = v; - v = w; - w = tmp; - } - - var conflictsV = conflicts[v]; - if (!conflictsV) { - conflicts[v] = conflictsV = {}; - } - conflictsV[w] = true; -} - -function hasConflict(conflicts, v, w) { - if (v > w) { - var tmp = v; - v = w; - w = tmp; - } - return has/* default */.A(conflicts[v], w); -} - -/* - * Try to align nodes into vertical "blocks" where possible. This algorithm - * attempts to align a node with one of its median neighbors. If the edge - * connecting a neighbor is a type-1 conflict then we ignore that possibility. - * If a previous node has already formed a block with a node after the node - * we're trying to form a block with, we also ignore that possibility - our - * blocks would be split in that scenario. - */ -function verticalAlignment(g, layering, conflicts, neighborFn) { - var root = {}, - align = {}, - pos = {}; - - // We cache the position here based on the layering because the graph and - // layering may be out of sync. The layering matrix is manipulated to - // generate different extreme alignments. - forEach/* default */.A(layering, function (layer) { - forEach/* default */.A(layer, function (v, order) { - root[v] = v; - align[v] = v; - pos[v] = order; - }); - }); - - forEach/* default */.A(layering, function (layer) { - var prevIdx = -1; - forEach/* default */.A(layer, function (v) { - var ws = neighborFn(v); - if (ws.length) { - ws = lodash_es_sortBy(ws, function (w) { - return pos[w]; - }); - var mp = (ws.length - 1) / 2; - for (var i = Math.floor(mp), il = Math.ceil(mp); i <= il; ++i) { - var w = ws[i]; - if (align[v] === v && prevIdx < pos[w] && !hasConflict(conflicts, v, w)) { - align[w] = v; - align[v] = root[v] = root[w]; - prevIdx = pos[w]; - } - } - } - }); - }); - - return { root: root, align: align }; -} - -function horizontalCompaction(g, layering, root, align, reverseSep) { - // This portion of the algorithm differs from BK due to a number of problems. - // Instead of their algorithm we construct a new block graph and do two - // sweeps. The first sweep places blocks with the smallest possible - // coordinates. The second sweep removes unused space by moving blocks to the - // greatest coordinates without violating separation. - var xs = {}, - blockG = buildBlockGraph(g, layering, root, reverseSep), - borderType = reverseSep ? 'borderLeft' : 'borderRight'; - - function iterate(setXsFunc, nextNodesFunc) { - var stack = blockG.nodes(); - var elem = stack.pop(); - var visited = {}; - while (elem) { - if (visited[elem]) { - setXsFunc(elem); - } else { - visited[elem] = true; - stack.push(elem); - stack = stack.concat(nextNodesFunc(elem)); - } - - elem = stack.pop(); - } - } - - // First pass, assign smallest coordinates - function pass1(elem) { - xs[elem] = blockG.inEdges(elem).reduce(function (acc, e) { - return Math.max(acc, xs[e.v] + blockG.edge(e)); - }, 0); - } - - // Second pass, assign greatest coordinates - function pass2(elem) { - var min = blockG.outEdges(elem).reduce(function (acc, e) { - return Math.min(acc, xs[e.w] - blockG.edge(e)); - }, Number.POSITIVE_INFINITY); - - var node = g.node(elem); - if (min !== Number.POSITIVE_INFINITY && node.borderType !== borderType) { - xs[elem] = Math.max(xs[elem], min); - } - } - - iterate(pass1, blockG.predecessors.bind(blockG)); - iterate(pass2, blockG.successors.bind(blockG)); - - // Assign x coordinates to all nodes - forEach/* default */.A(align, function (v) { - xs[v] = xs[root[v]]; - }); - - return xs; -} - -function buildBlockGraph(g, layering, root, reverseSep) { - var blockGraph = new graphlib/* Graph */.T(), - graphLabel = g.graph(), - sepFn = sep(graphLabel.nodesep, graphLabel.edgesep, reverseSep); - - forEach/* default */.A(layering, function (layer) { - var u; - forEach/* default */.A(layer, function (v) { - var vRoot = root[v]; - blockGraph.setNode(vRoot); - if (u) { - var uRoot = root[u], - prevMax = blockGraph.edge(uRoot, vRoot); - blockGraph.setEdge(uRoot, vRoot, Math.max(sepFn(g, v, u), prevMax || 0)); - } - u = v; - }); - }); - - return blockGraph; -} - -/* - * Returns the alignment that has the smallest width of the given alignments. - */ -function findSmallestWidthAlignment(g, xss) { - return lodash_es_minBy(values/* default */.A(xss), function (xs) { - var max = Number.NEGATIVE_INFINITY; - var min = Number.POSITIVE_INFINITY; - - lodash_es_forIn(xs, function (x, v) { - var halfWidth = width(g, v) / 2; - - max = Math.max(x + halfWidth, max); - min = Math.min(x - halfWidth, min); - }); - - return max - min; - }); -} - -/* - * Align the coordinates of each of the layout alignments such that - * left-biased alignments have their minimum coordinate at the same point as - * the minimum coordinate of the smallest width alignment and right-biased - * alignments have their maximum coordinate at the same point as the maximum - * coordinate of the smallest width alignment. - */ -function alignCoordinates(xss, alignTo) { - var alignToVals = values/* default */.A(alignTo), - alignToMin = lodash_es_min(alignToVals), - alignToMax = lodash_es_max(alignToVals); - - forEach/* default */.A(['u', 'd'], function (vert) { - forEach/* default */.A(['l', 'r'], function (horiz) { - var alignment = vert + horiz, - xs = xss[alignment], - delta; - if (xs === alignTo) return; - - var xsVals = values/* default */.A(xs); - delta = horiz === 'l' ? alignToMin - lodash_es_min(xsVals) : alignToMax - lodash_es_max(xsVals); - - if (delta) { - xss[alignment] = lodash_es_mapValues(xs, function (x) { - return x + delta; - }); - } - }); - }); -} - -function balance(xss, align) { - return lodash_es_mapValues(xss.ul, function (ignore, v) { - if (align) { - return xss[align.toLowerCase()][v]; - } else { - var xs = lodash_es_sortBy(map/* default */.A(xss, v)); - return (xs[1] + xs[2]) / 2; - } - }); -} - -function positionX(g) { - var layering = buildLayerMatrix(g); - var conflicts = merge/* default */.A(findType1Conflicts(g, layering), findType2Conflicts(g, layering)); - - var xss = {}; - var adjustedLayering; - forEach/* default */.A(['u', 'd'], function (vert) { - adjustedLayering = vert === 'u' ? layering : values/* default */.A(layering).reverse(); - forEach/* default */.A(['l', 'r'], function (horiz) { - if (horiz === 'r') { - adjustedLayering = map/* default */.A(adjustedLayering, function (inner) { - return values/* default */.A(inner).reverse(); - }); - } - - var neighborFn = (vert === 'u' ? g.predecessors : g.successors).bind(g); - var align = verticalAlignment(g, adjustedLayering, conflicts, neighborFn); - var xs = horizontalCompaction(g, adjustedLayering, align.root, align.align, horiz === 'r'); - if (horiz === 'r') { - xs = lodash_es_mapValues(xs, function (x) { - return -x; - }); - } - xss[vert + horiz] = xs; - }); - }); - - var smallestWidth = findSmallestWidthAlignment(g, xss); - alignCoordinates(xss, smallestWidth); - return balance(xss, g.graph().align); -} - -function sep(nodeSep, edgeSep, reverseSep) { - return function (g, v, w) { - var vLabel = g.node(v); - var wLabel = g.node(w); - var sum = 0; - var delta; - - sum += vLabel.width / 2; - if (has/* default */.A(vLabel, 'labelpos')) { - switch (vLabel.labelpos.toLowerCase()) { - case 'l': - delta = -vLabel.width / 2; - break; - case 'r': - delta = vLabel.width / 2; - break; - } - } - if (delta) { - sum += reverseSep ? delta : -delta; - } - delta = 0; - - sum += (vLabel.dummy ? edgeSep : nodeSep) / 2; - sum += (wLabel.dummy ? edgeSep : nodeSep) / 2; - - sum += wLabel.width / 2; - if (has/* default */.A(wLabel, 'labelpos')) { - switch (wLabel.labelpos.toLowerCase()) { - case 'l': - delta = wLabel.width / 2; - break; - case 'r': - delta = -wLabel.width / 2; - break; - } - } - if (delta) { - sum += reverseSep ? delta : -delta; - } - delta = 0; - - return sum; - }; -} - -function width(g, v) { - return g.node(v).width; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/position/index.js - - - - - - -function position(g) { - g = asNonCompoundGraph(g); - - positionY(g); - lodash_es_forOwn(positionX(g), function (x, v) { - g.node(v).x = x; - }); -} - -function positionY(g) { - var layering = buildLayerMatrix(g); - var rankSep = g.graph().ranksep; - var prevY = 0; - forEach/* default */.A(layering, function (layer) { - var maxHeight = lodash_es_max( - map/* default */.A(layer, function (v) { - return g.node(v).height; - }) - ); - forEach/* default */.A(layer, function (v) { - g.node(v).y = prevY + maxHeight / 2; - }); - prevY += maxHeight + rankSep; - }); -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/layout.js - - - - - - - - - - - - - - - -function layout(g, opts) { - var time = opts && opts.debugTiming ? util_time : notime; - time('layout', function () { - var layoutGraph = time(' buildLayoutGraph', function () { - return buildLayoutGraph(g); - }); - time(' runLayout', function () { - runLayout(layoutGraph, time); - }); - time(' updateInputGraph', function () { - updateInputGraph(g, layoutGraph); - }); - }); -} - -function runLayout(g, time) { - time(' makeSpaceForEdgeLabels', function () { - makeSpaceForEdgeLabels(g); - }); - time(' removeSelfEdges', function () { - removeSelfEdges(g); - }); - time(' acyclic', function () { - run(g); - }); - time(' nestingGraph.run', function () { - nesting_graph_run(g); - }); - time(' rank', function () { - rank(asNonCompoundGraph(g)); - }); - time(' injectEdgeLabelProxies', function () { - injectEdgeLabelProxies(g); - }); - time(' removeEmptyRanks', function () { - removeEmptyRanks(g); - }); - time(' nestingGraph.cleanup', function () { - cleanup(g); - }); - time(' normalizeRanks', function () { - normalizeRanks(g); - }); - time(' assignRankMinMax', function () { - assignRankMinMax(g); - }); - time(' removeEdgeLabelProxies', function () { - removeEdgeLabelProxies(g); - }); - time(' normalize.run', function () { - normalize_run(g); - }); - time(' parentDummyChains', function () { - parentDummyChains(g); - }); - time(' addBorderSegments', function () { - addBorderSegments(g); - }); - time(' order', function () { - order(g); - }); - time(' insertSelfEdges', function () { - insertSelfEdges(g); - }); - time(' adjustCoordinateSystem', function () { - adjust(g); - }); - time(' position', function () { - position(g); - }); - time(' positionSelfEdges', function () { - positionSelfEdges(g); - }); - time(' removeBorderNodes', function () { - removeBorderNodes(g); - }); - time(' normalize.undo', function () { - normalize_undo(g); - }); - time(' fixupEdgeLabelCoords', function () { - fixupEdgeLabelCoords(g); - }); - time(' undoCoordinateSystem', function () { - coordinate_system_undo(g); - }); - time(' translateGraph', function () { - translateGraph(g); - }); - time(' assignNodeIntersects', function () { - assignNodeIntersects(g); - }); - time(' reversePoints', function () { - reversePointsForReversedEdges(g); - }); - time(' acyclic.undo', function () { - undo(g); - }); -} - -/* - * Copies final layout information from the layout graph back to the input - * graph. This process only copies whitelisted attributes from the layout graph - * to the input graph, so it serves as a good place to determine what - * attributes can influence layout. - */ -function updateInputGraph(inputGraph, layoutGraph) { - forEach/* default */.A(inputGraph.nodes(), function (v) { - var inputLabel = inputGraph.node(v); - var layoutLabel = layoutGraph.node(v); - - if (inputLabel) { - inputLabel.x = layoutLabel.x; - inputLabel.y = layoutLabel.y; - - if (layoutGraph.children(v).length) { - inputLabel.width = layoutLabel.width; - inputLabel.height = layoutLabel.height; - } - } - }); - - forEach/* default */.A(inputGraph.edges(), function (e) { - var inputLabel = inputGraph.edge(e); - var layoutLabel = layoutGraph.edge(e); - - inputLabel.points = layoutLabel.points; - if (has/* default */.A(layoutLabel, 'x')) { - inputLabel.x = layoutLabel.x; - inputLabel.y = layoutLabel.y; - } - }); - - inputGraph.graph().width = layoutGraph.graph().width; - inputGraph.graph().height = layoutGraph.graph().height; -} - -var graphNumAttrs = ['nodesep', 'edgesep', 'ranksep', 'marginx', 'marginy']; -var graphDefaults = { ranksep: 50, edgesep: 20, nodesep: 50, rankdir: 'tb' }; -var graphAttrs = ['acyclicer', 'ranker', 'rankdir', 'align']; -var nodeNumAttrs = ['width', 'height']; -var nodeDefaults = { width: 0, height: 0 }; -var edgeNumAttrs = ['minlen', 'weight', 'width', 'height', 'labeloffset']; -var edgeDefaults = { - minlen: 1, - weight: 1, - width: 0, - height: 0, - labeloffset: 10, - labelpos: 'r', -}; -var edgeAttrs = ['labelpos']; - -/* - * Constructs a new graph from the input graph, which can be used for layout. - * This process copies only whitelisted attributes from the input graph to the - * layout graph. Thus this function serves as a good place to determine what - * attributes can influence layout. - */ -function buildLayoutGraph(inputGraph) { - var g = new graphlib/* Graph */.T({ multigraph: true, compound: true }); - var graph = canonicalize(inputGraph.graph()); - - g.setGraph( - merge/* default */.A({}, graphDefaults, selectNumberAttrs(graph, graphNumAttrs), pick/* default */.A(graph, graphAttrs)) - ); - - forEach/* default */.A(inputGraph.nodes(), function (v) { - var node = canonicalize(inputGraph.node(v)); - g.setNode(v, defaults/* default */.A(selectNumberAttrs(node, nodeNumAttrs), nodeDefaults)); - g.setParent(v, inputGraph.parent(v)); - }); - - forEach/* default */.A(inputGraph.edges(), function (e) { - var edge = canonicalize(inputGraph.edge(e)); - g.setEdge( - e, - merge/* default */.A({}, edgeDefaults, selectNumberAttrs(edge, edgeNumAttrs), pick/* default */.A(edge, edgeAttrs)) - ); - }); - - return g; -} - -/* - * This idea comes from the Gansner paper: to account for edge labels in our - * layout we split each rank in half by doubling minlen and halving ranksep. - * Then we can place labels at these mid-points between nodes. - * - * We also add some minimal padding to the width to push the label for the edge - * away from the edge itself a bit. - */ -function makeSpaceForEdgeLabels(g) { - var graph = g.graph(); - graph.ranksep /= 2; - forEach/* default */.A(g.edges(), function (e) { - var edge = g.edge(e); - edge.minlen *= 2; - if (edge.labelpos.toLowerCase() !== 'c') { - if (graph.rankdir === 'TB' || graph.rankdir === 'BT') { - edge.width += edge.labeloffset; - } else { - edge.height += edge.labeloffset; - } - } - }); -} - -/* - * Creates temporary dummy nodes that capture the rank in which each edge's - * label is going to, if it has one of non-zero width and height. We do this - * so that we can safely remove empty ranks while preserving balance for the - * label's position. - */ -function injectEdgeLabelProxies(g) { - forEach/* default */.A(g.edges(), function (e) { - var edge = g.edge(e); - if (edge.width && edge.height) { - var v = g.node(e.v); - var w = g.node(e.w); - var label = { rank: (w.rank - v.rank) / 2 + v.rank, e: e }; - addDummyNode(g, 'edge-proxy', label, '_ep'); - } - }); -} - -function assignRankMinMax(g) { - var maxRank = 0; - forEach/* default */.A(g.nodes(), function (v) { - var node = g.node(v); - if (node.borderTop) { - node.minRank = g.node(node.borderTop).rank; - node.maxRank = g.node(node.borderBottom).rank; - // @ts-expect-error - maxRank = lodash_es_max(maxRank, node.maxRank); - } - }); - g.graph().maxRank = maxRank; -} - -function removeEdgeLabelProxies(g) { - forEach/* default */.A(g.nodes(), function (v) { - var node = g.node(v); - if (node.dummy === 'edge-proxy') { - g.edge(node.e).labelRank = node.rank; - g.removeNode(v); - } - }); -} - -function translateGraph(g) { - var minX = Number.POSITIVE_INFINITY; - var maxX = 0; - var minY = Number.POSITIVE_INFINITY; - var maxY = 0; - var graphLabel = g.graph(); - var marginX = graphLabel.marginx || 0; - var marginY = graphLabel.marginy || 0; - - function getExtremes(attrs) { - var x = attrs.x; - var y = attrs.y; - var w = attrs.width; - var h = attrs.height; - minX = Math.min(minX, x - w / 2); - maxX = Math.max(maxX, x + w / 2); - minY = Math.min(minY, y - h / 2); - maxY = Math.max(maxY, y + h / 2); - } - - forEach/* default */.A(g.nodes(), function (v) { - getExtremes(g.node(v)); - }); - forEach/* default */.A(g.edges(), function (e) { - var edge = g.edge(e); - if (has/* default */.A(edge, 'x')) { - getExtremes(edge); - } - }); - - minX -= marginX; - minY -= marginY; - - forEach/* default */.A(g.nodes(), function (v) { - var node = g.node(v); - node.x -= minX; - node.y -= minY; - }); - - forEach/* default */.A(g.edges(), function (e) { - var edge = g.edge(e); - forEach/* default */.A(edge.points, function (p) { - p.x -= minX; - p.y -= minY; - }); - if (has/* default */.A(edge, 'x')) { - edge.x -= minX; - } - if (has/* default */.A(edge, 'y')) { - edge.y -= minY; - } - }); - - graphLabel.width = maxX - minX + marginX; - graphLabel.height = maxY - minY + marginY; -} - -function assignNodeIntersects(g) { - forEach/* default */.A(g.edges(), function (e) { - var edge = g.edge(e); - var nodeV = g.node(e.v); - var nodeW = g.node(e.w); - var p1, p2; - if (!edge.points) { - edge.points = []; - p1 = nodeW; - p2 = nodeV; - } else { - p1 = edge.points[0]; - p2 = edge.points[edge.points.length - 1]; - } - edge.points.unshift(intersectRect(nodeV, p1)); - edge.points.push(intersectRect(nodeW, p2)); - }); -} - -function fixupEdgeLabelCoords(g) { - forEach/* default */.A(g.edges(), function (e) { - var edge = g.edge(e); - if (has/* default */.A(edge, 'x')) { - if (edge.labelpos === 'l' || edge.labelpos === 'r') { - edge.width -= edge.labeloffset; - } - switch (edge.labelpos) { - case 'l': - edge.x -= edge.width / 2 + edge.labeloffset; - break; - case 'r': - edge.x += edge.width / 2 + edge.labeloffset; - break; - } - } - }); -} - -function reversePointsForReversedEdges(g) { - forEach/* default */.A(g.edges(), function (e) { - var edge = g.edge(e); - if (edge.reversed) { - edge.points.reverse(); - } - }); -} - -function removeBorderNodes(g) { - forEach/* default */.A(g.nodes(), function (v) { - if (g.children(v).length) { - var node = g.node(v); - var t = g.node(node.borderTop); - var b = g.node(node.borderBottom); - var l = g.node(lodash_es_last(node.borderLeft)); - var r = g.node(lodash_es_last(node.borderRight)); - - node.width = Math.abs(r.x - l.x); - node.height = Math.abs(b.y - t.y); - node.x = l.x + node.width / 2; - node.y = t.y + node.height / 2; - } - }); - - forEach/* default */.A(g.nodes(), function (v) { - if (g.node(v).dummy === 'border') { - g.removeNode(v); - } - }); -} - -function removeSelfEdges(g) { - forEach/* default */.A(g.edges(), function (e) { - if (e.v === e.w) { - var node = g.node(e.v); - if (!node.selfEdges) { - node.selfEdges = []; - } - node.selfEdges.push({ e: e, label: g.edge(e) }); - g.removeEdge(e); - } - }); -} - -function insertSelfEdges(g) { - var layers = buildLayerMatrix(g); - forEach/* default */.A(layers, function (layer) { - var orderShift = 0; - forEach/* default */.A(layer, function (v, i) { - var node = g.node(v); - node.order = i + orderShift; - forEach/* default */.A(node.selfEdges, function (selfEdge) { - addDummyNode( - g, - 'selfedge', - { - width: selfEdge.label.width, - height: selfEdge.label.height, - rank: node.rank, - order: i + ++orderShift, - e: selfEdge.e, - label: selfEdge.label, - }, - '_se' - ); - }); - delete node.selfEdges; - }); - }); -} - -function positionSelfEdges(g) { - forEach/* default */.A(g.nodes(), function (v) { - var node = g.node(v); - if (node.dummy === 'selfedge') { - var selfNode = g.node(node.e.v); - var x = selfNode.x + selfNode.width / 2; - var y = selfNode.y; - var dx = node.x - x; - var dy = selfNode.height / 2; - g.setEdge(node.e, node.label); - g.removeNode(v); - node.label.points = [ - { x: x + (2 * dx) / 3, y: y - dy }, - { x: x + (5 * dx) / 6, y: y - dy }, - { x: x + dx, y: y }, - { x: x + (5 * dx) / 6, y: y + dy }, - { x: x + (2 * dx) / 3, y: y + dy }, - ]; - node.label.x = node.x; - node.label.y = node.y; - } - }); -} - -function selectNumberAttrs(obj, attrs) { - return lodash_es_mapValues(pick/* default */.A(obj, attrs), Number); -} - -function canonicalize(attrs) { - var newAttrs = {}; - forEach/* default */.A(attrs, function (v, k) { - newAttrs[k.toLowerCase()] = v; - }); - return newAttrs; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/index.js - - - - - - - - -/***/ }), - -/***/ 73046: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - T: () => (/* binding */ Graph) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/has.js + 1 modules -var has = __webpack_require__(48585); -// EXTERNAL MODULE: ./node_modules/lodash-es/constant.js -var constant = __webpack_require__(39142); -// EXTERNAL MODULE: ./node_modules/lodash-es/isFunction.js -var isFunction = __webpack_require__(89610); -// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js -var keys = __webpack_require__(27422); -// EXTERNAL MODULE: ./node_modules/lodash-es/filter.js + 1 modules -var filter = __webpack_require__(11662); -// EXTERNAL MODULE: ./node_modules/lodash-es/isEmpty.js -var isEmpty = __webpack_require__(66401); -// EXTERNAL MODULE: ./node_modules/lodash-es/forEach.js -var forEach = __webpack_require__(8058); -// EXTERNAL MODULE: ./node_modules/lodash-es/isUndefined.js -var isUndefined = __webpack_require__(69592); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFlatten.js + 1 modules -var _baseFlatten = __webpack_require__(13588); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseRest.js -var _baseRest = __webpack_require__(24326); -// EXTERNAL MODULE: ./node_modules/lodash-es/_SetCache.js + 2 modules -var _SetCache = __webpack_require__(62062); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFindIndex.js -var _baseFindIndex = __webpack_require__(25707); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsNaN.js -/** - * The base implementation of `_.isNaN` without support for number objects. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. - */ -function baseIsNaN(value) { - return value !== value; -} - -/* harmony default export */ const _baseIsNaN = (baseIsNaN); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_strictIndexOf.js -/** - * A specialized version of `_.indexOf` which performs strict equality - * comparisons of values, i.e. `===`. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} fromIndex The index to search from. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function strictIndexOf(array, value, fromIndex) { - var index = fromIndex - 1, - length = array.length; - - while (++index < length) { - if (array[index] === value) { - return index; - } - } - return -1; -} - -/* harmony default export */ const _strictIndexOf = (strictIndexOf); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIndexOf.js - - - - -/** - * The base implementation of `_.indexOf` without `fromIndex` bounds checks. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} fromIndex The index to search from. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function baseIndexOf(array, value, fromIndex) { - return value === value - ? _strictIndexOf(array, value, fromIndex) - : (0,_baseFindIndex/* default */.A)(array, _baseIsNaN, fromIndex); -} - -/* harmony default export */ const _baseIndexOf = (baseIndexOf); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_arrayIncludes.js - - -/** - * A specialized version of `_.includes` for arrays without support for - * specifying an index to search from. - * - * @private - * @param {Array} [array] The array to inspect. - * @param {*} target The value to search for. - * @returns {boolean} Returns `true` if `target` is found, else `false`. - */ -function arrayIncludes(array, value) { - var length = array == null ? 0 : array.length; - return !!length && _baseIndexOf(array, value, 0) > -1; -} - -/* harmony default export */ const _arrayIncludes = (arrayIncludes); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_arrayIncludesWith.js -/** - * This function is like `arrayIncludes` except that it accepts a comparator. - * - * @private - * @param {Array} [array] The array to inspect. - * @param {*} target The value to search for. - * @param {Function} comparator The comparator invoked per element. - * @returns {boolean} Returns `true` if `target` is found, else `false`. - */ -function arrayIncludesWith(array, value, comparator) { - var index = -1, - length = array == null ? 0 : array.length; - - while (++index < length) { - if (comparator(value, array[index])) { - return true; - } - } - return false; -} - -/* harmony default export */ const _arrayIncludesWith = (arrayIncludesWith); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_cacheHas.js -var _cacheHas = __webpack_require__(64099); -// EXTERNAL MODULE: ./node_modules/lodash-es/_Set.js -var _Set = __webpack_require__(39857); -;// CONCATENATED MODULE: ./node_modules/lodash-es/noop.js -/** - * This method returns `undefined`. - * - * @static - * @memberOf _ - * @since 2.3.0 - * @category Util - * @example - * - * _.times(2, _.noop); - * // => [undefined, undefined] - */ -function noop() { - // No operation performed. -} - -/* harmony default export */ const lodash_es_noop = (noop); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_setToArray.js -var _setToArray = __webpack_require__(29959); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_createSet.js - - - - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0; - -/** - * Creates a set object of `values`. - * - * @private - * @param {Array} values The values to add to the set. - * @returns {Object} Returns the new set. - */ -var createSet = !(_Set/* default */.A && (1 / (0,_setToArray/* default */.A)(new _Set/* default */.A([,-0]))[1]) == INFINITY) ? lodash_es_noop : function(values) { - return new _Set/* default */.A(values); -}; - -/* harmony default export */ const _createSet = (createSet); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseUniq.js - - - - - - - -/** Used as the size to enable large array optimizations. */ -var LARGE_ARRAY_SIZE = 200; - -/** - * The base implementation of `_.uniqBy` without support for iteratee shorthands. - * - * @private - * @param {Array} array The array to inspect. - * @param {Function} [iteratee] The iteratee invoked per element. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new duplicate free array. - */ -function baseUniq(array, iteratee, comparator) { - var index = -1, - includes = _arrayIncludes, - length = array.length, - isCommon = true, - result = [], - seen = result; - - if (comparator) { - isCommon = false; - includes = _arrayIncludesWith; - } - else if (length >= LARGE_ARRAY_SIZE) { - var set = iteratee ? null : _createSet(array); - if (set) { - return (0,_setToArray/* default */.A)(set); - } - isCommon = false; - includes = _cacheHas/* default */.A; - seen = new _SetCache/* default */.A; - } - else { - seen = iteratee ? [] : result; - } - outer: - while (++index < length) { - var value = array[index], - computed = iteratee ? iteratee(value) : value; - - value = (comparator || value !== 0) ? value : 0; - if (isCommon && computed === computed) { - var seenIndex = seen.length; - while (seenIndex--) { - if (seen[seenIndex] === computed) { - continue outer; - } - } - if (iteratee) { - seen.push(computed); - } - result.push(value); - } - else if (!includes(seen, computed, comparator)) { - if (seen !== result) { - seen.push(computed); - } - result.push(value); - } - } - return result; -} - -/* harmony default export */ const _baseUniq = (baseUniq); - -// EXTERNAL MODULE: ./node_modules/lodash-es/isArrayLikeObject.js -var isArrayLikeObject = __webpack_require__(53533); -;// CONCATENATED MODULE: ./node_modules/lodash-es/union.js - - - - - -/** - * Creates an array of unique values, in order, from all given arrays using - * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @returns {Array} Returns the new array of combined values. - * @example - * - * _.union([2], [1, 2]); - * // => [2, 1] - */ -var union = (0,_baseRest/* default */.A)(function(arrays) { - return _baseUniq((0,_baseFlatten/* default */.A)(arrays, 1, isArrayLikeObject/* default */.A, true)); -}); - -/* harmony default export */ const lodash_es_union = (union); - -// EXTERNAL MODULE: ./node_modules/lodash-es/values.js + 1 modules -var values = __webpack_require__(38207); -// EXTERNAL MODULE: ./node_modules/lodash-es/reduce.js + 2 modules -var reduce = __webpack_require__(89463); -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/graph.js - - -var DEFAULT_EDGE_NAME = '\x00'; -var GRAPH_NODE = '\x00'; -var EDGE_KEY_DELIM = '\x01'; - -// Implementation notes: -// -// * Node id query functions should return string ids for the nodes -// * Edge id query functions should return an "edgeObj", edge object, that is -// composed of enough information to uniquely identify an edge: {v, w, name}. -// * Internally we use an "edgeId", a stringified form of the edgeObj, to -// reference edges. This is because we need a performant way to look these -// edges up and, object properties, which have string keys, are the closest -// we're going to get to a performant hashtable in JavaScript. - -// Implementation notes: -// -// * Node id query functions should return string ids for the nodes -// * Edge id query functions should return an "edgeObj", edge object, that is -// composed of enough information to uniquely identify an edge: {v, w, name}. -// * Internally we use an "edgeId", a stringified form of the edgeObj, to -// reference edges. This is because we need a performant way to look these -// edges up and, object properties, which have string keys, are the closest -// we're going to get to a performant hashtable in JavaScript. -class Graph { - constructor(opts = {}) { - this._isDirected = has/* default */.A(opts, 'directed') ? opts.directed : true; - this._isMultigraph = has/* default */.A(opts, 'multigraph') ? opts.multigraph : false; - this._isCompound = has/* default */.A(opts, 'compound') ? opts.compound : false; - - // Label for the graph itself - this._label = undefined; - - // Defaults to be set when creating a new node - this._defaultNodeLabelFn = constant/* default */.A(undefined); - - // Defaults to be set when creating a new edge - this._defaultEdgeLabelFn = constant/* default */.A(undefined); - - // v -> label - this._nodes = {}; - - if (this._isCompound) { - // v -> parent - this._parent = {}; - - // v -> children - this._children = {}; - this._children[GRAPH_NODE] = {}; - } - - // v -> edgeObj - this._in = {}; - - // u -> v -> Number - this._preds = {}; - - // v -> edgeObj - this._out = {}; - - // v -> w -> Number - this._sucs = {}; - - // e -> edgeObj - this._edgeObjs = {}; - - // e -> label - this._edgeLabels = {}; - } - /* === Graph functions ========= */ - isDirected() { - return this._isDirected; - } - isMultigraph() { - return this._isMultigraph; - } - isCompound() { - return this._isCompound; - } - setGraph(label) { - this._label = label; - return this; - } - graph() { - return this._label; - } - /* === Node functions ========== */ - setDefaultNodeLabel(newDefault) { - if (!isFunction/* default */.A(newDefault)) { - newDefault = constant/* default */.A(newDefault); - } - this._defaultNodeLabelFn = newDefault; - return this; - } - nodeCount() { - return this._nodeCount; - } - nodes() { - return keys/* default */.A(this._nodes); - } - sources() { - var self = this; - return filter/* default */.A(this.nodes(), function (v) { - return isEmpty/* default */.A(self._in[v]); - }); - } - sinks() { - var self = this; - return filter/* default */.A(this.nodes(), function (v) { - return isEmpty/* default */.A(self._out[v]); - }); - } - setNodes(vs, value) { - var args = arguments; - var self = this; - forEach/* default */.A(vs, function (v) { - if (args.length > 1) { - self.setNode(v, value); - } else { - self.setNode(v); - } - }); - return this; - } - setNode(v, value) { - if (has/* default */.A(this._nodes, v)) { - if (arguments.length > 1) { - this._nodes[v] = value; - } - return this; - } - - // @ts-expect-error - this._nodes[v] = arguments.length > 1 ? value : this._defaultNodeLabelFn(v); - if (this._isCompound) { - this._parent[v] = GRAPH_NODE; - this._children[v] = {}; - this._children[GRAPH_NODE][v] = true; - } - this._in[v] = {}; - this._preds[v] = {}; - this._out[v] = {}; - this._sucs[v] = {}; - ++this._nodeCount; - return this; - } - node(v) { - return this._nodes[v]; - } - hasNode(v) { - return has/* default */.A(this._nodes, v); - } - removeNode(v) { - var self = this; - if (has/* default */.A(this._nodes, v)) { - var removeEdge = function (e) { - self.removeEdge(self._edgeObjs[e]); - }; - delete this._nodes[v]; - if (this._isCompound) { - this._removeFromParentsChildList(v); - delete this._parent[v]; - forEach/* default */.A(this.children(v), function (child) { - self.setParent(child); - }); - delete this._children[v]; - } - forEach/* default */.A(keys/* default */.A(this._in[v]), removeEdge); - delete this._in[v]; - delete this._preds[v]; - forEach/* default */.A(keys/* default */.A(this._out[v]), removeEdge); - delete this._out[v]; - delete this._sucs[v]; - --this._nodeCount; - } - return this; - } - setParent(v, parent) { - if (!this._isCompound) { - throw new Error('Cannot set parent in a non-compound graph'); - } - - if (isUndefined/* default */.A(parent)) { - parent = GRAPH_NODE; - } else { - // Coerce parent to string - parent += ''; - for (var ancestor = parent; !isUndefined/* default */.A(ancestor); ancestor = this.parent(ancestor)) { - if (ancestor === v) { - throw new Error('Setting ' + parent + ' as parent of ' + v + ' would create a cycle'); - } - } - - this.setNode(parent); - } - - this.setNode(v); - this._removeFromParentsChildList(v); - this._parent[v] = parent; - this._children[parent][v] = true; - return this; - } - _removeFromParentsChildList(v) { - delete this._children[this._parent[v]][v]; - } - parent(v) { - if (this._isCompound) { - var parent = this._parent[v]; - if (parent !== GRAPH_NODE) { - return parent; - } - } - } - children(v) { - if (isUndefined/* default */.A(v)) { - v = GRAPH_NODE; - } - - if (this._isCompound) { - var children = this._children[v]; - if (children) { - return keys/* default */.A(children); - } - } else if (v === GRAPH_NODE) { - return this.nodes(); - } else if (this.hasNode(v)) { - return []; - } - } - predecessors(v) { - var predsV = this._preds[v]; - if (predsV) { - return keys/* default */.A(predsV); - } - } - successors(v) { - var sucsV = this._sucs[v]; - if (sucsV) { - return keys/* default */.A(sucsV); - } - } - neighbors(v) { - var preds = this.predecessors(v); - if (preds) { - return lodash_es_union(preds, this.successors(v)); - } - } - isLeaf(v) { - var neighbors; - if (this.isDirected()) { - neighbors = this.successors(v); - } else { - neighbors = this.neighbors(v); - } - return neighbors.length === 0; - } - filterNodes(filter) { - // @ts-expect-error - var copy = new this.constructor({ - directed: this._isDirected, - multigraph: this._isMultigraph, - compound: this._isCompound, - }); - - copy.setGraph(this.graph()); - - var self = this; - forEach/* default */.A(this._nodes, function (value, v) { - if (filter(v)) { - copy.setNode(v, value); - } - }); - - forEach/* default */.A(this._edgeObjs, function (e) { - // @ts-expect-error - if (copy.hasNode(e.v) && copy.hasNode(e.w)) { - copy.setEdge(e, self.edge(e)); - } - }); - - var parents = {}; - function findParent(v) { - var parent = self.parent(v); - if (parent === undefined || copy.hasNode(parent)) { - parents[v] = parent; - return parent; - } else if (parent in parents) { - return parents[parent]; - } else { - return findParent(parent); - } - } - - if (this._isCompound) { - forEach/* default */.A(copy.nodes(), function (v) { - copy.setParent(v, findParent(v)); - }); - } - - return copy; - } - /* === Edge functions ========== */ - setDefaultEdgeLabel(newDefault) { - if (!isFunction/* default */.A(newDefault)) { - newDefault = constant/* default */.A(newDefault); - } - this._defaultEdgeLabelFn = newDefault; - return this; - } - edgeCount() { - return this._edgeCount; - } - edges() { - return values/* default */.A(this._edgeObjs); - } - setPath(vs, value) { - var self = this; - var args = arguments; - reduce/* default */.A(vs, function (v, w) { - if (args.length > 1) { - self.setEdge(v, w, value); - } else { - self.setEdge(v, w); - } - return w; - }); - return this; - } - /* - * setEdge(v, w, [value, [name]]) - * setEdge({ v, w, [name] }, [value]) - */ - setEdge() { - var v, w, name, value; - var valueSpecified = false; - var arg0 = arguments[0]; - - if (typeof arg0 === 'object' && arg0 !== null && 'v' in arg0) { - v = arg0.v; - w = arg0.w; - name = arg0.name; - if (arguments.length === 2) { - value = arguments[1]; - valueSpecified = true; - } - } else { - v = arg0; - w = arguments[1]; - name = arguments[3]; - if (arguments.length > 2) { - value = arguments[2]; - valueSpecified = true; - } - } - - v = '' + v; - w = '' + w; - if (!isUndefined/* default */.A(name)) { - name = '' + name; - } - - var e = edgeArgsToId(this._isDirected, v, w, name); - if (has/* default */.A(this._edgeLabels, e)) { - if (valueSpecified) { - this._edgeLabels[e] = value; - } - return this; - } - - if (!isUndefined/* default */.A(name) && !this._isMultigraph) { - throw new Error('Cannot set a named edge when isMultigraph = false'); - } - - // It didn't exist, so we need to create it. - // First ensure the nodes exist. - this.setNode(v); - this.setNode(w); - - // @ts-expect-error - this._edgeLabels[e] = valueSpecified ? value : this._defaultEdgeLabelFn(v, w, name); - - var edgeObj = edgeArgsToObj(this._isDirected, v, w, name); - // Ensure we add undirected edges in a consistent way. - v = edgeObj.v; - w = edgeObj.w; - - Object.freeze(edgeObj); - this._edgeObjs[e] = edgeObj; - incrementOrInitEntry(this._preds[w], v); - incrementOrInitEntry(this._sucs[v], w); - this._in[w][e] = edgeObj; - this._out[v][e] = edgeObj; - this._edgeCount++; - return this; - } - edge(v, w, name) { - var e = - arguments.length === 1 - ? edgeObjToId(this._isDirected, arguments[0]) - : edgeArgsToId(this._isDirected, v, w, name); - return this._edgeLabels[e]; - } - hasEdge(v, w, name) { - var e = - arguments.length === 1 - ? edgeObjToId(this._isDirected, arguments[0]) - : edgeArgsToId(this._isDirected, v, w, name); - return has/* default */.A(this._edgeLabels, e); - } - removeEdge(v, w, name) { - var e = - arguments.length === 1 - ? edgeObjToId(this._isDirected, arguments[0]) - : edgeArgsToId(this._isDirected, v, w, name); - var edge = this._edgeObjs[e]; - if (edge) { - v = edge.v; - w = edge.w; - delete this._edgeLabels[e]; - delete this._edgeObjs[e]; - decrementOrRemoveEntry(this._preds[w], v); - decrementOrRemoveEntry(this._sucs[v], w); - delete this._in[w][e]; - delete this._out[v][e]; - this._edgeCount--; - } - return this; - } - inEdges(v, u) { - var inV = this._in[v]; - if (inV) { - var edges = values/* default */.A(inV); - if (!u) { - return edges; - } - return filter/* default */.A(edges, function (edge) { - return edge.v === u; - }); - } - } - outEdges(v, w) { - var outV = this._out[v]; - if (outV) { - var edges = values/* default */.A(outV); - if (!w) { - return edges; - } - return filter/* default */.A(edges, function (edge) { - return edge.w === w; - }); - } - } - nodeEdges(v, w) { - var inEdges = this.inEdges(v, w); - if (inEdges) { - return inEdges.concat(this.outEdges(v, w)); - } - } -} - -/* Number of nodes in the graph. Should only be changed by the implementation. */ -Graph.prototype._nodeCount = 0; - -/* Number of edges in the graph. Should only be changed by the implementation. */ -Graph.prototype._edgeCount = 0; - -function incrementOrInitEntry(map, k) { - if (map[k]) { - map[k]++; - } else { - map[k] = 1; - } -} - -function decrementOrRemoveEntry(map, k) { - if (!--map[k]) { - delete map[k]; - } -} - -function edgeArgsToId(isDirected, v_, w_, name) { - var v = '' + v_; - var w = '' + w_; - if (!isDirected && v > w) { - var tmp = v; - v = w; - w = tmp; - } - return v + EDGE_KEY_DELIM + w + EDGE_KEY_DELIM + (isUndefined/* default */.A(name) ? DEFAULT_EDGE_NAME : name); -} - -function edgeArgsToObj(isDirected, v_, w_, name) { - var v = '' + v_; - var w = '' + w_; - if (!isDirected && v > w) { - var tmp = v; - v = w; - w = tmp; - } - var edgeObj = { v: v, w: w }; - if (name) { - edgeObj.name = name; - } - return edgeObj; -} - -function edgeObjToId(isDirected, edgeObj) { - return edgeArgsToId(isDirected, edgeObj.v, edgeObj.w, edgeObj.name); -} - - -/***/ }), - -/***/ 697: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ T: () => (/* reexport safe */ _graph_js__WEBPACK_IMPORTED_MODULE_0__.T) -/* harmony export */ }); -/* unused harmony export version */ -/* harmony import */ var _graph_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(73046); -// Includes only the "core" of graphlib - - - -const version = '2.1.9-pre'; - - - - -/***/ }), - -/***/ 62062: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ _SetCache) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_MapCache.js + 14 modules -var _MapCache = __webpack_require__(29471); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_setCacheAdd.js -/** Used to stand-in for `undefined` hash values. */ -var HASH_UNDEFINED = '__lodash_hash_undefined__'; - -/** - * Adds `value` to the array cache. - * - * @private - * @name add - * @memberOf SetCache - * @alias push - * @param {*} value The value to cache. - * @returns {Object} Returns the cache instance. - */ -function setCacheAdd(value) { - this.__data__.set(value, HASH_UNDEFINED); - return this; -} - -/* harmony default export */ const _setCacheAdd = (setCacheAdd); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_setCacheHas.js -/** - * Checks if `value` is in the array cache. - * - * @private - * @name has - * @memberOf SetCache - * @param {*} value The value to search for. - * @returns {number} Returns `true` if `value` is found, else `false`. - */ -function setCacheHas(value) { - return this.__data__.has(value); -} - -/* harmony default export */ const _setCacheHas = (setCacheHas); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_SetCache.js - - - - -/** - * - * Creates an array cache object to store unique values. - * - * @private - * @constructor - * @param {Array} [values] The values to cache. - */ -function SetCache(values) { - var index = -1, - length = values == null ? 0 : values.length; - - this.__data__ = new _MapCache/* default */.A; - while (++index < length) { - this.add(values[index]); - } -} - -// Add methods to `SetCache`. -SetCache.prototype.add = SetCache.prototype.push = _setCacheAdd; -SetCache.prototype.has = _setCacheHas; - -/* harmony default export */ const _SetCache = (SetCache); - - -/***/ }), - -/***/ 72641: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * A specialized version of `_.forEach` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns `array`. - */ -function arrayEach(array, iteratee) { - var index = -1, - length = array == null ? 0 : array.length; - - while (++index < length) { - if (iteratee(array[index], index, array) === false) { - break; - } - } - return array; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (arrayEach); - - -/***/ }), - -/***/ 2634: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * A specialized version of `_.filter` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {Array} Returns the new filtered array. - */ -function arrayFilter(array, predicate) { - var index = -1, - length = array == null ? 0 : array.length, - resIndex = 0, - result = []; - - while (++index < length) { - var value = array[index]; - if (predicate(value, index, array)) { - result[resIndex++] = value; - } - } - return result; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (arrayFilter); - - -/***/ }), - -/***/ 45572: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * A specialized version of `_.map` for arrays without support for iteratee - * shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the new mapped array. - */ -function arrayMap(array, iteratee) { - var index = -1, - length = array == null ? 0 : array.length, - result = Array(length); - - while (++index < length) { - result[index] = iteratee(array[index], index, array); - } - return result; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (arrayMap); - - -/***/ }), - -/***/ 76912: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * Appends the elements of `values` to `array`. - * - * @private - * @param {Array} array The array to modify. - * @param {Array} values The values to append. - * @returns {Array} Returns `array`. - */ -function arrayPush(array, values) { - var index = -1, - length = values.length, - offset = array.length; - - while (++index < length) { - array[offset + index] = values[index]; - } - return array; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (arrayPush); - - -/***/ }), - -/***/ 91641: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ _baseClone) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_Stack.js + 5 modules -var _Stack = __webpack_require__(11754); -// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayEach.js -var _arrayEach = __webpack_require__(72641); -// EXTERNAL MODULE: ./node_modules/lodash-es/_assignValue.js -var _assignValue = __webpack_require__(52851); -// EXTERNAL MODULE: ./node_modules/lodash-es/_copyObject.js -var _copyObject = __webpack_require__(22031); -// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js -var keys = __webpack_require__(27422); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseAssign.js - - - -/** - * The base implementation of `_.assign` without support for multiple sources - * or `customizer` functions. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @returns {Object} Returns `object`. - */ -function baseAssign(object, source) { - return object && (0,_copyObject/* default */.A)(source, (0,keys/* default */.A)(source), object); -} - -/* harmony default export */ const _baseAssign = (baseAssign); - -// EXTERNAL MODULE: ./node_modules/lodash-es/keysIn.js + 2 modules -var keysIn = __webpack_require__(55615); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseAssignIn.js - - - -/** - * The base implementation of `_.assignIn` without support for multiple sources - * or `customizer` functions. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @returns {Object} Returns `object`. - */ -function baseAssignIn(object, source) { - return object && (0,_copyObject/* default */.A)(source, (0,keysIn/* default */.A)(source), object); -} - -/* harmony default export */ const _baseAssignIn = (baseAssignIn); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_cloneBuffer.js -var _cloneBuffer = __webpack_require__(80154); -// EXTERNAL MODULE: ./node_modules/lodash-es/_copyArray.js -var _copyArray = __webpack_require__(39759); -// EXTERNAL MODULE: ./node_modules/lodash-es/_getSymbols.js -var _getSymbols = __webpack_require__(14792); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_copySymbols.js - - - -/** - * Copies own symbols of `source` to `object`. - * - * @private - * @param {Object} source The object to copy symbols from. - * @param {Object} [object={}] The object to copy symbols to. - * @returns {Object} Returns `object`. - */ -function copySymbols(source, object) { - return (0,_copyObject/* default */.A)(source, (0,_getSymbols/* default */.A)(source), object); -} - -/* harmony default export */ const _copySymbols = (copySymbols); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayPush.js -var _arrayPush = __webpack_require__(76912); -// EXTERNAL MODULE: ./node_modules/lodash-es/_getPrototype.js -var _getPrototype = __webpack_require__(15647); -// EXTERNAL MODULE: ./node_modules/lodash-es/stubArray.js -var stubArray = __webpack_require__(13153); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_getSymbolsIn.js - - - - - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeGetSymbols = Object.getOwnPropertySymbols; - -/** - * Creates an array of the own and inherited enumerable symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of symbols. - */ -var getSymbolsIn = !nativeGetSymbols ? stubArray/* default */.A : function(object) { - var result = []; - while (object) { - (0,_arrayPush/* default */.A)(result, (0,_getSymbols/* default */.A)(object)); - object = (0,_getPrototype/* default */.A)(object); - } - return result; -}; - -/* harmony default export */ const _getSymbolsIn = (getSymbolsIn); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_copySymbolsIn.js - - - -/** - * Copies own and inherited symbols of `source` to `object`. - * - * @private - * @param {Object} source The object to copy symbols from. - * @param {Object} [object={}] The object to copy symbols to. - * @returns {Object} Returns `object`. - */ -function copySymbolsIn(source, object) { - return (0,_copyObject/* default */.A)(source, _getSymbolsIn(source), object); -} - -/* harmony default export */ const _copySymbolsIn = (copySymbolsIn); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_getAllKeys.js -var _getAllKeys = __webpack_require__(19042); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGetAllKeys.js -var _baseGetAllKeys = __webpack_require__(33831); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_getAllKeysIn.js - - - - -/** - * Creates an array of own and inherited enumerable property names and - * symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names and symbols. - */ -function getAllKeysIn(object) { - return (0,_baseGetAllKeys/* default */.A)(object, keysIn/* default */.A, _getSymbolsIn); -} - -/* harmony default export */ const _getAllKeysIn = (getAllKeysIn); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_getTag.js + 3 modules -var _getTag = __webpack_require__(9779); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_initCloneArray.js -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var _initCloneArray_hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Initializes an array clone. - * - * @private - * @param {Array} array The array to clone. - * @returns {Array} Returns the initialized clone. - */ -function initCloneArray(array) { - var length = array.length, - result = new array.constructor(length); - - // Add properties assigned by `RegExp#exec`. - if (length && typeof array[0] == 'string' && _initCloneArray_hasOwnProperty.call(array, 'index')) { - result.index = array.index; - result.input = array.input; - } - return result; -} - -/* harmony default export */ const _initCloneArray = (initCloneArray); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_cloneArrayBuffer.js -var _cloneArrayBuffer = __webpack_require__(90565); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_cloneDataView.js - - -/** - * Creates a clone of `dataView`. - * - * @private - * @param {Object} dataView The data view to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the cloned data view. - */ -function cloneDataView(dataView, isDeep) { - var buffer = isDeep ? (0,_cloneArrayBuffer/* default */.A)(dataView.buffer) : dataView.buffer; - return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); -} - -/* harmony default export */ const _cloneDataView = (cloneDataView); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_cloneRegExp.js -/** Used to match `RegExp` flags from their coerced string values. */ -var reFlags = /\w*$/; - -/** - * Creates a clone of `regexp`. - * - * @private - * @param {Object} regexp The regexp to clone. - * @returns {Object} Returns the cloned regexp. - */ -function cloneRegExp(regexp) { - var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); - result.lastIndex = regexp.lastIndex; - return result; -} - -/* harmony default export */ const _cloneRegExp = (cloneRegExp); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_Symbol.js -var _Symbol = __webpack_require__(241); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_cloneSymbol.js - - -/** Used to convert symbols to primitives and strings. */ -var symbolProto = _Symbol/* default */.A ? _Symbol/* default */.A.prototype : undefined, - symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; - -/** - * Creates a clone of the `symbol` object. - * - * @private - * @param {Object} symbol The symbol object to clone. - * @returns {Object} Returns the cloned symbol object. - */ -function cloneSymbol(symbol) { - return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; -} - -/* harmony default export */ const _cloneSymbol = (cloneSymbol); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_cloneTypedArray.js -var _cloneTypedArray = __webpack_require__(1801); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_initCloneByTag.js - - - - - - -/** `Object#toString` result references. */ -var boolTag = '[object Boolean]', - dateTag = '[object Date]', - mapTag = '[object Map]', - numberTag = '[object Number]', - regexpTag = '[object RegExp]', - setTag = '[object Set]', - stringTag = '[object String]', - symbolTag = '[object Symbol]'; - -var arrayBufferTag = '[object ArrayBuffer]', - dataViewTag = '[object DataView]', - float32Tag = '[object Float32Array]', - float64Tag = '[object Float64Array]', - int8Tag = '[object Int8Array]', - int16Tag = '[object Int16Array]', - int32Tag = '[object Int32Array]', - uint8Tag = '[object Uint8Array]', - uint8ClampedTag = '[object Uint8ClampedArray]', - uint16Tag = '[object Uint16Array]', - uint32Tag = '[object Uint32Array]'; - -/** - * Initializes an object clone based on its `toStringTag`. - * - * **Note:** This function only supports cloning values with tags of - * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`. - * - * @private - * @param {Object} object The object to clone. - * @param {string} tag The `toStringTag` of the object to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the initialized clone. - */ -function initCloneByTag(object, tag, isDeep) { - var Ctor = object.constructor; - switch (tag) { - case arrayBufferTag: - return (0,_cloneArrayBuffer/* default */.A)(object); - - case boolTag: - case dateTag: - return new Ctor(+object); - - case dataViewTag: - return _cloneDataView(object, isDeep); - - case float32Tag: case float64Tag: - case int8Tag: case int16Tag: case int32Tag: - case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: - return (0,_cloneTypedArray/* default */.A)(object, isDeep); - - case mapTag: - return new Ctor; - - case numberTag: - case stringTag: - return new Ctor(object); - - case regexpTag: - return _cloneRegExp(object); - - case setTag: - return new Ctor; - - case symbolTag: - return _cloneSymbol(object); - } -} - -/* harmony default export */ const _initCloneByTag = (initCloneByTag); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_initCloneObject.js + 1 modules -var _initCloneObject = __webpack_require__(18598); -// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js -var isArray = __webpack_require__(92049); -// EXTERNAL MODULE: ./node_modules/lodash-es/isBuffer.js + 1 modules -var isBuffer = __webpack_require__(99912); -// EXTERNAL MODULE: ./node_modules/lodash-es/isObjectLike.js -var isObjectLike = __webpack_require__(53098); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsMap.js - - - -/** `Object#toString` result references. */ -var _baseIsMap_mapTag = '[object Map]'; - -/** - * The base implementation of `_.isMap` without Node.js optimizations. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a map, else `false`. - */ -function baseIsMap(value) { - return (0,isObjectLike/* default */.A)(value) && (0,_getTag/* default */.A)(value) == _baseIsMap_mapTag; -} - -/* harmony default export */ const _baseIsMap = (baseIsMap); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseUnary.js -var _baseUnary = __webpack_require__(52789); -// EXTERNAL MODULE: ./node_modules/lodash-es/_nodeUtil.js -var _nodeUtil = __webpack_require__(64841); -;// CONCATENATED MODULE: ./node_modules/lodash-es/isMap.js - - - - -/* Node.js helper references. */ -var nodeIsMap = _nodeUtil/* default */.A && _nodeUtil/* default */.A.isMap; - -/** - * Checks if `value` is classified as a `Map` object. - * - * @static - * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a map, else `false`. - * @example - * - * _.isMap(new Map); - * // => true - * - * _.isMap(new WeakMap); - * // => false - */ -var isMap = nodeIsMap ? (0,_baseUnary/* default */.A)(nodeIsMap) : _baseIsMap; - -/* harmony default export */ const lodash_es_isMap = (isMap); - -// EXTERNAL MODULE: ./node_modules/lodash-es/isObject.js -var isObject = __webpack_require__(23149); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsSet.js - - - -/** `Object#toString` result references. */ -var _baseIsSet_setTag = '[object Set]'; - -/** - * The base implementation of `_.isSet` without Node.js optimizations. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a set, else `false`. - */ -function baseIsSet(value) { - return (0,isObjectLike/* default */.A)(value) && (0,_getTag/* default */.A)(value) == _baseIsSet_setTag; -} - -/* harmony default export */ const _baseIsSet = (baseIsSet); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/isSet.js - - - - -/* Node.js helper references. */ -var nodeIsSet = _nodeUtil/* default */.A && _nodeUtil/* default */.A.isSet; - -/** - * Checks if `value` is classified as a `Set` object. - * - * @static - * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a set, else `false`. - * @example - * - * _.isSet(new Set); - * // => true - * - * _.isSet(new WeakSet); - * // => false - */ -var isSet = nodeIsSet ? (0,_baseUnary/* default */.A)(nodeIsSet) : _baseIsSet; - -/* harmony default export */ const lodash_es_isSet = (isSet); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseClone.js - - - - - - - - - - - - - - - - - - - - - - - -/** Used to compose bitmasks for cloning. */ -var CLONE_DEEP_FLAG = 1, - CLONE_FLAT_FLAG = 2, - CLONE_SYMBOLS_FLAG = 4; - -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - _baseClone_boolTag = '[object Boolean]', - _baseClone_dateTag = '[object Date]', - errorTag = '[object Error]', - funcTag = '[object Function]', - genTag = '[object GeneratorFunction]', - _baseClone_mapTag = '[object Map]', - _baseClone_numberTag = '[object Number]', - objectTag = '[object Object]', - _baseClone_regexpTag = '[object RegExp]', - _baseClone_setTag = '[object Set]', - _baseClone_stringTag = '[object String]', - _baseClone_symbolTag = '[object Symbol]', - weakMapTag = '[object WeakMap]'; - -var _baseClone_arrayBufferTag = '[object ArrayBuffer]', - _baseClone_dataViewTag = '[object DataView]', - _baseClone_float32Tag = '[object Float32Array]', - _baseClone_float64Tag = '[object Float64Array]', - _baseClone_int8Tag = '[object Int8Array]', - _baseClone_int16Tag = '[object Int16Array]', - _baseClone_int32Tag = '[object Int32Array]', - _baseClone_uint8Tag = '[object Uint8Array]', - _baseClone_uint8ClampedTag = '[object Uint8ClampedArray]', - _baseClone_uint16Tag = '[object Uint16Array]', - _baseClone_uint32Tag = '[object Uint32Array]'; - -/** Used to identify `toStringTag` values supported by `_.clone`. */ -var cloneableTags = {}; -cloneableTags[argsTag] = cloneableTags[arrayTag] = -cloneableTags[_baseClone_arrayBufferTag] = cloneableTags[_baseClone_dataViewTag] = -cloneableTags[_baseClone_boolTag] = cloneableTags[_baseClone_dateTag] = -cloneableTags[_baseClone_float32Tag] = cloneableTags[_baseClone_float64Tag] = -cloneableTags[_baseClone_int8Tag] = cloneableTags[_baseClone_int16Tag] = -cloneableTags[_baseClone_int32Tag] = cloneableTags[_baseClone_mapTag] = -cloneableTags[_baseClone_numberTag] = cloneableTags[objectTag] = -cloneableTags[_baseClone_regexpTag] = cloneableTags[_baseClone_setTag] = -cloneableTags[_baseClone_stringTag] = cloneableTags[_baseClone_symbolTag] = -cloneableTags[_baseClone_uint8Tag] = cloneableTags[_baseClone_uint8ClampedTag] = -cloneableTags[_baseClone_uint16Tag] = cloneableTags[_baseClone_uint32Tag] = true; -cloneableTags[errorTag] = cloneableTags[funcTag] = -cloneableTags[weakMapTag] = false; - -/** - * The base implementation of `_.clone` and `_.cloneDeep` which tracks - * traversed objects. - * - * @private - * @param {*} value The value to clone. - * @param {boolean} bitmask The bitmask flags. - * 1 - Deep clone - * 2 - Flatten inherited properties - * 4 - Clone symbols - * @param {Function} [customizer] The function to customize cloning. - * @param {string} [key] The key of `value`. - * @param {Object} [object] The parent object of `value`. - * @param {Object} [stack] Tracks traversed objects and their clone counterparts. - * @returns {*} Returns the cloned value. - */ -function baseClone(value, bitmask, customizer, key, object, stack) { - var result, - isDeep = bitmask & CLONE_DEEP_FLAG, - isFlat = bitmask & CLONE_FLAT_FLAG, - isFull = bitmask & CLONE_SYMBOLS_FLAG; - - if (customizer) { - result = object ? customizer(value, key, object, stack) : customizer(value); - } - if (result !== undefined) { - return result; - } - if (!(0,isObject/* default */.A)(value)) { - return value; - } - var isArr = (0,isArray/* default */.A)(value); - if (isArr) { - result = _initCloneArray(value); - if (!isDeep) { - return (0,_copyArray/* default */.A)(value, result); - } - } else { - var tag = (0,_getTag/* default */.A)(value), - isFunc = tag == funcTag || tag == genTag; - - if ((0,isBuffer/* default */.A)(value)) { - return (0,_cloneBuffer/* default */.A)(value, isDeep); - } - if (tag == objectTag || tag == argsTag || (isFunc && !object)) { - result = (isFlat || isFunc) ? {} : (0,_initCloneObject/* default */.A)(value); - if (!isDeep) { - return isFlat - ? _copySymbolsIn(value, _baseAssignIn(result, value)) - : _copySymbols(value, _baseAssign(result, value)); - } - } else { - if (!cloneableTags[tag]) { - return object ? value : {}; - } - result = _initCloneByTag(value, tag, isDeep); - } - } - // Check for circular references and return its corresponding clone. - stack || (stack = new _Stack/* default */.A); - var stacked = stack.get(value); - if (stacked) { - return stacked; - } - stack.set(value, result); - - if (lodash_es_isSet(value)) { - value.forEach(function(subValue) { - result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack)); - }); - } else if (lodash_es_isMap(value)) { - value.forEach(function(subValue, key) { - result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack)); - }); - } - - var keysFunc = isFull - ? (isFlat ? _getAllKeysIn : _getAllKeys/* default */.A) - : (isFlat ? keysIn/* default */.A : keys/* default */.A); - - var props = isArr ? undefined : keysFunc(value); - (0,_arrayEach/* default */.A)(props || value, function(subValue, key) { - if (props) { - key = subValue; - subValue = value[key]; - } - // Recursively populate clone (susceptible to call stack limits). - (0,_assignValue/* default */.A)(result, key, baseClone(subValue, bitmask, customizer, key, value, stack)); - }); - return result; -} - -/* harmony default export */ const _baseClone = (baseClone); - - -/***/ }), - -/***/ 6240: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ _baseEach) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseForOwn.js -var _baseForOwn = __webpack_require__(79841); -// EXTERNAL MODULE: ./node_modules/lodash-es/isArrayLike.js -var isArrayLike = __webpack_require__(38446); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_createBaseEach.js - - -/** - * Creates a `baseEach` or `baseEachRight` function. - * - * @private - * @param {Function} eachFunc The function to iterate over a collection. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new base function. - */ -function createBaseEach(eachFunc, fromRight) { - return function(collection, iteratee) { - if (collection == null) { - return collection; - } - if (!(0,isArrayLike/* default */.A)(collection)) { - return eachFunc(collection, iteratee); - } - var length = collection.length, - index = fromRight ? length : -1, - iterable = Object(collection); - - while ((fromRight ? index-- : ++index < length)) { - if (iteratee(iterable[index], index, iterable) === false) { - break; - } - } - return collection; - }; -} - -/* harmony default export */ const _createBaseEach = (createBaseEach); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseEach.js - - - -/** - * The base implementation of `_.forEach` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array|Object} Returns `collection`. - */ -var baseEach = _createBaseEach(_baseForOwn/* default */.A); - -/* harmony default export */ const _baseEach = (baseEach); - - -/***/ }), - -/***/ 25707: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * The base implementation of `_.findIndex` and `_.findLastIndex` without - * support for iteratee shorthands. - * - * @private - * @param {Array} array The array to inspect. - * @param {Function} predicate The function invoked per iteration. - * @param {number} fromIndex The index to search from. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function baseFindIndex(array, predicate, fromIndex, fromRight) { - var length = array.length, - index = fromIndex + (fromRight ? 1 : -1); - - while ((fromRight ? index-- : ++index < length)) { - if (predicate(array[index], index, array)) { - return index; - } - } - return -1; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseFindIndex); - - -/***/ }), - -/***/ 13588: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ _baseFlatten) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayPush.js -var _arrayPush = __webpack_require__(76912); -// EXTERNAL MODULE: ./node_modules/lodash-es/_Symbol.js -var _Symbol = __webpack_require__(241); -// EXTERNAL MODULE: ./node_modules/lodash-es/isArguments.js + 1 modules -var isArguments = __webpack_require__(52274); -// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js -var isArray = __webpack_require__(92049); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_isFlattenable.js - - - - -/** Built-in value references. */ -var spreadableSymbol = _Symbol/* default */.A ? _Symbol/* default */.A.isConcatSpreadable : undefined; - -/** - * Checks if `value` is a flattenable `arguments` object or array. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. - */ -function isFlattenable(value) { - return (0,isArray/* default */.A)(value) || (0,isArguments/* default */.A)(value) || - !!(spreadableSymbol && value && value[spreadableSymbol]); -} - -/* harmony default export */ const _isFlattenable = (isFlattenable); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseFlatten.js - - - -/** - * The base implementation of `_.flatten` with support for restricting flattening. - * - * @private - * @param {Array} array The array to flatten. - * @param {number} depth The maximum recursion depth. - * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. - * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. - * @param {Array} [result=[]] The initial result value. - * @returns {Array} Returns the new flattened array. - */ -function baseFlatten(array, depth, predicate, isStrict, result) { - var index = -1, - length = array.length; - - predicate || (predicate = _isFlattenable); - result || (result = []); - - while (++index < length) { - var value = array[index]; - if (depth > 0 && predicate(value)) { - if (depth > 1) { - // Recursively flatten arrays (susceptible to call stack limits). - baseFlatten(value, depth - 1, predicate, isStrict, result); - } else { - (0,_arrayPush/* default */.A)(result, value); - } - } else if (!isStrict) { - result[result.length] = value; - } - } - return result; -} - -/* harmony default export */ const _baseFlatten = (baseFlatten); - - -/***/ }), - -/***/ 79841: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _baseFor_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4574); -/* harmony import */ var _keys_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(27422); - - - -/** - * The base implementation of `_.forOwn` without support for iteratee shorthands. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Object} Returns `object`. - */ -function baseForOwn(object, iteratee) { - return object && (0,_baseFor_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(object, iteratee, _keys_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseForOwn); - - -/***/ }), - -/***/ 66318: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _castPath_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7819); -/* harmony import */ var _toKey_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(30901); - - - -/** - * The base implementation of `_.get` without support for default values. - * - * @private - * @param {Object} object The object to query. - * @param {Array|string} path The path of the property to get. - * @returns {*} Returns the resolved value. - */ -function baseGet(object, path) { - path = (0,_castPath_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(path, object); - - var index = 0, - length = path.length; - - while (object != null && index < length) { - object = object[(0,_toKey_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(path[index++])]; - } - return (index && index == length) ? object : undefined; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseGet); - - -/***/ }), - -/***/ 33831: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _arrayPush_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(76912); -/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(92049); - - - -/** - * The base implementation of `getAllKeys` and `getAllKeysIn` which uses - * `keysFunc` and `symbolsFunc` to get the enumerable property names and - * symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @param {Function} keysFunc The function to get the keys of `object`. - * @param {Function} symbolsFunc The function to get the symbols of `object`. - * @returns {Array} Returns the array of property names and symbols. - */ -function baseGetAllKeys(object, keysFunc, symbolsFunc) { - var result = keysFunc(object); - return (0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(object) ? result : (0,_arrayPush_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(result, symbolsFunc(object)); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseGetAllKeys); - - -/***/ }), - -/***/ 49574: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ _baseIteratee) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_Stack.js + 5 modules -var _Stack = __webpack_require__(11754); -// EXTERNAL MODULE: ./node_modules/lodash-es/_SetCache.js + 2 modules -var _SetCache = __webpack_require__(62062); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_arraySome.js -/** - * A specialized version of `_.some` for arrays without support for iteratee - * shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {boolean} Returns `true` if any element passes the predicate check, - * else `false`. - */ -function arraySome(array, predicate) { - var index = -1, - length = array == null ? 0 : array.length; - - while (++index < length) { - if (predicate(array[index], index, array)) { - return true; - } - } - return false; -} - -/* harmony default export */ const _arraySome = (arraySome); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_cacheHas.js -var _cacheHas = __webpack_require__(64099); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_equalArrays.js - - - - -/** Used to compose bitmasks for value comparisons. */ -var COMPARE_PARTIAL_FLAG = 1, - COMPARE_UNORDERED_FLAG = 2; - -/** - * A specialized version of `baseIsEqualDeep` for arrays with support for - * partial deep comparisons. - * - * @private - * @param {Array} array The array to compare. - * @param {Array} other The other array to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} stack Tracks traversed `array` and `other` objects. - * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. - */ -function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { - var isPartial = bitmask & COMPARE_PARTIAL_FLAG, - arrLength = array.length, - othLength = other.length; - - if (arrLength != othLength && !(isPartial && othLength > arrLength)) { - return false; - } - // Check that cyclic values are equal. - var arrStacked = stack.get(array); - var othStacked = stack.get(other); - if (arrStacked && othStacked) { - return arrStacked == other && othStacked == array; - } - var index = -1, - result = true, - seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new _SetCache/* default */.A : undefined; - - stack.set(array, other); - stack.set(other, array); - - // Ignore non-index properties. - while (++index < arrLength) { - var arrValue = array[index], - othValue = other[index]; - - if (customizer) { - var compared = isPartial - ? customizer(othValue, arrValue, index, other, array, stack) - : customizer(arrValue, othValue, index, array, other, stack); - } - if (compared !== undefined) { - if (compared) { - continue; - } - result = false; - break; - } - // Recursively compare arrays (susceptible to call stack limits). - if (seen) { - if (!_arraySome(other, function(othValue, othIndex) { - if (!(0,_cacheHas/* default */.A)(seen, othIndex) && - (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { - return seen.push(othIndex); - } - })) { - result = false; - break; - } - } else if (!( - arrValue === othValue || - equalFunc(arrValue, othValue, bitmask, customizer, stack) - )) { - result = false; - break; - } - } - stack['delete'](array); - stack['delete'](other); - return result; -} - -/* harmony default export */ const _equalArrays = (equalArrays); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_Symbol.js -var _Symbol = __webpack_require__(241); -// EXTERNAL MODULE: ./node_modules/lodash-es/_Uint8Array.js -var _Uint8Array = __webpack_require__(43988); -// EXTERNAL MODULE: ./node_modules/lodash-es/eq.js -var eq = __webpack_require__(66984); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_mapToArray.js -/** - * Converts `map` to its key-value pairs. - * - * @private - * @param {Object} map The map to convert. - * @returns {Array} Returns the key-value pairs. - */ -function mapToArray(map) { - var index = -1, - result = Array(map.size); - - map.forEach(function(value, key) { - result[++index] = [key, value]; - }); - return result; -} - -/* harmony default export */ const _mapToArray = (mapToArray); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_setToArray.js -var _setToArray = __webpack_require__(29959); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_equalByTag.js - - - - - - - -/** Used to compose bitmasks for value comparisons. */ -var _equalByTag_COMPARE_PARTIAL_FLAG = 1, - _equalByTag_COMPARE_UNORDERED_FLAG = 2; - -/** `Object#toString` result references. */ -var boolTag = '[object Boolean]', - dateTag = '[object Date]', - errorTag = '[object Error]', - mapTag = '[object Map]', - numberTag = '[object Number]', - regexpTag = '[object RegExp]', - setTag = '[object Set]', - stringTag = '[object String]', - symbolTag = '[object Symbol]'; - -var arrayBufferTag = '[object ArrayBuffer]', - dataViewTag = '[object DataView]'; - -/** Used to convert symbols to primitives and strings. */ -var symbolProto = _Symbol/* default */.A ? _Symbol/* default */.A.prototype : undefined, - symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; - -/** - * A specialized version of `baseIsEqualDeep` for comparing objects of - * the same `toStringTag`. - * - * **Note:** This function only supports comparing values with tags of - * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {string} tag The `toStringTag` of the objects to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} stack Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ -function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { - switch (tag) { - case dataViewTag: - if ((object.byteLength != other.byteLength) || - (object.byteOffset != other.byteOffset)) { - return false; - } - object = object.buffer; - other = other.buffer; - - case arrayBufferTag: - if ((object.byteLength != other.byteLength) || - !equalFunc(new _Uint8Array/* default */.A(object), new _Uint8Array/* default */.A(other))) { - return false; - } - return true; - - case boolTag: - case dateTag: - case numberTag: - // Coerce booleans to `1` or `0` and dates to milliseconds. - // Invalid dates are coerced to `NaN`. - return (0,eq/* default */.A)(+object, +other); - - case errorTag: - return object.name == other.name && object.message == other.message; - - case regexpTag: - case stringTag: - // Coerce regexes to strings and treat strings, primitives and objects, - // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring - // for more details. - return object == (other + ''); - - case mapTag: - var convert = _mapToArray; - - case setTag: - var isPartial = bitmask & _equalByTag_COMPARE_PARTIAL_FLAG; - convert || (convert = _setToArray/* default */.A); - - if (object.size != other.size && !isPartial) { - return false; - } - // Assume cyclic values are equal. - var stacked = stack.get(object); - if (stacked) { - return stacked == other; - } - bitmask |= _equalByTag_COMPARE_UNORDERED_FLAG; - - // Recursively compare objects (susceptible to call stack limits). - stack.set(object, other); - var result = _equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); - stack['delete'](object); - return result; - - case symbolTag: - if (symbolValueOf) { - return symbolValueOf.call(object) == symbolValueOf.call(other); - } - } - return false; -} - -/* harmony default export */ const _equalByTag = (equalByTag); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_getAllKeys.js -var _getAllKeys = __webpack_require__(19042); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_equalObjects.js - - -/** Used to compose bitmasks for value comparisons. */ -var _equalObjects_COMPARE_PARTIAL_FLAG = 1; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var _equalObjects_hasOwnProperty = objectProto.hasOwnProperty; - -/** - * A specialized version of `baseIsEqualDeep` for objects with support for - * partial deep comparisons. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} stack Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ -function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { - var isPartial = bitmask & _equalObjects_COMPARE_PARTIAL_FLAG, - objProps = (0,_getAllKeys/* default */.A)(object), - objLength = objProps.length, - othProps = (0,_getAllKeys/* default */.A)(other), - othLength = othProps.length; - - if (objLength != othLength && !isPartial) { - return false; - } - var index = objLength; - while (index--) { - var key = objProps[index]; - if (!(isPartial ? key in other : _equalObjects_hasOwnProperty.call(other, key))) { - return false; - } - } - // Check that cyclic values are equal. - var objStacked = stack.get(object); - var othStacked = stack.get(other); - if (objStacked && othStacked) { - return objStacked == other && othStacked == object; - } - var result = true; - stack.set(object, other); - stack.set(other, object); - - var skipCtor = isPartial; - while (++index < objLength) { - key = objProps[index]; - var objValue = object[key], - othValue = other[key]; - - if (customizer) { - var compared = isPartial - ? customizer(othValue, objValue, key, other, object, stack) - : customizer(objValue, othValue, key, object, other, stack); - } - // Recursively compare objects (susceptible to call stack limits). - if (!(compared === undefined - ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) - : compared - )) { - result = false; - break; - } - skipCtor || (skipCtor = key == 'constructor'); - } - if (result && !skipCtor) { - var objCtor = object.constructor, - othCtor = other.constructor; - - // Non `Object` object instances with different constructors are not equal. - if (objCtor != othCtor && - ('constructor' in object && 'constructor' in other) && - !(typeof objCtor == 'function' && objCtor instanceof objCtor && - typeof othCtor == 'function' && othCtor instanceof othCtor)) { - result = false; - } - } - stack['delete'](object); - stack['delete'](other); - return result; -} - -/* harmony default export */ const _equalObjects = (equalObjects); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_getTag.js + 3 modules -var _getTag = __webpack_require__(9779); -// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js -var isArray = __webpack_require__(92049); -// EXTERNAL MODULE: ./node_modules/lodash-es/isBuffer.js + 1 modules -var isBuffer = __webpack_require__(99912); -// EXTERNAL MODULE: ./node_modules/lodash-es/isTypedArray.js + 1 modules -var isTypedArray = __webpack_require__(33858); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsEqualDeep.js - - - - - - - - - -/** Used to compose bitmasks for value comparisons. */ -var _baseIsEqualDeep_COMPARE_PARTIAL_FLAG = 1; - -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - objectTag = '[object Object]'; - -/** Used for built-in method references. */ -var _baseIsEqualDeep_objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var _baseIsEqualDeep_hasOwnProperty = _baseIsEqualDeep_objectProto.hasOwnProperty; - -/** - * A specialized version of `baseIsEqual` for arrays and objects which performs - * deep comparisons and tracks traversed objects enabling objects with circular - * references to be compared. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} [stack] Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ -function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { - var objIsArr = (0,isArray/* default */.A)(object), - othIsArr = (0,isArray/* default */.A)(other), - objTag = objIsArr ? arrayTag : (0,_getTag/* default */.A)(object), - othTag = othIsArr ? arrayTag : (0,_getTag/* default */.A)(other); - - objTag = objTag == argsTag ? objectTag : objTag; - othTag = othTag == argsTag ? objectTag : othTag; - - var objIsObj = objTag == objectTag, - othIsObj = othTag == objectTag, - isSameTag = objTag == othTag; - - if (isSameTag && (0,isBuffer/* default */.A)(object)) { - if (!(0,isBuffer/* default */.A)(other)) { - return false; - } - objIsArr = true; - objIsObj = false; - } - if (isSameTag && !objIsObj) { - stack || (stack = new _Stack/* default */.A); - return (objIsArr || (0,isTypedArray/* default */.A)(object)) - ? _equalArrays(object, other, bitmask, customizer, equalFunc, stack) - : _equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); - } - if (!(bitmask & _baseIsEqualDeep_COMPARE_PARTIAL_FLAG)) { - var objIsWrapped = objIsObj && _baseIsEqualDeep_hasOwnProperty.call(object, '__wrapped__'), - othIsWrapped = othIsObj && _baseIsEqualDeep_hasOwnProperty.call(other, '__wrapped__'); - - if (objIsWrapped || othIsWrapped) { - var objUnwrapped = objIsWrapped ? object.value() : object, - othUnwrapped = othIsWrapped ? other.value() : other; - - stack || (stack = new _Stack/* default */.A); - return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); - } - } - if (!isSameTag) { - return false; - } - stack || (stack = new _Stack/* default */.A); - return _equalObjects(object, other, bitmask, customizer, equalFunc, stack); -} - -/* harmony default export */ const _baseIsEqualDeep = (baseIsEqualDeep); - -// EXTERNAL MODULE: ./node_modules/lodash-es/isObjectLike.js -var isObjectLike = __webpack_require__(53098); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsEqual.js - - - -/** - * The base implementation of `_.isEqual` which supports partial comparisons - * and tracks traversed objects. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @param {boolean} bitmask The bitmask flags. - * 1 - Unordered comparison - * 2 - Partial comparison - * @param {Function} [customizer] The function to customize comparisons. - * @param {Object} [stack] Tracks traversed `value` and `other` objects. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - */ -function baseIsEqual(value, other, bitmask, customizer, stack) { - if (value === other) { - return true; - } - if (value == null || other == null || (!(0,isObjectLike/* default */.A)(value) && !(0,isObjectLike/* default */.A)(other))) { - return value !== value && other !== other; - } - return _baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); -} - -/* harmony default export */ const _baseIsEqual = (baseIsEqual); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsMatch.js - - - -/** Used to compose bitmasks for value comparisons. */ -var _baseIsMatch_COMPARE_PARTIAL_FLAG = 1, - _baseIsMatch_COMPARE_UNORDERED_FLAG = 2; - -/** - * The base implementation of `_.isMatch` without support for iteratee shorthands. - * - * @private - * @param {Object} object The object to inspect. - * @param {Object} source The object of property values to match. - * @param {Array} matchData The property names, values, and compare flags to match. - * @param {Function} [customizer] The function to customize comparisons. - * @returns {boolean} Returns `true` if `object` is a match, else `false`. - */ -function baseIsMatch(object, source, matchData, customizer) { - var index = matchData.length, - length = index, - noCustomizer = !customizer; - - if (object == null) { - return !length; - } - object = Object(object); - while (index--) { - var data = matchData[index]; - if ((noCustomizer && data[2]) - ? data[1] !== object[data[0]] - : !(data[0] in object) - ) { - return false; - } - } - while (++index < length) { - data = matchData[index]; - var key = data[0], - objValue = object[key], - srcValue = data[1]; - - if (noCustomizer && data[2]) { - if (objValue === undefined && !(key in object)) { - return false; - } - } else { - var stack = new _Stack/* default */.A; - if (customizer) { - var result = customizer(objValue, srcValue, key, object, source, stack); - } - if (!(result === undefined - ? _baseIsEqual(srcValue, objValue, _baseIsMatch_COMPARE_PARTIAL_FLAG | _baseIsMatch_COMPARE_UNORDERED_FLAG, customizer, stack) - : result - )) { - return false; - } - } - } - return true; -} - -/* harmony default export */ const _baseIsMatch = (baseIsMatch); - -// EXTERNAL MODULE: ./node_modules/lodash-es/isObject.js -var isObject = __webpack_require__(23149); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_isStrictComparable.js - - -/** - * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` if suitable for strict - * equality comparisons, else `false`. - */ -function isStrictComparable(value) { - return value === value && !(0,isObject/* default */.A)(value); -} - -/* harmony default export */ const _isStrictComparable = (isStrictComparable); - -// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js -var keys = __webpack_require__(27422); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_getMatchData.js - - - -/** - * Gets the property names, values, and compare flags of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the match data of `object`. - */ -function getMatchData(object) { - var result = (0,keys/* default */.A)(object), - length = result.length; - - while (length--) { - var key = result[length], - value = object[key]; - - result[length] = [key, value, _isStrictComparable(value)]; - } - return result; -} - -/* harmony default export */ const _getMatchData = (getMatchData); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_matchesStrictComparable.js -/** - * A specialized version of `matchesProperty` for source values suitable - * for strict equality comparisons, i.e. `===`. - * - * @private - * @param {string} key The key of the property to get. - * @param {*} srcValue The value to match. - * @returns {Function} Returns the new spec function. - */ -function matchesStrictComparable(key, srcValue) { - return function(object) { - if (object == null) { - return false; - } - return object[key] === srcValue && - (srcValue !== undefined || (key in Object(object))); - }; -} - -/* harmony default export */ const _matchesStrictComparable = (matchesStrictComparable); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseMatches.js - - - - -/** - * The base implementation of `_.matches` which doesn't clone `source`. - * - * @private - * @param {Object} source The object of property values to match. - * @returns {Function} Returns the new spec function. - */ -function baseMatches(source) { - var matchData = _getMatchData(source); - if (matchData.length == 1 && matchData[0][2]) { - return _matchesStrictComparable(matchData[0][0], matchData[0][1]); - } - return function(object) { - return object === source || _baseIsMatch(object, source, matchData); - }; -} - -/* harmony default export */ const _baseMatches = (baseMatches); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGet.js -var _baseGet = __webpack_require__(66318); -;// CONCATENATED MODULE: ./node_modules/lodash-es/get.js - - -/** - * Gets the value at `path` of `object`. If the resolved value is - * `undefined`, the `defaultValue` is returned in its place. - * - * @static - * @memberOf _ - * @since 3.7.0 - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path of the property to get. - * @param {*} [defaultValue] The value returned for `undefined` resolved values. - * @returns {*} Returns the resolved value. - * @example - * - * var object = { 'a': [{ 'b': { 'c': 3 } }] }; - * - * _.get(object, 'a[0].b.c'); - * // => 3 - * - * _.get(object, ['a', '0', 'b', 'c']); - * // => 3 - * - * _.get(object, 'a.b.c', 'default'); - * // => 'default' - */ -function get(object, path, defaultValue) { - var result = object == null ? undefined : (0,_baseGet/* default */.A)(object, path); - return result === undefined ? defaultValue : result; -} - -/* harmony default export */ const lodash_es_get = (get); - -// EXTERNAL MODULE: ./node_modules/lodash-es/hasIn.js + 1 modules -var hasIn = __webpack_require__(39188); -// EXTERNAL MODULE: ./node_modules/lodash-es/_isKey.js -var _isKey = __webpack_require__(86586); -// EXTERNAL MODULE: ./node_modules/lodash-es/_toKey.js -var _toKey = __webpack_require__(30901); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseMatchesProperty.js - - - - - - - - -/** Used to compose bitmasks for value comparisons. */ -var _baseMatchesProperty_COMPARE_PARTIAL_FLAG = 1, - _baseMatchesProperty_COMPARE_UNORDERED_FLAG = 2; - -/** - * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. - * - * @private - * @param {string} path The path of the property to get. - * @param {*} srcValue The value to match. - * @returns {Function} Returns the new spec function. - */ -function baseMatchesProperty(path, srcValue) { - if ((0,_isKey/* default */.A)(path) && _isStrictComparable(srcValue)) { - return _matchesStrictComparable((0,_toKey/* default */.A)(path), srcValue); - } - return function(object) { - var objValue = lodash_es_get(object, path); - return (objValue === undefined && objValue === srcValue) - ? (0,hasIn/* default */.A)(object, path) - : _baseIsEqual(srcValue, objValue, _baseMatchesProperty_COMPARE_PARTIAL_FLAG | _baseMatchesProperty_COMPARE_UNORDERED_FLAG); - }; -} - -/* harmony default export */ const _baseMatchesProperty = (baseMatchesProperty); - -// EXTERNAL MODULE: ./node_modules/lodash-es/identity.js -var identity = __webpack_require__(29008); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseProperty.js -var _baseProperty = __webpack_require__(70805); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_basePropertyDeep.js - - -/** - * A specialized version of `baseProperty` which supports deep paths. - * - * @private - * @param {Array|string} path The path of the property to get. - * @returns {Function} Returns the new accessor function. - */ -function basePropertyDeep(path) { - return function(object) { - return (0,_baseGet/* default */.A)(object, path); - }; -} - -/* harmony default export */ const _basePropertyDeep = (basePropertyDeep); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/property.js - - - - - -/** - * Creates a function that returns the value at `path` of a given object. - * - * @static - * @memberOf _ - * @since 2.4.0 - * @category Util - * @param {Array|string} path The path of the property to get. - * @returns {Function} Returns the new accessor function. - * @example - * - * var objects = [ - * { 'a': { 'b': 2 } }, - * { 'a': { 'b': 1 } } - * ]; - * - * _.map(objects, _.property('a.b')); - * // => [2, 1] - * - * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b'); - * // => [1, 2] - */ -function property(path) { - return (0,_isKey/* default */.A)(path) ? (0,_baseProperty/* default */.A)((0,_toKey/* default */.A)(path)) : _basePropertyDeep(path); -} - -/* harmony default export */ const lodash_es_property = (property); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIteratee.js - - - - - - -/** - * The base implementation of `_.iteratee`. - * - * @private - * @param {*} [value=_.identity] The value to convert to an iteratee. - * @returns {Function} Returns the iteratee. - */ -function baseIteratee(value) { - // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. - // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. - if (typeof value == 'function') { - return value; - } - if (value == null) { - return identity/* default */.A; - } - if (typeof value == 'object') { - return (0,isArray/* default */.A)(value) - ? _baseMatchesProperty(value[0], value[1]) - : _baseMatches(value); - } - return lodash_es_property(value); -} - -/* harmony default export */ const _baseIteratee = (baseIteratee); - - -/***/ }), - -/***/ 52568: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _baseEach_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6240); -/* harmony import */ var _isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(38446); - - - -/** - * The base implementation of `_.map` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the new mapped array. - */ -function baseMap(collection, iteratee) { - var index = -1, - result = (0,_isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(collection) ? Array(collection.length) : []; - - (0,_baseEach_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(collection, function(value, key, collection) { - result[++index] = iteratee(value, key, collection); - }); - return result; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseMap); - - -/***/ }), - -/***/ 70805: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * The base implementation of `_.property` without support for deep paths. - * - * @private - * @param {string} key The key of the property to get. - * @returns {Function} Returns the new accessor function. - */ -function baseProperty(key) { - return function(object) { - return object == null ? undefined : object[key]; - }; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseProperty); - - -/***/ }), - -/***/ 64099: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * Checks if a `cache` value for `key` exists. - * - * @private - * @param {Object} cache The cache to query. - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ -function cacheHas(cache, key) { - return cache.has(key); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (cacheHas); - - -/***/ }), - -/***/ 99922: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(29008); - - -/** - * Casts `value` to `identity` if it's not a function. - * - * @private - * @param {*} value The value to inspect. - * @returns {Function} Returns cast function. - */ -function castFunction(value) { - return typeof value == 'function' ? value : _identity_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (castFunction); - - -/***/ }), - -/***/ 7819: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ _castPath) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js -var isArray = __webpack_require__(92049); -// EXTERNAL MODULE: ./node_modules/lodash-es/_isKey.js -var _isKey = __webpack_require__(86586); -// EXTERNAL MODULE: ./node_modules/lodash-es/memoize.js -var memoize = __webpack_require__(46632); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_memoizeCapped.js - - -/** Used as the maximum memoize cache size. */ -var MAX_MEMOIZE_SIZE = 500; - -/** - * A specialized version of `_.memoize` which clears the memoized function's - * cache when it exceeds `MAX_MEMOIZE_SIZE`. - * - * @private - * @param {Function} func The function to have its output memoized. - * @returns {Function} Returns the new memoized function. - */ -function memoizeCapped(func) { - var result = (0,memoize/* default */.A)(func, function(key) { - if (cache.size === MAX_MEMOIZE_SIZE) { - cache.clear(); - } - return key; - }); - - var cache = result.cache; - return result; -} - -/* harmony default export */ const _memoizeCapped = (memoizeCapped); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_stringToPath.js - - -/** Used to match property names within property paths. */ -var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; - -/** Used to match backslashes in property paths. */ -var reEscapeChar = /\\(\\)?/g; - -/** - * Converts `string` to a property path array. - * - * @private - * @param {string} string The string to convert. - * @returns {Array} Returns the property path array. - */ -var stringToPath = _memoizeCapped(function(string) { - var result = []; - if (string.charCodeAt(0) === 46 /* . */) { - result.push(''); - } - string.replace(rePropName, function(match, number, quote, subString) { - result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match)); - }); - return result; -}); - -/* harmony default export */ const _stringToPath = (stringToPath); - -// EXTERNAL MODULE: ./node_modules/lodash-es/toString.js + 1 modules -var lodash_es_toString = __webpack_require__(28894); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_castPath.js - - - - - -/** - * Casts `value` to a path array if it's not one. - * - * @private - * @param {*} value The value to inspect. - * @param {Object} [object] The object to query keys on. - * @returns {Array} Returns the cast property path array. - */ -function castPath(value, object) { - if ((0,isArray/* default */.A)(value)) { - return value; - } - return (0,_isKey/* default */.A)(value, object) ? [value] : _stringToPath((0,lodash_es_toString/* default */.A)(value)); -} - -/* harmony default export */ const _castPath = (castPath); - - -/***/ }), - -/***/ 19042: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _baseGetAllKeys_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(33831); -/* harmony import */ var _getSymbols_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(14792); -/* harmony import */ var _keys_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(27422); - - - - -/** - * Creates an array of own enumerable property names and symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names and symbols. - */ -function getAllKeys(object) { - return (0,_baseGetAllKeys_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(object, _keys_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A, _getSymbols_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (getAllKeys); - - -/***/ }), - -/***/ 14792: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _arrayFilter_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2634); -/* harmony import */ var _stubArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13153); - - - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Built-in value references. */ -var propertyIsEnumerable = objectProto.propertyIsEnumerable; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeGetSymbols = Object.getOwnPropertySymbols; - -/** - * Creates an array of the own enumerable symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of symbols. - */ -var getSymbols = !nativeGetSymbols ? _stubArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A : function(object) { - if (object == null) { - return []; - } - object = Object(object); - return (0,_arrayFilter_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(nativeGetSymbols(object), function(symbol) { - return propertyIsEnumerable.call(object, symbol); - }); -}; - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (getSymbols); - - -/***/ }), - -/***/ 85054: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _castPath_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7819); -/* harmony import */ var _isArguments_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(52274); -/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(92049); -/* harmony import */ var _isIndex_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(25353); -/* harmony import */ var _isLength_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5254); -/* harmony import */ var _toKey_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(30901); - - - - - - - -/** - * Checks if `path` exists on `object`. - * - * @private - * @param {Object} object The object to query. - * @param {Array|string} path The path to check. - * @param {Function} hasFunc The function to check properties. - * @returns {boolean} Returns `true` if `path` exists, else `false`. - */ -function hasPath(object, path, hasFunc) { - path = (0,_castPath_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(path, object); - - var index = -1, - length = path.length, - result = false; - - while (++index < length) { - var key = (0,_toKey_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(path[index]); - if (!(result = object != null && hasFunc(object, key))) { - break; - } - object = object[key]; - } - if (result || ++index != length) { - return result; - } - length = object == null ? 0 : object.length; - return !!length && (0,_isLength_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)(length) && (0,_isIndex_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(key, length) && - ((0,_isArray_js__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .A)(object) || (0,_isArguments_js__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A)(object)); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (hasPath); - - -/***/ }), - -/***/ 86586: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(92049); -/* harmony import */ var _isSymbol_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(61882); - - - -/** Used to match property names within property paths. */ -var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, - reIsPlainProp = /^\w*$/; - -/** - * Checks if `value` is a property name and not a property path. - * - * @private - * @param {*} value The value to check. - * @param {Object} [object] The object to query keys on. - * @returns {boolean} Returns `true` if `value` is a property name, else `false`. - */ -function isKey(value, object) { - if ((0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(value)) { - return false; - } - var type = typeof value; - if (type == 'number' || type == 'symbol' || type == 'boolean' || - value == null || (0,_isSymbol_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(value)) { - return true; - } - return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || - (object != null && value in Object(object)); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isKey); - - -/***/ }), - -/***/ 29959: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * Converts `set` to an array of its values. - * - * @private - * @param {Object} set The set to convert. - * @returns {Array} Returns the values. - */ -function setToArray(set) { - var index = -1, - result = Array(set.size); - - set.forEach(function(value) { - result[++index] = value; - }); - return result; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (setToArray); - - -/***/ }), - -/***/ 30901: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _isSymbol_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(61882); - - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0; - -/** - * Converts `value` to a string key if it's not a string or symbol. - * - * @private - * @param {*} value The value to inspect. - * @returns {string|symbol} Returns the key. - */ -function toKey(value) { - if (typeof value == 'string' || (0,_isSymbol_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(value)) { - return value; - } - var result = (value + ''); - return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (toKey); - - -/***/ }), - -/***/ 23068: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _baseRest_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(24326); -/* harmony import */ var _eq_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(66984); -/* harmony import */ var _isIterateeCall_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6832); -/* harmony import */ var _keysIn_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(55615); - - - - - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Assigns own and inherited enumerable string keyed properties of source - * objects to the destination object for all destination properties that - * resolve to `undefined`. Source objects are applied from left to right. - * Once a property is set, additional values of the same property are ignored. - * - * **Note:** This method mutates `object`. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. - * @see _.defaultsDeep - * @example - * - * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); - * // => { 'a': 1, 'b': 2 } - */ -var defaults = (0,_baseRest_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(function(object, sources) { - object = Object(object); - - var index = -1; - var length = sources.length; - var guard = length > 2 ? sources[2] : undefined; - - if (guard && (0,_isIterateeCall_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(sources[0], sources[1], guard)) { - length = 1; - } - - while (++index < length) { - var source = sources[index]; - var props = (0,_keysIn_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)(source); - var propsIndex = -1; - var propsLength = props.length; - - while (++propsIndex < propsLength) { - var key = props[propsIndex]; - var value = object[key]; - - if (value === undefined || - ((0,_eq_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(value, objectProto[key]) && !hasOwnProperty.call(object, key))) { - object[key] = source[key]; - } - } - } - - return object; -}); - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (defaults); - - -/***/ }), - -/***/ 11662: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ lodash_es_filter) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayFilter.js -var _arrayFilter = __webpack_require__(2634); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseEach.js + 1 modules -var _baseEach = __webpack_require__(6240); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseFilter.js - - -/** - * The base implementation of `_.filter` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {Array} Returns the new filtered array. - */ -function baseFilter(collection, predicate) { - var result = []; - (0,_baseEach/* default */.A)(collection, function(value, index, collection) { - if (predicate(value, index, collection)) { - result.push(value); - } - }); - return result; -} - -/* harmony default export */ const _baseFilter = (baseFilter); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseIteratee.js + 16 modules -var _baseIteratee = __webpack_require__(49574); -// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js -var isArray = __webpack_require__(92049); -;// CONCATENATED MODULE: ./node_modules/lodash-es/filter.js - - - - - -/** - * Iterates over elements of `collection`, returning an array of all elements - * `predicate` returns truthy for. The predicate is invoked with three - * arguments: (value, index|key, collection). - * - * **Note:** Unlike `_.remove`, this method returns a new array. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @returns {Array} Returns the new filtered array. - * @see _.reject - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': true }, - * { 'user': 'fred', 'age': 40, 'active': false } - * ]; - * - * _.filter(users, function(o) { return !o.active; }); - * // => objects for ['fred'] - * - * // The `_.matches` iteratee shorthand. - * _.filter(users, { 'age': 36, 'active': true }); - * // => objects for ['barney'] - * - * // The `_.matchesProperty` iteratee shorthand. - * _.filter(users, ['active', false]); - * // => objects for ['fred'] - * - * // The `_.property` iteratee shorthand. - * _.filter(users, 'active'); - * // => objects for ['barney'] - * - * // Combining several predicates using `_.overEvery` or `_.overSome`. - * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]])); - * // => objects for ['fred', 'barney'] - */ -function filter(collection, predicate) { - var func = (0,isArray/* default */.A)(collection) ? _arrayFilter/* default */.A : _baseFilter; - return func(collection, (0,_baseIteratee/* default */.A)(predicate, 3)); -} - -/* harmony default export */ const lodash_es_filter = (filter); - - -/***/ }), - -/***/ 34098: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _baseFlatten_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13588); - - -/** - * Flattens `array` a single level deep. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to flatten. - * @returns {Array} Returns the new flattened array. - * @example - * - * _.flatten([1, [2, [3, [4]], 5]]); - * // => [1, 2, [3, [4]], 5] - */ -function flatten(array) { - var length = array == null ? 0 : array.length; - return length ? (0,_baseFlatten_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(array, 1) : []; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (flatten); - - -/***/ }), - -/***/ 8058: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _arrayEach_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(72641); -/* harmony import */ var _baseEach_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6240); -/* harmony import */ var _castFunction_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(99922); -/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(92049); - - - - - -/** - * Iterates over elements of `collection` and invokes `iteratee` for each element. - * The iteratee is invoked with three arguments: (value, index|key, collection). - * Iteratee functions may exit iteration early by explicitly returning `false`. - * - * **Note:** As with other "Collections" methods, objects with a "length" - * property are iterated like arrays. To avoid this behavior use `_.forIn` - * or `_.forOwn` for object iteration. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @alias each - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Array|Object} Returns `collection`. - * @see _.forEachRight - * @example - * - * _.forEach([1, 2], function(value) { - * console.log(value); - * }); - * // => Logs `1` then `2`. - * - * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { - * console.log(key); - * }); - * // => Logs 'a' then 'b' (iteration order is not guaranteed). - */ -function forEach(collection, iteratee) { - var func = (0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(collection) ? _arrayEach_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A : _baseEach_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A; - return func(collection, (0,_castFunction_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(iteratee)); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (forEach); - - -/***/ }), - -/***/ 48585: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ lodash_es_has) -}); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseHas.js -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var _baseHas_hasOwnProperty = objectProto.hasOwnProperty; - -/** - * The base implementation of `_.has` without support for deep paths. - * - * @private - * @param {Object} [object] The object to query. - * @param {Array|string} key The key to check. - * @returns {boolean} Returns `true` if `key` exists, else `false`. - */ -function baseHas(object, key) { - return object != null && _baseHas_hasOwnProperty.call(object, key); -} - -/* harmony default export */ const _baseHas = (baseHas); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_hasPath.js -var _hasPath = __webpack_require__(85054); -;// CONCATENATED MODULE: ./node_modules/lodash-es/has.js - - - -/** - * Checks if `path` is a direct property of `object`. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path to check. - * @returns {boolean} Returns `true` if `path` exists, else `false`. - * @example - * - * var object = { 'a': { 'b': 2 } }; - * var other = _.create({ 'a': _.create({ 'b': 2 }) }); - * - * _.has(object, 'a'); - * // => true - * - * _.has(object, 'a.b'); - * // => true - * - * _.has(object, ['a', 'b']); - * // => true - * - * _.has(other, 'a'); - * // => false - */ -function has(object, path) { - return object != null && (0,_hasPath/* default */.A)(object, path, _baseHas); -} - -/* harmony default export */ const lodash_es_has = (has); - - -/***/ }), - -/***/ 39188: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ lodash_es_hasIn) -}); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseHasIn.js -/** - * The base implementation of `_.hasIn` without support for deep paths. - * - * @private - * @param {Object} [object] The object to query. - * @param {Array|string} key The key to check. - * @returns {boolean} Returns `true` if `key` exists, else `false`. - */ -function baseHasIn(object, key) { - return object != null && key in Object(object); -} - -/* harmony default export */ const _baseHasIn = (baseHasIn); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_hasPath.js -var _hasPath = __webpack_require__(85054); -;// CONCATENATED MODULE: ./node_modules/lodash-es/hasIn.js - - - -/** - * Checks if `path` is a direct or inherited property of `object`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path to check. - * @returns {boolean} Returns `true` if `path` exists, else `false`. - * @example - * - * var object = _.create({ 'a': _.create({ 'b': 2 }) }); - * - * _.hasIn(object, 'a'); - * // => true - * - * _.hasIn(object, 'a.b'); - * // => true - * - * _.hasIn(object, ['a', 'b']); - * // => true - * - * _.hasIn(object, 'b'); - * // => false - */ -function hasIn(object, path) { - return object != null && (0,_hasPath/* default */.A)(object, path, _baseHasIn); -} - -/* harmony default export */ const lodash_es_hasIn = (hasIn); - - -/***/ }), - -/***/ 61882: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _baseGetTag_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(88496); -/* harmony import */ var _isObjectLike_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(53098); - - - -/** `Object#toString` result references. */ -var symbolTag = '[object Symbol]'; - -/** - * Checks if `value` is classified as a `Symbol` primitive or object. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. - * @example - * - * _.isSymbol(Symbol.iterator); - * // => true - * - * _.isSymbol('abc'); - * // => false - */ -function isSymbol(value) { - return typeof value == 'symbol' || - ((0,_isObjectLike_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(value) && (0,_baseGetTag_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(value) == symbolTag); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isSymbol); - - -/***/ }), - -/***/ 69592: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * Checks if `value` is `undefined`. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. - * @example - * - * _.isUndefined(void 0); - * // => true - * - * _.isUndefined(null); - * // => false - */ -function isUndefined(value) { - return value === undefined; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isUndefined); - - -/***/ }), - -/***/ 27422: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _arrayLikeKeys_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(83607); -/* harmony import */ var _baseKeys_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(69471); -/* harmony import */ var _isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(38446); - - - - -/** - * Creates an array of the own enumerable property names of `object`. - * - * **Note:** Non-object values are coerced to objects. See the - * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) - * for more details. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.keys(new Foo); - * // => ['a', 'b'] (iteration order is not guaranteed) - * - * _.keys('hi'); - * // => ['0', '1'] - */ -function keys(object) { - return (0,_isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(object) ? (0,_arrayLikeKeys_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(object) : (0,_baseKeys_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)(object); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (keys); - - -/***/ }), - -/***/ 74722: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _arrayMap_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(45572); -/* harmony import */ var _baseIteratee_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(49574); -/* harmony import */ var _baseMap_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(52568); -/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(92049); - - - - - -/** - * Creates an array of values by running each element in `collection` thru - * `iteratee`. The iteratee is invoked with three arguments: - * (value, index|key, collection). - * - * Many lodash methods are guarded to work as iteratees for methods like - * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. - * - * The guarded methods are: - * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, - * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`, - * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`, - * `template`, `trim`, `trimEnd`, `trimStart`, and `words` - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Array} Returns the new mapped array. - * @example - * - * function square(n) { - * return n * n; - * } - * - * _.map([4, 8], square); - * // => [16, 64] - * - * _.map({ 'a': 4, 'b': 8 }, square); - * // => [16, 64] (iteration order is not guaranteed) - * - * var users = [ - * { 'user': 'barney' }, - * { 'user': 'fred' } - * ]; - * - * // The `_.property` iteratee shorthand. - * _.map(users, 'user'); - * // => ['barney', 'fred'] - */ -function map(collection, iteratee) { - var func = (0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(collection) ? _arrayMap_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A : _baseMap_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A; - return func(collection, (0,_baseIteratee_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(iteratee, 3)); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (map); - - -/***/ }), - -/***/ 81942: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ lodash_es_pick) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGet.js -var _baseGet = __webpack_require__(66318); -// EXTERNAL MODULE: ./node_modules/lodash-es/_assignValue.js -var _assignValue = __webpack_require__(52851); -// EXTERNAL MODULE: ./node_modules/lodash-es/_castPath.js + 2 modules -var _castPath = __webpack_require__(7819); -// EXTERNAL MODULE: ./node_modules/lodash-es/_isIndex.js -var _isIndex = __webpack_require__(25353); -// EXTERNAL MODULE: ./node_modules/lodash-es/isObject.js -var isObject = __webpack_require__(23149); -// EXTERNAL MODULE: ./node_modules/lodash-es/_toKey.js -var _toKey = __webpack_require__(30901); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseSet.js - - - - - - -/** - * The base implementation of `_.set`. - * - * @private - * @param {Object} object The object to modify. - * @param {Array|string} path The path of the property to set. - * @param {*} value The value to set. - * @param {Function} [customizer] The function to customize path creation. - * @returns {Object} Returns `object`. - */ -function baseSet(object, path, value, customizer) { - if (!(0,isObject/* default */.A)(object)) { - return object; - } - path = (0,_castPath/* default */.A)(path, object); - - var index = -1, - length = path.length, - lastIndex = length - 1, - nested = object; - - while (nested != null && ++index < length) { - var key = (0,_toKey/* default */.A)(path[index]), - newValue = value; - - if (key === '__proto__' || key === 'constructor' || key === 'prototype') { - return object; - } - - if (index != lastIndex) { - var objValue = nested[key]; - newValue = customizer ? customizer(objValue, key, nested) : undefined; - if (newValue === undefined) { - newValue = (0,isObject/* default */.A)(objValue) - ? objValue - : ((0,_isIndex/* default */.A)(path[index + 1]) ? [] : {}); - } - } - (0,_assignValue/* default */.A)(nested, key, newValue); - nested = nested[key]; - } - return object; -} - -/* harmony default export */ const _baseSet = (baseSet); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_basePickBy.js - - - - -/** - * The base implementation of `_.pickBy` without support for iteratee shorthands. - * - * @private - * @param {Object} object The source object. - * @param {string[]} paths The property paths to pick. - * @param {Function} predicate The function invoked per property. - * @returns {Object} Returns the new object. - */ -function basePickBy(object, paths, predicate) { - var index = -1, - length = paths.length, - result = {}; - - while (++index < length) { - var path = paths[index], - value = (0,_baseGet/* default */.A)(object, path); - - if (predicate(value, path)) { - _baseSet(result, (0,_castPath/* default */.A)(path, object), value); - } - } - return result; -} - -/* harmony default export */ const _basePickBy = (basePickBy); - -// EXTERNAL MODULE: ./node_modules/lodash-es/hasIn.js + 1 modules -var hasIn = __webpack_require__(39188); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_basePick.js - - - -/** - * The base implementation of `_.pick` without support for individual - * property identifiers. - * - * @private - * @param {Object} object The source object. - * @param {string[]} paths The property paths to pick. - * @returns {Object} Returns the new object. - */ -function basePick(object, paths) { - return _basePickBy(object, paths, function(value, path) { - return (0,hasIn/* default */.A)(object, path); - }); -} - -/* harmony default export */ const _basePick = (basePick); - -// EXTERNAL MODULE: ./node_modules/lodash-es/flatten.js -var flatten = __webpack_require__(34098); -// EXTERNAL MODULE: ./node_modules/lodash-es/_overRest.js + 1 modules -var _overRest = __webpack_require__(76875); -// EXTERNAL MODULE: ./node_modules/lodash-es/_setToString.js + 2 modules -var _setToString = __webpack_require__(67525); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_flatRest.js - - - - -/** - * A specialized version of `baseRest` which flattens the rest array. - * - * @private - * @param {Function} func The function to apply a rest parameter to. - * @returns {Function} Returns the new function. - */ -function flatRest(func) { - return (0,_setToString/* default */.A)((0,_overRest/* default */.A)(func, undefined, flatten/* default */.A), func + ''); -} - -/* harmony default export */ const _flatRest = (flatRest); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/pick.js - - - -/** - * Creates an object composed of the picked `object` properties. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The source object. - * @param {...(string|string[])} [paths] The property paths to pick. - * @returns {Object} Returns the new object. - * @example - * - * var object = { 'a': 1, 'b': '2', 'c': 3 }; - * - * _.pick(object, ['a', 'c']); - * // => { 'a': 1, 'c': 3 } - */ -var pick = _flatRest(function(object, paths) { - return object == null ? {} : _basePick(object, paths); -}); - -/* harmony default export */ const lodash_es_pick = (pick); - - -/***/ }), - -/***/ 91395: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ lodash_es_range) -}); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseRange.js -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeCeil = Math.ceil, - nativeMax = Math.max; - -/** - * The base implementation of `_.range` and `_.rangeRight` which doesn't - * coerce arguments. - * - * @private - * @param {number} start The start of the range. - * @param {number} end The end of the range. - * @param {number} step The value to increment or decrement by. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Array} Returns the range of numbers. - */ -function baseRange(start, end, step, fromRight) { - var index = -1, - length = nativeMax(nativeCeil((end - start) / (step || 1)), 0), - result = Array(length); - - while (length--) { - result[fromRight ? length : ++index] = start; - start += step; - } - return result; -} - -/* harmony default export */ const _baseRange = (baseRange); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_isIterateeCall.js -var _isIterateeCall = __webpack_require__(6832); -// EXTERNAL MODULE: ./node_modules/lodash-es/toFinite.js + 3 modules -var toFinite = __webpack_require__(74342); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_createRange.js - - - - -/** - * Creates a `_.range` or `_.rangeRight` function. - * - * @private - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new range function. - */ -function createRange(fromRight) { - return function(start, end, step) { - if (step && typeof step != 'number' && (0,_isIterateeCall/* default */.A)(start, end, step)) { - end = step = undefined; - } - // Ensure the sign of `-0` is preserved. - start = (0,toFinite/* default */.A)(start); - if (end === undefined) { - end = start; - start = 0; - } else { - end = (0,toFinite/* default */.A)(end); - } - step = step === undefined ? (start < end ? 1 : -1) : (0,toFinite/* default */.A)(step); - return _baseRange(start, end, step, fromRight); - }; -} - -/* harmony default export */ const _createRange = (createRange); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/range.js - - -/** - * Creates an array of numbers (positive and/or negative) progressing from - * `start` up to, but not including, `end`. A step of `-1` is used if a negative - * `start` is specified without an `end` or `step`. If `end` is not specified, - * it's set to `start` with `start` then set to `0`. - * - * **Note:** JavaScript follows the IEEE-754 standard for resolving - * floating-point values which can produce unexpected results. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Util - * @param {number} [start=0] The start of the range. - * @param {number} end The end of the range. - * @param {number} [step=1] The value to increment or decrement by. - * @returns {Array} Returns the range of numbers. - * @see _.inRange, _.rangeRight - * @example - * - * _.range(4); - * // => [0, 1, 2, 3] - * - * _.range(-4); - * // => [0, -1, -2, -3] - * - * _.range(1, 5); - * // => [1, 2, 3, 4] - * - * _.range(0, 20, 5); - * // => [0, 5, 10, 15] - * - * _.range(0, -4, -1); - * // => [0, -1, -2, -3] - * - * _.range(1, 4, 0); - * // => [1, 1, 1] - * - * _.range(0); - * // => [] - */ -var range = _createRange(); - -/* harmony default export */ const lodash_es_range = (range); - - -/***/ }), - -/***/ 89463: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ lodash_es_reduce) -}); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_arrayReduce.js -/** - * A specialized version of `_.reduce` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {*} [accumulator] The initial value. - * @param {boolean} [initAccum] Specify using the first element of `array` as - * the initial value. - * @returns {*} Returns the accumulated value. - */ -function arrayReduce(array, iteratee, accumulator, initAccum) { - var index = -1, - length = array == null ? 0 : array.length; - - if (initAccum && length) { - accumulator = array[++index]; - } - while (++index < length) { - accumulator = iteratee(accumulator, array[index], index, array); - } - return accumulator; -} - -/* harmony default export */ const _arrayReduce = (arrayReduce); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseEach.js + 1 modules -var _baseEach = __webpack_require__(6240); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseIteratee.js + 16 modules -var _baseIteratee = __webpack_require__(49574); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseReduce.js -/** - * The base implementation of `_.reduce` and `_.reduceRight`, without support - * for iteratee shorthands, which iterates over `collection` using `eachFunc`. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {*} accumulator The initial value. - * @param {boolean} initAccum Specify using the first or last element of - * `collection` as the initial value. - * @param {Function} eachFunc The function to iterate over `collection`. - * @returns {*} Returns the accumulated value. - */ -function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { - eachFunc(collection, function(value, index, collection) { - accumulator = initAccum - ? (initAccum = false, value) - : iteratee(accumulator, value, index, collection); - }); - return accumulator; -} - -/* harmony default export */ const _baseReduce = (baseReduce); - -// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js -var isArray = __webpack_require__(92049); -;// CONCATENATED MODULE: ./node_modules/lodash-es/reduce.js - - - - - - -/** - * Reduces `collection` to a value which is the accumulated result of running - * each element in `collection` thru `iteratee`, where each successive - * invocation is supplied the return value of the previous. If `accumulator` - * is not given, the first element of `collection` is used as the initial - * value. The iteratee is invoked with four arguments: - * (accumulator, value, index|key, collection). - * - * Many lodash methods are guarded to work as iteratees for methods like - * `_.reduce`, `_.reduceRight`, and `_.transform`. - * - * The guarded methods are: - * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`, - * and `sortBy` - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @param {*} [accumulator] The initial value. - * @returns {*} Returns the accumulated value. - * @see _.reduceRight - * @example - * - * _.reduce([1, 2], function(sum, n) { - * return sum + n; - * }, 0); - * // => 3 - * - * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { - * (result[value] || (result[value] = [])).push(key); - * return result; - * }, {}); - * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed) - */ -function reduce(collection, iteratee, accumulator) { - var func = (0,isArray/* default */.A)(collection) ? _arrayReduce : _baseReduce, - initAccum = arguments.length < 3; - - return func(collection, (0,_baseIteratee/* default */.A)(iteratee, 4), accumulator, initAccum, _baseEach/* default */.A); -} - -/* harmony default export */ const lodash_es_reduce = (reduce); - - -/***/ }), - -/***/ 13153: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * This method returns a new empty array. - * - * @static - * @memberOf _ - * @since 4.13.0 - * @category Util - * @returns {Array} Returns the new empty array. - * @example - * - * var arrays = _.times(2, _.stubArray); - * - * console.log(arrays); - * // => [[], []] - * - * console.log(arrays[0] === arrays[1]); - * // => false - */ -function stubArray() { - return []; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (stubArray); - - -/***/ }), - -/***/ 74342: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ lodash_es_toFinite) -}); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_trimmedEndIndex.js -/** Used to match a single whitespace character. */ -var reWhitespace = /\s/; - -/** - * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace - * character of `string`. - * - * @private - * @param {string} string The string to inspect. - * @returns {number} Returns the index of the last non-whitespace character. - */ -function trimmedEndIndex(string) { - var index = string.length; - - while (index-- && reWhitespace.test(string.charAt(index))) {} - return index; -} - -/* harmony default export */ const _trimmedEndIndex = (trimmedEndIndex); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseTrim.js - - -/** Used to match leading whitespace. */ -var reTrimStart = /^\s+/; - -/** - * The base implementation of `_.trim`. - * - * @private - * @param {string} string The string to trim. - * @returns {string} Returns the trimmed string. - */ -function baseTrim(string) { - return string - ? string.slice(0, _trimmedEndIndex(string) + 1).replace(reTrimStart, '') - : string; -} - -/* harmony default export */ const _baseTrim = (baseTrim); - -// EXTERNAL MODULE: ./node_modules/lodash-es/isObject.js -var isObject = __webpack_require__(23149); -// EXTERNAL MODULE: ./node_modules/lodash-es/isSymbol.js -var isSymbol = __webpack_require__(61882); -;// CONCATENATED MODULE: ./node_modules/lodash-es/toNumber.js - - - - -/** Used as references for various `Number` constants. */ -var NAN = 0 / 0; - -/** Used to detect bad signed hexadecimal string values. */ -var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; - -/** Used to detect binary string values. */ -var reIsBinary = /^0b[01]+$/i; - -/** Used to detect octal string values. */ -var reIsOctal = /^0o[0-7]+$/i; - -/** Built-in method references without a dependency on `root`. */ -var freeParseInt = parseInt; - -/** - * Converts `value` to a number. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to process. - * @returns {number} Returns the number. - * @example - * - * _.toNumber(3.2); - * // => 3.2 - * - * _.toNumber(Number.MIN_VALUE); - * // => 5e-324 - * - * _.toNumber(Infinity); - * // => Infinity - * - * _.toNumber('3.2'); - * // => 3.2 - */ -function toNumber(value) { - if (typeof value == 'number') { - return value; - } - if ((0,isSymbol/* default */.A)(value)) { - return NAN; - } - if ((0,isObject/* default */.A)(value)) { - var other = typeof value.valueOf == 'function' ? value.valueOf() : value; - value = (0,isObject/* default */.A)(other) ? (other + '') : other; - } - if (typeof value != 'string') { - return value === 0 ? value : +value; - } - value = _baseTrim(value); - var isBinary = reIsBinary.test(value); - return (isBinary || reIsOctal.test(value)) - ? freeParseInt(value.slice(2), isBinary ? 2 : 8) - : (reIsBadHex.test(value) ? NAN : +value); -} - -/* harmony default export */ const lodash_es_toNumber = (toNumber); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/toFinite.js - - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0, - MAX_INTEGER = 1.7976931348623157e+308; - -/** - * Converts `value` to a finite number. - * - * @static - * @memberOf _ - * @since 4.12.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {number} Returns the converted number. - * @example - * - * _.toFinite(3.2); - * // => 3.2 - * - * _.toFinite(Number.MIN_VALUE); - * // => 5e-324 - * - * _.toFinite(Infinity); - * // => 1.7976931348623157e+308 - * - * _.toFinite('3.2'); - * // => 3.2 - */ -function toFinite(value) { - if (!value) { - return value === 0 ? value : 0; - } - value = lodash_es_toNumber(value); - if (value === INFINITY || value === -INFINITY) { - var sign = (value < 0 ? -1 : 1); - return sign * MAX_INTEGER; - } - return value === value ? value : 0; -} - -/* harmony default export */ const lodash_es_toFinite = (toFinite); - - -/***/ }), - -/***/ 28894: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ lodash_es_toString) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_Symbol.js -var _Symbol = __webpack_require__(241); -// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayMap.js -var _arrayMap = __webpack_require__(45572); -// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js -var isArray = __webpack_require__(92049); -// EXTERNAL MODULE: ./node_modules/lodash-es/isSymbol.js -var isSymbol = __webpack_require__(61882); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseToString.js - - - - - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0; - -/** Used to convert symbols to primitives and strings. */ -var symbolProto = _Symbol/* default */.A ? _Symbol/* default */.A.prototype : undefined, - symbolToString = symbolProto ? symbolProto.toString : undefined; - -/** - * The base implementation of `_.toString` which doesn't convert nullish - * values to empty strings. - * - * @private - * @param {*} value The value to process. - * @returns {string} Returns the string. - */ -function baseToString(value) { - // Exit early for strings to avoid a performance hit in some environments. - if (typeof value == 'string') { - return value; - } - if ((0,isArray/* default */.A)(value)) { - // Recursively convert values (susceptible to call stack limits). - return (0,_arrayMap/* default */.A)(value, baseToString) + ''; - } - if ((0,isSymbol/* default */.A)(value)) { - return symbolToString ? symbolToString.call(value) : ''; - } - var result = (value + ''); - return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; -} - -/* harmony default export */ const _baseToString = (baseToString); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/toString.js - - -/** - * Converts `value` to a string. An empty string is returned for `null` - * and `undefined` values. The sign of `-0` is preserved. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {string} Returns the converted string. - * @example - * - * _.toString(null); - * // => '' - * - * _.toString(-0); - * // => '-0' - * - * _.toString([1, 2, 3]); - * // => '1,2,3' - */ -function toString_toString(value) { - return value == null ? '' : _baseToString(value); -} - -/* harmony default export */ const lodash_es_toString = (toString_toString); - - -/***/ }), - -/***/ 5664: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _toString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(28894); - - -/** Used to generate unique IDs. */ -var idCounter = 0; - -/** - * Generates a unique ID. If `prefix` is given, the ID is appended to it. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Util - * @param {string} [prefix=''] The value to prefix the ID with. - * @returns {string} Returns the unique ID. - * @example - * - * _.uniqueId('contact_'); - * // => 'contact_104' - * - * _.uniqueId(); - * // => '105' - */ -function uniqueId(prefix) { - var id = ++idCounter; - return (0,_toString_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(prefix) + id; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (uniqueId); - - -/***/ }), - -/***/ 38207: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ lodash_es_values) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayMap.js -var _arrayMap = __webpack_require__(45572); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseValues.js - - -/** - * The base implementation of `_.values` and `_.valuesIn` which creates an - * array of `object` property values corresponding to the property names - * of `props`. - * - * @private - * @param {Object} object The object to query. - * @param {Array} props The property names to get values for. - * @returns {Object} Returns the array of property values. - */ -function baseValues(object, props) { - return (0,_arrayMap/* default */.A)(props, function(key) { - return object[key]; - }); -} - -/* harmony default export */ const _baseValues = (baseValues); - -// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js -var keys = __webpack_require__(27422); -;// CONCATENATED MODULE: ./node_modules/lodash-es/values.js - - - -/** - * Creates an array of the own enumerable string keyed property values of `object`. - * - * **Note:** Non-object values are coerced to objects. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property values. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.values(new Foo); - * // => [1, 2] (iteration order is not guaranteed) - * - * _.values('hi'); - * // => ['h', 'i'] - */ -function values(object) { - return object == null ? [] : _baseValues(object, (0,keys/* default */.A)(object)); -} - -/* harmony default export */ const lodash_es_values = (values); - - -/***/ }), - -/***/ 65171: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - diagram: () => (/* binding */ diagram) -}); - -// EXTERNAL MODULE: ./node_modules/mermaid/dist/mermaid-b5860b54.js + 8 modules -var mermaid_b5860b54 = __webpack_require__(86079); -// EXTERNAL MODULE: ./node_modules/dagre-d3-es/src/graphlib/index.js -var graphlib = __webpack_require__(697); -// EXTERNAL MODULE: ./node_modules/d3/src/index.js + 197 modules -var src = __webpack_require__(26312); -// EXTERNAL MODULE: ./node_modules/dagre-d3-es/src/dagre/index.js + 64 modules -var dagre = __webpack_require__(21176); -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/uuid/dist/esm-node/stringify.js - -/** - * Convert array of 16 byte values to UUID string format of the form: - * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX - */ - -const byteToHex = []; - -for (let i = 0; i < 256; ++i) { - byteToHex.push((i + 0x100).toString(16).slice(1)); -} - -function unsafeStringify(arr, offset = 0) { - // Note: Be careful editing this code! It's been tuned for performance - // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434 - return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]; -} - -function stringify(arr, offset = 0) { - const uuid = unsafeStringify(arr, offset); // Consistency check for valid UUID. If this throws, it's likely due to one - // of the following: - // - One or more input array values don't map to a hex octet (leading to - // "undefined" in the uuid) - // - Invalid input values for the RFC `version` or `variant` fields - - if (!validate(uuid)) { - throw TypeError('Stringified UUID is invalid'); - } - - return uuid; -} - -/* harmony default export */ const esm_node_stringify = ((/* unused pure expression or super */ null && (stringify))); -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/uuid/dist/esm-node/regex.js -/* harmony default export */ const regex = (/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i); -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/uuid/dist/esm-node/validate.js - - -function validate_validate(uuid) { - return typeof uuid === 'string' && regex.test(uuid); -} - -/* harmony default export */ const esm_node_validate = (validate_validate); -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/uuid/dist/esm-node/parse.js - - -function parse(uuid) { - if (!esm_node_validate(uuid)) { - throw TypeError('Invalid UUID'); - } - - let v; - const arr = new Uint8Array(16); // Parse ########-....-....-....-............ - - arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24; - arr[1] = v >>> 16 & 0xff; - arr[2] = v >>> 8 & 0xff; - arr[3] = v & 0xff; // Parse ........-####-....-....-............ - - arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8; - arr[5] = v & 0xff; // Parse ........-....-####-....-............ - - arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8; - arr[7] = v & 0xff; // Parse ........-....-....-####-............ - - arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8; - arr[9] = v & 0xff; // Parse ........-....-....-....-############ - // (Use "/" to avoid 32-bit truncation when bit-shifting high-order bytes) - - arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff; - arr[11] = v / 0x100000000 & 0xff; - arr[12] = v >>> 24 & 0xff; - arr[13] = v >>> 16 & 0xff; - arr[14] = v >>> 8 & 0xff; - arr[15] = v & 0xff; - return arr; -} - -/* harmony default export */ const esm_node_parse = (parse); -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/uuid/dist/esm-node/v35.js - - - -function stringToBytes(str) { - str = unescape(encodeURIComponent(str)); // UTF8 escape - - const bytes = []; - - for (let i = 0; i < str.length; ++i) { - bytes.push(str.charCodeAt(i)); - } - - return bytes; -} - -const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8'; -const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8'; -function v35(name, version, hashfunc) { - function generateUUID(value, namespace, buf, offset) { - var _namespace; - - if (typeof value === 'string') { - value = stringToBytes(value); - } - - if (typeof namespace === 'string') { - namespace = esm_node_parse(namespace); - } - - if (((_namespace = namespace) === null || _namespace === void 0 ? void 0 : _namespace.length) !== 16) { - throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)'); - } // Compute hash of namespace and value, Per 4.3 - // Future: Use spread syntax when supported on all platforms, e.g. `bytes = - // hashfunc([...namespace, ... value])` - - - let bytes = new Uint8Array(16 + value.length); - bytes.set(namespace); - bytes.set(value, namespace.length); - bytes = hashfunc(bytes); - bytes[6] = bytes[6] & 0x0f | version; - bytes[8] = bytes[8] & 0x3f | 0x80; - - if (buf) { - offset = offset || 0; - - for (let i = 0; i < 16; ++i) { - buf[offset + i] = bytes[i]; - } - - return buf; - } - - return unsafeStringify(bytes); - } // Function#name is not settable on some platforms (#270) - - - try { - generateUUID.name = name; // eslint-disable-next-line no-empty - } catch (err) {} // For CommonJS default export support - - - generateUUID.DNS = DNS; - generateUUID.URL = URL; - return generateUUID; -} -// EXTERNAL MODULE: external "crypto" -var external_crypto_ = __webpack_require__(76982); -var external_crypto_default = /*#__PURE__*/__webpack_require__.n(external_crypto_); -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/uuid/dist/esm-node/sha1.js - - -function sha1(bytes) { - if (Array.isArray(bytes)) { - bytes = Buffer.from(bytes); - } else if (typeof bytes === 'string') { - bytes = Buffer.from(bytes, 'utf8'); - } - - return external_crypto_default().createHash('sha1').update(bytes).digest(); -} - -/* harmony default export */ const esm_node_sha1 = (sha1); -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/uuid/dist/esm-node/v5.js - - -const v5 = v35('v5', 0x50, esm_node_sha1); -/* harmony default export */ const esm_node_v5 = (v5); -// EXTERNAL MODULE: ./node_modules/dayjs/dayjs.min.js -var dayjs_min = __webpack_require__(74353); -// EXTERNAL MODULE: ./node_modules/@braintree/sanitize-url/dist/index.js -var dist = __webpack_require__(16750); -// EXTERNAL MODULE: ./node_modules/dompurify/dist/purify.es.mjs -var purify_es = __webpack_require__(99418); -;// CONCATENATED MODULE: ./node_modules/mermaid/dist/erDiagram-9861fffd.js - - - - - - - - - - - - - - -var parser = function() { - var o = function(k, v, o2, l) { - for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) - ; - return o2; - }, $V0 = [6, 8, 10, 20, 22, 24, 26, 27, 28], $V1 = [1, 10], $V2 = [1, 11], $V3 = [1, 12], $V4 = [1, 13], $V5 = [1, 14], $V6 = [1, 15], $V7 = [1, 21], $V8 = [1, 22], $V9 = [1, 23], $Va = [1, 24], $Vb = [1, 25], $Vc = [6, 8, 10, 13, 15, 18, 19, 20, 22, 24, 26, 27, 28, 41, 42, 43, 44, 45], $Vd = [1, 34], $Ve = [27, 28, 46, 47], $Vf = [41, 42, 43, 44, 45], $Vg = [17, 34], $Vh = [1, 54], $Vi = [1, 53], $Vj = [17, 34, 36, 38]; - var parser2 = { - trace: function trace() { - }, - yy: {}, - symbols_: { "error": 2, "start": 3, "ER_DIAGRAM": 4, "document": 5, "EOF": 6, "line": 7, "SPACE": 8, "statement": 9, "NEWLINE": 10, "entityName": 11, "relSpec": 12, ":": 13, "role": 14, "BLOCK_START": 15, "attributes": 16, "BLOCK_STOP": 17, "SQS": 18, "SQE": 19, "title": 20, "title_value": 21, "acc_title": 22, "acc_title_value": 23, "acc_descr": 24, "acc_descr_value": 25, "acc_descr_multiline_value": 26, "ALPHANUM": 27, "ENTITY_NAME": 28, "attribute": 29, "attributeType": 30, "attributeName": 31, "attributeKeyTypeList": 32, "attributeComment": 33, "ATTRIBUTE_WORD": 34, "attributeKeyType": 35, "COMMA": 36, "ATTRIBUTE_KEY": 37, "COMMENT": 38, "cardinality": 39, "relType": 40, "ZERO_OR_ONE": 41, "ZERO_OR_MORE": 42, "ONE_OR_MORE": 43, "ONLY_ONE": 44, "MD_PARENT": 45, "NON_IDENTIFYING": 46, "IDENTIFYING": 47, "WORD": 48, "$accept": 0, "$end": 1 }, - terminals_: { 2: "error", 4: "ER_DIAGRAM", 6: "EOF", 8: "SPACE", 10: "NEWLINE", 13: ":", 15: "BLOCK_START", 17: "BLOCK_STOP", 18: "SQS", 19: "SQE", 20: "title", 21: "title_value", 22: "acc_title", 23: "acc_title_value", 24: "acc_descr", 25: "acc_descr_value", 26: "acc_descr_multiline_value", 27: "ALPHANUM", 28: "ENTITY_NAME", 34: "ATTRIBUTE_WORD", 36: "COMMA", 37: "ATTRIBUTE_KEY", 38: "COMMENT", 41: "ZERO_OR_ONE", 42: "ZERO_OR_MORE", 43: "ONE_OR_MORE", 44: "ONLY_ONE", 45: "MD_PARENT", 46: "NON_IDENTIFYING", 47: "IDENTIFYING", 48: "WORD" }, - productions_: [0, [3, 3], [5, 0], [5, 2], [7, 2], [7, 1], [7, 1], [7, 1], [9, 5], [9, 4], [9, 3], [9, 1], [9, 7], [9, 6], [9, 4], [9, 2], [9, 2], [9, 2], [9, 1], [11, 1], [11, 1], [16, 1], [16, 2], [29, 2], [29, 3], [29, 3], [29, 4], [30, 1], [31, 1], [32, 1], [32, 3], [35, 1], [33, 1], [12, 3], [39, 1], [39, 1], [39, 1], [39, 1], [39, 1], [40, 1], [40, 1], [14, 1], [14, 1], [14, 1]], - performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { - var $0 = $$.length - 1; - switch (yystate) { - case 1: - break; - case 2: - this.$ = []; - break; - case 3: - $$[$0 - 1].push($$[$0]); - this.$ = $$[$0 - 1]; - break; - case 4: - case 5: - this.$ = $$[$0]; - break; - case 6: - case 7: - this.$ = []; - break; - case 8: - yy.addEntity($$[$0 - 4]); - yy.addEntity($$[$0 - 2]); - yy.addRelationship($$[$0 - 4], $$[$0], $$[$0 - 2], $$[$0 - 3]); - break; - case 9: - yy.addEntity($$[$0 - 3]); - yy.addAttributes($$[$0 - 3], $$[$0 - 1]); - break; - case 10: - yy.addEntity($$[$0 - 2]); - break; - case 11: - yy.addEntity($$[$0]); - break; - case 12: - yy.addEntity($$[$0 - 6], $$[$0 - 4]); - yy.addAttributes($$[$0 - 6], $$[$0 - 1]); - break; - case 13: - yy.addEntity($$[$0 - 5], $$[$0 - 3]); - break; - case 14: - yy.addEntity($$[$0 - 3], $$[$0 - 1]); - break; - case 15: - case 16: - this.$ = $$[$0].trim(); - yy.setAccTitle(this.$); - break; - case 17: - case 18: - this.$ = $$[$0].trim(); - yy.setAccDescription(this.$); - break; - case 19: - case 43: - this.$ = $$[$0]; - break; - case 20: - case 41: - case 42: - this.$ = $$[$0].replace(/"/g, ""); - break; - case 21: - case 29: - this.$ = [$$[$0]]; - break; - case 22: - $$[$0].push($$[$0 - 1]); - this.$ = $$[$0]; - break; - case 23: - this.$ = { attributeType: $$[$0 - 1], attributeName: $$[$0] }; - break; - case 24: - this.$ = { attributeType: $$[$0 - 2], attributeName: $$[$0 - 1], attributeKeyTypeList: $$[$0] }; - break; - case 25: - this.$ = { attributeType: $$[$0 - 2], attributeName: $$[$0 - 1], attributeComment: $$[$0] }; - break; - case 26: - this.$ = { attributeType: $$[$0 - 3], attributeName: $$[$0 - 2], attributeKeyTypeList: $$[$0 - 1], attributeComment: $$[$0] }; - break; - case 27: - case 28: - case 31: - this.$ = $$[$0]; - break; - case 30: - $$[$0 - 2].push($$[$0]); - this.$ = $$[$0 - 2]; - break; - case 32: - this.$ = $$[$0].replace(/"/g, ""); - break; - case 33: - this.$ = { cardA: $$[$0], relType: $$[$0 - 1], cardB: $$[$0 - 2] }; - break; - case 34: - this.$ = yy.Cardinality.ZERO_OR_ONE; - break; - case 35: - this.$ = yy.Cardinality.ZERO_OR_MORE; - break; - case 36: - this.$ = yy.Cardinality.ONE_OR_MORE; - break; - case 37: - this.$ = yy.Cardinality.ONLY_ONE; - break; - case 38: - this.$ = yy.Cardinality.MD_PARENT; - break; - case 39: - this.$ = yy.Identification.NON_IDENTIFYING; - break; - case 40: - this.$ = yy.Identification.IDENTIFYING; - break; - } - }, - table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, o($V0, [2, 2], { 5: 3 }), { 6: [1, 4], 7: 5, 8: [1, 6], 9: 7, 10: [1, 8], 11: 9, 20: $V1, 22: $V2, 24: $V3, 26: $V4, 27: $V5, 28: $V6 }, o($V0, [2, 7], { 1: [2, 1] }), o($V0, [2, 3]), { 9: 16, 11: 9, 20: $V1, 22: $V2, 24: $V3, 26: $V4, 27: $V5, 28: $V6 }, o($V0, [2, 5]), o($V0, [2, 6]), o($V0, [2, 11], { 12: 17, 39: 20, 15: [1, 18], 18: [1, 19], 41: $V7, 42: $V8, 43: $V9, 44: $Va, 45: $Vb }), { 21: [1, 26] }, { 23: [1, 27] }, { 25: [1, 28] }, o($V0, [2, 18]), o($Vc, [2, 19]), o($Vc, [2, 20]), o($V0, [2, 4]), { 11: 29, 27: $V5, 28: $V6 }, { 16: 30, 17: [1, 31], 29: 32, 30: 33, 34: $Vd }, { 11: 35, 27: $V5, 28: $V6 }, { 40: 36, 46: [1, 37], 47: [1, 38] }, o($Ve, [2, 34]), o($Ve, [2, 35]), o($Ve, [2, 36]), o($Ve, [2, 37]), o($Ve, [2, 38]), o($V0, [2, 15]), o($V0, [2, 16]), o($V0, [2, 17]), { 13: [1, 39] }, { 17: [1, 40] }, o($V0, [2, 10]), { 16: 41, 17: [2, 21], 29: 32, 30: 33, 34: $Vd }, { 31: 42, 34: [1, 43] }, { 34: [2, 27] }, { 19: [1, 44] }, { 39: 45, 41: $V7, 42: $V8, 43: $V9, 44: $Va, 45: $Vb }, o($Vf, [2, 39]), o($Vf, [2, 40]), { 14: 46, 27: [1, 49], 28: [1, 48], 48: [1, 47] }, o($V0, [2, 9]), { 17: [2, 22] }, o($Vg, [2, 23], { 32: 50, 33: 51, 35: 52, 37: $Vh, 38: $Vi }), o([17, 34, 37, 38], [2, 28]), o($V0, [2, 14], { 15: [1, 55] }), o([27, 28], [2, 33]), o($V0, [2, 8]), o($V0, [2, 41]), o($V0, [2, 42]), o($V0, [2, 43]), o($Vg, [2, 24], { 33: 56, 36: [1, 57], 38: $Vi }), o($Vg, [2, 25]), o($Vj, [2, 29]), o($Vg, [2, 32]), o($Vj, [2, 31]), { 16: 58, 17: [1, 59], 29: 32, 30: 33, 34: $Vd }, o($Vg, [2, 26]), { 35: 60, 37: $Vh }, { 17: [1, 61] }, o($V0, [2, 13]), o($Vj, [2, 30]), o($V0, [2, 12])], - defaultActions: { 34: [2, 27], 41: [2, 22] }, - parseError: function parseError(str, hash) { - if (hash.recoverable) { - this.trace(str); - } else { - var error = new Error(str); - error.hash = hash; - throw error; - } - }, - parse: function parse(input) { - var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; - var args = lstack.slice.call(arguments, 1); - var lexer2 = Object.create(this.lexer); - var sharedState = { yy: {} }; - for (var k in this.yy) { - if (Object.prototype.hasOwnProperty.call(this.yy, k)) { - sharedState.yy[k] = this.yy[k]; - } - } - lexer2.setInput(input, sharedState.yy); - sharedState.yy.lexer = lexer2; - sharedState.yy.parser = this; - if (typeof lexer2.yylloc == "undefined") { - lexer2.yylloc = {}; - } - var yyloc = lexer2.yylloc; - lstack.push(yyloc); - var ranges = lexer2.options && lexer2.options.ranges; - if (typeof sharedState.yy.parseError === "function") { - this.parseError = sharedState.yy.parseError; - } else { - this.parseError = Object.getPrototypeOf(this).parseError; - } - function lex() { - var token; - token = tstack.pop() || lexer2.lex() || EOF; - if (typeof token !== "number") { - if (token instanceof Array) { - tstack = token; - token = tstack.pop(); - } - token = self.symbols_[token] || token; - } - return token; - } - var symbol, state, action, r, yyval = {}, p, len, newState, expected; - while (true) { - state = stack[stack.length - 1]; - if (this.defaultActions[state]) { - action = this.defaultActions[state]; - } else { - if (symbol === null || typeof symbol == "undefined") { - symbol = lex(); - } - action = table[state] && table[state][symbol]; - } - if (typeof action === "undefined" || !action.length || !action[0]) { - var errStr = ""; - expected = []; - for (p in table[state]) { - if (this.terminals_[p] && p > TERROR) { - expected.push("'" + this.terminals_[p] + "'"); - } - } - if (lexer2.showPosition) { - errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; - } else { - errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); - } - this.parseError(errStr, { - text: lexer2.match, - token: this.terminals_[symbol] || symbol, - line: lexer2.yylineno, - loc: yyloc, - expected - }); - } - if (action[0] instanceof Array && action.length > 1) { - throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); - } - switch (action[0]) { - case 1: - stack.push(symbol); - vstack.push(lexer2.yytext); - lstack.push(lexer2.yylloc); - stack.push(action[1]); - symbol = null; - { - yyleng = lexer2.yyleng; - yytext = lexer2.yytext; - yylineno = lexer2.yylineno; - yyloc = lexer2.yylloc; - } - break; - case 2: - len = this.productions_[action[1]][1]; - yyval.$ = vstack[vstack.length - len]; - yyval._$ = { - first_line: lstack[lstack.length - (len || 1)].first_line, - last_line: lstack[lstack.length - 1].last_line, - first_column: lstack[lstack.length - (len || 1)].first_column, - last_column: lstack[lstack.length - 1].last_column - }; - if (ranges) { - yyval._$.range = [ - lstack[lstack.length - (len || 1)].range[0], - lstack[lstack.length - 1].range[1] - ]; - } - r = this.performAction.apply(yyval, [ - yytext, - yyleng, - yylineno, - sharedState.yy, - action[1], - vstack, - lstack - ].concat(args)); - if (typeof r !== "undefined") { - return r; - } - if (len) { - stack = stack.slice(0, -1 * len * 2); - vstack = vstack.slice(0, -1 * len); - lstack = lstack.slice(0, -1 * len); - } - stack.push(this.productions_[action[1]][0]); - vstack.push(yyval.$); - lstack.push(yyval._$); - newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; - stack.push(newState); - break; - case 3: - return true; - } - } - return true; - } - }; - var lexer = function() { - var lexer2 = { - EOF: 1, - parseError: function parseError(str, hash) { - if (this.yy.parser) { - this.yy.parser.parseError(str, hash); - } else { - throw new Error(str); - } - }, - // resets the lexer, sets new input - setInput: function(input, yy) { - this.yy = yy || this.yy || {}; - this._input = input; - this._more = this._backtrack = this.done = false; - this.yylineno = this.yyleng = 0; - this.yytext = this.matched = this.match = ""; - this.conditionStack = ["INITIAL"]; - this.yylloc = { - first_line: 1, - first_column: 0, - last_line: 1, - last_column: 0 - }; - if (this.options.ranges) { - this.yylloc.range = [0, 0]; - } - this.offset = 0; - return this; - }, - // consumes and returns one char from the input - input: function() { - var ch = this._input[0]; - this.yytext += ch; - this.yyleng++; - this.offset++; - this.match += ch; - this.matched += ch; - var lines = ch.match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno++; - this.yylloc.last_line++; - } else { - this.yylloc.last_column++; - } - if (this.options.ranges) { - this.yylloc.range[1]++; - } - this._input = this._input.slice(1); - return ch; - }, - // unshifts one char (or a string) into the input - unput: function(ch) { - var len = ch.length; - var lines = ch.split(/(?:\r\n?|\n)/g); - this._input = ch + this._input; - this.yytext = this.yytext.substr(0, this.yytext.length - len); - this.offset -= len; - var oldLines = this.match.split(/(?:\r\n?|\n)/g); - this.match = this.match.substr(0, this.match.length - 1); - this.matched = this.matched.substr(0, this.matched.length - 1); - if (lines.length - 1) { - this.yylineno -= lines.length - 1; - } - var r = this.yylloc.range; - this.yylloc = { - first_line: this.yylloc.first_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.first_column, - last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len - }; - if (this.options.ranges) { - this.yylloc.range = [r[0], r[0] + this.yyleng - len]; - } - this.yyleng = this.yytext.length; - return this; - }, - // When called from action, caches matched text and appends it on next action - more: function() { - this._more = true; - return this; - }, - // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. - reject: function() { - if (this.options.backtrack_lexer) { - this._backtrack = true; - } else { - return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), { - text: "", - token: null, - line: this.yylineno - }); - } - return this; - }, - // retain first n characters of the match - less: function(n) { - this.unput(this.match.slice(n)); - }, - // displays already matched input, i.e. for error messages - pastInput: function() { - var past = this.matched.substr(0, this.matched.length - this.match.length); - return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); - }, - // displays upcoming input, i.e. for error messages - upcomingInput: function() { - var next = this.match; - if (next.length < 20) { - next += this._input.substr(0, 20 - next.length); - } - return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); - }, - // displays the character position where the lexing error occurred, i.e. for error messages - showPosition: function() { - var pre = this.pastInput(); - var c = new Array(pre.length + 1).join("-"); - return pre + this.upcomingInput() + "\n" + c + "^"; - }, - // test the lexed token: return FALSE when not a match, otherwise return token - test_match: function(match, indexed_rule) { - var token, lines, backup; - if (this.options.backtrack_lexer) { - backup = { - yylineno: this.yylineno, - yylloc: { - first_line: this.yylloc.first_line, - last_line: this.last_line, - first_column: this.yylloc.first_column, - last_column: this.yylloc.last_column - }, - yytext: this.yytext, - match: this.match, - matches: this.matches, - matched: this.matched, - yyleng: this.yyleng, - offset: this.offset, - _more: this._more, - _input: this._input, - yy: this.yy, - conditionStack: this.conditionStack.slice(0), - done: this.done - }; - if (this.options.ranges) { - backup.yylloc.range = this.yylloc.range.slice(0); - } - } - lines = match[0].match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno += lines.length; - } - this.yylloc = { - first_line: this.yylloc.last_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.last_column, - last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length - }; - this.yytext += match[0]; - this.match += match[0]; - this.matches = match; - this.yyleng = this.yytext.length; - if (this.options.ranges) { - this.yylloc.range = [this.offset, this.offset += this.yyleng]; - } - this._more = false; - this._backtrack = false; - this._input = this._input.slice(match[0].length); - this.matched += match[0]; - token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); - if (this.done && this._input) { - this.done = false; - } - if (token) { - return token; - } else if (this._backtrack) { - for (var k in backup) { - this[k] = backup[k]; - } - return false; - } - return false; - }, - // return next match in input - next: function() { - if (this.done) { - return this.EOF; - } - if (!this._input) { - this.done = true; - } - var token, match, tempMatch, index; - if (!this._more) { - this.yytext = ""; - this.match = ""; - } - var rules = this._currentRules(); - for (var i = 0; i < rules.length; i++) { - tempMatch = this._input.match(this.rules[rules[i]]); - if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { - match = tempMatch; - index = i; - if (this.options.backtrack_lexer) { - token = this.test_match(tempMatch, rules[i]); - if (token !== false) { - return token; - } else if (this._backtrack) { - match = false; - continue; - } else { - return false; - } - } else if (!this.options.flex) { - break; - } - } - } - if (match) { - token = this.test_match(match, rules[index]); - if (token !== false) { - return token; - } - return false; - } - if (this._input === "") { - return this.EOF; - } else { - return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { - text: "", - token: null, - line: this.yylineno - }); - } - }, - // return next match that has a token - lex: function lex() { - var r = this.next(); - if (r) { - return r; - } else { - return this.lex(); - } - }, - // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) - begin: function begin(condition) { - this.conditionStack.push(condition); - }, - // pop the previously active lexer condition state off the condition stack - popState: function popState() { - var n = this.conditionStack.length - 1; - if (n > 0) { - return this.conditionStack.pop(); - } else { - return this.conditionStack[0]; - } - }, - // produce the lexer rule set which is active for the currently active lexer condition state - _currentRules: function _currentRules() { - if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { - return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; - } else { - return this.conditions["INITIAL"].rules; - } - }, - // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available - topState: function topState(n) { - n = this.conditionStack.length - 1 - Math.abs(n || 0); - if (n >= 0) { - return this.conditionStack[n]; - } else { - return "INITIAL"; - } - }, - // alias for begin(condition) - pushState: function pushState(condition) { - this.begin(condition); - }, - // return the number of states currently on the stack - stateStackSize: function stateStackSize() { - return this.conditionStack.length; - }, - options: { "case-insensitive": true }, - performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { - switch ($avoiding_name_collisions) { - case 0: - this.begin("acc_title"); - return 22; - case 1: - this.popState(); - return "acc_title_value"; - case 2: - this.begin("acc_descr"); - return 24; - case 3: - this.popState(); - return "acc_descr_value"; - case 4: - this.begin("acc_descr_multiline"); - break; - case 5: - this.popState(); - break; - case 6: - return "acc_descr_multiline_value"; - case 7: - return 10; - case 8: - break; - case 9: - return 8; - case 10: - return 28; - case 11: - return 48; - case 12: - return 4; - case 13: - this.begin("block"); - return 15; - case 14: - return 36; - case 15: - break; - case 16: - return 37; - case 17: - return 34; - case 18: - return 34; - case 19: - return 38; - case 20: - break; - case 21: - this.popState(); - return 17; - case 22: - return yy_.yytext[0]; - case 23: - return 18; - case 24: - return 19; - case 25: - return 41; - case 26: - return 43; - case 27: - return 43; - case 28: - return 43; - case 29: - return 41; - case 30: - return 41; - case 31: - return 42; - case 32: - return 42; - case 33: - return 42; - case 34: - return 42; - case 35: - return 42; - case 36: - return 43; - case 37: - return 42; - case 38: - return 43; - case 39: - return 44; - case 40: - return 44; - case 41: - return 44; - case 42: - return 44; - case 43: - return 41; - case 44: - return 42; - case 45: - return 43; - case 46: - return 45; - case 47: - return 46; - case 48: - return 47; - case 49: - return 47; - case 50: - return 46; - case 51: - return 46; - case 52: - return 46; - case 53: - return 27; - case 54: - return yy_.yytext[0]; - case 55: - return 6; - } - }, - rules: [/^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:[\s]+)/i, /^(?:"[^"%\r\n\v\b\\]+")/i, /^(?:"[^"]*")/i, /^(?:erDiagram\b)/i, /^(?:\{)/i, /^(?:,)/i, /^(?:\s+)/i, /^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i, /^(?:(.*?)[~](.*?)*[~])/i, /^(?:[\*A-Za-z_][A-Za-z0-9\-_\[\]\(\)]*)/i, /^(?:"[^"]*")/i, /^(?:[\n]+)/i, /^(?:\})/i, /^(?:.)/i, /^(?:\[)/i, /^(?:\])/i, /^(?:one or zero\b)/i, /^(?:one or more\b)/i, /^(?:one or many\b)/i, /^(?:1\+)/i, /^(?:\|o\b)/i, /^(?:zero or one\b)/i, /^(?:zero or more\b)/i, /^(?:zero or many\b)/i, /^(?:0\+)/i, /^(?:\}o\b)/i, /^(?:many\(0\))/i, /^(?:many\(1\))/i, /^(?:many\b)/i, /^(?:\}\|)/i, /^(?:one\b)/i, /^(?:only one\b)/i, /^(?:1\b)/i, /^(?:\|\|)/i, /^(?:o\|)/i, /^(?:o\{)/i, /^(?:\|\{)/i, /^(?:\s*u\b)/i, /^(?:\.\.)/i, /^(?:--)/i, /^(?:to\b)/i, /^(?:optionally to\b)/i, /^(?:\.-)/i, /^(?:-\.)/i, /^(?:[A-Za-z_][A-Za-z0-9\-_]*)/i, /^(?:.)/i, /^(?:$)/i], - conditions: { "acc_descr_multiline": { "rules": [5, 6], "inclusive": false }, "acc_descr": { "rules": [3], "inclusive": false }, "acc_title": { "rules": [1], "inclusive": false }, "block": { "rules": [14, 15, 16, 17, 18, 19, 20, 21, 22], "inclusive": false }, "INITIAL": { "rules": [0, 2, 4, 7, 8, 9, 10, 11, 12, 13, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55], "inclusive": true } } - }; - return lexer2; - }(); - parser2.lexer = lexer; - function Parser() { - this.yy = {}; - } - Parser.prototype = parser2; - parser2.Parser = Parser; - return new Parser(); -}(); -parser.parser = parser; -const erParser = parser; -let entities = {}; -let relationships = []; -const Cardinality = { - ZERO_OR_ONE: "ZERO_OR_ONE", - ZERO_OR_MORE: "ZERO_OR_MORE", - ONE_OR_MORE: "ONE_OR_MORE", - ONLY_ONE: "ONLY_ONE", - MD_PARENT: "MD_PARENT" -}; -const Identification = { - NON_IDENTIFYING: "NON_IDENTIFYING", - IDENTIFYING: "IDENTIFYING" -}; -const addEntity = function(name, alias = void 0) { - if (entities[name] === void 0) { - entities[name] = { attributes: [], alias }; - mermaid_b5860b54.l.info("Added new entity :", name); - } else if (entities[name] && !entities[name].alias && alias) { - entities[name].alias = alias; - mermaid_b5860b54.l.info(`Add alias '${alias}' to entity '${name}'`); - } - return entities[name]; -}; -const getEntities = () => entities; -const addAttributes = function(entityName, attribs) { - let entity = addEntity(entityName); - let i; - for (i = attribs.length - 1; i >= 0; i--) { - entity.attributes.push(attribs[i]); - mermaid_b5860b54.l.debug("Added attribute ", attribs[i].attributeName); - } -}; -const addRelationship = function(entA, rolA, entB, rSpec) { - let rel = { - entityA: entA, - roleA: rolA, - entityB: entB, - relSpec: rSpec - }; - relationships.push(rel); - mermaid_b5860b54.l.debug("Added new relationship :", rel); -}; -const getRelationships = () => relationships; -const clear = function() { - entities = {}; - relationships = []; - (0,mermaid_b5860b54.v)(); -}; -const erDb = { - Cardinality, - Identification, - getConfig: () => (0,mermaid_b5860b54.c)().er, - addEntity, - addAttributes, - getEntities, - addRelationship, - getRelationships, - clear, - setAccTitle: mermaid_b5860b54.s, - getAccTitle: mermaid_b5860b54.g, - setAccDescription: mermaid_b5860b54.b, - getAccDescription: mermaid_b5860b54.a, - setDiagramTitle: mermaid_b5860b54.q, - getDiagramTitle: mermaid_b5860b54.t -}; -const ERMarkers = { - ONLY_ONE_START: "ONLY_ONE_START", - ONLY_ONE_END: "ONLY_ONE_END", - ZERO_OR_ONE_START: "ZERO_OR_ONE_START", - ZERO_OR_ONE_END: "ZERO_OR_ONE_END", - ONE_OR_MORE_START: "ONE_OR_MORE_START", - ONE_OR_MORE_END: "ONE_OR_MORE_END", - ZERO_OR_MORE_START: "ZERO_OR_MORE_START", - ZERO_OR_MORE_END: "ZERO_OR_MORE_END", - MD_PARENT_END: "MD_PARENT_END", - MD_PARENT_START: "MD_PARENT_START" -}; -const insertMarkers = function(elem, conf2) { - let marker; - elem.append("defs").append("marker").attr("id", ERMarkers.MD_PARENT_START).attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"); - elem.append("defs").append("marker").attr("id", ERMarkers.MD_PARENT_END).attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"); - elem.append("defs").append("marker").attr("id", ERMarkers.ONLY_ONE_START).attr("refX", 0).attr("refY", 9).attr("markerWidth", 18).attr("markerHeight", 18).attr("orient", "auto").append("path").attr("stroke", conf2.stroke).attr("fill", "none").attr("d", "M9,0 L9,18 M15,0 L15,18"); - elem.append("defs").append("marker").attr("id", ERMarkers.ONLY_ONE_END).attr("refX", 18).attr("refY", 9).attr("markerWidth", 18).attr("markerHeight", 18).attr("orient", "auto").append("path").attr("stroke", conf2.stroke).attr("fill", "none").attr("d", "M3,0 L3,18 M9,0 L9,18"); - marker = elem.append("defs").append("marker").attr("id", ERMarkers.ZERO_OR_ONE_START).attr("refX", 0).attr("refY", 9).attr("markerWidth", 30).attr("markerHeight", 18).attr("orient", "auto"); - marker.append("circle").attr("stroke", conf2.stroke).attr("fill", "white").attr("cx", 21).attr("cy", 9).attr("r", 6); - marker.append("path").attr("stroke", conf2.stroke).attr("fill", "none").attr("d", "M9,0 L9,18"); - marker = elem.append("defs").append("marker").attr("id", ERMarkers.ZERO_OR_ONE_END).attr("refX", 30).attr("refY", 9).attr("markerWidth", 30).attr("markerHeight", 18).attr("orient", "auto"); - marker.append("circle").attr("stroke", conf2.stroke).attr("fill", "white").attr("cx", 9).attr("cy", 9).attr("r", 6); - marker.append("path").attr("stroke", conf2.stroke).attr("fill", "none").attr("d", "M21,0 L21,18"); - elem.append("defs").append("marker").attr("id", ERMarkers.ONE_OR_MORE_START).attr("refX", 18).attr("refY", 18).attr("markerWidth", 45).attr("markerHeight", 36).attr("orient", "auto").append("path").attr("stroke", conf2.stroke).attr("fill", "none").attr("d", "M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"); - elem.append("defs").append("marker").attr("id", ERMarkers.ONE_OR_MORE_END).attr("refX", 27).attr("refY", 18).attr("markerWidth", 45).attr("markerHeight", 36).attr("orient", "auto").append("path").attr("stroke", conf2.stroke).attr("fill", "none").attr("d", "M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18"); - marker = elem.append("defs").append("marker").attr("id", ERMarkers.ZERO_OR_MORE_START).attr("refX", 18).attr("refY", 18).attr("markerWidth", 57).attr("markerHeight", 36).attr("orient", "auto"); - marker.append("circle").attr("stroke", conf2.stroke).attr("fill", "white").attr("cx", 48).attr("cy", 18).attr("r", 6); - marker.append("path").attr("stroke", conf2.stroke).attr("fill", "none").attr("d", "M0,18 Q18,0 36,18 Q18,36 0,18"); - marker = elem.append("defs").append("marker").attr("id", ERMarkers.ZERO_OR_MORE_END).attr("refX", 39).attr("refY", 18).attr("markerWidth", 57).attr("markerHeight", 36).attr("orient", "auto"); - marker.append("circle").attr("stroke", conf2.stroke).attr("fill", "white").attr("cx", 9).attr("cy", 18).attr("r", 6); - marker.append("path").attr("stroke", conf2.stroke).attr("fill", "none").attr("d", "M21,18 Q39,0 57,18 Q39,36 21,18"); - return; -}; -const erMarkers = { - ERMarkers, - insertMarkers -}; -const BAD_ID_CHARS_REGEXP = /[^\dA-Za-z](\W)*/g; -let conf = {}; -let entityNameIds = /* @__PURE__ */ new Map(); -const setConf = function(cnf) { - const keys = Object.keys(cnf); - for (const key of keys) { - conf[key] = cnf[key]; - } -}; -const drawAttributes = (groupNode, entityTextNode, attributes) => { - const heightPadding = conf.entityPadding / 3; - const widthPadding = conf.entityPadding / 3; - const attrFontSize = conf.fontSize * 0.85; - const labelBBox = entityTextNode.node().getBBox(); - const attributeNodes = []; - let hasKeyType = false; - let hasComment = false; - let maxTypeWidth = 0; - let maxNameWidth = 0; - let maxKeyWidth = 0; - let maxCommentWidth = 0; - let cumulativeHeight = labelBBox.height + heightPadding * 2; - let attrNum = 1; - attributes.forEach((item) => { - if (item.attributeKeyTypeList !== void 0 && item.attributeKeyTypeList.length > 0) { - hasKeyType = true; - } - if (item.attributeComment !== void 0) { - hasComment = true; - } - }); - attributes.forEach((item) => { - const attrPrefix = `${entityTextNode.node().id}-attr-${attrNum}`; - let nodeHeight = 0; - const attributeType = (0,mermaid_b5860b54.x)(item.attributeType); - const typeNode = groupNode.append("text").classed("er entityLabel", true).attr("id", `${attrPrefix}-type`).attr("x", 0).attr("y", 0).style("dominant-baseline", "middle").style("text-anchor", "left").style("font-family", (0,mermaid_b5860b54.c)().fontFamily).style("font-size", attrFontSize + "px").text(attributeType); - const nameNode = groupNode.append("text").classed("er entityLabel", true).attr("id", `${attrPrefix}-name`).attr("x", 0).attr("y", 0).style("dominant-baseline", "middle").style("text-anchor", "left").style("font-family", (0,mermaid_b5860b54.c)().fontFamily).style("font-size", attrFontSize + "px").text(item.attributeName); - const attributeNode = {}; - attributeNode.tn = typeNode; - attributeNode.nn = nameNode; - const typeBBox = typeNode.node().getBBox(); - const nameBBox = nameNode.node().getBBox(); - maxTypeWidth = Math.max(maxTypeWidth, typeBBox.width); - maxNameWidth = Math.max(maxNameWidth, nameBBox.width); - nodeHeight = Math.max(typeBBox.height, nameBBox.height); - if (hasKeyType) { - const keyTypeNodeText = item.attributeKeyTypeList !== void 0 ? item.attributeKeyTypeList.join(",") : ""; - const keyTypeNode = groupNode.append("text").classed("er entityLabel", true).attr("id", `${attrPrefix}-key`).attr("x", 0).attr("y", 0).style("dominant-baseline", "middle").style("text-anchor", "left").style("font-family", (0,mermaid_b5860b54.c)().fontFamily).style("font-size", attrFontSize + "px").text(keyTypeNodeText); - attributeNode.kn = keyTypeNode; - const keyTypeBBox = keyTypeNode.node().getBBox(); - maxKeyWidth = Math.max(maxKeyWidth, keyTypeBBox.width); - nodeHeight = Math.max(nodeHeight, keyTypeBBox.height); - } - if (hasComment) { - const commentNode = groupNode.append("text").classed("er entityLabel", true).attr("id", `${attrPrefix}-comment`).attr("x", 0).attr("y", 0).style("dominant-baseline", "middle").style("text-anchor", "left").style("font-family", (0,mermaid_b5860b54.c)().fontFamily).style("font-size", attrFontSize + "px").text(item.attributeComment || ""); - attributeNode.cn = commentNode; - const commentNodeBBox = commentNode.node().getBBox(); - maxCommentWidth = Math.max(maxCommentWidth, commentNodeBBox.width); - nodeHeight = Math.max(nodeHeight, commentNodeBBox.height); - } - attributeNode.height = nodeHeight; - attributeNodes.push(attributeNode); - cumulativeHeight += nodeHeight + heightPadding * 2; - attrNum += 1; - }); - let widthPaddingFactor = 4; - if (hasKeyType) { - widthPaddingFactor += 2; - } - if (hasComment) { - widthPaddingFactor += 2; - } - const maxWidth = maxTypeWidth + maxNameWidth + maxKeyWidth + maxCommentWidth; - const bBox = { - width: Math.max( - conf.minEntityWidth, - Math.max( - labelBBox.width + conf.entityPadding * 2, - maxWidth + widthPadding * widthPaddingFactor - ) - ), - height: attributes.length > 0 ? cumulativeHeight : Math.max(conf.minEntityHeight, labelBBox.height + conf.entityPadding * 2) - }; - if (attributes.length > 0) { - const spareColumnWidth = Math.max( - 0, - (bBox.width - maxWidth - widthPadding * widthPaddingFactor) / (widthPaddingFactor / 2) - ); - entityTextNode.attr( - "transform", - "translate(" + bBox.width / 2 + "," + (heightPadding + labelBBox.height / 2) + ")" - ); - let heightOffset = labelBBox.height + heightPadding * 2; - let attribStyle = "attributeBoxOdd"; - attributeNodes.forEach((attributeNode) => { - const alignY = heightOffset + heightPadding + attributeNode.height / 2; - attributeNode.tn.attr("transform", "translate(" + widthPadding + "," + alignY + ")"); - const typeRect = groupNode.insert("rect", "#" + attributeNode.tn.node().id).classed(`er ${attribStyle}`, true).attr("x", 0).attr("y", heightOffset).attr("width", maxTypeWidth + widthPadding * 2 + spareColumnWidth).attr("height", attributeNode.height + heightPadding * 2); - const nameXOffset = parseFloat(typeRect.attr("x")) + parseFloat(typeRect.attr("width")); - attributeNode.nn.attr( - "transform", - "translate(" + (nameXOffset + widthPadding) + "," + alignY + ")" - ); - const nameRect = groupNode.insert("rect", "#" + attributeNode.nn.node().id).classed(`er ${attribStyle}`, true).attr("x", nameXOffset).attr("y", heightOffset).attr("width", maxNameWidth + widthPadding * 2 + spareColumnWidth).attr("height", attributeNode.height + heightPadding * 2); - let keyTypeAndCommentXOffset = parseFloat(nameRect.attr("x")) + parseFloat(nameRect.attr("width")); - if (hasKeyType) { - attributeNode.kn.attr( - "transform", - "translate(" + (keyTypeAndCommentXOffset + widthPadding) + "," + alignY + ")" - ); - const keyTypeRect = groupNode.insert("rect", "#" + attributeNode.kn.node().id).classed(`er ${attribStyle}`, true).attr("x", keyTypeAndCommentXOffset).attr("y", heightOffset).attr("width", maxKeyWidth + widthPadding * 2 + spareColumnWidth).attr("height", attributeNode.height + heightPadding * 2); - keyTypeAndCommentXOffset = parseFloat(keyTypeRect.attr("x")) + parseFloat(keyTypeRect.attr("width")); - } - if (hasComment) { - attributeNode.cn.attr( - "transform", - "translate(" + (keyTypeAndCommentXOffset + widthPadding) + "," + alignY + ")" - ); - groupNode.insert("rect", "#" + attributeNode.cn.node().id).classed(`er ${attribStyle}`, "true").attr("x", keyTypeAndCommentXOffset).attr("y", heightOffset).attr("width", maxCommentWidth + widthPadding * 2 + spareColumnWidth).attr("height", attributeNode.height + heightPadding * 2); - } - heightOffset += attributeNode.height + heightPadding * 2; - attribStyle = attribStyle === "attributeBoxOdd" ? "attributeBoxEven" : "attributeBoxOdd"; - }); - } else { - bBox.height = Math.max(conf.minEntityHeight, cumulativeHeight); - entityTextNode.attr("transform", "translate(" + bBox.width / 2 + "," + bBox.height / 2 + ")"); - } - return bBox; -}; -const drawEntities = function(svgNode, entities2, graph) { - const keys = Object.keys(entities2); - let firstOne; - keys.forEach(function(entityName) { - const entityId = generateId(entityName, "entity"); - entityNameIds.set(entityName, entityId); - const groupNode = svgNode.append("g").attr("id", entityId); - firstOne = firstOne === void 0 ? entityId : firstOne; - const textId = "text-" + entityId; - const textNode = groupNode.append("text").classed("er entityLabel", true).attr("id", textId).attr("x", 0).attr("y", 0).style("dominant-baseline", "middle").style("text-anchor", "middle").style("font-family", (0,mermaid_b5860b54.c)().fontFamily).style("font-size", conf.fontSize + "px").text(entities2[entityName].alias ?? entityName); - const { width: entityWidth, height: entityHeight } = drawAttributes( - groupNode, - textNode, - entities2[entityName].attributes - ); - const rectNode = groupNode.insert("rect", "#" + textId).classed("er entityBox", true).attr("x", 0).attr("y", 0).attr("width", entityWidth).attr("height", entityHeight); - const rectBBox = rectNode.node().getBBox(); - graph.setNode(entityId, { - width: rectBBox.width, - height: rectBBox.height, - shape: "rect", - id: entityId - }); - }); - return firstOne; -}; -const adjustEntities = function(svgNode, graph) { - graph.nodes().forEach(function(v) { - if (v !== void 0 && graph.node(v) !== void 0) { - svgNode.select("#" + v).attr( - "transform", - "translate(" + (graph.node(v).x - graph.node(v).width / 2) + "," + (graph.node(v).y - graph.node(v).height / 2) + " )" - ); - } - }); -}; -const getEdgeName = function(rel) { - return (rel.entityA + rel.roleA + rel.entityB).replace(/\s/g, ""); -}; -const addRelationships = function(relationships2, g) { - relationships2.forEach(function(r) { - g.setEdge( - entityNameIds.get(r.entityA), - entityNameIds.get(r.entityB), - { relationship: r }, - getEdgeName(r) - ); - }); - return relationships2; -}; -let relCnt = 0; -const drawRelationshipFromLayout = function(svg, rel, g, insert, diagObj) { - relCnt++; - const edge = g.edge( - entityNameIds.get(rel.entityA), - entityNameIds.get(rel.entityB), - getEdgeName(rel) - ); - const lineFunction = (0,src/* line */.n8j)().x(function(d) { - return d.x; - }).y(function(d) { - return d.y; - }).curve(src/* curveBasis */.qrM); - const svgPath = svg.insert("path", "#" + insert).classed("er relationshipLine", true).attr("d", lineFunction(edge.points)).style("stroke", conf.stroke).style("fill", "none"); - if (rel.relSpec.relType === diagObj.db.Identification.NON_IDENTIFYING) { - svgPath.attr("stroke-dasharray", "8,8"); - } - let url = ""; - if (conf.arrowMarkerAbsolute) { - url = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search; - url = url.replace(/\(/g, "\\("); - url = url.replace(/\)/g, "\\)"); - } - switch (rel.relSpec.cardA) { - case diagObj.db.Cardinality.ZERO_OR_ONE: - svgPath.attr("marker-end", "url(" + url + "#" + erMarkers.ERMarkers.ZERO_OR_ONE_END + ")"); - break; - case diagObj.db.Cardinality.ZERO_OR_MORE: - svgPath.attr("marker-end", "url(" + url + "#" + erMarkers.ERMarkers.ZERO_OR_MORE_END + ")"); - break; - case diagObj.db.Cardinality.ONE_OR_MORE: - svgPath.attr("marker-end", "url(" + url + "#" + erMarkers.ERMarkers.ONE_OR_MORE_END + ")"); - break; - case diagObj.db.Cardinality.ONLY_ONE: - svgPath.attr("marker-end", "url(" + url + "#" + erMarkers.ERMarkers.ONLY_ONE_END + ")"); - break; - case diagObj.db.Cardinality.MD_PARENT: - svgPath.attr("marker-end", "url(" + url + "#" + erMarkers.ERMarkers.MD_PARENT_END + ")"); - break; - } - switch (rel.relSpec.cardB) { - case diagObj.db.Cardinality.ZERO_OR_ONE: - svgPath.attr( - "marker-start", - "url(" + url + "#" + erMarkers.ERMarkers.ZERO_OR_ONE_START + ")" - ); - break; - case diagObj.db.Cardinality.ZERO_OR_MORE: - svgPath.attr( - "marker-start", - "url(" + url + "#" + erMarkers.ERMarkers.ZERO_OR_MORE_START + ")" - ); - break; - case diagObj.db.Cardinality.ONE_OR_MORE: - svgPath.attr( - "marker-start", - "url(" + url + "#" + erMarkers.ERMarkers.ONE_OR_MORE_START + ")" - ); - break; - case diagObj.db.Cardinality.ONLY_ONE: - svgPath.attr("marker-start", "url(" + url + "#" + erMarkers.ERMarkers.ONLY_ONE_START + ")"); - break; - case diagObj.db.Cardinality.MD_PARENT: - svgPath.attr("marker-start", "url(" + url + "#" + erMarkers.ERMarkers.MD_PARENT_START + ")"); - break; - } - const len = svgPath.node().getTotalLength(); - const labelPoint = svgPath.node().getPointAtLength(len * 0.5); - const labelId = "rel" + relCnt; - const labelNode = svg.append("text").classed("er relationshipLabel", true).attr("id", labelId).attr("x", labelPoint.x).attr("y", labelPoint.y).style("text-anchor", "middle").style("dominant-baseline", "middle").style("font-family", (0,mermaid_b5860b54.c)().fontFamily).style("font-size", conf.fontSize + "px").text(rel.roleA); - const labelBBox = labelNode.node().getBBox(); - svg.insert("rect", "#" + labelId).classed("er relationshipLabelBox", true).attr("x", labelPoint.x - labelBBox.width / 2).attr("y", labelPoint.y - labelBBox.height / 2).attr("width", labelBBox.width).attr("height", labelBBox.height); -}; -const draw = function(text, id, _version, diagObj) { - conf = (0,mermaid_b5860b54.c)().er; - mermaid_b5860b54.l.info("Drawing ER diagram"); - const securityLevel = (0,mermaid_b5860b54.c)().securityLevel; - let sandboxElement; - if (securityLevel === "sandbox") { - sandboxElement = (0,src/* select */.Ltv)("#i" + id); - } - const root = securityLevel === "sandbox" ? (0,src/* select */.Ltv)(sandboxElement.nodes()[0].contentDocument.body) : (0,src/* select */.Ltv)("body"); - const svg = root.select(`[id='${id}']`); - erMarkers.insertMarkers(svg, conf); - let g; - g = new graphlib/* Graph */.T({ - multigraph: true, - directed: true, - compound: false - }).setGraph({ - rankdir: conf.layoutDirection, - marginx: 20, - marginy: 20, - nodesep: 100, - edgesep: 100, - ranksep: 100 - }).setDefaultEdgeLabel(function() { - return {}; - }); - const firstEntity = drawEntities(svg, diagObj.db.getEntities(), g); - const relationships2 = addRelationships(diagObj.db.getRelationships(), g); - (0,dagre/* layout */.Zp)(g); - adjustEntities(svg, g); - relationships2.forEach(function(rel) { - drawRelationshipFromLayout(svg, rel, g, firstEntity, diagObj); - }); - const padding = conf.diagramPadding; - mermaid_b5860b54.u.insertTitle(svg, "entityTitleText", conf.titleTopMargin, diagObj.db.getDiagramTitle()); - const svgBounds = svg.node().getBBox(); - const width = svgBounds.width + padding * 2; - const height = svgBounds.height + padding * 2; - (0,mermaid_b5860b54.i)(svg, height, width, conf.useMaxWidth); - svg.attr("viewBox", `${svgBounds.x - padding} ${svgBounds.y - padding} ${width} ${height}`); -}; -const MERMAID_ERDIAGRAM_UUID = "28e9f9db-3c8d-5aa5-9faf-44286ae5937c"; -function generateId(str = "", prefix = "") { - const simplifiedStr = str.replace(BAD_ID_CHARS_REGEXP, ""); - return `${strWithHyphen(prefix)}${strWithHyphen(simplifiedStr)}${esm_node_v5( - str, - MERMAID_ERDIAGRAM_UUID - )}`; -} -function strWithHyphen(str = "") { - return str.length > 0 ? `${str}-` : ""; -} -const erRenderer = { - setConf, - draw -}; -const getStyles = (options) => ` - .entityBox { - fill: ${options.mainBkg}; - stroke: ${options.nodeBorder}; - } - - .attributeBoxOdd { - fill: ${options.attributeBackgroundColorOdd}; - stroke: ${options.nodeBorder}; - } - - .attributeBoxEven { - fill: ${options.attributeBackgroundColorEven}; - stroke: ${options.nodeBorder}; - } - - .relationshipLabelBox { - fill: ${options.tertiaryColor}; - opacity: 0.7; - background-color: ${options.tertiaryColor}; - rect { - opacity: 0.5; - } - } - - .relationshipLine { - stroke: ${options.lineColor}; - } - - .entityTitleText { - text-anchor: middle; - font-size: 18px; - fill: ${options.textColor}; - } - #MD_PARENT_START { - fill: #f5f5f5 !important; - stroke: ${options.lineColor} !important; - stroke-width: 1; - } - #MD_PARENT_END { - fill: #f5f5f5 !important; - stroke: ${options.lineColor} !important; - stroke-width: 1; - } - -`; -const erStyles = getStyles; -const diagram = { - parser: erParser, - db: erDb, - renderer: erRenderer, - styles: erStyles -}; - - - -/***/ }) - -}; -; \ No newline at end of file diff --git a/assets/js/17896441.4b27cab6.js b/assets/js/17896441.4b27cab6.js new file mode 100644 index 000000000000..4c77dc13b8d0 --- /dev/null +++ b/assets/js/17896441.4b27cab6.js @@ -0,0 +1,2 @@ +/*! For license information please see 17896441.4b27cab6.js.LICENSE.txt */ +(self.webpackChunk=self.webpackChunk||[]).push([[8401],{69119:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BLANK_URL=e.relativeFirstCharacters=e.whitespaceEscapeCharsRegex=e.urlSchemeRegex=e.ctrlCharactersRegex=e.htmlCtrlEntityRegex=e.htmlEntitiesRegex=e.invalidProtocolRegex=void 0,e.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,e.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,e.htmlCtrlEntityRegex=/&(newline|tab);/gi,e.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,e.urlSchemeRegex=/^.+(:|:)/gim,e.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,e.relativeFirstCharacters=[".","/"],e.BLANK_URL="about:blank"},16750:(t,e,r)=>{"use strict";e.J=void 0;var n=r(69119);function i(t){try{return decodeURIComponent(t)}catch(e){return t}}e.J=function(t){if(!t)return n.BLANK_URL;var e,r,a=i(t.trim());do{e=(a=i(a=(r=a,r.replace(n.ctrlCharactersRegex,"").replace(n.htmlEntitiesRegex,(function(t,e){return String.fromCharCode(e)}))).replace(n.htmlCtrlEntityRegex,"").replace(n.ctrlCharactersRegex,"").replace(n.whitespaceEscapeCharsRegex,"").trim())).match(n.ctrlCharactersRegex)||a.match(n.htmlEntitiesRegex)||a.match(n.htmlCtrlEntityRegex)||a.match(n.whitespaceEscapeCharsRegex)}while(e&&e.length>0);var o=a;if(!o)return n.BLANK_URL;if(function(t){return n.relativeFirstCharacters.indexOf(t[0])>-1}(o))return o;var s=o.trimStart(),l=s.match(n.urlSchemeRegex);if(!l)return o;var c=l[0].toLowerCase().trim();if(n.invalidProtocolRegex.test(c))return n.BLANK_URL;var h=s.replace(/\\/g,"/");if("mailto:"===c||c.includes("://"))return h;if("http:"===c||"https:"===c){if(!function(t){return URL.canParse(t)}(h))return n.BLANK_URL;var u=new URL(h);return u.protocol=u.protocol.toLowerCase(),u.hostname=u.hostname.toLowerCase(),u.toString()}return h}},71243:(t,e,r)=>{"use strict";r.d(e,{A:()=>y});r(96540);var n=r(34164),i=r(17559),a=r(26972),o=r(99169),s=r(28774),l=r(21312),c=r(86025),h=r(74848);function u(t){return(0,h.jsx)("svg",Object.assign({viewBox:"0 0 24 24"},t,{children:(0,h.jsx)("path",{d:"M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z",fill:"currentColor"})}))}const d={breadcrumbHomeIcon:"breadcrumbHomeIcon_YNFT"};function p(){var t=(0,c.Ay)("/");return(0,h.jsx)("li",{className:"breadcrumbs__item",children:(0,h.jsx)(s.A,{"aria-label":(0,l.T)({id:"theme.docs.breadcrumbs.home",message:"Home page",description:"The ARIA label for the home page in the breadcrumbs"}),className:"breadcrumbs__link",href:t,children:(0,h.jsx)(u,{className:d.breadcrumbHomeIcon})})})}const f={breadcrumbsContainer:"breadcrumbsContainer_Z_bl"};function g(t){var e=t.children,r=t.href,n="breadcrumbs__link";return t.isLast?(0,h.jsx)("span",{className:n,itemProp:"name",children:e}):r?(0,h.jsx)(s.A,{className:n,href:r,itemProp:"item",children:(0,h.jsx)("span",{itemProp:"name",children:e})}):(0,h.jsx)("span",{className:n,children:e})}function m(t){var e=t.children,r=t.active,i=t.index,a=t.addMicrodata;return(0,h.jsxs)("li",Object.assign({},a&&{itemScope:!0,itemProp:"itemListElement",itemType:"https://schema.org/ListItem"},{className:(0,n.A)("breadcrumbs__item",{"breadcrumbs__item--active":r}),children:[e,(0,h.jsx)("meta",{itemProp:"position",content:String(i+1)})]}))}function y(){var t=(0,a.OF)(),e=(0,o.Dt)();return t?(0,h.jsx)("nav",{className:(0,n.A)(i.G.docs.docBreadcrumbs,f.breadcrumbsContainer),"aria-label":(0,l.T)({id:"theme.docs.breadcrumbs.navAriaLabel",message:"Breadcrumbs",description:"The ARIA label for the breadcrumbs"}),children:(0,h.jsxs)("ul",{className:"breadcrumbs",itemScope:!0,itemType:"https://schema.org/BreadcrumbList",children:[e&&(0,h.jsx)(p,{}),t.map((function(e,r){var n=r===t.length-1,i="category"===e.type&&e.linkUnlisted?void 0:e.href;return(0,h.jsx)(m,{active:n,index:r,addMicrodata:!!i,children:(0,h.jsx)(g,{href:i,isLast:n,children:e.label})},r)}))]})}):null}},48220:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>Vi});var n=r(96540),i=r(69024),a=r(43807),o=r(74848),s=n.createContext(null);function l(t){var e=t.children,r=function(t){return(0,n.useMemo)((function(){return{metadata:t.metadata,frontMatter:t.frontMatter,assets:t.assets,contentTitle:t.contentTitle,toc:t.toc}}),[t])}(t.content);return(0,o.jsx)(s.Provider,{value:r,children:e})}function c(){var t=(0,n.useContext)(s);if(null===t)throw new a.dV("DocProvider");return t}function h(){var t,e=c(),r=e.metadata,n=e.frontMatter,a=e.assets;return(0,o.jsx)(i.be,{title:r.title,description:r.description,keywords:n.keywords,image:null!=(t=a.image)?t:n.image})}var u=r(34164),d=r(24581),p=r(86929);function f(){var t=c().metadata;return(0,o.jsx)(p.A,{previous:t.previous,next:t.next})}var g=r(51878),m=r(4267),y=r(17559),x=r(21312),b=r(28774);const k={tag:"tag_zVej",tagRegular:"tagRegular_sFm0",tagWithCount:"tagWithCount_h2kH"};function C(t){var e=t.permalink,r=t.label,n=t.count,i=t.description;return(0,o.jsxs)(b.A,{href:e,title:i,className:(0,u.A)(k.tag,n?k.tagWithCount:k.tagRegular),children:[r,n&&(0,o.jsx)("span",{children:n})]})}const w={tags:"tags_jXut",tag:"tag_QGVx"};function v(t){var e=t.tags;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("b",{children:(0,o.jsx)(x.A,{id:"theme.tags.tagsListLabel",description:"The label alongside a tag list",children:"Tags:"})}),(0,o.jsx)("ul",{className:(0,u.A)(w.tags,"padding--none","margin-left--sm"),children:e.map((function(t){return(0,o.jsx)("li",{className:w.tag,children:(0,o.jsx)(C,Object.assign({},t))},t.permalink)}))})]})}var _=r(98587);const S={iconEdit:"iconEdit_Z9Sw"};var A=["className"];function T(t){var e=t.className,r=(0,_.A)(t,A);return(0,o.jsx)("svg",Object.assign({fill:"currentColor",height:"20",width:"20",viewBox:"0 0 40 40",className:(0,u.A)(S.iconEdit,e),"aria-hidden":"true"},r,{children:(0,o.jsx)("g",{children:(0,o.jsx)("path",{d:"m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"})})}))}function M(t){var e=t.editUrl;return(0,o.jsxs)(b.A,{to:e,className:y.G.common.editThisPage,children:[(0,o.jsx)(T,{}),(0,o.jsx)(x.A,{id:"theme.common.editThisPage",description:"The link label to edit the current page",children:"Edit this page"})]})}var B=r(44586);function L(t){void 0===t&&(t={});var e=(0,B.A)().i18n.currentLocale,r=function(){var t=(0,B.A)().i18n,e=t.currentLocale;return t.localeConfigs[e].calendar}();return new Intl.DateTimeFormat(e,Object.assign({calendar:r},t))}function F(t){var e=t.lastUpdatedAt,r=new Date(e),n=L({day:"numeric",month:"short",year:"numeric",timeZone:"UTC"}).format(r);return(0,o.jsx)(x.A,{id:"theme.lastUpdated.atDate",description:"The words used to describe on which date a page has been last updated",values:{date:(0,o.jsx)("b",{children:(0,o.jsx)("time",{dateTime:r.toISOString(),itemProp:"dateModified",children:n})})},children:" on {date}"})}function $(t){var e=t.lastUpdatedBy;return(0,o.jsx)(x.A,{id:"theme.lastUpdated.byUser",description:"The words used to describe by who the page has been last updated",values:{user:(0,o.jsx)("b",{children:e})},children:" by {user}"})}function E(t){var e=t.lastUpdatedAt,r=t.lastUpdatedBy;return(0,o.jsxs)("span",{className:y.G.common.lastUpdated,children:[(0,o.jsx)(x.A,{id:"theme.lastUpdated.lastUpdatedAtBy",description:"The sentence used to display when a page has been last updated, and by who",values:{atDate:e?(0,o.jsx)(F,{lastUpdatedAt:e}):"",byUser:r?(0,o.jsx)($,{lastUpdatedBy:r}):""},children:"Last updated{atDate}{byUser}"}),!1]})}const j={lastUpdated:"lastUpdated_JAkA"};function N(t){var e=t.className,r=t.editUrl,n=t.lastUpdatedAt,i=t.lastUpdatedBy;return(0,o.jsxs)("div",{className:(0,u.A)("row",e),children:[(0,o.jsx)("div",{className:"col",children:r&&(0,o.jsx)(M,{editUrl:r})}),(0,o.jsx)("div",{className:(0,u.A)("col",j.lastUpdated),children:(n||i)&&(0,o.jsx)(E,{lastUpdatedAt:n,lastUpdatedBy:i})})]})}function D(){var t=c().metadata,e=t.editUrl,r=t.lastUpdatedAt,n=t.lastUpdatedBy,i=t.tags,a=i.length>0,s=!!(e||r||n);return a||s?(0,o.jsxs)("footer",{className:(0,u.A)(y.G.docs.docFooter,"docusaurus-mt-lg"),children:[a&&(0,o.jsx)("div",{className:(0,u.A)("row margin-top--sm",y.G.docs.docFooterTagsRow),children:(0,o.jsx)("div",{className:"col",children:(0,o.jsx)(v,{tags:i})})}),s&&(0,o.jsx)(N,{className:(0,u.A)("margin-top--sm",y.G.docs.docFooterEditMetaRow),editUrl:e,lastUpdatedAt:r,lastUpdatedBy:n})]}):null}var O=r(41422),I=r(6342),R=["parentIndex"];function P(t){var e=t.map((function(t){return Object.assign({},t,{parentIndex:-1,children:[]})})),r=Array(7).fill(-1);e.forEach((function(t,e){var n=r.slice(2,t.level);t.parentIndex=Math.max.apply(Math,n),r[t.level]=e}));var n=[];return e.forEach((function(t){var r=t.parentIndex,i=(0,_.A)(t,R);r>=0?e[r].children.push(i):n.push(i)})),n}function z(t){var e=t.toc,r=t.minHeadingLevel,n=t.maxHeadingLevel;return e.flatMap((function(t){var e=z({toc:t.children,minHeadingLevel:r,maxHeadingLevel:n});return function(t){return t.level>=r&&t.level<=n}(t)?[Object.assign({},t,{children:e})]:e}))}function K(t){var e=t.getBoundingClientRect();return e.top===e.bottom?K(t.parentNode):e}function q(t,e){var r,n,i=e.anchorTopOffset,a=t.find((function(t){return K(t).top>=i}));return a?function(t){return t.top>0&&t.bottom",end:""}}),wt=Object.keys(kt);function vt(t,e){var r=t.map((function(t){var r=Ct[t],n=r.start,i=r.end;return"(?:"+n+"\\s*("+e.flatMap((function(t){var e,r;return[t.line,null==(e=t.block)?void 0:e.start,null==(r=t.block)?void 0:r.end].filter(Boolean)})).join("|")+")\\s*"+i+")"})).join("|");return new RegExp("^\\s*(?:"+r+")\\s*$")}function _t(t,e){var r=t.replace(/\n$/,""),n=e.language,i=e.magicComments,a=e.metastring;if(a&&bt.test(a)){var o=a.match(bt).groups.range;if(0===i.length)throw new Error("A highlight range has been given in code block's metastring (``` "+a+"), but no magic comment config is available. Docusaurus applies the first magic comment entry's className for metastring ranges.");var s=i[0].className,l=yt()(o).filter((function(t){return t>0})).map((function(t){return[t-1,[s]]}));return{lineClassNames:Object.fromEntries(l),code:r}}if(void 0===n)return{lineClassNames:{},code:r};for(var c=function(t,e){switch(t){case"js":case"javascript":case"ts":case"typescript":return vt(["js","jsBlock"],e);case"jsx":case"tsx":return vt(["js","jsBlock","jsx"],e);case"html":return vt(["js","jsBlock","html"],e);case"python":case"py":case"bash":return vt(["bash"],e);case"markdown":case"md":return vt(["html","jsx","bash"],e);case"tex":case"latex":case"matlab":return vt(["tex"],e);case"lua":case"haskell":case"sql":return vt(["lua"],e);case"wasm":return vt(["wasm"],e);case"vb":case"vba":case"visual-basic":return vt(["vb","rem"],e);case"vbnet":return vt(["vbnet","rem"],e);case"batch":return vt(["rem"],e);case"basic":return vt(["rem","f90"],e);case"fsharp":return vt(["js","ml"],e);case"ocaml":case"sml":return vt(["ml"],e);case"fortran":return vt(["f90"],e);case"cobol":return vt(["cobol"],e);default:return vt(wt,e)}}(n,i),h=r.split("\n"),u=Object.fromEntries(i.map((function(t){return[t.className,{start:0,range:""}]}))),d=Object.fromEntries(i.filter((function(t){return t.line})).map((function(t){var e=t.className;return[t.line,e]}))),p=Object.fromEntries(i.filter((function(t){return t.block})).map((function(t){var e=t.className;return[t.block.start,e]}))),f=Object.fromEntries(i.filter((function(t){return t.block})).map((function(t){var e=t.className;return[t.block.end,e]}))),g=0;g0&&o.getRangeAt(0);n.append(i),i.select(),i.selectionStart=0,i.selectionEnd=t.length;var l=!1;try{l=document.execCommand("copy")}catch(c){}i.remove(),s&&(o.removeAllRanges(),o.addRange(s)),a&&a.focus()}(e),s(!0),l.current=window.setTimeout((function(){s(!1)}),1e3)}),[e]);return(0,n.useEffect)((function(){return function(){return window.clearTimeout(l.current)}}),[]),(0,o.jsx)("button",{type:"button","aria-label":a?(0,x.T)({id:"theme.CodeBlock.copied",message:"Copied",description:"The copied button label on code blocks"}):(0,x.T)({id:"theme.CodeBlock.copyButtonAriaLabel",message:"Copy code to clipboard",description:"The ARIA label for copy code blocks button"}),title:(0,x.T)({id:"theme.CodeBlock.copy",message:"Copy",description:"The copy button label on code blocks"}),className:(0,u.A)("clean-btn",r,Rt.copyButton,a&&Rt.copyButtonCopied),onClick:c,children:(0,o.jsxs)("span",{className:Rt.copyButtonIcons,"aria-hidden":"true",children:[(0,o.jsx)(Ot,{className:Rt.copyButtonIcon}),(0,o.jsx)(It,{className:Rt.copyButtonSuccessIcon})]})})}function zt(t){return(0,o.jsx)("svg",Object.assign({viewBox:"0 0 24 24"},t,{children:(0,o.jsx)("path",{fill:"currentColor",d:"M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"})}))}const Kt="wordWrapButtonIcon_Bwma",qt="wordWrapButtonEnabled_EoeP";function Wt(t){var e=t.className,r=t.onClick,n=t.isEnabled,i=(0,x.T)({id:"theme.CodeBlock.wordWrapToggle",message:"Toggle word wrap",description:"The title attribute for toggle word wrapping button of code block lines"});return(0,o.jsx)("button",{type:"button",onClick:r,className:(0,u.A)("clean-btn",e,n&&qt),"aria-label":i,title:i,children:(0,o.jsx)(zt,{className:Kt,"aria-hidden":"true"})})}function Ht(t){var e,r,i,a,s,l,c,h,d,p,f,g=t.children,m=t.className,y=void 0===m?"":m,x=t.metastring,b=t.title,k=t.showLineNumbers,C=t.language,w=(0,I.p)().prism,v=w.defaultLanguage,_=w.magicComments,S=function(t){return null==t?void 0:t.toLowerCase()}(null!=(e=null!=C?C:null==(r=y.split(" ").find((function(t){return t.startsWith("language-")})))?void 0:r.replace(/language-/,""))?e:v),A=ft(),T=(i=(0,n.useState)(!1),a=i[0],s=i[1],l=(0,n.useState)(!1),c=l[0],h=l[1],d=(0,n.useRef)(null),p=(0,n.useCallback)((function(){var t=d.current.querySelector("code");a?t.removeAttribute("style"):(t.style.whiteSpace="pre-wrap",t.style.overflowWrap="anywhere"),s((function(t){return!t}))}),[d,a]),f=(0,n.useCallback)((function(){var t=d.current,e=t.scrollWidth>t.clientWidth||d.current.querySelector("code").hasAttribute("style");h(e)}),[d]),Ft(d,f),(0,n.useEffect)((function(){f()}),[a,f]),(0,n.useEffect)((function(){return window.addEventListener("resize",f,{passive:!0}),function(){window.removeEventListener("resize",f)}}),[f]),{codeBlockRef:d,isEnabled:a,isCodeScrollable:c,toggle:p}),M=function(t){var e,r;return null!=(e=null==t||null==(r=t.match(xt))?void 0:r.groups.title)?e:""}(x)||b,B=_t(g,{metastring:x,language:S,magicComments:_}),L=B.lineClassNames,F=B.code,$=null!=k?k:function(t){return Boolean(null==t?void 0:t.includes("showLineNumbers"))}(x);return(0,o.jsxs)(Tt,{as:"div",className:(0,u.A)(y,S&&!y.includes("language-"+S)&&"language-"+S),children:[M&&(0,o.jsx)("div",{className:Mt.codeBlockTitle,children:M}),(0,o.jsxs)("div",{className:Mt.codeBlockContent,children:[(0,o.jsx)($t.f4,{theme:A,code:F,language:null!=S?S:"text",children:function(t){var e=t.className,r=t.style,n=t.tokens,i=t.getLineProps,a=t.getTokenProps;return(0,o.jsx)("pre",{tabIndex:0,ref:T.codeBlockRef,className:(0,u.A)(e,Mt.codeBlock,"thin-scrollbar"),style:r,children:(0,o.jsx)("code",{className:(0,u.A)(Mt.codeBlockLines,$&&Mt.codeBlockLinesWithNumbering),children:n.map((function(t,e){return(0,o.jsx)(Dt,{line:t,getLineProps:i,getTokenProps:a,classNames:L[e],showLineNumbers:$},e)}))})})}}),(0,o.jsxs)("div",{className:Mt.buttonGroup,children:[(T.isEnabled||T.isCodeScrollable)&&(0,o.jsx)(Wt,{className:Mt.codeButton,onClick:function(){return T.toggle()},isEnabled:T.isEnabled}),(0,o.jsx)(Pt,{className:Mt.codeButton,code:F})]})]})]})}var Ut=["children"];function Yt(t){var e=t.children,r=(0,_.A)(t,Ut),i=(0,dt.A)(),a=function(t){return n.Children.toArray(t).some((function(t){return(0,n.isValidElement)(t)}))?t:Array.isArray(t)?t.join(""):t}(e),s="string"==typeof a?Ht:Bt;return(0,o.jsx)(s,Object.assign({},r,{children:a}),String(i))}function Gt(t){return(0,o.jsx)("code",Object.assign({},t))}var Vt=r(63427);const Zt="details_lb9f",Xt="isBrowser_bmU9",Qt="collapsibleContent_i85q";var Jt=["summary","children"];function te(t){return!!t&&("SUMMARY"===t.tagName||te(t.parentElement))}function ee(t,e){return!!t&&(t===e||ee(t.parentElement,e))}function re(t){var e=t.summary,r=t.children,i=(0,_.A)(t,Jt);(0,Vt.A)().collectAnchor(i.id);var a=(0,dt.A)(),s=(0,n.useRef)(null),l=(0,O.u)({initialState:!i.open}),c=l.collapsed,h=l.setCollapsed,d=(0,n.useState)(i.open),p=d[0],f=d[1],g=n.isValidElement(e)?e:(0,o.jsx)("summary",{children:null!=e?e:"Details"});return(0,o.jsxs)("details",Object.assign({},i,{ref:s,open:p,"data-collapsed":c,className:(0,u.A)(Zt,a&&Xt,i.className),onMouseDown:function(t){te(t.target)&&t.detail>1&&t.preventDefault()},onClick:function(t){t.stopPropagation();var e=t.target;te(e)&&ee(e,s.current)&&(t.preventDefault(),c?(h(!1),f(!0)):h(!0))},children:[g,(0,o.jsx)(O.N,{lazy:!1,collapsed:c,disableSSRStyle:!0,onCollapseTransitionEnd:function(t){h(t),f(!t)},children:(0,o.jsx)("div",{className:Qt,children:r})})]}))}const ne="details_b_Ee";function ie(t){var e=Object.assign({},(function(t){if(null==t)throw new TypeError("Cannot destructure "+t)}(t),t));return(0,o.jsx)(re,Object.assign({},e,{className:(0,u.A)("alert alert--info",ne,e.className)}))}function ae(t){var e=n.Children.toArray(t.children),r=e.find((function(t){return n.isValidElement(t)&&"summary"===t.type})),i=(0,o.jsx)(o.Fragment,{children:e.filter((function(t){return t!==r}))});return(0,o.jsx)(ie,Object.assign({},t,{summary:r,children:i}))}function oe(t){return(0,o.jsx)(ct.A,Object.assign({},t))}const se="containsTaskList_mC6p";function le(t){if(void 0!==t)return(0,u.A)(t,(null==t?void 0:t.includes("contains-task-list"))&&se)}const ce="img_ev3q";function he(t){var e,r=function(t){var e=n.Children.toArray(t),r=e.find((function(t){return n.isValidElement(t)&&"mdxAdmonitionTitle"===t.type})),i=e.filter((function(t){return t!==r}));return{mdxAdmonitionTitle:null==r?void 0:r.props.children,rest:i.length>0?(0,o.jsx)(o.Fragment,{children:i}):null}}(t.children),i=r.mdxAdmonitionTitle,a=r.rest,s=null!=(e=t.title)?e:i;return Object.assign({},t,s&&{title:s},{children:a})}const ue="admonition_xJq3",de="admonitionHeading_Gvgb",pe="admonitionIcon_Rf37",fe="admonitionContent_BuS1";function ge(t){var e=t.type,r=t.className,n=t.children;return(0,o.jsx)("div",{className:(0,u.A)(y.G.common.admonition,y.G.common.admonitionType(e),ue,r),children:n})}function me(t){var e=t.icon,r=t.title;return(0,o.jsxs)("div",{className:de,children:[(0,o.jsx)("span",{className:pe,children:e}),r]})}function ye(t){var e=t.children;return e?(0,o.jsx)("div",{className:fe,children:e}):null}function xe(t){var e=t.type,r=t.icon,n=t.title,i=t.children,a=t.className;return(0,o.jsxs)(ge,{type:e,className:a,children:[n||r?(0,o.jsx)(me,{title:n,icon:r}):null,(0,o.jsx)(ye,{children:i})]})}function be(t){return(0,o.jsx)("svg",Object.assign({viewBox:"0 0 14 16"},t,{children:(0,o.jsx)("path",{fillRule:"evenodd",d:"M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"})}))}var ke={icon:(0,o.jsx)(be,{}),title:(0,o.jsx)(x.A,{id:"theme.admonition.note",description:"The default label used for the Note admonition (:::note)",children:"note"})};function Ce(t){return(0,o.jsx)(xe,Object.assign({},ke,t,{className:(0,u.A)("alert alert--secondary",t.className),children:t.children}))}function we(t){return(0,o.jsx)("svg",Object.assign({viewBox:"0 0 12 16"},t,{children:(0,o.jsx)("path",{fillRule:"evenodd",d:"M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"})}))}var ve={icon:(0,o.jsx)(we,{}),title:(0,o.jsx)(x.A,{id:"theme.admonition.tip",description:"The default label used for the Tip admonition (:::tip)",children:"tip"})};function _e(t){return(0,o.jsx)(xe,Object.assign({},ve,t,{className:(0,u.A)("alert alert--success",t.className),children:t.children}))}function Se(t){return(0,o.jsx)("svg",Object.assign({viewBox:"0 0 14 16"},t,{children:(0,o.jsx)("path",{fillRule:"evenodd",d:"M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"})}))}var Ae={icon:(0,o.jsx)(Se,{}),title:(0,o.jsx)(x.A,{id:"theme.admonition.info",description:"The default label used for the Info admonition (:::info)",children:"info"})};function Te(t){return(0,o.jsx)(xe,Object.assign({},Ae,t,{className:(0,u.A)("alert alert--info",t.className),children:t.children}))}function Me(t){return(0,o.jsx)("svg",Object.assign({viewBox:"0 0 16 16"},t,{children:(0,o.jsx)("path",{fillRule:"evenodd",d:"M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"})}))}var Be={icon:(0,o.jsx)(Me,{}),title:(0,o.jsx)(x.A,{id:"theme.admonition.warning",description:"The default label used for the Warning admonition (:::warning)",children:"warning"})};function Le(t){return(0,o.jsx)("svg",Object.assign({viewBox:"0 0 12 16"},t,{children:(0,o.jsx)("path",{fillRule:"evenodd",d:"M5.05.31c.81 2.17.41 3.38-.52 4.31C3.55 5.67 1.98 6.45.9 7.98c-1.45 2.05-1.7 6.53 3.53 7.7-2.2-1.16-2.67-4.52-.3-6.61-.61 2.03.53 3.33 1.94 2.86 1.39-.47 2.3.53 2.27 1.67-.02.78-.31 1.44-1.13 1.81 3.42-.59 4.78-3.42 4.78-5.56 0-2.84-2.53-3.22-1.25-5.61-1.52.13-2.03 1.13-1.89 2.75.09 1.08-1.02 1.8-1.86 1.33-.67-.41-.66-1.19-.06-1.78C8.18 5.31 8.68 2.45 5.05.32L5.03.3l.02.01z"})}))}var Fe={icon:(0,o.jsx)(Le,{}),title:(0,o.jsx)(x.A,{id:"theme.admonition.danger",description:"The default label used for the Danger admonition (:::danger)",children:"danger"})};var $e={icon:(0,o.jsx)(Me,{}),title:(0,o.jsx)(x.A,{id:"theme.admonition.caution",description:"The default label used for the Caution admonition (:::caution)",children:"caution"})};var Ee={note:Ce,tip:_e,info:Te,warning:function(t){return(0,o.jsx)(xe,Object.assign({},Be,t,{className:(0,u.A)("alert alert--warning",t.className),children:t.children}))},danger:function(t){return(0,o.jsx)(xe,Object.assign({},Fe,t,{className:(0,u.A)("alert alert--danger",t.className),children:t.children}))}},je={secondary:function(t){return(0,o.jsx)(Ce,Object.assign({title:"secondary"},t))},important:function(t){return(0,o.jsx)(Te,Object.assign({title:"important"},t))},success:function(t){return(0,o.jsx)(_e,Object.assign({title:"success"},t))},caution:function(t){return(0,o.jsx)(xe,Object.assign({},$e,t,{className:(0,u.A)("alert alert--warning",t.className),children:t.children}))}};const Ne=Object.assign({},Ee,je);function De(t){var e,r=he(t),n=(e=r.type,Ne[e]||(console.warn('No admonition component found for admonition type "'+e+'". Using Info as fallback.'),Ne.info));return(0,o.jsx)(n,Object.assign({},r))}var Oe=r(67489),Ie=r(12181),Re=r(90675),Pe=r(10467),ze=r(79515),Ke=r(79740),qe=(r(6396),r(5081),r(34483)),We=(r(52294),r(62392),r(86825),r(85039)),He=r(29196),Ue=r(61021),Ye=r(45567),Ge=r(60513),Ve=r(20007),Ze="comm",Xe="rule",Qe="decl",Je=Math.abs,tr=String.fromCharCode;Object.assign;function er(t){return t.trim()}function rr(t,e,r){return t.replace(e,r)}function nr(t,e,r){return t.indexOf(e,r)}function ir(t,e){return 0|t.charCodeAt(e)}function ar(t,e,r){return t.slice(e,r)}function or(t){return t.length}function sr(t,e){return e.push(t),t}function lr(t,e){for(var r="",n=0;n0?ir(gr,--pr):0,ur--,10===fr&&(ur=1,hr--),fr}function xr(){return fr=pr2||wr(fr)>3?"":" "}function Tr(t,e){for(;--e&&xr()&&!(fr<48||fr>102||fr>57&&fr<65||fr>70&&fr<97););return Cr(t,kr()+(e<6&&32==br()&&32==xr()))}function Mr(t){for(;xr();)switch(fr){case t:return pr;case 34:case 39:34!==t&&39!==t&&Mr(fr);break;case 40:41===t&&Mr(t);break;case 92:xr()}return pr}function Br(t,e){for(;xr()&&t+fr!==57&&(t+fr!==84||47!==br()););return"/*"+Cr(e,pr-1)+"*"+tr(47===t?t:xr())}function Lr(t){for(;!wr(br());)xr();return Cr(t,pr)}function Fr(t){return _r($r("",null,null,null,[""],t=vr(t),0,[0],t))}function $r(t,e,r,n,i,a,o,s,l){for(var c=0,h=0,u=o,d=0,p=0,f=0,g=1,m=1,y=1,x=0,b="",k=i,C=a,w=n,v=b;m;)switch(f=x,x=xr()){case 40:if(108!=f&&58==ir(v,u-1)){-1!=nr(v+=rr(Sr(x),"&","&\f"),"&\f",Je(c?s[c-1]:0))&&(y=-1);break}case 34:case 39:case 91:v+=Sr(x);break;case 9:case 10:case 13:case 32:v+=Ar(f);break;case 92:v+=Tr(kr()-1,7);continue;case 47:switch(br()){case 42:case 47:sr(jr(Br(xr(),kr()),e,r,l),l),5!=wr(f||1)&&5!=wr(br()||1)||!or(v)||" "===ar(v,-1,void 0)||(v+=" ");break;default:v+="/"}break;case 123*g:s[c++]=or(v)*y;case 125*g:case 59:case 0:switch(x){case 0:case 125:m=0;case 59+h:-1==y&&(v=rr(v,/\f/g,"")),p>0&&(or(v)-u||0===g&&47===f)&&sr(p>32?Nr(v+";",n,r,u-1,l):Nr(rr(v," ","")+";",n,r,u-2,l),l);break;case 59:v+=";";default:if(sr(w=Er(v,e,r,c,h,i,s,b,k=[],C=[],u,a),a),123===x)if(0===h)$r(v,e,w,w,k,a,u,s,C);else switch(99===d&&110===ir(v,3)?100:d){case 100:case 108:case 109:case 115:$r(t,w,w,n&&sr(Er(t,w,w,0,0,i,s,b,i,k=[],u,C),C),i,C,u,s,n?k:C);break;default:$r(v,w,w,w,[""],C,0,s,C)}}c=h=p=0,g=y=1,b=v="",u=o;break;case 58:u=1+or(v),p=f;default:if(g<1)if(123==x)--g;else if(125==x&&0==g++&&125==yr())continue;switch(v+=tr(x),x*g){case 38:y=h>0?1:(v+="\f",-1);break;case 44:s[c++]=(or(v)-1)*y,y=1;break;case 64:45===br()&&(v+=Sr(xr())),d=br(),h=u=or(b=v+=Lr(kr())),x++;break;case 45:45===f&&2==or(v)&&(g=0)}}return a}function Er(t,e,r,n,i,a,o,s,l,c,h,u){for(var d=i-1,p=0===i?a:[""],f=function(t){return t.length}(p),g=0,m=0,y=0;g0?p[x]+" "+b:rr(b,/&\f/g,p[x])))&&(l[y++]=k);return mr(t,e,r,0===i?Xe:s,l,c,h,u)}function jr(t,e,r,n){return mr(t,e,r,Ze,tr(fr),ar(t,2,-2),0,n)}function Nr(t,e,r,n,i){return mr(t,e,r,Qe,ar(t,0,n),ar(t,n+1,-1),n,i)}var Dr=r(42838),Or=r(66401),Ir={id:"c4",detector:(0,Ye.K2)((t=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t)),"detector"),loader:(0,Ye.K2)((async()=>{const{diagram:t}=await r.e(155).then(r.bind(r,60155));return{id:"c4",diagram:t}}),"loader")},Rr="flowchart",Pr={id:Rr,detector:(0,Ye.K2)(((t,e)=>"dagre-wrapper"!==e?.flowchart?.defaultRenderer&&"elk"!==e?.flowchart?.defaultRenderer&&/^\s*graph/.test(t)),"detector"),loader:(0,Ye.K2)((async()=>{const{diagram:t}=await r.e(1689).then(r.bind(r,71689));return{id:Rr,diagram:t}}),"loader")},zr="flowchart-v2",Kr={id:zr,detector:(0,Ye.K2)(((t,e)=>"dagre-d3"!==e?.flowchart?.defaultRenderer&&("elk"===e?.flowchart?.defaultRenderer&&(e.layout="elk"),!(!/^\s*graph/.test(t)||"dagre-wrapper"!==e?.flowchart?.defaultRenderer)||/^\s*flowchart/.test(t))),"detector"),loader:(0,Ye.K2)((async()=>{const{diagram:t}=await r.e(1689).then(r.bind(r,71689));return{id:zr,diagram:t}}),"loader")},qr={id:"er",detector:(0,Ye.K2)((t=>/^\s*erDiagram/.test(t)),"detector"),loader:(0,Ye.K2)((async()=>{const{diagram:t}=await Promise.all([r.e(3624),r.e(2334),r.e(4310)]).then(r.bind(r,94310));return{id:"er",diagram:t}}),"loader")},Wr="gitGraph",Hr={id:Wr,detector:(0,Ye.K2)((t=>/^\s*gitGraph/.test(t)),"detector"),loader:(0,Ye.K2)((async()=>{const{diagram:t}=await Promise.all([r.e(3624),r.e(8731),r.e(8174)]).then(r.bind(r,78174));return{id:Wr,diagram:t}}),"loader")},Ur="gantt",Yr={id:Ur,detector:(0,Ye.K2)((t=>/^\s*gantt/.test(t)),"detector"),loader:(0,Ye.K2)((async()=>{const{diagram:t}=await r.e(4092).then(r.bind(r,81711));return{id:Ur,diagram:t}}),"loader")},Gr="info",Vr={id:Gr,detector:(0,Ye.K2)((t=>/^\s*info/.test(t)),"detector"),loader:(0,Ye.K2)((async()=>{const{diagram:t}=await Promise.all([r.e(3624),r.e(8731),r.e(8998)]).then(r.bind(r,68998));return{id:Gr,diagram:t}}),"loader")},Zr={id:"pie",detector:(0,Ye.K2)((t=>/^\s*pie/.test(t)),"detector"),loader:(0,Ye.K2)((async()=>{const{diagram:t}=await Promise.all([r.e(3624),r.e(8731),r.e(2763)]).then(r.bind(r,62763));return{id:"pie",diagram:t}}),"loader")},Xr="quadrantChart",Qr={id:Xr,detector:(0,Ye.K2)((t=>/^\s*quadrantChart/.test(t)),"detector"),loader:(0,Ye.K2)((async()=>{const{diagram:t}=await r.e(3364).then(r.bind(r,73364));return{id:Xr,diagram:t}}),"loader")},Jr="xychart",tn={id:Jr,detector:(0,Ye.K2)((t=>/^\s*xychart-beta/.test(t)),"detector"),loader:(0,Ye.K2)((async()=>{const{diagram:t}=await r.e(9802).then(r.bind(r,89802));return{id:Jr,diagram:t}}),"loader")},en="requirement",rn={id:en,detector:(0,Ye.K2)((t=>/^\s*requirement(Diagram)?/.test(t)),"detector"),loader:(0,Ye.K2)((async()=>{const{diagram:t}=await Promise.all([r.e(3624),r.e(2334),r.e(8496)]).then(r.bind(r,8496));return{id:en,diagram:t}}),"loader")},nn="sequence",an={id:nn,detector:(0,Ye.K2)((t=>/^\s*sequenceDiagram/.test(t)),"detector"),loader:(0,Ye.K2)((async()=>{const{diagram:t}=await r.e(7032).then(r.bind(r,7032));return{id:nn,diagram:t}}),"loader")},on="class",sn={id:on,detector:(0,Ye.K2)(((t,e)=>"dagre-wrapper"!==e?.class?.defaultRenderer&&/^\s*classDiagram/.test(t)),"detector"),loader:(0,Ye.K2)((async()=>{const{diagram:t}=await Promise.all([r.e(6790),r.e(5606)]).then(r.bind(r,65606));return{id:on,diagram:t}}),"loader")},ln="classDiagram",cn={id:ln,detector:(0,Ye.K2)(((t,e)=>!(!/^\s*classDiagram/.test(t)||"dagre-wrapper"!==e?.class?.defaultRenderer)||/^\s*classDiagram-v2/.test(t)),"detector"),loader:(0,Ye.K2)((async()=>{const{diagram:t}=await Promise.all([r.e(6790),r.e(921)]).then(r.bind(r,80921));return{id:ln,diagram:t}}),"loader")},hn="state",un={id:hn,detector:(0,Ye.K2)(((t,e)=>"dagre-wrapper"!==e?.state?.defaultRenderer&&/^\s*stateDiagram/.test(t)),"detector"),loader:(0,Ye.K2)((async()=>{const{diagram:t}=await Promise.all([r.e(3624),r.e(2334),r.e(9664),r.e(484)]).then(r.bind(r,50484));return{id:hn,diagram:t}}),"loader")},dn="stateDiagram",pn={id:dn,detector:(0,Ye.K2)(((t,e)=>!!/^\s*stateDiagram-v2/.test(t)||!(!/^\s*stateDiagram/.test(t)||"dagre-wrapper"!==e?.state?.defaultRenderer)),"detector"),loader:(0,Ye.K2)((async()=>{const{diagram:t}=await Promise.all([r.e(9664),r.e(9875)]).then(r.bind(r,29875));return{id:dn,diagram:t}}),"loader")},fn="journey",gn={id:fn,detector:(0,Ye.K2)((t=>/^\s*journey/.test(t)),"detector"),loader:(0,Ye.K2)((async()=>{const{diagram:t}=await r.e(8379).then(r.bind(r,18379));return{id:fn,diagram:t}}),"loader")},mn={draw:(0,Ye.K2)(((t,e,r)=>{Ye.Rm.debug("rendering svg for syntax error\n");const n=(0,Ue.D)(e),i=n.append("g");n.attr("viewBox","0 0 2412 512"),(0,Ye.a$)(n,100,512,!0),i.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),i.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),i.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),i.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),i.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),i.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),i.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),i.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)}),"draw")},yn=mn,xn={db:{},renderer:mn,parser:{parse:(0,Ye.K2)((()=>{}),"parse")}},bn="flowchart-elk",kn={id:bn,detector:(0,Ye.K2)(((t,e={})=>!!(/^\s*flowchart-elk/.test(t)||/^\s*flowchart|graph/.test(t)&&"elk"===e?.flowchart?.defaultRenderer)&&(e.layout="elk",!0)),"detector"),loader:(0,Ye.K2)((async()=>{const{diagram:t}=await r.e(1689).then(r.bind(r,71689));return{id:bn,diagram:t}}),"loader")},Cn="timeline",wn={id:Cn,detector:(0,Ye.K2)((t=>/^\s*timeline/.test(t)),"detector"),loader:(0,Ye.K2)((async()=>{const{diagram:t}=await r.e(7357).then(r.bind(r,77357));return{id:Cn,diagram:t}}),"loader")},vn="mindmap",_n={id:vn,detector:(0,Ye.K2)((t=>/^\s*mindmap/.test(t)),"detector"),loader:(0,Ye.K2)((async()=>{const{diagram:t}=await Promise.all([r.e(165),r.e(4449)]).then(r.bind(r,14449));return{id:vn,diagram:t}}),"loader")},Sn="kanban",An={id:Sn,detector:(0,Ye.K2)((t=>/^\s*kanban/.test(t)),"detector"),loader:(0,Ye.K2)((async()=>{const{diagram:t}=await r.e(4445).then(r.bind(r,14445));return{id:Sn,diagram:t}}),"loader")},Tn="sankey",Mn={id:Tn,detector:(0,Ye.K2)((t=>/^\s*sankey-beta/.test(t)),"detector"),loader:(0,Ye.K2)((async()=>{const{diagram:t}=await r.e(7060).then(r.bind(r,27060));return{id:Tn,diagram:t}}),"loader")},Bn="packet",Ln={id:Bn,detector:(0,Ye.K2)((t=>/^\s*packet-beta/.test(t)),"detector"),loader:(0,Ye.K2)((async()=>{const{diagram:t}=await Promise.all([r.e(3624),r.e(8731),r.e(1186)]).then(r.bind(r,51186));return{id:Bn,diagram:t}}),"loader")},Fn="block",$n={id:Fn,detector:(0,Ye.K2)((t=>/^\s*block-beta/.test(t)),"detector"),loader:(0,Ye.K2)((async()=>{const{diagram:t}=await Promise.all([r.e(3624),r.e(3840)]).then(r.bind(r,53840));return{id:Fn,diagram:t}}),"loader")},En="architecture",jn={id:En,detector:(0,Ye.K2)((t=>/^\s*architecture/.test(t)),"detector"),loader:(0,Ye.K2)((async()=>{const{diagram:t}=await Promise.all([r.e(3624),r.e(8731),r.e(165),r.e(2247)]).then(r.bind(r,22247));return{id:En,diagram:t}}),"loader")},Nn=!1,Dn=(0,Ye.K2)((()=>{Nn||(Nn=!0,(0,Ye.Js)("error",xn,(t=>"error"===t.toLowerCase().trim())),(0,Ye.Js)("---",{db:{clear:(0,Ye.K2)((()=>{}),"clear")},styles:{},renderer:{draw:(0,Ye.K2)((()=>{}),"draw")},parser:{parse:(0,Ye.K2)((()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")}),"parse")},init:(0,Ye.K2)((()=>null),"init")},(t=>t.toLowerCase().trimStart().startsWith("---"))),(0,Ye.Xd)(Ir,An,cn,sn,qr,Yr,Vr,Zr,rn,an,kn,Kr,Pr,_n,wn,Hr,pn,un,gn,Qr,Mn,Ln,tn,$n,jn))}),"addDiagrams"),On=(0,Ye.K2)((async()=>{Ye.Rm.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(Ye.mW).map((async([t,{detector:e,loader:r}])=>{if(r)try{(0,Ye.Gs)(t)}catch{try{const{diagram:t,id:n}=await r();(0,Ye.Js)(n,t,e)}catch(n){throw Ye.Rm.error(`Failed to load external diagram with key ${t}. Removing from detectors.`),delete Ye.mW[t],n}}})))).filter((t=>"rejected"===t.status));if(t.length>0){Ye.Rm.error(`Failed to load ${t.length} external diagrams`);for(const e of t)Ye.Rm.error(e);throw new Error(`Failed to load ${t.length} external diagrams`)}}),"loadRegisteredDiagrams");function In(t,e){t.attr("role","graphics-document document"),""!==e&&t.attr("aria-roledescription",e)}function Rn(t,e,r,n){if(void 0!==t.insert){if(r){const e=`chart-desc-${n}`;t.attr("aria-describedby",e),t.insert("desc",":first-child").attr("id",e).text(r)}if(e){const r=`chart-title-${n}`;t.attr("aria-labelledby",r),t.insert("title",":first-child").attr("id",r).text(e)}}}(0,Ye.K2)(In,"setA11yDiagramInfo"),(0,Ye.K2)(Rn,"addSVGa11yTitleDescription");var Pn=class t{constructor(t,e,r,n,i){this.type=t,this.text=e,this.db=r,this.parser=n,this.renderer=i}static{(0,Ye.K2)(this,"Diagram")}static async fromText(e,r={}){const n=(0,Ye.zj)(),i=(0,Ye.Ch)(e,n);e=(0,We.C4)(e)+"\n";try{(0,Ye.Gs)(i)}catch{const t=(0,Ye.J$)(i);if(!t)throw new Ye.C0(`Diagram ${i} not found.`);const{id:e,diagram:r}=await t();(0,Ye.Js)(e,r)}const{db:a,parser:o,renderer:s,init:l}=(0,Ye.Gs)(i);return o.parser&&(o.parser.yy=a),a.clear?.(),l?.(n),r.title&&a.setDiagramTitle?.(r.title),await o.parse(e),new t(i,e,a,o,s)}async render(t,e){await this.renderer.draw(this.text,t,e,this)}getParser(){return this.parser}getType(){return this.type}},zn=[],Kn=(0,Ye.K2)((()=>{zn.forEach((t=>{t()})),zn=[]}),"attachFunctions"),qn=(0,Ye.K2)((t=>t.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart()),"cleanupComments");function Wn(t){const e=t.match(Ye.EJ);if(!e)return{text:t,metadata:{}};let r=(0,ze.H)(e[1],{schema:ze.r})??{};r="object"!=typeof r||Array.isArray(r)?{}:r;const n={};return r.displayMode&&(n.displayMode=r.displayMode.toString()),r.title&&(n.title=r.title.toString()),r.config&&(n.config=r.config),{text:t.slice(e[0].length),metadata:n}}(0,Ye.K2)(Wn,"extractFrontMatter");var Hn=(0,Ye.K2)((t=>t.replace(/\r\n?/g,"\n").replace(/<(\w+)([^>]*)>/g,((t,e,r)=>"<"+e+r.replace(/="([^"]*)"/g,"='$1'")+">"))),"cleanupText"),Un=(0,Ye.K2)((t=>{const{text:e,metadata:r}=Wn(t),{displayMode:n,title:i,config:a={}}=r;return n&&(a.gantt||(a.gantt={}),a.gantt.displayMode=n),{title:i,config:a,text:e}}),"processFrontmatter"),Yn=(0,Ye.K2)((t=>{const e=We._K.detectInit(t)??{},r=We._K.detectDirective(t,"wrap");return Array.isArray(r)?e.wrap=r.some((({type:t})=>"wrap"===t)):"wrap"===r?.type&&(e.wrap=!0),{text:(0,We.vU)(t),directive:e}}),"processDirectives");function Gn(t){const e=Hn(t),r=Un(e),n=Yn(r.text),i=(0,We.$t)(r.config,n.directive);return{code:t=qn(n.text),title:r.title,config:i}}function Vn(t){const e=(new TextEncoder).encode(t),r=Array.from(e,(t=>String.fromCodePoint(t))).join("");return btoa(r)}(0,Ye.K2)(Gn,"preprocessDiagram"),(0,Ye.K2)(Vn,"toBase64");var Zn=["foreignobject"],Xn=["dominant-baseline"];function Qn(t){const e=Gn(t);return(0,Ye.cL)(),(0,Ye.xA)(e.config??{}),e}async function Jn(t,e){Dn();try{const{code:e,config:r}=Qn(t);return{diagramType:(await hi(e)).type,config:r}}catch(r){if(e?.suppressErrors)return!1;throw r}}(0,Ye.K2)(Qn,"processAndSetConfigs"),(0,Ye.K2)(Jn,"parse");var ti=(0,Ye.K2)(((t,e,r=[])=>`\n.${t} ${e} { ${r.join(" !important; ")} !important; }`),"cssImportantStyles"),ei=(0,Ye.K2)(((t,e=new Map)=>{let r="";if(void 0!==t.themeCSS&&(r+=`\n${t.themeCSS}`),void 0!==t.fontFamily&&(r+=`\n:root { --mermaid-font-family: ${t.fontFamily}}`),void 0!==t.altFontFamily&&(r+=`\n:root { --mermaid-alt-font-family: ${t.altFontFamily}}`),e instanceof Map){const n=t.htmlLabels??t.flowchart?.htmlLabels?["> *","span"]:["rect","polygon","ellipse","circle","path"];e.forEach((t=>{(0,Or.A)(t.styles)||n.forEach((e=>{r+=ti(t.id,e,t.styles)})),(0,Or.A)(t.textStyles)||(r+=ti(t.id,"tspan",(t?.textStyles||[]).map((t=>t.replace("color","fill")))))}))}return r}),"createCssStyles"),ri=(0,Ye.K2)(((t,e,r,n)=>{const i=ei(t,r);return lr(Fr(`${n}{${(0,Ye.tM)(e,i,t.themeVariables)}}`),cr)}),"createUserStyles"),ni=(0,Ye.K2)(((t="",e,r)=>{let n=t;return r||e||(n=n.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),n=(0,We.Sm)(n),n=n.replace(/
/g,"
"),n}),"cleanUpSvgCode"),ii=(0,Ye.K2)(((t="",e)=>``),"putIntoIFrame"),ai=(0,Ye.K2)(((t,e,r,n,i)=>{const a=t.append("div");a.attr("id",r),n&&a.attr("style",n);const o=a.append("svg").attr("id",e).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg");return i&&o.attr("xmlns:xlink",i),o.append("g"),t}),"appendDivSvgG");function oi(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}(0,Ye.K2)(oi,"sandboxedIframe");var si=(0,Ye.K2)(((t,e,r,n)=>{t.getElementById(e)?.remove(),t.getElementById(r)?.remove(),t.getElementById(n)?.remove()}),"removeExistingElements"),li=(0,Ye.K2)((async function(t,e,r){Dn();const n=Qn(e);e=n.code;const i=(0,Ye.zj)();Ye.Rm.debug(i),e.length>(i?.maxTextSize??5e4)&&(e="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa");const a="#"+t,o="i"+t,s="#"+o,l="d"+t,c="#"+l,h=(0,Ye.K2)((()=>{const t=d?s:c,e=(0,Ve.Ltv)(t).node();e&&"remove"in e&&e.remove()}),"removeTempElements");let u=(0,Ve.Ltv)("body");const d="sandbox"===i.securityLevel,p="loose"===i.securityLevel,f=i.fontFamily;if(void 0!==r){if(r&&(r.innerHTML=""),d){const t=oi((0,Ve.Ltv)(r),o);u=(0,Ve.Ltv)(t.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=(0,Ve.Ltv)(r);ai(u,t,l,`font-family: ${f}`,"http://www.w3.org/1999/xlink")}else{if(si(document,t,l,o),d){const t=oi((0,Ve.Ltv)("body"),o);u=(0,Ve.Ltv)(t.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=(0,Ve.Ltv)("body");ai(u,t,l)}let g,m;try{g=await Pn.fromText(e,{title:n.title})}catch(M){if(i.suppressErrorRendering)throw h(),M;g=await Pn.fromText("error"),m=M}const y=u.select(c).node(),x=g.type,b=y.firstChild,k=b.firstChild,C=g.renderer.getClasses?.(e,g),w=ri(i,x,C,a),v=document.createElement("style");v.innerHTML=w,b.insertBefore(v,k);try{await g.renderer.draw(e,t,He.r,g)}catch(B){throw i.suppressErrorRendering?h():yn.draw(e,t,He.r),B}const _=u.select(`${c} svg`),S=g.db.getAccTitle?.(),A=g.db.getAccDescription?.();ui(x,_,S,A),u.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns","http://www.w3.org/1999/xhtml");let T=u.select(c).node().innerHTML;if(Ye.Rm.debug("config.arrowMarkerAbsolute",i.arrowMarkerAbsolute),T=ni(T,d,(0,Ye._3)(i.arrowMarkerAbsolute)),d){const t=u.select(c+" svg").node();T=ii(T,t)}else p||(T=Dr.sanitize(T,{ADD_TAGS:Zn,ADD_ATTR:Xn}));if(Kn(),m)throw m;return h(),{diagramType:x,svg:T,bindFunctions:g.db.bindFunctions}}),"render");function ci(t={}){const e=(0,Ye.hH)({},t);e?.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables||(e.themeVariables={}),e.themeVariables.fontFamily=e.fontFamily),(0,Ye.wZ)(e),e?.theme&&e.theme in Ye.H$?e.themeVariables=Ye.H$[e.theme].getThemeVariables(e.themeVariables):e&&(e.themeVariables=Ye.H$.default.getThemeVariables(e.themeVariables));const r="object"==typeof e?(0,Ye.UU)(e):(0,Ye.Q2)();(0,Ye.He)(r.logLevel),Dn()}(0,Ye.K2)(ci,"initialize");var hi=(0,Ye.K2)(((t,e={})=>{const{code:r}=Gn(t);return Pn.fromText(r,e)}),"getDiagramFromText");function ui(t,e,r,n){In(e,t),Rn(e,r,n,e.attr("id"))}(0,Ye.K2)(ui,"addA11yInfo");var di=Object.freeze({render:li,parse:Jn,getDiagramFromText:hi,initialize:ci,getConfig:Ye.zj,setConfig:Ye.Nk,getSiteConfig:Ye.Q2,updateSiteConfig:Ye.B6,reset:(0,Ye.K2)((()=>{(0,Ye.cL)()}),"reset"),globalReset:(0,Ye.K2)((()=>{(0,Ye.cL)(Ye.sb)}),"globalReset"),defaultConfig:Ye.sb});(0,Ye.He)((0,Ye.zj)().logLevel),(0,Ye.cL)((0,Ye.zj)());var pi=(0,Ye.K2)(((t,e,r)=>{Ye.Rm.warn(t),(0,We.dq)(t)?(r&&r(t.str,t.hash),e.push({...t,message:t.str,error:t})):(r&&r(t),t instanceof Error&&e.push({str:t.message,message:t.message,hash:t.name,error:t}))}),"handleError"),fi=(0,Ye.K2)((async function(t={querySelector:".mermaid"}){try{await gi(t)}catch(e){if((0,We.dq)(e)&&Ye.Rm.error(e.str),Ai.parseError&&Ai.parseError(e),!t.suppressErrors)throw Ye.Rm.error("Use the suppressErrors option to suppress these errors"),e}}),"run"),gi=(0,Ye.K2)((async function({postRenderCallback:t,querySelector:e,nodes:r}={querySelector:".mermaid"}){const n=di.getConfig();let i;if(Ye.Rm.debug((t?"":"No ")+"Callback function found"),r)i=r;else{if(!e)throw new Error("Nodes and querySelector are both undefined");i=document.querySelectorAll(e)}Ye.Rm.debug(`Found ${i.length} diagrams`),void 0!==n?.startOnLoad&&(Ye.Rm.debug("Start On Load: "+n?.startOnLoad),di.updateSiteConfig({startOnLoad:n?.startOnLoad}));const a=new We._K.InitIDGenerator(n.deterministicIds,n.deterministicIDSeed);let o;const s=[];for(const c of Array.from(i)){if(Ye.Rm.info("Rendering diagram: "+c.id),c.getAttribute("data-processed"))continue;c.setAttribute("data-processed","true");const e=`mermaid-${a.next()}`;o=c.innerHTML,o=(0,Ge.T)(We._K.entityDecode(o)).trim().replace(//gi,"
");const r=We._K.detectInit(o);r&&Ye.Rm.debug("Detected early reinit: ",r);try{const{svg:r,bindFunctions:n}=await Si(e,o,c);c.innerHTML=r,t&&await t(e),n&&n(c)}catch(l){pi(l,s,Ai.parseError)}}if(s.length>0)throw s[0]}),"runThrowsErrors"),mi=(0,Ye.K2)((function(t){di.initialize(t)}),"initialize"),yi=(0,Ye.K2)((async function(t,e,r){Ye.Rm.warn("mermaid.init is deprecated. Please use run instead."),t&&mi(t);const n={postRenderCallback:r,querySelector:".mermaid"};"string"==typeof e?n.querySelector=e:e&&(e instanceof HTMLElement?n.nodes=[e]:n.nodes=e),await fi(n)}),"init"),xi=(0,Ye.K2)((async(t,{lazyLoad:e=!0}={})=>{Dn(),(0,Ye.Xd)(...t),!1===e&&await On()}),"registerExternalDiagrams"),bi=(0,Ye.K2)((function(){if(Ai.startOnLoad){const{startOnLoad:t}=di.getConfig();t&&Ai.run().catch((t=>Ye.Rm.error("Mermaid failed to initialize",t)))}}),"contentLoaded");"undefined"!=typeof document&&window.addEventListener("load",bi,!1);var ki=(0,Ye.K2)((function(t){Ai.parseError=t}),"setParseErrorHandler"),Ci=[],wi=!1,vi=(0,Ye.K2)((async()=>{if(!wi){for(wi=!0;Ci.length>0;){const e=Ci.shift();if(e)try{await e()}catch(t){Ye.Rm.error("Error executing queue",t)}}wi=!1}}),"executeQueue"),_i=(0,Ye.K2)((async(t,e)=>new Promise(((r,n)=>{const i=(0,Ye.K2)((()=>new Promise(((i,a)=>{di.parse(t,e).then((t=>{i(t),r(t)}),(t=>{Ye.Rm.error("Error parsing",t),Ai.parseError?.(t),a(t),n(t)}))}))),"performCall");Ci.push(i),vi().catch(n)}))),"parse"),Si=(0,Ye.K2)(((t,e,r)=>new Promise(((n,i)=>{const a=(0,Ye.K2)((()=>new Promise(((a,o)=>{di.render(t,e,r).then((t=>{a(t),n(t)}),(t=>{Ye.Rm.error("Error parsing",t),Ai.parseError?.(t),o(t),i(t)}))}))),"performCall");Ci.push(a),vi().catch(i)}))),"render"),Ai={startOnLoad:!0,mermaidAPI:di,parse:_i,render:Si,init:yi,run:fi,registerExternalDiagrams:xi,registerLayoutLoaders:Ke.sO,initialize:mi,parseError:void 0,contentLoaded:bi,setParseErrorHandler:ki,detectType:Ye.Ch,registerIconPacks:qe.pC},Ti=Ai;function Mi(){var t=(0,pt.G)().colorMode,e=(0,I.p)().mermaid,r=e.theme[t],i=e.options;return(0,n.useMemo)((function(){return Object.assign({startOnLoad:!1},i,{theme:r})}),[r,i])}function Bi(){return Bi=(0,Pe.A)((0,Re.A)().mark((function t(e){var r,n,i,a;return(0,Re.A)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.id,n=e.text,i=e.config,Ti.mermaidAPI.initialize(i),t.prev=2,t.next=5,Ti.render(r,n);case 5:return t.abrupt("return",t.sent);case 8:throw t.prev=8,t.t0=t.catch(2),null==(a=document.querySelector("#d"+r))||a.remove(),t.t0;case 12:case"end":return t.stop()}}),t,null,[[2,8]])}))),Bi.apply(this,arguments)}function Li(t){var e=t.text,r=t.config,i=(0,n.useState)(null),a=i[0],o=i[1],s=(0,n.useRef)("mermaid-svg-"+Math.round(1e7*Math.random())).current,l=Mi(),c=null!=r?r:l;return(0,n.useEffect)((function(){(function(t){return Bi.apply(this,arguments)})({id:s,text:e,config:c}).then(o).catch((function(t){o((function(){throw t}))}))}),[s,e,c]),a}const Fi="container_lyt7";function $i(t){var e=t.renderResult,r=(0,n.useRef)(null);return(0,n.useEffect)((function(){var t=r.current;null==e.bindFunctions||e.bindFunctions(t)}),[e]),(0,o.jsx)("div",{ref:r,className:"docusaurus-mermaid-container "+Fi,dangerouslySetInnerHTML:{__html:e.svg}})}function Ei(t){var e=Li({text:t.value});return null===e?null:(0,o.jsx)($i,{renderResult:e})}const ji={Head:ut.A,details:ae,Details:ae,code:function(t){return function(t){return void 0!==t.children&&n.Children.toArray(t.children).every((function(t){return"string"==typeof t&&!t.includes("\n")}))}(t)?(0,o.jsx)(Gt,Object.assign({},t)):(0,o.jsx)(Yt,Object.assign({},t))},a:function(t){return(0,o.jsx)(b.A,Object.assign({},t))},pre:function(t){return(0,o.jsx)(o.Fragment,{children:t.children})},ul:function(t){return(0,o.jsx)("ul",Object.assign({},t,{className:le(t.className)}))},li:function(t){return(0,Vt.A)().collectAnchor(t.id),(0,o.jsx)("li",Object.assign({},t))},img:function(t){return(0,o.jsx)("img",Object.assign({decoding:"async",loading:"lazy"},t,{className:(e=t.className,(0,u.A)(e,ce))}));var e},h1:function(t){return(0,o.jsx)(oe,Object.assign({as:"h1"},t))},h2:function(t){return(0,o.jsx)(oe,Object.assign({as:"h2"},t))},h3:function(t){return(0,o.jsx)(oe,Object.assign({as:"h3"},t))},h4:function(t){return(0,o.jsx)(oe,Object.assign({as:"h4"},t))},h5:function(t){return(0,o.jsx)(oe,Object.assign({as:"h5"},t))},h6:function(t){return(0,o.jsx)(oe,Object.assign({as:"h6"},t))},admonition:De,mermaid:function(t){return(0,o.jsx)(Oe.A,{fallback:function(t){return(0,o.jsx)(Ie.MN,Object.assign({},t))},children:(0,o.jsx)(Ei,Object.assign({},t))})}};function Ni(t){var e=t.children;return(0,o.jsx)(ht.x,{components:ji,children:e})}function Di(t){var e,r,n,i,a=t.children,s=(e=c(),r=e.metadata,n=e.frontMatter,i=e.contentTitle,n.hide_title||void 0!==i?null:r.title);return(0,o.jsxs)("div",{className:(0,u.A)(y.G.docs.docMarkdown,"markdown"),children:[s&&(0,o.jsx)("header",{children:(0,o.jsx)(ct.A,{as:"h1",children:s})}),(0,o.jsx)(Ni,{children:a})]})}var Oi=r(71243);function Ii(){return(0,o.jsx)(x.A,{id:"theme.contentVisibility.unlistedBanner.title",description:"The unlisted content banner title",children:"Unlisted page"})}function Ri(){return(0,o.jsx)(x.A,{id:"theme.contentVisibility.unlistedBanner.message",description:"The unlisted content banner message",children:"This page is unlisted. Search engines will not index it, and only users having a direct link can access it."})}function Pi(){return(0,o.jsx)(ut.A,{children:(0,o.jsx)("meta",{name:"robots",content:"noindex, nofollow"})})}function zi(){return(0,o.jsx)(x.A,{id:"theme.contentVisibility.draftBanner.title",description:"The draft content banner title",children:"Draft page"})}function Ki(){return(0,o.jsx)(x.A,{id:"theme.contentVisibility.draftBanner.message",description:"The draft content banner message",children:"This page is a draft. It will only be visible in dev and be excluded from the production build."})}function qi(t){var e=t.className;return(0,o.jsx)(De,{type:"caution",title:(0,o.jsx)(zi,{}),className:(0,u.A)(e,y.G.common.draftBanner),children:(0,o.jsx)(Ki,{})})}function Wi(t){var e=t.className;return(0,o.jsx)(De,{type:"caution",title:(0,o.jsx)(Ii,{}),className:(0,u.A)(e,y.G.common.unlistedBanner),children:(0,o.jsx)(Ri,{})})}function Hi(t){return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Pi,{}),(0,o.jsx)(Wi,Object.assign({},t))]})}function Ui(t){var e=t.metadata,r=e.unlisted,n=e.frontMatter;return(0,o.jsxs)(o.Fragment,{children:[(r||n.unlisted)&&(0,o.jsx)(Hi,{}),n.draft&&(0,o.jsx)(qi,{})]})}const Yi={docItemContainer:"docItemContainer_Djhp",docItemCol:"docItemCol_VOVn"};function Gi(t){var e,r,n,i,a,s,l=t.children,h=(e=c(),r=e.frontMatter,n=e.toc,i=(0,d.l)(),a=r.hide_table_of_contents,s=!a&&n.length>0,{hidden:a,mobile:s?(0,o.jsx)(rt,{}):void 0,desktop:!s||"desktop"!==i&&"ssr"!==i?void 0:(0,o.jsx)(lt,{})}),p=c().metadata;return(0,o.jsxs)("div",{className:"row",children:[(0,o.jsxs)("div",{className:(0,u.A)("col",!h.hidden&&Yi.docItemCol),children:[(0,o.jsx)(Ui,{metadata:p}),(0,o.jsx)(g.A,{}),(0,o.jsxs)("div",{className:Yi.docItemContainer,children:[(0,o.jsxs)("article",{children:[(0,o.jsx)(Oi.A,{}),(0,o.jsx)(m.A,{}),h.mobile,(0,o.jsx)(Di,{children:l}),(0,o.jsx)(D,{})]}),(0,o.jsx)(f,{})]})]}),h.desktop&&(0,o.jsx)("div",{className:"col col--3",children:h.desktop})]})}function Vi(t){var e="docs-doc-id-"+t.content.metadata.id,r=t.content;return(0,o.jsx)(l,{content:t.content,children:(0,o.jsxs)(i.e3,{className:e,children:[(0,o.jsx)(h,{}),(0,o.jsx)(Gi,{children:(0,o.jsx)(r,{})})]})})}},86929:(t,e,r)=>{"use strict";r.d(e,{A:()=>l});r(96540);var n=r(21312),i=r(34164),a=r(28774),o=r(74848);function s(t){var e=t.permalink,r=t.title,n=t.subLabel,s=t.isNext;return(0,o.jsxs)(a.A,{className:(0,i.A)("pagination-nav__link",s?"pagination-nav__link--next":"pagination-nav__link--prev"),to:e,children:[n&&(0,o.jsx)("div",{className:"pagination-nav__sublabel",children:n}),(0,o.jsx)("div",{className:"pagination-nav__label",children:r})]})}function l(t){var e=t.previous,r=t.next;return(0,o.jsxs)("nav",{className:"pagination-nav docusaurus-mt-lg","aria-label":(0,n.T)({id:"theme.docs.paginator.navAriaLabel",message:"Docs pages",description:"The ARIA label for the docs pagination"}),children:[e&&(0,o.jsx)(s,Object.assign({},e,{subLabel:(0,o.jsx)(n.A,{id:"theme.docs.paginator.previous",description:"The label used to navigate to the previous doc",children:"Previous"})})),r&&(0,o.jsx)(s,Object.assign({},r,{subLabel:(0,o.jsx)(n.A,{id:"theme.docs.paginator.next",description:"The label used to navigate to the next doc",children:"Next"}),isNext:!0}))]})}},4267:(t,e,r)=>{"use strict";r.d(e,{A:()=>l});r(96540);var n=r(34164),i=r(21312),a=r(17559),o=r(23025),s=r(74848);function l(t){var e=t.className,r=(0,o.r)();return r.badge?(0,s.jsx)("span",{className:(0,n.A)(e,a.G.docs.docVersionBadge,"badge badge--secondary"),children:(0,s.jsx)(i.A,{id:"theme.docs.versionBadge.label",values:{versionLabel:r.label},children:"Version: {versionLabel}"})}):null}},51878:(t,e,r)=>{"use strict";r.d(e,{A:()=>m});r(96540);var n=r(34164),i=r(44586),a=r(28774),o=r(21312),s=r(44070),l=r(17559),c=r(53886),h=r(23025),u=r(74848);var d={unreleased:function(t){var e=t.siteTitle,r=t.versionMetadata;return(0,u.jsx)(o.A,{id:"theme.docs.versions.unreleasedVersionLabel",description:"The label used to tell the user that he's browsing an unreleased doc version",values:{siteTitle:e,versionLabel:(0,u.jsx)("b",{children:r.label})},children:"This is unreleased documentation for {siteTitle} {versionLabel} version."})},unmaintained:function(t){var e=t.siteTitle,r=t.versionMetadata;return(0,u.jsx)(o.A,{id:"theme.docs.versions.unmaintainedVersionLabel",description:"The label used to tell the user that he's browsing an unmaintained doc version",values:{siteTitle:e,versionLabel:(0,u.jsx)("b",{children:r.label})},children:"This is documentation for {siteTitle} {versionLabel}, which is no longer actively maintained."})}};function p(t){var e=d[t.versionMetadata.banner];return(0,u.jsx)(e,Object.assign({},t))}function f(t){var e=t.versionLabel,r=t.to,n=t.onClick;return(0,u.jsx)(o.A,{id:"theme.docs.versions.latestVersionSuggestionLabel",description:"The label used to tell the user to check the latest version",values:{versionLabel:e,latestVersionLink:(0,u.jsx)("b",{children:(0,u.jsx)(a.A,{to:r,onClick:n,children:(0,u.jsx)(o.A,{id:"theme.docs.versions.latestVersionLinkLabel",description:"The label used for the latest version suggestion link label",children:"latest version"})})})},children:"For up-to-date documentation, see the {latestVersionLink} ({versionLabel})."})}function g(t){var e,r=t.className,a=t.versionMetadata,o=(0,i.A)().siteConfig.title,h=(0,s.vT)({failfast:!0}).pluginId,d=(0,c.g1)(h).savePreferredVersionName,g=(0,s.HW)(h),m=g.latestDocSuggestion,y=g.latestVersionSuggestion,x=null!=m?m:(e=y).docs.find((function(t){return t.id===e.mainDocId}));return(0,u.jsxs)("div",{className:(0,n.A)(r,l.G.docs.docVersionBanner,"alert alert--warning margin-bottom--md"),role:"alert",children:[(0,u.jsx)("div",{children:(0,u.jsx)(p,{siteTitle:o,versionMetadata:a})}),(0,u.jsx)("div",{className:"margin-top--md",children:(0,u.jsx)(f,{versionLabel:y.label,to:x.path,onClick:function(){return d(y.name)}})})]})}function m(t){var e=t.className,r=(0,h.r)();return r.banner?(0,u.jsx)(g,{className:e,versionMetadata:r}):null}},74353:function(t){t.exports=function(){"use strict";var t=1e3,e=6e4,r=36e5,n="millisecond",i="second",a="minute",o="hour",s="day",l="week",c="month",h="quarter",u="year",d="date",p="Invalid Date",f=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,g=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,m={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],r=t%100;return"["+t+(e[(r-20)%10]||e[r]||e[0])+"]"}},y=function(t,e,r){var n=String(t);return!n||n.length>=e?t:""+Array(e+1-n.length).join(r)+t},x={s:y,z:function(t){var e=-t.utcOffset(),r=Math.abs(e),n=Math.floor(r/60),i=r%60;return(e<=0?"+":"-")+y(n,2,"0")+":"+y(i,2,"0")},m:function t(e,r){if(e.date()1)return t(o[0])}else{var s=e.name;k[s]=e,i=s}return!n&&i&&(b=i),i||!n&&b},_=function(t,e){if(w(t))return t.clone();var r="object"==typeof e?e:{};return r.date=t,r.args=arguments,new A(r)},S=x;S.l=v,S.i=w,S.w=function(t,e){return _(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var A=function(){function m(t){this.$L=v(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[C]=!0}var y=m.prototype;return y.parse=function(t){this.$d=function(t){var e=t.date,r=t.utc;if(null===e)return new Date(NaN);if(S.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var n=e.match(f);if(n){var i=n[2]-1||0,a=(n[7]||"0").substring(0,3);return r?new Date(Date.UTC(n[1],i,n[3]||1,n[4]||0,n[5]||0,n[6]||0,a)):new Date(n[1],i,n[3]||1,n[4]||0,n[5]||0,n[6]||0,a)}}return new Date(e)}(t),this.init()},y.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},y.$utils=function(){return S},y.isValid=function(){return!(this.$d.toString()===p)},y.isSame=function(t,e){var r=_(t);return this.startOf(e)<=r&&r<=this.endOf(e)},y.isAfter=function(t,e){return _(t)1?r-1:0),i=1;i2&&void 0!==arguments[2]?arguments[2]:p;e&&e(t,null);let a=n.length;for(;a--;){let e=n[a];if("string"==typeof e){const t=i(e);t!==e&&(r(n)||(n[a]=t),e=t)}t[e]=!0}return t}function S(t){for(let e=0;e/gm),z=o(/\${[\w\W]*}/gm),K=o(/^data-[\-\w.\u00B7-\uFFFF]/),q=o(/^aria-[\-\w]+$/),W=o(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),H=o(/^(?:\w+script|data):/i),U=o(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Y=o(/^html$/i),G=o(/^[a-z][.\w]*(-[.\w]+)+$/i);var V=Object.freeze({__proto__:null,MUSTACHE_EXPR:R,ERB_EXPR:P,TMPLIT_EXPR:z,DATA_ATTR:K,ARIA_ATTR:q,IS_ALLOWED_URI:W,IS_SCRIPT_OR_DATA:H,ATTR_WHITESPACE:U,DOCTYPE_NAME:Y,CUSTOM_ELEMENT:G});const Z={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},X=function(){return"undefined"==typeof window?null:window},Q=function(t,e){if("object"!=typeof t||"function"!=typeof t.createPolicy)return null;let r=null;const n="data-tt-policy-suffix";e&&e.hasAttribute(n)&&(r=e.getAttribute(n));const i="dompurify"+(r?"#"+r:"");try{return t.createPolicy(i,{createHTML:t=>t,createScriptURL:t=>t})}catch(a){return console.warn("TrustedTypes policy "+i+" could not be created."),null}};function J(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:X();const r=t=>J(t);if(r.version="3.1.6",r.removed=[],!e||!e.document||e.document.nodeType!==Z.document)return r.isSupported=!1,r;let{document:n}=e;const i=n,o=i.currentScript,{DocumentFragment:l,HTMLTemplateElement:c,Node:w,Element:v,NodeFilter:S,NamedNodeMap:R=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:P,DOMParser:z,trustedTypes:K}=e,q=v.prototype,H=T(q,"cloneNode"),U=T(q,"remove"),G=T(q,"nextSibling"),tt=T(q,"childNodes"),et=T(q,"parentNode");if("function"==typeof c){const t=n.createElement("template");t.content&&t.content.ownerDocument&&(n=t.content.ownerDocument)}let rt,nt="";const{implementation:it,createNodeIterator:at,createDocumentFragment:ot,getElementsByTagName:st}=n,{importNode:lt}=i;let ct={};r.isSupported="function"==typeof t&&"function"==typeof et&&it&&void 0!==it.createHTMLDocument;const{MUSTACHE_EXPR:ht,ERB_EXPR:ut,TMPLIT_EXPR:dt,DATA_ATTR:pt,ARIA_ATTR:ft,IS_SCRIPT_OR_DATA:gt,ATTR_WHITESPACE:mt,CUSTOM_ELEMENT:yt}=V;let{IS_ALLOWED_URI:xt}=V,bt=null;const kt=_({},[...M,...B,...L,...$,...j]);let Ct=null;const wt=_({},[...N,...D,...O,...I]);let vt=Object.seal(s(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),_t=null,St=null,At=!0,Tt=!0,Mt=!1,Bt=!0,Lt=!1,Ft=!0,$t=!1,Et=!1,jt=!1,Nt=!1,Dt=!1,Ot=!1,It=!0,Rt=!1;const Pt="user-content-";let zt=!0,Kt=!1,qt={},Wt=null;const Ht=_({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ut=null;const Yt=_({},["audio","video","img","source","image","track"]);let Gt=null;const Vt=_({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Zt="http://www.w3.org/1998/Math/MathML",Xt="http://www.w3.org/2000/svg",Qt="http://www.w3.org/1999/xhtml";let Jt=Qt,te=!1,ee=null;const re=_({},[Zt,Xt,Qt],f);let ne=null;const ie=["application/xhtml+xml","text/html"],ae="text/html";let oe=null,se=null;const le=n.createElement("form"),ce=function(t){return t instanceof RegExp||t instanceof Function},he=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!se||se!==t){if(t&&"object"==typeof t||(t={}),t=A(t),ne=-1===ie.indexOf(t.PARSER_MEDIA_TYPE)?ae:t.PARSER_MEDIA_TYPE,oe="application/xhtml+xml"===ne?f:p,bt=b(t,"ALLOWED_TAGS")?_({},t.ALLOWED_TAGS,oe):kt,Ct=b(t,"ALLOWED_ATTR")?_({},t.ALLOWED_ATTR,oe):wt,ee=b(t,"ALLOWED_NAMESPACES")?_({},t.ALLOWED_NAMESPACES,f):re,Gt=b(t,"ADD_URI_SAFE_ATTR")?_(A(Vt),t.ADD_URI_SAFE_ATTR,oe):Vt,Ut=b(t,"ADD_DATA_URI_TAGS")?_(A(Yt),t.ADD_DATA_URI_TAGS,oe):Yt,Wt=b(t,"FORBID_CONTENTS")?_({},t.FORBID_CONTENTS,oe):Ht,_t=b(t,"FORBID_TAGS")?_({},t.FORBID_TAGS,oe):{},St=b(t,"FORBID_ATTR")?_({},t.FORBID_ATTR,oe):{},qt=!!b(t,"USE_PROFILES")&&t.USE_PROFILES,At=!1!==t.ALLOW_ARIA_ATTR,Tt=!1!==t.ALLOW_DATA_ATTR,Mt=t.ALLOW_UNKNOWN_PROTOCOLS||!1,Bt=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,Lt=t.SAFE_FOR_TEMPLATES||!1,Ft=!1!==t.SAFE_FOR_XML,$t=t.WHOLE_DOCUMENT||!1,Nt=t.RETURN_DOM||!1,Dt=t.RETURN_DOM_FRAGMENT||!1,Ot=t.RETURN_TRUSTED_TYPE||!1,jt=t.FORCE_BODY||!1,It=!1!==t.SANITIZE_DOM,Rt=t.SANITIZE_NAMED_PROPS||!1,zt=!1!==t.KEEP_CONTENT,Kt=t.IN_PLACE||!1,xt=t.ALLOWED_URI_REGEXP||W,Jt=t.NAMESPACE||Qt,vt=t.CUSTOM_ELEMENT_HANDLING||{},t.CUSTOM_ELEMENT_HANDLING&&ce(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(vt.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&ce(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(vt.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(vt.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Lt&&(Tt=!1),Dt&&(Nt=!0),qt&&(bt=_({},j),Ct=[],!0===qt.html&&(_(bt,M),_(Ct,N)),!0===qt.svg&&(_(bt,B),_(Ct,D),_(Ct,I)),!0===qt.svgFilters&&(_(bt,L),_(Ct,D),_(Ct,I)),!0===qt.mathMl&&(_(bt,$),_(Ct,O),_(Ct,I))),t.ADD_TAGS&&(bt===kt&&(bt=A(bt)),_(bt,t.ADD_TAGS,oe)),t.ADD_ATTR&&(Ct===wt&&(Ct=A(Ct)),_(Ct,t.ADD_ATTR,oe)),t.ADD_URI_SAFE_ATTR&&_(Gt,t.ADD_URI_SAFE_ATTR,oe),t.FORBID_CONTENTS&&(Wt===Ht&&(Wt=A(Wt)),_(Wt,t.FORBID_CONTENTS,oe)),zt&&(bt["#text"]=!0),$t&&_(bt,["html","head","body"]),bt.table&&(_(bt,["tbody"]),delete _t.tbody),t.TRUSTED_TYPES_POLICY){if("function"!=typeof t.TRUSTED_TYPES_POLICY.createHTML)throw C('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof t.TRUSTED_TYPES_POLICY.createScriptURL)throw C('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');rt=t.TRUSTED_TYPES_POLICY,nt=rt.createHTML("")}else void 0===rt&&(rt=Q(K,o)),null!==rt&&"string"==typeof nt&&(nt=rt.createHTML(""));a&&a(t),se=t}},ue=_({},["mi","mo","mn","ms","mtext"]),de=_({},["foreignobject","annotation-xml"]),pe=_({},["title","style","font","a","script"]),fe=_({},[...B,...L,...F]),ge=_({},[...$,...E]),me=function(t){let e=et(t);e&&e.tagName||(e={namespaceURI:Jt,tagName:"template"});const r=p(t.tagName),n=p(e.tagName);return!!ee[t.namespaceURI]&&(t.namespaceURI===Xt?e.namespaceURI===Qt?"svg"===r:e.namespaceURI===Zt?"svg"===r&&("annotation-xml"===n||ue[n]):Boolean(fe[r]):t.namespaceURI===Zt?e.namespaceURI===Qt?"math"===r:e.namespaceURI===Xt?"math"===r&&de[n]:Boolean(ge[r]):t.namespaceURI===Qt?!(e.namespaceURI===Xt&&!de[n])&&!(e.namespaceURI===Zt&&!ue[n])&&!ge[r]&&(pe[r]||!fe[r]):!("application/xhtml+xml"!==ne||!ee[t.namespaceURI]))},ye=function(t){d(r.removed,{element:t});try{et(t).removeChild(t)}catch(e){U(t)}},xe=function(t,e){try{d(r.removed,{attribute:e.getAttributeNode(t),from:e})}catch(n){d(r.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t&&!Ct[t])if(Nt||Dt)try{ye(e)}catch(n){}else try{e.setAttribute(t,"")}catch(n){}},be=function(t){let e=null,r=null;if(jt)t=""+t;else{const e=g(t,/^[\r\n\t ]+/);r=e&&e[0]}"application/xhtml+xml"===ne&&Jt===Qt&&(t=''+t+"");const i=rt?rt.createHTML(t):t;if(Jt===Qt)try{e=(new z).parseFromString(i,ne)}catch(o){}if(!e||!e.documentElement){e=it.createDocument(Jt,"template",null);try{e.documentElement.innerHTML=te?nt:i}catch(o){}}const a=e.body||e.documentElement;return t&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),Jt===Qt?st.call(e,$t?"html":"body")[0]:$t?e.documentElement:a},ke=function(t){return at.call(t.ownerDocument||t,t,S.SHOW_ELEMENT|S.SHOW_COMMENT|S.SHOW_TEXT|S.SHOW_PROCESSING_INSTRUCTION|S.SHOW_CDATA_SECTION,null)},Ce=function(t){return t instanceof P&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof R)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes)},we=function(t){return"function"==typeof w&&t instanceof w},ve=function(t,e,n){ct[t]&&h(ct[t],(t=>{t.call(r,e,n,se)}))},_e=function(t){let e=null;if(ve("beforeSanitizeElements",t,null),Ce(t))return ye(t),!0;const n=oe(t.nodeName);if(ve("uponSanitizeElement",t,{tagName:n,allowedTags:bt}),t.hasChildNodes()&&!we(t.firstElementChild)&&k(/<[/\w]/g,t.innerHTML)&&k(/<[/\w]/g,t.textContent))return ye(t),!0;if(t.nodeType===Z.progressingInstruction)return ye(t),!0;if(Ft&&t.nodeType===Z.comment&&k(/<[/\w]/g,t.data))return ye(t),!0;if(!bt[n]||_t[n]){if(!_t[n]&&Ae(n)){if(vt.tagNameCheck instanceof RegExp&&k(vt.tagNameCheck,n))return!1;if(vt.tagNameCheck instanceof Function&&vt.tagNameCheck(n))return!1}if(zt&&!Wt[n]){const e=et(t)||t.parentNode,r=tt(t)||t.childNodes;if(r&&e)for(let n=r.length-1;n>=0;--n){const i=H(r[n],!0);i.__removalCount=(t.__removalCount||0)+1,e.insertBefore(i,G(t))}}return ye(t),!0}return t instanceof v&&!me(t)?(ye(t),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!k(/<\/no(script|embed|frames)/i,t.innerHTML)?(Lt&&t.nodeType===Z.text&&(e=t.textContent,h([ht,ut,dt],(t=>{e=m(e,t," ")})),t.textContent!==e&&(d(r.removed,{element:t.cloneNode()}),t.textContent=e)),ve("afterSanitizeElements",t,null),!1):(ye(t),!0)},Se=function(t,e,r){if(It&&("id"===e||"name"===e)&&(r in n||r in le))return!1;if(Tt&&!St[e]&&k(pt,e));else if(At&&k(ft,e));else if(!Ct[e]||St[e]){if(!(Ae(t)&&(vt.tagNameCheck instanceof RegExp&&k(vt.tagNameCheck,t)||vt.tagNameCheck instanceof Function&&vt.tagNameCheck(t))&&(vt.attributeNameCheck instanceof RegExp&&k(vt.attributeNameCheck,e)||vt.attributeNameCheck instanceof Function&&vt.attributeNameCheck(e))||"is"===e&&vt.allowCustomizedBuiltInElements&&(vt.tagNameCheck instanceof RegExp&&k(vt.tagNameCheck,r)||vt.tagNameCheck instanceof Function&&vt.tagNameCheck(r))))return!1}else if(Gt[e]);else if(k(xt,m(r,mt,"")));else if("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==y(r,"data:")||!Ut[t])if(Mt&&!k(gt,m(r,mt,"")));else if(r)return!1;return!0},Ae=function(t){return"annotation-xml"!==t&&g(t,yt)},Te=function(t){ve("beforeSanitizeAttributes",t,null);const{attributes:e}=t;if(!e)return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ct};let i=e.length;for(;i--;){const o=e[i],{name:s,namespaceURI:l,value:c}=o,d=oe(s);let p="value"===s?c:x(c);if(n.attrName=d,n.attrValue=p,n.keepAttr=!0,n.forceKeepAttr=void 0,ve("uponSanitizeAttribute",t,n),p=n.attrValue,Ft&&k(/((--!?|])>)|<\/(style|title)/i,p)){xe(s,t);continue}if(n.forceKeepAttr)continue;if(xe(s,t),!n.keepAttr)continue;if(!Bt&&k(/\/>/i,p)){xe(s,t);continue}Lt&&h([ht,ut,dt],(t=>{p=m(p,t," ")}));const f=oe(t.nodeName);if(Se(f,d,p)){if(!Rt||"id"!==d&&"name"!==d||(xe(s,t),p=Pt+p),rt&&"object"==typeof K&&"function"==typeof K.getAttributeType)if(l);else switch(K.getAttributeType(f,d)){case"TrustedHTML":p=rt.createHTML(p);break;case"TrustedScriptURL":p=rt.createScriptURL(p)}try{l?t.setAttributeNS(l,s,p):t.setAttribute(s,p),Ce(t)?ye(t):u(r.removed)}catch(a){}}}ve("afterSanitizeAttributes",t,null)},Me=function t(e){let r=null;const n=ke(e);for(ve("beforeSanitizeShadowDOM",e,null);r=n.nextNode();)ve("uponSanitizeShadowNode",r,null),_e(r)||(r.content instanceof l&&t(r.content),Te(r));ve("afterSanitizeShadowDOM",e,null)};return r.sanitize=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,a=null,o=null,s=null;if(te=!t,te&&(t="\x3c!--\x3e"),"string"!=typeof t&&!we(t)){if("function"!=typeof t.toString)throw C("toString is not a function");if("string"!=typeof(t=t.toString()))throw C("dirty is not a string, aborting")}if(!r.isSupported)return t;if(Et||he(e),r.removed=[],"string"==typeof t&&(Kt=!1),Kt){if(t.nodeName){const e=oe(t.nodeName);if(!bt[e]||_t[e])throw C("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof w)n=be("\x3c!----\x3e"),a=n.ownerDocument.importNode(t,!0),a.nodeType===Z.element&&"BODY"===a.nodeName||"HTML"===a.nodeName?n=a:n.appendChild(a);else{if(!Nt&&!Lt&&!$t&&-1===t.indexOf("<"))return rt&&Ot?rt.createHTML(t):t;if(n=be(t),!n)return Nt?null:Ot?nt:""}n&&jt&&ye(n.firstChild);const c=ke(Kt?t:n);for(;o=c.nextNode();)_e(o)||(o.content instanceof l&&Me(o.content),Te(o));if(Kt)return t;if(Nt){if(Dt)for(s=ot.call(n.ownerDocument);n.firstChild;)s.appendChild(n.firstChild);else s=n;return(Ct.shadowroot||Ct.shadowrootmode)&&(s=lt.call(i,s,!0)),s}let u=$t?n.outerHTML:n.innerHTML;return $t&&bt["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&k(Y,n.ownerDocument.doctype.name)&&(u="\n"+u),Lt&&h([ht,ut,dt],(t=>{u=m(u,t," ")})),rt&&Ot?rt.createHTML(u):u},r.setConfig=function(){he(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Et=!0},r.clearConfig=function(){se=null,Et=!1},r.isValidAttribute=function(t,e,r){se||he({});const n=oe(t),i=oe(e);return Se(n,i,r)},r.addHook=function(t,e){"function"==typeof e&&(ct[t]=ct[t]||[],d(ct[t],e))},r.removeHook=function(t){if(ct[t])return u(ct[t])},r.removeHooks=function(t){ct[t]&&(ct[t]=[])},r.removeAllHooks=function(){ct={}},r}return J()}()},18426:(t,e)=>{function r(t){let e,r=[];for(let n of t.split(",").map((t=>t.trim())))if(/^-?\d+$/.test(n))r.push(parseInt(n,10));else if(e=n.match(/^(-?\d+)(-|\.\.\.?|\u2025|\u2026|\u22EF)(-?\d+)$/)){let[t,n,i,a]=e;if(n&&a){n=parseInt(n),a=parseInt(a);const t=n{"use strict";function n(t,e,r){if(t&&t.length){const[n,i]=e,a=Math.PI/180*r,o=Math.cos(a),s=Math.sin(a);for(const e of t){const[t,r]=e;e[0]=(t-n)*o-(r-i)*s+n,e[1]=(t-n)*s+(r-i)*o+i}}}function i(t,e){return t[0]===e[0]&&t[1]===e[1]}function a(t,e,r,a=1){const o=r,s=Math.max(e,.1),l=t[0]&&t[0][0]&&"number"==typeof t[0][0]?[t]:t,c=[0,0];if(o)for(const i of l)n(i,c,o);const h=function(t,e,r){const n=[];for(const h of t){const t=[...h];i(t[0],t[t.length-1])||t.push([t[0][0],t[0][1]]),t.length>2&&n.push(t)}const a=[];e=Math.max(e,.1);const o=[];for(const i of n)for(let t=0;tt.ymine.ymin?1:t.xe.x?1:t.ymax===e.ymax?0:(t.ymax-e.ymax)/Math.abs(t.ymax-e.ymax))),!o.length)return a;let s=[],l=o[0].ymin,c=0;for(;s.length||o.length;){if(o.length){let t=-1;for(let e=0;el);e++)t=e;o.splice(0,t+1).forEach((t=>{s.push({s:l,edge:t})}))}if(s=s.filter((t=>!(t.edge.ymax<=l))),s.sort(((t,e)=>t.edge.x===e.edge.x?0:(t.edge.x-e.edge.x)/Math.abs(t.edge.x-e.edge.x))),(1!==r||c%e==0)&&s.length>1)for(let t=0;t=s.length)break;const r=s[t].edge,n=s[e].edge;a.push([[Math.round(r.x),l],[Math.round(n.x),l]])}l+=r,s.forEach((t=>{t.edge.x=t.edge.x+r*t.edge.islope})),c++}return a}(l,s,a);if(o){for(const t of l)n(t,c,-o);!function(t,e,r){const i=[];t.forEach((t=>i.push(...t))),n(i,e,r)}(h,c,-o)}return h}function o(t,e){var r;const n=e.hachureAngle+90;let i=e.hachureGap;i<0&&(i=4*e.strokeWidth),i=Math.round(Math.max(i,.1));let o=1;return e.roughness>=1&&((null===(r=e.randomizer)||void 0===r?void 0:r.next())||Math.random())>.7&&(o=i),a(t,i,n,o||1)}r.d(e,{A:()=>it});class s{constructor(t){this.helper=t}fillPolygons(t,e){return this._fillPolygons(t,e)}_fillPolygons(t,e){const r=o(t,e);return{type:"fillSketch",ops:this.renderLines(r,e)}}renderLines(t,e){const r=[];for(const n of t)r.push(...this.helper.doubleLineOps(n[0][0],n[0][1],n[1][0],n[1][1],e));return r}}function l(t){const e=t[0],r=t[1];return Math.sqrt(Math.pow(e[0]-r[0],2)+Math.pow(e[1]-r[1],2))}class c extends s{fillPolygons(t,e){let r=e.hachureGap;r<0&&(r=4*e.strokeWidth),r=Math.max(r,.1);const n=o(t,Object.assign({},e,{hachureGap:r})),i=Math.PI/180*e.hachureAngle,a=[],s=.5*r*Math.cos(i),c=.5*r*Math.sin(i);for(const[o,h]of n)l([o,h])&&a.push([[o[0]-s,o[1]+c],[...h]],[[o[0]+s,o[1]-c],[...h]]);return{type:"fillSketch",ops:this.renderLines(a,e)}}}class h extends s{fillPolygons(t,e){const r=this._fillPolygons(t,e),n=Object.assign({},e,{hachureAngle:e.hachureAngle+90}),i=this._fillPolygons(t,n);return r.ops=r.ops.concat(i.ops),r}}class u{constructor(t){this.helper=t}fillPolygons(t,e){const r=o(t,e=Object.assign({},e,{hachureAngle:0}));return this.dotsOnLines(r,e)}dotsOnLines(t,e){const r=[];let n=e.hachureGap;n<0&&(n=4*e.strokeWidth),n=Math.max(n,.1);let i=e.fillWeight;i<0&&(i=e.strokeWidth/2);const a=n/4;for(const o of t){const t=l(o),s=t/n,c=Math.ceil(s)-1,h=t-c*n,u=(o[0][0]+o[1][0])/2-n/4,d=Math.min(o[0][1],o[1][1]);for(let o=0;o{const a=l(t),o=Math.floor(a/(r+n)),s=(a+n-o*(r+n))/2;let c=t[0],h=t[1];c[0]>h[0]&&(c=t[1],h=t[0]);const u=Math.atan((h[1]-c[1])/(h[0]-c[0]));for(let l=0;l{const i=l(t),a=Math.round(i/(2*e));let o=t[0],s=t[1];o[0]>s[0]&&(o=t[1],s=t[0]);const c=Math.atan((s[1]-o[1])/(s[0]-o[0]));for(let l=0;ln%2?t+r:t+e));a.push({key:"C",data:t}),e=t[4],r=t[5];break}case"Q":a.push({key:"Q",data:[...s]}),e=s[2],r=s[3];break;case"q":{const t=s.map(((t,n)=>n%2?t+r:t+e));a.push({key:"Q",data:t}),e=t[2],r=t[3];break}case"A":a.push({key:"A",data:[...s]}),e=s[5],r=s[6];break;case"a":e+=s[5],r+=s[6],a.push({key:"A",data:[s[0],s[1],s[2],s[3],s[4],e,r]});break;case"H":a.push({key:"H",data:[...s]}),e=s[0];break;case"h":e+=s[0],a.push({key:"H",data:[e]});break;case"V":a.push({key:"V",data:[...s]}),r=s[0];break;case"v":r+=s[0],a.push({key:"V",data:[r]});break;case"S":a.push({key:"S",data:[...s]}),e=s[2],r=s[3];break;case"s":{const t=s.map(((t,n)=>n%2?t+r:t+e));a.push({key:"S",data:t}),e=t[2],r=t[3];break}case"T":a.push({key:"T",data:[...s]}),e=s[0],r=s[1];break;case"t":e+=s[0],r+=s[1],a.push({key:"T",data:[e,r]});break;case"Z":case"z":a.push({key:"Z",data:[]}),e=n,r=i}return a}function k(t){const e=[];let r="",n=0,i=0,a=0,o=0,s=0,l=0;for(const{key:c,data:h}of t){switch(c){case"M":e.push({key:"M",data:[...h]}),[n,i]=h,[a,o]=h;break;case"C":e.push({key:"C",data:[...h]}),n=h[4],i=h[5],s=h[2],l=h[3];break;case"L":e.push({key:"L",data:[...h]}),[n,i]=h;break;case"H":n=h[0],e.push({key:"L",data:[n,i]});break;case"V":i=h[0],e.push({key:"L",data:[n,i]});break;case"S":{let t=0,a=0;"C"===r||"S"===r?(t=n+(n-s),a=i+(i-l)):(t=n,a=i),e.push({key:"C",data:[t,a,...h]}),s=h[0],l=h[1],n=h[2],i=h[3];break}case"T":{const[t,a]=h;let o=0,c=0;"Q"===r||"T"===r?(o=n+(n-s),c=i+(i-l)):(o=n,c=i);const u=n+2*(o-n)/3,d=i+2*(c-i)/3,p=t+2*(o-t)/3,f=a+2*(c-a)/3;e.push({key:"C",data:[u,d,p,f,t,a]}),s=o,l=c,n=t,i=a;break}case"Q":{const[t,r,a,o]=h,c=n+2*(t-n)/3,u=i+2*(r-i)/3,d=a+2*(t-a)/3,p=o+2*(r-o)/3;e.push({key:"C",data:[c,u,d,p,a,o]}),s=t,l=r,n=a,i=o;break}case"A":{const t=Math.abs(h[0]),r=Math.abs(h[1]),a=h[2],o=h[3],s=h[4],l=h[5],c=h[6];0===t||0===r?(e.push({key:"C",data:[n,i,l,c,l,c]}),n=l,i=c):n===l&&i===c||(w(n,i,l,c,t,r,a,o,s).forEach((function(t){e.push({key:"C",data:t})})),n=l,i=c);break}case"Z":e.push({key:"Z",data:[]}),n=a,i=o}r=c}return e}function C(t,e,r){return[t*Math.cos(r)-e*Math.sin(r),t*Math.sin(r)+e*Math.cos(r)]}function w(t,e,r,n,i,a,o,s,l,c){const h=(u=o,Math.PI*u/180);var u;let d=[],p=0,f=0,g=0,m=0;if(c)[p,f,g,m]=c;else{[t,e]=C(t,e,-h),[r,n]=C(r,n,-h);const o=(t-r)/2,c=(e-n)/2;let u=o*o/(i*i)+c*c/(a*a);u>1&&(u=Math.sqrt(u),i*=u,a*=u);const d=i*i,y=a*a,x=d*y-d*c*c-y*o*o,b=d*c*c+y*o*o,k=(s===l?-1:1)*Math.sqrt(Math.abs(x/b));g=k*i*c/a+(t+r)/2,m=k*-a*o/i+(e+n)/2,p=Math.asin(parseFloat(((e-m)/a).toFixed(9))),f=Math.asin(parseFloat(((n-m)/a).toFixed(9))),tf&&(p-=2*Math.PI),!l&&f>p&&(f-=2*Math.PI)}let y=f-p;if(Math.abs(y)>120*Math.PI/180){const t=f,e=r,s=n;f=l&&f>p?p+120*Math.PI/180*1:p+120*Math.PI/180*-1,d=w(r=g+i*Math.cos(f),n=m+a*Math.sin(f),e,s,i,a,o,0,l,[f,t,g,m])}y=f-p;const x=Math.cos(p),b=Math.sin(p),k=Math.cos(f),v=Math.sin(f),_=Math.tan(y/4),S=4/3*i*_,A=4/3*a*_,T=[t,e],M=[t+S*b,e-A*x],B=[r+S*v,n-A*k],L=[r,n];if(M[0]=2*T[0]-M[0],M[1]=2*T[1]-M[1],c)return[M,B,L].concat(d);{d=[M,B,L].concat(d);const t=[];for(let e=0;e2){const i=[];for(let e=0;e2*Math.PI&&(p=0,f=2*Math.PI);const g=2*Math.PI/l.curveStepCount,m=Math.min(g/2,(f-p)/2),y=K(m,c,h,u,d,p,f,1,l);if(!l.disableMultiStroke){const t=K(m,c,h,u,d,p,f,1.5,l);y.push(...t)}return o&&(s?y.push(...O(c,h,c+u*Math.cos(p),h+d*Math.sin(p),l),...O(c,h,c+u*Math.cos(f),h+d*Math.sin(f),l)):y.push({op:"lineTo",data:[c,h]},{op:"lineTo",data:[c+u*Math.cos(p),h+d*Math.sin(p)]})),{type:"path",ops:y}}function L(t,e){const r=k(b(x(t))),n=[];let i=[0,0],a=[0,0];for(const{key:o,data:s}of r)switch(o){case"M":a=[s[0],s[1]],i=[s[0],s[1]];break;case"L":n.push(...O(a[0],a[1],s[0],s[1],e)),a=[s[0],s[1]];break;case"C":{const[t,r,i,o,l,c]=s;n.push(...q(t,r,i,o,l,c,a,e)),a=[l,c];break}case"Z":n.push(...O(a[0],a[1],i[0],i[1],e)),a=[i[0],i[1]]}return{type:"path",ops:n}}function F(t,e){const r=[];for(const n of t)if(n.length){const t=e.maxRandomnessOffset||0,i=n.length;if(i>2){r.push({op:"move",data:[n[0][0]+D(t,e),n[0][1]+D(t,e)]});for(let a=1;a500?.4:-.0016668*l+1.233334;let h=i.maxRandomnessOffset||0;h*h*100>s&&(h=l/10);const u=h/2,d=.2+.2*j(i);let p=i.bowing*i.maxRandomnessOffset*(n-e)/200,f=i.bowing*i.maxRandomnessOffset*(t-r)/200;p=D(p,i,c),f=D(f,i,c);const g=[],m=()=>D(u,i,c),y=()=>D(h,i,c),x=i.preserveVertices;return a&&(o?g.push({op:"move",data:[t+(x?0:m()),e+(x?0:m())]}):g.push({op:"move",data:[t+(x?0:D(h,i,c)),e+(x?0:D(h,i,c))]})),o?g.push({op:"bcurveTo",data:[p+t+(r-t)*d+m(),f+e+(n-e)*d+m(),p+t+2*(r-t)*d+m(),f+e+2*(n-e)*d+m(),r+(x?0:m()),n+(x?0:m())]}):g.push({op:"bcurveTo",data:[p+t+(r-t)*d+y(),f+e+(n-e)*d+y(),p+t+2*(r-t)*d+y(),f+e+2*(n-e)*d+y(),r+(x?0:y()),n+(x?0:y())]}),g}function R(t,e,r){if(!t.length)return[];const n=[];n.push([t[0][0]+D(e,r),t[0][1]+D(e,r)]),n.push([t[0][0]+D(e,r),t[0][1]+D(e,r)]);for(let i=1;i3){const a=[],o=1-r.curveTightness;i.push({op:"move",data:[t[1][0],t[1][1]]});for(let e=1;e+21&&i.push(r)):i.push(r),i.push(t[e+3])}else{const n=.5,a=t[e+0],o=t[e+1],s=t[e+2],l=t[e+3],c=G(a,o,n),h=G(o,s,n),u=G(s,l,n),d=G(c,h,n),p=G(h,u,n),f=G(d,p,n);V([a,c,d,f],0,r,i),V([f,p,u,l],0,r,i)}var a,o;return i}function Z(t,e){return X(t,0,t.length,e)}function X(t,e,r,n,i){const a=i||[],o=t[e],s=t[r-1];let l=0,c=1;for(let h=e+1;hl&&(l=e,c=h)}return Math.sqrt(l)>n?(X(t,e,c+1,n,a),X(t,c,r,n,a)):(a.length||a.push(o),a.push(s)),a}function Q(t,e=.15,r){const n=[],i=(t.length-1)/3;for(let a=0;a0?X(n,0,n.length,r):n}const J="none";class tt{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,e,r){return{shape:t,sets:e||[],options:r||this.defaultOptions}}line(t,e,r,n,i){const a=this._o(i);return this._d("line",[_(t,e,r,n,a)],a)}rectangle(t,e,r,n,i){const a=this._o(i),o=[],s=function(t,e,r,n,i){return function(t,e){return S(t,!0,e)}([[t,e],[t+r,e],[t+r,e+n],[t,e+n]],i)}(t,e,r,n,a);if(a.fill){const i=[[t,e],[t+r,e],[t+r,e+n],[t,e+n]];"solid"===a.fillStyle?o.push(F([i],a)):o.push($([i],a))}return a.stroke!==J&&o.push(s),this._d("rectangle",o,a)}ellipse(t,e,r,n,i){const a=this._o(i),o=[],s=T(r,n,a),l=M(t,e,a,s);if(a.fill)if("solid"===a.fillStyle){const r=M(t,e,a,s).opset;r.type="fillPath",o.push(r)}else o.push($([l.estimatedPoints],a));return a.stroke!==J&&o.push(l.opset),this._d("ellipse",o,a)}circle(t,e,r,n){const i=this.ellipse(t,e,r,r,n);return i.shape="circle",i}linearPath(t,e){const r=this._o(e);return this._d("linearPath",[S(t,!1,r)],r)}arc(t,e,r,n,i,a,o=!1,s){const l=this._o(s),c=[],h=B(t,e,r,n,i,a,o,!0,l);if(o&&l.fill)if("solid"===l.fillStyle){const o=Object.assign({},l);o.disableMultiStroke=!0;const s=B(t,e,r,n,i,a,!0,!1,o);s.type="fillPath",c.push(s)}else c.push(function(t,e,r,n,i,a,o){const s=t,l=e;let c=Math.abs(r/2),h=Math.abs(n/2);c+=D(.01*c,o),h+=D(.01*h,o);let u=i,d=a;for(;u<0;)u+=2*Math.PI,d+=2*Math.PI;d-u>2*Math.PI&&(u=0,d=2*Math.PI);const p=(d-u)/o.curveStepCount,f=[];for(let g=u;g<=d;g+=p)f.push([s+c*Math.cos(g),l+h*Math.sin(g)]);return f.push([s+c*Math.cos(d),l+h*Math.sin(d)]),f.push([s,l]),$([f],o)}(t,e,r,n,i,a,l));return l.stroke!==J&&c.push(h),this._d("arc",c,l)}curve(t,e){const r=this._o(e),n=[],i=A(t,r);if(r.fill&&r.fill!==J)if("solid"===r.fillStyle){const e=A(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(e.ops)})}else{const e=[],i=t;if(i.length){const t="number"==typeof i[0][0]?[i]:i;for(const n of t)n.length<3?e.push(...n):3===n.length?e.push(...Q(H([n[0],n[0],n[1],n[2]]),10,(1+r.roughness)/2)):e.push(...Q(H(n),10,(1+r.roughness)/2))}e.length&&n.push($([e],r))}return r.stroke!==J&&n.push(i),this._d("curve",n,r)}polygon(t,e){const r=this._o(e),n=[],i=S(t,!0,r);return r.fill&&("solid"===r.fillStyle?n.push(F([t],r)):n.push($([t],r))),r.stroke!==J&&n.push(i),this._d("polygon",n,r)}path(t,e){const r=this._o(e),n=[];if(!t)return this._d("path",n,r);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const i=r.fill&&"transparent"!==r.fill&&r.fill!==J,a=r.stroke!==J,o=!!(r.simplification&&r.simplification<1),s=function(t,e,r){const n=k(b(x(t))),i=[];let a=[],o=[0,0],s=[];const l=()=>{s.length>=4&&a.push(...Q(s,1)),s=[]},c=()=>{l(),a.length&&(i.push(a),a=[])};for(const{key:u,data:d}of n)switch(u){case"M":c(),o=[d[0],d[1]],a.push(o);break;case"L":l(),a.push([d[0],d[1]]);break;case"C":if(!s.length){const t=a.length?a[a.length-1]:o;s.push([t[0],t[1]])}s.push([d[0],d[1]]),s.push([d[2],d[3]]),s.push([d[4],d[5]]);break;case"Z":l(),a.push([o[0],o[1]])}if(c(),!r)return i;const h=[];for(const u of i){const t=Z(u,r);t.length&&h.push(t)}return h}(t,0,o?4-4*(r.simplification||1):(1+r.roughness)/2),l=L(t,r);if(i)if("solid"===r.fillStyle)if(1===s.length){const e=L(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(e.ops)})}else n.push(F(s,r));else n.push($(s,r));return a&&(o?s.forEach((t=>{n.push(S(t,!1,r))})):n.push(l)),this._d("path",n,r)}opsToPath(t,e){let r="";for(const n of t.ops){const t="number"==typeof e&&e>=0?n.data.map((t=>+t.toFixed(e))):n.data;switch(n.op){case"move":r+=`M${t[0]} ${t[1]} `;break;case"bcurveTo":r+=`C${t[0]} ${t[1]}, ${t[2]} ${t[3]}, ${t[4]} ${t[5]} `;break;case"lineTo":r+=`L${t[0]} ${t[1]} `}}return r.trim()}toPaths(t){const e=t.sets||[],r=t.options||this.defaultOptions,n=[];for(const i of e){let t=null;switch(i.type){case"path":t={d:this.opsToPath(i),stroke:r.stroke,strokeWidth:r.strokeWidth,fill:J};break;case"fillPath":t={d:this.opsToPath(i),stroke:J,strokeWidth:0,fill:r.fill||J};break;case"fillSketch":t=this.fillSketch(i,r)}t&&n.push(t)}return n}fillSketch(t,e){let r=e.fillWeight;return r<0&&(r=e.strokeWidth/2),{d:this.opsToPath(t),stroke:e.fill||J,strokeWidth:r,fill:J}}_mergedShape(t){return t.filter(((t,e)=>0===e||"move"!==t.op))}}class et{constructor(t,e){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new tt(e)}draw(t){const e=t.sets||[],r=t.options||this.getDefaultOptions(),n=this.ctx,i=t.options.fixedDecimalPlaceDigits;for(const a of e)switch(a.type){case"path":n.save(),n.strokeStyle="none"===r.stroke?"transparent":r.stroke,n.lineWidth=r.strokeWidth,r.strokeLineDash&&n.setLineDash(r.strokeLineDash),r.strokeLineDashOffset&&(n.lineDashOffset=r.strokeLineDashOffset),this._drawToContext(n,a,i),n.restore();break;case"fillPath":{n.save(),n.fillStyle=r.fill||"";const e="curve"===t.shape||"polygon"===t.shape||"path"===t.shape?"evenodd":"nonzero";this._drawToContext(n,a,i,e),n.restore();break}case"fillSketch":this.fillSketch(n,a,r)}}fillSketch(t,e,r){let n=r.fillWeight;n<0&&(n=r.strokeWidth/2),t.save(),r.fillLineDash&&t.setLineDash(r.fillLineDash),r.fillLineDashOffset&&(t.lineDashOffset=r.fillLineDashOffset),t.strokeStyle=r.fill||"",t.lineWidth=n,this._drawToContext(t,e,r.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,e,r,n="nonzero"){t.beginPath();for(const i of e.ops){const e="number"==typeof r&&r>=0?i.data.map((t=>+t.toFixed(r))):i.data;switch(i.op){case"move":t.moveTo(e[0],e[1]);break;case"bcurveTo":t.bezierCurveTo(e[0],e[1],e[2],e[3],e[4],e[5]);break;case"lineTo":t.lineTo(e[0],e[1])}}"fillPath"===e.type?t.fill(n):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,e,r,n,i){const a=this.gen.line(t,e,r,n,i);return this.draw(a),a}rectangle(t,e,r,n,i){const a=this.gen.rectangle(t,e,r,n,i);return this.draw(a),a}ellipse(t,e,r,n,i){const a=this.gen.ellipse(t,e,r,n,i);return this.draw(a),a}circle(t,e,r,n){const i=this.gen.circle(t,e,r,n);return this.draw(i),i}linearPath(t,e){const r=this.gen.linearPath(t,e);return this.draw(r),r}polygon(t,e){const r=this.gen.polygon(t,e);return this.draw(r),r}arc(t,e,r,n,i,a,o=!1,s){const l=this.gen.arc(t,e,r,n,i,a,o,s);return this.draw(l),l}curve(t,e){const r=this.gen.curve(t,e);return this.draw(r),r}path(t,e){const r=this.gen.path(t,e);return this.draw(r),r}}const rt="http://www.w3.org/2000/svg";class nt{constructor(t,e){this.svg=t,this.gen=new tt(e)}draw(t){const e=t.sets||[],r=t.options||this.getDefaultOptions(),n=this.svg.ownerDocument||window.document,i=n.createElementNS(rt,"g"),a=t.options.fixedDecimalPlaceDigits;for(const o of e){let e=null;switch(o.type){case"path":e=n.createElementNS(rt,"path"),e.setAttribute("d",this.opsToPath(o,a)),e.setAttribute("stroke",r.stroke),e.setAttribute("stroke-width",r.strokeWidth+""),e.setAttribute("fill","none"),r.strokeLineDash&&e.setAttribute("stroke-dasharray",r.strokeLineDash.join(" ").trim()),r.strokeLineDashOffset&&e.setAttribute("stroke-dashoffset",`${r.strokeLineDashOffset}`);break;case"fillPath":e=n.createElementNS(rt,"path"),e.setAttribute("d",this.opsToPath(o,a)),e.setAttribute("stroke","none"),e.setAttribute("stroke-width","0"),e.setAttribute("fill",r.fill||""),"curve"!==t.shape&&"polygon"!==t.shape||e.setAttribute("fill-rule","evenodd");break;case"fillSketch":e=this.fillSketch(n,o,r)}e&&i.appendChild(e)}return i}fillSketch(t,e,r){let n=r.fillWeight;n<0&&(n=r.strokeWidth/2);const i=t.createElementNS(rt,"path");return i.setAttribute("d",this.opsToPath(e,r.fixedDecimalPlaceDigits)),i.setAttribute("stroke",r.fill||""),i.setAttribute("stroke-width",n+""),i.setAttribute("fill","none"),r.fillLineDash&&i.setAttribute("stroke-dasharray",r.fillLineDash.join(" ").trim()),r.fillLineDashOffset&&i.setAttribute("stroke-dashoffset",`${r.fillLineDashOffset}`),i}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,e){return this.gen.opsToPath(t,e)}line(t,e,r,n,i){const a=this.gen.line(t,e,r,n,i);return this.draw(a)}rectangle(t,e,r,n,i){const a=this.gen.rectangle(t,e,r,n,i);return this.draw(a)}ellipse(t,e,r,n,i){const a=this.gen.ellipse(t,e,r,n,i);return this.draw(a)}circle(t,e,r,n){const i=this.gen.circle(t,e,r,n);return this.draw(i)}linearPath(t,e){const r=this.gen.linearPath(t,e);return this.draw(r)}polygon(t,e){const r=this.gen.polygon(t,e);return this.draw(r)}arc(t,e,r,n,i,a,o=!1,s){const l=this.gen.arc(t,e,r,n,i,a,o,s);return this.draw(l)}curve(t,e){const r=this.gen.curve(t,e);return this.draw(r)}path(t,e){const r=this.gen.path(t,e);return this.draw(r)}}var it={canvas:(t,e)=>new et(t,e),svg:(t,e)=>new nt(t,e),generator:t=>new tt(t),newSeed:()=>tt.newSeed()}},60513:(t,e,r)=>{"use strict";function n(t){for(var e=[],r=1;rn})},10467:(t,e,r)=>{"use strict";function n(t,e,r,n,i,a,o){try{var s=t[a](o),l=s.value}catch(t){return void r(t)}s.done?e(l):Promise.resolve(l).then(n,i)}function i(t){return function(){var e=this,r=arguments;return new Promise((function(i,a){var o=t.apply(e,r);function s(t){n(o,i,a,s,l,"next",t)}function l(t){n(o,i,a,s,l,"throw",t)}s(void 0)}))}}r.d(e,{A:()=>i})},90675:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});var n=r(82284);function i(){i=function(){return e};var t,e={},r=Object.prototype,a=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},s="function"==typeof Symbol?Symbol:{},l=s.iterator||"@@iterator",c=s.asyncIterator||"@@asyncIterator",h=s.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function d(t,e,r,n){var i=e&&e.prototype instanceof b?e:b,a=Object.create(i.prototype),s=new $(n||[]);return o(a,"_invoke",{value:M(t,r,s)}),a}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=d;var f="suspendedStart",g="suspendedYield",m="executing",y="completed",x={};function b(){}function k(){}function C(){}var w={};u(w,l,(function(){return this}));var v=Object.getPrototypeOf,_=v&&v(v(E([])));_&&_!==r&&a.call(_,l)&&(w=_);var S=C.prototype=b.prototype=Object.create(w);function A(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function T(t,e){function r(i,o,s,l){var c=p(t[i],t,o);if("throw"!==c.type){var h=c.arg,u=h.value;return u&&"object"==(0,n.A)(u)&&a.call(u,"__await")?e.resolve(u.__await).then((function(t){r("next",t,s,l)}),(function(t){r("throw",t,s,l)})):e.resolve(u).then((function(t){h.value=t,s(h)}),(function(t){return r("throw",t,s,l)}))}l(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function a(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(a,a):a()}})}function M(e,r,n){var i=f;return function(a,o){if(i===m)throw Error("Generator is already running");if(i===y){if("throw"===a)throw o;return{value:t,done:!0}}for(n.method=a,n.arg=o;;){var s=n.delegate;if(s){var l=B(s,n);if(l){if(l===x)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===f)throw i=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var c=p(e,r,n);if("normal"===c.type){if(i=n.done?y:g,c.arg===x)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=y,n.method="throw",n.arg=c.arg)}}}function B(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,B(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),x;var a=p(i,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,x;var o=a.arg;return o?o.done?(r[e.resultName]=o.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,x):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,x)}function L(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function F(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function $(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function E(e){if(e||""===e){var r=e[l];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function r(){for(;++i=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var l=a.call(o,"catchLoc"),c=a.call(o,"finallyLoc");if(l&&c){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),F(r),x}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;F(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:E(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),x}},e}},28453:(t,e,r)=>{"use strict";r.d(e,{R:()=>o,x:()=>s});var n=r(96540);const i={},a=n.createContext(i);function o(t){const e=n.useContext(a);return n.useMemo((function(){return"function"==typeof t?t(e):{...e,...t}}),[e,t])}function s(t){let e;return e=t.disableParentContext?"function"==typeof t.components?t.components(i):t.components||i:o(t.components),n.createElement(a.Provider,{value:e},t.children)}},20007:(t,e,r)=>{"use strict";function n(t,e){let r;if(void 0===e)for(const n of t)null!=n&&(r=n)&&(r=n);else{let n=-1;for(let i of t)null!=(i=e(i,++n,t))&&(r=i)&&(r=i)}return r}function i(t,e){let r;if(void 0===e)for(const n of t)null!=n&&(r>n||void 0===r&&n>=n)&&(r=n);else{let n=-1;for(let i of t)null!=(i=e(i,++n,t))&&(r>i||void 0===r&&i>=i)&&(r=i)}return r}function a(t){return t}r.d(e,{JLW:()=>Zo,l78:()=>x,tlR:()=>y,qrM:()=>cs,Yu4:()=>us,IA3:()=>ps,Wi0:()=>gs,PGM:()=>ms,OEq:()=>xs,y8u:()=>Cs,olC:()=>vs,IrU:()=>Ss,oDi:()=>Ms,Q7f:()=>Ls,cVp:()=>$s,lUB:()=>Jo,Lx9:()=>js,nVG:()=>Ks,uxU:()=>qs,Xf2:()=>Us,GZz:()=>Gs,UPb:()=>Zs,dyv:()=>Vs,bEH:()=>rn,n8j:()=>rs,T9B:()=>n,jkA:()=>i,rLf:()=>as,WH:()=>dn,m4Y:()=>ii,UMr:()=>un,w7C:()=>Co,zt:()=>wo,Ltv:()=>vo,UAC:()=>Ci,DCK:()=>Ji,TUC:()=>Li,Agd:()=>bi,t6C:()=>gi,wXd:()=>yi,ABi:()=>Ai,Ui6:()=>Pi,rGn:()=>Fi,ucG:()=>mi,YPH:()=>Si,Mol:()=>Bi,PGu:()=>Ti,GuW:()=>Mi});var o=1,s=2,l=3,c=4,h=1e-6;function u(t){return"translate("+t+",0)"}function d(t){return"translate(0,"+t+")"}function p(t){return e=>+t(e)}function f(t,e){return e=Math.max(0,t.bandwidth()-2*e)/2,t.round()&&(e=Math.round(e)),r=>+t(r)+e}function g(){return!this.__axis}function m(t,e){var r=[],n=null,i=null,m=6,y=6,x=3,b="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,k=t===o||t===c?-1:1,C=t===c||t===s?"x":"y",w=t===o||t===l?u:d;function v(u){var d=null==n?e.ticks?e.ticks.apply(e,r):e.domain():n,v=null==i?e.tickFormat?e.tickFormat.apply(e,r):a:i,_=Math.max(m,0)+x,S=e.range(),A=+S[0]+b,T=+S[S.length-1]+b,M=(e.bandwidth?f:p)(e.copy(),b),B=u.selection?u.selection():u,L=B.selectAll(".domain").data([null]),F=B.selectAll(".tick").data(d,e).order(),$=F.exit(),E=F.enter().append("g").attr("class","tick"),j=F.select("line"),N=F.select("text");L=L.merge(L.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),F=F.merge(E),j=j.merge(E.append("line").attr("stroke","currentColor").attr(C+"2",k*m)),N=N.merge(E.append("text").attr("fill","currentColor").attr(C,k*_).attr("dy",t===o?"0em":t===l?"0.71em":"0.32em")),u!==B&&(L=L.transition(u),F=F.transition(u),j=j.transition(u),N=N.transition(u),$=$.transition(u).attr("opacity",h).attr("transform",(function(t){return isFinite(t=M(t))?w(t+b):this.getAttribute("transform")})),E.attr("opacity",h).attr("transform",(function(t){var e=this.parentNode.__axis;return w((e&&isFinite(e=e(t))?e:M(t))+b)}))),$.remove(),L.attr("d",t===c||t===s?y?"M"+k*y+","+A+"H"+b+"V"+T+"H"+k*y:"M"+b+","+A+"V"+T:y?"M"+A+","+k*y+"V"+b+"H"+T+"V"+k*y:"M"+A+","+b+"H"+T),F.attr("opacity",1).attr("transform",(function(t){return w(M(t)+b)})),j.attr(C+"2",k*m),N.attr(C,k*_).text(v),B.filter(g).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===s?"start":t===c?"end":"middle"),B.each((function(){this.__axis=M}))}return v.scale=function(t){return arguments.length?(e=t,v):e},v.ticks=function(){return r=Array.from(arguments),v},v.tickArguments=function(t){return arguments.length?(r=null==t?[]:Array.from(t),v):r.slice()},v.tickValues=function(t){return arguments.length?(n=null==t?null:Array.from(t),v):n&&n.slice()},v.tickFormat=function(t){return arguments.length?(i=t,v):i},v.tickSize=function(t){return arguments.length?(m=y=+t,v):m},v.tickSizeInner=function(t){return arguments.length?(m=+t,v):m},v.tickSizeOuter=function(t){return arguments.length?(y=+t,v):y},v.tickPadding=function(t){return arguments.length?(x=+t,v):x},v.offset=function(t){return arguments.length?(b=+t,v):b},v}function y(t){return m(o,t)}function x(t){return m(l,t)}function b(){}function k(t){return null==t?b:function(){return this.querySelector(t)}}function C(){return[]}function w(t){return null==t?C:function(){return this.querySelectorAll(t)}}function v(t){return function(){return null==(e=t.apply(this,arguments))?[]:Array.isArray(e)?e:Array.from(e);var e}}function _(t){return function(){return this.matches(t)}}function S(t){return function(e){return e.matches(t)}}var A=Array.prototype.find;function T(){return this.firstElementChild}var M=Array.prototype.filter;function B(){return Array.from(this.children)}function L(t){return new Array(t.length)}function F(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function $(t,e,r,n,i,a){for(var o,s=0,l=e.length,c=a.length;se?1:t>=e?0:NaN}F.prototype={constructor:F,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var O="http://www.w3.org/1999/xhtml";const I={svg:"http://www.w3.org/2000/svg",xhtml:O,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function R(t){var e=t+="",r=e.indexOf(":");return r>=0&&"xmlns"!==(e=t.slice(0,r))&&(t=t.slice(r+1)),I.hasOwnProperty(e)?{space:I[e],local:t}:t}function P(t){return function(){this.removeAttribute(t)}}function z(t){return function(){this.removeAttributeNS(t.space,t.local)}}function K(t,e){return function(){this.setAttribute(t,e)}}function q(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function W(t,e){return function(){var r=e.apply(this,arguments);null==r?this.removeAttribute(t):this.setAttribute(t,r)}}function H(t,e){return function(){var r=e.apply(this,arguments);null==r?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,r)}}function U(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Y(t){return function(){this.style.removeProperty(t)}}function G(t,e,r){return function(){this.style.setProperty(t,e,r)}}function V(t,e,r){return function(){var n=e.apply(this,arguments);null==n?this.style.removeProperty(t):this.style.setProperty(t,n,r)}}function Z(t,e){return t.style.getPropertyValue(e)||U(t).getComputedStyle(t,null).getPropertyValue(e)}function X(t){return function(){delete this[t]}}function Q(t,e){return function(){this[t]=e}}function J(t,e){return function(){var r=e.apply(this,arguments);null==r?delete this[t]:this[t]=r}}function tt(t){return t.trim().split(/^|\s+/)}function et(t){return t.classList||new rt(t)}function rt(t){this._node=t,this._names=tt(t.getAttribute("class")||"")}function nt(t,e){for(var r=et(t),n=-1,i=e.length;++n=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var Mt=[null];function Bt(t,e){this._groups=t,this._parents=e}function Lt(){return new Bt([[document.documentElement]],Mt)}Bt.prototype=Lt.prototype={constructor:Bt,select:function(t){"function"!=typeof t&&(t=k(t));for(var e=this._groups,r=e.length,n=new Array(r),i=0;i=C&&(C=k+1);!(b=y[C])&&++C=0;)(n=i[a])&&(o&&4^n.compareDocumentPosition(o)&&o.parentNode.insertBefore(n,o),o=n);return this},sort:function(t){function e(e,r){return e&&r?t(e.__data__,r.__data__):!e-!r}t||(t=D);for(var r=this._groups,n=r.length,i=new Array(n),a=0;a1?this.each((null==e?Y:"function"==typeof e?V:G)(t,e,null==r?"":r)):Z(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?X:"function"==typeof e?J:Q)(t,e)):this.node()[t]},classed:function(t,e){var r=tt(t+"");if(arguments.length<2){for(var n=et(this.node()),i=-1,a=r.length;++i=0&&(e=t.slice(r+1),t=t.slice(0,r)),{type:t,name:e}}))}(t+""),o=a.length;if(!(arguments.length<2)){for(s=e?_t:vt,n=0;n{}};function Et(){for(var t,e=0,r=arguments.length,n={};e=0&&(e=t.slice(r+1),t=t.slice(0,r)),t&&!n.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}}))),o=-1,s=a.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++o0)for(var r,n,i=new Array(r),a=0;a=0&&e._call.call(void 0,t),e=e._next;--Pt}()}finally{Pt=0,function(){var t,e,r=It,n=1/0;for(;r;)r._call?(n>r._time&&(n=r._time),t=r,r=r._next):(e=r._next,r._next=null,r=t?t._next=e:It=e);Rt=t,te(n)}(),Wt=0}}function Jt(){var t=Ut.now(),e=t-qt;e>1e3&&(Ht-=e,qt=t)}function te(t){Pt||(zt&&(zt=clearTimeout(zt)),t-Wt>24?(t<1/0&&(zt=setTimeout(Qt,t-Ut.now()-Ht)),Kt&&(Kt=clearInterval(Kt))):(Kt||(qt=Ut.now(),Kt=setInterval(Jt,1e3)),Pt=1,Yt(Qt)))}function ee(t,e,r){var n=new Zt;return e=null==e?0:+e,n.restart((r=>{n.stop(),t(r+e)}),e,r),n}Zt.prototype=Xt.prototype={constructor:Zt,restart:function(t,e,r){if("function"!=typeof t)throw new TypeError("callback is not a function");r=(null==r?Gt():+r)+(null==e?0:+e),this._next||Rt===this||(Rt?Rt._next=this:It=this,Rt=this),this._call=t,this._time=r,te()},stop:function(){this._call&&(this._call=null,this._time=1/0,te())}};var re=Ot("start","end","cancel","interrupt"),ne=[];function ie(t,e,r,n,i,a){var o=t.__transition;if(o){if(r in o)return}else t.__transition={};!function(t,e,r){var n,i=t.__transition;function a(t){r.state=1,r.timer.restart(o,r.delay,r.time),r.delay<=t&&o(t-r.delay)}function o(a){var c,h,u,d;if(1!==r.state)return l();for(c in i)if((d=i[c]).name===r.name){if(3===d.state)return ee(o);4===d.state?(d.state=6,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete i[c]):+c0)throw new Error("too late; already scheduled");return r}function oe(t,e){var r=se(t,e);if(r.state>3)throw new Error("too late; already running");return r}function se(t,e){var r=t.__transition;if(!r||!(r=r[e]))throw new Error("transition not found");return r}function le(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}var ce,he=180/Math.PI,ue={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function de(t,e,r,n,i,a){var o,s,l;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(l=t*r+e*n)&&(r-=t*l,n-=e*l),(s=Math.sqrt(r*r+n*n))&&(r/=s,n/=s,l/=s),t*n180?e+=360:e-t>180&&(t+=360),a.push({i:r.push(i(r)+"rotate(",null,n)-2,x:le(t,e)})):e&&r.push(i(r)+"rotate("+e+n)}(a.rotate,o.rotate,s,l),function(t,e,r,a){t!==e?a.push({i:r.push(i(r)+"skewX(",null,n)-2,x:le(t,e)}):e&&r.push(i(r)+"skewX("+e+n)}(a.skewX,o.skewX,s,l),function(t,e,r,n,a,o){if(t!==r||e!==n){var s=a.push(i(a)+"scale(",null,",",null,")");o.push({i:s-4,x:le(t,r)},{i:s-2,x:le(e,n)})}else 1===r&&1===n||a.push(i(a)+"scale("+r+","+n+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,s,l),a=o=null,function(t){for(var e,r=-1,n=l.length;++r>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===r?Re(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===r?Re(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=Me.exec(t))?new Ke(e[1],e[2],e[3],1):(e=Be.exec(t))?new Ke(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Le.exec(t))?Re(e[1],e[2],e[3],e[4]):(e=Fe.exec(t))?Re(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=$e.exec(t))?Ge(e[1],e[2]/100,e[3]/100,1):(e=Ee.exec(t))?Ge(e[1],e[2]/100,e[3]/100,e[4]):je.hasOwnProperty(t)?Ie(je[t]):"transparent"===t?new Ke(NaN,NaN,NaN,0):null}function Ie(t){return new Ke(t>>16&255,t>>8&255,255&t,1)}function Re(t,e,r,n){return n<=0&&(t=e=r=NaN),new Ke(t,e,r,n)}function Pe(t){return t instanceof Ce||(t=Oe(t)),t?new Ke((t=t.rgb()).r,t.g,t.b,t.opacity):new Ke}function ze(t,e,r,n){return 1===arguments.length?Pe(t):new Ke(t,e,r,null==n?1:n)}function Ke(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}function qe(){return`#${Ye(this.r)}${Ye(this.g)}${Ye(this.b)}`}function We(){const t=He(this.opacity);return`${1===t?"rgb(":"rgba("}${Ue(this.r)}, ${Ue(this.g)}, ${Ue(this.b)}${1===t?")":`, ${t})`}`}function He(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Ue(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Ye(t){return((t=Ue(t))<16?"0":"")+t.toString(16)}function Ge(t,e,r,n){return n<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new Ze(t,e,r,n)}function Ve(t){if(t instanceof Ze)return new Ze(t.h,t.s,t.l,t.opacity);if(t instanceof Ce||(t=Oe(t)),!t)return new Ze;if(t instanceof Ze)return t;var e=(t=t.rgb()).r/255,r=t.g/255,n=t.b/255,i=Math.min(e,r,n),a=Math.max(e,r,n),o=NaN,s=a-i,l=(a+i)/2;return s?(o=e===a?(r-n)/s+6*(r0&&l<1?0:o,new Ze(o,s,l,t.opacity)}function Ze(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}function Xe(t){return(t=(t||0)%360)<0?t+360:t}function Qe(t){return Math.max(0,Math.min(1,t||0))}function Je(t,e,r){return 255*(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)}function tr(t,e,r,n,i){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*r+(1+3*t+3*a-3*o)*n+o*i)/6}be(Ce,Oe,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Ne,formatHex:Ne,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Ve(this).formatHsl()},formatRgb:De,toString:De}),be(Ke,ze,ke(Ce,{brighter(t){return t=null==t?ve:Math.pow(ve,t),new Ke(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?we:Math.pow(we,t),new Ke(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Ke(Ue(this.r),Ue(this.g),Ue(this.b),He(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:qe,formatHex:qe,formatHex8:function(){return`#${Ye(this.r)}${Ye(this.g)}${Ye(this.b)}${Ye(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:We,toString:We})),be(Ze,(function(t,e,r,n){return 1===arguments.length?Ve(t):new Ze(t,e,r,null==n?1:n)}),ke(Ce,{brighter(t){return t=null==t?ve:Math.pow(ve,t),new Ze(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?we:Math.pow(we,t),new Ze(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*e,i=2*r-n;return new Ke(Je(t>=240?t-240:t+120,i,n),Je(t,i,n),Je(t<120?t+240:t-120,i,n),this.opacity)},clamp(){return new Ze(Xe(this.h),Qe(this.s),Qe(this.l),He(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=He(this.opacity);return`${1===t?"hsl(":"hsla("}${Xe(this.h)}, ${100*Qe(this.s)}%, ${100*Qe(this.l)}%${1===t?")":`, ${t})`}`}}));const er=t=>()=>t;function rr(t,e){return function(r){return t+r*e}}function nr(t){return 1==(t=+t)?ir:function(e,r){return r-e?function(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(n){return Math.pow(t+n*e,r)}}(e,r,t):er(isNaN(e)?r:e)}}function ir(t,e){var r=e-t;return r?rr(t,r):er(isNaN(t)?e:t)}const ar=function t(e){var r=nr(e);function n(t,e){var n=r((t=ze(t)).r,(e=ze(e)).r),i=r(t.g,e.g),a=r(t.b,e.b),o=ir(t.opacity,e.opacity);return function(e){return t.r=n(e),t.g=i(e),t.b=a(e),t.opacity=o(e),t+""}}return n.gamma=t,n}(1);function or(t){return function(e){var r,n,i=e.length,a=new Array(i),o=new Array(i),s=new Array(i);for(r=0;r=1?(r=1,e-1):Math.floor(r*e),i=t[n],a=t[n+1],o=n>0?t[n-1]:2*i-a,s=na&&(i=e.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(r=r[0])===(n=n[0])?s[o]?s[o]+=n:s[++o]=n:(s[++o]=null,l.push({i:o,x:le(r,n)})),a=lr.lastIndex;return a=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?ae:oe;return function(){var o=a(this,t),s=o.on;s!==n&&(i=(n=s).copy()).on(e,r),o.on=i}}(r,t,e))},attr:function(t,e){var r=R(t),n="transform"===r?ge:hr;return this.attrTween(t,"function"==typeof e?(r.local?mr:gr)(r,n,xe(this,"attr."+t,e)):null==e?(r.local?dr:ur)(r):(r.local?fr:pr)(r,n,e))},attrTween:function(t,e){var r="attr."+t;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;var n=R(t);return this.tween(r,(n.local?yr:xr)(n,e))},style:function(t,e,r){var n="transform"==(t+="")?fe:hr;return null==e?this.styleTween(t,function(t,e){var r,n,i;return function(){var a=Z(this,t),o=(this.style.removeProperty(t),Z(this,t));return a===o?null:a===r&&o===n?i:i=e(r=a,n=o)}}(t,n)).on("end.style."+t,_r(t)):"function"==typeof e?this.styleTween(t,function(t,e,r){var n,i,a;return function(){var o=Z(this,t),s=r(this),l=s+"";return null==s&&(this.style.removeProperty(t),l=s=Z(this,t)),o===l?null:o===n&&l===i?a:(i=l,a=e(n=o,s))}}(t,n,xe(this,"style."+t,e))).each(function(t,e){var r,n,i,a,o="style."+e,s="end."+o;return function(){var l=oe(this,t),c=l.on,h=null==l.value[o]?a||(a=_r(e)):void 0;c===r&&i===h||(n=(r=c).copy()).on(s,i=h),l.on=n}}(this._id,t)):this.styleTween(t,function(t,e,r){var n,i,a=r+"";return function(){var o=Z(this,t);return o===a?null:o===n?i:i=e(n=o,r)}}(t,n,e),r).on("end.style."+t,null)},styleTween:function(t,e,r){var n="style."+(t+="");if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;return this.tween(n,function(t,e,r){var n,i;function a(){var a=e.apply(this,arguments);return a!==i&&(n=(i=a)&&function(t,e,r){return function(n){this.style.setProperty(t,e.call(this,n),r)}}(t,a,r)),n}return a._value=e,a}(t,e,null==r?"":r))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(xe(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,function(t){var e,r;function n(){var n=t.apply(this,arguments);return n!==r&&(e=(r=n)&&function(t){return function(e){this.textContent=t.call(this,e)}}(n)),e}return n._value=t,n}(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var r in this.__transition)if(+r!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var r=this._id;if(t+="",arguments.length<2){for(var n,i=se(this.node(),r).tween,a=0,o=i.length;a2&&r.state<5,r.state=6,r.timer.stop(),r.on.call(n?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete a[i]):o=!1;o&&delete t.__transition}}(this,t)}))},Ft.prototype.transition=function(t){var e,r;t instanceof Ar?(e=t._id,t=t._name):(e=Tr(),(r=Br).time=Gt(),t=null==t?null:t+"");for(var n=this._groups,i=n.length,a=0;aWr?Math.pow(t,1/3):t/qr+zr}function Gr(t){return t>Kr?t*t*t:qr*(t-zr)}function Vr(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Zr(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Xr(t){if(t instanceof Jr)return new Jr(t.h,t.c,t.l,t.opacity);if(t instanceof Ur||(t=Hr(t)),0===t.a&&0===t.b)return new Jr(NaN,0180||r<-180?r-360*Math.round(r/360):r):er(isNaN(t)?e:t)}));en(ir);function nn(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}class an extends Map{constructor(t,e=cn){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const[r,n]of t)this.set(r,n)}get(t){return super.get(on(this,t))}has(t){return super.has(on(this,t))}set(t,e){return super.set(sn(this,t),e)}delete(t){return super.delete(ln(this,t))}}Set;function on({_intern:t,_key:e},r){const n=e(r);return t.has(n)?t.get(n):r}function sn({_intern:t,_key:e},r){const n=e(r);return t.has(n)?t.get(n):(t.set(n,r),r)}function ln({_intern:t,_key:e},r){const n=e(r);return t.has(n)&&(r=t.get(n),t.delete(n)),r}function cn(t){return null!==t&&"object"==typeof t?t.valueOf():t}const hn=Symbol("implicit");function un(){var t=new an,e=[],r=[],n=hn;function i(i){let a=t.get(i);if(void 0===a){if(n!==hn)return n;t.set(i,a=e.push(i)-1)}return r[a%r.length]}return i.domain=function(r){if(!arguments.length)return e.slice();e=[],t=new an;for(const n of r)t.has(n)||t.set(n,e.push(n)-1);return i},i.range=function(t){return arguments.length?(r=Array.from(t),i):r.slice()},i.unknown=function(t){return arguments.length?(n=t,i):n},i.copy=function(){return un(e,r).unknown(n)},nn.apply(i,arguments),i}function dn(){var t,e,r=un().unknown(void 0),n=r.domain,i=r.range,a=0,o=1,s=!1,l=0,c=0,h=.5;function u(){var r=n().length,u=o=pn?10:a>=fn?5:a>=gn?2:1;let s,l,c;return i<0?(c=Math.pow(10,-i)/o,s=Math.round(t*c),l=Math.round(e*c),s/ce&&--l,c=-c):(c=Math.pow(10,i)*o,s=Math.round(t/c),l=Math.round(e/c),s*ce&&--l),le?1:t>=e?0:NaN}function kn(t,e){return null==t||null==e?NaN:et?1:e>=t?0:NaN}function Cn(t){let e,r,n;function i(t,n,i=0,a=t.length){if(i>>1;r(t[e],n)<0?i=e+1:a=e}while(ibn(t(e),r),n=(e,r)=>t(e)-r):(e=t===bn||t===kn?t:wn,r=t,n=t),{left:i,center:function(t,e,r=0,a=t.length){const o=i(t,e,r,a-1);return o>r&&n(t[o-1],e)>-n(t[o],e)?o-1:o},right:function(t,n,i=0,a=t.length){if(i>>1;r(t[e],n)<=0?i=e+1:a=e}while(ie&&(r=t,t=e,e=r),c=function(r){return Math.max(t,Math.min(e,r))}),n=l>2?On:Dn,i=a=null,u}function u(e){return null==e||isNaN(e=+e)?r:(i||(i=n(o.map(t),s,l)))(t(c(e)))}return u.invert=function(r){return c(e((a||(a=n(s,o.map(t),le)))(r)))},u.domain=function(t){return arguments.length?(o=Array.from(t,$n),h()):o.slice()},u.range=function(t){return arguments.length?(s=Array.from(t),h()):s.slice()},u.rangeRound=function(t){return s=Array.from(t),l=Fn,h()},u.clamp=function(t){return arguments.length?(c=!!t||jn,h()):c!==jn},u.interpolate=function(t){return arguments.length?(l=t,h()):l},u.unknown=function(t){return arguments.length?(r=t,u):r},function(r,n){return t=r,e=n,h()}}function Pn(){return Rn()(jn,jn)}var zn,Kn=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function qn(t){if(!(e=Kn.exec(t)))throw new Error("invalid format: "+t);var e;return new Wn({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function Wn(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function Hn(t,e){if((r=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var r,n=t.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+t.slice(r+1)]}function Un(t){return(t=Hn(Math.abs(t)))?t[1]:NaN}function Yn(t,e){var r=Hn(t,e);if(!r)return t+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}qn.prototype=Wn.prototype,Wn.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const Gn={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>Yn(100*t,e),r:Yn,s:function(t,e){var r=Hn(t,e);if(!r)return t+"";var n=r[0],i=r[1],a=i-(zn=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,o=n.length;return a===o?n:a>o?n+new Array(a-o+1).join("0"):a>0?n.slice(0,a)+"."+n.slice(a):"0."+new Array(1-a).join("0")+Hn(t,Math.max(0,e+a-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Vn(t){return t}var Zn,Xn,Qn,Jn=Array.prototype.map,ti=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"];function ei(t){var e,r,n=void 0===t.grouping||void 0===t.thousands?Vn:(e=Jn.call(t.grouping,Number),r=t.thousands+"",function(t,n){for(var i=t.length,a=[],o=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>n&&(s=Math.max(1,n-l)),a.push(t.substring(i-=s,i+s)),!((l+=s+1)>n));)s=e[o=(o+1)%e.length];return a.reverse().join(r)}),i=void 0===t.currency?"":t.currency[0]+"",a=void 0===t.currency?"":t.currency[1]+"",o=void 0===t.decimal?".":t.decimal+"",s=void 0===t.numerals?Vn:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(Jn.call(t.numerals,String)),l=void 0===t.percent?"%":t.percent+"",c=void 0===t.minus?"\u2212":t.minus+"",h=void 0===t.nan?"NaN":t.nan+"";function u(t){var e=(t=qn(t)).fill,r=t.align,u=t.sign,d=t.symbol,p=t.zero,f=t.width,g=t.comma,m=t.precision,y=t.trim,x=t.type;"n"===x?(g=!0,x="g"):Gn[x]||(void 0===m&&(m=12),y=!0,x="g"),(p||"0"===e&&"="===r)&&(p=!0,e="0",r="=");var b="$"===d?i:"#"===d&&/[boxX]/.test(x)?"0"+x.toLowerCase():"",k="$"===d?a:/[%p]/.test(x)?l:"",C=Gn[x],w=/[defgprs%]/.test(x);function v(t){var i,a,l,d=b,v=k;if("c"===x)v=C(t)+v,t="";else{var _=(t=+t)<0||1/t<0;if(t=isNaN(t)?h:C(Math.abs(t),m),y&&(t=function(t){t:for(var e,r=t.length,n=1,i=-1;n0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),_&&0==+t&&"+"!==u&&(_=!1),d=(_?"("===u?u:c:"-"===u||"("===u?"":u)+d,v=("s"===x?ti[8+zn/3]:"")+v+(_&&"("===u?")":""),w)for(i=-1,a=t.length;++i(l=t.charCodeAt(i))||l>57){v=(46===l?o+t.slice(i+1):t.slice(i))+v,t=t.slice(0,i);break}}g&&!p&&(t=n(t,1/0));var S=d.length+t.length+v.length,A=S>1)+d+t+v+A.slice(S);break;default:t=A+d+t+v}return s(t)}return m=void 0===m?6:/[gprs]/.test(x)?Math.max(1,Math.min(21,m)):Math.max(0,Math.min(20,m)),v.toString=function(){return t+""},v}return{format:u,formatPrefix:function(t,e){var r=u(((t=qn(t)).type="f",t)),n=3*Math.max(-8,Math.min(8,Math.floor(Un(e)/3))),i=Math.pow(10,-n),a=ti[8+n/3];return function(t){return r(i*t)+a}}}}function ri(t,e,r,n){var i,a=xn(t,e,r);switch((n=qn(null==n?",f":n)).type){case"s":var o=Math.max(Math.abs(t),Math.abs(e));return null!=n.precision||isNaN(i=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Un(e)/3)))-Un(Math.abs(t)))}(a,o))||(n.precision=i),Qn(n,o);case"":case"e":case"g":case"p":case"r":null!=n.precision||isNaN(i=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Un(e)-Un(t))+1}(a,Math.max(Math.abs(t),Math.abs(e))))||(n.precision=i-("e"===n.type));break;case"f":case"%":null!=n.precision||isNaN(i=function(t){return Math.max(0,-Un(Math.abs(t)))}(a))||(n.precision=i-2*("%"===n.type))}return Xn(n)}function ni(t){var e=t.domain;return t.ticks=function(t){var r=e();return function(t,e,r){if(!((r=+r)>0))return[];if((t=+t)==(e=+e))return[t];const n=e=i))return[];const s=a-i+1,l=new Array(s);if(n)if(o<0)for(let c=0;c0;){if((i=yn(l,c,r))===n)return a[o]=l,a[s]=c,e(a);if(i>0)l=Math.floor(l/i)*i,c=Math.ceil(c/i)*i;else{if(!(i<0))break;l=Math.ceil(l*i)/i,c=Math.floor(c*i)/i}n=i}return t},t}function ii(){var t=Pn();return t.copy=function(){return In(t,ii())},nn.apply(t,arguments),ni(t)}Zn=ei({thousands:",",grouping:[3],currency:["$",""]}),Xn=Zn.format,Qn=Zn.formatPrefix;const ai=1e3,oi=6e4,si=36e5,li=864e5,ci=6048e5,hi=2592e6,ui=31536e6,di=new Date,pi=new Date;function fi(t,e,r,n){function i(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return i.floor=e=>(t(e=new Date(+e)),e),i.ceil=r=>(t(r=new Date(r-1)),e(r,1),t(r),r),i.round=t=>{const e=i(t),r=i.ceil(t);return t-e(e(t=new Date(+t),null==r?1:Math.floor(r)),t),i.range=(r,n,a)=>{const o=[];if(r=i.ceil(r),a=null==a?1:Math.floor(a),!(r0))return o;let s;do{o.push(s=new Date(+r)),e(r,a),t(r)}while(sfi((e=>{if(e>=e)for(;t(e),!r(e);)e.setTime(e-1)}),((t,n)=>{if(t>=t)if(n<0)for(;++n<=0;)for(;e(t,-1),!r(t););else for(;--n>=0;)for(;e(t,1),!r(t););})),r&&(i.count=(e,n)=>(di.setTime(+e),pi.setTime(+n),t(di),t(pi),Math.floor(r(di,pi))),i.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(n?e=>n(e)%t==0:e=>i.count(0,e)%t==0):i:null)),i}const gi=fi((()=>{}),((t,e)=>{t.setTime(+t+e)}),((t,e)=>e-t));gi.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?fi((e=>{e.setTime(Math.floor(e/t)*t)}),((e,r)=>{e.setTime(+e+r*t)}),((e,r)=>(r-e)/t)):gi:null);gi.range;const mi=fi((t=>{t.setTime(t-t.getMilliseconds())}),((t,e)=>{t.setTime(+t+e*ai)}),((t,e)=>(e-t)/ai),(t=>t.getUTCSeconds())),yi=(mi.range,fi((t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*ai)}),((t,e)=>{t.setTime(+t+e*oi)}),((t,e)=>(e-t)/oi),(t=>t.getMinutes()))),xi=(yi.range,fi((t=>{t.setUTCSeconds(0,0)}),((t,e)=>{t.setTime(+t+e*oi)}),((t,e)=>(e-t)/oi),(t=>t.getUTCMinutes()))),bi=(xi.range,fi((t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*ai-t.getMinutes()*oi)}),((t,e)=>{t.setTime(+t+e*si)}),((t,e)=>(e-t)/si),(t=>t.getHours()))),ki=(bi.range,fi((t=>{t.setUTCMinutes(0,0,0)}),((t,e)=>{t.setTime(+t+e*si)}),((t,e)=>(e-t)/si),(t=>t.getUTCHours()))),Ci=(ki.range,fi((t=>t.setHours(0,0,0,0)),((t,e)=>t.setDate(t.getDate()+e)),((t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*oi)/li),(t=>t.getDate()-1))),wi=(Ci.range,fi((t=>{t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+e)}),((t,e)=>(e-t)/li),(t=>t.getUTCDate()-1))),vi=(wi.range,fi((t=>{t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+e)}),((t,e)=>(e-t)/li),(t=>Math.floor(t/li))));vi.range;function _i(t){return fi((e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),((t,e)=>{t.setDate(t.getDate()+7*e)}),((t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*oi)/ci))}const Si=_i(0),Ai=_i(1),Ti=_i(2),Mi=_i(3),Bi=_i(4),Li=_i(5),Fi=_i(6);Si.range,Ai.range,Ti.range,Mi.range,Bi.range,Li.range,Fi.range;function $i(t){return fi((e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+7*e)}),((t,e)=>(e-t)/ci))}const Ei=$i(0),ji=$i(1),Ni=$i(2),Di=$i(3),Oi=$i(4),Ii=$i(5),Ri=$i(6),Pi=(Ei.range,ji.range,Ni.range,Di.range,Oi.range,Ii.range,Ri.range,fi((t=>{t.setDate(1),t.setHours(0,0,0,0)}),((t,e)=>{t.setMonth(t.getMonth()+e)}),((t,e)=>e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())),(t=>t.getMonth()))),zi=(Pi.range,fi((t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)}),((t,e)=>e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())),(t=>t.getUTCMonth()))),Ki=(zi.range,fi((t=>{t.setMonth(0,1),t.setHours(0,0,0,0)}),((t,e)=>{t.setFullYear(t.getFullYear()+e)}),((t,e)=>e.getFullYear()-t.getFullYear()),(t=>t.getFullYear())));Ki.every=t=>isFinite(t=Math.floor(t))&&t>0?fi((e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),((e,r)=>{e.setFullYear(e.getFullYear()+r*t)})):null;Ki.range;const qi=fi((t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)}),((t,e)=>e.getUTCFullYear()-t.getUTCFullYear()),(t=>t.getUTCFullYear()));qi.every=t=>isFinite(t=Math.floor(t))&&t>0?fi((e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),((e,r)=>{e.setUTCFullYear(e.getUTCFullYear()+r*t)})):null;qi.range;function Wi(t,e,r,n,i,a){const o=[[mi,1,ai],[mi,5,5e3],[mi,15,15e3],[mi,30,3e4],[a,1,oi],[a,5,3e5],[a,15,9e5],[a,30,18e5],[i,1,si],[i,3,108e5],[i,6,216e5],[i,12,432e5],[n,1,li],[n,2,1728e5],[r,1,ci],[e,1,hi],[e,3,7776e6],[t,1,ui]];function s(e,r,n){const i=Math.abs(r-e)/n,a=Cn((([,,t])=>t)).right(o,i);if(a===o.length)return t.every(xn(e/ui,r/ui,n));if(0===a)return gi.every(Math.max(xn(e,r,n),1));const[s,l]=o[i/o[a-1][2][t.toLowerCase(),e])))}function la(t,e,r){var n=ea.exec(e.slice(r,r+1));return n?(t.w=+n[0],r+n[0].length):-1}function ca(t,e,r){var n=ea.exec(e.slice(r,r+1));return n?(t.u=+n[0],r+n[0].length):-1}function ha(t,e,r){var n=ea.exec(e.slice(r,r+2));return n?(t.U=+n[0],r+n[0].length):-1}function ua(t,e,r){var n=ea.exec(e.slice(r,r+2));return n?(t.V=+n[0],r+n[0].length):-1}function da(t,e,r){var n=ea.exec(e.slice(r,r+2));return n?(t.W=+n[0],r+n[0].length):-1}function pa(t,e,r){var n=ea.exec(e.slice(r,r+4));return n?(t.y=+n[0],r+n[0].length):-1}function fa(t,e,r){var n=ea.exec(e.slice(r,r+2));return n?(t.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function ga(t,e,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(r,r+6));return n?(t.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function ma(t,e,r){var n=ea.exec(e.slice(r,r+1));return n?(t.q=3*n[0]-3,r+n[0].length):-1}function ya(t,e,r){var n=ea.exec(e.slice(r,r+2));return n?(t.m=n[0]-1,r+n[0].length):-1}function xa(t,e,r){var n=ea.exec(e.slice(r,r+2));return n?(t.d=+n[0],r+n[0].length):-1}function ba(t,e,r){var n=ea.exec(e.slice(r,r+3));return n?(t.m=0,t.d=+n[0],r+n[0].length):-1}function ka(t,e,r){var n=ea.exec(e.slice(r,r+2));return n?(t.H=+n[0],r+n[0].length):-1}function Ca(t,e,r){var n=ea.exec(e.slice(r,r+2));return n?(t.M=+n[0],r+n[0].length):-1}function wa(t,e,r){var n=ea.exec(e.slice(r,r+2));return n?(t.S=+n[0],r+n[0].length):-1}function va(t,e,r){var n=ea.exec(e.slice(r,r+3));return n?(t.L=+n[0],r+n[0].length):-1}function _a(t,e,r){var n=ea.exec(e.slice(r,r+6));return n?(t.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function Sa(t,e,r){var n=ra.exec(e.slice(r,r+1));return n?r+n[0].length:-1}function Aa(t,e,r){var n=ea.exec(e.slice(r));return n?(t.Q=+n[0],r+n[0].length):-1}function Ta(t,e,r){var n=ea.exec(e.slice(r));return n?(t.s=+n[0],r+n[0].length):-1}function Ma(t,e){return ia(t.getDate(),e,2)}function Ba(t,e){return ia(t.getHours(),e,2)}function La(t,e){return ia(t.getHours()%12||12,e,2)}function Fa(t,e){return ia(1+Ci.count(Ki(t),t),e,3)}function $a(t,e){return ia(t.getMilliseconds(),e,3)}function Ea(t,e){return $a(t,e)+"000"}function ja(t,e){return ia(t.getMonth()+1,e,2)}function Na(t,e){return ia(t.getMinutes(),e,2)}function Da(t,e){return ia(t.getSeconds(),e,2)}function Oa(t){var e=t.getDay();return 0===e?7:e}function Ia(t,e){return ia(Si.count(Ki(t)-1,t),e,2)}function Ra(t){var e=t.getDay();return e>=4||0===e?Bi(t):Bi.ceil(t)}function Pa(t,e){return t=Ra(t),ia(Bi.count(Ki(t),t)+(4===Ki(t).getDay()),e,2)}function za(t){return t.getDay()}function Ka(t,e){return ia(Ai.count(Ki(t)-1,t),e,2)}function qa(t,e){return ia(t.getFullYear()%100,e,2)}function Wa(t,e){return ia((t=Ra(t)).getFullYear()%100,e,2)}function Ha(t,e){return ia(t.getFullYear()%1e4,e,4)}function Ua(t,e){var r=t.getDay();return ia((t=r>=4||0===r?Bi(t):Bi.ceil(t)).getFullYear()%1e4,e,4)}function Ya(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+ia(e/60|0,"0",2)+ia(e%60,"0",2)}function Ga(t,e){return ia(t.getUTCDate(),e,2)}function Va(t,e){return ia(t.getUTCHours(),e,2)}function Za(t,e){return ia(t.getUTCHours()%12||12,e,2)}function Xa(t,e){return ia(1+wi.count(qi(t),t),e,3)}function Qa(t,e){return ia(t.getUTCMilliseconds(),e,3)}function Ja(t,e){return Qa(t,e)+"000"}function to(t,e){return ia(t.getUTCMonth()+1,e,2)}function eo(t,e){return ia(t.getUTCMinutes(),e,2)}function ro(t,e){return ia(t.getUTCSeconds(),e,2)}function no(t){var e=t.getUTCDay();return 0===e?7:e}function io(t,e){return ia(Ei.count(qi(t)-1,t),e,2)}function ao(t){var e=t.getUTCDay();return e>=4||0===e?Oi(t):Oi.ceil(t)}function oo(t,e){return t=ao(t),ia(Oi.count(qi(t),t)+(4===qi(t).getUTCDay()),e,2)}function so(t){return t.getUTCDay()}function lo(t,e){return ia(ji.count(qi(t)-1,t),e,2)}function co(t,e){return ia(t.getUTCFullYear()%100,e,2)}function ho(t,e){return ia((t=ao(t)).getUTCFullYear()%100,e,2)}function uo(t,e){return ia(t.getUTCFullYear()%1e4,e,4)}function po(t,e){var r=t.getUTCDay();return ia((t=r>=4||0===r?Oi(t):Oi.ceil(t)).getUTCFullYear()%1e4,e,4)}function fo(){return"+0000"}function go(){return"%"}function mo(t){return+t}function yo(t){return Math.floor(+t/1e3)}function xo(t){return new Date(t)}function bo(t){return t instanceof Date?+t:+new Date(+t)}function ko(t,e,r,n,i,a,o,s,l,c){var h=Pn(),u=h.invert,d=h.domain,p=c(".%L"),f=c(":%S"),g=c("%I:%M"),m=c("%I %p"),y=c("%a %d"),x=c("%b %d"),b=c("%B"),k=c("%Y");function C(t){return(l(t)=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:mo,s:yo,S:Da,u:Oa,U:Ia,V:Pa,w:za,W:Ka,x:null,X:null,y:qa,Y:Ha,Z:Ya,"%":go},k={a:function(t){return o[t.getUTCDay()]},A:function(t){return a[t.getUTCDay()]},b:function(t){return l[t.getUTCMonth()]},B:function(t){return s[t.getUTCMonth()]},c:null,d:Ga,e:Ga,f:Ja,g:ho,G:po,H:Va,I:Za,j:Xa,L:Qa,m:to,M:eo,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:mo,s:yo,S:ro,u:no,U:io,V:oo,w:so,W:lo,x:null,X:null,y:co,Y:uo,Z:fo,"%":go},C={a:function(t,e,r){var n=p.exec(e.slice(r));return n?(t.w=f.get(n[0].toLowerCase()),r+n[0].length):-1},A:function(t,e,r){var n=u.exec(e.slice(r));return n?(t.w=d.get(n[0].toLowerCase()),r+n[0].length):-1},b:function(t,e,r){var n=y.exec(e.slice(r));return n?(t.m=x.get(n[0].toLowerCase()),r+n[0].length):-1},B:function(t,e,r){var n=g.exec(e.slice(r));return n?(t.m=m.get(n[0].toLowerCase()),r+n[0].length):-1},c:function(t,r,n){return _(t,e,r,n)},d:xa,e:xa,f:_a,g:fa,G:pa,H:ka,I:ka,j:ba,L:va,m:ya,M:Ca,p:function(t,e,r){var n=c.exec(e.slice(r));return n?(t.p=h.get(n[0].toLowerCase()),r+n[0].length):-1},q:ma,Q:Aa,s:Ta,S:wa,u:ca,U:ha,V:ua,w:la,W:da,x:function(t,e,n){return _(t,r,e,n)},X:function(t,e,r){return _(t,n,e,r)},y:fa,Y:pa,Z:ga,"%":Sa};function w(t,e){return function(r){var n,i,a,o=[],s=-1,l=0,c=t.length;for(r instanceof Date||(r=new Date(+r));++s53)return null;"w"in a||(a.w=1),"Z"in a?(i=(n=Zi(Xi(a.y,0,1))).getUTCDay(),n=i>4||0===i?ji.ceil(n):ji(n),n=wi.offset(n,7*(a.V-1)),a.y=n.getUTCFullYear(),a.m=n.getUTCMonth(),a.d=n.getUTCDate()+(a.w+6)%7):(i=(n=Vi(Xi(a.y,0,1))).getDay(),n=i>4||0===i?Ai.ceil(n):Ai(n),n=Ci.offset(n,7*(a.V-1)),a.y=n.getFullYear(),a.m=n.getMonth(),a.d=n.getDate()+(a.w+6)%7)}else("W"in a||"U"in a)&&("w"in a||(a.w="u"in a?a.u%7:"W"in a?1:0),i="Z"in a?Zi(Xi(a.y,0,1)).getUTCDay():Vi(Xi(a.y,0,1)).getDay(),a.m=0,a.d="W"in a?(a.w+6)%7+7*a.W-(i+5)%7:a.w+7*a.U-(i+6)%7);return"Z"in a?(a.H+=a.Z/100|0,a.M+=a.Z%100,Zi(a)):Vi(a)}}function _(t,e,r,n){for(var i,a,o=0,s=e.length,l=r.length;o=l)return-1;if(37===(i=e.charCodeAt(o++))){if(i=e.charAt(o++),!(a=C[i in ta?e.charAt(o++):i])||(n=a(t,r,n))<0)return-1}else if(i!=r.charCodeAt(n++))return-1}return n}return b.x=w(r,b),b.X=w(n,b),b.c=w(e,b),k.x=w(r,k),k.X=w(n,k),k.c=w(e,k),{format:function(t){var e=w(t+="",b);return e.toString=function(){return t},e},parse:function(t){var e=v(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=w(t+="",k);return e.toString=function(){return t},e},utcParse:function(t){var e=v(t+="",!0);return e.toString=function(){return t},e}}}(t),Ji=Qi.format,Qi.parse,Qi.utcFormat,Qi.utcParse}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});const wo=function(t){for(var e=t.length/6|0,r=new Array(e),n=0;n=1?jo:t<=-1?-jo:Math.asin(t)}const Oo=Math.PI,Io=2*Oo,Ro=1e-6,Po=Io-Ro;function zo(t){this._+=t[0];for(let e=1,r=t.length;e=0))throw new Error(`invalid digits: ${t}`);if(e>15)return zo;const r=10**e;return function(t){this._+=t[0];for(let e=1,n=t.length;eRo)if(Math.abs(h*s-l*c)>Ro&&i){let d=r-a,p=n-o,f=s*s+l*l,g=d*d+p*p,m=Math.sqrt(f),y=Math.sqrt(u),x=i*Math.tan((Oo-Math.acos((f+u-g)/(2*m*y)))/2),b=x/y,k=x/m;Math.abs(b-1)>Ro&&this._append`L${t+b*c},${e+b*h}`,this._append`A${i},${i},0,0,${+(h*d>c*p)},${this._x1=t+k*s},${this._y1=e+k*l}`}else this._append`L${this._x1=t},${this._y1=e}`;else;}arc(t,e,r,n,i,a){if(t=+t,e=+e,a=!!a,(r=+r)<0)throw new Error(`negative radius: ${r}`);let o=r*Math.cos(n),s=r*Math.sin(n),l=t+o,c=e+s,h=1^a,u=a?n-i:i-n;null===this._x1?this._append`M${l},${c}`:(Math.abs(this._x1-l)>Ro||Math.abs(this._y1-c)>Ro)&&this._append`L${l},${c}`,r&&(u<0&&(u=u%Io+Io),u>Po?this._append`A${r},${r},0,1,${h},${t-o},${e-s}A${r},${r},0,1,${h},${this._x1=l},${this._y1=c}`:u>Ro&&this._append`A${r},${r},0,${+(u>=Oo)},${h},${this._x1=t+r*Math.cos(i)},${this._y1=e+r*Math.sin(i)}`)}rect(t,e,r,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${r=+r}v${+n}h${-r}Z`}toString(){return this._}}function qo(t){let e=3;return t.digits=function(r){if(!arguments.length)return e;if(null==r)e=null;else{const t=Math.floor(r);if(!(t>=0))throw new RangeError(`invalid digits: ${r}`);e=t}return t},()=>new Ko(e)}function Wo(t){return t.innerRadius}function Ho(t){return t.outerRadius}function Uo(t){return t.startAngle}function Yo(t){return t.endAngle}function Go(t){return t&&t.padAngle}function Vo(t,e,r,n,i,a,o){var s=t-r,l=e-n,c=(o?a:-a)/Fo(s*s+l*l),h=c*l,u=-c*s,d=t+h,p=e+u,f=r+h,g=n+u,m=(d+f)/2,y=(p+g)/2,x=f-d,b=g-p,k=x*x+b*b,C=i-a,w=d*g-f*p,v=(b<0?-1:1)*Fo(Mo(0,C*C*k-w*w)),_=(w*b-x*v)/k,S=(-w*x-b*v)/k,A=(w*b+x*v)/k,T=(-w*x+b*v)/k,M=_-m,B=S-y,L=A-m,F=T-y;return M*M+B*B>L*L+F*F&&(_=A,S=T),{cx:_,cy:S,x01:-h,y01:-u,x11:_*(i/C-1),y11:S*(i/C-1)}}function Zo(){var t=Wo,e=Ho,r=_o(0),n=null,i=Uo,a=Yo,o=Go,s=null,l=qo(c);function c(){var c,h,u,d=+t.apply(this,arguments),p=+e.apply(this,arguments),f=i.apply(this,arguments)-jo,g=a.apply(this,arguments)-jo,m=So(g-f),y=g>f;if(s||(s=c=l()),p$o)if(m>No-$o)s.moveTo(p*To(f),p*Lo(f)),s.arc(0,0,p,f,g,!y),d>$o&&(s.moveTo(d*To(g),d*Lo(g)),s.arc(0,0,d,g,f,y));else{var x,b,k=f,C=g,w=f,v=g,_=m,S=m,A=o.apply(this,arguments)/2,T=A>$o&&(n?+n.apply(this,arguments):Fo(d*d+p*p)),M=Bo(So(p-d)/2,+r.apply(this,arguments)),B=M,L=M;if(T>$o){var F=Do(T/d*Lo(A)),$=Do(T/p*Lo(A));(_-=2*F)>$o?(w+=F*=y?1:-1,v-=F):(_=0,w=v=(f+g)/2),(S-=2*$)>$o?(k+=$*=y?1:-1,C-=$):(S=0,k=C=(f+g)/2)}var E=p*To(k),j=p*Lo(k),N=d*To(v),D=d*Lo(v);if(M>$o){var O,I=p*To(C),R=p*Lo(C),P=d*To(w),z=d*Lo(w);if(m1?0:u<-1?Eo:Math.acos(u))/2),Y=Fo(O[0]*O[0]+O[1]*O[1]);B=Bo(M,(d-Y)/(U-1)),L=Bo(M,(p-Y)/(U+1))}else B=L=0}S>$o?L>$o?(x=Vo(P,z,E,j,p,L,y),b=Vo(I,R,N,D,p,L,y),s.moveTo(x.cx+x.x01,x.cy+x.y01),L$o&&_>$o?B>$o?(x=Vo(N,D,I,R,d,-B,y),b=Vo(E,j,P,z,d,-B,y),s.lineTo(x.cx+x.x01,x.cy+x.y01),Bt?1:e>=t?0:NaN}function is(t){return t}function as(){var t=is,e=ns,r=null,n=_o(0),i=_o(No),a=_o(0);function o(o){var s,l,c,h,u,d=(o=Xo(o)).length,p=0,f=new Array(d),g=new Array(d),m=+n.apply(this,arguments),y=Math.min(No,Math.max(-No,i.apply(this,arguments)-m)),x=Math.min(Math.abs(y)/d,a.apply(this,arguments)),b=x*(y<0?-1:1);for(s=0;s0&&(p+=u);for(null!=e?f.sort((function(t,r){return e(g[t],g[r])})):null!=r&&f.sort((function(t,e){return r(o[t],o[e])})),s=0,c=p?(y-d*b)/p:0;s0?u*c:0)+b,g[l]={data:o[l],index:s,value:u,startAngle:m,endAngle:h,padAngle:x};return g}return o.value=function(e){return arguments.length?(t="function"==typeof e?e:_o(+e),o):t},o.sortValues=function(t){return arguments.length?(e=t,r=null,o):e},o.sort=function(t){return arguments.length?(r=t,e=null,o):r},o.startAngle=function(t){return arguments.length?(n="function"==typeof t?t:_o(+t),o):n},o.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:_o(+t),o):i},o.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:_o(+t),o):a},o}function os(){}function ss(t,e,r){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+r)/6)}function ls(t){this._context=t}function cs(t){return new ls(t)}function hs(t){this._context=t}function us(t){return new hs(t)}function ds(t){this._context=t}function ps(t){return new ds(t)}Qo.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}},ls.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:ss(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:ss(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},hs.prototype={areaStart:os,areaEnd:os,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:ss(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},ds.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+t)/6,n=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:ss(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};class fs{constructor(t,e){this._context=t,this._x=e}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,e,t,e):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+e)/2,t,this._y0,t,e)}this._x0=t,this._y0=e}}function gs(t){return new fs(t,!0)}function ms(t){return new fs(t,!1)}function ys(t,e){this._basis=new ls(t),this._beta=e}ys.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,r=t.length-1;if(r>0)for(var n,i=t[0],a=e[0],o=t[r]-i,s=e[r]-a,l=-1;++l<=r;)n=l/r,this._basis.point(this._beta*t[l]+(1-this._beta)*(i+n*o),this._beta*e[l]+(1-this._beta)*(a+n*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};const xs=function t(e){function r(t){return 1===e?new ls(t):new ys(t,e)}return r.beta=function(e){return t(+e)},r}(.85);function bs(t,e,r){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-r),t._x2,t._y2)}function ks(t,e){this._context=t,this._k=(1-e)/6}ks.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:bs(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:bs(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Cs=function t(e){function r(t){return new ks(t,e)}return r.tension=function(e){return t(+e)},r}(0);function ws(t,e){this._context=t,this._k=(1-e)/6}ws.prototype={areaStart:os,areaEnd:os,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:bs(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const vs=function t(e){function r(t){return new ws(t,e)}return r.tension=function(e){return t(+e)},r}(0);function _s(t,e){this._context=t,this._k=(1-e)/6}_s.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:bs(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Ss=function t(e){function r(t){return new _s(t,e)}return r.tension=function(e){return t(+e)},r}(0);function As(t,e,r){var n=t._x1,i=t._y1,a=t._x2,o=t._y2;if(t._l01_a>$o){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,l=3*t._l01_a*(t._l01_a+t._l12_a);n=(n*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,i=(i*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>$o){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,h=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*c+t._x1*t._l23_2a-e*t._l12_2a)/h,o=(o*c+t._y1*t._l23_2a-r*t._l12_2a)/h}t._context.bezierCurveTo(n,i,a,o,t._x2,t._y2)}function Ts(t,e){this._context=t,this._alpha=e}Ts.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:As(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Ms=function t(e){function r(t){return e?new Ts(t,e):new ks(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function Bs(t,e){this._context=t,this._alpha=e}Bs.prototype={areaStart:os,areaEnd:os,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:As(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Ls=function t(e){function r(t){return e?new Bs(t,e):new ws(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function Fs(t,e){this._context=t,this._alpha=e}Fs.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:As(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const $s=function t(e){function r(t){return e?new Fs(t,e):new _s(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function Es(t){this._context=t}function js(t){return new Es(t)}function Ns(t){return t<0?-1:1}function Ds(t,e,r){var n=t._x1-t._x0,i=e-t._x1,a=(t._y1-t._y0)/(n||i<0&&-0),o=(r-t._y1)/(i||n<0&&-0),s=(a*i+o*n)/(n+i);return(Ns(a)+Ns(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function Os(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}function Is(t,e,r){var n=t._x0,i=t._y0,a=t._x1,o=t._y1,s=(a-n)/3;t._context.bezierCurveTo(n+s,i+s*e,a-s,o-s*r,a,o)}function Rs(t){this._context=t}function Ps(t){this._context=new zs(t)}function zs(t){this._context=t}function Ks(t){return new Rs(t)}function qs(t){return new Ps(t)}function Ws(t){this._context=t}function Hs(t){var e,r,n=t.length-1,i=new Array(n),a=new Array(n),o=new Array(n);for(i[0]=0,a[0]=2,o[0]=t[0]+2*t[1],e=1;e=0;--e)i[e]=(o[e]-i[e+1])/a[e];for(a[n-1]=(t[n]+i[n-1])/2,e=0;e=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var r=this._x*(1-this._t)+t*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,e)}}this._x=t,this._y=e}},Xs.prototype={constructor:Xs,scale:function(t){return 1===t?this:new Xs(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new Xs(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};new Xs(1,0,0);Xs.prototype},93539:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var n=r(72453),i=r(63122);const a=class{constructor(){this.type=i.Z.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=i.Z.ALL}is(t){return this.type===t}};const o=new class{constructor(t,e){this.color=e,this.changed=!1,this.data=t,this.type=new a}set(t,e){return this.color=e,this.changed=!1,this.data=t,this.type.type=i.Z.ALL,this}_ensureHSL(){const t=this.data,{h:e,s:r,l:i}=t;void 0===e&&(t.h=n.A.channel.rgb2hsl(t,"h")),void 0===r&&(t.s=n.A.channel.rgb2hsl(t,"s")),void 0===i&&(t.l=n.A.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r:e,g:r,b:i}=t;void 0===e&&(t.r=n.A.channel.hsl2rgb(t,"r")),void 0===r&&(t.g=n.A.channel.hsl2rgb(t,"g")),void 0===i&&(t.b=n.A.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,e=t.r;return this.type.is(i.Z.HSL)||void 0===e?(this._ensureHSL(),n.A.channel.hsl2rgb(t,"r")):e}get g(){const t=this.data,e=t.g;return this.type.is(i.Z.HSL)||void 0===e?(this._ensureHSL(),n.A.channel.hsl2rgb(t,"g")):e}get b(){const t=this.data,e=t.b;return this.type.is(i.Z.HSL)||void 0===e?(this._ensureHSL(),n.A.channel.hsl2rgb(t,"b")):e}get h(){const t=this.data,e=t.h;return this.type.is(i.Z.RGB)||void 0===e?(this._ensureRGB(),n.A.channel.rgb2hsl(t,"h")):e}get s(){const t=this.data,e=t.s;return this.type.is(i.Z.RGB)||void 0===e?(this._ensureRGB(),n.A.channel.rgb2hsl(t,"s")):e}get l(){const t=this.data,e=t.l;return this.type.is(i.Z.RGB)||void 0===e?(this._ensureRGB(),n.A.channel.rgb2hsl(t,"l")):e}get a(){return this.data.a}set r(t){this.type.set(i.Z.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(i.Z.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(i.Z.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(i.Z.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(i.Z.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(i.Z.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}({r:0,g:0,b:0,a:0},"transparent")},74886:(t,e,r)=>{"use strict";r.d(e,{A:()=>g});var n=r(93539),i=r(63122);const a={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:t=>{if(35!==t.charCodeAt(0))return;const e=t.match(a.re);if(!e)return;const r=e[1],i=parseInt(r,16),o=r.length,s=o%4==0,l=o>4,c=l?1:17,h=l?8:4,u=s?0:-1,d=l?255:15;return n.A.set({r:(i>>h*(u+3)&d)*c,g:(i>>h*(u+2)&d)*c,b:(i>>h*(u+1)&d)*c,a:s?(i&d)*c/255:1},t)},stringify:t=>{const{r:e,g:r,b:n,a:a}=t;return a<1?`#${i.Y[Math.round(e)]}${i.Y[Math.round(r)]}${i.Y[Math.round(n)]}${i.Y[Math.round(255*a)]}`:`#${i.Y[Math.round(e)]}${i.Y[Math.round(r)]}${i.Y[Math.round(n)]}`}},o=a;var s=r(72453);const l={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:t=>{const e=t.match(l.hueRe);if(e){const[,t,r]=e;switch(r){case"grad":return s.A.channel.clamp.h(.9*parseFloat(t));case"rad":return s.A.channel.clamp.h(180*parseFloat(t)/Math.PI);case"turn":return s.A.channel.clamp.h(360*parseFloat(t))}}return s.A.channel.clamp.h(parseFloat(t))},parse:t=>{const e=t.charCodeAt(0);if(104!==e&&72!==e)return;const r=t.match(l.re);if(!r)return;const[,i,a,o,c,h]=r;return n.A.set({h:l._hue2deg(i),s:s.A.channel.clamp.s(parseFloat(a)),l:s.A.channel.clamp.l(parseFloat(o)),a:c?s.A.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},t)},stringify:t=>{const{h:e,s:r,l:n,a:i}=t;return i<1?`hsla(${s.A.lang.round(e)}, ${s.A.lang.round(r)}%, ${s.A.lang.round(n)}%, ${i})`:`hsl(${s.A.lang.round(e)}, ${s.A.lang.round(r)}%, ${s.A.lang.round(n)}%)`}},c=l,h={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:t=>{t=t.toLowerCase();const e=h.colors[t];if(e)return o.parse(e)},stringify:t=>{const e=o.stringify(t);for(const r in h.colors)if(h.colors[r]===e)return r}},u=h,d={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:t=>{const e=t.charCodeAt(0);if(114!==e&&82!==e)return;const r=t.match(d.re);if(!r)return;const[,i,a,o,l,c,h,u,p]=r;return n.A.set({r:s.A.channel.clamp.r(a?2.55*parseFloat(i):parseFloat(i)),g:s.A.channel.clamp.g(l?2.55*parseFloat(o):parseFloat(o)),b:s.A.channel.clamp.b(h?2.55*parseFloat(c):parseFloat(c)),a:u?s.A.channel.clamp.a(p?parseFloat(u)/100:parseFloat(u)):1},t)},stringify:t=>{const{r:e,g:r,b:n,a:i}=t;return i<1?`rgba(${s.A.lang.round(e)}, ${s.A.lang.round(r)}, ${s.A.lang.round(n)}, ${s.A.lang.round(i)})`:`rgb(${s.A.lang.round(e)}, ${s.A.lang.round(r)}, ${s.A.lang.round(n)})`}},p=d,f={format:{keyword:h,hex:o,rgb:d,rgba:d,hsl:l,hsla:l},parse:t=>{if("string"!=typeof t)return t;const e=o.parse(t)||p.parse(t)||c.parse(t)||u.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},stringify:t=>!t.changed&&t.color?t.color:t.type.is(i.Z.HSL)||void 0===t.data.r?c.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?p.stringify(t):o.stringify(t)},g=f},63122:(t,e,r)=>{"use strict";r.d(e,{Y:()=>i,Z:()=>a});var n=r(72453);const i={};for(let o=0;o<=255;o++)i[o]=n.A.unit.dec2hex(o);const a={ALL:0,RGB:1,HSL:2}},95635:(t,e,r)=>{"use strict";r.d(e,{A:()=>a});var n=r(72453),i=r(74886);const a=(t,e,r)=>{const a=i.A.parse(t),o=a[e],s=n.A.channel.clamp[e](o+r);return o!==s&&(a[e]=s),i.A.stringify(a)}},8232:(t,e,r)=>{"use strict";r.d(e,{A:()=>a});var n=r(72453),i=r(74886);const a=(t,e)=>{const r=i.A.parse(t);for(const i in e)r[i]=n.A.channel.clamp[i](e[i]);return i.A.stringify(r)}},75263:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});var n=r(95635);const i=(t,e)=>(0,n.A)(t,"l",-e)},3219:(t,e,r)=>{"use strict";r.d(e,{A:()=>s});var n=r(72453),i=r(74886);const a=t=>{const{r:e,g:r,b:a}=i.A.parse(t),o=.2126*n.A.channel.toLinear(e)+.7152*n.A.channel.toLinear(r)+.0722*n.A.channel.toLinear(a);return n.A.lang.round(o)},o=t=>a(t)>=.5,s=t=>!o(t)},78041:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});var n=r(95635);const i=(t,e)=>(0,n.A)(t,"l",e)},25582:(t,e,r)=>{"use strict";r.d(e,{A:()=>s});var n=r(72453),i=r(93539),a=r(74886),o=r(8232);const s=(t,e,r=0,s=1)=>{if("number"!=typeof t)return(0,o.A)(t,{a:e});const l=i.A.set({r:n.A.channel.clamp.r(t),g:n.A.channel.clamp.g(e),b:n.A.channel.clamp.b(r),a:n.A.channel.clamp.a(s)});return a.A.stringify(l)}},72453:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});const n={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:t=>t>=255?255:t<0?0:t,g:t=>t>=255?255:t<0?0:t,b:t=>t>=255?255:t<0?0:t,h:t=>t%360,s:t=>t>=100?100:t<0?0:t,l:t=>t>=100?100:t<0?0:t,a:t=>t>=1?1:t<0?0:t},toLinear:t=>{const e=t/255;return t>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92},hue2rgb:(t,e,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t),hsl2rgb:({h:t,s:e,l:r},i)=>{if(!e)return 2.55*r;t/=360,e/=100;const a=(r/=100)<.5?r*(1+e):r+e-r*e,o=2*r-a;switch(i){case"r":return 255*n.hue2rgb(o,a,t+1/3);case"g":return 255*n.hue2rgb(o,a,t);case"b":return 255*n.hue2rgb(o,a,t-1/3)}},rgb2hsl:({r:t,g:e,b:r},n)=>{t/=255,e/=255,r/=255;const i=Math.max(t,e,r),a=Math.min(t,e,r),o=(i+a)/2;if("l"===n)return 100*o;if(i===a)return 0;const s=i-a;if("s"===n)return 100*(o>.5?s/(2-i-a):s/(i+a));switch(i){case t:return 60*((e-r)/s+(ee>r?Math.min(e,Math.max(r,t)):Math.min(r,Math.max(e,t)),round:t=>Math.round(1e10*t)/1e10},unit:{dec2hex:t=>{const e=Math.round(t).toString(16);return e.length>1?e:`0${e}`}}}},80127:(t,e,r)=>{"use strict";r.d(e,{A:()=>d});const n=function(){this.__data__=[],this.size=0};var i=r(66984);const a=function(t,e){for(var r=t.length;r--;)if((0,i.A)(t[r][0],e))return r;return-1};var o=Array.prototype.splice;const s=function(t){var e=this.__data__,r=a(e,t);return!(r<0)&&(r==e.length-1?e.pop():o.call(e,r,1),--this.size,!0)};const l=function(t){var e=this.__data__,r=a(e,t);return r<0?void 0:e[r][1]};const c=function(t){return a(this.__data__,t)>-1};const h=function(t,e){var r=this.__data__,n=a(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this};function u(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e{"use strict";r.d(e,{A:()=>a});var n=r(18744),i=r(41917);const a=(0,n.A)(i.A,"Map")},29471:(t,e,r)=>{"use strict";r.d(e,{A:()=>v});const n=(0,r(18744).A)(Object,"create");const i=function(){this.__data__=n?n(null):{},this.size=0};const a=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e};var o=Object.prototype.hasOwnProperty;const s=function(t){var e=this.__data__;if(n){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return o.call(e,t)?e[t]:void 0};var l=Object.prototype.hasOwnProperty;const c=function(t){var e=this.__data__;return n?void 0!==e[t]:l.call(e,t)};const h=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=n&&void 0===e?"__lodash_hash_undefined__":e,this};function u(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e{"use strict";r.d(e,{A:()=>a});var n=r(18744),i=r(41917);const a=(0,n.A)(i.A,"Set")},11754:(t,e,r)=>{"use strict";r.d(e,{A:()=>d});var n=r(80127);const i=function(){this.__data__=new n.A,this.size=0};const a=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r};const o=function(t){return this.__data__.get(t)};const s=function(t){return this.__data__.has(t)};var l=r(68335),c=r(29471);const h=function(t,e){var r=this.__data__;if(r instanceof n.A){var i=r.__data__;if(!l.A||i.length<199)return i.push([t,e]),this.size=++r.size,this;r=this.__data__=new c.A(i)}return r.set(t,e),this.size=r.size,this};function u(t){var e=this.__data__=new n.A(t);this.size=e.size}u.prototype.clear=i,u.prototype.delete=a,u.prototype.get=o,u.prototype.has=s,u.prototype.set=h;const d=u},241:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const n=r(41917).A.Symbol},43988:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const n=r(41917).A.Uint8Array},83607:(t,e,r)=>{"use strict";r.d(e,{A:()=>h});const n=function(t,e){for(var r=-1,n=Array(t);++r{"use strict";r.d(e,{A:()=>o});var n=r(52528),i=r(66984),a=Object.prototype.hasOwnProperty;const o=function(t,e,r){var o=t[e];a.call(t,e)&&(0,i.A)(o,r)&&(void 0!==r||e in t)||(0,n.A)(t,e,r)}},52528:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});var n=r(84171);const i=function(t,e,r){"__proto__"==e&&n.A?(0,n.A)(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}},4574:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const n=function(t){return function(e,r,n){for(var i=-1,a=Object(e),o=n(e),s=o.length;s--;){var l=o[t?s:++i];if(!1===r(a[l],l,a))break}return e}}()},88496:(t,e,r)=>{"use strict";r.d(e,{A:()=>d});var n=r(241),i=Object.prototype,a=i.hasOwnProperty,o=i.toString,s=n.A?n.A.toStringTag:void 0;const l=function(t){var e=a.call(t,s),r=t[s];try{t[s]=void 0;var n=!0}catch(l){}var i=o.call(t);return n&&(e?t[s]=r:delete t[s]),i};var c=Object.prototype.toString;const h=function(t){return c.call(t)};var u=n.A?n.A.toStringTag:void 0;const d=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":u&&u in Object(t)?l(t):h(t)}},69471:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var n=r(97271);const i=(0,r(40367).A)(Object.keys,Object);var a=Object.prototype.hasOwnProperty;const o=function(t){if(!(0,n.A)(t))return i(t);var e=[];for(var r in Object(t))a.call(t,r)&&"constructor"!=r&&e.push(r);return e}},24326:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var n=r(29008),i=r(76875),a=r(67525);const o=function(t,e){return(0,a.A)((0,i.A)(t,e,n.A),t+"")}},52789:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const n=function(t){return function(e){return t(e)}}},90565:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});var n=r(43988);const i=function(t){var e=new t.constructor(t.byteLength);return new n.A(e).set(new n.A(t)),e}},80154:(t,e,r)=>{"use strict";r.d(e,{A:()=>l});var n=r(41917),i="object"==typeof exports&&exports&&!exports.nodeType&&exports,a=i&&"object"==typeof module&&module&&!module.nodeType&&module,o=a&&a.exports===i?n.A.Buffer:void 0,s=o?o.allocUnsafe:void 0;const l=function(t,e){if(e)return t.slice();var r=t.length,n=s?s(r):new t.constructor(r);return t.copy(n),n}},1801:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});var n=r(90565);const i=function(t,e){var r=e?(0,n.A)(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}},39759:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const n=function(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r{"use strict";r.d(e,{A:()=>a});var n=r(52851),i=r(52528);const a=function(t,e,r,a){var o=!r;r||(r={});for(var s=-1,l=e.length;++s{"use strict";r.d(e,{A:()=>a});var n=r(24326),i=r(6832);const a=function(t){return(0,n.A)((function(e,r){var n=-1,a=r.length,o=a>1?r[a-1]:void 0,s=a>2?r[2]:void 0;for(o=t.length>3&&"function"==typeof o?(a--,o):void 0,s&&(0,i.A)(r[0],r[1],s)&&(o=a<3?void 0:o,a=1),e=Object(e);++n{"use strict";r.d(e,{A:()=>i});var n=r(18744);const i=function(){try{var t=(0,n.A)(Object,"defineProperty");return t({},"",{}),t}catch(e){}}()},72136:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const n="object"==typeof global&&global&&global.Object===Object&&global},18744:(t,e,r)=>{"use strict";r.d(e,{A:()=>x});var n=r(89610);const i=r(41917).A["__core-js_shared__"];var a,o=(a=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+a:"";const s=function(t){return!!o&&o in t};var l=r(23149),c=r(81121),h=/^\[object .+?Constructor\]$/,u=Function.prototype,d=Object.prototype,p=u.toString,f=d.hasOwnProperty,g=RegExp("^"+p.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const m=function(t){return!(!(0,l.A)(t)||s(t))&&((0,n.A)(t)?g:h).test((0,c.A)(t))};const y=function(t,e){return null==t?void 0:t[e]};const x=function(t,e){var r=y(t,e);return m(r)?r:void 0}},15647:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const n=(0,r(40367).A)(Object.getPrototypeOf,Object)},9779:(t,e,r)=>{"use strict";r.d(e,{A:()=>v});var n=r(18744),i=r(41917);const a=(0,n.A)(i.A,"DataView");var o=r(68335);const s=(0,n.A)(i.A,"Promise");var l=r(39857);const c=(0,n.A)(i.A,"WeakMap");var h=r(88496),u=r(81121),d="[object Map]",p="[object Promise]",f="[object Set]",g="[object WeakMap]",m="[object DataView]",y=(0,u.A)(a),x=(0,u.A)(o.A),b=(0,u.A)(s),k=(0,u.A)(l.A),C=(0,u.A)(c),w=h.A;(a&&w(new a(new ArrayBuffer(1)))!=m||o.A&&w(new o.A)!=d||s&&w(s.resolve())!=p||l.A&&w(new l.A)!=f||c&&w(new c)!=g)&&(w=function(t){var e=(0,h.A)(t),r="[object Object]"==e?t.constructor:void 0,n=r?(0,u.A)(r):"";if(n)switch(n){case y:return m;case x:return d;case b:return p;case k:return f;case C:return g}return e});const v=w},18598:(t,e,r)=>{"use strict";r.d(e,{A:()=>l});var n=r(23149),i=Object.create;const a=function(){function t(){}return function(e){if(!(0,n.A)(e))return{};if(i)return i(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();var o=r(15647),s=r(97271);const l=function(t){return"function"!=typeof t.constructor||(0,s.A)(t)?{}:a((0,o.A)(t))}},25353:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});var n=/^(?:0|[1-9]\d*)$/;const i=function(t,e){var r=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==r||"symbol"!=r&&n.test(t))&&t>-1&&t%1==0&&t{"use strict";r.d(e,{A:()=>s});var n=r(66984),i=r(38446),a=r(25353),o=r(23149);const s=function(t,e,r){if(!(0,o.A)(r))return!1;var s=typeof e;return!!("number"==s?(0,i.A)(r)&&(0,a.A)(e,r.length):"string"==s&&e in r)&&(0,n.A)(r[e],t)}},97271:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});var n=Object.prototype;const i=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||n)}},64841:(t,e,r)=>{"use strict";r.d(e,{A:()=>s});var n=r(72136),i="object"==typeof exports&&exports&&!exports.nodeType&&exports,a=i&&"object"==typeof module&&module&&!module.nodeType&&module,o=a&&a.exports===i&&n.A.process;const s=function(){try{var t=a&&a.require&&a.require("util").types;return t||o&&o.binding&&o.binding("util")}catch(e){}}()},40367:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const n=function(t,e){return function(r){return t(e(r))}}},76875:(t,e,r)=>{"use strict";r.d(e,{A:()=>a});const n=function(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)};var i=Math.max;const a=function(t,e,r){return e=i(void 0===e?t.length-1:e,0),function(){for(var a=arguments,o=-1,s=i(a.length-e,0),l=Array(s);++o{"use strict";r.d(e,{A:()=>a});var n=r(72136),i="object"==typeof self&&self&&self.Object===Object&&self;const a=n.A||i||Function("return this")()},67525:(t,e,r)=>{"use strict";r.d(e,{A:()=>l});var n=r(39142),i=r(84171),a=r(29008);const o=i.A?function(t,e){return(0,i.A)(t,"toString",{configurable:!0,enumerable:!1,value:(0,n.A)(e),writable:!0})}:a.A;var s=Date.now;const l=function(t){var e=0,r=0;return function(){var n=s(),i=16-(n-r);if(r=n,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(o)},81121:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});var n=Function.prototype.toString;const i=function(t){if(null!=t){try{return n.call(t)}catch(e){}try{return t+""}catch(e){}}return""}},39142:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const n=function(t){return function(){return t}}},66984:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const n=function(t,e){return t===e||t!=t&&e!=e}},29008:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const n=function(t){return t}},52274:(t,e,r)=>{"use strict";r.d(e,{A:()=>c});var n=r(88496),i=r(53098);const a=function(t){return(0,i.A)(t)&&"[object Arguments]"==(0,n.A)(t)};var o=Object.prototype,s=o.hasOwnProperty,l=o.propertyIsEnumerable;const c=a(function(){return arguments}())?a:function(t){return(0,i.A)(t)&&s.call(t,"callee")&&!l.call(t,"callee")}},92049:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const n=Array.isArray},38446:(t,e,r)=>{"use strict";r.d(e,{A:()=>a});var n=r(89610),i=r(5254);const a=function(t){return null!=t&&(0,i.A)(t.length)&&!(0,n.A)(t)}},53533:(t,e,r)=>{"use strict";r.d(e,{A:()=>a});var n=r(38446),i=r(53098);const a=function(t){return(0,i.A)(t)&&(0,n.A)(t)}},99912:(t,e,r)=>{"use strict";r.d(e,{A:()=>l});var n=r(41917);const i=function(){return!1};var a="object"==typeof exports&&exports&&!exports.nodeType&&exports,o=a&&"object"==typeof module&&module&&!module.nodeType&&module,s=o&&o.exports===a?n.A.Buffer:void 0;const l=(s?s.isBuffer:void 0)||i},66401:(t,e,r)=>{"use strict";r.d(e,{A:()=>d});var n=r(69471),i=r(9779),a=r(52274),o=r(92049),s=r(38446),l=r(99912),c=r(97271),h=r(33858),u=Object.prototype.hasOwnProperty;const d=function(t){if(null==t)return!0;if((0,s.A)(t)&&((0,o.A)(t)||"string"==typeof t||"function"==typeof t.splice||(0,l.A)(t)||(0,h.A)(t)||(0,a.A)(t)))return!t.length;var e=(0,i.A)(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if((0,c.A)(t))return!(0,n.A)(t).length;for(var r in t)if(u.call(t,r))return!1;return!0}},89610:(t,e,r)=>{"use strict";r.d(e,{A:()=>a});var n=r(88496),i=r(23149);const a=function(t){if(!(0,i.A)(t))return!1;var e=(0,n.A)(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},5254:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const n=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},23149:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const n=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},53098:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const n=function(t){return null!=t&&"object"==typeof t}},33858:(t,e,r)=>{"use strict";r.d(e,{A:()=>u});var n=r(88496),i=r(5254),a=r(53098),o={};o["[object Float32Array]"]=o["[object Float64Array]"]=o["[object Int8Array]"]=o["[object Int16Array]"]=o["[object Int32Array]"]=o["[object Uint8Array]"]=o["[object Uint8ClampedArray]"]=o["[object Uint16Array]"]=o["[object Uint32Array]"]=!0,o["[object Arguments]"]=o["[object Array]"]=o["[object ArrayBuffer]"]=o["[object Boolean]"]=o["[object DataView]"]=o["[object Date]"]=o["[object Error]"]=o["[object Function]"]=o["[object Map]"]=o["[object Number]"]=o["[object Object]"]=o["[object RegExp]"]=o["[object Set]"]=o["[object String]"]=o["[object WeakMap]"]=!1;const s=function(t){return(0,a.A)(t)&&(0,i.A)(t.length)&&!!o[(0,n.A)(t)]};var l=r(52789),c=r(64841),h=c.A&&c.A.isTypedArray;const u=h?(0,l.A)(h):s},55615:(t,e,r)=>{"use strict";r.d(e,{A:()=>h});var n=r(83607),i=r(23149),a=r(97271);const o=function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e};var s=Object.prototype.hasOwnProperty;const l=function(t){if(!(0,i.A)(t))return o(t);var e=(0,a.A)(t),r=[];for(var n in t)("constructor"!=n||!e&&s.call(t,n))&&r.push(n);return r};var c=r(38446);const h=function(t){return(0,c.A)(t)?(0,n.A)(t,!0):l(t)}},46632:(t,e,r)=>{"use strict";r.d(e,{A:()=>a});var n=r(29471);function i(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var o=t.apply(this,n);return r.cache=a.set(i,o)||a,o};return r.cache=new(i.Cache||n.A),r}i.Cache=n.A;const a=i},42837:(t,e,r)=>{"use strict";r.d(e,{A:()=>j});var n=r(11754),i=r(52528),a=r(66984);const o=function(t,e,r){(void 0!==r&&!(0,a.A)(t[e],r)||void 0===r&&!(e in t))&&(0,i.A)(t,e,r)};var s=r(4574),l=r(80154),c=r(1801),h=r(39759),u=r(18598),d=r(52274),p=r(92049),f=r(53533),g=r(99912),m=r(89610),y=r(23149),x=r(88496),b=r(15647),k=r(53098),C=Function.prototype,w=Object.prototype,v=C.toString,_=w.hasOwnProperty,S=v.call(Object);const A=function(t){if(!(0,k.A)(t)||"[object Object]"!=(0,x.A)(t))return!1;var e=(0,b.A)(t);if(null===e)return!0;var r=_.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&v.call(r)==S};var T=r(33858);const M=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]};var B=r(22031),L=r(55615);const F=function(t){return(0,B.A)(t,(0,L.A)(t))};const $=function(t,e,r,n,i,a,s){var x=M(t,r),b=M(e,r),k=s.get(b);if(k)o(t,r,k);else{var C=a?a(x,b,r+"",t,e,s):void 0,w=void 0===C;if(w){var v=(0,p.A)(b),_=!v&&(0,g.A)(b),S=!v&&!_&&(0,T.A)(b);C=b,v||_||S?(0,p.A)(x)?C=x:(0,f.A)(x)?C=(0,h.A)(x):_?(w=!1,C=(0,l.A)(b,!0)):S?(w=!1,C=(0,c.A)(b,!0)):C=[]:A(b)||(0,d.A)(b)?(C=x,(0,d.A)(x)?C=F(x):(0,y.A)(x)&&!(0,m.A)(x)||(C=(0,u.A)(b))):w=!1}w&&(s.set(b,C),i(C,b,n,a,s),s.delete(b)),o(t,r,C)}};const E=function t(e,r,i,a,l){e!==r&&(0,s.A)(r,(function(s,c){if(l||(l=new n.A),(0,y.A)(s))$(e,r,c,i,t,a,l);else{var h=a?a(M(e,c),s,c+"",e,r,l):void 0;void 0===h&&(h=s),o(e,c,h)}}),L.A)};const j=(0,r(3767).A)((function(t,e,r){E(t,e,r)}))},34483:(t,e,r)=>{"use strict";r.d(e,{WY:()=>A,pC:()=>_,Gc:()=>C});var n=r(45567);const i=/^[a-z0-9]+(-[a-z0-9]+)*$/,a=(t,e)=>!!t&&!(""!==t.provider&&!t.provider.match(i)||!(e&&""===t.prefix||t.prefix.match(i))||!t.name.match(i)),o=Object.freeze({left:0,top:0,width:16,height:16}),s=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),l=Object.freeze({...o,...s}),c=Object.freeze({...l,body:"",hidden:!1});function h(t,e){const r=function(t,e){const r={};!t.hFlip!=!e.hFlip&&(r.hFlip=!0),!t.vFlip!=!e.vFlip&&(r.vFlip=!0);const n=((t.rotate||0)+(e.rotate||0))%4;return n&&(r.rotate=n),r}(t,e);for(const n in c)n in s?n in t&&!(n in r)&&(r[n]=s[n]):n in e?r[n]=e[n]:n in t&&(r[n]=t[n]);return r}function u(t,e,r){const n=t.icons,i=t.aliases||Object.create(null);let a={};function o(t){a=h(n[t]||i[t],a)}return o(e),r.forEach(o),h(t,a)}function d(t,e){if(t.icons[e])return u(t,e,[]);const r=function(t,e){const r=t.icons,n=t.aliases||Object.create(null),i=Object.create(null);return(e||Object.keys(r).concat(Object.keys(n))).forEach((function t(e){if(r[e])return i[e]=[];if(!(e in i)){i[e]=null;const r=n[e]&&n[e].parent,a=r&&t(r);a&&(i[e]=[r].concat(a))}return i[e]})),i}(t,[e])[e];return r?u(t,e,r):null}const p=Object.freeze({width:null,height:null}),f=Object.freeze({...p,...s}),g=/(-?[0-9.]*[0-9]+[0-9.]*)/g,m=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function y(t,e,r){if(1===e)return t;if(r=r||100,"number"==typeof t)return Math.ceil(t*e*r)/r;if("string"!=typeof t)return t;const n=t.split(g);if(null===n||!n.length)return t;const i=[];let a=n.shift(),o=m.test(a);for(;;){if(o){const t=parseFloat(a);isNaN(t)?i.push(a):i.push(Math.ceil(t*e*r)/r)}else i.push(a);if(a=n.shift(),void 0===a)return i.join("");o=!o}}const x=/\sid="(\S+)"/g,b="IconifyId"+Date.now().toString(16)+(16777216*Math.random()|0).toString(16);let k=0;var C={body:'?',height:80,width:80},w=new Map,v=new Map,_=(0,n.K2)((t=>{for(const e of t){if(!e.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(n.Rm.debug("Registering icon pack:",e.name),"loader"in e)v.set(e.name,e.loader);else{if(!("icons"in e))throw n.Rm.error("Invalid icon loader:",e),new Error('Invalid icon loader. Must have either "icons" or "loader" property.');w.set(e.name,e.icons)}}}),"registerIconPacks"),S=(0,n.K2)((async(t,e)=>{const r=((t,e,r,n="")=>{const i=t.split(":");if("@"===t.slice(0,1)){if(i.length<2||i.length>3)return null;n=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){const t=i.pop(),r=i.pop(),o={provider:i.length>0?i[0]:n,prefix:r,name:t};return e&&!a(o)?null:o}const o=i[0],s=o.split("-");if(s.length>1){const t={provider:n,prefix:s.shift(),name:s.join("-")};return e&&!a(t)?null:t}if(r&&""===n){const t={provider:n,prefix:"",name:o};return e&&!a(t,r)?null:t}return null})(t,!0,void 0!==e);if(!r)throw new Error(`Invalid icon name: ${t}`);const i=r.prefix||e;if(!i)throw new Error(`Icon name must contain a prefix: ${t}`);let o=w.get(i);if(!o){const t=v.get(i);if(!t)throw new Error(`Icon set not found: ${r.prefix}`);try{o={...await t(),prefix:i},w.set(i,o)}catch(l){throw n.Rm.error(l),new Error(`Failed to load icon set: ${r.prefix}`)}}const s=d(o,r.name);if(!s)throw new Error(`Icon not found: ${t}`);return s}),"getRegisteredIconData"),A=(0,n.K2)((async(t,e)=>{let r;try{r=await S(t,e?.fallbackPrefix)}catch(a){n.Rm.error(a),r=C}const i=function(t,e){const r={...l,...t},n={...f,...e},i={left:r.left,top:r.top,width:r.width,height:r.height};let a=r.body;[r,n].forEach((t=>{const e=[],r=t.hFlip,n=t.vFlip;let o,s=t.rotate;switch(r?n?s+=2:(e.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),e.push("scale(-1 1)"),i.top=i.left=0):n&&(e.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),e.push("scale(1 -1)"),i.top=i.left=0),s<0&&(s-=4*Math.floor(s/4)),s%=4,s){case 1:o=i.height/2+i.top,e.unshift("rotate(90 "+o.toString()+" "+o.toString()+")");break;case 2:e.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:o=i.width/2+i.left,e.unshift("rotate(-90 "+o.toString()+" "+o.toString()+")")}s%2==1&&(i.left!==i.top&&(o=i.left,i.left=i.top,i.top=o),i.width!==i.height&&(o=i.width,i.width=i.height,i.height=o)),e.length&&(a=function(t,e,r){const n=function(t,e="defs"){let r="";const n=t.indexOf("<"+e);for(;n>=0;){const i=t.indexOf(">",n),a=t.indexOf("",a);if(-1===o)break;r+=t.slice(i+1,a).trim(),t=t.slice(0,n).trim()+t.slice(o+1)}return{defs:r,content:t}}(t);return i=n.defs,a=e+n.content+r,i?""+i+""+a:a;var i,a}(a,'',""))}));const o=n.width,s=n.height,c=i.width,h=i.height;let u,d;null===o?(d=null===s?"1em":"auto"===s?h:s,u=y(d,c/h)):(u="auto"===o?c:o,d=null===s?y(u,h/c):"auto"===s?h:s);const p={},g=(t,e)=>{(t=>"unset"===t||"undefined"===t||"none"===t)(e)||(p[t]=e.toString())};g("width",u),g("height",d);const m=[i.left,i.top,c,h];return p.viewBox=m.join(" "),{attributes:p,viewBox:m,body:a}}(r,e);return function(t,e){let r=-1===t.indexOf("xlink:")?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const n in e)r+=" "+n+'="'+e[n]+'"';return'"+t+""}(function(t,e=b){const r=[];let n;for(;n=x.exec(t);)r.push(n[1]);if(!r.length)return t;const i="suffix"+(16777216*Math.random()|Date.now()).toString(16);return r.forEach((r=>{const n="function"==typeof e?e(r):e+(k++).toString(),a=r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+a+')([")]|\\.[a-z])',"g"),"$1"+n+i+"$3")})),t=t.replace(new RegExp(i,"g"),"")}(i.body),i.attributes)}),"getIconSVG")},61021:(t,e,r)=>{"use strict";r.d(e,{D:()=>a});var n=r(45567),i=r(20007),a=(0,n.K2)((t=>{const{securityLevel:e}=(0,n.D7)();let r=(0,i.Ltv)("body");if("sandbox"===e){const e=(0,i.Ltv)(`#i${t}`),n=e.node()?.contentDocument??document;r=(0,i.Ltv)(n.body)}return r.select(`#${t}`)}),"selectSvgElement")},5081:(t,e,r)=>{"use strict";r.d(e,{DA:()=>k,IU:()=>j,U:()=>E,U7:()=>we,U_:()=>_e,Zk:()=>h,aP:()=>be,gh:()=>ve,lC:()=>d,on:()=>Ce});var n=r(34483),i=r(62392),a=r(86825),o=r(85039),s=r(45567),l=r(20007),c=r(29893),h=(0,s.K2)((async(t,e,r)=>{let n;const i=e.useHtmlLabels||(0,s._3)((0,s.D7)()?.htmlLabels);n=r||"node default";const c=t.insert("g").attr("class",n).attr("id",e.domId||e.id),h=c.insert("g").attr("class","label").attr("style",(0,o.KL)(e.labelStyle));let u;u=void 0===e.label?"":"string"==typeof e.label?e.label:e.label[0];const d=await(0,a.GZ)(h,(0,s.jZ)((0,o.Sm)(u),(0,s.D7)()),{useHtmlLabels:i,width:e.width||(0,s.D7)().flowchart?.wrappingWidth,cssClasses:"markdown-node-label",style:e.labelStyle,addSvgBackground:!!e.icon||!!e.img});let p=d.getBBox();const f=(e?.padding??0)/2;if(i){const t=d.children[0],e=(0,l.Ltv)(d),r=t.getElementsByTagName("img");if(r){const t=""===u.replace(/]*>/g,"").trim();await Promise.all([...r].map((e=>new Promise((r=>{function n(){if(e.style.display="flex",e.style.flexDirection="column",t){const t=(0,s.D7)().fontSize?(0,s.D7)().fontSize:window.getComputedStyle(document.body).fontSize,r=5,[n=s.UI.fontSize]=(0,o.I5)(t),i=n*r+"px";e.style.minWidth=i,e.style.maxWidth=i}else e.style.width="100%";r(e)}(0,s.K2)(n,"setupImage"),setTimeout((()=>{e.complete&&n()})),e.addEventListener("error",n),e.addEventListener("load",n)})))))}p=t.getBoundingClientRect(),e.attr("width",p.width),e.attr("height",p.height)}return i?h.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"):h.attr("transform","translate(0, "+-p.height/2+")"),e.centerLabel&&h.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"),h.insert("rect",":first-child"),{shapeSvg:c,bbox:p,halfPadding:f,label:h}}),"labelHelper"),u=(0,s.K2)((async(t,e,r)=>{const n=r.useHtmlLabels||(0,s._3)((0,s.D7)()?.flowchart?.htmlLabels),i=t.insert("g").attr("class","label").attr("style",r.labelStyle||""),c=await(0,a.GZ)(i,(0,s.jZ)((0,o.Sm)(e),(0,s.D7)()),{useHtmlLabels:n,width:r.width||(0,s.D7)()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let h=c.getBBox();const u=r.padding/2;if((0,s._3)((0,s.D7)()?.flowchart?.htmlLabels)){const t=c.children[0],e=(0,l.Ltv)(c);h=t.getBoundingClientRect(),e.attr("width",h.width),e.attr("height",h.height)}return n?i.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"):i.attr("transform","translate(0, "+-h.height/2+")"),r.centerLabel&&i.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"),i.insert("rect",":first-child"),{shapeSvg:t,bbox:h,halfPadding:u,label:i}}),"insertLabel"),d=(0,s.K2)(((t,e)=>{const r=e.node().getBBox();t.width=r.width,t.height=r.height}),"updateNodeBounds"),p=(0,s.K2)(((t,e)=>("handDrawn"===t.look?"rough-node":"node")+" "+t.cssClasses+" "+(e||"")),"getNodeClasses");function f(t){const e=t.map(((t,e)=>`${0===e?"M":"L"}${t.x},${t.y}`));return e.push("Z"),e.join(" ")}function g(t,e,r,n,i,a){const o=[],s=r-t,l=n-e,c=s/a,h=2*Math.PI/c,u=e+l/2;for(let d=0;d<=50;d++){const e=t+d/50*s,r=u+i*Math.sin(h*(e-t));o.push({x:e,y:r})}return o}function m(t,e,r,n,i,a){const o=[],s=i*Math.PI/180,l=(a*Math.PI/180-s)/(n-1);for(let c=0;c{var r,n,i=t.x,a=t.y,o=e.x-i,s=e.y-a,l=t.width/2,c=t.height/2;return Math.abs(s)*l>Math.abs(o)*c?(s<0&&(c=-c),r=0===s?0:c*o/s,n=c):(o<0&&(l=-l),r=l,n=0===o?0:l*s/o),{x:i+r,y:a+n}}),"intersectRect");function x(t,e){e&&t.attr("style",e)}async function b(t){const e=(0,l.Ltv)(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=e.append("xhtml:div");let n=t.label;t.label&&(0,s.Wi)(t.label)&&(n=await(0,s.VJ)(t.label.replace(s.Y2.lineBreakRegex,"\n"),(0,s.D7)()));const i=t.isNode?"nodeLabel":"edgeLabel";return r.html('"+n+""),x(r,t.labelStyle),r.style("display","inline-block"),r.style("padding-right","1px"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}(0,s.K2)(x,"applyStyle"),(0,s.K2)(b,"addHtmlLabel");var k=(0,s.K2)((async(t,e,r,n)=>{let i=t||"";if("object"==typeof i&&(i=i[0]),(0,s._3)((0,s.D7)().flowchart.htmlLabels)){i=i.replace(/\\n|\n/g,"
"),s.Rm.info("vertexText"+i);const t={isNode:n,label:(0,o.Sm)(i).replace(/fa[blrs]?:fa-[\w-]+/g,(t=>``)),labelStyle:e?e.replace("fill:","color:"):e};return await b(t)}{const t=document.createElementNS("http://www.w3.org/2000/svg","text");t.setAttribute("style",e.replace("color:","fill:"));let n=[];n="string"==typeof i?i.split(/\\n|\n|/gi):Array.isArray(i)?i:[];for(const e of n){const n=document.createElementNS("http://www.w3.org/2000/svg","tspan");n.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),n.setAttribute("dy","1em"),n.setAttribute("x","0"),r?n.setAttribute("class","title-row"):n.setAttribute("class","row"),n.textContent=e.trim(),t.appendChild(n)}return t}}),"createLabel"),C=(0,s.K2)(((t,e,r,n,i)=>["M",t+i,e,"H",t+r-i,"A",i,i,0,0,1,t+r,e+i,"V",e+n-i,"A",i,i,0,0,1,t+r-i,e+n,"H",t+i,"A",i,i,0,0,1,t,e+n-i,"V",e+i,"A",i,i,0,0,1,t+i,e,"Z"].join(" ")),"createRoundedRectPathD"),w=(0,s.K2)((t=>{const{handDrawnSeed:e}=(0,s.D7)();return{fill:t,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:t,seed:e}}),"solidStateFill"),v=(0,s.K2)((t=>{const e=_([...t.cssCompiledStyles||[],...t.cssStyles||[]]);return{stylesMap:e,stylesArray:[...e]}}),"compileStyles"),_=(0,s.K2)((t=>{const e=new Map;return t.forEach((t=>{const[r,n]=t.split(":");e.set(r.trim(),n?.trim())})),e}),"styles2Map"),S=(0,s.K2)((t=>{const{stylesArray:e}=v(t),r=[],n=[],i=[],a=[];return e.forEach((t=>{const e=t[0];"color"===e||"font-size"===e||"font-family"===e||"font-weight"===e||"font-style"===e||"text-decoration"===e||"text-align"===e||"text-transform"===e||"line-height"===e||"letter-spacing"===e||"word-spacing"===e||"text-shadow"===e||"text-overflow"===e||"white-space"===e||"word-wrap"===e||"word-break"===e||"overflow-wrap"===e||"hyphens"===e?r.push(t.join(":")+" !important"):(n.push(t.join(":")+" !important"),e.includes("stroke")&&i.push(t.join(":")+" !important"),"fill"===e&&a.push(t.join(":")+" !important"))})),{labelStyles:r.join(";"),nodeStyles:n.join(";"),stylesArray:e,borderStyles:i,backgroundStyles:a}}),"styles2String"),A=(0,s.K2)(((t,e)=>{const{themeVariables:r,handDrawnSeed:n}=(0,s.D7)(),{nodeBorder:i,mainBkg:a}=r,{stylesMap:o}=v(t);return Object.assign({roughness:.7,fill:o.get("fill")||a,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:o.get("stroke")||i,seed:n,strokeWidth:o.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0]},e)}),"userNodeOverrides"),T=(0,s.K2)((async(t,e)=>{s.Rm.info("Creating subgraph rect for ",e.id,e);const r=(0,s.D7)(),{themeVariables:n,handDrawnSeed:o}=r,{clusterBkg:h,clusterBorder:u}=n,{labelStyles:d,nodeStyles:p,borderStyles:f,backgroundStyles:g}=S(e),m=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),x=(0,s._3)(r.flowchart.htmlLabels),b=m.insert("g").attr("class","cluster-label "),k=await(0,a.GZ)(b,e.label,{style:e.labelStyle,useHtmlLabels:x,isNode:!0});let w=k.getBBox();if((0,s._3)(r.flowchart.htmlLabels)){const t=k.children[0],e=(0,l.Ltv)(k);w=t.getBoundingClientRect(),e.attr("width",w.width),e.attr("height",w.height)}const v=e.width<=w.width+e.padding?w.width+e.padding:e.width;e.width<=w.width+e.padding?e.diff=(v-e.width)/2-e.padding:e.diff=-e.padding;const _=e.height,T=e.x-v/2,M=e.y-_/2;let B;if(s.Rm.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){const t=c.A.svg(m),r=A(e,{roughness:.7,fill:h,stroke:u,fillWeight:3,seed:o}),n=t.path(C(T,M,v,_,0),r);B=m.insert((()=>(s.Rm.debug("Rough node insert CXC",n),n)),":first-child"),B.select("path:nth-child(2)").attr("style",f.join(";")),B.select("path").attr("style",g.join(";").replace("fill","stroke"))}else B=m.insert("rect",":first-child"),B.attr("style",p).attr("rx",e.rx).attr("ry",e.ry).attr("x",T).attr("y",M).attr("width",v).attr("height",_);const{subGraphTitleTopMargin:L}=(0,i.O)(r);if(b.attr("transform",`translate(${e.x-w.width/2}, ${e.y-e.height/2+L})`),d){const t=b.select("span");t&&t.attr("style",d)}const F=B.node().getBBox();return e.offsetX=0,e.width=F.width,e.height=F.height,e.offsetY=w.height-e.padding/2,e.intersect=function(t){return y(e,t)},{cluster:m,labelBBox:w}}),"rect"),M=(0,s.K2)(((t,e)=>{const r=t.insert("g").attr("class","note-cluster").attr("id",e.id),n=r.insert("rect",":first-child"),i=0*e.padding,a=i/2;n.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-a).attr("y",e.y-e.height/2-a).attr("width",e.width+i).attr("height",e.height+i).attr("fill","none");const o=n.node().getBBox();return e.width=o.width,e.height=o.height,e.intersect=function(t){return y(e,t)},{cluster:r,labelBBox:{width:0,height:0}}}),"noteGroup"),B=(0,s.K2)((async(t,e)=>{const r=(0,s.D7)(),{themeVariables:n,handDrawnSeed:i}=r,{altBackground:a,compositeBackground:o,compositeTitleBackground:h,nodeBorder:u}=n,d=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-id",e.id).attr("data-look",e.look),p=d.insert("g",":first-child"),f=d.insert("g").attr("class","cluster-label");let g=d.append("rect");const m=f.node().appendChild(await k(e.label,e.labelStyle,void 0,!0));let x=m.getBBox();if((0,s._3)(r.flowchart.htmlLabels)){const t=m.children[0],e=(0,l.Ltv)(m);x=t.getBoundingClientRect(),e.attr("width",x.width),e.attr("height",x.height)}const b=0*e.padding,w=b/2,v=(e.width<=x.width+e.padding?x.width+e.padding:e.width)+b;e.width<=x.width+e.padding?e.diff=(v-e.width)/2-e.padding:e.diff=-e.padding;const _=e.height+b,S=e.height+b-x.height-6,A=e.x-v/2,T=e.y-_/2;e.width=v;const M=e.y-e.height/2-w+x.height+2;let B;if("handDrawn"===e.look){const t=e.cssClasses.includes("statediagram-cluster-alt"),r=c.A.svg(d),n=e.rx||e.ry?r.path(C(A,T,v,_,10),{roughness:.7,fill:h,fillStyle:"solid",stroke:u,seed:i}):r.rectangle(A,T,v,_,{seed:i});B=d.insert((()=>n),":first-child");const s=r.rectangle(A,M,v,S,{fill:t?a:o,fillStyle:t?"hachure":"solid",stroke:u,seed:i});B=d.insert((()=>n),":first-child"),g=d.insert((()=>s))}else{B=p.insert("rect",":first-child");const t="outer";B.attr("class",t).attr("x",A).attr("y",T).attr("width",v).attr("height",_).attr("data-look",e.look),g.attr("class","inner").attr("x",A).attr("y",M).attr("width",v).attr("height",S)}f.attr("transform",`translate(${e.x-x.width/2}, ${T+1-((0,s._3)(r.flowchart.htmlLabels)?0:3)})`);const L=B.node().getBBox();return e.height=L.height,e.offsetX=0,e.offsetY=x.height-e.padding/2,e.labelBBox=x,e.intersect=function(t){return y(e,t)},{cluster:d,labelBBox:x}}),"roundedWithTitle"),L=(0,s.K2)((async(t,e)=>{s.Rm.info("Creating subgraph rect for ",e.id,e);const r=(0,s.D7)(),{themeVariables:n,handDrawnSeed:o}=r,{clusterBkg:h,clusterBorder:u}=n,{labelStyles:d,nodeStyles:p,borderStyles:f,backgroundStyles:g}=S(e),m=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),x=(0,s._3)(r.flowchart.htmlLabels),b=m.insert("g").attr("class","cluster-label "),k=await(0,a.GZ)(b,e.label,{style:e.labelStyle,useHtmlLabels:x,isNode:!0,width:e.width});let w=k.getBBox();if((0,s._3)(r.flowchart.htmlLabels)){const t=k.children[0],e=(0,l.Ltv)(k);w=t.getBoundingClientRect(),e.attr("width",w.width),e.attr("height",w.height)}const v=e.width<=w.width+e.padding?w.width+e.padding:e.width;e.width<=w.width+e.padding?e.diff=(v-e.width)/2-e.padding:e.diff=-e.padding;const _=e.height,T=e.x-v/2,M=e.y-_/2;let B;if(s.Rm.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){const t=c.A.svg(m),r=A(e,{roughness:.7,fill:h,stroke:u,fillWeight:4,seed:o}),n=t.path(C(T,M,v,_,e.rx),r);B=m.insert((()=>(s.Rm.debug("Rough node insert CXC",n),n)),":first-child"),B.select("path:nth-child(2)").attr("style",f.join(";")),B.select("path").attr("style",g.join(";").replace("fill","stroke"))}else B=m.insert("rect",":first-child"),B.attr("style",p).attr("rx",e.rx).attr("ry",e.ry).attr("x",T).attr("y",M).attr("width",v).attr("height",_);const{subGraphTitleTopMargin:L}=(0,i.O)(r);if(b.attr("transform",`translate(${e.x-w.width/2}, ${e.y-e.height/2+L})`),d){const t=b.select("span");t&&t.attr("style",d)}const F=B.node().getBBox();return e.offsetX=0,e.width=F.width,e.height=F.height,e.offsetY=w.height-e.padding/2,e.intersect=function(t){return y(e,t)},{cluster:m,labelBBox:w}}),"kanbanSection"),F={rect:T,squareRect:T,roundedWithTitle:B,noteGroup:M,divider:(0,s.K2)(((t,e)=>{const r=(0,s.D7)(),{themeVariables:n,handDrawnSeed:i}=r,{nodeBorder:a}=n,o=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-look",e.look),l=o.insert("g",":first-child"),h=0*e.padding,u=e.width+h;e.diff=-e.padding;const d=e.height+h,p=e.x-u/2,f=e.y-d/2;let g;if(e.width=u,"handDrawn"===e.look){const t=c.A.svg(o).rectangle(p,f,u,d,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:a,seed:i});g=o.insert((()=>t),":first-child")}else{g=l.insert("rect",":first-child");const t="divider";g.attr("class",t).attr("x",p).attr("y",f).attr("width",u).attr("height",d).attr("data-look",e.look)}const m=g.node().getBBox();return e.height=m.height,e.offsetX=0,e.offsetY=0,e.intersect=function(t){return y(e,t)},{cluster:o,labelBBox:{}}}),"divider"),kanbanSection:L},$=new Map,E=(0,s.K2)((async(t,e)=>{const r=e.shape||"rect",n=await F[r](t,e);return $.set(e.id,n),n}),"insertCluster"),j=(0,s.K2)((()=>{$=new Map}),"clear");function N(t,e){return t.intersect(e)}(0,s.K2)(N,"intersectNode");var D=N;function O(t,e,r,n){var i=t.x,a=t.y,o=i-n.x,s=a-n.y,l=Math.sqrt(e*e*s*s+r*r*o*o),c=Math.abs(e*r*o/l);n.x0}(0,s.K2)(z,"intersectLine"),(0,s.K2)(K,"sameSign");var q=z;function W(t,e,r){let n=t.x,i=t.y,a=[],o=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach((function(t){o=Math.min(o,t.x),s=Math.min(s,t.y)})):(o=Math.min(o,e.x),s=Math.min(s,e.y));let l=n-t.width/2-o,c=i-t.height/2-s;for(let h=0;h1&&a.sort((function(t,e){let n=t.x-r.x,i=t.y-r.y,a=Math.sqrt(n*n+i*i),o=e.x-r.x,s=e.y-r.y,l=Math.sqrt(o*o+s*s);return af),":first-child");return g.attr("class","anchor").attr("style",(0,o.KL)(l)),d(e,g),e.intersect=function(t){return s.Rm.info("Circle intersect",e,1,t),H.circle(e,1,t)},a}function Y(t,e,r,n,i,a,o){const s=(t+r)/2,l=(e+n)/2,c=Math.atan2(n-e,r-t),h=(r-t)/2/i,u=(n-e)/2/a,d=Math.sqrt(h**2+u**2);if(d>1)throw new Error("The given radii are too small to create an arc between the points.");const p=Math.sqrt(1-d**2),f=s+p*a*Math.sin(c)*(o?-1:1),g=l-p*i*Math.cos(c)*(o?-1:1),m=Math.atan2((e-g)/a,(t-f)/i);let y=Math.atan2((n-g)/a,(r-f)/i)-m;o&&y<0&&(y+=2*Math.PI),!o&&y>0&&(y-=2*Math.PI);const x=[];for(let b=0;b<20;b++){const t=m+b/19*y,e=f+i*Math.cos(t),r=g+a*Math.sin(t);x.push({x:e,y:r})}return x}async function G(t,e){const{labelStyles:r,nodeStyles:n}=S(e);e.labelStyle=r;const{shapeSvg:i,bbox:a}=await h(t,e,p(e)),o=a.width+e.padding+20,s=a.height+e.padding,l=s/2,u=l/(2.5+s/50),{cssStyles:g}=e,m=[{x:o/2,y:-s/2},{x:-o/2,y:-s/2},...Y(-o/2,-s/2,-o/2,s/2,u,l,!1),{x:o/2,y:s/2},...Y(o/2,s/2,o/2,-s/2,u,l,!0)],y=c.A.svg(i),x=A(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");const b=f(m),k=y.path(b,x),C=i.insert((()=>k),":first-child");return C.attr("class","basic label-container"),g&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",g),n&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",n),C.attr("transform",`translate(${u/2}, 0)`),d(e,C),e.intersect=function(t){return H.polygon(e,m,t)},i}function V(t,e,r,n){return t.insert("polygon",":first-child").attr("points",n.map((function(t){return t.x+","+t.y})).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}async function Z(t,e){const{labelStyles:r,nodeStyles:n}=S(e);e.labelStyle=r;const{shapeSvg:i,bbox:a}=await h(t,e,p(e)),o=a.height+e.padding,s=a.width+e.padding+12,l=-o,u=[{x:12,y:l},{x:s,y:l},{x:s,y:0},{x:0,y:0},{x:0,y:l+12},{x:12,y:l}];let g;const{cssStyles:m}=e;if("handDrawn"===e.look){const t=c.A.svg(i),r=A(e,{}),n=f(u),a=t.path(n,r);g=i.insert((()=>a),":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),m&&g.attr("style",m)}else g=V(i,s,o,u);return n&&g.attr("style",n),d(e,g),e.intersect=function(t){return H.polygon(e,u,t)},i}function X(t,e){const{nodeStyles:r}=S(e);e.label="";const n=t.insert("g").attr("class",p(e)).attr("id",e.domId??e.id),{cssStyles:i}=e,a=Math.max(28,e.width??0),o=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],s=c.A.svg(n),l=A(e,{});"handDrawn"!==e.look&&(l.roughness=0,l.fillStyle="solid");const h=f(o),u=s.path(h,l),d=n.insert((()=>u),":first-child");return i&&"handDrawn"!==e.look&&d.selectAll("path").attr("style",i),r&&"handDrawn"!==e.look&&d.selectAll("path").attr("style",r),e.width=28,e.height=28,e.intersect=function(t){return H.polygon(e,o,t)},n}async function Q(t,e){const{labelStyles:r,nodeStyles:n}=S(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,halfPadding:l}=await h(t,e,p(e)),u=a.width/2+l;let f;const{cssStyles:g}=e;if("handDrawn"===e.look){const t=c.A.svg(i),r=A(e,{}),n=t.circle(0,0,2*u,r);f=i.insert((()=>n),":first-child"),f.attr("class","basic label-container").attr("style",(0,o.KL)(g))}else f=i.insert("circle",":first-child").attr("class","basic label-container").attr("style",n).attr("r",u).attr("cx",0).attr("cy",0);return d(e,f),e.intersect=function(t){return s.Rm.info("Circle intersect",e,u,t),H.circle(e,u,t)},i}function J(t){const e=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),n=2*t;return`M ${-n/2*e},${n/2*r} L ${n/2*e},${-n/2*r}\n M ${n/2*e},${n/2*r} L ${-n/2*e},${-n/2*r}`}function tt(t,e){const{labelStyles:r,nodeStyles:n}=S(e);e.labelStyle=r,e.label="";const i=t.insert("g").attr("class",p(e)).attr("id",e.domId??e.id),a=Math.max(30,e?.width??0),{cssStyles:o}=e,l=c.A.svg(i),h=A(e,{});"handDrawn"!==e.look&&(h.roughness=0,h.fillStyle="solid");const u=l.circle(0,0,2*a,h),f=J(a),g=l.path(f,h),m=i.insert((()=>u),":first-child");return m.insert((()=>g)),o&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",o),n&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",n),d(e,m),e.intersect=function(t){s.Rm.info("crossedCircle intersect",e,{radius:a,point:t});return H.circle(e,a,t)},i}function et(t,e,r,n=100,i=0,a=180){const o=[],s=i*Math.PI/180,l=(a*Math.PI/180-s)/(n-1);for(let c=0;cv),":first-child").attr("stroke-opacity",0),_.insert((()=>C),":first-child"),_.attr("class","text"),g&&"handDrawn"!==e.look&&_.selectAll("path").attr("style",g),n&&"handDrawn"!==e.look&&_.selectAll("path").attr("style",n),_.attr("transform",`translate(${u}, 0)`),o.attr("transform",`translate(${-s/2+u-(a.x-(a.left??0))},${-l/2+(e.padding??0)/2-(a.y-(a.top??0))})`),d(e,_),e.intersect=function(t){return H.polygon(e,y,t)},i}function nt(t,e,r,n=100,i=0,a=180){const o=[],s=i*Math.PI/180,l=(a*Math.PI/180-s)/(n-1);for(let c=0;cv),":first-child").attr("stroke-opacity",0),_.insert((()=>C),":first-child"),_.attr("class","text"),g&&"handDrawn"!==e.look&&_.selectAll("path").attr("style",g),n&&"handDrawn"!==e.look&&_.selectAll("path").attr("style",n),_.attr("transform",`translate(${-u}, 0)`),o.attr("transform",`translate(${-s/2+(e.padding??0)/2-(a.x-(a.left??0))},${-l/2+(e.padding??0)/2-(a.y-(a.top??0))})`),d(e,_),e.intersect=function(t){return H.polygon(e,y,t)},i}function at(t,e,r,n=100,i=0,a=180){const o=[],s=i*Math.PI/180,l=(a*Math.PI/180-s)/(n-1);for(let c=0;cM),":first-child").attr("stroke-opacity",0),B.insert((()=>w),":first-child"),B.insert((()=>_),":first-child"),B.attr("class","text"),g&&"handDrawn"!==e.look&&B.selectAll("path").attr("style",g),n&&"handDrawn"!==e.look&&B.selectAll("path").attr("style",n),B.attr("transform",`translate(${u-u/4}, 0)`),o.attr("transform",`translate(${-s/2+(e.padding??0)/2-(a.x-(a.left??0))},${-l/2+(e.padding??0)/2-(a.y-(a.top??0))})`),d(e,B),e.intersect=function(t){return H.polygon(e,x,t)},i}async function st(t,e){const{labelStyles:r,nodeStyles:n}=S(e);e.labelStyle=r;const{shapeSvg:i,bbox:a}=await h(t,e,p(e)),o=Math.max(80,1.25*(a.width+2*(e.padding??0)),e?.width??0),s=Math.max(20,a.height+2*(e.padding??0),e?.height??0),l=s/2,{cssStyles:u}=e,g=c.A.svg(i),y=A(e,{});"handDrawn"!==e.look&&(y.roughness=0,y.fillStyle="solid");const x=o-l,b=s/4,k=[{x:x,y:0},{x:b,y:0},{x:0,y:s/2},{x:b,y:s},{x:x,y:s},...m(-x,-s/2,l,50,270,90)],C=f(k),w=g.path(C,y),v=i.insert((()=>w),":first-child");return v.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&v.selectChildren("path").attr("style",u),n&&"handDrawn"!==e.look&&v.selectChildren("path").attr("style",n),v.attr("transform",`translate(${-o/2}, ${-s/2})`),d(e,v),e.intersect=function(t){return H.polygon(e,k,t)},i}(0,s.K2)(U,"anchor"),(0,s.K2)(Y,"generateArcPoints"),(0,s.K2)(G,"bowTieRect"),(0,s.K2)(V,"insertPolygonShape"),(0,s.K2)(Z,"card"),(0,s.K2)(X,"choice"),(0,s.K2)(Q,"circle"),(0,s.K2)(J,"createLine"),(0,s.K2)(tt,"crossedCircle"),(0,s.K2)(et,"generateCirclePoints"),(0,s.K2)(rt,"curlyBraceLeft"),(0,s.K2)(nt,"generateCirclePoints"),(0,s.K2)(it,"curlyBraceRight"),(0,s.K2)(at,"generateCirclePoints"),(0,s.K2)(ot,"curlyBraces"),(0,s.K2)(st,"curvedTrapezoid");var lt=(0,s.K2)(((t,e,r,n,i,a)=>[`M${t},${e+a}`,`a${i},${a} 0,0,0 ${r},0`,`a${i},${a} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${a} 0,0,0 ${r},0`,"l0,"+-n].join(" ")),"createCylinderPathD"),ct=(0,s.K2)(((t,e,r,n,i,a)=>[`M${t},${e+a}`,`M${t+r},${e+a}`,`a${i},${a} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${a} 0,0,0 ${r},0`,"l0,"+-n].join(" ")),"createOuterCylinderPathD"),ht=(0,s.K2)(((t,e,r,n,i,a)=>[`M${t-r/2},${-n/2}`,`a${i},${a} 0,0,0 ${r},0`].join(" ")),"createInnerCylinderPathD");async function ut(t,e){const{labelStyles:r,nodeStyles:n}=S(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,label:s}=await h(t,e,p(e)),l=Math.max(a.width+e.padding,e.width??0),u=l/2,f=u/(2.5+l/50),g=Math.max(a.height+f+e.padding,e.height??0);let m;const{cssStyles:y}=e;if("handDrawn"===e.look){const t=c.A.svg(i),r=ct(0,0,l,g,u,f),n=ht(0,f,l,g,u,f),a=t.path(r,A(e,{})),o=t.path(n,A(e,{fill:"none"}));m=i.insert((()=>o),":first-child"),m=i.insert((()=>a),":first-child"),m.attr("class","basic label-container"),y&&m.attr("style",y)}else{const t=lt(0,0,l,g,u,f);m=i.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",(0,o.KL)(y)).attr("style",n)}return m.attr("label-offset-y",f),m.attr("transform",`translate(${-l/2}, ${-(g/2+f)})`),d(e,m),s.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${-a.height/2+(e.padding??0)/1.5-(a.y-(a.top??0))})`),e.intersect=function(t){const r=H.rect(e,t),n=r.x-(e.x??0);if(0!=u&&(Math.abs(n)<(e.width??0)/2||Math.abs(n)==(e.width??0)/2&&Math.abs(r.y-(e.y??0))>(e.height??0)/2-f)){let i=f*f*(1-n*n/(u*u));i>0&&(i=Math.sqrt(i)),i=f-i,t.y-(e.y??0)>0&&(i=-i),r.y+=i}return r},i}async function dt(t,e){const{labelStyles:r,nodeStyles:n}=S(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,label:o}=await h(t,e,p(e)),s=a.width+e.padding,l=a.height+e.padding,u=.2*l,f=-s/2,g=-l/2-u/2,{cssStyles:m}=e,y=c.A.svg(i),x=A(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");const b=[{x:f,y:g+u},{x:-f,y:g+u},{x:-f,y:-g},{x:f,y:-g},{x:f,y:g},{x:-f,y:g},{x:-f,y:g+u}],k=y.polygon(b.map((t=>[t.x,t.y])),x),C=i.insert((()=>k),":first-child");return C.attr("class","basic label-container"),m&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",m),n&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",n),o.attr("transform",`translate(${f+(e.padding??0)/2-(a.x-(a.left??0))}, ${g+u+(e.padding??0)/2-(a.y-(a.top??0))})`),d(e,C),e.intersect=function(t){return H.rect(e,t)},i}async function pt(t,e){const{labelStyles:r,nodeStyles:n}=S(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,halfPadding:l}=await h(t,e,p(e)),u=a.width/2+l+5,f=a.width/2+l;let g;const{cssStyles:m}=e;if("handDrawn"===e.look){const t=c.A.svg(i),r=A(e,{roughness:.2,strokeWidth:2.5}),n=A(e,{roughness:.2,strokeWidth:1.5}),a=t.circle(0,0,2*u,r),s=t.circle(0,0,2*f,n);g=i.insert("g",":first-child"),g.attr("class",(0,o.KL)(e.cssClasses)).attr("style",(0,o.KL)(m)),g.node()?.appendChild(a),g.node()?.appendChild(s)}else{g=i.insert("g",":first-child");const t=g.insert("circle",":first-child"),e=g.insert("circle");g.attr("class","basic label-container").attr("style",n),t.attr("class","outer-circle").attr("style",n).attr("r",u).attr("cx",0).attr("cy",0),e.attr("class","inner-circle").attr("style",n).attr("r",f).attr("cx",0).attr("cy",0)}return d(e,g),e.intersect=function(t){return s.Rm.info("DoubleCircle intersect",e,u,t),H.circle(e,u,t)},i}function ft(t,e,{config:{themeVariables:r}}){const{labelStyles:n,nodeStyles:i}=S(e);e.label="",e.labelStyle=n;const a=t.insert("g").attr("class",p(e)).attr("id",e.domId??e.id),{cssStyles:o}=e,l=c.A.svg(a),{nodeBorder:h}=r,u=A(e,{fillStyle:"solid"});"handDrawn"!==e.look&&(u.roughness=0);const f=l.circle(0,0,14,u),g=a.insert((()=>f),":first-child");return g.selectAll("path").attr("style",`fill: ${h} !important;`),o&&o.length>0&&"handDrawn"!==e.look&&g.selectAll("path").attr("style",o),i&&"handDrawn"!==e.look&&g.selectAll("path").attr("style",i),d(e,g),e.intersect=function(t){s.Rm.info("filledCircle intersect",e,{radius:7,point:t});return H.circle(e,7,t)},a}async function gt(t,e){const{labelStyles:r,nodeStyles:n}=S(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,label:o}=await h(t,e,p(e)),l=a.width+(e.padding??0),u=l+a.height,g=l+a.height,m=[{x:0,y:-u},{x:g,y:-u},{x:g/2,y:0}],{cssStyles:y}=e,x=c.A.svg(i),b=A(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");const k=f(m),C=x.path(k,b),w=i.insert((()=>C),":first-child").attr("transform",`translate(${-u/2}, ${u/2})`);return y&&"handDrawn"!==e.look&&w.selectChildren("path").attr("style",y),n&&"handDrawn"!==e.look&&w.selectChildren("path").attr("style",n),e.width=l,e.height=u,d(e,w),o.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${-u/2+(e.padding??0)/2+(a.y-(a.top??0))})`),e.intersect=function(t){return s.Rm.info("Triangle intersect",e,m,t),H.polygon(e,m,t)},i}function mt(t,e,{dir:r,config:{state:n,themeVariables:i}}){const{nodeStyles:a}=S(e);e.label="";const o=t.insert("g").attr("class",p(e)).attr("id",e.domId??e.id),{cssStyles:s}=e;let l=Math.max(70,e?.width??0),h=Math.max(10,e?.height??0);"LR"===r&&(l=Math.max(10,e?.width??0),h=Math.max(70,e?.height??0));const u=-1*l/2,f=-1*h/2,g=c.A.svg(o),m=A(e,{stroke:i.lineColor,fill:i.lineColor});"handDrawn"!==e.look&&(m.roughness=0,m.fillStyle="solid");const y=g.rectangle(u,f,l,h,m),x=o.insert((()=>y),":first-child");s&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",s),a&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",a),d(e,x);const b=n?.padding??0;return e.width&&e.height&&(e.width+=b/2||0,e.height+=b/2||0),e.intersect=function(t){return H.rect(e,t)},o}async function yt(t,e){const{labelStyles:r,nodeStyles:n}=S(e);e.labelStyle=r;const{shapeSvg:i,bbox:a}=await h(t,e,p(e)),o=Math.max(80,a.width+2*(e.padding??0),e?.width??0),l=Math.max(50,a.height+2*(e.padding??0),e?.height??0),u=l/2,{cssStyles:g}=e,y=c.A.svg(i),x=A(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");const b=[{x:-o/2,y:-l/2},{x:o/2-u,y:-l/2},...m(-o/2+u,0,u,50,90,270),{x:o/2-u,y:l/2},{x:-o/2,y:l/2}],k=f(b),C=y.path(k,x),w=i.insert((()=>C),":first-child");return w.attr("class","basic label-container"),g&&"handDrawn"!==e.look&&w.selectChildren("path").attr("style",g),n&&"handDrawn"!==e.look&&w.selectChildren("path").attr("style",n),d(e,w),e.intersect=function(t){s.Rm.info("Pill intersect",e,{radius:u,point:t});return H.polygon(e,b,t)},i}(0,s.K2)(ut,"cylinder"),(0,s.K2)(dt,"dividedRectangle"),(0,s.K2)(pt,"doublecircle"),(0,s.K2)(ft,"filledCircle"),(0,s.K2)(gt,"flippedTriangle"),(0,s.K2)(mt,"forkJoin"),(0,s.K2)(yt,"halfRoundedRectangle");var xt=(0,s.K2)(((t,e,r,n,i)=>[`M${t+i},${e}`,`L${t+r-i},${e}`,`L${t+r},${e-n/2}`,`L${t+r-i},${e-n}`,`L${t+i},${e-n}`,`L${t},${e-n/2}`,"Z"].join(" ")),"createHexagonPathD");async function bt(t,e){const{labelStyles:r,nodeStyles:n}=S(e);e.labelStyle=r;const{shapeSvg:i,bbox:a}=await h(t,e,p(e)),o=a.height+e.padding,s=o/4,l=a.width+2*s+e.padding,u=[{x:s,y:0},{x:l-s,y:0},{x:l,y:-o/2},{x:l-s,y:-o},{x:s,y:-o},{x:0,y:-o/2}];let f;const{cssStyles:g}=e;if("handDrawn"===e.look){const t=c.A.svg(i),r=A(e,{}),n=xt(0,0,l,o,s),a=t.path(n,r);f=i.insert((()=>a),":first-child").attr("transform",`translate(${-l/2}, ${o/2})`),g&&f.attr("style",g)}else f=V(i,l,o,u);return n&&f.attr("style",n),e.width=l,e.height=o,d(e,f),e.intersect=function(t){return H.polygon(e,u,t)},i}async function kt(t,e){const{labelStyles:r,nodeStyles:n}=S(e);e.label="",e.labelStyle=r;const{shapeSvg:i}=await h(t,e,p(e)),a=Math.max(30,e?.width??0),o=Math.max(30,e?.height??0),{cssStyles:l}=e,u=c.A.svg(i),g=A(e,{});"handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid");const m=[{x:0,y:0},{x:a,y:0},{x:0,y:o},{x:a,y:o}],y=f(m),x=u.path(y,g),b=i.insert((()=>x),":first-child");return b.attr("class","basic label-container"),l&&"handDrawn"!==e.look&&b.selectChildren("path").attr("style",l),n&&"handDrawn"!==e.look&&b.selectChildren("path").attr("style",n),b.attr("transform",`translate(${-a/2}, ${-o/2})`),d(e,b),e.intersect=function(t){s.Rm.info("Pill intersect",e,{points:m});return H.polygon(e,m,t)},i}async function Ct(t,e,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=S(e);e.labelStyle=a;const o=e.assetHeight??48,l=e.assetWidth??48,u=Math.max(o,l),p=i?.wrappingWidth;e.width=Math.max(u,p??0);const{shapeSvg:f,bbox:g,label:m}=await h(t,e,"icon-shape default"),y="t"===e.pos,x=u,b=u,{nodeBorder:k}=r,{stylesMap:C}=v(e),w=-b/2,_=-x/2,T=e.label?8:0,M=c.A.svg(f),B=A(e,{stroke:"none",fill:"none"});"handDrawn"!==e.look&&(B.roughness=0,B.fillStyle="solid");const L=M.rectangle(w,_,b,x,B),F=Math.max(b,g.width),$=x+g.height+T,E=M.rectangle(-F/2,-$/2,F,$,{...B,fill:"transparent",stroke:"none"}),j=f.insert((()=>L),":first-child"),N=f.insert((()=>E));if(e.icon){const t=f.append("g");t.html(`${await(0,n.WY)(e.icon,{height:u,width:u,fallbackPrefix:""})}`);const r=t.node().getBBox(),i=r.width,a=r.height,o=r.x,s=r.y;t.attr("transform",`translate(${-i/2-o},${y?g.height/2+T/2-a/2-s:-g.height/2-T/2-a/2-s})`),t.attr("style",`color: ${C.get("stroke")??k};`)}return m.attr("transform",`translate(${-g.width/2-(g.x-(g.left??0))},${y?-$/2:$/2-g.height})`),j.attr("transform",`translate(0,${y?g.height/2+T/2:-g.height/2-T/2})`),d(e,N),e.intersect=function(t){if(s.Rm.info("iconSquare intersect",e,t),!e.label)return H.rect(e,t);const r=e.x??0,n=e.y??0,i=e.height??0;let a=[];a=y?[{x:r-g.width/2,y:n-i/2},{x:r+g.width/2,y:n-i/2},{x:r+g.width/2,y:n-i/2+g.height+T},{x:r+b/2,y:n-i/2+g.height+T},{x:r+b/2,y:n+i/2},{x:r-b/2,y:n+i/2},{x:r-b/2,y:n-i/2+g.height+T},{x:r-g.width/2,y:n-i/2+g.height+T}]:[{x:r-b/2,y:n-i/2},{x:r+b/2,y:n-i/2},{x:r+b/2,y:n-i/2+x},{x:r+g.width/2,y:n-i/2+x},{x:r+g.width/2/2,y:n+i/2},{x:r-g.width/2,y:n+i/2},{x:r-g.width/2,y:n-i/2+x},{x:r-b/2,y:n-i/2+x}];return H.polygon(e,a,t)},f}async function wt(t,e,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=S(e);e.labelStyle=a;const o=e.assetHeight??48,l=e.assetWidth??48,u=Math.max(o,l),p=i?.wrappingWidth;e.width=Math.max(u,p??0);const{shapeSvg:f,bbox:g,label:m}=await h(t,e,"icon-shape default"),y=e.label?8:0,x="t"===e.pos,{nodeBorder:b,mainBkg:k}=r,{stylesMap:C}=v(e),w=c.A.svg(f),_=A(e,{});"handDrawn"!==e.look&&(_.roughness=0,_.fillStyle="solid");const T=C.get("fill");_.stroke=T??k;const M=f.append("g");e.icon&&M.html(`${await(0,n.WY)(e.icon,{height:u,width:u,fallbackPrefix:""})}`);const B=M.node().getBBox(),L=B.width,F=B.height,$=B.x,E=B.y,j=Math.max(L,F)*Math.SQRT2+40,N=w.circle(0,0,j,_),D=Math.max(j,g.width),O=j+g.height+y,I=w.rectangle(-D/2,-O/2,D,O,{..._,fill:"transparent",stroke:"none"}),R=f.insert((()=>N),":first-child"),P=f.insert((()=>I));return M.attr("transform",`translate(${-L/2-$},${x?g.height/2+y/2-F/2-E:-g.height/2-y/2-F/2-E})`),M.attr("style",`color: ${C.get("stroke")??b};`),m.attr("transform",`translate(${-g.width/2-(g.x-(g.left??0))},${x?-O/2:O/2-g.height})`),R.attr("transform",`translate(0,${x?g.height/2+y/2:-g.height/2-y/2})`),d(e,P),e.intersect=function(t){s.Rm.info("iconSquare intersect",e,t);return H.rect(e,t)},f}async function vt(t,e,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=S(e);e.labelStyle=a;const o=e.assetHeight??48,l=e.assetWidth??48,u=Math.max(o,l),p=i?.wrappingWidth;e.width=Math.max(u,p??0);const{shapeSvg:f,bbox:g,halfPadding:m,label:y}=await h(t,e,"icon-shape default"),x="t"===e.pos,b=u+2*m,k=u+2*m,{nodeBorder:w,mainBkg:_}=r,{stylesMap:T}=v(e),M=-k/2,B=-b/2,L=e.label?8:0,F=c.A.svg(f),$=A(e,{});"handDrawn"!==e.look&&($.roughness=0,$.fillStyle="solid");const E=T.get("fill");$.stroke=E??_;const j=F.path(C(M,B,k,b,5),$),N=Math.max(k,g.width),D=b+g.height+L,O=F.rectangle(-N/2,-D/2,N,D,{...$,fill:"transparent",stroke:"none"}),I=f.insert((()=>j),":first-child").attr("class","icon-shape2"),R=f.insert((()=>O));if(e.icon){const t=f.append("g");t.html(`${await(0,n.WY)(e.icon,{height:u,width:u,fallbackPrefix:""})}`);const r=t.node().getBBox(),i=r.width,a=r.height,o=r.x,s=r.y;t.attr("transform",`translate(${-i/2-o},${x?g.height/2+L/2-a/2-s:-g.height/2-L/2-a/2-s})`),t.attr("style",`color: ${T.get("stroke")??w};`)}return y.attr("transform",`translate(${-g.width/2-(g.x-(g.left??0))},${x?-D/2:D/2-g.height})`),I.attr("transform",`translate(0,${x?g.height/2+L/2:-g.height/2-L/2})`),d(e,R),e.intersect=function(t){if(s.Rm.info("iconSquare intersect",e,t),!e.label)return H.rect(e,t);const r=e.x??0,n=e.y??0,i=e.height??0;let a=[];a=x?[{x:r-g.width/2,y:n-i/2},{x:r+g.width/2,y:n-i/2},{x:r+g.width/2,y:n-i/2+g.height+L},{x:r+k/2,y:n-i/2+g.height+L},{x:r+k/2,y:n+i/2},{x:r-k/2,y:n+i/2},{x:r-k/2,y:n-i/2+g.height+L},{x:r-g.width/2,y:n-i/2+g.height+L}]:[{x:r-k/2,y:n-i/2},{x:r+k/2,y:n-i/2},{x:r+k/2,y:n-i/2+b},{x:r+g.width/2,y:n-i/2+b},{x:r+g.width/2/2,y:n+i/2},{x:r-g.width/2,y:n+i/2},{x:r-g.width/2,y:n-i/2+b},{x:r-k/2,y:n-i/2+b}];return H.polygon(e,a,t)},f}async function _t(t,e,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=S(e);e.labelStyle=a;const o=e.assetHeight??48,l=e.assetWidth??48,u=Math.max(o,l),p=i?.wrappingWidth;e.width=Math.max(u,p??0);const{shapeSvg:f,bbox:g,halfPadding:m,label:y}=await h(t,e,"icon-shape default"),x="t"===e.pos,b=u+2*m,k=u+2*m,{nodeBorder:w,mainBkg:_}=r,{stylesMap:T}=v(e),M=-k/2,B=-b/2,L=e.label?8:0,F=c.A.svg(f),$=A(e,{});"handDrawn"!==e.look&&($.roughness=0,$.fillStyle="solid");const E=T.get("fill");$.stroke=E??_;const j=F.path(C(M,B,k,b,.1),$),N=Math.max(k,g.width),D=b+g.height+L,O=F.rectangle(-N/2,-D/2,N,D,{...$,fill:"transparent",stroke:"none"}),I=f.insert((()=>j),":first-child"),R=f.insert((()=>O));if(e.icon){const t=f.append("g");t.html(`${await(0,n.WY)(e.icon,{height:u,width:u,fallbackPrefix:""})}`);const r=t.node().getBBox(),i=r.width,a=r.height,o=r.x,s=r.y;t.attr("transform",`translate(${-i/2-o},${x?g.height/2+L/2-a/2-s:-g.height/2-L/2-a/2-s})`),t.attr("style",`color: ${T.get("stroke")??w};`)}return y.attr("transform",`translate(${-g.width/2-(g.x-(g.left??0))},${x?-D/2:D/2-g.height})`),I.attr("transform",`translate(0,${x?g.height/2+L/2:-g.height/2-L/2})`),d(e,R),e.intersect=function(t){if(s.Rm.info("iconSquare intersect",e,t),!e.label)return H.rect(e,t);const r=e.x??0,n=e.y??0,i=e.height??0;let a=[];a=x?[{x:r-g.width/2,y:n-i/2},{x:r+g.width/2,y:n-i/2},{x:r+g.width/2,y:n-i/2+g.height+L},{x:r+k/2,y:n-i/2+g.height+L},{x:r+k/2,y:n+i/2},{x:r-k/2,y:n+i/2},{x:r-k/2,y:n-i/2+g.height+L},{x:r-g.width/2,y:n-i/2+g.height+L}]:[{x:r-k/2,y:n-i/2},{x:r+k/2,y:n-i/2},{x:r+k/2,y:n-i/2+b},{x:r+g.width/2,y:n-i/2+b},{x:r+g.width/2/2,y:n+i/2},{x:r-g.width/2,y:n+i/2},{x:r-g.width/2,y:n-i/2+b},{x:r-k/2,y:n-i/2+b}];return H.polygon(e,a,t)},f}async function St(t,e,{config:{flowchart:r}}){const n=new Image;n.src=e?.img??"",await n.decode();const i=Number(n.naturalWidth.toString().replace("px","")),a=Number(n.naturalHeight.toString().replace("px",""));e.imageAspectRatio=i/a;const{labelStyles:o}=S(e);e.labelStyle=o;const l=r?.wrappingWidth;e.defaultWidth=r?.wrappingWidth;const u=Math.max(e.label?l??0:0,e?.assetWidth??i),p="on"===e.constraint&&e?.assetHeight?e.assetHeight*e.imageAspectRatio:u,f="on"===e.constraint?p/e.imageAspectRatio:e?.assetHeight??a;e.width=Math.max(p,l??0);const{shapeSvg:g,bbox:m,label:y}=await h(t,e,"image-shape default"),x="t"===e.pos,b=-p/2,k=-f/2,C=e.label?8:0,w=c.A.svg(g),v=A(e,{});"handDrawn"!==e.look&&(v.roughness=0,v.fillStyle="solid");const _=w.rectangle(b,k,p,f,v),T=Math.max(p,m.width),M=f+m.height+C,B=w.rectangle(-T/2,-M/2,T,M,{...v,fill:"none",stroke:"none"}),L=g.insert((()=>_),":first-child"),F=g.insert((()=>B));if(e.img){const t=g.append("image");t.attr("href",e.img),t.attr("width",p),t.attr("height",f),t.attr("preserveAspectRatio","none"),t.attr("transform",`translate(${-p/2},${x?M/2-f:-M/2})`)}return y.attr("transform",`translate(${-m.width/2-(m.x-(m.left??0))},${x?-f/2-m.height/2-C/2:f/2-m.height/2+C/2})`),L.attr("transform",`translate(0,${x?m.height/2+C/2:-m.height/2-C/2})`),d(e,F),e.intersect=function(t){if(s.Rm.info("iconSquare intersect",e,t),!e.label)return H.rect(e,t);const r=e.x??0,n=e.y??0,i=e.height??0;let a=[];a=x?[{x:r-m.width/2,y:n-i/2},{x:r+m.width/2,y:n-i/2},{x:r+m.width/2,y:n-i/2+m.height+C},{x:r+p/2,y:n-i/2+m.height+C},{x:r+p/2,y:n+i/2},{x:r-p/2,y:n+i/2},{x:r-p/2,y:n-i/2+m.height+C},{x:r-m.width/2,y:n-i/2+m.height+C}]:[{x:r-p/2,y:n-i/2},{x:r+p/2,y:n-i/2},{x:r+p/2,y:n-i/2+f},{x:r+m.width/2,y:n-i/2+f},{x:r+m.width/2/2,y:n+i/2},{x:r-m.width/2,y:n+i/2},{x:r-m.width/2,y:n-i/2+f},{x:r-p/2,y:n-i/2+f}];return H.polygon(e,a,t)},g}async function At(t,e){const{labelStyles:r,nodeStyles:n}=S(e);e.labelStyle=r;const{shapeSvg:i,bbox:a}=await h(t,e,p(e)),o=Math.max(a.width+2*(e.padding??0),e?.width??0),s=Math.max(a.height+2*(e.padding??0),e?.height??0),l=[{x:0,y:0},{x:o,y:0},{x:o+3*s/6,y:-s},{x:-3*s/6,y:-s}];let u;const{cssStyles:g}=e;if("handDrawn"===e.look){const t=c.A.svg(i),r=A(e,{}),n=f(l),a=t.path(n,r);u=i.insert((()=>a),":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),g&&u.attr("style",g)}else u=V(i,o,s,l);return n&&u.attr("style",n),e.width=o,e.height=s,d(e,u),e.intersect=function(t){return H.polygon(e,l,t)},i}async function Tt(t,e,r){const{labelStyles:n,nodeStyles:i}=S(e);e.labelStyle=n;const{shapeSvg:a,bbox:s}=await h(t,e,p(e)),l=Math.max(s.width+2*r.labelPaddingX,e?.width||0),u=Math.max(s.height+2*r.labelPaddingY,e?.height||0),f=-l/2,g=-u/2;let m,{rx:y,ry:x}=e;const{cssStyles:b}=e;if(r?.rx&&r.ry&&(y=r.rx,x=r.ry),"handDrawn"===e.look){const t=c.A.svg(a),r=A(e,{}),n=y||x?t.path(C(f,g,l,u,y||0),r):t.rectangle(f,g,l,u,r);m=a.insert((()=>n),":first-child"),m.attr("class","basic label-container").attr("style",(0,o.KL)(b))}else m=a.insert("rect",":first-child"),m.attr("class","basic label-container").attr("style",i).attr("rx",(0,o.KL)(y)).attr("ry",(0,o.KL)(x)).attr("x",f).attr("y",g).attr("width",l).attr("height",u);return d(e,m),e.intersect=function(t){return H.rect(e,t)},a}async function Mt(t,e){const{shapeSvg:r,bbox:n,label:i}=await h(t,e,"label"),a=r.insert("rect",":first-child");return a.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),i.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-n.height/2-(n.y-(n.top??0))})`),d(e,a),e.intersect=function(t){return H.rect(e,t)},r}async function Bt(t,e){const{labelStyles:r,nodeStyles:n}=S(e);e.labelStyle=r;const{shapeSvg:i,bbox:a}=await h(t,e,p(e)),o=Math.max(a.width+(e.padding??0),e?.width??0),s=Math.max(a.height+(e.padding??0),e?.height??0),l=[{x:0,y:0},{x:o+3*s/6,y:0},{x:o,y:-s},{x:-3*s/6,y:-s}];let u;const{cssStyles:g}=e;if("handDrawn"===e.look){const t=c.A.svg(i),r=A(e,{}),n=f(l),a=t.path(n,r);u=i.insert((()=>a),":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),g&&u.attr("style",g)}else u=V(i,o,s,l);return n&&u.attr("style",n),e.width=o,e.height=s,d(e,u),e.intersect=function(t){return H.polygon(e,l,t)},i}async function Lt(t,e){const{labelStyles:r,nodeStyles:n}=S(e);e.labelStyle=r;const{shapeSvg:i,bbox:a}=await h(t,e,p(e)),o=Math.max(a.width+(e.padding??0),e?.width??0),s=Math.max(a.height+(e.padding??0),e?.height??0),l=[{x:-3*s/6,y:0},{x:o,y:0},{x:o+3*s/6,y:-s},{x:0,y:-s}];let u;const{cssStyles:g}=e;if("handDrawn"===e.look){const t=c.A.svg(i),r=A(e,{}),n=f(l),a=t.path(n,r);u=i.insert((()=>a),":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),g&&u.attr("style",g)}else u=V(i,o,s,l);return n&&u.attr("style",n),e.width=o,e.height=s,d(e,u),e.intersect=function(t){return H.polygon(e,l,t)},i}function Ft(t,e){const{labelStyles:r,nodeStyles:n}=S(e);e.label="",e.labelStyle=r;const i=t.insert("g").attr("class",p(e)).attr("id",e.domId??e.id),{cssStyles:a}=e,o=Math.max(35,e?.width??0),l=Math.max(35,e?.height??0),h=[{x:o,y:0},{x:0,y:l+3.5},{x:o-14,y:l+3.5},{x:0,y:2*l},{x:o,y:l-3.5},{x:14,y:l-3.5}],u=c.A.svg(i),g=A(e,{});"handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid");const m=f(h),y=u.path(m,g),x=i.insert((()=>y),":first-child");return a&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",a),n&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",n),x.attr("transform",`translate(-${o/2},${-l})`),d(e,x),e.intersect=function(t){s.Rm.info("lightningBolt intersect",e,t);return H.polygon(e,h,t)},i}(0,s.K2)(bt,"hexagon"),(0,s.K2)(kt,"hourglass"),(0,s.K2)(Ct,"icon"),(0,s.K2)(wt,"iconCircle"),(0,s.K2)(vt,"iconRounded"),(0,s.K2)(_t,"iconSquare"),(0,s.K2)(St,"imageSquare"),(0,s.K2)(At,"inv_trapezoid"),(0,s.K2)(Tt,"drawRect"),(0,s.K2)(Mt,"labelRect"),(0,s.K2)(Bt,"lean_left"),(0,s.K2)(Lt,"lean_right"),(0,s.K2)(Ft,"lightningBolt");var $t=(0,s.K2)(((t,e,r,n,i,a,o)=>[`M${t},${e+a}`,`a${i},${a} 0,0,0 ${r},0`,`a${i},${a} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${a} 0,0,0 ${r},0`,"l0,"+-n,`M${t},${e+a+o}`,`a${i},${a} 0,0,0 ${r},0`].join(" ")),"createCylinderPathD"),Et=(0,s.K2)(((t,e,r,n,i,a,o)=>[`M${t},${e+a}`,`M${t+r},${e+a}`,`a${i},${a} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${a} 0,0,0 ${r},0`,"l0,"+-n,`M${t},${e+a+o}`,`a${i},${a} 0,0,0 ${r},0`].join(" ")),"createOuterCylinderPathD"),jt=(0,s.K2)(((t,e,r,n,i,a)=>[`M${t-r/2},${-n/2}`,`a${i},${a} 0,0,0 ${r},0`].join(" ")),"createInnerCylinderPathD");async function Nt(t,e){const{labelStyles:r,nodeStyles:n}=S(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,label:s}=await h(t,e,p(e)),l=Math.max(a.width+(e.padding??0),e.width??0),u=l/2,f=u/(2.5+l/50),g=Math.max(a.height+f+(e.padding??0),e.height??0),m=.1*g;let y;const{cssStyles:x}=e;if("handDrawn"===e.look){const t=c.A.svg(i),r=Et(0,0,l,g,u,f,m),n=jt(0,f,l,g,u,f),a=A(e,{}),o=t.path(r,a),s=t.path(n,a);i.insert((()=>s),":first-child").attr("class","line"),y=i.insert((()=>o),":first-child"),y.attr("class","basic label-container"),x&&y.attr("style",x)}else{const t=$t(0,0,l,g,u,f,m);y=i.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",(0,o.KL)(x)).attr("style",n)}return y.attr("label-offset-y",f),y.attr("transform",`translate(${-l/2}, ${-(g/2+f)})`),d(e,y),s.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${-a.height/2+f-(a.y-(a.top??0))})`),e.intersect=function(t){const r=H.rect(e,t),n=r.x-(e.x??0);if(0!=u&&(Math.abs(n)<(e.width??0)/2||Math.abs(n)==(e.width??0)/2&&Math.abs(r.y-(e.y??0))>(e.height??0)/2-f)){let i=f*f*(1-n*n/(u*u));i>0&&(i=Math.sqrt(i)),i=f-i,t.y-(e.y??0)>0&&(i=-i),r.y+=i}return r},i}async function Dt(t,e){const{labelStyles:r,nodeStyles:n}=S(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,label:o}=await h(t,e,p(e)),s=Math.max(a.width+2*(e.padding??0),e?.width??0),l=Math.max(a.height+2*(e.padding??0),e?.height??0),u=l/4,f=l+u,{cssStyles:m}=e,y=c.A.svg(i),x=A(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");const b=[{x:-s/2-s/2*.1,y:-f/2},{x:-s/2-s/2*.1,y:f/2},...g(-s/2-s/2*.1,f/2,s/2+s/2*.1,f/2,u,.8),{x:s/2+s/2*.1,y:-f/2},{x:-s/2-s/2*.1,y:-f/2},{x:-s/2,y:-f/2},{x:-s/2,y:f/2*1.1},{x:-s/2,y:-f/2}],k=y.polygon(b.map((t=>[t.x,t.y])),x),C=i.insert((()=>k),":first-child");return C.attr("class","basic label-container"),m&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",m),n&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",n),C.attr("transform",`translate(0,${-u/2})`),o.attr("transform",`translate(${-s/2+(e.padding??0)+s/2*.1/2-(a.x-(a.left??0))},${-l/2+(e.padding??0)-u/2-(a.y-(a.top??0))})`),d(e,C),e.intersect=function(t){return H.polygon(e,b,t)},i}async function Ot(t,e){const{labelStyles:r,nodeStyles:n}=S(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,label:o}=await h(t,e,p(e)),s=Math.max(a.width+2*(e.padding??0),e?.width??0),l=Math.max(a.height+2*(e.padding??0),e?.height??0),u=-s/2,g=-l/2,{cssStyles:m}=e,y=c.A.svg(i),x=A(e,{}),b=[{x:u-5,y:g+5},{x:u-5,y:g+l+5},{x:u+s-5,y:g+l+5},{x:u+s-5,y:g+l},{x:u+s,y:g+l},{x:u+s,y:g+l-5},{x:u+s+5,y:g+l-5},{x:u+s+5,y:g-5},{x:u+5,y:g-5},{x:u+5,y:g},{x:u,y:g},{x:u,y:g+5}],k=[{x:u,y:g+5},{x:u+s-5,y:g+5},{x:u+s-5,y:g+l},{x:u+s,y:g+l},{x:u+s,y:g},{x:u,y:g}];"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");const C=f(b),w=y.path(C,x),v=f(k),_=y.path(v,{...x,fill:"none"}),T=i.insert((()=>_),":first-child");return T.insert((()=>w),":first-child"),T.attr("class","basic label-container"),m&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",m),n&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",n),o.attr("transform",`translate(${-a.width/2-5-(a.x-(a.left??0))}, ${-a.height/2+5-(a.y-(a.top??0))})`),d(e,T),e.intersect=function(t){return H.polygon(e,b,t)},i}async function It(t,e){const{labelStyles:r,nodeStyles:n}=S(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,label:o}=await h(t,e,p(e)),s=Math.max(a.width+2*(e.padding??0),e?.width??0),l=Math.max(a.height+2*(e.padding??0),e?.height??0),u=l/4,m=l+u,y=-s/2,x=-m/2,{cssStyles:b}=e,k=g(y-5,x+m+5,y+s-5,x+m+5,u,.8),C=k?.[k.length-1],w=[{x:y-5,y:x+5},{x:y-5,y:x+m+5},...k,{x:y+s-5,y:C.y-5},{x:y+s,y:C.y-5},{x:y+s,y:C.y-10},{x:y+s+5,y:C.y-10},{x:y+s+5,y:x-5},{x:y+5,y:x-5},{x:y+5,y:x},{x:y,y:x},{x:y,y:x+5}],v=[{x:y,y:x+5},{x:y+s-5,y:x+5},{x:y+s-5,y:C.y-5},{x:y+s,y:C.y-5},{x:y+s,y:x},{x:y,y:x}],_=c.A.svg(i),T=A(e,{});"handDrawn"!==e.look&&(T.roughness=0,T.fillStyle="solid");const M=f(w),B=_.path(M,T),L=f(v),F=_.path(L,T),$=i.insert((()=>B),":first-child");return $.insert((()=>F)),$.attr("class","basic label-container"),b&&"handDrawn"!==e.look&&$.selectAll("path").attr("style",b),n&&"handDrawn"!==e.look&&$.selectAll("path").attr("style",n),$.attr("transform",`translate(0,${-u/2})`),o.attr("transform",`translate(${-a.width/2-5-(a.x-(a.left??0))}, ${-a.height/2+5-u/2-(a.y-(a.top??0))})`),d(e,$),e.intersect=function(t){return H.polygon(e,w,t)},i}async function Rt(t,e,{config:{themeVariables:r}}){const{labelStyles:n,nodeStyles:i}=S(e);e.labelStyle=n;e.useHtmlLabels||!1!==(0,s.zj)().flowchart?.htmlLabels||(e.centerLabel=!0);const{shapeSvg:a,bbox:o}=await h(t,e,p(e)),l=Math.max(o.width+2*(e.padding??0),e?.width??0),u=Math.max(o.height+2*(e.padding??0),e?.height??0),f=-l/2,g=-u/2,{cssStyles:m}=e,y=c.A.svg(a),x=A(e,{fill:r.noteBkgColor,stroke:r.noteBorderColor});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");const b=y.rectangle(f,g,l,u,x),k=a.insert((()=>b),":first-child");return k.attr("class","basic label-container"),m&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",m),i&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",i),d(e,k),e.intersect=function(t){return H.rect(e,t)},a}(0,s.K2)(Nt,"linedCylinder"),(0,s.K2)(Dt,"linedWaveEdgedRect"),(0,s.K2)(Ot,"multiRect"),(0,s.K2)(It,"multiWaveEdgedRectangle"),(0,s.K2)(Rt,"note");var Pt=(0,s.K2)(((t,e,r)=>[`M${t+r/2},${e}`,`L${t+r},${e-r/2}`,`L${t+r/2},${e-r}`,`L${t},${e-r/2}`,"Z"].join(" ")),"createDecisionBoxPathD");async function zt(t,e){const{labelStyles:r,nodeStyles:n}=S(e);e.labelStyle=r;const{shapeSvg:i,bbox:a}=await h(t,e,p(e)),o=a.width+e.padding+(a.height+e.padding),l=[{x:o/2,y:0},{x:o,y:-o/2},{x:o/2,y:-o},{x:0,y:-o/2}];let u;const{cssStyles:f}=e;if("handDrawn"===e.look){const t=c.A.svg(i),r=A(e,{}),n=Pt(0,0,o),a=t.path(n,r);u=i.insert((()=>a),":first-child").attr("transform",`translate(${-o/2}, ${o/2})`),f&&u.attr("style",f)}else u=V(i,o,o,l);return n&&u.attr("style",n),d(e,u),e.intersect=function(t){return s.Rm.debug("APA12 Intersect called SPLIT\npoint:",t,"\nnode:\n",e,"\nres:",H.polygon(e,l,t)),H.polygon(e,l,t)},i}async function Kt(t,e){const{labelStyles:r,nodeStyles:n}=S(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,label:o}=await h(t,e,p(e)),s=-Math.max(a.width+(e.padding??0),e?.width??0)/2,l=-Math.max(a.height+(e.padding??0),e?.height??0)/2,u=l/2,g=[{x:s+u,y:l},{x:s,y:0},{x:s+u,y:-l},{x:-s,y:-l},{x:-s,y:l}],{cssStyles:m}=e,y=c.A.svg(i),x=A(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");const b=f(g),k=y.path(b,x),C=i.insert((()=>k),":first-child");return C.attr("class","basic label-container"),m&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",m),n&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",n),C.attr("transform",`translate(${-u/2},0)`),o.attr("transform",`translate(${-u/2-a.width/2-(a.x-(a.left??0))}, ${-a.height/2-(a.y-(a.top??0))})`),d(e,C),e.intersect=function(t){return H.polygon(e,g,t)},i}async function qt(t,e){const{labelStyles:r,nodeStyles:n}=S(e);let i;e.labelStyle=r,i=e.cssClasses?"node "+e.cssClasses:"node default";const a=t.insert("g").attr("class",i).attr("id",e.domId||e.id),o=a.insert("g"),h=a.insert("g").attr("class","label").attr("style",n),u=e.description,p=e.label,f=h.node().appendChild(await k(p,e.labelStyle,!0,!0));let g={width:0,height:0};if((0,s._3)((0,s.D7)()?.flowchart?.htmlLabels)){const t=f.children[0],e=(0,l.Ltv)(f);g=t.getBoundingClientRect(),e.attr("width",g.width),e.attr("height",g.height)}s.Rm.info("Text 2",u);const m=u||[],y=f.getBBox(),x=h.node().appendChild(await k(m.join?m.join("
"):m,e.labelStyle,!0,!0)),b=x.children[0],w=(0,l.Ltv)(x);g=b.getBoundingClientRect(),w.attr("width",g.width),w.attr("height",g.height);const v=(e.padding||0)/2;(0,l.Ltv)(x).attr("transform","translate( "+(g.width>y.width?0:(y.width-g.width)/2)+", "+(y.height+v+5)+")"),(0,l.Ltv)(f).attr("transform","translate( "+(g.width(s.Rm.debug("Rough node insert CXC",n),i)),":first-child"),L=a.insert((()=>(s.Rm.debug("Rough node insert CXC",n),n)),":first-child")}else L=o.insert("rect",":first-child"),F=o.insert("line"),L.attr("class","outer title-state").attr("style",n).attr("x",-g.width/2-v).attr("y",-g.height/2-v).attr("width",g.width+(e.padding||0)).attr("height",g.height+(e.padding||0)),F.attr("class","divider").attr("x1",-g.width/2-v).attr("x2",g.width/2+v).attr("y1",-g.height/2-v+y.height+v).attr("y2",-g.height/2-v+y.height+v);return d(e,L),e.intersect=function(t){return H.rect(e,t)},a}async function Wt(t,e){return Tt(t,e,{rx:5,ry:5,classes:"",labelPaddingX:1*(e?.padding||0),labelPaddingY:1*(e?.padding||0)})}async function Ht(t,e){const{labelStyles:r,nodeStyles:n}=S(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,label:s}=await h(t,e,p(e)),l=e?.padding??0,u=Math.max(a.width+2*(e.padding??0),e?.width??0),f=Math.max(a.height+2*(e.padding??0),e?.height??0),g=-a.width/2-l,m=-a.height/2-l,{cssStyles:y}=e,x=c.A.svg(i),b=A(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");const k=[{x:g,y:m},{x:g+u+8,y:m},{x:g+u+8,y:m+f},{x:g-8,y:m+f},{x:g-8,y:m},{x:g,y:m},{x:g,y:m+f}],C=x.polygon(k.map((t=>[t.x,t.y])),b),w=i.insert((()=>C),":first-child");return w.attr("class","basic label-container").attr("style",(0,o.KL)(y)),n&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",n),y&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",n),s.attr("transform",`translate(${-u/2+4+(e.padding??0)-(a.x-(a.left??0))},${-f/2+(e.padding??0)-(a.y-(a.top??0))})`),d(e,w),e.intersect=function(t){return H.rect(e,t)},i}async function Ut(t,e){const{labelStyles:r,nodeStyles:n}=S(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,label:o}=await h(t,e,p(e)),s=Math.max(a.width+2*(e.padding??0),e?.width??0),l=Math.max(a.height+2*(e.padding??0),e?.height??0),u=-s/2,g=-l/2,{cssStyles:m}=e,y=c.A.svg(i),x=A(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");const b=[{x:u,y:g},{x:u,y:g+l},{x:u+s,y:g+l},{x:u+s,y:g-l/2}],k=f(b),C=y.path(k,x),w=i.insert((()=>C),":first-child");return w.attr("class","basic label-container"),m&&"handDrawn"!==e.look&&w.selectChildren("path").attr("style",m),n&&"handDrawn"!==e.look&&w.selectChildren("path").attr("style",n),w.attr("transform",`translate(0, ${l/4})`),o.attr("transform",`translate(${-s/2+(e.padding??0)-(a.x-(a.left??0))}, ${-l/4+(e.padding??0)-(a.y-(a.top??0))})`),d(e,w),e.intersect=function(t){return H.polygon(e,b,t)},i}async function Yt(t,e){return Tt(t,e,{rx:0,ry:0,classes:"",labelPaddingX:2*(e?.padding||0),labelPaddingY:1*(e?.padding||0)})}async function Gt(t,e){const{labelStyles:r,nodeStyles:n}=S(e);e.labelStyle=r;const{shapeSvg:i,bbox:a}=await h(t,e,p(e)),s=a.height+e.padding,l=a.width+s/4+e.padding;let u;const{cssStyles:f}=e;if("handDrawn"===e.look){const t=c.A.svg(i),r=A(e,{}),n=C(-l/2,-s/2,l,s,s/2),a=t.path(n,r);u=i.insert((()=>a),":first-child"),u.attr("class","basic label-container").attr("style",(0,o.KL)(f))}else u=i.insert("rect",":first-child"),u.attr("class","basic label-container").attr("style",n).attr("rx",s/2).attr("ry",s/2).attr("x",-l/2).attr("y",-s/2).attr("width",l).attr("height",s);return d(e,u),e.intersect=function(t){return H.rect(e,t)},i}async function Vt(t,e){return Tt(t,e,{rx:5,ry:5,classes:"flowchart-node"})}function Zt(t,e,{config:{themeVariables:r}}){const{labelStyles:n,nodeStyles:i}=S(e);e.labelStyle=n;const{cssStyles:a}=e,{lineColor:o,stateBorder:s,nodeBorder:l}=r,h=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),u=c.A.svg(h),p=A(e,{});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const f=u.circle(0,0,14,{...p,stroke:o,strokeWidth:2}),g=s??l,m=u.circle(0,0,5,{...p,fill:g,stroke:g,strokeWidth:2,fillStyle:"solid"}),y=h.insert((()=>f),":first-child");return y.insert((()=>m)),a&&y.selectAll("path").attr("style",a),i&&y.selectAll("path").attr("style",i),d(e,y),e.intersect=function(t){return H.circle(e,7,t)},h}function Xt(t,e,{config:{themeVariables:r}}){const{lineColor:n}=r,i=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);let a;if("handDrawn"===e.look){const t=c.A.svg(i).circle(0,0,14,w(n));a=i.insert((()=>t)),a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14)}else a=i.insert("circle",":first-child"),a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return d(e,a),e.intersect=function(t){return H.circle(e,7,t)},i}async function Qt(t,e){const{labelStyles:r,nodeStyles:n}=S(e);e.labelStyle=r;const{shapeSvg:i,bbox:a}=await h(t,e,p(e)),s=(e?.padding||0)/2,l=a.width+e.padding,u=a.height+e.padding,f=-a.width/2-s,g=-a.height/2-s,m=[{x:0,y:0},{x:l,y:0},{x:l,y:-u},{x:0,y:-u},{x:0,y:0},{x:-8,y:0},{x:l+8,y:0},{x:l+8,y:-u},{x:-8,y:-u},{x:-8,y:0}];if("handDrawn"===e.look){const t=c.A.svg(i),r=A(e,{}),n=t.rectangle(f-8,g,l+16,u,r),a=t.line(f,g,f,g+u,r),s=t.line(f+l,g,f+l,g+u,r);i.insert((()=>a),":first-child"),i.insert((()=>s),":first-child");const h=i.insert((()=>n),":first-child"),{cssStyles:p}=e;h.attr("class","basic label-container").attr("style",(0,o.KL)(p)),d(e,h)}else{const t=V(i,l,u,m);n&&t.attr("style",n),d(e,t)}return e.intersect=function(t){return H.polygon(e,m,t)},i}async function Jt(t,e){const{labelStyles:r,nodeStyles:n}=S(e);e.labelStyle=r;const{shapeSvg:i,bbox:a}=await h(t,e,p(e)),o=Math.max(a.width+2*(e.padding??0),e?.width??0),s=Math.max(a.height+2*(e.padding??0),e?.height??0),l=-o/2,u=-s/2,g=.2*s,m=.2*s,{cssStyles:y}=e,x=c.A.svg(i),b=A(e,{}),k=[{x:l-g/2,y:u},{x:l+o+g/2,y:u},{x:l+o+g/2,y:u+s},{x:l-g/2,y:u+s}],C=[{x:l+o-g/2,y:u+s},{x:l+o+g/2,y:u+s},{x:l+o+g/2,y:u+s-m}];"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");const w=f(k),v=x.path(w,b),_=f(C),T=x.path(_,{...b,fillStyle:"solid"}),M=i.insert((()=>T),":first-child");return M.insert((()=>v),":first-child"),M.attr("class","basic label-container"),y&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",y),n&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",n),d(e,M),e.intersect=function(t){return H.polygon(e,k,t)},i}async function te(t,e){const{labelStyles:r,nodeStyles:n}=S(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,label:o}=await h(t,e,p(e)),s=Math.max(a.width+2*(e.padding??0),e?.width??0),l=Math.max(a.height+2*(e.padding??0),e?.height??0),u=l/4,m=.2*s,y=.2*l,x=l+u,{cssStyles:b}=e,k=c.A.svg(i),C=A(e,{});"handDrawn"!==e.look&&(C.roughness=0,C.fillStyle="solid");const w=[{x:-s/2-s/2*.1,y:x/2},...g(-s/2-s/2*.1,x/2,s/2+s/2*.1,x/2,u,.8),{x:s/2+s/2*.1,y:-x/2},{x:-s/2-s/2*.1,y:-x/2}],v=-s/2+s/2*.1,_=-x/2-.4*y,T=[{x:v+s-m,y:1.4*(_+l)},{x:v+s,y:_+l-y},{x:v+s,y:.9*(_+l)},...g(v+s,1.3*(_+l),v+s-m,1.5*(_+l),.03*-l,.5)],M=f(w),B=k.path(M,C),L=f(T),F=k.path(L,{...C,fillStyle:"solid"}),$=i.insert((()=>F),":first-child");return $.insert((()=>B),":first-child"),$.attr("class","basic label-container"),b&&"handDrawn"!==e.look&&$.selectAll("path").attr("style",b),n&&"handDrawn"!==e.look&&$.selectAll("path").attr("style",n),$.attr("transform",`translate(0,${-u/2})`),o.attr("transform",`translate(${-s/2+(e.padding??0)-(a.x-(a.left??0))},${-l/2+(e.padding??0)-u/2-(a.y-(a.top??0))})`),d(e,$),e.intersect=function(t){return H.polygon(e,w,t)},i}async function ee(t,e){const{labelStyles:r,nodeStyles:n}=S(e);e.labelStyle=r;const{shapeSvg:i,bbox:a}=await h(t,e,p(e)),o=Math.max(a.width+e.padding,e?.width||0),s=Math.max(a.height+e.padding,e?.height||0),l=-o/2,c=-s/2,u=i.insert("rect",":first-child");return u.attr("class","text").attr("style",n).attr("rx",0).attr("ry",0).attr("x",l).attr("y",c).attr("width",o).attr("height",s),d(e,u),e.intersect=function(t){return H.rect(e,t)},i}(0,s.K2)(zt,"question"),(0,s.K2)(Kt,"rect_left_inv_arrow"),(0,s.K2)(qt,"rectWithTitle"),(0,s.K2)(Wt,"roundedRect"),(0,s.K2)(Ht,"shadedProcess"),(0,s.K2)(Ut,"slopedRect"),(0,s.K2)(Yt,"squareRect"),(0,s.K2)(Gt,"stadium"),(0,s.K2)(Vt,"state"),(0,s.K2)(Zt,"stateEnd"),(0,s.K2)(Xt,"stateStart"),(0,s.K2)(Qt,"subroutine"),(0,s.K2)(Jt,"taggedRect"),(0,s.K2)(te,"taggedWaveEdgedRectangle"),(0,s.K2)(ee,"text");var re=(0,s.K2)(((t,e,r,n,i,a)=>`M${t},${e}\n a${i},${a} 0,0,1 0,${-n}\n l${r},0\n a${i},${a} 0,0,1 0,${n}\n M${r},${-n}\n a${i},${a} 0,0,0 0,${n}\n l${-r},0`),"createCylinderPathD"),ne=(0,s.K2)(((t,e,r,n,i,a)=>[`M${t},${e}`,`M${t+r},${e}`,`a${i},${a} 0,0,0 0,${-n}`,`l${-r},0`,`a${i},${a} 0,0,0 0,${n}`,`l${r},0`].join(" ")),"createOuterCylinderPathD"),ie=(0,s.K2)(((t,e,r,n,i,a)=>[`M${t+r/2},${-n/2}`,`a${i},${a} 0,0,0 0,${n}`].join(" ")),"createInnerCylinderPathD");async function ae(t,e){const{labelStyles:r,nodeStyles:n}=S(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,label:s,halfPadding:l}=await h(t,e,p(e)),u="neo"===e.look?2*l:l,f=a.height+u,g=f/2,m=g/(2.5+f/50),y=a.width+m+u,{cssStyles:x}=e;let b;if("handDrawn"===e.look){const t=c.A.svg(i),r=ne(0,0,y,f,m,g),n=ie(0,0,y,f,m,g),a=t.path(r,A(e,{})),o=t.path(n,A(e,{fill:"none"}));b=i.insert((()=>o),":first-child"),b=i.insert((()=>a),":first-child"),b.attr("class","basic label-container"),x&&b.attr("style",x)}else{const t=re(0,0,y,f,m,g);b=i.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",(0,o.KL)(x)).attr("style",n),b.attr("class","basic label-container"),x&&b.selectAll("path").attr("style",x),n&&b.selectAll("path").attr("style",n)}return b.attr("label-offset-x",m),b.attr("transform",`translate(${-y/2}, ${f/2} )`),s.attr("transform",`translate(${-a.width/2-m-(a.x-(a.left??0))}, ${-a.height/2-(a.y-(a.top??0))})`),d(e,b),e.intersect=function(t){const r=H.rect(e,t),n=r.y-(e.y??0);if(0!=g&&(Math.abs(n)<(e.height??0)/2||Math.abs(n)==(e.height??0)/2&&Math.abs(r.x-(e.x??0))>(e.width??0)/2-m)){let i=m*m*(1-n*n/(g*g));0!=i&&(i=Math.sqrt(i)),i=m-i,t.x-(e.x??0)>0&&(i=-i),r.x+=i}return r},i}async function oe(t,e){const{labelStyles:r,nodeStyles:n}=S(e);e.labelStyle=r;const{shapeSvg:i,bbox:a}=await h(t,e,p(e)),o=a.width+e.padding,s=a.height+e.padding,l=[{x:-3*s/6,y:0},{x:o+3*s/6,y:0},{x:o,y:-s},{x:0,y:-s}];let u;const{cssStyles:g}=e;if("handDrawn"===e.look){const t=c.A.svg(i),r=A(e,{}),n=f(l),a=t.path(n,r);u=i.insert((()=>a),":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),g&&u.attr("style",g)}else u=V(i,o,s,l);return n&&u.attr("style",n),e.width=o,e.height=s,d(e,u),e.intersect=function(t){return H.polygon(e,l,t)},i}async function se(t,e){const{labelStyles:r,nodeStyles:n}=S(e);e.labelStyle=r;const{shapeSvg:i,bbox:a}=await h(t,e,p(e)),o=Math.max(60,a.width+2*(e.padding??0),e?.width??0),s=Math.max(20,a.height+2*(e.padding??0),e?.height??0),{cssStyles:l}=e,u=c.A.svg(i),g=A(e,{});"handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid");const m=[{x:-o/2*.8,y:-s/2},{x:o/2*.8,y:-s/2},{x:o/2,y:-s/2*.6},{x:o/2,y:s/2},{x:-o/2,y:s/2},{x:-o/2,y:-s/2*.6}],y=f(m),x=u.path(y,g),b=i.insert((()=>x),":first-child");return b.attr("class","basic label-container"),l&&"handDrawn"!==e.look&&b.selectChildren("path").attr("style",l),n&&"handDrawn"!==e.look&&b.selectChildren("path").attr("style",n),d(e,b),e.intersect=function(t){return H.polygon(e,m,t)},i}async function le(t,e){const{labelStyles:r,nodeStyles:n}=S(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,label:o}=await h(t,e,p(e)),l=(0,s._3)((0,s.D7)().flowchart?.htmlLabels),u=a.width+(e.padding??0),g=u+a.height,m=u+a.height,y=[{x:0,y:0},{x:m,y:0},{x:m/2,y:-g}],{cssStyles:x}=e,b=c.A.svg(i),k=A(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");const C=f(y),w=b.path(C,k),v=i.insert((()=>w),":first-child").attr("transform",`translate(${-g/2}, ${g/2})`);return x&&"handDrawn"!==e.look&&v.selectChildren("path").attr("style",x),n&&"handDrawn"!==e.look&&v.selectChildren("path").attr("style",n),e.width=u,e.height=g,d(e,v),o.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${g/2-(a.height+(e.padding??0)/(l?2:1)-(a.y-(a.top??0)))})`),e.intersect=function(t){return s.Rm.info("Triangle intersect",e,y,t),H.polygon(e,y,t)},i}async function ce(t,e){const{labelStyles:r,nodeStyles:n}=S(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,label:o}=await h(t,e,p(e)),s=Math.max(a.width+2*(e.padding??0),e?.width??0),l=Math.max(a.height+2*(e.padding??0),e?.height??0),u=l/8,m=l+u,{cssStyles:y}=e,x=70-s,b=x>0?x/2:0,k=c.A.svg(i),C=A(e,{});"handDrawn"!==e.look&&(C.roughness=0,C.fillStyle="solid");const w=[{x:-s/2-b,y:m/2},...g(-s/2-b,m/2,s/2+b,m/2,u,.8),{x:s/2+b,y:-m/2},{x:-s/2-b,y:-m/2}],v=f(w),_=k.path(v,C),T=i.insert((()=>_),":first-child");return T.attr("class","basic label-container"),y&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",y),n&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",n),T.attr("transform",`translate(0,${-u/2})`),o.attr("transform",`translate(${-s/2+(e.padding??0)-(a.x-(a.left??0))},${-l/2+(e.padding??0)-u-(a.y-(a.top??0))})`),d(e,T),e.intersect=function(t){return H.polygon(e,w,t)},i}async function he(t,e){const{labelStyles:r,nodeStyles:n}=S(e);e.labelStyle=r;const{shapeSvg:i,bbox:a}=await h(t,e,p(e)),o=Math.max(a.width+2*(e.padding??0),e?.width??0),s=Math.max(a.height+2*(e.padding??0),e?.height??0),l=o/s;let u=o,m=s;u>m*l?m=u/l:u=m*l,u=Math.max(u,100),m=Math.max(m,50);const y=Math.min(.2*m,m/4),x=m+2*y,{cssStyles:b}=e,k=c.A.svg(i),C=A(e,{});"handDrawn"!==e.look&&(C.roughness=0,C.fillStyle="solid");const w=[{x:-u/2,y:x/2},...g(-u/2,x/2,u/2,x/2,y,1),{x:u/2,y:-x/2},...g(u/2,-x/2,-u/2,-x/2,y,-1)],v=f(w),_=k.path(v,C),T=i.insert((()=>_),":first-child");return T.attr("class","basic label-container"),b&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",b),n&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",n),d(e,T),e.intersect=function(t){return H.polygon(e,w,t)},i}async function ue(t,e){const{labelStyles:r,nodeStyles:n}=S(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,label:o}=await h(t,e,p(e)),s=Math.max(a.width+2*(e.padding??0),e?.width??0),l=Math.max(a.height+2*(e.padding??0),e?.height??0),u=-s/2,f=-l/2,{cssStyles:g}=e,m=c.A.svg(i),y=A(e,{}),x=[{x:u-5,y:f-5},{x:u-5,y:f+l},{x:u+s,y:f+l},{x:u+s,y:f-5}],b=`M${u-5},${f-5} L${u+s},${f-5} L${u+s},${f+l} L${u-5},${f+l} L${u-5},${f-5}\n M${u-5},${f} L${u+s},${f}\n M${u},${f-5} L${u},${f+l}`;"handDrawn"!==e.look&&(y.roughness=0,y.fillStyle="solid");const k=m.path(b,y),C=i.insert((()=>k),":first-child");return C.attr("transform","translate(2.5, 2.5)"),C.attr("class","basic label-container"),g&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",g),n&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",n),o.attr("transform",`translate(${-a.width/2+2.5-(a.x-(a.left??0))}, ${-a.height/2+2.5-(a.y-(a.top??0))})`),d(e,C),e.intersect=function(t){return H.polygon(e,x,t)},i}async function de(t,e,r,n,i=r.class.padding??12){const a=n?0:3,o=t.insert("g").attr("class",p(e)).attr("id",e.domId||e.id);let s=null,l=null,c=null,h=null,u=0,d=0,f=0;if(s=o.insert("g").attr("class","annotation-group text"),e.annotations.length>0){const t=e.annotations[0];await pe(s,{text:`\xab${t}\xbb`},0);u=s.node().getBBox().height}l=o.insert("g").attr("class","label-group text"),await pe(l,e,0,["font-weight: bolder"]);const g=l.node().getBBox();d=g.height,c=o.insert("g").attr("class","members-group text");let m=0;for(const p of e.members){m+=await pe(c,p,m,[p.parseClassifier()])+a}f=c.node().getBBox().height,f<=0&&(f=i/2),h=o.insert("g").attr("class","methods-group text");let y=0;for(const p of e.methods){y+=await pe(h,p,y,[p.parseClassifier()])+a}let x=o.node().getBBox();if(null!==s){const t=s.node().getBBox();s.attr("transform",`translate(${-t.width/2})`)}return l.attr("transform",`translate(${-g.width/2}, ${u})`),x=o.node().getBBox(),c.attr("transform",`translate(0, ${u+d+2*i})`),x=o.node().getBBox(),h.attr("transform",`translate(0, ${u+d+(f?f+4*i:2*i)})`),x=o.node().getBBox(),{shapeSvg:o,bbox:x}}async function pe(t,e,r,n=[]){const i=t.insert("g").attr("class","label").attr("style",n.join("; ")),c=(0,s.zj)();let h="useHtmlLabels"in e?e.useHtmlLabels:(0,s._3)(c.htmlLabels)??!0,u="";u="text"in e?e.text:e.label,!h&&u.startsWith("\\")&&(u=u.substring(1)),(0,s.Wi)(u)&&(h=!0);const d=await(0,a.GZ)(i,(0,s.oB)((0,o.Sm)(u)),{width:(0,o.Un)(u,c)+50,classes:"markdown-node-label",useHtmlLabels:h},c);let p,f=1;if(h){const t=d.children[0],e=(0,l.Ltv)(d);f=t.innerHTML.split("
").length,t.innerHTML.includes("")&&(f+=t.innerHTML.split("").length-1);const r=t.getElementsByTagName("img");if(r){const t=""===u.replace(/]*>/g,"").trim();await Promise.all([...r].map((e=>new Promise((r=>{function n(){if(e.style.display="flex",e.style.flexDirection="column",t){const t=c.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,r=5,n=parseInt(t,10)*r+"px";e.style.minWidth=n,e.style.maxWidth=n}else e.style.width="100%";r(e)}(0,s.K2)(n,"setupImage"),setTimeout((()=>{e.complete&&n()})),e.addEventListener("error",n),e.addEventListener("load",n)})))))}p=t.getBoundingClientRect(),e.attr("width",p.width),e.attr("height",p.height)}else{n.includes("font-weight: bolder")&&(0,l.Ltv)(d).selectAll("tspan").attr("font-weight",""),f=d.children.length;const t=d.children[0];if(""===d.textContent||d.textContent.includes(">")){t.textContent=u[0]+u.substring(1).replaceAll(">",">").replaceAll("<","<").trim();" "===u[1]&&(t.textContent=t.textContent[0]+" "+t.textContent.substring(1))}"undefined"===t.textContent&&(t.textContent=""),p=d.getBBox()}return i.attr("transform","translate(0,"+(-p.height/(2*f)+r)+")"),p.height}async function fe(t,e){const r=(0,s.D7)(),n=r.class.padding??12,i=n,a=e.useHtmlLabels??(0,s._3)(r.htmlLabels)??!0,o=e;o.annotations=o.annotations??[],o.members=o.members??[],o.methods=o.methods??[];const{shapeSvg:h,bbox:u}=await de(t,e,r,a,i),{labelStyles:p,nodeStyles:f}=S(e);e.labelStyle=p,e.cssStyles=o.styles||"";const g=o.styles?.join(";")||f||"";e.cssStyles||(e.cssStyles=g.replaceAll("!important","").split(";"));const m=0===o.members.length&&0===o.methods.length&&!r.class?.hideEmptyMembersBox,y=c.A.svg(h),x=A(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");const b=u.width;let k=u.height;0===o.members.length&&0===o.methods.length?k+=i:o.members.length>0&&0===o.methods.length&&(k+=2*i);const C=-b/2,w=-k/2,v=y.rectangle(C-n,w-n-(m?n:0===o.members.length&&0===o.methods.length?-n/2:0),b+2*n,k+2*n+(m?2*n:0===o.members.length&&0===o.methods.length?-n:0),x),_=h.insert((()=>v),":first-child");_.attr("class","basic label-container");const T=_.node().getBBox();h.selectAll(".text").each(((t,e,r)=>{const i=(0,l.Ltv)(r[e]),s=i.attr("transform");let c=0;if(s){const t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(s);t&&(c=parseFloat(t[2]))}let u=c+w+n-(m?n:0===o.members.length&&0===o.methods.length?-n/2:0);a||(u-=4);let d=C;(i.attr("class").includes("label-group")||i.attr("class").includes("annotation-group"))&&(d=-i.node()?.getBBox().width/2||0,h.selectAll("text").each((function(t,e,r){"middle"===window.getComputedStyle(r[e]).textAnchor&&(d=0)}))),i.attr("transform",`translate(${d}, ${u})`)}));const M=h.select(".annotation-group").node().getBBox().height-(m?n/2:0)||0,B=h.select(".label-group").node().getBBox().height-(m?n/2:0)||0,L=h.select(".members-group").node().getBBox().height-(m?n/2:0)||0;if(o.members.length>0||o.methods.length>0||m){const t=y.line(T.x,M+B+w+n,T.x+T.width,M+B+w+n,x);h.insert((()=>t)).attr("class","divider").attr("style",g)}if(m||o.members.length>0||o.methods.length>0){const t=y.line(T.x,M+B+L+w+2*i+n,T.x+T.width,M+B+L+w+n+2*i,x);h.insert((()=>t)).attr("class","divider").attr("style",g)}if("handDrawn"!==o.look&&h.selectAll("path").attr("style",g),_.select(":nth-child(2)").attr("style",g),h.selectAll(".divider").select("path").attr("style",g),e.labelStyle?h.selectAll("span").attr("style",e.labelStyle):h.selectAll("span").attr("style",g),!a){const t=RegExp(/color\s*:\s*([^;]*)/),e=t.exec(g);if(e){const t=e[0].replace("color","fill");h.selectAll("tspan").attr("style",t)}else if(p){const e=t.exec(p);if(e){const t=e[0].replace("color","fill");h.selectAll("tspan").attr("style",t)}}}return d(e,_),e.intersect=function(t){return H.rect(e,t)},h}(0,s.K2)(ae,"tiltedCylinder"),(0,s.K2)(oe,"trapezoid"),(0,s.K2)(se,"trapezoidalPentagon"),(0,s.K2)(le,"triangle"),(0,s.K2)(ce,"waveEdgedRectangle"),(0,s.K2)(he,"waveRectangle"),(0,s.K2)(ue,"windowPane"),(0,s.K2)(de,"textHelper"),(0,s.K2)(pe,"addText"),(0,s.K2)(fe,"classBox");var ge=(0,s.K2)((t=>{switch(t){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}}),"colorFromPriority");async function me(t,e,{config:r}){const{labelStyles:n,nodeStyles:i}=S(e);e.labelStyle=n||"";const a=e.width;e.width=(e.width??200)-10;const{shapeSvg:o,bbox:s,label:l}=await h(t,e,p(e)),f=e.padding||10;let g,m="";"ticket"in e&&e.ticket&&r?.kanban?.ticketBaseUrl&&(m=r?.kanban?.ticketBaseUrl.replace("#TICKET#",e.ticket),g=o.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",m).attr("target","_blank"));const y={useHtmlLabels:e.useHtmlLabels,labelStyle:e.labelStyle||"",width:e.width,img:e.img,padding:e.padding||8,centerLabel:!1};let x,b;({label:x,bbox:b}=g?await u(g,"ticket"in e&&e.ticket||"",y):await u(o,"ticket"in e&&e.ticket||"",y));const{label:k,bbox:w}=await u(o,"assigned"in e&&e.assigned||"",y);e.width=a;const v=e?.width||0,_=Math.max(b.height,w.height)/2,T=Math.max(s.height+20,e?.height||0)+_,M=-v/2,B=-T/2;let L;l.attr("transform","translate("+(f-v/2)+", "+(-_-s.height/2)+")"),x.attr("transform","translate("+(f-v/2)+", "+(-_+s.height/2)+")"),k.attr("transform","translate("+(f+v/2-w.width-20)+", "+(-_+s.height/2)+")");const{rx:F,ry:$}=e,{cssStyles:E}=e;if("handDrawn"===e.look){const t=c.A.svg(o),r=A(e,{}),n=F||$?t.path(C(M,B,v,T,F||0),r):t.rectangle(M,B,v,T,r);L=o.insert((()=>n),":first-child"),L.attr("class","basic label-container").attr("style",E||null)}else{L=o.insert("rect",":first-child"),L.attr("class","basic label-container __APA__").attr("style",i).attr("rx",F??5).attr("ry",$??5).attr("x",M).attr("y",B).attr("width",v).attr("height",T);const t="priority"in e&&e.priority;if(t){const e=o.append("line"),r=M+2,n=B+Math.floor((F??0)/2),i=B+T-Math.floor((F??0)/2);e.attr("x1",r).attr("y1",n).attr("x2",r).attr("y2",i).attr("stroke-width","4").attr("stroke",ge(t))}}return d(e,L),e.height=T,e.intersect=function(t){return H.rect(e,t)},o}(0,s.K2)(me,"kanbanItem");var ye=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:Yt},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:Wt},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:Gt},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:Qt},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:ut},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:Q},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:zt},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:bt},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:Lt},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:Bt},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:oe},{semanticName:"Manual Operation",name:"Trapezoid Base Top",shortName:"trap-t",description:"Represents a manual task",aliases:["manual","trapezoid-top","inv-trapezoid"],internalAliases:["inv_trapezoid"],handler:At},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:pt},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:ee},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Z},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:Ht},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:Xt},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Zt},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:mt},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:kt},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:rt},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:it},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:ot},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:Ft},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:ce},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:yt},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:ae},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:Nt},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:st},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:dt},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:le},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:ue},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:ft},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:se},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:gt},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:Ut},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:It},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:Ot},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:G},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:tt},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:te},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:Jt},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:he},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:Kt},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Dt}],xe=(0,s.K2)((()=>{const t={state:Vt,choice:X,note:Rt,rectWithTitle:qt,labelRect:Mt,iconSquare:_t,iconCircle:wt,icon:Ct,iconRounded:vt,imageSquare:St,anchor:U,kanbanItem:me,classBox:fe},e=[...Object.entries(t),...ye.flatMap((t=>[t.shortName,..."aliases"in t?t.aliases:[],..."internalAliases"in t?t.internalAliases:[]].map((e=>[e,t.handler]))))];return Object.fromEntries(e)}),"generateShapeMap")();function be(t){return t in xe}(0,s.K2)(be,"isValidShape");var ke=new Map;async function Ce(t,e,r){let n,i;"rect"===e.shape&&(e.rx&&e.ry?e.shape="roundedRect":e.shape="squareRect");const a=e.shape?xe[e.shape]:void 0;if(!a)throw new Error(`No such shape: ${e.shape}. Please check your syntax.`);if(e.link){let o;"sandbox"===r.config.securityLevel?o="_top":e.linkTarget&&(o=e.linkTarget||"_blank"),n=t.insert("svg:a").attr("xlink:href",e.link).attr("target",o??null),i=await a(n,e,r)}else i=await a(t,e,r),n=i;return e.tooltip&&i.attr("title",e.tooltip),ke.set(e.id,n),e.haveCallback&&n.attr("class",n.attr("class")+" clickable"),n}(0,s.K2)(Ce,"insertNode");var we=(0,s.K2)(((t,e)=>{ke.set(e.id,t)}),"setNodeElem"),ve=(0,s.K2)((()=>{ke.clear()}),"clear"),_e=(0,s.K2)((t=>{const e=ke.get(t.id);s.Rm.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");const r=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+r-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),r}),"positionNode")},85039:(t,e,r)=>{"use strict";r.d(e,{$C:()=>T,$t:()=>q,C4:()=>H,I5:()=>K,Ib:()=>g,KL:()=>G,Sm:()=>U,Un:()=>N,_K:()=>W,bH:()=>$,dq:()=>P,pe:()=>l,rY:()=>Y,ru:()=>j,sM:()=>S,vU:()=>p,yT:()=>B});var n=r(45567),i=r(16750),a=r(20007),o=r(46632),s=r(42837),l="\u200b",c={curveBasis:a.qrM,curveBasisClosed:a.Yu4,curveBasisOpen:a.IA3,curveBumpX:a.Wi0,curveBumpY:a.PGM,curveBundle:a.OEq,curveCardinalClosed:a.olC,curveCardinalOpen:a.IrU,curveCardinal:a.y8u,curveCatmullRomClosed:a.Q7f,curveCatmullRomOpen:a.cVp,curveCatmullRom:a.oDi,curveLinear:a.lUB,curveLinearClosed:a.Lx9,curveMonotoneX:a.nVG,curveMonotoneY:a.uxU,curveNatural:a.Xf2,curveStep:a.GZz,curveStepAfter:a.UPb,curveStepBefore:a.dyv},h=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,u=(0,n.K2)((function(t,e){const r=d(t,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const t=r.map((t=>t.args));(0,n.$i)(t),i=(0,n.hH)(i,[...t])}else i=r.args;if(!i)return;let a=(0,n.Ch)(t,e);const o="config";return void 0!==i[o]&&("flowchart-v2"===a&&(a="flowchart"),i[a]=i[o],delete i[o]),i}),"detectInit"),d=(0,n.K2)((function(t,e=null){try{const r=new RegExp(`[%]{2}(?![{]${h.source})(?=[}][%]{2}).*\n`,"ig");let i;t=t.trim().replace(r,"").replace(/'/gm,'"'),n.Rm.debug(`Detecting diagram directive${null!==e?" type:"+e:""} based on the text:${t}`);const a=[];for(;null!==(i=n.DB.exec(t));)if(i.index===n.DB.lastIndex&&n.DB.lastIndex++,i&&!e||e&&i[1]?.match(e)||e&&i[2]?.match(e)){const t=i[1]?i[1]:i[2],e=i[3]?i[3].trim():i[4]?JSON.parse(i[4].trim()):null;a.push({type:t,args:e})}return 0===a.length?{type:t,args:null}:1===a.length?a[0]:a}catch(r){return n.Rm.error(`ERROR: ${r.message} - Unable to parse directive type: '${e}' based on the text: '${t}'`),{type:void 0,args:null}}}),"detectDirective"),p=(0,n.K2)((function(t){return t.replace(n.DB,"")}),"removeDirectives"),f=(0,n.K2)((function(t,e){for(const[r,n]of e.entries())if(n.match(t))return r;return-1}),"isSubstringInArray");function g(t,e){if(!t)return e;const r=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return c[r]??e}function m(t,e){const r=t.trim();if(r)return"loose"!==e.securityLevel?(0,i.J)(r):r}(0,n.K2)(g,"interpolateToCurve"),(0,n.K2)(m,"formatUrl");var y=(0,n.K2)(((t,...e)=>{const r=t.split("."),i=r.length-1,a=r[i];let o=window;for(let s=0;s{r+=x(t,e),e=t}));return w(t,r/2)}function k(t){return 1===t.length?t[0]:b(t)}(0,n.K2)(x,"distance"),(0,n.K2)(b,"traverseEdge"),(0,n.K2)(k,"calcLabelPosition");var C=(0,n.K2)(((t,e=2)=>{const r=Math.pow(10,e);return Math.round(t*r)/r}),"roundNumber"),w=(0,n.K2)(((t,e)=>{let r,n=e;for(const i of t){if(r){const t=x(i,r);if(t=1)return{x:i.x,y:i.y};if(e>0&&e<1)return{x:C((1-e)*r.x+e*i.x,5),y:C((1-e)*r.y+e*i.y,5)}}}r=i}throw new Error("Could not find a suitable point for the given distance")}),"calculatePoint"),v=(0,n.K2)(((t,e,r)=>{n.Rm.info(`our points ${JSON.stringify(e)}`),e[0]!==r&&(e=e.reverse());const i=w(e,25),a=t?10:5,o=Math.atan2(e[0].y-i.y,e[0].x-i.x),s={x:0,y:0};return s.x=Math.sin(o)*a+(e[0].x+i.x)/2,s.y=-Math.cos(o)*a+(e[0].y+i.y)/2,s}),"calcCardinalityPosition");function _(t,e,r){const i=structuredClone(r);n.Rm.info("our points",i),"start_left"!==e&&"start_right"!==e&&i.reverse();const a=w(i,25+t),o=10+.5*t,s=Math.atan2(i[0].y-a.y,i[0].x-a.x),l={x:0,y:0};return"start_left"===e?(l.x=Math.sin(s+Math.PI)*o+(i[0].x+a.x)/2,l.y=-Math.cos(s+Math.PI)*o+(i[0].y+a.y)/2):"end_right"===e?(l.x=Math.sin(s-Math.PI)*o+(i[0].x+a.x)/2-5,l.y=-Math.cos(s-Math.PI)*o+(i[0].y+a.y)/2-5):"end_left"===e?(l.x=Math.sin(s)*o+(i[0].x+a.x)/2-5,l.y=-Math.cos(s)*o+(i[0].y+a.y)/2-5):(l.x=Math.sin(s)*o+(i[0].x+a.x)/2,l.y=-Math.cos(s)*o+(i[0].y+a.y)/2),l}function S(t){let e="",r="";for(const n of t)void 0!==n&&(n.startsWith("color:")||n.startsWith("text-align:")?r=r+n+";":e=e+n+";");return{style:e,labelStyle:r}}(0,n.K2)(_,"calcTerminalLabelPosition"),(0,n.K2)(S,"getStylesFromArray");var A=0,T=(0,n.K2)((()=>(A++,"id-"+Math.random().toString(36).substr(2,12)+"-"+A)),"generateId");function M(t){let e="";const r="0123456789abcdef";for(let n=0;nM(t.length)),"random"),L=(0,n.K2)((function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}}),"getTextObj"),F=(0,n.K2)((function(t,e){const r=e.text.replace(n.Y2.lineBreakRegex," "),[,i]=K(e.fontSize),a=t.append("text");a.attr("x",e.x),a.attr("y",e.y),a.style("text-anchor",e.anchor),a.style("font-family",e.fontFamily),a.style("font-size",i),a.style("font-weight",e.fontWeight),a.attr("fill",e.fill),void 0!==e.class&&a.attr("class",e.class);const o=a.append("tspan");return o.attr("x",e.x+2*e.textMargin),o.attr("fill",e.fill),o.text(r),a}),"drawSimpleText"),$=(0,o.A)(((t,e,r)=>{if(!t)return t;if(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"
"},r),n.Y2.lineBreakRegex.test(t))return t;const i=t.split(" ").filter(Boolean),a=[];let o="";return i.forEach(((t,n)=>{const s=N(`${t} `,r),l=N(o,r);if(s>e){const{hyphenatedStrings:n,remainingWord:i}=E(t,e,"-",r);a.push(o,...n),o=i}else l+s>=e?(a.push(o),o=t):o=[o,t].filter(Boolean).join(" ");n+1===i.length&&a.push(o)})),a.filter((t=>""!==t)).join(r.joinWith)}),((t,e,r)=>`${t}${e}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`)),E=(0,o.A)(((t,e,r="-",n)=>{n=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},n);const i=[...t],a=[];let o="";return i.forEach(((t,s)=>{const l=`${o}${t}`;if(N(l,n)>=e){const t=s+1,e=i.length===t,n=`${l}${r}`;a.push(e?l:n),o=""}else o=l})),{hyphenatedStrings:a,remainingWord:o}}),((t,e,r="-",n)=>`${t}${e}${r}${n.fontSize}${n.fontWeight}${n.fontFamily}`));function j(t,e){return O(t,e).height}function N(t,e){return O(t,e).width}(0,n.K2)(j,"calculateTextHeight"),(0,n.K2)(N,"calculateTextWidth");var D,O=(0,o.A)(((t,e)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:o=400}=e;if(!t)return{width:0,height:0};const[,s]=K(r),c=["sans-serif",i],h=t.split(n.Y2.lineBreakRegex),u=[],d=(0,a.Ltv)("body");if(!d.remove)return{width:0,height:0,lineHeight:0};const p=d.append("svg");for(const n of c){let t=0;const e={width:0,height:0,lineHeight:0};for(const r of h){const i=L();i.text=r||l;const a=F(p,i).style("font-size",s).style("font-weight",o).style("font-family",n),c=(a._groups||a)[0][0].getBBox();if(0===c.width&&0===c.height)throw new Error("svg element not in render tree");e.width=Math.round(Math.max(e.width,c.width)),t=Math.round(c.height),e.height+=t,e.lineHeight=Math.round(Math.max(e.lineHeight,t))}u.push(e)}p.remove();return u[isNaN(u[1].height)||isNaN(u[1].width)||isNaN(u[1].lineHeight)||u[0].height>u[1].height&&u[0].width>u[1].width&&u[0].lineHeight>u[1].lineHeight?0:1]}),((t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`)),I=class{constructor(t=!1,e){this.count=0,this.count=e?e.length:0,this.next=t?()=>this.count++:()=>Date.now()}static{(0,n.K2)(this,"InitIDGenerator")}},R=(0,n.K2)((function(t){return D=D||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),D.innerHTML=t,unescape(D.textContent)}),"entityDecode");function P(t){return"str"in t}(0,n.K2)(P,"isDetailedError");var z=(0,n.K2)(((t,e,r,n)=>{if(!n)return;const i=t.node()?.getBBox();i&&t.append("text").text(n).attr("text-anchor","middle").attr("x",i.x+i.width/2).attr("y",-r).attr("class",e)}),"insertTitle"),K=(0,n.K2)((t=>{if("number"==typeof t)return[t,t+"px"];const e=parseInt(t??"",10);return Number.isNaN(e)?[void 0,void 0]:t===String(e)?[e,t+"px"]:[e,t]}),"parseFontSize");function q(t,e){return(0,s.A)({},t,e)}(0,n.K2)(q,"cleanAndMerge");var W={assignWithDepth:n.hH,wrapLabel:$,calculateTextHeight:j,calculateTextWidth:N,calculateTextDimensions:O,cleanAndMerge:q,detectInit:u,detectDirective:d,isSubstringInArray:f,interpolateToCurve:g,calcLabelPosition:k,calcCardinalityPosition:v,calcTerminalLabelPosition:_,formatUrl:m,getStylesFromArray:S,generateId:T,random:B,runFunc:y,entityDecode:R,insertTitle:z,parseFontSize:K,InitIDGenerator:I},H=(0,n.K2)((function(t){let e=t;return e=e.replace(/style.*:\S*#.*;/g,(function(t){return t.substring(0,t.length-1)})),e=e.replace(/classDef.*:\S*#.*;/g,(function(t){return t.substring(0,t.length-1)})),e=e.replace(/#\w+;/g,(function(t){const e=t.substring(1,t.length-1);return/^\+?\d+$/.test(e)?"\ufb02\xb0\xb0"+e+"\xb6\xdf":"\ufb02\xb0"+e+"\xb6\xdf"})),e}),"encodeEntities"),U=(0,n.K2)((function(t){return t.replace(/\ufb02\xb0\xb0/g,"&#").replace(/\ufb02\xb0/g,"&").replace(/\xb6\xdf/g,";")}),"decodeEntities"),Y=(0,n.K2)(((t,e,{counter:r=0,prefix:n,suffix:i})=>`${n?`${n}_`:""}${t}_${e}_${r}${i?`_${i}`:""}`),"getEdgeId");function G(t){return t??null}(0,n.K2)(G,"handleUndefinedAttr")},45567:(t,e,r)=>{"use strict";r.d(e,{C0:()=>S,VA:()=>y,K2:()=>m,xA:()=>ut,hH:()=>$,Dl:()=>Pt,IU:()=>re,Wt:()=>Xt,Y2:()=>Kt,a$:()=>Ht,sb:()=>J,ME:()=>pe,UI:()=>Z,Ch:()=>T,mW:()=>A,DB:()=>v,_3:()=>Lt,EJ:()=>w,m7:()=>oe,iN:()=>ie,zj:()=>ct,D7:()=>ue,Gs:()=>be,J$:()=>L,ab:()=>le,Q2:()=>st,P$:()=>z,Wi:()=>Rt,H1:()=>yt,Rm:()=>b,QO:()=>Et,Js:()=>xe,Xd:()=>M,VJ:()=>zt,cL:()=>dt,$i:()=>X,jZ:()=>vt,oB:()=>fe,wZ:()=>at,EI:()=>ae,SV:()=>ne,Nk:()=>lt,XV:()=>de,ke:()=>se,He:()=>k,UU:()=>it,ot:()=>Ut,mj:()=>ge,tM:()=>Zt,H$:()=>H,B6:()=>ot});var n=r(74353),i=r(74886),a=r(8232);const o=(t,e)=>{const r=i.A.parse(t),n={};for(const i in e)e[i]&&(n[i]=r[i]+e[i]);return(0,a.A)(t,n)};var s=r(25582);const l=(t,e,r=50)=>{const{r:n,g:a,b:o,a:l}=i.A.parse(t),{r:c,g:h,b:u,a:d}=i.A.parse(e),p=r/100,f=2*p-1,g=l-d,m=((f*g==-1?f:(f+g)/(1+f*g))+1)/2,y=1-m,x=n*m+c*y,b=a*m+h*y,k=o*m+u*y,C=l*p+d*(1-p);return(0,s.A)(x,b,k,C)},c=(t,e=100)=>{const r=i.A.parse(t);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,l(r,t,e)};var h,u=r(75263),d=r(78041),p=r(3219),f=r(42838),g=Object.defineProperty,m=(t,e)=>g(t,"name",{value:e,configurable:!0}),y=(t,e)=>{for(var r in e)g(t,r,{get:e[r],enumerable:!0})},x={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},b={trace:m(((...t)=>{}),"trace"),debug:m(((...t)=>{}),"debug"),info:m(((...t)=>{}),"info"),warn:m(((...t)=>{}),"warn"),error:m(((...t)=>{}),"error"),fatal:m(((...t)=>{}),"fatal")},k=m((function(t="fatal"){let e=x.fatal;"string"==typeof t?t.toLowerCase()in x&&(e=x[t]):"number"==typeof t&&(e=t),b.trace=()=>{},b.debug=()=>{},b.info=()=>{},b.warn=()=>{},b.error=()=>{},b.fatal=()=>{},e<=x.fatal&&(b.fatal=console.error?console.error.bind(console,C("FATAL"),"color: orange"):console.log.bind(console,"\x1b[35m",C("FATAL"))),e<=x.error&&(b.error=console.error?console.error.bind(console,C("ERROR"),"color: orange"):console.log.bind(console,"\x1b[31m",C("ERROR"))),e<=x.warn&&(b.warn=console.warn?console.warn.bind(console,C("WARN"),"color: orange"):console.log.bind(console,"\x1b[33m",C("WARN"))),e<=x.info&&(b.info=console.info?console.info.bind(console,C("INFO"),"color: lightblue"):console.log.bind(console,"\x1b[34m",C("INFO"))),e<=x.debug&&(b.debug=console.debug?console.debug.bind(console,C("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1b[32m",C("DEBUG"))),e<=x.trace&&(b.trace=console.debug?console.debug.bind(console,C("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1b[32m",C("TRACE")))}),"setLogLevel"),C=m((t=>`%c${n().format("ss.SSS")} : ${t} : `),"format"),w=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,v=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,_=/\s*%%.*\n/gm,S=class extends Error{static{m(this,"UnknownDiagramError")}constructor(t){super(t),this.name="UnknownDiagramError"}},A={},T=m((function(t,e){t=t.replace(w,"").replace(v,"").replace(_,"\n");for(const[r,{detector:n}]of Object.entries(A)){if(n(t,e))return r}throw new S(`No diagram type detected matching given configuration for text: ${t}`)}),"detectType"),M=m(((...t)=>{for(const{id:e,detector:r,loader:n}of t)B(e,r,n)}),"registerLazyLoadedDiagrams"),B=m(((t,e,r)=>{A[t]&&b.warn(`Detector with key ${t} already exists. Overwriting.`),A[t]={detector:e,loader:r},b.debug(`Detector with key ${t} added${r?" with loader":""}`)}),"addDetector"),L=m((t=>A[t].loader),"getDiagramLoader"),F=m(((t,e,{depth:r=2,clobber:n=!1}={})=>{const i={depth:r,clobber:n};return Array.isArray(e)&&!Array.isArray(t)?(e.forEach((e=>F(t,e,i))),t):Array.isArray(e)&&Array.isArray(t)?(e.forEach((e=>{t.includes(e)||t.push(e)})),t):void 0===t||r<=0?null!=t&&"object"==typeof t&&"object"==typeof e?Object.assign(t,e):e:(void 0!==e&&"object"==typeof t&&"object"==typeof e&&Object.keys(e).forEach((i=>{"object"!=typeof e[i]||void 0!==t[i]&&"object"!=typeof t[i]?(n||"object"!=typeof t[i]&&"object"!=typeof e[i])&&(t[i]=e[i]):(void 0===t[i]&&(t[i]=Array.isArray(e[i])?[]:{}),t[i]=F(t[i],e[i],{depth:r-1,clobber:n}))})),t)}),"assignWithDepth"),$=F,E="#ffffff",j="#f2f2f2",N=m(((t,e)=>o(t,e?{s:-40,l:10}:{s:-40,l:-10})),"mkBorder"),D=class{static{m(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||o(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||o(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||N(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||N(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||N(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||N(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||c(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||c(this.tertiaryColor),this.lineColor=this.lineColor||c(this.background),this.arrowheadColor=this.arrowheadColor||c(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?(0,u.A)(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||(0,u.A)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||c(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||(0,d.A)(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||o(this.primaryColor,{h:30}),this.cScale4=this.cScale4||o(this.primaryColor,{h:60}),this.cScale5=this.cScale5||o(this.primaryColor,{h:90}),this.cScale6=this.cScale6||o(this.primaryColor,{h:120}),this.cScale7=this.cScale7||o(this.primaryColor,{h:150}),this.cScale8=this.cScale8||o(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||o(this.primaryColor,{h:270}),this.cScale10=this.cScale10||o(this.primaryColor,{h:300}),this.cScale11=this.cScale11||o(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}},O=m((t=>{const e=new D;return e.calculate(t),e}),"getThemeVariables"),I=class{static{m(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=(0,d.A)(this.primaryColor,16),this.tertiaryColor=o(this.primaryColor,{h:-160}),this.primaryBorderColor=c(this.background),this.secondaryBorderColor=N(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=N(this.tertiaryColor,this.darkMode),this.primaryTextColor=c(this.primaryColor),this.secondaryTextColor=c(this.secondaryColor),this.tertiaryTextColor=c(this.tertiaryColor),this.lineColor=c(this.background),this.textColor=c(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=(0,d.A)(c("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=(0,s.A)(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.sectionBkgColor=(0,u.A)("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=(0,u.A)(this.sectionBkgColor,10),this.taskBorderColor=(0,s.A)(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=(0,s.A)(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){this.secondBkg=(0,d.A)(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=(0,d.A)(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=(0,d.A)(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=this.darkTextColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=o(this.primaryColor,{h:64}),this.fillType3=o(this.secondaryColor,{h:64}),this.fillType4=o(this.primaryColor,{h:-64}),this.fillType5=o(this.secondaryColor,{h:-64}),this.fillType6=o(this.primaryColor,{h:128}),this.fillType7=o(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||o(this.primaryColor,{h:30}),this.cScale4=this.cScale4||o(this.primaryColor,{h:60}),this.cScale5=this.cScale5||o(this.primaryColor,{h:90}),this.cScale6=this.cScale6||o(this.primaryColor,{h:120}),this.cScale7=this.cScale7||o(this.primaryColor,{h:150}),this.cScale8=this.cScale8||o(this.primaryColor,{h:210}),this.cScale9=this.cScale9||o(this.primaryColor,{h:270}),this.cScale10=this.cScale10||o(this.primaryColor,{h:300}),this.cScale11=this.cScale11||o(this.primaryColor,{h:330});for(let t=0;t{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}},R=m((t=>{const e=new I;return e.calculate(t),e}),"getThemeVariables"),P=class{static{m(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=o(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=o(this.primaryColor,{h:-160}),this.primaryBorderColor=N(this.primaryColor,this.darkMode),this.secondaryBorderColor=N(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=N(this.tertiaryColor,this.darkMode),this.primaryTextColor=c(this.primaryColor),this.secondaryTextColor=c(this.secondaryColor),this.tertiaryTextColor=c(this.tertiaryColor),this.lineColor=c(this.background),this.textColor=c(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.sectionBkgColor=(0,s.A)(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||o(this.primaryColor,{h:30}),this.cScale4=this.cScale4||o(this.primaryColor,{h:60}),this.cScale5=this.cScale5||o(this.primaryColor,{h:90}),this.cScale6=this.cScale6||o(this.primaryColor,{h:120}),this.cScale7=this.cScale7||o(this.primaryColor,{h:150}),this.cScale8=this.cScale8||o(this.primaryColor,{h:210}),this.cScale9=this.cScale9||o(this.primaryColor,{h:270}),this.cScale10=this.cScale10||o(this.primaryColor,{h:300}),this.cScale11=this.cScale11||o(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||(0,u.A)(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||(0,u.A)(this.tertiaryColor,40);for(let t=0;t{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}},z=m((t=>{const e=new P;return e.calculate(t),e}),"getThemeVariables"),K=class{static{m(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=(0,d.A)("#cde498",10),this.primaryBorderColor=N(this.primaryColor,this.darkMode),this.secondaryBorderColor=N(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=N(this.tertiaryColor,this.darkMode),this.primaryTextColor=c(this.primaryColor),this.secondaryTextColor=c(this.secondaryColor),this.tertiaryTextColor=c(this.primaryColor),this.lineColor=c(this.background),this.textColor=c(this.background),this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.actorBorder=(0,u.A)(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||o(this.primaryColor,{h:30}),this.cScale4=this.cScale4||o(this.primaryColor,{h:60}),this.cScale5=this.cScale5||o(this.primaryColor,{h:90}),this.cScale6=this.cScale6||o(this.primaryColor,{h:120}),this.cScale7=this.cScale7||o(this.primaryColor,{h:150}),this.cScale8=this.cScale8||o(this.primaryColor,{h:210}),this.cScale9=this.cScale9||o(this.primaryColor,{h:270}),this.cScale10=this.cScale10||o(this.primaryColor,{h:300}),this.cScale11=this.cScale11||o(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||(0,u.A)(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||(0,u.A)(this.tertiaryColor,40);for(let t=0;t{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}},q=m((t=>{const e=new K;return e.calculate(t),e}),"getThemeVariables"),W=class{static{m(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=(0,d.A)(this.contrast,55),this.background="#ffffff",this.tertiaryColor=o(this.primaryColor,{h:-160}),this.primaryBorderColor=N(this.primaryColor,this.darkMode),this.secondaryBorderColor=N(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=N(this.tertiaryColor,this.darkMode),this.primaryTextColor=c(this.primaryColor),this.secondaryTextColor=c(this.secondaryColor),this.tertiaryTextColor=c(this.tertiaryColor),this.lineColor=c(this.background),this.textColor=c(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.secondBkg=(0,d.A)(this.contrast,55),this.border2=this.contrast,this.actorBorder=(0,d.A)(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let t=0;t{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}},H={base:{getThemeVariables:O},dark:{getThemeVariables:R},default:{getThemeVariables:z},forest:{getThemeVariables:q},neutral:{getThemeVariables:m((t=>{const e=new W;return e.calculate(t),e}),"getThemeVariables")}},U={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"]},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:""},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},Y={...U,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF"},themeCSS:void 0,themeVariables:H.default.getThemeVariables(),sequence:{...U.sequence,messageFont:m((function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}}),"messageFont"),noteFont:m((function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}}),"noteFont"),actorFont:m((function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}}),"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...U.gantt,tickInterval:void 0,useWidth:void 0},c4:{...U.c4,useWidth:void 0,personFont:m((function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}}),"personFont"),external_personFont:m((function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}}),"external_personFont"),systemFont:m((function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}}),"systemFont"),external_systemFont:m((function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}}),"external_systemFont"),system_dbFont:m((function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}}),"system_dbFont"),external_system_dbFont:m((function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}}),"external_system_dbFont"),system_queueFont:m((function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}}),"system_queueFont"),external_system_queueFont:m((function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}}),"external_system_queueFont"),containerFont:m((function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}}),"containerFont"),external_containerFont:m((function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}}),"external_containerFont"),container_dbFont:m((function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}}),"container_dbFont"),external_container_dbFont:m((function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}}),"external_container_dbFont"),container_queueFont:m((function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}}),"container_queueFont"),external_container_queueFont:m((function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}}),"external_container_queueFont"),componentFont:m((function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}}),"componentFont"),external_componentFont:m((function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}}),"external_componentFont"),component_dbFont:m((function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}}),"component_dbFont"),external_component_dbFont:m((function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}}),"external_component_dbFont"),component_queueFont:m((function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}}),"component_queueFont"),external_component_queueFont:m((function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}}),"external_component_queueFont"),boundaryFont:m((function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}}),"boundaryFont"),messageFont:m((function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}}),"messageFont")},pie:{...U.pie,useWidth:984},xyChart:{...U.xyChart,useWidth:void 0},requirement:{...U.requirement,useWidth:void 0},packet:{...U.packet}},G=m(((t,e="")=>Object.keys(t).reduce(((r,n)=>Array.isArray(t[n])?r:"object"==typeof t[n]&&null!==t[n]?[...r,e+n,...G(t[n],"")]:[...r,e+n]),[])),"keyify"),V=new Set(G(Y,"")),Z=Y,X=m((t=>{if(b.debug("sanitizeDirective called with",t),"object"==typeof t&&null!=t)if(Array.isArray(t))t.forEach((t=>X(t)));else{for(const e of Object.keys(t)){if(b.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!V.has(e)||null==t[e]){b.debug("sanitize deleting key: ",e),delete t[e];continue}if("object"==typeof t[e]){b.debug("sanitizing object",e),X(t[e]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const n of r)e.includes(n)&&(b.debug("sanitizing css option",e),t[e]=Q(t[e]))}if(t.themeVariables)for(const e of Object.keys(t.themeVariables)){const r=t.themeVariables[e];r?.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[e]="")}b.debug("After sanitization",t)}}),"sanitizeDirective"),Q=m((t=>{let e=0,r=0;for(const n of t){if(e{let r=$({},t),n={};for(const i of e)ht(i),n=$(n,i);if(r=$(r,n),n.theme&&n.theme in H){const t=$({},h),e=$(t.themeVariables||{},n.themeVariables);r.theme&&r.theme in H&&(r.themeVariables=H[r.theme].getThemeVariables(e))}return mt(rt=r),rt}),"updateCurrentConfig"),it=m((t=>(tt=$({},J),tt=$(tt,t),t.theme&&H[t.theme]&&(tt.themeVariables=H[t.theme].getThemeVariables(t.themeVariables)),nt(tt,et),tt)),"setSiteConfig"),at=m((t=>{h=$({},t)}),"saveConfigFromInitialize"),ot=m((t=>(tt=$(tt,t),nt(tt,et),tt)),"updateSiteConfig"),st=m((()=>$({},tt)),"getSiteConfig"),lt=m((t=>(mt(t),$(rt,t),ct())),"setConfig"),ct=m((()=>$({},rt)),"getConfig"),ht=m((t=>{t&&(["secure",...tt.secure??[]].forEach((e=>{Object.hasOwn(t,e)&&(b.debug(`Denied attempt to modify a secure key ${e}`,t[e]),delete t[e])})),Object.keys(t).forEach((e=>{e.startsWith("__")&&delete t[e]})),Object.keys(t).forEach((e=>{"string"==typeof t[e]&&(t[e].includes("<")||t[e].includes(">")||t[e].includes("url(data:"))&&delete t[e],"object"==typeof t[e]&&ht(t[e])})))}),"sanitize"),ut=m((t=>{X(t),t.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables={...t.themeVariables,fontFamily:t.fontFamily}),et.push(t),nt(tt,et)}),"addDirective"),dt=m(((t=tt)=>{nt(t,et=[])}),"reset"),pt={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},ft={},gt=m((t=>{ft[t]||(b.warn(pt[t]),ft[t]=!0)}),"issueWarning"),mt=m((t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&>("LAZY_LOAD_DEPRECATED")}),"checkConfig"),yt=//gi,xt=m((t=>{if(!t)return[""];return Mt(t).replace(/\\n/g,"#br#").split("#br#")}),"getRows"),bt=(()=>{let t=!1;return()=>{t||(kt(),t=!0)}})();function kt(){const t="data-temp-href-target";f.addHook("beforeSanitizeAttributes",(e=>{"A"===e.tagName&&e.hasAttribute("target")&&e.setAttribute(t,e.getAttribute("target")??"")})),f.addHook("afterSanitizeAttributes",(e=>{"A"===e.tagName&&e.hasAttribute(t)&&(e.setAttribute("target",e.getAttribute(t)??""),e.removeAttribute(t),"_blank"===e.getAttribute("target")&&e.setAttribute("rel","noopener"))}))}m(kt,"setupDompurifyHooks");var Ct=m((t=>{bt();return f.sanitize(t)}),"removeScript"),wt=m(((t,e)=>{if(!1!==e.flowchart?.htmlLabels){const r=e.securityLevel;"antiscript"===r||"strict"===r?t=Ct(t):"loose"!==r&&(t=(t=(t=Mt(t)).replace(//g,">")).replace(/=/g,"="),t=Tt(t))}return t}),"sanitizeMore"),vt=m(((t,e)=>t?t=e.dompurifyConfig?f.sanitize(wt(t,e),e.dompurifyConfig).toString():f.sanitize(wt(t,e),{FORBID_TAGS:["style"]}).toString():t),"sanitizeText"),_t=m(((t,e)=>"string"==typeof t?vt(t,e):t.flat().map((t=>vt(t,e)))),"sanitizeTextOrArray"),St=m((t=>yt.test(t)),"hasBreaks"),At=m((t=>t.split(yt)),"splitBreaks"),Tt=m((t=>t.replace(/#br#/g,"
")),"placeholderToBreak"),Mt=m((t=>t.replace(yt,"#br#")),"breakToPlaceholder"),Bt=m((t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=e.replaceAll(/\(/g,"\\("),e=e.replaceAll(/\)/g,"\\)")),e}),"getUrl"),Lt=m((t=>!1!==t&&!["false","null","0"].includes(String(t).trim().toLowerCase())),"evaluate"),Ft=m((function(...t){const e=t.filter((t=>!isNaN(t)));return Math.max(...e)}),"getMax"),$t=m((function(...t){const e=t.filter((t=>!isNaN(t)));return Math.min(...e)}),"getMin"),Et=m((function(t){const e=t.split(/(,)/),r=[];for(let n=0;n0&&n+1Math.max(0,t.split(e).length-1)),"countOccurrence"),Nt=m(((t,e)=>{const r=jt(t,"~"),n=jt(e,"~");return 1===r&&1===n}),"shouldCombineSets"),Dt=m((t=>{const e=jt(t,"~");let r=!1;if(e<=1)return t;e%2!=0&&t.startsWith("~")&&(t=t.substring(1),r=!0);const n=[...t];let i=n.indexOf("~"),a=n.lastIndexOf("~");for(;-1!==i&&-1!==a&&i!==a;)n[i]="<",n[a]=">",i=n.indexOf("~"),a=n.lastIndexOf("~");return r&&n.unshift("~"),n.join("")}),"processSet"),Ot=m((()=>void 0!==window.MathMLElement),"isMathMLSupported"),It=/\$\$(.*)\$\$/g,Rt=m((t=>(t.match(It)?.length??0)>0),"hasKatex"),Pt=m((async(t,e)=>{t=await zt(t,e);const r=document.createElement("div");r.innerHTML=t,r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";const n=document.querySelector("body");n?.insertAdjacentElement("beforeend",r);const i={width:r.clientWidth,height:r.clientHeight};return r.remove(),i}),"calculateMathMLDimensions"),zt=m((async(t,e)=>{if(!Rt(t))return t;if(!(Ot()||e.legacyMathML||e.forceLegacyMathML))return t.replace(It,"MathML is unsupported in this environment.");const{default:n}=await r.e(2130).then(r.bind(r,22130)),i=e.forceLegacyMathML||!Ot()&&e.legacyMathML?"htmlAndMathml":"mathml";return t.split(yt).map((t=>Rt(t)?`
${t}
`:`
${t}
`)).join("").replace(It,((t,e)=>n.renderToString(e,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(//g,"")))}),"renderKatex"),Kt={getRows:xt,sanitizeText:vt,sanitizeTextOrArray:_t,hasBreaks:St,splitBreaks:At,lineBreakRegex:yt,removeScript:Ct,getUrl:Bt,evaluate:Lt,getMax:Ft,getMin:$t},qt=m((function(t,e){for(let r of e)t.attr(r[0],r[1])}),"d3Attrs"),Wt=m((function(t,e,r){let n=new Map;return r?(n.set("width","100%"),n.set("style",`max-width: ${e}px;`)):(n.set("height",t),n.set("width",e)),n}),"calculateSvgSizeAttrs"),Ht=m((function(t,e,r,n){const i=Wt(e,r,n);qt(t,i)}),"configureSvgSize"),Ut=m((function(t,e,r,n){const i=e.node().getBBox(),a=i.width,o=i.height;b.info(`SVG bounds: ${a}x${o}`,i);let s=0,l=0;b.info(`Graph bounds: ${s}x${l}`,t),s=a+2*r,l=o+2*r,b.info(`Calculated bounds: ${s}x${l}`),Ht(e,l,s,n);const c=`${i.x-r} ${i.y-r} ${i.width+2*r} ${i.height+2*r}`;e.attr("viewBox",c)}),"setupGraphViewbox"),Yt={},Gt=m(((t,e,r)=>{let n="";return t in Yt&&Yt[t]?n=Yt[t](r):b.warn(`No theme found for ${t}`),` & {\n font-family: ${r.fontFamily};\n font-size: ${r.fontSize};\n fill: ${r.textColor}\n }\n\n /* Classes common for multiple diagrams */\n\n & .error-icon {\n fill: ${r.errorBkgColor};\n }\n & .error-text {\n fill: ${r.errorTextColor};\n stroke: ${r.errorTextColor};\n }\n\n & .edge-thickness-normal {\n stroke-width: 1px;\n }\n & .edge-thickness-thick {\n stroke-width: 3.5px\n }\n & .edge-pattern-solid {\n stroke-dasharray: 0;\n }\n & .edge-thickness-invisible {\n stroke-width: 0;\n fill: none;\n }\n & .edge-pattern-dashed{\n stroke-dasharray: 3;\n }\n .edge-pattern-dotted {\n stroke-dasharray: 2;\n }\n\n & .marker {\n fill: ${r.lineColor};\n stroke: ${r.lineColor};\n }\n & .marker.cross {\n stroke: ${r.lineColor};\n }\n\n & svg {\n font-family: ${r.fontFamily};\n font-size: ${r.fontSize};\n }\n & p {\n margin: 0\n }\n\n ${n}\n\n ${e}\n`}),"getStyles"),Vt=m(((t,e)=>{void 0!==e&&(Yt[t]=e)}),"addStylesForDiagram"),Zt=Gt,Xt={};y(Xt,{clear:()=>re,getAccDescription:()=>oe,getAccTitle:()=>ie,getDiagramTitle:()=>le,setAccDescription:()=>ae,setAccTitle:()=>ne,setDiagramTitle:()=>se});var Qt="",Jt="",te="",ee=m((t=>vt(t,ct())),"sanitizeText"),re=m((()=>{Qt="",te="",Jt=""}),"clear"),ne=m((t=>{Qt=ee(t).replace(/^\s+/g,"")}),"setAccTitle"),ie=m((()=>Qt),"getAccTitle"),ae=m((t=>{te=ee(t).replace(/\n\s+/g,"\n")}),"setAccDescription"),oe=m((()=>te),"getAccDescription"),se=m((t=>{Jt=ee(t)}),"setDiagramTitle"),le=m((()=>Jt),"getDiagramTitle"),ce=b,he=k,ue=ct,de=lt,pe=J,fe=m((t=>vt(t,ue())),"sanitizeText"),ge=Ut,me=m((()=>Xt),"getCommonDb"),ye={},xe=m(((t,e,r)=>{ye[t]&&ce.warn(`Diagram with id ${t} already registered. Overwriting.`),ye[t]=e,r&&B(t,r),Vt(t,e.styles),e.injectUtils?.(ce,he,ue,fe,ge,me(),(()=>{}))}),"registerDiagram"),be=m((t=>{if(t in ye)return ye[t];throw new ke(t)}),"getDiagram"),ke=class extends Error{static{m(this,"DiagramNotFoundError")}constructor(t){super(`Diagram ${t} not found.`)}}},79515:(t,e,r)=>{"use strict";r.d(e,{H:()=>rr,r:()=>er});var n=r(45567);function i(t){return null==t}function a(t){return"object"==typeof t&&null!==t}function o(t){return Array.isArray(t)?t:i(t)?[]:[t]}function s(t,e){var r,n,i,a;if(e)for(r=0,n=(a=Object.keys(e)).length;rs&&(e=n-s+(a=" ... ").length),r-n>s&&(r=n+s-(o=" ...").length),{str:a+t.slice(e,r).replace(/\t/g,"\u2192")+o,pos:n-e+a.length}}function g(t,e){return h.repeat(" ",e-t.length)+t}function m(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),"number"!=typeof e.indent&&(e.indent=1),"number"!=typeof e.linesBefore&&(e.linesBefore=3),"number"!=typeof e.linesAfter&&(e.linesAfter=2);for(var r,n=/\r?\n|\r|\0/g,i=[0],a=[],o=-1;r=n.exec(t.buffer);)a.push(r.index),i.push(r.index+r[0].length),t.position<=r.index&&o<0&&(o=i.length-2);o<0&&(o=i.length-1);var s,l,c="",u=Math.min(t.line+e.linesAfter,a.length).toString().length,d=e.maxLength-(e.indent+u+3);for(s=1;s<=e.linesBefore&&!(o-s<0);s++)l=f(t.buffer,i[o-s],a[o-s],t.position-(i[o]-i[o-s]),d),c=h.repeat(" ",e.indent)+g((t.line-s+1).toString(),u)+" | "+l.str+"\n"+c;for(l=f(t.buffer,i[o],a[o],t.position,d),c+=h.repeat(" ",e.indent)+g((t.line+1).toString(),u)+" | "+l.str+"\n",c+=h.repeat("-",e.indent+u+3+l.pos)+"^\n",s=1;s<=e.linesAfter&&!(o+s>=a.length);s++)l=f(t.buffer,i[o+s],a[o+s],t.position-(i[o]-i[o+s]),d),c+=h.repeat(" ",e.indent)+g((t.line+s+1).toString(),u)+" | "+l.str+"\n";return c.replace(/\n$/,"")}(0,n.K2)(f,"getLine"),(0,n.K2)(g,"padStart"),(0,n.K2)(m,"makeSnippet");var y=m,x=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],b=["scalar","sequence","mapping"];function k(t){var e={};return null!==t&&Object.keys(t).forEach((function(r){t[r].forEach((function(t){e[String(t)]=r}))})),e}function C(t,e){if(e=e||{},Object.keys(e).forEach((function(e){if(-1===x.indexOf(e))throw new p('Unknown option "'+e+'" is met in definition of "'+t+'" YAML type.')})),this.options=e,this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(t){return t},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=k(e.styleAliases||null),-1===b.indexOf(this.kind))throw new p('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}(0,n.K2)(k,"compileStyleAliases"),(0,n.K2)(C,"Type$1");var w=C;function v(t,e){var r=[];return t[e].forEach((function(t){var e=r.length;r.forEach((function(r,n){r.tag===t.tag&&r.kind===t.kind&&r.multi===t.multi&&(e=n)})),r[e]=t})),r}function _(){var t,e,r={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function i(t){t.multi?(r.multi[t.kind].push(t),r.multi.fallback.push(t)):r[t.kind][t.tag]=r.fallback[t.tag]=t}for((0,n.K2)(i,"collectType"),t=0,e=arguments.length;t=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)}),"binary"),octal:(0,n.K2)((function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)}),"octal"),decimal:(0,n.K2)((function(t){return t.toString(10)}),"decimal"),hexadecimal:(0,n.K2)((function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)}),"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),K=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function q(t){return null!==t&&!(!K.test(t)||"_"===t[t.length-1])}function W(t){var e,r;return r="-"===(e=t.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),".inf"===e?1===r?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===e?NaN:r*parseFloat(e,10)}(0,n.K2)(q,"resolveYamlFloat"),(0,n.K2)(W,"constructYamlFloat");var H=/^[-+]?[0-9]+e/;function U(t,e){var r;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(h.isNegativeZero(t))return"-0.0";return r=t.toString(10),H.test(r)?r.replace("e",".e"):r}function Y(t){return"[object Number]"===Object.prototype.toString.call(t)&&(t%1!=0||h.isNegativeZero(t))}(0,n.K2)(U,"representYamlFloat"),(0,n.K2)(Y,"isFloat");var G=new w("tag:yaml.org,2002:float",{kind:"scalar",resolve:q,construct:W,predicate:Y,represent:U,defaultStyle:"lowercase"}),V=A.extend({implicit:[L,j,z,G]}),Z=V,X=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Q=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function J(t){return null!==t&&(null!==X.exec(t)||null!==Q.exec(t))}function tt(t){var e,r,n,i,a,o,s,l,c=0,h=null;if(null===(e=X.exec(t))&&(e=Q.exec(t)),null===e)throw new Error("Date resolve error");if(r=+e[1],n=+e[2]-1,i=+e[3],!e[4])return new Date(Date.UTC(r,n,i));if(a=+e[4],o=+e[5],s=+e[6],e[7]){for(c=e[7].slice(0,3);c.length<3;)c+="0";c=+c}return e[9]&&(h=6e4*(60*+e[10]+ +(e[11]||0)),"-"===e[9]&&(h=-h)),l=new Date(Date.UTC(r,n,i,a,o,s,c)),h&&l.setTime(l.getTime()-h),l}function et(t){return t.toISOString()}(0,n.K2)(J,"resolveYamlTimestamp"),(0,n.K2)(tt,"constructYamlTimestamp"),(0,n.K2)(et,"representYamlTimestamp");var rt=new w("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:J,construct:tt,instanceOf:Date,represent:et});function nt(t){return"<<"===t||null===t}(0,n.K2)(nt,"resolveYamlMerge");var it=new w("tag:yaml.org,2002:merge",{kind:"scalar",resolve:nt}),at="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";function ot(t){if(null===t)return!1;var e,r,n=0,i=t.length,a=at;for(r=0;r64)){if(e<0)return!1;n+=6}return n%8==0}function st(t){var e,r,n=t.replace(/[\r\n=]/g,""),i=n.length,a=at,o=0,s=[];for(e=0;e>16&255),s.push(o>>8&255),s.push(255&o)),o=o<<6|a.indexOf(n.charAt(e));return 0===(r=i%4*6)?(s.push(o>>16&255),s.push(o>>8&255),s.push(255&o)):18===r?(s.push(o>>10&255),s.push(o>>2&255)):12===r&&s.push(o>>4&255),new Uint8Array(s)}function lt(t){var e,r,n="",i=0,a=t.length,o=at;for(e=0;e>18&63],n+=o[i>>12&63],n+=o[i>>6&63],n+=o[63&i]),i=(i<<8)+t[e];return 0===(r=a%3)?(n+=o[i>>18&63],n+=o[i>>12&63],n+=o[i>>6&63],n+=o[63&i]):2===r?(n+=o[i>>10&63],n+=o[i>>4&63],n+=o[i<<2&63],n+=o[64]):1===r&&(n+=o[i>>2&63],n+=o[i<<4&63],n+=o[64],n+=o[64]),n}function ct(t){return"[object Uint8Array]"===Object.prototype.toString.call(t)}(0,n.K2)(ot,"resolveYamlBinary"),(0,n.K2)(st,"constructYamlBinary"),(0,n.K2)(lt,"representYamlBinary"),(0,n.K2)(ct,"isBinary");var ht=new w("tag:yaml.org,2002:binary",{kind:"scalar",resolve:ot,construct:st,predicate:ct,represent:lt}),ut=Object.prototype.hasOwnProperty,dt=Object.prototype.toString;function pt(t){if(null===t)return!0;var e,r,n,i,a,o=[],s=t;for(e=0,r=s.length;e>10),56320+(t-65536&1023))}(0,n.K2)(Ft,"_class"),(0,n.K2)($t,"is_EOL"),(0,n.K2)(Et,"is_WHITE_SPACE"),(0,n.K2)(jt,"is_WS_OR_EOL"),(0,n.K2)(Nt,"is_FLOW_INDICATOR"),(0,n.K2)(Dt,"fromHexCode"),(0,n.K2)(Ot,"escapedHexLen"),(0,n.K2)(It,"fromDecimalCode"),(0,n.K2)(Rt,"simpleEscapeSequence"),(0,n.K2)(Pt,"charFromCodepoint");var zt,Kt=new Array(256),qt=new Array(256);for(zt=0;zt<256;zt++)Kt[zt]=Rt(zt)?1:0,qt[zt]=Rt(zt);function Wt(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||_t,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function Ht(t,e){var r={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return r.snippet=y(r),new p(e,r)}function Ut(t,e){throw Ht(t,e)}function Yt(t,e){t.onWarning&&t.onWarning.call(null,Ht(t,e))}(0,n.K2)(Wt,"State$1"),(0,n.K2)(Ht,"generateError"),(0,n.K2)(Ut,"throwError"),(0,n.K2)(Yt,"throwWarning");var Gt={YAML:(0,n.K2)((function(t,e,r){var n,i,a;null!==t.version&&Ut(t,"duplication of %YAML directive"),1!==r.length&&Ut(t,"YAML directive accepts exactly one argument"),null===(n=/^([0-9]+)\.([0-9]+)$/.exec(r[0]))&&Ut(t,"ill-formed argument of the YAML directive"),i=parseInt(n[1],10),a=parseInt(n[2],10),1!==i&&Ut(t,"unacceptable YAML version of the document"),t.version=r[0],t.checkLineBreaks=a<2,1!==a&&2!==a&&Yt(t,"unsupported YAML version of the document")}),"handleYamlDirective"),TAG:(0,n.K2)((function(t,e,r){var n,i;2!==r.length&&Ut(t,"TAG directive accepts exactly two arguments"),n=r[0],i=r[1],Bt.test(n)||Ut(t,"ill-formed tag handle (first argument) of the TAG directive"),St.call(t.tagMap,n)&&Ut(t,'there is a previously declared suffix for "'+n+'" tag handle'),Lt.test(i)||Ut(t,"ill-formed tag prefix (second argument) of the TAG directive");try{i=decodeURIComponent(i)}catch(a){Ut(t,"tag prefix is malformed: "+i)}t.tagMap[n]=i}),"handleTagDirective")};function Vt(t,e,r,n){var i,a,o,s;if(e1&&(t.result+=h.repeat("\n",e-1))}function re(t,e,r){var n,i,a,o,s,l,c,h,u=t.kind,d=t.result;if(jt(h=t.input.charCodeAt(t.position))||Nt(h)||35===h||38===h||42===h||33===h||124===h||62===h||39===h||34===h||37===h||64===h||96===h)return!1;if((63===h||45===h)&&(jt(n=t.input.charCodeAt(t.position+1))||r&&Nt(n)))return!1;for(t.kind="scalar",t.result="",i=a=t.position,o=!1;0!==h;){if(58===h){if(jt(n=t.input.charCodeAt(t.position+1))||r&&Nt(n))break}else if(35===h){if(jt(t.input.charCodeAt(t.position-1)))break}else{if(t.position===t.lineStart&&te(t)||r&&Nt(h))break;if($t(h)){if(s=t.line,l=t.lineStart,c=t.lineIndent,Jt(t,!1,-1),t.lineIndent>=e){o=!0,h=t.input.charCodeAt(t.position);continue}t.position=a,t.line=s,t.lineStart=l,t.lineIndent=c;break}}o&&(Vt(t,i,a,!1),ee(t,t.line-s),i=a=t.position,o=!1),Et(h)||(a=t.position+1),h=t.input.charCodeAt(++t.position)}return Vt(t,i,a,!1),!!t.result||(t.kind=u,t.result=d,!1)}function ne(t,e){var r,n,i;if(39!==(r=t.input.charCodeAt(t.position)))return!1;for(t.kind="scalar",t.result="",t.position++,n=i=t.position;0!==(r=t.input.charCodeAt(t.position));)if(39===r){if(Vt(t,n,t.position,!0),39!==(r=t.input.charCodeAt(++t.position)))return!0;n=t.position,t.position++,i=t.position}else $t(r)?(Vt(t,n,i,!0),ee(t,Jt(t,!1,e)),n=i=t.position):t.position===t.lineStart&&te(t)?Ut(t,"unexpected end of the document within a single quoted scalar"):(t.position++,i=t.position);Ut(t,"unexpected end of the stream within a single quoted scalar")}function ie(t,e){var r,n,i,a,o,s;if(34!==(s=t.input.charCodeAt(t.position)))return!1;for(t.kind="scalar",t.result="",t.position++,r=n=t.position;0!==(s=t.input.charCodeAt(t.position));){if(34===s)return Vt(t,r,t.position,!0),t.position++,!0;if(92===s){if(Vt(t,r,t.position,!0),$t(s=t.input.charCodeAt(++t.position)))Jt(t,!1,e);else if(s<256&&Kt[s])t.result+=qt[s],t.position++;else if((o=Ot(s))>0){for(i=o,a=0;i>0;i--)(o=Dt(s=t.input.charCodeAt(++t.position)))>=0?a=(a<<4)+o:Ut(t,"expected hexadecimal character");t.result+=Pt(a),t.position++}else Ut(t,"unknown escape sequence");r=n=t.position}else $t(s)?(Vt(t,r,n,!0),ee(t,Jt(t,!1,e)),r=n=t.position):t.position===t.lineStart&&te(t)?Ut(t,"unexpected end of the document within a double quoted scalar"):(t.position++,n=t.position)}Ut(t,"unexpected end of the stream within a double quoted scalar")}function ae(t,e){var r,n,i,a,o,s,l,c,h,u,d,p,f=!0,g=t.tag,m=t.anchor,y=Object.create(null);if(91===(p=t.input.charCodeAt(t.position)))o=93,c=!1,a=[];else{if(123!==p)return!1;o=125,c=!0,a={}}for(null!==t.anchor&&(t.anchorMap[t.anchor]=a),p=t.input.charCodeAt(++t.position);0!==p;){if(Jt(t,!0,e),(p=t.input.charCodeAt(t.position))===o)return t.position++,t.tag=g,t.anchor=m,t.kind=c?"mapping":"sequence",t.result=a,!0;f?44===p&&Ut(t,"expected the node content, but found ','"):Ut(t,"missed comma between flow collection entries"),d=null,s=l=!1,63===p&&jt(t.input.charCodeAt(t.position+1))&&(s=l=!0,t.position++,Jt(t,!0,e)),r=t.line,n=t.lineStart,i=t.position,de(t,e,1,!1,!0),u=t.tag,h=t.result,Jt(t,!0,e),p=t.input.charCodeAt(t.position),!l&&t.line!==r||58!==p||(s=!0,p=t.input.charCodeAt(++t.position),Jt(t,!0,e),de(t,e,1,!1,!0),d=t.result),c?Xt(t,a,y,u,h,d,r,n,i):s?a.push(Xt(t,null,y,u,h,d,r,n,i)):a.push(h),Jt(t,!0,e),44===(p=t.input.charCodeAt(t.position))?(f=!0,p=t.input.charCodeAt(++t.position)):f=!1}Ut(t,"unexpected end of the stream within a flow collection")}function oe(t,e){var r,n,i,a,o=1,s=!1,l=!1,c=e,u=0,d=!1;if(124===(a=t.input.charCodeAt(t.position)))n=!1;else{if(62!==a)return!1;n=!0}for(t.kind="scalar",t.result="";0!==a;)if(43===(a=t.input.charCodeAt(++t.position))||45===a)1===o?o=43===a?3:2:Ut(t,"repeat of a chomping mode identifier");else{if(!((i=It(a))>=0))break;0===i?Ut(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):l?Ut(t,"repeat of an indentation width identifier"):(c=e+i-1,l=!0)}if(Et(a)){do{a=t.input.charCodeAt(++t.position)}while(Et(a));if(35===a)do{a=t.input.charCodeAt(++t.position)}while(!$t(a)&&0!==a)}for(;0!==a;){for(Qt(t),t.lineIndent=0,a=t.input.charCodeAt(t.position);(!l||t.lineIndentc&&(c=t.lineIndent),$t(a))u++;else{if(t.lineIndente)&&0!==n)Ut(t,"bad indentation of a sequence entry");else if(t.lineIndente)&&(y&&(o=t.line,s=t.lineStart,l=t.position),de(t,e,4,!0,i)&&(y?g=t.result:m=t.result),y||(Xt(t,d,p,f,g,m,o,s,l),f=g=m=null),Jt(t,!0,-1),c=t.input.charCodeAt(t.position)),(t.line===a||t.lineIndent>e)&&0!==c)Ut(t,"bad indentation of a mapping entry");else if(t.lineIndente?f=1:t.lineIndent===e?f=0:t.lineIndente?f=1:t.lineIndent===e?f=0:t.lineIndent tag; it should be "scalar", not "'+t.kind+'"'),l=0,c=t.implicitTypes.length;l"),null!==t.result&&u.kind!==t.kind&&Ut(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+u.kind+'", not "'+t.kind+'"'),u.resolve(t.result,t.tag)?(t.result=u.construct(t.result,t.tag),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):Ut(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return null!==t.listener&&t.listener("close",t),null!==t.tag||null!==t.anchor||m}function pe(t){var e,r,n,i,a=t.position,o=!1;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);0!==(i=t.input.charCodeAt(t.position))&&(Jt(t,!0,-1),i=t.input.charCodeAt(t.position),!(t.lineIndent>0||37!==i));){for(o=!0,i=t.input.charCodeAt(++t.position),e=t.position;0!==i&&!jt(i);)i=t.input.charCodeAt(++t.position);for(n=[],(r=t.input.slice(e,t.position)).length<1&&Ut(t,"directive name must not be less than one character in length");0!==i;){for(;Et(i);)i=t.input.charCodeAt(++t.position);if(35===i){do{i=t.input.charCodeAt(++t.position)}while(0!==i&&!$t(i));break}if($t(i))break;for(e=t.position;0!==i&&!jt(i);)i=t.input.charCodeAt(++t.position);n.push(t.input.slice(e,t.position))}0!==i&&Qt(t),St.call(Gt,r)?Gt[r](t,r,n):Yt(t,'unknown document directive "'+r+'"')}Jt(t,!0,-1),0===t.lineIndent&&45===t.input.charCodeAt(t.position)&&45===t.input.charCodeAt(t.position+1)&&45===t.input.charCodeAt(t.position+2)?(t.position+=3,Jt(t,!0,-1)):o&&Ut(t,"directives end mark is expected"),de(t,t.lineIndent-1,4,!1,!0),Jt(t,!0,-1),t.checkLineBreaks&&Tt.test(t.input.slice(a,t.position))&&Yt(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&te(t)?46===t.input.charCodeAt(t.position)&&(t.position+=3,Jt(t,!0,-1)):t.position=55296&&n<=56319&&e+1=56320&&r<=57343?1024*(n-55296)+r-56320+65536:n}function Oe(t){return/^\n* /.test(t)}(0,n.K2)(Ae,"State"),(0,n.K2)(Te,"indentString"),(0,n.K2)(Me,"generateNextLine"),(0,n.K2)(Be,"testImplicitResolving"),(0,n.K2)(Le,"isWhitespace"),(0,n.K2)(Fe,"isPrintable"),(0,n.K2)($e,"isNsCharOrWhitespace"),(0,n.K2)(Ee,"isPlainSafe"),(0,n.K2)(je,"isPlainSafeFirst"),(0,n.K2)(Ne,"isPlainSafeLast"),(0,n.K2)(De,"codePointAt"),(0,n.K2)(Oe,"needIndentIndicator");function Ie(t,e,r,n,i,a,o,s){var l,c=0,h=null,u=!1,d=!1,p=-1!==n,f=-1,g=je(De(t,0))&&Ne(De(t,t.length-1));if(e||o)for(l=0;l=65536?l+=2:l++){if(!Fe(c=De(t,l)))return 5;g=g&&Ee(c,h,s),h=c}else{for(l=0;l=65536?l+=2:l++){if(10===(c=De(t,l)))u=!0,p&&(d=d||l-f-1>n&&" "!==t[f+1],f=l);else if(!Fe(c))return 5;g=g&&Ee(c,h,s),h=c}d=d||p&&l-f-1>n&&" "!==t[f+1]}return u||d?r>9&&Oe(t)?5:o?2===a?5:2:d?4:3:!g||o||i(t)?2===a?5:2:1}function Re(t,e,r,i,a){t.dump=function(){if(0===e.length)return 2===t.quotingType?'""':"''";if(!t.noCompatMode&&(-1!==we.indexOf(e)||ve.test(e)))return 2===t.quotingType?'"'+e+'"':"'"+e+"'";var o=t.indent*Math.max(1,r),s=-1===t.lineWidth?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-o),l=i||t.flowLevel>-1&&r>=t.flowLevel;function c(e){return Be(t,e)}switch((0,n.K2)(c,"testAmbiguity"),Ie(e,l,t.indent,s,c,t.quotingType,t.forceQuotes&&!i,a)){case 1:return e;case 2:return"'"+e.replace(/'/g,"''")+"'";case 3:return"|"+Pe(e,t.indent)+ze(Te(e,o));case 4:return">"+Pe(e,t.indent)+ze(Te(Ke(e,s),o));case 5:return'"'+We(e)+'"';default:throw new p("impossible error: invalid scalar style")}}()}function Pe(t,e){var r=Oe(t)?String(e):"",n="\n"===t[t.length-1];return r+(n&&("\n"===t[t.length-2]||"\n"===t)?"+":n?"":"-")+"\n"}function ze(t){return"\n"===t[t.length-1]?t.slice(0,-1):t}function Ke(t,e){for(var r,n,i,a=/(\n+)([^\n]*)/g,o=(r=-1!==(r=t.indexOf("\n"))?r:t.length,a.lastIndex=r,qe(t.slice(0,r),e)),s="\n"===t[0]||" "===t[0];i=a.exec(t);){var l=i[1],c=i[2];n=" "===c[0],o+=l+(s||n||""===c?"":"\n")+qe(c,e),s=n}return o}function qe(t,e){if(""===t||" "===t[0])return t;for(var r,n,i=/ [^ ]/g,a=0,o=0,s=0,l="";r=i.exec(t);)(s=r.index)-a>e&&(n=o>a?o:s,l+="\n"+t.slice(a,n),a=n+1),o=s;return l+="\n",t.length-a>e&&o>a?l+=t.slice(a,o)+"\n"+t.slice(o+1):l+=t.slice(a),l.slice(1)}function We(t){for(var e,r="",n=0,i=0;i=65536?i+=2:i++)n=De(t,i),!(e=Ce[n])&&Fe(n)?(r+=t[i],n>=65536&&(r+=t[i+1])):r+=e||Se(n);return r}function He(t,e,r){var n,i,a,o="",s=t.tag;for(n=0,i=r.length;n1024&&(s+="? "),s+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),Ze(t,e,o,!1,!1)&&(l+=s+=t.dump));t.tag=c,t.dump="{"+l+"}"}function Ge(t,e,r,n){var i,a,o,s,l,c,h="",u=t.tag,d=Object.keys(r);if(!0===t.sortKeys)d.sort();else if("function"==typeof t.sortKeys)d.sort(t.sortKeys);else if(t.sortKeys)throw new p("sortKeys must be a boolean or a function");for(i=0,a=d.length;i1024)&&(t.dump&&10===t.dump.charCodeAt(0)?c+="?":c+="? "),c+=t.dump,l&&(c+=Me(t,e)),Ze(t,e+1,s,!0,l)&&(t.dump&&10===t.dump.charCodeAt(0)?c+=":":c+=": ",h+=c+=t.dump));t.tag=u,t.dump=h||"{}"}function Ve(t,e,r){var n,i,a,o,s,l;for(a=0,o=(i=r?t.explicitTypes:t.implicitTypes).length;a tag resolver accepts not "'+l+'" style');n=s.represent[l](e,l)}t.dump=n}return!0}return!1}function Ze(t,e,r,n,i,a,o){t.tag=null,t.dump=r,Ve(t,r,!1)||Ve(t,r,!0);var s,l=xe.call(t.dump),c=n;n&&(n=t.flowLevel<0||t.flowLevel>e);var h,u,d="[object Object]"===l||"[object Array]"===l;if(d&&(u=-1!==(h=t.duplicates.indexOf(r))),(null!==t.tag&&"?"!==t.tag||u||2!==t.indent&&e>0)&&(i=!1),u&&t.usedDuplicates[h])t.dump="*ref_"+h;else{if(d&&u&&!t.usedDuplicates[h]&&(t.usedDuplicates[h]=!0),"[object Object]"===l)n&&0!==Object.keys(t.dump).length?(Ge(t,e,t.dump,i),u&&(t.dump="&ref_"+h+t.dump)):(Ye(t,e,t.dump),u&&(t.dump="&ref_"+h+" "+t.dump));else if("[object Array]"===l)n&&0!==t.dump.length?(t.noArrayIndent&&!o&&e>0?Ue(t,e-1,t.dump,i):Ue(t,e,t.dump,i),u&&(t.dump="&ref_"+h+t.dump)):(He(t,e,t.dump),u&&(t.dump="&ref_"+h+" "+t.dump));else{if("[object String]"!==l){if("[object Undefined]"===l)return!1;if(t.skipInvalid)return!1;throw new p("unacceptable kind of an object to dump "+l)}"?"!==t.tag&&Re(t,t.dump,e,a,c)}null!==t.tag&&"?"!==t.tag&&(s=encodeURI("!"===t.tag[0]?t.tag.slice(1):t.tag).replace(/!/g,"%21"),s="!"===t.tag[0]?"!"+s:"tag:yaml.org,2002:"===s.slice(0,18)?"!!"+s.slice(18):"!<"+s+">",t.dump=s+" "+t.dump)}return!0}function Xe(t,e){var r,n,i=[],a=[];for(Qe(t,i,a),r=0,n=a.length;r{"use strict";r.d(e,{IU:()=>m,Jo:()=>T,T_:()=>k,g0:()=>L,jP:()=>x});var n=r(5081),i=r(52294),a=r(62392),o=r(86825),s=r(85039),l=r(45567),c=r(20007),h=r(29893),u=(0,l.K2)(((t,e,r,n,i)=>{e.arrowTypeStart&&p(t,"start",e.arrowTypeStart,r,n,i),e.arrowTypeEnd&&p(t,"end",e.arrowTypeEnd,r,n,i)}),"addEdgeMarkers"),d={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},p=(0,l.K2)(((t,e,r,n,i,a)=>{const o=d[r];if(!o)return void l.Rm.warn(`Unknown arrow type: ${r}`);const s="start"===e?"Start":"End";t.attr(`marker-${e}`,`url(${n}#${i}_${a}-${o}${s})`)}),"addEdgeMarker"),f=new Map,g=new Map,m=(0,l.K2)((()=>{f.clear(),g.clear()}),"clear"),y=(0,l.K2)((t=>t?t.reduce(((t,e)=>t+";"+e),""):""),"getLabelStyles"),x=(0,l.K2)((async(t,e)=>{let r=(0,l._3)((0,l.D7)().flowchart.htmlLabels);const i=await(0,o.GZ)(t,e.label,{style:y(e.labelStyle),useHtmlLabels:r,addSvgBackground:!0,isNode:!1});l.Rm.info("abc82",e,e.labelType);const a=t.insert("g").attr("class","edgeLabel"),s=a.insert("g").attr("class","label");s.node().appendChild(i);let h,u=i.getBBox();if(r){const t=i.children[0],e=(0,c.Ltv)(i);u=t.getBoundingClientRect(),e.attr("width",u.width),e.attr("height",u.height)}if(s.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),f.set(e.id,a),e.width=u.width,e.height=u.height,e.startLabelLeft){const r=await(0,n.DA)(e.startLabelLeft,y(e.labelStyle)),i=t.insert("g").attr("class","edgeTerminals"),a=i.insert("g").attr("class","inner");h=a.node().appendChild(r);const o=r.getBBox();a.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),g.get(e.id)||g.set(e.id,{}),g.get(e.id).startLeft=i,b(h,e.startLabelLeft)}if(e.startLabelRight){const r=await(0,n.DA)(e.startLabelRight,y(e.labelStyle)),i=t.insert("g").attr("class","edgeTerminals"),a=i.insert("g").attr("class","inner");h=i.node().appendChild(r),a.node().appendChild(r);const o=r.getBBox();a.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),g.get(e.id)||g.set(e.id,{}),g.get(e.id).startRight=i,b(h,e.startLabelRight)}if(e.endLabelLeft){const r=await(0,n.DA)(e.endLabelLeft,y(e.labelStyle)),i=t.insert("g").attr("class","edgeTerminals"),a=i.insert("g").attr("class","inner");h=a.node().appendChild(r);const o=r.getBBox();a.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),i.node().appendChild(r),g.get(e.id)||g.set(e.id,{}),g.get(e.id).endLeft=i,b(h,e.endLabelLeft)}if(e.endLabelRight){const r=await(0,n.DA)(e.endLabelRight,y(e.labelStyle)),i=t.insert("g").attr("class","edgeTerminals"),a=i.insert("g").attr("class","inner");h=a.node().appendChild(r);const o=r.getBBox();a.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),i.node().appendChild(r),g.get(e.id)||g.set(e.id,{}),g.get(e.id).endRight=i,b(h,e.endLabelRight)}return i}),"insertEdgeLabel");function b(t,e){(0,l.D7)().flowchart.htmlLabels&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}(0,l.K2)(b,"setTerminalWidth");var k=(0,l.K2)(((t,e)=>{l.Rm.debug("Moving label abc88 ",t.id,t.label,f.get(t.id),e);let r=e.updatedPath?e.updatedPath:e.originalPath;const n=(0,l.D7)(),{subGraphTitleTotalMargin:i}=(0,a.O)(n);if(t.label){const n=f.get(t.id);let a=t.x,o=t.y;if(r){const n=s._K.calcLabelPosition(r);l.Rm.debug("Moving label "+t.label+" from (",a,",",o,") to (",n.x,",",n.y,") abc88"),e.updatedPath&&(a=n.x,o=n.y)}n.attr("transform",`translate(${a}, ${o+i/2})`)}if(t.startLabelLeft){const e=g.get(t.id).startLeft;let n=t.x,i=t.y;if(r){const e=s._K.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r);n=e.x,i=e.y}e.attr("transform",`translate(${n}, ${i})`)}if(t.startLabelRight){const e=g.get(t.id).startRight;let n=t.x,i=t.y;if(r){const e=s._K.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r);n=e.x,i=e.y}e.attr("transform",`translate(${n}, ${i})`)}if(t.endLabelLeft){const e=g.get(t.id).endLeft;let n=t.x,i=t.y;if(r){const e=s._K.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r);n=e.x,i=e.y}e.attr("transform",`translate(${n}, ${i})`)}if(t.endLabelRight){const e=g.get(t.id).endRight;let n=t.x,i=t.y;if(r){const e=s._K.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);n=e.x,i=e.y}e.attr("transform",`translate(${n}, ${i})`)}}),"positionEdgeLabel"),C=(0,l.K2)(((t,e)=>{const r=t.x,n=t.y,i=Math.abs(e.x-r),a=Math.abs(e.y-n),o=t.width/2,s=t.height/2;return i>=o||a>=s}),"outsideNode"),w=(0,l.K2)(((t,e,r)=>{l.Rm.debug(`intersection calc abc89:\n outsidePoint: ${JSON.stringify(e)}\n insidePoint : ${JSON.stringify(r)}\n node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);const n=t.x,i=t.y,a=Math.abs(n-r.x),o=t.width/2;let s=r.xMath.abs(n-e.x)*c){let t=r.y{l.Rm.warn("abc88 cutPathAtIntersect",t,e);let r=[],n=t[0],i=!1;return t.forEach((t=>{if(l.Rm.info("abc88 checking point",t,e),C(e,t)||i)l.Rm.warn("abc88 outside",t,n),n=t,i||r.push(t);else{const a=w(e,n,t);l.Rm.debug("abc88 inside",t,n,a),l.Rm.debug("abc88 intersection",a,e);let o=!1;r.forEach((t=>{o=o||t.x===a.x&&t.y===a.y})),r.some((t=>t.x===a.x&&t.y===a.y))?l.Rm.warn("abc88 no intersect",a,r):r.push(a),i=!0}})),l.Rm.debug("returning points",r),r}),"cutPathAtIntersect");function _(t){const e=[],r=[];for(let n=1;n5&&Math.abs(a.y-i.y)>5||i.y===a.y&&a.x===o.x&&Math.abs(a.x-i.x)>5&&Math.abs(a.y-o.y)>5)&&(e.push(a),r.push(n))}return{cornerPoints:e,cornerPointPositions:r}}(0,l.K2)(_,"extractCornerPoints");var S=(0,l.K2)((function(t,e,r){const n=e.x-t.x,i=e.y-t.y,a=r/Math.sqrt(n*n+i*i);return{x:e.x-a*n,y:e.y-a*i}}),"findAdjacentPoint"),A=(0,l.K2)((function(t){const{cornerPointPositions:e}=_(t),r=[];for(let n=0;n10&&Math.abs(i.y-e.y)>=10){l.Rm.debug("Corner point fixing",Math.abs(i.x-e.x),Math.abs(i.y-e.y));const t=5;d=a.x===o.x?{x:c<0?o.x-t+u:o.x+t-u,y:h<0?o.y-u:o.y+u}:{x:c<0?o.x-u:o.x+u,y:h<0?o.y-t+u:o.y+t-u}}else l.Rm.debug("Corner point skipping fixing",Math.abs(i.x-e.x),Math.abs(i.y-e.y));r.push(d,s)}else r.push(t[n]);return r}),"fixCorners"),T=(0,l.K2)((function(t,e,r,n,a,o,s){const{handDrawnSeed:d}=(0,l.D7)();let p=e.points,f=!1;const g=a;var m=o;m.intersect&&g.intersect&&(p=p.slice(1,e.points.length-1),p.unshift(g.intersect(p[0])),l.Rm.debug("Last point APA12",e.start,"--\x3e",e.end,p[p.length-1],m,m.intersect(p[p.length-1])),p.push(m.intersect(p[p.length-1]))),e.toCluster&&(l.Rm.info("to cluster abc88",r.get(e.toCluster)),p=v(e.points,r.get(e.toCluster).node),f=!0),e.fromCluster&&(l.Rm.debug("from cluster abc88",r.get(e.fromCluster),JSON.stringify(p,null,2)),p=v(p.reverse(),r.get(e.fromCluster).node).reverse(),f=!0);let y=p.filter((t=>!Number.isNaN(t.y)));y=A(y);let x=c.qrM;e.curve&&(x=e.curve);const{x:b,y:k}=(0,i.R)(e),C=(0,c.n8j)().x(b).y(k).curve(x);let w,_;switch(e.thickness){case"normal":default:w="edge-thickness-normal";break;case"thick":w="edge-thickness-thick";break;case"invisible":w="edge-thickness-invisible"}switch(e.pattern){case"solid":default:w+=" edge-pattern-solid";break;case"dotted":w+=" edge-pattern-dotted";break;case"dashed":w+=" edge-pattern-dashed"}let S=C(y);const T=Array.isArray(e.style)?e.style:[e.style];if("handDrawn"===e.look){const r=h.A.svg(t);Object.assign([],y);const n=r.path(S,{roughness:.3,seed:d});w+=" transition",_=(0,c.Ltv)(n).select("path").attr("id",e.id).attr("class"," "+w+(e.classes?" "+e.classes:"")).attr("style",T?T.reduce(((t,e)=>t+";"+e),""):"");let i=_.attr("d");_.attr("d",i),t.node().appendChild(_.node())}else _=t.append("path").attr("d",S).attr("id",e.id).attr("class"," "+w+(e.classes?" "+e.classes:"")).attr("style",T?T.reduce(((t,e)=>t+";"+e),""):"");let M="";((0,l.D7)().flowchart.arrowMarkerAbsolute||(0,l.D7)().state.arrowMarkerAbsolute)&&(M=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,M=M.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),l.Rm.info("arrowTypeStart",e.arrowTypeStart),l.Rm.info("arrowTypeEnd",e.arrowTypeEnd),u(_,e,M,s,n);let B={};return f&&(B.updatedPath=p),B.originalPath=e.points,B}),"insertEdge"),M=(0,l.K2)(((t,e,r,n)=>{e.forEach((e=>{B[e](t,r,n)}))}),"insertMarkers"),B={extension:(0,l.K2)(((t,e,r)=>{l.Rm.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")}),"extension"),composition:(0,l.K2)(((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")}),"composition"),aggregation:(0,l.K2)(((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")}),"aggregation"),dependency:(0,l.K2)(((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")}),"dependency"),lollipop:(0,l.K2)(((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)}),"lollipop"),point:(0,l.K2)(((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")}),"point"),circle:(0,l.K2)(((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")}),"circle"),cross:(0,l.K2)(((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")}),"cross"),barb:(0,l.K2)(((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")}),"barb")},L=M},79740:(t,e,r)=>{"use strict";r.d(e,{XX:()=>h,q7:()=>u,sO:()=>c});var n=r(6396),i=r(5081),a=r(85039),o=r(45567),s={common:o.Y2,getConfig:o.zj,insertCluster:i.U,insertEdge:n.Jo,insertEdgeLabel:n.jP,insertMarkers:n.g0,insertNode:i.on,interpolateToCurve:a.Ib,labelHelper:i.Zk,log:o.Rm,positionEdgeLabel:n.T_},l={},c=(0,o.K2)((t=>{for(const e of t)l[e.name]=e}),"registerLayoutLoaders");(0,o.K2)((()=>{c([{name:"dagre",loader:(0,o.K2)((async()=>await Promise.all([r.e(3624),r.e(2334),r.e(1477)]).then(r.bind(r,81477))),"loader")}])}),"registerDefaultLayoutLoaders")();var h=(0,o.K2)((async(t,e)=>{if(!(t.layoutAlgorithm in l))throw new Error(`Unknown layout algorithm: ${t.layoutAlgorithm}`);const r=l[t.layoutAlgorithm];return(await r.loader()).render(t,e,s,{algorithm:r.algorithm})}),"render"),u=(0,o.K2)(((t="",{fallback:e="dagre"}={})=>{if(t in l)return t;if(e in l)return o.Rm.warn(`Layout algorithm ${t} is not registered. Using ${e} as fallback.`),e;throw new Error(`Both layout algorithms ${t} and ${e} are not registered.`)}),"getRegisteredLayoutAlgorithm")},86825:(t,e,r)=>{"use strict";r.d(e,{W6:()=>Tt,GZ:()=>Ft,hE:()=>Lt});var n=r(85039),i=r(45567),a=r(20007);function o(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let s={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function l(t){s=t}const c=/[&<>"']/,h=new RegExp(c.source,"g"),u=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,d=new RegExp(u.source,"g"),p={"&":"&","<":"<",">":">",'"':""","'":"'"},f=t=>p[t];function g(t,e){if(e){if(c.test(t))return t.replace(h,f)}else if(u.test(t))return t.replace(d,f);return t}const m=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;const y=/(^|[^\[])\^/g;function x(t,e){let r="string"==typeof t?t:t.source;e=e||"";const n={replace:(t,e)=>{let i="string"==typeof e?e:e.source;return i=i.replace(y,"$1"),r=r.replace(t,i),n},getRegex:()=>new RegExp(r,e)};return n}function b(t){try{t=encodeURI(t).replace(/%25/g,"%")}catch{return null}return t}const k={exec:()=>null};function C(t,e){const r=t.replace(/\|/g,((t,e,r)=>{let n=!1,i=e;for(;--i>=0&&"\\"===r[i];)n=!n;return n?"|":" |"})).split(/ \|/);let n=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),e)if(r.length>e)r.splice(e);else for(;r.length0)return{type:"space",raw:e[0]}}code(t){const e=this.rules.block.code.exec(t);if(e){const t=e[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:w(t,"\n")}}}fences(t){const e=this.rules.block.fences.exec(t);if(e){const t=e[0],r=function(t,e){const r=t.match(/^(\s+)(?:```)/);if(null===r)return e;const n=r[1];return e.split("\n").map((t=>{const e=t.match(/^\s+/);if(null===e)return t;const[r]=e;return r.length>=n.length?t.slice(n.length):t})).join("\n")}(t,e[3]||"");return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:r}}}heading(t){const e=this.rules.block.heading.exec(t);if(e){let t=e[2].trim();if(/#$/.test(t)){const e=w(t,"#");this.options.pedantic?t=e.trim():e&&!/ $/.test(e)||(t=e.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(t){const e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:w(e[0],"\n")}}blockquote(t){const e=this.rules.block.blockquote.exec(t);if(e){let t=w(e[0],"\n").split("\n"),r="",n="";const i=[];for(;t.length>0;){let e=!1;const a=[];let o;for(o=0;o/.test(t[o]))a.push(t[o]),e=!0;else{if(e)break;a.push(t[o])}t=t.slice(o);const s=a.join("\n"),l=s.replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,"\n $1").replace(/^ {0,3}>[ \t]?/gm,"");r=r?`${r}\n${s}`:s,n=n?`${n}\n${l}`:l;const c=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(l,i,!0),this.lexer.state.top=c,0===t.length)break;const h=i[i.length-1];if("code"===h?.type)break;if("blockquote"===h?.type){const e=h,a=e.raw+"\n"+t.join("\n"),o=this.blockquote(a);i[i.length-1]=o,r=r.substring(0,r.length-e.raw.length)+o.raw,n=n.substring(0,n.length-e.text.length)+o.text;break}if("list"!==h?.type);else{const e=h,a=e.raw+"\n"+t.join("\n"),o=this.list(a);i[i.length-1]=o,r=r.substring(0,r.length-h.raw.length)+o.raw,n=n.substring(0,n.length-e.raw.length)+o.raw,t=a.substring(i[i.length-1].raw.length).split("\n")}}return{type:"blockquote",raw:r,tokens:i,text:n}}}list(t){let e=this.rules.block.list.exec(t);if(e){let r=e[1].trim();const n=r.length>1,i={type:"list",raw:"",ordered:n,start:n?+r.slice(0,-1):"",loose:!1,items:[]};r=n?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=n?r:"[*+-]");const a=new RegExp(`^( {0,3}${r})((?:[\t ][^\\n]*)?(?:\\n|$))`);let o=!1;for(;t;){let r=!1,n="",s="";if(!(e=a.exec(t)))break;if(this.rules.block.hr.test(t))break;n=e[0],t=t.substring(n.length);let l=e[2].split("\n",1)[0].replace(/^\t+/,(t=>" ".repeat(3*t.length))),c=t.split("\n",1)[0],h=!l.trim(),u=0;if(this.options.pedantic?(u=2,s=l.trimStart()):h?u=e[1].length+1:(u=e[2].search(/[^ ]/),u=u>4?1:u,s=l.slice(u),u+=e[1].length),h&&/^ *$/.test(c)&&(n+=c+"\n",t=t.substring(c.length+1),r=!0),!r){const e=new RegExp(`^ {0,${Math.min(3,u-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),r=new RegExp(`^ {0,${Math.min(3,u-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),i=new RegExp(`^ {0,${Math.min(3,u-1)}}(?:\`\`\`|~~~)`),a=new RegExp(`^ {0,${Math.min(3,u-1)}}#`);for(;t;){const o=t.split("\n",1)[0];if(c=o,this.options.pedantic&&(c=c.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),i.test(c))break;if(a.test(c))break;if(e.test(c))break;if(r.test(t))break;if(c.search(/[^ ]/)>=u||!c.trim())s+="\n"+c.slice(u);else{if(h)break;if(l.search(/[^ ]/)>=4)break;if(i.test(l))break;if(a.test(l))break;if(r.test(l))break;s+="\n"+c}h||c.trim()||(h=!0),n+=o+"\n",t=t.substring(o.length+1),l=c.slice(u)}}i.loose||(o?i.loose=!0:/\n *\n *$/.test(n)&&(o=!0));let d,p=null;this.options.gfm&&(p=/^\[[ xX]\] /.exec(s),p&&(d="[ ] "!==p[0],s=s.replace(/^\[[ xX]\] +/,""))),i.items.push({type:"list_item",raw:n,task:!!p,checked:d,loose:!1,text:s,tokens:[]}),i.raw+=n}i.items[i.items.length-1].raw=i.items[i.items.length-1].raw.trimEnd(),i.items[i.items.length-1].text=i.items[i.items.length-1].text.trimEnd(),i.raw=i.raw.trimEnd();for(let t=0;t"space"===t.type)),r=e.length>0&&e.some((t=>/\n.*\n/.test(t.raw)));i.loose=r}if(i.loose)for(let t=0;t$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",n=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:t,raw:e[0],href:r,title:n}}}table(t){const e=this.rules.block.table.exec(t);if(!e)return;if(!/[:|]/.test(e[2]))return;const r=C(e[1]),n=e[2].replace(/^\||\| *$/g,"").split("|"),i=e[3]&&e[3].trim()?e[3].replace(/\n[ \t]*$/,"").split("\n"):[],a={type:"table",raw:e[0],header:[],align:[],rows:[]};if(r.length===n.length){for(const t of n)/^ *-+: *$/.test(t)?a.align.push("right"):/^ *:-+: *$/.test(t)?a.align.push("center"):/^ *:-+ *$/.test(t)?a.align.push("left"):a.align.push(null);for(let t=0;t({text:t,tokens:this.lexer.inline(t),header:!1,align:a.align[e]}))));return a}}lheading(t){const e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:"="===e[2].charAt(0)?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(t){const e=this.rules.block.paragraph.exec(t);if(e){const t="\n"===e[1].charAt(e[1].length-1)?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(t){const e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){const e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:g(e[1])}}tag(t){const e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&/^/i.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){const e=this.rules.inline.link.exec(t);if(e){const t=e[2].trim();if(!this.options.pedantic&&/^$/.test(t))return;const e=w(t.slice(0,-1),"\\");if((t.length-e.length)%2==0)return}else{const t=function(t,e){if(-1===t.indexOf(e[1]))return-1;let r=0;for(let n=0;n-1){const r=(0===e[0].indexOf("!")?5:4)+e[1].length+t;e[2]=e[2].substring(0,t),e[0]=e[0].substring(0,r).trim(),e[3]=""}}let r=e[2],n="";if(this.options.pedantic){const t=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(r);t&&(r=t[1],n=t[3])}else n=e[3]?e[3].slice(1,-1):"";return r=r.trim(),/^$/.test(t)?r.slice(1):r.slice(1,-1)),v(e,{href:r?r.replace(this.rules.inline.anyPunctuation,"$1"):r,title:n?n.replace(this.rules.inline.anyPunctuation,"$1"):n},e[0],this.lexer)}}reflink(t,e){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){const t=e[(r[2]||r[1]).replace(/\s+/g," ").toLowerCase()];if(!t){const t=r[0].charAt(0);return{type:"text",raw:t,text:t}}return v(r,t,r[0],this.lexer)}}emStrong(t,e,r=""){let n=this.rules.inline.emStrongLDelim.exec(t);if(!n)return;if(n[3]&&r.match(/[\p{L}\p{N}]/u))return;if(!(n[1]||n[2]||"")||!r||this.rules.inline.punctuation.exec(r)){const r=[...n[0]].length-1;let i,a,o=r,s=0;const l="*"===n[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,e=e.slice(-1*t.length+r);null!=(n=l.exec(e));){if(i=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!i)continue;if(a=[...i].length,n[3]||n[4]){o+=a;continue}if((n[5]||n[6])&&r%3&&!((r+a)%3)){s+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o+s);const e=[...n[0]][0].length,l=t.slice(0,r+n.index+e+a);if(Math.min(r,a)%2){const t=l.slice(1,-1);return{type:"em",raw:l,text:t,tokens:this.lexer.inlineTokens(t)}}const c=l.slice(2,-2);return{type:"strong",raw:l,text:c,tokens:this.lexer.inlineTokens(c)}}}}codespan(t){const e=this.rules.inline.code.exec(t);if(e){let t=e[2].replace(/\n/g," ");const r=/[^ ]/.test(t),n=/^ /.test(t)&&/ $/.test(t);return r&&n&&(t=t.substring(1,t.length-1)),t=g(t,!0),{type:"codespan",raw:e[0],text:t}}}br(t){const e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){const e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t){const e=this.rules.inline.autolink.exec(t);if(e){let t,r;return"@"===e[2]?(t=g(e[1]),r="mailto:"+t):(t=g(e[1]),r=t),{type:"link",raw:e[0],text:t,href:r,tokens:[{type:"text",raw:t,text:t}]}}}url(t){let e;if(e=this.rules.inline.url.exec(t)){let t,r;if("@"===e[2])t=g(e[0]),r="mailto:"+t;else{let n;do{n=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??""}while(n!==e[0]);t=g(e[0]),r="www."===e[1]?"http://"+e[0]:e[0]}return{type:"link",raw:e[0],text:t,href:r,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(t){const e=this.rules.inline.text.exec(t);if(e){let t;return t=this.lexer.state.inRawBlock?e[0]:g(e[0]),{type:"text",raw:e[0],text:t}}}}const S=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,A=/(?:[*+-]|\d{1,9}[.)])/,T=x(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,A).replace(/blockCode/g,/ {4}/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),M=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,B=/(?!\s*\])(?:\\.|[^\[\]\\])+/,L=x(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",B).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),F=x(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,A).getRegex(),$="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",E=/|$))/,j=x("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))","i").replace("comment",E).replace("tag",$).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),N=x(M).replace("hr",S).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",$).getRegex(),D={blockquote:x(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",N).getRegex(),code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,def:L,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:S,html:j,lheading:T,list:F,newline:/^(?: *(?:\n|$))+/,paragraph:N,table:k,text:/^[^\n]+/},O=x("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",S).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",$).getRegex(),I={...D,table:O,paragraph:x(M).replace("hr",S).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",O).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",$).getRegex()},R={...D,html:x("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",E).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:k,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:x(M).replace("hr",S).replace("heading"," *#{1,6} *[^\n]").replace("lheading",T).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},P=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,z=/^( {2,}|\\)\n(?!\s*$)/,K="\\p{P}\\p{S}",q=x(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,K).getRegex(),W=x(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,K).getRegex(),H=x("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,K).getRegex(),U=x("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,K).getRegex(),Y=x(/\\([punct])/,"gu").replace(/punct/g,K).getRegex(),G=x(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),V=x(E).replace("(?:--\x3e|$)","--\x3e").getRegex(),Z=x("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",V).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),X=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Q=x(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",X).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),J=x(/^!?\[(label)\]\[(ref)\]/).replace("label",X).replace("ref",B).getRegex(),tt=x(/^!?\[(ref)\](?:\[\])?/).replace("ref",B).getRegex(),et={_backpedal:k,anyPunctuation:Y,autolink:G,blockSkip:/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,br:z,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:k,emStrongLDelim:W,emStrongRDelimAst:H,emStrongRDelimUnd:U,escape:P,link:Q,nolink:tt,punctuation:q,reflink:J,reflinkSearch:x("reflink|nolink(?!\\()","g").replace("reflink",J).replace("nolink",tt).getRegex(),tag:Z,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\e+" ".repeat(r.length)));t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((r=>!!(n=r.call({lexer:this},t,e))&&(t=t.substring(n.raw.length),e.push(n),!0)))))if(n=this.tokenizer.space(t))t=t.substring(n.raw.length),1===n.raw.length&&e.length>0?e[e.length-1].raw+="\n":e.push(n);else if(n=this.tokenizer.code(t))t=t.substring(n.raw.length),i=e[e.length-1],!i||"paragraph"!==i.type&&"text"!==i.type?e.push(n):(i.raw+="\n"+n.raw,i.text+="\n"+n.text,this.inlineQueue[this.inlineQueue.length-1].src=i.text);else if(n=this.tokenizer.fences(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.heading(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.hr(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.blockquote(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.list(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.html(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.def(t))t=t.substring(n.raw.length),i=e[e.length-1],!i||"paragraph"!==i.type&&"text"!==i.type?this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title}):(i.raw+="\n"+n.raw,i.text+="\n"+n.raw,this.inlineQueue[this.inlineQueue.length-1].src=i.text);else if(n=this.tokenizer.table(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.lheading(t))t=t.substring(n.raw.length),e.push(n);else{if(a=t,this.options.extensions&&this.options.extensions.startBlock){let e=1/0;const r=t.slice(1);let n;this.options.extensions.startBlock.forEach((t=>{n=t.call({lexer:this},r),"number"==typeof n&&n>=0&&(e=Math.min(e,n))})),e<1/0&&e>=0&&(a=t.substring(0,e+1))}if(this.state.top&&(n=this.tokenizer.paragraph(a)))i=e[e.length-1],r&&"paragraph"===i?.type?(i.raw+="\n"+n.raw,i.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):e.push(n),r=a.length!==t.length,t=t.substring(n.raw.length);else if(n=this.tokenizer.text(t))t=t.substring(n.raw.length),i=e[e.length-1],i&&"text"===i.type?(i.raw+="\n"+n.raw,i.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):e.push(n);else if(t){const e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}return this.state.top=!0,e}inline(t,e=[]){return this.inlineQueue.push({src:t,tokens:e}),e}inlineTokens(t,e=[]){let r,n,i,a,o,s,l=t;if(this.tokens.links){const t=Object.keys(this.tokens.links);if(t.length>0)for(;null!=(a=this.tokenizer.rules.inline.reflinkSearch.exec(l));)t.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(a=this.tokenizer.rules.inline.blockSkip.exec(l));)l=l.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(a=this.tokenizer.rules.inline.anyPunctuation.exec(l));)l=l.slice(0,a.index)+"++"+l.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;t;)if(o||(s=""),o=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((n=>!!(r=n.call({lexer:this},t,e))&&(t=t.substring(r.raw.length),e.push(r),!0)))))if(r=this.tokenizer.escape(t))t=t.substring(r.raw.length),e.push(r);else if(r=this.tokenizer.tag(t))t=t.substring(r.raw.length),n=e[e.length-1],n&&"text"===r.type&&"text"===n.type?(n.raw+=r.raw,n.text+=r.text):e.push(r);else if(r=this.tokenizer.link(t))t=t.substring(r.raw.length),e.push(r);else if(r=this.tokenizer.reflink(t,this.tokens.links))t=t.substring(r.raw.length),n=e[e.length-1],n&&"text"===r.type&&"text"===n.type?(n.raw+=r.raw,n.text+=r.text):e.push(r);else if(r=this.tokenizer.emStrong(t,l,s))t=t.substring(r.raw.length),e.push(r);else if(r=this.tokenizer.codespan(t))t=t.substring(r.raw.length),e.push(r);else if(r=this.tokenizer.br(t))t=t.substring(r.raw.length),e.push(r);else if(r=this.tokenizer.del(t))t=t.substring(r.raw.length),e.push(r);else if(r=this.tokenizer.autolink(t))t=t.substring(r.raw.length),e.push(r);else if(this.state.inLink||!(r=this.tokenizer.url(t))){if(i=t,this.options.extensions&&this.options.extensions.startInline){let e=1/0;const r=t.slice(1);let n;this.options.extensions.startInline.forEach((t=>{n=t.call({lexer:this},r),"number"==typeof n&&n>=0&&(e=Math.min(e,n))})),e<1/0&&e>=0&&(i=t.substring(0,e+1))}if(r=this.tokenizer.inlineText(i))t=t.substring(r.raw.length),"_"!==r.raw.slice(-1)&&(s=r.raw.slice(-1)),o=!0,n=e[e.length-1],n&&"text"===n.type?(n.raw+=r.raw,n.text+=r.text):e.push(r);else if(t){const e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}else t=t.substring(r.raw.length),e.push(r);return e}}class lt{options;parser;constructor(t){this.options=t||s}space(t){return""}code({text:t,lang:e,escaped:r}){const n=(e||"").match(/^\S*/)?.[0],i=t.replace(/\n$/,"")+"\n";return n?'
'+(r?i:g(i,!0))+"
\n":"
"+(r?i:g(i,!0))+"
\n"}blockquote({tokens:t}){return`
\n${this.parser.parse(t)}
\n`}html({text:t}){return t}heading({tokens:t,depth:e}){return`${this.parser.parseInline(t)}\n`}hr(t){return"
\n"}list(t){const e=t.ordered,r=t.start;let n="";for(let a=0;a\n"+n+"\n"}listitem(t){let e="";if(t.task){const r=this.checkbox({checked:!!t.checked});t.loose?t.tokens.length>0&&"paragraph"===t.tokens[0].type?(t.tokens[0].text=r+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&"text"===t.tokens[0].tokens[0].type&&(t.tokens[0].tokens[0].text=r+" "+t.tokens[0].tokens[0].text)):t.tokens.unshift({type:"text",raw:r+" ",text:r+" "}):e+=r+" "}return e+=this.parser.parse(t.tokens,!!t.loose),`
  • ${e}
  • \n`}checkbox({checked:t}){return"'}paragraph({tokens:t}){return`

    ${this.parser.parseInline(t)}

    \n`}table(t){let e="",r="";for(let i=0;i${n}`),"\n\n"+e+"\n"+n+"
    \n"}tablerow({text:t}){return`\n${t}\n`}tablecell(t){const e=this.parser.parseInline(t.tokens),r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+e+`\n`}strong({tokens:t}){return`${this.parser.parseInline(t)}`}em({tokens:t}){return`${this.parser.parseInline(t)}`}codespan({text:t}){return`${t}`}br(t){return"
    "}del({tokens:t}){return`${this.parser.parseInline(t)}`}link({href:t,title:e,tokens:r}){const n=this.parser.parseInline(r),i=b(t);if(null===i)return n;let a='
    ",a}image({href:t,title:e,text:r}){const n=b(t);if(null===n)return r;let i=`${r}{const i=t[n].flat(1/0);r=r.concat(this.walkTokens(i,e))})):t.tokens&&(r=r.concat(this.walkTokens(t.tokens,e)))}}return r}use(...t){const e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach((t=>{const r={...t};if(r.async=this.defaults.async||r.async||!1,t.extensions&&(t.extensions.forEach((t=>{if(!t.name)throw new Error("extension name required");if("renderer"in t){const r=e.renderers[t.name];e.renderers[t.name]=r?function(...e){let n=t.renderer.apply(this,e);return!1===n&&(n=r.apply(this,e)),n}:t.renderer}if("tokenizer"in t){if(!t.level||"block"!==t.level&&"inline"!==t.level)throw new Error("extension level must be 'block' or 'inline'");const r=e[t.level];r?r.unshift(t.tokenizer):e[t.level]=[t.tokenizer],t.start&&("block"===t.level?e.startBlock?e.startBlock.push(t.start):e.startBlock=[t.start]:"inline"===t.level&&(e.startInline?e.startInline.push(t.start):e.startInline=[t.start]))}"childTokens"in t&&t.childTokens&&(e.childTokens[t.name]=t.childTokens)})),r.extensions=e),t.renderer){const e=this.defaults.renderer||new lt(this.defaults);for(const r in t.renderer){if(!(r in e))throw new Error(`renderer '${r}' does not exist`);if(["options","parser"].includes(r))continue;const n=r;let i=t.renderer[n];t.useNewRenderer||(i=this.#e(i,n,e));const a=e[n];e[n]=(...t)=>{let r=i.apply(e,t);return!1===r&&(r=a.apply(e,t)),r||""}}r.renderer=e}if(t.tokenizer){const e=this.defaults.tokenizer||new _(this.defaults);for(const r in t.tokenizer){if(!(r in e))throw new Error(`tokenizer '${r}' does not exist`);if(["options","rules","lexer"].includes(r))continue;const n=r,i=t.tokenizer[n],a=e[n];e[n]=(...t)=>{let r=i.apply(e,t);return!1===r&&(r=a.apply(e,t)),r}}r.tokenizer=e}if(t.hooks){const e=this.defaults.hooks||new ut;for(const r in t.hooks){if(!(r in e))throw new Error(`hook '${r}' does not exist`);if("options"===r)continue;const n=r,i=t.hooks[n],a=e[n];ut.passThroughHooks.has(r)?e[n]=t=>{if(this.defaults.async)return Promise.resolve(i.call(e,t)).then((t=>a.call(e,t)));const r=i.call(e,t);return a.call(e,r)}:e[n]=(...t)=>{let r=i.apply(e,t);return!1===r&&(r=a.apply(e,t)),r}}r.hooks=e}if(t.walkTokens){const e=this.defaults.walkTokens,n=t.walkTokens;r.walkTokens=function(t){let r=[];return r.push(n.call(this,t)),e&&(r=r.concat(e.call(this,t))),r}}this.defaults={...this.defaults,...r}})),this}#e(t,e,r){switch(e){case"heading":return function(n){return n.type&&n.type===e?t.call(this,r.parser.parseInline(n.tokens),n.depth,function(t){return t.replace(m,((t,e)=>"colon"===(e=e.toLowerCase())?":":"#"===e.charAt(0)?"x"===e.charAt(1)?String.fromCharCode(parseInt(e.substring(2),16)):String.fromCharCode(+e.substring(1)):""))}(r.parser.parseInline(n.tokens,r.parser.textRenderer))):t.apply(this,arguments)};case"code":return function(r){return r.type&&r.type===e?t.call(this,r.text,r.lang,!!r.escaped):t.apply(this,arguments)};case"table":return function(r){if(!r.type||r.type!==e)return t.apply(this,arguments);let n="",i="";for(let t=0;t0&&"paragraph"===e.tokens[0].type?(e.tokens[0].text=t+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&"text"===e.tokens[0].tokens[0].type&&(e.tokens[0].tokens[0].text=t+" "+e.tokens[0].tokens[0].text)):e.tokens.unshift({type:"text",text:t+" "}):s+=t+" "}s+=this.parser.parse(e.tokens,a),o+=this.listitem({type:"list_item",raw:s,text:s,task:i,checked:!!n,loose:a,tokens:e.tokens})}return t.call(this,o,n,i)};case"html":return function(r){return r.type&&r.type===e?t.call(this,r.text,r.block):t.apply(this,arguments)};case"paragraph":case"strong":case"em":case"del":return function(r){return r.type&&r.type===e?t.call(this,this.parser.parseInline(r.tokens)):t.apply(this,arguments)};case"escape":case"codespan":case"text":return function(r){return r.type&&r.type===e?t.call(this,r.text):t.apply(this,arguments)};case"link":return function(r){return r.type&&r.type===e?t.call(this,r.href,r.title,this.parser.parseInline(r.tokens)):t.apply(this,arguments)};case"image":return function(r){return r.type&&r.type===e?t.call(this,r.href,r.title,r.text):t.apply(this,arguments)}}return t}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return st.lex(t,e??this.defaults)}parser(t,e){return ht.parse(t,e??this.defaults)}#t(t,e){return(r,n)=>{const i={...n},a={...this.defaults,...i};!0===this.defaults.async&&!1===i.async&&(a.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),a.async=!0);const o=this.#r(!!a.silent,!!a.async);if(null==r)return o(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof r)return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(a.hooks&&(a.hooks.options=a),a.async)return Promise.resolve(a.hooks?a.hooks.preprocess(r):r).then((e=>t(e,a))).then((t=>a.hooks?a.hooks.processAllTokens(t):t)).then((t=>a.walkTokens?Promise.all(this.walkTokens(t,a.walkTokens)).then((()=>t)):t)).then((t=>e(t,a))).then((t=>a.hooks?a.hooks.postprocess(t):t)).catch(o);try{a.hooks&&(r=a.hooks.preprocess(r));let n=t(r,a);a.hooks&&(n=a.hooks.processAllTokens(n)),a.walkTokens&&this.walkTokens(n,a.walkTokens);let i=e(n,a);return a.hooks&&(i=a.hooks.postprocess(i)),i}catch(s){return o(s)}}}#r(t,e){return r=>{if(r.message+="\nPlease report this to https://github.com/markedjs/marked.",t){const t="

    An error occurred:

    "+g(r.message+"",!0)+"
    ";return e?Promise.resolve(t):t}if(e)return Promise.reject(r);throw r}}};function pt(t,e){return dt.parse(t,e)}pt.options=pt.setOptions=function(t){return dt.setOptions(t),pt.defaults=dt.defaults,l(pt.defaults),pt},pt.getDefaults=o,pt.defaults=s,pt.use=function(...t){return dt.use(...t),pt.defaults=dt.defaults,l(pt.defaults),pt},pt.walkTokens=function(t,e){return dt.walkTokens(t,e)},pt.parseInline=dt.parseInline,pt.Parser=ht,pt.parser=ht.parse,pt.Renderer=lt,pt.TextRenderer=ct,pt.Lexer=st,pt.lexer=st.lex,pt.Tokenizer=_,pt.Hooks=ut,pt.parse=pt;pt.options,pt.setOptions,pt.use,pt.walkTokens,pt.parseInline,ht.parse,st.lex;var ft=r(60513);function gt(t,{markdownAutoWrap:e}){const r=t.replace(//g,"\n").replace(/\n{2,}/g,"\n"),n=(0,ft.T)(r);return!1===e?n.replace(/ /g," "):n}function mt(t,e={}){const r=gt(t,e),n=pt.lexer(r),a=[[]];let o=0;function s(t,e="normal"){if("text"===t.type){t.text.split("\n").forEach(((t,r)=>{0!==r&&(o++,a.push([])),t.split(" ").forEach((t=>{(t=t.replace(/'/g,"'"))&&a[o].push({content:t,type:e})}))}))}else"strong"===t.type||"em"===t.type?t.tokens.forEach((e=>{s(e,t.type)})):"html"===t.type&&a[o].push({content:t.text,type:"normal"})}return(0,i.K2)(s,"processNode"),n.forEach((t=>{"paragraph"===t.type?t.tokens?.forEach((t=>{s(t)})):"html"===t.type&&a[o].push({content:t.text,type:"normal"})})),a}function yt(t,{markdownAutoWrap:e}={}){const r=pt.lexer(t);function n(t){return"text"===t.type?!1===e?t.text.replace(/\n */g,"
    ").replace(/ /g," "):t.text.replace(/\n */g,"
    "):"strong"===t.type?`${t.tokens?.map(n).join("")}`:"em"===t.type?`${t.tokens?.map(n).join("")}`:"paragraph"===t.type?`

    ${t.tokens?.map(n).join("")}

    `:"space"===t.type?"":"html"===t.type?`${t.text}`:"escape"===t.type?t.text:`Unsupported markdown: ${t.type}`}return(0,i.K2)(n,"output"),r.map(n).join("")}function xt(t){return Intl.Segmenter?[...(new Intl.Segmenter).segment(t)].map((t=>t.segment)):[...t]}function bt(t,e){return kt(t,[],xt(e.content),e.type)}function kt(t,e,r,n){if(0===r.length)return[{content:e.join(""),type:n},{content:"",type:n}];const[i,...a]=r,o=[...e,i];return t([{content:o.join(""),type:n}])?kt(t,o,a,n):(0===e.length&&i&&(e.push(i),r.shift()),[{content:e.join(""),type:n},{content:r.join(""),type:n}])}function Ct(t,e){if(t.some((({content:t})=>t.includes("\n"))))throw new Error("splitLineToFitWidth does not support newlines in the line");return wt(t,e)}function wt(t,e,r=[],n=[]){if(0===t.length)return n.length>0&&r.push(n),r.length>0?r:[];let i="";" "===t[0].content&&(i=" ",t.shift());const a=t.shift()??{content:" ",type:"normal"},o=[...n];if(""!==i&&o.push({content:i,type:"normal"}),o.push(a),e(o))return wt(t,e,r,o);if(n.length>0)r.push(n),t.unshift(a);else if(a.content){const[n,i]=bt(e,a);r.push([n]),i.content&&t.unshift(i)}return wt(t,e,r)}function vt(t,e){e&&t.attr("style",e)}async function _t(t,e,r,n,a=!1){const o=t.append("foreignObject");o.attr("width",10*r+"px"),o.attr("height",10*r+"px");const s=o.append("xhtml:div");let l=e.label;e.label&&(0,i.Wi)(e.label)&&(l=await(0,i.VJ)(e.label.replace(i.Y2.lineBreakRegex,"\n"),(0,i.D7)()));const c=e.isNode?"nodeLabel":"edgeLabel",h=s.append("span");h.html(l),vt(h,e.labelStyle),h.attr("class",`${c} ${n}`),vt(s,e.labelStyle),s.style("display","table-cell"),s.style("white-space","nowrap"),s.style("line-height","1.5"),s.style("max-width",r+"px"),s.style("text-align","center"),s.attr("xmlns","http://www.w3.org/1999/xhtml"),a&&s.attr("class","labelBkg");let u=s.node().getBoundingClientRect();return u.width===r&&(s.style("display","table"),s.style("white-space","break-spaces"),s.style("width",r+"px"),u=s.node().getBoundingClientRect()),o.node()}function St(t,e,r){return t.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*r-.1+"em").attr("dy",r+"em")}function At(t,e,r){const n=t.append("text"),i=St(n,1,e);Bt(i,r);const a=i.node().getComputedTextLength();return n.remove(),a}function Tt(t,e,r){const n=t.append("text"),i=St(n,1,e);Bt(i,[{content:r,type:"normal"}]);const a=i.node()?.getBoundingClientRect();return a&&n.remove(),a}function Mt(t,e,r,n=!1){const a=e.append("g"),o=a.insert("rect").attr("class","background").attr("style","stroke: none"),s=a.append("text").attr("y","-10.1");let l=0;for(const c of r){const e=(0,i.K2)((e=>At(a,1.1,e)<=t),"checkWidth"),r=e(c)?[c]:Ct(c,e);for(const t of r){Bt(St(s,l,1.1),t),l++}}if(n){const t=s.node().getBBox(),e=2;return o.attr("x",t.x-e).attr("y",t.y-e).attr("width",t.width+2*e).attr("height",t.height+2*e),a.node()}return s.node()}function Bt(t,e){t.text(""),e.forEach(((e,r)=>{const n=t.append("tspan").attr("font-style","em"===e.type?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight","strong"===e.type?"bold":"normal");0===r?n.text(e.content):n.text(" "+e.content)}))}function Lt(t){return t.replace(/fa[bklrs]?:fa-[\w-]+/g,(t=>``))}(0,i.K2)(gt,"preprocessMarkdown"),(0,i.K2)(mt,"markdownToLines"),(0,i.K2)(yt,"markdownToHTML"),(0,i.K2)(xt,"splitTextToChars"),(0,i.K2)(bt,"splitWordToFitWidth"),(0,i.K2)(kt,"splitWordToFitWidthRecursion"),(0,i.K2)(Ct,"splitLineToFitWidth"),(0,i.K2)(wt,"splitLineToFitWidthRecursion"),(0,i.K2)(vt,"applyStyle"),(0,i.K2)(_t,"addHtmlSpan"),(0,i.K2)(St,"createTspan"),(0,i.K2)(At,"computeWidthOfText"),(0,i.K2)(Tt,"computeDimensionOfText"),(0,i.K2)(Mt,"createFormattedText"),(0,i.K2)(Bt,"updateTextContentAndStyles"),(0,i.K2)(Lt,"replaceIconSubstring");var Ft=(0,i.K2)((async(t,e="",{style:r="",isTitle:o=!1,classes:s="",useHtmlLabels:l=!0,isNode:c=!0,width:h=200,addSvgBackground:u=!1}={},d)=>{if(i.Rm.debug("XYZ createText",e,r,o,s,l,c,"addSvgBackground: ",u),l){const a=yt(e,d),o=Lt((0,n.Sm)(a)),l=e.replace(/\\\\/g,"\\"),p={isNode:c,label:(0,i.Wi)(e)?l:o,labelStyle:r.replace("fill:","color:")};return await _t(t,p,h,s,u)}{const n=Mt(h,t,mt(e.replace(//g,"
    ").replace("
    ","
    "),d),!!e&&u);if(c){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const t=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");(0,a.Ltv)(n).attr("style",t)}else{const t=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");(0,a.Ltv)(n).select("rect").attr("style",t.replace(/background:/g,"fill:"));const e=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");(0,a.Ltv)(n).select("text").attr("style",e)}return n}}),"createText")},29196:(t,e,r)=>{"use strict";r.d(e,{r:()=>n});var n="11.4.0"},62392:(t,e,r)=>{"use strict";r.d(e,{O:()=>n});var n=(0,r(45567).K2)((({flowchart:t})=>{const e=t?.subGraphTitleMargin?.top??0,r=t?.subGraphTitleMargin?.bottom??0;return{subGraphTitleTopMargin:e,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:e+r}}),"getSubGraphTitleMargins")},52294:(t,e,r)=>{"use strict";r.d(e,{R:()=>s});var n=r(45567),i={aggregation:18,extension:18,composition:18,dependency:6,lollipop:13.5,arrow_point:4};function a(t,e){if(void 0===t||void 0===e)return{angle:0,deltaX:0,deltaY:0};t=o(t),e=o(e);const[r,n]=[t.x,t.y],[i,a]=[e.x,e.y],s=i-r,l=a-n;return{angle:Math.atan(l/s),deltaX:s,deltaY:l}}(0,n.K2)(a,"calculateDeltaAndAngle");var o=(0,n.K2)((t=>Array.isArray(t)?{x:t[0],y:t[1]}:t),"pointTransformer"),s=(0,n.K2)((t=>({x:(0,n.K2)((function(e,r,n){let s=0;const l=o(n[0]).x=0?1:-1)}else if(r===n.length-1&&Object.hasOwn(i,t.arrowTypeEnd)){const{angle:e,deltaX:r}=a(n[n.length-1],n[n.length-2]);s=i[t.arrowTypeEnd]*Math.cos(e)*(r>=0?1:-1)}const c=Math.abs(o(e).x-o(n[n.length-1]).x),h=Math.abs(o(e).y-o(n[n.length-1]).y),u=Math.abs(o(e).x-o(n[0]).x),d=Math.abs(o(e).y-o(n[0]).y),p=i[t.arrowTypeStart],f=i[t.arrowTypeEnd];if(c0&&h0&&d=0?1:-1)}else if(r===n.length-1&&Object.hasOwn(i,t.arrowTypeEnd)){const{angle:e,deltaY:r}=a(n[n.length-1],n[n.length-2]);s=i[t.arrowTypeEnd]*Math.abs(Math.sin(e))*(r>=0?1:-1)}const c=Math.abs(o(e).y-o(n[n.length-1]).y),h=Math.abs(o(e).x-o(n[n.length-1]).x),u=Math.abs(o(e).y-o(n[0]).y),d=Math.abs(o(e).x-o(n[0]).x),p=i[t.arrowTypeStart],f=i[t.arrowTypeEnd];if(c0&&h0&&d{"use strict";e.Jf=e.dz=void 0;var i=/^([^\w]*)(javascript|data|vbscript)/im,r=/&#(\w+)(^\w|;)?/g,n=/&(newline|tab);/gi,o=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,a=/^.+(:|:)/gim,s=[".","/"];e.dz="about:blank",e.Jf=function(t){if(!t)return e.dz;var l,c=(l=t,l.replace(o,"").replace(r,(function(t,e){return String.fromCharCode(e)}))).replace(n,"").replace(o,"").trim();if(!c)return e.dz;if(function(t){return s.indexOf(t[0])>-1}(c))return c;var h=c.match(a);if(!h)return c;var u=h[0];return i.test(u)?e.dz:c}},71243:(t,e,i)=>{"use strict";i.d(e,{A:()=>y});i(96540);var r=i(34164),n=i(17559),o=i(26972),a=i(99169),s=i(28774),l=i(21312),c=i(86025),h=i(74848);function u(t){return(0,h.jsx)("svg",Object.assign({viewBox:"0 0 24 24"},t,{children:(0,h.jsx)("path",{d:"M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z",fill:"currentColor"})}))}const d={breadcrumbHomeIcon:"breadcrumbHomeIcon_YNFT"};function f(){var t=(0,c.Ay)("/");return(0,h.jsx)("li",{className:"breadcrumbs__item",children:(0,h.jsx)(s.A,{"aria-label":(0,l.T)({id:"theme.docs.breadcrumbs.home",message:"Home page",description:"The ARIA label for the home page in the breadcrumbs"}),className:"breadcrumbs__link",href:t,children:(0,h.jsx)(u,{className:d.breadcrumbHomeIcon})})})}const p={breadcrumbsContainer:"breadcrumbsContainer_Z_bl"};function g(t){var e=t.children,i=t.href,r="breadcrumbs__link";return t.isLast?(0,h.jsx)("span",{className:r,itemProp:"name",children:e}):i?(0,h.jsx)(s.A,{className:r,href:i,itemProp:"item",children:(0,h.jsx)("span",{itemProp:"name",children:e})}):(0,h.jsx)("span",{className:r,children:e})}function m(t){var e=t.children,i=t.active,n=t.index,o=t.addMicrodata;return(0,h.jsxs)("li",Object.assign({},o&&{itemScope:!0,itemProp:"itemListElement",itemType:"https://schema.org/ListItem"},{className:(0,r.A)("breadcrumbs__item",{"breadcrumbs__item--active":i}),children:[e,(0,h.jsx)("meta",{itemProp:"position",content:String(n+1)})]}))}function y(){var t=(0,o.OF)(),e=(0,a.Dt)();return t?(0,h.jsx)("nav",{className:(0,r.A)(n.G.docs.docBreadcrumbs,p.breadcrumbsContainer),"aria-label":(0,l.T)({id:"theme.docs.breadcrumbs.navAriaLabel",message:"Breadcrumbs",description:"The ARIA label for the breadcrumbs"}),children:(0,h.jsxs)("ul",{className:"breadcrumbs",itemScope:!0,itemType:"https://schema.org/BreadcrumbList",children:[e&&(0,h.jsx)(f,{}),t.map((function(e,i){var r=i===t.length-1,n="category"===e.type&&e.linkUnlisted?void 0:e.href;return(0,h.jsx)(m,{active:r,index:i,addMicrodata:!!n,children:(0,h.jsx)(g,{href:n,isLast:r,children:e.label})},i)}))]})}):null}},93069:(t,e,i)=>{"use strict";i.r(e),i.d(e,{default:()=>ci});var r=i(96540),n=i(69024),o=i(43807),a=i(74848),s=r.createContext(null);function l(t){var e=t.children,i=function(t){return(0,r.useMemo)((function(){return{metadata:t.metadata,frontMatter:t.frontMatter,assets:t.assets,contentTitle:t.contentTitle,toc:t.toc}}),[t])}(t.content);return(0,a.jsx)(s.Provider,{value:i,children:e})}function c(){var t=(0,r.useContext)(s);if(null===t)throw new o.dV("DocProvider");return t}function h(){var t,e=c(),i=e.metadata,r=e.frontMatter,o=e.assets;return(0,a.jsx)(n.be,{title:i.title,description:i.description,keywords:r.keywords,image:null!=(t=o.image)?t:r.image})}var u=i(34164),d=i(24581),f=i(86929);function p(){var t=c().metadata;return(0,a.jsx)(f.A,{previous:t.previous,next:t.next})}var g=i(51878),m=i(4267),y=i(17559),x=i(21312),b=i(28774);const C={tag:"tag_zVej",tagRegular:"tagRegular_sFm0",tagWithCount:"tagWithCount_h2kH"};function v(t){var e=t.permalink,i=t.label,r=t.count,n=t.description;return(0,a.jsxs)(b.A,{href:e,title:n,className:(0,u.A)(C.tag,r?C.tagWithCount:C.tagRegular),children:[i,r&&(0,a.jsx)("span",{children:r})]})}const _={tags:"tags_jXut",tag:"tag_QGVx"};function k(t){var e=t.tags;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("b",{children:(0,a.jsx)(x.A,{id:"theme.tags.tagsListLabel",description:"The label alongside a tag list",children:"Tags:"})}),(0,a.jsx)("ul",{className:(0,u.A)(_.tags,"padding--none","margin-left--sm"),children:e.map((function(t){return(0,a.jsx)("li",{className:_.tag,children:(0,a.jsx)(v,Object.assign({},t))},t.permalink)}))})]})}var T=i(98587);const A={iconEdit:"iconEdit_Z9Sw"};var w=["className"];function S(t){var e=t.className,i=(0,T.A)(t,w);return(0,a.jsx)("svg",Object.assign({fill:"currentColor",height:"20",width:"20",viewBox:"0 0 40 40",className:(0,u.A)(A.iconEdit,e),"aria-hidden":"true"},i,{children:(0,a.jsx)("g",{children:(0,a.jsx)("path",{d:"m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"})})}))}function B(t){var e=t.editUrl;return(0,a.jsxs)(b.A,{to:e,className:y.G.common.editThisPage,children:[(0,a.jsx)(S,{}),(0,a.jsx)(x.A,{id:"theme.common.editThisPage",description:"The link label to edit the current page",children:"Edit this page"})]})}var L=i(44586);function F(t){void 0===t&&(t={});var e=(0,L.A)().i18n.currentLocale,i=function(){var t=(0,L.A)().i18n,e=t.currentLocale;return t.localeConfigs[e].calendar}();return new Intl.DateTimeFormat(e,Object.assign({calendar:i},t))}function M(t){var e=t.lastUpdatedAt,i=new Date(e),r=F({day:"numeric",month:"short",year:"numeric",timeZone:"UTC"}).format(i);return(0,a.jsx)(x.A,{id:"theme.lastUpdated.atDate",description:"The words used to describe on which date a page has been last updated",values:{date:(0,a.jsx)("b",{children:(0,a.jsx)("time",{dateTime:i.toISOString(),itemProp:"dateModified",children:r})})},children:" on {date}"})}function j(t){var e=t.lastUpdatedBy;return(0,a.jsx)(x.A,{id:"theme.lastUpdated.byUser",description:"The words used to describe by who the page has been last updated",values:{user:(0,a.jsx)("b",{children:e})},children:" by {user}"})}function E(t){var e=t.lastUpdatedAt,i=t.lastUpdatedBy;return(0,a.jsxs)("span",{className:y.G.common.lastUpdated,children:[(0,a.jsx)(x.A,{id:"theme.lastUpdated.lastUpdatedAtBy",description:"The sentence used to display when a page has been last updated, and by who",values:{atDate:e?(0,a.jsx)(M,{lastUpdatedAt:e}):"",byUser:i?(0,a.jsx)(j,{lastUpdatedBy:i}):""},children:"Last updated{atDate}{byUser}"}),!1]})}const N={lastUpdated:"lastUpdated_JAkA"};function O(t){var e=t.className,i=t.editUrl,r=t.lastUpdatedAt,n=t.lastUpdatedBy;return(0,a.jsxs)("div",{className:(0,u.A)("row",e),children:[(0,a.jsx)("div",{className:"col",children:i&&(0,a.jsx)(B,{editUrl:i})}),(0,a.jsx)("div",{className:(0,u.A)("col",N.lastUpdated),children:(r||n)&&(0,a.jsx)(E,{lastUpdatedAt:r,lastUpdatedBy:n})})]})}function I(){var t=c().metadata,e=t.editUrl,i=t.lastUpdatedAt,r=t.lastUpdatedBy,n=t.tags,o=n.length>0,s=!!(e||i||r);return o||s?(0,a.jsxs)("footer",{className:(0,u.A)(y.G.docs.docFooter,"docusaurus-mt-lg"),children:[o&&(0,a.jsx)("div",{className:(0,u.A)("row margin-top--sm",y.G.docs.docFooterTagsRow),children:(0,a.jsx)("div",{className:"col",children:(0,a.jsx)(k,{tags:n})})}),s&&(0,a.jsx)(O,{className:(0,u.A)("margin-top--sm",y.G.docs.docFooterEditMetaRow),editUrl:e,lastUpdatedAt:i,lastUpdatedBy:r})]}):null}var D=i(41422),q=i(6342),z=["parentIndex"];function $(t){var e=t.map((function(t){return Object.assign({},t,{parentIndex:-1,children:[]})})),i=Array(7).fill(-1);e.forEach((function(t,e){var r=i.slice(2,t.level);t.parentIndex=Math.max.apply(Math,r),i[t.level]=e}));var r=[];return e.forEach((function(t){var i=t.parentIndex,n=(0,T.A)(t,z);i>=0?e[i].children.push(n):r.push(n)})),r}function P(t){var e=t.toc,i=t.minHeadingLevel,r=t.maxHeadingLevel;return e.flatMap((function(t){var e=P({toc:t.children,minHeadingLevel:i,maxHeadingLevel:r});return function(t){return t.level>=i&&t.level<=r}(t)?[Object.assign({},t,{children:e})]:e}))}function R(t){var e=t.getBoundingClientRect();return e.top===e.bottom?R(t.parentNode):e}function H(t,e){var i,r,n=e.anchorTopOffset,o=t.find((function(t){return R(t).top>=n}));return o?function(t){return t.top>0&&t.bottom",end:""}}),_t=Object.keys(Ct);function kt(t,e){var i=t.map((function(t){var i=vt[t],r=i.start,n=i.end;return"(?:"+r+"\\s*("+e.flatMap((function(t){var e,i;return[t.line,null==(e=t.block)?void 0:e.start,null==(i=t.block)?void 0:i.end].filter(Boolean)})).join("|")+")\\s*"+n+")"})).join("|");return new RegExp("^\\s*(?:"+i+")\\s*$")}function Tt(t,e){var i=t.replace(/\n$/,""),r=e.language,n=e.magicComments,o=e.metastring;if(o&&bt.test(o)){var a=o.match(bt).groups.range;if(0===n.length)throw new Error("A highlight range has been given in code block's metastring (``` "+o+"), but no magic comment config is available. Docusaurus applies the first magic comment entry's className for metastring ranges.");var s=n[0].className,l=yt()(a).filter((function(t){return t>0})).map((function(t){return[t-1,[s]]}));return{lineClassNames:Object.fromEntries(l),code:i}}if(void 0===r)return{lineClassNames:{},code:i};for(var c=function(t,e){switch(t){case"js":case"javascript":case"ts":case"typescript":return kt(["js","jsBlock"],e);case"jsx":case"tsx":return kt(["js","jsBlock","jsx"],e);case"html":return kt(["js","jsBlock","html"],e);case"python":case"py":case"bash":return kt(["bash"],e);case"markdown":case"md":return kt(["html","jsx","bash"],e);case"tex":case"latex":case"matlab":return kt(["tex"],e);case"lua":case"haskell":case"sql":return kt(["lua"],e);case"wasm":return kt(["wasm"],e);case"vb":case"vba":case"visual-basic":return kt(["vb","rem"],e);case"vbnet":return kt(["vbnet","rem"],e);case"batch":return kt(["rem"],e);case"basic":return kt(["rem","f90"],e);case"fsharp":return kt(["js","ml"],e);case"ocaml":case"sml":return kt(["ml"],e);case"fortran":return kt(["f90"],e);case"cobol":return kt(["cobol"],e);default:return kt(_t,e)}}(r,n),h=i.split("\n"),u=Object.fromEntries(n.map((function(t){return[t.className,{start:0,range:""}]}))),d=Object.fromEntries(n.filter((function(t){return t.line})).map((function(t){var e=t.className;return[t.line,e]}))),f=Object.fromEntries(n.filter((function(t){return t.block})).map((function(t){var e=t.className;return[t.block.start,e]}))),p=Object.fromEntries(n.filter((function(t){return t.block})).map((function(t){var e=t.className;return[t.block.end,e]}))),g=0;g0&&a.getRangeAt(0);r.append(n),n.select(),n.selectionStart=0,n.selectionEnd=t.length;var l=!1;try{l=document.execCommand("copy")}catch(c){}n.remove(),s&&(a.removeAllRanges(),a.addRange(s)),o&&o.focus()}(e),s(!0),l.current=window.setTimeout((function(){s(!1)}),1e3)}),[e]);return(0,r.useEffect)((function(){return function(){return window.clearTimeout(l.current)}}),[]),(0,a.jsx)("button",{type:"button","aria-label":o?(0,x.T)({id:"theme.CodeBlock.copied",message:"Copied",description:"The copied button label on code blocks"}):(0,x.T)({id:"theme.CodeBlock.copyButtonAriaLabel",message:"Copy code to clipboard",description:"The ARIA label for copy code blocks button"}),title:(0,x.T)({id:"theme.CodeBlock.copy",message:"Copy",description:"The copy button label on code blocks"}),className:(0,u.A)("clean-btn",i,zt.copyButton,o&&zt.copyButtonCopied),onClick:c,children:(0,a.jsxs)("span",{className:zt.copyButtonIcons,"aria-hidden":"true",children:[(0,a.jsx)(Dt,{className:zt.copyButtonIcon}),(0,a.jsx)(qt,{className:zt.copyButtonSuccessIcon})]})})}function Pt(t){return(0,a.jsx)("svg",Object.assign({viewBox:"0 0 24 24"},t,{children:(0,a.jsx)("path",{fill:"currentColor",d:"M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"})}))}const Rt="wordWrapButtonIcon_Bwma",Ht="wordWrapButtonEnabled_EoeP";function Wt(t){var e=t.className,i=t.onClick,r=t.isEnabled,n=(0,x.T)({id:"theme.CodeBlock.wordWrapToggle",message:"Toggle word wrap",description:"The title attribute for toggle word wrapping button of code block lines"});return(0,a.jsx)("button",{type:"button",onClick:i,className:(0,u.A)("clean-btn",e,r&&Ht),"aria-label":n,title:n,children:(0,a.jsx)(Pt,{className:Rt,"aria-hidden":"true"})})}function Ut(t){var e,i,n,o,s,l,c,h,d,f,p,g=t.children,m=t.className,y=void 0===m?"":m,x=t.metastring,b=t.title,C=t.showLineNumbers,v=t.language,_=(0,q.p)().prism,k=_.defaultLanguage,T=_.magicComments,A=function(t){return null==t?void 0:t.toLowerCase()}(null!=(e=null!=v?v:null==(i=y.split(" ").find((function(t){return t.startsWith("language-")})))?void 0:i.replace(/language-/,""))?e:k),w=pt(),S=(n=(0,r.useState)(!1),o=n[0],s=n[1],l=(0,r.useState)(!1),c=l[0],h=l[1],d=(0,r.useRef)(null),f=(0,r.useCallback)((function(){var t=d.current.querySelector("code");o?t.removeAttribute("style"):(t.style.whiteSpace="pre-wrap",t.style.overflowWrap="anywhere"),s((function(t){return!t}))}),[d,o]),p=(0,r.useCallback)((function(){var t=d.current,e=t.scrollWidth>t.clientWidth||d.current.querySelector("code").hasAttribute("style");h(e)}),[d]),Mt(d,p),(0,r.useEffect)((function(){p()}),[o,p]),(0,r.useEffect)((function(){return window.addEventListener("resize",p,{passive:!0}),function(){window.removeEventListener("resize",p)}}),[p]),{codeBlockRef:d,isEnabled:o,isCodeScrollable:c,toggle:f}),B=function(t){var e,i;return null!=(e=null==t||null==(i=t.match(xt))?void 0:i.groups.title)?e:""}(x)||b,L=Tt(g,{metastring:x,language:A,magicComments:T}),F=L.lineClassNames,M=L.code,j=null!=C?C:function(t){return Boolean(null==t?void 0:t.includes("showLineNumbers"))}(x);return(0,a.jsxs)(St,{as:"div",className:(0,u.A)(y,A&&!y.includes("language-"+A)&&"language-"+A),children:[B&&(0,a.jsx)("div",{className:Bt.codeBlockTitle,children:B}),(0,a.jsxs)("div",{className:Bt.codeBlockContent,children:[(0,a.jsx)(jt.f4,{theme:w,code:M,language:null!=A?A:"text",children:function(t){var e=t.className,i=t.style,r=t.tokens,n=t.getLineProps,o=t.getTokenProps;return(0,a.jsx)("pre",{tabIndex:0,ref:S.codeBlockRef,className:(0,u.A)(e,Bt.codeBlock,"thin-scrollbar"),style:i,children:(0,a.jsx)("code",{className:(0,u.A)(Bt.codeBlockLines,j&&Bt.codeBlockLinesWithNumbering),children:r.map((function(t,e){return(0,a.jsx)(It,{line:t,getLineProps:n,getTokenProps:o,classNames:F[e],showLineNumbers:j},e)}))})})}}),(0,a.jsxs)("div",{className:Bt.buttonGroup,children:[(S.isEnabled||S.isCodeScrollable)&&(0,a.jsx)(Wt,{className:Bt.codeButton,onClick:function(){return S.toggle()},isEnabled:S.isEnabled}),(0,a.jsx)($t,{className:Bt.codeButton,code:M})]})]})]})}var Yt=["children"];function Vt(t){var e=t.children,i=(0,T.A)(t,Yt),n=(0,dt.A)(),o=function(t){return r.Children.toArray(t).some((function(t){return(0,r.isValidElement)(t)}))?t:Array.isArray(t)?t.join(""):t}(e),s="string"==typeof o?Ut:Lt;return(0,a.jsx)(s,Object.assign({},i,{children:o}),String(n))}function Gt(t){return(0,a.jsx)("code",Object.assign({},t))}var Xt=i(63427);const Zt="details_lb9f",Jt="isBrowser_bmU9",Qt="collapsibleContent_i85q";var Kt=["summary","children"];function te(t){return!!t&&("SUMMARY"===t.tagName||te(t.parentElement))}function ee(t,e){return!!t&&(t===e||ee(t.parentElement,e))}function ie(t){var e=t.summary,i=t.children,n=(0,T.A)(t,Kt);(0,Xt.A)().collectAnchor(n.id);var o=(0,dt.A)(),s=(0,r.useRef)(null),l=(0,D.u)({initialState:!n.open}),c=l.collapsed,h=l.setCollapsed,d=(0,r.useState)(n.open),f=d[0],p=d[1],g=r.isValidElement(e)?e:(0,a.jsx)("summary",{children:null!=e?e:"Details"});return(0,a.jsxs)("details",Object.assign({},n,{ref:s,open:f,"data-collapsed":c,className:(0,u.A)(Zt,o&&Jt,n.className),onMouseDown:function(t){te(t.target)&&t.detail>1&&t.preventDefault()},onClick:function(t){t.stopPropagation();var e=t.target;te(e)&&ee(e,s.current)&&(t.preventDefault(),c?(h(!1),p(!0)):h(!0))},children:[g,(0,a.jsx)(D.N,{lazy:!1,collapsed:c,disableSSRStyle:!0,onCollapseTransitionEnd:function(t){h(t),p(!t)},children:(0,a.jsx)("div",{className:Qt,children:i})})]}))}const re="details_b_Ee";function ne(t){var e=Object.assign({},(function(t){if(null==t)throw new TypeError("Cannot destructure "+t)}(t),t));return(0,a.jsx)(ie,Object.assign({},e,{className:(0,u.A)("alert alert--info",re,e.className)}))}function oe(t){var e=r.Children.toArray(t.children),i=e.find((function(t){return r.isValidElement(t)&&"summary"===t.type})),n=(0,a.jsx)(a.Fragment,{children:e.filter((function(t){return t!==i}))});return(0,a.jsx)(ne,Object.assign({},t,{summary:i,children:n}))}function ae(t){return(0,a.jsx)(ct.A,Object.assign({},t))}const se="containsTaskList_mC6p";function le(t){if(void 0!==t)return(0,u.A)(t,(null==t?void 0:t.includes("contains-task-list"))&&se)}const ce="img_ev3q";function he(t){var e,i=function(t){var e=r.Children.toArray(t),i=e.find((function(t){return r.isValidElement(t)&&"mdxAdmonitionTitle"===t.type})),n=e.filter((function(t){return t!==i}));return{mdxAdmonitionTitle:null==i?void 0:i.props.children,rest:n.length>0?(0,a.jsx)(a.Fragment,{children:n}):null}}(t.children),n=i.mdxAdmonitionTitle,o=i.rest,s=null!=(e=t.title)?e:n;return Object.assign({},t,s&&{title:s},{children:o})}const ue="admonition_xJq3",de="admonitionHeading_Gvgb",fe="admonitionIcon_Rf37",pe="admonitionContent_BuS1";function ge(t){var e=t.type,i=t.className,r=t.children;return(0,a.jsx)("div",{className:(0,u.A)(y.G.common.admonition,y.G.common.admonitionType(e),ue,i),children:r})}function me(t){var e=t.icon,i=t.title;return(0,a.jsxs)("div",{className:de,children:[(0,a.jsx)("span",{className:fe,children:e}),i]})}function ye(t){var e=t.children;return e?(0,a.jsx)("div",{className:pe,children:e}):null}function xe(t){var e=t.type,i=t.icon,r=t.title,n=t.children,o=t.className;return(0,a.jsxs)(ge,{type:e,className:o,children:[r||i?(0,a.jsx)(me,{title:r,icon:i}):null,(0,a.jsx)(ye,{children:n})]})}function be(t){return(0,a.jsx)("svg",Object.assign({viewBox:"0 0 14 16"},t,{children:(0,a.jsx)("path",{fillRule:"evenodd",d:"M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"})}))}var Ce={icon:(0,a.jsx)(be,{}),title:(0,a.jsx)(x.A,{id:"theme.admonition.note",description:"The default label used for the Note admonition (:::note)",children:"note"})};function ve(t){return(0,a.jsx)(xe,Object.assign({},Ce,t,{className:(0,u.A)("alert alert--secondary",t.className),children:t.children}))}function _e(t){return(0,a.jsx)("svg",Object.assign({viewBox:"0 0 12 16"},t,{children:(0,a.jsx)("path",{fillRule:"evenodd",d:"M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"})}))}var ke={icon:(0,a.jsx)(_e,{}),title:(0,a.jsx)(x.A,{id:"theme.admonition.tip",description:"The default label used for the Tip admonition (:::tip)",children:"tip"})};function Te(t){return(0,a.jsx)(xe,Object.assign({},ke,t,{className:(0,u.A)("alert alert--success",t.className),children:t.children}))}function Ae(t){return(0,a.jsx)("svg",Object.assign({viewBox:"0 0 14 16"},t,{children:(0,a.jsx)("path",{fillRule:"evenodd",d:"M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"})}))}var we={icon:(0,a.jsx)(Ae,{}),title:(0,a.jsx)(x.A,{id:"theme.admonition.info",description:"The default label used for the Info admonition (:::info)",children:"info"})};function Se(t){return(0,a.jsx)(xe,Object.assign({},we,t,{className:(0,u.A)("alert alert--info",t.className),children:t.children}))}function Be(t){return(0,a.jsx)("svg",Object.assign({viewBox:"0 0 16 16"},t,{children:(0,a.jsx)("path",{fillRule:"evenodd",d:"M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"})}))}var Le={icon:(0,a.jsx)(Be,{}),title:(0,a.jsx)(x.A,{id:"theme.admonition.warning",description:"The default label used for the Warning admonition (:::warning)",children:"warning"})};function Fe(t){return(0,a.jsx)("svg",Object.assign({viewBox:"0 0 12 16"},t,{children:(0,a.jsx)("path",{fillRule:"evenodd",d:"M5.05.31c.81 2.17.41 3.38-.52 4.31C3.55 5.67 1.98 6.45.9 7.98c-1.45 2.05-1.7 6.53 3.53 7.7-2.2-1.16-2.67-4.52-.3-6.61-.61 2.03.53 3.33 1.94 2.86 1.39-.47 2.3.53 2.27 1.67-.02.78-.31 1.44-1.13 1.81 3.42-.59 4.78-3.42 4.78-5.56 0-2.84-2.53-3.22-1.25-5.61-1.52.13-2.03 1.13-1.89 2.75.09 1.08-1.02 1.8-1.86 1.33-.67-.41-.66-1.19-.06-1.78C8.18 5.31 8.68 2.45 5.05.32L5.03.3l.02.01z"})}))}var Me={icon:(0,a.jsx)(Fe,{}),title:(0,a.jsx)(x.A,{id:"theme.admonition.danger",description:"The default label used for the Danger admonition (:::danger)",children:"danger"})};var je={icon:(0,a.jsx)(Be,{}),title:(0,a.jsx)(x.A,{id:"theme.admonition.caution",description:"The default label used for the Caution admonition (:::caution)",children:"caution"})};var Ee={note:ve,tip:Te,info:Se,warning:function(t){return(0,a.jsx)(xe,Object.assign({},Le,t,{className:(0,u.A)("alert alert--warning",t.className),children:t.children}))},danger:function(t){return(0,a.jsx)(xe,Object.assign({},Me,t,{className:(0,u.A)("alert alert--danger",t.className),children:t.children}))}},Ne={secondary:function(t){return(0,a.jsx)(ve,Object.assign({title:"secondary"},t))},important:function(t){return(0,a.jsx)(Se,Object.assign({title:"important"},t))},success:function(t){return(0,a.jsx)(Te,Object.assign({title:"success"},t))},caution:function(t){return(0,a.jsx)(xe,Object.assign({},je,t,{className:(0,u.A)("alert alert--warning",t.className),children:t.children}))}};const Oe=Object.assign({},Ee,Ne);function Ie(t){var e,i=he(t),r=(e=i.type,Oe[e]||(console.warn('No admonition component found for admonition type "'+e+'". Using Info as fallback.'),Oe.info));return(0,a.jsx)(r,Object.assign({},i))}var De=i(67489),qe=i(12181),ze=i(90675),$e=i(10467),Pe=i(86079);function Re(){var t=(0,ft.G)().colorMode,e=(0,q.p)().mermaid,i=e.theme[t],n=e.options;return(0,r.useMemo)((function(){return Object.assign({startOnLoad:!1},n,{theme:i})}),[i,n])}function He(){return(He=(0,$e.A)((0,ze.A)().mark((function t(e){var i,r,n,o;return(0,ze.A)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=e.id,r=e.text,n=e.config,Pe.N.mermaidAPI.initialize(n),t.prev=2,t.next=5,Pe.N.render(i,r);case 5:return t.abrupt("return",t.sent);case 8:throw t.prev=8,t.t0=t.catch(2),null==(o=document.querySelector("#d"+i))||o.remove(),t.t0;case 12:case"end":return t.stop()}}),t,null,[[2,8]])})))).apply(this,arguments)}function We(t){var e=t.text,i=t.config,n=(0,r.useState)(null),o=n[0],a=n[1],s=(0,r.useRef)("mermaid-svg-"+Math.round(1e7*Math.random())).current,l=Re(),c=null!=i?i:l;return(0,r.useEffect)((function(){(function(t){return He.apply(this,arguments)})({id:s,text:e,config:c}).then(a).catch((function(t){a((function(){throw t}))}))}),[s,e,c]),o}const Ue="container_lyt7";function Ye(t){var e=t.renderResult,i=(0,r.useRef)(null);return(0,r.useEffect)((function(){var t=i.current;null==e.bindFunctions||e.bindFunctions(t)}),[e]),(0,a.jsx)("div",{ref:i,className:"docusaurus-mermaid-container "+Ue,dangerouslySetInnerHTML:{__html:e.svg}})}function Ve(t){var e=We({text:t.value});return null===e?null:(0,a.jsx)(Ye,{renderResult:e})}const Ge={Head:ut.A,details:oe,Details:oe,code:function(t){return function(t){return void 0!==t.children&&r.Children.toArray(t.children).every((function(t){return"string"==typeof t&&!t.includes("\n")}))}(t)?(0,a.jsx)(Gt,Object.assign({},t)):(0,a.jsx)(Vt,Object.assign({},t))},a:function(t){return(0,a.jsx)(b.A,Object.assign({},t))},pre:function(t){return(0,a.jsx)(a.Fragment,{children:t.children})},ul:function(t){return(0,a.jsx)("ul",Object.assign({},t,{className:le(t.className)}))},li:function(t){return(0,Xt.A)().collectAnchor(t.id),(0,a.jsx)("li",Object.assign({},t))},img:function(t){return(0,a.jsx)("img",Object.assign({decoding:"async",loading:"lazy"},t,{className:(e=t.className,(0,u.A)(e,ce))}));var e},h1:function(t){return(0,a.jsx)(ae,Object.assign({as:"h1"},t))},h2:function(t){return(0,a.jsx)(ae,Object.assign({as:"h2"},t))},h3:function(t){return(0,a.jsx)(ae,Object.assign({as:"h3"},t))},h4:function(t){return(0,a.jsx)(ae,Object.assign({as:"h4"},t))},h5:function(t){return(0,a.jsx)(ae,Object.assign({as:"h5"},t))},h6:function(t){return(0,a.jsx)(ae,Object.assign({as:"h6"},t))},admonition:Ie,mermaid:function(t){return(0,a.jsx)(De.A,{fallback:function(t){return(0,a.jsx)(qe.MN,Object.assign({},t))},children:(0,a.jsx)(Ve,Object.assign({},t))})}};function Xe(t){var e=t.children;return(0,a.jsx)(ht.x,{components:Ge,children:e})}function Ze(t){var e,i,r,n,o=t.children,s=(e=c(),i=e.metadata,r=e.frontMatter,n=e.contentTitle,r.hide_title||void 0!==n?null:i.title);return(0,a.jsxs)("div",{className:(0,u.A)(y.G.docs.docMarkdown,"markdown"),children:[s&&(0,a.jsx)("header",{children:(0,a.jsx)(ct.A,{as:"h1",children:s})}),(0,a.jsx)(Xe,{children:o})]})}var Je=i(71243);function Qe(){return(0,a.jsx)(x.A,{id:"theme.contentVisibility.unlistedBanner.title",description:"The unlisted content banner title",children:"Unlisted page"})}function Ke(){return(0,a.jsx)(x.A,{id:"theme.contentVisibility.unlistedBanner.message",description:"The unlisted content banner message",children:"This page is unlisted. Search engines will not index it, and only users having a direct link can access it."})}function ti(){return(0,a.jsx)(ut.A,{children:(0,a.jsx)("meta",{name:"robots",content:"noindex, nofollow"})})}function ei(){return(0,a.jsx)(x.A,{id:"theme.contentVisibility.draftBanner.title",description:"The draft content banner title",children:"Draft page"})}function ii(){return(0,a.jsx)(x.A,{id:"theme.contentVisibility.draftBanner.message",description:"The draft content banner message",children:"This page is a draft. It will only be visible in dev and be excluded from the production build."})}function ri(t){var e=t.className;return(0,a.jsx)(Ie,{type:"caution",title:(0,a.jsx)(ei,{}),className:(0,u.A)(e,y.G.common.draftBanner),children:(0,a.jsx)(ii,{})})}function ni(t){var e=t.className;return(0,a.jsx)(Ie,{type:"caution",title:(0,a.jsx)(Qe,{}),className:(0,u.A)(e,y.G.common.unlistedBanner),children:(0,a.jsx)(Ke,{})})}function oi(t){return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(ti,{}),(0,a.jsx)(ni,Object.assign({},t))]})}function ai(t){var e=t.metadata,i=e.unlisted,r=e.frontMatter;return(0,a.jsxs)(a.Fragment,{children:[(i||r.unlisted)&&(0,a.jsx)(oi,{}),r.draft&&(0,a.jsx)(ri,{})]})}const si={docItemContainer:"docItemContainer_Djhp",docItemCol:"docItemCol_VOVn"};function li(t){var e,i,r,n,o,s,l=t.children,h=(e=c(),i=e.frontMatter,r=e.toc,n=(0,d.l)(),o=i.hide_table_of_contents,s=!o&&r.length>0,{hidden:o,mobile:s?(0,a.jsx)(it,{}):void 0,desktop:!s||"desktop"!==n&&"ssr"!==n?void 0:(0,a.jsx)(lt,{})}),f=c().metadata;return(0,a.jsxs)("div",{className:"row",children:[(0,a.jsxs)("div",{className:(0,u.A)("col",!h.hidden&&si.docItemCol),children:[(0,a.jsx)(ai,{metadata:f}),(0,a.jsx)(g.A,{}),(0,a.jsxs)("div",{className:si.docItemContainer,children:[(0,a.jsxs)("article",{children:[(0,a.jsx)(Je.A,{}),(0,a.jsx)(m.A,{}),h.mobile,(0,a.jsx)(Ze,{children:l}),(0,a.jsx)(I,{})]}),(0,a.jsx)(p,{})]})]}),h.desktop&&(0,a.jsx)("div",{className:"col col--3",children:h.desktop})]})}function ci(t){var e="docs-doc-id-"+t.content.metadata.id,i=t.content;return(0,a.jsx)(l,{content:t.content,children:(0,a.jsxs)(n.e3,{className:e,children:[(0,a.jsx)(h,{}),(0,a.jsx)(li,{children:(0,a.jsx)(i,{})})]})})}},86929:(t,e,i)=>{"use strict";i.d(e,{A:()=>l});i(96540);var r=i(21312),n=i(34164),o=i(28774),a=i(74848);function s(t){var e=t.permalink,i=t.title,r=t.subLabel,s=t.isNext;return(0,a.jsxs)(o.A,{className:(0,n.A)("pagination-nav__link",s?"pagination-nav__link--next":"pagination-nav__link--prev"),to:e,children:[r&&(0,a.jsx)("div",{className:"pagination-nav__sublabel",children:r}),(0,a.jsx)("div",{className:"pagination-nav__label",children:i})]})}function l(t){var e=t.previous,i=t.next;return(0,a.jsxs)("nav",{className:"pagination-nav docusaurus-mt-lg","aria-label":(0,r.T)({id:"theme.docs.paginator.navAriaLabel",message:"Docs pages",description:"The ARIA label for the docs pagination"}),children:[e&&(0,a.jsx)(s,Object.assign({},e,{subLabel:(0,a.jsx)(r.A,{id:"theme.docs.paginator.previous",description:"The label used to navigate to the previous doc",children:"Previous"})})),i&&(0,a.jsx)(s,Object.assign({},i,{subLabel:(0,a.jsx)(r.A,{id:"theme.docs.paginator.next",description:"The label used to navigate to the next doc",children:"Next"}),isNext:!0}))]})}},4267:(t,e,i)=>{"use strict";i.d(e,{A:()=>l});i(96540);var r=i(34164),n=i(21312),o=i(17559),a=i(23025),s=i(74848);function l(t){var e=t.className,i=(0,a.r)();return i.badge?(0,s.jsx)("span",{className:(0,r.A)(e,o.G.docs.docVersionBadge,"badge badge--secondary"),children:(0,s.jsx)(n.A,{id:"theme.docs.versionBadge.label",values:{versionLabel:i.label},children:"Version: {versionLabel}"})}):null}},51878:(t,e,i)=>{"use strict";i.d(e,{A:()=>m});i(96540);var r=i(34164),n=i(44586),o=i(28774),a=i(21312),s=i(44070),l=i(17559),c=i(53886),h=i(23025),u=i(74848);var d={unreleased:function(t){var e=t.siteTitle,i=t.versionMetadata;return(0,u.jsx)(a.A,{id:"theme.docs.versions.unreleasedVersionLabel",description:"The label used to tell the user that he's browsing an unreleased doc version",values:{siteTitle:e,versionLabel:(0,u.jsx)("b",{children:i.label})},children:"This is unreleased documentation for {siteTitle} {versionLabel} version."})},unmaintained:function(t){var e=t.siteTitle,i=t.versionMetadata;return(0,u.jsx)(a.A,{id:"theme.docs.versions.unmaintainedVersionLabel",description:"The label used to tell the user that he's browsing an unmaintained doc version",values:{siteTitle:e,versionLabel:(0,u.jsx)("b",{children:i.label})},children:"This is documentation for {siteTitle} {versionLabel}, which is no longer actively maintained."})}};function f(t){var e=d[t.versionMetadata.banner];return(0,u.jsx)(e,Object.assign({},t))}function p(t){var e=t.versionLabel,i=t.to,r=t.onClick;return(0,u.jsx)(a.A,{id:"theme.docs.versions.latestVersionSuggestionLabel",description:"The label used to tell the user to check the latest version",values:{versionLabel:e,latestVersionLink:(0,u.jsx)("b",{children:(0,u.jsx)(o.A,{to:i,onClick:r,children:(0,u.jsx)(a.A,{id:"theme.docs.versions.latestVersionLinkLabel",description:"The label used for the latest version suggestion link label",children:"latest version"})})})},children:"For up-to-date documentation, see the {latestVersionLink} ({versionLabel})."})}function g(t){var e,i=t.className,o=t.versionMetadata,a=(0,n.A)().siteConfig.title,h=(0,s.vT)({failfast:!0}).pluginId,d=(0,c.g1)(h).savePreferredVersionName,g=(0,s.HW)(h),m=g.latestDocSuggestion,y=g.latestVersionSuggestion,x=null!=m?m:(e=y).docs.find((function(t){return t.id===e.mainDocId}));return(0,u.jsxs)("div",{className:(0,r.A)(i,l.G.docs.docVersionBanner,"alert alert--warning margin-bottom--md"),role:"alert",children:[(0,u.jsx)("div",{children:(0,u.jsx)(f,{siteTitle:a,versionMetadata:o})}),(0,u.jsx)("div",{className:"margin-top--md",children:(0,u.jsx)(p,{versionLabel:y.label,to:x.path,onClick:function(){return d(y.name)}})})]})}function m(t){var e=t.className,i=(0,h.r)();return i.banner?(0,u.jsx)(g,{className:e,versionMetadata:i}):null}},74353:function(t){t.exports=function(){"use strict";var t=1e3,e=6e4,i=36e5,r="millisecond",n="second",o="minute",a="hour",s="day",l="week",c="month",h="quarter",u="year",d="date",f="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,g=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,m={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],i=t%100;return"["+t+(e[(i-20)%10]||e[i]||e[0])+"]"}},y=function(t,e,i){var r=String(t);return!r||r.length>=e?t:""+Array(e+1-r.length).join(i)+t},x={s:y,z:function(t){var e=-t.utcOffset(),i=Math.abs(e),r=Math.floor(i/60),n=i%60;return(e<=0?"+":"-")+y(r,2,"0")+":"+y(n,2,"0")},m:function t(e,i){if(e.date()1)return t(a[0])}else{var s=e.name;C[s]=e,n=s}return!r&&n&&(b=n),n||!r&&b},T=function(t,e){if(_(t))return t.clone();var i="object"==typeof e?e:{};return i.date=t,i.args=arguments,new w(i)},A=x;A.l=k,A.i=_,A.w=function(t,e){return T(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var w=function(){function m(t){this.$L=k(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[v]=!0}var y=m.prototype;return y.parse=function(t){this.$d=function(t){var e=t.date,i=t.utc;if(null===e)return new Date(NaN);if(A.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match(p);if(r){var n=r[2]-1||0,o=(r[7]||"0").substring(0,3);return i?new Date(Date.UTC(r[1],n,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)):new Date(r[1],n,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)}}return new Date(e)}(t),this.init()},y.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},y.$utils=function(){return A},y.isValid=function(){return!(this.$d.toString()===f)},y.isSame=function(t,e){var i=T(t);return this.startOf(e)<=i&&i<=this.endOf(e)},y.isAfter=function(t,e){return T(t)1?i-1:0),n=1;n2&&void 0!==arguments[2]?arguments[2]:f;e&&e(t,null);let o=r.length;for(;o--;){let e=r[o];if("string"==typeof e){const t=n(e);t!==e&&(i(r)||(r[o]=t),e=t)}t[e]=!0}return t}function A(t){for(let e=0;e/gm),P=a(/\${[\w\W]*}/gm),R=a(/^data-[\-\w.\u00B7-\uFFFF]/),H=a(/^aria-[\-\w]+$/),W=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),U=a(/^(?:\w+script|data):/i),Y=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),V=a(/^html$/i),G=a(/^[a-z][.\w]*(-[.\w]+)+$/i);var X=Object.freeze({__proto__:null,MUSTACHE_EXPR:z,ERB_EXPR:$,TMPLIT_EXPR:P,DATA_ATTR:R,ARIA_ATTR:H,IS_ALLOWED_URI:W,IS_SCRIPT_OR_DATA:U,ATTR_WHITESPACE:Y,DOCTYPE_NAME:V,CUSTOM_ELEMENT:G});const Z={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},J=function(){return"undefined"==typeof window?null:window},Q=function(t,e){if("object"!=typeof t||"function"!=typeof t.createPolicy)return null;let i=null;const r="data-tt-policy-suffix";e&&e.hasAttribute(r)&&(i=e.getAttribute(r));const n="dompurify"+(i?"#"+i:"");try{return t.createPolicy(n,{createHTML:t=>t,createScriptURL:t=>t})}catch(o){return console.warn("TrustedTypes policy "+n+" could not be created."),null}};function K(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:J();const i=t=>K(t);if(i.version="3.1.6",i.removed=[],!e||!e.document||e.document.nodeType!==Z.document)return i.isSupported=!1,i;let{document:r}=e;const n=r,a=n.currentScript,{DocumentFragment:l,HTMLTemplateElement:c,Node:_,Element:k,NodeFilter:A,NamedNodeMap:z=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:$,DOMParser:P,trustedTypes:R}=e,H=k.prototype,U=S(H,"cloneNode"),Y=S(H,"remove"),G=S(H,"nextSibling"),tt=S(H,"childNodes"),et=S(H,"parentNode");if("function"==typeof c){const t=r.createElement("template");t.content&&t.content.ownerDocument&&(r=t.content.ownerDocument)}let it,rt="";const{implementation:nt,createNodeIterator:ot,createDocumentFragment:at,getElementsByTagName:st}=r,{importNode:lt}=n;let ct={};i.isSupported="function"==typeof t&&"function"==typeof et&&nt&&void 0!==nt.createHTMLDocument;const{MUSTACHE_EXPR:ht,ERB_EXPR:ut,TMPLIT_EXPR:dt,DATA_ATTR:ft,ARIA_ATTR:pt,IS_SCRIPT_OR_DATA:gt,ATTR_WHITESPACE:mt,CUSTOM_ELEMENT:yt}=X;let{IS_ALLOWED_URI:xt}=X,bt=null;const Ct=T({},[...B,...L,...F,...j,...N]);let vt=null;const _t=T({},[...O,...I,...D,...q]);let kt=Object.seal(s(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Tt=null,At=null,wt=!0,St=!0,Bt=!1,Lt=!0,Ft=!1,Mt=!0,jt=!1,Et=!1,Nt=!1,Ot=!1,It=!1,Dt=!1,qt=!0,zt=!1;const $t="user-content-";let Pt=!0,Rt=!1,Ht={},Wt=null;const Ut=T({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Yt=null;const Vt=T({},["audio","video","img","source","image","track"]);let Gt=null;const Xt=T({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Zt="http://www.w3.org/1998/Math/MathML",Jt="http://www.w3.org/2000/svg",Qt="http://www.w3.org/1999/xhtml";let Kt=Qt,te=!1,ee=null;const ie=T({},[Zt,Jt,Qt],p);let re=null;const ne=["application/xhtml+xml","text/html"],oe="text/html";let ae=null,se=null;const le=r.createElement("form"),ce=function(t){return t instanceof RegExp||t instanceof Function},he=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!se||se!==t){if(t&&"object"==typeof t||(t={}),t=w(t),re=-1===ne.indexOf(t.PARSER_MEDIA_TYPE)?oe:t.PARSER_MEDIA_TYPE,ae="application/xhtml+xml"===re?p:f,bt=b(t,"ALLOWED_TAGS")?T({},t.ALLOWED_TAGS,ae):Ct,vt=b(t,"ALLOWED_ATTR")?T({},t.ALLOWED_ATTR,ae):_t,ee=b(t,"ALLOWED_NAMESPACES")?T({},t.ALLOWED_NAMESPACES,p):ie,Gt=b(t,"ADD_URI_SAFE_ATTR")?T(w(Xt),t.ADD_URI_SAFE_ATTR,ae):Xt,Yt=b(t,"ADD_DATA_URI_TAGS")?T(w(Vt),t.ADD_DATA_URI_TAGS,ae):Vt,Wt=b(t,"FORBID_CONTENTS")?T({},t.FORBID_CONTENTS,ae):Ut,Tt=b(t,"FORBID_TAGS")?T({},t.FORBID_TAGS,ae):{},At=b(t,"FORBID_ATTR")?T({},t.FORBID_ATTR,ae):{},Ht=!!b(t,"USE_PROFILES")&&t.USE_PROFILES,wt=!1!==t.ALLOW_ARIA_ATTR,St=!1!==t.ALLOW_DATA_ATTR,Bt=t.ALLOW_UNKNOWN_PROTOCOLS||!1,Lt=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,Ft=t.SAFE_FOR_TEMPLATES||!1,Mt=!1!==t.SAFE_FOR_XML,jt=t.WHOLE_DOCUMENT||!1,Ot=t.RETURN_DOM||!1,It=t.RETURN_DOM_FRAGMENT||!1,Dt=t.RETURN_TRUSTED_TYPE||!1,Nt=t.FORCE_BODY||!1,qt=!1!==t.SANITIZE_DOM,zt=t.SANITIZE_NAMED_PROPS||!1,Pt=!1!==t.KEEP_CONTENT,Rt=t.IN_PLACE||!1,xt=t.ALLOWED_URI_REGEXP||W,Kt=t.NAMESPACE||Qt,kt=t.CUSTOM_ELEMENT_HANDLING||{},t.CUSTOM_ELEMENT_HANDLING&&ce(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(kt.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&ce(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(kt.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(kt.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ft&&(St=!1),It&&(Ot=!0),Ht&&(bt=T({},N),vt=[],!0===Ht.html&&(T(bt,B),T(vt,O)),!0===Ht.svg&&(T(bt,L),T(vt,I),T(vt,q)),!0===Ht.svgFilters&&(T(bt,F),T(vt,I),T(vt,q)),!0===Ht.mathMl&&(T(bt,j),T(vt,D),T(vt,q))),t.ADD_TAGS&&(bt===Ct&&(bt=w(bt)),T(bt,t.ADD_TAGS,ae)),t.ADD_ATTR&&(vt===_t&&(vt=w(vt)),T(vt,t.ADD_ATTR,ae)),t.ADD_URI_SAFE_ATTR&&T(Gt,t.ADD_URI_SAFE_ATTR,ae),t.FORBID_CONTENTS&&(Wt===Ut&&(Wt=w(Wt)),T(Wt,t.FORBID_CONTENTS,ae)),Pt&&(bt["#text"]=!0),jt&&T(bt,["html","head","body"]),bt.table&&(T(bt,["tbody"]),delete Tt.tbody),t.TRUSTED_TYPES_POLICY){if("function"!=typeof t.TRUSTED_TYPES_POLICY.createHTML)throw v('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof t.TRUSTED_TYPES_POLICY.createScriptURL)throw v('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');it=t.TRUSTED_TYPES_POLICY,rt=it.createHTML("")}else void 0===it&&(it=Q(R,a)),null!==it&&"string"==typeof rt&&(rt=it.createHTML(""));o&&o(t),se=t}},ue=T({},["mi","mo","mn","ms","mtext"]),de=T({},["foreignobject","annotation-xml"]),fe=T({},["title","style","font","a","script"]),pe=T({},[...L,...F,...M]),ge=T({},[...j,...E]),me=function(t){let e=et(t);e&&e.tagName||(e={namespaceURI:Kt,tagName:"template"});const i=f(t.tagName),r=f(e.tagName);return!!ee[t.namespaceURI]&&(t.namespaceURI===Jt?e.namespaceURI===Qt?"svg"===i:e.namespaceURI===Zt?"svg"===i&&("annotation-xml"===r||ue[r]):Boolean(pe[i]):t.namespaceURI===Zt?e.namespaceURI===Qt?"math"===i:e.namespaceURI===Jt?"math"===i&&de[r]:Boolean(ge[i]):t.namespaceURI===Qt?!(e.namespaceURI===Jt&&!de[r])&&!(e.namespaceURI===Zt&&!ue[r])&&!ge[i]&&(fe[i]||!pe[i]):!("application/xhtml+xml"!==re||!ee[t.namespaceURI]))},ye=function(t){d(i.removed,{element:t});try{et(t).removeChild(t)}catch(e){Y(t)}},xe=function(t,e){try{d(i.removed,{attribute:e.getAttributeNode(t),from:e})}catch(r){d(i.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t&&!vt[t])if(Ot||It)try{ye(e)}catch(r){}else try{e.setAttribute(t,"")}catch(r){}},be=function(t){let e=null,i=null;if(Nt)t=""+t;else{const e=g(t,/^[\r\n\t ]+/);i=e&&e[0]}"application/xhtml+xml"===re&&Kt===Qt&&(t=''+t+"");const n=it?it.createHTML(t):t;if(Kt===Qt)try{e=(new P).parseFromString(n,re)}catch(a){}if(!e||!e.documentElement){e=nt.createDocument(Kt,"template",null);try{e.documentElement.innerHTML=te?rt:n}catch(a){}}const o=e.body||e.documentElement;return t&&i&&o.insertBefore(r.createTextNode(i),o.childNodes[0]||null),Kt===Qt?st.call(e,jt?"html":"body")[0]:jt?e.documentElement:o},Ce=function(t){return ot.call(t.ownerDocument||t,t,A.SHOW_ELEMENT|A.SHOW_COMMENT|A.SHOW_TEXT|A.SHOW_PROCESSING_INSTRUCTION|A.SHOW_CDATA_SECTION,null)},ve=function(t){return t instanceof $&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof z)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes)},_e=function(t){return"function"==typeof _&&t instanceof _},ke=function(t,e,r){ct[t]&&h(ct[t],(t=>{t.call(i,e,r,se)}))},Te=function(t){let e=null;if(ke("beforeSanitizeElements",t,null),ve(t))return ye(t),!0;const r=ae(t.nodeName);if(ke("uponSanitizeElement",t,{tagName:r,allowedTags:bt}),t.hasChildNodes()&&!_e(t.firstElementChild)&&C(/<[/\w]/g,t.innerHTML)&&C(/<[/\w]/g,t.textContent))return ye(t),!0;if(t.nodeType===Z.progressingInstruction)return ye(t),!0;if(Mt&&t.nodeType===Z.comment&&C(/<[/\w]/g,t.data))return ye(t),!0;if(!bt[r]||Tt[r]){if(!Tt[r]&&we(r)){if(kt.tagNameCheck instanceof RegExp&&C(kt.tagNameCheck,r))return!1;if(kt.tagNameCheck instanceof Function&&kt.tagNameCheck(r))return!1}if(Pt&&!Wt[r]){const e=et(t)||t.parentNode,i=tt(t)||t.childNodes;if(i&&e)for(let r=i.length-1;r>=0;--r){const n=U(i[r],!0);n.__removalCount=(t.__removalCount||0)+1,e.insertBefore(n,G(t))}}return ye(t),!0}return t instanceof k&&!me(t)?(ye(t),!0):"noscript"!==r&&"noembed"!==r&&"noframes"!==r||!C(/<\/no(script|embed|frames)/i,t.innerHTML)?(Ft&&t.nodeType===Z.text&&(e=t.textContent,h([ht,ut,dt],(t=>{e=m(e,t," ")})),t.textContent!==e&&(d(i.removed,{element:t.cloneNode()}),t.textContent=e)),ke("afterSanitizeElements",t,null),!1):(ye(t),!0)},Ae=function(t,e,i){if(qt&&("id"===e||"name"===e)&&(i in r||i in le))return!1;if(St&&!At[e]&&C(ft,e));else if(wt&&C(pt,e));else if(!vt[e]||At[e]){if(!(we(t)&&(kt.tagNameCheck instanceof RegExp&&C(kt.tagNameCheck,t)||kt.tagNameCheck instanceof Function&&kt.tagNameCheck(t))&&(kt.attributeNameCheck instanceof RegExp&&C(kt.attributeNameCheck,e)||kt.attributeNameCheck instanceof Function&&kt.attributeNameCheck(e))||"is"===e&&kt.allowCustomizedBuiltInElements&&(kt.tagNameCheck instanceof RegExp&&C(kt.tagNameCheck,i)||kt.tagNameCheck instanceof Function&&kt.tagNameCheck(i))))return!1}else if(Gt[e]);else if(C(xt,m(i,mt,"")));else if("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==y(i,"data:")||!Yt[t])if(Bt&&!C(gt,m(i,mt,"")));else if(i)return!1;return!0},we=function(t){return"annotation-xml"!==t&&g(t,yt)},Se=function(t){ke("beforeSanitizeAttributes",t,null);const{attributes:e}=t;if(!e)return;const r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:vt};let n=e.length;for(;n--;){const a=e[n],{name:s,namespaceURI:l,value:c}=a,d=ae(s);let f="value"===s?c:x(c);if(r.attrName=d,r.attrValue=f,r.keepAttr=!0,r.forceKeepAttr=void 0,ke("uponSanitizeAttribute",t,r),f=r.attrValue,Mt&&C(/((--!?|])>)|<\/(style|title)/i,f)){xe(s,t);continue}if(r.forceKeepAttr)continue;if(xe(s,t),!r.keepAttr)continue;if(!Lt&&C(/\/>/i,f)){xe(s,t);continue}Ft&&h([ht,ut,dt],(t=>{f=m(f,t," ")}));const p=ae(t.nodeName);if(Ae(p,d,f)){if(!zt||"id"!==d&&"name"!==d||(xe(s,t),f=$t+f),it&&"object"==typeof R&&"function"==typeof R.getAttributeType)if(l);else switch(R.getAttributeType(p,d)){case"TrustedHTML":f=it.createHTML(f);break;case"TrustedScriptURL":f=it.createScriptURL(f)}try{l?t.setAttributeNS(l,s,f):t.setAttribute(s,f),ve(t)?ye(t):u(i.removed)}catch(o){}}}ke("afterSanitizeAttributes",t,null)},Be=function t(e){let i=null;const r=Ce(e);for(ke("beforeSanitizeShadowDOM",e,null);i=r.nextNode();)ke("uponSanitizeShadowNode",i,null),Te(i)||(i.content instanceof l&&t(i.content),Se(i));ke("afterSanitizeShadowDOM",e,null)};return i.sanitize=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,o=null,a=null,s=null;if(te=!t,te&&(t="\x3c!--\x3e"),"string"!=typeof t&&!_e(t)){if("function"!=typeof t.toString)throw v("toString is not a function");if("string"!=typeof(t=t.toString()))throw v("dirty is not a string, aborting")}if(!i.isSupported)return t;if(Et||he(e),i.removed=[],"string"==typeof t&&(Rt=!1),Rt){if(t.nodeName){const e=ae(t.nodeName);if(!bt[e]||Tt[e])throw v("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof _)r=be("\x3c!----\x3e"),o=r.ownerDocument.importNode(t,!0),o.nodeType===Z.element&&"BODY"===o.nodeName||"HTML"===o.nodeName?r=o:r.appendChild(o);else{if(!Ot&&!Ft&&!jt&&-1===t.indexOf("<"))return it&&Dt?it.createHTML(t):t;if(r=be(t),!r)return Ot?null:Dt?rt:""}r&&Nt&&ye(r.firstChild);const c=Ce(Rt?t:r);for(;a=c.nextNode();)Te(a)||(a.content instanceof l&&Be(a.content),Se(a));if(Rt)return t;if(Ot){if(It)for(s=at.call(r.ownerDocument);r.firstChild;)s.appendChild(r.firstChild);else s=r;return(vt.shadowroot||vt.shadowrootmode)&&(s=lt.call(n,s,!0)),s}let u=jt?r.outerHTML:r.innerHTML;return jt&&bt["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&C(V,r.ownerDocument.doctype.name)&&(u="\n"+u),Ft&&h([ht,ut,dt],(t=>{u=m(u,t," ")})),it&&Dt?it.createHTML(u):u},i.setConfig=function(){he(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Et=!0},i.clearConfig=function(){se=null,Et=!1},i.isValidAttribute=function(t,e,i){se||he({});const r=ae(t),n=ae(e);return Ae(r,n,i)},i.addHook=function(t,e){"function"==typeof e&&(ct[t]=ct[t]||[],d(ct[t],e))},i.removeHook=function(t){if(ct[t])return u(ct[t])},i.removeHooks=function(t){ct[t]&&(ct[t]=[])},i.removeAllHooks=function(){ct={}},i}return K()}()},18426:(t,e)=>{function i(t){let e,i=[];for(let r of t.split(",").map((t=>t.trim())))if(/^-?\d+$/.test(r))i.push(parseInt(r,10));else if(e=r.match(/^(-?\d+)(-|\.\.\.?|\u2025|\u2026|\u22EF)(-?\d+)$/)){let[t,r,n,o]=e;if(r&&o){r=parseInt(r),o=parseInt(o);const t=r{"use strict";function r(t){for(var e=[],i=1;ir})},10467:(t,e,i)=>{"use strict";function r(t,e,i,r,n,o,a){try{var s=t[o](a),l=s.value}catch(t){return void i(t)}s.done?e(l):Promise.resolve(l).then(r,n)}function n(t){return function(){var e=this,i=arguments;return new Promise((function(n,o){var a=t.apply(e,i);function s(t){r(a,n,o,s,l,"next",t)}function l(t){r(a,n,o,s,l,"throw",t)}s(void 0)}))}}i.d(e,{A:()=>n})},90675:(t,e,i)=>{"use strict";i.d(e,{A:()=>n});var r=i(82284);function n(){n=function(){return e};var t,e={},i=Object.prototype,o=i.hasOwnProperty,a=Object.defineProperty||function(t,e,i){t[e]=i.value},s="function"==typeof Symbol?Symbol:{},l=s.iterator||"@@iterator",c=s.asyncIterator||"@@asyncIterator",h=s.toStringTag||"@@toStringTag";function u(t,e,i){return Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,i){return t[e]=i}}function d(t,e,i,r){var n=e&&e.prototype instanceof b?e:b,o=Object.create(n.prototype),s=new j(r||[]);return a(o,"_invoke",{value:B(t,i,s)}),o}function f(t,e,i){try{return{type:"normal",arg:t.call(e,i)}}catch(t){return{type:"throw",arg:t}}}e.wrap=d;var p="suspendedStart",g="suspendedYield",m="executing",y="completed",x={};function b(){}function C(){}function v(){}var _={};u(_,l,(function(){return this}));var k=Object.getPrototypeOf,T=k&&k(k(E([])));T&&T!==i&&o.call(T,l)&&(_=T);var A=v.prototype=b.prototype=Object.create(_);function w(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function S(t,e){function i(n,a,s,l){var c=f(t[n],t,a);if("throw"!==c.type){var h=c.arg,u=h.value;return u&&"object"==(0,r.A)(u)&&o.call(u,"__await")?e.resolve(u.__await).then((function(t){i("next",t,s,l)}),(function(t){i("throw",t,s,l)})):e.resolve(u).then((function(t){h.value=t,s(h)}),(function(t){return i("throw",t,s,l)}))}l(c.arg)}var n;a(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,n){i(t,r,e,n)}))}return n=n?n.then(o,o):o()}})}function B(e,i,r){var n=p;return function(o,a){if(n===m)throw Error("Generator is already running");if(n===y){if("throw"===o)throw a;return{value:t,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var l=L(s,r);if(l){if(l===x)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===p)throw n=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=m;var c=f(e,i,r);if("normal"===c.type){if(n=r.done?y:g,c.arg===x)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n=y,r.method="throw",r.arg=c.arg)}}}function L(e,i){var r=i.method,n=e.iterator[r];if(n===t)return i.delegate=null,"throw"===r&&e.iterator.return&&(i.method="return",i.arg=t,L(e,i),"throw"===i.method)||"return"!==r&&(i.method="throw",i.arg=new TypeError("The iterator does not provide a '"+r+"' method")),x;var o=f(n,e.iterator,i.arg);if("throw"===o.type)return i.method="throw",i.arg=o.arg,i.delegate=null,x;var a=o.arg;return a?a.done?(i[e.resultName]=a.value,i.next=e.nextLoc,"return"!==i.method&&(i.method="next",i.arg=t),i.delegate=null,x):a:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,x)}function F(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function M(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(F,this),this.reset(!0)}function E(e){if(e||""===e){var i=e[l];if(i)return i.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function i(){for(;++n=0;--n){var a=this.tryEntries[n],s=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var l=o.call(a,"catchLoc"),c=o.call(a,"finallyLoc");if(l&&c){if(this.prev=0;--i){var r=this.tryEntries[i];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev=0;--e){var i=this.tryEntries[e];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),M(i),x}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var i=this.tryEntries[e];if(i.tryLoc===t){var r=i.completion;if("throw"===r.type){var n=r.arg;M(i)}return n}}throw Error("illegal catch attempt")},delegateYield:function(e,i,r){return this.delegate={iterator:E(e),resultName:i,nextLoc:r},"next"===this.method&&(this.arg=t),x}},e}},28453:(t,e,i)=>{"use strict";i.d(e,{R:()=>a,x:()=>s});var r=i(96540);const n={},o=r.createContext(n);function a(t){const e=r.useContext(o);return r.useMemo((function(){return"function"==typeof t?t(e):{...e,...t}}),[e,t])}function s(t){let e;return e=t.disableParentContext?"function"==typeof t.components?t.components(n):t.components||n:a(t.components),r.createElement(o.Provider,{value:e},t.children)}},26312:(t,e,i)=>{"use strict";function r(t,e){let i;if(void 0===e)for(const r of t)null!=r&&(i=r)&&(i=r);else{let r=-1;for(let n of t)null!=(n=e(n,++r,t))&&(i=n)&&(i=n)}return i}function n(t,e){let i;if(void 0===e)for(const r of t)null!=r&&(i>r||void 0===i&&r>=r)&&(i=r);else{let r=-1;for(let n of t)null!=(n=e(n,++r,t))&&(i>n||void 0===i&&n>=n)&&(i=n)}return i}function o(t){return t}i.d(e,{JLW:()=>ts,l78:()=>x,tlR:()=>y,qrM:()=>fs,Yu4:()=>gs,IA3:()=>ys,Wi0:()=>bs,PGM:()=>Cs,OEq:()=>_s,y8u:()=>As,olC:()=>Ss,IrU:()=>Ls,oDi:()=>js,Q7f:()=>Ns,cVp:()=>Is,lUB:()=>rs,Lx9:()=>qs,nVG:()=>Ys,uxU:()=>Vs,Xf2:()=>Zs,GZz:()=>Qs,UPb:()=>tl,dyv:()=>Ks,bEH:()=>or,n8j:()=>as,T9B:()=>r,jkA:()=>n,rLf:()=>cs,WH:()=>pr,m4Y:()=>sn,UMr:()=>fr,w7C:()=>Ta,zt:()=>Aa,Ltv:()=>wa,Ubm:()=>Sa,JWy:()=>zi,UAC:()=>Tn,DCK:()=>io,TUC:()=>En,Agd:()=>_n,t6C:()=>xn,wXd:()=>Cn,ABi:()=>Ln,Ui6:()=>Hn,rGn:()=>Nn,ucG:()=>bn,YPH:()=>Bn,Mol:()=>jn,PGu:()=>Fn,GuW:()=>Mn});var a=1,s=2,l=3,c=4,h=1e-6;function u(t){return"translate("+t+",0)"}function d(t){return"translate(0,"+t+")"}function f(t){return e=>+t(e)}function p(t,e){return e=Math.max(0,t.bandwidth()-2*e)/2,t.round()&&(e=Math.round(e)),i=>+t(i)+e}function g(){return!this.__axis}function m(t,e){var i=[],r=null,n=null,m=6,y=6,x=3,b="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,C=t===a||t===c?-1:1,v=t===c||t===s?"x":"y",_=t===a||t===l?u:d;function k(u){var d=null==r?e.ticks?e.ticks.apply(e,i):e.domain():r,k=null==n?e.tickFormat?e.tickFormat.apply(e,i):o:n,T=Math.max(m,0)+x,A=e.range(),w=+A[0]+b,S=+A[A.length-1]+b,B=(e.bandwidth?p:f)(e.copy(),b),L=u.selection?u.selection():u,F=L.selectAll(".domain").data([null]),M=L.selectAll(".tick").data(d,e).order(),j=M.exit(),E=M.enter().append("g").attr("class","tick"),N=M.select("line"),O=M.select("text");F=F.merge(F.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),M=M.merge(E),N=N.merge(E.append("line").attr("stroke","currentColor").attr(v+"2",C*m)),O=O.merge(E.append("text").attr("fill","currentColor").attr(v,C*T).attr("dy",t===a?"0em":t===l?"0.71em":"0.32em")),u!==L&&(F=F.transition(u),M=M.transition(u),N=N.transition(u),O=O.transition(u),j=j.transition(u).attr("opacity",h).attr("transform",(function(t){return isFinite(t=B(t))?_(t+b):this.getAttribute("transform")})),E.attr("opacity",h).attr("transform",(function(t){var e=this.parentNode.__axis;return _((e&&isFinite(e=e(t))?e:B(t))+b)}))),j.remove(),F.attr("d",t===c||t===s?y?"M"+C*y+","+w+"H"+b+"V"+S+"H"+C*y:"M"+b+","+w+"V"+S:y?"M"+w+","+C*y+"V"+b+"H"+S+"V"+C*y:"M"+w+","+b+"H"+S),M.attr("opacity",1).attr("transform",(function(t){return _(B(t)+b)})),N.attr(v+"2",C*m),O.attr(v,C*T).text(k),L.filter(g).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===s?"start":t===c?"end":"middle"),L.each((function(){this.__axis=B}))}return k.scale=function(t){return arguments.length?(e=t,k):e},k.ticks=function(){return i=Array.from(arguments),k},k.tickArguments=function(t){return arguments.length?(i=null==t?[]:Array.from(t),k):i.slice()},k.tickValues=function(t){return arguments.length?(r=null==t?null:Array.from(t),k):r&&r.slice()},k.tickFormat=function(t){return arguments.length?(n=t,k):n},k.tickSize=function(t){return arguments.length?(m=y=+t,k):m},k.tickSizeInner=function(t){return arguments.length?(m=+t,k):m},k.tickSizeOuter=function(t){return arguments.length?(y=+t,k):y},k.tickPadding=function(t){return arguments.length?(x=+t,k):x},k.offset=function(t){return arguments.length?(b=+t,k):b},k}function y(t){return m(a,t)}function x(t){return m(l,t)}function b(){}function C(t){return null==t?b:function(){return this.querySelector(t)}}function v(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}function _(){return[]}function k(t){return null==t?_:function(){return this.querySelectorAll(t)}}function T(t){return function(){return this.matches(t)}}function A(t){return function(e){return e.matches(t)}}var w=Array.prototype.find;function S(){return this.firstElementChild}var B=Array.prototype.filter;function L(){return Array.from(this.children)}function F(t){return new Array(t.length)}function M(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function j(t,e,i,r,n,o){for(var a,s=0,l=e.length,c=o.length;se?1:t>=e?0:NaN}M.prototype={constructor:M,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var D="http://www.w3.org/1999/xhtml";const q={svg:"http://www.w3.org/2000/svg",xhtml:D,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function z(t){var e=t+="",i=e.indexOf(":");return i>=0&&"xmlns"!==(e=t.slice(0,i))&&(t=t.slice(i+1)),q.hasOwnProperty(e)?{space:q[e],local:t}:t}function $(t){return function(){this.removeAttribute(t)}}function P(t){return function(){this.removeAttributeNS(t.space,t.local)}}function R(t,e){return function(){this.setAttribute(t,e)}}function H(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function W(t,e){return function(){var i=e.apply(this,arguments);null==i?this.removeAttribute(t):this.setAttribute(t,i)}}function U(t,e){return function(){var i=e.apply(this,arguments);null==i?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,i)}}function Y(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function V(t){return function(){this.style.removeProperty(t)}}function G(t,e,i){return function(){this.style.setProperty(t,e,i)}}function X(t,e,i){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,i)}}function Z(t,e){return t.style.getPropertyValue(e)||Y(t).getComputedStyle(t,null).getPropertyValue(e)}function J(t){return function(){delete this[t]}}function Q(t,e){return function(){this[t]=e}}function K(t,e){return function(){var i=e.apply(this,arguments);null==i?delete this[t]:this[t]=i}}function tt(t){return t.trim().split(/^|\s+/)}function et(t){return t.classList||new it(t)}function it(t){this._node=t,this._names=tt(t.getAttribute("class")||"")}function rt(t,e){for(var i=et(t),r=-1,n=e.length;++r=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var Bt=[null];function Lt(t,e){this._groups=t,this._parents=e}function Ft(){return new Lt([[document.documentElement]],Bt)}Lt.prototype=Ft.prototype={constructor:Lt,select:function(t){"function"!=typeof t&&(t=C(t));for(var e=this._groups,i=e.length,r=new Array(i),n=0;n=v&&(v=C+1);!(b=y[v])&&++v=0;)(r=n[o])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(t){function e(e,i){return e&&i?t(e.__data__,i.__data__):!e-!i}t||(t=I);for(var i=this._groups,r=i.length,n=new Array(r),o=0;o1?this.each((null==e?V:"function"==typeof e?X:G)(t,e,null==i?"":i)):Z(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?J:"function"==typeof e?K:Q)(t,e)):this.node()[t]},classed:function(t,e){var i=tt(t+"");if(arguments.length<2){for(var r=et(this.node()),n=-1,o=i.length;++n=0&&(e=t.slice(i+1),t=t.slice(0,i)),{type:t,name:e}}))}(t+""),a=o.length;if(!(arguments.length<2)){for(s=e?Tt:kt,r=0;r{}};function Et(){for(var t,e=0,i=arguments.length,r={};e=0&&(e=t.slice(i+1),t=t.slice(0,i)),t&&!r.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}}))),a=-1,s=o.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a0)for(var i,r,n=new Array(i),o=0;o=0&&e._call.call(void 0,t),e=e._next;--$t}()}finally{$t=0,function(){var t,e,i=qt,r=1/0;for(;i;)i._call?(r>i._time&&(r=i._time),t=i,i=i._next):(e=i._next,i._next=null,i=t?t._next=e:qt=e);zt=t,te(r)}(),Wt=0}}function Kt(){var t=Yt.now(),e=t-Ht;e>1e3&&(Ut-=e,Ht=t)}function te(t){$t||(Pt&&(Pt=clearTimeout(Pt)),t-Wt>24?(t<1/0&&(Pt=setTimeout(Qt,t-Yt.now()-Ut)),Rt&&(Rt=clearInterval(Rt))):(Rt||(Ht=Yt.now(),Rt=setInterval(Kt,1e3)),$t=1,Vt(Qt)))}function ee(t,e,i){var r=new Zt;return e=null==e?0:+e,r.restart((i=>{r.stop(),t(i+e)}),e,i),r}Zt.prototype=Jt.prototype={constructor:Zt,restart:function(t,e,i){if("function"!=typeof t)throw new TypeError("callback is not a function");i=(null==i?Gt():+i)+(null==e?0:+e),this._next||zt===this||(zt?zt._next=this:qt=this,zt=this),this._call=t,this._time=i,te()},stop:function(){this._call&&(this._call=null,this._time=1/0,te())}};var ie=Dt("start","end","cancel","interrupt"),re=[];function ne(t,e,i,r,n,o){var a=t.__transition;if(a){if(i in a)return}else t.__transition={};!function(t,e,i){var r,n=t.__transition;function o(t){i.state=1,i.timer.restart(a,i.delay,i.time),i.delay<=t&&a(t-i.delay)}function a(o){var c,h,u,d;if(1!==i.state)return l();for(c in n)if((d=n[c]).name===i.name){if(3===d.state)return ee(a);4===d.state?(d.state=6,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete n[c]):+c0)throw new Error("too late; already scheduled");return i}function ae(t,e){var i=se(t,e);if(i.state>3)throw new Error("too late; already running");return i}function se(t,e){var i=t.__transition;if(!i||!(i=i[e]))throw new Error("transition not found");return i}function le(t,e){return t=+t,e=+e,function(i){return t*(1-i)+e*i}}var ce,he=180/Math.PI,ue={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function de(t,e,i,r,n,o){var a,s,l;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(l=t*i+e*r)&&(i-=t*l,r-=e*l),(s=Math.sqrt(i*i+r*r))&&(i/=s,r/=s,l/=s),t*r180?e+=360:e-t>180&&(t+=360),o.push({i:i.push(n(i)+"rotate(",null,r)-2,x:le(t,e)})):e&&i.push(n(i)+"rotate("+e+r)}(o.rotate,a.rotate,s,l),function(t,e,i,o){t!==e?o.push({i:i.push(n(i)+"skewX(",null,r)-2,x:le(t,e)}):e&&i.push(n(i)+"skewX("+e+r)}(o.skewX,a.skewX,s,l),function(t,e,i,r,o,a){if(t!==i||e!==r){var s=o.push(n(o)+"scale(",null,",",null,")");a.push({i:s-4,x:le(t,i)},{i:s-2,x:le(e,r)})}else 1===i&&1===r||o.push(n(o)+"scale("+i+","+r+")")}(o.scaleX,o.scaleY,a.scaleX,a.scaleY,s,l),o=a=null,function(t){for(var e,i=-1,r=l.length;++i>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===i?ze(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===i?ze(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=Be.exec(t))?new Re(e[1],e[2],e[3],1):(e=Le.exec(t))?new Re(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Fe.exec(t))?ze(e[1],e[2],e[3],e[4]):(e=Me.exec(t))?ze(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=je.exec(t))?Ge(e[1],e[2]/100,e[3]/100,1):(e=Ee.exec(t))?Ge(e[1],e[2]/100,e[3]/100,e[4]):Ne.hasOwnProperty(t)?qe(Ne[t]):"transparent"===t?new Re(NaN,NaN,NaN,0):null}function qe(t){return new Re(t>>16&255,t>>8&255,255&t,1)}function ze(t,e,i,r){return r<=0&&(t=e=i=NaN),new Re(t,e,i,r)}function $e(t){return t instanceof ve||(t=De(t)),t?new Re((t=t.rgb()).r,t.g,t.b,t.opacity):new Re}function Pe(t,e,i,r){return 1===arguments.length?$e(t):new Re(t,e,i,null==r?1:r)}function Re(t,e,i,r){this.r=+t,this.g=+e,this.b=+i,this.opacity=+r}function He(){return`#${Ve(this.r)}${Ve(this.g)}${Ve(this.b)}`}function We(){const t=Ue(this.opacity);return`${1===t?"rgb(":"rgba("}${Ye(this.r)}, ${Ye(this.g)}, ${Ye(this.b)}${1===t?")":`, ${t})`}`}function Ue(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Ye(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Ve(t){return((t=Ye(t))<16?"0":"")+t.toString(16)}function Ge(t,e,i,r){return r<=0?t=e=i=NaN:i<=0||i>=1?t=e=NaN:e<=0&&(t=NaN),new Ze(t,e,i,r)}function Xe(t){if(t instanceof Ze)return new Ze(t.h,t.s,t.l,t.opacity);if(t instanceof ve||(t=De(t)),!t)return new Ze;if(t instanceof Ze)return t;var e=(t=t.rgb()).r/255,i=t.g/255,r=t.b/255,n=Math.min(e,i,r),o=Math.max(e,i,r),a=NaN,s=o-n,l=(o+n)/2;return s?(a=e===o?(i-r)/s+6*(i0&&l<1?0:a,new Ze(a,s,l,t.opacity)}function Ze(t,e,i,r){this.h=+t,this.s=+e,this.l=+i,this.opacity=+r}function Je(t){return(t=(t||0)%360)<0?t+360:t}function Qe(t){return Math.max(0,Math.min(1,t||0))}function Ke(t,e,i){return 255*(t<60?e+(i-e)*t/60:t<180?i:t<240?e+(i-e)*(240-t)/60:e)}function ti(t,e,i,r,n){var o=t*t,a=o*t;return((1-3*t+3*o-a)*e+(4-6*o+3*a)*i+(1+3*t+3*o-3*a)*r+a*n)/6}be(ve,De,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Oe,formatHex:Oe,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Xe(this).formatHsl()},formatRgb:Ie,toString:Ie}),be(Re,Pe,Ce(ve,{brighter(t){return t=null==t?ke:Math.pow(ke,t),new Re(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?_e:Math.pow(_e,t),new Re(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Re(Ye(this.r),Ye(this.g),Ye(this.b),Ue(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:He,formatHex:He,formatHex8:function(){return`#${Ve(this.r)}${Ve(this.g)}${Ve(this.b)}${Ve(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:We,toString:We})),be(Ze,(function(t,e,i,r){return 1===arguments.length?Xe(t):new Ze(t,e,i,null==r?1:r)}),Ce(ve,{brighter(t){return t=null==t?ke:Math.pow(ke,t),new Ze(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?_e:Math.pow(_e,t),new Ze(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,i=this.l,r=i+(i<.5?i:1-i)*e,n=2*i-r;return new Re(Ke(t>=240?t-240:t+120,n,r),Ke(t,n,r),Ke(t<120?t+240:t-120,n,r),this.opacity)},clamp(){return new Ze(Je(this.h),Qe(this.s),Qe(this.l),Ue(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=Ue(this.opacity);return`${1===t?"hsl(":"hsla("}${Je(this.h)}, ${100*Qe(this.s)}%, ${100*Qe(this.l)}%${1===t?")":`, ${t})`}`}}));const ei=t=>()=>t;function ii(t,e){return function(i){return t+i*e}}function ri(t){return 1==(t=+t)?ni:function(e,i){return i-e?function(t,e,i){return t=Math.pow(t,i),e=Math.pow(e,i)-t,i=1/i,function(r){return Math.pow(t+r*e,i)}}(e,i,t):ei(isNaN(e)?i:e)}}function ni(t,e){var i=e-t;return i?ii(t,i):ei(isNaN(t)?e:t)}const oi=function t(e){var i=ri(e);function r(t,e){var r=i((t=Pe(t)).r,(e=Pe(e)).r),n=i(t.g,e.g),o=i(t.b,e.b),a=ni(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=n(e),t.b=o(e),t.opacity=a(e),t+""}}return r.gamma=t,r}(1);function ai(t){return function(e){var i,r,n=e.length,o=new Array(n),a=new Array(n),s=new Array(n);for(i=0;i=1?(i=1,e-1):Math.floor(i*e),n=t[r],o=t[r+1],a=r>0?t[r-1]:2*n-o,s=ro&&(n=e.slice(o,n),s[a]?s[a]+=n:s[++a]=n),(i=i[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,l.push({i:a,x:le(i,r)})),o=li.lastIndex;return o=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?oe:ae;return function(){var a=o(this,t),s=a.on;s!==r&&(n=(r=s).copy()).on(e,i),a.on=n}}(i,t,e))},attr:function(t,e){var i=z(t),r="transform"===i?ge:hi;return this.attrTween(t,"function"==typeof e?(i.local?mi:gi)(i,r,xe(this,"attr."+t,e)):null==e?(i.local?di:ui)(i):(i.local?pi:fi)(i,r,e))},attrTween:function(t,e){var i="attr."+t;if(arguments.length<2)return(i=this.tween(i))&&i._value;if(null==e)return this.tween(i,null);if("function"!=typeof e)throw new Error;var r=z(t);return this.tween(i,(r.local?yi:xi)(r,e))},style:function(t,e,i){var r="transform"==(t+="")?pe:hi;return null==e?this.styleTween(t,function(t,e){var i,r,n;return function(){var o=Z(this,t),a=(this.style.removeProperty(t),Z(this,t));return o===a?null:o===i&&a===r?n:n=e(i=o,r=a)}}(t,r)).on("end.style."+t,Ti(t)):"function"==typeof e?this.styleTween(t,function(t,e,i){var r,n,o;return function(){var a=Z(this,t),s=i(this),l=s+"";return null==s&&(this.style.removeProperty(t),l=s=Z(this,t)),a===l?null:a===r&&l===n?o:(n=l,o=e(r=a,s))}}(t,r,xe(this,"style."+t,e))).each(function(t,e){var i,r,n,o,a="style."+e,s="end."+a;return function(){var l=ae(this,t),c=l.on,h=null==l.value[a]?o||(o=Ti(e)):void 0;c===i&&n===h||(r=(i=c).copy()).on(s,n=h),l.on=r}}(this._id,t)):this.styleTween(t,function(t,e,i){var r,n,o=i+"";return function(){var a=Z(this,t);return a===o?null:a===r?n:n=e(r=a,i)}}(t,r,e),i).on("end.style."+t,null)},styleTween:function(t,e,i){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,function(t,e,i){var r,n;function o(){var o=e.apply(this,arguments);return o!==n&&(r=(n=o)&&function(t,e,i){return function(r){this.style.setProperty(t,e.call(this,r),i)}}(t,o,i)),r}return o._value=e,o}(t,e,null==i?"":i))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(xe(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,function(t){var e,i;function r(){var r=t.apply(this,arguments);return r!==i&&(e=(i=r)&&function(t){return function(e){this.textContent=t.call(this,e)}}(r)),e}return r._value=t,r}(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var i in this.__transition)if(+i!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var i=this._id;if(t+="",arguments.length<2){for(var r,n=se(this.node(),i).tween,o=0,a=n.length;o2&&i.state<5,i.state=6,i.timer.stop(),i.on.call(r?"interrupt":"cancel",t,t.__data__,i.index,i.group),delete o[n]):a=!1;a&&delete t.__transition}}(this,t)}))},Mt.prototype.transition=function(t){var e,i;t instanceof wi?(e=t._id,t=t._name):(e=Si(),(i=Li).time=Gt(),t=null==t?null:t+"");for(var r=this._groups,n=r.length,o=0;ofunction(t,e){return fetch(t,e).then(Di)}(e,i).then((e=>(new DOMParser).parseFromString(e,t)))}qi("application/xml");qi("text/html");var zi=qi("image/svg+xml");const $i=Math.PI/180,Pi=180/Math.PI,Ri=.96422,Hi=.82521,Wi=4/29,Ui=6/29,Yi=3*Ui*Ui,Vi=Ui*Ui*Ui;function Gi(t){if(t instanceof Xi)return new Xi(t.l,t.a,t.b,t.opacity);if(t instanceof ir)return rr(t);t instanceof Re||(t=$e(t));var e,i,r=Ki(t.r),n=Ki(t.g),o=Ki(t.b),a=Zi((.2225045*r+.7168786*n+.0606169*o)/1);return r===n&&n===o?e=i=a:(e=Zi((.4360747*r+.3850649*n+.1430804*o)/Ri),i=Zi((.0139322*r+.0971045*n+.7141733*o)/Hi)),new Xi(116*a-16,500*(e-a),200*(a-i),t.opacity)}function Xi(t,e,i,r){this.l=+t,this.a=+e,this.b=+i,this.opacity=+r}function Zi(t){return t>Vi?Math.pow(t,1/3):t/Yi+Wi}function Ji(t){return t>Ui?t*t*t:Yi*(t-Wi)}function Qi(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Ki(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function tr(t){if(t instanceof ir)return new ir(t.h,t.c,t.l,t.opacity);if(t instanceof Xi||(t=Gi(t)),0===t.a&&0===t.b)return new ir(NaN,0180||i<-180?i-360*Math.round(i/360):i):ei(isNaN(t)?e:t)}));nr(ni);function ar(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}class sr extends Map{constructor(t,e=ur){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const[i,r]of t)this.set(i,r)}get(t){return super.get(lr(this,t))}has(t){return super.has(lr(this,t))}set(t,e){return super.set(cr(this,t),e)}delete(t){return super.delete(hr(this,t))}}Set;function lr({_intern:t,_key:e},i){const r=e(i);return t.has(r)?t.get(r):i}function cr({_intern:t,_key:e},i){const r=e(i);return t.has(r)?t.get(r):(t.set(r,i),i)}function hr({_intern:t,_key:e},i){const r=e(i);return t.has(r)&&(i=t.get(r),t.delete(r)),i}function ur(t){return null!==t&&"object"==typeof t?t.valueOf():t}const dr=Symbol("implicit");function fr(){var t=new sr,e=[],i=[],r=dr;function n(n){let o=t.get(n);if(void 0===o){if(r!==dr)return r;t.set(n,o=e.push(n)-1)}return i[o%i.length]}return n.domain=function(i){if(!arguments.length)return e.slice();e=[],t=new sr;for(const r of i)t.has(r)||t.set(r,e.push(r)-1);return n},n.range=function(t){return arguments.length?(i=Array.from(t),n):i.slice()},n.unknown=function(t){return arguments.length?(r=t,n):r},n.copy=function(){return fr(e,i).unknown(r)},ar.apply(n,arguments),n}function pr(){var t,e,i=fr().unknown(void 0),r=i.domain,n=i.range,o=0,a=1,s=!1,l=0,c=0,h=.5;function u(){var i=r().length,u=a=gr?10:o>=mr?5:o>=yr?2:1;let s,l,c;return n<0?(c=Math.pow(10,-n)/a,s=Math.round(t*c),l=Math.round(e*c),s/ce&&--l,c=-c):(c=Math.pow(10,n)*a,s=Math.round(t/c),l=Math.round(e/c),s*ce&&--l),le?1:t>=e?0:NaN}function _r(t,e){return null==t||null==e?NaN:et?1:e>=t?0:NaN}function kr(t){let e,i,r;function n(t,r,n=0,o=t.length){if(n>>1;i(t[e],r)<0?n=e+1:o=e}while(nvr(t(e),i),r=(e,i)=>t(e)-i):(e=t===vr||t===_r?t:Tr,i=t,r=t),{left:n,center:function(t,e,i=0,o=t.length){const a=n(t,e,i,o-1);return a>i&&r(t[a-1],e)>-r(t[a],e)?a-1:a},right:function(t,r,n=0,o=t.length){if(n>>1;i(t[e],r)<=0?n=e+1:o=e}while(ne&&(i=t,t=e,e=i),c=function(i){return Math.max(t,Math.min(e,i))}),r=l>2?zr:qr,n=o=null,u}function u(e){return null==e||isNaN(e=+e)?i:(n||(n=r(a.map(t),s,l)))(t(c(e)))}return u.invert=function(i){return c(e((o||(o=r(s,a.map(t),le)))(i)))},u.domain=function(t){return arguments.length?(a=Array.from(t,Nr),h()):a.slice()},u.range=function(t){return arguments.length?(s=Array.from(t),h()):s.slice()},u.rangeRound=function(t){return s=Array.from(t),l=Er,h()},u.clamp=function(t){return arguments.length?(c=!!t||Ir,h()):c!==Ir},u.interpolate=function(t){return arguments.length?(l=t,h()):l},u.unknown=function(t){return arguments.length?(i=t,u):i},function(i,r){return t=i,e=r,h()}}function Rr(){return Pr()(Ir,Ir)}var Hr,Wr=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ur(t){if(!(e=Wr.exec(t)))throw new Error("invalid format: "+t);var e;return new Yr({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function Yr(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function Vr(t,e){if((i=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var i,r=t.slice(0,i);return[r.length>1?r[0]+r.slice(2):r,+t.slice(i+1)]}function Gr(t){return(t=Vr(Math.abs(t)))?t[1]:NaN}function Xr(t,e){var i=Vr(t,e);if(!i)return t+"";var r=i[0],n=i[1];return n<0?"0."+new Array(-n).join("0")+r:r.length>n+1?r.slice(0,n+1)+"."+r.slice(n+1):r+new Array(n-r.length+2).join("0")}Ur.prototype=Yr.prototype,Yr.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const Zr={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>Xr(100*t,e),r:Xr,s:function(t,e){var i=Vr(t,e);if(!i)return t+"";var r=i[0],n=i[1],o=n-(Hr=3*Math.max(-8,Math.min(8,Math.floor(n/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Vr(t,Math.max(0,e+o-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Jr(t){return t}var Qr,Kr,tn,en=Array.prototype.map,rn=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"];function nn(t){var e,i,r=void 0===t.grouping||void 0===t.thousands?Jr:(e=en.call(t.grouping,Number),i=t.thousands+"",function(t,r){for(var n=t.length,o=[],a=0,s=e[0],l=0;n>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),o.push(t.substring(n-=s,n+s)),!((l+=s+1)>r));)s=e[a=(a+1)%e.length];return o.reverse().join(i)}),n=void 0===t.currency?"":t.currency[0]+"",o=void 0===t.currency?"":t.currency[1]+"",a=void 0===t.decimal?".":t.decimal+"",s=void 0===t.numerals?Jr:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(en.call(t.numerals,String)),l=void 0===t.percent?"%":t.percent+"",c=void 0===t.minus?"\u2212":t.minus+"",h=void 0===t.nan?"NaN":t.nan+"";function u(t){var e=(t=Ur(t)).fill,i=t.align,u=t.sign,d=t.symbol,f=t.zero,p=t.width,g=t.comma,m=t.precision,y=t.trim,x=t.type;"n"===x?(g=!0,x="g"):Zr[x]||(void 0===m&&(m=12),y=!0,x="g"),(f||"0"===e&&"="===i)&&(f=!0,e="0",i="=");var b="$"===d?n:"#"===d&&/[boxX]/.test(x)?"0"+x.toLowerCase():"",C="$"===d?o:/[%p]/.test(x)?l:"",v=Zr[x],_=/[defgprs%]/.test(x);function k(t){var n,o,l,d=b,k=C;if("c"===x)k=v(t)+k,t="";else{var T=(t=+t)<0||1/t<0;if(t=isNaN(t)?h:v(Math.abs(t),m),y&&(t=function(t){t:for(var e,i=t.length,r=1,n=-1;r0&&(n=0)}return n>0?t.slice(0,n)+t.slice(e+1):t}(t)),T&&0==+t&&"+"!==u&&(T=!1),d=(T?"("===u?u:c:"-"===u||"("===u?"":u)+d,k=("s"===x?rn[8+Hr/3]:"")+k+(T&&"("===u?")":""),_)for(n=-1,o=t.length;++n(l=t.charCodeAt(n))||l>57){k=(46===l?a+t.slice(n+1):t.slice(n))+k,t=t.slice(0,n);break}}g&&!f&&(t=r(t,1/0));var A=d.length+t.length+k.length,w=A>1)+d+t+k+w.slice(A);break;default:t=w+d+t+k}return s(t)}return m=void 0===m?6:/[gprs]/.test(x)?Math.max(1,Math.min(21,m)):Math.max(0,Math.min(20,m)),k.toString=function(){return t+""},k}return{format:u,formatPrefix:function(t,e){var i=u(((t=Ur(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(Gr(e)/3))),n=Math.pow(10,-r),o=rn[8+r/3];return function(t){return i(n*t)+o}}}}function on(t,e,i,r){var n,o=Cr(t,e,i);switch((r=Ur(null==r?",f":r)).type){case"s":var a=Math.max(Math.abs(t),Math.abs(e));return null!=r.precision||isNaN(n=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Gr(e)/3)))-Gr(Math.abs(t)))}(o,a))||(r.precision=n),tn(r,a);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(n=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Gr(e)-Gr(t))+1}(o,Math.max(Math.abs(t),Math.abs(e))))||(r.precision=n-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(n=function(t){return Math.max(0,-Gr(Math.abs(t)))}(o))||(r.precision=n-2*("%"===r.type))}return Kr(r)}function an(t){var e=t.domain;return t.ticks=function(t){var i=e();return function(t,e,i){if(!((i=+i)>0))return[];if((t=+t)==(e=+e))return[t];const r=e=n))return[];const s=o-n+1,l=new Array(s);if(r)if(a<0)for(let c=0;c0;){if((n=br(l,c,i))===r)return o[a]=l,o[s]=c,e(o);if(n>0)l=Math.floor(l/n)*n,c=Math.ceil(c/n)*n;else{if(!(n<0))break;l=Math.ceil(l*n)/n,c=Math.floor(c*n)/n}r=n}return t},t}function sn(){var t=Rr();return t.copy=function(){return $r(t,sn())},ar.apply(t,arguments),an(t)}Qr=nn({thousands:",",grouping:[3],currency:["$",""]}),Kr=Qr.format,tn=Qr.formatPrefix;const ln=1e3,cn=6e4,hn=36e5,un=864e5,dn=6048e5,fn=2592e6,pn=31536e6,gn=new Date,mn=new Date;function yn(t,e,i,r){function n(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return n.floor=e=>(t(e=new Date(+e)),e),n.ceil=i=>(t(i=new Date(i-1)),e(i,1),t(i),i),n.round=t=>{const e=n(t),i=n.ceil(t);return t-e(e(t=new Date(+t),null==i?1:Math.floor(i)),t),n.range=(i,r,o)=>{const a=[];if(i=n.ceil(i),o=null==o?1:Math.floor(o),!(i0))return a;let s;do{a.push(s=new Date(+i)),e(i,o),t(i)}while(syn((e=>{if(e>=e)for(;t(e),!i(e);)e.setTime(e-1)}),((t,r)=>{if(t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!i(t););else for(;--r>=0;)for(;e(t,1),!i(t););})),i&&(n.count=(e,r)=>(gn.setTime(+e),mn.setTime(+r),t(gn),t(mn),Math.floor(i(gn,mn))),n.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?n.filter(r?e=>r(e)%t==0:e=>n.count(0,e)%t==0):n:null)),n}const xn=yn((()=>{}),((t,e)=>{t.setTime(+t+e)}),((t,e)=>e-t));xn.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?yn((e=>{e.setTime(Math.floor(e/t)*t)}),((e,i)=>{e.setTime(+e+i*t)}),((e,i)=>(i-e)/t)):xn:null);xn.range;const bn=yn((t=>{t.setTime(t-t.getMilliseconds())}),((t,e)=>{t.setTime(+t+e*ln)}),((t,e)=>(e-t)/ln),(t=>t.getUTCSeconds())),Cn=(bn.range,yn((t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*ln)}),((t,e)=>{t.setTime(+t+e*cn)}),((t,e)=>(e-t)/cn),(t=>t.getMinutes()))),vn=(Cn.range,yn((t=>{t.setUTCSeconds(0,0)}),((t,e)=>{t.setTime(+t+e*cn)}),((t,e)=>(e-t)/cn),(t=>t.getUTCMinutes()))),_n=(vn.range,yn((t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*ln-t.getMinutes()*cn)}),((t,e)=>{t.setTime(+t+e*hn)}),((t,e)=>(e-t)/hn),(t=>t.getHours()))),kn=(_n.range,yn((t=>{t.setUTCMinutes(0,0,0)}),((t,e)=>{t.setTime(+t+e*hn)}),((t,e)=>(e-t)/hn),(t=>t.getUTCHours()))),Tn=(kn.range,yn((t=>t.setHours(0,0,0,0)),((t,e)=>t.setDate(t.getDate()+e)),((t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*cn)/un),(t=>t.getDate()-1))),An=(Tn.range,yn((t=>{t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+e)}),((t,e)=>(e-t)/un),(t=>t.getUTCDate()-1))),wn=(An.range,yn((t=>{t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+e)}),((t,e)=>(e-t)/un),(t=>Math.floor(t/un))));wn.range;function Sn(t){return yn((e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),((t,e)=>{t.setDate(t.getDate()+7*e)}),((t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*cn)/dn))}const Bn=Sn(0),Ln=Sn(1),Fn=Sn(2),Mn=Sn(3),jn=Sn(4),En=Sn(5),Nn=Sn(6);Bn.range,Ln.range,Fn.range,Mn.range,jn.range,En.range,Nn.range;function On(t){return yn((e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+7*e)}),((t,e)=>(e-t)/dn))}const In=On(0),Dn=On(1),qn=On(2),zn=On(3),$n=On(4),Pn=On(5),Rn=On(6),Hn=(In.range,Dn.range,qn.range,zn.range,$n.range,Pn.range,Rn.range,yn((t=>{t.setDate(1),t.setHours(0,0,0,0)}),((t,e)=>{t.setMonth(t.getMonth()+e)}),((t,e)=>e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())),(t=>t.getMonth()))),Wn=(Hn.range,yn((t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)}),((t,e)=>e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())),(t=>t.getUTCMonth()))),Un=(Wn.range,yn((t=>{t.setMonth(0,1),t.setHours(0,0,0,0)}),((t,e)=>{t.setFullYear(t.getFullYear()+e)}),((t,e)=>e.getFullYear()-t.getFullYear()),(t=>t.getFullYear())));Un.every=t=>isFinite(t=Math.floor(t))&&t>0?yn((e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),((e,i)=>{e.setFullYear(e.getFullYear()+i*t)})):null;Un.range;const Yn=yn((t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)}),((t,e)=>e.getUTCFullYear()-t.getUTCFullYear()),(t=>t.getUTCFullYear()));Yn.every=t=>isFinite(t=Math.floor(t))&&t>0?yn((e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),((e,i)=>{e.setUTCFullYear(e.getUTCFullYear()+i*t)})):null;Yn.range;function Vn(t,e,i,r,n,o){const a=[[bn,1,ln],[bn,5,5e3],[bn,15,15e3],[bn,30,3e4],[o,1,cn],[o,5,3e5],[o,15,9e5],[o,30,18e5],[n,1,hn],[n,3,108e5],[n,6,216e5],[n,12,432e5],[r,1,un],[r,2,1728e5],[i,1,dn],[e,1,fn],[e,3,7776e6],[t,1,pn]];function s(e,i,r){const n=Math.abs(i-e)/r,o=kr((([,,t])=>t)).right(a,n);if(o===a.length)return t.every(Cr(e/pn,i/pn,r));if(0===o)return xn.every(Math.max(Cr(e,i,r),1));const[s,l]=a[n/a[o-1][2][t.toLowerCase(),e])))}function uo(t,e,i){var r=no.exec(e.slice(i,i+1));return r?(t.w=+r[0],i+r[0].length):-1}function fo(t,e,i){var r=no.exec(e.slice(i,i+1));return r?(t.u=+r[0],i+r[0].length):-1}function po(t,e,i){var r=no.exec(e.slice(i,i+2));return r?(t.U=+r[0],i+r[0].length):-1}function go(t,e,i){var r=no.exec(e.slice(i,i+2));return r?(t.V=+r[0],i+r[0].length):-1}function mo(t,e,i){var r=no.exec(e.slice(i,i+2));return r?(t.W=+r[0],i+r[0].length):-1}function yo(t,e,i){var r=no.exec(e.slice(i,i+4));return r?(t.y=+r[0],i+r[0].length):-1}function xo(t,e,i){var r=no.exec(e.slice(i,i+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),i+r[0].length):-1}function bo(t,e,i){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(i,i+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),i+r[0].length):-1}function Co(t,e,i){var r=no.exec(e.slice(i,i+1));return r?(t.q=3*r[0]-3,i+r[0].length):-1}function vo(t,e,i){var r=no.exec(e.slice(i,i+2));return r?(t.m=r[0]-1,i+r[0].length):-1}function _o(t,e,i){var r=no.exec(e.slice(i,i+2));return r?(t.d=+r[0],i+r[0].length):-1}function ko(t,e,i){var r=no.exec(e.slice(i,i+3));return r?(t.m=0,t.d=+r[0],i+r[0].length):-1}function To(t,e,i){var r=no.exec(e.slice(i,i+2));return r?(t.H=+r[0],i+r[0].length):-1}function Ao(t,e,i){var r=no.exec(e.slice(i,i+2));return r?(t.M=+r[0],i+r[0].length):-1}function wo(t,e,i){var r=no.exec(e.slice(i,i+2));return r?(t.S=+r[0],i+r[0].length):-1}function So(t,e,i){var r=no.exec(e.slice(i,i+3));return r?(t.L=+r[0],i+r[0].length):-1}function Bo(t,e,i){var r=no.exec(e.slice(i,i+6));return r?(t.L=Math.floor(r[0]/1e3),i+r[0].length):-1}function Lo(t,e,i){var r=oo.exec(e.slice(i,i+1));return r?i+r[0].length:-1}function Fo(t,e,i){var r=no.exec(e.slice(i));return r?(t.Q=+r[0],i+r[0].length):-1}function Mo(t,e,i){var r=no.exec(e.slice(i));return r?(t.s=+r[0],i+r[0].length):-1}function jo(t,e){return so(t.getDate(),e,2)}function Eo(t,e){return so(t.getHours(),e,2)}function No(t,e){return so(t.getHours()%12||12,e,2)}function Oo(t,e){return so(1+Tn.count(Un(t),t),e,3)}function Io(t,e){return so(t.getMilliseconds(),e,3)}function Do(t,e){return Io(t,e)+"000"}function qo(t,e){return so(t.getMonth()+1,e,2)}function zo(t,e){return so(t.getMinutes(),e,2)}function $o(t,e){return so(t.getSeconds(),e,2)}function Po(t){var e=t.getDay();return 0===e?7:e}function Ro(t,e){return so(Bn.count(Un(t)-1,t),e,2)}function Ho(t){var e=t.getDay();return e>=4||0===e?jn(t):jn.ceil(t)}function Wo(t,e){return t=Ho(t),so(jn.count(Un(t),t)+(4===Un(t).getDay()),e,2)}function Uo(t){return t.getDay()}function Yo(t,e){return so(Ln.count(Un(t)-1,t),e,2)}function Vo(t,e){return so(t.getFullYear()%100,e,2)}function Go(t,e){return so((t=Ho(t)).getFullYear()%100,e,2)}function Xo(t,e){return so(t.getFullYear()%1e4,e,4)}function Zo(t,e){var i=t.getDay();return so((t=i>=4||0===i?jn(t):jn.ceil(t)).getFullYear()%1e4,e,4)}function Jo(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+so(e/60|0,"0",2)+so(e%60,"0",2)}function Qo(t,e){return so(t.getUTCDate(),e,2)}function Ko(t,e){return so(t.getUTCHours(),e,2)}function ta(t,e){return so(t.getUTCHours()%12||12,e,2)}function ea(t,e){return so(1+An.count(Yn(t),t),e,3)}function ia(t,e){return so(t.getUTCMilliseconds(),e,3)}function ra(t,e){return ia(t,e)+"000"}function na(t,e){return so(t.getUTCMonth()+1,e,2)}function oa(t,e){return so(t.getUTCMinutes(),e,2)}function aa(t,e){return so(t.getUTCSeconds(),e,2)}function sa(t){var e=t.getUTCDay();return 0===e?7:e}function la(t,e){return so(In.count(Yn(t)-1,t),e,2)}function ca(t){var e=t.getUTCDay();return e>=4||0===e?$n(t):$n.ceil(t)}function ha(t,e){return t=ca(t),so($n.count(Yn(t),t)+(4===Yn(t).getUTCDay()),e,2)}function ua(t){return t.getUTCDay()}function da(t,e){return so(Dn.count(Yn(t)-1,t),e,2)}function fa(t,e){return so(t.getUTCFullYear()%100,e,2)}function pa(t,e){return so((t=ca(t)).getUTCFullYear()%100,e,2)}function ga(t,e){return so(t.getUTCFullYear()%1e4,e,4)}function ma(t,e){var i=t.getUTCDay();return so((t=i>=4||0===i?$n(t):$n.ceil(t)).getUTCFullYear()%1e4,e,4)}function ya(){return"+0000"}function xa(){return"%"}function ba(t){return+t}function Ca(t){return Math.floor(+t/1e3)}function va(t){return new Date(t)}function _a(t){return t instanceof Date?+t:+new Date(+t)}function ka(t,e,i,r,n,o,a,s,l,c){var h=Rr(),u=h.invert,d=h.domain,f=c(".%L"),p=c(":%S"),g=c("%I:%M"),m=c("%I %p"),y=c("%a %d"),x=c("%b %d"),b=c("%B"),C=c("%Y");function v(t){return(l(t)=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:ba,s:Ca,S:$o,u:Po,U:Ro,V:Wo,w:Uo,W:Yo,x:null,X:null,y:Vo,Y:Xo,Z:Jo,"%":xa},C={a:function(t){return a[t.getUTCDay()]},A:function(t){return o[t.getUTCDay()]},b:function(t){return l[t.getUTCMonth()]},B:function(t){return s[t.getUTCMonth()]},c:null,d:Qo,e:Qo,f:ra,g:pa,G:ma,H:Ko,I:ta,j:ea,L:ia,m:na,M:oa,p:function(t){return n[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:ba,s:Ca,S:aa,u:sa,U:la,V:ha,w:ua,W:da,x:null,X:null,y:fa,Y:ga,Z:ya,"%":xa},v={a:function(t,e,i){var r=f.exec(e.slice(i));return r?(t.w=p.get(r[0].toLowerCase()),i+r[0].length):-1},A:function(t,e,i){var r=u.exec(e.slice(i));return r?(t.w=d.get(r[0].toLowerCase()),i+r[0].length):-1},b:function(t,e,i){var r=y.exec(e.slice(i));return r?(t.m=x.get(r[0].toLowerCase()),i+r[0].length):-1},B:function(t,e,i){var r=g.exec(e.slice(i));return r?(t.m=m.get(r[0].toLowerCase()),i+r[0].length):-1},c:function(t,i,r){return T(t,e,i,r)},d:_o,e:_o,f:Bo,g:xo,G:yo,H:To,I:To,j:ko,L:So,m:vo,M:Ao,p:function(t,e,i){var r=c.exec(e.slice(i));return r?(t.p=h.get(r[0].toLowerCase()),i+r[0].length):-1},q:Co,Q:Fo,s:Mo,S:wo,u:fo,U:po,V:go,w:uo,W:mo,x:function(t,e,r){return T(t,i,e,r)},X:function(t,e,i){return T(t,r,e,i)},y:xo,Y:yo,Z:bo,"%":Lo};function _(t,e){return function(i){var r,n,o,a=[],s=-1,l=0,c=t.length;for(i instanceof Date||(i=new Date(+i));++s53)return null;"w"in o||(o.w=1),"Z"in o?(n=(r=Kn(to(o.y,0,1))).getUTCDay(),r=n>4||0===n?Dn.ceil(r):Dn(r),r=An.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(n=(r=Qn(to(o.y,0,1))).getDay(),r=n>4||0===n?Ln.ceil(r):Ln(r),r=Tn.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),n="Z"in o?Kn(to(o.y,0,1)).getUTCDay():Qn(to(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(n+5)%7:o.w+7*o.U-(n+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,Kn(o)):Qn(o)}}function T(t,e,i,r){for(var n,o,a=0,s=e.length,l=i.length;a=l)return-1;if(37===(n=e.charCodeAt(a++))){if(n=e.charAt(a++),!(o=v[n in ro?e.charAt(a++):n])||(r=o(t,i,r))<0)return-1}else if(n!=i.charCodeAt(r++))return-1}return r}return b.x=_(i,b),b.X=_(r,b),b.c=_(e,b),C.x=_(i,C),C.X=_(r,C),C.c=_(e,C),{format:function(t){var e=_(t+="",b);return e.toString=function(){return t},e},parse:function(t){var e=k(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=_(t+="",C);return e.toString=function(){return t},e},utcParse:function(t){var e=k(t+="",!0);return e.toString=function(){return t},e}}}(t),io=eo.format,eo.parse,eo.utcFormat,eo.utcParse}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});const Aa=function(t){for(var e=t.length/6|0,i=new Array(e),r=0;r=1?qa:t<=-1?-qa:Math.asin(t)}const Pa=Math.PI,Ra=2*Pa,Ha=1e-6,Wa=Ra-Ha;function Ua(t){this._+=t[0];for(let e=1,i=t.length;e=0))throw new Error(`invalid digits: ${t}`);if(e>15)return Ua;const i=10**e;return function(t){this._+=t[0];for(let e=1,r=t.length;eHa)if(Math.abs(h*s-l*c)>Ha&&n){let d=i-o,f=r-a,p=s*s+l*l,g=d*d+f*f,m=Math.sqrt(p),y=Math.sqrt(u),x=n*Math.tan((Pa-Math.acos((p+u-g)/(2*m*y)))/2),b=x/y,C=x/m;Math.abs(b-1)>Ha&&this._append`L${t+b*c},${e+b*h}`,this._append`A${n},${n},0,0,${+(h*d>c*f)},${this._x1=t+C*s},${this._y1=e+C*l}`}else this._append`L${this._x1=t},${this._y1=e}`;else;}arc(t,e,i,r,n,o){if(t=+t,e=+e,o=!!o,(i=+i)<0)throw new Error(`negative radius: ${i}`);let a=i*Math.cos(r),s=i*Math.sin(r),l=t+a,c=e+s,h=1^o,u=o?r-n:n-r;null===this._x1?this._append`M${l},${c}`:(Math.abs(this._x1-l)>Ha||Math.abs(this._y1-c)>Ha)&&this._append`L${l},${c}`,i&&(u<0&&(u=u%Ra+Ra),u>Wa?this._append`A${i},${i},0,1,${h},${t-a},${e-s}A${i},${i},0,1,${h},${this._x1=l},${this._y1=c}`:u>Ha&&this._append`A${i},${i},0,${+(u>=Pa)},${h},${this._x1=t+i*Math.cos(n)},${this._y1=e+i*Math.sin(n)}`)}rect(t,e,i,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${i=+i}v${+r}h${-i}Z`}toString(){return this._}}function Va(t){let e=3;return t.digits=function(i){if(!arguments.length)return e;if(null==i)e=null;else{const t=Math.floor(i);if(!(t>=0))throw new RangeError(`invalid digits: ${i}`);e=t}return t},()=>new Ya(e)}function Ga(t){return t.innerRadius}function Xa(t){return t.outerRadius}function Za(t){return t.startAngle}function Ja(t){return t.endAngle}function Qa(t){return t&&t.padAngle}function Ka(t,e,i,r,n,o,a){var s=t-i,l=e-r,c=(a?o:-o)/Oa(s*s+l*l),h=c*l,u=-c*s,d=t+h,f=e+u,p=i+h,g=r+u,m=(d+p)/2,y=(f+g)/2,x=p-d,b=g-f,C=x*x+b*b,v=n-o,_=d*g-p*f,k=(b<0?-1:1)*Oa(ja(0,v*v*C-_*_)),T=(_*b-x*k)/C,A=(-_*x-b*k)/C,w=(_*b+x*k)/C,S=(-_*x+b*k)/C,B=T-m,L=A-y,F=w-m,M=S-y;return B*B+L*L>F*F+M*M&&(T=w,A=S),{cx:T,cy:A,x01:-h,y01:-u,x11:T*(n/v-1),y11:A*(n/v-1)}}function ts(){var t=Ga,e=Xa,i=Ba(0),r=null,n=Za,o=Ja,a=Qa,s=null,l=Va(c);function c(){var c,h,u,d=+t.apply(this,arguments),f=+e.apply(this,arguments),p=n.apply(this,arguments)-qa,g=o.apply(this,arguments)-qa,m=La(g-p),y=g>p;if(s||(s=c=l()),fIa)if(m>za-Ia)s.moveTo(f*Ma(p),f*Na(p)),s.arc(0,0,f,p,g,!y),d>Ia&&(s.moveTo(d*Ma(g),d*Na(g)),s.arc(0,0,d,g,p,y));else{var x,b,C=p,v=g,_=p,k=g,T=m,A=m,w=a.apply(this,arguments)/2,S=w>Ia&&(r?+r.apply(this,arguments):Oa(d*d+f*f)),B=Ea(La(f-d)/2,+i.apply(this,arguments)),L=B,F=B;if(S>Ia){var M=$a(S/d*Na(w)),j=$a(S/f*Na(w));(T-=2*M)>Ia?(_+=M*=y?1:-1,k-=M):(T=0,_=k=(p+g)/2),(A-=2*j)>Ia?(C+=j*=y?1:-1,v-=j):(A=0,C=v=(p+g)/2)}var E=f*Ma(C),N=f*Na(C),O=d*Ma(k),I=d*Na(k);if(B>Ia){var D,q=f*Ma(v),z=f*Na(v),$=d*Ma(_),P=d*Na(_);if(m1?0:u<-1?Da:Math.acos(u))/2),V=Oa(D[0]*D[0]+D[1]*D[1]);L=Ea(B,(d-V)/(Y-1)),F=Ea(B,(f-V)/(Y+1))}else L=F=0}A>Ia?F>Ia?(x=Ka($,P,E,N,f,F,y),b=Ka(q,z,O,I,f,F,y),s.moveTo(x.cx+x.x01,x.cy+x.y01),FIa&&T>Ia?L>Ia?(x=Ka(O,I,q,z,d,-L,y),b=Ka(E,N,$,P,d,-L,y),s.lineTo(x.cx+x.x01,x.cy+x.y01),Lt?1:e>=t?0:NaN}function ls(t){return t}function cs(){var t=ls,e=ss,i=null,r=Ba(0),n=Ba(za),o=Ba(0);function a(a){var s,l,c,h,u,d=(a=es(a)).length,f=0,p=new Array(d),g=new Array(d),m=+r.apply(this,arguments),y=Math.min(za,Math.max(-za,n.apply(this,arguments)-m)),x=Math.min(Math.abs(y)/d,o.apply(this,arguments)),b=x*(y<0?-1:1);for(s=0;s0&&(f+=u);for(null!=e?p.sort((function(t,i){return e(g[t],g[i])})):null!=i&&p.sort((function(t,e){return i(a[t],a[e])})),s=0,c=f?(y-d*b)/f:0;s0?u*c:0)+b,g[l]={data:a[l],index:s,value:u,startAngle:m,endAngle:h,padAngle:x};return g}return a.value=function(e){return arguments.length?(t="function"==typeof e?e:Ba(+e),a):t},a.sortValues=function(t){return arguments.length?(e=t,i=null,a):e},a.sort=function(t){return arguments.length?(i=t,e=null,a):i},a.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:Ba(+t),a):r},a.endAngle=function(t){return arguments.length?(n="function"==typeof t?t:Ba(+t),a):n},a.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:Ba(+t),a):o},a}function hs(){}function us(t,e,i){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+i)/6)}function ds(t){this._context=t}function fs(t){return new ds(t)}function ps(t){this._context=t}function gs(t){return new ps(t)}function ms(t){this._context=t}function ys(t){return new ms(t)}is.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}},ds.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:us(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:us(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},ps.prototype={areaStart:hs,areaEnd:hs,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:us(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},ms.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var i=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(i,r):this._context.moveTo(i,r);break;case 3:this._point=4;default:us(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};class xs{constructor(t,e){this._context=t,this._x=e}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,e,t,e):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+e)/2,t,this._y0,t,e)}this._x0=t,this._y0=e}}function bs(t){return new xs(t,!0)}function Cs(t){return new xs(t,!1)}function vs(t,e){this._basis=new ds(t),this._beta=e}vs.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,i=t.length-1;if(i>0)for(var r,n=t[0],o=e[0],a=t[i]-n,s=e[i]-o,l=-1;++l<=i;)r=l/i,this._basis.point(this._beta*t[l]+(1-this._beta)*(n+r*a),this._beta*e[l]+(1-this._beta)*(o+r*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};const _s=function t(e){function i(t){return 1===e?new ds(t):new vs(t,e)}return i.beta=function(e){return t(+e)},i}(.85);function ks(t,e,i){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-i),t._x2,t._y2)}function Ts(t,e){this._context=t,this._k=(1-e)/6}Ts.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:ks(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:ks(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const As=function t(e){function i(t){return new Ts(t,e)}return i.tension=function(e){return t(+e)},i}(0);function ws(t,e){this._context=t,this._k=(1-e)/6}ws.prototype={areaStart:hs,areaEnd:hs,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:ks(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Ss=function t(e){function i(t){return new ws(t,e)}return i.tension=function(e){return t(+e)},i}(0);function Bs(t,e){this._context=t,this._k=(1-e)/6}Bs.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:ks(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Ls=function t(e){function i(t){return new Bs(t,e)}return i.tension=function(e){return t(+e)},i}(0);function Fs(t,e,i){var r=t._x1,n=t._y1,o=t._x2,a=t._y2;if(t._l01_a>Ia){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,l=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,n=(n*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>Ia){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,h=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*c+t._x1*t._l23_2a-e*t._l12_2a)/h,a=(a*c+t._y1*t._l23_2a-i*t._l12_2a)/h}t._context.bezierCurveTo(r,n,o,a,t._x2,t._y2)}function Ms(t,e){this._context=t,this._alpha=e}Ms.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var i=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:Fs(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const js=function t(e){function i(t){return e?new Ms(t,e):new Ts(t,0)}return i.alpha=function(e){return t(+e)},i}(.5);function Es(t,e){this._context=t,this._alpha=e}Es.prototype={areaStart:hs,areaEnd:hs,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){if(t=+t,e=+e,this._point){var i=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Fs(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Ns=function t(e){function i(t){return e?new Es(t,e):new ws(t,0)}return i.alpha=function(e){return t(+e)},i}(.5);function Os(t,e){this._context=t,this._alpha=e}Os.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var i=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Fs(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Is=function t(e){function i(t){return e?new Os(t,e):new Bs(t,0)}return i.alpha=function(e){return t(+e)},i}(.5);function Ds(t){this._context=t}function qs(t){return new Ds(t)}function zs(t){return t<0?-1:1}function $s(t,e,i){var r=t._x1-t._x0,n=e-t._x1,o=(t._y1-t._y0)/(r||n<0&&-0),a=(i-t._y1)/(n||r<0&&-0),s=(o*n+a*r)/(r+n);return(zs(o)+zs(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function Ps(t,e){var i=t._x1-t._x0;return i?(3*(t._y1-t._y0)/i-e)/2:e}function Rs(t,e,i){var r=t._x0,n=t._y0,o=t._x1,a=t._y1,s=(o-r)/3;t._context.bezierCurveTo(r+s,n+s*e,o-s,a-s*i,o,a)}function Hs(t){this._context=t}function Ws(t){this._context=new Us(t)}function Us(t){this._context=t}function Ys(t){return new Hs(t)}function Vs(t){return new Ws(t)}function Gs(t){this._context=t}function Xs(t){var e,i,r=t.length-1,n=new Array(r),o=new Array(r),a=new Array(r);for(n[0]=0,o[0]=2,a[0]=t[0]+2*t[1],e=1;e=0;--e)n[e]=(a[e]-n[e+1])/o[e];for(o[r-1]=(t[r]+n[r-1])/2,e=0;e=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var i=this._x*(1-this._t)+t*this._t;this._context.lineTo(i,this._y),this._context.lineTo(i,e)}}this._x=t,this._y=e}},el.prototype={constructor:el,scale:function(t){return 1===t?this:new el(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new el(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};new el(1,0,0);el.prototype},93539:(t,e,i)=>{"use strict";i.d(e,{A:()=>a});var r=i(72453),n=i(63122);const o=class{constructor(){this.type=n.Z.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=n.Z.ALL}is(t){return this.type===t}};const a=new class{constructor(t,e){this.color=e,this.changed=!1,this.data=t,this.type=new o}set(t,e){return this.color=e,this.changed=!1,this.data=t,this.type.type=n.Z.ALL,this}_ensureHSL(){const t=this.data,{h:e,s:i,l:n}=t;void 0===e&&(t.h=r.A.channel.rgb2hsl(t,"h")),void 0===i&&(t.s=r.A.channel.rgb2hsl(t,"s")),void 0===n&&(t.l=r.A.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r:e,g:i,b:n}=t;void 0===e&&(t.r=r.A.channel.hsl2rgb(t,"r")),void 0===i&&(t.g=r.A.channel.hsl2rgb(t,"g")),void 0===n&&(t.b=r.A.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,e=t.r;return this.type.is(n.Z.HSL)||void 0===e?(this._ensureHSL(),r.A.channel.hsl2rgb(t,"r")):e}get g(){const t=this.data,e=t.g;return this.type.is(n.Z.HSL)||void 0===e?(this._ensureHSL(),r.A.channel.hsl2rgb(t,"g")):e}get b(){const t=this.data,e=t.b;return this.type.is(n.Z.HSL)||void 0===e?(this._ensureHSL(),r.A.channel.hsl2rgb(t,"b")):e}get h(){const t=this.data,e=t.h;return this.type.is(n.Z.RGB)||void 0===e?(this._ensureRGB(),r.A.channel.rgb2hsl(t,"h")):e}get s(){const t=this.data,e=t.s;return this.type.is(n.Z.RGB)||void 0===e?(this._ensureRGB(),r.A.channel.rgb2hsl(t,"s")):e}get l(){const t=this.data,e=t.l;return this.type.is(n.Z.RGB)||void 0===e?(this._ensureRGB(),r.A.channel.rgb2hsl(t,"l")):e}get a(){return this.data.a}set r(t){this.type.set(n.Z.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(n.Z.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(n.Z.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(n.Z.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(n.Z.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(n.Z.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}({r:0,g:0,b:0,a:0},"transparent")},74886:(t,e,i)=>{"use strict";i.d(e,{A:()=>g});var r=i(93539),n=i(63122);const o={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:t=>{if(35!==t.charCodeAt(0))return;const e=t.match(o.re);if(!e)return;const i=e[1],n=parseInt(i,16),a=i.length,s=a%4==0,l=a>4,c=l?1:17,h=l?8:4,u=s?0:-1,d=l?255:15;return r.A.set({r:(n>>h*(u+3)&d)*c,g:(n>>h*(u+2)&d)*c,b:(n>>h*(u+1)&d)*c,a:s?(n&d)*c/255:1},t)},stringify:t=>{const{r:e,g:i,b:r,a:o}=t;return o<1?`#${n.Y[Math.round(e)]}${n.Y[Math.round(i)]}${n.Y[Math.round(r)]}${n.Y[Math.round(255*o)]}`:`#${n.Y[Math.round(e)]}${n.Y[Math.round(i)]}${n.Y[Math.round(r)]}`}},a=o;var s=i(72453);const l={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:t=>{const e=t.match(l.hueRe);if(e){const[,t,i]=e;switch(i){case"grad":return s.A.channel.clamp.h(.9*parseFloat(t));case"rad":return s.A.channel.clamp.h(180*parseFloat(t)/Math.PI);case"turn":return s.A.channel.clamp.h(360*parseFloat(t))}}return s.A.channel.clamp.h(parseFloat(t))},parse:t=>{const e=t.charCodeAt(0);if(104!==e&&72!==e)return;const i=t.match(l.re);if(!i)return;const[,n,o,a,c,h]=i;return r.A.set({h:l._hue2deg(n),s:s.A.channel.clamp.s(parseFloat(o)),l:s.A.channel.clamp.l(parseFloat(a)),a:c?s.A.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},t)},stringify:t=>{const{h:e,s:i,l:r,a:n}=t;return n<1?`hsla(${s.A.lang.round(e)}, ${s.A.lang.round(i)}%, ${s.A.lang.round(r)}%, ${n})`:`hsl(${s.A.lang.round(e)}, ${s.A.lang.round(i)}%, ${s.A.lang.round(r)}%)`}},c=l,h={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:t=>{t=t.toLowerCase();const e=h.colors[t];if(e)return a.parse(e)},stringify:t=>{const e=a.stringify(t);for(const i in h.colors)if(h.colors[i]===e)return i}},u=h,d={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:t=>{const e=t.charCodeAt(0);if(114!==e&&82!==e)return;const i=t.match(d.re);if(!i)return;const[,n,o,a,l,c,h,u,f]=i;return r.A.set({r:s.A.channel.clamp.r(o?2.55*parseFloat(n):parseFloat(n)),g:s.A.channel.clamp.g(l?2.55*parseFloat(a):parseFloat(a)),b:s.A.channel.clamp.b(h?2.55*parseFloat(c):parseFloat(c)),a:u?s.A.channel.clamp.a(f?parseFloat(u)/100:parseFloat(u)):1},t)},stringify:t=>{const{r:e,g:i,b:r,a:n}=t;return n<1?`rgba(${s.A.lang.round(e)}, ${s.A.lang.round(i)}, ${s.A.lang.round(r)}, ${s.A.lang.round(n)})`:`rgb(${s.A.lang.round(e)}, ${s.A.lang.round(i)}, ${s.A.lang.round(r)})`}},f=d,p={format:{keyword:h,hex:a,rgb:d,rgba:d,hsl:l,hsla:l},parse:t=>{if("string"!=typeof t)return t;const e=a.parse(t)||f.parse(t)||c.parse(t)||u.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},stringify:t=>!t.changed&&t.color?t.color:t.type.is(n.Z.HSL)||void 0===t.data.r?c.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?f.stringify(t):a.stringify(t)},g=p},63122:(t,e,i)=>{"use strict";i.d(e,{Y:()=>n,Z:()=>o});var r=i(72453);const n={};for(let a=0;a<=255;a++)n[a]=r.A.unit.dec2hex(a);const o={ALL:0,RGB:1,HSL:2}},95635:(t,e,i)=>{"use strict";i.d(e,{A:()=>o});var r=i(72453),n=i(74886);const o=(t,e,i)=>{const o=n.A.parse(t),a=o[e],s=r.A.channel.clamp[e](a+i);return a!==s&&(o[e]=s),n.A.stringify(o)}},8232:(t,e,i)=>{"use strict";i.d(e,{A:()=>o});var r=i(72453),n=i(74886);const o=(t,e)=>{const i=n.A.parse(t);for(const n in e)i[n]=r.A.channel.clamp[n](e[n]);return n.A.stringify(i)}},75263:(t,e,i)=>{"use strict";i.d(e,{A:()=>n});var r=i(95635);const n=(t,e)=>(0,r.A)(t,"l",-e)},3219:(t,e,i)=>{"use strict";i.d(e,{A:()=>s});var r=i(72453),n=i(74886);const o=t=>{const{r:e,g:i,b:o}=n.A.parse(t),a=.2126*r.A.channel.toLinear(e)+.7152*r.A.channel.toLinear(i)+.0722*r.A.channel.toLinear(o);return r.A.lang.round(a)},a=t=>o(t)>=.5,s=t=>!a(t)},78041:(t,e,i)=>{"use strict";i.d(e,{A:()=>n});var r=i(95635);const n=(t,e)=>(0,r.A)(t,"l",e)},25582:(t,e,i)=>{"use strict";i.d(e,{A:()=>s});var r=i(72453),n=i(93539),o=i(74886),a=i(8232);const s=(t,e,i=0,s=1)=>{if("number"!=typeof t)return(0,a.A)(t,{a:e});const l=n.A.set({r:r.A.channel.clamp.r(t),g:r.A.channel.clamp.g(e),b:r.A.channel.clamp.b(i),a:r.A.channel.clamp.a(s)});return o.A.stringify(l)}},72453:(t,e,i)=>{"use strict";i.d(e,{A:()=>n});const r={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:t=>t>=255?255:t<0?0:t,g:t=>t>=255?255:t<0?0:t,b:t=>t>=255?255:t<0?0:t,h:t=>t%360,s:t=>t>=100?100:t<0?0:t,l:t=>t>=100?100:t<0?0:t,a:t=>t>=1?1:t<0?0:t},toLinear:t=>{const e=t/255;return t>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92},hue2rgb:(t,e,i)=>(i<0&&(i+=1),i>1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t),hsl2rgb:({h:t,s:e,l:i},n)=>{if(!e)return 2.55*i;t/=360,e/=100;const o=(i/=100)<.5?i*(1+e):i+e-i*e,a=2*i-o;switch(n){case"r":return 255*r.hue2rgb(a,o,t+1/3);case"g":return 255*r.hue2rgb(a,o,t);case"b":return 255*r.hue2rgb(a,o,t-1/3)}},rgb2hsl:({r:t,g:e,b:i},r)=>{t/=255,e/=255,i/=255;const n=Math.max(t,e,i),o=Math.min(t,e,i),a=(n+o)/2;if("l"===r)return 100*a;if(n===o)return 0;const s=n-o;if("s"===r)return 100*(a>.5?s/(2-n-o):s/(n+o));switch(n){case t:return 60*((e-i)/s+(ee>i?Math.min(e,Math.max(i,t)):Math.min(i,Math.max(e,t)),round:t=>Math.round(1e10*t)/1e10},unit:{dec2hex:t=>{const e=Math.round(t).toString(16);return e.length>1?e:`0${e}`}}}},80127:(t,e,i)=>{"use strict";i.d(e,{A:()=>d});const r=function(){this.__data__=[],this.size=0};var n=i(66984);const o=function(t,e){for(var i=t.length;i--;)if((0,n.A)(t[i][0],e))return i;return-1};var a=Array.prototype.splice;const s=function(t){var e=this.__data__,i=o(e,t);return!(i<0)&&(i==e.length-1?e.pop():a.call(e,i,1),--this.size,!0)};const l=function(t){var e=this.__data__,i=o(e,t);return i<0?void 0:e[i][1]};const c=function(t){return o(this.__data__,t)>-1};const h=function(t,e){var i=this.__data__,r=o(i,t);return r<0?(++this.size,i.push([t,e])):i[r][1]=e,this};function u(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e{"use strict";i.d(e,{A:()=>o});var r=i(18744),n=i(41917);const o=(0,r.A)(n.A,"Map")},29471:(t,e,i)=>{"use strict";i.d(e,{A:()=>k});const r=(0,i(18744).A)(Object,"create");const n=function(){this.__data__=r?r(null):{},this.size=0};const o=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e};var a=Object.prototype.hasOwnProperty;const s=function(t){var e=this.__data__;if(r){var i=e[t];return"__lodash_hash_undefined__"===i?void 0:i}return a.call(e,t)?e[t]:void 0};var l=Object.prototype.hasOwnProperty;const c=function(t){var e=this.__data__;return r?void 0!==e[t]:l.call(e,t)};const h=function(t,e){var i=this.__data__;return this.size+=this.has(t)?0:1,i[t]=r&&void 0===e?"__lodash_hash_undefined__":e,this};function u(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e{"use strict";i.d(e,{A:()=>o});var r=i(18744),n=i(41917);const o=(0,r.A)(n.A,"Set")},11754:(t,e,i)=>{"use strict";i.d(e,{A:()=>d});var r=i(80127);const n=function(){this.__data__=new r.A,this.size=0};const o=function(t){var e=this.__data__,i=e.delete(t);return this.size=e.size,i};const a=function(t){return this.__data__.get(t)};const s=function(t){return this.__data__.has(t)};var l=i(68335),c=i(29471);const h=function(t,e){var i=this.__data__;if(i instanceof r.A){var n=i.__data__;if(!l.A||n.length<199)return n.push([t,e]),this.size=++i.size,this;i=this.__data__=new c.A(n)}return i.set(t,e),this.size=i.size,this};function u(t){var e=this.__data__=new r.A(t);this.size=e.size}u.prototype.clear=n,u.prototype.delete=o,u.prototype.get=a,u.prototype.has=s,u.prototype.set=h;const d=u},241:(t,e,i)=>{"use strict";i.d(e,{A:()=>r});const r=i(41917).A.Symbol},43988:(t,e,i)=>{"use strict";i.d(e,{A:()=>r});const r=i(41917).A.Uint8Array},83607:(t,e,i)=>{"use strict";i.d(e,{A:()=>h});const r=function(t,e){for(var i=-1,r=Array(t);++i{"use strict";i.d(e,{A:()=>a});var r=i(52528),n=i(66984),o=Object.prototype.hasOwnProperty;const a=function(t,e,i){var a=t[e];o.call(t,e)&&(0,n.A)(a,i)&&(void 0!==i||e in t)||(0,r.A)(t,e,i)}},52528:(t,e,i)=>{"use strict";i.d(e,{A:()=>n});var r=i(84171);const n=function(t,e,i){"__proto__"==e&&r.A?(0,r.A)(t,e,{configurable:!0,enumerable:!0,value:i,writable:!0}):t[e]=i}},4574:(t,e,i)=>{"use strict";i.d(e,{A:()=>r});const r=function(t){return function(e,i,r){for(var n=-1,o=Object(e),a=r(e),s=a.length;s--;){var l=a[t?s:++n];if(!1===i(o[l],l,o))break}return e}}()},88496:(t,e,i)=>{"use strict";i.d(e,{A:()=>d});var r=i(241),n=Object.prototype,o=n.hasOwnProperty,a=n.toString,s=r.A?r.A.toStringTag:void 0;const l=function(t){var e=o.call(t,s),i=t[s];try{t[s]=void 0;var r=!0}catch(l){}var n=a.call(t);return r&&(e?t[s]=i:delete t[s]),n};var c=Object.prototype.toString;const h=function(t){return c.call(t)};var u=r.A?r.A.toStringTag:void 0;const d=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":u&&u in Object(t)?l(t):h(t)}},69471:(t,e,i)=>{"use strict";i.d(e,{A:()=>a});var r=i(97271);const n=(0,i(40367).A)(Object.keys,Object);var o=Object.prototype.hasOwnProperty;const a=function(t){if(!(0,r.A)(t))return n(t);var e=[];for(var i in Object(t))o.call(t,i)&&"constructor"!=i&&e.push(i);return e}},24326:(t,e,i)=>{"use strict";i.d(e,{A:()=>a});var r=i(29008),n=i(76875),o=i(67525);const a=function(t,e){return(0,o.A)((0,n.A)(t,e,r.A),t+"")}},52789:(t,e,i)=>{"use strict";i.d(e,{A:()=>r});const r=function(t){return function(e){return t(e)}}},90565:(t,e,i)=>{"use strict";i.d(e,{A:()=>n});var r=i(43988);const n=function(t){var e=new t.constructor(t.byteLength);return new r.A(e).set(new r.A(t)),e}},80154:(t,e,i)=>{"use strict";i.d(e,{A:()=>l});var r=i(41917),n="object"==typeof exports&&exports&&!exports.nodeType&&exports,o=n&&"object"==typeof module&&module&&!module.nodeType&&module,a=o&&o.exports===n?r.A.Buffer:void 0,s=a?a.allocUnsafe:void 0;const l=function(t,e){if(e)return t.slice();var i=t.length,r=s?s(i):new t.constructor(i);return t.copy(r),r}},1801:(t,e,i)=>{"use strict";i.d(e,{A:()=>n});var r=i(90565);const n=function(t,e){var i=e?(0,r.A)(t.buffer):t.buffer;return new t.constructor(i,t.byteOffset,t.length)}},39759:(t,e,i)=>{"use strict";i.d(e,{A:()=>r});const r=function(t,e){var i=-1,r=t.length;for(e||(e=Array(r));++i{"use strict";i.d(e,{A:()=>o});var r=i(52851),n=i(52528);const o=function(t,e,i,o){var a=!i;i||(i={});for(var s=-1,l=e.length;++s{"use strict";i.d(e,{A:()=>n});var r=i(18744);const n=function(){try{var t=(0,r.A)(Object,"defineProperty");return t({},"",{}),t}catch(e){}}()},72136:(t,e,i)=>{"use strict";i.d(e,{A:()=>r});const r="object"==typeof global&&global&&global.Object===Object&&global},18744:(t,e,i)=>{"use strict";i.d(e,{A:()=>x});var r=i(89610);const n=i(41917).A["__core-js_shared__"];var o,a=(o=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||""))?"Symbol(src)_1."+o:"";const s=function(t){return!!a&&a in t};var l=i(23149),c=i(81121),h=/^\[object .+?Constructor\]$/,u=Function.prototype,d=Object.prototype,f=u.toString,p=d.hasOwnProperty,g=RegExp("^"+f.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const m=function(t){return!(!(0,l.A)(t)||s(t))&&((0,r.A)(t)?g:h).test((0,c.A)(t))};const y=function(t,e){return null==t?void 0:t[e]};const x=function(t,e){var i=y(t,e);return m(i)?i:void 0}},15647:(t,e,i)=>{"use strict";i.d(e,{A:()=>r});const r=(0,i(40367).A)(Object.getPrototypeOf,Object)},9779:(t,e,i)=>{"use strict";i.d(e,{A:()=>k});var r=i(18744),n=i(41917);const o=(0,r.A)(n.A,"DataView");var a=i(68335);const s=(0,r.A)(n.A,"Promise");var l=i(39857);const c=(0,r.A)(n.A,"WeakMap");var h=i(88496),u=i(81121),d="[object Map]",f="[object Promise]",p="[object Set]",g="[object WeakMap]",m="[object DataView]",y=(0,u.A)(o),x=(0,u.A)(a.A),b=(0,u.A)(s),C=(0,u.A)(l.A),v=(0,u.A)(c),_=h.A;(o&&_(new o(new ArrayBuffer(1)))!=m||a.A&&_(new a.A)!=d||s&&_(s.resolve())!=f||l.A&&_(new l.A)!=p||c&&_(new c)!=g)&&(_=function(t){var e=(0,h.A)(t),i="[object Object]"==e?t.constructor:void 0,r=i?(0,u.A)(i):"";if(r)switch(r){case y:return m;case x:return d;case b:return f;case C:return p;case v:return g}return e});const k=_},18598:(t,e,i)=>{"use strict";i.d(e,{A:()=>l});var r=i(23149),n=Object.create;const o=function(){function t(){}return function(e){if(!(0,r.A)(e))return{};if(n)return n(e);t.prototype=e;var i=new t;return t.prototype=void 0,i}}();var a=i(15647),s=i(97271);const l=function(t){return"function"!=typeof t.constructor||(0,s.A)(t)?{}:o((0,a.A)(t))}},25353:(t,e,i)=>{"use strict";i.d(e,{A:()=>n});var r=/^(?:0|[1-9]\d*)$/;const n=function(t,e){var i=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==i||"symbol"!=i&&r.test(t))&&t>-1&&t%1==0&&t{"use strict";i.d(e,{A:()=>s});var r=i(66984),n=i(38446),o=i(25353),a=i(23149);const s=function(t,e,i){if(!(0,a.A)(i))return!1;var s=typeof e;return!!("number"==s?(0,n.A)(i)&&(0,o.A)(e,i.length):"string"==s&&e in i)&&(0,r.A)(i[e],t)}},97271:(t,e,i)=>{"use strict";i.d(e,{A:()=>n});var r=Object.prototype;const n=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||r)}},64841:(t,e,i)=>{"use strict";i.d(e,{A:()=>s});var r=i(72136),n="object"==typeof exports&&exports&&!exports.nodeType&&exports,o=n&&"object"==typeof module&&module&&!module.nodeType&&module,a=o&&o.exports===n&&r.A.process;const s=function(){try{var t=o&&o.require&&o.require("util").types;return t||a&&a.binding&&a.binding("util")}catch(e){}}()},40367:(t,e,i)=>{"use strict";i.d(e,{A:()=>r});const r=function(t,e){return function(i){return t(e(i))}}},76875:(t,e,i)=>{"use strict";i.d(e,{A:()=>o});const r=function(t,e,i){switch(i.length){case 0:return t.call(e);case 1:return t.call(e,i[0]);case 2:return t.call(e,i[0],i[1]);case 3:return t.call(e,i[0],i[1],i[2])}return t.apply(e,i)};var n=Math.max;const o=function(t,e,i){return e=n(void 0===e?t.length-1:e,0),function(){for(var o=arguments,a=-1,s=n(o.length-e,0),l=Array(s);++a{"use strict";i.d(e,{A:()=>o});var r=i(72136),n="object"==typeof self&&self&&self.Object===Object&&self;const o=r.A||n||Function("return this")()},67525:(t,e,i)=>{"use strict";i.d(e,{A:()=>l});var r=i(39142),n=i(84171),o=i(29008);const a=n.A?function(t,e){return(0,n.A)(t,"toString",{configurable:!0,enumerable:!1,value:(0,r.A)(e),writable:!0})}:o.A;var s=Date.now;const l=function(t){var e=0,i=0;return function(){var r=s(),n=16-(r-i);if(i=r,n>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(a)},81121:(t,e,i)=>{"use strict";i.d(e,{A:()=>n});var r=Function.prototype.toString;const n=function(t){if(null!=t){try{return r.call(t)}catch(e){}try{return t+""}catch(e){}}return""}},39142:(t,e,i)=>{"use strict";i.d(e,{A:()=>r});const r=function(t){return function(){return t}}},66984:(t,e,i)=>{"use strict";i.d(e,{A:()=>r});const r=function(t,e){return t===e||t!=t&&e!=e}},29008:(t,e,i)=>{"use strict";i.d(e,{A:()=>r});const r=function(t){return t}},52274:(t,e,i)=>{"use strict";i.d(e,{A:()=>c});var r=i(88496),n=i(53098);const o=function(t){return(0,n.A)(t)&&"[object Arguments]"==(0,r.A)(t)};var a=Object.prototype,s=a.hasOwnProperty,l=a.propertyIsEnumerable;const c=o(function(){return arguments}())?o:function(t){return(0,n.A)(t)&&s.call(t,"callee")&&!l.call(t,"callee")}},92049:(t,e,i)=>{"use strict";i.d(e,{A:()=>r});const r=Array.isArray},38446:(t,e,i)=>{"use strict";i.d(e,{A:()=>o});var r=i(89610),n=i(5254);const o=function(t){return null!=t&&(0,n.A)(t.length)&&!(0,r.A)(t)}},53533:(t,e,i)=>{"use strict";i.d(e,{A:()=>o});var r=i(38446),n=i(53098);const o=function(t){return(0,n.A)(t)&&(0,r.A)(t)}},99912:(t,e,i)=>{"use strict";i.d(e,{A:()=>l});var r=i(41917);const n=function(){return!1};var o="object"==typeof exports&&exports&&!exports.nodeType&&exports,a=o&&"object"==typeof module&&module&&!module.nodeType&&module,s=a&&a.exports===o?r.A.Buffer:void 0;const l=(s?s.isBuffer:void 0)||n},66401:(t,e,i)=>{"use strict";i.d(e,{A:()=>d});var r=i(69471),n=i(9779),o=i(52274),a=i(92049),s=i(38446),l=i(99912),c=i(97271),h=i(33858),u=Object.prototype.hasOwnProperty;const d=function(t){if(null==t)return!0;if((0,s.A)(t)&&((0,a.A)(t)||"string"==typeof t||"function"==typeof t.splice||(0,l.A)(t)||(0,h.A)(t)||(0,o.A)(t)))return!t.length;var e=(0,n.A)(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if((0,c.A)(t))return!(0,r.A)(t).length;for(var i in t)if(u.call(t,i))return!1;return!0}},89610:(t,e,i)=>{"use strict";i.d(e,{A:()=>o});var r=i(88496),n=i(23149);const o=function(t){if(!(0,n.A)(t))return!1;var e=(0,r.A)(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},5254:(t,e,i)=>{"use strict";i.d(e,{A:()=>r});const r=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},23149:(t,e,i)=>{"use strict";i.d(e,{A:()=>r});const r=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},53098:(t,e,i)=>{"use strict";i.d(e,{A:()=>r});const r=function(t){return null!=t&&"object"==typeof t}},34963:(t,e,i)=>{"use strict";i.d(e,{A:()=>u});var r=i(88496),n=i(15647),o=i(53098),a=Function.prototype,s=Object.prototype,l=a.toString,c=s.hasOwnProperty,h=l.call(Object);const u=function(t){if(!(0,o.A)(t)||"[object Object]"!=(0,r.A)(t))return!1;var e=(0,n.A)(t);if(null===e)return!0;var i=c.call(e,"constructor")&&e.constructor;return"function"==typeof i&&i instanceof i&&l.call(i)==h}},33858:(t,e,i)=>{"use strict";i.d(e,{A:()=>u});var r=i(88496),n=i(5254),o=i(53098),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1;const s=function(t){return(0,o.A)(t)&&(0,n.A)(t.length)&&!!a[(0,r.A)(t)]};var l=i(52789),c=i(64841),h=c.A&&c.A.isTypedArray;const u=h?(0,l.A)(h):s},55615:(t,e,i)=>{"use strict";i.d(e,{A:()=>h});var r=i(83607),n=i(23149),o=i(97271);const a=function(t){var e=[];if(null!=t)for(var i in Object(t))e.push(i);return e};var s=Object.prototype.hasOwnProperty;const l=function(t){if(!(0,n.A)(t))return a(t);var e=(0,o.A)(t),i=[];for(var r in t)("constructor"!=r||!e&&s.call(t,r))&&i.push(r);return i};var c=i(38446);const h=function(t){return(0,c.A)(t)?(0,r.A)(t,!0):l(t)}},46632:(t,e,i)=>{"use strict";i.d(e,{A:()=>o});var r=i(29471);function n(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var i=function(){var r=arguments,n=e?e.apply(this,r):r[0],o=i.cache;if(o.has(n))return o.get(n);var a=t.apply(this,r);return i.cache=o.set(n,a)||o,a};return i.cache=new(n.Cache||r.A),i}n.Cache=r.A;const o=n},98879:(t,e,i)=>{"use strict";i.d(e,{A:()=>B});var r=i(11754),n=i(52528),o=i(66984);const a=function(t,e,i){(void 0!==i&&!(0,o.A)(t[e],i)||void 0===i&&!(e in t))&&(0,n.A)(t,e,i)};var s=i(4574),l=i(80154),c=i(1801),h=i(39759),u=i(18598),d=i(52274),f=i(92049),p=i(53533),g=i(99912),m=i(89610),y=i(23149),x=i(34963),b=i(33858);const C=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]};var v=i(22031),_=i(55615);const k=function(t){return(0,v.A)(t,(0,_.A)(t))};const T=function(t,e,i,r,n,o,s){var v=C(t,i),_=C(e,i),T=s.get(_);if(T)a(t,i,T);else{var A=o?o(v,_,i+"",t,e,s):void 0,w=void 0===A;if(w){var S=(0,f.A)(_),B=!S&&(0,g.A)(_),L=!S&&!B&&(0,b.A)(_);A=_,S||B||L?(0,f.A)(v)?A=v:(0,p.A)(v)?A=(0,h.A)(v):B?(w=!1,A=(0,l.A)(_,!0)):L?(w=!1,A=(0,c.A)(_,!0)):A=[]:(0,x.A)(_)||(0,d.A)(_)?(A=v,(0,d.A)(v)?A=k(v):(0,y.A)(v)&&!(0,m.A)(v)||(A=(0,u.A)(_))):w=!1}w&&(s.set(_,A),n(A,_,r,o,s),s.delete(_)),a(t,i,A)}};const A=function t(e,i,n,o,l){e!==i&&(0,s.A)(i,(function(s,c){if(l||(l=new r.A),(0,y.A)(s))T(e,i,c,n,t,o,l);else{var h=o?o(C(e,c),s,c+"",e,i,l):void 0;void 0===h&&(h=s),a(e,c,h)}}),_.A)};var w=i(24326),S=i(6832);const B=function(t){return(0,w.A)((function(e,i){var r=-1,n=i.length,o=n>1?i[n-1]:void 0,a=n>2?i[2]:void 0;for(o=t.length>3&&"function"==typeof o?(n--,o):void 0,a&&(0,S.A)(i[0],i[1],a)&&(o=n<3?void 0:o,n=1),e=Object(e);++r{"use strict";i.d(e,{A:()=>Wi,B:()=>Rt,C:()=>_e,D:()=>ve,E:()=>Nt,F:()=>Ne,G:()=>Tt,H:()=>At,I:()=>ue,J:()=>ht,K:()=>Di,L:()=>ji,M:()=>Te,N:()=>Jn,Z:()=>ee,a:()=>Li,b:()=>Bi,c:()=>Oi,d:()=>pt,e:()=>St,f:()=>te,g:()=>Si,h:()=>ye,i:()=>yi,j:()=>me,k:()=>ce,l:()=>st,m:()=>yt,n:()=>oe,o:()=>xi,p:()=>Ii,q:()=>Fi,r:()=>wt,s:()=>wi,t:()=>Mi,u:()=>ke,v:()=>Ai,w:()=>pe,x:()=>xt,y:()=>de,z:()=>zi});var r=i(60513),n=i(74353),o=i(16750),a=i(26312),s=i(42838),l=i(74886),c=i(8232);const h=(t,e)=>{const i=l.A.parse(t),r={};for(const n in e)e[n]&&(r[n]=i[n]+e[n]);return(0,c.A)(t,r)};var u=i(25582);const d=(t,e,i=50)=>{const{r:r,g:n,b:o,a:a}=l.A.parse(t),{r:s,g:c,b:h,a:d}=l.A.parse(e),f=i/100,p=2*f-1,g=a-d,m=((p*g==-1?p:(p+g)/(1+p*g))+1)/2,y=1-m,x=r*m+s*y,b=n*m+c*y,C=o*m+h*y,v=a*f+d*(1-f);return(0,u.A)(x,b,C,v)},f=(t,e=100)=>{const i=l.A.parse(t);return i.r=255-i.r,i.g=255-i.g,i.b=255-i.b,d(i,t,e)};var p=i(75263),g=i(78041),m=i(3219),y=i(46632),x=i(98879),b="comm",C="rule",v="decl",_=Math.abs,k=String.fromCharCode;Object.assign;function T(t){return t.trim()}function A(t,e,i){return t.replace(e,i)}function w(t,e,i){return t.indexOf(e,i)}function S(t,e){return 0|t.charCodeAt(e)}function B(t,e,i){return t.slice(e,i)}function L(t){return t.length}function F(t,e){return e.push(t),t}function M(t,e){for(var i="",r=0;r0?S(q,--I):0,N--,10===D&&(N=1,E--),D}function P(){return D=I2||U(D)>3?"":" "}function Z(t,e){for(;--e&&P()&&!(D<48||D>102||D>57&&D<65||D>70&&D<97););return W(t,H()+(e<6&&32==R()&&32==P()))}function J(t){for(;P();)switch(D){case t:return I;case 34:case 39:34!==t&&39!==t&&J(D);break;case 40:41===t&&J(t);break;case 92:P()}return I}function Q(t,e){for(;P()&&t+D!==57&&(t+D!==84||47!==R()););return"/*"+W(e,I-1)+"*"+k(47===t?t:P())}function K(t){for(;!U(R());)P();return W(t,I)}function tt(t){return V(et("",null,null,null,[""],t=Y(t),0,[0],t))}function et(t,e,i,r,n,o,a,s,l){for(var c=0,h=0,u=a,d=0,f=0,p=0,g=1,m=1,y=1,x=0,b="",C=n,v=o,T=r,M=b;m;)switch(p=x,x=P()){case 40:if(108!=p&&58==S(M,u-1)){-1!=w(M+=A(G(x),"&","&\f"),"&\f",_(c?s[c-1]:0))&&(y=-1);break}case 34:case 39:case 91:M+=G(x);break;case 9:case 10:case 13:case 32:M+=X(p);break;case 92:M+=Z(H()-1,7);continue;case 47:switch(R()){case 42:case 47:F(rt(Q(P(),H()),e,i,l),l),5!=U(p||1)&&5!=U(R()||1)||!L(M)||" "===B(M,-1,void 0)||(M+=" ");break;default:M+="/"}break;case 123*g:s[c++]=L(M)*y;case 125*g:case 59:case 0:switch(x){case 0:case 125:m=0;case 59+h:-1==y&&(M=A(M,/\f/g,"")),f>0&&(L(M)-u||0===g&&47===p)&&F(f>32?nt(M+";",r,i,u-1,l):nt(A(M," ","")+";",r,i,u-2,l),l);break;case 59:M+=";";default:if(F(T=it(M,e,i,c,h,n,s,b,C=[],v=[],u,o),o),123===x)if(0===h)et(M,e,T,T,C,o,u,s,v);else switch(99===d&&110===S(M,3)?100:d){case 100:case 108:case 109:case 115:et(t,T,T,r&&F(it(t,T,T,0,0,n,s,b,n,C=[],u,v),v),n,v,u,s,r?C:v);break;default:et(M,T,T,T,[""],v,0,s,v)}}c=h=f=0,g=y=1,b=M="",u=a;break;case 58:u=1+L(M),f=p;default:if(g<1)if(123==x)--g;else if(125==x&&0==g++&&125==$())continue;switch(M+=k(x),x*g){case 38:y=h>0?1:(M+="\f",-1);break;case 44:s[c++]=(L(M)-1)*y,y=1;break;case 64:45===R()&&(M+=G(P())),d=R(),h=u=L(b=M+=K(H())),x++;break;case 45:45===p&&2==L(M)&&(g=0)}}return o}function it(t,e,i,r,n,o,a,s,l,c,h,u){for(var d=n-1,f=0===n?o:[""],p=function(t){return t.length}(f),g=0,m=0,y=0;g0?f[x]+" "+b:A(b,/&\f/g,f[x])))&&(l[y++]=v);return z(t,e,i,0===n?C:s,l,c,h,u)}function rt(t,e,i,r){return z(t,e,i,b,k(D),B(t,2,-2),0,r)}function nt(t,e,i,r,n){return z(t,e,i,v,B(t,0,r),B(t,r+1,-1),r,n)}var ot=i(66401);const at={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},st={trace:(...t)=>{},debug:(...t)=>{},info:(...t)=>{},warn:(...t)=>{},error:(...t)=>{},fatal:(...t)=>{}},lt=function(t="fatal"){let e=at.fatal;"string"==typeof t?(t=t.toLowerCase())in at&&(e=at[t]):"number"==typeof t&&(e=t),st.trace=()=>{},st.debug=()=>{},st.info=()=>{},st.warn=()=>{},st.error=()=>{},st.fatal=()=>{},e<=at.fatal&&(st.fatal=console.error?console.error.bind(console,ct("FATAL"),"color: orange"):console.log.bind(console,"\x1b[35m",ct("FATAL"))),e<=at.error&&(st.error=console.error?console.error.bind(console,ct("ERROR"),"color: orange"):console.log.bind(console,"\x1b[31m",ct("ERROR"))),e<=at.warn&&(st.warn=console.warn?console.warn.bind(console,ct("WARN"),"color: orange"):console.log.bind(console,"\x1b[33m",ct("WARN"))),e<=at.info&&(st.info=console.info?console.info.bind(console,ct("INFO"),"color: lightblue"):console.log.bind(console,"\x1b[34m",ct("INFO"))),e<=at.debug&&(st.debug=console.debug?console.debug.bind(console,ct("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1b[32m",ct("DEBUG"))),e<=at.trace&&(st.trace=console.debug?console.debug.bind(console,ct("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1b[32m",ct("TRACE")))},ct=t=>`%c${n().format("ss.SSS")} : ${t} : `,ht=//gi,ut=(()=>{let t=!1;return()=>{t||(!function(){const t="data-temp-href-target";s.addHook("beforeSanitizeAttributes",(e=>{"A"===e.tagName&&e.hasAttribute("target")&&e.setAttribute(t,e.getAttribute("target")||"")})),s.addHook("afterSanitizeAttributes",(e=>{"A"===e.tagName&&e.hasAttribute(t)&&(e.setAttribute("target",e.getAttribute(t)||""),e.removeAttribute(t),"_blank"===e.getAttribute("target")&&e.setAttribute("rel","noopener"))}))}(),t=!0)}})();const dt=t=>{ut();return s.sanitize(t)},ft=(t,e)=>{var i;if(!1!==(null==(i=e.flowchart)?void 0:i.htmlLabels)){const i=e.securityLevel;"antiscript"===i||"strict"===i?t=dt(t):"loose"!==i&&(t=(t=(t=mt(t)).replace(//g,">")).replace(/=/g,"="),t=gt(t))}return t},pt=(t,e)=>t?t=e.dompurifyConfig?s.sanitize(ft(t,e),e.dompurifyConfig).toString():s.sanitize(ft(t,e),{FORBID_TAGS:["style"]}).toString():t,gt=t=>t.replace(/#br#/g,"
    "),mt=t=>t.replace(ht,"#br#"),yt=t=>!1!==t&&!["false","null","0"].includes(String(t).trim().toLowerCase()),xt=function(t){const e=t.split(/(,)/),i=[];for(let r=0;r0&&r+1Math.max(0,t.split(e).length-1),Ct=(t,e)=>{const i=bt(t,"~"),r=bt(e,"~");return 1===i&&1===r},vt=t=>{const e=bt(t,"~");let i=!1;if(e<=1)return t;e%2!=0&&t.startsWith("~")&&(t=t.substring(1),i=!0);const r=[...t];let n=r.indexOf("~"),o=r.lastIndexOf("~");for(;-1!==n&&-1!==o&&n!==o;)r[n]="<",r[o]=">",n=r.indexOf("~"),o=r.lastIndexOf("~");return i&&r.unshift("~"),r.join("")},_t=()=>void 0!==window.MathMLElement,kt=/\$\$(.*)\$\$/g,Tt=t=>{var e;return((null==(e=t.match(kt))?void 0:e.length)??0)>0},At=async(t,e)=>{t=await wt(t,e);const i=document.createElement("div");i.innerHTML=t,i.id="katex-temp",i.style.visibility="hidden",i.style.position="absolute",i.style.top="0";const r=document.querySelector("body");null==r||r.insertAdjacentElement("beforeend",i);const n={width:i.clientWidth,height:i.clientHeight};return i.remove(),n},wt=async(t,e)=>{if(!Tt(t))return t;if(!_t()&&!e.legacyMathML)return t.replace(kt,"MathML is unsupported in this environment.");const{default:r}=await i.e(2130).then(i.bind(i,22130));return t.split(ht).map((t=>Tt(t)?`\n
    \n ${t}\n
    \n `:`
    ${t}
    `)).join("").replace(kt,((t,e)=>r.renderToString(e,{throwOnError:!0,displayMode:!0,output:_t()?"mathml":"htmlAndMathml"}).replace(/\n/g," ").replace(//g,"")))},St={getRows:t=>{if(!t)return[""];return mt(t).replace(/\\n/g,"#br#").split("#br#")},sanitizeText:pt,sanitizeTextOrArray:(t,e)=>"string"==typeof t?pt(t,e):t.flat().map((t=>pt(t,e))),hasBreaks:t=>ht.test(t),splitBreaks:t=>t.split(ht),lineBreakRegex:ht,removeScript:dt,getUrl:t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=e.replaceAll(/\(/g,"\\("),e=e.replaceAll(/\)/g,"\\)")),e},evaluate:yt,getMax:function(...t){const e=t.filter((t=>!isNaN(t)));return Math.max(...e)},getMin:function(...t){const e=t.filter((t=>!isNaN(t)));return Math.min(...e)}},Bt=(t,e)=>h(t,e?{s:-40,l:10}:{s:-40,l:-10}),Lt="#ffffff",Ft="#f2f2f2";let Mt=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){var t,e,i,r,n,o,a,s,l,c,u;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||h(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||h(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Bt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Bt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Bt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Bt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||f(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||f(this.tertiaryColor),this.lineColor=this.lineColor||f(this.background),this.arrowheadColor=this.arrowheadColor||f(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?(0,p.A)(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||"grey",this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||(0,p.A)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||f(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||(0,g.A)(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||h(this.primaryColor,{h:30}),this.cScale4=this.cScale4||h(this.primaryColor,{h:60}),this.cScale5=this.cScale5||h(this.primaryColor,{h:90}),this.cScale6=this.cScale6||h(this.primaryColor,{h:120}),this.cScale7=this.cScale7||h(this.primaryColor,{h:150}),this.cScale8=this.cScale8||h(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||h(this.primaryColor,{h:270}),this.cScale10=this.cScale10||h(this.primaryColor,{h:300}),this.cScale11=this.cScale11||h(this.primaryColor,{h:330}),this.darkMode)for(let h=0;h{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}};let jt=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=(0,g.A)(this.primaryColor,16),this.tertiaryColor=h(this.primaryColor,{h:-160}),this.primaryBorderColor=f(this.background),this.secondaryBorderColor=Bt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Bt(this.tertiaryColor,this.darkMode),this.primaryTextColor=f(this.primaryColor),this.secondaryTextColor=f(this.secondaryColor),this.tertiaryTextColor=f(this.tertiaryColor),this.lineColor=f(this.background),this.textColor=f(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=(0,g.A)(f("#323D47"),10),this.lineColor="calculated",this.border1="#81B1DB",this.border2=(0,u.A)(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.sectionBkgColor=(0,p.A)("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=(0,p.A)(this.sectionBkgColor,10),this.taskBorderColor=(0,u.A)(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=(0,u.A)(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){var t,e,i,r,n,o,a,s,l,c,u;this.secondBkg=(0,g.A)(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=(0,g.A)(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.mainContrastColor,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=(0,g.A)(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=this.darkTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=h(this.primaryColor,{h:64}),this.fillType3=h(this.secondaryColor,{h:64}),this.fillType4=h(this.primaryColor,{h:-64}),this.fillType5=h(this.secondaryColor,{h:-64}),this.fillType6=h(this.primaryColor,{h:128}),this.fillType7=h(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||h(this.primaryColor,{h:30}),this.cScale4=this.cScale4||h(this.primaryColor,{h:60}),this.cScale5=this.cScale5||h(this.primaryColor,{h:90}),this.cScale6=this.cScale6||h(this.primaryColor,{h:120}),this.cScale7=this.cScale7||h(this.primaryColor,{h:150}),this.cScale8=this.cScale8||h(this.primaryColor,{h:210}),this.cScale9=this.cScale9||h(this.primaryColor,{h:270}),this.cScale10=this.cScale10||h(this.primaryColor,{h:300}),this.cScale11=this.cScale11||h(this.primaryColor,{h:330});for(let h=0;h{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}};let Et=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=h(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=h(this.primaryColor,{h:-160}),this.primaryBorderColor=Bt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Bt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Bt(this.tertiaryColor,this.darkMode),this.primaryTextColor=f(this.primaryColor),this.secondaryTextColor=f(this.secondaryColor),this.tertiaryTextColor=f(this.tertiaryColor),this.lineColor=f(this.background),this.textColor=f(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#e8e8e8",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="grey",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.sectionBkgColor=(0,u.A)(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}updateColors(){var t,e,i,r,n,o,a,s,l,c,u;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||h(this.primaryColor,{h:30}),this.cScale4=this.cScale4||h(this.primaryColor,{h:60}),this.cScale5=this.cScale5||h(this.primaryColor,{h:90}),this.cScale6=this.cScale6||h(this.primaryColor,{h:120}),this.cScale7=this.cScale7||h(this.primaryColor,{h:150}),this.cScale8=this.cScale8||h(this.primaryColor,{h:210}),this.cScale9=this.cScale9||h(this.primaryColor,{h:270}),this.cScale10=this.cScale10||h(this.primaryColor,{h:300}),this.cScale11=this.cScale11||h(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||(0,p.A)(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||(0,p.A)(this.tertiaryColor,40);for(let h=0;h{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}};const Nt=t=>{const e=new Et;return e.calculate(t),e};let Ot=class{constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=(0,g.A)("#cde498",10),this.primaryBorderColor=Bt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Bt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Bt(this.tertiaryColor,this.darkMode),this.primaryTextColor=f(this.primaryColor),this.secondaryTextColor=f(this.secondaryColor),this.tertiaryTextColor=f(this.primaryColor),this.lineColor=f(this.background),this.textColor=f(this.background),this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="grey",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){var t,e,i,r,n,o,a,s,l,c,u;this.actorBorder=(0,p.A)(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||h(this.primaryColor,{h:30}),this.cScale4=this.cScale4||h(this.primaryColor,{h:60}),this.cScale5=this.cScale5||h(this.primaryColor,{h:90}),this.cScale6=this.cScale6||h(this.primaryColor,{h:120}),this.cScale7=this.cScale7||h(this.primaryColor,{h:150}),this.cScale8=this.cScale8||h(this.primaryColor,{h:210}),this.cScale9=this.cScale9||h(this.primaryColor,{h:270}),this.cScale10=this.cScale10||h(this.primaryColor,{h:300}),this.cScale11=this.cScale11||h(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||(0,p.A)(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||(0,p.A)(this.tertiaryColor,40);for(let h=0;h{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}};class It{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=(0,g.A)(this.contrast,55),this.background="#ffffff",this.tertiaryColor=h(this.primaryColor,{h:-160}),this.primaryBorderColor=Bt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Bt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Bt(this.tertiaryColor,this.darkMode),this.primaryTextColor=f(this.primaryColor),this.secondaryTextColor=f(this.secondaryColor),this.tertiaryTextColor=f(this.tertiaryColor),this.lineColor=f(this.background),this.textColor=f(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){var t,e,i,r,n,o,a,s,l,c,u;this.secondBkg=(0,g.A)(this.contrast,55),this.border2=this.contrast,this.actorBorder=(0,g.A)(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.lineColor,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let h=0;h{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}}const Dt={base:{getThemeVariables:t=>{const e=new Mt;return e.calculate(t),e}},dark:{getThemeVariables:t=>{const e=new jt;return e.calculate(t),e}},default:{getThemeVariables:Nt},forest:{getThemeVariables:t=>{const e=new Ot;return e.calculate(t),e}},neutral:{getThemeVariables:t=>{const e=new It;return e.calculate(t),e}}},qt={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"]},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:""},block:{useMaxWidth:!0,padding:8},theme:"default",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","maxEdges"],legacyMathML:!1,deterministicIds:!1,fontSize:16},zt={...qt,deterministicIDSeed:void 0,themeCSS:void 0,themeVariables:Dt.default.getThemeVariables(),sequence:{...qt.sequence,messageFont:function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},noteFont:function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},actorFont:function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}}},gantt:{...qt.gantt,tickInterval:void 0,useWidth:void 0},c4:{...qt.c4,useWidth:void 0,personFont:function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},external_personFont:function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},systemFont:function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},external_systemFont:function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},system_dbFont:function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},external_system_dbFont:function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},system_queueFont:function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},external_system_queueFont:function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},containerFont:function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},external_containerFont:function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},container_dbFont:function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},external_container_dbFont:function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},container_queueFont:function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},external_container_queueFont:function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},componentFont:function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},external_componentFont:function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},component_dbFont:function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},external_component_dbFont:function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},component_queueFont:function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},external_component_queueFont:function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},boundaryFont:function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},messageFont:function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}}},pie:{...qt.pie,useWidth:984},xyChart:{...qt.xyChart,useWidth:void 0},requirement:{...qt.requirement,useWidth:void 0},gitGraph:{...qt.gitGraph,useMaxWidth:!1},sankey:{...qt.sankey,useMaxWidth:!1}},$t=(t,e="")=>Object.keys(t).reduce(((i,r)=>Array.isArray(t[r])?i:"object"==typeof t[r]&&null!==t[r]?[...i,e+r,...$t(t[r],"")]:[...i,e+r]),[]),Pt=new Set($t(zt,"")),Rt=zt,Ht=t=>{if(st.debug("sanitizeDirective called with",t),"object"==typeof t&&null!=t)if(Array.isArray(t))t.forEach((t=>Ht(t)));else{for(const e of Object.keys(t)){if(st.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!Pt.has(e)||null==t[e]){st.debug("sanitize deleting key: ",e),delete t[e];continue}if("object"==typeof t[e]){st.debug("sanitizing object",e),Ht(t[e]);continue}const i=["themeCSS","fontFamily","altFontFamily"];for(const r of i)e.includes(r)&&(st.debug("sanitizing css option",e),t[e]=Wt(t[e]))}if(t.themeVariables)for(const e of Object.keys(t.themeVariables)){const i=t.themeVariables[e];(null==i?void 0:i.match)&&!i.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[e]="")}st.debug("After sanitization",t)}},Wt=t=>{let e=0,i=0;for(const r of t){if(e{for(const{id:e,detector:i,loader:r}of t)Qt(e,i,r)},Qt=(t,e,i)=>{Xt[t]?st.error(`Detector with key ${t} already exists`):Xt[t]={detector:e,loader:i},st.debug(`Detector with key ${t} added${i?" with loader":""}`)},Kt=(t,e,{depth:i=2,clobber:r=!1}={})=>{const n={depth:i,clobber:r};return Array.isArray(e)&&!Array.isArray(t)?(e.forEach((e=>Kt(t,e,n))),t):Array.isArray(e)&&Array.isArray(t)?(e.forEach((e=>{t.includes(e)||t.push(e)})),t):void 0===t||i<=0?null!=t&&"object"==typeof t&&"object"==typeof e?Object.assign(t,e):e:(void 0!==e&&"object"==typeof t&&"object"==typeof e&&Object.keys(e).forEach((n=>{"object"!=typeof e[n]||void 0!==t[n]&&"object"!=typeof t[n]?(r||"object"!=typeof t[n]&&"object"!=typeof e[n])&&(t[n]=e[n]):(void 0===t[n]&&(t[n]=Array.isArray(e[n])?[]:{}),t[n]=Kt(t[n],e[n],{depth:i-1,clobber:r}))})),t)},te=Kt,ee="\u200b",ie={curveBasis:a.qrM,curveBasisClosed:a.Yu4,curveBasisOpen:a.IA3,curveBumpX:a.Wi0,curveBumpY:a.PGM,curveBundle:a.OEq,curveCardinalClosed:a.olC,curveCardinalOpen:a.IrU,curveCardinal:a.y8u,curveCatmullRomClosed:a.Q7f,curveCatmullRomOpen:a.cVp,curveCatmullRom:a.oDi,curveLinear:a.lUB,curveLinearClosed:a.Lx9,curveMonotoneX:a.nVG,curveMonotoneY:a.uxU,curveNatural:a.Xf2,curveStep:a.GZz,curveStepAfter:a.UPb,curveStepBefore:a.dyv},re=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,ne=function(t,e=null){try{const i=new RegExp(`[%]{2}(?![{]${re.source})(?=[}][%]{2}).*\n`,"ig");let r;t=t.trim().replace(i,"").replace(/'/gm,'"'),st.debug(`Detecting diagram directive${null!==e?" type:"+e:""} based on the text:${t}`);const n=[];for(;null!==(r=Yt.exec(t));)if(r.index===Yt.lastIndex&&Yt.lastIndex++,r&&!e||e&&r[1]&&r[1].match(e)||e&&r[2]&&r[2].match(e)){const t=r[1]?r[1]:r[2],e=r[3]?r[3].trim():r[4]?JSON.parse(r[4].trim()):null;n.push({type:t,args:e})}return 0===n.length?{type:t,args:null}:1===n.length?n[0]:n}catch(i){return st.error(`ERROR: ${i.message} - Unable to parse directive type: '${e}' based on the text: '${t}'`),{type:void 0,args:null}}};function oe(t,e){if(!t)return e;const i=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return ie[i]??e}function ae(t,e){return t&&e?Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)):0}const se=(t,e=2)=>{const i=Math.pow(10,e);return Math.round(t*i)/i},le=(t,e)=>{let i,r=e;for(const n of t){if(i){const t=ae(n,i);if(t=1)return{x:n.x,y:n.y};if(e>0&&e<1)return{x:se((1-e)*i.x+e*n.x,5),y:se((1-e)*i.y+e*n.y,5)}}}i=n}throw new Error("Could not find a suitable point for the given distance")};function ce(t){let e="",i="";for(const r of t)void 0!==r&&(r.startsWith("color:")||r.startsWith("text-align:")?i=i+r+";":e=e+r+";");return{style:e,labelStyle:i}}let he=0;const ue=()=>(he++,"id-"+Math.random().toString(36).substr(2,12)+"-"+he);const de=t=>function(t){let e="";const i="0123456789abcdef";for(let r=0;r{if(!t)return t;if(i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"
    "},i),St.lineBreakRegex.test(t))return t;const r=t.split(" "),n=[];let o="";return r.forEach(((t,a)=>{const s=ye(`${t} `,i),l=ye(o,i);if(s>e){const{hyphenatedStrings:r,remainingWord:a}=ge(t,e,"-",i);n.push(o,...r),o=a}else l+s>=e?(n.push(o),o=t):o=[o,t].filter(Boolean).join(" ");a+1===r.length&&n.push(o)})),n.filter((t=>""!==t)).join(i.joinWith)}),((t,e,i)=>`${t}${e}${i.fontSize}${i.fontWeight}${i.fontFamily}${i.joinWith}`)),ge=(0,y.A)(((t,e,i="-",r)=>{r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},r);const n=[...t],o=[];let a="";return n.forEach(((t,s)=>{const l=`${a}${t}`;if(ye(l,r)>=e){const t=s+1,e=n.length===t,r=`${l}${i}`;o.push(e?l:r),a=""}else a=l})),{hyphenatedStrings:o,remainingWord:a}}),((t,e,i="-",r)=>`${t}${e}${i}${r.fontSize}${r.fontWeight}${r.fontFamily}`));function me(t,e){return xe(t,e).height}function ye(t,e){return xe(t,e).width}const xe=(0,y.A)(((t,e)=>{const{fontSize:i=12,fontFamily:r="Arial",fontWeight:n=400}=e;if(!t)return{width:0,height:0};const[,o]=ve(i),s=["sans-serif",r],l=t.split(St.lineBreakRegex),c=[],h=(0,a.Ltv)("body");if(!h.remove)return{width:0,height:0,lineHeight:0};const u=h.append("svg");for(const a of s){let t=0;const e={width:0,height:0,lineHeight:0};for(const i of l){const r={x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""};r.text=i||ee;const s=fe(u,r).style("font-size",o).style("font-weight",n).style("font-family",a),l=(s._groups||s)[0][0].getBBox();if(0===l.width&&0===l.height)throw new Error("svg element not in render tree");e.width=Math.round(Math.max(e.width,l.width)),t=Math.round(l.height),e.height+=t,e.lineHeight=Math.round(Math.max(e.lineHeight,t))}c.push(e)}u.remove();return c[isNaN(c[1].height)||isNaN(c[1].width)||isNaN(c[1].lineHeight)||c[0].height>c[1].height&&c[0].width>c[1].width&&c[0].lineHeight>c[1].lineHeight?0:1]}),((t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`));let be;function Ce(t){return"str"in t}const ve=t=>{if("number"==typeof t)return[t,t+"px"];const e=parseInt(t??"",10);return Number.isNaN(e)?[void 0,void 0]:t===String(e)?[e,t+"px"]:[e,t]};function _e(t,e){return(0,x.A)({},t,e)}const ke={assignWithDepth:te,wrapLabel:pe,calculateTextHeight:me,calculateTextWidth:ye,calculateTextDimensions:xe,cleanAndMerge:_e,detectInit:function(t,e){const i=ne(t,/(?:init\b)|(?:initialize\b)/);let r={};if(Array.isArray(i)){const t=i.map((t=>t.args));Ht(t),r=te(r,[...t])}else r=i.args;if(!r)return;let n=Zt(t,e);const o="config";return void 0!==r[o]&&("flowchart-v2"===n&&(n="flowchart"),r[n]=r[o],delete r[o]),r},detectDirective:ne,isSubstringInArray:function(t,e){for(const[i,r]of e.entries())if(r.match(t))return i;return-1},interpolateToCurve:oe,calcLabelPosition:function(t){return 1===t.length?t[0]:function(t){let e,i=0;return t.forEach((t=>{i+=ae(t,e),e=t})),le(t,i/2)}(t)},calcCardinalityPosition:(t,e,i)=>{st.info(`our points ${JSON.stringify(e)}`),e[0]!==i&&(e=e.reverse());const r=le(e,25),n=t?10:5,o=Math.atan2(e[0].y-r.y,e[0].x-r.x),a={x:0,y:0};return a.x=Math.sin(o)*n+(e[0].x+r.x)/2,a.y=-Math.cos(o)*n+(e[0].y+r.y)/2,a},calcTerminalLabelPosition:function(t,e,i){const r=structuredClone(i);st.info("our points",r),"start_left"!==e&&"start_right"!==e&&r.reverse();const n=le(r,25+t),o=10+.5*t,a=Math.atan2(r[0].y-n.y,r[0].x-n.x),s={x:0,y:0};return"start_left"===e?(s.x=Math.sin(a+Math.PI)*o+(r[0].x+n.x)/2,s.y=-Math.cos(a+Math.PI)*o+(r[0].y+n.y)/2):"end_right"===e?(s.x=Math.sin(a-Math.PI)*o+(r[0].x+n.x)/2-5,s.y=-Math.cos(a-Math.PI)*o+(r[0].y+n.y)/2-5):"end_left"===e?(s.x=Math.sin(a)*o+(r[0].x+n.x)/2-5,s.y=-Math.cos(a)*o+(r[0].y+n.y)/2-5):(s.x=Math.sin(a)*o+(r[0].x+n.x)/2,s.y=-Math.cos(a)*o+(r[0].y+n.y)/2),s},formatUrl:function(t,e){const i=t.trim();if(i)return"loose"!==e.securityLevel?(0,o.Jf)(i):i},getStylesFromArray:ce,generateId:ue,random:de,runFunc:(t,...e)=>{const i=t.split("."),r=i.length-1,n=i[r];let o=window;for(let a=0;a{var n;if(!r)return;const o=null==(n=t.node())?void 0:n.getBBox();o&&t.append("text").text(r).attr("x",o.x+o.width/2).attr("y",-i).attr("class",e)},parseFontSize:ve,InitIDGenerator:class{constructor(t=!1,e){this.count=0,this.count=e?e.length:0,this.next=t?()=>this.count++:()=>Date.now()}}},Te=function(t){return t.replace(/\ufb02\xb0\xb0/g,"&#").replace(/\ufb02\xb0/g,"&").replace(/\xb6\xdf/g,";")},Ae="10.9.3",we=Object.freeze(Rt);let Se,Be=te({},we),Le=[],Fe=te({},we);const Me=(t,e)=>{let i=te({},t),r={};for(const n of e)Oe(n),r=te(r,n);if(i=te(i,r),r.theme&&r.theme in Dt){const t=te({},Se),e=te(t.themeVariables||{},r.themeVariables);i.theme&&i.theme in Dt&&(i.themeVariables=Dt[i.theme].getThemeVariables(e))}return Fe=i,ze(Fe),Fe},je=()=>te({},Be),Ee=t=>(ze(t),te(Fe,t),Ne()),Ne=()=>te({},Fe),Oe=t=>{t&&(["secure",...Be.secure??[]].forEach((e=>{Object.hasOwn(t,e)&&(st.debug(`Denied attempt to modify a secure key ${e}`,t[e]),delete t[e])})),Object.keys(t).forEach((e=>{e.startsWith("__")&&delete t[e]})),Object.keys(t).forEach((e=>{"string"==typeof t[e]&&(t[e].includes("<")||t[e].includes(">")||t[e].includes("url(data:"))&&delete t[e],"object"==typeof t[e]&&Oe(t[e])})))},Ie=(t=Be)=>{Le=[],Me(t,Le)},De={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},qe={},ze=t=>{var e;t&&((t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&(qe[e="LAZY_LOAD_DEPRECATED"]||(st.warn(De[e]),qe[e]=!0)))},$e={id:"c4",detector:t=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t),loader:async()=>{const{diagram:t}=await i.e(3292).then(i.bind(i,53292));return{id:"c4",diagram:t}}},Pe="flowchart",Re={id:Pe,detector:(t,e)=>{var i,r;return"dagre-wrapper"!==(null==(i=null==e?void 0:e.flowchart)?void 0:i.defaultRenderer)&&"elk"!==(null==(r=null==e?void 0:e.flowchart)?void 0:r.defaultRenderer)&&/^\s*graph/.test(t)},loader:async()=>{const{diagram:t}=await Promise.all([i.e(1169),i.e(2519),i.e(1176),i.e(8146),i.e(8995),i.e(5860),i.e(2315)]).then(i.bind(i,22315));return{id:Pe,diagram:t}}},He="flowchart-v2",We={id:He,detector:(t,e)=>{var i,r,n;return"dagre-d3"!==(null==(i=null==e?void 0:e.flowchart)?void 0:i.defaultRenderer)&&"elk"!==(null==(r=null==e?void 0:e.flowchart)?void 0:r.defaultRenderer)&&(!(!/^\s*graph/.test(t)||"dagre-wrapper"!==(null==(n=null==e?void 0:e.flowchart)?void 0:n.defaultRenderer))||/^\s*flowchart/.test(t))},loader:async()=>{const{diagram:t}=await Promise.all([i.e(1169),i.e(2519),i.e(1176),i.e(8146),i.e(8995),i.e(5860),i.e(1689)]).then(i.bind(i,21689));return{id:He,diagram:t}}},Ue={id:"er",detector:t=>/^\s*erDiagram/.test(t),loader:async()=>{const{diagram:t}=await Promise.all([i.e(1169),i.e(1176),i.e(604)]).then(i.bind(i,70604));return{id:"er",diagram:t}}},Ye="gitGraph",Ve={id:Ye,detector:t=>/^\s*gitGraph/.test(t),loader:async()=>{const{diagram:t}=await i.e(4073).then(i.bind(i,24073));return{id:Ye,diagram:t}}},Ge="gantt",Xe={id:Ge,detector:t=>/^\s*gantt/.test(t),loader:async()=>{const{diagram:t}=await i.e(8989).then(i.bind(i,8989));return{id:Ge,diagram:t}}},Ze="info",Je={id:Ze,detector:t=>/^\s*info/.test(t),loader:async()=>{const{diagram:t}=await i.e(5857).then(i.bind(i,15857));return{id:Ze,diagram:t}}},Qe={id:"pie",detector:t=>/^\s*pie/.test(t),loader:async()=>{const{diagram:t}=await i.e(8846).then(i.bind(i,48846));return{id:"pie",diagram:t}}},Ke="quadrantChart",ti={id:Ke,detector:t=>/^\s*quadrantChart/.test(t),loader:async()=>{const{diagram:t}=await i.e(4564).then(i.bind(i,94564));return{id:Ke,diagram:t}}},ei="xychart",ii={id:ei,detector:t=>/^\s*xychart-beta/.test(t),loader:async()=>{const{diagram:t}=await Promise.all([i.e(2519),i.e(1329)]).then(i.bind(i,31329));return{id:ei,diagram:t}}},ri="requirement",ni={id:ri,detector:t=>/^\s*requirement(Diagram)?/.test(t),loader:async()=>{const{diagram:t}=await Promise.all([i.e(1169),i.e(1176),i.e(3417)]).then(i.bind(i,23417));return{id:ri,diagram:t}}},oi="sequence",ai={id:oi,detector:t=>/^\s*sequenceDiagram/.test(t),loader:async()=>{const{diagram:t}=await i.e(3687).then(i.bind(i,23687));return{id:oi,diagram:t}}},si="class",li={id:si,detector:(t,e)=>{var i;return"dagre-wrapper"!==(null==(i=null==e?void 0:e.class)?void 0:i.defaultRenderer)&&/^\s*classDiagram/.test(t)},loader:async()=>{const{diagram:t}=await Promise.all([i.e(1169),i.e(1176),i.e(1987),i.e(6770)]).then(i.bind(i,86770));return{id:si,diagram:t}}},ci="classDiagram",hi={id:ci,detector:(t,e)=>{var i;return!(!/^\s*classDiagram/.test(t)||"dagre-wrapper"!==(null==(i=null==e?void 0:e.class)?void 0:i.defaultRenderer))||/^\s*classDiagram-v2/.test(t)},loader:async()=>{const{diagram:t}=await Promise.all([i.e(1169),i.e(2519),i.e(1176),i.e(8146),i.e(8995),i.e(1987),i.e(5628)]).then(i.bind(i,85628));return{id:ci,diagram:t}}},ui="state",di={id:ui,detector:(t,e)=>{var i;return"dagre-wrapper"!==(null==(i=null==e?void 0:e.state)?void 0:i.defaultRenderer)&&/^\s*stateDiagram/.test(t)},loader:async()=>{const{diagram:t}=await Promise.all([i.e(1169),i.e(1176),i.e(7899),i.e(5163)]).then(i.bind(i,95163));return{id:ui,diagram:t}}},fi="stateDiagram",pi={id:fi,detector:(t,e)=>{var i;return!!/^\s*stateDiagram-v2/.test(t)||!(!/^\s*stateDiagram/.test(t)||"dagre-wrapper"!==(null==(i=null==e?void 0:e.state)?void 0:i.defaultRenderer))},loader:async()=>{const{diagram:t}=await Promise.all([i.e(1169),i.e(2519),i.e(1176),i.e(8146),i.e(8995),i.e(7899),i.e(141)]).then(i.bind(i,50141));return{id:fi,diagram:t}}},gi="journey",mi={id:gi,detector:t=>/^\s*journey/.test(t),loader:async()=>{const{diagram:t}=await i.e(2144).then(i.bind(i,82144));return{id:gi,diagram:t}}},yi=function(t,e,i,r){const n=function(t,e,i){let r=new Map;return i?(r.set("width","100%"),r.set("style",`max-width: ${e}px;`)):(r.set("height",t),r.set("width",e)),r}(e,i,r);!function(t,e){for(let i of e)t.attr(i[0],i[1])}(t,n)},xi=function(t,e,i,r){const n=e.node().getBBox(),o=n.width,a=n.height;st.info(`SVG bounds: ${o}x${a}`,n);let s=0,l=0;st.info(`Graph bounds: ${s}x${l}`,t),s=o+2*i,l=a+2*i,st.info(`Calculated bounds: ${s}x${l}`),yi(e,l,s,r);const c=`${n.x-i} ${n.y-i} ${n.width+2*i} ${n.height+2*i}`;e.attr("viewBox",c)},bi={},Ci=(t,e,i)=>{let r="";return t in bi&&bi[t]?r=bi[t](i):st.warn(`No theme found for ${t}`),` & {\n font-family: ${i.fontFamily};\n font-size: ${i.fontSize};\n fill: ${i.textColor}\n }\n\n /* Classes common for multiple diagrams */\n\n & .error-icon {\n fill: ${i.errorBkgColor};\n }\n & .error-text {\n fill: ${i.errorTextColor};\n stroke: ${i.errorTextColor};\n }\n\n & .edge-thickness-normal {\n stroke-width: 2px;\n }\n & .edge-thickness-thick {\n stroke-width: 3.5px\n }\n & .edge-pattern-solid {\n stroke-dasharray: 0;\n }\n\n & .edge-pattern-dashed{\n stroke-dasharray: 3;\n }\n .edge-pattern-dotted {\n stroke-dasharray: 2;\n }\n\n & .marker {\n fill: ${i.lineColor};\n stroke: ${i.lineColor};\n }\n & .marker.cross {\n stroke: ${i.lineColor};\n }\n\n & svg {\n font-family: ${i.fontFamily};\n font-size: ${i.fontSize};\n }\n\n ${r}\n\n ${e}\n`};let vi="",_i="",ki="";const Ti=t=>pt(t,Ne()),Ai=()=>{vi="",ki="",_i=""},wi=t=>{vi=Ti(t).replace(/^\s+/g,"")},Si=()=>vi,Bi=t=>{ki=Ti(t).replace(/\n\s+/g,"\n")},Li=()=>ki,Fi=t=>{_i=Ti(t)},Mi=()=>_i,ji=Object.freeze(Object.defineProperty({__proto__:null,clear:Ai,getAccDescription:Li,getAccTitle:Si,getDiagramTitle:Mi,setAccDescription:Bi,setAccTitle:wi,setDiagramTitle:Fi},Symbol.toStringTag,{value:"Module"})),Ei=st,Ni=lt,Oi=Ne,Ii=Ee,Di=we,qi=t=>pt(t,Oi()),zi=xi,$i={},Pi=(t,e,i)=>{var r,n,o;if($i[t])throw new Error(`Diagram ${t} already registered.`);$i[t]=e,i&&Qt(t,i),n=t,void 0!==(o=e.styles)&&(bi[n]=o),null==(r=e.injectUtils)||r.call(e,Ei,Ni,Oi,qi,zi,ji,(()=>{}))},Ri=t=>{if(t in $i)return $i[t];throw new Hi(t)};class Hi extends Error{constructor(t){super(`Diagram ${t} not found.`)}}const Wi=t=>{var e;const{securityLevel:i}=Oi();let r=(0,a.Ltv)("body");if("sandbox"===i){const i=(null==(e=(0,a.Ltv)(`#i${t}`).node())?void 0:e.contentDocument)??document;r=(0,a.Ltv)(i.body)}return r.select(`#${t}`)},Ui={draw:(t,e,i)=>{st.debug("rendering svg for syntax error\n");const r=Wi(e),n=r.append("g");r.attr("viewBox","0 0 2412 512"),yi(r,100,512,!0),n.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),n.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),n.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),n.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),n.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),n.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),n.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),n.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${i}`)}},Yi=Ui,Vi={db:{},renderer:Ui,parser:{parser:{yy:{}},parse:()=>{}}},Gi="flowchart-elk",Xi={id:Gi,detector:(t,e)=>{var i;return!!(/^\s*flowchart-elk/.test(t)||/^\s*flowchart|graph/.test(t)&&"elk"===(null==(i=null==e?void 0:e.flowchart)?void 0:i.defaultRenderer))},loader:async()=>{const{diagram:t}=await Promise.all([i.e(2519),i.e(8146),i.e(5860),i.e(4104)]).then(i.bind(i,24104));return{id:Gi,diagram:t}}},Zi="timeline",Ji={id:Zi,detector:t=>/^\s*timeline/.test(t),loader:async()=>{const{diagram:t}=await i.e(971).then(i.bind(i,50971));return{id:Zi,diagram:t}}},Qi="mindmap",Ki={id:Qi,detector:t=>/^\s*mindmap/.test(t),loader:async()=>{const{diagram:t}=await Promise.all([i.e(2519),i.e(495)]).then(i.bind(i,80495));return{id:Qi,diagram:t}}},tr="sankey",er={id:tr,detector:t=>/^\s*sankey-beta/.test(t),loader:async()=>{const{diagram:t}=await i.e(4529).then(i.bind(i,64529));return{id:tr,diagram:t}}},ir="block",rr={id:ir,detector:t=>/^\s*block-beta/.test(t),loader:async()=>{const{diagram:t}=await Promise.all([i.e(1169),i.e(2519),i.e(8146),i.e(6625)]).then(i.bind(i,56625));return{id:ir,diagram:t}}};let nr=!1;const or=()=>{nr||(nr=!0,Pi("error",Vi,(t=>"error"===t.toLowerCase().trim())),Pi("---",{db:{clear:()=>{}},styles:{},renderer:{draw:()=>{}},parser:{parser:{yy:{}},parse:()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")}},init:()=>null},(t=>t.toLowerCase().trimStart().startsWith("---"))),Jt($e,hi,li,Ue,Xe,Je,Qe,ni,ai,Xi,We,Re,Ki,Ji,Ve,pi,di,mi,ti,er,ii,rr))};class ar{constructor(t,e={}){this.text=t,this.metadata=e,this.type="graph",this.text=function(t){let e=t;return e=e.replace(/style.*:\S*#.*;/g,(function(t){return t.substring(0,t.length-1)})),e=e.replace(/classDef.*:\S*#.*;/g,(function(t){return t.substring(0,t.length-1)})),e=e.replace(/#\w+;/g,(function(t){const e=t.substring(1,t.length-1);return/^\+?\d+$/.test(e)?"\ufb02\xb0\xb0"+e+"\xb6\xdf":"\ufb02\xb0"+e+"\xb6\xdf"})),e}(t),this.text+="\n";const i=Ne();try{this.type=Zt(t,i)}catch(n){this.type="error",this.detectError=n}const r=Ri(this.type);st.debug("Type "+this.type),this.db=r.db,this.renderer=r.renderer,this.parser=r.parser,this.parser.parser.yy=this.db,this.init=r.init,this.parse()}parse(){var t,e,i,r,n;if(this.detectError)throw this.detectError;null==(e=(t=this.db).clear)||e.call(t);const o=Ne();null==(i=this.init)||i.call(this,o),this.metadata.title&&(null==(n=(r=this.db).setDiagramTitle)||n.call(r,this.metadata.title)),this.parser.parse(this.text)}async render(t,e){await this.renderer.draw(this.text,t,e,this)}getParser(){return this.parser}getType(){return this.type}}const sr=async(t,e={})=>{const i=Zt(t,Ne());try{Ri(i)}catch(r){const t=Xt[i].loader;if(!t)throw new Gt(`Diagram ${i} not found.`);const{id:e,diagram:n}=await t();Pi(e,n)}return new ar(t,e)};let lr=[];function cr(t){return null==t}var hr={isNothing:cr,isObject:function(t){return"object"==typeof t&&null!==t},toArray:function(t){return Array.isArray(t)?t:cr(t)?[]:[t]},repeat:function(t,e){var i,r="";for(i=0;is&&(e=r-s+(o=" ... ").length),i-r>s&&(i=r+s-(a=" ...").length),{str:o+t.slice(e,i).replace(/\t/g,"\u2192")+a,pos:r-e+o.length}}function gr(t,e){return hr.repeat(" ",e-t.length)+t}var mr=function(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),"number"!=typeof e.indent&&(e.indent=1),"number"!=typeof e.linesBefore&&(e.linesBefore=3),"number"!=typeof e.linesAfter&&(e.linesAfter=2);for(var i,r=/\r?\n|\r|\0/g,n=[0],o=[],a=-1;i=r.exec(t.buffer);)o.push(i.index),n.push(i.index+i[0].length),t.position<=i.index&&a<0&&(a=n.length-2);a<0&&(a=n.length-1);var s,l,c="",h=Math.min(t.line+e.linesAfter,o.length).toString().length,u=e.maxLength-(e.indent+h+3);for(s=1;s<=e.linesBefore&&!(a-s<0);s++)l=pr(t.buffer,n[a-s],o[a-s],t.position-(n[a]-n[a-s]),u),c=hr.repeat(" ",e.indent)+gr((t.line-s+1).toString(),h)+" | "+l.str+"\n"+c;for(l=pr(t.buffer,n[a],o[a],t.position,u),c+=hr.repeat(" ",e.indent)+gr((t.line+1).toString(),h)+" | "+l.str+"\n",c+=hr.repeat("-",e.indent+h+3+l.pos)+"^\n",s=1;s<=e.linesAfter&&!(a+s>=o.length);s++)l=pr(t.buffer,n[a+s],o[a+s],t.position-(n[a]-n[a+s]),u),c+=hr.repeat(" ",e.indent)+gr((t.line+s+1).toString(),h)+" | "+l.str+"\n";return c.replace(/\n$/,"")},yr=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],xr=["scalar","sequence","mapping"];var br=function(t,e){var i,r;if(e=e||{},Object.keys(e).forEach((function(e){if(-1===yr.indexOf(e))throw new fr('Unknown option "'+e+'" is met in definition of "'+t+'" YAML type.')})),this.options=e,this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(t){return t},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=(i=e.styleAliases||null,r={},null!==i&&Object.keys(i).forEach((function(t){i[t].forEach((function(e){r[String(e)]=t}))})),r),-1===xr.indexOf(this.kind))throw new fr('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')};function Cr(t,e){var i=[];return t[e].forEach((function(t){var e=i.length;i.forEach((function(i,r){i.tag===t.tag&&i.kind===t.kind&&i.multi===t.multi&&(e=r)})),i[e]=t})),i}function vr(t){return this.extend(t)}vr.prototype.extend=function(t){var e=[],i=[];if(t instanceof br)i.push(t);else if(Array.isArray(t))i=i.concat(t);else{if(!t||!Array.isArray(t.implicit)&&!Array.isArray(t.explicit))throw new fr("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");t.implicit&&(e=e.concat(t.implicit)),t.explicit&&(i=i.concat(t.explicit))}e.forEach((function(t){if(!(t instanceof br))throw new fr("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(t.loadKind&&"scalar"!==t.loadKind)throw new fr("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(t.multi)throw new fr("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")})),i.forEach((function(t){if(!(t instanceof br))throw new fr("Specified list of YAML types (or a single Type object) contains a non-Type object.")}));var r=Object.create(vr.prototype);return r.implicit=(this.implicit||[]).concat(e),r.explicit=(this.explicit||[]).concat(i),r.compiledImplicit=Cr(r,"implicit"),r.compiledExplicit=Cr(r,"explicit"),r.compiledTypeMap=function(){var t,e,i={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function r(t){t.multi?(i.multi[t.kind].push(t),i.multi.fallback.push(t)):i[t.kind][t.tag]=i.fallback[t.tag]=t}for(t=0,e=arguments.length;t=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},octal:function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},decimal:function(t){return t.toString(10)},hexadecimal:function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Br=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");var Lr=/^[-+]?[0-9]+e/;var Fr=new br("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(t){return null!==t&&!(!Br.test(t)||"_"===t[t.length-1])},construct:function(t){var e,i;return i="-"===(e=t.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),".inf"===e?1===i?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===e?NaN:i*parseFloat(e,10)},predicate:function(t){return"[object Number]"===Object.prototype.toString.call(t)&&(t%1!=0||hr.isNegativeZero(t))},represent:function(t,e){var i;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(hr.isNegativeZero(t))return"-0.0";return i=t.toString(10),Lr.test(i)?i.replace("e",".e"):i},defaultStyle:"lowercase"}),Mr=_r.extend({implicit:[kr,Tr,Sr,Fr]}),jr=Mr,Er=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Nr=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");var Or=new br("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(t){return null!==t&&(null!==Er.exec(t)||null!==Nr.exec(t))},construct:function(t){var e,i,r,n,o,a,s,l,c=0,h=null;if(null===(e=Er.exec(t))&&(e=Nr.exec(t)),null===e)throw new Error("Date resolve error");if(i=+e[1],r=+e[2]-1,n=+e[3],!e[4])return new Date(Date.UTC(i,r,n));if(o=+e[4],a=+e[5],s=+e[6],e[7]){for(c=e[7].slice(0,3);c.length<3;)c+="0";c=+c}return e[9]&&(h=6e4*(60*+e[10]+ +(e[11]||0)),"-"===e[9]&&(h=-h)),l=new Date(Date.UTC(i,r,n,o,a,s,c)),h&&l.setTime(l.getTime()-h),l},instanceOf:Date,represent:function(t){return t.toISOString()}});var Ir=new br("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(t){return"<<"===t||null===t}}),Dr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";var qr=new br("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(t){if(null===t)return!1;var e,i,r=0,n=t.length,o=Dr;for(i=0;i64)){if(e<0)return!1;r+=6}return r%8==0},construct:function(t){var e,i,r=t.replace(/[\r\n=]/g,""),n=r.length,o=Dr,a=0,s=[];for(e=0;e>16&255),s.push(a>>8&255),s.push(255&a)),a=a<<6|o.indexOf(r.charAt(e));return 0===(i=n%4*6)?(s.push(a>>16&255),s.push(a>>8&255),s.push(255&a)):18===i?(s.push(a>>10&255),s.push(a>>2&255)):12===i&&s.push(a>>4&255),new Uint8Array(s)},predicate:function(t){return"[object Uint8Array]"===Object.prototype.toString.call(t)},represent:function(t){var e,i,r="",n=0,o=t.length,a=Dr;for(e=0;e>18&63],r+=a[n>>12&63],r+=a[n>>6&63],r+=a[63&n]),n=(n<<8)+t[e];return 0===(i=o%3)?(r+=a[n>>18&63],r+=a[n>>12&63],r+=a[n>>6&63],r+=a[63&n]):2===i?(r+=a[n>>10&63],r+=a[n>>4&63],r+=a[n<<2&63],r+=a[64]):1===i&&(r+=a[n>>2&63],r+=a[n<<4&63],r+=a[64],r+=a[64]),r}}),zr=Object.prototype.hasOwnProperty,$r=Object.prototype.toString;var Pr=new br("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(t){if(null===t)return!0;var e,i,r,n,o,a=[],s=t;for(e=0,i=s.length;e>10),56320+(t-65536&1023))}for(var ln=new Array(256),cn=new Array(256),hn=0;hn<256;hn++)ln[hn]=an(hn)?1:0,cn[hn]=an(hn);function un(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||Yr,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function dn(t,e){var i={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return i.snippet=mr(i),new fr(e,i)}function fn(t,e){throw dn(t,e)}function pn(t,e){t.onWarning&&t.onWarning.call(null,dn(t,e))}var gn={YAML:function(t,e,i){var r,n,o;null!==t.version&&fn(t,"duplication of %YAML directive"),1!==i.length&&fn(t,"YAML directive accepts exactly one argument"),null===(r=/^([0-9]+)\.([0-9]+)$/.exec(i[0]))&&fn(t,"ill-formed argument of the YAML directive"),n=parseInt(r[1],10),o=parseInt(r[2],10),1!==n&&fn(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=o<2,1!==o&&2!==o&&pn(t,"unsupported YAML version of the document")},TAG:function(t,e,i){var r,n;2!==i.length&&fn(t,"TAG directive accepts exactly two arguments"),r=i[0],n=i[1],Jr.test(r)||fn(t,"ill-formed tag handle (first argument) of the TAG directive"),Vr.call(t.tagMap,r)&&fn(t,'there is a previously declared suffix for "'+r+'" tag handle'),Qr.test(n)||fn(t,"ill-formed tag prefix (second argument) of the TAG directive");try{n=decodeURIComponent(n)}catch(o){fn(t,"tag prefix is malformed: "+n)}t.tagMap[r]=n}};function mn(t,e,i,r){var n,o,a,s;if(e1&&(t.result+=hr.repeat("\n",e-1))}function kn(t,e){var i,r,n=t.tag,o=t.anchor,a=[],s=!1;if(-1!==t.firstTabInLine)return!1;for(null!==t.anchor&&(t.anchorMap[t.anchor]=a),r=t.input.charCodeAt(t.position);0!==r&&(-1!==t.firstTabInLine&&(t.position=t.firstTabInLine,fn(t,"tab characters must not be used in indentation")),45===r)&&rn(t.input.charCodeAt(t.position+1));)if(s=!0,t.position++,Cn(t,!0,-1)&&t.lineIndent<=e)a.push(null),r=t.input.charCodeAt(t.position);else if(i=t.line,wn(t,e,3,!1,!0),a.push(t.result),Cn(t,!0,-1),r=t.input.charCodeAt(t.position),(t.line===i||t.lineIndent>e)&&0!==r)fn(t,"bad indentation of a sequence entry");else if(t.lineIndente?p=1:t.lineIndent===e?p=0:t.lineIndente?p=1:t.lineIndent===e?p=0:t.lineIndente)&&(y&&(a=t.line,s=t.lineStart,l=t.position),wn(t,e,4,!0,n)&&(y?g=t.result:m=t.result),y||(xn(t,d,f,p,g,m,a,s,l),p=g=m=null),Cn(t,!0,-1),c=t.input.charCodeAt(t.position)),(t.line===o||t.lineIndent>e)&&0!==c)fn(t,"bad indentation of a mapping entry");else if(t.lineIndent=0))break;0===n?fn(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):c?fn(t,"repeat of an indentation width identifier"):(h=e+n-1,c=!0)}if(en(o)){do{o=t.input.charCodeAt(++t.position)}while(en(o));if(35===o)do{o=t.input.charCodeAt(++t.position)}while(!tn(o)&&0!==o)}for(;0!==o;){for(bn(t),t.lineIndent=0,o=t.input.charCodeAt(t.position);(!c||t.lineIndenth&&(h=t.lineIndent),tn(o))u++;else{if(t.lineIndent0){for(n=a,o=0;n>0;n--)(a=on(s=t.input.charCodeAt(++t.position)))>=0?o=(o<<4)+a:fn(t,"expected hexadecimal character");t.result+=sn(o),t.position++}else fn(t,"unknown escape sequence");i=r=t.position}else tn(s)?(mn(t,i,r,!0),_n(t,Cn(t,!1,e)),i=r=t.position):t.position===t.lineStart&&vn(t)?fn(t,"unexpected end of the document within a double quoted scalar"):(t.position++,r=t.position)}fn(t,"unexpected end of the stream within a double quoted scalar")}(t,d)?m=!0:!function(t){var e,i,r;if(42!==(r=t.input.charCodeAt(t.position)))return!1;for(r=t.input.charCodeAt(++t.position),e=t.position;0!==r&&!rn(r)&&!nn(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&fn(t,"name of an alias node must contain at least one character"),i=t.input.slice(e,t.position),Vr.call(t.anchorMap,i)||fn(t,'unidentified alias "'+i+'"'),t.result=t.anchorMap[i],Cn(t,!0,-1),!0}(t)?function(t,e,i){var r,n,o,a,s,l,c,h,u=t.kind,d=t.result;if(rn(h=t.input.charCodeAt(t.position))||nn(h)||35===h||38===h||42===h||33===h||124===h||62===h||39===h||34===h||37===h||64===h||96===h)return!1;if((63===h||45===h)&&(rn(r=t.input.charCodeAt(t.position+1))||i&&nn(r)))return!1;for(t.kind="scalar",t.result="",n=o=t.position,a=!1;0!==h;){if(58===h){if(rn(r=t.input.charCodeAt(t.position+1))||i&&nn(r))break}else if(35===h){if(rn(t.input.charCodeAt(t.position-1)))break}else{if(t.position===t.lineStart&&vn(t)||i&&nn(h))break;if(tn(h)){if(s=t.line,l=t.lineStart,c=t.lineIndent,Cn(t,!1,-1),t.lineIndent>=e){a=!0,h=t.input.charCodeAt(t.position);continue}t.position=o,t.line=s,t.lineStart=l,t.lineIndent=c;break}}a&&(mn(t,n,o,!1),_n(t,t.line-s),n=o=t.position,a=!1),en(h)||(o=t.position+1),h=t.input.charCodeAt(++t.position)}return mn(t,n,o,!1),!!t.result||(t.kind=u,t.result=d,!1)}(t,d,1===i)&&(m=!0,null===t.tag&&(t.tag="?")):(m=!0,null===t.tag&&null===t.anchor||fn(t,"alias node should not have any properties")),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):0===p&&(m=s&&kn(t,f))),null===t.tag)null!==t.anchor&&(t.anchorMap[t.anchor]=t.result);else if("?"===t.tag){for(null!==t.result&&"scalar"!==t.kind&&fn(t,'unacceptable node kind for ! tag; it should be "scalar", not "'+t.kind+'"'),l=0,c=t.implicitTypes.length;l"),null!==t.result&&u.kind!==t.kind&&fn(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+u.kind+'", not "'+t.kind+'"'),u.resolve(t.result,t.tag)?(t.result=u.construct(t.result,t.tag),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):fn(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return null!==t.listener&&t.listener("close",t),null!==t.tag||null!==t.anchor||m}function Sn(t){var e,i,r,n,o=t.position,a=!1;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);0!==(n=t.input.charCodeAt(t.position))&&(Cn(t,!0,-1),n=t.input.charCodeAt(t.position),!(t.lineIndent>0||37!==n));){for(a=!0,n=t.input.charCodeAt(++t.position),e=t.position;0!==n&&!rn(n);)n=t.input.charCodeAt(++t.position);for(r=[],(i=t.input.slice(e,t.position)).length<1&&fn(t,"directive name must not be less than one character in length");0!==n;){for(;en(n);)n=t.input.charCodeAt(++t.position);if(35===n){do{n=t.input.charCodeAt(++t.position)}while(0!==n&&!tn(n));break}if(tn(n))break;for(e=t.position;0!==n&&!rn(n);)n=t.input.charCodeAt(++t.position);r.push(t.input.slice(e,t.position))}0!==n&&bn(t),Vr.call(gn,i)?gn[i](t,i,r):pn(t,'unknown document directive "'+i+'"')}Cn(t,!0,-1),0===t.lineIndent&&45===t.input.charCodeAt(t.position)&&45===t.input.charCodeAt(t.position+1)&&45===t.input.charCodeAt(t.position+2)?(t.position+=3,Cn(t,!0,-1)):a&&fn(t,"directives end mark is expected"),wn(t,t.lineIndent-1,4,!1,!0),Cn(t,!0,-1),t.checkLineBreaks&&Xr.test(t.input.slice(o,t.position))&&pn(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&vn(t)?46===t.input.charCodeAt(t.position)&&(t.position+=3,Cn(t,!0,-1)):t.position{const{text:e,metadata:i}=function(t){const e=t.match(Ut);if(!e)return{text:t,metadata:{}};let i=Fn(e[1],{schema:Ln})??{};i="object"!=typeof i||Array.isArray(i)?{}:i;const r={};return i.displayMode&&(r.displayMode=i.displayMode.toString()),i.title&&(r.title=i.title.toString()),i.config&&(r.config=i.config),{text:t.slice(e[0].length),metadata:r}}(t),{displayMode:r,title:n,config:o={}}=i;return r&&(o.gantt||(o.gantt={}),o.gantt.displayMode=r),{title:n,config:o,text:e}};function jn(t){const e=(t=>t.replace(/\r\n?/g,"\n").replace(/<(\w+)([^>]*)>/g,((t,e,i)=>"<"+e+i.replace(/="([^"]*)"/g,"='$1'")+">")))(t),i=Mn(e),r=(t=>{const e=ke.detectInit(t)??{},i=ke.detectDirective(t,"wrap");return Array.isArray(i)?e.wrap=i.some((({type:t})=>{})):"wrap"===(null==i?void 0:i.type)&&(e.wrap=!0),{text:(r=t,r.replace(Yt,"")),directive:e};var r})(i.text),n=_e(i.config,r.directive);return{code:t=r.text.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),title:i.title,config:n}}const En=["foreignobject"],Nn=["dominant-baseline"];function On(t){const e=jn(t);var i;return Ie(),i=e.config??{},Ht(i),!i.fontFamily||i.themeVariables&&i.themeVariables.fontFamily||(i.themeVariables={fontFamily:i.fontFamily}),Le.push(i),Me(Be,Le),e}const In=(t,e,i=[])=>`\n.${t} ${e} { ${i.join(" !important; ")} !important; }`,Dn=(t,e,i,r)=>{const n=((t,e={})=>{var i;let r="";if(void 0!==t.themeCSS&&(r+=`\n${t.themeCSS}`),void 0!==t.fontFamily&&(r+=`\n:root { --mermaid-font-family: ${t.fontFamily}}`),void 0!==t.altFontFamily&&(r+=`\n:root { --mermaid-alt-font-family: ${t.altFontFamily}}`),!(0,ot.A)(e)){const n=t.htmlLabels||(null==(i=t.flowchart)?void 0:i.htmlLabels)?["> *","span"]:["rect","polygon","ellipse","circle","path"];for(const t in e){const i=e[t];(0,ot.A)(i.styles)||n.forEach((t=>{r+=In(i.id,t,i.styles)})),(0,ot.A)(i.textStyles)||(r+=In(i.id,"tspan",i.textStyles))}}return r})(t,i);return M(tt(`${r}{${Ci(e,n,t.themeVariables)}}`),j)},qn=(t,e,i,r,n)=>{const o=t.append("div");o.attr("id",i),r&&o.attr("style",r);const a=o.append("svg").attr("id",e).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg");return n&&a.attr("xmlns:xlink",n),a.append("g"),t};function zn(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}const $n=(t,e={})=>{const{code:i}=jn(t);return sr(i,e)};const Pn=Object.freeze({render:async function(t,e,i){var r,n,o,l,c,h;or();const u=On(e);e=u.code;const d=Ne();st.debug(d),e.length>((null==d?void 0:d.maxTextSize)??5e4)&&(e="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa");const f="#"+t,p="i"+t,g="#"+p,m="d"+t,y="#"+m;let x=(0,a.Ltv)("body");const b="sandbox"===d.securityLevel,C="loose"===d.securityLevel,v=d.fontFamily;if(void 0!==i){if(i&&(i.innerHTML=""),b){const t=zn((0,a.Ltv)(i),p);x=(0,a.Ltv)(t.nodes()[0].contentDocument.body),x.node().style.margin=0}else x=(0,a.Ltv)(i);qn(x,t,m,`font-family: ${v}`,"http://www.w3.org/1999/xlink")}else{if(((t,e,i,r)=>{var n,o,a;null==(n=t.getElementById(e))||n.remove(),null==(o=t.getElementById(i))||o.remove(),null==(a=t.getElementById(r))||a.remove()})(document,t,m,p),b){const t=zn((0,a.Ltv)("body"),p);x=(0,a.Ltv)(t.nodes()[0].contentDocument.body),x.node().style.margin=0}else x=(0,a.Ltv)("body");qn(x,t,m)}let _,k;try{_=await $n(e,{title:u.title})}catch(N){_=new ar("error"),k=N}const T=x.select(y).node(),A=_.type,w=T.firstChild,S=w.firstChild,B=null==(n=(r=_.renderer).getClasses)?void 0:n.call(r,e,_),L=Dn(d,A,B,f),F=document.createElement("style");F.innerHTML=L,w.insertBefore(F,S);try{await _.renderer.draw(e,t,Ae,_)}catch(O){throw Yi.draw(e,t,Ae),O}!function(t,e,i,r){(function(t,e){t.attr("role","graphics-document document"),""!==e&&t.attr("aria-roledescription",e)})(e,t),function(t,e,i,r){if(void 0!==t.insert){if(i){const e=`chart-desc-${r}`;t.attr("aria-describedby",e),t.insert("desc",":first-child").attr("id",e).text(i)}if(e){const i=`chart-title-${r}`;t.attr("aria-labelledby",i),t.insert("title",":first-child").attr("id",i).text(e)}}}(e,i,r,e.attr("id"))}(A,x.select(`${y} svg`),null==(l=(o=_.db).getAccTitle)?void 0:l.call(o),null==(h=(c=_.db).getAccDescription)?void 0:h.call(c)),x.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns","http://www.w3.org/1999/xhtml");let M=x.select(y).node().innerHTML;if(st.debug("config.arrowMarkerAbsolute",d.arrowMarkerAbsolute),M=((t="",e,i)=>{let r=t;return i||e||(r=r.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),r=Te(r),r=r.replace(/
    /g,"
    "),r})(M,b,yt(d.arrowMarkerAbsolute)),b){M=((t="",e)=>{var i,r;return``})(M,x.select(y+" svg").node())}else C||(M=s.sanitize(M,{ADD_TAGS:En,ADD_ATTR:Nn}));if(lr.forEach((t=>{t()})),lr=[],k)throw k;const j=b?g:y,E=(0,a.Ltv)(j).node();return E&&"remove"in E&&E.remove(),{svg:M,bindFunctions:_.db.bindFunctions}},parse:async function(t,e){or(),t=On(t).code;try{await $n(t)}catch(i){if(null==e?void 0:e.suppressErrors)return!1;throw i}return!0},getDiagramFromText:$n,initialize:function(t={}){var e;(null==t?void 0:t.fontFamily)&&!(null==(e=t.themeVariables)?void 0:e.fontFamily)&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),Se=te({},t),(null==t?void 0:t.theme)&&t.theme in Dt?t.themeVariables=Dt[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=Dt.default.getThemeVariables(t.themeVariables));const i="object"==typeof t?(t=>(Be=te({},we),Be=te(Be,t),t.theme&&Dt[t.theme]&&(Be.themeVariables=Dt[t.theme].getThemeVariables(t.themeVariables)),Me(Be,Le),Be))(t):je();lt(i.logLevel),or()},getConfig:Ne,setConfig:Ee,getSiteConfig:je,updateSiteConfig:t=>(Be=te(Be,t),Me(Be,Le),Be),reset:()=>{Ie()},globalReset:()=>{Ie(we)},defaultConfig:we});lt(Ne().logLevel),Ie(Ne());const Rn=(t,e,i)=>{st.warn(t),Ce(t)?(i&&i(t.str,t.hash),e.push({...t,message:t.str,error:t})):(i&&i(t),t instanceof Error&&e.push({str:t.message,message:t.message,hash:t.name,error:t}))},Hn=async function(t={querySelector:".mermaid"}){try{await Wn(t)}catch(e){if(Ce(e)&&st.error(e.str),Jn.parseError&&Jn.parseError(e),!t.suppressErrors)throw st.error("Use the suppressErrors option to suppress these errors"),e}},Wn=async function({postRenderCallback:t,querySelector:e,nodes:i}={querySelector:".mermaid"}){const n=Pn.getConfig();let o;if(st.debug((t?"":"No ")+"Callback function found"),i)o=i;else{if(!e)throw new Error("Nodes and querySelector are both undefined");o=document.querySelectorAll(e)}st.debug(`Found ${o.length} diagrams`),void 0!==(null==n?void 0:n.startOnLoad)&&(st.debug("Start On Load: "+(null==n?void 0:n.startOnLoad)),Pn.updateSiteConfig({startOnLoad:null==n?void 0:n.startOnLoad}));const a=new ke.InitIDGenerator(n.deterministicIds,n.deterministicIDSeed);let s;const l=[];for(const h of Array.from(o)){if(st.info("Rendering diagram: "+h.id),h.getAttribute("data-processed"))continue;h.setAttribute("data-processed","true");const e=`mermaid-${a.next()}`;s=h.innerHTML,s=(0,r.T)(ke.entityDecode(s)).trim().replace(//gi,"
    ");const i=ke.detectInit(s);i&&st.debug("Detected early reinit: ",i);try{const{svg:i,bindFunctions:r}=await Zn(e,s,h);h.innerHTML=i,t&&await t(e),r&&r(h)}catch(c){Rn(c,l,Jn.parseError)}}if(l.length>0)throw l[0]},Un=function(t){Pn.initialize(t)},Yn=function(){if(Jn.startOnLoad){const{startOnLoad:t}=Pn.getConfig();t&&Jn.run().catch((t=>st.error("Mermaid failed to initialize",t)))}};"undefined"!=typeof document&&window.addEventListener("load",Yn,!1);const Vn=[];let Gn=!1;const Xn=async()=>{if(!Gn){for(Gn=!0;Vn.length>0;){const e=Vn.shift();if(e)try{await e()}catch(t){st.error("Error executing queue",t)}}Gn=!1}},Zn=(t,e,i)=>new Promise(((r,n)=>{Vn.push((()=>new Promise(((o,a)=>{Pn.render(t,e,i).then((t=>{o(t),r(t)}),(t=>{var e;st.error("Error parsing",t),null==(e=Jn.parseError)||e.call(Jn,t),a(t),n(t)}))})))),Xn().catch(n)})),Jn={startOnLoad:!0,mermaidAPI:Pn,parse:async(t,e)=>new Promise(((i,r)=>{Vn.push((()=>new Promise(((n,o)=>{Pn.parse(t,e).then((t=>{n(t),i(t)}),(t=>{var e;st.error("Error parsing",t),null==(e=Jn.parseError)||e.call(Jn,t),o(t),r(t)}))})))),Xn().catch(r)})),render:Zn,init:async function(t,e,i){st.warn("mermaid.init is deprecated. Please use run instead."),t&&Un(t);const r={postRenderCallback:i,querySelector:".mermaid"};"string"==typeof e?r.querySelector=e:e&&(e instanceof HTMLElement?r.nodes=[e]:r.nodes=e),await Hn(r)},run:Hn,registerExternalDiagrams:async(t,{lazyLoad:e=!0}={})=>{Jt(...t),!1===e&&await(async()=>{st.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(Xt).map((async([t,{detector:e,loader:i}])=>{if(i)try{Ri(t)}catch(r){try{const{diagram:t,id:r}=await i();Pi(r,t,e)}catch(n){throw st.error(`Failed to load external diagram with key ${t}. Removing from detectors.`),delete Xt[t],n}}})))).filter((t=>"rejected"===t.status));if(t.length>0){st.error(`Failed to load ${t.length} external diagrams`);for(const e of t)st.error(e);throw new Error(`Failed to load ${t.length} external diagrams`)}})()},initialize:Un,parseError:void 0,contentLoaded:Yn,setParseErrorHandler:function(t){Jn.parseError=t},detectType:Zt}}}]); \ No newline at end of file diff --git a/assets/js/196e07e8.44ef2764.js b/assets/js/196e07e8.44ef2764.js deleted file mode 100644 index 8a00efd68fa7..000000000000 --- a/assets/js/196e07e8.44ef2764.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3602],{97176:(e,n,a)=>{a.r(n),a.d(n,{assets:()=>d,contentTitle:()=>i,default:()=>h,frontMatter:()=>s,metadata:()=>l,toc:()=>o});var t=a(74848),r=a(28453);const s={id:"interlay-dashboards",title:"Interlay Dashboards",sidebar_label:"Interlay",description:"Interlay is a decentralized finance hub on Polkadot. It started as a native Bitcoin bridge,",keywords:["polkadot","dashboard","dune","interlay","DeFi"],slug:"../interlay-dashboards"},i="Interlay Dashboards",l={id:"general/dune-analytics/parachain-dashboards/interlay-dashboards",title:"Interlay Dashboards",description:"Interlay is a decentralized finance hub on Polkadot. It started as a native Bitcoin bridge,",source:"@site/../docs/general/dune-analytics/parachain-dashboards/interlay-dashboards.md",sourceDirName:"general/dune-analytics/parachain-dashboards",slug:"/general/dune-analytics/interlay-dashboards",permalink:"/docs/general/dune-analytics/interlay-dashboards",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/parachain-dashboards/interlay-dashboards.md",tags:[],version:"current",lastUpdatedBy:"MK",lastUpdatedAt:1719215716e3,frontMatter:{id:"interlay-dashboards",title:"Interlay Dashboards",sidebar_label:"Interlay",description:"Interlay is a decentralized finance hub on Polkadot. It started as a native Bitcoin bridge,",keywords:["polkadot","dashboard","dune","interlay","DeFi"],slug:"../interlay-dashboards"},sidebar:"docs",previous:{title:"Hydration",permalink:"/docs/general/dune-analytics/hydration-dashboards"},next:{title:"InvArch",permalink:"/docs/general/dune-analytics/invarch-dashboards"}},d={},o=[{value:"Overview",id:"overview",level:2},{value:"Featured Dashboards on Dune",id:"featured-dashboards-on-dune",level:2},{value:"Key Tables",id:"key-tables",level:2},{value:"Useful Queries",id:"useful-queries",level:2},{value:"Getting Started with Queries",id:"getting-started-with-queries",level:2}];function c(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,r.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.header,{children:(0,t.jsx)(n.h1,{id:"interlay-dashboards",children:"Interlay Dashboards"})}),"\n",(0,t.jsx)(n.h2,{id:"overview",children:"Overview"}),"\n",(0,t.jsx)(n.p,{children:"Interlay is a decentralized finance hub on Polkadot. It started as a native Bitcoin bridge, allowing\nusers to mint and redeem iBTC on the Polkadot network. iBTC is a trustless, decentralized, and\ninteroperable token redeemable one-for-one with native Bitcoin."}),"\n",(0,t.jsx)(n.p,{children:"In the summer of 2023, Interlay also launched a DEX and a lending protocol. While the DEX has seen\nliquidity disappear after rewards were stopped, the lending protocol has seen continued usage."}),"\n",(0,t.jsx)(n.p,{children:"Vaults play a crucial role for iBTC, as they guarantee the value of the minted iBTC through vault\ncollateral. Currently, vault collateral can be DOT, VDOT, USDC, USDT, and lend tokens (qDOT, qUSDT,\netc.) from the lending protocol. When using lend tokens, vault operators are double dipping: earning\ninterest on the currency lent, and earning vault rewards."}),"\n",(0,t.jsx)(n.p,{children:"New currencies can be added to the Interlay protocol via governance proposals. The governance token,\nINTR, is used to vote on these proposals. Only staked INTR can vote, and the staked INTR is locked\nfor a period of time."}),"\n",(0,t.jsx)(n.h2,{id:"featured-dashboards-on-dune",children:"Featured Dashboards on Dune"}),"\n",(0,t.jsx)(n.p,{children:"Here you will find a variety of dashboards that help visualize data from the Interlay parachain:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"https://dune.com/substrate/polkadot-interlay",children:"interlay on Polkadot"}),": This dashboard provides a\ncomprehensive view of iBTC minting, redeeming, lending, borrowing, and vault rewards."]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"key-tables",children:"Key Tables"}),"\n",(0,t.jsx)(n.p,{children:"Data from the interlay parachain is organized into several key tables:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"interlay.balances"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"interlay.blocks"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"interlay.calls"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"interlay.events"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"interlay.extrinsics"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"interlay.transfers"})}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"interlay.traces"})," table is created by a snapshot script utilizing Interlay API calls to fetch\naccurate values which would be difficult to calculate from the blockchain events alone."]}),"\n",(0,t.jsxs)(n.p,{children:["Start building your own queries using granular data on Dune\n",(0,t.jsx)(n.a,{href:"https://dune.com/queries?category=canonical&namespace=interlay",children:"here"}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"useful-queries",children:"Useful Queries"}),"\n",(0,t.jsx)(n.p,{children:"Some useful queries for Interlay are made available as materialized views."}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Subject Area"}),(0,t.jsx)(n.th,{children:"Query"}),(0,t.jsx)(n.th,{children:"Materialized View"}),(0,t.jsx)(n.th,{children:"Description"})]})}),(0,t.jsxs)(n.tbody,{children:[(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:"Vault Collateral"}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.a,{href:"https://dune.com/queries/3437565",children:"query_3437565"})}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"dune.substrate.result_interlay_vault_creation"})}),(0,t.jsx)(n.td,{children:"Provides vaults and their collateral."})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:"Interlay Oracle"}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.a,{href:"https://dune.com/queries/3445402",children:"query_3445402"})}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"dune.substrate.result_interlay_oracle"})}),(0,t.jsx)(n.td,{children:"Provides hourly oracle values for all currencies present on the parachain."})]})]})]}),"\n",(0,t.jsx)(n.p,{children:"Dune users are encouraged to study the source code of the queries, including parts of a query that\nmay have been commented out for future use."}),"\n",(0,t.jsx)(n.p,{children:"Uncommenting these parts may accelerate your effort of adopting a query to a slightly different use\ncase."}),"\n",(0,t.jsx)(n.h2,{id:"getting-started-with-queries",children:"Getting Started with Queries"}),"\n",(0,t.jsx)(n.p,{children:"To get started with querying data from Interlay, you are welcome to use the mentioned materialized\nqueries. You can also use the following DuneSQL queries as examples:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-sql",metastring:'title="Interlay Loan Market Data" showLineNumbers',children:"WITH ASSETS AS (\n SELECT symbol, decimals\n FROM (VALUES\n ('DOT', 10),\n ('INTR', 10),\n ('IBTC', 8)\n ) AS t(symbol, decimals)\n), LOANDATA AS (\n SELECT\n E.block_time,\n E.method,\n event_id,\n COALESCE(CAST(JSON_VALUE(data, 'strict $[0].token') AS VARCHAR), FA.symbol) AS token,\n -- json_array_length(data) as len,\n -- COALESCE(ASSETS.decimals, FA.decimals) as token_decimals,\n CAST(JSON_VALUE(data, 'strict $[1]') AS UINT256) / POW(10, COALESCE(ASSETS.decimals, FA.decimals)) AS total_borrows,\n CAST(JSON_VALUE(data, 'strict $[2]') AS UINT256) / POW(10, COALESCE(ASSETS.decimals, FA.decimals)) AS total_reserves,\n CAST(JSON_VALUE(data, 'strict $[3]') AS UINT256) / 1e18 AS borrow_index,\n CAST(JSON_VALUE(data, 'strict $[4]') AS UINT256) / 1e6 AS utilization,\n CAST(JSON_VALUE(data, 'strict $[5]') AS UINT256) / 1e18 AS borrow_rate,\n CAST(JSON_VALUE(data, 'strict $[6]') AS UINT256) / 1e18 AS supply_rate,\n CAST(JSON_VALUE(data, 'strict $[7]') AS UINT256) / 1e18 AS exchange_rate\n FROM interlay.events E\n LEFT JOIN query_3564454 FA ON FA.foreign_asset = CAST(JSON_VALUE(data, 'strict $[0].foreignAsset') AS INT)\n LEFT JOIN ASSETS ON ASSETS.symbol = JSON_VALUE(data, 'strict $[0].token')\n WHERE E.section = 'loans' AND E.method = 'InterestAccrued'\n)\nSELECT\n date_trunc('hour', block_time) AS hour_period,\n token,\n AVG(total_borrows) AS total_borrows,\n AVG(total_reserves) AS total_reserves,\n AVG(borrow_index) AS borrow_index,\n AVG(utilization) AS utilization,\n AVG(borrow_rate) AS borrow_rate,\n AVG(supply_rate) AS supply_rate,\n AVG(exchange_rate) AS exchange_rate\nFROM LOANDATA\nGROUP BY 1, 2\nORDER BY 1 DESC;\n\n\n"})}),"\n",(0,t.jsxs)(n.p,{children:["The query is fairly typical for a parachain query on Dune. It parses events from the\n",(0,t.jsx)(n.code,{children:"interlay.events"})," table, and calculates the average values for each hour."]}),"\n",(0,t.jsxs)(n.p,{children:["It also joins the ",(0,t.jsx)(n.code,{children:"interlay.events"})," table with another query, ",(0,t.jsx)(n.code,{children:"query_3564454"}),", which provides the\nforeign assets used in the loan market."]}),"\n",(0,t.jsxs)(n.p,{children:["Finally, it uses the ",(0,t.jsx)(n.code,{children:"ASSETS"})," CTE to provide the decimals for each native token in the loan market.\nThe native assets are not available on chain, so they are hardcoded in the ",(0,t.jsx)(n.code,{children:"ASSETS"})," CTE. However,\nthey are unlikely to change over time, so this is safe."]}),"\n",(0,t.jsx)(n.p,{children:"The query uses Dune's native UINT256 type extensively, which allows to deal with very large numbers\nand still maintain precision."}),"\n",(0,t.jsx)(n.p,{children:"Query result:"}),"\n",(0,t.jsx)("iframe",{src:"https://dune.com/embeds/3574287/6017896/",height:"350",width:"100%"}),"\n",(0,t.jsx)(n.admonition,{title:"DuneSQL Reference",type:"info",children:(0,t.jsxs)(n.p,{children:["For more information on DuneSQL, please refer to the ",(0,t.jsx)(n.a,{href:"/docs/general/dunesql-cheatsheet",children:"DuneSQL Cheatsheet"}),"\nand\n",(0,t.jsx)(n.a,{href:"https://docs.dune.com/query-engine/Functions-and-operators/index",children:"DuneSQL Official Documentation"}),"."]})})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(c,{...e})}):c(e)}},28453:(e,n,a)=>{a.d(n,{R:()=>i,x:()=>l});var t=a(96540);const r={},s=t.createContext(r);function i(e){const n=t.useContext(s);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),t.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/196e07e8.a8546889.js b/assets/js/196e07e8.a8546889.js new file mode 100644 index 000000000000..d30f27634d59 --- /dev/null +++ b/assets/js/196e07e8.a8546889.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3602],{77858:(e,n,a)=>{a.r(n),a.d(n,{assets:()=>d,contentTitle:()=>l,default:()=>h,frontMatter:()=>i,metadata:()=>t,toc:()=>o});const t=JSON.parse('{"id":"general/dune-analytics/parachain-dashboards/interlay-dashboards","title":"Interlay Dashboards","description":"Interlay is a decentralized finance hub on Polkadot. It started as a native Bitcoin bridge,","source":"@site/../docs/general/dune-analytics/parachain-dashboards/interlay-dashboards.md","sourceDirName":"general/dune-analytics/parachain-dashboards","slug":"/general/dune-analytics/interlay-dashboards","permalink":"/docs/general/dune-analytics/interlay-dashboards","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/parachain-dashboards/interlay-dashboards.md","tags":[],"version":"current","lastUpdatedBy":"MK","lastUpdatedAt":1719215716000,"frontMatter":{"id":"interlay-dashboards","title":"Interlay Dashboards","sidebar_label":"Interlay","description":"Interlay is a decentralized finance hub on Polkadot. It started as a native Bitcoin bridge,","keywords":["polkadot","dashboard","dune","interlay","DeFi"],"slug":"../interlay-dashboards"},"sidebar":"docs","previous":{"title":"Hydration","permalink":"/docs/general/dune-analytics/hydration-dashboards"},"next":{"title":"InvArch","permalink":"/docs/general/dune-analytics/invarch-dashboards"}}');var r=a(74848),s=a(28453);const i={id:"interlay-dashboards",title:"Interlay Dashboards",sidebar_label:"Interlay",description:"Interlay is a decentralized finance hub on Polkadot. It started as a native Bitcoin bridge,",keywords:["polkadot","dashboard","dune","interlay","DeFi"],slug:"../interlay-dashboards"},l="Interlay Dashboards",d={},o=[{value:"Overview",id:"overview",level:2},{value:"Featured Dashboards on Dune",id:"featured-dashboards-on-dune",level:2},{value:"Key Tables",id:"key-tables",level:2},{value:"Useful Queries",id:"useful-queries",level:2},{value:"Getting Started with Queries",id:"getting-started-with-queries",level:2}];function c(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,s.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.header,{children:(0,r.jsx)(n.h1,{id:"interlay-dashboards",children:"Interlay Dashboards"})}),"\n",(0,r.jsx)(n.h2,{id:"overview",children:"Overview"}),"\n",(0,r.jsx)(n.p,{children:"Interlay is a decentralized finance hub on Polkadot. It started as a native Bitcoin bridge, allowing\nusers to mint and redeem iBTC on the Polkadot network. iBTC is a trustless, decentralized, and\ninteroperable token redeemable one-for-one with native Bitcoin."}),"\n",(0,r.jsx)(n.p,{children:"In the summer of 2023, Interlay also launched a DEX and a lending protocol. While the DEX has seen\nliquidity disappear after rewards were stopped, the lending protocol has seen continued usage."}),"\n",(0,r.jsx)(n.p,{children:"Vaults play a crucial role for iBTC, as they guarantee the value of the minted iBTC through vault\ncollateral. Currently, vault collateral can be DOT, VDOT, USDC, USDT, and lend tokens (qDOT, qUSDT,\netc.) from the lending protocol. When using lend tokens, vault operators are double dipping: earning\ninterest on the currency lent, and earning vault rewards."}),"\n",(0,r.jsx)(n.p,{children:"New currencies can be added to the Interlay protocol via governance proposals. The governance token,\nINTR, is used to vote on these proposals. Only staked INTR can vote, and the staked INTR is locked\nfor a period of time."}),"\n",(0,r.jsx)(n.h2,{id:"featured-dashboards-on-dune",children:"Featured Dashboards on Dune"}),"\n",(0,r.jsx)(n.p,{children:"Here you will find a variety of dashboards that help visualize data from the Interlay parachain:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"https://dune.com/substrate/polkadot-interlay",children:"interlay on Polkadot"}),": This dashboard provides a\ncomprehensive view of iBTC minting, redeeming, lending, borrowing, and vault rewards."]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"key-tables",children:"Key Tables"}),"\n",(0,r.jsx)(n.p,{children:"Data from the interlay parachain is organized into several key tables:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"interlay.balances"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"interlay.blocks"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"interlay.calls"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"interlay.events"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"interlay.extrinsics"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"interlay.transfers"})}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.code,{children:"interlay.traces"})," table is created by a snapshot script utilizing Interlay API calls to fetch\naccurate values which would be difficult to calculate from the blockchain events alone."]}),"\n",(0,r.jsxs)(n.p,{children:["Start building your own queries using granular data on Dune\n",(0,r.jsx)(n.a,{href:"https://dune.com/queries?category=canonical&namespace=interlay",children:"here"}),"."]}),"\n",(0,r.jsx)(n.h2,{id:"useful-queries",children:"Useful Queries"}),"\n",(0,r.jsx)(n.p,{children:"Some useful queries for Interlay are made available as materialized views."}),"\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Subject Area"}),(0,r.jsx)(n.th,{children:"Query"}),(0,r.jsx)(n.th,{children:"Materialized View"}),(0,r.jsx)(n.th,{children:"Description"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Vault Collateral"}),(0,r.jsx)(n.td,{children:(0,r.jsx)(n.a,{href:"https://dune.com/queries/3437565",children:"query_3437565"})}),(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"dune.substrate.result_interlay_vault_creation"})}),(0,r.jsx)(n.td,{children:"Provides vaults and their collateral."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Interlay Oracle"}),(0,r.jsx)(n.td,{children:(0,r.jsx)(n.a,{href:"https://dune.com/queries/3445402",children:"query_3445402"})}),(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"dune.substrate.result_interlay_oracle"})}),(0,r.jsx)(n.td,{children:"Provides hourly oracle values for all currencies present on the parachain."})]})]})]}),"\n",(0,r.jsx)(n.p,{children:"Dune users are encouraged to study the source code of the queries, including parts of a query that\nmay have been commented out for future use."}),"\n",(0,r.jsx)(n.p,{children:"Uncommenting these parts may accelerate your effort of adopting a query to a slightly different use\ncase."}),"\n",(0,r.jsx)(n.h2,{id:"getting-started-with-queries",children:"Getting Started with Queries"}),"\n",(0,r.jsx)(n.p,{children:"To get started with querying data from Interlay, you are welcome to use the mentioned materialized\nqueries. You can also use the following DuneSQL queries as examples:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-sql",metastring:'title="Interlay Loan Market Data" showLineNumbers',children:"WITH ASSETS AS (\n SELECT symbol, decimals\n FROM (VALUES\n ('DOT', 10),\n ('INTR', 10),\n ('IBTC', 8)\n ) AS t(symbol, decimals)\n), LOANDATA AS (\n SELECT\n E.block_time,\n E.method,\n event_id,\n COALESCE(CAST(JSON_VALUE(data, 'strict $[0].token') AS VARCHAR), FA.symbol) AS token,\n -- json_array_length(data) as len,\n -- COALESCE(ASSETS.decimals, FA.decimals) as token_decimals,\n CAST(JSON_VALUE(data, 'strict $[1]') AS UINT256) / POW(10, COALESCE(ASSETS.decimals, FA.decimals)) AS total_borrows,\n CAST(JSON_VALUE(data, 'strict $[2]') AS UINT256) / POW(10, COALESCE(ASSETS.decimals, FA.decimals)) AS total_reserves,\n CAST(JSON_VALUE(data, 'strict $[3]') AS UINT256) / 1e18 AS borrow_index,\n CAST(JSON_VALUE(data, 'strict $[4]') AS UINT256) / 1e6 AS utilization,\n CAST(JSON_VALUE(data, 'strict $[5]') AS UINT256) / 1e18 AS borrow_rate,\n CAST(JSON_VALUE(data, 'strict $[6]') AS UINT256) / 1e18 AS supply_rate,\n CAST(JSON_VALUE(data, 'strict $[7]') AS UINT256) / 1e18 AS exchange_rate\n FROM interlay.events E\n LEFT JOIN query_3564454 FA ON FA.foreign_asset = CAST(JSON_VALUE(data, 'strict $[0].foreignAsset') AS INT)\n LEFT JOIN ASSETS ON ASSETS.symbol = JSON_VALUE(data, 'strict $[0].token')\n WHERE E.section = 'loans' AND E.method = 'InterestAccrued'\n)\nSELECT\n date_trunc('hour', block_time) AS hour_period,\n token,\n AVG(total_borrows) AS total_borrows,\n AVG(total_reserves) AS total_reserves,\n AVG(borrow_index) AS borrow_index,\n AVG(utilization) AS utilization,\n AVG(borrow_rate) AS borrow_rate,\n AVG(supply_rate) AS supply_rate,\n AVG(exchange_rate) AS exchange_rate\nFROM LOANDATA\nGROUP BY 1, 2\nORDER BY 1 DESC;\n\n\n"})}),"\n",(0,r.jsxs)(n.p,{children:["The query is fairly typical for a parachain query on Dune. It parses events from the\n",(0,r.jsx)(n.code,{children:"interlay.events"})," table, and calculates the average values for each hour."]}),"\n",(0,r.jsxs)(n.p,{children:["It also joins the ",(0,r.jsx)(n.code,{children:"interlay.events"})," table with another query, ",(0,r.jsx)(n.code,{children:"query_3564454"}),", which provides the\nforeign assets used in the loan market."]}),"\n",(0,r.jsxs)(n.p,{children:["Finally, it uses the ",(0,r.jsx)(n.code,{children:"ASSETS"})," CTE to provide the decimals for each native token in the loan market.\nThe native assets are not available on chain, so they are hardcoded in the ",(0,r.jsx)(n.code,{children:"ASSETS"})," CTE. However,\nthey are unlikely to change over time, so this is safe."]}),"\n",(0,r.jsx)(n.p,{children:"The query uses Dune's native UINT256 type extensively, which allows to deal with very large numbers\nand still maintain precision."}),"\n",(0,r.jsx)(n.p,{children:"Query result:"}),"\n",(0,r.jsx)("iframe",{src:"https://dune.com/embeds/3574287/6017896/",height:"350",width:"100%"}),"\n",(0,r.jsx)(n.admonition,{title:"DuneSQL Reference",type:"info",children:(0,r.jsxs)(n.p,{children:["For more information on DuneSQL, please refer to the ",(0,r.jsx)(n.a,{href:"/docs/general/dunesql-cheatsheet",children:"DuneSQL Cheatsheet"}),"\nand\n",(0,r.jsx)(n.a,{href:"https://docs.dune.com/query-engine/Functions-and-operators/index",children:"DuneSQL Official Documentation"}),"."]})})]})}function h(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(c,{...e})}):c(e)}},28453:(e,n,a)=>{a.d(n,{R:()=>i,x:()=>l});var t=a(96540);const r={},s=t.createContext(r);function i(e){const n=t.useContext(s);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),t.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/1987.0fd0465b.js b/assets/js/1987.0fd0465b.js deleted file mode 100644 index 23b0596b0b09..000000000000 --- a/assets/js/1987.0fd0465b.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1987],{21987:(t,e,s)=>{s.d(e,{d:()=>D,p:()=>r,s:()=>_});var n=s(26312),i=s(86079),u=function(){var t=function(t,e,s,n){for(s=s||{},n=t.length;n--;s[t[n]]=e);return s},e=[1,17],s=[1,18],n=[1,19],i=[1,39],u=[1,40],r=[1,25],a=[1,23],c=[1,24],o=[1,31],l=[1,32],h=[1,33],A=[1,34],p=[1,35],d=[1,36],y=[1,26],E=[1,27],C=[1,28],m=[1,29],f=[1,43],b=[1,30],F=[1,42],g=[1,44],k=[1,41],T=[1,45],B=[1,9],D=[1,8,9],_=[1,56],S=[1,57],N=[1,58],L=[1,59],$=[1,60],v=[1,61],O=[1,62],x=[1,8,9,39],I=[1,74],R=[1,8,9,12,13,21,37,39,42,59,60,61,62,63,64,65,70,72],w=[1,8,9,12,13,19,21,37,39,42,46,59,60,61,62,63,64,65,70,72,74,80,95,97,98],P=[13,74,80,95,97,98],M=[13,64,65,74,80,95,97,98],G=[13,59,60,61,62,63,74,80,95,97,98],U=[1,93],z=[1,110],K=[1,108],Y=[1,102],j=[1,103],Q=[1,104],X=[1,105],W=[1,106],q=[1,107],H=[1,109],J=[1,8,9,37,39,42],V=[1,8,9,21],Z=[1,8,9,78],tt=[1,8,9,21,73,74,78,80,81,82,83,84,85],et={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,className:17,classLiteralName:18,GENERICTYPE:19,relationStatement:20,LABEL:21,namespaceStatement:22,classStatement:23,memberStatement:24,annotationStatement:25,clickStatement:26,styleStatement:27,cssClassStatement:28,noteStatement:29,direction:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,namespaceIdentifier:36,STRUCT_START:37,classStatements:38,STRUCT_STOP:39,NAMESPACE:40,classIdentifier:41,STYLE_SEPARATOR:42,members:43,CLASS:44,ANNOTATION_START:45,ANNOTATION_END:46,MEMBER:47,SEPARATOR:48,relation:49,NOTE_FOR:50,noteText:51,NOTE:52,direction_tb:53,direction_bt:54,direction_rl:55,direction_lr:56,relationType:57,lineType:58,AGGREGATION:59,EXTENSION:60,COMPOSITION:61,DEPENDENCY:62,LOLLIPOP:63,LINE:64,DOTTED_LINE:65,CALLBACK:66,LINK:67,LINK_TARGET:68,CLICK:69,CALLBACK_NAME:70,CALLBACK_ARGS:71,HREF:72,STYLE:73,ALPHA:74,stylesOpt:75,CSSCLASS:76,style:77,COMMA:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,commentToken:86,textToken:87,graphCodeTokens:88,textNoTagsToken:89,TAGSTART:90,TAGEND:91,"==":92,"--":93,DEFAULT:94,MINUS:95,keywords:96,UNICODE_TEXT:97,BQUOTE_STR:98,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",19:"GENERICTYPE",21:"LABEL",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",37:"STRUCT_START",39:"STRUCT_STOP",40:"NAMESPACE",42:"STYLE_SEPARATOR",44:"CLASS",45:"ANNOTATION_START",46:"ANNOTATION_END",47:"MEMBER",48:"SEPARATOR",50:"NOTE_FOR",52:"NOTE",53:"direction_tb",54:"direction_bt",55:"direction_rl",56:"direction_lr",59:"AGGREGATION",60:"EXTENSION",61:"COMPOSITION",62:"DEPENDENCY",63:"LOLLIPOP",64:"LINE",65:"DOTTED_LINE",66:"CALLBACK",67:"LINK",68:"LINK_TARGET",69:"CLICK",70:"CALLBACK_NAME",71:"CALLBACK_ARGS",72:"HREF",73:"STYLE",74:"ALPHA",76:"CSSCLASS",78:"COMMA",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",88:"graphCodeTokens",90:"TAGSTART",91:"TAGEND",92:"==",93:"--",94:"DEFAULT",95:"MINUS",96:"keywords",97:"UNICODE_TEXT",98:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,2],[17,1],[17,1],[17,2],[17,2],[17,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[22,4],[22,5],[36,2],[38,1],[38,2],[38,3],[23,1],[23,3],[23,4],[23,6],[41,2],[41,3],[25,4],[43,1],[43,2],[24,1],[24,2],[24,1],[24,1],[20,3],[20,4],[20,4],[20,5],[29,3],[29,2],[30,1],[30,1],[30,1],[30,1],[49,3],[49,2],[49,2],[49,1],[57,1],[57,1],[57,1],[57,1],[57,1],[58,1],[58,1],[26,3],[26,4],[26,3],[26,4],[26,4],[26,5],[26,3],[26,4],[26,4],[26,5],[26,4],[26,5],[26,5],[26,6],[27,3],[28,3],[75,1],[75,3],[77,1],[77,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[86,1],[86,1],[87,1],[87,1],[87,1],[87,1],[87,1],[87,1],[87,1],[89,1],[89,1],[89,1],[89,1],[16,1],[16,1],[16,1],[16,1],[18,1],[51,1]],performAction:function(t,e,s,n,i,u,r){var a=u.length-1;switch(i){case 8:this.$=u[a-1];break;case 9:case 11:case 12:this.$=u[a];break;case 10:case 13:case 89:this.$=u[a-1]+u[a];break;case 14:case 15:this.$=u[a-1]+"~"+u[a]+"~";break;case 16:n.addRelation(u[a]);break;case 17:u[a-1].title=n.cleanupLabel(u[a]),n.addRelation(u[a-1]);break;case 27:this.$=u[a].trim(),n.setAccTitle(this.$);break;case 28:case 29:this.$=u[a].trim(),n.setAccDescription(this.$);break;case 30:n.addClassesToNamespace(u[a-3],u[a-1]);break;case 31:n.addClassesToNamespace(u[a-4],u[a-1]);break;case 32:this.$=u[a],n.addNamespace(u[a]);break;case 33:case 43:case 86:this.$=[u[a]];break;case 34:this.$=[u[a-1]];break;case 35:u[a].unshift(u[a-2]),this.$=u[a];break;case 37:n.setCssClass(u[a-2],u[a]);break;case 38:n.addMembers(u[a-3],u[a-1]);break;case 39:n.setCssClass(u[a-5],u[a-3]),n.addMembers(u[a-5],u[a-1]);break;case 40:this.$=u[a],n.addClass(u[a]);break;case 41:this.$=u[a-1],n.addClass(u[a-1]),n.setClassLabel(u[a-1],u[a]);break;case 42:n.addAnnotation(u[a],u[a-2]);break;case 44:u[a].push(u[a-1]),this.$=u[a];break;case 45:case 47:case 48:break;case 46:n.addMember(u[a-1],n.cleanupLabel(u[a]));break;case 49:this.$={id1:u[a-2],id2:u[a],relation:u[a-1],relationTitle1:"none",relationTitle2:"none"};break;case 50:this.$={id1:u[a-3],id2:u[a],relation:u[a-1],relationTitle1:u[a-2],relationTitle2:"none"};break;case 51:this.$={id1:u[a-3],id2:u[a],relation:u[a-2],relationTitle1:"none",relationTitle2:u[a-1]};break;case 52:this.$={id1:u[a-4],id2:u[a],relation:u[a-2],relationTitle1:u[a-3],relationTitle2:u[a-1]};break;case 53:n.addNote(u[a],u[a-1]);break;case 54:n.addNote(u[a]);break;case 55:n.setDirection("TB");break;case 56:n.setDirection("BT");break;case 57:n.setDirection("RL");break;case 58:n.setDirection("LR");break;case 59:this.$={type1:u[a-2],type2:u[a],lineType:u[a-1]};break;case 60:this.$={type1:"none",type2:u[a],lineType:u[a-1]};break;case 61:this.$={type1:u[a-1],type2:"none",lineType:u[a]};break;case 62:this.$={type1:"none",type2:"none",lineType:u[a]};break;case 63:this.$=n.relationType.AGGREGATION;break;case 64:this.$=n.relationType.EXTENSION;break;case 65:this.$=n.relationType.COMPOSITION;break;case 66:this.$=n.relationType.DEPENDENCY;break;case 67:this.$=n.relationType.LOLLIPOP;break;case 68:this.$=n.lineType.LINE;break;case 69:this.$=n.lineType.DOTTED_LINE;break;case 70:case 76:this.$=u[a-2],n.setClickEvent(u[a-1],u[a]);break;case 71:case 77:this.$=u[a-3],n.setClickEvent(u[a-2],u[a-1]),n.setTooltip(u[a-2],u[a]);break;case 72:this.$=u[a-2],n.setLink(u[a-1],u[a]);break;case 73:this.$=u[a-3],n.setLink(u[a-2],u[a-1],u[a]);break;case 74:this.$=u[a-3],n.setLink(u[a-2],u[a-1]),n.setTooltip(u[a-2],u[a]);break;case 75:this.$=u[a-4],n.setLink(u[a-3],u[a-2],u[a]),n.setTooltip(u[a-3],u[a-1]);break;case 78:this.$=u[a-3],n.setClickEvent(u[a-2],u[a-1],u[a]);break;case 79:this.$=u[a-4],n.setClickEvent(u[a-3],u[a-2],u[a-1]),n.setTooltip(u[a-3],u[a]);break;case 80:this.$=u[a-3],n.setLink(u[a-2],u[a]);break;case 81:this.$=u[a-4],n.setLink(u[a-3],u[a-1],u[a]);break;case 82:this.$=u[a-4],n.setLink(u[a-3],u[a-1]),n.setTooltip(u[a-3],u[a]);break;case 83:this.$=u[a-5],n.setLink(u[a-4],u[a-2],u[a]),n.setTooltip(u[a-4],u[a-1]);break;case 84:this.$=u[a-2],n.setCssStyle(u[a-1],u[a]);break;case 85:n.setCssClass(u[a-1],u[a]);break;case 87:u[a-2].push(u[a]),this.$=u[a-2]}},table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:37,17:20,18:38,20:7,22:8,23:9,24:10,25:11,26:12,27:13,28:14,29:15,30:16,31:e,33:s,35:n,36:21,40:i,41:22,44:u,45:r,47:a,48:c,50:o,52:l,53:h,54:A,55:p,56:d,66:y,67:E,69:C,73:m,74:f,76:b,80:F,95:g,97:k,98:T},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},t(B,[2,5],{8:[1,46]}),{8:[1,47]},t(D,[2,16],{21:[1,48]}),t(D,[2,18]),t(D,[2,19]),t(D,[2,20]),t(D,[2,21]),t(D,[2,22]),t(D,[2,23]),t(D,[2,24]),t(D,[2,25]),t(D,[2,26]),{32:[1,49]},{34:[1,50]},t(D,[2,29]),t(D,[2,45],{49:51,57:54,58:55,13:[1,52],21:[1,53],59:_,60:S,61:N,62:L,63:$,64:v,65:O}),{37:[1,63]},t(x,[2,36],{37:[1,65],42:[1,64]}),t(D,[2,47]),t(D,[2,48]),{16:66,74:f,80:F,95:g,97:k},{16:37,17:67,18:38,74:f,80:F,95:g,97:k,98:T},{16:37,17:68,18:38,74:f,80:F,95:g,97:k,98:T},{16:37,17:69,18:38,74:f,80:F,95:g,97:k,98:T},{74:[1,70]},{13:[1,71]},{16:37,17:72,18:38,74:f,80:F,95:g,97:k,98:T},{13:I,51:73},t(D,[2,55]),t(D,[2,56]),t(D,[2,57]),t(D,[2,58]),t(R,[2,11],{16:37,18:38,17:75,19:[1,76],74:f,80:F,95:g,97:k,98:T}),t(R,[2,12],{19:[1,77]}),{15:78,16:79,74:f,80:F,95:g,97:k},{16:37,17:80,18:38,74:f,80:F,95:g,97:k,98:T},t(w,[2,112]),t(w,[2,113]),t(w,[2,114]),t(w,[2,115]),t([1,8,9,12,13,19,21,37,39,42,59,60,61,62,63,64,65,70,72],[2,116]),t(B,[2,6],{10:5,20:7,22:8,23:9,24:10,25:11,26:12,27:13,28:14,29:15,30:16,17:20,36:21,41:22,16:37,18:38,5:81,31:e,33:s,35:n,40:i,44:u,45:r,47:a,48:c,50:o,52:l,53:h,54:A,55:p,56:d,66:y,67:E,69:C,73:m,74:f,76:b,80:F,95:g,97:k,98:T}),{5:82,10:5,16:37,17:20,18:38,20:7,22:8,23:9,24:10,25:11,26:12,27:13,28:14,29:15,30:16,31:e,33:s,35:n,36:21,40:i,41:22,44:u,45:r,47:a,48:c,50:o,52:l,53:h,54:A,55:p,56:d,66:y,67:E,69:C,73:m,74:f,76:b,80:F,95:g,97:k,98:T},t(D,[2,17]),t(D,[2,27]),t(D,[2,28]),{13:[1,84],16:37,17:83,18:38,74:f,80:F,95:g,97:k,98:T},{49:85,57:54,58:55,59:_,60:S,61:N,62:L,63:$,64:v,65:O},t(D,[2,46]),{58:86,64:v,65:O},t(P,[2,62],{57:87,59:_,60:S,61:N,62:L,63:$}),t(M,[2,63]),t(M,[2,64]),t(M,[2,65]),t(M,[2,66]),t(M,[2,67]),t(G,[2,68]),t(G,[2,69]),{8:[1,89],23:90,38:88,41:22,44:u},{16:91,74:f,80:F,95:g,97:k},{43:92,47:U},{46:[1,94]},{13:[1,95]},{13:[1,96]},{70:[1,97],72:[1,98]},{21:z,73:K,74:Y,75:99,77:100,79:101,80:j,81:Q,82:X,83:W,84:q,85:H},{74:[1,111]},{13:I,51:112},t(D,[2,54]),t(D,[2,117]),t(R,[2,13]),t(R,[2,14]),t(R,[2,15]),{37:[2,32]},{15:113,16:79,37:[2,9],74:f,80:F,95:g,97:k},t(J,[2,40],{11:114,12:[1,115]}),t(B,[2,7]),{9:[1,116]},t(V,[2,49]),{16:37,17:117,18:38,74:f,80:F,95:g,97:k,98:T},{13:[1,119],16:37,17:118,18:38,74:f,80:F,95:g,97:k,98:T},t(P,[2,61],{57:120,59:_,60:S,61:N,62:L,63:$}),t(P,[2,60]),{39:[1,121]},{23:90,38:122,41:22,44:u},{8:[1,123],39:[2,33]},t(x,[2,37],{37:[1,124]}),{39:[1,125]},{39:[2,43],43:126,47:U},{16:37,17:127,18:38,74:f,80:F,95:g,97:k,98:T},t(D,[2,70],{13:[1,128]}),t(D,[2,72],{13:[1,130],68:[1,129]}),t(D,[2,76],{13:[1,131],71:[1,132]}),{13:[1,133]},t(D,[2,84],{78:[1,134]}),t(Z,[2,86],{79:135,21:z,73:K,74:Y,80:j,81:Q,82:X,83:W,84:q,85:H}),t(tt,[2,88]),t(tt,[2,90]),t(tt,[2,91]),t(tt,[2,92]),t(tt,[2,93]),t(tt,[2,94]),t(tt,[2,95]),t(tt,[2,96]),t(tt,[2,97]),t(tt,[2,98]),t(D,[2,85]),t(D,[2,53]),{37:[2,10]},t(J,[2,41]),{13:[1,136]},{1:[2,4]},t(V,[2,51]),t(V,[2,50]),{16:37,17:137,18:38,74:f,80:F,95:g,97:k,98:T},t(P,[2,59]),t(D,[2,30]),{39:[1,138]},{23:90,38:139,39:[2,34],41:22,44:u},{43:140,47:U},t(x,[2,38]),{39:[2,44]},t(D,[2,42]),t(D,[2,71]),t(D,[2,73]),t(D,[2,74],{68:[1,141]}),t(D,[2,77]),t(D,[2,78],{13:[1,142]}),t(D,[2,80],{13:[1,144],68:[1,143]}),{21:z,73:K,74:Y,77:145,79:101,80:j,81:Q,82:X,83:W,84:q,85:H},t(tt,[2,89]),{14:[1,146]},t(V,[2,52]),t(D,[2,31]),{39:[2,35]},{39:[1,147]},t(D,[2,75]),t(D,[2,79]),t(D,[2,81]),t(D,[2,82],{68:[1,148]}),t(Z,[2,87],{79:135,21:z,73:K,74:Y,80:j,81:Q,82:X,83:W,84:q,85:H}),t(J,[2,8]),t(x,[2,39]),t(D,[2,83])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],78:[2,32],113:[2,10],116:[2,4],126:[2,44],139:[2,35]},parseError:function(t,e){if(!e.recoverable){var s=new Error(t);throw s.hash=e,s}this.trace(t)},parse:function(t){var e=this,s=[0],n=[],i=[null],u=[],r=this.table,a="",c=0,o=0,l=u.slice.call(arguments,1),h=Object.create(this.lexer),A={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(A.yy[p]=this.yy[p]);h.setInput(t,A.yy),A.yy.lexer=h,A.yy.parser=this,void 0===h.yylloc&&(h.yylloc={});var d=h.yylloc;u.push(d);var y=h.options&&h.options.ranges;"function"==typeof A.yy.parseError?this.parseError=A.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var E,C,m,f,b,F,g,k,T,B={};;){if(C=s[s.length-1],this.defaultActions[C]?m=this.defaultActions[C]:(null==E&&(T=void 0,"number"!=typeof(T=n.pop()||h.lex()||1)&&(T instanceof Array&&(T=(n=T).pop()),T=e.symbols_[T]||T),E=T),m=r[C]&&r[C][E]),void 0===m||!m.length||!m[0]){var D="";for(b in k=[],r[C])this.terminals_[b]&&b>2&&k.push("'"+this.terminals_[b]+"'");D=h.showPosition?"Parse error on line "+(c+1)+":\n"+h.showPosition()+"\nExpecting "+k.join(", ")+", got '"+(this.terminals_[E]||E)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==E?"end of input":"'"+(this.terminals_[E]||E)+"'"),this.parseError(D,{text:h.match,token:this.terminals_[E]||E,line:h.yylineno,loc:d,expected:k})}if(m[0]instanceof Array&&m.length>1)throw new Error("Parse Error: multiple actions possible at state: "+C+", token: "+E);switch(m[0]){case 1:s.push(E),i.push(h.yytext),u.push(h.yylloc),s.push(m[1]),E=null,o=h.yyleng,a=h.yytext,c=h.yylineno,d=h.yylloc;break;case 2:if(F=this.productions_[m[1]][1],B.$=i[i.length-F],B._$={first_line:u[u.length-(F||1)].first_line,last_line:u[u.length-1].last_line,first_column:u[u.length-(F||1)].first_column,last_column:u[u.length-1].last_column},y&&(B._$.range=[u[u.length-(F||1)].range[0],u[u.length-1].range[1]]),void 0!==(f=this.performAction.apply(B,[a,o,c,A.yy,m[1],i,u].concat(l))))return f;F&&(s=s.slice(0,-1*F*2),i=i.slice(0,-1*F),u=u.slice(0,-1*F)),s.push(this.productions_[m[1]][0]),i.push(B.$),u.push(B._$),g=r[s[s.length-2]][s[s.length-1]],s.push(g);break;case 3:return!0}}return!0}},st={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,s=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),s.length-1&&(this.yylineno-=s.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:s?(s.length===n.length?this.yylloc.first_column:0)+n[n.length-s.length].length-s[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var s,n,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],s=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack){for(var u in i)this[u]=i[u];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,s,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),u=0;ue[0].length)){if(e=s,n=u,this.options.backtrack_lexer){if(!1!==(t=this.test_match(s,i[u])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,s,n){switch(s){case 0:return 53;case 1:return 54;case 2:return 55;case 3:return 56;case 4:case 5:case 14:case 30:case 35:case 39:case 46:break;case 6:return this.begin("acc_title"),31;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),33;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:case 19:case 22:case 24:case 57:case 60:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:case 34:return 8;case 15:case 16:return 7;case 17:case 36:case 44:return"EDGE_STATE";case 18:this.begin("callback_name");break;case 20:this.popState(),this.begin("callback_args");break;case 21:return 70;case 23:return 71;case 25:return"STR";case 26:this.begin("string");break;case 27:return 73;case 28:return this.begin("namespace"),40;case 29:case 38:return this.popState(),8;case 31:return this.begin("namespace-body"),37;case 32:case 42:return this.popState(),39;case 33:case 43:return"EOF_IN_STRUCT";case 37:return this.begin("class"),44;case 40:return this.popState(),this.popState(),39;case 41:return this.begin("class-body"),37;case 45:return"OPEN_IN_STRUCT";case 47:return"MEMBER";case 48:return 76;case 49:return 66;case 50:return 67;case 51:return 69;case 52:return 50;case 53:return 52;case 54:return 45;case 55:return 46;case 56:return 72;case 58:return"GENERICTYPE";case 59:this.begin("generic");break;case 61:return"BQUOTE_STR";case 62:this.begin("bqstring");break;case 63:case 64:case 65:case 66:return 68;case 67:case 68:return 60;case 69:case 70:return 62;case 71:return 61;case 72:return 59;case 73:return 63;case 74:return 64;case 75:return 65;case 76:return 21;case 77:return 42;case 78:return 95;case 79:return"DOT";case 80:return"PLUS";case 81:return 81;case 82:return 78;case 83:case 84:return 84;case 85:return 85;case 86:case 87:return"EQUALS";case 88:return 74;case 89:return 12;case 90:return 14;case 91:return"PUNCTUATION";case 92:return 80;case 93:return 97;case 94:case 95:return 83;case 96:return 9}},rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:classDiagram-v2\b)/,/^(?:classDiagram\b)/,/^(?:\[\*\])/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:["])/,/^(?:[^"]*)/,/^(?:["])/,/^(?:style\b)/,/^(?:namespace\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:\[\*\])/,/^(?:class\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[}])/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\[\*\])/,/^(?:[{])/,/^(?:[\n])/,/^(?:[^{}\n]*)/,/^(?:cssClass\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:click\b)/,/^(?:note for\b)/,/^(?:note\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:href\b)/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:~)/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:[`])/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:\s*\(\))/,/^(?:--)/,/^(?:\.\.)/,/^(?::{1}[^:\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?::)/,/^(?:,)/,/^(?:#)/,/^(?:#)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\w+)/,/^(?:\[)/,/^(?:\])/,/^(?:[!"#$%&'*+,-.`?\\/])/,/^(?:[0-9]+)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\s)/,/^(?:\s)/,/^(?:$)/],conditions:{"namespace-body":{rules:[26,32,33,34,35,36,37,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},namespace:{rules:[26,28,29,30,31,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},"class-body":{rules:[26,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},class:{rules:[26,38,39,40,41,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},acc_descr_multiline:{rules:[11,12,26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},acc_descr:{rules:[9,26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},acc_title:{rules:[7,26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},callback_args:{rules:[22,23,26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},callback_name:{rules:[19,20,21,26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},href:{rules:[26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},struct:{rules:[26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},generic:{rules:[26,48,49,50,51,52,53,54,55,56,57,58,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},bqstring:{rules:[26,48,49,50,51,52,53,54,55,56,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},string:{rules:[24,25,26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,26,27,28,37,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96],inclusive:!0}}};function nt(){this.yy={}}return et.lexer=st,nt.prototype=et,et.Parser=nt,new nt}();u.parser=u;const r=u,a=["#","+","~","-",""];class c{constructor(t,e){this.memberType=e,this.visibility="",this.classifier="";const s=(0,i.d)(t,(0,i.c)());this.parseMember(s)}getDisplayDetails(){let t=this.visibility+(0,i.x)(this.id);"method"===this.memberType&&(t+=`(${(0,i.x)(this.parameters.trim())})`,this.returnType&&(t+=" : "+(0,i.x)(this.returnType))),t=t.trim();return{displayText:t,cssStyle:this.parseClassifier()}}parseMember(t){let e="";if("method"===this.memberType){const s=/([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/,n=t.match(s);if(n){const t=n[1]?n[1].trim():"";if(a.includes(t)&&(this.visibility=t),this.id=n[2].trim(),this.parameters=n[3]?n[3].trim():"",e=n[4]?n[4].trim():"",this.returnType=n[5]?n[5].trim():"",""===e){const t=this.returnType.substring(this.returnType.length-1);t.match(/[$*]/)&&(e=t,this.returnType=this.returnType.substring(0,this.returnType.length-1))}}}else{const s=t.length,n=t.substring(0,1),i=t.substring(s-1);a.includes(n)&&(this.visibility=n),i.match(/[$*]/)&&(e=i),this.id=t.substring(""===this.visibility?0:1,""===e?s:s-1)}this.classifier=e}parseClassifier(){switch(this.classifier){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}}}const o="classId-";let l=[],h={},A=[],p=0,d={},y=0,E=[];const C=t=>i.e.sanitizeText(t,(0,i.c)()),m=function(t){const e=i.e.sanitizeText(t,(0,i.c)());let s="",n=e;if(e.indexOf("~")>0){const t=e.split("~");n=C(t[0]),s=C(t[1])}return{className:n,type:s}},f=function(t){const e=i.e.sanitizeText(t,(0,i.c)()),{className:s,type:n}=m(e);if(Object.hasOwn(h,s))return;const u=i.e.sanitizeText(s,(0,i.c)());h[u]={id:u,type:n,label:u,cssClasses:[],methods:[],members:[],annotations:[],styles:[],domId:o+u+"-"+p},p++},b=function(t){const e=i.e.sanitizeText(t,(0,i.c)());if(e in h)return h[e].domId;throw new Error("Class not found: "+e)},F=function(t,e){f(t);const s=m(t).className,n=h[s];if("string"==typeof e){const t=e.trim();t.startsWith("<<")&&t.endsWith(">>")?n.annotations.push(C(t.substring(2,t.length-2))):t.indexOf(")")>0?n.methods.push(new c(t,"method")):t&&n.members.push(new c(t,"attribute"))}},g=function(t,e){t.split(",").forEach((function(t){let s=t;t[0].match(/\d/)&&(s=o+s),void 0!==h[s]&&h[s].cssClasses.push(e)}))},k=function(t,e,s){const n=i.e.sanitizeText(t,(0,i.c)());if("loose"!==(0,i.c)().securityLevel)return;if(void 0===e)return;const u=n;if(void 0!==h[u]){const t=b(u);let n=[];if("string"==typeof s){n=s.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let t=0;t")),t.classed("hover",!0)})).on("mouseout",(function(){e.transition().duration(500).style("opacity",0);(0,n.Ltv)(this).classed("hover",!1)}))};E.push(T);let B="TB";const D={setAccTitle:i.s,getAccTitle:i.g,getAccDescription:i.a,setAccDescription:i.b,getConfig:()=>(0,i.c)().class,addClass:f,bindFunctions:function(t){E.forEach((function(e){e(t)}))},clear:function(){l=[],h={},A=[],E=[],E.push(T),d={},y=0,(0,i.v)()},getClass:function(t){return h[t]},getClasses:function(){return h},getNotes:function(){return A},addAnnotation:function(t,e){const s=m(t).className;h[s].annotations.push(e)},addNote:function(t,e){const s={id:`note${A.length}`,class:e,text:t};A.push(s)},getRelations:function(){return l},addRelation:function(t){i.l.debug("Adding relation: "+JSON.stringify(t)),f(t.id1),f(t.id2),t.id1=m(t.id1).className,t.id2=m(t.id2).className,t.relationTitle1=i.e.sanitizeText(t.relationTitle1.trim(),(0,i.c)()),t.relationTitle2=i.e.sanitizeText(t.relationTitle2.trim(),(0,i.c)()),l.push(t)},getDirection:()=>B,setDirection:t=>{B=t},addMember:F,addMembers:function(t,e){Array.isArray(e)&&(e.reverse(),e.forEach((e=>F(t,e))))},cleanupLabel:function(t){return t.startsWith(":")&&(t=t.substring(1)),C(t.trim())},lineType:{LINE:0,DOTTED_LINE:1},relationType:{AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3,LOLLIPOP:4},setClickEvent:function(t,e,s){t.split(",").forEach((function(t){k(t,e,s),h[t].haveCallback=!0})),g(t,"clickable")},setCssClass:g,setLink:function(t,e,s){const n=(0,i.c)();t.split(",").forEach((function(t){let u=t;t[0].match(/\d/)&&(u=o+u),void 0!==h[u]&&(h[u].link=i.u.formatUrl(e,n),"sandbox"===n.securityLevel?h[u].linkTarget="_top":h[u].linkTarget="string"==typeof s?C(s):"_blank")})),g(t,"clickable")},getTooltip:function(t,e){return e?d[e].classes[t].tooltip:h[t].tooltip},setTooltip:function(t,e){t.split(",").forEach((function(t){void 0!==e&&(h[t].tooltip=C(e))}))},lookUpDomId:b,setDiagramTitle:i.q,getDiagramTitle:i.t,setClassLabel:function(t,e){const s=i.e.sanitizeText(t,(0,i.c)());e&&(e=C(e));const{className:n}=m(s);h[n].label=e},addNamespace:function(t){void 0===d[t]&&(d[t]={id:t,classes:{},children:{},domId:o+t+"-"+y},y++)},addClassesToNamespace:function(t,e){if(void 0!==d[t])for(const s of e){const{className:e}=m(s);h[e].parent=t,d[t].classes[e]=h[e]}},getNamespace:function(t){return d[t]},getNamespaces:function(){return d},setCssStyle:function(t,e){const s=h[t];if(e&&s)for(const n of e)n.includes(",")?s.styles.push(...n.split(",")):s.styles.push(n)}},_=t=>`g.classGroup text {\n fill: ${t.nodeBorder||t.classText};\n stroke: none;\n font-family: ${t.fontFamily};\n font-size: 10px;\n\n .title {\n font-weight: bolder;\n }\n\n}\n\n.nodeLabel, .edgeLabel {\n color: ${t.classText};\n}\n.edgeLabel .label rect {\n fill: ${t.mainBkg};\n}\n.label text {\n fill: ${t.classText};\n}\n.edgeLabel .label span {\n background: ${t.mainBkg};\n}\n\n.classTitle {\n font-weight: bolder;\n}\n.node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n stroke-width: 1px;\n }\n\n\n.divider {\n stroke: ${t.nodeBorder};\n stroke-width: 1;\n}\n\ng.clickable {\n cursor: pointer;\n}\n\ng.classGroup rect {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n}\n\ng.classGroup line {\n stroke: ${t.nodeBorder};\n stroke-width: 1;\n}\n\n.classLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: ${t.mainBkg};\n opacity: 0.5;\n}\n\n.classLabel .label {\n fill: ${t.nodeBorder};\n font-size: 10px;\n}\n\n.relation {\n stroke: ${t.lineColor};\n stroke-width: 1;\n fill: none;\n}\n\n.dashed-line{\n stroke-dasharray: 3;\n}\n\n.dotted-line{\n stroke-dasharray: 1 2;\n}\n\n#compositionStart, .composition {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#compositionEnd, .composition {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#dependencyStart, .dependency {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#dependencyStart, .dependency {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#extensionStart, .extension {\n fill: transparent !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#extensionEnd, .extension {\n fill: transparent !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#aggregationStart, .aggregation {\n fill: transparent !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#aggregationEnd, .aggregation {\n fill: transparent !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#lollipopStart, .lollipop {\n fill: ${t.mainBkg} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#lollipopEnd, .lollipop {\n fill: ${t.mainBkg} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n.edgeTerminals {\n font-size: 11px;\n line-height: initial;\n}\n\n.classTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n}\n`}}]); \ No newline at end of file diff --git a/assets/js/19ed4d4c.be42ad5d.js b/assets/js/19ed4d4c.be42ad5d.js deleted file mode 100644 index 318438f35cfa..000000000000 --- a/assets/js/19ed4d4c.be42ad5d.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4661],{74354:(e,n,a)=>{a.r(n),a.d(n,{assets:()=>c,contentTitle:()=>i,default:()=>d,frontMatter:()=>s,metadata:()=>r,toc:()=>l});var o=a(74848),t=a(28453);const s={id:"learn-comparisons-cosmos",title:"Polkadot vs. Cosmos",sidebar_label:"Cosmos",description:"Comparison between Polkadot and Cosmos.",keywords:["cosmos","polkadot","interoperability","interoperability hub"],slug:"../learn-comparisons-cosmos"},i=void 0,r={id:"learn/learn-comparisons-cosmos",title:"Polkadot vs. Cosmos",description:"Comparison between Polkadot and Cosmos.",source:"@site/../docs/learn/learn-comparisons-cosmos.md",sourceDirName:"learn",slug:"/learn-comparisons-cosmos",permalink:"/docs/learn-comparisons-cosmos",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-comparisons-cosmos.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1727943421e3,frontMatter:{id:"learn-comparisons-cosmos",title:"Polkadot vs. Cosmos",sidebar_label:"Cosmos",description:"Comparison between Polkadot and Cosmos.",keywords:["cosmos","polkadot","interoperability","interoperability hub"],slug:"../learn-comparisons-cosmos"},sidebar:"docs",previous:{title:"Ethereum",permalink:"/docs/learn-comparisons-ethereum-2"},next:{title:"Avalanche",permalink:"/docs/learn-comparisons-avalanche"}},c={},l=[{value:"Model",id:"model",level:2},{value:"Architecture",id:"architecture",level:2},{value:"Polkadot",id:"polkadot",level:3},{value:"Cosmos",id:"cosmos",level:3},{value:"Consensus",id:"consensus",level:2},{value:"Staking Mechanics",id:"staking-mechanics",level:2},{value:"Message Passing",id:"message-passing",level:2},{value:"Governance",id:"governance",level:2},{value:"Upgrades",id:"upgrades",level:2},{value:"Development Framework",id:"development-framework",level:2},{value:"Conclusion",id:"conclusion",level:2}];function h(e){const n={a:"a",admonition:"admonition",em:"em",h2:"h2",h3:"h3",p:"p",...(0,t.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.p,{children:"Polkadot and Cosmos are both protocols that provide an interface for different state machines to\ncommunicate with each other. Both protocols are predicated on the thesis that the future will have\nmultiple blockchains that need to interoperate with each other rather than individual blockchains\nexisting in isolation."}),"\n",(0,o.jsx)(n.h2,{id:"model",children:"Model"}),"\n",(0,o.jsx)(n.p,{children:'Polkadot uses a sharded model where each shard in the protocol has an abstract state transition\nfunction (STF). Polkadot uses WebAssembly (Wasm) as a "meta-protocol". A shard\'s STF can be abstract\nas long as the validators on Polkadot can execute it within a Wasm environment.'}),"\n",(0,o.jsxs)(n.p,{children:['The shards of Polkadot are called "',(0,o.jsx)(n.a,{href:"/docs/learn-parachains",children:"parachains"}),"\". Every time a parachain wants\nto make a state transition, it submits a block (batch of state transitions) along with a state proof\nthat Polkadot validators can independently verify. These blocks are finalized for the parachains\nwhen they are finalized by Polkadot's relay chain, the main chain of the system. As such, all\nparachains share state with the entire system, meaning that a chain re-organization of a single\nparachain would require a re-organization of all parachains and the relay chain."]}),"\n",(0,o.jsxs)(n.p,{children:["Cosmos employs horizontal scalability using\n",(0,o.jsx)(n.a,{href:"https://www.alchemy.com/overviews/what-is-an-appchain",children:"app-chains"}),". The Cosmos Network consists of\n100+ IBC connected chains, including the Cosmos Hub, Osmosis, Celestia, dYdX v4 chain, Injective,\netc. Each chain is responsible for securing the chain with a sufficiently staked and decentralized\nvalidator set. But chains also have the option to leverage shared security from the Cosmos Hub.\nCosmos chains send cross-chain messages using the Inter-Blockchain Communication protocol. As chains\ndo not share state, a re-organization of one chain would not re-organize other chains, meaning each\nmessage is trust-bound by the recipient's trust in the security of the sender."]}),"\n",(0,o.jsx)(n.h2,{id:"architecture",children:"Architecture"}),"\n",(0,o.jsx)(n.h3,{id:"polkadot",children:"Polkadot"}),"\n",(0,o.jsxs)(n.p,{children:["Polkadot has a relay chain acting as the main chain of the system. All validators in Polkadot are on\nthe relay chain. Parachains have collators who construct and propose parachain blocks to validators.\nCollators do not have any security responsibilities and, thus, do not require a robust incentive\nsystem. Collators can submit a single parachain block for every relay chain block every 6 seconds.\nOnce a parachain submits a block, validators perform a series of\n",(0,o.jsx)(n.a,{href:"/docs/learn-parachains-protocol#availability-and-validity-anv-protocol",children:"availability and validity checks"}),"\nbefore committing it to the final chain."]}),"\n",(0,o.jsx)(n.p,{children:"Parachains can access the relay chain through cores. Relay chain cores are limited, but parachain\ncan decide to purchase coretime in-bulk (and reserve an entire core) or on-demand (and interlace a\ncore with another chain) and executing on a pay-as-you-go basis, only paying to execute a block when\nthey need to."}),"\n",(0,o.jsxs)(n.p,{children:["To interact with chains that want to use their finalization process (e.g., Bitcoin), Polkadot has\n",(0,o.jsx)(n.a,{href:"/docs/learn-bridges",children:"bridges"})," that offer two-way compatibility."]}),"\n",(0,o.jsx)(n.h3,{id:"cosmos",children:"Cosmos"}),"\n",(0,o.jsxs)(n.p,{children:["Cosmos is a network of blockchains built using ",(0,o.jsx)(n.a,{href:"https://cometbft.com/",children:"CometBFT"})," as the consensus\nengine, ",(0,o.jsx)(n.a,{href:"https://docs.cosmos.network/",children:"Cosmos SDK"})," as the VM, and ",(0,o.jsx)(n.a,{href:"https://ibcprotocol.dev/",children:"IBC"}),"\nwhich allows chains to interoperate with one another."]}),"\n",(0,o.jsxs)(n.p,{children:["IBC leverages light clients that can keep track of the consensus of a counterparty chain. For\nexample, when chains A and B want to talk to one another, chain A uses its light client of B to\nverify messages sent from chain B, and vice versa. IBC is\n",(0,o.jsx)(n.a,{href:"https://app.trustless.zone/?from=POLKADOT&to=OSMOSIS",children:"currently live"})," on Polkadot and Kusama. Work\nis ongoing to implement IBC to Ethereum and it's layer 2s."]}),"\n",(0,o.jsx)(n.h2,{id:"consensus",children:"Consensus"}),"\n",(0,o.jsxs)(n.p,{children:["Polkadot uses a hybrid ",(0,o.jsx)(n.a,{href:"/docs/learn-consensus",children:"consensus"})," protocol with two sub-protocols: BABE and\nGRANDPA. BABE (Blind Assignment for Blockchain Extension) uses a verifiable random function (VRF) to\nassign slots to validators and a fallback round-robin pattern to guarantee that each slot has an\nauthor. GRANDPA (GHOST-based Recursive Ancestor Deriving Prefix Agreement) votes on chains, rather\nthan individual blocks. Together, BABE can author candidate blocks to extend the finalized chain and\nGRANDPA can finalize them in batches (up to millions of blocks at a time)."]}),"\n",(0,o.jsx)(n.p,{children:"This isolation of tasks provides several benefits. First, it represents a reduction in transport\ncomplexity for both block production and finalization. BABE has linear complexity, making it easy to\nscale to thousands of block producers with low networking overhead. GRANDPA has quadratic\ncomplexity, but has an advantage in terms of the latency. It is capable of finalizing multiple\nblocks in one batch."}),"\n",(0,o.jsx)(n.p,{children:"Second, having the capacity to extend the chain with unfinalized blocks allows for liveness of the\nnetwork and the validators to perform extensive availability and validity checks to ensure that no\ninvalid state transitions make their way into the final chain."}),"\n",(0,o.jsx)(n.p,{children:"Cosmos chains use Tendermint consensus, a round-robin protocol that provides instant finality. Block\nproduction and finalization are on the same path of the algorithm, meaning it produces and finalizes\none block at a time. Because it is a PBFT-based algorithm (like GRANDPA), it has quadratic\ncomplexity, designed to finalize one block at a time."}),"\n",(0,o.jsx)(n.h2,{id:"staking-mechanics",children:"Staking Mechanics"}),"\n",(0,o.jsxs)(n.p,{children:["Polkadot uses ",(0,o.jsx)(n.a,{href:"/docs/learn-staking",children:"Nominated Proof of Stake (NPoS)"})," to select validators using the\n",(0,o.jsx)(n.a,{href:"/docs/learn-phragmen",children:"sequential Phragm\xe9n algorithm"}),". The validator set size is set by governance\n(1_000 validators planned) and stakers who do not want to run validator infrastructure can nominate\nup to 16 validators. Phragm\xe9n's algorithm selects the optimal allocation of stake, where optimal is\nbased on having the most evenly staked set."]}),"\n",(0,o.jsxs)(n.p,{children:["All validators in Polkadot have the same weight in the consensus protocols. That is, to reach\ngreater than 2/3 of support for a chain, more than 2/3 of the ",(0,o.jsx)(n.em,{children:"validators"})," must commit to it, rather\nthan 2/3 of the ",(0,o.jsx)(n.em,{children:"stake."})," Likewise, validator rewards are tied to their activity, primarily block\nproduction and finality justifications, not their amount of stake. This creates an incentive to\nnominate validators with lower stakes, as they will earn higher returns on their staked tokens."]}),"\n",(0,o.jsx)(n.p,{children:"The Cosmos Hub uses Bonded Proof of Stake (a variant of Delegated PoS) to elect validators. Stakers\nmust bond funds and submit a delegate transaction for each validator they would like to delegate to\nwith the number of tokens to delegate. The Cosmos Hub plans to support up to 300 validators."}),"\n",(0,o.jsxs)(n.p,{children:["Consensus voting and rewards are both stake-based in Cosmos. In the case of consensus voting, more\nthan 2/3 of the ",(0,o.jsx)(n.em,{children:"stake"})," must commit, rather than 2/3 of the ",(0,o.jsx)(n.em,{children:"validators."})," Likewise, a validator with\n10% of the total stake will earn 10% of the rewards."]}),"\n",(0,o.jsx)(n.p,{children:"Finally, in Cosmos, if a staker does not vote in a governance referendum, the validators assume\ntheir voting power. Because of this, many validators in Cosmos have zero commission in order to\nacquire more control over the protocol. In Polkadot, governance and staking are completely disjoint;\nnominating a validator does not assign any governance voting rights to the validator."}),"\n",(0,o.jsx)(n.h2,{id:"message-passing",children:"Message Passing"}),"\n",(0,o.jsxs)(n.p,{children:["Polkadot uses ",(0,o.jsx)(n.a,{href:"/docs/learn-xcm",children:"Cross-Consensus Message Passing Format (XCM)"})," for parachains to send\narbitrary messages to each other. Parachains open connections with each other and can send messages\nvia their established channels. ",(0,o.jsx)(n.a,{href:"/docs/learn-collator",children:"Collators"})," are full nodes of parachains and full\nnodes of the relay chain, so collator nodes are a key component of message passing. Messages do not\npass through the relay chain, only proofs of post and channel operations (open, close, etc.) go into\nthe relay chain. This enhances scalability by keeping data on the edges of the system."]}),"\n",(0,o.jsx)(n.p,{children:"In the case of a chain re-organization, messages can be rolled back to the point of the\nre-organization based on the proofs of post in the relay chain. The shared state amongst parachains\nmeans that messages are free from trust bounds; they all operate in the same context."}),"\n",(0,o.jsxs)(n.p,{children:["Polkadot has an additional protocol called ",(0,o.jsx)(n.a,{href:"/docs/learn-spree",children:"SPREE"})," that provides shared logic for\ncross-chain messages. Messages sent with SPREE carry additional guarantees about provenance and\ninterpretation by the receiving chain."]}),"\n",(0,o.jsxs)(n.p,{children:["Cosmos uses a light client-based cross-chain protocol called\n",(0,o.jsx)(n.a,{href:"https://www.ibcprotocol.dev/",children:"Inter-Blockchain Communication (IBC)"})," for arbitrary message-passing.\nIn the current design, IBC chains create 1:1\n",(0,o.jsx)(n.a,{href:"https://ibc.cosmos.network/main/ibc/overview#connections",children:"Connections"})," with each other, over which\n",(0,o.jsx)(n.a,{href:"https://ibc.cosmos.network/main/ibc/overview#channels",children:"Channels"})," can be established. IBC data\npackets are sent between application modules on different chains over these channels. In the case of\nIBC, as chains do not share state, receiving chains must trust the security of a message's origin."]}),"\n",(0,o.jsx)(n.h2,{id:"governance",children:"Governance"}),"\n",(0,o.jsxs)(n.p,{children:["Polkadot has ",(0,o.jsx)(n.a,{href:"/docs/learn-polkadot-opengov",children:"OpenGov"})," framewok with several trackss to pass proposals as\npublic referenda, where the majority of tokens can always control the outcome. Referenda can contain\na variety of proposals, including fund allocation from an on-chain\n",(0,o.jsx)(n.a,{href:"/docs/learn-polkadot-opengov-treasury",children:"Treasury"}),". Decisions get enacted on-chain and are binding and\nautonomous."]}),"\n",(0,o.jsx)(n.p,{children:"Cosmos uses coin-vote signaling to pass referenda. The actual enactment of governance decisions is\ncarried out via a protocol fork, much like other blockchains. All token holders can vote, however,\nif a delegator abstains from a vote then the validator they delegate to assume their voting power.\nValidators in Polkadot do not receive any voting power based on their nominators."}),"\n",(0,o.jsx)(n.h2,{id:"upgrades",children:"Upgrades"}),"\n",(0,o.jsx)(n.p,{children:"Using the Wasm meta-protocol, Polkadot can enact chain upgrades and successful proposals without a\nhard fork. Anything that is within the STF, the transaction queue, or off-chain workers can be\nupgraded without forking the chain."}),"\n",(0,o.jsx)(n.p,{children:"As Cosmos is not based on a meta-protocol, it must enact upgrades and proposals via a normal forking\nmechanism."}),"\n",(0,o.jsx)(n.h2,{id:"development-framework",children:"Development Framework"}),"\n",(0,o.jsx)(n.p,{children:"Both Cosmos and Polkadot are designed such that each chain has its STF and both provide support for\nsmart contracts in both Wasm and the Ethereum Virtual Machine (EVM). Polkadot provides an\nahead-of-time Wasm compiler as well as an interpreter (Wasmi) for execution, while Cosmos only\nexecutes smart contracts in an interpreter."}),"\n",(0,o.jsx)(n.p,{children:"Cosmos chains can be developed using the Cosmos SDK, written in Go. The Cosmos SDK contains about 10\nmodules (e.g. staking, governance, etc.) that can be included in a chain's STF. The SDK builds on\ntop of Tendermint."}),"\n",(0,o.jsxs)(n.p,{children:["The primary development framework for parachains is ",(0,o.jsx)(n.a,{href:"https://substrate.io",children:"Substrate"}),", written in\nRust. Substrate comes with FRAME, a set of about 40 modules (called \"pallets\") to use in a chain's\nSTF. Beyond simply using the pallets, Substrate adds a further layer of abstraction that allows\ndevelopers to compose FRAME's pallets by adding custom modules and configuring the parameters and\ninitial storage values for the chain."]}),"\n",(0,o.jsx)(n.admonition,{title:"Polkadot can support an STF written in any language",type:"note",children:(0,o.jsx)(n.p,{children:"So long as it compiles to its meta-protocol Wasm. Likewise, it could still use the Substrate client\n(database, RPC, networking, etc.); it only needs to implement the primitives at the interface."})}),"\n",(0,o.jsx)(n.h2,{id:"conclusion",children:"Conclusion"}),"\n",(0,o.jsx)(n.p,{children:"Polkadot was designed on the principle that scalability and interoperability require shared\nvalidation logic to create a trust-free environment. As more blockchains are developed, their\nsecurity must be cooperative, not competitive. Therefore, Polkadot provides the shared validation\nlogic and security processes across chains so that they can interact knowing that their\ninterlocutors execute within the same security context."}),"\n",(0,o.jsx)(n.p,{children:"The Cosmos network uses an Internet-like unstructured network that uses IBC to connect chains with\nindependent security guarantees, meaning that when data is sent from one chain to another, the\nreceiving chain must trust the sending chain. Thus, each blockchain in the Cosmos network has its\nindependent security mechanisms. Chains also have the option to share security with the Cosmos Hub\nand thereby leverage its economic security."})]})}function d(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(h,{...e})}):h(e)}},28453:(e,n,a)=>{a.d(n,{R:()=>i,x:()=>r});var o=a(96540);const t={},s=o.createContext(t);function i(e){const n=o.useContext(s);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:i(e.components),o.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/19ed4d4c.d8dabed9.js b/assets/js/19ed4d4c.d8dabed9.js new file mode 100644 index 000000000000..01960eff5374 --- /dev/null +++ b/assets/js/19ed4d4c.d8dabed9.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4661],{69037:(e,n,a)=>{a.r(n),a.d(n,{assets:()=>c,contentTitle:()=>r,default:()=>d,frontMatter:()=>i,metadata:()=>o,toc:()=>l});const o=JSON.parse('{"id":"learn/learn-comparisons-cosmos","title":"Polkadot vs. Cosmos","description":"Comparison between Polkadot and Cosmos.","source":"@site/../docs/learn/learn-comparisons-cosmos.md","sourceDirName":"learn","slug":"/learn-comparisons-cosmos","permalink":"/docs/learn-comparisons-cosmos","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-comparisons-cosmos.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1727943421000,"frontMatter":{"id":"learn-comparisons-cosmos","title":"Polkadot vs. Cosmos","sidebar_label":"Cosmos","description":"Comparison between Polkadot and Cosmos.","keywords":["cosmos","polkadot","interoperability","interoperability hub"],"slug":"../learn-comparisons-cosmos"},"sidebar":"docs","previous":{"title":"Ethereum","permalink":"/docs/learn-comparisons-ethereum-2"},"next":{"title":"Avalanche","permalink":"/docs/learn-comparisons-avalanche"}}');var t=a(74848),s=a(28453);const i={id:"learn-comparisons-cosmos",title:"Polkadot vs. Cosmos",sidebar_label:"Cosmos",description:"Comparison between Polkadot and Cosmos.",keywords:["cosmos","polkadot","interoperability","interoperability hub"],slug:"../learn-comparisons-cosmos"},r=void 0,c={},l=[{value:"Model",id:"model",level:2},{value:"Architecture",id:"architecture",level:2},{value:"Polkadot",id:"polkadot",level:3},{value:"Cosmos",id:"cosmos",level:3},{value:"Consensus",id:"consensus",level:2},{value:"Staking Mechanics",id:"staking-mechanics",level:2},{value:"Message Passing",id:"message-passing",level:2},{value:"Governance",id:"governance",level:2},{value:"Upgrades",id:"upgrades",level:2},{value:"Development Framework",id:"development-framework",level:2},{value:"Conclusion",id:"conclusion",level:2}];function h(e){const n={a:"a",admonition:"admonition",em:"em",h2:"h2",h3:"h3",p:"p",...(0,s.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.p,{children:"Polkadot and Cosmos are both protocols that provide an interface for different state machines to\ncommunicate with each other. Both protocols are predicated on the thesis that the future will have\nmultiple blockchains that need to interoperate with each other rather than individual blockchains\nexisting in isolation."}),"\n",(0,t.jsx)(n.h2,{id:"model",children:"Model"}),"\n",(0,t.jsx)(n.p,{children:'Polkadot uses a sharded model where each shard in the protocol has an abstract state transition\nfunction (STF). Polkadot uses WebAssembly (Wasm) as a "meta-protocol". A shard\'s STF can be abstract\nas long as the validators on Polkadot can execute it within a Wasm environment.'}),"\n",(0,t.jsxs)(n.p,{children:['The shards of Polkadot are called "',(0,t.jsx)(n.a,{href:"/docs/learn-parachains",children:"parachains"}),"\". Every time a parachain wants\nto make a state transition, it submits a block (batch of state transitions) along with a state proof\nthat Polkadot validators can independently verify. These blocks are finalized for the parachains\nwhen they are finalized by Polkadot's relay chain, the main chain of the system. As such, all\nparachains share state with the entire system, meaning that a chain re-organization of a single\nparachain would require a re-organization of all parachains and the relay chain."]}),"\n",(0,t.jsxs)(n.p,{children:["Cosmos employs horizontal scalability using\n",(0,t.jsx)(n.a,{href:"https://www.alchemy.com/overviews/what-is-an-appchain",children:"app-chains"}),". The Cosmos Network consists of\n100+ IBC connected chains, including the Cosmos Hub, Osmosis, Celestia, dYdX v4 chain, Injective,\netc. Each chain is responsible for securing the chain with a sufficiently staked and decentralized\nvalidator set. But chains also have the option to leverage shared security from the Cosmos Hub.\nCosmos chains send cross-chain messages using the Inter-Blockchain Communication protocol. As chains\ndo not share state, a re-organization of one chain would not re-organize other chains, meaning each\nmessage is trust-bound by the recipient's trust in the security of the sender."]}),"\n",(0,t.jsx)(n.h2,{id:"architecture",children:"Architecture"}),"\n",(0,t.jsx)(n.h3,{id:"polkadot",children:"Polkadot"}),"\n",(0,t.jsxs)(n.p,{children:["Polkadot has a relay chain acting as the main chain of the system. All validators in Polkadot are on\nthe relay chain. Parachains have collators who construct and propose parachain blocks to validators.\nCollators do not have any security responsibilities and, thus, do not require a robust incentive\nsystem. Collators can submit a single parachain block for every relay chain block every 6 seconds.\nOnce a parachain submits a block, validators perform a series of\n",(0,t.jsx)(n.a,{href:"/docs/learn-parachains-protocol#availability-and-validity-anv-protocol",children:"availability and validity checks"}),"\nbefore committing it to the final chain."]}),"\n",(0,t.jsx)(n.p,{children:"Parachains can access the relay chain through cores. Relay chain cores are limited, but parachain\ncan decide to purchase coretime in-bulk (and reserve an entire core) or on-demand (and interlace a\ncore with another chain) and executing on a pay-as-you-go basis, only paying to execute a block when\nthey need to."}),"\n",(0,t.jsxs)(n.p,{children:["To interact with chains that want to use their finalization process (e.g., Bitcoin), Polkadot has\n",(0,t.jsx)(n.a,{href:"/docs/learn-bridges",children:"bridges"})," that offer two-way compatibility."]}),"\n",(0,t.jsx)(n.h3,{id:"cosmos",children:"Cosmos"}),"\n",(0,t.jsxs)(n.p,{children:["Cosmos is a network of blockchains built using ",(0,t.jsx)(n.a,{href:"https://cometbft.com/",children:"CometBFT"})," as the consensus\nengine, ",(0,t.jsx)(n.a,{href:"https://docs.cosmos.network/",children:"Cosmos SDK"})," as the VM, and ",(0,t.jsx)(n.a,{href:"https://ibcprotocol.dev/",children:"IBC"}),"\nwhich allows chains to interoperate with one another."]}),"\n",(0,t.jsxs)(n.p,{children:["IBC leverages light clients that can keep track of the consensus of a counterparty chain. For\nexample, when chains A and B want to talk to one another, chain A uses its light client of B to\nverify messages sent from chain B, and vice versa. IBC is\n",(0,t.jsx)(n.a,{href:"https://app.trustless.zone/?from=POLKADOT&to=OSMOSIS",children:"currently live"})," on Polkadot and Kusama. Work\nis ongoing to implement IBC to Ethereum and it's layer 2s."]}),"\n",(0,t.jsx)(n.h2,{id:"consensus",children:"Consensus"}),"\n",(0,t.jsxs)(n.p,{children:["Polkadot uses a hybrid ",(0,t.jsx)(n.a,{href:"/docs/learn-consensus",children:"consensus"})," protocol with two sub-protocols: BABE and\nGRANDPA. BABE (Blind Assignment for Blockchain Extension) uses a verifiable random function (VRF) to\nassign slots to validators and a fallback round-robin pattern to guarantee that each slot has an\nauthor. GRANDPA (GHOST-based Recursive Ancestor Deriving Prefix Agreement) votes on chains, rather\nthan individual blocks. Together, BABE can author candidate blocks to extend the finalized chain and\nGRANDPA can finalize them in batches (up to millions of blocks at a time)."]}),"\n",(0,t.jsx)(n.p,{children:"This isolation of tasks provides several benefits. First, it represents a reduction in transport\ncomplexity for both block production and finalization. BABE has linear complexity, making it easy to\nscale to thousands of block producers with low networking overhead. GRANDPA has quadratic\ncomplexity, but has an advantage in terms of the latency. It is capable of finalizing multiple\nblocks in one batch."}),"\n",(0,t.jsx)(n.p,{children:"Second, having the capacity to extend the chain with unfinalized blocks allows for liveness of the\nnetwork and the validators to perform extensive availability and validity checks to ensure that no\ninvalid state transitions make their way into the final chain."}),"\n",(0,t.jsx)(n.p,{children:"Cosmos chains use Tendermint consensus, a round-robin protocol that provides instant finality. Block\nproduction and finalization are on the same path of the algorithm, meaning it produces and finalizes\none block at a time. Because it is a PBFT-based algorithm (like GRANDPA), it has quadratic\ncomplexity, designed to finalize one block at a time."}),"\n",(0,t.jsx)(n.h2,{id:"staking-mechanics",children:"Staking Mechanics"}),"\n",(0,t.jsxs)(n.p,{children:["Polkadot uses ",(0,t.jsx)(n.a,{href:"/docs/learn-staking",children:"Nominated Proof of Stake (NPoS)"})," to select validators using the\n",(0,t.jsx)(n.a,{href:"/docs/learn-phragmen",children:"sequential Phragm\xe9n algorithm"}),". The validator set size is set by governance\n(1_000 validators planned) and stakers who do not want to run validator infrastructure can nominate\nup to 16 validators. Phragm\xe9n's algorithm selects the optimal allocation of stake, where optimal is\nbased on having the most evenly staked set."]}),"\n",(0,t.jsxs)(n.p,{children:["All validators in Polkadot have the same weight in the consensus protocols. That is, to reach\ngreater than 2/3 of support for a chain, more than 2/3 of the ",(0,t.jsx)(n.em,{children:"validators"})," must commit to it, rather\nthan 2/3 of the ",(0,t.jsx)(n.em,{children:"stake."})," Likewise, validator rewards are tied to their activity, primarily block\nproduction and finality justifications, not their amount of stake. This creates an incentive to\nnominate validators with lower stakes, as they will earn higher returns on their staked tokens."]}),"\n",(0,t.jsx)(n.p,{children:"The Cosmos Hub uses Bonded Proof of Stake (a variant of Delegated PoS) to elect validators. Stakers\nmust bond funds and submit a delegate transaction for each validator they would like to delegate to\nwith the number of tokens to delegate. The Cosmos Hub plans to support up to 300 validators."}),"\n",(0,t.jsxs)(n.p,{children:["Consensus voting and rewards are both stake-based in Cosmos. In the case of consensus voting, more\nthan 2/3 of the ",(0,t.jsx)(n.em,{children:"stake"})," must commit, rather than 2/3 of the ",(0,t.jsx)(n.em,{children:"validators."})," Likewise, a validator with\n10% of the total stake will earn 10% of the rewards."]}),"\n",(0,t.jsx)(n.p,{children:"Finally, in Cosmos, if a staker does not vote in a governance referendum, the validators assume\ntheir voting power. Because of this, many validators in Cosmos have zero commission in order to\nacquire more control over the protocol. In Polkadot, governance and staking are completely disjoint;\nnominating a validator does not assign any governance voting rights to the validator."}),"\n",(0,t.jsx)(n.h2,{id:"message-passing",children:"Message Passing"}),"\n",(0,t.jsxs)(n.p,{children:["Polkadot uses ",(0,t.jsx)(n.a,{href:"/docs/learn-xcm",children:"Cross-Consensus Message Passing Format (XCM)"})," for parachains to send\narbitrary messages to each other. Parachains open connections with each other and can send messages\nvia their established channels. ",(0,t.jsx)(n.a,{href:"/docs/learn-collator",children:"Collators"})," are full nodes of parachains and full\nnodes of the relay chain, so collator nodes are a key component of message passing. Messages do not\npass through the relay chain, only proofs of post and channel operations (open, close, etc.) go into\nthe relay chain. This enhances scalability by keeping data on the edges of the system."]}),"\n",(0,t.jsx)(n.p,{children:"In the case of a chain re-organization, messages can be rolled back to the point of the\nre-organization based on the proofs of post in the relay chain. The shared state amongst parachains\nmeans that messages are free from trust bounds; they all operate in the same context."}),"\n",(0,t.jsxs)(n.p,{children:["Polkadot has an additional protocol called ",(0,t.jsx)(n.a,{href:"/docs/learn-spree",children:"SPREE"})," that provides shared logic for\ncross-chain messages. Messages sent with SPREE carry additional guarantees about provenance and\ninterpretation by the receiving chain."]}),"\n",(0,t.jsxs)(n.p,{children:["Cosmos uses a light client-based cross-chain protocol called\n",(0,t.jsx)(n.a,{href:"https://www.ibcprotocol.dev/",children:"Inter-Blockchain Communication (IBC)"})," for arbitrary message-passing.\nIn the current design, IBC chains create 1:1\n",(0,t.jsx)(n.a,{href:"https://ibc.cosmos.network/main/ibc/overview#connections",children:"Connections"})," with each other, over which\n",(0,t.jsx)(n.a,{href:"https://ibc.cosmos.network/main/ibc/overview#channels",children:"Channels"})," can be established. IBC data\npackets are sent between application modules on different chains over these channels. In the case of\nIBC, as chains do not share state, receiving chains must trust the security of a message's origin."]}),"\n",(0,t.jsx)(n.h2,{id:"governance",children:"Governance"}),"\n",(0,t.jsxs)(n.p,{children:["Polkadot has ",(0,t.jsx)(n.a,{href:"/docs/learn-polkadot-opengov",children:"OpenGov"})," framewok with several trackss to pass proposals as\npublic referenda, where the majority of tokens can always control the outcome. Referenda can contain\na variety of proposals, including fund allocation from an on-chain\n",(0,t.jsx)(n.a,{href:"/docs/learn-polkadot-opengov-treasury",children:"Treasury"}),". Decisions get enacted on-chain and are binding and\nautonomous."]}),"\n",(0,t.jsx)(n.p,{children:"Cosmos uses coin-vote signaling to pass referenda. The actual enactment of governance decisions is\ncarried out via a protocol fork, much like other blockchains. All token holders can vote, however,\nif a delegator abstains from a vote then the validator they delegate to assume their voting power.\nValidators in Polkadot do not receive any voting power based on their nominators."}),"\n",(0,t.jsx)(n.h2,{id:"upgrades",children:"Upgrades"}),"\n",(0,t.jsx)(n.p,{children:"Using the Wasm meta-protocol, Polkadot can enact chain upgrades and successful proposals without a\nhard fork. Anything that is within the STF, the transaction queue, or off-chain workers can be\nupgraded without forking the chain."}),"\n",(0,t.jsx)(n.p,{children:"As Cosmos is not based on a meta-protocol, it must enact upgrades and proposals via a normal forking\nmechanism."}),"\n",(0,t.jsx)(n.h2,{id:"development-framework",children:"Development Framework"}),"\n",(0,t.jsx)(n.p,{children:"Both Cosmos and Polkadot are designed such that each chain has its STF and both provide support for\nsmart contracts in both Wasm and the Ethereum Virtual Machine (EVM). Polkadot provides an\nahead-of-time Wasm compiler as well as an interpreter (Wasmi) for execution, while Cosmos only\nexecutes smart contracts in an interpreter."}),"\n",(0,t.jsx)(n.p,{children:"Cosmos chains can be developed using the Cosmos SDK, written in Go. The Cosmos SDK contains about 10\nmodules (e.g. staking, governance, etc.) that can be included in a chain's STF. The SDK builds on\ntop of Tendermint."}),"\n",(0,t.jsxs)(n.p,{children:["The primary development framework for parachains is ",(0,t.jsx)(n.a,{href:"https://substrate.io",children:"Substrate"}),", written in\nRust. Substrate comes with FRAME, a set of about 40 modules (called \"pallets\") to use in a chain's\nSTF. Beyond simply using the pallets, Substrate adds a further layer of abstraction that allows\ndevelopers to compose FRAME's pallets by adding custom modules and configuring the parameters and\ninitial storage values for the chain."]}),"\n",(0,t.jsx)(n.admonition,{title:"Polkadot can support an STF written in any language",type:"note",children:(0,t.jsx)(n.p,{children:"So long as it compiles to its meta-protocol Wasm. Likewise, it could still use the Substrate client\n(database, RPC, networking, etc.); it only needs to implement the primitives at the interface."})}),"\n",(0,t.jsx)(n.h2,{id:"conclusion",children:"Conclusion"}),"\n",(0,t.jsx)(n.p,{children:"Polkadot was designed on the principle that scalability and interoperability require shared\nvalidation logic to create a trust-free environment. As more blockchains are developed, their\nsecurity must be cooperative, not competitive. Therefore, Polkadot provides the shared validation\nlogic and security processes across chains so that they can interact knowing that their\ninterlocutors execute within the same security context."}),"\n",(0,t.jsx)(n.p,{children:"The Cosmos network uses an Internet-like unstructured network that uses IBC to connect chains with\nindependent security guarantees, meaning that when data is sent from one chain to another, the\nreceiving chain must trust the sending chain. Thus, each blockchain in the Cosmos network has its\nindependent security mechanisms. Chains also have the option to share security with the Cosmos Hub\nand thereby leverage its economic security."})]})}function d(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(h,{...e})}):h(e)}},28453:(e,n,a)=>{a.d(n,{R:()=>i,x:()=>r});var o=a(96540);const t={},s=o.createContext(t);function i(e){const n=o.useContext(s);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:i(e.components),o.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/1a4e3797.455ae7cb.js b/assets/js/1a4e3797.455ae7cb.js new file mode 100644 index 000000000000..3026bbe684f4 --- /dev/null +++ b/assets/js/1a4e3797.455ae7cb.js @@ -0,0 +1,2 @@ +/*! For license information please see 1a4e3797.455ae7cb.js.LICENSE.txt */ +(self.webpackChunk=self.webpackChunk||[]).push([[2138],{72733:e=>{function t(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(e){return"function"==typeof e}function n(e){return"object"==typeof e&&null!==e}function i(e){return void 0===e}e.exports=t,t.prototype._events=void 0,t.prototype._maxListeners=void 0,t.defaultMaxListeners=10,t.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},t.prototype.emit=function(e){var t,s,a,c,o,u;if(this._events||(this._events={}),"error"===e&&(!this._events.error||n(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var h=new Error('Uncaught, unspecified "error" event. ('+t+")");throw h.context=t,h}if(i(s=this._events[e]))return!1;if(r(s))switch(arguments.length){case 1:s.call(this);break;case 2:s.call(this,arguments[1]);break;case 3:s.call(this,arguments[1],arguments[2]);break;default:c=Array.prototype.slice.call(arguments,1),s.apply(this,c)}else if(n(s))for(c=Array.prototype.slice.call(arguments,1),a=(u=s.slice()).length,o=0;o0&&this._events[e].length>a&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},t.prototype.on=t.prototype.addListener,t.prototype.once=function(e,t){if(!r(t))throw TypeError("listener must be a function");var n=!1;function i(){this.removeListener(e,i),n||(n=!0,t.apply(this,arguments))}return i.listener=t,this.on(e,i),this},t.prototype.removeListener=function(e,t){var i,s,a,c;if(!r(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(a=(i=this._events[e]).length,s=-1,i===t||r(i.listener)&&i.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(n(i)){for(c=a;c-- >0;)if(i[c]===t||i[c].listener&&i[c].listener===t){s=c;break}if(s<0)return this;1===i.length?(i.length=0,delete this._events[e]):i.splice(s,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},t.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(r(n=this._events[e]))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},t.prototype.listeners=function(e){return this._events&&this._events[e]?r(this._events[e])?[this._events[e]]:this._events[e].slice():[]},t.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(r(t))return 1;if(t)return t.length}return 0},t.listenerCount=function(e,t){return e.listenerCount(t)}},57570:(e,t,r)=>{"use strict";var n=r(96924),i=r(8110),s=r(54824),a=r(36872),c=r(61974);function o(e,t,r,i){return new n(e,t,r,i)}o.version=r(53235),o.AlgoliaSearchHelper=n,o.SearchParameters=a,o.RecommendParameters=i,o.SearchResults=c,o.RecommendResults=s,e.exports=o},51817:(e,t,r)=>{"use strict";var n=r(72733);function i(e,t,r){this.main=e,this.fn=t,this.recommendFn=r,this.lastResults=null,this.lastRecommendResults=null}r(91641)(i,n),i.prototype.detach=function(){this.removeAllListeners(),this.main.detachDerivedHelper(this)},i.prototype.getModifiedState=function(e){return this.fn(e)},i.prototype.getModifiedRecommendState=function(e){return this.recommendFn(e)},e.exports=i},8110:e=>{"use strict";function t(e){e=e||{},this.params=e.params||[]}t.prototype={constructor:t,addParams:function(e){var r=this.params.slice();return r.push(e),new t({params:r})},removeParams:function(e){return new t({params:this.params.filter((function(t){return t.$$id!==e}))})},addFrequentlyBoughtTogether:function(e){return this.addParams(Object.assign({},e,{model:"bought-together"}))},addRelatedProducts:function(e){return this.addParams(Object.assign({},e,{model:"related-products"}))},addTrendingItems:function(e){return this.addParams(Object.assign({},e,{model:"trending-items"}))},addTrendingFacets:function(e){return this.addParams(Object.assign({},e,{model:"trending-facets"}))},addLookingSimilar:function(e){return this.addParams(Object.assign({},e,{model:"looking-similar"}))},_buildQueries:function(e,t){return this.params.filter((function(e){return void 0===t[e.$$id]})).map((function(t){var r=Object.assign({},t,{indexName:e,threshold:t.threshold||0});return delete r.$$id,r}))}},e.exports=t},54824:e=>{"use strict";function t(e,t){this._state=e,this._rawResults={};var r=this;e.params.forEach((function(e){var n=e.$$id;r[n]=t[n],r._rawResults[n]=t[n]}))}t.prototype={constructor:t},e.exports=t},44723:(e,t,r)=>{"use strict";var n=r(27285),i=r(19628),s=r(43416),a={addRefinement:function(e,t,r){if(a.isRefined(e,t,r))return e;var i=""+r,s=e[t]?e[t].concat(i):[i],c={};return c[t]=s,n({},c,e)},removeRefinement:function(e,t,r){if(void 0===r)return a.clearRefinement(e,(function(e,r){return t===r}));var n=""+r;return a.clearRefinement(e,(function(e,r){return t===r&&n===e}))},toggleRefinement:function(e,t,r){if(void 0===r)throw new Error("toggleRefinement should be used with a value");return a.isRefined(e,t,r)?a.removeRefinement(e,t,r):a.addRefinement(e,t,r)},clearRefinement:function(e,t,r){if(void 0===t)return i(e)?{}:e;if("string"==typeof t)return s(e,[t]);if("function"==typeof t){var n=!1,a=Object.keys(e).reduce((function(i,s){var a=e[s]||[],c=a.filter((function(e){return!t(e,s,r)}));return c.length!==a.length&&(n=!0),i[s]=c,i}),{});return n?a:e}},isRefined:function(e,t,r){var n=Boolean(e[t])&&e[t].length>0;if(void 0===r||!n)return n;var i=""+r;return-1!==e[t].indexOf(i)}};e.exports=a},36872:(e,t,r)=>{"use strict";var n=r(27285),i=r(92902),s=r(20156),a=r(65901),c=r(19628),o=r(43416),u=r(53610),h=r(40171),f=r(44723);function l(e,t){return Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((function(e,r){return l(t[r],e)})):e===t}function m(e){var t=e?m._parseNumbers(e):{};void 0===t.userToken||h(t.userToken)||console.warn("[algoliasearch-helper] The `userToken` parameter is invalid. This can lead to wrong analytics.\n - Format: [a-zA-Z0-9_-]{1,64}"),this.facets=t.facets||[],this.disjunctiveFacets=t.disjunctiveFacets||[],this.hierarchicalFacets=t.hierarchicalFacets||[],this.facetsRefinements=t.facetsRefinements||{},this.facetsExcludes=t.facetsExcludes||{},this.disjunctiveFacetsRefinements=t.disjunctiveFacetsRefinements||{},this.numericRefinements=t.numericRefinements||{},this.tagRefinements=t.tagRefinements||[],this.hierarchicalFacetsRefinements=t.hierarchicalFacetsRefinements||{};var r=this;Object.keys(t).forEach((function(e){var n=-1!==m.PARAMETERS.indexOf(e),i=void 0!==t[e];!n&&i&&(r[e]=t[e])}))}m.PARAMETERS=Object.keys(new m),m._parseNumbers=function(e){if(e instanceof m)return e;var t={};if(["aroundPrecision","aroundRadius","getRankingInfo","minWordSizefor2Typos","minWordSizefor1Typo","page","maxValuesPerFacet","distinct","minimumAroundRadius","hitsPerPage","minProximity"].forEach((function(r){var n=e[r];if("string"==typeof n){var i=parseFloat(n);t[r]=isNaN(i)?n:i}})),Array.isArray(e.insideBoundingBox)&&(t.insideBoundingBox=e.insideBoundingBox.map((function(e){return Array.isArray(e)?e.map((function(e){return parseFloat(e)})):e}))),e.numericRefinements){var r={};Object.keys(e.numericRefinements).forEach((function(t){var n=e.numericRefinements[t]||{};r[t]={},Object.keys(n).forEach((function(e){var i=n[e].map((function(e){return Array.isArray(e)?e.map((function(e){return"string"==typeof e?parseFloat(e):e})):"string"==typeof e?parseFloat(e):e}));r[t][e]=i}))})),t.numericRefinements=r}return a(e,t)},m.make=function(e){var t=new m(e);return(e.hierarchicalFacets||[]).forEach((function(e){if(e.rootPath){var r=t.getHierarchicalRefinement(e.name);r.length>0&&0!==r[0].indexOf(e.rootPath)&&(t=t.clearRefinements(e.name)),0===(r=t.getHierarchicalRefinement(e.name)).length&&(t=t.toggleHierarchicalFacetRefinement(e.name,e.rootPath))}})),t},m.validate=function(e,t){var r=t||{};return e.tagFilters&&r.tagRefinements&&r.tagRefinements.length>0?new Error("[Tags] Cannot switch from the managed tag API to the advanced API. It is probably an error, if it is really what you want, you should first clear the tags with clearTags method."):e.tagRefinements.length>0&&r.tagFilters?new Error("[Tags] Cannot switch from the advanced tag API to the managed API. It is probably an error, if it is not, you should first clear the tags with clearTags method."):e.numericFilters&&r.numericRefinements&&c(r.numericRefinements)?new Error("[Numeric filters] Can't switch from the advanced to the managed API. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):c(e.numericRefinements)&&r.numericFilters?new Error("[Numeric filters] Can't switch from the managed API to the advanced. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):null},m.prototype={constructor:m,clearRefinements:function(e){var t={numericRefinements:this._clearNumericRefinements(e),facetsRefinements:f.clearRefinement(this.facetsRefinements,e,"conjunctiveFacet"),facetsExcludes:f.clearRefinement(this.facetsExcludes,e,"exclude"),disjunctiveFacetsRefinements:f.clearRefinement(this.disjunctiveFacetsRefinements,e,"disjunctiveFacet"),hierarchicalFacetsRefinements:f.clearRefinement(this.hierarchicalFacetsRefinements,e,"hierarchicalFacet")};return t.numericRefinements===this.numericRefinements&&t.facetsRefinements===this.facetsRefinements&&t.facetsExcludes===this.facetsExcludes&&t.disjunctiveFacetsRefinements===this.disjunctiveFacetsRefinements&&t.hierarchicalFacetsRefinements===this.hierarchicalFacetsRefinements?this:this.setQueryParameters(t)},clearTags:function(){return void 0===this.tagFilters&&0===this.tagRefinements.length?this:this.setQueryParameters({tagFilters:void 0,tagRefinements:[]})},setIndex:function(e){return e===this.index?this:this.setQueryParameters({index:e})},setQuery:function(e){return e===this.query?this:this.setQueryParameters({query:e})},setPage:function(e){return e===this.page?this:this.setQueryParameters({page:e})},setFacets:function(e){return this.setQueryParameters({facets:e})},setDisjunctiveFacets:function(e){return this.setQueryParameters({disjunctiveFacets:e})},setHitsPerPage:function(e){return this.hitsPerPage===e?this:this.setQueryParameters({hitsPerPage:e})},setTypoTolerance:function(e){return this.typoTolerance===e?this:this.setQueryParameters({typoTolerance:e})},addNumericRefinement:function(e,t,r){var n=u(r);if(this.isNumericRefined(e,t,n))return this;var i=a({},this.numericRefinements);return i[e]=a({},i[e]),i[e][t]?(i[e][t]=i[e][t].slice(),i[e][t].push(n)):i[e][t]=[n],this.setQueryParameters({numericRefinements:i})},getConjunctiveRefinements:function(e){return this.isConjunctiveFacet(e)&&this.facetsRefinements[e]||[]},getDisjunctiveRefinements:function(e){return this.isDisjunctiveFacet(e)&&this.disjunctiveFacetsRefinements[e]||[]},getHierarchicalRefinement:function(e){return this.hierarchicalFacetsRefinements[e]||[]},getExcludeRefinements:function(e){return this.isConjunctiveFacet(e)&&this.facetsExcludes[e]||[]},removeNumericRefinement:function(e,t,r){var n=r;return void 0!==n?this.isNumericRefined(e,t,n)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(r,i){return i===e&&r.op===t&&l(r.val,u(n))}))}):this:void 0!==t?this.isNumericRefined(e,t)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(r,n){return n===e&&r.op===t}))}):this:this.isNumericRefined(e)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(t,r){return r===e}))}):this},getNumericRefinements:function(e){return this.numericRefinements[e]||{}},getNumericRefinement:function(e,t){return this.numericRefinements[e]&&this.numericRefinements[e][t]},_clearNumericRefinements:function(e){if(void 0===e)return c(this.numericRefinements)?{}:this.numericRefinements;if("string"==typeof e)return o(this.numericRefinements,[e]);if("function"==typeof e){var t=!1,r=this.numericRefinements,n=Object.keys(r).reduce((function(n,i){var s=r[i],a={};return s=s||{},Object.keys(s).forEach((function(r){var n=s[r]||[],c=[];n.forEach((function(t){e({val:t,op:r},i,"numeric")||c.push(t)})),c.length!==n.length&&(t=!0),a[r]=c})),n[i]=a,n}),{});return t?n:this.numericRefinements}},addFacet:function(e){return this.isConjunctiveFacet(e)?this:this.setQueryParameters({facets:this.facets.concat([e])})},addDisjunctiveFacet:function(e){return this.isDisjunctiveFacet(e)?this:this.setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.concat([e])})},addHierarchicalFacet:function(e){if(this.isHierarchicalFacet(e.name))throw new Error("Cannot declare two hierarchical facets with the same name: `"+e.name+"`");return this.setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.concat([e])})},addFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return f.isRefined(this.facetsRefinements,e,t)?this:this.setQueryParameters({facetsRefinements:f.addRefinement(this.facetsRefinements,e,t)})},addExcludeRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return f.isRefined(this.facetsExcludes,e,t)?this:this.setQueryParameters({facetsExcludes:f.addRefinement(this.facetsExcludes,e,t)})},addDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return f.isRefined(this.disjunctiveFacetsRefinements,e,t)?this:this.setQueryParameters({disjunctiveFacetsRefinements:f.addRefinement(this.disjunctiveFacetsRefinements,e,t)})},addTagRefinement:function(e){if(this.isTagRefined(e))return this;var t={tagRefinements:this.tagRefinements.concat(e)};return this.setQueryParameters(t)},removeFacet:function(e){return this.isConjunctiveFacet(e)?this.clearRefinements(e).setQueryParameters({facets:this.facets.filter((function(t){return t!==e}))}):this},removeDisjunctiveFacet:function(e){return this.isDisjunctiveFacet(e)?this.clearRefinements(e).setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.filter((function(t){return t!==e}))}):this},removeHierarchicalFacet:function(e){return this.isHierarchicalFacet(e)?this.clearRefinements(e).setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.filter((function(t){return t.name!==e}))}):this},removeFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return f.isRefined(this.facetsRefinements,e,t)?this.setQueryParameters({facetsRefinements:f.removeRefinement(this.facetsRefinements,e,t)}):this},removeExcludeRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return f.isRefined(this.facetsExcludes,e,t)?this.setQueryParameters({facetsExcludes:f.removeRefinement(this.facetsExcludes,e,t)}):this},removeDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return f.isRefined(this.disjunctiveFacetsRefinements,e,t)?this.setQueryParameters({disjunctiveFacetsRefinements:f.removeRefinement(this.disjunctiveFacetsRefinements,e,t)}):this},removeTagRefinement:function(e){if(!this.isTagRefined(e))return this;var t={tagRefinements:this.tagRefinements.filter((function(t){return t!==e}))};return this.setQueryParameters(t)},toggleRefinement:function(e,t){return this.toggleFacetRefinement(e,t)},toggleFacetRefinement:function(e,t){if(this.isHierarchicalFacet(e))return this.toggleHierarchicalFacetRefinement(e,t);if(this.isConjunctiveFacet(e))return this.toggleConjunctiveFacetRefinement(e,t);if(this.isDisjunctiveFacet(e))return this.toggleDisjunctiveFacetRefinement(e,t);throw new Error("Cannot refine the undeclared facet "+e+"; it should be added to the helper options facets, disjunctiveFacets or hierarchicalFacets")},toggleConjunctiveFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsRefinements:f.toggleRefinement(this.facetsRefinements,e,t)})},toggleExcludeFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsExcludes:f.toggleRefinement(this.facetsExcludes,e,t)})},toggleDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return this.setQueryParameters({disjunctiveFacetsRefinements:f.toggleRefinement(this.disjunctiveFacetsRefinements,e,t)})},toggleHierarchicalFacetRefinement:function(e,t){if(!this.isHierarchicalFacet(e))throw new Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration");var r=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e)),i={};return void 0!==this.hierarchicalFacetsRefinements[e]&&this.hierarchicalFacetsRefinements[e].length>0&&(this.hierarchicalFacetsRefinements[e][0]===t||0===this.hierarchicalFacetsRefinements[e][0].indexOf(t+r))?-1===t.indexOf(r)?i[e]=[]:i[e]=[t.slice(0,t.lastIndexOf(r))]:i[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:n({},i,this.hierarchicalFacetsRefinements)})},addHierarchicalFacetRefinement:function(e,t){if(this.isHierarchicalFacetRefined(e))throw new Error(e+" is already refined.");if(!this.isHierarchicalFacet(e))throw new Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration.");var r={};return r[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:n({},r,this.hierarchicalFacetsRefinements)})},removeHierarchicalFacetRefinement:function(e){if(!this.isHierarchicalFacetRefined(e))return this;var t={};return t[e]=[],this.setQueryParameters({hierarchicalFacetsRefinements:n({},t,this.hierarchicalFacetsRefinements)})},toggleTagRefinement:function(e){return this.isTagRefined(e)?this.removeTagRefinement(e):this.addTagRefinement(e)},isDisjunctiveFacet:function(e){return this.disjunctiveFacets.indexOf(e)>-1},isHierarchicalFacet:function(e){return void 0!==this.getHierarchicalFacetByName(e)},isConjunctiveFacet:function(e){return this.facets.indexOf(e)>-1},isFacetRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&f.isRefined(this.facetsRefinements,e,t)},isExcludeRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&f.isRefined(this.facetsExcludes,e,t)},isDisjunctiveFacetRefined:function(e,t){return!!this.isDisjunctiveFacet(e)&&f.isRefined(this.disjunctiveFacetsRefinements,e,t)},isHierarchicalFacetRefined:function(e,t){if(!this.isHierarchicalFacet(e))return!1;var r=this.getHierarchicalRefinement(e);return t?-1!==r.indexOf(t):r.length>0},isNumericRefined:function(e,t,r){if(void 0===r&&void 0===t)return Boolean(this.numericRefinements[e]);var n=this.numericRefinements[e]&&void 0!==this.numericRefinements[e][t];if(void 0===r||!n)return n;var s,a,c=u(r),o=void 0!==(s=this.numericRefinements[e][t],a=c,i(s,(function(e){return l(e,a)})));return n&&o},isTagRefined:function(e){return-1!==this.tagRefinements.indexOf(e)},getRefinedDisjunctiveFacets:function(){var e=this,t=s(Object.keys(this.numericRefinements).filter((function(t){return Object.keys(e.numericRefinements[t]).length>0})),this.disjunctiveFacets);return Object.keys(this.disjunctiveFacetsRefinements).filter((function(t){return e.disjunctiveFacetsRefinements[t].length>0})).concat(t).concat(this.getRefinedHierarchicalFacets()).sort()},getRefinedHierarchicalFacets:function(){var e=this;return s(this.hierarchicalFacets.map((function(e){return e.name})),Object.keys(this.hierarchicalFacetsRefinements).filter((function(t){return e.hierarchicalFacetsRefinements[t].length>0}))).sort()},getUnrefinedDisjunctiveFacets:function(){var e=this.getRefinedDisjunctiveFacets();return this.disjunctiveFacets.filter((function(t){return-1===e.indexOf(t)}))},managedParameters:["index","facets","disjunctiveFacets","facetsRefinements","hierarchicalFacets","facetsExcludes","disjunctiveFacetsRefinements","numericRefinements","tagRefinements","hierarchicalFacetsRefinements"],getQueryParams:function(){var e=this.managedParameters,t={},r=this;return Object.keys(this).forEach((function(n){var i=r[n];-1===e.indexOf(n)&&void 0!==i&&(t[n]=i)})),t},setQueryParameter:function(e,t){if(this[e]===t)return this;var r={};return r[e]=t,this.setQueryParameters(r)},setQueryParameters:function(e){if(!e)return this;var t=m.validate(this,e);if(t)throw t;var r=this,n=m._parseNumbers(e),i=Object.keys(this).reduce((function(e,t){return e[t]=r[t],e}),{}),s=Object.keys(n).reduce((function(e,t){var r=void 0!==e[t],i=void 0!==n[t];return r&&!i?o(e,[t]):(i&&(e[t]=n[t]),e)}),i);return new this.constructor(s)},resetPage:function(){return void 0===this.page?this:this.setPage(0)},_getHierarchicalFacetSortBy:function(e){return e.sortBy||["isRefined:desc","name:asc"]},_getHierarchicalFacetSeparator:function(e){return e.separator||" > "},_getHierarchicalRootPath:function(e){return e.rootPath||null},_getHierarchicalShowParentLevel:function(e){return"boolean"!=typeof e.showParentLevel||e.showParentLevel},getHierarchicalFacetByName:function(e){return i(this.hierarchicalFacets,(function(t){return t.name===e}))},getHierarchicalFacetBreadcrumb:function(e){if(!this.isHierarchicalFacet(e))return[];var t=this.getHierarchicalRefinement(e)[0];if(!t)return[];var r=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e));return t.split(r).map((function(e){return e.trim()}))},toString:function(){return JSON.stringify(this,null,2)}},e.exports=m},77762:(e,t,r)=>{"use strict";e.exports=function(e){return function(t,r){var n=e.hierarchicalFacets[r],u=e.hierarchicalFacetsRefinements[n.name]&&e.hierarchicalFacetsRefinements[n.name][0]||"",h=e._getHierarchicalFacetSeparator(n),f=e._getHierarchicalRootPath(n),l=e._getHierarchicalShowParentLevel(n),m=s(e._getHierarchicalFacetSortBy(n)),d=t.every((function(e){return e.exhaustive})),p=function(e,t,r,n,s){return function(u,h,f){var l=u;if(f>0){var m=0;for(l=u;m{"use strict";var n=r(47004),i=r(27285),s=r(82914),a=r(92902),c=r(71072),o=r(20742),u=r(65901),h=r(1600),f=s.escapeFacetValue,l=s.unescapeFacetValue,m=r(77762);function d(e){var t={};return e.forEach((function(e,r){t[e]=r})),t}function p(e,t,r){t&&t[r]&&(e.stats=t[r])}function v(e,t,r){var s=t[0]||{};this._rawResults=t;var o=this;Object.keys(s).forEach((function(e){o[e]=s[e]}));var h=u({persistHierarchicalRootCount:!1},r);Object.keys(h).forEach((function(e){o[e]=h[e]})),this.processingTimeMS=t.reduce((function(e,t){return void 0===t.processingTimeMS?e:e+t.processingTimeMS}),0),this.disjunctiveFacets=[],this.hierarchicalFacets=e.hierarchicalFacets.map((function(){return[]})),this.facets=[];var f=e.getRefinedDisjunctiveFacets(),v=d(e.facets),g=d(e.disjunctiveFacets),y=1,R=s.facets||{};Object.keys(R).forEach((function(t){var r,n,i=R[t],u=(r=e.hierarchicalFacets,n=t,a(r,(function(e){return(e.attributes||[]).indexOf(n)>-1})));if(u){var h=u.attributes.indexOf(t),f=c(e.hierarchicalFacets,(function(e){return e.name===u.name}));o.hierarchicalFacets[f][h]={attribute:t,data:i,exhaustive:s.exhaustiveFacetsCount}}else{var l,m=-1!==e.disjunctiveFacets.indexOf(t),d=-1!==e.facets.indexOf(t);m&&(l=g[t],o.disjunctiveFacets[l]={name:t,data:i,exhaustive:s.exhaustiveFacetsCount},p(o.disjunctiveFacets[l],s.facets_stats,t)),d&&(l=v[t],o.facets[l]={name:t,data:i,exhaustive:s.exhaustiveFacetsCount},p(o.facets[l],s.facets_stats,t))}})),this.hierarchicalFacets=n(this.hierarchicalFacets),f.forEach((function(r){var n=t[y],a=n&&n.facets?n.facets:{},h=e.getHierarchicalFacetByName(r);Object.keys(a).forEach((function(t){var r,f=a[t];if(h){r=c(e.hierarchicalFacets,(function(e){return e.name===h.name}));var m=c(o.hierarchicalFacets[r],(function(e){return e.attribute===t}));if(-1===m)return;o.hierarchicalFacets[r][m].data=u({},o.hierarchicalFacets[r][m].data,f)}else{r=g[t];var d=s.facets&&s.facets[t]||{};o.disjunctiveFacets[r]={name:t,data:i({},f,d),exhaustive:n.exhaustiveFacetsCount},p(o.disjunctiveFacets[r],n.facets_stats,t),e.disjunctiveFacetsRefinements[t]&&e.disjunctiveFacetsRefinements[t].forEach((function(n){!o.disjunctiveFacets[r].data[n]&&e.disjunctiveFacetsRefinements[t].indexOf(l(n))>-1&&(o.disjunctiveFacets[r].data[n]=0)}))}})),y++})),e.getRefinedHierarchicalFacets().forEach((function(r){var n=e.getHierarchicalFacetByName(r),s=e._getHierarchicalFacetSeparator(n),a=e.getHierarchicalRefinement(r);0===a.length||a[0].split(s).length<2||t.slice(y).forEach((function(t){var r=t&&t.facets?t.facets:{};Object.keys(r).forEach((function(t){var u=r[t],h=c(e.hierarchicalFacets,(function(e){return e.name===n.name})),f=c(o.hierarchicalFacets[h],(function(e){return e.attribute===t}));if(-1!==f){var l={};if(a.length>0&&!o.persistHierarchicalRootCount){var m=a[0].split(s)[0];l[m]=o.hierarchicalFacets[h][f].data[m]}o.hierarchicalFacets[h][f].data=i(l,u,o.hierarchicalFacets[h][f].data)}})),y++}))})),Object.keys(e.facetsExcludes).forEach((function(t){var r=e.facetsExcludes[t],n=v[t];o.facets[n]={name:t,data:R[t],exhaustive:s.exhaustiveFacetsCount},r.forEach((function(e){o.facets[n]=o.facets[n]||{name:t},o.facets[n].data=o.facets[n].data||{},o.facets[n].data[e]=0}))})),this.hierarchicalFacets=this.hierarchicalFacets.map(m(e)),this.facets=n(this.facets),this.disjunctiveFacets=n(this.disjunctiveFacets),this._state=e}function g(e,t){function r(e){return e.name===t}if(e._state.isConjunctiveFacet(t)){var n=a(e.facets,r);return n?Object.keys(n.data).map((function(r){var i=f(r);return{name:r,escapedValue:i,count:n.data[r],isRefined:e._state.isFacetRefined(t,i),isExcluded:e._state.isExcludeRefined(t,r)}})):[]}if(e._state.isDisjunctiveFacet(t)){var i=a(e.disjunctiveFacets,r);return i?Object.keys(i.data).map((function(r){var n=f(r);return{name:r,escapedValue:n,count:i.data[r],isRefined:e._state.isDisjunctiveFacetRefined(t,n)}})):[]}if(e._state.isHierarchicalFacet(t)){var s=a(e.hierarchicalFacets,r);if(!s)return s;var c=e._state.getHierarchicalFacetByName(t),o=e._state._getHierarchicalFacetSeparator(c),u=l(e._state.getHierarchicalRefinement(t)[0]||"");0===u.indexOf(c.rootPath)&&(u=u.replace(c.rootPath+o,""));var h=u.split(o);return h.unshift(t),y(s,h,0),s}}function y(e,t,r){e.isRefined=e.name===(t[r]&&t[r].trim()),e.data&&e.data.forEach((function(e){y(e,t,r+1)}))}function R(e,t,r,n){if(n=n||0,Array.isArray(t))return e(t,r[n]);if(!t.data||0===t.data.length)return t;var s=t.data.map((function(t){return R(e,t,r,n+1)})),a=e(s,r[n]);return i({data:a},t)}function F(e,t){var r=a(e,(function(e){return e.name===t}));return r&&r.stats}function b(e,t,r,n,i){var s=a(i,(function(e){return e.name===r})),c=s&&s.data&&s.data[n]?s.data[n]:0,o=s&&s.exhaustive||!1;return{type:t,attributeName:r,name:n,count:c,exhaustive:o}}v.prototype.getFacetByName=function(e){function t(t){return t.name===e}return a(this.facets,t)||a(this.disjunctiveFacets,t)||a(this.hierarchicalFacets,t)},v.DEFAULT_SORT=["isRefined:desc","count:desc","name:asc"],v.prototype.getFacetValues=function(e,t){var r=g(this,e);if(r){var n,s=i({},t,{sortBy:v.DEFAULT_SORT,facetOrdering:!(t&&t.sortBy)}),a=this;if(Array.isArray(r))n=[e];else n=a._state.getHierarchicalFacetByName(r.name).attributes;return R((function(e,t){if(s.facetOrdering){var r=function(e,t){return e.renderingContent&&e.renderingContent.facetOrdering&&e.renderingContent.facetOrdering.values&&e.renderingContent.facetOrdering.values[t]}(a,t);if(r)return function(e,t){var r=[],n=[],i=t.hide||[],s=(t.order||[]).reduce((function(e,t,r){return e[t]=r,e}),{});e.forEach((function(e){var t=e.path||e.name,a=i.indexOf(t)>-1;a||void 0===s[t]?a||n.push(e):r[s[t]]=e})),r=r.filter((function(e){return e}));var a,c=t.sortRemainingBy;return"hidden"===c?r:(a="alpha"===c?[["path","name"],["asc","asc"]]:[["count"],["desc"]],r.concat(h(n,a[0],a[1])))}(e,r)}if(Array.isArray(s.sortBy)){var n=o(s.sortBy,v.DEFAULT_SORT);return h(e,n[0],n[1])}if("function"==typeof s.sortBy)return function(e,t){return t.sort(e)}(s.sortBy,e);throw new Error("options.sortBy is optional but if defined it must be either an array of string (predicates) or a sorting function")}),r,n)}},v.prototype.getFacetStats=function(e){return this._state.isConjunctiveFacet(e)?F(this.facets,e):this._state.isDisjunctiveFacet(e)?F(this.disjunctiveFacets,e):void 0},v.prototype.getRefinements=function(){var e=this._state,t=this,r=[];return Object.keys(e.facetsRefinements).forEach((function(n){e.facetsRefinements[n].forEach((function(i){r.push(b(e,"facet",n,i,t.facets))}))})),Object.keys(e.facetsExcludes).forEach((function(n){e.facetsExcludes[n].forEach((function(i){r.push(b(e,"exclude",n,i,t.facets))}))})),Object.keys(e.disjunctiveFacetsRefinements).forEach((function(n){e.disjunctiveFacetsRefinements[n].forEach((function(i){r.push(b(e,"disjunctive",n,i,t.disjunctiveFacets))}))})),Object.keys(e.hierarchicalFacetsRefinements).forEach((function(n){e.hierarchicalFacetsRefinements[n].forEach((function(i){r.push(function(e,t,r,n){var i=e.getHierarchicalFacetByName(t),s=e._getHierarchicalFacetSeparator(i),c=r.split(s),o=a(n,(function(e){return e.name===t})),u=c.reduce((function(e,t){var r=e&&a(e.data,(function(e){return e.name===t}));return void 0!==r?r:e}),o),h=u&&u.count||0,f=u&&u.exhaustive||!1,l=u&&u.path||"";return{type:"hierarchical",attributeName:t,name:l,count:h,exhaustive:f}}(e,n,i,t.hierarchicalFacets))}))})),Object.keys(e.numericRefinements).forEach((function(t){var n=e.numericRefinements[t];Object.keys(n).forEach((function(e){n[e].forEach((function(n){r.push({type:"numeric",attributeName:t,name:n,numericValue:n,operator:e})}))}))})),e.tagRefinements.forEach((function(e){r.push({type:"tag",attributeName:"_tags",name:e})})),r},e.exports=v},96924:(e,t,r)=>{"use strict";var n=r(72733),i=r(51817),s=r(82914).escapeFacetValue,a=r(91641),c=r(65901),o=r(19628),u=r(43416),h=r(8110),f=r(54824),l=r(49827),m=r(36872),d=r(61974),p=r(72164),v=r(53235);function g(e,t,r,n){"function"==typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper ("+v+")"),this.setClient(e);var i=r||{};i.index=t,this.state=m.make(i),this.recommendState=new h({params:i.recommendState}),this.lastResults=null,this.lastRecommendResults=null,this._queryId=0,this._recommendQueryId=0,this._lastQueryIdReceived=-1,this._lastRecommendQueryIdReceived=-1,this.derivedHelpers=[],this._currentNbQueries=0,this._currentNbRecommendQueries=0,this._searchResultsOptions=n,this._recommendCache={}}function y(e){if(e<0)throw new Error("Page requested below 0.");return this._change({state:this.state.setPage(e),isPageReset:!1}),this}function R(){return this.state.page}a(g,n),g.prototype.search=function(){return this._search({onlyWithDerivedHelpers:!1}),this},g.prototype.searchOnlyWithDerivedHelpers=function(){return this._search({onlyWithDerivedHelpers:!0}),this},g.prototype.recommend=function(){return this._recommend(),this},g.prototype.getQuery=function(){var e=this.state;return l._getHitsSearchParams(e)},g.prototype.searchOnce=function(e,t){var r=e?this.state.setQueryParameters(e):this.state,n=l._getQueries(r.index,r),i=this;if(this._currentNbQueries++,this.emit("searchOnce",{state:r}),!t)return this.client.search(n).then((function(e){return i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),{content:new d(r,e.results),state:r,_originalResponse:e}}),(function(e){throw i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),e}));this.client.search(n).then((function(e){i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),t(null,new d(r,e.results),r)})).catch((function(e){i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),t(e,null,r)}))},g.prototype.findAnswers=function(e){console.warn("[algoliasearch-helper] answers is no longer supported");var t=this.state,r=this.derivedHelpers[0];if(!r)return Promise.resolve([]);var n=r.getModifiedState(t),i=c({attributesForPrediction:e.attributesForPrediction,nbHits:e.nbHits},{params:u(l._getHitsSearchParams(n),["attributesToSnippet","hitsPerPage","restrictSearchableAttributes","snippetEllipsisText"])}),s="search for answers was called, but this client does not have a function client.initIndex(index).findAnswers";if("function"!=typeof this.client.initIndex)throw new Error(s);var a=this.client.initIndex(n.index);if("function"!=typeof a.findAnswers)throw new Error(s);return a.findAnswers(n.query,e.queryLanguages,i)},g.prototype.searchForFacetValues=function(e,t,r,n){var i="function"==typeof this.client.searchForFacetValues&&"function"!=typeof this.client.searchForFacets,a="function"==typeof this.client.initIndex;if(!i&&!a&&"function"!=typeof this.client.search)throw new Error("search for facet values (searchable) was called, but this client does not have a function client.searchForFacetValues or client.initIndex(index).searchForFacetValues");var c=this.state.setQueryParameters(n||{}),o=c.isDisjunctiveFacet(e),u=l.getSearchForFacetQuery(e,t,r,c);this._currentNbQueries++;var h,f=this;return i?h=this.client.searchForFacetValues([{indexName:c.index,params:u}]):a?h=this.client.initIndex(c.index).searchForFacetValues(u):(delete u.facetName,h=this.client.search([{type:"facet",facet:e,indexName:c.index,params:u}]).then((function(e){return e.results[0]}))),this.emit("searchForFacetValues",{state:c,facet:e,query:t}),h.then((function(t){return f._currentNbQueries--,0===f._currentNbQueries&&f.emit("searchQueueEmpty"),(t=Array.isArray(t)?t[0]:t).facetHits.forEach((function(t){t.escapedValue=s(t.value),t.isRefined=o?c.isDisjunctiveFacetRefined(e,t.escapedValue):c.isFacetRefined(e,t.escapedValue)})),t}),(function(e){throw f._currentNbQueries--,0===f._currentNbQueries&&f.emit("searchQueueEmpty"),e}))},g.prototype.setQuery=function(e){return this._change({state:this.state.resetPage().setQuery(e),isPageReset:!0}),this},g.prototype.clearRefinements=function(e){return this._change({state:this.state.resetPage().clearRefinements(e),isPageReset:!0}),this},g.prototype.clearTags=function(){return this._change({state:this.state.resetPage().clearTags(),isPageReset:!0}),this},g.prototype.addDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},g.prototype.addDisjunctiveRefine=function(){return this.addDisjunctiveFacetRefinement.apply(this,arguments)},g.prototype.addHierarchicalFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addHierarchicalFacetRefinement(e,t),isPageReset:!0}),this},g.prototype.addNumericRefinement=function(e,t,r){return this._change({state:this.state.resetPage().addNumericRefinement(e,t,r),isPageReset:!0}),this},g.prototype.addFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addFacetRefinement(e,t),isPageReset:!0}),this},g.prototype.addRefine=function(){return this.addFacetRefinement.apply(this,arguments)},g.prototype.addFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().addExcludeRefinement(e,t),isPageReset:!0}),this},g.prototype.addExclude=function(){return this.addFacetExclusion.apply(this,arguments)},g.prototype.addTag=function(e){return this._change({state:this.state.resetPage().addTagRefinement(e),isPageReset:!0}),this},g.prototype.addFrequentlyBoughtTogether=function(e){return this._recommendChange({state:this.recommendState.addFrequentlyBoughtTogether(e)}),this},g.prototype.addRelatedProducts=function(e){return this._recommendChange({state:this.recommendState.addRelatedProducts(e)}),this},g.prototype.addTrendingItems=function(e){return this._recommendChange({state:this.recommendState.addTrendingItems(e)}),this},g.prototype.addTrendingFacets=function(e){return this._recommendChange({state:this.recommendState.addTrendingFacets(e)}),this},g.prototype.addLookingSimilar=function(e){return this._recommendChange({state:this.recommendState.addLookingSimilar(e)}),this},g.prototype.removeNumericRefinement=function(e,t,r){return this._change({state:this.state.resetPage().removeNumericRefinement(e,t,r),isPageReset:!0}),this},g.prototype.removeDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},g.prototype.removeDisjunctiveRefine=function(){return this.removeDisjunctiveFacetRefinement.apply(this,arguments)},g.prototype.removeHierarchicalFacetRefinement=function(e){return this._change({state:this.state.resetPage().removeHierarchicalFacetRefinement(e),isPageReset:!0}),this},g.prototype.removeFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeFacetRefinement(e,t),isPageReset:!0}),this},g.prototype.removeRefine=function(){return this.removeFacetRefinement.apply(this,arguments)},g.prototype.removeFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().removeExcludeRefinement(e,t),isPageReset:!0}),this},g.prototype.removeExclude=function(){return this.removeFacetExclusion.apply(this,arguments)},g.prototype.removeTag=function(e){return this._change({state:this.state.resetPage().removeTagRefinement(e),isPageReset:!0}),this},g.prototype.removeFrequentlyBoughtTogether=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this},g.prototype.removeRelatedProducts=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this},g.prototype.removeTrendingItems=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this},g.prototype.removeTrendingFacets=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this},g.prototype.removeLookingSimilar=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this},g.prototype.toggleFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().toggleExcludeFacetRefinement(e,t),isPageReset:!0}),this},g.prototype.toggleExclude=function(){return this.toggleFacetExclusion.apply(this,arguments)},g.prototype.toggleRefinement=function(e,t){return this.toggleFacetRefinement(e,t)},g.prototype.toggleFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().toggleFacetRefinement(e,t),isPageReset:!0}),this},g.prototype.toggleRefine=function(){return this.toggleFacetRefinement.apply(this,arguments)},g.prototype.toggleTag=function(e){return this._change({state:this.state.resetPage().toggleTagRefinement(e),isPageReset:!0}),this},g.prototype.nextPage=function(){var e=this.state.page||0;return this.setPage(e+1)},g.prototype.previousPage=function(){var e=this.state.page||0;return this.setPage(e-1)},g.prototype.setCurrentPage=y,g.prototype.setPage=y,g.prototype.setIndex=function(e){return this._change({state:this.state.resetPage().setIndex(e),isPageReset:!0}),this},g.prototype.setQueryParameter=function(e,t){return this._change({state:this.state.resetPage().setQueryParameter(e,t),isPageReset:!0}),this},g.prototype.setState=function(e){return this._change({state:m.make(e),isPageReset:!1}),this},g.prototype.overrideStateWithoutTriggeringChangeEvent=function(e){return this.state=new m(e),this},g.prototype.hasRefinements=function(e){return!!o(this.state.getNumericRefinements(e))||(this.state.isConjunctiveFacet(e)?this.state.isFacetRefined(e):this.state.isDisjunctiveFacet(e)?this.state.isDisjunctiveFacetRefined(e):!!this.state.isHierarchicalFacet(e)&&this.state.isHierarchicalFacetRefined(e))},g.prototype.isExcluded=function(e,t){return this.state.isExcludeRefined(e,t)},g.prototype.isDisjunctiveRefined=function(e,t){return this.state.isDisjunctiveFacetRefined(e,t)},g.prototype.hasTag=function(e){return this.state.isTagRefined(e)},g.prototype.isTagRefined=function(){return this.hasTagRefinements.apply(this,arguments)},g.prototype.getIndex=function(){return this.state.index},g.prototype.getCurrentPage=R,g.prototype.getPage=R,g.prototype.getTags=function(){return this.state.tagRefinements},g.prototype.getRefinements=function(e){var t=[];if(this.state.isConjunctiveFacet(e))this.state.getConjunctiveRefinements(e).forEach((function(e){t.push({value:e,type:"conjunctive"})})),this.state.getExcludeRefinements(e).forEach((function(e){t.push({value:e,type:"exclude"})}));else if(this.state.isDisjunctiveFacet(e)){this.state.getDisjunctiveRefinements(e).forEach((function(e){t.push({value:e,type:"disjunctive"})}))}var r=this.state.getNumericRefinements(e);return Object.keys(r).forEach((function(e){var n=r[e];t.push({value:n,operator:e,type:"numeric"})})),t},g.prototype.getNumericRefinement=function(e,t){return this.state.getNumericRefinement(e,t)},g.prototype.getHierarchicalFacetBreadcrumb=function(e){return this.state.getHierarchicalFacetBreadcrumb(e)},g.prototype._search=function(e){var t=this.state,r=[],n=[];e.onlyWithDerivedHelpers||(n=l._getQueries(t.index,t),r.push({state:t,queriesCount:n.length,helper:this}),this.emit("search",{state:t,results:this.lastResults}));var i=this.derivedHelpers.map((function(e){var n=e.getModifiedState(t),i=n.index?l._getQueries(n.index,n):[];return r.push({state:n,queriesCount:i.length,helper:e}),e.emit("search",{state:n,results:e.lastResults}),i})),s=Array.prototype.concat.apply(n,i),a=this._queryId++;if(this._currentNbQueries++,!s.length)return Promise.resolve({results:[]}).then(this._dispatchAlgoliaResponse.bind(this,r,a));try{this.client.search(s).then(this._dispatchAlgoliaResponse.bind(this,r,a)).catch(this._dispatchAlgoliaError.bind(this,a))}catch(c){this.emit("error",{error:c})}},g.prototype._recommend=function(){var e=this.state,t=this.recommendState,r=this.getIndex(),n=[{state:t,index:r,helper:this}],i=t.params.map((function(e){return e.$$id}));this.emit("fetch",{recommend:{state:t,results:this.lastRecommendResults}});var s=this._recommendCache,a=this.derivedHelpers.map((function(t){var r=t.getModifiedState(e).index;if(!r)return[];var a=t.getModifiedRecommendState(new h);return n.push({state:a,index:r,helper:t}),i=Array.prototype.concat.apply(i,a.params.map((function(e){return e.$$id}))),t.emit("fetch",{recommend:{state:a,results:t.lastRecommendResults}}),a._buildQueries(r,s)})),c=Array.prototype.concat.apply(this.recommendState._buildQueries(r,s),a);if(0!==c.length)if(c.length>0&&void 0===this.client.getRecommendations)console.warn("Please update algoliasearch/lite to the latest version in order to use recommend widgets.");else{var o=this._recommendQueryId++;this._currentNbRecommendQueries++;try{this.client.getRecommendations(c).then(this._dispatchRecommendResponse.bind(this,o,n,i)).catch(this._dispatchRecommendError.bind(this,o))}catch(u){this.emit("error",{error:u})}}},g.prototype._dispatchAlgoliaResponse=function(e,t,r){var n=this;if(!(t0},g.prototype._change=function(e){var t=e.state,r=e.isPageReset;t!==this.state&&(this.state=t,this.emit("change",{state:this.state,results:this.lastResults,isPageReset:r}))},g.prototype._recommendChange=function(e){var t=e.state;t!==this.recommendState&&(this.recommendState=t,this.emit("recommend:change",{search:{results:this.lastResults,state:this.state},recommend:{results:this.lastRecommendResults,state:this.recommendState}}))},g.prototype.clearCache=function(){return this.client.clearCache&&this.client.clearCache(),this},g.prototype.setClient=function(e){return this.client===e||("function"==typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper ("+v+")"),this.client=e),this},g.prototype.getClient=function(){return this.client},g.prototype.derive=function(e,t){var r=new i(this,e,t);return this.derivedHelpers.push(r),r},g.prototype.detachDerivedHelper=function(e){var t=this.derivedHelpers.indexOf(e);if(-1===t)throw new Error("Derived helper already detached");this.derivedHelpers.splice(t,1)},g.prototype.hasPendingRequests=function(){return this._currentNbQueries>0},e.exports=g},47004:e=>{"use strict";e.exports=function(e){return Array.isArray(e)?e.filter(Boolean):[]}},27285:e=>{"use strict";e.exports=function(){return Array.prototype.slice.call(arguments).reduceRight((function(e,t){return Object.keys(Object(t)).forEach((function(r){void 0!==t[r]&&(void 0!==e[r]&&delete e[r],e[r]=t[r])})),e}),{})}},82914:e=>{"use strict";e.exports={escapeFacetValue:function(e){return"string"!=typeof e?e:String(e).replace(/^-/,"\\-")},unescapeFacetValue:function(e){return"string"!=typeof e?e:e.replace(/^\\-/,"-")}}},92902:e=>{"use strict";e.exports=function(e,t){if(Array.isArray(e))for(var r=0;r{"use strict";e.exports=function(e,t){if(!Array.isArray(e))return-1;for(var r=0;r{e.exports=function(e){return e.reduce((function(e,t){return e.concat(t)}),[])}},20742:(e,t,r)=>{"use strict";var n=r(92902);e.exports=function(e,t){var r=(t||[]).map((function(e){return e.split(":")}));return e.reduce((function(e,t){var i=t.split(":"),s=n(r,(function(e){return e[0]===i[0]}));return i.length>1||!s?(e[0].push(i[0]),e[1].push(i[1]),e):(e[0].push(s[0]),e[1].push(s[1]),e)}),[[],[]])}},91641:e=>{"use strict";e.exports=function(e,t){e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}},20156:e=>{"use strict";e.exports=function(e,t){return e.filter((function(r,n){return t.indexOf(r)>-1&&e.indexOf(r)===n}))}},65901:e=>{"use strict";function t(e){return"function"==typeof e||Array.isArray(e)||"[object Object]"===Object.prototype.toString.call(e)}function r(e,n){if(e===n)return e;for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)&&"__proto__"!==i&&"constructor"!==i){var s=n[i],a=e[i];void 0!==a&&void 0===s||(t(a)&&t(s)?e[i]=r(a,s):e[i]="object"==typeof(c=s)&&null!==c?r(Array.isArray(c)?[]:{},c):c)}var c;return e}e.exports=function(e){t(e)||(e={});for(var n=1,i=arguments.length;n{"use strict";e.exports=function(e){return e&&Object.keys(e).length>0}},43416:e=>{"use strict";e.exports=function(e,t){if(null===e)return{};var r,n,i={},s=Object.keys(e);for(n=0;n=0||(i[r]=e[r]);return i}},1600:e=>{"use strict";function t(e,t){if(e!==t){var r=void 0!==e,n=null===e,i=void 0!==t,s=null===t;if(!s&&e>t||n&&i||!r)return 1;if(!n&&e=n.length?s:"desc"===n[i]?-s:s}return e.index-r.index})),i.map((function(e){return e.value}))}},53610:e=>{"use strict";e.exports=function e(t){if("number"==typeof t)return t;if("string"==typeof t)return parseFloat(t);if(Array.isArray(t))return t.map(e);throw new Error("The value should be a number, a parsable string or an array of those.")}},49827:(e,t,r)=>{"use strict";var n=r(65901);function i(e){return Object.keys(e).sort().reduce((function(t,r){return t[r]=e[r],t}),{})}var s={_getQueries:function(e,t){var r=[];return r.push({indexName:e,params:s._getHitsSearchParams(t)}),t.getRefinedDisjunctiveFacets().forEach((function(n){r.push({indexName:e,params:s._getDisjunctiveFacetSearchParams(t,n)})})),t.getRefinedHierarchicalFacets().forEach((function(n){var i=t.getHierarchicalFacetByName(n),a=t.getHierarchicalRefinement(n),c=t._getHierarchicalFacetSeparator(i);if(a.length>0&&a[0].split(c).length>1){var o=a[0].split(c).slice(0,-1).reduce((function(e,t,r){return e.concat({attribute:i.attributes[r],value:0===r?t:[e[e.length-1].value,t].join(c)})}),[]);o.forEach((function(n,a){var c=s._getDisjunctiveFacetSearchParams(t,n.attribute,0===a);function u(e){return i.attributes.some((function(t){return t===e.split(":")[0]}))}var h=(c.facetFilters||[]).reduce((function(e,t){if(Array.isArray(t)){var r=t.filter((function(e){return!u(e)}));r.length>0&&e.push(r)}return"string"!=typeof t||u(t)||e.push(t),e}),[]),f=o[a-1];a>0?c.facetFilters=h.concat(f.attribute+":"+f.value):h.length>0?c.facetFilters=h:delete c.facetFilters,r.push({indexName:e,params:c})}))}})),r},_getHitsSearchParams:function(e){var t=e.facets.concat(e.disjunctiveFacets).concat(s._getHitsHierarchicalFacetsAttributes(e)).sort(),r=s._getFacetFilters(e),a=s._getNumericFilters(e),c=s._getTagFilters(e),o={};return t.length>0&&(o.facets=t.indexOf("*")>-1?["*"]:t),c.length>0&&(o.tagFilters=c),r.length>0&&(o.facetFilters=r),a.length>0&&(o.numericFilters=a),i(n({},e.getQueryParams(),o))},_getDisjunctiveFacetSearchParams:function(e,t,r){var a=s._getFacetFilters(e,t,r),c=s._getNumericFilters(e,t),o=s._getTagFilters(e),u={hitsPerPage:0,page:0,analytics:!1,clickAnalytics:!1};o.length>0&&(u.tagFilters=o);var h=e.getHierarchicalFacetByName(t);return u.facets=h?s._getDisjunctiveHierarchicalFacetAttribute(e,h,r):t,c.length>0&&(u.numericFilters=c),a.length>0&&(u.facetFilters=a),i(n({},e.getQueryParams(),u))},_getNumericFilters:function(e,t){if(e.numericFilters)return e.numericFilters;var r=[];return Object.keys(e.numericRefinements).forEach((function(n){var i=e.numericRefinements[n]||{};Object.keys(i).forEach((function(e){var s=i[e]||[];t!==n&&s.forEach((function(t){if(Array.isArray(t)){var i=t.map((function(t){return n+e+t}));r.push(i)}else r.push(n+e+t)}))}))})),r},_getTagFilters:function(e){return e.tagFilters?e.tagFilters:e.tagRefinements.join(",")},_getFacetFilters:function(e,t,r){var n=[],i=e.facetsRefinements||{};Object.keys(i).sort().forEach((function(e){(i[e]||[]).slice().sort().forEach((function(t){n.push(e+":"+t)}))}));var s=e.facetsExcludes||{};Object.keys(s).sort().forEach((function(e){(s[e]||[]).sort().forEach((function(t){n.push(e+":-"+t)}))}));var a=e.disjunctiveFacetsRefinements||{};Object.keys(a).sort().forEach((function(e){var r=a[e]||[];if(e!==t&&r&&0!==r.length){var i=[];r.slice().sort().forEach((function(t){i.push(e+":"+t)})),n.push(i)}}));var c=e.hierarchicalFacetsRefinements||{};return Object.keys(c).sort().forEach((function(i){var s=(c[i]||[])[0];if(void 0!==s){var a,o,u=e.getHierarchicalFacetByName(i),h=e._getHierarchicalFacetSeparator(u),f=e._getHierarchicalRootPath(u);if(t===i){if(-1===s.indexOf(h)||!f&&!0===r||f&&f.split(h).length===s.split(h).length)return;f?(o=f.split(h).length-1,s=f):(o=s.split(h).length-2,s=s.slice(0,s.lastIndexOf(h))),a=u.attributes[o]}else o=s.split(h).length-1,a=u.attributes[o];a&&n.push([a+":"+s])}})),n},_getHitsHierarchicalFacetsAttributes:function(e){return e.hierarchicalFacets.reduce((function(t,r){var n=e.getHierarchicalRefinement(r.name)[0];if(!n)return t.push(r.attributes[0]),t;var i=e._getHierarchicalFacetSeparator(r),s=n.split(i).length,a=r.attributes.slice(0,s+1);return t.concat(a)}),[])},_getDisjunctiveHierarchicalFacetAttribute:function(e,t,r){var n=e._getHierarchicalFacetSeparator(t);if(!0===r){var i=e._getHierarchicalRootPath(t),s=0;return i&&(s=i.split(n).length),[t.attributes[s]]}var a=(e.getHierarchicalRefinement(t.name)[0]||"").split(n).length-1;return t.attributes.slice(0,a+1)},getSearchForFacetQuery:function(e,t,r,a){var c=a.isDisjunctiveFacet(e)?a.clearRefinements(e):a,o={facetQuery:t,facetName:e};return"number"==typeof r&&(o.maxFacetHits=r),i(n({},s._getHitsSearchParams(c),o))}};e.exports=s},40171:e=>{"use strict";e.exports=function(e){return null!==e&&/^[a-zA-Z0-9_-]{1,64}$/.test(e)}},72164:(e,t,r)=>{"use strict";var n=r(92902),i=r(21590);e.exports=function(e){var t={};return e.forEach((function(e){e.forEach((function(e,r){t[e.objectID]?t[e.objectID]={indexSum:t[e.objectID].indexSum+r,count:t[e.objectID].count+1}:t[e.objectID]={indexSum:r,count:1}}))})),function(e,t){var r=[];return Object.keys(e).forEach((function(n){e[n].count<2&&(e[n].indexSum+=100),r.push({objectID:n,avgOfIndices:e[n].indexSum/t})})),r.sort((function(e,t){return e.avgOfIndices>t.avgOfIndices?1:-1}))}(t,e.length).reduce((function(t,r){var s=n(i(e),(function(e){return e.objectID===r.objectID}));return s?t.concat(s):t}),[])}},53235:e=>{"use strict";e.exports="3.22.5"},8816:function(e){e.exports=function(){"use strict";function e(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function t(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function r(r){for(var n=1;n=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var r=[],n=!0,i=!1,s=void 0;try{for(var a,c=e[Symbol.iterator]();!(n=(a=c.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){i=!0,s=e}finally{try{n||null==c.return||c.return()}finally{if(i)throw s}}return r}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function s(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return Promise.resolve().then((function(){c();var t=JSON.stringify(e);return s()[t]})).then((function(e){return Promise.all([e?e.value:t(),void 0!==e])})).then((function(e){var t=i(e,2),n=t[0],s=t[1];return Promise.all([n,s||r.miss(n)])})).then((function(e){return i(e,1)[0]}))},set:function(e,t){return Promise.resolve().then((function(){var i=s();return i[JSON.stringify(e)]={timestamp:(new Date).getTime(),value:t},n().setItem(r,JSON.stringify(i)),t}))},delete:function(e){return Promise.resolve().then((function(){var t=s();delete t[JSON.stringify(e)],n().setItem(r,JSON.stringify(t))}))},clear:function(){return Promise.resolve().then((function(){n().removeItem(r)}))}}}function c(e){var t=s(e.caches),r=t.shift();return void 0===r?{get:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return t().then((function(e){return Promise.all([e,r.miss(e)])})).then((function(e){return i(e,1)[0]}))},set:function(e,t){return Promise.resolve(t)},delete:function(e){return Promise.resolve()},clear:function(){return Promise.resolve()}}:{get:function(e,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return r.get(e,n,i).catch((function(){return c({caches:t}).get(e,n,i)}))},set:function(e,n){return r.set(e,n).catch((function(){return c({caches:t}).set(e,n)}))},delete:function(e){return r.delete(e).catch((function(){return c({caches:t}).delete(e)}))},clear:function(){return r.clear().catch((function(){return c({caches:t}).clear()}))}}}function o(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{serializable:!0},t={};return{get:function(r,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}},s=JSON.stringify(r);if(s in t)return Promise.resolve(e.serializable?JSON.parse(t[s]):t[s]);var a=n(),c=i&&i.miss||function(){return Promise.resolve()};return a.then((function(e){return c(e)})).then((function(){return a}))},set:function(r,n){return t[JSON.stringify(r)]=e.serializable?JSON.stringify(n):n,Promise.resolve(n)},delete:function(e){return delete t[JSON.stringify(e)],Promise.resolve()},clear:function(){return t={},Promise.resolve()}}}function u(e){for(var t=e.length-1;t>0;t--){var r=Math.floor(Math.random()*(t+1)),n=e[t];e[t]=e[r],e[r]=n}return e}function h(e,t){return t?(Object.keys(t).forEach((function(r){e[r]=t[r](e)})),e):e}function f(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n0?n:void 0,timeout:r.timeout||t,headers:r.headers||{},queryParameters:r.queryParameters||{},cacheable:r.cacheable}}var d={Read:1,Write:2,Any:3},p=1,v=2,g=3;function y(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p;return r(r({},e),{},{status:t,lastUpdate:Date.now()})}function R(e){return"string"==typeof e?{protocol:"https",url:e,accept:d.Any}:{protocol:e.protocol||"https",url:e.url,accept:e.accept||d.Any}}var F="GET",b="POST";function j(e,t){return Promise.all(t.map((function(t){return e.get(t,(function(){return Promise.resolve(y(t))}))}))).then((function(e){var r=e.filter((function(e){return function(e){return e.status===p||Date.now()-e.lastUpdate>12e4}(e)})),n=e.filter((function(e){return function(e){return e.status===g&&Date.now()-e.lastUpdate<=12e4}(e)})),i=[].concat(s(r),s(n));return{getTimeout:function(e,t){return(0===n.length&&0===e?1:n.length+3+e)*t},statelessHosts:i.length>0?i.map((function(e){return R(e)})):t}}))}function P(e,t,n,i){var a=[],c=function(e,t){if(e.method!==F&&(void 0!==e.data||void 0!==t.data)){var n=Array.isArray(e.data)?e.data:r(r({},e.data),t.data);return JSON.stringify(n)}}(n,i),o=function(e,t){var n=r(r({},e.headers),t.headers),i={};return Object.keys(n).forEach((function(e){var t=n[e];i[e.toLowerCase()]=t})),i}(e,i),u=n.method,h=n.method!==F?{}:r(r({},n.data),i.data),f=r(r(r({"x-algolia-agent":e.userAgent.value},e.queryParameters),h),i.queryParameters),l=0,m=function t(r,s){var h=r.pop();if(void 0===h)throw{name:"RetryError",message:"Unreachable hosts - your application id may be incorrect. If the error persists, please reach out to the Algolia Support team: https://alg.li/support .",transporterStackTrace:E(a)};var m={data:c,headers:o,method:u,url:x(h,n.path,f),connectTimeout:s(l,e.timeouts.connect),responseTimeout:s(l,i.timeout)},d=function(e){var t={request:m,response:e,host:h,triesLeft:r.length};return a.push(t),t},p={onSuccess:function(e){return function(e){try{return JSON.parse(e.content)}catch(t){throw function(e,t){return{name:"DeserializationError",message:e,response:t}}(t.message,e)}}(e)},onRetry:function(n){var i=d(n);return n.isTimedOut&&l++,Promise.all([e.logger.info("Retryable failure",w(i)),e.hostsCache.set(h,y(h,n.isTimedOut?g:v))]).then((function(){return t(r,s)}))},onFail:function(e){throw d(e),function(e,t){var r=e.content,n=e.status,i=r;try{i=JSON.parse(r).message}catch(e){}return function(e,t,r){return{name:"ApiError",message:e,status:t,transporterStackTrace:r}}(i,n,t)}(e,E(a))}};return e.requester.send(m).then((function(e){return function(e,t){return function(e){var t=e.status;return e.isTimedOut||function(e){var t=e.isTimedOut,r=e.status;return!t&&!~~r}(e)||2!=~~(t/100)&&4!=~~(t/100)}(e)?t.onRetry(e):2==~~(e.status/100)?t.onSuccess(e):t.onFail(e)}(e,p)}))};return j(e.hostsCache,t).then((function(e){return m(s(e.statelessHosts).reverse(),e.getTimeout)}))}function _(e){var t={value:"Algolia for JavaScript (".concat(e,")"),add:function(e){var r="; ".concat(e.segment).concat(void 0!==e.version?" (".concat(e.version,")"):"");return-1===t.value.indexOf(r)&&(t.value="".concat(t.value).concat(r)),t}};return t}function x(e,t,r){var n=O(r),i="".concat(e.protocol,"://").concat(e.url,"/").concat("/"===t.charAt(0)?t.substr(1):t);return n.length&&(i+="?".concat(n)),i}function O(e){return Object.keys(e).map((function(t){return f("%s=%s",t,(r=e[t],"[object Object]"===Object.prototype.toString.call(r)||"[object Array]"===Object.prototype.toString.call(r)?JSON.stringify(e[t]):e[t]));var r})).join("&")}function E(e){return e.map((function(e){return w(e)}))}function w(e){var t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return r(r({},e),{},{request:r(r({},e.request),{},{headers:r(r({},e.request.headers),t)})})}var S=function(e){var t=e.appId,n=function(e,t,r){var n={"x-algolia-api-key":r,"x-algolia-application-id":t};return{headers:function(){return e===l.WithinHeaders?n:{}},queryParameters:function(){return e===l.WithinQueryParameters?n:{}}}}(void 0!==e.authMode?e.authMode:l.WithinHeaders,t,e.apiKey),s=function(e){var t=e.hostsCache,r=e.logger,n=e.requester,s=e.requestsCache,a=e.responsesCache,c=e.timeouts,o=e.userAgent,u=e.hosts,h=e.queryParameters,f={hostsCache:t,logger:r,requester:n,requestsCache:s,responsesCache:a,timeouts:c,userAgent:o,headers:e.headers,queryParameters:h,hosts:u.map((function(e){return R(e)})),read:function(e,t){var r=m(t,f.timeouts.read),n=function(){return P(f,f.hosts.filter((function(e){return!!(e.accept&d.Read)})),e,r)};if(!0!==(void 0!==r.cacheable?r.cacheable:e.cacheable))return n();var s={request:e,mappedRequestOptions:r,transporter:{queryParameters:f.queryParameters,headers:f.headers}};return f.responsesCache.get(s,(function(){return f.requestsCache.get(s,(function(){return f.requestsCache.set(s,n()).then((function(e){return Promise.all([f.requestsCache.delete(s),e])}),(function(e){return Promise.all([f.requestsCache.delete(s),Promise.reject(e)])})).then((function(e){var t=i(e,2);return t[0],t[1]}))}))}),{miss:function(e){return f.responsesCache.set(s,e)}})},write:function(e,t){return P(f,f.hosts.filter((function(e){return!!(e.accept&d.Write)})),e,m(t,f.timeouts.write))}};return f}(r(r({hosts:[{url:"".concat(t,"-dsn.algolia.net"),accept:d.Read},{url:"".concat(t,".algolia.net"),accept:d.Write}].concat(u([{url:"".concat(t,"-1.algolianet.com")},{url:"".concat(t,"-2.algolianet.com")},{url:"".concat(t,"-3.algolianet.com")}]))},e),{},{headers:r(r(r({},n.headers()),{"content-type":"application/x-www-form-urlencoded"}),e.headers),queryParameters:r(r({},n.queryParameters()),e.queryParameters)}));return h({transporter:s,appId:t,addAlgoliaAgent:function(e,t){s.userAgent.add({segment:e,version:t})},clearCache:function(){return Promise.all([s.requestsCache.clear(),s.responsesCache.clear()]).then((function(){}))}},e.methods)},A=function(e){return function(t,r){return t.method===F?e.transporter.read(t,r):e.transporter.write(t,r)}},N=function(e){return function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return h({transporter:e.transporter,appId:e.appId,indexName:t},r.methods)}},T=function(e){return function(t,n){var i=t.map((function(e){return r(r({},e),{},{params:O(e.params||{})})}));return e.transporter.read({method:b,path:"1/indexes/*/queries",data:{requests:i},cacheable:!0},n)}},H=function(e){return function(t,i){return Promise.all(t.map((function(t){var s=t.params,a=s.facetName,c=s.facetQuery,o=n(s,["facetName","facetQuery"]);return N(e)(t.indexName,{methods:{searchForFacetValues:I}}).searchForFacetValues(a,c,r(r({},i),o))})))}},Q=function(e){return function(t,r,n){return e.transporter.read({method:b,path:f("1/answers/%s/prediction",e.indexName),data:{query:t,queryLanguages:r},cacheable:!0},n)}},C=function(e){return function(t,r){return e.transporter.read({method:b,path:f("1/indexes/%s/query",e.indexName),data:{query:t},cacheable:!0},r)}},I=function(e){return function(t,r,n){return e.transporter.read({method:b,path:f("1/indexes/%s/facets/%s/query",e.indexName,t),data:{facetQuery:r},cacheable:!0},n)}},D=1,k=2,q=3,L=function(e){return function(t,n){var i=t.map((function(e){return r(r({},e),{},{threshold:e.threshold||0})}));return e.transporter.read({method:b,path:"1/indexes/*/recommendations",data:{requests:i},cacheable:!0},n)}};function V(e,t,n){var i,s={appId:e,apiKey:t,timeouts:{connect:1,read:2,write:30},requester:{send:function(e){return new Promise((function(t){var r=new XMLHttpRequest;r.open(e.method,e.url,!0),Object.keys(e.headers).forEach((function(t){return r.setRequestHeader(t,e.headers[t])}));var n,i=function(e,n){return setTimeout((function(){r.abort(),t({status:0,content:n,isTimedOut:!0})}),1e3*e)},s=i(e.connectTimeout,"Connection timeout");r.onreadystatechange=function(){r.readyState>r.OPENED&&void 0===n&&(clearTimeout(s),n=i(e.responseTimeout,"Socket timeout"))},r.onerror=function(){0===r.status&&(clearTimeout(s),clearTimeout(n),t({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=function(){clearTimeout(s),clearTimeout(n),t({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(e.data)}))}},logger:(i=q,{debug:function(e,t){return D>=i&&console.debug(e,t),Promise.resolve()},info:function(e,t){return k>=i&&console.info(e,t),Promise.resolve()},error:function(e,t){return console.error(e,t),Promise.resolve()}}),responsesCache:o(),requestsCache:o({serializable:!1}),hostsCache:c({caches:[a({key:"".concat("4.24.0","-").concat(e)}),o()]}),userAgent:_("4.24.0").add({segment:"Browser",version:"lite"}),authMode:l.WithinQueryParameters};return S(r(r(r({},s),n),{},{methods:{search:T,searchForFacetValues:H,multipleQueries:T,multipleSearchForFacetValues:H,customRequest:A,initIndex:function(e){return function(t){return N(e)(t,{methods:{search:C,searchForFacetValues:I,findAnswers:Q}})}},getRecommendations:L}}))}return V.version="4.24.0",V}()},53465:(e,t,r)=>{"use strict";r.d(t,{W:()=>u});var n=r(96540),i=r(44586),s=["zero","one","two","few","many","other"];function a(e){return s.filter((function(t){return e.includes(t)}))}var c={locale:"en",pluralForms:a(["one","other"]),select:function(e){return 1===e?"one":"other"}};function o(){var e=(0,i.A)().i18n.currentLocale;return(0,n.useMemo)((function(){try{return t=e,r=new Intl.PluralRules(t),{locale:t,pluralForms:a(r.resolvedOptions().pluralCategories),select:function(e){return r.select(e)}}}catch(n){return console.error('Failed to use Intl.PluralRules for locale "'+e+'".\nDocusaurus will fallback to the default (English) implementation.\nError: '+n.message+"\n"),c}var t,r}),[e])}function u(){var e=o();return{selectMessage:function(t,r){return function(e,t,r){var n=e.split("|");if(1===n.length)return n[0];n.length>r.pluralForms.length&&console.error("For locale="+r.locale+", a maximum of "+r.pluralForms.length+" plural forms are expected ("+r.pluralForms.join(",")+"), but the message contains "+n.length+": "+e);var i=r.select(t),s=r.pluralForms.indexOf(i);return n[Math.min(s,n.length-1)]}(r,t,e)}}}},74604:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>w});var n=r(96540),i=r(34164),s=r(57570),a=r.n(s),c=r(8816),o=r.n(c),u=r(38193),h=r(5260),f=r(28774),l=r(44070),m=r(53465),d=r(24255),p=r(43807),v=r(69024),g=r(20481),y=r(21312),R=r(44586),F=r(38126),b=r(51062),j=r(96300),P=r(51107);const _={searchQueryInput:"searchQueryInput_u2C7",searchVersionInput:"searchVersionInput_m0Ui",searchResultsColumn:"searchResultsColumn_JPFH",algoliaLogo:"algoliaLogo_rT1R",algoliaLogoPathFill:"algoliaLogoPathFill_WdUC",searchResultItem:"searchResultItem_Tv2o",searchResultItemHeading:"searchResultItemHeading_KbCB",searchResultItemPath:"searchResultItemPath_lhe1",searchResultItemSummary:"searchResultItemSummary_AEaO",searchQueryColumn:"searchQueryColumn_RTkw",searchVersionColumn:"searchVersionColumn_ypXd",searchLogoColumn:"searchLogoColumn_rJIA",loadingSpinner:"loadingSpinner_XVxU","loading-spin":"loading-spin_vzvp",loader:"loader_vvXV"};var x=r(74848);function O(e){var t=e.docsSearchVersionsHelpers,r=Object.entries(t.allDocsData).filter((function(e){return e[1].versions.length>1}));return(0,x.jsx)("div",{className:(0,i.A)("col","col--3","padding-left--none",_.searchVersionColumn),children:r.map((function(e){var n=e[0],i=e[1],s=r.length>1?n+": ":"";return(0,x.jsx)("select",{onChange:function(e){return t.setSearchVersion(n,e.target.value)},defaultValue:t.searchVersions[n],className:_.searchVersionInput,children:i.versions.map((function(e,t){return(0,x.jsx)("option",{label:""+s+e.label,value:e.name},t)}))},n)}))})}function E(){var e,t,r,s,c,v,E=(0,R.A)().i18n.currentLocale,w=(0,F.c)().algolia,S=w.appId,A=w.apiKey,N=w.indexName,T=w.contextualSearch,H=(0,b.C)(),Q=(e=(0,m.W)().selectMessage,function(t){return e(t,(0,y.T)({id:"theme.SearchPage.documentsFound.plurals",description:'Pluralized label for "{count} documents found". Use as much plural forms (separated by "|") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)',message:"One document found|{count} documents found"},{count:t}))}),C=(t=(0,l.Gy)(),r=(0,n.useState)((function(){return Object.entries(t).reduce((function(e,t){var r,n=t[0],i=t[1];return Object.assign({},e,((r={})[n]=i.versions[0].name,r))}),{})})),s=r[0],c=r[1],v=Object.values(t).some((function(e){return e.versions.length>1})),{allDocsData:t,versioningEnabled:v,searchVersions:s,setSearchVersion:function(e,t){return c((function(r){var n;return Object.assign({},r,((n={})[e]=t,n))}))}}),I=(0,d.b)(),D=I[0],k=I[1],q={items:[],query:null,totalResults:null,totalPages:null,lastPage:null,hasMore:null,loading:null},L=(0,n.useReducer)((function(e,t){switch(t.type){case"reset":return q;case"loading":return Object.assign({},e,{loading:!0});case"update":return D!==t.value.query?e:Object.assign({},t.value,{items:0===t.value.lastPage?t.value.items:e.items.concat(t.value.items)});case"advance":var r=e.totalPages>e.lastPage+1;return Object.assign({},e,{lastPage:r?e.lastPage+1:e.lastPage,hasMore:r});default:return e}}),q),V=L[0],B=L[1],M=T?["language","docusaurus_tag"]:[],z=o()(S,A),J=a()(z,N,{hitsPerPage:15,advancedSyntax:!0,disjunctiveFacets:M});J.on("result",(function(e){var t=e.results,r=t.query,n=t.hits,i=t.page,s=t.nbHits,a=t.nbPages;if(""!==r&&Array.isArray(n)){var c=function(e){return e.replace(/algolia-docsearch-suggestion--highlight/g,"search-result-match")},o=n.map((function(e){var t=e.url,r=e._highlightResult.hierarchy,n=e._snippetResult,i=void 0===n?{}:n,s=Object.keys(r).map((function(e){return c(r[e].value)}));return{title:s.pop(),url:H(t),summary:i.content?c(i.content.value)+"...":"",breadcrumbs:s}}));B({type:"update",value:{items:o,query:r,totalResults:s,totalPages:a,lastPage:i,hasMore:a>i+1,loading:!1}})}else B({type:"reset"})}));var W=(0,n.useState)(null),U=W[0],$=W[1],K=(0,n.useRef)(0),X=(0,n.useRef)(u.A.canUseIntersectionObserver&&new IntersectionObserver((function(e){var t=e[0],r=t.isIntersecting,n=t.boundingClientRect.y;r&&K.current>n&&B({type:"advance"}),K.current=n}),{threshold:1})),G=function(){return D?(0,y.T)({id:"theme.SearchPage.existingResultsTitle",message:'Search results for "{query}"',description:"The search page title for non-empty query"},{query:D}):(0,y.T)({id:"theme.SearchPage.emptyResultsTitle",message:"Search the documentation",description:"The search page title for empty query"})},Z=(0,p._q)((function(e){void 0===e&&(e=0),T&&(J.addDisjunctiveFacetRefinement("docusaurus_tag","default"),J.addDisjunctiveFacetRefinement("language",E),Object.entries(C.searchVersions).forEach((function(e){var t=e[0],r=e[1];J.addDisjunctiveFacetRefinement("docusaurus_tag","docs-"+t+"-"+r)}))),J.setQuery(D).setPage(e).search()}));return(0,n.useEffect)((function(){if(U){var e=X.current;return e?(e.observe(U),function(){return e.unobserve(U)}):function(){return!0}}}),[U]),(0,n.useEffect)((function(){B({type:"reset"}),D&&(B({type:"loading"}),setTimeout((function(){Z()}),300))}),[D,C.searchVersions,Z]),(0,n.useEffect)((function(){V.lastPage&&0!==V.lastPage&&Z(V.lastPage)}),[Z,V.lastPage]),(0,x.jsxs)(j.A,{children:[(0,x.jsxs)(h.A,{children:[(0,x.jsx)("title",{children:(0,g.s)(G())}),(0,x.jsx)("meta",{property:"robots",content:"noindex, follow"})]}),(0,x.jsxs)("div",{className:"container margin-vert--lg",children:[(0,x.jsx)(P.A,{as:"h1",children:G()}),(0,x.jsxs)("form",{className:"row",onSubmit:function(e){return e.preventDefault()},children:[(0,x.jsx)("div",{className:(0,i.A)("col",_.searchQueryColumn,{"col--9":C.versioningEnabled,"col--12":!C.versioningEnabled}),children:(0,x.jsx)("input",{type:"search",name:"q",className:_.searchQueryInput,placeholder:(0,y.T)({id:"theme.SearchPage.inputPlaceholder",message:"Type your search here",description:"The placeholder for search page input"}),"aria-label":(0,y.T)({id:"theme.SearchPage.inputLabel",message:"Search",description:"The ARIA label for search page input"}),onChange:function(e){return k(e.target.value)},value:D,autoComplete:"off",autoFocus:!0})}),T&&C.versioningEnabled&&(0,x.jsx)(O,{docsSearchVersionsHelpers:C})]}),(0,x.jsxs)("div",{className:"row",children:[(0,x.jsx)("div",{className:(0,i.A)("col","col--8",_.searchResultsColumn),children:!!V.totalResults&&Q(V.totalResults)}),(0,x.jsx)("div",{className:(0,i.A)("col","col--4","text--right",_.searchLogoColumn),children:(0,x.jsx)(f.A,{to:"https://www.algolia.com/","aria-label":(0,y.T)({id:"theme.SearchPage.algoliaLabel",message:"Search by Algolia",description:"The ARIA label for Algolia mention"}),children:(0,x.jsx)("svg",{viewBox:"0 0 168 24",className:_.algoliaLogo,children:(0,x.jsxs)("g",{fill:"none",children:[(0,x.jsx)("path",{className:_.algoliaLogoPathFill,d:"M120.925 18.804c-4.386.02-4.386-3.54-4.386-4.106l-.007-13.336 2.675-.424v13.254c0 .322 0 2.358 1.718 2.364v2.248zm-10.846-2.18c.821 0 1.43-.047 1.855-.129v-2.719a6.334 6.334 0 0 0-1.574-.199 5.7 5.7 0 0 0-.897.069 2.699 2.699 0 0 0-.814.24c-.24.116-.439.28-.582.491-.15.212-.219.335-.219.656 0 .628.219.991.616 1.23s.938.362 1.615.362zm-.233-9.7c.883 0 1.629.109 2.231.328.602.218 1.088.525 1.444.915.363.396.609.922.76 1.483.157.56.232 1.175.232 1.85v6.874a32.5 32.5 0 0 1-1.868.314c-.834.123-1.772.185-2.813.185-.69 0-1.327-.069-1.895-.198a4.001 4.001 0 0 1-1.471-.636 3.085 3.085 0 0 1-.951-1.134c-.226-.465-.343-1.12-.343-1.803 0-.656.13-1.073.384-1.525a3.24 3.24 0 0 1 1.047-1.106c.445-.287.95-.492 1.532-.615a8.8 8.8 0 0 1 1.82-.185 8.404 8.404 0 0 1 1.972.24v-.438c0-.307-.035-.6-.11-.874a1.88 1.88 0 0 0-.384-.73 1.784 1.784 0 0 0-.724-.493 3.164 3.164 0 0 0-1.143-.205c-.616 0-1.177.075-1.69.164a7.735 7.735 0 0 0-1.26.307l-.321-2.192c.335-.117.834-.233 1.478-.349a10.98 10.98 0 0 1 2.073-.178zm52.842 9.626c.822 0 1.43-.048 1.854-.13V13.7a6.347 6.347 0 0 0-1.574-.199c-.294 0-.595.021-.896.069a2.7 2.7 0 0 0-.814.24 1.46 1.46 0 0 0-.582.491c-.15.212-.218.335-.218.656 0 .628.218.991.615 1.23.404.245.938.362 1.615.362zm-.226-9.694c.883 0 1.629.108 2.231.327.602.219 1.088.526 1.444.915.355.39.609.923.759 1.483a6.8 6.8 0 0 1 .233 1.852v6.873c-.41.088-1.034.19-1.868.314-.834.123-1.772.184-2.813.184-.69 0-1.327-.068-1.895-.198a4.001 4.001 0 0 1-1.471-.635 3.085 3.085 0 0 1-.951-1.134c-.226-.465-.343-1.12-.343-1.804 0-.656.13-1.073.384-1.524.26-.45.608-.82 1.047-1.107.445-.286.95-.491 1.532-.614a8.803 8.803 0 0 1 2.751-.13c.329.034.671.096 1.04.185v-.437a3.3 3.3 0 0 0-.109-.875 1.873 1.873 0 0 0-.384-.731 1.784 1.784 0 0 0-.724-.492 3.165 3.165 0 0 0-1.143-.205c-.616 0-1.177.075-1.69.164a7.75 7.75 0 0 0-1.26.307l-.321-2.193c.335-.116.834-.232 1.478-.348a11.633 11.633 0 0 1 2.073-.177zm-8.034-1.271a1.626 1.626 0 0 1-1.628-1.62c0-.895.725-1.62 1.628-1.62.904 0 1.63.725 1.63 1.62 0 .895-.733 1.62-1.63 1.62zm1.348 13.22h-2.689V7.27l2.69-.423v11.956zm-4.714 0c-4.386.02-4.386-3.54-4.386-4.107l-.008-13.336 2.676-.424v13.254c0 .322 0 2.358 1.718 2.364v2.248zm-8.698-5.903c0-1.156-.253-2.119-.746-2.788-.493-.677-1.183-1.01-2.067-1.01-.882 0-1.574.333-2.065 1.01-.493.676-.733 1.632-.733 2.788 0 1.168.246 1.953.74 2.63.492.683 1.183 1.018 2.066 1.018.882 0 1.574-.342 2.067-1.019.492-.683.738-1.46.738-2.63zm2.737-.007c0 .902-.13 1.584-.397 2.33a5.52 5.52 0 0 1-1.128 1.906 4.986 4.986 0 0 1-1.752 1.223c-.685.286-1.739.45-2.265.45-.528-.006-1.574-.157-2.252-.45a5.096 5.096 0 0 1-1.744-1.223c-.487-.527-.863-1.162-1.137-1.906a6.345 6.345 0 0 1-.41-2.33c0-.902.123-1.77.397-2.508a5.554 5.554 0 0 1 1.15-1.892 5.133 5.133 0 0 1 1.75-1.216c.679-.287 1.425-.423 2.232-.423.808 0 1.553.142 2.237.423a4.88 4.88 0 0 1 1.753 1.216 5.644 5.644 0 0 1 1.135 1.892c.287.738.431 1.606.431 2.508zm-20.138 0c0 1.12.246 2.363.738 2.882.493.52 1.13.78 1.91.78.424 0 .828-.062 1.204-.178.377-.116.677-.253.917-.417V9.33a10.476 10.476 0 0 0-1.766-.226c-.971-.028-1.71.37-2.23 1.004-.513.636-.773 1.75-.773 2.788zm7.438 5.274c0 1.824-.466 3.156-1.404 4.004-.936.846-2.367 1.27-4.296 1.27-.705 0-2.17-.137-3.34-.396l.431-2.118c.98.205 2.272.26 2.95.26 1.074 0 1.84-.219 2.299-.656.459-.437.684-1.086.684-1.948v-.437a8.07 8.07 0 0 1-1.047.397c-.43.13-.93.198-1.492.198-.739 0-1.41-.116-2.018-.349a4.206 4.206 0 0 1-1.567-1.025c-.431-.45-.774-1.017-1.013-1.694-.24-.677-.363-1.885-.363-2.773 0-.834.13-1.88.384-2.577.26-.696.629-1.298 1.129-1.796.493-.498 1.095-.881 1.8-1.162a6.605 6.605 0 0 1 2.428-.457c.87 0 1.67.109 2.45.24.78.129 1.444.265 1.985.415V18.17zM6.972 6.677v1.627c-.712-.446-1.52-.67-2.425-.67-.585 0-1.045.13-1.38.391a1.24 1.24 0 0 0-.502 1.03c0 .425.164.765.494 1.02.33.256.835.532 1.516.83.447.192.795.356 1.045.495.25.138.537.332.862.582.324.25.563.548.718.894.154.345.23.741.23 1.188 0 .947-.334 1.691-1.004 2.234-.67.542-1.537.814-2.601.814-1.18 0-2.16-.229-2.936-.686v-1.708c.84.628 1.814.942 2.92.942.585 0 1.048-.136 1.388-.407.34-.271.51-.646.51-1.125 0-.287-.1-.55-.302-.79-.203-.24-.42-.42-.655-.542-.234-.123-.585-.29-1.053-.503a61.27 61.27 0 0 1-.582-.271 13.67 13.67 0 0 1-.55-.287 4.275 4.275 0 0 1-.567-.351 6.92 6.92 0 0 1-.455-.4c-.18-.17-.31-.34-.39-.51-.08-.17-.155-.37-.224-.598a2.553 2.553 0 0 1-.104-.742c0-.915.333-1.638.998-2.17.664-.532 1.523-.798 2.576-.798.968 0 1.793.17 2.473.51zm7.468 5.696v-.287c-.022-.607-.187-1.088-.495-1.444-.309-.357-.75-.535-1.324-.535-.532 0-.99.194-1.373.583-.382.388-.622.949-.717 1.683h3.909zm1.005 2.792v1.404c-.596.34-1.383.51-2.362.51-1.255 0-2.255-.377-3-1.132-.744-.755-1.116-1.744-1.116-2.968 0-1.297.34-2.316 1.021-3.055.68-.74 1.548-1.11 2.6-1.11 1.033 0 1.852.323 2.458.966.606.644.91 1.572.91 2.784 0 .33-.033.676-.096 1.038h-5.314c.107.702.405 1.239.894 1.611.49.372 1.106.558 1.85.558.862 0 1.58-.202 2.155-.606zm6.605-1.77h-1.212c-.596 0-1.045.116-1.349.35-.303.234-.454.532-.454.894 0 .372.117.664.35.877.235.213.575.32 1.022.32.51 0 .912-.142 1.204-.424.293-.281.44-.651.44-1.108v-.91zm-4.068-2.554V9.325c.627-.361 1.457-.542 2.489-.542 2.116 0 3.175 1.026 3.175 3.08V17h-1.548v-.957c-.415.68-1.143 1.02-2.186 1.02-.766 0-1.38-.22-1.843-.661-.462-.442-.694-1.003-.694-1.684 0-.776.293-1.38.878-1.81.585-.431 1.404-.647 2.457-.647h1.34V11.8c0-.554-.133-.971-.399-1.253-.266-.282-.707-.423-1.324-.423a4.07 4.07 0 0 0-2.345.718zm9.333-1.93v1.42c.394-1 1.101-1.5 2.123-1.5.148 0 .313.016.494.048v1.531a1.885 1.885 0 0 0-.75-.143c-.542 0-.989.24-1.34.718-.351.479-.527 1.048-.527 1.707V17h-1.563V8.91h1.563zm5.01 4.084c.022.82.272 1.492.75 2.019.479.526 1.15.79 2.01.79.639 0 1.235-.176 1.788-.527v1.404c-.521.319-1.186.479-1.995.479-1.265 0-2.276-.4-3.031-1.197-.755-.798-1.133-1.792-1.133-2.984 0-1.16.38-2.151 1.14-2.975.761-.825 1.79-1.237 3.088-1.237.702 0 1.346.149 1.93.447v1.436a3.242 3.242 0 0 0-1.77-.495c-.84 0-1.513.266-2.019.798-.505.532-.758 1.213-.758 2.042zM40.24 5.72v4.579c.458-1 1.293-1.5 2.505-1.5.787 0 1.42.245 1.899.734.479.49.718 1.17.718 2.042V17h-1.564v-5.106c0-.553-.14-.98-.422-1.284-.282-.303-.652-.455-1.11-.455-.531 0-1.002.202-1.411.606-.41.405-.615 1.022-.615 1.851V17h-1.563V5.72h1.563zm14.966 10.02c.596 0 1.096-.253 1.5-.758.404-.506.606-1.157.606-1.955 0-.915-.202-1.62-.606-2.114-.404-.495-.92-.742-1.548-.742-.553 0-1.05.224-1.491.67-.442.447-.662 1.133-.662 2.058 0 .958.212 1.67.638 2.138.425.469.946.703 1.563.703zM53.004 5.72v4.42c.574-.894 1.388-1.341 2.44-1.341 1.022 0 1.857.383 2.506 1.149.649.766.973 1.781.973 3.047 0 1.138-.309 2.109-.925 2.912-.617.803-1.463 1.205-2.537 1.205-1.075 0-1.894-.447-2.457-1.34V17h-1.58V5.72h1.58zm9.908 11.104l-3.223-7.913h1.739l1.005 2.632 1.26 3.415c.096-.32.48-1.458 1.15-3.415l.909-2.632h1.66l-2.92 7.866c-.777 2.074-1.963 3.11-3.559 3.11a2.92 2.92 0 0 1-.734-.079v-1.34c.17.042.351.064.543.064 1.032 0 1.755-.57 2.17-1.708z"}),(0,x.jsx)("path",{fill:"#5468FF",d:"M78.988.938h16.594a2.968 2.968 0 0 1 2.966 2.966V20.5a2.967 2.967 0 0 1-2.966 2.964H78.988a2.967 2.967 0 0 1-2.966-2.964V3.897A2.961 2.961 0 0 1 78.988.938z"}),(0,x.jsx)("path",{fill:"white",d:"M89.632 5.967v-.772a.978.978 0 0 0-.978-.977h-2.28a.978.978 0 0 0-.978.977v.793c0 .088.082.15.171.13a7.127 7.127 0 0 1 1.984-.28c.65 0 1.295.088 1.917.259.082.02.164-.04.164-.13m-6.248 1.01l-.39-.389a.977.977 0 0 0-1.382 0l-.465.465a.973.973 0 0 0 0 1.38l.383.383c.062.061.15.047.205-.014.226-.307.472-.601.746-.874.281-.28.568-.526.883-.751.068-.042.075-.137.02-.2m4.16 2.453v3.341c0 .096.104.165.192.117l2.97-1.537c.068-.034.089-.117.055-.184a3.695 3.695 0 0 0-3.08-1.866c-.068 0-.136.054-.136.13m0 8.048a4.489 4.489 0 0 1-4.49-4.482 4.488 4.488 0 0 1 4.49-4.482 4.488 4.488 0 0 1 4.489 4.482 4.484 4.484 0 0 1-4.49 4.482m0-10.85a6.363 6.363 0 1 0 0 12.729 6.37 6.37 0 0 0 6.372-6.368 6.358 6.358 0 0 0-6.371-6.36"})]})})})})]}),V.items.length>0?(0,x.jsx)("main",{children:V.items.map((function(e,t){var r=e.title,n=e.url,s=e.summary,a=e.breadcrumbs;return(0,x.jsxs)("article",{className:_.searchResultItem,children:[(0,x.jsx)(P.A,{as:"h2",className:_.searchResultItemHeading,children:(0,x.jsx)(f.A,{to:n,dangerouslySetInnerHTML:{__html:r}})}),a.length>0&&(0,x.jsx)("nav",{"aria-label":"breadcrumbs",children:(0,x.jsx)("ul",{className:(0,i.A)("breadcrumbs",_.searchResultItemPath),children:a.map((function(e,t){return(0,x.jsx)("li",{className:"breadcrumbs__item",dangerouslySetInnerHTML:{__html:e}},t)}))})}),s&&(0,x.jsx)("p",{className:_.searchResultItemSummary,dangerouslySetInnerHTML:{__html:s}})]},t)}))}):[D&&!V.loading&&(0,x.jsx)("p",{children:(0,x.jsx)(y.A,{id:"theme.SearchPage.noResultsText",description:"The paragraph for empty search result",children:"No results were found"})},"no-results"),!!V.loading&&(0,x.jsx)("div",{className:_.loadingSpinner},"spinner")],V.hasMore&&(0,x.jsx)("div",{className:_.loader,ref:$,children:(0,x.jsx)(y.A,{id:"theme.SearchPage.fetchingNewResults",description:"The paragraph for fetching new search results",children:"Fetching new results..."})})]})]})}function w(){return(0,x.jsx)(v.e3,{className:"search-page-wrapper",children:(0,x.jsx)(E,{})})}}}]); \ No newline at end of file diff --git a/assets/js/1a4e3797.8353dd3a.js.LICENSE.txt b/assets/js/1a4e3797.455ae7cb.js.LICENSE.txt similarity index 100% rename from assets/js/1a4e3797.8353dd3a.js.LICENSE.txt rename to assets/js/1a4e3797.455ae7cb.js.LICENSE.txt diff --git a/assets/js/1a4e3797.8353dd3a.js b/assets/js/1a4e3797.8353dd3a.js deleted file mode 100644 index 541bf503ae29..000000000000 --- a/assets/js/1a4e3797.8353dd3a.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! For license information please see 1a4e3797.8353dd3a.js.LICENSE.txt */ -(self.webpackChunk=self.webpackChunk||[]).push([[2138],{72733:e=>{function t(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(e){return"function"==typeof e}function n(e){return"object"==typeof e&&null!==e}function i(e){return void 0===e}e.exports=t,t.prototype._events=void 0,t.prototype._maxListeners=void 0,t.defaultMaxListeners=10,t.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},t.prototype.emit=function(e){var t,s,a,c,o,u;if(this._events||(this._events={}),"error"===e&&(!this._events.error||n(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var h=new Error('Uncaught, unspecified "error" event. ('+t+")");throw h.context=t,h}if(i(s=this._events[e]))return!1;if(r(s))switch(arguments.length){case 1:s.call(this);break;case 2:s.call(this,arguments[1]);break;case 3:s.call(this,arguments[1],arguments[2]);break;default:c=Array.prototype.slice.call(arguments,1),s.apply(this,c)}else if(n(s))for(c=Array.prototype.slice.call(arguments,1),a=(u=s.slice()).length,o=0;o0&&this._events[e].length>a&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},t.prototype.on=t.prototype.addListener,t.prototype.once=function(e,t){if(!r(t))throw TypeError("listener must be a function");var n=!1;function i(){this.removeListener(e,i),n||(n=!0,t.apply(this,arguments))}return i.listener=t,this.on(e,i),this},t.prototype.removeListener=function(e,t){var i,s,a,c;if(!r(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(a=(i=this._events[e]).length,s=-1,i===t||r(i.listener)&&i.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(n(i)){for(c=a;c-- >0;)if(i[c]===t||i[c].listener&&i[c].listener===t){s=c;break}if(s<0)return this;1===i.length?(i.length=0,delete this._events[e]):i.splice(s,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},t.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(r(n=this._events[e]))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},t.prototype.listeners=function(e){return this._events&&this._events[e]?r(this._events[e])?[this._events[e]]:this._events[e].slice():[]},t.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(r(t))return 1;if(t)return t.length}return 0},t.listenerCount=function(e,t){return e.listenerCount(t)}},74103:(e,t,r)=>{"use strict";var n=r(36571),i=r(19127),s=r(42223),a=r(33371),c=r(67691);function o(e,t,r,i){return new n(e,t,r,i)}o.version=r(16938),o.AlgoliaSearchHelper=n,o.SearchParameters=a,o.RecommendParameters=i,o.SearchResults=c,o.RecommendResults=s,e.exports=o},46732:(e,t,r)=>{"use strict";var n=r(72733);function i(e,t,r){this.main=e,this.fn=t,this.recommendFn=r,this.lastResults=null,this.lastRecommendResults=null}r(73014)(i,n),i.prototype.detach=function(){this.removeAllListeners(),this.main.detachDerivedHelper(this)},i.prototype.getModifiedState=function(e){return this.fn(e)},i.prototype.getModifiedRecommendState=function(e){return this.recommendFn(e)},e.exports=i},19127:e=>{"use strict";function t(e){e=e||{},this.params=e.params||[]}t.prototype={constructor:t,addParams:function(e){var r=this.params.slice();return r.push(e),new t({params:r})},removeParams:function(e){return new t({params:this.params.filter((function(t){return t.$$id!==e}))})},addFrequentlyBoughtTogether:function(e){return this.addParams(Object.assign({},e,{model:"bought-together"}))},addRelatedProducts:function(e){return this.addParams(Object.assign({},e,{model:"related-products"}))},addTrendingItems:function(e){return this.addParams(Object.assign({},e,{model:"trending-items"}))},addTrendingFacets:function(e){return this.addParams(Object.assign({},e,{model:"trending-facets"}))},addLookingSimilar:function(e){return this.addParams(Object.assign({},e,{model:"looking-similar"}))},_buildQueries:function(e,t){return this.params.filter((function(e){return void 0===t[e.$$id]})).map((function(t){var r=Object.assign({},t,{indexName:e,threshold:t.threshold||0});return delete r.$$id,r}))}},e.exports=t},42223:e=>{"use strict";function t(e,t){this._state=e,this._rawResults={};var r=this;e.params.forEach((function(e){var n=e.$$id;r[n]=t[n],r._rawResults[n]=t[n]}))}t.prototype={constructor:t},e.exports=t},44054:(e,t,r)=>{"use strict";var n=r(29110),i=r(40317),s=r(21383),a={addRefinement:function(e,t,r){if(a.isRefined(e,t,r))return e;var i=""+r,s=e[t]?e[t].concat(i):[i],c={};return c[t]=s,n({},c,e)},removeRefinement:function(e,t,r){if(void 0===r)return a.clearRefinement(e,(function(e,r){return t===r}));var n=""+r;return a.clearRefinement(e,(function(e,r){return t===r&&n===e}))},toggleRefinement:function(e,t,r){if(void 0===r)throw new Error("toggleRefinement should be used with a value");return a.isRefined(e,t,r)?a.removeRefinement(e,t,r):a.addRefinement(e,t,r)},clearRefinement:function(e,t,r){if(void 0===t)return i(e)?{}:e;if("string"==typeof t)return s(e,[t]);if("function"==typeof t){var n=!1,a=Object.keys(e).reduce((function(i,s){var a=e[s]||[],c=a.filter((function(e){return!t(e,s,r)}));return c.length!==a.length&&(n=!0),i[s]=c,i}),{});return n?a:e}},isRefined:function(e,t,r){var n=Boolean(e[t])&&e[t].length>0;if(void 0===r||!n)return n;var i=""+r;return-1!==e[t].indexOf(i)}};e.exports=a},33371:(e,t,r)=>{"use strict";var n=r(29110),i=r(20849),s=r(14843),a=r(44728),c=r(40317),o=r(21383),u=r(17507),h=r(72208),f=r(44054);function l(e,t){return Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((function(e,r){return l(t[r],e)})):e===t}function m(e){var t=e?m._parseNumbers(e):{};void 0===t.userToken||h(t.userToken)||console.warn("[algoliasearch-helper] The `userToken` parameter is invalid. This can lead to wrong analytics.\n - Format: [a-zA-Z0-9_-]{1,64}"),this.facets=t.facets||[],this.disjunctiveFacets=t.disjunctiveFacets||[],this.hierarchicalFacets=t.hierarchicalFacets||[],this.facetsRefinements=t.facetsRefinements||{},this.facetsExcludes=t.facetsExcludes||{},this.disjunctiveFacetsRefinements=t.disjunctiveFacetsRefinements||{},this.numericRefinements=t.numericRefinements||{},this.tagRefinements=t.tagRefinements||[],this.hierarchicalFacetsRefinements=t.hierarchicalFacetsRefinements||{};var r=this;Object.keys(t).forEach((function(e){var n=-1!==m.PARAMETERS.indexOf(e),i=void 0!==t[e];!n&&i&&(r[e]=t[e])}))}m.PARAMETERS=Object.keys(new m),m._parseNumbers=function(e){if(e instanceof m)return e;var t={};if(["aroundPrecision","aroundRadius","getRankingInfo","minWordSizefor2Typos","minWordSizefor1Typo","page","maxValuesPerFacet","distinct","minimumAroundRadius","hitsPerPage","minProximity"].forEach((function(r){var n=e[r];if("string"==typeof n){var i=parseFloat(n);t[r]=isNaN(i)?n:i}})),Array.isArray(e.insideBoundingBox)&&(t.insideBoundingBox=e.insideBoundingBox.map((function(e){return Array.isArray(e)?e.map((function(e){return parseFloat(e)})):e}))),e.numericRefinements){var r={};Object.keys(e.numericRefinements).forEach((function(t){var n=e.numericRefinements[t]||{};r[t]={},Object.keys(n).forEach((function(e){var i=n[e].map((function(e){return Array.isArray(e)?e.map((function(e){return"string"==typeof e?parseFloat(e):e})):"string"==typeof e?parseFloat(e):e}));r[t][e]=i}))})),t.numericRefinements=r}return a(e,t)},m.make=function(e){var t=new m(e);return(e.hierarchicalFacets||[]).forEach((function(e){if(e.rootPath){var r=t.getHierarchicalRefinement(e.name);r.length>0&&0!==r[0].indexOf(e.rootPath)&&(t=t.clearRefinements(e.name)),0===(r=t.getHierarchicalRefinement(e.name)).length&&(t=t.toggleHierarchicalFacetRefinement(e.name,e.rootPath))}})),t},m.validate=function(e,t){var r=t||{};return e.tagFilters&&r.tagRefinements&&r.tagRefinements.length>0?new Error("[Tags] Cannot switch from the managed tag API to the advanced API. It is probably an error, if it is really what you want, you should first clear the tags with clearTags method."):e.tagRefinements.length>0&&r.tagFilters?new Error("[Tags] Cannot switch from the advanced tag API to the managed API. It is probably an error, if it is not, you should first clear the tags with clearTags method."):e.numericFilters&&r.numericRefinements&&c(r.numericRefinements)?new Error("[Numeric filters] Can't switch from the advanced to the managed API. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):c(e.numericRefinements)&&r.numericFilters?new Error("[Numeric filters] Can't switch from the managed API to the advanced. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):null},m.prototype={constructor:m,clearRefinements:function(e){var t={numericRefinements:this._clearNumericRefinements(e),facetsRefinements:f.clearRefinement(this.facetsRefinements,e,"conjunctiveFacet"),facetsExcludes:f.clearRefinement(this.facetsExcludes,e,"exclude"),disjunctiveFacetsRefinements:f.clearRefinement(this.disjunctiveFacetsRefinements,e,"disjunctiveFacet"),hierarchicalFacetsRefinements:f.clearRefinement(this.hierarchicalFacetsRefinements,e,"hierarchicalFacet")};return t.numericRefinements===this.numericRefinements&&t.facetsRefinements===this.facetsRefinements&&t.facetsExcludes===this.facetsExcludes&&t.disjunctiveFacetsRefinements===this.disjunctiveFacetsRefinements&&t.hierarchicalFacetsRefinements===this.hierarchicalFacetsRefinements?this:this.setQueryParameters(t)},clearTags:function(){return void 0===this.tagFilters&&0===this.tagRefinements.length?this:this.setQueryParameters({tagFilters:void 0,tagRefinements:[]})},setIndex:function(e){return e===this.index?this:this.setQueryParameters({index:e})},setQuery:function(e){return e===this.query?this:this.setQueryParameters({query:e})},setPage:function(e){return e===this.page?this:this.setQueryParameters({page:e})},setFacets:function(e){return this.setQueryParameters({facets:e})},setDisjunctiveFacets:function(e){return this.setQueryParameters({disjunctiveFacets:e})},setHitsPerPage:function(e){return this.hitsPerPage===e?this:this.setQueryParameters({hitsPerPage:e})},setTypoTolerance:function(e){return this.typoTolerance===e?this:this.setQueryParameters({typoTolerance:e})},addNumericRefinement:function(e,t,r){var n=u(r);if(this.isNumericRefined(e,t,n))return this;var i=a({},this.numericRefinements);return i[e]=a({},i[e]),i[e][t]?(i[e][t]=i[e][t].slice(),i[e][t].push(n)):i[e][t]=[n],this.setQueryParameters({numericRefinements:i})},getConjunctiveRefinements:function(e){return this.isConjunctiveFacet(e)&&this.facetsRefinements[e]||[]},getDisjunctiveRefinements:function(e){return this.isDisjunctiveFacet(e)&&this.disjunctiveFacetsRefinements[e]||[]},getHierarchicalRefinement:function(e){return this.hierarchicalFacetsRefinements[e]||[]},getExcludeRefinements:function(e){return this.isConjunctiveFacet(e)&&this.facetsExcludes[e]||[]},removeNumericRefinement:function(e,t,r){var n=r;return void 0!==n?this.isNumericRefined(e,t,n)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(r,i){return i===e&&r.op===t&&l(r.val,u(n))}))}):this:void 0!==t?this.isNumericRefined(e,t)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(r,n){return n===e&&r.op===t}))}):this:this.isNumericRefined(e)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(t,r){return r===e}))}):this},getNumericRefinements:function(e){return this.numericRefinements[e]||{}},getNumericRefinement:function(e,t){return this.numericRefinements[e]&&this.numericRefinements[e][t]},_clearNumericRefinements:function(e){if(void 0===e)return c(this.numericRefinements)?{}:this.numericRefinements;if("string"==typeof e)return o(this.numericRefinements,[e]);if("function"==typeof e){var t=!1,r=this.numericRefinements,n=Object.keys(r).reduce((function(n,i){var s=r[i],a={};return s=s||{},Object.keys(s).forEach((function(r){var n=s[r]||[],c=[];n.forEach((function(t){e({val:t,op:r},i,"numeric")||c.push(t)})),c.length!==n.length&&(t=!0),a[r]=c})),n[i]=a,n}),{});return t?n:this.numericRefinements}},addFacet:function(e){return this.isConjunctiveFacet(e)?this:this.setQueryParameters({facets:this.facets.concat([e])})},addDisjunctiveFacet:function(e){return this.isDisjunctiveFacet(e)?this:this.setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.concat([e])})},addHierarchicalFacet:function(e){if(this.isHierarchicalFacet(e.name))throw new Error("Cannot declare two hierarchical facets with the same name: `"+e.name+"`");return this.setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.concat([e])})},addFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return f.isRefined(this.facetsRefinements,e,t)?this:this.setQueryParameters({facetsRefinements:f.addRefinement(this.facetsRefinements,e,t)})},addExcludeRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return f.isRefined(this.facetsExcludes,e,t)?this:this.setQueryParameters({facetsExcludes:f.addRefinement(this.facetsExcludes,e,t)})},addDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return f.isRefined(this.disjunctiveFacetsRefinements,e,t)?this:this.setQueryParameters({disjunctiveFacetsRefinements:f.addRefinement(this.disjunctiveFacetsRefinements,e,t)})},addTagRefinement:function(e){if(this.isTagRefined(e))return this;var t={tagRefinements:this.tagRefinements.concat(e)};return this.setQueryParameters(t)},removeFacet:function(e){return this.isConjunctiveFacet(e)?this.clearRefinements(e).setQueryParameters({facets:this.facets.filter((function(t){return t!==e}))}):this},removeDisjunctiveFacet:function(e){return this.isDisjunctiveFacet(e)?this.clearRefinements(e).setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.filter((function(t){return t!==e}))}):this},removeHierarchicalFacet:function(e){return this.isHierarchicalFacet(e)?this.clearRefinements(e).setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.filter((function(t){return t.name!==e}))}):this},removeFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return f.isRefined(this.facetsRefinements,e,t)?this.setQueryParameters({facetsRefinements:f.removeRefinement(this.facetsRefinements,e,t)}):this},removeExcludeRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return f.isRefined(this.facetsExcludes,e,t)?this.setQueryParameters({facetsExcludes:f.removeRefinement(this.facetsExcludes,e,t)}):this},removeDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return f.isRefined(this.disjunctiveFacetsRefinements,e,t)?this.setQueryParameters({disjunctiveFacetsRefinements:f.removeRefinement(this.disjunctiveFacetsRefinements,e,t)}):this},removeTagRefinement:function(e){if(!this.isTagRefined(e))return this;var t={tagRefinements:this.tagRefinements.filter((function(t){return t!==e}))};return this.setQueryParameters(t)},toggleRefinement:function(e,t){return this.toggleFacetRefinement(e,t)},toggleFacetRefinement:function(e,t){if(this.isHierarchicalFacet(e))return this.toggleHierarchicalFacetRefinement(e,t);if(this.isConjunctiveFacet(e))return this.toggleConjunctiveFacetRefinement(e,t);if(this.isDisjunctiveFacet(e))return this.toggleDisjunctiveFacetRefinement(e,t);throw new Error("Cannot refine the undeclared facet "+e+"; it should be added to the helper options facets, disjunctiveFacets or hierarchicalFacets")},toggleConjunctiveFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsRefinements:f.toggleRefinement(this.facetsRefinements,e,t)})},toggleExcludeFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsExcludes:f.toggleRefinement(this.facetsExcludes,e,t)})},toggleDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return this.setQueryParameters({disjunctiveFacetsRefinements:f.toggleRefinement(this.disjunctiveFacetsRefinements,e,t)})},toggleHierarchicalFacetRefinement:function(e,t){if(!this.isHierarchicalFacet(e))throw new Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration");var r=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e)),i={};return void 0!==this.hierarchicalFacetsRefinements[e]&&this.hierarchicalFacetsRefinements[e].length>0&&(this.hierarchicalFacetsRefinements[e][0]===t||0===this.hierarchicalFacetsRefinements[e][0].indexOf(t+r))?-1===t.indexOf(r)?i[e]=[]:i[e]=[t.slice(0,t.lastIndexOf(r))]:i[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:n({},i,this.hierarchicalFacetsRefinements)})},addHierarchicalFacetRefinement:function(e,t){if(this.isHierarchicalFacetRefined(e))throw new Error(e+" is already refined.");if(!this.isHierarchicalFacet(e))throw new Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration.");var r={};return r[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:n({},r,this.hierarchicalFacetsRefinements)})},removeHierarchicalFacetRefinement:function(e){if(!this.isHierarchicalFacetRefined(e))return this;var t={};return t[e]=[],this.setQueryParameters({hierarchicalFacetsRefinements:n({},t,this.hierarchicalFacetsRefinements)})},toggleTagRefinement:function(e){return this.isTagRefined(e)?this.removeTagRefinement(e):this.addTagRefinement(e)},isDisjunctiveFacet:function(e){return this.disjunctiveFacets.indexOf(e)>-1},isHierarchicalFacet:function(e){return void 0!==this.getHierarchicalFacetByName(e)},isConjunctiveFacet:function(e){return this.facets.indexOf(e)>-1},isFacetRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&f.isRefined(this.facetsRefinements,e,t)},isExcludeRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&f.isRefined(this.facetsExcludes,e,t)},isDisjunctiveFacetRefined:function(e,t){return!!this.isDisjunctiveFacet(e)&&f.isRefined(this.disjunctiveFacetsRefinements,e,t)},isHierarchicalFacetRefined:function(e,t){if(!this.isHierarchicalFacet(e))return!1;var r=this.getHierarchicalRefinement(e);return t?-1!==r.indexOf(t):r.length>0},isNumericRefined:function(e,t,r){if(void 0===r&&void 0===t)return Boolean(this.numericRefinements[e]);var n=this.numericRefinements[e]&&void 0!==this.numericRefinements[e][t];if(void 0===r||!n)return n;var s,a,c=u(r),o=void 0!==(s=this.numericRefinements[e][t],a=c,i(s,(function(e){return l(e,a)})));return n&&o},isTagRefined:function(e){return-1!==this.tagRefinements.indexOf(e)},getRefinedDisjunctiveFacets:function(){var e=this,t=s(Object.keys(this.numericRefinements).filter((function(t){return Object.keys(e.numericRefinements[t]).length>0})),this.disjunctiveFacets);return Object.keys(this.disjunctiveFacetsRefinements).filter((function(t){return e.disjunctiveFacetsRefinements[t].length>0})).concat(t).concat(this.getRefinedHierarchicalFacets()).sort()},getRefinedHierarchicalFacets:function(){var e=this;return s(this.hierarchicalFacets.map((function(e){return e.name})),Object.keys(this.hierarchicalFacetsRefinements).filter((function(t){return e.hierarchicalFacetsRefinements[t].length>0}))).sort()},getUnrefinedDisjunctiveFacets:function(){var e=this.getRefinedDisjunctiveFacets();return this.disjunctiveFacets.filter((function(t){return-1===e.indexOf(t)}))},managedParameters:["index","facets","disjunctiveFacets","facetsRefinements","hierarchicalFacets","facetsExcludes","disjunctiveFacetsRefinements","numericRefinements","tagRefinements","hierarchicalFacetsRefinements"],getQueryParams:function(){var e=this.managedParameters,t={},r=this;return Object.keys(this).forEach((function(n){var i=r[n];-1===e.indexOf(n)&&void 0!==i&&(t[n]=i)})),t},setQueryParameter:function(e,t){if(this[e]===t)return this;var r={};return r[e]=t,this.setQueryParameters(r)},setQueryParameters:function(e){if(!e)return this;var t=m.validate(this,e);if(t)throw t;var r=this,n=m._parseNumbers(e),i=Object.keys(this).reduce((function(e,t){return e[t]=r[t],e}),{}),s=Object.keys(n).reduce((function(e,t){var r=void 0!==e[t],i=void 0!==n[t];return r&&!i?o(e,[t]):(i&&(e[t]=n[t]),e)}),i);return new this.constructor(s)},resetPage:function(){return void 0===this.page?this:this.setPage(0)},_getHierarchicalFacetSortBy:function(e){return e.sortBy||["isRefined:desc","name:asc"]},_getHierarchicalFacetSeparator:function(e){return e.separator||" > "},_getHierarchicalRootPath:function(e){return e.rootPath||null},_getHierarchicalShowParentLevel:function(e){return"boolean"!=typeof e.showParentLevel||e.showParentLevel},getHierarchicalFacetByName:function(e){return i(this.hierarchicalFacets,(function(t){return t.name===e}))},getHierarchicalFacetBreadcrumb:function(e){if(!this.isHierarchicalFacet(e))return[];var t=this.getHierarchicalRefinement(e)[0];if(!t)return[];var r=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e));return t.split(r).map((function(e){return e.trim()}))},toString:function(){return JSON.stringify(this,null,2)}},e.exports=m},76673:(e,t,r)=>{"use strict";e.exports=function(e){return function(t,r){var n=e.hierarchicalFacets[r],u=e.hierarchicalFacetsRefinements[n.name]&&e.hierarchicalFacetsRefinements[n.name][0]||"",h=e._getHierarchicalFacetSeparator(n),f=e._getHierarchicalRootPath(n),l=e._getHierarchicalShowParentLevel(n),m=s(e._getHierarchicalFacetSortBy(n)),d=t.every((function(e){return e.exhaustive})),p=function(e,t,r,n,s){return function(u,h,f){var l=u;if(f>0){var m=0;for(l=u;m{"use strict";var n=r(78965),i=r(29110),s=r(2909),a=r(20849),c=r(43917),o=r(7577),u=r(44728),h=r(38601),f=s.escapeFacetValue,l=s.unescapeFacetValue,m=r(76673);function d(e){var t={};return e.forEach((function(e,r){t[e]=r})),t}function p(e,t,r){t&&t[r]&&(e.stats=t[r])}function v(e,t,r){var s=t[0]||{};this._rawResults=t;var o=this;Object.keys(s).forEach((function(e){o[e]=s[e]}));var h=u({persistHierarchicalRootCount:!1},r);Object.keys(h).forEach((function(e){o[e]=h[e]})),this.processingTimeMS=t.reduce((function(e,t){return void 0===t.processingTimeMS?e:e+t.processingTimeMS}),0),this.disjunctiveFacets=[],this.hierarchicalFacets=e.hierarchicalFacets.map((function(){return[]})),this.facets=[];var f=e.getRefinedDisjunctiveFacets(),v=d(e.facets),g=d(e.disjunctiveFacets),y=1,R=s.facets||{};Object.keys(R).forEach((function(t){var r,n,i=R[t],u=(r=e.hierarchicalFacets,n=t,a(r,(function(e){return(e.attributes||[]).indexOf(n)>-1})));if(u){var h=u.attributes.indexOf(t),f=c(e.hierarchicalFacets,(function(e){return e.name===u.name}));o.hierarchicalFacets[f][h]={attribute:t,data:i,exhaustive:s.exhaustiveFacetsCount}}else{var l,m=-1!==e.disjunctiveFacets.indexOf(t),d=-1!==e.facets.indexOf(t);m&&(l=g[t],o.disjunctiveFacets[l]={name:t,data:i,exhaustive:s.exhaustiveFacetsCount},p(o.disjunctiveFacets[l],s.facets_stats,t)),d&&(l=v[t],o.facets[l]={name:t,data:i,exhaustive:s.exhaustiveFacetsCount},p(o.facets[l],s.facets_stats,t))}})),this.hierarchicalFacets=n(this.hierarchicalFacets),f.forEach((function(r){var n=t[y],a=n&&n.facets?n.facets:{},h=e.getHierarchicalFacetByName(r);Object.keys(a).forEach((function(t){var r,f=a[t];if(h){r=c(e.hierarchicalFacets,(function(e){return e.name===h.name}));var m=c(o.hierarchicalFacets[r],(function(e){return e.attribute===t}));if(-1===m)return;o.hierarchicalFacets[r][m].data=u({},o.hierarchicalFacets[r][m].data,f)}else{r=g[t];var d=s.facets&&s.facets[t]||{};o.disjunctiveFacets[r]={name:t,data:i({},f,d),exhaustive:n.exhaustiveFacetsCount},p(o.disjunctiveFacets[r],n.facets_stats,t),e.disjunctiveFacetsRefinements[t]&&e.disjunctiveFacetsRefinements[t].forEach((function(n){!o.disjunctiveFacets[r].data[n]&&e.disjunctiveFacetsRefinements[t].indexOf(l(n))>-1&&(o.disjunctiveFacets[r].data[n]=0)}))}})),y++})),e.getRefinedHierarchicalFacets().forEach((function(r){var n=e.getHierarchicalFacetByName(r),s=e._getHierarchicalFacetSeparator(n),a=e.getHierarchicalRefinement(r);0===a.length||a[0].split(s).length<2||t.slice(y).forEach((function(t){var r=t&&t.facets?t.facets:{};Object.keys(r).forEach((function(t){var u=r[t],h=c(e.hierarchicalFacets,(function(e){return e.name===n.name})),f=c(o.hierarchicalFacets[h],(function(e){return e.attribute===t}));if(-1!==f){var l={};if(a.length>0&&!o.persistHierarchicalRootCount){var m=a[0].split(s)[0];l[m]=o.hierarchicalFacets[h][f].data[m]}o.hierarchicalFacets[h][f].data=i(l,u,o.hierarchicalFacets[h][f].data)}})),y++}))})),Object.keys(e.facetsExcludes).forEach((function(t){var r=e.facetsExcludes[t],n=v[t];o.facets[n]={name:t,data:R[t],exhaustive:s.exhaustiveFacetsCount},r.forEach((function(e){o.facets[n]=o.facets[n]||{name:t},o.facets[n].data=o.facets[n].data||{},o.facets[n].data[e]=0}))})),this.hierarchicalFacets=this.hierarchicalFacets.map(m(e)),this.facets=n(this.facets),this.disjunctiveFacets=n(this.disjunctiveFacets),this._state=e}function g(e,t){function r(e){return e.name===t}if(e._state.isConjunctiveFacet(t)){var n=a(e.facets,r);return n?Object.keys(n.data).map((function(r){var i=f(r);return{name:r,escapedValue:i,count:n.data[r],isRefined:e._state.isFacetRefined(t,i),isExcluded:e._state.isExcludeRefined(t,r)}})):[]}if(e._state.isDisjunctiveFacet(t)){var i=a(e.disjunctiveFacets,r);return i?Object.keys(i.data).map((function(r){var n=f(r);return{name:r,escapedValue:n,count:i.data[r],isRefined:e._state.isDisjunctiveFacetRefined(t,n)}})):[]}if(e._state.isHierarchicalFacet(t)){var s=a(e.hierarchicalFacets,r);if(!s)return s;var c=e._state.getHierarchicalFacetByName(t),o=e._state._getHierarchicalFacetSeparator(c),u=l(e._state.getHierarchicalRefinement(t)[0]||"");0===u.indexOf(c.rootPath)&&(u=u.replace(c.rootPath+o,""));var h=u.split(o);return h.unshift(t),y(s,h,0),s}}function y(e,t,r){e.isRefined=e.name===(t[r]&&t[r].trim()),e.data&&e.data.forEach((function(e){y(e,t,r+1)}))}function R(e,t,r,n){if(n=n||0,Array.isArray(t))return e(t,r[n]);if(!t.data||0===t.data.length)return t;var s=t.data.map((function(t){return R(e,t,r,n+1)})),a=e(s,r[n]);return i({data:a},t)}function F(e,t){var r=a(e,(function(e){return e.name===t}));return r&&r.stats}function b(e,t,r,n,i){var s=a(i,(function(e){return e.name===r})),c=s&&s.data&&s.data[n]?s.data[n]:0,o=s&&s.exhaustive||!1;return{type:t,attributeName:r,name:n,count:c,exhaustive:o}}v.prototype.getFacetByName=function(e){function t(t){return t.name===e}return a(this.facets,t)||a(this.disjunctiveFacets,t)||a(this.hierarchicalFacets,t)},v.DEFAULT_SORT=["isRefined:desc","count:desc","name:asc"],v.prototype.getFacetValues=function(e,t){var r=g(this,e);if(r){var n,s=i({},t,{sortBy:v.DEFAULT_SORT,facetOrdering:!(t&&t.sortBy)}),a=this;if(Array.isArray(r))n=[e];else n=a._state.getHierarchicalFacetByName(r.name).attributes;return R((function(e,t){if(s.facetOrdering){var r=function(e,t){return e.renderingContent&&e.renderingContent.facetOrdering&&e.renderingContent.facetOrdering.values&&e.renderingContent.facetOrdering.values[t]}(a,t);if(r)return function(e,t){var r=[],n=[],i=t.hide||[],s=(t.order||[]).reduce((function(e,t,r){return e[t]=r,e}),{});e.forEach((function(e){var t=e.path||e.name,a=i.indexOf(t)>-1;a||void 0===s[t]?a||n.push(e):r[s[t]]=e})),r=r.filter((function(e){return e}));var a,c=t.sortRemainingBy;return"hidden"===c?r:(a="alpha"===c?[["path","name"],["asc","asc"]]:[["count"],["desc"]],r.concat(h(n,a[0],a[1])))}(e,r)}if(Array.isArray(s.sortBy)){var n=o(s.sortBy,v.DEFAULT_SORT);return h(e,n[0],n[1])}if("function"==typeof s.sortBy)return function(e,t){return t.sort(e)}(s.sortBy,e);throw new Error("options.sortBy is optional but if defined it must be either an array of string (predicates) or a sorting function")}),r,n)}},v.prototype.getFacetStats=function(e){return this._state.isConjunctiveFacet(e)?F(this.facets,e):this._state.isDisjunctiveFacet(e)?F(this.disjunctiveFacets,e):void 0},v.prototype.getRefinements=function(){var e=this._state,t=this,r=[];return Object.keys(e.facetsRefinements).forEach((function(n){e.facetsRefinements[n].forEach((function(i){r.push(b(e,"facet",n,i,t.facets))}))})),Object.keys(e.facetsExcludes).forEach((function(n){e.facetsExcludes[n].forEach((function(i){r.push(b(e,"exclude",n,i,t.facets))}))})),Object.keys(e.disjunctiveFacetsRefinements).forEach((function(n){e.disjunctiveFacetsRefinements[n].forEach((function(i){r.push(b(e,"disjunctive",n,i,t.disjunctiveFacets))}))})),Object.keys(e.hierarchicalFacetsRefinements).forEach((function(n){e.hierarchicalFacetsRefinements[n].forEach((function(i){r.push(function(e,t,r,n){var i=e.getHierarchicalFacetByName(t),s=e._getHierarchicalFacetSeparator(i),c=r.split(s),o=a(n,(function(e){return e.name===t})),u=c.reduce((function(e,t){var r=e&&a(e.data,(function(e){return e.name===t}));return void 0!==r?r:e}),o),h=u&&u.count||0,f=u&&u.exhaustive||!1,l=u&&u.path||"";return{type:"hierarchical",attributeName:t,name:l,count:h,exhaustive:f}}(e,n,i,t.hierarchicalFacets))}))})),Object.keys(e.numericRefinements).forEach((function(t){var n=e.numericRefinements[t];Object.keys(n).forEach((function(e){n[e].forEach((function(n){r.push({type:"numeric",attributeName:t,name:n,numericValue:n,operator:e})}))}))})),e.tagRefinements.forEach((function(e){r.push({type:"tag",attributeName:"_tags",name:e})})),r},e.exports=v},36571:(e,t,r)=>{"use strict";var n=r(72733),i=r(46732),s=r(2909).escapeFacetValue,a=r(73014),c=r(44728),o=r(40317),u=r(21383),h=r(19127),f=r(42223),l=r(49228),m=r(33371),d=r(67691),p=r(57749),v=r(16938);function g(e,t,r,n){"function"==typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper ("+v+")"),this.setClient(e);var i=r||{};i.index=t,this.state=m.make(i),this.recommendState=new h({params:i.recommendState}),this.lastResults=null,this.lastRecommendResults=null,this._queryId=0,this._recommendQueryId=0,this._lastQueryIdReceived=-1,this._lastRecommendQueryIdReceived=-1,this.derivedHelpers=[],this._currentNbQueries=0,this._currentNbRecommendQueries=0,this._searchResultsOptions=n,this._recommendCache={}}function y(e){if(e<0)throw new Error("Page requested below 0.");return this._change({state:this.state.setPage(e),isPageReset:!1}),this}function R(){return this.state.page}a(g,n),g.prototype.search=function(){return this._search({onlyWithDerivedHelpers:!1}),this},g.prototype.searchOnlyWithDerivedHelpers=function(){return this._search({onlyWithDerivedHelpers:!0}),this},g.prototype.recommend=function(){return this._recommend(),this},g.prototype.getQuery=function(){var e=this.state;return l._getHitsSearchParams(e)},g.prototype.searchOnce=function(e,t){var r=e?this.state.setQueryParameters(e):this.state,n=l._getQueries(r.index,r),i=this;if(this._currentNbQueries++,this.emit("searchOnce",{state:r}),!t)return this.client.search(n).then((function(e){return i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),{content:new d(r,e.results),state:r,_originalResponse:e}}),(function(e){throw i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),e}));this.client.search(n).then((function(e){i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),t(null,new d(r,e.results),r)})).catch((function(e){i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),t(e,null,r)}))},g.prototype.findAnswers=function(e){console.warn("[algoliasearch-helper] answers is no longer supported");var t=this.state,r=this.derivedHelpers[0];if(!r)return Promise.resolve([]);var n=r.getModifiedState(t),i=c({attributesForPrediction:e.attributesForPrediction,nbHits:e.nbHits},{params:u(l._getHitsSearchParams(n),["attributesToSnippet","hitsPerPage","restrictSearchableAttributes","snippetEllipsisText"])}),s="search for answers was called, but this client does not have a function client.initIndex(index).findAnswers";if("function"!=typeof this.client.initIndex)throw new Error(s);var a=this.client.initIndex(n.index);if("function"!=typeof a.findAnswers)throw new Error(s);return a.findAnswers(n.query,e.queryLanguages,i)},g.prototype.searchForFacetValues=function(e,t,r,n){var i="function"==typeof this.client.searchForFacetValues&&"function"!=typeof this.client.searchForFacets,a="function"==typeof this.client.initIndex;if(!i&&!a&&"function"!=typeof this.client.search)throw new Error("search for facet values (searchable) was called, but this client does not have a function client.searchForFacetValues or client.initIndex(index).searchForFacetValues");var c=this.state.setQueryParameters(n||{}),o=c.isDisjunctiveFacet(e),u=l.getSearchForFacetQuery(e,t,r,c);this._currentNbQueries++;var h,f=this;return i?h=this.client.searchForFacetValues([{indexName:c.index,params:u}]):a?h=this.client.initIndex(c.index).searchForFacetValues(u):(delete u.facetName,h=this.client.search([{type:"facet",facet:e,indexName:c.index,params:u}]).then((function(e){return e.results[0]}))),this.emit("searchForFacetValues",{state:c,facet:e,query:t}),h.then((function(t){return f._currentNbQueries--,0===f._currentNbQueries&&f.emit("searchQueueEmpty"),(t=Array.isArray(t)?t[0]:t).facetHits.forEach((function(t){t.escapedValue=s(t.value),t.isRefined=o?c.isDisjunctiveFacetRefined(e,t.escapedValue):c.isFacetRefined(e,t.escapedValue)})),t}),(function(e){throw f._currentNbQueries--,0===f._currentNbQueries&&f.emit("searchQueueEmpty"),e}))},g.prototype.setQuery=function(e){return this._change({state:this.state.resetPage().setQuery(e),isPageReset:!0}),this},g.prototype.clearRefinements=function(e){return this._change({state:this.state.resetPage().clearRefinements(e),isPageReset:!0}),this},g.prototype.clearTags=function(){return this._change({state:this.state.resetPage().clearTags(),isPageReset:!0}),this},g.prototype.addDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},g.prototype.addDisjunctiveRefine=function(){return this.addDisjunctiveFacetRefinement.apply(this,arguments)},g.prototype.addHierarchicalFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addHierarchicalFacetRefinement(e,t),isPageReset:!0}),this},g.prototype.addNumericRefinement=function(e,t,r){return this._change({state:this.state.resetPage().addNumericRefinement(e,t,r),isPageReset:!0}),this},g.prototype.addFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addFacetRefinement(e,t),isPageReset:!0}),this},g.prototype.addRefine=function(){return this.addFacetRefinement.apply(this,arguments)},g.prototype.addFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().addExcludeRefinement(e,t),isPageReset:!0}),this},g.prototype.addExclude=function(){return this.addFacetExclusion.apply(this,arguments)},g.prototype.addTag=function(e){return this._change({state:this.state.resetPage().addTagRefinement(e),isPageReset:!0}),this},g.prototype.addFrequentlyBoughtTogether=function(e){return this._recommendChange({state:this.recommendState.addFrequentlyBoughtTogether(e)}),this},g.prototype.addRelatedProducts=function(e){return this._recommendChange({state:this.recommendState.addRelatedProducts(e)}),this},g.prototype.addTrendingItems=function(e){return this._recommendChange({state:this.recommendState.addTrendingItems(e)}),this},g.prototype.addTrendingFacets=function(e){return this._recommendChange({state:this.recommendState.addTrendingFacets(e)}),this},g.prototype.addLookingSimilar=function(e){return this._recommendChange({state:this.recommendState.addLookingSimilar(e)}),this},g.prototype.removeNumericRefinement=function(e,t,r){return this._change({state:this.state.resetPage().removeNumericRefinement(e,t,r),isPageReset:!0}),this},g.prototype.removeDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},g.prototype.removeDisjunctiveRefine=function(){return this.removeDisjunctiveFacetRefinement.apply(this,arguments)},g.prototype.removeHierarchicalFacetRefinement=function(e){return this._change({state:this.state.resetPage().removeHierarchicalFacetRefinement(e),isPageReset:!0}),this},g.prototype.removeFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeFacetRefinement(e,t),isPageReset:!0}),this},g.prototype.removeRefine=function(){return this.removeFacetRefinement.apply(this,arguments)},g.prototype.removeFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().removeExcludeRefinement(e,t),isPageReset:!0}),this},g.prototype.removeExclude=function(){return this.removeFacetExclusion.apply(this,arguments)},g.prototype.removeTag=function(e){return this._change({state:this.state.resetPage().removeTagRefinement(e),isPageReset:!0}),this},g.prototype.removeFrequentlyBoughtTogether=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this},g.prototype.removeRelatedProducts=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this},g.prototype.removeTrendingItems=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this},g.prototype.removeTrendingFacets=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this},g.prototype.removeLookingSimilar=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this},g.prototype.toggleFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().toggleExcludeFacetRefinement(e,t),isPageReset:!0}),this},g.prototype.toggleExclude=function(){return this.toggleFacetExclusion.apply(this,arguments)},g.prototype.toggleRefinement=function(e,t){return this.toggleFacetRefinement(e,t)},g.prototype.toggleFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().toggleFacetRefinement(e,t),isPageReset:!0}),this},g.prototype.toggleRefine=function(){return this.toggleFacetRefinement.apply(this,arguments)},g.prototype.toggleTag=function(e){return this._change({state:this.state.resetPage().toggleTagRefinement(e),isPageReset:!0}),this},g.prototype.nextPage=function(){var e=this.state.page||0;return this.setPage(e+1)},g.prototype.previousPage=function(){var e=this.state.page||0;return this.setPage(e-1)},g.prototype.setCurrentPage=y,g.prototype.setPage=y,g.prototype.setIndex=function(e){return this._change({state:this.state.resetPage().setIndex(e),isPageReset:!0}),this},g.prototype.setQueryParameter=function(e,t){return this._change({state:this.state.resetPage().setQueryParameter(e,t),isPageReset:!0}),this},g.prototype.setState=function(e){return this._change({state:m.make(e),isPageReset:!1}),this},g.prototype.overrideStateWithoutTriggeringChangeEvent=function(e){return this.state=new m(e),this},g.prototype.hasRefinements=function(e){return!!o(this.state.getNumericRefinements(e))||(this.state.isConjunctiveFacet(e)?this.state.isFacetRefined(e):this.state.isDisjunctiveFacet(e)?this.state.isDisjunctiveFacetRefined(e):!!this.state.isHierarchicalFacet(e)&&this.state.isHierarchicalFacetRefined(e))},g.prototype.isExcluded=function(e,t){return this.state.isExcludeRefined(e,t)},g.prototype.isDisjunctiveRefined=function(e,t){return this.state.isDisjunctiveFacetRefined(e,t)},g.prototype.hasTag=function(e){return this.state.isTagRefined(e)},g.prototype.isTagRefined=function(){return this.hasTagRefinements.apply(this,arguments)},g.prototype.getIndex=function(){return this.state.index},g.prototype.getCurrentPage=R,g.prototype.getPage=R,g.prototype.getTags=function(){return this.state.tagRefinements},g.prototype.getRefinements=function(e){var t=[];if(this.state.isConjunctiveFacet(e))this.state.getConjunctiveRefinements(e).forEach((function(e){t.push({value:e,type:"conjunctive"})})),this.state.getExcludeRefinements(e).forEach((function(e){t.push({value:e,type:"exclude"})}));else if(this.state.isDisjunctiveFacet(e)){this.state.getDisjunctiveRefinements(e).forEach((function(e){t.push({value:e,type:"disjunctive"})}))}var r=this.state.getNumericRefinements(e);return Object.keys(r).forEach((function(e){var n=r[e];t.push({value:n,operator:e,type:"numeric"})})),t},g.prototype.getNumericRefinement=function(e,t){return this.state.getNumericRefinement(e,t)},g.prototype.getHierarchicalFacetBreadcrumb=function(e){return this.state.getHierarchicalFacetBreadcrumb(e)},g.prototype._search=function(e){var t=this.state,r=[],n=[];e.onlyWithDerivedHelpers||(n=l._getQueries(t.index,t),r.push({state:t,queriesCount:n.length,helper:this}),this.emit("search",{state:t,results:this.lastResults}));var i=this.derivedHelpers.map((function(e){var n=e.getModifiedState(t),i=n.index?l._getQueries(n.index,n):[];return r.push({state:n,queriesCount:i.length,helper:e}),e.emit("search",{state:n,results:e.lastResults}),i})),s=Array.prototype.concat.apply(n,i),a=this._queryId++;if(this._currentNbQueries++,!s.length)return Promise.resolve({results:[]}).then(this._dispatchAlgoliaResponse.bind(this,r,a));try{this.client.search(s).then(this._dispatchAlgoliaResponse.bind(this,r,a)).catch(this._dispatchAlgoliaError.bind(this,a))}catch(c){this.emit("error",{error:c})}},g.prototype._recommend=function(){var e=this.state,t=this.recommendState,r=this.getIndex(),n=[{state:t,index:r,helper:this}],i=t.params.map((function(e){return e.$$id}));this.emit("fetch",{recommend:{state:t,results:this.lastRecommendResults}});var s=this._recommendCache,a=this.derivedHelpers.map((function(t){var r=t.getModifiedState(e).index;if(!r)return[];var a=t.getModifiedRecommendState(new h);return n.push({state:a,index:r,helper:t}),i=Array.prototype.concat.apply(i,a.params.map((function(e){return e.$$id}))),t.emit("fetch",{recommend:{state:a,results:t.lastRecommendResults}}),a._buildQueries(r,s)})),c=Array.prototype.concat.apply(this.recommendState._buildQueries(r,s),a);if(0!==c.length)if(c.length>0&&void 0===this.client.getRecommendations)console.warn("Please update algoliasearch/lite to the latest version in order to use recommend widgets.");else{var o=this._recommendQueryId++;this._currentNbRecommendQueries++;try{this.client.getRecommendations(c).then(this._dispatchRecommendResponse.bind(this,o,n,i)).catch(this._dispatchRecommendError.bind(this,o))}catch(u){this.emit("error",{error:u})}}},g.prototype._dispatchAlgoliaResponse=function(e,t,r){var n=this;if(!(t0},g.prototype._change=function(e){var t=e.state,r=e.isPageReset;t!==this.state&&(this.state=t,this.emit("change",{state:this.state,results:this.lastResults,isPageReset:r}))},g.prototype._recommendChange=function(e){var t=e.state;t!==this.recommendState&&(this.recommendState=t,this.emit("recommend:change",{search:{results:this.lastResults,state:this.state},recommend:{results:this.lastRecommendResults,state:this.recommendState}}))},g.prototype.clearCache=function(){return this.client.clearCache&&this.client.clearCache(),this},g.prototype.setClient=function(e){return this.client===e||("function"==typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper ("+v+")"),this.client=e),this},g.prototype.getClient=function(){return this.client},g.prototype.derive=function(e,t){var r=new i(this,e,t);return this.derivedHelpers.push(r),r},g.prototype.detachDerivedHelper=function(e){var t=this.derivedHelpers.indexOf(e);if(-1===t)throw new Error("Derived helper already detached");this.derivedHelpers.splice(t,1)},g.prototype.hasPendingRequests=function(){return this._currentNbQueries>0},e.exports=g},78965:e=>{"use strict";e.exports=function(e){return Array.isArray(e)?e.filter(Boolean):[]}},29110:e=>{"use strict";e.exports=function(){return Array.prototype.slice.call(arguments).reduceRight((function(e,t){return Object.keys(Object(t)).forEach((function(r){void 0!==t[r]&&(void 0!==e[r]&&delete e[r],e[r]=t[r])})),e}),{})}},2909:e=>{"use strict";e.exports={escapeFacetValue:function(e){return"string"!=typeof e?e:String(e).replace(/^-/,"\\-")},unescapeFacetValue:function(e){return"string"!=typeof e?e:e.replace(/^\\-/,"-")}}},20849:e=>{"use strict";e.exports=function(e,t){if(Array.isArray(e))for(var r=0;r{"use strict";e.exports=function(e,t){if(!Array.isArray(e))return-1;for(var r=0;r{e.exports=function(e){return e.reduce((function(e,t){return e.concat(t)}),[])}},7577:(e,t,r)=>{"use strict";var n=r(20849);e.exports=function(e,t){var r=(t||[]).map((function(e){return e.split(":")}));return e.reduce((function(e,t){var i=t.split(":"),s=n(r,(function(e){return e[0]===i[0]}));return i.length>1||!s?(e[0].push(i[0]),e[1].push(i[1]),e):(e[0].push(s[0]),e[1].push(s[1]),e)}),[[],[]])}},73014:e=>{"use strict";e.exports=function(e,t){e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}},14843:e=>{"use strict";e.exports=function(e,t){return e.filter((function(r,n){return t.indexOf(r)>-1&&e.indexOf(r)===n}))}},44728:e=>{"use strict";function t(e){return"function"==typeof e||Array.isArray(e)||"[object Object]"===Object.prototype.toString.call(e)}function r(e,n){if(e===n)return e;for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)&&"__proto__"!==i&&"constructor"!==i){var s=n[i],a=e[i];void 0!==a&&void 0===s||(t(a)&&t(s)?e[i]=r(a,s):e[i]="object"==typeof(c=s)&&null!==c?r(Array.isArray(c)?[]:{},c):c)}var c;return e}e.exports=function(e){t(e)||(e={});for(var n=1,i=arguments.length;n{"use strict";e.exports=function(e){return e&&Object.keys(e).length>0}},21383:e=>{"use strict";e.exports=function(e,t){if(null===e)return{};var r,n,i={},s=Object.keys(e);for(n=0;n=0||(i[r]=e[r]);return i}},38601:e=>{"use strict";function t(e,t){if(e!==t){var r=void 0!==e,n=null===e,i=void 0!==t,s=null===t;if(!s&&e>t||n&&i||!r)return 1;if(!n&&e=n.length?s:"desc"===n[i]?-s:s}return e.index-r.index})),i.map((function(e){return e.value}))}},17507:e=>{"use strict";e.exports=function e(t){if("number"==typeof t)return t;if("string"==typeof t)return parseFloat(t);if(Array.isArray(t))return t.map(e);throw new Error("The value should be a number, a parsable string or an array of those.")}},49228:(e,t,r)=>{"use strict";var n=r(44728);function i(e){return Object.keys(e).sort().reduce((function(t,r){return t[r]=e[r],t}),{})}var s={_getQueries:function(e,t){var r=[];return r.push({indexName:e,params:s._getHitsSearchParams(t)}),t.getRefinedDisjunctiveFacets().forEach((function(n){r.push({indexName:e,params:s._getDisjunctiveFacetSearchParams(t,n)})})),t.getRefinedHierarchicalFacets().forEach((function(n){var i=t.getHierarchicalFacetByName(n),a=t.getHierarchicalRefinement(n),c=t._getHierarchicalFacetSeparator(i);if(a.length>0&&a[0].split(c).length>1){var o=a[0].split(c).slice(0,-1).reduce((function(e,t,r){return e.concat({attribute:i.attributes[r],value:0===r?t:[e[e.length-1].value,t].join(c)})}),[]);o.forEach((function(n,a){var c=s._getDisjunctiveFacetSearchParams(t,n.attribute,0===a);function u(e){return i.attributes.some((function(t){return t===e.split(":")[0]}))}var h=(c.facetFilters||[]).reduce((function(e,t){if(Array.isArray(t)){var r=t.filter((function(e){return!u(e)}));r.length>0&&e.push(r)}return"string"!=typeof t||u(t)||e.push(t),e}),[]),f=o[a-1];a>0?c.facetFilters=h.concat(f.attribute+":"+f.value):h.length>0?c.facetFilters=h:delete c.facetFilters,r.push({indexName:e,params:c})}))}})),r},_getHitsSearchParams:function(e){var t=e.facets.concat(e.disjunctiveFacets).concat(s._getHitsHierarchicalFacetsAttributes(e)).sort(),r=s._getFacetFilters(e),a=s._getNumericFilters(e),c=s._getTagFilters(e),o={};return t.length>0&&(o.facets=t.indexOf("*")>-1?["*"]:t),c.length>0&&(o.tagFilters=c),r.length>0&&(o.facetFilters=r),a.length>0&&(o.numericFilters=a),i(n({},e.getQueryParams(),o))},_getDisjunctiveFacetSearchParams:function(e,t,r){var a=s._getFacetFilters(e,t,r),c=s._getNumericFilters(e,t),o=s._getTagFilters(e),u={hitsPerPage:0,page:0,analytics:!1,clickAnalytics:!1};o.length>0&&(u.tagFilters=o);var h=e.getHierarchicalFacetByName(t);return u.facets=h?s._getDisjunctiveHierarchicalFacetAttribute(e,h,r):t,c.length>0&&(u.numericFilters=c),a.length>0&&(u.facetFilters=a),i(n({},e.getQueryParams(),u))},_getNumericFilters:function(e,t){if(e.numericFilters)return e.numericFilters;var r=[];return Object.keys(e.numericRefinements).forEach((function(n){var i=e.numericRefinements[n]||{};Object.keys(i).forEach((function(e){var s=i[e]||[];t!==n&&s.forEach((function(t){if(Array.isArray(t)){var i=t.map((function(t){return n+e+t}));r.push(i)}else r.push(n+e+t)}))}))})),r},_getTagFilters:function(e){return e.tagFilters?e.tagFilters:e.tagRefinements.join(",")},_getFacetFilters:function(e,t,r){var n=[],i=e.facetsRefinements||{};Object.keys(i).sort().forEach((function(e){(i[e]||[]).slice().sort().forEach((function(t){n.push(e+":"+t)}))}));var s=e.facetsExcludes||{};Object.keys(s).sort().forEach((function(e){(s[e]||[]).sort().forEach((function(t){n.push(e+":-"+t)}))}));var a=e.disjunctiveFacetsRefinements||{};Object.keys(a).sort().forEach((function(e){var r=a[e]||[];if(e!==t&&r&&0!==r.length){var i=[];r.slice().sort().forEach((function(t){i.push(e+":"+t)})),n.push(i)}}));var c=e.hierarchicalFacetsRefinements||{};return Object.keys(c).sort().forEach((function(i){var s=(c[i]||[])[0];if(void 0!==s){var a,o,u=e.getHierarchicalFacetByName(i),h=e._getHierarchicalFacetSeparator(u),f=e._getHierarchicalRootPath(u);if(t===i){if(-1===s.indexOf(h)||!f&&!0===r||f&&f.split(h).length===s.split(h).length)return;f?(o=f.split(h).length-1,s=f):(o=s.split(h).length-2,s=s.slice(0,s.lastIndexOf(h))),a=u.attributes[o]}else o=s.split(h).length-1,a=u.attributes[o];a&&n.push([a+":"+s])}})),n},_getHitsHierarchicalFacetsAttributes:function(e){return e.hierarchicalFacets.reduce((function(t,r){var n=e.getHierarchicalRefinement(r.name)[0];if(!n)return t.push(r.attributes[0]),t;var i=e._getHierarchicalFacetSeparator(r),s=n.split(i).length,a=r.attributes.slice(0,s+1);return t.concat(a)}),[])},_getDisjunctiveHierarchicalFacetAttribute:function(e,t,r){var n=e._getHierarchicalFacetSeparator(t);if(!0===r){var i=e._getHierarchicalRootPath(t),s=0;return i&&(s=i.split(n).length),[t.attributes[s]]}var a=(e.getHierarchicalRefinement(t.name)[0]||"").split(n).length-1;return t.attributes.slice(0,a+1)},getSearchForFacetQuery:function(e,t,r,a){var c=a.isDisjunctiveFacet(e)?a.clearRefinements(e):a,o={facetQuery:t,facetName:e};return"number"==typeof r&&(o.maxFacetHits=r),i(n({},s._getHitsSearchParams(c),o))}};e.exports=s},72208:e=>{"use strict";e.exports=function(e){return null!==e&&/^[a-zA-Z0-9_-]{1,64}$/.test(e)}},57749:(e,t,r)=>{"use strict";var n=r(20849),i=r(38657);e.exports=function(e){var t={};return e.forEach((function(e){e.forEach((function(e,r){t[e.objectID]?t[e.objectID]={indexSum:t[e.objectID].indexSum+r,count:t[e.objectID].count+1}:t[e.objectID]={indexSum:r,count:1}}))})),function(e,t){var r=[];return Object.keys(e).forEach((function(n){e[n].count<2&&(e[n].indexSum+=100),r.push({objectID:n,avgOfIndices:e[n].indexSum/t})})),r.sort((function(e,t){return e.avgOfIndices>t.avgOfIndices?1:-1}))}(t,e.length).reduce((function(t,r){var s=n(i(e),(function(e){return e.objectID===r.objectID}));return s?t.concat(s):t}),[])}},16938:e=>{"use strict";e.exports="3.22.5"},83643:function(e){e.exports=function(){"use strict";function e(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function t(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function r(r){for(var n=1;n=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var r=[],n=!0,i=!1,s=void 0;try{for(var a,c=e[Symbol.iterator]();!(n=(a=c.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){i=!0,s=e}finally{try{n||null==c.return||c.return()}finally{if(i)throw s}}return r}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function s(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return Promise.resolve().then((function(){c();var t=JSON.stringify(e);return s()[t]})).then((function(e){return Promise.all([e?e.value:t(),void 0!==e])})).then((function(e){var t=i(e,2),n=t[0],s=t[1];return Promise.all([n,s||r.miss(n)])})).then((function(e){return i(e,1)[0]}))},set:function(e,t){return Promise.resolve().then((function(){var i=s();return i[JSON.stringify(e)]={timestamp:(new Date).getTime(),value:t},n().setItem(r,JSON.stringify(i)),t}))},delete:function(e){return Promise.resolve().then((function(){var t=s();delete t[JSON.stringify(e)],n().setItem(r,JSON.stringify(t))}))},clear:function(){return Promise.resolve().then((function(){n().removeItem(r)}))}}}function c(e){var t=s(e.caches),r=t.shift();return void 0===r?{get:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return t().then((function(e){return Promise.all([e,r.miss(e)])})).then((function(e){return i(e,1)[0]}))},set:function(e,t){return Promise.resolve(t)},delete:function(e){return Promise.resolve()},clear:function(){return Promise.resolve()}}:{get:function(e,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return r.get(e,n,i).catch((function(){return c({caches:t}).get(e,n,i)}))},set:function(e,n){return r.set(e,n).catch((function(){return c({caches:t}).set(e,n)}))},delete:function(e){return r.delete(e).catch((function(){return c({caches:t}).delete(e)}))},clear:function(){return r.clear().catch((function(){return c({caches:t}).clear()}))}}}function o(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{serializable:!0},t={};return{get:function(r,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}},s=JSON.stringify(r);if(s in t)return Promise.resolve(e.serializable?JSON.parse(t[s]):t[s]);var a=n(),c=i&&i.miss||function(){return Promise.resolve()};return a.then((function(e){return c(e)})).then((function(){return a}))},set:function(r,n){return t[JSON.stringify(r)]=e.serializable?JSON.stringify(n):n,Promise.resolve(n)},delete:function(e){return delete t[JSON.stringify(e)],Promise.resolve()},clear:function(){return t={},Promise.resolve()}}}function u(e){for(var t=e.length-1;t>0;t--){var r=Math.floor(Math.random()*(t+1)),n=e[t];e[t]=e[r],e[r]=n}return e}function h(e,t){return t?(Object.keys(t).forEach((function(r){e[r]=t[r](e)})),e):e}function f(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n0?n:void 0,timeout:r.timeout||t,headers:r.headers||{},queryParameters:r.queryParameters||{},cacheable:r.cacheable}}var d={Read:1,Write:2,Any:3},p=1,v=2,g=3;function y(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p;return r(r({},e),{},{status:t,lastUpdate:Date.now()})}function R(e){return"string"==typeof e?{protocol:"https",url:e,accept:d.Any}:{protocol:e.protocol||"https",url:e.url,accept:e.accept||d.Any}}var F="GET",b="POST";function j(e,t){return Promise.all(t.map((function(t){return e.get(t,(function(){return Promise.resolve(y(t))}))}))).then((function(e){var r=e.filter((function(e){return function(e){return e.status===p||Date.now()-e.lastUpdate>12e4}(e)})),n=e.filter((function(e){return function(e){return e.status===g&&Date.now()-e.lastUpdate<=12e4}(e)})),i=[].concat(s(r),s(n));return{getTimeout:function(e,t){return(0===n.length&&0===e?1:n.length+3+e)*t},statelessHosts:i.length>0?i.map((function(e){return R(e)})):t}}))}function P(e,t,n,i){var a=[],c=function(e,t){if(e.method!==F&&(void 0!==e.data||void 0!==t.data)){var n=Array.isArray(e.data)?e.data:r(r({},e.data),t.data);return JSON.stringify(n)}}(n,i),o=function(e,t){var n=r(r({},e.headers),t.headers),i={};return Object.keys(n).forEach((function(e){var t=n[e];i[e.toLowerCase()]=t})),i}(e,i),u=n.method,h=n.method!==F?{}:r(r({},n.data),i.data),f=r(r(r({"x-algolia-agent":e.userAgent.value},e.queryParameters),h),i.queryParameters),l=0,m=function t(r,s){var h=r.pop();if(void 0===h)throw{name:"RetryError",message:"Unreachable hosts - your application id may be incorrect. If the error persists, please reach out to the Algolia Support team: https://alg.li/support .",transporterStackTrace:E(a)};var m={data:c,headers:o,method:u,url:x(h,n.path,f),connectTimeout:s(l,e.timeouts.connect),responseTimeout:s(l,i.timeout)},d=function(e){var t={request:m,response:e,host:h,triesLeft:r.length};return a.push(t),t},p={onSuccess:function(e){return function(e){try{return JSON.parse(e.content)}catch(t){throw function(e,t){return{name:"DeserializationError",message:e,response:t}}(t.message,e)}}(e)},onRetry:function(n){var i=d(n);return n.isTimedOut&&l++,Promise.all([e.logger.info("Retryable failure",w(i)),e.hostsCache.set(h,y(h,n.isTimedOut?g:v))]).then((function(){return t(r,s)}))},onFail:function(e){throw d(e),function(e,t){var r=e.content,n=e.status,i=r;try{i=JSON.parse(r).message}catch(e){}return function(e,t,r){return{name:"ApiError",message:e,status:t,transporterStackTrace:r}}(i,n,t)}(e,E(a))}};return e.requester.send(m).then((function(e){return function(e,t){return function(e){var t=e.status;return e.isTimedOut||function(e){var t=e.isTimedOut,r=e.status;return!t&&!~~r}(e)||2!=~~(t/100)&&4!=~~(t/100)}(e)?t.onRetry(e):2==~~(e.status/100)?t.onSuccess(e):t.onFail(e)}(e,p)}))};return j(e.hostsCache,t).then((function(e){return m(s(e.statelessHosts).reverse(),e.getTimeout)}))}function _(e){var t={value:"Algolia for JavaScript (".concat(e,")"),add:function(e){var r="; ".concat(e.segment).concat(void 0!==e.version?" (".concat(e.version,")"):"");return-1===t.value.indexOf(r)&&(t.value="".concat(t.value).concat(r)),t}};return t}function x(e,t,r){var n=O(r),i="".concat(e.protocol,"://").concat(e.url,"/").concat("/"===t.charAt(0)?t.substr(1):t);return n.length&&(i+="?".concat(n)),i}function O(e){return Object.keys(e).map((function(t){return f("%s=%s",t,(r=e[t],"[object Object]"===Object.prototype.toString.call(r)||"[object Array]"===Object.prototype.toString.call(r)?JSON.stringify(e[t]):e[t]));var r})).join("&")}function E(e){return e.map((function(e){return w(e)}))}function w(e){var t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return r(r({},e),{},{request:r(r({},e.request),{},{headers:r(r({},e.request.headers),t)})})}var S=function(e){var t=e.appId,n=function(e,t,r){var n={"x-algolia-api-key":r,"x-algolia-application-id":t};return{headers:function(){return e===l.WithinHeaders?n:{}},queryParameters:function(){return e===l.WithinQueryParameters?n:{}}}}(void 0!==e.authMode?e.authMode:l.WithinHeaders,t,e.apiKey),s=function(e){var t=e.hostsCache,r=e.logger,n=e.requester,s=e.requestsCache,a=e.responsesCache,c=e.timeouts,o=e.userAgent,u=e.hosts,h=e.queryParameters,f={hostsCache:t,logger:r,requester:n,requestsCache:s,responsesCache:a,timeouts:c,userAgent:o,headers:e.headers,queryParameters:h,hosts:u.map((function(e){return R(e)})),read:function(e,t){var r=m(t,f.timeouts.read),n=function(){return P(f,f.hosts.filter((function(e){return!!(e.accept&d.Read)})),e,r)};if(!0!==(void 0!==r.cacheable?r.cacheable:e.cacheable))return n();var s={request:e,mappedRequestOptions:r,transporter:{queryParameters:f.queryParameters,headers:f.headers}};return f.responsesCache.get(s,(function(){return f.requestsCache.get(s,(function(){return f.requestsCache.set(s,n()).then((function(e){return Promise.all([f.requestsCache.delete(s),e])}),(function(e){return Promise.all([f.requestsCache.delete(s),Promise.reject(e)])})).then((function(e){var t=i(e,2);return t[0],t[1]}))}))}),{miss:function(e){return f.responsesCache.set(s,e)}})},write:function(e,t){return P(f,f.hosts.filter((function(e){return!!(e.accept&d.Write)})),e,m(t,f.timeouts.write))}};return f}(r(r({hosts:[{url:"".concat(t,"-dsn.algolia.net"),accept:d.Read},{url:"".concat(t,".algolia.net"),accept:d.Write}].concat(u([{url:"".concat(t,"-1.algolianet.com")},{url:"".concat(t,"-2.algolianet.com")},{url:"".concat(t,"-3.algolianet.com")}]))},e),{},{headers:r(r(r({},n.headers()),{"content-type":"application/x-www-form-urlencoded"}),e.headers),queryParameters:r(r({},n.queryParameters()),e.queryParameters)}));return h({transporter:s,appId:t,addAlgoliaAgent:function(e,t){s.userAgent.add({segment:e,version:t})},clearCache:function(){return Promise.all([s.requestsCache.clear(),s.responsesCache.clear()]).then((function(){}))}},e.methods)},A=function(e){return function(t,r){return t.method===F?e.transporter.read(t,r):e.transporter.write(t,r)}},N=function(e){return function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return h({transporter:e.transporter,appId:e.appId,indexName:t},r.methods)}},T=function(e){return function(t,n){var i=t.map((function(e){return r(r({},e),{},{params:O(e.params||{})})}));return e.transporter.read({method:b,path:"1/indexes/*/queries",data:{requests:i},cacheable:!0},n)}},H=function(e){return function(t,i){return Promise.all(t.map((function(t){var s=t.params,a=s.facetName,c=s.facetQuery,o=n(s,["facetName","facetQuery"]);return N(e)(t.indexName,{methods:{searchForFacetValues:I}}).searchForFacetValues(a,c,r(r({},i),o))})))}},Q=function(e){return function(t,r,n){return e.transporter.read({method:b,path:f("1/answers/%s/prediction",e.indexName),data:{query:t,queryLanguages:r},cacheable:!0},n)}},C=function(e){return function(t,r){return e.transporter.read({method:b,path:f("1/indexes/%s/query",e.indexName),data:{query:t},cacheable:!0},r)}},I=function(e){return function(t,r,n){return e.transporter.read({method:b,path:f("1/indexes/%s/facets/%s/query",e.indexName,t),data:{facetQuery:r},cacheable:!0},n)}},D=1,k=2,q=3,L=function(e){return function(t,n){var i=t.map((function(e){return r(r({},e),{},{threshold:e.threshold||0})}));return e.transporter.read({method:b,path:"1/indexes/*/recommendations",data:{requests:i},cacheable:!0},n)}};function V(e,t,n){var i,s={appId:e,apiKey:t,timeouts:{connect:1,read:2,write:30},requester:{send:function(e){return new Promise((function(t){var r=new XMLHttpRequest;r.open(e.method,e.url,!0),Object.keys(e.headers).forEach((function(t){return r.setRequestHeader(t,e.headers[t])}));var n,i=function(e,n){return setTimeout((function(){r.abort(),t({status:0,content:n,isTimedOut:!0})}),1e3*e)},s=i(e.connectTimeout,"Connection timeout");r.onreadystatechange=function(){r.readyState>r.OPENED&&void 0===n&&(clearTimeout(s),n=i(e.responseTimeout,"Socket timeout"))},r.onerror=function(){0===r.status&&(clearTimeout(s),clearTimeout(n),t({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=function(){clearTimeout(s),clearTimeout(n),t({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(e.data)}))}},logger:(i=q,{debug:function(e,t){return D>=i&&console.debug(e,t),Promise.resolve()},info:function(e,t){return k>=i&&console.info(e,t),Promise.resolve()},error:function(e,t){return console.error(e,t),Promise.resolve()}}),responsesCache:o(),requestsCache:o({serializable:!1}),hostsCache:c({caches:[a({key:"".concat("4.24.0","-").concat(e)}),o()]}),userAgent:_("4.24.0").add({segment:"Browser",version:"lite"}),authMode:l.WithinQueryParameters};return S(r(r(r({},s),n),{},{methods:{search:T,searchForFacetValues:H,multipleQueries:T,multipleSearchForFacetValues:H,customRequest:A,initIndex:function(e){return function(t){return N(e)(t,{methods:{search:C,searchForFacetValues:I,findAnswers:Q}})}},getRecommendations:L}}))}return V.version="4.24.0",V}()},53465:(e,t,r)=>{"use strict";r.d(t,{W:()=>u});var n=r(96540),i=r(44586),s=["zero","one","two","few","many","other"];function a(e){return s.filter((function(t){return e.includes(t)}))}var c={locale:"en",pluralForms:a(["one","other"]),select:function(e){return 1===e?"one":"other"}};function o(){var e=(0,i.A)().i18n.currentLocale;return(0,n.useMemo)((function(){try{return t=e,r=new Intl.PluralRules(t),{locale:t,pluralForms:a(r.resolvedOptions().pluralCategories),select:function(e){return r.select(e)}}}catch(n){return console.error('Failed to use Intl.PluralRules for locale "'+e+'".\nDocusaurus will fallback to the default (English) implementation.\nError: '+n.message+"\n"),c}var t,r}),[e])}function u(){var e=o();return{selectMessage:function(t,r){return function(e,t,r){var n=e.split("|");if(1===n.length)return n[0];n.length>r.pluralForms.length&&console.error("For locale="+r.locale+", a maximum of "+r.pluralForms.length+" plural forms are expected ("+r.pluralForms.join(",")+"), but the message contains "+n.length+": "+e);var i=r.select(t),s=r.pluralForms.indexOf(i);return n[Math.min(s,n.length-1)]}(r,t,e)}}}},74604:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>w});var n=r(96540),i=r(34164),s=r(74103),a=r.n(s),c=r(83643),o=r.n(c),u=r(38193),h=r(5260),f=r(28774),l=r(44070),m=r(53465),d=r(24255),p=r(43807),v=r(69024),g=r(20481),y=r(21312),R=r(44586),F=r(38126),b=r(51062),j=r(96300),P=r(51107);const _={searchQueryInput:"searchQueryInput_u2C7",searchVersionInput:"searchVersionInput_m0Ui",searchResultsColumn:"searchResultsColumn_JPFH",algoliaLogo:"algoliaLogo_rT1R",algoliaLogoPathFill:"algoliaLogoPathFill_WdUC",searchResultItem:"searchResultItem_Tv2o",searchResultItemHeading:"searchResultItemHeading_KbCB",searchResultItemPath:"searchResultItemPath_lhe1",searchResultItemSummary:"searchResultItemSummary_AEaO",searchQueryColumn:"searchQueryColumn_RTkw",searchVersionColumn:"searchVersionColumn_ypXd",searchLogoColumn:"searchLogoColumn_rJIA",loadingSpinner:"loadingSpinner_XVxU","loading-spin":"loading-spin_vzvp",loader:"loader_vvXV"};var x=r(74848);function O(e){var t=e.docsSearchVersionsHelpers,r=Object.entries(t.allDocsData).filter((function(e){return e[1].versions.length>1}));return(0,x.jsx)("div",{className:(0,i.A)("col","col--3","padding-left--none",_.searchVersionColumn),children:r.map((function(e){var n=e[0],i=e[1],s=r.length>1?n+": ":"";return(0,x.jsx)("select",{onChange:function(e){return t.setSearchVersion(n,e.target.value)},defaultValue:t.searchVersions[n],className:_.searchVersionInput,children:i.versions.map((function(e,t){return(0,x.jsx)("option",{label:""+s+e.label,value:e.name},t)}))},n)}))})}function E(){var e,t,r,s,c,v,E=(0,R.A)().i18n.currentLocale,w=(0,F.c)().algolia,S=w.appId,A=w.apiKey,N=w.indexName,T=w.contextualSearch,H=(0,b.C)(),Q=(e=(0,m.W)().selectMessage,function(t){return e(t,(0,y.T)({id:"theme.SearchPage.documentsFound.plurals",description:'Pluralized label for "{count} documents found". Use as much plural forms (separated by "|") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)',message:"One document found|{count} documents found"},{count:t}))}),C=(t=(0,l.Gy)(),r=(0,n.useState)((function(){return Object.entries(t).reduce((function(e,t){var r,n=t[0],i=t[1];return Object.assign({},e,((r={})[n]=i.versions[0].name,r))}),{})})),s=r[0],c=r[1],v=Object.values(t).some((function(e){return e.versions.length>1})),{allDocsData:t,versioningEnabled:v,searchVersions:s,setSearchVersion:function(e,t){return c((function(r){var n;return Object.assign({},r,((n={})[e]=t,n))}))}}),I=(0,d.b)(),D=I[0],k=I[1],q={items:[],query:null,totalResults:null,totalPages:null,lastPage:null,hasMore:null,loading:null},L=(0,n.useReducer)((function(e,t){switch(t.type){case"reset":return q;case"loading":return Object.assign({},e,{loading:!0});case"update":return D!==t.value.query?e:Object.assign({},t.value,{items:0===t.value.lastPage?t.value.items:e.items.concat(t.value.items)});case"advance":var r=e.totalPages>e.lastPage+1;return Object.assign({},e,{lastPage:r?e.lastPage+1:e.lastPage,hasMore:r});default:return e}}),q),V=L[0],B=L[1],M=T?["language","docusaurus_tag"]:[],z=o()(S,A),J=a()(z,N,{hitsPerPage:15,advancedSyntax:!0,disjunctiveFacets:M});J.on("result",(function(e){var t=e.results,r=t.query,n=t.hits,i=t.page,s=t.nbHits,a=t.nbPages;if(""!==r&&Array.isArray(n)){var c=function(e){return e.replace(/algolia-docsearch-suggestion--highlight/g,"search-result-match")},o=n.map((function(e){var t=e.url,r=e._highlightResult.hierarchy,n=e._snippetResult,i=void 0===n?{}:n,s=Object.keys(r).map((function(e){return c(r[e].value)}));return{title:s.pop(),url:H(t),summary:i.content?c(i.content.value)+"...":"",breadcrumbs:s}}));B({type:"update",value:{items:o,query:r,totalResults:s,totalPages:a,lastPage:i,hasMore:a>i+1,loading:!1}})}else B({type:"reset"})}));var W=(0,n.useState)(null),U=W[0],$=W[1],K=(0,n.useRef)(0),X=(0,n.useRef)(u.A.canUseIntersectionObserver&&new IntersectionObserver((function(e){var t=e[0],r=t.isIntersecting,n=t.boundingClientRect.y;r&&K.current>n&&B({type:"advance"}),K.current=n}),{threshold:1})),G=function(){return D?(0,y.T)({id:"theme.SearchPage.existingResultsTitle",message:'Search results for "{query}"',description:"The search page title for non-empty query"},{query:D}):(0,y.T)({id:"theme.SearchPage.emptyResultsTitle",message:"Search the documentation",description:"The search page title for empty query"})},Z=(0,p._q)((function(e){void 0===e&&(e=0),T&&(J.addDisjunctiveFacetRefinement("docusaurus_tag","default"),J.addDisjunctiveFacetRefinement("language",E),Object.entries(C.searchVersions).forEach((function(e){var t=e[0],r=e[1];J.addDisjunctiveFacetRefinement("docusaurus_tag","docs-"+t+"-"+r)}))),J.setQuery(D).setPage(e).search()}));return(0,n.useEffect)((function(){if(U){var e=X.current;return e?(e.observe(U),function(){return e.unobserve(U)}):function(){return!0}}}),[U]),(0,n.useEffect)((function(){B({type:"reset"}),D&&(B({type:"loading"}),setTimeout((function(){Z()}),300))}),[D,C.searchVersions,Z]),(0,n.useEffect)((function(){V.lastPage&&0!==V.lastPage&&Z(V.lastPage)}),[Z,V.lastPage]),(0,x.jsxs)(j.A,{children:[(0,x.jsxs)(h.A,{children:[(0,x.jsx)("title",{children:(0,g.s)(G())}),(0,x.jsx)("meta",{property:"robots",content:"noindex, follow"})]}),(0,x.jsxs)("div",{className:"container margin-vert--lg",children:[(0,x.jsx)(P.A,{as:"h1",children:G()}),(0,x.jsxs)("form",{className:"row",onSubmit:function(e){return e.preventDefault()},children:[(0,x.jsx)("div",{className:(0,i.A)("col",_.searchQueryColumn,{"col--9":C.versioningEnabled,"col--12":!C.versioningEnabled}),children:(0,x.jsx)("input",{type:"search",name:"q",className:_.searchQueryInput,placeholder:(0,y.T)({id:"theme.SearchPage.inputPlaceholder",message:"Type your search here",description:"The placeholder for search page input"}),"aria-label":(0,y.T)({id:"theme.SearchPage.inputLabel",message:"Search",description:"The ARIA label for search page input"}),onChange:function(e){return k(e.target.value)},value:D,autoComplete:"off",autoFocus:!0})}),T&&C.versioningEnabled&&(0,x.jsx)(O,{docsSearchVersionsHelpers:C})]}),(0,x.jsxs)("div",{className:"row",children:[(0,x.jsx)("div",{className:(0,i.A)("col","col--8",_.searchResultsColumn),children:!!V.totalResults&&Q(V.totalResults)}),(0,x.jsx)("div",{className:(0,i.A)("col","col--4","text--right",_.searchLogoColumn),children:(0,x.jsx)(f.A,{to:"https://www.algolia.com/","aria-label":(0,y.T)({id:"theme.SearchPage.algoliaLabel",message:"Search by Algolia",description:"The ARIA label for Algolia mention"}),children:(0,x.jsx)("svg",{viewBox:"0 0 168 24",className:_.algoliaLogo,children:(0,x.jsxs)("g",{fill:"none",children:[(0,x.jsx)("path",{className:_.algoliaLogoPathFill,d:"M120.925 18.804c-4.386.02-4.386-3.54-4.386-4.106l-.007-13.336 2.675-.424v13.254c0 .322 0 2.358 1.718 2.364v2.248zm-10.846-2.18c.821 0 1.43-.047 1.855-.129v-2.719a6.334 6.334 0 0 0-1.574-.199 5.7 5.7 0 0 0-.897.069 2.699 2.699 0 0 0-.814.24c-.24.116-.439.28-.582.491-.15.212-.219.335-.219.656 0 .628.219.991.616 1.23s.938.362 1.615.362zm-.233-9.7c.883 0 1.629.109 2.231.328.602.218 1.088.525 1.444.915.363.396.609.922.76 1.483.157.56.232 1.175.232 1.85v6.874a32.5 32.5 0 0 1-1.868.314c-.834.123-1.772.185-2.813.185-.69 0-1.327-.069-1.895-.198a4.001 4.001 0 0 1-1.471-.636 3.085 3.085 0 0 1-.951-1.134c-.226-.465-.343-1.12-.343-1.803 0-.656.13-1.073.384-1.525a3.24 3.24 0 0 1 1.047-1.106c.445-.287.95-.492 1.532-.615a8.8 8.8 0 0 1 1.82-.185 8.404 8.404 0 0 1 1.972.24v-.438c0-.307-.035-.6-.11-.874a1.88 1.88 0 0 0-.384-.73 1.784 1.784 0 0 0-.724-.493 3.164 3.164 0 0 0-1.143-.205c-.616 0-1.177.075-1.69.164a7.735 7.735 0 0 0-1.26.307l-.321-2.192c.335-.117.834-.233 1.478-.349a10.98 10.98 0 0 1 2.073-.178zm52.842 9.626c.822 0 1.43-.048 1.854-.13V13.7a6.347 6.347 0 0 0-1.574-.199c-.294 0-.595.021-.896.069a2.7 2.7 0 0 0-.814.24 1.46 1.46 0 0 0-.582.491c-.15.212-.218.335-.218.656 0 .628.218.991.615 1.23.404.245.938.362 1.615.362zm-.226-9.694c.883 0 1.629.108 2.231.327.602.219 1.088.526 1.444.915.355.39.609.923.759 1.483a6.8 6.8 0 0 1 .233 1.852v6.873c-.41.088-1.034.19-1.868.314-.834.123-1.772.184-2.813.184-.69 0-1.327-.068-1.895-.198a4.001 4.001 0 0 1-1.471-.635 3.085 3.085 0 0 1-.951-1.134c-.226-.465-.343-1.12-.343-1.804 0-.656.13-1.073.384-1.524.26-.45.608-.82 1.047-1.107.445-.286.95-.491 1.532-.614a8.803 8.803 0 0 1 2.751-.13c.329.034.671.096 1.04.185v-.437a3.3 3.3 0 0 0-.109-.875 1.873 1.873 0 0 0-.384-.731 1.784 1.784 0 0 0-.724-.492 3.165 3.165 0 0 0-1.143-.205c-.616 0-1.177.075-1.69.164a7.75 7.75 0 0 0-1.26.307l-.321-2.193c.335-.116.834-.232 1.478-.348a11.633 11.633 0 0 1 2.073-.177zm-8.034-1.271a1.626 1.626 0 0 1-1.628-1.62c0-.895.725-1.62 1.628-1.62.904 0 1.63.725 1.63 1.62 0 .895-.733 1.62-1.63 1.62zm1.348 13.22h-2.689V7.27l2.69-.423v11.956zm-4.714 0c-4.386.02-4.386-3.54-4.386-4.107l-.008-13.336 2.676-.424v13.254c0 .322 0 2.358 1.718 2.364v2.248zm-8.698-5.903c0-1.156-.253-2.119-.746-2.788-.493-.677-1.183-1.01-2.067-1.01-.882 0-1.574.333-2.065 1.01-.493.676-.733 1.632-.733 2.788 0 1.168.246 1.953.74 2.63.492.683 1.183 1.018 2.066 1.018.882 0 1.574-.342 2.067-1.019.492-.683.738-1.46.738-2.63zm2.737-.007c0 .902-.13 1.584-.397 2.33a5.52 5.52 0 0 1-1.128 1.906 4.986 4.986 0 0 1-1.752 1.223c-.685.286-1.739.45-2.265.45-.528-.006-1.574-.157-2.252-.45a5.096 5.096 0 0 1-1.744-1.223c-.487-.527-.863-1.162-1.137-1.906a6.345 6.345 0 0 1-.41-2.33c0-.902.123-1.77.397-2.508a5.554 5.554 0 0 1 1.15-1.892 5.133 5.133 0 0 1 1.75-1.216c.679-.287 1.425-.423 2.232-.423.808 0 1.553.142 2.237.423a4.88 4.88 0 0 1 1.753 1.216 5.644 5.644 0 0 1 1.135 1.892c.287.738.431 1.606.431 2.508zm-20.138 0c0 1.12.246 2.363.738 2.882.493.52 1.13.78 1.91.78.424 0 .828-.062 1.204-.178.377-.116.677-.253.917-.417V9.33a10.476 10.476 0 0 0-1.766-.226c-.971-.028-1.71.37-2.23 1.004-.513.636-.773 1.75-.773 2.788zm7.438 5.274c0 1.824-.466 3.156-1.404 4.004-.936.846-2.367 1.27-4.296 1.27-.705 0-2.17-.137-3.34-.396l.431-2.118c.98.205 2.272.26 2.95.26 1.074 0 1.84-.219 2.299-.656.459-.437.684-1.086.684-1.948v-.437a8.07 8.07 0 0 1-1.047.397c-.43.13-.93.198-1.492.198-.739 0-1.41-.116-2.018-.349a4.206 4.206 0 0 1-1.567-1.025c-.431-.45-.774-1.017-1.013-1.694-.24-.677-.363-1.885-.363-2.773 0-.834.13-1.88.384-2.577.26-.696.629-1.298 1.129-1.796.493-.498 1.095-.881 1.8-1.162a6.605 6.605 0 0 1 2.428-.457c.87 0 1.67.109 2.45.24.78.129 1.444.265 1.985.415V18.17zM6.972 6.677v1.627c-.712-.446-1.52-.67-2.425-.67-.585 0-1.045.13-1.38.391a1.24 1.24 0 0 0-.502 1.03c0 .425.164.765.494 1.02.33.256.835.532 1.516.83.447.192.795.356 1.045.495.25.138.537.332.862.582.324.25.563.548.718.894.154.345.23.741.23 1.188 0 .947-.334 1.691-1.004 2.234-.67.542-1.537.814-2.601.814-1.18 0-2.16-.229-2.936-.686v-1.708c.84.628 1.814.942 2.92.942.585 0 1.048-.136 1.388-.407.34-.271.51-.646.51-1.125 0-.287-.1-.55-.302-.79-.203-.24-.42-.42-.655-.542-.234-.123-.585-.29-1.053-.503a61.27 61.27 0 0 1-.582-.271 13.67 13.67 0 0 1-.55-.287 4.275 4.275 0 0 1-.567-.351 6.92 6.92 0 0 1-.455-.4c-.18-.17-.31-.34-.39-.51-.08-.17-.155-.37-.224-.598a2.553 2.553 0 0 1-.104-.742c0-.915.333-1.638.998-2.17.664-.532 1.523-.798 2.576-.798.968 0 1.793.17 2.473.51zm7.468 5.696v-.287c-.022-.607-.187-1.088-.495-1.444-.309-.357-.75-.535-1.324-.535-.532 0-.99.194-1.373.583-.382.388-.622.949-.717 1.683h3.909zm1.005 2.792v1.404c-.596.34-1.383.51-2.362.51-1.255 0-2.255-.377-3-1.132-.744-.755-1.116-1.744-1.116-2.968 0-1.297.34-2.316 1.021-3.055.68-.74 1.548-1.11 2.6-1.11 1.033 0 1.852.323 2.458.966.606.644.91 1.572.91 2.784 0 .33-.033.676-.096 1.038h-5.314c.107.702.405 1.239.894 1.611.49.372 1.106.558 1.85.558.862 0 1.58-.202 2.155-.606zm6.605-1.77h-1.212c-.596 0-1.045.116-1.349.35-.303.234-.454.532-.454.894 0 .372.117.664.35.877.235.213.575.32 1.022.32.51 0 .912-.142 1.204-.424.293-.281.44-.651.44-1.108v-.91zm-4.068-2.554V9.325c.627-.361 1.457-.542 2.489-.542 2.116 0 3.175 1.026 3.175 3.08V17h-1.548v-.957c-.415.68-1.143 1.02-2.186 1.02-.766 0-1.38-.22-1.843-.661-.462-.442-.694-1.003-.694-1.684 0-.776.293-1.38.878-1.81.585-.431 1.404-.647 2.457-.647h1.34V11.8c0-.554-.133-.971-.399-1.253-.266-.282-.707-.423-1.324-.423a4.07 4.07 0 0 0-2.345.718zm9.333-1.93v1.42c.394-1 1.101-1.5 2.123-1.5.148 0 .313.016.494.048v1.531a1.885 1.885 0 0 0-.75-.143c-.542 0-.989.24-1.34.718-.351.479-.527 1.048-.527 1.707V17h-1.563V8.91h1.563zm5.01 4.084c.022.82.272 1.492.75 2.019.479.526 1.15.79 2.01.79.639 0 1.235-.176 1.788-.527v1.404c-.521.319-1.186.479-1.995.479-1.265 0-2.276-.4-3.031-1.197-.755-.798-1.133-1.792-1.133-2.984 0-1.16.38-2.151 1.14-2.975.761-.825 1.79-1.237 3.088-1.237.702 0 1.346.149 1.93.447v1.436a3.242 3.242 0 0 0-1.77-.495c-.84 0-1.513.266-2.019.798-.505.532-.758 1.213-.758 2.042zM40.24 5.72v4.579c.458-1 1.293-1.5 2.505-1.5.787 0 1.42.245 1.899.734.479.49.718 1.17.718 2.042V17h-1.564v-5.106c0-.553-.14-.98-.422-1.284-.282-.303-.652-.455-1.11-.455-.531 0-1.002.202-1.411.606-.41.405-.615 1.022-.615 1.851V17h-1.563V5.72h1.563zm14.966 10.02c.596 0 1.096-.253 1.5-.758.404-.506.606-1.157.606-1.955 0-.915-.202-1.62-.606-2.114-.404-.495-.92-.742-1.548-.742-.553 0-1.05.224-1.491.67-.442.447-.662 1.133-.662 2.058 0 .958.212 1.67.638 2.138.425.469.946.703 1.563.703zM53.004 5.72v4.42c.574-.894 1.388-1.341 2.44-1.341 1.022 0 1.857.383 2.506 1.149.649.766.973 1.781.973 3.047 0 1.138-.309 2.109-.925 2.912-.617.803-1.463 1.205-2.537 1.205-1.075 0-1.894-.447-2.457-1.34V17h-1.58V5.72h1.58zm9.908 11.104l-3.223-7.913h1.739l1.005 2.632 1.26 3.415c.096-.32.48-1.458 1.15-3.415l.909-2.632h1.66l-2.92 7.866c-.777 2.074-1.963 3.11-3.559 3.11a2.92 2.92 0 0 1-.734-.079v-1.34c.17.042.351.064.543.064 1.032 0 1.755-.57 2.17-1.708z"}),(0,x.jsx)("path",{fill:"#5468FF",d:"M78.988.938h16.594a2.968 2.968 0 0 1 2.966 2.966V20.5a2.967 2.967 0 0 1-2.966 2.964H78.988a2.967 2.967 0 0 1-2.966-2.964V3.897A2.961 2.961 0 0 1 78.988.938z"}),(0,x.jsx)("path",{fill:"white",d:"M89.632 5.967v-.772a.978.978 0 0 0-.978-.977h-2.28a.978.978 0 0 0-.978.977v.793c0 .088.082.15.171.13a7.127 7.127 0 0 1 1.984-.28c.65 0 1.295.088 1.917.259.082.02.164-.04.164-.13m-6.248 1.01l-.39-.389a.977.977 0 0 0-1.382 0l-.465.465a.973.973 0 0 0 0 1.38l.383.383c.062.061.15.047.205-.014.226-.307.472-.601.746-.874.281-.28.568-.526.883-.751.068-.042.075-.137.02-.2m4.16 2.453v3.341c0 .096.104.165.192.117l2.97-1.537c.068-.034.089-.117.055-.184a3.695 3.695 0 0 0-3.08-1.866c-.068 0-.136.054-.136.13m0 8.048a4.489 4.489 0 0 1-4.49-4.482 4.488 4.488 0 0 1 4.49-4.482 4.488 4.488 0 0 1 4.489 4.482 4.484 4.484 0 0 1-4.49 4.482m0-10.85a6.363 6.363 0 1 0 0 12.729 6.37 6.37 0 0 0 6.372-6.368 6.358 6.358 0 0 0-6.371-6.36"})]})})})})]}),V.items.length>0?(0,x.jsx)("main",{children:V.items.map((function(e,t){var r=e.title,n=e.url,s=e.summary,a=e.breadcrumbs;return(0,x.jsxs)("article",{className:_.searchResultItem,children:[(0,x.jsx)(P.A,{as:"h2",className:_.searchResultItemHeading,children:(0,x.jsx)(f.A,{to:n,dangerouslySetInnerHTML:{__html:r}})}),a.length>0&&(0,x.jsx)("nav",{"aria-label":"breadcrumbs",children:(0,x.jsx)("ul",{className:(0,i.A)("breadcrumbs",_.searchResultItemPath),children:a.map((function(e,t){return(0,x.jsx)("li",{className:"breadcrumbs__item",dangerouslySetInnerHTML:{__html:e}},t)}))})}),s&&(0,x.jsx)("p",{className:_.searchResultItemSummary,dangerouslySetInnerHTML:{__html:s}})]},t)}))}):[D&&!V.loading&&(0,x.jsx)("p",{children:(0,x.jsx)(y.A,{id:"theme.SearchPage.noResultsText",description:"The paragraph for empty search result",children:"No results were found"})},"no-results"),!!V.loading&&(0,x.jsx)("div",{className:_.loadingSpinner},"spinner")],V.hasMore&&(0,x.jsx)("div",{className:_.loader,ref:$,children:(0,x.jsx)(y.A,{id:"theme.SearchPage.fetchingNewResults",description:"The paragraph for fetching new search results",children:"Fetching new results..."})})]})]})}function w(){return(0,x.jsx)(v.e3,{className:"search-page-wrapper",children:(0,x.jsx)(E,{})})}}}]); \ No newline at end of file diff --git a/assets/js/1ae2b102.5456314e.js b/assets/js/1ae2b102.5456314e.js deleted file mode 100644 index 1c5297b45296..000000000000 --- a/assets/js/1ae2b102.5456314e.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk=self.webpackChunk||[]).push([[8121],{92508:(e,t,n)=>{"use strict";n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>o,default:()=>h,frontMatter:()=>s,metadata:()=>r,toc:()=>l});var i=n(74848),a=n(28453);n(47379);const s={id:"build-protocol-info",title:"Polkadot Protocol Overview",sidebar_label:"Polkadot Protocol Overview",description:"Characteristics about the Polkadot protocol, and what you need to consider when building.",keywords:["build","protocol","extrinsics","events","transaction"],slug:"../build-protocol-info"},o=void 0,r={id:"build/build-protocol-info",title:"Polkadot Protocol Overview",description:"Characteristics about the Polkadot protocol, and what you need to consider when building.",source:"@site/../docs/build/build-protocol-info.md",sourceDirName:"build",slug:"/build-protocol-info",permalink:"/docs/build-protocol-info",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/build/build-protocol-info.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1726730833e3,frontMatter:{id:"build-protocol-info",title:"Polkadot Protocol Overview",sidebar_label:"Polkadot Protocol Overview",description:"Characteristics about the Polkadot protocol, and what you need to consider when building.",keywords:["build","protocol","extrinsics","events","transaction"],slug:"../build-protocol-info"},sidebar:"docs",previous:{title:"Coretime Swap",permalink:"/docs/learn-guides-coretime-swap"},next:{title:"Using AssetHub",permalink:"/docs/build-integrate-assets"}},c={},l=[{value:"Tokens",id:"tokens",level:2},{value:"Redenomination",id:"redenomination",level:3},{value:"Addresses",id:"addresses",level:2},{value:"Cryptography",id:"cryptography",level:3},{value:"Extrinsics and Events",id:"extrinsics-and-events",level:2},{value:"Block Format",id:"block-format",level:3},{value:"Extrinsics",id:"extrinsics",level:3},{value:"Transaction Mortality",id:"transaction-mortality",level:3},{value:"Unique Identifiers for Extrinsics",id:"unique-identifiers-for-extrinsics",level:3},{value:"Events",id:"events",level:3},{value:"Fees",id:"fees",level:3},{value:"Encoding",id:"encoding",level:3},{value:"Runtime Upgrades",id:"runtime-upgrades",level:2},{value:"Runtime Versioning",id:"runtime-versioning",level:3},{value:"Smart Contracts",id:"smart-contracts",level:2},{value:"Other F.A.Q.",id:"other-faq",level:2}];function d(e){const t={a:"a",admonition:"admonition",blockquote:"blockquote",code:"code",em:"em",h2:"h2",h3:"h3",li:"li",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,a.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.p,{children:"This page serves as a high-level introduction to the Polkadot protocol with terminology that may be\nspecific to Polkadot, notable differences to other chains that you may have worked with, and\npractical information for dealing with the chain."}),"\n",(0,i.jsxs)(t.blockquote,{children:["\n",(0,i.jsxs)(t.p,{children:["If the below does not offer a sufficient amount of information regarding the Polkadot protocol, be\nsure to visit the ",(0,i.jsx)(t.a,{href:"https://spec.polkadot.network/id-polkadot-protocol",children:"Polkadot Spec"}),", which is\nmore verbose than this Wiki page."]}),"\n"]}),"\n",(0,i.jsx)(t.h2,{id:"tokens",children:"Tokens"}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.strong,{children:"Token decimals:"}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsx)(t.li,{children:"Polkadot (DOT): 10"}),"\n",(0,i.jsx)(t.li,{children:"Kusama (KSM): 12"}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.strong,{children:"Base unit:"}),' "Planck"']}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.strong,{children:"Balance type:"})," ",(0,i.jsx)(t.a,{href:"https://doc.rust-lang.org/std/u128/index.html",children:(0,i.jsx)(t.code,{children:"u128"})})]}),"\n"]}),"\n",(0,i.jsx)(t.h3,{id:"redenomination",children:"Redenomination"}),"\n",(0,i.jsxs)(t.p,{children:['Polkadot conducted a poll, which ended on 27 July 2020 (block 888_888), in which the stakeholders\ndecided to redenominate the DOT token. The redenomination does not change the number of base units\n(called "plancks" in Polkadot) in the network. The only change is that a single DOT token will be\n1e10 plancks instead of the original 1e12 plancks. See the Polkadot blog posts explaining the\n',(0,i.jsx)(t.a,{href:"https://medium.com/polkadot-network/the-first-polkadot-vote-1fc1b8bd357b",children:"details"})," and the\n",(0,i.jsx)(t.a,{href:"https://medium.com/polkadot-network/the-results-are-in-8f6b1ca2a4e6",children:"results"})," of the vote."]}),"\n",(0,i.jsxs)(t.p,{children:["The redenomination took effect 72 hours after transfers were enabled, at block 1_248_326, which\noccurred at approximately 16:50 UTC on 21 Aug 2020. You can find more information about the\nredenomination ",(0,i.jsx)(t.a,{href:"/docs/learn/learn-redenomination",children:"here"}),"."]}),"\n",(0,i.jsx)(t.h2,{id:"addresses",children:"Addresses"}),"\n",(0,i.jsxs)(t.p,{children:["In Polkadot (and most Substrate chains), user accounts are identified by a 32-byte (256-bit)\n",(0,i.jsx)(t.code,{children:"AccountId"}),". This is often, but not always, the public key of a cryptographic key pair."]}),"\n",(0,i.jsx)(t.p,{children:'Polkadot (and Substrate) use the SS58 address format. This is a broad "meta-format" designed to\nhandle many different cryptographic schemes and chains. It has much in common with Bitcoin\'s\nBase58Check format such as a version prefix, a hash-based checksum suffix, and base-58 encoding.'}),"\n",(0,i.jsxs)(t.p,{children:["See the\n",(0,i.jsx)(t.a,{href:"https://docs.substrate.io/main-docs/fundamentals/accounts-addresses-keys/#address-encoding-and-chain-specific-addresses",children:"SS58 page"}),"\nin the Substrate documentation for encoding information and a more comprehensive list of network\nprefixes."]}),"\n",(0,i.jsx)(t.admonition,{title:"Do not use regular expressions (regex) to validate addresses",type:"warning",children:(0,i.jsxs)(t.p,{children:["Always verify using the prefix and checksum of the address. Substrate API Sidecar provides an\n",(0,i.jsx)(t.code,{children:"accounts/{accountId}/validate"})," path that returns a boolean ",(0,i.jsx)(t.code,{children:"isValid"})," response for a provided\naddress."]})}),"\n",(0,i.jsx)(t.p,{children:"Relevant SS58 prefixes for this guide:"}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsx)(t.li,{children:"Polkadot: 0"}),"\n",(0,i.jsx)(t.li,{children:"Kusama: 2"}),"\n",(0,i.jsx)(t.li,{children:"Westend: 42"}),"\n"]}),"\n",(0,i.jsx)(t.h3,{id:"cryptography",children:"Cryptography"}),"\n",(0,i.jsxs)(t.p,{children:["Polkadot supports the following ",(0,i.jsx)(t.a,{href:"/docs/learn-cryptography",children:"cryptographic"})," key pairs and\nsigning algorithms:"]}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsx)(t.li,{children:"Ed25519"}),"\n",(0,i.jsx)(t.li,{children:"Sr25519 - Schnorr signatures on the Ristretto group"}),"\n",(0,i.jsx)(t.li,{children:"ECDSA signatures on secp256k1"}),"\n"]}),"\n",(0,i.jsxs)(t.p,{children:["Note that the address for a secp256k1 key is the SS58 encoding of the ",(0,i.jsx)(t.em,{children:"hash of the public key"})," in\norder to reduce the public key from 33 bytes to 32 bytes."]}),"\n",(0,i.jsx)(t.h2,{id:"extrinsics-and-events",children:"Extrinsics and Events"}),"\n",(0,i.jsx)(t.h3,{id:"block-format",children:"Block Format"}),"\n",(0,i.jsx)(t.p,{children:"A Polkadot block consists of a block header and a block body. The block body is made up of\nextrinsics representing the generalization of the concept of transactions. Extrinsics can contain\nany external data the underlying chain wishes to validate and track."}),"\n",(0,i.jsx)(t.p,{children:"The block header is a 5-tuple containing the following elements:"}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.code,{children:"parent_hash"}),": a 32-byte Blake2b hash of the SCALE encoded parent block header."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.code,{children:"number"}),": an integer representing the index of the current block in the chain. It is equal to the\nnumber of the ancestor blocks. The genesis state has number 0."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.code,{children:"state_root"}),": the root of the Merkle tree, used as storage for the system."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.code,{children:"extrinsics_root"}),": field which is reserved for the Runtime to validate the integrity of the\nextrinsics composing the block body."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.code,{children:"digest"}),": field used to store any chain-specific auxiliary data, which could help the light\nclients interact with the block without the need of accessing the full storage as well as\nconsensus-related data including the block signature."]}),"\n"]}),"\n",(0,i.jsxs)(t.p,{children:["A node creating or receiving a block must gossip that block to the network (i.e. to the other\nnodes). Other nodes within the network will track this announcement and can request information\nabout the block. Additional details on the process are outlined\n",(0,i.jsx)(t.a,{href:"https://spec.polkadot.network/#sect-msg-block-announce",children:"here"})," in the Polkadot Spec."]}),"\n",(0,i.jsx)(t.h3,{id:"extrinsics",children:"Extrinsics"}),"\n",(0,i.jsxs)(t.p,{children:["An extrinsic is a\n",(0,i.jsx)(t.a,{href:"https://github.com/paritytech/parity-scale-codec#parity-scale-codec",children:"SCALE encoded"})," array\nconsisting of a ",(0,i.jsx)(t.code,{children:"version number"}),", ",(0,i.jsx)(t.code,{children:"signature"}),", and varying ",(0,i.jsx)(t.code,{children:"data"})," types indicating the resulting\nruntime function to be called, including the parameters required for that function to be executed."]}),"\n",(0,i.jsx)(t.p,{children:"Extrinsics constitute information from the outside world and take on three forms:"}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsx)(t.li,{children:"Inherents"}),"\n",(0,i.jsx)(t.li,{children:"Signed Transactions"}),"\n",(0,i.jsx)(t.li,{children:"Unsigned Transactions"}),"\n"]}),"\n",(0,i.jsxs)(t.p,{children:["As an infrastructure provider, you will deal almost exclusively with signed transactions. You will,\nhowever, see other extrinsics within the blocks that you decode. Find more information in the\n",(0,i.jsx)(t.a,{href:"https://docs.substrate.io/main-docs/build/tx-weights-fees/",children:"Substrate documentation"}),"."]}),"\n",(0,i.jsx)(t.p,{children:"Inherent extrinsics are unsigned and contain information that is not provably true, but validators\nagree on based on some measure of reasonability. For example, a timestamp cannot be proved, but\nvalidators can agree that it is within some time difference on their system clock. Inherents are\nbroadcasted as part of the produced blocks rather than being gossiped as individual extrinsics."}),"\n",(0,i.jsx)(t.p,{children:"Signed transactions contain a signature of the account that issued the transaction and stands to pay\na fee to have the transaction included on chain. Because the value of including signed transactions\non-chain can be recognized prior to execution, they can be gossiped on the network between nodes\nwith a low risk of spam. Signed transactions fit the concept of a transaction in Ethereum or\nBitcoin."}),"\n",(0,i.jsx)(t.p,{children:"Some transactions cannot be signed by a fee-paying account and use unsigned transactions. For\nexample, when a user claims their DOT from the Ethereum DOT indicator contract to a new DOT address,\nthe new address doesn't yet have any funds with which to pay fees."}),"\n",(0,i.jsx)(t.p,{children:"The Polkadot Host does not specify or limit the internals of each extrinsics and those are defined\nand dealt with by the Runtime."}),"\n",(0,i.jsx)(t.h3,{id:"transaction-mortality",children:"Transaction Mortality"}),"\n",(0,i.jsx)(t.p,{children:'Extrinsics can be mortal or immortal. The transaction payload includes a block number and block hash\ncheckpoint from which a transaction is valid and a validity period (also called "era" in some\nplaces) that represents the number of blocks after the checkpoint for which the transaction is\nvalid. If the extrinsic is not included in a block within this validity window, it will be discarded\nfrom the transaction queue.'}),"\n",(0,i.jsxs)(t.p,{children:["The chain only stores a limited number of prior block hashes as reference. You can query this\nparameter, called ",(0,i.jsx)(t.a,{href:"/docs/chain-state-values#block-hash-count",children:(0,i.jsx)(t.code,{children:"BlockHashCount"})}),", from the\nchain state or metadata. If the validity period is larger than the number of blocks stored on-chain,\nthen the transaction will only be valid as long as there is a block to check it against, i.e. the\nminimum value of validity period and block hash count."]}),"\n",(0,i.jsx)(t.p,{children:'Setting the block checkpoint to zero, using the genesis hash, and a validity period of zero will\nmake the transaction "immortal".'}),"\n",(0,i.jsxs)(t.p,{children:[(0,i.jsx)(t.strong,{children:"NOTE:"})," If an account is reaped and a user re-funds the account, then they could replay an\nimmortal transaction. Always default to using a mortal extrinsic."]}),"\n",(0,i.jsx)(t.h3,{id:"unique-identifiers-for-extrinsics",children:"Unique Identifiers for Extrinsics"}),"\n",(0,i.jsx)(t.admonition,{title:"Transaction Hash is not a unique identifier",type:"caution",children:(0,i.jsx)(t.p,{children:"The assumption that a transaction's hash is a unique identifier is the number one mistake that\nindexing services and custodians make. This error will cause major issues for your users. Make sure\nthat you read this section carefully."})}),"\n",(0,i.jsx)(t.p,{children:"Many infrastructure providers on existing blockchains, e.g. Ethereum, consider a transaction's hash\nas a unique identifier. In Substrate-based chains like Polkadot, a transaction's hash only serves as\na fingerprint of the information within a transaction, and there are times when two transactions\nwith the same hash are both valid. In the case that one is invalid, the network properly handles the\ntransaction and does not charge a transaction fee to the sender nor consider the transaction in the\nblock's fullness."}),"\n",(0,i.jsxs)(t.p,{children:["Imagine this contrived example with a ",(0,i.jsx)(t.a,{href:"#existential-deposit",children:"reaped account"}),". The first and last\ntransactions are identical, and both valid."]}),"\n",(0,i.jsxs)(t.table,{children:[(0,i.jsx)(t.thead,{children:(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.th,{style:{textAlign:"center"},children:"Index"}),(0,i.jsx)(t.th,{style:{textAlign:"center"},children:"Hash"}),(0,i.jsx)(t.th,{style:{textAlign:"left"},children:"Origin"}),(0,i.jsx)(t.th,{style:{textAlign:"center"},children:"Nonce"}),(0,i.jsx)(t.th,{style:{textAlign:"left"},children:"Call"}),(0,i.jsx)(t.th,{style:{textAlign:"left"},children:"Results"})]})}),(0,i.jsxs)(t.tbody,{children:[(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"0"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"0x01"}),(0,i.jsx)(t.td,{style:{textAlign:"left"},children:"Account A"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"0"}),(0,i.jsx)(t.td,{style:{textAlign:"left"},children:"Transfer 5 DOT to B"}),(0,i.jsx)(t.td,{style:{textAlign:"left"},children:"Account A reaped"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"1"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"0x02"}),(0,i.jsx)(t.td,{style:{textAlign:"left"},children:"Account B"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"4"}),(0,i.jsx)(t.td,{style:{textAlign:"left"},children:"Transfer 7 DOT to A"}),(0,i.jsx)(t.td,{style:{textAlign:"left"},children:"Account A created (nonce = 0)"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"2"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"0x01"}),(0,i.jsx)(t.td,{style:{textAlign:"left"},children:"Account A"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"0"}),(0,i.jsx)(t.td,{style:{textAlign:"left"},children:"Transfer 5 DOT to B"}),(0,i.jsx)(t.td,{style:{textAlign:"left"},children:"Successful transaction"})]})]})]}),"\n",(0,i.jsxs)(t.p,{children:['In addition, not every extrinsic in a Substrate-based chain comes from an account as a "pure"\npublic/private key pair. The concept of dispatch\n',(0,i.jsx)(t.a,{href:"/docs/learn-account-abstraction#origin-abstraction-in-polkadot",children:"\u201cOrigin\u201d"}),", which could\nrepresent different contexts for a particular, signed extrinsic."]}),"\n",(0,i.jsx)(t.p,{children:"For example, the origin could befrom a public key account, but could also represent a collective.\nThese origins do not have a nonce associated with them the way that an account does. For example,\ngovernance might dispatch the same call with the same arguments multiple times, like \u201cincrease the\nvalidator set by 10%.\u201d This dispatch information (and therefore its hash) would be the same, and the\nhash would be a reliable representative of the call, but its execution would have different effects\ndepending on the chain\u2019s state at the time of dispatch."}),"\n",(0,i.jsxs)(t.p,{children:["The correct way to uniquely identify an extrinsic on a Substrate-based chain is to use the block ID\n(height or hash) and the extrinsic's index. Substrate defines a block as a header and an array of\nextrinsics; therefore, an index in the array at a canonical height will always uniquely identify a\ntransaction. This methodology is reflected in the Substrate codebase itself, for example to\n",(0,i.jsx)(t.a,{href:"https://paritytech.github.io/substrate/master/pallet_multisig/struct.Timepoint.html",children:"reference a previous transaction"}),"\nfrom the Multisig pallet."]}),"\n",(0,i.jsx)(t.h3,{id:"events",children:"Events"}),"\n",(0,i.jsxs)(t.p,{children:["While extrinsics represent information from the outside world, events represent information from the\nchain. Extrinsics can trigger events. For example, the Staking pallet emits a ",(0,i.jsx)(t.code,{children:"Reward"})," event when\nclaiming staking rewards to tell the user how much the account was credited."]}),"\n",(0,i.jsxs)(t.p,{children:["If you want to monitor deposits into an address, keep in mind that several transactions can initiate\na balance transfer (such as ",(0,i.jsx)(t.code,{children:"balances.transferKeepAlive"})," and a ",(0,i.jsx)(t.code,{children:"utility.batch"})," transaction with a\ntransfer inside of it). Only monitoring ",(0,i.jsx)(t.code,{children:"balances.transfer"})," transactions will not be sufficient.\nMake sure that you monitor events in each block for events that contain your addresses of interest.\nMonitor events instead of transaction names to ensure that you can properly credit deposits."]}),"\n",(0,i.jsx)(t.h3,{id:"fees",children:"Fees"}),"\n",(0,i.jsxs)(t.p,{children:["Polkadot uses weight-based fees that, unlike gas, are charged ",(0,i.jsx)(t.em,{children:"pre-dispatch."}),' Users can also add a\n"tip" to increase transaction priority during congested periods. See the\n',(0,i.jsx)(t.a,{href:"/docs/learn-transactions#transaction-fees",children:"transaction fee"})," page for more info."]}),"\n",(0,i.jsx)(t.h3,{id:"encoding",children:"Encoding"}),"\n",(0,i.jsxs)(t.p,{children:["Parity's integration tools should allow you to deal with decoded data. If you'd like to bypass them\nand interact directly with the chain data or implement your own codec, Polkadot encodes block and\ntransaction data using the\n",(0,i.jsx)(t.a,{href:"https://github.com/paritytech/parity-scale-codec#parity-scale-codec",children:"SCALE codec"}),"."]}),"\n",(0,i.jsx)(t.h2,{id:"runtime-upgrades",children:"Runtime Upgrades"}),"\n",(0,i.jsxs)(t.p,{children:[(0,i.jsx)(t.a,{href:"/docs/learn-runtime-upgrades",children:"Runtime upgrades"})," allow Polkadot to change the logic of the\nchain without the need for a hard fork. You can find a guide for how to properly perform a runtime\nupgrade here."]}),"\n",(0,i.jsx)(t.h3,{id:"runtime-versioning",children:"Runtime Versioning"}),"\n",(0,i.jsxs)(t.p,{children:["There are a number of fields that are a part of the overall\n",(0,i.jsx)(t.a,{href:"https://paritytech.github.io/polkadot-sdk/master/frame/runtime/apis/struct.RuntimeVersion.html#",children:(0,i.jsx)(t.code,{children:"RuntimeVersion"})}),"."]}),"\n",(0,i.jsxs)(t.p,{children:["Apart the ",(0,i.jsx)(t.code,{children:"runtime_version"})," there is also the ",(0,i.jsx)(t.code,{children:"transaction_version"})," which denotes how to correctly\nencode/decode calls for a given runtime (useful for hardware wallets). The reason\n",(0,i.jsx)(t.code,{children:"transaction_version"})," is separate from ",(0,i.jsx)(t.code,{children:"runtime_version"})," is that it explicitly notes that the call\ninterface is broken/not compatible."]}),"\n",(0,i.jsx)(t.h2,{id:"smart-contracts",children:"Smart Contracts"}),"\n",(0,i.jsxs)(t.p,{children:["The Polkadot relay chain does not support smart contracts, but a number of its parachains do,\n",(0,i.jsx)(t.a,{href:"/docs/build-smart-contracts",children:"see here for more."})]}),"\n",(0,i.jsx)(t.h2,{id:"other-faq",children:"Other F.A.Q."}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.strong,{children:"Can an account's balance change without a corresponding, on-chain transaction?"})}),"\n",(0,i.jsxs)(t.p,{children:["No, but not all balance changes are in a ",(0,i.jsx)(t.em,{children:"transaction,"})," some are in ",(0,i.jsx)(t.em,{children:"events."})," You will need to run\nan archive node and listen for events and transactions to track all account activity. This\nespecially applies to ",(0,i.jsx)(t.em,{children:"locking"})," operations if you are calculating balance as the spendable balance,\ni.e. free balance minus the maximum lock."]}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.strong,{children:'What chain depth is considered "safe"?'})}),"\n",(0,i.jsx)(t.p,{children:"Polkadot uses a deterministic finality mechanism. Once a block is finalized, it cannot be reverted\nexcept by a hard fork. Kusama has had hard forks that had to revert four finalized blocks in order\nto cancel a runtime upgrade. Using a finalized depth of ten blocks should be safe."}),"\n",(0,i.jsx)(t.p,{children:"Note that block production and finality are isolated processes in Polkadot, and the chain can have a\nlong unfinalized head."}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.strong,{children:"Do users need to interact with any smart contracts?"})}),"\n",(0,i.jsx)(t.p,{children:"No, users interact directly with the chain's logic."}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.strong,{children:"Does Polkadot have state rent?"})}),"\n",(0,i.jsx)(t.p,{children:"No, Polkadot uses the existential deposit to prevent dust accounts and other economic mechanisms\nlike locking or reserving tokens for operations that utilize state."}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.strong,{children:"What is an external source to see the current chain height?"})}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsx)(t.li,{children:(0,i.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/explorer",children:"Polkadot-JS explorer"})}),"\n",(0,i.jsx)(t.li,{children:(0,i.jsx)(t.a,{href:"https://www.subscan.io/",children:"Subscan block explorer"})}),"\n"]})]})}function h(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}},47379:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var i=n(90675),a=n(10467),s=n(96540),o=n(19588),r=n(2026),c=n(11135);function l(e,t,n){return d.apply(this,arguments)}function d(){return(d=(0,a.A)((0,i.A)().mark((function e(t,n,a){var s,c,l,d,h;return(0,i.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s=void 0,c=void 0,e.t0=t,e.next="polkadot"===e.t0?5:"kusama"===e.t0?7:"statemine"===e.t0?9:"statemint"===e.t0?11:"polkadotpeople"===e.t0?13:"kusamapeople"===e.t0?15:17;break;case 5:return s="wss://rpc.polkadot.io",e.abrupt("break",18);case 7:return s="wss://kusama-rpc.polkadot.io/",e.abrupt("break",18);case 9:return s="wss://statemine-rpc.polkadot.io/",e.abrupt("break",18);case 11:return s="wss://statemint-rpc.polkadot.io/",e.abrupt("break",18);case 13:return s="wss://polkadot-people-rpc.polkadot.io/",e.abrupt("break",18);case 15:return s="wss://kusama-people-rpc.polkadot.io/",e.abrupt("break",18);case 17:console.log("Unknown socket url provided, no connection made.");case 18:if(void 0!==s){e.next=22;break}return e.abrupt("return");case 22:return l=new o.E(s),e.next=25,r.G.create({provider:l});case 25:d=e.sent,(h=n.split(".")).forEach((function(e){e in d&&(d=d[e])})),e.t1=h[0],e.next="consts"===e.t1?31:"query"===e.t1?33:38;break;case 31:return c=d.toString(),e.abrupt("break",39);case 33:return e.next=35,d();case 35:return c=(c=e.sent).toString(),e.abrupt("break",39);case 38:console.log("Unknown path prefix ("+h[0]+") in "+n);case 39:return e.abrupt("return",c);case 40:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function h(e,t,n,i){switch(t){case"humanReadable":(0,c.HumanReadable)(e,n,i);break;case"precise":(0,c.Precise)(e,n,i);break;case"blocksToDays":(0,c.BlocksToDays)(e,i);break;case"erasToDays":(0,c.ErasToDays)(e,i,n);break;case"percentage":(0,c.Percentage)(e,i);break;case"permillToPercent":(0,c.PermillToPercent)(e,i);break;case"arrayLength":(0,c.ArrayLength)(e,i);break;default:return void console.log("Ignoring unknown filter type")}}const u=function(e){var t=e.network,n=e.path,o=e.defaultValue,r=e.filter,c=void 0===r?void 0:r,d=(0,s.useState)(""),u=d[0],p=d[1];return t=t.toLowerCase(),(0,s.useEffect)((function(){void 0!==c?h(o.toString(),c,t,p):p(o.toString());var e=void 0;switch(t){case"polkadot":e="wss://rpc.polkadot.io";break;case"kusama":e="wss://kusama-rpc.polkadot.io/";break;case"statemine":e="wss://kusama-asset-hub-rpc.polkadot.io/";break;case"statemint":e="wss://polkadot-asset-hub-rpc.polkadot.io/";break;case"kusamapeople":e="wss://kusama-people-rpc.polkadot.io";break;case"polkadotpeople":e="wss://polkadot-people-rpc.polkadot.io";break;default:console.log("Unknown network provided, "+t)}if(void 0===e)console.log("Failed to connect to a valid websocket, applying default");else{var s=function(){var e=(0,a.A)((0,i.A)().mark((function e(){var a;return(0,i.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l(t,n,p);case 2:if(void 0!==(a=e.sent)){e.next=7;break}return e.abrupt("return");case 7:void 0!==c?h(a,c,t,p):p(a);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();try{s()}catch(r){console.log(r)}}}),[]),u}},11135:e=>{var t="polkadot",n="kusama",i="statemine",a="statemint",s="polkadotpeople",o="kusamapeople",r={polkadot:{precision:1e10,symbol:"DOT"},kusama:{precision:1e12,symbol:"KSM"},statemint:{precision:1e10,symbol:"DOT"},statemine:{precision:1e12,symbol:"KSM"},polkadotpeople:{precision:1e10,symbol:"DOT"},kusamapeople:{precision:1e12,symbol:"KSM"}};e.exports={HumanReadable:function(e,c,l){var d=void 0;if(c===t||c===a)d=3;else if(c===n||c===i||c===s)d=6;else{if(c!=o)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");d=8}e=parseFloat(e),l((e=Number.isInteger(e/r[c].precision)?e/r[c].precision+" "+r[c].symbol:(e/r[c].precision).toFixed(d)+" "+r[c].symbol).toString())},Precise:function(e,t,n){n(e=(e=parseFloat(e))/r[t].precision+" "+r[t].symbol)},BlocksToDays:function(e,t){t((e=6*e/86400).toString())},ErasToDays:function(e,r,c){var l=void 0;if(c===t||c===a||c==s)l=1;else{if(c!==n&&c!==i&&c!=o)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");l=4}r((e/=l).toString())},Percentage:function(e,t){t((e/=1e7).toString())},PermillToPercent:function(e,t){t((e/=1e4).toString())},ArrayLength:function(e,t){t((e=e.split(",").length).toString())}}},47790:()=>{}}]); \ No newline at end of file diff --git a/assets/js/1ae2b102.d608f7c5.js b/assets/js/1ae2b102.d608f7c5.js new file mode 100644 index 000000000000..0ba4ff2d2b78 --- /dev/null +++ b/assets/js/1ae2b102.d608f7c5.js @@ -0,0 +1 @@ +(self.webpackChunk=self.webpackChunk||[]).push([[8121],{56195:(e,t,n)=>{"use strict";n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>r,default:()=>h,frontMatter:()=>o,metadata:()=>i,toc:()=>l});const i=JSON.parse('{"id":"build/build-protocol-info","title":"Polkadot Protocol Overview","description":"Characteristics about the Polkadot protocol, and what you need to consider when building.","source":"@site/../docs/build/build-protocol-info.md","sourceDirName":"build","slug":"/build-protocol-info","permalink":"/docs/build-protocol-info","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/build/build-protocol-info.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1726730833000,"frontMatter":{"id":"build-protocol-info","title":"Polkadot Protocol Overview","sidebar_label":"Polkadot Protocol Overview","description":"Characteristics about the Polkadot protocol, and what you need to consider when building.","keywords":["build","protocol","extrinsics","events","transaction"],"slug":"../build-protocol-info"},"sidebar":"docs","previous":{"title":"Coretime Swap","permalink":"/docs/learn-guides-coretime-swap"},"next":{"title":"Using AssetHub","permalink":"/docs/build-integrate-assets"}}');var s=n(74848),a=n(28453);n(47379);const o={id:"build-protocol-info",title:"Polkadot Protocol Overview",sidebar_label:"Polkadot Protocol Overview",description:"Characteristics about the Polkadot protocol, and what you need to consider when building.",keywords:["build","protocol","extrinsics","events","transaction"],slug:"../build-protocol-info"},r=void 0,c={},l=[{value:"Tokens",id:"tokens",level:2},{value:"Redenomination",id:"redenomination",level:3},{value:"Addresses",id:"addresses",level:2},{value:"Cryptography",id:"cryptography",level:3},{value:"Extrinsics and Events",id:"extrinsics-and-events",level:2},{value:"Block Format",id:"block-format",level:3},{value:"Extrinsics",id:"extrinsics",level:3},{value:"Transaction Mortality",id:"transaction-mortality",level:3},{value:"Unique Identifiers for Extrinsics",id:"unique-identifiers-for-extrinsics",level:3},{value:"Events",id:"events",level:3},{value:"Fees",id:"fees",level:3},{value:"Encoding",id:"encoding",level:3},{value:"Runtime Upgrades",id:"runtime-upgrades",level:2},{value:"Runtime Versioning",id:"runtime-versioning",level:3},{value:"Smart Contracts",id:"smart-contracts",level:2},{value:"Other F.A.Q.",id:"other-faq",level:2}];function d(e){const t={a:"a",admonition:"admonition",blockquote:"blockquote",code:"code",em:"em",h2:"h2",h3:"h3",li:"li",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,a.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.p,{children:"This page serves as a high-level introduction to the Polkadot protocol with terminology that may be\nspecific to Polkadot, notable differences to other chains that you may have worked with, and\npractical information for dealing with the chain."}),"\n",(0,s.jsxs)(t.blockquote,{children:["\n",(0,s.jsxs)(t.p,{children:["If the below does not offer a sufficient amount of information regarding the Polkadot protocol, be\nsure to visit the ",(0,s.jsx)(t.a,{href:"https://spec.polkadot.network/id-polkadot-protocol",children:"Polkadot Spec"}),", which is\nmore verbose than this Wiki page."]}),"\n"]}),"\n",(0,s.jsx)(t.h2,{id:"tokens",children:"Tokens"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.strong,{children:"Token decimals:"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:"Polkadot (DOT): 10"}),"\n",(0,s.jsx)(t.li,{children:"Kusama (KSM): 12"}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.strong,{children:"Base unit:"}),' "Planck"']}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.strong,{children:"Balance type:"})," ",(0,s.jsx)(t.a,{href:"https://doc.rust-lang.org/std/u128/index.html",children:(0,s.jsx)(t.code,{children:"u128"})})]}),"\n"]}),"\n",(0,s.jsx)(t.h3,{id:"redenomination",children:"Redenomination"}),"\n",(0,s.jsxs)(t.p,{children:['Polkadot conducted a poll, which ended on 27 July 2020 (block 888_888), in which the stakeholders\ndecided to redenominate the DOT token. The redenomination does not change the number of base units\n(called "plancks" in Polkadot) in the network. The only change is that a single DOT token will be\n1e10 plancks instead of the original 1e12 plancks. See the Polkadot blog posts explaining the\n',(0,s.jsx)(t.a,{href:"https://medium.com/polkadot-network/the-first-polkadot-vote-1fc1b8bd357b",children:"details"})," and the\n",(0,s.jsx)(t.a,{href:"https://medium.com/polkadot-network/the-results-are-in-8f6b1ca2a4e6",children:"results"})," of the vote."]}),"\n",(0,s.jsxs)(t.p,{children:["The redenomination took effect 72 hours after transfers were enabled, at block 1_248_326, which\noccurred at approximately 16:50 UTC on 21 Aug 2020. You can find more information about the\nredenomination ",(0,s.jsx)(t.a,{href:"/docs/learn/learn-redenomination",children:"here"}),"."]}),"\n",(0,s.jsx)(t.h2,{id:"addresses",children:"Addresses"}),"\n",(0,s.jsxs)(t.p,{children:["In Polkadot (and most Substrate chains), user accounts are identified by a 32-byte (256-bit)\n",(0,s.jsx)(t.code,{children:"AccountId"}),". This is often, but not always, the public key of a cryptographic key pair."]}),"\n",(0,s.jsx)(t.p,{children:'Polkadot (and Substrate) use the SS58 address format. This is a broad "meta-format" designed to\nhandle many different cryptographic schemes and chains. It has much in common with Bitcoin\'s\nBase58Check format such as a version prefix, a hash-based checksum suffix, and base-58 encoding.'}),"\n",(0,s.jsxs)(t.p,{children:["See the\n",(0,s.jsx)(t.a,{href:"https://docs.substrate.io/main-docs/fundamentals/accounts-addresses-keys/#address-encoding-and-chain-specific-addresses",children:"SS58 page"}),"\nin the Substrate documentation for encoding information and a more comprehensive list of network\nprefixes."]}),"\n",(0,s.jsx)(t.admonition,{title:"Do not use regular expressions (regex) to validate addresses",type:"warning",children:(0,s.jsxs)(t.p,{children:["Always verify using the prefix and checksum of the address. Substrate API Sidecar provides an\n",(0,s.jsx)(t.code,{children:"accounts/{accountId}/validate"})," path that returns a boolean ",(0,s.jsx)(t.code,{children:"isValid"})," response for a provided\naddress."]})}),"\n",(0,s.jsx)(t.p,{children:"Relevant SS58 prefixes for this guide:"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:"Polkadot: 0"}),"\n",(0,s.jsx)(t.li,{children:"Kusama: 2"}),"\n",(0,s.jsx)(t.li,{children:"Westend: 42"}),"\n"]}),"\n",(0,s.jsx)(t.h3,{id:"cryptography",children:"Cryptography"}),"\n",(0,s.jsxs)(t.p,{children:["Polkadot supports the following ",(0,s.jsx)(t.a,{href:"/docs/learn-cryptography",children:"cryptographic"})," key pairs and\nsigning algorithms:"]}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:"Ed25519"}),"\n",(0,s.jsx)(t.li,{children:"Sr25519 - Schnorr signatures on the Ristretto group"}),"\n",(0,s.jsx)(t.li,{children:"ECDSA signatures on secp256k1"}),"\n"]}),"\n",(0,s.jsxs)(t.p,{children:["Note that the address for a secp256k1 key is the SS58 encoding of the ",(0,s.jsx)(t.em,{children:"hash of the public key"})," in\norder to reduce the public key from 33 bytes to 32 bytes."]}),"\n",(0,s.jsx)(t.h2,{id:"extrinsics-and-events",children:"Extrinsics and Events"}),"\n",(0,s.jsx)(t.h3,{id:"block-format",children:"Block Format"}),"\n",(0,s.jsx)(t.p,{children:"A Polkadot block consists of a block header and a block body. The block body is made up of\nextrinsics representing the generalization of the concept of transactions. Extrinsics can contain\nany external data the underlying chain wishes to validate and track."}),"\n",(0,s.jsx)(t.p,{children:"The block header is a 5-tuple containing the following elements:"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"parent_hash"}),": a 32-byte Blake2b hash of the SCALE encoded parent block header."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"number"}),": an integer representing the index of the current block in the chain. It is equal to the\nnumber of the ancestor blocks. The genesis state has number 0."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"state_root"}),": the root of the Merkle tree, used as storage for the system."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"extrinsics_root"}),": field which is reserved for the Runtime to validate the integrity of the\nextrinsics composing the block body."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"digest"}),": field used to store any chain-specific auxiliary data, which could help the light\nclients interact with the block without the need of accessing the full storage as well as\nconsensus-related data including the block signature."]}),"\n"]}),"\n",(0,s.jsxs)(t.p,{children:["A node creating or receiving a block must gossip that block to the network (i.e. to the other\nnodes). Other nodes within the network will track this announcement and can request information\nabout the block. Additional details on the process are outlined\n",(0,s.jsx)(t.a,{href:"https://spec.polkadot.network/#sect-msg-block-announce",children:"here"})," in the Polkadot Spec."]}),"\n",(0,s.jsx)(t.h3,{id:"extrinsics",children:"Extrinsics"}),"\n",(0,s.jsxs)(t.p,{children:["An extrinsic is a\n",(0,s.jsx)(t.a,{href:"https://github.com/paritytech/parity-scale-codec#parity-scale-codec",children:"SCALE encoded"})," array\nconsisting of a ",(0,s.jsx)(t.code,{children:"version number"}),", ",(0,s.jsx)(t.code,{children:"signature"}),", and varying ",(0,s.jsx)(t.code,{children:"data"})," types indicating the resulting\nruntime function to be called, including the parameters required for that function to be executed."]}),"\n",(0,s.jsx)(t.p,{children:"Extrinsics constitute information from the outside world and take on three forms:"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:"Inherents"}),"\n",(0,s.jsx)(t.li,{children:"Signed Transactions"}),"\n",(0,s.jsx)(t.li,{children:"Unsigned Transactions"}),"\n"]}),"\n",(0,s.jsxs)(t.p,{children:["As an infrastructure provider, you will deal almost exclusively with signed transactions. You will,\nhowever, see other extrinsics within the blocks that you decode. Find more information in the\n",(0,s.jsx)(t.a,{href:"https://docs.substrate.io/main-docs/build/tx-weights-fees/",children:"Substrate documentation"}),"."]}),"\n",(0,s.jsx)(t.p,{children:"Inherent extrinsics are unsigned and contain information that is not provably true, but validators\nagree on based on some measure of reasonability. For example, a timestamp cannot be proved, but\nvalidators can agree that it is within some time difference on their system clock. Inherents are\nbroadcasted as part of the produced blocks rather than being gossiped as individual extrinsics."}),"\n",(0,s.jsx)(t.p,{children:"Signed transactions contain a signature of the account that issued the transaction and stands to pay\na fee to have the transaction included on chain. Because the value of including signed transactions\non-chain can be recognized prior to execution, they can be gossiped on the network between nodes\nwith a low risk of spam. Signed transactions fit the concept of a transaction in Ethereum or\nBitcoin."}),"\n",(0,s.jsx)(t.p,{children:"Some transactions cannot be signed by a fee-paying account and use unsigned transactions. For\nexample, when a user claims their DOT from the Ethereum DOT indicator contract to a new DOT address,\nthe new address doesn't yet have any funds with which to pay fees."}),"\n",(0,s.jsx)(t.p,{children:"The Polkadot Host does not specify or limit the internals of each extrinsics and those are defined\nand dealt with by the Runtime."}),"\n",(0,s.jsx)(t.h3,{id:"transaction-mortality",children:"Transaction Mortality"}),"\n",(0,s.jsx)(t.p,{children:'Extrinsics can be mortal or immortal. The transaction payload includes a block number and block hash\ncheckpoint from which a transaction is valid and a validity period (also called "era" in some\nplaces) that represents the number of blocks after the checkpoint for which the transaction is\nvalid. If the extrinsic is not included in a block within this validity window, it will be discarded\nfrom the transaction queue.'}),"\n",(0,s.jsxs)(t.p,{children:["The chain only stores a limited number of prior block hashes as reference. You can query this\nparameter, called ",(0,s.jsx)(t.a,{href:"/docs/chain-state-values#block-hash-count",children:(0,s.jsx)(t.code,{children:"BlockHashCount"})}),", from the\nchain state or metadata. If the validity period is larger than the number of blocks stored on-chain,\nthen the transaction will only be valid as long as there is a block to check it against, i.e. the\nminimum value of validity period and block hash count."]}),"\n",(0,s.jsx)(t.p,{children:'Setting the block checkpoint to zero, using the genesis hash, and a validity period of zero will\nmake the transaction "immortal".'}),"\n",(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.strong,{children:"NOTE:"})," If an account is reaped and a user re-funds the account, then they could replay an\nimmortal transaction. Always default to using a mortal extrinsic."]}),"\n",(0,s.jsx)(t.h3,{id:"unique-identifiers-for-extrinsics",children:"Unique Identifiers for Extrinsics"}),"\n",(0,s.jsx)(t.admonition,{title:"Transaction Hash is not a unique identifier",type:"caution",children:(0,s.jsx)(t.p,{children:"The assumption that a transaction's hash is a unique identifier is the number one mistake that\nindexing services and custodians make. This error will cause major issues for your users. Make sure\nthat you read this section carefully."})}),"\n",(0,s.jsx)(t.p,{children:"Many infrastructure providers on existing blockchains, e.g. Ethereum, consider a transaction's hash\nas a unique identifier. In Substrate-based chains like Polkadot, a transaction's hash only serves as\na fingerprint of the information within a transaction, and there are times when two transactions\nwith the same hash are both valid. In the case that one is invalid, the network properly handles the\ntransaction and does not charge a transaction fee to the sender nor consider the transaction in the\nblock's fullness."}),"\n",(0,s.jsxs)(t.p,{children:["Imagine this contrived example with a ",(0,s.jsx)(t.a,{href:"#existential-deposit",children:"reaped account"}),". The first and last\ntransactions are identical, and both valid."]}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{style:{textAlign:"center"},children:"Index"}),(0,s.jsx)(t.th,{style:{textAlign:"center"},children:"Hash"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Origin"}),(0,s.jsx)(t.th,{style:{textAlign:"center"},children:"Nonce"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Call"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Results"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"0"}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"0x01"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Account A"}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"0"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Transfer 5 DOT to B"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Account A reaped"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"1"}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"0x02"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Account B"}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"4"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Transfer 7 DOT to A"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Account A created (nonce = 0)"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"2"}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"0x01"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Account A"}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"0"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Transfer 5 DOT to B"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Successful transaction"})]})]})]}),"\n",(0,s.jsxs)(t.p,{children:['In addition, not every extrinsic in a Substrate-based chain comes from an account as a "pure"\npublic/private key pair. The concept of dispatch\n',(0,s.jsx)(t.a,{href:"/docs/learn-account-abstraction#origin-abstraction-in-polkadot",children:"\u201cOrigin\u201d"}),", which could\nrepresent different contexts for a particular, signed extrinsic."]}),"\n",(0,s.jsx)(t.p,{children:"For example, the origin could befrom a public key account, but could also represent a collective.\nThese origins do not have a nonce associated with them the way that an account does. For example,\ngovernance might dispatch the same call with the same arguments multiple times, like \u201cincrease the\nvalidator set by 10%.\u201d This dispatch information (and therefore its hash) would be the same, and the\nhash would be a reliable representative of the call, but its execution would have different effects\ndepending on the chain\u2019s state at the time of dispatch."}),"\n",(0,s.jsxs)(t.p,{children:["The correct way to uniquely identify an extrinsic on a Substrate-based chain is to use the block ID\n(height or hash) and the extrinsic's index. Substrate defines a block as a header and an array of\nextrinsics; therefore, an index in the array at a canonical height will always uniquely identify a\ntransaction. This methodology is reflected in the Substrate codebase itself, for example to\n",(0,s.jsx)(t.a,{href:"https://paritytech.github.io/substrate/master/pallet_multisig/struct.Timepoint.html",children:"reference a previous transaction"}),"\nfrom the Multisig pallet."]}),"\n",(0,s.jsx)(t.h3,{id:"events",children:"Events"}),"\n",(0,s.jsxs)(t.p,{children:["While extrinsics represent information from the outside world, events represent information from the\nchain. Extrinsics can trigger events. For example, the Staking pallet emits a ",(0,s.jsx)(t.code,{children:"Reward"})," event when\nclaiming staking rewards to tell the user how much the account was credited."]}),"\n",(0,s.jsxs)(t.p,{children:["If you want to monitor deposits into an address, keep in mind that several transactions can initiate\na balance transfer (such as ",(0,s.jsx)(t.code,{children:"balances.transferKeepAlive"})," and a ",(0,s.jsx)(t.code,{children:"utility.batch"})," transaction with a\ntransfer inside of it). Only monitoring ",(0,s.jsx)(t.code,{children:"balances.transfer"})," transactions will not be sufficient.\nMake sure that you monitor events in each block for events that contain your addresses of interest.\nMonitor events instead of transaction names to ensure that you can properly credit deposits."]}),"\n",(0,s.jsx)(t.h3,{id:"fees",children:"Fees"}),"\n",(0,s.jsxs)(t.p,{children:["Polkadot uses weight-based fees that, unlike gas, are charged ",(0,s.jsx)(t.em,{children:"pre-dispatch."}),' Users can also add a\n"tip" to increase transaction priority during congested periods. See the\n',(0,s.jsx)(t.a,{href:"/docs/learn-transactions#transaction-fees",children:"transaction fee"})," page for more info."]}),"\n",(0,s.jsx)(t.h3,{id:"encoding",children:"Encoding"}),"\n",(0,s.jsxs)(t.p,{children:["Parity's integration tools should allow you to deal with decoded data. If you'd like to bypass them\nand interact directly with the chain data or implement your own codec, Polkadot encodes block and\ntransaction data using the\n",(0,s.jsx)(t.a,{href:"https://github.com/paritytech/parity-scale-codec#parity-scale-codec",children:"SCALE codec"}),"."]}),"\n",(0,s.jsx)(t.h2,{id:"runtime-upgrades",children:"Runtime Upgrades"}),"\n",(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.a,{href:"/docs/learn-runtime-upgrades",children:"Runtime upgrades"})," allow Polkadot to change the logic of the\nchain without the need for a hard fork. You can find a guide for how to properly perform a runtime\nupgrade here."]}),"\n",(0,s.jsx)(t.h3,{id:"runtime-versioning",children:"Runtime Versioning"}),"\n",(0,s.jsxs)(t.p,{children:["There are a number of fields that are a part of the overall\n",(0,s.jsx)(t.a,{href:"https://paritytech.github.io/polkadot-sdk/master/frame/runtime/apis/struct.RuntimeVersion.html#",children:(0,s.jsx)(t.code,{children:"RuntimeVersion"})}),"."]}),"\n",(0,s.jsxs)(t.p,{children:["Apart the ",(0,s.jsx)(t.code,{children:"runtime_version"})," there is also the ",(0,s.jsx)(t.code,{children:"transaction_version"})," which denotes how to correctly\nencode/decode calls for a given runtime (useful for hardware wallets). The reason\n",(0,s.jsx)(t.code,{children:"transaction_version"})," is separate from ",(0,s.jsx)(t.code,{children:"runtime_version"})," is that it explicitly notes that the call\ninterface is broken/not compatible."]}),"\n",(0,s.jsx)(t.h2,{id:"smart-contracts",children:"Smart Contracts"}),"\n",(0,s.jsxs)(t.p,{children:["The Polkadot relay chain does not support smart contracts, but a number of its parachains do,\n",(0,s.jsx)(t.a,{href:"/docs/build-smart-contracts",children:"see here for more."})]}),"\n",(0,s.jsx)(t.h2,{id:"other-faq",children:"Other F.A.Q."}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.strong,{children:"Can an account's balance change without a corresponding, on-chain transaction?"})}),"\n",(0,s.jsxs)(t.p,{children:["No, but not all balance changes are in a ",(0,s.jsx)(t.em,{children:"transaction,"})," some are in ",(0,s.jsx)(t.em,{children:"events."})," You will need to run\nan archive node and listen for events and transactions to track all account activity. This\nespecially applies to ",(0,s.jsx)(t.em,{children:"locking"})," operations if you are calculating balance as the spendable balance,\ni.e. free balance minus the maximum lock."]}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.strong,{children:'What chain depth is considered "safe"?'})}),"\n",(0,s.jsx)(t.p,{children:"Polkadot uses a deterministic finality mechanism. Once a block is finalized, it cannot be reverted\nexcept by a hard fork. Kusama has had hard forks that had to revert four finalized blocks in order\nto cancel a runtime upgrade. Using a finalized depth of ten blocks should be safe."}),"\n",(0,s.jsx)(t.p,{children:"Note that block production and finality are isolated processes in Polkadot, and the chain can have a\nlong unfinalized head."}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.strong,{children:"Do users need to interact with any smart contracts?"})}),"\n",(0,s.jsx)(t.p,{children:"No, users interact directly with the chain's logic."}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.strong,{children:"Does Polkadot have state rent?"})}),"\n",(0,s.jsx)(t.p,{children:"No, Polkadot uses the existential deposit to prevent dust accounts and other economic mechanisms\nlike locking or reserving tokens for operations that utilize state."}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.strong,{children:"What is an external source to see the current chain height?"})}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/explorer",children:"Polkadot-JS explorer"})}),"\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.a,{href:"https://www.subscan.io/",children:"Subscan block explorer"})}),"\n"]})]})}function h(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},47379:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var i=n(90675),s=n(10467),a=n(96540),o=n(19588),r=n(2026),c=n(11135);function l(e,t,n){return d.apply(this,arguments)}function d(){return(d=(0,s.A)((0,i.A)().mark((function e(t,n,s){var a,c,l,d,h;return(0,i.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a=void 0,c=void 0,e.t0=t,e.next="polkadot"===e.t0?5:"kusama"===e.t0?7:"statemine"===e.t0?9:"statemint"===e.t0?11:"polkadotpeople"===e.t0?13:"kusamapeople"===e.t0?15:17;break;case 5:return a="wss://rpc.polkadot.io",e.abrupt("break",18);case 7:return a="wss://kusama-rpc.polkadot.io/",e.abrupt("break",18);case 9:return a="wss://statemine-rpc.polkadot.io/",e.abrupt("break",18);case 11:return a="wss://statemint-rpc.polkadot.io/",e.abrupt("break",18);case 13:return a="wss://polkadot-people-rpc.polkadot.io/",e.abrupt("break",18);case 15:return a="wss://kusama-people-rpc.polkadot.io/",e.abrupt("break",18);case 17:console.log("Unknown socket url provided, no connection made.");case 18:if(void 0!==a){e.next=22;break}return e.abrupt("return");case 22:return l=new o.E(a),e.next=25,r.G.create({provider:l});case 25:d=e.sent,(h=n.split(".")).forEach((function(e){e in d&&(d=d[e])})),e.t1=h[0],e.next="consts"===e.t1?31:"query"===e.t1?33:38;break;case 31:return c=d.toString(),e.abrupt("break",39);case 33:return e.next=35,d();case 35:return c=(c=e.sent).toString(),e.abrupt("break",39);case 38:console.log("Unknown path prefix ("+h[0]+") in "+n);case 39:return e.abrupt("return",c);case 40:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function h(e,t,n,i){switch(t){case"humanReadable":(0,c.HumanReadable)(e,n,i);break;case"precise":(0,c.Precise)(e,n,i);break;case"blocksToDays":(0,c.BlocksToDays)(e,i);break;case"erasToDays":(0,c.ErasToDays)(e,i,n);break;case"percentage":(0,c.Percentage)(e,i);break;case"permillToPercent":(0,c.PermillToPercent)(e,i);break;case"arrayLength":(0,c.ArrayLength)(e,i);break;default:return void console.log("Ignoring unknown filter type")}}const u=function(e){var t=e.network,n=e.path,o=e.defaultValue,r=e.filter,c=void 0===r?void 0:r,d=(0,a.useState)(""),u=d[0],p=d[1];return t=t.toLowerCase(),(0,a.useEffect)((function(){void 0!==c?h(o.toString(),c,t,p):p(o.toString());var e=void 0;switch(t){case"polkadot":e="wss://rpc.polkadot.io";break;case"kusama":e="wss://kusama-rpc.polkadot.io/";break;case"statemine":e="wss://kusama-asset-hub-rpc.polkadot.io/";break;case"statemint":e="wss://polkadot-asset-hub-rpc.polkadot.io/";break;case"kusamapeople":e="wss://kusama-people-rpc.polkadot.io";break;case"polkadotpeople":e="wss://polkadot-people-rpc.polkadot.io";break;default:console.log("Unknown network provided, "+t)}if(void 0===e)console.log("Failed to connect to a valid websocket, applying default");else{var a=function(){var e=(0,s.A)((0,i.A)().mark((function e(){var s;return(0,i.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l(t,n,p);case 2:if(void 0!==(s=e.sent)){e.next=7;break}return e.abrupt("return");case 7:void 0!==c?h(s,c,t,p):p(s);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();try{a()}catch(r){console.log(r)}}}),[]),u}},11135:e=>{var t="polkadot",n="kusama",i="statemine",s="statemint",a="polkadotpeople",o="kusamapeople",r={polkadot:{precision:1e10,symbol:"DOT"},kusama:{precision:1e12,symbol:"KSM"},statemint:{precision:1e10,symbol:"DOT"},statemine:{precision:1e12,symbol:"KSM"},polkadotpeople:{precision:1e10,symbol:"DOT"},kusamapeople:{precision:1e12,symbol:"KSM"}};e.exports={HumanReadable:function(e,c,l){var d=void 0;if(c===t||c===s)d=3;else if(c===n||c===i||c===a)d=6;else{if(c!=o)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");d=8}e=parseFloat(e),l((e=Number.isInteger(e/r[c].precision)?e/r[c].precision+" "+r[c].symbol:(e/r[c].precision).toFixed(d)+" "+r[c].symbol).toString())},Precise:function(e,t,n){n(e=(e=parseFloat(e))/r[t].precision+" "+r[t].symbol)},BlocksToDays:function(e,t){t((e=6*e/86400).toString())},ErasToDays:function(e,r,c){var l=void 0;if(c===t||c===s||c==a)l=1;else{if(c!==n&&c!==i&&c!=o)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");l=4}r((e/=l).toString())},Percentage:function(e,t){t((e/=1e7).toString())},PermillToPercent:function(e,t){t((e/=1e4).toString())},ArrayLength:function(e,t){t((e=e.split(",").length).toString())}}},47790:()=>{}}]); \ No newline at end of file diff --git a/assets/js/1d6d4797.4b7b41a4.js b/assets/js/1d6d4797.4b7b41a4.js new file mode 100644 index 000000000000..83b9e0e3074a --- /dev/null +++ b/assets/js/1d6d4797.4b7b41a4.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3477],{49012:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>a,default:()=>d,frontMatter:()=>s,metadata:()=>i,toc:()=>o});const i=JSON.parse('{"id":"learn/xcm/journey/learn-xcm-docs-journey-transact","title":"Transact","description":"The Transact Instruction to Execute XCM Calls.","source":"@site/../docs/learn/xcm/journey/transact.md","sourceDirName":"learn/xcm/journey","slug":"/learn/xcm/journey-transact","permalink":"/docs/learn/xcm/journey-transact","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/xcm/journey/transact.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1701272500000,"frontMatter":{"id":"learn-xcm-docs-journey-transact","title":"Transact","sidebar_label":"Transact: A General Solution","description":"The Transact Instruction to Execute XCM Calls.","keywords":["xcm","cross-consensus messaging","transact"],"slug":"../journey-transact"},"sidebar":"docs","previous":{"title":"Fee Handling","permalink":"/docs/learn/xcm/journey-fees"},"next":{"title":"Origin Manipulation","permalink":"/docs/learn/xcm/journey-origin"}}');var r=t(74848),c=t(28453);const s={id:"learn-xcm-docs-journey-transact",title:"Transact",sidebar_label:"Transact: A General Solution",description:"The Transact Instruction to Execute XCM Calls.",keywords:["xcm","cross-consensus messaging","transact"],slug:"../journey-transact"},a="Transact",l={},o=[{value:"XCM Executor",id:"xcm-executor",level:2},{value:"Example 1",id:"example-1",level:2},{value:"Example 2",id:"example-2",level:2},{value:"Next:",id:"next",level:2}];function h(e){const n={a:"a",code:"code",em:"em",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",ul:"ul",...(0,c.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.header,{children:(0,r.jsx)(n.h1,{id:"transact",children:"Transact"})}),"\n",(0,r.jsxs)(n.p,{children:["XCM contains an instruction that allows for the execution of calls (from a ",(0,r.jsx)(n.code,{children:"RuntimeCall"})," in a\nFRAME-based system, to a smart contract function call in an EVM-based system) in a consensus system.\nIt is the ",(0,r.jsx)(n.code,{children:"Transact"})," instruction and it looks like this:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-rust",children:"Transact {\n origin_kind: OriginKind,\n require_weight_at_most: Weight,\n call: DoubleEncoded\n}\n"})}),"\n",(0,r.jsxs)(n.p,{children:["The Transact instruction has three fields. The ",(0,r.jsx)(n.code,{children:"origin_kind"})," is of type\n",(0,r.jsx)(n.a,{href:"https://paritytech.github.io/polkadot/doc/xcm/v2/enum.OriginKind.html",children:"OriginKind"})," and specifies\nhow the origin of the call should be interpreted. In the xcm-executor, the ",(0,r.jsx)(n.code,{children:"origin_kind"})," is used to\ndetermine how to convert a ",(0,r.jsx)(n.code,{children:"MultiLocation"})," origin into a ",(0,r.jsx)(n.code,{children:"RuntimeOrigin"}),". For more information,\ncheck out the ",(0,r.jsx)(n.a,{href:"/docs/learn/xcm/config-deep-dive",children:"xcm-executor config docs"}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.code,{children:"require_weight_at_most"})," field tells the XCVM executing the call how much\n",(0,r.jsx)(n.a,{href:"/docs/learn/xcm/fundamentals-fees",children:"weight"})," it can use. If the call uses more weight than the\nspecified ",(0,r.jsx)(n.code,{children:"require_weight_at_most"}),", the execution of the call fails."]}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.code,{children:"call"})," field is of type ",(0,r.jsx)(n.code,{children:"DoubleEncoded"}),"."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-rust",children:"pub struct DoubleEncoded {\n encoded: Vec,\n #[codec(skip)]\n decoded: Option,\n}\n"})}),"\n",(0,r.jsxs)(n.p,{children:["XCM is consensus system agnostic; it does not know what is being encoded in the call field. Hence,\nthe field is a byte vector that can be freely interpreted in whatever form possible. However, the\nXCVM does not inherently know how to interpret this call field nor how to decode it; it is reliant\non the ",(0,r.jsx)(n.code,{children:"T"})," type parameter to specify the proper codec for the byte vector. Instead of just using a\n",(0,r.jsx)(n.code,{children:"Vec"})," we use ",(0,r.jsx)(n.code,{children:"DoubleEncoded"})," as a wrapper around a pre-encoded call (",(0,r.jsx)(n.code,{children:"Vec"}),") with extra\nfunctionalities such as caching of the decoded value. We like to emphasize that the call in the\n",(0,r.jsx)(n.code,{children:"Transact"})," instruction can be anything from a ",(0,r.jsx)(n.code,{children:"RuntimeCall"})," in a FRAME-based system, to a smart\ncontract function call in an EVM-based system."]}),"\n",(0,r.jsxs)(n.p,{children:["Each XCVM has a Transact Status Register, to record the execution result of the call that is\ndispatched by the ",(0,r.jsx)(n.code,{children:"Transact"})," instruction. ",(0,r.jsx)(n.em,{children:"Important note:"})," The execution of the XCM instruction\ndoes ",(0,r.jsx)(n.em,{children:"not"})," error when the dispatched call errors."]}),"\n",(0,r.jsxs)(n.p,{children:["The status is described by the ",(0,r.jsx)(n.code,{children:"MaybeErrorCode"})," enum, and can either be a Success, Error or\nTruncatedError if the length of the error exceeds the MaxDispatchErrorLen. For pallet-based calls,\nthe Error is represented as the scale encoded ",(0,r.jsx)(n.code,{children:"Error"})," enum of the called pallet."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-rust",children:"ExpectTransactStatus(MaybeErrorCode)\n\npub enum MaybeErrorCode {\n\tSuccess,\n\tError(BoundedVec),\n\tTruncatedError(BoundedVec),\n}\n"})}),"\n",(0,r.jsx)(n.h2,{id:"xcm-executor",children:"XCM Executor"}),"\n",(0,r.jsxs)(n.p,{children:["In this section, we quickly look at how the XCM executor executes the ",(0,r.jsx)(n.code,{children:"Transact"})," instruction."]}),"\n",(0,r.jsx)(n.p,{children:"It executes, among other things, the following steps:"}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsx)(n.li,{children:"Decode the call field into the actual call that we want to dispatch."}),"\n",(0,r.jsxs)(n.li,{children:["Check with the ",(0,r.jsx)(n.a,{href:"/docs/learn/xcm/config-deep-dive#safecallfilter",children:"SafeCallFilter"})," on whether the\nexecution of this call is allowed."]}),"\n",(0,r.jsxs)(n.li,{children:["Use the ",(0,r.jsx)(n.a,{href:"/docs/learn/xcm/config-deep-dive#originconverter",children:"OriginConverter"})," to convert the\n",(0,r.jsx)(n.code,{children:"MultiLocation"})," origin into a ",(0,r.jsx)(n.code,{children:"RuntimeOrigin"}),"."]}),"\n",(0,r.jsxs)(n.li,{children:["Check whether the call weight does not exceed ",(0,r.jsx)(n.code,{children:"require_weight_at_most"}),"."]}),"\n",(0,r.jsxs)(n.li,{children:["Dispatch the call with the converted origin and set the ",(0,r.jsx)(n.code,{children:"transact_status"})," register to be the\nresult of the dispatch."]}),"\n",(0,r.jsx)(n.li,{children:"Calculate the weight that was actually used during the dispatch."}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"example-1",children:"Example 1"}),"\n",(0,r.jsxs)(n.p,{children:["For the full example, check ",(0,r.jsx)(n.a,{href:"https://github.com/paritytech/xcm-docs/tree/main/examples",children:"the repo"}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["In this example, the relay chain executes the ",(0,r.jsx)(n.code,{children:"set_balance"})," function of ",(0,r.jsx)(n.code,{children:"pallet_balances"})," on\n",(0,r.jsx)(n.code,{children:"Parachain(1)"}),". This function requires the origin to be root. We enable the root origin for the\nrelay chain by setting ",(0,r.jsx)(n.code,{children:"ParentAsSuperuser"})," for the ",(0,r.jsx)(n.code,{children:"OriginConverter"})," config type."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-rust",children:"let call = parachain::RuntimeCall::Balances(\n pallet_balances::Call::::set_balance {\n who: ALICE,\n new_free: 5 * AMOUNT,\n new_reserved: 0,\n },\n);\n\nlet message = Xcm(vec![\n WithdrawAsset((Here, AMOUNT).into()),\n BuyExecution { fees: (Here, AMOUNT).into(), weight_limit: WeightLimit::Unlimited },\n Transact {\n origin_kind: OriginKind::Superuser,\n require_weight_at_most: Weight::from_parts(INITIAL_BALANCE as u64, 1024 * 1024),\n call: call.encode().into(),\n },\n]);\n"})}),"\n",(0,r.jsx)(n.h2,{id:"example-2",children:"Example 2"}),"\n",(0,r.jsxs)(n.p,{children:["For the full example, check ",(0,r.jsx)(n.a,{href:"https://github.com/paritytech/xcm-docs/tree/main/examples",children:"the repo"}),"."]}),"\n",(0,r.jsx)(n.p,{children:"In this example, as Parachain(1), we create an NFT collection on the relay chain and we then mint an\nNFT with ID 1. The admin for the nft collection is parachain(1). The call looks as follows:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-rust",children:"let create_collection = relay_chain::RuntimeCall::Uniques(\n pallet_uniques::Call::::create {\n collection: 1u32,\n admin: parachain_sovereign_account_id(1),\n }\n);\n"})}),"\n",(0,r.jsx)(n.p,{children:"The owner of the NFT is Alice. The nft mint call looks as follows:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-rust",children:"let mint = relay_chain::RuntimeCall::Uniques(\n pallet_uniques::Call::::mint {\n collection: 1u32,\n item: 1u32,\n owner: ALICE,\n }\n);\n"})}),"\n",(0,r.jsx)(n.p,{children:"The xcm message contains the following instructions:"}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["Withdraw native assets from the ",(0,r.jsx)(n.code,{children:"Parachain(1)"}),"'s sovereign account."]}),"\n",(0,r.jsx)(n.li,{children:"Buy weight with these assets."}),"\n",(0,r.jsxs)(n.li,{children:["Create a collection with as admin and owner the sovereign account of ",(0,r.jsx)(n.code,{children:"Parachain(1)"}),"."]}),"\n",(0,r.jsx)(n.li,{children:"Mints an NFT in the collection with item ID 1 and as owner Alice."}),"\n"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-rust",children:"let message = Xcm(vec![\n WithdrawAsset((Here, AMOUNT).into()),\n BuyExecution { fees: (Here, AMOUNT).into(), weight_limit: WeightLimit::Unlimited },\n Transact {\n origin_kind: OriginKind::SovereignAccount,\n require_weight_at_most: Weight::from_parts(INITIAL_BALANCE as u64, 1024 * 1024),\n call: create_collection.encode().into(),\n },\n Transact {\n origin_kind: OriginKind::SovereignAccount,\n require_weight_at_most: Weight::from_parts(INITIAL_BALANCE as u64, 1024 * 1024),\n call: mint.encode().into(),\n },\n]);\n"})}),"\n",(0,r.jsx)(n.h2,{id:"next",children:"Next:"}),"\n",(0,r.jsx)(n.p,{children:"Check out the following instructions that interact with the Transact Status Register:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/docs/learn/xcm/journey-register#cleartransactstatus",children:"ClearTransactStatus"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/docs/learn/xcm/journey-queries#reporttransactstatus",children:"ReportTransactStatus"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/docs/learn/xcm/journey-expectations#expecttransactstatus",children:"ExpectTransactStatus"})}),"\n"]})]})}function d(e={}){const{wrapper:n}={...(0,c.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(h,{...e})}):h(e)}},28453:(e,n,t)=>{t.d(n,{R:()=>s,x:()=>a});var i=t(96540);const r={},c=i.createContext(r);function s(e){const n=i.useContext(c);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:s(e.components),i.createElement(c.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/1d6d4797.8362f8c3.js b/assets/js/1d6d4797.8362f8c3.js deleted file mode 100644 index 6662be2b69cf..000000000000 --- a/assets/js/1d6d4797.8362f8c3.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3477],{51976:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>s,default:()=>d,frontMatter:()=>c,metadata:()=>a,toc:()=>o});var i=t(74848),r=t(28453);const c={id:"learn-xcm-docs-journey-transact",title:"Transact",sidebar_label:"Transact: A General Solution",description:"The Transact Instruction to Execute XCM Calls.",keywords:["xcm","cross-consensus messaging","transact"],slug:"../journey-transact"},s="Transact",a={id:"learn/xcm/journey/learn-xcm-docs-journey-transact",title:"Transact",description:"The Transact Instruction to Execute XCM Calls.",source:"@site/../docs/learn/xcm/journey/transact.md",sourceDirName:"learn/xcm/journey",slug:"/learn/xcm/journey-transact",permalink:"/docs/learn/xcm/journey-transact",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/xcm/journey/transact.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:17012725e5,frontMatter:{id:"learn-xcm-docs-journey-transact",title:"Transact",sidebar_label:"Transact: A General Solution",description:"The Transact Instruction to Execute XCM Calls.",keywords:["xcm","cross-consensus messaging","transact"],slug:"../journey-transact"},sidebar:"docs",previous:{title:"Fee Handling",permalink:"/docs/learn/xcm/journey-fees"},next:{title:"Origin Manipulation",permalink:"/docs/learn/xcm/journey-origin"}},l={},o=[{value:"XCM Executor",id:"xcm-executor",level:2},{value:"Example 1",id:"example-1",level:2},{value:"Example 2",id:"example-2",level:2},{value:"Next:",id:"next",level:2}];function h(e){const n={a:"a",code:"code",em:"em",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",ul:"ul",...(0,r.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.header,{children:(0,i.jsx)(n.h1,{id:"transact",children:"Transact"})}),"\n",(0,i.jsxs)(n.p,{children:["XCM contains an instruction that allows for the execution of calls (from a ",(0,i.jsx)(n.code,{children:"RuntimeCall"})," in a\nFRAME-based system, to a smart contract function call in an EVM-based system) in a consensus system.\nIt is the ",(0,i.jsx)(n.code,{children:"Transact"})," instruction and it looks like this:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-rust",children:"Transact {\n origin_kind: OriginKind,\n require_weight_at_most: Weight,\n call: DoubleEncoded\n}\n"})}),"\n",(0,i.jsxs)(n.p,{children:["The Transact instruction has three fields. The ",(0,i.jsx)(n.code,{children:"origin_kind"})," is of type\n",(0,i.jsx)(n.a,{href:"https://paritytech.github.io/polkadot/doc/xcm/v2/enum.OriginKind.html",children:"OriginKind"})," and specifies\nhow the origin of the call should be interpreted. In the xcm-executor, the ",(0,i.jsx)(n.code,{children:"origin_kind"})," is used to\ndetermine how to convert a ",(0,i.jsx)(n.code,{children:"MultiLocation"})," origin into a ",(0,i.jsx)(n.code,{children:"RuntimeOrigin"}),". For more information,\ncheck out the ",(0,i.jsx)(n.a,{href:"/docs/learn/xcm/config-deep-dive",children:"xcm-executor config docs"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.code,{children:"require_weight_at_most"})," field tells the XCVM executing the call how much\n",(0,i.jsx)(n.a,{href:"/docs/learn/xcm/fundamentals-fees",children:"weight"})," it can use. If the call uses more weight than the\nspecified ",(0,i.jsx)(n.code,{children:"require_weight_at_most"}),", the execution of the call fails."]}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.code,{children:"call"})," field is of type ",(0,i.jsx)(n.code,{children:"DoubleEncoded"}),"."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-rust",children:"pub struct DoubleEncoded {\n encoded: Vec,\n #[codec(skip)]\n decoded: Option,\n}\n"})}),"\n",(0,i.jsxs)(n.p,{children:["XCM is consensus system agnostic; it does not know what is being encoded in the call field. Hence,\nthe field is a byte vector that can be freely interpreted in whatever form possible. However, the\nXCVM does not inherently know how to interpret this call field nor how to decode it; it is reliant\non the ",(0,i.jsx)(n.code,{children:"T"})," type parameter to specify the proper codec for the byte vector. Instead of just using a\n",(0,i.jsx)(n.code,{children:"Vec"})," we use ",(0,i.jsx)(n.code,{children:"DoubleEncoded"})," as a wrapper around a pre-encoded call (",(0,i.jsx)(n.code,{children:"Vec"}),") with extra\nfunctionalities such as caching of the decoded value. We like to emphasize that the call in the\n",(0,i.jsx)(n.code,{children:"Transact"})," instruction can be anything from a ",(0,i.jsx)(n.code,{children:"RuntimeCall"})," in a FRAME-based system, to a smart\ncontract function call in an EVM-based system."]}),"\n",(0,i.jsxs)(n.p,{children:["Each XCVM has a Transact Status Register, to record the execution result of the call that is\ndispatched by the ",(0,i.jsx)(n.code,{children:"Transact"})," instruction. ",(0,i.jsx)(n.em,{children:"Important note:"})," The execution of the XCM instruction\ndoes ",(0,i.jsx)(n.em,{children:"not"})," error when the dispatched call errors."]}),"\n",(0,i.jsxs)(n.p,{children:["The status is described by the ",(0,i.jsx)(n.code,{children:"MaybeErrorCode"})," enum, and can either be a Success, Error or\nTruncatedError if the length of the error exceeds the MaxDispatchErrorLen. For pallet-based calls,\nthe Error is represented as the scale encoded ",(0,i.jsx)(n.code,{children:"Error"})," enum of the called pallet."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-rust",children:"ExpectTransactStatus(MaybeErrorCode)\n\npub enum MaybeErrorCode {\n\tSuccess,\n\tError(BoundedVec),\n\tTruncatedError(BoundedVec),\n}\n"})}),"\n",(0,i.jsx)(n.h2,{id:"xcm-executor",children:"XCM Executor"}),"\n",(0,i.jsxs)(n.p,{children:["In this section, we quickly look at how the XCM executor executes the ",(0,i.jsx)(n.code,{children:"Transact"})," instruction."]}),"\n",(0,i.jsx)(n.p,{children:"It executes, among other things, the following steps:"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsx)(n.li,{children:"Decode the call field into the actual call that we want to dispatch."}),"\n",(0,i.jsxs)(n.li,{children:["Check with the ",(0,i.jsx)(n.a,{href:"/docs/learn/xcm/config-deep-dive#safecallfilter",children:"SafeCallFilter"})," on whether the\nexecution of this call is allowed."]}),"\n",(0,i.jsxs)(n.li,{children:["Use the ",(0,i.jsx)(n.a,{href:"/docs/learn/xcm/config-deep-dive#originconverter",children:"OriginConverter"})," to convert the\n",(0,i.jsx)(n.code,{children:"MultiLocation"})," origin into a ",(0,i.jsx)(n.code,{children:"RuntimeOrigin"}),"."]}),"\n",(0,i.jsxs)(n.li,{children:["Check whether the call weight does not exceed ",(0,i.jsx)(n.code,{children:"require_weight_at_most"}),"."]}),"\n",(0,i.jsxs)(n.li,{children:["Dispatch the call with the converted origin and set the ",(0,i.jsx)(n.code,{children:"transact_status"})," register to be the\nresult of the dispatch."]}),"\n",(0,i.jsx)(n.li,{children:"Calculate the weight that was actually used during the dispatch."}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"example-1",children:"Example 1"}),"\n",(0,i.jsxs)(n.p,{children:["For the full example, check ",(0,i.jsx)(n.a,{href:"https://github.com/paritytech/xcm-docs/tree/main/examples",children:"the repo"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["In this example, the relay chain executes the ",(0,i.jsx)(n.code,{children:"set_balance"})," function of ",(0,i.jsx)(n.code,{children:"pallet_balances"})," on\n",(0,i.jsx)(n.code,{children:"Parachain(1)"}),". This function requires the origin to be root. We enable the root origin for the\nrelay chain by setting ",(0,i.jsx)(n.code,{children:"ParentAsSuperuser"})," for the ",(0,i.jsx)(n.code,{children:"OriginConverter"})," config type."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-rust",children:"let call = parachain::RuntimeCall::Balances(\n pallet_balances::Call::::set_balance {\n who: ALICE,\n new_free: 5 * AMOUNT,\n new_reserved: 0,\n },\n);\n\nlet message = Xcm(vec![\n WithdrawAsset((Here, AMOUNT).into()),\n BuyExecution { fees: (Here, AMOUNT).into(), weight_limit: WeightLimit::Unlimited },\n Transact {\n origin_kind: OriginKind::Superuser,\n require_weight_at_most: Weight::from_parts(INITIAL_BALANCE as u64, 1024 * 1024),\n call: call.encode().into(),\n },\n]);\n"})}),"\n",(0,i.jsx)(n.h2,{id:"example-2",children:"Example 2"}),"\n",(0,i.jsxs)(n.p,{children:["For the full example, check ",(0,i.jsx)(n.a,{href:"https://github.com/paritytech/xcm-docs/tree/main/examples",children:"the repo"}),"."]}),"\n",(0,i.jsx)(n.p,{children:"In this example, as Parachain(1), we create an NFT collection on the relay chain and we then mint an\nNFT with ID 1. The admin for the nft collection is parachain(1). The call looks as follows:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-rust",children:"let create_collection = relay_chain::RuntimeCall::Uniques(\n pallet_uniques::Call::::create {\n collection: 1u32,\n admin: parachain_sovereign_account_id(1),\n }\n);\n"})}),"\n",(0,i.jsx)(n.p,{children:"The owner of the NFT is Alice. The nft mint call looks as follows:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-rust",children:"let mint = relay_chain::RuntimeCall::Uniques(\n pallet_uniques::Call::::mint {\n collection: 1u32,\n item: 1u32,\n owner: ALICE,\n }\n);\n"})}),"\n",(0,i.jsx)(n.p,{children:"The xcm message contains the following instructions:"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsxs)(n.li,{children:["Withdraw native assets from the ",(0,i.jsx)(n.code,{children:"Parachain(1)"}),"'s sovereign account."]}),"\n",(0,i.jsx)(n.li,{children:"Buy weight with these assets."}),"\n",(0,i.jsxs)(n.li,{children:["Create a collection with as admin and owner the sovereign account of ",(0,i.jsx)(n.code,{children:"Parachain(1)"}),"."]}),"\n",(0,i.jsx)(n.li,{children:"Mints an NFT in the collection with item ID 1 and as owner Alice."}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-rust",children:"let message = Xcm(vec![\n WithdrawAsset((Here, AMOUNT).into()),\n BuyExecution { fees: (Here, AMOUNT).into(), weight_limit: WeightLimit::Unlimited },\n Transact {\n origin_kind: OriginKind::SovereignAccount,\n require_weight_at_most: Weight::from_parts(INITIAL_BALANCE as u64, 1024 * 1024),\n call: create_collection.encode().into(),\n },\n Transact {\n origin_kind: OriginKind::SovereignAccount,\n require_weight_at_most: Weight::from_parts(INITIAL_BALANCE as u64, 1024 * 1024),\n call: mint.encode().into(),\n },\n]);\n"})}),"\n",(0,i.jsx)(n.h2,{id:"next",children:"Next:"}),"\n",(0,i.jsx)(n.p,{children:"Check out the following instructions that interact with the Transact Status Register:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"/docs/learn/xcm/journey-register#cleartransactstatus",children:"ClearTransactStatus"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"/docs/learn/xcm/journey-queries#reporttransactstatus",children:"ReportTransactStatus"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"/docs/learn/xcm/journey-expectations#expecttransactstatus",children:"ExpectTransactStatus"})}),"\n"]})]})}function d(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(h,{...e})}):h(e)}},28453:(e,n,t)=>{t.d(n,{R:()=>s,x:()=>a});var i=t(96540);const r={},c=i.createContext(r);function s(e){const n=i.useContext(c);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:s(e.components),i.createElement(c.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/1e15616a.7431cbbe.js b/assets/js/1e15616a.7431cbbe.js new file mode 100644 index 000000000000..669d18b26bf2 --- /dev/null +++ b/assets/js/1e15616a.7431cbbe.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3751],{20526:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>o,contentTitle:()=>r,default:()=>d,frontMatter:()=>l,metadata:()=>a,toc:()=>c});const a=JSON.parse('{"id":"learn/learn-wasm","title":"WebAssembly (Wasm)","description":"WASM and its Role in Polkadot\'s Runtime.","source":"@site/../docs/learn/learn-wasm.md","sourceDirName":"learn","slug":"/learn-wasm","permalink":"/docs/learn-wasm","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-wasm.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1688135081000,"frontMatter":{"id":"learn-wasm","title":"WebAssembly (Wasm)","sidebar_label":"WebAssembly (Wasm)","description":"WASM and its Role in Polkadot\'s Runtime.","keywords":["webassembly","wasm","runtime"],"slug":"../learn-wasm"},"sidebar":"docs","previous":{"title":"Polkadot Host","permalink":"/docs/learn-polkadot-host"},"next":{"title":"Runtime Upgrades","permalink":"/docs/learn-runtime-upgrades"}}');var n=t(74848),i=t(28453);const l={id:"learn-wasm",title:"WebAssembly (Wasm)",sidebar_label:"WebAssembly (Wasm)",description:"WASM and its Role in Polkadot's Runtime.",keywords:["webassembly","wasm","runtime"],slug:"../learn-wasm"},r=void 0,o={},c=[{value:"What is WebAssembly?",id:"what-is-webassembly",level:2},{value:"Why WebAssembly?",id:"why-webassembly",level:2},{value:"Resources",id:"resources",level:2}];function m(e){const s={a:"a",em:"em",h2:"h2",li:"li",p:"p",ul:"ul",...(0,i.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.p,{children:"WebAssembly is used in Polkadot and Substrate as the compilation target for the runtime."}),"\n",(0,n.jsx)(s.h2,{id:"what-is-webassembly",children:"What is WebAssembly?"}),"\n",(0,n.jsxs)(s.p,{children:["WebAssembly, shortened to ",(0,n.jsx)(s.em,{children:"Wasm"}),", is a binary instruction format for a stack-based virtual machine.\nWasm is designed as a portable target for the compilation of high-level languages like C/C++/Rust,\nenabling deployment on the web for client and server applications."]}),"\n",(0,n.jsx)(s.h2,{id:"why-webassembly",children:"Why WebAssembly?"}),"\n",(0,n.jsx)(s.p,{children:"WebAssembly is a platform-agnostic binary format, meaning it will run the exact instructions across\nwhatever machine it operates on. Blockchains need determinacy to have reliable state transition\nupdates across all nodes in the peer-to-peer network without forcing every peer to run the same\nhardware. Wasm is an excellent fit for reliability among the diverse set of machines. Wasm is both\nefficient and fast. The efficiency means that it can be uploaded onto the chain as a blob of code\nwithout causing too much state bloat while keeping its ability to execute at near-native speeds."}),"\n",(0,n.jsx)(s.h2,{id:"resources",children:"Resources"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"https://webassembly.org/",children:"WebAssembly.org"})," - WebAssembly homepage that contains a link to the\nspec."]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"https://github.com/paritytech/Wasmi",children:"Wasmi"})," - WebAssembly interpreter written in Rust."]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"https://github.com/paritytech/parity-Wasm",children:"Parity Wasm"})," - WebAssembly\nserialization/deserialization in Rust."]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"https://github.com/paritytech/Wasm-utils",children:"Wasm utils"})," - Collection of Wasm utilities used in\nParity and Wasm contract development."]}),"\n"]})]})}function d(e={}){const{wrapper:s}={...(0,i.R)(),...e.components};return s?(0,n.jsx)(s,{...e,children:(0,n.jsx)(m,{...e})}):m(e)}},28453:(e,s,t)=>{t.d(s,{R:()=>l,x:()=>r});var a=t(96540);const n={},i=a.createContext(n);function l(e){const s=a.useContext(i);return a.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function r(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:l(e.components),a.createElement(i.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/1e15616a.76e8322c.js b/assets/js/1e15616a.76e8322c.js deleted file mode 100644 index 0180e2df17d7..000000000000 --- a/assets/js/1e15616a.76e8322c.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3751],{59247:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>o,contentTitle:()=>r,default:()=>d,frontMatter:()=>i,metadata:()=>l,toc:()=>c});var n=t(74848),a=t(28453);const i={id:"learn-wasm",title:"WebAssembly (Wasm)",sidebar_label:"WebAssembly (Wasm)",description:"WASM and its Role in Polkadot's Runtime.",keywords:["webassembly","wasm","runtime"],slug:"../learn-wasm"},r=void 0,l={id:"learn/learn-wasm",title:"WebAssembly (Wasm)",description:"WASM and its Role in Polkadot's Runtime.",source:"@site/../docs/learn/learn-wasm.md",sourceDirName:"learn",slug:"/learn-wasm",permalink:"/docs/learn-wasm",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-wasm.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1688135081e3,frontMatter:{id:"learn-wasm",title:"WebAssembly (Wasm)",sidebar_label:"WebAssembly (Wasm)",description:"WASM and its Role in Polkadot's Runtime.",keywords:["webassembly","wasm","runtime"],slug:"../learn-wasm"},sidebar:"docs",previous:{title:"Polkadot Host",permalink:"/docs/learn-polkadot-host"},next:{title:"Runtime Upgrades",permalink:"/docs/learn-runtime-upgrades"}},o={},c=[{value:"What is WebAssembly?",id:"what-is-webassembly",level:2},{value:"Why WebAssembly?",id:"why-webassembly",level:2},{value:"Resources",id:"resources",level:2}];function m(e){const s={a:"a",em:"em",h2:"h2",li:"li",p:"p",ul:"ul",...(0,a.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.p,{children:"WebAssembly is used in Polkadot and Substrate as the compilation target for the runtime."}),"\n",(0,n.jsx)(s.h2,{id:"what-is-webassembly",children:"What is WebAssembly?"}),"\n",(0,n.jsxs)(s.p,{children:["WebAssembly, shortened to ",(0,n.jsx)(s.em,{children:"Wasm"}),", is a binary instruction format for a stack-based virtual machine.\nWasm is designed as a portable target for the compilation of high-level languages like C/C++/Rust,\nenabling deployment on the web for client and server applications."]}),"\n",(0,n.jsx)(s.h2,{id:"why-webassembly",children:"Why WebAssembly?"}),"\n",(0,n.jsx)(s.p,{children:"WebAssembly is a platform-agnostic binary format, meaning it will run the exact instructions across\nwhatever machine it operates on. Blockchains need determinacy to have reliable state transition\nupdates across all nodes in the peer-to-peer network without forcing every peer to run the same\nhardware. Wasm is an excellent fit for reliability among the diverse set of machines. Wasm is both\nefficient and fast. The efficiency means that it can be uploaded onto the chain as a blob of code\nwithout causing too much state bloat while keeping its ability to execute at near-native speeds."}),"\n",(0,n.jsx)(s.h2,{id:"resources",children:"Resources"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"https://webassembly.org/",children:"WebAssembly.org"})," - WebAssembly homepage that contains a link to the\nspec."]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"https://github.com/paritytech/Wasmi",children:"Wasmi"})," - WebAssembly interpreter written in Rust."]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"https://github.com/paritytech/parity-Wasm",children:"Parity Wasm"})," - WebAssembly\nserialization/deserialization in Rust."]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"https://github.com/paritytech/Wasm-utils",children:"Wasm utils"})," - Collection of Wasm utilities used in\nParity and Wasm contract development."]}),"\n"]})]})}function d(e={}){const{wrapper:s}={...(0,a.R)(),...e.components};return s?(0,n.jsx)(s,{...e,children:(0,n.jsx)(m,{...e})}):m(e)}},28453:(e,s,t)=>{t.d(s,{R:()=>r,x:()=>l});var n=t(96540);const a={},i=n.createContext(a);function r(e){const s=n.useContext(i);return n.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function l(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:r(e.components),n.createElement(i.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/1ed3671a.1da1845c.js b/assets/js/1ed3671a.1da1845c.js deleted file mode 100644 index a99a46a2fde0..000000000000 --- a/assets/js/1ed3671a.1da1845c.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3377],{29320:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>c,contentTitle:()=>r,default:()=>h,frontMatter:()=>i,metadata:()=>o,toc:()=>l});var n=t(74848),a=t(28453);const i={id:"learn-xcm-docs-journey-assets",title:"Trap and Claim Assets",sidebar_label:"Trap and Claim Assets",description:"Instructions to Trap and Claim Assets.",keywords:["xcm","cross-consensus messaging","trap","claim","assets"],slug:"../journey-assets"},r="Trapping and Claiming assets.",o={id:"learn/xcm/journey/learn-xcm-docs-journey-assets",title:"Trap and Claim Assets",description:"Instructions to Trap and Claim Assets.",source:"@site/../docs/learn/xcm/journey/trap-and-claim.md",sourceDirName:"learn/xcm/journey",slug:"/learn/xcm/journey-assets",permalink:"/docs/learn/xcm/journey-assets",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/xcm/journey/trap-and-claim.md",tags:[],version:"current",lastUpdatedBy:"bader y",lastUpdatedAt:1694099593e3,frontMatter:{id:"learn-xcm-docs-journey-assets",title:"Trap and Claim Assets",sidebar_label:"Trap and Claim Assets",description:"Instructions to Trap and Claim Assets.",keywords:["xcm","cross-consensus messaging","trap","claim","assets"],slug:"../journey-assets"},sidebar:"docs",previous:{title:"More Holding Modifiers",permalink:"/docs/learn/xcm/journey-holding"},next:{title:"Expectations",permalink:"/docs/learn/xcm/journey-expectations"}},c={},l=[{value:"Trap",id:"trap",level:2},{value:"ClaimAsset",id:"claimasset",level:2},{value:"Example",id:"example",level:2}];function d(e){const s={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,a.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.header,{children:(0,n.jsx)(s.h1,{id:"trapping-and-claiming-assets",children:"Trapping and Claiming assets."})}),"\n",(0,n.jsx)(s.p,{children:"When we reach the end of the execution of the XCM there can still be assets in the Holding Register.\nWe can do nothing with them (essentially burning the assets) or we can trap the assets. When we trap\nthe assets, we keep track of the assets together with the origin of the XCM. The origin can claim\nthe assets back in one of the next XCMs. We have two instructions related to trapping and claiming\nassets:"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsx)(s.li,{children:(0,n.jsx)(s.code,{children:"Trap"})}),"\n",(0,n.jsx)(s.li,{children:(0,n.jsx)(s.code,{children:"ClaimAsset"})}),"\n"]}),"\n",(0,n.jsx)(s.h2,{id:"trap",children:"Trap"}),"\n",(0,n.jsx)(s.pre,{children:(0,n.jsx)(s.code,{className:"language-rust",children:"Trap(#[codec(compact)] u64)\n"})}),"\n",(0,n.jsxs)(s.p,{children:["The ",(0,n.jsx)(s.code,{children:"Trap"})," instruction throws an error of type ",(0,n.jsx)(s.code,{children:"Trap"}),". Both the Trap instruction and Trap error take\nan ",(0,n.jsx)(s.code,{children:"u64"})," that can be used to represent some value. The Trap instruction is useful for throwing\ncustom errors. An important thing to note is that the Trap instruction does not directly trap\nassets. It can however forcefully halt the further execution of instructions and if there are still\nassets in the Holding Register, these assets can be trapped."]}),"\n",(0,n.jsx)(s.h2,{id:"claimasset",children:"ClaimAsset"}),"\n",(0,n.jsx)(s.pre,{children:(0,n.jsx)(s.code,{className:"language-rust",children:"ClaimAsset { assets: MultiAssets, ticket: MultiLocation }\n"})}),"\n",(0,n.jsxs)(s.p,{children:["Once assets are trapped, the ",(0,n.jsx)(s.code,{children:"ClaimAsset"})," instruction can be used to claim the assets. The\n",(0,n.jsx)(s.code,{children:"ClaimAsset"})," instruction has two fields."]}),"\n",(0,n.jsxs)(s.p,{children:["The ",(0,n.jsx)(s.code,{children:"assets"})," field tells which trapped assets should be claimed. This must match exactly with the\nassets claimable by the origin."]}),"\n",(0,n.jsxs)(s.p,{children:["The ",(0,n.jsx)(s.code,{children:"ticket"})," field is an identifier that helps locating the asset. It is, for example, useful for\ndistinguishing between Asset Versions. Lets say we have an XCM V2 trapped asset and send an XCM V3\n",(0,n.jsx)(s.code,{children:"ClaimAsset"})," instruction, then the ",(0,n.jsx)(s.code,{children:"ticket"})," field can be used to tell between the versions. In the\nxcm-pallet, ",(0,n.jsx)(s.code,{children:"Here"})," is used to describe the same version as the ",(0,n.jsx)(s.code,{children:"ClaimAsset"})," instruction, while the\n",(0,n.jsx)(s.code,{children:"GeneralIndex"})," Junction is used to describe other XCM versions."]}),"\n",(0,n.jsx)(s.h2,{id:"example",children:"Example"}),"\n",(0,n.jsxs)(s.p,{children:["The full example can be found ",(0,n.jsx)(s.a,{href:"https://github.com/paritytech/xcm-docs/tree/main/examples",children:"here"}),"."]}),"\n",(0,n.jsx)(s.p,{children:"The scenario of the example is this: Parachain A withdraws funds from its sovereign account on the\nrelay chain. The assets are trapped because an error is thrown and the execution is halted.\nParachain A claims the trapped assets and receives a report of the holding register."}),"\n",(0,n.jsxs)(s.p,{children:["Parachain A sends the following message to the relay chain. The message errors because of the ",(0,n.jsx)(s.code,{children:"Trap"}),"\ninstruction, so all assets in the Holding Register are trapped."]}),"\n",(0,n.jsx)(s.pre,{children:(0,n.jsx)(s.code,{className:"language-rust,",metastring:"noplayground",children:"let message = Xcm(vec![\n WithdrawAsset((Here, 10 * CENTS).into()),\n BuyExecution { fees: (Here, CENTS).into(), weight_limit: WeightLimit::Unlimited },\n Trap(0), // <-- Errors\n DepositAsset { // <-- Not executed because of error.\n assets: All.into(),\n beneficiary: AccountId32 {\n network: Some(parachain::RelayNetwork::get()),\n id: ALICE.into()\n }.into()\n }\n]);\n"})}),"\n",(0,n.jsx)(s.p,{children:"Parachain A claims the assets, reports them to itself and deposits them in the Account of Alice."}),"\n",(0,n.jsx)(s.pre,{children:(0,n.jsx)(s.code,{className:"language-rust,",metastring:"noplayground",children:"let claim_message = Xcm(vec![\n ClaimAsset { assets: (Here, 10 * CENTS).into(), ticket: Here.into() },\n ReportHolding {\n response_info: QueryResponseInfo {\n destination: Parachain(1).into(),\n query_id: QUERY_ID,\n max_weight: Weight::from_parts(1_000_000_000, 64*64) },\n assets: All.into()\n },\n DepositAsset {\n assets: All.into(),\n beneficiary: AccountId32 {\n network: Some(parachain::RelayNetwork::get()),\n id: ALICE.into()\n }.into()\n },\n]);\n"})})]})}function h(e={}){const{wrapper:s}={...(0,a.R)(),...e.components};return s?(0,n.jsx)(s,{...e,children:(0,n.jsx)(d,{...e})}):d(e)}},28453:(e,s,t)=>{t.d(s,{R:()=>r,x:()=>o});var n=t(96540);const a={},i=n.createContext(a);function r(e){const s=n.useContext(i);return n.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function o(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:r(e.components),n.createElement(i.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/1ed3671a.4e3dcae2.js b/assets/js/1ed3671a.4e3dcae2.js new file mode 100644 index 000000000000..10e846dfc209 --- /dev/null +++ b/assets/js/1ed3671a.4e3dcae2.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3377],{4730:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>c,contentTitle:()=>o,default:()=>h,frontMatter:()=>r,metadata:()=>n,toc:()=>l});const n=JSON.parse('{"id":"learn/xcm/journey/learn-xcm-docs-journey-assets","title":"Trap and Claim Assets","description":"Instructions to Trap and Claim Assets.","source":"@site/../docs/learn/xcm/journey/trap-and-claim.md","sourceDirName":"learn/xcm/journey","slug":"/learn/xcm/journey-assets","permalink":"/docs/learn/xcm/journey-assets","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/xcm/journey/trap-and-claim.md","tags":[],"version":"current","lastUpdatedBy":"bader y","lastUpdatedAt":1694099593000,"frontMatter":{"id":"learn-xcm-docs-journey-assets","title":"Trap and Claim Assets","sidebar_label":"Trap and Claim Assets","description":"Instructions to Trap and Claim Assets.","keywords":["xcm","cross-consensus messaging","trap","claim","assets"],"slug":"../journey-assets"},"sidebar":"docs","previous":{"title":"More Holding Modifiers","permalink":"/docs/learn/xcm/journey-holding"},"next":{"title":"Expectations","permalink":"/docs/learn/xcm/journey-expectations"}}');var a=t(74848),i=t(28453);const r={id:"learn-xcm-docs-journey-assets",title:"Trap and Claim Assets",sidebar_label:"Trap and Claim Assets",description:"Instructions to Trap and Claim Assets.",keywords:["xcm","cross-consensus messaging","trap","claim","assets"],slug:"../journey-assets"},o="Trapping and Claiming assets.",c={},l=[{value:"Trap",id:"trap",level:2},{value:"ClaimAsset",id:"claimasset",level:2},{value:"Example",id:"example",level:2}];function d(e){const s={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,i.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(s.header,{children:(0,a.jsx)(s.h1,{id:"trapping-and-claiming-assets",children:"Trapping and Claiming assets."})}),"\n",(0,a.jsx)(s.p,{children:"When we reach the end of the execution of the XCM there can still be assets in the Holding Register.\nWe can do nothing with them (essentially burning the assets) or we can trap the assets. When we trap\nthe assets, we keep track of the assets together with the origin of the XCM. The origin can claim\nthe assets back in one of the next XCMs. We have two instructions related to trapping and claiming\nassets:"}),"\n",(0,a.jsxs)(s.ul,{children:["\n",(0,a.jsx)(s.li,{children:(0,a.jsx)(s.code,{children:"Trap"})}),"\n",(0,a.jsx)(s.li,{children:(0,a.jsx)(s.code,{children:"ClaimAsset"})}),"\n"]}),"\n",(0,a.jsx)(s.h2,{id:"trap",children:"Trap"}),"\n",(0,a.jsx)(s.pre,{children:(0,a.jsx)(s.code,{className:"language-rust",children:"Trap(#[codec(compact)] u64)\n"})}),"\n",(0,a.jsxs)(s.p,{children:["The ",(0,a.jsx)(s.code,{children:"Trap"})," instruction throws an error of type ",(0,a.jsx)(s.code,{children:"Trap"}),". Both the Trap instruction and Trap error take\nan ",(0,a.jsx)(s.code,{children:"u64"})," that can be used to represent some value. The Trap instruction is useful for throwing\ncustom errors. An important thing to note is that the Trap instruction does not directly trap\nassets. It can however forcefully halt the further execution of instructions and if there are still\nassets in the Holding Register, these assets can be trapped."]}),"\n",(0,a.jsx)(s.h2,{id:"claimasset",children:"ClaimAsset"}),"\n",(0,a.jsx)(s.pre,{children:(0,a.jsx)(s.code,{className:"language-rust",children:"ClaimAsset { assets: MultiAssets, ticket: MultiLocation }\n"})}),"\n",(0,a.jsxs)(s.p,{children:["Once assets are trapped, the ",(0,a.jsx)(s.code,{children:"ClaimAsset"})," instruction can be used to claim the assets. The\n",(0,a.jsx)(s.code,{children:"ClaimAsset"})," instruction has two fields."]}),"\n",(0,a.jsxs)(s.p,{children:["The ",(0,a.jsx)(s.code,{children:"assets"})," field tells which trapped assets should be claimed. This must match exactly with the\nassets claimable by the origin."]}),"\n",(0,a.jsxs)(s.p,{children:["The ",(0,a.jsx)(s.code,{children:"ticket"})," field is an identifier that helps locating the asset. It is, for example, useful for\ndistinguishing between Asset Versions. Lets say we have an XCM V2 trapped asset and send an XCM V3\n",(0,a.jsx)(s.code,{children:"ClaimAsset"})," instruction, then the ",(0,a.jsx)(s.code,{children:"ticket"})," field can be used to tell between the versions. In the\nxcm-pallet, ",(0,a.jsx)(s.code,{children:"Here"})," is used to describe the same version as the ",(0,a.jsx)(s.code,{children:"ClaimAsset"})," instruction, while the\n",(0,a.jsx)(s.code,{children:"GeneralIndex"})," Junction is used to describe other XCM versions."]}),"\n",(0,a.jsx)(s.h2,{id:"example",children:"Example"}),"\n",(0,a.jsxs)(s.p,{children:["The full example can be found ",(0,a.jsx)(s.a,{href:"https://github.com/paritytech/xcm-docs/tree/main/examples",children:"here"}),"."]}),"\n",(0,a.jsx)(s.p,{children:"The scenario of the example is this: Parachain A withdraws funds from its sovereign account on the\nrelay chain. The assets are trapped because an error is thrown and the execution is halted.\nParachain A claims the trapped assets and receives a report of the holding register."}),"\n",(0,a.jsxs)(s.p,{children:["Parachain A sends the following message to the relay chain. The message errors because of the ",(0,a.jsx)(s.code,{children:"Trap"}),"\ninstruction, so all assets in the Holding Register are trapped."]}),"\n",(0,a.jsx)(s.pre,{children:(0,a.jsx)(s.code,{className:"language-rust,",metastring:"noplayground",children:"let message = Xcm(vec![\n WithdrawAsset((Here, 10 * CENTS).into()),\n BuyExecution { fees: (Here, CENTS).into(), weight_limit: WeightLimit::Unlimited },\n Trap(0), // <-- Errors\n DepositAsset { // <-- Not executed because of error.\n assets: All.into(),\n beneficiary: AccountId32 {\n network: Some(parachain::RelayNetwork::get()),\n id: ALICE.into()\n }.into()\n }\n]);\n"})}),"\n",(0,a.jsx)(s.p,{children:"Parachain A claims the assets, reports them to itself and deposits them in the Account of Alice."}),"\n",(0,a.jsx)(s.pre,{children:(0,a.jsx)(s.code,{className:"language-rust,",metastring:"noplayground",children:"let claim_message = Xcm(vec![\n ClaimAsset { assets: (Here, 10 * CENTS).into(), ticket: Here.into() },\n ReportHolding {\n response_info: QueryResponseInfo {\n destination: Parachain(1).into(),\n query_id: QUERY_ID,\n max_weight: Weight::from_parts(1_000_000_000, 64*64) },\n assets: All.into()\n },\n DepositAsset {\n assets: All.into(),\n beneficiary: AccountId32 {\n network: Some(parachain::RelayNetwork::get()),\n id: ALICE.into()\n }.into()\n },\n]);\n"})})]})}function h(e={}){const{wrapper:s}={...(0,i.R)(),...e.components};return s?(0,a.jsx)(s,{...e,children:(0,a.jsx)(d,{...e})}):d(e)}},28453:(e,s,t)=>{t.d(s,{R:()=>r,x:()=>o});var n=t(96540);const a={},i=n.createContext(a);function r(e){const s=n.useContext(i);return n.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function o(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:r(e.components),n.createElement(i.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/2144.7a603aa3.js b/assets/js/2144.7a603aa3.js deleted file mode 100644 index 8de410382663..000000000000 --- a/assets/js/2144.7a603aa3.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2144],{82144:(t,e,n)=>{n.d(e,{diagram:()=>j});var i=n(86079),s=n(26312),r=n(79186),a=(n(74353),n(16750),n(42838),function(){var t=function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n},e=[6,8,10,11,12,14,16,17,18],n=[1,9],i=[1,10],s=[1,11],r=[1,12],a=[1,13],o=[1,14],l={trace:function(){},yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:function(t,e,n,i,s,r,a){var o=r.length-1;switch(s){case 1:return r[o-1];case 2:case 6:case 7:this.$=[];break;case 3:r[o-1].push(r[o]),this.$=r[o-1];break;case 4:case 5:this.$=r[o];break;case 8:i.setDiagramTitle(r[o].substr(6)),this.$=r[o].substr(6);break;case 9:this.$=r[o].trim(),i.setAccTitle(this.$);break;case 10:case 11:this.$=r[o].trim(),i.setAccDescription(this.$);break;case 12:i.addSection(r[o].substr(8)),this.$=r[o].substr(8);break;case 13:i.addTask(r[o-1],r[o]),this.$="task"}},table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:n,12:i,14:s,16:r,17:a,18:o},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:n,12:i,14:s,16:r,17:a,18:o},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],i=[],s=[null],r=[],a=this.table,o="",l=0,c=0,h=r.slice.call(arguments,1),y=Object.create(this.lexer),u={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(u.yy[p]=this.yy[p]);y.setInput(t,u.yy),u.yy.lexer=y,u.yy.parser=this,void 0===y.yylloc&&(y.yylloc={});var d=y.yylloc;r.push(d);var f=y.options&&y.options.ranges;"function"==typeof u.yy.parseError?this.parseError=u.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var g,x,m,k,_,b,v,$,w,M={};;){if(x=n[n.length-1],this.defaultActions[x]?m=this.defaultActions[x]:(null==g&&(w=void 0,"number"!=typeof(w=i.pop()||y.lex()||1)&&(w instanceof Array&&(w=(i=w).pop()),w=e.symbols_[w]||w),g=w),m=a[x]&&a[x][g]),void 0===m||!m.length||!m[0]){var E="";for(_ in $=[],a[x])this.terminals_[_]&&_>2&&$.push("'"+this.terminals_[_]+"'");E=y.showPosition?"Parse error on line "+(l+1)+":\n"+y.showPosition()+"\nExpecting "+$.join(", ")+", got '"+(this.terminals_[g]||g)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==g?"end of input":"'"+(this.terminals_[g]||g)+"'"),this.parseError(E,{text:y.match,token:this.terminals_[g]||g,line:y.yylineno,loc:d,expected:$})}if(m[0]instanceof Array&&m.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+g);switch(m[0]){case 1:n.push(g),s.push(y.yytext),r.push(y.yylloc),n.push(m[1]),g=null,c=y.yyleng,o=y.yytext,l=y.yylineno,d=y.yylloc;break;case 2:if(b=this.productions_[m[1]][1],M.$=s[s.length-b],M._$={first_line:r[r.length-(b||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(b||1)].first_column,last_column:r[r.length-1].last_column},f&&(M._$.range=[r[r.length-(b||1)].range[0],r[r.length-1].range[1]]),void 0!==(k=this.performAction.apply(M,[o,c,l,u.yy,m[1],s,r].concat(h))))return k;b&&(n=n.slice(0,-1*b*2),s=s.slice(0,-1*b),r=r.slice(0,-1*b)),n.push(this.productions_[m[1]][0]),s.push(M.$),r.push(M._$),v=a[n[n.length-2]][n[n.length-1]],n.push(v);break;case 3:return!0}}return!0}},c={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,i,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var r in s)this[r]=s[r];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),r=0;re[0].length)){if(e=n,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,s[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,i){switch(n){case 0:case 1:case 3:case 4:break;case 2:return 10;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 18;case 16:return 19;case 17:return":";case 18:return 6;case 19:return"INVALID"}},rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18,19],inclusive:!0}}};function h(){this.yy={}}return l.lexer=c,h.prototype=l,l.Parser=h,new h}());a.parser=a;const o=a;let l="";const c=[],h=[],y=[],u=function(){let t=!0;for(const[e,n]of y.entries())y[e].processed,t=t&&n.processed;return t},p={getConfig:()=>(0,i.c)().journey,clear:function(){c.length=0,h.length=0,l="",y.length=0,(0,i.v)()},setDiagramTitle:i.q,getDiagramTitle:i.t,setAccTitle:i.s,getAccTitle:i.g,setAccDescription:i.b,getAccDescription:i.a,addSection:function(t){l=t,c.push(t)},getSections:function(){return c},getTasks:function(){let t=u();let e=0;for(;!t&&e<100;)t=u(),e++;return h.push(...y),h},addTask:function(t,e){const n=e.substr(1).split(":");let i=0,s=[];1===n.length?(i=Number(n[0]),s=[]):(i=Number(n[0]),s=n[1].split(","));const r=s.map((t=>t.trim())),a={section:l,type:l,people:r,task:t,score:i};y.push(a)},addTaskOrg:function(t){const e={section:l,type:l,description:t,task:t,classes:[]};h.push(e)},getActors:function(){return function(){const t=[];return h.forEach((e=>{e.people&&t.push(...e.people)})),[...new Set(t)].sort()}()}},d=t=>`.label {\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n color: ${t.textColor};\n }\n .mouth {\n stroke: #666;\n }\n\n line {\n stroke: ${t.textColor}\n }\n\n .legend {\n fill: ${t.textColor};\n }\n\n .label text {\n fill: #333;\n }\n .label {\n color: ${t.textColor}\n }\n\n .face {\n ${t.faceColor?`fill: ${t.faceColor}`:"fill: #FFF8DC"};\n stroke: #999;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n stroke-width: 1px;\n }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ${t.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${t.lineColor};\n stroke-width: 1.5px;\n }\n\n .flowchart-link {\n stroke: ${t.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${t.edgeLabelBackground};\n rect {\n opacity: 0.5;\n }\n text-align: center;\n }\n\n .cluster rect {\n }\n\n .cluster text {\n fill: ${t.titleColor};\n }\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n font-size: 12px;\n background: ${t.tertiaryColor};\n border: 1px solid ${t.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .task-type-0, .section-type-0 {\n ${t.fillType0?`fill: ${t.fillType0}`:""};\n }\n .task-type-1, .section-type-1 {\n ${t.fillType0?`fill: ${t.fillType1}`:""};\n }\n .task-type-2, .section-type-2 {\n ${t.fillType0?`fill: ${t.fillType2}`:""};\n }\n .task-type-3, .section-type-3 {\n ${t.fillType0?`fill: ${t.fillType3}`:""};\n }\n .task-type-4, .section-type-4 {\n ${t.fillType0?`fill: ${t.fillType4}`:""};\n }\n .task-type-5, .section-type-5 {\n ${t.fillType0?`fill: ${t.fillType5}`:""};\n }\n .task-type-6, .section-type-6 {\n ${t.fillType0?`fill: ${t.fillType6}`:""};\n }\n .task-type-7, .section-type-7 {\n ${t.fillType0?`fill: ${t.fillType7}`:""};\n }\n\n .actor-0 {\n ${t.actor0?`fill: ${t.actor0}`:""};\n }\n .actor-1 {\n ${t.actor1?`fill: ${t.actor1}`:""};\n }\n .actor-2 {\n ${t.actor2?`fill: ${t.actor2}`:""};\n }\n .actor-3 {\n ${t.actor3?`fill: ${t.actor3}`:""};\n }\n .actor-4 {\n ${t.actor4?`fill: ${t.actor4}`:""};\n }\n .actor-5 {\n ${t.actor5?`fill: ${t.actor5}`:""};\n }\n`,f=function(t,e){return(0,r.d)(t,e)},g=function(t,e){const n=t.append("circle");return n.attr("cx",e.cx),n.attr("cy",e.cy),n.attr("class","actor-"+e.pos),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("r",e.r),void 0!==n.class&&n.attr("class",n.class),void 0!==e.title&&n.append("title").text(e.title),n},x=function(t,e){return(0,r.f)(t,e)};let m=-1;const k=function(){function t(t,e,n,s,r,a,o,l){i(e.append("text").attr("x",n+r/2).attr("y",s+a/2+5).style("font-color",l).style("text-anchor","middle").text(t),o)}function e(t,e,n,s,r,a,o,l,c){const{taskFontSize:h,taskFontFamily:y}=l,u=t.split(//gi);for(let p=0;p3?function(t){const i=(0,s.JLW)().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(n/2.2);t.append("path").attr("class","mouth").attr("d",i).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}(r):e.score<3?function(t){const i=(0,s.JLW)().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(n/2.2);t.append("path").attr("class","mouth").attr("d",i).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}(r):r.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}(a,{cx:i,cy:300+30*(5-e.score),score:e.score});const o=(0,r.g)();o.x=e.x,o.y=e.y,o.fill=e.fill,o.width=n.width,o.height=n.height,o.class="task task-type-"+e.num,o.rx=3,o.ry=3,f(a,o);let l=e.x+14;e.people.forEach((t=>{const n=e.actors[t].color,i={cx:l,cy:e.y,r:7,fill:n,stroke:"#000",title:t,pos:e.actors[t].position};g(a,i),l+=10})),k(n)(e.task,a,o.x,o.y,o.width,o.height,{class:"task"},n,e.colour)},w=function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},M={};const E=(0,i.c)().journey,T=E.leftMargin,S={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},updateVal:function(t,e,n,i){void 0===t[e]?t[e]=n:t[e]=i(n,t[e])},updateBounds:function(t,e,n,s){const r=(0,i.c)().journey,a=this;let o=0;var l;this.sequenceItems.forEach((function(i){o++;const c=a.sequenceItems.length-o+1;a.updateVal(i,"starty",e-c*r.boxMargin,Math.min),a.updateVal(i,"stopy",s+c*r.boxMargin,Math.max),a.updateVal(S.data,"startx",t-c*r.boxMargin,Math.min),a.updateVal(S.data,"stopx",n+c*r.boxMargin,Math.max),"activation"!==l&&(a.updateVal(i,"startx",t-c*r.boxMargin,Math.min),a.updateVal(i,"stopx",n+c*r.boxMargin,Math.max),a.updateVal(S.data,"starty",e-c*r.boxMargin,Math.min),a.updateVal(S.data,"stopy",s+c*r.boxMargin,Math.max))}))},insert:function(t,e,n,i){const s=Math.min(t,n),r=Math.max(t,n),a=Math.min(e,i),o=Math.max(e,i);this.updateVal(S.data,"startx",s,Math.min),this.updateVal(S.data,"starty",a,Math.min),this.updateVal(S.data,"stopx",r,Math.max),this.updateVal(S.data,"stopy",o,Math.max),this.updateBounds(s,a,r,o)},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return this.data}},A=E.sectionFills,I=E.sectionColours,P=function(t,e,n){const s=(0,i.c)().journey;let r="";const a=n+(2*s.height+s.diagramMarginY);let o=0,l="#CCC",c="black",h=0;for(const[i,y]of e.entries()){if(r!==y.section){l=A[o%A.length],h=o%A.length,c=I[o%I.length];let n=0;const a=y.section;for(let t=i;t(M[e]&&(t[e]=M[e]),t)),{});y.x=i*s.taskMargin+i*s.width+T,y.y=a,y.width=s.diagramMarginX,y.height=s.diagramMarginY,y.colour=c,y.fill=l,y.num=h,y.actors=n,$(t,y,s),S.insert(y.x,y.y,y.x+y.width+s.taskMargin,450)}},C={setConf:function(t){Object.keys(t).forEach((function(e){E[e]=t[e]}))},draw:function(t,e,n,r){const a=(0,i.c)().journey,o=(0,i.c)().securityLevel;let l;"sandbox"===o&&(l=(0,s.Ltv)("#i"+e));const c="sandbox"===o?(0,s.Ltv)(l.nodes()[0].contentDocument.body):(0,s.Ltv)("body");S.init();const h=c.select("#"+e);w(h);const y=r.db.getTasks(),u=r.db.getDiagramTitle(),p=r.db.getActors();for(const i in M)delete M[i];let d=0;p.forEach((t=>{M[t]={color:a.actorColours[d%a.actorColours.length],position:d},d++})),function(t){const e=(0,i.c)().journey;let n=60;Object.keys(M).forEach((i=>{const s=M[i].color,r={cx:20,cy:n,r:7,fill:s,stroke:"#000",pos:M[i].position};_(t,r);const a={x:40,y:n+7,fill:"#666",text:i,textMargin:5|e.boxTextMargin};v(t,a),n+=20}))}(h),S.insert(0,0,T,50*Object.keys(M).length),P(h,y,0);const f=S.getBounds();u&&h.append("text").text(u).attr("x",T).attr("font-size","4ex").attr("font-weight","bold").attr("y",25);const g=f.stopy-f.starty+2*a.diagramMarginY,x=T+f.stopx+2*a.diagramMarginX;(0,i.i)(h,g,x,a.useMaxWidth),h.append("line").attr("x1",T).attr("y1",4*a.height).attr("x2",x-T-4).attr("y2",4*a.height).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)");const m=u?70:0;h.attr("viewBox",`${f.startx} -25 ${x} ${g+m}`),h.attr("preserveAspectRatio","xMinYMin meet"),h.attr("height",g+m+25)}},j={parser:o,db:p,renderer:C,styles:d,init:t=>{C.setConf(t.journey),p.clear()}}},79186:(t,e,n)=>{n.d(e,{a:()=>a,b:()=>c,c:()=>l,d:()=>r,e:()=>y,f:()=>o,g:()=>h});var i=n(16750),s=n(86079);const r=(t,e)=>{const n=t.append("rect");if(n.attr("x",e.x),n.attr("y",e.y),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("width",e.width),n.attr("height",e.height),e.name&&n.attr("name",e.name),void 0!==e.rx&&n.attr("rx",e.rx),void 0!==e.ry&&n.attr("ry",e.ry),void 0!==e.attrs)for(const i in e.attrs)n.attr(i,e.attrs[i]);return void 0!==e.class&&n.attr("class",e.class),n},a=(t,e)=>{const n={x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"};r(t,n).lower()},o=(t,e)=>{const n=e.text.replace(s.J," "),i=t.append("text");i.attr("x",e.x),i.attr("y",e.y),i.attr("class","legend"),i.style("text-anchor",e.anchor),void 0!==e.class&&i.attr("class",e.class);const r=i.append("tspan");return r.attr("x",e.x+2*e.textMargin),r.text(n),i},l=(t,e,n,s)=>{const r=t.append("image");r.attr("x",e),r.attr("y",n);const a=(0,i.Jf)(s);r.attr("xlink:href",a)},c=(t,e,n,s)=>{const r=t.append("use");r.attr("x",e),r.attr("y",n);const a=(0,i.Jf)(s);r.attr("xlink:href",`#${a}`)},h=()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),y=()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0})}}]); \ No newline at end of file diff --git a/assets/js/21877fa5.21fb9ae2.js b/assets/js/21877fa5.21fb9ae2.js new file mode 100644 index 000000000000..012699ecc7cf --- /dev/null +++ b/assets/js/21877fa5.21fb9ae2.js @@ -0,0 +1 @@ +(self.webpackChunk=self.webpackChunk||[]).push([[6466],{84746:(e,t,a)=>{"use strict";a.r(t),a.d(t,{assets:()=>u,contentTitle:()=>c,default:()=>p,frontMatter:()=>l,metadata:()=>n,toc:()=>h});const n=JSON.parse('{"id":"learn/learn-system-chains","title":"System Parachains","description":"System Parachains currently deployed on Polkadot.","source":"@site/../docs/learn/learn-system-chains.md","sourceDirName":"learn","slug":"/learn-system-chains","permalink":"/docs/learn-system-chains","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-system-chains.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1727991122000,"frontMatter":{"id":"learn-system-chains","title":"System Parachains","sidebar_label":"System Parachains","description":"System Parachains currently deployed on Polkadot.","keywords":["common good","system","parachains","system level","public utility"],"slug":"../learn-system-chains"},"sidebar":"docs","previous":{"title":"Protocol Overview","permalink":"/docs/learn-parachains-protocol"},"next":{"title":"Parachains FAQ","permalink":"/docs/learn-parachains-faq"}}');var r=a(74848),s=a(28453),o=(a(47379),a(11470)),i=a(19365);const l={id:"learn-system-chains",title:"System Parachains",sidebar_label:"System Parachains",description:"System Parachains currently deployed on Polkadot.",keywords:["common good","system","parachains","system level","public utility"],slug:"../learn-system-chains"},c=void 0,u={},h=[{value:"Overview",id:"overview",level:2},{value:"Existing System Chains",id:"existing-system-chains",level:2},{value:"Asset Hub",id:"asset-hub",level:3},{value:"Collectives",id:"collectives",level:3},{value:"Bridge Hub",id:"bridge-hub",level:3},{value:"People Chain",id:"people-chain",level:3},{value:"Coretime Chain",id:"coretime-chain",level:3},{value:"Encointer",id:"encointer",level:3}];function d(e){const t={a:"a",admonition:"admonition",em:"em",h2:"h2",h3:"h3",p:"p",...(0,s.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.p,{children:"The primary functionality of the relay chain is to secure the parachains and facilitate secure\ncommunication between them. All other functionalities like asset transfers, governance, identities\nand bridging (a potentially resource intensive task) can benefit from operating separately on system\nchains. System chains are responsible for delegating functionality away from the relay chain for\npeformance reasons, taking advantage of the inherent parallelization the architecture of Polkadot\nprovides."}),"\n",(0,r.jsx)(t.h2,{id:"overview",children:"Overview"}),"\n",(0,r.jsxs)(t.p,{children:["System parachains are those that contain core Polkadot protocol features, but in parachains rather\nthan the relay chain. Rather than purchasing coretime on a marketplace, execution cores for system\nchains are allocated through the network ",(0,r.jsx)(t.a,{href:"/docs/learn-guides-polkadot-opengov",children:"governance"}),"."]}),"\n",(0,r.jsxs)(t.p,{children:["By hosting core protocol logic in parachains instead of the relay chain, Polkadot uses its own\nscaling technology -- namely, parallel execution -- to host ",(0,r.jsx)(t.em,{children:"itself"}),". System parachains remove\ntransactions from the relay chain, allowing more relay chain\n",(0,r.jsx)(t.a,{href:"https://www.rob.tech/polkadot-blockspace-over-blockchains/",children:"blockspace"})," to be used for Polkadot's\nprimary purpose: validating parachains."]}),"\n",(0,r.jsx)(t.p,{children:"System parachains always defer to on-chain governance to manage their upgrades and other sensitive\nactions. That is, they do not have their own native tokens or governance systems separate from DOT\nKSM. In fact, there will likely be a system parachain specifically for network governance."}),"\n",(0,r.jsx)(t.admonition,{type:"note",children:(0,r.jsxs)(t.p,{children:['In the past, these were often called "Common Good Parachains", so you may come across articles and\ndiscussions using that term. As the network has evolved, that term has been confusing in many cases,\nso "System Parachains" is preferred now. A discussion on this evolution can be found in\n',(0,r.jsx)(t.a,{href:"https://forum.polkadot.network/t/polkadot-protocol-and-common-good-parachains/866",children:"this forum thread"}),"."]})}),"\n",(0,r.jsx)(t.h2,{id:"existing-system-chains",children:"Existing System Chains"}),"\n",(0,r.jsxs)(o.A,{groupId:"clients",values:[{label:"Polkadot",value:"polkadot"},{label:"Kusama",value:"kusama"}],children:[(0,r.jsxs)(i.A,{value:"polkadot",children:[(0,r.jsx)(t.h3,{id:"asset-hub",children:"Asset Hub"}),(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/cumulus#asset-hub-",children:"Asset Hub"})," on both\nPolkadot and Kusama are the first system parachains."]}),(0,r.jsx)(t.p,{children:"The Asset Hub is an asset portal for the entire network. It helps asset creators (e.g. reserve\nbacked stablecoin issuers) to track the total issuance of their asset in the network, including\namounts that have been transferred to other parachains. It is also the point where they can\ntransact, to mint and burn, to manage the on-chain asset."}),(0,r.jsxs)(t.p,{children:["The Asset Hub also supports non-fungible assets (NFTs) via the\n",(0,r.jsx)(t.a,{href:"https://polkadot.js.org/docs/substrate/extrinsics#uniques",children:"Uniques pallet"})," and the new\n",(0,r.jsx)(t.a,{href:"https://polkadot.js.org/docs/substrate/extrinsics#nfts",children:"nfts pallet"}),". For more information about\nNFTs see the ",(0,r.jsx)(t.a,{href:"/docs/learn-nft-pallets",children:"dedicated wiki page"}),"."]}),(0,r.jsx)(t.p,{children:"This logic for asset management is not encoded in smart contracts, but rather directly in the\nruntime of the chain. Because of the efficiency of executing logic in a parachain, fees and deposits\nare about 1/10th of their respective value on the relay chain."}),(0,r.jsx)(t.p,{children:"These low fee levels mean that the Asset Hub is well suited for handling balances and transfers as\nwell as managing on-chain assets."}),(0,r.jsx)(t.h3,{id:"collectives",children:"Collectives"}),(0,r.jsxs)(t.p,{children:["The Polkadot Collectives parachain was added in\n",(0,r.jsx)(t.a,{href:"https://polkadot.polkassembly.io/referendum/81",children:"Referendum 81"})," and exists only on Polkadot (i.e.,\nthere is no Kusama equivalent). The Collectives chain hosts on-chain collectives that serve the\nPolkadot network."]}),(0,r.jsxs)(t.p,{children:["Some of these collectives are the\n",(0,r.jsx)(t.a,{href:"https://polkadot.polkassembly.io/referendum/94",children:"Polkadot Alliance"})," and the Polkadot Technical\n",(0,r.jsx)(t.a,{href:"/docs/learn-polkadot-technical-fellowship",children:"Fellowship"}),". These on-chain collectives will play\nimportant roles in the future of network stewardship and decentralized governance."]}),(0,r.jsxs)(t.p,{children:["Networks themselves can act as collectives and express their legislative voices as single opinions\nwithin other networks. This is achieved with the assistance from a ",(0,r.jsx)(t.a,{href:"#bridge-hub",children:"bridge hub"}),"."]}),(0,r.jsx)(t.h3,{id:"bridge-hub",children:"Bridge Hub"}),(0,r.jsx)(t.p,{children:"Before Polkadot and Kusama supported their first parachains, the only way to design a bridge was to\nput the logic onto the relay chain itself. Since both networks now support parachains, it makes\nsense to have a parachain on each network dedicated to bridges. This is because of the execution\nisolation provided by parachains."}),(0,r.jsxs)(t.p,{children:["The Bridge Hub system parachain operates on the relay chain, and is responsible for faciliating\nbridges to the wider Web3 space. It contains the required bridge\n",(0,r.jsx)(t.a,{href:"/docs/glossary#pallet",children:"pallets"})," in its runtime, which enable trustless bridging with other\nblockchain networks like Polkadot, Kusama and Ethereum. The Bridge Hub uses the native token of the\nrelay chain."]}),(0,r.jsxs)(t.p,{children:["See the ",(0,r.jsx)(t.a,{href:"/docs/learn-bridges",children:"Bridges page"})," for information on the latest bridge projects."]}),(0,r.jsx)(t.h3,{id:"people-chain",children:"People Chain"}),(0,r.jsxs)(t.p,{children:["The People Chain allows users to mange their account ",(0,r.jsx)(t.a,{href:"/docs/learn-identity",children:"identity"}),"."]}),(0,r.jsx)(t.h3,{id:"coretime-chain",children:"Coretime Chain"}),(0,r.jsxs)(t.p,{children:["The Coretime system chain allows users to buy coretime to access Polkadot's computation.\n",(0,r.jsx)(t.a,{href:"/docs/learn-guides-coretime-marketplaces",children:"Coretime marketplaces"})," run on top of the Coretime chain.\nFor more information about agile coretime, see ",(0,r.jsx)(t.a,{href:"/docs/learn-agile-coretime",children:"here"}),"."]})]}),(0,r.jsxs)(i.A,{value:"kusama",children:[(0,r.jsxs)(t.p,{children:["Compared to Polkadot, Kusama does not have the Collectives system chain, and it has the\n",(0,r.jsx)(t.a,{href:"https://encointer.org/encointer-for-web3/",children:"Encointer"})," system chain."]}),(0,r.jsx)(t.h3,{id:"encointer",children:"Encointer"}),(0,r.jsxs)(t.p,{children:["Encointer is a blockchain platform for self-sovereign ID and a global universal basic income. With\n",(0,r.jsx)(t.a,{href:"https://kusama.polkassembly.io/referendum/158",children:"referendum 158"})," Encointer was registered as the\nsecond system parachain on Kusama's network. The functionality of Encointer adds logic to the Relay\nChain that aims to bring financial inclusivity to Web3 and mitigate Sybil attacks with a novel Proof\nof Personhood (PoP) system for unique identity."]}),(0,r.jsxs)(t.p,{children:["Encointer offers a framework that, in principle, allows for any group of real people to create,\ndistribute, and use their own digital community tokens.\n",(0,r.jsx)(t.a,{href:"https://kusama.polkassembly.io/referendum/187",children:"Referendum 187"})," introduced a runtime upgrade\nbringing governance and full functionality for communities to be able to use the protocol."]}),(0,r.jsxs)(t.p,{children:["Encointer aims to invert the\n",(0,r.jsx)(t.a,{href:"https://www.newworldencyclopedia.org/entry/Richard_Cantillon",children:"Cantillon Effect"}),", where money is\nissued at the bottom, and not as credit to businesses or creditworthy individuals. This way, every\nindividual gets a ",(0,r.jsx)(t.a,{href:"https://book.encointer.org/economics-ubi.html",children:"universal basic income (UBI)"}),"."]}),(0,r.jsxs)(t.p,{children:["To resist Sybil attacks, the Encointer protocol uses a PoP mechanism to foster a unique identity\nsystem. The notion is that a person can only be present at one place at a given time. Participants\nare requested to attend physical key-signing ceremonies with small groups of random people at\nrandomized locations, where these local meetings are part of one global ceremony that co-occur.\nParticipants use the Encointer wallet app to participate in these ceremonies, and the wallet enables\nthe management of local community currencies. Watch an Encointer ceremony in action in\n",(0,r.jsx)(t.a,{href:"https://www.youtube.com/watch?v=tcgpCCYBqko",children:"this video"}),"."]}),(0,r.jsxs)(t.p,{children:["The protocol involves ",(0,r.jsx)(t.a,{href:"https://book.encointer.org/ssi.html#privacy-considerations",children:"other mechanisms"}),"\nto protect the privacy of users in addition to the physical key-signing ceremonies."]}),(0,r.jsx)(t.p,{children:"Encointer was accepted as a system chain based on its offer of a Sybil defense mechanism as a basis\nfor digital democracy. This can also be adapted by other chains, which can use the unique identity\nsystem to prevent Sybil attacks and use PoP for token airdrops or faucets."}),(0,r.jsx)(t.admonition,{type:"tip",children:(0,r.jsxs)(t.p,{children:["To learn more about Encointer, check out the official\n",(0,r.jsx)(t.a,{href:"https://book.encointer.org/introduction.html",children:"Encointer book"}),"."]})})]})]})]})}function p(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(d,{...e})}):d(e)}},47379:(e,t,a)=>{"use strict";a.d(t,{A:()=>d});var n=a(90675),r=a(10467),s=a(96540),o=a(19588),i=a(2026),l=a(11135);function c(e,t,a){return u.apply(this,arguments)}function u(){return(u=(0,r.A)((0,n.A)().mark((function e(t,a,r){var s,l,c,u,h;return(0,n.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s=void 0,l=void 0,e.t0=t,e.next="polkadot"===e.t0?5:"kusama"===e.t0?7:"statemine"===e.t0?9:"statemint"===e.t0?11:"polkadotpeople"===e.t0?13:"kusamapeople"===e.t0?15:17;break;case 5:return s="wss://rpc.polkadot.io",e.abrupt("break",18);case 7:return s="wss://kusama-rpc.polkadot.io/",e.abrupt("break",18);case 9:return s="wss://statemine-rpc.polkadot.io/",e.abrupt("break",18);case 11:return s="wss://statemint-rpc.polkadot.io/",e.abrupt("break",18);case 13:return s="wss://polkadot-people-rpc.polkadot.io/",e.abrupt("break",18);case 15:return s="wss://kusama-people-rpc.polkadot.io/",e.abrupt("break",18);case 17:console.log("Unknown socket url provided, no connection made.");case 18:if(void 0!==s){e.next=22;break}return e.abrupt("return");case 22:return c=new o.E(s),e.next=25,i.G.create({provider:c});case 25:u=e.sent,(h=a.split(".")).forEach((function(e){e in u&&(u=u[e])})),e.t1=h[0],e.next="consts"===e.t1?31:"query"===e.t1?33:38;break;case 31:return l=u.toString(),e.abrupt("break",39);case 33:return e.next=35,u();case 35:return l=(l=e.sent).toString(),e.abrupt("break",39);case 38:console.log("Unknown path prefix ("+h[0]+") in "+a);case 39:return e.abrupt("return",l);case 40:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function h(e,t,a,n){switch(t){case"humanReadable":(0,l.HumanReadable)(e,a,n);break;case"precise":(0,l.Precise)(e,a,n);break;case"blocksToDays":(0,l.BlocksToDays)(e,n);break;case"erasToDays":(0,l.ErasToDays)(e,n,a);break;case"percentage":(0,l.Percentage)(e,n);break;case"permillToPercent":(0,l.PermillToPercent)(e,n);break;case"arrayLength":(0,l.ArrayLength)(e,n);break;default:return void console.log("Ignoring unknown filter type")}}const d=function(e){var t=e.network,a=e.path,o=e.defaultValue,i=e.filter,l=void 0===i?void 0:i,u=(0,s.useState)(""),d=u[0],p=u[1];return t=t.toLowerCase(),(0,s.useEffect)((function(){void 0!==l?h(o.toString(),l,t,p):p(o.toString());var e=void 0;switch(t){case"polkadot":e="wss://rpc.polkadot.io";break;case"kusama":e="wss://kusama-rpc.polkadot.io/";break;case"statemine":e="wss://kusama-asset-hub-rpc.polkadot.io/";break;case"statemint":e="wss://polkadot-asset-hub-rpc.polkadot.io/";break;case"kusamapeople":e="wss://kusama-people-rpc.polkadot.io";break;case"polkadotpeople":e="wss://polkadot-people-rpc.polkadot.io";break;default:console.log("Unknown network provided, "+t)}if(void 0===e)console.log("Failed to connect to a valid websocket, applying default");else{var s=function(){var e=(0,r.A)((0,n.A)().mark((function e(){var r;return(0,n.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,c(t,a,p);case 2:if(void 0!==(r=e.sent)){e.next=7;break}return e.abrupt("return");case 7:void 0!==l?h(r,l,t,p):p(r);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();try{s()}catch(i){console.log(i)}}}),[]),d}},11135:e=>{var t="polkadot",a="kusama",n="statemine",r="statemint",s="polkadotpeople",o="kusamapeople",i={polkadot:{precision:1e10,symbol:"DOT"},kusama:{precision:1e12,symbol:"KSM"},statemint:{precision:1e10,symbol:"DOT"},statemine:{precision:1e12,symbol:"KSM"},polkadotpeople:{precision:1e10,symbol:"DOT"},kusamapeople:{precision:1e12,symbol:"KSM"}};e.exports={HumanReadable:function(e,l,c){var u=void 0;if(l===t||l===r)u=3;else if(l===a||l===n||l===s)u=6;else{if(l!=o)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");u=8}e=parseFloat(e),c((e=Number.isInteger(e/i[l].precision)?e/i[l].precision+" "+i[l].symbol:(e/i[l].precision).toFixed(u)+" "+i[l].symbol).toString())},Precise:function(e,t,a){a(e=(e=parseFloat(e))/i[t].precision+" "+i[t].symbol)},BlocksToDays:function(e,t){t((e=6*e/86400).toString())},ErasToDays:function(e,i,l){var c=void 0;if(l===t||l===r||l==s)c=1;else{if(l!==a&&l!==n&&l!=o)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");c=4}i((e/=c).toString())},Percentage:function(e,t){t((e/=1e7).toString())},PermillToPercent:function(e,t){t((e/=1e4).toString())},ArrayLength:function(e,t){t((e=e.split(",").length).toString())}}},19365:(e,t,a)=>{"use strict";a.d(t,{A:()=>o});a(96540);var n=a(34164);const r={tabItem:"tabItem_Ymn6"};var s=a(74848);function o(e){var t=e.children,a=e.hidden,o=e.className;return(0,s.jsx)("div",{role:"tabpanel",className:(0,n.A)(r.tabItem,o),hidden:a,children:t})}},11470:(e,t,a)=>{"use strict";a.d(t,{A:()=>x});var n=a(96540),r=a(34164),s=a(23104),o=a(56347),i=a(205),l=a(57485),c=a(31682),u=a(75376);function h(e){var t,a;return null!=(t=null==(a=n.Children.toArray(e).filter((function(e){return"\n"!==e})).map((function(e){if(!e||(0,n.isValidElement)(e)&&((t=e.props)&&"object"==typeof t&&"value"in t))return e;var t;throw new Error("Docusaurus error: Bad child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:a.filter(Boolean))?t:[]}function d(e){var t=e.values,a=e.children;return(0,n.useMemo)((function(){var e=null!=t?t:function(e){return h(e).map((function(e){var t=e.props;return{value:t.value,label:t.label,attributes:t.attributes,default:t.default}}))}(a);return function(e){var t=(0,c.XI)(e,(function(e,t){return e.value===t.value}));if(t.length>0)throw new Error('Docusaurus error: Duplicate values "'+t.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[t,a])}function p(e){var t=e.value;return e.tabValues.some((function(e){return e.value===t}))}function m(e){var t=e.queryString,a=void 0!==t&&t,r=e.groupId,s=(0,o.W6)(),i=function(e){var t=e.queryString,a=void 0!==t&&t,n=e.groupId;if("string"==typeof a)return a;if(!1===a)return null;if(!0===a&&!n)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=n?n:null}({queryString:a,groupId:r});return[(0,l.aZ)(i),(0,n.useCallback)((function(e){if(i){var t=new URLSearchParams(s.location.search);t.set(i,e),s.replace(Object.assign({},s.location,{search:t.toString()}))}}),[i,s])]}function f(e){var t,a,r,s,o=e.defaultValue,l=e.queryString,c=void 0!==l&&l,h=e.groupId,f=d(e),b=(0,n.useState)((function(){return function(e){var t,a=e.defaultValue,n=e.tabValues;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(a){if(!p({value:a,tabValues:n}))throw new Error('Docusaurus error: The has a defaultValue "'+a+'" but none of its children has the corresponding value. Available values are: '+n.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return a}var r=null!=(t=n.find((function(e){return e.default})))?t:n[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:o,tabValues:f})})),v=b[0],k=b[1],y=m({queryString:c,groupId:h}),g=y[0],w=y[1],x=(t=function(e){return e?"docusaurus.tab."+e:null}({groupId:h}.groupId),a=(0,u.Dv)(t),r=a[0],s=a[1],[r,(0,n.useCallback)((function(e){t&&s.set(e)}),[t,s])]),j=x[0],P=x[1],T=function(){var e=null!=g?g:j;return p({value:e,tabValues:f})?e:null}();return(0,i.A)((function(){T&&k(T)}),[T]),{selectedValue:v,selectValue:(0,n.useCallback)((function(e){if(!p({value:e,tabValues:f}))throw new Error("Can't select invalid tab value="+e);k(e),w(e),P(e)}),[w,P,f]),tabValues:f}}var b=a(92303);const v={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var k=a(74848);function y(e){var t=e.className,a=e.block,n=e.selectedValue,o=e.selectValue,i=e.tabValues,l=[],c=(0,s.a_)().blockElementScrollPositionUntilNextRender,u=function(e){var t=e.currentTarget,a=l.indexOf(t),r=i[a].value;r!==n&&(c(t),o(r))},h=function(e){var t,a=null;switch(e.key){case"Enter":u(e);break;case"ArrowRight":var n,r=l.indexOf(e.currentTarget)+1;a=null!=(n=l[r])?n:l[0];break;case"ArrowLeft":var s,o=l.indexOf(e.currentTarget)-1;a=null!=(s=l[o])?s:l[l.length-1]}null==(t=a)||t.focus()};return(0,k.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,r.A)("tabs",{"tabs--block":a},t),children:i.map((function(e){var t=e.value,a=e.label,s=e.attributes;return(0,k.jsx)("li",Object.assign({role:"tab",tabIndex:n===t?0:-1,"aria-selected":n===t,ref:function(e){return l.push(e)},onKeyDown:h,onClick:u},s,{className:(0,r.A)("tabs__item",v.tabItem,null==s?void 0:s.className,{"tabs__item--active":n===t}),children:null!=a?a:t}),t)}))})}function g(e){var t=e.lazy,a=e.children,s=e.selectedValue,o=(Array.isArray(a)?a:[a]).filter(Boolean);if(t){var i=o.find((function(e){return e.props.value===s}));return i?(0,n.cloneElement)(i,{className:(0,r.A)("margin-top--md",i.props.className)}):null}return(0,k.jsx)("div",{className:"margin-top--md",children:o.map((function(e,t){return(0,n.cloneElement)(e,{key:t,hidden:e.props.value!==s})}))})}function w(e){var t=f(e);return(0,k.jsxs)("div",{className:(0,r.A)("tabs-container",v.tabList),children:[(0,k.jsx)(y,Object.assign({},t,e)),(0,k.jsx)(g,Object.assign({},t,e))]})}function x(e){var t=(0,b.A)();return(0,k.jsx)(w,Object.assign({},e,{children:h(e.children)}),String(t))}},47790:()=>{}}]); \ No newline at end of file diff --git a/assets/js/21877fa5.ba7ca543.js b/assets/js/21877fa5.ba7ca543.js deleted file mode 100644 index 27ee31b8917f..000000000000 --- a/assets/js/21877fa5.ba7ca543.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk=self.webpackChunk||[]).push([[6466],{98285:(e,t,a)=>{"use strict";a.r(t),a.d(t,{assets:()=>u,contentTitle:()=>l,default:()=>p,frontMatter:()=>i,metadata:()=>c,toc:()=>h});var n=a(74848),r=a(28453),s=(a(47379),a(11470)),o=a(19365);const i={id:"learn-system-chains",title:"System Parachains",sidebar_label:"System Parachains",description:"System Parachains currently deployed on Polkadot.",keywords:["common good","system","parachains","system level","public utility"],slug:"../learn-system-chains"},l=void 0,c={id:"learn/learn-system-chains",title:"System Parachains",description:"System Parachains currently deployed on Polkadot.",source:"@site/../docs/learn/learn-system-chains.md",sourceDirName:"learn",slug:"/learn-system-chains",permalink:"/docs/learn-system-chains",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-system-chains.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1727991122e3,frontMatter:{id:"learn-system-chains",title:"System Parachains",sidebar_label:"System Parachains",description:"System Parachains currently deployed on Polkadot.",keywords:["common good","system","parachains","system level","public utility"],slug:"../learn-system-chains"},sidebar:"docs",previous:{title:"Protocol Overview",permalink:"/docs/learn-parachains-protocol"},next:{title:"Parachains FAQ",permalink:"/docs/learn-parachains-faq"}},u={},h=[{value:"Overview",id:"overview",level:2},{value:"Existing System Chains",id:"existing-system-chains",level:2},{value:"Asset Hub",id:"asset-hub",level:3},{value:"Collectives",id:"collectives",level:3},{value:"Bridge Hub",id:"bridge-hub",level:3},{value:"People Chain",id:"people-chain",level:3},{value:"Coretime Chain",id:"coretime-chain",level:3},{value:"Encointer",id:"encointer",level:3}];function d(e){const t={a:"a",admonition:"admonition",em:"em",h2:"h2",h3:"h3",p:"p",...(0,r.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.p,{children:"The primary functionality of the relay chain is to secure the parachains and facilitate secure\ncommunication between them. All other functionalities like asset transfers, governance, identities\nand bridging (a potentially resource intensive task) can benefit from operating separately on system\nchains. System chains are responsible for delegating functionality away from the relay chain for\npeformance reasons, taking advantage of the inherent parallelization the architecture of Polkadot\nprovides."}),"\n",(0,n.jsx)(t.h2,{id:"overview",children:"Overview"}),"\n",(0,n.jsxs)(t.p,{children:["System parachains are those that contain core Polkadot protocol features, but in parachains rather\nthan the relay chain. Rather than purchasing coretime on a marketplace, execution cores for system\nchains are allocated through the network ",(0,n.jsx)(t.a,{href:"/docs/learn-guides-polkadot-opengov",children:"governance"}),"."]}),"\n",(0,n.jsxs)(t.p,{children:["By hosting core protocol logic in parachains instead of the relay chain, Polkadot uses its own\nscaling technology -- namely, parallel execution -- to host ",(0,n.jsx)(t.em,{children:"itself"}),". System parachains remove\ntransactions from the relay chain, allowing more relay chain\n",(0,n.jsx)(t.a,{href:"https://www.rob.tech/polkadot-blockspace-over-blockchains/",children:"blockspace"})," to be used for Polkadot's\nprimary purpose: validating parachains."]}),"\n",(0,n.jsx)(t.p,{children:"System parachains always defer to on-chain governance to manage their upgrades and other sensitive\nactions. That is, they do not have their own native tokens or governance systems separate from DOT\nKSM. In fact, there will likely be a system parachain specifically for network governance."}),"\n",(0,n.jsx)(t.admonition,{type:"note",children:(0,n.jsxs)(t.p,{children:['In the past, these were often called "Common Good Parachains", so you may come across articles and\ndiscussions using that term. As the network has evolved, that term has been confusing in many cases,\nso "System Parachains" is preferred now. A discussion on this evolution can be found in\n',(0,n.jsx)(t.a,{href:"https://forum.polkadot.network/t/polkadot-protocol-and-common-good-parachains/866",children:"this forum thread"}),"."]})}),"\n",(0,n.jsx)(t.h2,{id:"existing-system-chains",children:"Existing System Chains"}),"\n",(0,n.jsxs)(s.A,{groupId:"clients",values:[{label:"Polkadot",value:"polkadot"},{label:"Kusama",value:"kusama"}],children:[(0,n.jsxs)(o.A,{value:"polkadot",children:[(0,n.jsx)(t.h3,{id:"asset-hub",children:"Asset Hub"}),(0,n.jsxs)(t.p,{children:["The ",(0,n.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/cumulus#asset-hub-",children:"Asset Hub"})," on both\nPolkadot and Kusama are the first system parachains."]}),(0,n.jsx)(t.p,{children:"The Asset Hub is an asset portal for the entire network. It helps asset creators (e.g. reserve\nbacked stablecoin issuers) to track the total issuance of their asset in the network, including\namounts that have been transferred to other parachains. It is also the point where they can\ntransact, to mint and burn, to manage the on-chain asset."}),(0,n.jsxs)(t.p,{children:["The Asset Hub also supports non-fungible assets (NFTs) via the\n",(0,n.jsx)(t.a,{href:"https://polkadot.js.org/docs/substrate/extrinsics#uniques",children:"Uniques pallet"})," and the new\n",(0,n.jsx)(t.a,{href:"https://polkadot.js.org/docs/substrate/extrinsics#nfts",children:"nfts pallet"}),". For more information about\nNFTs see the ",(0,n.jsx)(t.a,{href:"/docs/learn-nft-pallets",children:"dedicated wiki page"}),"."]}),(0,n.jsx)(t.p,{children:"This logic for asset management is not encoded in smart contracts, but rather directly in the\nruntime of the chain. Because of the efficiency of executing logic in a parachain, fees and deposits\nare about 1/10th of their respective value on the relay chain."}),(0,n.jsx)(t.p,{children:"These low fee levels mean that the Asset Hub is well suited for handling balances and transfers as\nwell as managing on-chain assets."}),(0,n.jsx)(t.h3,{id:"collectives",children:"Collectives"}),(0,n.jsxs)(t.p,{children:["The Polkadot Collectives parachain was added in\n",(0,n.jsx)(t.a,{href:"https://polkadot.polkassembly.io/referendum/81",children:"Referendum 81"})," and exists only on Polkadot (i.e.,\nthere is no Kusama equivalent). The Collectives chain hosts on-chain collectives that serve the\nPolkadot network."]}),(0,n.jsxs)(t.p,{children:["Some of these collectives are the\n",(0,n.jsx)(t.a,{href:"https://polkadot.polkassembly.io/referendum/94",children:"Polkadot Alliance"})," and the Polkadot Technical\n",(0,n.jsx)(t.a,{href:"/docs/learn-polkadot-technical-fellowship",children:"Fellowship"}),". These on-chain collectives will play\nimportant roles in the future of network stewardship and decentralized governance."]}),(0,n.jsxs)(t.p,{children:["Networks themselves can act as collectives and express their legislative voices as single opinions\nwithin other networks. This is achieved with the assistance from a ",(0,n.jsx)(t.a,{href:"#bridge-hub",children:"bridge hub"}),"."]}),(0,n.jsx)(t.h3,{id:"bridge-hub",children:"Bridge Hub"}),(0,n.jsx)(t.p,{children:"Before Polkadot and Kusama supported their first parachains, the only way to design a bridge was to\nput the logic onto the relay chain itself. Since both networks now support parachains, it makes\nsense to have a parachain on each network dedicated to bridges. This is because of the execution\nisolation provided by parachains."}),(0,n.jsxs)(t.p,{children:["The Bridge Hub system parachain operates on the relay chain, and is responsible for faciliating\nbridges to the wider Web3 space. It contains the required bridge\n",(0,n.jsx)(t.a,{href:"/docs/glossary#pallet",children:"pallets"})," in its runtime, which enable trustless bridging with other\nblockchain networks like Polkadot, Kusama and Ethereum. The Bridge Hub uses the native token of the\nrelay chain."]}),(0,n.jsxs)(t.p,{children:["See the ",(0,n.jsx)(t.a,{href:"/docs/learn-bridges",children:"Bridges page"})," for information on the latest bridge projects."]}),(0,n.jsx)(t.h3,{id:"people-chain",children:"People Chain"}),(0,n.jsxs)(t.p,{children:["The People Chain allows users to mange their account ",(0,n.jsx)(t.a,{href:"/docs/learn-identity",children:"identity"}),"."]}),(0,n.jsx)(t.h3,{id:"coretime-chain",children:"Coretime Chain"}),(0,n.jsxs)(t.p,{children:["The Coretime system chain allows users to buy coretime to access Polkadot's computation.\n",(0,n.jsx)(t.a,{href:"/docs/learn-guides-coretime-marketplaces",children:"Coretime marketplaces"})," run on top of the Coretime chain.\nFor more information about agile coretime, see ",(0,n.jsx)(t.a,{href:"/docs/learn-agile-coretime",children:"here"}),"."]})]}),(0,n.jsxs)(o.A,{value:"kusama",children:[(0,n.jsxs)(t.p,{children:["Compared to Polkadot, Kusama does not have the Collectives system chain, and it has the\n",(0,n.jsx)(t.a,{href:"https://encointer.org/encointer-for-web3/",children:"Encointer"})," system chain."]}),(0,n.jsx)(t.h3,{id:"encointer",children:"Encointer"}),(0,n.jsxs)(t.p,{children:["Encointer is a blockchain platform for self-sovereign ID and a global universal basic income. With\n",(0,n.jsx)(t.a,{href:"https://kusama.polkassembly.io/referendum/158",children:"referendum 158"})," Encointer was registered as the\nsecond system parachain on Kusama's network. The functionality of Encointer adds logic to the Relay\nChain that aims to bring financial inclusivity to Web3 and mitigate Sybil attacks with a novel Proof\nof Personhood (PoP) system for unique identity."]}),(0,n.jsxs)(t.p,{children:["Encointer offers a framework that, in principle, allows for any group of real people to create,\ndistribute, and use their own digital community tokens.\n",(0,n.jsx)(t.a,{href:"https://kusama.polkassembly.io/referendum/187",children:"Referendum 187"})," introduced a runtime upgrade\nbringing governance and full functionality for communities to be able to use the protocol."]}),(0,n.jsxs)(t.p,{children:["Encointer aims to invert the\n",(0,n.jsx)(t.a,{href:"https://www.newworldencyclopedia.org/entry/Richard_Cantillon",children:"Cantillon Effect"}),", where money is\nissued at the bottom, and not as credit to businesses or creditworthy individuals. This way, every\nindividual gets a ",(0,n.jsx)(t.a,{href:"https://book.encointer.org/economics-ubi.html",children:"universal basic income (UBI)"}),"."]}),(0,n.jsxs)(t.p,{children:["To resist Sybil attacks, the Encointer protocol uses a PoP mechanism to foster a unique identity\nsystem. The notion is that a person can only be present at one place at a given time. Participants\nare requested to attend physical key-signing ceremonies with small groups of random people at\nrandomized locations, where these local meetings are part of one global ceremony that co-occur.\nParticipants use the Encointer wallet app to participate in these ceremonies, and the wallet enables\nthe management of local community currencies. Watch an Encointer ceremony in action in\n",(0,n.jsx)(t.a,{href:"https://www.youtube.com/watch?v=tcgpCCYBqko",children:"this video"}),"."]}),(0,n.jsxs)(t.p,{children:["The protocol involves ",(0,n.jsx)(t.a,{href:"https://book.encointer.org/ssi.html#privacy-considerations",children:"other mechanisms"}),"\nto protect the privacy of users in addition to the physical key-signing ceremonies."]}),(0,n.jsx)(t.p,{children:"Encointer was accepted as a system chain based on its offer of a Sybil defense mechanism as a basis\nfor digital democracy. This can also be adapted by other chains, which can use the unique identity\nsystem to prevent Sybil attacks and use PoP for token airdrops or faucets."}),(0,n.jsx)(t.admonition,{type:"tip",children:(0,n.jsxs)(t.p,{children:["To learn more about Encointer, check out the official\n",(0,n.jsx)(t.a,{href:"https://book.encointer.org/introduction.html",children:"Encointer book"}),"."]})})]})]})]})}function p(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(d,{...e})}):d(e)}},47379:(e,t,a)=>{"use strict";a.d(t,{A:()=>d});var n=a(90675),r=a(10467),s=a(96540),o=a(19588),i=a(2026),l=a(11135);function c(e,t,a){return u.apply(this,arguments)}function u(){return(u=(0,r.A)((0,n.A)().mark((function e(t,a,r){var s,l,c,u,h;return(0,n.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s=void 0,l=void 0,e.t0=t,e.next="polkadot"===e.t0?5:"kusama"===e.t0?7:"statemine"===e.t0?9:"statemint"===e.t0?11:"polkadotpeople"===e.t0?13:"kusamapeople"===e.t0?15:17;break;case 5:return s="wss://rpc.polkadot.io",e.abrupt("break",18);case 7:return s="wss://kusama-rpc.polkadot.io/",e.abrupt("break",18);case 9:return s="wss://statemine-rpc.polkadot.io/",e.abrupt("break",18);case 11:return s="wss://statemint-rpc.polkadot.io/",e.abrupt("break",18);case 13:return s="wss://polkadot-people-rpc.polkadot.io/",e.abrupt("break",18);case 15:return s="wss://kusama-people-rpc.polkadot.io/",e.abrupt("break",18);case 17:console.log("Unknown socket url provided, no connection made.");case 18:if(void 0!==s){e.next=22;break}return e.abrupt("return");case 22:return c=new o.E(s),e.next=25,i.G.create({provider:c});case 25:u=e.sent,(h=a.split(".")).forEach((function(e){e in u&&(u=u[e])})),e.t1=h[0],e.next="consts"===e.t1?31:"query"===e.t1?33:38;break;case 31:return l=u.toString(),e.abrupt("break",39);case 33:return e.next=35,u();case 35:return l=(l=e.sent).toString(),e.abrupt("break",39);case 38:console.log("Unknown path prefix ("+h[0]+") in "+a);case 39:return e.abrupt("return",l);case 40:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function h(e,t,a,n){switch(t){case"humanReadable":(0,l.HumanReadable)(e,a,n);break;case"precise":(0,l.Precise)(e,a,n);break;case"blocksToDays":(0,l.BlocksToDays)(e,n);break;case"erasToDays":(0,l.ErasToDays)(e,n,a);break;case"percentage":(0,l.Percentage)(e,n);break;case"permillToPercent":(0,l.PermillToPercent)(e,n);break;case"arrayLength":(0,l.ArrayLength)(e,n);break;default:return void console.log("Ignoring unknown filter type")}}const d=function(e){var t=e.network,a=e.path,o=e.defaultValue,i=e.filter,l=void 0===i?void 0:i,u=(0,s.useState)(""),d=u[0],p=u[1];return t=t.toLowerCase(),(0,s.useEffect)((function(){void 0!==l?h(o.toString(),l,t,p):p(o.toString());var e=void 0;switch(t){case"polkadot":e="wss://rpc.polkadot.io";break;case"kusama":e="wss://kusama-rpc.polkadot.io/";break;case"statemine":e="wss://kusama-asset-hub-rpc.polkadot.io/";break;case"statemint":e="wss://polkadot-asset-hub-rpc.polkadot.io/";break;case"kusamapeople":e="wss://kusama-people-rpc.polkadot.io";break;case"polkadotpeople":e="wss://polkadot-people-rpc.polkadot.io";break;default:console.log("Unknown network provided, "+t)}if(void 0===e)console.log("Failed to connect to a valid websocket, applying default");else{var s=function(){var e=(0,r.A)((0,n.A)().mark((function e(){var r;return(0,n.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,c(t,a,p);case 2:if(void 0!==(r=e.sent)){e.next=7;break}return e.abrupt("return");case 7:void 0!==l?h(r,l,t,p):p(r);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();try{s()}catch(i){console.log(i)}}}),[]),d}},11135:e=>{var t="polkadot",a="kusama",n="statemine",r="statemint",s="polkadotpeople",o="kusamapeople",i={polkadot:{precision:1e10,symbol:"DOT"},kusama:{precision:1e12,symbol:"KSM"},statemint:{precision:1e10,symbol:"DOT"},statemine:{precision:1e12,symbol:"KSM"},polkadotpeople:{precision:1e10,symbol:"DOT"},kusamapeople:{precision:1e12,symbol:"KSM"}};e.exports={HumanReadable:function(e,l,c){var u=void 0;if(l===t||l===r)u=3;else if(l===a||l===n||l===s)u=6;else{if(l!=o)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");u=8}e=parseFloat(e),c((e=Number.isInteger(e/i[l].precision)?e/i[l].precision+" "+i[l].symbol:(e/i[l].precision).toFixed(u)+" "+i[l].symbol).toString())},Precise:function(e,t,a){a(e=(e=parseFloat(e))/i[t].precision+" "+i[t].symbol)},BlocksToDays:function(e,t){t((e=6*e/86400).toString())},ErasToDays:function(e,i,l){var c=void 0;if(l===t||l===r||l==s)c=1;else{if(l!==a&&l!==n&&l!=o)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");c=4}i((e/=c).toString())},Percentage:function(e,t){t((e/=1e7).toString())},PermillToPercent:function(e,t){t((e/=1e4).toString())},ArrayLength:function(e,t){t((e=e.split(",").length).toString())}}},19365:(e,t,a)=>{"use strict";a.d(t,{A:()=>o});a(96540);var n=a(34164);const r={tabItem:"tabItem_Ymn6"};var s=a(74848);function o(e){var t=e.children,a=e.hidden,o=e.className;return(0,s.jsx)("div",{role:"tabpanel",className:(0,n.A)(r.tabItem,o),hidden:a,children:t})}},11470:(e,t,a)=>{"use strict";a.d(t,{A:()=>x});var n=a(96540),r=a(34164),s=a(23104),o=a(56347),i=a(205),l=a(57485),c=a(31682),u=a(75376);function h(e){var t,a;return null!=(t=null==(a=n.Children.toArray(e).filter((function(e){return"\n"!==e})).map((function(e){if(!e||(0,n.isValidElement)(e)&&((t=e.props)&&"object"==typeof t&&"value"in t))return e;var t;throw new Error("Docusaurus error: Bad child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:a.filter(Boolean))?t:[]}function d(e){var t=e.values,a=e.children;return(0,n.useMemo)((function(){var e=null!=t?t:function(e){return h(e).map((function(e){var t=e.props;return{value:t.value,label:t.label,attributes:t.attributes,default:t.default}}))}(a);return function(e){var t=(0,c.XI)(e,(function(e,t){return e.value===t.value}));if(t.length>0)throw new Error('Docusaurus error: Duplicate values "'+t.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[t,a])}function p(e){var t=e.value;return e.tabValues.some((function(e){return e.value===t}))}function m(e){var t=e.queryString,a=void 0!==t&&t,r=e.groupId,s=(0,o.W6)(),i=function(e){var t=e.queryString,a=void 0!==t&&t,n=e.groupId;if("string"==typeof a)return a;if(!1===a)return null;if(!0===a&&!n)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=n?n:null}({queryString:a,groupId:r});return[(0,l.aZ)(i),(0,n.useCallback)((function(e){if(i){var t=new URLSearchParams(s.location.search);t.set(i,e),s.replace(Object.assign({},s.location,{search:t.toString()}))}}),[i,s])]}function f(e){var t,a,r,s,o=e.defaultValue,l=e.queryString,c=void 0!==l&&l,h=e.groupId,f=d(e),b=(0,n.useState)((function(){return function(e){var t,a=e.defaultValue,n=e.tabValues;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(a){if(!p({value:a,tabValues:n}))throw new Error('Docusaurus error: The has a defaultValue "'+a+'" but none of its children has the corresponding value. Available values are: '+n.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return a}var r=null!=(t=n.find((function(e){return e.default})))?t:n[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:o,tabValues:f})})),v=b[0],k=b[1],y=m({queryString:c,groupId:h}),g=y[0],w=y[1],x=(t=function(e){return e?"docusaurus.tab."+e:null}({groupId:h}.groupId),a=(0,u.Dv)(t),r=a[0],s=a[1],[r,(0,n.useCallback)((function(e){t&&s.set(e)}),[t,s])]),j=x[0],P=x[1],T=function(){var e=null!=g?g:j;return p({value:e,tabValues:f})?e:null}();return(0,i.A)((function(){T&&k(T)}),[T]),{selectedValue:v,selectValue:(0,n.useCallback)((function(e){if(!p({value:e,tabValues:f}))throw new Error("Can't select invalid tab value="+e);k(e),w(e),P(e)}),[w,P,f]),tabValues:f}}var b=a(92303);const v={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var k=a(74848);function y(e){var t=e.className,a=e.block,n=e.selectedValue,o=e.selectValue,i=e.tabValues,l=[],c=(0,s.a_)().blockElementScrollPositionUntilNextRender,u=function(e){var t=e.currentTarget,a=l.indexOf(t),r=i[a].value;r!==n&&(c(t),o(r))},h=function(e){var t,a=null;switch(e.key){case"Enter":u(e);break;case"ArrowRight":var n,r=l.indexOf(e.currentTarget)+1;a=null!=(n=l[r])?n:l[0];break;case"ArrowLeft":var s,o=l.indexOf(e.currentTarget)-1;a=null!=(s=l[o])?s:l[l.length-1]}null==(t=a)||t.focus()};return(0,k.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,r.A)("tabs",{"tabs--block":a},t),children:i.map((function(e){var t=e.value,a=e.label,s=e.attributes;return(0,k.jsx)("li",Object.assign({role:"tab",tabIndex:n===t?0:-1,"aria-selected":n===t,ref:function(e){return l.push(e)},onKeyDown:h,onClick:u},s,{className:(0,r.A)("tabs__item",v.tabItem,null==s?void 0:s.className,{"tabs__item--active":n===t}),children:null!=a?a:t}),t)}))})}function g(e){var t=e.lazy,a=e.children,s=e.selectedValue,o=(Array.isArray(a)?a:[a]).filter(Boolean);if(t){var i=o.find((function(e){return e.props.value===s}));return i?(0,n.cloneElement)(i,{className:(0,r.A)("margin-top--md",i.props.className)}):null}return(0,k.jsx)("div",{className:"margin-top--md",children:o.map((function(e,t){return(0,n.cloneElement)(e,{key:t,hidden:e.props.value!==s})}))})}function w(e){var t=f(e);return(0,k.jsxs)("div",{className:(0,r.A)("tabs-container",v.tabList),children:[(0,k.jsx)(y,Object.assign({},t,e)),(0,k.jsx)(g,Object.assign({},t,e))]})}function x(e){var t=(0,b.A)();return(0,k.jsx)(w,Object.assign({},e,{children:h(e.children)}),String(t))}},47790:()=>{}}]); \ No newline at end of file diff --git a/assets/js/21899dd2.91c79fd4.js b/assets/js/21899dd2.91c79fd4.js new file mode 100644 index 000000000000..eec3efe2ef79 --- /dev/null +++ b/assets/js/21899dd2.91c79fd4.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5168],{55009:(e,a,n)=>{n.r(a),n.d(a,{assets:()=>h,contentTitle:()=>c,default:()=>p,frontMatter:()=>r,metadata:()=>t,toc:()=>l});const t=JSON.parse('{"id":"learn/learn-parachains","title":"Parachains","description":"An Introduction to Polkadot\'s Parachains.","source":"@site/../docs/learn/learn-parachains.md","sourceDirName":"learn","slug":"/learn-parachains","permalink":"/docs/learn-parachains","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-parachains.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1729847256000,"frontMatter":{"id":"learn-parachains","title":"Parachains","sidebar_label":"Introduction to Parachains","description":"An Introduction to Polkadot\'s Parachains.","keywords":["parachains","application-specific","sharding","on-demand","parathread"],"slug":"../learn-parachains"},"sidebar":"docs","previous":{"title":"Parachains","permalink":"/docs/learn-parachains-index"},"next":{"title":"Protocol Overview","permalink":"/docs/learn-parachains-protocol"}}');var i=n(74848),o=n(28453),s=n(67141);const r={id:"learn-parachains",title:"Parachains",sidebar_label:"Introduction to Parachains",description:"An Introduction to Polkadot's Parachains.",keywords:["parachains","application-specific","sharding","on-demand","parathread"],slug:"../learn-parachains"},c=void 0,h={},l=[{value:"Definition of a Parachain",id:"definition-of-a-parachain",level:2},{value:"State Transitions",id:"state-transitions",level:3},{value:"Why Parachains?",id:"why-parachains",level:2},{value:"Parachain Benefits",id:"parachain-benefits",level:3},{value:"Shared Security",id:"shared-security",level:3},{value:"PoW vs Parachain Model",id:"pow-vs-parachain-model",level:3},{value:"Parachain Economies",id:"parachain-economies",level:2},{value:"Coretime",id:"coretime",level:2},{value:"Coretime Expiration",id:"coretime-expiration",level:3},{value:"System Parachains",id:"system-parachains",level:2},{value:"On-demand Parachains",id:"on-demand-parachains",level:2},{value:"Historical Context of On-demand parachains",id:"historical-context-of-on-demand-parachains",level:3},{value:"Parachains vs. On-demand Parachains",id:"parachains-vs-on-demand-parachains",level:3},{value:"Parachains' Use Cases",id:"parachains-use-cases",level:2},{value:"Parachain Host",id:"parachain-host",level:2},{value:"Parachain Hubs",id:"parachain-hubs",level:2},{value:"Resources",id:"resources",level:2}];function d(e){const a={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",strong:"strong",ul:"ul",...(0,o.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(s.A,{message:"[Agile Coretime](./learn-agile-coretime) is activated on the network, and parachain slot auctions and crowdloans have been deprecated. For existing parachains, the remainder of the lease is automatically converted to coretime. See more information [here](./learn-agile-coretime#implementation). For decentralized, transparent, and regulatory-compliant fundraising within the ecosystem, check out the [Polimec parachain](https://www.polimec.org/)."}),"\n",(0,i.jsx)(a.admonition,{title:"Testing on Paseo",type:"info",children:(0,i.jsxs)(a.p,{children:["For information on how to test coretime functionalities on Paseo, please see the\n",(0,i.jsx)(a.a,{href:"/docs/build-pdk#testing-a-parachain",children:"Paseo Content"})," on the parachain development\nguide."]})}),"\n",(0,i.jsx)(a.h2,{id:"definition-of-a-parachain",children:"Definition of a Parachain"}),"\n",(0,i.jsx)(a.p,{children:"A parachain is an application-specific data structure that is globally coherent and can be validated\nby the validators of the relay chain. They take their name from the concept of parallelized chains\nthat run parallel to the relay chain. Most commonly, a parachain will take the form of a blockchain,\nbut there is no specific need for them to be actual blockchains."}),"\n",(0,i.jsx)(a.p,{children:(0,i.jsx)(a.img,{alt:"One parachain",src:n(52608).A+"",width:"1920",height:"800"})}),"\n",(0,i.jsxs)(a.p,{children:["Due to their parallel nature, they can parallelize transaction processing and achieve scalability of\nthe protocol. They ",(0,i.jsx)(a.a,{href:"#shared-security",children:"inherit the security"})," of the entire network and can\ncommunicate with other parachains through the ",(0,i.jsx)(a.a,{href:"/docs/learn-xcm",children:"XCM"})," format."]}),"\n",(0,i.jsxs)(a.p,{children:["Parachains are maintained by a network maintainer known as a ",(0,i.jsx)(a.a,{href:"/docs/learn-collator",children:"collator"}),". The role\nof the collator node is to maintain a full node of the parachain, retain all necessary information\nabout the parachain, and produce new block candidates to pass to the relay chain validators for\nverification and inclusion in the shared state. The incentivization of a collator node is an\nimplementation detail of the parachain. They are not required to be staked on the relay chain or own\nthe native token unless stipulated by the parachain implementation."]}),"\n",(0,i.jsx)(a.h3,{id:"state-transitions",children:"State Transitions"}),"\n",(0,i.jsxs)(a.p,{children:["Like other blockchains, parachains are ",(0,i.jsx)(a.strong,{children:"deterministic state machines"}),". Each parachain has a\n",(0,i.jsx)(a.strong,{children:"state"}),", executes a batch of transactions grouped into a block, and achieves a new state. Joe\nPetrowski provided in ",(0,i.jsx)(a.a,{href:"https://polkadot.network/blog/the-path-of-a-parachain-block/",children:"this article"})," a\ngood analogy of a state with a light switch that can be either on or off, which is one of the\nsimplest examples of how a state machine functions. Each parachain has its own state, and the Relay\nChain links all those states into one state, i.e. a state of states. A multi-chain network like\nPolkadot can be viewed like one computer's state with many light switches where a ",(0,i.jsx)(a.strong,{children:"state transition\nfunction"})," is the logic to decide which switches should be toggled. Parachains have their own\ntransition rule, separate economies, governance mechanisms, and users."]}),"\n",(0,i.jsxs)(a.p,{children:["A parachain's state is stored in a ",(0,i.jsx)(a.a,{href:"https://en.wikipedia.org/wiki/Merkle_tree",children:"Merkle tree"}),". Merkle\ntrees have the convenient property that if some values within the tree change, this will be\nreflected in the Merkle root (in this case, the state root). One can verify the change by only\nlooking at the new values and the paths that are affected within the tree."]}),"\n",(0,i.jsxs)(a.p,{children:["The Polkadot Host requires that the state transitions performed on parachains be specified as a\n",(0,i.jsx)(a.a,{href:"/docs/learn-wasm",children:"Wasm"})," executable. Proofs of new state transitions that occur on a parachain must be\nvalidated against the registered state transition function (STF) that is stored on the relay chain\nby the validators before the relay chain acknowledges a state transition has occurred on a\nparachain. The key constraint regarding the logic of a parachain is that it must be verifiable by\nthe relay chain validators. Verification most commonly takes the form of a bundled proof of a state\ntransition known as a Proof-of-Verification (PoV) block, which is submitted for checking to the\nvalidators from one or more parachain collators."]}),"\n",(0,i.jsx)(a.h2,{id:"why-parachains",children:"Why Parachains?"}),"\n",(0,i.jsx)(a.p,{children:"Parachains are a solution to two fundamental problems in blockchains:"}),"\n",(0,i.jsxs)(a.ul,{children:["\n",(0,i.jsxs)(a.li,{children:[(0,i.jsx)(a.strong,{children:"Scalability"}),": Having one blockchain for many purposes makes it difficult to scale as future\nimplementations and upgrades will likely advantage some purposes and disadvantage others.\nConversely, having different blockchains will allow them to implement features without affecting\nother chains."]}),"\n",(0,i.jsxs)(a.li,{children:[(0,i.jsx)(a.strong,{children:"Flexibility"}),": It is reasonable to state a blockchain will either be really good at solving one\nproblem or not so good at trying to solve many problems. A blockchain specializing in solving a\nspecific problem has more leverage toward itself and its users. Parachains are purpose-built\nblockchains are highly specialized and can take advantage of each other through cooperation."]}),"\n"]}),"\n",(0,i.jsx)(a.h3,{id:"parachain-benefits",children:"Parachain Benefits"}),"\n",(0,i.jsx)(a.p,{children:"Parachains contain their own runtime/STF logic and benefit from the shared security and the\ncross-consensus messaging provided by the relay chain. Parachains permit high flexibility and\ncustomization but require more effort to create and maintain over time. A production-grade parachain\nis typically more involved to create due to the complexity involved in blockchain networks'\ntechnical and economic aspects."}),"\n",(0,i.jsx)(a.p,{children:"Parachains grant the creators more space to build the monetary system and other chain aspects from\nthe ground up. They will allow for a more concise and efficient execution of complex logic than a\nsmart contract platform could offer. Parachains also provide more flexibility in the form of\ngovernance and can perform complete upgrades in a less controversial way than the current process of\nhard forks."}),"\n",(0,i.jsx)(a.p,{children:"Some examples of features you can have on a parachain or parathread:"}),"\n",(0,i.jsxs)(a.ul,{children:["\n",(0,i.jsx)(a.li,{children:"Custom fee structure (for example, pay a flat transaction fee or pay per byte)."}),"\n",(0,i.jsx)(a.li,{children:"Shared security and finalization via the relay chain (Polkadot or Kusama)."}),"\n",(0,i.jsx)(a.li,{children:"Custom monetary policy for the native token and local economy."}),"\n",(0,i.jsx)(a.li,{children:"Treasury to be funded through transitions in your state function."}),"\n",(0,i.jsx)(a.li,{children:"A governance mechanism that could manage a DAO that is responsible for allocating your on-chain\ntreasury."}),"\n"]}),"\n",(0,i.jsx)(a.h3,{id:"shared-security",children:"Shared Security"}),"\n",(0,i.jsxs)(a.p,{children:["Shared security, sometimes referred as ",(0,i.jsx)(a.em,{children:"pooled security"}),", is one of the unique value propositions\nfor chains considering becoming a ",(0,i.jsx)(a.a,{href:"/docs/learn-parachains",children:"parachain"})," and joining the network. On a\nhigh level, shared security means that all parachains that are connected to the relay chain by\naccessing a core will benefit from the economic security provided by the relay chain\n",(0,i.jsx)(a.a,{href:"/docs/learn-validator",children:"validators"}),"."]}),"\n",(0,i.jsxs)(a.p,{children:["The notion of shared security is different from inter-chain protocols that build on an architecture\nof bridges. For bridge protocols, each chain is considered sovereign and must maintain its own\nvalidator set and economic security. One concern in these protocols is the point of scalability of\nsecurity. For example, one suggestion to scale blockchains is that of ",(0,i.jsx)(a.em,{children:"scale by altcoins,"})," which\nsuggests that transaction volumes will filter down to lower market cap altcoins as the bigger ones\nfill their blocks. A major flaw in this idea is that the lower market cap coins will have less\neconomic security attached and be easier to attack. A real-life example of a 51% attack occurred\nrecently (\n",(0,i.jsx)(a.a,{href:"https://cointelegraph.com/news/ethereum-classic-51-attack-the-reality-of-proof-of-work",children:"Ethereum Classic attack on January 10, 2019"}),"\n), in which an unknown attacker double spent 219_500 ETC (~1.1 million USD). This was followed by\ntwo more 51% attacks on ETC."]}),"\n",(0,i.jsx)(a.p,{children:"Polkadot overcomes security scalability concerns since it gravitates all the economic incentives to\nthe relay chain and allows the parachains to tap into stronger guarantees at genesis. Sovereign\nchains must expend much more effort to grow the value of their coin so that it is sufficiently\nsecure against well-funded attackers."}),"\n",(0,i.jsx)(a.h3,{id:"pow-vs-parachain-model",children:"PoW vs Parachain Model"}),"\n",(0,i.jsx)(a.p,{children:"Let's compare the standard sovereign security model that exists on current proof-of-work (PoW)\nchains to Polkadot's shared security model. Bitcoin, Zcash, and their derivatives, must bootstrap\ntheir independent network of miners and maintain a competitive portion of honest hashing power.\nSince mining is becoming a larger industry that increasingly centralizes key players, it is becoming\nmore real that a single actor may control enough hash power to attack a chain."}),"\n",(0,i.jsxs)(a.p,{children:["This means that smaller chains that cannot maintain a secure amount of hash power on their networks\ncould potentially be attacked by a large mining cartel at the simple whim of redirecting its hash\npower away from Bitcoin and toward a new and less secure chain.\n",(0,i.jsx)(a.a,{href:"https://www.crypto51.app",children:"51% attacks are viable today"})," with attacks having been reported on\nEthereum Classic (see above),\n",(0,i.jsx)(a.a,{href:"https://coincentral.com/verge-suffers-51-attack-hard-forks-in-response/",children:"Verge"}),",\n",(0,i.jsx)(a.a,{href:"https://bitcoingold.org/responding-to-attacks/",children:"Bitcoin Gold"}),", and other cryptocurrencies."]}),"\n",(0,i.jsx)(a.p,{children:"On Polkadot, this disparity between chain security will not be present. When a parachain connects to\nthe relay chain, validators become the securers of that parachain's state transitions. The parachain\nwill only have the overhead of running a few collator nodes to keep the validators informed with the\nlatest state transitions and proofs/witness. Validators will then check these for the parachains to\nwhich they are assigned. In this way, new parachains instantly benefit from the overall security\nprovided by the relay chain even if they have just been launched."}),"\n",(0,i.jsx)(a.h2,{id:"parachain-economies",children:"Parachain Economies"}),"\n",(0,i.jsx)(a.p,{children:"Parachains may have their economies with their native tokens. Schemes such as Proof-of-Stake are\nusually used to select the validator set to handle validation and finalization; parachains will not\nbe required to do either of those things. However, since Polkadot is not overly particular about\nwhat the parachain can implement, it may be the choice of the parachain to implement a staking\ntoken, but it's not generally necessary."}),"\n",(0,i.jsx)(a.p,{children:"Collators may be incentivized through the inflation of a native parachain token. There may be other\nways to incentivize the collator nodes that do not involve inflating the native parachain token."}),"\n",(0,i.jsx)(a.p,{children:"Transaction fees in a native parachain token can also be an implementation choice of parachains.\nPolkadot makes no hard and fast rules for how the parachains decide on the original validity of\ntransactions. For example, a parachain may be implemented so that transactions must pay a minimum\nfee to collators to be valid. The relay chain will enforce this validity. Similarly, a parachain\ncould not include that in their implementation, and the relay chain would still enforce its\nvalidity."}),"\n",(0,i.jsx)(a.p,{children:"Parachains are not required to have their token. If they do, it is up to the parachain (and not the\nrelay chain) to make the economic case for their token."}),"\n",(0,i.jsx)(a.h2,{id:"coretime",children:"Coretime"}),"\n",(0,i.jsx)(a.p,{children:"Parachains can access the relay chain via cores."}),"\n",(0,i.jsx)(a.p,{children:"There are two ways to allocate relay chain cores:"}),"\n",(0,i.jsxs)(a.ul,{children:["\n",(0,i.jsxs)(a.li,{children:["Via Governance only to ",(0,i.jsx)(a.a,{href:"/docs/learn-system-chains",children:"system chains"}),"."]}),"\n",(0,i.jsxs)(a.li,{children:["Via ",(0,i.jsx)(a.a,{href:"/docs/learn-agile-coretime",children:"coretime"})," purchase with DOT (KSM on Kusama) for non-system chains.\nCoretime is used to rent computation time on a relay chain core. This is the only way to access\nPolkadot's shared security and interoperability."]}),"\n"]}),"\n",(0,i.jsxs)(a.p,{children:[(0,i.jsx)(a.a,{href:"#system-parachains",children:"System parachains"})," are allocated by Polkadot's on-chain\n",(0,i.jsx)(a.a,{href:"/docs/learn-polkadot-opengov",children:"governance"})," and are part of the network's protocol, such as bridges to\nother networks or chains. These typically do not have an economic model and help remove transactions\nfrom the relay chain, allowing for more efficient parachain processing."]}),"\n",(0,i.jsx)(a.p,{children:"Non-system chains can access the relay chain's cores via bulk or on-demand coretime purchased with\nDOT (or KSM on Kusama)."}),"\n",(0,i.jsx)(a.h3,{id:"coretime-expiration",children:"Coretime Expiration"}),"\n",(0,i.jsxs)(a.p,{children:["The DOT (or KSM on Kusama) used to purchase coretime are burned. Before the coretime expires,\nparachains can renew it at a fixed cost through a bulk coretime purchase. If the parachain does not\npurchase bulk coretime, it has an option to purchase coretime on-demand (at a variable price per\nblock, depending on the demand and other market conditions) when they need to access the relay\nchain. Parachains without coretime to extend time on a relay chain core will be deprecated to the\nstatus of a parathread (i.e., a chain with a registered ",(0,i.jsx)(a.code,{children:"ParaID"})," but without access to a core)."]}),"\n",(0,i.jsx)(a.h2,{id:"system-parachains",children:"System Parachains"}),"\n",(0,i.jsxs)(a.p,{children:[(0,i.jsx)(a.a,{href:"/docs/learn-system-chains",children:"System parachains"})," are parachains that use execution cores allocated by\nthe network's governance. These chains remove transactions from the relay chain, allowing network\nvalidators to allocate resources to validating parachains. System chains are Polkadot using its\nscaling technology to host itself."]}),"\n",(0,i.jsx)(a.h2,{id:"on-demand-parachains",children:"On-demand Parachains"}),"\n",(0,i.jsx)(a.admonition,{title:"On-demand parachains were previously named parathreads",type:"info",children:(0,i.jsxs)(a.p,{children:["On-demand parachains (previously called parathreads) are parachains that acquire\n",(0,i.jsx)(a.a,{href:"/docs/learn-agile-coretime#on-demand-coretime",children:"on-demand coretime"}),"."]})}),"\n",(0,i.jsxs)(a.p,{children:["On-demand parachains temporarily participate (on a block by block basis) in network security without\nneeding to lease a dedicated relay chain core. This is done through economically sharing the scarce\nresource of a core among several competing resources (parachains). Chains that otherwise would not\nbe able to acquire a full core or do not find it economically sensible to do so, can participate in\nshared security, as the ",(0,i.jsx)(a.a,{href:"/docs/learn-agile-coretime#on-demand-coretime",children:"on-demand coretime"})," offers a\ngraceful off-ramp to parachains that no longer require a dedicated core, but would like to continue\nusing the relay chain."]}),"\n",(0,i.jsx)(a.h3,{id:"historical-context-of-on-demand-parachains",children:"Historical Context of On-demand parachains"}),"\n",(0,i.jsxs)(a.p,{children:["According to ",(0,i.jsx)(a.a,{href:"https://v.douyu.com/show/a4Jj7llO5q47Dk01",children:"this talk"})," in Chengdu back in 2019, the\norigin of the idea for on-demand parachains came from similar notions in the limited resource of\nmemory on early personal computers of the late '80s and '90s. Since computers have a limited amount\nof physical memory, when an application needs more, the computer can create virtual memory by using\n",(0,i.jsx)(a.em,{children:"swap space"})," on a hard disk. Swap space allows the capacity of a computer's memory to expand and for\nmore processes to run concurrently with the trade-off that some processes will take longer to\nprogress."]}),"\n",(0,i.jsx)(a.h3,{id:"parachains-vs-on-demand-parachains",children:"Parachains vs. On-demand Parachains"}),"\n",(0,i.jsx)(a.p,{children:"Parachains and on-demand parachains are very similar from a development perspective. One can imagine\nthat a chain developed with Substrate can at different points in its lifetime assume one of three\nstates:"}),"\n",(0,i.jsxs)(a.ul,{children:["\n",(0,i.jsx)(a.li,{children:"an independent chain with secured bridge,"}),"\n",(0,i.jsx)(a.li,{children:"a parachain continuously connected to the relay chain,"}),"\n",(0,i.jsx)(a.li,{children:"or a parachain intermittently connected to the relay chain (i.e. on-demand)"}),"\n"]}),"\n",(0,i.jsx)(a.p,{children:"It can switch between these states with relatively minimal effort since the difference is more of an\neconomic distinction than a technological one."}),"\n",(0,i.jsxs)(a.p,{children:["On-demand parachains have the exact same benefits for connecting to the relay chain that a full\nparachain has. Namely, it is able to send messages to other para-objects through\n",(0,i.jsx)(a.a,{href:"/docs/learn-xcm###XCMP",children:"XCMP"})," and it is secured under the full economic security of the relay chain\nvalidator set."]}),"\n",(0,i.jsx)(a.h2,{id:"parachains-use-cases",children:"Parachains' Use Cases"}),"\n",(0,i.jsx)(a.p,{children:"Note that we still have to see the true potential of parachains and what it is listed below are just\na few examples."}),"\n",(0,i.jsxs)(a.ul,{children:["\n",(0,i.jsxs)(a.li,{children:[(0,i.jsx)(a.strong,{children:"Encrypted Consortium Chains"}),": These are possibly private chains that do not leak any\ninformation to the public but still can be interacted with trustlessly due to the nature of the\nXCMP protocol."]}),"\n",(0,i.jsxs)(a.li,{children:[(0,i.jsx)(a.strong,{children:"High-Frequency Chains"}),": These chains can compute many transactions in a short amount of time by\ntaking certain trade-offs or making optimizations."]}),"\n",(0,i.jsxs)(a.li,{children:[(0,i.jsx)(a.strong,{children:"Privacy Chains"}),": These chains do not leak any information to the public through novel\ncryptography."]}),"\n",(0,i.jsxs)(a.li,{children:[(0,i.jsx)(a.strong,{children:"Smart Contract Chains"}),": These chains can have additional logic implemented through the\ndeployment of code known as ",(0,i.jsx)(a.em,{children:"smart contracts"}),"."]}),"\n"]}),"\n",(0,i.jsx)(a.h2,{id:"parachain-host",children:"Parachain Host"}),"\n",(0,i.jsxs)(a.p,{children:["A blockchain is a ",(0,i.jsx)(a.a,{href:"https://en.wikipedia.org/wiki/Directed_acyclic_graph",children:"Directed Acyclic Graph"}),"\n(DAG) of state transitions, where every added block can be viewed as the head of the chain or fork\nwith cumulative state. All paths through the DAG terminate at the Genesis Block. A blockchain is a\ntree, as each block can have only one parent."]}),"\n",(0,i.jsx)(a.p,{children:"A blockchain network is made of nodes that have a view of many forks of the chain and must decide\nwhich fork to follow. To construct the parachain host we need to answer two categories of questions\naddressed by two different components:"}),"\n",(0,i.jsxs)(a.ul,{children:["\n",(0,i.jsxs)(a.li,{children:["\n",(0,i.jsxs)(a.p,{children:["What is the state transition function of the blockchain? This is handled by the ",(0,i.jsx)(a.strong,{children:"Runtime"}),", which\ndefines the state transition logic of the chain. The Runtime logic is divided into:"]}),"\n",(0,i.jsxs)(a.ul,{children:["\n",(0,i.jsxs)(a.li,{children:[(0,i.jsx)(a.strong,{children:"Modules"})," encapsulate particular behavior of the protocol and consist of:","\n",(0,i.jsxs)(a.ul,{children:["\n",(0,i.jsx)(a.li,{children:"Storage"}),"\n",(0,i.jsx)(a.li,{children:"Routines are invoked by entry points and other modules upon block initialization or closing.\nRoutines can alter the storage of a module."}),"\n",(0,i.jsx)(a.li,{children:"The entry point defines how new information is introduced to a module and can limit the origin\nfrom which they are called (user, root, parachain)."}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(a.li,{children:[(0,i.jsx)(a.strong,{children:"API"})," provides means for the node-side behavior to extract meaningful information from the\nstate of a single fork."]}),"\n"]}),"\n",(0,i.jsx)(a.admonition,{type:"info",children:(0,i.jsxs)(a.p,{children:["The Polkadot Parachain Host Implementers' Guide provides details about\n",(0,i.jsx)(a.a,{href:"https://paritytech.github.io/polkadot/book/runtime/index.html",children:"Runtime Architecture"})," and\n",(0,i.jsx)(a.a,{href:"https://paritytech.github.io/polkadot/book/runtime-api/index.html",children:"Runtime API"}),"."]})}),"\n"]}),"\n",(0,i.jsxs)(a.li,{children:["\n",(0,i.jsxs)(a.p,{children:["Knowing various forks of the blockchain, what behaviors should a node take? What information\nshould a node extract from the state of which forks, and how should that information be used? This\nis handled by the ",(0,i.jsx)(a.strong,{children:"Node-side behavior"}),", which defines all activities a node undertakes given its\nview of the blockchain. The node-side behavior can be divided into two categories:"]}),"\n",(0,i.jsxs)(a.ul,{children:["\n",(0,i.jsxs)(a.li,{children:[(0,i.jsx)(a.strong,{children:"Networking behaviors"}),", relate to how information is distributed between nodes but not how the\ninformation is used afterward."]}),"\n",(0,i.jsxs)(a.li,{children:[(0,i.jsx)(a.strong,{children:"Core behaviors"}),", relate to internal work that a specific node does. Such behavior cares about\nthat information is ",(0,i.jsx)(a.em,{children:"distributed"})," and ",(0,i.jsx)(a.em,{children:"received"}),", but not how these two are achieved."]}),"\n"]}),"\n",(0,i.jsxs)(a.p,{children:["These two categories often interact, but they can be heavily abstracted from each other. The\nnode-side behavior is split into various ",(0,i.jsx)(a.strong,{children:"subsystems"}),", which perform a particular category of\nwork. Subsystems can communicate with each other through an\n",(0,i.jsx)(a.a,{href:"https://paritytech.github.io/polkadot/book/node/overseer.html",children:"Overseer"})," that prevents race\nconditions."]}),"\n",(0,i.jsxs)(a.admonition,{type:"info",children:[(0,i.jsxs)(a.p,{children:["The Polkadot Parachain Host Implementers' Guide provides details about\n",(0,i.jsx)(a.a,{href:"https://paritytech.github.io/polkadot/book/node/index.html",children:"node architecture"})," the main\nsubsystems:"]}),(0,i.jsxs)(a.ul,{children:["\n",(0,i.jsx)(a.li,{children:(0,i.jsx)(a.a,{href:"https://paritytech.github.io/polkadot/book/node/collators/index.html",children:"Collator subsystem"})}),"\n",(0,i.jsx)(a.li,{children:(0,i.jsx)(a.a,{href:"https://paritytech.github.io/polkadot/book/node/backing/index.html",children:"Backing subsystem"})}),"\n",(0,i.jsx)(a.li,{children:(0,i.jsx)(a.a,{href:"https://paritytech.github.io/polkadot/book/node/availability/index.html",children:"Availability subsystem"})}),"\n",(0,i.jsx)(a.li,{children:(0,i.jsx)(a.a,{href:"https://paritytech.github.io/polkadot/book/node/approval/index.html",children:"Approval subsystem"})}),"\n",(0,i.jsx)(a.li,{children:(0,i.jsx)(a.a,{href:"https://paritytech.github.io/polkadot/book/node/disputes/index.html",children:"Dispute subsystem"})}),"\n",(0,i.jsx)(a.li,{children:(0,i.jsx)(a.a,{href:"https://paritytech.github.io/polkadot/book/node/utility/index.html",children:"Utility subsystem"})}),"\n"]})]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(a.p,{children:["The Runtime and Node-side behavior are dependent on each other. The Runtime depends on Node-side\nbehavior to author blocks, and to include ",(0,i.jsx)(a.a,{href:"/docs/learn-transactions",children:"extrinsics"})," which trigger the\ncorrect entry points. The Node-side behavior relies on the Runtime APIs to extract information\nnecessary to determine which action to take."]}),"\n",(0,i.jsx)(a.h2,{id:"parachain-hubs",children:"Parachain Hubs"}),"\n",(0,i.jsx)(a.p,{children:"While the relay chain enables crosschain functionality amongst the parachains, it necessitates that\nthere is some latency between the dispatch of a message from one parachain until the destination\nparachain receives the message. In the optimistic scenario, the latency for this message should be\nat least two blocks - one block for the message to be dispatched and one block for the receiving\nparachain to process and produce a block that acts upon the message. However, in some cases, we may\nsee that the latency for messages is higher if many messages are in queue to be processed or if no\nnodes are running both parachain networks that can quickly gossip the message across the networks."}),"\n",(0,i.jsxs)(a.p,{children:["Due to the necessary latency in sending crosschain messages, some parachains plan to become ",(0,i.jsx)(a.em,{children:"hubs"}),"\nfor an entire industry (see the ",(0,i.jsx)(a.a,{href:"/docs/learn-assets",children:"Asset Hub"})," and\n",(0,i.jsx)(a.a,{href:"/docs/learn-system-chains#bridge-hub",children:"Bridge Hub"}),"). For example, many DeFi applications could take\nadvantage of a property known as ",(0,i.jsx)(a.em,{children:"composability"})," which means that functions of one application can\nbe synergistically composed with others to create new applications. One example of this includes\nflash loans, which borrow funds to execute some on-chain logic as long as the loan is repaid at the\nend of the transaction."]}),"\n",(0,i.jsxs)(a.p,{children:["An issue with crosschain latency means that composability property weakens among parachains compared\nto a single blockchain. ",(0,i.jsx)(a.strong,{children:"This implication is common to all sharded blockchain designs, including\nPolkadot, Ethereum, and others."})," The solution to this is the introduction of parachain hubs, which\nmaintain the stronger property of single block composability."]}),"\n",(0,i.jsx)(a.h2,{id:"resources",children:"Resources"}),"\n",(0,i.jsxs)(a.ul,{children:["\n",(0,i.jsxs)(a.li,{children:[(0,i.jsx)(a.a,{href:"https://medium.com/polkadot-network/polkadot-the-parachain-3808040a769a",children:"Polkadot: The Parachain"}),' -\nBlog post by Polkadot co-founder Rob Habermeier who introduced parachains in 2017 as "a simpler\nform of blockchain, which attaches to the security provided by a relay chain rather than providing\nits own. The relay chain provides security to attached parachains, but also provides a guarantee\nof secure message-passing between them."']}),"\n",(0,i.jsxs)(a.li,{children:[(0,i.jsx)(a.a,{href:"https://polkadot.network/the-path-of-a-parachain-block/",children:"The Path of a Parachain Block"})," - A\ntechnical walk-through of how parachains interact with the relay chain."]}),"\n"]})]})}function p(e={}){const{wrapper:a}={...(0,o.R)(),...e.components};return a?(0,i.jsx)(a,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}},67141:(e,a,n)=>{n.d(a,{A:()=>o});var t=n(96540),i=n(74848);const o=function(e){var a,n=e.message,o=(0,t.useState)(!0),s=o[0],r=o[1];return(0,i.jsx)(i.Fragment,{children:s&&(0,i.jsxs)("div",{className:"message-box",children:[(0,i.jsx)("button",{className:"close-button",onClick:function(){r(!1)},children:"\u2716 "}),(0,i.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(a=n,a.replace(/\[(.*?)\]\((.*?)\)/g,'
    $1'))}})]})})}},52608:(e,a,n)=>{n.d(a,{A:()=>t});const t=n.p+"assets/images/one-parachain-f8e0673144a718bd67834cdd69894ca2.png"},28453:(e,a,n)=>{n.d(a,{R:()=>s,x:()=>r});var t=n(96540);const i={},o=t.createContext(i);function s(e){const a=t.useContext(o);return t.useMemo((function(){return"function"==typeof e?e(a):{...a,...e}}),[a,e])}function r(e){let a;return a=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:s(e.components),t.createElement(o.Provider,{value:a},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/21899dd2.a6406bfc.js b/assets/js/21899dd2.a6406bfc.js deleted file mode 100644 index 4d2cbc80b33a..000000000000 --- a/assets/js/21899dd2.a6406bfc.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5168],{34495:(e,a,n)=>{n.r(a),n.d(a,{assets:()=>h,contentTitle:()=>r,default:()=>p,frontMatter:()=>s,metadata:()=>c,toc:()=>l});var t=n(74848),i=n(28453),o=n(67141);const s={id:"learn-parachains",title:"Parachains",sidebar_label:"Introduction to Parachains",description:"An Introduction to Polkadot's Parachains.",keywords:["parachains","application-specific","sharding","on-demand","parathread"],slug:"../learn-parachains"},r=void 0,c={id:"learn/learn-parachains",title:"Parachains",description:"An Introduction to Polkadot's Parachains.",source:"@site/../docs/learn/learn-parachains.md",sourceDirName:"learn",slug:"/learn-parachains",permalink:"/docs/learn-parachains",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-parachains.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1729847256e3,frontMatter:{id:"learn-parachains",title:"Parachains",sidebar_label:"Introduction to Parachains",description:"An Introduction to Polkadot's Parachains.",keywords:["parachains","application-specific","sharding","on-demand","parathread"],slug:"../learn-parachains"},sidebar:"docs",previous:{title:"Parachains",permalink:"/docs/learn-parachains-index"},next:{title:"Protocol Overview",permalink:"/docs/learn-parachains-protocol"}},h={},l=[{value:"Definition of a Parachain",id:"definition-of-a-parachain",level:2},{value:"State Transitions",id:"state-transitions",level:3},{value:"Why Parachains?",id:"why-parachains",level:2},{value:"Parachain Benefits",id:"parachain-benefits",level:3},{value:"Shared Security",id:"shared-security",level:3},{value:"PoW vs Parachain Model",id:"pow-vs-parachain-model",level:3},{value:"Parachain Economies",id:"parachain-economies",level:2},{value:"Coretime",id:"coretime",level:2},{value:"Coretime Expiration",id:"coretime-expiration",level:3},{value:"System Parachains",id:"system-parachains",level:2},{value:"On-demand Parachains",id:"on-demand-parachains",level:2},{value:"Historical Context of On-demand parachains",id:"historical-context-of-on-demand-parachains",level:3},{value:"Parachains vs. On-demand Parachains",id:"parachains-vs-on-demand-parachains",level:3},{value:"Parachains' Use Cases",id:"parachains-use-cases",level:2},{value:"Parachain Host",id:"parachain-host",level:2},{value:"Parachain Hubs",id:"parachain-hubs",level:2},{value:"Resources",id:"resources",level:2}];function d(e){const a={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o.A,{message:"[Agile Coretime](./learn-agile-coretime) is activated on the network, and parachain slot auctions and crowdloans have been deprecated. For existing parachains, the remainder of the lease is automatically converted to coretime. See more information [here](./learn-agile-coretime#implementation). For decentralized, transparent, and regulatory-compliant fundraising within the ecosystem, check out the [Polimec parachain](https://www.polimec.org/)."}),"\n",(0,t.jsx)(a.admonition,{title:"Testing on Paseo",type:"info",children:(0,t.jsxs)(a.p,{children:["For information on how to test coretime functionalities on Paseo, please see the\n",(0,t.jsx)(a.a,{href:"/docs/build-pdk#testing-a-parachain",children:"Paseo Content"})," on the parachain development\nguide."]})}),"\n",(0,t.jsx)(a.h2,{id:"definition-of-a-parachain",children:"Definition of a Parachain"}),"\n",(0,t.jsx)(a.p,{children:"A parachain is an application-specific data structure that is globally coherent and can be validated\nby the validators of the relay chain. They take their name from the concept of parallelized chains\nthat run parallel to the relay chain. Most commonly, a parachain will take the form of a blockchain,\nbut there is no specific need for them to be actual blockchains."}),"\n",(0,t.jsx)(a.p,{children:(0,t.jsx)(a.img,{alt:"One parachain",src:n(52608).A+"",width:"1920",height:"800"})}),"\n",(0,t.jsxs)(a.p,{children:["Due to their parallel nature, they can parallelize transaction processing and achieve scalability of\nthe protocol. They ",(0,t.jsx)(a.a,{href:"#shared-security",children:"inherit the security"})," of the entire network and can\ncommunicate with other parachains through the ",(0,t.jsx)(a.a,{href:"/docs/learn-xcm",children:"XCM"})," format."]}),"\n",(0,t.jsxs)(a.p,{children:["Parachains are maintained by a network maintainer known as a ",(0,t.jsx)(a.a,{href:"/docs/learn-collator",children:"collator"}),". The role\nof the collator node is to maintain a full node of the parachain, retain all necessary information\nabout the parachain, and produce new block candidates to pass to the relay chain validators for\nverification and inclusion in the shared state. The incentivization of a collator node is an\nimplementation detail of the parachain. They are not required to be staked on the relay chain or own\nthe native token unless stipulated by the parachain implementation."]}),"\n",(0,t.jsx)(a.h3,{id:"state-transitions",children:"State Transitions"}),"\n",(0,t.jsxs)(a.p,{children:["Like other blockchains, parachains are ",(0,t.jsx)(a.strong,{children:"deterministic state machines"}),". Each parachain has a\n",(0,t.jsx)(a.strong,{children:"state"}),", executes a batch of transactions grouped into a block, and achieves a new state. Joe\nPetrowski provided in ",(0,t.jsx)(a.a,{href:"https://polkadot.network/blog/the-path-of-a-parachain-block/",children:"this article"})," a\ngood analogy of a state with a light switch that can be either on or off, which is one of the\nsimplest examples of how a state machine functions. Each parachain has its own state, and the Relay\nChain links all those states into one state, i.e. a state of states. A multi-chain network like\nPolkadot can be viewed like one computer's state with many light switches where a ",(0,t.jsx)(a.strong,{children:"state transition\nfunction"})," is the logic to decide which switches should be toggled. Parachains have their own\ntransition rule, separate economies, governance mechanisms, and users."]}),"\n",(0,t.jsxs)(a.p,{children:["A parachain's state is stored in a ",(0,t.jsx)(a.a,{href:"https://en.wikipedia.org/wiki/Merkle_tree",children:"Merkle tree"}),". Merkle\ntrees have the convenient property that if some values within the tree change, this will be\nreflected in the Merkle root (in this case, the state root). One can verify the change by only\nlooking at the new values and the paths that are affected within the tree."]}),"\n",(0,t.jsxs)(a.p,{children:["The Polkadot Host requires that the state transitions performed on parachains be specified as a\n",(0,t.jsx)(a.a,{href:"/docs/learn-wasm",children:"Wasm"})," executable. Proofs of new state transitions that occur on a parachain must be\nvalidated against the registered state transition function (STF) that is stored on the relay chain\nby the validators before the relay chain acknowledges a state transition has occurred on a\nparachain. The key constraint regarding the logic of a parachain is that it must be verifiable by\nthe relay chain validators. Verification most commonly takes the form of a bundled proof of a state\ntransition known as a Proof-of-Verification (PoV) block, which is submitted for checking to the\nvalidators from one or more parachain collators."]}),"\n",(0,t.jsx)(a.h2,{id:"why-parachains",children:"Why Parachains?"}),"\n",(0,t.jsx)(a.p,{children:"Parachains are a solution to two fundamental problems in blockchains:"}),"\n",(0,t.jsxs)(a.ul,{children:["\n",(0,t.jsxs)(a.li,{children:[(0,t.jsx)(a.strong,{children:"Scalability"}),": Having one blockchain for many purposes makes it difficult to scale as future\nimplementations and upgrades will likely advantage some purposes and disadvantage others.\nConversely, having different blockchains will allow them to implement features without affecting\nother chains."]}),"\n",(0,t.jsxs)(a.li,{children:[(0,t.jsx)(a.strong,{children:"Flexibility"}),": It is reasonable to state a blockchain will either be really good at solving one\nproblem or not so good at trying to solve many problems. A blockchain specializing in solving a\nspecific problem has more leverage toward itself and its users. Parachains are purpose-built\nblockchains are highly specialized and can take advantage of each other through cooperation."]}),"\n"]}),"\n",(0,t.jsx)(a.h3,{id:"parachain-benefits",children:"Parachain Benefits"}),"\n",(0,t.jsx)(a.p,{children:"Parachains contain their own runtime/STF logic and benefit from the shared security and the\ncross-consensus messaging provided by the relay chain. Parachains permit high flexibility and\ncustomization but require more effort to create and maintain over time. A production-grade parachain\nis typically more involved to create due to the complexity involved in blockchain networks'\ntechnical and economic aspects."}),"\n",(0,t.jsx)(a.p,{children:"Parachains grant the creators more space to build the monetary system and other chain aspects from\nthe ground up. They will allow for a more concise and efficient execution of complex logic than a\nsmart contract platform could offer. Parachains also provide more flexibility in the form of\ngovernance and can perform complete upgrades in a less controversial way than the current process of\nhard forks."}),"\n",(0,t.jsx)(a.p,{children:"Some examples of features you can have on a parachain or parathread:"}),"\n",(0,t.jsxs)(a.ul,{children:["\n",(0,t.jsx)(a.li,{children:"Custom fee structure (for example, pay a flat transaction fee or pay per byte)."}),"\n",(0,t.jsx)(a.li,{children:"Shared security and finalization via the relay chain (Polkadot or Kusama)."}),"\n",(0,t.jsx)(a.li,{children:"Custom monetary policy for the native token and local economy."}),"\n",(0,t.jsx)(a.li,{children:"Treasury to be funded through transitions in your state function."}),"\n",(0,t.jsx)(a.li,{children:"A governance mechanism that could manage a DAO that is responsible for allocating your on-chain\ntreasury."}),"\n"]}),"\n",(0,t.jsx)(a.h3,{id:"shared-security",children:"Shared Security"}),"\n",(0,t.jsxs)(a.p,{children:["Shared security, sometimes referred as ",(0,t.jsx)(a.em,{children:"pooled security"}),", is one of the unique value propositions\nfor chains considering becoming a ",(0,t.jsx)(a.a,{href:"/docs/learn-parachains",children:"parachain"})," and joining the network. On a\nhigh level, shared security means that all parachains that are connected to the relay chain by\naccessing a core will benefit from the economic security provided by the relay chain\n",(0,t.jsx)(a.a,{href:"/docs/learn-validator",children:"validators"}),"."]}),"\n",(0,t.jsxs)(a.p,{children:["The notion of shared security is different from inter-chain protocols that build on an architecture\nof bridges. For bridge protocols, each chain is considered sovereign and must maintain its own\nvalidator set and economic security. One concern in these protocols is the point of scalability of\nsecurity. For example, one suggestion to scale blockchains is that of ",(0,t.jsx)(a.em,{children:"scale by altcoins,"})," which\nsuggests that transaction volumes will filter down to lower market cap altcoins as the bigger ones\nfill their blocks. A major flaw in this idea is that the lower market cap coins will have less\neconomic security attached and be easier to attack. A real-life example of a 51% attack occurred\nrecently (\n",(0,t.jsx)(a.a,{href:"https://cointelegraph.com/news/ethereum-classic-51-attack-the-reality-of-proof-of-work",children:"Ethereum Classic attack on January 10, 2019"}),"\n), in which an unknown attacker double spent 219_500 ETC (~1.1 million USD). This was followed by\ntwo more 51% attacks on ETC."]}),"\n",(0,t.jsx)(a.p,{children:"Polkadot overcomes security scalability concerns since it gravitates all the economic incentives to\nthe relay chain and allows the parachains to tap into stronger guarantees at genesis. Sovereign\nchains must expend much more effort to grow the value of their coin so that it is sufficiently\nsecure against well-funded attackers."}),"\n",(0,t.jsx)(a.h3,{id:"pow-vs-parachain-model",children:"PoW vs Parachain Model"}),"\n",(0,t.jsx)(a.p,{children:"Let's compare the standard sovereign security model that exists on current proof-of-work (PoW)\nchains to Polkadot's shared security model. Bitcoin, Zcash, and their derivatives, must bootstrap\ntheir independent network of miners and maintain a competitive portion of honest hashing power.\nSince mining is becoming a larger industry that increasingly centralizes key players, it is becoming\nmore real that a single actor may control enough hash power to attack a chain."}),"\n",(0,t.jsxs)(a.p,{children:["This means that smaller chains that cannot maintain a secure amount of hash power on their networks\ncould potentially be attacked by a large mining cartel at the simple whim of redirecting its hash\npower away from Bitcoin and toward a new and less secure chain.\n",(0,t.jsx)(a.a,{href:"https://www.crypto51.app",children:"51% attacks are viable today"})," with attacks having been reported on\nEthereum Classic (see above),\n",(0,t.jsx)(a.a,{href:"https://coincentral.com/verge-suffers-51-attack-hard-forks-in-response/",children:"Verge"}),",\n",(0,t.jsx)(a.a,{href:"https://bitcoingold.org/responding-to-attacks/",children:"Bitcoin Gold"}),", and other cryptocurrencies."]}),"\n",(0,t.jsx)(a.p,{children:"On Polkadot, this disparity between chain security will not be present. When a parachain connects to\nthe relay chain, validators become the securers of that parachain's state transitions. The parachain\nwill only have the overhead of running a few collator nodes to keep the validators informed with the\nlatest state transitions and proofs/witness. Validators will then check these for the parachains to\nwhich they are assigned. In this way, new parachains instantly benefit from the overall security\nprovided by the relay chain even if they have just been launched."}),"\n",(0,t.jsx)(a.h2,{id:"parachain-economies",children:"Parachain Economies"}),"\n",(0,t.jsx)(a.p,{children:"Parachains may have their economies with their native tokens. Schemes such as Proof-of-Stake are\nusually used to select the validator set to handle validation and finalization; parachains will not\nbe required to do either of those things. However, since Polkadot is not overly particular about\nwhat the parachain can implement, it may be the choice of the parachain to implement a staking\ntoken, but it's not generally necessary."}),"\n",(0,t.jsx)(a.p,{children:"Collators may be incentivized through the inflation of a native parachain token. There may be other\nways to incentivize the collator nodes that do not involve inflating the native parachain token."}),"\n",(0,t.jsx)(a.p,{children:"Transaction fees in a native parachain token can also be an implementation choice of parachains.\nPolkadot makes no hard and fast rules for how the parachains decide on the original validity of\ntransactions. For example, a parachain may be implemented so that transactions must pay a minimum\nfee to collators to be valid. The relay chain will enforce this validity. Similarly, a parachain\ncould not include that in their implementation, and the relay chain would still enforce its\nvalidity."}),"\n",(0,t.jsx)(a.p,{children:"Parachains are not required to have their token. If they do, it is up to the parachain (and not the\nrelay chain) to make the economic case for their token."}),"\n",(0,t.jsx)(a.h2,{id:"coretime",children:"Coretime"}),"\n",(0,t.jsx)(a.p,{children:"Parachains can access the relay chain via cores."}),"\n",(0,t.jsx)(a.p,{children:"There are two ways to allocate relay chain cores:"}),"\n",(0,t.jsxs)(a.ul,{children:["\n",(0,t.jsxs)(a.li,{children:["Via Governance only to ",(0,t.jsx)(a.a,{href:"/docs/learn-system-chains",children:"system chains"}),"."]}),"\n",(0,t.jsxs)(a.li,{children:["Via ",(0,t.jsx)(a.a,{href:"/docs/learn-agile-coretime",children:"coretime"})," purchase with DOT (KSM on Kusama) for non-system chains.\nCoretime is used to rent computation time on a relay chain core. This is the only way to access\nPolkadot's shared security and interoperability."]}),"\n"]}),"\n",(0,t.jsxs)(a.p,{children:[(0,t.jsx)(a.a,{href:"#system-parachains",children:"System parachains"})," are allocated by Polkadot's on-chain\n",(0,t.jsx)(a.a,{href:"/docs/learn-polkadot-opengov",children:"governance"})," and are part of the network's protocol, such as bridges to\nother networks or chains. These typically do not have an economic model and help remove transactions\nfrom the relay chain, allowing for more efficient parachain processing."]}),"\n",(0,t.jsx)(a.p,{children:"Non-system chains can access the relay chain's cores via bulk or on-demand coretime purchased with\nDOT (or KSM on Kusama)."}),"\n",(0,t.jsx)(a.h3,{id:"coretime-expiration",children:"Coretime Expiration"}),"\n",(0,t.jsxs)(a.p,{children:["The DOT (or KSM on Kusama) used to purchase coretime are burned. Before the coretime expires,\nparachains can renew it at a fixed cost through a bulk coretime purchase. If the parachain does not\npurchase bulk coretime, it has an option to purchase coretime on-demand (at a variable price per\nblock, depending on the demand and other market conditions) when they need to access the relay\nchain. Parachains without coretime to extend time on a relay chain core will be deprecated to the\nstatus of a parathread (i.e., a chain with a registered ",(0,t.jsx)(a.code,{children:"ParaID"})," but without access to a core)."]}),"\n",(0,t.jsx)(a.h2,{id:"system-parachains",children:"System Parachains"}),"\n",(0,t.jsxs)(a.p,{children:[(0,t.jsx)(a.a,{href:"/docs/learn-system-chains",children:"System parachains"})," are parachains that use execution cores allocated by\nthe network's governance. These chains remove transactions from the relay chain, allowing network\nvalidators to allocate resources to validating parachains. System chains are Polkadot using its\nscaling technology to host itself."]}),"\n",(0,t.jsx)(a.h2,{id:"on-demand-parachains",children:"On-demand Parachains"}),"\n",(0,t.jsx)(a.admonition,{title:"On-demand parachains were previously named parathreads",type:"info",children:(0,t.jsxs)(a.p,{children:["On-demand parachains (previously called parathreads) are parachains that acquire\n",(0,t.jsx)(a.a,{href:"/docs/learn-agile-coretime#on-demand-coretime",children:"on-demand coretime"}),"."]})}),"\n",(0,t.jsxs)(a.p,{children:["On-demand parachains temporarily participate (on a block by block basis) in network security without\nneeding to lease a dedicated relay chain core. This is done through economically sharing the scarce\nresource of a core among several competing resources (parachains). Chains that otherwise would not\nbe able to acquire a full core or do not find it economically sensible to do so, can participate in\nshared security, as the ",(0,t.jsx)(a.a,{href:"/docs/learn-agile-coretime#on-demand-coretime",children:"on-demand coretime"})," offers a\ngraceful off-ramp to parachains that no longer require a dedicated core, but would like to continue\nusing the relay chain."]}),"\n",(0,t.jsx)(a.h3,{id:"historical-context-of-on-demand-parachains",children:"Historical Context of On-demand parachains"}),"\n",(0,t.jsxs)(a.p,{children:["According to ",(0,t.jsx)(a.a,{href:"https://v.douyu.com/show/a4Jj7llO5q47Dk01",children:"this talk"})," in Chengdu back in 2019, the\norigin of the idea for on-demand parachains came from similar notions in the limited resource of\nmemory on early personal computers of the late '80s and '90s. Since computers have a limited amount\nof physical memory, when an application needs more, the computer can create virtual memory by using\n",(0,t.jsx)(a.em,{children:"swap space"})," on a hard disk. Swap space allows the capacity of a computer's memory to expand and for\nmore processes to run concurrently with the trade-off that some processes will take longer to\nprogress."]}),"\n",(0,t.jsx)(a.h3,{id:"parachains-vs-on-demand-parachains",children:"Parachains vs. On-demand Parachains"}),"\n",(0,t.jsx)(a.p,{children:"Parachains and on-demand parachains are very similar from a development perspective. One can imagine\nthat a chain developed with Substrate can at different points in its lifetime assume one of three\nstates:"}),"\n",(0,t.jsxs)(a.ul,{children:["\n",(0,t.jsx)(a.li,{children:"an independent chain with secured bridge,"}),"\n",(0,t.jsx)(a.li,{children:"a parachain continuously connected to the relay chain,"}),"\n",(0,t.jsx)(a.li,{children:"or a parachain intermittently connected to the relay chain (i.e. on-demand)"}),"\n"]}),"\n",(0,t.jsx)(a.p,{children:"It can switch between these states with relatively minimal effort since the difference is more of an\neconomic distinction than a technological one."}),"\n",(0,t.jsxs)(a.p,{children:["On-demand parachains have the exact same benefits for connecting to the relay chain that a full\nparachain has. Namely, it is able to send messages to other para-objects through\n",(0,t.jsx)(a.a,{href:"/docs/learn-xcm###XCMP",children:"XCMP"})," and it is secured under the full economic security of the relay chain\nvalidator set."]}),"\n",(0,t.jsx)(a.h2,{id:"parachains-use-cases",children:"Parachains' Use Cases"}),"\n",(0,t.jsx)(a.p,{children:"Note that we still have to see the true potential of parachains and what it is listed below are just\na few examples."}),"\n",(0,t.jsxs)(a.ul,{children:["\n",(0,t.jsxs)(a.li,{children:[(0,t.jsx)(a.strong,{children:"Encrypted Consortium Chains"}),": These are possibly private chains that do not leak any\ninformation to the public but still can be interacted with trustlessly due to the nature of the\nXCMP protocol."]}),"\n",(0,t.jsxs)(a.li,{children:[(0,t.jsx)(a.strong,{children:"High-Frequency Chains"}),": These chains can compute many transactions in a short amount of time by\ntaking certain trade-offs or making optimizations."]}),"\n",(0,t.jsxs)(a.li,{children:[(0,t.jsx)(a.strong,{children:"Privacy Chains"}),": These chains do not leak any information to the public through novel\ncryptography."]}),"\n",(0,t.jsxs)(a.li,{children:[(0,t.jsx)(a.strong,{children:"Smart Contract Chains"}),": These chains can have additional logic implemented through the\ndeployment of code known as ",(0,t.jsx)(a.em,{children:"smart contracts"}),"."]}),"\n"]}),"\n",(0,t.jsx)(a.h2,{id:"parachain-host",children:"Parachain Host"}),"\n",(0,t.jsxs)(a.p,{children:["A blockchain is a ",(0,t.jsx)(a.a,{href:"https://en.wikipedia.org/wiki/Directed_acyclic_graph",children:"Directed Acyclic Graph"}),"\n(DAG) of state transitions, where every added block can be viewed as the head of the chain or fork\nwith cumulative state. All paths through the DAG terminate at the Genesis Block. A blockchain is a\ntree, as each block can have only one parent."]}),"\n",(0,t.jsx)(a.p,{children:"A blockchain network is made of nodes that have a view of many forks of the chain and must decide\nwhich fork to follow. To construct the parachain host we need to answer two categories of questions\naddressed by two different components:"}),"\n",(0,t.jsxs)(a.ul,{children:["\n",(0,t.jsxs)(a.li,{children:["\n",(0,t.jsxs)(a.p,{children:["What is the state transition function of the blockchain? This is handled by the ",(0,t.jsx)(a.strong,{children:"Runtime"}),", which\ndefines the state transition logic of the chain. The Runtime logic is divided into:"]}),"\n",(0,t.jsxs)(a.ul,{children:["\n",(0,t.jsxs)(a.li,{children:[(0,t.jsx)(a.strong,{children:"Modules"})," encapsulate particular behavior of the protocol and consist of:","\n",(0,t.jsxs)(a.ul,{children:["\n",(0,t.jsx)(a.li,{children:"Storage"}),"\n",(0,t.jsx)(a.li,{children:"Routines are invoked by entry points and other modules upon block initialization or closing.\nRoutines can alter the storage of a module."}),"\n",(0,t.jsx)(a.li,{children:"The entry point defines how new information is introduced to a module and can limit the origin\nfrom which they are called (user, root, parachain)."}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(a.li,{children:[(0,t.jsx)(a.strong,{children:"API"})," provides means for the node-side behavior to extract meaningful information from the\nstate of a single fork."]}),"\n"]}),"\n",(0,t.jsx)(a.admonition,{type:"info",children:(0,t.jsxs)(a.p,{children:["The Polkadot Parachain Host Implementers' Guide provides details about\n",(0,t.jsx)(a.a,{href:"https://paritytech.github.io/polkadot/book/runtime/index.html",children:"Runtime Architecture"})," and\n",(0,t.jsx)(a.a,{href:"https://paritytech.github.io/polkadot/book/runtime-api/index.html",children:"Runtime API"}),"."]})}),"\n"]}),"\n",(0,t.jsxs)(a.li,{children:["\n",(0,t.jsxs)(a.p,{children:["Knowing various forks of the blockchain, what behaviors should a node take? What information\nshould a node extract from the state of which forks, and how should that information be used? This\nis handled by the ",(0,t.jsx)(a.strong,{children:"Node-side behavior"}),", which defines all activities a node undertakes given its\nview of the blockchain. The node-side behavior can be divided into two categories:"]}),"\n",(0,t.jsxs)(a.ul,{children:["\n",(0,t.jsxs)(a.li,{children:[(0,t.jsx)(a.strong,{children:"Networking behaviors"}),", relate to how information is distributed between nodes but not how the\ninformation is used afterward."]}),"\n",(0,t.jsxs)(a.li,{children:[(0,t.jsx)(a.strong,{children:"Core behaviors"}),", relate to internal work that a specific node does. Such behavior cares about\nthat information is ",(0,t.jsx)(a.em,{children:"distributed"})," and ",(0,t.jsx)(a.em,{children:"received"}),", but not how these two are achieved."]}),"\n"]}),"\n",(0,t.jsxs)(a.p,{children:["These two categories often interact, but they can be heavily abstracted from each other. The\nnode-side behavior is split into various ",(0,t.jsx)(a.strong,{children:"subsystems"}),", which perform a particular category of\nwork. Subsystems can communicate with each other through an\n",(0,t.jsx)(a.a,{href:"https://paritytech.github.io/polkadot/book/node/overseer.html",children:"Overseer"})," that prevents race\nconditions."]}),"\n",(0,t.jsxs)(a.admonition,{type:"info",children:[(0,t.jsxs)(a.p,{children:["The Polkadot Parachain Host Implementers' Guide provides details about\n",(0,t.jsx)(a.a,{href:"https://paritytech.github.io/polkadot/book/node/index.html",children:"node architecture"})," the main\nsubsystems:"]}),(0,t.jsxs)(a.ul,{children:["\n",(0,t.jsx)(a.li,{children:(0,t.jsx)(a.a,{href:"https://paritytech.github.io/polkadot/book/node/collators/index.html",children:"Collator subsystem"})}),"\n",(0,t.jsx)(a.li,{children:(0,t.jsx)(a.a,{href:"https://paritytech.github.io/polkadot/book/node/backing/index.html",children:"Backing subsystem"})}),"\n",(0,t.jsx)(a.li,{children:(0,t.jsx)(a.a,{href:"https://paritytech.github.io/polkadot/book/node/availability/index.html",children:"Availability subsystem"})}),"\n",(0,t.jsx)(a.li,{children:(0,t.jsx)(a.a,{href:"https://paritytech.github.io/polkadot/book/node/approval/index.html",children:"Approval subsystem"})}),"\n",(0,t.jsx)(a.li,{children:(0,t.jsx)(a.a,{href:"https://paritytech.github.io/polkadot/book/node/disputes/index.html",children:"Dispute subsystem"})}),"\n",(0,t.jsx)(a.li,{children:(0,t.jsx)(a.a,{href:"https://paritytech.github.io/polkadot/book/node/utility/index.html",children:"Utility subsystem"})}),"\n"]})]}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(a.p,{children:["The Runtime and Node-side behavior are dependent on each other. The Runtime depends on Node-side\nbehavior to author blocks, and to include ",(0,t.jsx)(a.a,{href:"/docs/learn-transactions",children:"extrinsics"})," which trigger the\ncorrect entry points. The Node-side behavior relies on the Runtime APIs to extract information\nnecessary to determine which action to take."]}),"\n",(0,t.jsx)(a.h2,{id:"parachain-hubs",children:"Parachain Hubs"}),"\n",(0,t.jsx)(a.p,{children:"While the relay chain enables crosschain functionality amongst the parachains, it necessitates that\nthere is some latency between the dispatch of a message from one parachain until the destination\nparachain receives the message. In the optimistic scenario, the latency for this message should be\nat least two blocks - one block for the message to be dispatched and one block for the receiving\nparachain to process and produce a block that acts upon the message. However, in some cases, we may\nsee that the latency for messages is higher if many messages are in queue to be processed or if no\nnodes are running both parachain networks that can quickly gossip the message across the networks."}),"\n",(0,t.jsxs)(a.p,{children:["Due to the necessary latency in sending crosschain messages, some parachains plan to become ",(0,t.jsx)(a.em,{children:"hubs"}),"\nfor an entire industry (see the ",(0,t.jsx)(a.a,{href:"/docs/learn-assets",children:"Asset Hub"})," and\n",(0,t.jsx)(a.a,{href:"/docs/learn-system-chains#bridge-hub",children:"Bridge Hub"}),"). For example, many DeFi applications could take\nadvantage of a property known as ",(0,t.jsx)(a.em,{children:"composability"})," which means that functions of one application can\nbe synergistically composed with others to create new applications. One example of this includes\nflash loans, which borrow funds to execute some on-chain logic as long as the loan is repaid at the\nend of the transaction."]}),"\n",(0,t.jsxs)(a.p,{children:["An issue with crosschain latency means that composability property weakens among parachains compared\nto a single blockchain. ",(0,t.jsx)(a.strong,{children:"This implication is common to all sharded blockchain designs, including\nPolkadot, Ethereum, and others."})," The solution to this is the introduction of parachain hubs, which\nmaintain the stronger property of single block composability."]}),"\n",(0,t.jsx)(a.h2,{id:"resources",children:"Resources"}),"\n",(0,t.jsxs)(a.ul,{children:["\n",(0,t.jsxs)(a.li,{children:[(0,t.jsx)(a.a,{href:"https://medium.com/polkadot-network/polkadot-the-parachain-3808040a769a",children:"Polkadot: The Parachain"}),' -\nBlog post by Polkadot co-founder Rob Habermeier who introduced parachains in 2017 as "a simpler\nform of blockchain, which attaches to the security provided by a relay chain rather than providing\nits own. The relay chain provides security to attached parachains, but also provides a guarantee\nof secure message-passing between them."']}),"\n",(0,t.jsxs)(a.li,{children:[(0,t.jsx)(a.a,{href:"https://polkadot.network/the-path-of-a-parachain-block/",children:"The Path of a Parachain Block"})," - A\ntechnical walk-through of how parachains interact with the relay chain."]}),"\n"]})]})}function p(e={}){const{wrapper:a}={...(0,i.R)(),...e.components};return a?(0,t.jsx)(a,{...e,children:(0,t.jsx)(d,{...e})}):d(e)}},67141:(e,a,n)=>{n.d(a,{A:()=>o});var t=n(96540),i=n(74848);const o=function(e){var a,n=e.message,o=(0,t.useState)(!0),s=o[0],r=o[1];return(0,i.jsx)(i.Fragment,{children:s&&(0,i.jsxs)("div",{className:"message-box",children:[(0,i.jsx)("button",{className:"close-button",onClick:function(){r(!1)},children:"\u2716 "}),(0,i.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(a=n,a.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},52608:(e,a,n)=>{n.d(a,{A:()=>t});const t=n.p+"assets/images/one-parachain-f8e0673144a718bd67834cdd69894ca2.png"},28453:(e,a,n)=>{n.d(a,{R:()=>s,x:()=>r});var t=n(96540);const i={},o=t.createContext(i);function s(e){const a=t.useContext(o);return t.useMemo((function(){return"function"==typeof e?e(a):{...a,...e}}),[a,e])}function r(e){let a;return a=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:s(e.components),t.createElement(o.Provider,{value:a},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/2247.32a02431.js b/assets/js/2247.32a02431.js new file mode 100644 index 000000000000..027c407aefd2 --- /dev/null +++ b/assets/js/2247.32a02431.js @@ -0,0 +1 @@ +(self.webpackChunk=self.webpackChunk||[]).push([[2247],{26527:function(t,e,i){var r;r=function(t){return(()=>{"use strict";var e={658:t=>{t.exports=null!=Object.assign?Object.assign.bind(Object):function(t){for(var e=arguments.length,i=Array(e>1?e-1:0),r=1;r{var r=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var i=[],r=!0,n=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(r=(s=a.next()).done)&&(i.push(s.value),!e||i.length!==e);r=!0);}catch(h){n=!0,o=h}finally{try{!r&&a.return&&a.return()}finally{if(n)throw o}}return i}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},n=i(140).layoutBase.LinkedList,o={getTopMostNodes:function(t){for(var e={},i=0;i0&&l.merge(t)}));for(var c=0;c1){l=a[0],c=l.connectedEdges().length,a.forEach((function(t){t.connectedEdges().length0&&r.set("dummy"+(r.size+1),u),p},relocateComponent:function(t,e,i){if(!i.fixedNodeConstraint){var n=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY,s=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY;if("draft"==i.quality){var h=!0,l=!1,c=void 0;try{for(var d,g=e.nodeIndexes[Symbol.iterator]();!(h=(d=g.next()).done);h=!0){var u=d.value,p=r(u,2),f=p[0],v=p[1],y=i.cy.getElementById(f);if(y){var m=y.boundingBox(),E=e.xCoords[v]-m.w/2,N=e.xCoords[v]+m.w/2,T=e.yCoords[v]-m.h/2,A=e.yCoords[v]+m.h/2;Eo&&(o=N),Ta&&(a=A)}}}catch(C){l=!0,c=C}finally{try{!h&&g.return&&g.return()}finally{if(l)throw c}}var w=t.x-(o+n)/2,L=t.y-(a+s)/2;e.xCoords=e.xCoords.map((function(t){return t+w})),e.yCoords=e.yCoords.map((function(t){return t+L}))}else{Object.keys(e).forEach((function(t){var i=e[t],r=i.getRect().x,h=i.getRect().x+i.getRect().width,l=i.getRect().y,c=i.getRect().y+i.getRect().height;ro&&(o=h),la&&(a=c)}));var I=t.x-(o+n)/2,_=t.y-(a+s)/2;Object.keys(e).forEach((function(t){var i=e[t];i.setCenter(i.getCenterX()+I,i.getCenterY()+_)}))}}},calcBoundingBox:function(t,e,i,r){for(var n=Number.MAX_SAFE_INTEGER,o=Number.MIN_SAFE_INTEGER,s=Number.MAX_SAFE_INTEGER,a=Number.MIN_SAFE_INTEGER,h=void 0,l=void 0,c=void 0,d=void 0,g=t.descendants().not(":parent"),u=g.length,p=0;p(h=e[r.get(f.id())]-f.width()/2)&&(n=h),o<(l=e[r.get(f.id())]+f.width()/2)&&(o=l),s>(c=i[r.get(f.id())]-f.height()/2)&&(s=c),a<(d=i[r.get(f.id())]+f.height()/2)&&(a=d)}var v={};return v.topLeftX=n,v.topLeftY=s,v.width=o-n,v.height=a-s,v},calcParentsWithoutChildren:function(t,e){var i=t.collection();return e.nodes(":parent").forEach((function(t){var e=!1;t.children().forEach((function(t){"none"!=t.css("display")&&(e=!0)})),e||i.merge(t)})),i}};t.exports=o},816:(t,e,i)=>{var r=i(548),n=i(140).CoSELayout,o=i(140).CoSENode,s=i(140).layoutBase.PointD,a=i(140).layoutBase.DimensionD,h=i(140).layoutBase.LayoutConstants,l=i(140).layoutBase.FDLayoutConstants,c=i(140).CoSEConstants;t.exports={coseLayout:function(t,e){var i=t.cy,d=t.eles,g=d.nodes(),u=d.edges(),p=void 0,f=void 0,v=void 0,y={};t.randomize&&(p=e.nodeIndexes,f=e.xCoords,v=e.yCoords);var m=function(t){return"function"==typeof t},E=function(t,e){return m(t)?t(e):t},N=r.calcParentsWithoutChildren(i,d);null!=t.nestingFactor&&(c.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=t.nestingFactor),null!=t.gravity&&(c.DEFAULT_GRAVITY_STRENGTH=l.DEFAULT_GRAVITY_STRENGTH=t.gravity),null!=t.numIter&&(c.MAX_ITERATIONS=l.MAX_ITERATIONS=t.numIter),null!=t.gravityRange&&(c.DEFAULT_GRAVITY_RANGE_FACTOR=l.DEFAULT_GRAVITY_RANGE_FACTOR=t.gravityRange),null!=t.gravityCompound&&(c.DEFAULT_COMPOUND_GRAVITY_STRENGTH=l.DEFAULT_COMPOUND_GRAVITY_STRENGTH=t.gravityCompound),null!=t.gravityRangeCompound&&(c.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=t.gravityRangeCompound),null!=t.initialEnergyOnIncremental&&(c.DEFAULT_COOLING_FACTOR_INCREMENTAL=l.DEFAULT_COOLING_FACTOR_INCREMENTAL=t.initialEnergyOnIncremental),null!=t.tilingCompareBy&&(c.TILING_COMPARE_BY=t.tilingCompareBy),"proof"==t.quality?h.QUALITY=2:h.QUALITY=0,c.NODE_DIMENSIONS_INCLUDE_LABELS=l.NODE_DIMENSIONS_INCLUDE_LABELS=h.NODE_DIMENSIONS_INCLUDE_LABELS=t.nodeDimensionsIncludeLabels,c.DEFAULT_INCREMENTAL=l.DEFAULT_INCREMENTAL=h.DEFAULT_INCREMENTAL=!t.randomize,c.ANIMATE=l.ANIMATE=h.ANIMATE=t.animate,c.TILE=t.tile,c.TILING_PADDING_VERTICAL="function"==typeof t.tilingPaddingVertical?t.tilingPaddingVertical.call():t.tilingPaddingVertical,c.TILING_PADDING_HORIZONTAL="function"==typeof t.tilingPaddingHorizontal?t.tilingPaddingHorizontal.call():t.tilingPaddingHorizontal,c.DEFAULT_INCREMENTAL=l.DEFAULT_INCREMENTAL=h.DEFAULT_INCREMENTAL=!0,c.PURE_INCREMENTAL=!t.randomize,h.DEFAULT_UNIFORM_LEAF_NODE_SIZES=t.uniformNodeDimensions,"transformed"==t.step&&(c.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,c.ENFORCE_CONSTRAINTS=!1,c.APPLY_LAYOUT=!1),"enforced"==t.step&&(c.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,c.ENFORCE_CONSTRAINTS=!0,c.APPLY_LAYOUT=!1),"cose"==t.step&&(c.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,c.ENFORCE_CONSTRAINTS=!1,c.APPLY_LAYOUT=!0),"all"==t.step&&(t.randomize?c.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:c.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,c.ENFORCE_CONSTRAINTS=!0,c.APPLY_LAYOUT=!0),t.fixedNodeConstraint||t.alignmentConstraint||t.relativePlacementConstraint?c.TREE_REDUCTION_ON_INCREMENTAL=!1:c.TREE_REDUCTION_ON_INCREMENTAL=!0;var T=new n,A=T.newGraphManager();return function t(e,i,n,h){for(var l=i.length,c=0;c0&&t(n.getGraphManager().add(n.newGraph(),u),g,n,h)}}(A.addRoot(),r.getTopMostNodes(g),T,t),function(e,i,r){for(var n=0,o=0,s=0;s0?c.DEFAULT_EDGE_LENGTH=l.DEFAULT_EDGE_LENGTH=n/o:m(t.idealEdgeLength)?c.DEFAULT_EDGE_LENGTH=l.DEFAULT_EDGE_LENGTH=50:c.DEFAULT_EDGE_LENGTH=l.DEFAULT_EDGE_LENGTH=t.idealEdgeLength,c.MIN_REPULSION_DIST=l.MIN_REPULSION_DIST=l.DEFAULT_EDGE_LENGTH/10,c.DEFAULT_RADIAL_SEPARATION=l.DEFAULT_EDGE_LENGTH)}(T,A,u),function(t,e){e.fixedNodeConstraint&&(t.constraints.fixedNodeConstraint=e.fixedNodeConstraint),e.alignmentConstraint&&(t.constraints.alignmentConstraint=e.alignmentConstraint),e.relativePlacementConstraint&&(t.constraints.relativePlacementConstraint=e.relativePlacementConstraint)}(T,t),T.runLayout(),y}}},212:(t,e,i)=>{var r=function(){function t(t,e){for(var i=0;i0)if(d){var g=o.getTopMostNodes(t.eles.nodes());if((h=o.connectComponents(e,t.eles,g)).forEach((function(t){var e=t.boundingBox();l.push({x:e.x1+e.w/2,y:e.y1+e.h/2})})),t.randomize&&h.forEach((function(e){t.eles=e,r.push(s(t))})),"default"==t.quality||"proof"==t.quality){var u=e.collection();if(t.tile){var p=new Map,f=0,v={nodeIndexes:p,xCoords:[],yCoords:[]},y=[];if(h.forEach((function(t,e){0==t.edges().length&&(t.nodes().forEach((function(e,i){u.merge(t.nodes()[i]),e.isParent()||(v.nodeIndexes.set(t.nodes()[i].id(),f++),v.xCoords.push(t.nodes()[0].position().x),v.yCoords.push(t.nodes()[0].position().y))})),y.push(e))})),u.length>1){var m=u.boundingBox();l.push({x:m.x1+m.w/2,y:m.y1+m.h/2}),h.push(u),r.push(v);for(var E=y.length-1;E>=0;E--)h.splice(y[E],1),r.splice(y[E],1),l.splice(y[E],1)}}h.forEach((function(e,i){t.eles=e,n.push(a(t,r[i])),o.relocateComponent(l[i],n[i],t)}))}else h.forEach((function(e,i){o.relocateComponent(l[i],r[i],t)}));var N=new Set;if(h.length>1){var T=[],A=i.filter((function(t){return"none"==t.css("display")}));h.forEach((function(e,i){var s=void 0;if("draft"==t.quality&&(s=r[i].nodeIndexes),e.nodes().not(A).length>0){var a={edges:[],nodes:[]},h=void 0;e.nodes().not(A).forEach((function(e){if("draft"==t.quality)if(e.isParent()){var l=o.calcBoundingBox(e,r[i].xCoords,r[i].yCoords,s);a.nodes.push({x:l.topLeftX,y:l.topLeftY,width:l.width,height:l.height})}else h=s.get(e.id()),a.nodes.push({x:r[i].xCoords[h]-e.boundingbox().w/2,y:r[i].yCoords[h]-e.boundingbox().h/2,width:e.boundingbox().w,height:e.boundingbox().h});else n[i][e.id()]&&a.nodes.push({x:n[i][e.id()].getLeft(),y:n[i][e.id()].getTop(),width:n[i][e.id()].getWidth(),height:n[i][e.id()].getHeight()})})),e.edges().forEach((function(e){var h=e.source(),l=e.target();if("none"!=h.css("display")&&"none"!=l.css("display"))if("draft"==t.quality){var c=s.get(h.id()),d=s.get(l.id()),g=[],u=[];if(h.isParent()){var p=o.calcBoundingBox(h,r[i].xCoords,r[i].yCoords,s);g.push(p.topLeftX+p.width/2),g.push(p.topLeftY+p.height/2)}else g.push(r[i].xCoords[c]),g.push(r[i].yCoords[c]);if(l.isParent()){var f=o.calcBoundingBox(l,r[i].xCoords,r[i].yCoords,s);u.push(f.topLeftX+f.width/2),u.push(f.topLeftY+f.height/2)}else u.push(r[i].xCoords[d]),u.push(r[i].yCoords[d]);a.edges.push({startX:g[0],startY:g[1],endX:u[0],endY:u[1]})}else n[i][h.id()]&&n[i][l.id()]&&a.edges.push({startX:n[i][h.id()].getCenterX(),startY:n[i][h.id()].getCenterY(),endX:n[i][l.id()].getCenterX(),endY:n[i][l.id()].getCenterY()})})),a.nodes.length>0&&(T.push(a),N.add(i))}}));var w=c.packComponents(T,t.randomize).shifts;if("draft"==t.quality)r.forEach((function(t,e){var i=t.xCoords.map((function(t){return t+w[e].dx})),r=t.yCoords.map((function(t){return t+w[e].dy}));t.xCoords=i,t.yCoords=r}));else{var L=0;N.forEach((function(t){Object.keys(n[t]).forEach((function(e){var i=n[t][e];i.setCenter(i.getCenterX()+w[L].dx,i.getCenterY()+w[L].dy)})),L++}))}}}else{var I=t.eles.boundingBox();if(l.push({x:I.x1+I.w/2,y:I.y1+I.h/2}),t.randomize){var _=s(t);r.push(_)}"default"==t.quality||"proof"==t.quality?(n.push(a(t,r[0])),o.relocateComponent(l[0],n[0],t)):o.relocateComponent(l[0],r[0],t)}var C=function(e,i){if("default"==t.quality||"proof"==t.quality){"number"==typeof e&&(e=i);var o=void 0,s=void 0,a=e.data("id");return n.forEach((function(t){a in t&&(o={x:t[a].getRect().getCenterX(),y:t[a].getRect().getCenterY()},s=t[a])})),t.nodeDimensionsIncludeLabels&&(s.labelWidth&&("left"==s.labelPosHorizontal?o.x+=s.labelWidth/2:"right"==s.labelPosHorizontal&&(o.x-=s.labelWidth/2)),s.labelHeight&&("top"==s.labelPosVertical?o.y+=s.labelHeight/2:"bottom"==s.labelPosVertical&&(o.y-=s.labelHeight/2))),null==o&&(o={x:e.position("x"),y:e.position("y")}),{x:o.x,y:o.y}}var h=void 0;return r.forEach((function(t){var i=t.nodeIndexes.get(e.id());null!=i&&(h={x:t.xCoords[i],y:t.yCoords[i]})})),null==h&&(h={x:e.position("x"),y:e.position("y")}),{x:h.x,y:h.y}};if("default"==t.quality||"proof"==t.quality||t.randomize){var M=o.calcParentsWithoutChildren(e,i),x=i.filter((function(t){return"none"==t.css("display")}));t.eles=i.not(x),i.nodes().not(":parent").not(x).layoutPositions(this,t,C),M.length>0&&M.forEach((function(t){t.position(C(t))}))}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),t}();t.exports=l},657:(t,e,i)=>{var r=i(548),n=i(140).layoutBase.Matrix,o=i(140).layoutBase.SVD;t.exports={spectralLayout:function(t){var e=t.cy,i=t.eles,s=i.nodes(),a=i.nodes(":parent"),h=new Map,l=new Map,c=new Map,d=[],g=[],u=[],p=[],f=[],v=[],y=[],m=[],E=void 0,N=1e8,T=1e-9,A=t.piTol,w=t.samplingType,L=t.nodeSeparation,I=void 0,_=function(t,e,i){for(var r=[],n=0,o=0,s=0,a=void 0,h=[],c=0,g=1,u=0;u=n;){s=r[n++];for(var p=d[s],y=0;yc&&(c=f[T],g=T)}return g};r.connectComponents(e,i,r.getTopMostNodes(s),h),a.forEach((function(t){r.connectComponents(e,i,r.getTopMostNodes(t.descendants().intersection(i)),h)}));for(var C=0,M=0;M0&&(r.isParent()?d[e].push(c.get(r.id())):d[e].push(r.id()))}))}));var S=function(t){var i=l.get(t),r=void 0;h.get(t).forEach((function(n){r=e.getElementById(n).isParent()?c.get(n):n,d[i].push(r),d[l.get(r)].push(t)}))},P=!0,U=!1,Y=void 0;try{for(var k,H=h.keys()[Symbol.iterator]();!(P=(k=H.next()).done);P=!0)S(k.value)}catch(K){U=!0,Y=K}finally{try{!P&&H.return&&H.return()}finally{if(U)throw Y}}var X=void 0;if((E=l.size)>2){I=E=1)break;l=h}for(var p=0;p=1)break;l=h}for(var y=0;y{var r=i(212),n=function(t){t&&t("layout","fcose",r)};"undefined"!=typeof cytoscape&&n(cytoscape),t.exports=n},140:e=>{e.exports=t}},i={},r=function t(r){var n=i[r];if(void 0!==n)return n.exports;var o=i[r]={exports:{}};return e[r](o,o.exports,t),o.exports}(579);return r})()},t.exports=r(i(41709))},41709:function(t,e,i){var r;r=function(t){return(()=>{"use strict";var e={45:(t,e,i)=>{var r={};r.layoutBase=i(551),r.CoSEConstants=i(806),r.CoSEEdge=i(767),r.CoSEGraph=i(880),r.CoSEGraphManager=i(578),r.CoSELayout=i(765),r.CoSENode=i(991),r.ConstraintHandler=i(902),t.exports=r},806:(t,e,i)=>{var r=i(551).FDLayoutConstants;function n(){}for(var o in r)n[o]=r[o];n.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,n.DEFAULT_RADIAL_SEPARATION=r.DEFAULT_EDGE_LENGTH,n.DEFAULT_COMPONENT_SEPERATION=60,n.TILE=!0,n.TILING_PADDING_VERTICAL=10,n.TILING_PADDING_HORIZONTAL=10,n.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,n.ENFORCE_CONSTRAINTS=!0,n.APPLY_LAYOUT=!0,n.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,n.TREE_REDUCTION_ON_INCREMENTAL=!0,n.PURE_INCREMENTAL=n.DEFAULT_INCREMENTAL,t.exports=n},767:(t,e,i)=>{var r=i(551).FDLayoutEdge;function n(t,e,i){r.call(this,t,e,i)}for(var o in n.prototype=Object.create(r.prototype),r)n[o]=r[o];t.exports=n},880:(t,e,i)=>{var r=i(551).LGraph;function n(t,e,i){r.call(this,t,e,i)}for(var o in n.prototype=Object.create(r.prototype),r)n[o]=r[o];t.exports=n},578:(t,e,i)=>{var r=i(551).LGraphManager;function n(t){r.call(this,t)}for(var o in n.prototype=Object.create(r.prototype),r)n[o]=r[o];t.exports=n},765:(t,e,i)=>{var r=i(551).FDLayout,n=i(578),o=i(880),s=i(991),a=i(767),h=i(806),l=i(902),c=i(551).FDLayoutConstants,d=i(551).LayoutConstants,g=i(551).Point,u=i(551).PointD,p=i(551).DimensionD,f=i(551).Layout,v=i(551).Integer,y=i(551).IGeometry,m=i(551).LGraph,E=i(551).Transform,N=i(551).LinkedList;function T(){r.call(this),this.toBeTiled={},this.constraints={}}for(var A in T.prototype=Object.create(r.prototype),r)T[A]=r[A];T.prototype.newGraphManager=function(){var t=new n(this);return this.graphManager=t,t},T.prototype.newGraph=function(t){return new o(null,this.graphManager,t)},T.prototype.newNode=function(t){return new s(this.graphManager,t)},T.prototype.newEdge=function(t){return new a(null,null,t)},T.prototype.initParameters=function(){r.prototype.initParameters.call(this,arguments),this.isSubLayout||(h.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=h.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=h.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=c.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=c.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=c.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=c.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},T.prototype.initSpringEmbedder=function(){r.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/c.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},T.prototype.layout=function(){return d.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},T.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental)h.TREE_REDUCTION_ON_INCREMENTAL&&(this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation(),e=new Set(this.getAllNodes()),i=this.nodesWithGravity.filter((function(t){return e.has(t)})),this.graphManager.setAllNodesToApplyGravitation(i));else{var t=this.getFlatForest();if(t.length>0)this.positionNodesRadially(t);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var e=new Set(this.getAllNodes()),i=this.nodesWithGravity.filter((function(t){return e.has(t)}));this.graphManager.setAllNodesToApplyGravitation(i),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(l.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),h.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},T.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}if(this.totalIterations%c.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged()){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}this.coolingCycle++,0==this.layoutQuality?this.coolingAdjuster=this.coolingCycle:1==this.layoutQuality&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var t=new Set(this.getAllNodes()),e=this.nodesWithGravity.filter((function(e){return t.has(e)}));this.graphManager.setAllNodesToApplyGravitation(e),this.graphManager.updateBounds(),this.updateGrid(),h.PURE_INCREMENTAL?this.coolingFactor=c.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=c.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),h.PURE_INCREMENTAL?this.coolingFactor=c.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=c.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var i=!this.isTreeGrowing&&!this.isGrowthFinished,r=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(i,r),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},T.prototype.getPositionsData=function(){for(var t=this.graphManager.getAllNodes(),e={},i=0;i0&&this.updateDisplacements(),e=0;e0&&(r.fixedNodeWeight=o)}if(this.constraints.relativePlacementConstraint){var s=new Map,a=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach((function(e){t.fixedNodesOnHorizontal.add(e),t.fixedNodesOnVertical.add(e)})),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical){var l=this.constraints.alignmentConstraint.vertical;for(i=0;i=2*t.length/3;r--)e=Math.floor(Math.random()*(r+1)),i=t[r],t[r]=t[e],t[e]=i;return t},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach((function(e){if(e.left){var i=s.has(e.left)?s.get(e.left):e.left,r=s.has(e.right)?s.get(e.right):e.right;t.nodesInRelativeHorizontal.includes(i)||(t.nodesInRelativeHorizontal.push(i),t.nodeToRelativeConstraintMapHorizontal.set(i,[]),t.dummyToNodeForVerticalAlignment.has(i)?t.nodeToTempPositionMapHorizontal.set(i,t.idToNodeMap.get(t.dummyToNodeForVerticalAlignment.get(i)[0]).getCenterX()):t.nodeToTempPositionMapHorizontal.set(i,t.idToNodeMap.get(i).getCenterX())),t.nodesInRelativeHorizontal.includes(r)||(t.nodesInRelativeHorizontal.push(r),t.nodeToRelativeConstraintMapHorizontal.set(r,[]),t.dummyToNodeForVerticalAlignment.has(r)?t.nodeToTempPositionMapHorizontal.set(r,t.idToNodeMap.get(t.dummyToNodeForVerticalAlignment.get(r)[0]).getCenterX()):t.nodeToTempPositionMapHorizontal.set(r,t.idToNodeMap.get(r).getCenterX())),t.nodeToRelativeConstraintMapHorizontal.get(i).push({right:r,gap:e.gap}),t.nodeToRelativeConstraintMapHorizontal.get(r).push({left:i,gap:e.gap})}else{var n=a.has(e.top)?a.get(e.top):e.top,o=a.has(e.bottom)?a.get(e.bottom):e.bottom;t.nodesInRelativeVertical.includes(n)||(t.nodesInRelativeVertical.push(n),t.nodeToRelativeConstraintMapVertical.set(n,[]),t.dummyToNodeForHorizontalAlignment.has(n)?t.nodeToTempPositionMapVertical.set(n,t.idToNodeMap.get(t.dummyToNodeForHorizontalAlignment.get(n)[0]).getCenterY()):t.nodeToTempPositionMapVertical.set(n,t.idToNodeMap.get(n).getCenterY())),t.nodesInRelativeVertical.includes(o)||(t.nodesInRelativeVertical.push(o),t.nodeToRelativeConstraintMapVertical.set(o,[]),t.dummyToNodeForHorizontalAlignment.has(o)?t.nodeToTempPositionMapVertical.set(o,t.idToNodeMap.get(t.dummyToNodeForHorizontalAlignment.get(o)[0]).getCenterY()):t.nodeToTempPositionMapVertical.set(o,t.idToNodeMap.get(o).getCenterY())),t.nodeToRelativeConstraintMapVertical.get(n).push({bottom:o,gap:e.gap}),t.nodeToRelativeConstraintMapVertical.get(o).push({top:n,gap:e.gap})}}));else{var d=new Map,g=new Map;this.constraints.relativePlacementConstraint.forEach((function(t){if(t.left){var e=s.has(t.left)?s.get(t.left):t.left,i=s.has(t.right)?s.get(t.right):t.right;d.has(e)?d.get(e).push(i):d.set(e,[i]),d.has(i)?d.get(i).push(e):d.set(i,[e])}else{var r=a.has(t.top)?a.get(t.top):t.top,n=a.has(t.bottom)?a.get(t.bottom):t.bottom;g.has(r)?g.get(r).push(n):g.set(r,[n]),g.has(n)?g.get(n).push(r):g.set(n,[r])}}));var u=function(t,e){var i=[],r=[],n=new N,o=new Set,s=0;return t.forEach((function(a,h){if(!o.has(h)){i[s]=[],r[s]=!1;var l=h;for(n.push(l),o.add(l),i[s].push(l);0!=n.length;)l=n.shift(),e.has(l)&&(r[s]=!0),t.get(l).forEach((function(t){o.has(t)||(n.push(t),o.add(t),i[s].push(t))}));s++}})),{components:i,isFixed:r}},p=u(d,t.fixedNodesOnHorizontal);this.componentsOnHorizontal=p.components,this.fixedComponentsOnHorizontal=p.isFixed;var f=u(g,t.fixedNodesOnVertical);this.componentsOnVertical=f.components,this.fixedComponentsOnVertical=f.isFixed}}},T.prototype.updateDisplacements=function(){var t=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach((function(e){var i=t.idToNodeMap.get(e.nodeId);i.displacementX=0,i.displacementY=0})),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var e=this.constraints.alignmentConstraint.vertical,i=0;i1)for(a=0;ar&&(r=Math.floor(s.y)),o=Math.floor(s.x+h.DEFAULT_COMPONENT_SEPERATION)}this.transform(new u(d.WORLD_CENTER_X-s.x/2,d.WORLD_CENTER_Y-s.y/2))},T.radialLayout=function(t,e,i){var r=Math.max(this.maxDiagonalInTree(t),h.DEFAULT_RADIAL_SEPARATION);T.branchRadialLayout(e,null,0,359,0,r);var n=m.calculateBounds(t),o=new E;o.setDeviceOrgX(n.getMinX()),o.setDeviceOrgY(n.getMinY()),o.setWorldOrgX(i.x),o.setWorldOrgY(i.y);for(var s=0;s1;){var v=f[0];f.splice(0,1);var m=c.indexOf(v);m>=0&&c.splice(m,1),p--,d--}g=null!=e?(c.indexOf(f[0])+1)%p:0;for(var E=Math.abs(r-i)/d,N=g;u!=d;N=++N%p){var A=c[N].getOtherEnd(t);if(A!=e){var w=(i+u*E)%360,L=(w+E)%360;T.branchRadialLayout(A,t,w,L,n+o,o),u++}}},T.maxDiagonalInTree=function(t){for(var e=v.MIN_VALUE,i=0;ie&&(e=r)}return e},T.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},T.prototype.groupZeroDegreeMembers=function(){var t=this,e={};this.memberGroups={},this.idToDummyNode={};for(var i=[],r=this.graphManager.getAllNodes(),n=0;n1){var r="DummyCompound_"+i;t.memberGroups[r]=e[i];var n=e[i][0].getParent(),o=new s(t.graphManager);o.id=r,o.paddingLeft=n.paddingLeft||0,o.paddingRight=n.paddingRight||0,o.paddingBottom=n.paddingBottom||0,o.paddingTop=n.paddingTop||0,t.idToDummyNode[r]=o;var a=t.getGraphManager().add(t.newGraph(),o),h=n.getChild();h.add(o);for(var l=0;ln?(r.rect.x-=(r.labelWidth-n)/2,r.setWidth(r.labelWidth),r.labelMarginLeft=(r.labelWidth-n)/2):"right"==r.labelPosHorizontal&&r.setWidth(n+r.labelWidth)),r.labelHeight&&("top"==r.labelPosVertical?(r.rect.y-=r.labelHeight,r.setHeight(o+r.labelHeight),r.labelMarginTop=r.labelHeight):"center"==r.labelPosVertical&&r.labelHeight>o?(r.rect.y-=(r.labelHeight-o)/2,r.setHeight(r.labelHeight),r.labelMarginTop=(r.labelHeight-o)/2):"bottom"==r.labelPosVertical&&r.setHeight(o+r.labelHeight))}}))},T.prototype.repopulateCompounds=function(){for(var t=this.compoundOrder.length-1;t>=0;t--){var e=this.compoundOrder[t],i=e.id,r=e.paddingLeft,n=e.paddingTop,o=e.labelMarginLeft,s=e.labelMarginTop;this.adjustLocations(this.tiledMemberPack[i],e.rect.x,e.rect.y,r,n,o,s)}},T.prototype.repopulateZeroDegreeMembers=function(){var t=this,e=this.tiledZeroDegreePack;Object.keys(e).forEach((function(i){var r=t.idToDummyNode[i],n=r.paddingLeft,o=r.paddingTop,s=r.labelMarginLeft,a=r.labelMarginTop;t.adjustLocations(e[i],r.rect.x,r.rect.y,n,o,s,a)}))},T.prototype.getToBeTiled=function(t){var e=t.id;if(null!=this.toBeTiled[e])return this.toBeTiled[e];var i=t.getChild();if(null==i)return this.toBeTiled[e]=!1,!1;for(var r=i.getNodes(),n=0;n0)return this.toBeTiled[e]=!1,!1;if(null!=o.getChild()){if(!this.getToBeTiled(o))return this.toBeTiled[e]=!1,!1}else this.toBeTiled[o.id]=!1}return this.toBeTiled[e]=!0,!0},T.prototype.getNodeDegree=function(t){t.id;for(var e=t.getEdges(),i=0,r=0;rc&&(c=g.rect.height)}i+=c+t.verticalPadding}},T.prototype.tileCompoundMembers=function(t,e){var i=this;this.tiledMemberPack=[],Object.keys(t).forEach((function(r){var n=e[r];if(i.tiledMemberPack[r]=i.tileNodes(t[r],n.paddingLeft+n.paddingRight),n.rect.width=i.tiledMemberPack[r].width,n.rect.height=i.tiledMemberPack[r].height,n.setCenter(i.tiledMemberPack[r].centerX,i.tiledMemberPack[r].centerY),n.labelMarginLeft=0,n.labelMarginTop=0,h.NODE_DIMENSIONS_INCLUDE_LABELS){var o=n.rect.width,s=n.rect.height;n.labelWidth&&("left"==n.labelPosHorizontal?(n.rect.x-=n.labelWidth,n.setWidth(o+n.labelWidth),n.labelMarginLeft=n.labelWidth):"center"==n.labelPosHorizontal&&n.labelWidth>o?(n.rect.x-=(n.labelWidth-o)/2,n.setWidth(n.labelWidth),n.labelMarginLeft=(n.labelWidth-o)/2):"right"==n.labelPosHorizontal&&n.setWidth(o+n.labelWidth)),n.labelHeight&&("top"==n.labelPosVertical?(n.rect.y-=n.labelHeight,n.setHeight(s+n.labelHeight),n.labelMarginTop=n.labelHeight):"center"==n.labelPosVertical&&n.labelHeight>s?(n.rect.y-=(n.labelHeight-s)/2,n.setHeight(n.labelHeight),n.labelMarginTop=(n.labelHeight-s)/2):"bottom"==n.labelPosVertical&&n.setHeight(s+n.labelHeight))}}))},T.prototype.tileNodes=function(t,e){var i=this.tileNodesByFavoringDim(t,e,!0),r=this.tileNodesByFavoringDim(t,e,!1),n=this.getOrgRatio(i);return this.getOrgRatio(r)a&&(a=t.getWidth())}));var l,c=o/n,d=s/n,g=Math.pow(i-r,2)+4*(c+r)*(d+i)*n,u=(r-i+Math.sqrt(g))/(2*(c+r));e?(l=Math.ceil(u))==u&&l++:l=Math.floor(u);var p=l*(c+r)-r;return a>p&&(p=a),p+=2*r},T.prototype.tileNodesByFavoringDim=function(t,e,i){var r=h.TILING_PADDING_VERTICAL,n=h.TILING_PADDING_HORIZONTAL,o=h.TILING_COMPARE_BY,s={rows:[],rowWidth:[],rowHeight:[],width:0,height:e,verticalPadding:r,horizontalPadding:n,centerX:0,centerY:0};o&&(s.idealRowWidth=this.calcIdealRowWidth(t,i));var a=function(t){return t.rect.width*t.rect.height},l=function(t,e){return a(e)-a(t)};t.sort((function(t,e){var i=l;return s.idealRowWidth?(i=o)(t.id,e.id):i(t,e)}));for(var c=0,d=0,g=0;g0&&(o+=t.horizontalPadding),t.rowWidth[i]=o,t.width0&&(s+=t.verticalPadding);var a=0;s>t.rowHeight[i]&&(a=t.rowHeight[i],t.rowHeight[i]=s,a=t.rowHeight[i]-a),t.height+=a,t.rows[i].push(e)},T.prototype.getShortestRowIndex=function(t){for(var e=-1,i=Number.MAX_VALUE,r=0;ri&&(e=r,i=t.rowWidth[r]);return e},T.prototype.canAddHorizontal=function(t,e,i){if(t.idealRowWidth){var r=t.rows.length-1;return t.rowWidth[r]+e+t.horizontalPadding<=t.idealRowWidth}var n=this.getShortestRowIndex(t);if(n<0)return!0;var o=t.rowWidth[n];if(o+t.horizontalPadding+e<=t.width)return!0;var s,a,h=0;return t.rowHeight[n]0&&(h=i+t.verticalPadding-t.rowHeight[n]),s=t.width-o>=e+t.horizontalPadding?(t.height+h)/(o+e+t.horizontalPadding):(t.height+h)/t.width,h=i+t.verticalPadding,(a=t.widtho&&e!=i){r.splice(-1,1),t.rows[i].push(n),t.rowWidth[e]=t.rowWidth[e]-o,t.rowWidth[i]=t.rowWidth[i]+o,t.width=t.rowWidth[instance.getLongestRowIndex(t)];for(var s=Number.MIN_VALUE,a=0;as&&(s=r[a].height);e>0&&(s+=t.verticalPadding);var h=t.rowHeight[e]+t.rowHeight[i];t.rowHeight[e]=s,t.rowHeight[i]0)for(var d=n;d<=o;d++)l[0]+=this.grid[d][s-1].length+this.grid[d][s].length-1;if(o0)for(d=s;d<=a;d++)l[3]+=this.grid[n-1][d].length+this.grid[n][d].length-1;for(var g,u,p=v.MAX_VALUE,f=0;f{var r=i(551).FDLayoutNode,n=i(551).IMath;function o(t,e,i,n){r.call(this,t,e,i,n)}for(var s in o.prototype=Object.create(r.prototype),r)o[s]=r[s];o.prototype.calculateDisplacement=function(){var t=this.graphManager.getLayout();null!=this.getChild()&&this.fixedNodeWeight?(this.displacementX+=t.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=t.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=t.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=t.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementX=t.coolingFactor*t.maxNodeDisplacement*n.sign(this.displacementX)),Math.abs(this.displacementY)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementY=t.coolingFactor*t.maxNodeDisplacement*n.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},o.prototype.propogateDisplacementToChildren=function(t,e){for(var i,r=this.getChild().getNodes(),n=0;n{function r(t){if(Array.isArray(t)){for(var e=0,i=Array(t.length);e0){var o=0;r.forEach((function(t){"horizontal"==e?(d.set(t,h.has(t)?l[h.get(t)]:n.get(t)),o+=d.get(t)):(d.set(t,h.has(t)?c[h.get(t)]:n.get(t)),o+=d.get(t))})),o/=r.length,t.forEach((function(t){i.has(t)||d.set(t,o)}))}else{var s=0;t.forEach((function(t){s+="horizontal"==e?h.has(t)?l[h.get(t)]:n.get(t):h.has(t)?c[h.get(t)]:n.get(t)})),s/=t.length,t.forEach((function(t){d.set(t,s)}))}}));for(var p=function(){var r=u.shift();t.get(r).forEach((function(t){if(d.get(t.id)s&&(s=m),Ea&&(a=E)}}catch(C){u=!0,p=C}finally{try{!g&&v.return&&v.return()}finally{if(u)throw p}}var N=(r+s)/2-(o+a)/2,T=!0,A=!1,w=void 0;try{for(var L,I=t[Symbol.iterator]();!(T=(L=I.next()).done);T=!0){var _=L.value;d.set(_,d.get(_)+N)}}catch(C){A=!0,w=C}finally{try{!T&&I.return&&I.return()}finally{if(A)throw w}}}))}return d},y=function(t){var e=0,i=0,r=0,n=0;if(t.forEach((function(t){t.left?l[h.get(t.left)]-l[h.get(t.right)]>=0?e++:i++:c[h.get(t.top)]-c[h.get(t.bottom)]>=0?r++:n++})),e>i&&r>n)for(var o=0;oi)for(var s=0;sn)for(var a=0;a1)e.fixedNodeConstraint.forEach((function(t,e){T[e]=[t.position.x,t.position.y],A[e]=[l[h.get(t.nodeId)],c[h.get(t.nodeId)]]})),w=!0;else if(e.alignmentConstraint)!function(){var t=0;if(e.alignmentConstraint.vertical){for(var i=e.alignmentConstraint.vertical,n=function(e){var n=new Set;i[e].forEach((function(t){n.add(t)}));var o=new Set([].concat(r(n)).filter((function(t){return I.has(t)}))),s=void 0;s=o.size>0?l[h.get(o.values().next().value)]:f(n).x,i[e].forEach((function(e){T[t]=[s,c[h.get(e)]],A[t]=[l[h.get(e)],c[h.get(e)]],t++}))},o=0;o0?l[h.get(n.values().next().value)]:f(i).y,s[e].forEach((function(e){T[t]=[l[h.get(e)],o],A[t]=[l[h.get(e)],c[h.get(e)]],t++}))},d=0;dx&&(x=M[D].length,O=D);if(x0){var j={x:0,y:0};e.fixedNodeConstraint.forEach((function(t,e){var i,r,n={x:l[h.get(t.nodeId)],y:c[h.get(t.nodeId)]},o=t.position,s=(r=n,{x:(i=o).x-r.x,y:i.y-r.y});j.x+=s.x,j.y+=s.y})),j.x/=e.fixedNodeConstraint.length,j.y/=e.fixedNodeConstraint.length,l.forEach((function(t,e){l[e]+=j.x})),c.forEach((function(t,e){c[e]+=j.y})),e.fixedNodeConstraint.forEach((function(t){l[h.get(t.nodeId)]=t.position.x,c[h.get(t.nodeId)]=t.position.y}))}if(e.alignmentConstraint){if(e.alignmentConstraint.vertical)for(var q=e.alignmentConstraint.vertical,$=function(t){var e=new Set;q[t].forEach((function(t){e.add(t)}));var i=new Set([].concat(r(e)).filter((function(t){return I.has(t)}))),n=void 0;n=i.size>0?l[h.get(i.values().next().value)]:f(e).x,e.forEach((function(t){I.has(t)||(l[h.get(t)]=n)}))},K=0;K0?c[h.get(i.values().next().value)]:f(e).y,e.forEach((function(t){I.has(t)||(c[h.get(t)]=n)}))},J=0;J{e.exports=t}},i={},r=function t(r){var n=i[r];if(void 0!==n)return n.exports;var o=i[r]={exports:{}};return e[r](o,o.exports,t),o.exports}(45);return r})()},t.exports=r(i(1917))},1917:function(t){var e;e=function(){return function(t){var e={};function i(r){if(e[r])return e[r].exports;var n=e[r]={i:r,l:!1,exports:{}};return t[r].call(n.exports,n,n.exports,i),n.l=!0,n.exports}return i.m=t,i.c=e,i.i=function(t){return t},i.d=function(t,e,r){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=28)}([function(t,e,i){"use strict";function r(){}r.QUALITY=1,r.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,r.DEFAULT_INCREMENTAL=!1,r.DEFAULT_ANIMATION_ON_LAYOUT=!0,r.DEFAULT_ANIMATION_DURING_LAYOUT=!1,r.DEFAULT_ANIMATION_PERIOD=50,r.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,r.DEFAULT_GRAPH_MARGIN=15,r.NODE_DIMENSIONS_INCLUDE_LABELS=!1,r.SIMPLE_NODE_SIZE=40,r.SIMPLE_NODE_HALF_SIZE=r.SIMPLE_NODE_SIZE/2,r.EMPTY_COMPOUND_NODE_SIZE=40,r.MIN_EDGE_LENGTH=1,r.WORLD_BOUNDARY=1e6,r.INITIAL_WORLD_BOUNDARY=r.WORLD_BOUNDARY/1e3,r.WORLD_CENTER_X=1200,r.WORLD_CENTER_Y=900,t.exports=r},function(t,e,i){"use strict";var r=i(2),n=i(8),o=i(9);function s(t,e,i){r.call(this,i),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=i,this.bendpoints=[],this.source=t,this.target=e}for(var a in s.prototype=Object.create(r.prototype),r)s[a]=r[a];s.prototype.getSource=function(){return this.source},s.prototype.getTarget=function(){return this.target},s.prototype.isInterGraph=function(){return this.isInterGraph},s.prototype.getLength=function(){return this.length},s.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},s.prototype.getBendpoints=function(){return this.bendpoints},s.prototype.getLca=function(){return this.lca},s.prototype.getSourceInLca=function(){return this.sourceInLca},s.prototype.getTargetInLca=function(){return this.targetInLca},s.prototype.getOtherEnd=function(t){if(this.source===t)return this.target;if(this.target===t)return this.source;throw"Node is not incident with this edge"},s.prototype.getOtherEndInGraph=function(t,e){for(var i=this.getOtherEnd(t),r=e.getGraphManager().getRoot();;){if(i.getOwner()==e)return i;if(i.getOwner()==r)break;i=i.getOwner().getParent()}return null},s.prototype.updateLength=function(){var t=new Array(4);this.isOverlapingSourceAndTarget=n.getIntersection(this.target.getRect(),this.source.getRect(),t),this.isOverlapingSourceAndTarget||(this.lengthX=t[0]-t[2],this.lengthY=t[1]-t[3],Math.abs(this.lengthX)<1&&(this.lengthX=o.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=o.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},s.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=o.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=o.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},t.exports=s},function(t,e,i){"use strict";t.exports=function(t){this.vGraphObject=t}},function(t,e,i){"use strict";var r=i(2),n=i(10),o=i(13),s=i(0),a=i(16),h=i(5);function l(t,e,i,s){null==i&&null==s&&(s=e),r.call(this,s),null!=t.graphManager&&(t=t.graphManager),this.estimatedSize=n.MIN_VALUE,this.inclusionTreeDepth=n.MAX_VALUE,this.vGraphObject=s,this.edges=[],this.graphManager=t,this.rect=null!=i&&null!=e?new o(e.x,e.y,i.width,i.height):new o}for(var c in l.prototype=Object.create(r.prototype),r)l[c]=r[c];l.prototype.getEdges=function(){return this.edges},l.prototype.getChild=function(){return this.child},l.prototype.getOwner=function(){return this.owner},l.prototype.getWidth=function(){return this.rect.width},l.prototype.setWidth=function(t){this.rect.width=t},l.prototype.getHeight=function(){return this.rect.height},l.prototype.setHeight=function(t){this.rect.height=t},l.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},l.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},l.prototype.getCenter=function(){return new h(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},l.prototype.getLocation=function(){return new h(this.rect.x,this.rect.y)},l.prototype.getRect=function(){return this.rect},l.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},l.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},l.prototype.setRect=function(t,e){this.rect.x=t.x,this.rect.y=t.y,this.rect.width=e.width,this.rect.height=e.height},l.prototype.setCenter=function(t,e){this.rect.x=t-this.rect.width/2,this.rect.y=e-this.rect.height/2},l.prototype.setLocation=function(t,e){this.rect.x=t,this.rect.y=e},l.prototype.moveBy=function(t,e){this.rect.x+=t,this.rect.y+=e},l.prototype.getEdgeListToNode=function(t){var e=[],i=this;return i.edges.forEach((function(r){if(r.target==t){if(r.source!=i)throw"Incorrect edge source!";e.push(r)}})),e},l.prototype.getEdgesBetween=function(t){var e=[],i=this;return i.edges.forEach((function(r){if(r.source!=i&&r.target!=i)throw"Incorrect edge source and/or target";r.target!=t&&r.source!=t||e.push(r)})),e},l.prototype.getNeighborsList=function(){var t=new Set,e=this;return e.edges.forEach((function(i){if(i.source==e)t.add(i.target);else{if(i.target!=e)throw"Incorrect incidency!";t.add(i.source)}})),t},l.prototype.withChildren=function(){var t=new Set;if(t.add(this),null!=this.child)for(var e=this.child.getNodes(),i=0;ie?(this.rect.x-=(this.labelWidth-e)/2,this.setWidth(this.labelWidth)):"right"==this.labelPosHorizontal&&this.setWidth(e+this.labelWidth)),this.labelHeight&&("top"==this.labelPosVertical?(this.rect.y-=this.labelHeight,this.setHeight(i+this.labelHeight)):"center"==this.labelPosVertical&&this.labelHeight>i?(this.rect.y-=(this.labelHeight-i)/2,this.setHeight(this.labelHeight)):"bottom"==this.labelPosVertical&&this.setHeight(i+this.labelHeight))}}},l.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==n.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},l.prototype.transform=function(t){var e=this.rect.x;e>s.WORLD_BOUNDARY?e=s.WORLD_BOUNDARY:e<-s.WORLD_BOUNDARY&&(e=-s.WORLD_BOUNDARY);var i=this.rect.y;i>s.WORLD_BOUNDARY?i=s.WORLD_BOUNDARY:i<-s.WORLD_BOUNDARY&&(i=-s.WORLD_BOUNDARY);var r=new h(e,i),n=t.inverseTransformPoint(r);this.setLocation(n.x,n.y)},l.prototype.getLeft=function(){return this.rect.x},l.prototype.getRight=function(){return this.rect.x+this.rect.width},l.prototype.getTop=function(){return this.rect.y},l.prototype.getBottom=function(){return this.rect.y+this.rect.height},l.prototype.getParent=function(){return null==this.owner?null:this.owner.getParent()},t.exports=l},function(t,e,i){"use strict";var r=i(0);function n(){}for(var o in r)n[o]=r[o];n.MAX_ITERATIONS=2500,n.DEFAULT_EDGE_LENGTH=50,n.DEFAULT_SPRING_STRENGTH=.45,n.DEFAULT_REPULSION_STRENGTH=4500,n.DEFAULT_GRAVITY_STRENGTH=.4,n.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,n.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,n.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,n.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,n.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,n.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,n.COOLING_ADAPTATION_FACTOR=.33,n.ADAPTATION_LOWER_NODE_LIMIT=1e3,n.ADAPTATION_UPPER_NODE_LIMIT=5e3,n.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,n.MAX_NODE_DISPLACEMENT=3*n.MAX_NODE_DISPLACEMENT_INCREMENTAL,n.MIN_REPULSION_DIST=n.DEFAULT_EDGE_LENGTH/10,n.CONVERGENCE_CHECK_PERIOD=100,n.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,n.MIN_EDGE_LENGTH=1,n.GRID_CALCULATION_CHECK_PERIOD=10,t.exports=n},function(t,e,i){"use strict";function r(t,e){null==t&&null==e?(this.x=0,this.y=0):(this.x=t,this.y=e)}r.prototype.getX=function(){return this.x},r.prototype.getY=function(){return this.y},r.prototype.setX=function(t){this.x=t},r.prototype.setY=function(t){this.y=t},r.prototype.getDifference=function(t){return new DimensionD(this.x-t.x,this.y-t.y)},r.prototype.getCopy=function(){return new r(this.x,this.y)},r.prototype.translate=function(t){return this.x+=t.width,this.y+=t.height,this},t.exports=r},function(t,e,i){"use strict";var r=i(2),n=i(10),o=i(0),s=i(7),a=i(3),h=i(1),l=i(13),c=i(12),d=i(11);function g(t,e,i){r.call(this,i),this.estimatedSize=n.MIN_VALUE,this.margin=o.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=t,null!=e&&e instanceof s?this.graphManager=e:null!=e&&e instanceof Layout&&(this.graphManager=e.graphManager)}for(var u in g.prototype=Object.create(r.prototype),r)g[u]=r[u];g.prototype.getNodes=function(){return this.nodes},g.prototype.getEdges=function(){return this.edges},g.prototype.getGraphManager=function(){return this.graphManager},g.prototype.getParent=function(){return this.parent},g.prototype.getLeft=function(){return this.left},g.prototype.getRight=function(){return this.right},g.prototype.getTop=function(){return this.top},g.prototype.getBottom=function(){return this.bottom},g.prototype.isConnected=function(){return this.isConnected},g.prototype.add=function(t,e,i){if(null==e&&null==i){var r=t;if(null==this.graphManager)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(r)>-1)throw"Node already in graph!";return r.owner=this,this.getNodes().push(r),r}var n=t;if(!(this.getNodes().indexOf(e)>-1&&this.getNodes().indexOf(i)>-1))throw"Source or target not in graph!";if(e.owner!=i.owner||e.owner!=this)throw"Both owners must be this graph!";return e.owner!=i.owner?null:(n.source=e,n.target=i,n.isInterGraph=!1,this.getEdges().push(n),e.edges.push(n),i!=e&&i.edges.push(n),n)},g.prototype.remove=function(t){var e=t;if(t instanceof a){if(null==e)throw"Node is null!";if(null==e.owner||e.owner!=this)throw"Owner graph is invalid!";if(null==this.graphManager)throw"Owner graph manager is invalid!";for(var i=e.edges.slice(),r=i.length,n=0;n-1&&c>-1))throw"Source and/or target doesn't know this edge!";if(o.source.edges.splice(l,1),o.target!=o.source&&o.target.edges.splice(c,1),-1==(s=o.source.owner.getEdges().indexOf(o)))throw"Not in owner's edge list!";o.source.owner.getEdges().splice(s,1)}},g.prototype.updateLeftTop=function(){for(var t,e,i,r=n.MAX_VALUE,o=n.MAX_VALUE,s=this.getNodes(),a=s.length,h=0;h(t=l.getTop())&&(r=t),o>(e=l.getLeft())&&(o=e)}return r==n.MAX_VALUE?null:(i=null!=s[0].getParent().paddingLeft?s[0].getParent().paddingLeft:this.margin,this.left=o-i,this.top=r-i,new c(this.left,this.top))},g.prototype.updateBounds=function(t){for(var e,i,r,o,s,a=n.MAX_VALUE,h=-n.MAX_VALUE,c=n.MAX_VALUE,d=-n.MAX_VALUE,g=this.nodes,u=g.length,p=0;p(e=f.getLeft())&&(a=e),h<(i=f.getRight())&&(h=i),c>(r=f.getTop())&&(c=r),d<(o=f.getBottom())&&(d=o)}var v=new l(a,c,h-a,d-c);a==n.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),s=null!=g[0].getParent().paddingLeft?g[0].getParent().paddingLeft:this.margin,this.left=v.x-s,this.right=v.x+v.width+s,this.top=v.y-s,this.bottom=v.y+v.height+s},g.calculateBounds=function(t){for(var e,i,r,o,s=n.MAX_VALUE,a=-n.MAX_VALUE,h=n.MAX_VALUE,c=-n.MAX_VALUE,d=t.length,g=0;g(e=u.getLeft())&&(s=e),a<(i=u.getRight())&&(a=i),h>(r=u.getTop())&&(h=r),c<(o=u.getBottom())&&(c=o)}return new l(s,h,a-s,c-h)},g.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},g.prototype.getEstimatedSize=function(){if(this.estimatedSize==n.MIN_VALUE)throw"assert failed";return this.estimatedSize},g.prototype.calcEstimatedSize=function(){for(var t=0,e=this.nodes,i=e.length,r=0;r=this.nodes.length){var h=0;n.forEach((function(e){e.owner==t&&h++})),h==this.nodes.length&&(this.isConnected=!0)}}else this.isConnected=!0},t.exports=g},function(t,e,i){"use strict";var r,n=i(1);function o(t){r=i(6),this.layout=t,this.graphs=[],this.edges=[]}o.prototype.addRoot=function(){var t=this.layout.newGraph(),e=this.layout.newNode(null),i=this.add(t,e);return this.setRootGraph(i),this.rootGraph},o.prototype.add=function(t,e,i,r,n){if(null==i&&null==r&&null==n){if(null==t)throw"Graph is null!";if(null==e)throw"Parent node is null!";if(this.graphs.indexOf(t)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(t),null!=t.parent)throw"Already has a parent!";if(null!=e.child)throw"Already has a child!";return t.parent=e,e.child=t,t}n=i,i=t;var o=(r=e).getOwner(),s=n.getOwner();if(null==o||o.getGraphManager()!=this)throw"Source not in this graph mgr!";if(null==s||s.getGraphManager()!=this)throw"Target not in this graph mgr!";if(o==s)return i.isInterGraph=!1,o.add(i,r,n);if(i.isInterGraph=!0,i.source=r,i.target=n,this.edges.indexOf(i)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(i),null==i.source||null==i.target)throw"Edge source and/or target is null!";if(-1!=i.source.edges.indexOf(i)||-1!=i.target.edges.indexOf(i))throw"Edge already in source and/or target incidency list!";return i.source.edges.push(i),i.target.edges.push(i),i},o.prototype.remove=function(t){if(t instanceof r){var e=t;if(e.getGraphManager()!=this)throw"Graph not in this graph mgr";if(e!=this.rootGraph&&(null==e.parent||e.parent.graphManager!=this))throw"Invalid parent node!";for(var i,o=[],s=(o=o.concat(e.getEdges())).length,a=0;a=e.getRight()?i[0]+=Math.min(e.getX()-t.getX(),t.getRight()-e.getRight()):e.getX()<=t.getX()&&e.getRight()>=t.getRight()&&(i[0]+=Math.min(t.getX()-e.getX(),e.getRight()-t.getRight())),t.getY()<=e.getY()&&t.getBottom()>=e.getBottom()?i[1]+=Math.min(e.getY()-t.getY(),t.getBottom()-e.getBottom()):e.getY()<=t.getY()&&e.getBottom()>=t.getBottom()&&(i[1]+=Math.min(t.getY()-e.getY(),e.getBottom()-t.getBottom()));var o=Math.abs((e.getCenterY()-t.getCenterY())/(e.getCenterX()-t.getCenterX()));e.getCenterY()===t.getCenterY()&&e.getCenterX()===t.getCenterX()&&(o=1);var s=o*i[0],a=i[1]/o;i[0]s)return i[0]=r,i[1]=h,i[2]=o,i[3]=E,!1;if(no)return i[0]=a,i[1]=n,i[2]=y,i[3]=s,!1;if(ro?(i[0]=c,i[1]=d,w=!0):(i[0]=l,i[1]=h,w=!0):I===C&&(r>o?(i[0]=a,i[1]=h,w=!0):(i[0]=g,i[1]=d,w=!0)),-_===C?o>r?(i[2]=m,i[3]=E,L=!0):(i[2]=y,i[3]=v,L=!0):_===C&&(o>r?(i[2]=f,i[3]=v,L=!0):(i[2]=N,i[3]=E,L=!0)),w&&L)return!1;if(r>o?n>s?(M=this.getCardinalDirection(I,C,4),x=this.getCardinalDirection(_,C,2)):(M=this.getCardinalDirection(-I,C,3),x=this.getCardinalDirection(-_,C,1)):n>s?(M=this.getCardinalDirection(-I,C,1),x=this.getCardinalDirection(-_,C,3)):(M=this.getCardinalDirection(I,C,2),x=this.getCardinalDirection(_,C,4)),!w)switch(M){case 1:D=h,O=r+-p/C,i[0]=O,i[1]=D;break;case 2:O=g,D=n+u*C,i[0]=O,i[1]=D;break;case 3:D=d,O=r+p/C,i[0]=O,i[1]=D;break;case 4:O=c,D=n+-u*C,i[0]=O,i[1]=D}if(!L)switch(x){case 1:b=v,R=o+-A/C,i[2]=R,i[3]=b;break;case 2:R=N,b=s+T*C,i[2]=R,i[3]=b;break;case 3:b=E,R=o+A/C,i[2]=R,i[3]=b;break;case 4:R=m,b=s+-T*C,i[2]=R,i[3]=b}}return!1},n.getCardinalDirection=function(t,e,i){return t>e?i:1+i%4},n.getIntersection=function(t,e,i,n){if(null==n)return this.getIntersection2(t,e,i);var o,s,a,h,l,c,d,g=t.x,u=t.y,p=e.x,f=e.y,v=i.x,y=i.y,m=n.x,E=n.y;return 0==(d=(o=f-u)*(h=v-m)-(s=E-y)*(a=g-p))?null:new r((a*(c=m*y-v*E)-h*(l=p*u-g*f))/d,(s*l-o*c)/d)},n.angleOfVector=function(t,e,i,r){var n=void 0;return t!==i?(n=Math.atan((r-e)/(i-t)),i=0){var c=(-h+Math.sqrt(h*h-4*a*l))/(2*a),d=(-h-Math.sqrt(h*h-4*a*l))/(2*a);return c>=0&&c<=1?[c]:d>=0&&d<=1?[d]:null}return null},n.HALF_PI=.5*Math.PI,n.ONE_AND_HALF_PI=1.5*Math.PI,n.TWO_PI=2*Math.PI,n.THREE_PI=3*Math.PI,t.exports=n},function(t,e,i){"use strict";function r(){}r.sign=function(t){return t>0?1:t<0?-1:0},r.floor=function(t){return t<0?Math.ceil(t):Math.floor(t)},r.ceil=function(t){return t<0?Math.floor(t):Math.ceil(t)},t.exports=r},function(t,e,i){"use strict";function r(){}r.MAX_VALUE=2147483647,r.MIN_VALUE=-2147483648,t.exports=r},function(t,e,i){"use strict";var r=function(){function t(t,e){for(var i=0;i0&&e;){for(a.push(l[0]);a.length>0&&e;){var c=a[0];a.splice(0,1),s.add(c);var d=c.getEdges();for(o=0;o-1&&l.splice(f,1)}s=new Set,h=new Map}else t=[]}return t},g.prototype.createDummyNodesForBendpoints=function(t){for(var e=[],i=t.source,r=this.graphManager.calcLowestCommonAncestor(t.source,t.target),n=0;n0){for(var n=this.edgeToDummyNodes.get(i),o=0;o=0&&e.splice(d,1),c.getNeighborsList().forEach((function(t){if(i.indexOf(t)<0){var e=r.get(t)-1;1==e&&h.push(t),r.set(t,e)}}))}i=i.concat(h),1!=e.length&&2!=e.length||(n=!0,o=e[0])}return o},g.prototype.setGraphManager=function(t){this.graphManager=t},t.exports=g},function(t,e,i){"use strict";function r(){}r.seed=1,r.x=0,r.nextDouble=function(){return r.x=1e4*Math.sin(r.seed++),r.x-Math.floor(r.x)},t.exports=r},function(t,e,i){"use strict";var r=i(5);function n(t,e){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}n.prototype.getWorldOrgX=function(){return this.lworldOrgX},n.prototype.setWorldOrgX=function(t){this.lworldOrgX=t},n.prototype.getWorldOrgY=function(){return this.lworldOrgY},n.prototype.setWorldOrgY=function(t){this.lworldOrgY=t},n.prototype.getWorldExtX=function(){return this.lworldExtX},n.prototype.setWorldExtX=function(t){this.lworldExtX=t},n.prototype.getWorldExtY=function(){return this.lworldExtY},n.prototype.setWorldExtY=function(t){this.lworldExtY=t},n.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},n.prototype.setDeviceOrgX=function(t){this.ldeviceOrgX=t},n.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},n.prototype.setDeviceOrgY=function(t){this.ldeviceOrgY=t},n.prototype.getDeviceExtX=function(){return this.ldeviceExtX},n.prototype.setDeviceExtX=function(t){this.ldeviceExtX=t},n.prototype.getDeviceExtY=function(){return this.ldeviceExtY},n.prototype.setDeviceExtY=function(t){this.ldeviceExtY=t},n.prototype.transformX=function(t){var e=0,i=this.lworldExtX;return 0!=i&&(e=this.ldeviceOrgX+(t-this.lworldOrgX)*this.ldeviceExtX/i),e},n.prototype.transformY=function(t){var e=0,i=this.lworldExtY;return 0!=i&&(e=this.ldeviceOrgY+(t-this.lworldOrgY)*this.ldeviceExtY/i),e},n.prototype.inverseTransformX=function(t){var e=0,i=this.ldeviceExtX;return 0!=i&&(e=this.lworldOrgX+(t-this.ldeviceOrgX)*this.lworldExtX/i),e},n.prototype.inverseTransformY=function(t){var e=0,i=this.ldeviceExtY;return 0!=i&&(e=this.lworldOrgY+(t-this.ldeviceOrgY)*this.lworldExtY/i),e},n.prototype.inverseTransformPoint=function(t){return new r(this.inverseTransformX(t.x),this.inverseTransformY(t.y))},t.exports=n},function(t,e,i){"use strict";var r=i(15),n=i(4),o=i(0),s=i(8),a=i(9);function h(){r.call(this),this.useSmartIdealEdgeLengthCalculation=n.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=n.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=n.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=n.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=n.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*n.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=n.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=n.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=n.MAX_ITERATIONS}for(var l in h.prototype=Object.create(r.prototype),r)h[l]=r[l];h.prototype.initParameters=function(){r.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=n.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},h.prototype.calcIdealEdgeLengths=function(){for(var t,e,i,r,s,a,h,l=this.getGraphManager().getAllEdges(),c=0;cn.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*n.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-n.ADAPTATION_LOWER_NODE_LIMIT)/(n.ADAPTATION_UPPER_NODE_LIMIT-n.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-n.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=n.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>n.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(n.COOLING_ADAPTATION_FACTOR,1-(t-n.ADAPTATION_LOWER_NODE_LIMIT)/(n.ADAPTATION_UPPER_NODE_LIMIT-n.ADAPTATION_LOWER_NODE_LIMIT)*(1-n.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=n.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(5*this.getAllNodes().length,this.maxIterations),this.displacementThresholdPerNode=3*n.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},h.prototype.calcSpringForces=function(){for(var t,e=this.getAllEdges(),i=0;i0&&void 0!==arguments[0])||arguments[0],a=arguments.length>1&&void 0!==arguments[1]&&arguments[1],h=this.getAllNodes();if(this.useFRGridVariant)for(this.totalIterations%n.GRID_CALCULATION_CHECK_PERIOD==1&&s&&this.updateGrid(),o=new Set,t=0;t(h=e.getEstimatedSize()*this.gravityRangeFactor)||a>h)&&(t.gravitationForceX=-this.gravityConstant*n,t.gravitationForceY=-this.gravityConstant*o):(s>(h=e.getEstimatedSize()*this.compoundGravityRangeFactor)||a>h)&&(t.gravitationForceX=-this.gravityConstant*n*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*o*this.compoundGravityConstant)},h.prototype.isConverged=function(){var t,e=!1;return this.totalIterations>this.maxIterations/3&&(e=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement=a.length||l>=a[0].length))for(var c=0;ct}}]),t}();t.exports=o},function(t,e,i){"use strict";function r(){}r.svd=function(t){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=t.length,this.n=t[0].length;var e=Math.min(this.m,this.n);this.s=function(t){for(var e=[];t-- >0;)e.push(0);return e}(Math.min(this.m+1,this.n)),this.U=function t(e){if(0==e.length)return 0;for(var i=[],r=0;r0;)e.push(0);return e}(this.n),s=function(t){for(var e=[];t-- >0;)e.push(0);return e}(this.m),a=Math.min(this.m-1,this.n),h=Math.max(0,Math.min(this.n-2,this.m)),l=0;l=0;x--)if(0!==this.s[x]){for(var O=x+1;O=0;P--){if(function(t,e){return t&&e}(P0;){var W=void 0,j=void 0;for(W=_-2;W>=-1&&-1!==W;W--)if(Math.abs(o[W])<=B+V*(Math.abs(this.s[W])+Math.abs(this.s[W+1]))){o[W]=0;break}if(W===_-2)j=4;else{var q=void 0;for(q=_-1;q>=W&&q!==W;q--){var $=(q!==_?Math.abs(o[q]):0)+(q!==W+1?Math.abs(o[q-1]):0);if(Math.abs(this.s[q])<=B+V*$){this.s[q]=0;break}}q===W?j=3:q===_-1?j=1:(j=2,W=q)}switch(W++,j){case 1:var K=o[_-2];o[_-2]=0;for(var Z=_-2;Z>=W;Z--){var Q=r.hypot(this.s[Z],K),J=this.s[Z]/Q,tt=K/Q;this.s[Z]=Q,Z!==W&&(K=-tt*o[Z-1],o[Z-1]=J*o[Z-1]);for(var et=0;et=this.s[W+1]);){var _t=this.s[W];if(this.s[W]=this.s[W+1],this.s[W+1]=_t,WMath.abs(e)?(i=e/t,i=Math.abs(t)*Math.sqrt(1+i*i)):0!=e?(i=t/e,i=Math.abs(e)*Math.sqrt(1+i*i)):i=0,i},t.exports=r},function(t,e,i){"use strict";var r=function(){function t(t,e){for(var i=0;i2&&void 0!==arguments[2]?arguments[2]:1,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.sequence1=e,this.sequence2=i,this.match_score=r,this.mismatch_penalty=n,this.gap_penalty=o,this.iMax=e.length+1,this.jMax=i.length+1,this.grid=new Array(this.iMax);for(var s=0;s=0;i--){var r=this.listeners[i];r.event===t&&r.callback===e&&this.listeners.splice(i,1)}},n.emit=function(t,e){for(var i=0;i{"use strict";i.d(e,{diagram:()=>dt});var r=i(34483),n=i(86825),o=i(86022),s=i(39676),a=(i(85039),i(61021)),h=i(45567),l=i(78731),c=i(90165),d=i(26527),g=i(20007),u={L:"left",R:"right",T:"top",B:"bottom"},p={L:(0,h.K2)((t=>`${t},${t/2} 0,${t} 0,0`),"L"),R:(0,h.K2)((t=>`0,${t/2} ${t},0 ${t},${t}`),"R"),T:(0,h.K2)((t=>`0,0 ${t},0 ${t/2},${t}`),"T"),B:(0,h.K2)((t=>`${t/2},0 ${t},${t} 0,${t}`),"B")},f={L:(0,h.K2)(((t,e)=>t-e+2),"L"),R:(0,h.K2)(((t,e)=>t-2),"R"),T:(0,h.K2)(((t,e)=>t-e+2),"T"),B:(0,h.K2)(((t,e)=>t-2),"B")},v=(0,h.K2)((function(t){return m(t)?"L"===t?"R":"L":"T"===t?"B":"T"}),"getOppositeArchitectureDirection"),y=(0,h.K2)((function(t){return"L"===t||"R"===t||"T"===t||"B"===t}),"isArchitectureDirection"),m=(0,h.K2)((function(t){return"L"===t||"R"===t}),"isArchitectureDirectionX"),E=(0,h.K2)((function(t){return"T"===t||"B"===t}),"isArchitectureDirectionY"),N=(0,h.K2)((function(t,e){const i=m(t)&&E(e),r=E(t)&&m(e);return i||r}),"isArchitectureDirectionXY"),T=(0,h.K2)((function(t){const e=t[0],i=t[1],r=m(e)&&E(i),n=E(e)&&m(i);return r||n}),"isArchitecturePairXY"),A=(0,h.K2)((function(t){return"LL"!==t&&"RR"!==t&&"TT"!==t&&"BB"!==t}),"isValidArchitectureDirectionPair"),w=(0,h.K2)((function(t,e){const i=`${t}${e}`;return A(i)?i:void 0}),"getArchitectureDirectionPair"),L=(0,h.K2)((function([t,e],i){const r=i[0],n=i[1];return m(r)?E(n)?[t+("L"===r?-1:1),e+("T"===n?1:-1)]:[t+("L"===r?-1:1),e]:m(n)?[t+("L"===n?1:-1),e+("T"===r?1:-1)]:[t,e+("T"===r?1:-1)]}),"shiftPositionByArchitectureDirectionPair"),I=(0,h.K2)((function(t){return"LT"===t||"TL"===t?[1,1]:"BL"===t||"LB"===t?[1,-1]:"BR"===t||"RB"===t?[-1,-1]:[-1,1]}),"getArchitectureDirectionXYFactors"),_=(0,h.K2)((function(t){return"service"===t.type}),"isArchitectureService"),C=(0,h.K2)((function(t){return"junction"===t.type}),"isArchitectureJunction"),M=(0,h.K2)((t=>t.data()),"edgeData"),x=(0,h.K2)((t=>t.data()),"nodeData"),O=h.UI.architecture,D=new s.m((()=>({nodes:{},groups:{},edges:[],registeredIds:{},config:O,dataStructures:void 0,elements:{}}))),R=(0,h.K2)((()=>{D.reset(),(0,h.IU)()}),"clear"),b=(0,h.K2)((function({id:t,icon:e,in:i,title:r,iconText:n}){if(void 0!==D.records.registeredIds[t])throw new Error(`The service id [${t}] is already in use by another ${D.records.registeredIds[t]}`);if(void 0!==i){if(t===i)throw new Error(`The service [${t}] cannot be placed within itself`);if(void 0===D.records.registeredIds[i])throw new Error(`The service [${t}]'s parent does not exist. Please make sure the parent is created before this service`);if("node"===D.records.registeredIds[i])throw new Error(`The service [${t}]'s parent is not a group`)}D.records.registeredIds[t]="node",D.records.nodes[t]={id:t,type:"service",icon:e,iconText:n,title:r,edges:[],in:i}}),"addService"),G=(0,h.K2)((()=>Object.values(D.records.nodes).filter(_)),"getServices"),F=(0,h.K2)((function({id:t,in:e}){D.records.registeredIds[t]="node",D.records.nodes[t]={id:t,type:"junction",edges:[],in:e}}),"addJunction"),S=(0,h.K2)((()=>Object.values(D.records.nodes).filter(C)),"getJunctions"),P=(0,h.K2)((()=>Object.values(D.records.nodes)),"getNodes"),U=(0,h.K2)((t=>D.records.nodes[t]),"getNode"),Y=(0,h.K2)((function({id:t,icon:e,in:i,title:r}){if(void 0!==D.records.registeredIds[t])throw new Error(`The group id [${t}] is already in use by another ${D.records.registeredIds[t]}`);if(void 0!==i){if(t===i)throw new Error(`The group [${t}] cannot be placed within itself`);if(void 0===D.records.registeredIds[i])throw new Error(`The group [${t}]'s parent does not exist. Please make sure the parent is created before this group`);if("node"===D.records.registeredIds[i])throw new Error(`The group [${t}]'s parent is not a group`)}D.records.registeredIds[t]="group",D.records.groups[t]={id:t,icon:e,title:r,in:i}}),"addGroup"),k=(0,h.K2)((()=>Object.values(D.records.groups)),"getGroups"),H=(0,h.K2)((function({lhsId:t,rhsId:e,lhsDir:i,rhsDir:r,lhsInto:n,rhsInto:o,lhsGroup:s,rhsGroup:a,title:h}){if(!y(i))throw new Error(`Invalid direction given for left hand side of edge ${t}--${e}. Expected (L,R,T,B) got ${i}`);if(!y(r))throw new Error(`Invalid direction given for right hand side of edge ${t}--${e}. Expected (L,R,T,B) got ${r}`);if(void 0===D.records.nodes[t]&&void 0===D.records.groups[t])throw new Error(`The left-hand id [${t}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(void 0===D.records.nodes[e]&&void 0===D.records.groups[t])throw new Error(`The right-hand id [${e}] does not yet exist. Please create the service/group before declaring an edge to it.`);const l=D.records.nodes[t].in,c=D.records.nodes[e].in;if(s&&l&&c&&l==c)throw new Error(`The left-hand id [${t}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(a&&l&&c&&l==c)throw new Error(`The right-hand id [${e}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const d={lhsId:t,lhsDir:i,lhsInto:n,lhsGroup:s,rhsId:e,rhsDir:r,rhsInto:o,rhsGroup:a,title:h};D.records.edges.push(d),D.records.nodes[t]&&D.records.nodes[e]&&(D.records.nodes[t].edges.push(D.records.edges[D.records.edges.length-1]),D.records.nodes[e].edges.push(D.records.edges[D.records.edges.length-1]))}),"addEdge"),X=(0,h.K2)((()=>D.records.edges),"getEdges"),z=(0,h.K2)((()=>{if(void 0===D.records.dataStructures){const t=Object.entries(D.records.nodes).reduce(((t,[e,i])=>(t[e]=i.edges.reduce(((t,i)=>{if(i.lhsId===e){const e=w(i.lhsDir,i.rhsDir);e&&(t[e]=i.rhsId)}else{const e=w(i.rhsDir,i.lhsDir);e&&(t[e]=i.lhsId)}return t}),{}),t)),{}),e=Object.keys(t)[0],i={[e]:1},r=Object.keys(t).reduce(((t,i)=>i===e?t:{...t,[i]:1}),{}),n=(0,h.K2)((e=>{const n={[e]:[0,0]},o=[e];for(;o.length>0;){const e=o.shift();if(e){i[e]=1,delete r[e];const s=t[e],[a,h]=n[e];Object.entries(s).forEach((([t,e])=>{i[e]||(n[e]=L([a,h],t),o.push(e))}))}}return n}),"BFS"),o=[n(e)];for(;Object.keys(r).length>0;)o.push(n(Object.keys(r)[0]));D.records.dataStructures={adjList:t,spatialMaps:o}}return D.records.dataStructures}),"getDataStructures"),V=(0,h.K2)(((t,e)=>{D.records.elements[t]=e}),"setElementForId"),B=(0,h.K2)((t=>D.records.elements[t]),"getElementById"),W={clear:R,setDiagramTitle:h.ke,getDiagramTitle:h.ab,setAccTitle:h.SV,getAccTitle:h.iN,setAccDescription:h.EI,getAccDescription:h.m7,addService:b,getServices:G,addJunction:F,getJunctions:S,getNodes:P,getNode:U,addGroup:Y,getGroups:k,addEdge:H,getEdges:X,setElementForId:V,getElementById:B,getDataStructures:z};function j(t){const e=(0,h.D7)().architecture;return e?.[t]?e[t]:O[t]}(0,h.K2)(j,"getConfigField");var q=(0,h.K2)(((t,e)=>{(0,o.S)(t,e),t.groups.map(e.addGroup),t.services.map((t=>e.addService({...t,type:"service"}))),t.junctions.map((t=>e.addJunction({...t,type:"junction"}))),t.edges.map(e.addEdge)}),"populateDb"),$={parse:(0,h.K2)((async t=>{const e=await(0,l.qg)("architecture",t);h.Rm.debug(e),q(e,W)}),"parse")},K=(0,h.K2)((t=>`\n .edge {\n stroke-width: ${t.archEdgeWidth};\n stroke: ${t.archEdgeColor};\n fill: none;\n }\n\n .arrow {\n fill: ${t.archEdgeArrowColor};\n }\n\n .node-bkg {\n fill: none;\n stroke: ${t.archGroupBorderColor};\n stroke-width: ${t.archGroupBorderWidth};\n stroke-dasharray: 8;\n }\n .node-icon-text {\n display: flex; \n align-items: center;\n }\n \n .node-icon-text > div {\n color: #fff;\n margin: 1px;\n height: fit-content;\n text-align: center;\n overflow: hidden;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n }\n`),"getStyles"),Z=(0,h.K2)((t=>`${t}`),"wrapIcon"),Q={prefix:"mermaid-architecture",height:80,width:80,icons:{database:{body:Z('')},server:{body:Z('')},disk:{body:Z('')},internet:{body:Z('')},cloud:{body:Z('')},unknown:r.Gc,blank:{body:Z("")}}},J=(0,h.K2)((async function(t,e){const i=j("padding"),r=j("iconSize"),o=r/2,s=r/6,a=s/2;await Promise.all(e.edges().map((async e=>{const{source:r,sourceDir:l,sourceArrow:c,sourceGroup:d,target:g,targetDir:u,targetArrow:v,targetGroup:y,label:A}=M(e);let{x:L,y:_}=e[0].sourceEndpoint();const{x:C,y:x}=e[0].midpoint();let{x:O,y:D}=e[0].targetEndpoint();const R=i+4;if(d&&(m(l)?L+="L"===l?-R:R:_+="T"===l?-R:R+18),y&&(m(u)?O+="L"===u?-R:R:D+="T"===u?-R:R+18),d||"junction"!==W.getNode(r)?.type||(m(l)?L+="L"===l?o:-o:_+="T"===l?o:-o),y||"junction"!==W.getNode(g)?.type||(m(u)?O+="L"===u?o:-o:D+="T"===u?o:-o),e[0]._private.rscratch){const e=t.insert("g");if(e.insert("path").attr("d",`M ${L},${_} L ${C},${x} L${O},${D} `).attr("class","edge"),c){const t=m(l)?f[l](L,s):L-a,i=E(l)?f[l](_,s):_-a;e.insert("polygon").attr("points",p[l](s)).attr("transform",`translate(${t},${i})`).attr("class","arrow")}if(v){const t=m(u)?f[u](O,s):O-a,i=E(u)?f[u](D,s):D-a;e.insert("polygon").attr("points",p[u](s)).attr("transform",`translate(${t},${i})`).attr("class","arrow")}if(A){const t=N(l,u)?"XY":m(l)?"X":"Y";let i=0;i="X"===t?Math.abs(L-O):"Y"===t?Math.abs(_-D)/1.5:Math.abs(L-O)/2;const r=e.append("g");if(await(0,n.GZ)(r,A,{useHtmlLabels:!1,width:i,classes:"architecture-service-label"},(0,h.D7)()),r.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),"X"===t)r.attr("transform","translate("+C+", "+x+")");else if("Y"===t)r.attr("transform","translate("+C+", "+x+") rotate(-90)");else if("XY"===t){const t=w(l,u);if(t&&T(t)){const e=r.node().getBoundingClientRect(),[i,n]=I(t);r.attr("dominant-baseline","auto").attr("transform",`rotate(${-1*i*n*45})`);const o=r.node().getBoundingClientRect();r.attr("transform",`\n translate(${C}, ${x-e.height/2})\n translate(${i*o.width/2}, ${n*o.height/2})\n rotate(${-1*i*n*45}, 0, ${e.height/2})\n `)}}}}})))}),"drawEdges"),tt=(0,h.K2)((async function(t,e){const i=.75*j("padding"),o=j("fontSize"),s=j("iconSize")/2;await Promise.all(e.nodes().map((async e=>{const a=x(e);if("group"===a.type){const{h:l,w:c,x1:d,y1:g}=e.boundingBox();t.append("rect").attr("x",d+s).attr("y",g+s).attr("width",c).attr("height",l).attr("class","node-bkg");const u=t.append("g");let p=d,f=g;if(a.icon){const t=u.append("g");t.html(`${await(0,r.WY)(a.icon,{height:i,width:i,fallbackPrefix:Q.prefix})}`),t.attr("transform","translate("+(p+s+1)+", "+(f+s+1)+")"),p+=i,f+=o/2-1-2}if(a.label){const t=u.append("g");await(0,n.GZ)(t,a.label,{useHtmlLabels:!1,width:c,classes:"architecture-service-label"},(0,h.D7)()),t.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","start").attr("text-anchor","start"),t.attr("transform","translate("+(p+s+4)+", "+(f+s+2)+")")}}})))}),"drawGroups"),et=(0,h.K2)((async function(t,e,i){for(const o of i){const i=e.append("g"),s=j("iconSize");if(o.title){const t=i.append("g");await(0,n.GZ)(t,o.title,{useHtmlLabels:!1,width:1.5*s,classes:"architecture-service-label"},(0,h.D7)()),t.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),t.attr("transform","translate("+s/2+", "+s+")")}const a=i.append("g");if(o.icon)a.html(`${await(0,r.WY)(o.icon,{height:s,width:s,fallbackPrefix:Q.prefix})}`);else if(o.iconText){a.html(`${await(0,r.WY)("blank",{height:s,width:s,fallbackPrefix:Q.prefix})}`);const t=a.append("g").append("foreignObject").attr("width",s).attr("height",s).append("div").attr("class","node-icon-text").attr("style",`height: ${s}px;`).append("div").html(o.iconText),e=parseInt(window.getComputedStyle(t.node(),null).getPropertyValue("font-size").replace(/\D/g,""))??16;t.attr("style",`-webkit-line-clamp: ${Math.floor((s-2)/e)};`)}else a.append("path").attr("class","node-bkg").attr("id","node-"+o.id).attr("d",`M0 ${s} v${-s} q0,-5 5,-5 h${s} q5,0 5,5 v${s} H0 Z`);i.attr("class","architecture-service");const{width:l,height:c}=i._groups[0][0].getBBox();o.width=l,o.height=c,t.setElementForId(o.id,i)}return 0}),"drawServices"),it=(0,h.K2)((function(t,e,i){i.forEach((i=>{const r=e.append("g"),n=j("iconSize");r.append("g").append("rect").attr("id","node-"+i.id).attr("fill-opacity","0").attr("width",n).attr("height",n),r.attr("class","architecture-junction");const{width:o,height:s}=r._groups[0][0].getBBox();r.width=o,r.height=s,t.setElementForId(i.id,r)}))}),"drawJunctions");function rt(t,e){t.forEach((t=>{e.add({group:"nodes",data:{type:"service",id:t.id,icon:t.icon,label:t.title,parent:t.in,width:j("iconSize"),height:j("iconSize")},classes:"node-service"})}))}function nt(t,e){t.forEach((t=>{e.add({group:"nodes",data:{type:"junction",id:t.id,parent:t.in,width:j("iconSize"),height:j("iconSize")},classes:"node-junction"})}))}function ot(t,e){e.nodes().map((e=>{const i=x(e);if("group"===i.type)return;i.x=e.position().x,i.y=e.position().y;t.getElementById(i.id).attr("transform","translate("+(i.x||0)+","+(i.y||0)+")")}))}function st(t,e){t.forEach((t=>{e.add({group:"nodes",data:{type:"group",id:t.id,icon:t.icon,label:t.title,parent:t.in},classes:"node-group"})}))}function at(t,e){t.forEach((t=>{const{lhsId:i,rhsId:r,lhsInto:n,lhsGroup:o,rhsInto:s,lhsDir:a,rhsDir:h,rhsGroup:l,title:c}=t,d=N(t.lhsDir,t.rhsDir)?"segments":"straight",g={id:`${i}-${r}`,label:c,source:i,sourceDir:a,sourceArrow:n,sourceGroup:o,sourceEndpoint:"L"===a?"0 50%":"R"===a?"100% 50%":"T"===a?"50% 0":"50% 100%",target:r,targetDir:h,targetArrow:s,targetGroup:l,targetEndpoint:"L"===h?"0 50%":"R"===h?"100% 50%":"T"===h?"50% 0":"50% 100%"};e.add({group:"edges",data:g,classes:d})}))}function ht(t){const e=t.map((t=>{const e={},i={};return Object.entries(t).forEach((([t,[r,n]])=>{e[n]||(e[n]=[]),i[r]||(i[r]=[]),e[n].push(t),i[r].push(t)})),{horiz:Object.values(e).filter((t=>t.length>1)),vert:Object.values(i).filter((t=>t.length>1))}})),[i,r]=e.reduce((([t,e],{horiz:i,vert:r})=>[[...t,...i],[...e,...r]]),[[],[]]);return{horizontal:i,vertical:r}}function lt(t){const e=[],i=(0,h.K2)((t=>`${t[0]},${t[1]}`),"posToStr"),r=(0,h.K2)((t=>t.split(",").map((t=>parseInt(t)))),"strToPos");return t.forEach((t=>{const n=Object.fromEntries(Object.entries(t).map((([t,e])=>[i(e),t]))),o=[i([0,0])],s={},a={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};for(;o.length>0;){const t=o.shift();if(t){s[t]=1;const h=n[t];if(h){const l=r(t);Object.entries(a).forEach((([t,r])=>{const a=i([l[0]+r[0],l[1]+r[1]]),c=n[a];c&&!s[a]&&(o.push(a),e.push({[u[t]]:c,[u[v(t)]]:h,gap:1.5*j("iconSize")}))}))}}}})),e}function ct(t,e,i,r,{spatialMaps:n}){return new Promise((o=>{const s=(0,g.Ltv)("body").append("div").attr("id","cy").attr("style","display:none"),a=(0,c.A)({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"straight",label:"data(label)","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"edge.segments",style:{"curve-style":"segments","segment-weights":"0","segment-distances":[.5],"edge-distances":"endpoints","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"node",style:{"compound-sizing-wrt-labels":"include"}},{selector:"node[label]",style:{"text-valign":"bottom","text-halign":"center","font-size":`${j("fontSize")}px`}},{selector:".node-service",style:{label:"data(label)",width:"data(width)",height:"data(height)"}},{selector:".node-junction",style:{width:"data(width)",height:"data(height)"}},{selector:".node-group",style:{padding:`${j("padding")}px`}}]});s.remove(),st(i,a),rt(t,a),nt(e,a),at(r,a);const l=ht(n),d=lt(n),u=a.layout({name:"fcose",quality:"proof",styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(t){const[e,i]=t.connectedNodes(),{parent:r}=x(e),{parent:n}=x(i);return r===n?1.5*j("iconSize"):.5*j("iconSize")},edgeElasticity(t){const[e,i]=t.connectedNodes(),{parent:r}=x(e),{parent:n}=x(i);return r===n?.45:.001},alignmentConstraint:l,relativePlacementConstraint:d});u.one("layoutstop",(()=>{function t(t,e,i,r){let n,o;const{x:s,y:a}=t,{x:h,y:l}=e;o=(r-a+(s-i)*(a-l)/(s-h))/Math.sqrt(1+Math.pow((a-l)/(s-h),2)),n=Math.sqrt(Math.pow(r-a,2)+Math.pow(i-s,2)-Math.pow(o,2));n/=Math.sqrt(Math.pow(h-s,2)+Math.pow(l-a,2));let c=(h-s)*(r-a)-(l-a)*(i-s);switch(!0){case c>=0:c=1;break;case c<0:c=-1}let d=(h-s)*(i-s)+(l-a)*(r-a);switch(!0){case d>=0:d=1;break;case d<0:d=-1}return o=Math.abs(o)*c,n*=d,{distances:o,weights:n}}(0,h.K2)(t,"getSegmentWeights"),a.startBatch();for(const e of Object.values(a.edges()))if(e.data?.()){const{x:i,y:r}=e.source().position(),{x:n,y:o}=e.target().position();if(i!==n&&r!==o){const i=e.sourceEndpoint(),r=e.targetEndpoint(),{sourceDir:n}=M(e),[o,s]=E(n)?[i.x,r.y]:[r.x,i.y],{weights:a,distances:h}=t(i,r,o,s);e.style("segment-distances",h),e.style("segment-weights",a)}}a.endBatch(),u.run()})),u.run(),a.ready((t=>{h.Rm.info("Ready",t),o(a)}))}))}(0,r.pC)([{name:Q.prefix,icons:Q}]),c.A.use(d),(0,h.K2)(rt,"addServices"),(0,h.K2)(nt,"addJunctions"),(0,h.K2)(ot,"positionNodes"),(0,h.K2)(st,"addGroups"),(0,h.K2)(at,"addEdges"),(0,h.K2)(ht,"getAlignments"),(0,h.K2)(lt,"getRelativeConstraints"),(0,h.K2)(ct,"layoutArchitecture");var dt={parser:$,db:W,renderer:{draw:(0,h.K2)((async(t,e,i,r)=>{const n=r.db,o=n.getServices(),s=n.getJunctions(),l=n.getGroups(),c=n.getEdges(),d=n.getDataStructures(),g=(0,a.D)(e),u=g.append("g");u.attr("class","architecture-edges");const p=g.append("g");p.attr("class","architecture-services");const f=g.append("g");f.attr("class","architecture-groups"),await et(n,p,o),it(n,p,s);const v=await ct(o,s,l,c,d);await J(u,v),await tt(f,v),ot(n,v),(0,h.ot)(void 0,g,j("padding"),j("useMaxWidth"))}),"draw")},styles:K}},86022:(t,e,i)=>{"use strict";function r(t,e){t.accDescr&&e.setAccDescription?.(t.accDescr),t.accTitle&&e.setAccTitle?.(t.accTitle),t.title&&e.setDiagramTitle?.(t.title)}i.d(e,{S:()=>r}),(0,i(45567).K2)(r,"populateCommonDb")},39676:(t,e,i)=>{"use strict";i.d(e,{m:()=>n});var r=i(45567),n=class{constructor(t){this.init=t,this.records=this.init()}static{(0,r.K2)(this,"ImperativeState")}reset(){this.records=this.init()}}}}]); \ No newline at end of file diff --git a/assets/js/2315.1ed095c1.js b/assets/js/2315.1ed095c1.js deleted file mode 100644 index d7a9ab930792..000000000000 --- a/assets/js/2315.1ed095c1.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2315],{10646:(e,t,n)=>{n.d(t,{H:()=>l});var r=n(82933);function l(e,t){var n=e.append("foreignObject").attr("width","100000"),l=n.append("xhtml:div");l.attr("xmlns","http://www.w3.org/1999/xhtml");var o=t.label;switch(typeof o){case"function":l.insert(o);break;case"object":l.insert((function(){return o}));break;default:l.html(o)}r.AV(l,t.labelStyle),l.style("display","inline-block"),l.style("white-space","nowrap");var a=l.node().getBoundingClientRect();return n.attr("width",a.width).attr("height",a.height),n}},82933:(e,t,n)=>{n.d(t,{AV:()=>c,De:()=>o,c$:()=>p,gh:()=>a,nh:()=>d});var r=n(34963),l=n(89610);function o(e,t){return!!e.children(t).length}function a(e){return i(e.v)+":"+i(e.w)+":"+i(e.name)}var s=/:/g;function i(e){return e?String(e).replace(s,"\\:"):""}function c(e,t){t&&e.attr("style",t)}function d(e,t,n){t&&e.attr("class",t).attr("class",n+" "+e.attr("class"))}function p(e,t){var n=t.graph();if(r.A(n)){var o=n.transition;if(l.A(o))return o(e)}return e}},75937:(e,t,n)=>{n.d(t,{A:()=>o});var r=n(72453),l=n(74886);const o=(e,t)=>r.A.lang.round(l.A.parse(e)[t])},22315:(e,t,n)=>{n.d(t,{diagram:()=>i});var r=n(35860),l=(n(697),n(26312));n(86079),n(48585),n(23068),n(8058),n(21176),n(82933);n(10646);n(5664),n(91395);n(81942);l.lUB;var o=n(35900);n(74353),n(16750),n(42838),n(14075);const a={},s=function(e){const t=Object.keys(e);for(const n of t)a[n]=e[n]},i={parser:r.p,db:r.f,renderer:o.f,styles:o.a,init:e=>{e.flowchart||(e.flowchart={}),e.flowchart.arrowMarkerAbsolute=e.arrowMarkerAbsolute,s(e.flowchart),r.f.clear(),r.f.setGen("gen-1")}}},35900:(e,t,n)=>{n.d(t,{a:()=>f,f:()=>w});var r=n(697),l=n(26312),o=n(86079),a=n(8995),s=n(10646),i=n(75937),c=n(25582);const d={},p=async function(e,t,n,r,l,a){const i=r.select(`[id="${n}"]`),c=Object.keys(e);for(const d of c){const n=e[d];let r="default";n.classes.length>0&&(r=n.classes.join(" ")),r+=" flowchart-label";const c=(0,o.k)(n.styles);let p,b=void 0!==n.text?n.text:n.id;if(o.l.info("vertex",n,n.labelType),"markdown"===n.labelType)o.l.info("vertex",n,n.labelType);else if((0,o.m)((0,o.c)().flowchart.htmlLabels)){const e={label:b};p=(0,s.H)(i,e).node(),p.parentNode.removeChild(p)}else{const e=l.createElementNS("http://www.w3.org/2000/svg","text");e.setAttribute("style",c.labelStyle.replace("color:","fill:"));const t=b.split(o.e.lineBreakRegex);for(const n of t){const t=l.createElementNS("http://www.w3.org/2000/svg","tspan");t.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),t.setAttribute("dy","1em"),t.setAttribute("x","1"),t.textContent=n,e.appendChild(t)}p=e}let w=0,f="";switch(n.type){case"round":w=5,f="rect";break;case"square":case"group":default:f="rect";break;case"diamond":f="question";break;case"hexagon":f="hexagon";break;case"odd":case"odd_right":f="rect_left_inv_arrow";break;case"lean_right":f="lean_right";break;case"lean_left":f="lean_left";break;case"trapezoid":f="trapezoid";break;case"inv_trapezoid":f="inv_trapezoid";break;case"circle":f="circle";break;case"ellipse":f="ellipse";break;case"stadium":f="stadium";break;case"subroutine":f="subroutine";break;case"cylinder":f="cylinder";break;case"doublecircle":f="doublecircle"}const h=await(0,o.r)(b,(0,o.c)());t.setNode(n.id,{labelStyle:c.labelStyle,shape:f,labelText:h,labelType:n.labelType,rx:w,ry:w,class:r,style:c.style,id:n.id,link:n.link,linkTarget:n.linkTarget,tooltip:a.db.getTooltip(n.id)||"",domId:a.db.lookUpDomId(n.id),haveCallback:n.haveCallback,width:"group"===n.type?500:void 0,dir:n.dir,type:n.type,props:n.props,padding:(0,o.c)().flowchart.padding}),o.l.info("setNode",{labelStyle:c.labelStyle,labelType:n.labelType,shape:f,labelText:h,rx:w,ry:w,class:r,style:c.style,id:n.id,domId:a.db.lookUpDomId(n.id),width:"group"===n.type?500:void 0,type:n.type,dir:n.dir,props:n.props,padding:(0,o.c)().flowchart.padding})}},b=async function(e,t,n){o.l.info("abc78 edges = ",e);let r,a,s=0,i={};if(void 0!==e.defaultStyle){const t=(0,o.k)(e.defaultStyle);r=t.style,a=t.labelStyle}for(const c of e){s++;const n="L-"+c.start+"-"+c.end;void 0===i[n]?(i[n]=0,o.l.info("abc78 new entry",n,i[n])):(i[n]++,o.l.info("abc78 new entry",n,i[n]));let p=n+"-"+i[n];o.l.info("abc78 new link id to be used is",n,p,i[n]);const b="LS-"+c.start,w="LE-"+c.end,f={style:"",labelStyle:""};switch(f.minlen=c.length||1,"arrow_open"===c.type?f.arrowhead="none":f.arrowhead="normal",f.arrowTypeStart="arrow_open",f.arrowTypeEnd="arrow_open",c.type){case"double_arrow_cross":f.arrowTypeStart="arrow_cross";case"arrow_cross":f.arrowTypeEnd="arrow_cross";break;case"double_arrow_point":f.arrowTypeStart="arrow_point";case"arrow_point":f.arrowTypeEnd="arrow_point";break;case"double_arrow_circle":f.arrowTypeStart="arrow_circle";case"arrow_circle":f.arrowTypeEnd="arrow_circle"}let h="",u="";switch(c.stroke){case"normal":h="fill:none;",void 0!==r&&(h=r),void 0!==a&&(u=a),f.thickness="normal",f.pattern="solid";break;case"dotted":f.thickness="normal",f.pattern="dotted",f.style="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":f.thickness="thick",f.pattern="solid",f.style="stroke-width: 3.5px;fill:none;";break;case"invisible":f.thickness="invisible",f.pattern="solid",f.style="stroke-width: 0;fill:none;"}if(void 0!==c.style){const e=(0,o.k)(c.style);h=e.style,u=e.labelStyle}f.style=f.style+=h,f.labelStyle=f.labelStyle+=u,void 0!==c.interpolate?f.curve=(0,o.n)(c.interpolate,l.lUB):void 0!==e.defaultInterpolate?f.curve=(0,o.n)(e.defaultInterpolate,l.lUB):f.curve=(0,o.n)(d.curve,l.lUB),void 0===c.text?void 0!==c.style&&(f.arrowheadStyle="fill: #333"):(f.arrowheadStyle="fill: #333",f.labelpos="c"),f.labelType=c.labelType,f.label=await(0,o.r)(c.text.replace(o.e.lineBreakRegex,"\n"),(0,o.c)()),void 0===c.style&&(f.style=f.style||"stroke: #333; stroke-width: 1.5px;fill:none;"),f.labelStyle=f.labelStyle.replace("color:","fill:"),f.id=p,f.classes="flowchart-link "+b+" "+w,t.setEdge(c.start,c.end,f,s)}},w={setConf:function(e){const t=Object.keys(e);for(const n of t)d[n]=e[n]},addVertices:p,addEdges:b,getClasses:function(e,t){return t.db.getClasses()},draw:async function(e,t,n,s){o.l.info("Drawing flowchart");let i=s.db.getDirection();void 0===i&&(i="TD");const{securityLevel:c,flowchart:d}=(0,o.c)(),w=d.nodeSpacing||50,f=d.rankSpacing||50;let h;"sandbox"===c&&(h=(0,l.Ltv)("#i"+t));const u="sandbox"===c?(0,l.Ltv)(h.nodes()[0].contentDocument.body):(0,l.Ltv)("body"),g="sandbox"===c?h.nodes()[0].contentDocument:document,y=new r.T({multigraph:!0,compound:!0}).setGraph({rankdir:i,nodesep:w,ranksep:f,marginx:0,marginy:0}).setDefaultEdgeLabel((function(){return{}}));let k;const x=s.db.getSubGraphs();o.l.info("Subgraphs - ",x);for(let r=x.length-1;r>=0;r--)k=x[r],o.l.info("Subgraph - ",k),s.db.addVertex(k.id,{text:k.title,type:k.labelType},"group",void 0,k.classes,k.dir);const v=s.db.getVertices(),m=s.db.getEdges();o.l.info("Edges",m);let S=0;for(S=x.length-1;S>=0;S--){k=x[S],(0,l.Ubm)("cluster").append("text");for(let e=0;e`.label {\n font-family: ${e.fontFamily};\n color: ${e.nodeTextColor||e.textColor};\n }\n .cluster-label text {\n fill: ${e.titleColor};\n }\n .cluster-label span,p {\n color: ${e.titleColor};\n }\n\n .label text,span,p {\n fill: ${e.nodeTextColor||e.textColor};\n color: ${e.nodeTextColor||e.textColor};\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${e.mainBkg};\n stroke: ${e.nodeBorder};\n stroke-width: 1px;\n }\n .flowchart-label text {\n text-anchor: middle;\n }\n // .flowchart-label .text-outer-tspan {\n // text-anchor: middle;\n // }\n // .flowchart-label .text-inner-tspan {\n // text-anchor: start;\n // }\n\n .node .katex path {\n fill: #000;\n stroke: #000;\n stroke-width: 1px;\n }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ${e.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${e.lineColor};\n stroke-width: 2.0px;\n }\n\n .flowchart-link {\n stroke: ${e.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${e.edgeLabelBackground};\n rect {\n opacity: 0.5;\n background-color: ${e.edgeLabelBackground};\n fill: ${e.edgeLabelBackground};\n }\n text-align: center;\n }\n\n /* For html labels only */\n .labelBkg {\n background-color: ${((e,t)=>{const n=i.A,r=n(e,"r"),l=n(e,"g"),o=n(e,"b");return c.A(r,l,o,t)})(e.edgeLabelBackground,.5)};\n // background-color: \n }\n\n .cluster rect {\n fill: ${e.clusterBkg};\n stroke: ${e.clusterBorder};\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ${e.titleColor};\n }\n\n .cluster span,p {\n color: ${e.titleColor};\n }\n /* .cluster div {\n color: ${e.titleColor};\n } */\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ${e.fontFamily};\n font-size: 12px;\n background: ${e.tertiaryColor};\n border: 1px solid ${e.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .flowchartTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${e.textColor};\n }\n`}}]); \ No newline at end of file diff --git a/assets/js/23210cde.533601d0.js b/assets/js/23210cde.533601d0.js new file mode 100644 index 000000000000..addd3a5e6c0e --- /dev/null +++ b/assets/js/23210cde.533601d0.js @@ -0,0 +1 @@ +(self.webpackChunk=self.webpackChunk||[]).push([[499],{98236:(e,a,t)=>{"use strict";t.r(a),t.d(a,{assets:()=>c,contentTitle:()=>d,default:()=>h,frontMatter:()=>u,metadata:()=>n,toc:()=>m});const n=JSON.parse('{"id":"general/chain-state-values","title":"Chain State Values","description":"Chain constants and storage values that can be queried from the live network nodes of Polkadot, Kusama and their system chains.","source":"@site/../docs/general/chain-state-values.md","sourceDirName":"general","slug":"/chain-state-values","permalink":"/docs/chain-state-values","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/chain-state-values.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1727943421000,"frontMatter":{"id":"chain-state-values","title":"Chain State Values","sidebar_label":"Chain State","description":"Chain constants and storage values that can be queried from the live network nodes of Polkadot, Kusama and their system chains.","keywords":["polkadot","kusama","constants","storage","values"],"slug":"../chain-state-values"},"sidebar":"docs","previous":{"title":"Metadata Explorer","permalink":"/docs/metadata"},"next":{"title":"Learn","permalink":"/docs/learn-index"}}');var i=t(74848),o=t(28453),s=t(47379),r=t(11470),l=t(19365);const u={id:"chain-state-values",title:"Chain State Values",sidebar_label:"Chain State",description:"Chain constants and storage values that can be queried from the live network nodes of Polkadot, Kusama and their system chains.",keywords:["polkadot","kusama","constants","storage","values"],slug:"../chain-state-values"},d=void 0,c={},m=[{value:"Active Validator Count",id:"active-validator-count",level:4},{value:"Block Hash Count",id:"block-hash-count",level:4},{value:"Bounty Curator Deposit",id:"bounty-curator-deposit",level:4},{value:"Bounty Deposit",id:"bounty-deposit",level:4},{value:"Bounty Duration",id:"bounty-duration",level:4},{value:"Conviction Voting Lock Period",id:"conviction-voting-lock-period",level:4},{value:"Existential Deposit",id:"existential-deposit",level:4},{value:"Inactive Issuance",id:"inactive-issuance",level:4},{value:"Index Deposit",id:"index-deposit",level:4},{value:"Maximum Number of Nominators",id:"maximum-number-of-nominators",level:4},{value:"Maximum Number of Proxies per Account",id:"maximum-number-of-proxies-per-account",level:4},{value:"Maximum Votes per Nominator",id:"maximum-votes-per-nominator",level:4},{value:"Minimum Active Bond",id:"minimum-active-bond",level:4},{value:"Minimum Bond to Create a Nomination Pool",id:"minimum-bond-to-create-a-nomination-pool",level:4},{value:"Minimum Bond to Join a Nomination Pool",id:"minimum-bond-to-join-a-nomination-pool",level:4},{value:"Minimum Bond to Participate in Staking",id:"minimum-bond-to-participate-in-staking",level:4},{value:"Minimum Crowdloan contribution",id:"minimum-crowdloan-contribution",level:4},{value:"Minimum Validator Bond",id:"minimum-validator-bond",level:4},{value:"Minimum Validator Commission",id:"minimum-validator-commission",level:4},{value:"Multisig Deposit Base",id:"multisig-deposit-base",level:4},{value:"Multisig Deposit Factor",id:"multisig-deposit-factor",level:4},{value:"Nomination Pool Max Commission",id:"nomination-pool-max-commission",level:4},{value:"Nomination Pool Members",id:"nomination-pool-members",level:4},{value:"OpenGov Referendum Timeout",id:"opengov-referendum-timeout",level:4},{value:"OpenGov Submission Deposit",id:"opengov-submission-deposit",level:4},{value:"Parachain ID Registration Deposit",id:"parachain-id-registration-deposit",level:4},{value:"Parachain Genesis State Registration Deposit",id:"parachain-genesis-state-registration-deposit",level:4},{value:"Proxy Deposits",id:"proxy-deposits",level:4},{value:"Staking Miner Deposit and Reward",id:"staking-miner-deposit-and-reward",level:4},{value:"Staking Miner Max Submissions",id:"staking-miner-max-submissions",level:4},{value:"Staking Reward Retention",id:"staking-reward-retention",level:4},{value:"Total Issuance",id:"total-issuance",level:4},{value:"Treasury Burn Factor",id:"treasury-burn-factor",level:4},{value:"Treasury Spending Period",id:"treasury-spending-period",level:4},{value:"Unbonding Duration",id:"unbonding-duration",level:4},{value:"Active Validator Count",id:"active-validator-count-1",level:4},{value:"Block Hash Count",id:"block-hash-count-1",level:4},{value:"Bounty Curator Deposit",id:"bounty-curator-deposit-1",level:4},{value:"Bounty Deposit",id:"bounty-deposit-1",level:4},{value:"Bounty Duration",id:"bounty-duration-1",level:4},{value:"Conviction Voting Lock Period",id:"conviction-voting-lock-period-1",level:4},{value:"Existential Deposit",id:"existential-deposit-1",level:4},{value:"Inactive Issuance",id:"inactive-issuance-1",level:4},{value:"Index Deposit",id:"index-deposit-1",level:4},{value:"Maximum Number of Nominators",id:"maximum-number-of-nominators-1",level:4},{value:"Maximum Number of Proxies per Account",id:"maximum-number-of-proxies-per-account-1",level:4},{value:"Maximum Votes per Nominator",id:"maximum-votes-per-nominator-1",level:4},{value:"Minimum Active Bond",id:"minimum-active-bond-1",level:4},{value:"Minimum Bond to Create a Nomination Pool",id:"minimum-bond-to-create-a-nomination-pool-1",level:4},{value:"Minimum Bond to Join a Nomination Pool",id:"minimum-bond-to-join-a-nomination-pool-1",level:4},{value:"Minimum Bond to Participate in Staking",id:"minimum-bond-to-participate-in-staking-1",level:4},{value:"Minimum Crowdloan contribution",id:"minimum-crowdloan-contribution-1",level:4},{value:"Minimum Validator Bond",id:"minimum-validator-bond-1",level:4},{value:"Minimum Validator Commission",id:"minimum-validator-commission-1",level:4},{value:"Multisig Deposit Base",id:"multisig-deposit-base-1",level:4},{value:"Multisig Deposit Factor",id:"multisig-deposit-factor-1",level:4},{value:"Nomination Pool Max Commission",id:"nomination-pool-max-commission-1",level:4},{value:"Nomination Pool Members",id:"nomination-pool-members-1",level:4},{value:"OpenGov Referendum Timeout",id:"opengov-referendum-timeout-1",level:4},{value:"OpenGov Submission Deposit",id:"opengov-submission-deposit-1",level:4},{value:"Parachain ID Registration Deposit",id:"parachain-id-registration-deposit-1",level:4},{value:"Parachain Genesis State Registration Deposit",id:"parachain-genesis-state-registration-deposit-1",level:4},{value:"Proxy Deposits",id:"proxy-deposits-1",level:4},{value:"Staking Miner Deposit and Reward",id:"staking-miner-deposit-and-reward-1",level:4},{value:"Staking Miner Max Submissions",id:"staking-miner-max-submissions-1",level:4},{value:"Staking Reward Retention",id:"staking-reward-retention-1",level:4},{value:"Total Issuance",id:"total-issuance-1",level:4},{value:"Treasury Burn Factor",id:"treasury-burn-factor-1",level:4},{value:"Treasury Spending Period",id:"treasury-spending-period-1",level:4},{value:"Unbonding Duration",id:"unbonding-duration-1",level:4},{value:"Asset Deposit",id:"asset-deposit",level:4},{value:"Existential Deposit",id:"existential-deposit-2",level:4},{value:"Asset Deposit",id:"asset-deposit-1",level:4},{value:"Existential Deposit",id:"existential-deposit-3",level:4},{value:"Identity Deposit",id:"identity-deposit",level:4},{value:"Sub-identity Deposit",id:"sub-identity-deposit",level:4},{value:"Identity Deposit",id:"identity-deposit-1",level:4},{value:"Sub-identity Deposit",id:"sub-identity-deposit-1",level:4}];function p(e){const a={a:"a",admonition:"admonition",code:"code",h4:"h4",li:"li",p:"p",strong:"strong",ul:"ul",...(0,o.R)(),...e.components};return(0,i.jsxs)(r.A,{groupId:"chains",values:[{label:"Polkadot",value:"polkadot"},{label:"Kusama",value:"kusama"},{label:"Polkadot Asset Hub",value:"ahp"},{label:"Kusama Asset Hub",value:"ahk"},{label:"Polkadot People",value:"pp"},{label:"Kusama People",value:"kp"}],children:[(0,i.jsxs)(l.A,{value:"polkadot",children:[(0,i.jsx)(a.admonition,{title:"What to do with DOT",type:"info",children:(0,i.jsxs)(a.ul,{children:["\n",(0,i.jsxs)(a.li,{children:["\n",(0,i.jsxs)(a.p,{children:[(0,i.jsxs)(a.strong,{children:[(0,i.jsx)(s.A,{network:"polkadot",path:"consts.balances.existentialDeposit",defaultValue:1e10,filter:"humanReadable"}),":"]}),"\nthe minimum balance required to have an active account on Polkadot Network. If your account\nbalance drops below the minimum, your account will be reaped. Learn more about\n",(0,i.jsx)(a.a,{href:"/docs/learn-accounts",children:"Accounts"})," and the\n",(0,i.jsx)(a.a,{href:"/docs/learn-accounts#existential-deposit-and-reaping",children:"Existential Deposit"})," requirement."]}),"\n"]}),"\n",(0,i.jsxs)(a.li,{children:["\n",(0,i.jsxs)(a.p,{children:[(0,i.jsxs)(a.strong,{children:[(0,i.jsx)(s.A,{network:"polkadot",path:"query.nominationPools.minJoinBond",defaultValue:1e10,filter:"humanReadable"}),":"]}),"\nthe minimum contribution required to join a ",(0,i.jsx)(a.a,{href:"/docs/learn-nomination-pools",children:"nomination pool"}),"\nand earn staking rewards for contributing to the security of the network. Learn more about\n",(0,i.jsx)(a.a,{href:"/docs/learn-nomination-pools",children:"nomination pools"}),"."]}),"\n"]}),"\n",(0,i.jsxs)(a.li,{children:["\n",(0,i.jsxs)(a.p,{children:[(0,i.jsxs)(a.strong,{children:[(0,i.jsx)(s.A,{network:"polkadotpeople",path:"consts.identity.basicDeposit",defaultValue:20017e5,filter:"humanReadable"}),":"]}),"\nregister an ",(0,i.jsx)(a.a,{href:"/docs/learn-identity",children:"on-chain identity"})]}),"\n"]}),"\n",(0,i.jsxs)(a.li,{children:["\n",(0,i.jsxs)(a.p,{children:[(0,i.jsxs)(a.strong,{children:[(0,i.jsx)(s.A,{network:"polkadot",path:"consts.proxy.proxyDepositBase",defaultValue:20008e7,filter:"humanReadable"}),":"]}),"\ncreate a ",(0,i.jsx)(a.a,{href:"/docs/learn-proxies",children:"proxy account"}),"."]}),"\n"]}),"\n",(0,i.jsxs)(a.li,{children:["\n",(0,i.jsxs)(a.p,{children:[(0,i.jsxs)(a.strong,{children:[(0,i.jsx)(s.A,{network:"polkadot",path:"query.staking.minNominatorBond",defaultValue:25e11,filter:"humanReadable"}),":"]}),"\nthe minimum stake required to submit your intent to directly nominate validators."]}),"\n"]}),"\n",(0,i.jsxs)(a.li,{children:["\n",(0,i.jsxs)(a.p,{children:[(0,i.jsxs)(a.strong,{children:[(0,i.jsx)(s.A,{network:"polkadot",path:"query.staking.minimumActiveStake",defaultValue:2937e9,filter:"humanReadable"}),":"]}),"\nthe minimum amount of DOT required to become an active nominator and earn rewards, i.e. the\nminimum active bond. To increase the chance of earning staking rewards, your stake should not be\nless than the minimum stake among the active nominators, which is a dynamic threshold. If you have\nlesser DOT than the minimum active nomination, please consider contributing to\n",(0,i.jsx)(a.a,{href:"/docs/learn-nomination-pools",children:"nomination pools"}),". Learn more about\n",(0,i.jsx)(a.a,{href:"/docs/learn-nominator",children:"becoming a nominator"}),"."]}),"\n"]}),"\n",(0,i.jsxs)(a.li,{children:["\n",(0,i.jsxs)(a.p,{children:[(0,i.jsxs)(a.strong,{children:[(0,i.jsx)(s.A,{network:"polkadot",path:"query.nominationPools.minCreateBond",defaultValue:5e12,filter:"humanReadable"}),":"]}),"\nyou can create your own ",(0,i.jsx)(a.a,{href:"/docs/learn-nomination-pools",children:"nomination pool"}),"."]}),"\n"]}),"\n"]})}),(0,i.jsx)(a.h4,{id:"active-validator-count",children:"Active Validator Count"}),(0,i.jsxs)(a.p,{children:["The number of Polkadot validators in the active set is ",(0,i.jsx)(s.A,{network:"polkadot",path:"query.staking.validatorCount",defaultValue:297}),"."]}),(0,i.jsx)(a.h4,{id:"block-hash-count",children:"Block Hash Count"}),(0,i.jsxs)(a.p,{children:["On Polkadot, the maximum number of block hashes retained on-chain at any given time is ",(0,i.jsx)(s.A,{network:"polkadot",path:"consts.system.blockHashCount",defaultValue:4096})," (which maps to seven hours given 6-second block times)."]}),(0,i.jsx)(a.h4,{id:"bounty-curator-deposit",children:"Bounty Curator Deposit"}),(0,i.jsxs)(a.p,{children:["On Polkadot, the bounty curator deposit is calculated by multiplying the curator fee by the bounty curator deposit multiplier set to ",(0,i.jsx)(s.A,{network:"polkadot",path:"consts.bounties.curatorDepositMultiplier",defaultValue:5e5,filter:"permillToPercent"}),"%. The deposit can range between a minimum of ",(0,i.jsx)(s.A,{network:"polkadot",path:"consts.bounties.curatorDepositMin",defaultValue:1e11,filter:"humanReadable"})," and a maximum of ",(0,i.jsx)(s.A,{network:"polkadot",path:"consts.bounties.curatorDepositMax",defaultValue:2e12,filter:"humanReadable"}),"."]}),(0,i.jsx)(a.h4,{id:"bounty-deposit",children:"Bounty Deposit"}),(0,i.jsxs)(a.p,{children:["The deposit to submit a bounty on Polkadot is ",(0,i.jsx)(s.A,{network:"polkadot",path:"consts.bounties.bountyDepositBase",defaultValue:1e10,filter:"humanReadable"}),"."]}),(0,i.jsx)(a.h4,{id:"bounty-duration",children:"Bounty Duration"}),(0,i.jsxs)(a.p,{children:["A Polkadot bounty has a predetermined duration of ",(0,i.jsx)(s.A,{network:"polkadot",path:"consts.bounties.bountyUpdatePeriod",defaultValue:1296e3,filter:"blocksToDays"})," days."]}),(0,i.jsx)(a.h4,{id:"conviction-voting-lock-period",children:"Conviction Voting Lock Period"}),(0,i.jsxs)(a.p,{children:["One conviction voting lock period on Polkadot equals ",(0,i.jsx)(s.A,{network:"polkadot",path:"consts.convictionVoting.voteLockingPeriod",defaultValue:100800,filter:"blocksToDays"})," days."]}),(0,i.jsx)(a.h4,{id:"existential-deposit",children:"Existential Deposit"}),(0,i.jsxs)(a.p,{children:["The minimum number of tokens to keep an account alive on the Polkadot relay chain is ",(0,i.jsx)(s.A,{network:"polkadot",path:"consts.balances.existentialDeposit",defaultValue:333e6,filter:"humanReadable"}),"."]}),(0,i.jsx)(a.h4,{id:"inactive-issuance",children:"Inactive Issuance"}),(0,i.jsxs)(a.p,{children:["Polkadot's inactive issuance is ",(0,i.jsx)(s.A,{network:"polkadot",path:"query.balances.inactiveIssuance",defaultValue:"20115636146084858300",filter:"humanReadable"})," in the era ",(0,i.jsx)(s.A,{network:"polkadot",path:"query.staking.currentEra",defaultValue:"1553"}),"."]}),(0,i.jsx)(a.h4,{id:"index-deposit",children:"Index Deposit"}),(0,i.jsxs)(a.p,{children:["The deposit to reserve an index on Polkadot is ",(0,i.jsx)(s.A,{network:"polkadot",path:"consts.indices.deposit",defaultValue:1e11,filter:"humanReadable"}),"."]}),(0,i.jsx)(a.h4,{id:"maximum-number-of-nominators",children:"Maximum Number of Nominators"}),(0,i.jsxs)(a.p,{children:["The maximum number of nominators on Polkadot is uncapped and the current value is ",(0,i.jsx)(s.A,{network:"polkadot",path:"query.staking.counterForNominators",defaultValue:36793}),"."]}),(0,i.jsx)(a.h4,{id:"maximum-number-of-proxies-per-account",children:"Maximum Number of Proxies per Account"}),(0,i.jsxs)(a.p,{children:["The maximum number of proxies per Polkadot account is ",(0,i.jsx)(s.A,{network:"polkadot",path:"consts.proxy.maxProxies",defaultValue:32}),". You can have the same proxy for multiple accounts."]}),(0,i.jsx)(a.h4,{id:"maximum-votes-per-nominator",children:"Maximum Votes per Nominator"}),(0,i.jsxs)(a.p,{children:["A nominator on Polkadot can select up to ",(0,i.jsx)(s.A,{network:"polkadot",path:"consts.electionProviderMultiPhase.minerMaxVotesPerVoter",defaultValue:16})," validators."]}),(0,i.jsx)(a.h4,{id:"minimum-active-bond",children:"Minimum Active Bond"}),(0,i.jsxs)(a.p,{children:["The minimum amount of tokens to nominate on Polkadot is ",(0,i.jsx)(s.A,{network:"polkadot",path:"query.staking.minimumActiveStake",defaultValue:5521439075539,filter:"humanReadable"}),"."]}),(0,i.jsx)(a.h4,{id:"minimum-bond-to-create-a-nomination-pool",children:"Minimum Bond to Create a Nomination Pool"}),(0,i.jsxs)(a.p,{children:["The minimum bond to create a Polkadot nomination pool is ",(0,i.jsx)(s.A,{network:"polkadot",path:"query.nominationPools.minCreateBond",defaultValue:5e12,filter:"humanReadable"}),"."]}),(0,i.jsx)(a.h4,{id:"minimum-bond-to-join-a-nomination-pool",children:"Minimum Bond to Join a Nomination Pool"}),(0,i.jsxs)(a.p,{children:["The minimum bond to join a Polkadot nomination pool is ",(0,i.jsx)(s.A,{network:"polkadot",path:"query.nominationPools.minJoinBond",defaultValue:1e10,filter:"humanReadable"}),"."]}),(0,i.jsx)(a.h4,{id:"minimum-bond-to-participate-in-staking",children:"Minimum Bond to Participate in Staking"}),(0,i.jsxs)(a.p,{children:["The minimum bond to nominate on Polkadot is ",(0,i.jsx)(s.A,{network:"polkadot",path:"query.staking.minNominatorBond",defaultValue:25e11,filter:"humanReadable"})," while the minimum amount to join a pool is ",(0,i.jsx)(s.A,{network:"polkadot",path:"query.nominationPools.minJoinBond",defaultValue:1e10,filter:"humanReadable"}),"."]}),(0,i.jsx)(a.h4,{id:"minimum-crowdloan-contribution",children:"Minimum Crowdloan contribution"}),(0,i.jsxs)(a.p,{children:["The minimum amount to participate to a Polkadot crowdloan is ",(0,i.jsx)(s.A,{network:"polkadot",path:"consts.crowdloan.minContribution",defaultValue:5e10,filter:"humanReadable"}),"."]}),(0,i.jsx)(a.h4,{id:"minimum-validator-bond",children:"Minimum Validator Bond"}),(0,i.jsxs)(a.p,{children:["To start a validator instance on Polkadot, the\nminimum bond required is ",(0,i.jsx)(s.A,{network:"polkadot",path:"query.staking.minValidatorBond",defaultValue:"0",filter:"humanReadable"}),"."]}),(0,i.jsx)(a.h4,{id:"minimum-validator-commission",children:"Minimum Validator Commission"}),(0,i.jsxs)(a.p,{children:["The minimum commission a Polkadot Validator can set is ",(0,i.jsx)(s.A,{network:"polkadot",path:"query.staking.minCommission",filter:"percentage",defaultValue:"0"}),"%. ",(0,i.jsx)(a.a,{href:"/docs/maintain-guides-how-to-validate-polkadot#how-many-dot-do-i-need-to-become-an-active-validator",children:"This does not guarantee entry into the active set and earning rewards"}),"."]}),(0,i.jsx)(a.h4,{id:"multisig-deposit-base",children:"Multisig Deposit Base"}),(0,i.jsxs)(a.p,{children:["The multisig deposit base on Polkadot is ",(0,i.jsx)(s.A,{network:"polkadot",path:"consts.multisig.depositBase",defaultValue:20088e7,filter:"humanReadable"}),"."]}),(0,i.jsx)(a.h4,{id:"multisig-deposit-factor",children:"Multisig Deposit Factor"}),(0,i.jsxs)(a.p,{children:["The multisig deposit factor on Polkadot is ",(0,i.jsx)(s.A,{network:"polkadot",path:"consts.multisig.depositFactor",defaultValue:32e7,filter:"humanReadable"}),"."]}),(0,i.jsx)(a.h4,{id:"nomination-pool-max-commission",children:"Nomination Pool Max Commission"}),(0,i.jsxs)(a.p,{children:["The maximum commission that can be set for a Polkadot nomination pool is ",(0,i.jsx)(s.A,{network:"polkadot",path:"query.nominationPools.globalMaxCommission",defaultValue:1e8,filter:"percentage"}),"%."]}),(0,i.jsx)(a.h4,{id:"nomination-pool-members",children:"Nomination Pool Members"}),(0,i.jsxs)(a.p,{children:["There are currently ",(0,i.jsx)(s.A,{network:"polkadot",path:"query.nominationPools.counterForPoolMembers",defaultValue:46378})," members in ",(0,i.jsx)(s.A,{network:"polkadot",path:"query.nominationPools.lastPoolId",defaultValue:285})," Polkadot nomination pools. There is no limit to the number of pools or pool members per pool."]}),(0,i.jsx)(a.h4,{id:"opengov-referendum-timeout",children:"OpenGov Referendum Timeout"}),(0,i.jsxs)(a.p,{children:["A Polkadot referendum is timeout for not submitting the Decision Deposit within ",(0,i.jsx)(s.A,{network:"polkadot",path:"const.referenda.undecidingTimeout",defaultValue:201600,filter:"blocksToDays"})," days since its creation."]}),(0,i.jsx)(a.h4,{id:"opengov-submission-deposit",children:"OpenGov Submission Deposit"}),(0,i.jsxs)(a.p,{children:["A deposit of ",(0,i.jsx)(s.A,{network:"polkadot",path:"consts.referenda.submissionDeposit",defaultValue:1e10,filter:"humanReadable"})," is needed to submit a referendum on Polkadot."]}),(0,i.jsx)(a.h4,{id:"parachain-id-registration-deposit",children:"Parachain ID Registration Deposit"}),(0,i.jsxs)(a.p,{children:["Reserving a ",(0,i.jsx)(a.code,{children:"ParaID"})," on Polkadot requires a deposit of ",(0,i.jsx)(s.A,{network:"polkadot",path:"consts.registrar.paraDeposit",defaultValue:1e12,filter:"humanReadable"}),"."]}),(0,i.jsx)(a.h4,{id:"parachain-genesis-state-registration-deposit",children:"Parachain Genesis State Registration Deposit"}),(0,i.jsxs)(a.p,{children:["Registering the genesis state and WASM code of a Polkadot parachain requires a deposit ",(0,i.jsx)(s.A,{network:"polkadot",path:"consts.registrar.dataDepositPerByte",defaultValue:1e7,filter:"humanReadable"})," per byte."]}),(0,i.jsx)(a.h4,{id:"proxy-deposits",children:"Proxy Deposits"}),(0,i.jsxs)(a.p,{children:["The creation of proxies on Polkadot requires a ",(0,i.jsx)(a.strong,{children:"proxy deposit base"})," of ",(0,i.jsx)(s.A,{network:"polkadot",path:"consts.proxy.proxyDepositBase",defaultValue:20008e7,filter:"humanReadable"})," and a ",(0,i.jsx)(a.strong,{children:"proxy deposit factor"})," of ",(0,i.jsx)(s.A,{network:"polkadot",path:"consts.proxy.proxyDepositFactor",defaultValue:33e7,filter:"humanReadable"})," that is multiplied by the number of proxies under the same proxied account."]}),(0,i.jsxs)(a.p,{children:["In case of time-delayed proxies, there is an ",(0,i.jsx)(a.strong,{children:"announcement deposit base"})," of ",(0,i.jsx)(s.A,{network:"polkadot",path:"consts.proxy.announcementDepositBase",defaultValue:20008e7,filter:"humanReadable"})," for announcing a call and an ",(0,i.jsx)(a.strong,{children:"announcement deposit factor"})," of ",(0,i.jsx)(s.A,{network:"polkadot",path:"consts.proxy.announcementDepositFactor",defaultValue:66e7,filter:"humanReadable"})," for each proxy call."]}),(0,i.jsx)(a.h4,{id:"staking-miner-deposit-and-reward",children:"Staking Miner Deposit and Reward"}),(0,i.jsxs)(a.p,{children:["Staking miners on Polkadot are required to reserve a deposit to submit their solutions. The the deposit is the sum of a ",(0,i.jsx)(a.strong,{children:"signed deposit base"})," of ",(0,i.jsx)(s.A,{network:"polkadot",path:"consts.electionProviderMultiPhase.signedDepositBase",defaultValue:4e11,filter:"humanReadable"}),", a ",(0,i.jsx)(a.strong,{children:"signed deposit per byte"})," of ",(0,i.jsx)(s.A,{network:"polkadot",path:"consts.electionProviderMultiPhase.signedDepositByte",defaultValue:97656,filter:"precise"})," (a solution weighing 200KB would yield 200 x 0.0000097656 = 0.00195312 DOT), and a ",(0,i.jsx)(a.strong,{children:"signed deposit weight"})," set to 0."]}),(0,i.jsxs)(a.p,{children:["The ",(0,i.jsx)(a.strong,{children:"signed reward base"})," on Polkadot is ",(0,i.jsx)(s.A,{network:"polkadot",path:"consts.electionProviderMultiPhase.signedRewardBase",defaultValue:1e10,filter:"humanReadable"})," which is a fixed amount."]}),(0,i.jsx)(a.h4,{id:"staking-miner-max-submissions",children:"Staking Miner Max Submissions"}),(0,i.jsxs)(a.p,{children:["The maximum number of submission for a staking miner on Polkadot is ",(0,i.jsx)(s.A,{network:"polkadot",path:"consts.electionProviderMultiPhase.signedMaxSubmissions",defaultValue:16}),"."]}),(0,i.jsx)(a.h4,{id:"staking-reward-retention",children:"Staking Reward Retention"}),(0,i.jsx)(a.p,{children:"Polkadot staking rewards are kept available for 84 eras. The following calculation can be used to\napproximate this length in days:"}),(0,i.jsxs)(a.p,{children:[(0,i.jsx)(a.code,{children:"84 eras"})," \xd7 ",(0,i.jsx)(a.code,{children:"24 hours in a single era"})," \xf7 ",(0,i.jsx)(a.code,{children:"24 hours in a day"})," = ",(0,i.jsx)(a.code,{children:"84 days"})]}),(0,i.jsx)(a.h4,{id:"total-issuance",children:"Total Issuance"}),(0,i.jsxs)(a.p,{children:["Polkadot's total issuance is ",(0,i.jsx)(s.A,{network:"polkadot",path:"query.balances.totalIssuance",defaultValue:"14883815224560918110",filter:"humanReadable"})," in the era ",(0,i.jsx)(s.A,{network:"polkadot",path:"query.staking.currentEra",defaultValue:"1553"}),"."]}),(0,i.jsx)(a.h4,{id:"treasury-burn-factor",children:"Treasury Burn Factor"}),(0,i.jsxs)(a.p,{children:["At the end of every spending period on Polkadot, ",(0,i.jsx)(s.A,{network:"polkadot",path:"consts.treasury.burn",defaultValue:1e4,filter:"permillToPercent"}),"% of the available funds are burned."]}),(0,i.jsx)(a.h4,{id:"treasury-spending-period",children:"Treasury Spending Period"}),(0,i.jsxs)(a.p,{children:["The spending period on Polkadot is currently ",(0,i.jsx)(s.A,{network:"polkadot",path:"consts.treasury.spendPeriod",defaultValue:345600,filter:"blocksToDays"})," days."]}),(0,i.jsx)(a.h4,{id:"unbonding-duration",children:"Unbonding Duration"}),(0,i.jsxs)(a.p,{children:["The unbonding duration on Polkadot is set to ",(0,i.jsx)(s.A,{network:"polkadot",path:"consts.staking.bondingDuration",defaultValue:28,filter:"erasToDays"})," days. This is\ncalculated by taking the ",(0,i.jsx)(a.strong,{children:"bonding duration"})," (in eras), multiplying it by the ",(0,i.jsx)(a.strong,{children:"length of a single\nera"})," (in hours), and dividing by the ",(0,i.jsx)(a.strong,{children:"hours in a day"})," (24). Example: 28 \xd7 24 \xf7 24 = 28 days."]})]}),(0,i.jsxs)(l.A,{value:"kusama",children:[(0,i.jsx)(a.admonition,{title:"What to do with KSM",type:"info",children:(0,i.jsxs)(a.ul,{children:["\n",(0,i.jsxs)(a.li,{children:["\n",(0,i.jsxs)(a.p,{children:[(0,i.jsxs)(a.strong,{children:[(0,i.jsx)(s.A,{network:"kusama",path:"consts.balances.existentialDeposit",defaultValue:333333333,filter:"humanReadable"}),":"]}),"\nthe minimum balance required to have an active account on Kusama Network. If your account balance\ndrops below the minimum, your account will be reaped. Learn more about\n",(0,i.jsx)(a.a,{href:"/docs/learn-accounts",children:"Accounts"})," and the\n",(0,i.jsx)(a.a,{href:"/docs/learn-accounts#existential-deposit-and-reaping",children:"Existential Deposit"})," requirement."]}),"\n"]}),"\n",(0,i.jsxs)(a.li,{children:["\n",(0,i.jsxs)(a.p,{children:[(0,i.jsxs)(a.strong,{children:[(0,i.jsx)(s.A,{network:"kusama",path:"query.nominationPools.minJoinBond",defaultValue:1666666650,filter:"humanReadable"}),":"]}),"\nthe minimum contribution required to join a\n",(0,i.jsx)(a.a,{href:"/docs/learn-nomination-pools",children:"nomination pool"})," and earn staking rewards for contributing\nto the security of the network. Learn more about\n",(0,i.jsx)(a.a,{href:"/docs/learn-nomination-pools",children:"nomination pools"}),"."]}),"\n"]}),"\n",(0,i.jsxs)(a.li,{children:["\n",(0,i.jsxs)(a.p,{children:[(0,i.jsxs)(a.strong,{children:[(0,i.jsx)(s.A,{network:"kusamapeople",path:"consts.identity.basicDeposit",defaultValue:6672333321,filter:"humanReadable"}),":"]}),"\nregister an ",(0,i.jsx)(a.a,{href:"/docs/learn-identity",children:"on-chain identity"})]}),"\n"]}),"\n",(0,i.jsxs)(a.li,{children:["\n",(0,i.jsxs)(a.p,{children:[(0,i.jsxs)(a.strong,{children:[(0,i.jsx)(s.A,{network:"kusama",path:"consts.proxy.proxyDepositBase",defaultValue:666933332400,filter:"humanReadable"}),":"]}),"\ncreate a ",(0,i.jsx)(a.a,{href:"/docs/learn-proxies",children:"proxy account"}),"."]}),"\n"]}),"\n",(0,i.jsxs)(a.li,{children:["\n",(0,i.jsxs)(a.p,{children:[(0,i.jsxs)(a.strong,{children:[(0,i.jsx)(s.A,{network:"kusama",path:"query.nominationPools.minCreateBond",defaultValue:1e12,filter:"humanReadable"}),":"]}),"\nyou can create your own ",(0,i.jsx)(a.a,{href:"/docs/learn-nomination-pools",children:"nomination pool"}),"."]}),"\n"]}),"\n",(0,i.jsxs)(a.li,{children:["\n",(0,i.jsxs)(a.p,{children:[(0,i.jsxs)(a.strong,{children:[(0,i.jsx)(s.A,{network:"kusama",path:"query.staking.minimumActiveStake",defaultValue:0,filter:"humanReadable"}),":"]}),"\nthe minimum amount of KSM required to become an active nominator and earn rewards."]}),"\n"]}),"\n"]})}),(0,i.jsx)(a.h4,{id:"active-validator-count-1",children:"Active Validator Count"}),(0,i.jsxs)(a.p,{children:["The number of Kusama validators in the active set is ",(0,i.jsx)(s.A,{network:"kusama",path:"query.staking.validatorCount",defaultValue:297}),"."]}),(0,i.jsx)(a.h4,{id:"block-hash-count-1",children:"Block Hash Count"}),(0,i.jsxs)(a.p,{children:["On Kusama, the maximum block number to block hash mappings to keep is ",(0,i.jsx)(s.A,{network:"kusama",path:"consts.system.blockHashCount",defaultValue:4096})," (which maps to seven hours given 6-second block times)."]}),(0,i.jsx)(a.h4,{id:"bounty-curator-deposit-1",children:"Bounty Curator Deposit"}),(0,i.jsxs)(a.p,{children:["On Kusama, the bounty curator deposit is calculated by multiplying the curator fee by the bounty curator deposit multiplier set to ",(0,i.jsx)(s.A,{network:"kusama",path:"consts.bounties.curatorDepositMultiplier",defaultValue:5e5,filter:"permillToPercent"}),"%. The deposit can range between a minimum of ",(0,i.jsx)(s.A,{network:"kusama",path:"consts.bounties.curatorDepositMin",defaultValue:3333333330,filter:"humanReadable"})," and a maximum of ",(0,i.jsx)(s.A,{network:"kusama",path:"consts.bounties.curatorDepositMax",defaultValue:166666666500,filter:"humanReadable"}),"."]}),(0,i.jsx)(a.h4,{id:"bounty-deposit-1",children:"Bounty Deposit"}),(0,i.jsxs)(a.p,{children:["The deposit to submit a bounty on Kusama is ",(0,i.jsx)(s.A,{network:"kusama",path:"consts.bounties.bountyDepositBase",defaultValue:33333333300,filter:"humanReadable"}),"."]}),(0,i.jsx)(a.h4,{id:"bounty-duration-1",children:"Bounty Duration"}),(0,i.jsxs)(a.p,{children:["A Kusama bounty has a predetermined duration of ",(0,i.jsx)(s.A,{network:"kusama",path:"consts.bounties.bountyUpdatePeriod",defaultValue:1296e3,filter:"blocksToDays"})," days."]}),(0,i.jsx)(a.h4,{id:"conviction-voting-lock-period-1",children:"Conviction Voting Lock Period"}),(0,i.jsxs)(a.p,{children:["One conviction voting lock period on Kusama equals ",(0,i.jsx)(s.A,{network:"kusama",path:"consts.convictionVoting.voteLockingPeriod",defaultValue:100800,filter:"blocksToDays"})," days."]}),(0,i.jsx)(a.h4,{id:"existential-deposit-1",children:"Existential Deposit"}),(0,i.jsxs)(a.p,{children:["The minimum number of tokens to keep an account alive on the Kusama relay chain is ",(0,i.jsx)(s.A,{network:"kusama",path:"consts.balances.existentialDeposit",defaultValue:333e6,filter:"humanReadable"}),"."]}),(0,i.jsx)(a.h4,{id:"inactive-issuance-1",children:"Inactive Issuance"}),(0,i.jsxs)(a.p,{children:["Kusama's inactive issuance is ",(0,i.jsx)(s.A,{network:"kusama",path:"query.balances.inactiveIssuance",defaultValue:"288091772937830827",filter:"humanReadable"})," in the era ",(0,i.jsx)(s.A,{network:"kusama",path:"query.staking.currentEra",defaultValue:"7061"}),"."]}),(0,i.jsx)(a.h4,{id:"index-deposit-1",children:"Index Deposit"}),(0,i.jsxs)(a.p,{children:["The deposit to reserve an index on Kusama is ",(0,i.jsx)(s.A,{network:"kusama",path:"consts.indices.deposit",defaultValue:1e11,filter:"humanReadable"}),"."]}),(0,i.jsx)(a.h4,{id:"maximum-number-of-nominators-1",children:"Maximum Number of Nominators"}),(0,i.jsxs)(a.p,{children:["The maximum number of nominators on Kusama is capped at ",(0,i.jsx)(s.A,{network:"kusama",path:"query.staking.maxNominatorsCount",defaultValue:2e4})," and currently sits at ",(0,i.jsx)(s.A,{network:"kusama",path:"query.staking.counterForNominators",defaultValue:15560}),"."]}),(0,i.jsx)(a.h4,{id:"maximum-number-of-proxies-per-account-1",children:"Maximum Number of Proxies per Account"}),(0,i.jsxs)(a.p,{children:["The maximum number of proxies per Kusama account is ",(0,i.jsx)(s.A,{network:"kusama",path:"consts.proxy.maxProxies",defaultValue:32}),". You can have the same proxy for multiple accounts."]}),(0,i.jsx)(a.h4,{id:"maximum-votes-per-nominator-1",children:"Maximum Votes per Nominator"}),(0,i.jsxs)(a.p,{children:["A nominator on Kusama can select up to ",(0,i.jsx)(s.A,{network:"kusama",path:"consts.electionProviderMultiPhase.minerMaxVotesPerVoter",defaultValue:24})," validators."]}),(0,i.jsx)(a.h4,{id:"minimum-active-bond-1",children:"Minimum Active Bond"}),(0,i.jsxs)(a.p,{children:["The minimum amount of tokens to nominate on Kusama is ",(0,i.jsx)(s.A,{network:"kusama",path:"query.staking.minimumActiveStake",defaultValue:2937e9,filter:"humanReadable"}),"."]}),(0,i.jsx)(a.h4,{id:"minimum-bond-to-create-a-nomination-pool-1",children:"Minimum Bond to Create a Nomination Pool"}),(0,i.jsxs)(a.p,{children:["The minimum bond to create a Kusama nomination pool is ",(0,i.jsx)(s.A,{network:"kusama",path:"query.nominationPools.minCreateBond",defaultValue:1e12,filter:"humanReadable"}),"."]}),(0,i.jsx)(a.h4,{id:"minimum-bond-to-join-a-nomination-pool-1",children:"Minimum Bond to Join a Nomination Pool"}),(0,i.jsxs)(a.p,{children:["The minimum bond to join a Kusama nomination pool is ",(0,i.jsx)(s.A,{network:"kusama",path:"query.nominationPools.minJoinBond",defaultValue:1e10,filter:"humanReadable"}),"."]}),(0,i.jsx)(a.h4,{id:"minimum-bond-to-participate-in-staking-1",children:"Minimum Bond to Participate in Staking"}),(0,i.jsxs)(a.p,{children:["The minimum bond to nominate on Kusama is ",(0,i.jsx)(s.A,{network:"kusama",path:"query.staking.minNominatorBond",defaultValue:1e11,filter:"humanReadable"})," while the minimum amount to join a pool is ",(0,i.jsx)(s.A,{network:"kusama",path:"query.nominationPools.minJoinBond",defaultValue:1667e6,filter:"humanReadable"}),"."]}),(0,i.jsx)(a.h4,{id:"minimum-crowdloan-contribution-1",children:"Minimum Crowdloan contribution"}),(0,i.jsxs)(a.p,{children:["The minimum amount to participate to a Kusama crowdloan is ",(0,i.jsx)(s.A,{network:"kusama",path:"consts.crowdloan.minContribution",defaultValue:1e11,filter:"humanReadable"}),"."]}),(0,i.jsx)(a.h4,{id:"minimum-validator-bond-1",children:"Minimum Validator Bond"}),(0,i.jsxs)(a.p,{children:["To start a validator instance on Kusama, the\nminimum bond required is ",(0,i.jsx)(s.A,{network:"kusama",path:"query.staking.minValidatorBond",defaultValue:"0",filter:"humanReadable"}),"."]}),(0,i.jsx)(a.h4,{id:"minimum-validator-commission-1",children:"Minimum Validator Commission"}),(0,i.jsxs)(a.p,{children:["The minimum commission a Kusama Validator can set is ",(0,i.jsx)(s.A,{network:"kusama",path:"query.staking.minCommission",filter:"percentage",defaultValue:"10"}),"%."]}),(0,i.jsx)(a.h4,{id:"multisig-deposit-base-1",children:"Multisig Deposit Base"}),(0,i.jsxs)(a.p,{children:["The multisig deposit base on Kusama is ",(0,i.jsx)(s.A,{network:"kusama",path:"consts.multisig.depositBase",defaultValue:669599996400,filter:"humanReadable"}),"."]}),(0,i.jsx)(a.h4,{id:"multisig-deposit-factor-1",children:"Multisig Deposit Factor"}),(0,i.jsxs)(a.p,{children:["The multisig deposit factor on Kusama is ",(0,i.jsx)(s.A,{network:"kusama",path:"consts.multisig.depositFactor",defaultValue:1066665600,filter:"humanReadable"}),"."]}),(0,i.jsx)(a.h4,{id:"nomination-pool-max-commission-1",children:"Nomination Pool Max Commission"}),(0,i.jsxs)(a.p,{children:["The maximum commission that can be set for a Kusama nomination pool is ",(0,i.jsx)(s.A,{network:"kusama",path:"query.nominationPools.globalMaxCommission",defaultValue:1e8,filter:"percentage"}),"%."]}),(0,i.jsx)(a.h4,{id:"nomination-pool-members-1",children:"Nomination Pool Members"}),(0,i.jsxs)(a.p,{children:["There are currently ",(0,i.jsx)(s.A,{network:"kusama",path:"query.nominationPools.counterForPoolMembers",defaultValue:3442})," members in ",(0,i.jsx)(s.A,{network:"kusama",path:"query.nominationPools.lastPoolId",defaultValue:202})," Kusama nomination pools. There is no limit to the number of pools or pool members per pool."]}),(0,i.jsx)(a.h4,{id:"opengov-referendum-timeout-1",children:"OpenGov Referendum Timeout"}),(0,i.jsxs)(a.p,{children:["A Kusama referendum is timeout for not submitting the Decision Deposit within ",(0,i.jsx)(s.A,{network:"kusama",path:"const.referenda.undecidingTimeout",defaultValue:201600,filter:"blocksToDays"})," days since its creation."]}),(0,i.jsx)(a.h4,{id:"opengov-submission-deposit-1",children:"OpenGov Submission Deposit"}),(0,i.jsxs)(a.p,{children:["A deposit of ",(0,i.jsx)(s.A,{network:"kusama",path:"consts.referenda.submissionDeposit",defaultValue:33333333333,filter:"humanReadable"})," is needed to submit a referendum on Kusama."]}),(0,i.jsx)(a.h4,{id:"parachain-id-registration-deposit-1",children:"Parachain ID Registration Deposit"}),(0,i.jsxs)(a.p,{children:["Reserving a ",(0,i.jsx)(a.code,{children:"ParaID"})," on Kusama requires a deposit of ",(0,i.jsx)(s.A,{network:"kusama",path:"consts.registrar.paraDeposit",defaultValue:4e13,filter:"humanReadable"}),"."]}),(0,i.jsx)(a.h4,{id:"parachain-genesis-state-registration-deposit-1",children:"Parachain Genesis State Registration Deposit"}),(0,i.jsxs)(a.p,{children:["Registering the genesis state and WASM code of a Kusama parachain requires a deposit ",(0,i.jsx)(s.A,{network:"kusama",path:"consts.registrar.dataDepositPerByte",defaultValue:333333333,filter:"humanReadable"})," per byte."]}),(0,i.jsx)(a.h4,{id:"proxy-deposits-1",children:"Proxy Deposits"}),(0,i.jsxs)(a.p,{children:["The creation of proxies on Kusama requires a ",(0,i.jsx)(a.strong,{children:"proxy deposit base"})," of ",(0,i.jsx)(s.A,{network:"kusama",path:"consts.proxy.proxyDepositBase",defaultValue:666933332400,filter:"humanReadable"})," and a ",(0,i.jsx)(a.strong,{children:"proxy deposit factor"})," of ",(0,i.jsx)(s.A,{network:"kusama",path:"consts.proxy.proxyDepositFactor",defaultValue:1099998900,filter:"humanReadable"})," that is multiplied by the number of proxies under the same proxied account."]}),(0,i.jsxs)(a.p,{children:["In case of time-delayed proxies, there is an ",(0,i.jsx)(a.strong,{children:"announcement deposit base"})," of ",(0,i.jsx)(s.A,{network:"kusama",path:"consts.proxy.announcementDepositBase",defaultValue:666933332400,filter:"humanReadable"})," for announcing a call and an ",(0,i.jsx)(a.strong,{children:"announcement deposit factor"})," of ",(0,i.jsx)(s.A,{network:"kusama",path:"consts.proxy.announcementDepositFactor",defaultValue:2199997800,filter:"humanReadable"})," for each proxy call."]}),(0,i.jsx)(a.h4,{id:"staking-miner-deposit-and-reward-1",children:"Staking Miner Deposit and Reward"}),(0,i.jsxs)(a.p,{children:["Staking miners on Kusama are required to reserve a deposit to submit their solutions. The the deposit is the sum of a ",(0,i.jsx)(a.strong,{children:"signed deposit base"})," of ",(0,i.jsx)(s.A,{network:"kusama",path:"consts.electionProviderMultiPhase.signedDepositBase",defaultValue:133333332e3,filter:"humanReadable"}),", a ",(0,i.jsx)(a.strong,{children:"signed deposit per byte"})," of ",(0,i.jsx)(s.A,{network:"kusama",path:"consts.electionProviderMultiPhase.signedDepositByte",defaultValue:32551,filter:"precise"})," (a solution weighing 200KB would yield 200 x 0.00000032551 = 0.000065102 KSM), and a ",(0,i.jsx)(a.strong,{children:"signed deposit weight"})," set to 0 and has no effect."]}),(0,i.jsxs)(a.p,{children:["The ",(0,i.jsx)(a.strong,{children:"signed reward base"})," on Kusama is ",(0,i.jsx)(s.A,{network:"kusama",path:"consts.electionProviderMultiPhase.signedRewardBase",defaultValue:1e11,filter:"humanReadable"})," which is a fixed amount."]}),(0,i.jsx)(a.h4,{id:"staking-miner-max-submissions-1",children:"Staking Miner Max Submissions"}),(0,i.jsxs)(a.p,{children:["The maximum number of submission for a staking miner on Kusama is ",(0,i.jsx)(s.A,{network:"kusama",path:"consts.electionProviderMultiPhase.signedMaxSubmissions",defaultValue:16}),"."]}),(0,i.jsx)(a.h4,{id:"staking-reward-retention-1",children:"Staking Reward Retention"}),(0,i.jsx)(a.p,{children:"Kusama staking rewards are kept available for 84 eras. The following calculation can be used to\napproximate this length in days:"}),(0,i.jsxs)(a.p,{children:[(0,i.jsx)(a.code,{children:"84 eras"})," \xd7 ",(0,i.jsx)(a.code,{children:"6 hours in a single era"})," \xf7 ",(0,i.jsx)(a.code,{children:"24 hours in a day"})," = ",(0,i.jsx)(a.code,{children:"21 days"})]}),(0,i.jsx)(a.h4,{id:"total-issuance-1",children:"Total Issuance"}),(0,i.jsxs)(a.p,{children:["Kusama's total issuance is ",(0,i.jsx)(s.A,{network:"kusama",path:"query.balances.totalIssuance",defaultValue:"15410382600026732448",filter:"humanReadable"})," in the era ",(0,i.jsx)(s.A,{network:"kusama",path:"query.staking.currentEra",defaultValue:"7061"}),"."]}),(0,i.jsx)(a.h4,{id:"treasury-burn-factor-1",children:"Treasury Burn Factor"}),(0,i.jsxs)(a.p,{children:["At the end of every spending period on Kusama, ",(0,i.jsx)(s.A,{network:"kusama",path:"consts.treasury.burn",defaultValue:2e3,filter:"permillToPercent"}),"% of the available funds are burned, with the amount currently going to ",(0,i.jsx)(a.a,{href:"/docs/maintain-guides-society-kusama",children:"Society"})," rather than being burned."]}),(0,i.jsx)(a.h4,{id:"treasury-spending-period-1",children:"Treasury Spending Period"}),(0,i.jsxs)(a.p,{children:["The spending period on Kusama is currently ",(0,i.jsx)(s.A,{network:"kusama",path:"consts.treasury.spendPeriod",defaultValue:86400,filter:"blocksToDays"})," days."]}),(0,i.jsx)(a.h4,{id:"unbonding-duration-1",children:"Unbonding Duration"}),(0,i.jsxs)(a.p,{children:["The unbonding duration on Kusama is set to ",(0,i.jsx)(s.A,{network:"kusama",path:"consts.staking.bondingDuration",defaultValue:28,filter:"erasToDays"})," days. This is\ncalculated by taking the ",(0,i.jsx)(a.strong,{children:"bonding duration"})," (in eras), multiplying it by the ",(0,i.jsx)(a.strong,{children:"length of a single\nera"})," (in hours), and dividing by the ",(0,i.jsx)(a.strong,{children:"hours in a day"})," (24). Example: 28 \xd7 6 \xf7 24 = 7 days."]})]}),(0,i.jsxs)(l.A,{value:"ahp",children:[(0,i.jsx)(a.h4,{id:"asset-deposit",children:"Asset Deposit"}),(0,i.jsxs)(a.p,{children:["To reserve an asset on the Polkadot Asset Hub you need a deposit of ",(0,i.jsx)(s.A,{network:"statemint",path:"consts.assets.assetDeposit",defaultValue:1e11,filter:"humanReadable"})," and ",(0,i.jsx)(s.A,{network:"statemint",path:"consts.assets.metadataDepositBase",defaultValue:668933304,filter:"humanReadable"})," for the asset metadata."]}),(0,i.jsx)(a.h4,{id:"existential-deposit-2",children:"Existential Deposit"}),(0,i.jsxs)(a.p,{children:["The minimum number of tokens to keep an account alive on the Polkadot Asset Hub is ",(0,i.jsx)(s.A,{network:"statemint",path:"consts.balances.existentialDeposit",defaultValue:1e8,filter:"humanReadable"}),"."]})]}),(0,i.jsxs)(l.A,{value:"ahk",children:[(0,i.jsx)(a.h4,{id:"asset-deposit-1",children:"Asset Deposit"}),(0,i.jsxs)(a.p,{children:["To reserve an asset on the Kusama Asset Hub you need a deposit of ",(0,i.jsx)(s.A,{network:"statemine",path:"consts.assets.assetDeposit",defaultValue:1e11,filter:"humanReadable"})," and ",(0,i.jsx)(s.A,{network:"statemine",path:"consts.assets.metadataDepositBase",defaultValue:668933304,filter:"humanReadable"})," for the asset metadata."]}),(0,i.jsx)(a.h4,{id:"existential-deposit-3",children:"Existential Deposit"}),(0,i.jsxs)(a.p,{children:["The minimum number of tokens to keep an account alive on the Kusama Asset Hub is ",(0,i.jsx)(s.A,{network:"statemine",path:"consts.balances.existentialDeposit",defaultValue:1e9,filter:"humanReadable"}),"."]})]}),(0,i.jsxs)(l.A,{value:"pp",children:[(0,i.jsx)(a.h4,{id:"identity-deposit",children:"Identity Deposit"}),(0,i.jsxs)(a.p,{children:["The creation of a Polkadot identity required a deposit of ",(0,i.jsx)(s.A,{network:"polkadotpeople",path:"consts.identity.basicDeposit",defaultValue:20017e5,filter:"humanReadable"})," and ",(0,i.jsx)(s.A,{network:"polkadotpeople",path:"consts.identity.byteDeposit",defaultValue:1e5,filter:"humanReadable"})," (per byte) per each field beyond the legal name."]}),(0,i.jsx)(a.h4,{id:"sub-identity-deposit",children:"Sub-identity Deposit"}),(0,i.jsxs)(a.p,{children:["The creation of a Polkadot sub-identity required a deposit of ",(0,i.jsx)(s.A,{network:"polkadotpeople",path:"consts.identity.subAccountDeposit",defaultValue:20053e5,filter:"humanReadable"}),"."]})]}),(0,i.jsxs)(l.A,{value:"kp",children:[(0,i.jsx)(a.h4,{id:"identity-deposit-1",children:"Identity Deposit"}),(0,i.jsxs)(a.p,{children:["The creation of a Kusama identity required a deposit of ",(0,i.jsx)(s.A,{network:"kusamapeople",path:"consts.identity.basicDeposit",defaultValue:6672333321,filter:"humanReadable"})," and ",(0,i.jsx)(s.A,{network:"kusamapeople",path:"consts.identity.byteDeposit",defaultValue:333333,filter:"humanReadable"})," (per byte) per each field beyond the legal name."]}),(0,i.jsx)(a.h4,{id:"sub-identity-deposit-1",children:"Sub-identity Deposit"}),(0,i.jsxs)(a.p,{children:["The creation of a Kusama sub-identity required a deposit of ",(0,i.jsx)(s.A,{network:"kusamapeople",path:"consts.identity.subAccountDeposit",defaultValue:6684333309,filter:"humanReadable"}),"."]})]})]})}function h(e={}){const{wrapper:a}={...(0,o.R)(),...e.components};return a?(0,i.jsx)(a,{...e,children:(0,i.jsx)(p,{...e})}):p(e)}},47379:(e,a,t)=>{"use strict";t.d(a,{A:()=>m});var n=t(90675),i=t(10467),o=t(96540),s=t(19588),r=t(2026),l=t(11135);function u(e,a,t){return d.apply(this,arguments)}function d(){return(d=(0,i.A)((0,n.A)().mark((function e(a,t,i){var o,l,u,d,c;return(0,n.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=void 0,l=void 0,e.t0=a,e.next="polkadot"===e.t0?5:"kusama"===e.t0?7:"statemine"===e.t0?9:"statemint"===e.t0?11:"polkadotpeople"===e.t0?13:"kusamapeople"===e.t0?15:17;break;case 5:return o="wss://rpc.polkadot.io",e.abrupt("break",18);case 7:return o="wss://kusama-rpc.polkadot.io/",e.abrupt("break",18);case 9:return o="wss://statemine-rpc.polkadot.io/",e.abrupt("break",18);case 11:return o="wss://statemint-rpc.polkadot.io/",e.abrupt("break",18);case 13:return o="wss://polkadot-people-rpc.polkadot.io/",e.abrupt("break",18);case 15:return o="wss://kusama-people-rpc.polkadot.io/",e.abrupt("break",18);case 17:console.log("Unknown socket url provided, no connection made.");case 18:if(void 0!==o){e.next=22;break}return e.abrupt("return");case 22:return u=new s.E(o),e.next=25,r.G.create({provider:u});case 25:d=e.sent,(c=t.split(".")).forEach((function(e){e in d&&(d=d[e])})),e.t1=c[0],e.next="consts"===e.t1?31:"query"===e.t1?33:38;break;case 31:return l=d.toString(),e.abrupt("break",39);case 33:return e.next=35,d();case 35:return l=(l=e.sent).toString(),e.abrupt("break",39);case 38:console.log("Unknown path prefix ("+c[0]+") in "+t);case 39:return e.abrupt("return",l);case 40:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function c(e,a,t,n){switch(a){case"humanReadable":(0,l.HumanReadable)(e,t,n);break;case"precise":(0,l.Precise)(e,t,n);break;case"blocksToDays":(0,l.BlocksToDays)(e,n);break;case"erasToDays":(0,l.ErasToDays)(e,n,t);break;case"percentage":(0,l.Percentage)(e,n);break;case"permillToPercent":(0,l.PermillToPercent)(e,n);break;case"arrayLength":(0,l.ArrayLength)(e,n);break;default:return void console.log("Ignoring unknown filter type")}}const m=function(e){var a=e.network,t=e.path,s=e.defaultValue,r=e.filter,l=void 0===r?void 0:r,d=(0,o.useState)(""),m=d[0],p=d[1];return a=a.toLowerCase(),(0,o.useEffect)((function(){void 0!==l?c(s.toString(),l,a,p):p(s.toString());var e=void 0;switch(a){case"polkadot":e="wss://rpc.polkadot.io";break;case"kusama":e="wss://kusama-rpc.polkadot.io/";break;case"statemine":e="wss://kusama-asset-hub-rpc.polkadot.io/";break;case"statemint":e="wss://polkadot-asset-hub-rpc.polkadot.io/";break;case"kusamapeople":e="wss://kusama-people-rpc.polkadot.io";break;case"polkadotpeople":e="wss://polkadot-people-rpc.polkadot.io";break;default:console.log("Unknown network provided, "+a)}if(void 0===e)console.log("Failed to connect to a valid websocket, applying default");else{var o=function(){var e=(0,i.A)((0,n.A)().mark((function e(){var i;return(0,n.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,u(a,t,p);case 2:if(void 0!==(i=e.sent)){e.next=7;break}return e.abrupt("return");case 7:void 0!==l?c(i,l,a,p):p(i);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();try{o()}catch(r){console.log(r)}}}),[]),m}},11135:e=>{var a="polkadot",t="kusama",n="statemine",i="statemint",o="polkadotpeople",s="kusamapeople",r={polkadot:{precision:1e10,symbol:"DOT"},kusama:{precision:1e12,symbol:"KSM"},statemint:{precision:1e10,symbol:"DOT"},statemine:{precision:1e12,symbol:"KSM"},polkadotpeople:{precision:1e10,symbol:"DOT"},kusamapeople:{precision:1e12,symbol:"KSM"}};e.exports={HumanReadable:function(e,l,u){var d=void 0;if(l===a||l===i)d=3;else if(l===t||l===n||l===o)d=6;else{if(l!=s)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");d=8}e=parseFloat(e),u((e=Number.isInteger(e/r[l].precision)?e/r[l].precision+" "+r[l].symbol:(e/r[l].precision).toFixed(d)+" "+r[l].symbol).toString())},Precise:function(e,a,t){t(e=(e=parseFloat(e))/r[a].precision+" "+r[a].symbol)},BlocksToDays:function(e,a){a((e=6*e/86400).toString())},ErasToDays:function(e,r,l){var u=void 0;if(l===a||l===i||l==o)u=1;else{if(l!==t&&l!==n&&l!=s)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");u=4}r((e/=u).toString())},Percentage:function(e,a){a((e/=1e7).toString())},PermillToPercent:function(e,a){a((e/=1e4).toString())},ArrayLength:function(e,a){a((e=e.split(",").length).toString())}}},19365:(e,a,t)=>{"use strict";t.d(a,{A:()=>s});t(96540);var n=t(34164);const i={tabItem:"tabItem_Ymn6"};var o=t(74848);function s(e){var a=e.children,t=e.hidden,s=e.className;return(0,o.jsx)("div",{role:"tabpanel",className:(0,n.A)(i.tabItem,s),hidden:t,children:a})}},11470:(e,a,t)=>{"use strict";t.d(a,{A:()=>y});var n=t(96540),i=t(34164),o=t(23104),s=t(56347),r=t(205),l=t(57485),u=t(31682),d=t(75376);function c(e){var a,t;return null!=(a=null==(t=n.Children.toArray(e).filter((function(e){return"\n"!==e})).map((function(e){if(!e||(0,n.isValidElement)(e)&&((a=e.props)&&"object"==typeof a&&"value"in a))return e;var a;throw new Error("Docusaurus error: Bad child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:t.filter(Boolean))?a:[]}function m(e){var a=e.values,t=e.children;return(0,n.useMemo)((function(){var e=null!=a?a:function(e){return c(e).map((function(e){var a=e.props;return{value:a.value,label:a.label,attributes:a.attributes,default:a.default}}))}(t);return function(e){var a=(0,u.XI)(e,(function(e,a){return e.value===a.value}));if(a.length>0)throw new Error('Docusaurus error: Duplicate values "'+a.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[a,t])}function p(e){var a=e.value;return e.tabValues.some((function(e){return e.value===a}))}function h(e){var a=e.queryString,t=void 0!==a&&a,i=e.groupId,o=(0,s.W6)(),r=function(e){var a=e.queryString,t=void 0!==a&&a,n=e.groupId;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=n?n:null}({queryString:t,groupId:i});return[(0,l.aZ)(r),(0,n.useCallback)((function(e){if(r){var a=new URLSearchParams(o.location.search);a.set(r,e),o.replace(Object.assign({},o.location,{search:a.toString()}))}}),[r,o])]}function x(e){var a,t,i,o,s=e.defaultValue,l=e.queryString,u=void 0!==l&&l,c=e.groupId,x=m(e),f=(0,n.useState)((function(){return function(e){var a,t=e.defaultValue,n=e.tabValues;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!p({value:t,tabValues:n}))throw new Error('Docusaurus error: The has a defaultValue "'+t+'" but none of its children has the corresponding value. Available values are: '+n.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return t}var i=null!=(a=n.find((function(e){return e.default})))?a:n[0];if(!i)throw new Error("Unexpected error: 0 tabValues");return i.value}({defaultValue:s,tabValues:x})})),k=f[0],b=f[1],v=h({queryString:u,groupId:c}),j=v[0],g=v[1],y=(a=function(e){return e?"docusaurus.tab."+e:null}({groupId:c}.groupId),t=(0,d.Dv)(a),i=t[0],o=t[1],[i,(0,n.useCallback)((function(e){a&&o.set(e)}),[a,o])]),w=y[0],A=y[1],V=function(){var e=null!=j?j:w;return p({value:e,tabValues:x})?e:null}();return(0,r.A)((function(){V&&b(V)}),[V]),{selectedValue:k,selectValue:(0,n.useCallback)((function(e){if(!p({value:e,tabValues:x}))throw new Error("Can't select invalid tab value="+e);b(e),g(e),A(e)}),[g,A,x]),tabValues:x}}var f=t(92303);const k={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var b=t(74848);function v(e){var a=e.className,t=e.block,n=e.selectedValue,s=e.selectValue,r=e.tabValues,l=[],u=(0,o.a_)().blockElementScrollPositionUntilNextRender,d=function(e){var a=e.currentTarget,t=l.indexOf(a),i=r[t].value;i!==n&&(u(a),s(i))},c=function(e){var a,t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":var n,i=l.indexOf(e.currentTarget)+1;t=null!=(n=l[i])?n:l[0];break;case"ArrowLeft":var o,s=l.indexOf(e.currentTarget)-1;t=null!=(o=l[s])?o:l[l.length-1]}null==(a=t)||a.focus()};return(0,b.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,i.A)("tabs",{"tabs--block":t},a),children:r.map((function(e){var a=e.value,t=e.label,o=e.attributes;return(0,b.jsx)("li",Object.assign({role:"tab",tabIndex:n===a?0:-1,"aria-selected":n===a,ref:function(e){return l.push(e)},onKeyDown:c,onClick:d},o,{className:(0,i.A)("tabs__item",k.tabItem,null==o?void 0:o.className,{"tabs__item--active":n===a}),children:null!=t?t:a}),a)}))})}function j(e){var a=e.lazy,t=e.children,o=e.selectedValue,s=(Array.isArray(t)?t:[t]).filter(Boolean);if(a){var r=s.find((function(e){return e.props.value===o}));return r?(0,n.cloneElement)(r,{className:(0,i.A)("margin-top--md",r.props.className)}):null}return(0,b.jsx)("div",{className:"margin-top--md",children:s.map((function(e,a){return(0,n.cloneElement)(e,{key:a,hidden:e.props.value!==o})}))})}function g(e){var a=x(e);return(0,b.jsxs)("div",{className:(0,i.A)("tabs-container",k.tabList),children:[(0,b.jsx)(v,Object.assign({},a,e)),(0,b.jsx)(j,Object.assign({},a,e))]})}function y(e){var a=(0,f.A)();return(0,b.jsx)(g,Object.assign({},e,{children:c(e.children)}),String(a))}},47790:()=>{}}]); \ No newline at end of file diff --git a/assets/js/23210cde.f5ce2285.js b/assets/js/23210cde.f5ce2285.js deleted file mode 100644 index c71029c6f03b..000000000000 --- a/assets/js/23210cde.f5ce2285.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk=self.webpackChunk||[]).push([[499],{43406:(e,a,t)=>{"use strict";t.r(a),t.d(a,{assets:()=>c,contentTitle:()=>u,default:()=>h,frontMatter:()=>l,metadata:()=>d,toc:()=>m});var n=t(74848),i=t(28453),o=t(47379),s=t(11470),r=t(19365);const l={id:"chain-state-values",title:"Chain State Values",sidebar_label:"Chain State",description:"Chain constants and storage values that can be queried from the live network nodes of Polkadot, Kusama and their system chains.",keywords:["polkadot","kusama","constants","storage","values"],slug:"../chain-state-values"},u=void 0,d={id:"general/chain-state-values",title:"Chain State Values",description:"Chain constants and storage values that can be queried from the live network nodes of Polkadot, Kusama and their system chains.",source:"@site/../docs/general/chain-state-values.md",sourceDirName:"general",slug:"/chain-state-values",permalink:"/docs/chain-state-values",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/chain-state-values.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1727943421e3,frontMatter:{id:"chain-state-values",title:"Chain State Values",sidebar_label:"Chain State",description:"Chain constants and storage values that can be queried from the live network nodes of Polkadot, Kusama and their system chains.",keywords:["polkadot","kusama","constants","storage","values"],slug:"../chain-state-values"},sidebar:"docs",previous:{title:"Metadata Explorer",permalink:"/docs/metadata"},next:{title:"Learn",permalink:"/docs/learn-index"}},c={},m=[{value:"Active Validator Count",id:"active-validator-count",level:4},{value:"Block Hash Count",id:"block-hash-count",level:4},{value:"Bounty Curator Deposit",id:"bounty-curator-deposit",level:4},{value:"Bounty Deposit",id:"bounty-deposit",level:4},{value:"Bounty Duration",id:"bounty-duration",level:4},{value:"Conviction Voting Lock Period",id:"conviction-voting-lock-period",level:4},{value:"Existential Deposit",id:"existential-deposit",level:4},{value:"Inactive Issuance",id:"inactive-issuance",level:4},{value:"Index Deposit",id:"index-deposit",level:4},{value:"Maximum Number of Nominators",id:"maximum-number-of-nominators",level:4},{value:"Maximum Number of Proxies per Account",id:"maximum-number-of-proxies-per-account",level:4},{value:"Maximum Votes per Nominator",id:"maximum-votes-per-nominator",level:4},{value:"Minimum Active Bond",id:"minimum-active-bond",level:4},{value:"Minimum Bond to Create a Nomination Pool",id:"minimum-bond-to-create-a-nomination-pool",level:4},{value:"Minimum Bond to Join a Nomination Pool",id:"minimum-bond-to-join-a-nomination-pool",level:4},{value:"Minimum Bond to Participate in Staking",id:"minimum-bond-to-participate-in-staking",level:4},{value:"Minimum Crowdloan contribution",id:"minimum-crowdloan-contribution",level:4},{value:"Minimum Validator Bond",id:"minimum-validator-bond",level:4},{value:"Minimum Validator Commission",id:"minimum-validator-commission",level:4},{value:"Multisig Deposit Base",id:"multisig-deposit-base",level:4},{value:"Multisig Deposit Factor",id:"multisig-deposit-factor",level:4},{value:"Nomination Pool Max Commission",id:"nomination-pool-max-commission",level:4},{value:"Nomination Pool Members",id:"nomination-pool-members",level:4},{value:"OpenGov Referendum Timeout",id:"opengov-referendum-timeout",level:4},{value:"OpenGov Submission Deposit",id:"opengov-submission-deposit",level:4},{value:"Parachain ID Registration Deposit",id:"parachain-id-registration-deposit",level:4},{value:"Parachain Genesis State Registration Deposit",id:"parachain-genesis-state-registration-deposit",level:4},{value:"Proxy Deposits",id:"proxy-deposits",level:4},{value:"Staking Miner Deposit and Reward",id:"staking-miner-deposit-and-reward",level:4},{value:"Staking Miner Max Submissions",id:"staking-miner-max-submissions",level:4},{value:"Staking Reward Retention",id:"staking-reward-retention",level:4},{value:"Total Issuance",id:"total-issuance",level:4},{value:"Treasury Burn Factor",id:"treasury-burn-factor",level:4},{value:"Treasury Spending Period",id:"treasury-spending-period",level:4},{value:"Unbonding Duration",id:"unbonding-duration",level:4},{value:"Active Validator Count",id:"active-validator-count-1",level:4},{value:"Block Hash Count",id:"block-hash-count-1",level:4},{value:"Bounty Curator Deposit",id:"bounty-curator-deposit-1",level:4},{value:"Bounty Deposit",id:"bounty-deposit-1",level:4},{value:"Bounty Duration",id:"bounty-duration-1",level:4},{value:"Conviction Voting Lock Period",id:"conviction-voting-lock-period-1",level:4},{value:"Existential Deposit",id:"existential-deposit-1",level:4},{value:"Inactive Issuance",id:"inactive-issuance-1",level:4},{value:"Index Deposit",id:"index-deposit-1",level:4},{value:"Maximum Number of Nominators",id:"maximum-number-of-nominators-1",level:4},{value:"Maximum Number of Proxies per Account",id:"maximum-number-of-proxies-per-account-1",level:4},{value:"Maximum Votes per Nominator",id:"maximum-votes-per-nominator-1",level:4},{value:"Minimum Active Bond",id:"minimum-active-bond-1",level:4},{value:"Minimum Bond to Create a Nomination Pool",id:"minimum-bond-to-create-a-nomination-pool-1",level:4},{value:"Minimum Bond to Join a Nomination Pool",id:"minimum-bond-to-join-a-nomination-pool-1",level:4},{value:"Minimum Bond to Participate in Staking",id:"minimum-bond-to-participate-in-staking-1",level:4},{value:"Minimum Crowdloan contribution",id:"minimum-crowdloan-contribution-1",level:4},{value:"Minimum Validator Bond",id:"minimum-validator-bond-1",level:4},{value:"Minimum Validator Commission",id:"minimum-validator-commission-1",level:4},{value:"Multisig Deposit Base",id:"multisig-deposit-base-1",level:4},{value:"Multisig Deposit Factor",id:"multisig-deposit-factor-1",level:4},{value:"Nomination Pool Max Commission",id:"nomination-pool-max-commission-1",level:4},{value:"Nomination Pool Members",id:"nomination-pool-members-1",level:4},{value:"OpenGov Referendum Timeout",id:"opengov-referendum-timeout-1",level:4},{value:"OpenGov Submission Deposit",id:"opengov-submission-deposit-1",level:4},{value:"Parachain ID Registration Deposit",id:"parachain-id-registration-deposit-1",level:4},{value:"Parachain Genesis State Registration Deposit",id:"parachain-genesis-state-registration-deposit-1",level:4},{value:"Proxy Deposits",id:"proxy-deposits-1",level:4},{value:"Staking Miner Deposit and Reward",id:"staking-miner-deposit-and-reward-1",level:4},{value:"Staking Miner Max Submissions",id:"staking-miner-max-submissions-1",level:4},{value:"Staking Reward Retention",id:"staking-reward-retention-1",level:4},{value:"Total Issuance",id:"total-issuance-1",level:4},{value:"Treasury Burn Factor",id:"treasury-burn-factor-1",level:4},{value:"Treasury Spending Period",id:"treasury-spending-period-1",level:4},{value:"Unbonding Duration",id:"unbonding-duration-1",level:4},{value:"Asset Deposit",id:"asset-deposit",level:4},{value:"Existential Deposit",id:"existential-deposit-2",level:4},{value:"Asset Deposit",id:"asset-deposit-1",level:4},{value:"Existential Deposit",id:"existential-deposit-3",level:4},{value:"Identity Deposit",id:"identity-deposit",level:4},{value:"Sub-identity Deposit",id:"sub-identity-deposit",level:4},{value:"Identity Deposit",id:"identity-deposit-1",level:4},{value:"Sub-identity Deposit",id:"sub-identity-deposit-1",level:4}];function p(e){const a={a:"a",admonition:"admonition",code:"code",h4:"h4",li:"li",p:"p",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,n.jsxs)(s.A,{groupId:"chains",values:[{label:"Polkadot",value:"polkadot"},{label:"Kusama",value:"kusama"},{label:"Polkadot Asset Hub",value:"ahp"},{label:"Kusama Asset Hub",value:"ahk"},{label:"Polkadot People",value:"pp"},{label:"Kusama People",value:"kp"}],children:[(0,n.jsxs)(r.A,{value:"polkadot",children:[(0,n.jsx)(a.admonition,{title:"What to do with DOT",type:"info",children:(0,n.jsxs)(a.ul,{children:["\n",(0,n.jsxs)(a.li,{children:["\n",(0,n.jsxs)(a.p,{children:[(0,n.jsxs)(a.strong,{children:[(0,n.jsx)(o.A,{network:"polkadot",path:"consts.balances.existentialDeposit",defaultValue:1e10,filter:"humanReadable"}),":"]}),"\nthe minimum balance required to have an active account on Polkadot Network. If your account\nbalance drops below the minimum, your account will be reaped. Learn more about\n",(0,n.jsx)(a.a,{href:"/docs/learn-accounts",children:"Accounts"})," and the\n",(0,n.jsx)(a.a,{href:"/docs/learn-accounts#existential-deposit-and-reaping",children:"Existential Deposit"})," requirement."]}),"\n"]}),"\n",(0,n.jsxs)(a.li,{children:["\n",(0,n.jsxs)(a.p,{children:[(0,n.jsxs)(a.strong,{children:[(0,n.jsx)(o.A,{network:"polkadot",path:"query.nominationPools.minJoinBond",defaultValue:1e10,filter:"humanReadable"}),":"]}),"\nthe minimum contribution required to join a ",(0,n.jsx)(a.a,{href:"/docs/learn-nomination-pools",children:"nomination pool"}),"\nand earn staking rewards for contributing to the security of the network. Learn more about\n",(0,n.jsx)(a.a,{href:"/docs/learn-nomination-pools",children:"nomination pools"}),"."]}),"\n"]}),"\n",(0,n.jsxs)(a.li,{children:["\n",(0,n.jsxs)(a.p,{children:[(0,n.jsxs)(a.strong,{children:[(0,n.jsx)(o.A,{network:"polkadotpeople",path:"consts.identity.basicDeposit",defaultValue:20017e5,filter:"humanReadable"}),":"]}),"\nregister an ",(0,n.jsx)(a.a,{href:"/docs/learn-identity",children:"on-chain identity"})]}),"\n"]}),"\n",(0,n.jsxs)(a.li,{children:["\n",(0,n.jsxs)(a.p,{children:[(0,n.jsxs)(a.strong,{children:[(0,n.jsx)(o.A,{network:"polkadot",path:"consts.proxy.proxyDepositBase",defaultValue:20008e7,filter:"humanReadable"}),":"]}),"\ncreate a ",(0,n.jsx)(a.a,{href:"/docs/learn-proxies",children:"proxy account"}),"."]}),"\n"]}),"\n",(0,n.jsxs)(a.li,{children:["\n",(0,n.jsxs)(a.p,{children:[(0,n.jsxs)(a.strong,{children:[(0,n.jsx)(o.A,{network:"polkadot",path:"query.staking.minNominatorBond",defaultValue:25e11,filter:"humanReadable"}),":"]}),"\nthe minimum stake required to submit your intent to directly nominate validators."]}),"\n"]}),"\n",(0,n.jsxs)(a.li,{children:["\n",(0,n.jsxs)(a.p,{children:[(0,n.jsxs)(a.strong,{children:[(0,n.jsx)(o.A,{network:"polkadot",path:"query.staking.minimumActiveStake",defaultValue:2937e9,filter:"humanReadable"}),":"]}),"\nthe minimum amount of DOT required to become an active nominator and earn rewards, i.e. the\nminimum active bond. To increase the chance of earning staking rewards, your stake should not be\nless than the minimum stake among the active nominators, which is a dynamic threshold. If you have\nlesser DOT than the minimum active nomination, please consider contributing to\n",(0,n.jsx)(a.a,{href:"/docs/learn-nomination-pools",children:"nomination pools"}),". Learn more about\n",(0,n.jsx)(a.a,{href:"/docs/learn-nominator",children:"becoming a nominator"}),"."]}),"\n"]}),"\n",(0,n.jsxs)(a.li,{children:["\n",(0,n.jsxs)(a.p,{children:[(0,n.jsxs)(a.strong,{children:[(0,n.jsx)(o.A,{network:"polkadot",path:"query.nominationPools.minCreateBond",defaultValue:5e12,filter:"humanReadable"}),":"]}),"\nyou can create your own ",(0,n.jsx)(a.a,{href:"/docs/learn-nomination-pools",children:"nomination pool"}),"."]}),"\n"]}),"\n"]})}),(0,n.jsx)(a.h4,{id:"active-validator-count",children:"Active Validator Count"}),(0,n.jsxs)(a.p,{children:["The number of Polkadot validators in the active set is ",(0,n.jsx)(o.A,{network:"polkadot",path:"query.staking.validatorCount",defaultValue:297}),"."]}),(0,n.jsx)(a.h4,{id:"block-hash-count",children:"Block Hash Count"}),(0,n.jsxs)(a.p,{children:["On Polkadot, the maximum number of block hashes retained on-chain at any given time is ",(0,n.jsx)(o.A,{network:"polkadot",path:"consts.system.blockHashCount",defaultValue:4096})," (which maps to seven hours given 6-second block times)."]}),(0,n.jsx)(a.h4,{id:"bounty-curator-deposit",children:"Bounty Curator Deposit"}),(0,n.jsxs)(a.p,{children:["On Polkadot, the bounty curator deposit is calculated by multiplying the curator fee by the bounty curator deposit multiplier set to ",(0,n.jsx)(o.A,{network:"polkadot",path:"consts.bounties.curatorDepositMultiplier",defaultValue:5e5,filter:"permillToPercent"}),"%. The deposit can range between a minimum of ",(0,n.jsx)(o.A,{network:"polkadot",path:"consts.bounties.curatorDepositMin",defaultValue:1e11,filter:"humanReadable"})," and a maximum of ",(0,n.jsx)(o.A,{network:"polkadot",path:"consts.bounties.curatorDepositMax",defaultValue:2e12,filter:"humanReadable"}),"."]}),(0,n.jsx)(a.h4,{id:"bounty-deposit",children:"Bounty Deposit"}),(0,n.jsxs)(a.p,{children:["The deposit to submit a bounty on Polkadot is ",(0,n.jsx)(o.A,{network:"polkadot",path:"consts.bounties.bountyDepositBase",defaultValue:1e10,filter:"humanReadable"}),"."]}),(0,n.jsx)(a.h4,{id:"bounty-duration",children:"Bounty Duration"}),(0,n.jsxs)(a.p,{children:["A Polkadot bounty has a predetermined duration of ",(0,n.jsx)(o.A,{network:"polkadot",path:"consts.bounties.bountyUpdatePeriod",defaultValue:1296e3,filter:"blocksToDays"})," days."]}),(0,n.jsx)(a.h4,{id:"conviction-voting-lock-period",children:"Conviction Voting Lock Period"}),(0,n.jsxs)(a.p,{children:["One conviction voting lock period on Polkadot equals ",(0,n.jsx)(o.A,{network:"polkadot",path:"consts.convictionVoting.voteLockingPeriod",defaultValue:100800,filter:"blocksToDays"})," days."]}),(0,n.jsx)(a.h4,{id:"existential-deposit",children:"Existential Deposit"}),(0,n.jsxs)(a.p,{children:["The minimum number of tokens to keep an account alive on the Polkadot relay chain is ",(0,n.jsx)(o.A,{network:"polkadot",path:"consts.balances.existentialDeposit",defaultValue:333e6,filter:"humanReadable"}),"."]}),(0,n.jsx)(a.h4,{id:"inactive-issuance",children:"Inactive Issuance"}),(0,n.jsxs)(a.p,{children:["Polkadot's inactive issuance is ",(0,n.jsx)(o.A,{network:"polkadot",path:"query.balances.inactiveIssuance",defaultValue:"20115636146084858300",filter:"humanReadable"})," in the era ",(0,n.jsx)(o.A,{network:"polkadot",path:"query.staking.currentEra",defaultValue:"1553"}),"."]}),(0,n.jsx)(a.h4,{id:"index-deposit",children:"Index Deposit"}),(0,n.jsxs)(a.p,{children:["The deposit to reserve an index on Polkadot is ",(0,n.jsx)(o.A,{network:"polkadot",path:"consts.indices.deposit",defaultValue:1e11,filter:"humanReadable"}),"."]}),(0,n.jsx)(a.h4,{id:"maximum-number-of-nominators",children:"Maximum Number of Nominators"}),(0,n.jsxs)(a.p,{children:["The maximum number of nominators on Polkadot is uncapped and the current value is ",(0,n.jsx)(o.A,{network:"polkadot",path:"query.staking.counterForNominators",defaultValue:36793}),"."]}),(0,n.jsx)(a.h4,{id:"maximum-number-of-proxies-per-account",children:"Maximum Number of Proxies per Account"}),(0,n.jsxs)(a.p,{children:["The maximum number of proxies per Polkadot account is ",(0,n.jsx)(o.A,{network:"polkadot",path:"consts.proxy.maxProxies",defaultValue:32}),". You can have the same proxy for multiple accounts."]}),(0,n.jsx)(a.h4,{id:"maximum-votes-per-nominator",children:"Maximum Votes per Nominator"}),(0,n.jsxs)(a.p,{children:["A nominator on Polkadot can select up to ",(0,n.jsx)(o.A,{network:"polkadot",path:"consts.electionProviderMultiPhase.minerMaxVotesPerVoter",defaultValue:16})," validators."]}),(0,n.jsx)(a.h4,{id:"minimum-active-bond",children:"Minimum Active Bond"}),(0,n.jsxs)(a.p,{children:["The minimum amount of tokens to nominate on Polkadot is ",(0,n.jsx)(o.A,{network:"polkadot",path:"query.staking.minimumActiveStake",defaultValue:5521439075539,filter:"humanReadable"}),"."]}),(0,n.jsx)(a.h4,{id:"minimum-bond-to-create-a-nomination-pool",children:"Minimum Bond to Create a Nomination Pool"}),(0,n.jsxs)(a.p,{children:["The minimum bond to create a Polkadot nomination pool is ",(0,n.jsx)(o.A,{network:"polkadot",path:"query.nominationPools.minCreateBond",defaultValue:5e12,filter:"humanReadable"}),"."]}),(0,n.jsx)(a.h4,{id:"minimum-bond-to-join-a-nomination-pool",children:"Minimum Bond to Join a Nomination Pool"}),(0,n.jsxs)(a.p,{children:["The minimum bond to join a Polkadot nomination pool is ",(0,n.jsx)(o.A,{network:"polkadot",path:"query.nominationPools.minJoinBond",defaultValue:1e10,filter:"humanReadable"}),"."]}),(0,n.jsx)(a.h4,{id:"minimum-bond-to-participate-in-staking",children:"Minimum Bond to Participate in Staking"}),(0,n.jsxs)(a.p,{children:["The minimum bond to nominate on Polkadot is ",(0,n.jsx)(o.A,{network:"polkadot",path:"query.staking.minNominatorBond",defaultValue:25e11,filter:"humanReadable"})," while the minimum amount to join a pool is ",(0,n.jsx)(o.A,{network:"polkadot",path:"query.nominationPools.minJoinBond",defaultValue:1e10,filter:"humanReadable"}),"."]}),(0,n.jsx)(a.h4,{id:"minimum-crowdloan-contribution",children:"Minimum Crowdloan contribution"}),(0,n.jsxs)(a.p,{children:["The minimum amount to participate to a Polkadot crowdloan is ",(0,n.jsx)(o.A,{network:"polkadot",path:"consts.crowdloan.minContribution",defaultValue:5e10,filter:"humanReadable"}),"."]}),(0,n.jsx)(a.h4,{id:"minimum-validator-bond",children:"Minimum Validator Bond"}),(0,n.jsxs)(a.p,{children:["To start a validator instance on Polkadot, the\nminimum bond required is ",(0,n.jsx)(o.A,{network:"polkadot",path:"query.staking.minValidatorBond",defaultValue:"0",filter:"humanReadable"}),"."]}),(0,n.jsx)(a.h4,{id:"minimum-validator-commission",children:"Minimum Validator Commission"}),(0,n.jsxs)(a.p,{children:["The minimum commission a Polkadot Validator can set is ",(0,n.jsx)(o.A,{network:"polkadot",path:"query.staking.minCommission",filter:"percentage",defaultValue:"0"}),"%. ",(0,n.jsx)(a.a,{href:"/docs/maintain-guides-how-to-validate-polkadot#how-many-dot-do-i-need-to-become-an-active-validator",children:"This does not guarantee entry into the active set and earning rewards"}),"."]}),(0,n.jsx)(a.h4,{id:"multisig-deposit-base",children:"Multisig Deposit Base"}),(0,n.jsxs)(a.p,{children:["The multisig deposit base on Polkadot is ",(0,n.jsx)(o.A,{network:"polkadot",path:"consts.multisig.depositBase",defaultValue:20088e7,filter:"humanReadable"}),"."]}),(0,n.jsx)(a.h4,{id:"multisig-deposit-factor",children:"Multisig Deposit Factor"}),(0,n.jsxs)(a.p,{children:["The multisig deposit factor on Polkadot is ",(0,n.jsx)(o.A,{network:"polkadot",path:"consts.multisig.depositFactor",defaultValue:32e7,filter:"humanReadable"}),"."]}),(0,n.jsx)(a.h4,{id:"nomination-pool-max-commission",children:"Nomination Pool Max Commission"}),(0,n.jsxs)(a.p,{children:["The maximum commission that can be set for a Polkadot nomination pool is ",(0,n.jsx)(o.A,{network:"polkadot",path:"query.nominationPools.globalMaxCommission",defaultValue:1e8,filter:"percentage"}),"%."]}),(0,n.jsx)(a.h4,{id:"nomination-pool-members",children:"Nomination Pool Members"}),(0,n.jsxs)(a.p,{children:["There are currently ",(0,n.jsx)(o.A,{network:"polkadot",path:"query.nominationPools.counterForPoolMembers",defaultValue:46378})," members in ",(0,n.jsx)(o.A,{network:"polkadot",path:"query.nominationPools.lastPoolId",defaultValue:285})," Polkadot nomination pools. There is no limit to the number of pools or pool members per pool."]}),(0,n.jsx)(a.h4,{id:"opengov-referendum-timeout",children:"OpenGov Referendum Timeout"}),(0,n.jsxs)(a.p,{children:["A Polkadot referendum is timeout for not submitting the Decision Deposit within ",(0,n.jsx)(o.A,{network:"polkadot",path:"const.referenda.undecidingTimeout",defaultValue:201600,filter:"blocksToDays"})," days since its creation."]}),(0,n.jsx)(a.h4,{id:"opengov-submission-deposit",children:"OpenGov Submission Deposit"}),(0,n.jsxs)(a.p,{children:["A deposit of ",(0,n.jsx)(o.A,{network:"polkadot",path:"consts.referenda.submissionDeposit",defaultValue:1e10,filter:"humanReadable"})," is needed to submit a referendum on Polkadot."]}),(0,n.jsx)(a.h4,{id:"parachain-id-registration-deposit",children:"Parachain ID Registration Deposit"}),(0,n.jsxs)(a.p,{children:["Reserving a ",(0,n.jsx)(a.code,{children:"ParaID"})," on Polkadot requires a deposit of ",(0,n.jsx)(o.A,{network:"polkadot",path:"consts.registrar.paraDeposit",defaultValue:1e12,filter:"humanReadable"}),"."]}),(0,n.jsx)(a.h4,{id:"parachain-genesis-state-registration-deposit",children:"Parachain Genesis State Registration Deposit"}),(0,n.jsxs)(a.p,{children:["Registering the genesis state and WASM code of a Polkadot parachain requires a deposit ",(0,n.jsx)(o.A,{network:"polkadot",path:"consts.registrar.dataDepositPerByte",defaultValue:1e7,filter:"humanReadable"})," per byte."]}),(0,n.jsx)(a.h4,{id:"proxy-deposits",children:"Proxy Deposits"}),(0,n.jsxs)(a.p,{children:["The creation of proxies on Polkadot requires a ",(0,n.jsx)(a.strong,{children:"proxy deposit base"})," of ",(0,n.jsx)(o.A,{network:"polkadot",path:"consts.proxy.proxyDepositBase",defaultValue:20008e7,filter:"humanReadable"})," and a ",(0,n.jsx)(a.strong,{children:"proxy deposit factor"})," of ",(0,n.jsx)(o.A,{network:"polkadot",path:"consts.proxy.proxyDepositFactor",defaultValue:33e7,filter:"humanReadable"})," that is multiplied by the number of proxies under the same proxied account."]}),(0,n.jsxs)(a.p,{children:["In case of time-delayed proxies, there is an ",(0,n.jsx)(a.strong,{children:"announcement deposit base"})," of ",(0,n.jsx)(o.A,{network:"polkadot",path:"consts.proxy.announcementDepositBase",defaultValue:20008e7,filter:"humanReadable"})," for announcing a call and an ",(0,n.jsx)(a.strong,{children:"announcement deposit factor"})," of ",(0,n.jsx)(o.A,{network:"polkadot",path:"consts.proxy.announcementDepositFactor",defaultValue:66e7,filter:"humanReadable"})," for each proxy call."]}),(0,n.jsx)(a.h4,{id:"staking-miner-deposit-and-reward",children:"Staking Miner Deposit and Reward"}),(0,n.jsxs)(a.p,{children:["Staking miners on Polkadot are required to reserve a deposit to submit their solutions. The the deposit is the sum of a ",(0,n.jsx)(a.strong,{children:"signed deposit base"})," of ",(0,n.jsx)(o.A,{network:"polkadot",path:"consts.electionProviderMultiPhase.signedDepositBase",defaultValue:4e11,filter:"humanReadable"}),", a ",(0,n.jsx)(a.strong,{children:"signed deposit per byte"})," of ",(0,n.jsx)(o.A,{network:"polkadot",path:"consts.electionProviderMultiPhase.signedDepositByte",defaultValue:97656,filter:"precise"})," (a solution weighing 200KB would yield 200 x 0.0000097656 = 0.00195312 DOT), and a ",(0,n.jsx)(a.strong,{children:"signed deposit weight"})," set to 0."]}),(0,n.jsxs)(a.p,{children:["The ",(0,n.jsx)(a.strong,{children:"signed reward base"})," on Polkadot is ",(0,n.jsx)(o.A,{network:"polkadot",path:"consts.electionProviderMultiPhase.signedRewardBase",defaultValue:1e10,filter:"humanReadable"})," which is a fixed amount."]}),(0,n.jsx)(a.h4,{id:"staking-miner-max-submissions",children:"Staking Miner Max Submissions"}),(0,n.jsxs)(a.p,{children:["The maximum number of submission for a staking miner on Polkadot is ",(0,n.jsx)(o.A,{network:"polkadot",path:"consts.electionProviderMultiPhase.signedMaxSubmissions",defaultValue:16}),"."]}),(0,n.jsx)(a.h4,{id:"staking-reward-retention",children:"Staking Reward Retention"}),(0,n.jsx)(a.p,{children:"Polkadot staking rewards are kept available for 84 eras. The following calculation can be used to\napproximate this length in days:"}),(0,n.jsxs)(a.p,{children:[(0,n.jsx)(a.code,{children:"84 eras"})," \xd7 ",(0,n.jsx)(a.code,{children:"24 hours in a single era"})," \xf7 ",(0,n.jsx)(a.code,{children:"24 hours in a day"})," = ",(0,n.jsx)(a.code,{children:"84 days"})]}),(0,n.jsx)(a.h4,{id:"total-issuance",children:"Total Issuance"}),(0,n.jsxs)(a.p,{children:["Polkadot's total issuance is ",(0,n.jsx)(o.A,{network:"polkadot",path:"query.balances.totalIssuance",defaultValue:"14883815224560918110",filter:"humanReadable"})," in the era ",(0,n.jsx)(o.A,{network:"polkadot",path:"query.staking.currentEra",defaultValue:"1553"}),"."]}),(0,n.jsx)(a.h4,{id:"treasury-burn-factor",children:"Treasury Burn Factor"}),(0,n.jsxs)(a.p,{children:["At the end of every spending period on Polkadot, ",(0,n.jsx)(o.A,{network:"polkadot",path:"consts.treasury.burn",defaultValue:1e4,filter:"permillToPercent"}),"% of the available funds are burned."]}),(0,n.jsx)(a.h4,{id:"treasury-spending-period",children:"Treasury Spending Period"}),(0,n.jsxs)(a.p,{children:["The spending period on Polkadot is currently ",(0,n.jsx)(o.A,{network:"polkadot",path:"consts.treasury.spendPeriod",defaultValue:345600,filter:"blocksToDays"})," days."]}),(0,n.jsx)(a.h4,{id:"unbonding-duration",children:"Unbonding Duration"}),(0,n.jsxs)(a.p,{children:["The unbonding duration on Polkadot is set to ",(0,n.jsx)(o.A,{network:"polkadot",path:"consts.staking.bondingDuration",defaultValue:28,filter:"erasToDays"})," days. This is\ncalculated by taking the ",(0,n.jsx)(a.strong,{children:"bonding duration"})," (in eras), multiplying it by the ",(0,n.jsx)(a.strong,{children:"length of a single\nera"})," (in hours), and dividing by the ",(0,n.jsx)(a.strong,{children:"hours in a day"})," (24). Example: 28 \xd7 24 \xf7 24 = 28 days."]})]}),(0,n.jsxs)(r.A,{value:"kusama",children:[(0,n.jsx)(a.admonition,{title:"What to do with KSM",type:"info",children:(0,n.jsxs)(a.ul,{children:["\n",(0,n.jsxs)(a.li,{children:["\n",(0,n.jsxs)(a.p,{children:[(0,n.jsxs)(a.strong,{children:[(0,n.jsx)(o.A,{network:"kusama",path:"consts.balances.existentialDeposit",defaultValue:333333333,filter:"humanReadable"}),":"]}),"\nthe minimum balance required to have an active account on Kusama Network. If your account balance\ndrops below the minimum, your account will be reaped. Learn more about\n",(0,n.jsx)(a.a,{href:"/docs/learn-accounts",children:"Accounts"})," and the\n",(0,n.jsx)(a.a,{href:"/docs/learn-accounts#existential-deposit-and-reaping",children:"Existential Deposit"})," requirement."]}),"\n"]}),"\n",(0,n.jsxs)(a.li,{children:["\n",(0,n.jsxs)(a.p,{children:[(0,n.jsxs)(a.strong,{children:[(0,n.jsx)(o.A,{network:"kusama",path:"query.nominationPools.minJoinBond",defaultValue:1666666650,filter:"humanReadable"}),":"]}),"\nthe minimum contribution required to join a\n",(0,n.jsx)(a.a,{href:"/docs/learn-nomination-pools",children:"nomination pool"})," and earn staking rewards for contributing\nto the security of the network. Learn more about\n",(0,n.jsx)(a.a,{href:"/docs/learn-nomination-pools",children:"nomination pools"}),"."]}),"\n"]}),"\n",(0,n.jsxs)(a.li,{children:["\n",(0,n.jsxs)(a.p,{children:[(0,n.jsxs)(a.strong,{children:[(0,n.jsx)(o.A,{network:"kusamapeople",path:"consts.identity.basicDeposit",defaultValue:6672333321,filter:"humanReadable"}),":"]}),"\nregister an ",(0,n.jsx)(a.a,{href:"/docs/learn-identity",children:"on-chain identity"})]}),"\n"]}),"\n",(0,n.jsxs)(a.li,{children:["\n",(0,n.jsxs)(a.p,{children:[(0,n.jsxs)(a.strong,{children:[(0,n.jsx)(o.A,{network:"kusama",path:"consts.proxy.proxyDepositBase",defaultValue:666933332400,filter:"humanReadable"}),":"]}),"\ncreate a ",(0,n.jsx)(a.a,{href:"/docs/learn-proxies",children:"proxy account"}),"."]}),"\n"]}),"\n",(0,n.jsxs)(a.li,{children:["\n",(0,n.jsxs)(a.p,{children:[(0,n.jsxs)(a.strong,{children:[(0,n.jsx)(o.A,{network:"kusama",path:"query.nominationPools.minCreateBond",defaultValue:1e12,filter:"humanReadable"}),":"]}),"\nyou can create your own ",(0,n.jsx)(a.a,{href:"/docs/learn-nomination-pools",children:"nomination pool"}),"."]}),"\n"]}),"\n",(0,n.jsxs)(a.li,{children:["\n",(0,n.jsxs)(a.p,{children:[(0,n.jsxs)(a.strong,{children:[(0,n.jsx)(o.A,{network:"kusama",path:"query.staking.minimumActiveStake",defaultValue:0,filter:"humanReadable"}),":"]}),"\nthe minimum amount of KSM required to become an active nominator and earn rewards."]}),"\n"]}),"\n"]})}),(0,n.jsx)(a.h4,{id:"active-validator-count-1",children:"Active Validator Count"}),(0,n.jsxs)(a.p,{children:["The number of Kusama validators in the active set is ",(0,n.jsx)(o.A,{network:"kusama",path:"query.staking.validatorCount",defaultValue:297}),"."]}),(0,n.jsx)(a.h4,{id:"block-hash-count-1",children:"Block Hash Count"}),(0,n.jsxs)(a.p,{children:["On Kusama, the maximum block number to block hash mappings to keep is ",(0,n.jsx)(o.A,{network:"kusama",path:"consts.system.blockHashCount",defaultValue:4096})," (which maps to seven hours given 6-second block times)."]}),(0,n.jsx)(a.h4,{id:"bounty-curator-deposit-1",children:"Bounty Curator Deposit"}),(0,n.jsxs)(a.p,{children:["On Kusama, the bounty curator deposit is calculated by multiplying the curator fee by the bounty curator deposit multiplier set to ",(0,n.jsx)(o.A,{network:"kusama",path:"consts.bounties.curatorDepositMultiplier",defaultValue:5e5,filter:"permillToPercent"}),"%. The deposit can range between a minimum of ",(0,n.jsx)(o.A,{network:"kusama",path:"consts.bounties.curatorDepositMin",defaultValue:3333333330,filter:"humanReadable"})," and a maximum of ",(0,n.jsx)(o.A,{network:"kusama",path:"consts.bounties.curatorDepositMax",defaultValue:166666666500,filter:"humanReadable"}),"."]}),(0,n.jsx)(a.h4,{id:"bounty-deposit-1",children:"Bounty Deposit"}),(0,n.jsxs)(a.p,{children:["The deposit to submit a bounty on Kusama is ",(0,n.jsx)(o.A,{network:"kusama",path:"consts.bounties.bountyDepositBase",defaultValue:33333333300,filter:"humanReadable"}),"."]}),(0,n.jsx)(a.h4,{id:"bounty-duration-1",children:"Bounty Duration"}),(0,n.jsxs)(a.p,{children:["A Kusama bounty has a predetermined duration of ",(0,n.jsx)(o.A,{network:"kusama",path:"consts.bounties.bountyUpdatePeriod",defaultValue:1296e3,filter:"blocksToDays"})," days."]}),(0,n.jsx)(a.h4,{id:"conviction-voting-lock-period-1",children:"Conviction Voting Lock Period"}),(0,n.jsxs)(a.p,{children:["One conviction voting lock period on Kusama equals ",(0,n.jsx)(o.A,{network:"kusama",path:"consts.convictionVoting.voteLockingPeriod",defaultValue:100800,filter:"blocksToDays"})," days."]}),(0,n.jsx)(a.h4,{id:"existential-deposit-1",children:"Existential Deposit"}),(0,n.jsxs)(a.p,{children:["The minimum number of tokens to keep an account alive on the Kusama relay chain is ",(0,n.jsx)(o.A,{network:"kusama",path:"consts.balances.existentialDeposit",defaultValue:333e6,filter:"humanReadable"}),"."]}),(0,n.jsx)(a.h4,{id:"inactive-issuance-1",children:"Inactive Issuance"}),(0,n.jsxs)(a.p,{children:["Kusama's inactive issuance is ",(0,n.jsx)(o.A,{network:"kusama",path:"query.balances.inactiveIssuance",defaultValue:"288091772937830827",filter:"humanReadable"})," in the era ",(0,n.jsx)(o.A,{network:"kusama",path:"query.staking.currentEra",defaultValue:"7061"}),"."]}),(0,n.jsx)(a.h4,{id:"index-deposit-1",children:"Index Deposit"}),(0,n.jsxs)(a.p,{children:["The deposit to reserve an index on Kusama is ",(0,n.jsx)(o.A,{network:"kusama",path:"consts.indices.deposit",defaultValue:1e11,filter:"humanReadable"}),"."]}),(0,n.jsx)(a.h4,{id:"maximum-number-of-nominators-1",children:"Maximum Number of Nominators"}),(0,n.jsxs)(a.p,{children:["The maximum number of nominators on Kusama is capped at ",(0,n.jsx)(o.A,{network:"kusama",path:"query.staking.maxNominatorsCount",defaultValue:2e4})," and currently sits at ",(0,n.jsx)(o.A,{network:"kusama",path:"query.staking.counterForNominators",defaultValue:15560}),"."]}),(0,n.jsx)(a.h4,{id:"maximum-number-of-proxies-per-account-1",children:"Maximum Number of Proxies per Account"}),(0,n.jsxs)(a.p,{children:["The maximum number of proxies per Kusama account is ",(0,n.jsx)(o.A,{network:"kusama",path:"consts.proxy.maxProxies",defaultValue:32}),". You can have the same proxy for multiple accounts."]}),(0,n.jsx)(a.h4,{id:"maximum-votes-per-nominator-1",children:"Maximum Votes per Nominator"}),(0,n.jsxs)(a.p,{children:["A nominator on Kusama can select up to ",(0,n.jsx)(o.A,{network:"kusama",path:"consts.electionProviderMultiPhase.minerMaxVotesPerVoter",defaultValue:24})," validators."]}),(0,n.jsx)(a.h4,{id:"minimum-active-bond-1",children:"Minimum Active Bond"}),(0,n.jsxs)(a.p,{children:["The minimum amount of tokens to nominate on Kusama is ",(0,n.jsx)(o.A,{network:"kusama",path:"query.staking.minimumActiveStake",defaultValue:2937e9,filter:"humanReadable"}),"."]}),(0,n.jsx)(a.h4,{id:"minimum-bond-to-create-a-nomination-pool-1",children:"Minimum Bond to Create a Nomination Pool"}),(0,n.jsxs)(a.p,{children:["The minimum bond to create a Kusama nomination pool is ",(0,n.jsx)(o.A,{network:"kusama",path:"query.nominationPools.minCreateBond",defaultValue:1e12,filter:"humanReadable"}),"."]}),(0,n.jsx)(a.h4,{id:"minimum-bond-to-join-a-nomination-pool-1",children:"Minimum Bond to Join a Nomination Pool"}),(0,n.jsxs)(a.p,{children:["The minimum bond to join a Kusama nomination pool is ",(0,n.jsx)(o.A,{network:"kusama",path:"query.nominationPools.minJoinBond",defaultValue:1e10,filter:"humanReadable"}),"."]}),(0,n.jsx)(a.h4,{id:"minimum-bond-to-participate-in-staking-1",children:"Minimum Bond to Participate in Staking"}),(0,n.jsxs)(a.p,{children:["The minimum bond to nominate on Kusama is ",(0,n.jsx)(o.A,{network:"kusama",path:"query.staking.minNominatorBond",defaultValue:1e11,filter:"humanReadable"})," while the minimum amount to join a pool is ",(0,n.jsx)(o.A,{network:"kusama",path:"query.nominationPools.minJoinBond",defaultValue:1667e6,filter:"humanReadable"}),"."]}),(0,n.jsx)(a.h4,{id:"minimum-crowdloan-contribution-1",children:"Minimum Crowdloan contribution"}),(0,n.jsxs)(a.p,{children:["The minimum amount to participate to a Kusama crowdloan is ",(0,n.jsx)(o.A,{network:"kusama",path:"consts.crowdloan.minContribution",defaultValue:1e11,filter:"humanReadable"}),"."]}),(0,n.jsx)(a.h4,{id:"minimum-validator-bond-1",children:"Minimum Validator Bond"}),(0,n.jsxs)(a.p,{children:["To start a validator instance on Kusama, the\nminimum bond required is ",(0,n.jsx)(o.A,{network:"kusama",path:"query.staking.minValidatorBond",defaultValue:"0",filter:"humanReadable"}),"."]}),(0,n.jsx)(a.h4,{id:"minimum-validator-commission-1",children:"Minimum Validator Commission"}),(0,n.jsxs)(a.p,{children:["The minimum commission a Kusama Validator can set is ",(0,n.jsx)(o.A,{network:"kusama",path:"query.staking.minCommission",filter:"percentage",defaultValue:"10"}),"%."]}),(0,n.jsx)(a.h4,{id:"multisig-deposit-base-1",children:"Multisig Deposit Base"}),(0,n.jsxs)(a.p,{children:["The multisig deposit base on Kusama is ",(0,n.jsx)(o.A,{network:"kusama",path:"consts.multisig.depositBase",defaultValue:669599996400,filter:"humanReadable"}),"."]}),(0,n.jsx)(a.h4,{id:"multisig-deposit-factor-1",children:"Multisig Deposit Factor"}),(0,n.jsxs)(a.p,{children:["The multisig deposit factor on Kusama is ",(0,n.jsx)(o.A,{network:"kusama",path:"consts.multisig.depositFactor",defaultValue:1066665600,filter:"humanReadable"}),"."]}),(0,n.jsx)(a.h4,{id:"nomination-pool-max-commission-1",children:"Nomination Pool Max Commission"}),(0,n.jsxs)(a.p,{children:["The maximum commission that can be set for a Kusama nomination pool is ",(0,n.jsx)(o.A,{network:"kusama",path:"query.nominationPools.globalMaxCommission",defaultValue:1e8,filter:"percentage"}),"%."]}),(0,n.jsx)(a.h4,{id:"nomination-pool-members-1",children:"Nomination Pool Members"}),(0,n.jsxs)(a.p,{children:["There are currently ",(0,n.jsx)(o.A,{network:"kusama",path:"query.nominationPools.counterForPoolMembers",defaultValue:3442})," members in ",(0,n.jsx)(o.A,{network:"kusama",path:"query.nominationPools.lastPoolId",defaultValue:202})," Kusama nomination pools. There is no limit to the number of pools or pool members per pool."]}),(0,n.jsx)(a.h4,{id:"opengov-referendum-timeout-1",children:"OpenGov Referendum Timeout"}),(0,n.jsxs)(a.p,{children:["A Kusama referendum is timeout for not submitting the Decision Deposit within ",(0,n.jsx)(o.A,{network:"kusama",path:"const.referenda.undecidingTimeout",defaultValue:201600,filter:"blocksToDays"})," days since its creation."]}),(0,n.jsx)(a.h4,{id:"opengov-submission-deposit-1",children:"OpenGov Submission Deposit"}),(0,n.jsxs)(a.p,{children:["A deposit of ",(0,n.jsx)(o.A,{network:"kusama",path:"consts.referenda.submissionDeposit",defaultValue:33333333333,filter:"humanReadable"})," is needed to submit a referendum on Kusama."]}),(0,n.jsx)(a.h4,{id:"parachain-id-registration-deposit-1",children:"Parachain ID Registration Deposit"}),(0,n.jsxs)(a.p,{children:["Reserving a ",(0,n.jsx)(a.code,{children:"ParaID"})," on Kusama requires a deposit of ",(0,n.jsx)(o.A,{network:"kusama",path:"consts.registrar.paraDeposit",defaultValue:4e13,filter:"humanReadable"}),"."]}),(0,n.jsx)(a.h4,{id:"parachain-genesis-state-registration-deposit-1",children:"Parachain Genesis State Registration Deposit"}),(0,n.jsxs)(a.p,{children:["Registering the genesis state and WASM code of a Kusama parachain requires a deposit ",(0,n.jsx)(o.A,{network:"kusama",path:"consts.registrar.dataDepositPerByte",defaultValue:333333333,filter:"humanReadable"})," per byte."]}),(0,n.jsx)(a.h4,{id:"proxy-deposits-1",children:"Proxy Deposits"}),(0,n.jsxs)(a.p,{children:["The creation of proxies on Kusama requires a ",(0,n.jsx)(a.strong,{children:"proxy deposit base"})," of ",(0,n.jsx)(o.A,{network:"kusama",path:"consts.proxy.proxyDepositBase",defaultValue:666933332400,filter:"humanReadable"})," and a ",(0,n.jsx)(a.strong,{children:"proxy deposit factor"})," of ",(0,n.jsx)(o.A,{network:"kusama",path:"consts.proxy.proxyDepositFactor",defaultValue:1099998900,filter:"humanReadable"})," that is multiplied by the number of proxies under the same proxied account."]}),(0,n.jsxs)(a.p,{children:["In case of time-delayed proxies, there is an ",(0,n.jsx)(a.strong,{children:"announcement deposit base"})," of ",(0,n.jsx)(o.A,{network:"kusama",path:"consts.proxy.announcementDepositBase",defaultValue:666933332400,filter:"humanReadable"})," for announcing a call and an ",(0,n.jsx)(a.strong,{children:"announcement deposit factor"})," of ",(0,n.jsx)(o.A,{network:"kusama",path:"consts.proxy.announcementDepositFactor",defaultValue:2199997800,filter:"humanReadable"})," for each proxy call."]}),(0,n.jsx)(a.h4,{id:"staking-miner-deposit-and-reward-1",children:"Staking Miner Deposit and Reward"}),(0,n.jsxs)(a.p,{children:["Staking miners on Kusama are required to reserve a deposit to submit their solutions. The the deposit is the sum of a ",(0,n.jsx)(a.strong,{children:"signed deposit base"})," of ",(0,n.jsx)(o.A,{network:"kusama",path:"consts.electionProviderMultiPhase.signedDepositBase",defaultValue:133333332e3,filter:"humanReadable"}),", a ",(0,n.jsx)(a.strong,{children:"signed deposit per byte"})," of ",(0,n.jsx)(o.A,{network:"kusama",path:"consts.electionProviderMultiPhase.signedDepositByte",defaultValue:32551,filter:"precise"})," (a solution weighing 200KB would yield 200 x 0.00000032551 = 0.000065102 KSM), and a ",(0,n.jsx)(a.strong,{children:"signed deposit weight"})," set to 0 and has no effect."]}),(0,n.jsxs)(a.p,{children:["The ",(0,n.jsx)(a.strong,{children:"signed reward base"})," on Kusama is ",(0,n.jsx)(o.A,{network:"kusama",path:"consts.electionProviderMultiPhase.signedRewardBase",defaultValue:1e11,filter:"humanReadable"})," which is a fixed amount."]}),(0,n.jsx)(a.h4,{id:"staking-miner-max-submissions-1",children:"Staking Miner Max Submissions"}),(0,n.jsxs)(a.p,{children:["The maximum number of submission for a staking miner on Kusama is ",(0,n.jsx)(o.A,{network:"kusama",path:"consts.electionProviderMultiPhase.signedMaxSubmissions",defaultValue:16}),"."]}),(0,n.jsx)(a.h4,{id:"staking-reward-retention-1",children:"Staking Reward Retention"}),(0,n.jsx)(a.p,{children:"Kusama staking rewards are kept available for 84 eras. The following calculation can be used to\napproximate this length in days:"}),(0,n.jsxs)(a.p,{children:[(0,n.jsx)(a.code,{children:"84 eras"})," \xd7 ",(0,n.jsx)(a.code,{children:"6 hours in a single era"})," \xf7 ",(0,n.jsx)(a.code,{children:"24 hours in a day"})," = ",(0,n.jsx)(a.code,{children:"21 days"})]}),(0,n.jsx)(a.h4,{id:"total-issuance-1",children:"Total Issuance"}),(0,n.jsxs)(a.p,{children:["Kusama's total issuance is ",(0,n.jsx)(o.A,{network:"kusama",path:"query.balances.totalIssuance",defaultValue:"15410382600026732448",filter:"humanReadable"})," in the era ",(0,n.jsx)(o.A,{network:"kusama",path:"query.staking.currentEra",defaultValue:"7061"}),"."]}),(0,n.jsx)(a.h4,{id:"treasury-burn-factor-1",children:"Treasury Burn Factor"}),(0,n.jsxs)(a.p,{children:["At the end of every spending period on Kusama, ",(0,n.jsx)(o.A,{network:"kusama",path:"consts.treasury.burn",defaultValue:2e3,filter:"permillToPercent"}),"% of the available funds are burned, with the amount currently going to ",(0,n.jsx)(a.a,{href:"/docs/maintain-guides-society-kusama",children:"Society"})," rather than being burned."]}),(0,n.jsx)(a.h4,{id:"treasury-spending-period-1",children:"Treasury Spending Period"}),(0,n.jsxs)(a.p,{children:["The spending period on Kusama is currently ",(0,n.jsx)(o.A,{network:"kusama",path:"consts.treasury.spendPeriod",defaultValue:86400,filter:"blocksToDays"})," days."]}),(0,n.jsx)(a.h4,{id:"unbonding-duration-1",children:"Unbonding Duration"}),(0,n.jsxs)(a.p,{children:["The unbonding duration on Kusama is set to ",(0,n.jsx)(o.A,{network:"kusama",path:"consts.staking.bondingDuration",defaultValue:28,filter:"erasToDays"})," days. This is\ncalculated by taking the ",(0,n.jsx)(a.strong,{children:"bonding duration"})," (in eras), multiplying it by the ",(0,n.jsx)(a.strong,{children:"length of a single\nera"})," (in hours), and dividing by the ",(0,n.jsx)(a.strong,{children:"hours in a day"})," (24). Example: 28 \xd7 6 \xf7 24 = 7 days."]})]}),(0,n.jsxs)(r.A,{value:"ahp",children:[(0,n.jsx)(a.h4,{id:"asset-deposit",children:"Asset Deposit"}),(0,n.jsxs)(a.p,{children:["To reserve an asset on the Polkadot Asset Hub you need a deposit of ",(0,n.jsx)(o.A,{network:"statemint",path:"consts.assets.assetDeposit",defaultValue:1e11,filter:"humanReadable"})," and ",(0,n.jsx)(o.A,{network:"statemint",path:"consts.assets.metadataDepositBase",defaultValue:668933304,filter:"humanReadable"})," for the asset metadata."]}),(0,n.jsx)(a.h4,{id:"existential-deposit-2",children:"Existential Deposit"}),(0,n.jsxs)(a.p,{children:["The minimum number of tokens to keep an account alive on the Polkadot Asset Hub is ",(0,n.jsx)(o.A,{network:"statemint",path:"consts.balances.existentialDeposit",defaultValue:1e8,filter:"humanReadable"}),"."]})]}),(0,n.jsxs)(r.A,{value:"ahk",children:[(0,n.jsx)(a.h4,{id:"asset-deposit-1",children:"Asset Deposit"}),(0,n.jsxs)(a.p,{children:["To reserve an asset on the Kusama Asset Hub you need a deposit of ",(0,n.jsx)(o.A,{network:"statemine",path:"consts.assets.assetDeposit",defaultValue:1e11,filter:"humanReadable"})," and ",(0,n.jsx)(o.A,{network:"statemine",path:"consts.assets.metadataDepositBase",defaultValue:668933304,filter:"humanReadable"})," for the asset metadata."]}),(0,n.jsx)(a.h4,{id:"existential-deposit-3",children:"Existential Deposit"}),(0,n.jsxs)(a.p,{children:["The minimum number of tokens to keep an account alive on the Kusama Asset Hub is ",(0,n.jsx)(o.A,{network:"statemine",path:"consts.balances.existentialDeposit",defaultValue:1e9,filter:"humanReadable"}),"."]})]}),(0,n.jsxs)(r.A,{value:"pp",children:[(0,n.jsx)(a.h4,{id:"identity-deposit",children:"Identity Deposit"}),(0,n.jsxs)(a.p,{children:["The creation of a Polkadot identity required a deposit of ",(0,n.jsx)(o.A,{network:"polkadotpeople",path:"consts.identity.basicDeposit",defaultValue:20017e5,filter:"humanReadable"})," and ",(0,n.jsx)(o.A,{network:"polkadotpeople",path:"consts.identity.byteDeposit",defaultValue:1e5,filter:"humanReadable"})," (per byte) per each field beyond the legal name."]}),(0,n.jsx)(a.h4,{id:"sub-identity-deposit",children:"Sub-identity Deposit"}),(0,n.jsxs)(a.p,{children:["The creation of a Polkadot sub-identity required a deposit of ",(0,n.jsx)(o.A,{network:"polkadotpeople",path:"consts.identity.subAccountDeposit",defaultValue:20053e5,filter:"humanReadable"}),"."]})]}),(0,n.jsxs)(r.A,{value:"kp",children:[(0,n.jsx)(a.h4,{id:"identity-deposit-1",children:"Identity Deposit"}),(0,n.jsxs)(a.p,{children:["The creation of a Kusama identity required a deposit of ",(0,n.jsx)(o.A,{network:"kusamapeople",path:"consts.identity.basicDeposit",defaultValue:6672333321,filter:"humanReadable"})," and ",(0,n.jsx)(o.A,{network:"kusamapeople",path:"consts.identity.byteDeposit",defaultValue:333333,filter:"humanReadable"})," (per byte) per each field beyond the legal name."]}),(0,n.jsx)(a.h4,{id:"sub-identity-deposit-1",children:"Sub-identity Deposit"}),(0,n.jsxs)(a.p,{children:["The creation of a Kusama sub-identity required a deposit of ",(0,n.jsx)(o.A,{network:"kusamapeople",path:"consts.identity.subAccountDeposit",defaultValue:6684333309,filter:"humanReadable"}),"."]})]})]})}function h(e={}){const{wrapper:a}={...(0,i.R)(),...e.components};return a?(0,n.jsx)(a,{...e,children:(0,n.jsx)(p,{...e})}):p(e)}},47379:(e,a,t)=>{"use strict";t.d(a,{A:()=>m});var n=t(90675),i=t(10467),o=t(96540),s=t(19588),r=t(2026),l=t(11135);function u(e,a,t){return d.apply(this,arguments)}function d(){return(d=(0,i.A)((0,n.A)().mark((function e(a,t,i){var o,l,u,d,c;return(0,n.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=void 0,l=void 0,e.t0=a,e.next="polkadot"===e.t0?5:"kusama"===e.t0?7:"statemine"===e.t0?9:"statemint"===e.t0?11:"polkadotpeople"===e.t0?13:"kusamapeople"===e.t0?15:17;break;case 5:return o="wss://rpc.polkadot.io",e.abrupt("break",18);case 7:return o="wss://kusama-rpc.polkadot.io/",e.abrupt("break",18);case 9:return o="wss://statemine-rpc.polkadot.io/",e.abrupt("break",18);case 11:return o="wss://statemint-rpc.polkadot.io/",e.abrupt("break",18);case 13:return o="wss://polkadot-people-rpc.polkadot.io/",e.abrupt("break",18);case 15:return o="wss://kusama-people-rpc.polkadot.io/",e.abrupt("break",18);case 17:console.log("Unknown socket url provided, no connection made.");case 18:if(void 0!==o){e.next=22;break}return e.abrupt("return");case 22:return u=new s.E(o),e.next=25,r.G.create({provider:u});case 25:d=e.sent,(c=t.split(".")).forEach((function(e){e in d&&(d=d[e])})),e.t1=c[0],e.next="consts"===e.t1?31:"query"===e.t1?33:38;break;case 31:return l=d.toString(),e.abrupt("break",39);case 33:return e.next=35,d();case 35:return l=(l=e.sent).toString(),e.abrupt("break",39);case 38:console.log("Unknown path prefix ("+c[0]+") in "+t);case 39:return e.abrupt("return",l);case 40:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function c(e,a,t,n){switch(a){case"humanReadable":(0,l.HumanReadable)(e,t,n);break;case"precise":(0,l.Precise)(e,t,n);break;case"blocksToDays":(0,l.BlocksToDays)(e,n);break;case"erasToDays":(0,l.ErasToDays)(e,n,t);break;case"percentage":(0,l.Percentage)(e,n);break;case"permillToPercent":(0,l.PermillToPercent)(e,n);break;case"arrayLength":(0,l.ArrayLength)(e,n);break;default:return void console.log("Ignoring unknown filter type")}}const m=function(e){var a=e.network,t=e.path,s=e.defaultValue,r=e.filter,l=void 0===r?void 0:r,d=(0,o.useState)(""),m=d[0],p=d[1];return a=a.toLowerCase(),(0,o.useEffect)((function(){void 0!==l?c(s.toString(),l,a,p):p(s.toString());var e=void 0;switch(a){case"polkadot":e="wss://rpc.polkadot.io";break;case"kusama":e="wss://kusama-rpc.polkadot.io/";break;case"statemine":e="wss://kusama-asset-hub-rpc.polkadot.io/";break;case"statemint":e="wss://polkadot-asset-hub-rpc.polkadot.io/";break;case"kusamapeople":e="wss://kusama-people-rpc.polkadot.io";break;case"polkadotpeople":e="wss://polkadot-people-rpc.polkadot.io";break;default:console.log("Unknown network provided, "+a)}if(void 0===e)console.log("Failed to connect to a valid websocket, applying default");else{var o=function(){var e=(0,i.A)((0,n.A)().mark((function e(){var i;return(0,n.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,u(a,t,p);case 2:if(void 0!==(i=e.sent)){e.next=7;break}return e.abrupt("return");case 7:void 0!==l?c(i,l,a,p):p(i);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();try{o()}catch(r){console.log(r)}}}),[]),m}},11135:e=>{var a="polkadot",t="kusama",n="statemine",i="statemint",o="polkadotpeople",s="kusamapeople",r={polkadot:{precision:1e10,symbol:"DOT"},kusama:{precision:1e12,symbol:"KSM"},statemint:{precision:1e10,symbol:"DOT"},statemine:{precision:1e12,symbol:"KSM"},polkadotpeople:{precision:1e10,symbol:"DOT"},kusamapeople:{precision:1e12,symbol:"KSM"}};e.exports={HumanReadable:function(e,l,u){var d=void 0;if(l===a||l===i)d=3;else if(l===t||l===n||l===o)d=6;else{if(l!=s)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");d=8}e=parseFloat(e),u((e=Number.isInteger(e/r[l].precision)?e/r[l].precision+" "+r[l].symbol:(e/r[l].precision).toFixed(d)+" "+r[l].symbol).toString())},Precise:function(e,a,t){t(e=(e=parseFloat(e))/r[a].precision+" "+r[a].symbol)},BlocksToDays:function(e,a){a((e=6*e/86400).toString())},ErasToDays:function(e,r,l){var u=void 0;if(l===a||l===i||l==o)u=1;else{if(l!==t&&l!==n&&l!=s)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");u=4}r((e/=u).toString())},Percentage:function(e,a){a((e/=1e7).toString())},PermillToPercent:function(e,a){a((e/=1e4).toString())},ArrayLength:function(e,a){a((e=e.split(",").length).toString())}}},19365:(e,a,t)=>{"use strict";t.d(a,{A:()=>s});t(96540);var n=t(34164);const i={tabItem:"tabItem_Ymn6"};var o=t(74848);function s(e){var a=e.children,t=e.hidden,s=e.className;return(0,o.jsx)("div",{role:"tabpanel",className:(0,n.A)(i.tabItem,s),hidden:t,children:a})}},11470:(e,a,t)=>{"use strict";t.d(a,{A:()=>y});var n=t(96540),i=t(34164),o=t(23104),s=t(56347),r=t(205),l=t(57485),u=t(31682),d=t(75376);function c(e){var a,t;return null!=(a=null==(t=n.Children.toArray(e).filter((function(e){return"\n"!==e})).map((function(e){if(!e||(0,n.isValidElement)(e)&&((a=e.props)&&"object"==typeof a&&"value"in a))return e;var a;throw new Error("Docusaurus error: Bad child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:t.filter(Boolean))?a:[]}function m(e){var a=e.values,t=e.children;return(0,n.useMemo)((function(){var e=null!=a?a:function(e){return c(e).map((function(e){var a=e.props;return{value:a.value,label:a.label,attributes:a.attributes,default:a.default}}))}(t);return function(e){var a=(0,u.XI)(e,(function(e,a){return e.value===a.value}));if(a.length>0)throw new Error('Docusaurus error: Duplicate values "'+a.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[a,t])}function p(e){var a=e.value;return e.tabValues.some((function(e){return e.value===a}))}function h(e){var a=e.queryString,t=void 0!==a&&a,i=e.groupId,o=(0,s.W6)(),r=function(e){var a=e.queryString,t=void 0!==a&&a,n=e.groupId;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=n?n:null}({queryString:t,groupId:i});return[(0,l.aZ)(r),(0,n.useCallback)((function(e){if(r){var a=new URLSearchParams(o.location.search);a.set(r,e),o.replace(Object.assign({},o.location,{search:a.toString()}))}}),[r,o])]}function x(e){var a,t,i,o,s=e.defaultValue,l=e.queryString,u=void 0!==l&&l,c=e.groupId,x=m(e),f=(0,n.useState)((function(){return function(e){var a,t=e.defaultValue,n=e.tabValues;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!p({value:t,tabValues:n}))throw new Error('Docusaurus error: The has a defaultValue "'+t+'" but none of its children has the corresponding value. Available values are: '+n.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return t}var i=null!=(a=n.find((function(e){return e.default})))?a:n[0];if(!i)throw new Error("Unexpected error: 0 tabValues");return i.value}({defaultValue:s,tabValues:x})})),k=f[0],b=f[1],v=h({queryString:u,groupId:c}),j=v[0],g=v[1],y=(a=function(e){return e?"docusaurus.tab."+e:null}({groupId:c}.groupId),t=(0,d.Dv)(a),i=t[0],o=t[1],[i,(0,n.useCallback)((function(e){a&&o.set(e)}),[a,o])]),w=y[0],A=y[1],V=function(){var e=null!=j?j:w;return p({value:e,tabValues:x})?e:null}();return(0,r.A)((function(){V&&b(V)}),[V]),{selectedValue:k,selectValue:(0,n.useCallback)((function(e){if(!p({value:e,tabValues:x}))throw new Error("Can't select invalid tab value="+e);b(e),g(e),A(e)}),[g,A,x]),tabValues:x}}var f=t(92303);const k={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var b=t(74848);function v(e){var a=e.className,t=e.block,n=e.selectedValue,s=e.selectValue,r=e.tabValues,l=[],u=(0,o.a_)().blockElementScrollPositionUntilNextRender,d=function(e){var a=e.currentTarget,t=l.indexOf(a),i=r[t].value;i!==n&&(u(a),s(i))},c=function(e){var a,t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":var n,i=l.indexOf(e.currentTarget)+1;t=null!=(n=l[i])?n:l[0];break;case"ArrowLeft":var o,s=l.indexOf(e.currentTarget)-1;t=null!=(o=l[s])?o:l[l.length-1]}null==(a=t)||a.focus()};return(0,b.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,i.A)("tabs",{"tabs--block":t},a),children:r.map((function(e){var a=e.value,t=e.label,o=e.attributes;return(0,b.jsx)("li",Object.assign({role:"tab",tabIndex:n===a?0:-1,"aria-selected":n===a,ref:function(e){return l.push(e)},onKeyDown:c,onClick:d},o,{className:(0,i.A)("tabs__item",k.tabItem,null==o?void 0:o.className,{"tabs__item--active":n===a}),children:null!=t?t:a}),a)}))})}function j(e){var a=e.lazy,t=e.children,o=e.selectedValue,s=(Array.isArray(t)?t:[t]).filter(Boolean);if(a){var r=s.find((function(e){return e.props.value===o}));return r?(0,n.cloneElement)(r,{className:(0,i.A)("margin-top--md",r.props.className)}):null}return(0,b.jsx)("div",{className:"margin-top--md",children:s.map((function(e,a){return(0,n.cloneElement)(e,{key:a,hidden:e.props.value!==o})}))})}function g(e){var a=x(e);return(0,b.jsxs)("div",{className:(0,i.A)("tabs-container",k.tabList),children:[(0,b.jsx)(v,Object.assign({},a,e)),(0,b.jsx)(j,Object.assign({},a,e))]})}function y(e){var a=(0,f.A)();return(0,b.jsx)(g,Object.assign({},e,{children:c(e.children)}),String(a))}},47790:()=>{}}]); \ No newline at end of file diff --git a/assets/js/2334.0a492c22.js b/assets/js/2334.0a492c22.js new file mode 100644 index 000000000000..05ce7e21fa55 --- /dev/null +++ b/assets/js/2334.0a492c22.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2334],{62334:(e,n,t)=>{t.d(n,{Zp:()=>Rn});var r=t(8058),o=t(28894),i=0;const u=function(e){var n=++i;return(0,o.A)(e)+n};var a=t(39142),s=t(34098),d=t(74722),c=Math.ceil,h=Math.max;const f=function(e,n,t,r){for(var o=-1,i=h(c((n-e)/(t||1)),0),u=Array(i);i--;)u[r?i:++o]=e,e+=t;return u};var v=t(6832),l=t(74342);const g=function(e){return function(n,t,r){return r&&"number"!=typeof r&&(0,v.A)(n,t,r)&&(t=r=void 0),n=(0,l.A)(n),void 0===t?(t=n,n=0):t=(0,l.A)(t),r=void 0===r?n0;--a)if(r=n[a].dequeue()){o=o.concat(_(e,n,t,r,!0));break}}return o}(t.graph,t.buckets,t.zeroIdx);return s.A(d.A(o,(function(n){return e.outEdges(n.v,n.w)})))}function _(e,n,t,o,i){var u=i?[]:void 0;return r.A(e.inEdges(o.v),(function(r){var o=e.edge(r),a=e.node(r.v);i&&u.push({v:r.v,w:r.w}),a.out-=o,E(n,t,a)})),r.A(e.outEdges(o.v),(function(r){var o=e.edge(r),i=r.w,u=e.node(i);u.in-=o,E(n,t,u)})),e.removeNode(o.v),u}function E(e,n,t){t.out?t.in?e[t.out-t.in+n].enqueue(t):e[e.length-1].enqueue(t):e[0].enqueue(t)}function x(e){var n="greedy"===e.graph().acyclicer?y(e,function(e){return function(n){return e.edge(n).weight}}(e)):function(e){var n=[],t={},o={};function i(u){Object.prototype.hasOwnProperty.call(o,u)||(o[u]=!0,t[u]=!0,r.A(e.outEdges(u),(function(e){Object.prototype.hasOwnProperty.call(t,e.w)?n.push(e):i(e.w)})),delete t[u])}return r.A(e.nodes(),i),n}(e);r.A(n,(function(n){var t=e.edge(n);e.removeEdge(n),t.forwardName=n.name,t.reversed=!0,e.setEdge(n.w,n.v,t,u("rev"))}))}var O=t(42837),k=t(99354),N=t(39188);const P=function(e,n){return(0,k.A)(e,n,(function(n,t){return(0,N.A)(e,t)}))};var j=t(76875),C=t(67525);const I=function(e){return(0,C.A)((0,j.A)(e,void 0,s.A),e+"")}((function(e,n){return null==e?{}:P(e,n)}));var L=t(23068),T=t(72559);const M=function(e,n){return e>n};var R=t(29008);const F=function(e){return e&&e.length?(0,T.A)(e,R.A,M):void 0};var D=t(26666),S=t(52528),G=t(79841),V=t(23958);const B=function(e,n){var t={};return n=(0,V.A)(n,3),(0,G.A)(e,(function(e,r,o){(0,S.A)(t,r,n(e,r,o))})),t};var q=t(69592),Y=t(86452),z=t(48585),$=t(41917);const J=function(){return $.A.Date.now()};function Z(e,n,t,r){var o;do{o=u(r)}while(e.hasNode(o));return t.dummy=n,e.setNode(o,t),o}function H(e){var n=new p.T({multigraph:e.isMultigraph()}).setGraph(e.graph());return r.A(e.nodes(),(function(t){e.children(t).length||n.setNode(t,e.node(t))})),r.A(e.edges(),(function(t){n.setEdge(t,e.edge(t))})),n}function K(e,n){var t,r,o=e.x,i=e.y,u=n.x-o,a=n.y-i,s=e.width/2,d=e.height/2;if(!u&&!a)throw new Error("Not possible to find intersection inside of the rectangle");return Math.abs(a)*s>Math.abs(u)*d?(a<0&&(d=-d),t=d*u/a,r=d):(u<0&&(s=-s),t=s,r=s*a/u),{x:o+t,y:i+r}}function Q(e){var n=d.A(g(W(e)+1),(function(){return[]}));return r.A(e.nodes(),(function(t){var r=e.node(t),o=r.rank;q.A(o)||(n[o][r.order]=t)})),n}function U(e,n,t,r){var o={width:0,height:0};return arguments.length>=4&&(o.rank=t,o.order=r),Z(e,"border",o,n)}function W(e){return F(d.A(e.nodes(),(function(n){var t=e.node(n).rank;if(!q.A(t))return t})))}function X(e,n){var t=J();try{return n()}finally{console.log(e+" time: "+(J()-t)+"ms")}}function ee(e,n){return n()}function ne(e,n,t,r,o,i){var u={width:0,height:0,rank:i,borderType:n},a=o[n][i-1],s=Z(e,"border",u,t);o[n][i]=s,e.setParent(s,r),a&&e.setEdge(a,s,{weight:1})}function te(e){var n=e.graph().rankdir.toLowerCase();"bt"!==n&&"rl"!==n||function(e){r.A(e.nodes(),(function(n){ie(e.node(n))})),r.A(e.edges(),(function(n){var t=e.edge(n);r.A(t.points,ie),Object.prototype.hasOwnProperty.call(t,"y")&&ie(t)}))}(e),"lr"!==n&&"rl"!==n||(!function(e){r.A(e.nodes(),(function(n){ue(e.node(n))})),r.A(e.edges(),(function(n){var t=e.edge(n);r.A(t.points,ue),Object.prototype.hasOwnProperty.call(t,"x")&&ue(t)}))}(e),re(e))}function re(e){r.A(e.nodes(),(function(n){oe(e.node(n))})),r.A(e.edges(),(function(n){oe(e.edge(n))}))}function oe(e){var n=e.width;e.width=e.height,e.height=n}function ie(e){e.y=-e.y}function ue(e){var n=e.x;e.x=e.y,e.y=n}function ae(e){e.graph().dummyChains=[],r.A(e.edges(),(function(n){!function(e,n){var t=n.v,r=e.node(t).rank,o=n.w,i=e.node(o).rank,u=n.name,a=e.edge(n),s=a.labelRank;if(i===r+1)return;e.removeEdge(n);var d,c,h=void 0;for(c=0,++r;ru.lim&&(a=u,s=!0);var d=Ae.A(n.edges(),(function(n){return s===Be(e,e.node(n.v),a)&&s!==Be(e,e.node(n.w),a)}));return de(d,(function(e){return he(n,e)}))}function Ve(e,n,t,o){var i=t.v,u=t.w;e.removeEdge(i,u),e.setEdge(o.v,o.w,{}),Fe(e),Me(e,n),function(e,n){var t=pe.A(e.nodes(),(function(e){return!n.node(e).parent})),o=function(e,n){return Ie(e,n,"pre")}(e,t);o=o.slice(1),r.A(o,(function(t){var r=e.node(t).parent,o=n.edge(t,r),i=!1;o||(o=n.edge(r,t),i=!0),n.node(t).rank=n.node(r).rank+(i?o.minlen:-o.minlen)}))}(e,n)}function Be(e,n,t){return t.low<=n.lim&&n.lim<=t.lim}function qe(e){switch(e.graph().ranker){case"network-simplex":default:ze(e);break;case"tight-tree":!function(e){ce(e),fe(e)}(e);break;case"longest-path":Ye(e)}}Te.initLowLimValues=Fe,Te.initCutValues=Me,Te.calcCutValue=Re,Te.leaveEdge=Se,Te.enterEdge=Ge,Te.exchangeEdges=Ve;var Ye=ce;function ze(e){Te(e)}var $e=t(38207),Je=t(89463);function Ze(e){var n=Z(e,"root",{},"_root"),t=function(e){var n={};function t(o,i){var u=e.children(o);u&&u.length&&r.A(u,(function(e){t(e,i+1)})),n[o]=i}return r.A(e.children(),(function(e){t(e,1)})),n}(e),o=F($e.A(t))-1,i=2*o+1;e.graph().nestingRoot=n,r.A(e.edges(),(function(n){e.edge(n).minlen*=i}));var u=function(e){return Je.A(e.edges(),(function(n,t){return n+e.edge(t).weight}),0)}(e)+1;r.A(e.children(),(function(r){He(e,n,i,u,o,t,r)})),e.graph().nodeRankFactor=i}function He(e,n,t,o,i,u,a){var s=e.children(a);if(s.length){var d=U(e,"_bt"),c=U(e,"_bb"),h=e.node(a);e.setParent(d,a),h.borderTop=d,e.setParent(c,a),h.borderBottom=c,r.A(s,(function(r){He(e,n,t,o,i,u,r);var s=e.node(r),h=s.borderTop?s.borderTop:r,f=s.borderBottom?s.borderBottom:r,v=s.borderTop?o:2*o,l=h!==f?1:i-u[a]+1;e.setEdge(d,h,{weight:v,minlen:l,nestingEdge:!0}),e.setEdge(f,c,{weight:v,minlen:l,nestingEdge:!0})})),e.parent(a)||e.setEdge(n,d,{weight:0,minlen:i+u[a]})}else a!==n&&e.setEdge(n,a,{weight:0,minlen:t})}var Ke=t(68675);const Qe=function(e){return(0,Ke.A)(e,5)};function Ue(e,n,t){var o=function(e){var n;for(;e.hasNode(n=u("_root")););return n}(e),i=new p.T({compound:!0}).setGraph({root:o}).setDefaultNodeLabel((function(n){return e.node(n)}));return r.A(e.nodes(),(function(u){var a=e.node(u),s=e.parent(u);(a.rank===n||a.minRank<=n&&n<=a.maxRank)&&(i.setNode(u),i.setParent(u,s||o),r.A(e[t](u),(function(n){var t=n.v===u?n.w:n.v,r=i.edge(t,u),o=q.A(r)?0:r.weight;i.setEdge(t,u,{weight:e.edge(n).weight+o})})),Object.prototype.hasOwnProperty.call(a,"minRank")&&i.setNode(u,{borderLeft:a.borderLeft[n],borderRight:a.borderRight[n]}))})),i}var We=t(52851);const Xe=function(e,n,t){for(var r=-1,o=e.length,i=n.length,u={};++rn||i&&u&&s&&!a&&!d||r&&u&&s||!t&&s||!o)return 1;if(!r&&!i&&!d&&e=a?s:s*("desc"==t[r]?-1:1)}return e.index-n.index};const hn=function(e,n,t){n=n.length?(0,tn.A)(n,(function(e){return(0,Ce.A)(e)?function(n){return(0,rn.A)(n,1===e.length?e[0]:e)}:e})):[R.A];var r=-1;n=(0,tn.A)(n,(0,an.A)(V.A));var o=(0,on.A)(e,(function(e,t,o){return{criteria:(0,tn.A)(n,(function(n){return n(e)})),index:++r,value:e}}));return un(o,(function(e,n){return cn(e,n,t)}))};const fn=(0,t(24326).A)((function(e,n){if(null==e)return[];var t=n.length;return t>1&&(0,v.A)(e,n[0],n[1])?n=[]:t>2&&(0,v.A)(n[0],n[1],n[2])&&(n=[n[0]]),hn(e,(0,nn.A)(n,1),[])}));function vn(e,n){for(var t=0,r=1;r0;)n%2&&(t+=c[n+1]),c[n=n-1>>1]+=e.weight;h+=e.weight*t}))),h}function gn(e,n){var t={};return r.A(e,(function(e,n){var r=t[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:n};q.A(e.barycenter)||(r.barycenter=e.barycenter,r.weight=e.weight)})),r.A(n.edges(),(function(e){var n=t[e.v],r=t[e.w];q.A(n)||q.A(r)||(r.indegree++,n.out.push(t[e.w]))})),function(e){var n=[];function t(e){return function(n){n.merged||(q.A(n.barycenter)||q.A(e.barycenter)||n.barycenter>=e.barycenter)&&function(e,n){var t=0,r=0;e.weight&&(t+=e.barycenter*e.weight,r+=e.weight);n.weight&&(t+=n.barycenter*n.weight,r+=n.weight);e.vs=n.vs.concat(e.vs),e.barycenter=t/r,e.weight=r,e.i=Math.min(n.i,e.i),n.merged=!0}(e,n)}}function o(n){return function(t){t.in.push(n),0==--t.indegree&&e.push(t)}}for(;e.length;){var i=e.pop();n.push(i),r.A(i.in.reverse(),t(i)),r.A(i.out,o(i))}return d.A(Ae.A(n,(function(e){return!e.merged})),(function(e){return I(e,["vs","i","barycenter","weight"])}))}(Ae.A(t,(function(e){return!e.indegree})))}function pn(e,n){var t,o=function(e,n){var t={lhs:[],rhs:[]};return r.A(e,(function(e){n(e)?t.lhs.push(e):t.rhs.push(e)})),t}(e,(function(e){return Object.prototype.hasOwnProperty.call(e,"barycenter")})),i=o.lhs,u=fn(o.rhs,(function(e){return-e.i})),a=[],d=0,c=0,h=0;i.sort((t=!!n,function(e,n){return e.barycentern.barycenter?1:t?n.i-e.i:e.i-n.i})),h=An(a,u,h),r.A(i,(function(e){h+=e.vs.length,a.push(e.vs),d+=e.barycenter*e.weight,c+=e.weight,h=An(a,u,h)}));var f={vs:s.A(a)};return c&&(f.barycenter=d/c,f.weight=c),f}function An(e,n,t){for(var r;n.length&&(r=D.A(n)).i<=t;)n.pop(),e.push(r.vs),t++;return t}function wn(e,n,t,o){var i=e.children(n),u=e.node(n),a=u?u.borderLeft:void 0,c=u?u.borderRight:void 0,h={};a&&(i=Ae.A(i,(function(e){return e!==a&&e!==c})));var f=function(e,n){return d.A(n,(function(n){var t=e.inEdges(n);if(t.length){var r=Je.A(t,(function(n,t){var r=e.edge(t),o=e.node(t.v);return{sum:n.sum+r.weight*o.order,weight:n.weight+r.weight}}),{sum:0,weight:0});return{v:n,barycenter:r.sum/r.weight,weight:r.weight}}return{v:n}}))}(e,i);r.A(f,(function(n){if(e.children(n.v).length){var r=wn(e,n.v,t,o);h[n.v]=r,Object.prototype.hasOwnProperty.call(r,"barycenter")&&(i=n,u=r,q.A(i.barycenter)?(i.barycenter=u.barycenter,i.weight=u.weight):(i.barycenter=(i.barycenter*i.weight+u.barycenter*u.weight)/(i.weight+u.weight),i.weight+=u.weight))}var i,u}));var v=gn(f,t);!function(e,n){r.A(e,(function(e){e.vs=s.A(e.vs.map((function(e){return n[e]?n[e].vs:e})))}))}(v,h);var l=pn(v,o);if(a&&(l.vs=s.A([a,l.vs,c]),e.predecessors(a).length)){var g=e.node(e.predecessors(a)[0]),p=e.node(e.predecessors(c)[0]);Object.prototype.hasOwnProperty.call(l,"barycenter")||(l.barycenter=0,l.weight=0),l.barycenter=(l.barycenter*l.weight+g.order+p.order)/(l.weight+2),l.weight+=2}return l}function bn(e){var n=W(e),t=mn(e,g(1,n+1),"inEdges"),o=mn(e,g(n-1,-1,-1),"outEdges"),i=function(e){var n={},t=Ae.A(e.nodes(),(function(n){return!e.children(n).length})),o=F(d.A(t,(function(n){return e.node(n).rank}))),i=d.A(g(o+1),(function(){return[]})),u=fn(t,(function(n){return e.node(n).rank}));return r.A(u,(function t(o){if(!z.A(n,o)){n[o]=!0;var u=e.node(o);i[u.rank].push(o),r.A(e.successors(o),t)}})),i}(e);_n(e,i);for(var u,a=Number.POSITIVE_INFINITY,s=0,c=0;c<4;++s,++c){yn(s%2?t:o,s%4>=2);var h=vn(e,i=Q(e));hs||d>n[o].lim));i=o,o=r;for(;(o=e.parent(o))!==i;)a.push(o);return{path:u.concat(a.reverse()),lca:i}}(e,n,o.v,o.w),u=i.path,a=i.lca,s=0,d=u[s],c=!0;t!==o.w;){if(r=e.node(t),c){for(;(d=u[s])!==a&&e.node(d).maxRankt){var r=n;n=t,t=r}var o=e[n];o||(e[n]=o={}),o[t]=!0}function In(e,n,t){if(n>t){var r=n;n=t,t=r}return!!e[n]&&Object.prototype.hasOwnProperty.call(e[n],t)}function Ln(e,n,t,o,i){var u={},a=function(e,n,t,o){var i=new p.T,u=e.graph(),a=function(e,n,t){return function(r,o,i){var u,a=r.node(o),s=r.node(i),d=0;if(d+=a.width/2,Object.prototype.hasOwnProperty.call(a,"labelpos"))switch(a.labelpos.toLowerCase()){case"l":u=-a.width/2;break;case"r":u=a.width/2}if(u&&(d+=t?u:-u),u=0,d+=(a.dummy?n:e)/2,d+=(s.dummy?n:e)/2,d+=s.width/2,Object.prototype.hasOwnProperty.call(s,"labelpos"))switch(s.labelpos.toLowerCase()){case"l":u=s.width/2;break;case"r":u=-s.width/2}return u&&(d+=t?u:-u),u=0,d}}(u.nodesep,u.edgesep,o);return r.A(n,(function(n){var o;r.A(n,(function(n){var r=t[n];if(i.setNode(r),o){var u=t[o],s=i.edge(u,r);i.setEdge(u,r,Math.max(a(e,n,o),s||0))}o=n}))})),i}(e,n,t,i),s=i?"borderLeft":"borderRight";function d(e,n){for(var t=a.nodes(),r=t.pop(),o={};r;)o[r]?e(r):(o[r]=!0,t.push(r),t=t.concat(n(r))),r=t.pop()}return d((function(e){u[e]=a.inEdges(e).reduce((function(e,n){return Math.max(e,u[n.v]+a.edge(n))}),0)}),a.predecessors.bind(a)),d((function(n){var t=a.outEdges(n).reduce((function(e,n){return Math.min(e,u[n.w]-a.edge(n))}),Number.POSITIVE_INFINITY),r=e.node(n);t!==Number.POSITIVE_INFINITY&&r.borderType!==s&&(u[n]=Math.max(u[n],t))}),a.successors.bind(a)),r.A(o,(function(e){u[e]=u[t[e]]})),u}function Tn(e){var n,t=Q(e),o=O.A(jn(e,t),function(e,n){var t={};function o(n,o,i,u,a){var s;r.A(g(o,i),(function(o){s=n[o],e.node(s).dummy&&r.A(e.predecessors(s),(function(n){var r=e.node(n);r.dummy&&(r.ordera)&&Cn(t,n,s)}))}))}return Je.A(n,(function(n,t){var i,u=-1,a=0;return r.A(t,(function(r,s){if("border"===e.node(r).dummy){var d=e.predecessors(r);d.length&&(i=e.node(d[0]).order,o(t,a,s,u,i),a=s,u=i)}o(t,a,t.length,i,n.length)})),t})),t}(e,t)),i={};r.A(["u","d"],(function(u){n="u"===u?t:$e.A(t).reverse(),r.A(["l","r"],(function(t){"r"===t&&(n=d.A(n,(function(e){return $e.A(e).reverse()})));var a=("u"===u?e.predecessors:e.successors).bind(e),s=function(e,n,t,o){var i={},u={},a={};return r.A(n,(function(e){r.A(e,(function(e,n){i[e]=e,u[e]=e,a[e]=n}))})),r.A(n,(function(e){var n=-1;r.A(e,(function(e){var r=o(e);if(r.length){r=fn(r,(function(e){return a[e]}));for(var s=(r.length-1)/2,d=Math.floor(s),c=Math.ceil(s);d<=c;++d){var h=r[d];u[e]===e&&n{var n=t(" buildLayoutGraph",(()=>function(e){var n=new p.T({multigraph:!0,compound:!0}),t=$n(e.graph());return n.setGraph(O.A({},Dn,zn(t,Fn),I(t,Sn))),r.A(e.nodes(),(function(t){var r=$n(e.node(t));n.setNode(t,L.A(zn(r,Gn),Vn)),n.setParent(t,e.parent(t))})),r.A(e.edges(),(function(t){var r=$n(e.edge(t));n.setEdge(t,O.A({},qn,zn(r,Bn),I(r,Yn)))})),n}(e)));t(" runLayout",(()=>function(e,n){n(" makeSpaceForEdgeLabels",(()=>function(e){var n=e.graph();n.ranksep/=2,r.A(e.edges(),(function(t){var r=e.edge(t);r.minlen*=2,"c"!==r.labelpos.toLowerCase()&&("TB"===n.rankdir||"BT"===n.rankdir?r.width+=r.labeloffset:r.height+=r.labeloffset)}))}(e))),n(" removeSelfEdges",(()=>function(e){r.A(e.edges(),(function(n){if(n.v===n.w){var t=e.node(n.v);t.selfEdges||(t.selfEdges=[]),t.selfEdges.push({e:n,label:e.edge(n)}),e.removeEdge(n)}}))}(e))),n(" acyclic",(()=>x(e))),n(" nestingGraph.run",(()=>Ze(e))),n(" rank",(()=>qe(H(e)))),n(" injectEdgeLabelProxies",(()=>function(e){r.A(e.edges(),(function(n){var t=e.edge(n);if(t.width&&t.height){var r=e.node(n.v),o={rank:(e.node(n.w).rank-r.rank)/2+r.rank,e:n};Z(e,"edge-proxy",o,"_ep")}}))}(e))),n(" removeEmptyRanks",(()=>function(e){var n=Y.A(d.A(e.nodes(),(function(n){return e.node(n).rank}))),t=[];r.A(e.nodes(),(function(r){var o=e.node(r).rank-n;t[o]||(t[o]=[]),t[o].push(r)}));var o=0,i=e.graph().nodeRankFactor;r.A(t,(function(n,t){q.A(n)&&t%i!=0?--o:o&&r.A(n,(function(n){e.node(n).rank+=o}))}))}(e))),n(" nestingGraph.cleanup",(()=>function(e){var n=e.graph();e.removeNode(n.nestingRoot),delete n.nestingRoot,r.A(e.edges(),(function(n){e.edge(n).nestingEdge&&e.removeEdge(n)}))}(e))),n(" normalizeRanks",(()=>function(e){var n=Y.A(d.A(e.nodes(),(function(n){return e.node(n).rank})));r.A(e.nodes(),(function(t){var r=e.node(t);z.A(r,"rank")&&(r.rank-=n)}))}(e))),n(" assignRankMinMax",(()=>function(e){var n=0;r.A(e.nodes(),(function(t){var r=e.node(t);r.borderTop&&(r.minRank=e.node(r.borderTop).rank,r.maxRank=e.node(r.borderBottom).rank,n=F(n,r.maxRank))})),e.graph().maxRank=n}(e))),n(" removeEdgeLabelProxies",(()=>function(e){r.A(e.nodes(),(function(n){var t=e.node(n);"edge-proxy"===t.dummy&&(e.edge(t.e).labelRank=t.rank,e.removeNode(n))}))}(e))),n(" normalize.run",(()=>ae(e))),n(" parentDummyChains",(()=>En(e))),n(" addBorderSegments",(()=>function(e){r.A(e.children(),(function n(t){var o=e.children(t),i=e.node(t);if(o.length&&r.A(o,n),Object.prototype.hasOwnProperty.call(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var u=i.minRank,a=i.maxRank+1;ubn(e))),n(" insertSelfEdges",(()=>function(e){var n=Q(e);r.A(n,(function(n){var t=0;r.A(n,(function(n,o){var i=e.node(n);i.order=o+t,r.A(i.selfEdges,(function(n){Z(e,"selfedge",{width:n.label.width,height:n.label.height,rank:i.rank,order:o+ ++t,e:n.e,label:n.label},"_se")})),delete i.selfEdges}))}))}(e))),n(" adjustCoordinateSystem",(()=>function(e){var n=e.graph().rankdir.toLowerCase();"lr"!==n&&"rl"!==n||re(e)}(e))),n(" position",(()=>Mn(e))),n(" positionSelfEdges",(()=>function(e){r.A(e.nodes(),(function(n){var t=e.node(n);if("selfedge"===t.dummy){var r=e.node(t.e.v),o=r.x+r.width/2,i=r.y,u=t.x-o,a=r.height/2;e.setEdge(t.e,t.label),e.removeNode(n),t.label.points=[{x:o+2*u/3,y:i-a},{x:o+5*u/6,y:i-a},{x:o+u,y:i},{x:o+5*u/6,y:i+a},{x:o+2*u/3,y:i+a}],t.label.x=t.x,t.label.y=t.y}}))}(e))),n(" removeBorderNodes",(()=>function(e){r.A(e.nodes(),(function(n){if(e.children(n).length){var t=e.node(n),r=e.node(t.borderTop),o=e.node(t.borderBottom),i=e.node(D.A(t.borderLeft)),u=e.node(D.A(t.borderRight));t.width=Math.abs(u.x-i.x),t.height=Math.abs(o.y-r.y),t.x=i.x+t.width/2,t.y=r.y+t.height/2}})),r.A(e.nodes(),(function(n){"border"===e.node(n).dummy&&e.removeNode(n)}))}(e))),n(" normalize.undo",(()=>function(e){r.A(e.graph().dummyChains,(function(n){var t,r=e.node(n),o=r.edgeLabel;for(e.setEdge(r.edgeObj,o);r.dummy;)t=e.successors(n)[0],e.removeNode(n),o.points.push({x:r.x,y:r.y}),"edge-label"===r.dummy&&(o.x=r.x,o.y=r.y,o.width=r.width,o.height=r.height),n=t,r=e.node(n)}))}(e))),n(" fixupEdgeLabelCoords",(()=>function(e){r.A(e.edges(),(function(n){var t=e.edge(n);if(Object.prototype.hasOwnProperty.call(t,"x"))switch("l"!==t.labelpos&&"r"!==t.labelpos||(t.width-=t.labeloffset),t.labelpos){case"l":t.x-=t.width/2+t.labeloffset;break;case"r":t.x+=t.width/2+t.labeloffset}}))}(e))),n(" undoCoordinateSystem",(()=>te(e))),n(" translateGraph",(()=>function(e){var n=Number.POSITIVE_INFINITY,t=0,o=Number.POSITIVE_INFINITY,i=0,u=e.graph(),a=u.marginx||0,s=u.marginy||0;function d(e){var r=e.x,u=e.y,a=e.width,s=e.height;n=Math.min(n,r-a/2),t=Math.max(t,r+a/2),o=Math.min(o,u-s/2),i=Math.max(i,u+s/2)}r.A(e.nodes(),(function(n){d(e.node(n))})),r.A(e.edges(),(function(n){var t=e.edge(n);Object.prototype.hasOwnProperty.call(t,"x")&&d(t)})),n-=a,o-=s,r.A(e.nodes(),(function(t){var r=e.node(t);r.x-=n,r.y-=o})),r.A(e.edges(),(function(t){var i=e.edge(t);r.A(i.points,(function(e){e.x-=n,e.y-=o})),Object.prototype.hasOwnProperty.call(i,"x")&&(i.x-=n),Object.prototype.hasOwnProperty.call(i,"y")&&(i.y-=o)})),u.width=t-n+a,u.height=i-o+s}(e))),n(" assignNodeIntersects",(()=>function(e){r.A(e.edges(),(function(n){var t,r,o=e.edge(n),i=e.node(n.v),u=e.node(n.w);o.points?(t=o.points[0],r=o.points[o.points.length-1]):(o.points=[],t=u,r=i),o.points.unshift(K(i,t)),o.points.push(K(u,r))}))}(e))),n(" reversePoints",(()=>function(e){r.A(e.edges(),(function(n){var t=e.edge(n);t.reversed&&t.points.reverse()}))}(e))),n(" acyclic.undo",(()=>function(e){r.A(e.edges(),(function(n){var t=e.edge(n);if(t.reversed){e.removeEdge(n);var r=t.forwardName;delete t.reversed,delete t.forwardName,e.setEdge(n.w,n.v,t,r)}}))}(e)))}(n,t))),t(" updateInputGraph",(()=>function(e,n){r.A(e.nodes(),(function(t){var r=e.node(t),o=n.node(t);r&&(r.x=o.x,r.y=o.y,n.children(t).length&&(r.width=o.width,r.height=o.height))})),r.A(e.edges(),(function(t){var r=e.edge(t),o=n.edge(t);r.points=o.points,Object.prototype.hasOwnProperty.call(o,"x")&&(r.x=o.x,r.y=o.y)})),e.graph().width=n.graph().width,e.graph().height=n.graph().height}(e,n)))}))}var Fn=["nodesep","edgesep","ranksep","marginx","marginy"],Dn={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},Sn=["acyclicer","ranker","rankdir","align"],Gn=["width","height"],Vn={width:0,height:0},Bn=["minlen","weight","width","height","labeloffset"],qn={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},Yn=["labelpos"];function zn(e,n){return B(I(e,n),Number)}function $n(e){var n={};return r.A(e,(function(e,t){n[t.toLowerCase()]=e})),n}},37981:(e,n,t)=>{t.d(n,{T:()=>w});var r=t(39142),o=t(89610),i=t(27422),u=t(94092),a=t(66401),s=t(8058),d=t(69592),c=t(13588),h=t(24326),f=t(99902),v=t(53533);const l=(0,h.A)((function(e){return(0,f.A)((0,c.A)(e,1,v.A,!0))}));var g=t(38207),p=t(89463),A="\0";class w{constructor(e={}){this._isDirected=!Object.prototype.hasOwnProperty.call(e,"directed")||e.directed,this._isMultigraph=!!Object.prototype.hasOwnProperty.call(e,"multigraph")&&e.multigraph,this._isCompound=!!Object.prototype.hasOwnProperty.call(e,"compound")&&e.compound,this._label=void 0,this._defaultNodeLabelFn=r.A(void 0),this._defaultEdgeLabelFn=r.A(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[A]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return o.A(e)||(e=r.A(e)),this._defaultNodeLabelFn=e,this}nodeCount(){return this._nodeCount}nodes(){return i.A(this._nodes)}sources(){var e=this;return u.A(this.nodes(),(function(n){return a.A(e._in[n])}))}sinks(){var e=this;return u.A(this.nodes(),(function(n){return a.A(e._out[n])}))}setNodes(e,n){var t=arguments,r=this;return s.A(e,(function(e){t.length>1?r.setNode(e,n):r.setNode(e)})),this}setNode(e,n){return Object.prototype.hasOwnProperty.call(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=n),this):(this._nodes[e]=arguments.length>1?n:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=A,this._children[e]={},this._children[A][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return Object.prototype.hasOwnProperty.call(this._nodes,e)}removeNode(e){if(Object.prototype.hasOwnProperty.call(this._nodes,e)){var n=e=>this.removeEdge(this._edgeObjs[e]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],s.A(this.children(e),(e=>{this.setParent(e)})),delete this._children[e]),s.A(i.A(this._in[e]),n),delete this._in[e],delete this._preds[e],s.A(i.A(this._out[e]),n),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,n){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(d.A(n))n=A;else{for(var t=n+="";!d.A(t);t=this.parent(t))if(t===e)throw new Error("Setting "+n+" as parent of "+e+" would create a cycle");this.setNode(n)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=n,this._children[n][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var n=this._parent[e];if(n!==A)return n}}children(e){if(d.A(e)&&(e=A),this._isCompound){var n=this._children[e];if(n)return i.A(n)}else{if(e===A)return this.nodes();if(this.hasNode(e))return[]}}predecessors(e){var n=this._preds[e];if(n)return i.A(n)}successors(e){var n=this._sucs[e];if(n)return i.A(n)}neighbors(e){var n=this.predecessors(e);if(n)return l(n,this.successors(e))}isLeaf(e){return 0===(this.isDirected()?this.successors(e):this.neighbors(e)).length}filterNodes(e){var n=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});n.setGraph(this.graph());var t=this;s.A(this._nodes,(function(t,r){e(r)&&n.setNode(r,t)})),s.A(this._edgeObjs,(function(e){n.hasNode(e.v)&&n.hasNode(e.w)&&n.setEdge(e,t.edge(e))}));var r={};function o(e){var i=t.parent(e);return void 0===i||n.hasNode(i)?(r[e]=i,i):i in r?r[i]:o(i)}return this._isCompound&&s.A(n.nodes(),(function(e){n.setParent(e,o(e))})),n}setDefaultEdgeLabel(e){return o.A(e)||(e=r.A(e)),this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return g.A(this._edgeObjs)}setPath(e,n){var t=this,r=arguments;return p.A(e,(function(e,o){return r.length>1?t.setEdge(e,o,n):t.setEdge(e,o),o})),this}setEdge(){var e,n,t,r,o=!1,i=arguments[0];"object"==typeof i&&null!==i&&"v"in i?(e=i.v,n=i.w,t=i.name,2===arguments.length&&(r=arguments[1],o=!0)):(e=i,n=arguments[1],t=arguments[3],arguments.length>2&&(r=arguments[2],o=!0)),e=""+e,n=""+n,d.A(t)||(t=""+t);var u=y(this._isDirected,e,n,t);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,u))return o&&(this._edgeLabels[u]=r),this;if(!d.A(t)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(n),this._edgeLabels[u]=o?r:this._defaultEdgeLabelFn(e,n,t);var a=function(e,n,t,r){var o=""+n,i=""+t;if(!e&&o>i){var u=o;o=i,i=u}var a={v:o,w:i};r&&(a.name=r);return a}(this._isDirected,e,n,t);return e=a.v,n=a.w,Object.freeze(a),this._edgeObjs[u]=a,b(this._preds[n],e),b(this._sucs[e],n),this._in[n][u]=a,this._out[e][u]=a,this._edgeCount++,this}edge(e,n,t){var r=1===arguments.length?_(this._isDirected,arguments[0]):y(this._isDirected,e,n,t);return this._edgeLabels[r]}hasEdge(e,n,t){var r=1===arguments.length?_(this._isDirected,arguments[0]):y(this._isDirected,e,n,t);return Object.prototype.hasOwnProperty.call(this._edgeLabels,r)}removeEdge(e,n,t){var r=1===arguments.length?_(this._isDirected,arguments[0]):y(this._isDirected,e,n,t),o=this._edgeObjs[r];return o&&(e=o.v,n=o.w,delete this._edgeLabels[r],delete this._edgeObjs[r],m(this._preds[n],e),m(this._sucs[e],n),delete this._in[n][r],delete this._out[e][r],this._edgeCount--),this}inEdges(e,n){var t=this._in[e];if(t){var r=g.A(t);return n?u.A(r,(function(e){return e.v===n})):r}}outEdges(e,n){var t=this._out[e];if(t){var r=g.A(t);return n?u.A(r,(function(e){return e.w===n})):r}}nodeEdges(e,n){var t=this.inEdges(e,n);if(t)return t.concat(this.outEdges(e,n))}}function b(e,n){e[n]?e[n]++:e[n]=1}function m(e,n){--e[n]||delete e[n]}function y(e,n,t,r){var o=""+n,i=""+t;if(!e&&o>i){var u=o;o=i,i=u}return o+"\x01"+i+"\x01"+(d.A(r)?"\0":r)}function _(e,n){return y(e,n.v,n.w,n.name)}w.prototype._nodeCount=0,w.prototype._edgeCount=0},697:(e,n,t)=>{t.d(n,{T:()=>r.T});var r=t(37981)},72559:(e,n,t)=>{t.d(n,{A:()=>o});var r=t(61882);const o=function(e,n,t){for(var o=-1,i=e.length;++o{t.d(n,{A:()=>r});const r=function(e,n){return e{t.d(n,{A:()=>i});var r=t(6240),o=t(38446);const i=function(e,n){var t=-1,i=(0,o.A)(e)?Array(e.length):[];return(0,r.A)(e,(function(e,r,o){i[++t]=n(e,r,o)})),i}},99354:(e,n,t)=>{t.d(n,{A:()=>c});var r=t(66318),o=t(52851),i=t(7819),u=t(25353),a=t(23149),s=t(30901);const d=function(e,n,t,r){if(!(0,a.A)(e))return e;for(var d=-1,c=(n=(0,i.A)(n,e)).length,h=c-1,f=e;null!=f&&++d{t.d(n,{A:()=>d});var r=t(24326),o=t(66984),i=t(6832),u=t(55615),a=Object.prototype,s=a.hasOwnProperty;const d=(0,r.A)((function(e,n){e=Object(e);var t=-1,r=n.length,d=r>2?n[2]:void 0;for(d&&(0,i.A)(n[0],n[1],d)&&(r=1);++t{t.d(n,{A:()=>c});var r=t(23958),o=t(38446),i=t(27422);const u=function(e){return function(n,t,u){var a=Object(n);if(!(0,o.A)(n)){var s=(0,r.A)(t,3);n=(0,i.A)(n),t=function(e){return s(a[e],e,a)}}var d=e(n,t,u);return d>-1?a[s?n[d]:d]:void 0}};var a=t(25707),s=t(18593),d=Math.max;const c=u((function(e,n,t){var o=null==e?0:e.length;if(!o)return-1;var i=null==t?0:(0,s.A)(t);return i<0&&(i=d(o+i,0)),(0,a.A)(e,(0,r.A)(n,3),i)}))},34098:(e,n,t)=>{t.d(n,{A:()=>o});var r=t(13588);const o=function(e){return(null==e?0:e.length)?(0,r.A)(e,1):[]}},48585:(e,n,t)=>{t.d(n,{A:()=>u});var r=Object.prototype.hasOwnProperty;const o=function(e,n){return null!=e&&r.call(e,n)};var i=t(85054);const u=function(e,n){return null!=e&&(0,i.A)(e,n,o)}},9703:(e,n,t)=>{t.d(n,{A:()=>u});var r=t(88496),o=t(92049),i=t(53098);const u=function(e){return"string"==typeof e||!(0,o.A)(e)&&(0,i.A)(e)&&"[object String]"==(0,r.A)(e)}},26666:(e,n,t)=>{t.d(n,{A:()=>r});const r=function(e){var n=null==e?0:e.length;return n?e[n-1]:void 0}},74722:(e,n,t)=>{t.d(n,{A:()=>a});var r=t(45572),o=t(23958),i=t(52568),u=t(92049);const a=function(e,n){return((0,u.A)(e)?r.A:i.A)(e,(0,o.A)(n,3))}},86452:(e,n,t)=>{t.d(n,{A:()=>u});var r=t(72559),o=t(36224),i=t(29008);const u=function(e){return e&&e.length?(0,r.A)(e,i.A,o.A):void 0}},74342:(e,n,t)=>{t.d(n,{A:()=>g});var r=/\s/;const o=function(e){for(var n=e.length;n--&&r.test(e.charAt(n)););return n};var i=/^\s+/;const u=function(e){return e?e.slice(0,o(e)+1).replace(i,""):e};var a=t(23149),s=t(61882),d=/^[-+]0x[0-9a-f]+$/i,c=/^0b[01]+$/i,h=/^0o[0-7]+$/i,f=parseInt;const v=function(e){if("number"==typeof e)return e;if((0,s.A)(e))return NaN;if((0,a.A)(e)){var n="function"==typeof e.valueOf?e.valueOf():e;e=(0,a.A)(n)?n+"":n}if("string"!=typeof e)return 0===e?e:+e;e=u(e);var t=c.test(e);return t||h.test(e)?f(e.slice(2),t?2:8):d.test(e)?NaN:+e};var l=1/0;const g=function(e){return e?(e=v(e))===l||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}},18593:(e,n,t)=>{t.d(n,{A:()=>o});var r=t(74342);const o=function(e){var n=(0,r.A)(e),t=n%1;return n==n?t?n-t:n:0}}}]); \ No newline at end of file diff --git a/assets/js/23498fd5.3cd21fb5.js b/assets/js/23498fd5.3cd21fb5.js deleted file mode 100644 index 55b97fe3dc67..000000000000 --- a/assets/js/23498fd5.3cd21fb5.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7276],{34632:(e,s,n)=>{n.r(s),n.d(s,{assets:()=>c,contentTitle:()=>r,default:()=>d,frontMatter:()=>i,metadata:()=>o,toc:()=>h});var t=n(74848),a=n(28453);const i={id:"build-integrate-assets",title:"Using AssetHub",sidebar_label:"Using AssetHub",description:"Tools that you can use for integrating assets.",keywords:["assets","integration","api","operations"],slug:"../build-integrate-assets"},r=void 0,o={id:"build/build-integrate-assets",title:"Using AssetHub",description:"Tools that you can use for integrating assets.",source:"@site/../docs/build/build-integrate-assets.md",sourceDirName:"build",slug:"/build-integrate-assets",permalink:"/docs/build-integrate-assets",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/build/build-integrate-assets.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1727991122e3,frontMatter:{id:"build-integrate-assets",title:"Using AssetHub",sidebar_label:"Using AssetHub",description:"Tools that you can use for integrating assets.",keywords:["assets","integration","api","operations"],slug:"../build-integrate-assets"},sidebar:"docs",previous:{title:"Polkadot Protocol Overview",permalink:"/docs/build-protocol-info"},next:{title:"Opening HRMP Channels",permalink:"/docs/build-hrmp-channels"}},c={},h=[{value:"Assets Basics",id:"assets-basics",level:2},{value:"Asset Operations",id:"asset-operations",level:3},{value:"Paying Transaction Fees in Another Asset",id:"paying-transaction-fees-in-another-asset",level:4},{value:"How to Build Transactions Paying Fees with Other Assets",id:"how-to-build-transactions-paying-fees-with-other-assets",level:5},{value:"Foreign Assets",id:"foreign-assets",level:3},{value:"Integration",id:"integration",level:2},{value:"Parachain Node",id:"parachain-node",level:3},{value:"Asset Transfer API",id:"asset-transfer-api",level:3},{value:"Sidecar",id:"sidecar",level:3},{value:"Tx Wrapper Polkadot",id:"tx-wrapper-polkadot",level:3},{value:"XCM Transfer Monitoring",id:"xcm-transfer-monitoring",level:3},{value:"Monitoring of XCM deposits",id:"monitoring-of-xcm-deposits",level:4},{value:"Tracking back XCM information",id:"tracking-back-xcm-information",level:4},{value:"Additional Examples of Monitoring XCM Transfers",id:"additional-examples-of-monitoring-xcm-transfers",level:4},{value:"Monitoring of Failed XCM Transfers",id:"monitoring-of-failed-xcm-transfers",level:4}];function l(e){const s={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",h4:"h4",h5:"h5",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,a.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.p,{children:"The relay chain does not natively support assets beyond its native token. This functionality exists\nin parachains. On both Polkadot and Kusama, this parachain is called Asset Hub."}),"\n",(0,t.jsx)(s.p,{children:"The Asset Hub provides a first-class interface for creating, managing, and using fungible and\nnon-fungible assets. The fungible interface is similar to Ethereum's ERC-20 standard. However, the\ndata structures and stateful operations are encoded directly into the chain's runtime, making\noperations fast and fee-efficient."}),"\n",(0,t.jsx)(s.p,{children:"Beyond merely supporting assets, integrating an Asset Hub into your systems has several benefits for\ninfrastructure providers and users:"}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsx)(s.li,{children:"Support for on-chain assets."}),"\n",(0,t.jsx)(s.li,{children:"Significantly lower transaction fees (about 1/10) than the relay chain."}),"\n",(0,t.jsx)(s.li,{children:"Significantly lower deposits (1/100) than the relay chain. This includes the existential deposit\nand deposits for proxy/multisig operations."}),"\n",(0,t.jsxs)(s.li,{children:["Ability to pay transaction fees in certain assets. As in, accounts would ",(0,t.jsx)(s.strong,{children:"not"})," need DOT to exist\non-chain or pay fees."]}),"\n"]}),"\n",(0,t.jsx)(s.p,{children:"The Asset Hub will use DOT as its native currency. Users can transfer DOT from the relay chain into\nthe Asset Hub and use it natively. The relay chain will also accept DOT transfers from the Asset Hub\nback to the relay chain for staking, governance, or any other activity."}),"\n",(0,t.jsx)(s.p,{children:"Using the Asset Hub for DOT/KSM balance transfers will be much more efficient than the relay chain\nand is highly recommended. Until domain-specific parachains are built, the relay chain will still\nneed to be used for staking and governance."}),"\n",(0,t.jsx)(s.h2,{id:"assets-basics",children:"Assets Basics"}),"\n",(0,t.jsxs)(s.p,{children:["See the\n",(0,t.jsx)(s.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/substrate/frame/assets",children:"Assets pallet"})," for\nthe most up-to-date info and reference documentation."]}),"\n",(0,t.jsx)(s.p,{children:"Assets are stored as a map from an ID to information about the asset, including a management team,\ntotal supply, total number of accounts, its sufficiency for account existence, and more.\nAdditionally, the asset owner can register metadata like the name, symbol, and number of decimals\nfor representation."}),"\n",(0,t.jsx)(s.p,{children:"Some assets, as determined by on-chain governance, are regarded as \u201csufficient\u201d. Sufficiency means\nthat the asset balance is enough to create the account on-chain, with no need for the DOT/KSM\nexistential deposit. Likewise, you cannot send a non-sufficient asset to an account that does not\nexist. Sufficient assets can be used to pay transaction fees (i.e. there is no need to hold DOT/KSM\non the account)."}),"\n",(0,t.jsx)(s.p,{children:"Assets do have a minimum balance (set by the creator), and if an account drops below that balance,\nthe dust is lost."}),"\n",(0,t.jsx)(s.h3,{id:"asset-operations",children:"Asset Operations"}),"\n",(0,t.jsxs)(s.p,{children:["The Assets pallet has its interface for dealing with assets. See the ",(0,t.jsx)(s.a,{href:"#integration",children:"Integration"}),"\nsection below for how to fetch information and construct transactions."]}),"\n",(0,t.jsxs)(s.p,{children:["The main functions you will probably interact with are ",(0,t.jsx)(s.code,{children:"transfer"})," and ",(0,t.jsx)(s.code,{children:"transfer_keep_alive"}),". These\nfunctions transfer some ",(0,t.jsx)(s.code,{children:"amount"})," (balance) of an ",(0,t.jsx)(s.code,{children:"AssetId"})," (a ",(0,t.jsx)(s.code,{children:"u32"}),", not a contract address) to\nanother account."]}),"\n",(0,t.jsxs)(s.p,{children:["The Assets pallet also provides an ",(0,t.jsx)(s.code,{children:"approve_transfer"}),", ",(0,t.jsx)(s.code,{children:"cancel_approval"}),", and ",(0,t.jsx)(s.code,{children:"transfer_approved"}),"\ninterface for non-custodial operations."]}),"\n",(0,t.jsxs)(s.p,{children:["Asset transfers will result in an ",(0,t.jsx)(s.code,{children:"assets.transferred"})," event. The same instructions for\n",(0,t.jsxs)(s.a,{href:"/docs/build-protocol-info#events",children:["monitoring events and ",(0,t.jsx)(s.strong,{children:"not"})," transactions"]})," applies to asset\ntransfers."]}),"\n",(0,t.jsxs)(s.p,{children:["Note that you can use the same addresses (except\n",(0,t.jsx)(s.a,{href:"/docs/learn-proxies-pure#anonymous-proxy-pure-proxy",children:"pure proxies"}),"!) on the Asset Hub that\nyou use on the relay chain. The SS58 encodings are the same; only the chain information (genesis\nhash, etc.) will change on transaction construction."]}),"\n",(0,t.jsx)(s.h4,{id:"paying-transaction-fees-in-another-asset",children:"Paying Transaction Fees in Another Asset"}),"\n",(0,t.jsxs)(s.p,{children:["Users in the Asset Hub can pay the fees of their transactions with assets other than DOT. The only\nrequirement is that a liquidity pool of the relevant asset against DOT should already exist as a\nstorage entry of ",(0,t.jsx)(s.a,{href:"/docs/learn-asset-conversion-assethub",children:"the Asset Conversion pallet"}),"."]}),"\n",(0,t.jsxs)(s.p,{children:["Technically speaking, this is enabled by\n",(0,t.jsxs)(s.a,{href:"https://github.com/polkadot-fellows/runtimes/blob/bb52c327360d1098d3b3d36f4eafb40a74636e80/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs#L1016",children:["the ",(0,t.jsx)(s.code,{children:"ChargeAssetTxPayment"})," signed-extension"]}),"\nimplemented in the Asset Hub runtime. This signed-extension extends transactions to include an\noptional ",(0,t.jsx)(s.code,{children:"AssetId"})," that specifies the asset to be used for payment of both the execution fees and\nthe optional tip. It defaults to the native token when it is set to ",(0,t.jsx)(s.code,{children:"None"}),". In case it is given,\nthis ",(0,t.jsx)(s.code,{children:"AssetId"})," has to be an\n",(0,t.jsxs)(s.a,{href:"../learn/learn/xcm/fundamentals/multilocation-summary",children:["XCM ",(0,t.jsx)(s.code,{children:"Multilocation"})]}),". Once the transaction\nis executed in the block, it will emit an ",(0,t.jsx)(s.code,{children:"AssetTxFeePaid"})," event, informing of the account paying\nthe fees, the amount in the asset paid as fee, the tip (if any), and the asset ID of the asset\npaying the fees."]}),"\n",(0,t.jsx)(s.p,{children:(0,t.jsx)(s.strong,{children:"Handling Pools with Low Liquidity"})}),"\n",(0,t.jsx)(s.p,{children:"Wallets and UIs enabling this functionality should ensure that the user is prompted with the\nnecessary warnings, such that they do not accidentally spend all of their funds to perform a swap on\na pool with no or low liquidity."}),"\n",(0,t.jsx)(s.h5,{id:"how-to-build-transactions-paying-fees-with-other-assets",children:"How to Build Transactions Paying Fees with Other Assets"}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.a,{href:"https://github.com/bee344/asset-conversion-example/tree/main",children:"This repository"})," contains the\ncomplete workflow on how to create a liquidity pool for a given asset, add liquidity to it and\nthen build a transaction to pays fees with this asset (including fees estimation). It is done with\nseveral libraries: Polkadot.js API and Subxt."]}),"\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.a,{href:"https://github.com/paritytech/asset-transfer-api/blob/main/examples/polkadot/assetHub/paysWithFeeOriginTransfers/dotToHydrationPaysWithGLMR.ts",children:"Example using Asset Transfer API"}),"\nto do a cross-chain transfer in Polkadot Asset Hub paying fees with GLMR."]}),"\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.a,{href:"https://github.com/bee344/asset-hub-examples/blob/main/polkadot-js-example/src/foreignAssetTransferWithFee.ts",children:"A simple script"}),"\nusing Polkadot.js API to do a local transfer of bridged KSM in Polkadot Asset Hub paying fees with\nUSDT."]}),"\n"]}),"\n",(0,t.jsx)(s.h3,{id:"foreign-assets",children:"Foreign Assets"}),"\n",(0,t.jsx)(s.p,{children:"Foreign assets are those assets in Asset Hub whose native blockchain is not Asset Hub. These are\nmainly native tokens from other parachains or bridged tokens from other consensus systems (such as\nEthereum). Once a foreign asset has been registered in Asset Hub (by its root origin), users are\nenabled to send this token from its native blockchain to Asset Hub and operate with it as if it were\nany other asset."}),"\n",(0,t.jsxs)(s.p,{children:["Practically speaking, foreign assets are handled by the ",(0,t.jsx)(s.code,{children:"foreign-assets"})," pallet in Asset Hub, which\nis an instance of the Assets pallet. Hence, this pallet exposes the same interface to users and\nother pallets as the Assets pallet."]}),"\n",(0,t.jsxs)(s.p,{children:["The main difference to take into account for foreign assets is their identifier. Instead of using\nintegers as identifiers like in the Assets pallet, assets stored in the ",(0,t.jsx)(s.code,{children:"foreign-assets"})," pallet are\nidentified by\n",(0,t.jsx)(s.a,{href:"https://wiki.polkadot.network/docs/learn/xcm/fundamentals/multilocation-summary",children:"their XCM multilocation"}),"."]}),"\n",(0,t.jsx)(s.h2,{id:"integration",children:"Integration"}),"\n",(0,t.jsxs)(s.p,{children:["The Asset Hub will come with the same tooling suite that Parity Technologies provides for the Relay\nChain, namely ",(0,t.jsx)(s.a,{href:"https://github.com/paritytech/substrate-api-sidecar",children:"API Sidecar"})," and\n",(0,t.jsx)(s.a,{href:"https://github.com/paritytech/txwrapper-core/tree/main/packages/txwrapper-polkadot",children:"TxWrapper Polkadot"}),",\nas well as the ",(0,t.jsx)(s.a,{href:"https://github.com/paritytech/asset-transfer-api",children:"Asset Transfer API"}),". If you have a\ntechnical question or issue about how to use one of the integration tools, please file a GitHub\nissue so a developer can help."]}),"\n",(0,t.jsx)(s.h3,{id:"parachain-node",children:"Parachain Node"}),"\n",(0,t.jsxs)(s.p,{children:["Using the Asset Hub will require running a parachain node to sync the chain. This is very similar to\nrunning a relay chain node, with the addition of some extra flags. You can follow\n",(0,t.jsx)(s.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/cumulus#asset-hub-",children:"these guidelines"})," to set\nup an Asset Hub node."]}),"\n",(0,t.jsx)(s.h3,{id:"asset-transfer-api",children:"Asset Transfer API"}),"\n",(0,t.jsxs)(s.p,{children:["Asset-transfer-api is a library focused on simplifying the construction of asset transfers for\nSubstrate-based chains that involve system parachains like Asset Hub (Polkadot and Kusama). It\nexposes a reduced set of methods that facilitate users to send transfers to other (para) chains or\nlocally. You can refer to\n",(0,t.jsx)(s.a,{href:"https://github.com/paritytech/asset-transfer-api/tree/main#current-cross-chain-support",children:"this table"}),"\nfor the current cross-chain support and ",(0,t.jsx)(s.a,{href:"https://paritytech.github.io/asset-transfer-api/",children:"here"})," for\nthe complete documentation, including installation guide and usage examples."]}),"\n",(0,t.jsx)(s.h3,{id:"sidecar",children:"Sidecar"}),"\n",(0,t.jsx)(s.p,{children:"API Sidecar is a REST service for relay chain and parachain nodes. It comes with endpoints to query\ninformation about assets and asset balances on the Asset Hub."}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:["Asset lookups always use the ",(0,t.jsx)(s.code,{children:"AssetId"})," to refer to an asset class. On-chain metadata is subject to\nchange and thus unsuitable as a canonical index."]}),"\n",(0,t.jsxs)(s.li,{children:["Please refer to ",(0,t.jsx)(s.a,{href:"https://paritytech.github.io/substrate-api-sidecar/dist/",children:"docs"})," for full usage\ninformation. Details on options like how to make a historical query are not included here."]}),"\n"]}),"\n",(0,t.jsx)(s.p,{children:"Here are the available public instances:"}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.a,{href:"https://polkadot-asset-hub-public-sidecar.parity-chains.parity.io",children:"Sidecar connected to Polkadot Asset Hub"}),"\nand"]}),"\n",(0,t.jsx)(s.li,{children:(0,t.jsx)(s.a,{href:"https://kusama-asset-hub-public-sidecar.parity-chains.parity.io",children:"Sidecar connected to Kusama Asset Hub"})}),"\n"]}),"\n",(0,t.jsx)(s.p,{children:"The purpose of these instances is to allow anyone to check and get a quick overview of the info that\nthe asset-related endpoints provide."}),"\n",(0,t.jsx)(s.admonition,{type:"caution",children:(0,t.jsx)(s.p,{children:"These instances should only be used for ad-hoc checks or tests and not for production, heavy testing\nor any other critical purpose."})}),"\n",(0,t.jsx)(s.h3,{id:"tx-wrapper-polkadot",children:"Tx Wrapper Polkadot"}),"\n",(0,t.jsxs)(s.p,{children:["TxWrapper Polkadot is a library designed to facilitate transaction construction and signing in\noffline environments. It comes with asset-specific functions to use on the Asset Hub. When\nconstructing parachain transactions, you can use ",(0,t.jsx)(s.code,{children:"txwrapper-polkadot"})," exactly as on the relay chain,\nbut construct transactions with the appropriate parachain metadata like genesis hash, spec version,\nand type registry."]}),"\n",(0,t.jsx)(s.h3,{id:"xcm-transfer-monitoring",children:"XCM Transfer Monitoring"}),"\n",(0,t.jsx)(s.h4,{id:"monitoring-of-xcm-deposits",children:"Monitoring of XCM deposits"}),"\n",(0,t.jsxs)(s.p,{children:["Thanks to XCM and a growing number of parachains, the relay chain native token can exist across\nseveral blockchains, which means the providers need to monitor cross-chain transfers on top of local\ntransfers and corresponding ",(0,t.jsx)(s.code,{children:"balances.transfer"})," events."]}),"\n",(0,t.jsxs)(s.p,{children:["Currently, DOT can be sent and received in the relay chain and in the Asset Hub either with a\n",(0,t.jsx)(s.a,{href:"https://wiki.polkadot.network/docs/learn-teleport",children:"Teleport"})," from\n",(0,t.jsx)(s.a,{href:"https://wiki.polkadot.network/docs/learn-system-chains",children:"system parachains"})," or with a\n",(0,t.jsx)(s.a,{href:"https://wiki.polkadot.network/docs/learn-xcm-pallet#transfer-reserve-vs-teleport",children:"Reserve Backed Transfer"}),"\nfrom any other parachain. In both cases, the event emitted when processing the transfer is the\n",(0,t.jsx)(s.code,{children:"balances.minted"})," event. Hence, providers should listen to these events, pointing to an address in\ntheir system. For this, the service provider must query every new block created, loop through the\nevents array, filter for any ",(0,t.jsx)(s.code,{children:"balances.minted"})," event, and apply the appropriate business logic."]}),"\n",(0,t.jsx)(s.h4,{id:"tracking-back-xcm-information",children:"Tracking back XCM information"}),"\n",(0,t.jsxs)(s.p,{children:["What has been mentioned earlier should be sufficient to confirm that DOT has arrived in a given\naccount via XCM. However, in some cases, it may be interesting to identify the cross-chain message\nthat emitted the relevant ",(0,t.jsx)(s.code,{children:"balances.minted"})," event. This can be done as follows:"]}),"\n",(0,t.jsxs)(s.ol,{children:["\n",(0,t.jsxs)(s.li,{children:["Query the relevant chain ",(0,t.jsx)(s.code,{children:"at"})," the block the ",(0,t.jsx)(s.code,{children:"balances.minted"})," event was emitted."]}),"\n",(0,t.jsxs)(s.li,{children:["Filter for ",(0,t.jsx)(s.code,{children:"messageQueue(Processed)"})," events. These can be emitted during any phase of the block,\nnot just initialization. This event has a parameter ",(0,t.jsx)(s.code,{children:"Id"}),". The value of ",(0,t.jsx)(s.code,{children:"Id"})," identifies the\ncross-chain message received in the relay chain or in the Asset Hub. It can be used to track back\nthe message in the origin parachain if needed. Note that a block may contain several\n",(0,t.jsx)(s.code,{children:"messageQueue(Processed)"})," events corresponding to several cross-chain messages processed for this\nblock."]}),"\n"]}),"\n",(0,t.jsx)(s.h4,{id:"additional-examples-of-monitoring-xcm-transfers",children:"Additional Examples of Monitoring XCM Transfers"}),"\n",(0,t.jsx)(s.p,{children:"The two previous sections outline the process of monitoring XCM deposits to specific account(s) and\nthen tracing back the origin of these deposits. However, the process of tracking an XCM transfer\n(hence the events to look for) may vary based on the direction of the XCM message. Here are some\nexamples to showcase the slight differences:"}),"\n",(0,t.jsxs)(s.ol,{children:["\n",(0,t.jsxs)(s.li,{children:["\n",(0,t.jsxs)(s.p,{children:["For an XCM transfer from a Parachain to a relay chain\n",(0,t.jsxs)(s.em,{children:["(",(0,t.jsx)(s.a,{href:"https://polkadot.subscan.io/xcm_message/polkadot-3effaf637dd2a3ac5a644ccc693cbf58a6957d84",children:"example"}),")"]}),":"]}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:["The ",(0,t.jsx)(s.a,{href:"https://hydradx.subscan.io/extrinsic/5136464-2?event=5136464-7",children:"event"})," to look for in the\nParachain side is called ",(0,t.jsx)(s.code,{children:"parachainsystem (UpwardMessageSent)"}),", and the parameter\n",(0,t.jsx)(s.code,{children:"message_hash"})," in this event identifies the XCM transfer."]}),"\n",(0,t.jsxs)(s.li,{children:["The ",(0,t.jsx)(s.a,{href:"https://polkadot.subscan.io/block/20810935?tab=event&&event=20810935-4",children:"event"})," to track in\nthe relay chain side is called ",(0,t.jsx)(s.code,{children:"messagequeue (Processed)"}),", and the parameter ",(0,t.jsx)(s.code,{children:"id"})," of the event\nshould be the same as the ",(0,t.jsx)(s.code,{children:"message_hash"})," found in the Parachain event."]}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(s.li,{children:["\n",(0,t.jsxs)(s.p,{children:["For an XCM transfer from a relay chain to a parachain\n",(0,t.jsxs)(s.em,{children:["(",(0,t.jsx)(s.a,{href:"https://polkadot.subscan.io/xcm_message/polkadot-b2f455ed6ca1b4fdea746dfe8d150c10ec74440e",children:"example"}),")"]}),":"]}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:["The ",(0,t.jsx)(s.a,{href:"https://polkadot.subscan.io/extrinsic/20810793-2?event=20810793-53",children:"event"})," to look for in\nthe relay chain side is called ",(0,t.jsx)(s.code,{children:"xcmPallet (sent)"}),", and the parameter ",(0,t.jsx)(s.code,{children:"message_id"})," in this event\nidentifies the XCM transfer."]}),"\n",(0,t.jsxs)(s.li,{children:["The ",(0,t.jsx)(s.a,{href:"https://moonbeam.subscan.io/extrinsic/6174523-0?event=6174523-5",children:"event"})," to look for in the\nParachain side is called ",(0,t.jsx)(s.code,{children:"dmpqueue (ExecutedDownward)"}),", and the parameter that identifies the\nXCM message is either called ",(0,t.jsx)(s.code,{children:"message_hash"})," or ",(0,t.jsx)(s.code,{children:"message_id"}),"."]}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(s.li,{children:["\n",(0,t.jsxs)(s.p,{children:["For an XCM transfer from a System Parachain to a Parachain\n",(0,t.jsxs)(s.em,{children:["(",(0,t.jsx)(s.a,{href:"https://polkadot.subscan.io/xcm_message/polkadot-72ed4496d1cb793e10084170548d5caf622ea338",children:"example"}),")"]}),":"]}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:["The ",(0,t.jsx)(s.a,{href:"https://assethub-polkadot.subscan.io/extrinsic/6275027-4?event=6275027-22",children:"event"})," to look\nfor in the System Parachain side is called ",(0,t.jsx)(s.code,{children:"xcmpqueue (XcmpMessageSent)"}),", and again the\n",(0,t.jsx)(s.code,{children:"message_hash"})," is one of the parameters of the event."]}),"\n",(0,t.jsxs)(s.li,{children:["The corresponding ",(0,t.jsx)(s.a,{href:"https://hydradx.subscan.io/extrinsic/5135860-1?event=5135860-6",children:"event"})," in\nthe Parachain side is the ",(0,t.jsx)(s.code,{children:"xcmpqueue (Success)"})," and the ",(0,t.jsx)(s.code,{children:"message_hash"})," found in that event\nshould have the same value as the one in the System parachain."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(s.h4,{id:"monitoring-of-failed-xcm-transfers",children:"Monitoring of Failed XCM Transfers"}),"\n",(0,t.jsx)(s.p,{children:"In case that an XCM transfer fails to complete successfully, then we will notice some different\nparameters in the events emitted or different events. Below are some examples:"}),"\n",(0,t.jsxs)(s.ol,{children:["\n",(0,t.jsxs)(s.li,{children:["\n",(0,t.jsxs)(s.p,{children:["From a relay chain to a System Parachain\n",(0,t.jsxs)(s.em,{children:["(",(0,t.jsx)(s.a,{href:"https://polkadot.subscan.io/xcm_message/polkadot-c8d7186edb43a592d65b3b5a87c4ecaac38c5aa2",children:"example"}),")"]}),":"]}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:["We will see the\n",(0,t.jsx)(s.a,{href:"https://assethub-polkadot.subscan.io/extrinsic/4671081-0?event=4671081-1",children:"event"}),"\n",(0,t.jsx)(s.code,{children:"dmpqueue (ExecutedDownward)"})," in the System Parachain side with the following parameters:","\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.code,{children:"outcome"})," with value ",(0,t.jsx)(s.code,{children:"Incomplete"})," and with the type of error which in this example is\n",(0,t.jsx)(s.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/c54ea64af43b522d23bfabb8d917a490c0f23217/polkadot/xcm/src/v2/traits.rs#L43",children:"UntrustedReserveLocation"}),"."]}),"\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.code,{children:"message_id"})," which shows the hash of the XCM Transfer."]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(s.li,{children:["\n",(0,t.jsxs)(s.p,{children:["From a Parachain to another Parachain\n",(0,t.jsxs)(s.em,{children:["(",(0,t.jsx)(s.a,{href:"https://polkadot.subscan.io/xcm_message/polkadot-3e74e95204faa6ecf3c81f5129b85f498b89cff2",children:"example"}),")"]}),":"]}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:["We will see the ",(0,t.jsx)(s.a,{href:"https://interlay.subscan.io/extrinsic/3627057-1?event=3627057-8",children:"event"}),"\n",(0,t.jsx)(s.code,{children:"xcmpqueue (Fail)"})," in the destination Parachain with the following parameters:","\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.code,{children:"error"})," which in this example is\n",(0,t.jsx)(s.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/c54ea64af43b522d23bfabb8d917a490c0f23217/polkadot/xcm/src/v2/traits.rs#L98",children:"TooExpensive"}),"."]}),"\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.code,{children:"message_hash"})," which identifies the XCM Transfer."]}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.strong,{children:"Note"}),": there might be another\n",(0,t.jsx)(s.a,{href:"https://interlay.subscan.io/extrinsic/3627057-1?event=3627057-7",children:"event"})," called\n",(0,t.jsx)(s.code,{children:"polkadotxcm (AssetsTrapped)"})," which indicates that some assets have been trapped (and hence can\nbe claimed)."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(s.p,{children:["A great resource to learn more about Error Management in XCM is the Polkadot blog post from Gavin\nWood,\n",(0,t.jsx)(s.a,{href:"https://www.polkadot.network/blog/xcm-part-three-execution-and-error-management",children:"XCM Part III: Execution and Error Management"}),"."]})]})}function d(e={}){const{wrapper:s}={...(0,a.R)(),...e.components};return s?(0,t.jsx)(s,{...e,children:(0,t.jsx)(l,{...e})}):l(e)}},28453:(e,s,n)=>{n.d(s,{R:()=>r,x:()=>o});var t=n(96540);const a={},i=t.createContext(a);function r(e){const s=t.useContext(i);return t.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function o(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:r(e.components),t.createElement(i.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/23498fd5.c97403b7.js b/assets/js/23498fd5.c97403b7.js new file mode 100644 index 000000000000..af090092c2f3 --- /dev/null +++ b/assets/js/23498fd5.c97403b7.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7276],{23474:(e,s,n)=>{n.r(s),n.d(s,{assets:()=>c,contentTitle:()=>o,default:()=>d,frontMatter:()=>r,metadata:()=>t,toc:()=>h});const t=JSON.parse('{"id":"build/build-integrate-assets","title":"Using AssetHub","description":"Tools that you can use for integrating assets.","source":"@site/../docs/build/build-integrate-assets.md","sourceDirName":"build","slug":"/build-integrate-assets","permalink":"/docs/build-integrate-assets","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/build/build-integrate-assets.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1727991122000,"frontMatter":{"id":"build-integrate-assets","title":"Using AssetHub","sidebar_label":"Using AssetHub","description":"Tools that you can use for integrating assets.","keywords":["assets","integration","api","operations"],"slug":"../build-integrate-assets"},"sidebar":"docs","previous":{"title":"Polkadot Protocol Overview","permalink":"/docs/build-protocol-info"},"next":{"title":"Opening HRMP Channels","permalink":"/docs/build-hrmp-channels"}}');var a=n(74848),i=n(28453);const r={id:"build-integrate-assets",title:"Using AssetHub",sidebar_label:"Using AssetHub",description:"Tools that you can use for integrating assets.",keywords:["assets","integration","api","operations"],slug:"../build-integrate-assets"},o=void 0,c={},h=[{value:"Assets Basics",id:"assets-basics",level:2},{value:"Asset Operations",id:"asset-operations",level:3},{value:"Paying Transaction Fees in Another Asset",id:"paying-transaction-fees-in-another-asset",level:4},{value:"How to Build Transactions Paying Fees with Other Assets",id:"how-to-build-transactions-paying-fees-with-other-assets",level:5},{value:"Foreign Assets",id:"foreign-assets",level:3},{value:"Integration",id:"integration",level:2},{value:"Parachain Node",id:"parachain-node",level:3},{value:"Asset Transfer API",id:"asset-transfer-api",level:3},{value:"Sidecar",id:"sidecar",level:3},{value:"Tx Wrapper Polkadot",id:"tx-wrapper-polkadot",level:3},{value:"XCM Transfer Monitoring",id:"xcm-transfer-monitoring",level:3},{value:"Monitoring of XCM deposits",id:"monitoring-of-xcm-deposits",level:4},{value:"Tracking back XCM information",id:"tracking-back-xcm-information",level:4},{value:"Additional Examples of Monitoring XCM Transfers",id:"additional-examples-of-monitoring-xcm-transfers",level:4},{value:"Monitoring of Failed XCM Transfers",id:"monitoring-of-failed-xcm-transfers",level:4}];function l(e){const s={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",h4:"h4",h5:"h5",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(s.p,{children:"The relay chain does not natively support assets beyond its native token. This functionality exists\nin parachains. On both Polkadot and Kusama, this parachain is called Asset Hub."}),"\n",(0,a.jsx)(s.p,{children:"The Asset Hub provides a first-class interface for creating, managing, and using fungible and\nnon-fungible assets. The fungible interface is similar to Ethereum's ERC-20 standard. However, the\ndata structures and stateful operations are encoded directly into the chain's runtime, making\noperations fast and fee-efficient."}),"\n",(0,a.jsx)(s.p,{children:"Beyond merely supporting assets, integrating an Asset Hub into your systems has several benefits for\ninfrastructure providers and users:"}),"\n",(0,a.jsxs)(s.ul,{children:["\n",(0,a.jsx)(s.li,{children:"Support for on-chain assets."}),"\n",(0,a.jsx)(s.li,{children:"Significantly lower transaction fees (about 1/10) than the relay chain."}),"\n",(0,a.jsx)(s.li,{children:"Significantly lower deposits (1/100) than the relay chain. This includes the existential deposit\nand deposits for proxy/multisig operations."}),"\n",(0,a.jsxs)(s.li,{children:["Ability to pay transaction fees in certain assets. As in, accounts would ",(0,a.jsx)(s.strong,{children:"not"})," need DOT to exist\non-chain or pay fees."]}),"\n"]}),"\n",(0,a.jsx)(s.p,{children:"The Asset Hub will use DOT as its native currency. Users can transfer DOT from the relay chain into\nthe Asset Hub and use it natively. The relay chain will also accept DOT transfers from the Asset Hub\nback to the relay chain for staking, governance, or any other activity."}),"\n",(0,a.jsx)(s.p,{children:"Using the Asset Hub for DOT/KSM balance transfers will be much more efficient than the relay chain\nand is highly recommended. Until domain-specific parachains are built, the relay chain will still\nneed to be used for staking and governance."}),"\n",(0,a.jsx)(s.h2,{id:"assets-basics",children:"Assets Basics"}),"\n",(0,a.jsxs)(s.p,{children:["See the\n",(0,a.jsx)(s.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/substrate/frame/assets",children:"Assets pallet"})," for\nthe most up-to-date info and reference documentation."]}),"\n",(0,a.jsx)(s.p,{children:"Assets are stored as a map from an ID to information about the asset, including a management team,\ntotal supply, total number of accounts, its sufficiency for account existence, and more.\nAdditionally, the asset owner can register metadata like the name, symbol, and number of decimals\nfor representation."}),"\n",(0,a.jsx)(s.p,{children:"Some assets, as determined by on-chain governance, are regarded as \u201csufficient\u201d. Sufficiency means\nthat the asset balance is enough to create the account on-chain, with no need for the DOT/KSM\nexistential deposit. Likewise, you cannot send a non-sufficient asset to an account that does not\nexist. Sufficient assets can be used to pay transaction fees (i.e. there is no need to hold DOT/KSM\non the account)."}),"\n",(0,a.jsx)(s.p,{children:"Assets do have a minimum balance (set by the creator), and if an account drops below that balance,\nthe dust is lost."}),"\n",(0,a.jsx)(s.h3,{id:"asset-operations",children:"Asset Operations"}),"\n",(0,a.jsxs)(s.p,{children:["The Assets pallet has its interface for dealing with assets. See the ",(0,a.jsx)(s.a,{href:"#integration",children:"Integration"}),"\nsection below for how to fetch information and construct transactions."]}),"\n",(0,a.jsxs)(s.p,{children:["The main functions you will probably interact with are ",(0,a.jsx)(s.code,{children:"transfer"})," and ",(0,a.jsx)(s.code,{children:"transfer_keep_alive"}),". These\nfunctions transfer some ",(0,a.jsx)(s.code,{children:"amount"})," (balance) of an ",(0,a.jsx)(s.code,{children:"AssetId"})," (a ",(0,a.jsx)(s.code,{children:"u32"}),", not a contract address) to\nanother account."]}),"\n",(0,a.jsxs)(s.p,{children:["The Assets pallet also provides an ",(0,a.jsx)(s.code,{children:"approve_transfer"}),", ",(0,a.jsx)(s.code,{children:"cancel_approval"}),", and ",(0,a.jsx)(s.code,{children:"transfer_approved"}),"\ninterface for non-custodial operations."]}),"\n",(0,a.jsxs)(s.p,{children:["Asset transfers will result in an ",(0,a.jsx)(s.code,{children:"assets.transferred"})," event. The same instructions for\n",(0,a.jsxs)(s.a,{href:"/docs/build-protocol-info#events",children:["monitoring events and ",(0,a.jsx)(s.strong,{children:"not"})," transactions"]})," applies to asset\ntransfers."]}),"\n",(0,a.jsxs)(s.p,{children:["Note that you can use the same addresses (except\n",(0,a.jsx)(s.a,{href:"/docs/learn-proxies-pure#anonymous-proxy-pure-proxy",children:"pure proxies"}),"!) on the Asset Hub that\nyou use on the relay chain. The SS58 encodings are the same; only the chain information (genesis\nhash, etc.) will change on transaction construction."]}),"\n",(0,a.jsx)(s.h4,{id:"paying-transaction-fees-in-another-asset",children:"Paying Transaction Fees in Another Asset"}),"\n",(0,a.jsxs)(s.p,{children:["Users in the Asset Hub can pay the fees of their transactions with assets other than DOT. The only\nrequirement is that a liquidity pool of the relevant asset against DOT should already exist as a\nstorage entry of ",(0,a.jsx)(s.a,{href:"/docs/learn-asset-conversion-assethub",children:"the Asset Conversion pallet"}),"."]}),"\n",(0,a.jsxs)(s.p,{children:["Technically speaking, this is enabled by\n",(0,a.jsxs)(s.a,{href:"https://github.com/polkadot-fellows/runtimes/blob/bb52c327360d1098d3b3d36f4eafb40a74636e80/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs#L1016",children:["the ",(0,a.jsx)(s.code,{children:"ChargeAssetTxPayment"})," signed-extension"]}),"\nimplemented in the Asset Hub runtime. This signed-extension extends transactions to include an\noptional ",(0,a.jsx)(s.code,{children:"AssetId"})," that specifies the asset to be used for payment of both the execution fees and\nthe optional tip. It defaults to the native token when it is set to ",(0,a.jsx)(s.code,{children:"None"}),". In case it is given,\nthis ",(0,a.jsx)(s.code,{children:"AssetId"})," has to be an\n",(0,a.jsxs)(s.a,{href:"../learn/learn/xcm/fundamentals/multilocation-summary",children:["XCM ",(0,a.jsx)(s.code,{children:"Multilocation"})]}),". Once the transaction\nis executed in the block, it will emit an ",(0,a.jsx)(s.code,{children:"AssetTxFeePaid"})," event, informing of the account paying\nthe fees, the amount in the asset paid as fee, the tip (if any), and the asset ID of the asset\npaying the fees."]}),"\n",(0,a.jsx)(s.p,{children:(0,a.jsx)(s.strong,{children:"Handling Pools with Low Liquidity"})}),"\n",(0,a.jsx)(s.p,{children:"Wallets and UIs enabling this functionality should ensure that the user is prompted with the\nnecessary warnings, such that they do not accidentally spend all of their funds to perform a swap on\na pool with no or low liquidity."}),"\n",(0,a.jsx)(s.h5,{id:"how-to-build-transactions-paying-fees-with-other-assets",children:"How to Build Transactions Paying Fees with Other Assets"}),"\n",(0,a.jsxs)(s.ul,{children:["\n",(0,a.jsxs)(s.li,{children:[(0,a.jsx)(s.a,{href:"https://github.com/bee344/asset-conversion-example/tree/main",children:"This repository"})," contains the\ncomplete workflow on how to create a liquidity pool for a given asset, add liquidity to it and\nthen build a transaction to pays fees with this asset (including fees estimation). It is done with\nseveral libraries: Polkadot.js API and Subxt."]}),"\n",(0,a.jsxs)(s.li,{children:[(0,a.jsx)(s.a,{href:"https://github.com/paritytech/asset-transfer-api/blob/main/examples/polkadot/assetHub/paysWithFeeOriginTransfers/dotToHydrationPaysWithGLMR.ts",children:"Example using Asset Transfer API"}),"\nto do a cross-chain transfer in Polkadot Asset Hub paying fees with GLMR."]}),"\n",(0,a.jsxs)(s.li,{children:[(0,a.jsx)(s.a,{href:"https://github.com/bee344/asset-hub-examples/blob/main/polkadot-js-example/src/foreignAssetTransferWithFee.ts",children:"A simple script"}),"\nusing Polkadot.js API to do a local transfer of bridged KSM in Polkadot Asset Hub paying fees with\nUSDT."]}),"\n"]}),"\n",(0,a.jsx)(s.h3,{id:"foreign-assets",children:"Foreign Assets"}),"\n",(0,a.jsx)(s.p,{children:"Foreign assets are those assets in Asset Hub whose native blockchain is not Asset Hub. These are\nmainly native tokens from other parachains or bridged tokens from other consensus systems (such as\nEthereum). Once a foreign asset has been registered in Asset Hub (by its root origin), users are\nenabled to send this token from its native blockchain to Asset Hub and operate with it as if it were\nany other asset."}),"\n",(0,a.jsxs)(s.p,{children:["Practically speaking, foreign assets are handled by the ",(0,a.jsx)(s.code,{children:"foreign-assets"})," pallet in Asset Hub, which\nis an instance of the Assets pallet. Hence, this pallet exposes the same interface to users and\nother pallets as the Assets pallet."]}),"\n",(0,a.jsxs)(s.p,{children:["The main difference to take into account for foreign assets is their identifier. Instead of using\nintegers as identifiers like in the Assets pallet, assets stored in the ",(0,a.jsx)(s.code,{children:"foreign-assets"})," pallet are\nidentified by\n",(0,a.jsx)(s.a,{href:"https://wiki.polkadot.network/docs/learn/xcm/fundamentals/multilocation-summary",children:"their XCM multilocation"}),"."]}),"\n",(0,a.jsx)(s.h2,{id:"integration",children:"Integration"}),"\n",(0,a.jsxs)(s.p,{children:["The Asset Hub will come with the same tooling suite that Parity Technologies provides for the Relay\nChain, namely ",(0,a.jsx)(s.a,{href:"https://github.com/paritytech/substrate-api-sidecar",children:"API Sidecar"})," and\n",(0,a.jsx)(s.a,{href:"https://github.com/paritytech/txwrapper-core/tree/main/packages/txwrapper-polkadot",children:"TxWrapper Polkadot"}),",\nas well as the ",(0,a.jsx)(s.a,{href:"https://github.com/paritytech/asset-transfer-api",children:"Asset Transfer API"}),". If you have a\ntechnical question or issue about how to use one of the integration tools, please file a GitHub\nissue so a developer can help."]}),"\n",(0,a.jsx)(s.h3,{id:"parachain-node",children:"Parachain Node"}),"\n",(0,a.jsxs)(s.p,{children:["Using the Asset Hub will require running a parachain node to sync the chain. This is very similar to\nrunning a relay chain node, with the addition of some extra flags. You can follow\n",(0,a.jsx)(s.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/cumulus#asset-hub-",children:"these guidelines"})," to set\nup an Asset Hub node."]}),"\n",(0,a.jsx)(s.h3,{id:"asset-transfer-api",children:"Asset Transfer API"}),"\n",(0,a.jsxs)(s.p,{children:["Asset-transfer-api is a library focused on simplifying the construction of asset transfers for\nSubstrate-based chains that involve system parachains like Asset Hub (Polkadot and Kusama). It\nexposes a reduced set of methods that facilitate users to send transfers to other (para) chains or\nlocally. You can refer to\n",(0,a.jsx)(s.a,{href:"https://github.com/paritytech/asset-transfer-api/tree/main#current-cross-chain-support",children:"this table"}),"\nfor the current cross-chain support and ",(0,a.jsx)(s.a,{href:"https://paritytech.github.io/asset-transfer-api/",children:"here"})," for\nthe complete documentation, including installation guide and usage examples."]}),"\n",(0,a.jsx)(s.h3,{id:"sidecar",children:"Sidecar"}),"\n",(0,a.jsx)(s.p,{children:"API Sidecar is a REST service for relay chain and parachain nodes. It comes with endpoints to query\ninformation about assets and asset balances on the Asset Hub."}),"\n",(0,a.jsxs)(s.ul,{children:["\n",(0,a.jsxs)(s.li,{children:["Asset lookups always use the ",(0,a.jsx)(s.code,{children:"AssetId"})," to refer to an asset class. On-chain metadata is subject to\nchange and thus unsuitable as a canonical index."]}),"\n",(0,a.jsxs)(s.li,{children:["Please refer to ",(0,a.jsx)(s.a,{href:"https://paritytech.github.io/substrate-api-sidecar/dist/",children:"docs"})," for full usage\ninformation. Details on options like how to make a historical query are not included here."]}),"\n"]}),"\n",(0,a.jsx)(s.p,{children:"Here are the available public instances:"}),"\n",(0,a.jsxs)(s.ul,{children:["\n",(0,a.jsxs)(s.li,{children:[(0,a.jsx)(s.a,{href:"https://polkadot-asset-hub-public-sidecar.parity-chains.parity.io",children:"Sidecar connected to Polkadot Asset Hub"}),"\nand"]}),"\n",(0,a.jsx)(s.li,{children:(0,a.jsx)(s.a,{href:"https://kusama-asset-hub-public-sidecar.parity-chains.parity.io",children:"Sidecar connected to Kusama Asset Hub"})}),"\n"]}),"\n",(0,a.jsx)(s.p,{children:"The purpose of these instances is to allow anyone to check and get a quick overview of the info that\nthe asset-related endpoints provide."}),"\n",(0,a.jsx)(s.admonition,{type:"caution",children:(0,a.jsx)(s.p,{children:"These instances should only be used for ad-hoc checks or tests and not for production, heavy testing\nor any other critical purpose."})}),"\n",(0,a.jsx)(s.h3,{id:"tx-wrapper-polkadot",children:"Tx Wrapper Polkadot"}),"\n",(0,a.jsxs)(s.p,{children:["TxWrapper Polkadot is a library designed to facilitate transaction construction and signing in\noffline environments. It comes with asset-specific functions to use on the Asset Hub. When\nconstructing parachain transactions, you can use ",(0,a.jsx)(s.code,{children:"txwrapper-polkadot"})," exactly as on the relay chain,\nbut construct transactions with the appropriate parachain metadata like genesis hash, spec version,\nand type registry."]}),"\n",(0,a.jsx)(s.h3,{id:"xcm-transfer-monitoring",children:"XCM Transfer Monitoring"}),"\n",(0,a.jsx)(s.h4,{id:"monitoring-of-xcm-deposits",children:"Monitoring of XCM deposits"}),"\n",(0,a.jsxs)(s.p,{children:["Thanks to XCM and a growing number of parachains, the relay chain native token can exist across\nseveral blockchains, which means the providers need to monitor cross-chain transfers on top of local\ntransfers and corresponding ",(0,a.jsx)(s.code,{children:"balances.transfer"})," events."]}),"\n",(0,a.jsxs)(s.p,{children:["Currently, DOT can be sent and received in the relay chain and in the Asset Hub either with a\n",(0,a.jsx)(s.a,{href:"https://wiki.polkadot.network/docs/learn-teleport",children:"Teleport"})," from\n",(0,a.jsx)(s.a,{href:"https://wiki.polkadot.network/docs/learn-system-chains",children:"system parachains"})," or with a\n",(0,a.jsx)(s.a,{href:"https://wiki.polkadot.network/docs/learn-xcm-pallet#transfer-reserve-vs-teleport",children:"Reserve Backed Transfer"}),"\nfrom any other parachain. In both cases, the event emitted when processing the transfer is the\n",(0,a.jsx)(s.code,{children:"balances.minted"})," event. Hence, providers should listen to these events, pointing to an address in\ntheir system. For this, the service provider must query every new block created, loop through the\nevents array, filter for any ",(0,a.jsx)(s.code,{children:"balances.minted"})," event, and apply the appropriate business logic."]}),"\n",(0,a.jsx)(s.h4,{id:"tracking-back-xcm-information",children:"Tracking back XCM information"}),"\n",(0,a.jsxs)(s.p,{children:["What has been mentioned earlier should be sufficient to confirm that DOT has arrived in a given\naccount via XCM. However, in some cases, it may be interesting to identify the cross-chain message\nthat emitted the relevant ",(0,a.jsx)(s.code,{children:"balances.minted"})," event. This can be done as follows:"]}),"\n",(0,a.jsxs)(s.ol,{children:["\n",(0,a.jsxs)(s.li,{children:["Query the relevant chain ",(0,a.jsx)(s.code,{children:"at"})," the block the ",(0,a.jsx)(s.code,{children:"balances.minted"})," event was emitted."]}),"\n",(0,a.jsxs)(s.li,{children:["Filter for ",(0,a.jsx)(s.code,{children:"messageQueue(Processed)"})," events. These can be emitted during any phase of the block,\nnot just initialization. This event has a parameter ",(0,a.jsx)(s.code,{children:"Id"}),". The value of ",(0,a.jsx)(s.code,{children:"Id"})," identifies the\ncross-chain message received in the relay chain or in the Asset Hub. It can be used to track back\nthe message in the origin parachain if needed. Note that a block may contain several\n",(0,a.jsx)(s.code,{children:"messageQueue(Processed)"})," events corresponding to several cross-chain messages processed for this\nblock."]}),"\n"]}),"\n",(0,a.jsx)(s.h4,{id:"additional-examples-of-monitoring-xcm-transfers",children:"Additional Examples of Monitoring XCM Transfers"}),"\n",(0,a.jsx)(s.p,{children:"The two previous sections outline the process of monitoring XCM deposits to specific account(s) and\nthen tracing back the origin of these deposits. However, the process of tracking an XCM transfer\n(hence the events to look for) may vary based on the direction of the XCM message. Here are some\nexamples to showcase the slight differences:"}),"\n",(0,a.jsxs)(s.ol,{children:["\n",(0,a.jsxs)(s.li,{children:["\n",(0,a.jsxs)(s.p,{children:["For an XCM transfer from a Parachain to a relay chain\n",(0,a.jsxs)(s.em,{children:["(",(0,a.jsx)(s.a,{href:"https://polkadot.subscan.io/xcm_message/polkadot-3effaf637dd2a3ac5a644ccc693cbf58a6957d84",children:"example"}),")"]}),":"]}),"\n",(0,a.jsxs)(s.ul,{children:["\n",(0,a.jsxs)(s.li,{children:["The ",(0,a.jsx)(s.a,{href:"https://hydradx.subscan.io/extrinsic/5136464-2?event=5136464-7",children:"event"})," to look for in the\nParachain side is called ",(0,a.jsx)(s.code,{children:"parachainsystem (UpwardMessageSent)"}),", and the parameter\n",(0,a.jsx)(s.code,{children:"message_hash"})," in this event identifies the XCM transfer."]}),"\n",(0,a.jsxs)(s.li,{children:["The ",(0,a.jsx)(s.a,{href:"https://polkadot.subscan.io/block/20810935?tab=event&&event=20810935-4",children:"event"})," to track in\nthe relay chain side is called ",(0,a.jsx)(s.code,{children:"messagequeue (Processed)"}),", and the parameter ",(0,a.jsx)(s.code,{children:"id"})," of the event\nshould be the same as the ",(0,a.jsx)(s.code,{children:"message_hash"})," found in the Parachain event."]}),"\n"]}),"\n"]}),"\n",(0,a.jsxs)(s.li,{children:["\n",(0,a.jsxs)(s.p,{children:["For an XCM transfer from a relay chain to a parachain\n",(0,a.jsxs)(s.em,{children:["(",(0,a.jsx)(s.a,{href:"https://polkadot.subscan.io/xcm_message/polkadot-b2f455ed6ca1b4fdea746dfe8d150c10ec74440e",children:"example"}),")"]}),":"]}),"\n",(0,a.jsxs)(s.ul,{children:["\n",(0,a.jsxs)(s.li,{children:["The ",(0,a.jsx)(s.a,{href:"https://polkadot.subscan.io/extrinsic/20810793-2?event=20810793-53",children:"event"})," to look for in\nthe relay chain side is called ",(0,a.jsx)(s.code,{children:"xcmPallet (sent)"}),", and the parameter ",(0,a.jsx)(s.code,{children:"message_id"})," in this event\nidentifies the XCM transfer."]}),"\n",(0,a.jsxs)(s.li,{children:["The ",(0,a.jsx)(s.a,{href:"https://moonbeam.subscan.io/extrinsic/6174523-0?event=6174523-5",children:"event"})," to look for in the\nParachain side is called ",(0,a.jsx)(s.code,{children:"dmpqueue (ExecutedDownward)"}),", and the parameter that identifies the\nXCM message is either called ",(0,a.jsx)(s.code,{children:"message_hash"})," or ",(0,a.jsx)(s.code,{children:"message_id"}),"."]}),"\n"]}),"\n"]}),"\n",(0,a.jsxs)(s.li,{children:["\n",(0,a.jsxs)(s.p,{children:["For an XCM transfer from a System Parachain to a Parachain\n",(0,a.jsxs)(s.em,{children:["(",(0,a.jsx)(s.a,{href:"https://polkadot.subscan.io/xcm_message/polkadot-72ed4496d1cb793e10084170548d5caf622ea338",children:"example"}),")"]}),":"]}),"\n",(0,a.jsxs)(s.ul,{children:["\n",(0,a.jsxs)(s.li,{children:["The ",(0,a.jsx)(s.a,{href:"https://assethub-polkadot.subscan.io/extrinsic/6275027-4?event=6275027-22",children:"event"})," to look\nfor in the System Parachain side is called ",(0,a.jsx)(s.code,{children:"xcmpqueue (XcmpMessageSent)"}),", and again the\n",(0,a.jsx)(s.code,{children:"message_hash"})," is one of the parameters of the event."]}),"\n",(0,a.jsxs)(s.li,{children:["The corresponding ",(0,a.jsx)(s.a,{href:"https://hydradx.subscan.io/extrinsic/5135860-1?event=5135860-6",children:"event"})," in\nthe Parachain side is the ",(0,a.jsx)(s.code,{children:"xcmpqueue (Success)"})," and the ",(0,a.jsx)(s.code,{children:"message_hash"})," found in that event\nshould have the same value as the one in the System parachain."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,a.jsx)(s.h4,{id:"monitoring-of-failed-xcm-transfers",children:"Monitoring of Failed XCM Transfers"}),"\n",(0,a.jsx)(s.p,{children:"In case that an XCM transfer fails to complete successfully, then we will notice some different\nparameters in the events emitted or different events. Below are some examples:"}),"\n",(0,a.jsxs)(s.ol,{children:["\n",(0,a.jsxs)(s.li,{children:["\n",(0,a.jsxs)(s.p,{children:["From a relay chain to a System Parachain\n",(0,a.jsxs)(s.em,{children:["(",(0,a.jsx)(s.a,{href:"https://polkadot.subscan.io/xcm_message/polkadot-c8d7186edb43a592d65b3b5a87c4ecaac38c5aa2",children:"example"}),")"]}),":"]}),"\n",(0,a.jsxs)(s.ul,{children:["\n",(0,a.jsxs)(s.li,{children:["We will see the\n",(0,a.jsx)(s.a,{href:"https://assethub-polkadot.subscan.io/extrinsic/4671081-0?event=4671081-1",children:"event"}),"\n",(0,a.jsx)(s.code,{children:"dmpqueue (ExecutedDownward)"})," in the System Parachain side with the following parameters:","\n",(0,a.jsxs)(s.ul,{children:["\n",(0,a.jsxs)(s.li,{children:[(0,a.jsx)(s.code,{children:"outcome"})," with value ",(0,a.jsx)(s.code,{children:"Incomplete"})," and with the type of error which in this example is\n",(0,a.jsx)(s.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/c54ea64af43b522d23bfabb8d917a490c0f23217/polkadot/xcm/src/v2/traits.rs#L43",children:"UntrustedReserveLocation"}),"."]}),"\n",(0,a.jsxs)(s.li,{children:[(0,a.jsx)(s.code,{children:"message_id"})," which shows the hash of the XCM Transfer."]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,a.jsxs)(s.li,{children:["\n",(0,a.jsxs)(s.p,{children:["From a Parachain to another Parachain\n",(0,a.jsxs)(s.em,{children:["(",(0,a.jsx)(s.a,{href:"https://polkadot.subscan.io/xcm_message/polkadot-3e74e95204faa6ecf3c81f5129b85f498b89cff2",children:"example"}),")"]}),":"]}),"\n",(0,a.jsxs)(s.ul,{children:["\n",(0,a.jsxs)(s.li,{children:["We will see the ",(0,a.jsx)(s.a,{href:"https://interlay.subscan.io/extrinsic/3627057-1?event=3627057-8",children:"event"}),"\n",(0,a.jsx)(s.code,{children:"xcmpqueue (Fail)"})," in the destination Parachain with the following parameters:","\n",(0,a.jsxs)(s.ul,{children:["\n",(0,a.jsxs)(s.li,{children:[(0,a.jsx)(s.code,{children:"error"})," which in this example is\n",(0,a.jsx)(s.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/c54ea64af43b522d23bfabb8d917a490c0f23217/polkadot/xcm/src/v2/traits.rs#L98",children:"TooExpensive"}),"."]}),"\n",(0,a.jsxs)(s.li,{children:[(0,a.jsx)(s.code,{children:"message_hash"})," which identifies the XCM Transfer."]}),"\n"]}),"\n"]}),"\n",(0,a.jsxs)(s.li,{children:[(0,a.jsx)(s.strong,{children:"Note"}),": there might be another\n",(0,a.jsx)(s.a,{href:"https://interlay.subscan.io/extrinsic/3627057-1?event=3627057-7",children:"event"})," called\n",(0,a.jsx)(s.code,{children:"polkadotxcm (AssetsTrapped)"})," which indicates that some assets have been trapped (and hence can\nbe claimed)."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,a.jsxs)(s.p,{children:["A great resource to learn more about Error Management in XCM is the Polkadot blog post from Gavin\nWood,\n",(0,a.jsx)(s.a,{href:"https://www.polkadot.network/blog/xcm-part-three-execution-and-error-management",children:"XCM Part III: Execution and Error Management"}),"."]})]})}function d(e={}){const{wrapper:s}={...(0,i.R)(),...e.components};return s?(0,a.jsx)(s,{...e,children:(0,a.jsx)(l,{...e})}):l(e)}},28453:(e,s,n)=>{n.d(s,{R:()=>r,x:()=>o});var t=n(96540);const a={},i=t.createContext(a);function r(e){const s=t.useContext(i);return t.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function o(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:r(e.components),t.createElement(i.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/2387.0874b43f.js b/assets/js/2387.0874b43f.js new file mode 100644 index 000000000000..51abb4280120 --- /dev/null +++ b/assets/js/2387.0874b43f.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2387],{82387:(e,s,a)=>{a.d(s,{createGitGraphServices:()=>c.b});var c=a(82785);a(19369)}}]); \ No newline at end of file diff --git a/assets/js/240a6b01.5a806406.js b/assets/js/240a6b01.5a806406.js new file mode 100644 index 000000000000..f94375868e92 --- /dev/null +++ b/assets/js/240a6b01.5a806406.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9633],{11140:(e,n,d)=>{d.r(n),d.d(n,{assets:()=>r,contentTitle:()=>o,default:()=>h,frontMatter:()=>t,metadata:()=>s,toc:()=>l});const s=JSON.parse('{"id":"general/dune-analytics/parachain-dashboards/nodle-dashboards","title":"Nodle Dashboards","description":"Nodle is a parachain on Polkadot focused on providing connectivity and data liquidity for the Internet of Things (IoT).","source":"@site/../docs/general/dune-analytics/parachain-dashboards/nodle-dashboards.md","sourceDirName":"general/dune-analytics/parachain-dashboards","slug":"/general/dune-analytics/nodle-dashboards","permalink":"/docs/general/dune-analytics/nodle-dashboards","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/parachain-dashboards/nodle-dashboards.md","tags":[],"version":"current","lastUpdatedBy":"MK","lastUpdatedAt":1719215716000,"frontMatter":{"id":"nodle-dashboards","title":"Nodle Dashboards","sidebar_label":"Nodle","description":"Nodle is a parachain on Polkadot focused on providing connectivity and data liquidity for the Internet of Things (IoT).","keywords":["polkadot","dashboard","dune","nodle","IoT"],"slug":"../nodle-dashboards"},"sidebar":"docs","previous":{"title":"Neuroweb","permalink":"/docs/general/dune-analytics/neuroweb-dashboards"},"next":{"title":"People","permalink":"/docs/general/dune-analytics/people-dashboards"}}');var a=d(74848),i=d(28453);const t={id:"nodle-dashboards",title:"Nodle Dashboards",sidebar_label:"Nodle",description:"Nodle is a parachain on Polkadot focused on providing connectivity and data liquidity for the Internet of Things (IoT).",keywords:["polkadot","dashboard","dune","nodle","IoT"],slug:"../nodle-dashboards"},o="Nodle Dashboards",r={},l=[{value:"Overview",id:"overview",level:2},{value:"Featured Dashboards on Dune",id:"featured-dashboards-on-dune",level:2},{value:"Key Tables",id:"key-tables",level:2},{value:"Useful Queries",id:"useful-queries",level:2},{value:"Getting Started with Queries",id:"getting-started-with-queries",level:2}];function c(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,i.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.header,{children:(0,a.jsx)(n.h1,{id:"nodle-dashboards",children:"Nodle Dashboards"})}),"\n",(0,a.jsx)(n.h2,{id:"overview",children:"Overview"}),"\n",(0,a.jsx)(n.p,{children:"Nodle is a parachain on Polkadot focused on providing connectivity and data liquidity for the\nInternet of Things (IoT). It enables devices to securely connect, interact, and transact with\nefficiency."}),"\n",(0,a.jsx)(n.h2,{id:"featured-dashboards-on-dune",children:"Featured Dashboards on Dune"}),"\n",(0,a.jsx)(n.p,{children:"Here you will find a variety of dashboards that help visualize data from the Nodle parachain:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.a,{href:"https://dune.com/substrate/nodle",children:"Nodle Dashboard"}),": A comprehensive view of IoT connectivity and\ntransactions within the Nodle ecosystem."]}),"\n"]}),"\n",(0,a.jsxs)(n.p,{children:["Please also visit our dashboards for Nodle on\n",(0,a.jsx)(n.a,{href:"https://dune.com/discover/content/relevant?q=title:Nodle%20author:substrate",children:"Dune Analytics"}),"."]}),"\n",(0,a.jsx)(n.h2,{id:"key-tables",children:"Key Tables"}),"\n",(0,a.jsx)(n.p,{children:"Data from the Nodle parachain is organized into several key tables:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.code,{children:"nodle.balances"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.code,{children:"nodle.blocks"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.code,{children:"nodle.calls"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.code,{children:"nodle.events"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.code,{children:"nodle.extrinsics"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.code,{children:"nodle.transfers"})}),"\n"]}),"\n",(0,a.jsxs)(n.p,{children:["Start building your own queries using granular data on Dune\n",(0,a.jsx)(n.a,{href:"https://dune.com/queries?category=canonical&namespace=nodle",children:"here"}),"."]}),"\n",(0,a.jsx)(n.h2,{id:"useful-queries",children:"Useful Queries"}),"\n",(0,a.jsx)(n.p,{children:"Some useful queries for Nodle are provided:"}),"\n",(0,a.jsxs)(n.table,{children:[(0,a.jsx)(n.thead,{children:(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.th,{children:"Title"}),(0,a.jsx)(n.th,{children:"Query"}),(0,a.jsx)(n.th,{children:"Description"})]})}),(0,a.jsx)(n.tbody,{children:(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:"Nodle Mint Uniques"}),(0,a.jsx)(n.td,{children:(0,a.jsx)(n.a,{href:"https://dune.com/queries/3753531",children:"query_3753531"})}),(0,a.jsx)(n.td,{children:"This query retrieves data on Unique NFTs minted within the Nodle ecosystem."})]})})]}),"\n",(0,a.jsx)(n.h2,{id:"getting-started-with-queries",children:"Getting Started with Queries"}),"\n",(0,a.jsx)(n.p,{children:"To get started with querying data from Unique, you are welcome to use the mentioned materialized\nqueries. You can use the following DuneSQL queries as examples:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-sql",metastring:'title="Nodle Mint Uniques" showLineNumbers',children:"SELECT DISTINCT\n block_time,\n JSON_EXTRACT_SCALAR(call_args, '$.owner.id') AS owner,\n JSON_EXTRACT(call_args, '$.collection') AS collection,\n JSON_EXTRACT(call_args, '$.item') AS item\nFROM\n nodle.calls\nWHERE\n (call_section = 'nodleUniques' OR call_section = 'uniques')\n AND call_method = 'mint'\n AND extrinsic_id NOT IN (\n SELECT\n extrinsic_id\n FROM\n nodle.events\n WHERE\n method = 'ExtrinsicFailed'\n );\n"})}),"\n",(0,a.jsx)(n.p,{children:"Query result:"}),"\n",(0,a.jsx)("iframe",{src:"https://dune.com/embeds/3753531/6312831/",height:"350",width:"100%"}),"\n",(0,a.jsx)(n.admonition,{title:"DuneSQL Referece",type:"info",children:(0,a.jsxs)(n.p,{children:["For more information on DuneSQL, please refer to the ",(0,a.jsx)(n.a,{href:"/docs/general/dunesql-cheatsheet",children:"DuneSQL Cheatsheet"}),"\nand\n",(0,a.jsx)(n.a,{href:"https://docs.dune.com/query-engine/Functions-and-operators/index",children:"DuneSQL Official Documentation"}),"."]})})]})}function h(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(c,{...e})}):c(e)}},28453:(e,n,d)=>{d.d(n,{R:()=>t,x:()=>o});var s=d(96540);const a={},i=s.createContext(a);function t(e){const n=s.useContext(i);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:t(e.components),s.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/240a6b01.fc7d0a43.js b/assets/js/240a6b01.fc7d0a43.js deleted file mode 100644 index 4766e72d2d96..000000000000 --- a/assets/js/240a6b01.fc7d0a43.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9633],{92532:(e,n,d)=>{d.r(n),d.d(n,{assets:()=>r,contentTitle:()=>a,default:()=>h,frontMatter:()=>t,metadata:()=>o,toc:()=>l});var s=d(74848),i=d(28453);const t={id:"nodle-dashboards",title:"Nodle Dashboards",sidebar_label:"Nodle",description:"Nodle is a parachain on Polkadot focused on providing connectivity and data liquidity for the Internet of Things (IoT).",keywords:["polkadot","dashboard","dune","nodle","IoT"],slug:"../nodle-dashboards"},a="Nodle Dashboards",o={id:"general/dune-analytics/parachain-dashboards/nodle-dashboards",title:"Nodle Dashboards",description:"Nodle is a parachain on Polkadot focused on providing connectivity and data liquidity for the Internet of Things (IoT).",source:"@site/../docs/general/dune-analytics/parachain-dashboards/nodle-dashboards.md",sourceDirName:"general/dune-analytics/parachain-dashboards",slug:"/general/dune-analytics/nodle-dashboards",permalink:"/docs/general/dune-analytics/nodle-dashboards",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/parachain-dashboards/nodle-dashboards.md",tags:[],version:"current",lastUpdatedBy:"MK",lastUpdatedAt:1719215716e3,frontMatter:{id:"nodle-dashboards",title:"Nodle Dashboards",sidebar_label:"Nodle",description:"Nodle is a parachain on Polkadot focused on providing connectivity and data liquidity for the Internet of Things (IoT).",keywords:["polkadot","dashboard","dune","nodle","IoT"],slug:"../nodle-dashboards"},sidebar:"docs",previous:{title:"Neuroweb",permalink:"/docs/general/dune-analytics/neuroweb-dashboards"},next:{title:"People",permalink:"/docs/general/dune-analytics/people-dashboards"}},r={},l=[{value:"Overview",id:"overview",level:2},{value:"Featured Dashboards on Dune",id:"featured-dashboards-on-dune",level:2},{value:"Key Tables",id:"key-tables",level:2},{value:"Useful Queries",id:"useful-queries",level:2},{value:"Getting Started with Queries",id:"getting-started-with-queries",level:2}];function c(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"nodle-dashboards",children:"Nodle Dashboards"})}),"\n",(0,s.jsx)(n.h2,{id:"overview",children:"Overview"}),"\n",(0,s.jsx)(n.p,{children:"Nodle is a parachain on Polkadot focused on providing connectivity and data liquidity for the\nInternet of Things (IoT). It enables devices to securely connect, interact, and transact with\nefficiency."}),"\n",(0,s.jsx)(n.h2,{id:"featured-dashboards-on-dune",children:"Featured Dashboards on Dune"}),"\n",(0,s.jsx)(n.p,{children:"Here you will find a variety of dashboards that help visualize data from the Nodle parachain:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"https://dune.com/substrate/nodle",children:"Nodle Dashboard"}),": A comprehensive view of IoT connectivity and\ntransactions within the Nodle ecosystem."]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["Please also visit our dashboards for Nodle on\n",(0,s.jsx)(n.a,{href:"https://dune.com/discover/content/relevant?q=title:Nodle%20author:substrate",children:"Dune Analytics"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"key-tables",children:"Key Tables"}),"\n",(0,s.jsx)(n.p,{children:"Data from the Nodle parachain is organized into several key tables:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"nodle.balances"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"nodle.blocks"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"nodle.calls"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"nodle.events"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"nodle.extrinsics"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"nodle.transfers"})}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["Start building your own queries using granular data on Dune\n",(0,s.jsx)(n.a,{href:"https://dune.com/queries?category=canonical&namespace=nodle",children:"here"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"useful-queries",children:"Useful Queries"}),"\n",(0,s.jsx)(n.p,{children:"Some useful queries for Nodle are provided:"}),"\n",(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Title"}),(0,s.jsx)(n.th,{children:"Query"}),(0,s.jsx)(n.th,{children:"Description"})]})}),(0,s.jsx)(n.tbody,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Nodle Mint Uniques"}),(0,s.jsx)(n.td,{children:(0,s.jsx)(n.a,{href:"https://dune.com/queries/3753531",children:"query_3753531"})}),(0,s.jsx)(n.td,{children:"This query retrieves data on Unique NFTs minted within the Nodle ecosystem."})]})})]}),"\n",(0,s.jsx)(n.h2,{id:"getting-started-with-queries",children:"Getting Started with Queries"}),"\n",(0,s.jsx)(n.p,{children:"To get started with querying data from Unique, you are welcome to use the mentioned materialized\nqueries. You can use the following DuneSQL queries as examples:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-sql",metastring:'title="Nodle Mint Uniques" showLineNumbers',children:"SELECT DISTINCT\n block_time,\n JSON_EXTRACT_SCALAR(call_args, '$.owner.id') AS owner,\n JSON_EXTRACT(call_args, '$.collection') AS collection,\n JSON_EXTRACT(call_args, '$.item') AS item\nFROM\n nodle.calls\nWHERE\n (call_section = 'nodleUniques' OR call_section = 'uniques')\n AND call_method = 'mint'\n AND extrinsic_id NOT IN (\n SELECT\n extrinsic_id\n FROM\n nodle.events\n WHERE\n method = 'ExtrinsicFailed'\n );\n"})}),"\n",(0,s.jsx)(n.p,{children:"Query result:"}),"\n",(0,s.jsx)("iframe",{src:"https://dune.com/embeds/3753531/6312831/",height:"350",width:"100%"}),"\n",(0,s.jsx)(n.admonition,{title:"DuneSQL Referece",type:"info",children:(0,s.jsxs)(n.p,{children:["For more information on DuneSQL, please refer to the ",(0,s.jsx)(n.a,{href:"/docs/general/dunesql-cheatsheet",children:"DuneSQL Cheatsheet"}),"\nand\n",(0,s.jsx)(n.a,{href:"https://docs.dune.com/query-engine/Functions-and-operators/index",children:"DuneSQL Official Documentation"}),"."]})})]})}function h(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(c,{...e})}):c(e)}},28453:(e,n,d)=>{d.d(n,{R:()=>a,x:()=>o});var s=d(96540);const i={},t=s.createContext(i);function a(e){const n=s.useContext(t);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:a(e.components),s.createElement(t.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/2462cc91.cde08601.js b/assets/js/2462cc91.cde08601.js deleted file mode 100644 index 5397ec19b874..000000000000 --- a/assets/js/2462cc91.cde08601.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9141],{49631:(e,i,t)=>{t.r(i),t.d(i,{assets:()=>l,contentTitle:()=>r,default:()=>u,frontMatter:()=>a,metadata:()=>o,toc:()=>c});var s=t(74848),n=t(28453);const a={id:"multisig-apps",title:"Polkadot Multisig Apps",sidebar_label:"Multisig Apps",description:"Multisig Apps in the Polkadot Ecosystem.",keywords:["account","signer","balance","multisig"],slug:"../multisig-apps"},r=void 0,o={id:"general/multisig-apps",title:"Polkadot Multisig Apps",description:"Multisig Apps in the Polkadot Ecosystem.",source:"@site/../docs/general/multisig-apps.md",sourceDirName:"general",slug:"/multisig-apps",permalink:"/docs/multisig-apps",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/multisig-apps.md",tags:[],version:"current",lastUpdatedBy:"github-actions[bot]",lastUpdatedAt:1714978178e3,frontMatter:{id:"multisig-apps",title:"Polkadot Multisig Apps",sidebar_label:"Multisig Apps",description:"Multisig Apps in the Polkadot Ecosystem.",keywords:["account","signer","balance","multisig"],slug:"../multisig-apps"},sidebar:"docs",previous:{title:"Governance Apps",permalink:"/docs/governance-apps"},next:{title:"NFT Projects",permalink:"/docs/learn-nft-projects"}},l={},c=[{value:"Mimir",id:"mimir",level:2},{value:"Multix by Chainsafe",id:"multix-by-chainsafe",level:2},{value:"Nova Spektr",id:"nova-spektr",level:2},{value:"Polkadot Multisig by Signet",id:"polkadot-multisig-by-signet",level:2},{value:"Signet",id:"signet",level:3},{value:"Polkasafe",id:"polkasafe",level:2}];function d(e){const i={a:"a",admonition:"admonition",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",strong:"strong",ul:"ul",...(0,n.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(i.admonition,{title:"Community Page",type:"info",children:(0,s.jsxs)(i.p,{children:["This page is open to contributions from the community. Please follow the\n",(0,s.jsx)(i.a,{href:"https://github.com/w3f/polkadot-wiki#contributing-to-documentation",children:"Wiki contribution guidelines"}),"\nand add your Multisig app to this page."]})}),"\n",(0,s.jsx)(i.p,{children:"List of Multisig apps in Polkadot Ecosystem"}),"\n",(0,s.jsxs)(i.ul,{children:["\n",(0,s.jsx)(i.li,{children:(0,s.jsx)(i.a,{href:"#mimir",children:"Mimir"})}),"\n",(0,s.jsx)(i.li,{children:(0,s.jsx)(i.a,{href:"#multix-by-chainsafe",children:"Multix by Chainsafe"})}),"\n",(0,s.jsx)(i.li,{children:(0,s.jsx)(i.a,{href:"#nova-spektr",children:"Nova Spektr"})}),"\n",(0,s.jsx)(i.li,{children:(0,s.jsx)(i.a,{href:"#polkadot-multisig-by-signet",children:"Polkadot Multisig by Signet"})}),"\n",(0,s.jsx)(i.li,{children:(0,s.jsx)(i.a,{href:"#polkasafe",children:"Polkasafe"})}),"\n"]}),"\n",(0,s.jsx)(i.h2,{id:"mimir",children:"Mimir"}),"\n",(0,s.jsxs)(i.p,{children:["Quick Link: ",(0,s.jsx)(i.a,{href:"https://www.youtube.com/watch?v=amm_Vk0vzP4&t=43s",children:"Demo"})," |\n",(0,s.jsx)(i.a,{href:"https://app.mimir.global/",children:"Website"})," | ",(0,s.jsx)(i.a,{href:"https://twitter.com/Mimir_global",children:"Twitter"})," |\n",(0,s.jsx)(i.a,{href:"https://t.me/+t7vZ1kXV5h1kNGQ9",children:"Telegram"})," | ",(0,s.jsx)(i.a,{href:"https://github.com/mimir-labs",children:"Github"})]}),"\n",(0,s.jsxs)(i.ul,{children:["\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.strong,{children:"Support for Various Account Types"}),": Mimir supports a range of account types including Flexible\nMultisig, Static Multisig, Nested Multisig, and Extension Wallets."]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.strong,{children:"Transaction Tracking"}),": Offers real-time synchronization of transactions across different\naccount levels."]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.strong,{children:"Third-Party Application Integration"}),": Users can access third-party applications with their\nmultisig identities. Mimir currently supports integration with applications like Polkadot.js and\nis planning to expand to others."]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.strong,{children:"User-Friendly Interface"}),": Designed for ease of use, making complex multisig operations more\naccessible."]}),"\n"]}),"\n",(0,s.jsx)(i.h2,{id:"multix-by-chainsafe",children:"Multix by Chainsafe"}),"\n",(0,s.jsx)(i.admonition,{title:"Walk-Through Video Tutorial",type:"info",children:(0,s.jsxs)(i.p,{children:["See ",(0,s.jsx)(i.a,{href:"https://www.youtube.com/watch?v=APxPsawebJw",children:"this video tutorial"})," and\n",(0,s.jsx)(i.a,{href:"https://blog.chainsafe.io/multix-a-simple-interface-to-manage-complex-multisigs-on-polkadot-97328be26f9d",children:"this article"}),"\nfor more information about using ",(0,s.jsx)(i.a,{href:"https://multix.chainsafe.io/",children:"Multix"})," for multisig accounts."]})}),"\n",(0,s.jsxs)(i.p,{children:["The ",(0,s.jsx)(i.a,{href:"https://multix.chainsafe.io/",children:"Multix tool"})," is an easy-to-use interface to manage complex\nmultisigs. The tool is part of\n",(0,s.jsx)(i.a,{href:"https://wiki.polkadot.network/docs/build-open-source#user-interface",children:"the open-source Polkadot/Kusama Tech Stack"}),".\nBesides being user-friendly, Multix provides several benefits:"]}),"\n",(0,s.jsxs)(i.ul,{children:["\n",(0,s.jsx)(i.li,{children:"When one person creates the multisig account, all the signatories see the multisig account on\ntheir interface."}),"\n",(0,s.jsx)(i.li,{children:"There is no need to pass around the call data to confirm a transaction. Such information is\nretrieved from the chain and displayed to the users."}),"\n",(0,s.jsxs)(i.li,{children:["Thanks to the power of ",(0,s.jsx)(i.a,{href:"/docs/learn-proxies-pure#anonymous-proxy-pure-proxy",children:"pure proxies"}),",\nadding and removing signatories or adjusting the threshold is now possible without creating new\nmultisigs and Multix provides an intuitive interface to work with pure proxies."]}),"\n"]}),"\n",(0,s.jsxs)(i.p,{children:["The pure proxy setup used by ",(0,s.jsx)(i.a,{href:"https://github.com/ChainSafe/Multix",children:"MultiX"})," can be seen on the\n",(0,s.jsx)(i.a,{href:"/docs/learn-proxies-pure#scenario-three-multisig-controlling-a-pure-proxy",children:"pure proxy page"}),"."]}),"\n",(0,s.jsx)(i.h2,{id:"nova-spektr",children:"Nova Spektr"}),"\n",(0,s.jsx)(i.p,{children:(0,s.jsx)(i.img,{src:"https://github.com/Leemo94/polkadot-wiki/blob/master/docs/assets/nova_spektr.png?raw=true",alt:""})}),"\n",(0,s.jsx)(i.p,{children:"Nova Spektr is your all-in-one Polkadot Wallet, engineered with enterprise-grade capabilities such\nas multisigs, proxy accounts, hardware wallets, light clients, and much more. Nova Spektr is\ndesigned to meet the requirements of enterprises, power users, and individual users alike \u2013 funded\nby the Polkadot Treasury"}),"\n",(0,s.jsxs)(i.ul,{children:["\n",(0,s.jsx)(i.li,{children:"Multichain Wallet \u2013 Nova Spektr supports 80+ Polkadot ecosystem networks, and hundreds of tokens\nconsolidating them all under a single interface!"}),"\n",(0,s.jsx)(i.li,{children:"Multisigs \u2013 Experience superior security with truly multi-chain Multisig Wallets in Nova Spektr!"}),"\n",(0,s.jsx)(i.li,{children:"Proxy Discovery \u2013 Discover all your Proxy accounts automatically when importing your wallet into\nNova Spektr!"}),"\n",(0,s.jsx)(i.li,{children:"Collaborative Asset Management \u2013 Manage your assets in a simple, secure, and collaborative manner,\nrequiring a predefined level of consensus to be reached for each transaction\u2019s authorization."}),"\n",(0,s.jsx)(i.li,{children:"Hardware Wallet Support \u2013 Safeguard your assets even further by pairing your hardware wallet with\nNova Spektr!"}),"\n",(0,s.jsx)(i.li,{children:"Light Clients \u2013 Unleash an unstoppable, fast, and trustless working environment with Nova Spektr\nby utilizing locally hosted blockchain nodes to manage your digital assets in the Polkadot\necosystem!"}),"\n",(0,s.jsx)(i.li,{children:"Data Verification \u2013 Benefit from Polkadot and Kusama Light Clients to cryptographically verify\ndata from public blockchain nodes!"}),"\n",(0,s.jsx)(i.li,{children:"Open Source & Trustless \u2013 Your data remains yours \u2014 Nova Spektr never stores or tracks user data!"}),"\n"]}),"\n",(0,s.jsx)(i.h2,{id:"polkadot-multisig-by-signet",children:"Polkadot Multisig by Signet"}),"\n",(0,s.jsxs)(i.p,{children:[(0,s.jsx)(i.a,{href:"https://polkadotmultisig.com/",children:"Polkadot Multisig"})," by Signet is user-friendly software that helps\nteams and businesses use multisigs in the Polkadot ecosystem. Multisigs are generally used by\norganizations to hold treasury assets, pay employees or service providers, receive grants or manage\nan organization's on-chain identity."]}),"\n",(0,s.jsxs)(i.p,{children:["Polkadot Multisig is designed to be usable by a non-technical business user and enables a user to be\nproductive and understand multisig transactions. Further information is available on\n",(0,s.jsx)(i.a,{href:"https://guide.polkadotmultisig.com/en",children:"Polkadot Multisig guide."})]}),"\n",(0,s.jsx)(i.h3,{id:"signet",children:"Signet"}),"\n",(0,s.jsxs)(i.p,{children:["Talisman ",(0,s.jsx)(i.a,{href:"https://www.talisman.xyz/signet",children:"Signet"})," supports multisig ops and enterprise workflow for\nonchain organisations. Enterprise features and self-hosted options are available. Signet is\nproprietary, where as Polkadot Multisig by Signet is free."]}),"\n",(0,s.jsx)(i.h2,{id:"polkasafe",children:"Polkasafe"}),"\n",(0,s.jsx)(i.p,{children:(0,s.jsx)(i.img,{src:"https://github.com/w3f/polkadot-wiki/assets/874046/586bf051-a7fb-43c0-957e-0b659d50c9ab",alt:"Polkasafe"})}),"\n",(0,s.jsxs)(i.p,{children:[(0,s.jsx)(i.a,{href:"https://polkasafe.xyz",children:"Polkasafe"})," - Your gateway to the Ultimate MultiSig experience on Polkadot."]}),"\n",(0,s.jsx)(i.p,{children:"Gone are the days of cumbersome MultiSig transactions. PolkaSafe redefines the way you interact with\nthe Polkadot Blockchain, making MultiSig operations not just safer but also incredibly\nuser-friendly."}),"\n",(0,s.jsxs)(i.ul,{children:["\n",(0,s.jsx)(i.li,{children:"Seamless MultiSig Transactions: With PolkaSafe, initiating, approving, and executing MultiSig\ntransactions is a breeze. Whether you're managing funds, delegating responsibilities, or simply\nsecuring your assets, the platform's intuitive design ensures every step is straightforward."}),"\n",(0,s.jsx)(i.li,{children:"Collaborative Asset Management: Engage in collective decision-making with stakeholders, team\nmembers, or partners. PolkaSafe's collaborative tools make it easy to propose, discuss, and\nfinalize MultiSig transactions, ensuring transparency and consensus. Extrinsic Management: Beyond\nstandard transactions, PolkaSafe simplifies extrinsics \u2013 specialized instructions or functions on\nthe Polkadot Blockchain."}),"\n",(0,s.jsx)(i.li,{children:"Whether you're interacting with smart contracts, parachains, or other advanced features,\nPolkaSafe's MultiSig capabilities ensure every extrinsic is secure and efficient."}),"\n",(0,s.jsx)(i.li,{children:"User-Centric Design: Every feature, from initiating a transaction to diving deep into extrinsics,\nis designed for clarity and ease."}),"\n"]})]})}function u(e={}){const{wrapper:i}={...(0,n.R)(),...e.components};return i?(0,s.jsx)(i,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},28453:(e,i,t)=>{t.d(i,{R:()=>r,x:()=>o});var s=t(96540);const n={},a=s.createContext(n);function r(e){const i=s.useContext(a);return s.useMemo((function(){return"function"==typeof e?e(i):{...i,...e}}),[i,e])}function o(e){let i;return i=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:r(e.components),s.createElement(a.Provider,{value:i},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/2462cc91.d6a8757d.js b/assets/js/2462cc91.d6a8757d.js new file mode 100644 index 000000000000..82e1c116a04d --- /dev/null +++ b/assets/js/2462cc91.d6a8757d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9141],{10196:(e,i,t)=>{t.r(i),t.d(i,{assets:()=>l,contentTitle:()=>o,default:()=>u,frontMatter:()=>r,metadata:()=>s,toc:()=>c});const s=JSON.parse('{"id":"general/multisig-apps","title":"Polkadot Multisig Apps","description":"Multisig Apps in the Polkadot Ecosystem.","source":"@site/../docs/general/multisig-apps.md","sourceDirName":"general","slug":"/multisig-apps","permalink":"/docs/multisig-apps","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/multisig-apps.md","tags":[],"version":"current","lastUpdatedBy":"github-actions[bot]","lastUpdatedAt":1714978178000,"frontMatter":{"id":"multisig-apps","title":"Polkadot Multisig Apps","sidebar_label":"Multisig Apps","description":"Multisig Apps in the Polkadot Ecosystem.","keywords":["account","signer","balance","multisig"],"slug":"../multisig-apps"},"sidebar":"docs","previous":{"title":"Governance Apps","permalink":"/docs/governance-apps"},"next":{"title":"NFT Projects","permalink":"/docs/learn-nft-projects"}}');var n=t(74848),a=t(28453);const r={id:"multisig-apps",title:"Polkadot Multisig Apps",sidebar_label:"Multisig Apps",description:"Multisig Apps in the Polkadot Ecosystem.",keywords:["account","signer","balance","multisig"],slug:"../multisig-apps"},o=void 0,l={},c=[{value:"Mimir",id:"mimir",level:2},{value:"Multix by Chainsafe",id:"multix-by-chainsafe",level:2},{value:"Nova Spektr",id:"nova-spektr",level:2},{value:"Polkadot Multisig by Signet",id:"polkadot-multisig-by-signet",level:2},{value:"Signet",id:"signet",level:3},{value:"Polkasafe",id:"polkasafe",level:2}];function d(e){const i={a:"a",admonition:"admonition",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",strong:"strong",ul:"ul",...(0,a.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(i.admonition,{title:"Community Page",type:"info",children:(0,n.jsxs)(i.p,{children:["This page is open to contributions from the community. Please follow the\n",(0,n.jsx)(i.a,{href:"https://github.com/w3f/polkadot-wiki#contributing-to-documentation",children:"Wiki contribution guidelines"}),"\nand add your Multisig app to this page."]})}),"\n",(0,n.jsx)(i.p,{children:"List of Multisig apps in Polkadot Ecosystem"}),"\n",(0,n.jsxs)(i.ul,{children:["\n",(0,n.jsx)(i.li,{children:(0,n.jsx)(i.a,{href:"#mimir",children:"Mimir"})}),"\n",(0,n.jsx)(i.li,{children:(0,n.jsx)(i.a,{href:"#multix-by-chainsafe",children:"Multix by Chainsafe"})}),"\n",(0,n.jsx)(i.li,{children:(0,n.jsx)(i.a,{href:"#nova-spektr",children:"Nova Spektr"})}),"\n",(0,n.jsx)(i.li,{children:(0,n.jsx)(i.a,{href:"#polkadot-multisig-by-signet",children:"Polkadot Multisig by Signet"})}),"\n",(0,n.jsx)(i.li,{children:(0,n.jsx)(i.a,{href:"#polkasafe",children:"Polkasafe"})}),"\n"]}),"\n",(0,n.jsx)(i.h2,{id:"mimir",children:"Mimir"}),"\n",(0,n.jsxs)(i.p,{children:["Quick Link: ",(0,n.jsx)(i.a,{href:"https://www.youtube.com/watch?v=amm_Vk0vzP4&t=43s",children:"Demo"})," |\n",(0,n.jsx)(i.a,{href:"https://app.mimir.global/",children:"Website"})," | ",(0,n.jsx)(i.a,{href:"https://twitter.com/Mimir_global",children:"Twitter"})," |\n",(0,n.jsx)(i.a,{href:"https://t.me/+t7vZ1kXV5h1kNGQ9",children:"Telegram"})," | ",(0,n.jsx)(i.a,{href:"https://github.com/mimir-labs",children:"Github"})]}),"\n",(0,n.jsxs)(i.ul,{children:["\n",(0,n.jsxs)(i.li,{children:[(0,n.jsx)(i.strong,{children:"Support for Various Account Types"}),": Mimir supports a range of account types including Flexible\nMultisig, Static Multisig, Nested Multisig, and Extension Wallets."]}),"\n",(0,n.jsxs)(i.li,{children:[(0,n.jsx)(i.strong,{children:"Transaction Tracking"}),": Offers real-time synchronization of transactions across different\naccount levels."]}),"\n",(0,n.jsxs)(i.li,{children:[(0,n.jsx)(i.strong,{children:"Third-Party Application Integration"}),": Users can access third-party applications with their\nmultisig identities. Mimir currently supports integration with applications like Polkadot.js and\nis planning to expand to others."]}),"\n",(0,n.jsxs)(i.li,{children:[(0,n.jsx)(i.strong,{children:"User-Friendly Interface"}),": Designed for ease of use, making complex multisig operations more\naccessible."]}),"\n"]}),"\n",(0,n.jsx)(i.h2,{id:"multix-by-chainsafe",children:"Multix by Chainsafe"}),"\n",(0,n.jsx)(i.admonition,{title:"Walk-Through Video Tutorial",type:"info",children:(0,n.jsxs)(i.p,{children:["See ",(0,n.jsx)(i.a,{href:"https://www.youtube.com/watch?v=APxPsawebJw",children:"this video tutorial"})," and\n",(0,n.jsx)(i.a,{href:"https://blog.chainsafe.io/multix-a-simple-interface-to-manage-complex-multisigs-on-polkadot-97328be26f9d",children:"this article"}),"\nfor more information about using ",(0,n.jsx)(i.a,{href:"https://multix.chainsafe.io/",children:"Multix"})," for multisig accounts."]})}),"\n",(0,n.jsxs)(i.p,{children:["The ",(0,n.jsx)(i.a,{href:"https://multix.chainsafe.io/",children:"Multix tool"})," is an easy-to-use interface to manage complex\nmultisigs. The tool is part of\n",(0,n.jsx)(i.a,{href:"https://wiki.polkadot.network/docs/build-open-source#user-interface",children:"the open-source Polkadot/Kusama Tech Stack"}),".\nBesides being user-friendly, Multix provides several benefits:"]}),"\n",(0,n.jsxs)(i.ul,{children:["\n",(0,n.jsx)(i.li,{children:"When one person creates the multisig account, all the signatories see the multisig account on\ntheir interface."}),"\n",(0,n.jsx)(i.li,{children:"There is no need to pass around the call data to confirm a transaction. Such information is\nretrieved from the chain and displayed to the users."}),"\n",(0,n.jsxs)(i.li,{children:["Thanks to the power of ",(0,n.jsx)(i.a,{href:"/docs/learn-proxies-pure#anonymous-proxy-pure-proxy",children:"pure proxies"}),",\nadding and removing signatories or adjusting the threshold is now possible without creating new\nmultisigs and Multix provides an intuitive interface to work with pure proxies."]}),"\n"]}),"\n",(0,n.jsxs)(i.p,{children:["The pure proxy setup used by ",(0,n.jsx)(i.a,{href:"https://github.com/ChainSafe/Multix",children:"MultiX"})," can be seen on the\n",(0,n.jsx)(i.a,{href:"/docs/learn-proxies-pure#scenario-three-multisig-controlling-a-pure-proxy",children:"pure proxy page"}),"."]}),"\n",(0,n.jsx)(i.h2,{id:"nova-spektr",children:"Nova Spektr"}),"\n",(0,n.jsx)(i.p,{children:(0,n.jsx)(i.img,{src:"https://github.com/Leemo94/polkadot-wiki/blob/master/docs/assets/nova_spektr.png?raw=true",alt:""})}),"\n",(0,n.jsx)(i.p,{children:"Nova Spektr is your all-in-one Polkadot Wallet, engineered with enterprise-grade capabilities such\nas multisigs, proxy accounts, hardware wallets, light clients, and much more. Nova Spektr is\ndesigned to meet the requirements of enterprises, power users, and individual users alike \u2013 funded\nby the Polkadot Treasury"}),"\n",(0,n.jsxs)(i.ul,{children:["\n",(0,n.jsx)(i.li,{children:"Multichain Wallet \u2013 Nova Spektr supports 80+ Polkadot ecosystem networks, and hundreds of tokens\nconsolidating them all under a single interface!"}),"\n",(0,n.jsx)(i.li,{children:"Multisigs \u2013 Experience superior security with truly multi-chain Multisig Wallets in Nova Spektr!"}),"\n",(0,n.jsx)(i.li,{children:"Proxy Discovery \u2013 Discover all your Proxy accounts automatically when importing your wallet into\nNova Spektr!"}),"\n",(0,n.jsx)(i.li,{children:"Collaborative Asset Management \u2013 Manage your assets in a simple, secure, and collaborative manner,\nrequiring a predefined level of consensus to be reached for each transaction\u2019s authorization."}),"\n",(0,n.jsx)(i.li,{children:"Hardware Wallet Support \u2013 Safeguard your assets even further by pairing your hardware wallet with\nNova Spektr!"}),"\n",(0,n.jsx)(i.li,{children:"Light Clients \u2013 Unleash an unstoppable, fast, and trustless working environment with Nova Spektr\nby utilizing locally hosted blockchain nodes to manage your digital assets in the Polkadot\necosystem!"}),"\n",(0,n.jsx)(i.li,{children:"Data Verification \u2013 Benefit from Polkadot and Kusama Light Clients to cryptographically verify\ndata from public blockchain nodes!"}),"\n",(0,n.jsx)(i.li,{children:"Open Source & Trustless \u2013 Your data remains yours \u2014 Nova Spektr never stores or tracks user data!"}),"\n"]}),"\n",(0,n.jsx)(i.h2,{id:"polkadot-multisig-by-signet",children:"Polkadot Multisig by Signet"}),"\n",(0,n.jsxs)(i.p,{children:[(0,n.jsx)(i.a,{href:"https://polkadotmultisig.com/",children:"Polkadot Multisig"})," by Signet is user-friendly software that helps\nteams and businesses use multisigs in the Polkadot ecosystem. Multisigs are generally used by\norganizations to hold treasury assets, pay employees or service providers, receive grants or manage\nan organization's on-chain identity."]}),"\n",(0,n.jsxs)(i.p,{children:["Polkadot Multisig is designed to be usable by a non-technical business user and enables a user to be\nproductive and understand multisig transactions. Further information is available on\n",(0,n.jsx)(i.a,{href:"https://guide.polkadotmultisig.com/en",children:"Polkadot Multisig guide."})]}),"\n",(0,n.jsx)(i.h3,{id:"signet",children:"Signet"}),"\n",(0,n.jsxs)(i.p,{children:["Talisman ",(0,n.jsx)(i.a,{href:"https://www.talisman.xyz/signet",children:"Signet"})," supports multisig ops and enterprise workflow for\nonchain organisations. Enterprise features and self-hosted options are available. Signet is\nproprietary, where as Polkadot Multisig by Signet is free."]}),"\n",(0,n.jsx)(i.h2,{id:"polkasafe",children:"Polkasafe"}),"\n",(0,n.jsx)(i.p,{children:(0,n.jsx)(i.img,{src:"https://github.com/w3f/polkadot-wiki/assets/874046/586bf051-a7fb-43c0-957e-0b659d50c9ab",alt:"Polkasafe"})}),"\n",(0,n.jsxs)(i.p,{children:[(0,n.jsx)(i.a,{href:"https://polkasafe.xyz",children:"Polkasafe"})," - Your gateway to the Ultimate MultiSig experience on Polkadot."]}),"\n",(0,n.jsx)(i.p,{children:"Gone are the days of cumbersome MultiSig transactions. PolkaSafe redefines the way you interact with\nthe Polkadot Blockchain, making MultiSig operations not just safer but also incredibly\nuser-friendly."}),"\n",(0,n.jsxs)(i.ul,{children:["\n",(0,n.jsx)(i.li,{children:"Seamless MultiSig Transactions: With PolkaSafe, initiating, approving, and executing MultiSig\ntransactions is a breeze. Whether you're managing funds, delegating responsibilities, or simply\nsecuring your assets, the platform's intuitive design ensures every step is straightforward."}),"\n",(0,n.jsx)(i.li,{children:"Collaborative Asset Management: Engage in collective decision-making with stakeholders, team\nmembers, or partners. PolkaSafe's collaborative tools make it easy to propose, discuss, and\nfinalize MultiSig transactions, ensuring transparency and consensus. Extrinsic Management: Beyond\nstandard transactions, PolkaSafe simplifies extrinsics \u2013 specialized instructions or functions on\nthe Polkadot Blockchain."}),"\n",(0,n.jsx)(i.li,{children:"Whether you're interacting with smart contracts, parachains, or other advanced features,\nPolkaSafe's MultiSig capabilities ensure every extrinsic is secure and efficient."}),"\n",(0,n.jsx)(i.li,{children:"User-Centric Design: Every feature, from initiating a transaction to diving deep into extrinsics,\nis designed for clarity and ease."}),"\n"]})]})}function u(e={}){const{wrapper:i}={...(0,a.R)(),...e.components};return i?(0,n.jsx)(i,{...e,children:(0,n.jsx)(d,{...e})}):d(e)}},28453:(e,i,t)=>{t.d(i,{R:()=>r,x:()=>o});var s=t(96540);const n={},a=s.createContext(n);function r(e){const i=s.useContext(a);return s.useMemo((function(){return"function"==typeof e?e(i):{...i,...e}}),[i,e])}function o(e){let i;return i=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:r(e.components),s.createElement(a.Provider,{value:i},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/2519.e3704e42.js b/assets/js/2519.e3704e42.js deleted file mode 100644 index fb19a05744ac..000000000000 --- a/assets/js/2519.e3704e42.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2519],{22519:(e,n,t)=>{t.d(n,{a:()=>hn,c:()=>fn});var r={};t.r(r),t.d(r,{attentionMarkers:()=>He,contentInitial:()=>_e,disable:()=>Re,document:()=>Be,flow:()=>Le,flowInitial:()=>Me,insideSpan:()=>je,string:()=>Pe,text:()=>Oe});var i=t(86079);const u={};function o(e,n,t){if(function(e){return Boolean(e&&"object"==typeof e)}(e)){if("value"in e)return"html"!==e.type||t?e.value:"";if(n&&"alt"in e&&e.alt)return e.alt;if("children"in e)return c(e.children,n,t)}return Array.isArray(e)?c(e,n,t):""}function c(e,n,t){const r=[];let i=-1;for(;++ii?0:i+n:n>i?i:n,t=t>0?t:0,r.length<1e4)u=Array.from(r),u.unshift(n,t),e.splice(...u);else for(t&&e.splice(n,t);o0?(s(e,e.length,0,n),e):n}const a={}.hasOwnProperty;function f(e,n){let t;for(t in n){const r=(a.call(e,t)?e[t]:void 0)||(e[t]={}),i=n[t];let u;if(i)for(u in i){a.call(r,u)||(r[u]=[]);const e=i[u];d(r[u],Array.isArray(e)?e:e?[e]:[])}}}function d(e,n){let t=-1;const r=[];for(;++tu))return;const t=n.events.length;let i,c,l=t;for(;l--;)if("exit"===n.events[l][0]&&"chunkFlow"===n.events[l][1].type){if(i){c=n.events[l][1].end;break}i=!0}for(k(o),e=t;er;){const r=t[i];n.containerState=r[1],r[0].exit.call(n,e)}t.length=r}function y(){r.write([null]),i=void 0,r=void 0,n.containerState._closeFlow=void 0}}},T={tokenize:function(e,n,t){return I(e,e.attempt(this.parser.constructs.document,n,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};const z={tokenize:function(e,n,t){return function(n){return b(n)?I(e,r,"linePrefix")(n):r(n)};function r(e){return null===e||F(e)?n(e):t(e)}},partial:!0};function D(e,n,t,r){const i=e.length;let u,o=0;if(n=n<0?-n>i?0:i+n:n>i?i:n,t=t>0?t:0,r.length<1e4)u=Array.from(r),u.unshift(n,t),e.splice(...u);else for(t&&e.splice(n,t);o=4?n(i):e.interrupt(r.parser.constructs.flow,t,n)(i)}},partial:!0};const P={tokenize:function(e){const n=this,t=e.attempt(z,(function(r){if(null===r)return void e.consume(r);return e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),n.currentConstruct=void 0,t}),e.attempt(this.parser.constructs.flowInitial,r,I(e,e.attempt(this.parser.constructs.flow,r,e.attempt(M,r)),"linePrefix")));return t;function r(r){if(null!==r)return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),n.currentConstruct=void 0,t;e.consume(r)}}};const O={resolveAll:q()},j=R("string"),H=R("text");function R(e){return{tokenize:function(n){const t=this,r=this.parser.constructs[e],i=n.attempt(r,u,o);return u;function u(e){return s(e)?i(e):o(e)}function o(e){if(null!==e)return n.enter("data"),n.consume(e),c;n.consume(e)}function c(e){return s(e)?(n.exit("data"),i(e)):(n.consume(e),c)}function s(e){if(null===e)return!0;const n=r[e];let i=-1;if(n)for(;++i-1){const e=o[0];"string"==typeof e?o[0]=e.slice(r):o.shift()}u>0&&o.push(e[i].slice(0,u))}return o}(o,e)}function g(){const{line:e,column:n,offset:t,_index:i,_bufferIndex:u}=r;return{line:e,column:n,offset:t,_index:i,_bufferIndex:u}}function x(){let e;for(;r._index=3&&(null===u||F(u))?(e.exit("thematicBreak"),n(u)):t(u)}function o(n){return n===r?(e.consume(n),i++,o):(e.exit("thematicBreakSequence"),b(n)?I(e,u,"whitespace")(n):u(n))}}};const $={name:"list",tokenize:function(e,n,t){const r=this,i=r.events[r.events.length-1];let u=i&&"linePrefix"===i[1].type?i[2].sliceSerialize(i[1],!0).length:0,o=0;return function(n){const i=r.containerState.type||(42===n||43===n||45===n?"listUnordered":"listOrdered");if("listUnordered"===i?!r.containerState.marker||n===r.containerState.marker:x(n)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),"listUnordered"===i)return e.enter("listItemPrefix"),42===n||45===n?e.check(U,t,s)(n):s(n);if(!r.interrupt||49===n)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(n)}return t(n)};function c(n){return x(n)&&++o<10?(e.consume(n),c):(!r.interrupt||o<2)&&(r.containerState.marker?n===r.containerState.marker:41===n||46===n)?(e.exit("listItemValue"),s(n)):t(n)}function s(n){return e.enter("listItemMarker"),e.consume(n),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||n,e.check(z,r.interrupt?t:l,e.attempt(W,f,a))}function l(e){return r.containerState.initialBlankLine=!0,u++,f(e)}function a(n){return b(n)?(e.enter("listItemPrefixWhitespace"),e.consume(n),e.exit("listItemPrefixWhitespace"),f):t(n)}function f(t){return r.containerState.size=u+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(t)}},continuation:{tokenize:function(e,n,t){const r=this;return r.containerState._closeFlow=void 0,e.check(z,(function(t){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,I(e,n,"listItemIndent",r.containerState.size+1)(t)}),(function(t){if(r.containerState.furtherBlankLines||!b(t))return r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,i(t);return r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Z,n,i)(t)}));function i(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,I(e,e.attempt($,n,t),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i)}}},exit:function(e){e.exit(this.containerState.type)}},W={tokenize:function(e,n,t){const r=this;return I(e,(function(e){const i=r.events[r.events.length-1];return!b(e)&&i&&"listItemPrefixWhitespace"===i[1].type?n(e):t(e)}),"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)},partial:!0},Z={tokenize:function(e,n,t){const r=this;return I(e,(function(e){const i=r.events[r.events.length-1];return i&&"listItemIndent"===i[1].type&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?n(e):t(e)}),"listItemIndent",r.containerState.size+1)},partial:!0};const Y={name:"blockQuote",tokenize:function(e,n,t){const r=this;return function(n){if(62===n){const t=r.containerState;return t.open||(e.enter("blockQuote",{_container:!0}),t.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(n),e.exit("blockQuoteMarker"),i}return t(n)};function i(t){return b(t)?(e.enter("blockQuotePrefixWhitespace"),e.consume(t),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),n):(e.exit("blockQuotePrefix"),n(t))}},continuation:{tokenize:function(e,n,t){const r=this;return function(n){if(b(n))return I(e,i,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(n);return i(n)};function i(r){return e.attempt(Y,n,t)(r)}}},exit:function(e){e.exit("blockQuote")}};function G(e,n,t,r,i,u,o,c,s){const l=s||Number.POSITIVE_INFINITY;let a=0;return function(n){if(60===n)return e.enter(r),e.enter(i),e.enter(u),e.consume(n),e.exit(u),f;if(null===n||32===n||41===n||g(n))return t(n);return e.enter(r),e.enter(o),e.enter(c),e.enter("chunkString",{contentType:"string"}),p(n)};function f(t){return 62===t?(e.enter(u),e.consume(t),e.exit(u),e.exit(i),e.exit(r),n):(e.enter(c),e.enter("chunkString",{contentType:"string"}),d(t))}function d(n){return 62===n?(e.exit("chunkString"),e.exit(c),f(n)):null===n||60===n||F(n)?t(n):(e.consume(n),92===n?h:d)}function h(n){return 60===n||62===n||92===n?(e.consume(n),d):d(n)}function p(i){return a||null!==i&&41!==i&&!v(i)?a999||null===f||91===f||93===f&&!c||94===f&&!s&&"_hiddenFootnoteSupport"in o.parser.constructs?t(f):93===f?(e.exit(u),e.enter(i),e.consume(f),e.exit(i),e.exit(r),n):F(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),l):(e.enter("chunkString",{contentType:"string"}),a(f))}function a(n){return null===n||91===n||93===n||F(n)||s++>999?(e.exit("chunkString"),l(n)):(e.consume(n),c||(c=!b(n)),92===n?f:a)}function f(n){return 91===n||92===n||93===n?(e.consume(n),s++,a):a(n)}}function K(e,n,t,r,i,u){let o;return function(n){if(34===n||39===n||40===n)return e.enter(r),e.enter(i),e.consume(n),e.exit(i),o=40===n?41:n,c;return t(n)};function c(t){return t===o?(e.enter(i),e.consume(t),e.exit(i),e.exit(r),n):(e.enter(u),s(t))}function s(n){return n===o?(e.exit(u),c(o)):null===n?t(n):F(n)?(e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),I(e,s,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),l(n))}function l(n){return n===o||null===n||F(n)?(e.exit("chunkString"),s(n)):(e.consume(n),92===n?a:l)}function a(n){return n===o||92===n?(e.consume(n),l):l(n)}}function X(e,n){let t;return function r(i){if(F(i))return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t=!0,r;if(b(i))return I(e,r,t?"linePrefix":"lineSuffix")(i);return n(i)}}function ee(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const ne={name:"definition",tokenize:function(e,n,t){const r=this;let i;return function(n){return e.enter("definition"),function(n){return J.call(r,e,u,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(n)}(n)};function u(n){return i=ee(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),58===n?(e.enter("definitionMarker"),e.consume(n),e.exit("definitionMarker"),o):t(n)}function o(n){return v(n)?X(e,c)(n):c(n)}function c(n){return G(e,s,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(n)}function s(n){return e.attempt(te,l,l)(n)}function l(n){return b(n)?I(e,a,"whitespace")(n):a(n)}function a(u){return null===u||F(u)?(e.exit("definition"),r.parser.defined.push(i),n(u)):t(u)}}},te={tokenize:function(e,n,t){return function(n){return v(n)?X(e,r)(n):t(n)};function r(n){return K(e,i,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(n)}function i(n){return b(n)?I(e,u,"whitespace")(n):u(n)}function u(e){return null===e||F(e)?n(e):t(e)}},partial:!0};const re={name:"codeIndented",tokenize:function(e,n,t){const r=this;return function(n){return e.enter("codeIndented"),I(e,i,"linePrefix",5)(n)};function i(e){const n=r.events[r.events.length-1];return n&&"linePrefix"===n[1].type&&n[2].sliceSerialize(n[1],!0).length>=4?u(e):t(e)}function u(n){return null===n?c(n):F(n)?e.attempt(ie,u,c)(n):(e.enter("codeFlowValue"),o(n))}function o(n){return null===n||F(n)?(e.exit("codeFlowValue"),u(n)):(e.consume(n),o)}function c(t){return e.exit("codeIndented"),n(t)}}},ie={tokenize:function(e,n,t){const r=this;return i;function i(n){return r.parser.lazy[r.now().line]?t(n):F(n)?(e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),i):I(e,u,"linePrefix",5)(n)}function u(e){const u=r.events[r.events.length-1];return u&&"linePrefix"===u[1].type&&u[2].sliceSerialize(u[1],!0).length>=4?n(e):F(e)?i(e):t(e)}},partial:!0};const ue={name:"headingAtx",tokenize:function(e,n,t){let r=0;return function(n){return e.enter("atxHeading"),function(n){return e.enter("atxHeadingSequence"),i(n)}(n)};function i(n){return 35===n&&r++<6?(e.consume(n),i):null===n||v(n)?(e.exit("atxHeadingSequence"),u(n)):t(n)}function u(t){return 35===t?(e.enter("atxHeadingSequence"),o(t)):null===t||F(t)?(e.exit("atxHeading"),n(t)):b(t)?I(e,u,"whitespace")(t):(e.enter("atxHeadingText"),c(t))}function o(n){return 35===n?(e.consume(n),o):(e.exit("atxHeadingSequence"),u(n))}function c(n){return null===n||35===n||v(n)?(e.exit("atxHeadingText"),u(n)):(e.consume(n),c)}},resolve:function(e,n){let t,r,i=e.length-2,u=3;"whitespace"===e[u][1].type&&(u+=2);i-2>u&&"whitespace"===e[i][1].type&&(i-=2);"atxHeadingSequence"===e[i][1].type&&(u===i-1||i-4>u&&"whitespace"===e[i-2][1].type)&&(i-=u+1===i?2:4);i>u&&(t={type:"atxHeadingText",start:e[u][1].start,end:e[i][1].end},r={type:"chunkText",start:e[u][1].start,end:e[i][1].end,contentType:"text"},s(e,u,i-u+1,[["enter",t,n],["enter",r,n],["exit",r,n],["exit",t,n]]));return e}};const oe={name:"setextUnderline",tokenize:function(e,n,t){const r=this;let i;return function(n){let o,c=r.events.length;for(;c--;)if("lineEnding"!==r.events[c][1].type&&"linePrefix"!==r.events[c][1].type&&"content"!==r.events[c][1].type){o="paragraph"===r.events[c][1].type;break}if(!r.parser.lazy[r.now().line]&&(r.interrupt||o))return e.enter("setextHeadingLine"),i=n,function(n){return e.enter("setextHeadingLineSequence"),u(n)}(n);return t(n)};function u(n){return n===i?(e.consume(n),u):(e.exit("setextHeadingLineSequence"),b(n)?I(e,o,"lineSuffix")(n):o(n))}function o(r){return null===r||F(r)?(e.exit("setextHeadingLine"),n(r)):t(r)}},resolveTo:function(e,n){let t,r,i,u=e.length;for(;u--;)if("enter"===e[u][0]){if("content"===e[u][1].type){t=u;break}"paragraph"===e[u][1].type&&(r=u)}else"content"===e[u][1].type&&e.splice(u,1),i||"definition"!==e[u][1].type||(i=u);const o={type:"setextHeading",start:Object.assign({},e[r][1].start),end:Object.assign({},e[e.length-1][1].end)};e[r][1].type="setextHeadingText",i?(e.splice(r,0,["enter",o,n]),e.splice(i+1,0,["exit",e[t][1],n]),e[t][1].end=Object.assign({},e[i][1].end)):e[t][1]=o;return e.push(["exit",o,n]),e}};const ce=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],se=["pre","script","style","textarea"],le={name:"htmlFlow",tokenize:function(e,n,t){const r=this;let i,u,o,c,s;return function(n){return function(n){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(n),l}(n)};function l(c){return 33===c?(e.consume(c),a):47===c?(e.consume(c),u=!0,m):63===c?(e.consume(c),i=3,r.interrupt?n:H):h(c)?(e.consume(c),o=String.fromCharCode(c),g):t(c)}function a(u){return 45===u?(e.consume(u),i=2,f):91===u?(e.consume(u),i=5,c=0,d):h(u)?(e.consume(u),i=4,r.interrupt?n:H):t(u)}function f(i){return 45===i?(e.consume(i),r.interrupt?n:H):t(i)}function d(i){const u="CDATA[";return i===u.charCodeAt(c++)?(e.consume(i),6===c?r.interrupt?n:D:d):t(i)}function m(n){return h(n)?(e.consume(n),o=String.fromCharCode(n),g):t(n)}function g(c){if(null===c||47===c||62===c||v(c)){const s=47===c,l=o.toLowerCase();return s||u||!se.includes(l)?ce.includes(o.toLowerCase())?(i=6,s?(e.consume(c),x):r.interrupt?n(c):D(c)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?t(c):u?k(c):y(c)):(i=1,r.interrupt?n(c):D(c))}return 45===c||p(c)?(e.consume(c),o+=String.fromCharCode(c),g):t(c)}function x(i){return 62===i?(e.consume(i),r.interrupt?n:D):t(i)}function k(n){return b(n)?(e.consume(n),k):T(n)}function y(n){return 47===n?(e.consume(n),T):58===n||95===n||h(n)?(e.consume(n),S):b(n)?(e.consume(n),y):T(n)}function S(n){return 45===n||46===n||58===n||95===n||p(n)?(e.consume(n),S):E(n)}function E(n){return 61===n?(e.consume(n),A):b(n)?(e.consume(n),E):y(n)}function A(n){return null===n||60===n||61===n||62===n||96===n?t(n):34===n||39===n?(e.consume(n),s=n,I):b(n)?(e.consume(n),A):w(n)}function I(n){return n===s?(e.consume(n),s=null,C):null===n||F(n)?t(n):(e.consume(n),I)}function w(n){return null===n||34===n||39===n||47===n||60===n||61===n||62===n||96===n||v(n)?E(n):(e.consume(n),w)}function C(e){return 47===e||62===e||b(e)?y(e):t(e)}function T(n){return 62===n?(e.consume(n),z):t(n)}function z(n){return null===n||F(n)?D(n):b(n)?(e.consume(n),z):t(n)}function D(n){return 45===n&&2===i?(e.consume(n),L):60===n&&1===i?(e.consume(n),P):62===n&&4===i?(e.consume(n),R):63===n&&3===i?(e.consume(n),H):93===n&&5===i?(e.consume(n),j):!F(n)||6!==i&&7!==i?null===n||F(n)?(e.exit("htmlFlowData"),B(n)):(e.consume(n),D):(e.exit("htmlFlowData"),e.check(ae,q,B)(n))}function B(n){return e.check(fe,_,q)(n)}function _(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),M}function M(n){return null===n||F(n)?B(n):(e.enter("htmlFlowData"),D(n))}function L(n){return 45===n?(e.consume(n),H):D(n)}function P(n){return 47===n?(e.consume(n),o="",O):D(n)}function O(n){if(62===n){const t=o.toLowerCase();return se.includes(t)?(e.consume(n),R):D(n)}return h(n)&&o.length<8?(e.consume(n),o+=String.fromCharCode(n),O):D(n)}function j(n){return 93===n?(e.consume(n),H):D(n)}function H(n){return 62===n?(e.consume(n),R):45===n&&2===i?(e.consume(n),H):D(n)}function R(n){return null===n||F(n)?(e.exit("htmlFlowData"),q(n)):(e.consume(n),R)}function q(t){return e.exit("htmlFlow"),n(t)}},resolveTo:function(e){let n=e.length;for(;n--&&("enter"!==e[n][0]||"htmlFlow"!==e[n][1].type););n>1&&"linePrefix"===e[n-2][1].type&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2));return e},concrete:!0},ae={tokenize:function(e,n,t){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(z,n,t)}},partial:!0},fe={tokenize:function(e,n,t){const r=this;return function(n){if(F(n))return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),i;return t(n)};function i(e){return r.parser.lazy[r.now().line]?t(e):n(e)}},partial:!0};const de={tokenize:function(e,n,t){const r=this;return function(n){if(null===n)return t(n);return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),i};function i(e){return r.parser.lazy[r.now().line]?t(e):n(e)}},partial:!0},he={name:"codeFenced",tokenize:function(e,n,t){const r=this,i={tokenize:function(e,n,t){let i=0;return o;function o(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),s}function s(n){return e.enter("codeFencedFence"),b(n)?I(e,l,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(n):l(n)}function l(n){return n===u?(e.enter("codeFencedFenceSequence"),a(n)):t(n)}function a(n){return n===u?(i++,e.consume(n),a):i>=c?(e.exit("codeFencedFenceSequence"),b(n)?I(e,f,"whitespace")(n):f(n)):t(n)}function f(r){return null===r||F(r)?(e.exit("codeFencedFence"),n(r)):t(r)}},partial:!0};let u,o=0,c=0;return function(n){return function(n){const t=r.events[r.events.length-1];return o=t&&"linePrefix"===t[1].type?t[2].sliceSerialize(t[1],!0).length:0,u=n,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),s(n)}(n)};function s(n){return n===u?(c++,e.consume(n),s):c<3?t(n):(e.exit("codeFencedFenceSequence"),b(n)?I(e,l,"whitespace")(n):l(n))}function l(t){return null===t||F(t)?(e.exit("codeFencedFence"),r.interrupt?n(t):e.check(de,h,k)(t)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),a(t))}function a(n){return null===n||F(n)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),l(n)):b(n)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),I(e,f,"whitespace")(n)):96===n&&n===u?t(n):(e.consume(n),a)}function f(n){return null===n||F(n)?l(n):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),d(n))}function d(n){return null===n||F(n)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),l(n)):96===n&&n===u?t(n):(e.consume(n),d)}function h(n){return e.attempt(i,k,p)(n)}function p(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),m}function m(n){return o>0&&b(n)?I(e,g,"linePrefix",o+1)(n):g(n)}function g(n){return null===n||F(n)?e.check(de,h,k)(n):(e.enter("codeFlowValue"),x(n))}function x(n){return null===n||F(n)?(e.exit("codeFlowValue"),g(n)):(e.consume(n),x)}function k(t){return e.exit("codeFenced"),n(t)}},concrete:!0};const pe=document.createElement("i");function me(e){const n="&"+e+";";pe.innerHTML=n;const t=pe.textContent;return(59!==t.charCodeAt(t.length-1)||"semi"===e)&&(t!==n&&t)}const ge={name:"characterReference",tokenize:function(e,n,t){const r=this;let i,u,o=0;return function(n){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(n),e.exit("characterReferenceMarker"),c};function c(n){return 35===n?(e.enter("characterReferenceMarkerNumeric"),e.consume(n),e.exit("characterReferenceMarkerNumeric"),s):(e.enter("characterReferenceValue"),i=31,u=p,l(n))}function s(n){return 88===n||120===n?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(n),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),i=6,u=k,l):(e.enter("characterReferenceValue"),i=7,u=x,l(n))}function l(c){if(59===c&&o){const i=e.exit("characterReferenceValue");return u!==p||me(r.sliceSerialize(i))?(e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),e.exit("characterReference"),n):t(c)}return u(c)&&o++1&&e[d][1].end.offset-e[d][1].start.offset>1?2:1;const h=Object.assign({},e[t][1].end),p=Object.assign({},e[d][1].start);Ie(h,-c),Ie(p,c),u={type:c>1?"strongSequence":"emphasisSequence",start:h,end:Object.assign({},e[t][1].end)},o={type:c>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[d][1].start),end:p},i={type:c>1?"strongText":"emphasisText",start:Object.assign({},e[t][1].end),end:Object.assign({},e[d][1].start)},r={type:c>1?"strong":"emphasis",start:Object.assign({},u.start),end:Object.assign({},o.end)},e[t][1].end=Object.assign({},u.start),e[d][1].start=Object.assign({},o.end),a=[],e[t][1].end.offset-e[t][1].start.offset&&(a=l(a,[["enter",e[t][1],n],["exit",e[t][1],n]])),a=l(a,[["enter",r,n],["enter",u,n],["exit",u,n],["enter",i,n]]),a=l(a,Q(n.parser.constructs.insideSpan.null,e.slice(t+1,d),n)),a=l(a,[["exit",i,n],["enter",o,n],["exit",o,n],["exit",r,n]]),e[d][1].end.offset-e[d][1].start.offset?(f=2,a=l(a,[["enter",e[d][1],n],["exit",e[d][1],n]])):f=0,s(e,t-1,d-t+3,a),d=t+a.length-f-2;break}d=-1;for(;++d13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||!(65535&~t)||65534==(65535&t)||t>1114111?"\ufffd":String.fromCharCode(t)}const Ne=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Ue(e,n,t){if(n)return n;if(35===t.charCodeAt(0)){const e=t.charCodeAt(1),n=120===e||88===e;return Qe(t.slice(n?2:1),n?16:10)}return me(t)||e}function $e(e){return e&&"object"==typeof e?"position"in e||"type"in e?Ze(e.position):"start"in e||"end"in e?Ze(e):"line"in e||"column"in e?We(e):"":""}function We(e){return Ye(e&&e.line)+":"+Ye(e&&e.column)}function Ze(e){return We(e&&e.start)+"-"+We(e&&e.end)}function Ye(e){return e&&"number"==typeof e?e:1}const Ge={}.hasOwnProperty,Je=function(e,n,t){return"string"!=typeof n&&(t=n,n=void 0),function(e){const n={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:l(ue),autolinkProtocol:T,autolinkEmail:T,atxHeading:l(ne),blockQuote:l(Y),characterEscape:T,characterReference:T,codeFenced:l(G),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:l(G,a),codeText:l(J,a),codeTextData:T,data:T,codeFlowValue:T,definition:l(K),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:l(X),hardBreakEscape:l(te),hardBreakTrailing:l(te),htmlFlow:l(re,a),htmlFlowData:T,htmlText:l(re,a),htmlTextData:T,image:l(ie),label:a,link:l(ue),listItem:l(ce),listItemValue:g,listOrdered:l(oe,m),listUnordered:l(oe),paragraph:l(se),reference:Q,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:l(ne),strong:l(le),thematicBreak:l(fe)},exit:{atxHeading:d(),atxHeadingSequence:A,autolink:d(),autolinkEmail:Z,autolinkProtocol:W,blockQuote:d(),characterEscapeValue:z,characterReferenceMarkerHexadecimal:U,characterReferenceMarkerNumeric:U,characterReferenceValue:$,codeFenced:d(F),codeFencedFence:y,codeFencedFenceInfo:x,codeFencedFenceMeta:k,codeFlowValue:z,codeIndented:d(v),codeText:d(L),codeTextData:z,data:z,definition:d(),definitionDestinationString:E,definitionLabelString:b,definitionTitleString:S,emphasis:d(),hardBreakEscape:d(B),hardBreakTrailing:d(B),htmlFlow:d(_),htmlFlowData:z,htmlText:d(M),htmlTextData:z,image:d(O),label:H,labelText:j,lineEnding:D,link:d(P),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:N,resourceDestinationString:R,resourceTitleString:q,resource:V,setextHeading:d(C),setextHeadingLineSequence:w,setextHeadingText:I,strong:d(),thematicBreak:d()}};Xe(n,(e||{}).mdastExtensions||[]);const t={};return r;function r(e){let t={type:"root",children:[]};const r={stack:[t],tokenStack:[],config:n,enter:f,exit:h,buffer:a,resume:p,setData:c,getData:s},u=[];let o=-1;for(;++o0){const e=r.tokenStack[r.tokenStack.length-1];(e[1]||nn).call(r,void 0,e[0])}for(t.position={start:Ke(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Ke(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},o=-1;++o{0!==t&&(i++,r.push([])),e.split(" ").forEach((e=>{e&&r[i].push({content:e,type:n})}))}))}else"strong"!==e.type&&"emphasis"!==e.type||e.children.forEach((n=>{u(n,e.type)}))}return t.forEach((e=>{"paragraph"===e.type&&e.children.forEach((e=>{u(e)}))})),r}function un(e,n){var t;return on(e,[],(t=n.content,Intl.Segmenter?[...(new Intl.Segmenter).segment(t)].map((e=>e.segment)):[...t]),n.type)}function on(e,n,t,r){if(0===t.length)return[{content:n.join(""),type:r},{content:"",type:r}];const[i,...u]=t,o=[...n,i];return e([{content:o.join(""),type:r}])?on(e,o,u,r):(0===n.length&&i&&(n.push(i),t.shift()),[{content:n.join(""),type:r},{content:t.join(""),type:r}])}function cn(e,n){if(e.some((({content:e})=>e.includes("\n"))))throw new Error("splitLineToFitWidth does not support newlines in the line");return sn(e,n)}function sn(e,n,t=[],r=[]){if(0===e.length)return r.length>0&&t.push(r),t.length>0?t:[];let i="";" "===e[0].content&&(i=" ",e.shift());const u=e.shift()??{content:" ",type:"normal"},o=[...r];if(""!==i&&o.push({content:i,type:"normal"}),o.push(u),n(o))return sn(e,n,t,o);if(r.length>0)t.push(r),e.unshift(u);else if(u.content){const[r,i]=un(n,u);t.push([r]),i.content&&e.unshift(i)}return sn(e,n,t)}function ln(e,n,t){return e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",n*t-.1+"em").attr("dy",t+"em")}function an(e,n,t){const r=e.append("text"),i=ln(r,1,n);dn(i,t);const u=i.node().getComputedTextLength();return r.remove(),u}function fn(e,n,t){var r;const i=e.append("text"),u=ln(i,1,n);dn(u,[{content:t,type:"normal"}]);const o=null==(r=u.node())?void 0:r.getBoundingClientRect();return o&&i.remove(),o}function dn(e,n){e.text(""),n.forEach(((n,t)=>{const r=e.append("tspan").attr("font-style","emphasis"===n.type?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight","strong"===n.type?"bold":"normal");0===t?r.text(n.content):r.text(" "+n.content)}))}const hn=(e,n="",{style:t="",isTitle:r=!1,classes:u="",useHtmlLabels:o=!0,isNode:c=!0,width:s=200,addSvgBackground:l=!1}={})=>{if(i.l.info("createText",n,t,r,u,o,c,l),o){const r=function(e){const{children:n}=Je(e);return n.map((function e(n){return"text"===n.type?n.value.replace(/\n/g,"
    "):"strong"===n.type?`${n.children.map(e).join("")}`:"emphasis"===n.type?`${n.children.map(e).join("")}`:"paragraph"===n.type?`

    ${n.children.map(e).join("")}

    `:`Unsupported markdown: ${n.type}`})).join("")}(n),o=function(e,n,t,r,i=!1){const u=e.append("foreignObject"),o=u.append("xhtml:div"),c=n.label,s=n.isNode?"nodeLabel":"edgeLabel";var l,a;o.html(`\n "+c+""),l=o,(a=n.labelStyle)&&l.attr("style",a),o.style("display","table-cell"),o.style("white-space","nowrap"),o.style("max-width",t+"px"),o.attr("xmlns","http://www.w3.org/1999/xhtml"),i&&o.attr("class","labelBkg");let f=o.node().getBoundingClientRect();return f.width===t&&(o.style("display","table"),o.style("white-space","break-spaces"),o.style("width",t+"px"),f=o.node().getBoundingClientRect()),u.style("width",f.width),u.style("height",f.height),u.node()}(e,{isNode:c,label:(0,i.M)(r).replace(/fa[blrs]?:fa-[\w-]+/g,(e=>``)),labelStyle:t.replace("fill:","color:")},s,u,l);return o}{const t=function(e,n,t,r=!1){const i=n.append("g"),u=i.insert("rect").attr("class","background"),o=i.append("text").attr("y","-10.1");let c=0;for(const s of t){const n=n=>an(i,1.1,n)<=e,t=n(s)?[s]:cn(s,n);for(const e of t)dn(ln(o,c,1.1),e),c++}if(r){const e=o.node().getBBox(),n=2;return u.attr("x",-n).attr("y",-n).attr("width",e.width+2*n).attr("height",e.height+2*n),i.node()}return o.node()}(s,e,rn(n),l);return t}}}}]); \ No newline at end of file diff --git a/assets/js/25f2bd2a.27cdbd17.js b/assets/js/25f2bd2a.27cdbd17.js new file mode 100644 index 000000000000..30621d437143 --- /dev/null +++ b/assets/js/25f2bd2a.27cdbd17.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[885],{62965:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>r,default:()=>h,frontMatter:()=>a,metadata:()=>o,toc:()=>d});const o=JSON.parse('{"id":"maintain/maintain-guides-how-to-stop-validating","title":"How to Stop Validating","description":"Steps on how to stop validating.","source":"@site/../docs/maintain/maintain-guides-how-to-stop-validating.md","sourceDirName":"maintain","slug":"/maintain-guides-how-to-stop-validating","permalink":"/docs/maintain-guides-how-to-stop-validating","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/maintain/maintain-guides-how-to-stop-validating.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1711019259000,"frontMatter":{"id":"maintain-guides-how-to-stop-validating","title":"How to Stop Validating","sidebar_label":"How to Stop Validating","description":"Steps on how to stop validating.","keywords":["validating","how to stop validating","validate","chill"],"slug":"../maintain-guides-how-to-stop-validating"},"sidebar":"docs","previous":{"title":"How to Chill","permalink":"/docs/maintain-guides-how-to-chill"},"next":{"title":"Validator Community Overview","permalink":"/docs/maintain-guides-validator-community"}}');var i=t(74848),s=t(28453);const a={id:"maintain-guides-how-to-stop-validating",title:"How to Stop Validating",sidebar_label:"How to Stop Validating",description:"Steps on how to stop validating.",keywords:["validating","how to stop validating","validate","chill"],slug:"../maintain-guides-how-to-stop-validating"},r=void 0,l={},d=[{value:"Chill Validator",id:"chill-validator",level:2},{value:"Purge validator session keys",id:"purge-validator-session-keys",level:2},{value:"Unbond your tokens",id:"unbond-your-tokens",level:2}];function c(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",li:"li",p:"p",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(n.p,{children:["If you wish to remain a validator or nominator (e.g. you're only stopping for planned downtime or\nserver maintenance), submitting the ",(0,i.jsx)(n.code,{children:"chill"})," extrinsic in the ",(0,i.jsx)(n.code,{children:"staking"})," pallet should suffice. It is\nonly if you wish to unbond funds or reap an account that you should continue with the following."]}),"\n",(0,i.jsx)(n.p,{children:"To ensure a smooth stop to validation, make sure you should do the following actions:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Chill your validator"}),"\n",(0,i.jsx)(n.li,{children:"Purge validator session keys"}),"\n",(0,i.jsx)(n.li,{children:"Unbond your tokens"}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["These can all be done with ",(0,i.jsx)(n.a,{href:"https://polkadot.js.org/apps",children:"PolkadotJS Apps"})," interface or with\nextrinsics."]}),"\n",(0,i.jsx)(n.h2,{id:"chill-validator",children:"Chill Validator"}),"\n",(0,i.jsxs)(n.p,{children:["To chill your validator or nominator, call the ",(0,i.jsx)(n.code,{children:"staking.chill()"})," extrinsic. See the\n",(0,i.jsx)(n.a,{href:"/docs/maintain-guides-how-to-chill",children:"How to Chill"})," page for more information. You can also\n",(0,i.jsx)(n.a,{href:"/docs/learn-staking-advanced",children:"claim your rewards"})," at this time."]}),"\n",(0,i.jsx)(n.h2,{id:"purge-validator-session-keys",children:"Purge validator session keys"}),"\n",(0,i.jsxs)(n.p,{children:["Purging the validator's session keys removes the key reference. This can be done through the\n",(0,i.jsx)(n.code,{children:"session.purgeKeys()"})," extrinsic. The key reference exists on the account that originally called the\n",(0,i.jsx)(n.code,{children:"session.set_keys()"})," extrinsic, which could be the stash or the staking proxy (at the time the keys\nwere set)."]}),"\n",(0,i.jsx)(n.admonition,{title:"Purge keys using the same account that set the keys",type:"caution",children:(0,i.jsxs)(n.p,{children:["Make sure to call the session.purge_keys() extrinsic from the same account that set the keys in the\nfirst place in order for the correct reference to be removed. Calling the ",(0,i.jsx)(n.code,{children:"session.purge_keys()"}),"\nfrom the wrong account, although it may succeed, will result in a reference on the other account\nthat ",(0,i.jsx)(n.strong,{children:"cannot"})," be removed, and as a result that account cannot be reaped."]})}),"\n",(0,i.jsxs)(n.admonition,{type:"caution",children:[(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"If you skip this step, you will not be able to reap your stash account"}),", and you will also need\nto rebond, purge the session keys, unbond, and wait the unbonding period again before being able to\ntransfer your tokens."]}),(0,i.jsxs)(n.p,{children:["See ",(0,i.jsx)(n.a,{href:"/docs/learn-guides-nominator#bond-your-tokens",children:"Unbonding and Rebonding"})," for more details."]})]}),"\n",(0,i.jsx)(n.h2,{id:"unbond-your-tokens",children:"Unbond your tokens"}),"\n",(0,i.jsxs)(n.p,{children:["Unbonding your tokens can be done through the ",(0,i.jsx)(n.code,{children:"Network > Staking > Account actions"}),' page in\nPolkadotJS Apps by clicking the corresponding stash account dropdown and selecting "Unbond funds".\nThis can also be done through the ',(0,i.jsx)(n.code,{children:"staking.unbond()"})," extrinsic with the staking proxy account."]})]})}function h(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(c,{...e})}):c(e)}},28453:(e,n,t)=>{t.d(n,{R:()=>a,x:()=>r});var o=t(96540);const i={},s=o.createContext(i);function a(e){const n=o.useContext(s);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:a(e.components),o.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/25f2bd2a.84663f81.js b/assets/js/25f2bd2a.84663f81.js deleted file mode 100644 index 8675eb5d15fa..000000000000 --- a/assets/js/25f2bd2a.84663f81.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[885],{72148:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>a,default:()=>h,frontMatter:()=>s,metadata:()=>r,toc:()=>d});var o=t(74848),i=t(28453);const s={id:"maintain-guides-how-to-stop-validating",title:"How to Stop Validating",sidebar_label:"How to Stop Validating",description:"Steps on how to stop validating.",keywords:["validating","how to stop validating","validate","chill"],slug:"../maintain-guides-how-to-stop-validating"},a=void 0,r={id:"maintain/maintain-guides-how-to-stop-validating",title:"How to Stop Validating",description:"Steps on how to stop validating.",source:"@site/../docs/maintain/maintain-guides-how-to-stop-validating.md",sourceDirName:"maintain",slug:"/maintain-guides-how-to-stop-validating",permalink:"/docs/maintain-guides-how-to-stop-validating",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/maintain/maintain-guides-how-to-stop-validating.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1711019259e3,frontMatter:{id:"maintain-guides-how-to-stop-validating",title:"How to Stop Validating",sidebar_label:"How to Stop Validating",description:"Steps on how to stop validating.",keywords:["validating","how to stop validating","validate","chill"],slug:"../maintain-guides-how-to-stop-validating"},sidebar:"docs",previous:{title:"How to Chill",permalink:"/docs/maintain-guides-how-to-chill"},next:{title:"Validator Community Overview",permalink:"/docs/maintain-guides-validator-community"}},l={},d=[{value:"Chill Validator",id:"chill-validator",level:2},{value:"Purge validator session keys",id:"purge-validator-session-keys",level:2},{value:"Unbond your tokens",id:"unbond-your-tokens",level:2}];function c(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",li:"li",p:"p",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(n.p,{children:["If you wish to remain a validator or nominator (e.g. you're only stopping for planned downtime or\nserver maintenance), submitting the ",(0,o.jsx)(n.code,{children:"chill"})," extrinsic in the ",(0,o.jsx)(n.code,{children:"staking"})," pallet should suffice. It is\nonly if you wish to unbond funds or reap an account that you should continue with the following."]}),"\n",(0,o.jsx)(n.p,{children:"To ensure a smooth stop to validation, make sure you should do the following actions:"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"Chill your validator"}),"\n",(0,o.jsx)(n.li,{children:"Purge validator session keys"}),"\n",(0,o.jsx)(n.li,{children:"Unbond your tokens"}),"\n"]}),"\n",(0,o.jsxs)(n.p,{children:["These can all be done with ",(0,o.jsx)(n.a,{href:"https://polkadot.js.org/apps",children:"PolkadotJS Apps"})," interface or with\nextrinsics."]}),"\n",(0,o.jsx)(n.h2,{id:"chill-validator",children:"Chill Validator"}),"\n",(0,o.jsxs)(n.p,{children:["To chill your validator or nominator, call the ",(0,o.jsx)(n.code,{children:"staking.chill()"})," extrinsic. See the\n",(0,o.jsx)(n.a,{href:"/docs/maintain-guides-how-to-chill",children:"How to Chill"})," page for more information. You can also\n",(0,o.jsx)(n.a,{href:"/docs/learn-staking-advanced",children:"claim your rewards"})," at this time."]}),"\n",(0,o.jsx)(n.h2,{id:"purge-validator-session-keys",children:"Purge validator session keys"}),"\n",(0,o.jsxs)(n.p,{children:["Purging the validator's session keys removes the key reference. This can be done through the\n",(0,o.jsx)(n.code,{children:"session.purgeKeys()"})," extrinsic. The key reference exists on the account that originally called the\n",(0,o.jsx)(n.code,{children:"session.set_keys()"})," extrinsic, which could be the stash or the staking proxy (at the time the keys\nwere set)."]}),"\n",(0,o.jsx)(n.admonition,{title:"Purge keys using the same account that set the keys",type:"caution",children:(0,o.jsxs)(n.p,{children:["Make sure to call the session.purge_keys() extrinsic from the same account that set the keys in the\nfirst place in order for the correct reference to be removed. Calling the ",(0,o.jsx)(n.code,{children:"session.purge_keys()"}),"\nfrom the wrong account, although it may succeed, will result in a reference on the other account\nthat ",(0,o.jsx)(n.strong,{children:"cannot"})," be removed, and as a result that account cannot be reaped."]})}),"\n",(0,o.jsxs)(n.admonition,{type:"caution",children:[(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"If you skip this step, you will not be able to reap your stash account"}),", and you will also need\nto rebond, purge the session keys, unbond, and wait the unbonding period again before being able to\ntransfer your tokens."]}),(0,o.jsxs)(n.p,{children:["See ",(0,o.jsx)(n.a,{href:"/docs/learn-guides-nominator#bond-your-tokens",children:"Unbonding and Rebonding"})," for more details."]})]}),"\n",(0,o.jsx)(n.h2,{id:"unbond-your-tokens",children:"Unbond your tokens"}),"\n",(0,o.jsxs)(n.p,{children:["Unbonding your tokens can be done through the ",(0,o.jsx)(n.code,{children:"Network > Staking > Account actions"}),' page in\nPolkadotJS Apps by clicking the corresponding stash account dropdown and selecting "Unbond funds".\nThis can also be done through the ',(0,o.jsx)(n.code,{children:"staking.unbond()"})," extrinsic with the staking proxy account."]})]})}function h(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(c,{...e})}):c(e)}},28453:(e,n,t)=>{t.d(n,{R:()=>a,x:()=>r});var o=t(96540);const i={},s=o.createContext(i);function a(e){const n=o.useContext(s);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:a(e.components),o.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/269bc3bb.5371ebd4.js b/assets/js/269bc3bb.5371ebd4.js new file mode 100644 index 000000000000..125f200fa7b4 --- /dev/null +++ b/assets/js/269bc3bb.5371ebd4.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1968],{48374:(a,o,t)=>{t.r(o),t.d(o,{assets:()=>i,contentTitle:()=>r,default:()=>c,frontMatter:()=>d,metadata:()=>n,toc:()=>l});const n=JSON.parse('{"id":"general/dune-analytics/polkadot-dashboards/legacy/polkadot-staking-dashboard-nominators","title":"Polkadot Staking Dashboard (Nominators)","description":"Polkadot Staking Dashboard (Nominators) descriptions","source":"@site/../docs/general/dune-analytics/polkadot-dashboards/legacy/polkadot-staking-dashboard-nominators.md","sourceDirName":"general/dune-analytics/polkadot-dashboards/legacy","slug":"/general/dune-analytics/polkadot-dashboards/polkadot-staking-dashboard-nominators","permalink":"/docs/general/dune-analytics/polkadot-dashboards/polkadot-staking-dashboard-nominators","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/polkadot-dashboards/legacy/polkadot-staking-dashboard-nominators.md","tags":[],"version":"current","lastUpdatedBy":"MK","lastUpdatedAt":1717658873000,"frontMatter":{"id":"polkadot-staking-dashboard-nominators","title":"Polkadot Staking Dashboard (Nominators)","sidebar_label":"Staking Dashboard (Nominators)","description":"Polkadot Staking Dashboard (Nominators) descriptions","keywords":["polkadot","governance","dashboard","dune"],"slug":"../polkadot-staking-dashboard-nominators"}}');var s=t(74848),e=t(28453);const d={id:"polkadot-staking-dashboard-nominators",title:"Polkadot Staking Dashboard (Nominators)",sidebar_label:"Staking Dashboard (Nominators)",description:"Polkadot Staking Dashboard (Nominators) descriptions",keywords:["polkadot","governance","dashboard","dune"],slug:"../polkadot-staking-dashboard-nominators"},r="Polkadot Staking Dashboard (Nominators)",i={},l=[{value:"View On Dune: Polkadot Staking Dashboard",id:"view-on-dune-polkadot-staking-dashboard",level:2}];function h(a){const o={a:"a",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",strong:"strong",ul:"ul",...(0,e.R)(),...a.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(o.header,{children:(0,s.jsx)(o.h1,{id:"polkadot-staking-dashboard-nominators",children:"Polkadot Staking Dashboard (Nominators)"})}),"\n",(0,s.jsxs)(o.h2,{id:"view-on-dune-polkadot-staking-dashboard",children:["View On Dune: ",(0,s.jsx)(o.a,{href:"https://dune.com/substrate/polkadot-staking-nominators",children:"Polkadot Staking Dashboard"})]}),"\n",(0,s.jsxs)(o.p,{children:["We're using ",(0,s.jsx)(o.strong,{children:"default parameters"})," for all of the following parameterized charts. Visit our\ndashboard on Dune to use the ",(0,s.jsx)(o.strong,{children:"nominator_ss58"})," parameter and analyze a specific referendum."]}),"\n",(0,s.jsx)(o.p,{children:"For a specific nominator, this dashboard shows:"}),"\n",(0,s.jsxs)(o.ul,{children:["\n",(0,s.jsx)(o.li,{children:"Nominator Staking Rewards"}),"\n",(0,s.jsx)(o.li,{children:"Nominator Shares"}),"\n",(0,s.jsx)(o.li,{children:"Delegated Amount"}),"\n",(0,s.jsx)(o.li,{children:"Nominator Staking Rewards Raw Data"}),"\n"]}),"\n",(0,s.jsxs)(o.p,{children:["Source Table: ",(0,s.jsx)(o.strong,{children:"polkadot.stakings"})," , MaterializedView:\n",(0,s.jsx)(o.a,{href:"https://dune.com/queries/3326829",children:(0,s.jsx)(o.strong,{children:"dune.substrate.result_polkadot_nominators"})})]}),"\n",(0,s.jsxs)(o.p,{children:["Go back to ",(0,s.jsx)(o.a,{href:"https://dune.com/substrate/polkadot-staking",children:(0,s.jsx)(o.strong,{children:"Polkadot Staking Home"})})]}),"\n",(0,s.jsx)("iframe",{src:"https://dune.com/embeds/3343697/5602826/",height:"350",width:"100%"}),"\n",(0,s.jsx)("iframe",{src:"https://dune.com/embeds/3343697/5817852/",height:"350",width:"100%"}),"\n",(0,s.jsx)("iframe",{src:"https://dune.com/embeds/3459410/5813864/",height:"350",width:"100%"}),"\n",(0,s.jsx)("iframe",{src:"https://dune.com/embeds/3343697/5817857/",height:"350",width:"100%"})]})}function c(a={}){const{wrapper:o}={...(0,e.R)(),...a.components};return o?(0,s.jsx)(o,{...a,children:(0,s.jsx)(h,{...a})}):h(a)}},28453:(a,o,t)=>{t.d(o,{R:()=>d,x:()=>r});var n=t(96540);const s={},e=n.createContext(s);function d(a){const o=n.useContext(e);return n.useMemo((function(){return"function"==typeof a?a(o):{...o,...a}}),[o,a])}function r(a){let o;return o=a.disableParentContext?"function"==typeof a.components?a.components(s):a.components||s:d(a.components),n.createElement(e.Provider,{value:o},a.children)}}}]); \ No newline at end of file diff --git a/assets/js/269bc3bb.6cd9355b.js b/assets/js/269bc3bb.6cd9355b.js deleted file mode 100644 index a66d18f68b6a..000000000000 --- a/assets/js/269bc3bb.6cd9355b.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1968],{27143:(a,o,t)=>{t.r(o),t.d(o,{assets:()=>i,contentTitle:()=>d,default:()=>c,frontMatter:()=>e,metadata:()=>r,toc:()=>l});var n=t(74848),s=t(28453);const e={id:"polkadot-staking-dashboard-nominators",title:"Polkadot Staking Dashboard (Nominators)",sidebar_label:"Staking Dashboard (Nominators)",description:"Polkadot Staking Dashboard (Nominators) descriptions",keywords:["polkadot","governance","dashboard","dune"],slug:"../polkadot-staking-dashboard-nominators"},d="Polkadot Staking Dashboard (Nominators)",r={id:"general/dune-analytics/polkadot-dashboards/legacy/polkadot-staking-dashboard-nominators",title:"Polkadot Staking Dashboard (Nominators)",description:"Polkadot Staking Dashboard (Nominators) descriptions",source:"@site/../docs/general/dune-analytics/polkadot-dashboards/legacy/polkadot-staking-dashboard-nominators.md",sourceDirName:"general/dune-analytics/polkadot-dashboards/legacy",slug:"/general/dune-analytics/polkadot-dashboards/polkadot-staking-dashboard-nominators",permalink:"/docs/general/dune-analytics/polkadot-dashboards/polkadot-staking-dashboard-nominators",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/polkadot-dashboards/legacy/polkadot-staking-dashboard-nominators.md",tags:[],version:"current",lastUpdatedBy:"MK",lastUpdatedAt:1717658873e3,frontMatter:{id:"polkadot-staking-dashboard-nominators",title:"Polkadot Staking Dashboard (Nominators)",sidebar_label:"Staking Dashboard (Nominators)",description:"Polkadot Staking Dashboard (Nominators) descriptions",keywords:["polkadot","governance","dashboard","dune"],slug:"../polkadot-staking-dashboard-nominators"}},i={},l=[{value:"View On Dune: Polkadot Staking Dashboard",id:"view-on-dune-polkadot-staking-dashboard",level:2}];function h(a){const o={a:"a",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",strong:"strong",ul:"ul",...(0,s.R)(),...a.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(o.header,{children:(0,n.jsx)(o.h1,{id:"polkadot-staking-dashboard-nominators",children:"Polkadot Staking Dashboard (Nominators)"})}),"\n",(0,n.jsxs)(o.h2,{id:"view-on-dune-polkadot-staking-dashboard",children:["View On Dune: ",(0,n.jsx)(o.a,{href:"https://dune.com/substrate/polkadot-staking-nominators",children:"Polkadot Staking Dashboard"})]}),"\n",(0,n.jsxs)(o.p,{children:["We're using ",(0,n.jsx)(o.strong,{children:"default parameters"})," for all of the following parameterized charts. Visit our\ndashboard on Dune to use the ",(0,n.jsx)(o.strong,{children:"nominator_ss58"})," parameter and analyze a specific referendum."]}),"\n",(0,n.jsx)(o.p,{children:"For a specific nominator, this dashboard shows:"}),"\n",(0,n.jsxs)(o.ul,{children:["\n",(0,n.jsx)(o.li,{children:"Nominator Staking Rewards"}),"\n",(0,n.jsx)(o.li,{children:"Nominator Shares"}),"\n",(0,n.jsx)(o.li,{children:"Delegated Amount"}),"\n",(0,n.jsx)(o.li,{children:"Nominator Staking Rewards Raw Data"}),"\n"]}),"\n",(0,n.jsxs)(o.p,{children:["Source Table: ",(0,n.jsx)(o.strong,{children:"polkadot.stakings"})," , MaterializedView:\n",(0,n.jsx)(o.a,{href:"https://dune.com/queries/3326829",children:(0,n.jsx)(o.strong,{children:"dune.substrate.result_polkadot_nominators"})})]}),"\n",(0,n.jsxs)(o.p,{children:["Go back to ",(0,n.jsx)(o.a,{href:"https://dune.com/substrate/polkadot-staking",children:(0,n.jsx)(o.strong,{children:"Polkadot Staking Home"})})]}),"\n",(0,n.jsx)("iframe",{src:"https://dune.com/embeds/3343697/5602826/",height:"350",width:"100%"}),"\n",(0,n.jsx)("iframe",{src:"https://dune.com/embeds/3343697/5817852/",height:"350",width:"100%"}),"\n",(0,n.jsx)("iframe",{src:"https://dune.com/embeds/3459410/5813864/",height:"350",width:"100%"}),"\n",(0,n.jsx)("iframe",{src:"https://dune.com/embeds/3343697/5817857/",height:"350",width:"100%"})]})}function c(a={}){const{wrapper:o}={...(0,s.R)(),...a.components};return o?(0,n.jsx)(o,{...a,children:(0,n.jsx)(h,{...a})}):h(a)}},28453:(a,o,t)=>{t.d(o,{R:()=>d,x:()=>r});var n=t(96540);const s={},e=n.createContext(s);function d(a){const o=n.useContext(e);return n.useMemo((function(){return"function"==typeof a?a(o):{...o,...a}}),[o,a])}function r(a){let o;return o=a.disableParentContext?"function"==typeof a.components?a.components(s):a.components||s:d(a.components),n.createElement(e.Provider,{value:o},a.children)}}}]); \ No newline at end of file diff --git a/assets/js/26dc7bd1.c66c0328.js b/assets/js/26dc7bd1.c66c0328.js new file mode 100644 index 000000000000..cf45d871dec3 --- /dev/null +++ b/assets/js/26dc7bd1.c66c0328.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[166],{56624:(e,n,a)=>{a.r(n),a.d(n,{assets:()=>c,contentTitle:()=>d,default:()=>l,frontMatter:()=>t,metadata:()=>r,toc:()=>o});const r=JSON.parse('{"id":"general/dune-analytics/parachain-dashboards/invarch-dashboards","title":"InvArch Dashboards","description":"InvArch Network is a Multichain Account abstraction hub, optimized for decentralized operations & financial management spanning across every blockchain.","source":"@site/../docs/general/dune-analytics/parachain-dashboards/invarch-dashboards.md","sourceDirName":"general/dune-analytics/parachain-dashboards","slug":"/general/dune-analytics/invarch-dashboards","permalink":"/docs/general/dune-analytics/invarch-dashboards","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/parachain-dashboards/invarch-dashboards.md","tags":[],"version":"current","lastUpdatedBy":"MK","lastUpdatedAt":1719215716000,"frontMatter":{"id":"invarch-dashboards","title":"InvArch Dashboards","sidebar_label":"InvArch","description":"InvArch Network is a Multichain Account abstraction hub, optimized for decentralized operations & financial management spanning across every blockchain.","keywords":["polkadot","dashboard","dune","InvArch","DAO"],"slug":"../invarch-dashboards"},"sidebar":"docs","previous":{"title":"Interlay","permalink":"/docs/general/dune-analytics/interlay-dashboards"},"next":{"title":"Litentry","permalink":"/docs/general/dune-analytics/litentry-dashboards"}}');var s=a(74848),i=a(28453);const t={id:"invarch-dashboards",title:"InvArch Dashboards",sidebar_label:"InvArch",description:"InvArch Network is a Multichain Account abstraction hub, optimized for decentralized operations & financial management spanning across every blockchain.",keywords:["polkadot","dashboard","dune","InvArch","DAO"],slug:"../invarch-dashboards"},d="Invarch Dashboards",c={},o=[{value:"Overview",id:"overview",level:2},{value:"Featured Dashboards on Dune",id:"featured-dashboards-on-dune",level:2},{value:"Key Tables",id:"key-tables",level:2},{value:"Useful Queries",id:"useful-queries",level:2},{value:"Getting Started with Queries",id:"getting-started-with-queries",level:2}];function h(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"invarch-dashboards",children:"Invarch Dashboards"})}),"\n",(0,s.jsx)(n.h2,{id:"overview",children:"Overview"}),"\n",(0,s.jsx)(n.p,{children:"The InvArch Network is a Multichain Account abstraction hub, optimized for decentralized operations\n& financial management spanning across every blockchain."}),"\n",(0,s.jsx)(n.p,{children:"InvArch provides individuals, organizations & DAOs with a single account that can be used to manage\nall of their assets & execute transactions across any network."}),"\n",(0,s.jsx)(n.h2,{id:"featured-dashboards-on-dune",children:"Featured Dashboards on Dune"}),"\n",(0,s.jsx)(n.p,{children:"Here you will find a variety of dashboards that help visualize data from the Acala parachain:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"https://dune.com/substrate/invarch",children:"InvArch"}),": This dashboard provides a comprehensive view of\nInvArch chain-state and information about DAO Staking."]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"key-tables",children:"Key Tables"}),"\n",(0,s.jsx)(n.p,{children:"Data from the InvArch parachain is organized into several key tables:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"invarch.balances"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"invarch.blocks"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"invarch.calls"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"invarch.events"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"invarch.extrinsics"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"invarch.transfers"})}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["Start building your own queries using granular data on Dune\n",(0,s.jsx)(n.a,{href:"https://dune.com/queries?category=canonical&namespace=invarch",children:"here"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"useful-queries",children:"Useful Queries"}),"\n",(0,s.jsx)(n.p,{children:"Some useful queries for InvArch are provided:"}),"\n",(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Title"}),(0,s.jsx)(n.th,{children:"Query"}),(0,s.jsx)(n.th,{children:"Description"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"InvArch DAO Staking All events"}),(0,s.jsx)(n.td,{children:(0,s.jsx)(n.a,{href:"https://dune.com/queries/3753984",children:"query_3753984"})}),(0,s.jsx)(n.td,{children:"This query provides a comprehensive overview of all events related to DAO staking on the InvArch network, including details about the staking amount, staker address, and event type."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"InvArch DAO staking info by DAO and Era"}),(0,s.jsx)(n.td,{children:(0,s.jsx)(n.a,{href:"https://dune.com/queries/3755288",children:"query_3755288"})}),(0,s.jsx)(n.td,{children:"Access detailed information on DAO staking activities within the InvArch network, categorized by DAO and era for historical comparison."})]})]})]}),"\n",(0,s.jsx)(n.h2,{id:"getting-started-with-queries",children:"Getting Started with Queries"}),"\n",(0,s.jsx)(n.p,{children:"To get started with querying data from Unique, you are welcome to use the mentioned materialized\nqueries. You can use the following DuneSQL queries as examples:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-sql",metastring:'title="InvArch Cumulative Activated Acounts by Day" showLineNumbers',children:"WITH accounts_first_active AS (\n SELECT\n address_ss58,\n MIN(date_trunc('day', ts)) AS first_active_date\n FROM\n invarch.balances\n WHERE\n (free + reserved + misc_frozen + frozen) > 0\n GROUP BY\n address_ss58\n)\nSELECT\n first_active_date AS date,\n SUM(COUNT(DISTINCT address_ss58)) OVER (\n ORDER BY\n DATE(first_active_date)\n ) AS cumulative_accounts\nFROM\n accounts_first_active\nGROUP BY\n first_active_date\nORDER BY\n first_active_date DESC;\n"})}),"\n",(0,s.jsx)(n.p,{children:"Query result:"}),"\n",(0,s.jsx)("iframe",{src:"https://dune.com/embeds/3761192/6325894/041db958-0328-4ae8-be2f-76dad336a249",height:"350",width:"100%"}),"\n",(0,s.jsx)(n.admonition,{title:"DuneSQL Referece",type:"info",children:(0,s.jsxs)(n.p,{children:["For more information on DuneSQL, please refer to the ",(0,s.jsx)(n.a,{href:"/docs/general/dunesql-cheatsheet",children:"DuneSQL Cheatsheet"}),"\nand\n",(0,s.jsx)(n.a,{href:"https://docs.dune.com/query-engine/Functions-and-operators/index",children:"DuneSQL Official Documentation"}),"."]})})]})}function l(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}},28453:(e,n,a)=>{a.d(n,{R:()=>t,x:()=>d});var r=a(96540);const s={},i=r.createContext(s);function t(e){const n=r.useContext(i);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:t(e.components),r.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/26dc7bd1.fea0f827.js b/assets/js/26dc7bd1.fea0f827.js deleted file mode 100644 index 8acb1253f5ee..000000000000 --- a/assets/js/26dc7bd1.fea0f827.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[166],{21975:(e,n,a)=>{a.r(n),a.d(n,{assets:()=>c,contentTitle:()=>t,default:()=>l,frontMatter:()=>i,metadata:()=>d,toc:()=>o});var r=a(74848),s=a(28453);const i={id:"invarch-dashboards",title:"InvArch Dashboards",sidebar_label:"InvArch",description:"InvArch Network is a Multichain Account abstraction hub, optimized for decentralized operations & financial management spanning across every blockchain.",keywords:["polkadot","dashboard","dune","InvArch","DAO"],slug:"../invarch-dashboards"},t="Invarch Dashboards",d={id:"general/dune-analytics/parachain-dashboards/invarch-dashboards",title:"InvArch Dashboards",description:"InvArch Network is a Multichain Account abstraction hub, optimized for decentralized operations & financial management spanning across every blockchain.",source:"@site/../docs/general/dune-analytics/parachain-dashboards/invarch-dashboards.md",sourceDirName:"general/dune-analytics/parachain-dashboards",slug:"/general/dune-analytics/invarch-dashboards",permalink:"/docs/general/dune-analytics/invarch-dashboards",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/parachain-dashboards/invarch-dashboards.md",tags:[],version:"current",lastUpdatedBy:"MK",lastUpdatedAt:1719215716e3,frontMatter:{id:"invarch-dashboards",title:"InvArch Dashboards",sidebar_label:"InvArch",description:"InvArch Network is a Multichain Account abstraction hub, optimized for decentralized operations & financial management spanning across every blockchain.",keywords:["polkadot","dashboard","dune","InvArch","DAO"],slug:"../invarch-dashboards"},sidebar:"docs",previous:{title:"Interlay",permalink:"/docs/general/dune-analytics/interlay-dashboards"},next:{title:"Litentry",permalink:"/docs/general/dune-analytics/litentry-dashboards"}},c={},o=[{value:"Overview",id:"overview",level:2},{value:"Featured Dashboards on Dune",id:"featured-dashboards-on-dune",level:2},{value:"Key Tables",id:"key-tables",level:2},{value:"Useful Queries",id:"useful-queries",level:2},{value:"Getting Started with Queries",id:"getting-started-with-queries",level:2}];function h(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,s.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.header,{children:(0,r.jsx)(n.h1,{id:"invarch-dashboards",children:"Invarch Dashboards"})}),"\n",(0,r.jsx)(n.h2,{id:"overview",children:"Overview"}),"\n",(0,r.jsx)(n.p,{children:"The InvArch Network is a Multichain Account abstraction hub, optimized for decentralized operations\n& financial management spanning across every blockchain."}),"\n",(0,r.jsx)(n.p,{children:"InvArch provides individuals, organizations & DAOs with a single account that can be used to manage\nall of their assets & execute transactions across any network."}),"\n",(0,r.jsx)(n.h2,{id:"featured-dashboards-on-dune",children:"Featured Dashboards on Dune"}),"\n",(0,r.jsx)(n.p,{children:"Here you will find a variety of dashboards that help visualize data from the Acala parachain:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"https://dune.com/substrate/invarch",children:"InvArch"}),": This dashboard provides a comprehensive view of\nInvArch chain-state and information about DAO Staking."]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"key-tables",children:"Key Tables"}),"\n",(0,r.jsx)(n.p,{children:"Data from the InvArch parachain is organized into several key tables:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"invarch.balances"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"invarch.blocks"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"invarch.calls"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"invarch.events"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"invarch.extrinsics"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"invarch.transfers"})}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:["Start building your own queries using granular data on Dune\n",(0,r.jsx)(n.a,{href:"https://dune.com/queries?category=canonical&namespace=invarch",children:"here"}),"."]}),"\n",(0,r.jsx)(n.h2,{id:"useful-queries",children:"Useful Queries"}),"\n",(0,r.jsx)(n.p,{children:"Some useful queries for InvArch are provided:"}),"\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Title"}),(0,r.jsx)(n.th,{children:"Query"}),(0,r.jsx)(n.th,{children:"Description"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"InvArch DAO Staking All events"}),(0,r.jsx)(n.td,{children:(0,r.jsx)(n.a,{href:"https://dune.com/queries/3753984",children:"query_3753984"})}),(0,r.jsx)(n.td,{children:"This query provides a comprehensive overview of all events related to DAO staking on the InvArch network, including details about the staking amount, staker address, and event type."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"InvArch DAO staking info by DAO and Era"}),(0,r.jsx)(n.td,{children:(0,r.jsx)(n.a,{href:"https://dune.com/queries/3755288",children:"query_3755288"})}),(0,r.jsx)(n.td,{children:"Access detailed information on DAO staking activities within the InvArch network, categorized by DAO and era for historical comparison."})]})]})]}),"\n",(0,r.jsx)(n.h2,{id:"getting-started-with-queries",children:"Getting Started with Queries"}),"\n",(0,r.jsx)(n.p,{children:"To get started with querying data from Unique, you are welcome to use the mentioned materialized\nqueries. You can use the following DuneSQL queries as examples:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-sql",metastring:'title="InvArch Cumulative Activated Acounts by Day" showLineNumbers',children:"WITH accounts_first_active AS (\n SELECT\n address_ss58,\n MIN(date_trunc('day', ts)) AS first_active_date\n FROM\n invarch.balances\n WHERE\n (free + reserved + misc_frozen + frozen) > 0\n GROUP BY\n address_ss58\n)\nSELECT\n first_active_date AS date,\n SUM(COUNT(DISTINCT address_ss58)) OVER (\n ORDER BY\n DATE(first_active_date)\n ) AS cumulative_accounts\nFROM\n accounts_first_active\nGROUP BY\n first_active_date\nORDER BY\n first_active_date DESC;\n"})}),"\n",(0,r.jsx)(n.p,{children:"Query result:"}),"\n",(0,r.jsx)("iframe",{src:"https://dune.com/embeds/3761192/6325894/041db958-0328-4ae8-be2f-76dad336a249",height:"350",width:"100%"}),"\n",(0,r.jsx)(n.admonition,{title:"DuneSQL Referece",type:"info",children:(0,r.jsxs)(n.p,{children:["For more information on DuneSQL, please refer to the ",(0,r.jsx)(n.a,{href:"/docs/general/dunesql-cheatsheet",children:"DuneSQL Cheatsheet"}),"\nand\n",(0,r.jsx)(n.a,{href:"https://docs.dune.com/query-engine/Functions-and-operators/index",children:"DuneSQL Official Documentation"}),"."]})})]})}function l(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(h,{...e})}):h(e)}},28453:(e,n,a)=>{a.d(n,{R:()=>t,x:()=>d});var r=a(96540);const s={},i=r.createContext(s);function t(e){const n=r.useContext(i);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:t(e.components),r.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/2763.cf762d78.js b/assets/js/2763.cf762d78.js new file mode 100644 index 000000000000..809ab4cd74c0 --- /dev/null +++ b/assets/js/2763.cf762d78.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2763],{86022:(e,t,a)=>{function i(e,t){e.accDescr&&t.setAccDescription?.(e.accDescr),e.accTitle&&t.setAccTitle?.(e.accTitle),e.title&&t.setDiagramTitle?.(e.title)}a.d(t,{S:()=>i}),(0,a(45567).K2)(i,"populateCommonDb")},62763:(e,t,a)=>{a.d(t,{diagram:()=>b});var i=a(86022),n=a(85039),l=a(61021),r=a(45567),s=a(78731),o=a(20007),c=r.UI.pie,p={sections:new Map,showData:!1,config:c},d=p.sections,g=p.showData,u=structuredClone(c),h=(0,r.K2)((()=>structuredClone(u)),"getConfig"),m=(0,r.K2)((()=>{d=new Map,g=p.showData,(0,r.IU)()}),"clear"),f=(0,r.K2)((({label:e,value:t})=>{d.has(e)||(d.set(e,t),r.Rm.debug(`added new section: ${e}, with value: ${t}`))}),"addSection"),S=(0,r.K2)((()=>d),"getSections"),x=(0,r.K2)((e=>{g=e}),"setShowData"),w=(0,r.K2)((()=>g),"getShowData"),D={getConfig:h,clear:m,setDiagramTitle:r.ke,getDiagramTitle:r.ab,setAccTitle:r.SV,getAccTitle:r.iN,setAccDescription:r.EI,getAccDescription:r.m7,addSection:f,getSections:S,setShowData:x,getShowData:w},T=(0,r.K2)(((e,t)=>{(0,i.S)(e,t),t.setShowData(e.showData),e.sections.map(t.addSection)}),"populateDb"),$={parse:(0,r.K2)((async e=>{const t=await(0,s.qg)("pie",e);r.Rm.debug(t),T(t,D)}),"parse")},y=(0,r.K2)((e=>`\n .pieCircle{\n stroke: ${e.pieStrokeColor};\n stroke-width : ${e.pieStrokeWidth};\n opacity : ${e.pieOpacity};\n }\n .pieOuterCircle{\n stroke: ${e.pieOuterStrokeColor};\n stroke-width: ${e.pieOuterStrokeWidth};\n fill: none;\n }\n .pieTitleText {\n text-anchor: middle;\n font-size: ${e.pieTitleTextSize};\n fill: ${e.pieTitleTextColor};\n font-family: ${e.fontFamily};\n }\n .slice {\n font-family: ${e.fontFamily};\n fill: ${e.pieSectionTextColor};\n font-size:${e.pieSectionTextSize};\n // fill: white;\n }\n .legend text {\n fill: ${e.pieLegendTextColor};\n font-family: ${e.fontFamily};\n font-size: ${e.pieLegendTextSize};\n }\n`),"getStyles"),C=(0,r.K2)((e=>{const t=[...e.entries()].map((e=>({label:e[0],value:e[1]}))).sort(((e,t)=>t.value-e.value));return(0,o.rLf)().value((e=>e.value))(t)}),"createPieArcs"),b={parser:$,db:D,renderer:{draw:(0,r.K2)(((e,t,a,i)=>{r.Rm.debug("rendering pie chart\n"+e);const s=i.db,c=(0,r.D7)(),p=(0,n.$t)(s.getConfig(),c.pie),d=18,g=450,u=g,h=(0,l.D)(t),m=h.append("g");m.attr("transform","translate(225,225)");const{themeVariables:f}=c;let[S]=(0,n.I5)(f.pieOuterStrokeWidth);S??=2;const x=p.textPosition,w=Math.min(u,g)/2-40,D=(0,o.JLW)().innerRadius(0).outerRadius(w),T=(0,o.JLW)().innerRadius(w*x).outerRadius(w*x);m.append("circle").attr("cx",0).attr("cy",0).attr("r",w+S/2).attr("class","pieOuterCircle");const $=s.getSections(),y=C($),b=[f.pie1,f.pie2,f.pie3,f.pie4,f.pie5,f.pie6,f.pie7,f.pie8,f.pie9,f.pie10,f.pie11,f.pie12],k=(0,o.UMr)(b);m.selectAll("mySlices").data(y).enter().append("path").attr("d",D).attr("fill",(e=>k(e.data.label))).attr("class","pieCircle");let K=0;$.forEach((e=>{K+=e})),m.selectAll("mySlices").data(y).enter().append("text").text((e=>(e.data.value/K*100).toFixed(0)+"%")).attr("transform",(e=>"translate("+T.centroid(e)+")")).style("text-anchor","middle").attr("class","slice"),m.append("text").text(s.getDiagramTitle()).attr("x",0).attr("y",-200).attr("class","pieTitleText");const v=m.selectAll(".legend").data(k.domain()).enter().append("g").attr("class","legend").attr("transform",((e,t)=>"translate(216,"+(22*t-22*k.domain().length/2)+")"));v.append("rect").attr("width",d).attr("height",d).style("fill",k).style("stroke",k),v.data(y).append("text").attr("x",22).attr("y",14).text((e=>{const{label:t,value:a}=e.data;return s.getShowData()?`${t} [${a}]`:t}));const A=512+Math.max(...v.selectAll("text").nodes().map((e=>e?.getBoundingClientRect().width??0)));h.attr("viewBox",`0 0 ${A} 450`),(0,r.a$)(h,g,A,p.useMaxWidth)}),"draw")},styles:y}}}]); \ No newline at end of file diff --git a/assets/js/279fb1d6.0b2e13ce.js b/assets/js/279fb1d6.0b2e13ce.js deleted file mode 100644 index d48b8eac87b7..000000000000 --- a/assets/js/279fb1d6.0b2e13ce.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4994],{83022:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>i,default:()=>h,frontMatter:()=>s,metadata:()=>l,toc:()=>d});var a=t(74848),r=t(28453),o=t(3514);const s={id:"kusama-getting-started",title:"Interact with Kusama",sidebar_label:"Home",description:"Reference point for Kusama content.",keywords:["getting started","introduction","kusama","interact"],slug:"../../kusama-getting-started"},i=void 0,l={id:"general/kusama/kusama-getting-started",title:"Interact with Kusama",description:"Reference point for Kusama content.",source:"@site/../docs/general/kusama/kusama-getting-started.md",sourceDirName:"general/kusama",slug:"/kusama-getting-started",permalink:"/docs/kusama-getting-started",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/kusama/kusama-getting-started.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1727943421e3,frontMatter:{id:"kusama-getting-started",title:"Interact with Kusama",sidebar_label:"Home",description:"Reference point for Kusama content.",keywords:["getting started","introduction","kusama","interact"],slug:"../../kusama-getting-started"},sidebar:"docs",previous:{title:"Voting for Councillors",permalink:"/docs/maintain/maintain-guides-how-to-vote-councillor"},next:{title:"Timeline",permalink:"/docs/kusama-timeline"}},c={},d=[{value:"Polkadot's Canary Network",id:"polkadots-canary-network",level:3},{value:"What can I do with my KSM?",id:"what-can-i-do-with-my-ksm",level:3},{value:"Kusama Gifts",id:"kusama-gifts",level:3}];function u(e){const n={a:"a",admonition:"admonition",em:"em",h3:"h3",li:"li",p:"p",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.h3,{id:"polkadots-canary-network",children:"Polkadot's Canary Network"}),"\n",(0,a.jsxs)(n.p,{children:["Kusama is a ",(0,a.jsx)(n.em,{children:"canary network"})," for Polkadot; an earlier release of the code that is available first\nand holds real economic value. For developers, Kusama is a proving ground for runtime upgrades,\non-chain governance, and parachains."]}),"\n",(0,a.jsxs)(n.admonition,{title:"No Promises",type:"info",children:[(0,a.jsx)(n.p,{children:"Kusama is owned by those who hold the Kusama tokens (KSM). There's no central kill switch and all\nchanges are made through the protocol's on-chain governance."}),(0,a.jsxs)(n.p,{children:["The network is a permissionless and anyone can come along and start using it. Those who participated\nin the Polkadot sale can claim a proportional amount of KSM through the\n",(0,a.jsx)(n.a,{href:"/docs/learn-guides-claims",children:"Kusama Claims process"}),"."]}),(0,a.jsxs)(n.p,{children:["Kusama is experimental. ",(0,a.jsx)(n.strong,{children:"Expect Chaos"}),"."]})]}),"\n",(0,a.jsx)(n.admonition,{title:"As a KSM holder",type:"tip",children:(0,a.jsx)(n.p,{children:"You can interact with all the features of the Kusama network such as staking (i.e. validating or\nnominating), governance, basic transfers and everything else."})}),"\n",(0,a.jsx)(o.A,{}),"\n",(0,a.jsx)(n.h3,{id:"what-can-i-do-with-my-ksm",children:"What can I do with my KSM?"}),"\n",(0,a.jsxs)(n.p,{children:["KSM is the native token of the Kusama Network. KSM can be used for transaction fees, staking,\ngovernance, purchase of coretime, and for enabling several key functionalities on Kusama. See more\ninformation on ",(0,a.jsx)(n.a,{href:"/docs/chain-state-values",children:"the Chain State Values page"}),"."]}),"\n",(0,a.jsxs)(n.p,{children:["KSM has utility in ",(0,a.jsx)(n.a,{href:"/docs/learn-polkadot-opengov",children:"Kusama's OpenGov"})," where you can\n",(0,a.jsx)(n.a,{href:"/docs/learn-polkadot-opengov#voting-on-a-referendum",children:"vote"}),",\n",(0,a.jsx)(n.a,{href:"/docs/learn-polkadot-opengov#multirole-delegation",children:"delegate your voting power"}),", and place\ndeposits for your referenda or referenda proposed by others. KSM can also enable you to participate\nin programs like the ",(0,a.jsx)(n.a,{href:"/docs/thousand-validators",children:"Thousand Validators Programme"}),"."]}),"\n",(0,a.jsx)(n.h3,{id:"kusama-gifts",children:"Kusama Gifts"}),"\n",(0,a.jsx)(n.p,{children:"Kusama Gifts provide an easy way to:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:"Onboard friends or family who are curious about blockchain but haven\u2019t made the leap yet."}),"\n",(0,a.jsx)(n.li,{children:"Share your love of Kusama and send any amount of KSM."}),"\n",(0,a.jsx)(n.li,{children:"Say \u2018thank you\u2019 or send someone tokens when you don\u2019t know their address."}),"\n",(0,a.jsx)(n.li,{children:"Get friends and family set up to participate in crowdloans."}),"\n"]}),"\n",(0,a.jsxs)(n.p,{children:["Learn more about how you can create and send Kusama Gifts\n",(0,a.jsx)(n.a,{href:"https://polkadot.network/blog/introducing-polkadot-kusama-gifts/",children:"here"}),"."]}),"\n",(0,a.jsxs)(n.p,{children:["While Kusama does not support smart contracts natively, building apps on it is still possible (e.g.\n",(0,a.jsx)(n.a,{href:"https://rmrk.app",children:"RMRK.app"}),"). If you're interested in diving deeper into ",(0,a.jsx)(n.em,{children:"proper"})," development,\nhowever, check out the ",(0,a.jsx)(n.a,{href:"build-index",children:"builders guide"}),"."]})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(u,{...e})}):u(e)}},3514:(e,n,t)=>{t.d(n,{A:()=>x});t(96540);var a=t(34164),r=t(26972),o=t(28774),s=t(53465),i=t(16654),l=t(21312),c=t(51107);const d={cardContainer:"cardContainer_fWXF",cardTitle:"cardTitle_rnsV",cardDescription:"cardDescription_PWke"};var u=t(74848);function h(e){var n=e.href,t=e.children;return(0,u.jsx)(o.A,{href:n,className:(0,a.A)("card padding--lg",d.cardContainer),children:t})}function m(e){var n=e.href,t=e.icon,r=e.title,o=e.description;return(0,u.jsxs)(h,{href:n,children:[(0,u.jsxs)(c.A,{as:"h2",className:(0,a.A)("text--truncate",d.cardTitle),title:r,children:[t," ",r]}),o&&(0,u.jsx)("p",{className:(0,a.A)("text--truncate",d.cardDescription),title:o,children:o})]})}function p(e){var n,t,a=e.item,o=(0,r.Nr)(a),i=(t=(0,s.W)().selectMessage,function(e){return t(e,(0,l.T)({message:"1 item|{count} items",id:"theme.docs.DocCard.categoryDescription.plurals",description:"The default description for a category card in the generated index about how many items this category includes"},{count:e}))});return o?(0,u.jsx)(m,{href:o,icon:"\ud83d\uddc3\ufe0f",title:a.label,description:null!=(n=a.description)?n:i(a.items.length)}):null}function f(e){var n,t,a=e.item,o=(0,i.A)(a.href)?"\ud83d\udcc4\ufe0f":"\ud83d\udd17",s=(0,r.cC)(null!=(n=a.docId)?n:void 0);return(0,u.jsx)(m,{href:a.href,icon:o,title:a.label,description:null!=(t=a.description)?t:null==s?void 0:s.description})}function g(e){var n=e.item;switch(n.type){case"link":return(0,u.jsx)(f,{item:n});case"category":return(0,u.jsx)(p,{item:n});default:throw new Error("unknown item type "+JSON.stringify(n))}}function k(e){var n=e.className,t=(0,r.$S)();return(0,u.jsx)(x,{items:t.items,className:n})}function x(e){var n=e.items,t=e.className;if(!n)return(0,u.jsx)(k,Object.assign({},e));var o=(0,r.d1)(n);return(0,u.jsx)("section",{className:(0,a.A)("row",t),children:o.map((function(e,n){return(0,u.jsx)("article",{className:"col col--6 margin-bottom--lg",children:(0,u.jsx)(g,{item:e})},n)}))})}},53465:(e,n,t)=>{t.d(n,{W:()=>c});var a=t(96540),r=t(44586),o=["zero","one","two","few","many","other"];function s(e){return o.filter((function(n){return e.includes(n)}))}var i={locale:"en",pluralForms:s(["one","other"]),select:function(e){return 1===e?"one":"other"}};function l(){var e=(0,r.A)().i18n.currentLocale;return(0,a.useMemo)((function(){try{return n=e,t=new Intl.PluralRules(n),{locale:n,pluralForms:s(t.resolvedOptions().pluralCategories),select:function(e){return t.select(e)}}}catch(a){return console.error('Failed to use Intl.PluralRules for locale "'+e+'".\nDocusaurus will fallback to the default (English) implementation.\nError: '+a.message+"\n"),i}var n,t}),[e])}function c(){var e=l();return{selectMessage:function(n,t){return function(e,n,t){var a=e.split("|");if(1===a.length)return a[0];a.length>t.pluralForms.length&&console.error("For locale="+t.locale+", a maximum of "+t.pluralForms.length+" plural forms are expected ("+t.pluralForms.join(",")+"), but the message contains "+a.length+": "+e);var r=t.select(n),o=t.pluralForms.indexOf(r);return a[Math.min(o,a.length-1)]}(t,n,e)}}}},28453:(e,n,t)=>{t.d(n,{R:()=>s,x:()=>i});var a=t(96540);const r={},o=a.createContext(r);function s(e){const n=a.useContext(o);return a.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:s(e.components),a.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/279fb1d6.c97df69f.js b/assets/js/279fb1d6.c97df69f.js new file mode 100644 index 000000000000..767cde412e13 --- /dev/null +++ b/assets/js/279fb1d6.c97df69f.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4994],{70134:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>l,default:()=>h,frontMatter:()=>i,metadata:()=>a,toc:()=>d});const a=JSON.parse('{"id":"general/kusama/kusama-getting-started","title":"Interact with Kusama","description":"Reference point for Kusama content.","source":"@site/../docs/general/kusama/kusama-getting-started.md","sourceDirName":"general/kusama","slug":"/kusama-getting-started","permalink":"/docs/kusama-getting-started","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/kusama/kusama-getting-started.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1727943421000,"frontMatter":{"id":"kusama-getting-started","title":"Interact with Kusama","sidebar_label":"Home","description":"Reference point for Kusama content.","keywords":["getting started","introduction","kusama","interact"],"slug":"../../kusama-getting-started"},"sidebar":"docs","previous":{"title":"Voting for Councillors","permalink":"/docs/maintain/maintain-guides-how-to-vote-councillor"},"next":{"title":"Timeline","permalink":"/docs/kusama-timeline"}}');var r=t(74848),o=t(28453),s=t(3514);const i={id:"kusama-getting-started",title:"Interact with Kusama",sidebar_label:"Home",description:"Reference point for Kusama content.",keywords:["getting started","introduction","kusama","interact"],slug:"../../kusama-getting-started"},l=void 0,c={},d=[{value:"Polkadot's Canary Network",id:"polkadots-canary-network",level:3},{value:"What can I do with my KSM?",id:"what-can-i-do-with-my-ksm",level:3},{value:"Kusama Gifts",id:"kusama-gifts",level:3}];function u(e){const n={a:"a",admonition:"admonition",em:"em",h3:"h3",li:"li",p:"p",strong:"strong",ul:"ul",...(0,o.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h3,{id:"polkadots-canary-network",children:"Polkadot's Canary Network"}),"\n",(0,r.jsxs)(n.p,{children:["Kusama is a ",(0,r.jsx)(n.em,{children:"canary network"})," for Polkadot; an earlier release of the code that is available first\nand holds real economic value. For developers, Kusama is a proving ground for runtime upgrades,\non-chain governance, and parachains."]}),"\n",(0,r.jsxs)(n.admonition,{title:"No Promises",type:"info",children:[(0,r.jsx)(n.p,{children:"Kusama is owned by those who hold the Kusama tokens (KSM). There's no central kill switch and all\nchanges are made through the protocol's on-chain governance."}),(0,r.jsxs)(n.p,{children:["The network is a permissionless and anyone can come along and start using it. Those who participated\nin the Polkadot sale can claim a proportional amount of KSM through the\n",(0,r.jsx)(n.a,{href:"/docs/learn-guides-claims",children:"Kusama Claims process"}),"."]}),(0,r.jsxs)(n.p,{children:["Kusama is experimental. ",(0,r.jsx)(n.strong,{children:"Expect Chaos"}),"."]})]}),"\n",(0,r.jsx)(n.admonition,{title:"As a KSM holder",type:"tip",children:(0,r.jsx)(n.p,{children:"You can interact with all the features of the Kusama network such as staking (i.e. validating or\nnominating), governance, basic transfers and everything else."})}),"\n",(0,r.jsx)(s.A,{}),"\n",(0,r.jsx)(n.h3,{id:"what-can-i-do-with-my-ksm",children:"What can I do with my KSM?"}),"\n",(0,r.jsxs)(n.p,{children:["KSM is the native token of the Kusama Network. KSM can be used for transaction fees, staking,\ngovernance, purchase of coretime, and for enabling several key functionalities on Kusama. See more\ninformation on ",(0,r.jsx)(n.a,{href:"/docs/chain-state-values",children:"the Chain State Values page"}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["KSM has utility in ",(0,r.jsx)(n.a,{href:"/docs/learn-polkadot-opengov",children:"Kusama's OpenGov"})," where you can\n",(0,r.jsx)(n.a,{href:"/docs/learn-polkadot-opengov#voting-on-a-referendum",children:"vote"}),",\n",(0,r.jsx)(n.a,{href:"/docs/learn-polkadot-opengov#multirole-delegation",children:"delegate your voting power"}),", and place\ndeposits for your referenda or referenda proposed by others. KSM can also enable you to participate\nin programs like the ",(0,r.jsx)(n.a,{href:"/docs/thousand-validators",children:"Thousand Validators Programme"}),"."]}),"\n",(0,r.jsx)(n.h3,{id:"kusama-gifts",children:"Kusama Gifts"}),"\n",(0,r.jsx)(n.p,{children:"Kusama Gifts provide an easy way to:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Onboard friends or family who are curious about blockchain but haven\u2019t made the leap yet."}),"\n",(0,r.jsx)(n.li,{children:"Share your love of Kusama and send any amount of KSM."}),"\n",(0,r.jsx)(n.li,{children:"Say \u2018thank you\u2019 or send someone tokens when you don\u2019t know their address."}),"\n",(0,r.jsx)(n.li,{children:"Get friends and family set up to participate in crowdloans."}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:["Learn more about how you can create and send Kusama Gifts\n",(0,r.jsx)(n.a,{href:"https://polkadot.network/blog/introducing-polkadot-kusama-gifts/",children:"here"}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["While Kusama does not support smart contracts natively, building apps on it is still possible (e.g.\n",(0,r.jsx)(n.a,{href:"https://rmrk.app",children:"RMRK.app"}),"). If you're interested in diving deeper into ",(0,r.jsx)(n.em,{children:"proper"})," development,\nhowever, check out the ",(0,r.jsx)(n.a,{href:"build-index",children:"builders guide"}),"."]})]})}function h(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(u,{...e})}):u(e)}},3514:(e,n,t)=>{t.d(n,{A:()=>x});t(96540);var a=t(34164),r=t(26972),o=t(28774),s=t(53465),i=t(16654),l=t(21312),c=t(51107);const d={cardContainer:"cardContainer_fWXF",cardTitle:"cardTitle_rnsV",cardDescription:"cardDescription_PWke"};var u=t(74848);function h(e){var n=e.href,t=e.children;return(0,u.jsx)(o.A,{href:n,className:(0,a.A)("card padding--lg",d.cardContainer),children:t})}function m(e){var n=e.href,t=e.icon,r=e.title,o=e.description;return(0,u.jsxs)(h,{href:n,children:[(0,u.jsxs)(c.A,{as:"h2",className:(0,a.A)("text--truncate",d.cardTitle),title:r,children:[t," ",r]}),o&&(0,u.jsx)("p",{className:(0,a.A)("text--truncate",d.cardDescription),title:o,children:o})]})}function p(e){var n,t,a=e.item,o=(0,r.Nr)(a),i=(t=(0,s.W)().selectMessage,function(e){return t(e,(0,l.T)({message:"1 item|{count} items",id:"theme.docs.DocCard.categoryDescription.plurals",description:"The default description for a category card in the generated index about how many items this category includes"},{count:e}))});return o?(0,u.jsx)(m,{href:o,icon:"\ud83d\uddc3\ufe0f",title:a.label,description:null!=(n=a.description)?n:i(a.items.length)}):null}function f(e){var n,t,a=e.item,o=(0,i.A)(a.href)?"\ud83d\udcc4\ufe0f":"\ud83d\udd17",s=(0,r.cC)(null!=(n=a.docId)?n:void 0);return(0,u.jsx)(m,{href:a.href,icon:o,title:a.label,description:null!=(t=a.description)?t:null==s?void 0:s.description})}function g(e){var n=e.item;switch(n.type){case"link":return(0,u.jsx)(f,{item:n});case"category":return(0,u.jsx)(p,{item:n});default:throw new Error("unknown item type "+JSON.stringify(n))}}function k(e){var n=e.className,t=(0,r.$S)();return(0,u.jsx)(x,{items:t.items,className:n})}function x(e){var n=e.items,t=e.className;if(!n)return(0,u.jsx)(k,Object.assign({},e));var o=(0,r.d1)(n);return(0,u.jsx)("section",{className:(0,a.A)("row",t),children:o.map((function(e,n){return(0,u.jsx)("article",{className:"col col--6 margin-bottom--lg",children:(0,u.jsx)(g,{item:e})},n)}))})}},53465:(e,n,t)=>{t.d(n,{W:()=>c});var a=t(96540),r=t(44586),o=["zero","one","two","few","many","other"];function s(e){return o.filter((function(n){return e.includes(n)}))}var i={locale:"en",pluralForms:s(["one","other"]),select:function(e){return 1===e?"one":"other"}};function l(){var e=(0,r.A)().i18n.currentLocale;return(0,a.useMemo)((function(){try{return n=e,t=new Intl.PluralRules(n),{locale:n,pluralForms:s(t.resolvedOptions().pluralCategories),select:function(e){return t.select(e)}}}catch(a){return console.error('Failed to use Intl.PluralRules for locale "'+e+'".\nDocusaurus will fallback to the default (English) implementation.\nError: '+a.message+"\n"),i}var n,t}),[e])}function c(){var e=l();return{selectMessage:function(n,t){return function(e,n,t){var a=e.split("|");if(1===a.length)return a[0];a.length>t.pluralForms.length&&console.error("For locale="+t.locale+", a maximum of "+t.pluralForms.length+" plural forms are expected ("+t.pluralForms.join(",")+"), but the message contains "+a.length+": "+e);var r=t.select(n),o=t.pluralForms.indexOf(r);return a[Math.min(o,a.length-1)]}(t,n,e)}}}},28453:(e,n,t)=>{t.d(n,{R:()=>s,x:()=>i});var a=t(96540);const r={},o=a.createContext(r);function s(e){const n=a.useContext(o);return a.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:s(e.components),a.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/28b84bbb.2f481dbb.js b/assets/js/28b84bbb.2f481dbb.js new file mode 100644 index 000000000000..ce83cb1ab57d --- /dev/null +++ b/assets/js/28b84bbb.2f481dbb.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9385],{11662:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>a,default:()=>h,frontMatter:()=>r,metadata:()=>o,toc:()=>d});const o=JSON.parse('{"id":"build/build-network-overview","title":"Development Networks","description":"An overview of the different networks on Polkadot","source":"@site/../docs/build/build-network-overview.md","sourceDirName":"build","slug":"/build-network-overview","permalink":"/docs/build-network-overview","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/build/build-network-overview.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1729152709000,"frontMatter":{"id":"build-network-overview","title":"Development Networks","sidebar_label":"Development Networks","description":"An overview of the different networks on Polkadot","keywords":["data","index","query","explorer","dashboard","dapp","uapp","app","frontend","client"],"slug":"../build-network-overview"},"sidebar":"docs","previous":{"title":"Polkadot Developer Portal","permalink":"/docs/build-guide"},"next":{"title":"Client-side Development","permalink":"/docs/build-client-index"}}');var i=n(74848),s=n(28453);const r={id:"build-network-overview",title:"Development Networks",sidebar_label:"Development Networks",description:"An overview of the different networks on Polkadot",keywords:["data","index","query","explorer","dashboard","dapp","uapp","app","frontend","client"],slug:"../build-network-overview"},a=void 0,l={},d=[{value:"Polkadot Ecosystem Networks",id:"polkadot-ecosystem-networks",level:2},{value:"Interfacing - PolkadotJS",id:"interfacing---polkadotjs",level:2},{value:"Testnet Faucets",id:"testnet-faucets",level:2}];function c(e){const t={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",li:"li",p:"p",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.p,{children:"While Polkadot itself is the mainnet, there are several networks that can cater to different\ndevelopment or application-driven contexts."}),"\n",(0,i.jsx)(t.admonition,{title:"Looking for faucets?",type:"info",children:(0,i.jsx)(t.p,{children:(0,i.jsx)(t.a,{href:"/docs/learn-DOT#obtaining-testnet-tokens",children:"See here for all available faucets and how to obtain testnet tokens."})})}),"\n",(0,i.jsx)(t.h2,{id:"polkadot-ecosystem-networks",children:"Polkadot Ecosystem Networks"}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsxs)(t.li,{children:["Mainnet: ",(0,i.jsx)(t.strong,{children:"Polkadot"})]}),"\n",(0,i.jsxs)(t.li,{children:["Canary network: ",(0,i.jsx)(t.strong,{children:"Kusama"}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://kusama.network/",children:"Kusama"})," is a value-bearing canary network that gets features before\nPolkadot does. ",(0,i.jsx)(t.em,{children:"Expect Chaos"}),"."]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(t.li,{children:["Official testnets:","\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.strong,{children:"Westend"})," - Functionality equal to the current Polkadot mainnet, with possible next-generation\ntesting of features from time to time that will eventually migrate onto Polkadot. Perma-testnet\n(is not reset back to genesis block)."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.strong,{children:"Paseo"})," - A community-run testnet which mirrors the Polkadot runtime. It is maintained by the\ncommunity."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(t.p,{children:["Polkadot mainnet has been running since May 2020 and has\n",(0,i.jsx)(t.a,{href:"/docs/learn-implementations",children:"implementations in various programming languages"})," ranging from\nRust to JavaScript. The leading implementation is built in Rust and uses the Substrate framework."]}),"\n",(0,i.jsx)(t.p,{children:"Tooling is rapidly evolving to interact with the network; there are many ways to get started!"}),"\n",(0,i.jsxs)(t.p,{children:["But before you jump head-first into the code, you should consider the ",(0,i.jsx)(t.em,{children:"kind"})," of decentralized\napplication you want to make and understand the different paradigms available to developers who want\nto build on Polkadot."]}),"\n",(0,i.jsx)(t.h2,{id:"interfacing---polkadotjs",children:"Interfacing - PolkadotJS"}),"\n",(0,i.jsxs)(t.p,{children:["PolkadotJS is the most widely used developer tool in the Polkadot ecosystem. It provides a web app\nto interact with various parachains, nodes, and their RPCs, as well as a Javascript API for use\nwithin front-end contexts. You can view more on PolkadotJS and its resources\n",(0,i.jsx)(t.a,{href:"https://polkadot.js.org/",children:"here"}),"."]}),"\n",(0,i.jsxs)(t.p,{children:["For other programmatic ways of interacting with these networks (including PolkadotJS), please view\nthe ",(0,i.jsx)(t.a,{href:"/docs/build-node-interaction",children:"Node Interactions page"}),"."]}),"\n",(0,i.jsx)(t.h2,{id:"testnet-faucets",children:"Testnet Faucets"}),"\n",(0,i.jsxs)(t.p,{children:["Almost all tesnets either have a web-based interface for getting test currency or a Matrix room\nwhich you can post ",(0,i.jsx)(t.code,{children:"!drip
    "})]}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.a,{href:"/docs/learn-DOT#obtaining-testnet-tokens",children:"See here for all available faucets and how to obtain testnet tokens."})})]})}function h(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(c,{...e})}):c(e)}},28453:(e,t,n)=>{n.d(t,{R:()=>r,x:()=>a});var o=n(96540);const i={},s=o.createContext(i);function r(e){const t=o.useContext(s);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),o.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/28b84bbb.ab6b4ab0.js b/assets/js/28b84bbb.ab6b4ab0.js deleted file mode 100644 index 729a216be95c..000000000000 --- a/assets/js/28b84bbb.ab6b4ab0.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9385],{85085:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>s,default:()=>h,frontMatter:()=>r,metadata:()=>a,toc:()=>d});var o=n(74848),i=n(28453);const r={id:"build-network-overview",title:"Development Networks",sidebar_label:"Development Networks",description:"An overview of the different networks on Polkadot",keywords:["data","index","query","explorer","dashboard","dapp","uapp","app","frontend","client"],slug:"../build-network-overview"},s=void 0,a={id:"build/build-network-overview",title:"Development Networks",description:"An overview of the different networks on Polkadot",source:"@site/../docs/build/build-network-overview.md",sourceDirName:"build",slug:"/build-network-overview",permalink:"/docs/build-network-overview",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/build/build-network-overview.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1729152709e3,frontMatter:{id:"build-network-overview",title:"Development Networks",sidebar_label:"Development Networks",description:"An overview of the different networks on Polkadot",keywords:["data","index","query","explorer","dashboard","dapp","uapp","app","frontend","client"],slug:"../build-network-overview"},sidebar:"docs",previous:{title:"Polkadot Developer Portal",permalink:"/docs/build-guide"},next:{title:"Client-side Development",permalink:"/docs/build-client-index"}},l={},d=[{value:"Polkadot Ecosystem Networks",id:"polkadot-ecosystem-networks",level:2},{value:"Interfacing - PolkadotJS",id:"interfacing---polkadotjs",level:2},{value:"Testnet Faucets",id:"testnet-faucets",level:2}];function c(e){const t={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",li:"li",p:"p",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.p,{children:"While Polkadot itself is the mainnet, there are several networks that can cater to different\ndevelopment or application-driven contexts."}),"\n",(0,o.jsx)(t.admonition,{title:"Looking for faucets?",type:"info",children:(0,o.jsx)(t.p,{children:(0,o.jsx)(t.a,{href:"/docs/learn-DOT#obtaining-testnet-tokens",children:"See here for all available faucets and how to obtain testnet tokens."})})}),"\n",(0,o.jsx)(t.h2,{id:"polkadot-ecosystem-networks",children:"Polkadot Ecosystem Networks"}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsxs)(t.li,{children:["Mainnet: ",(0,o.jsx)(t.strong,{children:"Polkadot"})]}),"\n",(0,o.jsxs)(t.li,{children:["Canary network: ",(0,o.jsx)(t.strong,{children:"Kusama"}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.a,{href:"https://kusama.network/",children:"Kusama"})," is a value-bearing canary network that gets features before\nPolkadot does. ",(0,o.jsx)(t.em,{children:"Expect Chaos"}),"."]}),"\n"]}),"\n"]}),"\n",(0,o.jsxs)(t.li,{children:["Official testnets:","\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.strong,{children:"Westend"})," - Functionality equal to the current Polkadot mainnet, with possible next-generation\ntesting of features from time to time that will eventually migrate onto Polkadot. Perma-testnet\n(is not reset back to genesis block)."]}),"\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.strong,{children:"Paseo"})," - A community-run testnet which mirrors the Polkadot runtime. It is maintained by the\ncommunity."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,o.jsxs)(t.p,{children:["Polkadot mainnet has been running since May 2020 and has\n",(0,o.jsx)(t.a,{href:"/docs/learn-implementations",children:"implementations in various programming languages"})," ranging from\nRust to JavaScript. The leading implementation is built in Rust and uses the Substrate framework."]}),"\n",(0,o.jsx)(t.p,{children:"Tooling is rapidly evolving to interact with the network; there are many ways to get started!"}),"\n",(0,o.jsxs)(t.p,{children:["But before you jump head-first into the code, you should consider the ",(0,o.jsx)(t.em,{children:"kind"})," of decentralized\napplication you want to make and understand the different paradigms available to developers who want\nto build on Polkadot."]}),"\n",(0,o.jsx)(t.h2,{id:"interfacing---polkadotjs",children:"Interfacing - PolkadotJS"}),"\n",(0,o.jsxs)(t.p,{children:["PolkadotJS is the most widely used developer tool in the Polkadot ecosystem. It provides a web app\nto interact with various parachains, nodes, and their RPCs, as well as a Javascript API for use\nwithin front-end contexts. You can view more on PolkadotJS and its resources\n",(0,o.jsx)(t.a,{href:"https://polkadot.js.org/",children:"here"}),"."]}),"\n",(0,o.jsxs)(t.p,{children:["For other programmatic ways of interacting with these networks (including PolkadotJS), please view\nthe ",(0,o.jsx)(t.a,{href:"/docs/build-node-interaction",children:"Node Interactions page"}),"."]}),"\n",(0,o.jsx)(t.h2,{id:"testnet-faucets",children:"Testnet Faucets"}),"\n",(0,o.jsxs)(t.p,{children:["Almost all tesnets either have a web-based interface for getting test currency or a Matrix room\nwhich you can post ",(0,o.jsx)(t.code,{children:"!drip
    "})]}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.a,{href:"/docs/learn-DOT#obtaining-testnet-tokens",children:"See here for all available faucets and how to obtain testnet tokens."})})]})}function h(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(c,{...e})}):c(e)}},28453:(e,t,n)=>{n.d(t,{R:()=>s,x:()=>a});var o=n(96540);const i={},r=o.createContext(i);function s(e){const t=o.useContext(r);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:s(e.components),o.createElement(r.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/292.857c4588.js b/assets/js/292.857c4588.js deleted file mode 100644 index ecf8d5637538..000000000000 --- a/assets/js/292.857c4588.js +++ /dev/null @@ -1,2605 +0,0 @@ -"use strict"; -exports.id = 292; -exports.ids = [292]; -exports.modules = { - -/***/ 53292: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ diagram: () => (/* binding */ diagram) -/* harmony export */ }); -/* harmony import */ var _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(86079); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(26312); -/* harmony import */ var _svgDrawCommon_08f97a94_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(79186); -/* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(16750); -/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(74353); -/* harmony import */ var dompurify__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(99418); - - - - - - - - - - - - -var parser = function() { - var o = function(k, v, o2, l) { - for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) - ; - return o2; - }, $V0 = [1, 24], $V1 = [1, 25], $V2 = [1, 26], $V3 = [1, 27], $V4 = [1, 28], $V5 = [1, 63], $V6 = [1, 64], $V7 = [1, 65], $V8 = [1, 66], $V9 = [1, 67], $Va = [1, 68], $Vb = [1, 69], $Vc = [1, 29], $Vd = [1, 30], $Ve = [1, 31], $Vf = [1, 32], $Vg = [1, 33], $Vh = [1, 34], $Vi = [1, 35], $Vj = [1, 36], $Vk = [1, 37], $Vl = [1, 38], $Vm = [1, 39], $Vn = [1, 40], $Vo = [1, 41], $Vp = [1, 42], $Vq = [1, 43], $Vr = [1, 44], $Vs = [1, 45], $Vt = [1, 46], $Vu = [1, 47], $Vv = [1, 48], $Vw = [1, 50], $Vx = [1, 51], $Vy = [1, 52], $Vz = [1, 53], $VA = [1, 54], $VB = [1, 55], $VC = [1, 56], $VD = [1, 57], $VE = [1, 58], $VF = [1, 59], $VG = [1, 60], $VH = [14, 42], $VI = [14, 34, 36, 37, 38, 39, 40, 41, 42, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74], $VJ = [12, 14, 34, 36, 37, 38, 39, 40, 41, 42, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74], $VK = [1, 82], $VL = [1, 83], $VM = [1, 84], $VN = [1, 85], $VO = [12, 14, 42], $VP = [12, 14, 33, 42], $VQ = [12, 14, 33, 42, 76, 77, 79, 80], $VR = [12, 33], $VS = [34, 36, 37, 38, 39, 40, 41, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74]; - var parser2 = { - trace: function trace() { - }, - yy: {}, - symbols_: { "error": 2, "start": 3, "mermaidDoc": 4, "direction": 5, "direction_tb": 6, "direction_bt": 7, "direction_rl": 8, "direction_lr": 9, "graphConfig": 10, "C4_CONTEXT": 11, "NEWLINE": 12, "statements": 13, "EOF": 14, "C4_CONTAINER": 15, "C4_COMPONENT": 16, "C4_DYNAMIC": 17, "C4_DEPLOYMENT": 18, "otherStatements": 19, "diagramStatements": 20, "otherStatement": 21, "title": 22, "accDescription": 23, "acc_title": 24, "acc_title_value": 25, "acc_descr": 26, "acc_descr_value": 27, "acc_descr_multiline_value": 28, "boundaryStatement": 29, "boundaryStartStatement": 30, "boundaryStopStatement": 31, "boundaryStart": 32, "LBRACE": 33, "ENTERPRISE_BOUNDARY": 34, "attributes": 35, "SYSTEM_BOUNDARY": 36, "BOUNDARY": 37, "CONTAINER_BOUNDARY": 38, "NODE": 39, "NODE_L": 40, "NODE_R": 41, "RBRACE": 42, "diagramStatement": 43, "PERSON": 44, "PERSON_EXT": 45, "SYSTEM": 46, "SYSTEM_DB": 47, "SYSTEM_QUEUE": 48, "SYSTEM_EXT": 49, "SYSTEM_EXT_DB": 50, "SYSTEM_EXT_QUEUE": 51, "CONTAINER": 52, "CONTAINER_DB": 53, "CONTAINER_QUEUE": 54, "CONTAINER_EXT": 55, "CONTAINER_EXT_DB": 56, "CONTAINER_EXT_QUEUE": 57, "COMPONENT": 58, "COMPONENT_DB": 59, "COMPONENT_QUEUE": 60, "COMPONENT_EXT": 61, "COMPONENT_EXT_DB": 62, "COMPONENT_EXT_QUEUE": 63, "REL": 64, "BIREL": 65, "REL_U": 66, "REL_D": 67, "REL_L": 68, "REL_R": 69, "REL_B": 70, "REL_INDEX": 71, "UPDATE_EL_STYLE": 72, "UPDATE_REL_STYLE": 73, "UPDATE_LAYOUT_CONFIG": 74, "attribute": 75, "STR": 76, "STR_KEY": 77, "STR_VALUE": 78, "ATTRIBUTE": 79, "ATTRIBUTE_EMPTY": 80, "$accept": 0, "$end": 1 }, - terminals_: { 2: "error", 6: "direction_tb", 7: "direction_bt", 8: "direction_rl", 9: "direction_lr", 11: "C4_CONTEXT", 12: "NEWLINE", 14: "EOF", 15: "C4_CONTAINER", 16: "C4_COMPONENT", 17: "C4_DYNAMIC", 18: "C4_DEPLOYMENT", 22: "title", 23: "accDescription", 24: "acc_title", 25: "acc_title_value", 26: "acc_descr", 27: "acc_descr_value", 28: "acc_descr_multiline_value", 33: "LBRACE", 34: "ENTERPRISE_BOUNDARY", 36: "SYSTEM_BOUNDARY", 37: "BOUNDARY", 38: "CONTAINER_BOUNDARY", 39: "NODE", 40: "NODE_L", 41: "NODE_R", 42: "RBRACE", 44: "PERSON", 45: "PERSON_EXT", 46: "SYSTEM", 47: "SYSTEM_DB", 48: "SYSTEM_QUEUE", 49: "SYSTEM_EXT", 50: "SYSTEM_EXT_DB", 51: "SYSTEM_EXT_QUEUE", 52: "CONTAINER", 53: "CONTAINER_DB", 54: "CONTAINER_QUEUE", 55: "CONTAINER_EXT", 56: "CONTAINER_EXT_DB", 57: "CONTAINER_EXT_QUEUE", 58: "COMPONENT", 59: "COMPONENT_DB", 60: "COMPONENT_QUEUE", 61: "COMPONENT_EXT", 62: "COMPONENT_EXT_DB", 63: "COMPONENT_EXT_QUEUE", 64: "REL", 65: "BIREL", 66: "REL_U", 67: "REL_D", 68: "REL_L", 69: "REL_R", 70: "REL_B", 71: "REL_INDEX", 72: "UPDATE_EL_STYLE", 73: "UPDATE_REL_STYLE", 74: "UPDATE_LAYOUT_CONFIG", 76: "STR", 77: "STR_KEY", 78: "STR_VALUE", 79: "ATTRIBUTE", 80: "ATTRIBUTE_EMPTY" }, - productions_: [0, [3, 1], [3, 1], [5, 1], [5, 1], [5, 1], [5, 1], [4, 1], [10, 4], [10, 4], [10, 4], [10, 4], [10, 4], [13, 1], [13, 1], [13, 2], [19, 1], [19, 2], [19, 3], [21, 1], [21, 1], [21, 2], [21, 2], [21, 1], [29, 3], [30, 3], [30, 3], [30, 4], [32, 2], [32, 2], [32, 2], [32, 2], [32, 2], [32, 2], [32, 2], [31, 1], [20, 1], [20, 2], [20, 3], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 1], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [35, 1], [35, 2], [75, 1], [75, 2], [75, 1], [75, 1]], - performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { - var $0 = $$.length - 1; - switch (yystate) { - case 3: - yy.setDirection("TB"); - break; - case 4: - yy.setDirection("BT"); - break; - case 5: - yy.setDirection("RL"); - break; - case 6: - yy.setDirection("LR"); - break; - case 8: - case 9: - case 10: - case 11: - case 12: - yy.setC4Type($$[$0 - 3]); - break; - case 19: - yy.setTitle($$[$0].substring(6)); - this.$ = $$[$0].substring(6); - break; - case 20: - yy.setAccDescription($$[$0].substring(15)); - this.$ = $$[$0].substring(15); - break; - case 21: - this.$ = $$[$0].trim(); - yy.setTitle(this.$); - break; - case 22: - case 23: - this.$ = $$[$0].trim(); - yy.setAccDescription(this.$); - break; - case 28: - case 29: - $$[$0].splice(2, 0, "ENTERPRISE"); - yy.addPersonOrSystemBoundary(...$$[$0]); - this.$ = $$[$0]; - break; - case 30: - yy.addPersonOrSystemBoundary(...$$[$0]); - this.$ = $$[$0]; - break; - case 31: - $$[$0].splice(2, 0, "CONTAINER"); - yy.addContainerBoundary(...$$[$0]); - this.$ = $$[$0]; - break; - case 32: - yy.addDeploymentNode("node", ...$$[$0]); - this.$ = $$[$0]; - break; - case 33: - yy.addDeploymentNode("nodeL", ...$$[$0]); - this.$ = $$[$0]; - break; - case 34: - yy.addDeploymentNode("nodeR", ...$$[$0]); - this.$ = $$[$0]; - break; - case 35: - yy.popBoundaryParseStack(); - break; - case 39: - yy.addPersonOrSystem("person", ...$$[$0]); - this.$ = $$[$0]; - break; - case 40: - yy.addPersonOrSystem("external_person", ...$$[$0]); - this.$ = $$[$0]; - break; - case 41: - yy.addPersonOrSystem("system", ...$$[$0]); - this.$ = $$[$0]; - break; - case 42: - yy.addPersonOrSystem("system_db", ...$$[$0]); - this.$ = $$[$0]; - break; - case 43: - yy.addPersonOrSystem("system_queue", ...$$[$0]); - this.$ = $$[$0]; - break; - case 44: - yy.addPersonOrSystem("external_system", ...$$[$0]); - this.$ = $$[$0]; - break; - case 45: - yy.addPersonOrSystem("external_system_db", ...$$[$0]); - this.$ = $$[$0]; - break; - case 46: - yy.addPersonOrSystem("external_system_queue", ...$$[$0]); - this.$ = $$[$0]; - break; - case 47: - yy.addContainer("container", ...$$[$0]); - this.$ = $$[$0]; - break; - case 48: - yy.addContainer("container_db", ...$$[$0]); - this.$ = $$[$0]; - break; - case 49: - yy.addContainer("container_queue", ...$$[$0]); - this.$ = $$[$0]; - break; - case 50: - yy.addContainer("external_container", ...$$[$0]); - this.$ = $$[$0]; - break; - case 51: - yy.addContainer("external_container_db", ...$$[$0]); - this.$ = $$[$0]; - break; - case 52: - yy.addContainer("external_container_queue", ...$$[$0]); - this.$ = $$[$0]; - break; - case 53: - yy.addComponent("component", ...$$[$0]); - this.$ = $$[$0]; - break; - case 54: - yy.addComponent("component_db", ...$$[$0]); - this.$ = $$[$0]; - break; - case 55: - yy.addComponent("component_queue", ...$$[$0]); - this.$ = $$[$0]; - break; - case 56: - yy.addComponent("external_component", ...$$[$0]); - this.$ = $$[$0]; - break; - case 57: - yy.addComponent("external_component_db", ...$$[$0]); - this.$ = $$[$0]; - break; - case 58: - yy.addComponent("external_component_queue", ...$$[$0]); - this.$ = $$[$0]; - break; - case 60: - yy.addRel("rel", ...$$[$0]); - this.$ = $$[$0]; - break; - case 61: - yy.addRel("birel", ...$$[$0]); - this.$ = $$[$0]; - break; - case 62: - yy.addRel("rel_u", ...$$[$0]); - this.$ = $$[$0]; - break; - case 63: - yy.addRel("rel_d", ...$$[$0]); - this.$ = $$[$0]; - break; - case 64: - yy.addRel("rel_l", ...$$[$0]); - this.$ = $$[$0]; - break; - case 65: - yy.addRel("rel_r", ...$$[$0]); - this.$ = $$[$0]; - break; - case 66: - yy.addRel("rel_b", ...$$[$0]); - this.$ = $$[$0]; - break; - case 67: - $$[$0].splice(0, 1); - yy.addRel("rel", ...$$[$0]); - this.$ = $$[$0]; - break; - case 68: - yy.updateElStyle("update_el_style", ...$$[$0]); - this.$ = $$[$0]; - break; - case 69: - yy.updateRelStyle("update_rel_style", ...$$[$0]); - this.$ = $$[$0]; - break; - case 70: - yy.updateLayoutConfig("update_layout_config", ...$$[$0]); - this.$ = $$[$0]; - break; - case 71: - this.$ = [$$[$0]]; - break; - case 72: - $$[$0].unshift($$[$0 - 1]); - this.$ = $$[$0]; - break; - case 73: - case 75: - this.$ = $$[$0].trim(); - break; - case 74: - let kv = {}; - kv[$$[$0 - 1].trim()] = $$[$0].trim(); - this.$ = kv; - break; - case 76: - this.$ = ""; - break; - } - }, - table: [{ 3: 1, 4: 2, 5: 3, 6: [1, 5], 7: [1, 6], 8: [1, 7], 9: [1, 8], 10: 4, 11: [1, 9], 15: [1, 10], 16: [1, 11], 17: [1, 12], 18: [1, 13] }, { 1: [3] }, { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 7] }, { 1: [2, 3] }, { 1: [2, 4] }, { 1: [2, 5] }, { 1: [2, 6] }, { 12: [1, 14] }, { 12: [1, 15] }, { 12: [1, 16] }, { 12: [1, 17] }, { 12: [1, 18] }, { 13: 19, 19: 20, 20: 21, 21: 22, 22: $V0, 23: $V1, 24: $V2, 26: $V3, 28: $V4, 29: 49, 30: 61, 32: 62, 34: $V5, 36: $V6, 37: $V7, 38: $V8, 39: $V9, 40: $Va, 41: $Vb, 43: 23, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi, 51: $Vj, 52: $Vk, 53: $Vl, 54: $Vm, 55: $Vn, 56: $Vo, 57: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz, 68: $VA, 69: $VB, 70: $VC, 71: $VD, 72: $VE, 73: $VF, 74: $VG }, { 13: 70, 19: 20, 20: 21, 21: 22, 22: $V0, 23: $V1, 24: $V2, 26: $V3, 28: $V4, 29: 49, 30: 61, 32: 62, 34: $V5, 36: $V6, 37: $V7, 38: $V8, 39: $V9, 40: $Va, 41: $Vb, 43: 23, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi, 51: $Vj, 52: $Vk, 53: $Vl, 54: $Vm, 55: $Vn, 56: $Vo, 57: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz, 68: $VA, 69: $VB, 70: $VC, 71: $VD, 72: $VE, 73: $VF, 74: $VG }, { 13: 71, 19: 20, 20: 21, 21: 22, 22: $V0, 23: $V1, 24: $V2, 26: $V3, 28: $V4, 29: 49, 30: 61, 32: 62, 34: $V5, 36: $V6, 37: $V7, 38: $V8, 39: $V9, 40: $Va, 41: $Vb, 43: 23, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi, 51: $Vj, 52: $Vk, 53: $Vl, 54: $Vm, 55: $Vn, 56: $Vo, 57: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz, 68: $VA, 69: $VB, 70: $VC, 71: $VD, 72: $VE, 73: $VF, 74: $VG }, { 13: 72, 19: 20, 20: 21, 21: 22, 22: $V0, 23: $V1, 24: $V2, 26: $V3, 28: $V4, 29: 49, 30: 61, 32: 62, 34: $V5, 36: $V6, 37: $V7, 38: $V8, 39: $V9, 40: $Va, 41: $Vb, 43: 23, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi, 51: $Vj, 52: $Vk, 53: $Vl, 54: $Vm, 55: $Vn, 56: $Vo, 57: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz, 68: $VA, 69: $VB, 70: $VC, 71: $VD, 72: $VE, 73: $VF, 74: $VG }, { 13: 73, 19: 20, 20: 21, 21: 22, 22: $V0, 23: $V1, 24: $V2, 26: $V3, 28: $V4, 29: 49, 30: 61, 32: 62, 34: $V5, 36: $V6, 37: $V7, 38: $V8, 39: $V9, 40: $Va, 41: $Vb, 43: 23, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi, 51: $Vj, 52: $Vk, 53: $Vl, 54: $Vm, 55: $Vn, 56: $Vo, 57: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz, 68: $VA, 69: $VB, 70: $VC, 71: $VD, 72: $VE, 73: $VF, 74: $VG }, { 14: [1, 74] }, o($VH, [2, 13], { 43: 23, 29: 49, 30: 61, 32: 62, 20: 75, 34: $V5, 36: $V6, 37: $V7, 38: $V8, 39: $V9, 40: $Va, 41: $Vb, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi, 51: $Vj, 52: $Vk, 53: $Vl, 54: $Vm, 55: $Vn, 56: $Vo, 57: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz, 68: $VA, 69: $VB, 70: $VC, 71: $VD, 72: $VE, 73: $VF, 74: $VG }), o($VH, [2, 14]), o($VI, [2, 16], { 12: [1, 76] }), o($VH, [2, 36], { 12: [1, 77] }), o($VJ, [2, 19]), o($VJ, [2, 20]), { 25: [1, 78] }, { 27: [1, 79] }, o($VJ, [2, 23]), { 35: 80, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 86, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 87, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 88, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 89, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 90, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 91, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 92, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 93, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 94, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 95, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 96, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 97, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 98, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 99, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 100, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 101, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 102, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 103, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 104, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, o($VO, [2, 59]), { 35: 105, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 106, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 107, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 108, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 109, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 110, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 111, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 112, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 113, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 114, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 115, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 20: 116, 29: 49, 30: 61, 32: 62, 34: $V5, 36: $V6, 37: $V7, 38: $V8, 39: $V9, 40: $Va, 41: $Vb, 43: 23, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi, 51: $Vj, 52: $Vk, 53: $Vl, 54: $Vm, 55: $Vn, 56: $Vo, 57: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz, 68: $VA, 69: $VB, 70: $VC, 71: $VD, 72: $VE, 73: $VF, 74: $VG }, { 12: [1, 118], 33: [1, 117] }, { 35: 119, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 120, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 121, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 122, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 123, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 124, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 125, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 14: [1, 126] }, { 14: [1, 127] }, { 14: [1, 128] }, { 14: [1, 129] }, { 1: [2, 8] }, o($VH, [2, 15]), o($VI, [2, 17], { 21: 22, 19: 130, 22: $V0, 23: $V1, 24: $V2, 26: $V3, 28: $V4 }), o($VH, [2, 37], { 19: 20, 20: 21, 21: 22, 43: 23, 29: 49, 30: 61, 32: 62, 13: 131, 22: $V0, 23: $V1, 24: $V2, 26: $V3, 28: $V4, 34: $V5, 36: $V6, 37: $V7, 38: $V8, 39: $V9, 40: $Va, 41: $Vb, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi, 51: $Vj, 52: $Vk, 53: $Vl, 54: $Vm, 55: $Vn, 56: $Vo, 57: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz, 68: $VA, 69: $VB, 70: $VC, 71: $VD, 72: $VE, 73: $VF, 74: $VG }), o($VJ, [2, 21]), o($VJ, [2, 22]), o($VO, [2, 39]), o($VP, [2, 71], { 75: 81, 35: 132, 76: $VK, 77: $VL, 79: $VM, 80: $VN }), o($VQ, [2, 73]), { 78: [1, 133] }, o($VQ, [2, 75]), o($VQ, [2, 76]), o($VO, [2, 40]), o($VO, [2, 41]), o($VO, [2, 42]), o($VO, [2, 43]), o($VO, [2, 44]), o($VO, [2, 45]), o($VO, [2, 46]), o($VO, [2, 47]), o($VO, [2, 48]), o($VO, [2, 49]), o($VO, [2, 50]), o($VO, [2, 51]), o($VO, [2, 52]), o($VO, [2, 53]), o($VO, [2, 54]), o($VO, [2, 55]), o($VO, [2, 56]), o($VO, [2, 57]), o($VO, [2, 58]), o($VO, [2, 60]), o($VO, [2, 61]), o($VO, [2, 62]), o($VO, [2, 63]), o($VO, [2, 64]), o($VO, [2, 65]), o($VO, [2, 66]), o($VO, [2, 67]), o($VO, [2, 68]), o($VO, [2, 69]), o($VO, [2, 70]), { 31: 134, 42: [1, 135] }, { 12: [1, 136] }, { 33: [1, 137] }, o($VR, [2, 28]), o($VR, [2, 29]), o($VR, [2, 30]), o($VR, [2, 31]), o($VR, [2, 32]), o($VR, [2, 33]), o($VR, [2, 34]), { 1: [2, 9] }, { 1: [2, 10] }, { 1: [2, 11] }, { 1: [2, 12] }, o($VI, [2, 18]), o($VH, [2, 38]), o($VP, [2, 72]), o($VQ, [2, 74]), o($VO, [2, 24]), o($VO, [2, 35]), o($VS, [2, 25]), o($VS, [2, 26], { 12: [1, 138] }), o($VS, [2, 27])], - defaultActions: { 2: [2, 1], 3: [2, 2], 4: [2, 7], 5: [2, 3], 6: [2, 4], 7: [2, 5], 8: [2, 6], 74: [2, 8], 126: [2, 9], 127: [2, 10], 128: [2, 11], 129: [2, 12] }, - parseError: function parseError(str, hash) { - if (hash.recoverable) { - this.trace(str); - } else { - var error = new Error(str); - error.hash = hash; - throw error; - } - }, - parse: function parse(input) { - var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; - var args = lstack.slice.call(arguments, 1); - var lexer2 = Object.create(this.lexer); - var sharedState = { yy: {} }; - for (var k in this.yy) { - if (Object.prototype.hasOwnProperty.call(this.yy, k)) { - sharedState.yy[k] = this.yy[k]; - } - } - lexer2.setInput(input, sharedState.yy); - sharedState.yy.lexer = lexer2; - sharedState.yy.parser = this; - if (typeof lexer2.yylloc == "undefined") { - lexer2.yylloc = {}; - } - var yyloc = lexer2.yylloc; - lstack.push(yyloc); - var ranges = lexer2.options && lexer2.options.ranges; - if (typeof sharedState.yy.parseError === "function") { - this.parseError = sharedState.yy.parseError; - } else { - this.parseError = Object.getPrototypeOf(this).parseError; - } - function lex() { - var token; - token = tstack.pop() || lexer2.lex() || EOF; - if (typeof token !== "number") { - if (token instanceof Array) { - tstack = token; - token = tstack.pop(); - } - token = self.symbols_[token] || token; - } - return token; - } - var symbol, state, action, r, yyval = {}, p, len, newState, expected; - while (true) { - state = stack[stack.length - 1]; - if (this.defaultActions[state]) { - action = this.defaultActions[state]; - } else { - if (symbol === null || typeof symbol == "undefined") { - symbol = lex(); - } - action = table[state] && table[state][symbol]; - } - if (typeof action === "undefined" || !action.length || !action[0]) { - var errStr = ""; - expected = []; - for (p in table[state]) { - if (this.terminals_[p] && p > TERROR) { - expected.push("'" + this.terminals_[p] + "'"); - } - } - if (lexer2.showPosition) { - errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; - } else { - errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); - } - this.parseError(errStr, { - text: lexer2.match, - token: this.terminals_[symbol] || symbol, - line: lexer2.yylineno, - loc: yyloc, - expected - }); - } - if (action[0] instanceof Array && action.length > 1) { - throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); - } - switch (action[0]) { - case 1: - stack.push(symbol); - vstack.push(lexer2.yytext); - lstack.push(lexer2.yylloc); - stack.push(action[1]); - symbol = null; - { - yyleng = lexer2.yyleng; - yytext = lexer2.yytext; - yylineno = lexer2.yylineno; - yyloc = lexer2.yylloc; - } - break; - case 2: - len = this.productions_[action[1]][1]; - yyval.$ = vstack[vstack.length - len]; - yyval._$ = { - first_line: lstack[lstack.length - (len || 1)].first_line, - last_line: lstack[lstack.length - 1].last_line, - first_column: lstack[lstack.length - (len || 1)].first_column, - last_column: lstack[lstack.length - 1].last_column - }; - if (ranges) { - yyval._$.range = [ - lstack[lstack.length - (len || 1)].range[0], - lstack[lstack.length - 1].range[1] - ]; - } - r = this.performAction.apply(yyval, [ - yytext, - yyleng, - yylineno, - sharedState.yy, - action[1], - vstack, - lstack - ].concat(args)); - if (typeof r !== "undefined") { - return r; - } - if (len) { - stack = stack.slice(0, -1 * len * 2); - vstack = vstack.slice(0, -1 * len); - lstack = lstack.slice(0, -1 * len); - } - stack.push(this.productions_[action[1]][0]); - vstack.push(yyval.$); - lstack.push(yyval._$); - newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; - stack.push(newState); - break; - case 3: - return true; - } - } - return true; - } - }; - var lexer = function() { - var lexer2 = { - EOF: 1, - parseError: function parseError(str, hash) { - if (this.yy.parser) { - this.yy.parser.parseError(str, hash); - } else { - throw new Error(str); - } - }, - // resets the lexer, sets new input - setInput: function(input, yy) { - this.yy = yy || this.yy || {}; - this._input = input; - this._more = this._backtrack = this.done = false; - this.yylineno = this.yyleng = 0; - this.yytext = this.matched = this.match = ""; - this.conditionStack = ["INITIAL"]; - this.yylloc = { - first_line: 1, - first_column: 0, - last_line: 1, - last_column: 0 - }; - if (this.options.ranges) { - this.yylloc.range = [0, 0]; - } - this.offset = 0; - return this; - }, - // consumes and returns one char from the input - input: function() { - var ch = this._input[0]; - this.yytext += ch; - this.yyleng++; - this.offset++; - this.match += ch; - this.matched += ch; - var lines = ch.match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno++; - this.yylloc.last_line++; - } else { - this.yylloc.last_column++; - } - if (this.options.ranges) { - this.yylloc.range[1]++; - } - this._input = this._input.slice(1); - return ch; - }, - // unshifts one char (or a string) into the input - unput: function(ch) { - var len = ch.length; - var lines = ch.split(/(?:\r\n?|\n)/g); - this._input = ch + this._input; - this.yytext = this.yytext.substr(0, this.yytext.length - len); - this.offset -= len; - var oldLines = this.match.split(/(?:\r\n?|\n)/g); - this.match = this.match.substr(0, this.match.length - 1); - this.matched = this.matched.substr(0, this.matched.length - 1); - if (lines.length - 1) { - this.yylineno -= lines.length - 1; - } - var r = this.yylloc.range; - this.yylloc = { - first_line: this.yylloc.first_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.first_column, - last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len - }; - if (this.options.ranges) { - this.yylloc.range = [r[0], r[0] + this.yyleng - len]; - } - this.yyleng = this.yytext.length; - return this; - }, - // When called from action, caches matched text and appends it on next action - more: function() { - this._more = true; - return this; - }, - // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. - reject: function() { - if (this.options.backtrack_lexer) { - this._backtrack = true; - } else { - return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), { - text: "", - token: null, - line: this.yylineno - }); - } - return this; - }, - // retain first n characters of the match - less: function(n) { - this.unput(this.match.slice(n)); - }, - // displays already matched input, i.e. for error messages - pastInput: function() { - var past = this.matched.substr(0, this.matched.length - this.match.length); - return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); - }, - // displays upcoming input, i.e. for error messages - upcomingInput: function() { - var next = this.match; - if (next.length < 20) { - next += this._input.substr(0, 20 - next.length); - } - return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); - }, - // displays the character position where the lexing error occurred, i.e. for error messages - showPosition: function() { - var pre = this.pastInput(); - var c2 = new Array(pre.length + 1).join("-"); - return pre + this.upcomingInput() + "\n" + c2 + "^"; - }, - // test the lexed token: return FALSE when not a match, otherwise return token - test_match: function(match, indexed_rule) { - var token, lines, backup; - if (this.options.backtrack_lexer) { - backup = { - yylineno: this.yylineno, - yylloc: { - first_line: this.yylloc.first_line, - last_line: this.last_line, - first_column: this.yylloc.first_column, - last_column: this.yylloc.last_column - }, - yytext: this.yytext, - match: this.match, - matches: this.matches, - matched: this.matched, - yyleng: this.yyleng, - offset: this.offset, - _more: this._more, - _input: this._input, - yy: this.yy, - conditionStack: this.conditionStack.slice(0), - done: this.done - }; - if (this.options.ranges) { - backup.yylloc.range = this.yylloc.range.slice(0); - } - } - lines = match[0].match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno += lines.length; - } - this.yylloc = { - first_line: this.yylloc.last_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.last_column, - last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length - }; - this.yytext += match[0]; - this.match += match[0]; - this.matches = match; - this.yyleng = this.yytext.length; - if (this.options.ranges) { - this.yylloc.range = [this.offset, this.offset += this.yyleng]; - } - this._more = false; - this._backtrack = false; - this._input = this._input.slice(match[0].length); - this.matched += match[0]; - token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); - if (this.done && this._input) { - this.done = false; - } - if (token) { - return token; - } else if (this._backtrack) { - for (var k in backup) { - this[k] = backup[k]; - } - return false; - } - return false; - }, - // return next match in input - next: function() { - if (this.done) { - return this.EOF; - } - if (!this._input) { - this.done = true; - } - var token, match, tempMatch, index; - if (!this._more) { - this.yytext = ""; - this.match = ""; - } - var rules = this._currentRules(); - for (var i = 0; i < rules.length; i++) { - tempMatch = this._input.match(this.rules[rules[i]]); - if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { - match = tempMatch; - index = i; - if (this.options.backtrack_lexer) { - token = this.test_match(tempMatch, rules[i]); - if (token !== false) { - return token; - } else if (this._backtrack) { - match = false; - continue; - } else { - return false; - } - } else if (!this.options.flex) { - break; - } - } - } - if (match) { - token = this.test_match(match, rules[index]); - if (token !== false) { - return token; - } - return false; - } - if (this._input === "") { - return this.EOF; - } else { - return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { - text: "", - token: null, - line: this.yylineno - }); - } - }, - // return next match that has a token - lex: function lex() { - var r = this.next(); - if (r) { - return r; - } else { - return this.lex(); - } - }, - // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) - begin: function begin(condition) { - this.conditionStack.push(condition); - }, - // pop the previously active lexer condition state off the condition stack - popState: function popState() { - var n = this.conditionStack.length - 1; - if (n > 0) { - return this.conditionStack.pop(); - } else { - return this.conditionStack[0]; - } - }, - // produce the lexer rule set which is active for the currently active lexer condition state - _currentRules: function _currentRules() { - if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { - return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; - } else { - return this.conditions["INITIAL"].rules; - } - }, - // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available - topState: function topState(n) { - n = this.conditionStack.length - 1 - Math.abs(n || 0); - if (n >= 0) { - return this.conditionStack[n]; - } else { - return "INITIAL"; - } - }, - // alias for begin(condition) - pushState: function pushState(condition) { - this.begin(condition); - }, - // return the number of states currently on the stack - stateStackSize: function stateStackSize() { - return this.conditionStack.length; - }, - options: {}, - performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { - switch ($avoiding_name_collisions) { - case 0: - return 6; - case 1: - return 7; - case 2: - return 8; - case 3: - return 9; - case 4: - return 22; - case 5: - return 23; - case 6: - this.begin("acc_title"); - return 24; - case 7: - this.popState(); - return "acc_title_value"; - case 8: - this.begin("acc_descr"); - return 26; - case 9: - this.popState(); - return "acc_descr_value"; - case 10: - this.begin("acc_descr_multiline"); - break; - case 11: - this.popState(); - break; - case 12: - return "acc_descr_multiline_value"; - case 13: - break; - case 14: - c; - break; - case 15: - return 12; - case 16: - break; - case 17: - return 11; - case 18: - return 15; - case 19: - return 16; - case 20: - return 17; - case 21: - return 18; - case 22: - this.begin("person_ext"); - return 45; - case 23: - this.begin("person"); - return 44; - case 24: - this.begin("system_ext_queue"); - return 51; - case 25: - this.begin("system_ext_db"); - return 50; - case 26: - this.begin("system_ext"); - return 49; - case 27: - this.begin("system_queue"); - return 48; - case 28: - this.begin("system_db"); - return 47; - case 29: - this.begin("system"); - return 46; - case 30: - this.begin("boundary"); - return 37; - case 31: - this.begin("enterprise_boundary"); - return 34; - case 32: - this.begin("system_boundary"); - return 36; - case 33: - this.begin("container_ext_queue"); - return 57; - case 34: - this.begin("container_ext_db"); - return 56; - case 35: - this.begin("container_ext"); - return 55; - case 36: - this.begin("container_queue"); - return 54; - case 37: - this.begin("container_db"); - return 53; - case 38: - this.begin("container"); - return 52; - case 39: - this.begin("container_boundary"); - return 38; - case 40: - this.begin("component_ext_queue"); - return 63; - case 41: - this.begin("component_ext_db"); - return 62; - case 42: - this.begin("component_ext"); - return 61; - case 43: - this.begin("component_queue"); - return 60; - case 44: - this.begin("component_db"); - return 59; - case 45: - this.begin("component"); - return 58; - case 46: - this.begin("node"); - return 39; - case 47: - this.begin("node"); - return 39; - case 48: - this.begin("node_l"); - return 40; - case 49: - this.begin("node_r"); - return 41; - case 50: - this.begin("rel"); - return 64; - case 51: - this.begin("birel"); - return 65; - case 52: - this.begin("rel_u"); - return 66; - case 53: - this.begin("rel_u"); - return 66; - case 54: - this.begin("rel_d"); - return 67; - case 55: - this.begin("rel_d"); - return 67; - case 56: - this.begin("rel_l"); - return 68; - case 57: - this.begin("rel_l"); - return 68; - case 58: - this.begin("rel_r"); - return 69; - case 59: - this.begin("rel_r"); - return 69; - case 60: - this.begin("rel_b"); - return 70; - case 61: - this.begin("rel_index"); - return 71; - case 62: - this.begin("update_el_style"); - return 72; - case 63: - this.begin("update_rel_style"); - return 73; - case 64: - this.begin("update_layout_config"); - return 74; - case 65: - return "EOF_IN_STRUCT"; - case 66: - this.begin("attribute"); - return "ATTRIBUTE_EMPTY"; - case 67: - this.begin("attribute"); - break; - case 68: - this.popState(); - this.popState(); - break; - case 69: - return 80; - case 70: - break; - case 71: - return 80; - case 72: - this.begin("string"); - break; - case 73: - this.popState(); - break; - case 74: - return "STR"; - case 75: - this.begin("string_kv"); - break; - case 76: - this.begin("string_kv_key"); - return "STR_KEY"; - case 77: - this.popState(); - this.begin("string_kv_value"); - break; - case 78: - return "STR_VALUE"; - case 79: - this.popState(); - this.popState(); - break; - case 80: - return "STR"; - case 81: - return "LBRACE"; - case 82: - return "RBRACE"; - case 83: - return "SPACE"; - case 84: - return "EOL"; - case 85: - return 14; - } - }, - rules: [/^(?:.*direction\s+TB[^\n]*)/, /^(?:.*direction\s+BT[^\n]*)/, /^(?:.*direction\s+RL[^\n]*)/, /^(?:.*direction\s+LR[^\n]*)/, /^(?:title\s[^#\n;]+)/, /^(?:accDescription\s[^#\n;]+)/, /^(?:accTitle\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*\{\s*)/, /^(?:[\}])/, /^(?:[^\}]*)/, /^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/, /^(?:%%[^\n]*(\r?\n)*)/, /^(?:\s*(\r?\n)+)/, /^(?:\s+)/, /^(?:C4Context\b)/, /^(?:C4Container\b)/, /^(?:C4Component\b)/, /^(?:C4Dynamic\b)/, /^(?:C4Deployment\b)/, /^(?:Person_Ext\b)/, /^(?:Person\b)/, /^(?:SystemQueue_Ext\b)/, /^(?:SystemDb_Ext\b)/, /^(?:System_Ext\b)/, /^(?:SystemQueue\b)/, /^(?:SystemDb\b)/, /^(?:System\b)/, /^(?:Boundary\b)/, /^(?:Enterprise_Boundary\b)/, /^(?:System_Boundary\b)/, /^(?:ContainerQueue_Ext\b)/, /^(?:ContainerDb_Ext\b)/, /^(?:Container_Ext\b)/, /^(?:ContainerQueue\b)/, /^(?:ContainerDb\b)/, /^(?:Container\b)/, /^(?:Container_Boundary\b)/, /^(?:ComponentQueue_Ext\b)/, /^(?:ComponentDb_Ext\b)/, /^(?:Component_Ext\b)/, /^(?:ComponentQueue\b)/, /^(?:ComponentDb\b)/, /^(?:Component\b)/, /^(?:Deployment_Node\b)/, /^(?:Node\b)/, /^(?:Node_L\b)/, /^(?:Node_R\b)/, /^(?:Rel\b)/, /^(?:BiRel\b)/, /^(?:Rel_Up\b)/, /^(?:Rel_U\b)/, /^(?:Rel_Down\b)/, /^(?:Rel_D\b)/, /^(?:Rel_Left\b)/, /^(?:Rel_L\b)/, /^(?:Rel_Right\b)/, /^(?:Rel_R\b)/, /^(?:Rel_Back\b)/, /^(?:RelIndex\b)/, /^(?:UpdateElementStyle\b)/, /^(?:UpdateRelStyle\b)/, /^(?:UpdateLayoutConfig\b)/, /^(?:$)/, /^(?:[(][ ]*[,])/, /^(?:[(])/, /^(?:[)])/, /^(?:,,)/, /^(?:,)/, /^(?:[ ]*["]["])/, /^(?:[ ]*["])/, /^(?:["])/, /^(?:[^"]*)/, /^(?:[ ]*[\$])/, /^(?:[^=]*)/, /^(?:[=][ ]*["])/, /^(?:[^"]+)/, /^(?:["])/, /^(?:[^,]+)/, /^(?:\{)/, /^(?:\})/, /^(?:[\s]+)/, /^(?:[\n\r]+)/, /^(?:$)/], - conditions: { "acc_descr_multiline": { "rules": [11, 12], "inclusive": false }, "acc_descr": { "rules": [9], "inclusive": false }, "acc_title": { "rules": [7], "inclusive": false }, "string_kv_value": { "rules": [78, 79], "inclusive": false }, "string_kv_key": { "rules": [77], "inclusive": false }, "string_kv": { "rules": [76], "inclusive": false }, "string": { "rules": [73, 74], "inclusive": false }, "attribute": { "rules": [68, 69, 70, 71, 72, 75, 80], "inclusive": false }, "update_layout_config": { "rules": [65, 66, 67, 68], "inclusive": false }, "update_rel_style": { "rules": [65, 66, 67, 68], "inclusive": false }, "update_el_style": { "rules": [65, 66, 67, 68], "inclusive": false }, "rel_b": { "rules": [65, 66, 67, 68], "inclusive": false }, "rel_r": { "rules": [65, 66, 67, 68], "inclusive": false }, "rel_l": { "rules": [65, 66, 67, 68], "inclusive": false }, "rel_d": { "rules": [65, 66, 67, 68], "inclusive": false }, "rel_u": { "rules": [65, 66, 67, 68], "inclusive": false }, "rel_bi": { "rules": [], "inclusive": false }, "rel": { "rules": [65, 66, 67, 68], "inclusive": false }, "node_r": { "rules": [65, 66, 67, 68], "inclusive": false }, "node_l": { "rules": [65, 66, 67, 68], "inclusive": false }, "node": { "rules": [65, 66, 67, 68], "inclusive": false }, "index": { "rules": [], "inclusive": false }, "rel_index": { "rules": [65, 66, 67, 68], "inclusive": false }, "component_ext_queue": { "rules": [], "inclusive": false }, "component_ext_db": { "rules": [65, 66, 67, 68], "inclusive": false }, "component_ext": { "rules": [65, 66, 67, 68], "inclusive": false }, "component_queue": { "rules": [65, 66, 67, 68], "inclusive": false }, "component_db": { "rules": [65, 66, 67, 68], "inclusive": false }, "component": { "rules": [65, 66, 67, 68], "inclusive": false }, "container_boundary": { "rules": [65, 66, 67, 68], "inclusive": false }, "container_ext_queue": { "rules": [65, 66, 67, 68], "inclusive": false }, "container_ext_db": { "rules": [65, 66, 67, 68], "inclusive": false }, "container_ext": { "rules": [65, 66, 67, 68], "inclusive": false }, "container_queue": { "rules": [65, 66, 67, 68], "inclusive": false }, "container_db": { "rules": [65, 66, 67, 68], "inclusive": false }, "container": { "rules": [65, 66, 67, 68], "inclusive": false }, "birel": { "rules": [65, 66, 67, 68], "inclusive": false }, "system_boundary": { "rules": [65, 66, 67, 68], "inclusive": false }, "enterprise_boundary": { "rules": [65, 66, 67, 68], "inclusive": false }, "boundary": { "rules": [65, 66, 67, 68], "inclusive": false }, "system_ext_queue": { "rules": [65, 66, 67, 68], "inclusive": false }, "system_ext_db": { "rules": [65, 66, 67, 68], "inclusive": false }, "system_ext": { "rules": [65, 66, 67, 68], "inclusive": false }, "system_queue": { "rules": [65, 66, 67, 68], "inclusive": false }, "system_db": { "rules": [65, 66, 67, 68], "inclusive": false }, "system": { "rules": [65, 66, 67, 68], "inclusive": false }, "person_ext": { "rules": [65, 66, 67, 68], "inclusive": false }, "person": { "rules": [65, 66, 67, 68], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 3, 4, 5, 6, 8, 10, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 81, 82, 83, 84, 85], "inclusive": true } } - }; - return lexer2; - }(); - parser2.lexer = lexer; - function Parser() { - this.yy = {}; - } - Parser.prototype = parser2; - parser2.Parser = Parser; - return new Parser(); -}(); -parser.parser = parser; -const parser$1 = parser; -let c4ShapeArray = []; -let boundaryParseStack = [""]; -let currentBoundaryParse = "global"; -let parentBoundaryParse = ""; -let boundaries = [ - { - alias: "global", - label: { text: "global" }, - type: { text: "global" }, - tags: null, - link: null, - parentBoundary: "" - } -]; -let rels = []; -let title = ""; -let wrapEnabled = false; -let c4ShapeInRow$1 = 4; -let c4BoundaryInRow$1 = 2; -var c4Type; -const getC4Type = function() { - return c4Type; -}; -const setC4Type = function(c4TypeParam) { - let sanitizedText = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.d)(c4TypeParam, (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.c)()); - c4Type = sanitizedText; -}; -const addRel = function(type, from, to, label, techn, descr, sprite, tags, link) { - if (type === void 0 || type === null || from === void 0 || from === null || to === void 0 || to === null || label === void 0 || label === null) { - return; - } - let rel = {}; - const old = rels.find((rel2) => rel2.from === from && rel2.to === to); - if (old) { - rel = old; - } else { - rels.push(rel); - } - rel.type = type; - rel.from = from; - rel.to = to; - rel.label = { text: label }; - if (techn === void 0 || techn === null) { - rel.techn = { text: "" }; - } else { - if (typeof techn === "object") { - let [key, value] = Object.entries(techn)[0]; - rel[key] = { text: value }; - } else { - rel.techn = { text: techn }; - } - } - if (descr === void 0 || descr === null) { - rel.descr = { text: "" }; - } else { - if (typeof descr === "object") { - let [key, value] = Object.entries(descr)[0]; - rel[key] = { text: value }; - } else { - rel.descr = { text: descr }; - } - } - if (typeof sprite === "object") { - let [key, value] = Object.entries(sprite)[0]; - rel[key] = value; - } else { - rel.sprite = sprite; - } - if (typeof tags === "object") { - let [key, value] = Object.entries(tags)[0]; - rel[key] = value; - } else { - rel.tags = tags; - } - if (typeof link === "object") { - let [key, value] = Object.entries(link)[0]; - rel[key] = value; - } else { - rel.link = link; - } - rel.wrap = autoWrap(); -}; -const addPersonOrSystem = function(typeC4Shape, alias, label, descr, sprite, tags, link) { - if (alias === null || label === null) { - return; - } - let personOrSystem = {}; - const old = c4ShapeArray.find((personOrSystem2) => personOrSystem2.alias === alias); - if (old && alias === old.alias) { - personOrSystem = old; - } else { - personOrSystem.alias = alias; - c4ShapeArray.push(personOrSystem); - } - if (label === void 0 || label === null) { - personOrSystem.label = { text: "" }; - } else { - personOrSystem.label = { text: label }; - } - if (descr === void 0 || descr === null) { - personOrSystem.descr = { text: "" }; - } else { - if (typeof descr === "object") { - let [key, value] = Object.entries(descr)[0]; - personOrSystem[key] = { text: value }; - } else { - personOrSystem.descr = { text: descr }; - } - } - if (typeof sprite === "object") { - let [key, value] = Object.entries(sprite)[0]; - personOrSystem[key] = value; - } else { - personOrSystem.sprite = sprite; - } - if (typeof tags === "object") { - let [key, value] = Object.entries(tags)[0]; - personOrSystem[key] = value; - } else { - personOrSystem.tags = tags; - } - if (typeof link === "object") { - let [key, value] = Object.entries(link)[0]; - personOrSystem[key] = value; - } else { - personOrSystem.link = link; - } - personOrSystem.typeC4Shape = { text: typeC4Shape }; - personOrSystem.parentBoundary = currentBoundaryParse; - personOrSystem.wrap = autoWrap(); -}; -const addContainer = function(typeC4Shape, alias, label, techn, descr, sprite, tags, link) { - if (alias === null || label === null) { - return; - } - let container = {}; - const old = c4ShapeArray.find((container2) => container2.alias === alias); - if (old && alias === old.alias) { - container = old; - } else { - container.alias = alias; - c4ShapeArray.push(container); - } - if (label === void 0 || label === null) { - container.label = { text: "" }; - } else { - container.label = { text: label }; - } - if (techn === void 0 || techn === null) { - container.techn = { text: "" }; - } else { - if (typeof techn === "object") { - let [key, value] = Object.entries(techn)[0]; - container[key] = { text: value }; - } else { - container.techn = { text: techn }; - } - } - if (descr === void 0 || descr === null) { - container.descr = { text: "" }; - } else { - if (typeof descr === "object") { - let [key, value] = Object.entries(descr)[0]; - container[key] = { text: value }; - } else { - container.descr = { text: descr }; - } - } - if (typeof sprite === "object") { - let [key, value] = Object.entries(sprite)[0]; - container[key] = value; - } else { - container.sprite = sprite; - } - if (typeof tags === "object") { - let [key, value] = Object.entries(tags)[0]; - container[key] = value; - } else { - container.tags = tags; - } - if (typeof link === "object") { - let [key, value] = Object.entries(link)[0]; - container[key] = value; - } else { - container.link = link; - } - container.wrap = autoWrap(); - container.typeC4Shape = { text: typeC4Shape }; - container.parentBoundary = currentBoundaryParse; -}; -const addComponent = function(typeC4Shape, alias, label, techn, descr, sprite, tags, link) { - if (alias === null || label === null) { - return; - } - let component = {}; - const old = c4ShapeArray.find((component2) => component2.alias === alias); - if (old && alias === old.alias) { - component = old; - } else { - component.alias = alias; - c4ShapeArray.push(component); - } - if (label === void 0 || label === null) { - component.label = { text: "" }; - } else { - component.label = { text: label }; - } - if (techn === void 0 || techn === null) { - component.techn = { text: "" }; - } else { - if (typeof techn === "object") { - let [key, value] = Object.entries(techn)[0]; - component[key] = { text: value }; - } else { - component.techn = { text: techn }; - } - } - if (descr === void 0 || descr === null) { - component.descr = { text: "" }; - } else { - if (typeof descr === "object") { - let [key, value] = Object.entries(descr)[0]; - component[key] = { text: value }; - } else { - component.descr = { text: descr }; - } - } - if (typeof sprite === "object") { - let [key, value] = Object.entries(sprite)[0]; - component[key] = value; - } else { - component.sprite = sprite; - } - if (typeof tags === "object") { - let [key, value] = Object.entries(tags)[0]; - component[key] = value; - } else { - component.tags = tags; - } - if (typeof link === "object") { - let [key, value] = Object.entries(link)[0]; - component[key] = value; - } else { - component.link = link; - } - component.wrap = autoWrap(); - component.typeC4Shape = { text: typeC4Shape }; - component.parentBoundary = currentBoundaryParse; -}; -const addPersonOrSystemBoundary = function(alias, label, type, tags, link) { - if (alias === null || label === null) { - return; - } - let boundary = {}; - const old = boundaries.find((boundary2) => boundary2.alias === alias); - if (old && alias === old.alias) { - boundary = old; - } else { - boundary.alias = alias; - boundaries.push(boundary); - } - if (label === void 0 || label === null) { - boundary.label = { text: "" }; - } else { - boundary.label = { text: label }; - } - if (type === void 0 || type === null) { - boundary.type = { text: "system" }; - } else { - if (typeof type === "object") { - let [key, value] = Object.entries(type)[0]; - boundary[key] = { text: value }; - } else { - boundary.type = { text: type }; - } - } - if (typeof tags === "object") { - let [key, value] = Object.entries(tags)[0]; - boundary[key] = value; - } else { - boundary.tags = tags; - } - if (typeof link === "object") { - let [key, value] = Object.entries(link)[0]; - boundary[key] = value; - } else { - boundary.link = link; - } - boundary.parentBoundary = currentBoundaryParse; - boundary.wrap = autoWrap(); - parentBoundaryParse = currentBoundaryParse; - currentBoundaryParse = alias; - boundaryParseStack.push(parentBoundaryParse); -}; -const addContainerBoundary = function(alias, label, type, tags, link) { - if (alias === null || label === null) { - return; - } - let boundary = {}; - const old = boundaries.find((boundary2) => boundary2.alias === alias); - if (old && alias === old.alias) { - boundary = old; - } else { - boundary.alias = alias; - boundaries.push(boundary); - } - if (label === void 0 || label === null) { - boundary.label = { text: "" }; - } else { - boundary.label = { text: label }; - } - if (type === void 0 || type === null) { - boundary.type = { text: "container" }; - } else { - if (typeof type === "object") { - let [key, value] = Object.entries(type)[0]; - boundary[key] = { text: value }; - } else { - boundary.type = { text: type }; - } - } - if (typeof tags === "object") { - let [key, value] = Object.entries(tags)[0]; - boundary[key] = value; - } else { - boundary.tags = tags; - } - if (typeof link === "object") { - let [key, value] = Object.entries(link)[0]; - boundary[key] = value; - } else { - boundary.link = link; - } - boundary.parentBoundary = currentBoundaryParse; - boundary.wrap = autoWrap(); - parentBoundaryParse = currentBoundaryParse; - currentBoundaryParse = alias; - boundaryParseStack.push(parentBoundaryParse); -}; -const addDeploymentNode = function(nodeType, alias, label, type, descr, sprite, tags, link) { - if (alias === null || label === null) { - return; - } - let boundary = {}; - const old = boundaries.find((boundary2) => boundary2.alias === alias); - if (old && alias === old.alias) { - boundary = old; - } else { - boundary.alias = alias; - boundaries.push(boundary); - } - if (label === void 0 || label === null) { - boundary.label = { text: "" }; - } else { - boundary.label = { text: label }; - } - if (type === void 0 || type === null) { - boundary.type = { text: "node" }; - } else { - if (typeof type === "object") { - let [key, value] = Object.entries(type)[0]; - boundary[key] = { text: value }; - } else { - boundary.type = { text: type }; - } - } - if (descr === void 0 || descr === null) { - boundary.descr = { text: "" }; - } else { - if (typeof descr === "object") { - let [key, value] = Object.entries(descr)[0]; - boundary[key] = { text: value }; - } else { - boundary.descr = { text: descr }; - } - } - if (typeof tags === "object") { - let [key, value] = Object.entries(tags)[0]; - boundary[key] = value; - } else { - boundary.tags = tags; - } - if (typeof link === "object") { - let [key, value] = Object.entries(link)[0]; - boundary[key] = value; - } else { - boundary.link = link; - } - boundary.nodeType = nodeType; - boundary.parentBoundary = currentBoundaryParse; - boundary.wrap = autoWrap(); - parentBoundaryParse = currentBoundaryParse; - currentBoundaryParse = alias; - boundaryParseStack.push(parentBoundaryParse); -}; -const popBoundaryParseStack = function() { - currentBoundaryParse = parentBoundaryParse; - boundaryParseStack.pop(); - parentBoundaryParse = boundaryParseStack.pop(); - boundaryParseStack.push(parentBoundaryParse); -}; -const updateElStyle = function(typeC4Shape, elementName, bgColor, fontColor, borderColor, shadowing, shape, sprite, techn, legendText, legendSprite) { - let old = c4ShapeArray.find((element) => element.alias === elementName); - if (old === void 0) { - old = boundaries.find((element) => element.alias === elementName); - if (old === void 0) { - return; - } - } - if (bgColor !== void 0 && bgColor !== null) { - if (typeof bgColor === "object") { - let [key, value] = Object.entries(bgColor)[0]; - old[key] = value; - } else { - old.bgColor = bgColor; - } - } - if (fontColor !== void 0 && fontColor !== null) { - if (typeof fontColor === "object") { - let [key, value] = Object.entries(fontColor)[0]; - old[key] = value; - } else { - old.fontColor = fontColor; - } - } - if (borderColor !== void 0 && borderColor !== null) { - if (typeof borderColor === "object") { - let [key, value] = Object.entries(borderColor)[0]; - old[key] = value; - } else { - old.borderColor = borderColor; - } - } - if (shadowing !== void 0 && shadowing !== null) { - if (typeof shadowing === "object") { - let [key, value] = Object.entries(shadowing)[0]; - old[key] = value; - } else { - old.shadowing = shadowing; - } - } - if (shape !== void 0 && shape !== null) { - if (typeof shape === "object") { - let [key, value] = Object.entries(shape)[0]; - old[key] = value; - } else { - old.shape = shape; - } - } - if (sprite !== void 0 && sprite !== null) { - if (typeof sprite === "object") { - let [key, value] = Object.entries(sprite)[0]; - old[key] = value; - } else { - old.sprite = sprite; - } - } - if (techn !== void 0 && techn !== null) { - if (typeof techn === "object") { - let [key, value] = Object.entries(techn)[0]; - old[key] = value; - } else { - old.techn = techn; - } - } - if (legendText !== void 0 && legendText !== null) { - if (typeof legendText === "object") { - let [key, value] = Object.entries(legendText)[0]; - old[key] = value; - } else { - old.legendText = legendText; - } - } - if (legendSprite !== void 0 && legendSprite !== null) { - if (typeof legendSprite === "object") { - let [key, value] = Object.entries(legendSprite)[0]; - old[key] = value; - } else { - old.legendSprite = legendSprite; - } - } -}; -const updateRelStyle = function(typeC4Shape, from, to, textColor, lineColor, offsetX, offsetY) { - const old = rels.find((rel) => rel.from === from && rel.to === to); - if (old === void 0) { - return; - } - if (textColor !== void 0 && textColor !== null) { - if (typeof textColor === "object") { - let [key, value] = Object.entries(textColor)[0]; - old[key] = value; - } else { - old.textColor = textColor; - } - } - if (lineColor !== void 0 && lineColor !== null) { - if (typeof lineColor === "object") { - let [key, value] = Object.entries(lineColor)[0]; - old[key] = value; - } else { - old.lineColor = lineColor; - } - } - if (offsetX !== void 0 && offsetX !== null) { - if (typeof offsetX === "object") { - let [key, value] = Object.entries(offsetX)[0]; - old[key] = parseInt(value); - } else { - old.offsetX = parseInt(offsetX); - } - } - if (offsetY !== void 0 && offsetY !== null) { - if (typeof offsetY === "object") { - let [key, value] = Object.entries(offsetY)[0]; - old[key] = parseInt(value); - } else { - old.offsetY = parseInt(offsetY); - } - } -}; -const updateLayoutConfig = function(typeC4Shape, c4ShapeInRowParam, c4BoundaryInRowParam) { - let c4ShapeInRowValue = c4ShapeInRow$1; - let c4BoundaryInRowValue = c4BoundaryInRow$1; - if (typeof c4ShapeInRowParam === "object") { - const value = Object.values(c4ShapeInRowParam)[0]; - c4ShapeInRowValue = parseInt(value); - } else { - c4ShapeInRowValue = parseInt(c4ShapeInRowParam); - } - if (typeof c4BoundaryInRowParam === "object") { - const value = Object.values(c4BoundaryInRowParam)[0]; - c4BoundaryInRowValue = parseInt(value); - } else { - c4BoundaryInRowValue = parseInt(c4BoundaryInRowParam); - } - if (c4ShapeInRowValue >= 1) { - c4ShapeInRow$1 = c4ShapeInRowValue; - } - if (c4BoundaryInRowValue >= 1) { - c4BoundaryInRow$1 = c4BoundaryInRowValue; - } -}; -const getC4ShapeInRow = function() { - return c4ShapeInRow$1; -}; -const getC4BoundaryInRow = function() { - return c4BoundaryInRow$1; -}; -const getCurrentBoundaryParse = function() { - return currentBoundaryParse; -}; -const getParentBoundaryParse = function() { - return parentBoundaryParse; -}; -const getC4ShapeArray = function(parentBoundary) { - if (parentBoundary === void 0 || parentBoundary === null) { - return c4ShapeArray; - } else { - return c4ShapeArray.filter((personOrSystem) => { - return personOrSystem.parentBoundary === parentBoundary; - }); - } -}; -const getC4Shape = function(alias) { - return c4ShapeArray.find((personOrSystem) => personOrSystem.alias === alias); -}; -const getC4ShapeKeys = function(parentBoundary) { - return Object.keys(getC4ShapeArray(parentBoundary)); -}; -const getBoundaries = function(parentBoundary) { - if (parentBoundary === void 0 || parentBoundary === null) { - return boundaries; - } else { - return boundaries.filter((boundary) => boundary.parentBoundary === parentBoundary); - } -}; -const getBoundarys = getBoundaries; -const getRels = function() { - return rels; -}; -const getTitle = function() { - return title; -}; -const setWrap = function(wrapSetting) { - wrapEnabled = wrapSetting; -}; -const autoWrap = function() { - return wrapEnabled; -}; -const clear = function() { - c4ShapeArray = []; - boundaries = [ - { - alias: "global", - label: { text: "global" }, - type: { text: "global" }, - tags: null, - link: null, - parentBoundary: "" - } - ]; - parentBoundaryParse = ""; - currentBoundaryParse = "global"; - boundaryParseStack = [""]; - rels = []; - boundaryParseStack = [""]; - title = ""; - wrapEnabled = false; - c4ShapeInRow$1 = 4; - c4BoundaryInRow$1 = 2; -}; -const LINETYPE = { - SOLID: 0, - DOTTED: 1, - NOTE: 2, - SOLID_CROSS: 3, - DOTTED_CROSS: 4, - SOLID_OPEN: 5, - DOTTED_OPEN: 6, - LOOP_START: 10, - LOOP_END: 11, - ALT_START: 12, - ALT_ELSE: 13, - ALT_END: 14, - OPT_START: 15, - OPT_END: 16, - ACTIVE_START: 17, - ACTIVE_END: 18, - PAR_START: 19, - PAR_AND: 20, - PAR_END: 21, - RECT_START: 22, - RECT_END: 23, - SOLID_POINT: 24, - DOTTED_POINT: 25 -}; -const ARROWTYPE = { - FILLED: 0, - OPEN: 1 -}; -const PLACEMENT = { - LEFTOF: 0, - RIGHTOF: 1, - OVER: 2 -}; -const setTitle = function(txt) { - let sanitizedText = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.d)(txt, (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.c)()); - title = sanitizedText; -}; -const db = { - addPersonOrSystem, - addPersonOrSystemBoundary, - addContainer, - addContainerBoundary, - addComponent, - addDeploymentNode, - popBoundaryParseStack, - addRel, - updateElStyle, - updateRelStyle, - updateLayoutConfig, - autoWrap, - setWrap, - getC4ShapeArray, - getC4Shape, - getC4ShapeKeys, - getBoundaries, - getBoundarys, - getCurrentBoundaryParse, - getParentBoundaryParse, - getRels, - getTitle, - getC4Type, - getC4ShapeInRow, - getC4BoundaryInRow, - setAccTitle: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.s, - getAccTitle: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.g, - getAccDescription: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.a, - setAccDescription: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.b, - getConfig: () => (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.c)().c4, - clear, - LINETYPE, - ARROWTYPE, - PLACEMENT, - setTitle, - setC4Type - // apply, -}; -const drawRect = function(elem, rectData) { - return (0,_svgDrawCommon_08f97a94_js__WEBPACK_IMPORTED_MODULE_5__.d)(elem, rectData); -}; -const drawImage = function(elem, width, height, x, y, link) { - const imageElem = elem.append("image"); - imageElem.attr("width", width); - imageElem.attr("height", height); - imageElem.attr("x", x); - imageElem.attr("y", y); - let sanitizedLink = link.startsWith("data:image/png;base64") ? link : (0,_braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_1__/* .sanitizeUrl */ .Jf)(link); - imageElem.attr("xlink:href", sanitizedLink); -}; -const drawRels$1 = (elem, rels2, conf2) => { - const relsElem = elem.append("g"); - let i = 0; - for (let rel of rels2) { - let textColor = rel.textColor ? rel.textColor : "#444444"; - let strokeColor = rel.lineColor ? rel.lineColor : "#444444"; - let offsetX = rel.offsetX ? parseInt(rel.offsetX) : 0; - let offsetY = rel.offsetY ? parseInt(rel.offsetY) : 0; - let url = ""; - if (i === 0) { - let line = relsElem.append("line"); - line.attr("x1", rel.startPoint.x); - line.attr("y1", rel.startPoint.y); - line.attr("x2", rel.endPoint.x); - line.attr("y2", rel.endPoint.y); - line.attr("stroke-width", "1"); - line.attr("stroke", strokeColor); - line.style("fill", "none"); - if (rel.type !== "rel_b") { - line.attr("marker-end", "url(" + url + "#arrowhead)"); - } - if (rel.type === "birel" || rel.type === "rel_b") { - line.attr("marker-start", "url(" + url + "#arrowend)"); - } - i = -1; - } else { - let line = relsElem.append("path"); - line.attr("fill", "none").attr("stroke-width", "1").attr("stroke", strokeColor).attr( - "d", - "Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx", rel.startPoint.x).replaceAll("starty", rel.startPoint.y).replaceAll( - "controlx", - rel.startPoint.x + (rel.endPoint.x - rel.startPoint.x) / 2 - (rel.endPoint.x - rel.startPoint.x) / 4 - ).replaceAll("controly", rel.startPoint.y + (rel.endPoint.y - rel.startPoint.y) / 2).replaceAll("stopx", rel.endPoint.x).replaceAll("stopy", rel.endPoint.y) - ); - if (rel.type !== "rel_b") { - line.attr("marker-end", "url(" + url + "#arrowhead)"); - } - if (rel.type === "birel" || rel.type === "rel_b") { - line.attr("marker-start", "url(" + url + "#arrowend)"); - } - } - let messageConf = conf2.messageFont(); - _drawTextCandidateFunc(conf2)( - rel.label.text, - relsElem, - Math.min(rel.startPoint.x, rel.endPoint.x) + Math.abs(rel.endPoint.x - rel.startPoint.x) / 2 + offsetX, - Math.min(rel.startPoint.y, rel.endPoint.y) + Math.abs(rel.endPoint.y - rel.startPoint.y) / 2 + offsetY, - rel.label.width, - rel.label.height, - { fill: textColor }, - messageConf - ); - if (rel.techn && rel.techn.text !== "") { - messageConf = conf2.messageFont(); - _drawTextCandidateFunc(conf2)( - "[" + rel.techn.text + "]", - relsElem, - Math.min(rel.startPoint.x, rel.endPoint.x) + Math.abs(rel.endPoint.x - rel.startPoint.x) / 2 + offsetX, - Math.min(rel.startPoint.y, rel.endPoint.y) + Math.abs(rel.endPoint.y - rel.startPoint.y) / 2 + conf2.messageFontSize + 5 + offsetY, - Math.max(rel.label.width, rel.techn.width), - rel.techn.height, - { fill: textColor, "font-style": "italic" }, - messageConf - ); - } - } -}; -const drawBoundary$1 = function(elem, boundary, conf2) { - const boundaryElem = elem.append("g"); - let fillColor = boundary.bgColor ? boundary.bgColor : "none"; - let strokeColor = boundary.borderColor ? boundary.borderColor : "#444444"; - let fontColor = boundary.fontColor ? boundary.fontColor : "black"; - let attrsValue = { "stroke-width": 1, "stroke-dasharray": "7.0,7.0" }; - if (boundary.nodeType) { - attrsValue = { "stroke-width": 1 }; - } - let rectData = { - x: boundary.x, - y: boundary.y, - fill: fillColor, - stroke: strokeColor, - width: boundary.width, - height: boundary.height, - rx: 2.5, - ry: 2.5, - attrs: attrsValue - }; - drawRect(boundaryElem, rectData); - let boundaryConf = conf2.boundaryFont(); - boundaryConf.fontWeight = "bold"; - boundaryConf.fontSize = boundaryConf.fontSize + 2; - boundaryConf.fontColor = fontColor; - _drawTextCandidateFunc(conf2)( - boundary.label.text, - boundaryElem, - boundary.x, - boundary.y + boundary.label.Y, - boundary.width, - boundary.height, - { fill: "#444444" }, - boundaryConf - ); - if (boundary.type && boundary.type.text !== "") { - boundaryConf = conf2.boundaryFont(); - boundaryConf.fontColor = fontColor; - _drawTextCandidateFunc(conf2)( - boundary.type.text, - boundaryElem, - boundary.x, - boundary.y + boundary.type.Y, - boundary.width, - boundary.height, - { fill: "#444444" }, - boundaryConf - ); - } - if (boundary.descr && boundary.descr.text !== "") { - boundaryConf = conf2.boundaryFont(); - boundaryConf.fontSize = boundaryConf.fontSize - 2; - boundaryConf.fontColor = fontColor; - _drawTextCandidateFunc(conf2)( - boundary.descr.text, - boundaryElem, - boundary.x, - boundary.y + boundary.descr.Y, - boundary.width, - boundary.height, - { fill: "#444444" }, - boundaryConf - ); - } -}; -const drawC4Shape = function(elem, c4Shape, conf2) { - var _a; - let fillColor = c4Shape.bgColor ? c4Shape.bgColor : conf2[c4Shape.typeC4Shape.text + "_bg_color"]; - let strokeColor = c4Shape.borderColor ? c4Shape.borderColor : conf2[c4Shape.typeC4Shape.text + "_border_color"]; - let fontColor = c4Shape.fontColor ? c4Shape.fontColor : "#FFFFFF"; - let personImg = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII="; - switch (c4Shape.typeC4Shape.text) { - case "person": - personImg = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII="; - break; - case "external_person": - personImg = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII="; - break; - } - const c4ShapeElem = elem.append("g"); - c4ShapeElem.attr("class", "person-man"); - const rect = (0,_svgDrawCommon_08f97a94_js__WEBPACK_IMPORTED_MODULE_5__.g)(); - switch (c4Shape.typeC4Shape.text) { - case "person": - case "external_person": - case "system": - case "external_system": - case "container": - case "external_container": - case "component": - case "external_component": - rect.x = c4Shape.x; - rect.y = c4Shape.y; - rect.fill = fillColor; - rect.width = c4Shape.width; - rect.height = c4Shape.height; - rect.stroke = strokeColor; - rect.rx = 2.5; - rect.ry = 2.5; - rect.attrs = { "stroke-width": 0.5 }; - drawRect(c4ShapeElem, rect); - break; - case "system_db": - case "external_system_db": - case "container_db": - case "external_container_db": - case "component_db": - case "external_component_db": - c4ShapeElem.append("path").attr("fill", fillColor).attr("stroke-width", "0.5").attr("stroke", strokeColor).attr( - "d", - "Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height".replaceAll("startx", c4Shape.x).replaceAll("starty", c4Shape.y).replaceAll("half", c4Shape.width / 2).replaceAll("height", c4Shape.height) - ); - c4ShapeElem.append("path").attr("fill", "none").attr("stroke-width", "0.5").attr("stroke", strokeColor).attr( - "d", - "Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10".replaceAll("startx", c4Shape.x).replaceAll("starty", c4Shape.y).replaceAll("half", c4Shape.width / 2) - ); - break; - case "system_queue": - case "external_system_queue": - case "container_queue": - case "external_container_queue": - case "component_queue": - case "external_component_queue": - c4ShapeElem.append("path").attr("fill", fillColor).attr("stroke-width", "0.5").attr("stroke", strokeColor).attr( - "d", - "Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half".replaceAll("startx", c4Shape.x).replaceAll("starty", c4Shape.y).replaceAll("width", c4Shape.width).replaceAll("half", c4Shape.height / 2) - ); - c4ShapeElem.append("path").attr("fill", "none").attr("stroke-width", "0.5").attr("stroke", strokeColor).attr( - "d", - "Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx", c4Shape.x + c4Shape.width).replaceAll("starty", c4Shape.y).replaceAll("half", c4Shape.height / 2) - ); - break; - } - let c4ShapeFontConf = getC4ShapeFont(conf2, c4Shape.typeC4Shape.text); - c4ShapeElem.append("text").attr("fill", fontColor).attr("font-family", c4ShapeFontConf.fontFamily).attr("font-size", c4ShapeFontConf.fontSize - 2).attr("font-style", "italic").attr("lengthAdjust", "spacing").attr("textLength", c4Shape.typeC4Shape.width).attr("x", c4Shape.x + c4Shape.width / 2 - c4Shape.typeC4Shape.width / 2).attr("y", c4Shape.y + c4Shape.typeC4Shape.Y).text("<<" + c4Shape.typeC4Shape.text + ">>"); - switch (c4Shape.typeC4Shape.text) { - case "person": - case "external_person": - drawImage( - c4ShapeElem, - 48, - 48, - c4Shape.x + c4Shape.width / 2 - 24, - c4Shape.y + c4Shape.image.Y, - personImg - ); - break; - } - let textFontConf = conf2[c4Shape.typeC4Shape.text + "Font"](); - textFontConf.fontWeight = "bold"; - textFontConf.fontSize = textFontConf.fontSize + 2; - textFontConf.fontColor = fontColor; - _drawTextCandidateFunc(conf2)( - c4Shape.label.text, - c4ShapeElem, - c4Shape.x, - c4Shape.y + c4Shape.label.Y, - c4Shape.width, - c4Shape.height, - { fill: fontColor }, - textFontConf - ); - textFontConf = conf2[c4Shape.typeC4Shape.text + "Font"](); - textFontConf.fontColor = fontColor; - if (c4Shape.techn && ((_a = c4Shape.techn) == null ? void 0 : _a.text) !== "") { - _drawTextCandidateFunc(conf2)( - c4Shape.techn.text, - c4ShapeElem, - c4Shape.x, - c4Shape.y + c4Shape.techn.Y, - c4Shape.width, - c4Shape.height, - { fill: fontColor, "font-style": "italic" }, - textFontConf - ); - } else if (c4Shape.type && c4Shape.type.text !== "") { - _drawTextCandidateFunc(conf2)( - c4Shape.type.text, - c4ShapeElem, - c4Shape.x, - c4Shape.y + c4Shape.type.Y, - c4Shape.width, - c4Shape.height, - { fill: fontColor, "font-style": "italic" }, - textFontConf - ); - } - if (c4Shape.descr && c4Shape.descr.text !== "") { - textFontConf = conf2.personFont(); - textFontConf.fontColor = fontColor; - _drawTextCandidateFunc(conf2)( - c4Shape.descr.text, - c4ShapeElem, - c4Shape.x, - c4Shape.y + c4Shape.descr.Y, - c4Shape.width, - c4Shape.height, - { fill: fontColor }, - textFontConf - ); - } - return c4Shape.height; -}; -const insertDatabaseIcon = function(elem) { - elem.append("defs").append("symbol").attr("id", "database").attr("fill-rule", "evenodd").attr("clip-rule", "evenodd").append("path").attr("transform", "scale(.5)").attr( - "d", - "M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z" - ); -}; -const insertComputerIcon = function(elem) { - elem.append("defs").append("symbol").attr("id", "computer").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr( - "d", - "M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z" - ); -}; -const insertClockIcon = function(elem) { - elem.append("defs").append("symbol").attr("id", "clock").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr( - "d", - "M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z" - ); -}; -const insertArrowHead = function(elem) { - elem.append("defs").append("marker").attr("id", "arrowhead").attr("refX", 9).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z"); -}; -const insertArrowEnd = function(elem) { - elem.append("defs").append("marker").attr("id", "arrowend").attr("refX", 1).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 10 0 L 0 5 L 10 10 z"); -}; -const insertArrowFilledHead = function(elem) { - elem.append("defs").append("marker").attr("id", "filled-head").attr("refX", 18).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z"); -}; -const insertDynamicNumber = function(elem) { - elem.append("defs").append("marker").attr("id", "sequencenumber").attr("refX", 15).attr("refY", 15).attr("markerWidth", 60).attr("markerHeight", 40).attr("orient", "auto").append("circle").attr("cx", 15).attr("cy", 15).attr("r", 6); -}; -const insertArrowCrossHead = function(elem) { - const defs = elem.append("defs"); - const marker = defs.append("marker").attr("id", "crosshead").attr("markerWidth", 15).attr("markerHeight", 8).attr("orient", "auto").attr("refX", 16).attr("refY", 4); - marker.append("path").attr("fill", "black").attr("stroke", "#000000").style("stroke-dasharray", "0, 0").attr("stroke-width", "1px").attr("d", "M 9,2 V 6 L16,4 Z"); - marker.append("path").attr("fill", "none").attr("stroke", "#000000").style("stroke-dasharray", "0, 0").attr("stroke-width", "1px").attr("d", "M 0,1 L 6,7 M 6,1 L 0,7"); -}; -const getC4ShapeFont = (cnf, typeC4Shape) => { - return { - fontFamily: cnf[typeC4Shape + "FontFamily"], - fontSize: cnf[typeC4Shape + "FontSize"], - fontWeight: cnf[typeC4Shape + "FontWeight"] - }; -}; -const _drawTextCandidateFunc = function() { - function byText(content, g, x, y, width, height, textAttrs) { - const text = g.append("text").attr("x", x + width / 2).attr("y", y + height / 2 + 5).style("text-anchor", "middle").text(content); - _setTextAttrs(text, textAttrs); - } - function byTspan(content, g, x, y, width, height, textAttrs, conf2) { - const { fontSize, fontFamily, fontWeight } = conf2; - const lines = content.split(_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.e.lineBreakRegex); - for (let i = 0; i < lines.length; i++) { - const dy = i * fontSize - fontSize * (lines.length - 1) / 2; - const text = g.append("text").attr("x", x + width / 2).attr("y", y).style("text-anchor", "middle").attr("dominant-baseline", "middle").style("font-size", fontSize).style("font-weight", fontWeight).style("font-family", fontFamily); - text.append("tspan").attr("dy", dy).text(lines[i]).attr("alignment-baseline", "mathematical"); - _setTextAttrs(text, textAttrs); - } - } - function byFo(content, g, x, y, width, height, textAttrs, conf2) { - const s = g.append("switch"); - const f = s.append("foreignObject").attr("x", x).attr("y", y).attr("width", width).attr("height", height); - const text = f.append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%"); - text.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(content); - byTspan(content, s, x, y, width, height, textAttrs, conf2); - _setTextAttrs(text, textAttrs); - } - function _setTextAttrs(toText, fromTextAttrsDict) { - for (const key in fromTextAttrsDict) { - if (fromTextAttrsDict.hasOwnProperty(key)) { - toText.attr(key, fromTextAttrsDict[key]); - } - } - } - return function(conf2) { - return conf2.textPlacement === "fo" ? byFo : conf2.textPlacement === "old" ? byText : byTspan; - }; -}(); -const svgDraw = { - drawRect, - drawBoundary: drawBoundary$1, - drawC4Shape, - drawRels: drawRels$1, - drawImage, - insertArrowHead, - insertArrowEnd, - insertArrowFilledHead, - insertDynamicNumber, - insertArrowCrossHead, - insertDatabaseIcon, - insertComputerIcon, - insertClockIcon -}; -let globalBoundaryMaxX = 0, globalBoundaryMaxY = 0; -let c4ShapeInRow = 4; -let c4BoundaryInRow = 2; -parser.yy = db; -let conf = {}; -class Bounds { - constructor(diagObj) { - this.name = ""; - this.data = {}; - this.data.startx = void 0; - this.data.stopx = void 0; - this.data.starty = void 0; - this.data.stopy = void 0; - this.data.widthLimit = void 0; - this.nextData = {}; - this.nextData.startx = void 0; - this.nextData.stopx = void 0; - this.nextData.starty = void 0; - this.nextData.stopy = void 0; - this.nextData.cnt = 0; - setConf(diagObj.db.getConfig()); - } - setData(startx, stopx, starty, stopy) { - this.nextData.startx = this.data.startx = startx; - this.nextData.stopx = this.data.stopx = stopx; - this.nextData.starty = this.data.starty = starty; - this.nextData.stopy = this.data.stopy = stopy; - } - updateVal(obj, key, val, fun) { - if (obj[key] === void 0) { - obj[key] = val; - } else { - obj[key] = fun(val, obj[key]); - } - } - insert(c4Shape) { - this.nextData.cnt = this.nextData.cnt + 1; - let _startx = this.nextData.startx === this.nextData.stopx ? this.nextData.stopx + c4Shape.margin : this.nextData.stopx + c4Shape.margin * 2; - let _stopx = _startx + c4Shape.width; - let _starty = this.nextData.starty + c4Shape.margin * 2; - let _stopy = _starty + c4Shape.height; - if (_startx >= this.data.widthLimit || _stopx >= this.data.widthLimit || this.nextData.cnt > c4ShapeInRow) { - _startx = this.nextData.startx + c4Shape.margin + conf.nextLinePaddingX; - _starty = this.nextData.stopy + c4Shape.margin * 2; - this.nextData.stopx = _stopx = _startx + c4Shape.width; - this.nextData.starty = this.nextData.stopy; - this.nextData.stopy = _stopy = _starty + c4Shape.height; - this.nextData.cnt = 1; - } - c4Shape.x = _startx; - c4Shape.y = _starty; - this.updateVal(this.data, "startx", _startx, Math.min); - this.updateVal(this.data, "starty", _starty, Math.min); - this.updateVal(this.data, "stopx", _stopx, Math.max); - this.updateVal(this.data, "stopy", _stopy, Math.max); - this.updateVal(this.nextData, "startx", _startx, Math.min); - this.updateVal(this.nextData, "starty", _starty, Math.min); - this.updateVal(this.nextData, "stopx", _stopx, Math.max); - this.updateVal(this.nextData, "stopy", _stopy, Math.max); - } - init(diagObj) { - this.name = ""; - this.data = { - startx: void 0, - stopx: void 0, - starty: void 0, - stopy: void 0, - widthLimit: void 0 - }; - this.nextData = { - startx: void 0, - stopx: void 0, - starty: void 0, - stopy: void 0, - cnt: 0 - }; - setConf(diagObj.db.getConfig()); - } - bumpLastMargin(margin) { - this.data.stopx += margin; - this.data.stopy += margin; - } -} -const setConf = function(cnf) { - (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.f)(conf, cnf); - if (cnf.fontFamily) { - conf.personFontFamily = conf.systemFontFamily = conf.messageFontFamily = cnf.fontFamily; - } - if (cnf.fontSize) { - conf.personFontSize = conf.systemFontSize = conf.messageFontSize = cnf.fontSize; - } - if (cnf.fontWeight) { - conf.personFontWeight = conf.systemFontWeight = conf.messageFontWeight = cnf.fontWeight; - } -}; -const c4ShapeFont = (cnf, typeC4Shape) => { - return { - fontFamily: cnf[typeC4Shape + "FontFamily"], - fontSize: cnf[typeC4Shape + "FontSize"], - fontWeight: cnf[typeC4Shape + "FontWeight"] - }; -}; -const boundaryFont = (cnf) => { - return { - fontFamily: cnf.boundaryFontFamily, - fontSize: cnf.boundaryFontSize, - fontWeight: cnf.boundaryFontWeight - }; -}; -const messageFont = (cnf) => { - return { - fontFamily: cnf.messageFontFamily, - fontSize: cnf.messageFontSize, - fontWeight: cnf.messageFontWeight - }; -}; -function calcC4ShapeTextWH(textType, c4Shape, c4ShapeTextWrap, textConf, textLimitWidth) { - if (!c4Shape[textType].width) { - if (c4ShapeTextWrap) { - c4Shape[textType].text = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.w)(c4Shape[textType].text, textLimitWidth, textConf); - c4Shape[textType].textLines = c4Shape[textType].text.split(_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.e.lineBreakRegex).length; - c4Shape[textType].width = textLimitWidth; - c4Shape[textType].height = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.j)(c4Shape[textType].text, textConf); - } else { - let lines = c4Shape[textType].text.split(_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.e.lineBreakRegex); - c4Shape[textType].textLines = lines.length; - let lineHeight = 0; - c4Shape[textType].height = 0; - c4Shape[textType].width = 0; - for (const line of lines) { - c4Shape[textType].width = Math.max( - (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.h)(line, textConf), - c4Shape[textType].width - ); - lineHeight = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.j)(line, textConf); - c4Shape[textType].height = c4Shape[textType].height + lineHeight; - } - } - } -} -const drawBoundary = function(diagram2, boundary, bounds) { - boundary.x = bounds.data.startx; - boundary.y = bounds.data.starty; - boundary.width = bounds.data.stopx - bounds.data.startx; - boundary.height = bounds.data.stopy - bounds.data.starty; - boundary.label.y = conf.c4ShapeMargin - 35; - let boundaryTextWrap = boundary.wrap && conf.wrap; - let boundaryLabelConf = boundaryFont(conf); - boundaryLabelConf.fontSize = boundaryLabelConf.fontSize + 2; - boundaryLabelConf.fontWeight = "bold"; - let textLimitWidth = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.h)(boundary.label.text, boundaryLabelConf); - calcC4ShapeTextWH("label", boundary, boundaryTextWrap, boundaryLabelConf, textLimitWidth); - svgDraw.drawBoundary(diagram2, boundary, conf); -}; -const drawC4ShapeArray = function(currentBounds, diagram2, c4ShapeArray2, c4ShapeKeys) { - let Y = 0; - for (const c4ShapeKey of c4ShapeKeys) { - Y = 0; - const c4Shape = c4ShapeArray2[c4ShapeKey]; - let c4ShapeTypeConf = c4ShapeFont(conf, c4Shape.typeC4Shape.text); - c4ShapeTypeConf.fontSize = c4ShapeTypeConf.fontSize - 2; - c4Shape.typeC4Shape.width = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.h)( - "«" + c4Shape.typeC4Shape.text + "»", - c4ShapeTypeConf - ); - c4Shape.typeC4Shape.height = c4ShapeTypeConf.fontSize + 2; - c4Shape.typeC4Shape.Y = conf.c4ShapePadding; - Y = c4Shape.typeC4Shape.Y + c4Shape.typeC4Shape.height - 4; - c4Shape.image = { width: 0, height: 0, Y: 0 }; - switch (c4Shape.typeC4Shape.text) { - case "person": - case "external_person": - c4Shape.image.width = 48; - c4Shape.image.height = 48; - c4Shape.image.Y = Y; - Y = c4Shape.image.Y + c4Shape.image.height; - break; - } - if (c4Shape.sprite) { - c4Shape.image.width = 48; - c4Shape.image.height = 48; - c4Shape.image.Y = Y; - Y = c4Shape.image.Y + c4Shape.image.height; - } - let c4ShapeTextWrap = c4Shape.wrap && conf.wrap; - let textLimitWidth = conf.width - conf.c4ShapePadding * 2; - let c4ShapeLabelConf = c4ShapeFont(conf, c4Shape.typeC4Shape.text); - c4ShapeLabelConf.fontSize = c4ShapeLabelConf.fontSize + 2; - c4ShapeLabelConf.fontWeight = "bold"; - calcC4ShapeTextWH("label", c4Shape, c4ShapeTextWrap, c4ShapeLabelConf, textLimitWidth); - c4Shape["label"].Y = Y + 8; - Y = c4Shape["label"].Y + c4Shape["label"].height; - if (c4Shape.type && c4Shape.type.text !== "") { - c4Shape.type.text = "[" + c4Shape.type.text + "]"; - let c4ShapeTypeConf2 = c4ShapeFont(conf, c4Shape.typeC4Shape.text); - calcC4ShapeTextWH("type", c4Shape, c4ShapeTextWrap, c4ShapeTypeConf2, textLimitWidth); - c4Shape["type"].Y = Y + 5; - Y = c4Shape["type"].Y + c4Shape["type"].height; - } else if (c4Shape.techn && c4Shape.techn.text !== "") { - c4Shape.techn.text = "[" + c4Shape.techn.text + "]"; - let c4ShapeTechnConf = c4ShapeFont(conf, c4Shape.techn.text); - calcC4ShapeTextWH("techn", c4Shape, c4ShapeTextWrap, c4ShapeTechnConf, textLimitWidth); - c4Shape["techn"].Y = Y + 5; - Y = c4Shape["techn"].Y + c4Shape["techn"].height; - } - let rectHeight = Y; - let rectWidth = c4Shape.label.width; - if (c4Shape.descr && c4Shape.descr.text !== "") { - let c4ShapeDescrConf = c4ShapeFont(conf, c4Shape.typeC4Shape.text); - calcC4ShapeTextWH("descr", c4Shape, c4ShapeTextWrap, c4ShapeDescrConf, textLimitWidth); - c4Shape["descr"].Y = Y + 20; - Y = c4Shape["descr"].Y + c4Shape["descr"].height; - rectWidth = Math.max(c4Shape.label.width, c4Shape.descr.width); - rectHeight = Y - c4Shape["descr"].textLines * 5; - } - rectWidth = rectWidth + conf.c4ShapePadding; - c4Shape.width = Math.max(c4Shape.width || conf.width, rectWidth, conf.width); - c4Shape.height = Math.max(c4Shape.height || conf.height, rectHeight, conf.height); - c4Shape.margin = c4Shape.margin || conf.c4ShapeMargin; - currentBounds.insert(c4Shape); - svgDraw.drawC4Shape(diagram2, c4Shape, conf); - } - currentBounds.bumpLastMargin(conf.c4ShapeMargin); -}; -class Point { - constructor(x, y) { - this.x = x; - this.y = y; - } -} -let getIntersectPoint = function(fromNode, endPoint) { - let x1 = fromNode.x; - let y1 = fromNode.y; - let x2 = endPoint.x; - let y2 = endPoint.y; - let fromCenterX = x1 + fromNode.width / 2; - let fromCenterY = y1 + fromNode.height / 2; - let dx = Math.abs(x1 - x2); - let dy = Math.abs(y1 - y2); - let tanDYX = dy / dx; - let fromDYX = fromNode.height / fromNode.width; - let returnPoint = null; - if (y1 == y2 && x1 < x2) { - returnPoint = new Point(x1 + fromNode.width, fromCenterY); - } else if (y1 == y2 && x1 > x2) { - returnPoint = new Point(x1, fromCenterY); - } else if (x1 == x2 && y1 < y2) { - returnPoint = new Point(fromCenterX, y1 + fromNode.height); - } else if (x1 == x2 && y1 > y2) { - returnPoint = new Point(fromCenterX, y1); - } - if (x1 > x2 && y1 < y2) { - if (fromDYX >= tanDYX) { - returnPoint = new Point(x1, fromCenterY + tanDYX * fromNode.width / 2); - } else { - returnPoint = new Point( - fromCenterX - dx / dy * fromNode.height / 2, - y1 + fromNode.height - ); - } - } else if (x1 < x2 && y1 < y2) { - if (fromDYX >= tanDYX) { - returnPoint = new Point(x1 + fromNode.width, fromCenterY + tanDYX * fromNode.width / 2); - } else { - returnPoint = new Point( - fromCenterX + dx / dy * fromNode.height / 2, - y1 + fromNode.height - ); - } - } else if (x1 < x2 && y1 > y2) { - if (fromDYX >= tanDYX) { - returnPoint = new Point(x1 + fromNode.width, fromCenterY - tanDYX * fromNode.width / 2); - } else { - returnPoint = new Point(fromCenterX + fromNode.height / 2 * dx / dy, y1); - } - } else if (x1 > x2 && y1 > y2) { - if (fromDYX >= tanDYX) { - returnPoint = new Point(x1, fromCenterY - fromNode.width / 2 * tanDYX); - } else { - returnPoint = new Point(fromCenterX - fromNode.height / 2 * dx / dy, y1); - } - } - return returnPoint; -}; -let getIntersectPoints = function(fromNode, endNode) { - let endIntersectPoint = { x: 0, y: 0 }; - endIntersectPoint.x = endNode.x + endNode.width / 2; - endIntersectPoint.y = endNode.y + endNode.height / 2; - let startPoint = getIntersectPoint(fromNode, endIntersectPoint); - endIntersectPoint.x = fromNode.x + fromNode.width / 2; - endIntersectPoint.y = fromNode.y + fromNode.height / 2; - let endPoint = getIntersectPoint(endNode, endIntersectPoint); - return { startPoint, endPoint }; -}; -const drawRels = function(diagram2, rels2, getC4ShapeObj, diagObj) { - let i = 0; - for (let rel of rels2) { - i = i + 1; - let relTextWrap = rel.wrap && conf.wrap; - let relConf = messageFont(conf); - let diagramType = diagObj.db.getC4Type(); - if (diagramType === "C4Dynamic") { - rel.label.text = i + ": " + rel.label.text; - } - let textLimitWidth = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.h)(rel.label.text, relConf); - calcC4ShapeTextWH("label", rel, relTextWrap, relConf, textLimitWidth); - if (rel.techn && rel.techn.text !== "") { - textLimitWidth = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.h)(rel.techn.text, relConf); - calcC4ShapeTextWH("techn", rel, relTextWrap, relConf, textLimitWidth); - } - if (rel.descr && rel.descr.text !== "") { - textLimitWidth = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.h)(rel.descr.text, relConf); - calcC4ShapeTextWH("descr", rel, relTextWrap, relConf, textLimitWidth); - } - let fromNode = getC4ShapeObj(rel.from); - let endNode = getC4ShapeObj(rel.to); - let points = getIntersectPoints(fromNode, endNode); - rel.startPoint = points.startPoint; - rel.endPoint = points.endPoint; - } - svgDraw.drawRels(diagram2, rels2, conf); -}; -function drawInsideBoundary(diagram2, parentBoundaryAlias, parentBounds, currentBoundaries, diagObj) { - let currentBounds = new Bounds(diagObj); - currentBounds.data.widthLimit = parentBounds.data.widthLimit / Math.min(c4BoundaryInRow, currentBoundaries.length); - for (let [i, currentBoundary] of currentBoundaries.entries()) { - let Y = 0; - currentBoundary.image = { width: 0, height: 0, Y: 0 }; - if (currentBoundary.sprite) { - currentBoundary.image.width = 48; - currentBoundary.image.height = 48; - currentBoundary.image.Y = Y; - Y = currentBoundary.image.Y + currentBoundary.image.height; - } - let currentBoundaryTextWrap = currentBoundary.wrap && conf.wrap; - let currentBoundaryLabelConf = boundaryFont(conf); - currentBoundaryLabelConf.fontSize = currentBoundaryLabelConf.fontSize + 2; - currentBoundaryLabelConf.fontWeight = "bold"; - calcC4ShapeTextWH( - "label", - currentBoundary, - currentBoundaryTextWrap, - currentBoundaryLabelConf, - currentBounds.data.widthLimit - ); - currentBoundary["label"].Y = Y + 8; - Y = currentBoundary["label"].Y + currentBoundary["label"].height; - if (currentBoundary.type && currentBoundary.type.text !== "") { - currentBoundary.type.text = "[" + currentBoundary.type.text + "]"; - let currentBoundaryTypeConf = boundaryFont(conf); - calcC4ShapeTextWH( - "type", - currentBoundary, - currentBoundaryTextWrap, - currentBoundaryTypeConf, - currentBounds.data.widthLimit - ); - currentBoundary["type"].Y = Y + 5; - Y = currentBoundary["type"].Y + currentBoundary["type"].height; - } - if (currentBoundary.descr && currentBoundary.descr.text !== "") { - let currentBoundaryDescrConf = boundaryFont(conf); - currentBoundaryDescrConf.fontSize = currentBoundaryDescrConf.fontSize - 2; - calcC4ShapeTextWH( - "descr", - currentBoundary, - currentBoundaryTextWrap, - currentBoundaryDescrConf, - currentBounds.data.widthLimit - ); - currentBoundary["descr"].Y = Y + 20; - Y = currentBoundary["descr"].Y + currentBoundary["descr"].height; - } - if (i == 0 || i % c4BoundaryInRow === 0) { - let _x = parentBounds.data.startx + conf.diagramMarginX; - let _y = parentBounds.data.stopy + conf.diagramMarginY + Y; - currentBounds.setData(_x, _x, _y, _y); - } else { - let _x = currentBounds.data.stopx !== currentBounds.data.startx ? currentBounds.data.stopx + conf.diagramMarginX : currentBounds.data.startx; - let _y = currentBounds.data.starty; - currentBounds.setData(_x, _x, _y, _y); - } - currentBounds.name = currentBoundary.alias; - let currentPersonOrSystemArray = diagObj.db.getC4ShapeArray(currentBoundary.alias); - let currentPersonOrSystemKeys = diagObj.db.getC4ShapeKeys(currentBoundary.alias); - if (currentPersonOrSystemKeys.length > 0) { - drawC4ShapeArray( - currentBounds, - diagram2, - currentPersonOrSystemArray, - currentPersonOrSystemKeys - ); - } - parentBoundaryAlias = currentBoundary.alias; - let nextCurrentBoundaries = diagObj.db.getBoundarys(parentBoundaryAlias); - if (nextCurrentBoundaries.length > 0) { - drawInsideBoundary( - diagram2, - parentBoundaryAlias, - currentBounds, - nextCurrentBoundaries, - diagObj - ); - } - if (currentBoundary.alias !== "global") { - drawBoundary(diagram2, currentBoundary, currentBounds); - } - parentBounds.data.stopy = Math.max( - currentBounds.data.stopy + conf.c4ShapeMargin, - parentBounds.data.stopy - ); - parentBounds.data.stopx = Math.max( - currentBounds.data.stopx + conf.c4ShapeMargin, - parentBounds.data.stopx - ); - globalBoundaryMaxX = Math.max(globalBoundaryMaxX, parentBounds.data.stopx); - globalBoundaryMaxY = Math.max(globalBoundaryMaxY, parentBounds.data.stopy); - } -} -const draw = function(_text, id, _version, diagObj) { - conf = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.c)().c4; - const securityLevel = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.c)().securityLevel; - let sandboxElement; - if (securityLevel === "sandbox") { - sandboxElement = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)("#i" + id); - } - const root = securityLevel === "sandbox" ? (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(sandboxElement.nodes()[0].contentDocument.body) : (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)("body"); - let db2 = diagObj.db; - diagObj.db.setWrap(conf.wrap); - c4ShapeInRow = db2.getC4ShapeInRow(); - c4BoundaryInRow = db2.getC4BoundaryInRow(); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug(`C:${JSON.stringify(conf, null, 2)}`); - const diagram2 = securityLevel === "sandbox" ? root.select(`[id="${id}"]`) : (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(`[id="${id}"]`); - svgDraw.insertComputerIcon(diagram2); - svgDraw.insertDatabaseIcon(diagram2); - svgDraw.insertClockIcon(diagram2); - let screenBounds = new Bounds(diagObj); - screenBounds.setData( - conf.diagramMarginX, - conf.diagramMarginX, - conf.diagramMarginY, - conf.diagramMarginY - ); - screenBounds.data.widthLimit = screen.availWidth; - globalBoundaryMaxX = conf.diagramMarginX; - globalBoundaryMaxY = conf.diagramMarginY; - const title2 = diagObj.db.getTitle(); - let currentBoundaries = diagObj.db.getBoundarys(""); - drawInsideBoundary(diagram2, "", screenBounds, currentBoundaries, diagObj); - svgDraw.insertArrowHead(diagram2); - svgDraw.insertArrowEnd(diagram2); - svgDraw.insertArrowCrossHead(diagram2); - svgDraw.insertArrowFilledHead(diagram2); - drawRels(diagram2, diagObj.db.getRels(), diagObj.db.getC4Shape, diagObj); - screenBounds.data.stopx = globalBoundaryMaxX; - screenBounds.data.stopy = globalBoundaryMaxY; - const box = screenBounds.data; - let boxHeight = box.stopy - box.starty; - let height = boxHeight + 2 * conf.diagramMarginY; - let boxWidth = box.stopx - box.startx; - const width = boxWidth + 2 * conf.diagramMarginX; - if (title2) { - diagram2.append("text").text(title2).attr("x", (box.stopx - box.startx) / 2 - 4 * conf.diagramMarginX).attr("y", box.starty + conf.diagramMarginY); - } - (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.i)(diagram2, height, width, conf.useMaxWidth); - const extraVertForTitle = title2 ? 60 : 0; - diagram2.attr( - "viewBox", - box.startx - conf.diagramMarginX + " -" + (conf.diagramMarginY + extraVertForTitle) + " " + width + " " + (height + extraVertForTitle) - ); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug(`models:`, box); -}; -const renderer = { - drawPersonOrSystemArray: drawC4ShapeArray, - drawBoundary, - setConf, - draw -}; -const getStyles = (options) => `.person { - stroke: ${options.personBorder}; - fill: ${options.personBkg}; - } -`; -const styles = getStyles; -const diagram = { - parser: parser$1, - db, - renderer, - styles, - init: ({ c4, wrap }) => { - renderer.setConf(c4); - db.setWrap(wrap); - } -}; - - - -/***/ }), - -/***/ 79186: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ a: () => (/* binding */ drawBackgroundRect), -/* harmony export */ b: () => (/* binding */ drawEmbeddedImage), -/* harmony export */ c: () => (/* binding */ drawImage), -/* harmony export */ d: () => (/* binding */ drawRect), -/* harmony export */ e: () => (/* binding */ getTextObj), -/* harmony export */ f: () => (/* binding */ drawText), -/* harmony export */ g: () => (/* binding */ getNoteRect) -/* harmony export */ }); -/* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(16750); -/* harmony import */ var _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(86079); - - -const drawRect = (element, rectData) => { - const rectElement = element.append("rect"); - rectElement.attr("x", rectData.x); - rectElement.attr("y", rectData.y); - rectElement.attr("fill", rectData.fill); - rectElement.attr("stroke", rectData.stroke); - rectElement.attr("width", rectData.width); - rectElement.attr("height", rectData.height); - if (rectData.name) { - rectElement.attr("name", rectData.name); - } - rectData.rx !== void 0 && rectElement.attr("rx", rectData.rx); - rectData.ry !== void 0 && rectElement.attr("ry", rectData.ry); - if (rectData.attrs !== void 0) { - for (const attrKey in rectData.attrs) { - rectElement.attr(attrKey, rectData.attrs[attrKey]); - } - } - rectData.class !== void 0 && rectElement.attr("class", rectData.class); - return rectElement; -}; -const drawBackgroundRect = (element, bounds) => { - const rectData = { - x: bounds.startx, - y: bounds.starty, - width: bounds.stopx - bounds.startx, - height: bounds.stopy - bounds.starty, - fill: bounds.fill, - stroke: bounds.stroke, - class: "rect" - }; - const rectElement = drawRect(element, rectData); - rectElement.lower(); -}; -const drawText = (element, textData) => { - const nText = textData.text.replace(_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.J, " "); - const textElem = element.append("text"); - textElem.attr("x", textData.x); - textElem.attr("y", textData.y); - textElem.attr("class", "legend"); - textElem.style("text-anchor", textData.anchor); - textData.class !== void 0 && textElem.attr("class", textData.class); - const tspan = textElem.append("tspan"); - tspan.attr("x", textData.x + textData.textMargin * 2); - tspan.text(nText); - return textElem; -}; -const drawImage = (elem, x, y, link) => { - const imageElement = elem.append("image"); - imageElement.attr("x", x); - imageElement.attr("y", y); - const sanitizedLink = (0,_braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_0__/* .sanitizeUrl */ .Jf)(link); - imageElement.attr("xlink:href", sanitizedLink); -}; -const drawEmbeddedImage = (element, x, y, link) => { - const imageElement = element.append("use"); - imageElement.attr("x", x); - imageElement.attr("y", y); - const sanitizedLink = (0,_braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_0__/* .sanitizeUrl */ .Jf)(link); - imageElement.attr("xlink:href", `#${sanitizedLink}`); -}; -const getNoteRect = () => { - const noteRectData = { - x: 0, - y: 0, - width: 100, - height: 100, - fill: "#EDF2AE", - stroke: "#666", - anchor: "start", - rx: 0, - ry: 0 - }; - return noteRectData; -}; -const getTextObj = () => { - const testObject = { - x: 0, - y: 0, - width: 100, - height: 100, - "text-anchor": "start", - style: "#666", - textMargin: 0, - rx: 0, - ry: 0, - tspan: true - }; - return testObject; -}; - - - -/***/ }) - -}; -; \ No newline at end of file diff --git a/assets/js/2be0d940.75bc5b8f.js b/assets/js/2be0d940.75bc5b8f.js new file mode 100644 index 000000000000..8da318afe280 --- /dev/null +++ b/assets/js/2be0d940.75bc5b8f.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4537],{23169:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>d,default:()=>u,frontMatter:()=>r,metadata:()=>i,toc:()=>c});const i=JSON.parse('{"id":"learn/learn-guides-identity","title":"Polkadot-JS Guides about Identity","description":"Polkadot-JS Guides about Identity.","source":"@site/../docs/learn/learn-guides-identity.md","sourceDirName":"learn","slug":"/learn-guides-identity","permalink":"/docs/learn-guides-identity","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-identity.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1729847256000,"frontMatter":{"id":"learn-guides-identity","title":"Polkadot-JS Guides about Identity","sidebar_label":"Identity Guides","description":"Polkadot-JS Guides about Identity.","keywords":["registrar","identity","sub-identity","polkadot-js"],"slug":"../learn-guides-identity"},"sidebar":"docs","previous":{"title":"Bounty Guides","permalink":"/docs/learn-guides-bounties"},"next":{"title":"Ledger Guides","permalink":"/docs/learn-guides-ledger"}}');var s=n(74848),o=n(28453),a=n(67141);const r={id:"learn-guides-identity",title:"Polkadot-JS Guides about Identity",sidebar_label:"Identity Guides",description:"Polkadot-JS Guides about Identity.",keywords:["registrar","identity","sub-identity","polkadot-js"],slug:"../learn-guides-identity"},d=void 0,l={},c=[{value:"Setting an Identity",id:"setting-an-identity",level:2},{value:"Format Caveat",id:"format-caveat",level:3},{value:"Request Judgement",id:"request-judgement",level:2},{value:"Clearing and Killing an Identity",id:"clearing-and-killing-an-identity",level:2},{value:"Setting Sub-Identities",id:"setting-sub-identities",level:2},{value:"Setting Sub-Identity (Sub-ID) for your Ledger Account",id:"setting-sub-identity-sub-id-for-your-ledger-account",level:3},{value:"Registrars",id:"registrars",level:2},{value:"Becoming a Registrar",id:"becoming-a-registrar",level:3}];function h(e){const t={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",strong:"strong",ul:"ul",...(0,o.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the Polkadot-JS UI, you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,s.jsxs)(t.admonition,{title:"The identity pallet is no longer on the Kusama relay chain.",type:"warning",children:[(0,s.jsxs)(t.p,{children:["If you are on ",(0,s.jsx)(t.strong,{children:"Kusama"}),", any of the extrinsics which require you to use the relay chain now have to\nbe called via the system parachain,\n",(0,s.jsx)(t.a,{href:"https://polkadot.js.org/apps/?rpc=wss://kusama-people-rpc.polkadot.io",children:"which you can find here."})]}),(0,s.jsxs)(t.p,{children:["The identity pallet, along with all of its data, has been migrated to the\n",(0,s.jsx)(t.a,{href:"/docs/glossary#people-chain",children:"People Chain"}),", a system parachain which can now be used for\nidentity management."]})]}),"\n",(0,s.jsxs)(t.p,{children:["This is an advanced guide that is relevant for entities that would like to become registrars or\nwould like to set sub-identities to an existing account with an identity. See\n",(0,s.jsx)(t.a,{href:"/docs/learn-identity",children:"this page"})," to learn about how to set an identity and have it verified."]}),"\n",(0,s.jsx)(t.h2,{id:"setting-an-identity",children:"Setting an Identity"}),"\n",(0,s.jsxs)(t.p,{children:["Users can set an identity by registering through default fields such as legal name, display name,\nwebsite, Twitter handle, Riot handle, etc. along with some extra, custom fields for which they would\nlike attestations (see ",(0,s.jsx)(t.a,{href:"#judgements",children:"Judgements"}),")."]}),"\n",(0,s.jsx)(t.admonition,{title:"Instructions for setting and clearing Identities",type:"info",children:(0,s.jsxs)(t.p,{children:["The procedure to set and clear identities is explained in detail in this support article -\n",(0,s.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181981-how-to-set-and-clear-an-identity",children:"How to set and clear an Identity"})]})}),"\n",(0,s.jsx)(t.admonition,{type:"note",children:(0,s.jsxs)(t.p,{children:["The Ledger app on ",(0,s.jsx)(t.strong,{children:"Nano S"})," doesn't support the extrinsic for setting identity. As a workaround,\ncreate a primary identity with an on-chain account and then using that primary identity, assign a\n",(0,s.jsx)(t.a,{href:"#sub-accounts",children:"sub-identity"})," to the Ledger stash."]})}),"\n",(0,s.jsx)(t.h3,{id:"format-caveat",children:"Format Caveat"}),"\n",(0,s.jsx)(t.p,{children:"Please note the following caveat: because the fields support different formats, from raw bytes to\nvarious hashes, a UI has no way of telling how to encode a given field it encounters. The\nPolkadot-JS UI currently encodes the raw bytes it encounters as UTF8 strings, which makes these\nvalues readable on-screen. However, given that there are no restrictions on the values that can be\nplaced into these fields, a different UI may interpret them as, for example, IPFS hashes or encoded\nbitmaps. This means any field stored as raw bytes will become unreadable by that specific UI. As\nfield standards crystallize, things will become easier to use but for now, every custom\nimplementation of displaying user information will likely have to make a conscious decision on the\napproach to take, or support multiple formats and then attempt multiple encodings until the output\nmakes sense."}),"\n",(0,s.jsx)(t.h2,{id:"request-judgement",children:"Request Judgement"}),"\n",(0,s.jsx)(t.admonition,{title:"Instructions for requesting and cancelling Identity judgements",type:"info",children:(0,s.jsxs)(t.p,{children:["The procedure to request and cancel identity judgments is explained in detail in this\n",(0,s.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181990-how-to-request-and-cancel-identity-judgement",children:"support article"})]})}),"\n",(0,s.jsxs)(t.p,{children:["To be judged after submitting your identity information, go to the\n",(0,s.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/extrinsics",children:"Extrinsics tab in the Polkadot-JS UI"})," and select the\n",(0,s.jsx)(t.code,{children:"identity"})," pallet, then ",(0,s.jsx)(t.code,{children:"requestJudgement"}),". For the ",(0,s.jsx)(t.code,{children:"reg_index"})," put the index of the registrar you\nwant to be judged by, and for the ",(0,s.jsx)(t.code,{children:"max_fee"})," put the maximum you're willing to pay for these\nconfirmations."]}),"\n",(0,s.jsxs)(t.p,{children:["If you don't know which registrar to pick, first check the available registrars by going to\n",(0,s.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/chainstate",children:"Chain State tab in the Polkadot-JS UI"})," and selecting\n",(0,s.jsx)(t.code,{children:"identity.registrars()"})," to get the full list."]}),"\n",(0,s.jsx)(t.p,{children:"To find out how to contact the registrar after the application for judgement or to learn who they\nare, you can check their identity by adding them to your Address Book. Their identity will be\nautomatically loaded."}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{alt:"Chevdor is registrar #1",src:n(71014).A+"",width:"579",height:"217"})}),"\n",(0,s.jsx)(t.admonition,{title:"Requesting judgement through Web3 Foundation Registrar",type:"info",children:(0,s.jsxs)(t.p,{children:["If you requested judgement for your on-chain identity through the Web3 Foundation Registrar (i.e.\nRegistrar #0) you will need to complete a few additional tasks. For more information visit\n",(0,s.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000179747-how-to-use-the-w3f-registrar-page",children:"this support article"}),"."]})}),"\n",(0,s.jsxs)(t.admonition,{type:"caution",children:[(0,s.jsx)(t.p,{children:"The set identity calls go on-chain. Hence, the contact information is available publicly, for both\nlegitimate entities, like registrars or validators, but also scammers who might impersonate them.\nThe strings in the identity fields are good candidates for homograph attacks, as someone could list\na fraudulent website (web3.f0undation instead of web3.foundation for example) and still get verified\nby the registrar (if the checks are automated)!"}),(0,s.jsx)(t.p,{children:"In a decentralized network, one should be cautious making transactions with accounts solely based on\ntheir identity. If an account on-chain claims to be of Web3 Foundation, it is wise to verify its\nauthenticity by checking directly with Web3 Foundation or examining the established history of that\naccount on-chain."})]}),"\n",(0,s.jsx)(t.h2,{id:"clearing-and-killing-an-identity",children:"Clearing and Killing an Identity"}),"\n",(0,s.jsx)(t.admonition,{type:"info",children:(0,s.jsxs)(t.p,{children:['Visit the section "Clear an Identity" on\n',(0,s.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181981",children:"this support article"})," for\nguidelines about clearing identities."]})}),"\n",(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.strong,{children:"Clearing:"})," Users can clear their identity information and have their deposit returned. Clearing\nan identity also clears all sub accounts and returns their deposits."]}),"\n",(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.strong,{children:"Killing:"})," It is is possible to kill an identity that deems erroneous. This results in a slash of\nthe deposit."]}),"\n",(0,s.jsx)(t.h2,{id:"setting-sub-identities",children:"Setting Sub-Identities"}),"\n",(0,s.jsxs)(t.p,{children:["To set up sub-identities with Polkadot-JS see the\n",(0,s.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181991-how-to-set-identities-for-sub-accounts",children:"how to set sub-identities"}),"\nsupport article and this ",(0,s.jsx)(t.a,{href:"https://www.youtube.com/watch?v=0Yh1JYg3ZKU",children:"video tutorial"}),"."]}),"\n",(0,s.jsx)(t.h3,{id:"setting-sub-identity-sub-id-for-your-ledger-account",children:"Setting Sub-Identity (Sub-ID) for your Ledger Account"}),"\n",(0,s.jsxs)(t.p,{children:["Setting an Identity is not possible on Ledger app yet, but as a workaround, you can\n",(0,s.jsx)(t.a,{href:"/docs/learn-identity#setting-an-identity",children:"set the identity for an on-chain account "})," and then\nuse it to set a sub-identity to your Ledger account."]}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:["Go to ",(0,s.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/accounts",children:"https://polkadot.js.org/apps/#/accounts"}),". Click on the three vertical dots corresponding to\nthe account to which you already set identity. You should see an option to set onchain\nsub-identities. Click on it."]}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{alt:"Add sub-identity in PolkadotJS",src:n(69681).A+"",width:"520",height:"338"})}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:["In the pop-up window, select your Ledger account from the dropdown and enter text in sub name\nfield. Then, click on set subs button.\n",(0,s.jsx)(t.img,{alt:"Set sub-identity in PolkadotJS",src:n(48570).A+"",width:"2155",height:"554"})]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsx)(t.p,{children:"Sign and submit the transaction from the parent account with the identity"}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(t.p,{children:["You should now see the sub-identity displayed on-chain. You need to be aware that the creation of\nidentities and sub-identities requires\n",(0,s.jsx)(t.a,{href:"/docs/chain-state-values#identity-deposit",children:"deposits"}),". This reserved account balance is\nfreed once you ",(0,s.jsx)(t.a,{href:"/docs/learn-identity#clearing-and-killing-an-identity",children:"clear the identities"}),"\non the account."]}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{alt:"Sub-identity example",src:n(96323).A+"",width:"370",height:"554"})}),"\n",(0,s.jsx)(t.h2,{id:"registrars",children:"Registrars"}),"\n",(0,s.jsx)(t.h3,{id:"becoming-a-registrar",children:"Becoming a Registrar"}),"\n",(0,s.jsxs)(t.p,{children:["To become a registrar, submit a pre-image and proposal on\n",(0,s.jsx)(t.a,{href:"/docs/learn-guides-polkadot-opengov",children:"OpenGov"}),", then wait for people to vote on it. For best\nresults, write a post about your identity and intentions beforehand, and once the proposal is in the\nqueue ask people to endorse it so that it gets ahead in the referendum queue."]})]})}function u(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}},67141:(e,t,n)=>{n.d(t,{A:()=>o});var i=n(96540),s=n(74848);const o=function(e){var t,n=e.message,o=(0,i.useState)(!0),a=o[0],r=o[1];return(0,s.jsx)(s.Fragment,{children:a&&(0,s.jsxs)("div",{className:"message-box",children:[(0,s.jsx)("button",{className:"close-button",onClick:function(){r(!1)},children:"\u2716 "}),(0,s.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(t=n,t.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},71014:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/16-95dc969648d23cdfdd68bf04135818bb.jpg"},69681:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/sub-id-1-18df099d5c97fdff246815ad91922e32.png"},48570:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/sub-id-2-40b39041ca30296d805003d186f66763.png"},96323:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/sub-id-3-a650cce50e6bfef97c03ebd7b463419c.png"},28453:(e,t,n)=>{n.d(t,{R:()=>a,x:()=>r});var i=n(96540);const s={},o=i.createContext(s);function a(e){const t=i.useContext(o);return i.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:a(e.components),i.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/2be0d940.c5ab2621.js b/assets/js/2be0d940.c5ab2621.js deleted file mode 100644 index 22fa6956d4b7..000000000000 --- a/assets/js/2be0d940.c5ab2621.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4537],{59681:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>r,default:()=>u,frontMatter:()=>a,metadata:()=>d,toc:()=>c});var i=n(74848),s=n(28453),o=n(67141);const a={id:"learn-guides-identity",title:"Polkadot-JS Guides about Identity",sidebar_label:"Identity Guides",description:"Polkadot-JS Guides about Identity.",keywords:["registrar","identity","sub-identity","polkadot-js"],slug:"../learn-guides-identity"},r=void 0,d={id:"learn/learn-guides-identity",title:"Polkadot-JS Guides about Identity",description:"Polkadot-JS Guides about Identity.",source:"@site/../docs/learn/learn-guides-identity.md",sourceDirName:"learn",slug:"/learn-guides-identity",permalink:"/docs/learn-guides-identity",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-identity.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1729847256e3,frontMatter:{id:"learn-guides-identity",title:"Polkadot-JS Guides about Identity",sidebar_label:"Identity Guides",description:"Polkadot-JS Guides about Identity.",keywords:["registrar","identity","sub-identity","polkadot-js"],slug:"../learn-guides-identity"},sidebar:"docs",previous:{title:"Bounty Guides",permalink:"/docs/learn-guides-bounties"},next:{title:"Ledger Guides",permalink:"/docs/learn-guides-ledger"}},l={},c=[{value:"Setting an Identity",id:"setting-an-identity",level:2},{value:"Format Caveat",id:"format-caveat",level:3},{value:"Request Judgement",id:"request-judgement",level:2},{value:"Clearing and Killing an Identity",id:"clearing-and-killing-an-identity",level:2},{value:"Setting Sub-Identities",id:"setting-sub-identities",level:2},{value:"Setting Sub-Identity (Sub-ID) for your Ledger Account",id:"setting-sub-identity-sub-id-for-your-ledger-account",level:3},{value:"Registrars",id:"registrars",level:2},{value:"Becoming a Registrar",id:"becoming-a-registrar",level:3}];function h(e){const t={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(o.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the Polkadot-JS UI, you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,i.jsxs)(t.admonition,{title:"The identity pallet is no longer on the Kusama relay chain.",type:"warning",children:[(0,i.jsxs)(t.p,{children:["If you are on ",(0,i.jsx)(t.strong,{children:"Kusama"}),", any of the extrinsics which require you to use the relay chain now have to\nbe called via the system parachain,\n",(0,i.jsx)(t.a,{href:"https://polkadot.js.org/apps/?rpc=wss://kusama-people-rpc.polkadot.io",children:"which you can find here."})]}),(0,i.jsxs)(t.p,{children:["The identity pallet, along with all of its data, has been migrated to the\n",(0,i.jsx)(t.a,{href:"/docs/glossary#people-chain",children:"People Chain"}),", a system parachain which can now be used for\nidentity management."]})]}),"\n",(0,i.jsxs)(t.p,{children:["This is an advanced guide that is relevant for entities that would like to become registrars or\nwould like to set sub-identities to an existing account with an identity. See\n",(0,i.jsx)(t.a,{href:"/docs/learn-identity",children:"this page"})," to learn about how to set an identity and have it verified."]}),"\n",(0,i.jsx)(t.h2,{id:"setting-an-identity",children:"Setting an Identity"}),"\n",(0,i.jsxs)(t.p,{children:["Users can set an identity by registering through default fields such as legal name, display name,\nwebsite, Twitter handle, Riot handle, etc. along with some extra, custom fields for which they would\nlike attestations (see ",(0,i.jsx)(t.a,{href:"#judgements",children:"Judgements"}),")."]}),"\n",(0,i.jsx)(t.admonition,{title:"Instructions for setting and clearing Identities",type:"info",children:(0,i.jsxs)(t.p,{children:["The procedure to set and clear identities is explained in detail in this support article -\n",(0,i.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181981-how-to-set-and-clear-an-identity",children:"How to set and clear an Identity"})]})}),"\n",(0,i.jsx)(t.admonition,{type:"note",children:(0,i.jsxs)(t.p,{children:["The Ledger app on ",(0,i.jsx)(t.strong,{children:"Nano S"})," doesn't support the extrinsic for setting identity. As a workaround,\ncreate a primary identity with an on-chain account and then using that primary identity, assign a\n",(0,i.jsx)(t.a,{href:"#sub-accounts",children:"sub-identity"})," to the Ledger stash."]})}),"\n",(0,i.jsx)(t.h3,{id:"format-caveat",children:"Format Caveat"}),"\n",(0,i.jsx)(t.p,{children:"Please note the following caveat: because the fields support different formats, from raw bytes to\nvarious hashes, a UI has no way of telling how to encode a given field it encounters. The\nPolkadot-JS UI currently encodes the raw bytes it encounters as UTF8 strings, which makes these\nvalues readable on-screen. However, given that there are no restrictions on the values that can be\nplaced into these fields, a different UI may interpret them as, for example, IPFS hashes or encoded\nbitmaps. This means any field stored as raw bytes will become unreadable by that specific UI. As\nfield standards crystallize, things will become easier to use but for now, every custom\nimplementation of displaying user information will likely have to make a conscious decision on the\napproach to take, or support multiple formats and then attempt multiple encodings until the output\nmakes sense."}),"\n",(0,i.jsx)(t.h2,{id:"request-judgement",children:"Request Judgement"}),"\n",(0,i.jsx)(t.admonition,{title:"Instructions for requesting and cancelling Identity judgements",type:"info",children:(0,i.jsxs)(t.p,{children:["The procedure to request and cancel identity judgments is explained in detail in this\n",(0,i.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181990-how-to-request-and-cancel-identity-judgement",children:"support article"})]})}),"\n",(0,i.jsxs)(t.p,{children:["To be judged after submitting your identity information, go to the\n",(0,i.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/extrinsics",children:"Extrinsics tab in the Polkadot-JS UI"})," and select the\n",(0,i.jsx)(t.code,{children:"identity"})," pallet, then ",(0,i.jsx)(t.code,{children:"requestJudgement"}),". For the ",(0,i.jsx)(t.code,{children:"reg_index"})," put the index of the registrar you\nwant to be judged by, and for the ",(0,i.jsx)(t.code,{children:"max_fee"})," put the maximum you're willing to pay for these\nconfirmations."]}),"\n",(0,i.jsxs)(t.p,{children:["If you don't know which registrar to pick, first check the available registrars by going to\n",(0,i.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/chainstate",children:"Chain State tab in the Polkadot-JS UI"})," and selecting\n",(0,i.jsx)(t.code,{children:"identity.registrars()"})," to get the full list."]}),"\n",(0,i.jsx)(t.p,{children:"To find out how to contact the registrar after the application for judgement or to learn who they\nare, you can check their identity by adding them to your Address Book. Their identity will be\nautomatically loaded."}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"Chevdor is registrar #1",src:n(71014).A+"",width:"579",height:"217"})}),"\n",(0,i.jsx)(t.admonition,{title:"Requesting judgement through Web3 Foundation Registrar",type:"info",children:(0,i.jsxs)(t.p,{children:["If you requested judgement for your on-chain identity through the Web3 Foundation Registrar (i.e.\nRegistrar #0) you will need to complete a few additional tasks. For more information visit\n",(0,i.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000179747-how-to-use-the-w3f-registrar-page",children:"this support article"}),"."]})}),"\n",(0,i.jsxs)(t.admonition,{type:"caution",children:[(0,i.jsx)(t.p,{children:"The set identity calls go on-chain. Hence, the contact information is available publicly, for both\nlegitimate entities, like registrars or validators, but also scammers who might impersonate them.\nThe strings in the identity fields are good candidates for homograph attacks, as someone could list\na fraudulent website (web3.f0undation instead of web3.foundation for example) and still get verified\nby the registrar (if the checks are automated)!"}),(0,i.jsx)(t.p,{children:"In a decentralized network, one should be cautious making transactions with accounts solely based on\ntheir identity. If an account on-chain claims to be of Web3 Foundation, it is wise to verify its\nauthenticity by checking directly with Web3 Foundation or examining the established history of that\naccount on-chain."})]}),"\n",(0,i.jsx)(t.h2,{id:"clearing-and-killing-an-identity",children:"Clearing and Killing an Identity"}),"\n",(0,i.jsx)(t.admonition,{type:"info",children:(0,i.jsxs)(t.p,{children:['Visit the section "Clear an Identity" on\n',(0,i.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181981",children:"this support article"})," for\nguidelines about clearing identities."]})}),"\n",(0,i.jsxs)(t.p,{children:[(0,i.jsx)(t.strong,{children:"Clearing:"})," Users can clear their identity information and have their deposit returned. Clearing\nan identity also clears all sub accounts and returns their deposits."]}),"\n",(0,i.jsxs)(t.p,{children:[(0,i.jsx)(t.strong,{children:"Killing:"})," It is is possible to kill an identity that deems erroneous. This results in a slash of\nthe deposit."]}),"\n",(0,i.jsx)(t.h2,{id:"setting-sub-identities",children:"Setting Sub-Identities"}),"\n",(0,i.jsxs)(t.p,{children:["To set up sub-identities with Polkadot-JS see the\n",(0,i.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181991-how-to-set-identities-for-sub-accounts",children:"how to set sub-identities"}),"\nsupport article and this ",(0,i.jsx)(t.a,{href:"https://www.youtube.com/watch?v=0Yh1JYg3ZKU",children:"video tutorial"}),"."]}),"\n",(0,i.jsx)(t.h3,{id:"setting-sub-identity-sub-id-for-your-ledger-account",children:"Setting Sub-Identity (Sub-ID) for your Ledger Account"}),"\n",(0,i.jsxs)(t.p,{children:["Setting an Identity is not possible on Ledger app yet, but as a workaround, you can\n",(0,i.jsx)(t.a,{href:"/docs/learn-identity#setting-an-identity",children:"set the identity for an on-chain account "})," and then\nuse it to set a sub-identity to your Ledger account."]}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsxs)(t.li,{children:["\n",(0,i.jsxs)(t.p,{children:["Go to ",(0,i.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/accounts",children:"https://polkadot.js.org/apps/#/accounts"}),". Click on the three vertical dots corresponding to\nthe account to which you already set identity. You should see an option to set onchain\nsub-identities. Click on it."]}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"Add sub-identity in PolkadotJS",src:n(69681).A+"",width:"520",height:"338"})}),"\n"]}),"\n",(0,i.jsxs)(t.li,{children:["\n",(0,i.jsxs)(t.p,{children:["In the pop-up window, select your Ledger account from the dropdown and enter text in sub name\nfield. Then, click on set subs button.\n",(0,i.jsx)(t.img,{alt:"Set sub-identity in PolkadotJS",src:n(48570).A+"",width:"2155",height:"554"})]}),"\n"]}),"\n",(0,i.jsxs)(t.li,{children:["\n",(0,i.jsx)(t.p,{children:"Sign and submit the transaction from the parent account with the identity"}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(t.p,{children:["You should now see the sub-identity displayed on-chain. You need to be aware that the creation of\nidentities and sub-identities requires\n",(0,i.jsx)(t.a,{href:"/docs/chain-state-values#identity-deposit",children:"deposits"}),". This reserved account balance is\nfreed once you ",(0,i.jsx)(t.a,{href:"/docs/learn-identity#clearing-and-killing-an-identity",children:"clear the identities"}),"\non the account."]}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"Sub-identity example",src:n(96323).A+"",width:"370",height:"554"})}),"\n",(0,i.jsx)(t.h2,{id:"registrars",children:"Registrars"}),"\n",(0,i.jsx)(t.h3,{id:"becoming-a-registrar",children:"Becoming a Registrar"}),"\n",(0,i.jsxs)(t.p,{children:["To become a registrar, submit a pre-image and proposal on\n",(0,i.jsx)(t.a,{href:"/docs/learn-guides-polkadot-opengov",children:"OpenGov"}),", then wait for people to vote on it. For best\nresults, write a post about your identity and intentions beforehand, and once the proposal is in the\nqueue ask people to endorse it so that it gets ahead in the referendum queue."]})]})}function u(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(h,{...e})}):h(e)}},67141:(e,t,n)=>{n.d(t,{A:()=>o});var i=n(96540),s=n(74848);const o=function(e){var t,n=e.message,o=(0,i.useState)(!0),a=o[0],r=o[1];return(0,s.jsx)(s.Fragment,{children:a&&(0,s.jsxs)("div",{className:"message-box",children:[(0,s.jsx)("button",{className:"close-button",onClick:function(){r(!1)},children:"\u2716 "}),(0,s.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(t=n,t.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},71014:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/16-95dc969648d23cdfdd68bf04135818bb.jpg"},69681:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/sub-id-1-18df099d5c97fdff246815ad91922e32.png"},48570:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/sub-id-2-40b39041ca30296d805003d186f66763.png"},96323:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/sub-id-3-a650cce50e6bfef97c03ebd7b463419c.png"},28453:(e,t,n)=>{n.d(t,{R:()=>a,x:()=>r});var i=n(96540);const s={},o=i.createContext(s);function a(e){const t=i.useContext(o);return i.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:a(e.components),i.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/2d34559d.97b2d9ed.js b/assets/js/2d34559d.97b2d9ed.js deleted file mode 100644 index 8d80515c6ebb..000000000000 --- a/assets/js/2d34559d.97b2d9ed.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7893],{24275:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>c,contentTitle:()=>o,default:()=>d,frontMatter:()=>s,metadata:()=>r,toc:()=>l});var t=i(74848),a=i(28453);const s={id:"learn-jam-chain",title:"Polkadot's JAM Chain",sidebar_label:"JAM Chain",description:"Polkadot's Join-Accumulate Machine.",keywords:["Polkadot","JAM","join-accumulate"],slug:"../learn-jam-chain"},o=void 0,r={id:"learn/learn-jam-chain",title:"Polkadot's JAM Chain",description:"Polkadot's Join-Accumulate Machine.",source:"@site/../docs/learn/learn-jam-chain.md",sourceDirName:"learn",slug:"/learn-jam-chain",permalink:"/docs/learn-jam-chain",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-jam-chain.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1726730833e3,frontMatter:{id:"learn-jam-chain",title:"Polkadot's JAM Chain",sidebar_label:"JAM Chain",description:"Polkadot's Join-Accumulate Machine.",keywords:["Polkadot","JAM","join-accumulate"],slug:"../learn-jam-chain"},sidebar:"docs",previous:{title:"JAM",permalink:"/docs/learn-jam"},next:{title:"JAM FAQ",permalink:"/docs/learn-jam-faq"}},c={},l=[{value:"A Rollup Chain",id:"a-rollup-chain",level:2},{value:"Smart Contract Similarity",id:"smart-contract-similarity",level:2},{value:"Service Entry Points",id:"service-entry-points",level:2},{value:"JAM is Transactionless",id:"jam-is-transactionless",level:3},{value:"Refine Function",id:"refine-function",level:3},{value:"Accumulate Function",id:"accumulate-function",level:3},{value:"On-transfer Function",id:"on-transfer-function",level:3},{value:"JAM Chain's Generalization",id:"jam-chains-generalization",level:2},{value:"Polkadot Virtual Machine (PVM)",id:"polkadot-virtual-machine-pvm",level:2},{value:"SAFROLE",id:"safrole",level:2},{value:"Networking",id:"networking",level:2},{value:"Pipelining for Efficient Block Processing",id:"pipelining-for-efficient-block-processing",level:2},{value:"Architectural Differences: JAM vs. Relay Chain",id:"architectural-differences-jam-vs-relay-chain",level:2},{value:"JAM Toaster",id:"jam-toaster",level:2},{value:"JAM and Substrate",id:"jam-and-substrate",level:2},{value:"Benchmarks vs. Metering",id:"benchmarks-vs-metering",level:3},{value:"XCMP",id:"xcmp",level:3},{value:"Accords",id:"accords",level:3},{value:"Boosting Efficiency",id:"boosting-efficiency",level:3},{value:"Enhancements and Compatibility in JAM",id:"enhancements-and-compatibility-in-jam",level:2}];function h(e){const n={a:"a",admonition:"admonition",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",strong:"strong",ul:"ul",...(0,a.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.admonition,{type:"info",children:(0,t.jsxs)(n.p,{children:["JAM paper is available at ",(0,t.jsx)(n.a,{href:"https://graypaper.com/",children:"graypaper.com"})," and the information regarding JAM\nprize is available at ",(0,t.jsx)(n.a,{href:"https://jam.web3.foundation/",children:"jam.web3.foundation"}),". Download the printable\nversion of the graypaper ",(0,t.jsx)(n.a,{target:"_blank","data-noBrokenLinkCheck":!0,href:i(98577).A+"",children:"here"}),"."]})}),"\n",(0,t.jsxs)(n.p,{children:["JAM, short for Join-Accumulate Machine, represents a prospective design to succeed the relay chain.\nIts name originates from CoreJAM, denoting Collect Refine Join Accumulate, which outlines the\ncomputation model the machine embodies and that was\n",(0,t.jsx)(n.a,{href:"https://github.com/polkadot-fellows/RFCs/blob/006a9ff07c3d3bc5316c6bf63b05e966e694cc2d/text/corejam.md",children:"first described in an RFC by Gavin Wood"}),".\nHowever, within the actual chain, only the Join and Accumulate functions are executed, while the\nCollect and Refine processes occur off-chain."]}),"\n",(0,t.jsx)(n.p,{children:"Unlike the current iterative approach, JAM will be introduced as a comprehensive singular upgrade.\nSeveral factors contribute to this decision:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"A unified upgrade allows for precise restriction of post-upgrade actions, which is challenging\nwith an iterative approach."}),"\n",(0,t.jsx)(n.li,{children:"It mitigates the constant stream of minor upgrades and breaking changes that occur regularly over\nweeks or months."}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"While this shift entails a significant breaking change, efforts will be made to minimize its impact\nto manageable levels. Consolidating multiple smaller breaking changes into a single transition is\ndeemed preferable, introducing a novel blockchain concept that uniquely integrates various existing\nideas."}),"\n",(0,t.jsx)(n.h2,{id:"a-rollup-chain",children:"A Rollup Chain"}),"\n",(0,t.jsx)(n.p,{children:"JAM will be a domain-specific chain that handles one particular domain of problems. In this case,\nroll-ups. JAM's rollups are heavily bounded in terms of their security. This is what Polkadot has\nbeen doing for the last five years, it is already a highly domain-specific roll-up chain. JAM\nessentially makes it less opinionated and more generic."}),"\n",(0,t.jsx)(n.p,{children:"The JAM chain accepts outputs of roll-ups, in more general terms, bits of computation done\nelsewhere, and integrates the outputs into a shared state, similarly to how the Polkadot relay chain\nfunctions."}),"\n",(0,t.jsx)(n.p,{children:"The job of the JAM chain is to provide the necessary apparatus to ensure that the output correctly\nreflects the input when it goes through the transformation it's meant to have undergone."}),"\n",(0,t.jsx)(n.h2,{id:"smart-contract-similarity",children:"Smart Contract Similarity"}),"\n",(0,t.jsx)(n.p,{children:"JAM exhibits several similarities with a smart contract chain:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Permissionless code execution occurs directly on the JAM chain itself."}),"\n",(0,t.jsx)(n.li,{children:"The state of the JAM chain is organized into distinct encapsulations."}),"\n",(0,t.jsx)(n.li,{children:"Alongside state, encapsulations encompass code and balance."}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["These encapsulations of state are termed ",(0,t.jsx)(n.strong,{children:"services"}),". Thus, the JAM state is partitioned into\nservices. The creation of a new service is permissionless, akin to deploying a smart contract on a\nsmart contract chain. Consequently, adding a new service to the JAM chain does not necessitate\napproval from any authority or adherence to governance mechanisms, unlike Substrate-based chains\nthat mandate governance approval for adding new pallets. Services encompass code, balance, and\ncertain state components, resembling the structure commonly observed on a smart contract chain."]}),"\n",(0,t.jsx)(n.h2,{id:"service-entry-points",children:"Service Entry Points"}),"\n",(0,t.jsx)(n.p,{children:"JAM services' code is split into three different entry points:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Refine"})," is the function that does the mostly stateless computation. It defines the\ntransformation for the rollup for a specific service."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Accumulate"})," is the function that takes the output of that and folds it into the overall state\nof the service"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"OnTransfer"})," handles information coming from other services."]}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Work packages"})," are the input to a service. Work packages can have many ",(0,t.jsx)(n.strong,{children:"work items"})," in them.\nEvery work item is associated with a service, and it reflects the actual input to the service. For\nthe parachains service, this is where the transactions and all of the blockchain inputs are entered."]}),"\n",(0,t.jsxs)(n.p,{children:["The JAM security apparatus consists a two-stage processing where the Refine function accepts a work\nitem as an input and yields a work result as an output, which gets fed into the Accumulate function\n(first Refine, then Accumulate). Work items are refined into ",(0,t.jsx)(n.strong,{children:"work results"}),", and therefore, a work\npackage containing many work items is refined into a ",(0,t.jsx)(n.strong,{children:"work report"}),", which is the corresponding\nresults of several items. A work package can be assigned that uses one core for a specific time slot\n(typically a period of 6 seconds)."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"refine-accumulate",src:i(40044).A+"",width:"1874",height:"1052"})}),"\n",(0,t.jsx)(n.h3,{id:"jam-is-transactionless",children:"JAM is Transactionless"}),"\n",(0,t.jsx)(n.p,{children:"JAM distinguishes itself from smart contract chains by operating transactionlessly. There are no\ntransactions within JAM; all actions are permissionless and initially undergo a Refine stage. During\nthis stage, the service pre-refines input data, transforming it into work reports consisting of work\nresults. Subsequently, these work results are transferred onto the chain."}),"\n",(0,t.jsx)(n.p,{children:"Despite the absence of transactions, JAM still accommodates extrinsic information of a specific\nformat. There are five types of extrinsic information:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Guarantees"}),"\n",(0,t.jsx)(n.li,{children:"Assurances"}),"\n",(0,t.jsx)(n.li,{children:"Judgments"}),"\n",(0,t.jsx)(n.li,{children:"Preimages"}),"\n",(0,t.jsx)(n.li,{children:"Tickets"}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"The first three types form part of the JAM chain's security framework. Guarantees and assurances\ninvolve validators collectively attesting that a work result accurately reflects the outcome of its\ncorresponding work item after transformation through the service's refine function."}),"\n",(0,t.jsx)(n.p,{children:"Judgments occur when then integrity of a work result is considered uncertain and a large plurality\nof validators attest to its validity or lack thereof. In this case an invalid work item may already\nhave been integrated into the service\u2019s state and a rollback may need to happen. Judgments must\noccur within one hour of submitting the work report to the chain, during which finality is\ntemporarily paused."}),"\n",(0,t.jsx)(n.p,{children:"Preimages represent a feature provided by the JAM chain for the refine function. While the refine\nfunction is typically stateless, it can perform one stateful operation: looking up the preimage of a\nhash. This feature is the only opinionated aspect of the refine function."}),"\n",(0,t.jsxs)(n.p,{children:["Tickets serve as anonymous entries into the block production mechanism. They are not immediately\nrequired for block production; instead, the system operates two epochs in advance. This mechanism is\npart of the SAFROLE algorithm, a refined version of the original ",(0,t.jsx)(n.a,{href:"/docs/learn-safrole",children:"SASSAFRAS"}),"\nalgorithm."]}),"\n",(0,t.jsx)(n.h3,{id:"refine-function",children:"Refine Function"}),"\n",(0,t.jsxs)(n.p,{children:["In the Refine processing stage within JAM, up to 15 MB of data can be accepted during each time\nslot, which lasts 6 seconds. However, Refine yields a maximum of 90 kB of data, resulting in\nsignificant data compaction that is necessary due to the distributed nature of\n",(0,t.jsx)(n.a,{href:"/docs/learn-parachains-protocol#availability-and-validity-anv-protocol",children:"the availability system"}),".\nFor instance, in the context of a parachain, the 15 MB of data represents the\n",(0,t.jsx)(n.a,{href:"/docs/learn-parachains-protocol#protocols-summary",children:"Proof of Validity (PoV)"}),", while the 90 kB of data\ncorresponds to the ",(0,t.jsx)(n.a,{href:"/docs/learn-parachains-protocol#candidate-receipts",children:"candidate receipt"}),"."]}),"\n",(0,t.jsxs)(n.p,{children:["Refine can execute for up to 6 seconds of ",(0,t.jsx)(n.a,{href:"#polkadot-virtual-machine-pvm",children:"PVM"})," gas, equivalent to\nthe full block period of the relay chain. This extended execution time, compared to the current\nlimit of two seconds for PVFs, is facilitated by ",(0,t.jsx)(n.a,{href:"#benchmarks-vs-metering",children:"secure metering"})," and\nother optimizations inherent to PVM."]}),"\n",(0,t.jsx)(n.p,{children:"Preimage lookups can also be conducted within Refine. If a hash and its associated preimage are\nbelieved to be available on the JAM chain, the preimage can be requested by providing the hash. This\ncapability enables efficient storage and retrieval of code, such as parachain code, by storing the\ncode on the JAM chain and referencing its hash in the work package."}),"\n",(0,t.jsx)(n.p,{children:"Refine is the primary processing workhorse, handling tasks with largely stateless operations."}),"\n",(0,t.jsx)(n.h3,{id:"accumulate-function",children:"Accumulate Function"}),"\n",(0,t.jsx)(n.p,{children:"The accumulate function is responsible for integrating the output generated by the Refine function\ninto the chain state. Accumulate can accept multiple outputs from Refine, all originating from the\nsame service. Both Refine and Accumulate serve as entry points from a service-specific code blob."}),"\n",(0,t.jsx)(n.p,{children:"Accumulate's execution time per output is considerably shorter than Refine\u2019s, typically around 10\nmilliseconds at most. However, the duration depends on factors such as the number of work items in\nthe work package. If a work package contains multiple items, the available time is divided among\nthem."}),"\n",(0,t.jsx)(n.p,{children:"Unlike Refine, Accumulate is stateful, granting it access to the JAM chain's state. It can read\nstorage from any service, write to its key-value store, transfer funds, and include a memo with fund\ntransfers. Additionally, Accumulate can create new services, upgrade its code, and request preimage\navailability, among other functionalities."}),"\n",(0,t.jsx)(n.p,{children:"Moreover, Refine can invoke child instances of the PVM. This allows for creating sub-instances, or\nvirtual machines, where code and data can be deployed, memory and stack configurations can be\ncustomized, and computations can be executed within a flexible framework."}),"\n",(0,t.jsx)(n.h3,{id:"on-transfer-function",children:"On-transfer Function"}),"\n",(0,t.jsx)(n.p,{children:"The onTransfer function within the JAM system is also stateful, enabling it to modify the service's\nstate. It has the capability to inspect the state of other services and make changes to its own\nstate. This functionality facilitates communication between services, albeit in an asynchronous\nmanner."}),"\n",(0,t.jsx)(n.p,{children:"Unlike many smart contract platforms, where interactions occur synchronously, in JAM the interaction\nbetween encapsulated components, such as smart contracts or services in this case, happens\nasynchronously. Messages, along with tokens, are sent, and at some point later during the same\nsix-second execution period, the receiving service processes them. There is no immediate return\npath; if a return path is needed, the sending service must initiate another transfer or modify its\nstate in a way that the receiving service can later interpret."}),"\n",(0,t.jsx)(n.p,{children:"Both Accumulate and onTransfer are designed to be executed in parallel, allowing different services'\naccumulation and transfers to occur simultaneously. This design opens the possibility for future\nenhancements, such as allocating more than the current 10 milliseconds of gas input. In theory, a\nsecondary core could be utilized to execute certain accumulations, providing them with significantly\nmore gas to utilize."}),"\n",(0,t.jsx)(n.h2,{id:"jam-chains-generalization",children:"JAM Chain's Generalization"}),"\n",(0,t.jsx)(n.p,{children:"Polkadot, as outlined in the original Polkadot white paper, is primarily tailored to a specific\nservice profile: delivering parachains. In pursuit of this service, Polkadot has developed two\nessential subcomponents:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"the distributed data availability system"}),"\n",(0,t.jsx)(n.li,{children:"the auditing and guarantees system for computation (i.e. a roll-up system with robust security\nguarantees)"}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"JAM represents a reduction in the level of opinionation compared to Polkadot, offering a higher\nlevel of abstraction and generalization. This facilitates easier utilization of underlying\ncomponents according to individual preferences."}),"\n",(0,t.jsx)(n.p,{children:"JAM operates in a permissionless manner, akin to smart contract chains, allowing individuals to\nupload and expect the execution of code. Additionally, it hosts data, enables preimage lookup, and\nmanages state, resembling a key-value pair system. The genesis block of JAM includes a service to\nfacilitate the creation of new services since JAM lacks a mechanism for accepting transactions\ndirectly."}),"\n",(0,t.jsxs)(n.p,{children:["Services within JAM have no predefined limits on the amount of code, data, or state they can\naccommodate. Their capabilities are determined by crypto-economic factors; the more DOT tokens\ndeposited, the greater capacity for data and state. For instance, ",(0,t.jsx)(n.strong,{children:"the parachains service"}),"\nconsolidates all Polkadot 1.1 functionality within a single service on JAM, with the potential for\nadditional services to leverage Polkadot's distributed availability system, and auditing and\nguarantees system for computation."]}),"\n",(0,t.jsx)(n.h2,{id:"polkadot-virtual-machine-pvm",children:"Polkadot Virtual Machine (PVM)"}),"\n",(0,t.jsx)(n.p,{children:"The PVM design is rooted in the RISC-V ISA (Instruction Set Architecture), known for its simplicity\nand versatility. The RISC-V ISA offers several advantages:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"It is easy to transpile into common hardware formats such as x86, x64, and ARM."}),"\n",(0,t.jsxs)(n.li,{children:["It is well-supported by tooling like ",(0,t.jsx)(n.a,{href:"https://llvm.org/",children:"LLVM"})]}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"The PVM itself embodies simplicity and security, being sandboxable and offering various execution\nguarantees. It is deterministic, consensus-sensitive, and friendly to metering. Unlike other VMs,\nthe PVM lacks complexity and excessive opinionation."}),"\n",(0,t.jsx)(n.p,{children:"WASM, while optimized for web use cases, presents challenges with stack management, particularly in\nhandling continuations. RISC-V addresses this issue by placing the stack in memory, facilitating\ncontinuations handling naturally without additional complexity."}),"\n",(0,t.jsx)(n.p,{children:"Additionally, the PVM demonstrates exceptional execution speeds, especially when run on conventional\nhardware like X64 and ARM, offering advantages such as free metering compared to WASM."}),"\n",(0,t.jsx)(n.p,{children:"The incorporation of RISC-V-enabled continuations is poised to establish a new standard for scalable\ncoding across multi-core platforms like JAM. Asynchronous, parallelized architectures are\nincreasingly essential for scalability in both hardware and software platforms, a trend that is\nexpected to extend to blockchain and consensus algorithms."}),"\n",(0,t.jsx)(n.h2,{id:"safrole",children:"SAFROLE"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.a,{href:"/docs/learn-safrole",children:"SAFROLE"})," is a block production algorithm, a simplification of\n",(0,t.jsx)(n.a,{href:"https://research.web3.foundation/Polkadot/protocols/block-production/SASSAFRAS",children:"SASSAFRAS"}),". It\nexcludes some components that may be useful for parachains. So parachains may probably stick with\nSASSAFRAS rather SAFROLE. SAFROLE will be as simple as possible to:"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Ensure that it is as minimally opinionated as possible to maximize the potential future use cases"}),"\n",(0,t.jsx)(n.li,{children:"To follow in the footsteps of Ethereum yellow paper, and really try to get as many implementations\nas possible to try and spread the expertise."}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"Understanding how Polkadot 1.0 works end-to-end is challenging. With JAM, someone who is capable of\nreading and understanding the yellow paper would be able to read and understand fairly quickly how\nJAM works. So simplicity is crucial."}),"\n",(0,t.jsx)(n.h2,{id:"networking",children:"Networking"}),"\n",(0,t.jsxs)(n.p,{children:["Networking for JAM uses the ",(0,t.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/QUIC",children:"QUIC protocol"}),". This allows direct\npoint-to-point connections between a large numbers of validators. So essentially all 1,000-plus\nvalidators on Polkadot can have a persistent connection to each other without potential issues with\nsockets. Gossip is avoided, mostly because it is not needed, because JAM will not handle\ntransactions. In case of distributing something that's not point-to-point or within a very small\nsubset validators, grid-diffusal will be used, in which validators are arranged into a grid, and\npackages are sent by a row, and then each node on the row sends it to all members of its column."]}),"\n",(0,t.jsx)(n.h2,{id:"pipelining-for-efficient-block-processing",children:"Pipelining for Efficient Block Processing"}),"\n",(0,t.jsx)(n.p,{children:"In state-based blockchains like Ethereum, the header of blocks typically contains the posterior\nstate root, summarizing the state after all block computations. Consequently, the header cannot be\nsent until all computations are complete. However, some computations can be performed before sending\nthe header, as their outcomes determine the block's validity."}),"\n",(0,t.jsx)(n.p,{children:"In JAM, a different approach is adopted by placing the prior state root in the header instead of the\nposterior state root. This means that the state roots featured in the header lag by one block. As a\nresult, lightweight computations, comprising approximately 5% of the block's workload or execution\ntime, can be executed, and the block can be distributed immediately afterward. The remaining 95% of\nthe block's computation, primarily accumulation tasks, can be completed subsequently. This enables\nthe next block to be started before the execution of the current block is finished."}),"\n",(0,t.jsx)(n.p,{children:"This approach allows for more efficient utilization of time between blocks. In traditional setups\nlike Polkadot's six-second block time, where the posterior state root must be provided, only a\nportion of the time can be used for computation. However, with pipelining in JAM, the entire block\ntime can be effectively utilized for computations, maximizing efficiency."}),"\n",(0,t.jsx)(n.p,{children:"While using the full block time for computation may not be ideal, as it could lead to perpetual\ncatching up and delayed block imports, JAM's approach enables significantly more time for\ncomputation compared to traditional setups. This means that approximately three to three and a half\nseconds of effective block computation time can be achieved, a substantial improvement over the\ncurrent setup."}),"\n",(0,t.jsx)(n.h2,{id:"architectural-differences-jam-vs-relay-chain",children:"Architectural Differences: JAM vs. Relay Chain"}),"\n",(0,t.jsx)(n.p,{children:"One of the architectural distinctions between JAM and the relay chain lies in the degree to which\nfunctionality is fixed. While the relay chain fixes certain elements, such as the language used to\ndefine the protocol (WASM), JAM goes further in this regard. For instance, it dictates the type used\nfor encoding the block header and the hashing scheme, making alterations to these aspects\nchallenging."}),"\n",(0,t.jsx)(n.p,{children:"However, flexibility comparable to that enabled by the WebAssembly meta-protocol in the relay chain\nis preserved in JAM through its service model. In this model, upgradability responsibility is\nshifted to services, freeing the chain itself from the burden of being upgradable. Three primary\nreasons support this decision:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Simplicity is prioritized. Maintaining a non-upgradable chain significantly reduces complexity."}),"\n",(0,t.jsx)(n.li,{children:"The relay chain's tendency to introduce complex functionalities without removing older ones\ncomplicates matters. Because upgrades are easily implemented, there's little incentive to simplify\nthe Substrate SDK. Consequently, replicating Polkadot becomes impractical."}),"\n",(0,t.jsx)(n.li,{children:"The potential for optimization afforded by JAM's fixed parameters. With a clear understanding of\nthe specific tasks the JAM chain must perform and the ability to set fixed parameters,\noptimizations in areas like network topology and timing become feasible. This contrasts with the\nchallenges posed by the relay chain's highly upgradable nature, where such optimizations are more\ncomplex due to the frequent alterations possible with each upgrade."}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"Despite these differences, JAM retains flexibility in application-level functionalities, such as\ncoretime sales, staking, and governance, all managed within services. Additionally, JAM introduces a\nnovel concept by associating a token balance with a service, providing opportunities for economic\nmodel adjustments that are not easily achievable in purely upgradable chains like the relay chain."}),"\n",(0,t.jsx)(n.h2,{id:"jam-toaster",children:"JAM Toaster"}),"\n",(0,t.jsx)(n.p,{children:"One of the ongoing efforts in ensuring that JAM meets its original expectations involves\nestablishing a comprehensive test environment for the JAM chain. Unlike small-scale test networks\nrunning on unreliable hardware to manage cloud computing costs, this initiative entails a\nsubstantial investment. Introducing the JAM toaster, essentially a test platform designed for\nconducting large-scale trials and performance assessments of JAM. This addresses a prior challenge\nencountered during the development of the Polkadot relay chain, where understanding the emergent\neffects and dynamics of operating a network at such scale proved difficult. Previous attempts were\nlimited to a few dozen nodes on a test network and the Kusama network, which lacks comprehensive\nmonitoring capabilities due to restrictions on accessing validator nodes. Conversely, the\nsmall-scale test network failed to accurately simulate the network dynamics of a larger-scale\ndeployment. The JAM toaster aims to bridge this gap by enabling in-depth research at the scale of\nthe entire JAM network, comprising 1,023 nodes. This platform facilitates the investigation of\nnetwork behavior and performance characteristics, providing valuable insights for developers\nregarding the expected performance of their parachains."}),"\n",(0,t.jsx)(n.h2,{id:"jam-and-substrate",children:"JAM and Substrate"}),"\n",(0,t.jsx)(n.h3,{id:"benchmarks-vs-metering",children:"Benchmarks vs. Metering"}),"\n",(0,t.jsx)(n.p,{children:"Benchmarks, or performance tests, can be optional when working with JAM. While they may still be\nnecessary on occasion, JAM's metered system can often obviate the need for frequent benchmarking.\nJAM operates on a metered system, allowing users to assess computational workload after completion.\nAdditionally, there's a theoretical mechanism to control computation, typically implemented at block\nconstruction time."}),"\n",(0,t.jsx)(n.p,{children:"However, there are scenarios where benchmarking remains relevant. For instance, when metering is\ndeemed too conservative for certain use cases, benchmarking might be necessary to enhance\nperformance. Additionally, benchmarking could be useful for tasks requiring extended execution\ntimes, ensuring they aren't run excessively long."}),"\n",(0,t.jsx)(n.h3,{id:"xcmp",children:"XCMP"}),"\n",(0,t.jsxs)(n.p,{children:['Moving on to Cross-Chain Message Passing (XCMP), JAM mandates full XCMP support. This is because\nwithin the relay chain, there\'s a provision for passing more data via a candidate receipt than would\nbe practical if all parachains transmitted all data all the time. JAM adheres strictly to rules,\neven for parachain services, including limitations on data transmission between the "refine" and\n"accumulate" phases. Currently, with\n',(0,t.jsx)(n.a,{href:"/docs/learn-xcm-transport#hrmp-xcmp-lites",children:"Horizontal relay chain Message Passing (HRMP)"}),", all\nmessages traverse the relay chain, constraining the data payload to 4 kB or less, which might not be\nrealistic. Thus, XCMP, where only message headers are relayed via the chain while the actual message\ndata is transmitted off-chain, emerges as a necessary and overdue improvement."]}),"\n",(0,t.jsx)(n.h3,{id:"accords",children:"Accords"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.a,{href:"/docs/polkadot-direction#xcm-and-accords",children:"Accords"})," essentially encapsulate state and logic,\nresembling smart contracts, with multiple instances residing alongside each parachain. They\nfacilitate message exchange between instances and enable synchronous interactions with parachains.\nAccords find utility in scenarios where trust between parachains is lacking, such as token\ntransfers. Unlike the existing method involving a reserve intermediary, Accords streamline direct\ntoken teleportation between parachains, eliminating the need for trust-compromising intermediaries.\nMoreover, Accords could function as XCM forwarding mechanisms, ensuring message integrity even when\nrelayed through third-party intermediaries, thus eliminating the need for explicit origin markers."]}),"\n",(0,t.jsx)(n.h3,{id:"boosting-efficiency",children:"Boosting Efficiency"}),"\n",(0,t.jsx)(n.p,{children:"Lastly, JAM's broader, less opinionated approach to leveraging underlying consensus mechanisms makes\nit conducive to implementing more innovative solutions. For instance, distributed availability for\ncomplex tasks like zero-knowledge proofs becomes more practical and efficient with JAM.\nAdditionally, JAM supports a mixed resource consumption model, wherein work packages can contain\nboth computationally intensive tasks and data-heavy operations. By pairing services with diverse\nresource requirements, such as those needing extensive computation with those necessitating high\ndata availability, JAM optimizes the utilization of validators' resources, thereby reducing costs.\nThis flexible approach enables the combination of tasks like distributed availability and SNARK\nverification with parachain workloads, driving down costs while enhancing efficiency."}),"\n",(0,t.jsx)(n.h2,{id:"enhancements-and-compatibility-in-jam",children:"Enhancements and Compatibility in JAM"}),"\n",(0,t.jsx)(n.p,{children:"JAM's design prioritizes compatibility with existing Polkadot 1 parachains. While it maintains\ncompatibility with the Polkadot SDK, the Polkadot Validator Function (PVF) undergoes retargeting.\nInstead of WebAssembly, it will target the Polkadot Virtual Machine (PVM). This transition is\nfacilitated by the fact that PVM is a minor modification of RISC-V, which has already been\nestablished as an official LLVM target. Consequently, PVM could become an official LLVM target\nbefore the deployment of JAM."}),"\n",(0,t.jsx)(n.p,{children:"Beyond serving as a host for parachains, JAM introduces significant enhancements. It offers the\npotential to streamline benchmarking efforts and alleviate future benchmarking requirements.\nAdditionally, JAM introduces the concept of accords, multi-instance, multi-sharded smart contracts\nthat govern and enforce specific interaction protocols between parachains. Furthermore, full\nCross-Chain Message Passing (XCMP) support is essential, enabling the removal of limitations on\ninformation transfer between parachains, typically facilitated by Cross-Chain Messages (XCM)."}),"\n",(0,t.jsx)(n.p,{children:"Regarding Agile Coretime, JAM retains compatibility with existing setups. However, it introduces the\ncapability to target coretime not only at parachains but also at arbitrary sets of work packages.\nThis flexibility enhances the versatility and efficiency of resource allocation within the JAM\necosystem."})]})}function d(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(h,{...e})}):h(e)}},98577:(e,n,i)=>{i.d(n,{A:()=>t});const t=i.p+"assets/files/graypaper_inverted_no_background-c91065921202b42b4203049d643a76a4.pdf"},40044:(e,n,i)=>{i.d(n,{A:()=>t});const t=i.p+"assets/images/refine-accumulate-376dcd569f7a4b6f1ed20798f522bd0e.png"},28453:(e,n,i)=>{i.d(n,{R:()=>o,x:()=>r});var t=i(96540);const a={},s=t.createContext(a);function o(e){const n=t.useContext(s);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:o(e.components),t.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/2d34559d.a27a9d77.js b/assets/js/2d34559d.a27a9d77.js new file mode 100644 index 000000000000..e1293ded6169 --- /dev/null +++ b/assets/js/2d34559d.a27a9d77.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7893],{95754:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>c,contentTitle:()=>r,default:()=>d,frontMatter:()=>o,metadata:()=>t,toc:()=>l});const t=JSON.parse('{"id":"learn/learn-jam-chain","title":"Polkadot\'s JAM Chain","description":"Polkadot\'s Join-Accumulate Machine.","source":"@site/../docs/learn/learn-jam-chain.md","sourceDirName":"learn","slug":"/learn-jam-chain","permalink":"/docs/learn-jam-chain","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-jam-chain.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1726730833000,"frontMatter":{"id":"learn-jam-chain","title":"Polkadot\'s JAM Chain","sidebar_label":"JAM Chain","description":"Polkadot\'s Join-Accumulate Machine.","keywords":["Polkadot","JAM","join-accumulate"],"slug":"../learn-jam-chain"},"sidebar":"docs","previous":{"title":"JAM","permalink":"/docs/learn-jam"},"next":{"title":"JAM FAQ","permalink":"/docs/learn-jam-faq"}}');var a=i(74848),s=i(28453);const o={id:"learn-jam-chain",title:"Polkadot's JAM Chain",sidebar_label:"JAM Chain",description:"Polkadot's Join-Accumulate Machine.",keywords:["Polkadot","JAM","join-accumulate"],slug:"../learn-jam-chain"},r=void 0,c={},l=[{value:"A Rollup Chain",id:"a-rollup-chain",level:2},{value:"Smart Contract Similarity",id:"smart-contract-similarity",level:2},{value:"Service Entry Points",id:"service-entry-points",level:2},{value:"JAM is Transactionless",id:"jam-is-transactionless",level:3},{value:"Refine Function",id:"refine-function",level:3},{value:"Accumulate Function",id:"accumulate-function",level:3},{value:"On-transfer Function",id:"on-transfer-function",level:3},{value:"JAM Chain's Generalization",id:"jam-chains-generalization",level:2},{value:"Polkadot Virtual Machine (PVM)",id:"polkadot-virtual-machine-pvm",level:2},{value:"SAFROLE",id:"safrole",level:2},{value:"Networking",id:"networking",level:2},{value:"Pipelining for Efficient Block Processing",id:"pipelining-for-efficient-block-processing",level:2},{value:"Architectural Differences: JAM vs. Relay Chain",id:"architectural-differences-jam-vs-relay-chain",level:2},{value:"JAM Toaster",id:"jam-toaster",level:2},{value:"JAM and Substrate",id:"jam-and-substrate",level:2},{value:"Benchmarks vs. Metering",id:"benchmarks-vs-metering",level:3},{value:"XCMP",id:"xcmp",level:3},{value:"Accords",id:"accords",level:3},{value:"Boosting Efficiency",id:"boosting-efficiency",level:3},{value:"Enhancements and Compatibility in JAM",id:"enhancements-and-compatibility-in-jam",level:2}];function h(e){const n={a:"a",admonition:"admonition",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.admonition,{type:"info",children:(0,a.jsxs)(n.p,{children:["JAM paper is available at ",(0,a.jsx)(n.a,{href:"https://graypaper.com/",children:"graypaper.com"})," and the information regarding JAM\nprize is available at ",(0,a.jsx)(n.a,{href:"https://jam.web3.foundation/",children:"jam.web3.foundation"}),". Download the printable\nversion of the graypaper ",(0,a.jsx)(n.a,{target:"_blank","data-noBrokenLinkCheck":!0,href:i(98577).A+"",children:"here"}),"."]})}),"\n",(0,a.jsxs)(n.p,{children:["JAM, short for Join-Accumulate Machine, represents a prospective design to succeed the relay chain.\nIts name originates from CoreJAM, denoting Collect Refine Join Accumulate, which outlines the\ncomputation model the machine embodies and that was\n",(0,a.jsx)(n.a,{href:"https://github.com/polkadot-fellows/RFCs/blob/006a9ff07c3d3bc5316c6bf63b05e966e694cc2d/text/corejam.md",children:"first described in an RFC by Gavin Wood"}),".\nHowever, within the actual chain, only the Join and Accumulate functions are executed, while the\nCollect and Refine processes occur off-chain."]}),"\n",(0,a.jsx)(n.p,{children:"Unlike the current iterative approach, JAM will be introduced as a comprehensive singular upgrade.\nSeveral factors contribute to this decision:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:"A unified upgrade allows for precise restriction of post-upgrade actions, which is challenging\nwith an iterative approach."}),"\n",(0,a.jsx)(n.li,{children:"It mitigates the constant stream of minor upgrades and breaking changes that occur regularly over\nweeks or months."}),"\n"]}),"\n",(0,a.jsx)(n.p,{children:"While this shift entails a significant breaking change, efforts will be made to minimize its impact\nto manageable levels. Consolidating multiple smaller breaking changes into a single transition is\ndeemed preferable, introducing a novel blockchain concept that uniquely integrates various existing\nideas."}),"\n",(0,a.jsx)(n.h2,{id:"a-rollup-chain",children:"A Rollup Chain"}),"\n",(0,a.jsx)(n.p,{children:"JAM will be a domain-specific chain that handles one particular domain of problems. In this case,\nroll-ups. JAM's rollups are heavily bounded in terms of their security. This is what Polkadot has\nbeen doing for the last five years, it is already a highly domain-specific roll-up chain. JAM\nessentially makes it less opinionated and more generic."}),"\n",(0,a.jsx)(n.p,{children:"The JAM chain accepts outputs of roll-ups, in more general terms, bits of computation done\nelsewhere, and integrates the outputs into a shared state, similarly to how the Polkadot relay chain\nfunctions."}),"\n",(0,a.jsx)(n.p,{children:"The job of the JAM chain is to provide the necessary apparatus to ensure that the output correctly\nreflects the input when it goes through the transformation it's meant to have undergone."}),"\n",(0,a.jsx)(n.h2,{id:"smart-contract-similarity",children:"Smart Contract Similarity"}),"\n",(0,a.jsx)(n.p,{children:"JAM exhibits several similarities with a smart contract chain:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:"Permissionless code execution occurs directly on the JAM chain itself."}),"\n",(0,a.jsx)(n.li,{children:"The state of the JAM chain is organized into distinct encapsulations."}),"\n",(0,a.jsx)(n.li,{children:"Alongside state, encapsulations encompass code and balance."}),"\n"]}),"\n",(0,a.jsxs)(n.p,{children:["These encapsulations of state are termed ",(0,a.jsx)(n.strong,{children:"services"}),". Thus, the JAM state is partitioned into\nservices. The creation of a new service is permissionless, akin to deploying a smart contract on a\nsmart contract chain. Consequently, adding a new service to the JAM chain does not necessitate\napproval from any authority or adherence to governance mechanisms, unlike Substrate-based chains\nthat mandate governance approval for adding new pallets. Services encompass code, balance, and\ncertain state components, resembling the structure commonly observed on a smart contract chain."]}),"\n",(0,a.jsx)(n.h2,{id:"service-entry-points",children:"Service Entry Points"}),"\n",(0,a.jsx)(n.p,{children:"JAM services' code is split into three different entry points:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.strong,{children:"Refine"})," is the function that does the mostly stateless computation. It defines the\ntransformation for the rollup for a specific service."]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.strong,{children:"Accumulate"})," is the function that takes the output of that and folds it into the overall state\nof the service"]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.strong,{children:"OnTransfer"})," handles information coming from other services."]}),"\n"]}),"\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.strong,{children:"Work packages"})," are the input to a service. Work packages can have many ",(0,a.jsx)(n.strong,{children:"work items"})," in them.\nEvery work item is associated with a service, and it reflects the actual input to the service. For\nthe parachains service, this is where the transactions and all of the blockchain inputs are entered."]}),"\n",(0,a.jsxs)(n.p,{children:["The JAM security apparatus consists a two-stage processing where the Refine function accepts a work\nitem as an input and yields a work result as an output, which gets fed into the Accumulate function\n(first Refine, then Accumulate). Work items are refined into ",(0,a.jsx)(n.strong,{children:"work results"}),", and therefore, a work\npackage containing many work items is refined into a ",(0,a.jsx)(n.strong,{children:"work report"}),", which is the corresponding\nresults of several items. A work package can be assigned that uses one core for a specific time slot\n(typically a period of 6 seconds)."]}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.img,{alt:"refine-accumulate",src:i(40044).A+"",width:"1874",height:"1052"})}),"\n",(0,a.jsx)(n.h3,{id:"jam-is-transactionless",children:"JAM is Transactionless"}),"\n",(0,a.jsx)(n.p,{children:"JAM distinguishes itself from smart contract chains by operating transactionlessly. There are no\ntransactions within JAM; all actions are permissionless and initially undergo a Refine stage. During\nthis stage, the service pre-refines input data, transforming it into work reports consisting of work\nresults. Subsequently, these work results are transferred onto the chain."}),"\n",(0,a.jsx)(n.p,{children:"Despite the absence of transactions, JAM still accommodates extrinsic information of a specific\nformat. There are five types of extrinsic information:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:"Guarantees"}),"\n",(0,a.jsx)(n.li,{children:"Assurances"}),"\n",(0,a.jsx)(n.li,{children:"Judgments"}),"\n",(0,a.jsx)(n.li,{children:"Preimages"}),"\n",(0,a.jsx)(n.li,{children:"Tickets"}),"\n"]}),"\n",(0,a.jsx)(n.p,{children:"The first three types form part of the JAM chain's security framework. Guarantees and assurances\ninvolve validators collectively attesting that a work result accurately reflects the outcome of its\ncorresponding work item after transformation through the service's refine function."}),"\n",(0,a.jsx)(n.p,{children:"Judgments occur when then integrity of a work result is considered uncertain and a large plurality\nof validators attest to its validity or lack thereof. In this case an invalid work item may already\nhave been integrated into the service\u2019s state and a rollback may need to happen. Judgments must\noccur within one hour of submitting the work report to the chain, during which finality is\ntemporarily paused."}),"\n",(0,a.jsx)(n.p,{children:"Preimages represent a feature provided by the JAM chain for the refine function. While the refine\nfunction is typically stateless, it can perform one stateful operation: looking up the preimage of a\nhash. This feature is the only opinionated aspect of the refine function."}),"\n",(0,a.jsxs)(n.p,{children:["Tickets serve as anonymous entries into the block production mechanism. They are not immediately\nrequired for block production; instead, the system operates two epochs in advance. This mechanism is\npart of the SAFROLE algorithm, a refined version of the original ",(0,a.jsx)(n.a,{href:"/docs/learn-safrole",children:"SASSAFRAS"}),"\nalgorithm."]}),"\n",(0,a.jsx)(n.h3,{id:"refine-function",children:"Refine Function"}),"\n",(0,a.jsxs)(n.p,{children:["In the Refine processing stage within JAM, up to 15 MB of data can be accepted during each time\nslot, which lasts 6 seconds. However, Refine yields a maximum of 90 kB of data, resulting in\nsignificant data compaction that is necessary due to the distributed nature of\n",(0,a.jsx)(n.a,{href:"/docs/learn-parachains-protocol#availability-and-validity-anv-protocol",children:"the availability system"}),".\nFor instance, in the context of a parachain, the 15 MB of data represents the\n",(0,a.jsx)(n.a,{href:"/docs/learn-parachains-protocol#protocols-summary",children:"Proof of Validity (PoV)"}),", while the 90 kB of data\ncorresponds to the ",(0,a.jsx)(n.a,{href:"/docs/learn-parachains-protocol#candidate-receipts",children:"candidate receipt"}),"."]}),"\n",(0,a.jsxs)(n.p,{children:["Refine can execute for up to 6 seconds of ",(0,a.jsx)(n.a,{href:"#polkadot-virtual-machine-pvm",children:"PVM"})," gas, equivalent to\nthe full block period of the relay chain. This extended execution time, compared to the current\nlimit of two seconds for PVFs, is facilitated by ",(0,a.jsx)(n.a,{href:"#benchmarks-vs-metering",children:"secure metering"})," and\nother optimizations inherent to PVM."]}),"\n",(0,a.jsx)(n.p,{children:"Preimage lookups can also be conducted within Refine. If a hash and its associated preimage are\nbelieved to be available on the JAM chain, the preimage can be requested by providing the hash. This\ncapability enables efficient storage and retrieval of code, such as parachain code, by storing the\ncode on the JAM chain and referencing its hash in the work package."}),"\n",(0,a.jsx)(n.p,{children:"Refine is the primary processing workhorse, handling tasks with largely stateless operations."}),"\n",(0,a.jsx)(n.h3,{id:"accumulate-function",children:"Accumulate Function"}),"\n",(0,a.jsx)(n.p,{children:"The accumulate function is responsible for integrating the output generated by the Refine function\ninto the chain state. Accumulate can accept multiple outputs from Refine, all originating from the\nsame service. Both Refine and Accumulate serve as entry points from a service-specific code blob."}),"\n",(0,a.jsx)(n.p,{children:"Accumulate's execution time per output is considerably shorter than Refine\u2019s, typically around 10\nmilliseconds at most. However, the duration depends on factors such as the number of work items in\nthe work package. If a work package contains multiple items, the available time is divided among\nthem."}),"\n",(0,a.jsx)(n.p,{children:"Unlike Refine, Accumulate is stateful, granting it access to the JAM chain's state. It can read\nstorage from any service, write to its key-value store, transfer funds, and include a memo with fund\ntransfers. Additionally, Accumulate can create new services, upgrade its code, and request preimage\navailability, among other functionalities."}),"\n",(0,a.jsx)(n.p,{children:"Moreover, Refine can invoke child instances of the PVM. This allows for creating sub-instances, or\nvirtual machines, where code and data can be deployed, memory and stack configurations can be\ncustomized, and computations can be executed within a flexible framework."}),"\n",(0,a.jsx)(n.h3,{id:"on-transfer-function",children:"On-transfer Function"}),"\n",(0,a.jsx)(n.p,{children:"The onTransfer function within the JAM system is also stateful, enabling it to modify the service's\nstate. It has the capability to inspect the state of other services and make changes to its own\nstate. This functionality facilitates communication between services, albeit in an asynchronous\nmanner."}),"\n",(0,a.jsx)(n.p,{children:"Unlike many smart contract platforms, where interactions occur synchronously, in JAM the interaction\nbetween encapsulated components, such as smart contracts or services in this case, happens\nasynchronously. Messages, along with tokens, are sent, and at some point later during the same\nsix-second execution period, the receiving service processes them. There is no immediate return\npath; if a return path is needed, the sending service must initiate another transfer or modify its\nstate in a way that the receiving service can later interpret."}),"\n",(0,a.jsx)(n.p,{children:"Both Accumulate and onTransfer are designed to be executed in parallel, allowing different services'\naccumulation and transfers to occur simultaneously. This design opens the possibility for future\nenhancements, such as allocating more than the current 10 milliseconds of gas input. In theory, a\nsecondary core could be utilized to execute certain accumulations, providing them with significantly\nmore gas to utilize."}),"\n",(0,a.jsx)(n.h2,{id:"jam-chains-generalization",children:"JAM Chain's Generalization"}),"\n",(0,a.jsx)(n.p,{children:"Polkadot, as outlined in the original Polkadot white paper, is primarily tailored to a specific\nservice profile: delivering parachains. In pursuit of this service, Polkadot has developed two\nessential subcomponents:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:"the distributed data availability system"}),"\n",(0,a.jsx)(n.li,{children:"the auditing and guarantees system for computation (i.e. a roll-up system with robust security\nguarantees)"}),"\n"]}),"\n",(0,a.jsx)(n.p,{children:"JAM represents a reduction in the level of opinionation compared to Polkadot, offering a higher\nlevel of abstraction and generalization. This facilitates easier utilization of underlying\ncomponents according to individual preferences."}),"\n",(0,a.jsx)(n.p,{children:"JAM operates in a permissionless manner, akin to smart contract chains, allowing individuals to\nupload and expect the execution of code. Additionally, it hosts data, enables preimage lookup, and\nmanages state, resembling a key-value pair system. The genesis block of JAM includes a service to\nfacilitate the creation of new services since JAM lacks a mechanism for accepting transactions\ndirectly."}),"\n",(0,a.jsxs)(n.p,{children:["Services within JAM have no predefined limits on the amount of code, data, or state they can\naccommodate. Their capabilities are determined by crypto-economic factors; the more DOT tokens\ndeposited, the greater capacity for data and state. For instance, ",(0,a.jsx)(n.strong,{children:"the parachains service"}),"\nconsolidates all Polkadot 1.1 functionality within a single service on JAM, with the potential for\nadditional services to leverage Polkadot's distributed availability system, and auditing and\nguarantees system for computation."]}),"\n",(0,a.jsx)(n.h2,{id:"polkadot-virtual-machine-pvm",children:"Polkadot Virtual Machine (PVM)"}),"\n",(0,a.jsx)(n.p,{children:"The PVM design is rooted in the RISC-V ISA (Instruction Set Architecture), known for its simplicity\nand versatility. The RISC-V ISA offers several advantages:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:"It is easy to transpile into common hardware formats such as x86, x64, and ARM."}),"\n",(0,a.jsxs)(n.li,{children:["It is well-supported by tooling like ",(0,a.jsx)(n.a,{href:"https://llvm.org/",children:"LLVM"})]}),"\n"]}),"\n",(0,a.jsx)(n.p,{children:"The PVM itself embodies simplicity and security, being sandboxable and offering various execution\nguarantees. It is deterministic, consensus-sensitive, and friendly to metering. Unlike other VMs,\nthe PVM lacks complexity and excessive opinionation."}),"\n",(0,a.jsx)(n.p,{children:"WASM, while optimized for web use cases, presents challenges with stack management, particularly in\nhandling continuations. RISC-V addresses this issue by placing the stack in memory, facilitating\ncontinuations handling naturally without additional complexity."}),"\n",(0,a.jsx)(n.p,{children:"Additionally, the PVM demonstrates exceptional execution speeds, especially when run on conventional\nhardware like X64 and ARM, offering advantages such as free metering compared to WASM."}),"\n",(0,a.jsx)(n.p,{children:"The incorporation of RISC-V-enabled continuations is poised to establish a new standard for scalable\ncoding across multi-core platforms like JAM. Asynchronous, parallelized architectures are\nincreasingly essential for scalability in both hardware and software platforms, a trend that is\nexpected to extend to blockchain and consensus algorithms."}),"\n",(0,a.jsx)(n.h2,{id:"safrole",children:"SAFROLE"}),"\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.a,{href:"/docs/learn-safrole",children:"SAFROLE"})," is a block production algorithm, a simplification of\n",(0,a.jsx)(n.a,{href:"https://research.web3.foundation/Polkadot/protocols/block-production/SASSAFRAS",children:"SASSAFRAS"}),". It\nexcludes some components that may be useful for parachains. So parachains may probably stick with\nSASSAFRAS rather SAFROLE. SAFROLE will be as simple as possible to:"]}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:"Ensure that it is as minimally opinionated as possible to maximize the potential future use cases"}),"\n",(0,a.jsx)(n.li,{children:"To follow in the footsteps of Ethereum yellow paper, and really try to get as many implementations\nas possible to try and spread the expertise."}),"\n"]}),"\n",(0,a.jsx)(n.p,{children:"Understanding how Polkadot 1.0 works end-to-end is challenging. With JAM, someone who is capable of\nreading and understanding the yellow paper would be able to read and understand fairly quickly how\nJAM works. So simplicity is crucial."}),"\n",(0,a.jsx)(n.h2,{id:"networking",children:"Networking"}),"\n",(0,a.jsxs)(n.p,{children:["Networking for JAM uses the ",(0,a.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/QUIC",children:"QUIC protocol"}),". This allows direct\npoint-to-point connections between a large numbers of validators. So essentially all 1,000-plus\nvalidators on Polkadot can have a persistent connection to each other without potential issues with\nsockets. Gossip is avoided, mostly because it is not needed, because JAM will not handle\ntransactions. In case of distributing something that's not point-to-point or within a very small\nsubset validators, grid-diffusal will be used, in which validators are arranged into a grid, and\npackages are sent by a row, and then each node on the row sends it to all members of its column."]}),"\n",(0,a.jsx)(n.h2,{id:"pipelining-for-efficient-block-processing",children:"Pipelining for Efficient Block Processing"}),"\n",(0,a.jsx)(n.p,{children:"In state-based blockchains like Ethereum, the header of blocks typically contains the posterior\nstate root, summarizing the state after all block computations. Consequently, the header cannot be\nsent until all computations are complete. However, some computations can be performed before sending\nthe header, as their outcomes determine the block's validity."}),"\n",(0,a.jsx)(n.p,{children:"In JAM, a different approach is adopted by placing the prior state root in the header instead of the\nposterior state root. This means that the state roots featured in the header lag by one block. As a\nresult, lightweight computations, comprising approximately 5% of the block's workload or execution\ntime, can be executed, and the block can be distributed immediately afterward. The remaining 95% of\nthe block's computation, primarily accumulation tasks, can be completed subsequently. This enables\nthe next block to be started before the execution of the current block is finished."}),"\n",(0,a.jsx)(n.p,{children:"This approach allows for more efficient utilization of time between blocks. In traditional setups\nlike Polkadot's six-second block time, where the posterior state root must be provided, only a\nportion of the time can be used for computation. However, with pipelining in JAM, the entire block\ntime can be effectively utilized for computations, maximizing efficiency."}),"\n",(0,a.jsx)(n.p,{children:"While using the full block time for computation may not be ideal, as it could lead to perpetual\ncatching up and delayed block imports, JAM's approach enables significantly more time for\ncomputation compared to traditional setups. This means that approximately three to three and a half\nseconds of effective block computation time can be achieved, a substantial improvement over the\ncurrent setup."}),"\n",(0,a.jsx)(n.h2,{id:"architectural-differences-jam-vs-relay-chain",children:"Architectural Differences: JAM vs. Relay Chain"}),"\n",(0,a.jsx)(n.p,{children:"One of the architectural distinctions between JAM and the relay chain lies in the degree to which\nfunctionality is fixed. While the relay chain fixes certain elements, such as the language used to\ndefine the protocol (WASM), JAM goes further in this regard. For instance, it dictates the type used\nfor encoding the block header and the hashing scheme, making alterations to these aspects\nchallenging."}),"\n",(0,a.jsx)(n.p,{children:"However, flexibility comparable to that enabled by the WebAssembly meta-protocol in the relay chain\nis preserved in JAM through its service model. In this model, upgradability responsibility is\nshifted to services, freeing the chain itself from the burden of being upgradable. Three primary\nreasons support this decision:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:"Simplicity is prioritized. Maintaining a non-upgradable chain significantly reduces complexity."}),"\n",(0,a.jsx)(n.li,{children:"The relay chain's tendency to introduce complex functionalities without removing older ones\ncomplicates matters. Because upgrades are easily implemented, there's little incentive to simplify\nthe Substrate SDK. Consequently, replicating Polkadot becomes impractical."}),"\n",(0,a.jsx)(n.li,{children:"The potential for optimization afforded by JAM's fixed parameters. With a clear understanding of\nthe specific tasks the JAM chain must perform and the ability to set fixed parameters,\noptimizations in areas like network topology and timing become feasible. This contrasts with the\nchallenges posed by the relay chain's highly upgradable nature, where such optimizations are more\ncomplex due to the frequent alterations possible with each upgrade."}),"\n"]}),"\n",(0,a.jsx)(n.p,{children:"Despite these differences, JAM retains flexibility in application-level functionalities, such as\ncoretime sales, staking, and governance, all managed within services. Additionally, JAM introduces a\nnovel concept by associating a token balance with a service, providing opportunities for economic\nmodel adjustments that are not easily achievable in purely upgradable chains like the relay chain."}),"\n",(0,a.jsx)(n.h2,{id:"jam-toaster",children:"JAM Toaster"}),"\n",(0,a.jsx)(n.p,{children:"One of the ongoing efforts in ensuring that JAM meets its original expectations involves\nestablishing a comprehensive test environment for the JAM chain. Unlike small-scale test networks\nrunning on unreliable hardware to manage cloud computing costs, this initiative entails a\nsubstantial investment. Introducing the JAM toaster, essentially a test platform designed for\nconducting large-scale trials and performance assessments of JAM. This addresses a prior challenge\nencountered during the development of the Polkadot relay chain, where understanding the emergent\neffects and dynamics of operating a network at such scale proved difficult. Previous attempts were\nlimited to a few dozen nodes on a test network and the Kusama network, which lacks comprehensive\nmonitoring capabilities due to restrictions on accessing validator nodes. Conversely, the\nsmall-scale test network failed to accurately simulate the network dynamics of a larger-scale\ndeployment. The JAM toaster aims to bridge this gap by enabling in-depth research at the scale of\nthe entire JAM network, comprising 1,023 nodes. This platform facilitates the investigation of\nnetwork behavior and performance characteristics, providing valuable insights for developers\nregarding the expected performance of their parachains."}),"\n",(0,a.jsx)(n.h2,{id:"jam-and-substrate",children:"JAM and Substrate"}),"\n",(0,a.jsx)(n.h3,{id:"benchmarks-vs-metering",children:"Benchmarks vs. Metering"}),"\n",(0,a.jsx)(n.p,{children:"Benchmarks, or performance tests, can be optional when working with JAM. While they may still be\nnecessary on occasion, JAM's metered system can often obviate the need for frequent benchmarking.\nJAM operates on a metered system, allowing users to assess computational workload after completion.\nAdditionally, there's a theoretical mechanism to control computation, typically implemented at block\nconstruction time."}),"\n",(0,a.jsx)(n.p,{children:"However, there are scenarios where benchmarking remains relevant. For instance, when metering is\ndeemed too conservative for certain use cases, benchmarking might be necessary to enhance\nperformance. Additionally, benchmarking could be useful for tasks requiring extended execution\ntimes, ensuring they aren't run excessively long."}),"\n",(0,a.jsx)(n.h3,{id:"xcmp",children:"XCMP"}),"\n",(0,a.jsxs)(n.p,{children:['Moving on to Cross-Chain Message Passing (XCMP), JAM mandates full XCMP support. This is because\nwithin the relay chain, there\'s a provision for passing more data via a candidate receipt than would\nbe practical if all parachains transmitted all data all the time. JAM adheres strictly to rules,\neven for parachain services, including limitations on data transmission between the "refine" and\n"accumulate" phases. Currently, with\n',(0,a.jsx)(n.a,{href:"/docs/learn-xcm-transport#hrmp-xcmp-lites",children:"Horizontal relay chain Message Passing (HRMP)"}),", all\nmessages traverse the relay chain, constraining the data payload to 4 kB or less, which might not be\nrealistic. Thus, XCMP, where only message headers are relayed via the chain while the actual message\ndata is transmitted off-chain, emerges as a necessary and overdue improvement."]}),"\n",(0,a.jsx)(n.h3,{id:"accords",children:"Accords"}),"\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.a,{href:"/docs/polkadot-direction#xcm-and-accords",children:"Accords"})," essentially encapsulate state and logic,\nresembling smart contracts, with multiple instances residing alongside each parachain. They\nfacilitate message exchange between instances and enable synchronous interactions with parachains.\nAccords find utility in scenarios where trust between parachains is lacking, such as token\ntransfers. Unlike the existing method involving a reserve intermediary, Accords streamline direct\ntoken teleportation between parachains, eliminating the need for trust-compromising intermediaries.\nMoreover, Accords could function as XCM forwarding mechanisms, ensuring message integrity even when\nrelayed through third-party intermediaries, thus eliminating the need for explicit origin markers."]}),"\n",(0,a.jsx)(n.h3,{id:"boosting-efficiency",children:"Boosting Efficiency"}),"\n",(0,a.jsx)(n.p,{children:"Lastly, JAM's broader, less opinionated approach to leveraging underlying consensus mechanisms makes\nit conducive to implementing more innovative solutions. For instance, distributed availability for\ncomplex tasks like zero-knowledge proofs becomes more practical and efficient with JAM.\nAdditionally, JAM supports a mixed resource consumption model, wherein work packages can contain\nboth computationally intensive tasks and data-heavy operations. By pairing services with diverse\nresource requirements, such as those needing extensive computation with those necessitating high\ndata availability, JAM optimizes the utilization of validators' resources, thereby reducing costs.\nThis flexible approach enables the combination of tasks like distributed availability and SNARK\nverification with parachain workloads, driving down costs while enhancing efficiency."}),"\n",(0,a.jsx)(n.h2,{id:"enhancements-and-compatibility-in-jam",children:"Enhancements and Compatibility in JAM"}),"\n",(0,a.jsx)(n.p,{children:"JAM's design prioritizes compatibility with existing Polkadot 1 parachains. While it maintains\ncompatibility with the Polkadot SDK, the Polkadot Validator Function (PVF) undergoes retargeting.\nInstead of WebAssembly, it will target the Polkadot Virtual Machine (PVM). This transition is\nfacilitated by the fact that PVM is a minor modification of RISC-V, which has already been\nestablished as an official LLVM target. Consequently, PVM could become an official LLVM target\nbefore the deployment of JAM."}),"\n",(0,a.jsx)(n.p,{children:"Beyond serving as a host for parachains, JAM introduces significant enhancements. It offers the\npotential to streamline benchmarking efforts and alleviate future benchmarking requirements.\nAdditionally, JAM introduces the concept of accords, multi-instance, multi-sharded smart contracts\nthat govern and enforce specific interaction protocols between parachains. Furthermore, full\nCross-Chain Message Passing (XCMP) support is essential, enabling the removal of limitations on\ninformation transfer between parachains, typically facilitated by Cross-Chain Messages (XCM)."}),"\n",(0,a.jsx)(n.p,{children:"Regarding Agile Coretime, JAM retains compatibility with existing setups. However, it introduces the\ncapability to target coretime not only at parachains but also at arbitrary sets of work packages.\nThis flexibility enhances the versatility and efficiency of resource allocation within the JAM\necosystem."})]})}function d(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(h,{...e})}):h(e)}},98577:(e,n,i)=>{i.d(n,{A:()=>t});const t=i.p+"assets/files/graypaper_inverted_no_background-c91065921202b42b4203049d643a76a4.pdf"},40044:(e,n,i)=>{i.d(n,{A:()=>t});const t=i.p+"assets/images/refine-accumulate-376dcd569f7a4b6f1ed20798f522bd0e.png"},28453:(e,n,i)=>{i.d(n,{R:()=>o,x:()=>r});var t=i(96540);const a={},s=t.createContext(a);function o(e){const n=t.useContext(s);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:o(e.components),t.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/2d429218.6bf1ac13.js b/assets/js/2d429218.6bf1ac13.js deleted file mode 100644 index d942666884fc..000000000000 --- a/assets/js/2d429218.6bf1ac13.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6361],{82832:(e,n,o)=>{o.r(n),o.d(n,{assets:()=>l,contentTitle:()=>s,default:()=>h,frontMatter:()=>a,metadata:()=>r,toc:()=>c});var t=o(74848),i=o(28453);const a={id:"learn-consensus",title:"Polkadot's Consensus Protocols",sidebar_label:"Consensus",description:"The Consensus Mechanisms of Polkadot.",keywords:["consensus","proof of stake","nominated proof of stake","hybrid consensus","finality"],slug:"../learn-consensus"},s=void 0,r={id:"learn/learn-consensus",title:"Polkadot's Consensus Protocols",description:"The Consensus Mechanisms of Polkadot.",source:"@site/../docs/learn/learn-consensus.md",sourceDirName:"learn",slug:"/learn-consensus",permalink:"/docs/learn-consensus",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-consensus.md",tags:[],version:"current",lastUpdatedBy:"github-actions[bot]",lastUpdatedAt:1728891359e3,frontMatter:{id:"learn-consensus",title:"Polkadot's Consensus Protocols",sidebar_label:"Consensus",description:"The Consensus Mechanisms of Polkadot.",keywords:["consensus","proof of stake","nominated proof of stake","hybrid consensus","finality"],slug:"../learn-consensus"},sidebar:"docs",previous:{title:"Architecture",permalink:"/docs/learn-architecture"},next:{title:"Parachains",permalink:"/docs/learn-parachains-index"}},l={},c=[{value:"Nominated Proof of Stake",id:"nominated-proof-of-stake",level:2},{value:"Hybrid Consensus",id:"hybrid-consensus",level:2},{value:"Block Production: BABE",id:"block-production-babe",level:2},{value:"Multiple Validators per Slot",id:"multiple-validators-per-slot",level:3},{value:"No Validators in Slot",id:"no-validators-in-slot",level:3},{value:"Finality Gadget: GRANDPA",id:"finality-gadget-grandpa",level:2},{value:"Probabilistic vs. Provable Finality",id:"probabilistic-vs-provable-finality",level:3},{value:"Fork Choice",id:"fork-choice",level:2},{value:"Comparisons",id:"comparisons",level:2},{value:"Nakamoto consensus",id:"nakamoto-consensus",level:3},{value:"PBFT / Tendermint",id:"pbft--tendermint",level:3},{value:"Casper FFG",id:"casper-ffg",level:3},{value:"Bridging: BEEFY",id:"bridging-beefy",level:2},{value:"Resources",id:"resources",level:2}];function d(e){const n={a:"a",admonition:"admonition",em:"em",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.p,{children:"In traditional PoS systems, block production participation is dependent on token holdings as opposed\nto computational power. While PoS developers usually have a proponent for equitable participation in\na decentralized manner, most projects propose some level of centralized operation, where the number\nof validators with full participation rights is limited. These validators are often seen to be the\nmost wealthy and, as a result, influence the PoS network as they are the most staked. Usually, the\nnumber of candidates to maintain the network with the necessary knowledge (and equipment) is\nlimited; this can also increase operational costs. Systems with a large number of validators tend to\nform pools to decrease the variance of their revenue and profit from economies of scale. These pools\nare often off-chain."}),"\n",(0,t.jsx)(n.p,{children:"A way to alleviate this is to implement pool formation on-chain and allow token holders to vote with\ntheir stake for validators to represent them."}),"\n",(0,t.jsx)(n.h2,{id:"nominated-proof-of-stake",children:"Nominated Proof of Stake"}),"\n",(0,t.jsxs)(n.p,{children:["Polkadot uses NPoS (Nominated Proof-of-Stake) as its mechanism for selecting the validator set. It\nis designed with the roles of ",(0,t.jsx)(n.a,{href:"/docs/learn-validator",children:(0,t.jsx)(n.strong,{children:"validators"})})," and\n",(0,t.jsx)(n.a,{href:"/docs/learn-nominator",children:(0,t.jsx)(n.strong,{children:"nominators"})}),", to maximize chain security. Actors who are interested in\nmaintaining the network can run a validator node."]}),"\n",(0,t.jsx)(n.p,{children:"Validators assume the role of producing new blocks, validating parachain blocks, and guaranteeing\nfinality. Nominators can choose to backselect validators with their stake. Nominators can approve\ncandidates that they trust and back them with their tokens."}),"\n",(0,t.jsx)(n.h2,{id:"hybrid-consensus",children:"Hybrid Consensus"}),"\n",(0,t.jsxs)(n.p,{children:["Polkadot uses a ",(0,t.jsx)(n.em,{children:"hybrid consensus"})," composed by the finality gadget\n(",(0,t.jsx)(n.a,{href:"#finality-gadget-grandpa",children:"GRANDPA"}),") and the block production mechanism\n(",(0,t.jsx)(n.a,{href:"#block-production-babe",children:"BABE"}),")."]}),"\n",(0,t.jsxs)(n.p,{children:["This is a way of getting the benefits of ",(0,t.jsx)(n.strong,{children:"probabilistic finality"})," (the ability always to produce\nnew blocks) and ",(0,t.jsx)(n.strong,{children:"provable finality"}),' (having a universal agreement on the canonical chain with no\nchance for reversion). It also avoids the corresponding drawbacks of each mechanism (the chance of\nunknowingly following the wrong fork in probabilistic finality, and a chance for "stalling" - not\nbeing able to produce new blocks - in provable finality). The combination of these two mechanisms\nallows for blocks to be rapidly produced, and the slower finality mechanism to run in a separate\nprocess to finalize blocks without risking slower transaction processing or stalling.']}),"\n",(0,t.jsxs)(n.p,{children:["Hybrid consensus has been proposed in the past. Notably, it was proposed (now defunct) as a step in\nEthereum's transition to proof of stake in ",(0,t.jsx)(n.a,{href:"http://eips.ethereum.org/EIPS/eip-1011",children:"EIP 1011"}),", which\nspecified ",(0,t.jsx)(n.a,{href:"#casper-ffg",children:"Casper FFG"}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"block-production-babe",children:"Block Production: BABE"}),"\n",(0,t.jsxs)(n.p,{children:["BABE (Blind Assignment for Blockchain Extension) is the block production mechanism that runs between\nthe validator nodes and determines the authors of new blocks. BABE is comparable as an algorithm to\n",(0,t.jsx)(n.a,{href:"https://eprint.iacr.org/2017/573.pdf",children:"Ouroboros Praos"}),", with some key differences in chain\nselection rule and slot time adjustments. BABE assigns block production slots to validators\naccording to stake and using the relay chain's\n",(0,t.jsx)(n.a,{href:"/docs/learn-cryptography#randomness",children:"randomness cycle"}),". The chain\u2019s runtime is required to provide\nthe BABE authority list and randomness to the host via a consensus message in the header of the\nfirst block of each epoch."]}),"\n",(0,t.jsxs)(n.p,{children:["BABE execution happens in sequential non-overlapping phases known as epochs. Each epoch is divided\ninto a predefined number of slots. All slots in each epoch are sequentially indexed starting from 0\n(slot number). At the beginning of each epoch, the BABE node needs to run the\n",(0,t.jsx)(n.a,{href:"https://spec.polkadot.network/#algo-block-production-lottery",children:"Block-Production-Lottery algorithm"}),"\nto find out in which slots it should produce a block and gossip to the other block producers."]}),"\n",(0,t.jsx)(n.p,{children:"Validators participate in a lottery for every slot, which will inform whether or not they are the\nblock producer candidate for that slot. Slots are discrete units of time of approximately 6 seconds\nin length. Because the mechanism of allocating slots to validators is based on a randomized design,\nmultiple validators could be candidates for the same slot. Other times, a slot could be empty,\nresulting in inconsistent block time."}),"\n",(0,t.jsx)(n.h3,{id:"multiple-validators-per-slot",children:"Multiple Validators per Slot"}),"\n",(0,t.jsxs)(n.p,{children:["When multiple validators are block producer candidates in a given slot, all will produce a block and\nbroadcast it to the network. At that point, it's a race. The validator whose block reaches most of\nthe network first wins. Depending on network topology and latency, both chains will continue to\nbuild in some capacity until finalization kicks in and amputates a fork. See\n",(0,t.jsx)(n.a,{href:"#fork-choice",children:"Fork Choice"})," below for how that works."]}),"\n",(0,t.jsx)(n.h3,{id:"no-validators-in-slot",children:"No Validators in Slot"}),"\n",(0,t.jsxs)(n.p,{children:["When no validators have rolled low enough in the randomness lottery to qualify for block production,\na slot can remain seemingly blockless. Polkadot protocol runs a\n",(0,t.jsx)(n.a,{href:"https://spec.polkadot.network/sect-block-production#defn-babe-secondary-slots",children:"secondary validator selection algorithm"}),"\nin the background. The validators selected through this predictable algorithm always produce blocks.\nThese ",(0,t.jsx)(n.em,{children:"secondary"})," blocks are ignored if the same slot has a primary block produced from a\n",(0,t.jsx)(n.a,{href:"/docs/learn-cryptography#randomness",children:"VRF-selected"})," validator. Thus, a slot can have either a\n",(0,t.jsx)(n.em,{children:"primary"})," or a ",(0,t.jsx)(n.em,{children:"secondary"})," block, and no slots are ever skipped."]}),"\n",(0,t.jsxs)(n.p,{children:["For more details on BABE, please see the\n",(0,t.jsx)(n.a,{href:"https://research.web3.foundation/Polkadot/protocols/block-production/Babe",children:"BABE paper"}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"finality-gadget-grandpa",children:"Finality Gadget: GRANDPA"}),"\n",(0,t.jsx)(n.p,{children:"GRANDPA (GHOST-based Recursive ANcestor Deriving Prefix Agreement) is the finality gadget that is\nimplemented for the relay chain."}),"\n",(0,t.jsx)(n.p,{children:"The Polkadot Host uses the GRANDPA Finality protocol to finalize blocks. Finality is obtained by\nconsecutive rounds of voting by the validator nodes. Validators execute the GRANDPA finality process\nin parallel to Block Production as an independent service."}),"\n",(0,t.jsx)(n.p,{children:"It works in a partially synchronous network model as long as 2/3 of nodes are honest and can cope\nwith 1/5 Byzantine nodes in an asynchronous setting."}),"\n",(0,t.jsx)(n.p,{children:"A notable distinction is that GRANDPA reaches agreements on chains rather than blocks, greatly\nspeeding up the finalization process, even after long-term network partitioning or other networking\nfailures."}),"\n",(0,t.jsx)(n.p,{children:"In other words, as soon as more than 2/3 of validators attest to a chain containing a particular\nblock, all blocks leading up to that one are finalized at once."}),"\n",(0,t.jsx)(n.admonition,{title:"GRANDPA description and implementation",type:"info",children:(0,t.jsxs)(n.p,{children:["Please refer to ",(0,t.jsx)(n.a,{href:"https://github.com/w3f/consensus/blob/master/pdf/grandpa.pdf",children:"the GRANDPA paper"}),"\nfor a full description of the protocol. GRANDPA is implemented as a\n",(0,t.jsx)(n.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/grandpa/src/lib.rs",children:"module of the Substrate Frame System"}),"."]})}),"\n",(0,t.jsx)(n.h3,{id:"probabilistic-vs-provable-finality",children:"Probabilistic vs. Provable Finality"}),"\n",(0,t.jsxs)(n.p,{children:["A pure Nakamoto consensus blockchain that runs PoW is only able to achieve the notion of\n",(0,t.jsx)(n.em,{children:"probabilistic finality"})," and reach ",(0,t.jsx)(n.em,{children:"eventual consensus"}),". Probabilistic finality means that under\nsome assumptions about the network and participants, if we see a few blocks building on a given\nblock, we can estimate the probability that it is final. Eventual consensus means that at some point\nin the future, all nodes will agree on the truthfulness of one set of data. This eventual consensus\nmay take a long time, and will not be able to determine how long it will take ahead of time.\nHowever, finality gadgets such as GRANDPA (GHOST-based Recursive ANcestor Deriving Prefix Agreement)\nor Ethereum's Casper FFG (the Friendly Finality Gadget) are designed to give stronger and quicker\nguarantees on the finality of blocks - specifically, that they can never be reverted after some\nprocess of Byzantine agreements has taken place. The notion of irreversible consensus is known as\n",(0,t.jsx)(n.em,{children:"provable finality."})]}),"\n",(0,t.jsxs)(n.p,{children:["In the ",(0,t.jsx)(n.a,{href:"https://github.com/w3f/consensus/blob/master/pdf/grandpa.pdf",children:"GRANDPA paper"}),", it is phrased\nin this way:"]}),"\n",(0,t.jsx)(n.admonition,{type:"note",children:(0,t.jsxs)(n.p,{children:["We say an Oracle A in a protocol is ",(0,t.jsx)(n.em,{children:"eventually consistent"})," if it returns the same value to all\nparticipants after some unspecified time."]})}),"\n",(0,t.jsx)(n.h2,{id:"fork-choice",children:"Fork Choice"}),"\n",(0,t.jsx)(n.p,{children:"Bringing BABE and GRANDPA together, the fork choice of the relay chain becomes clear. BABE must\nalways build on the chain that GRANDPA has finalized. BABE provides probabilistic finality when\nthere are forks after the finalized head by building on the chain with the most primary blocks."}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"Best chain choice",src:o(25704).A+"",width:"1739",height:"817"})}),"\n",(0,t.jsx)(n.p,{children:'In the above image, the black blocks are finalized, and the yellow blocks are not. Blocks marked\nwith a "1" are primary blocks; those marked with a "2" are secondary blocks. Even though the topmost\nchain is the longest chain on the latest finalized block, it does not qualify because it has fewer\nprimaries at the time of evaluation than the one below it.'}),"\n",(0,t.jsx)(n.h2,{id:"comparisons",children:"Comparisons"}),"\n",(0,t.jsx)(n.h3,{id:"nakamoto-consensus",children:"Nakamoto consensus"}),"\n",(0,t.jsx)(n.p,{children:"Nakamoto consensus consists of the longest chain rule using proof of work as its Sybil resistance\nmechanism and leader election."}),"\n",(0,t.jsx)(n.p,{children:"Nakamoto consensus only gives us probabilistic finality. Probabilistic finality states that a block\nin the past is only as safe as the number of confirmations it has, or the number of blocks that have\nbeen built on top of it. As more blocks are built on top of a specific block in a Proof of Work\nchain, more computational work has been expended behind this particular chain. However, it does not\nguarantee that the chain containing the block will always remain the agreed-upon chain since an\nactor with unlimited resources could potentially build a competing chain and expend enough\ncomputational resources to create a chain that did not contain a specific block. In such a\nsituation, the longest chain rule employed in Bitcoin and other proof of work chains would move to\nthis new chain as the canonical one."}),"\n",(0,t.jsx)(n.h3,{id:"pbft--tendermint",children:"PBFT / Tendermint"}),"\n",(0,t.jsxs)(n.p,{children:["Please see the ",(0,t.jsx)(n.a,{href:"/docs/learn-comparisons-cosmos#consensus",children:"relevant section"})," in the Cosmos comparison\narticle."]}),"\n",(0,t.jsx)(n.h3,{id:"casper-ffg",children:"Casper FFG"}),"\n",(0,t.jsx)(n.p,{children:"The two main differences between GRANDPA and Casper FFG are:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"in GRANDPA, different voters can cast votes simultaneously for blocks at different heights"}),"\n",(0,t.jsx)(n.li,{children:"GRANDPA only depends on finalized blocks to affect the fork-choice rule of the underlying block\nproduction mechanism"}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"bridging-beefy",children:"Bridging: BEEFY"}),"\n",(0,t.jsx)(n.p,{children:"The BEEFY (Bridge Efficiency Enabling Finality Yielder) is a secondary protocol to GRANDPA to\nsupport efficient bridging between relay chains (Polkadot and Kusama) and remote, segregated\nblockchains, such as Ethereum, which were not built with the Polkadot native interoperability in\nmind. The protocol allows participants of the remote network to efficiently verify finality proofs\ncreated by validators on the relay chain, i.e. clients in the Ethereum network can verify that the\nPolkadot network is at a specific state."}),"\n",(0,t.jsx)(n.p,{children:"Storing all the information necessary to verify the state of the remote chain, such as the block\nheaders, is too expensive. In BEEFY, all honest validators sign on a GRANDPA finalized block. This\nreduces the efforts on the light client side, as tracking forks, GRANDPA justifications, etc., is no\nlonger necessary. Moreover, BEEFY utilizes Merkle Mountain Ranges (MMR) as an efficient data\nstructure for storing and transmitting block headers and signatures to light clients and the ECDSA\nsignature schemes (more efficiently verifiable on EVM). Light clients now only have to check if the\nblock has a super-majority of BEEFY votes by validators."}),"\n",(0,t.jsx)(n.p,{children:"Overall, BEEFY addresses the limitations of GRANDPA finality for bridges to chains like Ethereum by\nproviding a more lightweight and efficient finality solution."}),"\n",(0,t.jsxs)(n.p,{children:["For additional implementation details about BEEFY, see\n",(0,t.jsx)(n.a,{href:"https://spec.polkadot.network/#sect-grandpa-beefy",children:"the Polkadot Specification"}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"resources",children:"Resources"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"https://research.web3.foundation/Polkadot/protocols/block-production/Babe",children:"BABE paper"})," - The\nacademic description of the BABE protocol."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"https://github.com/w3f/consensus/blob/master/pdf/grandpa.pdf",children:"GRANDPA paper"})," - The academic\ndescription of the GRANDPA finality gadget. Contains formal proofs of the algorithm."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"https://github.com/paritytech/finality-grandpa",children:"Rust implementation"})," - The reference\nimplementation and the accompanying\n",(0,t.jsx)(n.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/grandpa/src/lib.rs",children:"Substrate pallet"}),"."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"https://www.crowdcast.io/e/polkadot-block-production",children:"Block Production and Finalization in Polkadot"})," -\nAn explanation of how BABE and GRANDPA work together to produce and finalize blocks on Kusama with\nBill Laboon."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"https://www.youtube.com/watch?v=1CuTSluL7v4&t=4s",children:"Block Production and Finalization in Polkadot: Understanding the BABE and GRANDPA Protocols"})," -\nAn academic talk by Bill Laboon, given at MIT Cryptoeconomic Systems 2020, describing Polkadot's\nhybrid consensus model in-depth."]}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(d,{...e})}):d(e)}},25704:(e,n,o)=>{o.d(n,{A:()=>t});const t=o.p+"assets/images/best_chain-52a3da00fb2f804a198c73690fcedc4f.png"},28453:(e,n,o)=>{o.d(n,{R:()=>s,x:()=>r});var t=o(96540);const i={},a=t.createContext(i);function s(e){const n=t.useContext(a);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:s(e.components),t.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/2d429218.e0ca6ef4.js b/assets/js/2d429218.e0ca6ef4.js new file mode 100644 index 000000000000..5711580084ee --- /dev/null +++ b/assets/js/2d429218.e0ca6ef4.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6361],{58267:(e,n,o)=>{o.r(n),o.d(n,{assets:()=>l,contentTitle:()=>r,default:()=>h,frontMatter:()=>s,metadata:()=>t,toc:()=>c});const t=JSON.parse('{"id":"learn/learn-consensus","title":"Polkadot\'s Consensus Protocols","description":"The Consensus Mechanisms of Polkadot.","source":"@site/../docs/learn/learn-consensus.md","sourceDirName":"learn","slug":"/learn-consensus","permalink":"/docs/learn-consensus","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-consensus.md","tags":[],"version":"current","lastUpdatedBy":"github-actions[bot]","lastUpdatedAt":1728891359000,"frontMatter":{"id":"learn-consensus","title":"Polkadot\'s Consensus Protocols","sidebar_label":"Consensus","description":"The Consensus Mechanisms of Polkadot.","keywords":["consensus","proof of stake","nominated proof of stake","hybrid consensus","finality"],"slug":"../learn-consensus"},"sidebar":"docs","previous":{"title":"Architecture","permalink":"/docs/learn-architecture"},"next":{"title":"Parachains","permalink":"/docs/learn-parachains-index"}}');var i=o(74848),a=o(28453);const s={id:"learn-consensus",title:"Polkadot's Consensus Protocols",sidebar_label:"Consensus",description:"The Consensus Mechanisms of Polkadot.",keywords:["consensus","proof of stake","nominated proof of stake","hybrid consensus","finality"],slug:"../learn-consensus"},r=void 0,l={},c=[{value:"Nominated Proof of Stake",id:"nominated-proof-of-stake",level:2},{value:"Hybrid Consensus",id:"hybrid-consensus",level:2},{value:"Block Production: BABE",id:"block-production-babe",level:2},{value:"Multiple Validators per Slot",id:"multiple-validators-per-slot",level:3},{value:"No Validators in Slot",id:"no-validators-in-slot",level:3},{value:"Finality Gadget: GRANDPA",id:"finality-gadget-grandpa",level:2},{value:"Probabilistic vs. Provable Finality",id:"probabilistic-vs-provable-finality",level:3},{value:"Fork Choice",id:"fork-choice",level:2},{value:"Comparisons",id:"comparisons",level:2},{value:"Nakamoto consensus",id:"nakamoto-consensus",level:3},{value:"PBFT / Tendermint",id:"pbft--tendermint",level:3},{value:"Casper FFG",id:"casper-ffg",level:3},{value:"Bridging: BEEFY",id:"bridging-beefy",level:2},{value:"Resources",id:"resources",level:2}];function d(e){const n={a:"a",admonition:"admonition",em:"em",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",strong:"strong",ul:"ul",...(0,a.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.p,{children:"In traditional PoS systems, block production participation is dependent on token holdings as opposed\nto computational power. While PoS developers usually have a proponent for equitable participation in\na decentralized manner, most projects propose some level of centralized operation, where the number\nof validators with full participation rights is limited. These validators are often seen to be the\nmost wealthy and, as a result, influence the PoS network as they are the most staked. Usually, the\nnumber of candidates to maintain the network with the necessary knowledge (and equipment) is\nlimited; this can also increase operational costs. Systems with a large number of validators tend to\nform pools to decrease the variance of their revenue and profit from economies of scale. These pools\nare often off-chain."}),"\n",(0,i.jsx)(n.p,{children:"A way to alleviate this is to implement pool formation on-chain and allow token holders to vote with\ntheir stake for validators to represent them."}),"\n",(0,i.jsx)(n.h2,{id:"nominated-proof-of-stake",children:"Nominated Proof of Stake"}),"\n",(0,i.jsxs)(n.p,{children:["Polkadot uses NPoS (Nominated Proof-of-Stake) as its mechanism for selecting the validator set. It\nis designed with the roles of ",(0,i.jsx)(n.a,{href:"/docs/learn-validator",children:(0,i.jsx)(n.strong,{children:"validators"})})," and\n",(0,i.jsx)(n.a,{href:"/docs/learn-nominator",children:(0,i.jsx)(n.strong,{children:"nominators"})}),", to maximize chain security. Actors who are interested in\nmaintaining the network can run a validator node."]}),"\n",(0,i.jsx)(n.p,{children:"Validators assume the role of producing new blocks, validating parachain blocks, and guaranteeing\nfinality. Nominators can choose to backselect validators with their stake. Nominators can approve\ncandidates that they trust and back them with their tokens."}),"\n",(0,i.jsx)(n.h2,{id:"hybrid-consensus",children:"Hybrid Consensus"}),"\n",(0,i.jsxs)(n.p,{children:["Polkadot uses a ",(0,i.jsx)(n.em,{children:"hybrid consensus"})," composed by the finality gadget\n(",(0,i.jsx)(n.a,{href:"#finality-gadget-grandpa",children:"GRANDPA"}),") and the block production mechanism\n(",(0,i.jsx)(n.a,{href:"#block-production-babe",children:"BABE"}),")."]}),"\n",(0,i.jsxs)(n.p,{children:["This is a way of getting the benefits of ",(0,i.jsx)(n.strong,{children:"probabilistic finality"})," (the ability always to produce\nnew blocks) and ",(0,i.jsx)(n.strong,{children:"provable finality"}),' (having a universal agreement on the canonical chain with no\nchance for reversion). It also avoids the corresponding drawbacks of each mechanism (the chance of\nunknowingly following the wrong fork in probabilistic finality, and a chance for "stalling" - not\nbeing able to produce new blocks - in provable finality). The combination of these two mechanisms\nallows for blocks to be rapidly produced, and the slower finality mechanism to run in a separate\nprocess to finalize blocks without risking slower transaction processing or stalling.']}),"\n",(0,i.jsxs)(n.p,{children:["Hybrid consensus has been proposed in the past. Notably, it was proposed (now defunct) as a step in\nEthereum's transition to proof of stake in ",(0,i.jsx)(n.a,{href:"http://eips.ethereum.org/EIPS/eip-1011",children:"EIP 1011"}),", which\nspecified ",(0,i.jsx)(n.a,{href:"#casper-ffg",children:"Casper FFG"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"block-production-babe",children:"Block Production: BABE"}),"\n",(0,i.jsxs)(n.p,{children:["BABE (Blind Assignment for Blockchain Extension) is the block production mechanism that runs between\nthe validator nodes and determines the authors of new blocks. BABE is comparable as an algorithm to\n",(0,i.jsx)(n.a,{href:"https://eprint.iacr.org/2017/573.pdf",children:"Ouroboros Praos"}),", with some key differences in chain\nselection rule and slot time adjustments. BABE assigns block production slots to validators\naccording to stake and using the relay chain's\n",(0,i.jsx)(n.a,{href:"/docs/learn-cryptography#randomness",children:"randomness cycle"}),". The chain\u2019s runtime is required to provide\nthe BABE authority list and randomness to the host via a consensus message in the header of the\nfirst block of each epoch."]}),"\n",(0,i.jsxs)(n.p,{children:["BABE execution happens in sequential non-overlapping phases known as epochs. Each epoch is divided\ninto a predefined number of slots. All slots in each epoch are sequentially indexed starting from 0\n(slot number). At the beginning of each epoch, the BABE node needs to run the\n",(0,i.jsx)(n.a,{href:"https://spec.polkadot.network/#algo-block-production-lottery",children:"Block-Production-Lottery algorithm"}),"\nto find out in which slots it should produce a block and gossip to the other block producers."]}),"\n",(0,i.jsx)(n.p,{children:"Validators participate in a lottery for every slot, which will inform whether or not they are the\nblock producer candidate for that slot. Slots are discrete units of time of approximately 6 seconds\nin length. Because the mechanism of allocating slots to validators is based on a randomized design,\nmultiple validators could be candidates for the same slot. Other times, a slot could be empty,\nresulting in inconsistent block time."}),"\n",(0,i.jsx)(n.h3,{id:"multiple-validators-per-slot",children:"Multiple Validators per Slot"}),"\n",(0,i.jsxs)(n.p,{children:["When multiple validators are block producer candidates in a given slot, all will produce a block and\nbroadcast it to the network. At that point, it's a race. The validator whose block reaches most of\nthe network first wins. Depending on network topology and latency, both chains will continue to\nbuild in some capacity until finalization kicks in and amputates a fork. See\n",(0,i.jsx)(n.a,{href:"#fork-choice",children:"Fork Choice"})," below for how that works."]}),"\n",(0,i.jsx)(n.h3,{id:"no-validators-in-slot",children:"No Validators in Slot"}),"\n",(0,i.jsxs)(n.p,{children:["When no validators have rolled low enough in the randomness lottery to qualify for block production,\na slot can remain seemingly blockless. Polkadot protocol runs a\n",(0,i.jsx)(n.a,{href:"https://spec.polkadot.network/sect-block-production#defn-babe-secondary-slots",children:"secondary validator selection algorithm"}),"\nin the background. The validators selected through this predictable algorithm always produce blocks.\nThese ",(0,i.jsx)(n.em,{children:"secondary"})," blocks are ignored if the same slot has a primary block produced from a\n",(0,i.jsx)(n.a,{href:"/docs/learn-cryptography#randomness",children:"VRF-selected"})," validator. Thus, a slot can have either a\n",(0,i.jsx)(n.em,{children:"primary"})," or a ",(0,i.jsx)(n.em,{children:"secondary"})," block, and no slots are ever skipped."]}),"\n",(0,i.jsxs)(n.p,{children:["For more details on BABE, please see the\n",(0,i.jsx)(n.a,{href:"https://research.web3.foundation/Polkadot/protocols/block-production/Babe",children:"BABE paper"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"finality-gadget-grandpa",children:"Finality Gadget: GRANDPA"}),"\n",(0,i.jsx)(n.p,{children:"GRANDPA (GHOST-based Recursive ANcestor Deriving Prefix Agreement) is the finality gadget that is\nimplemented for the relay chain."}),"\n",(0,i.jsx)(n.p,{children:"The Polkadot Host uses the GRANDPA Finality protocol to finalize blocks. Finality is obtained by\nconsecutive rounds of voting by the validator nodes. Validators execute the GRANDPA finality process\nin parallel to Block Production as an independent service."}),"\n",(0,i.jsx)(n.p,{children:"It works in a partially synchronous network model as long as 2/3 of nodes are honest and can cope\nwith 1/5 Byzantine nodes in an asynchronous setting."}),"\n",(0,i.jsx)(n.p,{children:"A notable distinction is that GRANDPA reaches agreements on chains rather than blocks, greatly\nspeeding up the finalization process, even after long-term network partitioning or other networking\nfailures."}),"\n",(0,i.jsx)(n.p,{children:"In other words, as soon as more than 2/3 of validators attest to a chain containing a particular\nblock, all blocks leading up to that one are finalized at once."}),"\n",(0,i.jsx)(n.admonition,{title:"GRANDPA description and implementation",type:"info",children:(0,i.jsxs)(n.p,{children:["Please refer to ",(0,i.jsx)(n.a,{href:"https://github.com/w3f/consensus/blob/master/pdf/grandpa.pdf",children:"the GRANDPA paper"}),"\nfor a full description of the protocol. GRANDPA is implemented as a\n",(0,i.jsx)(n.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/grandpa/src/lib.rs",children:"module of the Substrate Frame System"}),"."]})}),"\n",(0,i.jsx)(n.h3,{id:"probabilistic-vs-provable-finality",children:"Probabilistic vs. Provable Finality"}),"\n",(0,i.jsxs)(n.p,{children:["A pure Nakamoto consensus blockchain that runs PoW is only able to achieve the notion of\n",(0,i.jsx)(n.em,{children:"probabilistic finality"})," and reach ",(0,i.jsx)(n.em,{children:"eventual consensus"}),". Probabilistic finality means that under\nsome assumptions about the network and participants, if we see a few blocks building on a given\nblock, we can estimate the probability that it is final. Eventual consensus means that at some point\nin the future, all nodes will agree on the truthfulness of one set of data. This eventual consensus\nmay take a long time, and will not be able to determine how long it will take ahead of time.\nHowever, finality gadgets such as GRANDPA (GHOST-based Recursive ANcestor Deriving Prefix Agreement)\nor Ethereum's Casper FFG (the Friendly Finality Gadget) are designed to give stronger and quicker\nguarantees on the finality of blocks - specifically, that they can never be reverted after some\nprocess of Byzantine agreements has taken place. The notion of irreversible consensus is known as\n",(0,i.jsx)(n.em,{children:"provable finality."})]}),"\n",(0,i.jsxs)(n.p,{children:["In the ",(0,i.jsx)(n.a,{href:"https://github.com/w3f/consensus/blob/master/pdf/grandpa.pdf",children:"GRANDPA paper"}),", it is phrased\nin this way:"]}),"\n",(0,i.jsx)(n.admonition,{type:"note",children:(0,i.jsxs)(n.p,{children:["We say an Oracle A in a protocol is ",(0,i.jsx)(n.em,{children:"eventually consistent"})," if it returns the same value to all\nparticipants after some unspecified time."]})}),"\n",(0,i.jsx)(n.h2,{id:"fork-choice",children:"Fork Choice"}),"\n",(0,i.jsx)(n.p,{children:"Bringing BABE and GRANDPA together, the fork choice of the relay chain becomes clear. BABE must\nalways build on the chain that GRANDPA has finalized. BABE provides probabilistic finality when\nthere are forks after the finalized head by building on the chain with the most primary blocks."}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"Best chain choice",src:o(25704).A+"",width:"1739",height:"817"})}),"\n",(0,i.jsx)(n.p,{children:'In the above image, the black blocks are finalized, and the yellow blocks are not. Blocks marked\nwith a "1" are primary blocks; those marked with a "2" are secondary blocks. Even though the topmost\nchain is the longest chain on the latest finalized block, it does not qualify because it has fewer\nprimaries at the time of evaluation than the one below it.'}),"\n",(0,i.jsx)(n.h2,{id:"comparisons",children:"Comparisons"}),"\n",(0,i.jsx)(n.h3,{id:"nakamoto-consensus",children:"Nakamoto consensus"}),"\n",(0,i.jsx)(n.p,{children:"Nakamoto consensus consists of the longest chain rule using proof of work as its Sybil resistance\nmechanism and leader election."}),"\n",(0,i.jsx)(n.p,{children:"Nakamoto consensus only gives us probabilistic finality. Probabilistic finality states that a block\nin the past is only as safe as the number of confirmations it has, or the number of blocks that have\nbeen built on top of it. As more blocks are built on top of a specific block in a Proof of Work\nchain, more computational work has been expended behind this particular chain. However, it does not\nguarantee that the chain containing the block will always remain the agreed-upon chain since an\nactor with unlimited resources could potentially build a competing chain and expend enough\ncomputational resources to create a chain that did not contain a specific block. In such a\nsituation, the longest chain rule employed in Bitcoin and other proof of work chains would move to\nthis new chain as the canonical one."}),"\n",(0,i.jsx)(n.h3,{id:"pbft--tendermint",children:"PBFT / Tendermint"}),"\n",(0,i.jsxs)(n.p,{children:["Please see the ",(0,i.jsx)(n.a,{href:"/docs/learn-comparisons-cosmos#consensus",children:"relevant section"})," in the Cosmos comparison\narticle."]}),"\n",(0,i.jsx)(n.h3,{id:"casper-ffg",children:"Casper FFG"}),"\n",(0,i.jsx)(n.p,{children:"The two main differences between GRANDPA and Casper FFG are:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"in GRANDPA, different voters can cast votes simultaneously for blocks at different heights"}),"\n",(0,i.jsx)(n.li,{children:"GRANDPA only depends on finalized blocks to affect the fork-choice rule of the underlying block\nproduction mechanism"}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"bridging-beefy",children:"Bridging: BEEFY"}),"\n",(0,i.jsx)(n.p,{children:"The BEEFY (Bridge Efficiency Enabling Finality Yielder) is a secondary protocol to GRANDPA to\nsupport efficient bridging between relay chains (Polkadot and Kusama) and remote, segregated\nblockchains, such as Ethereum, which were not built with the Polkadot native interoperability in\nmind. The protocol allows participants of the remote network to efficiently verify finality proofs\ncreated by validators on the relay chain, i.e. clients in the Ethereum network can verify that the\nPolkadot network is at a specific state."}),"\n",(0,i.jsx)(n.p,{children:"Storing all the information necessary to verify the state of the remote chain, such as the block\nheaders, is too expensive. In BEEFY, all honest validators sign on a GRANDPA finalized block. This\nreduces the efforts on the light client side, as tracking forks, GRANDPA justifications, etc., is no\nlonger necessary. Moreover, BEEFY utilizes Merkle Mountain Ranges (MMR) as an efficient data\nstructure for storing and transmitting block headers and signatures to light clients and the ECDSA\nsignature schemes (more efficiently verifiable on EVM). Light clients now only have to check if the\nblock has a super-majority of BEEFY votes by validators."}),"\n",(0,i.jsx)(n.p,{children:"Overall, BEEFY addresses the limitations of GRANDPA finality for bridges to chains like Ethereum by\nproviding a more lightweight and efficient finality solution."}),"\n",(0,i.jsxs)(n.p,{children:["For additional implementation details about BEEFY, see\n",(0,i.jsx)(n.a,{href:"https://spec.polkadot.network/#sect-grandpa-beefy",children:"the Polkadot Specification"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"resources",children:"Resources"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.a,{href:"https://research.web3.foundation/Polkadot/protocols/block-production/Babe",children:"BABE paper"})," - The\nacademic description of the BABE protocol."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.a,{href:"https://github.com/w3f/consensus/blob/master/pdf/grandpa.pdf",children:"GRANDPA paper"})," - The academic\ndescription of the GRANDPA finality gadget. Contains formal proofs of the algorithm."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.a,{href:"https://github.com/paritytech/finality-grandpa",children:"Rust implementation"})," - The reference\nimplementation and the accompanying\n",(0,i.jsx)(n.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/grandpa/src/lib.rs",children:"Substrate pallet"}),"."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.a,{href:"https://www.crowdcast.io/e/polkadot-block-production",children:"Block Production and Finalization in Polkadot"})," -\nAn explanation of how BABE and GRANDPA work together to produce and finalize blocks on Kusama with\nBill Laboon."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.a,{href:"https://www.youtube.com/watch?v=1CuTSluL7v4&t=4s",children:"Block Production and Finalization in Polkadot: Understanding the BABE and GRANDPA Protocols"})," -\nAn academic talk by Bill Laboon, given at MIT Cryptoeconomic Systems 2020, describing Polkadot's\nhybrid consensus model in-depth."]}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}},25704:(e,n,o)=>{o.d(n,{A:()=>t});const t=o.p+"assets/images/best_chain-52a3da00fb2f804a198c73690fcedc4f.png"},28453:(e,n,o)=>{o.d(n,{R:()=>s,x:()=>r});var t=o(96540);const i={},a=t.createContext(i);function s(e){const n=t.useContext(a);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:s(e.components),t.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/2e0c35d5.0d41bb9b.js b/assets/js/2e0c35d5.0d41bb9b.js deleted file mode 100644 index e613070711b9..000000000000 --- a/assets/js/2e0c35d5.0d41bb9b.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2698],{73123:(e,n,o)=>{o.r(n),o.d(n,{assets:()=>d,contentTitle:()=>a,default:()=>h,frontMatter:()=>i,metadata:()=>s,toc:()=>l});var t=o(74848),r=o(28453);const i={id:"polkadot-governance-dashboard",title:"Polkadot Governance Dashboard",sidebar_label:"Governance Dashboard",description:"Polkadot Governance Dashboard descriptions",keywords:["polkadot","governance","dashboard","dune"],slug:"../polkadot-governance-dashboard"},a="Polkadot Governance Dashboard",s={id:"general/dune-analytics/polkadot-dashboards/legacy/polkadot-governance-dashboard",title:"Polkadot Governance Dashboard",description:"Polkadot Governance Dashboard descriptions",source:"@site/../docs/general/dune-analytics/polkadot-dashboards/legacy/polkadot-governance-dashboard.md",sourceDirName:"general/dune-analytics/polkadot-dashboards/legacy",slug:"/general/dune-analytics/polkadot-dashboards/polkadot-governance-dashboard",permalink:"/docs/general/dune-analytics/polkadot-dashboards/polkadot-governance-dashboard",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/polkadot-dashboards/legacy/polkadot-governance-dashboard.md",tags:[],version:"current",lastUpdatedBy:"MK",lastUpdatedAt:1717658873e3,frontMatter:{id:"polkadot-governance-dashboard",title:"Polkadot Governance Dashboard",sidebar_label:"Governance Dashboard",description:"Polkadot Governance Dashboard descriptions",keywords:["polkadot","governance","dashboard","dune"],slug:"../polkadot-governance-dashboard"}},d={},l=[{value:"View On Dune: Polkadot Governance Dashboard",id:"view-on-dune-polkadot-governance-dashboard",level:2},{value:"Polkadot Treasury Flow",id:"polkadot-treasury-flow",level:3},{value:"Number of Votes by Duration of Lock",id:"number-of-votes-by-duration-of-lock",level:3},{value:"Number of Monthly Voters / Monthly Capital by Type / Monthly Voting Power by Type",id:"number-of-monthly-voters--monthly-capital-by-type--monthly-voting-power-by-type",level:3},{value:"Conviction Voting Power: tokens * conviction_multiplier",id:"conviction-voting-power-tokens--conviction_multiplier",level:3},{value:"Current Lock Durations",id:"current-lock-durations",level:3},{value:"Polkadot Number of Referenda by Outcome (OpenGov)",id:"polkadot-number-of-referenda-by-outcome-opengov",level:3},{value:"Polkadot Number of Referenda by Origin",id:"polkadot-number-of-referenda-by-origin",level:3},{value:"Monthly Tokens Voted by Direction / Monthly Voting Power by Direction",id:"monthly-tokens-voted-by-direction--monthly-voting-power-by-direction",level:3},{value:"Opengov Vote Types",id:"opengov-vote-types",level:3},{value:"Recent Major Delegation Changes",id:"recent-major-delegation-changes",level:3},{value:"Recent Major Swing Votes",id:"recent-major-swing-votes",level:3},{value:"Whale Voters",id:"whale-voters",level:3},{value:"Awakened Whale Voters",id:"awakened-whale-voters",level:3}];function c(e){const n={a:"a",code:"code",em:"em",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.header,{children:(0,t.jsx)(n.h1,{id:"polkadot-governance-dashboard",children:"Polkadot Governance Dashboard"})}),"\n",(0,t.jsxs)(n.h2,{id:"view-on-dune-polkadot-governance-dashboard",children:["View On Dune: ",(0,t.jsx)(n.a,{href:"https://dune.com/substrate/polkadot-gov",children:"Polkadot Governance Dashboard"})]}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.strong,{children:"Polkadot Governance Dashboard"})," provides a clear and concise representation of the\n",(0,t.jsx)(n.a,{href:"https://wiki.polkadot.network/docs/en/learn-governance",children:"network's governance"})," activities. It serves\nas a useful tool for community members to observe\n",(0,t.jsx)(n.a,{href:"https://wiki.polkadot.network/docs/en/learn-treasury",children:"treasury management"}),",\n",(0,t.jsx)(n.a,{href:"https://wiki.polkadot.network/docs/en/learn-governance#referenda",children:"referendum outcomes"}),", and voting\npatterns. This dashboard aims to enhance community engagement by simplifying access to governance\ninformation and fostering a transparent decision-making environment."]}),"\n",(0,t.jsxs)(n.p,{children:["Authored by ",(0,t.jsx)(n.em,{children:"Stanley"}),", ",(0,t.jsx)(n.em,{children:"Jerry"}),", and ",(0,t.jsx)(n.em,{children:"William"})," ",(0,t.jsx)(n.a,{href:"https://x.com/colorfulnotion",children:(0,t.jsx)(n.strong,{children:"@ colorfulnotion"})})]}),"\n",(0,t.jsx)(n.h3,{id:"polkadot-treasury-flow",children:"Polkadot Treasury Flow"}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.strong,{children:"Polkadot Treasury Flow"})," chart visualizes the monthly financial movements within the Polkadot\ntreasury, delineating inflows from inflation and outflows from proposals, bounties, and burnt funds,\nto present a clear picture of the treasury's net flow. For more details, see the\n",(0,t.jsx)(n.a,{href:"https://wiki.polkadot.network/docs/learn-treasury",children:"Polkadot Treasury"})," section on the Polkadot Wiki."]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Treasury Netflow"}),": Treasury Inflows - Treasury Outflows"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Treasury Inflows"}),": Inflation + Fees + Txn Tips + Slash"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Treasury Outflows"}),": Opengov Proposals(Spender + Tipper Track) + Bounties + Burnt"]}),"\n"]}),"\n",(0,t.jsx)("iframe",{src:"https://dune.com/embeds/3386769/5684359/",height:"350",width:"100%"}),"\n",(0,t.jsx)(n.h3,{id:"number-of-votes-by-duration-of-lock",children:"Number of Votes by Duration of Lock"}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.strong,{children:"Number of Votes by Duration of Lock"})," chart visualizes Polkadot governance voting commitments,\ncategorizing votes by token lock duration to reflect conviction levels. It highlights community\nengagement from short-term to long-term network commitments, showcasing voter participation strength\nand stability. For more on voting and locking, see\n",(0,t.jsx)(n.a,{href:"https://wiki.polkadot.network/docs/learn-governance#voluntary-locking",children:"Voluntary Locking"})," and\n",(0,t.jsx)(n.a,{href:"https://wiki.polkadot.network/docs/learn-governance#adaptive-quorum-biasing",children:"Adaptive Quorum Biasing"}),"\non Polkadot Wiki."]}),"\n",(0,t.jsx)("iframe",{src:"https://dune.com/embeds/3393628/5694824/",height:"350",width:"100%"}),"\n",(0,t.jsx)(n.h3,{id:"number-of-monthly-voters--monthly-capital-by-type--monthly-voting-power-by-type",children:"Number of Monthly Voters / Monthly Capital by Type / Monthly Voting Power by Type"}),"\n",(0,t.jsxs)(n.p,{children:["These charts offer insights into monthly Polkadot governance engagement, tracking participant\nnumbers, represented capital, and voting conviction. They highlight the community's dynamic\ninvolvement in network direction. For governance details, visit\n",(0,t.jsx)(n.a,{href:"https://wiki.polkadot.network/docs/learn-governance",children:"Polkadot Governance"})," and\n",(0,t.jsx)(n.a,{href:"https://wiki.polkadot.network/docs/learn-governance#introduction-to-polkadot-opengov",children:"Introduction to Polkadot OpenGov"}),"."]}),"\n",(0,t.jsx)("iframe",{src:"https://dune.com/embeds/3393704/5695078/",height:"350",width:"100%"}),"\n",(0,t.jsx)("iframe",{src:"https://dune.com/embeds/3393704/5695222/",height:"350",width:"100%"}),"\n",(0,t.jsx)("iframe",{src:"https://dune.com/embeds/3393704/5695499/",height:"350",width:"100%"}),"\n",(0,t.jsx)(n.h3,{id:"conviction-voting-power-tokens--conviction_multiplier",children:"Conviction Voting Power: tokens * conviction_multiplier"}),"\n",(0,t.jsx)(n.h3,{id:"current-lock-durations",children:"Current Lock Durations"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"None(0.1x)"})," - No lock"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Locked1x"})," - 7 Days"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Locked2x"})," - 14 Days"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Locked3x"})," - 28 Days"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Locked4x"})," - 56 Days"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Locked5x"})," - 112 Days"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Locked6x"})," - 224 Days"]}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"polkadot-number-of-referenda-by-outcome-opengov",children:"Polkadot Number of Referenda by Outcome (OpenGov)"}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.strong,{children:"Polkadot Number of Referenda by Outcome (OpenGov)"})," chart provides a categorical breakdown of\nreferenda results within the Polkadot ecosystem, categorized into ",(0,t.jsx)(n.code,{children:"Confirmed"}),", ",(0,t.jsx)(n.code,{children:"Rejected"}),",\n",(0,t.jsx)(n.code,{children:"Timed Out"}),", and ",(0,t.jsx)(n.code,{children:"Cancelled"}),". The data is curated to reflect the outcomes of governance decisions up\nto a specified date."]}),"\n",(0,t.jsx)("iframe",{src:"https://dune.com/embeds/3352377/5619239/",height:"350",width:"100%"}),"\n",(0,t.jsx)(n.h3,{id:"polkadot-number-of-referenda-by-origin",children:"Polkadot Number of Referenda by Origin"}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.strong,{children:"Polkadot Number of Referenda by Origin"})," chart delineates the sources of governance proposals\nwithin the Polkadot network. It quantifies the initiatives by their points of inception, offering a\nclear distribution of referenda across different origins. In the context of Polkadot, ",(0,t.jsx)(n.strong,{children:"Origin"}),"\nrefers to the track through which the proposal has been introduced. This can include\n",(0,t.jsx)(n.a,{href:"https://wiki.polkadot.network/docs/learn-governance#public-referenda",children:"public proposals"})," submitted\nby the token holders,\n",(0,t.jsx)(n.a,{href:"https://wiki.polkadot.network/docs/learn-governance#council-referenda",children:"council motions"}),", or\n",(0,t.jsx)(n.a,{href:"https://wiki.polkadot.network/docs/learn-treasury#bounties-spending",children:"treasury proposals"}),". Each\ntrack has its own procedural requirements and reflects a different aspect of the network\u2019s\ngovernance model."]}),"\n",(0,t.jsx)("iframe",{src:"https://dune.com/embeds/3415581/5734690/",height:"350",width:"100%"}),"\n",(0,t.jsx)(n.h3,{id:"monthly-tokens-voted-by-direction--monthly-voting-power-by-direction",children:"Monthly Tokens Voted by Direction / Monthly Voting Power by Direction"}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.strong,{children:"Monthly Tokens Voted by Direction"})," and ",(0,t.jsx)(n.strong,{children:"Monthly Voting Power by Direction"})," charts provide a\ndynamic view of the Polkadot community's\n",(0,t.jsx)(n.a,{href:"https://wiki.polkadot.network/docs/maintain-guides-democracy#voting-on-a-proposal",children:"voting behavior"}),"\nover time, breaking down the distribution of tokens and voting power across various voting options.\nThese charts reveal the community's sentiment trends, showcasing the balance between support\n('Aye'), opposition ('Nay'), and nuanced positions ('Split' and 'SplitAbstain'), both in terms of\ntoken quantity and the weighted influence of votes. By tracking these metrics, stakeholders can\ngauge the evolving priorities and concerns within the Polkadot ecosystem."]}),"\n",(0,t.jsx)(n.h3,{id:"opengov-vote-types",children:"Opengov Vote Types"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Standard Aye"})," - Available with 0.1-6x conviction"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Standard Nay"})," - Available with 0.1-6x conviction"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Split"})," - Allocate votes between (Aye, Nay) with 0.1x conviction"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"splitAbstain"}),": Allocate votes between (Aye, Nay, Abstain) with 0.1x conviction"]}),"\n"]}),"\n",(0,t.jsx)("iframe",{src:"https://dune.com/embeds/3394126/5695667/",height:"350",width:"100%"}),"\n",(0,t.jsx)("iframe",{src:"https://dune.com/embeds/3394126/5695709/",height:"350",width:"100%"}),"\n",(0,t.jsx)(n.h3,{id:"recent-major-delegation-changes",children:"Recent Major Delegation Changes"}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.strong,{children:"Recent Major Delegation Changes"})," chart visualizes significant delegation transactions within\na specified timeframe. It highlights two primary types of delegations: 'First Time', where a\ndelegator is delegating to a validator for the first time, and 'Switching', where a delegator\nchanges their delegation from one validator to another"]}),"\n",(0,t.jsx)("iframe",{src:"https://dune.com/embeds/3460749/5816431/",height:"350",width:"100%"}),"\n",(0,t.jsx)(n.h3,{id:"recent-major-swing-votes",children:"Recent Major Swing Votes"}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.strong,{children:"Recent Major Swing Votes"})," chart presents a crucial analysis of voting dynamics within the\nPolkadot network, focusing on the instances where voters have changed their stance on specific\nreferenda. This shift, known as a 'swing vote', is particularly significant when the voter wields a\nsubstantial number of tokens, with the potential to sway the outcome of a referendum. The chart\nmeticulously records these pivotal moments, detailing the voter's identity, the magnitude of their\ntokens, and the direction of their swing\u2014whether towards ",(0,t.jsx)(n.code,{children:"Aye"}),", ",(0,t.jsx)(n.code,{children:"Nay"}),", or `Abstain."]}),"\n",(0,t.jsx)("iframe",{src:"https://dune.com/embeds/3460920/5816752/",height:"350",width:"100%"}),"\n",(0,t.jsx)(n.h3,{id:"whale-voters",children:"Whale Voters"}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.strong,{children:"Whale Voters"})," chart illuminates the participation of prominent token holders in Polkadot's\ngovernance decisions. It showcases the influential votes cast by individuals or entities with\nsignificant token stakes, their voting preferences, and the corresponding voting power. This chart\nelucidates the sway of large stakeholders in shaping the outcome of governance referenda,\nhighlighting the distribution of their voting power in recent decisions."]}),"\n",(0,t.jsx)("iframe",{src:"https://dune.com/embeds/3461952/5818542/",height:"350",width:"100%"}),"\n",(0,t.jsx)(n.h3,{id:"awakened-whale-voters",children:"Awakened Whale Voters"}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.strong,{children:"Awakened Whale Voters"}),' chart visualizes the activity of influential participants in the\nPolkadot governance system, commonly known as "whales". These are voters who have not participated\nin the voting process for at least 90 days and have now cast a vote with a significant amount of\ntokens. The chart displays their voting behavior, the referenda they are involved in, and their\nvoting conviction, using interactive elements that link to external references for detailed\nblockchain data. This allows for an in-depth look at the re-emergence of major stakeholders in the\ndecision-making process.']}),"\n",(0,t.jsx)("iframe",{src:"https://dune.com/embeds/3461031/5816940/",height:"350",width:"100%"})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(c,{...e})}):c(e)}},28453:(e,n,o)=>{o.d(n,{R:()=>a,x:()=>s});var t=o(96540);const r={},i=t.createContext(r);function a(e){const n=t.useContext(i);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function s(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:a(e.components),t.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/2e0c35d5.d284506a.js b/assets/js/2e0c35d5.d284506a.js new file mode 100644 index 000000000000..307426d8afdf --- /dev/null +++ b/assets/js/2e0c35d5.d284506a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2698],{4057:(e,n,o)=>{o.r(n),o.d(n,{assets:()=>d,contentTitle:()=>s,default:()=>h,frontMatter:()=>a,metadata:()=>t,toc:()=>l});const t=JSON.parse('{"id":"general/dune-analytics/polkadot-dashboards/legacy/polkadot-governance-dashboard","title":"Polkadot Governance Dashboard","description":"Polkadot Governance Dashboard descriptions","source":"@site/../docs/general/dune-analytics/polkadot-dashboards/legacy/polkadot-governance-dashboard.md","sourceDirName":"general/dune-analytics/polkadot-dashboards/legacy","slug":"/general/dune-analytics/polkadot-dashboards/polkadot-governance-dashboard","permalink":"/docs/general/dune-analytics/polkadot-dashboards/polkadot-governance-dashboard","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/polkadot-dashboards/legacy/polkadot-governance-dashboard.md","tags":[],"version":"current","lastUpdatedBy":"MK","lastUpdatedAt":1717658873000,"frontMatter":{"id":"polkadot-governance-dashboard","title":"Polkadot Governance Dashboard","sidebar_label":"Governance Dashboard","description":"Polkadot Governance Dashboard descriptions","keywords":["polkadot","governance","dashboard","dune"],"slug":"../polkadot-governance-dashboard"}}');var r=o(74848),i=o(28453);const a={id:"polkadot-governance-dashboard",title:"Polkadot Governance Dashboard",sidebar_label:"Governance Dashboard",description:"Polkadot Governance Dashboard descriptions",keywords:["polkadot","governance","dashboard","dune"],slug:"../polkadot-governance-dashboard"},s="Polkadot Governance Dashboard",d={},l=[{value:"View On Dune: Polkadot Governance Dashboard",id:"view-on-dune-polkadot-governance-dashboard",level:2},{value:"Polkadot Treasury Flow",id:"polkadot-treasury-flow",level:3},{value:"Number of Votes by Duration of Lock",id:"number-of-votes-by-duration-of-lock",level:3},{value:"Number of Monthly Voters / Monthly Capital by Type / Monthly Voting Power by Type",id:"number-of-monthly-voters--monthly-capital-by-type--monthly-voting-power-by-type",level:3},{value:"Conviction Voting Power: tokens * conviction_multiplier",id:"conviction-voting-power-tokens--conviction_multiplier",level:3},{value:"Current Lock Durations",id:"current-lock-durations",level:3},{value:"Polkadot Number of Referenda by Outcome (OpenGov)",id:"polkadot-number-of-referenda-by-outcome-opengov",level:3},{value:"Polkadot Number of Referenda by Origin",id:"polkadot-number-of-referenda-by-origin",level:3},{value:"Monthly Tokens Voted by Direction / Monthly Voting Power by Direction",id:"monthly-tokens-voted-by-direction--monthly-voting-power-by-direction",level:3},{value:"Opengov Vote Types",id:"opengov-vote-types",level:3},{value:"Recent Major Delegation Changes",id:"recent-major-delegation-changes",level:3},{value:"Recent Major Swing Votes",id:"recent-major-swing-votes",level:3},{value:"Whale Voters",id:"whale-voters",level:3},{value:"Awakened Whale Voters",id:"awakened-whale-voters",level:3}];function c(e){const n={a:"a",code:"code",em:"em",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.header,{children:(0,r.jsx)(n.h1,{id:"polkadot-governance-dashboard",children:"Polkadot Governance Dashboard"})}),"\n",(0,r.jsxs)(n.h2,{id:"view-on-dune-polkadot-governance-dashboard",children:["View On Dune: ",(0,r.jsx)(n.a,{href:"https://dune.com/substrate/polkadot-gov",children:"Polkadot Governance Dashboard"})]}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.strong,{children:"Polkadot Governance Dashboard"})," provides a clear and concise representation of the\n",(0,r.jsx)(n.a,{href:"https://wiki.polkadot.network/docs/en/learn-governance",children:"network's governance"})," activities. It serves\nas a useful tool for community members to observe\n",(0,r.jsx)(n.a,{href:"https://wiki.polkadot.network/docs/en/learn-treasury",children:"treasury management"}),",\n",(0,r.jsx)(n.a,{href:"https://wiki.polkadot.network/docs/en/learn-governance#referenda",children:"referendum outcomes"}),", and voting\npatterns. This dashboard aims to enhance community engagement by simplifying access to governance\ninformation and fostering a transparent decision-making environment."]}),"\n",(0,r.jsxs)(n.p,{children:["Authored by ",(0,r.jsx)(n.em,{children:"Stanley"}),", ",(0,r.jsx)(n.em,{children:"Jerry"}),", and ",(0,r.jsx)(n.em,{children:"William"})," ",(0,r.jsx)(n.a,{href:"https://x.com/colorfulnotion",children:(0,r.jsx)(n.strong,{children:"@ colorfulnotion"})})]}),"\n",(0,r.jsx)(n.h3,{id:"polkadot-treasury-flow",children:"Polkadot Treasury Flow"}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.strong,{children:"Polkadot Treasury Flow"})," chart visualizes the monthly financial movements within the Polkadot\ntreasury, delineating inflows from inflation and outflows from proposals, bounties, and burnt funds,\nto present a clear picture of the treasury's net flow. For more details, see the\n",(0,r.jsx)(n.a,{href:"https://wiki.polkadot.network/docs/learn-treasury",children:"Polkadot Treasury"})," section on the Polkadot Wiki."]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Treasury Netflow"}),": Treasury Inflows - Treasury Outflows"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Treasury Inflows"}),": Inflation + Fees + Txn Tips + Slash"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Treasury Outflows"}),": Opengov Proposals(Spender + Tipper Track) + Bounties + Burnt"]}),"\n"]}),"\n",(0,r.jsx)("iframe",{src:"https://dune.com/embeds/3386769/5684359/",height:"350",width:"100%"}),"\n",(0,r.jsx)(n.h3,{id:"number-of-votes-by-duration-of-lock",children:"Number of Votes by Duration of Lock"}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.strong,{children:"Number of Votes by Duration of Lock"})," chart visualizes Polkadot governance voting commitments,\ncategorizing votes by token lock duration to reflect conviction levels. It highlights community\nengagement from short-term to long-term network commitments, showcasing voter participation strength\nand stability. For more on voting and locking, see\n",(0,r.jsx)(n.a,{href:"https://wiki.polkadot.network/docs/learn-governance#voluntary-locking",children:"Voluntary Locking"})," and\n",(0,r.jsx)(n.a,{href:"https://wiki.polkadot.network/docs/learn-governance#adaptive-quorum-biasing",children:"Adaptive Quorum Biasing"}),"\non Polkadot Wiki."]}),"\n",(0,r.jsx)("iframe",{src:"https://dune.com/embeds/3393628/5694824/",height:"350",width:"100%"}),"\n",(0,r.jsx)(n.h3,{id:"number-of-monthly-voters--monthly-capital-by-type--monthly-voting-power-by-type",children:"Number of Monthly Voters / Monthly Capital by Type / Monthly Voting Power by Type"}),"\n",(0,r.jsxs)(n.p,{children:["These charts offer insights into monthly Polkadot governance engagement, tracking participant\nnumbers, represented capital, and voting conviction. They highlight the community's dynamic\ninvolvement in network direction. For governance details, visit\n",(0,r.jsx)(n.a,{href:"https://wiki.polkadot.network/docs/learn-governance",children:"Polkadot Governance"})," and\n",(0,r.jsx)(n.a,{href:"https://wiki.polkadot.network/docs/learn-governance#introduction-to-polkadot-opengov",children:"Introduction to Polkadot OpenGov"}),"."]}),"\n",(0,r.jsx)("iframe",{src:"https://dune.com/embeds/3393704/5695078/",height:"350",width:"100%"}),"\n",(0,r.jsx)("iframe",{src:"https://dune.com/embeds/3393704/5695222/",height:"350",width:"100%"}),"\n",(0,r.jsx)("iframe",{src:"https://dune.com/embeds/3393704/5695499/",height:"350",width:"100%"}),"\n",(0,r.jsx)(n.h3,{id:"conviction-voting-power-tokens--conviction_multiplier",children:"Conviction Voting Power: tokens * conviction_multiplier"}),"\n",(0,r.jsx)(n.h3,{id:"current-lock-durations",children:"Current Lock Durations"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"None(0.1x)"})," - No lock"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Locked1x"})," - 7 Days"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Locked2x"})," - 14 Days"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Locked3x"})," - 28 Days"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Locked4x"})," - 56 Days"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Locked5x"})," - 112 Days"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Locked6x"})," - 224 Days"]}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"polkadot-number-of-referenda-by-outcome-opengov",children:"Polkadot Number of Referenda by Outcome (OpenGov)"}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.strong,{children:"Polkadot Number of Referenda by Outcome (OpenGov)"})," chart provides a categorical breakdown of\nreferenda results within the Polkadot ecosystem, categorized into ",(0,r.jsx)(n.code,{children:"Confirmed"}),", ",(0,r.jsx)(n.code,{children:"Rejected"}),",\n",(0,r.jsx)(n.code,{children:"Timed Out"}),", and ",(0,r.jsx)(n.code,{children:"Cancelled"}),". The data is curated to reflect the outcomes of governance decisions up\nto a specified date."]}),"\n",(0,r.jsx)("iframe",{src:"https://dune.com/embeds/3352377/5619239/",height:"350",width:"100%"}),"\n",(0,r.jsx)(n.h3,{id:"polkadot-number-of-referenda-by-origin",children:"Polkadot Number of Referenda by Origin"}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.strong,{children:"Polkadot Number of Referenda by Origin"})," chart delineates the sources of governance proposals\nwithin the Polkadot network. It quantifies the initiatives by their points of inception, offering a\nclear distribution of referenda across different origins. In the context of Polkadot, ",(0,r.jsx)(n.strong,{children:"Origin"}),"\nrefers to the track through which the proposal has been introduced. This can include\n",(0,r.jsx)(n.a,{href:"https://wiki.polkadot.network/docs/learn-governance#public-referenda",children:"public proposals"})," submitted\nby the token holders,\n",(0,r.jsx)(n.a,{href:"https://wiki.polkadot.network/docs/learn-governance#council-referenda",children:"council motions"}),", or\n",(0,r.jsx)(n.a,{href:"https://wiki.polkadot.network/docs/learn-treasury#bounties-spending",children:"treasury proposals"}),". Each\ntrack has its own procedural requirements and reflects a different aspect of the network\u2019s\ngovernance model."]}),"\n",(0,r.jsx)("iframe",{src:"https://dune.com/embeds/3415581/5734690/",height:"350",width:"100%"}),"\n",(0,r.jsx)(n.h3,{id:"monthly-tokens-voted-by-direction--monthly-voting-power-by-direction",children:"Monthly Tokens Voted by Direction / Monthly Voting Power by Direction"}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.strong,{children:"Monthly Tokens Voted by Direction"})," and ",(0,r.jsx)(n.strong,{children:"Monthly Voting Power by Direction"})," charts provide a\ndynamic view of the Polkadot community's\n",(0,r.jsx)(n.a,{href:"https://wiki.polkadot.network/docs/maintain-guides-democracy#voting-on-a-proposal",children:"voting behavior"}),"\nover time, breaking down the distribution of tokens and voting power across various voting options.\nThese charts reveal the community's sentiment trends, showcasing the balance between support\n('Aye'), opposition ('Nay'), and nuanced positions ('Split' and 'SplitAbstain'), both in terms of\ntoken quantity and the weighted influence of votes. By tracking these metrics, stakeholders can\ngauge the evolving priorities and concerns within the Polkadot ecosystem."]}),"\n",(0,r.jsx)(n.h3,{id:"opengov-vote-types",children:"Opengov Vote Types"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Standard Aye"})," - Available with 0.1-6x conviction"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Standard Nay"})," - Available with 0.1-6x conviction"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Split"})," - Allocate votes between (Aye, Nay) with 0.1x conviction"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"splitAbstain"}),": Allocate votes between (Aye, Nay, Abstain) with 0.1x conviction"]}),"\n"]}),"\n",(0,r.jsx)("iframe",{src:"https://dune.com/embeds/3394126/5695667/",height:"350",width:"100%"}),"\n",(0,r.jsx)("iframe",{src:"https://dune.com/embeds/3394126/5695709/",height:"350",width:"100%"}),"\n",(0,r.jsx)(n.h3,{id:"recent-major-delegation-changes",children:"Recent Major Delegation Changes"}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.strong,{children:"Recent Major Delegation Changes"})," chart visualizes significant delegation transactions within\na specified timeframe. It highlights two primary types of delegations: 'First Time', where a\ndelegator is delegating to a validator for the first time, and 'Switching', where a delegator\nchanges their delegation from one validator to another"]}),"\n",(0,r.jsx)("iframe",{src:"https://dune.com/embeds/3460749/5816431/",height:"350",width:"100%"}),"\n",(0,r.jsx)(n.h3,{id:"recent-major-swing-votes",children:"Recent Major Swing Votes"}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.strong,{children:"Recent Major Swing Votes"})," chart presents a crucial analysis of voting dynamics within the\nPolkadot network, focusing on the instances where voters have changed their stance on specific\nreferenda. This shift, known as a 'swing vote', is particularly significant when the voter wields a\nsubstantial number of tokens, with the potential to sway the outcome of a referendum. The chart\nmeticulously records these pivotal moments, detailing the voter's identity, the magnitude of their\ntokens, and the direction of their swing\u2014whether towards ",(0,r.jsx)(n.code,{children:"Aye"}),", ",(0,r.jsx)(n.code,{children:"Nay"}),", or `Abstain."]}),"\n",(0,r.jsx)("iframe",{src:"https://dune.com/embeds/3460920/5816752/",height:"350",width:"100%"}),"\n",(0,r.jsx)(n.h3,{id:"whale-voters",children:"Whale Voters"}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.strong,{children:"Whale Voters"})," chart illuminates the participation of prominent token holders in Polkadot's\ngovernance decisions. It showcases the influential votes cast by individuals or entities with\nsignificant token stakes, their voting preferences, and the corresponding voting power. This chart\nelucidates the sway of large stakeholders in shaping the outcome of governance referenda,\nhighlighting the distribution of their voting power in recent decisions."]}),"\n",(0,r.jsx)("iframe",{src:"https://dune.com/embeds/3461952/5818542/",height:"350",width:"100%"}),"\n",(0,r.jsx)(n.h3,{id:"awakened-whale-voters",children:"Awakened Whale Voters"}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.strong,{children:"Awakened Whale Voters"}),' chart visualizes the activity of influential participants in the\nPolkadot governance system, commonly known as "whales". These are voters who have not participated\nin the voting process for at least 90 days and have now cast a vote with a significant amount of\ntokens. The chart displays their voting behavior, the referenda they are involved in, and their\nvoting conviction, using interactive elements that link to external references for detailed\nblockchain data. This allows for an in-depth look at the re-emergence of major stakeholders in the\ndecision-making process.']}),"\n",(0,r.jsx)("iframe",{src:"https://dune.com/embeds/3461031/5816940/",height:"350",width:"100%"})]})}function h(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(c,{...e})}):c(e)}},28453:(e,n,o)=>{o.d(n,{R:()=>a,x:()=>s});var t=o(96540);const r={},i=t.createContext(r);function a(e){const n=t.useContext(i);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function s(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:a(e.components),t.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/2e944e01.4d71ef92.js b/assets/js/2e944e01.4d71ef92.js deleted file mode 100644 index 3cf76f8b06f6..000000000000 --- a/assets/js/2e944e01.4d71ef92.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4231],{71471:(e,a,n)=>{n.r(a),n.d(a,{assets:()=>o,contentTitle:()=>i,default:()=>h,frontMatter:()=>r,metadata:()=>d,toc:()=>l});var t=n(74848),s=n(28453);const r={id:"manta-dashboards",title:"Manta Dashboards",sidebar_label:"Manta",description:"Manta Atlantic is a fast and decentralized ZK Layer 1 supporting modular on-chain compliance identities.",keywords:["polkadot","dashboard","dune","manta"],slug:"../manta-dashboards"},i="Manta Dashboards",d={id:"general/dune-analytics/parachain-dashboards/manta-dashboards",title:"Manta Dashboards",description:"Manta Atlantic is a fast and decentralized ZK Layer 1 supporting modular on-chain compliance identities.",source:"@site/../docs/general/dune-analytics/parachain-dashboards/manta-dashboards.md",sourceDirName:"general/dune-analytics/parachain-dashboards",slug:"/general/dune-analytics/manta-dashboards",permalink:"/docs/general/dune-analytics/manta-dashboards",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/parachain-dashboards/manta-dashboards.md",tags:[],version:"current",lastUpdatedBy:"MK",lastUpdatedAt:1719215716e3,frontMatter:{id:"manta-dashboards",title:"Manta Dashboards",sidebar_label:"Manta",description:"Manta Atlantic is a fast and decentralized ZK Layer 1 supporting modular on-chain compliance identities.",keywords:["polkadot","dashboard","dune","manta"],slug:"../manta-dashboards"},sidebar:"docs",previous:{title:"Litentry",permalink:"/docs/general/dune-analytics/litentry-dashboards"},next:{title:"Moonbeam",permalink:"/docs/general/dune-analytics/moonbeam-dashboards"}},o={},l=[{value:"Overview",id:"overview",level:2},{value:"Featured Dashboards on Dune",id:"featured-dashboards-on-dune",level:2},{value:"Key Tables",id:"key-tables",level:2},{value:"Useful Queries",id:"useful-queries",level:2},{value:"Getting Started with Queries",id:"getting-started-with-queries",level:2}];function c(e){const a={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,s.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(a.header,{children:(0,t.jsx)(a.h1,{id:"manta-dashboards",children:"Manta Dashboards"})}),"\n",(0,t.jsx)(a.h2,{id:"overview",children:"Overview"}),"\n",(0,t.jsx)(a.p,{children:"Manta Atlantic is a fast and decentralized ZK Layer 1 supporting modular on-chain compliance\nidentities. Its suite of core products and technologies, including zkNFTs, staking, and ecosystem\nprojects, offers user-friendly access to powerful ZK-enabled use cases."}),"\n",(0,t.jsx)(a.h2,{id:"featured-dashboards-on-dune",children:"Featured Dashboards on Dune"}),"\n",(0,t.jsx)(a.p,{children:"Here you will find a variety of dashboards that help visualize data from the Manta parachain:"}),"\n",(0,t.jsxs)(a.ul,{children:["\n",(0,t.jsxs)(a.li,{children:[(0,t.jsx)(a.a,{href:"https://dune.com/substrate/manta",children:"Manta Parachain Staking Dashboard"}),": This dashboard provides\nvarious information on Manta Parachain Staking."]}),"\n"]}),"\n",(0,t.jsx)(a.h2,{id:"key-tables",children:"Key Tables"}),"\n",(0,t.jsx)(a.p,{children:"Data from the manta parachain is organized into several key tables:"}),"\n",(0,t.jsxs)(a.ul,{children:["\n",(0,t.jsx)(a.li,{children:(0,t.jsx)(a.code,{children:"manta.balances"})}),"\n",(0,t.jsx)(a.li,{children:(0,t.jsx)(a.code,{children:"manta.blocks"})}),"\n",(0,t.jsx)(a.li,{children:(0,t.jsx)(a.code,{children:"manta.calls"})}),"\n",(0,t.jsx)(a.li,{children:(0,t.jsx)(a.code,{children:"manta.events"})}),"\n",(0,t.jsx)(a.li,{children:(0,t.jsx)(a.code,{children:"manta.extrinsics"})}),"\n",(0,t.jsx)(a.li,{children:(0,t.jsx)(a.code,{children:"manta.transfers"})}),"\n"]}),"\n",(0,t.jsxs)(a.p,{children:["Start building your own queries using granular data on Dune\n",(0,t.jsx)(a.a,{href:"https://dune.com/queries?category=canonical&namespace=manta",children:"here"}),"."]}),"\n",(0,t.jsx)(a.h2,{id:"useful-queries",children:"Useful Queries"}),"\n",(0,t.jsx)(a.p,{children:(0,t.jsx)(a.a,{href:"https://dune.com/queries/3722522",children:"Manta Delegator All events"})}),"\n",(0,t.jsx)(a.p,{children:"Some useful queries for Manta are provided:"}),"\n",(0,t.jsxs)(a.table,{children:[(0,t.jsx)(a.thead,{children:(0,t.jsxs)(a.tr,{children:[(0,t.jsx)(a.th,{children:"Title"}),(0,t.jsx)(a.th,{children:"Query"}),(0,t.jsx)(a.th,{children:"Description"})]})}),(0,t.jsx)(a.tbody,{children:(0,t.jsxs)(a.tr,{children:[(0,t.jsx)(a.td,{children:"Manta Delegator All events"}),(0,t.jsx)(a.td,{children:(0,t.jsx)(a.a,{href:"https://dune.com/queries/3722522",children:"query_3722522"})}),(0,t.jsx)(a.td,{children:"This query provides a comprehensive overview of all events related to Delegator activities on the Manta network, including collator, delegator, amount, and event type."})]})})]}),"\n",(0,t.jsx)(a.h2,{id:"getting-started-with-queries",children:"Getting Started with Queries"}),"\n",(0,t.jsx)(a.p,{children:"To get started with querying data from Unique, you are welcome to use the mentioned materialized\nqueries. You can use the following DuneSQL queries as examples:"}),"\n",(0,t.jsx)(a.pre,{children:(0,t.jsx)(a.code,{className:"language-sql",metastring:'title="Manta to Moonbeam XTokens Transfer" showLineNumbers',children:"SELECT\n DATE_TRUNC('day', block_time) AS day,\n SUM(\n CAST(json_extract_scalar(params, '$.amount') AS DOUBLE) / POWER(10, 18)\n ) AS amount,\n 'Manta to Moonbeam' AS section\nFROM\n manta.extrinsics\nWHERE\n section = 'xTokens'\n AND method = 'transfer'\n AND json_extract_scalar(params, '$.dest.v3.interior.x2[0].parachain') = '2004'\nGROUP BY\n DATE_TRUNC('day', block_time)\nORDER BY\n day DESC;\n"})}),"\n",(0,t.jsx)(a.p,{children:"Query result:"}),"\n",(0,t.jsx)("iframe",{src:"https://dune.com/embeds/3747203/6371404/ea0be060-b61c-4379-8227-f7fc5e04c980",height:"350",width:"100%"}),"\n",(0,t.jsx)(a.admonition,{title:"DuneSQL Referece",type:"info",children:(0,t.jsxs)(a.p,{children:["For more information on DuneSQL, please refer to the ",(0,t.jsx)(a.a,{href:"/docs/general/dunesql-cheatsheet",children:"DuneSQL Cheatsheet"}),"\nand\n",(0,t.jsx)(a.a,{href:"https://docs.dune.com/query-engine/Functions-and-operators/index",children:"DuneSQL Official Documentation"}),"."]})})]})}function h(e={}){const{wrapper:a}={...(0,s.R)(),...e.components};return a?(0,t.jsx)(a,{...e,children:(0,t.jsx)(c,{...e})}):c(e)}},28453:(e,a,n)=>{n.d(a,{R:()=>i,x:()=>d});var t=n(96540);const s={},r=t.createContext(s);function i(e){const a=t.useContext(r);return t.useMemo((function(){return"function"==typeof e?e(a):{...a,...e}}),[a,e])}function d(e){let a;return a=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),t.createElement(r.Provider,{value:a},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/2e944e01.cfffe9fb.js b/assets/js/2e944e01.cfffe9fb.js new file mode 100644 index 000000000000..6498f72f4246 --- /dev/null +++ b/assets/js/2e944e01.cfffe9fb.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4231],{13186:(e,a,n)=>{n.r(a),n.d(a,{assets:()=>o,contentTitle:()=>d,default:()=>h,frontMatter:()=>i,metadata:()=>t,toc:()=>l});const t=JSON.parse('{"id":"general/dune-analytics/parachain-dashboards/manta-dashboards","title":"Manta Dashboards","description":"Manta Atlantic is a fast and decentralized ZK Layer 1 supporting modular on-chain compliance identities.","source":"@site/../docs/general/dune-analytics/parachain-dashboards/manta-dashboards.md","sourceDirName":"general/dune-analytics/parachain-dashboards","slug":"/general/dune-analytics/manta-dashboards","permalink":"/docs/general/dune-analytics/manta-dashboards","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/parachain-dashboards/manta-dashboards.md","tags":[],"version":"current","lastUpdatedBy":"MK","lastUpdatedAt":1719215716000,"frontMatter":{"id":"manta-dashboards","title":"Manta Dashboards","sidebar_label":"Manta","description":"Manta Atlantic is a fast and decentralized ZK Layer 1 supporting modular on-chain compliance identities.","keywords":["polkadot","dashboard","dune","manta"],"slug":"../manta-dashboards"},"sidebar":"docs","previous":{"title":"Litentry","permalink":"/docs/general/dune-analytics/litentry-dashboards"},"next":{"title":"Moonbeam","permalink":"/docs/general/dune-analytics/moonbeam-dashboards"}}');var s=n(74848),r=n(28453);const i={id:"manta-dashboards",title:"Manta Dashboards",sidebar_label:"Manta",description:"Manta Atlantic is a fast and decentralized ZK Layer 1 supporting modular on-chain compliance identities.",keywords:["polkadot","dashboard","dune","manta"],slug:"../manta-dashboards"},d="Manta Dashboards",o={},l=[{value:"Overview",id:"overview",level:2},{value:"Featured Dashboards on Dune",id:"featured-dashboards-on-dune",level:2},{value:"Key Tables",id:"key-tables",level:2},{value:"Useful Queries",id:"useful-queries",level:2},{value:"Getting Started with Queries",id:"getting-started-with-queries",level:2}];function c(e){const a={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a.header,{children:(0,s.jsx)(a.h1,{id:"manta-dashboards",children:"Manta Dashboards"})}),"\n",(0,s.jsx)(a.h2,{id:"overview",children:"Overview"}),"\n",(0,s.jsx)(a.p,{children:"Manta Atlantic is a fast and decentralized ZK Layer 1 supporting modular on-chain compliance\nidentities. Its suite of core products and technologies, including zkNFTs, staking, and ecosystem\nprojects, offers user-friendly access to powerful ZK-enabled use cases."}),"\n",(0,s.jsx)(a.h2,{id:"featured-dashboards-on-dune",children:"Featured Dashboards on Dune"}),"\n",(0,s.jsx)(a.p,{children:"Here you will find a variety of dashboards that help visualize data from the Manta parachain:"}),"\n",(0,s.jsxs)(a.ul,{children:["\n",(0,s.jsxs)(a.li,{children:[(0,s.jsx)(a.a,{href:"https://dune.com/substrate/manta",children:"Manta Parachain Staking Dashboard"}),": This dashboard provides\nvarious information on Manta Parachain Staking."]}),"\n"]}),"\n",(0,s.jsx)(a.h2,{id:"key-tables",children:"Key Tables"}),"\n",(0,s.jsx)(a.p,{children:"Data from the manta parachain is organized into several key tables:"}),"\n",(0,s.jsxs)(a.ul,{children:["\n",(0,s.jsx)(a.li,{children:(0,s.jsx)(a.code,{children:"manta.balances"})}),"\n",(0,s.jsx)(a.li,{children:(0,s.jsx)(a.code,{children:"manta.blocks"})}),"\n",(0,s.jsx)(a.li,{children:(0,s.jsx)(a.code,{children:"manta.calls"})}),"\n",(0,s.jsx)(a.li,{children:(0,s.jsx)(a.code,{children:"manta.events"})}),"\n",(0,s.jsx)(a.li,{children:(0,s.jsx)(a.code,{children:"manta.extrinsics"})}),"\n",(0,s.jsx)(a.li,{children:(0,s.jsx)(a.code,{children:"manta.transfers"})}),"\n"]}),"\n",(0,s.jsxs)(a.p,{children:["Start building your own queries using granular data on Dune\n",(0,s.jsx)(a.a,{href:"https://dune.com/queries?category=canonical&namespace=manta",children:"here"}),"."]}),"\n",(0,s.jsx)(a.h2,{id:"useful-queries",children:"Useful Queries"}),"\n",(0,s.jsx)(a.p,{children:(0,s.jsx)(a.a,{href:"https://dune.com/queries/3722522",children:"Manta Delegator All events"})}),"\n",(0,s.jsx)(a.p,{children:"Some useful queries for Manta are provided:"}),"\n",(0,s.jsxs)(a.table,{children:[(0,s.jsx)(a.thead,{children:(0,s.jsxs)(a.tr,{children:[(0,s.jsx)(a.th,{children:"Title"}),(0,s.jsx)(a.th,{children:"Query"}),(0,s.jsx)(a.th,{children:"Description"})]})}),(0,s.jsx)(a.tbody,{children:(0,s.jsxs)(a.tr,{children:[(0,s.jsx)(a.td,{children:"Manta Delegator All events"}),(0,s.jsx)(a.td,{children:(0,s.jsx)(a.a,{href:"https://dune.com/queries/3722522",children:"query_3722522"})}),(0,s.jsx)(a.td,{children:"This query provides a comprehensive overview of all events related to Delegator activities on the Manta network, including collator, delegator, amount, and event type."})]})})]}),"\n",(0,s.jsx)(a.h2,{id:"getting-started-with-queries",children:"Getting Started with Queries"}),"\n",(0,s.jsx)(a.p,{children:"To get started with querying data from Unique, you are welcome to use the mentioned materialized\nqueries. You can use the following DuneSQL queries as examples:"}),"\n",(0,s.jsx)(a.pre,{children:(0,s.jsx)(a.code,{className:"language-sql",metastring:'title="Manta to Moonbeam XTokens Transfer" showLineNumbers',children:"SELECT\n DATE_TRUNC('day', block_time) AS day,\n SUM(\n CAST(json_extract_scalar(params, '$.amount') AS DOUBLE) / POWER(10, 18)\n ) AS amount,\n 'Manta to Moonbeam' AS section\nFROM\n manta.extrinsics\nWHERE\n section = 'xTokens'\n AND method = 'transfer'\n AND json_extract_scalar(params, '$.dest.v3.interior.x2[0].parachain') = '2004'\nGROUP BY\n DATE_TRUNC('day', block_time)\nORDER BY\n day DESC;\n"})}),"\n",(0,s.jsx)(a.p,{children:"Query result:"}),"\n",(0,s.jsx)("iframe",{src:"https://dune.com/embeds/3747203/6371404/ea0be060-b61c-4379-8227-f7fc5e04c980",height:"350",width:"100%"}),"\n",(0,s.jsx)(a.admonition,{title:"DuneSQL Referece",type:"info",children:(0,s.jsxs)(a.p,{children:["For more information on DuneSQL, please refer to the ",(0,s.jsx)(a.a,{href:"/docs/general/dunesql-cheatsheet",children:"DuneSQL Cheatsheet"}),"\nand\n",(0,s.jsx)(a.a,{href:"https://docs.dune.com/query-engine/Functions-and-operators/index",children:"DuneSQL Official Documentation"}),"."]})})]})}function h(e={}){const{wrapper:a}={...(0,r.R)(),...e.components};return a?(0,s.jsx)(a,{...e,children:(0,s.jsx)(c,{...e})}):c(e)}},28453:(e,a,n)=>{n.d(a,{R:()=>i,x:()=>d});var t=n(96540);const s={},r=t.createContext(s);function i(e){const a=t.useContext(r);return t.useMemo((function(){return"function"==typeof e?e(a):{...a,...e}}),[a,e])}function d(e){let a;return a=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),t.createElement(r.Provider,{value:a},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/2ea50c63.20ff8a14.js b/assets/js/2ea50c63.20ff8a14.js new file mode 100644 index 000000000000..5e4f2c54e188 --- /dev/null +++ b/assets/js/2ea50c63.20ff8a14.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1560],{6859:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>c,contentTitle:()=>o,default:()=>d,frontMatter:()=>i,metadata:()=>n,toc:()=>h});const n=JSON.parse('{"id":"learn/learn-xcm-usecases","title":"XCM Use-cases & Examples","description":"Cross-consensus Interactions and the XCM Format.","source":"@site/../docs/learn/learn-xcm-usecases.md","sourceDirName":"learn","slug":"/learn-xcm-usecases","permalink":"/docs/learn-xcm-usecases","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-xcm-usecases.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1694432988000,"frontMatter":{"id":"learn-xcm-usecases","title":"XCM Use-cases & Examples","sidebar_label":"XCM Use-cases","description":"Cross-consensus Interactions and the XCM Format.","keywords":["cross-consensus","XCM","XCMP","interoperability","communication"],"slug":"../learn-xcm-usecases"},"sidebar":"docs","previous":{"title":"XCM Pallet","permalink":"/docs/learn-xcm-pallet"},"next":{"title":"XCM Transport","permalink":"/docs/learn-xcm-transport"}}');var r=t(74848),a=t(28453);const i={id:"learn-xcm-usecases",title:"XCM Use-cases & Examples",sidebar_label:"XCM Use-cases",description:"Cross-consensus Interactions and the XCM Format.",keywords:["cross-consensus","XCM","XCMP","interoperability","communication"],slug:"../learn-xcm-usecases"},o=void 0,c={},h=[{value:"Example Use-Cases",id:"example-use-cases",level:3},{value:"Asset Teleportation",id:"asset-teleportation",level:3},{value:"Reserve Asset Transfer",id:"reserve-asset-transfer",level:3}];function l(e){const s={a:"a",admonition:"admonition",code:"code",h3:"h3",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,a.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.admonition,{title:"XCM Documentation",type:"info",children:(0,r.jsxs)(s.p,{children:["For a more practical approach to utilizing XCM, refer to the ",(0,r.jsx)(s.a,{href:"./learn/xcm",children:"XCM Docs"}),". Please keep in\nmind that XCM is under active development."]})}),"\n",(0,r.jsx)(s.p,{children:"XCM has a multitude of use cases. While the wiki covers some of the key commonplace interactions,\nthe XCM format can be used to construct many more combinations to suit the use case at hand."}),"\n",(0,r.jsx)(s.h3,{id:"example-use-cases",children:"Example Use-Cases"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsx)(s.li,{children:"Request for specific operations to occur on the recipient system such as governance voting."}),"\n",(0,r.jsxs)(s.li,{children:["Enables single use-case chains e.g. the ",(0,r.jsx)(s.a,{href:"/docs/learn-guides-assets-create",children:"Asset Hub"})," as asset\nparachains"]}),"\n",(0,r.jsx)(s.li,{children:"Optionally include payment of fees on a target network for requested operation."}),"\n",(0,r.jsxs)(s.li,{children:["Provide methods for various asset transfer models:","\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"Remote Transfers"}),": control an account on a remote chain, allowing the local chain to have an\naddress on the remote chain for receiving funds and to eventually transfer those funds it\ncontrols into other accounts on that remote chain."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"Asset Teleportation"}),": movement of an asset happens by destroying it on one side and creating\na clone on the other side."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"Reserve Asset Transfer"}),": there may be two chains that want to nominate a third chain, where\none includes a native asset that can be used as a reserve for that asset. Then, the derivative\nform of the asset on each of those chains would be fully backed, allowing the derivative asset\nto be exchanged for the underlying asset on the reserve chain backing it."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(s.p,{children:["Let's review two of these example asset transfer use cases: ",(0,r.jsx)(s.strong,{children:"Asset Teleportation"})," and ",(0,r.jsx)(s.strong,{children:"Reserve\nAsset Transfer"}),"."]}),"\n",(0,r.jsx)(s.h3,{id:"asset-teleportation",children:"Asset Teleportation"}),"\n",(0,r.jsx)(s.p,{children:"An asset teleport operation from a single source to a single destination."}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.img,{alt:"Diagram of the usage flow while teleporting assets",src:t(17905).A+"",width:"659",height:"304"})}),"\n",(0,r.jsxs)(s.ol,{children:["\n",(0,r.jsx)(s.li,{children:(0,r.jsx)(s.a,{href:"https://github.com/paritytech/xcm-format#initiateteleport",children:"InitiateTeleport"})}),"\n"]}),"\n",(0,r.jsx)(s.p,{children:"The source gathers the assets to be teleported from the sending account and takes them out of the\ncirculating supply, taking note of the total amount of assets that was taken out."}),"\n",(0,r.jsxs)(s.ol,{start:"2",children:["\n",(0,r.jsx)(s.li,{children:(0,r.jsx)(s.a,{href:"https://github.com/paritytech/xcm-format#receiveteleportedasset",children:"ReceiveTeleportedAsset"})}),"\n"]}),"\n",(0,r.jsxs)(s.p,{children:["The source then creates an XCM instruction called ",(0,r.jsx)(s.code,{children:"ReceiveTeleportedAssets"})," and puts the amount of\nassets taken out of circulation and the receiving account as parameters to this instruction. It then\nsends this instruction over to the destination, where it gets processed and new assets gets put back\ninto circulating supply accordingly."]}),"\n",(0,r.jsxs)(s.ol,{start:"3",children:["\n",(0,r.jsx)(s.li,{children:(0,r.jsx)(s.a,{href:"https://github.com/paritytech/xcm-format#depositasset",children:"DepositAsset"})}),"\n"]}),"\n",(0,r.jsx)(s.p,{children:"The destination then deposits the assets to the receiving account of the asset."}),"\n",(0,r.jsx)(s.h3,{id:"reserve-asset-transfer",children:"Reserve Asset Transfer"}),"\n",(0,r.jsx)(s.p,{children:"When consensus systems do not have a established layer of trust over which they can transfer assets,\nthey can opt for a trusted 3rd entity to store the assets."}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.img,{alt:"xcm-reserve-asset-transfer",src:t(80973).A+"",width:"656",height:"482"})}),"\n",(0,r.jsxs)(s.ol,{children:["\n",(0,r.jsx)(s.li,{children:(0,r.jsx)(s.a,{href:"https://github.com/paritytech/xcm-format#initiatereservewithdraw",children:"InitiateReserveWithdraw"})}),"\n"]}),"\n",(0,r.jsx)(s.p,{children:"The source gathers the derivative assets to be transferred from the sending account and burns them,\ntaking note of the amount of derivatives that were burned."}),"\n",(0,r.jsxs)(s.ol,{start:"2",children:["\n",(0,r.jsx)(s.li,{children:(0,r.jsx)(s.a,{href:"https://github.com/paritytech/xcm-format#withdrawasset",children:"WithdrawAsset"})}),"\n"]}),"\n",(0,r.jsx)(s.p,{children:"The source sends a WithdrawAsset instruction to the reserve, instructing the reserve to withdraw\nassets equivalent to the amount of derivatives burned from the source's sovereign account."}),"\n",(0,r.jsxs)(s.ol,{start:"3",children:["\n",(0,r.jsx)(s.li,{children:(0,r.jsx)(s.a,{href:"https://github.com/paritytech/xcm-format#depositreserveasset",children:"DepositReserveAsset"})}),"\n"]}),"\n",(0,r.jsx)(s.p,{children:"The reserve deposits the assets withdrawn from the previous step to the destination's sovereign\naccount, taking note of the amount of assets deposited."}),"\n",(0,r.jsxs)(s.ol,{start:"4",children:["\n",(0,r.jsx)(s.li,{children:(0,r.jsx)(s.a,{href:"https://github.com/paritytech/xcm-format#reserveassetdeposited",children:"ReserveAssetDeposited"})}),"\n"]}),"\n",(0,r.jsx)(s.p,{children:"The reserve creates a ReserveAssetDeposited instruction with the amount of assets deposited to the\ndestination's sovereign account, and sends this instruction onwards to the destination. The\ndestination receives the instruction and processes it, minting the derivative assets as a result of\nthe process."}),"\n",(0,r.jsxs)(s.ol,{start:"5",children:["\n",(0,r.jsx)(s.li,{children:(0,r.jsx)(s.a,{href:"https://github.com/paritytech/xcm-format#depositasset",children:"DepositAsset"})}),"\n"]}),"\n",(0,r.jsx)(s.p,{children:"The destination deposits the derivative assets minted to the receiving account."})]})}function d(e={}){const{wrapper:s}={...(0,a.R)(),...e.components};return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(l,{...e})}):l(e)}},17905:(e,s,t)=>{t.d(s,{A:()=>n});const n=t.p+"assets/images/xcm-asset-teleportation-fa5ec3787ee0c9bed184c11b95444385.png"},80973:(e,s,t)=>{t.d(s,{A:()=>n});const n=t.p+"assets/images/xcm-reserve-asset-transfer-daa1c383e969a1b782c40109f70dcfde.png"},28453:(e,s,t)=>{t.d(s,{R:()=>i,x:()=>o});var n=t(96540);const r={},a=n.createContext(r);function i(e){const s=n.useContext(a);return n.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function o(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),n.createElement(a.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/2ea50c63.e2cd5107.js b/assets/js/2ea50c63.e2cd5107.js deleted file mode 100644 index ba9e949aa8bc..000000000000 --- a/assets/js/2ea50c63.e2cd5107.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1560],{26160:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>c,contentTitle:()=>i,default:()=>d,frontMatter:()=>a,metadata:()=>o,toc:()=>h});var n=t(74848),r=t(28453);const a={id:"learn-xcm-usecases",title:"XCM Use-cases & Examples",sidebar_label:"XCM Use-cases",description:"Cross-consensus Interactions and the XCM Format.",keywords:["cross-consensus","XCM","XCMP","interoperability","communication"],slug:"../learn-xcm-usecases"},i=void 0,o={id:"learn/learn-xcm-usecases",title:"XCM Use-cases & Examples",description:"Cross-consensus Interactions and the XCM Format.",source:"@site/../docs/learn/learn-xcm-usecases.md",sourceDirName:"learn",slug:"/learn-xcm-usecases",permalink:"/docs/learn-xcm-usecases",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-xcm-usecases.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1694432988e3,frontMatter:{id:"learn-xcm-usecases",title:"XCM Use-cases & Examples",sidebar_label:"XCM Use-cases",description:"Cross-consensus Interactions and the XCM Format.",keywords:["cross-consensus","XCM","XCMP","interoperability","communication"],slug:"../learn-xcm-usecases"},sidebar:"docs",previous:{title:"XCM Pallet",permalink:"/docs/learn-xcm-pallet"},next:{title:"XCM Transport",permalink:"/docs/learn-xcm-transport"}},c={},h=[{value:"Example Use-Cases",id:"example-use-cases",level:3},{value:"Asset Teleportation",id:"asset-teleportation",level:3},{value:"Reserve Asset Transfer",id:"reserve-asset-transfer",level:3}];function l(e){const s={a:"a",admonition:"admonition",code:"code",h3:"h3",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.admonition,{title:"XCM Documentation",type:"info",children:(0,n.jsxs)(s.p,{children:["For a more practical approach to utilizing XCM, refer to the ",(0,n.jsx)(s.a,{href:"./learn/xcm",children:"XCM Docs"}),". Please keep in\nmind that XCM is under active development."]})}),"\n",(0,n.jsx)(s.p,{children:"XCM has a multitude of use cases. While the wiki covers some of the key commonplace interactions,\nthe XCM format can be used to construct many more combinations to suit the use case at hand."}),"\n",(0,n.jsx)(s.h3,{id:"example-use-cases",children:"Example Use-Cases"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsx)(s.li,{children:"Request for specific operations to occur on the recipient system such as governance voting."}),"\n",(0,n.jsxs)(s.li,{children:["Enables single use-case chains e.g. the ",(0,n.jsx)(s.a,{href:"/docs/learn-guides-assets-create",children:"Asset Hub"})," as asset\nparachains"]}),"\n",(0,n.jsx)(s.li,{children:"Optionally include payment of fees on a target network for requested operation."}),"\n",(0,n.jsxs)(s.li,{children:["Provide methods for various asset transfer models:","\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.strong,{children:"Remote Transfers"}),": control an account on a remote chain, allowing the local chain to have an\naddress on the remote chain for receiving funds and to eventually transfer those funds it\ncontrols into other accounts on that remote chain."]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.strong,{children:"Asset Teleportation"}),": movement of an asset happens by destroying it on one side and creating\na clone on the other side."]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.strong,{children:"Reserve Asset Transfer"}),": there may be two chains that want to nominate a third chain, where\none includes a native asset that can be used as a reserve for that asset. Then, the derivative\nform of the asset on each of those chains would be fully backed, allowing the derivative asset\nto be exchanged for the underlying asset on the reserve chain backing it."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(s.p,{children:["Let's review two of these example asset transfer use cases: ",(0,n.jsx)(s.strong,{children:"Asset Teleportation"})," and ",(0,n.jsx)(s.strong,{children:"Reserve\nAsset Transfer"}),"."]}),"\n",(0,n.jsx)(s.h3,{id:"asset-teleportation",children:"Asset Teleportation"}),"\n",(0,n.jsx)(s.p,{children:"An asset teleport operation from a single source to a single destination."}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.img,{alt:"Diagram of the usage flow while teleporting assets",src:t(17905).A+"",width:"659",height:"304"})}),"\n",(0,n.jsxs)(s.ol,{children:["\n",(0,n.jsx)(s.li,{children:(0,n.jsx)(s.a,{href:"https://github.com/paritytech/xcm-format#initiateteleport",children:"InitiateTeleport"})}),"\n"]}),"\n",(0,n.jsx)(s.p,{children:"The source gathers the assets to be teleported from the sending account and takes them out of the\ncirculating supply, taking note of the total amount of assets that was taken out."}),"\n",(0,n.jsxs)(s.ol,{start:"2",children:["\n",(0,n.jsx)(s.li,{children:(0,n.jsx)(s.a,{href:"https://github.com/paritytech/xcm-format#receiveteleportedasset",children:"ReceiveTeleportedAsset"})}),"\n"]}),"\n",(0,n.jsxs)(s.p,{children:["The source then creates an XCM instruction called ",(0,n.jsx)(s.code,{children:"ReceiveTeleportedAssets"})," and puts the amount of\nassets taken out of circulation and the receiving account as parameters to this instruction. It then\nsends this instruction over to the destination, where it gets processed and new assets gets put back\ninto circulating supply accordingly."]}),"\n",(0,n.jsxs)(s.ol,{start:"3",children:["\n",(0,n.jsx)(s.li,{children:(0,n.jsx)(s.a,{href:"https://github.com/paritytech/xcm-format#depositasset",children:"DepositAsset"})}),"\n"]}),"\n",(0,n.jsx)(s.p,{children:"The destination then deposits the assets to the receiving account of the asset."}),"\n",(0,n.jsx)(s.h3,{id:"reserve-asset-transfer",children:"Reserve Asset Transfer"}),"\n",(0,n.jsx)(s.p,{children:"When consensus systems do not have a established layer of trust over which they can transfer assets,\nthey can opt for a trusted 3rd entity to store the assets."}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.img,{alt:"xcm-reserve-asset-transfer",src:t(80973).A+"",width:"656",height:"482"})}),"\n",(0,n.jsxs)(s.ol,{children:["\n",(0,n.jsx)(s.li,{children:(0,n.jsx)(s.a,{href:"https://github.com/paritytech/xcm-format#initiatereservewithdraw",children:"InitiateReserveWithdraw"})}),"\n"]}),"\n",(0,n.jsx)(s.p,{children:"The source gathers the derivative assets to be transferred from the sending account and burns them,\ntaking note of the amount of derivatives that were burned."}),"\n",(0,n.jsxs)(s.ol,{start:"2",children:["\n",(0,n.jsx)(s.li,{children:(0,n.jsx)(s.a,{href:"https://github.com/paritytech/xcm-format#withdrawasset",children:"WithdrawAsset"})}),"\n"]}),"\n",(0,n.jsx)(s.p,{children:"The source sends a WithdrawAsset instruction to the reserve, instructing the reserve to withdraw\nassets equivalent to the amount of derivatives burned from the source's sovereign account."}),"\n",(0,n.jsxs)(s.ol,{start:"3",children:["\n",(0,n.jsx)(s.li,{children:(0,n.jsx)(s.a,{href:"https://github.com/paritytech/xcm-format#depositreserveasset",children:"DepositReserveAsset"})}),"\n"]}),"\n",(0,n.jsx)(s.p,{children:"The reserve deposits the assets withdrawn from the previous step to the destination's sovereign\naccount, taking note of the amount of assets deposited."}),"\n",(0,n.jsxs)(s.ol,{start:"4",children:["\n",(0,n.jsx)(s.li,{children:(0,n.jsx)(s.a,{href:"https://github.com/paritytech/xcm-format#reserveassetdeposited",children:"ReserveAssetDeposited"})}),"\n"]}),"\n",(0,n.jsx)(s.p,{children:"The reserve creates a ReserveAssetDeposited instruction with the amount of assets deposited to the\ndestination's sovereign account, and sends this instruction onwards to the destination. The\ndestination receives the instruction and processes it, minting the derivative assets as a result of\nthe process."}),"\n",(0,n.jsxs)(s.ol,{start:"5",children:["\n",(0,n.jsx)(s.li,{children:(0,n.jsx)(s.a,{href:"https://github.com/paritytech/xcm-format#depositasset",children:"DepositAsset"})}),"\n"]}),"\n",(0,n.jsx)(s.p,{children:"The destination deposits the derivative assets minted to the receiving account."})]})}function d(e={}){const{wrapper:s}={...(0,r.R)(),...e.components};return s?(0,n.jsx)(s,{...e,children:(0,n.jsx)(l,{...e})}):l(e)}},17905:(e,s,t)=>{t.d(s,{A:()=>n});const n=t.p+"assets/images/xcm-asset-teleportation-fa5ec3787ee0c9bed184c11b95444385.png"},80973:(e,s,t)=>{t.d(s,{A:()=>n});const n=t.p+"assets/images/xcm-reserve-asset-transfer-daa1c383e969a1b782c40109f70dcfde.png"},28453:(e,s,t)=>{t.d(s,{R:()=>i,x:()=>o});var n=t(96540);const r={},a=n.createContext(r);function i(e){const s=n.useContext(a);return n.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function o(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),n.createElement(a.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/2f3b630e.04579bf9.js b/assets/js/2f3b630e.04579bf9.js deleted file mode 100644 index da23cf8fd333..000000000000 --- a/assets/js/2f3b630e.04579bf9.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk=self.webpackChunk||[]).push([[2584],{95132:(e,n,t)=>{"use strict";t.r(n),t.d(n,{assets:()=>f,contentTitle:()=>m,default:()=>j,frontMatter:()=>u,metadata:()=>g,toc:()=>v});var o=t(74848),i=t(28453),r=(t(47379),t(96540)),a=(0,o.jsx)("table",{children:(0,o.jsxs)("tbody",{children:[(0,o.jsxs)("tr",{children:[(0,o.jsx)("th",{children:"Lock Periods"}),(0,o.jsx)("th",{children:"Vote Multiplier"}),(0,o.jsx)("th",{children:"Length in Days"})]}),(0,o.jsxs)("tr",{children:[(0,o.jsx)("td",{children:"0"}),(0,o.jsx)("td",{children:"0.1"}),(0,o.jsx)("td",{id:"p0"})]}),(0,o.jsxs)("tr",{children:[(0,o.jsx)("td",{children:"1"}),(0,o.jsx)("td",{children:"1"}),(0,o.jsx)("td",{id:"p1"})]}),(0,o.jsxs)("tr",{children:[(0,o.jsx)("td",{children:"2"}),(0,o.jsx)("td",{children:"2"}),(0,o.jsx)("td",{id:"p2"})]}),(0,o.jsxs)("tr",{children:[(0,o.jsx)("td",{children:"4"}),(0,o.jsx)("td",{children:"3"}),(0,o.jsx)("td",{id:"p4"})]}),(0,o.jsxs)("tr",{children:[(0,o.jsx)("td",{children:"8"}),(0,o.jsx)("td",{children:"4"}),(0,o.jsx)("td",{id:"p8"})]}),(0,o.jsxs)("tr",{children:[(0,o.jsx)("td",{children:"16"}),(0,o.jsx)("td",{children:"5"}),(0,o.jsx)("td",{id:"p16"})]}),(0,o.jsxs)("tr",{children:[(0,o.jsx)("td",{children:"32"}),(0,o.jsx)("td",{children:"6"}),(0,o.jsx)("td",{id:"p32"})]})]})}),s=["p0","p1","p2","p4","p8","p16","p32"],l={p0:0,p1:7,p2:14,p4:28,p8:56,p16:112,p32:224},d={p0:0,p1:7,p2:14,p4:28,p8:56,p16:112,p32:224};function c(e){s.forEach((function(n){var t=document.getElementById(n);"polkadot"===e?t.innerText=l[n]:"kusama"===e&&(t.innerText=d[n])}))}const h=function(){var e=(0,r.useState)("");return e[0],e[1],(0,r.useEffect)((function(){var e=document.title;"Governance V1 \xb7 Polkadot Wiki"===e||"Introduction to Polkadot OpenGov \xb7 Polkadot Wiki"===e?c("polkadot"):"Governance V1 \xb7 Guide"===e||"Introduction to Polkadot OpenGov \xb7 Guide"===e?c("kusama"):console.log("Unknown wiki/guide type")}),[]),a};var p=t(67141);const u={id:"learn-polkadot-opengov",title:"Introduction to Polkadot OpenGov",sidebar_label:"Polkadot OpenGov",description:"Polkadot\u2019s Latest Model for Decentralized Governance.",keywords:["governance","referenda","proposal","voting","endorse"],slug:"../learn-polkadot-opengov"},m=void 0,g={id:"learn/learn-polkadot-opengov",title:"Introduction to Polkadot OpenGov",description:"Polkadot\u2019s Latest Model for Decentralized Governance.",source:"@site/../docs/learn/learn-polkadot-opengov.md",sourceDirName:"learn",slug:"/learn-polkadot-opengov",permalink:"/docs/learn-polkadot-opengov",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-polkadot-opengov.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1726760224e3,frontMatter:{id:"learn-polkadot-opengov",title:"Introduction to Polkadot OpenGov",sidebar_label:"Polkadot OpenGov",description:"Polkadot\u2019s Latest Model for Decentralized Governance.",keywords:["governance","referenda","proposal","voting","endorse"],slug:"../learn-polkadot-opengov"},sidebar:"docs",previous:{title:"Polkadot OpenGov",permalink:"/docs/learn-polkadot-opengov-index"},next:{title:"OpenGov Origins",permalink:"/docs/learn-polkadot-opengov-origins"}},f={},v=[{value:"Premise",id:"premise",level:2},{value:"Summary",id:"summary",level:2},{value:"Gov1 vs. Polkadot OpenGov",id:"gov1-vs-polkadot-opengov",level:2},{value:"Referenda",id:"referenda",level:2},{value:"Referenda Timeline",id:"referenda-timeline",level:3},{value:"Origins and Tracks",id:"origins-and-tracks",level:3},{value:"Voluntary Locking (Conviction Voting)",id:"voluntary-locking-conviction-voting",level:3},{value:"Approval and Support",id:"approval-and-support",level:3},{value:"Enactment",id:"enactment",level:3},{value:"Cancelling, Killing & Blacklisting",id:"cancelling-killing--blacklisting",level:3},{value:"Voting on a Referendum",id:"voting-on-a-referendum",level:2},{value:"Voting Without Conviction",id:"voting-without-conviction",level:3},{value:"Voting with Conviction",id:"voting-with-conviction",level:3},{value:"Multirole Delegation",id:"multirole-delegation",level:2},{value:"Resources",id:"resources",level:2}];function x(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",hr:"hr",img:"img",li:"li",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,i.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(p.A,{message:"Before voting or delegating in Polkadot OpenGov, get familiar with [balances and locks](./learn-account-balances#locks)."}),"\n",(0,o.jsxs)(n.admonition,{title:"The content in this document is subject to change",type:"caution",children:[(0,o.jsxs)(n.p,{children:["The governance protocol has already undergone iterations (see\n",(0,o.jsx)(n.a,{href:"/docs/learn/learn-governance",children:"Governance V1"}),"). Governance is a constantly evolving protocol at\nthis stage in its lifecycle."]}),(0,o.jsxs)(n.p,{children:["For additional support about Polkadot OpenGov, see the\n",(0,o.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/65000105211",children:"dedicated support pages"}),"."]})]}),"\n",(0,o.jsx)(n.p,{children:"Polkadot uses a sophisticated governance mechanism that allows it to evolve gracefully overtime at\nthe ultimate behest of its assembled stakeholders. The goal is to ensure that most of the stake can\nalways command the network."}),"\n",(0,o.jsxs)(n.p,{children:["Polkadot brings together various novel mechanisms, including an amorphous (abstract) form of\nstate-transition function stored on-chain defined in a platform-agnostic language (i.e.\n",(0,o.jsx)(n.a,{href:"/docs/learn-wasm",children:"WebAssembly"}),"), and several on-chain voting mechanisms such as referenda and batch\napproval voting. All changes to the protocol must be agreed upon by stake-weighted referenda."]}),"\n",(0,o.jsx)(n.h2,{id:"premise",children:"Premise"}),"\n",(0,o.jsxs)(n.p,{children:["Polkadot's first governance system (",(0,o.jsx)(n.a,{href:"/docs/learn/learn-governance",children:"Governance V1"}),") included three\nmain components."]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:["The ",(0,o.jsx)(n.a,{href:"/docs/learn/learn-governance#technical-committee",children:"Technical Committee"}),": A technocratic\ncommittee to manage upgrade timelines."]}),"\n",(0,o.jsxs)(n.li,{children:["The ",(0,o.jsx)(n.a,{href:"/docs/learn/learn-governance#council",children:"Council"}),': An approval-voted, elected executive\n"government" to manage parameters, admin, and spending proposals.']}),"\n",(0,o.jsx)(n.li,{children:"The Public: All token holders."}),"\n"]}),"\n",(0,o.jsxs)(n.p,{children:["Over the first few years of operation, Governance V1 ensured the appropriate usage of treasury funds\nand enabled timely upgrades and fixes. Like most early technologies, protocols must evolve as they\nmature to improve their shortcomings and keep up with modern advancements. In Governance V1, all\nreferenda carried the same weight as only one referendum could be voted on at a time (except for\nemergency proposals), and the voting period could last multiple weeks. Also, an\n",(0,o.jsx)(n.a,{href:"/docs/learn/learn-governance#alternating-voting-timetable",children:"alternating voting timetable"})," allowed\nto vote either for a public referendum or a council motion every 28 days (7 days on Kusama). This\nresulted in the system favoring careful consideration of very few proposals instead of broad\nconsideration of many."]}),"\n",(0,o.jsx)(n.p,{children:"Polkadot OpenGov changes how the practical means of day-to-day decisions are made, making the\nrepercussions of referenda better scoped and agile to increase the number of collective decisions\nthe system can make at any given time."}),"\n",(0,o.jsxs)(n.p,{children:["The following content is focused on Polkadot OpenGov, and on the main differences with previous\ngovernance versions. We recommend learning about ",(0,o.jsx)(n.a,{href:"/docs/learn/learn-governance",children:"Governance v1"})," to\nbetter understand the need for and the direction of Polkadot OpenGov."]}),"\n",(0,o.jsx)(n.h2,{id:"summary",children:"Summary"}),"\n",(0,o.jsx)(n.p,{children:"In Governance v1, active token holders (public) and the Council administrated the network's upgrade\ndecisions. Whether the public or the council initiated the proposal, it would eventually have to go\nthrough a referendum to let all holders (weighted by stake and conviction) make the decision."}),"\n",(0,o.jsx)(n.p,{children:"The Council fulfilled its role as the representative of the public, guardian of the treasury and\ninitiator of legislation, but it was often seen as a centralized entity. To further decentralize the\nnetwork, Polkadot OpenGov proposes the following main changes:"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"Migrating all responsibilities of the Council to the public via a direct democracy voting system."}),"\n",(0,o.jsxs)(n.li,{children:["Dissolving the current ",(0,o.jsx)(n.a,{href:"/docs/learn/learn-governance#council",children:"Council"})," collective"]}),"\n",(0,o.jsx)(n.li,{children:"Allowing users to delegate voting power in more ways to community members"}),"\n",(0,o.jsxs)(n.li,{children:["Dissolving the ",(0,o.jsx)(n.a,{href:"/docs/learn/learn-governance#technical-committee",children:"Technical Committee"})," and\nestablishing the broader ",(0,o.jsx)(n.a,{href:"/docs/learn-polkadot-technical-fellowship",children:"Polkadot Technical Fellowship"})]}),"\n"]}),"\n",(0,o.jsx)(n.p,{children:"The figure below shows an overview of Polkadot OpenGov's structure."}),"\n",(0,o.jsx)(n.admonition,{type:"info",children:(0,o.jsxs)(n.p,{children:["See ",(0,o.jsx)(n.a,{href:"/docs/learn/learn-governance#summary",children:"this page"})," for a comparison with the structure of\nGovernance V1."]})}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"opengov-overview",src:t(39040).A+"",width:"1920",height:"800"})}),"\n",(0,o.jsxs)(n.p,{children:["In Polkadot OpenGov, all the proposals are initiated by the public. The proposal will enter a\nLead-in period (for more information, see ",(0,o.jsx)(n.a,{href:"#referenda-timeline",children:"Referenda Timeline"}),"), after which it\nwill follow a specific ",(0,o.jsx)(n.a,{href:"#origins-and-tracks",children:"Track"})," which has a dedicated Origin. There are\n",(0,o.jsx)(n.a,{href:"/docs/learn-polkadot-opengov-origins#origins-and-tracks-info",children:"15 Origins"}),", each with a different\ntrack. The origins and tracks parameters are preset values that set the duration of a referendum as\nwell as how many referenda can be voted on simultaneously. For example, a treasury proposal can now\nbe submitted in different tracks depending on the amount requested. A proposal for a small tip will\nneed to be submitted to the Small Tipper track, while a proposal requiring substantial funds will\nneed to be submitted to the Medium or Big Spender track."]}),"\n",(0,o.jsxs)(n.p,{children:["The ",(0,o.jsx)(n.a,{href:"/docs/learn-polkadot-technical-fellowship",children:"Polkadot Technical Fellowship"})," can decide to\n",(0,o.jsx)(n.a,{href:"#whitelisting",children:"whitelist"})," a proposal that will be enacted through the Whitelist Caller origin.\nThose proposals will have a shorter Lead-in, Confirmation, and Enactment period when compared to the\nRoot Origin track."]}),"\n",(0,o.jsxs)(n.p,{children:["Each track has its own preset ",(0,o.jsx)(n.a,{href:"#approval-and-support",children:"Approval and Support"})," curves based on the\norigin's privileges. When both the approval and support criteria are satisfied for a specific period\n(called the confirmation period), the referendum passes and will be executed after the enactment\nperiod."]}),"\n",(0,o.jsx)(n.p,{children:"All referenda within each track and across tracks can be voted on simultaneously (assuming the\ntrack's maximum capacity is not reached)."}),"\n",(0,o.jsx)(n.p,{children:"Polkadot OpenGov also comes with multi-role delegations where the token holder can assign voting\npower on different tracks to different entities who are experts in judging the referenda submitted\nto those tracks. For example, suppose a token holder does not have the technical background to\nconsider the merits and vote on the referenda submitted to the Root track. In that case, they can\ndelegate their voting power just for the Root track to a trusted expert who (according to them) acts\nin the best interest of the network protocol. In this way, token holders do not need to be\nup-to-date with governance matters and can still make their votes count through delegates."}),"\n",(0,o.jsx)(n.h2,{id:"gov1-vs-polkadot-opengov",children:"Gov1 vs. Polkadot OpenGov"}),"\n",(0,o.jsxs)(n.table,{children:[(0,o.jsx)(n.thead,{children:(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.th,{children:"Governance V1"}),(0,o.jsx)(n.th,{children:"Polkadot OpenGov"}),(0,o.jsx)(n.th,{children:"Polkadot OpenGov Benefit"})]})}),(0,o.jsxs)(n.tbody,{children:[(0,o.jsxs)(n.tr,{children:[(0,o.jsxs)(n.td,{children:["Includes the ",(0,o.jsx)(n.a,{href:"/docs/learn/learn-governance#council",children:"Council"}),", the ",(0,o.jsx)(n.a,{href:"/docs/learn/learn-governance#technical-committee",children:"Technical Committee"}),", and the Public (i.e. token holders)."]}),(0,o.jsxs)(n.td,{children:["Includes the Public and the ",(0,o.jsx)(n.a,{href:"/docs/learn-polkadot-technical-fellowship",children:"Technical Fellowship"}),"."]}),(0,o.jsx)(n.td,{children:"Simpler and more decentralized structure."})]}),(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:"Referenda executed only from one origin (Root). Referenda in this origin must be carefully scrutinized. Therefore, there is only one track (i.e., only one referendum at a time can be executed)."}),(0,o.jsxs)(n.td,{children:["Referenda executed from ",(0,o.jsx)(n.a,{href:"/docs/learn-polkadot-opengov-origins#origins-and-tracks-info",children:"multiple origins"}),", each with a different track that shapes proposals\u2019 timelines. Depending on the origin, multiple referenda within the same track are possible."]}),(0,o.jsx)(n.td,{children:"Possibility to categorize proposals (based on importance and urgency) and execute them simultaneously within and between origin tracks."})]}),(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:"Proposals can be submitted by either the Council or the Public."}),(0,o.jsx)(n.td,{children:"The public submits proposals."}),(0,o.jsx)(n.td,{children:"More democratic."})]}),(0,o.jsxs)(n.tr,{children:[(0,o.jsxs)(n.td,{children:["Uses ",(0,o.jsx)(n.a,{href:"/docs/learn/learn-governance#adaptive-quorum-biasing",children:"Adaptive Quorum Biasing"})," to define the approval threshold based on turnout. Given the same turnout, council-initiated referenda require fewer Aye votes to pass compared to public referenda."]}),(0,o.jsx)(n.td,{children:"Uses origin-specific approval and support curves defining the amount of approval and support (i.e. turnout) needed as a function of time. The same curves are applied to all referenda within the same origin track."}),(0,o.jsx)(n.td,{children:"Referenda timeline depends on the origin and not on who submitted the proposal (i.e. Council or Public). This is a more democratic and equalitarian system."})]}),(0,o.jsxs)(n.tr,{children:[(0,o.jsxs)(n.td,{children:["Uses ",(0,o.jsx)(n.a,{href:"/docs/learn/learn-governance#alternating-voting-timetable",children:"alternating voting timetable"})," allowing voters to cast votes for either council or public referenda every 28 eras."]}),(0,o.jsx)(n.td,{children:"Multiple referenda can be voted at the same time."}),(0,o.jsx)(n.td,{children:"More flexible and agile governance system."})]}),(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:"Except for emergency proposals, all referenda have fixed voting and enactment periods of 28 eras."}),(0,o.jsx)(n.td,{children:"Periods' length is customizable and has pre-defined limits for each origin. The same limits apply to all tracks with the same origin. For example, the track in the origin Root will be longer than the track within the Small Tipper origin."}),(0,o.jsx)(n.td,{children:"Referenda\u2019s timeline is tailored to their importance and urgency. Flexible enactment period based on origin."})]}),(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:"Emergency proposals turned referenda can be simultaneously voted on and executed with other referenda and have shorter enactment periods. They must be proposed by the Technical Committee and approved by the Council."}),(0,o.jsx)(n.td,{children:"No emergency proposals. The Technical Fellowship can whitelist proposals that will have their origin with shorter lead-in, confirmation, and enactment periods."}),(0,o.jsx)(n.td,{children:"The Technical Fellowship is a more decentralized entity than the Technical Committee. Whitelisting a proposal requires a majority of approval from the fellowship."})]}),(0,o.jsxs)(n.tr,{children:[(0,o.jsxs)(n.td,{children:["Only the ",(0,o.jsx)(n.a,{href:"/docs/learn/learn-governance#endorsing-proposals",children:"most-endorsed proposal"})," is able to transit from Launch to Voting period. The time for the transition is indeterminate, and (with no possibility of canceling endorsements) proposers and endorsers might wait a long time before a referendum is tabled, and getting their deposits back."]}),(0,o.jsx)(n.td,{children:"All proposals will eventually be voted on (given track capacity and deposit are met and the Lead-in period has ended)."}),(0,o.jsx)(n.td,{children:"It allows all proposals to get a chance to be voted on in a timely, predictive manner."})]}),(0,o.jsxs)(n.tr,{children:[(0,o.jsxs)(n.td,{children:["Only ",(0,o.jsx)(n.em,{children:"aye"})," or ",(0,o.jsx)(n.em,{children:"nay"})," votes possible."]}),(0,o.jsx)(n.td,{children:"Voters can have the additional voting options of abstaining or splitting votes."}),(0,o.jsx)(n.td,{children:"More ways to engage in voting and increase turnout."})]}),(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:"Voters can decide to delegate votes to another account."}),(0,o.jsxs)(n.td,{children:["Voters can use ",(0,o.jsx)(n.a,{href:"#multirole-delegation",children:"multirole delegations"})," and delegate votes to different accounts depending on origins."]}),(0,o.jsx)(n.td,{children:"More agile delegations tailored by expertise."})]})]})]}),"\n",(0,o.jsx)(n.h2,{id:"referenda",children:"Referenda"}),"\n",(0,o.jsxs)(n.admonition,{title:"Public and Council Referenda in Governance v1",type:"info",children:[(0,o.jsxs)(n.p,{children:["With the Council's dissolution, ",(0,o.jsx)(n.a,{href:"/docs/learn/learn-governance#council-referenda",children:"council referenda"}),"\nare no longer present in Polkadot OpenGov."]}),(0,o.jsxs)(n.p,{children:["See ",(0,o.jsx)(n.a,{href:"/docs/learn/learn-governance#public-referenda",children:"this page"})," for more information about public\nreferenda in Governance v1."]})]}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"In Polkadot OpenGov all referenda are public."})," Anyone can start a referendum at any time and do\nso as often as they wish. Previous features were expanded and improved, most notably\n",(0,o.jsx)(n.a,{href:"#origins-and-tracks",children:(0,o.jsx)(n.strong,{children:"Origins and Tracks"})})," help facilitate the flow and processing of the\nsubmitted referenda. The ",(0,o.jsx)(n.a,{href:"/docs/learn-polkadot-technical-fellowship",children:"Technical Fellowship"})," has the\noption to ",(0,o.jsx)(n.a,{href:"#whitelisting",children:"whitelist"})," referenda that can be then proposed in the track with\n",(0,o.jsx)(n.a,{href:"/docs/learn-polkadot-opengov-origins#whitelisted-caller",children:"whitelist origin"}),"."]}),"\n",(0,o.jsx)(n.h3,{id:"referenda-timeline",children:"Referenda Timeline"}),"\n",(0,o.jsx)(n.admonition,{title:"Voting timetable in Governance v1",type:"info",children:(0,o.jsxs)(n.p,{children:["See ",(0,o.jsx)(n.a,{href:"/docs/learn/learn-governance#referenda-timeline",children:"this page"})," for more information about the\nvoting timetable in Governance v1."]})}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"opengov-timeline",src:t(17160).A+"",width:"1920",height:"800"})}),"\n",(0,o.jsx)(n.p,{children:"The figure above provides a summary view of the referenda timeline for Polkadot OpenGov."}),"\n",(0,o.jsxs)(n.p,{children:["In (1), when a referendum is initially created, the community can immediately vote on it. However,\nit is not immediately in a state where it can end or otherwise have its votes counted, approved, and\nultimately enacted. Instead, the proposal will stay within a ",(0,o.jsx)(n.strong,{children:"Lead-in Period"})," until it fulfills\nthree criteria:"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:'Proposals must stay within the lead-in period for a pre-defined minimum amount of time. This helps\nmitigate against the possibility of "decision sniping" where an attacker controlling a substantial\namount of voting power might seek to have a proposal passed immediately after proposing, not\nallowing the overall voting population adequate time to consider and participate.'}),"\n",(0,o.jsx)(n.li,{children:"There must be enough room for the decision within the origin. Different origins have their limit\non the number of proposals that can be decided simultaneously. Tracks that have more potent\nabilities will have lower limits. For example, the Root level Origin has a limit of one, implying\nthat only a single proposal may be decided on at once."}),"\n",(0,o.jsxs)(n.li,{children:["A decision deposit must be submitted. Creating a referendum is cheap as the deposit value consists\nof only the value required for the on-chain storage needed to track it. But, having a referendum\nreviewed and decided upon carries the risk of using up the limited spots available in the\nreferenda queue. Having a more significant but refundable deposit requirement makes sense to help\nmitigate spam. Failing to submit the decision deposit will lead to a referendum ",(0,o.jsx)(n.em,{children:"timeout"}),"."]}),"\n"]}),"\n",(0,o.jsx)(n.admonition,{title:"Decision Deposit Amounts",type:"info",children:(0,o.jsx)(n.p,{children:"In Polkadot OpenGov, someone must submit the Decision Deposit for a referendum to enter its Decision\nPeriod. The number of tokens required for the Decision Deposit depends on the track\u2019s privilege\nlevel. The higher the privilege, the higher the deposit. For example, malicious referenda posted on\nthe Small Tipper track inflict low economic damage to the network. In contrast, malicious referenda\non the Root track can inflict more significant harm, such as changing the entire network's runtime."})}),"\n",(0,o.jsxs)(n.p,{children:["Until they are in the lead-in period, proposals remain undecided. Once the criteria above are met,\nthe referendum moves to the ",(0,o.jsx)(n.em,{children:"deciding"})," state. The votes of the referendum are now counted towards\nthe outcome."]}),"\n",(0,o.jsxs)(n.p,{children:["In (2), the proposal enters the ",(0,o.jsx)(n.strong,{children:"Decision Period"}),", where voting can continue. For a proposal to be\napproved, votes must satisfy the approval and support criteria for at least the ",(0,o.jsx)(n.strong,{children:"Confirmation\nPeriod"}),"; otherwise, the proposal is automatically rejected. A rejected proposal can be resubmitted\nanytime and as many times as needed."]}),"\n",(0,o.jsxs)(n.p,{children:["In (3), approved proposals will enter the ",(0,o.jsx)(n.strong,{children:"Enactment Period"}),", after which proposed changes will be\nexecuted."]}),"\n",(0,o.jsx)(n.p,{children:"Note how the length of the lead-in, decision, confirmation, and enactment periods vary depending on\nthe track. Root origin track has more extended periods than the other tracks. Also, the number of\nreferenda within each track differs, with the Root origin track only accepting one proposal at a\ntime (see below)."}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"opengov-track-capacity",src:t(61019).A+"",width:"1920",height:"800"})}),"\n",(0,o.jsx)(n.p,{children:"This directly affects the number of proposals that can be voted on and executed simultaneously.\nContinuing the comparison between Root and Small Tipper, Small Tipper will allow many proposals on\nits track to be executed simultaneously. In contrast, Root will allow only one proposal to be on its\ntrack. Once the track capacity is filled, additional proposals in the lead-in period will queue\nuntil place is available to enter the decision period."}),"\n",(0,o.jsx)(n.h3,{id:"origins-and-tracks",children:"Origins and Tracks"}),"\n",(0,o.jsxs)(n.p,{children:["An ",(0,o.jsx)(n.strong,{children:"Origin"})," is a specific level of privilege that will determine the ",(0,o.jsx)(n.strong,{children:"Track"})," of all referenda\nexecuted with that origin. The track is a pipeline in which the proposal lives and proceeds,\nindependent of other origins' tracks. The proposer of the referenda now selects an appropriate\nOrigin for their request based on the proposal\u2019s requirements."]}),"\n",(0,o.jsx)(n.p,{children:"Although the track structure is the same for all origins, track parameters are not. Such parameters\ninclude:"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Maximum Deciding or Capacity"}),": the limit for the number of referenda that can be decided at\nonce (i.e., the number of tracks within each origin)."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Decision deposit"}),": the amount of funds that must be placed on deposit to enter the Decision\nPeriod (note that more requirements must be met to enter the Decision Period)."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Preparation Period"}),": the minimum amount of voting time needed before entering the Decision\nPeriod (given capacity and deposit are met)."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Decision Period"}),": the time interval during which a proposal's outcome can be decided."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Confirmation Period"}),": the minimum amount of time the approval and support criteria must hold\nbefore the proposal is approved and moved to the enactment period. The confirmation period should\nstart before the end of the decision period."]}),"\n"]}),"\n",(0,o.jsx)(n.admonition,{title:"Example Scenario of an Edge Case",type:"info",children:(0,o.jsx)(n.p,{children:"A referendum may enter the confirmation period just one block before the decision period ends. In\nthis scenario, the referendum will pass if it satisfies approval and support thresholds for the\nminimum confirmation period (track-dependent)."})}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Voting Period"}),": The period in which voting is allowed on a referendum, which includes\npreparation, decision, and confirmation periods."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Minimum Enactment Period"}),": the minimum amount of waiting time before the proposed changes are\napplied"]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Approval Curve"}),": the curve describing the minimum % of ",(0,o.jsx)(n.em,{children:"aye"})," votes as a function of time within\nthe Decision Period. The approval % is the portion of ",(0,o.jsx)(n.em,{children:"aye"})," votes (adjusted for conviction) over\nthe total votes (",(0,o.jsx)(n.em,{children:"aye"}),", ",(0,o.jsx)(n.em,{children:"nay"}),", and ",(0,o.jsx)(n.em,{children:"abstained"}),")."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Support Curve"}),": the curve describing the minimum % of all votes in support of a proposal as a\nfunction of time within the Decision Period. The support % is defined as the portion of all votes\n(",(0,o.jsx)(n.em,{children:"aye"})," and ",(0,o.jsx)(n.em,{children:"abstained"}),") without conviction over the total possible amount of votes in the system\n(i.e., the total active issuance)."]}),"\n"]}),"\n",(0,o.jsxs)(n.p,{children:["For example, a runtime upgrade (requiring a ",(0,o.jsx)(n.code,{children:"set_code"})," call, if approved) does not have the same\nimplications for the ecosystem as the approval of a treasury tip (",(0,o.jsx)(n.code,{children:"reportAwesome"})," call) and\ntherefore, different Origins for these two actions are needed in which different deposits, support,\napproval, and a minimum ",(0,o.jsx)(n.a,{href:"#enactment",children:"enactment"})," periods will be predetermined on the pallet."]}),"\n",(0,o.jsxs)(n.p,{children:["For detailed information about origin and tracks, and parameter values in Kusama, see\n",(0,o.jsx)(n.a,{href:"/docs/learn-polkadot-opengov-origins#origins-and-tracks-info",children:"this page"}),"."]}),"\n",(0,o.jsx)(n.h3,{id:"voluntary-locking-conviction-voting",children:"Voluntary Locking (Conviction Voting)"}),"\n",(0,o.jsx)(n.admonition,{title:"Conviction Voting Locks created during Gov 1",type:"info",children:(0,o.jsxs)(n.p,{children:["Conviction voting locks in Governance v1 will not be carried over to OpenGov. Voting with conviction\nin OpenGov will create a new lock (as this will use the ",(0,o.jsx)(n.code,{children:"convictionVoting"})," pallet), while any\nexisting lock under Governance v1 (using the deprecated ",(0,o.jsx)(n.code,{children:"democracy"})," pallet) will be left to expire.\nDelegations under Governance v1 will need to be re-issued under OpenGov."]})}),"\n",(0,o.jsx)(n.p,{children:"Polkadot utilizes an idea called voluntary locking that allows token holders to increase their\nvoting power by declaring how long they are willing to lock up their tokens; hence, the number of\nvotes for each token holder will be calculated by the following formula:"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{children:"votes = tokens * conviction_multiplier\n"})}),"\n",(0,o.jsx)(n.p,{children:"The conviction multiplier increases the vote multiplier by one every time the number of lock periods\ndouble."}),"\n",(0,o.jsx)(h,{}),"\n",(0,o.jsxs)(n.p,{children:['The maximum number of "doublings" of the\n',(0,o.jsx)(n.a,{href:"/docs/chain-state-values#conviction-voting-lock-period",children:"lock period"})," is set to 6 (and thus\n32 lock periods in total). For additional information regarding the timeline of governance events,\ncheck out the governance section on the\n",(0,o.jsx)(n.a,{href:"maintain-polkadot-parameters/#governance",children:"Polkadot Parameters page"}),"."]}),"\n",(0,o.jsx)(n.p,{children:'Votes are always "counted" at the same time (at the end of the voting period), no matter how long\nthe tokens are locked.'}),"\n",(0,o.jsx)(n.p,{children:"See below an example that shows how voluntary locking works."}),"\n",(0,o.jsxs)(n.p,{children:["Peter: Votes ",(0,o.jsx)(n.code,{children:"No"})," with 10 DOT for a 32-week lock period => 10 x 6 = 60 Votes"]}),"\n",(0,o.jsxs)(n.p,{children:["Logan: Votes ",(0,o.jsx)(n.code,{children:"Yes"})," with 20 DOT for one week lock period => 20 x 1 = 20 Votes"]}),"\n",(0,o.jsxs)(n.p,{children:["Kevin: Votes ",(0,o.jsx)(n.code,{children:"Yes"})," with 15 DOT for a 2-week lock period => 15 x 2 = 30 Votes"]}),"\n",(0,o.jsx)(n.p,{children:"Even though both Logan and Kevin vote with more DOT than Peter, the lock period for both of them is\nless than Peter\u2019s, leading to their voting power counting as less."}),"\n",(0,o.jsx)(n.admonition,{title:"Staked tokens can be used in governance",type:"info",children:(0,o.jsxs)(n.p,{children:["While the tokens are locked, you can still use them for voting and ",(0,o.jsx)(n.a,{href:"/docs/learn-staking",children:"staking"}),".\nYou are only prohibited from transferring these tokens to another account. ",(0,o.jsxs)(n.strong,{children:["See the section about\n",(0,o.jsx)(n.a,{href:"#voting-on-a-referendum",children:"OpenGov locks"}),", and learn more about locks on the\n",(0,o.jsx)(n.a,{href:"/docs/learn-account-balances#locks",children:"Balances page"}),"."]})]})}),"\n",(0,o.jsx)(n.h3,{id:"approval-and-support",children:"Approval and Support"}),"\n",(0,o.jsx)(n.admonition,{title:"Adaptive Quorum Biasing is deprecated",type:"info",children:(0,o.jsxs)(n.p,{children:["In Polkadot OpenGov,\n",(0,o.jsx)(n.a,{href:"/docs/learn/learn-governance#adaptive-quorum-biasing",children:"Adaptive quorum biasing"})," used in Governance\nV1 has been replaced with the ",(0,o.jsx)(n.strong,{children:"Approval and Support system"}),"."]})}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"opengov-curves-pass",src:t(13531).A+"",width:"1920",height:"800"})}),"\n",(0,o.jsx)(n.p,{children:"The figure above provides a summary view of how the approval and support system works during the\nDecision Period."}),"\n",(0,o.jsxs)(n.p,{children:["Once the proposal exits the Lead-in Period and enters the Voting Period, to be approved, it must\nsatisfy the approval and support criteria for the ",(0,o.jsx)(n.strong,{children:"Confirmation Period"}),"."]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Approval"})," is defined as the share of ",(0,o.jsx)(n.a,{href:"#voluntary-locking",children:"conviction"}),"-weighted ",(0,o.jsx)(n.em,{children:"aye"})," votes\nagainst the conviction-weighted total of ",(0,o.jsx)(n.em,{children:"aye"})," and ",(0,o.jsx)(n.em,{children:"nay"})," votes. The code implementation can be\nviewed\n",(0,o.jsx)(n.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/f2fbba3be1d7deaf7cfc731cea00552c212ddfcf/substrate/frame/conviction-voting/src/types.rs#L77",children:"here"})]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Support"})," is the total number of ",(0,o.jsx)(n.em,{children:"aye"})," and ",(0,o.jsx)(n.em,{children:"abstain"})," votes (ignoring any adjustment for\nconviction) compared to the total possible votes (",(0,o.jsx)(n.a,{href:"/docs/learn-DOT#token-issuance",children:"active issuance"}),")\nthat could be made in the system. In case of ",(0,o.jsx)(n.em,{children:"split"})," votes, only ",(0,o.jsx)(n.em,{children:"aye"})," and ",(0,o.jsx)(n.em,{children:"abstain"})," will count."]}),"\n"]}),"\n",(0,o.jsx)(n.p,{children:"For example, let us consider a hypothetical example where the total active issuance is 100 DOT."}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:'An account A votes "Aye" with 10 DOT with 4x conviction'}),"\n",(0,o.jsx)(n.li,{children:'An account B votes "Nay" with 5 DOT with 2x conviction'}),"\n",(0,o.jsx)(n.li,{children:'An account C votes "Abstain" with 20 DOT. (no conviction can be applied to "Abstain" votes)'}),"\n"]}),"\n",(0,o.jsx)(n.p,{children:"In this scenario, only 35 DOT from the total active issuance participated in voting on the\nreferendum. Now, let us calculate the Approval and Support values for that referendum."}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"Approval is calculated as (Aye') / (Aye' + Nay\u2019), where Aye' and Nay' are the votes after applying\nthe conviction multiplier. Hence, Approval = (10 x 4) / (10 x 4 + 5 x 2) = 40/50 which is 80%."}),"\n",(0,o.jsx)(n.li,{children:'Support is calculated as (Aye + Abstain) / (total active issuance), where "Aye" and "Abstain" are\nthe votes without the conviction multiplier. Hence, Support = (10 + 20) / 100 which is 30%.'}),"\n"]}),"\n",(0,o.jsx)(n.admonition,{title:"Nay votes are not counted towards Support",type:"info",children:(0,o.jsxs)(n.p,{children:["Support is a measure of voters who turned out either in favor of the referenda or consciously\nabstained from it. Support does not include ",(0,o.jsx)(n.em,{children:"nay"})," votes. This avoids edge situations where ",(0,o.jsx)(n.em,{children:"nay"}),"\nvotes could push a referendum into a confirming state. For example, imagine current approval is high\n(near 100%, way above the approval curve), and current support is just below the support curve. A\n",(0,o.jsx)(n.em,{children:"nay"})," could bump support above the support curve but not reduce approval below the approval curve.\nTherefore, someone voting against a proposal would make it pass. Hence, a decrease in % of current\napproval through new votes does not directly translate into increasing support because Support needs\nto consider ",(0,o.jsx)(n.em,{children:"nay"})," votes."]})}),"\n",(0,o.jsx)(n.p,{children:"The figure above shows the following:"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"Even if the approval threshold is reached (i.e., % of current approval is greater than the\napproval curve), the proposal only enters the confirmation period once the support threshold is\nalso reached (i.e., % current support is greater than the underlying support curve)."}),"\n",(0,o.jsxs)(n.li,{children:["If the referendum meets the approval and support thresholds for the duration of the confirmation\nperiod, the proposal will be approved and will be scheduled for enactment. Each track has a\ndefault minimum Enactment Period, and the approved referendum needs to wait till the end of it to\nbe executed. Powerful Tracks like ",(0,o.jsx)(n.code,{children:"Root"})," enforce a larger Enactment Period to ensure the network\nhas ample time to prepare for any changes the proposal may bring. The referendum proposers can\nalso set the enactment period higher than its default value."]}),"\n",(0,o.jsxs)(n.li,{children:["A referendum may exit the confirmation period when the thresholds are no longer met due to new\n",(0,o.jsx)(n.em,{children:"Nay"})," votes or a change of existing ",(0,o.jsx)(n.em,{children:"Aye"})," or ",(0,o.jsx)(n.em,{children:"Abstain"})," votes to ",(0,o.jsx)(n.em,{children:"Nay"})," . Each time it exits, the\nconfirmation period clock is reset. For example, suppose the confirmation period is 20 minutes,\nand a referendum enters it just for 5 min before exiting. The next time it enters, it must be\nconfirmed for 20 minutes (not 15 minutes)."]}),"\n",(0,o.jsx)(n.li,{children:"It is possible that a referendum meets the approval and support thresholds almost at the end of\nthe decision period. In this case, even though the decision period elapses, the referendum can\npass if it stays confirming for the duration of the track-specific confirmation period. It is\nrejected immediately if it exits the confirmation period after the decision period elapses."}),"\n",(0,o.jsx)(n.li,{children:"The approval curve starts at 100% and gradually decreases to 50%, but never below 50%. Assuming\nall the active token supply has voted on a proposal, the conviction vote-weighted support should\nalways be above 50% to pass."}),"\n"]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"opengov-curves-pass",src:t(26002).A+"",width:"1920",height:"800"})}),"\n",(0,o.jsx)(n.p,{children:"Note that support may not increase monotonically, as shown in the figure, as people might switch\nvotes."}),"\n",(0,o.jsxs)(n.p,{children:["Different Origins' tracks have different Confirmation Periods and requirements for approval and\nsupport. For additional details on the various origins and tracks, check out\n",(0,o.jsx)(n.a,{href:"/docs/learn-polkadot-opengov-origins#origins-and-tracks-info",children:"this table"}),". With proposals that use\nless privileged origins, it is far more reasonable to drop the required support to a more realistic\namount earlier than those which use highly privileged classes such as ",(0,o.jsx)(n.code,{children:"Root"}),"."]}),"\n",(0,o.jsx)(n.h3,{id:"enactment",children:"Enactment"}),"\n",(0,o.jsx)(n.admonition,{title:"Enactment in Governance v1",type:"info",children:(0,o.jsxs)(n.p,{children:["See ",(0,o.jsx)(n.a,{href:"/docs/learn/learn-governance#enactment",children:"this page"})," for more information about enactment in\nGovernance v1."]})}),"\n",(0,o.jsxs)(n.p,{children:["In Polkadot OpenGov, the proposer suggests the enactment period, but there is also a minimum set for\neach Origin Track. For example, ",(0,o.jsx)(n.code,{children:"root"})," Origin approvals require an extended period because of the\nimportance of the changes they bring to the network."]}),"\n",(0,o.jsx)(n.h3,{id:"cancelling-killing--blacklisting",children:"Cancelling, Killing & Blacklisting"}),"\n",(0,o.jsx)(n.admonition,{title:"Cancelling Referenda in Governance v1",type:"info",children:(0,o.jsxs)(n.p,{children:["See ",(0,o.jsx)(n.a,{href:"/docs/learn/learn-governance#cancelling-proposals",children:"this page"})," for more information about\ncancelling referenda in Governance v1."]})}),"\n",(0,o.jsxs)(n.p,{children:["Polkadot OpenGov has two origins dedicated to rejecting ongoing referenda:\n",(0,o.jsx)(n.a,{href:"/docs/learn-polkadot-opengov-origins#referendum-canceller",children:"Referendum Canceller"})," and\n",(0,o.jsx)(n.a,{href:"/docs/learn-polkadot-opengov-origins#referendum-killer",children:"Referendum Killer"}),"."]}),"\n",(0,o.jsx)(n.p,{children:"Referendum Canceller aims to cancel an already ongoing referendum. When this origin cancels a\nreferendum, the Submission and Decision Deposit are refunded to their originators. An example of\nwhen a referendum might be considered to be canceled is if the originator has made some errors in\ncreating the preimage and did not necessarily do anything malicious. Cancellation has a lower\nDecision Period, and Approval and Support criteria are much easier to meet over time than most other\nOrigins. This is because the cancellation of a referendum usually comes with a sense of urgency."}),"\n",(0,o.jsx)(n.p,{children:"Referendum Killer aims to instantly kill an ongoing referendum, slashing submission and decision\ndeposit (the account(s) that posted these deposits will lose those funds). This origin can be\nengaged if, for example, a malicious actor submits a referendum on the Root Track to set the code of\nthe chains' runtime to stop block production."}),"\n",(0,o.jsx)(n.p,{children:"The Decision Deposit for the Referendum Killer track itself is high to prevent malicious actors from\nattempting to slash deposits of good referenda. A subsequent Referendum Killer can kill an existing\nReferendum Killer."}),"\n",(0,o.jsxs)(n.p,{children:["For more information about how to cancel or kill a referendum, see the\n",(0,o.jsx)(n.a,{href:"./learn-guides-polkadot-opengov#cancel-or-kill-a-referendum",children:"advanced how-to guides"}),"."]}),"\n",(0,o.jsx)(n.admonition,{title:"Blacklisting",type:"info",children:(0,o.jsxs)(n.p,{children:["Blacklisting referenda in Polkadot OpenGov is\n",(0,o.jsx)(n.a,{href:"/docs/learn/learn-governance#blacklisting-proposals",children:"the same as in Governance v1"}),"."]})}),"\n",(0,o.jsx)(n.h2,{id:"voting-on-a-referendum",children:"Voting on a Referendum"}),"\n",(0,o.jsx)(n.p,{children:"If you are a voter, it means that you will vote with your tokens on each single referendum."}),"\n",(0,o.jsxs)(n.p,{children:["In Governance V1, voters could cast only an ",(0,o.jsx)(n.em,{children:"aye"})," or ",(0,o.jsx)(n.em,{children:"nay"})," vote. In Polkadot OpenGov, voters can\nadditionally cast a ",(0,o.jsx)(n.em,{children:"abstain"})," and ",(0,o.jsx)(n.em,{children:"split"})," votes.\n",(0,o.jsx)(n.a,{href:"/docs/learn-guides-polkadot-opengov#voting-on-referenda",children:"Vote splitting"})," allows voters to allocate\ndifferent votes for ",(0,o.jsx)(n.em,{children:"aye"}),", ",(0,o.jsx)(n.em,{children:"nay"}),", and ",(0,o.jsx)(n.em,{children:"abstain"}),". Voting with conviction is not possible when\nabstaining or splitting the votes."]}),"\n",(0,o.jsx)(n.admonition,{title:"Only the last vote counts",type:"info",children:(0,o.jsx)(n.p,{children:"Voting a second time replaces your original vote, e.g. voting with 10 DOT, then a second extrinsic\nto vote with 5 DOT, means that you are voting with 5 DOT, not 10 DOT."})}),"\n",(0,o.jsxs)(n.p,{children:["Note that to successfully cast votes you need to have the\n",(0,o.jsx)(n.a,{href:"/docs/learn-accounts#existential-deposit-and-reaping",children:"existential deposit"})," and some additional funds\nto pay for transaction fees."]}),"\n",(0,o.jsx)(n.p,{children:"In general, you can remove your vote:"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"While a referendum is ongoing (your vote does not count)"}),"\n",(0,o.jsx)(n.li,{children:"After a referendum ended (your vote counts)"}),"\n"]}),"\n",(0,o.jsx)(n.p,{children:"If you voted without conviction, there's no conviction lock in either case. If you voted with\nconviction, you only get a conviction lock if the referendum ended and you voted with the winning\nside."}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"voting-locks-1",src:t(81108).A+"",width:"1626",height:"912"})}),"\n",(0,o.jsx)(n.admonition,{title:"Revoke your delegation on a track if you like to vote on your own",type:"info",children:(0,o.jsxs)(n.p,{children:["If you want to vote on a referendum on a specific track on your own, you will need to revoke any\nexisting ",(0,o.jsx)(n.a,{href:"#multirole-delegation",children:"delegation"})," on that track (i.e. undelegate). You can have a\nconviction lock on the track, but you cannot have an active delegation."]})}),"\n",(0,o.jsx)(n.h3,{id:"voting-without-conviction",children:"Voting Without Conviction"}),"\n",(0,o.jsx)(n.p,{children:"If you vote without conviction, the referendum is ongoing, and you remove the vote, you can unlock\nyour tokens immediately. If the referendum ended, you can remove your vote and unlock your tokens\nimmediately, regardless of whether you are on the winning or losing side of the referendum. The\ngovernance app or interface you used for participating in Polkadot OpenGov should show an option to\nunlock your tokens."}),"\n",(0,o.jsx)(n.h3,{id:"voting-with-conviction",children:"Voting with Conviction"}),"\n",(0,o.jsx)(n.p,{children:"If you voted with conviction, the referendum is ongoing, and you removed the vote, you can unlock\nyour tokens immediately. If the referendum ended and you are on the losing side, you can remove your\nvote and unlock the tokens immediately. However, if you are on the winning side of the referendum,\nyou will get a conviction lock."}),"\n",(0,o.jsx)(n.p,{children:"Conviction locks are calculated from the time the referendum ended but are applied when you remove\nthe vote."}),"\n",(0,o.jsx)(n.p,{children:"For example, if you voted with conviction 1x with 10 DOT, those 10 DOT will be locked for 7 days\nafter the referendum ends (assuming you are on the winning side). If you remove the vote 3 days\nafter the referendum ended, your tokens will be locked for 4 more days. If you remove it on the 8th\nday after the end of the referendum, the tokens can be unlocked right away (after you remove the\nvote). When you remove the vote, the lock expiration block is calculated and added to the chain\nstate."}),"\n",(0,o.jsxs)(n.p,{children:["If you voted on multiple referenda, and you are on the winning side of all those referenda, you will\nget multiple conviction voting locks for all those referenda. ",(0,o.jsx)(n.strong,{children:"Locks do not stack"}),"; the length and\nsize of the lock decides. This means that - assuming you used the same conviction on the same number\nof tokens - when the conviction lock on the latest referendum (see below, Ref 4) expires, you will\nbe able to unlock your tokens. In the meantime, the previous locks (1 to 3) might have expired, and\nyou can remove those locks (after removing the votes)."]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"voting-locks-2",src:t(3567).A+"",width:"1626",height:"914"})}),"\n",(0,o.jsx)(n.p,{children:"When you delegate your votes, the locking mechanism differs slightly. Please check the next section\non Multirole Delegation for more information."}),"\n",(0,o.jsx)(n.h2,{id:"multirole-delegation",children:"Multirole Delegation"}),"\n",(0,o.jsxs)(n.p,{children:["Polkadot OpenGov builds on the\n",(0,o.jsx)(n.a,{href:"/docs/learn/learn-governance#delegations",children:"vote delegation feature from Governance v1"})," where a\nvoter can delegate their voting power to another voter. It does so by introducing a feature known as\n",(0,o.jsx)(n.strong,{children:"multirole delegation"}),", where voters can specify a different delegate for every class of\nreferendum in the system. Delegation can be done per track, and accounts can choose to select\ndifferent delegates (or no delegation) for each track."]}),"\n",(0,o.jsx)(n.p,{children:"For example, a voter could delegate one entity for managing a less potent referenda class, choose a\ndifferent delegate for another class with more powerful consequences and still retain full voting\npower over any remaining classes."}),"\n",(0,o.jsx)(n.p,{children:"Contrary to solo voting, with delegations, any conviction locks are applied as soon as you\nundelegate, regardless of whether your delegated votes were used for voting during that time. If\nyour delegated votes were used in any ongoing referenda, they would be removed from those referenda\nwhen you undelegate. Alternatively, after undelegating, you can delegate to another person or modify\nyour delegation. The only way to modify the delegation is to undelegate and delegate again. You do\nnot have to do this yourself; wallets and extensions should have implemented UI to modify delegation\nwithout you knowing this."}),"\n",(0,o.jsx)(n.p,{children:"If you delegate without conviction and you undelegate, you can unlock your tokens immediately.\nAlternatively, after undelegating, you can always delegate to another person or modify your\ndelegation."}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"delegation-locks-1",src:t(46475).A+"",width:"1627",height:"913"})}),"\n",(0,o.jsx)(n.p,{children:"In the case you delegated with 1x conviction, you undelegate and re-delegate with 2x conviction; the\ntime you undelegate again, you will have created two conviction locks: one for the 1x and one for\nthe 2x conviction. If you re-delegate immediately with 1x conviction and undelegate, you will get a\nsecond 1x conviction lock, but the 2x conviction lock will be the one deciding when your token can\nbe unlocked."}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"delegation-locks-2",src:t(32656).A+"",width:"1630",height:"912"})}),"\n",(0,o.jsxs)(n.admonition,{type:"info",children:[(0,o.jsx)(n.p,{children:"If the account delegated votes to different delegates using different convictions, then after\nundelegating those delegates, there will be different unlocking periods with lengths dependent on\nthe conviction multipliers."}),(0,o.jsx)(n.p,{children:(0,o.jsxs)(n.strong,{children:["Before delegating a specific track, you must remove any ",(0,o.jsx)(n.a,{href:"#voting-on-a-referendum",children:"vote"})," on that\ntrack."]})})]}),"\n",(0,o.jsx)(n.p,{children:"It is worth noting that a user delegating their voting power does not imply that the delegate will\nhave control over the funds of the delegating user's account. That delegate's account can vote with\na user's voting power but won't be able to transfer balances, nominate a different set of\nvalidators, or execute any call other than voting on the tracks defined by the user."}),"\n",(0,o.jsx)(n.p,{children:"The goal of delegations is to ensure the required support for proposals to be enacted is reached\nwhile keeping the overall design censorship-free. Also, voters might not have the technical\nknowledge to judge some referenda or might not have the time to read all referenda. Delegations\nallow voters to participate in OpenGov hands-free by delegating their voting power to trusted\nentities."}),"\n",(0,o.jsx)(n.h2,{id:"resources",children:"Resources"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/substrate/frame/democracy/src",children:"Democracy Pallet"})}),"\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"https://medium.com/polkadot-network/gov2-polkadots-next-generation-of-decentralised-governance-4d9ef657d11b",children:"Governance v2"})}),"\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"https://matrix.to/#/#Polkadot-Direction:parity.io",children:"Polkadot Direction"})}),"\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"https://matrix.to/#/#Kusama-Direction:parity.io",children:"Kusama Direction"})}),"\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"https://polkadot.polkassembly.io/",children:"PolkAssembly"})}),"\n"]}),"\n",(0,o.jsx)(n.hr,{}),"\n",(0,o.jsx)(n.admonition,{title:"Polkadot-JS Guides",type:"info",children:(0,o.jsxs)(n.p,{children:["If you are an advanced user, see the\n",(0,o.jsx)(n.a,{href:"/docs/learn-guides-polkadot-opengov",children:"Polkadot-JS guides about OpenGov"}),"."]})})]})}function j(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(x,{...e})}):x(e)}},67141:(e,n,t)=>{"use strict";t.d(n,{A:()=>r});var o=t(96540),i=t(74848);const r=function(e){var n,t=e.message,r=(0,o.useState)(!0),a=r[0],s=r[1];return(0,i.jsx)(i.Fragment,{children:a&&(0,i.jsxs)("div",{className:"message-box",children:[(0,i.jsx)("button",{className:"close-button",onClick:function(){s(!1)},children:"\u2716 "}),(0,i.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(n=t,n.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},47379:(e,n,t)=>{"use strict";t.d(n,{A:()=>p});var o=t(90675),i=t(10467),r=t(96540),a=t(19588),s=t(2026),l=t(11135);function d(e,n,t){return c.apply(this,arguments)}function c(){return(c=(0,i.A)((0,o.A)().mark((function e(n,t,i){var r,l,d,c,h;return(0,o.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=void 0,l=void 0,e.t0=n,e.next="polkadot"===e.t0?5:"kusama"===e.t0?7:"statemine"===e.t0?9:"statemint"===e.t0?11:"polkadotpeople"===e.t0?13:"kusamapeople"===e.t0?15:17;break;case 5:return r="wss://rpc.polkadot.io",e.abrupt("break",18);case 7:return r="wss://kusama-rpc.polkadot.io/",e.abrupt("break",18);case 9:return r="wss://statemine-rpc.polkadot.io/",e.abrupt("break",18);case 11:return r="wss://statemint-rpc.polkadot.io/",e.abrupt("break",18);case 13:return r="wss://polkadot-people-rpc.polkadot.io/",e.abrupt("break",18);case 15:return r="wss://kusama-people-rpc.polkadot.io/",e.abrupt("break",18);case 17:console.log("Unknown socket url provided, no connection made.");case 18:if(void 0!==r){e.next=22;break}return e.abrupt("return");case 22:return d=new a.E(r),e.next=25,s.G.create({provider:d});case 25:c=e.sent,(h=t.split(".")).forEach((function(e){e in c&&(c=c[e])})),e.t1=h[0],e.next="consts"===e.t1?31:"query"===e.t1?33:38;break;case 31:return l=c.toString(),e.abrupt("break",39);case 33:return e.next=35,c();case 35:return l=(l=e.sent).toString(),e.abrupt("break",39);case 38:console.log("Unknown path prefix ("+h[0]+") in "+t);case 39:return e.abrupt("return",l);case 40:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function h(e,n,t,o){switch(n){case"humanReadable":(0,l.HumanReadable)(e,t,o);break;case"precise":(0,l.Precise)(e,t,o);break;case"blocksToDays":(0,l.BlocksToDays)(e,o);break;case"erasToDays":(0,l.ErasToDays)(e,o,t);break;case"percentage":(0,l.Percentage)(e,o);break;case"permillToPercent":(0,l.PermillToPercent)(e,o);break;case"arrayLength":(0,l.ArrayLength)(e,o);break;default:return void console.log("Ignoring unknown filter type")}}const p=function(e){var n=e.network,t=e.path,a=e.defaultValue,s=e.filter,l=void 0===s?void 0:s,c=(0,r.useState)(""),p=c[0],u=c[1];return n=n.toLowerCase(),(0,r.useEffect)((function(){void 0!==l?h(a.toString(),l,n,u):u(a.toString());var e=void 0;switch(n){case"polkadot":e="wss://rpc.polkadot.io";break;case"kusama":e="wss://kusama-rpc.polkadot.io/";break;case"statemine":e="wss://kusama-asset-hub-rpc.polkadot.io/";break;case"statemint":e="wss://polkadot-asset-hub-rpc.polkadot.io/";break;case"kusamapeople":e="wss://kusama-people-rpc.polkadot.io";break;case"polkadotpeople":e="wss://polkadot-people-rpc.polkadot.io";break;default:console.log("Unknown network provided, "+n)}if(void 0===e)console.log("Failed to connect to a valid websocket, applying default");else{var r=function(){var e=(0,i.A)((0,o.A)().mark((function e(){var i;return(0,o.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,d(n,t,u);case 2:if(void 0!==(i=e.sent)){e.next=7;break}return e.abrupt("return");case 7:void 0!==l?h(i,l,n,u):u(i);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();try{r()}catch(s){console.log(s)}}}),[]),p}},11135:e=>{var n="polkadot",t="kusama",o="statemine",i="statemint",r="polkadotpeople",a="kusamapeople",s={polkadot:{precision:1e10,symbol:"DOT"},kusama:{precision:1e12,symbol:"KSM"},statemint:{precision:1e10,symbol:"DOT"},statemine:{precision:1e12,symbol:"KSM"},polkadotpeople:{precision:1e10,symbol:"DOT"},kusamapeople:{precision:1e12,symbol:"KSM"}};e.exports={HumanReadable:function(e,l,d){var c=void 0;if(l===n||l===i)c=3;else if(l===t||l===o||l===r)c=6;else{if(l!=a)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");c=8}e=parseFloat(e),d((e=Number.isInteger(e/s[l].precision)?e/s[l].precision+" "+s[l].symbol:(e/s[l].precision).toFixed(c)+" "+s[l].symbol).toString())},Precise:function(e,n,t){t(e=(e=parseFloat(e))/s[n].precision+" "+s[n].symbol)},BlocksToDays:function(e,n){n((e=6*e/86400).toString())},ErasToDays:function(e,s,l){var d=void 0;if(l===n||l===i||l==r)d=1;else{if(l!==t&&l!==o&&l!=a)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");d=4}s((e/=d).toString())},Percentage:function(e,n){n((e/=1e7).toString())},PermillToPercent:function(e,n){n((e/=1e4).toString())},ArrayLength:function(e,n){n((e=e.split(",").length).toString())}}},46475:(e,n,t)=>{"use strict";t.d(n,{A:()=>o});const o=t.p+"assets/images/delegation-locks-1-c203e10abb20e87ec907c910c0221a8f.png"},32656:(e,n,t)=>{"use strict";t.d(n,{A:()=>o});const o=t.p+"assets/images/delegation-locks-2-db32ffe7daa316d3b96a6311cccdea85.png"},26002:(e,n,t)=>{"use strict";t.d(n,{A:()=>o});const o=t.p+"assets/images/opengov-curves-nopass-27f6968907aeb88e87069d29ca062568.png"},13531:(e,n,t)=>{"use strict";t.d(n,{A:()=>o});const o=t.p+"assets/images/opengov-curves-pass-73b6c7d1849e26082880cd7d629a633e.png"},39040:(e,n,t)=>{"use strict";t.d(n,{A:()=>o});const o=t.p+"assets/images/opengov-overview-a56ef29a3a173f9dc2b60a9008dcfc1b.png"},17160:(e,n,t)=>{"use strict";t.d(n,{A:()=>o});const o=t.p+"assets/images/opengov-timeline-26e5a1fae159676ab5052a4fd7416be5.png"},61019:(e,n,t)=>{"use strict";t.d(n,{A:()=>o});const o=t.p+"assets/images/opengov-track-capacity-a1e00e5bd7961ea13d38f79cf6fa4b9c.png"},81108:(e,n,t)=>{"use strict";t.d(n,{A:()=>o});const o=t.p+"assets/images/voting-locks-1-23e3e07cb23d8a6b30e50be110a5119b.png"},3567:(e,n,t)=>{"use strict";t.d(n,{A:()=>o});const o=t.p+"assets/images/voting-locks-2-d8eaa8ef9a38f7460042b27fadd0d166.png"},47790:()=>{}}]); \ No newline at end of file diff --git a/assets/js/2f3b630e.07f005f6.js b/assets/js/2f3b630e.07f005f6.js new file mode 100644 index 000000000000..314de2adb8a2 --- /dev/null +++ b/assets/js/2f3b630e.07f005f6.js @@ -0,0 +1 @@ +(self.webpackChunk=self.webpackChunk||[]).push([[2584],{59327:(e,n,t)=>{"use strict";t.r(n),t.d(n,{assets:()=>f,contentTitle:()=>g,default:()=>j,frontMatter:()=>m,metadata:()=>o,toc:()=>v});const o=JSON.parse('{"id":"learn/learn-polkadot-opengov","title":"Introduction to Polkadot OpenGov","description":"Polkadot\u2019s Latest Model for Decentralized Governance.","source":"@site/../docs/learn/learn-polkadot-opengov.md","sourceDirName":"learn","slug":"/learn-polkadot-opengov","permalink":"/docs/learn-polkadot-opengov","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-polkadot-opengov.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1726760224000,"frontMatter":{"id":"learn-polkadot-opengov","title":"Introduction to Polkadot OpenGov","sidebar_label":"Polkadot OpenGov","description":"Polkadot\u2019s Latest Model for Decentralized Governance.","keywords":["governance","referenda","proposal","voting","endorse"],"slug":"../learn-polkadot-opengov"},"sidebar":"docs","previous":{"title":"Polkadot OpenGov","permalink":"/docs/learn-polkadot-opengov-index"},"next":{"title":"OpenGov Origins","permalink":"/docs/learn-polkadot-opengov-origins"}}');var i=t(74848),r=t(28453),a=(t(47379),t(96540)),s=(0,i.jsx)("table",{children:(0,i.jsxs)("tbody",{children:[(0,i.jsxs)("tr",{children:[(0,i.jsx)("th",{children:"Lock Periods"}),(0,i.jsx)("th",{children:"Vote Multiplier"}),(0,i.jsx)("th",{children:"Length in Days"})]}),(0,i.jsxs)("tr",{children:[(0,i.jsx)("td",{children:"0"}),(0,i.jsx)("td",{children:"0.1"}),(0,i.jsx)("td",{id:"p0"})]}),(0,i.jsxs)("tr",{children:[(0,i.jsx)("td",{children:"1"}),(0,i.jsx)("td",{children:"1"}),(0,i.jsx)("td",{id:"p1"})]}),(0,i.jsxs)("tr",{children:[(0,i.jsx)("td",{children:"2"}),(0,i.jsx)("td",{children:"2"}),(0,i.jsx)("td",{id:"p2"})]}),(0,i.jsxs)("tr",{children:[(0,i.jsx)("td",{children:"4"}),(0,i.jsx)("td",{children:"3"}),(0,i.jsx)("td",{id:"p4"})]}),(0,i.jsxs)("tr",{children:[(0,i.jsx)("td",{children:"8"}),(0,i.jsx)("td",{children:"4"}),(0,i.jsx)("td",{id:"p8"})]}),(0,i.jsxs)("tr",{children:[(0,i.jsx)("td",{children:"16"}),(0,i.jsx)("td",{children:"5"}),(0,i.jsx)("td",{id:"p16"})]}),(0,i.jsxs)("tr",{children:[(0,i.jsx)("td",{children:"32"}),(0,i.jsx)("td",{children:"6"}),(0,i.jsx)("td",{id:"p32"})]})]})}),l=["p0","p1","p2","p4","p8","p16","p32"],d={p0:0,p1:7,p2:14,p4:28,p8:56,p16:112,p32:224},c={p0:0,p1:7,p2:14,p4:28,p8:56,p16:112,p32:224};function h(e){l.forEach((function(n){var t=document.getElementById(n);"polkadot"===e?t.innerText=d[n]:"kusama"===e&&(t.innerText=c[n])}))}const p=function(){var e=(0,a.useState)("");return e[0],e[1],(0,a.useEffect)((function(){var e=document.title;"Governance V1 \xb7 Polkadot Wiki"===e||"Introduction to Polkadot OpenGov \xb7 Polkadot Wiki"===e?h("polkadot"):"Governance V1 \xb7 Guide"===e||"Introduction to Polkadot OpenGov \xb7 Guide"===e?h("kusama"):console.log("Unknown wiki/guide type")}),[]),s};var u=t(67141);const m={id:"learn-polkadot-opengov",title:"Introduction to Polkadot OpenGov",sidebar_label:"Polkadot OpenGov",description:"Polkadot\u2019s Latest Model for Decentralized Governance.",keywords:["governance","referenda","proposal","voting","endorse"],slug:"../learn-polkadot-opengov"},g=void 0,f={},v=[{value:"Premise",id:"premise",level:2},{value:"Summary",id:"summary",level:2},{value:"Gov1 vs. Polkadot OpenGov",id:"gov1-vs-polkadot-opengov",level:2},{value:"Referenda",id:"referenda",level:2},{value:"Referenda Timeline",id:"referenda-timeline",level:3},{value:"Origins and Tracks",id:"origins-and-tracks",level:3},{value:"Voluntary Locking (Conviction Voting)",id:"voluntary-locking-conviction-voting",level:3},{value:"Approval and Support",id:"approval-and-support",level:3},{value:"Enactment",id:"enactment",level:3},{value:"Cancelling, Killing & Blacklisting",id:"cancelling-killing--blacklisting",level:3},{value:"Voting on a Referendum",id:"voting-on-a-referendum",level:2},{value:"Voting Without Conviction",id:"voting-without-conviction",level:3},{value:"Voting with Conviction",id:"voting-with-conviction",level:3},{value:"Multirole Delegation",id:"multirole-delegation",level:2},{value:"Resources",id:"resources",level:2}];function x(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",hr:"hr",img:"img",li:"li",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,r.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(u.A,{message:"Before voting or delegating in Polkadot OpenGov, get familiar with [balances and locks](./learn-account-balances#locks)."}),"\n",(0,i.jsxs)(n.admonition,{title:"The content in this document is subject to change",type:"caution",children:[(0,i.jsxs)(n.p,{children:["The governance protocol has already undergone iterations (see\n",(0,i.jsx)(n.a,{href:"/docs/learn/learn-governance",children:"Governance V1"}),"). Governance is a constantly evolving protocol at\nthis stage in its lifecycle."]}),(0,i.jsxs)(n.p,{children:["For additional support about Polkadot OpenGov, see the\n",(0,i.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/65000105211",children:"dedicated support pages"}),"."]})]}),"\n",(0,i.jsx)(n.p,{children:"Polkadot uses a sophisticated governance mechanism that allows it to evolve gracefully overtime at\nthe ultimate behest of its assembled stakeholders. The goal is to ensure that most of the stake can\nalways command the network."}),"\n",(0,i.jsxs)(n.p,{children:["Polkadot brings together various novel mechanisms, including an amorphous (abstract) form of\nstate-transition function stored on-chain defined in a platform-agnostic language (i.e.\n",(0,i.jsx)(n.a,{href:"/docs/learn-wasm",children:"WebAssembly"}),"), and several on-chain voting mechanisms such as referenda and batch\napproval voting. All changes to the protocol must be agreed upon by stake-weighted referenda."]}),"\n",(0,i.jsx)(n.h2,{id:"premise",children:"Premise"}),"\n",(0,i.jsxs)(n.p,{children:["Polkadot's first governance system (",(0,i.jsx)(n.a,{href:"/docs/learn/learn-governance",children:"Governance V1"}),") included three\nmain components."]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["The ",(0,i.jsx)(n.a,{href:"/docs/learn/learn-governance#technical-committee",children:"Technical Committee"}),": A technocratic\ncommittee to manage upgrade timelines."]}),"\n",(0,i.jsxs)(n.li,{children:["The ",(0,i.jsx)(n.a,{href:"/docs/learn/learn-governance#council",children:"Council"}),': An approval-voted, elected executive\n"government" to manage parameters, admin, and spending proposals.']}),"\n",(0,i.jsx)(n.li,{children:"The Public: All token holders."}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["Over the first few years of operation, Governance V1 ensured the appropriate usage of treasury funds\nand enabled timely upgrades and fixes. Like most early technologies, protocols must evolve as they\nmature to improve their shortcomings and keep up with modern advancements. In Governance V1, all\nreferenda carried the same weight as only one referendum could be voted on at a time (except for\nemergency proposals), and the voting period could last multiple weeks. Also, an\n",(0,i.jsx)(n.a,{href:"/docs/learn/learn-governance#alternating-voting-timetable",children:"alternating voting timetable"})," allowed\nto vote either for a public referendum or a council motion every 28 days (7 days on Kusama). This\nresulted in the system favoring careful consideration of very few proposals instead of broad\nconsideration of many."]}),"\n",(0,i.jsx)(n.p,{children:"Polkadot OpenGov changes how the practical means of day-to-day decisions are made, making the\nrepercussions of referenda better scoped and agile to increase the number of collective decisions\nthe system can make at any given time."}),"\n",(0,i.jsxs)(n.p,{children:["The following content is focused on Polkadot OpenGov, and on the main differences with previous\ngovernance versions. We recommend learning about ",(0,i.jsx)(n.a,{href:"/docs/learn/learn-governance",children:"Governance v1"})," to\nbetter understand the need for and the direction of Polkadot OpenGov."]}),"\n",(0,i.jsx)(n.h2,{id:"summary",children:"Summary"}),"\n",(0,i.jsx)(n.p,{children:"In Governance v1, active token holders (public) and the Council administrated the network's upgrade\ndecisions. Whether the public or the council initiated the proposal, it would eventually have to go\nthrough a referendum to let all holders (weighted by stake and conviction) make the decision."}),"\n",(0,i.jsx)(n.p,{children:"The Council fulfilled its role as the representative of the public, guardian of the treasury and\ninitiator of legislation, but it was often seen as a centralized entity. To further decentralize the\nnetwork, Polkadot OpenGov proposes the following main changes:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Migrating all responsibilities of the Council to the public via a direct democracy voting system."}),"\n",(0,i.jsxs)(n.li,{children:["Dissolving the current ",(0,i.jsx)(n.a,{href:"/docs/learn/learn-governance#council",children:"Council"})," collective"]}),"\n",(0,i.jsx)(n.li,{children:"Allowing users to delegate voting power in more ways to community members"}),"\n",(0,i.jsxs)(n.li,{children:["Dissolving the ",(0,i.jsx)(n.a,{href:"/docs/learn/learn-governance#technical-committee",children:"Technical Committee"})," and\nestablishing the broader ",(0,i.jsx)(n.a,{href:"/docs/learn-polkadot-technical-fellowship",children:"Polkadot Technical Fellowship"})]}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"The figure below shows an overview of Polkadot OpenGov's structure."}),"\n",(0,i.jsx)(n.admonition,{type:"info",children:(0,i.jsxs)(n.p,{children:["See ",(0,i.jsx)(n.a,{href:"/docs/learn/learn-governance#summary",children:"this page"})," for a comparison with the structure of\nGovernance V1."]})}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"opengov-overview",src:t(39040).A+"",width:"1920",height:"800"})}),"\n",(0,i.jsxs)(n.p,{children:["In Polkadot OpenGov, all the proposals are initiated by the public. The proposal will enter a\nLead-in period (for more information, see ",(0,i.jsx)(n.a,{href:"#referenda-timeline",children:"Referenda Timeline"}),"), after which it\nwill follow a specific ",(0,i.jsx)(n.a,{href:"#origins-and-tracks",children:"Track"})," which has a dedicated Origin. There are\n",(0,i.jsx)(n.a,{href:"/docs/learn-polkadot-opengov-origins#origins-and-tracks-info",children:"15 Origins"}),", each with a different\ntrack. The origins and tracks parameters are preset values that set the duration of a referendum as\nwell as how many referenda can be voted on simultaneously. For example, a treasury proposal can now\nbe submitted in different tracks depending on the amount requested. A proposal for a small tip will\nneed to be submitted to the Small Tipper track, while a proposal requiring substantial funds will\nneed to be submitted to the Medium or Big Spender track."]}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.a,{href:"/docs/learn-polkadot-technical-fellowship",children:"Polkadot Technical Fellowship"})," can decide to\n",(0,i.jsx)(n.a,{href:"#whitelisting",children:"whitelist"})," a proposal that will be enacted through the Whitelist Caller origin.\nThose proposals will have a shorter Lead-in, Confirmation, and Enactment period when compared to the\nRoot Origin track."]}),"\n",(0,i.jsxs)(n.p,{children:["Each track has its own preset ",(0,i.jsx)(n.a,{href:"#approval-and-support",children:"Approval and Support"})," curves based on the\norigin's privileges. When both the approval and support criteria are satisfied for a specific period\n(called the confirmation period), the referendum passes and will be executed after the enactment\nperiod."]}),"\n",(0,i.jsx)(n.p,{children:"All referenda within each track and across tracks can be voted on simultaneously (assuming the\ntrack's maximum capacity is not reached)."}),"\n",(0,i.jsx)(n.p,{children:"Polkadot OpenGov also comes with multi-role delegations where the token holder can assign voting\npower on different tracks to different entities who are experts in judging the referenda submitted\nto those tracks. For example, suppose a token holder does not have the technical background to\nconsider the merits and vote on the referenda submitted to the Root track. In that case, they can\ndelegate their voting power just for the Root track to a trusted expert who (according to them) acts\nin the best interest of the network protocol. In this way, token holders do not need to be\nup-to-date with governance matters and can still make their votes count through delegates."}),"\n",(0,i.jsx)(n.h2,{id:"gov1-vs-polkadot-opengov",children:"Gov1 vs. Polkadot OpenGov"}),"\n",(0,i.jsxs)(n.table,{children:[(0,i.jsx)(n.thead,{children:(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.th,{children:"Governance V1"}),(0,i.jsx)(n.th,{children:"Polkadot OpenGov"}),(0,i.jsx)(n.th,{children:"Polkadot OpenGov Benefit"})]})}),(0,i.jsxs)(n.tbody,{children:[(0,i.jsxs)(n.tr,{children:[(0,i.jsxs)(n.td,{children:["Includes the ",(0,i.jsx)(n.a,{href:"/docs/learn/learn-governance#council",children:"Council"}),", the ",(0,i.jsx)(n.a,{href:"/docs/learn/learn-governance#technical-committee",children:"Technical Committee"}),", and the Public (i.e. token holders)."]}),(0,i.jsxs)(n.td,{children:["Includes the Public and the ",(0,i.jsx)(n.a,{href:"/docs/learn-polkadot-technical-fellowship",children:"Technical Fellowship"}),"."]}),(0,i.jsx)(n.td,{children:"Simpler and more decentralized structure."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"Referenda executed only from one origin (Root). Referenda in this origin must be carefully scrutinized. Therefore, there is only one track (i.e., only one referendum at a time can be executed)."}),(0,i.jsxs)(n.td,{children:["Referenda executed from ",(0,i.jsx)(n.a,{href:"/docs/learn-polkadot-opengov-origins#origins-and-tracks-info",children:"multiple origins"}),", each with a different track that shapes proposals\u2019 timelines. Depending on the origin, multiple referenda within the same track are possible."]}),(0,i.jsx)(n.td,{children:"Possibility to categorize proposals (based on importance and urgency) and execute them simultaneously within and between origin tracks."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"Proposals can be submitted by either the Council or the Public."}),(0,i.jsx)(n.td,{children:"The public submits proposals."}),(0,i.jsx)(n.td,{children:"More democratic."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsxs)(n.td,{children:["Uses ",(0,i.jsx)(n.a,{href:"/docs/learn/learn-governance#adaptive-quorum-biasing",children:"Adaptive Quorum Biasing"})," to define the approval threshold based on turnout. Given the same turnout, council-initiated referenda require fewer Aye votes to pass compared to public referenda."]}),(0,i.jsx)(n.td,{children:"Uses origin-specific approval and support curves defining the amount of approval and support (i.e. turnout) needed as a function of time. The same curves are applied to all referenda within the same origin track."}),(0,i.jsx)(n.td,{children:"Referenda timeline depends on the origin and not on who submitted the proposal (i.e. Council or Public). This is a more democratic and equalitarian system."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsxs)(n.td,{children:["Uses ",(0,i.jsx)(n.a,{href:"/docs/learn/learn-governance#alternating-voting-timetable",children:"alternating voting timetable"})," allowing voters to cast votes for either council or public referenda every 28 eras."]}),(0,i.jsx)(n.td,{children:"Multiple referenda can be voted at the same time."}),(0,i.jsx)(n.td,{children:"More flexible and agile governance system."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"Except for emergency proposals, all referenda have fixed voting and enactment periods of 28 eras."}),(0,i.jsx)(n.td,{children:"Periods' length is customizable and has pre-defined limits for each origin. The same limits apply to all tracks with the same origin. For example, the track in the origin Root will be longer than the track within the Small Tipper origin."}),(0,i.jsx)(n.td,{children:"Referenda\u2019s timeline is tailored to their importance and urgency. Flexible enactment period based on origin."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"Emergency proposals turned referenda can be simultaneously voted on and executed with other referenda and have shorter enactment periods. They must be proposed by the Technical Committee and approved by the Council."}),(0,i.jsx)(n.td,{children:"No emergency proposals. The Technical Fellowship can whitelist proposals that will have their origin with shorter lead-in, confirmation, and enactment periods."}),(0,i.jsx)(n.td,{children:"The Technical Fellowship is a more decentralized entity than the Technical Committee. Whitelisting a proposal requires a majority of approval from the fellowship."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsxs)(n.td,{children:["Only the ",(0,i.jsx)(n.a,{href:"/docs/learn/learn-governance#endorsing-proposals",children:"most-endorsed proposal"})," is able to transit from Launch to Voting period. The time for the transition is indeterminate, and (with no possibility of canceling endorsements) proposers and endorsers might wait a long time before a referendum is tabled, and getting their deposits back."]}),(0,i.jsx)(n.td,{children:"All proposals will eventually be voted on (given track capacity and deposit are met and the Lead-in period has ended)."}),(0,i.jsx)(n.td,{children:"It allows all proposals to get a chance to be voted on in a timely, predictive manner."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsxs)(n.td,{children:["Only ",(0,i.jsx)(n.em,{children:"aye"})," or ",(0,i.jsx)(n.em,{children:"nay"})," votes possible."]}),(0,i.jsx)(n.td,{children:"Voters can have the additional voting options of abstaining or splitting votes."}),(0,i.jsx)(n.td,{children:"More ways to engage in voting and increase turnout."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"Voters can decide to delegate votes to another account."}),(0,i.jsxs)(n.td,{children:["Voters can use ",(0,i.jsx)(n.a,{href:"#multirole-delegation",children:"multirole delegations"})," and delegate votes to different accounts depending on origins."]}),(0,i.jsx)(n.td,{children:"More agile delegations tailored by expertise."})]})]})]}),"\n",(0,i.jsx)(n.h2,{id:"referenda",children:"Referenda"}),"\n",(0,i.jsxs)(n.admonition,{title:"Public and Council Referenda in Governance v1",type:"info",children:[(0,i.jsxs)(n.p,{children:["With the Council's dissolution, ",(0,i.jsx)(n.a,{href:"/docs/learn/learn-governance#council-referenda",children:"council referenda"}),"\nare no longer present in Polkadot OpenGov."]}),(0,i.jsxs)(n.p,{children:["See ",(0,i.jsx)(n.a,{href:"/docs/learn/learn-governance#public-referenda",children:"this page"})," for more information about public\nreferenda in Governance v1."]})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"In Polkadot OpenGov all referenda are public."})," Anyone can start a referendum at any time and do\nso as often as they wish. Previous features were expanded and improved, most notably\n",(0,i.jsx)(n.a,{href:"#origins-and-tracks",children:(0,i.jsx)(n.strong,{children:"Origins and Tracks"})})," help facilitate the flow and processing of the\nsubmitted referenda. The ",(0,i.jsx)(n.a,{href:"/docs/learn-polkadot-technical-fellowship",children:"Technical Fellowship"})," has the\noption to ",(0,i.jsx)(n.a,{href:"#whitelisting",children:"whitelist"})," referenda that can be then proposed in the track with\n",(0,i.jsx)(n.a,{href:"/docs/learn-polkadot-opengov-origins#whitelisted-caller",children:"whitelist origin"}),"."]}),"\n",(0,i.jsx)(n.h3,{id:"referenda-timeline",children:"Referenda Timeline"}),"\n",(0,i.jsx)(n.admonition,{title:"Voting timetable in Governance v1",type:"info",children:(0,i.jsxs)(n.p,{children:["See ",(0,i.jsx)(n.a,{href:"/docs/learn/learn-governance#referenda-timeline",children:"this page"})," for more information about the\nvoting timetable in Governance v1."]})}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"opengov-timeline",src:t(17160).A+"",width:"1920",height:"800"})}),"\n",(0,i.jsx)(n.p,{children:"The figure above provides a summary view of the referenda timeline for Polkadot OpenGov."}),"\n",(0,i.jsxs)(n.p,{children:["In (1), when a referendum is initially created, the community can immediately vote on it. However,\nit is not immediately in a state where it can end or otherwise have its votes counted, approved, and\nultimately enacted. Instead, the proposal will stay within a ",(0,i.jsx)(n.strong,{children:"Lead-in Period"})," until it fulfills\nthree criteria:"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:'Proposals must stay within the lead-in period for a pre-defined minimum amount of time. This helps\nmitigate against the possibility of "decision sniping" where an attacker controlling a substantial\namount of voting power might seek to have a proposal passed immediately after proposing, not\nallowing the overall voting population adequate time to consider and participate.'}),"\n",(0,i.jsx)(n.li,{children:"There must be enough room for the decision within the origin. Different origins have their limit\non the number of proposals that can be decided simultaneously. Tracks that have more potent\nabilities will have lower limits. For example, the Root level Origin has a limit of one, implying\nthat only a single proposal may be decided on at once."}),"\n",(0,i.jsxs)(n.li,{children:["A decision deposit must be submitted. Creating a referendum is cheap as the deposit value consists\nof only the value required for the on-chain storage needed to track it. But, having a referendum\nreviewed and decided upon carries the risk of using up the limited spots available in the\nreferenda queue. Having a more significant but refundable deposit requirement makes sense to help\nmitigate spam. Failing to submit the decision deposit will lead to a referendum ",(0,i.jsx)(n.em,{children:"timeout"}),"."]}),"\n"]}),"\n",(0,i.jsx)(n.admonition,{title:"Decision Deposit Amounts",type:"info",children:(0,i.jsx)(n.p,{children:"In Polkadot OpenGov, someone must submit the Decision Deposit for a referendum to enter its Decision\nPeriod. The number of tokens required for the Decision Deposit depends on the track\u2019s privilege\nlevel. The higher the privilege, the higher the deposit. For example, malicious referenda posted on\nthe Small Tipper track inflict low economic damage to the network. In contrast, malicious referenda\non the Root track can inflict more significant harm, such as changing the entire network's runtime."})}),"\n",(0,i.jsxs)(n.p,{children:["Until they are in the lead-in period, proposals remain undecided. Once the criteria above are met,\nthe referendum moves to the ",(0,i.jsx)(n.em,{children:"deciding"})," state. The votes of the referendum are now counted towards\nthe outcome."]}),"\n",(0,i.jsxs)(n.p,{children:["In (2), the proposal enters the ",(0,i.jsx)(n.strong,{children:"Decision Period"}),", where voting can continue. For a proposal to be\napproved, votes must satisfy the approval and support criteria for at least the ",(0,i.jsx)(n.strong,{children:"Confirmation\nPeriod"}),"; otherwise, the proposal is automatically rejected. A rejected proposal can be resubmitted\nanytime and as many times as needed."]}),"\n",(0,i.jsxs)(n.p,{children:["In (3), approved proposals will enter the ",(0,i.jsx)(n.strong,{children:"Enactment Period"}),", after which proposed changes will be\nexecuted."]}),"\n",(0,i.jsx)(n.p,{children:"Note how the length of the lead-in, decision, confirmation, and enactment periods vary depending on\nthe track. Root origin track has more extended periods than the other tracks. Also, the number of\nreferenda within each track differs, with the Root origin track only accepting one proposal at a\ntime (see below)."}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"opengov-track-capacity",src:t(61019).A+"",width:"1920",height:"800"})}),"\n",(0,i.jsx)(n.p,{children:"This directly affects the number of proposals that can be voted on and executed simultaneously.\nContinuing the comparison between Root and Small Tipper, Small Tipper will allow many proposals on\nits track to be executed simultaneously. In contrast, Root will allow only one proposal to be on its\ntrack. Once the track capacity is filled, additional proposals in the lead-in period will queue\nuntil place is available to enter the decision period."}),"\n",(0,i.jsx)(n.h3,{id:"origins-and-tracks",children:"Origins and Tracks"}),"\n",(0,i.jsxs)(n.p,{children:["An ",(0,i.jsx)(n.strong,{children:"Origin"})," is a specific level of privilege that will determine the ",(0,i.jsx)(n.strong,{children:"Track"})," of all referenda\nexecuted with that origin. The track is a pipeline in which the proposal lives and proceeds,\nindependent of other origins' tracks. The proposer of the referenda now selects an appropriate\nOrigin for their request based on the proposal\u2019s requirements."]}),"\n",(0,i.jsx)(n.p,{children:"Although the track structure is the same for all origins, track parameters are not. Such parameters\ninclude:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Maximum Deciding or Capacity"}),": the limit for the number of referenda that can be decided at\nonce (i.e., the number of tracks within each origin)."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Decision deposit"}),": the amount of funds that must be placed on deposit to enter the Decision\nPeriod (note that more requirements must be met to enter the Decision Period)."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Preparation Period"}),": the minimum amount of voting time needed before entering the Decision\nPeriod (given capacity and deposit are met)."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Decision Period"}),": the time interval during which a proposal's outcome can be decided."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Confirmation Period"}),": the minimum amount of time the approval and support criteria must hold\nbefore the proposal is approved and moved to the enactment period. The confirmation period should\nstart before the end of the decision period."]}),"\n"]}),"\n",(0,i.jsx)(n.admonition,{title:"Example Scenario of an Edge Case",type:"info",children:(0,i.jsx)(n.p,{children:"A referendum may enter the confirmation period just one block before the decision period ends. In\nthis scenario, the referendum will pass if it satisfies approval and support thresholds for the\nminimum confirmation period (track-dependent)."})}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Voting Period"}),": The period in which voting is allowed on a referendum, which includes\npreparation, decision, and confirmation periods."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Minimum Enactment Period"}),": the minimum amount of waiting time before the proposed changes are\napplied"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Approval Curve"}),": the curve describing the minimum % of ",(0,i.jsx)(n.em,{children:"aye"})," votes as a function of time within\nthe Decision Period. The approval % is the portion of ",(0,i.jsx)(n.em,{children:"aye"})," votes (adjusted for conviction) over\nthe total votes (",(0,i.jsx)(n.em,{children:"aye"}),", ",(0,i.jsx)(n.em,{children:"nay"}),", and ",(0,i.jsx)(n.em,{children:"abstained"}),")."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Support Curve"}),": the curve describing the minimum % of all votes in support of a proposal as a\nfunction of time within the Decision Period. The support % is defined as the portion of all votes\n(",(0,i.jsx)(n.em,{children:"aye"})," and ",(0,i.jsx)(n.em,{children:"abstained"}),") without conviction over the total possible amount of votes in the system\n(i.e., the total active issuance)."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["For example, a runtime upgrade (requiring a ",(0,i.jsx)(n.code,{children:"set_code"})," call, if approved) does not have the same\nimplications for the ecosystem as the approval of a treasury tip (",(0,i.jsx)(n.code,{children:"reportAwesome"})," call) and\ntherefore, different Origins for these two actions are needed in which different deposits, support,\napproval, and a minimum ",(0,i.jsx)(n.a,{href:"#enactment",children:"enactment"})," periods will be predetermined on the pallet."]}),"\n",(0,i.jsxs)(n.p,{children:["For detailed information about origin and tracks, and parameter values in Kusama, see\n",(0,i.jsx)(n.a,{href:"/docs/learn-polkadot-opengov-origins#origins-and-tracks-info",children:"this page"}),"."]}),"\n",(0,i.jsx)(n.h3,{id:"voluntary-locking-conviction-voting",children:"Voluntary Locking (Conviction Voting)"}),"\n",(0,i.jsx)(n.admonition,{title:"Conviction Voting Locks created during Gov 1",type:"info",children:(0,i.jsxs)(n.p,{children:["Conviction voting locks in Governance v1 will not be carried over to OpenGov. Voting with conviction\nin OpenGov will create a new lock (as this will use the ",(0,i.jsx)(n.code,{children:"convictionVoting"})," pallet), while any\nexisting lock under Governance v1 (using the deprecated ",(0,i.jsx)(n.code,{children:"democracy"})," pallet) will be left to expire.\nDelegations under Governance v1 will need to be re-issued under OpenGov."]})}),"\n",(0,i.jsx)(n.p,{children:"Polkadot utilizes an idea called voluntary locking that allows token holders to increase their\nvoting power by declaring how long they are willing to lock up their tokens; hence, the number of\nvotes for each token holder will be calculated by the following formula:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"votes = tokens * conviction_multiplier\n"})}),"\n",(0,i.jsx)(n.p,{children:"The conviction multiplier increases the vote multiplier by one every time the number of lock periods\ndouble."}),"\n",(0,i.jsx)(p,{}),"\n",(0,i.jsxs)(n.p,{children:['The maximum number of "doublings" of the\n',(0,i.jsx)(n.a,{href:"/docs/chain-state-values#conviction-voting-lock-period",children:"lock period"})," is set to 6 (and thus\n32 lock periods in total). For additional information regarding the timeline of governance events,\ncheck out the governance section on the\n",(0,i.jsx)(n.a,{href:"maintain-polkadot-parameters/#governance",children:"Polkadot Parameters page"}),"."]}),"\n",(0,i.jsx)(n.p,{children:'Votes are always "counted" at the same time (at the end of the voting period), no matter how long\nthe tokens are locked.'}),"\n",(0,i.jsx)(n.p,{children:"See below an example that shows how voluntary locking works."}),"\n",(0,i.jsxs)(n.p,{children:["Peter: Votes ",(0,i.jsx)(n.code,{children:"No"})," with 10 DOT for a 32-week lock period => 10 x 6 = 60 Votes"]}),"\n",(0,i.jsxs)(n.p,{children:["Logan: Votes ",(0,i.jsx)(n.code,{children:"Yes"})," with 20 DOT for one week lock period => 20 x 1 = 20 Votes"]}),"\n",(0,i.jsxs)(n.p,{children:["Kevin: Votes ",(0,i.jsx)(n.code,{children:"Yes"})," with 15 DOT for a 2-week lock period => 15 x 2 = 30 Votes"]}),"\n",(0,i.jsx)(n.p,{children:"Even though both Logan and Kevin vote with more DOT than Peter, the lock period for both of them is\nless than Peter\u2019s, leading to their voting power counting as less."}),"\n",(0,i.jsx)(n.admonition,{title:"Staked tokens can be used in governance",type:"info",children:(0,i.jsxs)(n.p,{children:["While the tokens are locked, you can still use them for voting and ",(0,i.jsx)(n.a,{href:"/docs/learn-staking",children:"staking"}),".\nYou are only prohibited from transferring these tokens to another account. ",(0,i.jsxs)(n.strong,{children:["See the section about\n",(0,i.jsx)(n.a,{href:"#voting-on-a-referendum",children:"OpenGov locks"}),", and learn more about locks on the\n",(0,i.jsx)(n.a,{href:"/docs/learn-account-balances#locks",children:"Balances page"}),"."]})]})}),"\n",(0,i.jsx)(n.h3,{id:"approval-and-support",children:"Approval and Support"}),"\n",(0,i.jsx)(n.admonition,{title:"Adaptive Quorum Biasing is deprecated",type:"info",children:(0,i.jsxs)(n.p,{children:["In Polkadot OpenGov,\n",(0,i.jsx)(n.a,{href:"/docs/learn/learn-governance#adaptive-quorum-biasing",children:"Adaptive quorum biasing"})," used in Governance\nV1 has been replaced with the ",(0,i.jsx)(n.strong,{children:"Approval and Support system"}),"."]})}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"opengov-curves-pass",src:t(13531).A+"",width:"1920",height:"800"})}),"\n",(0,i.jsx)(n.p,{children:"The figure above provides a summary view of how the approval and support system works during the\nDecision Period."}),"\n",(0,i.jsxs)(n.p,{children:["Once the proposal exits the Lead-in Period and enters the Voting Period, to be approved, it must\nsatisfy the approval and support criteria for the ",(0,i.jsx)(n.strong,{children:"Confirmation Period"}),"."]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Approval"})," is defined as the share of ",(0,i.jsx)(n.a,{href:"#voluntary-locking",children:"conviction"}),"-weighted ",(0,i.jsx)(n.em,{children:"aye"})," votes\nagainst the conviction-weighted total of ",(0,i.jsx)(n.em,{children:"aye"})," and ",(0,i.jsx)(n.em,{children:"nay"})," votes. The code implementation can be\nviewed\n",(0,i.jsx)(n.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/f2fbba3be1d7deaf7cfc731cea00552c212ddfcf/substrate/frame/conviction-voting/src/types.rs#L77",children:"here"})]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Support"})," is the total number of ",(0,i.jsx)(n.em,{children:"aye"})," and ",(0,i.jsx)(n.em,{children:"abstain"})," votes (ignoring any adjustment for\nconviction) compared to the total possible votes (",(0,i.jsx)(n.a,{href:"/docs/learn-DOT#token-issuance",children:"active issuance"}),")\nthat could be made in the system. In case of ",(0,i.jsx)(n.em,{children:"split"})," votes, only ",(0,i.jsx)(n.em,{children:"aye"})," and ",(0,i.jsx)(n.em,{children:"abstain"})," will count."]}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"For example, let us consider a hypothetical example where the total active issuance is 100 DOT."}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:'An account A votes "Aye" with 10 DOT with 4x conviction'}),"\n",(0,i.jsx)(n.li,{children:'An account B votes "Nay" with 5 DOT with 2x conviction'}),"\n",(0,i.jsx)(n.li,{children:'An account C votes "Abstain" with 20 DOT. (no conviction can be applied to "Abstain" votes)'}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"In this scenario, only 35 DOT from the total active issuance participated in voting on the\nreferendum. Now, let us calculate the Approval and Support values for that referendum."}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Approval is calculated as (Aye') / (Aye' + Nay\u2019), where Aye' and Nay' are the votes after applying\nthe conviction multiplier. Hence, Approval = (10 x 4) / (10 x 4 + 5 x 2) = 40/50 which is 80%."}),"\n",(0,i.jsx)(n.li,{children:'Support is calculated as (Aye + Abstain) / (total active issuance), where "Aye" and "Abstain" are\nthe votes without the conviction multiplier. Hence, Support = (10 + 20) / 100 which is 30%.'}),"\n"]}),"\n",(0,i.jsx)(n.admonition,{title:"Nay votes are not counted towards Support",type:"info",children:(0,i.jsxs)(n.p,{children:["Support is a measure of voters who turned out either in favor of the referenda or consciously\nabstained from it. Support does not include ",(0,i.jsx)(n.em,{children:"nay"})," votes. This avoids edge situations where ",(0,i.jsx)(n.em,{children:"nay"}),"\nvotes could push a referendum into a confirming state. For example, imagine current approval is high\n(near 100%, way above the approval curve), and current support is just below the support curve. A\n",(0,i.jsx)(n.em,{children:"nay"})," could bump support above the support curve but not reduce approval below the approval curve.\nTherefore, someone voting against a proposal would make it pass. Hence, a decrease in % of current\napproval through new votes does not directly translate into increasing support because Support needs\nto consider ",(0,i.jsx)(n.em,{children:"nay"})," votes."]})}),"\n",(0,i.jsx)(n.p,{children:"The figure above shows the following:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Even if the approval threshold is reached (i.e., % of current approval is greater than the\napproval curve), the proposal only enters the confirmation period once the support threshold is\nalso reached (i.e., % current support is greater than the underlying support curve)."}),"\n",(0,i.jsxs)(n.li,{children:["If the referendum meets the approval and support thresholds for the duration of the confirmation\nperiod, the proposal will be approved and will be scheduled for enactment. Each track has a\ndefault minimum Enactment Period, and the approved referendum needs to wait till the end of it to\nbe executed. Powerful Tracks like ",(0,i.jsx)(n.code,{children:"Root"})," enforce a larger Enactment Period to ensure the network\nhas ample time to prepare for any changes the proposal may bring. The referendum proposers can\nalso set the enactment period higher than its default value."]}),"\n",(0,i.jsxs)(n.li,{children:["A referendum may exit the confirmation period when the thresholds are no longer met due to new\n",(0,i.jsx)(n.em,{children:"Nay"})," votes or a change of existing ",(0,i.jsx)(n.em,{children:"Aye"})," or ",(0,i.jsx)(n.em,{children:"Abstain"})," votes to ",(0,i.jsx)(n.em,{children:"Nay"})," . Each time it exits, the\nconfirmation period clock is reset. For example, suppose the confirmation period is 20 minutes,\nand a referendum enters it just for 5 min before exiting. The next time it enters, it must be\nconfirmed for 20 minutes (not 15 minutes)."]}),"\n",(0,i.jsx)(n.li,{children:"It is possible that a referendum meets the approval and support thresholds almost at the end of\nthe decision period. In this case, even though the decision period elapses, the referendum can\npass if it stays confirming for the duration of the track-specific confirmation period. It is\nrejected immediately if it exits the confirmation period after the decision period elapses."}),"\n",(0,i.jsx)(n.li,{children:"The approval curve starts at 100% and gradually decreases to 50%, but never below 50%. Assuming\nall the active token supply has voted on a proposal, the conviction vote-weighted support should\nalways be above 50% to pass."}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"opengov-curves-pass",src:t(26002).A+"",width:"1920",height:"800"})}),"\n",(0,i.jsx)(n.p,{children:"Note that support may not increase monotonically, as shown in the figure, as people might switch\nvotes."}),"\n",(0,i.jsxs)(n.p,{children:["Different Origins' tracks have different Confirmation Periods and requirements for approval and\nsupport. For additional details on the various origins and tracks, check out\n",(0,i.jsx)(n.a,{href:"/docs/learn-polkadot-opengov-origins#origins-and-tracks-info",children:"this table"}),". With proposals that use\nless privileged origins, it is far more reasonable to drop the required support to a more realistic\namount earlier than those which use highly privileged classes such as ",(0,i.jsx)(n.code,{children:"Root"}),"."]}),"\n",(0,i.jsx)(n.h3,{id:"enactment",children:"Enactment"}),"\n",(0,i.jsx)(n.admonition,{title:"Enactment in Governance v1",type:"info",children:(0,i.jsxs)(n.p,{children:["See ",(0,i.jsx)(n.a,{href:"/docs/learn/learn-governance#enactment",children:"this page"})," for more information about enactment in\nGovernance v1."]})}),"\n",(0,i.jsxs)(n.p,{children:["In Polkadot OpenGov, the proposer suggests the enactment period, but there is also a minimum set for\neach Origin Track. For example, ",(0,i.jsx)(n.code,{children:"root"})," Origin approvals require an extended period because of the\nimportance of the changes they bring to the network."]}),"\n",(0,i.jsx)(n.h3,{id:"cancelling-killing--blacklisting",children:"Cancelling, Killing & Blacklisting"}),"\n",(0,i.jsx)(n.admonition,{title:"Cancelling Referenda in Governance v1",type:"info",children:(0,i.jsxs)(n.p,{children:["See ",(0,i.jsx)(n.a,{href:"/docs/learn/learn-governance#cancelling-proposals",children:"this page"})," for more information about\ncancelling referenda in Governance v1."]})}),"\n",(0,i.jsxs)(n.p,{children:["Polkadot OpenGov has two origins dedicated to rejecting ongoing referenda:\n",(0,i.jsx)(n.a,{href:"/docs/learn-polkadot-opengov-origins#referendum-canceller",children:"Referendum Canceller"})," and\n",(0,i.jsx)(n.a,{href:"/docs/learn-polkadot-opengov-origins#referendum-killer",children:"Referendum Killer"}),"."]}),"\n",(0,i.jsx)(n.p,{children:"Referendum Canceller aims to cancel an already ongoing referendum. When this origin cancels a\nreferendum, the Submission and Decision Deposit are refunded to their originators. An example of\nwhen a referendum might be considered to be canceled is if the originator has made some errors in\ncreating the preimage and did not necessarily do anything malicious. Cancellation has a lower\nDecision Period, and Approval and Support criteria are much easier to meet over time than most other\nOrigins. This is because the cancellation of a referendum usually comes with a sense of urgency."}),"\n",(0,i.jsx)(n.p,{children:"Referendum Killer aims to instantly kill an ongoing referendum, slashing submission and decision\ndeposit (the account(s) that posted these deposits will lose those funds). This origin can be\nengaged if, for example, a malicious actor submits a referendum on the Root Track to set the code of\nthe chains' runtime to stop block production."}),"\n",(0,i.jsx)(n.p,{children:"The Decision Deposit for the Referendum Killer track itself is high to prevent malicious actors from\nattempting to slash deposits of good referenda. A subsequent Referendum Killer can kill an existing\nReferendum Killer."}),"\n",(0,i.jsxs)(n.p,{children:["For more information about how to cancel or kill a referendum, see the\n",(0,i.jsx)(n.a,{href:"./learn-guides-polkadot-opengov#cancel-or-kill-a-referendum",children:"advanced how-to guides"}),"."]}),"\n",(0,i.jsx)(n.admonition,{title:"Blacklisting",type:"info",children:(0,i.jsxs)(n.p,{children:["Blacklisting referenda in Polkadot OpenGov is\n",(0,i.jsx)(n.a,{href:"/docs/learn/learn-governance#blacklisting-proposals",children:"the same as in Governance v1"}),"."]})}),"\n",(0,i.jsx)(n.h2,{id:"voting-on-a-referendum",children:"Voting on a Referendum"}),"\n",(0,i.jsx)(n.p,{children:"If you are a voter, it means that you will vote with your tokens on each single referendum."}),"\n",(0,i.jsxs)(n.p,{children:["In Governance V1, voters could cast only an ",(0,i.jsx)(n.em,{children:"aye"})," or ",(0,i.jsx)(n.em,{children:"nay"})," vote. In Polkadot OpenGov, voters can\nadditionally cast a ",(0,i.jsx)(n.em,{children:"abstain"})," and ",(0,i.jsx)(n.em,{children:"split"})," votes.\n",(0,i.jsx)(n.a,{href:"/docs/learn-guides-polkadot-opengov#voting-on-referenda",children:"Vote splitting"})," allows voters to allocate\ndifferent votes for ",(0,i.jsx)(n.em,{children:"aye"}),", ",(0,i.jsx)(n.em,{children:"nay"}),", and ",(0,i.jsx)(n.em,{children:"abstain"}),". Voting with conviction is not possible when\nabstaining or splitting the votes."]}),"\n",(0,i.jsx)(n.admonition,{title:"Only the last vote counts",type:"info",children:(0,i.jsx)(n.p,{children:"Voting a second time replaces your original vote, e.g. voting with 10 DOT, then a second extrinsic\nto vote with 5 DOT, means that you are voting with 5 DOT, not 10 DOT."})}),"\n",(0,i.jsxs)(n.p,{children:["Note that to successfully cast votes you need to have the\n",(0,i.jsx)(n.a,{href:"/docs/learn-accounts#existential-deposit-and-reaping",children:"existential deposit"})," and some additional funds\nto pay for transaction fees."]}),"\n",(0,i.jsx)(n.p,{children:"In general, you can remove your vote:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"While a referendum is ongoing (your vote does not count)"}),"\n",(0,i.jsx)(n.li,{children:"After a referendum ended (your vote counts)"}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"If you voted without conviction, there's no conviction lock in either case. If you voted with\nconviction, you only get a conviction lock if the referendum ended and you voted with the winning\nside."}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"voting-locks-1",src:t(81108).A+"",width:"1626",height:"912"})}),"\n",(0,i.jsx)(n.admonition,{title:"Revoke your delegation on a track if you like to vote on your own",type:"info",children:(0,i.jsxs)(n.p,{children:["If you want to vote on a referendum on a specific track on your own, you will need to revoke any\nexisting ",(0,i.jsx)(n.a,{href:"#multirole-delegation",children:"delegation"})," on that track (i.e. undelegate). You can have a\nconviction lock on the track, but you cannot have an active delegation."]})}),"\n",(0,i.jsx)(n.h3,{id:"voting-without-conviction",children:"Voting Without Conviction"}),"\n",(0,i.jsx)(n.p,{children:"If you vote without conviction, the referendum is ongoing, and you remove the vote, you can unlock\nyour tokens immediately. If the referendum ended, you can remove your vote and unlock your tokens\nimmediately, regardless of whether you are on the winning or losing side of the referendum. The\ngovernance app or interface you used for participating in Polkadot OpenGov should show an option to\nunlock your tokens."}),"\n",(0,i.jsx)(n.h3,{id:"voting-with-conviction",children:"Voting with Conviction"}),"\n",(0,i.jsx)(n.p,{children:"If you voted with conviction, the referendum is ongoing, and you removed the vote, you can unlock\nyour tokens immediately. If the referendum ended and you are on the losing side, you can remove your\nvote and unlock the tokens immediately. However, if you are on the winning side of the referendum,\nyou will get a conviction lock."}),"\n",(0,i.jsx)(n.p,{children:"Conviction locks are calculated from the time the referendum ended but are applied when you remove\nthe vote."}),"\n",(0,i.jsx)(n.p,{children:"For example, if you voted with conviction 1x with 10 DOT, those 10 DOT will be locked for 7 days\nafter the referendum ends (assuming you are on the winning side). If you remove the vote 3 days\nafter the referendum ended, your tokens will be locked for 4 more days. If you remove it on the 8th\nday after the end of the referendum, the tokens can be unlocked right away (after you remove the\nvote). When you remove the vote, the lock expiration block is calculated and added to the chain\nstate."}),"\n",(0,i.jsxs)(n.p,{children:["If you voted on multiple referenda, and you are on the winning side of all those referenda, you will\nget multiple conviction voting locks for all those referenda. ",(0,i.jsx)(n.strong,{children:"Locks do not stack"}),"; the length and\nsize of the lock decides. This means that - assuming you used the same conviction on the same number\nof tokens - when the conviction lock on the latest referendum (see below, Ref 4) expires, you will\nbe able to unlock your tokens. In the meantime, the previous locks (1 to 3) might have expired, and\nyou can remove those locks (after removing the votes)."]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"voting-locks-2",src:t(3567).A+"",width:"1626",height:"914"})}),"\n",(0,i.jsx)(n.p,{children:"When you delegate your votes, the locking mechanism differs slightly. Please check the next section\non Multirole Delegation for more information."}),"\n",(0,i.jsx)(n.h2,{id:"multirole-delegation",children:"Multirole Delegation"}),"\n",(0,i.jsxs)(n.p,{children:["Polkadot OpenGov builds on the\n",(0,i.jsx)(n.a,{href:"/docs/learn/learn-governance#delegations",children:"vote delegation feature from Governance v1"})," where a\nvoter can delegate their voting power to another voter. It does so by introducing a feature known as\n",(0,i.jsx)(n.strong,{children:"multirole delegation"}),", where voters can specify a different delegate for every class of\nreferendum in the system. Delegation can be done per track, and accounts can choose to select\ndifferent delegates (or no delegation) for each track."]}),"\n",(0,i.jsx)(n.p,{children:"For example, a voter could delegate one entity for managing a less potent referenda class, choose a\ndifferent delegate for another class with more powerful consequences and still retain full voting\npower over any remaining classes."}),"\n",(0,i.jsx)(n.p,{children:"Contrary to solo voting, with delegations, any conviction locks are applied as soon as you\nundelegate, regardless of whether your delegated votes were used for voting during that time. If\nyour delegated votes were used in any ongoing referenda, they would be removed from those referenda\nwhen you undelegate. Alternatively, after undelegating, you can delegate to another person or modify\nyour delegation. The only way to modify the delegation is to undelegate and delegate again. You do\nnot have to do this yourself; wallets and extensions should have implemented UI to modify delegation\nwithout you knowing this."}),"\n",(0,i.jsx)(n.p,{children:"If you delegate without conviction and you undelegate, you can unlock your tokens immediately.\nAlternatively, after undelegating, you can always delegate to another person or modify your\ndelegation."}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"delegation-locks-1",src:t(46475).A+"",width:"1627",height:"913"})}),"\n",(0,i.jsx)(n.p,{children:"In the case you delegated with 1x conviction, you undelegate and re-delegate with 2x conviction; the\ntime you undelegate again, you will have created two conviction locks: one for the 1x and one for\nthe 2x conviction. If you re-delegate immediately with 1x conviction and undelegate, you will get a\nsecond 1x conviction lock, but the 2x conviction lock will be the one deciding when your token can\nbe unlocked."}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"delegation-locks-2",src:t(32656).A+"",width:"1630",height:"912"})}),"\n",(0,i.jsxs)(n.admonition,{type:"info",children:[(0,i.jsx)(n.p,{children:"If the account delegated votes to different delegates using different convictions, then after\nundelegating those delegates, there will be different unlocking periods with lengths dependent on\nthe conviction multipliers."}),(0,i.jsx)(n.p,{children:(0,i.jsxs)(n.strong,{children:["Before delegating a specific track, you must remove any ",(0,i.jsx)(n.a,{href:"#voting-on-a-referendum",children:"vote"})," on that\ntrack."]})})]}),"\n",(0,i.jsx)(n.p,{children:"It is worth noting that a user delegating their voting power does not imply that the delegate will\nhave control over the funds of the delegating user's account. That delegate's account can vote with\na user's voting power but won't be able to transfer balances, nominate a different set of\nvalidators, or execute any call other than voting on the tracks defined by the user."}),"\n",(0,i.jsx)(n.p,{children:"The goal of delegations is to ensure the required support for proposals to be enacted is reached\nwhile keeping the overall design censorship-free. Also, voters might not have the technical\nknowledge to judge some referenda or might not have the time to read all referenda. Delegations\nallow voters to participate in OpenGov hands-free by delegating their voting power to trusted\nentities."}),"\n",(0,i.jsx)(n.h2,{id:"resources",children:"Resources"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/substrate/frame/democracy/src",children:"Democracy Pallet"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://medium.com/polkadot-network/gov2-polkadots-next-generation-of-decentralised-governance-4d9ef657d11b",children:"Governance v2"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://matrix.to/#/#Polkadot-Direction:parity.io",children:"Polkadot Direction"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://matrix.to/#/#Kusama-Direction:parity.io",children:"Kusama Direction"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://polkadot.polkassembly.io/",children:"PolkAssembly"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.admonition,{title:"Polkadot-JS Guides",type:"info",children:(0,i.jsxs)(n.p,{children:["If you are an advanced user, see the\n",(0,i.jsx)(n.a,{href:"/docs/learn-guides-polkadot-opengov",children:"Polkadot-JS guides about OpenGov"}),"."]})})]})}function j(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(x,{...e})}):x(e)}},67141:(e,n,t)=>{"use strict";t.d(n,{A:()=>r});var o=t(96540),i=t(74848);const r=function(e){var n,t=e.message,r=(0,o.useState)(!0),a=r[0],s=r[1];return(0,i.jsx)(i.Fragment,{children:a&&(0,i.jsxs)("div",{className:"message-box",children:[(0,i.jsx)("button",{className:"close-button",onClick:function(){s(!1)},children:"\u2716 "}),(0,i.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(n=t,n.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},47379:(e,n,t)=>{"use strict";t.d(n,{A:()=>p});var o=t(90675),i=t(10467),r=t(96540),a=t(19588),s=t(2026),l=t(11135);function d(e,n,t){return c.apply(this,arguments)}function c(){return(c=(0,i.A)((0,o.A)().mark((function e(n,t,i){var r,l,d,c,h;return(0,o.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=void 0,l=void 0,e.t0=n,e.next="polkadot"===e.t0?5:"kusama"===e.t0?7:"statemine"===e.t0?9:"statemint"===e.t0?11:"polkadotpeople"===e.t0?13:"kusamapeople"===e.t0?15:17;break;case 5:return r="wss://rpc.polkadot.io",e.abrupt("break",18);case 7:return r="wss://kusama-rpc.polkadot.io/",e.abrupt("break",18);case 9:return r="wss://statemine-rpc.polkadot.io/",e.abrupt("break",18);case 11:return r="wss://statemint-rpc.polkadot.io/",e.abrupt("break",18);case 13:return r="wss://polkadot-people-rpc.polkadot.io/",e.abrupt("break",18);case 15:return r="wss://kusama-people-rpc.polkadot.io/",e.abrupt("break",18);case 17:console.log("Unknown socket url provided, no connection made.");case 18:if(void 0!==r){e.next=22;break}return e.abrupt("return");case 22:return d=new a.E(r),e.next=25,s.G.create({provider:d});case 25:c=e.sent,(h=t.split(".")).forEach((function(e){e in c&&(c=c[e])})),e.t1=h[0],e.next="consts"===e.t1?31:"query"===e.t1?33:38;break;case 31:return l=c.toString(),e.abrupt("break",39);case 33:return e.next=35,c();case 35:return l=(l=e.sent).toString(),e.abrupt("break",39);case 38:console.log("Unknown path prefix ("+h[0]+") in "+t);case 39:return e.abrupt("return",l);case 40:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function h(e,n,t,o){switch(n){case"humanReadable":(0,l.HumanReadable)(e,t,o);break;case"precise":(0,l.Precise)(e,t,o);break;case"blocksToDays":(0,l.BlocksToDays)(e,o);break;case"erasToDays":(0,l.ErasToDays)(e,o,t);break;case"percentage":(0,l.Percentage)(e,o);break;case"permillToPercent":(0,l.PermillToPercent)(e,o);break;case"arrayLength":(0,l.ArrayLength)(e,o);break;default:return void console.log("Ignoring unknown filter type")}}const p=function(e){var n=e.network,t=e.path,a=e.defaultValue,s=e.filter,l=void 0===s?void 0:s,c=(0,r.useState)(""),p=c[0],u=c[1];return n=n.toLowerCase(),(0,r.useEffect)((function(){void 0!==l?h(a.toString(),l,n,u):u(a.toString());var e=void 0;switch(n){case"polkadot":e="wss://rpc.polkadot.io";break;case"kusama":e="wss://kusama-rpc.polkadot.io/";break;case"statemine":e="wss://kusama-asset-hub-rpc.polkadot.io/";break;case"statemint":e="wss://polkadot-asset-hub-rpc.polkadot.io/";break;case"kusamapeople":e="wss://kusama-people-rpc.polkadot.io";break;case"polkadotpeople":e="wss://polkadot-people-rpc.polkadot.io";break;default:console.log("Unknown network provided, "+n)}if(void 0===e)console.log("Failed to connect to a valid websocket, applying default");else{var r=function(){var e=(0,i.A)((0,o.A)().mark((function e(){var i;return(0,o.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,d(n,t,u);case 2:if(void 0!==(i=e.sent)){e.next=7;break}return e.abrupt("return");case 7:void 0!==l?h(i,l,n,u):u(i);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();try{r()}catch(s){console.log(s)}}}),[]),p}},11135:e=>{var n="polkadot",t="kusama",o="statemine",i="statemint",r="polkadotpeople",a="kusamapeople",s={polkadot:{precision:1e10,symbol:"DOT"},kusama:{precision:1e12,symbol:"KSM"},statemint:{precision:1e10,symbol:"DOT"},statemine:{precision:1e12,symbol:"KSM"},polkadotpeople:{precision:1e10,symbol:"DOT"},kusamapeople:{precision:1e12,symbol:"KSM"}};e.exports={HumanReadable:function(e,l,d){var c=void 0;if(l===n||l===i)c=3;else if(l===t||l===o||l===r)c=6;else{if(l!=a)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");c=8}e=parseFloat(e),d((e=Number.isInteger(e/s[l].precision)?e/s[l].precision+" "+s[l].symbol:(e/s[l].precision).toFixed(c)+" "+s[l].symbol).toString())},Precise:function(e,n,t){t(e=(e=parseFloat(e))/s[n].precision+" "+s[n].symbol)},BlocksToDays:function(e,n){n((e=6*e/86400).toString())},ErasToDays:function(e,s,l){var d=void 0;if(l===n||l===i||l==r)d=1;else{if(l!==t&&l!==o&&l!=a)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");d=4}s((e/=d).toString())},Percentage:function(e,n){n((e/=1e7).toString())},PermillToPercent:function(e,n){n((e/=1e4).toString())},ArrayLength:function(e,n){n((e=e.split(",").length).toString())}}},46475:(e,n,t)=>{"use strict";t.d(n,{A:()=>o});const o=t.p+"assets/images/delegation-locks-1-c203e10abb20e87ec907c910c0221a8f.png"},32656:(e,n,t)=>{"use strict";t.d(n,{A:()=>o});const o=t.p+"assets/images/delegation-locks-2-db32ffe7daa316d3b96a6311cccdea85.png"},26002:(e,n,t)=>{"use strict";t.d(n,{A:()=>o});const o=t.p+"assets/images/opengov-curves-nopass-27f6968907aeb88e87069d29ca062568.png"},13531:(e,n,t)=>{"use strict";t.d(n,{A:()=>o});const o=t.p+"assets/images/opengov-curves-pass-73b6c7d1849e26082880cd7d629a633e.png"},39040:(e,n,t)=>{"use strict";t.d(n,{A:()=>o});const o=t.p+"assets/images/opengov-overview-a56ef29a3a173f9dc2b60a9008dcfc1b.png"},17160:(e,n,t)=>{"use strict";t.d(n,{A:()=>o});const o=t.p+"assets/images/opengov-timeline-26e5a1fae159676ab5052a4fd7416be5.png"},61019:(e,n,t)=>{"use strict";t.d(n,{A:()=>o});const o=t.p+"assets/images/opengov-track-capacity-a1e00e5bd7961ea13d38f79cf6fa4b9c.png"},81108:(e,n,t)=>{"use strict";t.d(n,{A:()=>o});const o=t.p+"assets/images/voting-locks-1-23e3e07cb23d8a6b30e50be110a5119b.png"},3567:(e,n,t)=>{"use strict";t.d(n,{A:()=>o});const o=t.p+"assets/images/voting-locks-2-d8eaa8ef9a38f7460042b27fadd0d166.png"},47790:()=>{}}]); \ No newline at end of file diff --git a/assets/js/3002ebf4.136244e0.js b/assets/js/3002ebf4.136244e0.js new file mode 100644 index 000000000000..9065e3ea3622 --- /dev/null +++ b/assets/js/3002ebf4.136244e0.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3423],{19639:(e,a,t)=>{t.r(a),t.d(a,{assets:()=>d,contentTitle:()=>u,default:()=>h,frontMatter:()=>o,metadata:()=>n,toc:()=>c});const n=JSON.parse('{"id":"build/build-dapp","title":"Building dApps","description":"An overview about building dApps on Polkadot","source":"@site/../docs/build/build-dapp.md","sourceDirName":"build","slug":"/build-dapp","permalink":"/docs/build-dapp","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/build/build-dapp.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1727178265000,"frontMatter":{"id":"build-dapp","title":"Building dApps","sidebar_label":"Building dApps","description":"An overview about building dApps on Polkadot","keywords":["data","index","query","explorer","dashboard","dapp","uapp","app","frontend","client"],"slug":"../build-dapp"}}');var r=t(74848),l=t(28453),i=t(11470),s=t(19365);const o={id:"build-dapp",title:"Building dApps",sidebar_label:"Building dApps",description:"An overview about building dApps on Polkadot",keywords:["data","index","query","explorer","dashboard","dapp","uapp","app","frontend","client"],slug:"../build-dapp"},u=void 0,d={},c=[{value:"SDKS & Libraries",id:"sdks--libraries",level:2},{value:"Frameworks & Toolkits",id:"frameworks--toolkits",level:2}];function p(e){const a={a:"a",admonition:"admonition",h2:"h2",p:"p",strong:"strong",...(0,l.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(a.p,{children:"As with any blockchain, building decentralized applications (dApps) is a huge part of how a\ndeveloper can build on Polkadot."}),"\n",(0,r.jsx)(a.p,{children:"As an application developer, you can compose your front-end apps in a few different ways. Because\nPolkadot and its parachains are all built using Substraste; you can often use the same SDK to\ncommunicate with Polkadot, a parachain, or any other Substrate-based chain."}),"\n",(0,r.jsx)(a.admonition,{title:"Substrate-based chains use an SS58 encoding for their address formats.",type:"note",children:(0,r.jsxs)(a.p,{children:["Please see the ",(0,r.jsx)(a.a,{href:"https://github.com/paritytech/ss58-registry/",children:"SS58 registry"})," to see which\n",(0,r.jsx)(a.a,{href:"https://github.com/paritytech/ss58-registry/blob/main/ss58-registry.json",children:"chain corresponds to a given prefix"}),",\nand which prefixes are available."]})}),"\n",(0,r.jsx)(a.h2,{id:"sdks--libraries",children:"SDKS & Libraries"}),"\n",(0,r.jsxs)(a.p,{children:["If one aims to develop a ",(0,r.jsx)(a.strong,{children:"dApp"})," (Decentralized App), the Polkadot ecosystem contains various SDKs\nto tap into the relay chain and parachains. There are several languages already supported -\n",(0,r.jsx)(a.a,{href:"/docs/build-tools-index",children:"see the tooling page for a detailed overview of different SDKs and libraries that are available."})]}),"\n",(0,r.jsx)(a.h2,{id:"frameworks--toolkits",children:"Frameworks & Toolkits"}),"\n",(0,r.jsx)(a.p,{children:"For front-end applications, several options exist for interfacing with Substrate-based chains\n(parachains, relay chains, etc.) and smart contracts. These often will interact with the RPC of a\nSubstrate node:"}),"\n",(0,r.jsxs)(i.A,{groupId:"clients",values:[{label:"Polkadot.js",value:"pjs"},{label:"Polkadot-API",value:"papi"},{label:"Reactive DOT",value:"reactive-dot"},{label:"Subxt",value:"subxt"},{label:"React Hooks for ink!",value:"useink"},{label:"ink!athon Boilerplate",value:"inkathon"},{label:"Polkadot Cloud",value:"pcloud"}],children:[(0,r.jsx)(s.A,{value:"pjs",children:(0,r.jsxs)(a.p,{children:["Promise and RxJS APIs around Polkadot and Substrate-based chains via RPC calls. It is dynamically\ngenerated based on what the Substrate runtime provides regarding metadata. Full documentation &\nexamples available\xa0",(0,r.jsx)("a",{href:"https://polkadot.js.org/docs",target:"_blank",children:"here"}),"."]})}),(0,r.jsx)(s.A,{value:"papi",children:(0,r.jsxs)(a.p,{children:["Polkadot-API will serve as a replacement for Polkadot JS. Full documentation & examples\navailable\xa0",(0,r.jsx)("a",{href:"https://papi.how/",target:"_blank",children:"here"}),"."]})}),(0,r.jsx)(s.A,{value:"reactive-dot",children:(0,r.jsxs)(a.p,{children:["A reactive library for building Substrate front-ends. Full documentation & examples\navailable\xa0",(0,r.jsx)("a",{href:"https://reactivedot.dev/",target:"_blank",children:"here"}),"."]})}),(0,r.jsx)(s.A,{value:"subxt",children:(0,r.jsxs)(a.p,{children:["Query and submit extrinsics (transactions) to a Substrate node via RPC using Rust. Also referred to\nas Rust Parity. Full documentation & examples\navailable\xa0",(0,r.jsx)("a",{href:"https://github.com/paritytech/subxt",target:"_blank",children:"here"}),"."]})}),(0,r.jsx)(s.A,{value:"useink",children:(0,r.jsxs)(a.p,{children:["React hooks library for ink! smart contracts that abstract the functionality of polkadot.js. Full\ndocumentation & examples available\xa0",(0,r.jsx)("a",{href:"https://use.ink",target:"_blank",children:"here"}),"."]})}),(0,r.jsx)(s.A,{value:"inkathon",children:(0,r.jsxs)(a.p,{children:["ink!athon is a starter kit for full-stack dApp development with ink! smart contracts and a\nReact-based frontend in one place. With convenient helper scripts and a pre-configured project\nsetup, you can quickly scaffold any dApp. Live example & full documentation\navailable\xa0",(0,r.jsx)("a",{href:"https://inkathon.xyz",target:"_blank",children:"here"}),"."]})}),(0,r.jsx)(s.A,{value:"pcloud",children:(0,r.jsxs)(a.p,{children:["Polkadot Cloud hosts a library of assets, ranging from data sources, graphical elements, to fully\nfunctional components, for app developers to plug and play into their codebases.\n\xa0",(0,r.jsx)("a",{href:"https://polkadot.cloud/",target:"_blank",children:"Learn more here"}),"."]})})]})]})}function h(e={}){const{wrapper:a}={...(0,l.R)(),...e.components};return a?(0,r.jsx)(a,{...e,children:(0,r.jsx)(p,{...e})}):p(e)}},19365:(e,a,t)=>{t.d(a,{A:()=>i});t(96540);var n=t(34164);const r={tabItem:"tabItem_Ymn6"};var l=t(74848);function i(e){var a=e.children,t=e.hidden,i=e.className;return(0,l.jsx)("div",{role:"tabpanel",className:(0,n.A)(r.tabItem,i),hidden:t,children:a})}},11470:(e,a,t)=>{t.d(a,{A:()=>j});var n=t(96540),r=t(34164),l=t(23104),i=t(56347),s=t(205),o=t(57485),u=t(31682),d=t(75376);function c(e){var a,t;return null!=(a=null==(t=n.Children.toArray(e).filter((function(e){return"\n"!==e})).map((function(e){if(!e||(0,n.isValidElement)(e)&&((a=e.props)&&"object"==typeof a&&"value"in a))return e;var a;throw new Error("Docusaurus error: Bad child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:t.filter(Boolean))?a:[]}function p(e){var a=e.values,t=e.children;return(0,n.useMemo)((function(){var e=null!=a?a:function(e){return c(e).map((function(e){var a=e.props;return{value:a.value,label:a.label,attributes:a.attributes,default:a.default}}))}(t);return function(e){var a=(0,u.XI)(e,(function(e,a){return e.value===a.value}));if(a.length>0)throw new Error('Docusaurus error: Duplicate values "'+a.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[a,t])}function h(e){var a=e.value;return e.tabValues.some((function(e){return e.value===a}))}function b(e){var a=e.queryString,t=void 0!==a&&a,r=e.groupId,l=(0,i.W6)(),s=function(e){var a=e.queryString,t=void 0!==a&&a,n=e.groupId;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=n?n:null}({queryString:t,groupId:r});return[(0,o.aZ)(s),(0,n.useCallback)((function(e){if(s){var a=new URLSearchParams(l.location.search);a.set(s,e),l.replace(Object.assign({},l.location,{search:a.toString()}))}}),[s,l])]}function f(e){var a,t,r,l,i=e.defaultValue,o=e.queryString,u=void 0!==o&&o,c=e.groupId,f=p(e),v=(0,n.useState)((function(){return function(e){var a,t=e.defaultValue,n=e.tabValues;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!h({value:t,tabValues:n}))throw new Error('Docusaurus error: The has a defaultValue "'+t+'" but none of its children has the corresponding value. Available values are: '+n.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return t}var r=null!=(a=n.find((function(e){return e.default})))?a:n[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:i,tabValues:f})})),m=v[0],g=v[1],x=b({queryString:u,groupId:c}),k=x[0],y=x[1],j=(a=function(e){return e?"docusaurus.tab."+e:null}({groupId:c}.groupId),t=(0,d.Dv)(a),r=t[0],l=t[1],[r,(0,n.useCallback)((function(e){a&&l.set(e)}),[a,l])]),w=j[0],A=j[1],S=function(){var e=null!=k?k:w;return h({value:e,tabValues:f})?e:null}();return(0,s.A)((function(){S&&g(S)}),[S]),{selectedValue:m,selectValue:(0,n.useCallback)((function(e){if(!h({value:e,tabValues:f}))throw new Error("Can't select invalid tab value="+e);g(e),y(e),A(e)}),[y,A,f]),tabValues:f}}var v=t(92303);const m={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var g=t(74848);function x(e){var a=e.className,t=e.block,n=e.selectedValue,i=e.selectValue,s=e.tabValues,o=[],u=(0,l.a_)().blockElementScrollPositionUntilNextRender,d=function(e){var a=e.currentTarget,t=o.indexOf(a),r=s[t].value;r!==n&&(u(a),i(r))},c=function(e){var a,t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":var n,r=o.indexOf(e.currentTarget)+1;t=null!=(n=o[r])?n:o[0];break;case"ArrowLeft":var l,i=o.indexOf(e.currentTarget)-1;t=null!=(l=o[i])?l:o[o.length-1]}null==(a=t)||a.focus()};return(0,g.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,r.A)("tabs",{"tabs--block":t},a),children:s.map((function(e){var a=e.value,t=e.label,l=e.attributes;return(0,g.jsx)("li",Object.assign({role:"tab",tabIndex:n===a?0:-1,"aria-selected":n===a,ref:function(e){return o.push(e)},onKeyDown:c,onClick:d},l,{className:(0,r.A)("tabs__item",m.tabItem,null==l?void 0:l.className,{"tabs__item--active":n===a}),children:null!=t?t:a}),a)}))})}function k(e){var a=e.lazy,t=e.children,l=e.selectedValue,i=(Array.isArray(t)?t:[t]).filter(Boolean);if(a){var s=i.find((function(e){return e.props.value===l}));return s?(0,n.cloneElement)(s,{className:(0,r.A)("margin-top--md",s.props.className)}):null}return(0,g.jsx)("div",{className:"margin-top--md",children:i.map((function(e,a){return(0,n.cloneElement)(e,{key:a,hidden:e.props.value!==l})}))})}function y(e){var a=f(e);return(0,g.jsxs)("div",{className:(0,r.A)("tabs-container",m.tabList),children:[(0,g.jsx)(x,Object.assign({},a,e)),(0,g.jsx)(k,Object.assign({},a,e))]})}function j(e){var a=(0,v.A)();return(0,g.jsx)(y,Object.assign({},e,{children:c(e.children)}),String(a))}},28453:(e,a,t)=>{t.d(a,{R:()=>i,x:()=>s});var n=t(96540);const r={},l=n.createContext(r);function i(e){const a=n.useContext(l);return n.useMemo((function(){return"function"==typeof e?e(a):{...a,...e}}),[a,e])}function s(e){let a;return a=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),n.createElement(l.Provider,{value:a},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/3002ebf4.d6784316.js b/assets/js/3002ebf4.d6784316.js deleted file mode 100644 index 6b53fa15b7f7..000000000000 --- a/assets/js/3002ebf4.d6784316.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3423],{57120:(e,a,t)=>{t.r(a),t.d(a,{assets:()=>d,contentTitle:()=>o,default:()=>h,frontMatter:()=>s,metadata:()=>u,toc:()=>c});var n=t(74848),r=t(28453),l=t(11470),i=t(19365);const s={id:"build-dapp",title:"Building dApps",sidebar_label:"Building dApps",description:"An overview about building dApps on Polkadot",keywords:["data","index","query","explorer","dashboard","dapp","uapp","app","frontend","client"],slug:"../build-dapp"},o=void 0,u={id:"build/build-dapp",title:"Building dApps",description:"An overview about building dApps on Polkadot",source:"@site/../docs/build/build-dapp.md",sourceDirName:"build",slug:"/build-dapp",permalink:"/docs/build-dapp",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/build/build-dapp.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1727178265e3,frontMatter:{id:"build-dapp",title:"Building dApps",sidebar_label:"Building dApps",description:"An overview about building dApps on Polkadot",keywords:["data","index","query","explorer","dashboard","dapp","uapp","app","frontend","client"],slug:"../build-dapp"}},d={},c=[{value:"SDKS & Libraries",id:"sdks--libraries",level:2},{value:"Frameworks & Toolkits",id:"frameworks--toolkits",level:2}];function p(e){const a={a:"a",admonition:"admonition",h2:"h2",p:"p",strong:"strong",...(0,r.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(a.p,{children:"As with any blockchain, building decentralized applications (dApps) is a huge part of how a\ndeveloper can build on Polkadot."}),"\n",(0,n.jsx)(a.p,{children:"As an application developer, you can compose your front-end apps in a few different ways. Because\nPolkadot and its parachains are all built using Substraste; you can often use the same SDK to\ncommunicate with Polkadot, a parachain, or any other Substrate-based chain."}),"\n",(0,n.jsx)(a.admonition,{title:"Substrate-based chains use an SS58 encoding for their address formats.",type:"note",children:(0,n.jsxs)(a.p,{children:["Please see the ",(0,n.jsx)(a.a,{href:"https://github.com/paritytech/ss58-registry/",children:"SS58 registry"})," to see which\n",(0,n.jsx)(a.a,{href:"https://github.com/paritytech/ss58-registry/blob/main/ss58-registry.json",children:"chain corresponds to a given prefix"}),",\nand which prefixes are available."]})}),"\n",(0,n.jsx)(a.h2,{id:"sdks--libraries",children:"SDKS & Libraries"}),"\n",(0,n.jsxs)(a.p,{children:["If one aims to develop a ",(0,n.jsx)(a.strong,{children:"dApp"})," (Decentralized App), the Polkadot ecosystem contains various SDKs\nto tap into the relay chain and parachains. There are several languages already supported -\n",(0,n.jsx)(a.a,{href:"/docs/build-tools-index",children:"see the tooling page for a detailed overview of different SDKs and libraries that are available."})]}),"\n",(0,n.jsx)(a.h2,{id:"frameworks--toolkits",children:"Frameworks & Toolkits"}),"\n",(0,n.jsx)(a.p,{children:"For front-end applications, several options exist for interfacing with Substrate-based chains\n(parachains, relay chains, etc.) and smart contracts. These often will interact with the RPC of a\nSubstrate node:"}),"\n",(0,n.jsxs)(l.A,{groupId:"clients",values:[{label:"Polkadot.js",value:"pjs"},{label:"Polkadot-API",value:"papi"},{label:"Reactive DOT",value:"reactive-dot"},{label:"Subxt",value:"subxt"},{label:"React Hooks for ink!",value:"useink"},{label:"ink!athon Boilerplate",value:"inkathon"},{label:"Polkadot Cloud",value:"pcloud"}],children:[(0,n.jsx)(i.A,{value:"pjs",children:(0,n.jsxs)(a.p,{children:["Promise and RxJS APIs around Polkadot and Substrate-based chains via RPC calls. It is dynamically\ngenerated based on what the Substrate runtime provides regarding metadata. Full documentation &\nexamples available\xa0",(0,n.jsx)("a",{href:"https://polkadot.js.org/docs",target:"_blank",children:"here"}),"."]})}),(0,n.jsx)(i.A,{value:"papi",children:(0,n.jsxs)(a.p,{children:["Polkadot-API will serve as a replacement for Polkadot JS. Full documentation & examples\navailable\xa0",(0,n.jsx)("a",{href:"https://papi.how/",target:"_blank",children:"here"}),"."]})}),(0,n.jsx)(i.A,{value:"reactive-dot",children:(0,n.jsxs)(a.p,{children:["A reactive library for building Substrate front-ends. Full documentation & examples\navailable\xa0",(0,n.jsx)("a",{href:"https://reactivedot.dev/",target:"_blank",children:"here"}),"."]})}),(0,n.jsx)(i.A,{value:"subxt",children:(0,n.jsxs)(a.p,{children:["Query and submit extrinsics (transactions) to a Substrate node via RPC using Rust. Also referred to\nas Rust Parity. Full documentation & examples\navailable\xa0",(0,n.jsx)("a",{href:"https://github.com/paritytech/subxt",target:"_blank",children:"here"}),"."]})}),(0,n.jsx)(i.A,{value:"useink",children:(0,n.jsxs)(a.p,{children:["React hooks library for ink! smart contracts that abstract the functionality of polkadot.js. Full\ndocumentation & examples available\xa0",(0,n.jsx)("a",{href:"https://use.ink",target:"_blank",children:"here"}),"."]})}),(0,n.jsx)(i.A,{value:"inkathon",children:(0,n.jsxs)(a.p,{children:["ink!athon is a starter kit for full-stack dApp development with ink! smart contracts and a\nReact-based frontend in one place. With convenient helper scripts and a pre-configured project\nsetup, you can quickly scaffold any dApp. Live example & full documentation\navailable\xa0",(0,n.jsx)("a",{href:"https://inkathon.xyz",target:"_blank",children:"here"}),"."]})}),(0,n.jsx)(i.A,{value:"pcloud",children:(0,n.jsxs)(a.p,{children:["Polkadot Cloud hosts a library of assets, ranging from data sources, graphical elements, to fully\nfunctional components, for app developers to plug and play into their codebases.\n\xa0",(0,n.jsx)("a",{href:"https://polkadot.cloud/",target:"_blank",children:"Learn more here"}),"."]})})]})]})}function h(e={}){const{wrapper:a}={...(0,r.R)(),...e.components};return a?(0,n.jsx)(a,{...e,children:(0,n.jsx)(p,{...e})}):p(e)}},19365:(e,a,t)=>{t.d(a,{A:()=>i});t(96540);var n=t(34164);const r={tabItem:"tabItem_Ymn6"};var l=t(74848);function i(e){var a=e.children,t=e.hidden,i=e.className;return(0,l.jsx)("div",{role:"tabpanel",className:(0,n.A)(r.tabItem,i),hidden:t,children:a})}},11470:(e,a,t)=>{t.d(a,{A:()=>j});var n=t(96540),r=t(34164),l=t(23104),i=t(56347),s=t(205),o=t(57485),u=t(31682),d=t(75376);function c(e){var a,t;return null!=(a=null==(t=n.Children.toArray(e).filter((function(e){return"\n"!==e})).map((function(e){if(!e||(0,n.isValidElement)(e)&&((a=e.props)&&"object"==typeof a&&"value"in a))return e;var a;throw new Error("Docusaurus error: Bad child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:t.filter(Boolean))?a:[]}function p(e){var a=e.values,t=e.children;return(0,n.useMemo)((function(){var e=null!=a?a:function(e){return c(e).map((function(e){var a=e.props;return{value:a.value,label:a.label,attributes:a.attributes,default:a.default}}))}(t);return function(e){var a=(0,u.XI)(e,(function(e,a){return e.value===a.value}));if(a.length>0)throw new Error('Docusaurus error: Duplicate values "'+a.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[a,t])}function h(e){var a=e.value;return e.tabValues.some((function(e){return e.value===a}))}function b(e){var a=e.queryString,t=void 0!==a&&a,r=e.groupId,l=(0,i.W6)(),s=function(e){var a=e.queryString,t=void 0!==a&&a,n=e.groupId;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=n?n:null}({queryString:t,groupId:r});return[(0,o.aZ)(s),(0,n.useCallback)((function(e){if(s){var a=new URLSearchParams(l.location.search);a.set(s,e),l.replace(Object.assign({},l.location,{search:a.toString()}))}}),[s,l])]}function f(e){var a,t,r,l,i=e.defaultValue,o=e.queryString,u=void 0!==o&&o,c=e.groupId,f=p(e),v=(0,n.useState)((function(){return function(e){var a,t=e.defaultValue,n=e.tabValues;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!h({value:t,tabValues:n}))throw new Error('Docusaurus error: The has a defaultValue "'+t+'" but none of its children has the corresponding value. Available values are: '+n.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return t}var r=null!=(a=n.find((function(e){return e.default})))?a:n[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:i,tabValues:f})})),m=v[0],g=v[1],x=b({queryString:u,groupId:c}),k=x[0],y=x[1],j=(a=function(e){return e?"docusaurus.tab."+e:null}({groupId:c}.groupId),t=(0,d.Dv)(a),r=t[0],l=t[1],[r,(0,n.useCallback)((function(e){a&&l.set(e)}),[a,l])]),w=j[0],A=j[1],S=function(){var e=null!=k?k:w;return h({value:e,tabValues:f})?e:null}();return(0,s.A)((function(){S&&g(S)}),[S]),{selectedValue:m,selectValue:(0,n.useCallback)((function(e){if(!h({value:e,tabValues:f}))throw new Error("Can't select invalid tab value="+e);g(e),y(e),A(e)}),[y,A,f]),tabValues:f}}var v=t(92303);const m={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var g=t(74848);function x(e){var a=e.className,t=e.block,n=e.selectedValue,i=e.selectValue,s=e.tabValues,o=[],u=(0,l.a_)().blockElementScrollPositionUntilNextRender,d=function(e){var a=e.currentTarget,t=o.indexOf(a),r=s[t].value;r!==n&&(u(a),i(r))},c=function(e){var a,t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":var n,r=o.indexOf(e.currentTarget)+1;t=null!=(n=o[r])?n:o[0];break;case"ArrowLeft":var l,i=o.indexOf(e.currentTarget)-1;t=null!=(l=o[i])?l:o[o.length-1]}null==(a=t)||a.focus()};return(0,g.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,r.A)("tabs",{"tabs--block":t},a),children:s.map((function(e){var a=e.value,t=e.label,l=e.attributes;return(0,g.jsx)("li",Object.assign({role:"tab",tabIndex:n===a?0:-1,"aria-selected":n===a,ref:function(e){return o.push(e)},onKeyDown:c,onClick:d},l,{className:(0,r.A)("tabs__item",m.tabItem,null==l?void 0:l.className,{"tabs__item--active":n===a}),children:null!=t?t:a}),a)}))})}function k(e){var a=e.lazy,t=e.children,l=e.selectedValue,i=(Array.isArray(t)?t:[t]).filter(Boolean);if(a){var s=i.find((function(e){return e.props.value===l}));return s?(0,n.cloneElement)(s,{className:(0,r.A)("margin-top--md",s.props.className)}):null}return(0,g.jsx)("div",{className:"margin-top--md",children:i.map((function(e,a){return(0,n.cloneElement)(e,{key:a,hidden:e.props.value!==l})}))})}function y(e){var a=f(e);return(0,g.jsxs)("div",{className:(0,r.A)("tabs-container",m.tabList),children:[(0,g.jsx)(x,Object.assign({},a,e)),(0,g.jsx)(k,Object.assign({},a,e))]})}function j(e){var a=(0,v.A)();return(0,g.jsx)(y,Object.assign({},e,{children:c(e.children)}),String(a))}},28453:(e,a,t)=>{t.d(a,{R:()=>i,x:()=>s});var n=t(96540);const r={},l=n.createContext(r);function i(e){const a=n.useContext(l);return n.useMemo((function(){return"function"==typeof e?e(a):{...a,...e}}),[a,e])}function s(e){let a;return a=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),n.createElement(l.Provider,{value:a},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/315.76c3f1d4.js b/assets/js/315.76c3f1d4.js deleted file mode 100644 index 952565734f24..000000000000 --- a/assets/js/315.76c3f1d4.js +++ /dev/null @@ -1,28583 +0,0 @@ -"use strict"; -exports.id = 315; -exports.ids = [315]; -exports.modules = { - -/***/ 10646: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ H: () => (/* binding */ addHtmlLabel) -/* harmony export */ }); -/* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82933); - - - - -function addHtmlLabel(root, node) { - var fo = root.append('foreignObject').attr('width', '100000'); - - var div = fo.append('xhtml:div'); - div.attr('xmlns', 'http://www.w3.org/1999/xhtml'); - - var label = node.label; - switch (typeof label) { - case 'function': - div.insert(label); - break; - case 'object': - // Currently we assume this is a DOM object. - div.insert(function () { - return label; - }); - break; - default: - div.html(label); - } - - _util_js__WEBPACK_IMPORTED_MODULE_0__/* .applyStyle */ .AV(div, node.labelStyle); - div.style('display', 'inline-block'); - // Fix for firefox - div.style('white-space', 'nowrap'); - - var client = div.node().getBoundingClientRect(); - fo.attr('width', client.width).attr('height', client.height); - - return fo; -} - - -/***/ }), - -/***/ 82933: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ AV: () => (/* binding */ applyStyle), -/* harmony export */ De: () => (/* binding */ isSubgraph), -/* harmony export */ c$: () => (/* binding */ applyTransition), -/* harmony export */ gh: () => (/* binding */ edgeToId), -/* harmony export */ nh: () => (/* binding */ applyClass) -/* harmony export */ }); -/* harmony import */ var lodash_es__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(34963); -/* harmony import */ var lodash_es__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(89610); - - -// Public utility functions - - -/* - * Returns true if the specified node in the graph is a subgraph node. A - * subgraph node is one that contains other nodes. - */ -function isSubgraph(g, v) { - return !!g.children(v).length; -} - -function edgeToId(e) { - return escapeId(e.v) + ':' + escapeId(e.w) + ':' + escapeId(e.name); -} - -var ID_DELIM = /:/g; -function escapeId(str) { - return str ? String(str).replace(ID_DELIM, '\\:') : ''; -} - -function applyStyle(dom, styleFn) { - if (styleFn) { - dom.attr('style', styleFn); - } -} - -function applyClass(dom, classFn, otherClasses) { - if (classFn) { - dom.attr('class', classFn).attr('class', otherClasses + ' ' + dom.attr('class')); - } -} - -function applyTransition(selection, g) { - var graph = g.graph(); - - if (lodash_es__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A(graph)) { - var transition = graph.transition; - if (lodash_es__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A(transition)) { - return transition(selection); - } - } - - return selection; -} - - -/***/ }), - -/***/ 21176: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - Zp: () => (/* reexport */ layout) -}); - -// UNUSED EXPORTS: acyclic, normalize, rank - -// EXTERNAL MODULE: ./node_modules/lodash-es/forEach.js -var forEach = __webpack_require__(8058); -// EXTERNAL MODULE: ./node_modules/lodash-es/uniqueId.js -var uniqueId = __webpack_require__(5664); -// EXTERNAL MODULE: ./node_modules/lodash-es/has.js + 1 modules -var has = __webpack_require__(48585); -// EXTERNAL MODULE: ./node_modules/lodash-es/constant.js -var constant = __webpack_require__(39142); -// EXTERNAL MODULE: ./node_modules/lodash-es/flatten.js -var flatten = __webpack_require__(34098); -// EXTERNAL MODULE: ./node_modules/lodash-es/map.js -var map = __webpack_require__(74722); -// EXTERNAL MODULE: ./node_modules/lodash-es/range.js + 2 modules -var range = __webpack_require__(91395); -// EXTERNAL MODULE: ./node_modules/dagre-d3-es/src/graphlib/index.js -var graphlib = __webpack_require__(697); -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/data/list.js -/* - * Simple doubly linked list implementation derived from Cormen, et al., - * "Introduction to Algorithms". - */ - - - -class List { - constructor() { - var sentinel = {}; - sentinel._next = sentinel._prev = sentinel; - this._sentinel = sentinel; - } - dequeue() { - var sentinel = this._sentinel; - var entry = sentinel._prev; - if (entry !== sentinel) { - unlink(entry); - return entry; - } - } - enqueue(entry) { - var sentinel = this._sentinel; - if (entry._prev && entry._next) { - unlink(entry); - } - entry._next = sentinel._next; - sentinel._next._prev = entry; - sentinel._next = entry; - entry._prev = sentinel; - } - toString() { - var strs = []; - var sentinel = this._sentinel; - var curr = sentinel._prev; - while (curr !== sentinel) { - strs.push(JSON.stringify(curr, filterOutLinks)); - curr = curr._prev; - } - return '[' + strs.join(', ') + ']'; - } -} - -function unlink(entry) { - entry._prev._next = entry._next; - entry._next._prev = entry._prev; - delete entry._next; - delete entry._prev; -} - -function filterOutLinks(k, v) { - if (k !== '_next' && k !== '_prev') { - return v; - } -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/greedy-fas.js - - - - -/* - * A greedy heuristic for finding a feedback arc set for a graph. A feedback - * arc set is a set of edges that can be removed to make a graph acyclic. - * The algorithm comes from: P. Eades, X. Lin, and W. F. Smyth, "A fast and - * effective heuristic for the feedback arc set problem." This implementation - * adjusts that from the paper to allow for weighted edges. - */ - - -var DEFAULT_WEIGHT_FN = constant/* default */.A(1); - -function greedyFAS(g, weightFn) { - if (g.nodeCount() <= 1) { - return []; - } - var state = buildState(g, weightFn || DEFAULT_WEIGHT_FN); - var results = doGreedyFAS(state.graph, state.buckets, state.zeroIdx); - - // Expand multi-edges - return flatten/* default */.A( - map/* default */.A(results, function (e) { - return g.outEdges(e.v, e.w); - }) - ); -} - -function doGreedyFAS(g, buckets, zeroIdx) { - var results = []; - var sources = buckets[buckets.length - 1]; - var sinks = buckets[0]; - - var entry; - while (g.nodeCount()) { - while ((entry = sinks.dequeue())) { - removeNode(g, buckets, zeroIdx, entry); - } - while ((entry = sources.dequeue())) { - removeNode(g, buckets, zeroIdx, entry); - } - if (g.nodeCount()) { - for (var i = buckets.length - 2; i > 0; --i) { - entry = buckets[i].dequeue(); - if (entry) { - results = results.concat(removeNode(g, buckets, zeroIdx, entry, true)); - break; - } - } - } - } - - return results; -} - -function removeNode(g, buckets, zeroIdx, entry, collectPredecessors) { - var results = collectPredecessors ? [] : undefined; - - forEach/* default */.A(g.inEdges(entry.v), function (edge) { - var weight = g.edge(edge); - var uEntry = g.node(edge.v); - - if (collectPredecessors) { - results.push({ v: edge.v, w: edge.w }); - } - - uEntry.out -= weight; - assignBucket(buckets, zeroIdx, uEntry); - }); - - forEach/* default */.A(g.outEdges(entry.v), function (edge) { - var weight = g.edge(edge); - var w = edge.w; - var wEntry = g.node(w); - wEntry['in'] -= weight; - assignBucket(buckets, zeroIdx, wEntry); - }); - - g.removeNode(entry.v); - - return results; -} - -function buildState(g, weightFn) { - var fasGraph = new graphlib/* Graph */.T(); - var maxIn = 0; - var maxOut = 0; - - forEach/* default */.A(g.nodes(), function (v) { - fasGraph.setNode(v, { v: v, in: 0, out: 0 }); - }); - - // Aggregate weights on nodes, but also sum the weights across multi-edges - // into a single edge for the fasGraph. - forEach/* default */.A(g.edges(), function (e) { - var prevWeight = fasGraph.edge(e.v, e.w) || 0; - var weight = weightFn(e); - var edgeWeight = prevWeight + weight; - fasGraph.setEdge(e.v, e.w, edgeWeight); - maxOut = Math.max(maxOut, (fasGraph.node(e.v).out += weight)); - maxIn = Math.max(maxIn, (fasGraph.node(e.w)['in'] += weight)); - }); - - var buckets = range/* default */.A(maxOut + maxIn + 3).map(function () { - return new List(); - }); - var zeroIdx = maxIn + 1; - - forEach/* default */.A(fasGraph.nodes(), function (v) { - assignBucket(buckets, zeroIdx, fasGraph.node(v)); - }); - - return { graph: fasGraph, buckets: buckets, zeroIdx: zeroIdx }; -} - -function assignBucket(buckets, zeroIdx, entry) { - if (!entry.out) { - buckets[0].enqueue(entry); - } else if (!entry['in']) { - buckets[buckets.length - 1].enqueue(entry); - } else { - buckets[entry.out - entry['in'] + zeroIdx].enqueue(entry); - } -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/acyclic.js - - - - - -function run(g) { - var fas = g.graph().acyclicer === 'greedy' ? greedyFAS(g, weightFn(g)) : dfsFAS(g); - forEach/* default */.A(fas, function (e) { - var label = g.edge(e); - g.removeEdge(e); - label.forwardName = e.name; - label.reversed = true; - g.setEdge(e.w, e.v, label, uniqueId/* default */.A('rev')); - }); - - function weightFn(g) { - return function (e) { - return g.edge(e).weight; - }; - } -} - -function dfsFAS(g) { - var fas = []; - var stack = {}; - var visited = {}; - - function dfs(v) { - if (has/* default */.A(visited, v)) { - return; - } - visited[v] = true; - stack[v] = true; - forEach/* default */.A(g.outEdges(v), function (e) { - if (has/* default */.A(stack, e.w)) { - fas.push(e); - } else { - dfs(e.w); - } - }); - delete stack[v]; - } - - forEach/* default */.A(g.nodes(), dfs); - return fas; -} - -function undo(g) { - forEach/* default */.A(g.edges(), function (e) { - var label = g.edge(e); - if (label.reversed) { - g.removeEdge(e); - - var forwardName = label.forwardName; - delete label.reversed; - delete label.forwardName; - g.setEdge(e.w, e.v, label, forwardName); - } - }); -} - -// EXTERNAL MODULE: ./node_modules/lodash-es/merge.js + 6 modules -var merge = __webpack_require__(98879); -// EXTERNAL MODULE: ./node_modules/lodash-es/pick.js + 4 modules -var pick = __webpack_require__(81942); -// EXTERNAL MODULE: ./node_modules/lodash-es/defaults.js -var defaults = __webpack_require__(23068); -// EXTERNAL MODULE: ./node_modules/lodash-es/isSymbol.js -var isSymbol = __webpack_require__(61882); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseExtremum.js - - -/** - * The base implementation of methods like `_.max` and `_.min` which accepts a - * `comparator` to determine the extremum value. - * - * @private - * @param {Array} array The array to iterate over. - * @param {Function} iteratee The iteratee invoked per iteration. - * @param {Function} comparator The comparator used to compare values. - * @returns {*} Returns the extremum value. - */ -function baseExtremum(array, iteratee, comparator) { - var index = -1, - length = array.length; - - while (++index < length) { - var value = array[index], - current = iteratee(value); - - if (current != null && (computed === undefined - ? (current === current && !(0,isSymbol/* default */.A)(current)) - : comparator(current, computed) - )) { - var computed = current, - result = value; - } - } - return result; -} - -/* harmony default export */ const _baseExtremum = (baseExtremum); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseGt.js -/** - * The base implementation of `_.gt` which doesn't coerce arguments. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if `value` is greater than `other`, - * else `false`. - */ -function baseGt(value, other) { - return value > other; -} - -/* harmony default export */ const _baseGt = (baseGt); - -// EXTERNAL MODULE: ./node_modules/lodash-es/identity.js -var identity = __webpack_require__(29008); -;// CONCATENATED MODULE: ./node_modules/lodash-es/max.js - - - - -/** - * Computes the maximum value of `array`. If `array` is empty or falsey, - * `undefined` is returned. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Math - * @param {Array} array The array to iterate over. - * @returns {*} Returns the maximum value. - * @example - * - * _.max([4, 2, 8, 6]); - * // => 8 - * - * _.max([]); - * // => undefined - */ -function max(array) { - return (array && array.length) - ? _baseExtremum(array, identity/* default */.A, _baseGt) - : undefined; -} - -/* harmony default export */ const lodash_es_max = (max); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/last.js -/** - * Gets the last element of `array`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to query. - * @returns {*} Returns the last element of `array`. - * @example - * - * _.last([1, 2, 3]); - * // => 3 - */ -function last(array) { - var length = array == null ? 0 : array.length; - return length ? array[length - 1] : undefined; -} - -/* harmony default export */ const lodash_es_last = (last); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseAssignValue.js -var _baseAssignValue = __webpack_require__(52528); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseForOwn.js -var _baseForOwn = __webpack_require__(79841); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseIteratee.js + 16 modules -var _baseIteratee = __webpack_require__(49574); -;// CONCATENATED MODULE: ./node_modules/lodash-es/mapValues.js - - - - -/** - * Creates an object with the same keys as `object` and values generated - * by running each own enumerable string keyed property of `object` thru - * `iteratee`. The iteratee is invoked with three arguments: - * (value, key, object). - * - * @static - * @memberOf _ - * @since 2.4.0 - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Object} Returns the new mapped object. - * @see _.mapKeys - * @example - * - * var users = { - * 'fred': { 'user': 'fred', 'age': 40 }, - * 'pebbles': { 'user': 'pebbles', 'age': 1 } - * }; - * - * _.mapValues(users, function(o) { return o.age; }); - * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) - * - * // The `_.property` iteratee shorthand. - * _.mapValues(users, 'age'); - * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) - */ -function mapValues(object, iteratee) { - var result = {}; - iteratee = (0,_baseIteratee/* default */.A)(iteratee, 3); - - (0,_baseForOwn/* default */.A)(object, function(value, key, object) { - (0,_baseAssignValue/* default */.A)(result, key, iteratee(value, key, object)); - }); - return result; -} - -/* harmony default export */ const lodash_es_mapValues = (mapValues); - -// EXTERNAL MODULE: ./node_modules/lodash-es/isUndefined.js -var isUndefined = __webpack_require__(69592); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseLt.js -/** - * The base implementation of `_.lt` which doesn't coerce arguments. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if `value` is less than `other`, - * else `false`. - */ -function baseLt(value, other) { - return value < other; -} - -/* harmony default export */ const _baseLt = (baseLt); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/min.js - - - - -/** - * Computes the minimum value of `array`. If `array` is empty or falsey, - * `undefined` is returned. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Math - * @param {Array} array The array to iterate over. - * @returns {*} Returns the minimum value. - * @example - * - * _.min([4, 2, 8, 6]); - * // => 2 - * - * _.min([]); - * // => undefined - */ -function min(array) { - return (array && array.length) - ? _baseExtremum(array, identity/* default */.A, _baseLt) - : undefined; -} - -/* harmony default export */ const lodash_es_min = (min); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_root.js -var _root = __webpack_require__(41917); -;// CONCATENATED MODULE: ./node_modules/lodash-es/now.js - - -/** - * Gets the timestamp of the number of milliseconds that have elapsed since - * the Unix epoch (1 January 1970 00:00:00 UTC). - * - * @static - * @memberOf _ - * @since 2.4.0 - * @category Date - * @returns {number} Returns the timestamp. - * @example - * - * _.defer(function(stamp) { - * console.log(_.now() - stamp); - * }, _.now()); - * // => Logs the number of milliseconds it took for the deferred invocation. - */ -var now = function() { - return _root/* default */.A.Date.now(); -}; - -/* harmony default export */ const lodash_es_now = (now); - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/util.js - - - - - -/* - * Adds a dummy node to the graph and return v. - */ -function addDummyNode(g, type, attrs, name) { - var v; - do { - v = uniqueId/* default */.A(name); - } while (g.hasNode(v)); - - attrs.dummy = type; - g.setNode(v, attrs); - return v; -} - -/* - * Returns a new graph with only simple edges. Handles aggregation of data - * associated with multi-edges. - */ -function simplify(g) { - var simplified = new graphlib/* Graph */.T().setGraph(g.graph()); - forEach/* default */.A(g.nodes(), function (v) { - simplified.setNode(v, g.node(v)); - }); - forEach/* default */.A(g.edges(), function (e) { - var simpleLabel = simplified.edge(e.v, e.w) || { weight: 0, minlen: 1 }; - var label = g.edge(e); - simplified.setEdge(e.v, e.w, { - weight: simpleLabel.weight + label.weight, - minlen: Math.max(simpleLabel.minlen, label.minlen), - }); - }); - return simplified; -} - -function asNonCompoundGraph(g) { - var simplified = new graphlib/* Graph */.T({ multigraph: g.isMultigraph() }).setGraph(g.graph()); - forEach/* default */.A(g.nodes(), function (v) { - if (!g.children(v).length) { - simplified.setNode(v, g.node(v)); - } - }); - forEach/* default */.A(g.edges(), function (e) { - simplified.setEdge(e, g.edge(e)); - }); - return simplified; -} - -function successorWeights(g) { - var weightMap = _.map(g.nodes(), function (v) { - var sucs = {}; - _.forEach(g.outEdges(v), function (e) { - sucs[e.w] = (sucs[e.w] || 0) + g.edge(e).weight; - }); - return sucs; - }); - return _.zipObject(g.nodes(), weightMap); -} - -function predecessorWeights(g) { - var weightMap = _.map(g.nodes(), function (v) { - var preds = {}; - _.forEach(g.inEdges(v), function (e) { - preds[e.v] = (preds[e.v] || 0) + g.edge(e).weight; - }); - return preds; - }); - return _.zipObject(g.nodes(), weightMap); -} - -/* - * Finds where a line starting at point ({x, y}) would intersect a rectangle - * ({x, y, width, height}) if it were pointing at the rectangle's center. - */ -function intersectRect(rect, point) { - var x = rect.x; - var y = rect.y; - - // Rectangle intersection algorithm from: - // http://math.stackexchange.com/questions/108113/find-edge-between-two-boxes - var dx = point.x - x; - var dy = point.y - y; - var w = rect.width / 2; - var h = rect.height / 2; - - if (!dx && !dy) { - throw new Error('Not possible to find intersection inside of the rectangle'); - } - - var sx, sy; - if (Math.abs(dy) * w > Math.abs(dx) * h) { - // Intersection is top or bottom of rect. - if (dy < 0) { - h = -h; - } - sx = (h * dx) / dy; - sy = h; - } else { - // Intersection is left or right of rect. - if (dx < 0) { - w = -w; - } - sx = w; - sy = (w * dy) / dx; - } - - return { x: x + sx, y: y + sy }; -} - -/* - * Given a DAG with each node assigned "rank" and "order" properties, this - * function will produce a matrix with the ids of each node. - */ -function buildLayerMatrix(g) { - var layering = map/* default */.A(range/* default */.A(util_maxRank(g) + 1), function () { - return []; - }); - forEach/* default */.A(g.nodes(), function (v) { - var node = g.node(v); - var rank = node.rank; - if (!isUndefined/* default */.A(rank)) { - layering[rank][node.order] = v; - } - }); - return layering; -} - -/* - * Adjusts the ranks for all nodes in the graph such that all nodes v have - * rank(v) >= 0 and at least one node w has rank(w) = 0. - */ -function normalizeRanks(g) { - var min = lodash_es_min( - map/* default */.A(g.nodes(), function (v) { - return g.node(v).rank; - }) - ); - forEach/* default */.A(g.nodes(), function (v) { - var node = g.node(v); - if (has/* default */.A(node, 'rank')) { - node.rank -= min; - } - }); -} - -function removeEmptyRanks(g) { - // Ranks may not start at 0, so we need to offset them - var offset = lodash_es_min( - map/* default */.A(g.nodes(), function (v) { - return g.node(v).rank; - }) - ); - - var layers = []; - forEach/* default */.A(g.nodes(), function (v) { - var rank = g.node(v).rank - offset; - if (!layers[rank]) { - layers[rank] = []; - } - layers[rank].push(v); - }); - - var delta = 0; - var nodeRankFactor = g.graph().nodeRankFactor; - forEach/* default */.A(layers, function (vs, i) { - if (isUndefined/* default */.A(vs) && i % nodeRankFactor !== 0) { - --delta; - } else if (delta) { - forEach/* default */.A(vs, function (v) { - g.node(v).rank += delta; - }); - } - }); -} - -function addBorderNode(g, prefix, rank, order) { - var node = { - width: 0, - height: 0, - }; - if (arguments.length >= 4) { - node.rank = rank; - node.order = order; - } - return addDummyNode(g, 'border', node, prefix); -} - -function util_maxRank(g) { - return lodash_es_max( - map/* default */.A(g.nodes(), function (v) { - var rank = g.node(v).rank; - if (!isUndefined/* default */.A(rank)) { - return rank; - } - }) - ); -} - -/* - * Partition a collection into two groups: `lhs` and `rhs`. If the supplied - * function returns true for an entry it goes into `lhs`. Otherwise it goes - * into `rhs. - */ -function partition(collection, fn) { - var result = { lhs: [], rhs: [] }; - forEach/* default */.A(collection, function (value) { - if (fn(value)) { - result.lhs.push(value); - } else { - result.rhs.push(value); - } - }); - return result; -} - -/* - * Returns a new function that wraps `fn` with a timer. The wrapper logs the - * time it takes to execute the function. - */ -function util_time(name, fn) { - var start = lodash_es_now(); - try { - return fn(); - } finally { - console.log(name + ' time: ' + (lodash_es_now() - start) + 'ms'); - } -} - -function notime(name, fn) { - return fn(); -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/add-border-segments.js - - - - - -function addBorderSegments(g) { - function dfs(v) { - var children = g.children(v); - var node = g.node(v); - if (children.length) { - forEach/* default */.A(children, dfs); - } - - if (has/* default */.A(node, 'minRank')) { - node.borderLeft = []; - node.borderRight = []; - for (var rank = node.minRank, maxRank = node.maxRank + 1; rank < maxRank; ++rank) { - add_border_segments_addBorderNode(g, 'borderLeft', '_bl', v, node, rank); - add_border_segments_addBorderNode(g, 'borderRight', '_br', v, node, rank); - } - } - } - - forEach/* default */.A(g.children(), dfs); -} - -function add_border_segments_addBorderNode(g, prop, prefix, sg, sgNode, rank) { - var label = { width: 0, height: 0, rank: rank, borderType: prop }; - var prev = sgNode[prop][rank - 1]; - var curr = addDummyNode(g, 'border', label, prefix); - sgNode[prop][rank] = curr; - g.setParent(curr, sg); - if (prev) { - g.setEdge(prev, curr, { weight: 1 }); - } -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/coordinate-system.js - - - - -function adjust(g) { - var rankDir = g.graph().rankdir.toLowerCase(); - if (rankDir === 'lr' || rankDir === 'rl') { - swapWidthHeight(g); - } -} - -function coordinate_system_undo(g) { - var rankDir = g.graph().rankdir.toLowerCase(); - if (rankDir === 'bt' || rankDir === 'rl') { - reverseY(g); - } - - if (rankDir === 'lr' || rankDir === 'rl') { - swapXY(g); - swapWidthHeight(g); - } -} - -function swapWidthHeight(g) { - forEach/* default */.A(g.nodes(), function (v) { - swapWidthHeightOne(g.node(v)); - }); - forEach/* default */.A(g.edges(), function (e) { - swapWidthHeightOne(g.edge(e)); - }); -} - -function swapWidthHeightOne(attrs) { - var w = attrs.width; - attrs.width = attrs.height; - attrs.height = w; -} - -function reverseY(g) { - forEach/* default */.A(g.nodes(), function (v) { - reverseYOne(g.node(v)); - }); - - forEach/* default */.A(g.edges(), function (e) { - var edge = g.edge(e); - forEach/* default */.A(edge.points, reverseYOne); - if (has/* default */.A(edge, 'y')) { - reverseYOne(edge); - } - }); -} - -function reverseYOne(attrs) { - attrs.y = -attrs.y; -} - -function swapXY(g) { - forEach/* default */.A(g.nodes(), function (v) { - swapXYOne(g.node(v)); - }); - - forEach/* default */.A(g.edges(), function (e) { - var edge = g.edge(e); - forEach/* default */.A(edge.points, swapXYOne); - if (has/* default */.A(edge, 'x')) { - swapXYOne(edge); - } - }); -} - -function swapXYOne(attrs) { - var x = attrs.x; - attrs.x = attrs.y; - attrs.y = x; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/normalize.js - - - - - -/* - * Breaks any long edges in the graph into short segments that span 1 layer - * each. This operation is undoable with the denormalize function. - * - * Pre-conditions: - * - * 1. The input graph is a DAG. - * 2. Each node in the graph has a "rank" property. - * - * Post-condition: - * - * 1. All edges in the graph have a length of 1. - * 2. Dummy nodes are added where edges have been split into segments. - * 3. The graph is augmented with a "dummyChains" attribute which contains - * the first dummy in each chain of dummy nodes produced. - */ -function normalize_run(g) { - g.graph().dummyChains = []; - forEach/* default */.A(g.edges(), function (edge) { - normalizeEdge(g, edge); - }); -} - -function normalizeEdge(g, e) { - var v = e.v; - var vRank = g.node(v).rank; - var w = e.w; - var wRank = g.node(w).rank; - var name = e.name; - var edgeLabel = g.edge(e); - var labelRank = edgeLabel.labelRank; - - if (wRank === vRank + 1) return; - - g.removeEdge(e); - - var dummy, attrs, i; - for (i = 0, ++vRank; vRank < wRank; ++i, ++vRank) { - edgeLabel.points = []; - attrs = { - width: 0, - height: 0, - edgeLabel: edgeLabel, - edgeObj: e, - rank: vRank, - }; - dummy = addDummyNode(g, 'edge', attrs, '_d'); - if (vRank === labelRank) { - attrs.width = edgeLabel.width; - attrs.height = edgeLabel.height; - // @ts-expect-error - attrs.dummy = 'edge-label'; - // @ts-expect-error - attrs.labelpos = edgeLabel.labelpos; - } - g.setEdge(v, dummy, { weight: edgeLabel.weight }, name); - if (i === 0) { - g.graph().dummyChains.push(dummy); - } - v = dummy; - } - - g.setEdge(v, w, { weight: edgeLabel.weight }, name); -} - -function normalize_undo(g) { - forEach/* default */.A(g.graph().dummyChains, function (v) { - var node = g.node(v); - var origLabel = node.edgeLabel; - var w; - g.setEdge(node.edgeObj, origLabel); - while (node.dummy) { - w = g.successors(v)[0]; - g.removeNode(v); - origLabel.points.push({ x: node.x, y: node.y }); - if (node.dummy === 'edge-label') { - origLabel.x = node.x; - origLabel.y = node.y; - origLabel.width = node.width; - origLabel.height = node.height; - } - v = w; - node = g.node(v); - } - }); -} - -;// CONCATENATED MODULE: ./node_modules/lodash-es/minBy.js - - - - -/** - * This method is like `_.min` except that it accepts `iteratee` which is - * invoked for each element in `array` to generate the criterion by which - * the value is ranked. The iteratee is invoked with one argument: (value). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Math - * @param {Array} array The array to iterate over. - * @param {Function} [iteratee=_.identity] The iteratee invoked per element. - * @returns {*} Returns the minimum value. - * @example - * - * var objects = [{ 'n': 1 }, { 'n': 2 }]; - * - * _.minBy(objects, function(o) { return o.n; }); - * // => { 'n': 1 } - * - * // The `_.property` iteratee shorthand. - * _.minBy(objects, 'n'); - * // => { 'n': 1 } - */ -function minBy(array, iteratee) { - return (array && array.length) - ? _baseExtremum(array, (0,_baseIteratee/* default */.A)(iteratee, 2), _baseLt) - : undefined; -} - -/* harmony default export */ const lodash_es_minBy = (minBy); - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/rank/util.js - - - - -/* - * Initializes ranks for the input graph using the longest path algorithm. This - * algorithm scales well and is fast in practice, it yields rather poor - * solutions. Nodes are pushed to the lowest layer possible, leaving the bottom - * ranks wide and leaving edges longer than necessary. However, due to its - * speed, this algorithm is good for getting an initial ranking that can be fed - * into other algorithms. - * - * This algorithm does not normalize layers because it will be used by other - * algorithms in most cases. If using this algorithm directly, be sure to - * run normalize at the end. - * - * Pre-conditions: - * - * 1. Input graph is a DAG. - * 2. Input graph node labels can be assigned properties. - * - * Post-conditions: - * - * 1. Each node will be assign an (unnormalized) "rank" property. - */ -function longestPath(g) { - var visited = {}; - - function dfs(v) { - var label = g.node(v); - if (has/* default */.A(visited, v)) { - return label.rank; - } - visited[v] = true; - - var rank = lodash_es_min( - map/* default */.A(g.outEdges(v), function (e) { - return dfs(e.w) - g.edge(e).minlen; - }) - ); - - if ( - rank === Number.POSITIVE_INFINITY || // return value of _.map([]) for Lodash 3 - rank === undefined || // return value of _.map([]) for Lodash 4 - rank === null - ) { - // return value of _.map([null]) - rank = 0; - } - - return (label.rank = rank); - } - - forEach/* default */.A(g.sources(), dfs); -} - -/* - * Returns the amount of slack for the given edge. The slack is defined as the - * difference between the length of the edge and its minimum length. - */ -function slack(g, e) { - return g.node(e.w).rank - g.node(e.v).rank - g.edge(e).minlen; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/rank/feasible-tree.js - - - - - - -/* - * Constructs a spanning tree with tight edges and adjusted the input node's - * ranks to achieve this. A tight edge is one that is has a length that matches - * its "minlen" attribute. - * - * The basic structure for this function is derived from Gansner, et al., "A - * Technique for Drawing Directed Graphs." - * - * Pre-conditions: - * - * 1. Graph must be a DAG. - * 2. Graph must be connected. - * 3. Graph must have at least one node. - * 5. Graph nodes must have been previously assigned a "rank" property that - * respects the "minlen" property of incident edges. - * 6. Graph edges must have a "minlen" property. - * - * Post-conditions: - * - * - Graph nodes will have their rank adjusted to ensure that all edges are - * tight. - * - * Returns a tree (undirected graph) that is constructed using only "tight" - * edges. - */ -function feasibleTree(g) { - var t = new graphlib/* Graph */.T({ directed: false }); - - // Choose arbitrary node from which to start our tree - var start = g.nodes()[0]; - var size = g.nodeCount(); - t.setNode(start, {}); - - var edge, delta; - while (tightTree(t, g) < size) { - edge = findMinSlackEdge(t, g); - delta = t.hasNode(edge.v) ? slack(g, edge) : -slack(g, edge); - shiftRanks(t, g, delta); - } - - return t; -} - -/* - * Finds a maximal tree of tight edges and returns the number of nodes in the - * tree. - */ -function tightTree(t, g) { - function dfs(v) { - forEach/* default */.A(g.nodeEdges(v), function (e) { - var edgeV = e.v, - w = v === edgeV ? e.w : edgeV; - if (!t.hasNode(w) && !slack(g, e)) { - t.setNode(w, {}); - t.setEdge(v, w, {}); - dfs(w); - } - }); - } - - forEach/* default */.A(t.nodes(), dfs); - return t.nodeCount(); -} - -/* - * Finds the edge with the smallest slack that is incident on tree and returns - * it. - */ -function findMinSlackEdge(t, g) { - return lodash_es_minBy(g.edges(), function (e) { - if (t.hasNode(e.v) !== t.hasNode(e.w)) { - return slack(g, e); - } - }); -} - -function shiftRanks(t, g, delta) { - forEach/* default */.A(t.nodes(), function (v) { - g.node(v).rank += delta; - }); -} - -// EXTERNAL MODULE: ./node_modules/lodash-es/isArrayLike.js -var isArrayLike = __webpack_require__(38446); -// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js -var keys = __webpack_require__(27422); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_createFind.js - - - - -/** - * Creates a `_.find` or `_.findLast` function. - * - * @private - * @param {Function} findIndexFunc The function to find the collection index. - * @returns {Function} Returns the new find function. - */ -function createFind(findIndexFunc) { - return function(collection, predicate, fromIndex) { - var iterable = Object(collection); - if (!(0,isArrayLike/* default */.A)(collection)) { - var iteratee = (0,_baseIteratee/* default */.A)(predicate, 3); - collection = (0,keys/* default */.A)(collection); - predicate = function(key) { return iteratee(iterable[key], key, iterable); }; - } - var index = findIndexFunc(collection, predicate, fromIndex); - return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined; - }; -} - -/* harmony default export */ const _createFind = (createFind); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFindIndex.js -var _baseFindIndex = __webpack_require__(25707); -// EXTERNAL MODULE: ./node_modules/lodash-es/toFinite.js + 3 modules -var toFinite = __webpack_require__(74342); -;// CONCATENATED MODULE: ./node_modules/lodash-es/toInteger.js - - -/** - * Converts `value` to an integer. - * - * **Note:** This method is loosely based on - * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {number} Returns the converted integer. - * @example - * - * _.toInteger(3.2); - * // => 3 - * - * _.toInteger(Number.MIN_VALUE); - * // => 0 - * - * _.toInteger(Infinity); - * // => 1.7976931348623157e+308 - * - * _.toInteger('3.2'); - * // => 3 - */ -function toInteger(value) { - var result = (0,toFinite/* default */.A)(value), - remainder = result % 1; - - return result === result ? (remainder ? result - remainder : result) : 0; -} - -/* harmony default export */ const lodash_es_toInteger = (toInteger); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/findIndex.js - - - - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max; - -/** - * This method is like `_.find` except that it returns the index of the first - * element `predicate` returns truthy for instead of the element itself. - * - * @static - * @memberOf _ - * @since 1.1.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @param {number} [fromIndex=0] The index to search from. - * @returns {number} Returns the index of the found element, else `-1`. - * @example - * - * var users = [ - * { 'user': 'barney', 'active': false }, - * { 'user': 'fred', 'active': false }, - * { 'user': 'pebbles', 'active': true } - * ]; - * - * _.findIndex(users, function(o) { return o.user == 'barney'; }); - * // => 0 - * - * // The `_.matches` iteratee shorthand. - * _.findIndex(users, { 'user': 'fred', 'active': false }); - * // => 1 - * - * // The `_.matchesProperty` iteratee shorthand. - * _.findIndex(users, ['active', false]); - * // => 0 - * - * // The `_.property` iteratee shorthand. - * _.findIndex(users, 'active'); - * // => 2 - */ -function findIndex(array, predicate, fromIndex) { - var length = array == null ? 0 : array.length; - if (!length) { - return -1; - } - var index = fromIndex == null ? 0 : lodash_es_toInteger(fromIndex); - if (index < 0) { - index = nativeMax(length + index, 0); - } - return (0,_baseFindIndex/* default */.A)(array, (0,_baseIteratee/* default */.A)(predicate, 3), index); -} - -/* harmony default export */ const lodash_es_findIndex = (findIndex); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/find.js - - - -/** - * Iterates over elements of `collection`, returning the first element - * `predicate` returns truthy for. The predicate is invoked with three - * arguments: (value, index|key, collection). - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to inspect. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @param {number} [fromIndex=0] The index to search from. - * @returns {*} Returns the matched element, else `undefined`. - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': true }, - * { 'user': 'fred', 'age': 40, 'active': false }, - * { 'user': 'pebbles', 'age': 1, 'active': true } - * ]; - * - * _.find(users, function(o) { return o.age < 40; }); - * // => object for 'barney' - * - * // The `_.matches` iteratee shorthand. - * _.find(users, { 'age': 1, 'active': true }); - * // => object for 'pebbles' - * - * // The `_.matchesProperty` iteratee shorthand. - * _.find(users, ['active', false]); - * // => object for 'fred' - * - * // The `_.property` iteratee shorthand. - * _.find(users, 'active'); - * // => object for 'barney' - */ -var find = _createFind(lodash_es_findIndex); - -/* harmony default export */ const lodash_es_find = (find); - -// EXTERNAL MODULE: ./node_modules/lodash-es/filter.js + 1 modules -var filter = __webpack_require__(11662); -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/dijkstra.js - - - - - -var DEFAULT_WEIGHT_FUNC = constant/* default */.A(1); - -function dijkstra_dijkstra(g, source, weightFn, edgeFn) { - return runDijkstra( - g, - String(source), - weightFn || DEFAULT_WEIGHT_FUNC, - edgeFn || - function (v) { - return g.outEdges(v); - } - ); -} - -function runDijkstra(g, source, weightFn, edgeFn) { - var results = {}; - var pq = new PriorityQueue(); - var v, vEntry; - - var updateNeighbors = function (edge) { - var w = edge.v !== v ? edge.v : edge.w; - var wEntry = results[w]; - var weight = weightFn(edge); - var distance = vEntry.distance + weight; - - if (weight < 0) { - throw new Error( - 'dijkstra does not allow negative edge weights. ' + - 'Bad edge: ' + - edge + - ' Weight: ' + - weight - ); - } - - if (distance < wEntry.distance) { - wEntry.distance = distance; - wEntry.predecessor = v; - pq.decrease(w, distance); - } - }; - - g.nodes().forEach(function (v) { - var distance = v === source ? 0 : Number.POSITIVE_INFINITY; - results[v] = { distance: distance }; - pq.add(v, distance); - }); - - while (pq.size() > 0) { - v = pq.removeMin(); - vEntry = results[v]; - if (vEntry.distance === Number.POSITIVE_INFINITY) { - break; - } - - edgeFn(v).forEach(updateNeighbors); - } - - return results; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/dijkstra-all.js - - - - - -function dijkstraAll(g, weightFunc, edgeFunc) { - return _.transform( - g.nodes(), - function (acc, v) { - acc[v] = dijkstra(g, v, weightFunc, edgeFunc); - }, - {} - ); -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/floyd-warshall.js - - - - -var floyd_warshall_DEFAULT_WEIGHT_FUNC = constant/* default */.A(1); - -function floydWarshall(g, weightFn, edgeFn) { - return runFloydWarshall( - g, - weightFn || floyd_warshall_DEFAULT_WEIGHT_FUNC, - edgeFn || - function (v) { - return g.outEdges(v); - } - ); -} - -function runFloydWarshall(g, weightFn, edgeFn) { - var results = {}; - var nodes = g.nodes(); - - nodes.forEach(function (v) { - results[v] = {}; - results[v][v] = { distance: 0 }; - nodes.forEach(function (w) { - if (v !== w) { - results[v][w] = { distance: Number.POSITIVE_INFINITY }; - } - }); - edgeFn(v).forEach(function (edge) { - var w = edge.v === v ? edge.w : edge.v; - var d = weightFn(edge); - results[v][w] = { distance: d, predecessor: v }; - }); - }); - - nodes.forEach(function (k) { - var rowK = results[k]; - nodes.forEach(function (i) { - var rowI = results[i]; - nodes.forEach(function (j) { - var ik = rowI[k]; - var kj = rowK[j]; - var ij = rowI[j]; - var altDistance = ik.distance + kj.distance; - if (altDistance < ij.distance) { - ij.distance = altDistance; - ij.predecessor = kj.predecessor; - } - }); - }); - }); - - return results; -} - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseKeys.js + 1 modules -var _baseKeys = __webpack_require__(69471); -// EXTERNAL MODULE: ./node_modules/lodash-es/_getTag.js + 3 modules -var _getTag = __webpack_require__(9779); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGetTag.js + 2 modules -var _baseGetTag = __webpack_require__(88496); -// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js -var isArray = __webpack_require__(92049); -// EXTERNAL MODULE: ./node_modules/lodash-es/isObjectLike.js -var isObjectLike = __webpack_require__(53098); -;// CONCATENATED MODULE: ./node_modules/lodash-es/isString.js - - - - -/** `Object#toString` result references. */ -var stringTag = '[object String]'; - -/** - * Checks if `value` is classified as a `String` primitive or object. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a string, else `false`. - * @example - * - * _.isString('abc'); - * // => true - * - * _.isString(1); - * // => false - */ -function isString(value) { - return typeof value == 'string' || - (!(0,isArray/* default */.A)(value) && (0,isObjectLike/* default */.A)(value) && (0,_baseGetTag/* default */.A)(value) == stringTag); -} - -/* harmony default export */ const lodash_es_isString = (isString); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseProperty.js -var _baseProperty = __webpack_require__(70805); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_asciiSize.js - - -/** - * Gets the size of an ASCII `string`. - * - * @private - * @param {string} string The string inspect. - * @returns {number} Returns the string size. - */ -var asciiSize = (0,_baseProperty/* default */.A)('length'); - -/* harmony default export */ const _asciiSize = (asciiSize); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_hasUnicode.js -/** Used to compose unicode character classes. */ -var rsAstralRange = '\\ud800-\\udfff', - rsComboMarksRange = '\\u0300-\\u036f', - reComboHalfMarksRange = '\\ufe20-\\ufe2f', - rsComboSymbolsRange = '\\u20d0-\\u20ff', - rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, - rsVarRange = '\\ufe0e\\ufe0f'; - -/** Used to compose unicode capture groups. */ -var rsZWJ = '\\u200d'; - -/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ -var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']'); - -/** - * Checks if `string` contains Unicode symbols. - * - * @private - * @param {string} string The string to inspect. - * @returns {boolean} Returns `true` if a symbol is found, else `false`. - */ -function hasUnicode(string) { - return reHasUnicode.test(string); -} - -/* harmony default export */ const _hasUnicode = (hasUnicode); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_unicodeSize.js -/** Used to compose unicode character classes. */ -var _unicodeSize_rsAstralRange = '\\ud800-\\udfff', - _unicodeSize_rsComboMarksRange = '\\u0300-\\u036f', - _unicodeSize_reComboHalfMarksRange = '\\ufe20-\\ufe2f', - _unicodeSize_rsComboSymbolsRange = '\\u20d0-\\u20ff', - _unicodeSize_rsComboRange = _unicodeSize_rsComboMarksRange + _unicodeSize_reComboHalfMarksRange + _unicodeSize_rsComboSymbolsRange, - _unicodeSize_rsVarRange = '\\ufe0e\\ufe0f'; - -/** Used to compose unicode capture groups. */ -var rsAstral = '[' + _unicodeSize_rsAstralRange + ']', - rsCombo = '[' + _unicodeSize_rsComboRange + ']', - rsFitz = '\\ud83c[\\udffb-\\udfff]', - rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', - rsNonAstral = '[^' + _unicodeSize_rsAstralRange + ']', - rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', - rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', - _unicodeSize_rsZWJ = '\\u200d'; - -/** Used to compose unicode regexes. */ -var reOptMod = rsModifier + '?', - rsOptVar = '[' + _unicodeSize_rsVarRange + ']?', - rsOptJoin = '(?:' + _unicodeSize_rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', - rsSeq = rsOptVar + reOptMod + rsOptJoin, - rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; - -/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ -var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); - -/** - * Gets the size of a Unicode `string`. - * - * @private - * @param {string} string The string inspect. - * @returns {number} Returns the string size. - */ -function unicodeSize(string) { - var result = reUnicode.lastIndex = 0; - while (reUnicode.test(string)) { - ++result; - } - return result; -} - -/* harmony default export */ const _unicodeSize = (unicodeSize); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_stringSize.js - - - - -/** - * Gets the number of symbols in `string`. - * - * @private - * @param {string} string The string to inspect. - * @returns {number} Returns the string size. - */ -function stringSize(string) { - return _hasUnicode(string) - ? _unicodeSize(string) - : _asciiSize(string); -} - -/* harmony default export */ const _stringSize = (stringSize); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/size.js - - - - - - -/** `Object#toString` result references. */ -var mapTag = '[object Map]', - setTag = '[object Set]'; - -/** - * Gets the size of `collection` by returning its length for array-like - * values or the number of own enumerable string keyed properties for objects. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object|string} collection The collection to inspect. - * @returns {number} Returns the collection size. - * @example - * - * _.size([1, 2, 3]); - * // => 3 - * - * _.size({ 'a': 1, 'b': 2 }); - * // => 2 - * - * _.size('pebbles'); - * // => 7 - */ -function size(collection) { - if (collection == null) { - return 0; - } - if ((0,isArrayLike/* default */.A)(collection)) { - return lodash_es_isString(collection) ? _stringSize(collection) : collection.length; - } - var tag = (0,_getTag/* default */.A)(collection); - if (tag == mapTag || tag == setTag) { - return collection.size; - } - return (0,_baseKeys/* default */.A)(collection).length; -} - -/* harmony default export */ const lodash_es_size = (size); - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/topsort.js - - - - -topsort_topsort.CycleException = topsort_CycleException; - -function topsort_topsort(g) { - var visited = {}; - var stack = {}; - var results = []; - - function visit(node) { - if (has/* default */.A(stack, node)) { - throw new topsort_CycleException(); - } - - if (!has/* default */.A(visited, node)) { - stack[node] = true; - visited[node] = true; - forEach/* default */.A(g.predecessors(node), visit); - delete stack[node]; - results.push(node); - } - } - - forEach/* default */.A(g.sinks(), visit); - - if (lodash_es_size(visited) !== g.nodeCount()) { - throw new topsort_CycleException(); - } - - return results; -} - -function topsort_CycleException() {} -topsort_CycleException.prototype = new Error(); // must be an instance of Error to pass testing - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/is-acyclic.js - - - - -function isAcyclic(g) { - try { - topsort(g); - } catch (e) { - if (e instanceof CycleException) { - return false; - } - throw e; - } - return true; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/dfs.js - - - - -/* - * A helper that preforms a pre- or post-order traversal on the input graph - * and returns the nodes in the order they were visited. If the graph is - * undirected then this algorithm will navigate using neighbors. If the graph - * is directed then this algorithm will navigate using successors. - * - * Order must be one of "pre" or "post". - */ -function dfs(g, vs, order) { - if (!isArray/* default */.A(vs)) { - vs = [vs]; - } - - var navigation = (g.isDirected() ? g.successors : g.neighbors).bind(g); - - var acc = []; - var visited = {}; - forEach/* default */.A(vs, function (v) { - if (!g.hasNode(v)) { - throw new Error('Graph does not have node: ' + v); - } - - doDfs(g, v, order === 'post', visited, navigation, acc); - }); - return acc; -} - -function doDfs(g, v, postorder, visited, navigation, acc) { - if (!has/* default */.A(visited, v)) { - visited[v] = true; - - if (!postorder) { - acc.push(v); - } - forEach/* default */.A(navigation(v), function (w) { - doDfs(g, w, postorder, visited, navigation, acc); - }); - if (postorder) { - acc.push(v); - } - } -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/postorder.js - - - - -function postorder(g, vs) { - return dfs(g, vs, 'post'); -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/preorder.js - - - - -function preorder(g, vs) { - return dfs(g, vs, 'pre'); -} - -// EXTERNAL MODULE: ./node_modules/dagre-d3-es/src/graphlib/graph.js + 9 modules -var graph = __webpack_require__(73046); -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/prim.js - - - - - - -function prim(g, weightFunc) { - var result = new Graph(); - var parents = {}; - var pq = new PriorityQueue(); - var v; - - function updateNeighbors(edge) { - var w = edge.v === v ? edge.w : edge.v; - var pri = pq.priority(w); - if (pri !== undefined) { - var edgeWeight = weightFunc(edge); - if (edgeWeight < pri) { - parents[w] = v; - pq.decrease(w, edgeWeight); - } - } - } - - if (g.nodeCount() === 0) { - return result; - } - - _.each(g.nodes(), function (v) { - pq.add(v, Number.POSITIVE_INFINITY); - result.setNode(v); - }); - - // Start from an arbitrary node - pq.decrease(g.nodes()[0], 0); - - var init = false; - while (pq.size() > 0) { - v = pq.removeMin(); - if (_.has(parents, v)) { - result.setEdge(v, parents[v]); - } else if (init) { - throw new Error('Input graph is not connected: ' + g); - } else { - init = true; - } - - g.nodeEdges(v).forEach(updateNeighbors); - } - - return result; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/index.js - - - - - - - - - - - - - - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/rank/network-simplex.js - - - - - - - - -// Expose some internals for testing purposes -networkSimplex.initLowLimValues = initLowLimValues; -networkSimplex.initCutValues = initCutValues; -networkSimplex.calcCutValue = calcCutValue; -networkSimplex.leaveEdge = leaveEdge; -networkSimplex.enterEdge = enterEdge; -networkSimplex.exchangeEdges = exchangeEdges; - -/* - * The network simplex algorithm assigns ranks to each node in the input graph - * and iteratively improves the ranking to reduce the length of edges. - * - * Preconditions: - * - * 1. The input graph must be a DAG. - * 2. All nodes in the graph must have an object value. - * 3. All edges in the graph must have "minlen" and "weight" attributes. - * - * Postconditions: - * - * 1. All nodes in the graph will have an assigned "rank" attribute that has - * been optimized by the network simplex algorithm. Ranks start at 0. - * - * - * A rough sketch of the algorithm is as follows: - * - * 1. Assign initial ranks to each node. We use the longest path algorithm, - * which assigns ranks to the lowest position possible. In general this - * leads to very wide bottom ranks and unnecessarily long edges. - * 2. Construct a feasible tight tree. A tight tree is one such that all - * edges in the tree have no slack (difference between length of edge - * and minlen for the edge). This by itself greatly improves the assigned - * rankings by shorting edges. - * 3. Iteratively find edges that have negative cut values. Generally a - * negative cut value indicates that the edge could be removed and a new - * tree edge could be added to produce a more compact graph. - * - * Much of the algorithms here are derived from Gansner, et al., "A Technique - * for Drawing Directed Graphs." The structure of the file roughly follows the - * structure of the overall algorithm. - */ -function networkSimplex(g) { - g = simplify(g); - longestPath(g); - var t = feasibleTree(g); - initLowLimValues(t); - initCutValues(t, g); - - var e, f; - while ((e = leaveEdge(t))) { - f = enterEdge(t, g, e); - exchangeEdges(t, g, e, f); - } -} - -/* - * Initializes cut values for all edges in the tree. - */ -function initCutValues(t, g) { - var vs = postorder(t, t.nodes()); - vs = vs.slice(0, vs.length - 1); - forEach/* default */.A(vs, function (v) { - assignCutValue(t, g, v); - }); -} - -function assignCutValue(t, g, child) { - var childLab = t.node(child); - var parent = childLab.parent; - t.edge(child, parent).cutvalue = calcCutValue(t, g, child); -} - -/* - * Given the tight tree, its graph, and a child in the graph calculate and - * return the cut value for the edge between the child and its parent. - */ -function calcCutValue(t, g, child) { - var childLab = t.node(child); - var parent = childLab.parent; - // True if the child is on the tail end of the edge in the directed graph - var childIsTail = true; - // The graph's view of the tree edge we're inspecting - var graphEdge = g.edge(child, parent); - // The accumulated cut value for the edge between this node and its parent - var cutValue = 0; - - if (!graphEdge) { - childIsTail = false; - graphEdge = g.edge(parent, child); - } - - cutValue = graphEdge.weight; - - forEach/* default */.A(g.nodeEdges(child), function (e) { - var isOutEdge = e.v === child, - other = isOutEdge ? e.w : e.v; - - if (other !== parent) { - var pointsToHead = isOutEdge === childIsTail, - otherWeight = g.edge(e).weight; - - cutValue += pointsToHead ? otherWeight : -otherWeight; - if (isTreeEdge(t, child, other)) { - var otherCutValue = t.edge(child, other).cutvalue; - cutValue += pointsToHead ? -otherCutValue : otherCutValue; - } - } - }); - - return cutValue; -} - -function initLowLimValues(tree, root) { - if (arguments.length < 2) { - root = tree.nodes()[0]; - } - dfsAssignLowLim(tree, {}, 1, root); -} - -function dfsAssignLowLim(tree, visited, nextLim, v, parent) { - var low = nextLim; - var label = tree.node(v); - - visited[v] = true; - forEach/* default */.A(tree.neighbors(v), function (w) { - if (!has/* default */.A(visited, w)) { - nextLim = dfsAssignLowLim(tree, visited, nextLim, w, v); - } - }); - - label.low = low; - label.lim = nextLim++; - if (parent) { - label.parent = parent; - } else { - // TODO should be able to remove this when we incrementally update low lim - delete label.parent; - } - - return nextLim; -} - -function leaveEdge(tree) { - return lodash_es_find(tree.edges(), function (e) { - return tree.edge(e).cutvalue < 0; - }); -} - -function enterEdge(t, g, edge) { - var v = edge.v; - var w = edge.w; - - // For the rest of this function we assume that v is the tail and w is the - // head, so if we don't have this edge in the graph we should flip it to - // match the correct orientation. - if (!g.hasEdge(v, w)) { - v = edge.w; - w = edge.v; - } - - var vLabel = t.node(v); - var wLabel = t.node(w); - var tailLabel = vLabel; - var flip = false; - - // If the root is in the tail of the edge then we need to flip the logic that - // checks for the head and tail nodes in the candidates function below. - if (vLabel.lim > wLabel.lim) { - tailLabel = wLabel; - flip = true; - } - - var candidates = filter/* default */.A(g.edges(), function (edge) { - return ( - flip === isDescendant(t, t.node(edge.v), tailLabel) && - flip !== isDescendant(t, t.node(edge.w), tailLabel) - ); - }); - - return lodash_es_minBy(candidates, function (edge) { - return slack(g, edge); - }); -} - -function exchangeEdges(t, g, e, f) { - var v = e.v; - var w = e.w; - t.removeEdge(v, w); - t.setEdge(f.v, f.w, {}); - initLowLimValues(t); - initCutValues(t, g); - updateRanks(t, g); -} - -function updateRanks(t, g) { - var root = lodash_es_find(t.nodes(), function (v) { - return !g.node(v).parent; - }); - var vs = preorder(t, root); - vs = vs.slice(1); - forEach/* default */.A(vs, function (v) { - var parent = t.node(v).parent, - edge = g.edge(v, parent), - flipped = false; - - if (!edge) { - edge = g.edge(parent, v); - flipped = true; - } - - g.node(v).rank = g.node(parent).rank + (flipped ? edge.minlen : -edge.minlen); - }); -} - -/* - * Returns true if the edge is in the tree. - */ -function isTreeEdge(tree, u, v) { - return tree.hasEdge(u, v); -} - -/* - * Returns true if the specified node is descendant of the root node per the - * assigned low and lim attributes in the tree. - */ -function isDescendant(tree, vLabel, rootLabel) { - return rootLabel.low <= vLabel.lim && vLabel.lim <= rootLabel.lim; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/rank/index.js - - - - - - -/* - * Assigns a rank to each node in the input graph that respects the "minlen" - * constraint specified on edges between nodes. - * - * This basic structure is derived from Gansner, et al., "A Technique for - * Drawing Directed Graphs." - * - * Pre-conditions: - * - * 1. Graph must be a connected DAG - * 2. Graph nodes must be objects - * 3. Graph edges must have "weight" and "minlen" attributes - * - * Post-conditions: - * - * 1. Graph nodes will have a "rank" attribute based on the results of the - * algorithm. Ranks can start at any index (including negative), we'll - * fix them up later. - */ -function rank(g) { - switch (g.graph().ranker) { - case 'network-simplex': - networkSimplexRanker(g); - break; - case 'tight-tree': - tightTreeRanker(g); - break; - case 'longest-path': - longestPathRanker(g); - break; - default: - networkSimplexRanker(g); - } -} - -// A fast and simple ranker, but results are far from optimal. -var longestPathRanker = longestPath; - -function tightTreeRanker(g) { - longestPath(g); - feasibleTree(g); -} - -function networkSimplexRanker(g) { - networkSimplex(g); -} - -// EXTERNAL MODULE: ./node_modules/lodash-es/values.js + 1 modules -var values = __webpack_require__(38207); -// EXTERNAL MODULE: ./node_modules/lodash-es/reduce.js + 2 modules -var reduce = __webpack_require__(89463); -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/nesting-graph.js - - - - - -/* - * A nesting graph creates dummy nodes for the tops and bottoms of subgraphs, - * adds appropriate edges to ensure that all cluster nodes are placed between - * these boundries, and ensures that the graph is connected. - * - * In addition we ensure, through the use of the minlen property, that nodes - * and subgraph border nodes to not end up on the same rank. - * - * Preconditions: - * - * 1. Input graph is a DAG - * 2. Nodes in the input graph has a minlen attribute - * - * Postconditions: - * - * 1. Input graph is connected. - * 2. Dummy nodes are added for the tops and bottoms of subgraphs. - * 3. The minlen attribute for nodes is adjusted to ensure nodes do not - * get placed on the same rank as subgraph border nodes. - * - * The nesting graph idea comes from Sander, "Layout of Compound Directed - * Graphs." - */ -function nesting_graph_run(g) { - var root = addDummyNode(g, 'root', {}, '_root'); - var depths = treeDepths(g); - var height = lodash_es_max(values/* default */.A(depths)) - 1; // Note: depths is an Object not an array - var nodeSep = 2 * height + 1; - - g.graph().nestingRoot = root; - - // Multiply minlen by nodeSep to align nodes on non-border ranks. - forEach/* default */.A(g.edges(), function (e) { - g.edge(e).minlen *= nodeSep; - }); - - // Calculate a weight that is sufficient to keep subgraphs vertically compact - var weight = sumWeights(g) + 1; - - // Create border nodes and link them up - forEach/* default */.A(g.children(), function (child) { - nesting_graph_dfs(g, root, nodeSep, weight, height, depths, child); - }); - - // Save the multiplier for node layers for later removal of empty border - // layers. - g.graph().nodeRankFactor = nodeSep; -} - -function nesting_graph_dfs(g, root, nodeSep, weight, height, depths, v) { - var children = g.children(v); - if (!children.length) { - if (v !== root) { - g.setEdge(root, v, { weight: 0, minlen: nodeSep }); - } - return; - } - - var top = addBorderNode(g, '_bt'); - var bottom = addBorderNode(g, '_bb'); - var label = g.node(v); - - g.setParent(top, v); - label.borderTop = top; - g.setParent(bottom, v); - label.borderBottom = bottom; - - forEach/* default */.A(children, function (child) { - nesting_graph_dfs(g, root, nodeSep, weight, height, depths, child); - - var childNode = g.node(child); - var childTop = childNode.borderTop ? childNode.borderTop : child; - var childBottom = childNode.borderBottom ? childNode.borderBottom : child; - var thisWeight = childNode.borderTop ? weight : 2 * weight; - var minlen = childTop !== childBottom ? 1 : height - depths[v] + 1; - - g.setEdge(top, childTop, { - weight: thisWeight, - minlen: minlen, - nestingEdge: true, - }); - - g.setEdge(childBottom, bottom, { - weight: thisWeight, - minlen: minlen, - nestingEdge: true, - }); - }); - - if (!g.parent(v)) { - g.setEdge(root, top, { weight: 0, minlen: height + depths[v] }); - } -} - -function treeDepths(g) { - var depths = {}; - function dfs(v, depth) { - var children = g.children(v); - if (children && children.length) { - forEach/* default */.A(children, function (child) { - dfs(child, depth + 1); - }); - } - depths[v] = depth; - } - forEach/* default */.A(g.children(), function (v) { - dfs(v, 1); - }); - return depths; -} - -function sumWeights(g) { - return reduce/* default */.A( - g.edges(), - function (acc, e) { - return acc + g.edge(e).weight; - }, - 0 - ); -} - -function cleanup(g) { - var graphLabel = g.graph(); - g.removeNode(graphLabel.nestingRoot); - delete graphLabel.nestingRoot; - forEach/* default */.A(g.edges(), function (e) { - var edge = g.edge(e); - if (edge.nestingEdge) { - g.removeEdge(e); - } - }); -} - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseClone.js + 15 modules -var _baseClone = __webpack_require__(91641); -;// CONCATENATED MODULE: ./node_modules/lodash-es/cloneDeep.js - - -/** Used to compose bitmasks for cloning. */ -var CLONE_DEEP_FLAG = 1, - CLONE_SYMBOLS_FLAG = 4; - -/** - * This method is like `_.clone` except that it recursively clones `value`. - * - * @static - * @memberOf _ - * @since 1.0.0 - * @category Lang - * @param {*} value The value to recursively clone. - * @returns {*} Returns the deep cloned value. - * @see _.clone - * @example - * - * var objects = [{ 'a': 1 }, { 'b': 2 }]; - * - * var deep = _.cloneDeep(objects); - * console.log(deep[0] === objects[0]); - * // => false - */ -function cloneDeep(value) { - return (0,_baseClone/* default */.A)(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); -} - -/* harmony default export */ const lodash_es_cloneDeep = (cloneDeep); - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/add-subgraph-constraints.js - - - - -function addSubgraphConstraints(g, cg, vs) { - var prev = {}, - rootPrev; - - forEach/* default */.A(vs, function (v) { - var child = g.parent(v), - parent, - prevChild; - while (child) { - parent = g.parent(child); - if (parent) { - prevChild = prev[parent]; - prev[parent] = child; - } else { - prevChild = rootPrev; - rootPrev = child; - } - if (prevChild && prevChild !== child) { - cg.setEdge(prevChild, child); - return; - } - child = parent; - } - }); - - /* - function dfs(v) { - var children = v ? g.children(v) : g.children(); - if (children.length) { - var min = Number.POSITIVE_INFINITY, - subgraphs = []; - _.each(children, function(child) { - var childMin = dfs(child); - if (g.children(child).length) { - subgraphs.push({ v: child, order: childMin }); - } - min = Math.min(min, childMin); - }); - _.reduce(_.sortBy(subgraphs, "order"), function(prev, curr) { - cg.setEdge(prev.v, curr.v); - return curr; - }); - return min; - } - return g.node(v).order; - } - dfs(undefined); - */ -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/build-layer-graph.js - - - - - -/* - * Constructs a graph that can be used to sort a layer of nodes. The graph will - * contain all base and subgraph nodes from the request layer in their original - * hierarchy and any edges that are incident on these nodes and are of the type - * requested by the "relationship" parameter. - * - * Nodes from the requested rank that do not have parents are assigned a root - * node in the output graph, which is set in the root graph attribute. This - * makes it easy to walk the hierarchy of movable nodes during ordering. - * - * Pre-conditions: - * - * 1. Input graph is a DAG - * 2. Base nodes in the input graph have a rank attribute - * 3. Subgraph nodes in the input graph has minRank and maxRank attributes - * 4. Edges have an assigned weight - * - * Post-conditions: - * - * 1. Output graph has all nodes in the movable rank with preserved - * hierarchy. - * 2. Root nodes in the movable layer are made children of the node - * indicated by the root attribute of the graph. - * 3. Non-movable nodes incident on movable nodes, selected by the - * relationship parameter, are included in the graph (without hierarchy). - * 4. Edges incident on movable nodes, selected by the relationship - * parameter, are added to the output graph. - * 5. The weights for copied edges are aggregated as need, since the output - * graph is not a multi-graph. - */ -function buildLayerGraph(g, rank, relationship) { - var root = createRootNode(g), - result = new graphlib/* Graph */.T({ compound: true }) - .setGraph({ root: root }) - .setDefaultNodeLabel(function (v) { - return g.node(v); - }); - - forEach/* default */.A(g.nodes(), function (v) { - var node = g.node(v), - parent = g.parent(v); - - if (node.rank === rank || (node.minRank <= rank && rank <= node.maxRank)) { - result.setNode(v); - result.setParent(v, parent || root); - - // This assumes we have only short edges! - forEach/* default */.A(g[relationship](v), function (e) { - var u = e.v === v ? e.w : e.v, - edge = result.edge(u, v), - weight = !isUndefined/* default */.A(edge) ? edge.weight : 0; - result.setEdge(u, v, { weight: g.edge(e).weight + weight }); - }); - - if (has/* default */.A(node, 'minRank')) { - result.setNode(v, { - borderLeft: node.borderLeft[rank], - borderRight: node.borderRight[rank], - }); - } - } - }); - - return result; -} - -function createRootNode(g) { - var v; - while (g.hasNode((v = uniqueId/* default */.A('_root')))); - return v; -} - -// EXTERNAL MODULE: ./node_modules/lodash-es/_assignValue.js -var _assignValue = __webpack_require__(52851); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseZipObject.js -/** - * This base implementation of `_.zipObject` which assigns values using `assignFunc`. - * - * @private - * @param {Array} props The property identifiers. - * @param {Array} values The property values. - * @param {Function} assignFunc The function to assign values. - * @returns {Object} Returns the new object. - */ -function baseZipObject(props, values, assignFunc) { - var index = -1, - length = props.length, - valsLength = values.length, - result = {}; - - while (++index < length) { - var value = index < valsLength ? values[index] : undefined; - assignFunc(result, props[index], value); - } - return result; -} - -/* harmony default export */ const _baseZipObject = (baseZipObject); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/zipObject.js - - - -/** - * This method is like `_.fromPairs` except that it accepts two arrays, - * one of property identifiers and one of corresponding values. - * - * @static - * @memberOf _ - * @since 0.4.0 - * @category Array - * @param {Array} [props=[]] The property identifiers. - * @param {Array} [values=[]] The property values. - * @returns {Object} Returns the new object. - * @example - * - * _.zipObject(['a', 'b'], [1, 2]); - * // => { 'a': 1, 'b': 2 } - */ -function zipObject(props, values) { - return _baseZipObject(props || [], values || [], _assignValue/* default */.A); -} - -/* harmony default export */ const lodash_es_zipObject = (zipObject); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFlatten.js + 1 modules -var _baseFlatten = __webpack_require__(13588); -// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayMap.js -var _arrayMap = __webpack_require__(45572); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGet.js -var _baseGet = __webpack_require__(66318); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseMap.js -var _baseMap = __webpack_require__(52568); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseSortBy.js -/** - * The base implementation of `_.sortBy` which uses `comparer` to define the - * sort order of `array` and replaces criteria objects with their corresponding - * values. - * - * @private - * @param {Array} array The array to sort. - * @param {Function} comparer The function to define sort order. - * @returns {Array} Returns `array`. - */ -function baseSortBy(array, comparer) { - var length = array.length; - - array.sort(comparer); - while (length--) { - array[length] = array[length].value; - } - return array; -} - -/* harmony default export */ const _baseSortBy = (baseSortBy); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseUnary.js -var _baseUnary = __webpack_require__(52789); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_compareAscending.js - - -/** - * Compares values to sort them in ascending order. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {number} Returns the sort order indicator for `value`. - */ -function compareAscending(value, other) { - if (value !== other) { - var valIsDefined = value !== undefined, - valIsNull = value === null, - valIsReflexive = value === value, - valIsSymbol = (0,isSymbol/* default */.A)(value); - - var othIsDefined = other !== undefined, - othIsNull = other === null, - othIsReflexive = other === other, - othIsSymbol = (0,isSymbol/* default */.A)(other); - - if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) || - (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) || - (valIsNull && othIsDefined && othIsReflexive) || - (!valIsDefined && othIsReflexive) || - !valIsReflexive) { - return 1; - } - if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) || - (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) || - (othIsNull && valIsDefined && valIsReflexive) || - (!othIsDefined && valIsReflexive) || - !othIsReflexive) { - return -1; - } - } - return 0; -} - -/* harmony default export */ const _compareAscending = (compareAscending); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_compareMultiple.js - - -/** - * Used by `_.orderBy` to compare multiple properties of a value to another - * and stable sort them. - * - * If `orders` is unspecified, all values are sorted in ascending order. Otherwise, - * specify an order of "desc" for descending or "asc" for ascending sort order - * of corresponding values. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {boolean[]|string[]} orders The order to sort by for each property. - * @returns {number} Returns the sort order indicator for `object`. - */ -function compareMultiple(object, other, orders) { - var index = -1, - objCriteria = object.criteria, - othCriteria = other.criteria, - length = objCriteria.length, - ordersLength = orders.length; - - while (++index < length) { - var result = _compareAscending(objCriteria[index], othCriteria[index]); - if (result) { - if (index >= ordersLength) { - return result; - } - var order = orders[index]; - return result * (order == 'desc' ? -1 : 1); - } - } - // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications - // that causes it, under certain circumstances, to provide the same value for - // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247 - // for more details. - // - // This also ensures a stable sort in V8 and other engines. - // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details. - return object.index - other.index; -} - -/* harmony default export */ const _compareMultiple = (compareMultiple); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseOrderBy.js - - - - - - - - - - -/** - * The base implementation of `_.orderBy` without param guards. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. - * @param {string[]} orders The sort orders of `iteratees`. - * @returns {Array} Returns the new sorted array. - */ -function baseOrderBy(collection, iteratees, orders) { - if (iteratees.length) { - iteratees = (0,_arrayMap/* default */.A)(iteratees, function(iteratee) { - if ((0,isArray/* default */.A)(iteratee)) { - return function(value) { - return (0,_baseGet/* default */.A)(value, iteratee.length === 1 ? iteratee[0] : iteratee); - } - } - return iteratee; - }); - } else { - iteratees = [identity/* default */.A]; - } - - var index = -1; - iteratees = (0,_arrayMap/* default */.A)(iteratees, (0,_baseUnary/* default */.A)(_baseIteratee/* default */.A)); - - var result = (0,_baseMap/* default */.A)(collection, function(value, key, collection) { - var criteria = (0,_arrayMap/* default */.A)(iteratees, function(iteratee) { - return iteratee(value); - }); - return { 'criteria': criteria, 'index': ++index, 'value': value }; - }); - - return _baseSortBy(result, function(object, other) { - return _compareMultiple(object, other, orders); - }); -} - -/* harmony default export */ const _baseOrderBy = (baseOrderBy); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseRest.js -var _baseRest = __webpack_require__(24326); -// EXTERNAL MODULE: ./node_modules/lodash-es/_isIterateeCall.js -var _isIterateeCall = __webpack_require__(6832); -;// CONCATENATED MODULE: ./node_modules/lodash-es/sortBy.js - - - - - -/** - * Creates an array of elements, sorted in ascending order by the results of - * running each element in a collection thru each iteratee. This method - * performs a stable sort, that is, it preserves the original sort order of - * equal elements. The iteratees are invoked with one argument: (value). - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {...(Function|Function[])} [iteratees=[_.identity]] - * The iteratees to sort by. - * @returns {Array} Returns the new sorted array. - * @example - * - * var users = [ - * { 'user': 'fred', 'age': 48 }, - * { 'user': 'barney', 'age': 36 }, - * { 'user': 'fred', 'age': 30 }, - * { 'user': 'barney', 'age': 34 } - * ]; - * - * _.sortBy(users, [function(o) { return o.user; }]); - * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]] - * - * _.sortBy(users, ['user', 'age']); - * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]] - */ -var sortBy = (0,_baseRest/* default */.A)(function(collection, iteratees) { - if (collection == null) { - return []; - } - var length = iteratees.length; - if (length > 1 && (0,_isIterateeCall/* default */.A)(collection, iteratees[0], iteratees[1])) { - iteratees = []; - } else if (length > 2 && (0,_isIterateeCall/* default */.A)(iteratees[0], iteratees[1], iteratees[2])) { - iteratees = [iteratees[0]]; - } - return _baseOrderBy(collection, (0,_baseFlatten/* default */.A)(iteratees, 1), []); -}); - -/* harmony default export */ const lodash_es_sortBy = (sortBy); - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/cross-count.js - - - - -/* - * A function that takes a layering (an array of layers, each with an array of - * ordererd nodes) and a graph and returns a weighted crossing count. - * - * Pre-conditions: - * - * 1. Input graph must be simple (not a multigraph), directed, and include - * only simple edges. - * 2. Edges in the input graph must have assigned weights. - * - * Post-conditions: - * - * 1. The graph and layering matrix are left unchanged. - * - * This algorithm is derived from Barth, et al., "Bilayer Cross Counting." - */ -function crossCount(g, layering) { - var cc = 0; - for (var i = 1; i < layering.length; ++i) { - cc += twoLayerCrossCount(g, layering[i - 1], layering[i]); - } - return cc; -} - -function twoLayerCrossCount(g, northLayer, southLayer) { - // Sort all of the edges between the north and south layers by their position - // in the north layer and then the south. Map these edges to the position of - // their head in the south layer. - var southPos = lodash_es_zipObject( - southLayer, - map/* default */.A(southLayer, function (v, i) { - return i; - }) - ); - var southEntries = flatten/* default */.A( - map/* default */.A(northLayer, function (v) { - return lodash_es_sortBy( - map/* default */.A(g.outEdges(v), function (e) { - return { pos: southPos[e.w], weight: g.edge(e).weight }; - }), - 'pos' - ); - }) - ); - - // Build the accumulator tree - var firstIndex = 1; - while (firstIndex < southLayer.length) firstIndex <<= 1; - var treeSize = 2 * firstIndex - 1; - firstIndex -= 1; - var tree = map/* default */.A(new Array(treeSize), function () { - return 0; - }); - - // Calculate the weighted crossings - var cc = 0; - forEach/* default */.A( - // @ts-expect-error - southEntries.forEach(function (entry) { - var index = entry.pos + firstIndex; - tree[index] += entry.weight; - var weightSum = 0; - // @ts-expect-error - while (index > 0) { - // @ts-expect-error - if (index % 2) { - weightSum += tree[index + 1]; - } - // @ts-expect-error - index = (index - 1) >> 1; - tree[index] += entry.weight; - } - cc += entry.weight * weightSum; - }) - ); - - return cc; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/init-order.js - - - - -/* - * Assigns an initial order value for each node by performing a DFS search - * starting from nodes in the first rank. Nodes are assigned an order in their - * rank as they are first visited. - * - * This approach comes from Gansner, et al., "A Technique for Drawing Directed - * Graphs." - * - * Returns a layering matrix with an array per layer and each layer sorted by - * the order of its nodes. - */ -function initOrder(g) { - var visited = {}; - var simpleNodes = filter/* default */.A(g.nodes(), function (v) { - return !g.children(v).length; - }); - var maxRank = lodash_es_max( - map/* default */.A(simpleNodes, function (v) { - return g.node(v).rank; - }) - ); - var layers = map/* default */.A(range/* default */.A(maxRank + 1), function () { - return []; - }); - - function dfs(v) { - if (has/* default */.A(visited, v)) return; - visited[v] = true; - var node = g.node(v); - layers[node.rank].push(v); - forEach/* default */.A(g.successors(v), dfs); - } - - var orderedVs = lodash_es_sortBy(simpleNodes, function (v) { - return g.node(v).rank; - }); - forEach/* default */.A(orderedVs, dfs); - - return layers; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/barycenter.js - - - - -function barycenter(g, movable) { - return map/* default */.A(movable, function (v) { - var inV = g.inEdges(v); - if (!inV.length) { - return { v: v }; - } else { - var result = reduce/* default */.A( - inV, - function (acc, e) { - var edge = g.edge(e), - nodeU = g.node(e.v); - return { - sum: acc.sum + edge.weight * nodeU.order, - weight: acc.weight + edge.weight, - }; - }, - { sum: 0, weight: 0 } - ); - - return { - v: v, - barycenter: result.sum / result.weight, - weight: result.weight, - }; - } - }); -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/resolve-conflicts.js - - - - -/* - * Given a list of entries of the form {v, barycenter, weight} and a - * constraint graph this function will resolve any conflicts between the - * constraint graph and the barycenters for the entries. If the barycenters for - * an entry would violate a constraint in the constraint graph then we coalesce - * the nodes in the conflict into a new node that respects the contraint and - * aggregates barycenter and weight information. - * - * This implementation is based on the description in Forster, "A Fast and - * Simple Hueristic for Constrained Two-Level Crossing Reduction," thought it - * differs in some specific details. - * - * Pre-conditions: - * - * 1. Each entry has the form {v, barycenter, weight}, or if the node has - * no barycenter, then {v}. - * - * Returns: - * - * A new list of entries of the form {vs, i, barycenter, weight}. The list - * `vs` may either be a singleton or it may be an aggregation of nodes - * ordered such that they do not violate constraints from the constraint - * graph. The property `i` is the lowest original index of any of the - * elements in `vs`. - */ -function resolveConflicts(entries, cg) { - var mappedEntries = {}; - forEach/* default */.A(entries, function (entry, i) { - var tmp = (mappedEntries[entry.v] = { - indegree: 0, - in: [], - out: [], - vs: [entry.v], - i: i, - }); - if (!isUndefined/* default */.A(entry.barycenter)) { - // @ts-expect-error - tmp.barycenter = entry.barycenter; - // @ts-expect-error - tmp.weight = entry.weight; - } - }); - - forEach/* default */.A(cg.edges(), function (e) { - var entryV = mappedEntries[e.v]; - var entryW = mappedEntries[e.w]; - if (!isUndefined/* default */.A(entryV) && !isUndefined/* default */.A(entryW)) { - entryW.indegree++; - entryV.out.push(mappedEntries[e.w]); - } - }); - - var sourceSet = filter/* default */.A(mappedEntries, function (entry) { - // @ts-expect-error - return !entry.indegree; - }); - - return doResolveConflicts(sourceSet); -} - -function doResolveConflicts(sourceSet) { - var entries = []; - - function handleIn(vEntry) { - return function (uEntry) { - if (uEntry.merged) { - return; - } - if ( - isUndefined/* default */.A(uEntry.barycenter) || - isUndefined/* default */.A(vEntry.barycenter) || - uEntry.barycenter >= vEntry.barycenter - ) { - mergeEntries(vEntry, uEntry); - } - }; - } - - function handleOut(vEntry) { - return function (wEntry) { - wEntry['in'].push(vEntry); - if (--wEntry.indegree === 0) { - sourceSet.push(wEntry); - } - }; - } - - while (sourceSet.length) { - var entry = sourceSet.pop(); - entries.push(entry); - forEach/* default */.A(entry['in'].reverse(), handleIn(entry)); - forEach/* default */.A(entry.out, handleOut(entry)); - } - - return map/* default */.A( - filter/* default */.A(entries, function (entry) { - return !entry.merged; - }), - function (entry) { - return pick/* default */.A(entry, ['vs', 'i', 'barycenter', 'weight']); - } - ); -} - -function mergeEntries(target, source) { - var sum = 0; - var weight = 0; - - if (target.weight) { - sum += target.barycenter * target.weight; - weight += target.weight; - } - - if (source.weight) { - sum += source.barycenter * source.weight; - weight += source.weight; - } - - target.vs = source.vs.concat(target.vs); - target.barycenter = sum / weight; - target.weight = weight; - target.i = Math.min(source.i, target.i); - source.merged = true; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/sort.js - - - - - -function sort(entries, biasRight) { - var parts = partition(entries, function (entry) { - return has/* default */.A(entry, 'barycenter'); - }); - var sortable = parts.lhs, - unsortable = lodash_es_sortBy(parts.rhs, function (entry) { - return -entry.i; - }), - vs = [], - sum = 0, - weight = 0, - vsIndex = 0; - - sortable.sort(compareWithBias(!!biasRight)); - - vsIndex = consumeUnsortable(vs, unsortable, vsIndex); - - forEach/* default */.A(sortable, function (entry) { - vsIndex += entry.vs.length; - vs.push(entry.vs); - sum += entry.barycenter * entry.weight; - weight += entry.weight; - vsIndex = consumeUnsortable(vs, unsortable, vsIndex); - }); - - var result = { vs: flatten/* default */.A(vs) }; - if (weight) { - result.barycenter = sum / weight; - result.weight = weight; - } - return result; -} - -function consumeUnsortable(vs, unsortable, index) { - var last; - while (unsortable.length && (last = lodash_es_last(unsortable)).i <= index) { - unsortable.pop(); - vs.push(last.vs); - index++; - } - return index; -} - -function compareWithBias(bias) { - return function (entryV, entryW) { - if (entryV.barycenter < entryW.barycenter) { - return -1; - } else if (entryV.barycenter > entryW.barycenter) { - return 1; - } - - return !bias ? entryV.i - entryW.i : entryW.i - entryV.i; - }; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/sort-subgraph.js - - - - - - - -function sortSubgraph(g, v, cg, biasRight) { - var movable = g.children(v); - var node = g.node(v); - var bl = node ? node.borderLeft : undefined; - var br = node ? node.borderRight : undefined; - var subgraphs = {}; - - if (bl) { - movable = filter/* default */.A(movable, function (w) { - return w !== bl && w !== br; - }); - } - - var barycenters = barycenter(g, movable); - forEach/* default */.A(barycenters, function (entry) { - if (g.children(entry.v).length) { - var subgraphResult = sortSubgraph(g, entry.v, cg, biasRight); - subgraphs[entry.v] = subgraphResult; - if (has/* default */.A(subgraphResult, 'barycenter')) { - mergeBarycenters(entry, subgraphResult); - } - } - }); - - var entries = resolveConflicts(barycenters, cg); - expandSubgraphs(entries, subgraphs); - - var result = sort(entries, biasRight); - - if (bl) { - result.vs = flatten/* default */.A([bl, result.vs, br]); - if (g.predecessors(bl).length) { - var blPred = g.node(g.predecessors(bl)[0]), - brPred = g.node(g.predecessors(br)[0]); - if (!has/* default */.A(result, 'barycenter')) { - result.barycenter = 0; - result.weight = 0; - } - result.barycenter = - (result.barycenter * result.weight + blPred.order + brPred.order) / (result.weight + 2); - result.weight += 2; - } - } - - return result; -} - -function expandSubgraphs(entries, subgraphs) { - forEach/* default */.A(entries, function (entry) { - entry.vs = flatten/* default */.A( - entry.vs.map(function (v) { - if (subgraphs[v]) { - return subgraphs[v].vs; - } - return v; - }) - ); - }); -} - -function mergeBarycenters(target, other) { - if (!isUndefined/* default */.A(target.barycenter)) { - target.barycenter = - (target.barycenter * target.weight + other.barycenter * other.weight) / - (target.weight + other.weight); - target.weight += other.weight; - } else { - target.barycenter = other.barycenter; - target.weight = other.weight; - } -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/index.js - - - - - - - - - - - -/* - * Applies heuristics to minimize edge crossings in the graph and sets the best - * order solution as an order attribute on each node. - * - * Pre-conditions: - * - * 1. Graph must be DAG - * 2. Graph nodes must be objects with a "rank" attribute - * 3. Graph edges must have the "weight" attribute - * - * Post-conditions: - * - * 1. Graph nodes will have an "order" attribute based on the results of the - * algorithm. - */ -function order(g) { - var maxRank = util_maxRank(g), - downLayerGraphs = buildLayerGraphs(g, range/* default */.A(1, maxRank + 1), 'inEdges'), - upLayerGraphs = buildLayerGraphs(g, range/* default */.A(maxRank - 1, -1, -1), 'outEdges'); - - var layering = initOrder(g); - assignOrder(g, layering); - - var bestCC = Number.POSITIVE_INFINITY, - best; - - for (var i = 0, lastBest = 0; lastBest < 4; ++i, ++lastBest) { - sweepLayerGraphs(i % 2 ? downLayerGraphs : upLayerGraphs, i % 4 >= 2); - - layering = buildLayerMatrix(g); - var cc = crossCount(g, layering); - if (cc < bestCC) { - lastBest = 0; - best = lodash_es_cloneDeep(layering); - bestCC = cc; - } - } - - assignOrder(g, best); -} - -function buildLayerGraphs(g, ranks, relationship) { - return map/* default */.A(ranks, function (rank) { - return buildLayerGraph(g, rank, relationship); - }); -} - -function sweepLayerGraphs(layerGraphs, biasRight) { - var cg = new graphlib/* Graph */.T(); - forEach/* default */.A(layerGraphs, function (lg) { - var root = lg.graph().root; - var sorted = sortSubgraph(lg, root, cg, biasRight); - forEach/* default */.A(sorted.vs, function (v, i) { - lg.node(v).order = i; - }); - addSubgraphConstraints(lg, cg, sorted.vs); - }); -} - -function assignOrder(g, layering) { - forEach/* default */.A(layering, function (layer) { - forEach/* default */.A(layer, function (v, i) { - g.node(v).order = i; - }); - }); -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/parent-dummy-chains.js - - - - -function parentDummyChains(g) { - var postorderNums = parent_dummy_chains_postorder(g); - - forEach/* default */.A(g.graph().dummyChains, function (v) { - var node = g.node(v); - var edgeObj = node.edgeObj; - var pathData = findPath(g, postorderNums, edgeObj.v, edgeObj.w); - var path = pathData.path; - var lca = pathData.lca; - var pathIdx = 0; - var pathV = path[pathIdx]; - var ascending = true; - - while (v !== edgeObj.w) { - node = g.node(v); - - if (ascending) { - while ((pathV = path[pathIdx]) !== lca && g.node(pathV).maxRank < node.rank) { - pathIdx++; - } - - if (pathV === lca) { - ascending = false; - } - } - - if (!ascending) { - while ( - pathIdx < path.length - 1 && - g.node((pathV = path[pathIdx + 1])).minRank <= node.rank - ) { - pathIdx++; - } - pathV = path[pathIdx]; - } - - g.setParent(v, pathV); - v = g.successors(v)[0]; - } - }); -} - -// Find a path from v to w through the lowest common ancestor (LCA). Return the -// full path and the LCA. -function findPath(g, postorderNums, v, w) { - var vPath = []; - var wPath = []; - var low = Math.min(postorderNums[v].low, postorderNums[w].low); - var lim = Math.max(postorderNums[v].lim, postorderNums[w].lim); - var parent; - var lca; - - // Traverse up from v to find the LCA - parent = v; - do { - parent = g.parent(parent); - vPath.push(parent); - } while (parent && (postorderNums[parent].low > low || lim > postorderNums[parent].lim)); - lca = parent; - - // Traverse from w to LCA - parent = w; - while ((parent = g.parent(parent)) !== lca) { - wPath.push(parent); - } - - return { path: vPath.concat(wPath.reverse()), lca: lca }; -} - -function parent_dummy_chains_postorder(g) { - var result = {}; - var lim = 0; - - function dfs(v) { - var low = lim; - forEach/* default */.A(g.children(v), dfs); - result[v] = { low: low, lim: lim++ }; - } - forEach/* default */.A(g.children(), dfs); - - return result; -} - -// EXTERNAL MODULE: ./node_modules/lodash-es/_castFunction.js -var _castFunction = __webpack_require__(99922); -;// CONCATENATED MODULE: ./node_modules/lodash-es/forOwn.js - - - -/** - * Iterates over own enumerable string keyed properties of an object and - * invokes `iteratee` for each property. The iteratee is invoked with three - * arguments: (value, key, object). Iteratee functions may exit iteration - * early by explicitly returning `false`. - * - * @static - * @memberOf _ - * @since 0.3.0 - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Object} Returns `object`. - * @see _.forOwnRight - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.forOwn(new Foo, function(value, key) { - * console.log(key); - * }); - * // => Logs 'a' then 'b' (iteration order is not guaranteed). - */ -function forOwn(object, iteratee) { - return object && (0,_baseForOwn/* default */.A)(object, (0,_castFunction/* default */.A)(iteratee)); -} - -/* harmony default export */ const lodash_es_forOwn = (forOwn); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFor.js + 1 modules -var _baseFor = __webpack_require__(4574); -// EXTERNAL MODULE: ./node_modules/lodash-es/keysIn.js + 2 modules -var keysIn = __webpack_require__(55615); -;// CONCATENATED MODULE: ./node_modules/lodash-es/forIn.js - - - - -/** - * Iterates over own and inherited enumerable string keyed properties of an - * object and invokes `iteratee` for each property. The iteratee is invoked - * with three arguments: (value, key, object). Iteratee functions may exit - * iteration early by explicitly returning `false`. - * - * @static - * @memberOf _ - * @since 0.3.0 - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Object} Returns `object`. - * @see _.forInRight - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.forIn(new Foo, function(value, key) { - * console.log(key); - * }); - * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed). - */ -function forIn(object, iteratee) { - return object == null - ? object - : (0,_baseFor/* default */.A)(object, (0,_castFunction/* default */.A)(iteratee), keysIn/* default */.A); -} - -/* harmony default export */ const lodash_es_forIn = (forIn); - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/position/bk.js - - - - -/* - * This module provides coordinate assignment based on Brandes and Köpf, "Fast - * and Simple Horizontal Coordinate Assignment." - */ - - - -/* - * Marks all edges in the graph with a type-1 conflict with the "type1Conflict" - * property. A type-1 conflict is one where a non-inner segment crosses an - * inner segment. An inner segment is an edge with both incident nodes marked - * with the "dummy" property. - * - * This algorithm scans layer by layer, starting with the second, for type-1 - * conflicts between the current layer and the previous layer. For each layer - * it scans the nodes from left to right until it reaches one that is incident - * on an inner segment. It then scans predecessors to determine if they have - * edges that cross that inner segment. At the end a final scan is done for all - * nodes on the current rank to see if they cross the last visited inner - * segment. - * - * This algorithm (safely) assumes that a dummy node will only be incident on a - * single node in the layers being scanned. - */ -function findType1Conflicts(g, layering) { - var conflicts = {}; - - function visitLayer(prevLayer, layer) { - var // last visited node in the previous layer that is incident on an inner - // segment. - k0 = 0, - // Tracks the last node in this layer scanned for crossings with a type-1 - // segment. - scanPos = 0, - prevLayerLength = prevLayer.length, - lastNode = lodash_es_last(layer); - - forEach/* default */.A(layer, function (v, i) { - var w = findOtherInnerSegmentNode(g, v), - k1 = w ? g.node(w).order : prevLayerLength; - - if (w || v === lastNode) { - forEach/* default */.A(layer.slice(scanPos, i + 1), function (scanNode) { - forEach/* default */.A(g.predecessors(scanNode), function (u) { - var uLabel = g.node(u), - uPos = uLabel.order; - if ((uPos < k0 || k1 < uPos) && !(uLabel.dummy && g.node(scanNode).dummy)) { - addConflict(conflicts, u, scanNode); - } - }); - }); - // @ts-expect-error - scanPos = i + 1; - k0 = k1; - } - }); - - return layer; - } - - reduce/* default */.A(layering, visitLayer); - return conflicts; -} - -function findType2Conflicts(g, layering) { - var conflicts = {}; - - function scan(south, southPos, southEnd, prevNorthBorder, nextNorthBorder) { - var v; - forEach/* default */.A(range/* default */.A(southPos, southEnd), function (i) { - v = south[i]; - if (g.node(v).dummy) { - forEach/* default */.A(g.predecessors(v), function (u) { - var uNode = g.node(u); - if (uNode.dummy && (uNode.order < prevNorthBorder || uNode.order > nextNorthBorder)) { - addConflict(conflicts, u, v); - } - }); - } - }); - } - - function visitLayer(north, south) { - var prevNorthPos = -1, - nextNorthPos, - southPos = 0; - - forEach/* default */.A(south, function (v, southLookahead) { - if (g.node(v).dummy === 'border') { - var predecessors = g.predecessors(v); - if (predecessors.length) { - nextNorthPos = g.node(predecessors[0]).order; - scan(south, southPos, southLookahead, prevNorthPos, nextNorthPos); - // @ts-expect-error - southPos = southLookahead; - prevNorthPos = nextNorthPos; - } - } - scan(south, southPos, south.length, nextNorthPos, north.length); - }); - - return south; - } - - reduce/* default */.A(layering, visitLayer); - return conflicts; -} - -function findOtherInnerSegmentNode(g, v) { - if (g.node(v).dummy) { - return lodash_es_find(g.predecessors(v), function (u) { - return g.node(u).dummy; - }); - } -} - -function addConflict(conflicts, v, w) { - if (v > w) { - var tmp = v; - v = w; - w = tmp; - } - - var conflictsV = conflicts[v]; - if (!conflictsV) { - conflicts[v] = conflictsV = {}; - } - conflictsV[w] = true; -} - -function hasConflict(conflicts, v, w) { - if (v > w) { - var tmp = v; - v = w; - w = tmp; - } - return has/* default */.A(conflicts[v], w); -} - -/* - * Try to align nodes into vertical "blocks" where possible. This algorithm - * attempts to align a node with one of its median neighbors. If the edge - * connecting a neighbor is a type-1 conflict then we ignore that possibility. - * If a previous node has already formed a block with a node after the node - * we're trying to form a block with, we also ignore that possibility - our - * blocks would be split in that scenario. - */ -function verticalAlignment(g, layering, conflicts, neighborFn) { - var root = {}, - align = {}, - pos = {}; - - // We cache the position here based on the layering because the graph and - // layering may be out of sync. The layering matrix is manipulated to - // generate different extreme alignments. - forEach/* default */.A(layering, function (layer) { - forEach/* default */.A(layer, function (v, order) { - root[v] = v; - align[v] = v; - pos[v] = order; - }); - }); - - forEach/* default */.A(layering, function (layer) { - var prevIdx = -1; - forEach/* default */.A(layer, function (v) { - var ws = neighborFn(v); - if (ws.length) { - ws = lodash_es_sortBy(ws, function (w) { - return pos[w]; - }); - var mp = (ws.length - 1) / 2; - for (var i = Math.floor(mp), il = Math.ceil(mp); i <= il; ++i) { - var w = ws[i]; - if (align[v] === v && prevIdx < pos[w] && !hasConflict(conflicts, v, w)) { - align[w] = v; - align[v] = root[v] = root[w]; - prevIdx = pos[w]; - } - } - } - }); - }); - - return { root: root, align: align }; -} - -function horizontalCompaction(g, layering, root, align, reverseSep) { - // This portion of the algorithm differs from BK due to a number of problems. - // Instead of their algorithm we construct a new block graph and do two - // sweeps. The first sweep places blocks with the smallest possible - // coordinates. The second sweep removes unused space by moving blocks to the - // greatest coordinates without violating separation. - var xs = {}, - blockG = buildBlockGraph(g, layering, root, reverseSep), - borderType = reverseSep ? 'borderLeft' : 'borderRight'; - - function iterate(setXsFunc, nextNodesFunc) { - var stack = blockG.nodes(); - var elem = stack.pop(); - var visited = {}; - while (elem) { - if (visited[elem]) { - setXsFunc(elem); - } else { - visited[elem] = true; - stack.push(elem); - stack = stack.concat(nextNodesFunc(elem)); - } - - elem = stack.pop(); - } - } - - // First pass, assign smallest coordinates - function pass1(elem) { - xs[elem] = blockG.inEdges(elem).reduce(function (acc, e) { - return Math.max(acc, xs[e.v] + blockG.edge(e)); - }, 0); - } - - // Second pass, assign greatest coordinates - function pass2(elem) { - var min = blockG.outEdges(elem).reduce(function (acc, e) { - return Math.min(acc, xs[e.w] - blockG.edge(e)); - }, Number.POSITIVE_INFINITY); - - var node = g.node(elem); - if (min !== Number.POSITIVE_INFINITY && node.borderType !== borderType) { - xs[elem] = Math.max(xs[elem], min); - } - } - - iterate(pass1, blockG.predecessors.bind(blockG)); - iterate(pass2, blockG.successors.bind(blockG)); - - // Assign x coordinates to all nodes - forEach/* default */.A(align, function (v) { - xs[v] = xs[root[v]]; - }); - - return xs; -} - -function buildBlockGraph(g, layering, root, reverseSep) { - var blockGraph = new graphlib/* Graph */.T(), - graphLabel = g.graph(), - sepFn = sep(graphLabel.nodesep, graphLabel.edgesep, reverseSep); - - forEach/* default */.A(layering, function (layer) { - var u; - forEach/* default */.A(layer, function (v) { - var vRoot = root[v]; - blockGraph.setNode(vRoot); - if (u) { - var uRoot = root[u], - prevMax = blockGraph.edge(uRoot, vRoot); - blockGraph.setEdge(uRoot, vRoot, Math.max(sepFn(g, v, u), prevMax || 0)); - } - u = v; - }); - }); - - return blockGraph; -} - -/* - * Returns the alignment that has the smallest width of the given alignments. - */ -function findSmallestWidthAlignment(g, xss) { - return lodash_es_minBy(values/* default */.A(xss), function (xs) { - var max = Number.NEGATIVE_INFINITY; - var min = Number.POSITIVE_INFINITY; - - lodash_es_forIn(xs, function (x, v) { - var halfWidth = width(g, v) / 2; - - max = Math.max(x + halfWidth, max); - min = Math.min(x - halfWidth, min); - }); - - return max - min; - }); -} - -/* - * Align the coordinates of each of the layout alignments such that - * left-biased alignments have their minimum coordinate at the same point as - * the minimum coordinate of the smallest width alignment and right-biased - * alignments have their maximum coordinate at the same point as the maximum - * coordinate of the smallest width alignment. - */ -function alignCoordinates(xss, alignTo) { - var alignToVals = values/* default */.A(alignTo), - alignToMin = lodash_es_min(alignToVals), - alignToMax = lodash_es_max(alignToVals); - - forEach/* default */.A(['u', 'd'], function (vert) { - forEach/* default */.A(['l', 'r'], function (horiz) { - var alignment = vert + horiz, - xs = xss[alignment], - delta; - if (xs === alignTo) return; - - var xsVals = values/* default */.A(xs); - delta = horiz === 'l' ? alignToMin - lodash_es_min(xsVals) : alignToMax - lodash_es_max(xsVals); - - if (delta) { - xss[alignment] = lodash_es_mapValues(xs, function (x) { - return x + delta; - }); - } - }); - }); -} - -function balance(xss, align) { - return lodash_es_mapValues(xss.ul, function (ignore, v) { - if (align) { - return xss[align.toLowerCase()][v]; - } else { - var xs = lodash_es_sortBy(map/* default */.A(xss, v)); - return (xs[1] + xs[2]) / 2; - } - }); -} - -function positionX(g) { - var layering = buildLayerMatrix(g); - var conflicts = merge/* default */.A(findType1Conflicts(g, layering), findType2Conflicts(g, layering)); - - var xss = {}; - var adjustedLayering; - forEach/* default */.A(['u', 'd'], function (vert) { - adjustedLayering = vert === 'u' ? layering : values/* default */.A(layering).reverse(); - forEach/* default */.A(['l', 'r'], function (horiz) { - if (horiz === 'r') { - adjustedLayering = map/* default */.A(adjustedLayering, function (inner) { - return values/* default */.A(inner).reverse(); - }); - } - - var neighborFn = (vert === 'u' ? g.predecessors : g.successors).bind(g); - var align = verticalAlignment(g, adjustedLayering, conflicts, neighborFn); - var xs = horizontalCompaction(g, adjustedLayering, align.root, align.align, horiz === 'r'); - if (horiz === 'r') { - xs = lodash_es_mapValues(xs, function (x) { - return -x; - }); - } - xss[vert + horiz] = xs; - }); - }); - - var smallestWidth = findSmallestWidthAlignment(g, xss); - alignCoordinates(xss, smallestWidth); - return balance(xss, g.graph().align); -} - -function sep(nodeSep, edgeSep, reverseSep) { - return function (g, v, w) { - var vLabel = g.node(v); - var wLabel = g.node(w); - var sum = 0; - var delta; - - sum += vLabel.width / 2; - if (has/* default */.A(vLabel, 'labelpos')) { - switch (vLabel.labelpos.toLowerCase()) { - case 'l': - delta = -vLabel.width / 2; - break; - case 'r': - delta = vLabel.width / 2; - break; - } - } - if (delta) { - sum += reverseSep ? delta : -delta; - } - delta = 0; - - sum += (vLabel.dummy ? edgeSep : nodeSep) / 2; - sum += (wLabel.dummy ? edgeSep : nodeSep) / 2; - - sum += wLabel.width / 2; - if (has/* default */.A(wLabel, 'labelpos')) { - switch (wLabel.labelpos.toLowerCase()) { - case 'l': - delta = wLabel.width / 2; - break; - case 'r': - delta = -wLabel.width / 2; - break; - } - } - if (delta) { - sum += reverseSep ? delta : -delta; - } - delta = 0; - - return sum; - }; -} - -function width(g, v) { - return g.node(v).width; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/position/index.js - - - - - - -function position(g) { - g = asNonCompoundGraph(g); - - positionY(g); - lodash_es_forOwn(positionX(g), function (x, v) { - g.node(v).x = x; - }); -} - -function positionY(g) { - var layering = buildLayerMatrix(g); - var rankSep = g.graph().ranksep; - var prevY = 0; - forEach/* default */.A(layering, function (layer) { - var maxHeight = lodash_es_max( - map/* default */.A(layer, function (v) { - return g.node(v).height; - }) - ); - forEach/* default */.A(layer, function (v) { - g.node(v).y = prevY + maxHeight / 2; - }); - prevY += maxHeight + rankSep; - }); -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/layout.js - - - - - - - - - - - - - - - -function layout(g, opts) { - var time = opts && opts.debugTiming ? util_time : notime; - time('layout', function () { - var layoutGraph = time(' buildLayoutGraph', function () { - return buildLayoutGraph(g); - }); - time(' runLayout', function () { - runLayout(layoutGraph, time); - }); - time(' updateInputGraph', function () { - updateInputGraph(g, layoutGraph); - }); - }); -} - -function runLayout(g, time) { - time(' makeSpaceForEdgeLabels', function () { - makeSpaceForEdgeLabels(g); - }); - time(' removeSelfEdges', function () { - removeSelfEdges(g); - }); - time(' acyclic', function () { - run(g); - }); - time(' nestingGraph.run', function () { - nesting_graph_run(g); - }); - time(' rank', function () { - rank(asNonCompoundGraph(g)); - }); - time(' injectEdgeLabelProxies', function () { - injectEdgeLabelProxies(g); - }); - time(' removeEmptyRanks', function () { - removeEmptyRanks(g); - }); - time(' nestingGraph.cleanup', function () { - cleanup(g); - }); - time(' normalizeRanks', function () { - normalizeRanks(g); - }); - time(' assignRankMinMax', function () { - assignRankMinMax(g); - }); - time(' removeEdgeLabelProxies', function () { - removeEdgeLabelProxies(g); - }); - time(' normalize.run', function () { - normalize_run(g); - }); - time(' parentDummyChains', function () { - parentDummyChains(g); - }); - time(' addBorderSegments', function () { - addBorderSegments(g); - }); - time(' order', function () { - order(g); - }); - time(' insertSelfEdges', function () { - insertSelfEdges(g); - }); - time(' adjustCoordinateSystem', function () { - adjust(g); - }); - time(' position', function () { - position(g); - }); - time(' positionSelfEdges', function () { - positionSelfEdges(g); - }); - time(' removeBorderNodes', function () { - removeBorderNodes(g); - }); - time(' normalize.undo', function () { - normalize_undo(g); - }); - time(' fixupEdgeLabelCoords', function () { - fixupEdgeLabelCoords(g); - }); - time(' undoCoordinateSystem', function () { - coordinate_system_undo(g); - }); - time(' translateGraph', function () { - translateGraph(g); - }); - time(' assignNodeIntersects', function () { - assignNodeIntersects(g); - }); - time(' reversePoints', function () { - reversePointsForReversedEdges(g); - }); - time(' acyclic.undo', function () { - undo(g); - }); -} - -/* - * Copies final layout information from the layout graph back to the input - * graph. This process only copies whitelisted attributes from the layout graph - * to the input graph, so it serves as a good place to determine what - * attributes can influence layout. - */ -function updateInputGraph(inputGraph, layoutGraph) { - forEach/* default */.A(inputGraph.nodes(), function (v) { - var inputLabel = inputGraph.node(v); - var layoutLabel = layoutGraph.node(v); - - if (inputLabel) { - inputLabel.x = layoutLabel.x; - inputLabel.y = layoutLabel.y; - - if (layoutGraph.children(v).length) { - inputLabel.width = layoutLabel.width; - inputLabel.height = layoutLabel.height; - } - } - }); - - forEach/* default */.A(inputGraph.edges(), function (e) { - var inputLabel = inputGraph.edge(e); - var layoutLabel = layoutGraph.edge(e); - - inputLabel.points = layoutLabel.points; - if (has/* default */.A(layoutLabel, 'x')) { - inputLabel.x = layoutLabel.x; - inputLabel.y = layoutLabel.y; - } - }); - - inputGraph.graph().width = layoutGraph.graph().width; - inputGraph.graph().height = layoutGraph.graph().height; -} - -var graphNumAttrs = ['nodesep', 'edgesep', 'ranksep', 'marginx', 'marginy']; -var graphDefaults = { ranksep: 50, edgesep: 20, nodesep: 50, rankdir: 'tb' }; -var graphAttrs = ['acyclicer', 'ranker', 'rankdir', 'align']; -var nodeNumAttrs = ['width', 'height']; -var nodeDefaults = { width: 0, height: 0 }; -var edgeNumAttrs = ['minlen', 'weight', 'width', 'height', 'labeloffset']; -var edgeDefaults = { - minlen: 1, - weight: 1, - width: 0, - height: 0, - labeloffset: 10, - labelpos: 'r', -}; -var edgeAttrs = ['labelpos']; - -/* - * Constructs a new graph from the input graph, which can be used for layout. - * This process copies only whitelisted attributes from the input graph to the - * layout graph. Thus this function serves as a good place to determine what - * attributes can influence layout. - */ -function buildLayoutGraph(inputGraph) { - var g = new graphlib/* Graph */.T({ multigraph: true, compound: true }); - var graph = canonicalize(inputGraph.graph()); - - g.setGraph( - merge/* default */.A({}, graphDefaults, selectNumberAttrs(graph, graphNumAttrs), pick/* default */.A(graph, graphAttrs)) - ); - - forEach/* default */.A(inputGraph.nodes(), function (v) { - var node = canonicalize(inputGraph.node(v)); - g.setNode(v, defaults/* default */.A(selectNumberAttrs(node, nodeNumAttrs), nodeDefaults)); - g.setParent(v, inputGraph.parent(v)); - }); - - forEach/* default */.A(inputGraph.edges(), function (e) { - var edge = canonicalize(inputGraph.edge(e)); - g.setEdge( - e, - merge/* default */.A({}, edgeDefaults, selectNumberAttrs(edge, edgeNumAttrs), pick/* default */.A(edge, edgeAttrs)) - ); - }); - - return g; -} - -/* - * This idea comes from the Gansner paper: to account for edge labels in our - * layout we split each rank in half by doubling minlen and halving ranksep. - * Then we can place labels at these mid-points between nodes. - * - * We also add some minimal padding to the width to push the label for the edge - * away from the edge itself a bit. - */ -function makeSpaceForEdgeLabels(g) { - var graph = g.graph(); - graph.ranksep /= 2; - forEach/* default */.A(g.edges(), function (e) { - var edge = g.edge(e); - edge.minlen *= 2; - if (edge.labelpos.toLowerCase() !== 'c') { - if (graph.rankdir === 'TB' || graph.rankdir === 'BT') { - edge.width += edge.labeloffset; - } else { - edge.height += edge.labeloffset; - } - } - }); -} - -/* - * Creates temporary dummy nodes that capture the rank in which each edge's - * label is going to, if it has one of non-zero width and height. We do this - * so that we can safely remove empty ranks while preserving balance for the - * label's position. - */ -function injectEdgeLabelProxies(g) { - forEach/* default */.A(g.edges(), function (e) { - var edge = g.edge(e); - if (edge.width && edge.height) { - var v = g.node(e.v); - var w = g.node(e.w); - var label = { rank: (w.rank - v.rank) / 2 + v.rank, e: e }; - addDummyNode(g, 'edge-proxy', label, '_ep'); - } - }); -} - -function assignRankMinMax(g) { - var maxRank = 0; - forEach/* default */.A(g.nodes(), function (v) { - var node = g.node(v); - if (node.borderTop) { - node.minRank = g.node(node.borderTop).rank; - node.maxRank = g.node(node.borderBottom).rank; - // @ts-expect-error - maxRank = lodash_es_max(maxRank, node.maxRank); - } - }); - g.graph().maxRank = maxRank; -} - -function removeEdgeLabelProxies(g) { - forEach/* default */.A(g.nodes(), function (v) { - var node = g.node(v); - if (node.dummy === 'edge-proxy') { - g.edge(node.e).labelRank = node.rank; - g.removeNode(v); - } - }); -} - -function translateGraph(g) { - var minX = Number.POSITIVE_INFINITY; - var maxX = 0; - var minY = Number.POSITIVE_INFINITY; - var maxY = 0; - var graphLabel = g.graph(); - var marginX = graphLabel.marginx || 0; - var marginY = graphLabel.marginy || 0; - - function getExtremes(attrs) { - var x = attrs.x; - var y = attrs.y; - var w = attrs.width; - var h = attrs.height; - minX = Math.min(minX, x - w / 2); - maxX = Math.max(maxX, x + w / 2); - minY = Math.min(minY, y - h / 2); - maxY = Math.max(maxY, y + h / 2); - } - - forEach/* default */.A(g.nodes(), function (v) { - getExtremes(g.node(v)); - }); - forEach/* default */.A(g.edges(), function (e) { - var edge = g.edge(e); - if (has/* default */.A(edge, 'x')) { - getExtremes(edge); - } - }); - - minX -= marginX; - minY -= marginY; - - forEach/* default */.A(g.nodes(), function (v) { - var node = g.node(v); - node.x -= minX; - node.y -= minY; - }); - - forEach/* default */.A(g.edges(), function (e) { - var edge = g.edge(e); - forEach/* default */.A(edge.points, function (p) { - p.x -= minX; - p.y -= minY; - }); - if (has/* default */.A(edge, 'x')) { - edge.x -= minX; - } - if (has/* default */.A(edge, 'y')) { - edge.y -= minY; - } - }); - - graphLabel.width = maxX - minX + marginX; - graphLabel.height = maxY - minY + marginY; -} - -function assignNodeIntersects(g) { - forEach/* default */.A(g.edges(), function (e) { - var edge = g.edge(e); - var nodeV = g.node(e.v); - var nodeW = g.node(e.w); - var p1, p2; - if (!edge.points) { - edge.points = []; - p1 = nodeW; - p2 = nodeV; - } else { - p1 = edge.points[0]; - p2 = edge.points[edge.points.length - 1]; - } - edge.points.unshift(intersectRect(nodeV, p1)); - edge.points.push(intersectRect(nodeW, p2)); - }); -} - -function fixupEdgeLabelCoords(g) { - forEach/* default */.A(g.edges(), function (e) { - var edge = g.edge(e); - if (has/* default */.A(edge, 'x')) { - if (edge.labelpos === 'l' || edge.labelpos === 'r') { - edge.width -= edge.labeloffset; - } - switch (edge.labelpos) { - case 'l': - edge.x -= edge.width / 2 + edge.labeloffset; - break; - case 'r': - edge.x += edge.width / 2 + edge.labeloffset; - break; - } - } - }); -} - -function reversePointsForReversedEdges(g) { - forEach/* default */.A(g.edges(), function (e) { - var edge = g.edge(e); - if (edge.reversed) { - edge.points.reverse(); - } - }); -} - -function removeBorderNodes(g) { - forEach/* default */.A(g.nodes(), function (v) { - if (g.children(v).length) { - var node = g.node(v); - var t = g.node(node.borderTop); - var b = g.node(node.borderBottom); - var l = g.node(lodash_es_last(node.borderLeft)); - var r = g.node(lodash_es_last(node.borderRight)); - - node.width = Math.abs(r.x - l.x); - node.height = Math.abs(b.y - t.y); - node.x = l.x + node.width / 2; - node.y = t.y + node.height / 2; - } - }); - - forEach/* default */.A(g.nodes(), function (v) { - if (g.node(v).dummy === 'border') { - g.removeNode(v); - } - }); -} - -function removeSelfEdges(g) { - forEach/* default */.A(g.edges(), function (e) { - if (e.v === e.w) { - var node = g.node(e.v); - if (!node.selfEdges) { - node.selfEdges = []; - } - node.selfEdges.push({ e: e, label: g.edge(e) }); - g.removeEdge(e); - } - }); -} - -function insertSelfEdges(g) { - var layers = buildLayerMatrix(g); - forEach/* default */.A(layers, function (layer) { - var orderShift = 0; - forEach/* default */.A(layer, function (v, i) { - var node = g.node(v); - node.order = i + orderShift; - forEach/* default */.A(node.selfEdges, function (selfEdge) { - addDummyNode( - g, - 'selfedge', - { - width: selfEdge.label.width, - height: selfEdge.label.height, - rank: node.rank, - order: i + ++orderShift, - e: selfEdge.e, - label: selfEdge.label, - }, - '_se' - ); - }); - delete node.selfEdges; - }); - }); -} - -function positionSelfEdges(g) { - forEach/* default */.A(g.nodes(), function (v) { - var node = g.node(v); - if (node.dummy === 'selfedge') { - var selfNode = g.node(node.e.v); - var x = selfNode.x + selfNode.width / 2; - var y = selfNode.y; - var dx = node.x - x; - var dy = selfNode.height / 2; - g.setEdge(node.e, node.label); - g.removeNode(v); - node.label.points = [ - { x: x + (2 * dx) / 3, y: y - dy }, - { x: x + (5 * dx) / 6, y: y - dy }, - { x: x + dx, y: y }, - { x: x + (5 * dx) / 6, y: y + dy }, - { x: x + (2 * dx) / 3, y: y + dy }, - ]; - node.label.x = node.x; - node.label.y = node.y; - } - }); -} - -function selectNumberAttrs(obj, attrs) { - return lodash_es_mapValues(pick/* default */.A(obj, attrs), Number); -} - -function canonicalize(attrs) { - var newAttrs = {}; - forEach/* default */.A(attrs, function (v, k) { - newAttrs[k.toLowerCase()] = v; - }); - return newAttrs; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/index.js - - - - - - - - -/***/ }), - -/***/ 73046: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - T: () => (/* binding */ Graph) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/has.js + 1 modules -var has = __webpack_require__(48585); -// EXTERNAL MODULE: ./node_modules/lodash-es/constant.js -var constant = __webpack_require__(39142); -// EXTERNAL MODULE: ./node_modules/lodash-es/isFunction.js -var isFunction = __webpack_require__(89610); -// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js -var keys = __webpack_require__(27422); -// EXTERNAL MODULE: ./node_modules/lodash-es/filter.js + 1 modules -var filter = __webpack_require__(11662); -// EXTERNAL MODULE: ./node_modules/lodash-es/isEmpty.js -var isEmpty = __webpack_require__(66401); -// EXTERNAL MODULE: ./node_modules/lodash-es/forEach.js -var forEach = __webpack_require__(8058); -// EXTERNAL MODULE: ./node_modules/lodash-es/isUndefined.js -var isUndefined = __webpack_require__(69592); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFlatten.js + 1 modules -var _baseFlatten = __webpack_require__(13588); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseRest.js -var _baseRest = __webpack_require__(24326); -// EXTERNAL MODULE: ./node_modules/lodash-es/_SetCache.js + 2 modules -var _SetCache = __webpack_require__(62062); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFindIndex.js -var _baseFindIndex = __webpack_require__(25707); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsNaN.js -/** - * The base implementation of `_.isNaN` without support for number objects. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. - */ -function baseIsNaN(value) { - return value !== value; -} - -/* harmony default export */ const _baseIsNaN = (baseIsNaN); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_strictIndexOf.js -/** - * A specialized version of `_.indexOf` which performs strict equality - * comparisons of values, i.e. `===`. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} fromIndex The index to search from. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function strictIndexOf(array, value, fromIndex) { - var index = fromIndex - 1, - length = array.length; - - while (++index < length) { - if (array[index] === value) { - return index; - } - } - return -1; -} - -/* harmony default export */ const _strictIndexOf = (strictIndexOf); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIndexOf.js - - - - -/** - * The base implementation of `_.indexOf` without `fromIndex` bounds checks. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} fromIndex The index to search from. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function baseIndexOf(array, value, fromIndex) { - return value === value - ? _strictIndexOf(array, value, fromIndex) - : (0,_baseFindIndex/* default */.A)(array, _baseIsNaN, fromIndex); -} - -/* harmony default export */ const _baseIndexOf = (baseIndexOf); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_arrayIncludes.js - - -/** - * A specialized version of `_.includes` for arrays without support for - * specifying an index to search from. - * - * @private - * @param {Array} [array] The array to inspect. - * @param {*} target The value to search for. - * @returns {boolean} Returns `true` if `target` is found, else `false`. - */ -function arrayIncludes(array, value) { - var length = array == null ? 0 : array.length; - return !!length && _baseIndexOf(array, value, 0) > -1; -} - -/* harmony default export */ const _arrayIncludes = (arrayIncludes); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_arrayIncludesWith.js -/** - * This function is like `arrayIncludes` except that it accepts a comparator. - * - * @private - * @param {Array} [array] The array to inspect. - * @param {*} target The value to search for. - * @param {Function} comparator The comparator invoked per element. - * @returns {boolean} Returns `true` if `target` is found, else `false`. - */ -function arrayIncludesWith(array, value, comparator) { - var index = -1, - length = array == null ? 0 : array.length; - - while (++index < length) { - if (comparator(value, array[index])) { - return true; - } - } - return false; -} - -/* harmony default export */ const _arrayIncludesWith = (arrayIncludesWith); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_cacheHas.js -var _cacheHas = __webpack_require__(64099); -// EXTERNAL MODULE: ./node_modules/lodash-es/_Set.js -var _Set = __webpack_require__(39857); -;// CONCATENATED MODULE: ./node_modules/lodash-es/noop.js -/** - * This method returns `undefined`. - * - * @static - * @memberOf _ - * @since 2.3.0 - * @category Util - * @example - * - * _.times(2, _.noop); - * // => [undefined, undefined] - */ -function noop() { - // No operation performed. -} - -/* harmony default export */ const lodash_es_noop = (noop); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_setToArray.js -var _setToArray = __webpack_require__(29959); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_createSet.js - - - - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0; - -/** - * Creates a set object of `values`. - * - * @private - * @param {Array} values The values to add to the set. - * @returns {Object} Returns the new set. - */ -var createSet = !(_Set/* default */.A && (1 / (0,_setToArray/* default */.A)(new _Set/* default */.A([,-0]))[1]) == INFINITY) ? lodash_es_noop : function(values) { - return new _Set/* default */.A(values); -}; - -/* harmony default export */ const _createSet = (createSet); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseUniq.js - - - - - - - -/** Used as the size to enable large array optimizations. */ -var LARGE_ARRAY_SIZE = 200; - -/** - * The base implementation of `_.uniqBy` without support for iteratee shorthands. - * - * @private - * @param {Array} array The array to inspect. - * @param {Function} [iteratee] The iteratee invoked per element. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new duplicate free array. - */ -function baseUniq(array, iteratee, comparator) { - var index = -1, - includes = _arrayIncludes, - length = array.length, - isCommon = true, - result = [], - seen = result; - - if (comparator) { - isCommon = false; - includes = _arrayIncludesWith; - } - else if (length >= LARGE_ARRAY_SIZE) { - var set = iteratee ? null : _createSet(array); - if (set) { - return (0,_setToArray/* default */.A)(set); - } - isCommon = false; - includes = _cacheHas/* default */.A; - seen = new _SetCache/* default */.A; - } - else { - seen = iteratee ? [] : result; - } - outer: - while (++index < length) { - var value = array[index], - computed = iteratee ? iteratee(value) : value; - - value = (comparator || value !== 0) ? value : 0; - if (isCommon && computed === computed) { - var seenIndex = seen.length; - while (seenIndex--) { - if (seen[seenIndex] === computed) { - continue outer; - } - } - if (iteratee) { - seen.push(computed); - } - result.push(value); - } - else if (!includes(seen, computed, comparator)) { - if (seen !== result) { - seen.push(computed); - } - result.push(value); - } - } - return result; -} - -/* harmony default export */ const _baseUniq = (baseUniq); - -// EXTERNAL MODULE: ./node_modules/lodash-es/isArrayLikeObject.js -var isArrayLikeObject = __webpack_require__(53533); -;// CONCATENATED MODULE: ./node_modules/lodash-es/union.js - - - - - -/** - * Creates an array of unique values, in order, from all given arrays using - * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @returns {Array} Returns the new array of combined values. - * @example - * - * _.union([2], [1, 2]); - * // => [2, 1] - */ -var union = (0,_baseRest/* default */.A)(function(arrays) { - return _baseUniq((0,_baseFlatten/* default */.A)(arrays, 1, isArrayLikeObject/* default */.A, true)); -}); - -/* harmony default export */ const lodash_es_union = (union); - -// EXTERNAL MODULE: ./node_modules/lodash-es/values.js + 1 modules -var values = __webpack_require__(38207); -// EXTERNAL MODULE: ./node_modules/lodash-es/reduce.js + 2 modules -var reduce = __webpack_require__(89463); -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/graph.js - - -var DEFAULT_EDGE_NAME = '\x00'; -var GRAPH_NODE = '\x00'; -var EDGE_KEY_DELIM = '\x01'; - -// Implementation notes: -// -// * Node id query functions should return string ids for the nodes -// * Edge id query functions should return an "edgeObj", edge object, that is -// composed of enough information to uniquely identify an edge: {v, w, name}. -// * Internally we use an "edgeId", a stringified form of the edgeObj, to -// reference edges. This is because we need a performant way to look these -// edges up and, object properties, which have string keys, are the closest -// we're going to get to a performant hashtable in JavaScript. - -// Implementation notes: -// -// * Node id query functions should return string ids for the nodes -// * Edge id query functions should return an "edgeObj", edge object, that is -// composed of enough information to uniquely identify an edge: {v, w, name}. -// * Internally we use an "edgeId", a stringified form of the edgeObj, to -// reference edges. This is because we need a performant way to look these -// edges up and, object properties, which have string keys, are the closest -// we're going to get to a performant hashtable in JavaScript. -class Graph { - constructor(opts = {}) { - this._isDirected = has/* default */.A(opts, 'directed') ? opts.directed : true; - this._isMultigraph = has/* default */.A(opts, 'multigraph') ? opts.multigraph : false; - this._isCompound = has/* default */.A(opts, 'compound') ? opts.compound : false; - - // Label for the graph itself - this._label = undefined; - - // Defaults to be set when creating a new node - this._defaultNodeLabelFn = constant/* default */.A(undefined); - - // Defaults to be set when creating a new edge - this._defaultEdgeLabelFn = constant/* default */.A(undefined); - - // v -> label - this._nodes = {}; - - if (this._isCompound) { - // v -> parent - this._parent = {}; - - // v -> children - this._children = {}; - this._children[GRAPH_NODE] = {}; - } - - // v -> edgeObj - this._in = {}; - - // u -> v -> Number - this._preds = {}; - - // v -> edgeObj - this._out = {}; - - // v -> w -> Number - this._sucs = {}; - - // e -> edgeObj - this._edgeObjs = {}; - - // e -> label - this._edgeLabels = {}; - } - /* === Graph functions ========= */ - isDirected() { - return this._isDirected; - } - isMultigraph() { - return this._isMultigraph; - } - isCompound() { - return this._isCompound; - } - setGraph(label) { - this._label = label; - return this; - } - graph() { - return this._label; - } - /* === Node functions ========== */ - setDefaultNodeLabel(newDefault) { - if (!isFunction/* default */.A(newDefault)) { - newDefault = constant/* default */.A(newDefault); - } - this._defaultNodeLabelFn = newDefault; - return this; - } - nodeCount() { - return this._nodeCount; - } - nodes() { - return keys/* default */.A(this._nodes); - } - sources() { - var self = this; - return filter/* default */.A(this.nodes(), function (v) { - return isEmpty/* default */.A(self._in[v]); - }); - } - sinks() { - var self = this; - return filter/* default */.A(this.nodes(), function (v) { - return isEmpty/* default */.A(self._out[v]); - }); - } - setNodes(vs, value) { - var args = arguments; - var self = this; - forEach/* default */.A(vs, function (v) { - if (args.length > 1) { - self.setNode(v, value); - } else { - self.setNode(v); - } - }); - return this; - } - setNode(v, value) { - if (has/* default */.A(this._nodes, v)) { - if (arguments.length > 1) { - this._nodes[v] = value; - } - return this; - } - - // @ts-expect-error - this._nodes[v] = arguments.length > 1 ? value : this._defaultNodeLabelFn(v); - if (this._isCompound) { - this._parent[v] = GRAPH_NODE; - this._children[v] = {}; - this._children[GRAPH_NODE][v] = true; - } - this._in[v] = {}; - this._preds[v] = {}; - this._out[v] = {}; - this._sucs[v] = {}; - ++this._nodeCount; - return this; - } - node(v) { - return this._nodes[v]; - } - hasNode(v) { - return has/* default */.A(this._nodes, v); - } - removeNode(v) { - var self = this; - if (has/* default */.A(this._nodes, v)) { - var removeEdge = function (e) { - self.removeEdge(self._edgeObjs[e]); - }; - delete this._nodes[v]; - if (this._isCompound) { - this._removeFromParentsChildList(v); - delete this._parent[v]; - forEach/* default */.A(this.children(v), function (child) { - self.setParent(child); - }); - delete this._children[v]; - } - forEach/* default */.A(keys/* default */.A(this._in[v]), removeEdge); - delete this._in[v]; - delete this._preds[v]; - forEach/* default */.A(keys/* default */.A(this._out[v]), removeEdge); - delete this._out[v]; - delete this._sucs[v]; - --this._nodeCount; - } - return this; - } - setParent(v, parent) { - if (!this._isCompound) { - throw new Error('Cannot set parent in a non-compound graph'); - } - - if (isUndefined/* default */.A(parent)) { - parent = GRAPH_NODE; - } else { - // Coerce parent to string - parent += ''; - for (var ancestor = parent; !isUndefined/* default */.A(ancestor); ancestor = this.parent(ancestor)) { - if (ancestor === v) { - throw new Error('Setting ' + parent + ' as parent of ' + v + ' would create a cycle'); - } - } - - this.setNode(parent); - } - - this.setNode(v); - this._removeFromParentsChildList(v); - this._parent[v] = parent; - this._children[parent][v] = true; - return this; - } - _removeFromParentsChildList(v) { - delete this._children[this._parent[v]][v]; - } - parent(v) { - if (this._isCompound) { - var parent = this._parent[v]; - if (parent !== GRAPH_NODE) { - return parent; - } - } - } - children(v) { - if (isUndefined/* default */.A(v)) { - v = GRAPH_NODE; - } - - if (this._isCompound) { - var children = this._children[v]; - if (children) { - return keys/* default */.A(children); - } - } else if (v === GRAPH_NODE) { - return this.nodes(); - } else if (this.hasNode(v)) { - return []; - } - } - predecessors(v) { - var predsV = this._preds[v]; - if (predsV) { - return keys/* default */.A(predsV); - } - } - successors(v) { - var sucsV = this._sucs[v]; - if (sucsV) { - return keys/* default */.A(sucsV); - } - } - neighbors(v) { - var preds = this.predecessors(v); - if (preds) { - return lodash_es_union(preds, this.successors(v)); - } - } - isLeaf(v) { - var neighbors; - if (this.isDirected()) { - neighbors = this.successors(v); - } else { - neighbors = this.neighbors(v); - } - return neighbors.length === 0; - } - filterNodes(filter) { - // @ts-expect-error - var copy = new this.constructor({ - directed: this._isDirected, - multigraph: this._isMultigraph, - compound: this._isCompound, - }); - - copy.setGraph(this.graph()); - - var self = this; - forEach/* default */.A(this._nodes, function (value, v) { - if (filter(v)) { - copy.setNode(v, value); - } - }); - - forEach/* default */.A(this._edgeObjs, function (e) { - // @ts-expect-error - if (copy.hasNode(e.v) && copy.hasNode(e.w)) { - copy.setEdge(e, self.edge(e)); - } - }); - - var parents = {}; - function findParent(v) { - var parent = self.parent(v); - if (parent === undefined || copy.hasNode(parent)) { - parents[v] = parent; - return parent; - } else if (parent in parents) { - return parents[parent]; - } else { - return findParent(parent); - } - } - - if (this._isCompound) { - forEach/* default */.A(copy.nodes(), function (v) { - copy.setParent(v, findParent(v)); - }); - } - - return copy; - } - /* === Edge functions ========== */ - setDefaultEdgeLabel(newDefault) { - if (!isFunction/* default */.A(newDefault)) { - newDefault = constant/* default */.A(newDefault); - } - this._defaultEdgeLabelFn = newDefault; - return this; - } - edgeCount() { - return this._edgeCount; - } - edges() { - return values/* default */.A(this._edgeObjs); - } - setPath(vs, value) { - var self = this; - var args = arguments; - reduce/* default */.A(vs, function (v, w) { - if (args.length > 1) { - self.setEdge(v, w, value); - } else { - self.setEdge(v, w); - } - return w; - }); - return this; - } - /* - * setEdge(v, w, [value, [name]]) - * setEdge({ v, w, [name] }, [value]) - */ - setEdge() { - var v, w, name, value; - var valueSpecified = false; - var arg0 = arguments[0]; - - if (typeof arg0 === 'object' && arg0 !== null && 'v' in arg0) { - v = arg0.v; - w = arg0.w; - name = arg0.name; - if (arguments.length === 2) { - value = arguments[1]; - valueSpecified = true; - } - } else { - v = arg0; - w = arguments[1]; - name = arguments[3]; - if (arguments.length > 2) { - value = arguments[2]; - valueSpecified = true; - } - } - - v = '' + v; - w = '' + w; - if (!isUndefined/* default */.A(name)) { - name = '' + name; - } - - var e = edgeArgsToId(this._isDirected, v, w, name); - if (has/* default */.A(this._edgeLabels, e)) { - if (valueSpecified) { - this._edgeLabels[e] = value; - } - return this; - } - - if (!isUndefined/* default */.A(name) && !this._isMultigraph) { - throw new Error('Cannot set a named edge when isMultigraph = false'); - } - - // It didn't exist, so we need to create it. - // First ensure the nodes exist. - this.setNode(v); - this.setNode(w); - - // @ts-expect-error - this._edgeLabels[e] = valueSpecified ? value : this._defaultEdgeLabelFn(v, w, name); - - var edgeObj = edgeArgsToObj(this._isDirected, v, w, name); - // Ensure we add undirected edges in a consistent way. - v = edgeObj.v; - w = edgeObj.w; - - Object.freeze(edgeObj); - this._edgeObjs[e] = edgeObj; - incrementOrInitEntry(this._preds[w], v); - incrementOrInitEntry(this._sucs[v], w); - this._in[w][e] = edgeObj; - this._out[v][e] = edgeObj; - this._edgeCount++; - return this; - } - edge(v, w, name) { - var e = - arguments.length === 1 - ? edgeObjToId(this._isDirected, arguments[0]) - : edgeArgsToId(this._isDirected, v, w, name); - return this._edgeLabels[e]; - } - hasEdge(v, w, name) { - var e = - arguments.length === 1 - ? edgeObjToId(this._isDirected, arguments[0]) - : edgeArgsToId(this._isDirected, v, w, name); - return has/* default */.A(this._edgeLabels, e); - } - removeEdge(v, w, name) { - var e = - arguments.length === 1 - ? edgeObjToId(this._isDirected, arguments[0]) - : edgeArgsToId(this._isDirected, v, w, name); - var edge = this._edgeObjs[e]; - if (edge) { - v = edge.v; - w = edge.w; - delete this._edgeLabels[e]; - delete this._edgeObjs[e]; - decrementOrRemoveEntry(this._preds[w], v); - decrementOrRemoveEntry(this._sucs[v], w); - delete this._in[w][e]; - delete this._out[v][e]; - this._edgeCount--; - } - return this; - } - inEdges(v, u) { - var inV = this._in[v]; - if (inV) { - var edges = values/* default */.A(inV); - if (!u) { - return edges; - } - return filter/* default */.A(edges, function (edge) { - return edge.v === u; - }); - } - } - outEdges(v, w) { - var outV = this._out[v]; - if (outV) { - var edges = values/* default */.A(outV); - if (!w) { - return edges; - } - return filter/* default */.A(edges, function (edge) { - return edge.w === w; - }); - } - } - nodeEdges(v, w) { - var inEdges = this.inEdges(v, w); - if (inEdges) { - return inEdges.concat(this.outEdges(v, w)); - } - } -} - -/* Number of nodes in the graph. Should only be changed by the implementation. */ -Graph.prototype._nodeCount = 0; - -/* Number of edges in the graph. Should only be changed by the implementation. */ -Graph.prototype._edgeCount = 0; - -function incrementOrInitEntry(map, k) { - if (map[k]) { - map[k]++; - } else { - map[k] = 1; - } -} - -function decrementOrRemoveEntry(map, k) { - if (!--map[k]) { - delete map[k]; - } -} - -function edgeArgsToId(isDirected, v_, w_, name) { - var v = '' + v_; - var w = '' + w_; - if (!isDirected && v > w) { - var tmp = v; - v = w; - w = tmp; - } - return v + EDGE_KEY_DELIM + w + EDGE_KEY_DELIM + (isUndefined/* default */.A(name) ? DEFAULT_EDGE_NAME : name); -} - -function edgeArgsToObj(isDirected, v_, w_, name) { - var v = '' + v_; - var w = '' + w_; - if (!isDirected && v > w) { - var tmp = v; - v = w; - w = tmp; - } - var edgeObj = { v: v, w: w }; - if (name) { - edgeObj.name = name; - } - return edgeObj; -} - -function edgeObjToId(isDirected, edgeObj) { - return edgeArgsToId(isDirected, edgeObj.v, edgeObj.w, edgeObj.name); -} - - -/***/ }), - -/***/ 697: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ T: () => (/* reexport safe */ _graph_js__WEBPACK_IMPORTED_MODULE_0__.T) -/* harmony export */ }); -/* unused harmony export version */ -/* harmony import */ var _graph_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(73046); -// Includes only the "core" of graphlib - - - -const version = '2.1.9-pre'; - - - - -/***/ }), - -/***/ 14075: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ M: () => (/* binding */ write) -/* harmony export */ }); -/* unused harmony export read */ -/* harmony import */ var lodash_es__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(69592); -/* harmony import */ var lodash_es__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(50053); -/* harmony import */ var lodash_es__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(74722); -/* harmony import */ var _graph_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(73046); - - - - - -function write(g) { - var json = { - options: { - directed: g.isDirected(), - multigraph: g.isMultigraph(), - compound: g.isCompound(), - }, - nodes: writeNodes(g), - edges: writeEdges(g), - }; - if (!lodash_es__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A(g.graph())) { - json.value = lodash_es__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A(g.graph()); - } - return json; -} - -function writeNodes(g) { - return lodash_es__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A(g.nodes(), function (v) { - var nodeValue = g.node(v); - var parent = g.parent(v); - var node = { v: v }; - if (!lodash_es__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A(nodeValue)) { - node.value = nodeValue; - } - if (!lodash_es__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A(parent)) { - node.parent = parent; - } - return node; - }); -} - -function writeEdges(g) { - return lodash_es__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A(g.edges(), function (e) { - var edgeValue = g.edge(e); - var edge = { v: e.v, w: e.w }; - if (!lodash_es__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A(e.name)) { - edge.name = e.name; - } - if (!lodash_es__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A(edgeValue)) { - edge.value = edgeValue; - } - return edge; - }); -} - -function read(json) { - var g = new Graph(json.options).setGraph(json.value); - _.each(json.nodes, function (entry) { - g.setNode(entry.v, entry.value); - if (entry.parent) { - g.setParent(entry.v, entry.parent); - } - }); - _.each(json.edges, function (entry) { - g.setEdge({ v: entry.v, w: entry.w, name: entry.name }, entry.value); - }); - return g; -} - - -/***/ }), - -/***/ 75937: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _utils_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(72453); -/* harmony import */ var _color_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(74886); -/* IMPORT */ - - -/* MAIN */ -const channel = (color, channel) => { - return _utils_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.lang.round(_color_index_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A.parse(color)[channel]); -}; -/* EXPORT */ -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (channel); - - -/***/ }), - -/***/ 62062: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ _SetCache) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_MapCache.js + 14 modules -var _MapCache = __webpack_require__(29471); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_setCacheAdd.js -/** Used to stand-in for `undefined` hash values. */ -var HASH_UNDEFINED = '__lodash_hash_undefined__'; - -/** - * Adds `value` to the array cache. - * - * @private - * @name add - * @memberOf SetCache - * @alias push - * @param {*} value The value to cache. - * @returns {Object} Returns the cache instance. - */ -function setCacheAdd(value) { - this.__data__.set(value, HASH_UNDEFINED); - return this; -} - -/* harmony default export */ const _setCacheAdd = (setCacheAdd); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_setCacheHas.js -/** - * Checks if `value` is in the array cache. - * - * @private - * @name has - * @memberOf SetCache - * @param {*} value The value to search for. - * @returns {number} Returns `true` if `value` is found, else `false`. - */ -function setCacheHas(value) { - return this.__data__.has(value); -} - -/* harmony default export */ const _setCacheHas = (setCacheHas); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_SetCache.js - - - - -/** - * - * Creates an array cache object to store unique values. - * - * @private - * @constructor - * @param {Array} [values] The values to cache. - */ -function SetCache(values) { - var index = -1, - length = values == null ? 0 : values.length; - - this.__data__ = new _MapCache/* default */.A; - while (++index < length) { - this.add(values[index]); - } -} - -// Add methods to `SetCache`. -SetCache.prototype.add = SetCache.prototype.push = _setCacheAdd; -SetCache.prototype.has = _setCacheHas; - -/* harmony default export */ const _SetCache = (SetCache); - - -/***/ }), - -/***/ 72641: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * A specialized version of `_.forEach` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns `array`. - */ -function arrayEach(array, iteratee) { - var index = -1, - length = array == null ? 0 : array.length; - - while (++index < length) { - if (iteratee(array[index], index, array) === false) { - break; - } - } - return array; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (arrayEach); - - -/***/ }), - -/***/ 2634: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * A specialized version of `_.filter` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {Array} Returns the new filtered array. - */ -function arrayFilter(array, predicate) { - var index = -1, - length = array == null ? 0 : array.length, - resIndex = 0, - result = []; - - while (++index < length) { - var value = array[index]; - if (predicate(value, index, array)) { - result[resIndex++] = value; - } - } - return result; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (arrayFilter); - - -/***/ }), - -/***/ 45572: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * A specialized version of `_.map` for arrays without support for iteratee - * shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the new mapped array. - */ -function arrayMap(array, iteratee) { - var index = -1, - length = array == null ? 0 : array.length, - result = Array(length); - - while (++index < length) { - result[index] = iteratee(array[index], index, array); - } - return result; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (arrayMap); - - -/***/ }), - -/***/ 76912: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * Appends the elements of `values` to `array`. - * - * @private - * @param {Array} array The array to modify. - * @param {Array} values The values to append. - * @returns {Array} Returns `array`. - */ -function arrayPush(array, values) { - var index = -1, - length = values.length, - offset = array.length; - - while (++index < length) { - array[offset + index] = values[index]; - } - return array; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (arrayPush); - - -/***/ }), - -/***/ 91641: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ _baseClone) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_Stack.js + 5 modules -var _Stack = __webpack_require__(11754); -// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayEach.js -var _arrayEach = __webpack_require__(72641); -// EXTERNAL MODULE: ./node_modules/lodash-es/_assignValue.js -var _assignValue = __webpack_require__(52851); -// EXTERNAL MODULE: ./node_modules/lodash-es/_copyObject.js -var _copyObject = __webpack_require__(22031); -// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js -var keys = __webpack_require__(27422); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseAssign.js - - - -/** - * The base implementation of `_.assign` without support for multiple sources - * or `customizer` functions. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @returns {Object} Returns `object`. - */ -function baseAssign(object, source) { - return object && (0,_copyObject/* default */.A)(source, (0,keys/* default */.A)(source), object); -} - -/* harmony default export */ const _baseAssign = (baseAssign); - -// EXTERNAL MODULE: ./node_modules/lodash-es/keysIn.js + 2 modules -var keysIn = __webpack_require__(55615); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseAssignIn.js - - - -/** - * The base implementation of `_.assignIn` without support for multiple sources - * or `customizer` functions. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @returns {Object} Returns `object`. - */ -function baseAssignIn(object, source) { - return object && (0,_copyObject/* default */.A)(source, (0,keysIn/* default */.A)(source), object); -} - -/* harmony default export */ const _baseAssignIn = (baseAssignIn); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_cloneBuffer.js -var _cloneBuffer = __webpack_require__(80154); -// EXTERNAL MODULE: ./node_modules/lodash-es/_copyArray.js -var _copyArray = __webpack_require__(39759); -// EXTERNAL MODULE: ./node_modules/lodash-es/_getSymbols.js -var _getSymbols = __webpack_require__(14792); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_copySymbols.js - - - -/** - * Copies own symbols of `source` to `object`. - * - * @private - * @param {Object} source The object to copy symbols from. - * @param {Object} [object={}] The object to copy symbols to. - * @returns {Object} Returns `object`. - */ -function copySymbols(source, object) { - return (0,_copyObject/* default */.A)(source, (0,_getSymbols/* default */.A)(source), object); -} - -/* harmony default export */ const _copySymbols = (copySymbols); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayPush.js -var _arrayPush = __webpack_require__(76912); -// EXTERNAL MODULE: ./node_modules/lodash-es/_getPrototype.js -var _getPrototype = __webpack_require__(15647); -// EXTERNAL MODULE: ./node_modules/lodash-es/stubArray.js -var stubArray = __webpack_require__(13153); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_getSymbolsIn.js - - - - - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeGetSymbols = Object.getOwnPropertySymbols; - -/** - * Creates an array of the own and inherited enumerable symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of symbols. - */ -var getSymbolsIn = !nativeGetSymbols ? stubArray/* default */.A : function(object) { - var result = []; - while (object) { - (0,_arrayPush/* default */.A)(result, (0,_getSymbols/* default */.A)(object)); - object = (0,_getPrototype/* default */.A)(object); - } - return result; -}; - -/* harmony default export */ const _getSymbolsIn = (getSymbolsIn); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_copySymbolsIn.js - - - -/** - * Copies own and inherited symbols of `source` to `object`. - * - * @private - * @param {Object} source The object to copy symbols from. - * @param {Object} [object={}] The object to copy symbols to. - * @returns {Object} Returns `object`. - */ -function copySymbolsIn(source, object) { - return (0,_copyObject/* default */.A)(source, _getSymbolsIn(source), object); -} - -/* harmony default export */ const _copySymbolsIn = (copySymbolsIn); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_getAllKeys.js -var _getAllKeys = __webpack_require__(19042); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGetAllKeys.js -var _baseGetAllKeys = __webpack_require__(33831); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_getAllKeysIn.js - - - - -/** - * Creates an array of own and inherited enumerable property names and - * symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names and symbols. - */ -function getAllKeysIn(object) { - return (0,_baseGetAllKeys/* default */.A)(object, keysIn/* default */.A, _getSymbolsIn); -} - -/* harmony default export */ const _getAllKeysIn = (getAllKeysIn); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_getTag.js + 3 modules -var _getTag = __webpack_require__(9779); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_initCloneArray.js -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var _initCloneArray_hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Initializes an array clone. - * - * @private - * @param {Array} array The array to clone. - * @returns {Array} Returns the initialized clone. - */ -function initCloneArray(array) { - var length = array.length, - result = new array.constructor(length); - - // Add properties assigned by `RegExp#exec`. - if (length && typeof array[0] == 'string' && _initCloneArray_hasOwnProperty.call(array, 'index')) { - result.index = array.index; - result.input = array.input; - } - return result; -} - -/* harmony default export */ const _initCloneArray = (initCloneArray); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_cloneArrayBuffer.js -var _cloneArrayBuffer = __webpack_require__(90565); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_cloneDataView.js - - -/** - * Creates a clone of `dataView`. - * - * @private - * @param {Object} dataView The data view to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the cloned data view. - */ -function cloneDataView(dataView, isDeep) { - var buffer = isDeep ? (0,_cloneArrayBuffer/* default */.A)(dataView.buffer) : dataView.buffer; - return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); -} - -/* harmony default export */ const _cloneDataView = (cloneDataView); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_cloneRegExp.js -/** Used to match `RegExp` flags from their coerced string values. */ -var reFlags = /\w*$/; - -/** - * Creates a clone of `regexp`. - * - * @private - * @param {Object} regexp The regexp to clone. - * @returns {Object} Returns the cloned regexp. - */ -function cloneRegExp(regexp) { - var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); - result.lastIndex = regexp.lastIndex; - return result; -} - -/* harmony default export */ const _cloneRegExp = (cloneRegExp); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_Symbol.js -var _Symbol = __webpack_require__(241); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_cloneSymbol.js - - -/** Used to convert symbols to primitives and strings. */ -var symbolProto = _Symbol/* default */.A ? _Symbol/* default */.A.prototype : undefined, - symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; - -/** - * Creates a clone of the `symbol` object. - * - * @private - * @param {Object} symbol The symbol object to clone. - * @returns {Object} Returns the cloned symbol object. - */ -function cloneSymbol(symbol) { - return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; -} - -/* harmony default export */ const _cloneSymbol = (cloneSymbol); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_cloneTypedArray.js -var _cloneTypedArray = __webpack_require__(1801); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_initCloneByTag.js - - - - - - -/** `Object#toString` result references. */ -var boolTag = '[object Boolean]', - dateTag = '[object Date]', - mapTag = '[object Map]', - numberTag = '[object Number]', - regexpTag = '[object RegExp]', - setTag = '[object Set]', - stringTag = '[object String]', - symbolTag = '[object Symbol]'; - -var arrayBufferTag = '[object ArrayBuffer]', - dataViewTag = '[object DataView]', - float32Tag = '[object Float32Array]', - float64Tag = '[object Float64Array]', - int8Tag = '[object Int8Array]', - int16Tag = '[object Int16Array]', - int32Tag = '[object Int32Array]', - uint8Tag = '[object Uint8Array]', - uint8ClampedTag = '[object Uint8ClampedArray]', - uint16Tag = '[object Uint16Array]', - uint32Tag = '[object Uint32Array]'; - -/** - * Initializes an object clone based on its `toStringTag`. - * - * **Note:** This function only supports cloning values with tags of - * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`. - * - * @private - * @param {Object} object The object to clone. - * @param {string} tag The `toStringTag` of the object to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the initialized clone. - */ -function initCloneByTag(object, tag, isDeep) { - var Ctor = object.constructor; - switch (tag) { - case arrayBufferTag: - return (0,_cloneArrayBuffer/* default */.A)(object); - - case boolTag: - case dateTag: - return new Ctor(+object); - - case dataViewTag: - return _cloneDataView(object, isDeep); - - case float32Tag: case float64Tag: - case int8Tag: case int16Tag: case int32Tag: - case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: - return (0,_cloneTypedArray/* default */.A)(object, isDeep); - - case mapTag: - return new Ctor; - - case numberTag: - case stringTag: - return new Ctor(object); - - case regexpTag: - return _cloneRegExp(object); - - case setTag: - return new Ctor; - - case symbolTag: - return _cloneSymbol(object); - } -} - -/* harmony default export */ const _initCloneByTag = (initCloneByTag); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_initCloneObject.js + 1 modules -var _initCloneObject = __webpack_require__(18598); -// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js -var isArray = __webpack_require__(92049); -// EXTERNAL MODULE: ./node_modules/lodash-es/isBuffer.js + 1 modules -var isBuffer = __webpack_require__(99912); -// EXTERNAL MODULE: ./node_modules/lodash-es/isObjectLike.js -var isObjectLike = __webpack_require__(53098); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsMap.js - - - -/** `Object#toString` result references. */ -var _baseIsMap_mapTag = '[object Map]'; - -/** - * The base implementation of `_.isMap` without Node.js optimizations. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a map, else `false`. - */ -function baseIsMap(value) { - return (0,isObjectLike/* default */.A)(value) && (0,_getTag/* default */.A)(value) == _baseIsMap_mapTag; -} - -/* harmony default export */ const _baseIsMap = (baseIsMap); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseUnary.js -var _baseUnary = __webpack_require__(52789); -// EXTERNAL MODULE: ./node_modules/lodash-es/_nodeUtil.js -var _nodeUtil = __webpack_require__(64841); -;// CONCATENATED MODULE: ./node_modules/lodash-es/isMap.js - - - - -/* Node.js helper references. */ -var nodeIsMap = _nodeUtil/* default */.A && _nodeUtil/* default */.A.isMap; - -/** - * Checks if `value` is classified as a `Map` object. - * - * @static - * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a map, else `false`. - * @example - * - * _.isMap(new Map); - * // => true - * - * _.isMap(new WeakMap); - * // => false - */ -var isMap = nodeIsMap ? (0,_baseUnary/* default */.A)(nodeIsMap) : _baseIsMap; - -/* harmony default export */ const lodash_es_isMap = (isMap); - -// EXTERNAL MODULE: ./node_modules/lodash-es/isObject.js -var isObject = __webpack_require__(23149); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsSet.js - - - -/** `Object#toString` result references. */ -var _baseIsSet_setTag = '[object Set]'; - -/** - * The base implementation of `_.isSet` without Node.js optimizations. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a set, else `false`. - */ -function baseIsSet(value) { - return (0,isObjectLike/* default */.A)(value) && (0,_getTag/* default */.A)(value) == _baseIsSet_setTag; -} - -/* harmony default export */ const _baseIsSet = (baseIsSet); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/isSet.js - - - - -/* Node.js helper references. */ -var nodeIsSet = _nodeUtil/* default */.A && _nodeUtil/* default */.A.isSet; - -/** - * Checks if `value` is classified as a `Set` object. - * - * @static - * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a set, else `false`. - * @example - * - * _.isSet(new Set); - * // => true - * - * _.isSet(new WeakSet); - * // => false - */ -var isSet = nodeIsSet ? (0,_baseUnary/* default */.A)(nodeIsSet) : _baseIsSet; - -/* harmony default export */ const lodash_es_isSet = (isSet); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseClone.js - - - - - - - - - - - - - - - - - - - - - - - -/** Used to compose bitmasks for cloning. */ -var CLONE_DEEP_FLAG = 1, - CLONE_FLAT_FLAG = 2, - CLONE_SYMBOLS_FLAG = 4; - -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - _baseClone_boolTag = '[object Boolean]', - _baseClone_dateTag = '[object Date]', - errorTag = '[object Error]', - funcTag = '[object Function]', - genTag = '[object GeneratorFunction]', - _baseClone_mapTag = '[object Map]', - _baseClone_numberTag = '[object Number]', - objectTag = '[object Object]', - _baseClone_regexpTag = '[object RegExp]', - _baseClone_setTag = '[object Set]', - _baseClone_stringTag = '[object String]', - _baseClone_symbolTag = '[object Symbol]', - weakMapTag = '[object WeakMap]'; - -var _baseClone_arrayBufferTag = '[object ArrayBuffer]', - _baseClone_dataViewTag = '[object DataView]', - _baseClone_float32Tag = '[object Float32Array]', - _baseClone_float64Tag = '[object Float64Array]', - _baseClone_int8Tag = '[object Int8Array]', - _baseClone_int16Tag = '[object Int16Array]', - _baseClone_int32Tag = '[object Int32Array]', - _baseClone_uint8Tag = '[object Uint8Array]', - _baseClone_uint8ClampedTag = '[object Uint8ClampedArray]', - _baseClone_uint16Tag = '[object Uint16Array]', - _baseClone_uint32Tag = '[object Uint32Array]'; - -/** Used to identify `toStringTag` values supported by `_.clone`. */ -var cloneableTags = {}; -cloneableTags[argsTag] = cloneableTags[arrayTag] = -cloneableTags[_baseClone_arrayBufferTag] = cloneableTags[_baseClone_dataViewTag] = -cloneableTags[_baseClone_boolTag] = cloneableTags[_baseClone_dateTag] = -cloneableTags[_baseClone_float32Tag] = cloneableTags[_baseClone_float64Tag] = -cloneableTags[_baseClone_int8Tag] = cloneableTags[_baseClone_int16Tag] = -cloneableTags[_baseClone_int32Tag] = cloneableTags[_baseClone_mapTag] = -cloneableTags[_baseClone_numberTag] = cloneableTags[objectTag] = -cloneableTags[_baseClone_regexpTag] = cloneableTags[_baseClone_setTag] = -cloneableTags[_baseClone_stringTag] = cloneableTags[_baseClone_symbolTag] = -cloneableTags[_baseClone_uint8Tag] = cloneableTags[_baseClone_uint8ClampedTag] = -cloneableTags[_baseClone_uint16Tag] = cloneableTags[_baseClone_uint32Tag] = true; -cloneableTags[errorTag] = cloneableTags[funcTag] = -cloneableTags[weakMapTag] = false; - -/** - * The base implementation of `_.clone` and `_.cloneDeep` which tracks - * traversed objects. - * - * @private - * @param {*} value The value to clone. - * @param {boolean} bitmask The bitmask flags. - * 1 - Deep clone - * 2 - Flatten inherited properties - * 4 - Clone symbols - * @param {Function} [customizer] The function to customize cloning. - * @param {string} [key] The key of `value`. - * @param {Object} [object] The parent object of `value`. - * @param {Object} [stack] Tracks traversed objects and their clone counterparts. - * @returns {*} Returns the cloned value. - */ -function baseClone(value, bitmask, customizer, key, object, stack) { - var result, - isDeep = bitmask & CLONE_DEEP_FLAG, - isFlat = bitmask & CLONE_FLAT_FLAG, - isFull = bitmask & CLONE_SYMBOLS_FLAG; - - if (customizer) { - result = object ? customizer(value, key, object, stack) : customizer(value); - } - if (result !== undefined) { - return result; - } - if (!(0,isObject/* default */.A)(value)) { - return value; - } - var isArr = (0,isArray/* default */.A)(value); - if (isArr) { - result = _initCloneArray(value); - if (!isDeep) { - return (0,_copyArray/* default */.A)(value, result); - } - } else { - var tag = (0,_getTag/* default */.A)(value), - isFunc = tag == funcTag || tag == genTag; - - if ((0,isBuffer/* default */.A)(value)) { - return (0,_cloneBuffer/* default */.A)(value, isDeep); - } - if (tag == objectTag || tag == argsTag || (isFunc && !object)) { - result = (isFlat || isFunc) ? {} : (0,_initCloneObject/* default */.A)(value); - if (!isDeep) { - return isFlat - ? _copySymbolsIn(value, _baseAssignIn(result, value)) - : _copySymbols(value, _baseAssign(result, value)); - } - } else { - if (!cloneableTags[tag]) { - return object ? value : {}; - } - result = _initCloneByTag(value, tag, isDeep); - } - } - // Check for circular references and return its corresponding clone. - stack || (stack = new _Stack/* default */.A); - var stacked = stack.get(value); - if (stacked) { - return stacked; - } - stack.set(value, result); - - if (lodash_es_isSet(value)) { - value.forEach(function(subValue) { - result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack)); - }); - } else if (lodash_es_isMap(value)) { - value.forEach(function(subValue, key) { - result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack)); - }); - } - - var keysFunc = isFull - ? (isFlat ? _getAllKeysIn : _getAllKeys/* default */.A) - : (isFlat ? keysIn/* default */.A : keys/* default */.A); - - var props = isArr ? undefined : keysFunc(value); - (0,_arrayEach/* default */.A)(props || value, function(subValue, key) { - if (props) { - key = subValue; - subValue = value[key]; - } - // Recursively populate clone (susceptible to call stack limits). - (0,_assignValue/* default */.A)(result, key, baseClone(subValue, bitmask, customizer, key, value, stack)); - }); - return result; -} - -/* harmony default export */ const _baseClone = (baseClone); - - -/***/ }), - -/***/ 6240: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ _baseEach) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseForOwn.js -var _baseForOwn = __webpack_require__(79841); -// EXTERNAL MODULE: ./node_modules/lodash-es/isArrayLike.js -var isArrayLike = __webpack_require__(38446); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_createBaseEach.js - - -/** - * Creates a `baseEach` or `baseEachRight` function. - * - * @private - * @param {Function} eachFunc The function to iterate over a collection. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new base function. - */ -function createBaseEach(eachFunc, fromRight) { - return function(collection, iteratee) { - if (collection == null) { - return collection; - } - if (!(0,isArrayLike/* default */.A)(collection)) { - return eachFunc(collection, iteratee); - } - var length = collection.length, - index = fromRight ? length : -1, - iterable = Object(collection); - - while ((fromRight ? index-- : ++index < length)) { - if (iteratee(iterable[index], index, iterable) === false) { - break; - } - } - return collection; - }; -} - -/* harmony default export */ const _createBaseEach = (createBaseEach); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseEach.js - - - -/** - * The base implementation of `_.forEach` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array|Object} Returns `collection`. - */ -var baseEach = _createBaseEach(_baseForOwn/* default */.A); - -/* harmony default export */ const _baseEach = (baseEach); - - -/***/ }), - -/***/ 25707: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * The base implementation of `_.findIndex` and `_.findLastIndex` without - * support for iteratee shorthands. - * - * @private - * @param {Array} array The array to inspect. - * @param {Function} predicate The function invoked per iteration. - * @param {number} fromIndex The index to search from. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function baseFindIndex(array, predicate, fromIndex, fromRight) { - var length = array.length, - index = fromIndex + (fromRight ? 1 : -1); - - while ((fromRight ? index-- : ++index < length)) { - if (predicate(array[index], index, array)) { - return index; - } - } - return -1; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseFindIndex); - - -/***/ }), - -/***/ 13588: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ _baseFlatten) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayPush.js -var _arrayPush = __webpack_require__(76912); -// EXTERNAL MODULE: ./node_modules/lodash-es/_Symbol.js -var _Symbol = __webpack_require__(241); -// EXTERNAL MODULE: ./node_modules/lodash-es/isArguments.js + 1 modules -var isArguments = __webpack_require__(52274); -// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js -var isArray = __webpack_require__(92049); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_isFlattenable.js - - - - -/** Built-in value references. */ -var spreadableSymbol = _Symbol/* default */.A ? _Symbol/* default */.A.isConcatSpreadable : undefined; - -/** - * Checks if `value` is a flattenable `arguments` object or array. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. - */ -function isFlattenable(value) { - return (0,isArray/* default */.A)(value) || (0,isArguments/* default */.A)(value) || - !!(spreadableSymbol && value && value[spreadableSymbol]); -} - -/* harmony default export */ const _isFlattenable = (isFlattenable); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseFlatten.js - - - -/** - * The base implementation of `_.flatten` with support for restricting flattening. - * - * @private - * @param {Array} array The array to flatten. - * @param {number} depth The maximum recursion depth. - * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. - * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. - * @param {Array} [result=[]] The initial result value. - * @returns {Array} Returns the new flattened array. - */ -function baseFlatten(array, depth, predicate, isStrict, result) { - var index = -1, - length = array.length; - - predicate || (predicate = _isFlattenable); - result || (result = []); - - while (++index < length) { - var value = array[index]; - if (depth > 0 && predicate(value)) { - if (depth > 1) { - // Recursively flatten arrays (susceptible to call stack limits). - baseFlatten(value, depth - 1, predicate, isStrict, result); - } else { - (0,_arrayPush/* default */.A)(result, value); - } - } else if (!isStrict) { - result[result.length] = value; - } - } - return result; -} - -/* harmony default export */ const _baseFlatten = (baseFlatten); - - -/***/ }), - -/***/ 79841: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _baseFor_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4574); -/* harmony import */ var _keys_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(27422); - - - -/** - * The base implementation of `_.forOwn` without support for iteratee shorthands. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Object} Returns `object`. - */ -function baseForOwn(object, iteratee) { - return object && (0,_baseFor_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(object, iteratee, _keys_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseForOwn); - - -/***/ }), - -/***/ 66318: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _castPath_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7819); -/* harmony import */ var _toKey_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(30901); - - - -/** - * The base implementation of `_.get` without support for default values. - * - * @private - * @param {Object} object The object to query. - * @param {Array|string} path The path of the property to get. - * @returns {*} Returns the resolved value. - */ -function baseGet(object, path) { - path = (0,_castPath_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(path, object); - - var index = 0, - length = path.length; - - while (object != null && index < length) { - object = object[(0,_toKey_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(path[index++])]; - } - return (index && index == length) ? object : undefined; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseGet); - - -/***/ }), - -/***/ 33831: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _arrayPush_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(76912); -/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(92049); - - - -/** - * The base implementation of `getAllKeys` and `getAllKeysIn` which uses - * `keysFunc` and `symbolsFunc` to get the enumerable property names and - * symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @param {Function} keysFunc The function to get the keys of `object`. - * @param {Function} symbolsFunc The function to get the symbols of `object`. - * @returns {Array} Returns the array of property names and symbols. - */ -function baseGetAllKeys(object, keysFunc, symbolsFunc) { - var result = keysFunc(object); - return (0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(object) ? result : (0,_arrayPush_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(result, symbolsFunc(object)); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseGetAllKeys); - - -/***/ }), - -/***/ 49574: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ _baseIteratee) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_Stack.js + 5 modules -var _Stack = __webpack_require__(11754); -// EXTERNAL MODULE: ./node_modules/lodash-es/_SetCache.js + 2 modules -var _SetCache = __webpack_require__(62062); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_arraySome.js -/** - * A specialized version of `_.some` for arrays without support for iteratee - * shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {boolean} Returns `true` if any element passes the predicate check, - * else `false`. - */ -function arraySome(array, predicate) { - var index = -1, - length = array == null ? 0 : array.length; - - while (++index < length) { - if (predicate(array[index], index, array)) { - return true; - } - } - return false; -} - -/* harmony default export */ const _arraySome = (arraySome); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_cacheHas.js -var _cacheHas = __webpack_require__(64099); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_equalArrays.js - - - - -/** Used to compose bitmasks for value comparisons. */ -var COMPARE_PARTIAL_FLAG = 1, - COMPARE_UNORDERED_FLAG = 2; - -/** - * A specialized version of `baseIsEqualDeep` for arrays with support for - * partial deep comparisons. - * - * @private - * @param {Array} array The array to compare. - * @param {Array} other The other array to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} stack Tracks traversed `array` and `other` objects. - * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. - */ -function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { - var isPartial = bitmask & COMPARE_PARTIAL_FLAG, - arrLength = array.length, - othLength = other.length; - - if (arrLength != othLength && !(isPartial && othLength > arrLength)) { - return false; - } - // Check that cyclic values are equal. - var arrStacked = stack.get(array); - var othStacked = stack.get(other); - if (arrStacked && othStacked) { - return arrStacked == other && othStacked == array; - } - var index = -1, - result = true, - seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new _SetCache/* default */.A : undefined; - - stack.set(array, other); - stack.set(other, array); - - // Ignore non-index properties. - while (++index < arrLength) { - var arrValue = array[index], - othValue = other[index]; - - if (customizer) { - var compared = isPartial - ? customizer(othValue, arrValue, index, other, array, stack) - : customizer(arrValue, othValue, index, array, other, stack); - } - if (compared !== undefined) { - if (compared) { - continue; - } - result = false; - break; - } - // Recursively compare arrays (susceptible to call stack limits). - if (seen) { - if (!_arraySome(other, function(othValue, othIndex) { - if (!(0,_cacheHas/* default */.A)(seen, othIndex) && - (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { - return seen.push(othIndex); - } - })) { - result = false; - break; - } - } else if (!( - arrValue === othValue || - equalFunc(arrValue, othValue, bitmask, customizer, stack) - )) { - result = false; - break; - } - } - stack['delete'](array); - stack['delete'](other); - return result; -} - -/* harmony default export */ const _equalArrays = (equalArrays); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_Symbol.js -var _Symbol = __webpack_require__(241); -// EXTERNAL MODULE: ./node_modules/lodash-es/_Uint8Array.js -var _Uint8Array = __webpack_require__(43988); -// EXTERNAL MODULE: ./node_modules/lodash-es/eq.js -var eq = __webpack_require__(66984); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_mapToArray.js -/** - * Converts `map` to its key-value pairs. - * - * @private - * @param {Object} map The map to convert. - * @returns {Array} Returns the key-value pairs. - */ -function mapToArray(map) { - var index = -1, - result = Array(map.size); - - map.forEach(function(value, key) { - result[++index] = [key, value]; - }); - return result; -} - -/* harmony default export */ const _mapToArray = (mapToArray); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_setToArray.js -var _setToArray = __webpack_require__(29959); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_equalByTag.js - - - - - - - -/** Used to compose bitmasks for value comparisons. */ -var _equalByTag_COMPARE_PARTIAL_FLAG = 1, - _equalByTag_COMPARE_UNORDERED_FLAG = 2; - -/** `Object#toString` result references. */ -var boolTag = '[object Boolean]', - dateTag = '[object Date]', - errorTag = '[object Error]', - mapTag = '[object Map]', - numberTag = '[object Number]', - regexpTag = '[object RegExp]', - setTag = '[object Set]', - stringTag = '[object String]', - symbolTag = '[object Symbol]'; - -var arrayBufferTag = '[object ArrayBuffer]', - dataViewTag = '[object DataView]'; - -/** Used to convert symbols to primitives and strings. */ -var symbolProto = _Symbol/* default */.A ? _Symbol/* default */.A.prototype : undefined, - symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; - -/** - * A specialized version of `baseIsEqualDeep` for comparing objects of - * the same `toStringTag`. - * - * **Note:** This function only supports comparing values with tags of - * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {string} tag The `toStringTag` of the objects to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} stack Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ -function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { - switch (tag) { - case dataViewTag: - if ((object.byteLength != other.byteLength) || - (object.byteOffset != other.byteOffset)) { - return false; - } - object = object.buffer; - other = other.buffer; - - case arrayBufferTag: - if ((object.byteLength != other.byteLength) || - !equalFunc(new _Uint8Array/* default */.A(object), new _Uint8Array/* default */.A(other))) { - return false; - } - return true; - - case boolTag: - case dateTag: - case numberTag: - // Coerce booleans to `1` or `0` and dates to milliseconds. - // Invalid dates are coerced to `NaN`. - return (0,eq/* default */.A)(+object, +other); - - case errorTag: - return object.name == other.name && object.message == other.message; - - case regexpTag: - case stringTag: - // Coerce regexes to strings and treat strings, primitives and objects, - // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring - // for more details. - return object == (other + ''); - - case mapTag: - var convert = _mapToArray; - - case setTag: - var isPartial = bitmask & _equalByTag_COMPARE_PARTIAL_FLAG; - convert || (convert = _setToArray/* default */.A); - - if (object.size != other.size && !isPartial) { - return false; - } - // Assume cyclic values are equal. - var stacked = stack.get(object); - if (stacked) { - return stacked == other; - } - bitmask |= _equalByTag_COMPARE_UNORDERED_FLAG; - - // Recursively compare objects (susceptible to call stack limits). - stack.set(object, other); - var result = _equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); - stack['delete'](object); - return result; - - case symbolTag: - if (symbolValueOf) { - return symbolValueOf.call(object) == symbolValueOf.call(other); - } - } - return false; -} - -/* harmony default export */ const _equalByTag = (equalByTag); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_getAllKeys.js -var _getAllKeys = __webpack_require__(19042); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_equalObjects.js - - -/** Used to compose bitmasks for value comparisons. */ -var _equalObjects_COMPARE_PARTIAL_FLAG = 1; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var _equalObjects_hasOwnProperty = objectProto.hasOwnProperty; - -/** - * A specialized version of `baseIsEqualDeep` for objects with support for - * partial deep comparisons. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} stack Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ -function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { - var isPartial = bitmask & _equalObjects_COMPARE_PARTIAL_FLAG, - objProps = (0,_getAllKeys/* default */.A)(object), - objLength = objProps.length, - othProps = (0,_getAllKeys/* default */.A)(other), - othLength = othProps.length; - - if (objLength != othLength && !isPartial) { - return false; - } - var index = objLength; - while (index--) { - var key = objProps[index]; - if (!(isPartial ? key in other : _equalObjects_hasOwnProperty.call(other, key))) { - return false; - } - } - // Check that cyclic values are equal. - var objStacked = stack.get(object); - var othStacked = stack.get(other); - if (objStacked && othStacked) { - return objStacked == other && othStacked == object; - } - var result = true; - stack.set(object, other); - stack.set(other, object); - - var skipCtor = isPartial; - while (++index < objLength) { - key = objProps[index]; - var objValue = object[key], - othValue = other[key]; - - if (customizer) { - var compared = isPartial - ? customizer(othValue, objValue, key, other, object, stack) - : customizer(objValue, othValue, key, object, other, stack); - } - // Recursively compare objects (susceptible to call stack limits). - if (!(compared === undefined - ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) - : compared - )) { - result = false; - break; - } - skipCtor || (skipCtor = key == 'constructor'); - } - if (result && !skipCtor) { - var objCtor = object.constructor, - othCtor = other.constructor; - - // Non `Object` object instances with different constructors are not equal. - if (objCtor != othCtor && - ('constructor' in object && 'constructor' in other) && - !(typeof objCtor == 'function' && objCtor instanceof objCtor && - typeof othCtor == 'function' && othCtor instanceof othCtor)) { - result = false; - } - } - stack['delete'](object); - stack['delete'](other); - return result; -} - -/* harmony default export */ const _equalObjects = (equalObjects); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_getTag.js + 3 modules -var _getTag = __webpack_require__(9779); -// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js -var isArray = __webpack_require__(92049); -// EXTERNAL MODULE: ./node_modules/lodash-es/isBuffer.js + 1 modules -var isBuffer = __webpack_require__(99912); -// EXTERNAL MODULE: ./node_modules/lodash-es/isTypedArray.js + 1 modules -var isTypedArray = __webpack_require__(33858); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsEqualDeep.js - - - - - - - - - -/** Used to compose bitmasks for value comparisons. */ -var _baseIsEqualDeep_COMPARE_PARTIAL_FLAG = 1; - -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - objectTag = '[object Object]'; - -/** Used for built-in method references. */ -var _baseIsEqualDeep_objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var _baseIsEqualDeep_hasOwnProperty = _baseIsEqualDeep_objectProto.hasOwnProperty; - -/** - * A specialized version of `baseIsEqual` for arrays and objects which performs - * deep comparisons and tracks traversed objects enabling objects with circular - * references to be compared. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} [stack] Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ -function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { - var objIsArr = (0,isArray/* default */.A)(object), - othIsArr = (0,isArray/* default */.A)(other), - objTag = objIsArr ? arrayTag : (0,_getTag/* default */.A)(object), - othTag = othIsArr ? arrayTag : (0,_getTag/* default */.A)(other); - - objTag = objTag == argsTag ? objectTag : objTag; - othTag = othTag == argsTag ? objectTag : othTag; - - var objIsObj = objTag == objectTag, - othIsObj = othTag == objectTag, - isSameTag = objTag == othTag; - - if (isSameTag && (0,isBuffer/* default */.A)(object)) { - if (!(0,isBuffer/* default */.A)(other)) { - return false; - } - objIsArr = true; - objIsObj = false; - } - if (isSameTag && !objIsObj) { - stack || (stack = new _Stack/* default */.A); - return (objIsArr || (0,isTypedArray/* default */.A)(object)) - ? _equalArrays(object, other, bitmask, customizer, equalFunc, stack) - : _equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); - } - if (!(bitmask & _baseIsEqualDeep_COMPARE_PARTIAL_FLAG)) { - var objIsWrapped = objIsObj && _baseIsEqualDeep_hasOwnProperty.call(object, '__wrapped__'), - othIsWrapped = othIsObj && _baseIsEqualDeep_hasOwnProperty.call(other, '__wrapped__'); - - if (objIsWrapped || othIsWrapped) { - var objUnwrapped = objIsWrapped ? object.value() : object, - othUnwrapped = othIsWrapped ? other.value() : other; - - stack || (stack = new _Stack/* default */.A); - return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); - } - } - if (!isSameTag) { - return false; - } - stack || (stack = new _Stack/* default */.A); - return _equalObjects(object, other, bitmask, customizer, equalFunc, stack); -} - -/* harmony default export */ const _baseIsEqualDeep = (baseIsEqualDeep); - -// EXTERNAL MODULE: ./node_modules/lodash-es/isObjectLike.js -var isObjectLike = __webpack_require__(53098); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsEqual.js - - - -/** - * The base implementation of `_.isEqual` which supports partial comparisons - * and tracks traversed objects. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @param {boolean} bitmask The bitmask flags. - * 1 - Unordered comparison - * 2 - Partial comparison - * @param {Function} [customizer] The function to customize comparisons. - * @param {Object} [stack] Tracks traversed `value` and `other` objects. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - */ -function baseIsEqual(value, other, bitmask, customizer, stack) { - if (value === other) { - return true; - } - if (value == null || other == null || (!(0,isObjectLike/* default */.A)(value) && !(0,isObjectLike/* default */.A)(other))) { - return value !== value && other !== other; - } - return _baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); -} - -/* harmony default export */ const _baseIsEqual = (baseIsEqual); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsMatch.js - - - -/** Used to compose bitmasks for value comparisons. */ -var _baseIsMatch_COMPARE_PARTIAL_FLAG = 1, - _baseIsMatch_COMPARE_UNORDERED_FLAG = 2; - -/** - * The base implementation of `_.isMatch` without support for iteratee shorthands. - * - * @private - * @param {Object} object The object to inspect. - * @param {Object} source The object of property values to match. - * @param {Array} matchData The property names, values, and compare flags to match. - * @param {Function} [customizer] The function to customize comparisons. - * @returns {boolean} Returns `true` if `object` is a match, else `false`. - */ -function baseIsMatch(object, source, matchData, customizer) { - var index = matchData.length, - length = index, - noCustomizer = !customizer; - - if (object == null) { - return !length; - } - object = Object(object); - while (index--) { - var data = matchData[index]; - if ((noCustomizer && data[2]) - ? data[1] !== object[data[0]] - : !(data[0] in object) - ) { - return false; - } - } - while (++index < length) { - data = matchData[index]; - var key = data[0], - objValue = object[key], - srcValue = data[1]; - - if (noCustomizer && data[2]) { - if (objValue === undefined && !(key in object)) { - return false; - } - } else { - var stack = new _Stack/* default */.A; - if (customizer) { - var result = customizer(objValue, srcValue, key, object, source, stack); - } - if (!(result === undefined - ? _baseIsEqual(srcValue, objValue, _baseIsMatch_COMPARE_PARTIAL_FLAG | _baseIsMatch_COMPARE_UNORDERED_FLAG, customizer, stack) - : result - )) { - return false; - } - } - } - return true; -} - -/* harmony default export */ const _baseIsMatch = (baseIsMatch); - -// EXTERNAL MODULE: ./node_modules/lodash-es/isObject.js -var isObject = __webpack_require__(23149); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_isStrictComparable.js - - -/** - * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` if suitable for strict - * equality comparisons, else `false`. - */ -function isStrictComparable(value) { - return value === value && !(0,isObject/* default */.A)(value); -} - -/* harmony default export */ const _isStrictComparable = (isStrictComparable); - -// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js -var keys = __webpack_require__(27422); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_getMatchData.js - - - -/** - * Gets the property names, values, and compare flags of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the match data of `object`. - */ -function getMatchData(object) { - var result = (0,keys/* default */.A)(object), - length = result.length; - - while (length--) { - var key = result[length], - value = object[key]; - - result[length] = [key, value, _isStrictComparable(value)]; - } - return result; -} - -/* harmony default export */ const _getMatchData = (getMatchData); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_matchesStrictComparable.js -/** - * A specialized version of `matchesProperty` for source values suitable - * for strict equality comparisons, i.e. `===`. - * - * @private - * @param {string} key The key of the property to get. - * @param {*} srcValue The value to match. - * @returns {Function} Returns the new spec function. - */ -function matchesStrictComparable(key, srcValue) { - return function(object) { - if (object == null) { - return false; - } - return object[key] === srcValue && - (srcValue !== undefined || (key in Object(object))); - }; -} - -/* harmony default export */ const _matchesStrictComparable = (matchesStrictComparable); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseMatches.js - - - - -/** - * The base implementation of `_.matches` which doesn't clone `source`. - * - * @private - * @param {Object} source The object of property values to match. - * @returns {Function} Returns the new spec function. - */ -function baseMatches(source) { - var matchData = _getMatchData(source); - if (matchData.length == 1 && matchData[0][2]) { - return _matchesStrictComparable(matchData[0][0], matchData[0][1]); - } - return function(object) { - return object === source || _baseIsMatch(object, source, matchData); - }; -} - -/* harmony default export */ const _baseMatches = (baseMatches); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGet.js -var _baseGet = __webpack_require__(66318); -;// CONCATENATED MODULE: ./node_modules/lodash-es/get.js - - -/** - * Gets the value at `path` of `object`. If the resolved value is - * `undefined`, the `defaultValue` is returned in its place. - * - * @static - * @memberOf _ - * @since 3.7.0 - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path of the property to get. - * @param {*} [defaultValue] The value returned for `undefined` resolved values. - * @returns {*} Returns the resolved value. - * @example - * - * var object = { 'a': [{ 'b': { 'c': 3 } }] }; - * - * _.get(object, 'a[0].b.c'); - * // => 3 - * - * _.get(object, ['a', '0', 'b', 'c']); - * // => 3 - * - * _.get(object, 'a.b.c', 'default'); - * // => 'default' - */ -function get(object, path, defaultValue) { - var result = object == null ? undefined : (0,_baseGet/* default */.A)(object, path); - return result === undefined ? defaultValue : result; -} - -/* harmony default export */ const lodash_es_get = (get); - -// EXTERNAL MODULE: ./node_modules/lodash-es/hasIn.js + 1 modules -var hasIn = __webpack_require__(39188); -// EXTERNAL MODULE: ./node_modules/lodash-es/_isKey.js -var _isKey = __webpack_require__(86586); -// EXTERNAL MODULE: ./node_modules/lodash-es/_toKey.js -var _toKey = __webpack_require__(30901); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseMatchesProperty.js - - - - - - - - -/** Used to compose bitmasks for value comparisons. */ -var _baseMatchesProperty_COMPARE_PARTIAL_FLAG = 1, - _baseMatchesProperty_COMPARE_UNORDERED_FLAG = 2; - -/** - * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. - * - * @private - * @param {string} path The path of the property to get. - * @param {*} srcValue The value to match. - * @returns {Function} Returns the new spec function. - */ -function baseMatchesProperty(path, srcValue) { - if ((0,_isKey/* default */.A)(path) && _isStrictComparable(srcValue)) { - return _matchesStrictComparable((0,_toKey/* default */.A)(path), srcValue); - } - return function(object) { - var objValue = lodash_es_get(object, path); - return (objValue === undefined && objValue === srcValue) - ? (0,hasIn/* default */.A)(object, path) - : _baseIsEqual(srcValue, objValue, _baseMatchesProperty_COMPARE_PARTIAL_FLAG | _baseMatchesProperty_COMPARE_UNORDERED_FLAG); - }; -} - -/* harmony default export */ const _baseMatchesProperty = (baseMatchesProperty); - -// EXTERNAL MODULE: ./node_modules/lodash-es/identity.js -var identity = __webpack_require__(29008); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseProperty.js -var _baseProperty = __webpack_require__(70805); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_basePropertyDeep.js - - -/** - * A specialized version of `baseProperty` which supports deep paths. - * - * @private - * @param {Array|string} path The path of the property to get. - * @returns {Function} Returns the new accessor function. - */ -function basePropertyDeep(path) { - return function(object) { - return (0,_baseGet/* default */.A)(object, path); - }; -} - -/* harmony default export */ const _basePropertyDeep = (basePropertyDeep); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/property.js - - - - - -/** - * Creates a function that returns the value at `path` of a given object. - * - * @static - * @memberOf _ - * @since 2.4.0 - * @category Util - * @param {Array|string} path The path of the property to get. - * @returns {Function} Returns the new accessor function. - * @example - * - * var objects = [ - * { 'a': { 'b': 2 } }, - * { 'a': { 'b': 1 } } - * ]; - * - * _.map(objects, _.property('a.b')); - * // => [2, 1] - * - * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b'); - * // => [1, 2] - */ -function property(path) { - return (0,_isKey/* default */.A)(path) ? (0,_baseProperty/* default */.A)((0,_toKey/* default */.A)(path)) : _basePropertyDeep(path); -} - -/* harmony default export */ const lodash_es_property = (property); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIteratee.js - - - - - - -/** - * The base implementation of `_.iteratee`. - * - * @private - * @param {*} [value=_.identity] The value to convert to an iteratee. - * @returns {Function} Returns the iteratee. - */ -function baseIteratee(value) { - // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. - // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. - if (typeof value == 'function') { - return value; - } - if (value == null) { - return identity/* default */.A; - } - if (typeof value == 'object') { - return (0,isArray/* default */.A)(value) - ? _baseMatchesProperty(value[0], value[1]) - : _baseMatches(value); - } - return lodash_es_property(value); -} - -/* harmony default export */ const _baseIteratee = (baseIteratee); - - -/***/ }), - -/***/ 52568: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _baseEach_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6240); -/* harmony import */ var _isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(38446); - - - -/** - * The base implementation of `_.map` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the new mapped array. - */ -function baseMap(collection, iteratee) { - var index = -1, - result = (0,_isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(collection) ? Array(collection.length) : []; - - (0,_baseEach_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(collection, function(value, key, collection) { - result[++index] = iteratee(value, key, collection); - }); - return result; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseMap); - - -/***/ }), - -/***/ 70805: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * The base implementation of `_.property` without support for deep paths. - * - * @private - * @param {string} key The key of the property to get. - * @returns {Function} Returns the new accessor function. - */ -function baseProperty(key) { - return function(object) { - return object == null ? undefined : object[key]; - }; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseProperty); - - -/***/ }), - -/***/ 64099: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * Checks if a `cache` value for `key` exists. - * - * @private - * @param {Object} cache The cache to query. - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ -function cacheHas(cache, key) { - return cache.has(key); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (cacheHas); - - -/***/ }), - -/***/ 99922: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(29008); - - -/** - * Casts `value` to `identity` if it's not a function. - * - * @private - * @param {*} value The value to inspect. - * @returns {Function} Returns cast function. - */ -function castFunction(value) { - return typeof value == 'function' ? value : _identity_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (castFunction); - - -/***/ }), - -/***/ 7819: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ _castPath) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js -var isArray = __webpack_require__(92049); -// EXTERNAL MODULE: ./node_modules/lodash-es/_isKey.js -var _isKey = __webpack_require__(86586); -// EXTERNAL MODULE: ./node_modules/lodash-es/memoize.js -var memoize = __webpack_require__(46632); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_memoizeCapped.js - - -/** Used as the maximum memoize cache size. */ -var MAX_MEMOIZE_SIZE = 500; - -/** - * A specialized version of `_.memoize` which clears the memoized function's - * cache when it exceeds `MAX_MEMOIZE_SIZE`. - * - * @private - * @param {Function} func The function to have its output memoized. - * @returns {Function} Returns the new memoized function. - */ -function memoizeCapped(func) { - var result = (0,memoize/* default */.A)(func, function(key) { - if (cache.size === MAX_MEMOIZE_SIZE) { - cache.clear(); - } - return key; - }); - - var cache = result.cache; - return result; -} - -/* harmony default export */ const _memoizeCapped = (memoizeCapped); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_stringToPath.js - - -/** Used to match property names within property paths. */ -var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; - -/** Used to match backslashes in property paths. */ -var reEscapeChar = /\\(\\)?/g; - -/** - * Converts `string` to a property path array. - * - * @private - * @param {string} string The string to convert. - * @returns {Array} Returns the property path array. - */ -var stringToPath = _memoizeCapped(function(string) { - var result = []; - if (string.charCodeAt(0) === 46 /* . */) { - result.push(''); - } - string.replace(rePropName, function(match, number, quote, subString) { - result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match)); - }); - return result; -}); - -/* harmony default export */ const _stringToPath = (stringToPath); - -// EXTERNAL MODULE: ./node_modules/lodash-es/toString.js + 1 modules -var lodash_es_toString = __webpack_require__(28894); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_castPath.js - - - - - -/** - * Casts `value` to a path array if it's not one. - * - * @private - * @param {*} value The value to inspect. - * @param {Object} [object] The object to query keys on. - * @returns {Array} Returns the cast property path array. - */ -function castPath(value, object) { - if ((0,isArray/* default */.A)(value)) { - return value; - } - return (0,_isKey/* default */.A)(value, object) ? [value] : _stringToPath((0,lodash_es_toString/* default */.A)(value)); -} - -/* harmony default export */ const _castPath = (castPath); - - -/***/ }), - -/***/ 19042: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _baseGetAllKeys_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(33831); -/* harmony import */ var _getSymbols_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(14792); -/* harmony import */ var _keys_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(27422); - - - - -/** - * Creates an array of own enumerable property names and symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names and symbols. - */ -function getAllKeys(object) { - return (0,_baseGetAllKeys_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(object, _keys_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A, _getSymbols_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (getAllKeys); - - -/***/ }), - -/***/ 14792: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _arrayFilter_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2634); -/* harmony import */ var _stubArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13153); - - - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Built-in value references. */ -var propertyIsEnumerable = objectProto.propertyIsEnumerable; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeGetSymbols = Object.getOwnPropertySymbols; - -/** - * Creates an array of the own enumerable symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of symbols. - */ -var getSymbols = !nativeGetSymbols ? _stubArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A : function(object) { - if (object == null) { - return []; - } - object = Object(object); - return (0,_arrayFilter_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(nativeGetSymbols(object), function(symbol) { - return propertyIsEnumerable.call(object, symbol); - }); -}; - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (getSymbols); - - -/***/ }), - -/***/ 85054: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _castPath_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7819); -/* harmony import */ var _isArguments_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(52274); -/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(92049); -/* harmony import */ var _isIndex_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(25353); -/* harmony import */ var _isLength_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5254); -/* harmony import */ var _toKey_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(30901); - - - - - - - -/** - * Checks if `path` exists on `object`. - * - * @private - * @param {Object} object The object to query. - * @param {Array|string} path The path to check. - * @param {Function} hasFunc The function to check properties. - * @returns {boolean} Returns `true` if `path` exists, else `false`. - */ -function hasPath(object, path, hasFunc) { - path = (0,_castPath_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(path, object); - - var index = -1, - length = path.length, - result = false; - - while (++index < length) { - var key = (0,_toKey_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(path[index]); - if (!(result = object != null && hasFunc(object, key))) { - break; - } - object = object[key]; - } - if (result || ++index != length) { - return result; - } - length = object == null ? 0 : object.length; - return !!length && (0,_isLength_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)(length) && (0,_isIndex_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(key, length) && - ((0,_isArray_js__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .A)(object) || (0,_isArguments_js__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A)(object)); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (hasPath); - - -/***/ }), - -/***/ 86586: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(92049); -/* harmony import */ var _isSymbol_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(61882); - - - -/** Used to match property names within property paths. */ -var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, - reIsPlainProp = /^\w*$/; - -/** - * Checks if `value` is a property name and not a property path. - * - * @private - * @param {*} value The value to check. - * @param {Object} [object] The object to query keys on. - * @returns {boolean} Returns `true` if `value` is a property name, else `false`. - */ -function isKey(value, object) { - if ((0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(value)) { - return false; - } - var type = typeof value; - if (type == 'number' || type == 'symbol' || type == 'boolean' || - value == null || (0,_isSymbol_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(value)) { - return true; - } - return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || - (object != null && value in Object(object)); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isKey); - - -/***/ }), - -/***/ 29959: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * Converts `set` to an array of its values. - * - * @private - * @param {Object} set The set to convert. - * @returns {Array} Returns the values. - */ -function setToArray(set) { - var index = -1, - result = Array(set.size); - - set.forEach(function(value) { - result[++index] = value; - }); - return result; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (setToArray); - - -/***/ }), - -/***/ 30901: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _isSymbol_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(61882); - - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0; - -/** - * Converts `value` to a string key if it's not a string or symbol. - * - * @private - * @param {*} value The value to inspect. - * @returns {string|symbol} Returns the key. - */ -function toKey(value) { - if (typeof value == 'string' || (0,_isSymbol_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(value)) { - return value; - } - var result = (value + ''); - return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (toKey); - - -/***/ }), - -/***/ 50053: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _baseClone_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(91641); - - -/** Used to compose bitmasks for cloning. */ -var CLONE_SYMBOLS_FLAG = 4; - -/** - * Creates a shallow clone of `value`. - * - * **Note:** This method is loosely based on the - * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm) - * and supports cloning arrays, array buffers, booleans, date objects, maps, - * numbers, `Object` objects, regexes, sets, strings, symbols, and typed - * arrays. The own enumerable properties of `arguments` objects are cloned - * as plain objects. An empty object is returned for uncloneable values such - * as error objects, functions, DOM nodes, and WeakMaps. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to clone. - * @returns {*} Returns the cloned value. - * @see _.cloneDeep - * @example - * - * var objects = [{ 'a': 1 }, { 'b': 2 }]; - * - * var shallow = _.clone(objects); - * console.log(shallow[0] === objects[0]); - * // => true - */ -function clone(value) { - return (0,_baseClone_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(value, CLONE_SYMBOLS_FLAG); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (clone); - - -/***/ }), - -/***/ 23068: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _baseRest_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(24326); -/* harmony import */ var _eq_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(66984); -/* harmony import */ var _isIterateeCall_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6832); -/* harmony import */ var _keysIn_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(55615); - - - - - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Assigns own and inherited enumerable string keyed properties of source - * objects to the destination object for all destination properties that - * resolve to `undefined`. Source objects are applied from left to right. - * Once a property is set, additional values of the same property are ignored. - * - * **Note:** This method mutates `object`. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. - * @see _.defaultsDeep - * @example - * - * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); - * // => { 'a': 1, 'b': 2 } - */ -var defaults = (0,_baseRest_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(function(object, sources) { - object = Object(object); - - var index = -1; - var length = sources.length; - var guard = length > 2 ? sources[2] : undefined; - - if (guard && (0,_isIterateeCall_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(sources[0], sources[1], guard)) { - length = 1; - } - - while (++index < length) { - var source = sources[index]; - var props = (0,_keysIn_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)(source); - var propsIndex = -1; - var propsLength = props.length; - - while (++propsIndex < propsLength) { - var key = props[propsIndex]; - var value = object[key]; - - if (value === undefined || - ((0,_eq_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(value, objectProto[key]) && !hasOwnProperty.call(object, key))) { - object[key] = source[key]; - } - } - } - - return object; -}); - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (defaults); - - -/***/ }), - -/***/ 11662: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ lodash_es_filter) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayFilter.js -var _arrayFilter = __webpack_require__(2634); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseEach.js + 1 modules -var _baseEach = __webpack_require__(6240); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseFilter.js - - -/** - * The base implementation of `_.filter` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {Array} Returns the new filtered array. - */ -function baseFilter(collection, predicate) { - var result = []; - (0,_baseEach/* default */.A)(collection, function(value, index, collection) { - if (predicate(value, index, collection)) { - result.push(value); - } - }); - return result; -} - -/* harmony default export */ const _baseFilter = (baseFilter); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseIteratee.js + 16 modules -var _baseIteratee = __webpack_require__(49574); -// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js -var isArray = __webpack_require__(92049); -;// CONCATENATED MODULE: ./node_modules/lodash-es/filter.js - - - - - -/** - * Iterates over elements of `collection`, returning an array of all elements - * `predicate` returns truthy for. The predicate is invoked with three - * arguments: (value, index|key, collection). - * - * **Note:** Unlike `_.remove`, this method returns a new array. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @returns {Array} Returns the new filtered array. - * @see _.reject - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': true }, - * { 'user': 'fred', 'age': 40, 'active': false } - * ]; - * - * _.filter(users, function(o) { return !o.active; }); - * // => objects for ['fred'] - * - * // The `_.matches` iteratee shorthand. - * _.filter(users, { 'age': 36, 'active': true }); - * // => objects for ['barney'] - * - * // The `_.matchesProperty` iteratee shorthand. - * _.filter(users, ['active', false]); - * // => objects for ['fred'] - * - * // The `_.property` iteratee shorthand. - * _.filter(users, 'active'); - * // => objects for ['barney'] - * - * // Combining several predicates using `_.overEvery` or `_.overSome`. - * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]])); - * // => objects for ['fred', 'barney'] - */ -function filter(collection, predicate) { - var func = (0,isArray/* default */.A)(collection) ? _arrayFilter/* default */.A : _baseFilter; - return func(collection, (0,_baseIteratee/* default */.A)(predicate, 3)); -} - -/* harmony default export */ const lodash_es_filter = (filter); - - -/***/ }), - -/***/ 34098: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _baseFlatten_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13588); - - -/** - * Flattens `array` a single level deep. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to flatten. - * @returns {Array} Returns the new flattened array. - * @example - * - * _.flatten([1, [2, [3, [4]], 5]]); - * // => [1, 2, [3, [4]], 5] - */ -function flatten(array) { - var length = array == null ? 0 : array.length; - return length ? (0,_baseFlatten_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(array, 1) : []; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (flatten); - - -/***/ }), - -/***/ 8058: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _arrayEach_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(72641); -/* harmony import */ var _baseEach_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6240); -/* harmony import */ var _castFunction_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(99922); -/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(92049); - - - - - -/** - * Iterates over elements of `collection` and invokes `iteratee` for each element. - * The iteratee is invoked with three arguments: (value, index|key, collection). - * Iteratee functions may exit iteration early by explicitly returning `false`. - * - * **Note:** As with other "Collections" methods, objects with a "length" - * property are iterated like arrays. To avoid this behavior use `_.forIn` - * or `_.forOwn` for object iteration. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @alias each - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Array|Object} Returns `collection`. - * @see _.forEachRight - * @example - * - * _.forEach([1, 2], function(value) { - * console.log(value); - * }); - * // => Logs `1` then `2`. - * - * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { - * console.log(key); - * }); - * // => Logs 'a' then 'b' (iteration order is not guaranteed). - */ -function forEach(collection, iteratee) { - var func = (0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(collection) ? _arrayEach_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A : _baseEach_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A; - return func(collection, (0,_castFunction_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(iteratee)); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (forEach); - - -/***/ }), - -/***/ 48585: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ lodash_es_has) -}); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseHas.js -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var _baseHas_hasOwnProperty = objectProto.hasOwnProperty; - -/** - * The base implementation of `_.has` without support for deep paths. - * - * @private - * @param {Object} [object] The object to query. - * @param {Array|string} key The key to check. - * @returns {boolean} Returns `true` if `key` exists, else `false`. - */ -function baseHas(object, key) { - return object != null && _baseHas_hasOwnProperty.call(object, key); -} - -/* harmony default export */ const _baseHas = (baseHas); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_hasPath.js -var _hasPath = __webpack_require__(85054); -;// CONCATENATED MODULE: ./node_modules/lodash-es/has.js - - - -/** - * Checks if `path` is a direct property of `object`. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path to check. - * @returns {boolean} Returns `true` if `path` exists, else `false`. - * @example - * - * var object = { 'a': { 'b': 2 } }; - * var other = _.create({ 'a': _.create({ 'b': 2 }) }); - * - * _.has(object, 'a'); - * // => true - * - * _.has(object, 'a.b'); - * // => true - * - * _.has(object, ['a', 'b']); - * // => true - * - * _.has(other, 'a'); - * // => false - */ -function has(object, path) { - return object != null && (0,_hasPath/* default */.A)(object, path, _baseHas); -} - -/* harmony default export */ const lodash_es_has = (has); - - -/***/ }), - -/***/ 39188: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ lodash_es_hasIn) -}); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseHasIn.js -/** - * The base implementation of `_.hasIn` without support for deep paths. - * - * @private - * @param {Object} [object] The object to query. - * @param {Array|string} key The key to check. - * @returns {boolean} Returns `true` if `key` exists, else `false`. - */ -function baseHasIn(object, key) { - return object != null && key in Object(object); -} - -/* harmony default export */ const _baseHasIn = (baseHasIn); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_hasPath.js -var _hasPath = __webpack_require__(85054); -;// CONCATENATED MODULE: ./node_modules/lodash-es/hasIn.js - - - -/** - * Checks if `path` is a direct or inherited property of `object`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path to check. - * @returns {boolean} Returns `true` if `path` exists, else `false`. - * @example - * - * var object = _.create({ 'a': _.create({ 'b': 2 }) }); - * - * _.hasIn(object, 'a'); - * // => true - * - * _.hasIn(object, 'a.b'); - * // => true - * - * _.hasIn(object, ['a', 'b']); - * // => true - * - * _.hasIn(object, 'b'); - * // => false - */ -function hasIn(object, path) { - return object != null && (0,_hasPath/* default */.A)(object, path, _baseHasIn); -} - -/* harmony default export */ const lodash_es_hasIn = (hasIn); - - -/***/ }), - -/***/ 61882: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _baseGetTag_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(88496); -/* harmony import */ var _isObjectLike_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(53098); - - - -/** `Object#toString` result references. */ -var symbolTag = '[object Symbol]'; - -/** - * Checks if `value` is classified as a `Symbol` primitive or object. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. - * @example - * - * _.isSymbol(Symbol.iterator); - * // => true - * - * _.isSymbol('abc'); - * // => false - */ -function isSymbol(value) { - return typeof value == 'symbol' || - ((0,_isObjectLike_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(value) && (0,_baseGetTag_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(value) == symbolTag); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isSymbol); - - -/***/ }), - -/***/ 69592: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * Checks if `value` is `undefined`. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. - * @example - * - * _.isUndefined(void 0); - * // => true - * - * _.isUndefined(null); - * // => false - */ -function isUndefined(value) { - return value === undefined; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isUndefined); - - -/***/ }), - -/***/ 27422: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _arrayLikeKeys_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(83607); -/* harmony import */ var _baseKeys_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(69471); -/* harmony import */ var _isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(38446); - - - - -/** - * Creates an array of the own enumerable property names of `object`. - * - * **Note:** Non-object values are coerced to objects. See the - * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) - * for more details. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.keys(new Foo); - * // => ['a', 'b'] (iteration order is not guaranteed) - * - * _.keys('hi'); - * // => ['0', '1'] - */ -function keys(object) { - return (0,_isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(object) ? (0,_arrayLikeKeys_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(object) : (0,_baseKeys_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)(object); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (keys); - - -/***/ }), - -/***/ 74722: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _arrayMap_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(45572); -/* harmony import */ var _baseIteratee_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(49574); -/* harmony import */ var _baseMap_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(52568); -/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(92049); - - - - - -/** - * Creates an array of values by running each element in `collection` thru - * `iteratee`. The iteratee is invoked with three arguments: - * (value, index|key, collection). - * - * Many lodash methods are guarded to work as iteratees for methods like - * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. - * - * The guarded methods are: - * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, - * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`, - * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`, - * `template`, `trim`, `trimEnd`, `trimStart`, and `words` - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Array} Returns the new mapped array. - * @example - * - * function square(n) { - * return n * n; - * } - * - * _.map([4, 8], square); - * // => [16, 64] - * - * _.map({ 'a': 4, 'b': 8 }, square); - * // => [16, 64] (iteration order is not guaranteed) - * - * var users = [ - * { 'user': 'barney' }, - * { 'user': 'fred' } - * ]; - * - * // The `_.property` iteratee shorthand. - * _.map(users, 'user'); - * // => ['barney', 'fred'] - */ -function map(collection, iteratee) { - var func = (0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(collection) ? _arrayMap_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A : _baseMap_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A; - return func(collection, (0,_baseIteratee_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(iteratee, 3)); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (map); - - -/***/ }), - -/***/ 81942: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ lodash_es_pick) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGet.js -var _baseGet = __webpack_require__(66318); -// EXTERNAL MODULE: ./node_modules/lodash-es/_assignValue.js -var _assignValue = __webpack_require__(52851); -// EXTERNAL MODULE: ./node_modules/lodash-es/_castPath.js + 2 modules -var _castPath = __webpack_require__(7819); -// EXTERNAL MODULE: ./node_modules/lodash-es/_isIndex.js -var _isIndex = __webpack_require__(25353); -// EXTERNAL MODULE: ./node_modules/lodash-es/isObject.js -var isObject = __webpack_require__(23149); -// EXTERNAL MODULE: ./node_modules/lodash-es/_toKey.js -var _toKey = __webpack_require__(30901); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseSet.js - - - - - - -/** - * The base implementation of `_.set`. - * - * @private - * @param {Object} object The object to modify. - * @param {Array|string} path The path of the property to set. - * @param {*} value The value to set. - * @param {Function} [customizer] The function to customize path creation. - * @returns {Object} Returns `object`. - */ -function baseSet(object, path, value, customizer) { - if (!(0,isObject/* default */.A)(object)) { - return object; - } - path = (0,_castPath/* default */.A)(path, object); - - var index = -1, - length = path.length, - lastIndex = length - 1, - nested = object; - - while (nested != null && ++index < length) { - var key = (0,_toKey/* default */.A)(path[index]), - newValue = value; - - if (key === '__proto__' || key === 'constructor' || key === 'prototype') { - return object; - } - - if (index != lastIndex) { - var objValue = nested[key]; - newValue = customizer ? customizer(objValue, key, nested) : undefined; - if (newValue === undefined) { - newValue = (0,isObject/* default */.A)(objValue) - ? objValue - : ((0,_isIndex/* default */.A)(path[index + 1]) ? [] : {}); - } - } - (0,_assignValue/* default */.A)(nested, key, newValue); - nested = nested[key]; - } - return object; -} - -/* harmony default export */ const _baseSet = (baseSet); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_basePickBy.js - - - - -/** - * The base implementation of `_.pickBy` without support for iteratee shorthands. - * - * @private - * @param {Object} object The source object. - * @param {string[]} paths The property paths to pick. - * @param {Function} predicate The function invoked per property. - * @returns {Object} Returns the new object. - */ -function basePickBy(object, paths, predicate) { - var index = -1, - length = paths.length, - result = {}; - - while (++index < length) { - var path = paths[index], - value = (0,_baseGet/* default */.A)(object, path); - - if (predicate(value, path)) { - _baseSet(result, (0,_castPath/* default */.A)(path, object), value); - } - } - return result; -} - -/* harmony default export */ const _basePickBy = (basePickBy); - -// EXTERNAL MODULE: ./node_modules/lodash-es/hasIn.js + 1 modules -var hasIn = __webpack_require__(39188); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_basePick.js - - - -/** - * The base implementation of `_.pick` without support for individual - * property identifiers. - * - * @private - * @param {Object} object The source object. - * @param {string[]} paths The property paths to pick. - * @returns {Object} Returns the new object. - */ -function basePick(object, paths) { - return _basePickBy(object, paths, function(value, path) { - return (0,hasIn/* default */.A)(object, path); - }); -} - -/* harmony default export */ const _basePick = (basePick); - -// EXTERNAL MODULE: ./node_modules/lodash-es/flatten.js -var flatten = __webpack_require__(34098); -// EXTERNAL MODULE: ./node_modules/lodash-es/_overRest.js + 1 modules -var _overRest = __webpack_require__(76875); -// EXTERNAL MODULE: ./node_modules/lodash-es/_setToString.js + 2 modules -var _setToString = __webpack_require__(67525); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_flatRest.js - - - - -/** - * A specialized version of `baseRest` which flattens the rest array. - * - * @private - * @param {Function} func The function to apply a rest parameter to. - * @returns {Function} Returns the new function. - */ -function flatRest(func) { - return (0,_setToString/* default */.A)((0,_overRest/* default */.A)(func, undefined, flatten/* default */.A), func + ''); -} - -/* harmony default export */ const _flatRest = (flatRest); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/pick.js - - - -/** - * Creates an object composed of the picked `object` properties. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The source object. - * @param {...(string|string[])} [paths] The property paths to pick. - * @returns {Object} Returns the new object. - * @example - * - * var object = { 'a': 1, 'b': '2', 'c': 3 }; - * - * _.pick(object, ['a', 'c']); - * // => { 'a': 1, 'c': 3 } - */ -var pick = _flatRest(function(object, paths) { - return object == null ? {} : _basePick(object, paths); -}); - -/* harmony default export */ const lodash_es_pick = (pick); - - -/***/ }), - -/***/ 91395: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ lodash_es_range) -}); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseRange.js -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeCeil = Math.ceil, - nativeMax = Math.max; - -/** - * The base implementation of `_.range` and `_.rangeRight` which doesn't - * coerce arguments. - * - * @private - * @param {number} start The start of the range. - * @param {number} end The end of the range. - * @param {number} step The value to increment or decrement by. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Array} Returns the range of numbers. - */ -function baseRange(start, end, step, fromRight) { - var index = -1, - length = nativeMax(nativeCeil((end - start) / (step || 1)), 0), - result = Array(length); - - while (length--) { - result[fromRight ? length : ++index] = start; - start += step; - } - return result; -} - -/* harmony default export */ const _baseRange = (baseRange); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_isIterateeCall.js -var _isIterateeCall = __webpack_require__(6832); -// EXTERNAL MODULE: ./node_modules/lodash-es/toFinite.js + 3 modules -var toFinite = __webpack_require__(74342); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_createRange.js - - - - -/** - * Creates a `_.range` or `_.rangeRight` function. - * - * @private - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new range function. - */ -function createRange(fromRight) { - return function(start, end, step) { - if (step && typeof step != 'number' && (0,_isIterateeCall/* default */.A)(start, end, step)) { - end = step = undefined; - } - // Ensure the sign of `-0` is preserved. - start = (0,toFinite/* default */.A)(start); - if (end === undefined) { - end = start; - start = 0; - } else { - end = (0,toFinite/* default */.A)(end); - } - step = step === undefined ? (start < end ? 1 : -1) : (0,toFinite/* default */.A)(step); - return _baseRange(start, end, step, fromRight); - }; -} - -/* harmony default export */ const _createRange = (createRange); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/range.js - - -/** - * Creates an array of numbers (positive and/or negative) progressing from - * `start` up to, but not including, `end`. A step of `-1` is used if a negative - * `start` is specified without an `end` or `step`. If `end` is not specified, - * it's set to `start` with `start` then set to `0`. - * - * **Note:** JavaScript follows the IEEE-754 standard for resolving - * floating-point values which can produce unexpected results. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Util - * @param {number} [start=0] The start of the range. - * @param {number} end The end of the range. - * @param {number} [step=1] The value to increment or decrement by. - * @returns {Array} Returns the range of numbers. - * @see _.inRange, _.rangeRight - * @example - * - * _.range(4); - * // => [0, 1, 2, 3] - * - * _.range(-4); - * // => [0, -1, -2, -3] - * - * _.range(1, 5); - * // => [1, 2, 3, 4] - * - * _.range(0, 20, 5); - * // => [0, 5, 10, 15] - * - * _.range(0, -4, -1); - * // => [0, -1, -2, -3] - * - * _.range(1, 4, 0); - * // => [1, 1, 1] - * - * _.range(0); - * // => [] - */ -var range = _createRange(); - -/* harmony default export */ const lodash_es_range = (range); - - -/***/ }), - -/***/ 89463: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ lodash_es_reduce) -}); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_arrayReduce.js -/** - * A specialized version of `_.reduce` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {*} [accumulator] The initial value. - * @param {boolean} [initAccum] Specify using the first element of `array` as - * the initial value. - * @returns {*} Returns the accumulated value. - */ -function arrayReduce(array, iteratee, accumulator, initAccum) { - var index = -1, - length = array == null ? 0 : array.length; - - if (initAccum && length) { - accumulator = array[++index]; - } - while (++index < length) { - accumulator = iteratee(accumulator, array[index], index, array); - } - return accumulator; -} - -/* harmony default export */ const _arrayReduce = (arrayReduce); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseEach.js + 1 modules -var _baseEach = __webpack_require__(6240); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseIteratee.js + 16 modules -var _baseIteratee = __webpack_require__(49574); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseReduce.js -/** - * The base implementation of `_.reduce` and `_.reduceRight`, without support - * for iteratee shorthands, which iterates over `collection` using `eachFunc`. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {*} accumulator The initial value. - * @param {boolean} initAccum Specify using the first or last element of - * `collection` as the initial value. - * @param {Function} eachFunc The function to iterate over `collection`. - * @returns {*} Returns the accumulated value. - */ -function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { - eachFunc(collection, function(value, index, collection) { - accumulator = initAccum - ? (initAccum = false, value) - : iteratee(accumulator, value, index, collection); - }); - return accumulator; -} - -/* harmony default export */ const _baseReduce = (baseReduce); - -// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js -var isArray = __webpack_require__(92049); -;// CONCATENATED MODULE: ./node_modules/lodash-es/reduce.js - - - - - - -/** - * Reduces `collection` to a value which is the accumulated result of running - * each element in `collection` thru `iteratee`, where each successive - * invocation is supplied the return value of the previous. If `accumulator` - * is not given, the first element of `collection` is used as the initial - * value. The iteratee is invoked with four arguments: - * (accumulator, value, index|key, collection). - * - * Many lodash methods are guarded to work as iteratees for methods like - * `_.reduce`, `_.reduceRight`, and `_.transform`. - * - * The guarded methods are: - * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`, - * and `sortBy` - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @param {*} [accumulator] The initial value. - * @returns {*} Returns the accumulated value. - * @see _.reduceRight - * @example - * - * _.reduce([1, 2], function(sum, n) { - * return sum + n; - * }, 0); - * // => 3 - * - * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { - * (result[value] || (result[value] = [])).push(key); - * return result; - * }, {}); - * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed) - */ -function reduce(collection, iteratee, accumulator) { - var func = (0,isArray/* default */.A)(collection) ? _arrayReduce : _baseReduce, - initAccum = arguments.length < 3; - - return func(collection, (0,_baseIteratee/* default */.A)(iteratee, 4), accumulator, initAccum, _baseEach/* default */.A); -} - -/* harmony default export */ const lodash_es_reduce = (reduce); - - -/***/ }), - -/***/ 13153: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * This method returns a new empty array. - * - * @static - * @memberOf _ - * @since 4.13.0 - * @category Util - * @returns {Array} Returns the new empty array. - * @example - * - * var arrays = _.times(2, _.stubArray); - * - * console.log(arrays); - * // => [[], []] - * - * console.log(arrays[0] === arrays[1]); - * // => false - */ -function stubArray() { - return []; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (stubArray); - - -/***/ }), - -/***/ 74342: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ lodash_es_toFinite) -}); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_trimmedEndIndex.js -/** Used to match a single whitespace character. */ -var reWhitespace = /\s/; - -/** - * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace - * character of `string`. - * - * @private - * @param {string} string The string to inspect. - * @returns {number} Returns the index of the last non-whitespace character. - */ -function trimmedEndIndex(string) { - var index = string.length; - - while (index-- && reWhitespace.test(string.charAt(index))) {} - return index; -} - -/* harmony default export */ const _trimmedEndIndex = (trimmedEndIndex); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseTrim.js - - -/** Used to match leading whitespace. */ -var reTrimStart = /^\s+/; - -/** - * The base implementation of `_.trim`. - * - * @private - * @param {string} string The string to trim. - * @returns {string} Returns the trimmed string. - */ -function baseTrim(string) { - return string - ? string.slice(0, _trimmedEndIndex(string) + 1).replace(reTrimStart, '') - : string; -} - -/* harmony default export */ const _baseTrim = (baseTrim); - -// EXTERNAL MODULE: ./node_modules/lodash-es/isObject.js -var isObject = __webpack_require__(23149); -// EXTERNAL MODULE: ./node_modules/lodash-es/isSymbol.js -var isSymbol = __webpack_require__(61882); -;// CONCATENATED MODULE: ./node_modules/lodash-es/toNumber.js - - - - -/** Used as references for various `Number` constants. */ -var NAN = 0 / 0; - -/** Used to detect bad signed hexadecimal string values. */ -var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; - -/** Used to detect binary string values. */ -var reIsBinary = /^0b[01]+$/i; - -/** Used to detect octal string values. */ -var reIsOctal = /^0o[0-7]+$/i; - -/** Built-in method references without a dependency on `root`. */ -var freeParseInt = parseInt; - -/** - * Converts `value` to a number. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to process. - * @returns {number} Returns the number. - * @example - * - * _.toNumber(3.2); - * // => 3.2 - * - * _.toNumber(Number.MIN_VALUE); - * // => 5e-324 - * - * _.toNumber(Infinity); - * // => Infinity - * - * _.toNumber('3.2'); - * // => 3.2 - */ -function toNumber(value) { - if (typeof value == 'number') { - return value; - } - if ((0,isSymbol/* default */.A)(value)) { - return NAN; - } - if ((0,isObject/* default */.A)(value)) { - var other = typeof value.valueOf == 'function' ? value.valueOf() : value; - value = (0,isObject/* default */.A)(other) ? (other + '') : other; - } - if (typeof value != 'string') { - return value === 0 ? value : +value; - } - value = _baseTrim(value); - var isBinary = reIsBinary.test(value); - return (isBinary || reIsOctal.test(value)) - ? freeParseInt(value.slice(2), isBinary ? 2 : 8) - : (reIsBadHex.test(value) ? NAN : +value); -} - -/* harmony default export */ const lodash_es_toNumber = (toNumber); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/toFinite.js - - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0, - MAX_INTEGER = 1.7976931348623157e+308; - -/** - * Converts `value` to a finite number. - * - * @static - * @memberOf _ - * @since 4.12.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {number} Returns the converted number. - * @example - * - * _.toFinite(3.2); - * // => 3.2 - * - * _.toFinite(Number.MIN_VALUE); - * // => 5e-324 - * - * _.toFinite(Infinity); - * // => 1.7976931348623157e+308 - * - * _.toFinite('3.2'); - * // => 3.2 - */ -function toFinite(value) { - if (!value) { - return value === 0 ? value : 0; - } - value = lodash_es_toNumber(value); - if (value === INFINITY || value === -INFINITY) { - var sign = (value < 0 ? -1 : 1); - return sign * MAX_INTEGER; - } - return value === value ? value : 0; -} - -/* harmony default export */ const lodash_es_toFinite = (toFinite); - - -/***/ }), - -/***/ 28894: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ lodash_es_toString) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_Symbol.js -var _Symbol = __webpack_require__(241); -// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayMap.js -var _arrayMap = __webpack_require__(45572); -// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js -var isArray = __webpack_require__(92049); -// EXTERNAL MODULE: ./node_modules/lodash-es/isSymbol.js -var isSymbol = __webpack_require__(61882); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseToString.js - - - - - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0; - -/** Used to convert symbols to primitives and strings. */ -var symbolProto = _Symbol/* default */.A ? _Symbol/* default */.A.prototype : undefined, - symbolToString = symbolProto ? symbolProto.toString : undefined; - -/** - * The base implementation of `_.toString` which doesn't convert nullish - * values to empty strings. - * - * @private - * @param {*} value The value to process. - * @returns {string} Returns the string. - */ -function baseToString(value) { - // Exit early for strings to avoid a performance hit in some environments. - if (typeof value == 'string') { - return value; - } - if ((0,isArray/* default */.A)(value)) { - // Recursively convert values (susceptible to call stack limits). - return (0,_arrayMap/* default */.A)(value, baseToString) + ''; - } - if ((0,isSymbol/* default */.A)(value)) { - return symbolToString ? symbolToString.call(value) : ''; - } - var result = (value + ''); - return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; -} - -/* harmony default export */ const _baseToString = (baseToString); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/toString.js - - -/** - * Converts `value` to a string. An empty string is returned for `null` - * and `undefined` values. The sign of `-0` is preserved. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {string} Returns the converted string. - * @example - * - * _.toString(null); - * // => '' - * - * _.toString(-0); - * // => '-0' - * - * _.toString([1, 2, 3]); - * // => '1,2,3' - */ -function toString_toString(value) { - return value == null ? '' : _baseToString(value); -} - -/* harmony default export */ const lodash_es_toString = (toString_toString); - - -/***/ }), - -/***/ 5664: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _toString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(28894); - - -/** Used to generate unique IDs. */ -var idCounter = 0; - -/** - * Generates a unique ID. If `prefix` is given, the ID is appended to it. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Util - * @param {string} [prefix=''] The value to prefix the ID with. - * @returns {string} Returns the unique ID. - * @example - * - * _.uniqueId('contact_'); - * // => 'contact_104' - * - * _.uniqueId(); - * // => '105' - */ -function uniqueId(prefix) { - var id = ++idCounter; - return (0,_toString_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(prefix) + id; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (uniqueId); - - -/***/ }), - -/***/ 38207: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ lodash_es_values) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayMap.js -var _arrayMap = __webpack_require__(45572); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseValues.js - - -/** - * The base implementation of `_.values` and `_.valuesIn` which creates an - * array of `object` property values corresponding to the property names - * of `props`. - * - * @private - * @param {Object} object The object to query. - * @param {Array} props The property names to get values for. - * @returns {Object} Returns the array of property values. - */ -function baseValues(object, props) { - return (0,_arrayMap/* default */.A)(props, function(key) { - return object[key]; - }); -} - -/* harmony default export */ const _baseValues = (baseValues); - -// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js -var keys = __webpack_require__(27422); -;// CONCATENATED MODULE: ./node_modules/lodash-es/values.js - - - -/** - * Creates an array of the own enumerable string keyed property values of `object`. - * - * **Note:** Non-object values are coerced to objects. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property values. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.values(new Foo); - * // => [1, 2] (iteration order is not guaranteed) - * - * _.values('hi'); - * // => ['h', 'i'] - */ -function values(object) { - return object == null ? [] : _baseValues(object, (0,keys/* default */.A)(object)); -} - -/* harmony default export */ const lodash_es_values = (values); - - -/***/ }), - -/***/ 73743: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - a: () => (/* binding */ createText), - c: () => (/* binding */ computeDimensionOfText) -}); - -// NAMESPACE OBJECT: ./node_modules/mermaid/node_modules/micromark/lib/constructs.js -var constructs_namespaceObject = {}; -__webpack_require__.r(constructs_namespaceObject); -__webpack_require__.d(constructs_namespaceObject, { - attentionMarkers: () => (attentionMarkers), - contentInitial: () => (contentInitial), - disable: () => (disable), - document: () => (constructs_document), - flow: () => (constructs_flow), - flowInitial: () => (flowInitial), - insideSpan: () => (insideSpan), - string: () => (constructs_string), - text: () => (constructs_text) -}); - -// EXTERNAL MODULE: ./node_modules/mermaid/dist/mermaid-b5860b54.js + 8 modules -var mermaid_b5860b54 = __webpack_require__(86079); -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/mdast-util-to-string/lib/index.js -/** - * @typedef {import('mdast').Root|import('mdast').Content} Node - * - * @typedef Options - * Configuration (optional). - * @property {boolean | null | undefined} [includeImageAlt=true] - * Whether to use `alt` for `image`s. - * @property {boolean | null | undefined} [includeHtml=true] - * Whether to use `value` of HTML. - */ - -/** @type {Options} */ -const emptyOptions = {} - -/** - * Get the text content of a node or list of nodes. - * - * Prefers the node’s plain-text fields, otherwise serializes its children, - * and if the given value is an array, serialize the nodes in it. - * - * @param {unknown} value - * Thing to serialize, typically `Node`. - * @param {Options | null | undefined} [options] - * Configuration (optional). - * @returns {string} - * Serialized `value`. - */ -function lib_toString(value, options) { - const settings = options || emptyOptions - const includeImageAlt = - typeof settings.includeImageAlt === 'boolean' - ? settings.includeImageAlt - : true - const includeHtml = - typeof settings.includeHtml === 'boolean' ? settings.includeHtml : true - - return one(value, includeImageAlt, includeHtml) -} - -/** - * One node or several nodes. - * - * @param {unknown} value - * Thing to serialize. - * @param {boolean} includeImageAlt - * Include image `alt`s. - * @param {boolean} includeHtml - * Include HTML. - * @returns {string} - * Serialized node. - */ -function one(value, includeImageAlt, includeHtml) { - if (node(value)) { - if ('value' in value) { - return value.type === 'html' && !includeHtml ? '' : value.value - } - - if (includeImageAlt && 'alt' in value && value.alt) { - return value.alt - } - - if ('children' in value) { - return lib_all(value.children, includeImageAlt, includeHtml) - } - } - - if (Array.isArray(value)) { - return lib_all(value, includeImageAlt, includeHtml) - } - - return '' -} - -/** - * Serialize a list of nodes. - * - * @param {Array} values - * Thing to serialize. - * @param {boolean} includeImageAlt - * Include image `alt`s. - * @param {boolean} includeHtml - * Include HTML. - * @returns {string} - * Serialized nodes. - */ -function lib_all(values, includeImageAlt, includeHtml) { - /** @type {Array} */ - const result = [] - let index = -1 - - while (++index < values.length) { - result[index] = one(values[index], includeImageAlt, includeHtml) - } - - return result.join('') -} - -/** - * Check if `value` looks like a node. - * - * @param {unknown} value - * Thing. - * @returns {value is Node} - * Whether `value` is a node. - */ -function node(value) { - return Boolean(value && typeof value === 'object') -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-chunked/index.js -/** - * Like `Array#splice`, but smarter for giant arrays. - * - * `Array#splice` takes all items to be inserted as individual argument which - * causes a stack overflow in V8 when trying to insert 100k items for instance. - * - * Otherwise, this does not return the removed items, and takes `items` as an - * array instead of rest parameters. - * - * @template {unknown} T - * Item type. - * @param {Array} list - * List to operate on. - * @param {number} start - * Index to remove/insert at (can be negative). - * @param {number} remove - * Number of items to remove. - * @param {Array} items - * Items to inject into `list`. - * @returns {void} - * Nothing. - */ -function splice(list, start, remove, items) { - const end = list.length - let chunkStart = 0 - /** @type {Array} */ - let parameters - - // Make start between zero and `end` (included). - if (start < 0) { - start = -start > end ? 0 : end + start - } else { - start = start > end ? end : start - } - remove = remove > 0 ? remove : 0 - - // No need to chunk the items if there’s only a couple (10k) items. - if (items.length < 10000) { - parameters = Array.from(items) - parameters.unshift(start, remove) - // @ts-expect-error Hush, it’s fine. - list.splice(...parameters) - } else { - // Delete `remove` items starting from `start` - if (remove) list.splice(start, remove) - - // Insert the items in chunks to not cause stack overflows. - while (chunkStart < items.length) { - parameters = items.slice(chunkStart, chunkStart + 10000) - parameters.unshift(start, 0) - // @ts-expect-error Hush, it’s fine. - list.splice(...parameters) - chunkStart += 10000 - start += 10000 - } - } -} - -/** - * Append `items` (an array) at the end of `list` (another array). - * When `list` was empty, returns `items` instead. - * - * This prevents a potentially expensive operation when `list` is empty, - * and adds items in batches to prevent V8 from hanging. - * - * @template {unknown} T - * Item type. - * @param {Array} list - * List to operate on. - * @param {Array} items - * Items to add to `list`. - * @returns {Array} - * Either `list` or `items`. - */ -function push(list, items) { - if (list.length > 0) { - splice(list, list.length, 0, items) - return list - } - return items -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-combine-extensions/index.js -/** - * @typedef {import('micromark-util-types').Extension} Extension - * @typedef {import('micromark-util-types').Handles} Handles - * @typedef {import('micromark-util-types').HtmlExtension} HtmlExtension - * @typedef {import('micromark-util-types').NormalizedExtension} NormalizedExtension - */ - - - -const micromark_util_combine_extensions_hasOwnProperty = {}.hasOwnProperty - -/** - * Combine multiple syntax extensions into one. - * - * @param {Array} extensions - * List of syntax extensions. - * @returns {NormalizedExtension} - * A single combined extension. - */ -function combineExtensions(extensions) { - /** @type {NormalizedExtension} */ - const all = {} - let index = -1 - - while (++index < extensions.length) { - syntaxExtension(all, extensions[index]) - } - - return all -} - -/** - * Merge `extension` into `all`. - * - * @param {NormalizedExtension} all - * Extension to merge into. - * @param {Extension} extension - * Extension to merge. - * @returns {void} - */ -function syntaxExtension(all, extension) { - /** @type {keyof Extension} */ - let hook - - for (hook in extension) { - const maybe = micromark_util_combine_extensions_hasOwnProperty.call(all, hook) ? all[hook] : undefined - /** @type {Record} */ - const left = maybe || (all[hook] = {}) - /** @type {Record | undefined} */ - const right = extension[hook] - /** @type {string} */ - let code - - if (right) { - for (code in right) { - if (!micromark_util_combine_extensions_hasOwnProperty.call(left, code)) left[code] = [] - const value = right[code] - constructs( - // @ts-expect-error Looks like a list. - left[code], - Array.isArray(value) ? value : value ? [value] : [] - ) - } - } - } -} - -/** - * Merge `list` into `existing` (both lists of constructs). - * Mutates `existing`. - * - * @param {Array} existing - * @param {Array} list - * @returns {void} - */ -function constructs(existing, list) { - let index = -1 - /** @type {Array} */ - const before = [] - - while (++index < list.length) { - // @ts-expect-error Looks like an object. - ;(list[index].add === 'after' ? existing : before).push(list[index]) - } - - splice(existing, 0, 0, before) -} - -/** - * Combine multiple HTML extensions into one. - * - * @param {Array} htmlExtensions - * List of HTML extensions. - * @returns {HtmlExtension} - * A single combined HTML extension. - */ -function combineHtmlExtensions(htmlExtensions) { - /** @type {HtmlExtension} */ - const handlers = {} - let index = -1 - - while (++index < htmlExtensions.length) { - htmlExtension(handlers, htmlExtensions[index]) - } - - return handlers -} - -/** - * Merge `extension` into `all`. - * - * @param {HtmlExtension} all - * Extension to merge into. - * @param {HtmlExtension} extension - * Extension to merge. - * @returns {void} - */ -function htmlExtension(all, extension) { - /** @type {keyof HtmlExtension} */ - let hook - - for (hook in extension) { - const maybe = micromark_util_combine_extensions_hasOwnProperty.call(all, hook) ? all[hook] : undefined - const left = maybe || (all[hook] = {}) - const right = extension[hook] - /** @type {keyof Handles} */ - let type - - if (right) { - for (type in right) { - // @ts-expect-error assume document vs regular handler are managed correctly. - left[type] = right[type] - } - } - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-character/lib/unicode-punctuation-regex.js -// This module is generated by `script/`. -// -// CommonMark handles attention (emphasis, strong) markers based on what comes -// before or after them. -// One such difference is if those characters are Unicode punctuation. -// This script is generated from the Unicode data. - -/** - * Regular expression that matches a unicode punctuation character. - */ -const unicodePunctuationRegex = - /[!-\/:-@\[-`\{-~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/ - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-character/index.js -/** - * @typedef {import('micromark-util-types').Code} Code - */ - - - -/** - * Check whether the character code represents an ASCII alpha (`a` through `z`, - * case insensitive). - * - * An **ASCII alpha** is an ASCII upper alpha or ASCII lower alpha. - * - * An **ASCII upper alpha** is a character in the inclusive range U+0041 (`A`) - * to U+005A (`Z`). - * - * An **ASCII lower alpha** is a character in the inclusive range U+0061 (`a`) - * to U+007A (`z`). - * - * @param code - * Code. - * @returns - * Whether it matches. - */ -const asciiAlpha = regexCheck(/[A-Za-z]/) - -/** - * Check whether the character code represents an ASCII alphanumeric (`a` - * through `z`, case insensitive, or `0` through `9`). - * - * An **ASCII alphanumeric** is an ASCII digit (see `asciiDigit`) or ASCII alpha - * (see `asciiAlpha`). - * - * @param code - * Code. - * @returns - * Whether it matches. - */ -const asciiAlphanumeric = regexCheck(/[\dA-Za-z]/) - -/** - * Check whether the character code represents an ASCII atext. - * - * atext is an ASCII alphanumeric (see `asciiAlphanumeric`), or a character in - * the inclusive ranges U+0023 NUMBER SIGN (`#`) to U+0027 APOSTROPHE (`'`), - * U+002A ASTERISK (`*`), U+002B PLUS SIGN (`+`), U+002D DASH (`-`), U+002F - * SLASH (`/`), U+003D EQUALS TO (`=`), U+003F QUESTION MARK (`?`), U+005E - * CARET (`^`) to U+0060 GRAVE ACCENT (`` ` ``), or U+007B LEFT CURLY BRACE - * (`{`) to U+007E TILDE (`~`). - * - * See: - * **\[RFC5322]**: - * [Internet Message Format](https://tools.ietf.org/html/rfc5322). - * P. Resnick. - * IETF. - * - * @param code - * Code. - * @returns - * Whether it matches. - */ -const asciiAtext = regexCheck(/[#-'*+\--9=?A-Z^-~]/) - -/** - * Check whether a character code is an ASCII control character. - * - * An **ASCII control** is a character in the inclusive range U+0000 NULL (NUL) - * to U+001F (US), or U+007F (DEL). - * - * @param {Code} code - * Code. - * @returns {boolean} - * Whether it matches. - */ -function asciiControl(code) { - return ( - // Special whitespace codes (which have negative values), C0 and Control - // character DEL - code !== null && (code < 32 || code === 127) - ) -} - -/** - * Check whether the character code represents an ASCII digit (`0` through `9`). - * - * An **ASCII digit** is a character in the inclusive range U+0030 (`0`) to - * U+0039 (`9`). - * - * @param code - * Code. - * @returns - * Whether it matches. - */ -const asciiDigit = regexCheck(/\d/) - -/** - * Check whether the character code represents an ASCII hex digit (`a` through - * `f`, case insensitive, or `0` through `9`). - * - * An **ASCII hex digit** is an ASCII digit (see `asciiDigit`), ASCII upper hex - * digit, or an ASCII lower hex digit. - * - * An **ASCII upper hex digit** is a character in the inclusive range U+0041 - * (`A`) to U+0046 (`F`). - * - * An **ASCII lower hex digit** is a character in the inclusive range U+0061 - * (`a`) to U+0066 (`f`). - * - * @param code - * Code. - * @returns - * Whether it matches. - */ -const asciiHexDigit = regexCheck(/[\dA-Fa-f]/) - -/** - * Check whether the character code represents ASCII punctuation. - * - * An **ASCII punctuation** is a character in the inclusive ranges U+0021 - * EXCLAMATION MARK (`!`) to U+002F SLASH (`/`), U+003A COLON (`:`) to U+0040 AT - * SIGN (`@`), U+005B LEFT SQUARE BRACKET (`[`) to U+0060 GRAVE ACCENT - * (`` ` ``), or U+007B LEFT CURLY BRACE (`{`) to U+007E TILDE (`~`). - * - * @param code - * Code. - * @returns - * Whether it matches. - */ -const asciiPunctuation = regexCheck(/[!-/:-@[-`{-~]/) - -/** - * Check whether a character code is a markdown line ending. - * - * A **markdown line ending** is the virtual characters M-0003 CARRIAGE RETURN - * LINE FEED (CRLF), M-0004 LINE FEED (LF) and M-0005 CARRIAGE RETURN (CR). - * - * In micromark, the actual character U+000A LINE FEED (LF) and U+000D CARRIAGE - * RETURN (CR) are replaced by these virtual characters depending on whether - * they occurred together. - * - * @param {Code} code - * Code. - * @returns {boolean} - * Whether it matches. - */ -function markdownLineEnding(code) { - return code !== null && code < -2 -} - -/** - * Check whether a character code is a markdown line ending (see - * `markdownLineEnding`) or markdown space (see `markdownSpace`). - * - * @param {Code} code - * Code. - * @returns {boolean} - * Whether it matches. - */ -function markdownLineEndingOrSpace(code) { - return code !== null && (code < 0 || code === 32) -} - -/** - * Check whether a character code is a markdown space. - * - * A **markdown space** is the concrete character U+0020 SPACE (SP) and the - * virtual characters M-0001 VIRTUAL SPACE (VS) and M-0002 HORIZONTAL TAB (HT). - * - * In micromark, the actual character U+0009 CHARACTER TABULATION (HT) is - * replaced by one M-0002 HORIZONTAL TAB (HT) and between 0 and 3 M-0001 VIRTUAL - * SPACE (VS) characters, depending on the column at which the tab occurred. - * - * @param {Code} code - * Code. - * @returns {boolean} - * Whether it matches. - */ -function markdownSpace(code) { - return code === -2 || code === -1 || code === 32 -} - -// Size note: removing ASCII from the regex and using `asciiPunctuation` here -// In fact adds to the bundle size. -/** - * Check whether the character code represents Unicode punctuation. - * - * A **Unicode punctuation** is a character in the Unicode `Pc` (Punctuation, - * Connector), `Pd` (Punctuation, Dash), `Pe` (Punctuation, Close), `Pf` - * (Punctuation, Final quote), `Pi` (Punctuation, Initial quote), `Po` - * (Punctuation, Other), or `Ps` (Punctuation, Open) categories, or an ASCII - * punctuation (see `asciiPunctuation`). - * - * See: - * **\[UNICODE]**: - * [The Unicode Standard](https://www.unicode.org/versions/). - * Unicode Consortium. - * - * @param code - * Code. - * @returns - * Whether it matches. - */ -const unicodePunctuation = regexCheck(unicodePunctuationRegex) - -/** - * Check whether the character code represents Unicode whitespace. - * - * Note that this does handle micromark specific markdown whitespace characters. - * See `markdownLineEndingOrSpace` to check that. - * - * A **Unicode whitespace** is a character in the Unicode `Zs` (Separator, - * Space) category, or U+0009 CHARACTER TABULATION (HT), U+000A LINE FEED (LF), - * U+000C (FF), or U+000D CARRIAGE RETURN (CR) (**\[UNICODE]**). - * - * See: - * **\[UNICODE]**: - * [The Unicode Standard](https://www.unicode.org/versions/). - * Unicode Consortium. - * - * @param code - * Code. - * @returns - * Whether it matches. - */ -const unicodeWhitespace = regexCheck(/\s/) - -/** - * Create a code check from a regex. - * - * @param {RegExp} regex - * @returns {(code: Code) => boolean} - */ -function regexCheck(regex) { - return check - - /** - * Check whether a code matches the bound regex. - * - * @param {Code} code - * Character code. - * @returns {boolean} - * Whether the character code matches the bound regex. - */ - function check(code) { - return code !== null && regex.test(String.fromCharCode(code)) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-space/index.js -/** - * @typedef {import('micromark-util-types').Effects} Effects - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenType} TokenType - */ - - - -// To do: implement `spaceOrTab`, `spaceOrTabMinMax`, `spaceOrTabWithOptions`. - -/** - * Parse spaces and tabs. - * - * There is no `nok` parameter: - * - * * spaces in markdown are often optional, in which case this factory can be - * used and `ok` will be switched to whether spaces were found or not - * * one line ending or space can be detected with `markdownSpace(code)` right - * before using `factorySpace` - * - * ###### Examples - * - * Where `␉` represents a tab (plus how much it expands) and `␠` represents a - * single space. - * - * ```markdown - * ␉ - * ␠␠␠␠ - * ␉␠ - * ``` - * - * @param {Effects} effects - * Context. - * @param {State} ok - * State switched to when successful. - * @param {TokenType} type - * Type (`' \t'`). - * @param {number | undefined} [max=Infinity] - * Max (exclusive). - * @returns - * Start state. - */ -function factorySpace(effects, ok, type, max) { - const limit = max ? max - 1 : Number.POSITIVE_INFINITY - let size = 0 - return start - - /** @type {State} */ - function start(code) { - if (markdownSpace(code)) { - effects.enter(type) - return prefix(code) - } - return ok(code) - } - - /** @type {State} */ - function prefix(code) { - if (markdownSpace(code) && size++ < limit) { - effects.consume(code) - return prefix - } - effects.exit(type) - return ok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/initialize/content.js -/** - * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct - * @typedef {import('micromark-util-types').Initializer} Initializer - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').Token} Token - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - */ - - - -/** @type {InitialConstruct} */ -const content = { - tokenize: initializeContent -} - -/** - * @this {TokenizeContext} - * @type {Initializer} - */ -function initializeContent(effects) { - const contentStart = effects.attempt( - this.parser.constructs.contentInitial, - afterContentStartConstruct, - paragraphInitial - ) - /** @type {Token} */ - let previous - return contentStart - - /** @type {State} */ - function afterContentStartConstruct(code) { - if (code === null) { - effects.consume(code) - return - } - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return factorySpace(effects, contentStart, 'linePrefix') - } - - /** @type {State} */ - function paragraphInitial(code) { - effects.enter('paragraph') - return lineStart(code) - } - - /** @type {State} */ - function lineStart(code) { - const token = effects.enter('chunkText', { - contentType: 'text', - previous - }) - if (previous) { - previous.next = token - } - previous = token - return data(code) - } - - /** @type {State} */ - function data(code) { - if (code === null) { - effects.exit('chunkText') - effects.exit('paragraph') - effects.consume(code) - return - } - if (markdownLineEnding(code)) { - effects.consume(code) - effects.exit('chunkText') - return lineStart - } - - // Data. - effects.consume(code) - return data - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/initialize/document.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').ContainerState} ContainerState - * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct - * @typedef {import('micromark-util-types').Initializer} Initializer - * @typedef {import('micromark-util-types').Point} Point - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').Token} Token - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - -/** - * @typedef {[Construct, ContainerState]} StackItem - */ - - - - -/** @type {InitialConstruct} */ -const document_document = { - tokenize: initializeDocument -} - -/** @type {Construct} */ -const containerConstruct = { - tokenize: tokenizeContainer -} - -/** - * @this {TokenizeContext} - * @type {Initializer} - */ -function initializeDocument(effects) { - const self = this - /** @type {Array} */ - const stack = [] - let continued = 0 - /** @type {TokenizeContext | undefined} */ - let childFlow - /** @type {Token | undefined} */ - let childToken - /** @type {number} */ - let lineStartOffset - return start - - /** @type {State} */ - function start(code) { - // First we iterate through the open blocks, starting with the root - // document, and descending through last children down to the last open - // block. - // Each block imposes a condition that the line must satisfy if the block is - // to remain open. - // For example, a block quote requires a `>` character. - // A paragraph requires a non-blank line. - // In this phase we may match all or just some of the open blocks. - // But we cannot close unmatched blocks yet, because we may have a lazy - // continuation line. - if (continued < stack.length) { - const item = stack[continued] - self.containerState = item[1] - return effects.attempt( - item[0].continuation, - documentContinue, - checkNewContainers - )(code) - } - - // Done. - return checkNewContainers(code) - } - - /** @type {State} */ - function documentContinue(code) { - continued++ - - // Note: this field is called `_closeFlow` but it also closes containers. - // Perhaps a good idea to rename it but it’s already used in the wild by - // extensions. - if (self.containerState._closeFlow) { - self.containerState._closeFlow = undefined - if (childFlow) { - closeFlow() - } - - // Note: this algorithm for moving events around is similar to the - // algorithm when dealing with lazy lines in `writeToChild`. - const indexBeforeExits = self.events.length - let indexBeforeFlow = indexBeforeExits - /** @type {Point | undefined} */ - let point - - // Find the flow chunk. - while (indexBeforeFlow--) { - if ( - self.events[indexBeforeFlow][0] === 'exit' && - self.events[indexBeforeFlow][1].type === 'chunkFlow' - ) { - point = self.events[indexBeforeFlow][1].end - break - } - } - exitContainers(continued) - - // Fix positions. - let index = indexBeforeExits - while (index < self.events.length) { - self.events[index][1].end = Object.assign({}, point) - index++ - } - - // Inject the exits earlier (they’re still also at the end). - splice( - self.events, - indexBeforeFlow + 1, - 0, - self.events.slice(indexBeforeExits) - ) - - // Discard the duplicate exits. - self.events.length = index - return checkNewContainers(code) - } - return start(code) - } - - /** @type {State} */ - function checkNewContainers(code) { - // Next, after consuming the continuation markers for existing blocks, we - // look for new block starts (e.g. `>` for a block quote). - // If we encounter a new block start, we close any blocks unmatched in - // step 1 before creating the new block as a child of the last matched - // block. - if (continued === stack.length) { - // No need to `check` whether there’s a container, of `exitContainers` - // would be moot. - // We can instead immediately `attempt` to parse one. - if (!childFlow) { - return documentContinued(code) - } - - // If we have concrete content, such as block HTML or fenced code, - // we can’t have containers “pierce” into them, so we can immediately - // start. - if (childFlow.currentConstruct && childFlow.currentConstruct.concrete) { - return flowStart(code) - } - - // If we do have flow, it could still be a blank line, - // but we’d be interrupting it w/ a new container if there’s a current - // construct. - // To do: next major: remove `_gfmTableDynamicInterruptHack` (no longer - // needed in micromark-extension-gfm-table@1.0.6). - self.interrupt = Boolean( - childFlow.currentConstruct && !childFlow._gfmTableDynamicInterruptHack - ) - } - - // Check if there is a new container. - self.containerState = {} - return effects.check( - containerConstruct, - thereIsANewContainer, - thereIsNoNewContainer - )(code) - } - - /** @type {State} */ - function thereIsANewContainer(code) { - if (childFlow) closeFlow() - exitContainers(continued) - return documentContinued(code) - } - - /** @type {State} */ - function thereIsNoNewContainer(code) { - self.parser.lazy[self.now().line] = continued !== stack.length - lineStartOffset = self.now().offset - return flowStart(code) - } - - /** @type {State} */ - function documentContinued(code) { - // Try new containers. - self.containerState = {} - return effects.attempt( - containerConstruct, - containerContinue, - flowStart - )(code) - } - - /** @type {State} */ - function containerContinue(code) { - continued++ - stack.push([self.currentConstruct, self.containerState]) - // Try another. - return documentContinued(code) - } - - /** @type {State} */ - function flowStart(code) { - if (code === null) { - if (childFlow) closeFlow() - exitContainers(0) - effects.consume(code) - return - } - childFlow = childFlow || self.parser.flow(self.now()) - effects.enter('chunkFlow', { - contentType: 'flow', - previous: childToken, - _tokenizer: childFlow - }) - return flowContinue(code) - } - - /** @type {State} */ - function flowContinue(code) { - if (code === null) { - writeToChild(effects.exit('chunkFlow'), true) - exitContainers(0) - effects.consume(code) - return - } - if (markdownLineEnding(code)) { - effects.consume(code) - writeToChild(effects.exit('chunkFlow')) - // Get ready for the next line. - continued = 0 - self.interrupt = undefined - return start - } - effects.consume(code) - return flowContinue - } - - /** - * @param {Token} token - * @param {boolean | undefined} [eof] - * @returns {void} - */ - function writeToChild(token, eof) { - const stream = self.sliceStream(token) - if (eof) stream.push(null) - token.previous = childToken - if (childToken) childToken.next = token - childToken = token - childFlow.defineSkip(token.start) - childFlow.write(stream) - - // Alright, so we just added a lazy line: - // - // ```markdown - // > a - // b. - // - // Or: - // - // > ~~~c - // d - // - // Or: - // - // > | e | - // f - // ``` - // - // The construct in the second example (fenced code) does not accept lazy - // lines, so it marked itself as done at the end of its first line, and - // then the content construct parses `d`. - // Most constructs in markdown match on the first line: if the first line - // forms a construct, a non-lazy line can’t “unmake” it. - // - // The construct in the third example is potentially a GFM table, and - // those are *weird*. - // It *could* be a table, from the first line, if the following line - // matches a condition. - // In this case, that second line is lazy, which “unmakes” the first line - // and turns the whole into one content block. - // - // We’ve now parsed the non-lazy and the lazy line, and can figure out - // whether the lazy line started a new flow block. - // If it did, we exit the current containers between the two flow blocks. - if (self.parser.lazy[token.start.line]) { - let index = childFlow.events.length - while (index--) { - if ( - // The token starts before the line ending… - childFlow.events[index][1].start.offset < lineStartOffset && - // …and either is not ended yet… - (!childFlow.events[index][1].end || - // …or ends after it. - childFlow.events[index][1].end.offset > lineStartOffset) - ) { - // Exit: there’s still something open, which means it’s a lazy line - // part of something. - return - } - } - - // Note: this algorithm for moving events around is similar to the - // algorithm when closing flow in `documentContinue`. - const indexBeforeExits = self.events.length - let indexBeforeFlow = indexBeforeExits - /** @type {boolean | undefined} */ - let seen - /** @type {Point | undefined} */ - let point - - // Find the previous chunk (the one before the lazy line). - while (indexBeforeFlow--) { - if ( - self.events[indexBeforeFlow][0] === 'exit' && - self.events[indexBeforeFlow][1].type === 'chunkFlow' - ) { - if (seen) { - point = self.events[indexBeforeFlow][1].end - break - } - seen = true - } - } - exitContainers(continued) - - // Fix positions. - index = indexBeforeExits - while (index < self.events.length) { - self.events[index][1].end = Object.assign({}, point) - index++ - } - - // Inject the exits earlier (they’re still also at the end). - splice( - self.events, - indexBeforeFlow + 1, - 0, - self.events.slice(indexBeforeExits) - ) - - // Discard the duplicate exits. - self.events.length = index - } - } - - /** - * @param {number} size - * @returns {void} - */ - function exitContainers(size) { - let index = stack.length - - // Exit open containers. - while (index-- > size) { - const entry = stack[index] - self.containerState = entry[1] - entry[0].exit.call(self, effects) - } - stack.length = size - } - function closeFlow() { - childFlow.write([null]) - childToken = undefined - childFlow = undefined - self.containerState._closeFlow = undefined - } -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeContainer(effects, ok, nok) { - // Always populated by defaults. - - return factorySpace( - effects, - effects.attempt(this.parser.constructs.document, ok, nok), - 'linePrefix', - this.parser.constructs.disable.null.includes('codeIndented') ? undefined : 4 - ) -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/blank-line.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const blankLine = { - tokenize: tokenizeBlankLine, - partial: true -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeBlankLine(effects, ok, nok) { - return start - - /** - * Start of blank line. - * - * > 👉 **Note**: `␠` represents a space character. - * - * ```markdown - * > | ␠␠␊ - * ^ - * > | ␊ - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - return markdownSpace(code) - ? factorySpace(effects, after, 'linePrefix')(code) - : after(code) - } - - /** - * At eof/eol, after optional whitespace. - * - * > 👉 **Note**: `␠` represents a space character. - * - * ```markdown - * > | ␠␠␊ - * ^ - * > | ␊ - * ^ - * ``` - * - * @type {State} - */ - function after(code) { - return code === null || markdownLineEnding(code) ? ok(code) : nok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/micromark-util-subtokenize/node_modules/micromark-util-chunked/index.js -/** - * Like `Array#splice`, but smarter for giant arrays. - * - * `Array#splice` takes all items to be inserted as individual argument which - * causes a stack overflow in V8 when trying to insert 100k items for instance. - * - * Otherwise, this does not return the removed items, and takes `items` as an - * array instead of rest parameters. - * - * @template {unknown} T - * Item type. - * @param {Array} list - * List to operate on. - * @param {number} start - * Index to remove/insert at (can be negative). - * @param {number} remove - * Number of items to remove. - * @param {Array} items - * Items to inject into `list`. - * @returns {void} - * Nothing. - */ -function micromark_util_chunked_splice(list, start, remove, items) { - const end = list.length - let chunkStart = 0 - /** @type {Array} */ - let parameters - - // Make start between zero and `end` (included). - if (start < 0) { - start = -start > end ? 0 : end + start - } else { - start = start > end ? end : start - } - remove = remove > 0 ? remove : 0 - - // No need to chunk the items if there’s only a couple (10k) items. - if (items.length < 10000) { - parameters = Array.from(items) - parameters.unshift(start, remove) - // @ts-expect-error Hush, it’s fine. - list.splice(...parameters) - } else { - // Delete `remove` items starting from `start` - if (remove) list.splice(start, remove) - - // Insert the items in chunks to not cause stack overflows. - while (chunkStart < items.length) { - parameters = items.slice(chunkStart, chunkStart + 10000) - parameters.unshift(start, 0) - // @ts-expect-error Hush, it’s fine. - list.splice(...parameters) - chunkStart += 10000 - start += 10000 - } - } -} - -/** - * Append `items` (an array) at the end of `list` (another array). - * When `list` was empty, returns `items` instead. - * - * This prevents a potentially expensive operation when `list` is empty, - * and adds items in batches to prevent V8 from hanging. - * - * @template {unknown} T - * Item type. - * @param {Array} list - * List to operate on. - * @param {Array} items - * Items to add to `list`. - * @returns {Array} - * Either `list` or `items`. - */ -function micromark_util_chunked_push(list, items) { - if (list.length > 0) { - micromark_util_chunked_splice(list, list.length, 0, items) - return list - } - return items -} - -;// CONCATENATED MODULE: ./node_modules/micromark-util-subtokenize/index.js -/** - * @typedef {import('micromark-util-types').Chunk} Chunk - * @typedef {import('micromark-util-types').Event} Event - * @typedef {import('micromark-util-types').Token} Token - */ - - -/** - * Tokenize subcontent. - * - * @param {Array} events - * List of events. - * @returns {boolean} - * Whether subtokens were found. - */ -function subtokenize(events) { - /** @type {Record} */ - const jumps = {} - let index = -1 - /** @type {Event} */ - let event - /** @type {number | undefined} */ - let lineIndex - /** @type {number} */ - let otherIndex - /** @type {Event} */ - let otherEvent - /** @type {Array} */ - let parameters - /** @type {Array} */ - let subevents - /** @type {boolean | undefined} */ - let more - while (++index < events.length) { - while (index in jumps) { - index = jumps[index] - } - event = events[index] - - // Add a hook for the GFM tasklist extension, which needs to know if text - // is in the first content of a list item. - if ( - index && - event[1].type === 'chunkFlow' && - events[index - 1][1].type === 'listItemPrefix' - ) { - subevents = event[1]._tokenizer.events - otherIndex = 0 - if ( - otherIndex < subevents.length && - subevents[otherIndex][1].type === 'lineEndingBlank' - ) { - otherIndex += 2 - } - if ( - otherIndex < subevents.length && - subevents[otherIndex][1].type === 'content' - ) { - while (++otherIndex < subevents.length) { - if (subevents[otherIndex][1].type === 'content') { - break - } - if (subevents[otherIndex][1].type === 'chunkText') { - subevents[otherIndex][1]._isInFirstContentOfListItem = true - otherIndex++ - } - } - } - } - - // Enter. - if (event[0] === 'enter') { - if (event[1].contentType) { - Object.assign(jumps, subcontent(events, index)) - index = jumps[index] - more = true - } - } - // Exit. - else if (event[1]._container) { - otherIndex = index - lineIndex = undefined - while (otherIndex--) { - otherEvent = events[otherIndex] - if ( - otherEvent[1].type === 'lineEnding' || - otherEvent[1].type === 'lineEndingBlank' - ) { - if (otherEvent[0] === 'enter') { - if (lineIndex) { - events[lineIndex][1].type = 'lineEndingBlank' - } - otherEvent[1].type = 'lineEnding' - lineIndex = otherIndex - } - } else { - break - } - } - if (lineIndex) { - // Fix position. - event[1].end = Object.assign({}, events[lineIndex][1].start) - - // Switch container exit w/ line endings. - parameters = events.slice(lineIndex, index) - parameters.unshift(event) - micromark_util_chunked_splice(events, lineIndex, index - lineIndex + 1, parameters) - } - } - } - return !more -} - -/** - * Tokenize embedded tokens. - * - * @param {Array} events - * @param {number} eventIndex - * @returns {Record} - */ -function subcontent(events, eventIndex) { - const token = events[eventIndex][1] - const context = events[eventIndex][2] - let startPosition = eventIndex - 1 - /** @type {Array} */ - const startPositions = [] - const tokenizer = - token._tokenizer || context.parser[token.contentType](token.start) - const childEvents = tokenizer.events - /** @type {Array<[number, number]>} */ - const jumps = [] - /** @type {Record} */ - const gaps = {} - /** @type {Array} */ - let stream - /** @type {Token | undefined} */ - let previous - let index = -1 - /** @type {Token | undefined} */ - let current = token - let adjust = 0 - let start = 0 - const breaks = [start] - - // Loop forward through the linked tokens to pass them in order to the - // subtokenizer. - while (current) { - // Find the position of the event for this token. - while (events[++startPosition][1] !== current) { - // Empty. - } - startPositions.push(startPosition) - if (!current._tokenizer) { - stream = context.sliceStream(current) - if (!current.next) { - stream.push(null) - } - if (previous) { - tokenizer.defineSkip(current.start) - } - if (current._isInFirstContentOfListItem) { - tokenizer._gfmTasklistFirstContentOfListItem = true - } - tokenizer.write(stream) - if (current._isInFirstContentOfListItem) { - tokenizer._gfmTasklistFirstContentOfListItem = undefined - } - } - - // Unravel the next token. - previous = current - current = current.next - } - - // Now, loop back through all events (and linked tokens), to figure out which - // parts belong where. - current = token - while (++index < childEvents.length) { - if ( - // Find a void token that includes a break. - childEvents[index][0] === 'exit' && - childEvents[index - 1][0] === 'enter' && - childEvents[index][1].type === childEvents[index - 1][1].type && - childEvents[index][1].start.line !== childEvents[index][1].end.line - ) { - start = index + 1 - breaks.push(start) - // Help GC. - current._tokenizer = undefined - current.previous = undefined - current = current.next - } - } - - // Help GC. - tokenizer.events = [] - - // If there’s one more token (which is the cases for lines that end in an - // EOF), that’s perfect: the last point we found starts it. - // If there isn’t then make sure any remaining content is added to it. - if (current) { - // Help GC. - current._tokenizer = undefined - current.previous = undefined - } else { - breaks.pop() - } - - // Now splice the events from the subtokenizer into the current events, - // moving back to front so that splice indices aren’t affected. - index = breaks.length - while (index--) { - const slice = childEvents.slice(breaks[index], breaks[index + 1]) - const start = startPositions.pop() - jumps.unshift([start, start + slice.length - 1]) - micromark_util_chunked_splice(events, start, 2, slice) - } - index = -1 - while (++index < jumps.length) { - gaps[adjust + jumps[index][0]] = adjust + jumps[index][1] - adjust += jumps[index][1] - jumps[index][0] - 1 - } - return gaps -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/content.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').Resolver} Resolver - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').Token} Token - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - - -/** - * No name because it must not be turned off. - * @type {Construct} - */ -const content_content = { - tokenize: tokenizeContent, - resolve: resolveContent -} - -/** @type {Construct} */ -const continuationConstruct = { - tokenize: tokenizeContinuation, - partial: true -} - -/** - * Content is transparent: it’s parsed right now. That way, definitions are also - * parsed right now: before text in paragraphs (specifically, media) are parsed. - * - * @type {Resolver} - */ -function resolveContent(events) { - subtokenize(events) - return events -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeContent(effects, ok) { - /** @type {Token | undefined} */ - let previous - return chunkStart - - /** - * Before a content chunk. - * - * ```markdown - * > | abc - * ^ - * ``` - * - * @type {State} - */ - function chunkStart(code) { - effects.enter('content') - previous = effects.enter('chunkContent', { - contentType: 'content' - }) - return chunkInside(code) - } - - /** - * In a content chunk. - * - * ```markdown - * > | abc - * ^^^ - * ``` - * - * @type {State} - */ - function chunkInside(code) { - if (code === null) { - return contentEnd(code) - } - - // To do: in `markdown-rs`, each line is parsed on its own, and everything - // is stitched together resolving. - if (markdownLineEnding(code)) { - return effects.check( - continuationConstruct, - contentContinue, - contentEnd - )(code) - } - - // Data. - effects.consume(code) - return chunkInside - } - - /** - * - * - * @type {State} - */ - function contentEnd(code) { - effects.exit('chunkContent') - effects.exit('content') - return ok(code) - } - - /** - * - * - * @type {State} - */ - function contentContinue(code) { - effects.consume(code) - effects.exit('chunkContent') - previous.next = effects.enter('chunkContent', { - contentType: 'content', - previous - }) - previous = previous.next - return chunkInside - } -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeContinuation(effects, ok, nok) { - const self = this - return startLookahead - - /** - * - * - * @type {State} - */ - function startLookahead(code) { - effects.exit('chunkContent') - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return factorySpace(effects, prefixed, 'linePrefix') - } - - /** - * - * - * @type {State} - */ - function prefixed(code) { - if (code === null || markdownLineEnding(code)) { - return nok(code) - } - - // Always populated by defaults. - - const tail = self.events[self.events.length - 1] - if ( - !self.parser.constructs.disable.null.includes('codeIndented') && - tail && - tail[1].type === 'linePrefix' && - tail[2].sliceSerialize(tail[1], true).length >= 4 - ) { - return ok(code) - } - return effects.interrupt(self.parser.constructs.flow, nok, ok)(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/initialize/flow.js -/** - * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct - * @typedef {import('micromark-util-types').Initializer} Initializer - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - */ - - - - -/** @type {InitialConstruct} */ -const flow = { - tokenize: initializeFlow -} - -/** - * @this {TokenizeContext} - * @type {Initializer} - */ -function initializeFlow(effects) { - const self = this - const initial = effects.attempt( - // Try to parse a blank line. - blankLine, - atBlankEnding, - // Try to parse initial flow (essentially, only code). - effects.attempt( - this.parser.constructs.flowInitial, - afterConstruct, - factorySpace( - effects, - effects.attempt( - this.parser.constructs.flow, - afterConstruct, - effects.attempt(content_content, afterConstruct) - ), - 'linePrefix' - ) - ) - ) - return initial - - /** @type {State} */ - function atBlankEnding(code) { - if (code === null) { - effects.consume(code) - return - } - effects.enter('lineEndingBlank') - effects.consume(code) - effects.exit('lineEndingBlank') - self.currentConstruct = undefined - return initial - } - - /** @type {State} */ - function afterConstruct(code) { - if (code === null) { - effects.consume(code) - return - } - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - self.currentConstruct = undefined - return initial - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/initialize/text.js -/** - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct - * @typedef {import('micromark-util-types').Initializer} Initializer - * @typedef {import('micromark-util-types').Resolver} Resolver - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - */ - -const resolver = { - resolveAll: createResolver() -} -const string = initializeFactory('string') -const text_text = initializeFactory('text') - -/** - * @param {'string' | 'text'} field - * @returns {InitialConstruct} - */ -function initializeFactory(field) { - return { - tokenize: initializeText, - resolveAll: createResolver( - field === 'text' ? resolveAllLineSuffixes : undefined - ) - } - - /** - * @this {TokenizeContext} - * @type {Initializer} - */ - function initializeText(effects) { - const self = this - const constructs = this.parser.constructs[field] - const text = effects.attempt(constructs, start, notText) - return start - - /** @type {State} */ - function start(code) { - return atBreak(code) ? text(code) : notText(code) - } - - /** @type {State} */ - function notText(code) { - if (code === null) { - effects.consume(code) - return - } - effects.enter('data') - effects.consume(code) - return data - } - - /** @type {State} */ - function data(code) { - if (atBreak(code)) { - effects.exit('data') - return text(code) - } - - // Data. - effects.consume(code) - return data - } - - /** - * @param {Code} code - * @returns {boolean} - */ - function atBreak(code) { - if (code === null) { - return true - } - const list = constructs[code] - let index = -1 - if (list) { - // Always populated by defaults. - - while (++index < list.length) { - const item = list[index] - if (!item.previous || item.previous.call(self, self.previous)) { - return true - } - } - } - return false - } - } -} - -/** - * @param {Resolver | undefined} [extraResolver] - * @returns {Resolver} - */ -function createResolver(extraResolver) { - return resolveAllText - - /** @type {Resolver} */ - function resolveAllText(events, context) { - let index = -1 - /** @type {number | undefined} */ - let enter - - // A rather boring computation (to merge adjacent `data` events) which - // improves mm performance by 29%. - while (++index <= events.length) { - if (enter === undefined) { - if (events[index] && events[index][1].type === 'data') { - enter = index - index++ - } - } else if (!events[index] || events[index][1].type !== 'data') { - // Don’t do anything if there is one data token. - if (index !== enter + 2) { - events[enter][1].end = events[index - 1][1].end - events.splice(enter + 2, index - enter - 2) - index = enter + 2 - } - enter = undefined - } - } - return extraResolver ? extraResolver(events, context) : events - } -} - -/** - * A rather ugly set of instructions which again looks at chunks in the input - * stream. - * The reason to do this here is that it is *much* faster to parse in reverse. - * And that we can’t hook into `null` to split the line suffix before an EOF. - * To do: figure out if we can make this into a clean utility, or even in core. - * As it will be useful for GFMs literal autolink extension (and maybe even - * tables?) - * - * @type {Resolver} - */ -function resolveAllLineSuffixes(events, context) { - let eventIndex = 0 // Skip first. - - while (++eventIndex <= events.length) { - if ( - (eventIndex === events.length || - events[eventIndex][1].type === 'lineEnding') && - events[eventIndex - 1][1].type === 'data' - ) { - const data = events[eventIndex - 1][1] - const chunks = context.sliceStream(data) - let index = chunks.length - let bufferIndex = -1 - let size = 0 - /** @type {boolean | undefined} */ - let tabs - while (index--) { - const chunk = chunks[index] - if (typeof chunk === 'string') { - bufferIndex = chunk.length - while (chunk.charCodeAt(bufferIndex - 1) === 32) { - size++ - bufferIndex-- - } - if (bufferIndex) break - bufferIndex = -1 - } - // Number - else if (chunk === -2) { - tabs = true - size++ - } else if (chunk === -1) { - // Empty - } else { - // Replacement character, exit. - index++ - break - } - } - if (size) { - const token = { - type: - eventIndex === events.length || tabs || size < 2 - ? 'lineSuffix' - : 'hardBreakTrailing', - start: { - line: data.end.line, - column: data.end.column - size, - offset: data.end.offset - size, - _index: data.start._index + index, - _bufferIndex: index - ? bufferIndex - : data.start._bufferIndex + bufferIndex - }, - end: Object.assign({}, data.end) - } - data.end = Object.assign({}, token.start) - if (data.start.offset === data.end.offset) { - Object.assign(data, token) - } else { - events.splice( - eventIndex, - 0, - ['enter', token, context], - ['exit', token, context] - ) - eventIndex += 2 - } - } - eventIndex++ - } - } - return events -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-resolve-all/index.js -/** - * @typedef {import('micromark-util-types').Event} Event - * @typedef {import('micromark-util-types').Resolver} Resolver - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - */ - -/** - * Call all `resolveAll`s. - * - * @param {Array<{resolveAll?: Resolver | undefined}>} constructs - * List of constructs, optionally with `resolveAll`s. - * @param {Array} events - * List of events. - * @param {TokenizeContext} context - * Context used by `tokenize`. - * @returns {Array} - * Changed events. - */ -function resolveAll(constructs, events, context) { - /** @type {Array} */ - const called = [] - let index = -1 - - while (++index < constructs.length) { - const resolve = constructs[index].resolveAll - - if (resolve && !called.includes(resolve)) { - events = resolve(events, context) - called.push(resolve) - } - } - - return events -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/create-tokenizer.js -/** - * @typedef {import('micromark-util-types').Chunk} Chunk - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').ConstructRecord} ConstructRecord - * @typedef {import('micromark-util-types').Effects} Effects - * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct - * @typedef {import('micromark-util-types').ParseContext} ParseContext - * @typedef {import('micromark-util-types').Point} Point - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').Token} Token - * @typedef {import('micromark-util-types').TokenType} TokenType - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - */ - -/** - * @callback Restore - * @returns {void} - * - * @typedef Info - * @property {Restore} restore - * @property {number} from - * - * @callback ReturnHandle - * Handle a successful run. - * @param {Construct} construct - * @param {Info} info - * @returns {void} - */ - - - - -/** - * Create a tokenizer. - * Tokenizers deal with one type of data (e.g., containers, flow, text). - * The parser is the object dealing with it all. - * `initialize` works like other constructs, except that only its `tokenize` - * function is used, in which case it doesn’t receive an `ok` or `nok`. - * `from` can be given to set the point before the first character, although - * when further lines are indented, they must be set with `defineSkip`. - * - * @param {ParseContext} parser - * @param {InitialConstruct} initialize - * @param {Omit | undefined} [from] - * @returns {TokenizeContext} - */ -function createTokenizer(parser, initialize, from) { - /** @type {Point} */ - let point = Object.assign( - from - ? Object.assign({}, from) - : { - line: 1, - column: 1, - offset: 0 - }, - { - _index: 0, - _bufferIndex: -1 - } - ) - /** @type {Record} */ - const columnStart = {} - /** @type {Array} */ - const resolveAllConstructs = [] - /** @type {Array} */ - let chunks = [] - /** @type {Array} */ - let stack = [] - /** @type {boolean | undefined} */ - let consumed = true - - /** - * Tools used for tokenizing. - * - * @type {Effects} - */ - const effects = { - consume, - enter, - exit, - attempt: constructFactory(onsuccessfulconstruct), - check: constructFactory(onsuccessfulcheck), - interrupt: constructFactory(onsuccessfulcheck, { - interrupt: true - }) - } - - /** - * State and tools for resolving and serializing. - * - * @type {TokenizeContext} - */ - const context = { - previous: null, - code: null, - containerState: {}, - events: [], - parser, - sliceStream, - sliceSerialize, - now, - defineSkip, - write - } - - /** - * The state function. - * - * @type {State | void} - */ - let state = initialize.tokenize.call(context, effects) - - /** - * Track which character we expect to be consumed, to catch bugs. - * - * @type {Code} - */ - let expectedCode - if (initialize.resolveAll) { - resolveAllConstructs.push(initialize) - } - return context - - /** @type {TokenizeContext['write']} */ - function write(slice) { - chunks = push(chunks, slice) - main() - - // Exit if we’re not done, resolve might change stuff. - if (chunks[chunks.length - 1] !== null) { - return [] - } - addResult(initialize, 0) - - // Otherwise, resolve, and exit. - context.events = resolveAll(resolveAllConstructs, context.events, context) - return context.events - } - - // - // Tools. - // - - /** @type {TokenizeContext['sliceSerialize']} */ - function sliceSerialize(token, expandTabs) { - return serializeChunks(sliceStream(token), expandTabs) - } - - /** @type {TokenizeContext['sliceStream']} */ - function sliceStream(token) { - return sliceChunks(chunks, token) - } - - /** @type {TokenizeContext['now']} */ - function now() { - // This is a hot path, so we clone manually instead of `Object.assign({}, point)` - const {line, column, offset, _index, _bufferIndex} = point - return { - line, - column, - offset, - _index, - _bufferIndex - } - } - - /** @type {TokenizeContext['defineSkip']} */ - function defineSkip(value) { - columnStart[value.line] = value.column - accountForPotentialSkip() - } - - // - // State management. - // - - /** - * Main loop (note that `_index` and `_bufferIndex` in `point` are modified by - * `consume`). - * Here is where we walk through the chunks, which either include strings of - * several characters, or numerical character codes. - * The reason to do this in a loop instead of a call is so the stack can - * drain. - * - * @returns {void} - */ - function main() { - /** @type {number} */ - let chunkIndex - while (point._index < chunks.length) { - const chunk = chunks[point._index] - - // If we’re in a buffer chunk, loop through it. - if (typeof chunk === 'string') { - chunkIndex = point._index - if (point._bufferIndex < 0) { - point._bufferIndex = 0 - } - while ( - point._index === chunkIndex && - point._bufferIndex < chunk.length - ) { - go(chunk.charCodeAt(point._bufferIndex)) - } - } else { - go(chunk) - } - } - } - - /** - * Deal with one code. - * - * @param {Code} code - * @returns {void} - */ - function go(code) { - consumed = undefined - expectedCode = code - state = state(code) - } - - /** @type {Effects['consume']} */ - function consume(code) { - if (markdownLineEnding(code)) { - point.line++ - point.column = 1 - point.offset += code === -3 ? 2 : 1 - accountForPotentialSkip() - } else if (code !== -1) { - point.column++ - point.offset++ - } - - // Not in a string chunk. - if (point._bufferIndex < 0) { - point._index++ - } else { - point._bufferIndex++ - - // At end of string chunk. - // @ts-expect-error Points w/ non-negative `_bufferIndex` reference - // strings. - if (point._bufferIndex === chunks[point._index].length) { - point._bufferIndex = -1 - point._index++ - } - } - - // Expose the previous character. - context.previous = code - - // Mark as consumed. - consumed = true - } - - /** @type {Effects['enter']} */ - function enter(type, fields) { - /** @type {Token} */ - // @ts-expect-error Patch instead of assign required fields to help GC. - const token = fields || {} - token.type = type - token.start = now() - context.events.push(['enter', token, context]) - stack.push(token) - return token - } - - /** @type {Effects['exit']} */ - function exit(type) { - const token = stack.pop() - token.end = now() - context.events.push(['exit', token, context]) - return token - } - - /** - * Use results. - * - * @type {ReturnHandle} - */ - function onsuccessfulconstruct(construct, info) { - addResult(construct, info.from) - } - - /** - * Discard results. - * - * @type {ReturnHandle} - */ - function onsuccessfulcheck(_, info) { - info.restore() - } - - /** - * Factory to attempt/check/interrupt. - * - * @param {ReturnHandle} onreturn - * @param {{interrupt?: boolean | undefined} | undefined} [fields] - */ - function constructFactory(onreturn, fields) { - return hook - - /** - * Handle either an object mapping codes to constructs, a list of - * constructs, or a single construct. - * - * @param {Array | Construct | ConstructRecord} constructs - * @param {State} returnState - * @param {State | undefined} [bogusState] - * @returns {State} - */ - function hook(constructs, returnState, bogusState) { - /** @type {Array} */ - let listOfConstructs - /** @type {number} */ - let constructIndex - /** @type {Construct} */ - let currentConstruct - /** @type {Info} */ - let info - return Array.isArray(constructs) /* c8 ignore next 1 */ - ? handleListOfConstructs(constructs) - : 'tokenize' in constructs - ? // @ts-expect-error Looks like a construct. - handleListOfConstructs([constructs]) - : handleMapOfConstructs(constructs) - - /** - * Handle a list of construct. - * - * @param {ConstructRecord} map - * @returns {State} - */ - function handleMapOfConstructs(map) { - return start - - /** @type {State} */ - function start(code) { - const def = code !== null && map[code] - const all = code !== null && map.null - const list = [ - // To do: add more extension tests. - /* c8 ignore next 2 */ - ...(Array.isArray(def) ? def : def ? [def] : []), - ...(Array.isArray(all) ? all : all ? [all] : []) - ] - return handleListOfConstructs(list)(code) - } - } - - /** - * Handle a list of construct. - * - * @param {Array} list - * @returns {State} - */ - function handleListOfConstructs(list) { - listOfConstructs = list - constructIndex = 0 - if (list.length === 0) { - return bogusState - } - return handleConstruct(list[constructIndex]) - } - - /** - * Handle a single construct. - * - * @param {Construct} construct - * @returns {State} - */ - function handleConstruct(construct) { - return start - - /** @type {State} */ - function start(code) { - // To do: not needed to store if there is no bogus state, probably? - // Currently doesn’t work because `inspect` in document does a check - // w/o a bogus, which doesn’t make sense. But it does seem to help perf - // by not storing. - info = store() - currentConstruct = construct - if (!construct.partial) { - context.currentConstruct = construct - } - - // Always populated by defaults. - - if ( - construct.name && - context.parser.constructs.disable.null.includes(construct.name) - ) { - return nok(code) - } - return construct.tokenize.call( - // If we do have fields, create an object w/ `context` as its - // prototype. - // This allows a “live binding”, which is needed for `interrupt`. - fields ? Object.assign(Object.create(context), fields) : context, - effects, - ok, - nok - )(code) - } - } - - /** @type {State} */ - function ok(code) { - consumed = true - onreturn(currentConstruct, info) - return returnState - } - - /** @type {State} */ - function nok(code) { - consumed = true - info.restore() - if (++constructIndex < listOfConstructs.length) { - return handleConstruct(listOfConstructs[constructIndex]) - } - return bogusState - } - } - } - - /** - * @param {Construct} construct - * @param {number} from - * @returns {void} - */ - function addResult(construct, from) { - if (construct.resolveAll && !resolveAllConstructs.includes(construct)) { - resolveAllConstructs.push(construct) - } - if (construct.resolve) { - splice( - context.events, - from, - context.events.length - from, - construct.resolve(context.events.slice(from), context) - ) - } - if (construct.resolveTo) { - context.events = construct.resolveTo(context.events, context) - } - } - - /** - * Store state. - * - * @returns {Info} - */ - function store() { - const startPoint = now() - const startPrevious = context.previous - const startCurrentConstruct = context.currentConstruct - const startEventsIndex = context.events.length - const startStack = Array.from(stack) - return { - restore, - from: startEventsIndex - } - - /** - * Restore state. - * - * @returns {void} - */ - function restore() { - point = startPoint - context.previous = startPrevious - context.currentConstruct = startCurrentConstruct - context.events.length = startEventsIndex - stack = startStack - accountForPotentialSkip() - } - } - - /** - * Move the current point a bit forward in the line when it’s on a column - * skip. - * - * @returns {void} - */ - function accountForPotentialSkip() { - if (point.line in columnStart && point.column < 2) { - point.column = columnStart[point.line] - point.offset += columnStart[point.line] - 1 - } - } -} - -/** - * Get the chunks from a slice of chunks in the range of a token. - * - * @param {Array} chunks - * @param {Pick} token - * @returns {Array} - */ -function sliceChunks(chunks, token) { - const startIndex = token.start._index - const startBufferIndex = token.start._bufferIndex - const endIndex = token.end._index - const endBufferIndex = token.end._bufferIndex - /** @type {Array} */ - let view - if (startIndex === endIndex) { - // @ts-expect-error `_bufferIndex` is used on string chunks. - view = [chunks[startIndex].slice(startBufferIndex, endBufferIndex)] - } else { - view = chunks.slice(startIndex, endIndex) - if (startBufferIndex > -1) { - const head = view[0] - if (typeof head === 'string') { - view[0] = head.slice(startBufferIndex) - } else { - view.shift() - } - } - if (endBufferIndex > 0) { - // @ts-expect-error `_bufferIndex` is used on string chunks. - view.push(chunks[endIndex].slice(0, endBufferIndex)) - } - } - return view -} - -/** - * Get the string value of a slice of chunks. - * - * @param {Array} chunks - * @param {boolean | undefined} [expandTabs=false] - * @returns {string} - */ -function serializeChunks(chunks, expandTabs) { - let index = -1 - /** @type {Array} */ - const result = [] - /** @type {boolean | undefined} */ - let atTab - while (++index < chunks.length) { - const chunk = chunks[index] - /** @type {string} */ - let value - if (typeof chunk === 'string') { - value = chunk - } else - switch (chunk) { - case -5: { - value = '\r' - break - } - case -4: { - value = '\n' - break - } - case -3: { - value = '\r' + '\n' - break - } - case -2: { - value = expandTabs ? ' ' : '\t' - break - } - case -1: { - if (!expandTabs && atTab) continue - value = ' ' - break - } - default: { - // Currently only replacement character. - value = String.fromCharCode(chunk) - } - } - atTab = chunk === -2 - result.push(value) - } - return result.join('') -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/thematic-break.js -/** - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const thematicBreak = { - name: 'thematicBreak', - tokenize: tokenizeThematicBreak -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeThematicBreak(effects, ok, nok) { - let size = 0 - /** @type {NonNullable} */ - let marker - return start - - /** - * Start of thematic break. - * - * ```markdown - * > | *** - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter('thematicBreak') - // To do: parse indent like `markdown-rs`. - return before(code) - } - - /** - * After optional whitespace, at marker. - * - * ```markdown - * > | *** - * ^ - * ``` - * - * @type {State} - */ - function before(code) { - marker = code - return atBreak(code) - } - - /** - * After something, before something else. - * - * ```markdown - * > | *** - * ^ - * ``` - * - * @type {State} - */ - function atBreak(code) { - if (code === marker) { - effects.enter('thematicBreakSequence') - return sequence(code) - } - if (size >= 3 && (code === null || markdownLineEnding(code))) { - effects.exit('thematicBreak') - return ok(code) - } - return nok(code) - } - - /** - * In sequence. - * - * ```markdown - * > | *** - * ^ - * ``` - * - * @type {State} - */ - function sequence(code) { - if (code === marker) { - effects.consume(code) - size++ - return sequence - } - effects.exit('thematicBreakSequence') - return markdownSpace(code) - ? factorySpace(effects, atBreak, 'whitespace')(code) - : atBreak(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/list.js -/** - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').ContainerState} ContainerState - * @typedef {import('micromark-util-types').Exiter} Exiter - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - - - - -/** @type {Construct} */ -const list = { - name: 'list', - tokenize: tokenizeListStart, - continuation: { - tokenize: tokenizeListContinuation - }, - exit: tokenizeListEnd -} - -/** @type {Construct} */ -const listItemPrefixWhitespaceConstruct = { - tokenize: tokenizeListItemPrefixWhitespace, - partial: true -} - -/** @type {Construct} */ -const indentConstruct = { - tokenize: tokenizeIndent, - partial: true -} - -// To do: `markdown-rs` parses list items on their own and later stitches them -// together. - -/** - * @type {Tokenizer} - * @this {TokenizeContext} - */ -function tokenizeListStart(effects, ok, nok) { - const self = this - const tail = self.events[self.events.length - 1] - let initialSize = - tail && tail[1].type === 'linePrefix' - ? tail[2].sliceSerialize(tail[1], true).length - : 0 - let size = 0 - return start - - /** @type {State} */ - function start(code) { - const kind = - self.containerState.type || - (code === 42 || code === 43 || code === 45 - ? 'listUnordered' - : 'listOrdered') - if ( - kind === 'listUnordered' - ? !self.containerState.marker || code === self.containerState.marker - : asciiDigit(code) - ) { - if (!self.containerState.type) { - self.containerState.type = kind - effects.enter(kind, { - _container: true - }) - } - if (kind === 'listUnordered') { - effects.enter('listItemPrefix') - return code === 42 || code === 45 - ? effects.check(thematicBreak, nok, atMarker)(code) - : atMarker(code) - } - if (!self.interrupt || code === 49) { - effects.enter('listItemPrefix') - effects.enter('listItemValue') - return inside(code) - } - } - return nok(code) - } - - /** @type {State} */ - function inside(code) { - if (asciiDigit(code) && ++size < 10) { - effects.consume(code) - return inside - } - if ( - (!self.interrupt || size < 2) && - (self.containerState.marker - ? code === self.containerState.marker - : code === 41 || code === 46) - ) { - effects.exit('listItemValue') - return atMarker(code) - } - return nok(code) - } - - /** - * @type {State} - **/ - function atMarker(code) { - effects.enter('listItemMarker') - effects.consume(code) - effects.exit('listItemMarker') - self.containerState.marker = self.containerState.marker || code - return effects.check( - blankLine, - // Can’t be empty when interrupting. - self.interrupt ? nok : onBlank, - effects.attempt( - listItemPrefixWhitespaceConstruct, - endOfPrefix, - otherPrefix - ) - ) - } - - /** @type {State} */ - function onBlank(code) { - self.containerState.initialBlankLine = true - initialSize++ - return endOfPrefix(code) - } - - /** @type {State} */ - function otherPrefix(code) { - if (markdownSpace(code)) { - effects.enter('listItemPrefixWhitespace') - effects.consume(code) - effects.exit('listItemPrefixWhitespace') - return endOfPrefix - } - return nok(code) - } - - /** @type {State} */ - function endOfPrefix(code) { - self.containerState.size = - initialSize + - self.sliceSerialize(effects.exit('listItemPrefix'), true).length - return ok(code) - } -} - -/** - * @type {Tokenizer} - * @this {TokenizeContext} - */ -function tokenizeListContinuation(effects, ok, nok) { - const self = this - self.containerState._closeFlow = undefined - return effects.check(blankLine, onBlank, notBlank) - - /** @type {State} */ - function onBlank(code) { - self.containerState.furtherBlankLines = - self.containerState.furtherBlankLines || - self.containerState.initialBlankLine - - // We have a blank line. - // Still, try to consume at most the items size. - return factorySpace( - effects, - ok, - 'listItemIndent', - self.containerState.size + 1 - )(code) - } - - /** @type {State} */ - function notBlank(code) { - if (self.containerState.furtherBlankLines || !markdownSpace(code)) { - self.containerState.furtherBlankLines = undefined - self.containerState.initialBlankLine = undefined - return notInCurrentItem(code) - } - self.containerState.furtherBlankLines = undefined - self.containerState.initialBlankLine = undefined - return effects.attempt(indentConstruct, ok, notInCurrentItem)(code) - } - - /** @type {State} */ - function notInCurrentItem(code) { - // While we do continue, we signal that the flow should be closed. - self.containerState._closeFlow = true - // As we’re closing flow, we’re no longer interrupting. - self.interrupt = undefined - // Always populated by defaults. - - return factorySpace( - effects, - effects.attempt(list, ok, nok), - 'linePrefix', - self.parser.constructs.disable.null.includes('codeIndented') - ? undefined - : 4 - )(code) - } -} - -/** - * @type {Tokenizer} - * @this {TokenizeContext} - */ -function tokenizeIndent(effects, ok, nok) { - const self = this - return factorySpace( - effects, - afterPrefix, - 'listItemIndent', - self.containerState.size + 1 - ) - - /** @type {State} */ - function afterPrefix(code) { - const tail = self.events[self.events.length - 1] - return tail && - tail[1].type === 'listItemIndent' && - tail[2].sliceSerialize(tail[1], true).length === self.containerState.size - ? ok(code) - : nok(code) - } -} - -/** - * @type {Exiter} - * @this {TokenizeContext} - */ -function tokenizeListEnd(effects) { - effects.exit(this.containerState.type) -} - -/** - * @type {Tokenizer} - * @this {TokenizeContext} - */ -function tokenizeListItemPrefixWhitespace(effects, ok, nok) { - const self = this - - // Always populated by defaults. - - return factorySpace( - effects, - afterPrefix, - 'listItemPrefixWhitespace', - self.parser.constructs.disable.null.includes('codeIndented') - ? undefined - : 4 + 1 - ) - - /** @type {State} */ - function afterPrefix(code) { - const tail = self.events[self.events.length - 1] - return !markdownSpace(code) && - tail && - tail[1].type === 'listItemPrefixWhitespace' - ? ok(code) - : nok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/block-quote.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').Exiter} Exiter - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const blockQuote = { - name: 'blockQuote', - tokenize: tokenizeBlockQuoteStart, - continuation: { - tokenize: tokenizeBlockQuoteContinuation - }, - exit -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeBlockQuoteStart(effects, ok, nok) { - const self = this - return start - - /** - * Start of block quote. - * - * ```markdown - * > | > a - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - if (code === 62) { - const state = self.containerState - if (!state.open) { - effects.enter('blockQuote', { - _container: true - }) - state.open = true - } - effects.enter('blockQuotePrefix') - effects.enter('blockQuoteMarker') - effects.consume(code) - effects.exit('blockQuoteMarker') - return after - } - return nok(code) - } - - /** - * After `>`, before optional whitespace. - * - * ```markdown - * > | > a - * ^ - * ``` - * - * @type {State} - */ - function after(code) { - if (markdownSpace(code)) { - effects.enter('blockQuotePrefixWhitespace') - effects.consume(code) - effects.exit('blockQuotePrefixWhitespace') - effects.exit('blockQuotePrefix') - return ok - } - effects.exit('blockQuotePrefix') - return ok(code) - } -} - -/** - * Start of block quote continuation. - * - * ```markdown - * | > a - * > | > b - * ^ - * ``` - * - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeBlockQuoteContinuation(effects, ok, nok) { - const self = this - return contStart - - /** - * Start of block quote continuation. - * - * Also used to parse the first block quote opening. - * - * ```markdown - * | > a - * > | > b - * ^ - * ``` - * - * @type {State} - */ - function contStart(code) { - if (markdownSpace(code)) { - // Always populated by defaults. - - return factorySpace( - effects, - contBefore, - 'linePrefix', - self.parser.constructs.disable.null.includes('codeIndented') - ? undefined - : 4 - )(code) - } - return contBefore(code) - } - - /** - * At `>`, after optional whitespace. - * - * Also used to parse the first block quote opening. - * - * ```markdown - * | > a - * > | > b - * ^ - * ``` - * - * @type {State} - */ - function contBefore(code) { - return effects.attempt(blockQuote, ok, nok)(code) - } -} - -/** @type {Exiter} */ -function exit(effects) { - effects.exit('blockQuote') -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-destination/index.js -/** - * @typedef {import('micromark-util-types').Effects} Effects - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenType} TokenType - */ - - -/** - * Parse destinations. - * - * ###### Examples - * - * ```markdown - * - * b> - * - * - * a - * a\)b - * a(b)c - * a(b) - * ``` - * - * @param {Effects} effects - * Context. - * @param {State} ok - * State switched to when successful. - * @param {State} nok - * State switched to when unsuccessful. - * @param {TokenType} type - * Type for whole (`` or `b`). - * @param {TokenType} literalType - * Type when enclosed (``). - * @param {TokenType} literalMarkerType - * Type for enclosing (`<` and `>`). - * @param {TokenType} rawType - * Type when not enclosed (`b`). - * @param {TokenType} stringType - * Type for the value (`a` or `b`). - * @param {number | undefined} [max=Infinity] - * Depth of nested parens (inclusive). - * @returns {State} - * Start state. - */ // eslint-disable-next-line max-params -function factoryDestination( - effects, - ok, - nok, - type, - literalType, - literalMarkerType, - rawType, - stringType, - max -) { - const limit = max || Number.POSITIVE_INFINITY - let balance = 0 - return start - - /** - * Start of destination. - * - * ```markdown - * > | - * ^ - * > | aa - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - if (code === 60) { - effects.enter(type) - effects.enter(literalType) - effects.enter(literalMarkerType) - effects.consume(code) - effects.exit(literalMarkerType) - return enclosedBefore - } - - // ASCII control, space, closing paren. - if (code === null || code === 32 || code === 41 || asciiControl(code)) { - return nok(code) - } - effects.enter(type) - effects.enter(rawType) - effects.enter(stringType) - effects.enter('chunkString', { - contentType: 'string' - }) - return raw(code) - } - - /** - * After `<`, at an enclosed destination. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function enclosedBefore(code) { - if (code === 62) { - effects.enter(literalMarkerType) - effects.consume(code) - effects.exit(literalMarkerType) - effects.exit(literalType) - effects.exit(type) - return ok - } - effects.enter(stringType) - effects.enter('chunkString', { - contentType: 'string' - }) - return enclosed(code) - } - - /** - * In enclosed destination. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function enclosed(code) { - if (code === 62) { - effects.exit('chunkString') - effects.exit(stringType) - return enclosedBefore(code) - } - if (code === null || code === 60 || markdownLineEnding(code)) { - return nok(code) - } - effects.consume(code) - return code === 92 ? enclosedEscape : enclosed - } - - /** - * After `\`, at a special character. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function enclosedEscape(code) { - if (code === 60 || code === 62 || code === 92) { - effects.consume(code) - return enclosed - } - return enclosed(code) - } - - /** - * In raw destination. - * - * ```markdown - * > | aa - * ^ - * ``` - * - * @type {State} - */ - function raw(code) { - if ( - !balance && - (code === null || code === 41 || markdownLineEndingOrSpace(code)) - ) { - effects.exit('chunkString') - effects.exit(stringType) - effects.exit(rawType) - effects.exit(type) - return ok(code) - } - if (balance < limit && code === 40) { - effects.consume(code) - balance++ - return raw - } - if (code === 41) { - effects.consume(code) - balance-- - return raw - } - - // ASCII control (but *not* `\0`) and space and `(`. - // Note: in `markdown-rs`, `\0` exists in codes, in `micromark-js` it - // doesn’t. - if (code === null || code === 32 || code === 40 || asciiControl(code)) { - return nok(code) - } - effects.consume(code) - return code === 92 ? rawEscape : raw - } - - /** - * After `\`, at special character. - * - * ```markdown - * > | a\*a - * ^ - * ``` - * - * @type {State} - */ - function rawEscape(code) { - if (code === 40 || code === 41 || code === 92) { - effects.consume(code) - return raw - } - return raw(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-label/index.js -/** - * @typedef {import('micromark-util-types').Effects} Effects - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').TokenType} TokenType - */ - - -/** - * Parse labels. - * - * > 👉 **Note**: labels in markdown are capped at 999 characters in the string. - * - * ###### Examples - * - * ```markdown - * [a] - * [a - * b] - * [a\]b] - * ``` - * - * @this {TokenizeContext} - * Tokenize context. - * @param {Effects} effects - * Context. - * @param {State} ok - * State switched to when successful. - * @param {State} nok - * State switched to when unsuccessful. - * @param {TokenType} type - * Type of the whole label (`[a]`). - * @param {TokenType} markerType - * Type for the markers (`[` and `]`). - * @param {TokenType} stringType - * Type for the identifier (`a`). - * @returns {State} - * Start state. - */ // eslint-disable-next-line max-params -function factoryLabel(effects, ok, nok, type, markerType, stringType) { - const self = this - let size = 0 - /** @type {boolean} */ - let seen - return start - - /** - * Start of label. - * - * ```markdown - * > | [a] - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter(type) - effects.enter(markerType) - effects.consume(code) - effects.exit(markerType) - effects.enter(stringType) - return atBreak - } - - /** - * In label, at something, before something else. - * - * ```markdown - * > | [a] - * ^ - * ``` - * - * @type {State} - */ - function atBreak(code) { - if ( - size > 999 || - code === null || - code === 91 || - (code === 93 && !seen) || - // To do: remove in the future once we’ve switched from - // `micromark-extension-footnote` to `micromark-extension-gfm-footnote`, - // which doesn’t need this. - // Hidden footnotes hook. - /* c8 ignore next 3 */ - (code === 94 && - !size && - '_hiddenFootnoteSupport' in self.parser.constructs) - ) { - return nok(code) - } - if (code === 93) { - effects.exit(stringType) - effects.enter(markerType) - effects.consume(code) - effects.exit(markerType) - effects.exit(type) - return ok - } - - // To do: indent? Link chunks and EOLs together? - if (markdownLineEnding(code)) { - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return atBreak - } - effects.enter('chunkString', { - contentType: 'string' - }) - return labelInside(code) - } - - /** - * In label, in text. - * - * ```markdown - * > | [a] - * ^ - * ``` - * - * @type {State} - */ - function labelInside(code) { - if ( - code === null || - code === 91 || - code === 93 || - markdownLineEnding(code) || - size++ > 999 - ) { - effects.exit('chunkString') - return atBreak(code) - } - effects.consume(code) - if (!seen) seen = !markdownSpace(code) - return code === 92 ? labelEscape : labelInside - } - - /** - * After `\`, at a special character. - * - * ```markdown - * > | [a\*a] - * ^ - * ``` - * - * @type {State} - */ - function labelEscape(code) { - if (code === 91 || code === 92 || code === 93) { - effects.consume(code) - size++ - return labelInside - } - return labelInside(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-title/index.js -/** - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Effects} Effects - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenType} TokenType - */ - - - -/** - * Parse titles. - * - * ###### Examples - * - * ```markdown - * "a" - * 'b' - * (c) - * "a - * b" - * 'a - * b' - * (a\)b) - * ``` - * - * @param {Effects} effects - * Context. - * @param {State} ok - * State switched to when successful. - * @param {State} nok - * State switched to when unsuccessful. - * @param {TokenType} type - * Type of the whole title (`"a"`, `'b'`, `(c)`). - * @param {TokenType} markerType - * Type for the markers (`"`, `'`, `(`, and `)`). - * @param {TokenType} stringType - * Type for the value (`a`). - * @returns {State} - * Start state. - */ // eslint-disable-next-line max-params -function factoryTitle(effects, ok, nok, type, markerType, stringType) { - /** @type {NonNullable} */ - let marker - return start - - /** - * Start of title. - * - * ```markdown - * > | "a" - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - if (code === 34 || code === 39 || code === 40) { - effects.enter(type) - effects.enter(markerType) - effects.consume(code) - effects.exit(markerType) - marker = code === 40 ? 41 : code - return begin - } - return nok(code) - } - - /** - * After opening marker. - * - * This is also used at the closing marker. - * - * ```markdown - * > | "a" - * ^ - * ``` - * - * @type {State} - */ - function begin(code) { - if (code === marker) { - effects.enter(markerType) - effects.consume(code) - effects.exit(markerType) - effects.exit(type) - return ok - } - effects.enter(stringType) - return atBreak(code) - } - - /** - * At something, before something else. - * - * ```markdown - * > | "a" - * ^ - * ``` - * - * @type {State} - */ - function atBreak(code) { - if (code === marker) { - effects.exit(stringType) - return begin(marker) - } - if (code === null) { - return nok(code) - } - - // Note: blank lines can’t exist in content. - if (markdownLineEnding(code)) { - // To do: use `space_or_tab_eol_with_options`, connect. - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return factorySpace(effects, atBreak, 'linePrefix') - } - effects.enter('chunkString', { - contentType: 'string' - }) - return inside(code) - } - - /** - * - * - * @type {State} - */ - function inside(code) { - if (code === marker || code === null || markdownLineEnding(code)) { - effects.exit('chunkString') - return atBreak(code) - } - effects.consume(code) - return code === 92 ? escape : inside - } - - /** - * After `\`, at a special character. - * - * ```markdown - * > | "a\*b" - * ^ - * ``` - * - * @type {State} - */ - function escape(code) { - if (code === marker || code === 92) { - effects.consume(code) - return inside - } - return inside(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-whitespace/index.js -/** - * @typedef {import('micromark-util-types').Effects} Effects - * @typedef {import('micromark-util-types').State} State - */ - - - -/** - * Parse spaces and tabs. - * - * There is no `nok` parameter: - * - * * line endings or spaces in markdown are often optional, in which case this - * factory can be used and `ok` will be switched to whether spaces were found - * or not - * * one line ending or space can be detected with - * `markdownLineEndingOrSpace(code)` right before using `factoryWhitespace` - * - * @param {Effects} effects - * Context. - * @param {State} ok - * State switched to when successful. - * @returns - * Start state. - */ -function factoryWhitespace(effects, ok) { - /** @type {boolean} */ - let seen - return start - - /** @type {State} */ - function start(code) { - if (markdownLineEnding(code)) { - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - seen = true - return start - } - if (markdownSpace(code)) { - return factorySpace( - effects, - start, - seen ? 'linePrefix' : 'lineSuffix' - )(code) - } - return ok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-normalize-identifier/index.js -/** - * Normalize an identifier (as found in references, definitions). - * - * Collapses markdown whitespace, trim, and then lower- and uppercase. - * - * Some characters are considered “uppercase”, such as U+03F4 (`ϴ`), but if their - * lowercase counterpart (U+03B8 (`θ`)) is uppercased will result in a different - * uppercase character (U+0398 (`Θ`)). - * So, to get a canonical form, we perform both lower- and uppercase. - * - * Using uppercase last makes sure keys will never interact with default - * prototypal values (such as `constructor`): nothing in the prototype of - * `Object` is uppercase. - * - * @param {string} value - * Identifier to normalize. - * @returns {string} - * Normalized identifier. - */ -function normalizeIdentifier(value) { - return ( - value - // Collapse markdown whitespace. - .replace(/[\t\n\r ]+/g, ' ') - // Trim. - .replace(/^ | $/g, '') - // Some characters are considered “uppercase”, but if their lowercase - // counterpart is uppercased will result in a different uppercase - // character. - // Hence, to get that form, we perform both lower- and uppercase. - // Upper case makes sure keys will not interact with default prototypal - // methods: no method is uppercase. - .toLowerCase() - .toUpperCase() - ) -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/definition.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - - - - - - -/** @type {Construct} */ -const definition = { - name: 'definition', - tokenize: tokenizeDefinition -} - -/** @type {Construct} */ -const titleBefore = { - tokenize: tokenizeTitleBefore, - partial: true -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeDefinition(effects, ok, nok) { - const self = this - /** @type {string} */ - let identifier - return start - - /** - * At start of a definition. - * - * ```markdown - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - // Do not interrupt paragraphs (but do follow definitions). - // To do: do `interrupt` the way `markdown-rs` does. - // To do: parse whitespace the way `markdown-rs` does. - effects.enter('definition') - return before(code) - } - - /** - * After optional whitespace, at `[`. - * - * ```markdown - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function before(code) { - // To do: parse whitespace the way `markdown-rs` does. - - return factoryLabel.call( - self, - effects, - labelAfter, - // Note: we don’t need to reset the way `markdown-rs` does. - nok, - 'definitionLabel', - 'definitionLabelMarker', - 'definitionLabelString' - )(code) - } - - /** - * After label. - * - * ```markdown - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function labelAfter(code) { - identifier = normalizeIdentifier( - self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1) - ) - if (code === 58) { - effects.enter('definitionMarker') - effects.consume(code) - effects.exit('definitionMarker') - return markerAfter - } - return nok(code) - } - - /** - * After marker. - * - * ```markdown - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function markerAfter(code) { - // Note: whitespace is optional. - return markdownLineEndingOrSpace(code) - ? factoryWhitespace(effects, destinationBefore)(code) - : destinationBefore(code) - } - - /** - * Before destination. - * - * ```markdown - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function destinationBefore(code) { - return factoryDestination( - effects, - destinationAfter, - // Note: we don’t need to reset the way `markdown-rs` does. - nok, - 'definitionDestination', - 'definitionDestinationLiteral', - 'definitionDestinationLiteralMarker', - 'definitionDestinationRaw', - 'definitionDestinationString' - )(code) - } - - /** - * After destination. - * - * ```markdown - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function destinationAfter(code) { - return effects.attempt(titleBefore, after, after)(code) - } - - /** - * After definition. - * - * ```markdown - * > | [a]: b - * ^ - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function after(code) { - return markdownSpace(code) - ? factorySpace(effects, afterWhitespace, 'whitespace')(code) - : afterWhitespace(code) - } - - /** - * After definition, after optional whitespace. - * - * ```markdown - * > | [a]: b - * ^ - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function afterWhitespace(code) { - if (code === null || markdownLineEnding(code)) { - effects.exit('definition') - - // Note: we don’t care about uniqueness. - // It’s likely that that doesn’t happen very frequently. - // It is more likely that it wastes precious time. - self.parser.defined.push(identifier) - - // To do: `markdown-rs` interrupt. - // // You’d be interrupting. - // tokenizer.interrupt = true - return ok(code) - } - return nok(code) - } -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeTitleBefore(effects, ok, nok) { - return titleBefore - - /** - * After destination, at whitespace. - * - * ```markdown - * > | [a]: b - * ^ - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function titleBefore(code) { - return markdownLineEndingOrSpace(code) - ? factoryWhitespace(effects, beforeMarker)(code) - : nok(code) - } - - /** - * At title. - * - * ```markdown - * | [a]: b - * > | "c" - * ^ - * ``` - * - * @type {State} - */ - function beforeMarker(code) { - return factoryTitle( - effects, - titleAfter, - nok, - 'definitionTitle', - 'definitionTitleMarker', - 'definitionTitleString' - )(code) - } - - /** - * After title. - * - * ```markdown - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function titleAfter(code) { - return markdownSpace(code) - ? factorySpace(effects, titleAfterOptionalWhitespace, 'whitespace')(code) - : titleAfterOptionalWhitespace(code) - } - - /** - * After title, after optional whitespace. - * - * ```markdown - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function titleAfterOptionalWhitespace(code) { - return code === null || markdownLineEnding(code) ? ok(code) : nok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/code-indented.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const codeIndented = { - name: 'codeIndented', - tokenize: tokenizeCodeIndented -} - -/** @type {Construct} */ -const furtherStart = { - tokenize: tokenizeFurtherStart, - partial: true -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeCodeIndented(effects, ok, nok) { - const self = this - return start - - /** - * Start of code (indented). - * - * > **Parsing note**: it is not needed to check if this first line is a - * > filled line (that it has a non-whitespace character), because blank lines - * > are parsed already, so we never run into that. - * - * ```markdown - * > | aaa - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - // To do: manually check if interrupting like `markdown-rs`. - - effects.enter('codeIndented') - // To do: use an improved `space_or_tab` function like `markdown-rs`, - // so that we can drop the next state. - return factorySpace(effects, afterPrefix, 'linePrefix', 4 + 1)(code) - } - - /** - * At start, after 1 or 4 spaces. - * - * ```markdown - * > | aaa - * ^ - * ``` - * - * @type {State} - */ - function afterPrefix(code) { - const tail = self.events[self.events.length - 1] - return tail && - tail[1].type === 'linePrefix' && - tail[2].sliceSerialize(tail[1], true).length >= 4 - ? atBreak(code) - : nok(code) - } - - /** - * At a break. - * - * ```markdown - * > | aaa - * ^ ^ - * ``` - * - * @type {State} - */ - function atBreak(code) { - if (code === null) { - return after(code) - } - if (markdownLineEnding(code)) { - return effects.attempt(furtherStart, atBreak, after)(code) - } - effects.enter('codeFlowValue') - return inside(code) - } - - /** - * In code content. - * - * ```markdown - * > | aaa - * ^^^^ - * ``` - * - * @type {State} - */ - function inside(code) { - if (code === null || markdownLineEnding(code)) { - effects.exit('codeFlowValue') - return atBreak(code) - } - effects.consume(code) - return inside - } - - /** @type {State} */ - function after(code) { - effects.exit('codeIndented') - // To do: allow interrupting like `markdown-rs`. - // Feel free to interrupt. - // tokenizer.interrupt = false - return ok(code) - } -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeFurtherStart(effects, ok, nok) { - const self = this - return furtherStart - - /** - * At eol, trying to parse another indent. - * - * ```markdown - * > | aaa - * ^ - * | bbb - * ``` - * - * @type {State} - */ - function furtherStart(code) { - // To do: improve `lazy` / `pierce` handling. - // If this is a lazy line, it can’t be code. - if (self.parser.lazy[self.now().line]) { - return nok(code) - } - if (markdownLineEnding(code)) { - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return furtherStart - } - - // To do: the code here in `micromark-js` is a bit different from - // `markdown-rs` because there it can attempt spaces. - // We can’t yet. - // - // To do: use an improved `space_or_tab` function like `markdown-rs`, - // so that we can drop the next state. - return factorySpace(effects, afterPrefix, 'linePrefix', 4 + 1)(code) - } - - /** - * At start, after 1 or 4 spaces. - * - * ```markdown - * > | aaa - * ^ - * ``` - * - * @type {State} - */ - function afterPrefix(code) { - const tail = self.events[self.events.length - 1] - return tail && - tail[1].type === 'linePrefix' && - tail[2].sliceSerialize(tail[1], true).length >= 4 - ? ok(code) - : markdownLineEnding(code) - ? furtherStart(code) - : nok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/heading-atx.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').Resolver} Resolver - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').Token} Token - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - - -/** @type {Construct} */ -const headingAtx = { - name: 'headingAtx', - tokenize: tokenizeHeadingAtx, - resolve: resolveHeadingAtx -} - -/** @type {Resolver} */ -function resolveHeadingAtx(events, context) { - let contentEnd = events.length - 2 - let contentStart = 3 - /** @type {Token} */ - let content - /** @type {Token} */ - let text - - // Prefix whitespace, part of the opening. - if (events[contentStart][1].type === 'whitespace') { - contentStart += 2 - } - - // Suffix whitespace, part of the closing. - if ( - contentEnd - 2 > contentStart && - events[contentEnd][1].type === 'whitespace' - ) { - contentEnd -= 2 - } - if ( - events[contentEnd][1].type === 'atxHeadingSequence' && - (contentStart === contentEnd - 1 || - (contentEnd - 4 > contentStart && - events[contentEnd - 2][1].type === 'whitespace')) - ) { - contentEnd -= contentStart + 1 === contentEnd ? 2 : 4 - } - if (contentEnd > contentStart) { - content = { - type: 'atxHeadingText', - start: events[contentStart][1].start, - end: events[contentEnd][1].end - } - text = { - type: 'chunkText', - start: events[contentStart][1].start, - end: events[contentEnd][1].end, - contentType: 'text' - } - splice(events, contentStart, contentEnd - contentStart + 1, [ - ['enter', content, context], - ['enter', text, context], - ['exit', text, context], - ['exit', content, context] - ]) - } - return events -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeHeadingAtx(effects, ok, nok) { - let size = 0 - return start - - /** - * Start of a heading (atx). - * - * ```markdown - * > | ## aa - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - // To do: parse indent like `markdown-rs`. - effects.enter('atxHeading') - return before(code) - } - - /** - * After optional whitespace, at `#`. - * - * ```markdown - * > | ## aa - * ^ - * ``` - * - * @type {State} - */ - function before(code) { - effects.enter('atxHeadingSequence') - return sequenceOpen(code) - } - - /** - * In opening sequence. - * - * ```markdown - * > | ## aa - * ^ - * ``` - * - * @type {State} - */ - function sequenceOpen(code) { - if (code === 35 && size++ < 6) { - effects.consume(code) - return sequenceOpen - } - - // Always at least one `#`. - if (code === null || markdownLineEndingOrSpace(code)) { - effects.exit('atxHeadingSequence') - return atBreak(code) - } - return nok(code) - } - - /** - * After something, before something else. - * - * ```markdown - * > | ## aa - * ^ - * ``` - * - * @type {State} - */ - function atBreak(code) { - if (code === 35) { - effects.enter('atxHeadingSequence') - return sequenceFurther(code) - } - if (code === null || markdownLineEnding(code)) { - effects.exit('atxHeading') - // To do: interrupt like `markdown-rs`. - // // Feel free to interrupt. - // tokenizer.interrupt = false - return ok(code) - } - if (markdownSpace(code)) { - return factorySpace(effects, atBreak, 'whitespace')(code) - } - - // To do: generate `data` tokens, add the `text` token later. - // Needs edit map, see: `markdown.rs`. - effects.enter('atxHeadingText') - return data(code) - } - - /** - * In further sequence (after whitespace). - * - * Could be normal “visible” hashes in the heading or a final sequence. - * - * ```markdown - * > | ## aa ## - * ^ - * ``` - * - * @type {State} - */ - function sequenceFurther(code) { - if (code === 35) { - effects.consume(code) - return sequenceFurther - } - effects.exit('atxHeadingSequence') - return atBreak(code) - } - - /** - * In text. - * - * ```markdown - * > | ## aa - * ^ - * ``` - * - * @type {State} - */ - function data(code) { - if (code === null || code === 35 || markdownLineEndingOrSpace(code)) { - effects.exit('atxHeadingText') - return atBreak(code) - } - effects.consume(code) - return data - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/setext-underline.js -/** - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').Resolver} Resolver - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const setextUnderline = { - name: 'setextUnderline', - tokenize: tokenizeSetextUnderline, - resolveTo: resolveToSetextUnderline -} - -/** @type {Resolver} */ -function resolveToSetextUnderline(events, context) { - // To do: resolve like `markdown-rs`. - let index = events.length - /** @type {number | undefined} */ - let content - /** @type {number | undefined} */ - let text - /** @type {number | undefined} */ - let definition - - // Find the opening of the content. - // It’ll always exist: we don’t tokenize if it isn’t there. - while (index--) { - if (events[index][0] === 'enter') { - if (events[index][1].type === 'content') { - content = index - break - } - if (events[index][1].type === 'paragraph') { - text = index - } - } - // Exit - else { - if (events[index][1].type === 'content') { - // Remove the content end (if needed we’ll add it later) - events.splice(index, 1) - } - if (!definition && events[index][1].type === 'definition') { - definition = index - } - } - } - const heading = { - type: 'setextHeading', - start: Object.assign({}, events[text][1].start), - end: Object.assign({}, events[events.length - 1][1].end) - } - - // Change the paragraph to setext heading text. - events[text][1].type = 'setextHeadingText' - - // If we have definitions in the content, we’ll keep on having content, - // but we need move it. - if (definition) { - events.splice(text, 0, ['enter', heading, context]) - events.splice(definition + 1, 0, ['exit', events[content][1], context]) - events[content][1].end = Object.assign({}, events[definition][1].end) - } else { - events[content][1] = heading - } - - // Add the heading exit at the end. - events.push(['exit', heading, context]) - return events -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeSetextUnderline(effects, ok, nok) { - const self = this - /** @type {NonNullable} */ - let marker - return start - - /** - * At start of heading (setext) underline. - * - * ```markdown - * | aa - * > | == - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - let index = self.events.length - /** @type {boolean | undefined} */ - let paragraph - // Find an opening. - while (index--) { - // Skip enter/exit of line ending, line prefix, and content. - // We can now either have a definition or a paragraph. - if ( - self.events[index][1].type !== 'lineEnding' && - self.events[index][1].type !== 'linePrefix' && - self.events[index][1].type !== 'content' - ) { - paragraph = self.events[index][1].type === 'paragraph' - break - } - } - - // To do: handle lazy/pierce like `markdown-rs`. - // To do: parse indent like `markdown-rs`. - if (!self.parser.lazy[self.now().line] && (self.interrupt || paragraph)) { - effects.enter('setextHeadingLine') - marker = code - return before(code) - } - return nok(code) - } - - /** - * After optional whitespace, at `-` or `=`. - * - * ```markdown - * | aa - * > | == - * ^ - * ``` - * - * @type {State} - */ - function before(code) { - effects.enter('setextHeadingLineSequence') - return inside(code) - } - - /** - * In sequence. - * - * ```markdown - * | aa - * > | == - * ^ - * ``` - * - * @type {State} - */ - function inside(code) { - if (code === marker) { - effects.consume(code) - return inside - } - effects.exit('setextHeadingLineSequence') - return markdownSpace(code) - ? factorySpace(effects, after, 'lineSuffix')(code) - : after(code) - } - - /** - * After sequence, after optional whitespace. - * - * ```markdown - * | aa - * > | == - * ^ - * ``` - * - * @type {State} - */ - function after(code) { - if (code === null || markdownLineEnding(code)) { - effects.exit('setextHeadingLine') - return ok(code) - } - return nok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-html-tag-name/index.js -/** - * List of lowercase HTML “block” tag names. - * - * The list, when parsing HTML (flow), results in more relaxed rules (condition - * 6). - * Because they are known blocks, the HTML-like syntax doesn’t have to be - * strictly parsed. - * For tag names not in this list, a more strict algorithm (condition 7) is used - * to detect whether the HTML-like syntax is seen as HTML (flow) or not. - * - * This is copied from: - * . - * - * > 👉 **Note**: `search` was added in `CommonMark@0.31`. - */ -const htmlBlockNames = [ - 'address', - 'article', - 'aside', - 'base', - 'basefont', - 'blockquote', - 'body', - 'caption', - 'center', - 'col', - 'colgroup', - 'dd', - 'details', - 'dialog', - 'dir', - 'div', - 'dl', - 'dt', - 'fieldset', - 'figcaption', - 'figure', - 'footer', - 'form', - 'frame', - 'frameset', - 'h1', - 'h2', - 'h3', - 'h4', - 'h5', - 'h6', - 'head', - 'header', - 'hr', - 'html', - 'iframe', - 'legend', - 'li', - 'link', - 'main', - 'menu', - 'menuitem', - 'nav', - 'noframes', - 'ol', - 'optgroup', - 'option', - 'p', - 'param', - 'search', - 'section', - 'summary', - 'table', - 'tbody', - 'td', - 'tfoot', - 'th', - 'thead', - 'title', - 'tr', - 'track', - 'ul' -] - -/** - * List of lowercase HTML “raw” tag names. - * - * The list, when parsing HTML (flow), results in HTML that can include lines - * without exiting, until a closing tag also in this list is found (condition - * 1). - * - * This module is copied from: - * . - * - * > 👉 **Note**: `textarea` was added in `CommonMark@0.30`. - */ -const htmlRawNames = ['pre', 'script', 'style', 'textarea'] - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/html-flow.js -/** - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').Resolver} Resolver - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - - - -/** @type {Construct} */ -const htmlFlow = { - name: 'htmlFlow', - tokenize: tokenizeHtmlFlow, - resolveTo: resolveToHtmlFlow, - concrete: true -} - -/** @type {Construct} */ -const blankLineBefore = { - tokenize: tokenizeBlankLineBefore, - partial: true -} -const nonLazyContinuationStart = { - tokenize: tokenizeNonLazyContinuationStart, - partial: true -} - -/** @type {Resolver} */ -function resolveToHtmlFlow(events) { - let index = events.length - while (index--) { - if (events[index][0] === 'enter' && events[index][1].type === 'htmlFlow') { - break - } - } - if (index > 1 && events[index - 2][1].type === 'linePrefix') { - // Add the prefix start to the HTML token. - events[index][1].start = events[index - 2][1].start - // Add the prefix start to the HTML line token. - events[index + 1][1].start = events[index - 2][1].start - // Remove the line prefix. - events.splice(index - 2, 2) - } - return events -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeHtmlFlow(effects, ok, nok) { - const self = this - /** @type {number} */ - let marker - /** @type {boolean} */ - let closingTag - /** @type {string} */ - let buffer - /** @type {number} */ - let index - /** @type {Code} */ - let markerB - return start - - /** - * Start of HTML (flow). - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - // To do: parse indent like `markdown-rs`. - return before(code) - } - - /** - * At `<`, after optional whitespace. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function before(code) { - effects.enter('htmlFlow') - effects.enter('htmlFlowData') - effects.consume(code) - return open - } - - /** - * After `<`, at tag name or other stuff. - * - * ```markdown - * > | - * ^ - * > | - * ^ - * > | - * ^ - * ``` - * - * @type {State} - */ - function open(code) { - if (code === 33) { - effects.consume(code) - return declarationOpen - } - if (code === 47) { - effects.consume(code) - closingTag = true - return tagCloseStart - } - if (code === 63) { - effects.consume(code) - marker = 3 - // To do: - // tokenizer.concrete = true - // To do: use `markdown-rs` style interrupt. - // While we’re in an instruction instead of a declaration, we’re on a `?` - // right now, so we do need to search for `>`, similar to declarations. - return self.interrupt ? ok : continuationDeclarationInside - } - - // ASCII alphabetical. - if (asciiAlpha(code)) { - effects.consume(code) - // @ts-expect-error: not null. - buffer = String.fromCharCode(code) - return tagName - } - return nok(code) - } - - /** - * After ` | - * ^ - * > | - * ^ - * > | &<]]> - * ^ - * ``` - * - * @type {State} - */ - function declarationOpen(code) { - if (code === 45) { - effects.consume(code) - marker = 2 - return commentOpenInside - } - if (code === 91) { - effects.consume(code) - marker = 5 - index = 0 - return cdataOpenInside - } - - // ASCII alphabetical. - if (asciiAlpha(code)) { - effects.consume(code) - marker = 4 - // // Do not form containers. - // tokenizer.concrete = true - return self.interrupt ? ok : continuationDeclarationInside - } - return nok(code) - } - - /** - * After ` | - * ^ - * ``` - * - * @type {State} - */ - function commentOpenInside(code) { - if (code === 45) { - effects.consume(code) - // // Do not form containers. - // tokenizer.concrete = true - return self.interrupt ? ok : continuationDeclarationInside - } - return nok(code) - } - - /** - * After ` | &<]]> - * ^^^^^^ - * ``` - * - * @type {State} - */ - function cdataOpenInside(code) { - const value = 'CDATA[' - if (code === value.charCodeAt(index++)) { - effects.consume(code) - if (index === value.length) { - // // Do not form containers. - // tokenizer.concrete = true - return self.interrupt ? ok : continuation - } - return cdataOpenInside - } - return nok(code) - } - - /** - * After ` | - * ^ - * ``` - * - * @type {State} - */ - function tagCloseStart(code) { - if (asciiAlpha(code)) { - effects.consume(code) - // @ts-expect-error: not null. - buffer = String.fromCharCode(code) - return tagName - } - return nok(code) - } - - /** - * In tag name. - * - * ```markdown - * > | - * ^^ - * > | - * ^^ - * ``` - * - * @type {State} - */ - function tagName(code) { - if ( - code === null || - code === 47 || - code === 62 || - markdownLineEndingOrSpace(code) - ) { - const slash = code === 47 - const name = buffer.toLowerCase() - if (!slash && !closingTag && htmlRawNames.includes(name)) { - marker = 1 - // // Do not form containers. - // tokenizer.concrete = true - return self.interrupt ? ok(code) : continuation(code) - } - if (htmlBlockNames.includes(buffer.toLowerCase())) { - marker = 6 - if (slash) { - effects.consume(code) - return basicSelfClosing - } - - // // Do not form containers. - // tokenizer.concrete = true - return self.interrupt ? ok(code) : continuation(code) - } - marker = 7 - // Do not support complete HTML when interrupting. - return self.interrupt && !self.parser.lazy[self.now().line] - ? nok(code) - : closingTag - ? completeClosingTagAfter(code) - : completeAttributeNameBefore(code) - } - - // ASCII alphanumerical and `-`. - if (code === 45 || asciiAlphanumeric(code)) { - effects.consume(code) - buffer += String.fromCharCode(code) - return tagName - } - return nok(code) - } - - /** - * After closing slash of a basic tag name. - * - * ```markdown - * > |
    - * ^ - * ``` - * - * @type {State} - */ - function basicSelfClosing(code) { - if (code === 62) { - effects.consume(code) - // // Do not form containers. - // tokenizer.concrete = true - return self.interrupt ? ok : continuation - } - return nok(code) - } - - /** - * After closing slash of a complete tag name. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function completeClosingTagAfter(code) { - if (markdownSpace(code)) { - effects.consume(code) - return completeClosingTagAfter - } - return completeEnd(code) - } - - /** - * At an attribute name. - * - * At first, this state is used after a complete tag name, after whitespace, - * where it expects optional attributes or the end of the tag. - * It is also reused after attributes, when expecting more optional - * attributes. - * - * ```markdown - * > | - * ^ - * > | - * ^ - * > | - * ^ - * > | - * ^ - * > | - * ^ - * ``` - * - * @type {State} - */ - function completeAttributeNameBefore(code) { - if (code === 47) { - effects.consume(code) - return completeEnd - } - - // ASCII alphanumerical and `:` and `_`. - if (code === 58 || code === 95 || asciiAlpha(code)) { - effects.consume(code) - return completeAttributeName - } - if (markdownSpace(code)) { - effects.consume(code) - return completeAttributeNameBefore - } - return completeEnd(code) - } - - /** - * In attribute name. - * - * ```markdown - * > | - * ^ - * > | - * ^ - * > | - * ^ - * ``` - * - * @type {State} - */ - function completeAttributeName(code) { - // ASCII alphanumerical and `-`, `.`, `:`, and `_`. - if ( - code === 45 || - code === 46 || - code === 58 || - code === 95 || - asciiAlphanumeric(code) - ) { - effects.consume(code) - return completeAttributeName - } - return completeAttributeNameAfter(code) - } - - /** - * After attribute name, at an optional initializer, the end of the tag, or - * whitespace. - * - * ```markdown - * > | - * ^ - * > | - * ^ - * ``` - * - * @type {State} - */ - function completeAttributeNameAfter(code) { - if (code === 61) { - effects.consume(code) - return completeAttributeValueBefore - } - if (markdownSpace(code)) { - effects.consume(code) - return completeAttributeNameAfter - } - return completeAttributeNameBefore(code) - } - - /** - * Before unquoted, double quoted, or single quoted attribute value, allowing - * whitespace. - * - * ```markdown - * > | - * ^ - * > | - * ^ - * ``` - * - * @type {State} - */ - function completeAttributeValueBefore(code) { - if ( - code === null || - code === 60 || - code === 61 || - code === 62 || - code === 96 - ) { - return nok(code) - } - if (code === 34 || code === 39) { - effects.consume(code) - markerB = code - return completeAttributeValueQuoted - } - if (markdownSpace(code)) { - effects.consume(code) - return completeAttributeValueBefore - } - return completeAttributeValueUnquoted(code) - } - - /** - * In double or single quoted attribute value. - * - * ```markdown - * > | - * ^ - * > | - * ^ - * ``` - * - * @type {State} - */ - function completeAttributeValueQuoted(code) { - if (code === markerB) { - effects.consume(code) - markerB = null - return completeAttributeValueQuotedAfter - } - if (code === null || markdownLineEnding(code)) { - return nok(code) - } - effects.consume(code) - return completeAttributeValueQuoted - } - - /** - * In unquoted attribute value. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function completeAttributeValueUnquoted(code) { - if ( - code === null || - code === 34 || - code === 39 || - code === 47 || - code === 60 || - code === 61 || - code === 62 || - code === 96 || - markdownLineEndingOrSpace(code) - ) { - return completeAttributeNameAfter(code) - } - effects.consume(code) - return completeAttributeValueUnquoted - } - - /** - * After double or single quoted attribute value, before whitespace or the - * end of the tag. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function completeAttributeValueQuotedAfter(code) { - if (code === 47 || code === 62 || markdownSpace(code)) { - return completeAttributeNameBefore(code) - } - return nok(code) - } - - /** - * In certain circumstances of a complete tag where only an `>` is allowed. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function completeEnd(code) { - if (code === 62) { - effects.consume(code) - return completeAfter - } - return nok(code) - } - - /** - * After `>` in a complete tag. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function completeAfter(code) { - if (code === null || markdownLineEnding(code)) { - // // Do not form containers. - // tokenizer.concrete = true - return continuation(code) - } - if (markdownSpace(code)) { - effects.consume(code) - return completeAfter - } - return nok(code) - } - - /** - * In continuation of any HTML kind. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function continuation(code) { - if (code === 45 && marker === 2) { - effects.consume(code) - return continuationCommentInside - } - if (code === 60 && marker === 1) { - effects.consume(code) - return continuationRawTagOpen - } - if (code === 62 && marker === 4) { - effects.consume(code) - return continuationClose - } - if (code === 63 && marker === 3) { - effects.consume(code) - return continuationDeclarationInside - } - if (code === 93 && marker === 5) { - effects.consume(code) - return continuationCdataInside - } - if (markdownLineEnding(code) && (marker === 6 || marker === 7)) { - effects.exit('htmlFlowData') - return effects.check( - blankLineBefore, - continuationAfter, - continuationStart - )(code) - } - if (code === null || markdownLineEnding(code)) { - effects.exit('htmlFlowData') - return continuationStart(code) - } - effects.consume(code) - return continuation - } - - /** - * In continuation, at eol. - * - * ```markdown - * > | - * ^ - * | asd - * ``` - * - * @type {State} - */ - function continuationStart(code) { - return effects.check( - nonLazyContinuationStart, - continuationStartNonLazy, - continuationAfter - )(code) - } - - /** - * In continuation, at eol, before non-lazy content. - * - * ```markdown - * > | - * ^ - * | asd - * ``` - * - * @type {State} - */ - function continuationStartNonLazy(code) { - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return continuationBefore - } - - /** - * In continuation, before non-lazy content. - * - * ```markdown - * | - * > | asd - * ^ - * ``` - * - * @type {State} - */ - function continuationBefore(code) { - if (code === null || markdownLineEnding(code)) { - return continuationStart(code) - } - effects.enter('htmlFlowData') - return continuation(code) - } - - /** - * In comment continuation, after one `-`, expecting another. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function continuationCommentInside(code) { - if (code === 45) { - effects.consume(code) - return continuationDeclarationInside - } - return continuation(code) - } - - /** - * In raw continuation, after `<`, at `/`. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function continuationRawTagOpen(code) { - if (code === 47) { - effects.consume(code) - buffer = '' - return continuationRawEndTag - } - return continuation(code) - } - - /** - * In raw continuation, after ` | - * ^^^^^^ - * ``` - * - * @type {State} - */ - function continuationRawEndTag(code) { - if (code === 62) { - const name = buffer.toLowerCase() - if (htmlRawNames.includes(name)) { - effects.consume(code) - return continuationClose - } - return continuation(code) - } - if (asciiAlpha(code) && buffer.length < 8) { - effects.consume(code) - // @ts-expect-error: not null. - buffer += String.fromCharCode(code) - return continuationRawEndTag - } - return continuation(code) - } - - /** - * In cdata continuation, after `]`, expecting `]>`. - * - * ```markdown - * > | &<]]> - * ^ - * ``` - * - * @type {State} - */ - function continuationCdataInside(code) { - if (code === 93) { - effects.consume(code) - return continuationDeclarationInside - } - return continuation(code) - } - - /** - * In declaration or instruction continuation, at `>`. - * - * ```markdown - * > | - * ^ - * > | - * ^ - * > | - * ^ - * > | - * ^ - * > | &<]]> - * ^ - * ``` - * - * @type {State} - */ - function continuationDeclarationInside(code) { - if (code === 62) { - effects.consume(code) - return continuationClose - } - - // More dashes. - if (code === 45 && marker === 2) { - effects.consume(code) - return continuationDeclarationInside - } - return continuation(code) - } - - /** - * In closed continuation: everything we get until the eol/eof is part of it. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function continuationClose(code) { - if (code === null || markdownLineEnding(code)) { - effects.exit('htmlFlowData') - return continuationAfter(code) - } - effects.consume(code) - return continuationClose - } - - /** - * Done. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function continuationAfter(code) { - effects.exit('htmlFlow') - // // Feel free to interrupt. - // tokenizer.interrupt = false - // // No longer concrete. - // tokenizer.concrete = false - return ok(code) - } -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeNonLazyContinuationStart(effects, ok, nok) { - const self = this - return start - - /** - * At eol, before continuation. - * - * ```markdown - * > | * ```js - * ^ - * | b - * ``` - * - * @type {State} - */ - function start(code) { - if (markdownLineEnding(code)) { - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return after - } - return nok(code) - } - - /** - * A continuation. - * - * ```markdown - * | * ```js - * > | b - * ^ - * ``` - * - * @type {State} - */ - function after(code) { - return self.parser.lazy[self.now().line] ? nok(code) : ok(code) - } -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeBlankLineBefore(effects, ok, nok) { - return start - - /** - * Before eol, expecting blank line. - * - * ```markdown - * > |
    - * ^ - * | - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return effects.attempt(blankLine, ok, nok) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/code-fenced.js -/** - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const nonLazyContinuation = { - tokenize: tokenizeNonLazyContinuation, - partial: true -} - -/** @type {Construct} */ -const codeFenced = { - name: 'codeFenced', - tokenize: tokenizeCodeFenced, - concrete: true -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeCodeFenced(effects, ok, nok) { - const self = this - /** @type {Construct} */ - const closeStart = { - tokenize: tokenizeCloseStart, - partial: true - } - let initialPrefix = 0 - let sizeOpen = 0 - /** @type {NonNullable} */ - let marker - return start - - /** - * Start of code. - * - * ```markdown - * > | ~~~js - * ^ - * | alert(1) - * | ~~~ - * ``` - * - * @type {State} - */ - function start(code) { - // To do: parse whitespace like `markdown-rs`. - return beforeSequenceOpen(code) - } - - /** - * In opening fence, after prefix, at sequence. - * - * ```markdown - * > | ~~~js - * ^ - * | alert(1) - * | ~~~ - * ``` - * - * @type {State} - */ - function beforeSequenceOpen(code) { - const tail = self.events[self.events.length - 1] - initialPrefix = - tail && tail[1].type === 'linePrefix' - ? tail[2].sliceSerialize(tail[1], true).length - : 0 - marker = code - effects.enter('codeFenced') - effects.enter('codeFencedFence') - effects.enter('codeFencedFenceSequence') - return sequenceOpen(code) - } - - /** - * In opening fence sequence. - * - * ```markdown - * > | ~~~js - * ^ - * | alert(1) - * | ~~~ - * ``` - * - * @type {State} - */ - function sequenceOpen(code) { - if (code === marker) { - sizeOpen++ - effects.consume(code) - return sequenceOpen - } - if (sizeOpen < 3) { - return nok(code) - } - effects.exit('codeFencedFenceSequence') - return markdownSpace(code) - ? factorySpace(effects, infoBefore, 'whitespace')(code) - : infoBefore(code) - } - - /** - * In opening fence, after the sequence (and optional whitespace), before info. - * - * ```markdown - * > | ~~~js - * ^ - * | alert(1) - * | ~~~ - * ``` - * - * @type {State} - */ - function infoBefore(code) { - if (code === null || markdownLineEnding(code)) { - effects.exit('codeFencedFence') - return self.interrupt - ? ok(code) - : effects.check(nonLazyContinuation, atNonLazyBreak, after)(code) - } - effects.enter('codeFencedFenceInfo') - effects.enter('chunkString', { - contentType: 'string' - }) - return info(code) - } - - /** - * In info. - * - * ```markdown - * > | ~~~js - * ^ - * | alert(1) - * | ~~~ - * ``` - * - * @type {State} - */ - function info(code) { - if (code === null || markdownLineEnding(code)) { - effects.exit('chunkString') - effects.exit('codeFencedFenceInfo') - return infoBefore(code) - } - if (markdownSpace(code)) { - effects.exit('chunkString') - effects.exit('codeFencedFenceInfo') - return factorySpace(effects, metaBefore, 'whitespace')(code) - } - if (code === 96 && code === marker) { - return nok(code) - } - effects.consume(code) - return info - } - - /** - * In opening fence, after info and whitespace, before meta. - * - * ```markdown - * > | ~~~js eval - * ^ - * | alert(1) - * | ~~~ - * ``` - * - * @type {State} - */ - function metaBefore(code) { - if (code === null || markdownLineEnding(code)) { - return infoBefore(code) - } - effects.enter('codeFencedFenceMeta') - effects.enter('chunkString', { - contentType: 'string' - }) - return meta(code) - } - - /** - * In meta. - * - * ```markdown - * > | ~~~js eval - * ^ - * | alert(1) - * | ~~~ - * ``` - * - * @type {State} - */ - function meta(code) { - if (code === null || markdownLineEnding(code)) { - effects.exit('chunkString') - effects.exit('codeFencedFenceMeta') - return infoBefore(code) - } - if (code === 96 && code === marker) { - return nok(code) - } - effects.consume(code) - return meta - } - - /** - * At eol/eof in code, before a non-lazy closing fence or content. - * - * ```markdown - * > | ~~~js - * ^ - * > | alert(1) - * ^ - * | ~~~ - * ``` - * - * @type {State} - */ - function atNonLazyBreak(code) { - return effects.attempt(closeStart, after, contentBefore)(code) - } - - /** - * Before code content, not a closing fence, at eol. - * - * ```markdown - * | ~~~js - * > | alert(1) - * ^ - * | ~~~ - * ``` - * - * @type {State} - */ - function contentBefore(code) { - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return contentStart - } - - /** - * Before code content, not a closing fence. - * - * ```markdown - * | ~~~js - * > | alert(1) - * ^ - * | ~~~ - * ``` - * - * @type {State} - */ - function contentStart(code) { - return initialPrefix > 0 && markdownSpace(code) - ? factorySpace( - effects, - beforeContentChunk, - 'linePrefix', - initialPrefix + 1 - )(code) - : beforeContentChunk(code) - } - - /** - * Before code content, after optional prefix. - * - * ```markdown - * | ~~~js - * > | alert(1) - * ^ - * | ~~~ - * ``` - * - * @type {State} - */ - function beforeContentChunk(code) { - if (code === null || markdownLineEnding(code)) { - return effects.check(nonLazyContinuation, atNonLazyBreak, after)(code) - } - effects.enter('codeFlowValue') - return contentChunk(code) - } - - /** - * In code content. - * - * ```markdown - * | ~~~js - * > | alert(1) - * ^^^^^^^^ - * | ~~~ - * ``` - * - * @type {State} - */ - function contentChunk(code) { - if (code === null || markdownLineEnding(code)) { - effects.exit('codeFlowValue') - return beforeContentChunk(code) - } - effects.consume(code) - return contentChunk - } - - /** - * After code. - * - * ```markdown - * | ~~~js - * | alert(1) - * > | ~~~ - * ^ - * ``` - * - * @type {State} - */ - function after(code) { - effects.exit('codeFenced') - return ok(code) - } - - /** - * @this {TokenizeContext} - * @type {Tokenizer} - */ - function tokenizeCloseStart(effects, ok, nok) { - let size = 0 - return startBefore - - /** - * - * - * @type {State} - */ - function startBefore(code) { - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return start - } - - /** - * Before closing fence, at optional whitespace. - * - * ```markdown - * | ~~~js - * | alert(1) - * > | ~~~ - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - // Always populated by defaults. - - // To do: `enter` here or in next state? - effects.enter('codeFencedFence') - return markdownSpace(code) - ? factorySpace( - effects, - beforeSequenceClose, - 'linePrefix', - self.parser.constructs.disable.null.includes('codeIndented') - ? undefined - : 4 - )(code) - : beforeSequenceClose(code) - } - - /** - * In closing fence, after optional whitespace, at sequence. - * - * ```markdown - * | ~~~js - * | alert(1) - * > | ~~~ - * ^ - * ``` - * - * @type {State} - */ - function beforeSequenceClose(code) { - if (code === marker) { - effects.enter('codeFencedFenceSequence') - return sequenceClose(code) - } - return nok(code) - } - - /** - * In closing fence sequence. - * - * ```markdown - * | ~~~js - * | alert(1) - * > | ~~~ - * ^ - * ``` - * - * @type {State} - */ - function sequenceClose(code) { - if (code === marker) { - size++ - effects.consume(code) - return sequenceClose - } - if (size >= sizeOpen) { - effects.exit('codeFencedFenceSequence') - return markdownSpace(code) - ? factorySpace(effects, sequenceCloseAfter, 'whitespace')(code) - : sequenceCloseAfter(code) - } - return nok(code) - } - - /** - * After closing fence sequence, after optional whitespace. - * - * ```markdown - * | ~~~js - * | alert(1) - * > | ~~~ - * ^ - * ``` - * - * @type {State} - */ - function sequenceCloseAfter(code) { - if (code === null || markdownLineEnding(code)) { - effects.exit('codeFencedFence') - return ok(code) - } - return nok(code) - } - } -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeNonLazyContinuation(effects, ok, nok) { - const self = this - return start - - /** - * - * - * @type {State} - */ - function start(code) { - if (code === null) { - return nok(code) - } - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return lineStart - } - - /** - * - * - * @type {State} - */ - function lineStart(code) { - return self.parser.lazy[self.now().line] ? nok(code) : ok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/character-entities/index.js -/** - * Map of named character references. - * - * @type {Record} - */ -const characterEntities = { - AElig: 'Æ', - AMP: '&', - Aacute: 'Á', - Abreve: 'Ă', - Acirc: 'Â', - Acy: 'А', - Afr: '𝔄', - Agrave: 'À', - Alpha: 'Α', - Amacr: 'Ā', - And: '⩓', - Aogon: 'Ą', - Aopf: '𝔸', - ApplyFunction: '⁡', - Aring: 'Å', - Ascr: '𝒜', - Assign: '≔', - Atilde: 'Ã', - Auml: 'Ä', - Backslash: '∖', - Barv: '⫧', - Barwed: '⌆', - Bcy: 'Б', - Because: '∵', - Bernoullis: 'ℬ', - Beta: 'Β', - Bfr: '𝔅', - Bopf: '𝔹', - Breve: '˘', - Bscr: 'ℬ', - Bumpeq: '≎', - CHcy: 'Ч', - COPY: '©', - Cacute: 'Ć', - Cap: '⋒', - CapitalDifferentialD: 'ⅅ', - Cayleys: 'ℭ', - Ccaron: 'Č', - Ccedil: 'Ç', - Ccirc: 'Ĉ', - Cconint: '∰', - Cdot: 'Ċ', - Cedilla: '¸', - CenterDot: '·', - Cfr: 'ℭ', - Chi: 'Χ', - CircleDot: '⊙', - CircleMinus: '⊖', - CirclePlus: '⊕', - CircleTimes: '⊗', - ClockwiseContourIntegral: '∲', - CloseCurlyDoubleQuote: '”', - CloseCurlyQuote: '’', - Colon: '∷', - Colone: '⩴', - Congruent: '≡', - Conint: '∯', - ContourIntegral: '∮', - Copf: 'ℂ', - Coproduct: '∐', - CounterClockwiseContourIntegral: '∳', - Cross: '⨯', - Cscr: '𝒞', - Cup: '⋓', - CupCap: '≍', - DD: 'ⅅ', - DDotrahd: '⤑', - DJcy: 'Ђ', - DScy: 'Ѕ', - DZcy: 'Џ', - Dagger: '‡', - Darr: '↡', - Dashv: '⫤', - Dcaron: 'Ď', - Dcy: 'Д', - Del: '∇', - Delta: 'Δ', - Dfr: '𝔇', - DiacriticalAcute: '´', - DiacriticalDot: '˙', - DiacriticalDoubleAcute: '˝', - DiacriticalGrave: '`', - DiacriticalTilde: '˜', - Diamond: '⋄', - DifferentialD: 'ⅆ', - Dopf: '𝔻', - Dot: '¨', - DotDot: '⃜', - DotEqual: '≐', - DoubleContourIntegral: '∯', - DoubleDot: '¨', - DoubleDownArrow: '⇓', - DoubleLeftArrow: '⇐', - DoubleLeftRightArrow: '⇔', - DoubleLeftTee: '⫤', - DoubleLongLeftArrow: '⟸', - DoubleLongLeftRightArrow: '⟺', - DoubleLongRightArrow: '⟹', - DoubleRightArrow: '⇒', - DoubleRightTee: '⊨', - DoubleUpArrow: '⇑', - DoubleUpDownArrow: '⇕', - DoubleVerticalBar: '∥', - DownArrow: '↓', - DownArrowBar: '⤓', - DownArrowUpArrow: '⇵', - DownBreve: '̑', - DownLeftRightVector: '⥐', - DownLeftTeeVector: '⥞', - DownLeftVector: '↽', - DownLeftVectorBar: '⥖', - DownRightTeeVector: '⥟', - DownRightVector: '⇁', - DownRightVectorBar: '⥗', - DownTee: '⊤', - DownTeeArrow: '↧', - Downarrow: '⇓', - Dscr: '𝒟', - Dstrok: 'Đ', - ENG: 'Ŋ', - ETH: 'Ð', - Eacute: 'É', - Ecaron: 'Ě', - Ecirc: 'Ê', - Ecy: 'Э', - Edot: 'Ė', - Efr: '𝔈', - Egrave: 'È', - Element: '∈', - Emacr: 'Ē', - EmptySmallSquare: '◻', - EmptyVerySmallSquare: '▫', - Eogon: 'Ę', - Eopf: '𝔼', - Epsilon: 'Ε', - Equal: '⩵', - EqualTilde: '≂', - Equilibrium: '⇌', - Escr: 'ℰ', - Esim: '⩳', - Eta: 'Η', - Euml: 'Ë', - Exists: '∃', - ExponentialE: 'ⅇ', - Fcy: 'Ф', - Ffr: '𝔉', - FilledSmallSquare: '◼', - FilledVerySmallSquare: '▪', - Fopf: '𝔽', - ForAll: '∀', - Fouriertrf: 'ℱ', - Fscr: 'ℱ', - GJcy: 'Ѓ', - GT: '>', - Gamma: 'Γ', - Gammad: 'Ϝ', - Gbreve: 'Ğ', - Gcedil: 'Ģ', - Gcirc: 'Ĝ', - Gcy: 'Г', - Gdot: 'Ġ', - Gfr: '𝔊', - Gg: '⋙', - Gopf: '𝔾', - GreaterEqual: '≥', - GreaterEqualLess: '⋛', - GreaterFullEqual: '≧', - GreaterGreater: '⪢', - GreaterLess: '≷', - GreaterSlantEqual: '⩾', - GreaterTilde: '≳', - Gscr: '𝒢', - Gt: '≫', - HARDcy: 'Ъ', - Hacek: 'ˇ', - Hat: '^', - Hcirc: 'Ĥ', - Hfr: 'ℌ', - HilbertSpace: 'ℋ', - Hopf: 'ℍ', - HorizontalLine: '─', - Hscr: 'ℋ', - Hstrok: 'Ħ', - HumpDownHump: '≎', - HumpEqual: '≏', - IEcy: 'Е', - IJlig: 'IJ', - IOcy: 'Ё', - Iacute: 'Í', - Icirc: 'Î', - Icy: 'И', - Idot: 'İ', - Ifr: 'ℑ', - Igrave: 'Ì', - Im: 'ℑ', - Imacr: 'Ī', - ImaginaryI: 'ⅈ', - Implies: '⇒', - Int: '∬', - Integral: '∫', - Intersection: '⋂', - InvisibleComma: '⁣', - InvisibleTimes: '⁢', - Iogon: 'Į', - Iopf: '𝕀', - Iota: 'Ι', - Iscr: 'ℐ', - Itilde: 'Ĩ', - Iukcy: 'І', - Iuml: 'Ï', - Jcirc: 'Ĵ', - Jcy: 'Й', - Jfr: '𝔍', - Jopf: '𝕁', - Jscr: '𝒥', - Jsercy: 'Ј', - Jukcy: 'Є', - KHcy: 'Х', - KJcy: 'Ќ', - Kappa: 'Κ', - Kcedil: 'Ķ', - Kcy: 'К', - Kfr: '𝔎', - Kopf: '𝕂', - Kscr: '𝒦', - LJcy: 'Љ', - LT: '<', - Lacute: 'Ĺ', - Lambda: 'Λ', - Lang: '⟪', - Laplacetrf: 'ℒ', - Larr: '↞', - Lcaron: 'Ľ', - Lcedil: 'Ļ', - Lcy: 'Л', - LeftAngleBracket: '⟨', - LeftArrow: '←', - LeftArrowBar: '⇤', - LeftArrowRightArrow: '⇆', - LeftCeiling: '⌈', - LeftDoubleBracket: '⟦', - LeftDownTeeVector: '⥡', - LeftDownVector: '⇃', - LeftDownVectorBar: '⥙', - LeftFloor: '⌊', - LeftRightArrow: '↔', - LeftRightVector: '⥎', - LeftTee: '⊣', - LeftTeeArrow: '↤', - LeftTeeVector: '⥚', - LeftTriangle: '⊲', - LeftTriangleBar: '⧏', - LeftTriangleEqual: '⊴', - LeftUpDownVector: '⥑', - LeftUpTeeVector: '⥠', - LeftUpVector: '↿', - LeftUpVectorBar: '⥘', - LeftVector: '↼', - LeftVectorBar: '⥒', - Leftarrow: '⇐', - Leftrightarrow: '⇔', - LessEqualGreater: '⋚', - LessFullEqual: '≦', - LessGreater: '≶', - LessLess: '⪡', - LessSlantEqual: '⩽', - LessTilde: '≲', - Lfr: '𝔏', - Ll: '⋘', - Lleftarrow: '⇚', - Lmidot: 'Ŀ', - LongLeftArrow: '⟵', - LongLeftRightArrow: '⟷', - LongRightArrow: '⟶', - Longleftarrow: '⟸', - Longleftrightarrow: '⟺', - Longrightarrow: '⟹', - Lopf: '𝕃', - LowerLeftArrow: '↙', - LowerRightArrow: '↘', - Lscr: 'ℒ', - Lsh: '↰', - Lstrok: 'Ł', - Lt: '≪', - Map: '⤅', - Mcy: 'М', - MediumSpace: ' ', - Mellintrf: 'ℳ', - Mfr: '𝔐', - MinusPlus: '∓', - Mopf: '𝕄', - Mscr: 'ℳ', - Mu: 'Μ', - NJcy: 'Њ', - Nacute: 'Ń', - Ncaron: 'Ň', - Ncedil: 'Ņ', - Ncy: 'Н', - NegativeMediumSpace: '​', - NegativeThickSpace: '​', - NegativeThinSpace: '​', - NegativeVeryThinSpace: '​', - NestedGreaterGreater: '≫', - NestedLessLess: '≪', - NewLine: '\n', - Nfr: '𝔑', - NoBreak: '⁠', - NonBreakingSpace: ' ', - Nopf: 'ℕ', - Not: '⫬', - NotCongruent: '≢', - NotCupCap: '≭', - NotDoubleVerticalBar: '∦', - NotElement: '∉', - NotEqual: '≠', - NotEqualTilde: '≂̸', - NotExists: '∄', - NotGreater: '≯', - NotGreaterEqual: '≱', - NotGreaterFullEqual: '≧̸', - NotGreaterGreater: '≫̸', - NotGreaterLess: '≹', - NotGreaterSlantEqual: '⩾̸', - NotGreaterTilde: '≵', - NotHumpDownHump: '≎̸', - NotHumpEqual: '≏̸', - NotLeftTriangle: '⋪', - NotLeftTriangleBar: '⧏̸', - NotLeftTriangleEqual: '⋬', - NotLess: '≮', - NotLessEqual: '≰', - NotLessGreater: '≸', - NotLessLess: '≪̸', - NotLessSlantEqual: '⩽̸', - NotLessTilde: '≴', - NotNestedGreaterGreater: '⪢̸', - NotNestedLessLess: '⪡̸', - NotPrecedes: '⊀', - NotPrecedesEqual: '⪯̸', - NotPrecedesSlantEqual: '⋠', - NotReverseElement: '∌', - NotRightTriangle: '⋫', - NotRightTriangleBar: '⧐̸', - NotRightTriangleEqual: '⋭', - NotSquareSubset: '⊏̸', - NotSquareSubsetEqual: '⋢', - NotSquareSuperset: '⊐̸', - NotSquareSupersetEqual: '⋣', - NotSubset: '⊂⃒', - NotSubsetEqual: '⊈', - NotSucceeds: '⊁', - NotSucceedsEqual: '⪰̸', - NotSucceedsSlantEqual: '⋡', - NotSucceedsTilde: '≿̸', - NotSuperset: '⊃⃒', - NotSupersetEqual: '⊉', - NotTilde: '≁', - NotTildeEqual: '≄', - NotTildeFullEqual: '≇', - NotTildeTilde: '≉', - NotVerticalBar: '∤', - Nscr: '𝒩', - Ntilde: 'Ñ', - Nu: 'Ν', - OElig: 'Œ', - Oacute: 'Ó', - Ocirc: 'Ô', - Ocy: 'О', - Odblac: 'Ő', - Ofr: '𝔒', - Ograve: 'Ò', - Omacr: 'Ō', - Omega: 'Ω', - Omicron: 'Ο', - Oopf: '𝕆', - OpenCurlyDoubleQuote: '“', - OpenCurlyQuote: '‘', - Or: '⩔', - Oscr: '𝒪', - Oslash: 'Ø', - Otilde: 'Õ', - Otimes: '⨷', - Ouml: 'Ö', - OverBar: '‾', - OverBrace: '⏞', - OverBracket: '⎴', - OverParenthesis: '⏜', - PartialD: '∂', - Pcy: 'П', - Pfr: '𝔓', - Phi: 'Φ', - Pi: 'Π', - PlusMinus: '±', - Poincareplane: 'ℌ', - Popf: 'ℙ', - Pr: '⪻', - Precedes: '≺', - PrecedesEqual: '⪯', - PrecedesSlantEqual: '≼', - PrecedesTilde: '≾', - Prime: '″', - Product: '∏', - Proportion: '∷', - Proportional: '∝', - Pscr: '𝒫', - Psi: 'Ψ', - QUOT: '"', - Qfr: '𝔔', - Qopf: 'ℚ', - Qscr: '𝒬', - RBarr: '⤐', - REG: '®', - Racute: 'Ŕ', - Rang: '⟫', - Rarr: '↠', - Rarrtl: '⤖', - Rcaron: 'Ř', - Rcedil: 'Ŗ', - Rcy: 'Р', - Re: 'ℜ', - ReverseElement: '∋', - ReverseEquilibrium: '⇋', - ReverseUpEquilibrium: '⥯', - Rfr: 'ℜ', - Rho: 'Ρ', - RightAngleBracket: '⟩', - RightArrow: '→', - RightArrowBar: '⇥', - RightArrowLeftArrow: '⇄', - RightCeiling: '⌉', - RightDoubleBracket: '⟧', - RightDownTeeVector: '⥝', - RightDownVector: '⇂', - RightDownVectorBar: '⥕', - RightFloor: '⌋', - RightTee: '⊢', - RightTeeArrow: '↦', - RightTeeVector: '⥛', - RightTriangle: '⊳', - RightTriangleBar: '⧐', - RightTriangleEqual: '⊵', - RightUpDownVector: '⥏', - RightUpTeeVector: '⥜', - RightUpVector: '↾', - RightUpVectorBar: '⥔', - RightVector: '⇀', - RightVectorBar: '⥓', - Rightarrow: '⇒', - Ropf: 'ℝ', - RoundImplies: '⥰', - Rrightarrow: '⇛', - Rscr: 'ℛ', - Rsh: '↱', - RuleDelayed: '⧴', - SHCHcy: 'Щ', - SHcy: 'Ш', - SOFTcy: 'Ь', - Sacute: 'Ś', - Sc: '⪼', - Scaron: 'Š', - Scedil: 'Ş', - Scirc: 'Ŝ', - Scy: 'С', - Sfr: '𝔖', - ShortDownArrow: '↓', - ShortLeftArrow: '←', - ShortRightArrow: '→', - ShortUpArrow: '↑', - Sigma: 'Σ', - SmallCircle: '∘', - Sopf: '𝕊', - Sqrt: '√', - Square: '□', - SquareIntersection: '⊓', - SquareSubset: '⊏', - SquareSubsetEqual: '⊑', - SquareSuperset: '⊐', - SquareSupersetEqual: '⊒', - SquareUnion: '⊔', - Sscr: '𝒮', - Star: '⋆', - Sub: '⋐', - Subset: '⋐', - SubsetEqual: '⊆', - Succeeds: '≻', - SucceedsEqual: '⪰', - SucceedsSlantEqual: '≽', - SucceedsTilde: '≿', - SuchThat: '∋', - Sum: '∑', - Sup: '⋑', - Superset: '⊃', - SupersetEqual: '⊇', - Supset: '⋑', - THORN: 'Þ', - TRADE: '™', - TSHcy: 'Ћ', - TScy: 'Ц', - Tab: '\t', - Tau: 'Τ', - Tcaron: 'Ť', - Tcedil: 'Ţ', - Tcy: 'Т', - Tfr: '𝔗', - Therefore: '∴', - Theta: 'Θ', - ThickSpace: '  ', - ThinSpace: ' ', - Tilde: '∼', - TildeEqual: '≃', - TildeFullEqual: '≅', - TildeTilde: '≈', - Topf: '𝕋', - TripleDot: '⃛', - Tscr: '𝒯', - Tstrok: 'Ŧ', - Uacute: 'Ú', - Uarr: '↟', - Uarrocir: '⥉', - Ubrcy: 'Ў', - Ubreve: 'Ŭ', - Ucirc: 'Û', - Ucy: 'У', - Udblac: 'Ű', - Ufr: '𝔘', - Ugrave: 'Ù', - Umacr: 'Ū', - UnderBar: '_', - UnderBrace: '⏟', - UnderBracket: '⎵', - UnderParenthesis: '⏝', - Union: '⋃', - UnionPlus: '⊎', - Uogon: 'Ų', - Uopf: '𝕌', - UpArrow: '↑', - UpArrowBar: '⤒', - UpArrowDownArrow: '⇅', - UpDownArrow: '↕', - UpEquilibrium: '⥮', - UpTee: '⊥', - UpTeeArrow: '↥', - Uparrow: '⇑', - Updownarrow: '⇕', - UpperLeftArrow: '↖', - UpperRightArrow: '↗', - Upsi: 'ϒ', - Upsilon: 'Υ', - Uring: 'Ů', - Uscr: '𝒰', - Utilde: 'Ũ', - Uuml: 'Ü', - VDash: '⊫', - Vbar: '⫫', - Vcy: 'В', - Vdash: '⊩', - Vdashl: '⫦', - Vee: '⋁', - Verbar: '‖', - Vert: '‖', - VerticalBar: '∣', - VerticalLine: '|', - VerticalSeparator: '❘', - VerticalTilde: '≀', - VeryThinSpace: ' ', - Vfr: '𝔙', - Vopf: '𝕍', - Vscr: '𝒱', - Vvdash: '⊪', - Wcirc: 'Ŵ', - Wedge: '⋀', - Wfr: '𝔚', - Wopf: '𝕎', - Wscr: '𝒲', - Xfr: '𝔛', - Xi: 'Ξ', - Xopf: '𝕏', - Xscr: '𝒳', - YAcy: 'Я', - YIcy: 'Ї', - YUcy: 'Ю', - Yacute: 'Ý', - Ycirc: 'Ŷ', - Ycy: 'Ы', - Yfr: '𝔜', - Yopf: '𝕐', - Yscr: '𝒴', - Yuml: 'Ÿ', - ZHcy: 'Ж', - Zacute: 'Ź', - Zcaron: 'Ž', - Zcy: 'З', - Zdot: 'Ż', - ZeroWidthSpace: '​', - Zeta: 'Ζ', - Zfr: 'ℨ', - Zopf: 'ℤ', - Zscr: '𝒵', - aacute: 'á', - abreve: 'ă', - ac: '∾', - acE: '∾̳', - acd: '∿', - acirc: 'â', - acute: '´', - acy: 'а', - aelig: 'æ', - af: '⁡', - afr: '𝔞', - agrave: 'à', - alefsym: 'ℵ', - aleph: 'ℵ', - alpha: 'α', - amacr: 'ā', - amalg: '⨿', - amp: '&', - and: '∧', - andand: '⩕', - andd: '⩜', - andslope: '⩘', - andv: '⩚', - ang: '∠', - ange: '⦤', - angle: '∠', - angmsd: '∡', - angmsdaa: '⦨', - angmsdab: '⦩', - angmsdac: '⦪', - angmsdad: '⦫', - angmsdae: '⦬', - angmsdaf: '⦭', - angmsdag: '⦮', - angmsdah: '⦯', - angrt: '∟', - angrtvb: '⊾', - angrtvbd: '⦝', - angsph: '∢', - angst: 'Å', - angzarr: '⍼', - aogon: 'ą', - aopf: '𝕒', - ap: '≈', - apE: '⩰', - apacir: '⩯', - ape: '≊', - apid: '≋', - apos: "'", - approx: '≈', - approxeq: '≊', - aring: 'å', - ascr: '𝒶', - ast: '*', - asymp: '≈', - asympeq: '≍', - atilde: 'ã', - auml: 'ä', - awconint: '∳', - awint: '⨑', - bNot: '⫭', - backcong: '≌', - backepsilon: '϶', - backprime: '‵', - backsim: '∽', - backsimeq: '⋍', - barvee: '⊽', - barwed: '⌅', - barwedge: '⌅', - bbrk: '⎵', - bbrktbrk: '⎶', - bcong: '≌', - bcy: 'б', - bdquo: '„', - becaus: '∵', - because: '∵', - bemptyv: '⦰', - bepsi: '϶', - bernou: 'ℬ', - beta: 'β', - beth: 'ℶ', - between: '≬', - bfr: '𝔟', - bigcap: '⋂', - bigcirc: '◯', - bigcup: '⋃', - bigodot: '⨀', - bigoplus: '⨁', - bigotimes: '⨂', - bigsqcup: '⨆', - bigstar: '★', - bigtriangledown: '▽', - bigtriangleup: '△', - biguplus: '⨄', - bigvee: '⋁', - bigwedge: '⋀', - bkarow: '⤍', - blacklozenge: '⧫', - blacksquare: '▪', - blacktriangle: '▴', - blacktriangledown: '▾', - blacktriangleleft: '◂', - blacktriangleright: '▸', - blank: '␣', - blk12: '▒', - blk14: '░', - blk34: '▓', - block: '█', - bne: '=⃥', - bnequiv: '≡⃥', - bnot: '⌐', - bopf: '𝕓', - bot: '⊥', - bottom: '⊥', - bowtie: '⋈', - boxDL: '╗', - boxDR: '╔', - boxDl: '╖', - boxDr: '╓', - boxH: '═', - boxHD: '╦', - boxHU: '╩', - boxHd: '╤', - boxHu: '╧', - boxUL: '╝', - boxUR: '╚', - boxUl: '╜', - boxUr: '╙', - boxV: '║', - boxVH: '╬', - boxVL: '╣', - boxVR: '╠', - boxVh: '╫', - boxVl: '╢', - boxVr: '╟', - boxbox: '⧉', - boxdL: '╕', - boxdR: '╒', - boxdl: '┐', - boxdr: '┌', - boxh: '─', - boxhD: '╥', - boxhU: '╨', - boxhd: '┬', - boxhu: '┴', - boxminus: '⊟', - boxplus: '⊞', - boxtimes: '⊠', - boxuL: '╛', - boxuR: '╘', - boxul: '┘', - boxur: '└', - boxv: '│', - boxvH: '╪', - boxvL: '╡', - boxvR: '╞', - boxvh: '┼', - boxvl: '┤', - boxvr: '├', - bprime: '‵', - breve: '˘', - brvbar: '¦', - bscr: '𝒷', - bsemi: '⁏', - bsim: '∽', - bsime: '⋍', - bsol: '\\', - bsolb: '⧅', - bsolhsub: '⟈', - bull: '•', - bullet: '•', - bump: '≎', - bumpE: '⪮', - bumpe: '≏', - bumpeq: '≏', - cacute: 'ć', - cap: '∩', - capand: '⩄', - capbrcup: '⩉', - capcap: '⩋', - capcup: '⩇', - capdot: '⩀', - caps: '∩︀', - caret: '⁁', - caron: 'ˇ', - ccaps: '⩍', - ccaron: 'č', - ccedil: 'ç', - ccirc: 'ĉ', - ccups: '⩌', - ccupssm: '⩐', - cdot: 'ċ', - cedil: '¸', - cemptyv: '⦲', - cent: '¢', - centerdot: '·', - cfr: '𝔠', - chcy: 'ч', - check: '✓', - checkmark: '✓', - chi: 'χ', - cir: '○', - cirE: '⧃', - circ: 'ˆ', - circeq: '≗', - circlearrowleft: '↺', - circlearrowright: '↻', - circledR: '®', - circledS: 'Ⓢ', - circledast: '⊛', - circledcirc: '⊚', - circleddash: '⊝', - cire: '≗', - cirfnint: '⨐', - cirmid: '⫯', - cirscir: '⧂', - clubs: '♣', - clubsuit: '♣', - colon: ':', - colone: '≔', - coloneq: '≔', - comma: ',', - commat: '@', - comp: '∁', - compfn: '∘', - complement: '∁', - complexes: 'ℂ', - cong: '≅', - congdot: '⩭', - conint: '∮', - copf: '𝕔', - coprod: '∐', - copy: '©', - copysr: '℗', - crarr: '↵', - cross: '✗', - cscr: '𝒸', - csub: '⫏', - csube: '⫑', - csup: '⫐', - csupe: '⫒', - ctdot: '⋯', - cudarrl: '⤸', - cudarrr: '⤵', - cuepr: '⋞', - cuesc: '⋟', - cularr: '↶', - cularrp: '⤽', - cup: '∪', - cupbrcap: '⩈', - cupcap: '⩆', - cupcup: '⩊', - cupdot: '⊍', - cupor: '⩅', - cups: '∪︀', - curarr: '↷', - curarrm: '⤼', - curlyeqprec: '⋞', - curlyeqsucc: '⋟', - curlyvee: '⋎', - curlywedge: '⋏', - curren: '¤', - curvearrowleft: '↶', - curvearrowright: '↷', - cuvee: '⋎', - cuwed: '⋏', - cwconint: '∲', - cwint: '∱', - cylcty: '⌭', - dArr: '⇓', - dHar: '⥥', - dagger: '†', - daleth: 'ℸ', - darr: '↓', - dash: '‐', - dashv: '⊣', - dbkarow: '⤏', - dblac: '˝', - dcaron: 'ď', - dcy: 'д', - dd: 'ⅆ', - ddagger: '‡', - ddarr: '⇊', - ddotseq: '⩷', - deg: '°', - delta: 'δ', - demptyv: '⦱', - dfisht: '⥿', - dfr: '𝔡', - dharl: '⇃', - dharr: '⇂', - diam: '⋄', - diamond: '⋄', - diamondsuit: '♦', - diams: '♦', - die: '¨', - digamma: 'ϝ', - disin: '⋲', - div: '÷', - divide: '÷', - divideontimes: '⋇', - divonx: '⋇', - djcy: 'ђ', - dlcorn: '⌞', - dlcrop: '⌍', - dollar: '$', - dopf: '𝕕', - dot: '˙', - doteq: '≐', - doteqdot: '≑', - dotminus: '∸', - dotplus: '∔', - dotsquare: '⊡', - doublebarwedge: '⌆', - downarrow: '↓', - downdownarrows: '⇊', - downharpoonleft: '⇃', - downharpoonright: '⇂', - drbkarow: '⤐', - drcorn: '⌟', - drcrop: '⌌', - dscr: '𝒹', - dscy: 'ѕ', - dsol: '⧶', - dstrok: 'đ', - dtdot: '⋱', - dtri: '▿', - dtrif: '▾', - duarr: '⇵', - duhar: '⥯', - dwangle: '⦦', - dzcy: 'џ', - dzigrarr: '⟿', - eDDot: '⩷', - eDot: '≑', - eacute: 'é', - easter: '⩮', - ecaron: 'ě', - ecir: '≖', - ecirc: 'ê', - ecolon: '≕', - ecy: 'э', - edot: 'ė', - ee: 'ⅇ', - efDot: '≒', - efr: '𝔢', - eg: '⪚', - egrave: 'è', - egs: '⪖', - egsdot: '⪘', - el: '⪙', - elinters: '⏧', - ell: 'ℓ', - els: '⪕', - elsdot: '⪗', - emacr: 'ē', - empty: '∅', - emptyset: '∅', - emptyv: '∅', - emsp13: ' ', - emsp14: ' ', - emsp: ' ', - eng: 'ŋ', - ensp: ' ', - eogon: 'ę', - eopf: '𝕖', - epar: '⋕', - eparsl: '⧣', - eplus: '⩱', - epsi: 'ε', - epsilon: 'ε', - epsiv: 'ϵ', - eqcirc: '≖', - eqcolon: '≕', - eqsim: '≂', - eqslantgtr: '⪖', - eqslantless: '⪕', - equals: '=', - equest: '≟', - equiv: '≡', - equivDD: '⩸', - eqvparsl: '⧥', - erDot: '≓', - erarr: '⥱', - escr: 'ℯ', - esdot: '≐', - esim: '≂', - eta: 'η', - eth: 'ð', - euml: 'ë', - euro: '€', - excl: '!', - exist: '∃', - expectation: 'ℰ', - exponentiale: 'ⅇ', - fallingdotseq: '≒', - fcy: 'ф', - female: '♀', - ffilig: 'ffi', - fflig: 'ff', - ffllig: 'ffl', - ffr: '𝔣', - filig: 'fi', - fjlig: 'fj', - flat: '♭', - fllig: 'fl', - fltns: '▱', - fnof: 'ƒ', - fopf: '𝕗', - forall: '∀', - fork: '⋔', - forkv: '⫙', - fpartint: '⨍', - frac12: '½', - frac13: '⅓', - frac14: '¼', - frac15: '⅕', - frac16: '⅙', - frac18: '⅛', - frac23: '⅔', - frac25: '⅖', - frac34: '¾', - frac35: '⅗', - frac38: '⅜', - frac45: '⅘', - frac56: '⅚', - frac58: '⅝', - frac78: '⅞', - frasl: '⁄', - frown: '⌢', - fscr: '𝒻', - gE: '≧', - gEl: '⪌', - gacute: 'ǵ', - gamma: 'γ', - gammad: 'ϝ', - gap: '⪆', - gbreve: 'ğ', - gcirc: 'ĝ', - gcy: 'г', - gdot: 'ġ', - ge: '≥', - gel: '⋛', - geq: '≥', - geqq: '≧', - geqslant: '⩾', - ges: '⩾', - gescc: '⪩', - gesdot: '⪀', - gesdoto: '⪂', - gesdotol: '⪄', - gesl: '⋛︀', - gesles: '⪔', - gfr: '𝔤', - gg: '≫', - ggg: '⋙', - gimel: 'ℷ', - gjcy: 'ѓ', - gl: '≷', - glE: '⪒', - gla: '⪥', - glj: '⪤', - gnE: '≩', - gnap: '⪊', - gnapprox: '⪊', - gne: '⪈', - gneq: '⪈', - gneqq: '≩', - gnsim: '⋧', - gopf: '𝕘', - grave: '`', - gscr: 'ℊ', - gsim: '≳', - gsime: '⪎', - gsiml: '⪐', - gt: '>', - gtcc: '⪧', - gtcir: '⩺', - gtdot: '⋗', - gtlPar: '⦕', - gtquest: '⩼', - gtrapprox: '⪆', - gtrarr: '⥸', - gtrdot: '⋗', - gtreqless: '⋛', - gtreqqless: '⪌', - gtrless: '≷', - gtrsim: '≳', - gvertneqq: '≩︀', - gvnE: '≩︀', - hArr: '⇔', - hairsp: ' ', - half: '½', - hamilt: 'ℋ', - hardcy: 'ъ', - harr: '↔', - harrcir: '⥈', - harrw: '↭', - hbar: 'ℏ', - hcirc: 'ĥ', - hearts: '♥', - heartsuit: '♥', - hellip: '…', - hercon: '⊹', - hfr: '𝔥', - hksearow: '⤥', - hkswarow: '⤦', - hoarr: '⇿', - homtht: '∻', - hookleftarrow: '↩', - hookrightarrow: '↪', - hopf: '𝕙', - horbar: '―', - hscr: '𝒽', - hslash: 'ℏ', - hstrok: 'ħ', - hybull: '⁃', - hyphen: '‐', - iacute: 'í', - ic: '⁣', - icirc: 'î', - icy: 'и', - iecy: 'е', - iexcl: '¡', - iff: '⇔', - ifr: '𝔦', - igrave: 'ì', - ii: 'ⅈ', - iiiint: '⨌', - iiint: '∭', - iinfin: '⧜', - iiota: '℩', - ijlig: 'ij', - imacr: 'ī', - image: 'ℑ', - imagline: 'ℐ', - imagpart: 'ℑ', - imath: 'ı', - imof: '⊷', - imped: 'Ƶ', - in: '∈', - incare: '℅', - infin: '∞', - infintie: '⧝', - inodot: 'ı', - int: '∫', - intcal: '⊺', - integers: 'ℤ', - intercal: '⊺', - intlarhk: '⨗', - intprod: '⨼', - iocy: 'ё', - iogon: 'į', - iopf: '𝕚', - iota: 'ι', - iprod: '⨼', - iquest: '¿', - iscr: '𝒾', - isin: '∈', - isinE: '⋹', - isindot: '⋵', - isins: '⋴', - isinsv: '⋳', - isinv: '∈', - it: '⁢', - itilde: 'ĩ', - iukcy: 'і', - iuml: 'ï', - jcirc: 'ĵ', - jcy: 'й', - jfr: '𝔧', - jmath: 'ȷ', - jopf: '𝕛', - jscr: '𝒿', - jsercy: 'ј', - jukcy: 'є', - kappa: 'κ', - kappav: 'ϰ', - kcedil: 'ķ', - kcy: 'к', - kfr: '𝔨', - kgreen: 'ĸ', - khcy: 'х', - kjcy: 'ќ', - kopf: '𝕜', - kscr: '𝓀', - lAarr: '⇚', - lArr: '⇐', - lAtail: '⤛', - lBarr: '⤎', - lE: '≦', - lEg: '⪋', - lHar: '⥢', - lacute: 'ĺ', - laemptyv: '⦴', - lagran: 'ℒ', - lambda: 'λ', - lang: '⟨', - langd: '⦑', - langle: '⟨', - lap: '⪅', - laquo: '«', - larr: '←', - larrb: '⇤', - larrbfs: '⤟', - larrfs: '⤝', - larrhk: '↩', - larrlp: '↫', - larrpl: '⤹', - larrsim: '⥳', - larrtl: '↢', - lat: '⪫', - latail: '⤙', - late: '⪭', - lates: '⪭︀', - lbarr: '⤌', - lbbrk: '❲', - lbrace: '{', - lbrack: '[', - lbrke: '⦋', - lbrksld: '⦏', - lbrkslu: '⦍', - lcaron: 'ľ', - lcedil: 'ļ', - lceil: '⌈', - lcub: '{', - lcy: 'л', - ldca: '⤶', - ldquo: '“', - ldquor: '„', - ldrdhar: '⥧', - ldrushar: '⥋', - ldsh: '↲', - le: '≤', - leftarrow: '←', - leftarrowtail: '↢', - leftharpoondown: '↽', - leftharpoonup: '↼', - leftleftarrows: '⇇', - leftrightarrow: '↔', - leftrightarrows: '⇆', - leftrightharpoons: '⇋', - leftrightsquigarrow: '↭', - leftthreetimes: '⋋', - leg: '⋚', - leq: '≤', - leqq: '≦', - leqslant: '⩽', - les: '⩽', - lescc: '⪨', - lesdot: '⩿', - lesdoto: '⪁', - lesdotor: '⪃', - lesg: '⋚︀', - lesges: '⪓', - lessapprox: '⪅', - lessdot: '⋖', - lesseqgtr: '⋚', - lesseqqgtr: '⪋', - lessgtr: '≶', - lesssim: '≲', - lfisht: '⥼', - lfloor: '⌊', - lfr: '𝔩', - lg: '≶', - lgE: '⪑', - lhard: '↽', - lharu: '↼', - lharul: '⥪', - lhblk: '▄', - ljcy: 'љ', - ll: '≪', - llarr: '⇇', - llcorner: '⌞', - llhard: '⥫', - lltri: '◺', - lmidot: 'ŀ', - lmoust: '⎰', - lmoustache: '⎰', - lnE: '≨', - lnap: '⪉', - lnapprox: '⪉', - lne: '⪇', - lneq: '⪇', - lneqq: '≨', - lnsim: '⋦', - loang: '⟬', - loarr: '⇽', - lobrk: '⟦', - longleftarrow: '⟵', - longleftrightarrow: '⟷', - longmapsto: '⟼', - longrightarrow: '⟶', - looparrowleft: '↫', - looparrowright: '↬', - lopar: '⦅', - lopf: '𝕝', - loplus: '⨭', - lotimes: '⨴', - lowast: '∗', - lowbar: '_', - loz: '◊', - lozenge: '◊', - lozf: '⧫', - lpar: '(', - lparlt: '⦓', - lrarr: '⇆', - lrcorner: '⌟', - lrhar: '⇋', - lrhard: '⥭', - lrm: '‎', - lrtri: '⊿', - lsaquo: '‹', - lscr: '𝓁', - lsh: '↰', - lsim: '≲', - lsime: '⪍', - lsimg: '⪏', - lsqb: '[', - lsquo: '‘', - lsquor: '‚', - lstrok: 'ł', - lt: '<', - ltcc: '⪦', - ltcir: '⩹', - ltdot: '⋖', - lthree: '⋋', - ltimes: '⋉', - ltlarr: '⥶', - ltquest: '⩻', - ltrPar: '⦖', - ltri: '◃', - ltrie: '⊴', - ltrif: '◂', - lurdshar: '⥊', - luruhar: '⥦', - lvertneqq: '≨︀', - lvnE: '≨︀', - mDDot: '∺', - macr: '¯', - male: '♂', - malt: '✠', - maltese: '✠', - map: '↦', - mapsto: '↦', - mapstodown: '↧', - mapstoleft: '↤', - mapstoup: '↥', - marker: '▮', - mcomma: '⨩', - mcy: 'м', - mdash: '—', - measuredangle: '∡', - mfr: '𝔪', - mho: '℧', - micro: 'µ', - mid: '∣', - midast: '*', - midcir: '⫰', - middot: '·', - minus: '−', - minusb: '⊟', - minusd: '∸', - minusdu: '⨪', - mlcp: '⫛', - mldr: '…', - mnplus: '∓', - models: '⊧', - mopf: '𝕞', - mp: '∓', - mscr: '𝓂', - mstpos: '∾', - mu: 'μ', - multimap: '⊸', - mumap: '⊸', - nGg: '⋙̸', - nGt: '≫⃒', - nGtv: '≫̸', - nLeftarrow: '⇍', - nLeftrightarrow: '⇎', - nLl: '⋘̸', - nLt: '≪⃒', - nLtv: '≪̸', - nRightarrow: '⇏', - nVDash: '⊯', - nVdash: '⊮', - nabla: '∇', - nacute: 'ń', - nang: '∠⃒', - nap: '≉', - napE: '⩰̸', - napid: '≋̸', - napos: 'ʼn', - napprox: '≉', - natur: '♮', - natural: '♮', - naturals: 'ℕ', - nbsp: ' ', - nbump: '≎̸', - nbumpe: '≏̸', - ncap: '⩃', - ncaron: 'ň', - ncedil: 'ņ', - ncong: '≇', - ncongdot: '⩭̸', - ncup: '⩂', - ncy: 'н', - ndash: '–', - ne: '≠', - neArr: '⇗', - nearhk: '⤤', - nearr: '↗', - nearrow: '↗', - nedot: '≐̸', - nequiv: '≢', - nesear: '⤨', - nesim: '≂̸', - nexist: '∄', - nexists: '∄', - nfr: '𝔫', - ngE: '≧̸', - nge: '≱', - ngeq: '≱', - ngeqq: '≧̸', - ngeqslant: '⩾̸', - nges: '⩾̸', - ngsim: '≵', - ngt: '≯', - ngtr: '≯', - nhArr: '⇎', - nharr: '↮', - nhpar: '⫲', - ni: '∋', - nis: '⋼', - nisd: '⋺', - niv: '∋', - njcy: 'њ', - nlArr: '⇍', - nlE: '≦̸', - nlarr: '↚', - nldr: '‥', - nle: '≰', - nleftarrow: '↚', - nleftrightarrow: '↮', - nleq: '≰', - nleqq: '≦̸', - nleqslant: '⩽̸', - nles: '⩽̸', - nless: '≮', - nlsim: '≴', - nlt: '≮', - nltri: '⋪', - nltrie: '⋬', - nmid: '∤', - nopf: '𝕟', - not: '¬', - notin: '∉', - notinE: '⋹̸', - notindot: '⋵̸', - notinva: '∉', - notinvb: '⋷', - notinvc: '⋶', - notni: '∌', - notniva: '∌', - notnivb: '⋾', - notnivc: '⋽', - npar: '∦', - nparallel: '∦', - nparsl: '⫽⃥', - npart: '∂̸', - npolint: '⨔', - npr: '⊀', - nprcue: '⋠', - npre: '⪯̸', - nprec: '⊀', - npreceq: '⪯̸', - nrArr: '⇏', - nrarr: '↛', - nrarrc: '⤳̸', - nrarrw: '↝̸', - nrightarrow: '↛', - nrtri: '⋫', - nrtrie: '⋭', - nsc: '⊁', - nsccue: '⋡', - nsce: '⪰̸', - nscr: '𝓃', - nshortmid: '∤', - nshortparallel: '∦', - nsim: '≁', - nsime: '≄', - nsimeq: '≄', - nsmid: '∤', - nspar: '∦', - nsqsube: '⋢', - nsqsupe: '⋣', - nsub: '⊄', - nsubE: '⫅̸', - nsube: '⊈', - nsubset: '⊂⃒', - nsubseteq: '⊈', - nsubseteqq: '⫅̸', - nsucc: '⊁', - nsucceq: '⪰̸', - nsup: '⊅', - nsupE: '⫆̸', - nsupe: '⊉', - nsupset: '⊃⃒', - nsupseteq: '⊉', - nsupseteqq: '⫆̸', - ntgl: '≹', - ntilde: 'ñ', - ntlg: '≸', - ntriangleleft: '⋪', - ntrianglelefteq: '⋬', - ntriangleright: '⋫', - ntrianglerighteq: '⋭', - nu: 'ν', - num: '#', - numero: '№', - numsp: ' ', - nvDash: '⊭', - nvHarr: '⤄', - nvap: '≍⃒', - nvdash: '⊬', - nvge: '≥⃒', - nvgt: '>⃒', - nvinfin: '⧞', - nvlArr: '⤂', - nvle: '≤⃒', - nvlt: '<⃒', - nvltrie: '⊴⃒', - nvrArr: '⤃', - nvrtrie: '⊵⃒', - nvsim: '∼⃒', - nwArr: '⇖', - nwarhk: '⤣', - nwarr: '↖', - nwarrow: '↖', - nwnear: '⤧', - oS: 'Ⓢ', - oacute: 'ó', - oast: '⊛', - ocir: '⊚', - ocirc: 'ô', - ocy: 'о', - odash: '⊝', - odblac: 'ő', - odiv: '⨸', - odot: '⊙', - odsold: '⦼', - oelig: 'œ', - ofcir: '⦿', - ofr: '𝔬', - ogon: '˛', - ograve: 'ò', - ogt: '⧁', - ohbar: '⦵', - ohm: 'Ω', - oint: '∮', - olarr: '↺', - olcir: '⦾', - olcross: '⦻', - oline: '‾', - olt: '⧀', - omacr: 'ō', - omega: 'ω', - omicron: 'ο', - omid: '⦶', - ominus: '⊖', - oopf: '𝕠', - opar: '⦷', - operp: '⦹', - oplus: '⊕', - or: '∨', - orarr: '↻', - ord: '⩝', - order: 'ℴ', - orderof: 'ℴ', - ordf: 'ª', - ordm: 'º', - origof: '⊶', - oror: '⩖', - orslope: '⩗', - orv: '⩛', - oscr: 'ℴ', - oslash: 'ø', - osol: '⊘', - otilde: 'õ', - otimes: '⊗', - otimesas: '⨶', - ouml: 'ö', - ovbar: '⌽', - par: '∥', - para: '¶', - parallel: '∥', - parsim: '⫳', - parsl: '⫽', - part: '∂', - pcy: 'п', - percnt: '%', - period: '.', - permil: '‰', - perp: '⊥', - pertenk: '‱', - pfr: '𝔭', - phi: 'φ', - phiv: 'ϕ', - phmmat: 'ℳ', - phone: '☎', - pi: 'π', - pitchfork: '⋔', - piv: 'ϖ', - planck: 'ℏ', - planckh: 'ℎ', - plankv: 'ℏ', - plus: '+', - plusacir: '⨣', - plusb: '⊞', - pluscir: '⨢', - plusdo: '∔', - plusdu: '⨥', - pluse: '⩲', - plusmn: '±', - plussim: '⨦', - plustwo: '⨧', - pm: '±', - pointint: '⨕', - popf: '𝕡', - pound: '£', - pr: '≺', - prE: '⪳', - prap: '⪷', - prcue: '≼', - pre: '⪯', - prec: '≺', - precapprox: '⪷', - preccurlyeq: '≼', - preceq: '⪯', - precnapprox: '⪹', - precneqq: '⪵', - precnsim: '⋨', - precsim: '≾', - prime: '′', - primes: 'ℙ', - prnE: '⪵', - prnap: '⪹', - prnsim: '⋨', - prod: '∏', - profalar: '⌮', - profline: '⌒', - profsurf: '⌓', - prop: '∝', - propto: '∝', - prsim: '≾', - prurel: '⊰', - pscr: '𝓅', - psi: 'ψ', - puncsp: ' ', - qfr: '𝔮', - qint: '⨌', - qopf: '𝕢', - qprime: '⁗', - qscr: '𝓆', - quaternions: 'ℍ', - quatint: '⨖', - quest: '?', - questeq: '≟', - quot: '"', - rAarr: '⇛', - rArr: '⇒', - rAtail: '⤜', - rBarr: '⤏', - rHar: '⥤', - race: '∽̱', - racute: 'ŕ', - radic: '√', - raemptyv: '⦳', - rang: '⟩', - rangd: '⦒', - range: '⦥', - rangle: '⟩', - raquo: '»', - rarr: '→', - rarrap: '⥵', - rarrb: '⇥', - rarrbfs: '⤠', - rarrc: '⤳', - rarrfs: '⤞', - rarrhk: '↪', - rarrlp: '↬', - rarrpl: '⥅', - rarrsim: '⥴', - rarrtl: '↣', - rarrw: '↝', - ratail: '⤚', - ratio: '∶', - rationals: 'ℚ', - rbarr: '⤍', - rbbrk: '❳', - rbrace: '}', - rbrack: ']', - rbrke: '⦌', - rbrksld: '⦎', - rbrkslu: '⦐', - rcaron: 'ř', - rcedil: 'ŗ', - rceil: '⌉', - rcub: '}', - rcy: 'р', - rdca: '⤷', - rdldhar: '⥩', - rdquo: '”', - rdquor: '”', - rdsh: '↳', - real: 'ℜ', - realine: 'ℛ', - realpart: 'ℜ', - reals: 'ℝ', - rect: '▭', - reg: '®', - rfisht: '⥽', - rfloor: '⌋', - rfr: '𝔯', - rhard: '⇁', - rharu: '⇀', - rharul: '⥬', - rho: 'ρ', - rhov: 'ϱ', - rightarrow: '→', - rightarrowtail: '↣', - rightharpoondown: '⇁', - rightharpoonup: '⇀', - rightleftarrows: '⇄', - rightleftharpoons: '⇌', - rightrightarrows: '⇉', - rightsquigarrow: '↝', - rightthreetimes: '⋌', - ring: '˚', - risingdotseq: '≓', - rlarr: '⇄', - rlhar: '⇌', - rlm: '‏', - rmoust: '⎱', - rmoustache: '⎱', - rnmid: '⫮', - roang: '⟭', - roarr: '⇾', - robrk: '⟧', - ropar: '⦆', - ropf: '𝕣', - roplus: '⨮', - rotimes: '⨵', - rpar: ')', - rpargt: '⦔', - rppolint: '⨒', - rrarr: '⇉', - rsaquo: '›', - rscr: '𝓇', - rsh: '↱', - rsqb: ']', - rsquo: '’', - rsquor: '’', - rthree: '⋌', - rtimes: '⋊', - rtri: '▹', - rtrie: '⊵', - rtrif: '▸', - rtriltri: '⧎', - ruluhar: '⥨', - rx: '℞', - sacute: 'ś', - sbquo: '‚', - sc: '≻', - scE: '⪴', - scap: '⪸', - scaron: 'š', - sccue: '≽', - sce: '⪰', - scedil: 'ş', - scirc: 'ŝ', - scnE: '⪶', - scnap: '⪺', - scnsim: '⋩', - scpolint: '⨓', - scsim: '≿', - scy: 'с', - sdot: '⋅', - sdotb: '⊡', - sdote: '⩦', - seArr: '⇘', - searhk: '⤥', - searr: '↘', - searrow: '↘', - sect: '§', - semi: ';', - seswar: '⤩', - setminus: '∖', - setmn: '∖', - sext: '✶', - sfr: '𝔰', - sfrown: '⌢', - sharp: '♯', - shchcy: 'щ', - shcy: 'ш', - shortmid: '∣', - shortparallel: '∥', - shy: '­', - sigma: 'σ', - sigmaf: 'ς', - sigmav: 'ς', - sim: '∼', - simdot: '⩪', - sime: '≃', - simeq: '≃', - simg: '⪞', - simgE: '⪠', - siml: '⪝', - simlE: '⪟', - simne: '≆', - simplus: '⨤', - simrarr: '⥲', - slarr: '←', - smallsetminus: '∖', - smashp: '⨳', - smeparsl: '⧤', - smid: '∣', - smile: '⌣', - smt: '⪪', - smte: '⪬', - smtes: '⪬︀', - softcy: 'ь', - sol: '/', - solb: '⧄', - solbar: '⌿', - sopf: '𝕤', - spades: '♠', - spadesuit: '♠', - spar: '∥', - sqcap: '⊓', - sqcaps: '⊓︀', - sqcup: '⊔', - sqcups: '⊔︀', - sqsub: '⊏', - sqsube: '⊑', - sqsubset: '⊏', - sqsubseteq: '⊑', - sqsup: '⊐', - sqsupe: '⊒', - sqsupset: '⊐', - sqsupseteq: '⊒', - squ: '□', - square: '□', - squarf: '▪', - squf: '▪', - srarr: '→', - sscr: '𝓈', - ssetmn: '∖', - ssmile: '⌣', - sstarf: '⋆', - star: '☆', - starf: '★', - straightepsilon: 'ϵ', - straightphi: 'ϕ', - strns: '¯', - sub: '⊂', - subE: '⫅', - subdot: '⪽', - sube: '⊆', - subedot: '⫃', - submult: '⫁', - subnE: '⫋', - subne: '⊊', - subplus: '⪿', - subrarr: '⥹', - subset: '⊂', - subseteq: '⊆', - subseteqq: '⫅', - subsetneq: '⊊', - subsetneqq: '⫋', - subsim: '⫇', - subsub: '⫕', - subsup: '⫓', - succ: '≻', - succapprox: '⪸', - succcurlyeq: '≽', - succeq: '⪰', - succnapprox: '⪺', - succneqq: '⪶', - succnsim: '⋩', - succsim: '≿', - sum: '∑', - sung: '♪', - sup1: '¹', - sup2: '²', - sup3: '³', - sup: '⊃', - supE: '⫆', - supdot: '⪾', - supdsub: '⫘', - supe: '⊇', - supedot: '⫄', - suphsol: '⟉', - suphsub: '⫗', - suplarr: '⥻', - supmult: '⫂', - supnE: '⫌', - supne: '⊋', - supplus: '⫀', - supset: '⊃', - supseteq: '⊇', - supseteqq: '⫆', - supsetneq: '⊋', - supsetneqq: '⫌', - supsim: '⫈', - supsub: '⫔', - supsup: '⫖', - swArr: '⇙', - swarhk: '⤦', - swarr: '↙', - swarrow: '↙', - swnwar: '⤪', - szlig: 'ß', - target: '⌖', - tau: 'τ', - tbrk: '⎴', - tcaron: 'ť', - tcedil: 'ţ', - tcy: 'т', - tdot: '⃛', - telrec: '⌕', - tfr: '𝔱', - there4: '∴', - therefore: '∴', - theta: 'θ', - thetasym: 'ϑ', - thetav: 'ϑ', - thickapprox: '≈', - thicksim: '∼', - thinsp: ' ', - thkap: '≈', - thksim: '∼', - thorn: 'þ', - tilde: '˜', - times: '×', - timesb: '⊠', - timesbar: '⨱', - timesd: '⨰', - tint: '∭', - toea: '⤨', - top: '⊤', - topbot: '⌶', - topcir: '⫱', - topf: '𝕥', - topfork: '⫚', - tosa: '⤩', - tprime: '‴', - trade: '™', - triangle: '▵', - triangledown: '▿', - triangleleft: '◃', - trianglelefteq: '⊴', - triangleq: '≜', - triangleright: '▹', - trianglerighteq: '⊵', - tridot: '◬', - trie: '≜', - triminus: '⨺', - triplus: '⨹', - trisb: '⧍', - tritime: '⨻', - trpezium: '⏢', - tscr: '𝓉', - tscy: 'ц', - tshcy: 'ћ', - tstrok: 'ŧ', - twixt: '≬', - twoheadleftarrow: '↞', - twoheadrightarrow: '↠', - uArr: '⇑', - uHar: '⥣', - uacute: 'ú', - uarr: '↑', - ubrcy: 'ў', - ubreve: 'ŭ', - ucirc: 'û', - ucy: 'у', - udarr: '⇅', - udblac: 'ű', - udhar: '⥮', - ufisht: '⥾', - ufr: '𝔲', - ugrave: 'ù', - uharl: '↿', - uharr: '↾', - uhblk: '▀', - ulcorn: '⌜', - ulcorner: '⌜', - ulcrop: '⌏', - ultri: '◸', - umacr: 'ū', - uml: '¨', - uogon: 'ų', - uopf: '𝕦', - uparrow: '↑', - updownarrow: '↕', - upharpoonleft: '↿', - upharpoonright: '↾', - uplus: '⊎', - upsi: 'υ', - upsih: 'ϒ', - upsilon: 'υ', - upuparrows: '⇈', - urcorn: '⌝', - urcorner: '⌝', - urcrop: '⌎', - uring: 'ů', - urtri: '◹', - uscr: '𝓊', - utdot: '⋰', - utilde: 'ũ', - utri: '▵', - utrif: '▴', - uuarr: '⇈', - uuml: 'ü', - uwangle: '⦧', - vArr: '⇕', - vBar: '⫨', - vBarv: '⫩', - vDash: '⊨', - vangrt: '⦜', - varepsilon: 'ϵ', - varkappa: 'ϰ', - varnothing: '∅', - varphi: 'ϕ', - varpi: 'ϖ', - varpropto: '∝', - varr: '↕', - varrho: 'ϱ', - varsigma: 'ς', - varsubsetneq: '⊊︀', - varsubsetneqq: '⫋︀', - varsupsetneq: '⊋︀', - varsupsetneqq: '⫌︀', - vartheta: 'ϑ', - vartriangleleft: '⊲', - vartriangleright: '⊳', - vcy: 'в', - vdash: '⊢', - vee: '∨', - veebar: '⊻', - veeeq: '≚', - vellip: '⋮', - verbar: '|', - vert: '|', - vfr: '𝔳', - vltri: '⊲', - vnsub: '⊂⃒', - vnsup: '⊃⃒', - vopf: '𝕧', - vprop: '∝', - vrtri: '⊳', - vscr: '𝓋', - vsubnE: '⫋︀', - vsubne: '⊊︀', - vsupnE: '⫌︀', - vsupne: '⊋︀', - vzigzag: '⦚', - wcirc: 'ŵ', - wedbar: '⩟', - wedge: '∧', - wedgeq: '≙', - weierp: '℘', - wfr: '𝔴', - wopf: '𝕨', - wp: '℘', - wr: '≀', - wreath: '≀', - wscr: '𝓌', - xcap: '⋂', - xcirc: '◯', - xcup: '⋃', - xdtri: '▽', - xfr: '𝔵', - xhArr: '⟺', - xharr: '⟷', - xi: 'ξ', - xlArr: '⟸', - xlarr: '⟵', - xmap: '⟼', - xnis: '⋻', - xodot: '⨀', - xopf: '𝕩', - xoplus: '⨁', - xotime: '⨂', - xrArr: '⟹', - xrarr: '⟶', - xscr: '𝓍', - xsqcup: '⨆', - xuplus: '⨄', - xutri: '△', - xvee: '⋁', - xwedge: '⋀', - yacute: 'ý', - yacy: 'я', - ycirc: 'ŷ', - ycy: 'ы', - yen: '¥', - yfr: '𝔶', - yicy: 'ї', - yopf: '𝕪', - yscr: '𝓎', - yucy: 'ю', - yuml: 'ÿ', - zacute: 'ź', - zcaron: 'ž', - zcy: 'з', - zdot: 'ż', - zeetrf: 'ℨ', - zeta: 'ζ', - zfr: '𝔷', - zhcy: 'ж', - zigrarr: '⇝', - zopf: '𝕫', - zscr: '𝓏', - zwj: '‍', - zwnj: '‌' -} - -;// CONCATENATED MODULE: ./node_modules/decode-named-character-reference/index.js - - -const own = {}.hasOwnProperty - -/** - * Decode a single character reference (without the `&` or `;`). - * You probably only need this when you’re building parsers yourself that follow - * different rules compared to HTML. - * This is optimized to be tiny in browsers. - * - * @param {string} value - * `notin` (named), `#123` (deci), `#x123` (hexa). - * @returns {string|false} - * Decoded reference. - */ -function decodeNamedCharacterReference(value) { - return own.call(characterEntities, value) ? characterEntities[value] : false -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/character-reference.js -/** - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const characterReference = { - name: 'characterReference', - tokenize: tokenizeCharacterReference -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeCharacterReference(effects, ok, nok) { - const self = this - let size = 0 - /** @type {number} */ - let max - /** @type {(code: Code) => boolean} */ - let test - return start - - /** - * Start of character reference. - * - * ```markdown - * > | a&b - * ^ - * > | a{b - * ^ - * > | a b - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter('characterReference') - effects.enter('characterReferenceMarker') - effects.consume(code) - effects.exit('characterReferenceMarker') - return open - } - - /** - * After `&`, at `#` for numeric references or alphanumeric for named - * references. - * - * ```markdown - * > | a&b - * ^ - * > | a{b - * ^ - * > | a b - * ^ - * ``` - * - * @type {State} - */ - function open(code) { - if (code === 35) { - effects.enter('characterReferenceMarkerNumeric') - effects.consume(code) - effects.exit('characterReferenceMarkerNumeric') - return numeric - } - effects.enter('characterReferenceValue') - max = 31 - test = asciiAlphanumeric - return value(code) - } - - /** - * After `#`, at `x` for hexadecimals or digit for decimals. - * - * ```markdown - * > | a{b - * ^ - * > | a b - * ^ - * ``` - * - * @type {State} - */ - function numeric(code) { - if (code === 88 || code === 120) { - effects.enter('characterReferenceMarkerHexadecimal') - effects.consume(code) - effects.exit('characterReferenceMarkerHexadecimal') - effects.enter('characterReferenceValue') - max = 6 - test = asciiHexDigit - return value - } - effects.enter('characterReferenceValue') - max = 7 - test = asciiDigit - return value(code) - } - - /** - * After markers (`&#x`, `&#`, or `&`), in value, before `;`. - * - * The character reference kind defines what and how many characters are - * allowed. - * - * ```markdown - * > | a&b - * ^^^ - * > | a{b - * ^^^ - * > | a b - * ^ - * ``` - * - * @type {State} - */ - function value(code) { - if (code === 59 && size) { - const token = effects.exit('characterReferenceValue') - if ( - test === asciiAlphanumeric && - !decodeNamedCharacterReference(self.sliceSerialize(token)) - ) { - return nok(code) - } - - // To do: `markdown-rs` uses a different name: - // `CharacterReferenceMarkerSemi`. - effects.enter('characterReferenceMarker') - effects.consume(code) - effects.exit('characterReferenceMarker') - effects.exit('characterReference') - return ok - } - if (test(code) && size++ < max) { - effects.consume(code) - return value - } - return nok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/character-escape.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - -/** @type {Construct} */ -const characterEscape = { - name: 'characterEscape', - tokenize: tokenizeCharacterEscape -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeCharacterEscape(effects, ok, nok) { - return start - - /** - * Start of character escape. - * - * ```markdown - * > | a\*b - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter('characterEscape') - effects.enter('escapeMarker') - effects.consume(code) - effects.exit('escapeMarker') - return inside - } - - /** - * After `\`, at punctuation. - * - * ```markdown - * > | a\*b - * ^ - * ``` - * - * @type {State} - */ - function inside(code) { - // ASCII punctuation. - if (asciiPunctuation(code)) { - effects.enter('characterEscapeValue') - effects.consume(code) - effects.exit('characterEscapeValue') - effects.exit('characterEscape') - return ok - } - return nok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/line-ending.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const lineEnding = { - name: 'lineEnding', - tokenize: tokenizeLineEnding -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeLineEnding(effects, ok) { - return start - - /** @type {State} */ - function start(code) { - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return factorySpace(effects, ok, 'linePrefix') - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/label-end.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').Event} Event - * @typedef {import('micromark-util-types').Resolver} Resolver - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').Token} Token - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - - - - - - - -/** @type {Construct} */ -const labelEnd = { - name: 'labelEnd', - tokenize: tokenizeLabelEnd, - resolveTo: resolveToLabelEnd, - resolveAll: resolveAllLabelEnd -} - -/** @type {Construct} */ -const resourceConstruct = { - tokenize: tokenizeResource -} -/** @type {Construct} */ -const referenceFullConstruct = { - tokenize: tokenizeReferenceFull -} -/** @type {Construct} */ -const referenceCollapsedConstruct = { - tokenize: tokenizeReferenceCollapsed -} - -/** @type {Resolver} */ -function resolveAllLabelEnd(events) { - let index = -1 - while (++index < events.length) { - const token = events[index][1] - if ( - token.type === 'labelImage' || - token.type === 'labelLink' || - token.type === 'labelEnd' - ) { - // Remove the marker. - events.splice(index + 1, token.type === 'labelImage' ? 4 : 2) - token.type = 'data' - index++ - } - } - return events -} - -/** @type {Resolver} */ -function resolveToLabelEnd(events, context) { - let index = events.length - let offset = 0 - /** @type {Token} */ - let token - /** @type {number | undefined} */ - let open - /** @type {number | undefined} */ - let close - /** @type {Array} */ - let media - - // Find an opening. - while (index--) { - token = events[index][1] - if (open) { - // If we see another link, or inactive link label, we’ve been here before. - if ( - token.type === 'link' || - (token.type === 'labelLink' && token._inactive) - ) { - break - } - - // Mark other link openings as inactive, as we can’t have links in - // links. - if (events[index][0] === 'enter' && token.type === 'labelLink') { - token._inactive = true - } - } else if (close) { - if ( - events[index][0] === 'enter' && - (token.type === 'labelImage' || token.type === 'labelLink') && - !token._balanced - ) { - open = index - if (token.type !== 'labelLink') { - offset = 2 - break - } - } - } else if (token.type === 'labelEnd') { - close = index - } - } - const group = { - type: events[open][1].type === 'labelLink' ? 'link' : 'image', - start: Object.assign({}, events[open][1].start), - end: Object.assign({}, events[events.length - 1][1].end) - } - const label = { - type: 'label', - start: Object.assign({}, events[open][1].start), - end: Object.assign({}, events[close][1].end) - } - const text = { - type: 'labelText', - start: Object.assign({}, events[open + offset + 2][1].end), - end: Object.assign({}, events[close - 2][1].start) - } - media = [ - ['enter', group, context], - ['enter', label, context] - ] - - // Opening marker. - media = push(media, events.slice(open + 1, open + offset + 3)) - - // Text open. - media = push(media, [['enter', text, context]]) - - // Always populated by defaults. - - // Between. - media = push( - media, - resolveAll( - context.parser.constructs.insideSpan.null, - events.slice(open + offset + 4, close - 3), - context - ) - ) - - // Text close, marker close, label close. - media = push(media, [ - ['exit', text, context], - events[close - 2], - events[close - 1], - ['exit', label, context] - ]) - - // Reference, resource, or so. - media = push(media, events.slice(close + 1)) - - // Media close. - media = push(media, [['exit', group, context]]) - splice(events, open, events.length, media) - return events -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeLabelEnd(effects, ok, nok) { - const self = this - let index = self.events.length - /** @type {Token} */ - let labelStart - /** @type {boolean} */ - let defined - - // Find an opening. - while (index--) { - if ( - (self.events[index][1].type === 'labelImage' || - self.events[index][1].type === 'labelLink') && - !self.events[index][1]._balanced - ) { - labelStart = self.events[index][1] - break - } - } - return start - - /** - * Start of label end. - * - * ```markdown - * > | [a](b) c - * ^ - * > | [a][b] c - * ^ - * > | [a][] b - * ^ - * > | [a] b - * ``` - * - * @type {State} - */ - function start(code) { - // If there is not an okay opening. - if (!labelStart) { - return nok(code) - } - - // If the corresponding label (link) start is marked as inactive, - // it means we’d be wrapping a link, like this: - // - // ```markdown - // > | a [b [c](d) e](f) g. - // ^ - // ``` - // - // We can’t have that, so it’s just balanced brackets. - if (labelStart._inactive) { - return labelEndNok(code) - } - defined = self.parser.defined.includes( - normalizeIdentifier( - self.sliceSerialize({ - start: labelStart.end, - end: self.now() - }) - ) - ) - effects.enter('labelEnd') - effects.enter('labelMarker') - effects.consume(code) - effects.exit('labelMarker') - effects.exit('labelEnd') - return after - } - - /** - * After `]`. - * - * ```markdown - * > | [a](b) c - * ^ - * > | [a][b] c - * ^ - * > | [a][] b - * ^ - * > | [a] b - * ^ - * ``` - * - * @type {State} - */ - function after(code) { - // Note: `markdown-rs` also parses GFM footnotes here, which for us is in - // an extension. - - // Resource (`[asd](fgh)`)? - if (code === 40) { - return effects.attempt( - resourceConstruct, - labelEndOk, - defined ? labelEndOk : labelEndNok - )(code) - } - - // Full (`[asd][fgh]`) or collapsed (`[asd][]`) reference? - if (code === 91) { - return effects.attempt( - referenceFullConstruct, - labelEndOk, - defined ? referenceNotFull : labelEndNok - )(code) - } - - // Shortcut (`[asd]`) reference? - return defined ? labelEndOk(code) : labelEndNok(code) - } - - /** - * After `]`, at `[`, but not at a full reference. - * - * > 👉 **Note**: we only get here if the label is defined. - * - * ```markdown - * > | [a][] b - * ^ - * > | [a] b - * ^ - * ``` - * - * @type {State} - */ - function referenceNotFull(code) { - return effects.attempt( - referenceCollapsedConstruct, - labelEndOk, - labelEndNok - )(code) - } - - /** - * Done, we found something. - * - * ```markdown - * > | [a](b) c - * ^ - * > | [a][b] c - * ^ - * > | [a][] b - * ^ - * > | [a] b - * ^ - * ``` - * - * @type {State} - */ - function labelEndOk(code) { - // Note: `markdown-rs` does a bunch of stuff here. - return ok(code) - } - - /** - * Done, it’s nothing. - * - * There was an okay opening, but we didn’t match anything. - * - * ```markdown - * > | [a](b c - * ^ - * > | [a][b c - * ^ - * > | [a] b - * ^ - * ``` - * - * @type {State} - */ - function labelEndNok(code) { - labelStart._balanced = true - return nok(code) - } -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeResource(effects, ok, nok) { - return resourceStart - - /** - * At a resource. - * - * ```markdown - * > | [a](b) c - * ^ - * ``` - * - * @type {State} - */ - function resourceStart(code) { - effects.enter('resource') - effects.enter('resourceMarker') - effects.consume(code) - effects.exit('resourceMarker') - return resourceBefore - } - - /** - * In resource, after `(`, at optional whitespace. - * - * ```markdown - * > | [a](b) c - * ^ - * ``` - * - * @type {State} - */ - function resourceBefore(code) { - return markdownLineEndingOrSpace(code) - ? factoryWhitespace(effects, resourceOpen)(code) - : resourceOpen(code) - } - - /** - * In resource, after optional whitespace, at `)` or a destination. - * - * ```markdown - * > | [a](b) c - * ^ - * ``` - * - * @type {State} - */ - function resourceOpen(code) { - if (code === 41) { - return resourceEnd(code) - } - return factoryDestination( - effects, - resourceDestinationAfter, - resourceDestinationMissing, - 'resourceDestination', - 'resourceDestinationLiteral', - 'resourceDestinationLiteralMarker', - 'resourceDestinationRaw', - 'resourceDestinationString', - 32 - )(code) - } - - /** - * In resource, after destination, at optional whitespace. - * - * ```markdown - * > | [a](b) c - * ^ - * ``` - * - * @type {State} - */ - function resourceDestinationAfter(code) { - return markdownLineEndingOrSpace(code) - ? factoryWhitespace(effects, resourceBetween)(code) - : resourceEnd(code) - } - - /** - * At invalid destination. - * - * ```markdown - * > | [a](<<) b - * ^ - * ``` - * - * @type {State} - */ - function resourceDestinationMissing(code) { - return nok(code) - } - - /** - * In resource, after destination and whitespace, at `(` or title. - * - * ```markdown - * > | [a](b ) c - * ^ - * ``` - * - * @type {State} - */ - function resourceBetween(code) { - if (code === 34 || code === 39 || code === 40) { - return factoryTitle( - effects, - resourceTitleAfter, - nok, - 'resourceTitle', - 'resourceTitleMarker', - 'resourceTitleString' - )(code) - } - return resourceEnd(code) - } - - /** - * In resource, after title, at optional whitespace. - * - * ```markdown - * > | [a](b "c") d - * ^ - * ``` - * - * @type {State} - */ - function resourceTitleAfter(code) { - return markdownLineEndingOrSpace(code) - ? factoryWhitespace(effects, resourceEnd)(code) - : resourceEnd(code) - } - - /** - * In resource, at `)`. - * - * ```markdown - * > | [a](b) d - * ^ - * ``` - * - * @type {State} - */ - function resourceEnd(code) { - if (code === 41) { - effects.enter('resourceMarker') - effects.consume(code) - effects.exit('resourceMarker') - effects.exit('resource') - return ok - } - return nok(code) - } -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeReferenceFull(effects, ok, nok) { - const self = this - return referenceFull - - /** - * In a reference (full), at the `[`. - * - * ```markdown - * > | [a][b] d - * ^ - * ``` - * - * @type {State} - */ - function referenceFull(code) { - return factoryLabel.call( - self, - effects, - referenceFullAfter, - referenceFullMissing, - 'reference', - 'referenceMarker', - 'referenceString' - )(code) - } - - /** - * In a reference (full), after `]`. - * - * ```markdown - * > | [a][b] d - * ^ - * ``` - * - * @type {State} - */ - function referenceFullAfter(code) { - return self.parser.defined.includes( - normalizeIdentifier( - self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1) - ) - ) - ? ok(code) - : nok(code) - } - - /** - * In reference (full) that was missing. - * - * ```markdown - * > | [a][b d - * ^ - * ``` - * - * @type {State} - */ - function referenceFullMissing(code) { - return nok(code) - } -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeReferenceCollapsed(effects, ok, nok) { - return referenceCollapsedStart - - /** - * In reference (collapsed), at `[`. - * - * > 👉 **Note**: we only get here if the label is defined. - * - * ```markdown - * > | [a][] d - * ^ - * ``` - * - * @type {State} - */ - function referenceCollapsedStart(code) { - // We only attempt a collapsed label if there’s a `[`. - - effects.enter('reference') - effects.enter('referenceMarker') - effects.consume(code) - effects.exit('referenceMarker') - return referenceCollapsedOpen - } - - /** - * In reference (collapsed), at `]`. - * - * > 👉 **Note**: we only get here if the label is defined. - * - * ```markdown - * > | [a][] d - * ^ - * ``` - * - * @type {State} - */ - function referenceCollapsedOpen(code) { - if (code === 93) { - effects.enter('referenceMarker') - effects.consume(code) - effects.exit('referenceMarker') - effects.exit('reference') - return ok - } - return nok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/label-start-image.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const labelStartImage = { - name: 'labelStartImage', - tokenize: tokenizeLabelStartImage, - resolveAll: labelEnd.resolveAll -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeLabelStartImage(effects, ok, nok) { - const self = this - return start - - /** - * Start of label (image) start. - * - * ```markdown - * > | a ![b] c - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter('labelImage') - effects.enter('labelImageMarker') - effects.consume(code) - effects.exit('labelImageMarker') - return open - } - - /** - * After `!`, at `[`. - * - * ```markdown - * > | a ![b] c - * ^ - * ``` - * - * @type {State} - */ - function open(code) { - if (code === 91) { - effects.enter('labelMarker') - effects.consume(code) - effects.exit('labelMarker') - effects.exit('labelImage') - return after - } - return nok(code) - } - - /** - * After `![`. - * - * ```markdown - * > | a ![b] c - * ^ - * ``` - * - * This is needed in because, when GFM footnotes are enabled, images never - * form when started with a `^`. - * Instead, links form: - * - * ```markdown - * ![^a](b) - * - * ![^a][b] - * - * [b]: c - * ``` - * - * ```html - *

    !^a

    - *

    !^a

    - * ``` - * - * @type {State} - */ - function after(code) { - // To do: use a new field to do this, this is still needed for - // `micromark-extension-gfm-footnote`, but the `label-start-link` - // behavior isn’t. - // Hidden footnotes hook. - /* c8 ignore next 3 */ - return code === 94 && '_hiddenFootnoteSupport' in self.parser.constructs - ? nok(code) - : ok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-classify-character/index.js -/** - * @typedef {import('micromark-util-types').Code} Code - */ - - -/** - * Classify whether a code represents whitespace, punctuation, or something - * else. - * - * Used for attention (emphasis, strong), whose sequences can open or close - * based on the class of surrounding characters. - * - * > 👉 **Note**: eof (`null`) is seen as whitespace. - * - * @param {Code} code - * Code. - * @returns {typeof constants.characterGroupWhitespace | typeof constants.characterGroupPunctuation | undefined} - * Group. - */ -function classifyCharacter(code) { - if ( - code === null || - markdownLineEndingOrSpace(code) || - unicodeWhitespace(code) - ) { - return 1 - } - if (unicodePunctuation(code)) { - return 2 - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/attention.js -/** - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').Event} Event - * @typedef {import('micromark-util-types').Point} Point - * @typedef {import('micromark-util-types').Resolver} Resolver - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').Token} Token - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - - -/** @type {Construct} */ -const attention = { - name: 'attention', - tokenize: tokenizeAttention, - resolveAll: resolveAllAttention -} - -/** - * Take all events and resolve attention to emphasis or strong. - * - * @type {Resolver} - */ -function resolveAllAttention(events, context) { - let index = -1 - /** @type {number} */ - let open - /** @type {Token} */ - let group - /** @type {Token} */ - let text - /** @type {Token} */ - let openingSequence - /** @type {Token} */ - let closingSequence - /** @type {number} */ - let use - /** @type {Array} */ - let nextEvents - /** @type {number} */ - let offset - - // Walk through all events. - // - // Note: performance of this is fine on an mb of normal markdown, but it’s - // a bottleneck for malicious stuff. - while (++index < events.length) { - // Find a token that can close. - if ( - events[index][0] === 'enter' && - events[index][1].type === 'attentionSequence' && - events[index][1]._close - ) { - open = index - - // Now walk back to find an opener. - while (open--) { - // Find a token that can open the closer. - if ( - events[open][0] === 'exit' && - events[open][1].type === 'attentionSequence' && - events[open][1]._open && - // If the markers are the same: - context.sliceSerialize(events[open][1]).charCodeAt(0) === - context.sliceSerialize(events[index][1]).charCodeAt(0) - ) { - // If the opening can close or the closing can open, - // and the close size *is not* a multiple of three, - // but the sum of the opening and closing size *is* multiple of three, - // then don’t match. - if ( - (events[open][1]._close || events[index][1]._open) && - (events[index][1].end.offset - events[index][1].start.offset) % 3 && - !( - (events[open][1].end.offset - - events[open][1].start.offset + - events[index][1].end.offset - - events[index][1].start.offset) % - 3 - ) - ) { - continue - } - - // Number of markers to use from the sequence. - use = - events[open][1].end.offset - events[open][1].start.offset > 1 && - events[index][1].end.offset - events[index][1].start.offset > 1 - ? 2 - : 1 - const start = Object.assign({}, events[open][1].end) - const end = Object.assign({}, events[index][1].start) - movePoint(start, -use) - movePoint(end, use) - openingSequence = { - type: use > 1 ? 'strongSequence' : 'emphasisSequence', - start, - end: Object.assign({}, events[open][1].end) - } - closingSequence = { - type: use > 1 ? 'strongSequence' : 'emphasisSequence', - start: Object.assign({}, events[index][1].start), - end - } - text = { - type: use > 1 ? 'strongText' : 'emphasisText', - start: Object.assign({}, events[open][1].end), - end: Object.assign({}, events[index][1].start) - } - group = { - type: use > 1 ? 'strong' : 'emphasis', - start: Object.assign({}, openingSequence.start), - end: Object.assign({}, closingSequence.end) - } - events[open][1].end = Object.assign({}, openingSequence.start) - events[index][1].start = Object.assign({}, closingSequence.end) - nextEvents = [] - - // If there are more markers in the opening, add them before. - if (events[open][1].end.offset - events[open][1].start.offset) { - nextEvents = push(nextEvents, [ - ['enter', events[open][1], context], - ['exit', events[open][1], context] - ]) - } - - // Opening. - nextEvents = push(nextEvents, [ - ['enter', group, context], - ['enter', openingSequence, context], - ['exit', openingSequence, context], - ['enter', text, context] - ]) - - // Always populated by defaults. - - // Between. - nextEvents = push( - nextEvents, - resolveAll( - context.parser.constructs.insideSpan.null, - events.slice(open + 1, index), - context - ) - ) - - // Closing. - nextEvents = push(nextEvents, [ - ['exit', text, context], - ['enter', closingSequence, context], - ['exit', closingSequence, context], - ['exit', group, context] - ]) - - // If there are more markers in the closing, add them after. - if (events[index][1].end.offset - events[index][1].start.offset) { - offset = 2 - nextEvents = push(nextEvents, [ - ['enter', events[index][1], context], - ['exit', events[index][1], context] - ]) - } else { - offset = 0 - } - splice(events, open - 1, index - open + 3, nextEvents) - index = open + nextEvents.length - offset - 2 - break - } - } - } - } - - // Remove remaining sequences. - index = -1 - while (++index < events.length) { - if (events[index][1].type === 'attentionSequence') { - events[index][1].type = 'data' - } - } - return events -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeAttention(effects, ok) { - const attentionMarkers = this.parser.constructs.attentionMarkers.null - const previous = this.previous - const before = classifyCharacter(previous) - - /** @type {NonNullable} */ - let marker - return start - - /** - * Before a sequence. - * - * ```markdown - * > | ** - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - marker = code - effects.enter('attentionSequence') - return inside(code) - } - - /** - * In a sequence. - * - * ```markdown - * > | ** - * ^^ - * ``` - * - * @type {State} - */ - function inside(code) { - if (code === marker) { - effects.consume(code) - return inside - } - const token = effects.exit('attentionSequence') - - // To do: next major: move this to resolver, just like `markdown-rs`. - const after = classifyCharacter(code) - - // Always populated by defaults. - - const open = - !after || (after === 2 && before) || attentionMarkers.includes(code) - const close = - !before || (before === 2 && after) || attentionMarkers.includes(previous) - token._open = Boolean(marker === 42 ? open : open && (before || !close)) - token._close = Boolean(marker === 42 ? close : close && (after || !open)) - return ok(code) - } -} - -/** - * Move a point a bit. - * - * Note: `move` only works inside lines! It’s not possible to move past other - * chunks (replacement characters, tabs, or line endings). - * - * @param {Point} point - * @param {number} offset - * @returns {void} - */ -function movePoint(point, offset) { - point.column += offset - point.offset += offset - point._bufferIndex += offset -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/autolink.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - -/** @type {Construct} */ -const autolink = { - name: 'autolink', - tokenize: tokenizeAutolink -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeAutolink(effects, ok, nok) { - let size = 0 - return start - - /** - * Start of an autolink. - * - * ```markdown - * > | ab - * ^ - * > | ab - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter('autolink') - effects.enter('autolinkMarker') - effects.consume(code) - effects.exit('autolinkMarker') - effects.enter('autolinkProtocol') - return open - } - - /** - * After `<`, at protocol or atext. - * - * ```markdown - * > | ab - * ^ - * > | ab - * ^ - * ``` - * - * @type {State} - */ - function open(code) { - if (asciiAlpha(code)) { - effects.consume(code) - return schemeOrEmailAtext - } - return emailAtext(code) - } - - /** - * At second byte of protocol or atext. - * - * ```markdown - * > | ab - * ^ - * > | ab - * ^ - * ``` - * - * @type {State} - */ - function schemeOrEmailAtext(code) { - // ASCII alphanumeric and `+`, `-`, and `.`. - if (code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code)) { - // Count the previous alphabetical from `open` too. - size = 1 - return schemeInsideOrEmailAtext(code) - } - return emailAtext(code) - } - - /** - * In ambiguous protocol or atext. - * - * ```markdown - * > | ab - * ^ - * > | ab - * ^ - * ``` - * - * @type {State} - */ - function schemeInsideOrEmailAtext(code) { - if (code === 58) { - effects.consume(code) - size = 0 - return urlInside - } - - // ASCII alphanumeric and `+`, `-`, and `.`. - if ( - (code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code)) && - size++ < 32 - ) { - effects.consume(code) - return schemeInsideOrEmailAtext - } - size = 0 - return emailAtext(code) - } - - /** - * After protocol, in URL. - * - * ```markdown - * > | ab - * ^ - * ``` - * - * @type {State} - */ - function urlInside(code) { - if (code === 62) { - effects.exit('autolinkProtocol') - effects.enter('autolinkMarker') - effects.consume(code) - effects.exit('autolinkMarker') - effects.exit('autolink') - return ok - } - - // ASCII control, space, or `<`. - if (code === null || code === 32 || code === 60 || asciiControl(code)) { - return nok(code) - } - effects.consume(code) - return urlInside - } - - /** - * In email atext. - * - * ```markdown - * > | ab - * ^ - * ``` - * - * @type {State} - */ - function emailAtext(code) { - if (code === 64) { - effects.consume(code) - return emailAtSignOrDot - } - if (asciiAtext(code)) { - effects.consume(code) - return emailAtext - } - return nok(code) - } - - /** - * In label, after at-sign or dot. - * - * ```markdown - * > | ab - * ^ ^ - * ``` - * - * @type {State} - */ - function emailAtSignOrDot(code) { - return asciiAlphanumeric(code) ? emailLabel(code) : nok(code) - } - - /** - * In label, where `.` and `>` are allowed. - * - * ```markdown - * > | ab - * ^ - * ``` - * - * @type {State} - */ - function emailLabel(code) { - if (code === 46) { - effects.consume(code) - size = 0 - return emailAtSignOrDot - } - if (code === 62) { - // Exit, then change the token type. - effects.exit('autolinkProtocol').type = 'autolinkEmail' - effects.enter('autolinkMarker') - effects.consume(code) - effects.exit('autolinkMarker') - effects.exit('autolink') - return ok - } - return emailValue(code) - } - - /** - * In label, where `.` and `>` are *not* allowed. - * - * Though, this is also used in `emailLabel` to parse other values. - * - * ```markdown - * > | ab - * ^ - * ``` - * - * @type {State} - */ - function emailValue(code) { - // ASCII alphanumeric or `-`. - if ((code === 45 || asciiAlphanumeric(code)) && size++ < 63) { - const next = code === 45 ? emailValue : emailLabel - effects.consume(code) - return next - } - return nok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/html-text.js -/** - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const htmlText = { - name: 'htmlText', - tokenize: tokenizeHtmlText -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeHtmlText(effects, ok, nok) { - const self = this - /** @type {NonNullable | undefined} */ - let marker - /** @type {number} */ - let index - /** @type {State} */ - let returnState - return start - - /** - * Start of HTML (text). - * - * ```markdown - * > | a c - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter('htmlText') - effects.enter('htmlTextData') - effects.consume(code) - return open - } - - /** - * After `<`, at tag name or other stuff. - * - * ```markdown - * > | a c - * ^ - * > | a c - * ^ - * > | a c - * ^ - * ``` - * - * @type {State} - */ - function open(code) { - if (code === 33) { - effects.consume(code) - return declarationOpen - } - if (code === 47) { - effects.consume(code) - return tagCloseStart - } - if (code === 63) { - effects.consume(code) - return instruction - } - - // ASCII alphabetical. - if (asciiAlpha(code)) { - effects.consume(code) - return tagOpen - } - return nok(code) - } - - /** - * After ` | a c - * ^ - * > | a c - * ^ - * > | a &<]]> c - * ^ - * ``` - * - * @type {State} - */ - function declarationOpen(code) { - if (code === 45) { - effects.consume(code) - return commentOpenInside - } - if (code === 91) { - effects.consume(code) - index = 0 - return cdataOpenInside - } - if (asciiAlpha(code)) { - effects.consume(code) - return declaration - } - return nok(code) - } - - /** - * In a comment, after ` | a c - * ^ - * ``` - * - * @type {State} - */ - function commentOpenInside(code) { - if (code === 45) { - effects.consume(code) - return commentEnd - } - return nok(code) - } - - /** - * In comment. - * - * ```markdown - * > | a c - * ^ - * ``` - * - * @type {State} - */ - function comment(code) { - if (code === null) { - return nok(code) - } - if (code === 45) { - effects.consume(code) - return commentClose - } - if (markdownLineEnding(code)) { - returnState = comment - return lineEndingBefore(code) - } - effects.consume(code) - return comment - } - - /** - * In comment, after `-`. - * - * ```markdown - * > | a c - * ^ - * ``` - * - * @type {State} - */ - function commentClose(code) { - if (code === 45) { - effects.consume(code) - return commentEnd - } - return comment(code) - } - - /** - * In comment, after `--`. - * - * ```markdown - * > | a c - * ^ - * ``` - * - * @type {State} - */ - function commentEnd(code) { - return code === 62 - ? end(code) - : code === 45 - ? commentClose(code) - : comment(code) - } - - /** - * After ` | a &<]]> b - * ^^^^^^ - * ``` - * - * @type {State} - */ - function cdataOpenInside(code) { - const value = 'CDATA[' - if (code === value.charCodeAt(index++)) { - effects.consume(code) - return index === value.length ? cdata : cdataOpenInside - } - return nok(code) - } - - /** - * In CDATA. - * - * ```markdown - * > | a &<]]> b - * ^^^ - * ``` - * - * @type {State} - */ - function cdata(code) { - if (code === null) { - return nok(code) - } - if (code === 93) { - effects.consume(code) - return cdataClose - } - if (markdownLineEnding(code)) { - returnState = cdata - return lineEndingBefore(code) - } - effects.consume(code) - return cdata - } - - /** - * In CDATA, after `]`, at another `]`. - * - * ```markdown - * > | a &<]]> b - * ^ - * ``` - * - * @type {State} - */ - function cdataClose(code) { - if (code === 93) { - effects.consume(code) - return cdataEnd - } - return cdata(code) - } - - /** - * In CDATA, after `]]`, at `>`. - * - * ```markdown - * > | a &<]]> b - * ^ - * ``` - * - * @type {State} - */ - function cdataEnd(code) { - if (code === 62) { - return end(code) - } - if (code === 93) { - effects.consume(code) - return cdataEnd - } - return cdata(code) - } - - /** - * In declaration. - * - * ```markdown - * > | a c - * ^ - * ``` - * - * @type {State} - */ - function declaration(code) { - if (code === null || code === 62) { - return end(code) - } - if (markdownLineEnding(code)) { - returnState = declaration - return lineEndingBefore(code) - } - effects.consume(code) - return declaration - } - - /** - * In instruction. - * - * ```markdown - * > | a c - * ^ - * ``` - * - * @type {State} - */ - function instruction(code) { - if (code === null) { - return nok(code) - } - if (code === 63) { - effects.consume(code) - return instructionClose - } - if (markdownLineEnding(code)) { - returnState = instruction - return lineEndingBefore(code) - } - effects.consume(code) - return instruction - } - - /** - * In instruction, after `?`, at `>`. - * - * ```markdown - * > | a c - * ^ - * ``` - * - * @type {State} - */ - function instructionClose(code) { - return code === 62 ? end(code) : instruction(code) - } - - /** - * After ` | a c - * ^ - * ``` - * - * @type {State} - */ - function tagCloseStart(code) { - // ASCII alphabetical. - if (asciiAlpha(code)) { - effects.consume(code) - return tagClose - } - return nok(code) - } - - /** - * After ` | a c - * ^ - * ``` - * - * @type {State} - */ - function tagClose(code) { - // ASCII alphanumerical and `-`. - if (code === 45 || asciiAlphanumeric(code)) { - effects.consume(code) - return tagClose - } - return tagCloseBetween(code) - } - - /** - * In closing tag, after tag name. - * - * ```markdown - * > | a
    c - * ^ - * ``` - * - * @type {State} - */ - function tagCloseBetween(code) { - if (markdownLineEnding(code)) { - returnState = tagCloseBetween - return lineEndingBefore(code) - } - if (markdownSpace(code)) { - effects.consume(code) - return tagCloseBetween - } - return end(code) - } - - /** - * After ` | a c - * ^ - * ``` - * - * @type {State} - */ - function tagOpen(code) { - // ASCII alphanumerical and `-`. - if (code === 45 || asciiAlphanumeric(code)) { - effects.consume(code) - return tagOpen - } - if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) { - return tagOpenBetween(code) - } - return nok(code) - } - - /** - * In opening tag, after tag name. - * - * ```markdown - * > | a c - * ^ - * ``` - * - * @type {State} - */ - function tagOpenBetween(code) { - if (code === 47) { - effects.consume(code) - return end - } - - // ASCII alphabetical and `:` and `_`. - if (code === 58 || code === 95 || asciiAlpha(code)) { - effects.consume(code) - return tagOpenAttributeName - } - if (markdownLineEnding(code)) { - returnState = tagOpenBetween - return lineEndingBefore(code) - } - if (markdownSpace(code)) { - effects.consume(code) - return tagOpenBetween - } - return end(code) - } - - /** - * In attribute name. - * - * ```markdown - * > | a d - * ^ - * ``` - * - * @type {State} - */ - function tagOpenAttributeName(code) { - // ASCII alphabetical and `-`, `.`, `:`, and `_`. - if ( - code === 45 || - code === 46 || - code === 58 || - code === 95 || - asciiAlphanumeric(code) - ) { - effects.consume(code) - return tagOpenAttributeName - } - return tagOpenAttributeNameAfter(code) - } - - /** - * After attribute name, before initializer, the end of the tag, or - * whitespace. - * - * ```markdown - * > | a d - * ^ - * ``` - * - * @type {State} - */ - function tagOpenAttributeNameAfter(code) { - if (code === 61) { - effects.consume(code) - return tagOpenAttributeValueBefore - } - if (markdownLineEnding(code)) { - returnState = tagOpenAttributeNameAfter - return lineEndingBefore(code) - } - if (markdownSpace(code)) { - effects.consume(code) - return tagOpenAttributeNameAfter - } - return tagOpenBetween(code) - } - - /** - * Before unquoted, double quoted, or single quoted attribute value, allowing - * whitespace. - * - * ```markdown - * > | a e - * ^ - * ``` - * - * @type {State} - */ - function tagOpenAttributeValueBefore(code) { - if ( - code === null || - code === 60 || - code === 61 || - code === 62 || - code === 96 - ) { - return nok(code) - } - if (code === 34 || code === 39) { - effects.consume(code) - marker = code - return tagOpenAttributeValueQuoted - } - if (markdownLineEnding(code)) { - returnState = tagOpenAttributeValueBefore - return lineEndingBefore(code) - } - if (markdownSpace(code)) { - effects.consume(code) - return tagOpenAttributeValueBefore - } - effects.consume(code) - return tagOpenAttributeValueUnquoted - } - - /** - * In double or single quoted attribute value. - * - * ```markdown - * > | a e - * ^ - * ``` - * - * @type {State} - */ - function tagOpenAttributeValueQuoted(code) { - if (code === marker) { - effects.consume(code) - marker = undefined - return tagOpenAttributeValueQuotedAfter - } - if (code === null) { - return nok(code) - } - if (markdownLineEnding(code)) { - returnState = tagOpenAttributeValueQuoted - return lineEndingBefore(code) - } - effects.consume(code) - return tagOpenAttributeValueQuoted - } - - /** - * In unquoted attribute value. - * - * ```markdown - * > | a e - * ^ - * ``` - * - * @type {State} - */ - function tagOpenAttributeValueUnquoted(code) { - if ( - code === null || - code === 34 || - code === 39 || - code === 60 || - code === 61 || - code === 96 - ) { - return nok(code) - } - if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) { - return tagOpenBetween(code) - } - effects.consume(code) - return tagOpenAttributeValueUnquoted - } - - /** - * After double or single quoted attribute value, before whitespace or the end - * of the tag. - * - * ```markdown - * > | a e - * ^ - * ``` - * - * @type {State} - */ - function tagOpenAttributeValueQuotedAfter(code) { - if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) { - return tagOpenBetween(code) - } - return nok(code) - } - - /** - * In certain circumstances of a tag where only an `>` is allowed. - * - * ```markdown - * > | a e - * ^ - * ``` - * - * @type {State} - */ - function end(code) { - if (code === 62) { - effects.consume(code) - effects.exit('htmlTextData') - effects.exit('htmlText') - return ok - } - return nok(code) - } - - /** - * At eol. - * - * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about - * > empty tokens. - * - * ```markdown - * > | a - * ``` - * - * @type {State} - */ - function lineEndingBefore(code) { - effects.exit('htmlTextData') - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return lineEndingAfter - } - - /** - * After eol, at optional whitespace. - * - * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about - * > empty tokens. - * - * ```markdown - * | a - * ^ - * ``` - * - * @type {State} - */ - function lineEndingAfter(code) { - // Always populated by defaults. - - return markdownSpace(code) - ? factorySpace( - effects, - lineEndingAfterPrefix, - 'linePrefix', - self.parser.constructs.disable.null.includes('codeIndented') - ? undefined - : 4 - )(code) - : lineEndingAfterPrefix(code) - } - - /** - * After eol, after optional whitespace. - * - * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about - * > empty tokens. - * - * ```markdown - * | a - * ^ - * ``` - * - * @type {State} - */ - function lineEndingAfterPrefix(code) { - effects.enter('htmlTextData') - return returnState(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/label-start-link.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const labelStartLink = { - name: 'labelStartLink', - tokenize: tokenizeLabelStartLink, - resolveAll: labelEnd.resolveAll -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeLabelStartLink(effects, ok, nok) { - const self = this - return start - - /** - * Start of label (link) start. - * - * ```markdown - * > | a [b] c - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter('labelLink') - effects.enter('labelMarker') - effects.consume(code) - effects.exit('labelMarker') - effects.exit('labelLink') - return after - } - - /** @type {State} */ - function after(code) { - // To do: this isn’t needed in `micromark-extension-gfm-footnote`, - // remove. - // Hidden footnotes hook. - /* c8 ignore next 3 */ - return code === 94 && '_hiddenFootnoteSupport' in self.parser.constructs - ? nok(code) - : ok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/hard-break-escape.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - -/** @type {Construct} */ -const hardBreakEscape = { - name: 'hardBreakEscape', - tokenize: tokenizeHardBreakEscape -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeHardBreakEscape(effects, ok, nok) { - return start - - /** - * Start of a hard break (escape). - * - * ```markdown - * > | a\ - * ^ - * | b - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter('hardBreakEscape') - effects.consume(code) - return after - } - - /** - * After `\`, at eol. - * - * ```markdown - * > | a\ - * ^ - * | b - * ``` - * - * @type {State} - */ - function after(code) { - if (markdownLineEnding(code)) { - effects.exit('hardBreakEscape') - return ok(code) - } - return nok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/code-text.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').Previous} Previous - * @typedef {import('micromark-util-types').Resolver} Resolver - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').Token} Token - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - -/** @type {Construct} */ -const codeText = { - name: 'codeText', - tokenize: tokenizeCodeText, - resolve: resolveCodeText, - previous -} - -// To do: next major: don’t resolve, like `markdown-rs`. -/** @type {Resolver} */ -function resolveCodeText(events) { - let tailExitIndex = events.length - 4 - let headEnterIndex = 3 - /** @type {number} */ - let index - /** @type {number | undefined} */ - let enter - - // If we start and end with an EOL or a space. - if ( - (events[headEnterIndex][1].type === 'lineEnding' || - events[headEnterIndex][1].type === 'space') && - (events[tailExitIndex][1].type === 'lineEnding' || - events[tailExitIndex][1].type === 'space') - ) { - index = headEnterIndex - - // And we have data. - while (++index < tailExitIndex) { - if (events[index][1].type === 'codeTextData') { - // Then we have padding. - events[headEnterIndex][1].type = 'codeTextPadding' - events[tailExitIndex][1].type = 'codeTextPadding' - headEnterIndex += 2 - tailExitIndex -= 2 - break - } - } - } - - // Merge adjacent spaces and data. - index = headEnterIndex - 1 - tailExitIndex++ - while (++index <= tailExitIndex) { - if (enter === undefined) { - if (index !== tailExitIndex && events[index][1].type !== 'lineEnding') { - enter = index - } - } else if ( - index === tailExitIndex || - events[index][1].type === 'lineEnding' - ) { - events[enter][1].type = 'codeTextData' - if (index !== enter + 2) { - events[enter][1].end = events[index - 1][1].end - events.splice(enter + 2, index - enter - 2) - tailExitIndex -= index - enter - 2 - index = enter + 2 - } - enter = undefined - } - } - return events -} - -/** - * @this {TokenizeContext} - * @type {Previous} - */ -function previous(code) { - // If there is a previous code, there will always be a tail. - return ( - code !== 96 || - this.events[this.events.length - 1][1].type === 'characterEscape' - ) -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeCodeText(effects, ok, nok) { - const self = this - let sizeOpen = 0 - /** @type {number} */ - let size - /** @type {Token} */ - let token - return start - - /** - * Start of code (text). - * - * ```markdown - * > | `a` - * ^ - * > | \`a` - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter('codeText') - effects.enter('codeTextSequence') - return sequenceOpen(code) - } - - /** - * In opening sequence. - * - * ```markdown - * > | `a` - * ^ - * ``` - * - * @type {State} - */ - function sequenceOpen(code) { - if (code === 96) { - effects.consume(code) - sizeOpen++ - return sequenceOpen - } - effects.exit('codeTextSequence') - return between(code) - } - - /** - * Between something and something else. - * - * ```markdown - * > | `a` - * ^^ - * ``` - * - * @type {State} - */ - function between(code) { - // EOF. - if (code === null) { - return nok(code) - } - - // To do: next major: don’t do spaces in resolve, but when compiling, - // like `markdown-rs`. - // Tabs don’t work, and virtual spaces don’t make sense. - if (code === 32) { - effects.enter('space') - effects.consume(code) - effects.exit('space') - return between - } - - // Closing fence? Could also be data. - if (code === 96) { - token = effects.enter('codeTextSequence') - size = 0 - return sequenceClose(code) - } - if (markdownLineEnding(code)) { - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return between - } - - // Data. - effects.enter('codeTextData') - return data(code) - } - - /** - * In data. - * - * ```markdown - * > | `a` - * ^ - * ``` - * - * @type {State} - */ - function data(code) { - if ( - code === null || - code === 32 || - code === 96 || - markdownLineEnding(code) - ) { - effects.exit('codeTextData') - return between(code) - } - effects.consume(code) - return data - } - - /** - * In closing sequence. - * - * ```markdown - * > | `a` - * ^ - * ``` - * - * @type {State} - */ - function sequenceClose(code) { - // More. - if (code === 96) { - effects.consume(code) - size++ - return sequenceClose - } - - // Done! - if (size === sizeOpen) { - effects.exit('codeTextSequence') - effects.exit('codeText') - return ok(code) - } - - // More or less accents: mark as data. - token.type = 'codeTextData' - return data(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/constructs.js -/** - * @typedef {import('micromark-util-types').Extension} Extension - */ - - - - -/** @satisfies {Extension['document']} */ -const constructs_document = { - [42]: list, - [43]: list, - [45]: list, - [48]: list, - [49]: list, - [50]: list, - [51]: list, - [52]: list, - [53]: list, - [54]: list, - [55]: list, - [56]: list, - [57]: list, - [62]: blockQuote -} - -/** @satisfies {Extension['contentInitial']} */ -const contentInitial = { - [91]: definition -} - -/** @satisfies {Extension['flowInitial']} */ -const flowInitial = { - [-2]: codeIndented, - [-1]: codeIndented, - [32]: codeIndented -} - -/** @satisfies {Extension['flow']} */ -const constructs_flow = { - [35]: headingAtx, - [42]: thematicBreak, - [45]: [setextUnderline, thematicBreak], - [60]: htmlFlow, - [61]: setextUnderline, - [95]: thematicBreak, - [96]: codeFenced, - [126]: codeFenced -} - -/** @satisfies {Extension['string']} */ -const constructs_string = { - [38]: characterReference, - [92]: characterEscape -} - -/** @satisfies {Extension['text']} */ -const constructs_text = { - [-5]: lineEnding, - [-4]: lineEnding, - [-3]: lineEnding, - [33]: labelStartImage, - [38]: characterReference, - [42]: attention, - [60]: [autolink, htmlText], - [91]: labelStartLink, - [92]: [hardBreakEscape, characterEscape], - [93]: labelEnd, - [95]: attention, - [96]: codeText -} - -/** @satisfies {Extension['insideSpan']} */ -const insideSpan = { - null: [attention, resolver] -} - -/** @satisfies {Extension['attentionMarkers']} */ -const attentionMarkers = { - null: [42, 95] -} - -/** @satisfies {Extension['disable']} */ -const disable = { - null: [] -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/parse.js -/** - * @typedef {import('micromark-util-types').Create} Create - * @typedef {import('micromark-util-types').FullNormalizedExtension} FullNormalizedExtension - * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct - * @typedef {import('micromark-util-types').ParseContext} ParseContext - * @typedef {import('micromark-util-types').ParseOptions} ParseOptions - */ - - - - - - - - - -/** - * @param {ParseOptions | null | undefined} [options] - * @returns {ParseContext} - */ -function parse(options) { - const settings = options || {} - const constructs = - /** @type {FullNormalizedExtension} */ - combineExtensions([constructs_namespaceObject, ...(settings.extensions || [])]) - - /** @type {ParseContext} */ - const parser = { - defined: [], - lazy: {}, - constructs, - content: create(content), - document: create(document_document), - flow: create(flow), - string: create(string), - text: create(text_text) - } - return parser - - /** - * @param {InitialConstruct} initial - */ - function create(initial) { - return creator - /** @type {Create} */ - function creator(from) { - return createTokenizer(parser, initial, from) - } - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/preprocess.js -/** - * @typedef {import('micromark-util-types').Chunk} Chunk - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Encoding} Encoding - * @typedef {import('micromark-util-types').Value} Value - */ - -/** - * @callback Preprocessor - * @param {Value} value - * @param {Encoding | null | undefined} [encoding] - * @param {boolean | null | undefined} [end=false] - * @returns {Array} - */ - -const search = /[\0\t\n\r]/g - -/** - * @returns {Preprocessor} - */ -function preprocess() { - let column = 1 - let buffer = '' - /** @type {boolean | undefined} */ - let start = true - /** @type {boolean | undefined} */ - let atCarriageReturn - return preprocessor - - /** @type {Preprocessor} */ - function preprocessor(value, encoding, end) { - /** @type {Array} */ - const chunks = [] - /** @type {RegExpMatchArray | null} */ - let match - /** @type {number} */ - let next - /** @type {number} */ - let startPosition - /** @type {number} */ - let endPosition - /** @type {Code} */ - let code - - // @ts-expect-error `Buffer` does allow an encoding. - value = buffer + value.toString(encoding) - startPosition = 0 - buffer = '' - if (start) { - // To do: `markdown-rs` actually parses BOMs (byte order mark). - if (value.charCodeAt(0) === 65279) { - startPosition++ - } - start = undefined - } - while (startPosition < value.length) { - search.lastIndex = startPosition - match = search.exec(value) - endPosition = - match && match.index !== undefined ? match.index : value.length - code = value.charCodeAt(endPosition) - if (!match) { - buffer = value.slice(startPosition) - break - } - if (code === 10 && startPosition === endPosition && atCarriageReturn) { - chunks.push(-3) - atCarriageReturn = undefined - } else { - if (atCarriageReturn) { - chunks.push(-5) - atCarriageReturn = undefined - } - if (startPosition < endPosition) { - chunks.push(value.slice(startPosition, endPosition)) - column += endPosition - startPosition - } - switch (code) { - case 0: { - chunks.push(65533) - column++ - break - } - case 9: { - next = Math.ceil(column / 4) * 4 - chunks.push(-2) - while (column++ < next) chunks.push(-1) - break - } - case 10: { - chunks.push(-4) - column = 1 - break - } - default: { - atCarriageReturn = true - column = 1 - } - } - } - startPosition = endPosition + 1 - } - if (end) { - if (atCarriageReturn) chunks.push(-5) - if (buffer) chunks.push(buffer) - chunks.push(null) - } - return chunks - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/postprocess.js -/** - * @typedef {import('micromark-util-types').Event} Event - */ - - - -/** - * @param {Array} events - * @returns {Array} - */ -function postprocess(events) { - while (!subtokenize(events)) { - // Empty - } - return events -} - -;// CONCATENATED MODULE: ./node_modules/micromark-util-decode-numeric-character-reference/index.js -/** - * Turn the number (in string form as either hexa- or plain decimal) coming from - * a numeric character reference into a character. - * - * Sort of like `String.fromCharCode(Number.parseInt(value, base))`, but makes - * non-characters and control characters safe. - * - * @param {string} value - * Value to decode. - * @param {number} base - * Numeric base. - * @returns {string} - * Character. - */ -function decodeNumericCharacterReference(value, base) { - const code = Number.parseInt(value, base) - if ( - // C0 except for HT, LF, FF, CR, space. - code < 9 || - code === 11 || - (code > 13 && code < 32) || - // Control character (DEL) of C0, and C1 controls. - (code > 126 && code < 160) || - // Lone high surrogates and low surrogates. - (code > 55295 && code < 57344) || - // Noncharacters. - (code > 64975 && code < 65008) /* eslint-disable no-bitwise */ || - (code & 65535) === 65535 || - (code & 65535) === 65534 /* eslint-enable no-bitwise */ || - // Out of range - code > 1114111 - ) { - return '\uFFFD' - } - return String.fromCharCode(code) -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-decode-string/index.js - - -const characterEscapeOrReference = - /\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi - -/** - * Decode markdown strings (which occur in places such as fenced code info - * strings, destinations, labels, and titles). - * - * The “string” content type allows character escapes and -references. - * This decodes those. - * - * @param {string} value - * Value to decode. - * @returns {string} - * Decoded value. - */ -function decodeString(value) { - return value.replace(characterEscapeOrReference, decode) -} - -/** - * @param {string} $0 - * @param {string} $1 - * @param {string} $2 - * @returns {string} - */ -function decode($0, $1, $2) { - if ($1) { - // Escape. - return $1 - } - - // Reference. - const head = $2.charCodeAt(0) - if (head === 35) { - const head = $2.charCodeAt(1) - const hex = head === 120 || head === 88 - return decodeNumericCharacterReference($2.slice(hex ? 2 : 1), hex ? 16 : 10) - } - return decodeNamedCharacterReference($2) || $0 -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/unist-util-stringify-position/lib/index.js -/** - * @typedef {import('unist').Node} Node - * @typedef {import('unist').Point} Point - * @typedef {import('unist').Position} Position - */ - -/** - * @typedef NodeLike - * @property {string} type - * @property {PositionLike | null | undefined} [position] - * - * @typedef PositionLike - * @property {PointLike | null | undefined} [start] - * @property {PointLike | null | undefined} [end] - * - * @typedef PointLike - * @property {number | null | undefined} [line] - * @property {number | null | undefined} [column] - * @property {number | null | undefined} [offset] - */ - -/** - * Serialize the positional info of a point, position (start and end points), - * or node. - * - * @param {Node | NodeLike | Position | PositionLike | Point | PointLike | null | undefined} [value] - * Node, position, or point. - * @returns {string} - * Pretty printed positional info of a node (`string`). - * - * In the format of a range `ls:cs-le:ce` (when given `node` or `position`) - * or a point `l:c` (when given `point`), where `l` stands for line, `c` for - * column, `s` for `start`, and `e` for end. - * An empty string (`''`) is returned if the given value is neither `node`, - * `position`, nor `point`. - */ -function stringifyPosition(value) { - // Nothing. - if (!value || typeof value !== 'object') { - return '' - } - - // Node. - if ('position' in value || 'type' in value) { - return position(value.position) - } - - // Position. - if ('start' in value || 'end' in value) { - return position(value) - } - - // Point. - if ('line' in value || 'column' in value) { - return point(value) - } - - // ? - return '' -} - -/** - * @param {Point | PointLike | null | undefined} point - * @returns {string} - */ -function point(point) { - return index(point && point.line) + ':' + index(point && point.column) -} - -/** - * @param {Position | PositionLike | null | undefined} pos - * @returns {string} - */ -function position(pos) { - return point(pos && pos.start) + '-' + point(pos && pos.end) -} - -/** - * @param {number | null | undefined} value - * @returns {number} - */ -function index(value) { - return value && typeof value === 'number' ? value : 1 -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/mdast-util-from-markdown/lib/index.js -/** - * @typedef {import('micromark-util-types').Encoding} Encoding - * @typedef {import('micromark-util-types').Event} Event - * @typedef {import('micromark-util-types').ParseOptions} ParseOptions - * @typedef {import('micromark-util-types').Token} Token - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Value} Value - * - * @typedef {import('unist').Parent} UnistParent - * @typedef {import('unist').Point} Point - * - * @typedef {import('mdast').PhrasingContent} PhrasingContent - * @typedef {import('mdast').StaticPhrasingContent} StaticPhrasingContent - * @typedef {import('mdast').Content} Content - * @typedef {import('mdast').Break} Break - * @typedef {import('mdast').Blockquote} Blockquote - * @typedef {import('mdast').Code} Code - * @typedef {import('mdast').Definition} Definition - * @typedef {import('mdast').Emphasis} Emphasis - * @typedef {import('mdast').Heading} Heading - * @typedef {import('mdast').HTML} HTML - * @typedef {import('mdast').Image} Image - * @typedef {import('mdast').ImageReference} ImageReference - * @typedef {import('mdast').InlineCode} InlineCode - * @typedef {import('mdast').Link} Link - * @typedef {import('mdast').LinkReference} LinkReference - * @typedef {import('mdast').List} List - * @typedef {import('mdast').ListItem} ListItem - * @typedef {import('mdast').Paragraph} Paragraph - * @typedef {import('mdast').Root} Root - * @typedef {import('mdast').Strong} Strong - * @typedef {import('mdast').Text} Text - * @typedef {import('mdast').ThematicBreak} ThematicBreak - * @typedef {import('mdast').ReferenceType} ReferenceType - * @typedef {import('../index.js').CompileData} CompileData - */ - -/** - * @typedef {Root | Content} Node - * @typedef {Extract} Parent - * - * @typedef {Omit & {type: 'fragment', children: Array}} Fragment - */ - -/** - * @callback Transform - * Extra transform, to change the AST afterwards. - * @param {Root} tree - * Tree to transform. - * @returns {Root | undefined | null | void} - * New tree or nothing (in which case the current tree is used). - * - * @callback Handle - * Handle a token. - * @param {CompileContext} this - * Context. - * @param {Token} token - * Current token. - * @returns {void} - * Nothing. - * - * @typedef {Record} Handles - * Token types mapping to handles - * - * @callback OnEnterError - * Handle the case where the `right` token is open, but it is closed (by the - * `left` token) or because we reached the end of the document. - * @param {Omit} this - * Context. - * @param {Token | undefined} left - * Left token. - * @param {Token} right - * Right token. - * @returns {void} - * Nothing. - * - * @callback OnExitError - * Handle the case where the `right` token is open but it is closed by - * exiting the `left` token. - * @param {Omit} this - * Context. - * @param {Token} left - * Left token. - * @param {Token} right - * Right token. - * @returns {void} - * Nothing. - * - * @typedef {[Token, OnEnterError | undefined]} TokenTuple - * Open token on the stack, with an optional error handler for when - * that token isn’t closed properly. - */ - -/** - * @typedef Config - * Configuration. - * - * We have our defaults, but extensions will add more. - * @property {Array} canContainEols - * Token types where line endings are used. - * @property {Handles} enter - * Opening handles. - * @property {Handles} exit - * Closing handles. - * @property {Array} transforms - * Tree transforms. - * - * @typedef {Partial} Extension - * Change how markdown tokens from micromark are turned into mdast. - * - * @typedef CompileContext - * mdast compiler context. - * @property {Array} stack - * Stack of nodes. - * @property {Array} tokenStack - * Stack of tokens. - * @property {(key: Key) => CompileData[Key]} getData - * Get data from the key/value store. - * @property {(key: Key, value?: CompileData[Key]) => void} setData - * Set data into the key/value store. - * @property {(this: CompileContext) => void} buffer - * Capture some of the output data. - * @property {(this: CompileContext) => string} resume - * Stop capturing and access the output data. - * @property {(this: CompileContext, node: Kind, token: Token, onError?: OnEnterError) => Kind} enter - * Enter a token. - * @property {(this: CompileContext, token: Token, onError?: OnExitError) => Node} exit - * Exit a token. - * @property {TokenizeContext['sliceSerialize']} sliceSerialize - * Get the string value of a token. - * @property {Config} config - * Configuration. - * - * @typedef FromMarkdownOptions - * Configuration for how to build mdast. - * @property {Array> | null | undefined} [mdastExtensions] - * Extensions for this utility to change how tokens are turned into a tree. - * - * @typedef {ParseOptions & FromMarkdownOptions} Options - * Configuration. - */ - -// To do: micromark: create a registry of tokens? -// To do: next major: don’t return given `Node` from `enter`. -// To do: next major: remove setter/getter. - - - - - - - - - - -const lib_own = {}.hasOwnProperty - -/** - * @param value - * Markdown to parse. - * @param encoding - * Character encoding for when `value` is `Buffer`. - * @param options - * Configuration. - * @returns - * mdast tree. - */ -const fromMarkdown = - /** - * @type {( - * ((value: Value, encoding: Encoding, options?: Options | null | undefined) => Root) & - * ((value: Value, options?: Options | null | undefined) => Root) - * )} - */ - - /** - * @param {Value} value - * @param {Encoding | Options | null | undefined} [encoding] - * @param {Options | null | undefined} [options] - * @returns {Root} - */ - function (value, encoding, options) { - if (typeof encoding !== 'string') { - options = encoding - encoding = undefined - } - return compiler(options)( - postprocess( - parse(options).document().write(preprocess()(value, encoding, true)) - ) - ) - } - -/** - * Note this compiler only understand complete buffering, not streaming. - * - * @param {Options | null | undefined} [options] - */ -function compiler(options) { - /** @type {Config} */ - const config = { - transforms: [], - canContainEols: ['emphasis', 'fragment', 'heading', 'paragraph', 'strong'], - enter: { - autolink: opener(link), - autolinkProtocol: onenterdata, - autolinkEmail: onenterdata, - atxHeading: opener(heading), - blockQuote: opener(blockQuote), - characterEscape: onenterdata, - characterReference: onenterdata, - codeFenced: opener(codeFlow), - codeFencedFenceInfo: buffer, - codeFencedFenceMeta: buffer, - codeIndented: opener(codeFlow, buffer), - codeText: opener(codeText, buffer), - codeTextData: onenterdata, - data: onenterdata, - codeFlowValue: onenterdata, - definition: opener(definition), - definitionDestinationString: buffer, - definitionLabelString: buffer, - definitionTitleString: buffer, - emphasis: opener(emphasis), - hardBreakEscape: opener(hardBreak), - hardBreakTrailing: opener(hardBreak), - htmlFlow: opener(html, buffer), - htmlFlowData: onenterdata, - htmlText: opener(html, buffer), - htmlTextData: onenterdata, - image: opener(image), - label: buffer, - link: opener(link), - listItem: opener(listItem), - listItemValue: onenterlistitemvalue, - listOrdered: opener(list, onenterlistordered), - listUnordered: opener(list), - paragraph: opener(paragraph), - reference: onenterreference, - referenceString: buffer, - resourceDestinationString: buffer, - resourceTitleString: buffer, - setextHeading: opener(heading), - strong: opener(strong), - thematicBreak: opener(thematicBreak) - }, - exit: { - atxHeading: closer(), - atxHeadingSequence: onexitatxheadingsequence, - autolink: closer(), - autolinkEmail: onexitautolinkemail, - autolinkProtocol: onexitautolinkprotocol, - blockQuote: closer(), - characterEscapeValue: onexitdata, - characterReferenceMarkerHexadecimal: onexitcharacterreferencemarker, - characterReferenceMarkerNumeric: onexitcharacterreferencemarker, - characterReferenceValue: onexitcharacterreferencevalue, - codeFenced: closer(onexitcodefenced), - codeFencedFence: onexitcodefencedfence, - codeFencedFenceInfo: onexitcodefencedfenceinfo, - codeFencedFenceMeta: onexitcodefencedfencemeta, - codeFlowValue: onexitdata, - codeIndented: closer(onexitcodeindented), - codeText: closer(onexitcodetext), - codeTextData: onexitdata, - data: onexitdata, - definition: closer(), - definitionDestinationString: onexitdefinitiondestinationstring, - definitionLabelString: onexitdefinitionlabelstring, - definitionTitleString: onexitdefinitiontitlestring, - emphasis: closer(), - hardBreakEscape: closer(onexithardbreak), - hardBreakTrailing: closer(onexithardbreak), - htmlFlow: closer(onexithtmlflow), - htmlFlowData: onexitdata, - htmlText: closer(onexithtmltext), - htmlTextData: onexitdata, - image: closer(onexitimage), - label: onexitlabel, - labelText: onexitlabeltext, - lineEnding: onexitlineending, - link: closer(onexitlink), - listItem: closer(), - listOrdered: closer(), - listUnordered: closer(), - paragraph: closer(), - referenceString: onexitreferencestring, - resourceDestinationString: onexitresourcedestinationstring, - resourceTitleString: onexitresourcetitlestring, - resource: onexitresource, - setextHeading: closer(onexitsetextheading), - setextHeadingLineSequence: onexitsetextheadinglinesequence, - setextHeadingText: onexitsetextheadingtext, - strong: closer(), - thematicBreak: closer() - } - } - configure(config, (options || {}).mdastExtensions || []) - - /** @type {CompileData} */ - const data = {} - return compile - - /** - * Turn micromark events into an mdast tree. - * - * @param {Array} events - * Events. - * @returns {Root} - * mdast tree. - */ - function compile(events) { - /** @type {Root} */ - let tree = { - type: 'root', - children: [] - } - /** @type {Omit} */ - const context = { - stack: [tree], - tokenStack: [], - config, - enter, - exit, - buffer, - resume, - setData, - getData - } - /** @type {Array} */ - const listStack = [] - let index = -1 - while (++index < events.length) { - // We preprocess lists to add `listItem` tokens, and to infer whether - // items the list itself are spread out. - if ( - events[index][1].type === 'listOrdered' || - events[index][1].type === 'listUnordered' - ) { - if (events[index][0] === 'enter') { - listStack.push(index) - } else { - const tail = listStack.pop() - index = prepareList(events, tail, index) - } - } - } - index = -1 - while (++index < events.length) { - const handler = config[events[index][0]] - if (lib_own.call(handler, events[index][1].type)) { - handler[events[index][1].type].call( - Object.assign( - { - sliceSerialize: events[index][2].sliceSerialize - }, - context - ), - events[index][1] - ) - } - } - - // Handle tokens still being open. - if (context.tokenStack.length > 0) { - const tail = context.tokenStack[context.tokenStack.length - 1] - const handler = tail[1] || defaultOnError - handler.call(context, undefined, tail[0]) - } - - // Figure out `root` position. - tree.position = { - start: lib_point( - events.length > 0 - ? events[0][1].start - : { - line: 1, - column: 1, - offset: 0 - } - ), - end: lib_point( - events.length > 0 - ? events[events.length - 2][1].end - : { - line: 1, - column: 1, - offset: 0 - } - ) - } - - // Call transforms. - index = -1 - while (++index < config.transforms.length) { - tree = config.transforms[index](tree) || tree - } - return tree - } - - /** - * @param {Array} events - * @param {number} start - * @param {number} length - * @returns {number} - */ - function prepareList(events, start, length) { - let index = start - 1 - let containerBalance = -1 - let listSpread = false - /** @type {Token | undefined} */ - let listItem - /** @type {number | undefined} */ - let lineIndex - /** @type {number | undefined} */ - let firstBlankLineIndex - /** @type {boolean | undefined} */ - let atMarker - while (++index <= length) { - const event = events[index] - if ( - event[1].type === 'listUnordered' || - event[1].type === 'listOrdered' || - event[1].type === 'blockQuote' - ) { - if (event[0] === 'enter') { - containerBalance++ - } else { - containerBalance-- - } - atMarker = undefined - } else if (event[1].type === 'lineEndingBlank') { - if (event[0] === 'enter') { - if ( - listItem && - !atMarker && - !containerBalance && - !firstBlankLineIndex - ) { - firstBlankLineIndex = index - } - atMarker = undefined - } - } else if ( - event[1].type === 'linePrefix' || - event[1].type === 'listItemValue' || - event[1].type === 'listItemMarker' || - event[1].type === 'listItemPrefix' || - event[1].type === 'listItemPrefixWhitespace' - ) { - // Empty. - } else { - atMarker = undefined - } - if ( - (!containerBalance && - event[0] === 'enter' && - event[1].type === 'listItemPrefix') || - (containerBalance === -1 && - event[0] === 'exit' && - (event[1].type === 'listUnordered' || - event[1].type === 'listOrdered')) - ) { - if (listItem) { - let tailIndex = index - lineIndex = undefined - while (tailIndex--) { - const tailEvent = events[tailIndex] - if ( - tailEvent[1].type === 'lineEnding' || - tailEvent[1].type === 'lineEndingBlank' - ) { - if (tailEvent[0] === 'exit') continue - if (lineIndex) { - events[lineIndex][1].type = 'lineEndingBlank' - listSpread = true - } - tailEvent[1].type = 'lineEnding' - lineIndex = tailIndex - } else if ( - tailEvent[1].type === 'linePrefix' || - tailEvent[1].type === 'blockQuotePrefix' || - tailEvent[1].type === 'blockQuotePrefixWhitespace' || - tailEvent[1].type === 'blockQuoteMarker' || - tailEvent[1].type === 'listItemIndent' - ) { - // Empty - } else { - break - } - } - if ( - firstBlankLineIndex && - (!lineIndex || firstBlankLineIndex < lineIndex) - ) { - listItem._spread = true - } - - // Fix position. - listItem.end = Object.assign( - {}, - lineIndex ? events[lineIndex][1].start : event[1].end - ) - events.splice(lineIndex || index, 0, ['exit', listItem, event[2]]) - index++ - length++ - } - - // Create a new list item. - if (event[1].type === 'listItemPrefix') { - listItem = { - type: 'listItem', - _spread: false, - start: Object.assign({}, event[1].start), - // @ts-expect-error: we’ll add `end` in a second. - end: undefined - } - // @ts-expect-error: `listItem` is most definitely defined, TS... - events.splice(index, 0, ['enter', listItem, event[2]]) - index++ - length++ - firstBlankLineIndex = undefined - atMarker = true - } - } - } - events[start][1]._spread = listSpread - return length - } - - /** - * Set data. - * - * @template {keyof CompileData} Key - * Field type. - * @param {Key} key - * Key of field. - * @param {CompileData[Key]} [value] - * New value. - * @returns {void} - * Nothing. - */ - function setData(key, value) { - data[key] = value - } - - /** - * Get data. - * - * @template {keyof CompileData} Key - * Field type. - * @param {Key} key - * Key of field. - * @returns {CompileData[Key]} - * Value. - */ - function getData(key) { - return data[key] - } - - /** - * Create an opener handle. - * - * @param {(token: Token) => Node} create - * Create a node. - * @param {Handle} [and] - * Optional function to also run. - * @returns {Handle} - * Handle. - */ - function opener(create, and) { - return open - - /** - * @this {CompileContext} - * @param {Token} token - * @returns {void} - */ - function open(token) { - enter.call(this, create(token), token) - if (and) and.call(this, token) - } - } - - /** - * @this {CompileContext} - * @returns {void} - */ - function buffer() { - this.stack.push({ - type: 'fragment', - children: [] - }) - } - - /** - * @template {Node} Kind - * Node type. - * @this {CompileContext} - * Context. - * @param {Kind} node - * Node to enter. - * @param {Token} token - * Corresponding token. - * @param {OnEnterError | undefined} [errorHandler] - * Handle the case where this token is open, but it is closed by something else. - * @returns {Kind} - * The given node. - */ - function enter(node, token, errorHandler) { - const parent = this.stack[this.stack.length - 1] - // @ts-expect-error: Assume `Node` can exist as a child of `parent`. - parent.children.push(node) - this.stack.push(node) - this.tokenStack.push([token, errorHandler]) - // @ts-expect-error: `end` will be patched later. - node.position = { - start: lib_point(token.start) - } - return node - } - - /** - * Create a closer handle. - * - * @param {Handle} [and] - * Optional function to also run. - * @returns {Handle} - * Handle. - */ - function closer(and) { - return close - - /** - * @this {CompileContext} - * @param {Token} token - * @returns {void} - */ - function close(token) { - if (and) and.call(this, token) - exit.call(this, token) - } - } - - /** - * @this {CompileContext} - * Context. - * @param {Token} token - * Corresponding token. - * @param {OnExitError | undefined} [onExitError] - * Handle the case where another token is open. - * @returns {Node} - * The closed node. - */ - function exit(token, onExitError) { - const node = this.stack.pop() - const open = this.tokenStack.pop() - if (!open) { - throw new Error( - 'Cannot close `' + - token.type + - '` (' + - stringifyPosition({ - start: token.start, - end: token.end - }) + - '): it’s not open' - ) - } else if (open[0].type !== token.type) { - if (onExitError) { - onExitError.call(this, token, open[0]) - } else { - const handler = open[1] || defaultOnError - handler.call(this, token, open[0]) - } - } - node.position.end = lib_point(token.end) - return node - } - - /** - * @this {CompileContext} - * @returns {string} - */ - function resume() { - return lib_toString(this.stack.pop()) - } - - // - // Handlers. - // - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onenterlistordered() { - setData('expectingFirstListItemValue', true) - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onenterlistitemvalue(token) { - if (getData('expectingFirstListItemValue')) { - const ancestor = this.stack[this.stack.length - 2] - ancestor.start = Number.parseInt(this.sliceSerialize(token), 10) - setData('expectingFirstListItemValue') - } - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitcodefencedfenceinfo() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.lang = data - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitcodefencedfencemeta() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.meta = data - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitcodefencedfence() { - // Exit if this is the closing fence. - if (getData('flowCodeInside')) return - this.buffer() - setData('flowCodeInside', true) - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitcodefenced() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.value = data.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g, '') - setData('flowCodeInside') - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitcodeindented() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.value = data.replace(/(\r?\n|\r)$/g, '') - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitdefinitionlabelstring(token) { - const label = this.resume() - const node = this.stack[this.stack.length - 1] - node.label = label - node.identifier = normalizeIdentifier( - this.sliceSerialize(token) - ).toLowerCase() - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitdefinitiontitlestring() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.title = data - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitdefinitiondestinationstring() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.url = data - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitatxheadingsequence(token) { - const node = this.stack[this.stack.length - 1] - if (!node.depth) { - const depth = this.sliceSerialize(token).length - node.depth = depth - } - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitsetextheadingtext() { - setData('setextHeadingSlurpLineEnding', true) - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitsetextheadinglinesequence(token) { - const node = this.stack[this.stack.length - 1] - node.depth = this.sliceSerialize(token).charCodeAt(0) === 61 ? 1 : 2 - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitsetextheading() { - setData('setextHeadingSlurpLineEnding') - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onenterdata(token) { - const node = this.stack[this.stack.length - 1] - let tail = node.children[node.children.length - 1] - if (!tail || tail.type !== 'text') { - // Add a new text node. - tail = text() - // @ts-expect-error: we’ll add `end` later. - tail.position = { - start: lib_point(token.start) - } - // @ts-expect-error: Assume `parent` accepts `text`. - node.children.push(tail) - } - this.stack.push(tail) - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitdata(token) { - const tail = this.stack.pop() - tail.value += this.sliceSerialize(token) - tail.position.end = lib_point(token.end) - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitlineending(token) { - const context = this.stack[this.stack.length - 1] - // If we’re at a hard break, include the line ending in there. - if (getData('atHardBreak')) { - const tail = context.children[context.children.length - 1] - tail.position.end = lib_point(token.end) - setData('atHardBreak') - return - } - if ( - !getData('setextHeadingSlurpLineEnding') && - config.canContainEols.includes(context.type) - ) { - onenterdata.call(this, token) - onexitdata.call(this, token) - } - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexithardbreak() { - setData('atHardBreak', true) - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexithtmlflow() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.value = data - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexithtmltext() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.value = data - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitcodetext() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.value = data - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitlink() { - const node = this.stack[this.stack.length - 1] - // Note: there are also `identifier` and `label` fields on this link node! - // These are used / cleaned here. - // To do: clean. - if (getData('inReference')) { - /** @type {ReferenceType} */ - const referenceType = getData('referenceType') || 'shortcut' - node.type += 'Reference' - // @ts-expect-error: mutate. - node.referenceType = referenceType - // @ts-expect-error: mutate. - delete node.url - delete node.title - } else { - // @ts-expect-error: mutate. - delete node.identifier - // @ts-expect-error: mutate. - delete node.label - } - setData('referenceType') - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitimage() { - const node = this.stack[this.stack.length - 1] - // Note: there are also `identifier` and `label` fields on this link node! - // These are used / cleaned here. - // To do: clean. - if (getData('inReference')) { - /** @type {ReferenceType} */ - const referenceType = getData('referenceType') || 'shortcut' - node.type += 'Reference' - // @ts-expect-error: mutate. - node.referenceType = referenceType - // @ts-expect-error: mutate. - delete node.url - delete node.title - } else { - // @ts-expect-error: mutate. - delete node.identifier - // @ts-expect-error: mutate. - delete node.label - } - setData('referenceType') - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitlabeltext(token) { - const string = this.sliceSerialize(token) - const ancestor = this.stack[this.stack.length - 2] - // @ts-expect-error: stash this on the node, as it might become a reference - // later. - ancestor.label = decodeString(string) - // @ts-expect-error: same as above. - ancestor.identifier = normalizeIdentifier(string).toLowerCase() - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitlabel() { - const fragment = this.stack[this.stack.length - 1] - const value = this.resume() - const node = this.stack[this.stack.length - 1] - // Assume a reference. - setData('inReference', true) - if (node.type === 'link') { - /** @type {Array} */ - // @ts-expect-error: Assume static phrasing content. - const children = fragment.children - node.children = children - } else { - node.alt = value - } - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitresourcedestinationstring() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.url = data - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitresourcetitlestring() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.title = data - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitresource() { - setData('inReference') - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onenterreference() { - setData('referenceType', 'collapsed') - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitreferencestring(token) { - const label = this.resume() - const node = this.stack[this.stack.length - 1] - // @ts-expect-error: stash this on the node, as it might become a reference - // later. - node.label = label - // @ts-expect-error: same as above. - node.identifier = normalizeIdentifier( - this.sliceSerialize(token) - ).toLowerCase() - setData('referenceType', 'full') - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitcharacterreferencemarker(token) { - setData('characterReferenceType', token.type) - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitcharacterreferencevalue(token) { - const data = this.sliceSerialize(token) - const type = getData('characterReferenceType') - /** @type {string} */ - let value - if (type) { - value = decodeNumericCharacterReference( - data, - type === 'characterReferenceMarkerNumeric' ? 10 : 16 - ) - setData('characterReferenceType') - } else { - const result = decodeNamedCharacterReference(data) - value = result - } - const tail = this.stack.pop() - tail.value += value - tail.position.end = lib_point(token.end) - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitautolinkprotocol(token) { - onexitdata.call(this, token) - const node = this.stack[this.stack.length - 1] - node.url = this.sliceSerialize(token) - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitautolinkemail(token) { - onexitdata.call(this, token) - const node = this.stack[this.stack.length - 1] - node.url = 'mailto:' + this.sliceSerialize(token) - } - - // - // Creaters. - // - - /** @returns {Blockquote} */ - function blockQuote() { - return { - type: 'blockquote', - children: [] - } - } - - /** @returns {Code} */ - function codeFlow() { - return { - type: 'code', - lang: null, - meta: null, - value: '' - } - } - - /** @returns {InlineCode} */ - function codeText() { - return { - type: 'inlineCode', - value: '' - } - } - - /** @returns {Definition} */ - function definition() { - return { - type: 'definition', - identifier: '', - label: null, - title: null, - url: '' - } - } - - /** @returns {Emphasis} */ - function emphasis() { - return { - type: 'emphasis', - children: [] - } - } - - /** @returns {Heading} */ - function heading() { - // @ts-expect-error `depth` will be set later. - return { - type: 'heading', - depth: undefined, - children: [] - } - } - - /** @returns {Break} */ - function hardBreak() { - return { - type: 'break' - } - } - - /** @returns {HTML} */ - function html() { - return { - type: 'html', - value: '' - } - } - - /** @returns {Image} */ - function image() { - return { - type: 'image', - title: null, - url: '', - alt: null - } - } - - /** @returns {Link} */ - function link() { - return { - type: 'link', - title: null, - url: '', - children: [] - } - } - - /** - * @param {Token} token - * @returns {List} - */ - function list(token) { - return { - type: 'list', - ordered: token.type === 'listOrdered', - start: null, - spread: token._spread, - children: [] - } - } - - /** - * @param {Token} token - * @returns {ListItem} - */ - function listItem(token) { - return { - type: 'listItem', - spread: token._spread, - checked: null, - children: [] - } - } - - /** @returns {Paragraph} */ - function paragraph() { - return { - type: 'paragraph', - children: [] - } - } - - /** @returns {Strong} */ - function strong() { - return { - type: 'strong', - children: [] - } - } - - /** @returns {Text} */ - function text() { - return { - type: 'text', - value: '' - } - } - - /** @returns {ThematicBreak} */ - function thematicBreak() { - return { - type: 'thematicBreak' - } - } -} - -/** - * Copy a point-like value. - * - * @param {Point} d - * Point-like value. - * @returns {Point} - * unist point. - */ -function lib_point(d) { - return { - line: d.line, - column: d.column, - offset: d.offset - } -} - -/** - * @param {Config} combined - * @param {Array>} extensions - * @returns {void} - */ -function configure(combined, extensions) { - let index = -1 - while (++index < extensions.length) { - const value = extensions[index] - if (Array.isArray(value)) { - configure(combined, value) - } else { - extension(combined, value) - } - } -} - -/** - * @param {Config} combined - * @param {Extension} extension - * @returns {void} - */ -function extension(combined, extension) { - /** @type {keyof Extension} */ - let key - for (key in extension) { - if (lib_own.call(extension, key)) { - if (key === 'canContainEols') { - const right = extension[key] - if (right) { - combined[key].push(...right) - } - } else if (key === 'transforms') { - const right = extension[key] - if (right) { - combined[key].push(...right) - } - } else if (key === 'enter' || key === 'exit') { - const right = extension[key] - if (right) { - Object.assign(combined[key], right) - } - } - } - } -} - -/** @type {OnEnterError} */ -function defaultOnError(left, right) { - if (left) { - throw new Error( - 'Cannot close `' + - left.type + - '` (' + - stringifyPosition({ - start: left.start, - end: left.end - }) + - '): a different token (`' + - right.type + - '`, ' + - stringifyPosition({ - start: right.start, - end: right.end - }) + - ') is open' - ) - } else { - throw new Error( - 'Cannot close document, a token (`' + - right.type + - '`, ' + - stringifyPosition({ - start: right.start, - end: right.end - }) + - ') is still open' - ) - } -} - -// EXTERNAL MODULE: ./node_modules/ts-dedent/esm/index.js -var esm = __webpack_require__(60513); -;// CONCATENATED MODULE: ./node_modules/mermaid/dist/createText-2e5e7dd3.js - - - -function preprocessMarkdown(markdown) { - const withoutMultipleNewlines = markdown.replace(/\n{2,}/g, "\n"); - const withoutExtraSpaces = (0,esm/* dedent */.T)(withoutMultipleNewlines); - return withoutExtraSpaces; -} -function markdownToLines(markdown) { - const preprocessedMarkdown = preprocessMarkdown(markdown); - const { children } = fromMarkdown(preprocessedMarkdown); - const lines = [[]]; - let currentLine = 0; - function processNode(node, parentType = "normal") { - if (node.type === "text") { - const textLines = node.value.split("\n"); - textLines.forEach((textLine, index) => { - if (index !== 0) { - currentLine++; - lines.push([]); - } - textLine.split(" ").forEach((word) => { - if (word) { - lines[currentLine].push({ content: word, type: parentType }); - } - }); - }); - } else if (node.type === "strong" || node.type === "emphasis") { - node.children.forEach((contentNode) => { - processNode(contentNode, node.type); - }); - } - } - children.forEach((treeNode) => { - if (treeNode.type === "paragraph") { - treeNode.children.forEach((contentNode) => { - processNode(contentNode); - }); - } - }); - return lines; -} -function markdownToHTML(markdown) { - const { children } = fromMarkdown(markdown); - function output(node) { - if (node.type === "text") { - return node.value.replace(/\n/g, "
    "); - } else if (node.type === "strong") { - return `${node.children.map(output).join("")}`; - } else if (node.type === "emphasis") { - return `${node.children.map(output).join("")}`; - } else if (node.type === "paragraph") { - return `

    ${node.children.map(output).join("")}

    `; - } - return `Unsupported markdown: ${node.type}`; - } - return children.map(output).join(""); -} -function splitTextToChars(text) { - if (Intl.Segmenter) { - return [...new Intl.Segmenter().segment(text)].map((s) => s.segment); - } - return [...text]; -} -function splitWordToFitWidth(checkFit, word) { - const characters = splitTextToChars(word.content); - return splitWordToFitWidthRecursion(checkFit, [], characters, word.type); -} -function splitWordToFitWidthRecursion(checkFit, usedChars, remainingChars, type) { - if (remainingChars.length === 0) { - return [ - { content: usedChars.join(""), type }, - { content: "", type } - ]; - } - const [nextChar, ...rest] = remainingChars; - const newWord = [...usedChars, nextChar]; - if (checkFit([{ content: newWord.join(""), type }])) { - return splitWordToFitWidthRecursion(checkFit, newWord, rest, type); - } - if (usedChars.length === 0 && nextChar) { - usedChars.push(nextChar); - remainingChars.shift(); - } - return [ - { content: usedChars.join(""), type }, - { content: remainingChars.join(""), type } - ]; -} -function splitLineToFitWidth(line, checkFit) { - if (line.some(({ content }) => content.includes("\n"))) { - throw new Error("splitLineToFitWidth does not support newlines in the line"); - } - return splitLineToFitWidthRecursion(line, checkFit); -} -function splitLineToFitWidthRecursion(words, checkFit, lines = [], newLine = []) { - if (words.length === 0) { - if (newLine.length > 0) { - lines.push(newLine); - } - return lines.length > 0 ? lines : []; - } - let joiner = ""; - if (words[0].content === " ") { - joiner = " "; - words.shift(); - } - const nextWord = words.shift() ?? { content: " ", type: "normal" }; - const lineWithNextWord = [...newLine]; - if (joiner !== "") { - lineWithNextWord.push({ content: joiner, type: "normal" }); - } - lineWithNextWord.push(nextWord); - if (checkFit(lineWithNextWord)) { - return splitLineToFitWidthRecursion(words, checkFit, lines, lineWithNextWord); - } - if (newLine.length > 0) { - lines.push(newLine); - words.unshift(nextWord); - } else if (nextWord.content) { - const [line, rest] = splitWordToFitWidth(checkFit, nextWord); - lines.push([line]); - if (rest.content) { - words.unshift(rest); - } - } - return splitLineToFitWidthRecursion(words, checkFit, lines); -} -function applyStyle(dom, styleFn) { - if (styleFn) { - dom.attr("style", styleFn); - } -} -function addHtmlSpan(element, node, width, classes, addBackground = false) { - const fo = element.append("foreignObject"); - const div = fo.append("xhtml:div"); - const label = node.label; - const labelClass = node.isNode ? "nodeLabel" : "edgeLabel"; - div.html( - ` - " + label + "" - ); - applyStyle(div, node.labelStyle); - div.style("display", "table-cell"); - div.style("white-space", "nowrap"); - div.style("max-width", width + "px"); - div.attr("xmlns", "http://www.w3.org/1999/xhtml"); - if (addBackground) { - div.attr("class", "labelBkg"); - } - let bbox = div.node().getBoundingClientRect(); - if (bbox.width === width) { - div.style("display", "table"); - div.style("white-space", "break-spaces"); - div.style("width", width + "px"); - bbox = div.node().getBoundingClientRect(); - } - fo.style("width", bbox.width); - fo.style("height", bbox.height); - return fo.node(); -} -function createTspan(textElement, lineIndex, lineHeight) { - return textElement.append("tspan").attr("class", "text-outer-tspan").attr("x", 0).attr("y", lineIndex * lineHeight - 0.1 + "em").attr("dy", lineHeight + "em"); -} -function computeWidthOfText(parentNode, lineHeight, line) { - const testElement = parentNode.append("text"); - const testSpan = createTspan(testElement, 1, lineHeight); - updateTextContentAndStyles(testSpan, line); - const textLength = testSpan.node().getComputedTextLength(); - testElement.remove(); - return textLength; -} -function computeDimensionOfText(parentNode, lineHeight, text) { - var _a; - const testElement = parentNode.append("text"); - const testSpan = createTspan(testElement, 1, lineHeight); - updateTextContentAndStyles(testSpan, [{ content: text, type: "normal" }]); - const textDimension = (_a = testSpan.node()) == null ? void 0 : _a.getBoundingClientRect(); - if (textDimension) { - testElement.remove(); - } - return textDimension; -} -function createFormattedText(width, g, structuredText, addBackground = false) { - const lineHeight = 1.1; - const labelGroup = g.append("g"); - const bkg = labelGroup.insert("rect").attr("class", "background"); - const textElement = labelGroup.append("text").attr("y", "-10.1"); - let lineIndex = 0; - for (const line of structuredText) { - const checkWidth = (line2) => computeWidthOfText(labelGroup, lineHeight, line2) <= width; - const linesUnderWidth = checkWidth(line) ? [line] : splitLineToFitWidth(line, checkWidth); - for (const preparedLine of linesUnderWidth) { - const tspan = createTspan(textElement, lineIndex, lineHeight); - updateTextContentAndStyles(tspan, preparedLine); - lineIndex++; - } - } - if (addBackground) { - const bbox = textElement.node().getBBox(); - const padding = 2; - bkg.attr("x", -padding).attr("y", -padding).attr("width", bbox.width + 2 * padding).attr("height", bbox.height + 2 * padding); - return labelGroup.node(); - } else { - return textElement.node(); - } -} -function updateTextContentAndStyles(tspan, wrappedLine) { - tspan.text(""); - wrappedLine.forEach((word, index) => { - const innerTspan = tspan.append("tspan").attr("font-style", word.type === "emphasis" ? "italic" : "normal").attr("class", "text-inner-tspan").attr("font-weight", word.type === "strong" ? "bold" : "normal"); - if (index === 0) { - innerTspan.text(word.content); - } else { - innerTspan.text(" " + word.content); - } - }); -} -const createText = (el, text = "", { - style = "", - isTitle = false, - classes = "", - useHtmlLabels = true, - isNode = true, - width = 200, - addSvgBackground = false -} = {}) => { - mermaid_b5860b54.l.info("createText", text, style, isTitle, classes, useHtmlLabels, isNode, addSvgBackground); - if (useHtmlLabels) { - const htmlText = markdownToHTML(text); - const node = { - isNode, - label: (0,mermaid_b5860b54.M)(htmlText).replace( - /fa[blrs]?:fa-[\w-]+/g, - // cspell: disable-line - (s) => `` - ), - labelStyle: style.replace("fill:", "color:") - }; - const vertexNode = addHtmlSpan(el, node, width, classes, addSvgBackground); - return vertexNode; - } else { - const structuredText = markdownToLines(text); - const svgLabel = createFormattedText(width, el, structuredText, addSvgBackground); - return svgLabel; - } -}; - - - -/***/ }), - -/***/ 88146: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ a: () => (/* binding */ insertMarkers$1), -/* harmony export */ b: () => (/* binding */ clear$1), -/* harmony export */ c: () => (/* binding */ createLabel$1), -/* harmony export */ d: () => (/* binding */ clear), -/* harmony export */ e: () => (/* binding */ insertNode), -/* harmony export */ f: () => (/* binding */ insertEdgeLabel), -/* harmony export */ g: () => (/* binding */ getSubGraphTitleMargins), -/* harmony export */ h: () => (/* binding */ insertEdge), -/* harmony export */ i: () => (/* binding */ intersectRect$1), -/* harmony export */ j: () => (/* binding */ positionEdgeLabel), -/* harmony export */ k: () => (/* binding */ getLineFunctionsWithOffset), -/* harmony export */ l: () => (/* binding */ labelHelper), -/* harmony export */ m: () => (/* binding */ addEdgeMarkers), -/* harmony export */ p: () => (/* binding */ positionNode), -/* harmony export */ s: () => (/* binding */ setNodeElem), -/* harmony export */ u: () => (/* binding */ updateNodeBounds) -/* harmony export */ }); -/* harmony import */ var _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(86079); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(26312); -/* harmony import */ var _createText_2e5e7dd3_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(73743); - - - -const insertMarkers = (elem, markerArray, type, id) => { - markerArray.forEach((markerName) => { - markers[markerName](elem, type, id); - }); -}; -const extension = (elem, type, id) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.trace("Making markers for ", id); - elem.append("defs").append("marker").attr("id", id + "_" + type + "-extensionStart").attr("class", "marker extension " + type).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 1,7 L18,13 V 1 Z"); - elem.append("defs").append("marker").attr("id", id + "_" + type + "-extensionEnd").attr("class", "marker extension " + type).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 1,1 V 13 L18,7 Z"); -}; -const composition = (elem, type, id) => { - elem.append("defs").append("marker").attr("id", id + "_" + type + "-compositionStart").attr("class", "marker composition " + type).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"); - elem.append("defs").append("marker").attr("id", id + "_" + type + "-compositionEnd").attr("class", "marker composition " + type).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"); -}; -const aggregation = (elem, type, id) => { - elem.append("defs").append("marker").attr("id", id + "_" + type + "-aggregationStart").attr("class", "marker aggregation " + type).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"); - elem.append("defs").append("marker").attr("id", id + "_" + type + "-aggregationEnd").attr("class", "marker aggregation " + type).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"); -}; -const dependency = (elem, type, id) => { - elem.append("defs").append("marker").attr("id", id + "_" + type + "-dependencyStart").attr("class", "marker dependency " + type).attr("refX", 6).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 5,7 L9,13 L1,7 L9,1 Z"); - elem.append("defs").append("marker").attr("id", id + "_" + type + "-dependencyEnd").attr("class", "marker dependency " + type).attr("refX", 13).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z"); -}; -const lollipop = (elem, type, id) => { - elem.append("defs").append("marker").attr("id", id + "_" + type + "-lollipopStart").attr("class", "marker lollipop " + type).attr("refX", 13).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("circle").attr("stroke", "black").attr("fill", "transparent").attr("cx", 7).attr("cy", 7).attr("r", 6); - elem.append("defs").append("marker").attr("id", id + "_" + type + "-lollipopEnd").attr("class", "marker lollipop " + type).attr("refX", 1).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("circle").attr("stroke", "black").attr("fill", "transparent").attr("cx", 7).attr("cy", 7).attr("r", 6); -}; -const point = (elem, type, id) => { - elem.append("marker").attr("id", id + "_" + type + "-pointEnd").attr("class", "marker " + type).attr("viewBox", "0 0 10 10").attr("refX", 6).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"); - elem.append("marker").attr("id", id + "_" + type + "-pointStart").attr("class", "marker " + type).attr("viewBox", "0 0 10 10").attr("refX", 4.5).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 5 L 10 10 L 10 0 z").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"); -}; -const circle$1 = (elem, type, id) => { - elem.append("marker").attr("id", id + "_" + type + "-circleEnd").attr("class", "marker " + type).attr("viewBox", "0 0 10 10").attr("refX", 11).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"); - elem.append("marker").attr("id", id + "_" + type + "-circleStart").attr("class", "marker " + type).attr("viewBox", "0 0 10 10").attr("refX", -1).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"); -}; -const cross = (elem, type, id) => { - elem.append("marker").attr("id", id + "_" + type + "-crossEnd").attr("class", "marker cross " + type).attr("viewBox", "0 0 11 11").attr("refX", 12).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0"); - elem.append("marker").attr("id", id + "_" + type + "-crossStart").attr("class", "marker cross " + type).attr("viewBox", "0 0 11 11").attr("refX", -1).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0"); -}; -const barb = (elem, type, id) => { - elem.append("defs").append("marker").attr("id", id + "_" + type + "-barbEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 14).attr("markerUnits", "strokeWidth").attr("orient", "auto").append("path").attr("d", "M 19,7 L9,13 L14,7 L9,1 Z"); -}; -const markers = { - extension, - composition, - aggregation, - dependency, - lollipop, - point, - circle: circle$1, - cross, - barb -}; -const insertMarkers$1 = insertMarkers; -function applyStyle(dom, styleFn) { - if (styleFn) { - dom.attr("style", styleFn); - } -} -function addHtmlLabel(node) { - const fo = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(document.createElementNS("http://www.w3.org/2000/svg", "foreignObject")); - const div = fo.append("xhtml:div"); - const label = node.label; - const labelClass = node.isNode ? "nodeLabel" : "edgeLabel"; - div.html( - '" + label + "" - ); - applyStyle(div, node.labelStyle); - div.style("display", "inline-block"); - div.style("white-space", "nowrap"); - div.attr("xmlns", "http://www.w3.org/1999/xhtml"); - return fo.node(); -} -const createLabel = (_vertexText, style, isTitle, isNode) => { - let vertexText = _vertexText || ""; - if (typeof vertexText === "object") { - vertexText = vertexText[0]; - } - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { - vertexText = vertexText.replace(/\\n|\n/g, "
    "); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("vertexText" + vertexText); - const node = { - isNode, - label: (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.M)(vertexText).replace( - /fa[blrs]?:fa-[\w-]+/g, - // cspell: disable-line - (s) => `` - ), - labelStyle: style.replace("fill:", "color:") - }; - let vertexNode = addHtmlLabel(node); - return vertexNode; - } else { - const svgLabel = document.createElementNS("http://www.w3.org/2000/svg", "text"); - svgLabel.setAttribute("style", style.replace("color:", "fill:")); - let rows = []; - if (typeof vertexText === "string") { - rows = vertexText.split(/\\n|\n|/gi); - } else if (Array.isArray(vertexText)) { - rows = vertexText; - } else { - rows = []; - } - for (const row of rows) { - const tspan = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); - tspan.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"); - tspan.setAttribute("dy", "1em"); - tspan.setAttribute("x", "0"); - if (isTitle) { - tspan.setAttribute("class", "title-row"); - } else { - tspan.setAttribute("class", "row"); - } - tspan.textContent = row.trim(); - svgLabel.appendChild(tspan); - } - return svgLabel; - } -}; -const createLabel$1 = createLabel; -const labelHelper = async (parent, node, _classes, isNode) => { - let classes; - const useHtmlLabels = node.useHtmlLabels || (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels); - if (!_classes) { - classes = "node default"; - } else { - classes = _classes; - } - const shapeSvg = parent.insert("g").attr("class", classes).attr("id", node.domId || node.id); - const label = shapeSvg.insert("g").attr("class", "label").attr("style", node.labelStyle); - let labelText; - if (node.labelText === void 0) { - labelText = ""; - } else { - labelText = typeof node.labelText === "string" ? node.labelText : node.labelText[0]; - } - const textNode = label.node(); - let text; - if (node.labelType === "markdown") { - text = (0,_createText_2e5e7dd3_js__WEBPACK_IMPORTED_MODULE_2__.a)(label, (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.d)((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.M)(labelText), (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)()), { - useHtmlLabels, - width: node.width || (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.wrappingWidth, - classes: "markdown-node-label" - }); - } else { - text = textNode.appendChild( - createLabel$1( - (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.d)((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.M)(labelText), (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)()), - node.labelStyle, - false, - isNode - ) - ); - } - let bbox = text.getBBox(); - const halfPadding = node.padding / 2; - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { - const div = text.children[0]; - const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(text); - const images = div.getElementsByTagName("img"); - if (images) { - const noImgText = labelText.replace(/]*>/g, "").trim() === ""; - await Promise.all( - [...images].map( - (img) => new Promise((res) => { - function setupImage() { - img.style.display = "flex"; - img.style.flexDirection = "column"; - if (noImgText) { - const bodyFontSize = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().fontSize ? (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().fontSize : window.getComputedStyle(document.body).fontSize; - const enlargingFactor = 5; - const width = parseInt(bodyFontSize, 10) * enlargingFactor + "px"; - img.style.minWidth = width; - img.style.maxWidth = width; - } else { - img.style.width = "100%"; - } - res(img); - } - setTimeout(() => { - if (img.complete) { - setupImage(); - } - }); - img.addEventListener("error", setupImage); - img.addEventListener("load", setupImage); - }) - ) - ); - } - bbox = div.getBoundingClientRect(); - dv.attr("width", bbox.width); - dv.attr("height", bbox.height); - } - if (useHtmlLabels) { - label.attr("transform", "translate(" + -bbox.width / 2 + ", " + -bbox.height / 2 + ")"); - } else { - label.attr("transform", "translate(0, " + -bbox.height / 2 + ")"); - } - if (node.centerLabel) { - label.attr("transform", "translate(" + -bbox.width / 2 + ", " + -bbox.height / 2 + ")"); - } - label.insert("rect", ":first-child"); - return { shapeSvg, bbox, halfPadding, label }; -}; -const updateNodeBounds = (node, element) => { - const bbox = element.node().getBBox(); - node.width = bbox.width; - node.height = bbox.height; -}; -function insertPolygonShape(parent, w, h, points) { - return parent.insert("polygon", ":first-child").attr( - "points", - points.map(function(d) { - return d.x + "," + d.y; - }).join(" ") - ).attr("class", "label-container").attr("transform", "translate(" + -w / 2 + "," + h / 2 + ")"); -} -function intersectNode(node, point2) { - return node.intersect(point2); -} -function intersectEllipse(node, rx, ry, point2) { - var cx = node.x; - var cy = node.y; - var px = cx - point2.x; - var py = cy - point2.y; - var det = Math.sqrt(rx * rx * py * py + ry * ry * px * px); - var dx = Math.abs(rx * ry * px / det); - if (point2.x < cx) { - dx = -dx; - } - var dy = Math.abs(rx * ry * py / det); - if (point2.y < cy) { - dy = -dy; - } - return { x: cx + dx, y: cy + dy }; -} -function intersectCircle(node, rx, point2) { - return intersectEllipse(node, rx, rx, point2); -} -function intersectLine(p1, p2, q1, q2) { - var a1, a2, b1, b2, c1, c2; - var r1, r2, r3, r4; - var denom, offset, num; - var x, y; - a1 = p2.y - p1.y; - b1 = p1.x - p2.x; - c1 = p2.x * p1.y - p1.x * p2.y; - r3 = a1 * q1.x + b1 * q1.y + c1; - r4 = a1 * q2.x + b1 * q2.y + c1; - if (r3 !== 0 && r4 !== 0 && sameSign(r3, r4)) { - return; - } - a2 = q2.y - q1.y; - b2 = q1.x - q2.x; - c2 = q2.x * q1.y - q1.x * q2.y; - r1 = a2 * p1.x + b2 * p1.y + c2; - r2 = a2 * p2.x + b2 * p2.y + c2; - if (r1 !== 0 && r2 !== 0 && sameSign(r1, r2)) { - return; - } - denom = a1 * b2 - a2 * b1; - if (denom === 0) { - return; - } - offset = Math.abs(denom / 2); - num = b1 * c2 - b2 * c1; - x = num < 0 ? (num - offset) / denom : (num + offset) / denom; - num = a2 * c1 - a1 * c2; - y = num < 0 ? (num - offset) / denom : (num + offset) / denom; - return { x, y }; -} -function sameSign(r1, r2) { - return r1 * r2 > 0; -} -function intersectPolygon(node, polyPoints, point2) { - var x1 = node.x; - var y1 = node.y; - var intersections = []; - var minX = Number.POSITIVE_INFINITY; - var minY = Number.POSITIVE_INFINITY; - if (typeof polyPoints.forEach === "function") { - polyPoints.forEach(function(entry) { - minX = Math.min(minX, entry.x); - minY = Math.min(minY, entry.y); - }); - } else { - minX = Math.min(minX, polyPoints.x); - minY = Math.min(minY, polyPoints.y); - } - var left = x1 - node.width / 2 - minX; - var top = y1 - node.height / 2 - minY; - for (var i = 0; i < polyPoints.length; i++) { - var p1 = polyPoints[i]; - var p2 = polyPoints[i < polyPoints.length - 1 ? i + 1 : 0]; - var intersect2 = intersectLine( - node, - point2, - { x: left + p1.x, y: top + p1.y }, - { x: left + p2.x, y: top + p2.y } - ); - if (intersect2) { - intersections.push(intersect2); - } - } - if (!intersections.length) { - return node; - } - if (intersections.length > 1) { - intersections.sort(function(p, q) { - var pdx = p.x - point2.x; - var pdy = p.y - point2.y; - var distp = Math.sqrt(pdx * pdx + pdy * pdy); - var qdx = q.x - point2.x; - var qdy = q.y - point2.y; - var distq = Math.sqrt(qdx * qdx + qdy * qdy); - return distp < distq ? -1 : distp === distq ? 0 : 1; - }); - } - return intersections[0]; -} -const intersectRect = (node, point2) => { - var x = node.x; - var y = node.y; - var dx = point2.x - x; - var dy = point2.y - y; - var w = node.width / 2; - var h = node.height / 2; - var sx, sy; - if (Math.abs(dy) * w > Math.abs(dx) * h) { - if (dy < 0) { - h = -h; - } - sx = dy === 0 ? 0 : h * dx / dy; - sy = h; - } else { - if (dx < 0) { - w = -w; - } - sx = w; - sy = dx === 0 ? 0 : w * dy / dx; - } - return { x: x + sx, y: y + sy }; -}; -const intersectRect$1 = intersectRect; -const intersect = { - node: intersectNode, - circle: intersectCircle, - ellipse: intersectEllipse, - polygon: intersectPolygon, - rect: intersectRect$1 -}; -const note = async (parent, node) => { - const useHtmlLabels = node.useHtmlLabels || (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels; - if (!useHtmlLabels) { - node.centerLabel = true; - } - const { shapeSvg, bbox, halfPadding } = await labelHelper( - parent, - node, - "node " + node.classes, - true - ); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Classes = ", node.classes); - const rect2 = shapeSvg.insert("rect", ":first-child"); - rect2.attr("rx", node.rx).attr("ry", node.ry).attr("x", -bbox.width / 2 - halfPadding).attr("y", -bbox.height / 2 - halfPadding).attr("width", bbox.width + node.padding).attr("height", bbox.height + node.padding); - updateNodeBounds(node, rect2); - node.intersect = function(point2) { - return intersect.rect(node, point2); - }; - return shapeSvg; -}; -const note$1 = note; -const expandAndDeduplicateDirections = (directions) => { - const uniqueDirections = /* @__PURE__ */ new Set(); - for (const direction of directions) { - switch (direction) { - case "x": - uniqueDirections.add("right"); - uniqueDirections.add("left"); - break; - case "y": - uniqueDirections.add("up"); - uniqueDirections.add("down"); - break; - default: - uniqueDirections.add(direction); - break; - } - } - return uniqueDirections; -}; -const getArrowPoints = (duplicatedDirections, bbox, node) => { - const directions = expandAndDeduplicateDirections(duplicatedDirections); - const f = 2; - const height = bbox.height + 2 * node.padding; - const midpoint = height / f; - const width = bbox.width + 2 * midpoint + node.padding; - const padding = node.padding / 2; - if (directions.has("right") && directions.has("left") && directions.has("up") && directions.has("down")) { - return [ - // Bottom - { x: 0, y: 0 }, - { x: midpoint, y: 0 }, - { x: width / 2, y: 2 * padding }, - { x: width - midpoint, y: 0 }, - { x: width, y: 0 }, - // Right - { x: width, y: -height / 3 }, - { x: width + 2 * padding, y: -height / 2 }, - { x: width, y: -2 * height / 3 }, - { x: width, y: -height }, - // Top - { x: width - midpoint, y: -height }, - { x: width / 2, y: -height - 2 * padding }, - { x: midpoint, y: -height }, - // Left - { x: 0, y: -height }, - { x: 0, y: -2 * height / 3 }, - { x: -2 * padding, y: -height / 2 }, - { x: 0, y: -height / 3 } - ]; - } - if (directions.has("right") && directions.has("left") && directions.has("up")) { - return [ - { x: midpoint, y: 0 }, - { x: width - midpoint, y: 0 }, - { x: width, y: -height / 2 }, - { x: width - midpoint, y: -height }, - { x: midpoint, y: -height }, - { x: 0, y: -height / 2 } - ]; - } - if (directions.has("right") && directions.has("left") && directions.has("down")) { - return [ - { x: 0, y: 0 }, - { x: midpoint, y: -height }, - { x: width - midpoint, y: -height }, - { x: width, y: 0 } - ]; - } - if (directions.has("right") && directions.has("up") && directions.has("down")) { - return [ - { x: 0, y: 0 }, - { x: width, y: -midpoint }, - { x: width, y: -height + midpoint }, - { x: 0, y: -height } - ]; - } - if (directions.has("left") && directions.has("up") && directions.has("down")) { - return [ - { x: width, y: 0 }, - { x: 0, y: -midpoint }, - { x: 0, y: -height + midpoint }, - { x: width, y: -height } - ]; - } - if (directions.has("right") && directions.has("left")) { - return [ - { x: midpoint, y: 0 }, - { x: midpoint, y: -padding }, - { x: width - midpoint, y: -padding }, - { x: width - midpoint, y: 0 }, - { x: width, y: -height / 2 }, - { x: width - midpoint, y: -height }, - { x: width - midpoint, y: -height + padding }, - { x: midpoint, y: -height + padding }, - { x: midpoint, y: -height }, - { x: 0, y: -height / 2 } - ]; - } - if (directions.has("up") && directions.has("down")) { - return [ - // Bottom center - { x: width / 2, y: 0 }, - // Left pont of bottom arrow - { x: 0, y: -padding }, - { x: midpoint, y: -padding }, - // Left top over vertical section - { x: midpoint, y: -height + padding }, - { x: 0, y: -height + padding }, - // Top of arrow - { x: width / 2, y: -height }, - { x: width, y: -height + padding }, - // Top of right vertical bar - { x: width - midpoint, y: -height + padding }, - { x: width - midpoint, y: -padding }, - { x: width, y: -padding } - ]; - } - if (directions.has("right") && directions.has("up")) { - return [ - { x: 0, y: 0 }, - { x: width, y: -midpoint }, - { x: 0, y: -height } - ]; - } - if (directions.has("right") && directions.has("down")) { - return [ - { x: 0, y: 0 }, - { x: width, y: 0 }, - { x: 0, y: -height } - ]; - } - if (directions.has("left") && directions.has("up")) { - return [ - { x: width, y: 0 }, - { x: 0, y: -midpoint }, - { x: width, y: -height } - ]; - } - if (directions.has("left") && directions.has("down")) { - return [ - { x: width, y: 0 }, - { x: 0, y: 0 }, - { x: width, y: -height } - ]; - } - if (directions.has("right")) { - return [ - { x: midpoint, y: -padding }, - { x: midpoint, y: -padding }, - { x: width - midpoint, y: -padding }, - { x: width - midpoint, y: 0 }, - { x: width, y: -height / 2 }, - { x: width - midpoint, y: -height }, - { x: width - midpoint, y: -height + padding }, - // top left corner of arrow - { x: midpoint, y: -height + padding }, - { x: midpoint, y: -height + padding } - ]; - } - if (directions.has("left")) { - return [ - { x: midpoint, y: 0 }, - { x: midpoint, y: -padding }, - // Two points, the right corners - { x: width - midpoint, y: -padding }, - { x: width - midpoint, y: -height + padding }, - { x: midpoint, y: -height + padding }, - { x: midpoint, y: -height }, - { x: 0, y: -height / 2 } - ]; - } - if (directions.has("up")) { - return [ - // Bottom center - { x: midpoint, y: -padding }, - // Left top over vertical section - { x: midpoint, y: -height + padding }, - { x: 0, y: -height + padding }, - // Top of arrow - { x: width / 2, y: -height }, - { x: width, y: -height + padding }, - // Top of right vertical bar - { x: width - midpoint, y: -height + padding }, - { x: width - midpoint, y: -padding } - ]; - } - if (directions.has("down")) { - return [ - // Bottom center - { x: width / 2, y: 0 }, - // Left pont of bottom arrow - { x: 0, y: -padding }, - { x: midpoint, y: -padding }, - // Left top over vertical section - { x: midpoint, y: -height + padding }, - { x: width - midpoint, y: -height + padding }, - { x: width - midpoint, y: -padding }, - { x: width, y: -padding } - ]; - } - return [{ x: 0, y: 0 }]; -}; -const formatClass = (str) => { - if (str) { - return " " + str; - } - return ""; -}; -const getClassesFromNode = (node, otherClasses) => { - return `${otherClasses ? otherClasses : "node default"}${formatClass(node.classes)} ${formatClass( - node.class - )}`; -}; -const question = async (parent, node) => { - const { shapeSvg, bbox } = await labelHelper( - parent, - node, - getClassesFromNode(node, void 0), - true - ); - const w = bbox.width + node.padding; - const h = bbox.height + node.padding; - const s = w + h; - const points = [ - { x: s / 2, y: 0 }, - { x: s, y: -s / 2 }, - { x: s / 2, y: -s }, - { x: 0, y: -s / 2 } - ]; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Question main (Circle)"); - const questionElem = insertPolygonShape(shapeSvg, s, s, points); - questionElem.attr("style", node.style); - updateNodeBounds(node, questionElem); - node.intersect = function(point2) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.warn("Intersect called"); - return intersect.polygon(node, points, point2); - }; - return shapeSvg; -}; -const choice = (parent, node) => { - const shapeSvg = parent.insert("g").attr("class", "node default").attr("id", node.domId || node.id); - const s = 28; - const points = [ - { x: 0, y: s / 2 }, - { x: s / 2, y: 0 }, - { x: 0, y: -s / 2 }, - { x: -s / 2, y: 0 } - ]; - const choice2 = shapeSvg.insert("polygon", ":first-child").attr( - "points", - points.map(function(d) { - return d.x + "," + d.y; - }).join(" ") - ); - choice2.attr("class", "state-start").attr("r", 7).attr("width", 28).attr("height", 28); - node.width = 28; - node.height = 28; - node.intersect = function(point2) { - return intersect.circle(node, 14, point2); - }; - return shapeSvg; -}; -const hexagon = async (parent, node) => { - const { shapeSvg, bbox } = await labelHelper( - parent, - node, - getClassesFromNode(node, void 0), - true - ); - const f = 4; - const h = bbox.height + node.padding; - const m = h / f; - const w = bbox.width + 2 * m + node.padding; - const points = [ - { x: m, y: 0 }, - { x: w - m, y: 0 }, - { x: w, y: -h / 2 }, - { x: w - m, y: -h }, - { x: m, y: -h }, - { x: 0, y: -h / 2 } - ]; - const hex = insertPolygonShape(shapeSvg, w, h, points); - hex.attr("style", node.style); - updateNodeBounds(node, hex); - node.intersect = function(point2) { - return intersect.polygon(node, points, point2); - }; - return shapeSvg; -}; -const block_arrow = async (parent, node) => { - const { shapeSvg, bbox } = await labelHelper(parent, node, void 0, true); - const f = 2; - const h = bbox.height + 2 * node.padding; - const m = h / f; - const w = bbox.width + 2 * m + node.padding; - const points = getArrowPoints(node.directions, bbox, node); - const blockArrow = insertPolygonShape(shapeSvg, w, h, points); - blockArrow.attr("style", node.style); - updateNodeBounds(node, blockArrow); - node.intersect = function(point2) { - return intersect.polygon(node, points, point2); - }; - return shapeSvg; -}; -const rect_left_inv_arrow = async (parent, node) => { - const { shapeSvg, bbox } = await labelHelper( - parent, - node, - getClassesFromNode(node, void 0), - true - ); - const w = bbox.width + node.padding; - const h = bbox.height + node.padding; - const points = [ - { x: -h / 2, y: 0 }, - { x: w, y: 0 }, - { x: w, y: -h }, - { x: -h / 2, y: -h }, - { x: 0, y: -h / 2 } - ]; - const el = insertPolygonShape(shapeSvg, w, h, points); - el.attr("style", node.style); - node.width = w + h; - node.height = h; - node.intersect = function(point2) { - return intersect.polygon(node, points, point2); - }; - return shapeSvg; -}; -const lean_right = async (parent, node) => { - const { shapeSvg, bbox } = await labelHelper(parent, node, getClassesFromNode(node), true); - const w = bbox.width + node.padding; - const h = bbox.height + node.padding; - const points = [ - { x: -2 * h / 6, y: 0 }, - { x: w - h / 6, y: 0 }, - { x: w + 2 * h / 6, y: -h }, - { x: h / 6, y: -h } - ]; - const el = insertPolygonShape(shapeSvg, w, h, points); - el.attr("style", node.style); - updateNodeBounds(node, el); - node.intersect = function(point2) { - return intersect.polygon(node, points, point2); - }; - return shapeSvg; -}; -const lean_left = async (parent, node) => { - const { shapeSvg, bbox } = await labelHelper( - parent, - node, - getClassesFromNode(node, void 0), - true - ); - const w = bbox.width + node.padding; - const h = bbox.height + node.padding; - const points = [ - { x: 2 * h / 6, y: 0 }, - { x: w + h / 6, y: 0 }, - { x: w - 2 * h / 6, y: -h }, - { x: -h / 6, y: -h } - ]; - const el = insertPolygonShape(shapeSvg, w, h, points); - el.attr("style", node.style); - updateNodeBounds(node, el); - node.intersect = function(point2) { - return intersect.polygon(node, points, point2); - }; - return shapeSvg; -}; -const trapezoid = async (parent, node) => { - const { shapeSvg, bbox } = await labelHelper( - parent, - node, - getClassesFromNode(node, void 0), - true - ); - const w = bbox.width + node.padding; - const h = bbox.height + node.padding; - const points = [ - { x: -2 * h / 6, y: 0 }, - { x: w + 2 * h / 6, y: 0 }, - { x: w - h / 6, y: -h }, - { x: h / 6, y: -h } - ]; - const el = insertPolygonShape(shapeSvg, w, h, points); - el.attr("style", node.style); - updateNodeBounds(node, el); - node.intersect = function(point2) { - return intersect.polygon(node, points, point2); - }; - return shapeSvg; -}; -const inv_trapezoid = async (parent, node) => { - const { shapeSvg, bbox } = await labelHelper( - parent, - node, - getClassesFromNode(node, void 0), - true - ); - const w = bbox.width + node.padding; - const h = bbox.height + node.padding; - const points = [ - { x: h / 6, y: 0 }, - { x: w - h / 6, y: 0 }, - { x: w + 2 * h / 6, y: -h }, - { x: -2 * h / 6, y: -h } - ]; - const el = insertPolygonShape(shapeSvg, w, h, points); - el.attr("style", node.style); - updateNodeBounds(node, el); - node.intersect = function(point2) { - return intersect.polygon(node, points, point2); - }; - return shapeSvg; -}; -const rect_right_inv_arrow = async (parent, node) => { - const { shapeSvg, bbox } = await labelHelper( - parent, - node, - getClassesFromNode(node, void 0), - true - ); - const w = bbox.width + node.padding; - const h = bbox.height + node.padding; - const points = [ - { x: 0, y: 0 }, - { x: w + h / 2, y: 0 }, - { x: w, y: -h / 2 }, - { x: w + h / 2, y: -h }, - { x: 0, y: -h } - ]; - const el = insertPolygonShape(shapeSvg, w, h, points); - el.attr("style", node.style); - updateNodeBounds(node, el); - node.intersect = function(point2) { - return intersect.polygon(node, points, point2); - }; - return shapeSvg; -}; -const cylinder = async (parent, node) => { - const { shapeSvg, bbox } = await labelHelper( - parent, - node, - getClassesFromNode(node, void 0), - true - ); - const w = bbox.width + node.padding; - const rx = w / 2; - const ry = rx / (2.5 + w / 50); - const h = bbox.height + ry + node.padding; - const shape = "M 0," + ry + " a " + rx + "," + ry + " 0,0,0 " + w + " 0 a " + rx + "," + ry + " 0,0,0 " + -w + " 0 l 0," + h + " a " + rx + "," + ry + " 0,0,0 " + w + " 0 l 0," + -h; - const el = shapeSvg.attr("label-offset-y", ry).insert("path", ":first-child").attr("style", node.style).attr("d", shape).attr("transform", "translate(" + -w / 2 + "," + -(h / 2 + ry) + ")"); - updateNodeBounds(node, el); - node.intersect = function(point2) { - const pos = intersect.rect(node, point2); - const x = pos.x - node.x; - if (rx != 0 && (Math.abs(x) < node.width / 2 || Math.abs(x) == node.width / 2 && Math.abs(pos.y - node.y) > node.height / 2 - ry)) { - let y = ry * ry * (1 - x * x / (rx * rx)); - if (y != 0) { - y = Math.sqrt(y); - } - y = ry - y; - if (point2.y - node.y > 0) { - y = -y; - } - pos.y += y; - } - return pos; - }; - return shapeSvg; -}; -const rect = async (parent, node) => { - const { shapeSvg, bbox, halfPadding } = await labelHelper( - parent, - node, - "node " + node.classes + " " + node.class, - true - ); - const rect2 = shapeSvg.insert("rect", ":first-child"); - const totalWidth = node.positioned ? node.width : bbox.width + node.padding; - const totalHeight = node.positioned ? node.height : bbox.height + node.padding; - const x = node.positioned ? -totalWidth / 2 : -bbox.width / 2 - halfPadding; - const y = node.positioned ? -totalHeight / 2 : -bbox.height / 2 - halfPadding; - rect2.attr("class", "basic label-container").attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("x", x).attr("y", y).attr("width", totalWidth).attr("height", totalHeight); - if (node.props) { - const propKeys = new Set(Object.keys(node.props)); - if (node.props.borders) { - applyNodePropertyBorders(rect2, node.props.borders, totalWidth, totalHeight); - propKeys.delete("borders"); - } - propKeys.forEach((propKey) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.warn(`Unknown node property ${propKey}`); - }); - } - updateNodeBounds(node, rect2); - node.intersect = function(point2) { - return intersect.rect(node, point2); - }; - return shapeSvg; -}; -const composite = async (parent, node) => { - const { shapeSvg, bbox, halfPadding } = await labelHelper( - parent, - node, - "node " + node.classes, - true - ); - const rect2 = shapeSvg.insert("rect", ":first-child"); - const totalWidth = node.positioned ? node.width : bbox.width + node.padding; - const totalHeight = node.positioned ? node.height : bbox.height + node.padding; - const x = node.positioned ? -totalWidth / 2 : -bbox.width / 2 - halfPadding; - const y = node.positioned ? -totalHeight / 2 : -bbox.height / 2 - halfPadding; - rect2.attr("class", "basic cluster composite label-container").attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("x", x).attr("y", y).attr("width", totalWidth).attr("height", totalHeight); - if (node.props) { - const propKeys = new Set(Object.keys(node.props)); - if (node.props.borders) { - applyNodePropertyBorders(rect2, node.props.borders, totalWidth, totalHeight); - propKeys.delete("borders"); - } - propKeys.forEach((propKey) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.warn(`Unknown node property ${propKey}`); - }); - } - updateNodeBounds(node, rect2); - node.intersect = function(point2) { - return intersect.rect(node, point2); - }; - return shapeSvg; -}; -const labelRect = async (parent, node) => { - const { shapeSvg } = await labelHelper(parent, node, "label", true); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.trace("Classes = ", node.class); - const rect2 = shapeSvg.insert("rect", ":first-child"); - const totalWidth = 0; - const totalHeight = 0; - rect2.attr("width", totalWidth).attr("height", totalHeight); - shapeSvg.attr("class", "label edgeLabel"); - if (node.props) { - const propKeys = new Set(Object.keys(node.props)); - if (node.props.borders) { - applyNodePropertyBorders(rect2, node.props.borders, totalWidth, totalHeight); - propKeys.delete("borders"); - } - propKeys.forEach((propKey) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.warn(`Unknown node property ${propKey}`); - }); - } - updateNodeBounds(node, rect2); - node.intersect = function(point2) { - return intersect.rect(node, point2); - }; - return shapeSvg; -}; -function applyNodePropertyBorders(rect2, borders, totalWidth, totalHeight) { - const strokeDashArray = []; - const addBorder = (length) => { - strokeDashArray.push(length, 0); - }; - const skipBorder = (length) => { - strokeDashArray.push(0, length); - }; - if (borders.includes("t")) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("add top border"); - addBorder(totalWidth); - } else { - skipBorder(totalWidth); - } - if (borders.includes("r")) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("add right border"); - addBorder(totalHeight); - } else { - skipBorder(totalHeight); - } - if (borders.includes("b")) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("add bottom border"); - addBorder(totalWidth); - } else { - skipBorder(totalWidth); - } - if (borders.includes("l")) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("add left border"); - addBorder(totalHeight); - } else { - skipBorder(totalHeight); - } - rect2.attr("stroke-dasharray", strokeDashArray.join(" ")); -} -const rectWithTitle = (parent, node) => { - let classes; - if (!node.classes) { - classes = "node default"; - } else { - classes = "node " + node.classes; - } - const shapeSvg = parent.insert("g").attr("class", classes).attr("id", node.domId || node.id); - const rect2 = shapeSvg.insert("rect", ":first-child"); - const innerLine = shapeSvg.insert("line"); - const label = shapeSvg.insert("g").attr("class", "label"); - const text2 = node.labelText.flat ? node.labelText.flat() : node.labelText; - let title = ""; - if (typeof text2 === "object") { - title = text2[0]; - } else { - title = text2; - } - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Label text abc79", title, text2, typeof text2 === "object"); - const text = label.node().appendChild(createLabel$1(title, node.labelStyle, true, true)); - let bbox = { width: 0, height: 0 }; - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { - const div = text.children[0]; - const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(text); - bbox = div.getBoundingClientRect(); - dv.attr("width", bbox.width); - dv.attr("height", bbox.height); - } - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Text 2", text2); - const textRows = text2.slice(1, text2.length); - let titleBox = text.getBBox(); - const descr = label.node().appendChild( - createLabel$1(textRows.join ? textRows.join("
    ") : textRows, node.labelStyle, true, true) - ); - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { - const div = descr.children[0]; - const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(descr); - bbox = div.getBoundingClientRect(); - dv.attr("width", bbox.width); - dv.attr("height", bbox.height); - } - const halfPadding = node.padding / 2; - (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(descr).attr( - "transform", - "translate( " + // (titleBox.width - bbox.width) / 2 + - (bbox.width > titleBox.width ? 0 : (titleBox.width - bbox.width) / 2) + ", " + (titleBox.height + halfPadding + 5) + ")" - ); - (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(text).attr( - "transform", - "translate( " + // (titleBox.width - bbox.width) / 2 + - (bbox.width < titleBox.width ? 0 : -(titleBox.width - bbox.width) / 2) + ", 0)" - ); - bbox = label.node().getBBox(); - label.attr( - "transform", - "translate(" + -bbox.width / 2 + ", " + (-bbox.height / 2 - halfPadding + 3) + ")" - ); - rect2.attr("class", "outer title-state").attr("x", -bbox.width / 2 - halfPadding).attr("y", -bbox.height / 2 - halfPadding).attr("width", bbox.width + node.padding).attr("height", bbox.height + node.padding); - innerLine.attr("class", "divider").attr("x1", -bbox.width / 2 - halfPadding).attr("x2", bbox.width / 2 + halfPadding).attr("y1", -bbox.height / 2 - halfPadding + titleBox.height + halfPadding).attr("y2", -bbox.height / 2 - halfPadding + titleBox.height + halfPadding); - updateNodeBounds(node, rect2); - node.intersect = function(point2) { - return intersect.rect(node, point2); - }; - return shapeSvg; -}; -const stadium = async (parent, node) => { - const { shapeSvg, bbox } = await labelHelper( - parent, - node, - getClassesFromNode(node, void 0), - true - ); - const h = bbox.height + node.padding; - const w = bbox.width + h / 4 + node.padding; - const rect2 = shapeSvg.insert("rect", ":first-child").attr("style", node.style).attr("rx", h / 2).attr("ry", h / 2).attr("x", -w / 2).attr("y", -h / 2).attr("width", w).attr("height", h); - updateNodeBounds(node, rect2); - node.intersect = function(point2) { - return intersect.rect(node, point2); - }; - return shapeSvg; -}; -const circle = async (parent, node) => { - const { shapeSvg, bbox, halfPadding } = await labelHelper( - parent, - node, - getClassesFromNode(node, void 0), - true - ); - const circle2 = shapeSvg.insert("circle", ":first-child"); - circle2.attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("r", bbox.width / 2 + halfPadding).attr("width", bbox.width + node.padding).attr("height", bbox.height + node.padding); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Circle main"); - updateNodeBounds(node, circle2); - node.intersect = function(point2) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Circle intersect", node, bbox.width / 2 + halfPadding, point2); - return intersect.circle(node, bbox.width / 2 + halfPadding, point2); - }; - return shapeSvg; -}; -const doublecircle = async (parent, node) => { - const { shapeSvg, bbox, halfPadding } = await labelHelper( - parent, - node, - getClassesFromNode(node, void 0), - true - ); - const gap = 5; - const circleGroup = shapeSvg.insert("g", ":first-child"); - const outerCircle = circleGroup.insert("circle"); - const innerCircle = circleGroup.insert("circle"); - circleGroup.attr("class", node.class); - outerCircle.attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("r", bbox.width / 2 + halfPadding + gap).attr("width", bbox.width + node.padding + gap * 2).attr("height", bbox.height + node.padding + gap * 2); - innerCircle.attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("r", bbox.width / 2 + halfPadding).attr("width", bbox.width + node.padding).attr("height", bbox.height + node.padding); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.info("DoubleCircle main"); - updateNodeBounds(node, outerCircle); - node.intersect = function(point2) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.info("DoubleCircle intersect", node, bbox.width / 2 + halfPadding + gap, point2); - return intersect.circle(node, bbox.width / 2 + halfPadding + gap, point2); - }; - return shapeSvg; -}; -const subroutine = async (parent, node) => { - const { shapeSvg, bbox } = await labelHelper( - parent, - node, - getClassesFromNode(node, void 0), - true - ); - const w = bbox.width + node.padding; - const h = bbox.height + node.padding; - const points = [ - { x: 0, y: 0 }, - { x: w, y: 0 }, - { x: w, y: -h }, - { x: 0, y: -h }, - { x: 0, y: 0 }, - { x: -8, y: 0 }, - { x: w + 8, y: 0 }, - { x: w + 8, y: -h }, - { x: -8, y: -h }, - { x: -8, y: 0 } - ]; - const el = insertPolygonShape(shapeSvg, w, h, points); - el.attr("style", node.style); - updateNodeBounds(node, el); - node.intersect = function(point2) { - return intersect.polygon(node, points, point2); - }; - return shapeSvg; -}; -const start = (parent, node) => { - const shapeSvg = parent.insert("g").attr("class", "node default").attr("id", node.domId || node.id); - const circle2 = shapeSvg.insert("circle", ":first-child"); - circle2.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14); - updateNodeBounds(node, circle2); - node.intersect = function(point2) { - return intersect.circle(node, 7, point2); - }; - return shapeSvg; -}; -const forkJoin = (parent, node, dir) => { - const shapeSvg = parent.insert("g").attr("class", "node default").attr("id", node.domId || node.id); - let width = 70; - let height = 10; - if (dir === "LR") { - width = 10; - height = 70; - } - const shape = shapeSvg.append("rect").attr("x", -1 * width / 2).attr("y", -1 * height / 2).attr("width", width).attr("height", height).attr("class", "fork-join"); - updateNodeBounds(node, shape); - node.height = node.height + node.padding / 2; - node.width = node.width + node.padding / 2; - node.intersect = function(point2) { - return intersect.rect(node, point2); - }; - return shapeSvg; -}; -const end = (parent, node) => { - const shapeSvg = parent.insert("g").attr("class", "node default").attr("id", node.domId || node.id); - const innerCircle = shapeSvg.insert("circle", ":first-child"); - const circle2 = shapeSvg.insert("circle", ":first-child"); - circle2.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14); - innerCircle.attr("class", "state-end").attr("r", 5).attr("width", 10).attr("height", 10); - updateNodeBounds(node, circle2); - node.intersect = function(point2) { - return intersect.circle(node, 7, point2); - }; - return shapeSvg; -}; -const class_box = (parent, node) => { - const halfPadding = node.padding / 2; - const rowPadding = 4; - const lineHeight = 8; - let classes; - if (!node.classes) { - classes = "node default"; - } else { - classes = "node " + node.classes; - } - const shapeSvg = parent.insert("g").attr("class", classes).attr("id", node.domId || node.id); - const rect2 = shapeSvg.insert("rect", ":first-child"); - const topLine = shapeSvg.insert("line"); - const bottomLine = shapeSvg.insert("line"); - let maxWidth = 0; - let maxHeight = rowPadding; - const labelContainer = shapeSvg.insert("g").attr("class", "label"); - let verticalPos = 0; - const hasInterface = node.classData.annotations && node.classData.annotations[0]; - const interfaceLabelText = node.classData.annotations[0] ? "«" + node.classData.annotations[0] + "»" : ""; - const interfaceLabel = labelContainer.node().appendChild(createLabel$1(interfaceLabelText, node.labelStyle, true, true)); - let interfaceBBox = interfaceLabel.getBBox(); - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { - const div = interfaceLabel.children[0]; - const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(interfaceLabel); - interfaceBBox = div.getBoundingClientRect(); - dv.attr("width", interfaceBBox.width); - dv.attr("height", interfaceBBox.height); - } - if (node.classData.annotations[0]) { - maxHeight += interfaceBBox.height + rowPadding; - maxWidth += interfaceBBox.width; - } - let classTitleString = node.classData.label; - if (node.classData.type !== void 0 && node.classData.type !== "") { - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels) { - classTitleString += "<" + node.classData.type + ">"; - } else { - classTitleString += "<" + node.classData.type + ">"; - } - } - const classTitleLabel = labelContainer.node().appendChild(createLabel$1(classTitleString, node.labelStyle, true, true)); - (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(classTitleLabel).attr("class", "classTitle"); - let classTitleBBox = classTitleLabel.getBBox(); - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { - const div = classTitleLabel.children[0]; - const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(classTitleLabel); - classTitleBBox = div.getBoundingClientRect(); - dv.attr("width", classTitleBBox.width); - dv.attr("height", classTitleBBox.height); - } - maxHeight += classTitleBBox.height + rowPadding; - if (classTitleBBox.width > maxWidth) { - maxWidth = classTitleBBox.width; - } - const classAttributes = []; - node.classData.members.forEach((member) => { - const parsedInfo = member.getDisplayDetails(); - let parsedText = parsedInfo.displayText; - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels) { - parsedText = parsedText.replace(//g, ">"); - } - const lbl = labelContainer.node().appendChild( - createLabel$1( - parsedText, - parsedInfo.cssStyle ? parsedInfo.cssStyle : node.labelStyle, - true, - true - ) - ); - let bbox = lbl.getBBox(); - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { - const div = lbl.children[0]; - const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(lbl); - bbox = div.getBoundingClientRect(); - dv.attr("width", bbox.width); - dv.attr("height", bbox.height); - } - if (bbox.width > maxWidth) { - maxWidth = bbox.width; - } - maxHeight += bbox.height + rowPadding; - classAttributes.push(lbl); - }); - maxHeight += lineHeight; - const classMethods = []; - node.classData.methods.forEach((member) => { - const parsedInfo = member.getDisplayDetails(); - let displayText = parsedInfo.displayText; - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels) { - displayText = displayText.replace(//g, ">"); - } - const lbl = labelContainer.node().appendChild( - createLabel$1( - displayText, - parsedInfo.cssStyle ? parsedInfo.cssStyle : node.labelStyle, - true, - true - ) - ); - let bbox = lbl.getBBox(); - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { - const div = lbl.children[0]; - const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(lbl); - bbox = div.getBoundingClientRect(); - dv.attr("width", bbox.width); - dv.attr("height", bbox.height); - } - if (bbox.width > maxWidth) { - maxWidth = bbox.width; - } - maxHeight += bbox.height + rowPadding; - classMethods.push(lbl); - }); - maxHeight += lineHeight; - if (hasInterface) { - let diffX2 = (maxWidth - interfaceBBox.width) / 2; - (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(interfaceLabel).attr( - "transform", - "translate( " + (-1 * maxWidth / 2 + diffX2) + ", " + -1 * maxHeight / 2 + ")" - ); - verticalPos = interfaceBBox.height + rowPadding; - } - let diffX = (maxWidth - classTitleBBox.width) / 2; - (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(classTitleLabel).attr( - "transform", - "translate( " + (-1 * maxWidth / 2 + diffX) + ", " + (-1 * maxHeight / 2 + verticalPos) + ")" - ); - verticalPos += classTitleBBox.height + rowPadding; - topLine.attr("class", "divider").attr("x1", -maxWidth / 2 - halfPadding).attr("x2", maxWidth / 2 + halfPadding).attr("y1", -maxHeight / 2 - halfPadding + lineHeight + verticalPos).attr("y2", -maxHeight / 2 - halfPadding + lineHeight + verticalPos); - verticalPos += lineHeight; - classAttributes.forEach((lbl) => { - (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(lbl).attr( - "transform", - "translate( " + -maxWidth / 2 + ", " + (-1 * maxHeight / 2 + verticalPos + lineHeight / 2) + ")" - ); - const memberBBox = lbl == null ? void 0 : lbl.getBBox(); - verticalPos += ((memberBBox == null ? void 0 : memberBBox.height) ?? 0) + rowPadding; - }); - verticalPos += lineHeight; - bottomLine.attr("class", "divider").attr("x1", -maxWidth / 2 - halfPadding).attr("x2", maxWidth / 2 + halfPadding).attr("y1", -maxHeight / 2 - halfPadding + lineHeight + verticalPos).attr("y2", -maxHeight / 2 - halfPadding + lineHeight + verticalPos); - verticalPos += lineHeight; - classMethods.forEach((lbl) => { - (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(lbl).attr( - "transform", - "translate( " + -maxWidth / 2 + ", " + (-1 * maxHeight / 2 + verticalPos) + ")" - ); - const memberBBox = lbl == null ? void 0 : lbl.getBBox(); - verticalPos += ((memberBBox == null ? void 0 : memberBBox.height) ?? 0) + rowPadding; - }); - rect2.attr("style", node.style).attr("class", "outer title-state").attr("x", -maxWidth / 2 - halfPadding).attr("y", -(maxHeight / 2) - halfPadding).attr("width", maxWidth + node.padding).attr("height", maxHeight + node.padding); - updateNodeBounds(node, rect2); - node.intersect = function(point2) { - return intersect.rect(node, point2); - }; - return shapeSvg; -}; -const shapes = { - rhombus: question, - composite, - question, - rect, - labelRect, - rectWithTitle, - choice, - circle, - doublecircle, - stadium, - hexagon, - block_arrow, - rect_left_inv_arrow, - lean_right, - lean_left, - trapezoid, - inv_trapezoid, - rect_right_inv_arrow, - cylinder, - start, - end, - note: note$1, - subroutine, - fork: forkJoin, - join: forkJoin, - class_box -}; -let nodeElems = {}; -const insertNode = async (elem, node, dir) => { - let newEl; - let el; - if (node.link) { - let target; - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().securityLevel === "sandbox") { - target = "_top"; - } else if (node.linkTarget) { - target = node.linkTarget || "_blank"; - } - newEl = elem.insert("svg:a").attr("xlink:href", node.link).attr("target", target); - el = await shapes[node.shape](newEl, node, dir); - } else { - el = await shapes[node.shape](elem, node, dir); - newEl = el; - } - if (node.tooltip) { - el.attr("title", node.tooltip); - } - if (node.class) { - el.attr("class", "node default " + node.class); - } - newEl.attr("data-node", "true"); - newEl.attr("data-id", node.id); - nodeElems[node.id] = newEl; - if (node.haveCallback) { - nodeElems[node.id].attr("class", nodeElems[node.id].attr("class") + " clickable"); - } - return newEl; -}; -const setNodeElem = (elem, node) => { - nodeElems[node.id] = elem; -}; -const clear$1 = () => { - nodeElems = {}; -}; -const positionNode = (node) => { - const el = nodeElems[node.id]; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.trace( - "Transforming node", - node.diff, - node, - "translate(" + (node.x - node.width / 2 - 5) + ", " + node.width / 2 + ")" - ); - const padding = 8; - const diff = node.diff || 0; - if (node.clusterNode) { - el.attr( - "transform", - "translate(" + (node.x + diff - node.width / 2) + ", " + (node.y - node.height / 2 - padding) + ")" - ); - } else { - el.attr("transform", "translate(" + node.x + ", " + node.y + ")"); - } - return diff; -}; -const getSubGraphTitleMargins = ({ - flowchart -}) => { - var _a, _b; - const subGraphTitleTopMargin = ((_a = flowchart == null ? void 0 : flowchart.subGraphTitleMargin) == null ? void 0 : _a.top) ?? 0; - const subGraphTitleBottomMargin = ((_b = flowchart == null ? void 0 : flowchart.subGraphTitleMargin) == null ? void 0 : _b.bottom) ?? 0; - const subGraphTitleTotalMargin = subGraphTitleTopMargin + subGraphTitleBottomMargin; - return { - subGraphTitleTopMargin, - subGraphTitleBottomMargin, - subGraphTitleTotalMargin - }; -}; -const markerOffsets = { - aggregation: 18, - extension: 18, - composition: 18, - dependency: 6, - lollipop: 13.5, - arrow_point: 5.3 -}; -function calculateDeltaAndAngle(point1, point2) { - if (point1 === void 0 || point2 === void 0) { - return { angle: 0, deltaX: 0, deltaY: 0 }; - } - point1 = pointTransformer(point1); - point2 = pointTransformer(point2); - const [x1, y1] = [point1.x, point1.y]; - const [x2, y2] = [point2.x, point2.y]; - const deltaX = x2 - x1; - const deltaY = y2 - y1; - return { angle: Math.atan(deltaY / deltaX), deltaX, deltaY }; -} -const pointTransformer = (data) => { - if (Array.isArray(data)) { - return { x: data[0], y: data[1] }; - } - return data; -}; -const getLineFunctionsWithOffset = (edge) => { - return { - x: function(d, i, data) { - let offset = 0; - if (i === 0 && Object.hasOwn(markerOffsets, edge.arrowTypeStart)) { - const { angle, deltaX } = calculateDeltaAndAngle(data[0], data[1]); - offset = markerOffsets[edge.arrowTypeStart] * Math.cos(angle) * (deltaX >= 0 ? 1 : -1); - } else if (i === data.length - 1 && Object.hasOwn(markerOffsets, edge.arrowTypeEnd)) { - const { angle, deltaX } = calculateDeltaAndAngle( - data[data.length - 1], - data[data.length - 2] - ); - offset = markerOffsets[edge.arrowTypeEnd] * Math.cos(angle) * (deltaX >= 0 ? 1 : -1); - } - return pointTransformer(d).x + offset; - }, - y: function(d, i, data) { - let offset = 0; - if (i === 0 && Object.hasOwn(markerOffsets, edge.arrowTypeStart)) { - const { angle, deltaY } = calculateDeltaAndAngle(data[0], data[1]); - offset = markerOffsets[edge.arrowTypeStart] * Math.abs(Math.sin(angle)) * (deltaY >= 0 ? 1 : -1); - } else if (i === data.length - 1 && Object.hasOwn(markerOffsets, edge.arrowTypeEnd)) { - const { angle, deltaY } = calculateDeltaAndAngle( - data[data.length - 1], - data[data.length - 2] - ); - offset = markerOffsets[edge.arrowTypeEnd] * Math.abs(Math.sin(angle)) * (deltaY >= 0 ? 1 : -1); - } - return pointTransformer(d).y + offset; - } - }; -}; -const addEdgeMarkers = (svgPath, edge, url, id, diagramType) => { - if (edge.arrowTypeStart) { - addEdgeMarker(svgPath, "start", edge.arrowTypeStart, url, id, diagramType); - } - if (edge.arrowTypeEnd) { - addEdgeMarker(svgPath, "end", edge.arrowTypeEnd, url, id, diagramType); - } -}; -const arrowTypesMap = { - arrow_cross: "cross", - arrow_point: "point", - arrow_barb: "barb", - arrow_circle: "circle", - aggregation: "aggregation", - extension: "extension", - composition: "composition", - dependency: "dependency", - lollipop: "lollipop" -}; -const addEdgeMarker = (svgPath, position, arrowType, url, id, diagramType) => { - const endMarkerType = arrowTypesMap[arrowType]; - if (!endMarkerType) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.warn(`Unknown arrow type: ${arrowType}`); - return; - } - const suffix = position === "start" ? "Start" : "End"; - svgPath.attr(`marker-${position}`, `url(${url}#${id}_${diagramType}-${endMarkerType}${suffix})`); -}; -let edgeLabels = {}; -let terminalLabels = {}; -const clear = () => { - edgeLabels = {}; - terminalLabels = {}; -}; -const insertEdgeLabel = (elem, edge) => { - const useHtmlLabels = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels); - const labelElement = edge.labelType === "markdown" ? (0,_createText_2e5e7dd3_js__WEBPACK_IMPORTED_MODULE_2__.a)(elem, edge.label, { - style: edge.labelStyle, - useHtmlLabels, - addSvgBackground: true - }) : createLabel$1(edge.label, edge.labelStyle); - const edgeLabel = elem.insert("g").attr("class", "edgeLabel"); - const label = edgeLabel.insert("g").attr("class", "label"); - label.node().appendChild(labelElement); - let bbox = labelElement.getBBox(); - if (useHtmlLabels) { - const div = labelElement.children[0]; - const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(labelElement); - bbox = div.getBoundingClientRect(); - dv.attr("width", bbox.width); - dv.attr("height", bbox.height); - } - label.attr("transform", "translate(" + -bbox.width / 2 + ", " + -bbox.height / 2 + ")"); - edgeLabels[edge.id] = edgeLabel; - edge.width = bbox.width; - edge.height = bbox.height; - let fo; - if (edge.startLabelLeft) { - const startLabelElement = createLabel$1(edge.startLabelLeft, edge.labelStyle); - const startEdgeLabelLeft = elem.insert("g").attr("class", "edgeTerminals"); - const inner = startEdgeLabelLeft.insert("g").attr("class", "inner"); - fo = inner.node().appendChild(startLabelElement); - const slBox = startLabelElement.getBBox(); - inner.attr("transform", "translate(" + -slBox.width / 2 + ", " + -slBox.height / 2 + ")"); - if (!terminalLabels[edge.id]) { - terminalLabels[edge.id] = {}; - } - terminalLabels[edge.id].startLeft = startEdgeLabelLeft; - setTerminalWidth(fo, edge.startLabelLeft); - } - if (edge.startLabelRight) { - const startLabelElement = createLabel$1(edge.startLabelRight, edge.labelStyle); - const startEdgeLabelRight = elem.insert("g").attr("class", "edgeTerminals"); - const inner = startEdgeLabelRight.insert("g").attr("class", "inner"); - fo = startEdgeLabelRight.node().appendChild(startLabelElement); - inner.node().appendChild(startLabelElement); - const slBox = startLabelElement.getBBox(); - inner.attr("transform", "translate(" + -slBox.width / 2 + ", " + -slBox.height / 2 + ")"); - if (!terminalLabels[edge.id]) { - terminalLabels[edge.id] = {}; - } - terminalLabels[edge.id].startRight = startEdgeLabelRight; - setTerminalWidth(fo, edge.startLabelRight); - } - if (edge.endLabelLeft) { - const endLabelElement = createLabel$1(edge.endLabelLeft, edge.labelStyle); - const endEdgeLabelLeft = elem.insert("g").attr("class", "edgeTerminals"); - const inner = endEdgeLabelLeft.insert("g").attr("class", "inner"); - fo = inner.node().appendChild(endLabelElement); - const slBox = endLabelElement.getBBox(); - inner.attr("transform", "translate(" + -slBox.width / 2 + ", " + -slBox.height / 2 + ")"); - endEdgeLabelLeft.node().appendChild(endLabelElement); - if (!terminalLabels[edge.id]) { - terminalLabels[edge.id] = {}; - } - terminalLabels[edge.id].endLeft = endEdgeLabelLeft; - setTerminalWidth(fo, edge.endLabelLeft); - } - if (edge.endLabelRight) { - const endLabelElement = createLabel$1(edge.endLabelRight, edge.labelStyle); - const endEdgeLabelRight = elem.insert("g").attr("class", "edgeTerminals"); - const inner = endEdgeLabelRight.insert("g").attr("class", "inner"); - fo = inner.node().appendChild(endLabelElement); - const slBox = endLabelElement.getBBox(); - inner.attr("transform", "translate(" + -slBox.width / 2 + ", " + -slBox.height / 2 + ")"); - endEdgeLabelRight.node().appendChild(endLabelElement); - if (!terminalLabels[edge.id]) { - terminalLabels[edge.id] = {}; - } - terminalLabels[edge.id].endRight = endEdgeLabelRight; - setTerminalWidth(fo, edge.endLabelRight); - } - return labelElement; -}; -function setTerminalWidth(fo, value) { - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels && fo) { - fo.style.width = value.length * 9 + "px"; - fo.style.height = "12px"; - } -} -const positionEdgeLabel = (edge, paths) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("Moving label abc88 ", edge.id, edge.label, edgeLabels[edge.id], paths); - let path = paths.updatedPath ? paths.updatedPath : paths.originalPath; - const siteConfig = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)(); - const { subGraphTitleTotalMargin } = getSubGraphTitleMargins(siteConfig); - if (edge.label) { - const el = edgeLabels[edge.id]; - let x = edge.x; - let y = edge.y; - if (path) { - const pos = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.u.calcLabelPosition(path); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug( - "Moving label " + edge.label + " from (", - x, - ",", - y, - ") to (", - pos.x, - ",", - pos.y, - ") abc88" - ); - if (paths.updatedPath) { - x = pos.x; - y = pos.y; - } - } - el.attr("transform", `translate(${x}, ${y + subGraphTitleTotalMargin / 2})`); - } - if (edge.startLabelLeft) { - const el = terminalLabels[edge.id].startLeft; - let x = edge.x; - let y = edge.y; - if (path) { - const pos = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.u.calcTerminalLabelPosition(edge.arrowTypeStart ? 10 : 0, "start_left", path); - x = pos.x; - y = pos.y; - } - el.attr("transform", `translate(${x}, ${y})`); - } - if (edge.startLabelRight) { - const el = terminalLabels[edge.id].startRight; - let x = edge.x; - let y = edge.y; - if (path) { - const pos = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.u.calcTerminalLabelPosition( - edge.arrowTypeStart ? 10 : 0, - "start_right", - path - ); - x = pos.x; - y = pos.y; - } - el.attr("transform", `translate(${x}, ${y})`); - } - if (edge.endLabelLeft) { - const el = terminalLabels[edge.id].endLeft; - let x = edge.x; - let y = edge.y; - if (path) { - const pos = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.u.calcTerminalLabelPosition(edge.arrowTypeEnd ? 10 : 0, "end_left", path); - x = pos.x; - y = pos.y; - } - el.attr("transform", `translate(${x}, ${y})`); - } - if (edge.endLabelRight) { - const el = terminalLabels[edge.id].endRight; - let x = edge.x; - let y = edge.y; - if (path) { - const pos = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.u.calcTerminalLabelPosition(edge.arrowTypeEnd ? 10 : 0, "end_right", path); - x = pos.x; - y = pos.y; - } - el.attr("transform", `translate(${x}, ${y})`); - } -}; -const outsideNode = (node, point2) => { - const x = node.x; - const y = node.y; - const dx = Math.abs(point2.x - x); - const dy = Math.abs(point2.y - y); - const w = node.width / 2; - const h = node.height / 2; - if (dx >= w || dy >= h) { - return true; - } - return false; -}; -const intersection = (node, outsidePoint, insidePoint) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug(`intersection calc abc89: - outsidePoint: ${JSON.stringify(outsidePoint)} - insidePoint : ${JSON.stringify(insidePoint)} - node : x:${node.x} y:${node.y} w:${node.width} h:${node.height}`); - const x = node.x; - const y = node.y; - const dx = Math.abs(x - insidePoint.x); - const w = node.width / 2; - let r = insidePoint.x < outsidePoint.x ? w - dx : w + dx; - const h = node.height / 2; - const Q = Math.abs(outsidePoint.y - insidePoint.y); - const R = Math.abs(outsidePoint.x - insidePoint.x); - if (Math.abs(y - outsidePoint.y) * w > Math.abs(x - outsidePoint.x) * h) { - let q = insidePoint.y < outsidePoint.y ? outsidePoint.y - h - y : y - h - outsidePoint.y; - r = R * q / Q; - const res = { - x: insidePoint.x < outsidePoint.x ? insidePoint.x + r : insidePoint.x - R + r, - y: insidePoint.y < outsidePoint.y ? insidePoint.y + Q - q : insidePoint.y - Q + q - }; - if (r === 0) { - res.x = outsidePoint.x; - res.y = outsidePoint.y; - } - if (R === 0) { - res.x = outsidePoint.x; - } - if (Q === 0) { - res.y = outsidePoint.y; - } - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug(`abc89 topp/bott calc, Q ${Q}, q ${q}, R ${R}, r ${r}`, res); - return res; - } else { - if (insidePoint.x < outsidePoint.x) { - r = outsidePoint.x - w - x; - } else { - r = x - w - outsidePoint.x; - } - let q = Q * r / R; - let _x = insidePoint.x < outsidePoint.x ? insidePoint.x + R - r : insidePoint.x - R + r; - let _y = insidePoint.y < outsidePoint.y ? insidePoint.y + q : insidePoint.y - q; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug(`sides calc abc89, Q ${Q}, q ${q}, R ${R}, r ${r}`, { _x, _y }); - if (r === 0) { - _x = outsidePoint.x; - _y = outsidePoint.y; - } - if (R === 0) { - _x = outsidePoint.x; - } - if (Q === 0) { - _y = outsidePoint.y; - } - return { x: _x, y: _y }; - } -}; -const cutPathAtIntersect = (_points, boundaryNode) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("abc88 cutPathAtIntersect", _points, boundaryNode); - let points = []; - let lastPointOutside = _points[0]; - let isInside = false; - _points.forEach((point2) => { - if (!outsideNode(boundaryNode, point2) && !isInside) { - const inter = intersection(boundaryNode, lastPointOutside, point2); - let pointPresent = false; - points.forEach((p) => { - pointPresent = pointPresent || p.x === inter.x && p.y === inter.y; - }); - if (!points.some((e) => e.x === inter.x && e.y === inter.y)) { - points.push(inter); - } - isInside = true; - } else { - lastPointOutside = point2; - if (!isInside) { - points.push(point2); - } - } - }); - return points; -}; -const insertEdge = function(elem, e, edge, clusterDb, diagramType, graph, id) { - let points = edge.points; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("abc88 InsertEdge: edge=", edge, "e=", e); - let pointsHasChanged = false; - const tail = graph.node(e.v); - var head = graph.node(e.w); - if ((head == null ? void 0 : head.intersect) && (tail == null ? void 0 : tail.intersect)) { - points = points.slice(1, edge.points.length - 1); - points.unshift(tail.intersect(points[0])); - points.push(head.intersect(points[points.length - 1])); - } - if (edge.toCluster) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("to cluster abc88", clusterDb[edge.toCluster]); - points = cutPathAtIntersect(edge.points, clusterDb[edge.toCluster].node); - pointsHasChanged = true; - } - if (edge.fromCluster) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("from cluster abc88", clusterDb[edge.fromCluster]); - points = cutPathAtIntersect(points.reverse(), clusterDb[edge.fromCluster].node).reverse(); - pointsHasChanged = true; - } - const lineData = points.filter((p) => !Number.isNaN(p.y)); - let curve = d3__WEBPACK_IMPORTED_MODULE_0__/* .curveBasis */ .qrM; - if (edge.curve && (diagramType === "graph" || diagramType === "flowchart")) { - curve = edge.curve; - } - const { x, y } = getLineFunctionsWithOffset(edge); - const lineFunction = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .line */ .n8j)().x(x).y(y).curve(curve); - let strokeClasses; - switch (edge.thickness) { - case "normal": - strokeClasses = "edge-thickness-normal"; - break; - case "thick": - strokeClasses = "edge-thickness-thick"; - break; - case "invisible": - strokeClasses = "edge-thickness-thick"; - break; - default: - strokeClasses = ""; - } - switch (edge.pattern) { - case "solid": - strokeClasses += " edge-pattern-solid"; - break; - case "dotted": - strokeClasses += " edge-pattern-dotted"; - break; - case "dashed": - strokeClasses += " edge-pattern-dashed"; - break; - } - const svgPath = elem.append("path").attr("d", lineFunction(lineData)).attr("id", edge.id).attr("class", " " + strokeClasses + (edge.classes ? " " + edge.classes : "")).attr("style", edge.style); - let url = ""; - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.arrowMarkerAbsolute || (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().state.arrowMarkerAbsolute) { - url = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search; - url = url.replace(/\(/g, "\\("); - url = url.replace(/\)/g, "\\)"); - } - addEdgeMarkers(svgPath, edge, url, id, diagramType); - let paths = {}; - if (pointsHasChanged) { - paths.updatedPath = points; - } - paths.originalPath = edge.points; - return paths; -}; - - - -/***/ }), - -/***/ 35860: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ d: () => (/* binding */ db), -/* harmony export */ f: () => (/* binding */ flowDb), -/* harmony export */ p: () => (/* binding */ parser$1) -/* harmony export */ }); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(26312); -/* harmony import */ var _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(86079); - - -var parser = function() { - var o = function(k, v, o2, l) { - for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) - ; - return o2; - }, $V0 = [1, 4], $V1 = [1, 3], $V2 = [1, 5], $V3 = [1, 8, 9, 10, 11, 27, 34, 36, 38, 42, 58, 81, 82, 83, 84, 85, 86, 99, 102, 103, 106, 108, 111, 112, 113, 118, 119, 120, 121], $V4 = [2, 2], $V5 = [1, 13], $V6 = [1, 14], $V7 = [1, 15], $V8 = [1, 16], $V9 = [1, 23], $Va = [1, 25], $Vb = [1, 26], $Vc = [1, 27], $Vd = [1, 49], $Ve = [1, 48], $Vf = [1, 29], $Vg = [1, 30], $Vh = [1, 31], $Vi = [1, 32], $Vj = [1, 33], $Vk = [1, 44], $Vl = [1, 46], $Vm = [1, 42], $Vn = [1, 47], $Vo = [1, 43], $Vp = [1, 50], $Vq = [1, 45], $Vr = [1, 51], $Vs = [1, 52], $Vt = [1, 34], $Vu = [1, 35], $Vv = [1, 36], $Vw = [1, 37], $Vx = [1, 57], $Vy = [1, 8, 9, 10, 11, 27, 32, 34, 36, 38, 42, 58, 81, 82, 83, 84, 85, 86, 99, 102, 103, 106, 108, 111, 112, 113, 118, 119, 120, 121], $Vz = [1, 61], $VA = [1, 60], $VB = [1, 62], $VC = [8, 9, 11, 73, 75], $VD = [1, 88], $VE = [1, 93], $VF = [1, 92], $VG = [1, 89], $VH = [1, 85], $VI = [1, 91], $VJ = [1, 87], $VK = [1, 94], $VL = [1, 90], $VM = [1, 95], $VN = [1, 86], $VO = [8, 9, 10, 11, 73, 75], $VP = [8, 9, 10, 11, 44, 73, 75], $VQ = [8, 9, 10, 11, 29, 42, 44, 46, 48, 50, 52, 54, 56, 58, 61, 63, 65, 66, 68, 73, 75, 86, 99, 102, 103, 106, 108, 111, 112, 113], $VR = [8, 9, 11, 42, 58, 73, 75, 86, 99, 102, 103, 106, 108, 111, 112, 113], $VS = [42, 58, 86, 99, 102, 103, 106, 108, 111, 112, 113], $VT = [1, 121], $VU = [1, 120], $VV = [1, 128], $VW = [1, 142], $VX = [1, 143], $VY = [1, 144], $VZ = [1, 145], $V_ = [1, 130], $V$ = [1, 132], $V01 = [1, 136], $V11 = [1, 137], $V21 = [1, 138], $V31 = [1, 139], $V41 = [1, 140], $V51 = [1, 141], $V61 = [1, 146], $V71 = [1, 147], $V81 = [1, 126], $V91 = [1, 127], $Va1 = [1, 134], $Vb1 = [1, 129], $Vc1 = [1, 133], $Vd1 = [1, 131], $Ve1 = [8, 9, 10, 11, 27, 32, 34, 36, 38, 42, 58, 81, 82, 83, 84, 85, 86, 99, 102, 103, 106, 108, 111, 112, 113, 118, 119, 120, 121], $Vf1 = [1, 149], $Vg1 = [8, 9, 11], $Vh1 = [8, 9, 10, 11, 14, 42, 58, 86, 102, 103, 106, 108, 111, 112, 113], $Vi1 = [1, 169], $Vj1 = [1, 165], $Vk1 = [1, 166], $Vl1 = [1, 170], $Vm1 = [1, 167], $Vn1 = [1, 168], $Vo1 = [75, 113, 116], $Vp1 = [8, 9, 10, 11, 12, 14, 27, 29, 32, 42, 58, 73, 81, 82, 83, 84, 85, 86, 87, 102, 106, 108, 111, 112, 113], $Vq1 = [10, 103], $Vr1 = [31, 47, 49, 51, 53, 55, 60, 62, 64, 65, 67, 69, 113, 114, 115], $Vs1 = [1, 235], $Vt1 = [1, 233], $Vu1 = [1, 237], $Vv1 = [1, 231], $Vw1 = [1, 232], $Vx1 = [1, 234], $Vy1 = [1, 236], $Vz1 = [1, 238], $VA1 = [1, 255], $VB1 = [8, 9, 11, 103], $VC1 = [8, 9, 10, 11, 58, 81, 102, 103, 106, 107, 108, 109]; - var parser2 = { - trace: function trace() { - }, - yy: {}, - symbols_: { "error": 2, "start": 3, "graphConfig": 4, "document": 5, "line": 6, "statement": 7, "SEMI": 8, "NEWLINE": 9, "SPACE": 10, "EOF": 11, "GRAPH": 12, "NODIR": 13, "DIR": 14, "FirstStmtSeparator": 15, "ending": 16, "endToken": 17, "spaceList": 18, "spaceListNewline": 19, "vertexStatement": 20, "separator": 21, "styleStatement": 22, "linkStyleStatement": 23, "classDefStatement": 24, "classStatement": 25, "clickStatement": 26, "subgraph": 27, "textNoTags": 28, "SQS": 29, "text": 30, "SQE": 31, "end": 32, "direction": 33, "acc_title": 34, "acc_title_value": 35, "acc_descr": 36, "acc_descr_value": 37, "acc_descr_multiline_value": 38, "link": 39, "node": 40, "styledVertex": 41, "AMP": 42, "vertex": 43, "STYLE_SEPARATOR": 44, "idString": 45, "DOUBLECIRCLESTART": 46, "DOUBLECIRCLEEND": 47, "PS": 48, "PE": 49, "(-": 50, "-)": 51, "STADIUMSTART": 52, "STADIUMEND": 53, "SUBROUTINESTART": 54, "SUBROUTINEEND": 55, "VERTEX_WITH_PROPS_START": 56, "NODE_STRING[field]": 57, "COLON": 58, "NODE_STRING[value]": 59, "PIPE": 60, "CYLINDERSTART": 61, "CYLINDEREND": 62, "DIAMOND_START": 63, "DIAMOND_STOP": 64, "TAGEND": 65, "TRAPSTART": 66, "TRAPEND": 67, "INVTRAPSTART": 68, "INVTRAPEND": 69, "linkStatement": 70, "arrowText": 71, "TESTSTR": 72, "START_LINK": 73, "edgeText": 74, "LINK": 75, "edgeTextToken": 76, "STR": 77, "MD_STR": 78, "textToken": 79, "keywords": 80, "STYLE": 81, "LINKSTYLE": 82, "CLASSDEF": 83, "CLASS": 84, "CLICK": 85, "DOWN": 86, "UP": 87, "textNoTagsToken": 88, "stylesOpt": 89, "idString[vertex]": 90, "idString[class]": 91, "CALLBACKNAME": 92, "CALLBACKARGS": 93, "HREF": 94, "LINK_TARGET": 95, "STR[link]": 96, "STR[tooltip]": 97, "alphaNum": 98, "DEFAULT": 99, "numList": 100, "INTERPOLATE": 101, "NUM": 102, "COMMA": 103, "style": 104, "styleComponent": 105, "NODE_STRING": 106, "UNIT": 107, "BRKT": 108, "PCT": 109, "idStringToken": 110, "MINUS": 111, "MULT": 112, "UNICODE_TEXT": 113, "TEXT": 114, "TAGSTART": 115, "EDGE_TEXT": 116, "alphaNumToken": 117, "direction_tb": 118, "direction_bt": 119, "direction_rl": 120, "direction_lr": 121, "$accept": 0, "$end": 1 }, - terminals_: { 2: "error", 8: "SEMI", 9: "NEWLINE", 10: "SPACE", 11: "EOF", 12: "GRAPH", 13: "NODIR", 14: "DIR", 27: "subgraph", 29: "SQS", 31: "SQE", 32: "end", 34: "acc_title", 35: "acc_title_value", 36: "acc_descr", 37: "acc_descr_value", 38: "acc_descr_multiline_value", 42: "AMP", 44: "STYLE_SEPARATOR", 46: "DOUBLECIRCLESTART", 47: "DOUBLECIRCLEEND", 48: "PS", 49: "PE", 50: "(-", 51: "-)", 52: "STADIUMSTART", 53: "STADIUMEND", 54: "SUBROUTINESTART", 55: "SUBROUTINEEND", 56: "VERTEX_WITH_PROPS_START", 57: "NODE_STRING[field]", 58: "COLON", 59: "NODE_STRING[value]", 60: "PIPE", 61: "CYLINDERSTART", 62: "CYLINDEREND", 63: "DIAMOND_START", 64: "DIAMOND_STOP", 65: "TAGEND", 66: "TRAPSTART", 67: "TRAPEND", 68: "INVTRAPSTART", 69: "INVTRAPEND", 72: "TESTSTR", 73: "START_LINK", 75: "LINK", 77: "STR", 78: "MD_STR", 81: "STYLE", 82: "LINKSTYLE", 83: "CLASSDEF", 84: "CLASS", 85: "CLICK", 86: "DOWN", 87: "UP", 90: "idString[vertex]", 91: "idString[class]", 92: "CALLBACKNAME", 93: "CALLBACKARGS", 94: "HREF", 95: "LINK_TARGET", 96: "STR[link]", 97: "STR[tooltip]", 99: "DEFAULT", 101: "INTERPOLATE", 102: "NUM", 103: "COMMA", 106: "NODE_STRING", 107: "UNIT", 108: "BRKT", 109: "PCT", 111: "MINUS", 112: "MULT", 113: "UNICODE_TEXT", 114: "TEXT", 115: "TAGSTART", 116: "EDGE_TEXT", 118: "direction_tb", 119: "direction_bt", 120: "direction_rl", 121: "direction_lr" }, - productions_: [0, [3, 2], [5, 0], [5, 2], [6, 1], [6, 1], [6, 1], [6, 1], [6, 1], [4, 2], [4, 2], [4, 2], [4, 3], [16, 2], [16, 1], [17, 1], [17, 1], [17, 1], [15, 1], [15, 1], [15, 2], [19, 2], [19, 2], [19, 1], [19, 1], [18, 2], [18, 1], [7, 2], [7, 2], [7, 2], [7, 2], [7, 2], [7, 2], [7, 9], [7, 6], [7, 4], [7, 1], [7, 2], [7, 2], [7, 1], [21, 1], [21, 1], [21, 1], [20, 3], [20, 4], [20, 2], [20, 1], [40, 1], [40, 5], [41, 1], [41, 3], [43, 4], [43, 4], [43, 6], [43, 4], [43, 4], [43, 4], [43, 8], [43, 4], [43, 4], [43, 4], [43, 6], [43, 4], [43, 4], [43, 4], [43, 4], [43, 4], [43, 1], [39, 2], [39, 3], [39, 3], [39, 1], [39, 3], [74, 1], [74, 2], [74, 1], [74, 1], [70, 1], [71, 3], [30, 1], [30, 2], [30, 1], [30, 1], [80, 1], [80, 1], [80, 1], [80, 1], [80, 1], [80, 1], [80, 1], [80, 1], [80, 1], [80, 1], [80, 1], [28, 1], [28, 2], [28, 1], [28, 1], [24, 5], [25, 5], [26, 2], [26, 4], [26, 3], [26, 5], [26, 3], [26, 5], [26, 5], [26, 7], [26, 2], [26, 4], [26, 2], [26, 4], [26, 4], [26, 6], [22, 5], [23, 5], [23, 5], [23, 9], [23, 9], [23, 7], [23, 7], [100, 1], [100, 3], [89, 1], [89, 3], [104, 1], [104, 2], [105, 1], [105, 1], [105, 1], [105, 1], [105, 1], [105, 1], [105, 1], [105, 1], [110, 1], [110, 1], [110, 1], [110, 1], [110, 1], [110, 1], [110, 1], [110, 1], [110, 1], [110, 1], [110, 1], [79, 1], [79, 1], [79, 1], [79, 1], [88, 1], [88, 1], [88, 1], [88, 1], [88, 1], [88, 1], [88, 1], [88, 1], [88, 1], [88, 1], [88, 1], [76, 1], [76, 1], [117, 1], [117, 1], [117, 1], [117, 1], [117, 1], [117, 1], [117, 1], [117, 1], [117, 1], [117, 1], [117, 1], [45, 1], [45, 2], [98, 1], [98, 2], [33, 1], [33, 1], [33, 1], [33, 1]], - performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { - var $0 = $$.length - 1; - switch (yystate) { - case 2: - this.$ = []; - break; - case 3: - if (!Array.isArray($$[$0]) || $$[$0].length > 0) { - $$[$0 - 1].push($$[$0]); - } - this.$ = $$[$0 - 1]; - break; - case 4: - case 176: - this.$ = $$[$0]; - break; - case 11: - yy.setDirection("TB"); - this.$ = "TB"; - break; - case 12: - yy.setDirection($$[$0 - 1]); - this.$ = $$[$0 - 1]; - break; - case 27: - this.$ = $$[$0 - 1].nodes; - break; - case 28: - case 29: - case 30: - case 31: - case 32: - this.$ = []; - break; - case 33: - this.$ = yy.addSubGraph($$[$0 - 6], $$[$0 - 1], $$[$0 - 4]); - break; - case 34: - this.$ = yy.addSubGraph($$[$0 - 3], $$[$0 - 1], $$[$0 - 3]); - break; - case 35: - this.$ = yy.addSubGraph(void 0, $$[$0 - 1], void 0); - break; - case 37: - this.$ = $$[$0].trim(); - yy.setAccTitle(this.$); - break; - case 38: - case 39: - this.$ = $$[$0].trim(); - yy.setAccDescription(this.$); - break; - case 43: - yy.addLink($$[$0 - 2].stmt, $$[$0], $$[$0 - 1]); - this.$ = { stmt: $$[$0], nodes: $$[$0].concat($$[$0 - 2].nodes) }; - break; - case 44: - yy.addLink($$[$0 - 3].stmt, $$[$0 - 1], $$[$0 - 2]); - this.$ = { stmt: $$[$0 - 1], nodes: $$[$0 - 1].concat($$[$0 - 3].nodes) }; - break; - case 45: - this.$ = { stmt: $$[$0 - 1], nodes: $$[$0 - 1] }; - break; - case 46: - this.$ = { stmt: $$[$0], nodes: $$[$0] }; - break; - case 47: - this.$ = [$$[$0]]; - break; - case 48: - this.$ = $$[$0 - 4].concat($$[$0]); - break; - case 49: - this.$ = $$[$0]; - break; - case 50: - this.$ = $$[$0 - 2]; - yy.setClass($$[$0 - 2], $$[$0]); - break; - case 51: - this.$ = $$[$0 - 3]; - yy.addVertex($$[$0 - 3], $$[$0 - 1], "square"); - break; - case 52: - this.$ = $$[$0 - 3]; - yy.addVertex($$[$0 - 3], $$[$0 - 1], "doublecircle"); - break; - case 53: - this.$ = $$[$0 - 5]; - yy.addVertex($$[$0 - 5], $$[$0 - 2], "circle"); - break; - case 54: - this.$ = $$[$0 - 3]; - yy.addVertex($$[$0 - 3], $$[$0 - 1], "ellipse"); - break; - case 55: - this.$ = $$[$0 - 3]; - yy.addVertex($$[$0 - 3], $$[$0 - 1], "stadium"); - break; - case 56: - this.$ = $$[$0 - 3]; - yy.addVertex($$[$0 - 3], $$[$0 - 1], "subroutine"); - break; - case 57: - this.$ = $$[$0 - 7]; - yy.addVertex($$[$0 - 7], $$[$0 - 1], "rect", void 0, void 0, void 0, Object.fromEntries([[$$[$0 - 5], $$[$0 - 3]]])); - break; - case 58: - this.$ = $$[$0 - 3]; - yy.addVertex($$[$0 - 3], $$[$0 - 1], "cylinder"); - break; - case 59: - this.$ = $$[$0 - 3]; - yy.addVertex($$[$0 - 3], $$[$0 - 1], "round"); - break; - case 60: - this.$ = $$[$0 - 3]; - yy.addVertex($$[$0 - 3], $$[$0 - 1], "diamond"); - break; - case 61: - this.$ = $$[$0 - 5]; - yy.addVertex($$[$0 - 5], $$[$0 - 2], "hexagon"); - break; - case 62: - this.$ = $$[$0 - 3]; - yy.addVertex($$[$0 - 3], $$[$0 - 1], "odd"); - break; - case 63: - this.$ = $$[$0 - 3]; - yy.addVertex($$[$0 - 3], $$[$0 - 1], "trapezoid"); - break; - case 64: - this.$ = $$[$0 - 3]; - yy.addVertex($$[$0 - 3], $$[$0 - 1], "inv_trapezoid"); - break; - case 65: - this.$ = $$[$0 - 3]; - yy.addVertex($$[$0 - 3], $$[$0 - 1], "lean_right"); - break; - case 66: - this.$ = $$[$0 - 3]; - yy.addVertex($$[$0 - 3], $$[$0 - 1], "lean_left"); - break; - case 67: - this.$ = $$[$0]; - yy.addVertex($$[$0]); - break; - case 68: - $$[$0 - 1].text = $$[$0]; - this.$ = $$[$0 - 1]; - break; - case 69: - case 70: - $$[$0 - 2].text = $$[$0 - 1]; - this.$ = $$[$0 - 2]; - break; - case 71: - this.$ = $$[$0]; - break; - case 72: - var inf = yy.destructLink($$[$0], $$[$0 - 2]); - this.$ = { "type": inf.type, "stroke": inf.stroke, "length": inf.length, "text": $$[$0 - 1] }; - break; - case 73: - this.$ = { text: $$[$0], type: "text" }; - break; - case 74: - this.$ = { text: $$[$0 - 1].text + "" + $$[$0], type: $$[$0 - 1].type }; - break; - case 75: - this.$ = { text: $$[$0], type: "string" }; - break; - case 76: - this.$ = { text: $$[$0], type: "markdown" }; - break; - case 77: - var inf = yy.destructLink($$[$0]); - this.$ = { "type": inf.type, "stroke": inf.stroke, "length": inf.length }; - break; - case 78: - this.$ = $$[$0 - 1]; - break; - case 79: - this.$ = { text: $$[$0], type: "text" }; - break; - case 80: - this.$ = { text: $$[$0 - 1].text + "" + $$[$0], type: $$[$0 - 1].type }; - break; - case 81: - this.$ = { text: $$[$0], type: "string" }; - break; - case 82: - case 97: - this.$ = { text: $$[$0], type: "markdown" }; - break; - case 94: - this.$ = { text: $$[$0], type: "text" }; - break; - case 95: - this.$ = { text: $$[$0 - 1].text + "" + $$[$0], type: $$[$0 - 1].type }; - break; - case 96: - this.$ = { text: $$[$0], type: "text" }; - break; - case 98: - this.$ = $$[$0 - 4]; - yy.addClass($$[$0 - 2], $$[$0]); - break; - case 99: - this.$ = $$[$0 - 4]; - yy.setClass($$[$0 - 2], $$[$0]); - break; - case 100: - case 108: - this.$ = $$[$0 - 1]; - yy.setClickEvent($$[$0 - 1], $$[$0]); - break; - case 101: - case 109: - this.$ = $$[$0 - 3]; - yy.setClickEvent($$[$0 - 3], $$[$0 - 2]); - yy.setTooltip($$[$0 - 3], $$[$0]); - break; - case 102: - this.$ = $$[$0 - 2]; - yy.setClickEvent($$[$0 - 2], $$[$0 - 1], $$[$0]); - break; - case 103: - this.$ = $$[$0 - 4]; - yy.setClickEvent($$[$0 - 4], $$[$0 - 3], $$[$0 - 2]); - yy.setTooltip($$[$0 - 4], $$[$0]); - break; - case 104: - this.$ = $$[$0 - 2]; - yy.setLink($$[$0 - 2], $$[$0]); - break; - case 105: - this.$ = $$[$0 - 4]; - yy.setLink($$[$0 - 4], $$[$0 - 2]); - yy.setTooltip($$[$0 - 4], $$[$0]); - break; - case 106: - this.$ = $$[$0 - 4]; - yy.setLink($$[$0 - 4], $$[$0 - 2], $$[$0]); - break; - case 107: - this.$ = $$[$0 - 6]; - yy.setLink($$[$0 - 6], $$[$0 - 4], $$[$0]); - yy.setTooltip($$[$0 - 6], $$[$0 - 2]); - break; - case 110: - this.$ = $$[$0 - 1]; - yy.setLink($$[$0 - 1], $$[$0]); - break; - case 111: - this.$ = $$[$0 - 3]; - yy.setLink($$[$0 - 3], $$[$0 - 2]); - yy.setTooltip($$[$0 - 3], $$[$0]); - break; - case 112: - this.$ = $$[$0 - 3]; - yy.setLink($$[$0 - 3], $$[$0 - 2], $$[$0]); - break; - case 113: - this.$ = $$[$0 - 5]; - yy.setLink($$[$0 - 5], $$[$0 - 4], $$[$0]); - yy.setTooltip($$[$0 - 5], $$[$0 - 2]); - break; - case 114: - this.$ = $$[$0 - 4]; - yy.addVertex($$[$0 - 2], void 0, void 0, $$[$0]); - break; - case 115: - this.$ = $$[$0 - 4]; - yy.updateLink([$$[$0 - 2]], $$[$0]); - break; - case 116: - this.$ = $$[$0 - 4]; - yy.updateLink($$[$0 - 2], $$[$0]); - break; - case 117: - this.$ = $$[$0 - 8]; - yy.updateLinkInterpolate([$$[$0 - 6]], $$[$0 - 2]); - yy.updateLink([$$[$0 - 6]], $$[$0]); - break; - case 118: - this.$ = $$[$0 - 8]; - yy.updateLinkInterpolate($$[$0 - 6], $$[$0 - 2]); - yy.updateLink($$[$0 - 6], $$[$0]); - break; - case 119: - this.$ = $$[$0 - 6]; - yy.updateLinkInterpolate([$$[$0 - 4]], $$[$0]); - break; - case 120: - this.$ = $$[$0 - 6]; - yy.updateLinkInterpolate($$[$0 - 4], $$[$0]); - break; - case 121: - case 123: - this.$ = [$$[$0]]; - break; - case 122: - case 124: - $$[$0 - 2].push($$[$0]); - this.$ = $$[$0 - 2]; - break; - case 126: - this.$ = $$[$0 - 1] + $$[$0]; - break; - case 174: - this.$ = $$[$0]; - break; - case 175: - this.$ = $$[$0 - 1] + "" + $$[$0]; - break; - case 177: - this.$ = $$[$0 - 1] + "" + $$[$0]; - break; - case 178: - this.$ = { stmt: "dir", value: "TB" }; - break; - case 179: - this.$ = { stmt: "dir", value: "BT" }; - break; - case 180: - this.$ = { stmt: "dir", value: "RL" }; - break; - case 181: - this.$ = { stmt: "dir", value: "LR" }; - break; - } - }, - table: [{ 3: 1, 4: 2, 9: $V0, 10: $V1, 12: $V2 }, { 1: [3] }, o($V3, $V4, { 5: 6 }), { 4: 7, 9: $V0, 10: $V1, 12: $V2 }, { 4: 8, 9: $V0, 10: $V1, 12: $V2 }, { 13: [1, 9], 14: [1, 10] }, { 1: [2, 1], 6: 11, 7: 12, 8: $V5, 9: $V6, 10: $V7, 11: $V8, 20: 17, 22: 18, 23: 19, 24: 20, 25: 21, 26: 22, 27: $V9, 33: 24, 34: $Va, 36: $Vb, 38: $Vc, 40: 28, 41: 38, 42: $Vd, 43: 39, 45: 40, 58: $Ve, 81: $Vf, 82: $Vg, 83: $Vh, 84: $Vi, 85: $Vj, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs, 118: $Vt, 119: $Vu, 120: $Vv, 121: $Vw }, o($V3, [2, 9]), o($V3, [2, 10]), o($V3, [2, 11]), { 8: [1, 54], 9: [1, 55], 10: $Vx, 15: 53, 18: 56 }, o($Vy, [2, 3]), o($Vy, [2, 4]), o($Vy, [2, 5]), o($Vy, [2, 6]), o($Vy, [2, 7]), o($Vy, [2, 8]), { 8: $Vz, 9: $VA, 11: $VB, 21: 58, 39: 59, 70: 63, 73: [1, 64], 75: [1, 65] }, { 8: $Vz, 9: $VA, 11: $VB, 21: 66 }, { 8: $Vz, 9: $VA, 11: $VB, 21: 67 }, { 8: $Vz, 9: $VA, 11: $VB, 21: 68 }, { 8: $Vz, 9: $VA, 11: $VB, 21: 69 }, { 8: $Vz, 9: $VA, 11: $VB, 21: 70 }, { 8: $Vz, 9: $VA, 10: [1, 71], 11: $VB, 21: 72 }, o($Vy, [2, 36]), { 35: [1, 73] }, { 37: [1, 74] }, o($Vy, [2, 39]), o($VC, [2, 46], { 18: 75, 10: $Vx }), { 10: [1, 76] }, { 10: [1, 77] }, { 10: [1, 78] }, { 10: [1, 79] }, { 14: $VD, 42: $VE, 58: $VF, 77: [1, 83], 86: $VG, 92: [1, 80], 94: [1, 81], 98: 82, 102: $VH, 103: $VI, 106: $VJ, 108: $VK, 111: $VL, 112: $VM, 113: $VN, 117: 84 }, o($Vy, [2, 178]), o($Vy, [2, 179]), o($Vy, [2, 180]), o($Vy, [2, 181]), o($VO, [2, 47]), o($VO, [2, 49], { 44: [1, 96] }), o($VP, [2, 67], { 110: 109, 29: [1, 97], 42: $Vd, 46: [1, 98], 48: [1, 99], 50: [1, 100], 52: [1, 101], 54: [1, 102], 56: [1, 103], 58: $Ve, 61: [1, 104], 63: [1, 105], 65: [1, 106], 66: [1, 107], 68: [1, 108], 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 111: $Vq, 112: $Vr, 113: $Vs }), o($VQ, [2, 174]), o($VQ, [2, 135]), o($VQ, [2, 136]), o($VQ, [2, 137]), o($VQ, [2, 138]), o($VQ, [2, 139]), o($VQ, [2, 140]), o($VQ, [2, 141]), o($VQ, [2, 142]), o($VQ, [2, 143]), o($VQ, [2, 144]), o($VQ, [2, 145]), o($V3, [2, 12]), o($V3, [2, 18]), o($V3, [2, 19]), { 9: [1, 110] }, o($VR, [2, 26], { 18: 111, 10: $Vx }), o($Vy, [2, 27]), { 40: 112, 41: 38, 42: $Vd, 43: 39, 45: 40, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs }, o($Vy, [2, 40]), o($Vy, [2, 41]), o($Vy, [2, 42]), o($VS, [2, 71], { 71: 113, 60: [1, 115], 72: [1, 114] }), { 74: 116, 76: 117, 77: [1, 118], 78: [1, 119], 113: $VT, 116: $VU }, o([42, 58, 60, 72, 86, 99, 102, 103, 106, 108, 111, 112, 113], [2, 77]), o($Vy, [2, 28]), o($Vy, [2, 29]), o($Vy, [2, 30]), o($Vy, [2, 31]), o($Vy, [2, 32]), { 10: $VV, 12: $VW, 14: $VX, 27: $VY, 28: 122, 32: $VZ, 42: $V_, 58: $V$, 73: $V01, 77: [1, 124], 78: [1, 125], 80: 135, 81: $V11, 82: $V21, 83: $V31, 84: $V41, 85: $V51, 86: $V61, 87: $V71, 88: 123, 102: $V81, 106: $V91, 108: $Va1, 111: $Vb1, 112: $Vc1, 113: $Vd1 }, o($Ve1, $V4, { 5: 148 }), o($Vy, [2, 37]), o($Vy, [2, 38]), o($VC, [2, 45], { 42: $Vf1 }), { 42: $Vd, 45: 150, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs }, { 99: [1, 151], 100: 152, 102: [1, 153] }, { 42: $Vd, 45: 154, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs }, { 42: $Vd, 45: 155, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs }, o($Vg1, [2, 100], { 10: [1, 156], 93: [1, 157] }), { 77: [1, 158] }, o($Vg1, [2, 108], { 117: 160, 10: [1, 159], 14: $VD, 42: $VE, 58: $VF, 86: $VG, 102: $VH, 103: $VI, 106: $VJ, 108: $VK, 111: $VL, 112: $VM, 113: $VN }), o($Vg1, [2, 110], { 10: [1, 161] }), o($Vh1, [2, 176]), o($Vh1, [2, 163]), o($Vh1, [2, 164]), o($Vh1, [2, 165]), o($Vh1, [2, 166]), o($Vh1, [2, 167]), o($Vh1, [2, 168]), o($Vh1, [2, 169]), o($Vh1, [2, 170]), o($Vh1, [2, 171]), o($Vh1, [2, 172]), o($Vh1, [2, 173]), { 42: $Vd, 45: 162, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs }, { 30: 163, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 171, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 173, 48: [1, 172], 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 174, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 175, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 176, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 106: [1, 177] }, { 30: 178, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 179, 63: [1, 180], 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 181, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 182, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 183, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($VQ, [2, 175]), o($V3, [2, 20]), o($VR, [2, 25]), o($VC, [2, 43], { 18: 184, 10: $Vx }), o($VS, [2, 68], { 10: [1, 185] }), { 10: [1, 186] }, { 30: 187, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 75: [1, 188], 76: 189, 113: $VT, 116: $VU }, o($Vo1, [2, 73]), o($Vo1, [2, 75]), o($Vo1, [2, 76]), o($Vo1, [2, 161]), o($Vo1, [2, 162]), { 8: $Vz, 9: $VA, 10: $VV, 11: $VB, 12: $VW, 14: $VX, 21: 191, 27: $VY, 29: [1, 190], 32: $VZ, 42: $V_, 58: $V$, 73: $V01, 80: 135, 81: $V11, 82: $V21, 83: $V31, 84: $V41, 85: $V51, 86: $V61, 87: $V71, 88: 192, 102: $V81, 106: $V91, 108: $Va1, 111: $Vb1, 112: $Vc1, 113: $Vd1 }, o($Vp1, [2, 94]), o($Vp1, [2, 96]), o($Vp1, [2, 97]), o($Vp1, [2, 150]), o($Vp1, [2, 151]), o($Vp1, [2, 152]), o($Vp1, [2, 153]), o($Vp1, [2, 154]), o($Vp1, [2, 155]), o($Vp1, [2, 156]), o($Vp1, [2, 157]), o($Vp1, [2, 158]), o($Vp1, [2, 159]), o($Vp1, [2, 160]), o($Vp1, [2, 83]), o($Vp1, [2, 84]), o($Vp1, [2, 85]), o($Vp1, [2, 86]), o($Vp1, [2, 87]), o($Vp1, [2, 88]), o($Vp1, [2, 89]), o($Vp1, [2, 90]), o($Vp1, [2, 91]), o($Vp1, [2, 92]), o($Vp1, [2, 93]), { 6: 11, 7: 12, 8: $V5, 9: $V6, 10: $V7, 11: $V8, 20: 17, 22: 18, 23: 19, 24: 20, 25: 21, 26: 22, 27: $V9, 32: [1, 193], 33: 24, 34: $Va, 36: $Vb, 38: $Vc, 40: 28, 41: 38, 42: $Vd, 43: 39, 45: 40, 58: $Ve, 81: $Vf, 82: $Vg, 83: $Vh, 84: $Vi, 85: $Vj, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs, 118: $Vt, 119: $Vu, 120: $Vv, 121: $Vw }, { 10: $Vx, 18: 194 }, { 10: [1, 195], 42: $Vd, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 109, 111: $Vq, 112: $Vr, 113: $Vs }, { 10: [1, 196] }, { 10: [1, 197], 103: [1, 198] }, o($Vq1, [2, 121]), { 10: [1, 199], 42: $Vd, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 109, 111: $Vq, 112: $Vr, 113: $Vs }, { 10: [1, 200], 42: $Vd, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 109, 111: $Vq, 112: $Vr, 113: $Vs }, { 77: [1, 201] }, o($Vg1, [2, 102], { 10: [1, 202] }), o($Vg1, [2, 104], { 10: [1, 203] }), { 77: [1, 204] }, o($Vh1, [2, 177]), { 77: [1, 205], 95: [1, 206] }, o($VO, [2, 50], { 110: 109, 42: $Vd, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 111: $Vq, 112: $Vr, 113: $Vs }), { 31: [1, 207], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($Vr1, [2, 79]), o($Vr1, [2, 81]), o($Vr1, [2, 82]), o($Vr1, [2, 146]), o($Vr1, [2, 147]), o($Vr1, [2, 148]), o($Vr1, [2, 149]), { 47: [1, 209], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 210, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 49: [1, 211], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 51: [1, 212], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 53: [1, 213], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 55: [1, 214], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 58: [1, 215] }, { 62: [1, 216], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 64: [1, 217], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 218, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 31: [1, 219], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 65: $Vi1, 67: [1, 220], 69: [1, 221], 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 65: $Vi1, 67: [1, 223], 69: [1, 222], 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($VC, [2, 44], { 42: $Vf1 }), o($VS, [2, 70]), o($VS, [2, 69]), { 60: [1, 224], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($VS, [2, 72]), o($Vo1, [2, 74]), { 30: 225, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($Ve1, $V4, { 5: 226 }), o($Vp1, [2, 95]), o($Vy, [2, 35]), { 41: 227, 42: $Vd, 43: 39, 45: 40, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs }, { 10: $Vs1, 58: $Vt1, 81: $Vu1, 89: 228, 102: $Vv1, 104: 229, 105: 230, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }, { 10: $Vs1, 58: $Vt1, 81: $Vu1, 89: 239, 101: [1, 240], 102: $Vv1, 104: 229, 105: 230, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }, { 10: $Vs1, 58: $Vt1, 81: $Vu1, 89: 241, 101: [1, 242], 102: $Vv1, 104: 229, 105: 230, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }, { 102: [1, 243] }, { 10: $Vs1, 58: $Vt1, 81: $Vu1, 89: 244, 102: $Vv1, 104: 229, 105: 230, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }, { 42: $Vd, 45: 245, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs }, o($Vg1, [2, 101]), { 77: [1, 246] }, { 77: [1, 247], 95: [1, 248] }, o($Vg1, [2, 109]), o($Vg1, [2, 111], { 10: [1, 249] }), o($Vg1, [2, 112]), o($VP, [2, 51]), o($Vr1, [2, 80]), o($VP, [2, 52]), { 49: [1, 250], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($VP, [2, 59]), o($VP, [2, 54]), o($VP, [2, 55]), o($VP, [2, 56]), { 106: [1, 251] }, o($VP, [2, 58]), o($VP, [2, 60]), { 64: [1, 252], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($VP, [2, 62]), o($VP, [2, 63]), o($VP, [2, 65]), o($VP, [2, 64]), o($VP, [2, 66]), o([10, 42, 58, 86, 99, 102, 103, 106, 108, 111, 112, 113], [2, 78]), { 31: [1, 253], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 6: 11, 7: 12, 8: $V5, 9: $V6, 10: $V7, 11: $V8, 20: 17, 22: 18, 23: 19, 24: 20, 25: 21, 26: 22, 27: $V9, 32: [1, 254], 33: 24, 34: $Va, 36: $Vb, 38: $Vc, 40: 28, 41: 38, 42: $Vd, 43: 39, 45: 40, 58: $Ve, 81: $Vf, 82: $Vg, 83: $Vh, 84: $Vi, 85: $Vj, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs, 118: $Vt, 119: $Vu, 120: $Vv, 121: $Vw }, o($VO, [2, 48]), o($Vg1, [2, 114], { 103: $VA1 }), o($VB1, [2, 123], { 105: 256, 10: $Vs1, 58: $Vt1, 81: $Vu1, 102: $Vv1, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }), o($VC1, [2, 125]), o($VC1, [2, 127]), o($VC1, [2, 128]), o($VC1, [2, 129]), o($VC1, [2, 130]), o($VC1, [2, 131]), o($VC1, [2, 132]), o($VC1, [2, 133]), o($VC1, [2, 134]), o($Vg1, [2, 115], { 103: $VA1 }), { 10: [1, 257] }, o($Vg1, [2, 116], { 103: $VA1 }), { 10: [1, 258] }, o($Vq1, [2, 122]), o($Vg1, [2, 98], { 103: $VA1 }), o($Vg1, [2, 99], { 110: 109, 42: $Vd, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 111: $Vq, 112: $Vr, 113: $Vs }), o($Vg1, [2, 103]), o($Vg1, [2, 105], { 10: [1, 259] }), o($Vg1, [2, 106]), { 95: [1, 260] }, { 49: [1, 261] }, { 60: [1, 262] }, { 64: [1, 263] }, { 8: $Vz, 9: $VA, 11: $VB, 21: 264 }, o($Vy, [2, 34]), { 10: $Vs1, 58: $Vt1, 81: $Vu1, 102: $Vv1, 104: 265, 105: 230, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }, o($VC1, [2, 126]), { 14: $VD, 42: $VE, 58: $VF, 86: $VG, 98: 266, 102: $VH, 103: $VI, 106: $VJ, 108: $VK, 111: $VL, 112: $VM, 113: $VN, 117: 84 }, { 14: $VD, 42: $VE, 58: $VF, 86: $VG, 98: 267, 102: $VH, 103: $VI, 106: $VJ, 108: $VK, 111: $VL, 112: $VM, 113: $VN, 117: 84 }, { 95: [1, 268] }, o($Vg1, [2, 113]), o($VP, [2, 53]), { 30: 269, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($VP, [2, 61]), o($Ve1, $V4, { 5: 270 }), o($VB1, [2, 124], { 105: 256, 10: $Vs1, 58: $Vt1, 81: $Vu1, 102: $Vv1, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }), o($Vg1, [2, 119], { 117: 160, 10: [1, 271], 14: $VD, 42: $VE, 58: $VF, 86: $VG, 102: $VH, 103: $VI, 106: $VJ, 108: $VK, 111: $VL, 112: $VM, 113: $VN }), o($Vg1, [2, 120], { 117: 160, 10: [1, 272], 14: $VD, 42: $VE, 58: $VF, 86: $VG, 102: $VH, 103: $VI, 106: $VJ, 108: $VK, 111: $VL, 112: $VM, 113: $VN }), o($Vg1, [2, 107]), { 31: [1, 273], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 6: 11, 7: 12, 8: $V5, 9: $V6, 10: $V7, 11: $V8, 20: 17, 22: 18, 23: 19, 24: 20, 25: 21, 26: 22, 27: $V9, 32: [1, 274], 33: 24, 34: $Va, 36: $Vb, 38: $Vc, 40: 28, 41: 38, 42: $Vd, 43: 39, 45: 40, 58: $Ve, 81: $Vf, 82: $Vg, 83: $Vh, 84: $Vi, 85: $Vj, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs, 118: $Vt, 119: $Vu, 120: $Vv, 121: $Vw }, { 10: $Vs1, 58: $Vt1, 81: $Vu1, 89: 275, 102: $Vv1, 104: 229, 105: 230, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }, { 10: $Vs1, 58: $Vt1, 81: $Vu1, 89: 276, 102: $Vv1, 104: 229, 105: 230, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }, o($VP, [2, 57]), o($Vy, [2, 33]), o($Vg1, [2, 117], { 103: $VA1 }), o($Vg1, [2, 118], { 103: $VA1 })], - defaultActions: {}, - parseError: function parseError(str, hash) { - if (hash.recoverable) { - this.trace(str); - } else { - var error = new Error(str); - error.hash = hash; - throw error; - } - }, - parse: function parse(input) { - var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; - var args = lstack.slice.call(arguments, 1); - var lexer2 = Object.create(this.lexer); - var sharedState = { yy: {} }; - for (var k in this.yy) { - if (Object.prototype.hasOwnProperty.call(this.yy, k)) { - sharedState.yy[k] = this.yy[k]; - } - } - lexer2.setInput(input, sharedState.yy); - sharedState.yy.lexer = lexer2; - sharedState.yy.parser = this; - if (typeof lexer2.yylloc == "undefined") { - lexer2.yylloc = {}; - } - var yyloc = lexer2.yylloc; - lstack.push(yyloc); - var ranges = lexer2.options && lexer2.options.ranges; - if (typeof sharedState.yy.parseError === "function") { - this.parseError = sharedState.yy.parseError; - } else { - this.parseError = Object.getPrototypeOf(this).parseError; - } - function lex2() { - var token; - token = tstack.pop() || lexer2.lex() || EOF; - if (typeof token !== "number") { - if (token instanceof Array) { - tstack = token; - token = tstack.pop(); - } - token = self.symbols_[token] || token; - } - return token; - } - var symbol, state, action, r, yyval = {}, p, len, newState, expected; - while (true) { - state = stack[stack.length - 1]; - if (this.defaultActions[state]) { - action = this.defaultActions[state]; - } else { - if (symbol === null || typeof symbol == "undefined") { - symbol = lex2(); - } - action = table[state] && table[state][symbol]; - } - if (typeof action === "undefined" || !action.length || !action[0]) { - var errStr = ""; - expected = []; - for (p in table[state]) { - if (this.terminals_[p] && p > TERROR) { - expected.push("'" + this.terminals_[p] + "'"); - } - } - if (lexer2.showPosition) { - errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; - } else { - errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); - } - this.parseError(errStr, { - text: lexer2.match, - token: this.terminals_[symbol] || symbol, - line: lexer2.yylineno, - loc: yyloc, - expected - }); - } - if (action[0] instanceof Array && action.length > 1) { - throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); - } - switch (action[0]) { - case 1: - stack.push(symbol); - vstack.push(lexer2.yytext); - lstack.push(lexer2.yylloc); - stack.push(action[1]); - symbol = null; - { - yyleng = lexer2.yyleng; - yytext = lexer2.yytext; - yylineno = lexer2.yylineno; - yyloc = lexer2.yylloc; - } - break; - case 2: - len = this.productions_[action[1]][1]; - yyval.$ = vstack[vstack.length - len]; - yyval._$ = { - first_line: lstack[lstack.length - (len || 1)].first_line, - last_line: lstack[lstack.length - 1].last_line, - first_column: lstack[lstack.length - (len || 1)].first_column, - last_column: lstack[lstack.length - 1].last_column - }; - if (ranges) { - yyval._$.range = [ - lstack[lstack.length - (len || 1)].range[0], - lstack[lstack.length - 1].range[1] - ]; - } - r = this.performAction.apply(yyval, [ - yytext, - yyleng, - yylineno, - sharedState.yy, - action[1], - vstack, - lstack - ].concat(args)); - if (typeof r !== "undefined") { - return r; - } - if (len) { - stack = stack.slice(0, -1 * len * 2); - vstack = vstack.slice(0, -1 * len); - lstack = lstack.slice(0, -1 * len); - } - stack.push(this.productions_[action[1]][0]); - vstack.push(yyval.$); - lstack.push(yyval._$); - newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; - stack.push(newState); - break; - case 3: - return true; - } - } - return true; - } - }; - var lexer = function() { - var lexer2 = { - EOF: 1, - parseError: function parseError(str, hash) { - if (this.yy.parser) { - this.yy.parser.parseError(str, hash); - } else { - throw new Error(str); - } - }, - // resets the lexer, sets new input - setInput: function(input, yy) { - this.yy = yy || this.yy || {}; - this._input = input; - this._more = this._backtrack = this.done = false; - this.yylineno = this.yyleng = 0; - this.yytext = this.matched = this.match = ""; - this.conditionStack = ["INITIAL"]; - this.yylloc = { - first_line: 1, - first_column: 0, - last_line: 1, - last_column: 0 - }; - if (this.options.ranges) { - this.yylloc.range = [0, 0]; - } - this.offset = 0; - return this; - }, - // consumes and returns one char from the input - input: function() { - var ch = this._input[0]; - this.yytext += ch; - this.yyleng++; - this.offset++; - this.match += ch; - this.matched += ch; - var lines = ch.match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno++; - this.yylloc.last_line++; - } else { - this.yylloc.last_column++; - } - if (this.options.ranges) { - this.yylloc.range[1]++; - } - this._input = this._input.slice(1); - return ch; - }, - // unshifts one char (or a string) into the input - unput: function(ch) { - var len = ch.length; - var lines = ch.split(/(?:\r\n?|\n)/g); - this._input = ch + this._input; - this.yytext = this.yytext.substr(0, this.yytext.length - len); - this.offset -= len; - var oldLines = this.match.split(/(?:\r\n?|\n)/g); - this.match = this.match.substr(0, this.match.length - 1); - this.matched = this.matched.substr(0, this.matched.length - 1); - if (lines.length - 1) { - this.yylineno -= lines.length - 1; - } - var r = this.yylloc.range; - this.yylloc = { - first_line: this.yylloc.first_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.first_column, - last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len - }; - if (this.options.ranges) { - this.yylloc.range = [r[0], r[0] + this.yyleng - len]; - } - this.yyleng = this.yytext.length; - return this; - }, - // When called from action, caches matched text and appends it on next action - more: function() { - this._more = true; - return this; - }, - // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. - reject: function() { - if (this.options.backtrack_lexer) { - this._backtrack = true; - } else { - return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), { - text: "", - token: null, - line: this.yylineno - }); - } - return this; - }, - // retain first n characters of the match - less: function(n) { - this.unput(this.match.slice(n)); - }, - // displays already matched input, i.e. for error messages - pastInput: function() { - var past = this.matched.substr(0, this.matched.length - this.match.length); - return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); - }, - // displays upcoming input, i.e. for error messages - upcomingInput: function() { - var next = this.match; - if (next.length < 20) { - next += this._input.substr(0, 20 - next.length); - } - return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); - }, - // displays the character position where the lexing error occurred, i.e. for error messages - showPosition: function() { - var pre = this.pastInput(); - var c = new Array(pre.length + 1).join("-"); - return pre + this.upcomingInput() + "\n" + c + "^"; - }, - // test the lexed token: return FALSE when not a match, otherwise return token - test_match: function(match, indexed_rule) { - var token, lines, backup; - if (this.options.backtrack_lexer) { - backup = { - yylineno: this.yylineno, - yylloc: { - first_line: this.yylloc.first_line, - last_line: this.last_line, - first_column: this.yylloc.first_column, - last_column: this.yylloc.last_column - }, - yytext: this.yytext, - match: this.match, - matches: this.matches, - matched: this.matched, - yyleng: this.yyleng, - offset: this.offset, - _more: this._more, - _input: this._input, - yy: this.yy, - conditionStack: this.conditionStack.slice(0), - done: this.done - }; - if (this.options.ranges) { - backup.yylloc.range = this.yylloc.range.slice(0); - } - } - lines = match[0].match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno += lines.length; - } - this.yylloc = { - first_line: this.yylloc.last_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.last_column, - last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length - }; - this.yytext += match[0]; - this.match += match[0]; - this.matches = match; - this.yyleng = this.yytext.length; - if (this.options.ranges) { - this.yylloc.range = [this.offset, this.offset += this.yyleng]; - } - this._more = false; - this._backtrack = false; - this._input = this._input.slice(match[0].length); - this.matched += match[0]; - token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); - if (this.done && this._input) { - this.done = false; - } - if (token) { - return token; - } else if (this._backtrack) { - for (var k in backup) { - this[k] = backup[k]; - } - return false; - } - return false; - }, - // return next match in input - next: function() { - if (this.done) { - return this.EOF; - } - if (!this._input) { - this.done = true; - } - var token, match, tempMatch, index; - if (!this._more) { - this.yytext = ""; - this.match = ""; - } - var rules = this._currentRules(); - for (var i = 0; i < rules.length; i++) { - tempMatch = this._input.match(this.rules[rules[i]]); - if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { - match = tempMatch; - index = i; - if (this.options.backtrack_lexer) { - token = this.test_match(tempMatch, rules[i]); - if (token !== false) { - return token; - } else if (this._backtrack) { - match = false; - continue; - } else { - return false; - } - } else if (!this.options.flex) { - break; - } - } - } - if (match) { - token = this.test_match(match, rules[index]); - if (token !== false) { - return token; - } - return false; - } - if (this._input === "") { - return this.EOF; - } else { - return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { - text: "", - token: null, - line: this.yylineno - }); - } - }, - // return next match that has a token - lex: function lex2() { - var r = this.next(); - if (r) { - return r; - } else { - return this.lex(); - } - }, - // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) - begin: function begin(condition) { - this.conditionStack.push(condition); - }, - // pop the previously active lexer condition state off the condition stack - popState: function popState() { - var n = this.conditionStack.length - 1; - if (n > 0) { - return this.conditionStack.pop(); - } else { - return this.conditionStack[0]; - } - }, - // produce the lexer rule set which is active for the currently active lexer condition state - _currentRules: function _currentRules() { - if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { - return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; - } else { - return this.conditions["INITIAL"].rules; - } - }, - // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available - topState: function topState(n) { - n = this.conditionStack.length - 1 - Math.abs(n || 0); - if (n >= 0) { - return this.conditionStack[n]; - } else { - return "INITIAL"; - } - }, - // alias for begin(condition) - pushState: function pushState(condition) { - this.begin(condition); - }, - // return the number of states currently on the stack - stateStackSize: function stateStackSize() { - return this.conditionStack.length; - }, - options: {}, - performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { - switch ($avoiding_name_collisions) { - case 0: - this.begin("acc_title"); - return 34; - case 1: - this.popState(); - return "acc_title_value"; - case 2: - this.begin("acc_descr"); - return 36; - case 3: - this.popState(); - return "acc_descr_value"; - case 4: - this.begin("acc_descr_multiline"); - break; - case 5: - this.popState(); - break; - case 6: - return "acc_descr_multiline_value"; - case 7: - this.begin("callbackname"); - break; - case 8: - this.popState(); - break; - case 9: - this.popState(); - this.begin("callbackargs"); - break; - case 10: - return 92; - case 11: - this.popState(); - break; - case 12: - return 93; - case 13: - return "MD_STR"; - case 14: - this.popState(); - break; - case 15: - this.begin("md_string"); - break; - case 16: - return "STR"; - case 17: - this.popState(); - break; - case 18: - this.pushState("string"); - break; - case 19: - return 81; - case 20: - return 99; - case 21: - return 82; - case 22: - return 101; - case 23: - return 83; - case 24: - return 84; - case 25: - return 94; - case 26: - this.begin("click"); - break; - case 27: - this.popState(); - break; - case 28: - return 85; - case 29: - if (yy.lex.firstGraph()) { - this.begin("dir"); - } - return 12; - case 30: - if (yy.lex.firstGraph()) { - this.begin("dir"); - } - return 12; - case 31: - if (yy.lex.firstGraph()) { - this.begin("dir"); - } - return 12; - case 32: - return 27; - case 33: - return 32; - case 34: - return 95; - case 35: - return 95; - case 36: - return 95; - case 37: - return 95; - case 38: - this.popState(); - return 13; - case 39: - this.popState(); - return 14; - case 40: - this.popState(); - return 14; - case 41: - this.popState(); - return 14; - case 42: - this.popState(); - return 14; - case 43: - this.popState(); - return 14; - case 44: - this.popState(); - return 14; - case 45: - this.popState(); - return 14; - case 46: - this.popState(); - return 14; - case 47: - this.popState(); - return 14; - case 48: - this.popState(); - return 14; - case 49: - return 118; - case 50: - return 119; - case 51: - return 120; - case 52: - return 121; - case 53: - return 102; - case 54: - return 108; - case 55: - return 44; - case 56: - return 58; - case 57: - return 42; - case 58: - return 8; - case 59: - return 103; - case 60: - return 112; - case 61: - this.popState(); - return 75; - case 62: - this.pushState("edgeText"); - return 73; - case 63: - return 116; - case 64: - this.popState(); - return 75; - case 65: - this.pushState("thickEdgeText"); - return 73; - case 66: - return 116; - case 67: - this.popState(); - return 75; - case 68: - this.pushState("dottedEdgeText"); - return 73; - case 69: - return 116; - case 70: - return 75; - case 71: - this.popState(); - return 51; - case 72: - return "TEXT"; - case 73: - this.pushState("ellipseText"); - return 50; - case 74: - this.popState(); - return 53; - case 75: - this.pushState("text"); - return 52; - case 76: - this.popState(); - return 55; - case 77: - this.pushState("text"); - return 54; - case 78: - return 56; - case 79: - this.pushState("text"); - return 65; - case 80: - this.popState(); - return 62; - case 81: - this.pushState("text"); - return 61; - case 82: - this.popState(); - return 47; - case 83: - this.pushState("text"); - return 46; - case 84: - this.popState(); - return 67; - case 85: - this.popState(); - return 69; - case 86: - return 114; - case 87: - this.pushState("trapText"); - return 66; - case 88: - this.pushState("trapText"); - return 68; - case 89: - return 115; - case 90: - return 65; - case 91: - return 87; - case 92: - return "SEP"; - case 93: - return 86; - case 94: - return 112; - case 95: - return 108; - case 96: - return 42; - case 97: - return 106; - case 98: - return 111; - case 99: - return 113; - case 100: - this.popState(); - return 60; - case 101: - this.pushState("text"); - return 60; - case 102: - this.popState(); - return 49; - case 103: - this.pushState("text"); - return 48; - case 104: - this.popState(); - return 31; - case 105: - this.pushState("text"); - return 29; - case 106: - this.popState(); - return 64; - case 107: - this.pushState("text"); - return 63; - case 108: - return "TEXT"; - case 109: - return "QUOTE"; - case 110: - return 9; - case 111: - return 10; - case 112: - return 11; - } - }, - rules: [/^(?:accTitle\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*\{\s*)/, /^(?:[\}])/, /^(?:[^\}]*)/, /^(?:call[\s]+)/, /^(?:\([\s]*\))/, /^(?:\()/, /^(?:[^(]*)/, /^(?:\))/, /^(?:[^)]*)/, /^(?:[^`"]+)/, /^(?:[`]["])/, /^(?:["][`])/, /^(?:[^"]+)/, /^(?:["])/, /^(?:["])/, /^(?:style\b)/, /^(?:default\b)/, /^(?:linkStyle\b)/, /^(?:interpolate\b)/, /^(?:classDef\b)/, /^(?:class\b)/, /^(?:href[\s])/, /^(?:click[\s]+)/, /^(?:[\s\n])/, /^(?:[^\s\n]*)/, /^(?:flowchart-elk\b)/, /^(?:graph\b)/, /^(?:flowchart\b)/, /^(?:subgraph\b)/, /^(?:end\b\s*)/, /^(?:_self\b)/, /^(?:_blank\b)/, /^(?:_parent\b)/, /^(?:_top\b)/, /^(?:(\r?\n)*\s*\n)/, /^(?:\s*LR\b)/, /^(?:\s*RL\b)/, /^(?:\s*TB\b)/, /^(?:\s*BT\b)/, /^(?:\s*TD\b)/, /^(?:\s*BR\b)/, /^(?:\s*<)/, /^(?:\s*>)/, /^(?:\s*\^)/, /^(?:\s*v\b)/, /^(?:.*direction\s+TB[^\n]*)/, /^(?:.*direction\s+BT[^\n]*)/, /^(?:.*direction\s+RL[^\n]*)/, /^(?:.*direction\s+LR[^\n]*)/, /^(?:[0-9]+)/, /^(?:#)/, /^(?::::)/, /^(?::)/, /^(?:&)/, /^(?:;)/, /^(?:,)/, /^(?:\*)/, /^(?:\s*[xo<]?--+[-xo>]\s*)/, /^(?:\s*[xo<]?--\s*)/, /^(?:[^-]|-(?!-)+)/, /^(?:\s*[xo<]?==+[=xo>]\s*)/, /^(?:\s*[xo<]?==\s*)/, /^(?:[^=]|=(?!))/, /^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/, /^(?:\s*[xo<]?-\.\s*)/, /^(?:[^\.]|\.(?!))/, /^(?:\s*~~[\~]+\s*)/, /^(?:[-/\)][\)])/, /^(?:[^\(\)\[\]\{\}]|!\)+)/, /^(?:\(-)/, /^(?:\]\))/, /^(?:\(\[)/, /^(?:\]\])/, /^(?:\[\[)/, /^(?:\[\|)/, /^(?:>)/, /^(?:\)\])/, /^(?:\[\()/, /^(?:\)\)\))/, /^(?:\(\(\()/, /^(?:[\\(?=\])][\]])/, /^(?:\/(?=\])\])/, /^(?:\/(?!\])|\\(?!\])|[^\\\[\]\(\)\{\}\/]+)/, /^(?:\[\/)/, /^(?:\[\\)/, /^(?:<)/, /^(?:>)/, /^(?:\^)/, /^(?:\\\|)/, /^(?:v\b)/, /^(?:\*)/, /^(?:#)/, /^(?:&)/, /^(?:([A-Za-z0-9!"\#$%&'*+\.`?\\_\/]|-(?=[^\>\-\.])|(?!))+)/, /^(?:-)/, /^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/, /^(?:\|)/, /^(?:\|)/, /^(?:\))/, /^(?:\()/, /^(?:\])/, /^(?:\[)/, /^(?:(\}))/, /^(?:\{)/, /^(?:[^\[\]\(\)\{\}\|\"]+)/, /^(?:")/, /^(?:(\r?\n)+)/, /^(?:\s)/, /^(?:$)/], - conditions: { "callbackargs": { "rules": [11, 12, 15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "callbackname": { "rules": [8, 9, 10, 15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "href": { "rules": [15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "click": { "rules": [15, 18, 27, 28, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "dottedEdgeText": { "rules": [15, 18, 67, 69, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "thickEdgeText": { "rules": [15, 18, 64, 66, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "edgeText": { "rules": [15, 18, 61, 63, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "trapText": { "rules": [15, 18, 70, 73, 75, 77, 81, 83, 84, 85, 86, 87, 88, 101, 103, 105, 107], "inclusive": false }, "ellipseText": { "rules": [15, 18, 70, 71, 72, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "text": { "rules": [15, 18, 70, 73, 74, 75, 76, 77, 80, 81, 82, 83, 87, 88, 100, 101, 102, 103, 104, 105, 106, 107, 108], "inclusive": false }, "vertex": { "rules": [15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "dir": { "rules": [15, 18, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "acc_descr_multiline": { "rules": [5, 6, 15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "acc_descr": { "rules": [3, 15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "acc_title": { "rules": [1, 15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "md_string": { "rules": [13, 14, 15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "string": { "rules": [15, 16, 17, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "INITIAL": { "rules": [0, 2, 4, 7, 15, 18, 19, 20, 21, 22, 23, 24, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 64, 65, 67, 68, 70, 73, 75, 77, 78, 79, 81, 83, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 101, 103, 105, 107, 109, 110, 111, 112], "inclusive": true } } - }; - return lexer2; - }(); - parser2.lexer = lexer; - function Parser() { - this.yy = {}; - } - Parser.prototype = parser2; - parser2.Parser = Parser; - return new Parser(); -}(); -parser.parser = parser; -const parser$1 = parser; -const MERMAID_DOM_ID_PREFIX = "flowchart-"; -let vertexCounter = 0; -let config = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)(); -let vertices = {}; -let edges = []; -let classes = {}; -let subGraphs = []; -let subGraphLookup = {}; -let tooltips = {}; -let subCount = 0; -let firstGraphFlag = true; -let direction; -let version; -let funs = []; -const sanitizeText = (txt) => _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.e.sanitizeText(txt, config); -const lookUpDomId = function(id) { - const vertexKeys = Object.keys(vertices); - for (const vertexKey of vertexKeys) { - if (vertices[vertexKey].id === id) { - return vertices[vertexKey].domId; - } - } - return id; -}; -const addVertex = function(_id, textObj, type, style, classes2, dir, props = {}) { - let txt; - let id = _id; - if (id === void 0) { - return; - } - if (id.trim().length === 0) { - return; - } - if (vertices[id] === void 0) { - vertices[id] = { - id, - labelType: "text", - domId: MERMAID_DOM_ID_PREFIX + id + "-" + vertexCounter, - styles: [], - classes: [] - }; - } - vertexCounter++; - if (textObj !== void 0) { - config = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)(); - txt = sanitizeText(textObj.text.trim()); - vertices[id].labelType = textObj.type; - if (txt[0] === '"' && txt[txt.length - 1] === '"') { - txt = txt.substring(1, txt.length - 1); - } - vertices[id].text = txt; - } else { - if (vertices[id].text === void 0) { - vertices[id].text = _id; - } - } - if (type !== void 0) { - vertices[id].type = type; - } - if (style !== void 0 && style !== null) { - style.forEach(function(s) { - vertices[id].styles.push(s); - }); - } - if (classes2 !== void 0 && classes2 !== null) { - classes2.forEach(function(s) { - vertices[id].classes.push(s); - }); - } - if (dir !== void 0) { - vertices[id].dir = dir; - } - if (vertices[id].props === void 0) { - vertices[id].props = props; - } else if (props !== void 0) { - Object.assign(vertices[id].props, props); - } -}; -const addSingleLink = function(_start, _end, type) { - let start = _start; - let end = _end; - const edge = { start, end, type: void 0, text: "", labelType: "text" }; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.info("abc78 Got edge...", edge); - const linkTextObj = type.text; - if (linkTextObj !== void 0) { - edge.text = sanitizeText(linkTextObj.text.trim()); - if (edge.text[0] === '"' && edge.text[edge.text.length - 1] === '"') { - edge.text = edge.text.substring(1, edge.text.length - 1); - } - edge.labelType = linkTextObj.type; - } - if (type !== void 0) { - edge.type = type.type; - edge.stroke = type.stroke; - edge.length = type.length; - } - if ((edge == null ? void 0 : edge.length) > 10) { - edge.length = 10; - } - if (edges.length < (config.maxEdges ?? 500)) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.info("abc78 pushing edge..."); - edges.push(edge); - } else { - throw new Error( - `Edge limit exceeded. ${edges.length} edges found, but the limit is ${config.maxEdges}. - -Initialize mermaid with maxEdges set to a higher number to allow more edges. -You cannot set this config via configuration inside the diagram as it is a secure config. -You have to call mermaid.initialize.` - ); - } -}; -const addLink = function(_start, _end, type) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.info("addLink (abc78)", _start, _end, type); - let i, j; - for (i = 0; i < _start.length; i++) { - for (j = 0; j < _end.length; j++) { - addSingleLink(_start[i], _end[j], type); - } - } -}; -const updateLinkInterpolate = function(positions, interp) { - positions.forEach(function(pos) { - if (pos === "default") { - edges.defaultInterpolate = interp; - } else { - edges[pos].interpolate = interp; - } - }); -}; -const updateLink = function(positions, style) { - positions.forEach(function(pos) { - if (pos >= edges.length) { - throw new Error( - `The index ${pos} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${edges.length - 1}. (Help: Ensure that the index is within the range of existing edges.)` - ); - } - if (pos === "default") { - edges.defaultStyle = style; - } else { - if (_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.u.isSubstringInArray("fill", style) === -1) { - style.push("fill:none"); - } - edges[pos].style = style; - } - }); -}; -const addClass = function(ids, style) { - ids.split(",").forEach(function(id) { - if (classes[id] === void 0) { - classes[id] = { id, styles: [], textStyles: [] }; - } - if (style !== void 0 && style !== null) { - style.forEach(function(s) { - if (s.match("color")) { - const newStyle = s.replace("fill", "bgFill").replace("color", "fill"); - classes[id].textStyles.push(newStyle); - } - classes[id].styles.push(s); - }); - } - }); -}; -const setDirection = function(dir) { - direction = dir; - if (direction.match(/.*/)) { - direction = "LR"; - } - if (direction.match(/.*v/)) { - direction = "TB"; - } - if (direction === "TD") { - direction = "TB"; - } -}; -const setClass = function(ids, className) { - ids.split(",").forEach(function(_id) { - let id = _id; - if (vertices[id] !== void 0) { - vertices[id].classes.push(className); - } - if (subGraphLookup[id] !== void 0) { - subGraphLookup[id].classes.push(className); - } - }); -}; -const setTooltip = function(ids, tooltip) { - ids.split(",").forEach(function(id) { - if (tooltip !== void 0) { - tooltips[version === "gen-1" ? lookUpDomId(id) : id] = sanitizeText(tooltip); - } - }); -}; -const setClickFun = function(id, functionName, functionArgs) { - let domId = lookUpDomId(id); - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().securityLevel !== "loose") { - return; - } - if (functionName === void 0) { - return; - } - let argList = []; - if (typeof functionArgs === "string") { - argList = functionArgs.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/); - for (let i = 0; i < argList.length; i++) { - let item = argList[i].trim(); - if (item.charAt(0) === '"' && item.charAt(item.length - 1) === '"') { - item = item.substr(1, item.length - 2); - } - argList[i] = item; - } - } - if (argList.length === 0) { - argList.push(id); - } - if (vertices[id] !== void 0) { - vertices[id].haveCallback = true; - funs.push(function() { - const elem = document.querySelector(`[id="${domId}"]`); - if (elem !== null) { - elem.addEventListener( - "click", - function() { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.u.runFunc(functionName, ...argList); - }, - false - ); - } - }); - } -}; -const setLink = function(ids, linkStr, target) { - ids.split(",").forEach(function(id) { - if (vertices[id] !== void 0) { - vertices[id].link = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.u.formatUrl(linkStr, config); - vertices[id].linkTarget = target; - } - }); - setClass(ids, "clickable"); -}; -const getTooltip = function(id) { - if (tooltips.hasOwnProperty(id)) { - return tooltips[id]; - } - return void 0; -}; -const setClickEvent = function(ids, functionName, functionArgs) { - ids.split(",").forEach(function(id) { - setClickFun(id, functionName, functionArgs); - }); - setClass(ids, "clickable"); -}; -const bindFunctions = function(element) { - funs.forEach(function(fun) { - fun(element); - }); -}; -const getDirection = function() { - return direction.trim(); -}; -const getVertices = function() { - return vertices; -}; -const getEdges = function() { - return edges; -}; -const getClasses = function() { - return classes; -}; -const setupToolTips = function(element) { - let tooltipElem = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(".mermaidTooltip"); - if ((tooltipElem._groups || tooltipElem)[0][0] === null) { - tooltipElem = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)("body").append("div").attr("class", "mermaidTooltip").style("opacity", 0); - } - const svg = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(element).select("svg"); - const nodes = svg.selectAll("g.node"); - nodes.on("mouseover", function() { - const el = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(this); - const title = el.attr("title"); - if (title === null) { - return; - } - const rect = this.getBoundingClientRect(); - tooltipElem.transition().duration(200).style("opacity", ".9"); - tooltipElem.text(el.attr("title")).style("left", window.scrollX + rect.left + (rect.right - rect.left) / 2 + "px").style("top", window.scrollY + rect.bottom + "px"); - tooltipElem.html(tooltipElem.html().replace(/<br\/>/g, "
    ")); - el.classed("hover", true); - }).on("mouseout", function() { - tooltipElem.transition().duration(500).style("opacity", 0); - const el = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(this); - el.classed("hover", false); - }); -}; -funs.push(setupToolTips); -const clear = function(ver = "gen-1") { - vertices = {}; - classes = {}; - edges = []; - funs = [setupToolTips]; - subGraphs = []; - subGraphLookup = {}; - subCount = 0; - tooltips = {}; - firstGraphFlag = true; - version = ver; - config = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)(); - (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.v)(); -}; -const setGen = (ver) => { - version = ver || "gen-2"; -}; -const defaultStyle = function() { - return "fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"; -}; -const addSubGraph = function(_id, list, _title) { - let id = _id.text.trim(); - let title = _title.text; - if (_id === _title && _title.text.match(/\s/)) { - id = void 0; - } - function uniq(a) { - const prims = { boolean: {}, number: {}, string: {} }; - const objs = []; - let dir2; - const nodeList2 = a.filter(function(item) { - const type = typeof item; - if (item.stmt && item.stmt === "dir") { - dir2 = item.value; - return false; - } - if (item.trim() === "") { - return false; - } - if (type in prims) { - return prims[type].hasOwnProperty(item) ? false : prims[type][item] = true; - } else { - return objs.includes(item) ? false : objs.push(item); - } - }); - return { nodeList: nodeList2, dir: dir2 }; - } - let nodeList = []; - const { nodeList: nl, dir } = uniq(nodeList.concat.apply(nodeList, list)); - nodeList = nl; - if (version === "gen-1") { - for (let i = 0; i < nodeList.length; i++) { - nodeList[i] = lookUpDomId(nodeList[i]); - } - } - id = id || "subGraph" + subCount; - title = title || ""; - title = sanitizeText(title); - subCount = subCount + 1; - const subGraph = { - id, - nodes: nodeList, - title: title.trim(), - classes: [], - dir, - labelType: _title.type - }; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Adding", subGraph.id, subGraph.nodes, subGraph.dir); - subGraph.nodes = makeUniq(subGraph, subGraphs).nodes; - subGraphs.push(subGraph); - subGraphLookup[id] = subGraph; - return id; -}; -const getPosForId = function(id) { - for (const [i, subGraph] of subGraphs.entries()) { - if (subGraph.id === id) { - return i; - } - } - return -1; -}; -let secCount = -1; -const posCrossRef = []; -const indexNodes2 = function(id, pos) { - const nodes = subGraphs[pos].nodes; - secCount = secCount + 1; - if (secCount > 2e3) { - return; - } - posCrossRef[secCount] = pos; - if (subGraphs[pos].id === id) { - return { - result: true, - count: 0 - }; - } - let count = 0; - let posCount = 1; - while (count < nodes.length) { - const childPos = getPosForId(nodes[count]); - if (childPos >= 0) { - const res = indexNodes2(id, childPos); - if (res.result) { - return { - result: true, - count: posCount + res.count - }; - } else { - posCount = posCount + res.count; - } - } - count = count + 1; - } - return { - result: false, - count: posCount - }; -}; -const getDepthFirstPos = function(pos) { - return posCrossRef[pos]; -}; -const indexNodes = function() { - secCount = -1; - if (subGraphs.length > 0) { - indexNodes2("none", subGraphs.length - 1); - } -}; -const getSubGraphs = function() { - return subGraphs; -}; -const firstGraph = () => { - if (firstGraphFlag) { - firstGraphFlag = false; - return true; - } - return false; -}; -const destructStartLink = (_str) => { - let str = _str.trim(); - let type = "arrow_open"; - switch (str[0]) { - case "<": - type = "arrow_point"; - str = str.slice(1); - break; - case "x": - type = "arrow_cross"; - str = str.slice(1); - break; - case "o": - type = "arrow_circle"; - str = str.slice(1); - break; - } - let stroke = "normal"; - if (str.includes("=")) { - stroke = "thick"; - } - if (str.includes(".")) { - stroke = "dotted"; - } - return { type, stroke }; -}; -const countChar = (char, str) => { - const length = str.length; - let count = 0; - for (let i = 0; i < length; ++i) { - if (str[i] === char) { - ++count; - } - } - return count; -}; -const destructEndLink = (_str) => { - const str = _str.trim(); - let line = str.slice(0, -1); - let type = "arrow_open"; - switch (str.slice(-1)) { - case "x": - type = "arrow_cross"; - if (str[0] === "x") { - type = "double_" + type; - line = line.slice(1); - } - break; - case ">": - type = "arrow_point"; - if (str[0] === "<") { - type = "double_" + type; - line = line.slice(1); - } - break; - case "o": - type = "arrow_circle"; - if (str[0] === "o") { - type = "double_" + type; - line = line.slice(1); - } - break; - } - let stroke = "normal"; - let length = line.length - 1; - if (line[0] === "=") { - stroke = "thick"; - } - if (line[0] === "~") { - stroke = "invisible"; - } - let dots = countChar(".", line); - if (dots) { - stroke = "dotted"; - length = dots; - } - return { type, stroke, length }; -}; -const destructLink = (_str, _startStr) => { - const info = destructEndLink(_str); - let startInfo; - if (_startStr) { - startInfo = destructStartLink(_startStr); - if (startInfo.stroke !== info.stroke) { - return { type: "INVALID", stroke: "INVALID" }; - } - if (startInfo.type === "arrow_open") { - startInfo.type = info.type; - } else { - if (startInfo.type !== info.type) { - return { type: "INVALID", stroke: "INVALID" }; - } - startInfo.type = "double_" + startInfo.type; - } - if (startInfo.type === "double_arrow") { - startInfo.type = "double_arrow_point"; - } - startInfo.length = info.length; - return startInfo; - } - return info; -}; -const exists = (allSgs, _id) => { - let res = false; - allSgs.forEach((sg) => { - const pos = sg.nodes.indexOf(_id); - if (pos >= 0) { - res = true; - } - }); - return res; -}; -const makeUniq = (sg, allSubgraphs) => { - const res = []; - sg.nodes.forEach((_id, pos) => { - if (!exists(allSubgraphs, _id)) { - res.push(sg.nodes[pos]); - } - }); - return { nodes: res }; -}; -const lex = { - firstGraph -}; -const flowDb = { - defaultConfig: () => _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.K.flowchart, - setAccTitle: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.s, - getAccTitle: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.g, - getAccDescription: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.a, - setAccDescription: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.b, - addVertex, - lookUpDomId, - addLink, - updateLinkInterpolate, - updateLink, - addClass, - setDirection, - setClass, - setTooltip, - getTooltip, - setClickEvent, - setLink, - bindFunctions, - getDirection, - getVertices, - getEdges, - getClasses, - clear, - setGen, - defaultStyle, - addSubGraph, - getDepthFirstPos, - indexNodes, - getSubGraphs, - destructLink, - lex, - exists, - makeUniq, - setDiagramTitle: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.q, - getDiagramTitle: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.t -}; -const db = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ - __proto__: null, - addClass, - addLink, - addSingleLink, - addSubGraph, - addVertex, - bindFunctions, - clear, - default: flowDb, - defaultStyle, - destructLink, - firstGraph, - getClasses, - getDepthFirstPos, - getDirection, - getEdges, - getSubGraphs, - getTooltip, - getVertices, - indexNodes, - lex, - lookUpDomId, - setClass, - setClickEvent, - setDirection, - setGen, - setLink, - updateLink, - updateLinkInterpolate -}, Symbol.toStringTag, { value: "Module" })); - - - -/***/ }), - -/***/ 22315: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - diagram: () => (/* binding */ diagram) -}); - -// EXTERNAL MODULE: ./node_modules/mermaid/dist/flowDb-956e92f1.js -var flowDb_956e92f1 = __webpack_require__(35860); -// EXTERNAL MODULE: ./node_modules/dagre-d3-es/src/graphlib/index.js -var graphlib = __webpack_require__(697); -// EXTERNAL MODULE: ./node_modules/d3/src/index.js + 197 modules -var src = __webpack_require__(26312); -// EXTERNAL MODULE: ./node_modules/mermaid/dist/mermaid-b5860b54.js + 8 modules -var mermaid_b5860b54 = __webpack_require__(86079); -// EXTERNAL MODULE: ./node_modules/lodash-es/has.js + 1 modules -var has = __webpack_require__(48585); -// EXTERNAL MODULE: ./node_modules/lodash-es/defaults.js -var defaults = __webpack_require__(23068); -// EXTERNAL MODULE: ./node_modules/lodash-es/forEach.js -var forEach = __webpack_require__(8058); -// EXTERNAL MODULE: ./node_modules/dagre-d3-es/src/dagre/index.js + 64 modules -var dagre = __webpack_require__(21176); -// EXTERNAL MODULE: ./node_modules/dagre-d3-es/src/dagre-js/util.js -var util = __webpack_require__(82933); -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre-js/arrows.js - - - - -var arrows = { - normal, - vee, - undirected, -}; - -function setArrows(value) { - arrows = value; -} - -function normal(parent, id, edge, type) { - var marker = parent - .append('marker') - .attr('id', id) - .attr('viewBox', '0 0 10 10') - .attr('refX', 9) - .attr('refY', 5) - .attr('markerUnits', 'strokeWidth') - .attr('markerWidth', 8) - .attr('markerHeight', 6) - .attr('orient', 'auto'); - - var path = marker - .append('path') - .attr('d', 'M 0 0 L 10 5 L 0 10 z') - .style('stroke-width', 1) - .style('stroke-dasharray', '1,0'); - util/* applyStyle */.AV(path, edge[type + 'Style']); - if (edge[type + 'Class']) { - path.attr('class', edge[type + 'Class']); - } -} - -function vee(parent, id, edge, type) { - var marker = parent - .append('marker') - .attr('id', id) - .attr('viewBox', '0 0 10 10') - .attr('refX', 9) - .attr('refY', 5) - .attr('markerUnits', 'strokeWidth') - .attr('markerWidth', 8) - .attr('markerHeight', 6) - .attr('orient', 'auto'); - - var path = marker - .append('path') - .attr('d', 'M 0 0 L 10 5 L 0 10 L 4 5 z') - .style('stroke-width', 1) - .style('stroke-dasharray', '1,0'); - util/* applyStyle */.AV(path, edge[type + 'Style']); - if (edge[type + 'Class']) { - path.attr('class', edge[type + 'Class']); - } -} - -function undirected(parent, id, edge, type) { - var marker = parent - .append('marker') - .attr('id', id) - .attr('viewBox', '0 0 10 10') - .attr('refX', 9) - .attr('refY', 5) - .attr('markerUnits', 'strokeWidth') - .attr('markerWidth', 8) - .attr('markerHeight', 6) - .attr('orient', 'auto'); - - var path = marker - .append('path') - .attr('d', 'M 0 5 L 10 5') - .style('stroke-width', 1) - .style('stroke-dasharray', '1,0'); - util/* applyStyle */.AV(path, edge[type + 'Style']); - if (edge[type + 'Class']) { - path.attr('class', edge[type + 'Class']); - } -} - -// EXTERNAL MODULE: ./node_modules/dagre-d3-es/src/dagre-js/label/add-html-label.js -var add_html_label = __webpack_require__(10646); -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre-js/label/add-svg-label.js - - - - -function addSVGLabel(root, node) { - var domNode = root; - - domNode.node().appendChild(node.label); - - util/* applyStyle */.AV(domNode, node.labelStyle); - - return domNode; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre-js/label/add-text-label.js - - - - -/* - * Attaches a text label to the specified root. Handles escape sequences. - */ -function addTextLabel(root, node) { - var domNode = root.append('text'); - - var lines = processEscapeSequences(node.label).split('\n'); - for (var i = 0; i < lines.length; i++) { - domNode - .append('tspan') - .attr('xml:space', 'preserve') - .attr('dy', '1em') - .attr('x', '1') - .text(lines[i]); - } - - util/* applyStyle */.AV(domNode, node.labelStyle); - - return domNode; -} - -function processEscapeSequences(text) { - var newText = ''; - var escaped = false; - var ch; - for (var i = 0; i < text.length; ++i) { - ch = text[i]; - if (escaped) { - switch (ch) { - case 'n': - newText += '\n'; - break; - default: - newText += ch; - } - escaped = false; - } else if (ch === '\\') { - escaped = true; - } else { - newText += ch; - } - } - return newText; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre-js/label/add-label.js - - - - - - -function addLabel(root, node, location) { - var label = node.label; - var labelSvg = root.append('g'); - - // Allow the label to be a string, a function that returns a DOM element, or - // a DOM element itself. - if (node.labelType === 'svg') { - addSVGLabel(labelSvg, node); - } else if (typeof label !== 'string' || node.labelType === 'html') { - (0,add_html_label/* addHtmlLabel */.H)(labelSvg, node); - } else { - addTextLabel(labelSvg, node); - } - - var labelBBox = labelSvg.node().getBBox(); - var y; - switch (location) { - case 'top': - y = -node.height / 2; - break; - case 'bottom': - y = node.height / 2 - labelBBox.height; - break; - default: - y = -labelBBox.height / 2; - } - labelSvg.attr('transform', 'translate(' + -labelBBox.width / 2 + ',' + y + ')'); - - return labelSvg; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre-js/create-clusters.js - - - - - - -var createClusters = function (selection, g) { - var clusters = g.nodes().filter(function (v) { - return util/* isSubgraph */.De(g, v); - }); - var svgClusters = selection.selectAll('g.cluster').data(clusters, function (v) { - return v; - }); - - util/* applyTransition */.c$(svgClusters.exit(), g).style('opacity', 0).remove(); - - var enterSelection = svgClusters - .enter() - .append('g') - .attr('class', 'cluster') - .attr('id', function (v) { - var node = g.node(v); - return node.id; - }) - .style('opacity', 0) - .each(function (v) { - var node = g.node(v); - var thisGroup = src/* select */.Ltv(this); - src/* select */.Ltv(this).append('rect'); - var labelGroup = thisGroup.append('g').attr('class', 'label'); - addLabel(labelGroup, node, node.clusterLabelPos); - }); - - svgClusters = svgClusters.merge(enterSelection); - - svgClusters = util/* applyTransition */.c$(svgClusters, g).style('opacity', 1); - - svgClusters.selectAll('rect').each(function (c) { - var node = g.node(c); - var domCluster = src/* select */.Ltv(this); - util/* applyStyle */.AV(domCluster, node.style); - }); - - return svgClusters; -}; - -function setCreateClusters(value) { - createClusters = value; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre-js/create-edge-labels.js - - - - - - - -let createEdgeLabels = function (selection, g) { - var svgEdgeLabels = selection - .selectAll('g.edgeLabel') - .data(g.edges(), function (e) { - return util/* edgeToId */.gh(e); - }) - .classed('update', true); - - svgEdgeLabels.exit().remove(); - svgEdgeLabels.enter().append('g').classed('edgeLabel', true).style('opacity', 0); - - svgEdgeLabels = selection.selectAll('g.edgeLabel'); - - svgEdgeLabels.each(function (e) { - var root = src/* select */.Ltv(this); - root.select('.label').remove(); - var edge = g.edge(e); - var label = addLabel(root, g.edge(e), 0).classed('label', true); - var bbox = label.node().getBBox(); - - if (edge.labelId) { - label.attr('id', edge.labelId); - } - if (!has/* default */.A(edge, 'width')) { - edge.width = bbox.width; - } - if (!has/* default */.A(edge, 'height')) { - edge.height = bbox.height; - } - }); - - var exitSelection; - - if (svgEdgeLabels.exit) { - exitSelection = svgEdgeLabels.exit(); - } else { - exitSelection = svgEdgeLabels.selectAll(null); // empty selection - } - - util/* applyTransition */.c$(exitSelection, g).style('opacity', 0).remove(); - - return svgEdgeLabels; -}; - -function setCreateEdgeLabels(value) { - createEdgeLabels = value; -} - -// EXTERNAL MODULE: ./node_modules/lodash-es/uniqueId.js -var uniqueId = __webpack_require__(5664); -// EXTERNAL MODULE: ./node_modules/lodash-es/range.js + 2 modules -var range = __webpack_require__(91395); -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre-js/intersect/intersect-node.js - - -function intersectNode(node, point) { - return node.intersect(point); -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre-js/create-edge-paths.js - - - - - - - -var createEdgePaths = function (selection, g, arrows) { - var previousPaths = selection - .selectAll('g.edgePath') - .data(g.edges(), function (e) { - return util/* edgeToId */.gh(e); - }) - .classed('update', true); - - var newPaths = enter(previousPaths, g); - exit(previousPaths, g); - - var svgPaths = previousPaths.merge !== undefined ? previousPaths.merge(newPaths) : previousPaths; - util/* applyTransition */.c$(svgPaths, g).style('opacity', 1); - - // Save DOM element in the path group, and set ID and class - svgPaths.each(function (e) { - var domEdge = src/* select */.Ltv(this); - var edge = g.edge(e); - edge.elem = this; - - if (edge.id) { - domEdge.attr('id', edge.id); - } - - util/* applyClass */.nh( - domEdge, - edge['class'], - (domEdge.classed('update') ? 'update ' : '') + 'edgePath' - ); - }); - - svgPaths.selectAll('path.path').each(function (e) { - var edge = g.edge(e); - edge.arrowheadId = uniqueId/* default */.A('arrowhead'); - - var domEdge = src/* select */.Ltv(this) - .attr('marker-end', function () { - return 'url(' + makeFragmentRef(location.href, edge.arrowheadId) + ')'; - }) - .style('fill', 'none'); - - util/* applyTransition */.c$(domEdge, g).attr('d', function (e) { - return calcPoints(g, e); - }); - - util/* applyStyle */.AV(domEdge, edge.style); - }); - - svgPaths.selectAll('defs *').remove(); - svgPaths.selectAll('defs').each(function (e) { - var edge = g.edge(e); - var arrowhead = arrows[edge.arrowhead]; - arrowhead(src/* select */.Ltv(this), edge.arrowheadId, edge, 'arrowhead'); - }); - - return svgPaths; -}; - -function setCreateEdgePaths(value) { - createEdgePaths = value; -} - -function makeFragmentRef(url, fragmentId) { - var baseUrl = url.split('#')[0]; - return baseUrl + '#' + fragmentId; -} - -function calcPoints(g, e) { - var edge = g.edge(e); - var tail = g.node(e.v); - var head = g.node(e.w); - var points = edge.points.slice(1, edge.points.length - 1); - points.unshift(intersectNode(tail, points[0])); - points.push(intersectNode(head, points[points.length - 1])); - - return createLine(edge, points); -} - -function createLine(edge, points) { - // @ts-expect-error - var line = (src/* line */.n8j || src/* svg */.JWy.line)() - .x(function (d) { - return d.x; - }) - .y(function (d) { - return d.y; - }); - - (line.curve || line.interpolate)(edge.curve); - - return line(points); -} - -function getCoords(elem) { - var bbox = elem.getBBox(); - var matrix = elem.ownerSVGElement - .getScreenCTM() - .inverse() - .multiply(elem.getScreenCTM()) - .translate(bbox.width / 2, bbox.height / 2); - return { x: matrix.e, y: matrix.f }; -} - -function enter(svgPaths, g) { - var svgPathsEnter = svgPaths.enter().append('g').attr('class', 'edgePath').style('opacity', 0); - svgPathsEnter - .append('path') - .attr('class', 'path') - .attr('d', function (e) { - var edge = g.edge(e); - var sourceElem = g.node(e.v).elem; - var points = range/* default */.A(edge.points.length).map(function () { - return getCoords(sourceElem); - }); - return createLine(edge, points); - }); - svgPathsEnter.append('defs'); - return svgPathsEnter; -} - -function exit(svgPaths, g) { - var svgPathExit = svgPaths.exit(); - util/* applyTransition */.c$(svgPathExit, g).style('opacity', 0).remove(); -} - -// EXTERNAL MODULE: ./node_modules/lodash-es/pick.js + 4 modules -var pick = __webpack_require__(81942); -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre-js/create-nodes.js - - - - - - - -var createNodes = function (selection, g, shapes) { - var simpleNodes = g.nodes().filter(function (v) { - return !util/* isSubgraph */.De(g, v); - }); - var svgNodes = selection - .selectAll('g.node') - .data(simpleNodes, function (v) { - return v; - }) - .classed('update', true); - - svgNodes.exit().remove(); - - svgNodes.enter().append('g').attr('class', 'node').style('opacity', 0); - - svgNodes = selection.selectAll('g.node'); - - svgNodes.each(function (v) { - var node = g.node(v); - var thisGroup = src/* select */.Ltv(this); - util/* applyClass */.nh( - thisGroup, - node['class'], - (thisGroup.classed('update') ? 'update ' : '') + 'node' - ); - - thisGroup.select('g.label').remove(); - var labelGroup = thisGroup.append('g').attr('class', 'label'); - var labelDom = addLabel(labelGroup, node); - var shape = shapes[node.shape]; - var bbox = pick/* default */.A(labelDom.node().getBBox(), 'width', 'height'); - - node.elem = this; - - if (node.id) { - thisGroup.attr('id', node.id); - } - if (node.labelId) { - labelGroup.attr('id', node.labelId); - } - - if (has/* default */.A(node, 'width')) { - bbox.width = node.width; - } - if (has/* default */.A(node, 'height')) { - bbox.height = node.height; - } - - bbox.width += node.paddingLeft + node.paddingRight; - bbox.height += node.paddingTop + node.paddingBottom; - labelGroup.attr( - 'transform', - 'translate(' + - (node.paddingLeft - node.paddingRight) / 2 + - ',' + - (node.paddingTop - node.paddingBottom) / 2 + - ')' - ); - - var root = src/* select */.Ltv(this); - root.select('.label-container').remove(); - var shapeSvg = shape(root, bbox, node).classed('label-container', true); - util/* applyStyle */.AV(shapeSvg, node.style); - - var shapeBBox = shapeSvg.node().getBBox(); - node.width = shapeBBox.width; - node.height = shapeBBox.height; - }); - - var exitSelection; - - if (svgNodes.exit) { - exitSelection = svgNodes.exit(); - } else { - exitSelection = svgNodes.selectAll(null); // empty selection - } - - util/* applyTransition */.c$(exitSelection, g).style('opacity', 0).remove(); - - return svgNodes; -}; - -function setCreateNodes(value) { - createNodes = value; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre-js/position-clusters.js - - - - - -function positionClusters(selection, g) { - var created = selection.filter(function () { - return !src/* select */.Ltv(this).classed('update'); - }); - - function translate(v) { - var node = g.node(v); - return 'translate(' + node.x + ',' + node.y + ')'; - } - - created.attr('transform', translate); - - util/* applyTransition */.c$(selection, g).style('opacity', 1).attr('transform', translate); - - util/* applyTransition */.c$(created.selectAll('rect'), g) - .attr('width', function (v) { - return g.node(v).width; - }) - .attr('height', function (v) { - return g.node(v).height; - }) - .attr('x', function (v) { - var node = g.node(v); - return -node.width / 2; - }) - .attr('y', function (v) { - var node = g.node(v); - return -node.height / 2; - }); -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre-js/position-edge-labels.js - - - - - - -function positionEdgeLabels(selection, g) { - var created = selection.filter(function () { - return !src/* select */.Ltv(this).classed('update'); - }); - - function translate(e) { - var edge = g.edge(e); - return has/* default */.A(edge, 'x') ? 'translate(' + edge.x + ',' + edge.y + ')' : ''; - } - - created.attr('transform', translate); - - util/* applyTransition */.c$(selection, g).style('opacity', 1).attr('transform', translate); -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre-js/position-nodes.js - - - - - -function positionNodes(selection, g) { - var created = selection.filter(function () { - return !src/* select */.Ltv(this).classed('update'); - }); - - function translate(v) { - var node = g.node(v); - return 'translate(' + node.x + ',' + node.y + ')'; - } - - created.attr('transform', translate); - - util/* applyTransition */.c$(selection, g).style('opacity', 1).attr('transform', translate); -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre-js/intersect/intersect-ellipse.js - - -function intersectEllipse(node, rx, ry, point) { - // Formulae from: http://mathworld.wolfram.com/Ellipse-LineIntersection.html - - var cx = node.x; - var cy = node.y; - - var px = cx - point.x; - var py = cy - point.y; - - var det = Math.sqrt(rx * rx * py * py + ry * ry * px * px); - - var dx = Math.abs((rx * ry * px) / det); - if (point.x < cx) { - dx = -dx; - } - var dy = Math.abs((rx * ry * py) / det); - if (point.y < cy) { - dy = -dy; - } - - return { x: cx + dx, y: cy + dy }; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre-js/intersect/intersect-circle.js - - - - -function intersectCircle(node, rx, point) { - return intersectEllipse(node, rx, rx, point); -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre-js/intersect/intersect-line.js - - -/* - * Returns the point at which two lines, p and q, intersect or returns - * undefined if they do not intersect. - */ -function intersectLine(p1, p2, q1, q2) { - // Algorithm from J. Avro, (ed.) Graphics Gems, No 2, Morgan Kaufmann, 1994, - // p7 and p473. - - var a1, a2, b1, b2, c1, c2; - var r1, r2, r3, r4; - var denom, offset, num; - var x, y; - - // Compute a1, b1, c1, where line joining points 1 and 2 is F(x,y) = a1 x + - // b1 y + c1 = 0. - a1 = p2.y - p1.y; - b1 = p1.x - p2.x; - c1 = p2.x * p1.y - p1.x * p2.y; - - // Compute r3 and r4. - r3 = a1 * q1.x + b1 * q1.y + c1; - r4 = a1 * q2.x + b1 * q2.y + c1; - - // Check signs of r3 and r4. If both point 3 and point 4 lie on - // same side of line 1, the line segments do not intersect. - if (r3 !== 0 && r4 !== 0 && sameSign(r3, r4)) { - return /*DONT_INTERSECT*/; - } - - // Compute a2, b2, c2 where line joining points 3 and 4 is G(x,y) = a2 x + b2 y + c2 = 0 - a2 = q2.y - q1.y; - b2 = q1.x - q2.x; - c2 = q2.x * q1.y - q1.x * q2.y; - - // Compute r1 and r2 - r1 = a2 * p1.x + b2 * p1.y + c2; - r2 = a2 * p2.x + b2 * p2.y + c2; - - // Check signs of r1 and r2. If both point 1 and point 2 lie - // on same side of second line segment, the line segments do - // not intersect. - if (r1 !== 0 && r2 !== 0 && sameSign(r1, r2)) { - return /*DONT_INTERSECT*/; - } - - // Line segments intersect: compute intersection point. - denom = a1 * b2 - a2 * b1; - if (denom === 0) { - return /*COLLINEAR*/; - } - - offset = Math.abs(denom / 2); - - // The denom/2 is to get rounding instead of truncating. It - // is added or subtracted to the numerator, depending upon the - // sign of the numerator. - num = b1 * c2 - b2 * c1; - x = num < 0 ? (num - offset) / denom : (num + offset) / denom; - - num = a2 * c1 - a1 * c2; - y = num < 0 ? (num - offset) / denom : (num + offset) / denom; - - return { x: x, y: y }; -} - -function sameSign(r1, r2) { - return r1 * r2 > 0; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre-js/intersect/intersect-polygon.js - - - - -/* - * Returns the point ({x, y}) at which the point argument intersects with the - * node argument assuming that it has the shape specified by polygon. - */ -function intersectPolygon(node, polyPoints, point) { - var x1 = node.x; - var y1 = node.y; - - var intersections = []; - - var minX = Number.POSITIVE_INFINITY; - var minY = Number.POSITIVE_INFINITY; - polyPoints.forEach(function (entry) { - minX = Math.min(minX, entry.x); - minY = Math.min(minY, entry.y); - }); - - var left = x1 - node.width / 2 - minX; - var top = y1 - node.height / 2 - minY; - - for (var i = 0; i < polyPoints.length; i++) { - var p1 = polyPoints[i]; - var p2 = polyPoints[i < polyPoints.length - 1 ? i + 1 : 0]; - var intersect = intersectLine( - node, - point, - { x: left + p1.x, y: top + p1.y }, - { x: left + p2.x, y: top + p2.y } - ); - if (intersect) { - intersections.push(intersect); - } - } - - if (!intersections.length) { - console.log('NO INTERSECTION FOUND, RETURN NODE CENTER', node); - return node; - } - - if (intersections.length > 1) { - // More intersections, find the one nearest to edge end point - intersections.sort(function (p, q) { - var pdx = p.x - point.x; - var pdy = p.y - point.y; - var distp = Math.sqrt(pdx * pdx + pdy * pdy); - - var qdx = q.x - point.x; - var qdy = q.y - point.y; - var distq = Math.sqrt(qdx * qdx + qdy * qdy); - - return distp < distq ? -1 : distp === distq ? 0 : 1; - }); - } - return intersections[0]; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre-js/intersect/intersect-rect.js - - -function intersectRect(node, point) { - var x = node.x; - var y = node.y; - - // Rectangle intersection algorithm from: - // http://math.stackexchange.com/questions/108113/find-edge-between-two-boxes - var dx = point.x - x; - var dy = point.y - y; - var w = node.width / 2; - var h = node.height / 2; - - var sx, sy; - if (Math.abs(dy) * w > Math.abs(dx) * h) { - // Intersection is top or bottom of rect. - if (dy < 0) { - h = -h; - } - sx = dy === 0 ? 0 : (h * dx) / dy; - sy = h; - } else { - // Intersection is left or right of rect. - if (dx < 0) { - w = -w; - } - sx = w; - sy = dx === 0 ? 0 : (w * dy) / dx; - } - - return { x: x + sx, y: y + sy }; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre-js/shapes.js - - - - - - - -var shapes = { - rect, - ellipse, - circle, - diamond, -}; - -function setShapes(value) { - shapes = value; -} - -function rect(parent, bbox, node) { - var shapeSvg = parent - .insert('rect', ':first-child') - .attr('rx', node.rx) - .attr('ry', node.ry) - .attr('x', -bbox.width / 2) - .attr('y', -bbox.height / 2) - .attr('width', bbox.width) - .attr('height', bbox.height); - - node.intersect = function (point) { - return intersectRect(node, point); - }; - - return shapeSvg; -} - -function ellipse(parent, bbox, node) { - var rx = bbox.width / 2; - var ry = bbox.height / 2; - var shapeSvg = parent - .insert('ellipse', ':first-child') - .attr('x', -bbox.width / 2) - .attr('y', -bbox.height / 2) - .attr('rx', rx) - .attr('ry', ry); - - node.intersect = function (point) { - return intersectEllipse(node, rx, ry, point); - }; - - return shapeSvg; -} - -function circle(parent, bbox, node) { - var r = Math.max(bbox.width, bbox.height) / 2; - var shapeSvg = parent - .insert('circle', ':first-child') - .attr('x', -bbox.width / 2) - .attr('y', -bbox.height / 2) - .attr('r', r); - - node.intersect = function (point) { - return intersectCircle(node, r, point); - }; - - return shapeSvg; -} - -// Circumscribe an ellipse for the bounding box with a diamond shape. I derived -// the function to calculate the diamond shape from: -// http://mathforum.org/kb/message.jspa?messageID=3750236 -function diamond(parent, bbox, node) { - var w = (bbox.width * Math.SQRT2) / 2; - var h = (bbox.height * Math.SQRT2) / 2; - var points = [ - { x: 0, y: -h }, - { x: -w, y: 0 }, - { x: 0, y: h }, - { x: w, y: 0 }, - ]; - var shapeSvg = parent.insert('polygon', ':first-child').attr( - 'points', - points - .map(function (p) { - return p.x + ',' + p.y; - }) - .join(' ') - ); - - node.intersect = function (p) { - return intersectPolygon(node, points, p); - }; - - return shapeSvg; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre-js/render.js - - - - - - - - - - - - - - - -// This design is based on http://bost.ocks.org/mike/chart/. -function render() { - var fn = function (svg, g) { - preProcessGraph(g); - - var outputGroup = createOrSelectGroup(svg, 'output'); - var clustersGroup = createOrSelectGroup(outputGroup, 'clusters'); - var edgePathsGroup = createOrSelectGroup(outputGroup, 'edgePaths'); - var edgeLabels = createEdgeLabels(createOrSelectGroup(outputGroup, 'edgeLabels'), g); - var nodes = createNodes(createOrSelectGroup(outputGroup, 'nodes'), g, shapes); - - (0,dagre/* layout */.Zp)(g); - - positionNodes(nodes, g); - positionEdgeLabels(edgeLabels, g); - createEdgePaths(edgePathsGroup, g, arrows); - - var clusters = createClusters(clustersGroup, g); - positionClusters(clusters, g); - - postProcessGraph(g); - }; - - fn.createNodes = function (value) { - if (!arguments.length) return createNodes; - setCreateNodes(value); - return fn; - }; - - fn.createClusters = function (value) { - if (!arguments.length) return createClusters; - setCreateClusters(value); - return fn; - }; - - fn.createEdgeLabels = function (value) { - if (!arguments.length) return createEdgeLabels; - setCreateEdgeLabels(value); - return fn; - }; - - fn.createEdgePaths = function (value) { - if (!arguments.length) return createEdgePaths; - setCreateEdgePaths(value); - return fn; - }; - - fn.shapes = function (value) { - if (!arguments.length) return shapes; - setShapes(value); - return fn; - }; - - fn.arrows = function (value) { - if (!arguments.length) return arrows; - setArrows(value); - return fn; - }; - - return fn; -} - -var NODE_DEFAULT_ATTRS = { - paddingLeft: 10, - paddingRight: 10, - paddingTop: 10, - paddingBottom: 10, - rx: 0, - ry: 0, - shape: 'rect', -}; - -var EDGE_DEFAULT_ATTRS = { - arrowhead: 'normal', - curve: src/* curveLinear */.lUB, -}; - -function preProcessGraph(g) { - g.nodes().forEach(function (v) { - var node = g.node(v); - if (!has/* default */.A(node, 'label') && !g.children(v).length) { - node.label = v; - } - - if (has/* default */.A(node, 'paddingX')) { - defaults/* default */.A(node, { - paddingLeft: node.paddingX, - paddingRight: node.paddingX, - }); - } - - if (has/* default */.A(node, 'paddingY')) { - defaults/* default */.A(node, { - paddingTop: node.paddingY, - paddingBottom: node.paddingY, - }); - } - - if (has/* default */.A(node, 'padding')) { - defaults/* default */.A(node, { - paddingLeft: node.padding, - paddingRight: node.padding, - paddingTop: node.padding, - paddingBottom: node.padding, - }); - } - - defaults/* default */.A(node, NODE_DEFAULT_ATTRS); - - forEach/* default */.A(['paddingLeft', 'paddingRight', 'paddingTop', 'paddingBottom'], function (k) { - node[k] = Number(node[k]); - }); - - // Save dimensions for restore during post-processing - if (has/* default */.A(node, 'width')) { - node._prevWidth = node.width; - } - if (has/* default */.A(node, 'height')) { - node._prevHeight = node.height; - } - }); - - g.edges().forEach(function (e) { - var edge = g.edge(e); - if (!has/* default */.A(edge, 'label')) { - edge.label = ''; - } - defaults/* default */.A(edge, EDGE_DEFAULT_ATTRS); - }); -} - -function postProcessGraph(g) { - forEach/* default */.A(g.nodes(), function (v) { - var node = g.node(v); - - // Restore original dimensions - if (has/* default */.A(node, '_prevWidth')) { - node.width = node._prevWidth; - } else { - delete node.width; - } - - if (has/* default */.A(node, '_prevHeight')) { - node.height = node._prevHeight; - } else { - delete node.height; - } - - delete node._prevWidth; - delete node._prevHeight; - }); -} - -function createOrSelectGroup(root, name) { - var selection = root.select('g.' + name); - if (selection.empty()) { - selection = root.append('g').attr('class', name); - } - return selection; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/index.js - - - - - - - -// EXTERNAL MODULE: ./node_modules/mermaid/dist/styles-c10674c1.js -var styles_c10674c1 = __webpack_require__(35900); -// EXTERNAL MODULE: ./node_modules/dayjs/dayjs.min.js -var dayjs_min = __webpack_require__(74353); -// EXTERNAL MODULE: ./node_modules/@braintree/sanitize-url/dist/index.js -var dist = __webpack_require__(16750); -// EXTERNAL MODULE: ./node_modules/dompurify/dist/purify.es.mjs -var purify_es = __webpack_require__(99418); -// EXTERNAL MODULE: ./node_modules/dagre-d3-es/src/graphlib/json.js -var json = __webpack_require__(14075); -;// CONCATENATED MODULE: ./node_modules/mermaid/dist/flowDiagram-66a62f08.js - - - - - - - - - - - - - - - - - - - - - - - - - -function question(parent, bbox, node) { - const w = bbox.width; - const h = bbox.height; - const s = (w + h) * 0.9; - const points = [ - { x: s / 2, y: 0 }, - { x: s, y: -s / 2 }, - { x: s / 2, y: -s }, - { x: 0, y: -s / 2 } - ]; - const shapeSvg = insertPolygonShape(parent, s, s, points); - node.intersect = function(point) { - return intersectPolygon(node, points, point); - }; - return shapeSvg; -} -function hexagon(parent, bbox, node) { - const f = 4; - const h = bbox.height; - const m = h / f; - const w = bbox.width + 2 * m; - const points = [ - { x: m, y: 0 }, - { x: w - m, y: 0 }, - { x: w, y: -h / 2 }, - { x: w - m, y: -h }, - { x: m, y: -h }, - { x: 0, y: -h / 2 } - ]; - const shapeSvg = insertPolygonShape(parent, w, h, points); - node.intersect = function(point) { - return intersectPolygon(node, points, point); - }; - return shapeSvg; -} -function rect_left_inv_arrow(parent, bbox, node) { - const w = bbox.width; - const h = bbox.height; - const points = [ - { x: -h / 2, y: 0 }, - { x: w, y: 0 }, - { x: w, y: -h }, - { x: -h / 2, y: -h }, - { x: 0, y: -h / 2 } - ]; - const shapeSvg = insertPolygonShape(parent, w, h, points); - node.intersect = function(point) { - return intersectPolygon(node, points, point); - }; - return shapeSvg; -} -function lean_right(parent, bbox, node) { - const w = bbox.width; - const h = bbox.height; - const points = [ - { x: -2 * h / 6, y: 0 }, - { x: w - h / 6, y: 0 }, - { x: w + 2 * h / 6, y: -h }, - { x: h / 6, y: -h } - ]; - const shapeSvg = insertPolygonShape(parent, w, h, points); - node.intersect = function(point) { - return intersectPolygon(node, points, point); - }; - return shapeSvg; -} -function lean_left(parent, bbox, node) { - const w = bbox.width; - const h = bbox.height; - const points = [ - { x: 2 * h / 6, y: 0 }, - { x: w + h / 6, y: 0 }, - { x: w - 2 * h / 6, y: -h }, - { x: -h / 6, y: -h } - ]; - const shapeSvg = insertPolygonShape(parent, w, h, points); - node.intersect = function(point) { - return intersectPolygon(node, points, point); - }; - return shapeSvg; -} -function trapezoid(parent, bbox, node) { - const w = bbox.width; - const h = bbox.height; - const points = [ - { x: -2 * h / 6, y: 0 }, - { x: w + 2 * h / 6, y: 0 }, - { x: w - h / 6, y: -h }, - { x: h / 6, y: -h } - ]; - const shapeSvg = insertPolygonShape(parent, w, h, points); - node.intersect = function(point) { - return intersectPolygon(node, points, point); - }; - return shapeSvg; -} -function inv_trapezoid(parent, bbox, node) { - const w = bbox.width; - const h = bbox.height; - const points = [ - { x: h / 6, y: 0 }, - { x: w - h / 6, y: 0 }, - { x: w + 2 * h / 6, y: -h }, - { x: -2 * h / 6, y: -h } - ]; - const shapeSvg = insertPolygonShape(parent, w, h, points); - node.intersect = function(point) { - return intersectPolygon(node, points, point); - }; - return shapeSvg; -} -function rect_right_inv_arrow(parent, bbox, node) { - const w = bbox.width; - const h = bbox.height; - const points = [ - { x: 0, y: 0 }, - { x: w + h / 2, y: 0 }, - { x: w, y: -h / 2 }, - { x: w + h / 2, y: -h }, - { x: 0, y: -h } - ]; - const shapeSvg = insertPolygonShape(parent, w, h, points); - node.intersect = function(point) { - return intersectPolygon(node, points, point); - }; - return shapeSvg; -} -function stadium(parent, bbox, node) { - const h = bbox.height; - const w = bbox.width + h / 4; - const shapeSvg = parent.insert("rect", ":first-child").attr("rx", h / 2).attr("ry", h / 2).attr("x", -w / 2).attr("y", -h / 2).attr("width", w).attr("height", h); - node.intersect = function(point) { - return intersectRect(node, point); - }; - return shapeSvg; -} -function subroutine(parent, bbox, node) { - const w = bbox.width; - const h = bbox.height; - const points = [ - { x: 0, y: 0 }, - { x: w, y: 0 }, - { x: w, y: -h }, - { x: 0, y: -h }, - { x: 0, y: 0 }, - { x: -8, y: 0 }, - { x: w + 8, y: 0 }, - { x: w + 8, y: -h }, - { x: -8, y: -h }, - { x: -8, y: 0 } - ]; - const shapeSvg = insertPolygonShape(parent, w, h, points); - node.intersect = function(point) { - return intersectPolygon(node, points, point); - }; - return shapeSvg; -} -function cylinder(parent, bbox, node) { - const w = bbox.width; - const rx = w / 2; - const ry = rx / (2.5 + w / 50); - const h = bbox.height + ry; - const shape = "M 0," + ry + " a " + rx + "," + ry + " 0,0,0 " + w + " 0 a " + rx + "," + ry + " 0,0,0 " + -w + " 0 l 0," + h + " a " + rx + "," + ry + " 0,0,0 " + w + " 0 l 0," + -h; - const shapeSvg = parent.attr("label-offset-y", ry).insert("path", ":first-child").attr("d", shape).attr("transform", "translate(" + -w / 2 + "," + -(h / 2 + ry) + ")"); - node.intersect = function(point) { - const pos = intersectRect(node, point); - const x = pos.x - node.x; - if (rx != 0 && (Math.abs(x) < node.width / 2 || Math.abs(x) == node.width / 2 && Math.abs(pos.y - node.y) > node.height / 2 - ry)) { - let y = ry * ry * (1 - x * x / (rx * rx)); - if (y != 0) { - y = Math.sqrt(y); - } - y = ry - y; - if (point.y - node.y > 0) { - y = -y; - } - pos.y += y; - } - return pos; - }; - return shapeSvg; -} -function addToRender(render2) { - render2.shapes().question = question; - render2.shapes().hexagon = hexagon; - render2.shapes().stadium = stadium; - render2.shapes().subroutine = subroutine; - render2.shapes().cylinder = cylinder; - render2.shapes().rect_left_inv_arrow = rect_left_inv_arrow; - render2.shapes().lean_right = lean_right; - render2.shapes().lean_left = lean_left; - render2.shapes().trapezoid = trapezoid; - render2.shapes().inv_trapezoid = inv_trapezoid; - render2.shapes().rect_right_inv_arrow = rect_right_inv_arrow; -} -function addToRenderV2(addShape) { - addShape({ question }); - addShape({ hexagon }); - addShape({ stadium }); - addShape({ subroutine }); - addShape({ cylinder }); - addShape({ rect_left_inv_arrow }); - addShape({ lean_right }); - addShape({ lean_left }); - addShape({ trapezoid }); - addShape({ inv_trapezoid }); - addShape({ rect_right_inv_arrow }); -} -function insertPolygonShape(parent, w, h, points) { - return parent.insert("polygon", ":first-child").attr( - "points", - points.map(function(d) { - return d.x + "," + d.y; - }).join(" ") - ).attr("transform", "translate(" + -w / 2 + "," + h / 2 + ")"); -} -const flowChartShapes = { - addToRender, - addToRenderV2 -}; -const conf = {}; -const setConf = function(cnf) { - const keys = Object.keys(cnf); - for (const key of keys) { - conf[key] = cnf[key]; - } -}; -const addVertices = async function(vert, g, svgId, root, _doc, diagObj) { - const svg = !root ? (0,src/* select */.Ltv)(`[id="${svgId}"]`) : root.select(`[id="${svgId}"]`); - const doc = !_doc ? document : _doc; - const keys = Object.keys(vert); - for (const id of keys) { - const vertex = vert[id]; - let classStr = "default"; - if (vertex.classes.length > 0) { - classStr = vertex.classes.join(" "); - } - const styles = (0,mermaid_b5860b54.k)(vertex.styles); - let vertexText = vertex.text !== void 0 ? vertex.text : vertex.id; - let vertexNode; - if ((0,mermaid_b5860b54.m)((0,mermaid_b5860b54.c)().flowchart.htmlLabels)) { - const node = { - label: await (0,mermaid_b5860b54.r)( - vertexText.replace( - /fa[blrs]?:fa-[\w-]+/g, - // cspell:disable-line - (s) => `` - ), - (0,mermaid_b5860b54.c)() - ) - }; - vertexNode = (0,add_html_label/* addHtmlLabel */.H)(svg, node).node(); - vertexNode.parentNode.removeChild(vertexNode); - } else { - const svgLabel = doc.createElementNS("http://www.w3.org/2000/svg", "text"); - svgLabel.setAttribute("style", styles.labelStyle.replace("color:", "fill:")); - const rows = vertexText.split(mermaid_b5860b54.e.lineBreakRegex); - for (const row of rows) { - const tspan = doc.createElementNS("http://www.w3.org/2000/svg", "tspan"); - tspan.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"); - tspan.setAttribute("dy", "1em"); - tspan.setAttribute("x", "1"); - tspan.textContent = row; - svgLabel.appendChild(tspan); - } - vertexNode = svgLabel; - } - let radius = 0; - let _shape = ""; - switch (vertex.type) { - case "round": - radius = 5; - _shape = "rect"; - break; - case "square": - _shape = "rect"; - break; - case "diamond": - _shape = "question"; - break; - case "hexagon": - _shape = "hexagon"; - break; - case "odd": - _shape = "rect_left_inv_arrow"; - break; - case "lean_right": - _shape = "lean_right"; - break; - case "lean_left": - _shape = "lean_left"; - break; - case "trapezoid": - _shape = "trapezoid"; - break; - case "inv_trapezoid": - _shape = "inv_trapezoid"; - break; - case "odd_right": - _shape = "rect_left_inv_arrow"; - break; - case "circle": - _shape = "circle"; - break; - case "ellipse": - _shape = "ellipse"; - break; - case "stadium": - _shape = "stadium"; - break; - case "subroutine": - _shape = "subroutine"; - break; - case "cylinder": - _shape = "cylinder"; - break; - case "group": - _shape = "rect"; - break; - default: - _shape = "rect"; - } - mermaid_b5860b54.l.warn("Adding node", vertex.id, vertex.domId); - g.setNode(diagObj.db.lookUpDomId(vertex.id), { - labelType: "svg", - labelStyle: styles.labelStyle, - shape: _shape, - label: vertexNode, - rx: radius, - ry: radius, - class: classStr, - style: styles.style, - id: diagObj.db.lookUpDomId(vertex.id) - }); - } -}; -const addEdges = async function(edges, g, diagObj) { - let cnt = 0; - let defaultStyle; - let defaultLabelStyle; - if (edges.defaultStyle !== void 0) { - const defaultStyles = (0,mermaid_b5860b54.k)(edges.defaultStyle); - defaultStyle = defaultStyles.style; - defaultLabelStyle = defaultStyles.labelStyle; - } - for (const edge of edges) { - cnt++; - const linkId = "L-" + edge.start + "-" + edge.end; - const linkNameStart = "LS-" + edge.start; - const linkNameEnd = "LE-" + edge.end; - const edgeData = {}; - if (edge.type === "arrow_open") { - edgeData.arrowhead = "none"; - } else { - edgeData.arrowhead = "normal"; - } - let style = ""; - let labelStyle = ""; - if (edge.style !== void 0) { - const styles = (0,mermaid_b5860b54.k)(edge.style); - style = styles.style; - labelStyle = styles.labelStyle; - } else { - switch (edge.stroke) { - case "normal": - style = "fill:none"; - if (defaultStyle !== void 0) { - style = defaultStyle; - } - if (defaultLabelStyle !== void 0) { - labelStyle = defaultLabelStyle; - } - break; - case "dotted": - style = "fill:none;stroke-width:2px;stroke-dasharray:3;"; - break; - case "thick": - style = " stroke-width: 3.5px;fill:none"; - break; - } - } - edgeData.style = style; - edgeData.labelStyle = labelStyle; - if (edge.interpolate !== void 0) { - edgeData.curve = (0,mermaid_b5860b54.n)(edge.interpolate, src/* curveLinear */.lUB); - } else if (edges.defaultInterpolate !== void 0) { - edgeData.curve = (0,mermaid_b5860b54.n)(edges.defaultInterpolate, src/* curveLinear */.lUB); - } else { - edgeData.curve = (0,mermaid_b5860b54.n)(conf.curve, src/* curveLinear */.lUB); - } - if (edge.text === void 0) { - if (edge.style !== void 0) { - edgeData.arrowheadStyle = "fill: #333"; - } - } else { - edgeData.arrowheadStyle = "fill: #333"; - edgeData.labelpos = "c"; - if ((0,mermaid_b5860b54.m)((0,mermaid_b5860b54.c)().flowchart.htmlLabels)) { - edgeData.labelType = "html"; - edgeData.label = `${await (0,mermaid_b5860b54.r)( - edge.text.replace( - /fa[blrs]?:fa-[\w-]+/g, - // cspell:disable-line - (s) => `` - ), - (0,mermaid_b5860b54.c)() - )}`; - } else { - edgeData.labelType = "text"; - edgeData.label = edge.text.replace(mermaid_b5860b54.e.lineBreakRegex, "\n"); - if (edge.style === void 0) { - edgeData.style = edgeData.style || "stroke: #333; stroke-width: 1.5px;fill:none"; - } - edgeData.labelStyle = edgeData.labelStyle.replace("color:", "fill:"); - } - } - edgeData.id = linkId; - edgeData.class = linkNameStart + " " + linkNameEnd; - edgeData.minlen = edge.length || 1; - g.setEdge(diagObj.db.lookUpDomId(edge.start), diagObj.db.lookUpDomId(edge.end), edgeData, cnt); - } -}; -const getClasses = function(text, diagObj) { - mermaid_b5860b54.l.info("Extracting classes"); - return diagObj.db.getClasses(); -}; -const draw = async function(text, id, _version, diagObj) { - mermaid_b5860b54.l.info("Drawing flowchart"); - const { securityLevel, flowchart: conf2 } = (0,mermaid_b5860b54.c)(); - let sandboxElement; - if (securityLevel === "sandbox") { - sandboxElement = (0,src/* select */.Ltv)("#i" + id); - } - const root = securityLevel === "sandbox" ? (0,src/* select */.Ltv)(sandboxElement.nodes()[0].contentDocument.body) : (0,src/* select */.Ltv)("body"); - const doc = securityLevel === "sandbox" ? sandboxElement.nodes()[0].contentDocument : document; - let dir = diagObj.db.getDirection(); - if (dir === void 0) { - dir = "TD"; - } - const nodeSpacing = conf2.nodeSpacing || 50; - const rankSpacing = conf2.rankSpacing || 50; - const g = new graphlib/* Graph */.T({ - multigraph: true, - compound: true - }).setGraph({ - rankdir: dir, - nodesep: nodeSpacing, - ranksep: rankSpacing, - marginx: 8, - marginy: 8 - }).setDefaultEdgeLabel(function() { - return {}; - }); - let subG; - const subGraphs = diagObj.db.getSubGraphs(); - for (let i2 = subGraphs.length - 1; i2 >= 0; i2--) { - subG = subGraphs[i2]; - diagObj.db.addVertex(subG.id, subG.title, "group", void 0, subG.classes); - } - const vert = diagObj.db.getVertices(); - mermaid_b5860b54.l.warn("Get vertices", vert); - const edges = diagObj.db.getEdges(); - let i = 0; - for (i = subGraphs.length - 1; i >= 0; i--) { - subG = subGraphs[i]; - (0,src/* selectAll */.Ubm)("cluster").append("text"); - for (let j = 0; j < subG.nodes.length; j++) { - mermaid_b5860b54.l.warn( - "Setting subgraph", - subG.nodes[j], - diagObj.db.lookUpDomId(subG.nodes[j]), - diagObj.db.lookUpDomId(subG.id) - ); - g.setParent(diagObj.db.lookUpDomId(subG.nodes[j]), diagObj.db.lookUpDomId(subG.id)); - } - } - await addVertices(vert, g, id, root, doc, diagObj); - await addEdges(edges, g, diagObj); - const render$1 = new render(); - flowChartShapes.addToRender(render$1); - render$1.arrows().none = function normal(parent, id2, edge, type) { - const marker = parent.append("marker").attr("id", id2).attr("viewBox", "0 0 10 10").attr("refX", 9).attr("refY", 5).attr("markerUnits", "strokeWidth").attr("markerWidth", 8).attr("markerHeight", 6).attr("orient", "auto"); - const path = marker.append("path").attr("d", "M 0 0 L 0 0 L 0 0 z"); - (0,util/* applyStyle */.AV)(path, edge[type + "Style"]); - }; - render$1.arrows().normal = function normal(parent, id2) { - const marker = parent.append("marker").attr("id", id2).attr("viewBox", "0 0 10 10").attr("refX", 9).attr("refY", 5).attr("markerUnits", "strokeWidth").attr("markerWidth", 8).attr("markerHeight", 6).attr("orient", "auto"); - marker.append("path").attr("d", "M 0 0 L 10 5 L 0 10 z").attr("class", "arrowheadPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"); - }; - const svg = root.select(`[id="${id}"]`); - const element = root.select("#" + id + " g"); - render$1(element, g); - element.selectAll("g.node").attr("title", function() { - return diagObj.db.getTooltip(this.id); - }); - diagObj.db.indexNodes("subGraph" + i); - for (i = 0; i < subGraphs.length; i++) { - subG = subGraphs[i]; - if (subG.title !== "undefined") { - const clusterRects = doc.querySelectorAll( - "#" + id + ' [id="' + diagObj.db.lookUpDomId(subG.id) + '"] rect' - ); - const clusterEl = doc.querySelectorAll( - "#" + id + ' [id="' + diagObj.db.lookUpDomId(subG.id) + '"]' - ); - const xPos = clusterRects[0].x.baseVal.value; - const yPos = clusterRects[0].y.baseVal.value; - const _width = clusterRects[0].width.baseVal.value; - const cluster = (0,src/* select */.Ltv)(clusterEl[0]); - const te = cluster.select(".label"); - te.attr("transform", `translate(${xPos + _width / 2}, ${yPos + 14})`); - te.attr("id", id + "Text"); - for (let j = 0; j < subG.classes.length; j++) { - clusterEl[0].classList.add(subG.classes[j]); - } - } - } - if (!conf2.htmlLabels) { - const labels = doc.querySelectorAll('[id="' + id + '"] .edgeLabel .label'); - for (const label of labels) { - const dim = label.getBBox(); - const rect = doc.createElementNS("http://www.w3.org/2000/svg", "rect"); - rect.setAttribute("rx", 0); - rect.setAttribute("ry", 0); - rect.setAttribute("width", dim.width); - rect.setAttribute("height", dim.height); - label.insertBefore(rect, label.firstChild); - } - } - (0,mermaid_b5860b54.o)(g, svg, conf2.diagramPadding, conf2.useMaxWidth); - const keys = Object.keys(vert); - keys.forEach(function(key) { - const vertex = vert[key]; - if (vertex.link) { - const node = root.select("#" + id + ' [id="' + diagObj.db.lookUpDomId(key) + '"]'); - if (node) { - const link = doc.createElementNS("http://www.w3.org/2000/svg", "a"); - link.setAttributeNS("http://www.w3.org/2000/svg", "class", vertex.classes.join(" ")); - link.setAttributeNS("http://www.w3.org/2000/svg", "href", vertex.link); - link.setAttributeNS("http://www.w3.org/2000/svg", "rel", "noopener"); - if (securityLevel === "sandbox") { - link.setAttributeNS("http://www.w3.org/2000/svg", "target", "_top"); - } else if (vertex.linkTarget) { - link.setAttributeNS("http://www.w3.org/2000/svg", "target", vertex.linkTarget); - } - const linkNode = node.insert(function() { - return link; - }, ":first-child"); - const shape = node.select(".label-container"); - if (shape) { - linkNode.append(function() { - return shape.node(); - }); - } - const label = node.select(".label"); - if (label) { - linkNode.append(function() { - return label.node(); - }); - } - } - } - }); -}; -const flowRenderer = { - setConf, - addVertices, - addEdges, - getClasses, - draw -}; -const diagram = { - parser: flowDb_956e92f1.p, - db: flowDb_956e92f1.f, - renderer: styles_c10674c1.f, - styles: styles_c10674c1.a, - init: (cnf) => { - if (!cnf.flowchart) { - cnf.flowchart = {}; - } - cnf.flowchart.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute; - flowRenderer.setConf(cnf.flowchart); - flowDb_956e92f1.f.clear(); - flowDb_956e92f1.f.setGen("gen-1"); - } -}; - - - -/***/ }), - -/***/ 8995: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ r: () => (/* binding */ render) -/* harmony export */ }); -/* harmony import */ var dagre_d3_es_src_dagre_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(21176); -/* harmony import */ var dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(14075); -/* harmony import */ var _edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(88146); -/* harmony import */ var _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(86079); -/* harmony import */ var dagre_d3_es_src_graphlib_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(697); -/* harmony import */ var _createText_2e5e7dd3_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(73743); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(26312); - - - - - - - -let clusterDb = {}; -let descendants = {}; -let parents = {}; -const clear$1 = () => { - descendants = {}; - parents = {}; - clusterDb = {}; -}; -const isDescendant = (id, ancestorId) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("In isDescendant", ancestorId, " ", id, " = ", descendants[ancestorId].includes(id)); - if (descendants[ancestorId].includes(id)) { - return true; - } - return false; -}; -const edgeInCluster = (edge, clusterId) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Descendants of ", clusterId, " is ", descendants[clusterId]); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Edge is ", edge); - if (edge.v === clusterId) { - return false; - } - if (edge.w === clusterId) { - return false; - } - if (!descendants[clusterId]) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Tilt, ", clusterId, ",not in descendants"); - return false; - } - return descendants[clusterId].includes(edge.v) || isDescendant(edge.v, clusterId) || isDescendant(edge.w, clusterId) || descendants[clusterId].includes(edge.w); -}; -const copy = (clusterId, graph, newGraph, rootId) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn( - "Copying children of ", - clusterId, - "root", - rootId, - "data", - graph.node(clusterId), - rootId - ); - const nodes = graph.children(clusterId) || []; - if (clusterId !== rootId) { - nodes.push(clusterId); - } - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Copying (nodes) clusterId", clusterId, "nodes", nodes); - nodes.forEach((node) => { - if (graph.children(node).length > 0) { - copy(node, graph, newGraph, rootId); - } else { - const data = graph.node(node); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("cp ", node, " to ", rootId, " with parent ", clusterId); - newGraph.setNode(node, data); - if (rootId !== graph.parent(node)) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Setting parent", node, graph.parent(node)); - newGraph.setParent(node, graph.parent(node)); - } - if (clusterId !== rootId && node !== clusterId) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Setting parent", node, clusterId); - newGraph.setParent(node, clusterId); - } else { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("In copy ", clusterId, "root", rootId, "data", graph.node(clusterId), rootId); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug( - "Not Setting parent for node=", - node, - "cluster!==rootId", - clusterId !== rootId, - "node!==clusterId", - node !== clusterId - ); - } - const edges = graph.edges(node); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Copying Edges", edges); - edges.forEach((edge) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Edge", edge); - const data2 = graph.edge(edge.v, edge.w, edge.name); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Edge data", data2, rootId); - try { - if (edgeInCluster(edge, rootId)) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Copying as ", edge.v, edge.w, data2, edge.name); - newGraph.setEdge(edge.v, edge.w, data2, edge.name); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("newGraph edges ", newGraph.edges(), newGraph.edge(newGraph.edges()[0])); - } else { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info( - "Skipping copy of edge ", - edge.v, - "-->", - edge.w, - " rootId: ", - rootId, - " clusterId:", - clusterId - ); - } - } catch (e) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.error(e); - } - }); - } - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Removing node", node); - graph.removeNode(node); - }); -}; -const extractDescendants = (id, graph) => { - const children = graph.children(id); - let res = [...children]; - for (const child of children) { - parents[child] = id; - res = [...res, ...extractDescendants(child, graph)]; - } - return res; -}; -const findNonClusterChild = (id, graph) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("Searching", id); - const children = graph.children(id); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("Searching children of id ", id, children); - if (children.length < 1) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("This is a valid node", id); - return id; - } - for (const child of children) { - const _id = findNonClusterChild(child, graph); - if (_id) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("Found replacement for", id, " => ", _id); - return _id; - } - } -}; -const getAnchorId = (id) => { - if (!clusterDb[id]) { - return id; - } - if (!clusterDb[id].externalConnections) { - return id; - } - if (clusterDb[id]) { - return clusterDb[id].id; - } - return id; -}; -const adjustClustersAndEdges = (graph, depth) => { - if (!graph || depth > 10) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Opting out, no graph "); - return; - } else { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Opting in, graph "); - } - graph.nodes().forEach(function(id) { - const children = graph.children(id); - if (children.length > 0) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn( - "Cluster identified", - id, - " Replacement id in edges: ", - findNonClusterChild(id, graph) - ); - descendants[id] = extractDescendants(id, graph); - clusterDb[id] = { id: findNonClusterChild(id, graph), clusterData: graph.node(id) }; - } - }); - graph.nodes().forEach(function(id) { - const children = graph.children(id); - const edges = graph.edges(); - if (children.length > 0) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Cluster identified", id, descendants); - edges.forEach((edge) => { - if (edge.v !== id && edge.w !== id) { - const d1 = isDescendant(edge.v, id); - const d2 = isDescendant(edge.w, id); - if (d1 ^ d2) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Edge: ", edge, " leaves cluster ", id); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Descendants of XXX ", id, ": ", descendants[id]); - clusterDb[id].externalConnections = true; - } - } - }); - } else { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Not a cluster ", id, descendants); - } - }); - for (let id of Object.keys(clusterDb)) { - const nonClusterChild = clusterDb[id].id; - const parent = graph.parent(nonClusterChild); - if (parent !== id && clusterDb[parent] && !clusterDb[parent].externalConnections) { - clusterDb[id].id = parent; - } - } - graph.edges().forEach(function(e) { - const edge = graph.edge(e); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(e)); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(graph.edge(e))); - let v = e.v; - let w = e.w; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn( - "Fix XXX", - clusterDb, - "ids:", - e.v, - e.w, - "Translating: ", - clusterDb[e.v], - " --- ", - clusterDb[e.w] - ); - if (clusterDb[e.v] && clusterDb[e.w] && clusterDb[e.v] === clusterDb[e.w]) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Fixing and trixing link to self - removing XXX", e.v, e.w, e.name); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Fixing and trixing - removing XXX", e.v, e.w, e.name); - v = getAnchorId(e.v); - w = getAnchorId(e.w); - graph.removeEdge(e.v, e.w, e.name); - const specialId = e.w + "---" + e.v; - graph.setNode(specialId, { - domId: specialId, - id: specialId, - labelStyle: "", - labelText: edge.label, - padding: 0, - shape: "labelRect", - style: "" - }); - const edge1 = structuredClone(edge); - const edge2 = structuredClone(edge); - edge1.label = ""; - edge1.arrowTypeEnd = "none"; - edge2.label = ""; - edge1.fromCluster = e.v; - edge2.toCluster = e.v; - graph.setEdge(v, specialId, edge1, e.name + "-cyclic-special"); - graph.setEdge(specialId, w, edge2, e.name + "-cyclic-special"); - } else if (clusterDb[e.v] || clusterDb[e.w]) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Fixing and trixing - removing XXX", e.v, e.w, e.name); - v = getAnchorId(e.v); - w = getAnchorId(e.w); - graph.removeEdge(e.v, e.w, e.name); - if (v !== e.v) { - const parent = graph.parent(v); - clusterDb[parent].externalConnections = true; - edge.fromCluster = e.v; - } - if (w !== e.w) { - const parent = graph.parent(w); - clusterDb[parent].externalConnections = true; - edge.toCluster = e.w; - } - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Fix Replacing with XXX", v, w, e.name); - graph.setEdge(v, w, edge, e.name); - } - }); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Adjusted Graph", dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .M(graph)); - extractor(graph, 0); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.trace(clusterDb); -}; -const extractor = (graph, depth) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("extractor - ", depth, dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .M(graph), graph.children("D")); - if (depth > 10) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.error("Bailing out"); - return; - } - let nodes = graph.nodes(); - let hasChildren = false; - for (const node of nodes) { - const children = graph.children(node); - hasChildren = hasChildren || children.length > 0; - } - if (!hasChildren) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Done, no node has children", graph.nodes()); - return; - } - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Nodes = ", nodes, depth); - for (const node of nodes) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug( - "Extracting node", - node, - clusterDb, - clusterDb[node] && !clusterDb[node].externalConnections, - !graph.parent(node), - graph.node(node), - graph.children("D"), - " Depth ", - depth - ); - if (!clusterDb[node]) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Not a cluster", node, depth); - } else if (!clusterDb[node].externalConnections && // !graph.parent(node) && - graph.children(node) && graph.children(node).length > 0) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn( - "Cluster without external connections, without a parent and with children", - node, - depth - ); - const graphSettings = graph.graph(); - let dir = graphSettings.rankdir === "TB" ? "LR" : "TB"; - if (clusterDb[node] && clusterDb[node].clusterData && clusterDb[node].clusterData.dir) { - dir = clusterDb[node].clusterData.dir; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Fixing dir", clusterDb[node].clusterData.dir, dir); - } - const clusterGraph = new dagre_d3_es_src_graphlib_index_js__WEBPACK_IMPORTED_MODULE_2__/* .Graph */ .T({ - multigraph: true, - compound: true - }).setGraph({ - rankdir: dir, - // Todo: set proper spacing - nodesep: 50, - ranksep: 50, - marginx: 8, - marginy: 8 - }).setDefaultEdgeLabel(function() { - return {}; - }); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Old graph before copy", dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .M(graph)); - copy(node, graph, clusterGraph, node); - graph.setNode(node, { - clusterNode: true, - id: node, - clusterData: clusterDb[node].clusterData, - labelText: clusterDb[node].labelText, - graph: clusterGraph - }); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("New graph after copy node: (", node, ")", dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .M(clusterGraph)); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Old graph after copy", dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .M(graph)); - } else { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn( - "Cluster ** ", - node, - " **not meeting the criteria !externalConnections:", - !clusterDb[node].externalConnections, - " no parent: ", - !graph.parent(node), - " children ", - graph.children(node) && graph.children(node).length > 0, - graph.children("D"), - depth - ); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug(clusterDb); - } - } - nodes = graph.nodes(); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("New list of nodes", nodes); - for (const node of nodes) { - const data = graph.node(node); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn(" Now next level", node, data); - if (data.clusterNode) { - extractor(data.graph, depth + 1); - } - } -}; -const sorter = (graph, nodes) => { - if (nodes.length === 0) { - return []; - } - let result = Object.assign(nodes); - nodes.forEach((node) => { - const children = graph.children(node); - const sorted = sorter(graph, children); - result = [...result, ...sorted]; - }); - return result; -}; -const sortNodesByHierarchy = (graph) => sorter(graph, graph.children()); -const rect = (parent, node) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Creating subgraph rect for ", node.id, node); - const siteConfig = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.c)(); - const shapeSvg = parent.insert("g").attr("class", "cluster" + (node.class ? " " + node.class : "")).attr("id", node.id); - const rect2 = shapeSvg.insert("rect", ":first-child"); - const useHtmlLabels = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.m)(siteConfig.flowchart.htmlLabels); - const label = shapeSvg.insert("g").attr("class", "cluster-label"); - const text = node.labelType === "markdown" ? (0,_createText_2e5e7dd3_js__WEBPACK_IMPORTED_MODULE_5__.a)(label, node.labelText, { style: node.labelStyle, useHtmlLabels }) : label.node().appendChild((0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.c)(node.labelText, node.labelStyle, void 0, true)); - let bbox = text.getBBox(); - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.m)(siteConfig.flowchart.htmlLabels)) { - const div = text.children[0]; - const dv = (0,d3__WEBPACK_IMPORTED_MODULE_3__/* .select */ .Ltv)(text); - bbox = div.getBoundingClientRect(); - dv.attr("width", bbox.width); - dv.attr("height", bbox.height); - } - const padding = 0 * node.padding; - const halfPadding = padding / 2; - const width = node.width <= bbox.width + padding ? bbox.width + padding : node.width; - if (node.width <= bbox.width + padding) { - node.diff = (bbox.width - node.width) / 2 - node.padding / 2; - } else { - node.diff = -node.padding / 2; - } - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("Data ", node, JSON.stringify(node)); - rect2.attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("x", node.x - width / 2).attr("y", node.y - node.height / 2 - halfPadding).attr("width", width).attr("height", node.height + padding); - const { subGraphTitleTopMargin } = (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.g)(siteConfig); - if (useHtmlLabels) { - label.attr( - "transform", - // This puts the label on top of the box instead of inside it - `translate(${node.x - bbox.width / 2}, ${node.y - node.height / 2 + subGraphTitleTopMargin})` - ); - } else { - label.attr( - "transform", - // This puts the label on top of the box instead of inside it - `translate(${node.x}, ${node.y - node.height / 2 + subGraphTitleTopMargin})` - ); - } - const rectBox = rect2.node().getBBox(); - node.width = rectBox.width; - node.height = rectBox.height; - node.intersect = function(point) { - return (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.i)(node, point); - }; - return shapeSvg; -}; -const noteGroup = (parent, node) => { - const shapeSvg = parent.insert("g").attr("class", "note-cluster").attr("id", node.id); - const rect2 = shapeSvg.insert("rect", ":first-child"); - const padding = 0 * node.padding; - const halfPadding = padding / 2; - rect2.attr("rx", node.rx).attr("ry", node.ry).attr("x", node.x - node.width / 2 - halfPadding).attr("y", node.y - node.height / 2 - halfPadding).attr("width", node.width + padding).attr("height", node.height + padding).attr("fill", "none"); - const rectBox = rect2.node().getBBox(); - node.width = rectBox.width; - node.height = rectBox.height; - node.intersect = function(point) { - return (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.i)(node, point); - }; - return shapeSvg; -}; -const roundedWithTitle = (parent, node) => { - const siteConfig = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.c)(); - const shapeSvg = parent.insert("g").attr("class", node.classes).attr("id", node.id); - const rect2 = shapeSvg.insert("rect", ":first-child"); - const label = shapeSvg.insert("g").attr("class", "cluster-label"); - const innerRect = shapeSvg.append("rect"); - const text = label.node().appendChild((0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.c)(node.labelText, node.labelStyle, void 0, true)); - let bbox = text.getBBox(); - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.m)(siteConfig.flowchart.htmlLabels)) { - const div = text.children[0]; - const dv = (0,d3__WEBPACK_IMPORTED_MODULE_3__/* .select */ .Ltv)(text); - bbox = div.getBoundingClientRect(); - dv.attr("width", bbox.width); - dv.attr("height", bbox.height); - } - bbox = text.getBBox(); - const padding = 0 * node.padding; - const halfPadding = padding / 2; - const width = node.width <= bbox.width + node.padding ? bbox.width + node.padding : node.width; - if (node.width <= bbox.width + node.padding) { - node.diff = (bbox.width + node.padding * 0 - node.width) / 2; - } else { - node.diff = -node.padding / 2; - } - rect2.attr("class", "outer").attr("x", node.x - width / 2 - halfPadding).attr("y", node.y - node.height / 2 - halfPadding).attr("width", width + padding).attr("height", node.height + padding); - innerRect.attr("class", "inner").attr("x", node.x - width / 2 - halfPadding).attr("y", node.y - node.height / 2 - halfPadding + bbox.height - 1).attr("width", width + padding).attr("height", node.height + padding - bbox.height - 3); - const { subGraphTitleTopMargin } = (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.g)(siteConfig); - label.attr( - "transform", - `translate(${node.x - bbox.width / 2}, ${node.y - node.height / 2 - node.padding / 3 + ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.m)(siteConfig.flowchart.htmlLabels) ? 5 : 3) + subGraphTitleTopMargin})` - ); - const rectBox = rect2.node().getBBox(); - node.height = rectBox.height; - node.intersect = function(point) { - return (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.i)(node, point); - }; - return shapeSvg; -}; -const divider = (parent, node) => { - const shapeSvg = parent.insert("g").attr("class", node.classes).attr("id", node.id); - const rect2 = shapeSvg.insert("rect", ":first-child"); - const padding = 0 * node.padding; - const halfPadding = padding / 2; - rect2.attr("class", "divider").attr("x", node.x - node.width / 2 - halfPadding).attr("y", node.y - node.height / 2).attr("width", node.width + padding).attr("height", node.height + padding); - const rectBox = rect2.node().getBBox(); - node.width = rectBox.width; - node.height = rectBox.height; - node.diff = -node.padding / 2; - node.intersect = function(point) { - return (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.i)(node, point); - }; - return shapeSvg; -}; -const shapes = { rect, roundedWithTitle, noteGroup, divider }; -let clusterElems = {}; -const insertCluster = (elem, node) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("Inserting cluster"); - const shape = node.shape || "rect"; - clusterElems[node.id] = shapes[shape](elem, node); -}; -const clear = () => { - clusterElems = {}; -}; -const recursiveRender = async (_elem, graph, diagramType, id, parentCluster, siteConfig) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Graph in recursive render: XXX", dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .M(graph), parentCluster); - const dir = graph.graph().rankdir; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("Dir in recursive render - dir:", dir); - const elem = _elem.insert("g").attr("class", "root"); - if (!graph.nodes()) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("No nodes found for", graph); - } else { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Recursive render XXX", graph.nodes()); - } - if (graph.edges().length > 0) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("Recursive edges", graph.edge(graph.edges()[0])); - } - const clusters = elem.insert("g").attr("class", "clusters"); - const edgePaths = elem.insert("g").attr("class", "edgePaths"); - const edgeLabels = elem.insert("g").attr("class", "edgeLabels"); - const nodes = elem.insert("g").attr("class", "nodes"); - await Promise.all( - graph.nodes().map(async function(v) { - const node = graph.node(v); - if (parentCluster !== void 0) { - const data = JSON.parse(JSON.stringify(parentCluster.clusterData)); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Setting data for cluster XXX (", v, ") ", data, parentCluster); - graph.setNode(parentCluster.id, data); - if (!graph.parent(v)) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("Setting parent", v, parentCluster.id); - graph.setParent(v, parentCluster.id, data); - } - } - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("(Insert) Node XXX" + v + ": " + JSON.stringify(graph.node(v))); - if (node && node.clusterNode) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Cluster identified", v, node.width, graph.node(v)); - const o = await recursiveRender( - nodes, - node.graph, - diagramType, - id, - graph.node(v), - siteConfig - ); - const newEl = o.elem; - (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.u)(node, newEl); - node.diff = o.diff || 0; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Node bounds (abc123)", v, node, node.width, node.x, node.y); - (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.s)(newEl, node); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Recursive render complete ", newEl, node); - } else { - if (graph.children(v).length > 0) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Cluster - the non recursive path XXX", v, node.id, node, graph); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info(findNonClusterChild(node.id, graph)); - clusterDb[node.id] = { id: findNonClusterChild(node.id, graph), node }; - } else { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Node - the non recursive path", v, node.id, node); - await (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.e)(nodes, graph.node(v), dir); - } - } - }) - ); - graph.edges().forEach(function(e) { - const edge = graph.edge(e.v, e.w, e.name); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(e)); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Edge " + e.v + " -> " + e.w + ": ", e, " ", JSON.stringify(graph.edge(e))); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Fix", clusterDb, "ids:", e.v, e.w, "Translating: ", clusterDb[e.v], clusterDb[e.w]); - (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.f)(edgeLabels, edge); - }); - graph.edges().forEach(function(e) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(e)); - }); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("#############################################"); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("### Layout ###"); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("#############################################"); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info(graph); - (0,dagre_d3_es_src_dagre_index_js__WEBPACK_IMPORTED_MODULE_0__/* .layout */ .Zp)(graph); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Graph after layout:", dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .M(graph)); - let diff = 0; - const { subGraphTitleTotalMargin } = (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.g)(siteConfig); - sortNodesByHierarchy(graph).forEach(function(v) { - const node = graph.node(v); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Position " + v + ": " + JSON.stringify(graph.node(v))); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info( - "Position " + v + ": (" + node.x, - "," + node.y, - ") width: ", - node.width, - " height: ", - node.height - ); - if (node && node.clusterNode) { - node.y += subGraphTitleTotalMargin; - (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.p)(node); - } else { - if (graph.children(v).length > 0) { - node.height += subGraphTitleTotalMargin; - insertCluster(clusters, node); - clusterDb[node.id].node = node; - } else { - node.y += subGraphTitleTotalMargin / 2; - (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.p)(node); - } - } - }); - graph.edges().forEach(function(e) { - const edge = graph.edge(e); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(edge), edge); - edge.points.forEach((point) => point.y += subGraphTitleTotalMargin / 2); - const paths = (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.h)(edgePaths, e, edge, clusterDb, diagramType, graph, id); - (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.j)(edge, paths); - }); - graph.nodes().forEach(function(v) { - const n = graph.node(v); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info(v, n.type, n.diff); - if (n.type === "group") { - diff = n.diff; - } - }); - return { elem, diff }; -}; -const render = async (elem, graph, markers, diagramType, id) => { - (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.a)(elem, markers, diagramType, id); - (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.b)(); - (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.d)(); - clear(); - clear$1(); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Graph at first:", JSON.stringify(dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .M(graph))); - adjustClustersAndEdges(graph); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Graph after:", JSON.stringify(dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .M(graph))); - const siteConfig = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.c)(); - await recursiveRender(elem, graph, diagramType, id, void 0, siteConfig); -}; - - - -/***/ }), - -/***/ 35900: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ a: () => (/* binding */ flowStyles), -/* harmony export */ f: () => (/* binding */ flowRendererV2) -/* harmony export */ }); -/* harmony import */ var dagre_d3_es_src_graphlib_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(697); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(26312); -/* harmony import */ var _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(86079); -/* harmony import */ var _index_3862675e_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(8995); -/* harmony import */ var dagre_d3_es_src_dagre_js_label_add_html_label_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(10646); -/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(75937); -/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(25582); - - - - - - -const conf = {}; -const setConf = function(cnf) { - const keys = Object.keys(cnf); - for (const key of keys) { - conf[key] = cnf[key]; - } -}; -const addVertices = async function(vert, g, svgId, root, doc, diagObj) { - const svg = root.select(`[id="${svgId}"]`); - const keys = Object.keys(vert); - for (const id of keys) { - const vertex = vert[id]; - let classStr = "default"; - if (vertex.classes.length > 0) { - classStr = vertex.classes.join(" "); - } - classStr = classStr + " flowchart-label"; - const styles = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_2__.k)(vertex.styles); - let vertexText = vertex.text !== void 0 ? vertex.text : vertex.id; - let vertexNode; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_2__.l.info("vertex", vertex, vertex.labelType); - if (vertex.labelType === "markdown") { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_2__.l.info("vertex", vertex, vertex.labelType); - } else { - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_2__.m)((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_2__.c)().flowchart.htmlLabels)) { - const node = { - label: vertexText - }; - vertexNode = (0,dagre_d3_es_src_dagre_js_label_add_html_label_js__WEBPACK_IMPORTED_MODULE_3__/* .addHtmlLabel */ .H)(svg, node).node(); - vertexNode.parentNode.removeChild(vertexNode); - } else { - const svgLabel = doc.createElementNS("http://www.w3.org/2000/svg", "text"); - svgLabel.setAttribute("style", styles.labelStyle.replace("color:", "fill:")); - const rows = vertexText.split(_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_2__.e.lineBreakRegex); - for (const row of rows) { - const tspan = doc.createElementNS("http://www.w3.org/2000/svg", "tspan"); - tspan.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"); - tspan.setAttribute("dy", "1em"); - tspan.setAttribute("x", "1"); - tspan.textContent = row; - svgLabel.appendChild(tspan); - } - vertexNode = svgLabel; - } - } - let radius = 0; - let _shape = ""; - switch (vertex.type) { - case "round": - radius = 5; - _shape = "rect"; - break; - case "square": - _shape = "rect"; - break; - case "diamond": - _shape = "question"; - break; - case "hexagon": - _shape = "hexagon"; - break; - case "odd": - _shape = "rect_left_inv_arrow"; - break; - case "lean_right": - _shape = "lean_right"; - break; - case "lean_left": - _shape = "lean_left"; - break; - case "trapezoid": - _shape = "trapezoid"; - break; - case "inv_trapezoid": - _shape = "inv_trapezoid"; - break; - case "odd_right": - _shape = "rect_left_inv_arrow"; - break; - case "circle": - _shape = "circle"; - break; - case "ellipse": - _shape = "ellipse"; - break; - case "stadium": - _shape = "stadium"; - break; - case "subroutine": - _shape = "subroutine"; - break; - case "cylinder": - _shape = "cylinder"; - break; - case "group": - _shape = "rect"; - break; - case "doublecircle": - _shape = "doublecircle"; - break; - default: - _shape = "rect"; - } - const labelText = await (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_2__.r)(vertexText, (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_2__.c)()); - g.setNode(vertex.id, { - labelStyle: styles.labelStyle, - shape: _shape, - labelText, - labelType: vertex.labelType, - rx: radius, - ry: radius, - class: classStr, - style: styles.style, - id: vertex.id, - link: vertex.link, - linkTarget: vertex.linkTarget, - tooltip: diagObj.db.getTooltip(vertex.id) || "", - domId: diagObj.db.lookUpDomId(vertex.id), - haveCallback: vertex.haveCallback, - width: vertex.type === "group" ? 500 : void 0, - dir: vertex.dir, - type: vertex.type, - props: vertex.props, - padding: (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_2__.c)().flowchart.padding - }); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_2__.l.info("setNode", { - labelStyle: styles.labelStyle, - labelType: vertex.labelType, - shape: _shape, - labelText, - rx: radius, - ry: radius, - class: classStr, - style: styles.style, - id: vertex.id, - domId: diagObj.db.lookUpDomId(vertex.id), - width: vertex.type === "group" ? 500 : void 0, - type: vertex.type, - dir: vertex.dir, - props: vertex.props, - padding: (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_2__.c)().flowchart.padding - }); - } -}; -const addEdges = async function(edges, g, diagObj) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_2__.l.info("abc78 edges = ", edges); - let cnt = 0; - let linkIdCnt = {}; - let defaultStyle; - let defaultLabelStyle; - if (edges.defaultStyle !== void 0) { - const defaultStyles = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_2__.k)(edges.defaultStyle); - defaultStyle = defaultStyles.style; - defaultLabelStyle = defaultStyles.labelStyle; - } - for (const edge of edges) { - cnt++; - const linkIdBase = "L-" + edge.start + "-" + edge.end; - if (linkIdCnt[linkIdBase] === void 0) { - linkIdCnt[linkIdBase] = 0; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_2__.l.info("abc78 new entry", linkIdBase, linkIdCnt[linkIdBase]); - } else { - linkIdCnt[linkIdBase]++; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_2__.l.info("abc78 new entry", linkIdBase, linkIdCnt[linkIdBase]); - } - let linkId = linkIdBase + "-" + linkIdCnt[linkIdBase]; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_2__.l.info("abc78 new link id to be used is", linkIdBase, linkId, linkIdCnt[linkIdBase]); - const linkNameStart = "LS-" + edge.start; - const linkNameEnd = "LE-" + edge.end; - const edgeData = { style: "", labelStyle: "" }; - edgeData.minlen = edge.length || 1; - if (edge.type === "arrow_open") { - edgeData.arrowhead = "none"; - } else { - edgeData.arrowhead = "normal"; - } - edgeData.arrowTypeStart = "arrow_open"; - edgeData.arrowTypeEnd = "arrow_open"; - switch (edge.type) { - case "double_arrow_cross": - edgeData.arrowTypeStart = "arrow_cross"; - case "arrow_cross": - edgeData.arrowTypeEnd = "arrow_cross"; - break; - case "double_arrow_point": - edgeData.arrowTypeStart = "arrow_point"; - case "arrow_point": - edgeData.arrowTypeEnd = "arrow_point"; - break; - case "double_arrow_circle": - edgeData.arrowTypeStart = "arrow_circle"; - case "arrow_circle": - edgeData.arrowTypeEnd = "arrow_circle"; - break; - } - let style = ""; - let labelStyle = ""; - switch (edge.stroke) { - case "normal": - style = "fill:none;"; - if (defaultStyle !== void 0) { - style = defaultStyle; - } - if (defaultLabelStyle !== void 0) { - labelStyle = defaultLabelStyle; - } - edgeData.thickness = "normal"; - edgeData.pattern = "solid"; - break; - case "dotted": - edgeData.thickness = "normal"; - edgeData.pattern = "dotted"; - edgeData.style = "fill:none;stroke-width:2px;stroke-dasharray:3;"; - break; - case "thick": - edgeData.thickness = "thick"; - edgeData.pattern = "solid"; - edgeData.style = "stroke-width: 3.5px;fill:none;"; - break; - case "invisible": - edgeData.thickness = "invisible"; - edgeData.pattern = "solid"; - edgeData.style = "stroke-width: 0;fill:none;"; - break; - } - if (edge.style !== void 0) { - const styles = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_2__.k)(edge.style); - style = styles.style; - labelStyle = styles.labelStyle; - } - edgeData.style = edgeData.style += style; - edgeData.labelStyle = edgeData.labelStyle += labelStyle; - if (edge.interpolate !== void 0) { - edgeData.curve = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_2__.n)(edge.interpolate, d3__WEBPACK_IMPORTED_MODULE_1__/* .curveLinear */ .lUB); - } else if (edges.defaultInterpolate !== void 0) { - edgeData.curve = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_2__.n)(edges.defaultInterpolate, d3__WEBPACK_IMPORTED_MODULE_1__/* .curveLinear */ .lUB); - } else { - edgeData.curve = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_2__.n)(conf.curve, d3__WEBPACK_IMPORTED_MODULE_1__/* .curveLinear */ .lUB); - } - if (edge.text === void 0) { - if (edge.style !== void 0) { - edgeData.arrowheadStyle = "fill: #333"; - } - } else { - edgeData.arrowheadStyle = "fill: #333"; - edgeData.labelpos = "c"; - } - edgeData.labelType = edge.labelType; - edgeData.label = await (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_2__.r)(edge.text.replace(_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_2__.e.lineBreakRegex, "\n"), (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_2__.c)()); - if (edge.style === void 0) { - edgeData.style = edgeData.style || "stroke: #333; stroke-width: 1.5px;fill:none;"; - } - edgeData.labelStyle = edgeData.labelStyle.replace("color:", "fill:"); - edgeData.id = linkId; - edgeData.classes = "flowchart-link " + linkNameStart + " " + linkNameEnd; - g.setEdge(edge.start, edge.end, edgeData, cnt); - } -}; -const getClasses = function(text, diagObj) { - return diagObj.db.getClasses(); -}; -const draw = async function(text, id, _version, diagObj) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_2__.l.info("Drawing flowchart"); - let dir = diagObj.db.getDirection(); - if (dir === void 0) { - dir = "TD"; - } - const { securityLevel, flowchart: conf2 } = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_2__.c)(); - const nodeSpacing = conf2.nodeSpacing || 50; - const rankSpacing = conf2.rankSpacing || 50; - let sandboxElement; - if (securityLevel === "sandbox") { - sandboxElement = (0,d3__WEBPACK_IMPORTED_MODULE_1__/* .select */ .Ltv)("#i" + id); - } - const root = securityLevel === "sandbox" ? (0,d3__WEBPACK_IMPORTED_MODULE_1__/* .select */ .Ltv)(sandboxElement.nodes()[0].contentDocument.body) : (0,d3__WEBPACK_IMPORTED_MODULE_1__/* .select */ .Ltv)("body"); - const doc = securityLevel === "sandbox" ? sandboxElement.nodes()[0].contentDocument : document; - const g = new dagre_d3_es_src_graphlib_index_js__WEBPACK_IMPORTED_MODULE_0__/* .Graph */ .T({ - multigraph: true, - compound: true - }).setGraph({ - rankdir: dir, - nodesep: nodeSpacing, - ranksep: rankSpacing, - marginx: 0, - marginy: 0 - }).setDefaultEdgeLabel(function() { - return {}; - }); - let subG; - const subGraphs = diagObj.db.getSubGraphs(); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_2__.l.info("Subgraphs - ", subGraphs); - for (let i2 = subGraphs.length - 1; i2 >= 0; i2--) { - subG = subGraphs[i2]; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_2__.l.info("Subgraph - ", subG); - diagObj.db.addVertex( - subG.id, - { text: subG.title, type: subG.labelType }, - "group", - void 0, - subG.classes, - subG.dir - ); - } - const vert = diagObj.db.getVertices(); - const edges = diagObj.db.getEdges(); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_2__.l.info("Edges", edges); - let i = 0; - for (i = subGraphs.length - 1; i >= 0; i--) { - subG = subGraphs[i]; - (0,d3__WEBPACK_IMPORTED_MODULE_1__/* .selectAll */ .Ubm)("cluster").append("text"); - for (let j = 0; j < subG.nodes.length; j++) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_2__.l.info("Setting up subgraphs", subG.nodes[j], subG.id); - g.setParent(subG.nodes[j], subG.id); - } - } - await addVertices(vert, g, id, root, doc, diagObj); - await addEdges(edges, g); - const svg = root.select(`[id="${id}"]`); - const element = root.select("#" + id + " g"); - await (0,_index_3862675e_js__WEBPACK_IMPORTED_MODULE_4__.r)(element, g, ["point", "circle", "cross"], "flowchart", id); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_2__.u.insertTitle(svg, "flowchartTitleText", conf2.titleTopMargin, diagObj.db.getDiagramTitle()); - (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_2__.o)(g, svg, conf2.diagramPadding, conf2.useMaxWidth); - diagObj.db.indexNodes("subGraph" + i); - if (!conf2.htmlLabels) { - const labels = doc.querySelectorAll('[id="' + id + '"] .edgeLabel .label'); - for (const label of labels) { - const dim = label.getBBox(); - const rect = doc.createElementNS("http://www.w3.org/2000/svg", "rect"); - rect.setAttribute("rx", 0); - rect.setAttribute("ry", 0); - rect.setAttribute("width", dim.width); - rect.setAttribute("height", dim.height); - label.insertBefore(rect, label.firstChild); - } - } - const keys = Object.keys(vert); - keys.forEach(function(key) { - const vertex = vert[key]; - if (vertex.link) { - const node = (0,d3__WEBPACK_IMPORTED_MODULE_1__/* .select */ .Ltv)("#" + id + ' [id="' + key + '"]'); - if (node) { - const link = doc.createElementNS("http://www.w3.org/2000/svg", "a"); - link.setAttributeNS("http://www.w3.org/2000/svg", "class", vertex.classes.join(" ")); - link.setAttributeNS("http://www.w3.org/2000/svg", "href", vertex.link); - link.setAttributeNS("http://www.w3.org/2000/svg", "rel", "noopener"); - if (securityLevel === "sandbox") { - link.setAttributeNS("http://www.w3.org/2000/svg", "target", "_top"); - } else if (vertex.linkTarget) { - link.setAttributeNS("http://www.w3.org/2000/svg", "target", vertex.linkTarget); - } - const linkNode = node.insert(function() { - return link; - }, ":first-child"); - const shape = node.select(".label-container"); - if (shape) { - linkNode.append(function() { - return shape.node(); - }); - } - const label = node.select(".label"); - if (label) { - linkNode.append(function() { - return label.node(); - }); - } - } - } - }); -}; -const flowRendererV2 = { - setConf, - addVertices, - addEdges, - getClasses, - draw -}; -const fade = (color, opacity) => { - const channel = khroma__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A; - const r = channel(color, "r"); - const g = channel(color, "g"); - const b = channel(color, "b"); - return khroma__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .A(r, g, b, opacity); -}; -const getStyles = (options) => `.label { - font-family: ${options.fontFamily}; - color: ${options.nodeTextColor || options.textColor}; - } - .cluster-label text { - fill: ${options.titleColor}; - } - .cluster-label span,p { - color: ${options.titleColor}; - } - - .label text,span,p { - fill: ${options.nodeTextColor || options.textColor}; - color: ${options.nodeTextColor || options.textColor}; - } - - .node rect, - .node circle, - .node ellipse, - .node polygon, - .node path { - fill: ${options.mainBkg}; - stroke: ${options.nodeBorder}; - stroke-width: 1px; - } - .flowchart-label text { - text-anchor: middle; - } - // .flowchart-label .text-outer-tspan { - // text-anchor: middle; - // } - // .flowchart-label .text-inner-tspan { - // text-anchor: start; - // } - - .node .katex path { - fill: #000; - stroke: #000; - stroke-width: 1px; - } - - .node .label { - text-align: center; - } - .node.clickable { - cursor: pointer; - } - - .arrowheadPath { - fill: ${options.arrowheadColor}; - } - - .edgePath .path { - stroke: ${options.lineColor}; - stroke-width: 2.0px; - } - - .flowchart-link { - stroke: ${options.lineColor}; - fill: none; - } - - .edgeLabel { - background-color: ${options.edgeLabelBackground}; - rect { - opacity: 0.5; - background-color: ${options.edgeLabelBackground}; - fill: ${options.edgeLabelBackground}; - } - text-align: center; - } - - /* For html labels only */ - .labelBkg { - background-color: ${fade(options.edgeLabelBackground, 0.5)}; - // background-color: - } - - .cluster rect { - fill: ${options.clusterBkg}; - stroke: ${options.clusterBorder}; - stroke-width: 1px; - } - - .cluster text { - fill: ${options.titleColor}; - } - - .cluster span,p { - color: ${options.titleColor}; - } - /* .cluster div { - color: ${options.titleColor}; - } */ - - div.mermaidTooltip { - position: absolute; - text-align: center; - max-width: 200px; - padding: 2px; - font-family: ${options.fontFamily}; - font-size: 12px; - background: ${options.tertiaryColor}; - border: 1px solid ${options.border2}; - border-radius: 2px; - pointer-events: none; - z-index: 100; - } - - .flowchartTitleText { - text-anchor: middle; - font-size: 18px; - fill: ${options.textColor}; - } -`; -const flowStyles = getStyles; - - - -/***/ }) - -}; -; \ No newline at end of file diff --git a/assets/js/3184af97.1e72657a.js b/assets/js/3184af97.1e72657a.js deleted file mode 100644 index 74bb7418fada..000000000000 --- a/assets/js/3184af97.1e72657a.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5362],{76526:(o,e,n)=>{n.r(e),n.d(e,{assets:()=>l,contentTitle:()=>s,default:()=>h,frontMatter:()=>a,metadata:()=>c,toc:()=>u});var t=n(74848),i=n(28453),r=n(67141);const a={id:"maintain-guides-how-to-vote-councillor",title:"Voting for Councillors",sidebar_label:"Voting for Councillors",description:"Steps on how to vote for councillors.",keywords:["council","vote","councillors"],slug:"../maintain-guides-how-to-vote-councillor"},s=void 0,c={id:"maintain/archive/maintain-guides-how-to-vote-councillor",title:"Voting for Councillors",description:"Steps on how to vote for councillors.",source:"@site/../docs/maintain/archive/maintain-guides-how-to-vote-councillor.md",sourceDirName:"maintain/archive",slug:"/maintain/maintain-guides-how-to-vote-councillor",permalink:"/docs/maintain/maintain-guides-how-to-vote-councillor",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/maintain/archive/maintain-guides-how-to-vote-councillor.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1729847256e3,frontMatter:{id:"maintain-guides-how-to-vote-councillor",title:"Voting for Councillors",sidebar_label:"Voting for Councillors",description:"Steps on how to vote for councillors.",keywords:["council","vote","councillors"],slug:"../maintain-guides-how-to-vote-councillor"},sidebar:"docs",previous:{title:"Join the Council",permalink:"/docs/maintain/maintain-guides-how-to-join-council"},next:{title:"Home",permalink:"/docs/kusama-getting-started"}},l={},u=[{value:"Voting for Councillors",id:"voting-for-councillors",level:2},{value:"Removing your Vote",id:"removing-your-vote",level:2}];function d(o){const e={a:"a",admonition:"admonition",em:"em",h2:"h2",img:"img",p:"p",strong:"strong",...(0,i.R)(),...o.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.A,{message:"The content on this page is archived. For up-to-date information about governance, see the\n[Polkadot OpenGov page](../learn-polkadot-opengov)."}),"\n",(0,t.jsxs)(e.p,{children:["The council is an elected body of on-chain accounts that are intended to represent the passive\nstakeholders of Polkadot and/or Kusama. The council has two major tasks in governance: proposing\nreferenda and vetoing dangerous or malicious referenda. For more information on the council, see the\n",(0,t.jsx)(e.a,{href:"/docs/learn/learn-governance#council",children:"governance page"}),". This guide will walk you through\nvoting for councillors in the elections."]}),"\n",(0,t.jsx)(e.h2,{id:"voting-for-councillors",children:"Voting for Councillors"}),"\n",(0,t.jsxs)(e.p,{children:["Voting for councillors requires you to reserve 20.064 DOT (0.067 KSM on Kusama) as a base amount and\nan amount of 0.032 DOT (0.0001 KSM on Kusama) per vote. You can then bond whatever amount you wish\nto put behind your vote. See the ",(0,t.jsx)(e.a,{href:"/docs/maintain/maintain-guides-democracy",children:"democracy guide"})," for more\ninformation."]}),"\n",(0,t.jsx)(e.admonition,{type:"warning",children:(0,t.jsxs)(e.p,{children:["If your balance is vesting, you cannot use unvested tokens for this lock. You will have to wait\nuntil you have at least that many ",(0,t.jsx)(e.strong,{children:"free"})," tokens to vote."]})}),"\n",(0,t.jsx)(e.p,{children:"Like the validator elections, you can approve up to 16 different councillors and your vote will be\nequalized among the chosen group. Unlike validator elections, there is no unbonding period for your\nreserved tokens. Once you remove your vote, your tokens will be liquid again."}),"\n",(0,t.jsx)(e.admonition,{type:"warning",children:(0,t.jsxs)(e.p,{children:["It is your responsibility not to put your entire balance into the reserved value when you make a\nvote for councillors. It's best to keep ",(0,t.jsx)(e.em,{children:"at least"})," enough DOT/KSM to pay for transaction fees."]})}),"\n",(0,t.jsxs)(e.p,{children:["Go to the ",(0,t.jsx)(e.a,{href:"https://polkadot.js.org/apps",children:"Polkadot-JS Apps Dashboard"}),' and click on the "Council" tab.\nOn the right side of the window there are two blue buttons, click on the one that says "Vote."']}),"\n",(0,t.jsx)(e.p,{children:'Since the council uses approval voting, when you vote you signal which of the candidates you approve\nof and your voted tokens will be equalized among the selected candidates. Select up to 16 council\ncandidates by moving the slider to "Aye" for each one that you want to be elected. When you\'ve made\nthe proper configuration submit your transaction.'}),"\n",(0,t.jsx)(e.p,{children:"You should see your vote appear in the interface immediately after your transaction is included."}),"\n",(0,t.jsx)(e.h2,{id:"removing-your-vote",children:"Removing your Vote"}),"\n",(0,t.jsx)(e.p,{children:"In order to get your reserved tokens back, you will need to remove your vote. Only remove your vote\nwhen you're done participating in elections and you no longer want your reserved tokens to count for\nthe councillors that you approve."}),"\n",(0,t.jsxs)(e.p,{children:['Go to the "Governance" > "Council" tab on the\n',(0,t.jsx)(e.a,{href:"https://polkadot.js.org/apps",children:"Polkadot-JS Apps Dashboard"}),"."]}),"\n",(0,t.jsx)(e.p,{children:'Under the "Council overview" tab, click on "Vote".'}),"\n",(0,t.jsx)(e.p,{children:(0,t.jsx)(e.img,{alt:"polkadotjs_removeVoter",src:n(15496).A+"",width:"1878",height:"361"})}),"\n",(0,t.jsx)(e.p,{children:'Issue the "Unvote all" option.'}),"\n",(0,t.jsx)(e.p,{children:"When the transaction is included in a block you should have your reserved tokens made liquid again\nand your vote will no longer be counting for any councillors in the elections starting in the next\nterm."})]})}function h(o={}){const{wrapper:e}={...(0,i.R)(),...o.components};return e?(0,t.jsx)(e,{...o,children:(0,t.jsx)(d,{...o})}):d(o)}},67141:(o,e,n)=>{n.d(e,{A:()=>r});var t=n(96540),i=n(74848);const r=function(o){var e,n=o.message,r=(0,t.useState)(!0),a=r[0],s=r[1];return(0,i.jsx)(i.Fragment,{children:a&&(0,i.jsxs)("div",{className:"message-box",children:[(0,i.jsx)("button",{className:"close-button",onClick:function(){s(!1)},children:"\u2716 "}),(0,i.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(e=n,e.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},15496:(o,e,n)=>{n.d(e,{A:()=>t});const t=n.p+"assets/images/polkadotjs_removeVoter-b66eb203df51ecdb1d926990120aa76b.png"},28453:(o,e,n)=>{n.d(e,{R:()=>a,x:()=>s});var t=n(96540);const i={},r=t.createContext(i);function a(o){const e=t.useContext(r);return t.useMemo((function(){return"function"==typeof o?o(e):{...e,...o}}),[e,o])}function s(o){let e;return e=o.disableParentContext?"function"==typeof o.components?o.components(i):o.components||i:a(o.components),t.createElement(r.Provider,{value:e},o.children)}}}]); \ No newline at end of file diff --git a/assets/js/3184af97.c498191a.js b/assets/js/3184af97.c498191a.js new file mode 100644 index 000000000000..c5d3baa7505f --- /dev/null +++ b/assets/js/3184af97.c498191a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5362],{93313:(o,e,n)=>{n.r(e),n.d(e,{assets:()=>l,contentTitle:()=>c,default:()=>h,frontMatter:()=>s,metadata:()=>t,toc:()=>u});const t=JSON.parse('{"id":"maintain/archive/maintain-guides-how-to-vote-councillor","title":"Voting for Councillors","description":"Steps on how to vote for councillors.","source":"@site/../docs/maintain/archive/maintain-guides-how-to-vote-councillor.md","sourceDirName":"maintain/archive","slug":"/maintain/maintain-guides-how-to-vote-councillor","permalink":"/docs/maintain/maintain-guides-how-to-vote-councillor","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/maintain/archive/maintain-guides-how-to-vote-councillor.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1729847256000,"frontMatter":{"id":"maintain-guides-how-to-vote-councillor","title":"Voting for Councillors","sidebar_label":"Voting for Councillors","description":"Steps on how to vote for councillors.","keywords":["council","vote","councillors"],"slug":"../maintain-guides-how-to-vote-councillor"},"sidebar":"docs","previous":{"title":"Join the Council","permalink":"/docs/maintain/maintain-guides-how-to-join-council"},"next":{"title":"Home","permalink":"/docs/kusama-getting-started"}}');var i=n(74848),r=n(28453),a=n(67141);const s={id:"maintain-guides-how-to-vote-councillor",title:"Voting for Councillors",sidebar_label:"Voting for Councillors",description:"Steps on how to vote for councillors.",keywords:["council","vote","councillors"],slug:"../maintain-guides-how-to-vote-councillor"},c=void 0,l={},u=[{value:"Voting for Councillors",id:"voting-for-councillors",level:2},{value:"Removing your Vote",id:"removing-your-vote",level:2}];function d(o){const e={a:"a",admonition:"admonition",em:"em",h2:"h2",img:"img",p:"p",strong:"strong",...(0,r.R)(),...o.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(a.A,{message:"The content on this page is archived. For up-to-date information about governance, see the\n[Polkadot OpenGov page](../learn-polkadot-opengov)."}),"\n",(0,i.jsxs)(e.p,{children:["The council is an elected body of on-chain accounts that are intended to represent the passive\nstakeholders of Polkadot and/or Kusama. The council has two major tasks in governance: proposing\nreferenda and vetoing dangerous or malicious referenda. For more information on the council, see the\n",(0,i.jsx)(e.a,{href:"/docs/learn/learn-governance#council",children:"governance page"}),". This guide will walk you through\nvoting for councillors in the elections."]}),"\n",(0,i.jsx)(e.h2,{id:"voting-for-councillors",children:"Voting for Councillors"}),"\n",(0,i.jsxs)(e.p,{children:["Voting for councillors requires you to reserve 20.064 DOT (0.067 KSM on Kusama) as a base amount and\nan amount of 0.032 DOT (0.0001 KSM on Kusama) per vote. You can then bond whatever amount you wish\nto put behind your vote. See the ",(0,i.jsx)(e.a,{href:"/docs/maintain/maintain-guides-democracy",children:"democracy guide"})," for more\ninformation."]}),"\n",(0,i.jsx)(e.admonition,{type:"warning",children:(0,i.jsxs)(e.p,{children:["If your balance is vesting, you cannot use unvested tokens for this lock. You will have to wait\nuntil you have at least that many ",(0,i.jsx)(e.strong,{children:"free"})," tokens to vote."]})}),"\n",(0,i.jsx)(e.p,{children:"Like the validator elections, you can approve up to 16 different councillors and your vote will be\nequalized among the chosen group. Unlike validator elections, there is no unbonding period for your\nreserved tokens. Once you remove your vote, your tokens will be liquid again."}),"\n",(0,i.jsx)(e.admonition,{type:"warning",children:(0,i.jsxs)(e.p,{children:["It is your responsibility not to put your entire balance into the reserved value when you make a\nvote for councillors. It's best to keep ",(0,i.jsx)(e.em,{children:"at least"})," enough DOT/KSM to pay for transaction fees."]})}),"\n",(0,i.jsxs)(e.p,{children:["Go to the ",(0,i.jsx)(e.a,{href:"https://polkadot.js.org/apps",children:"Polkadot-JS Apps Dashboard"}),' and click on the "Council" tab.\nOn the right side of the window there are two blue buttons, click on the one that says "Vote."']}),"\n",(0,i.jsx)(e.p,{children:'Since the council uses approval voting, when you vote you signal which of the candidates you approve\nof and your voted tokens will be equalized among the selected candidates. Select up to 16 council\ncandidates by moving the slider to "Aye" for each one that you want to be elected. When you\'ve made\nthe proper configuration submit your transaction.'}),"\n",(0,i.jsx)(e.p,{children:"You should see your vote appear in the interface immediately after your transaction is included."}),"\n",(0,i.jsx)(e.h2,{id:"removing-your-vote",children:"Removing your Vote"}),"\n",(0,i.jsx)(e.p,{children:"In order to get your reserved tokens back, you will need to remove your vote. Only remove your vote\nwhen you're done participating in elections and you no longer want your reserved tokens to count for\nthe councillors that you approve."}),"\n",(0,i.jsxs)(e.p,{children:['Go to the "Governance" > "Council" tab on the\n',(0,i.jsx)(e.a,{href:"https://polkadot.js.org/apps",children:"Polkadot-JS Apps Dashboard"}),"."]}),"\n",(0,i.jsx)(e.p,{children:'Under the "Council overview" tab, click on "Vote".'}),"\n",(0,i.jsx)(e.p,{children:(0,i.jsx)(e.img,{alt:"polkadotjs_removeVoter",src:n(15496).A+"",width:"1878",height:"361"})}),"\n",(0,i.jsx)(e.p,{children:'Issue the "Unvote all" option.'}),"\n",(0,i.jsx)(e.p,{children:"When the transaction is included in a block you should have your reserved tokens made liquid again\nand your vote will no longer be counting for any councillors in the elections starting in the next\nterm."})]})}function h(o={}){const{wrapper:e}={...(0,r.R)(),...o.components};return e?(0,i.jsx)(e,{...o,children:(0,i.jsx)(d,{...o})}):d(o)}},67141:(o,e,n)=>{n.d(e,{A:()=>r});var t=n(96540),i=n(74848);const r=function(o){var e,n=o.message,r=(0,t.useState)(!0),a=r[0],s=r[1];return(0,i.jsx)(i.Fragment,{children:a&&(0,i.jsxs)("div",{className:"message-box",children:[(0,i.jsx)("button",{className:"close-button",onClick:function(){s(!1)},children:"\u2716 "}),(0,i.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(e=n,e.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},15496:(o,e,n)=>{n.d(e,{A:()=>t});const t=n.p+"assets/images/polkadotjs_removeVoter-b66eb203df51ecdb1d926990120aa76b.png"},28453:(o,e,n)=>{n.d(e,{R:()=>a,x:()=>s});var t=n(96540);const i={},r=t.createContext(i);function a(o){const e=t.useContext(r);return t.useMemo((function(){return"function"==typeof o?o(e):{...e,...o}}),[e,o])}function s(o){let e;return e=o.disableParentContext?"function"==typeof o.components?o.components(i):o.components||i:a(o.components),t.createElement(r.Provider,{value:e},o.children)}}}]); \ No newline at end of file diff --git a/assets/js/31bd35e0.2310cc6a.js b/assets/js/31bd35e0.2310cc6a.js new file mode 100644 index 000000000000..8c1dbcf55760 --- /dev/null +++ b/assets/js/31bd35e0.2310cc6a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1042],{75535:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>c,contentTitle:()=>a,default:()=>d,frontMatter:()=>o,metadata:()=>t,toc:()=>l});const t=JSON.parse('{"id":"learn/xcm/overview/learn-xcm-docs-overview-summary","title":"XCM: Cross-Consensus Messaging","description":"Summary of the Chapter.","source":"@site/../docs/learn/xcm/overview/summary.md","sourceDirName":"learn/xcm/overview","slug":"/learn/xcm/overview-summary","permalink":"/docs/learn/xcm/overview-summary","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/xcm/overview/summary.md","tags":[],"version":"current","lastUpdatedBy":"Radha","lastUpdatedAt":1694074887000,"frontMatter":{"id":"learn-xcm-docs-overview-summary","title":"XCM: Cross-Consensus Messaging","sidebar_label":"Summary","description":"Summary of the Chapter.","keywords":["xcm","cross-consensus messaging"],"slug":"../overview-summary"},"sidebar":"docs","previous":{"title":"Overview","permalink":"/docs/learn/xcm/overview"},"next":{"title":"Introduction","permalink":"/docs/learn/xcm/overview-intro"}}');var r=s(74848),i=s(28453);const o={id:"learn-xcm-docs-overview-summary",title:"XCM: Cross-Consensus Messaging",sidebar_label:"Summary",description:"Summary of the Chapter.",keywords:["xcm","cross-consensus messaging"],slug:"../overview-summary"},a="Overview",c={},l=[];function m(e){const n={h1:"h1",header:"header",li:"li",p:"p",ul:"ul",...(0,i.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.header,{children:(0,r.jsx)(n.h1,{id:"overview",children:"Overview"})}),"\n",(0,r.jsx)(n.p,{children:"XCM enables different consensus systems to communicate with each other. Common cross-consensus\nuse-cases include:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Sending tokens between blockchains"}),"\n",(0,r.jsx)(n.li,{children:"Locking assets on one blockchain in order to gain some benefit on a smart contract on another\nblockchain"}),"\n",(0,r.jsx)(n.li,{children:"Calling specific functions on another blockchain"}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"These are just a few basic examples; once you can communicate with other consensus systems, you can\ncreate applications that can leverage multiple blockchains' capabilities. The potential it provides\nis especially evident in an ecosystem of highly specialized blockchains like Polkadot."}),"\n",(0,r.jsx)(n.p,{children:"Decentralized distributed systems are very complex, so it's easy to make errors when building\ninteractions between them. XCM is meant to be used by developers to package these interactions into\ntheir runtime logic before exposing that functionality to end users."}),"\n",(0,r.jsx)(n.p,{children:"This chapter will cover what XCM is, what it isn't, and why it matters before exploring the\ndifferent components that make up the XCM ecosystem."})]})}function d(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(m,{...e})}):m(e)}},28453:(e,n,s)=>{s.d(n,{R:()=>o,x:()=>a});var t=s(96540);const r={},i=t.createContext(r);function o(e){const n=t.useContext(i);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:o(e.components),t.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/31bd35e0.c490bf1d.js b/assets/js/31bd35e0.c490bf1d.js deleted file mode 100644 index 8101154be723..000000000000 --- a/assets/js/31bd35e0.c490bf1d.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1042],{18135:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>c,contentTitle:()=>o,default:()=>d,frontMatter:()=>r,metadata:()=>a,toc:()=>l});var t=s(74848),i=s(28453);const r={id:"learn-xcm-docs-overview-summary",title:"XCM: Cross-Consensus Messaging",sidebar_label:"Summary",description:"Summary of the Chapter.",keywords:["xcm","cross-consensus messaging"],slug:"../overview-summary"},o="Overview",a={id:"learn/xcm/overview/learn-xcm-docs-overview-summary",title:"XCM: Cross-Consensus Messaging",description:"Summary of the Chapter.",source:"@site/../docs/learn/xcm/overview/summary.md",sourceDirName:"learn/xcm/overview",slug:"/learn/xcm/overview-summary",permalink:"/docs/learn/xcm/overview-summary",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/xcm/overview/summary.md",tags:[],version:"current",lastUpdatedBy:"Radha",lastUpdatedAt:1694074887e3,frontMatter:{id:"learn-xcm-docs-overview-summary",title:"XCM: Cross-Consensus Messaging",sidebar_label:"Summary",description:"Summary of the Chapter.",keywords:["xcm","cross-consensus messaging"],slug:"../overview-summary"},sidebar:"docs",previous:{title:"Overview",permalink:"/docs/learn/xcm/overview"},next:{title:"Introduction",permalink:"/docs/learn/xcm/overview-intro"}},c={},l=[];function m(e){const n={h1:"h1",header:"header",li:"li",p:"p",ul:"ul",...(0,i.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.header,{children:(0,t.jsx)(n.h1,{id:"overview",children:"Overview"})}),"\n",(0,t.jsx)(n.p,{children:"XCM enables different consensus systems to communicate with each other. Common cross-consensus\nuse-cases include:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Sending tokens between blockchains"}),"\n",(0,t.jsx)(n.li,{children:"Locking assets on one blockchain in order to gain some benefit on a smart contract on another\nblockchain"}),"\n",(0,t.jsx)(n.li,{children:"Calling specific functions on another blockchain"}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"These are just a few basic examples; once you can communicate with other consensus systems, you can\ncreate applications that can leverage multiple blockchains' capabilities. The potential it provides\nis especially evident in an ecosystem of highly specialized blockchains like Polkadot."}),"\n",(0,t.jsx)(n.p,{children:"Decentralized distributed systems are very complex, so it's easy to make errors when building\ninteractions between them. XCM is meant to be used by developers to package these interactions into\ntheir runtime logic before exposing that functionality to end users."}),"\n",(0,t.jsx)(n.p,{children:"This chapter will cover what XCM is, what it isn't, and why it matters before exploring the\ndifferent components that make up the XCM ecosystem."})]})}function d(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(m,{...e})}):m(e)}},28453:(e,n,s)=>{s.d(n,{R:()=>o,x:()=>a});var t=s(96540);const i={},r=t.createContext(i);function o(e){const n=t.useContext(r);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:o(e.components),t.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/320c8a05.6955b1c5.js b/assets/js/320c8a05.6955b1c5.js deleted file mode 100644 index 5f43210dcc2b..000000000000 --- a/assets/js/320c8a05.6955b1c5.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4479],{98368:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>i,default:()=>h,frontMatter:()=>a,metadata:()=>r,toc:()=>c});var o=n(74848),s=n(28453);const a={id:"maintain-networks",title:"Networks",sidebar_label:"Networks",description:"Information about the different networks of the Polkadot ecosystem.",keywords:["networks","mainnet","testnet","canary","substrate"],slug:"../maintain-networks"},i=void 0,r={id:"maintain/maintain-networks",title:"Networks",description:"Information about the different networks of the Polkadot ecosystem.",source:"@site/../docs/maintain/maintain-networks.md",sourceDirName:"maintain",slug:"/maintain-networks",permalink:"/docs/maintain-networks",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/maintain/maintain-networks.md",tags:[],version:"current",lastUpdatedBy:"github-actions[bot]",lastUpdatedAt:1729496727e3,frontMatter:{id:"maintain-networks",title:"Networks",sidebar_label:"Networks",description:"Information about the different networks of the Polkadot ecosystem.",keywords:["networks","mainnet","testnet","canary","substrate"],slug:"../maintain-networks"},sidebar:"docs",previous:{title:"Secure the WebSocket",permalink:"/docs/maintain-wss"},next:{title:"Resolving Errors",permalink:"/docs/maintain-errors"}},d={},c=[{value:"Main networks",id:"main-networks",level:2},{value:"Polkadot Mainnet",id:"polkadot-mainnet",level:3},{value:"Kusama Canary Network",id:"kusama-canary-network",level:3},{value:"Test Networks",id:"test-networks",level:2},{value:"Westend Test Network",id:"westend-test-network",level:3},{value:"Westend Faucet",id:"westend-faucet",level:4},{value:"Westend Asset Hub",id:"westend-asset-hub",level:3},{value:"Westend Asset Hub Faucet",id:"westend-asset-hub-faucet",level:4},{value:"Rococo Test Network",id:"rococo-test-network",level:3},{value:"Paseo Test Network",id:"paseo-test-network",level:3},{value:"Paseo Faucet",id:"paseo-faucet",level:4},{value:"Wococo Test Network (inactive)",id:"wococo-test-network-inactive",level:3},{value:"Differences",id:"differences",level:2},{value:"Telemetry Dashboard",id:"telemetry-dashboard",level:2}];function l(e){const t={a:"a",code:"code",em:"em",h2:"h2",h3:"h3",h4:"h4",li:"li",p:"p",pre:"pre",ul:"ul",...(0,s.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.p,{children:"Polkadot is built on top of Substrate, a modular framework for blockchains. One feature of Substrate\nis to allow for connection to different networks using a single executable and configuring it with a\nstart-up flag. Here are some of the networks associated with Polkadot or Substrate that you may want\nto connect to and join."}),"\n",(0,o.jsx)(t.h2,{id:"main-networks",children:"Main networks"}),"\n",(0,o.jsxs)(t.p,{children:["To connect to a Polkadot network please follow the ",(0,o.jsx)(t.a,{href:"/docs/maintain-sync",children:"instructions"})," for installing\nthe Polkadot executable."]}),"\n",(0,o.jsx)(t.h3,{id:"polkadot-mainnet",children:"Polkadot Mainnet"}),"\n",(0,o.jsx)(t.p,{children:"Connecting to the Polkadot network is the default option when starting a node."}),"\n",(0,o.jsx)(t.p,{children:"To start a Polkadot node, run the Polkadot binary:"}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-bash",children:"polkadot\n"})}),"\n",(0,o.jsx)(t.p,{children:"and you will connect and start syncing to Polkadot."}),"\n",(0,o.jsxs)(t.p,{children:["Check your node is connected by viewing it on\n",(0,o.jsx)(t.a,{href:"https://telemetry.polkadot.io/#list/0x91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3",children:"Telemetry"}),"\n(you can set a custom node name by specifying ",(0,o.jsx)(t.code,{children:'--name "my-custom-node-name"'}),")"]}),"\n",(0,o.jsx)(t.h3,{id:"kusama-canary-network",children:"Kusama Canary Network"}),"\n",(0,o.jsx)(t.p,{children:"Kusama is a canary network and holds real economic value."}),"\n",(0,o.jsxs)(t.p,{children:["Run the Polkadot binary and specify ",(0,o.jsx)(t.code,{children:"kusama"})," as the chain:"]}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-bash",children:"polkadot --chain=kusama\n"})}),"\n",(0,o.jsx)(t.p,{children:"and you will connect and start syncing to Kusama."}),"\n",(0,o.jsxs)(t.p,{children:["Check your node is connected by viewing it on\n",(0,o.jsx)(t.a,{href:"https://telemetry.polkadot.io/#list/0xb0a8d493285c2df73290dfb7e61f870f17b41801197a149ca93654499ea3dafe",children:"Kusama Telemetry"}),"\n(you can set a custom node name by specifying ",(0,o.jsx)(t.code,{children:'--name "my-custom-node-name"'}),")"]}),"\n",(0,o.jsx)(t.h2,{id:"test-networks",children:"Test Networks"}),"\n",(0,o.jsx)(t.h3,{id:"westend-test-network",children:"Westend Test Network"}),"\n",(0,o.jsxs)(t.p,{children:["Westend is the primary test network of Polkadot. The tokens on this network are called ",(0,o.jsx)(t.em,{children:"Westies"}),"\n(WND) and they purposefully hold no economic value."]}),"\n",(0,o.jsxs)(t.p,{children:["Run the Polkadot binary and specify ",(0,o.jsx)(t.code,{children:"westend"})," as the chain:"]}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-bash",children:"polkadot --chain=westend\n"})}),"\n",(0,o.jsx)(t.p,{children:"and you will connect and start syncing to Westend."}),"\n",(0,o.jsxs)(t.p,{children:["Check that your node is connected by viewing it on\n",(0,o.jsx)(t.a,{href:"https://telemetry.polkadot.io/#list/0xe143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e",children:"Westend Telemetry"}),"\n(you can set a custom node name by specifying ",(0,o.jsx)(t.code,{children:'--name "my-custom-node-name"'}),")."]}),"\n",(0,o.jsx)(t.h4,{id:"westend-faucet",children:"Westend Faucet"}),"\n",(0,o.jsxs)(t.p,{children:["Follow the instruction ",(0,o.jsx)(t.a,{href:"/docs/learn-DOT#getting-tokens-on-the-westend-testnet",children:"here"})," to get\nWesties (WND) tokens."]}),"\n",(0,o.jsx)(t.h3,{id:"westend-asset-hub",children:"Westend Asset Hub"}),"\n",(0,o.jsxs)(t.p,{children:["The Westend\n",(0,o.jsx)(t.a,{href:"https://wiki.polkadot.network/docs/learn-guides-assets-create#creating-assets-on-the-asset-hub",children:"Asset Hub"}),"\nis a system parachain on Westend network."]}),"\n",(0,o.jsx)(t.h4,{id:"westend-asset-hub-faucet",children:"Westend Asset Hub Faucet"}),"\n",(0,o.jsxs)(t.p,{children:["Claim WND tokens from the ",(0,o.jsx)(t.a,{href:"https://faucet.polkadot.io/westend",children:"faucet"})," on Westend and teleport them\nto Westend Asset Hub."]}),"\n",(0,o.jsx)(t.h3,{id:"rococo-test-network",children:"Rococo Test Network"}),"\n",(0,o.jsx)(t.p,{children:"Rococo used to be a Polkadot test network for parachains. The network was shut down following its\nreplacement by Paseo."}),"\n",(0,o.jsx)(t.h3,{id:"paseo-test-network",children:"Paseo Test Network"}),"\n",(0,o.jsxs)(t.p,{children:[(0,o.jsx)(t.a,{href:"https://github.com/paseo-network/",children:"Paseo"})," is a test network built for parachains. The native token\nof this network (PAS) holds no economic value."]}),"\n",(0,o.jsx)(t.h4,{id:"paseo-faucet",children:"Paseo Faucet"}),"\n",(0,o.jsxs)(t.p,{children:["Follow the instruction ",(0,o.jsx)(t.a,{href:"/docs/learn-DOT#getting-tokens-on-the-paseo-testnet",children:"here"})," to get PAS\ntokens."]}),"\n",(0,o.jsx)(t.h3,{id:"wococo-test-network-inactive",children:"Wococo Test Network (inactive)"}),"\n",(0,o.jsx)(t.p,{children:"Wococo used to be a Polkadot test network for testing bridges. The network was shut down following\nthe bridge between Westend and Rococo deployment."}),"\n",(0,o.jsx)(t.h2,{id:"differences",children:"Differences"}),"\n",(0,o.jsxs)(t.p,{children:["Runtime differences (e.g. existential and multisignature deposit sizes) between the different\nnetworks can be found by doing a ",(0,o.jsx)(t.code,{children:"diff"})," between the ",(0,o.jsx)(t.code,{children:"src/lib.rs"})," of the repositories. For example,\nto compare the Polkadot and Kusama runtimes:"]}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsx)(t.li,{children:(0,o.jsx)(t.code,{children:"git clone https://github.com/polkadot-fellows/runtimes && cd runtimes/relay"})}),"\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.code,{children:"ls"})," - show the available runtimes"]}),"\n",(0,o.jsx)(t.li,{children:(0,o.jsx)(t.code,{children:"diff polkadot/src/lib.rs kusama/src/lib.rs"})}),"\n"]}),"\n",(0,o.jsxs)(t.p,{children:["You can also paste the runtimes\n(",(0,o.jsx)(t.a,{href:"https://github.com/polkadot-fellows/runtimes/blob/main/relay/polkadot/src/lib.rs",children:"Polkadot"}),",\n",(0,o.jsx)(t.a,{href:"https://github.com/polkadot-fellows/runtimes/blob/main/relay/kusama/src/lib.rs",children:"Kusama"}),") into a\nweb-based diff tool like ",(0,o.jsx)(t.a,{href:"https://www.diffchecker.com/",children:"Diffchecker"})," if you're not comfortable with\nthe CLI."]}),"\n",(0,o.jsx)(t.h2,{id:"telemetry-dashboard",children:"Telemetry Dashboard"}),"\n",(0,o.jsxs)(t.p,{children:["If you connect to the public networks, the default configuration for your node will connect it to\nthe public ",(0,o.jsx)(t.a,{href:"https://telemetry.polkadot.io/",children:"Telemetry"})," service."]}),"\n",(0,o.jsx)(t.p,{children:"You can verify that your node is connected by navigating to the correct network on the dashboard and\nfinding the name of your node."}),"\n",(0,o.jsx)(t.p,{children:"There is a built-in search function on the nodes page. Simply start typing keystrokes in the main\nwindow to make it available."})]})}function h(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(l,{...e})}):l(e)}},28453:(e,t,n)=>{n.d(t,{R:()=>i,x:()=>r});var o=n(96540);const s={},a=o.createContext(s);function i(e){const t=o.useContext(a);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),o.createElement(a.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/320c8a05.d1fd9de8.js b/assets/js/320c8a05.d1fd9de8.js new file mode 100644 index 000000000000..238eec3720c3 --- /dev/null +++ b/assets/js/320c8a05.d1fd9de8.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4479],{35689:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>r,default:()=>h,frontMatter:()=>i,metadata:()=>o,toc:()=>c});const o=JSON.parse('{"id":"maintain/maintain-networks","title":"Networks","description":"Information about the different networks of the Polkadot ecosystem.","source":"@site/../docs/maintain/maintain-networks.md","sourceDirName":"maintain","slug":"/maintain-networks","permalink":"/docs/maintain-networks","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/maintain/maintain-networks.md","tags":[],"version":"current","lastUpdatedBy":"github-actions[bot]","lastUpdatedAt":1729496727000,"frontMatter":{"id":"maintain-networks","title":"Networks","sidebar_label":"Networks","description":"Information about the different networks of the Polkadot ecosystem.","keywords":["networks","mainnet","testnet","canary","substrate"],"slug":"../maintain-networks"},"sidebar":"docs","previous":{"title":"Secure the WebSocket","permalink":"/docs/maintain-wss"},"next":{"title":"Resolving Errors","permalink":"/docs/maintain-errors"}}');var s=n(74848),a=n(28453);const i={id:"maintain-networks",title:"Networks",sidebar_label:"Networks",description:"Information about the different networks of the Polkadot ecosystem.",keywords:["networks","mainnet","testnet","canary","substrate"],slug:"../maintain-networks"},r=void 0,d={},c=[{value:"Main networks",id:"main-networks",level:2},{value:"Polkadot Mainnet",id:"polkadot-mainnet",level:3},{value:"Kusama Canary Network",id:"kusama-canary-network",level:3},{value:"Test Networks",id:"test-networks",level:2},{value:"Westend Test Network",id:"westend-test-network",level:3},{value:"Westend Faucet",id:"westend-faucet",level:4},{value:"Westend Asset Hub",id:"westend-asset-hub",level:3},{value:"Westend Asset Hub Faucet",id:"westend-asset-hub-faucet",level:4},{value:"Rococo Test Network",id:"rococo-test-network",level:3},{value:"Paseo Test Network",id:"paseo-test-network",level:3},{value:"Paseo Faucet",id:"paseo-faucet",level:4},{value:"Wococo Test Network (inactive)",id:"wococo-test-network-inactive",level:3},{value:"Differences",id:"differences",level:2},{value:"Telemetry Dashboard",id:"telemetry-dashboard",level:2}];function l(e){const t={a:"a",code:"code",em:"em",h2:"h2",h3:"h3",h4:"h4",li:"li",p:"p",pre:"pre",ul:"ul",...(0,a.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.p,{children:"Polkadot is built on top of Substrate, a modular framework for blockchains. One feature of Substrate\nis to allow for connection to different networks using a single executable and configuring it with a\nstart-up flag. Here are some of the networks associated with Polkadot or Substrate that you may want\nto connect to and join."}),"\n",(0,s.jsx)(t.h2,{id:"main-networks",children:"Main networks"}),"\n",(0,s.jsxs)(t.p,{children:["To connect to a Polkadot network please follow the ",(0,s.jsx)(t.a,{href:"/docs/maintain-sync",children:"instructions"})," for installing\nthe Polkadot executable."]}),"\n",(0,s.jsx)(t.h3,{id:"polkadot-mainnet",children:"Polkadot Mainnet"}),"\n",(0,s.jsx)(t.p,{children:"Connecting to the Polkadot network is the default option when starting a node."}),"\n",(0,s.jsx)(t.p,{children:"To start a Polkadot node, run the Polkadot binary:"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-bash",children:"polkadot\n"})}),"\n",(0,s.jsx)(t.p,{children:"and you will connect and start syncing to Polkadot."}),"\n",(0,s.jsxs)(t.p,{children:["Check your node is connected by viewing it on\n",(0,s.jsx)(t.a,{href:"https://telemetry.polkadot.io/#list/0x91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3",children:"Telemetry"}),"\n(you can set a custom node name by specifying ",(0,s.jsx)(t.code,{children:'--name "my-custom-node-name"'}),")"]}),"\n",(0,s.jsx)(t.h3,{id:"kusama-canary-network",children:"Kusama Canary Network"}),"\n",(0,s.jsx)(t.p,{children:"Kusama is a canary network and holds real economic value."}),"\n",(0,s.jsxs)(t.p,{children:["Run the Polkadot binary and specify ",(0,s.jsx)(t.code,{children:"kusama"})," as the chain:"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-bash",children:"polkadot --chain=kusama\n"})}),"\n",(0,s.jsx)(t.p,{children:"and you will connect and start syncing to Kusama."}),"\n",(0,s.jsxs)(t.p,{children:["Check your node is connected by viewing it on\n",(0,s.jsx)(t.a,{href:"https://telemetry.polkadot.io/#list/0xb0a8d493285c2df73290dfb7e61f870f17b41801197a149ca93654499ea3dafe",children:"Kusama Telemetry"}),"\n(you can set a custom node name by specifying ",(0,s.jsx)(t.code,{children:'--name "my-custom-node-name"'}),")"]}),"\n",(0,s.jsx)(t.h2,{id:"test-networks",children:"Test Networks"}),"\n",(0,s.jsx)(t.h3,{id:"westend-test-network",children:"Westend Test Network"}),"\n",(0,s.jsxs)(t.p,{children:["Westend is the primary test network of Polkadot. The tokens on this network are called ",(0,s.jsx)(t.em,{children:"Westies"}),"\n(WND) and they purposefully hold no economic value."]}),"\n",(0,s.jsxs)(t.p,{children:["Run the Polkadot binary and specify ",(0,s.jsx)(t.code,{children:"westend"})," as the chain:"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-bash",children:"polkadot --chain=westend\n"})}),"\n",(0,s.jsx)(t.p,{children:"and you will connect and start syncing to Westend."}),"\n",(0,s.jsxs)(t.p,{children:["Check that your node is connected by viewing it on\n",(0,s.jsx)(t.a,{href:"https://telemetry.polkadot.io/#list/0xe143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e",children:"Westend Telemetry"}),"\n(you can set a custom node name by specifying ",(0,s.jsx)(t.code,{children:'--name "my-custom-node-name"'}),")."]}),"\n",(0,s.jsx)(t.h4,{id:"westend-faucet",children:"Westend Faucet"}),"\n",(0,s.jsxs)(t.p,{children:["Follow the instruction ",(0,s.jsx)(t.a,{href:"/docs/learn-DOT#getting-tokens-on-the-westend-testnet",children:"here"})," to get\nWesties (WND) tokens."]}),"\n",(0,s.jsx)(t.h3,{id:"westend-asset-hub",children:"Westend Asset Hub"}),"\n",(0,s.jsxs)(t.p,{children:["The Westend\n",(0,s.jsx)(t.a,{href:"https://wiki.polkadot.network/docs/learn-guides-assets-create#creating-assets-on-the-asset-hub",children:"Asset Hub"}),"\nis a system parachain on Westend network."]}),"\n",(0,s.jsx)(t.h4,{id:"westend-asset-hub-faucet",children:"Westend Asset Hub Faucet"}),"\n",(0,s.jsxs)(t.p,{children:["Claim WND tokens from the ",(0,s.jsx)(t.a,{href:"https://faucet.polkadot.io/westend",children:"faucet"})," on Westend and teleport them\nto Westend Asset Hub."]}),"\n",(0,s.jsx)(t.h3,{id:"rococo-test-network",children:"Rococo Test Network"}),"\n",(0,s.jsx)(t.p,{children:"Rococo used to be a Polkadot test network for parachains. The network was shut down following its\nreplacement by Paseo."}),"\n",(0,s.jsx)(t.h3,{id:"paseo-test-network",children:"Paseo Test Network"}),"\n",(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.a,{href:"https://github.com/paseo-network/",children:"Paseo"})," is a test network built for parachains. The native token\nof this network (PAS) holds no economic value."]}),"\n",(0,s.jsx)(t.h4,{id:"paseo-faucet",children:"Paseo Faucet"}),"\n",(0,s.jsxs)(t.p,{children:["Follow the instruction ",(0,s.jsx)(t.a,{href:"/docs/learn-DOT#getting-tokens-on-the-paseo-testnet",children:"here"})," to get PAS\ntokens."]}),"\n",(0,s.jsx)(t.h3,{id:"wococo-test-network-inactive",children:"Wococo Test Network (inactive)"}),"\n",(0,s.jsx)(t.p,{children:"Wococo used to be a Polkadot test network for testing bridges. The network was shut down following\nthe bridge between Westend and Rococo deployment."}),"\n",(0,s.jsx)(t.h2,{id:"differences",children:"Differences"}),"\n",(0,s.jsxs)(t.p,{children:["Runtime differences (e.g. existential and multisignature deposit sizes) between the different\nnetworks can be found by doing a ",(0,s.jsx)(t.code,{children:"diff"})," between the ",(0,s.jsx)(t.code,{children:"src/lib.rs"})," of the repositories. For example,\nto compare the Polkadot and Kusama runtimes:"]}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.code,{children:"git clone https://github.com/polkadot-fellows/runtimes && cd runtimes/relay"})}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"ls"})," - show the available runtimes"]}),"\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.code,{children:"diff polkadot/src/lib.rs kusama/src/lib.rs"})}),"\n"]}),"\n",(0,s.jsxs)(t.p,{children:["You can also paste the runtimes\n(",(0,s.jsx)(t.a,{href:"https://github.com/polkadot-fellows/runtimes/blob/main/relay/polkadot/src/lib.rs",children:"Polkadot"}),",\n",(0,s.jsx)(t.a,{href:"https://github.com/polkadot-fellows/runtimes/blob/main/relay/kusama/src/lib.rs",children:"Kusama"}),") into a\nweb-based diff tool like ",(0,s.jsx)(t.a,{href:"https://www.diffchecker.com/",children:"Diffchecker"})," if you're not comfortable with\nthe CLI."]}),"\n",(0,s.jsx)(t.h2,{id:"telemetry-dashboard",children:"Telemetry Dashboard"}),"\n",(0,s.jsxs)(t.p,{children:["If you connect to the public networks, the default configuration for your node will connect it to\nthe public ",(0,s.jsx)(t.a,{href:"https://telemetry.polkadot.io/",children:"Telemetry"})," service."]}),"\n",(0,s.jsx)(t.p,{children:"You can verify that your node is connected by navigating to the correct network on the dashboard and\nfinding the name of your node."}),"\n",(0,s.jsx)(t.p,{children:"There is a built-in search function on the nodes page. Simply start typing keystrokes in the main\nwindow to make it available."})]})}function h(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},28453:(e,t,n)=>{n.d(t,{R:()=>i,x:()=>r});var o=n(96540);const s={},a=o.createContext(s);function i(e){const t=o.useContext(a);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),o.createElement(a.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/329.a80bb171.js b/assets/js/329.a80bb171.js deleted file mode 100644 index 5f0834743629..000000000000 --- a/assets/js/329.a80bb171.js +++ /dev/null @@ -1,14654 +0,0 @@ -"use strict"; -exports.id = 329; -exports.ids = [329]; -exports.modules = { - -/***/ 73743: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - a: () => (/* binding */ createText), - c: () => (/* binding */ computeDimensionOfText) -}); - -// NAMESPACE OBJECT: ./node_modules/mermaid/node_modules/micromark/lib/constructs.js -var constructs_namespaceObject = {}; -__webpack_require__.r(constructs_namespaceObject); -__webpack_require__.d(constructs_namespaceObject, { - attentionMarkers: () => (attentionMarkers), - contentInitial: () => (contentInitial), - disable: () => (disable), - document: () => (constructs_document), - flow: () => (constructs_flow), - flowInitial: () => (flowInitial), - insideSpan: () => (insideSpan), - string: () => (constructs_string), - text: () => (constructs_text) -}); - -// EXTERNAL MODULE: ./node_modules/mermaid/dist/mermaid-b5860b54.js + 8 modules -var mermaid_b5860b54 = __webpack_require__(86079); -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/mdast-util-to-string/lib/index.js -/** - * @typedef {import('mdast').Root|import('mdast').Content} Node - * - * @typedef Options - * Configuration (optional). - * @property {boolean | null | undefined} [includeImageAlt=true] - * Whether to use `alt` for `image`s. - * @property {boolean | null | undefined} [includeHtml=true] - * Whether to use `value` of HTML. - */ - -/** @type {Options} */ -const emptyOptions = {} - -/** - * Get the text content of a node or list of nodes. - * - * Prefers the node’s plain-text fields, otherwise serializes its children, - * and if the given value is an array, serialize the nodes in it. - * - * @param {unknown} value - * Thing to serialize, typically `Node`. - * @param {Options | null | undefined} [options] - * Configuration (optional). - * @returns {string} - * Serialized `value`. - */ -function lib_toString(value, options) { - const settings = options || emptyOptions - const includeImageAlt = - typeof settings.includeImageAlt === 'boolean' - ? settings.includeImageAlt - : true - const includeHtml = - typeof settings.includeHtml === 'boolean' ? settings.includeHtml : true - - return one(value, includeImageAlt, includeHtml) -} - -/** - * One node or several nodes. - * - * @param {unknown} value - * Thing to serialize. - * @param {boolean} includeImageAlt - * Include image `alt`s. - * @param {boolean} includeHtml - * Include HTML. - * @returns {string} - * Serialized node. - */ -function one(value, includeImageAlt, includeHtml) { - if (node(value)) { - if ('value' in value) { - return value.type === 'html' && !includeHtml ? '' : value.value - } - - if (includeImageAlt && 'alt' in value && value.alt) { - return value.alt - } - - if ('children' in value) { - return lib_all(value.children, includeImageAlt, includeHtml) - } - } - - if (Array.isArray(value)) { - return lib_all(value, includeImageAlt, includeHtml) - } - - return '' -} - -/** - * Serialize a list of nodes. - * - * @param {Array} values - * Thing to serialize. - * @param {boolean} includeImageAlt - * Include image `alt`s. - * @param {boolean} includeHtml - * Include HTML. - * @returns {string} - * Serialized nodes. - */ -function lib_all(values, includeImageAlt, includeHtml) { - /** @type {Array} */ - const result = [] - let index = -1 - - while (++index < values.length) { - result[index] = one(values[index], includeImageAlt, includeHtml) - } - - return result.join('') -} - -/** - * Check if `value` looks like a node. - * - * @param {unknown} value - * Thing. - * @returns {value is Node} - * Whether `value` is a node. - */ -function node(value) { - return Boolean(value && typeof value === 'object') -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-chunked/index.js -/** - * Like `Array#splice`, but smarter for giant arrays. - * - * `Array#splice` takes all items to be inserted as individual argument which - * causes a stack overflow in V8 when trying to insert 100k items for instance. - * - * Otherwise, this does not return the removed items, and takes `items` as an - * array instead of rest parameters. - * - * @template {unknown} T - * Item type. - * @param {Array} list - * List to operate on. - * @param {number} start - * Index to remove/insert at (can be negative). - * @param {number} remove - * Number of items to remove. - * @param {Array} items - * Items to inject into `list`. - * @returns {void} - * Nothing. - */ -function splice(list, start, remove, items) { - const end = list.length - let chunkStart = 0 - /** @type {Array} */ - let parameters - - // Make start between zero and `end` (included). - if (start < 0) { - start = -start > end ? 0 : end + start - } else { - start = start > end ? end : start - } - remove = remove > 0 ? remove : 0 - - // No need to chunk the items if there’s only a couple (10k) items. - if (items.length < 10000) { - parameters = Array.from(items) - parameters.unshift(start, remove) - // @ts-expect-error Hush, it’s fine. - list.splice(...parameters) - } else { - // Delete `remove` items starting from `start` - if (remove) list.splice(start, remove) - - // Insert the items in chunks to not cause stack overflows. - while (chunkStart < items.length) { - parameters = items.slice(chunkStart, chunkStart + 10000) - parameters.unshift(start, 0) - // @ts-expect-error Hush, it’s fine. - list.splice(...parameters) - chunkStart += 10000 - start += 10000 - } - } -} - -/** - * Append `items` (an array) at the end of `list` (another array). - * When `list` was empty, returns `items` instead. - * - * This prevents a potentially expensive operation when `list` is empty, - * and adds items in batches to prevent V8 from hanging. - * - * @template {unknown} T - * Item type. - * @param {Array} list - * List to operate on. - * @param {Array} items - * Items to add to `list`. - * @returns {Array} - * Either `list` or `items`. - */ -function push(list, items) { - if (list.length > 0) { - splice(list, list.length, 0, items) - return list - } - return items -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-combine-extensions/index.js -/** - * @typedef {import('micromark-util-types').Extension} Extension - * @typedef {import('micromark-util-types').Handles} Handles - * @typedef {import('micromark-util-types').HtmlExtension} HtmlExtension - * @typedef {import('micromark-util-types').NormalizedExtension} NormalizedExtension - */ - - - -const micromark_util_combine_extensions_hasOwnProperty = {}.hasOwnProperty - -/** - * Combine multiple syntax extensions into one. - * - * @param {Array} extensions - * List of syntax extensions. - * @returns {NormalizedExtension} - * A single combined extension. - */ -function combineExtensions(extensions) { - /** @type {NormalizedExtension} */ - const all = {} - let index = -1 - - while (++index < extensions.length) { - syntaxExtension(all, extensions[index]) - } - - return all -} - -/** - * Merge `extension` into `all`. - * - * @param {NormalizedExtension} all - * Extension to merge into. - * @param {Extension} extension - * Extension to merge. - * @returns {void} - */ -function syntaxExtension(all, extension) { - /** @type {keyof Extension} */ - let hook - - for (hook in extension) { - const maybe = micromark_util_combine_extensions_hasOwnProperty.call(all, hook) ? all[hook] : undefined - /** @type {Record} */ - const left = maybe || (all[hook] = {}) - /** @type {Record | undefined} */ - const right = extension[hook] - /** @type {string} */ - let code - - if (right) { - for (code in right) { - if (!micromark_util_combine_extensions_hasOwnProperty.call(left, code)) left[code] = [] - const value = right[code] - constructs( - // @ts-expect-error Looks like a list. - left[code], - Array.isArray(value) ? value : value ? [value] : [] - ) - } - } - } -} - -/** - * Merge `list` into `existing` (both lists of constructs). - * Mutates `existing`. - * - * @param {Array} existing - * @param {Array} list - * @returns {void} - */ -function constructs(existing, list) { - let index = -1 - /** @type {Array} */ - const before = [] - - while (++index < list.length) { - // @ts-expect-error Looks like an object. - ;(list[index].add === 'after' ? existing : before).push(list[index]) - } - - splice(existing, 0, 0, before) -} - -/** - * Combine multiple HTML extensions into one. - * - * @param {Array} htmlExtensions - * List of HTML extensions. - * @returns {HtmlExtension} - * A single combined HTML extension. - */ -function combineHtmlExtensions(htmlExtensions) { - /** @type {HtmlExtension} */ - const handlers = {} - let index = -1 - - while (++index < htmlExtensions.length) { - htmlExtension(handlers, htmlExtensions[index]) - } - - return handlers -} - -/** - * Merge `extension` into `all`. - * - * @param {HtmlExtension} all - * Extension to merge into. - * @param {HtmlExtension} extension - * Extension to merge. - * @returns {void} - */ -function htmlExtension(all, extension) { - /** @type {keyof HtmlExtension} */ - let hook - - for (hook in extension) { - const maybe = micromark_util_combine_extensions_hasOwnProperty.call(all, hook) ? all[hook] : undefined - const left = maybe || (all[hook] = {}) - const right = extension[hook] - /** @type {keyof Handles} */ - let type - - if (right) { - for (type in right) { - // @ts-expect-error assume document vs regular handler are managed correctly. - left[type] = right[type] - } - } - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-character/lib/unicode-punctuation-regex.js -// This module is generated by `script/`. -// -// CommonMark handles attention (emphasis, strong) markers based on what comes -// before or after them. -// One such difference is if those characters are Unicode punctuation. -// This script is generated from the Unicode data. - -/** - * Regular expression that matches a unicode punctuation character. - */ -const unicodePunctuationRegex = - /[!-\/:-@\[-`\{-~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/ - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-character/index.js -/** - * @typedef {import('micromark-util-types').Code} Code - */ - - - -/** - * Check whether the character code represents an ASCII alpha (`a` through `z`, - * case insensitive). - * - * An **ASCII alpha** is an ASCII upper alpha or ASCII lower alpha. - * - * An **ASCII upper alpha** is a character in the inclusive range U+0041 (`A`) - * to U+005A (`Z`). - * - * An **ASCII lower alpha** is a character in the inclusive range U+0061 (`a`) - * to U+007A (`z`). - * - * @param code - * Code. - * @returns - * Whether it matches. - */ -const asciiAlpha = regexCheck(/[A-Za-z]/) - -/** - * Check whether the character code represents an ASCII alphanumeric (`a` - * through `z`, case insensitive, or `0` through `9`). - * - * An **ASCII alphanumeric** is an ASCII digit (see `asciiDigit`) or ASCII alpha - * (see `asciiAlpha`). - * - * @param code - * Code. - * @returns - * Whether it matches. - */ -const asciiAlphanumeric = regexCheck(/[\dA-Za-z]/) - -/** - * Check whether the character code represents an ASCII atext. - * - * atext is an ASCII alphanumeric (see `asciiAlphanumeric`), or a character in - * the inclusive ranges U+0023 NUMBER SIGN (`#`) to U+0027 APOSTROPHE (`'`), - * U+002A ASTERISK (`*`), U+002B PLUS SIGN (`+`), U+002D DASH (`-`), U+002F - * SLASH (`/`), U+003D EQUALS TO (`=`), U+003F QUESTION MARK (`?`), U+005E - * CARET (`^`) to U+0060 GRAVE ACCENT (`` ` ``), or U+007B LEFT CURLY BRACE - * (`{`) to U+007E TILDE (`~`). - * - * See: - * **\[RFC5322]**: - * [Internet Message Format](https://tools.ietf.org/html/rfc5322). - * P. Resnick. - * IETF. - * - * @param code - * Code. - * @returns - * Whether it matches. - */ -const asciiAtext = regexCheck(/[#-'*+\--9=?A-Z^-~]/) - -/** - * Check whether a character code is an ASCII control character. - * - * An **ASCII control** is a character in the inclusive range U+0000 NULL (NUL) - * to U+001F (US), or U+007F (DEL). - * - * @param {Code} code - * Code. - * @returns {boolean} - * Whether it matches. - */ -function asciiControl(code) { - return ( - // Special whitespace codes (which have negative values), C0 and Control - // character DEL - code !== null && (code < 32 || code === 127) - ) -} - -/** - * Check whether the character code represents an ASCII digit (`0` through `9`). - * - * An **ASCII digit** is a character in the inclusive range U+0030 (`0`) to - * U+0039 (`9`). - * - * @param code - * Code. - * @returns - * Whether it matches. - */ -const asciiDigit = regexCheck(/\d/) - -/** - * Check whether the character code represents an ASCII hex digit (`a` through - * `f`, case insensitive, or `0` through `9`). - * - * An **ASCII hex digit** is an ASCII digit (see `asciiDigit`), ASCII upper hex - * digit, or an ASCII lower hex digit. - * - * An **ASCII upper hex digit** is a character in the inclusive range U+0041 - * (`A`) to U+0046 (`F`). - * - * An **ASCII lower hex digit** is a character in the inclusive range U+0061 - * (`a`) to U+0066 (`f`). - * - * @param code - * Code. - * @returns - * Whether it matches. - */ -const asciiHexDigit = regexCheck(/[\dA-Fa-f]/) - -/** - * Check whether the character code represents ASCII punctuation. - * - * An **ASCII punctuation** is a character in the inclusive ranges U+0021 - * EXCLAMATION MARK (`!`) to U+002F SLASH (`/`), U+003A COLON (`:`) to U+0040 AT - * SIGN (`@`), U+005B LEFT SQUARE BRACKET (`[`) to U+0060 GRAVE ACCENT - * (`` ` ``), or U+007B LEFT CURLY BRACE (`{`) to U+007E TILDE (`~`). - * - * @param code - * Code. - * @returns - * Whether it matches. - */ -const asciiPunctuation = regexCheck(/[!-/:-@[-`{-~]/) - -/** - * Check whether a character code is a markdown line ending. - * - * A **markdown line ending** is the virtual characters M-0003 CARRIAGE RETURN - * LINE FEED (CRLF), M-0004 LINE FEED (LF) and M-0005 CARRIAGE RETURN (CR). - * - * In micromark, the actual character U+000A LINE FEED (LF) and U+000D CARRIAGE - * RETURN (CR) are replaced by these virtual characters depending on whether - * they occurred together. - * - * @param {Code} code - * Code. - * @returns {boolean} - * Whether it matches. - */ -function markdownLineEnding(code) { - return code !== null && code < -2 -} - -/** - * Check whether a character code is a markdown line ending (see - * `markdownLineEnding`) or markdown space (see `markdownSpace`). - * - * @param {Code} code - * Code. - * @returns {boolean} - * Whether it matches. - */ -function markdownLineEndingOrSpace(code) { - return code !== null && (code < 0 || code === 32) -} - -/** - * Check whether a character code is a markdown space. - * - * A **markdown space** is the concrete character U+0020 SPACE (SP) and the - * virtual characters M-0001 VIRTUAL SPACE (VS) and M-0002 HORIZONTAL TAB (HT). - * - * In micromark, the actual character U+0009 CHARACTER TABULATION (HT) is - * replaced by one M-0002 HORIZONTAL TAB (HT) and between 0 and 3 M-0001 VIRTUAL - * SPACE (VS) characters, depending on the column at which the tab occurred. - * - * @param {Code} code - * Code. - * @returns {boolean} - * Whether it matches. - */ -function markdownSpace(code) { - return code === -2 || code === -1 || code === 32 -} - -// Size note: removing ASCII from the regex and using `asciiPunctuation` here -// In fact adds to the bundle size. -/** - * Check whether the character code represents Unicode punctuation. - * - * A **Unicode punctuation** is a character in the Unicode `Pc` (Punctuation, - * Connector), `Pd` (Punctuation, Dash), `Pe` (Punctuation, Close), `Pf` - * (Punctuation, Final quote), `Pi` (Punctuation, Initial quote), `Po` - * (Punctuation, Other), or `Ps` (Punctuation, Open) categories, or an ASCII - * punctuation (see `asciiPunctuation`). - * - * See: - * **\[UNICODE]**: - * [The Unicode Standard](https://www.unicode.org/versions/). - * Unicode Consortium. - * - * @param code - * Code. - * @returns - * Whether it matches. - */ -const unicodePunctuation = regexCheck(unicodePunctuationRegex) - -/** - * Check whether the character code represents Unicode whitespace. - * - * Note that this does handle micromark specific markdown whitespace characters. - * See `markdownLineEndingOrSpace` to check that. - * - * A **Unicode whitespace** is a character in the Unicode `Zs` (Separator, - * Space) category, or U+0009 CHARACTER TABULATION (HT), U+000A LINE FEED (LF), - * U+000C (FF), or U+000D CARRIAGE RETURN (CR) (**\[UNICODE]**). - * - * See: - * **\[UNICODE]**: - * [The Unicode Standard](https://www.unicode.org/versions/). - * Unicode Consortium. - * - * @param code - * Code. - * @returns - * Whether it matches. - */ -const unicodeWhitespace = regexCheck(/\s/) - -/** - * Create a code check from a regex. - * - * @param {RegExp} regex - * @returns {(code: Code) => boolean} - */ -function regexCheck(regex) { - return check - - /** - * Check whether a code matches the bound regex. - * - * @param {Code} code - * Character code. - * @returns {boolean} - * Whether the character code matches the bound regex. - */ - function check(code) { - return code !== null && regex.test(String.fromCharCode(code)) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-space/index.js -/** - * @typedef {import('micromark-util-types').Effects} Effects - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenType} TokenType - */ - - - -// To do: implement `spaceOrTab`, `spaceOrTabMinMax`, `spaceOrTabWithOptions`. - -/** - * Parse spaces and tabs. - * - * There is no `nok` parameter: - * - * * spaces in markdown are often optional, in which case this factory can be - * used and `ok` will be switched to whether spaces were found or not - * * one line ending or space can be detected with `markdownSpace(code)` right - * before using `factorySpace` - * - * ###### Examples - * - * Where `␉` represents a tab (plus how much it expands) and `␠` represents a - * single space. - * - * ```markdown - * ␉ - * ␠␠␠␠ - * ␉␠ - * ``` - * - * @param {Effects} effects - * Context. - * @param {State} ok - * State switched to when successful. - * @param {TokenType} type - * Type (`' \t'`). - * @param {number | undefined} [max=Infinity] - * Max (exclusive). - * @returns - * Start state. - */ -function factorySpace(effects, ok, type, max) { - const limit = max ? max - 1 : Number.POSITIVE_INFINITY - let size = 0 - return start - - /** @type {State} */ - function start(code) { - if (markdownSpace(code)) { - effects.enter(type) - return prefix(code) - } - return ok(code) - } - - /** @type {State} */ - function prefix(code) { - if (markdownSpace(code) && size++ < limit) { - effects.consume(code) - return prefix - } - effects.exit(type) - return ok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/initialize/content.js -/** - * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct - * @typedef {import('micromark-util-types').Initializer} Initializer - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').Token} Token - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - */ - - - -/** @type {InitialConstruct} */ -const content = { - tokenize: initializeContent -} - -/** - * @this {TokenizeContext} - * @type {Initializer} - */ -function initializeContent(effects) { - const contentStart = effects.attempt( - this.parser.constructs.contentInitial, - afterContentStartConstruct, - paragraphInitial - ) - /** @type {Token} */ - let previous - return contentStart - - /** @type {State} */ - function afterContentStartConstruct(code) { - if (code === null) { - effects.consume(code) - return - } - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return factorySpace(effects, contentStart, 'linePrefix') - } - - /** @type {State} */ - function paragraphInitial(code) { - effects.enter('paragraph') - return lineStart(code) - } - - /** @type {State} */ - function lineStart(code) { - const token = effects.enter('chunkText', { - contentType: 'text', - previous - }) - if (previous) { - previous.next = token - } - previous = token - return data(code) - } - - /** @type {State} */ - function data(code) { - if (code === null) { - effects.exit('chunkText') - effects.exit('paragraph') - effects.consume(code) - return - } - if (markdownLineEnding(code)) { - effects.consume(code) - effects.exit('chunkText') - return lineStart - } - - // Data. - effects.consume(code) - return data - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/initialize/document.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').ContainerState} ContainerState - * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct - * @typedef {import('micromark-util-types').Initializer} Initializer - * @typedef {import('micromark-util-types').Point} Point - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').Token} Token - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - -/** - * @typedef {[Construct, ContainerState]} StackItem - */ - - - - -/** @type {InitialConstruct} */ -const document_document = { - tokenize: initializeDocument -} - -/** @type {Construct} */ -const containerConstruct = { - tokenize: tokenizeContainer -} - -/** - * @this {TokenizeContext} - * @type {Initializer} - */ -function initializeDocument(effects) { - const self = this - /** @type {Array} */ - const stack = [] - let continued = 0 - /** @type {TokenizeContext | undefined} */ - let childFlow - /** @type {Token | undefined} */ - let childToken - /** @type {number} */ - let lineStartOffset - return start - - /** @type {State} */ - function start(code) { - // First we iterate through the open blocks, starting with the root - // document, and descending through last children down to the last open - // block. - // Each block imposes a condition that the line must satisfy if the block is - // to remain open. - // For example, a block quote requires a `>` character. - // A paragraph requires a non-blank line. - // In this phase we may match all or just some of the open blocks. - // But we cannot close unmatched blocks yet, because we may have a lazy - // continuation line. - if (continued < stack.length) { - const item = stack[continued] - self.containerState = item[1] - return effects.attempt( - item[0].continuation, - documentContinue, - checkNewContainers - )(code) - } - - // Done. - return checkNewContainers(code) - } - - /** @type {State} */ - function documentContinue(code) { - continued++ - - // Note: this field is called `_closeFlow` but it also closes containers. - // Perhaps a good idea to rename it but it’s already used in the wild by - // extensions. - if (self.containerState._closeFlow) { - self.containerState._closeFlow = undefined - if (childFlow) { - closeFlow() - } - - // Note: this algorithm for moving events around is similar to the - // algorithm when dealing with lazy lines in `writeToChild`. - const indexBeforeExits = self.events.length - let indexBeforeFlow = indexBeforeExits - /** @type {Point | undefined} */ - let point - - // Find the flow chunk. - while (indexBeforeFlow--) { - if ( - self.events[indexBeforeFlow][0] === 'exit' && - self.events[indexBeforeFlow][1].type === 'chunkFlow' - ) { - point = self.events[indexBeforeFlow][1].end - break - } - } - exitContainers(continued) - - // Fix positions. - let index = indexBeforeExits - while (index < self.events.length) { - self.events[index][1].end = Object.assign({}, point) - index++ - } - - // Inject the exits earlier (they’re still also at the end). - splice( - self.events, - indexBeforeFlow + 1, - 0, - self.events.slice(indexBeforeExits) - ) - - // Discard the duplicate exits. - self.events.length = index - return checkNewContainers(code) - } - return start(code) - } - - /** @type {State} */ - function checkNewContainers(code) { - // Next, after consuming the continuation markers for existing blocks, we - // look for new block starts (e.g. `>` for a block quote). - // If we encounter a new block start, we close any blocks unmatched in - // step 1 before creating the new block as a child of the last matched - // block. - if (continued === stack.length) { - // No need to `check` whether there’s a container, of `exitContainers` - // would be moot. - // We can instead immediately `attempt` to parse one. - if (!childFlow) { - return documentContinued(code) - } - - // If we have concrete content, such as block HTML or fenced code, - // we can’t have containers “pierce” into them, so we can immediately - // start. - if (childFlow.currentConstruct && childFlow.currentConstruct.concrete) { - return flowStart(code) - } - - // If we do have flow, it could still be a blank line, - // but we’d be interrupting it w/ a new container if there’s a current - // construct. - // To do: next major: remove `_gfmTableDynamicInterruptHack` (no longer - // needed in micromark-extension-gfm-table@1.0.6). - self.interrupt = Boolean( - childFlow.currentConstruct && !childFlow._gfmTableDynamicInterruptHack - ) - } - - // Check if there is a new container. - self.containerState = {} - return effects.check( - containerConstruct, - thereIsANewContainer, - thereIsNoNewContainer - )(code) - } - - /** @type {State} */ - function thereIsANewContainer(code) { - if (childFlow) closeFlow() - exitContainers(continued) - return documentContinued(code) - } - - /** @type {State} */ - function thereIsNoNewContainer(code) { - self.parser.lazy[self.now().line] = continued !== stack.length - lineStartOffset = self.now().offset - return flowStart(code) - } - - /** @type {State} */ - function documentContinued(code) { - // Try new containers. - self.containerState = {} - return effects.attempt( - containerConstruct, - containerContinue, - flowStart - )(code) - } - - /** @type {State} */ - function containerContinue(code) { - continued++ - stack.push([self.currentConstruct, self.containerState]) - // Try another. - return documentContinued(code) - } - - /** @type {State} */ - function flowStart(code) { - if (code === null) { - if (childFlow) closeFlow() - exitContainers(0) - effects.consume(code) - return - } - childFlow = childFlow || self.parser.flow(self.now()) - effects.enter('chunkFlow', { - contentType: 'flow', - previous: childToken, - _tokenizer: childFlow - }) - return flowContinue(code) - } - - /** @type {State} */ - function flowContinue(code) { - if (code === null) { - writeToChild(effects.exit('chunkFlow'), true) - exitContainers(0) - effects.consume(code) - return - } - if (markdownLineEnding(code)) { - effects.consume(code) - writeToChild(effects.exit('chunkFlow')) - // Get ready for the next line. - continued = 0 - self.interrupt = undefined - return start - } - effects.consume(code) - return flowContinue - } - - /** - * @param {Token} token - * @param {boolean | undefined} [eof] - * @returns {void} - */ - function writeToChild(token, eof) { - const stream = self.sliceStream(token) - if (eof) stream.push(null) - token.previous = childToken - if (childToken) childToken.next = token - childToken = token - childFlow.defineSkip(token.start) - childFlow.write(stream) - - // Alright, so we just added a lazy line: - // - // ```markdown - // > a - // b. - // - // Or: - // - // > ~~~c - // d - // - // Or: - // - // > | e | - // f - // ``` - // - // The construct in the second example (fenced code) does not accept lazy - // lines, so it marked itself as done at the end of its first line, and - // then the content construct parses `d`. - // Most constructs in markdown match on the first line: if the first line - // forms a construct, a non-lazy line can’t “unmake” it. - // - // The construct in the third example is potentially a GFM table, and - // those are *weird*. - // It *could* be a table, from the first line, if the following line - // matches a condition. - // In this case, that second line is lazy, which “unmakes” the first line - // and turns the whole into one content block. - // - // We’ve now parsed the non-lazy and the lazy line, and can figure out - // whether the lazy line started a new flow block. - // If it did, we exit the current containers between the two flow blocks. - if (self.parser.lazy[token.start.line]) { - let index = childFlow.events.length - while (index--) { - if ( - // The token starts before the line ending… - childFlow.events[index][1].start.offset < lineStartOffset && - // …and either is not ended yet… - (!childFlow.events[index][1].end || - // …or ends after it. - childFlow.events[index][1].end.offset > lineStartOffset) - ) { - // Exit: there’s still something open, which means it’s a lazy line - // part of something. - return - } - } - - // Note: this algorithm for moving events around is similar to the - // algorithm when closing flow in `documentContinue`. - const indexBeforeExits = self.events.length - let indexBeforeFlow = indexBeforeExits - /** @type {boolean | undefined} */ - let seen - /** @type {Point | undefined} */ - let point - - // Find the previous chunk (the one before the lazy line). - while (indexBeforeFlow--) { - if ( - self.events[indexBeforeFlow][0] === 'exit' && - self.events[indexBeforeFlow][1].type === 'chunkFlow' - ) { - if (seen) { - point = self.events[indexBeforeFlow][1].end - break - } - seen = true - } - } - exitContainers(continued) - - // Fix positions. - index = indexBeforeExits - while (index < self.events.length) { - self.events[index][1].end = Object.assign({}, point) - index++ - } - - // Inject the exits earlier (they’re still also at the end). - splice( - self.events, - indexBeforeFlow + 1, - 0, - self.events.slice(indexBeforeExits) - ) - - // Discard the duplicate exits. - self.events.length = index - } - } - - /** - * @param {number} size - * @returns {void} - */ - function exitContainers(size) { - let index = stack.length - - // Exit open containers. - while (index-- > size) { - const entry = stack[index] - self.containerState = entry[1] - entry[0].exit.call(self, effects) - } - stack.length = size - } - function closeFlow() { - childFlow.write([null]) - childToken = undefined - childFlow = undefined - self.containerState._closeFlow = undefined - } -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeContainer(effects, ok, nok) { - // Always populated by defaults. - - return factorySpace( - effects, - effects.attempt(this.parser.constructs.document, ok, nok), - 'linePrefix', - this.parser.constructs.disable.null.includes('codeIndented') ? undefined : 4 - ) -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/blank-line.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const blankLine = { - tokenize: tokenizeBlankLine, - partial: true -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeBlankLine(effects, ok, nok) { - return start - - /** - * Start of blank line. - * - * > 👉 **Note**: `␠` represents a space character. - * - * ```markdown - * > | ␠␠␊ - * ^ - * > | ␊ - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - return markdownSpace(code) - ? factorySpace(effects, after, 'linePrefix')(code) - : after(code) - } - - /** - * At eof/eol, after optional whitespace. - * - * > 👉 **Note**: `␠` represents a space character. - * - * ```markdown - * > | ␠␠␊ - * ^ - * > | ␊ - * ^ - * ``` - * - * @type {State} - */ - function after(code) { - return code === null || markdownLineEnding(code) ? ok(code) : nok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/micromark-util-subtokenize/node_modules/micromark-util-chunked/index.js -/** - * Like `Array#splice`, but smarter for giant arrays. - * - * `Array#splice` takes all items to be inserted as individual argument which - * causes a stack overflow in V8 when trying to insert 100k items for instance. - * - * Otherwise, this does not return the removed items, and takes `items` as an - * array instead of rest parameters. - * - * @template {unknown} T - * Item type. - * @param {Array} list - * List to operate on. - * @param {number} start - * Index to remove/insert at (can be negative). - * @param {number} remove - * Number of items to remove. - * @param {Array} items - * Items to inject into `list`. - * @returns {void} - * Nothing. - */ -function micromark_util_chunked_splice(list, start, remove, items) { - const end = list.length - let chunkStart = 0 - /** @type {Array} */ - let parameters - - // Make start between zero and `end` (included). - if (start < 0) { - start = -start > end ? 0 : end + start - } else { - start = start > end ? end : start - } - remove = remove > 0 ? remove : 0 - - // No need to chunk the items if there’s only a couple (10k) items. - if (items.length < 10000) { - parameters = Array.from(items) - parameters.unshift(start, remove) - // @ts-expect-error Hush, it’s fine. - list.splice(...parameters) - } else { - // Delete `remove` items starting from `start` - if (remove) list.splice(start, remove) - - // Insert the items in chunks to not cause stack overflows. - while (chunkStart < items.length) { - parameters = items.slice(chunkStart, chunkStart + 10000) - parameters.unshift(start, 0) - // @ts-expect-error Hush, it’s fine. - list.splice(...parameters) - chunkStart += 10000 - start += 10000 - } - } -} - -/** - * Append `items` (an array) at the end of `list` (another array). - * When `list` was empty, returns `items` instead. - * - * This prevents a potentially expensive operation when `list` is empty, - * and adds items in batches to prevent V8 from hanging. - * - * @template {unknown} T - * Item type. - * @param {Array} list - * List to operate on. - * @param {Array} items - * Items to add to `list`. - * @returns {Array} - * Either `list` or `items`. - */ -function micromark_util_chunked_push(list, items) { - if (list.length > 0) { - micromark_util_chunked_splice(list, list.length, 0, items) - return list - } - return items -} - -;// CONCATENATED MODULE: ./node_modules/micromark-util-subtokenize/index.js -/** - * @typedef {import('micromark-util-types').Chunk} Chunk - * @typedef {import('micromark-util-types').Event} Event - * @typedef {import('micromark-util-types').Token} Token - */ - - -/** - * Tokenize subcontent. - * - * @param {Array} events - * List of events. - * @returns {boolean} - * Whether subtokens were found. - */ -function subtokenize(events) { - /** @type {Record} */ - const jumps = {} - let index = -1 - /** @type {Event} */ - let event - /** @type {number | undefined} */ - let lineIndex - /** @type {number} */ - let otherIndex - /** @type {Event} */ - let otherEvent - /** @type {Array} */ - let parameters - /** @type {Array} */ - let subevents - /** @type {boolean | undefined} */ - let more - while (++index < events.length) { - while (index in jumps) { - index = jumps[index] - } - event = events[index] - - // Add a hook for the GFM tasklist extension, which needs to know if text - // is in the first content of a list item. - if ( - index && - event[1].type === 'chunkFlow' && - events[index - 1][1].type === 'listItemPrefix' - ) { - subevents = event[1]._tokenizer.events - otherIndex = 0 - if ( - otherIndex < subevents.length && - subevents[otherIndex][1].type === 'lineEndingBlank' - ) { - otherIndex += 2 - } - if ( - otherIndex < subevents.length && - subevents[otherIndex][1].type === 'content' - ) { - while (++otherIndex < subevents.length) { - if (subevents[otherIndex][1].type === 'content') { - break - } - if (subevents[otherIndex][1].type === 'chunkText') { - subevents[otherIndex][1]._isInFirstContentOfListItem = true - otherIndex++ - } - } - } - } - - // Enter. - if (event[0] === 'enter') { - if (event[1].contentType) { - Object.assign(jumps, subcontent(events, index)) - index = jumps[index] - more = true - } - } - // Exit. - else if (event[1]._container) { - otherIndex = index - lineIndex = undefined - while (otherIndex--) { - otherEvent = events[otherIndex] - if ( - otherEvent[1].type === 'lineEnding' || - otherEvent[1].type === 'lineEndingBlank' - ) { - if (otherEvent[0] === 'enter') { - if (lineIndex) { - events[lineIndex][1].type = 'lineEndingBlank' - } - otherEvent[1].type = 'lineEnding' - lineIndex = otherIndex - } - } else { - break - } - } - if (lineIndex) { - // Fix position. - event[1].end = Object.assign({}, events[lineIndex][1].start) - - // Switch container exit w/ line endings. - parameters = events.slice(lineIndex, index) - parameters.unshift(event) - micromark_util_chunked_splice(events, lineIndex, index - lineIndex + 1, parameters) - } - } - } - return !more -} - -/** - * Tokenize embedded tokens. - * - * @param {Array} events - * @param {number} eventIndex - * @returns {Record} - */ -function subcontent(events, eventIndex) { - const token = events[eventIndex][1] - const context = events[eventIndex][2] - let startPosition = eventIndex - 1 - /** @type {Array} */ - const startPositions = [] - const tokenizer = - token._tokenizer || context.parser[token.contentType](token.start) - const childEvents = tokenizer.events - /** @type {Array<[number, number]>} */ - const jumps = [] - /** @type {Record} */ - const gaps = {} - /** @type {Array} */ - let stream - /** @type {Token | undefined} */ - let previous - let index = -1 - /** @type {Token | undefined} */ - let current = token - let adjust = 0 - let start = 0 - const breaks = [start] - - // Loop forward through the linked tokens to pass them in order to the - // subtokenizer. - while (current) { - // Find the position of the event for this token. - while (events[++startPosition][1] !== current) { - // Empty. - } - startPositions.push(startPosition) - if (!current._tokenizer) { - stream = context.sliceStream(current) - if (!current.next) { - stream.push(null) - } - if (previous) { - tokenizer.defineSkip(current.start) - } - if (current._isInFirstContentOfListItem) { - tokenizer._gfmTasklistFirstContentOfListItem = true - } - tokenizer.write(stream) - if (current._isInFirstContentOfListItem) { - tokenizer._gfmTasklistFirstContentOfListItem = undefined - } - } - - // Unravel the next token. - previous = current - current = current.next - } - - // Now, loop back through all events (and linked tokens), to figure out which - // parts belong where. - current = token - while (++index < childEvents.length) { - if ( - // Find a void token that includes a break. - childEvents[index][0] === 'exit' && - childEvents[index - 1][0] === 'enter' && - childEvents[index][1].type === childEvents[index - 1][1].type && - childEvents[index][1].start.line !== childEvents[index][1].end.line - ) { - start = index + 1 - breaks.push(start) - // Help GC. - current._tokenizer = undefined - current.previous = undefined - current = current.next - } - } - - // Help GC. - tokenizer.events = [] - - // If there’s one more token (which is the cases for lines that end in an - // EOF), that’s perfect: the last point we found starts it. - // If there isn’t then make sure any remaining content is added to it. - if (current) { - // Help GC. - current._tokenizer = undefined - current.previous = undefined - } else { - breaks.pop() - } - - // Now splice the events from the subtokenizer into the current events, - // moving back to front so that splice indices aren’t affected. - index = breaks.length - while (index--) { - const slice = childEvents.slice(breaks[index], breaks[index + 1]) - const start = startPositions.pop() - jumps.unshift([start, start + slice.length - 1]) - micromark_util_chunked_splice(events, start, 2, slice) - } - index = -1 - while (++index < jumps.length) { - gaps[adjust + jumps[index][0]] = adjust + jumps[index][1] - adjust += jumps[index][1] - jumps[index][0] - 1 - } - return gaps -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/content.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').Resolver} Resolver - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').Token} Token - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - - -/** - * No name because it must not be turned off. - * @type {Construct} - */ -const content_content = { - tokenize: tokenizeContent, - resolve: resolveContent -} - -/** @type {Construct} */ -const continuationConstruct = { - tokenize: tokenizeContinuation, - partial: true -} - -/** - * Content is transparent: it’s parsed right now. That way, definitions are also - * parsed right now: before text in paragraphs (specifically, media) are parsed. - * - * @type {Resolver} - */ -function resolveContent(events) { - subtokenize(events) - return events -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeContent(effects, ok) { - /** @type {Token | undefined} */ - let previous - return chunkStart - - /** - * Before a content chunk. - * - * ```markdown - * > | abc - * ^ - * ``` - * - * @type {State} - */ - function chunkStart(code) { - effects.enter('content') - previous = effects.enter('chunkContent', { - contentType: 'content' - }) - return chunkInside(code) - } - - /** - * In a content chunk. - * - * ```markdown - * > | abc - * ^^^ - * ``` - * - * @type {State} - */ - function chunkInside(code) { - if (code === null) { - return contentEnd(code) - } - - // To do: in `markdown-rs`, each line is parsed on its own, and everything - // is stitched together resolving. - if (markdownLineEnding(code)) { - return effects.check( - continuationConstruct, - contentContinue, - contentEnd - )(code) - } - - // Data. - effects.consume(code) - return chunkInside - } - - /** - * - * - * @type {State} - */ - function contentEnd(code) { - effects.exit('chunkContent') - effects.exit('content') - return ok(code) - } - - /** - * - * - * @type {State} - */ - function contentContinue(code) { - effects.consume(code) - effects.exit('chunkContent') - previous.next = effects.enter('chunkContent', { - contentType: 'content', - previous - }) - previous = previous.next - return chunkInside - } -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeContinuation(effects, ok, nok) { - const self = this - return startLookahead - - /** - * - * - * @type {State} - */ - function startLookahead(code) { - effects.exit('chunkContent') - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return factorySpace(effects, prefixed, 'linePrefix') - } - - /** - * - * - * @type {State} - */ - function prefixed(code) { - if (code === null || markdownLineEnding(code)) { - return nok(code) - } - - // Always populated by defaults. - - const tail = self.events[self.events.length - 1] - if ( - !self.parser.constructs.disable.null.includes('codeIndented') && - tail && - tail[1].type === 'linePrefix' && - tail[2].sliceSerialize(tail[1], true).length >= 4 - ) { - return ok(code) - } - return effects.interrupt(self.parser.constructs.flow, nok, ok)(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/initialize/flow.js -/** - * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct - * @typedef {import('micromark-util-types').Initializer} Initializer - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - */ - - - - -/** @type {InitialConstruct} */ -const flow = { - tokenize: initializeFlow -} - -/** - * @this {TokenizeContext} - * @type {Initializer} - */ -function initializeFlow(effects) { - const self = this - const initial = effects.attempt( - // Try to parse a blank line. - blankLine, - atBlankEnding, - // Try to parse initial flow (essentially, only code). - effects.attempt( - this.parser.constructs.flowInitial, - afterConstruct, - factorySpace( - effects, - effects.attempt( - this.parser.constructs.flow, - afterConstruct, - effects.attempt(content_content, afterConstruct) - ), - 'linePrefix' - ) - ) - ) - return initial - - /** @type {State} */ - function atBlankEnding(code) { - if (code === null) { - effects.consume(code) - return - } - effects.enter('lineEndingBlank') - effects.consume(code) - effects.exit('lineEndingBlank') - self.currentConstruct = undefined - return initial - } - - /** @type {State} */ - function afterConstruct(code) { - if (code === null) { - effects.consume(code) - return - } - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - self.currentConstruct = undefined - return initial - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/initialize/text.js -/** - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct - * @typedef {import('micromark-util-types').Initializer} Initializer - * @typedef {import('micromark-util-types').Resolver} Resolver - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - */ - -const resolver = { - resolveAll: createResolver() -} -const string = initializeFactory('string') -const text_text = initializeFactory('text') - -/** - * @param {'string' | 'text'} field - * @returns {InitialConstruct} - */ -function initializeFactory(field) { - return { - tokenize: initializeText, - resolveAll: createResolver( - field === 'text' ? resolveAllLineSuffixes : undefined - ) - } - - /** - * @this {TokenizeContext} - * @type {Initializer} - */ - function initializeText(effects) { - const self = this - const constructs = this.parser.constructs[field] - const text = effects.attempt(constructs, start, notText) - return start - - /** @type {State} */ - function start(code) { - return atBreak(code) ? text(code) : notText(code) - } - - /** @type {State} */ - function notText(code) { - if (code === null) { - effects.consume(code) - return - } - effects.enter('data') - effects.consume(code) - return data - } - - /** @type {State} */ - function data(code) { - if (atBreak(code)) { - effects.exit('data') - return text(code) - } - - // Data. - effects.consume(code) - return data - } - - /** - * @param {Code} code - * @returns {boolean} - */ - function atBreak(code) { - if (code === null) { - return true - } - const list = constructs[code] - let index = -1 - if (list) { - // Always populated by defaults. - - while (++index < list.length) { - const item = list[index] - if (!item.previous || item.previous.call(self, self.previous)) { - return true - } - } - } - return false - } - } -} - -/** - * @param {Resolver | undefined} [extraResolver] - * @returns {Resolver} - */ -function createResolver(extraResolver) { - return resolveAllText - - /** @type {Resolver} */ - function resolveAllText(events, context) { - let index = -1 - /** @type {number | undefined} */ - let enter - - // A rather boring computation (to merge adjacent `data` events) which - // improves mm performance by 29%. - while (++index <= events.length) { - if (enter === undefined) { - if (events[index] && events[index][1].type === 'data') { - enter = index - index++ - } - } else if (!events[index] || events[index][1].type !== 'data') { - // Don’t do anything if there is one data token. - if (index !== enter + 2) { - events[enter][1].end = events[index - 1][1].end - events.splice(enter + 2, index - enter - 2) - index = enter + 2 - } - enter = undefined - } - } - return extraResolver ? extraResolver(events, context) : events - } -} - -/** - * A rather ugly set of instructions which again looks at chunks in the input - * stream. - * The reason to do this here is that it is *much* faster to parse in reverse. - * And that we can’t hook into `null` to split the line suffix before an EOF. - * To do: figure out if we can make this into a clean utility, or even in core. - * As it will be useful for GFMs literal autolink extension (and maybe even - * tables?) - * - * @type {Resolver} - */ -function resolveAllLineSuffixes(events, context) { - let eventIndex = 0 // Skip first. - - while (++eventIndex <= events.length) { - if ( - (eventIndex === events.length || - events[eventIndex][1].type === 'lineEnding') && - events[eventIndex - 1][1].type === 'data' - ) { - const data = events[eventIndex - 1][1] - const chunks = context.sliceStream(data) - let index = chunks.length - let bufferIndex = -1 - let size = 0 - /** @type {boolean | undefined} */ - let tabs - while (index--) { - const chunk = chunks[index] - if (typeof chunk === 'string') { - bufferIndex = chunk.length - while (chunk.charCodeAt(bufferIndex - 1) === 32) { - size++ - bufferIndex-- - } - if (bufferIndex) break - bufferIndex = -1 - } - // Number - else if (chunk === -2) { - tabs = true - size++ - } else if (chunk === -1) { - // Empty - } else { - // Replacement character, exit. - index++ - break - } - } - if (size) { - const token = { - type: - eventIndex === events.length || tabs || size < 2 - ? 'lineSuffix' - : 'hardBreakTrailing', - start: { - line: data.end.line, - column: data.end.column - size, - offset: data.end.offset - size, - _index: data.start._index + index, - _bufferIndex: index - ? bufferIndex - : data.start._bufferIndex + bufferIndex - }, - end: Object.assign({}, data.end) - } - data.end = Object.assign({}, token.start) - if (data.start.offset === data.end.offset) { - Object.assign(data, token) - } else { - events.splice( - eventIndex, - 0, - ['enter', token, context], - ['exit', token, context] - ) - eventIndex += 2 - } - } - eventIndex++ - } - } - return events -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-resolve-all/index.js -/** - * @typedef {import('micromark-util-types').Event} Event - * @typedef {import('micromark-util-types').Resolver} Resolver - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - */ - -/** - * Call all `resolveAll`s. - * - * @param {Array<{resolveAll?: Resolver | undefined}>} constructs - * List of constructs, optionally with `resolveAll`s. - * @param {Array} events - * List of events. - * @param {TokenizeContext} context - * Context used by `tokenize`. - * @returns {Array} - * Changed events. - */ -function resolveAll(constructs, events, context) { - /** @type {Array} */ - const called = [] - let index = -1 - - while (++index < constructs.length) { - const resolve = constructs[index].resolveAll - - if (resolve && !called.includes(resolve)) { - events = resolve(events, context) - called.push(resolve) - } - } - - return events -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/create-tokenizer.js -/** - * @typedef {import('micromark-util-types').Chunk} Chunk - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').ConstructRecord} ConstructRecord - * @typedef {import('micromark-util-types').Effects} Effects - * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct - * @typedef {import('micromark-util-types').ParseContext} ParseContext - * @typedef {import('micromark-util-types').Point} Point - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').Token} Token - * @typedef {import('micromark-util-types').TokenType} TokenType - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - */ - -/** - * @callback Restore - * @returns {void} - * - * @typedef Info - * @property {Restore} restore - * @property {number} from - * - * @callback ReturnHandle - * Handle a successful run. - * @param {Construct} construct - * @param {Info} info - * @returns {void} - */ - - - - -/** - * Create a tokenizer. - * Tokenizers deal with one type of data (e.g., containers, flow, text). - * The parser is the object dealing with it all. - * `initialize` works like other constructs, except that only its `tokenize` - * function is used, in which case it doesn’t receive an `ok` or `nok`. - * `from` can be given to set the point before the first character, although - * when further lines are indented, they must be set with `defineSkip`. - * - * @param {ParseContext} parser - * @param {InitialConstruct} initialize - * @param {Omit | undefined} [from] - * @returns {TokenizeContext} - */ -function createTokenizer(parser, initialize, from) { - /** @type {Point} */ - let point = Object.assign( - from - ? Object.assign({}, from) - : { - line: 1, - column: 1, - offset: 0 - }, - { - _index: 0, - _bufferIndex: -1 - } - ) - /** @type {Record} */ - const columnStart = {} - /** @type {Array} */ - const resolveAllConstructs = [] - /** @type {Array} */ - let chunks = [] - /** @type {Array} */ - let stack = [] - /** @type {boolean | undefined} */ - let consumed = true - - /** - * Tools used for tokenizing. - * - * @type {Effects} - */ - const effects = { - consume, - enter, - exit, - attempt: constructFactory(onsuccessfulconstruct), - check: constructFactory(onsuccessfulcheck), - interrupt: constructFactory(onsuccessfulcheck, { - interrupt: true - }) - } - - /** - * State and tools for resolving and serializing. - * - * @type {TokenizeContext} - */ - const context = { - previous: null, - code: null, - containerState: {}, - events: [], - parser, - sliceStream, - sliceSerialize, - now, - defineSkip, - write - } - - /** - * The state function. - * - * @type {State | void} - */ - let state = initialize.tokenize.call(context, effects) - - /** - * Track which character we expect to be consumed, to catch bugs. - * - * @type {Code} - */ - let expectedCode - if (initialize.resolveAll) { - resolveAllConstructs.push(initialize) - } - return context - - /** @type {TokenizeContext['write']} */ - function write(slice) { - chunks = push(chunks, slice) - main() - - // Exit if we’re not done, resolve might change stuff. - if (chunks[chunks.length - 1] !== null) { - return [] - } - addResult(initialize, 0) - - // Otherwise, resolve, and exit. - context.events = resolveAll(resolveAllConstructs, context.events, context) - return context.events - } - - // - // Tools. - // - - /** @type {TokenizeContext['sliceSerialize']} */ - function sliceSerialize(token, expandTabs) { - return serializeChunks(sliceStream(token), expandTabs) - } - - /** @type {TokenizeContext['sliceStream']} */ - function sliceStream(token) { - return sliceChunks(chunks, token) - } - - /** @type {TokenizeContext['now']} */ - function now() { - // This is a hot path, so we clone manually instead of `Object.assign({}, point)` - const {line, column, offset, _index, _bufferIndex} = point - return { - line, - column, - offset, - _index, - _bufferIndex - } - } - - /** @type {TokenizeContext['defineSkip']} */ - function defineSkip(value) { - columnStart[value.line] = value.column - accountForPotentialSkip() - } - - // - // State management. - // - - /** - * Main loop (note that `_index` and `_bufferIndex` in `point` are modified by - * `consume`). - * Here is where we walk through the chunks, which either include strings of - * several characters, or numerical character codes. - * The reason to do this in a loop instead of a call is so the stack can - * drain. - * - * @returns {void} - */ - function main() { - /** @type {number} */ - let chunkIndex - while (point._index < chunks.length) { - const chunk = chunks[point._index] - - // If we’re in a buffer chunk, loop through it. - if (typeof chunk === 'string') { - chunkIndex = point._index - if (point._bufferIndex < 0) { - point._bufferIndex = 0 - } - while ( - point._index === chunkIndex && - point._bufferIndex < chunk.length - ) { - go(chunk.charCodeAt(point._bufferIndex)) - } - } else { - go(chunk) - } - } - } - - /** - * Deal with one code. - * - * @param {Code} code - * @returns {void} - */ - function go(code) { - consumed = undefined - expectedCode = code - state = state(code) - } - - /** @type {Effects['consume']} */ - function consume(code) { - if (markdownLineEnding(code)) { - point.line++ - point.column = 1 - point.offset += code === -3 ? 2 : 1 - accountForPotentialSkip() - } else if (code !== -1) { - point.column++ - point.offset++ - } - - // Not in a string chunk. - if (point._bufferIndex < 0) { - point._index++ - } else { - point._bufferIndex++ - - // At end of string chunk. - // @ts-expect-error Points w/ non-negative `_bufferIndex` reference - // strings. - if (point._bufferIndex === chunks[point._index].length) { - point._bufferIndex = -1 - point._index++ - } - } - - // Expose the previous character. - context.previous = code - - // Mark as consumed. - consumed = true - } - - /** @type {Effects['enter']} */ - function enter(type, fields) { - /** @type {Token} */ - // @ts-expect-error Patch instead of assign required fields to help GC. - const token = fields || {} - token.type = type - token.start = now() - context.events.push(['enter', token, context]) - stack.push(token) - return token - } - - /** @type {Effects['exit']} */ - function exit(type) { - const token = stack.pop() - token.end = now() - context.events.push(['exit', token, context]) - return token - } - - /** - * Use results. - * - * @type {ReturnHandle} - */ - function onsuccessfulconstruct(construct, info) { - addResult(construct, info.from) - } - - /** - * Discard results. - * - * @type {ReturnHandle} - */ - function onsuccessfulcheck(_, info) { - info.restore() - } - - /** - * Factory to attempt/check/interrupt. - * - * @param {ReturnHandle} onreturn - * @param {{interrupt?: boolean | undefined} | undefined} [fields] - */ - function constructFactory(onreturn, fields) { - return hook - - /** - * Handle either an object mapping codes to constructs, a list of - * constructs, or a single construct. - * - * @param {Array | Construct | ConstructRecord} constructs - * @param {State} returnState - * @param {State | undefined} [bogusState] - * @returns {State} - */ - function hook(constructs, returnState, bogusState) { - /** @type {Array} */ - let listOfConstructs - /** @type {number} */ - let constructIndex - /** @type {Construct} */ - let currentConstruct - /** @type {Info} */ - let info - return Array.isArray(constructs) /* c8 ignore next 1 */ - ? handleListOfConstructs(constructs) - : 'tokenize' in constructs - ? // @ts-expect-error Looks like a construct. - handleListOfConstructs([constructs]) - : handleMapOfConstructs(constructs) - - /** - * Handle a list of construct. - * - * @param {ConstructRecord} map - * @returns {State} - */ - function handleMapOfConstructs(map) { - return start - - /** @type {State} */ - function start(code) { - const def = code !== null && map[code] - const all = code !== null && map.null - const list = [ - // To do: add more extension tests. - /* c8 ignore next 2 */ - ...(Array.isArray(def) ? def : def ? [def] : []), - ...(Array.isArray(all) ? all : all ? [all] : []) - ] - return handleListOfConstructs(list)(code) - } - } - - /** - * Handle a list of construct. - * - * @param {Array} list - * @returns {State} - */ - function handleListOfConstructs(list) { - listOfConstructs = list - constructIndex = 0 - if (list.length === 0) { - return bogusState - } - return handleConstruct(list[constructIndex]) - } - - /** - * Handle a single construct. - * - * @param {Construct} construct - * @returns {State} - */ - function handleConstruct(construct) { - return start - - /** @type {State} */ - function start(code) { - // To do: not needed to store if there is no bogus state, probably? - // Currently doesn’t work because `inspect` in document does a check - // w/o a bogus, which doesn’t make sense. But it does seem to help perf - // by not storing. - info = store() - currentConstruct = construct - if (!construct.partial) { - context.currentConstruct = construct - } - - // Always populated by defaults. - - if ( - construct.name && - context.parser.constructs.disable.null.includes(construct.name) - ) { - return nok(code) - } - return construct.tokenize.call( - // If we do have fields, create an object w/ `context` as its - // prototype. - // This allows a “live binding”, which is needed for `interrupt`. - fields ? Object.assign(Object.create(context), fields) : context, - effects, - ok, - nok - )(code) - } - } - - /** @type {State} */ - function ok(code) { - consumed = true - onreturn(currentConstruct, info) - return returnState - } - - /** @type {State} */ - function nok(code) { - consumed = true - info.restore() - if (++constructIndex < listOfConstructs.length) { - return handleConstruct(listOfConstructs[constructIndex]) - } - return bogusState - } - } - } - - /** - * @param {Construct} construct - * @param {number} from - * @returns {void} - */ - function addResult(construct, from) { - if (construct.resolveAll && !resolveAllConstructs.includes(construct)) { - resolveAllConstructs.push(construct) - } - if (construct.resolve) { - splice( - context.events, - from, - context.events.length - from, - construct.resolve(context.events.slice(from), context) - ) - } - if (construct.resolveTo) { - context.events = construct.resolveTo(context.events, context) - } - } - - /** - * Store state. - * - * @returns {Info} - */ - function store() { - const startPoint = now() - const startPrevious = context.previous - const startCurrentConstruct = context.currentConstruct - const startEventsIndex = context.events.length - const startStack = Array.from(stack) - return { - restore, - from: startEventsIndex - } - - /** - * Restore state. - * - * @returns {void} - */ - function restore() { - point = startPoint - context.previous = startPrevious - context.currentConstruct = startCurrentConstruct - context.events.length = startEventsIndex - stack = startStack - accountForPotentialSkip() - } - } - - /** - * Move the current point a bit forward in the line when it’s on a column - * skip. - * - * @returns {void} - */ - function accountForPotentialSkip() { - if (point.line in columnStart && point.column < 2) { - point.column = columnStart[point.line] - point.offset += columnStart[point.line] - 1 - } - } -} - -/** - * Get the chunks from a slice of chunks in the range of a token. - * - * @param {Array} chunks - * @param {Pick} token - * @returns {Array} - */ -function sliceChunks(chunks, token) { - const startIndex = token.start._index - const startBufferIndex = token.start._bufferIndex - const endIndex = token.end._index - const endBufferIndex = token.end._bufferIndex - /** @type {Array} */ - let view - if (startIndex === endIndex) { - // @ts-expect-error `_bufferIndex` is used on string chunks. - view = [chunks[startIndex].slice(startBufferIndex, endBufferIndex)] - } else { - view = chunks.slice(startIndex, endIndex) - if (startBufferIndex > -1) { - const head = view[0] - if (typeof head === 'string') { - view[0] = head.slice(startBufferIndex) - } else { - view.shift() - } - } - if (endBufferIndex > 0) { - // @ts-expect-error `_bufferIndex` is used on string chunks. - view.push(chunks[endIndex].slice(0, endBufferIndex)) - } - } - return view -} - -/** - * Get the string value of a slice of chunks. - * - * @param {Array} chunks - * @param {boolean | undefined} [expandTabs=false] - * @returns {string} - */ -function serializeChunks(chunks, expandTabs) { - let index = -1 - /** @type {Array} */ - const result = [] - /** @type {boolean | undefined} */ - let atTab - while (++index < chunks.length) { - const chunk = chunks[index] - /** @type {string} */ - let value - if (typeof chunk === 'string') { - value = chunk - } else - switch (chunk) { - case -5: { - value = '\r' - break - } - case -4: { - value = '\n' - break - } - case -3: { - value = '\r' + '\n' - break - } - case -2: { - value = expandTabs ? ' ' : '\t' - break - } - case -1: { - if (!expandTabs && atTab) continue - value = ' ' - break - } - default: { - // Currently only replacement character. - value = String.fromCharCode(chunk) - } - } - atTab = chunk === -2 - result.push(value) - } - return result.join('') -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/thematic-break.js -/** - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const thematicBreak = { - name: 'thematicBreak', - tokenize: tokenizeThematicBreak -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeThematicBreak(effects, ok, nok) { - let size = 0 - /** @type {NonNullable} */ - let marker - return start - - /** - * Start of thematic break. - * - * ```markdown - * > | *** - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter('thematicBreak') - // To do: parse indent like `markdown-rs`. - return before(code) - } - - /** - * After optional whitespace, at marker. - * - * ```markdown - * > | *** - * ^ - * ``` - * - * @type {State} - */ - function before(code) { - marker = code - return atBreak(code) - } - - /** - * After something, before something else. - * - * ```markdown - * > | *** - * ^ - * ``` - * - * @type {State} - */ - function atBreak(code) { - if (code === marker) { - effects.enter('thematicBreakSequence') - return sequence(code) - } - if (size >= 3 && (code === null || markdownLineEnding(code))) { - effects.exit('thematicBreak') - return ok(code) - } - return nok(code) - } - - /** - * In sequence. - * - * ```markdown - * > | *** - * ^ - * ``` - * - * @type {State} - */ - function sequence(code) { - if (code === marker) { - effects.consume(code) - size++ - return sequence - } - effects.exit('thematicBreakSequence') - return markdownSpace(code) - ? factorySpace(effects, atBreak, 'whitespace')(code) - : atBreak(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/list.js -/** - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').ContainerState} ContainerState - * @typedef {import('micromark-util-types').Exiter} Exiter - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - - - - -/** @type {Construct} */ -const list = { - name: 'list', - tokenize: tokenizeListStart, - continuation: { - tokenize: tokenizeListContinuation - }, - exit: tokenizeListEnd -} - -/** @type {Construct} */ -const listItemPrefixWhitespaceConstruct = { - tokenize: tokenizeListItemPrefixWhitespace, - partial: true -} - -/** @type {Construct} */ -const indentConstruct = { - tokenize: tokenizeIndent, - partial: true -} - -// To do: `markdown-rs` parses list items on their own and later stitches them -// together. - -/** - * @type {Tokenizer} - * @this {TokenizeContext} - */ -function tokenizeListStart(effects, ok, nok) { - const self = this - const tail = self.events[self.events.length - 1] - let initialSize = - tail && tail[1].type === 'linePrefix' - ? tail[2].sliceSerialize(tail[1], true).length - : 0 - let size = 0 - return start - - /** @type {State} */ - function start(code) { - const kind = - self.containerState.type || - (code === 42 || code === 43 || code === 45 - ? 'listUnordered' - : 'listOrdered') - if ( - kind === 'listUnordered' - ? !self.containerState.marker || code === self.containerState.marker - : asciiDigit(code) - ) { - if (!self.containerState.type) { - self.containerState.type = kind - effects.enter(kind, { - _container: true - }) - } - if (kind === 'listUnordered') { - effects.enter('listItemPrefix') - return code === 42 || code === 45 - ? effects.check(thematicBreak, nok, atMarker)(code) - : atMarker(code) - } - if (!self.interrupt || code === 49) { - effects.enter('listItemPrefix') - effects.enter('listItemValue') - return inside(code) - } - } - return nok(code) - } - - /** @type {State} */ - function inside(code) { - if (asciiDigit(code) && ++size < 10) { - effects.consume(code) - return inside - } - if ( - (!self.interrupt || size < 2) && - (self.containerState.marker - ? code === self.containerState.marker - : code === 41 || code === 46) - ) { - effects.exit('listItemValue') - return atMarker(code) - } - return nok(code) - } - - /** - * @type {State} - **/ - function atMarker(code) { - effects.enter('listItemMarker') - effects.consume(code) - effects.exit('listItemMarker') - self.containerState.marker = self.containerState.marker || code - return effects.check( - blankLine, - // Can’t be empty when interrupting. - self.interrupt ? nok : onBlank, - effects.attempt( - listItemPrefixWhitespaceConstruct, - endOfPrefix, - otherPrefix - ) - ) - } - - /** @type {State} */ - function onBlank(code) { - self.containerState.initialBlankLine = true - initialSize++ - return endOfPrefix(code) - } - - /** @type {State} */ - function otherPrefix(code) { - if (markdownSpace(code)) { - effects.enter('listItemPrefixWhitespace') - effects.consume(code) - effects.exit('listItemPrefixWhitespace') - return endOfPrefix - } - return nok(code) - } - - /** @type {State} */ - function endOfPrefix(code) { - self.containerState.size = - initialSize + - self.sliceSerialize(effects.exit('listItemPrefix'), true).length - return ok(code) - } -} - -/** - * @type {Tokenizer} - * @this {TokenizeContext} - */ -function tokenizeListContinuation(effects, ok, nok) { - const self = this - self.containerState._closeFlow = undefined - return effects.check(blankLine, onBlank, notBlank) - - /** @type {State} */ - function onBlank(code) { - self.containerState.furtherBlankLines = - self.containerState.furtherBlankLines || - self.containerState.initialBlankLine - - // We have a blank line. - // Still, try to consume at most the items size. - return factorySpace( - effects, - ok, - 'listItemIndent', - self.containerState.size + 1 - )(code) - } - - /** @type {State} */ - function notBlank(code) { - if (self.containerState.furtherBlankLines || !markdownSpace(code)) { - self.containerState.furtherBlankLines = undefined - self.containerState.initialBlankLine = undefined - return notInCurrentItem(code) - } - self.containerState.furtherBlankLines = undefined - self.containerState.initialBlankLine = undefined - return effects.attempt(indentConstruct, ok, notInCurrentItem)(code) - } - - /** @type {State} */ - function notInCurrentItem(code) { - // While we do continue, we signal that the flow should be closed. - self.containerState._closeFlow = true - // As we’re closing flow, we’re no longer interrupting. - self.interrupt = undefined - // Always populated by defaults. - - return factorySpace( - effects, - effects.attempt(list, ok, nok), - 'linePrefix', - self.parser.constructs.disable.null.includes('codeIndented') - ? undefined - : 4 - )(code) - } -} - -/** - * @type {Tokenizer} - * @this {TokenizeContext} - */ -function tokenizeIndent(effects, ok, nok) { - const self = this - return factorySpace( - effects, - afterPrefix, - 'listItemIndent', - self.containerState.size + 1 - ) - - /** @type {State} */ - function afterPrefix(code) { - const tail = self.events[self.events.length - 1] - return tail && - tail[1].type === 'listItemIndent' && - tail[2].sliceSerialize(tail[1], true).length === self.containerState.size - ? ok(code) - : nok(code) - } -} - -/** - * @type {Exiter} - * @this {TokenizeContext} - */ -function tokenizeListEnd(effects) { - effects.exit(this.containerState.type) -} - -/** - * @type {Tokenizer} - * @this {TokenizeContext} - */ -function tokenizeListItemPrefixWhitespace(effects, ok, nok) { - const self = this - - // Always populated by defaults. - - return factorySpace( - effects, - afterPrefix, - 'listItemPrefixWhitespace', - self.parser.constructs.disable.null.includes('codeIndented') - ? undefined - : 4 + 1 - ) - - /** @type {State} */ - function afterPrefix(code) { - const tail = self.events[self.events.length - 1] - return !markdownSpace(code) && - tail && - tail[1].type === 'listItemPrefixWhitespace' - ? ok(code) - : nok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/block-quote.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').Exiter} Exiter - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const blockQuote = { - name: 'blockQuote', - tokenize: tokenizeBlockQuoteStart, - continuation: { - tokenize: tokenizeBlockQuoteContinuation - }, - exit -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeBlockQuoteStart(effects, ok, nok) { - const self = this - return start - - /** - * Start of block quote. - * - * ```markdown - * > | > a - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - if (code === 62) { - const state = self.containerState - if (!state.open) { - effects.enter('blockQuote', { - _container: true - }) - state.open = true - } - effects.enter('blockQuotePrefix') - effects.enter('blockQuoteMarker') - effects.consume(code) - effects.exit('blockQuoteMarker') - return after - } - return nok(code) - } - - /** - * After `>`, before optional whitespace. - * - * ```markdown - * > | > a - * ^ - * ``` - * - * @type {State} - */ - function after(code) { - if (markdownSpace(code)) { - effects.enter('blockQuotePrefixWhitespace') - effects.consume(code) - effects.exit('blockQuotePrefixWhitespace') - effects.exit('blockQuotePrefix') - return ok - } - effects.exit('blockQuotePrefix') - return ok(code) - } -} - -/** - * Start of block quote continuation. - * - * ```markdown - * | > a - * > | > b - * ^ - * ``` - * - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeBlockQuoteContinuation(effects, ok, nok) { - const self = this - return contStart - - /** - * Start of block quote continuation. - * - * Also used to parse the first block quote opening. - * - * ```markdown - * | > a - * > | > b - * ^ - * ``` - * - * @type {State} - */ - function contStart(code) { - if (markdownSpace(code)) { - // Always populated by defaults. - - return factorySpace( - effects, - contBefore, - 'linePrefix', - self.parser.constructs.disable.null.includes('codeIndented') - ? undefined - : 4 - )(code) - } - return contBefore(code) - } - - /** - * At `>`, after optional whitespace. - * - * Also used to parse the first block quote opening. - * - * ```markdown - * | > a - * > | > b - * ^ - * ``` - * - * @type {State} - */ - function contBefore(code) { - return effects.attempt(blockQuote, ok, nok)(code) - } -} - -/** @type {Exiter} */ -function exit(effects) { - effects.exit('blockQuote') -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-destination/index.js -/** - * @typedef {import('micromark-util-types').Effects} Effects - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenType} TokenType - */ - - -/** - * Parse destinations. - * - * ###### Examples - * - * ```markdown - * - * b> - * - * - * a - * a\)b - * a(b)c - * a(b) - * ``` - * - * @param {Effects} effects - * Context. - * @param {State} ok - * State switched to when successful. - * @param {State} nok - * State switched to when unsuccessful. - * @param {TokenType} type - * Type for whole (`` or `b`). - * @param {TokenType} literalType - * Type when enclosed (``). - * @param {TokenType} literalMarkerType - * Type for enclosing (`<` and `>`). - * @param {TokenType} rawType - * Type when not enclosed (`b`). - * @param {TokenType} stringType - * Type for the value (`a` or `b`). - * @param {number | undefined} [max=Infinity] - * Depth of nested parens (inclusive). - * @returns {State} - * Start state. - */ // eslint-disable-next-line max-params -function factoryDestination( - effects, - ok, - nok, - type, - literalType, - literalMarkerType, - rawType, - stringType, - max -) { - const limit = max || Number.POSITIVE_INFINITY - let balance = 0 - return start - - /** - * Start of destination. - * - * ```markdown - * > | - * ^ - * > | aa - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - if (code === 60) { - effects.enter(type) - effects.enter(literalType) - effects.enter(literalMarkerType) - effects.consume(code) - effects.exit(literalMarkerType) - return enclosedBefore - } - - // ASCII control, space, closing paren. - if (code === null || code === 32 || code === 41 || asciiControl(code)) { - return nok(code) - } - effects.enter(type) - effects.enter(rawType) - effects.enter(stringType) - effects.enter('chunkString', { - contentType: 'string' - }) - return raw(code) - } - - /** - * After `<`, at an enclosed destination. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function enclosedBefore(code) { - if (code === 62) { - effects.enter(literalMarkerType) - effects.consume(code) - effects.exit(literalMarkerType) - effects.exit(literalType) - effects.exit(type) - return ok - } - effects.enter(stringType) - effects.enter('chunkString', { - contentType: 'string' - }) - return enclosed(code) - } - - /** - * In enclosed destination. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function enclosed(code) { - if (code === 62) { - effects.exit('chunkString') - effects.exit(stringType) - return enclosedBefore(code) - } - if (code === null || code === 60 || markdownLineEnding(code)) { - return nok(code) - } - effects.consume(code) - return code === 92 ? enclosedEscape : enclosed - } - - /** - * After `\`, at a special character. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function enclosedEscape(code) { - if (code === 60 || code === 62 || code === 92) { - effects.consume(code) - return enclosed - } - return enclosed(code) - } - - /** - * In raw destination. - * - * ```markdown - * > | aa - * ^ - * ``` - * - * @type {State} - */ - function raw(code) { - if ( - !balance && - (code === null || code === 41 || markdownLineEndingOrSpace(code)) - ) { - effects.exit('chunkString') - effects.exit(stringType) - effects.exit(rawType) - effects.exit(type) - return ok(code) - } - if (balance < limit && code === 40) { - effects.consume(code) - balance++ - return raw - } - if (code === 41) { - effects.consume(code) - balance-- - return raw - } - - // ASCII control (but *not* `\0`) and space and `(`. - // Note: in `markdown-rs`, `\0` exists in codes, in `micromark-js` it - // doesn’t. - if (code === null || code === 32 || code === 40 || asciiControl(code)) { - return nok(code) - } - effects.consume(code) - return code === 92 ? rawEscape : raw - } - - /** - * After `\`, at special character. - * - * ```markdown - * > | a\*a - * ^ - * ``` - * - * @type {State} - */ - function rawEscape(code) { - if (code === 40 || code === 41 || code === 92) { - effects.consume(code) - return raw - } - return raw(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-label/index.js -/** - * @typedef {import('micromark-util-types').Effects} Effects - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').TokenType} TokenType - */ - - -/** - * Parse labels. - * - * > 👉 **Note**: labels in markdown are capped at 999 characters in the string. - * - * ###### Examples - * - * ```markdown - * [a] - * [a - * b] - * [a\]b] - * ``` - * - * @this {TokenizeContext} - * Tokenize context. - * @param {Effects} effects - * Context. - * @param {State} ok - * State switched to when successful. - * @param {State} nok - * State switched to when unsuccessful. - * @param {TokenType} type - * Type of the whole label (`[a]`). - * @param {TokenType} markerType - * Type for the markers (`[` and `]`). - * @param {TokenType} stringType - * Type for the identifier (`a`). - * @returns {State} - * Start state. - */ // eslint-disable-next-line max-params -function factoryLabel(effects, ok, nok, type, markerType, stringType) { - const self = this - let size = 0 - /** @type {boolean} */ - let seen - return start - - /** - * Start of label. - * - * ```markdown - * > | [a] - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter(type) - effects.enter(markerType) - effects.consume(code) - effects.exit(markerType) - effects.enter(stringType) - return atBreak - } - - /** - * In label, at something, before something else. - * - * ```markdown - * > | [a] - * ^ - * ``` - * - * @type {State} - */ - function atBreak(code) { - if ( - size > 999 || - code === null || - code === 91 || - (code === 93 && !seen) || - // To do: remove in the future once we’ve switched from - // `micromark-extension-footnote` to `micromark-extension-gfm-footnote`, - // which doesn’t need this. - // Hidden footnotes hook. - /* c8 ignore next 3 */ - (code === 94 && - !size && - '_hiddenFootnoteSupport' in self.parser.constructs) - ) { - return nok(code) - } - if (code === 93) { - effects.exit(stringType) - effects.enter(markerType) - effects.consume(code) - effects.exit(markerType) - effects.exit(type) - return ok - } - - // To do: indent? Link chunks and EOLs together? - if (markdownLineEnding(code)) { - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return atBreak - } - effects.enter('chunkString', { - contentType: 'string' - }) - return labelInside(code) - } - - /** - * In label, in text. - * - * ```markdown - * > | [a] - * ^ - * ``` - * - * @type {State} - */ - function labelInside(code) { - if ( - code === null || - code === 91 || - code === 93 || - markdownLineEnding(code) || - size++ > 999 - ) { - effects.exit('chunkString') - return atBreak(code) - } - effects.consume(code) - if (!seen) seen = !markdownSpace(code) - return code === 92 ? labelEscape : labelInside - } - - /** - * After `\`, at a special character. - * - * ```markdown - * > | [a\*a] - * ^ - * ``` - * - * @type {State} - */ - function labelEscape(code) { - if (code === 91 || code === 92 || code === 93) { - effects.consume(code) - size++ - return labelInside - } - return labelInside(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-title/index.js -/** - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Effects} Effects - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenType} TokenType - */ - - - -/** - * Parse titles. - * - * ###### Examples - * - * ```markdown - * "a" - * 'b' - * (c) - * "a - * b" - * 'a - * b' - * (a\)b) - * ``` - * - * @param {Effects} effects - * Context. - * @param {State} ok - * State switched to when successful. - * @param {State} nok - * State switched to when unsuccessful. - * @param {TokenType} type - * Type of the whole title (`"a"`, `'b'`, `(c)`). - * @param {TokenType} markerType - * Type for the markers (`"`, `'`, `(`, and `)`). - * @param {TokenType} stringType - * Type for the value (`a`). - * @returns {State} - * Start state. - */ // eslint-disable-next-line max-params -function factoryTitle(effects, ok, nok, type, markerType, stringType) { - /** @type {NonNullable} */ - let marker - return start - - /** - * Start of title. - * - * ```markdown - * > | "a" - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - if (code === 34 || code === 39 || code === 40) { - effects.enter(type) - effects.enter(markerType) - effects.consume(code) - effects.exit(markerType) - marker = code === 40 ? 41 : code - return begin - } - return nok(code) - } - - /** - * After opening marker. - * - * This is also used at the closing marker. - * - * ```markdown - * > | "a" - * ^ - * ``` - * - * @type {State} - */ - function begin(code) { - if (code === marker) { - effects.enter(markerType) - effects.consume(code) - effects.exit(markerType) - effects.exit(type) - return ok - } - effects.enter(stringType) - return atBreak(code) - } - - /** - * At something, before something else. - * - * ```markdown - * > | "a" - * ^ - * ``` - * - * @type {State} - */ - function atBreak(code) { - if (code === marker) { - effects.exit(stringType) - return begin(marker) - } - if (code === null) { - return nok(code) - } - - // Note: blank lines can’t exist in content. - if (markdownLineEnding(code)) { - // To do: use `space_or_tab_eol_with_options`, connect. - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return factorySpace(effects, atBreak, 'linePrefix') - } - effects.enter('chunkString', { - contentType: 'string' - }) - return inside(code) - } - - /** - * - * - * @type {State} - */ - function inside(code) { - if (code === marker || code === null || markdownLineEnding(code)) { - effects.exit('chunkString') - return atBreak(code) - } - effects.consume(code) - return code === 92 ? escape : inside - } - - /** - * After `\`, at a special character. - * - * ```markdown - * > | "a\*b" - * ^ - * ``` - * - * @type {State} - */ - function escape(code) { - if (code === marker || code === 92) { - effects.consume(code) - return inside - } - return inside(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-whitespace/index.js -/** - * @typedef {import('micromark-util-types').Effects} Effects - * @typedef {import('micromark-util-types').State} State - */ - - - -/** - * Parse spaces and tabs. - * - * There is no `nok` parameter: - * - * * line endings or spaces in markdown are often optional, in which case this - * factory can be used and `ok` will be switched to whether spaces were found - * or not - * * one line ending or space can be detected with - * `markdownLineEndingOrSpace(code)` right before using `factoryWhitespace` - * - * @param {Effects} effects - * Context. - * @param {State} ok - * State switched to when successful. - * @returns - * Start state. - */ -function factoryWhitespace(effects, ok) { - /** @type {boolean} */ - let seen - return start - - /** @type {State} */ - function start(code) { - if (markdownLineEnding(code)) { - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - seen = true - return start - } - if (markdownSpace(code)) { - return factorySpace( - effects, - start, - seen ? 'linePrefix' : 'lineSuffix' - )(code) - } - return ok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-normalize-identifier/index.js -/** - * Normalize an identifier (as found in references, definitions). - * - * Collapses markdown whitespace, trim, and then lower- and uppercase. - * - * Some characters are considered “uppercase”, such as U+03F4 (`ϴ`), but if their - * lowercase counterpart (U+03B8 (`θ`)) is uppercased will result in a different - * uppercase character (U+0398 (`Θ`)). - * So, to get a canonical form, we perform both lower- and uppercase. - * - * Using uppercase last makes sure keys will never interact with default - * prototypal values (such as `constructor`): nothing in the prototype of - * `Object` is uppercase. - * - * @param {string} value - * Identifier to normalize. - * @returns {string} - * Normalized identifier. - */ -function normalizeIdentifier(value) { - return ( - value - // Collapse markdown whitespace. - .replace(/[\t\n\r ]+/g, ' ') - // Trim. - .replace(/^ | $/g, '') - // Some characters are considered “uppercase”, but if their lowercase - // counterpart is uppercased will result in a different uppercase - // character. - // Hence, to get that form, we perform both lower- and uppercase. - // Upper case makes sure keys will not interact with default prototypal - // methods: no method is uppercase. - .toLowerCase() - .toUpperCase() - ) -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/definition.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - - - - - - -/** @type {Construct} */ -const definition = { - name: 'definition', - tokenize: tokenizeDefinition -} - -/** @type {Construct} */ -const titleBefore = { - tokenize: tokenizeTitleBefore, - partial: true -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeDefinition(effects, ok, nok) { - const self = this - /** @type {string} */ - let identifier - return start - - /** - * At start of a definition. - * - * ```markdown - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - // Do not interrupt paragraphs (but do follow definitions). - // To do: do `interrupt` the way `markdown-rs` does. - // To do: parse whitespace the way `markdown-rs` does. - effects.enter('definition') - return before(code) - } - - /** - * After optional whitespace, at `[`. - * - * ```markdown - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function before(code) { - // To do: parse whitespace the way `markdown-rs` does. - - return factoryLabel.call( - self, - effects, - labelAfter, - // Note: we don’t need to reset the way `markdown-rs` does. - nok, - 'definitionLabel', - 'definitionLabelMarker', - 'definitionLabelString' - )(code) - } - - /** - * After label. - * - * ```markdown - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function labelAfter(code) { - identifier = normalizeIdentifier( - self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1) - ) - if (code === 58) { - effects.enter('definitionMarker') - effects.consume(code) - effects.exit('definitionMarker') - return markerAfter - } - return nok(code) - } - - /** - * After marker. - * - * ```markdown - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function markerAfter(code) { - // Note: whitespace is optional. - return markdownLineEndingOrSpace(code) - ? factoryWhitespace(effects, destinationBefore)(code) - : destinationBefore(code) - } - - /** - * Before destination. - * - * ```markdown - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function destinationBefore(code) { - return factoryDestination( - effects, - destinationAfter, - // Note: we don’t need to reset the way `markdown-rs` does. - nok, - 'definitionDestination', - 'definitionDestinationLiteral', - 'definitionDestinationLiteralMarker', - 'definitionDestinationRaw', - 'definitionDestinationString' - )(code) - } - - /** - * After destination. - * - * ```markdown - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function destinationAfter(code) { - return effects.attempt(titleBefore, after, after)(code) - } - - /** - * After definition. - * - * ```markdown - * > | [a]: b - * ^ - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function after(code) { - return markdownSpace(code) - ? factorySpace(effects, afterWhitespace, 'whitespace')(code) - : afterWhitespace(code) - } - - /** - * After definition, after optional whitespace. - * - * ```markdown - * > | [a]: b - * ^ - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function afterWhitespace(code) { - if (code === null || markdownLineEnding(code)) { - effects.exit('definition') - - // Note: we don’t care about uniqueness. - // It’s likely that that doesn’t happen very frequently. - // It is more likely that it wastes precious time. - self.parser.defined.push(identifier) - - // To do: `markdown-rs` interrupt. - // // You’d be interrupting. - // tokenizer.interrupt = true - return ok(code) - } - return nok(code) - } -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeTitleBefore(effects, ok, nok) { - return titleBefore - - /** - * After destination, at whitespace. - * - * ```markdown - * > | [a]: b - * ^ - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function titleBefore(code) { - return markdownLineEndingOrSpace(code) - ? factoryWhitespace(effects, beforeMarker)(code) - : nok(code) - } - - /** - * At title. - * - * ```markdown - * | [a]: b - * > | "c" - * ^ - * ``` - * - * @type {State} - */ - function beforeMarker(code) { - return factoryTitle( - effects, - titleAfter, - nok, - 'definitionTitle', - 'definitionTitleMarker', - 'definitionTitleString' - )(code) - } - - /** - * After title. - * - * ```markdown - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function titleAfter(code) { - return markdownSpace(code) - ? factorySpace(effects, titleAfterOptionalWhitespace, 'whitespace')(code) - : titleAfterOptionalWhitespace(code) - } - - /** - * After title, after optional whitespace. - * - * ```markdown - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function titleAfterOptionalWhitespace(code) { - return code === null || markdownLineEnding(code) ? ok(code) : nok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/code-indented.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const codeIndented = { - name: 'codeIndented', - tokenize: tokenizeCodeIndented -} - -/** @type {Construct} */ -const furtherStart = { - tokenize: tokenizeFurtherStart, - partial: true -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeCodeIndented(effects, ok, nok) { - const self = this - return start - - /** - * Start of code (indented). - * - * > **Parsing note**: it is not needed to check if this first line is a - * > filled line (that it has a non-whitespace character), because blank lines - * > are parsed already, so we never run into that. - * - * ```markdown - * > | aaa - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - // To do: manually check if interrupting like `markdown-rs`. - - effects.enter('codeIndented') - // To do: use an improved `space_or_tab` function like `markdown-rs`, - // so that we can drop the next state. - return factorySpace(effects, afterPrefix, 'linePrefix', 4 + 1)(code) - } - - /** - * At start, after 1 or 4 spaces. - * - * ```markdown - * > | aaa - * ^ - * ``` - * - * @type {State} - */ - function afterPrefix(code) { - const tail = self.events[self.events.length - 1] - return tail && - tail[1].type === 'linePrefix' && - tail[2].sliceSerialize(tail[1], true).length >= 4 - ? atBreak(code) - : nok(code) - } - - /** - * At a break. - * - * ```markdown - * > | aaa - * ^ ^ - * ``` - * - * @type {State} - */ - function atBreak(code) { - if (code === null) { - return after(code) - } - if (markdownLineEnding(code)) { - return effects.attempt(furtherStart, atBreak, after)(code) - } - effects.enter('codeFlowValue') - return inside(code) - } - - /** - * In code content. - * - * ```markdown - * > | aaa - * ^^^^ - * ``` - * - * @type {State} - */ - function inside(code) { - if (code === null || markdownLineEnding(code)) { - effects.exit('codeFlowValue') - return atBreak(code) - } - effects.consume(code) - return inside - } - - /** @type {State} */ - function after(code) { - effects.exit('codeIndented') - // To do: allow interrupting like `markdown-rs`. - // Feel free to interrupt. - // tokenizer.interrupt = false - return ok(code) - } -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeFurtherStart(effects, ok, nok) { - const self = this - return furtherStart - - /** - * At eol, trying to parse another indent. - * - * ```markdown - * > | aaa - * ^ - * | bbb - * ``` - * - * @type {State} - */ - function furtherStart(code) { - // To do: improve `lazy` / `pierce` handling. - // If this is a lazy line, it can’t be code. - if (self.parser.lazy[self.now().line]) { - return nok(code) - } - if (markdownLineEnding(code)) { - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return furtherStart - } - - // To do: the code here in `micromark-js` is a bit different from - // `markdown-rs` because there it can attempt spaces. - // We can’t yet. - // - // To do: use an improved `space_or_tab` function like `markdown-rs`, - // so that we can drop the next state. - return factorySpace(effects, afterPrefix, 'linePrefix', 4 + 1)(code) - } - - /** - * At start, after 1 or 4 spaces. - * - * ```markdown - * > | aaa - * ^ - * ``` - * - * @type {State} - */ - function afterPrefix(code) { - const tail = self.events[self.events.length - 1] - return tail && - tail[1].type === 'linePrefix' && - tail[2].sliceSerialize(tail[1], true).length >= 4 - ? ok(code) - : markdownLineEnding(code) - ? furtherStart(code) - : nok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/heading-atx.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').Resolver} Resolver - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').Token} Token - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - - -/** @type {Construct} */ -const headingAtx = { - name: 'headingAtx', - tokenize: tokenizeHeadingAtx, - resolve: resolveHeadingAtx -} - -/** @type {Resolver} */ -function resolveHeadingAtx(events, context) { - let contentEnd = events.length - 2 - let contentStart = 3 - /** @type {Token} */ - let content - /** @type {Token} */ - let text - - // Prefix whitespace, part of the opening. - if (events[contentStart][1].type === 'whitespace') { - contentStart += 2 - } - - // Suffix whitespace, part of the closing. - if ( - contentEnd - 2 > contentStart && - events[contentEnd][1].type === 'whitespace' - ) { - contentEnd -= 2 - } - if ( - events[contentEnd][1].type === 'atxHeadingSequence' && - (contentStart === contentEnd - 1 || - (contentEnd - 4 > contentStart && - events[contentEnd - 2][1].type === 'whitespace')) - ) { - contentEnd -= contentStart + 1 === contentEnd ? 2 : 4 - } - if (contentEnd > contentStart) { - content = { - type: 'atxHeadingText', - start: events[contentStart][1].start, - end: events[contentEnd][1].end - } - text = { - type: 'chunkText', - start: events[contentStart][1].start, - end: events[contentEnd][1].end, - contentType: 'text' - } - splice(events, contentStart, contentEnd - contentStart + 1, [ - ['enter', content, context], - ['enter', text, context], - ['exit', text, context], - ['exit', content, context] - ]) - } - return events -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeHeadingAtx(effects, ok, nok) { - let size = 0 - return start - - /** - * Start of a heading (atx). - * - * ```markdown - * > | ## aa - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - // To do: parse indent like `markdown-rs`. - effects.enter('atxHeading') - return before(code) - } - - /** - * After optional whitespace, at `#`. - * - * ```markdown - * > | ## aa - * ^ - * ``` - * - * @type {State} - */ - function before(code) { - effects.enter('atxHeadingSequence') - return sequenceOpen(code) - } - - /** - * In opening sequence. - * - * ```markdown - * > | ## aa - * ^ - * ``` - * - * @type {State} - */ - function sequenceOpen(code) { - if (code === 35 && size++ < 6) { - effects.consume(code) - return sequenceOpen - } - - // Always at least one `#`. - if (code === null || markdownLineEndingOrSpace(code)) { - effects.exit('atxHeadingSequence') - return atBreak(code) - } - return nok(code) - } - - /** - * After something, before something else. - * - * ```markdown - * > | ## aa - * ^ - * ``` - * - * @type {State} - */ - function atBreak(code) { - if (code === 35) { - effects.enter('atxHeadingSequence') - return sequenceFurther(code) - } - if (code === null || markdownLineEnding(code)) { - effects.exit('atxHeading') - // To do: interrupt like `markdown-rs`. - // // Feel free to interrupt. - // tokenizer.interrupt = false - return ok(code) - } - if (markdownSpace(code)) { - return factorySpace(effects, atBreak, 'whitespace')(code) - } - - // To do: generate `data` tokens, add the `text` token later. - // Needs edit map, see: `markdown.rs`. - effects.enter('atxHeadingText') - return data(code) - } - - /** - * In further sequence (after whitespace). - * - * Could be normal “visible” hashes in the heading or a final sequence. - * - * ```markdown - * > | ## aa ## - * ^ - * ``` - * - * @type {State} - */ - function sequenceFurther(code) { - if (code === 35) { - effects.consume(code) - return sequenceFurther - } - effects.exit('atxHeadingSequence') - return atBreak(code) - } - - /** - * In text. - * - * ```markdown - * > | ## aa - * ^ - * ``` - * - * @type {State} - */ - function data(code) { - if (code === null || code === 35 || markdownLineEndingOrSpace(code)) { - effects.exit('atxHeadingText') - return atBreak(code) - } - effects.consume(code) - return data - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/setext-underline.js -/** - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').Resolver} Resolver - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const setextUnderline = { - name: 'setextUnderline', - tokenize: tokenizeSetextUnderline, - resolveTo: resolveToSetextUnderline -} - -/** @type {Resolver} */ -function resolveToSetextUnderline(events, context) { - // To do: resolve like `markdown-rs`. - let index = events.length - /** @type {number | undefined} */ - let content - /** @type {number | undefined} */ - let text - /** @type {number | undefined} */ - let definition - - // Find the opening of the content. - // It’ll always exist: we don’t tokenize if it isn’t there. - while (index--) { - if (events[index][0] === 'enter') { - if (events[index][1].type === 'content') { - content = index - break - } - if (events[index][1].type === 'paragraph') { - text = index - } - } - // Exit - else { - if (events[index][1].type === 'content') { - // Remove the content end (if needed we’ll add it later) - events.splice(index, 1) - } - if (!definition && events[index][1].type === 'definition') { - definition = index - } - } - } - const heading = { - type: 'setextHeading', - start: Object.assign({}, events[text][1].start), - end: Object.assign({}, events[events.length - 1][1].end) - } - - // Change the paragraph to setext heading text. - events[text][1].type = 'setextHeadingText' - - // If we have definitions in the content, we’ll keep on having content, - // but we need move it. - if (definition) { - events.splice(text, 0, ['enter', heading, context]) - events.splice(definition + 1, 0, ['exit', events[content][1], context]) - events[content][1].end = Object.assign({}, events[definition][1].end) - } else { - events[content][1] = heading - } - - // Add the heading exit at the end. - events.push(['exit', heading, context]) - return events -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeSetextUnderline(effects, ok, nok) { - const self = this - /** @type {NonNullable} */ - let marker - return start - - /** - * At start of heading (setext) underline. - * - * ```markdown - * | aa - * > | == - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - let index = self.events.length - /** @type {boolean | undefined} */ - let paragraph - // Find an opening. - while (index--) { - // Skip enter/exit of line ending, line prefix, and content. - // We can now either have a definition or a paragraph. - if ( - self.events[index][1].type !== 'lineEnding' && - self.events[index][1].type !== 'linePrefix' && - self.events[index][1].type !== 'content' - ) { - paragraph = self.events[index][1].type === 'paragraph' - break - } - } - - // To do: handle lazy/pierce like `markdown-rs`. - // To do: parse indent like `markdown-rs`. - if (!self.parser.lazy[self.now().line] && (self.interrupt || paragraph)) { - effects.enter('setextHeadingLine') - marker = code - return before(code) - } - return nok(code) - } - - /** - * After optional whitespace, at `-` or `=`. - * - * ```markdown - * | aa - * > | == - * ^ - * ``` - * - * @type {State} - */ - function before(code) { - effects.enter('setextHeadingLineSequence') - return inside(code) - } - - /** - * In sequence. - * - * ```markdown - * | aa - * > | == - * ^ - * ``` - * - * @type {State} - */ - function inside(code) { - if (code === marker) { - effects.consume(code) - return inside - } - effects.exit('setextHeadingLineSequence') - return markdownSpace(code) - ? factorySpace(effects, after, 'lineSuffix')(code) - : after(code) - } - - /** - * After sequence, after optional whitespace. - * - * ```markdown - * | aa - * > | == - * ^ - * ``` - * - * @type {State} - */ - function after(code) { - if (code === null || markdownLineEnding(code)) { - effects.exit('setextHeadingLine') - return ok(code) - } - return nok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-html-tag-name/index.js -/** - * List of lowercase HTML “block” tag names. - * - * The list, when parsing HTML (flow), results in more relaxed rules (condition - * 6). - * Because they are known blocks, the HTML-like syntax doesn’t have to be - * strictly parsed. - * For tag names not in this list, a more strict algorithm (condition 7) is used - * to detect whether the HTML-like syntax is seen as HTML (flow) or not. - * - * This is copied from: - * . - * - * > 👉 **Note**: `search` was added in `CommonMark@0.31`. - */ -const htmlBlockNames = [ - 'address', - 'article', - 'aside', - 'base', - 'basefont', - 'blockquote', - 'body', - 'caption', - 'center', - 'col', - 'colgroup', - 'dd', - 'details', - 'dialog', - 'dir', - 'div', - 'dl', - 'dt', - 'fieldset', - 'figcaption', - 'figure', - 'footer', - 'form', - 'frame', - 'frameset', - 'h1', - 'h2', - 'h3', - 'h4', - 'h5', - 'h6', - 'head', - 'header', - 'hr', - 'html', - 'iframe', - 'legend', - 'li', - 'link', - 'main', - 'menu', - 'menuitem', - 'nav', - 'noframes', - 'ol', - 'optgroup', - 'option', - 'p', - 'param', - 'search', - 'section', - 'summary', - 'table', - 'tbody', - 'td', - 'tfoot', - 'th', - 'thead', - 'title', - 'tr', - 'track', - 'ul' -] - -/** - * List of lowercase HTML “raw” tag names. - * - * The list, when parsing HTML (flow), results in HTML that can include lines - * without exiting, until a closing tag also in this list is found (condition - * 1). - * - * This module is copied from: - * . - * - * > 👉 **Note**: `textarea` was added in `CommonMark@0.30`. - */ -const htmlRawNames = ['pre', 'script', 'style', 'textarea'] - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/html-flow.js -/** - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').Resolver} Resolver - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - - - -/** @type {Construct} */ -const htmlFlow = { - name: 'htmlFlow', - tokenize: tokenizeHtmlFlow, - resolveTo: resolveToHtmlFlow, - concrete: true -} - -/** @type {Construct} */ -const blankLineBefore = { - tokenize: tokenizeBlankLineBefore, - partial: true -} -const nonLazyContinuationStart = { - tokenize: tokenizeNonLazyContinuationStart, - partial: true -} - -/** @type {Resolver} */ -function resolveToHtmlFlow(events) { - let index = events.length - while (index--) { - if (events[index][0] === 'enter' && events[index][1].type === 'htmlFlow') { - break - } - } - if (index > 1 && events[index - 2][1].type === 'linePrefix') { - // Add the prefix start to the HTML token. - events[index][1].start = events[index - 2][1].start - // Add the prefix start to the HTML line token. - events[index + 1][1].start = events[index - 2][1].start - // Remove the line prefix. - events.splice(index - 2, 2) - } - return events -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeHtmlFlow(effects, ok, nok) { - const self = this - /** @type {number} */ - let marker - /** @type {boolean} */ - let closingTag - /** @type {string} */ - let buffer - /** @type {number} */ - let index - /** @type {Code} */ - let markerB - return start - - /** - * Start of HTML (flow). - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - // To do: parse indent like `markdown-rs`. - return before(code) - } - - /** - * At `<`, after optional whitespace. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function before(code) { - effects.enter('htmlFlow') - effects.enter('htmlFlowData') - effects.consume(code) - return open - } - - /** - * After `<`, at tag name or other stuff. - * - * ```markdown - * > | - * ^ - * > | - * ^ - * > | - * ^ - * ``` - * - * @type {State} - */ - function open(code) { - if (code === 33) { - effects.consume(code) - return declarationOpen - } - if (code === 47) { - effects.consume(code) - closingTag = true - return tagCloseStart - } - if (code === 63) { - effects.consume(code) - marker = 3 - // To do: - // tokenizer.concrete = true - // To do: use `markdown-rs` style interrupt. - // While we’re in an instruction instead of a declaration, we’re on a `?` - // right now, so we do need to search for `>`, similar to declarations. - return self.interrupt ? ok : continuationDeclarationInside - } - - // ASCII alphabetical. - if (asciiAlpha(code)) { - effects.consume(code) - // @ts-expect-error: not null. - buffer = String.fromCharCode(code) - return tagName - } - return nok(code) - } - - /** - * After ` | - * ^ - * > | - * ^ - * > | &<]]> - * ^ - * ``` - * - * @type {State} - */ - function declarationOpen(code) { - if (code === 45) { - effects.consume(code) - marker = 2 - return commentOpenInside - } - if (code === 91) { - effects.consume(code) - marker = 5 - index = 0 - return cdataOpenInside - } - - // ASCII alphabetical. - if (asciiAlpha(code)) { - effects.consume(code) - marker = 4 - // // Do not form containers. - // tokenizer.concrete = true - return self.interrupt ? ok : continuationDeclarationInside - } - return nok(code) - } - - /** - * After ` | - * ^ - * ``` - * - * @type {State} - */ - function commentOpenInside(code) { - if (code === 45) { - effects.consume(code) - // // Do not form containers. - // tokenizer.concrete = true - return self.interrupt ? ok : continuationDeclarationInside - } - return nok(code) - } - - /** - * After ` | &<]]> - * ^^^^^^ - * ``` - * - * @type {State} - */ - function cdataOpenInside(code) { - const value = 'CDATA[' - if (code === value.charCodeAt(index++)) { - effects.consume(code) - if (index === value.length) { - // // Do not form containers. - // tokenizer.concrete = true - return self.interrupt ? ok : continuation - } - return cdataOpenInside - } - return nok(code) - } - - /** - * After ` | - * ^ - * ``` - * - * @type {State} - */ - function tagCloseStart(code) { - if (asciiAlpha(code)) { - effects.consume(code) - // @ts-expect-error: not null. - buffer = String.fromCharCode(code) - return tagName - } - return nok(code) - } - - /** - * In tag name. - * - * ```markdown - * > | - * ^^ - * > | - * ^^ - * ``` - * - * @type {State} - */ - function tagName(code) { - if ( - code === null || - code === 47 || - code === 62 || - markdownLineEndingOrSpace(code) - ) { - const slash = code === 47 - const name = buffer.toLowerCase() - if (!slash && !closingTag && htmlRawNames.includes(name)) { - marker = 1 - // // Do not form containers. - // tokenizer.concrete = true - return self.interrupt ? ok(code) : continuation(code) - } - if (htmlBlockNames.includes(buffer.toLowerCase())) { - marker = 6 - if (slash) { - effects.consume(code) - return basicSelfClosing - } - - // // Do not form containers. - // tokenizer.concrete = true - return self.interrupt ? ok(code) : continuation(code) - } - marker = 7 - // Do not support complete HTML when interrupting. - return self.interrupt && !self.parser.lazy[self.now().line] - ? nok(code) - : closingTag - ? completeClosingTagAfter(code) - : completeAttributeNameBefore(code) - } - - // ASCII alphanumerical and `-`. - if (code === 45 || asciiAlphanumeric(code)) { - effects.consume(code) - buffer += String.fromCharCode(code) - return tagName - } - return nok(code) - } - - /** - * After closing slash of a basic tag name. - * - * ```markdown - * > |
    - * ^ - * ``` - * - * @type {State} - */ - function basicSelfClosing(code) { - if (code === 62) { - effects.consume(code) - // // Do not form containers. - // tokenizer.concrete = true - return self.interrupt ? ok : continuation - } - return nok(code) - } - - /** - * After closing slash of a complete tag name. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function completeClosingTagAfter(code) { - if (markdownSpace(code)) { - effects.consume(code) - return completeClosingTagAfter - } - return completeEnd(code) - } - - /** - * At an attribute name. - * - * At first, this state is used after a complete tag name, after whitespace, - * where it expects optional attributes or the end of the tag. - * It is also reused after attributes, when expecting more optional - * attributes. - * - * ```markdown - * > | - * ^ - * > | - * ^ - * > | - * ^ - * > | - * ^ - * > | - * ^ - * ``` - * - * @type {State} - */ - function completeAttributeNameBefore(code) { - if (code === 47) { - effects.consume(code) - return completeEnd - } - - // ASCII alphanumerical and `:` and `_`. - if (code === 58 || code === 95 || asciiAlpha(code)) { - effects.consume(code) - return completeAttributeName - } - if (markdownSpace(code)) { - effects.consume(code) - return completeAttributeNameBefore - } - return completeEnd(code) - } - - /** - * In attribute name. - * - * ```markdown - * > | - * ^ - * > | - * ^ - * > | - * ^ - * ``` - * - * @type {State} - */ - function completeAttributeName(code) { - // ASCII alphanumerical and `-`, `.`, `:`, and `_`. - if ( - code === 45 || - code === 46 || - code === 58 || - code === 95 || - asciiAlphanumeric(code) - ) { - effects.consume(code) - return completeAttributeName - } - return completeAttributeNameAfter(code) - } - - /** - * After attribute name, at an optional initializer, the end of the tag, or - * whitespace. - * - * ```markdown - * > | - * ^ - * > | - * ^ - * ``` - * - * @type {State} - */ - function completeAttributeNameAfter(code) { - if (code === 61) { - effects.consume(code) - return completeAttributeValueBefore - } - if (markdownSpace(code)) { - effects.consume(code) - return completeAttributeNameAfter - } - return completeAttributeNameBefore(code) - } - - /** - * Before unquoted, double quoted, or single quoted attribute value, allowing - * whitespace. - * - * ```markdown - * > | - * ^ - * > | - * ^ - * ``` - * - * @type {State} - */ - function completeAttributeValueBefore(code) { - if ( - code === null || - code === 60 || - code === 61 || - code === 62 || - code === 96 - ) { - return nok(code) - } - if (code === 34 || code === 39) { - effects.consume(code) - markerB = code - return completeAttributeValueQuoted - } - if (markdownSpace(code)) { - effects.consume(code) - return completeAttributeValueBefore - } - return completeAttributeValueUnquoted(code) - } - - /** - * In double or single quoted attribute value. - * - * ```markdown - * > | - * ^ - * > | - * ^ - * ``` - * - * @type {State} - */ - function completeAttributeValueQuoted(code) { - if (code === markerB) { - effects.consume(code) - markerB = null - return completeAttributeValueQuotedAfter - } - if (code === null || markdownLineEnding(code)) { - return nok(code) - } - effects.consume(code) - return completeAttributeValueQuoted - } - - /** - * In unquoted attribute value. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function completeAttributeValueUnquoted(code) { - if ( - code === null || - code === 34 || - code === 39 || - code === 47 || - code === 60 || - code === 61 || - code === 62 || - code === 96 || - markdownLineEndingOrSpace(code) - ) { - return completeAttributeNameAfter(code) - } - effects.consume(code) - return completeAttributeValueUnquoted - } - - /** - * After double or single quoted attribute value, before whitespace or the - * end of the tag. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function completeAttributeValueQuotedAfter(code) { - if (code === 47 || code === 62 || markdownSpace(code)) { - return completeAttributeNameBefore(code) - } - return nok(code) - } - - /** - * In certain circumstances of a complete tag where only an `>` is allowed. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function completeEnd(code) { - if (code === 62) { - effects.consume(code) - return completeAfter - } - return nok(code) - } - - /** - * After `>` in a complete tag. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function completeAfter(code) { - if (code === null || markdownLineEnding(code)) { - // // Do not form containers. - // tokenizer.concrete = true - return continuation(code) - } - if (markdownSpace(code)) { - effects.consume(code) - return completeAfter - } - return nok(code) - } - - /** - * In continuation of any HTML kind. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function continuation(code) { - if (code === 45 && marker === 2) { - effects.consume(code) - return continuationCommentInside - } - if (code === 60 && marker === 1) { - effects.consume(code) - return continuationRawTagOpen - } - if (code === 62 && marker === 4) { - effects.consume(code) - return continuationClose - } - if (code === 63 && marker === 3) { - effects.consume(code) - return continuationDeclarationInside - } - if (code === 93 && marker === 5) { - effects.consume(code) - return continuationCdataInside - } - if (markdownLineEnding(code) && (marker === 6 || marker === 7)) { - effects.exit('htmlFlowData') - return effects.check( - blankLineBefore, - continuationAfter, - continuationStart - )(code) - } - if (code === null || markdownLineEnding(code)) { - effects.exit('htmlFlowData') - return continuationStart(code) - } - effects.consume(code) - return continuation - } - - /** - * In continuation, at eol. - * - * ```markdown - * > | - * ^ - * | asd - * ``` - * - * @type {State} - */ - function continuationStart(code) { - return effects.check( - nonLazyContinuationStart, - continuationStartNonLazy, - continuationAfter - )(code) - } - - /** - * In continuation, at eol, before non-lazy content. - * - * ```markdown - * > | - * ^ - * | asd - * ``` - * - * @type {State} - */ - function continuationStartNonLazy(code) { - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return continuationBefore - } - - /** - * In continuation, before non-lazy content. - * - * ```markdown - * | - * > | asd - * ^ - * ``` - * - * @type {State} - */ - function continuationBefore(code) { - if (code === null || markdownLineEnding(code)) { - return continuationStart(code) - } - effects.enter('htmlFlowData') - return continuation(code) - } - - /** - * In comment continuation, after one `-`, expecting another. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function continuationCommentInside(code) { - if (code === 45) { - effects.consume(code) - return continuationDeclarationInside - } - return continuation(code) - } - - /** - * In raw continuation, after `<`, at `/`. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function continuationRawTagOpen(code) { - if (code === 47) { - effects.consume(code) - buffer = '' - return continuationRawEndTag - } - return continuation(code) - } - - /** - * In raw continuation, after ` | - * ^^^^^^ - * ``` - * - * @type {State} - */ - function continuationRawEndTag(code) { - if (code === 62) { - const name = buffer.toLowerCase() - if (htmlRawNames.includes(name)) { - effects.consume(code) - return continuationClose - } - return continuation(code) - } - if (asciiAlpha(code) && buffer.length < 8) { - effects.consume(code) - // @ts-expect-error: not null. - buffer += String.fromCharCode(code) - return continuationRawEndTag - } - return continuation(code) - } - - /** - * In cdata continuation, after `]`, expecting `]>`. - * - * ```markdown - * > | &<]]> - * ^ - * ``` - * - * @type {State} - */ - function continuationCdataInside(code) { - if (code === 93) { - effects.consume(code) - return continuationDeclarationInside - } - return continuation(code) - } - - /** - * In declaration or instruction continuation, at `>`. - * - * ```markdown - * > | - * ^ - * > | - * ^ - * > | - * ^ - * > | - * ^ - * > | &<]]> - * ^ - * ``` - * - * @type {State} - */ - function continuationDeclarationInside(code) { - if (code === 62) { - effects.consume(code) - return continuationClose - } - - // More dashes. - if (code === 45 && marker === 2) { - effects.consume(code) - return continuationDeclarationInside - } - return continuation(code) - } - - /** - * In closed continuation: everything we get until the eol/eof is part of it. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function continuationClose(code) { - if (code === null || markdownLineEnding(code)) { - effects.exit('htmlFlowData') - return continuationAfter(code) - } - effects.consume(code) - return continuationClose - } - - /** - * Done. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function continuationAfter(code) { - effects.exit('htmlFlow') - // // Feel free to interrupt. - // tokenizer.interrupt = false - // // No longer concrete. - // tokenizer.concrete = false - return ok(code) - } -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeNonLazyContinuationStart(effects, ok, nok) { - const self = this - return start - - /** - * At eol, before continuation. - * - * ```markdown - * > | * ```js - * ^ - * | b - * ``` - * - * @type {State} - */ - function start(code) { - if (markdownLineEnding(code)) { - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return after - } - return nok(code) - } - - /** - * A continuation. - * - * ```markdown - * | * ```js - * > | b - * ^ - * ``` - * - * @type {State} - */ - function after(code) { - return self.parser.lazy[self.now().line] ? nok(code) : ok(code) - } -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeBlankLineBefore(effects, ok, nok) { - return start - - /** - * Before eol, expecting blank line. - * - * ```markdown - * > |
    - * ^ - * | - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return effects.attempt(blankLine, ok, nok) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/code-fenced.js -/** - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const nonLazyContinuation = { - tokenize: tokenizeNonLazyContinuation, - partial: true -} - -/** @type {Construct} */ -const codeFenced = { - name: 'codeFenced', - tokenize: tokenizeCodeFenced, - concrete: true -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeCodeFenced(effects, ok, nok) { - const self = this - /** @type {Construct} */ - const closeStart = { - tokenize: tokenizeCloseStart, - partial: true - } - let initialPrefix = 0 - let sizeOpen = 0 - /** @type {NonNullable} */ - let marker - return start - - /** - * Start of code. - * - * ```markdown - * > | ~~~js - * ^ - * | alert(1) - * | ~~~ - * ``` - * - * @type {State} - */ - function start(code) { - // To do: parse whitespace like `markdown-rs`. - return beforeSequenceOpen(code) - } - - /** - * In opening fence, after prefix, at sequence. - * - * ```markdown - * > | ~~~js - * ^ - * | alert(1) - * | ~~~ - * ``` - * - * @type {State} - */ - function beforeSequenceOpen(code) { - const tail = self.events[self.events.length - 1] - initialPrefix = - tail && tail[1].type === 'linePrefix' - ? tail[2].sliceSerialize(tail[1], true).length - : 0 - marker = code - effects.enter('codeFenced') - effects.enter('codeFencedFence') - effects.enter('codeFencedFenceSequence') - return sequenceOpen(code) - } - - /** - * In opening fence sequence. - * - * ```markdown - * > | ~~~js - * ^ - * | alert(1) - * | ~~~ - * ``` - * - * @type {State} - */ - function sequenceOpen(code) { - if (code === marker) { - sizeOpen++ - effects.consume(code) - return sequenceOpen - } - if (sizeOpen < 3) { - return nok(code) - } - effects.exit('codeFencedFenceSequence') - return markdownSpace(code) - ? factorySpace(effects, infoBefore, 'whitespace')(code) - : infoBefore(code) - } - - /** - * In opening fence, after the sequence (and optional whitespace), before info. - * - * ```markdown - * > | ~~~js - * ^ - * | alert(1) - * | ~~~ - * ``` - * - * @type {State} - */ - function infoBefore(code) { - if (code === null || markdownLineEnding(code)) { - effects.exit('codeFencedFence') - return self.interrupt - ? ok(code) - : effects.check(nonLazyContinuation, atNonLazyBreak, after)(code) - } - effects.enter('codeFencedFenceInfo') - effects.enter('chunkString', { - contentType: 'string' - }) - return info(code) - } - - /** - * In info. - * - * ```markdown - * > | ~~~js - * ^ - * | alert(1) - * | ~~~ - * ``` - * - * @type {State} - */ - function info(code) { - if (code === null || markdownLineEnding(code)) { - effects.exit('chunkString') - effects.exit('codeFencedFenceInfo') - return infoBefore(code) - } - if (markdownSpace(code)) { - effects.exit('chunkString') - effects.exit('codeFencedFenceInfo') - return factorySpace(effects, metaBefore, 'whitespace')(code) - } - if (code === 96 && code === marker) { - return nok(code) - } - effects.consume(code) - return info - } - - /** - * In opening fence, after info and whitespace, before meta. - * - * ```markdown - * > | ~~~js eval - * ^ - * | alert(1) - * | ~~~ - * ``` - * - * @type {State} - */ - function metaBefore(code) { - if (code === null || markdownLineEnding(code)) { - return infoBefore(code) - } - effects.enter('codeFencedFenceMeta') - effects.enter('chunkString', { - contentType: 'string' - }) - return meta(code) - } - - /** - * In meta. - * - * ```markdown - * > | ~~~js eval - * ^ - * | alert(1) - * | ~~~ - * ``` - * - * @type {State} - */ - function meta(code) { - if (code === null || markdownLineEnding(code)) { - effects.exit('chunkString') - effects.exit('codeFencedFenceMeta') - return infoBefore(code) - } - if (code === 96 && code === marker) { - return nok(code) - } - effects.consume(code) - return meta - } - - /** - * At eol/eof in code, before a non-lazy closing fence or content. - * - * ```markdown - * > | ~~~js - * ^ - * > | alert(1) - * ^ - * | ~~~ - * ``` - * - * @type {State} - */ - function atNonLazyBreak(code) { - return effects.attempt(closeStart, after, contentBefore)(code) - } - - /** - * Before code content, not a closing fence, at eol. - * - * ```markdown - * | ~~~js - * > | alert(1) - * ^ - * | ~~~ - * ``` - * - * @type {State} - */ - function contentBefore(code) { - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return contentStart - } - - /** - * Before code content, not a closing fence. - * - * ```markdown - * | ~~~js - * > | alert(1) - * ^ - * | ~~~ - * ``` - * - * @type {State} - */ - function contentStart(code) { - return initialPrefix > 0 && markdownSpace(code) - ? factorySpace( - effects, - beforeContentChunk, - 'linePrefix', - initialPrefix + 1 - )(code) - : beforeContentChunk(code) - } - - /** - * Before code content, after optional prefix. - * - * ```markdown - * | ~~~js - * > | alert(1) - * ^ - * | ~~~ - * ``` - * - * @type {State} - */ - function beforeContentChunk(code) { - if (code === null || markdownLineEnding(code)) { - return effects.check(nonLazyContinuation, atNonLazyBreak, after)(code) - } - effects.enter('codeFlowValue') - return contentChunk(code) - } - - /** - * In code content. - * - * ```markdown - * | ~~~js - * > | alert(1) - * ^^^^^^^^ - * | ~~~ - * ``` - * - * @type {State} - */ - function contentChunk(code) { - if (code === null || markdownLineEnding(code)) { - effects.exit('codeFlowValue') - return beforeContentChunk(code) - } - effects.consume(code) - return contentChunk - } - - /** - * After code. - * - * ```markdown - * | ~~~js - * | alert(1) - * > | ~~~ - * ^ - * ``` - * - * @type {State} - */ - function after(code) { - effects.exit('codeFenced') - return ok(code) - } - - /** - * @this {TokenizeContext} - * @type {Tokenizer} - */ - function tokenizeCloseStart(effects, ok, nok) { - let size = 0 - return startBefore - - /** - * - * - * @type {State} - */ - function startBefore(code) { - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return start - } - - /** - * Before closing fence, at optional whitespace. - * - * ```markdown - * | ~~~js - * | alert(1) - * > | ~~~ - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - // Always populated by defaults. - - // To do: `enter` here or in next state? - effects.enter('codeFencedFence') - return markdownSpace(code) - ? factorySpace( - effects, - beforeSequenceClose, - 'linePrefix', - self.parser.constructs.disable.null.includes('codeIndented') - ? undefined - : 4 - )(code) - : beforeSequenceClose(code) - } - - /** - * In closing fence, after optional whitespace, at sequence. - * - * ```markdown - * | ~~~js - * | alert(1) - * > | ~~~ - * ^ - * ``` - * - * @type {State} - */ - function beforeSequenceClose(code) { - if (code === marker) { - effects.enter('codeFencedFenceSequence') - return sequenceClose(code) - } - return nok(code) - } - - /** - * In closing fence sequence. - * - * ```markdown - * | ~~~js - * | alert(1) - * > | ~~~ - * ^ - * ``` - * - * @type {State} - */ - function sequenceClose(code) { - if (code === marker) { - size++ - effects.consume(code) - return sequenceClose - } - if (size >= sizeOpen) { - effects.exit('codeFencedFenceSequence') - return markdownSpace(code) - ? factorySpace(effects, sequenceCloseAfter, 'whitespace')(code) - : sequenceCloseAfter(code) - } - return nok(code) - } - - /** - * After closing fence sequence, after optional whitespace. - * - * ```markdown - * | ~~~js - * | alert(1) - * > | ~~~ - * ^ - * ``` - * - * @type {State} - */ - function sequenceCloseAfter(code) { - if (code === null || markdownLineEnding(code)) { - effects.exit('codeFencedFence') - return ok(code) - } - return nok(code) - } - } -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeNonLazyContinuation(effects, ok, nok) { - const self = this - return start - - /** - * - * - * @type {State} - */ - function start(code) { - if (code === null) { - return nok(code) - } - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return lineStart - } - - /** - * - * - * @type {State} - */ - function lineStart(code) { - return self.parser.lazy[self.now().line] ? nok(code) : ok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/character-entities/index.js -/** - * Map of named character references. - * - * @type {Record} - */ -const characterEntities = { - AElig: 'Æ', - AMP: '&', - Aacute: 'Á', - Abreve: 'Ă', - Acirc: 'Â', - Acy: 'А', - Afr: '𝔄', - Agrave: 'À', - Alpha: 'Α', - Amacr: 'Ā', - And: '⩓', - Aogon: 'Ą', - Aopf: '𝔸', - ApplyFunction: '⁡', - Aring: 'Å', - Ascr: '𝒜', - Assign: '≔', - Atilde: 'Ã', - Auml: 'Ä', - Backslash: '∖', - Barv: '⫧', - Barwed: '⌆', - Bcy: 'Б', - Because: '∵', - Bernoullis: 'ℬ', - Beta: 'Β', - Bfr: '𝔅', - Bopf: '𝔹', - Breve: '˘', - Bscr: 'ℬ', - Bumpeq: '≎', - CHcy: 'Ч', - COPY: '©', - Cacute: 'Ć', - Cap: '⋒', - CapitalDifferentialD: 'ⅅ', - Cayleys: 'ℭ', - Ccaron: 'Č', - Ccedil: 'Ç', - Ccirc: 'Ĉ', - Cconint: '∰', - Cdot: 'Ċ', - Cedilla: '¸', - CenterDot: '·', - Cfr: 'ℭ', - Chi: 'Χ', - CircleDot: '⊙', - CircleMinus: '⊖', - CirclePlus: '⊕', - CircleTimes: '⊗', - ClockwiseContourIntegral: '∲', - CloseCurlyDoubleQuote: '”', - CloseCurlyQuote: '’', - Colon: '∷', - Colone: '⩴', - Congruent: '≡', - Conint: '∯', - ContourIntegral: '∮', - Copf: 'ℂ', - Coproduct: '∐', - CounterClockwiseContourIntegral: '∳', - Cross: '⨯', - Cscr: '𝒞', - Cup: '⋓', - CupCap: '≍', - DD: 'ⅅ', - DDotrahd: '⤑', - DJcy: 'Ђ', - DScy: 'Ѕ', - DZcy: 'Џ', - Dagger: '‡', - Darr: '↡', - Dashv: '⫤', - Dcaron: 'Ď', - Dcy: 'Д', - Del: '∇', - Delta: 'Δ', - Dfr: '𝔇', - DiacriticalAcute: '´', - DiacriticalDot: '˙', - DiacriticalDoubleAcute: '˝', - DiacriticalGrave: '`', - DiacriticalTilde: '˜', - Diamond: '⋄', - DifferentialD: 'ⅆ', - Dopf: '𝔻', - Dot: '¨', - DotDot: '⃜', - DotEqual: '≐', - DoubleContourIntegral: '∯', - DoubleDot: '¨', - DoubleDownArrow: '⇓', - DoubleLeftArrow: '⇐', - DoubleLeftRightArrow: '⇔', - DoubleLeftTee: '⫤', - DoubleLongLeftArrow: '⟸', - DoubleLongLeftRightArrow: '⟺', - DoubleLongRightArrow: '⟹', - DoubleRightArrow: '⇒', - DoubleRightTee: '⊨', - DoubleUpArrow: '⇑', - DoubleUpDownArrow: '⇕', - DoubleVerticalBar: '∥', - DownArrow: '↓', - DownArrowBar: '⤓', - DownArrowUpArrow: '⇵', - DownBreve: '̑', - DownLeftRightVector: '⥐', - DownLeftTeeVector: '⥞', - DownLeftVector: '↽', - DownLeftVectorBar: '⥖', - DownRightTeeVector: '⥟', - DownRightVector: '⇁', - DownRightVectorBar: '⥗', - DownTee: '⊤', - DownTeeArrow: '↧', - Downarrow: '⇓', - Dscr: '𝒟', - Dstrok: 'Đ', - ENG: 'Ŋ', - ETH: 'Ð', - Eacute: 'É', - Ecaron: 'Ě', - Ecirc: 'Ê', - Ecy: 'Э', - Edot: 'Ė', - Efr: '𝔈', - Egrave: 'È', - Element: '∈', - Emacr: 'Ē', - EmptySmallSquare: '◻', - EmptyVerySmallSquare: '▫', - Eogon: 'Ę', - Eopf: '𝔼', - Epsilon: 'Ε', - Equal: '⩵', - EqualTilde: '≂', - Equilibrium: '⇌', - Escr: 'ℰ', - Esim: '⩳', - Eta: 'Η', - Euml: 'Ë', - Exists: '∃', - ExponentialE: 'ⅇ', - Fcy: 'Ф', - Ffr: '𝔉', - FilledSmallSquare: '◼', - FilledVerySmallSquare: '▪', - Fopf: '𝔽', - ForAll: '∀', - Fouriertrf: 'ℱ', - Fscr: 'ℱ', - GJcy: 'Ѓ', - GT: '>', - Gamma: 'Γ', - Gammad: 'Ϝ', - Gbreve: 'Ğ', - Gcedil: 'Ģ', - Gcirc: 'Ĝ', - Gcy: 'Г', - Gdot: 'Ġ', - Gfr: '𝔊', - Gg: '⋙', - Gopf: '𝔾', - GreaterEqual: '≥', - GreaterEqualLess: '⋛', - GreaterFullEqual: '≧', - GreaterGreater: '⪢', - GreaterLess: '≷', - GreaterSlantEqual: '⩾', - GreaterTilde: '≳', - Gscr: '𝒢', - Gt: '≫', - HARDcy: 'Ъ', - Hacek: 'ˇ', - Hat: '^', - Hcirc: 'Ĥ', - Hfr: 'ℌ', - HilbertSpace: 'ℋ', - Hopf: 'ℍ', - HorizontalLine: '─', - Hscr: 'ℋ', - Hstrok: 'Ħ', - HumpDownHump: '≎', - HumpEqual: '≏', - IEcy: 'Е', - IJlig: 'IJ', - IOcy: 'Ё', - Iacute: 'Í', - Icirc: 'Î', - Icy: 'И', - Idot: 'İ', - Ifr: 'ℑ', - Igrave: 'Ì', - Im: 'ℑ', - Imacr: 'Ī', - ImaginaryI: 'ⅈ', - Implies: '⇒', - Int: '∬', - Integral: '∫', - Intersection: '⋂', - InvisibleComma: '⁣', - InvisibleTimes: '⁢', - Iogon: 'Į', - Iopf: '𝕀', - Iota: 'Ι', - Iscr: 'ℐ', - Itilde: 'Ĩ', - Iukcy: 'І', - Iuml: 'Ï', - Jcirc: 'Ĵ', - Jcy: 'Й', - Jfr: '𝔍', - Jopf: '𝕁', - Jscr: '𝒥', - Jsercy: 'Ј', - Jukcy: 'Є', - KHcy: 'Х', - KJcy: 'Ќ', - Kappa: 'Κ', - Kcedil: 'Ķ', - Kcy: 'К', - Kfr: '𝔎', - Kopf: '𝕂', - Kscr: '𝒦', - LJcy: 'Љ', - LT: '<', - Lacute: 'Ĺ', - Lambda: 'Λ', - Lang: '⟪', - Laplacetrf: 'ℒ', - Larr: '↞', - Lcaron: 'Ľ', - Lcedil: 'Ļ', - Lcy: 'Л', - LeftAngleBracket: '⟨', - LeftArrow: '←', - LeftArrowBar: '⇤', - LeftArrowRightArrow: '⇆', - LeftCeiling: '⌈', - LeftDoubleBracket: '⟦', - LeftDownTeeVector: '⥡', - LeftDownVector: '⇃', - LeftDownVectorBar: '⥙', - LeftFloor: '⌊', - LeftRightArrow: '↔', - LeftRightVector: '⥎', - LeftTee: '⊣', - LeftTeeArrow: '↤', - LeftTeeVector: '⥚', - LeftTriangle: '⊲', - LeftTriangleBar: '⧏', - LeftTriangleEqual: '⊴', - LeftUpDownVector: '⥑', - LeftUpTeeVector: '⥠', - LeftUpVector: '↿', - LeftUpVectorBar: '⥘', - LeftVector: '↼', - LeftVectorBar: '⥒', - Leftarrow: '⇐', - Leftrightarrow: '⇔', - LessEqualGreater: '⋚', - LessFullEqual: '≦', - LessGreater: '≶', - LessLess: '⪡', - LessSlantEqual: '⩽', - LessTilde: '≲', - Lfr: '𝔏', - Ll: '⋘', - Lleftarrow: '⇚', - Lmidot: 'Ŀ', - LongLeftArrow: '⟵', - LongLeftRightArrow: '⟷', - LongRightArrow: '⟶', - Longleftarrow: '⟸', - Longleftrightarrow: '⟺', - Longrightarrow: '⟹', - Lopf: '𝕃', - LowerLeftArrow: '↙', - LowerRightArrow: '↘', - Lscr: 'ℒ', - Lsh: '↰', - Lstrok: 'Ł', - Lt: '≪', - Map: '⤅', - Mcy: 'М', - MediumSpace: ' ', - Mellintrf: 'ℳ', - Mfr: '𝔐', - MinusPlus: '∓', - Mopf: '𝕄', - Mscr: 'ℳ', - Mu: 'Μ', - NJcy: 'Њ', - Nacute: 'Ń', - Ncaron: 'Ň', - Ncedil: 'Ņ', - Ncy: 'Н', - NegativeMediumSpace: '​', - NegativeThickSpace: '​', - NegativeThinSpace: '​', - NegativeVeryThinSpace: '​', - NestedGreaterGreater: '≫', - NestedLessLess: '≪', - NewLine: '\n', - Nfr: '𝔑', - NoBreak: '⁠', - NonBreakingSpace: ' ', - Nopf: 'ℕ', - Not: '⫬', - NotCongruent: '≢', - NotCupCap: '≭', - NotDoubleVerticalBar: '∦', - NotElement: '∉', - NotEqual: '≠', - NotEqualTilde: '≂̸', - NotExists: '∄', - NotGreater: '≯', - NotGreaterEqual: '≱', - NotGreaterFullEqual: '≧̸', - NotGreaterGreater: '≫̸', - NotGreaterLess: '≹', - NotGreaterSlantEqual: '⩾̸', - NotGreaterTilde: '≵', - NotHumpDownHump: '≎̸', - NotHumpEqual: '≏̸', - NotLeftTriangle: '⋪', - NotLeftTriangleBar: '⧏̸', - NotLeftTriangleEqual: '⋬', - NotLess: '≮', - NotLessEqual: '≰', - NotLessGreater: '≸', - NotLessLess: '≪̸', - NotLessSlantEqual: '⩽̸', - NotLessTilde: '≴', - NotNestedGreaterGreater: '⪢̸', - NotNestedLessLess: '⪡̸', - NotPrecedes: '⊀', - NotPrecedesEqual: '⪯̸', - NotPrecedesSlantEqual: '⋠', - NotReverseElement: '∌', - NotRightTriangle: '⋫', - NotRightTriangleBar: '⧐̸', - NotRightTriangleEqual: '⋭', - NotSquareSubset: '⊏̸', - NotSquareSubsetEqual: '⋢', - NotSquareSuperset: '⊐̸', - NotSquareSupersetEqual: '⋣', - NotSubset: '⊂⃒', - NotSubsetEqual: '⊈', - NotSucceeds: '⊁', - NotSucceedsEqual: '⪰̸', - NotSucceedsSlantEqual: '⋡', - NotSucceedsTilde: '≿̸', - NotSuperset: '⊃⃒', - NotSupersetEqual: '⊉', - NotTilde: '≁', - NotTildeEqual: '≄', - NotTildeFullEqual: '≇', - NotTildeTilde: '≉', - NotVerticalBar: '∤', - Nscr: '𝒩', - Ntilde: 'Ñ', - Nu: 'Ν', - OElig: 'Œ', - Oacute: 'Ó', - Ocirc: 'Ô', - Ocy: 'О', - Odblac: 'Ő', - Ofr: '𝔒', - Ograve: 'Ò', - Omacr: 'Ō', - Omega: 'Ω', - Omicron: 'Ο', - Oopf: '𝕆', - OpenCurlyDoubleQuote: '“', - OpenCurlyQuote: '‘', - Or: '⩔', - Oscr: '𝒪', - Oslash: 'Ø', - Otilde: 'Õ', - Otimes: '⨷', - Ouml: 'Ö', - OverBar: '‾', - OverBrace: '⏞', - OverBracket: '⎴', - OverParenthesis: '⏜', - PartialD: '∂', - Pcy: 'П', - Pfr: '𝔓', - Phi: 'Φ', - Pi: 'Π', - PlusMinus: '±', - Poincareplane: 'ℌ', - Popf: 'ℙ', - Pr: '⪻', - Precedes: '≺', - PrecedesEqual: '⪯', - PrecedesSlantEqual: '≼', - PrecedesTilde: '≾', - Prime: '″', - Product: '∏', - Proportion: '∷', - Proportional: '∝', - Pscr: '𝒫', - Psi: 'Ψ', - QUOT: '"', - Qfr: '𝔔', - Qopf: 'ℚ', - Qscr: '𝒬', - RBarr: '⤐', - REG: '®', - Racute: 'Ŕ', - Rang: '⟫', - Rarr: '↠', - Rarrtl: '⤖', - Rcaron: 'Ř', - Rcedil: 'Ŗ', - Rcy: 'Р', - Re: 'ℜ', - ReverseElement: '∋', - ReverseEquilibrium: '⇋', - ReverseUpEquilibrium: '⥯', - Rfr: 'ℜ', - Rho: 'Ρ', - RightAngleBracket: '⟩', - RightArrow: '→', - RightArrowBar: '⇥', - RightArrowLeftArrow: '⇄', - RightCeiling: '⌉', - RightDoubleBracket: '⟧', - RightDownTeeVector: '⥝', - RightDownVector: '⇂', - RightDownVectorBar: '⥕', - RightFloor: '⌋', - RightTee: '⊢', - RightTeeArrow: '↦', - RightTeeVector: '⥛', - RightTriangle: '⊳', - RightTriangleBar: '⧐', - RightTriangleEqual: '⊵', - RightUpDownVector: '⥏', - RightUpTeeVector: '⥜', - RightUpVector: '↾', - RightUpVectorBar: '⥔', - RightVector: '⇀', - RightVectorBar: '⥓', - Rightarrow: '⇒', - Ropf: 'ℝ', - RoundImplies: '⥰', - Rrightarrow: '⇛', - Rscr: 'ℛ', - Rsh: '↱', - RuleDelayed: '⧴', - SHCHcy: 'Щ', - SHcy: 'Ш', - SOFTcy: 'Ь', - Sacute: 'Ś', - Sc: '⪼', - Scaron: 'Š', - Scedil: 'Ş', - Scirc: 'Ŝ', - Scy: 'С', - Sfr: '𝔖', - ShortDownArrow: '↓', - ShortLeftArrow: '←', - ShortRightArrow: '→', - ShortUpArrow: '↑', - Sigma: 'Σ', - SmallCircle: '∘', - Sopf: '𝕊', - Sqrt: '√', - Square: '□', - SquareIntersection: '⊓', - SquareSubset: '⊏', - SquareSubsetEqual: '⊑', - SquareSuperset: '⊐', - SquareSupersetEqual: '⊒', - SquareUnion: '⊔', - Sscr: '𝒮', - Star: '⋆', - Sub: '⋐', - Subset: '⋐', - SubsetEqual: '⊆', - Succeeds: '≻', - SucceedsEqual: '⪰', - SucceedsSlantEqual: '≽', - SucceedsTilde: '≿', - SuchThat: '∋', - Sum: '∑', - Sup: '⋑', - Superset: '⊃', - SupersetEqual: '⊇', - Supset: '⋑', - THORN: 'Þ', - TRADE: '™', - TSHcy: 'Ћ', - TScy: 'Ц', - Tab: '\t', - Tau: 'Τ', - Tcaron: 'Ť', - Tcedil: 'Ţ', - Tcy: 'Т', - Tfr: '𝔗', - Therefore: '∴', - Theta: 'Θ', - ThickSpace: '  ', - ThinSpace: ' ', - Tilde: '∼', - TildeEqual: '≃', - TildeFullEqual: '≅', - TildeTilde: '≈', - Topf: '𝕋', - TripleDot: '⃛', - Tscr: '𝒯', - Tstrok: 'Ŧ', - Uacute: 'Ú', - Uarr: '↟', - Uarrocir: '⥉', - Ubrcy: 'Ў', - Ubreve: 'Ŭ', - Ucirc: 'Û', - Ucy: 'У', - Udblac: 'Ű', - Ufr: '𝔘', - Ugrave: 'Ù', - Umacr: 'Ū', - UnderBar: '_', - UnderBrace: '⏟', - UnderBracket: '⎵', - UnderParenthesis: '⏝', - Union: '⋃', - UnionPlus: '⊎', - Uogon: 'Ų', - Uopf: '𝕌', - UpArrow: '↑', - UpArrowBar: '⤒', - UpArrowDownArrow: '⇅', - UpDownArrow: '↕', - UpEquilibrium: '⥮', - UpTee: '⊥', - UpTeeArrow: '↥', - Uparrow: '⇑', - Updownarrow: '⇕', - UpperLeftArrow: '↖', - UpperRightArrow: '↗', - Upsi: 'ϒ', - Upsilon: 'Υ', - Uring: 'Ů', - Uscr: '𝒰', - Utilde: 'Ũ', - Uuml: 'Ü', - VDash: '⊫', - Vbar: '⫫', - Vcy: 'В', - Vdash: '⊩', - Vdashl: '⫦', - Vee: '⋁', - Verbar: '‖', - Vert: '‖', - VerticalBar: '∣', - VerticalLine: '|', - VerticalSeparator: '❘', - VerticalTilde: '≀', - VeryThinSpace: ' ', - Vfr: '𝔙', - Vopf: '𝕍', - Vscr: '𝒱', - Vvdash: '⊪', - Wcirc: 'Ŵ', - Wedge: '⋀', - Wfr: '𝔚', - Wopf: '𝕎', - Wscr: '𝒲', - Xfr: '𝔛', - Xi: 'Ξ', - Xopf: '𝕏', - Xscr: '𝒳', - YAcy: 'Я', - YIcy: 'Ї', - YUcy: 'Ю', - Yacute: 'Ý', - Ycirc: 'Ŷ', - Ycy: 'Ы', - Yfr: '𝔜', - Yopf: '𝕐', - Yscr: '𝒴', - Yuml: 'Ÿ', - ZHcy: 'Ж', - Zacute: 'Ź', - Zcaron: 'Ž', - Zcy: 'З', - Zdot: 'Ż', - ZeroWidthSpace: '​', - Zeta: 'Ζ', - Zfr: 'ℨ', - Zopf: 'ℤ', - Zscr: '𝒵', - aacute: 'á', - abreve: 'ă', - ac: '∾', - acE: '∾̳', - acd: '∿', - acirc: 'â', - acute: '´', - acy: 'а', - aelig: 'æ', - af: '⁡', - afr: '𝔞', - agrave: 'à', - alefsym: 'ℵ', - aleph: 'ℵ', - alpha: 'α', - amacr: 'ā', - amalg: '⨿', - amp: '&', - and: '∧', - andand: '⩕', - andd: '⩜', - andslope: '⩘', - andv: '⩚', - ang: '∠', - ange: '⦤', - angle: '∠', - angmsd: '∡', - angmsdaa: '⦨', - angmsdab: '⦩', - angmsdac: '⦪', - angmsdad: '⦫', - angmsdae: '⦬', - angmsdaf: '⦭', - angmsdag: '⦮', - angmsdah: '⦯', - angrt: '∟', - angrtvb: '⊾', - angrtvbd: '⦝', - angsph: '∢', - angst: 'Å', - angzarr: '⍼', - aogon: 'ą', - aopf: '𝕒', - ap: '≈', - apE: '⩰', - apacir: '⩯', - ape: '≊', - apid: '≋', - apos: "'", - approx: '≈', - approxeq: '≊', - aring: 'å', - ascr: '𝒶', - ast: '*', - asymp: '≈', - asympeq: '≍', - atilde: 'ã', - auml: 'ä', - awconint: '∳', - awint: '⨑', - bNot: '⫭', - backcong: '≌', - backepsilon: '϶', - backprime: '‵', - backsim: '∽', - backsimeq: '⋍', - barvee: '⊽', - barwed: '⌅', - barwedge: '⌅', - bbrk: '⎵', - bbrktbrk: '⎶', - bcong: '≌', - bcy: 'б', - bdquo: '„', - becaus: '∵', - because: '∵', - bemptyv: '⦰', - bepsi: '϶', - bernou: 'ℬ', - beta: 'β', - beth: 'ℶ', - between: '≬', - bfr: '𝔟', - bigcap: '⋂', - bigcirc: '◯', - bigcup: '⋃', - bigodot: '⨀', - bigoplus: '⨁', - bigotimes: '⨂', - bigsqcup: '⨆', - bigstar: '★', - bigtriangledown: '▽', - bigtriangleup: '△', - biguplus: '⨄', - bigvee: '⋁', - bigwedge: '⋀', - bkarow: '⤍', - blacklozenge: '⧫', - blacksquare: '▪', - blacktriangle: '▴', - blacktriangledown: '▾', - blacktriangleleft: '◂', - blacktriangleright: '▸', - blank: '␣', - blk12: '▒', - blk14: '░', - blk34: '▓', - block: '█', - bne: '=⃥', - bnequiv: '≡⃥', - bnot: '⌐', - bopf: '𝕓', - bot: '⊥', - bottom: '⊥', - bowtie: '⋈', - boxDL: '╗', - boxDR: '╔', - boxDl: '╖', - boxDr: '╓', - boxH: '═', - boxHD: '╦', - boxHU: '╩', - boxHd: '╤', - boxHu: '╧', - boxUL: '╝', - boxUR: '╚', - boxUl: '╜', - boxUr: '╙', - boxV: '║', - boxVH: '╬', - boxVL: '╣', - boxVR: '╠', - boxVh: '╫', - boxVl: '╢', - boxVr: '╟', - boxbox: '⧉', - boxdL: '╕', - boxdR: '╒', - boxdl: '┐', - boxdr: '┌', - boxh: '─', - boxhD: '╥', - boxhU: '╨', - boxhd: '┬', - boxhu: '┴', - boxminus: '⊟', - boxplus: '⊞', - boxtimes: '⊠', - boxuL: '╛', - boxuR: '╘', - boxul: '┘', - boxur: '└', - boxv: '│', - boxvH: '╪', - boxvL: '╡', - boxvR: '╞', - boxvh: '┼', - boxvl: '┤', - boxvr: '├', - bprime: '‵', - breve: '˘', - brvbar: '¦', - bscr: '𝒷', - bsemi: '⁏', - bsim: '∽', - bsime: '⋍', - bsol: '\\', - bsolb: '⧅', - bsolhsub: '⟈', - bull: '•', - bullet: '•', - bump: '≎', - bumpE: '⪮', - bumpe: '≏', - bumpeq: '≏', - cacute: 'ć', - cap: '∩', - capand: '⩄', - capbrcup: '⩉', - capcap: '⩋', - capcup: '⩇', - capdot: '⩀', - caps: '∩︀', - caret: '⁁', - caron: 'ˇ', - ccaps: '⩍', - ccaron: 'č', - ccedil: 'ç', - ccirc: 'ĉ', - ccups: '⩌', - ccupssm: '⩐', - cdot: 'ċ', - cedil: '¸', - cemptyv: '⦲', - cent: '¢', - centerdot: '·', - cfr: '𝔠', - chcy: 'ч', - check: '✓', - checkmark: '✓', - chi: 'χ', - cir: '○', - cirE: '⧃', - circ: 'ˆ', - circeq: '≗', - circlearrowleft: '↺', - circlearrowright: '↻', - circledR: '®', - circledS: 'Ⓢ', - circledast: '⊛', - circledcirc: '⊚', - circleddash: '⊝', - cire: '≗', - cirfnint: '⨐', - cirmid: '⫯', - cirscir: '⧂', - clubs: '♣', - clubsuit: '♣', - colon: ':', - colone: '≔', - coloneq: '≔', - comma: ',', - commat: '@', - comp: '∁', - compfn: '∘', - complement: '∁', - complexes: 'ℂ', - cong: '≅', - congdot: '⩭', - conint: '∮', - copf: '𝕔', - coprod: '∐', - copy: '©', - copysr: '℗', - crarr: '↵', - cross: '✗', - cscr: '𝒸', - csub: '⫏', - csube: '⫑', - csup: '⫐', - csupe: '⫒', - ctdot: '⋯', - cudarrl: '⤸', - cudarrr: '⤵', - cuepr: '⋞', - cuesc: '⋟', - cularr: '↶', - cularrp: '⤽', - cup: '∪', - cupbrcap: '⩈', - cupcap: '⩆', - cupcup: '⩊', - cupdot: '⊍', - cupor: '⩅', - cups: '∪︀', - curarr: '↷', - curarrm: '⤼', - curlyeqprec: '⋞', - curlyeqsucc: '⋟', - curlyvee: '⋎', - curlywedge: '⋏', - curren: '¤', - curvearrowleft: '↶', - curvearrowright: '↷', - cuvee: '⋎', - cuwed: '⋏', - cwconint: '∲', - cwint: '∱', - cylcty: '⌭', - dArr: '⇓', - dHar: '⥥', - dagger: '†', - daleth: 'ℸ', - darr: '↓', - dash: '‐', - dashv: '⊣', - dbkarow: '⤏', - dblac: '˝', - dcaron: 'ď', - dcy: 'д', - dd: 'ⅆ', - ddagger: '‡', - ddarr: '⇊', - ddotseq: '⩷', - deg: '°', - delta: 'δ', - demptyv: '⦱', - dfisht: '⥿', - dfr: '𝔡', - dharl: '⇃', - dharr: '⇂', - diam: '⋄', - diamond: '⋄', - diamondsuit: '♦', - diams: '♦', - die: '¨', - digamma: 'ϝ', - disin: '⋲', - div: '÷', - divide: '÷', - divideontimes: '⋇', - divonx: '⋇', - djcy: 'ђ', - dlcorn: '⌞', - dlcrop: '⌍', - dollar: '$', - dopf: '𝕕', - dot: '˙', - doteq: '≐', - doteqdot: '≑', - dotminus: '∸', - dotplus: '∔', - dotsquare: '⊡', - doublebarwedge: '⌆', - downarrow: '↓', - downdownarrows: '⇊', - downharpoonleft: '⇃', - downharpoonright: '⇂', - drbkarow: '⤐', - drcorn: '⌟', - drcrop: '⌌', - dscr: '𝒹', - dscy: 'ѕ', - dsol: '⧶', - dstrok: 'đ', - dtdot: '⋱', - dtri: '▿', - dtrif: '▾', - duarr: '⇵', - duhar: '⥯', - dwangle: '⦦', - dzcy: 'џ', - dzigrarr: '⟿', - eDDot: '⩷', - eDot: '≑', - eacute: 'é', - easter: '⩮', - ecaron: 'ě', - ecir: '≖', - ecirc: 'ê', - ecolon: '≕', - ecy: 'э', - edot: 'ė', - ee: 'ⅇ', - efDot: '≒', - efr: '𝔢', - eg: '⪚', - egrave: 'è', - egs: '⪖', - egsdot: '⪘', - el: '⪙', - elinters: '⏧', - ell: 'ℓ', - els: '⪕', - elsdot: '⪗', - emacr: 'ē', - empty: '∅', - emptyset: '∅', - emptyv: '∅', - emsp13: ' ', - emsp14: ' ', - emsp: ' ', - eng: 'ŋ', - ensp: ' ', - eogon: 'ę', - eopf: '𝕖', - epar: '⋕', - eparsl: '⧣', - eplus: '⩱', - epsi: 'ε', - epsilon: 'ε', - epsiv: 'ϵ', - eqcirc: '≖', - eqcolon: '≕', - eqsim: '≂', - eqslantgtr: '⪖', - eqslantless: '⪕', - equals: '=', - equest: '≟', - equiv: '≡', - equivDD: '⩸', - eqvparsl: '⧥', - erDot: '≓', - erarr: '⥱', - escr: 'ℯ', - esdot: '≐', - esim: '≂', - eta: 'η', - eth: 'ð', - euml: 'ë', - euro: '€', - excl: '!', - exist: '∃', - expectation: 'ℰ', - exponentiale: 'ⅇ', - fallingdotseq: '≒', - fcy: 'ф', - female: '♀', - ffilig: 'ffi', - fflig: 'ff', - ffllig: 'ffl', - ffr: '𝔣', - filig: 'fi', - fjlig: 'fj', - flat: '♭', - fllig: 'fl', - fltns: '▱', - fnof: 'ƒ', - fopf: '𝕗', - forall: '∀', - fork: '⋔', - forkv: '⫙', - fpartint: '⨍', - frac12: '½', - frac13: '⅓', - frac14: '¼', - frac15: '⅕', - frac16: '⅙', - frac18: '⅛', - frac23: '⅔', - frac25: '⅖', - frac34: '¾', - frac35: '⅗', - frac38: '⅜', - frac45: '⅘', - frac56: '⅚', - frac58: '⅝', - frac78: '⅞', - frasl: '⁄', - frown: '⌢', - fscr: '𝒻', - gE: '≧', - gEl: '⪌', - gacute: 'ǵ', - gamma: 'γ', - gammad: 'ϝ', - gap: '⪆', - gbreve: 'ğ', - gcirc: 'ĝ', - gcy: 'г', - gdot: 'ġ', - ge: '≥', - gel: '⋛', - geq: '≥', - geqq: '≧', - geqslant: '⩾', - ges: '⩾', - gescc: '⪩', - gesdot: '⪀', - gesdoto: '⪂', - gesdotol: '⪄', - gesl: '⋛︀', - gesles: '⪔', - gfr: '𝔤', - gg: '≫', - ggg: '⋙', - gimel: 'ℷ', - gjcy: 'ѓ', - gl: '≷', - glE: '⪒', - gla: '⪥', - glj: '⪤', - gnE: '≩', - gnap: '⪊', - gnapprox: '⪊', - gne: '⪈', - gneq: '⪈', - gneqq: '≩', - gnsim: '⋧', - gopf: '𝕘', - grave: '`', - gscr: 'ℊ', - gsim: '≳', - gsime: '⪎', - gsiml: '⪐', - gt: '>', - gtcc: '⪧', - gtcir: '⩺', - gtdot: '⋗', - gtlPar: '⦕', - gtquest: '⩼', - gtrapprox: '⪆', - gtrarr: '⥸', - gtrdot: '⋗', - gtreqless: '⋛', - gtreqqless: '⪌', - gtrless: '≷', - gtrsim: '≳', - gvertneqq: '≩︀', - gvnE: '≩︀', - hArr: '⇔', - hairsp: ' ', - half: '½', - hamilt: 'ℋ', - hardcy: 'ъ', - harr: '↔', - harrcir: '⥈', - harrw: '↭', - hbar: 'ℏ', - hcirc: 'ĥ', - hearts: '♥', - heartsuit: '♥', - hellip: '…', - hercon: '⊹', - hfr: '𝔥', - hksearow: '⤥', - hkswarow: '⤦', - hoarr: '⇿', - homtht: '∻', - hookleftarrow: '↩', - hookrightarrow: '↪', - hopf: '𝕙', - horbar: '―', - hscr: '𝒽', - hslash: 'ℏ', - hstrok: 'ħ', - hybull: '⁃', - hyphen: '‐', - iacute: 'í', - ic: '⁣', - icirc: 'î', - icy: 'и', - iecy: 'е', - iexcl: '¡', - iff: '⇔', - ifr: '𝔦', - igrave: 'ì', - ii: 'ⅈ', - iiiint: '⨌', - iiint: '∭', - iinfin: '⧜', - iiota: '℩', - ijlig: 'ij', - imacr: 'ī', - image: 'ℑ', - imagline: 'ℐ', - imagpart: 'ℑ', - imath: 'ı', - imof: '⊷', - imped: 'Ƶ', - in: '∈', - incare: '℅', - infin: '∞', - infintie: '⧝', - inodot: 'ı', - int: '∫', - intcal: '⊺', - integers: 'ℤ', - intercal: '⊺', - intlarhk: '⨗', - intprod: '⨼', - iocy: 'ё', - iogon: 'į', - iopf: '𝕚', - iota: 'ι', - iprod: '⨼', - iquest: '¿', - iscr: '𝒾', - isin: '∈', - isinE: '⋹', - isindot: '⋵', - isins: '⋴', - isinsv: '⋳', - isinv: '∈', - it: '⁢', - itilde: 'ĩ', - iukcy: 'і', - iuml: 'ï', - jcirc: 'ĵ', - jcy: 'й', - jfr: '𝔧', - jmath: 'ȷ', - jopf: '𝕛', - jscr: '𝒿', - jsercy: 'ј', - jukcy: 'є', - kappa: 'κ', - kappav: 'ϰ', - kcedil: 'ķ', - kcy: 'к', - kfr: '𝔨', - kgreen: 'ĸ', - khcy: 'х', - kjcy: 'ќ', - kopf: '𝕜', - kscr: '𝓀', - lAarr: '⇚', - lArr: '⇐', - lAtail: '⤛', - lBarr: '⤎', - lE: '≦', - lEg: '⪋', - lHar: '⥢', - lacute: 'ĺ', - laemptyv: '⦴', - lagran: 'ℒ', - lambda: 'λ', - lang: '⟨', - langd: '⦑', - langle: '⟨', - lap: '⪅', - laquo: '«', - larr: '←', - larrb: '⇤', - larrbfs: '⤟', - larrfs: '⤝', - larrhk: '↩', - larrlp: '↫', - larrpl: '⤹', - larrsim: '⥳', - larrtl: '↢', - lat: '⪫', - latail: '⤙', - late: '⪭', - lates: '⪭︀', - lbarr: '⤌', - lbbrk: '❲', - lbrace: '{', - lbrack: '[', - lbrke: '⦋', - lbrksld: '⦏', - lbrkslu: '⦍', - lcaron: 'ľ', - lcedil: 'ļ', - lceil: '⌈', - lcub: '{', - lcy: 'л', - ldca: '⤶', - ldquo: '“', - ldquor: '„', - ldrdhar: '⥧', - ldrushar: '⥋', - ldsh: '↲', - le: '≤', - leftarrow: '←', - leftarrowtail: '↢', - leftharpoondown: '↽', - leftharpoonup: '↼', - leftleftarrows: '⇇', - leftrightarrow: '↔', - leftrightarrows: '⇆', - leftrightharpoons: '⇋', - leftrightsquigarrow: '↭', - leftthreetimes: '⋋', - leg: '⋚', - leq: '≤', - leqq: '≦', - leqslant: '⩽', - les: '⩽', - lescc: '⪨', - lesdot: '⩿', - lesdoto: '⪁', - lesdotor: '⪃', - lesg: '⋚︀', - lesges: '⪓', - lessapprox: '⪅', - lessdot: '⋖', - lesseqgtr: '⋚', - lesseqqgtr: '⪋', - lessgtr: '≶', - lesssim: '≲', - lfisht: '⥼', - lfloor: '⌊', - lfr: '𝔩', - lg: '≶', - lgE: '⪑', - lhard: '↽', - lharu: '↼', - lharul: '⥪', - lhblk: '▄', - ljcy: 'љ', - ll: '≪', - llarr: '⇇', - llcorner: '⌞', - llhard: '⥫', - lltri: '◺', - lmidot: 'ŀ', - lmoust: '⎰', - lmoustache: '⎰', - lnE: '≨', - lnap: '⪉', - lnapprox: '⪉', - lne: '⪇', - lneq: '⪇', - lneqq: '≨', - lnsim: '⋦', - loang: '⟬', - loarr: '⇽', - lobrk: '⟦', - longleftarrow: '⟵', - longleftrightarrow: '⟷', - longmapsto: '⟼', - longrightarrow: '⟶', - looparrowleft: '↫', - looparrowright: '↬', - lopar: '⦅', - lopf: '𝕝', - loplus: '⨭', - lotimes: '⨴', - lowast: '∗', - lowbar: '_', - loz: '◊', - lozenge: '◊', - lozf: '⧫', - lpar: '(', - lparlt: '⦓', - lrarr: '⇆', - lrcorner: '⌟', - lrhar: '⇋', - lrhard: '⥭', - lrm: '‎', - lrtri: '⊿', - lsaquo: '‹', - lscr: '𝓁', - lsh: '↰', - lsim: '≲', - lsime: '⪍', - lsimg: '⪏', - lsqb: '[', - lsquo: '‘', - lsquor: '‚', - lstrok: 'ł', - lt: '<', - ltcc: '⪦', - ltcir: '⩹', - ltdot: '⋖', - lthree: '⋋', - ltimes: '⋉', - ltlarr: '⥶', - ltquest: '⩻', - ltrPar: '⦖', - ltri: '◃', - ltrie: '⊴', - ltrif: '◂', - lurdshar: '⥊', - luruhar: '⥦', - lvertneqq: '≨︀', - lvnE: '≨︀', - mDDot: '∺', - macr: '¯', - male: '♂', - malt: '✠', - maltese: '✠', - map: '↦', - mapsto: '↦', - mapstodown: '↧', - mapstoleft: '↤', - mapstoup: '↥', - marker: '▮', - mcomma: '⨩', - mcy: 'м', - mdash: '—', - measuredangle: '∡', - mfr: '𝔪', - mho: '℧', - micro: 'µ', - mid: '∣', - midast: '*', - midcir: '⫰', - middot: '·', - minus: '−', - minusb: '⊟', - minusd: '∸', - minusdu: '⨪', - mlcp: '⫛', - mldr: '…', - mnplus: '∓', - models: '⊧', - mopf: '𝕞', - mp: '∓', - mscr: '𝓂', - mstpos: '∾', - mu: 'μ', - multimap: '⊸', - mumap: '⊸', - nGg: '⋙̸', - nGt: '≫⃒', - nGtv: '≫̸', - nLeftarrow: '⇍', - nLeftrightarrow: '⇎', - nLl: '⋘̸', - nLt: '≪⃒', - nLtv: '≪̸', - nRightarrow: '⇏', - nVDash: '⊯', - nVdash: '⊮', - nabla: '∇', - nacute: 'ń', - nang: '∠⃒', - nap: '≉', - napE: '⩰̸', - napid: '≋̸', - napos: 'ʼn', - napprox: '≉', - natur: '♮', - natural: '♮', - naturals: 'ℕ', - nbsp: ' ', - nbump: '≎̸', - nbumpe: '≏̸', - ncap: '⩃', - ncaron: 'ň', - ncedil: 'ņ', - ncong: '≇', - ncongdot: '⩭̸', - ncup: '⩂', - ncy: 'н', - ndash: '–', - ne: '≠', - neArr: '⇗', - nearhk: '⤤', - nearr: '↗', - nearrow: '↗', - nedot: '≐̸', - nequiv: '≢', - nesear: '⤨', - nesim: '≂̸', - nexist: '∄', - nexists: '∄', - nfr: '𝔫', - ngE: '≧̸', - nge: '≱', - ngeq: '≱', - ngeqq: '≧̸', - ngeqslant: '⩾̸', - nges: '⩾̸', - ngsim: '≵', - ngt: '≯', - ngtr: '≯', - nhArr: '⇎', - nharr: '↮', - nhpar: '⫲', - ni: '∋', - nis: '⋼', - nisd: '⋺', - niv: '∋', - njcy: 'њ', - nlArr: '⇍', - nlE: '≦̸', - nlarr: '↚', - nldr: '‥', - nle: '≰', - nleftarrow: '↚', - nleftrightarrow: '↮', - nleq: '≰', - nleqq: '≦̸', - nleqslant: '⩽̸', - nles: '⩽̸', - nless: '≮', - nlsim: '≴', - nlt: '≮', - nltri: '⋪', - nltrie: '⋬', - nmid: '∤', - nopf: '𝕟', - not: '¬', - notin: '∉', - notinE: '⋹̸', - notindot: '⋵̸', - notinva: '∉', - notinvb: '⋷', - notinvc: '⋶', - notni: '∌', - notniva: '∌', - notnivb: '⋾', - notnivc: '⋽', - npar: '∦', - nparallel: '∦', - nparsl: '⫽⃥', - npart: '∂̸', - npolint: '⨔', - npr: '⊀', - nprcue: '⋠', - npre: '⪯̸', - nprec: '⊀', - npreceq: '⪯̸', - nrArr: '⇏', - nrarr: '↛', - nrarrc: '⤳̸', - nrarrw: '↝̸', - nrightarrow: '↛', - nrtri: '⋫', - nrtrie: '⋭', - nsc: '⊁', - nsccue: '⋡', - nsce: '⪰̸', - nscr: '𝓃', - nshortmid: '∤', - nshortparallel: '∦', - nsim: '≁', - nsime: '≄', - nsimeq: '≄', - nsmid: '∤', - nspar: '∦', - nsqsube: '⋢', - nsqsupe: '⋣', - nsub: '⊄', - nsubE: '⫅̸', - nsube: '⊈', - nsubset: '⊂⃒', - nsubseteq: '⊈', - nsubseteqq: '⫅̸', - nsucc: '⊁', - nsucceq: '⪰̸', - nsup: '⊅', - nsupE: '⫆̸', - nsupe: '⊉', - nsupset: '⊃⃒', - nsupseteq: '⊉', - nsupseteqq: '⫆̸', - ntgl: '≹', - ntilde: 'ñ', - ntlg: '≸', - ntriangleleft: '⋪', - ntrianglelefteq: '⋬', - ntriangleright: '⋫', - ntrianglerighteq: '⋭', - nu: 'ν', - num: '#', - numero: '№', - numsp: ' ', - nvDash: '⊭', - nvHarr: '⤄', - nvap: '≍⃒', - nvdash: '⊬', - nvge: '≥⃒', - nvgt: '>⃒', - nvinfin: '⧞', - nvlArr: '⤂', - nvle: '≤⃒', - nvlt: '<⃒', - nvltrie: '⊴⃒', - nvrArr: '⤃', - nvrtrie: '⊵⃒', - nvsim: '∼⃒', - nwArr: '⇖', - nwarhk: '⤣', - nwarr: '↖', - nwarrow: '↖', - nwnear: '⤧', - oS: 'Ⓢ', - oacute: 'ó', - oast: '⊛', - ocir: '⊚', - ocirc: 'ô', - ocy: 'о', - odash: '⊝', - odblac: 'ő', - odiv: '⨸', - odot: '⊙', - odsold: '⦼', - oelig: 'œ', - ofcir: '⦿', - ofr: '𝔬', - ogon: '˛', - ograve: 'ò', - ogt: '⧁', - ohbar: '⦵', - ohm: 'Ω', - oint: '∮', - olarr: '↺', - olcir: '⦾', - olcross: '⦻', - oline: '‾', - olt: '⧀', - omacr: 'ō', - omega: 'ω', - omicron: 'ο', - omid: '⦶', - ominus: '⊖', - oopf: '𝕠', - opar: '⦷', - operp: '⦹', - oplus: '⊕', - or: '∨', - orarr: '↻', - ord: '⩝', - order: 'ℴ', - orderof: 'ℴ', - ordf: 'ª', - ordm: 'º', - origof: '⊶', - oror: '⩖', - orslope: '⩗', - orv: '⩛', - oscr: 'ℴ', - oslash: 'ø', - osol: '⊘', - otilde: 'õ', - otimes: '⊗', - otimesas: '⨶', - ouml: 'ö', - ovbar: '⌽', - par: '∥', - para: '¶', - parallel: '∥', - parsim: '⫳', - parsl: '⫽', - part: '∂', - pcy: 'п', - percnt: '%', - period: '.', - permil: '‰', - perp: '⊥', - pertenk: '‱', - pfr: '𝔭', - phi: 'φ', - phiv: 'ϕ', - phmmat: 'ℳ', - phone: '☎', - pi: 'π', - pitchfork: '⋔', - piv: 'ϖ', - planck: 'ℏ', - planckh: 'ℎ', - plankv: 'ℏ', - plus: '+', - plusacir: '⨣', - plusb: '⊞', - pluscir: '⨢', - plusdo: '∔', - plusdu: '⨥', - pluse: '⩲', - plusmn: '±', - plussim: '⨦', - plustwo: '⨧', - pm: '±', - pointint: '⨕', - popf: '𝕡', - pound: '£', - pr: '≺', - prE: '⪳', - prap: '⪷', - prcue: '≼', - pre: '⪯', - prec: '≺', - precapprox: '⪷', - preccurlyeq: '≼', - preceq: '⪯', - precnapprox: '⪹', - precneqq: '⪵', - precnsim: '⋨', - precsim: '≾', - prime: '′', - primes: 'ℙ', - prnE: '⪵', - prnap: '⪹', - prnsim: '⋨', - prod: '∏', - profalar: '⌮', - profline: '⌒', - profsurf: '⌓', - prop: '∝', - propto: '∝', - prsim: '≾', - prurel: '⊰', - pscr: '𝓅', - psi: 'ψ', - puncsp: ' ', - qfr: '𝔮', - qint: '⨌', - qopf: '𝕢', - qprime: '⁗', - qscr: '𝓆', - quaternions: 'ℍ', - quatint: '⨖', - quest: '?', - questeq: '≟', - quot: '"', - rAarr: '⇛', - rArr: '⇒', - rAtail: '⤜', - rBarr: '⤏', - rHar: '⥤', - race: '∽̱', - racute: 'ŕ', - radic: '√', - raemptyv: '⦳', - rang: '⟩', - rangd: '⦒', - range: '⦥', - rangle: '⟩', - raquo: '»', - rarr: '→', - rarrap: '⥵', - rarrb: '⇥', - rarrbfs: '⤠', - rarrc: '⤳', - rarrfs: '⤞', - rarrhk: '↪', - rarrlp: '↬', - rarrpl: '⥅', - rarrsim: '⥴', - rarrtl: '↣', - rarrw: '↝', - ratail: '⤚', - ratio: '∶', - rationals: 'ℚ', - rbarr: '⤍', - rbbrk: '❳', - rbrace: '}', - rbrack: ']', - rbrke: '⦌', - rbrksld: '⦎', - rbrkslu: '⦐', - rcaron: 'ř', - rcedil: 'ŗ', - rceil: '⌉', - rcub: '}', - rcy: 'р', - rdca: '⤷', - rdldhar: '⥩', - rdquo: '”', - rdquor: '”', - rdsh: '↳', - real: 'ℜ', - realine: 'ℛ', - realpart: 'ℜ', - reals: 'ℝ', - rect: '▭', - reg: '®', - rfisht: '⥽', - rfloor: '⌋', - rfr: '𝔯', - rhard: '⇁', - rharu: '⇀', - rharul: '⥬', - rho: 'ρ', - rhov: 'ϱ', - rightarrow: '→', - rightarrowtail: '↣', - rightharpoondown: '⇁', - rightharpoonup: '⇀', - rightleftarrows: '⇄', - rightleftharpoons: '⇌', - rightrightarrows: '⇉', - rightsquigarrow: '↝', - rightthreetimes: '⋌', - ring: '˚', - risingdotseq: '≓', - rlarr: '⇄', - rlhar: '⇌', - rlm: '‏', - rmoust: '⎱', - rmoustache: '⎱', - rnmid: '⫮', - roang: '⟭', - roarr: '⇾', - robrk: '⟧', - ropar: '⦆', - ropf: '𝕣', - roplus: '⨮', - rotimes: '⨵', - rpar: ')', - rpargt: '⦔', - rppolint: '⨒', - rrarr: '⇉', - rsaquo: '›', - rscr: '𝓇', - rsh: '↱', - rsqb: ']', - rsquo: '’', - rsquor: '’', - rthree: '⋌', - rtimes: '⋊', - rtri: '▹', - rtrie: '⊵', - rtrif: '▸', - rtriltri: '⧎', - ruluhar: '⥨', - rx: '℞', - sacute: 'ś', - sbquo: '‚', - sc: '≻', - scE: '⪴', - scap: '⪸', - scaron: 'š', - sccue: '≽', - sce: '⪰', - scedil: 'ş', - scirc: 'ŝ', - scnE: '⪶', - scnap: '⪺', - scnsim: '⋩', - scpolint: '⨓', - scsim: '≿', - scy: 'с', - sdot: '⋅', - sdotb: '⊡', - sdote: '⩦', - seArr: '⇘', - searhk: '⤥', - searr: '↘', - searrow: '↘', - sect: '§', - semi: ';', - seswar: '⤩', - setminus: '∖', - setmn: '∖', - sext: '✶', - sfr: '𝔰', - sfrown: '⌢', - sharp: '♯', - shchcy: 'щ', - shcy: 'ш', - shortmid: '∣', - shortparallel: '∥', - shy: '­', - sigma: 'σ', - sigmaf: 'ς', - sigmav: 'ς', - sim: '∼', - simdot: '⩪', - sime: '≃', - simeq: '≃', - simg: '⪞', - simgE: '⪠', - siml: '⪝', - simlE: '⪟', - simne: '≆', - simplus: '⨤', - simrarr: '⥲', - slarr: '←', - smallsetminus: '∖', - smashp: '⨳', - smeparsl: '⧤', - smid: '∣', - smile: '⌣', - smt: '⪪', - smte: '⪬', - smtes: '⪬︀', - softcy: 'ь', - sol: '/', - solb: '⧄', - solbar: '⌿', - sopf: '𝕤', - spades: '♠', - spadesuit: '♠', - spar: '∥', - sqcap: '⊓', - sqcaps: '⊓︀', - sqcup: '⊔', - sqcups: '⊔︀', - sqsub: '⊏', - sqsube: '⊑', - sqsubset: '⊏', - sqsubseteq: '⊑', - sqsup: '⊐', - sqsupe: '⊒', - sqsupset: '⊐', - sqsupseteq: '⊒', - squ: '□', - square: '□', - squarf: '▪', - squf: '▪', - srarr: '→', - sscr: '𝓈', - ssetmn: '∖', - ssmile: '⌣', - sstarf: '⋆', - star: '☆', - starf: '★', - straightepsilon: 'ϵ', - straightphi: 'ϕ', - strns: '¯', - sub: '⊂', - subE: '⫅', - subdot: '⪽', - sube: '⊆', - subedot: '⫃', - submult: '⫁', - subnE: '⫋', - subne: '⊊', - subplus: '⪿', - subrarr: '⥹', - subset: '⊂', - subseteq: '⊆', - subseteqq: '⫅', - subsetneq: '⊊', - subsetneqq: '⫋', - subsim: '⫇', - subsub: '⫕', - subsup: '⫓', - succ: '≻', - succapprox: '⪸', - succcurlyeq: '≽', - succeq: '⪰', - succnapprox: '⪺', - succneqq: '⪶', - succnsim: '⋩', - succsim: '≿', - sum: '∑', - sung: '♪', - sup1: '¹', - sup2: '²', - sup3: '³', - sup: '⊃', - supE: '⫆', - supdot: '⪾', - supdsub: '⫘', - supe: '⊇', - supedot: '⫄', - suphsol: '⟉', - suphsub: '⫗', - suplarr: '⥻', - supmult: '⫂', - supnE: '⫌', - supne: '⊋', - supplus: '⫀', - supset: '⊃', - supseteq: '⊇', - supseteqq: '⫆', - supsetneq: '⊋', - supsetneqq: '⫌', - supsim: '⫈', - supsub: '⫔', - supsup: '⫖', - swArr: '⇙', - swarhk: '⤦', - swarr: '↙', - swarrow: '↙', - swnwar: '⤪', - szlig: 'ß', - target: '⌖', - tau: 'τ', - tbrk: '⎴', - tcaron: 'ť', - tcedil: 'ţ', - tcy: 'т', - tdot: '⃛', - telrec: '⌕', - tfr: '𝔱', - there4: '∴', - therefore: '∴', - theta: 'θ', - thetasym: 'ϑ', - thetav: 'ϑ', - thickapprox: '≈', - thicksim: '∼', - thinsp: ' ', - thkap: '≈', - thksim: '∼', - thorn: 'þ', - tilde: '˜', - times: '×', - timesb: '⊠', - timesbar: '⨱', - timesd: '⨰', - tint: '∭', - toea: '⤨', - top: '⊤', - topbot: '⌶', - topcir: '⫱', - topf: '𝕥', - topfork: '⫚', - tosa: '⤩', - tprime: '‴', - trade: '™', - triangle: '▵', - triangledown: '▿', - triangleleft: '◃', - trianglelefteq: '⊴', - triangleq: '≜', - triangleright: '▹', - trianglerighteq: '⊵', - tridot: '◬', - trie: '≜', - triminus: '⨺', - triplus: '⨹', - trisb: '⧍', - tritime: '⨻', - trpezium: '⏢', - tscr: '𝓉', - tscy: 'ц', - tshcy: 'ћ', - tstrok: 'ŧ', - twixt: '≬', - twoheadleftarrow: '↞', - twoheadrightarrow: '↠', - uArr: '⇑', - uHar: '⥣', - uacute: 'ú', - uarr: '↑', - ubrcy: 'ў', - ubreve: 'ŭ', - ucirc: 'û', - ucy: 'у', - udarr: '⇅', - udblac: 'ű', - udhar: '⥮', - ufisht: '⥾', - ufr: '𝔲', - ugrave: 'ù', - uharl: '↿', - uharr: '↾', - uhblk: '▀', - ulcorn: '⌜', - ulcorner: '⌜', - ulcrop: '⌏', - ultri: '◸', - umacr: 'ū', - uml: '¨', - uogon: 'ų', - uopf: '𝕦', - uparrow: '↑', - updownarrow: '↕', - upharpoonleft: '↿', - upharpoonright: '↾', - uplus: '⊎', - upsi: 'υ', - upsih: 'ϒ', - upsilon: 'υ', - upuparrows: '⇈', - urcorn: '⌝', - urcorner: '⌝', - urcrop: '⌎', - uring: 'ů', - urtri: '◹', - uscr: '𝓊', - utdot: '⋰', - utilde: 'ũ', - utri: '▵', - utrif: '▴', - uuarr: '⇈', - uuml: 'ü', - uwangle: '⦧', - vArr: '⇕', - vBar: '⫨', - vBarv: '⫩', - vDash: '⊨', - vangrt: '⦜', - varepsilon: 'ϵ', - varkappa: 'ϰ', - varnothing: '∅', - varphi: 'ϕ', - varpi: 'ϖ', - varpropto: '∝', - varr: '↕', - varrho: 'ϱ', - varsigma: 'ς', - varsubsetneq: '⊊︀', - varsubsetneqq: '⫋︀', - varsupsetneq: '⊋︀', - varsupsetneqq: '⫌︀', - vartheta: 'ϑ', - vartriangleleft: '⊲', - vartriangleright: '⊳', - vcy: 'в', - vdash: '⊢', - vee: '∨', - veebar: '⊻', - veeeq: '≚', - vellip: '⋮', - verbar: '|', - vert: '|', - vfr: '𝔳', - vltri: '⊲', - vnsub: '⊂⃒', - vnsup: '⊃⃒', - vopf: '𝕧', - vprop: '∝', - vrtri: '⊳', - vscr: '𝓋', - vsubnE: '⫋︀', - vsubne: '⊊︀', - vsupnE: '⫌︀', - vsupne: '⊋︀', - vzigzag: '⦚', - wcirc: 'ŵ', - wedbar: '⩟', - wedge: '∧', - wedgeq: '≙', - weierp: '℘', - wfr: '𝔴', - wopf: '𝕨', - wp: '℘', - wr: '≀', - wreath: '≀', - wscr: '𝓌', - xcap: '⋂', - xcirc: '◯', - xcup: '⋃', - xdtri: '▽', - xfr: '𝔵', - xhArr: '⟺', - xharr: '⟷', - xi: 'ξ', - xlArr: '⟸', - xlarr: '⟵', - xmap: '⟼', - xnis: '⋻', - xodot: '⨀', - xopf: '𝕩', - xoplus: '⨁', - xotime: '⨂', - xrArr: '⟹', - xrarr: '⟶', - xscr: '𝓍', - xsqcup: '⨆', - xuplus: '⨄', - xutri: '△', - xvee: '⋁', - xwedge: '⋀', - yacute: 'ý', - yacy: 'я', - ycirc: 'ŷ', - ycy: 'ы', - yen: '¥', - yfr: '𝔶', - yicy: 'ї', - yopf: '𝕪', - yscr: '𝓎', - yucy: 'ю', - yuml: 'ÿ', - zacute: 'ź', - zcaron: 'ž', - zcy: 'з', - zdot: 'ż', - zeetrf: 'ℨ', - zeta: 'ζ', - zfr: '𝔷', - zhcy: 'ж', - zigrarr: '⇝', - zopf: '𝕫', - zscr: '𝓏', - zwj: '‍', - zwnj: '‌' -} - -;// CONCATENATED MODULE: ./node_modules/decode-named-character-reference/index.js - - -const own = {}.hasOwnProperty - -/** - * Decode a single character reference (without the `&` or `;`). - * You probably only need this when you’re building parsers yourself that follow - * different rules compared to HTML. - * This is optimized to be tiny in browsers. - * - * @param {string} value - * `notin` (named), `#123` (deci), `#x123` (hexa). - * @returns {string|false} - * Decoded reference. - */ -function decodeNamedCharacterReference(value) { - return own.call(characterEntities, value) ? characterEntities[value] : false -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/character-reference.js -/** - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const characterReference = { - name: 'characterReference', - tokenize: tokenizeCharacterReference -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeCharacterReference(effects, ok, nok) { - const self = this - let size = 0 - /** @type {number} */ - let max - /** @type {(code: Code) => boolean} */ - let test - return start - - /** - * Start of character reference. - * - * ```markdown - * > | a&b - * ^ - * > | a{b - * ^ - * > | a b - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter('characterReference') - effects.enter('characterReferenceMarker') - effects.consume(code) - effects.exit('characterReferenceMarker') - return open - } - - /** - * After `&`, at `#` for numeric references or alphanumeric for named - * references. - * - * ```markdown - * > | a&b - * ^ - * > | a{b - * ^ - * > | a b - * ^ - * ``` - * - * @type {State} - */ - function open(code) { - if (code === 35) { - effects.enter('characterReferenceMarkerNumeric') - effects.consume(code) - effects.exit('characterReferenceMarkerNumeric') - return numeric - } - effects.enter('characterReferenceValue') - max = 31 - test = asciiAlphanumeric - return value(code) - } - - /** - * After `#`, at `x` for hexadecimals or digit for decimals. - * - * ```markdown - * > | a{b - * ^ - * > | a b - * ^ - * ``` - * - * @type {State} - */ - function numeric(code) { - if (code === 88 || code === 120) { - effects.enter('characterReferenceMarkerHexadecimal') - effects.consume(code) - effects.exit('characterReferenceMarkerHexadecimal') - effects.enter('characterReferenceValue') - max = 6 - test = asciiHexDigit - return value - } - effects.enter('characterReferenceValue') - max = 7 - test = asciiDigit - return value(code) - } - - /** - * After markers (`&#x`, `&#`, or `&`), in value, before `;`. - * - * The character reference kind defines what and how many characters are - * allowed. - * - * ```markdown - * > | a&b - * ^^^ - * > | a{b - * ^^^ - * > | a b - * ^ - * ``` - * - * @type {State} - */ - function value(code) { - if (code === 59 && size) { - const token = effects.exit('characterReferenceValue') - if ( - test === asciiAlphanumeric && - !decodeNamedCharacterReference(self.sliceSerialize(token)) - ) { - return nok(code) - } - - // To do: `markdown-rs` uses a different name: - // `CharacterReferenceMarkerSemi`. - effects.enter('characterReferenceMarker') - effects.consume(code) - effects.exit('characterReferenceMarker') - effects.exit('characterReference') - return ok - } - if (test(code) && size++ < max) { - effects.consume(code) - return value - } - return nok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/character-escape.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - -/** @type {Construct} */ -const characterEscape = { - name: 'characterEscape', - tokenize: tokenizeCharacterEscape -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeCharacterEscape(effects, ok, nok) { - return start - - /** - * Start of character escape. - * - * ```markdown - * > | a\*b - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter('characterEscape') - effects.enter('escapeMarker') - effects.consume(code) - effects.exit('escapeMarker') - return inside - } - - /** - * After `\`, at punctuation. - * - * ```markdown - * > | a\*b - * ^ - * ``` - * - * @type {State} - */ - function inside(code) { - // ASCII punctuation. - if (asciiPunctuation(code)) { - effects.enter('characterEscapeValue') - effects.consume(code) - effects.exit('characterEscapeValue') - effects.exit('characterEscape') - return ok - } - return nok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/line-ending.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const lineEnding = { - name: 'lineEnding', - tokenize: tokenizeLineEnding -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeLineEnding(effects, ok) { - return start - - /** @type {State} */ - function start(code) { - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return factorySpace(effects, ok, 'linePrefix') - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/label-end.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').Event} Event - * @typedef {import('micromark-util-types').Resolver} Resolver - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').Token} Token - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - - - - - - - -/** @type {Construct} */ -const labelEnd = { - name: 'labelEnd', - tokenize: tokenizeLabelEnd, - resolveTo: resolveToLabelEnd, - resolveAll: resolveAllLabelEnd -} - -/** @type {Construct} */ -const resourceConstruct = { - tokenize: tokenizeResource -} -/** @type {Construct} */ -const referenceFullConstruct = { - tokenize: tokenizeReferenceFull -} -/** @type {Construct} */ -const referenceCollapsedConstruct = { - tokenize: tokenizeReferenceCollapsed -} - -/** @type {Resolver} */ -function resolveAllLabelEnd(events) { - let index = -1 - while (++index < events.length) { - const token = events[index][1] - if ( - token.type === 'labelImage' || - token.type === 'labelLink' || - token.type === 'labelEnd' - ) { - // Remove the marker. - events.splice(index + 1, token.type === 'labelImage' ? 4 : 2) - token.type = 'data' - index++ - } - } - return events -} - -/** @type {Resolver} */ -function resolveToLabelEnd(events, context) { - let index = events.length - let offset = 0 - /** @type {Token} */ - let token - /** @type {number | undefined} */ - let open - /** @type {number | undefined} */ - let close - /** @type {Array} */ - let media - - // Find an opening. - while (index--) { - token = events[index][1] - if (open) { - // If we see another link, or inactive link label, we’ve been here before. - if ( - token.type === 'link' || - (token.type === 'labelLink' && token._inactive) - ) { - break - } - - // Mark other link openings as inactive, as we can’t have links in - // links. - if (events[index][0] === 'enter' && token.type === 'labelLink') { - token._inactive = true - } - } else if (close) { - if ( - events[index][0] === 'enter' && - (token.type === 'labelImage' || token.type === 'labelLink') && - !token._balanced - ) { - open = index - if (token.type !== 'labelLink') { - offset = 2 - break - } - } - } else if (token.type === 'labelEnd') { - close = index - } - } - const group = { - type: events[open][1].type === 'labelLink' ? 'link' : 'image', - start: Object.assign({}, events[open][1].start), - end: Object.assign({}, events[events.length - 1][1].end) - } - const label = { - type: 'label', - start: Object.assign({}, events[open][1].start), - end: Object.assign({}, events[close][1].end) - } - const text = { - type: 'labelText', - start: Object.assign({}, events[open + offset + 2][1].end), - end: Object.assign({}, events[close - 2][1].start) - } - media = [ - ['enter', group, context], - ['enter', label, context] - ] - - // Opening marker. - media = push(media, events.slice(open + 1, open + offset + 3)) - - // Text open. - media = push(media, [['enter', text, context]]) - - // Always populated by defaults. - - // Between. - media = push( - media, - resolveAll( - context.parser.constructs.insideSpan.null, - events.slice(open + offset + 4, close - 3), - context - ) - ) - - // Text close, marker close, label close. - media = push(media, [ - ['exit', text, context], - events[close - 2], - events[close - 1], - ['exit', label, context] - ]) - - // Reference, resource, or so. - media = push(media, events.slice(close + 1)) - - // Media close. - media = push(media, [['exit', group, context]]) - splice(events, open, events.length, media) - return events -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeLabelEnd(effects, ok, nok) { - const self = this - let index = self.events.length - /** @type {Token} */ - let labelStart - /** @type {boolean} */ - let defined - - // Find an opening. - while (index--) { - if ( - (self.events[index][1].type === 'labelImage' || - self.events[index][1].type === 'labelLink') && - !self.events[index][1]._balanced - ) { - labelStart = self.events[index][1] - break - } - } - return start - - /** - * Start of label end. - * - * ```markdown - * > | [a](b) c - * ^ - * > | [a][b] c - * ^ - * > | [a][] b - * ^ - * > | [a] b - * ``` - * - * @type {State} - */ - function start(code) { - // If there is not an okay opening. - if (!labelStart) { - return nok(code) - } - - // If the corresponding label (link) start is marked as inactive, - // it means we’d be wrapping a link, like this: - // - // ```markdown - // > | a [b [c](d) e](f) g. - // ^ - // ``` - // - // We can’t have that, so it’s just balanced brackets. - if (labelStart._inactive) { - return labelEndNok(code) - } - defined = self.parser.defined.includes( - normalizeIdentifier( - self.sliceSerialize({ - start: labelStart.end, - end: self.now() - }) - ) - ) - effects.enter('labelEnd') - effects.enter('labelMarker') - effects.consume(code) - effects.exit('labelMarker') - effects.exit('labelEnd') - return after - } - - /** - * After `]`. - * - * ```markdown - * > | [a](b) c - * ^ - * > | [a][b] c - * ^ - * > | [a][] b - * ^ - * > | [a] b - * ^ - * ``` - * - * @type {State} - */ - function after(code) { - // Note: `markdown-rs` also parses GFM footnotes here, which for us is in - // an extension. - - // Resource (`[asd](fgh)`)? - if (code === 40) { - return effects.attempt( - resourceConstruct, - labelEndOk, - defined ? labelEndOk : labelEndNok - )(code) - } - - // Full (`[asd][fgh]`) or collapsed (`[asd][]`) reference? - if (code === 91) { - return effects.attempt( - referenceFullConstruct, - labelEndOk, - defined ? referenceNotFull : labelEndNok - )(code) - } - - // Shortcut (`[asd]`) reference? - return defined ? labelEndOk(code) : labelEndNok(code) - } - - /** - * After `]`, at `[`, but not at a full reference. - * - * > 👉 **Note**: we only get here if the label is defined. - * - * ```markdown - * > | [a][] b - * ^ - * > | [a] b - * ^ - * ``` - * - * @type {State} - */ - function referenceNotFull(code) { - return effects.attempt( - referenceCollapsedConstruct, - labelEndOk, - labelEndNok - )(code) - } - - /** - * Done, we found something. - * - * ```markdown - * > | [a](b) c - * ^ - * > | [a][b] c - * ^ - * > | [a][] b - * ^ - * > | [a] b - * ^ - * ``` - * - * @type {State} - */ - function labelEndOk(code) { - // Note: `markdown-rs` does a bunch of stuff here. - return ok(code) - } - - /** - * Done, it’s nothing. - * - * There was an okay opening, but we didn’t match anything. - * - * ```markdown - * > | [a](b c - * ^ - * > | [a][b c - * ^ - * > | [a] b - * ^ - * ``` - * - * @type {State} - */ - function labelEndNok(code) { - labelStart._balanced = true - return nok(code) - } -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeResource(effects, ok, nok) { - return resourceStart - - /** - * At a resource. - * - * ```markdown - * > | [a](b) c - * ^ - * ``` - * - * @type {State} - */ - function resourceStart(code) { - effects.enter('resource') - effects.enter('resourceMarker') - effects.consume(code) - effects.exit('resourceMarker') - return resourceBefore - } - - /** - * In resource, after `(`, at optional whitespace. - * - * ```markdown - * > | [a](b) c - * ^ - * ``` - * - * @type {State} - */ - function resourceBefore(code) { - return markdownLineEndingOrSpace(code) - ? factoryWhitespace(effects, resourceOpen)(code) - : resourceOpen(code) - } - - /** - * In resource, after optional whitespace, at `)` or a destination. - * - * ```markdown - * > | [a](b) c - * ^ - * ``` - * - * @type {State} - */ - function resourceOpen(code) { - if (code === 41) { - return resourceEnd(code) - } - return factoryDestination( - effects, - resourceDestinationAfter, - resourceDestinationMissing, - 'resourceDestination', - 'resourceDestinationLiteral', - 'resourceDestinationLiteralMarker', - 'resourceDestinationRaw', - 'resourceDestinationString', - 32 - )(code) - } - - /** - * In resource, after destination, at optional whitespace. - * - * ```markdown - * > | [a](b) c - * ^ - * ``` - * - * @type {State} - */ - function resourceDestinationAfter(code) { - return markdownLineEndingOrSpace(code) - ? factoryWhitespace(effects, resourceBetween)(code) - : resourceEnd(code) - } - - /** - * At invalid destination. - * - * ```markdown - * > | [a](<<) b - * ^ - * ``` - * - * @type {State} - */ - function resourceDestinationMissing(code) { - return nok(code) - } - - /** - * In resource, after destination and whitespace, at `(` or title. - * - * ```markdown - * > | [a](b ) c - * ^ - * ``` - * - * @type {State} - */ - function resourceBetween(code) { - if (code === 34 || code === 39 || code === 40) { - return factoryTitle( - effects, - resourceTitleAfter, - nok, - 'resourceTitle', - 'resourceTitleMarker', - 'resourceTitleString' - )(code) - } - return resourceEnd(code) - } - - /** - * In resource, after title, at optional whitespace. - * - * ```markdown - * > | [a](b "c") d - * ^ - * ``` - * - * @type {State} - */ - function resourceTitleAfter(code) { - return markdownLineEndingOrSpace(code) - ? factoryWhitespace(effects, resourceEnd)(code) - : resourceEnd(code) - } - - /** - * In resource, at `)`. - * - * ```markdown - * > | [a](b) d - * ^ - * ``` - * - * @type {State} - */ - function resourceEnd(code) { - if (code === 41) { - effects.enter('resourceMarker') - effects.consume(code) - effects.exit('resourceMarker') - effects.exit('resource') - return ok - } - return nok(code) - } -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeReferenceFull(effects, ok, nok) { - const self = this - return referenceFull - - /** - * In a reference (full), at the `[`. - * - * ```markdown - * > | [a][b] d - * ^ - * ``` - * - * @type {State} - */ - function referenceFull(code) { - return factoryLabel.call( - self, - effects, - referenceFullAfter, - referenceFullMissing, - 'reference', - 'referenceMarker', - 'referenceString' - )(code) - } - - /** - * In a reference (full), after `]`. - * - * ```markdown - * > | [a][b] d - * ^ - * ``` - * - * @type {State} - */ - function referenceFullAfter(code) { - return self.parser.defined.includes( - normalizeIdentifier( - self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1) - ) - ) - ? ok(code) - : nok(code) - } - - /** - * In reference (full) that was missing. - * - * ```markdown - * > | [a][b d - * ^ - * ``` - * - * @type {State} - */ - function referenceFullMissing(code) { - return nok(code) - } -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeReferenceCollapsed(effects, ok, nok) { - return referenceCollapsedStart - - /** - * In reference (collapsed), at `[`. - * - * > 👉 **Note**: we only get here if the label is defined. - * - * ```markdown - * > | [a][] d - * ^ - * ``` - * - * @type {State} - */ - function referenceCollapsedStart(code) { - // We only attempt a collapsed label if there’s a `[`. - - effects.enter('reference') - effects.enter('referenceMarker') - effects.consume(code) - effects.exit('referenceMarker') - return referenceCollapsedOpen - } - - /** - * In reference (collapsed), at `]`. - * - * > 👉 **Note**: we only get here if the label is defined. - * - * ```markdown - * > | [a][] d - * ^ - * ``` - * - * @type {State} - */ - function referenceCollapsedOpen(code) { - if (code === 93) { - effects.enter('referenceMarker') - effects.consume(code) - effects.exit('referenceMarker') - effects.exit('reference') - return ok - } - return nok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/label-start-image.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const labelStartImage = { - name: 'labelStartImage', - tokenize: tokenizeLabelStartImage, - resolveAll: labelEnd.resolveAll -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeLabelStartImage(effects, ok, nok) { - const self = this - return start - - /** - * Start of label (image) start. - * - * ```markdown - * > | a ![b] c - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter('labelImage') - effects.enter('labelImageMarker') - effects.consume(code) - effects.exit('labelImageMarker') - return open - } - - /** - * After `!`, at `[`. - * - * ```markdown - * > | a ![b] c - * ^ - * ``` - * - * @type {State} - */ - function open(code) { - if (code === 91) { - effects.enter('labelMarker') - effects.consume(code) - effects.exit('labelMarker') - effects.exit('labelImage') - return after - } - return nok(code) - } - - /** - * After `![`. - * - * ```markdown - * > | a ![b] c - * ^ - * ``` - * - * This is needed in because, when GFM footnotes are enabled, images never - * form when started with a `^`. - * Instead, links form: - * - * ```markdown - * ![^a](b) - * - * ![^a][b] - * - * [b]: c - * ``` - * - * ```html - *

    !^a

    - *

    !^a

    - * ``` - * - * @type {State} - */ - function after(code) { - // To do: use a new field to do this, this is still needed for - // `micromark-extension-gfm-footnote`, but the `label-start-link` - // behavior isn’t. - // Hidden footnotes hook. - /* c8 ignore next 3 */ - return code === 94 && '_hiddenFootnoteSupport' in self.parser.constructs - ? nok(code) - : ok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-classify-character/index.js -/** - * @typedef {import('micromark-util-types').Code} Code - */ - - -/** - * Classify whether a code represents whitespace, punctuation, or something - * else. - * - * Used for attention (emphasis, strong), whose sequences can open or close - * based on the class of surrounding characters. - * - * > 👉 **Note**: eof (`null`) is seen as whitespace. - * - * @param {Code} code - * Code. - * @returns {typeof constants.characterGroupWhitespace | typeof constants.characterGroupPunctuation | undefined} - * Group. - */ -function classifyCharacter(code) { - if ( - code === null || - markdownLineEndingOrSpace(code) || - unicodeWhitespace(code) - ) { - return 1 - } - if (unicodePunctuation(code)) { - return 2 - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/attention.js -/** - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').Event} Event - * @typedef {import('micromark-util-types').Point} Point - * @typedef {import('micromark-util-types').Resolver} Resolver - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').Token} Token - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - - -/** @type {Construct} */ -const attention = { - name: 'attention', - tokenize: tokenizeAttention, - resolveAll: resolveAllAttention -} - -/** - * Take all events and resolve attention to emphasis or strong. - * - * @type {Resolver} - */ -function resolveAllAttention(events, context) { - let index = -1 - /** @type {number} */ - let open - /** @type {Token} */ - let group - /** @type {Token} */ - let text - /** @type {Token} */ - let openingSequence - /** @type {Token} */ - let closingSequence - /** @type {number} */ - let use - /** @type {Array} */ - let nextEvents - /** @type {number} */ - let offset - - // Walk through all events. - // - // Note: performance of this is fine on an mb of normal markdown, but it’s - // a bottleneck for malicious stuff. - while (++index < events.length) { - // Find a token that can close. - if ( - events[index][0] === 'enter' && - events[index][1].type === 'attentionSequence' && - events[index][1]._close - ) { - open = index - - // Now walk back to find an opener. - while (open--) { - // Find a token that can open the closer. - if ( - events[open][0] === 'exit' && - events[open][1].type === 'attentionSequence' && - events[open][1]._open && - // If the markers are the same: - context.sliceSerialize(events[open][1]).charCodeAt(0) === - context.sliceSerialize(events[index][1]).charCodeAt(0) - ) { - // If the opening can close or the closing can open, - // and the close size *is not* a multiple of three, - // but the sum of the opening and closing size *is* multiple of three, - // then don’t match. - if ( - (events[open][1]._close || events[index][1]._open) && - (events[index][1].end.offset - events[index][1].start.offset) % 3 && - !( - (events[open][1].end.offset - - events[open][1].start.offset + - events[index][1].end.offset - - events[index][1].start.offset) % - 3 - ) - ) { - continue - } - - // Number of markers to use from the sequence. - use = - events[open][1].end.offset - events[open][1].start.offset > 1 && - events[index][1].end.offset - events[index][1].start.offset > 1 - ? 2 - : 1 - const start = Object.assign({}, events[open][1].end) - const end = Object.assign({}, events[index][1].start) - movePoint(start, -use) - movePoint(end, use) - openingSequence = { - type: use > 1 ? 'strongSequence' : 'emphasisSequence', - start, - end: Object.assign({}, events[open][1].end) - } - closingSequence = { - type: use > 1 ? 'strongSequence' : 'emphasisSequence', - start: Object.assign({}, events[index][1].start), - end - } - text = { - type: use > 1 ? 'strongText' : 'emphasisText', - start: Object.assign({}, events[open][1].end), - end: Object.assign({}, events[index][1].start) - } - group = { - type: use > 1 ? 'strong' : 'emphasis', - start: Object.assign({}, openingSequence.start), - end: Object.assign({}, closingSequence.end) - } - events[open][1].end = Object.assign({}, openingSequence.start) - events[index][1].start = Object.assign({}, closingSequence.end) - nextEvents = [] - - // If there are more markers in the opening, add them before. - if (events[open][1].end.offset - events[open][1].start.offset) { - nextEvents = push(nextEvents, [ - ['enter', events[open][1], context], - ['exit', events[open][1], context] - ]) - } - - // Opening. - nextEvents = push(nextEvents, [ - ['enter', group, context], - ['enter', openingSequence, context], - ['exit', openingSequence, context], - ['enter', text, context] - ]) - - // Always populated by defaults. - - // Between. - nextEvents = push( - nextEvents, - resolveAll( - context.parser.constructs.insideSpan.null, - events.slice(open + 1, index), - context - ) - ) - - // Closing. - nextEvents = push(nextEvents, [ - ['exit', text, context], - ['enter', closingSequence, context], - ['exit', closingSequence, context], - ['exit', group, context] - ]) - - // If there are more markers in the closing, add them after. - if (events[index][1].end.offset - events[index][1].start.offset) { - offset = 2 - nextEvents = push(nextEvents, [ - ['enter', events[index][1], context], - ['exit', events[index][1], context] - ]) - } else { - offset = 0 - } - splice(events, open - 1, index - open + 3, nextEvents) - index = open + nextEvents.length - offset - 2 - break - } - } - } - } - - // Remove remaining sequences. - index = -1 - while (++index < events.length) { - if (events[index][1].type === 'attentionSequence') { - events[index][1].type = 'data' - } - } - return events -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeAttention(effects, ok) { - const attentionMarkers = this.parser.constructs.attentionMarkers.null - const previous = this.previous - const before = classifyCharacter(previous) - - /** @type {NonNullable} */ - let marker - return start - - /** - * Before a sequence. - * - * ```markdown - * > | ** - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - marker = code - effects.enter('attentionSequence') - return inside(code) - } - - /** - * In a sequence. - * - * ```markdown - * > | ** - * ^^ - * ``` - * - * @type {State} - */ - function inside(code) { - if (code === marker) { - effects.consume(code) - return inside - } - const token = effects.exit('attentionSequence') - - // To do: next major: move this to resolver, just like `markdown-rs`. - const after = classifyCharacter(code) - - // Always populated by defaults. - - const open = - !after || (after === 2 && before) || attentionMarkers.includes(code) - const close = - !before || (before === 2 && after) || attentionMarkers.includes(previous) - token._open = Boolean(marker === 42 ? open : open && (before || !close)) - token._close = Boolean(marker === 42 ? close : close && (after || !open)) - return ok(code) - } -} - -/** - * Move a point a bit. - * - * Note: `move` only works inside lines! It’s not possible to move past other - * chunks (replacement characters, tabs, or line endings). - * - * @param {Point} point - * @param {number} offset - * @returns {void} - */ -function movePoint(point, offset) { - point.column += offset - point.offset += offset - point._bufferIndex += offset -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/autolink.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - -/** @type {Construct} */ -const autolink = { - name: 'autolink', - tokenize: tokenizeAutolink -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeAutolink(effects, ok, nok) { - let size = 0 - return start - - /** - * Start of an autolink. - * - * ```markdown - * > | ab - * ^ - * > | ab - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter('autolink') - effects.enter('autolinkMarker') - effects.consume(code) - effects.exit('autolinkMarker') - effects.enter('autolinkProtocol') - return open - } - - /** - * After `<`, at protocol or atext. - * - * ```markdown - * > | ab - * ^ - * > | ab - * ^ - * ``` - * - * @type {State} - */ - function open(code) { - if (asciiAlpha(code)) { - effects.consume(code) - return schemeOrEmailAtext - } - return emailAtext(code) - } - - /** - * At second byte of protocol or atext. - * - * ```markdown - * > | ab - * ^ - * > | ab - * ^ - * ``` - * - * @type {State} - */ - function schemeOrEmailAtext(code) { - // ASCII alphanumeric and `+`, `-`, and `.`. - if (code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code)) { - // Count the previous alphabetical from `open` too. - size = 1 - return schemeInsideOrEmailAtext(code) - } - return emailAtext(code) - } - - /** - * In ambiguous protocol or atext. - * - * ```markdown - * > | ab - * ^ - * > | ab - * ^ - * ``` - * - * @type {State} - */ - function schemeInsideOrEmailAtext(code) { - if (code === 58) { - effects.consume(code) - size = 0 - return urlInside - } - - // ASCII alphanumeric and `+`, `-`, and `.`. - if ( - (code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code)) && - size++ < 32 - ) { - effects.consume(code) - return schemeInsideOrEmailAtext - } - size = 0 - return emailAtext(code) - } - - /** - * After protocol, in URL. - * - * ```markdown - * > | ab - * ^ - * ``` - * - * @type {State} - */ - function urlInside(code) { - if (code === 62) { - effects.exit('autolinkProtocol') - effects.enter('autolinkMarker') - effects.consume(code) - effects.exit('autolinkMarker') - effects.exit('autolink') - return ok - } - - // ASCII control, space, or `<`. - if (code === null || code === 32 || code === 60 || asciiControl(code)) { - return nok(code) - } - effects.consume(code) - return urlInside - } - - /** - * In email atext. - * - * ```markdown - * > | ab - * ^ - * ``` - * - * @type {State} - */ - function emailAtext(code) { - if (code === 64) { - effects.consume(code) - return emailAtSignOrDot - } - if (asciiAtext(code)) { - effects.consume(code) - return emailAtext - } - return nok(code) - } - - /** - * In label, after at-sign or dot. - * - * ```markdown - * > | ab - * ^ ^ - * ``` - * - * @type {State} - */ - function emailAtSignOrDot(code) { - return asciiAlphanumeric(code) ? emailLabel(code) : nok(code) - } - - /** - * In label, where `.` and `>` are allowed. - * - * ```markdown - * > | ab - * ^ - * ``` - * - * @type {State} - */ - function emailLabel(code) { - if (code === 46) { - effects.consume(code) - size = 0 - return emailAtSignOrDot - } - if (code === 62) { - // Exit, then change the token type. - effects.exit('autolinkProtocol').type = 'autolinkEmail' - effects.enter('autolinkMarker') - effects.consume(code) - effects.exit('autolinkMarker') - effects.exit('autolink') - return ok - } - return emailValue(code) - } - - /** - * In label, where `.` and `>` are *not* allowed. - * - * Though, this is also used in `emailLabel` to parse other values. - * - * ```markdown - * > | ab - * ^ - * ``` - * - * @type {State} - */ - function emailValue(code) { - // ASCII alphanumeric or `-`. - if ((code === 45 || asciiAlphanumeric(code)) && size++ < 63) { - const next = code === 45 ? emailValue : emailLabel - effects.consume(code) - return next - } - return nok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/html-text.js -/** - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const htmlText = { - name: 'htmlText', - tokenize: tokenizeHtmlText -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeHtmlText(effects, ok, nok) { - const self = this - /** @type {NonNullable | undefined} */ - let marker - /** @type {number} */ - let index - /** @type {State} */ - let returnState - return start - - /** - * Start of HTML (text). - * - * ```markdown - * > | a c - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter('htmlText') - effects.enter('htmlTextData') - effects.consume(code) - return open - } - - /** - * After `<`, at tag name or other stuff. - * - * ```markdown - * > | a c - * ^ - * > | a c - * ^ - * > | a c - * ^ - * ``` - * - * @type {State} - */ - function open(code) { - if (code === 33) { - effects.consume(code) - return declarationOpen - } - if (code === 47) { - effects.consume(code) - return tagCloseStart - } - if (code === 63) { - effects.consume(code) - return instruction - } - - // ASCII alphabetical. - if (asciiAlpha(code)) { - effects.consume(code) - return tagOpen - } - return nok(code) - } - - /** - * After ` | a c - * ^ - * > | a c - * ^ - * > | a &<]]> c - * ^ - * ``` - * - * @type {State} - */ - function declarationOpen(code) { - if (code === 45) { - effects.consume(code) - return commentOpenInside - } - if (code === 91) { - effects.consume(code) - index = 0 - return cdataOpenInside - } - if (asciiAlpha(code)) { - effects.consume(code) - return declaration - } - return nok(code) - } - - /** - * In a comment, after ` | a c - * ^ - * ``` - * - * @type {State} - */ - function commentOpenInside(code) { - if (code === 45) { - effects.consume(code) - return commentEnd - } - return nok(code) - } - - /** - * In comment. - * - * ```markdown - * > | a c - * ^ - * ``` - * - * @type {State} - */ - function comment(code) { - if (code === null) { - return nok(code) - } - if (code === 45) { - effects.consume(code) - return commentClose - } - if (markdownLineEnding(code)) { - returnState = comment - return lineEndingBefore(code) - } - effects.consume(code) - return comment - } - - /** - * In comment, after `-`. - * - * ```markdown - * > | a c - * ^ - * ``` - * - * @type {State} - */ - function commentClose(code) { - if (code === 45) { - effects.consume(code) - return commentEnd - } - return comment(code) - } - - /** - * In comment, after `--`. - * - * ```markdown - * > | a c - * ^ - * ``` - * - * @type {State} - */ - function commentEnd(code) { - return code === 62 - ? end(code) - : code === 45 - ? commentClose(code) - : comment(code) - } - - /** - * After ` | a &<]]> b - * ^^^^^^ - * ``` - * - * @type {State} - */ - function cdataOpenInside(code) { - const value = 'CDATA[' - if (code === value.charCodeAt(index++)) { - effects.consume(code) - return index === value.length ? cdata : cdataOpenInside - } - return nok(code) - } - - /** - * In CDATA. - * - * ```markdown - * > | a &<]]> b - * ^^^ - * ``` - * - * @type {State} - */ - function cdata(code) { - if (code === null) { - return nok(code) - } - if (code === 93) { - effects.consume(code) - return cdataClose - } - if (markdownLineEnding(code)) { - returnState = cdata - return lineEndingBefore(code) - } - effects.consume(code) - return cdata - } - - /** - * In CDATA, after `]`, at another `]`. - * - * ```markdown - * > | a &<]]> b - * ^ - * ``` - * - * @type {State} - */ - function cdataClose(code) { - if (code === 93) { - effects.consume(code) - return cdataEnd - } - return cdata(code) - } - - /** - * In CDATA, after `]]`, at `>`. - * - * ```markdown - * > | a &<]]> b - * ^ - * ``` - * - * @type {State} - */ - function cdataEnd(code) { - if (code === 62) { - return end(code) - } - if (code === 93) { - effects.consume(code) - return cdataEnd - } - return cdata(code) - } - - /** - * In declaration. - * - * ```markdown - * > | a c - * ^ - * ``` - * - * @type {State} - */ - function declaration(code) { - if (code === null || code === 62) { - return end(code) - } - if (markdownLineEnding(code)) { - returnState = declaration - return lineEndingBefore(code) - } - effects.consume(code) - return declaration - } - - /** - * In instruction. - * - * ```markdown - * > | a c - * ^ - * ``` - * - * @type {State} - */ - function instruction(code) { - if (code === null) { - return nok(code) - } - if (code === 63) { - effects.consume(code) - return instructionClose - } - if (markdownLineEnding(code)) { - returnState = instruction - return lineEndingBefore(code) - } - effects.consume(code) - return instruction - } - - /** - * In instruction, after `?`, at `>`. - * - * ```markdown - * > | a c - * ^ - * ``` - * - * @type {State} - */ - function instructionClose(code) { - return code === 62 ? end(code) : instruction(code) - } - - /** - * After ` | a c - * ^ - * ``` - * - * @type {State} - */ - function tagCloseStart(code) { - // ASCII alphabetical. - if (asciiAlpha(code)) { - effects.consume(code) - return tagClose - } - return nok(code) - } - - /** - * After ` | a c - * ^ - * ``` - * - * @type {State} - */ - function tagClose(code) { - // ASCII alphanumerical and `-`. - if (code === 45 || asciiAlphanumeric(code)) { - effects.consume(code) - return tagClose - } - return tagCloseBetween(code) - } - - /** - * In closing tag, after tag name. - * - * ```markdown - * > | a
    c - * ^ - * ``` - * - * @type {State} - */ - function tagCloseBetween(code) { - if (markdownLineEnding(code)) { - returnState = tagCloseBetween - return lineEndingBefore(code) - } - if (markdownSpace(code)) { - effects.consume(code) - return tagCloseBetween - } - return end(code) - } - - /** - * After ` | a c - * ^ - * ``` - * - * @type {State} - */ - function tagOpen(code) { - // ASCII alphanumerical and `-`. - if (code === 45 || asciiAlphanumeric(code)) { - effects.consume(code) - return tagOpen - } - if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) { - return tagOpenBetween(code) - } - return nok(code) - } - - /** - * In opening tag, after tag name. - * - * ```markdown - * > | a c - * ^ - * ``` - * - * @type {State} - */ - function tagOpenBetween(code) { - if (code === 47) { - effects.consume(code) - return end - } - - // ASCII alphabetical and `:` and `_`. - if (code === 58 || code === 95 || asciiAlpha(code)) { - effects.consume(code) - return tagOpenAttributeName - } - if (markdownLineEnding(code)) { - returnState = tagOpenBetween - return lineEndingBefore(code) - } - if (markdownSpace(code)) { - effects.consume(code) - return tagOpenBetween - } - return end(code) - } - - /** - * In attribute name. - * - * ```markdown - * > | a d - * ^ - * ``` - * - * @type {State} - */ - function tagOpenAttributeName(code) { - // ASCII alphabetical and `-`, `.`, `:`, and `_`. - if ( - code === 45 || - code === 46 || - code === 58 || - code === 95 || - asciiAlphanumeric(code) - ) { - effects.consume(code) - return tagOpenAttributeName - } - return tagOpenAttributeNameAfter(code) - } - - /** - * After attribute name, before initializer, the end of the tag, or - * whitespace. - * - * ```markdown - * > | a d - * ^ - * ``` - * - * @type {State} - */ - function tagOpenAttributeNameAfter(code) { - if (code === 61) { - effects.consume(code) - return tagOpenAttributeValueBefore - } - if (markdownLineEnding(code)) { - returnState = tagOpenAttributeNameAfter - return lineEndingBefore(code) - } - if (markdownSpace(code)) { - effects.consume(code) - return tagOpenAttributeNameAfter - } - return tagOpenBetween(code) - } - - /** - * Before unquoted, double quoted, or single quoted attribute value, allowing - * whitespace. - * - * ```markdown - * > | a e - * ^ - * ``` - * - * @type {State} - */ - function tagOpenAttributeValueBefore(code) { - if ( - code === null || - code === 60 || - code === 61 || - code === 62 || - code === 96 - ) { - return nok(code) - } - if (code === 34 || code === 39) { - effects.consume(code) - marker = code - return tagOpenAttributeValueQuoted - } - if (markdownLineEnding(code)) { - returnState = tagOpenAttributeValueBefore - return lineEndingBefore(code) - } - if (markdownSpace(code)) { - effects.consume(code) - return tagOpenAttributeValueBefore - } - effects.consume(code) - return tagOpenAttributeValueUnquoted - } - - /** - * In double or single quoted attribute value. - * - * ```markdown - * > | a e - * ^ - * ``` - * - * @type {State} - */ - function tagOpenAttributeValueQuoted(code) { - if (code === marker) { - effects.consume(code) - marker = undefined - return tagOpenAttributeValueQuotedAfter - } - if (code === null) { - return nok(code) - } - if (markdownLineEnding(code)) { - returnState = tagOpenAttributeValueQuoted - return lineEndingBefore(code) - } - effects.consume(code) - return tagOpenAttributeValueQuoted - } - - /** - * In unquoted attribute value. - * - * ```markdown - * > | a e - * ^ - * ``` - * - * @type {State} - */ - function tagOpenAttributeValueUnquoted(code) { - if ( - code === null || - code === 34 || - code === 39 || - code === 60 || - code === 61 || - code === 96 - ) { - return nok(code) - } - if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) { - return tagOpenBetween(code) - } - effects.consume(code) - return tagOpenAttributeValueUnquoted - } - - /** - * After double or single quoted attribute value, before whitespace or the end - * of the tag. - * - * ```markdown - * > | a e - * ^ - * ``` - * - * @type {State} - */ - function tagOpenAttributeValueQuotedAfter(code) { - if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) { - return tagOpenBetween(code) - } - return nok(code) - } - - /** - * In certain circumstances of a tag where only an `>` is allowed. - * - * ```markdown - * > | a e - * ^ - * ``` - * - * @type {State} - */ - function end(code) { - if (code === 62) { - effects.consume(code) - effects.exit('htmlTextData') - effects.exit('htmlText') - return ok - } - return nok(code) - } - - /** - * At eol. - * - * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about - * > empty tokens. - * - * ```markdown - * > | a - * ``` - * - * @type {State} - */ - function lineEndingBefore(code) { - effects.exit('htmlTextData') - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return lineEndingAfter - } - - /** - * After eol, at optional whitespace. - * - * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about - * > empty tokens. - * - * ```markdown - * | a - * ^ - * ``` - * - * @type {State} - */ - function lineEndingAfter(code) { - // Always populated by defaults. - - return markdownSpace(code) - ? factorySpace( - effects, - lineEndingAfterPrefix, - 'linePrefix', - self.parser.constructs.disable.null.includes('codeIndented') - ? undefined - : 4 - )(code) - : lineEndingAfterPrefix(code) - } - - /** - * After eol, after optional whitespace. - * - * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about - * > empty tokens. - * - * ```markdown - * | a - * ^ - * ``` - * - * @type {State} - */ - function lineEndingAfterPrefix(code) { - effects.enter('htmlTextData') - return returnState(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/label-start-link.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const labelStartLink = { - name: 'labelStartLink', - tokenize: tokenizeLabelStartLink, - resolveAll: labelEnd.resolveAll -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeLabelStartLink(effects, ok, nok) { - const self = this - return start - - /** - * Start of label (link) start. - * - * ```markdown - * > | a [b] c - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter('labelLink') - effects.enter('labelMarker') - effects.consume(code) - effects.exit('labelMarker') - effects.exit('labelLink') - return after - } - - /** @type {State} */ - function after(code) { - // To do: this isn’t needed in `micromark-extension-gfm-footnote`, - // remove. - // Hidden footnotes hook. - /* c8 ignore next 3 */ - return code === 94 && '_hiddenFootnoteSupport' in self.parser.constructs - ? nok(code) - : ok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/hard-break-escape.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - -/** @type {Construct} */ -const hardBreakEscape = { - name: 'hardBreakEscape', - tokenize: tokenizeHardBreakEscape -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeHardBreakEscape(effects, ok, nok) { - return start - - /** - * Start of a hard break (escape). - * - * ```markdown - * > | a\ - * ^ - * | b - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter('hardBreakEscape') - effects.consume(code) - return after - } - - /** - * After `\`, at eol. - * - * ```markdown - * > | a\ - * ^ - * | b - * ``` - * - * @type {State} - */ - function after(code) { - if (markdownLineEnding(code)) { - effects.exit('hardBreakEscape') - return ok(code) - } - return nok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/code-text.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').Previous} Previous - * @typedef {import('micromark-util-types').Resolver} Resolver - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').Token} Token - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - -/** @type {Construct} */ -const codeText = { - name: 'codeText', - tokenize: tokenizeCodeText, - resolve: resolveCodeText, - previous -} - -// To do: next major: don’t resolve, like `markdown-rs`. -/** @type {Resolver} */ -function resolveCodeText(events) { - let tailExitIndex = events.length - 4 - let headEnterIndex = 3 - /** @type {number} */ - let index - /** @type {number | undefined} */ - let enter - - // If we start and end with an EOL or a space. - if ( - (events[headEnterIndex][1].type === 'lineEnding' || - events[headEnterIndex][1].type === 'space') && - (events[tailExitIndex][1].type === 'lineEnding' || - events[tailExitIndex][1].type === 'space') - ) { - index = headEnterIndex - - // And we have data. - while (++index < tailExitIndex) { - if (events[index][1].type === 'codeTextData') { - // Then we have padding. - events[headEnterIndex][1].type = 'codeTextPadding' - events[tailExitIndex][1].type = 'codeTextPadding' - headEnterIndex += 2 - tailExitIndex -= 2 - break - } - } - } - - // Merge adjacent spaces and data. - index = headEnterIndex - 1 - tailExitIndex++ - while (++index <= tailExitIndex) { - if (enter === undefined) { - if (index !== tailExitIndex && events[index][1].type !== 'lineEnding') { - enter = index - } - } else if ( - index === tailExitIndex || - events[index][1].type === 'lineEnding' - ) { - events[enter][1].type = 'codeTextData' - if (index !== enter + 2) { - events[enter][1].end = events[index - 1][1].end - events.splice(enter + 2, index - enter - 2) - tailExitIndex -= index - enter - 2 - index = enter + 2 - } - enter = undefined - } - } - return events -} - -/** - * @this {TokenizeContext} - * @type {Previous} - */ -function previous(code) { - // If there is a previous code, there will always be a tail. - return ( - code !== 96 || - this.events[this.events.length - 1][1].type === 'characterEscape' - ) -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeCodeText(effects, ok, nok) { - const self = this - let sizeOpen = 0 - /** @type {number} */ - let size - /** @type {Token} */ - let token - return start - - /** - * Start of code (text). - * - * ```markdown - * > | `a` - * ^ - * > | \`a` - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter('codeText') - effects.enter('codeTextSequence') - return sequenceOpen(code) - } - - /** - * In opening sequence. - * - * ```markdown - * > | `a` - * ^ - * ``` - * - * @type {State} - */ - function sequenceOpen(code) { - if (code === 96) { - effects.consume(code) - sizeOpen++ - return sequenceOpen - } - effects.exit('codeTextSequence') - return between(code) - } - - /** - * Between something and something else. - * - * ```markdown - * > | `a` - * ^^ - * ``` - * - * @type {State} - */ - function between(code) { - // EOF. - if (code === null) { - return nok(code) - } - - // To do: next major: don’t do spaces in resolve, but when compiling, - // like `markdown-rs`. - // Tabs don’t work, and virtual spaces don’t make sense. - if (code === 32) { - effects.enter('space') - effects.consume(code) - effects.exit('space') - return between - } - - // Closing fence? Could also be data. - if (code === 96) { - token = effects.enter('codeTextSequence') - size = 0 - return sequenceClose(code) - } - if (markdownLineEnding(code)) { - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return between - } - - // Data. - effects.enter('codeTextData') - return data(code) - } - - /** - * In data. - * - * ```markdown - * > | `a` - * ^ - * ``` - * - * @type {State} - */ - function data(code) { - if ( - code === null || - code === 32 || - code === 96 || - markdownLineEnding(code) - ) { - effects.exit('codeTextData') - return between(code) - } - effects.consume(code) - return data - } - - /** - * In closing sequence. - * - * ```markdown - * > | `a` - * ^ - * ``` - * - * @type {State} - */ - function sequenceClose(code) { - // More. - if (code === 96) { - effects.consume(code) - size++ - return sequenceClose - } - - // Done! - if (size === sizeOpen) { - effects.exit('codeTextSequence') - effects.exit('codeText') - return ok(code) - } - - // More or less accents: mark as data. - token.type = 'codeTextData' - return data(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/constructs.js -/** - * @typedef {import('micromark-util-types').Extension} Extension - */ - - - - -/** @satisfies {Extension['document']} */ -const constructs_document = { - [42]: list, - [43]: list, - [45]: list, - [48]: list, - [49]: list, - [50]: list, - [51]: list, - [52]: list, - [53]: list, - [54]: list, - [55]: list, - [56]: list, - [57]: list, - [62]: blockQuote -} - -/** @satisfies {Extension['contentInitial']} */ -const contentInitial = { - [91]: definition -} - -/** @satisfies {Extension['flowInitial']} */ -const flowInitial = { - [-2]: codeIndented, - [-1]: codeIndented, - [32]: codeIndented -} - -/** @satisfies {Extension['flow']} */ -const constructs_flow = { - [35]: headingAtx, - [42]: thematicBreak, - [45]: [setextUnderline, thematicBreak], - [60]: htmlFlow, - [61]: setextUnderline, - [95]: thematicBreak, - [96]: codeFenced, - [126]: codeFenced -} - -/** @satisfies {Extension['string']} */ -const constructs_string = { - [38]: characterReference, - [92]: characterEscape -} - -/** @satisfies {Extension['text']} */ -const constructs_text = { - [-5]: lineEnding, - [-4]: lineEnding, - [-3]: lineEnding, - [33]: labelStartImage, - [38]: characterReference, - [42]: attention, - [60]: [autolink, htmlText], - [91]: labelStartLink, - [92]: [hardBreakEscape, characterEscape], - [93]: labelEnd, - [95]: attention, - [96]: codeText -} - -/** @satisfies {Extension['insideSpan']} */ -const insideSpan = { - null: [attention, resolver] -} - -/** @satisfies {Extension['attentionMarkers']} */ -const attentionMarkers = { - null: [42, 95] -} - -/** @satisfies {Extension['disable']} */ -const disable = { - null: [] -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/parse.js -/** - * @typedef {import('micromark-util-types').Create} Create - * @typedef {import('micromark-util-types').FullNormalizedExtension} FullNormalizedExtension - * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct - * @typedef {import('micromark-util-types').ParseContext} ParseContext - * @typedef {import('micromark-util-types').ParseOptions} ParseOptions - */ - - - - - - - - - -/** - * @param {ParseOptions | null | undefined} [options] - * @returns {ParseContext} - */ -function parse(options) { - const settings = options || {} - const constructs = - /** @type {FullNormalizedExtension} */ - combineExtensions([constructs_namespaceObject, ...(settings.extensions || [])]) - - /** @type {ParseContext} */ - const parser = { - defined: [], - lazy: {}, - constructs, - content: create(content), - document: create(document_document), - flow: create(flow), - string: create(string), - text: create(text_text) - } - return parser - - /** - * @param {InitialConstruct} initial - */ - function create(initial) { - return creator - /** @type {Create} */ - function creator(from) { - return createTokenizer(parser, initial, from) - } - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/preprocess.js -/** - * @typedef {import('micromark-util-types').Chunk} Chunk - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Encoding} Encoding - * @typedef {import('micromark-util-types').Value} Value - */ - -/** - * @callback Preprocessor - * @param {Value} value - * @param {Encoding | null | undefined} [encoding] - * @param {boolean | null | undefined} [end=false] - * @returns {Array} - */ - -const search = /[\0\t\n\r]/g - -/** - * @returns {Preprocessor} - */ -function preprocess() { - let column = 1 - let buffer = '' - /** @type {boolean | undefined} */ - let start = true - /** @type {boolean | undefined} */ - let atCarriageReturn - return preprocessor - - /** @type {Preprocessor} */ - function preprocessor(value, encoding, end) { - /** @type {Array} */ - const chunks = [] - /** @type {RegExpMatchArray | null} */ - let match - /** @type {number} */ - let next - /** @type {number} */ - let startPosition - /** @type {number} */ - let endPosition - /** @type {Code} */ - let code - - // @ts-expect-error `Buffer` does allow an encoding. - value = buffer + value.toString(encoding) - startPosition = 0 - buffer = '' - if (start) { - // To do: `markdown-rs` actually parses BOMs (byte order mark). - if (value.charCodeAt(0) === 65279) { - startPosition++ - } - start = undefined - } - while (startPosition < value.length) { - search.lastIndex = startPosition - match = search.exec(value) - endPosition = - match && match.index !== undefined ? match.index : value.length - code = value.charCodeAt(endPosition) - if (!match) { - buffer = value.slice(startPosition) - break - } - if (code === 10 && startPosition === endPosition && atCarriageReturn) { - chunks.push(-3) - atCarriageReturn = undefined - } else { - if (atCarriageReturn) { - chunks.push(-5) - atCarriageReturn = undefined - } - if (startPosition < endPosition) { - chunks.push(value.slice(startPosition, endPosition)) - column += endPosition - startPosition - } - switch (code) { - case 0: { - chunks.push(65533) - column++ - break - } - case 9: { - next = Math.ceil(column / 4) * 4 - chunks.push(-2) - while (column++ < next) chunks.push(-1) - break - } - case 10: { - chunks.push(-4) - column = 1 - break - } - default: { - atCarriageReturn = true - column = 1 - } - } - } - startPosition = endPosition + 1 - } - if (end) { - if (atCarriageReturn) chunks.push(-5) - if (buffer) chunks.push(buffer) - chunks.push(null) - } - return chunks - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/postprocess.js -/** - * @typedef {import('micromark-util-types').Event} Event - */ - - - -/** - * @param {Array} events - * @returns {Array} - */ -function postprocess(events) { - while (!subtokenize(events)) { - // Empty - } - return events -} - -;// CONCATENATED MODULE: ./node_modules/micromark-util-decode-numeric-character-reference/index.js -/** - * Turn the number (in string form as either hexa- or plain decimal) coming from - * a numeric character reference into a character. - * - * Sort of like `String.fromCharCode(Number.parseInt(value, base))`, but makes - * non-characters and control characters safe. - * - * @param {string} value - * Value to decode. - * @param {number} base - * Numeric base. - * @returns {string} - * Character. - */ -function decodeNumericCharacterReference(value, base) { - const code = Number.parseInt(value, base) - if ( - // C0 except for HT, LF, FF, CR, space. - code < 9 || - code === 11 || - (code > 13 && code < 32) || - // Control character (DEL) of C0, and C1 controls. - (code > 126 && code < 160) || - // Lone high surrogates and low surrogates. - (code > 55295 && code < 57344) || - // Noncharacters. - (code > 64975 && code < 65008) /* eslint-disable no-bitwise */ || - (code & 65535) === 65535 || - (code & 65535) === 65534 /* eslint-enable no-bitwise */ || - // Out of range - code > 1114111 - ) { - return '\uFFFD' - } - return String.fromCharCode(code) -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-decode-string/index.js - - -const characterEscapeOrReference = - /\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi - -/** - * Decode markdown strings (which occur in places such as fenced code info - * strings, destinations, labels, and titles). - * - * The “string” content type allows character escapes and -references. - * This decodes those. - * - * @param {string} value - * Value to decode. - * @returns {string} - * Decoded value. - */ -function decodeString(value) { - return value.replace(characterEscapeOrReference, decode) -} - -/** - * @param {string} $0 - * @param {string} $1 - * @param {string} $2 - * @returns {string} - */ -function decode($0, $1, $2) { - if ($1) { - // Escape. - return $1 - } - - // Reference. - const head = $2.charCodeAt(0) - if (head === 35) { - const head = $2.charCodeAt(1) - const hex = head === 120 || head === 88 - return decodeNumericCharacterReference($2.slice(hex ? 2 : 1), hex ? 16 : 10) - } - return decodeNamedCharacterReference($2) || $0 -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/unist-util-stringify-position/lib/index.js -/** - * @typedef {import('unist').Node} Node - * @typedef {import('unist').Point} Point - * @typedef {import('unist').Position} Position - */ - -/** - * @typedef NodeLike - * @property {string} type - * @property {PositionLike | null | undefined} [position] - * - * @typedef PositionLike - * @property {PointLike | null | undefined} [start] - * @property {PointLike | null | undefined} [end] - * - * @typedef PointLike - * @property {number | null | undefined} [line] - * @property {number | null | undefined} [column] - * @property {number | null | undefined} [offset] - */ - -/** - * Serialize the positional info of a point, position (start and end points), - * or node. - * - * @param {Node | NodeLike | Position | PositionLike | Point | PointLike | null | undefined} [value] - * Node, position, or point. - * @returns {string} - * Pretty printed positional info of a node (`string`). - * - * In the format of a range `ls:cs-le:ce` (when given `node` or `position`) - * or a point `l:c` (when given `point`), where `l` stands for line, `c` for - * column, `s` for `start`, and `e` for end. - * An empty string (`''`) is returned if the given value is neither `node`, - * `position`, nor `point`. - */ -function stringifyPosition(value) { - // Nothing. - if (!value || typeof value !== 'object') { - return '' - } - - // Node. - if ('position' in value || 'type' in value) { - return position(value.position) - } - - // Position. - if ('start' in value || 'end' in value) { - return position(value) - } - - // Point. - if ('line' in value || 'column' in value) { - return point(value) - } - - // ? - return '' -} - -/** - * @param {Point | PointLike | null | undefined} point - * @returns {string} - */ -function point(point) { - return index(point && point.line) + ':' + index(point && point.column) -} - -/** - * @param {Position | PositionLike | null | undefined} pos - * @returns {string} - */ -function position(pos) { - return point(pos && pos.start) + '-' + point(pos && pos.end) -} - -/** - * @param {number | null | undefined} value - * @returns {number} - */ -function index(value) { - return value && typeof value === 'number' ? value : 1 -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/mdast-util-from-markdown/lib/index.js -/** - * @typedef {import('micromark-util-types').Encoding} Encoding - * @typedef {import('micromark-util-types').Event} Event - * @typedef {import('micromark-util-types').ParseOptions} ParseOptions - * @typedef {import('micromark-util-types').Token} Token - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Value} Value - * - * @typedef {import('unist').Parent} UnistParent - * @typedef {import('unist').Point} Point - * - * @typedef {import('mdast').PhrasingContent} PhrasingContent - * @typedef {import('mdast').StaticPhrasingContent} StaticPhrasingContent - * @typedef {import('mdast').Content} Content - * @typedef {import('mdast').Break} Break - * @typedef {import('mdast').Blockquote} Blockquote - * @typedef {import('mdast').Code} Code - * @typedef {import('mdast').Definition} Definition - * @typedef {import('mdast').Emphasis} Emphasis - * @typedef {import('mdast').Heading} Heading - * @typedef {import('mdast').HTML} HTML - * @typedef {import('mdast').Image} Image - * @typedef {import('mdast').ImageReference} ImageReference - * @typedef {import('mdast').InlineCode} InlineCode - * @typedef {import('mdast').Link} Link - * @typedef {import('mdast').LinkReference} LinkReference - * @typedef {import('mdast').List} List - * @typedef {import('mdast').ListItem} ListItem - * @typedef {import('mdast').Paragraph} Paragraph - * @typedef {import('mdast').Root} Root - * @typedef {import('mdast').Strong} Strong - * @typedef {import('mdast').Text} Text - * @typedef {import('mdast').ThematicBreak} ThematicBreak - * @typedef {import('mdast').ReferenceType} ReferenceType - * @typedef {import('../index.js').CompileData} CompileData - */ - -/** - * @typedef {Root | Content} Node - * @typedef {Extract} Parent - * - * @typedef {Omit & {type: 'fragment', children: Array}} Fragment - */ - -/** - * @callback Transform - * Extra transform, to change the AST afterwards. - * @param {Root} tree - * Tree to transform. - * @returns {Root | undefined | null | void} - * New tree or nothing (in which case the current tree is used). - * - * @callback Handle - * Handle a token. - * @param {CompileContext} this - * Context. - * @param {Token} token - * Current token. - * @returns {void} - * Nothing. - * - * @typedef {Record} Handles - * Token types mapping to handles - * - * @callback OnEnterError - * Handle the case where the `right` token is open, but it is closed (by the - * `left` token) or because we reached the end of the document. - * @param {Omit} this - * Context. - * @param {Token | undefined} left - * Left token. - * @param {Token} right - * Right token. - * @returns {void} - * Nothing. - * - * @callback OnExitError - * Handle the case where the `right` token is open but it is closed by - * exiting the `left` token. - * @param {Omit} this - * Context. - * @param {Token} left - * Left token. - * @param {Token} right - * Right token. - * @returns {void} - * Nothing. - * - * @typedef {[Token, OnEnterError | undefined]} TokenTuple - * Open token on the stack, with an optional error handler for when - * that token isn’t closed properly. - */ - -/** - * @typedef Config - * Configuration. - * - * We have our defaults, but extensions will add more. - * @property {Array} canContainEols - * Token types where line endings are used. - * @property {Handles} enter - * Opening handles. - * @property {Handles} exit - * Closing handles. - * @property {Array} transforms - * Tree transforms. - * - * @typedef {Partial} Extension - * Change how markdown tokens from micromark are turned into mdast. - * - * @typedef CompileContext - * mdast compiler context. - * @property {Array} stack - * Stack of nodes. - * @property {Array} tokenStack - * Stack of tokens. - * @property {(key: Key) => CompileData[Key]} getData - * Get data from the key/value store. - * @property {(key: Key, value?: CompileData[Key]) => void} setData - * Set data into the key/value store. - * @property {(this: CompileContext) => void} buffer - * Capture some of the output data. - * @property {(this: CompileContext) => string} resume - * Stop capturing and access the output data. - * @property {(this: CompileContext, node: Kind, token: Token, onError?: OnEnterError) => Kind} enter - * Enter a token. - * @property {(this: CompileContext, token: Token, onError?: OnExitError) => Node} exit - * Exit a token. - * @property {TokenizeContext['sliceSerialize']} sliceSerialize - * Get the string value of a token. - * @property {Config} config - * Configuration. - * - * @typedef FromMarkdownOptions - * Configuration for how to build mdast. - * @property {Array> | null | undefined} [mdastExtensions] - * Extensions for this utility to change how tokens are turned into a tree. - * - * @typedef {ParseOptions & FromMarkdownOptions} Options - * Configuration. - */ - -// To do: micromark: create a registry of tokens? -// To do: next major: don’t return given `Node` from `enter`. -// To do: next major: remove setter/getter. - - - - - - - - - - -const lib_own = {}.hasOwnProperty - -/** - * @param value - * Markdown to parse. - * @param encoding - * Character encoding for when `value` is `Buffer`. - * @param options - * Configuration. - * @returns - * mdast tree. - */ -const fromMarkdown = - /** - * @type {( - * ((value: Value, encoding: Encoding, options?: Options | null | undefined) => Root) & - * ((value: Value, options?: Options | null | undefined) => Root) - * )} - */ - - /** - * @param {Value} value - * @param {Encoding | Options | null | undefined} [encoding] - * @param {Options | null | undefined} [options] - * @returns {Root} - */ - function (value, encoding, options) { - if (typeof encoding !== 'string') { - options = encoding - encoding = undefined - } - return compiler(options)( - postprocess( - parse(options).document().write(preprocess()(value, encoding, true)) - ) - ) - } - -/** - * Note this compiler only understand complete buffering, not streaming. - * - * @param {Options | null | undefined} [options] - */ -function compiler(options) { - /** @type {Config} */ - const config = { - transforms: [], - canContainEols: ['emphasis', 'fragment', 'heading', 'paragraph', 'strong'], - enter: { - autolink: opener(link), - autolinkProtocol: onenterdata, - autolinkEmail: onenterdata, - atxHeading: opener(heading), - blockQuote: opener(blockQuote), - characterEscape: onenterdata, - characterReference: onenterdata, - codeFenced: opener(codeFlow), - codeFencedFenceInfo: buffer, - codeFencedFenceMeta: buffer, - codeIndented: opener(codeFlow, buffer), - codeText: opener(codeText, buffer), - codeTextData: onenterdata, - data: onenterdata, - codeFlowValue: onenterdata, - definition: opener(definition), - definitionDestinationString: buffer, - definitionLabelString: buffer, - definitionTitleString: buffer, - emphasis: opener(emphasis), - hardBreakEscape: opener(hardBreak), - hardBreakTrailing: opener(hardBreak), - htmlFlow: opener(html, buffer), - htmlFlowData: onenterdata, - htmlText: opener(html, buffer), - htmlTextData: onenterdata, - image: opener(image), - label: buffer, - link: opener(link), - listItem: opener(listItem), - listItemValue: onenterlistitemvalue, - listOrdered: opener(list, onenterlistordered), - listUnordered: opener(list), - paragraph: opener(paragraph), - reference: onenterreference, - referenceString: buffer, - resourceDestinationString: buffer, - resourceTitleString: buffer, - setextHeading: opener(heading), - strong: opener(strong), - thematicBreak: opener(thematicBreak) - }, - exit: { - atxHeading: closer(), - atxHeadingSequence: onexitatxheadingsequence, - autolink: closer(), - autolinkEmail: onexitautolinkemail, - autolinkProtocol: onexitautolinkprotocol, - blockQuote: closer(), - characterEscapeValue: onexitdata, - characterReferenceMarkerHexadecimal: onexitcharacterreferencemarker, - characterReferenceMarkerNumeric: onexitcharacterreferencemarker, - characterReferenceValue: onexitcharacterreferencevalue, - codeFenced: closer(onexitcodefenced), - codeFencedFence: onexitcodefencedfence, - codeFencedFenceInfo: onexitcodefencedfenceinfo, - codeFencedFenceMeta: onexitcodefencedfencemeta, - codeFlowValue: onexitdata, - codeIndented: closer(onexitcodeindented), - codeText: closer(onexitcodetext), - codeTextData: onexitdata, - data: onexitdata, - definition: closer(), - definitionDestinationString: onexitdefinitiondestinationstring, - definitionLabelString: onexitdefinitionlabelstring, - definitionTitleString: onexitdefinitiontitlestring, - emphasis: closer(), - hardBreakEscape: closer(onexithardbreak), - hardBreakTrailing: closer(onexithardbreak), - htmlFlow: closer(onexithtmlflow), - htmlFlowData: onexitdata, - htmlText: closer(onexithtmltext), - htmlTextData: onexitdata, - image: closer(onexitimage), - label: onexitlabel, - labelText: onexitlabeltext, - lineEnding: onexitlineending, - link: closer(onexitlink), - listItem: closer(), - listOrdered: closer(), - listUnordered: closer(), - paragraph: closer(), - referenceString: onexitreferencestring, - resourceDestinationString: onexitresourcedestinationstring, - resourceTitleString: onexitresourcetitlestring, - resource: onexitresource, - setextHeading: closer(onexitsetextheading), - setextHeadingLineSequence: onexitsetextheadinglinesequence, - setextHeadingText: onexitsetextheadingtext, - strong: closer(), - thematicBreak: closer() - } - } - configure(config, (options || {}).mdastExtensions || []) - - /** @type {CompileData} */ - const data = {} - return compile - - /** - * Turn micromark events into an mdast tree. - * - * @param {Array} events - * Events. - * @returns {Root} - * mdast tree. - */ - function compile(events) { - /** @type {Root} */ - let tree = { - type: 'root', - children: [] - } - /** @type {Omit} */ - const context = { - stack: [tree], - tokenStack: [], - config, - enter, - exit, - buffer, - resume, - setData, - getData - } - /** @type {Array} */ - const listStack = [] - let index = -1 - while (++index < events.length) { - // We preprocess lists to add `listItem` tokens, and to infer whether - // items the list itself are spread out. - if ( - events[index][1].type === 'listOrdered' || - events[index][1].type === 'listUnordered' - ) { - if (events[index][0] === 'enter') { - listStack.push(index) - } else { - const tail = listStack.pop() - index = prepareList(events, tail, index) - } - } - } - index = -1 - while (++index < events.length) { - const handler = config[events[index][0]] - if (lib_own.call(handler, events[index][1].type)) { - handler[events[index][1].type].call( - Object.assign( - { - sliceSerialize: events[index][2].sliceSerialize - }, - context - ), - events[index][1] - ) - } - } - - // Handle tokens still being open. - if (context.tokenStack.length > 0) { - const tail = context.tokenStack[context.tokenStack.length - 1] - const handler = tail[1] || defaultOnError - handler.call(context, undefined, tail[0]) - } - - // Figure out `root` position. - tree.position = { - start: lib_point( - events.length > 0 - ? events[0][1].start - : { - line: 1, - column: 1, - offset: 0 - } - ), - end: lib_point( - events.length > 0 - ? events[events.length - 2][1].end - : { - line: 1, - column: 1, - offset: 0 - } - ) - } - - // Call transforms. - index = -1 - while (++index < config.transforms.length) { - tree = config.transforms[index](tree) || tree - } - return tree - } - - /** - * @param {Array} events - * @param {number} start - * @param {number} length - * @returns {number} - */ - function prepareList(events, start, length) { - let index = start - 1 - let containerBalance = -1 - let listSpread = false - /** @type {Token | undefined} */ - let listItem - /** @type {number | undefined} */ - let lineIndex - /** @type {number | undefined} */ - let firstBlankLineIndex - /** @type {boolean | undefined} */ - let atMarker - while (++index <= length) { - const event = events[index] - if ( - event[1].type === 'listUnordered' || - event[1].type === 'listOrdered' || - event[1].type === 'blockQuote' - ) { - if (event[0] === 'enter') { - containerBalance++ - } else { - containerBalance-- - } - atMarker = undefined - } else if (event[1].type === 'lineEndingBlank') { - if (event[0] === 'enter') { - if ( - listItem && - !atMarker && - !containerBalance && - !firstBlankLineIndex - ) { - firstBlankLineIndex = index - } - atMarker = undefined - } - } else if ( - event[1].type === 'linePrefix' || - event[1].type === 'listItemValue' || - event[1].type === 'listItemMarker' || - event[1].type === 'listItemPrefix' || - event[1].type === 'listItemPrefixWhitespace' - ) { - // Empty. - } else { - atMarker = undefined - } - if ( - (!containerBalance && - event[0] === 'enter' && - event[1].type === 'listItemPrefix') || - (containerBalance === -1 && - event[0] === 'exit' && - (event[1].type === 'listUnordered' || - event[1].type === 'listOrdered')) - ) { - if (listItem) { - let tailIndex = index - lineIndex = undefined - while (tailIndex--) { - const tailEvent = events[tailIndex] - if ( - tailEvent[1].type === 'lineEnding' || - tailEvent[1].type === 'lineEndingBlank' - ) { - if (tailEvent[0] === 'exit') continue - if (lineIndex) { - events[lineIndex][1].type = 'lineEndingBlank' - listSpread = true - } - tailEvent[1].type = 'lineEnding' - lineIndex = tailIndex - } else if ( - tailEvent[1].type === 'linePrefix' || - tailEvent[1].type === 'blockQuotePrefix' || - tailEvent[1].type === 'blockQuotePrefixWhitespace' || - tailEvent[1].type === 'blockQuoteMarker' || - tailEvent[1].type === 'listItemIndent' - ) { - // Empty - } else { - break - } - } - if ( - firstBlankLineIndex && - (!lineIndex || firstBlankLineIndex < lineIndex) - ) { - listItem._spread = true - } - - // Fix position. - listItem.end = Object.assign( - {}, - lineIndex ? events[lineIndex][1].start : event[1].end - ) - events.splice(lineIndex || index, 0, ['exit', listItem, event[2]]) - index++ - length++ - } - - // Create a new list item. - if (event[1].type === 'listItemPrefix') { - listItem = { - type: 'listItem', - _spread: false, - start: Object.assign({}, event[1].start), - // @ts-expect-error: we’ll add `end` in a second. - end: undefined - } - // @ts-expect-error: `listItem` is most definitely defined, TS... - events.splice(index, 0, ['enter', listItem, event[2]]) - index++ - length++ - firstBlankLineIndex = undefined - atMarker = true - } - } - } - events[start][1]._spread = listSpread - return length - } - - /** - * Set data. - * - * @template {keyof CompileData} Key - * Field type. - * @param {Key} key - * Key of field. - * @param {CompileData[Key]} [value] - * New value. - * @returns {void} - * Nothing. - */ - function setData(key, value) { - data[key] = value - } - - /** - * Get data. - * - * @template {keyof CompileData} Key - * Field type. - * @param {Key} key - * Key of field. - * @returns {CompileData[Key]} - * Value. - */ - function getData(key) { - return data[key] - } - - /** - * Create an opener handle. - * - * @param {(token: Token) => Node} create - * Create a node. - * @param {Handle} [and] - * Optional function to also run. - * @returns {Handle} - * Handle. - */ - function opener(create, and) { - return open - - /** - * @this {CompileContext} - * @param {Token} token - * @returns {void} - */ - function open(token) { - enter.call(this, create(token), token) - if (and) and.call(this, token) - } - } - - /** - * @this {CompileContext} - * @returns {void} - */ - function buffer() { - this.stack.push({ - type: 'fragment', - children: [] - }) - } - - /** - * @template {Node} Kind - * Node type. - * @this {CompileContext} - * Context. - * @param {Kind} node - * Node to enter. - * @param {Token} token - * Corresponding token. - * @param {OnEnterError | undefined} [errorHandler] - * Handle the case where this token is open, but it is closed by something else. - * @returns {Kind} - * The given node. - */ - function enter(node, token, errorHandler) { - const parent = this.stack[this.stack.length - 1] - // @ts-expect-error: Assume `Node` can exist as a child of `parent`. - parent.children.push(node) - this.stack.push(node) - this.tokenStack.push([token, errorHandler]) - // @ts-expect-error: `end` will be patched later. - node.position = { - start: lib_point(token.start) - } - return node - } - - /** - * Create a closer handle. - * - * @param {Handle} [and] - * Optional function to also run. - * @returns {Handle} - * Handle. - */ - function closer(and) { - return close - - /** - * @this {CompileContext} - * @param {Token} token - * @returns {void} - */ - function close(token) { - if (and) and.call(this, token) - exit.call(this, token) - } - } - - /** - * @this {CompileContext} - * Context. - * @param {Token} token - * Corresponding token. - * @param {OnExitError | undefined} [onExitError] - * Handle the case where another token is open. - * @returns {Node} - * The closed node. - */ - function exit(token, onExitError) { - const node = this.stack.pop() - const open = this.tokenStack.pop() - if (!open) { - throw new Error( - 'Cannot close `' + - token.type + - '` (' + - stringifyPosition({ - start: token.start, - end: token.end - }) + - '): it’s not open' - ) - } else if (open[0].type !== token.type) { - if (onExitError) { - onExitError.call(this, token, open[0]) - } else { - const handler = open[1] || defaultOnError - handler.call(this, token, open[0]) - } - } - node.position.end = lib_point(token.end) - return node - } - - /** - * @this {CompileContext} - * @returns {string} - */ - function resume() { - return lib_toString(this.stack.pop()) - } - - // - // Handlers. - // - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onenterlistordered() { - setData('expectingFirstListItemValue', true) - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onenterlistitemvalue(token) { - if (getData('expectingFirstListItemValue')) { - const ancestor = this.stack[this.stack.length - 2] - ancestor.start = Number.parseInt(this.sliceSerialize(token), 10) - setData('expectingFirstListItemValue') - } - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitcodefencedfenceinfo() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.lang = data - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitcodefencedfencemeta() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.meta = data - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitcodefencedfence() { - // Exit if this is the closing fence. - if (getData('flowCodeInside')) return - this.buffer() - setData('flowCodeInside', true) - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitcodefenced() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.value = data.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g, '') - setData('flowCodeInside') - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitcodeindented() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.value = data.replace(/(\r?\n|\r)$/g, '') - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitdefinitionlabelstring(token) { - const label = this.resume() - const node = this.stack[this.stack.length - 1] - node.label = label - node.identifier = normalizeIdentifier( - this.sliceSerialize(token) - ).toLowerCase() - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitdefinitiontitlestring() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.title = data - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitdefinitiondestinationstring() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.url = data - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitatxheadingsequence(token) { - const node = this.stack[this.stack.length - 1] - if (!node.depth) { - const depth = this.sliceSerialize(token).length - node.depth = depth - } - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitsetextheadingtext() { - setData('setextHeadingSlurpLineEnding', true) - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitsetextheadinglinesequence(token) { - const node = this.stack[this.stack.length - 1] - node.depth = this.sliceSerialize(token).charCodeAt(0) === 61 ? 1 : 2 - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitsetextheading() { - setData('setextHeadingSlurpLineEnding') - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onenterdata(token) { - const node = this.stack[this.stack.length - 1] - let tail = node.children[node.children.length - 1] - if (!tail || tail.type !== 'text') { - // Add a new text node. - tail = text() - // @ts-expect-error: we’ll add `end` later. - tail.position = { - start: lib_point(token.start) - } - // @ts-expect-error: Assume `parent` accepts `text`. - node.children.push(tail) - } - this.stack.push(tail) - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitdata(token) { - const tail = this.stack.pop() - tail.value += this.sliceSerialize(token) - tail.position.end = lib_point(token.end) - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitlineending(token) { - const context = this.stack[this.stack.length - 1] - // If we’re at a hard break, include the line ending in there. - if (getData('atHardBreak')) { - const tail = context.children[context.children.length - 1] - tail.position.end = lib_point(token.end) - setData('atHardBreak') - return - } - if ( - !getData('setextHeadingSlurpLineEnding') && - config.canContainEols.includes(context.type) - ) { - onenterdata.call(this, token) - onexitdata.call(this, token) - } - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexithardbreak() { - setData('atHardBreak', true) - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexithtmlflow() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.value = data - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexithtmltext() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.value = data - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitcodetext() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.value = data - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitlink() { - const node = this.stack[this.stack.length - 1] - // Note: there are also `identifier` and `label` fields on this link node! - // These are used / cleaned here. - // To do: clean. - if (getData('inReference')) { - /** @type {ReferenceType} */ - const referenceType = getData('referenceType') || 'shortcut' - node.type += 'Reference' - // @ts-expect-error: mutate. - node.referenceType = referenceType - // @ts-expect-error: mutate. - delete node.url - delete node.title - } else { - // @ts-expect-error: mutate. - delete node.identifier - // @ts-expect-error: mutate. - delete node.label - } - setData('referenceType') - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitimage() { - const node = this.stack[this.stack.length - 1] - // Note: there are also `identifier` and `label` fields on this link node! - // These are used / cleaned here. - // To do: clean. - if (getData('inReference')) { - /** @type {ReferenceType} */ - const referenceType = getData('referenceType') || 'shortcut' - node.type += 'Reference' - // @ts-expect-error: mutate. - node.referenceType = referenceType - // @ts-expect-error: mutate. - delete node.url - delete node.title - } else { - // @ts-expect-error: mutate. - delete node.identifier - // @ts-expect-error: mutate. - delete node.label - } - setData('referenceType') - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitlabeltext(token) { - const string = this.sliceSerialize(token) - const ancestor = this.stack[this.stack.length - 2] - // @ts-expect-error: stash this on the node, as it might become a reference - // later. - ancestor.label = decodeString(string) - // @ts-expect-error: same as above. - ancestor.identifier = normalizeIdentifier(string).toLowerCase() - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitlabel() { - const fragment = this.stack[this.stack.length - 1] - const value = this.resume() - const node = this.stack[this.stack.length - 1] - // Assume a reference. - setData('inReference', true) - if (node.type === 'link') { - /** @type {Array} */ - // @ts-expect-error: Assume static phrasing content. - const children = fragment.children - node.children = children - } else { - node.alt = value - } - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitresourcedestinationstring() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.url = data - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitresourcetitlestring() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.title = data - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitresource() { - setData('inReference') - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onenterreference() { - setData('referenceType', 'collapsed') - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitreferencestring(token) { - const label = this.resume() - const node = this.stack[this.stack.length - 1] - // @ts-expect-error: stash this on the node, as it might become a reference - // later. - node.label = label - // @ts-expect-error: same as above. - node.identifier = normalizeIdentifier( - this.sliceSerialize(token) - ).toLowerCase() - setData('referenceType', 'full') - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitcharacterreferencemarker(token) { - setData('characterReferenceType', token.type) - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitcharacterreferencevalue(token) { - const data = this.sliceSerialize(token) - const type = getData('characterReferenceType') - /** @type {string} */ - let value - if (type) { - value = decodeNumericCharacterReference( - data, - type === 'characterReferenceMarkerNumeric' ? 10 : 16 - ) - setData('characterReferenceType') - } else { - const result = decodeNamedCharacterReference(data) - value = result - } - const tail = this.stack.pop() - tail.value += value - tail.position.end = lib_point(token.end) - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitautolinkprotocol(token) { - onexitdata.call(this, token) - const node = this.stack[this.stack.length - 1] - node.url = this.sliceSerialize(token) - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitautolinkemail(token) { - onexitdata.call(this, token) - const node = this.stack[this.stack.length - 1] - node.url = 'mailto:' + this.sliceSerialize(token) - } - - // - // Creaters. - // - - /** @returns {Blockquote} */ - function blockQuote() { - return { - type: 'blockquote', - children: [] - } - } - - /** @returns {Code} */ - function codeFlow() { - return { - type: 'code', - lang: null, - meta: null, - value: '' - } - } - - /** @returns {InlineCode} */ - function codeText() { - return { - type: 'inlineCode', - value: '' - } - } - - /** @returns {Definition} */ - function definition() { - return { - type: 'definition', - identifier: '', - label: null, - title: null, - url: '' - } - } - - /** @returns {Emphasis} */ - function emphasis() { - return { - type: 'emphasis', - children: [] - } - } - - /** @returns {Heading} */ - function heading() { - // @ts-expect-error `depth` will be set later. - return { - type: 'heading', - depth: undefined, - children: [] - } - } - - /** @returns {Break} */ - function hardBreak() { - return { - type: 'break' - } - } - - /** @returns {HTML} */ - function html() { - return { - type: 'html', - value: '' - } - } - - /** @returns {Image} */ - function image() { - return { - type: 'image', - title: null, - url: '', - alt: null - } - } - - /** @returns {Link} */ - function link() { - return { - type: 'link', - title: null, - url: '', - children: [] - } - } - - /** - * @param {Token} token - * @returns {List} - */ - function list(token) { - return { - type: 'list', - ordered: token.type === 'listOrdered', - start: null, - spread: token._spread, - children: [] - } - } - - /** - * @param {Token} token - * @returns {ListItem} - */ - function listItem(token) { - return { - type: 'listItem', - spread: token._spread, - checked: null, - children: [] - } - } - - /** @returns {Paragraph} */ - function paragraph() { - return { - type: 'paragraph', - children: [] - } - } - - /** @returns {Strong} */ - function strong() { - return { - type: 'strong', - children: [] - } - } - - /** @returns {Text} */ - function text() { - return { - type: 'text', - value: '' - } - } - - /** @returns {ThematicBreak} */ - function thematicBreak() { - return { - type: 'thematicBreak' - } - } -} - -/** - * Copy a point-like value. - * - * @param {Point} d - * Point-like value. - * @returns {Point} - * unist point. - */ -function lib_point(d) { - return { - line: d.line, - column: d.column, - offset: d.offset - } -} - -/** - * @param {Config} combined - * @param {Array>} extensions - * @returns {void} - */ -function configure(combined, extensions) { - let index = -1 - while (++index < extensions.length) { - const value = extensions[index] - if (Array.isArray(value)) { - configure(combined, value) - } else { - extension(combined, value) - } - } -} - -/** - * @param {Config} combined - * @param {Extension} extension - * @returns {void} - */ -function extension(combined, extension) { - /** @type {keyof Extension} */ - let key - for (key in extension) { - if (lib_own.call(extension, key)) { - if (key === 'canContainEols') { - const right = extension[key] - if (right) { - combined[key].push(...right) - } - } else if (key === 'transforms') { - const right = extension[key] - if (right) { - combined[key].push(...right) - } - } else if (key === 'enter' || key === 'exit') { - const right = extension[key] - if (right) { - Object.assign(combined[key], right) - } - } - } - } -} - -/** @type {OnEnterError} */ -function defaultOnError(left, right) { - if (left) { - throw new Error( - 'Cannot close `' + - left.type + - '` (' + - stringifyPosition({ - start: left.start, - end: left.end - }) + - '): a different token (`' + - right.type + - '`, ' + - stringifyPosition({ - start: right.start, - end: right.end - }) + - ') is open' - ) - } else { - throw new Error( - 'Cannot close document, a token (`' + - right.type + - '`, ' + - stringifyPosition({ - start: right.start, - end: right.end - }) + - ') is still open' - ) - } -} - -// EXTERNAL MODULE: ./node_modules/ts-dedent/esm/index.js -var esm = __webpack_require__(60513); -;// CONCATENATED MODULE: ./node_modules/mermaid/dist/createText-2e5e7dd3.js - - - -function preprocessMarkdown(markdown) { - const withoutMultipleNewlines = markdown.replace(/\n{2,}/g, "\n"); - const withoutExtraSpaces = (0,esm/* dedent */.T)(withoutMultipleNewlines); - return withoutExtraSpaces; -} -function markdownToLines(markdown) { - const preprocessedMarkdown = preprocessMarkdown(markdown); - const { children } = fromMarkdown(preprocessedMarkdown); - const lines = [[]]; - let currentLine = 0; - function processNode(node, parentType = "normal") { - if (node.type === "text") { - const textLines = node.value.split("\n"); - textLines.forEach((textLine, index) => { - if (index !== 0) { - currentLine++; - lines.push([]); - } - textLine.split(" ").forEach((word) => { - if (word) { - lines[currentLine].push({ content: word, type: parentType }); - } - }); - }); - } else if (node.type === "strong" || node.type === "emphasis") { - node.children.forEach((contentNode) => { - processNode(contentNode, node.type); - }); - } - } - children.forEach((treeNode) => { - if (treeNode.type === "paragraph") { - treeNode.children.forEach((contentNode) => { - processNode(contentNode); - }); - } - }); - return lines; -} -function markdownToHTML(markdown) { - const { children } = fromMarkdown(markdown); - function output(node) { - if (node.type === "text") { - return node.value.replace(/\n/g, "
    "); - } else if (node.type === "strong") { - return `${node.children.map(output).join("")}`; - } else if (node.type === "emphasis") { - return `${node.children.map(output).join("")}`; - } else if (node.type === "paragraph") { - return `

    ${node.children.map(output).join("")}

    `; - } - return `Unsupported markdown: ${node.type}`; - } - return children.map(output).join(""); -} -function splitTextToChars(text) { - if (Intl.Segmenter) { - return [...new Intl.Segmenter().segment(text)].map((s) => s.segment); - } - return [...text]; -} -function splitWordToFitWidth(checkFit, word) { - const characters = splitTextToChars(word.content); - return splitWordToFitWidthRecursion(checkFit, [], characters, word.type); -} -function splitWordToFitWidthRecursion(checkFit, usedChars, remainingChars, type) { - if (remainingChars.length === 0) { - return [ - { content: usedChars.join(""), type }, - { content: "", type } - ]; - } - const [nextChar, ...rest] = remainingChars; - const newWord = [...usedChars, nextChar]; - if (checkFit([{ content: newWord.join(""), type }])) { - return splitWordToFitWidthRecursion(checkFit, newWord, rest, type); - } - if (usedChars.length === 0 && nextChar) { - usedChars.push(nextChar); - remainingChars.shift(); - } - return [ - { content: usedChars.join(""), type }, - { content: remainingChars.join(""), type } - ]; -} -function splitLineToFitWidth(line, checkFit) { - if (line.some(({ content }) => content.includes("\n"))) { - throw new Error("splitLineToFitWidth does not support newlines in the line"); - } - return splitLineToFitWidthRecursion(line, checkFit); -} -function splitLineToFitWidthRecursion(words, checkFit, lines = [], newLine = []) { - if (words.length === 0) { - if (newLine.length > 0) { - lines.push(newLine); - } - return lines.length > 0 ? lines : []; - } - let joiner = ""; - if (words[0].content === " ") { - joiner = " "; - words.shift(); - } - const nextWord = words.shift() ?? { content: " ", type: "normal" }; - const lineWithNextWord = [...newLine]; - if (joiner !== "") { - lineWithNextWord.push({ content: joiner, type: "normal" }); - } - lineWithNextWord.push(nextWord); - if (checkFit(lineWithNextWord)) { - return splitLineToFitWidthRecursion(words, checkFit, lines, lineWithNextWord); - } - if (newLine.length > 0) { - lines.push(newLine); - words.unshift(nextWord); - } else if (nextWord.content) { - const [line, rest] = splitWordToFitWidth(checkFit, nextWord); - lines.push([line]); - if (rest.content) { - words.unshift(rest); - } - } - return splitLineToFitWidthRecursion(words, checkFit, lines); -} -function applyStyle(dom, styleFn) { - if (styleFn) { - dom.attr("style", styleFn); - } -} -function addHtmlSpan(element, node, width, classes, addBackground = false) { - const fo = element.append("foreignObject"); - const div = fo.append("xhtml:div"); - const label = node.label; - const labelClass = node.isNode ? "nodeLabel" : "edgeLabel"; - div.html( - ` - " + label + "" - ); - applyStyle(div, node.labelStyle); - div.style("display", "table-cell"); - div.style("white-space", "nowrap"); - div.style("max-width", width + "px"); - div.attr("xmlns", "http://www.w3.org/1999/xhtml"); - if (addBackground) { - div.attr("class", "labelBkg"); - } - let bbox = div.node().getBoundingClientRect(); - if (bbox.width === width) { - div.style("display", "table"); - div.style("white-space", "break-spaces"); - div.style("width", width + "px"); - bbox = div.node().getBoundingClientRect(); - } - fo.style("width", bbox.width); - fo.style("height", bbox.height); - return fo.node(); -} -function createTspan(textElement, lineIndex, lineHeight) { - return textElement.append("tspan").attr("class", "text-outer-tspan").attr("x", 0).attr("y", lineIndex * lineHeight - 0.1 + "em").attr("dy", lineHeight + "em"); -} -function computeWidthOfText(parentNode, lineHeight, line) { - const testElement = parentNode.append("text"); - const testSpan = createTspan(testElement, 1, lineHeight); - updateTextContentAndStyles(testSpan, line); - const textLength = testSpan.node().getComputedTextLength(); - testElement.remove(); - return textLength; -} -function computeDimensionOfText(parentNode, lineHeight, text) { - var _a; - const testElement = parentNode.append("text"); - const testSpan = createTspan(testElement, 1, lineHeight); - updateTextContentAndStyles(testSpan, [{ content: text, type: "normal" }]); - const textDimension = (_a = testSpan.node()) == null ? void 0 : _a.getBoundingClientRect(); - if (textDimension) { - testElement.remove(); - } - return textDimension; -} -function createFormattedText(width, g, structuredText, addBackground = false) { - const lineHeight = 1.1; - const labelGroup = g.append("g"); - const bkg = labelGroup.insert("rect").attr("class", "background"); - const textElement = labelGroup.append("text").attr("y", "-10.1"); - let lineIndex = 0; - for (const line of structuredText) { - const checkWidth = (line2) => computeWidthOfText(labelGroup, lineHeight, line2) <= width; - const linesUnderWidth = checkWidth(line) ? [line] : splitLineToFitWidth(line, checkWidth); - for (const preparedLine of linesUnderWidth) { - const tspan = createTspan(textElement, lineIndex, lineHeight); - updateTextContentAndStyles(tspan, preparedLine); - lineIndex++; - } - } - if (addBackground) { - const bbox = textElement.node().getBBox(); - const padding = 2; - bkg.attr("x", -padding).attr("y", -padding).attr("width", bbox.width + 2 * padding).attr("height", bbox.height + 2 * padding); - return labelGroup.node(); - } else { - return textElement.node(); - } -} -function updateTextContentAndStyles(tspan, wrappedLine) { - tspan.text(""); - wrappedLine.forEach((word, index) => { - const innerTspan = tspan.append("tspan").attr("font-style", word.type === "emphasis" ? "italic" : "normal").attr("class", "text-inner-tspan").attr("font-weight", word.type === "strong" ? "bold" : "normal"); - if (index === 0) { - innerTspan.text(word.content); - } else { - innerTspan.text(" " + word.content); - } - }); -} -const createText = (el, text = "", { - style = "", - isTitle = false, - classes = "", - useHtmlLabels = true, - isNode = true, - width = 200, - addSvgBackground = false -} = {}) => { - mermaid_b5860b54.l.info("createText", text, style, isTitle, classes, useHtmlLabels, isNode, addSvgBackground); - if (useHtmlLabels) { - const htmlText = markdownToHTML(text); - const node = { - isNode, - label: (0,mermaid_b5860b54.M)(htmlText).replace( - /fa[blrs]?:fa-[\w-]+/g, - // cspell: disable-line - (s) => `` - ), - labelStyle: style.replace("fill:", "color:") - }; - const vertexNode = addHtmlSpan(el, node, width, classes, addSvgBackground); - return vertexNode; - } else { - const structuredText = markdownToLines(text); - const svgLabel = createFormattedText(width, el, structuredText, addSvgBackground); - return svgLabel; - } -}; - - - -/***/ }), - -/***/ 31329: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ diagram: () => (/* binding */ diagram) -/* harmony export */ }); -/* harmony import */ var _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(86079); -/* harmony import */ var _createText_2e5e7dd3_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(73743); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(26312); -/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(74353); -/* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(16750); -/* harmony import */ var dompurify__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(99418); - - - - - - - - - - - - - -var parser = function() { - var o = function(k, v, o2, l) { - for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) - ; - return o2; - }, $V0 = [1, 10, 12, 14, 16, 18, 19, 21, 23], $V1 = [2, 6], $V2 = [1, 3], $V3 = [1, 5], $V4 = [1, 6], $V5 = [1, 7], $V6 = [1, 5, 10, 12, 14, 16, 18, 19, 21, 23, 34, 35, 36], $V7 = [1, 25], $V8 = [1, 26], $V9 = [1, 28], $Va = [1, 29], $Vb = [1, 30], $Vc = [1, 31], $Vd = [1, 32], $Ve = [1, 33], $Vf = [1, 34], $Vg = [1, 35], $Vh = [1, 36], $Vi = [1, 37], $Vj = [1, 43], $Vk = [1, 42], $Vl = [1, 47], $Vm = [1, 50], $Vn = [1, 10, 12, 14, 16, 18, 19, 21, 23, 34, 35, 36], $Vo = [1, 10, 12, 14, 16, 18, 19, 21, 23, 24, 26, 27, 28, 34, 35, 36], $Vp = [1, 10, 12, 14, 16, 18, 19, 21, 23, 24, 26, 27, 28, 34, 35, 36, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50], $Vq = [1, 64]; - var parser2 = { - trace: function trace() { - }, - yy: {}, - symbols_: { "error": 2, "start": 3, "eol": 4, "XYCHART": 5, "chartConfig": 6, "document": 7, "CHART_ORIENTATION": 8, "statement": 9, "title": 10, "text": 11, "X_AXIS": 12, "parseXAxis": 13, "Y_AXIS": 14, "parseYAxis": 15, "LINE": 16, "plotData": 17, "BAR": 18, "acc_title": 19, "acc_title_value": 20, "acc_descr": 21, "acc_descr_value": 22, "acc_descr_multiline_value": 23, "SQUARE_BRACES_START": 24, "commaSeparatedNumbers": 25, "SQUARE_BRACES_END": 26, "NUMBER_WITH_DECIMAL": 27, "COMMA": 28, "xAxisData": 29, "bandData": 30, "ARROW_DELIMITER": 31, "commaSeparatedTexts": 32, "yAxisData": 33, "NEWLINE": 34, "SEMI": 35, "EOF": 36, "alphaNum": 37, "STR": 38, "MD_STR": 39, "alphaNumToken": 40, "AMP": 41, "NUM": 42, "ALPHA": 43, "PLUS": 44, "EQUALS": 45, "MULT": 46, "DOT": 47, "BRKT": 48, "MINUS": 49, "UNDERSCORE": 50, "$accept": 0, "$end": 1 }, - terminals_: { 2: "error", 5: "XYCHART", 8: "CHART_ORIENTATION", 10: "title", 12: "X_AXIS", 14: "Y_AXIS", 16: "LINE", 18: "BAR", 19: "acc_title", 20: "acc_title_value", 21: "acc_descr", 22: "acc_descr_value", 23: "acc_descr_multiline_value", 24: "SQUARE_BRACES_START", 26: "SQUARE_BRACES_END", 27: "NUMBER_WITH_DECIMAL", 28: "COMMA", 31: "ARROW_DELIMITER", 34: "NEWLINE", 35: "SEMI", 36: "EOF", 38: "STR", 39: "MD_STR", 41: "AMP", 42: "NUM", 43: "ALPHA", 44: "PLUS", 45: "EQUALS", 46: "MULT", 47: "DOT", 48: "BRKT", 49: "MINUS", 50: "UNDERSCORE" }, - productions_: [0, [3, 2], [3, 3], [3, 2], [3, 1], [6, 1], [7, 0], [7, 2], [9, 2], [9, 2], [9, 2], [9, 2], [9, 2], [9, 3], [9, 2], [9, 3], [9, 2], [9, 2], [9, 1], [17, 3], [25, 3], [25, 1], [13, 1], [13, 2], [13, 1], [29, 1], [29, 3], [30, 3], [32, 3], [32, 1], [15, 1], [15, 2], [15, 1], [33, 3], [4, 1], [4, 1], [4, 1], [11, 1], [11, 1], [11, 1], [37, 1], [37, 2], [40, 1], [40, 1], [40, 1], [40, 1], [40, 1], [40, 1], [40, 1], [40, 1], [40, 1], [40, 1]], - performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { - var $0 = $$.length - 1; - switch (yystate) { - case 5: - yy.setOrientation($$[$0]); - break; - case 9: - yy.setDiagramTitle($$[$0].text.trim()); - break; - case 12: - yy.setLineData({ text: "", type: "text" }, $$[$0]); - break; - case 13: - yy.setLineData($$[$0 - 1], $$[$0]); - break; - case 14: - yy.setBarData({ text: "", type: "text" }, $$[$0]); - break; - case 15: - yy.setBarData($$[$0 - 1], $$[$0]); - break; - case 16: - this.$ = $$[$0].trim(); - yy.setAccTitle(this.$); - break; - case 17: - case 18: - this.$ = $$[$0].trim(); - yy.setAccDescription(this.$); - break; - case 19: - this.$ = $$[$0 - 1]; - break; - case 20: - this.$ = [Number($$[$0 - 2]), ...$$[$0]]; - break; - case 21: - this.$ = [Number($$[$0])]; - break; - case 22: - yy.setXAxisTitle($$[$0]); - break; - case 23: - yy.setXAxisTitle($$[$0 - 1]); - break; - case 24: - yy.setXAxisTitle({ type: "text", text: "" }); - break; - case 25: - yy.setXAxisBand($$[$0]); - break; - case 26: - yy.setXAxisRangeData(Number($$[$0 - 2]), Number($$[$0])); - break; - case 27: - this.$ = $$[$0 - 1]; - break; - case 28: - this.$ = [$$[$0 - 2], ...$$[$0]]; - break; - case 29: - this.$ = [$$[$0]]; - break; - case 30: - yy.setYAxisTitle($$[$0]); - break; - case 31: - yy.setYAxisTitle($$[$0 - 1]); - break; - case 32: - yy.setYAxisTitle({ type: "text", text: "" }); - break; - case 33: - yy.setYAxisRangeData(Number($$[$0 - 2]), Number($$[$0])); - break; - case 37: - this.$ = { text: $$[$0], type: "text" }; - break; - case 38: - this.$ = { text: $$[$0], type: "text" }; - break; - case 39: - this.$ = { text: $$[$0], type: "markdown" }; - break; - case 40: - this.$ = $$[$0]; - break; - case 41: - this.$ = $$[$0 - 1] + "" + $$[$0]; - break; - } - }, - table: [o($V0, $V1, { 3: 1, 4: 2, 7: 4, 5: $V2, 34: $V3, 35: $V4, 36: $V5 }), { 1: [3] }, o($V0, $V1, { 4: 2, 7: 4, 3: 8, 5: $V2, 34: $V3, 35: $V4, 36: $V5 }), o($V0, $V1, { 4: 2, 7: 4, 6: 9, 3: 10, 5: $V2, 8: [1, 11], 34: $V3, 35: $V4, 36: $V5 }), { 1: [2, 4], 9: 12, 10: [1, 13], 12: [1, 14], 14: [1, 15], 16: [1, 16], 18: [1, 17], 19: [1, 18], 21: [1, 19], 23: [1, 20] }, o($V6, [2, 34]), o($V6, [2, 35]), o($V6, [2, 36]), { 1: [2, 1] }, o($V0, $V1, { 4: 2, 7: 4, 3: 21, 5: $V2, 34: $V3, 35: $V4, 36: $V5 }), { 1: [2, 3] }, o($V6, [2, 5]), o($V0, [2, 7], { 4: 22, 34: $V3, 35: $V4, 36: $V5 }), { 11: 23, 37: 24, 38: $V7, 39: $V8, 40: 27, 41: $V9, 42: $Va, 43: $Vb, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi }, { 11: 39, 13: 38, 24: $Vj, 27: $Vk, 29: 40, 30: 41, 37: 24, 38: $V7, 39: $V8, 40: 27, 41: $V9, 42: $Va, 43: $Vb, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi }, { 11: 45, 15: 44, 27: $Vl, 33: 46, 37: 24, 38: $V7, 39: $V8, 40: 27, 41: $V9, 42: $Va, 43: $Vb, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi }, { 11: 49, 17: 48, 24: $Vm, 37: 24, 38: $V7, 39: $V8, 40: 27, 41: $V9, 42: $Va, 43: $Vb, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi }, { 11: 52, 17: 51, 24: $Vm, 37: 24, 38: $V7, 39: $V8, 40: 27, 41: $V9, 42: $Va, 43: $Vb, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi }, { 20: [1, 53] }, { 22: [1, 54] }, o($Vn, [2, 18]), { 1: [2, 2] }, o($Vn, [2, 8]), o($Vn, [2, 9]), o($Vo, [2, 37], { 40: 55, 41: $V9, 42: $Va, 43: $Vb, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi }), o($Vo, [2, 38]), o($Vo, [2, 39]), o($Vp, [2, 40]), o($Vp, [2, 42]), o($Vp, [2, 43]), o($Vp, [2, 44]), o($Vp, [2, 45]), o($Vp, [2, 46]), o($Vp, [2, 47]), o($Vp, [2, 48]), o($Vp, [2, 49]), o($Vp, [2, 50]), o($Vp, [2, 51]), o($Vn, [2, 10]), o($Vn, [2, 22], { 30: 41, 29: 56, 24: $Vj, 27: $Vk }), o($Vn, [2, 24]), o($Vn, [2, 25]), { 31: [1, 57] }, { 11: 59, 32: 58, 37: 24, 38: $V7, 39: $V8, 40: 27, 41: $V9, 42: $Va, 43: $Vb, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi }, o($Vn, [2, 11]), o($Vn, [2, 30], { 33: 60, 27: $Vl }), o($Vn, [2, 32]), { 31: [1, 61] }, o($Vn, [2, 12]), { 17: 62, 24: $Vm }, { 25: 63, 27: $Vq }, o($Vn, [2, 14]), { 17: 65, 24: $Vm }, o($Vn, [2, 16]), o($Vn, [2, 17]), o($Vp, [2, 41]), o($Vn, [2, 23]), { 27: [1, 66] }, { 26: [1, 67] }, { 26: [2, 29], 28: [1, 68] }, o($Vn, [2, 31]), { 27: [1, 69] }, o($Vn, [2, 13]), { 26: [1, 70] }, { 26: [2, 21], 28: [1, 71] }, o($Vn, [2, 15]), o($Vn, [2, 26]), o($Vn, [2, 27]), { 11: 59, 32: 72, 37: 24, 38: $V7, 39: $V8, 40: 27, 41: $V9, 42: $Va, 43: $Vb, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi }, o($Vn, [2, 33]), o($Vn, [2, 19]), { 25: 73, 27: $Vq }, { 26: [2, 28] }, { 26: [2, 20] }], - defaultActions: { 8: [2, 1], 10: [2, 3], 21: [2, 2], 72: [2, 28], 73: [2, 20] }, - parseError: function parseError(str, hash) { - if (hash.recoverable) { - this.trace(str); - } else { - var error = new Error(str); - error.hash = hash; - throw error; - } - }, - parse: function parse(input) { - var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; - var args = lstack.slice.call(arguments, 1); - var lexer2 = Object.create(this.lexer); - var sharedState = { yy: {} }; - for (var k in this.yy) { - if (Object.prototype.hasOwnProperty.call(this.yy, k)) { - sharedState.yy[k] = this.yy[k]; - } - } - lexer2.setInput(input, sharedState.yy); - sharedState.yy.lexer = lexer2; - sharedState.yy.parser = this; - if (typeof lexer2.yylloc == "undefined") { - lexer2.yylloc = {}; - } - var yyloc = lexer2.yylloc; - lstack.push(yyloc); - var ranges = lexer2.options && lexer2.options.ranges; - if (typeof sharedState.yy.parseError === "function") { - this.parseError = sharedState.yy.parseError; - } else { - this.parseError = Object.getPrototypeOf(this).parseError; - } - function lex() { - var token; - token = tstack.pop() || lexer2.lex() || EOF; - if (typeof token !== "number") { - if (token instanceof Array) { - tstack = token; - token = tstack.pop(); - } - token = self.symbols_[token] || token; - } - return token; - } - var symbol, state, action, r, yyval = {}, p, len, newState, expected; - while (true) { - state = stack[stack.length - 1]; - if (this.defaultActions[state]) { - action = this.defaultActions[state]; - } else { - if (symbol === null || typeof symbol == "undefined") { - symbol = lex(); - } - action = table[state] && table[state][symbol]; - } - if (typeof action === "undefined" || !action.length || !action[0]) { - var errStr = ""; - expected = []; - for (p in table[state]) { - if (this.terminals_[p] && p > TERROR) { - expected.push("'" + this.terminals_[p] + "'"); - } - } - if (lexer2.showPosition) { - errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; - } else { - errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); - } - this.parseError(errStr, { - text: lexer2.match, - token: this.terminals_[symbol] || symbol, - line: lexer2.yylineno, - loc: yyloc, - expected - }); - } - if (action[0] instanceof Array && action.length > 1) { - throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); - } - switch (action[0]) { - case 1: - stack.push(symbol); - vstack.push(lexer2.yytext); - lstack.push(lexer2.yylloc); - stack.push(action[1]); - symbol = null; - { - yyleng = lexer2.yyleng; - yytext = lexer2.yytext; - yylineno = lexer2.yylineno; - yyloc = lexer2.yylloc; - } - break; - case 2: - len = this.productions_[action[1]][1]; - yyval.$ = vstack[vstack.length - len]; - yyval._$ = { - first_line: lstack[lstack.length - (len || 1)].first_line, - last_line: lstack[lstack.length - 1].last_line, - first_column: lstack[lstack.length - (len || 1)].first_column, - last_column: lstack[lstack.length - 1].last_column - }; - if (ranges) { - yyval._$.range = [ - lstack[lstack.length - (len || 1)].range[0], - lstack[lstack.length - 1].range[1] - ]; - } - r = this.performAction.apply(yyval, [ - yytext, - yyleng, - yylineno, - sharedState.yy, - action[1], - vstack, - lstack - ].concat(args)); - if (typeof r !== "undefined") { - return r; - } - if (len) { - stack = stack.slice(0, -1 * len * 2); - vstack = vstack.slice(0, -1 * len); - lstack = lstack.slice(0, -1 * len); - } - stack.push(this.productions_[action[1]][0]); - vstack.push(yyval.$); - lstack.push(yyval._$); - newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; - stack.push(newState); - break; - case 3: - return true; - } - } - return true; - } - }; - var lexer = function() { - var lexer2 = { - EOF: 1, - parseError: function parseError(str, hash) { - if (this.yy.parser) { - this.yy.parser.parseError(str, hash); - } else { - throw new Error(str); - } - }, - // resets the lexer, sets new input - setInput: function(input, yy) { - this.yy = yy || this.yy || {}; - this._input = input; - this._more = this._backtrack = this.done = false; - this.yylineno = this.yyleng = 0; - this.yytext = this.matched = this.match = ""; - this.conditionStack = ["INITIAL"]; - this.yylloc = { - first_line: 1, - first_column: 0, - last_line: 1, - last_column: 0 - }; - if (this.options.ranges) { - this.yylloc.range = [0, 0]; - } - this.offset = 0; - return this; - }, - // consumes and returns one char from the input - input: function() { - var ch = this._input[0]; - this.yytext += ch; - this.yyleng++; - this.offset++; - this.match += ch; - this.matched += ch; - var lines = ch.match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno++; - this.yylloc.last_line++; - } else { - this.yylloc.last_column++; - } - if (this.options.ranges) { - this.yylloc.range[1]++; - } - this._input = this._input.slice(1); - return ch; - }, - // unshifts one char (or a string) into the input - unput: function(ch) { - var len = ch.length; - var lines = ch.split(/(?:\r\n?|\n)/g); - this._input = ch + this._input; - this.yytext = this.yytext.substr(0, this.yytext.length - len); - this.offset -= len; - var oldLines = this.match.split(/(?:\r\n?|\n)/g); - this.match = this.match.substr(0, this.match.length - 1); - this.matched = this.matched.substr(0, this.matched.length - 1); - if (lines.length - 1) { - this.yylineno -= lines.length - 1; - } - var r = this.yylloc.range; - this.yylloc = { - first_line: this.yylloc.first_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.first_column, - last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len - }; - if (this.options.ranges) { - this.yylloc.range = [r[0], r[0] + this.yyleng - len]; - } - this.yyleng = this.yytext.length; - return this; - }, - // When called from action, caches matched text and appends it on next action - more: function() { - this._more = true; - return this; - }, - // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. - reject: function() { - if (this.options.backtrack_lexer) { - this._backtrack = true; - } else { - return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), { - text: "", - token: null, - line: this.yylineno - }); - } - return this; - }, - // retain first n characters of the match - less: function(n) { - this.unput(this.match.slice(n)); - }, - // displays already matched input, i.e. for error messages - pastInput: function() { - var past = this.matched.substr(0, this.matched.length - this.match.length); - return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); - }, - // displays upcoming input, i.e. for error messages - upcomingInput: function() { - var next = this.match; - if (next.length < 20) { - next += this._input.substr(0, 20 - next.length); - } - return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); - }, - // displays the character position where the lexing error occurred, i.e. for error messages - showPosition: function() { - var pre = this.pastInput(); - var c = new Array(pre.length + 1).join("-"); - return pre + this.upcomingInput() + "\n" + c + "^"; - }, - // test the lexed token: return FALSE when not a match, otherwise return token - test_match: function(match, indexed_rule) { - var token, lines, backup; - if (this.options.backtrack_lexer) { - backup = { - yylineno: this.yylineno, - yylloc: { - first_line: this.yylloc.first_line, - last_line: this.last_line, - first_column: this.yylloc.first_column, - last_column: this.yylloc.last_column - }, - yytext: this.yytext, - match: this.match, - matches: this.matches, - matched: this.matched, - yyleng: this.yyleng, - offset: this.offset, - _more: this._more, - _input: this._input, - yy: this.yy, - conditionStack: this.conditionStack.slice(0), - done: this.done - }; - if (this.options.ranges) { - backup.yylloc.range = this.yylloc.range.slice(0); - } - } - lines = match[0].match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno += lines.length; - } - this.yylloc = { - first_line: this.yylloc.last_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.last_column, - last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length - }; - this.yytext += match[0]; - this.match += match[0]; - this.matches = match; - this.yyleng = this.yytext.length; - if (this.options.ranges) { - this.yylloc.range = [this.offset, this.offset += this.yyleng]; - } - this._more = false; - this._backtrack = false; - this._input = this._input.slice(match[0].length); - this.matched += match[0]; - token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); - if (this.done && this._input) { - this.done = false; - } - if (token) { - return token; - } else if (this._backtrack) { - for (var k in backup) { - this[k] = backup[k]; - } - return false; - } - return false; - }, - // return next match in input - next: function() { - if (this.done) { - return this.EOF; - } - if (!this._input) { - this.done = true; - } - var token, match, tempMatch, index; - if (!this._more) { - this.yytext = ""; - this.match = ""; - } - var rules = this._currentRules(); - for (var i = 0; i < rules.length; i++) { - tempMatch = this._input.match(this.rules[rules[i]]); - if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { - match = tempMatch; - index = i; - if (this.options.backtrack_lexer) { - token = this.test_match(tempMatch, rules[i]); - if (token !== false) { - return token; - } else if (this._backtrack) { - match = false; - continue; - } else { - return false; - } - } else if (!this.options.flex) { - break; - } - } - } - if (match) { - token = this.test_match(match, rules[index]); - if (token !== false) { - return token; - } - return false; - } - if (this._input === "") { - return this.EOF; - } else { - return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { - text: "", - token: null, - line: this.yylineno - }); - } - }, - // return next match that has a token - lex: function lex() { - var r = this.next(); - if (r) { - return r; - } else { - return this.lex(); - } - }, - // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) - begin: function begin(condition) { - this.conditionStack.push(condition); - }, - // pop the previously active lexer condition state off the condition stack - popState: function popState() { - var n = this.conditionStack.length - 1; - if (n > 0) { - return this.conditionStack.pop(); - } else { - return this.conditionStack[0]; - } - }, - // produce the lexer rule set which is active for the currently active lexer condition state - _currentRules: function _currentRules() { - if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { - return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; - } else { - return this.conditions["INITIAL"].rules; - } - }, - // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available - topState: function topState(n) { - n = this.conditionStack.length - 1 - Math.abs(n || 0); - if (n >= 0) { - return this.conditionStack[n]; - } else { - return "INITIAL"; - } - }, - // alias for begin(condition) - pushState: function pushState(condition) { - this.begin(condition); - }, - // return the number of states currently on the stack - stateStackSize: function stateStackSize() { - return this.conditionStack.length; - }, - options: { "case-insensitive": true }, - performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { - switch ($avoiding_name_collisions) { - case 0: - break; - case 1: - break; - case 2: - this.popState(); - return 34; - case 3: - this.popState(); - return 34; - case 4: - return 34; - case 5: - break; - case 6: - return 10; - case 7: - this.pushState("acc_title"); - return 19; - case 8: - this.popState(); - return "acc_title_value"; - case 9: - this.pushState("acc_descr"); - return 21; - case 10: - this.popState(); - return "acc_descr_value"; - case 11: - this.pushState("acc_descr_multiline"); - break; - case 12: - this.popState(); - break; - case 13: - return "acc_descr_multiline_value"; - case 14: - return 5; - case 15: - return 8; - case 16: - this.pushState("axis_data"); - return "X_AXIS"; - case 17: - this.pushState("axis_data"); - return "Y_AXIS"; - case 18: - this.pushState("axis_band_data"); - return 24; - case 19: - return 31; - case 20: - this.pushState("data"); - return 16; - case 21: - this.pushState("data"); - return 18; - case 22: - this.pushState("data_inner"); - return 24; - case 23: - return 27; - case 24: - this.popState(); - return 26; - case 25: - this.popState(); - break; - case 26: - this.pushState("string"); - break; - case 27: - this.popState(); - break; - case 28: - return "STR"; - case 29: - return 24; - case 30: - return 26; - case 31: - return 43; - case 32: - return "COLON"; - case 33: - return 44; - case 34: - return 28; - case 35: - return 45; - case 36: - return 46; - case 37: - return 48; - case 38: - return 50; - case 39: - return 47; - case 40: - return 41; - case 41: - return 49; - case 42: - return 42; - case 43: - break; - case 44: - return 35; - case 45: - return 36; - } - }, - rules: [/^(?:%%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:(\r?\n))/i, /^(?:(\r?\n))/i, /^(?:[\n\r]+)/i, /^(?:%%[^\n]*)/i, /^(?:title\b)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:\{)/i, /^(?:[^\}]*)/i, /^(?:xychart-beta\b)/i, /^(?:(?:vertical|horizontal))/i, /^(?:x-axis\b)/i, /^(?:y-axis\b)/i, /^(?:\[)/i, /^(?:-->)/i, /^(?:line\b)/i, /^(?:bar\b)/i, /^(?:\[)/i, /^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i, /^(?:\])/i, /^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n\(\?:`))/i, /^(?:["])/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:\[)/i, /^(?:\])/i, /^(?:[A-Za-z]+)/i, /^(?::)/i, /^(?:\+)/i, /^(?:,)/i, /^(?:=)/i, /^(?:\*)/i, /^(?:#)/i, /^(?:[\_])/i, /^(?:\.)/i, /^(?:&)/i, /^(?:-)/i, /^(?:[0-9]+)/i, /^(?:\s+)/i, /^(?:;)/i, /^(?:$)/i], - conditions: { "data_inner": { "rules": [0, 1, 4, 5, 6, 7, 9, 11, 14, 15, 16, 17, 20, 21, 23, 24, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45], "inclusive": true }, "data": { "rules": [0, 1, 3, 4, 5, 6, 7, 9, 11, 14, 15, 16, 17, 20, 21, 22, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45], "inclusive": true }, "axis_band_data": { "rules": [0, 1, 4, 5, 6, 7, 9, 11, 14, 15, 16, 17, 20, 21, 24, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45], "inclusive": true }, "axis_data": { "rules": [0, 1, 2, 4, 5, 6, 7, 9, 11, 14, 15, 16, 17, 18, 19, 20, 21, 23, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45], "inclusive": true }, "acc_descr_multiline": { "rules": [12, 13], "inclusive": false }, "acc_descr": { "rules": [10], "inclusive": false }, "acc_title": { "rules": [8], "inclusive": false }, "title": { "rules": [], "inclusive": false }, "md_string": { "rules": [], "inclusive": false }, "string": { "rules": [27, 28], "inclusive": false }, "INITIAL": { "rules": [0, 1, 4, 5, 6, 7, 9, 11, 14, 15, 16, 17, 20, 21, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45], "inclusive": true } } - }; - return lexer2; - }(); - parser2.lexer = lexer; - function Parser() { - this.yy = {}; - } - Parser.prototype = parser2; - parser2.Parser = Parser; - return new Parser(); -}(); -parser.parser = parser; -const parser$1 = parser; -function isBarPlot(data) { - return data.type === "bar"; -} -function isBandAxisData(data) { - return data.type === "band"; -} -function isLinearAxisData(data) { - return data.type === "linear"; -} -class TextDimensionCalculatorWithFont { - constructor(parentGroup) { - this.parentGroup = parentGroup; - } - getMaxDimension(texts, fontSize) { - if (!this.parentGroup) { - return { - width: texts.reduce((acc, cur) => Math.max(cur.length, acc), 0) * fontSize, - height: fontSize - }; - } - const dimension = { - width: 0, - height: 0 - }; - const elem = this.parentGroup.append("g").attr("visibility", "hidden").attr("font-size", fontSize); - for (const t of texts) { - const bbox = (0,_createText_2e5e7dd3_js__WEBPACK_IMPORTED_MODULE_4__.c)(elem, 1, t); - const width = bbox ? bbox.width : t.length * fontSize; - const height = bbox ? bbox.height : fontSize; - dimension.width = Math.max(dimension.width, width); - dimension.height = Math.max(dimension.height, height); - } - elem.remove(); - return dimension; - } -} -const BAR_WIDTH_TO_TICK_WIDTH_RATIO = 0.7; -const MAX_OUTER_PADDING_PERCENT_FOR_WRT_LABEL = 0.2; -class BaseAxis { - constructor(axisConfig, title, textDimensionCalculator, axisThemeConfig) { - this.axisConfig = axisConfig; - this.title = title; - this.textDimensionCalculator = textDimensionCalculator; - this.axisThemeConfig = axisThemeConfig; - this.boundingRect = { x: 0, y: 0, width: 0, height: 0 }; - this.axisPosition = "left"; - this.showTitle = false; - this.showLabel = false; - this.showTick = false; - this.showAxisLine = false; - this.outerPadding = 0; - this.titleTextHeight = 0; - this.labelTextHeight = 0; - this.range = [0, 10]; - this.boundingRect = { x: 0, y: 0, width: 0, height: 0 }; - this.axisPosition = "left"; - } - setRange(range) { - this.range = range; - if (this.axisPosition === "left" || this.axisPosition === "right") { - this.boundingRect.height = range[1] - range[0]; - } else { - this.boundingRect.width = range[1] - range[0]; - } - this.recalculateScale(); - } - getRange() { - return [this.range[0] + this.outerPadding, this.range[1] - this.outerPadding]; - } - setAxisPosition(axisPosition) { - this.axisPosition = axisPosition; - this.setRange(this.range); - } - getTickDistance() { - const range = this.getRange(); - return Math.abs(range[0] - range[1]) / this.getTickValues().length; - } - getAxisOuterPadding() { - return this.outerPadding; - } - getLabelDimension() { - return this.textDimensionCalculator.getMaxDimension( - this.getTickValues().map((tick) => tick.toString()), - this.axisConfig.labelFontSize - ); - } - recalculateOuterPaddingToDrawBar() { - if (BAR_WIDTH_TO_TICK_WIDTH_RATIO * this.getTickDistance() > this.outerPadding * 2) { - this.outerPadding = Math.floor(BAR_WIDTH_TO_TICK_WIDTH_RATIO * this.getTickDistance() / 2); - } - this.recalculateScale(); - } - calculateSpaceIfDrawnHorizontally(availableSpace) { - let availableHeight = availableSpace.height; - if (this.axisConfig.showAxisLine && availableHeight > this.axisConfig.axisLineWidth) { - availableHeight -= this.axisConfig.axisLineWidth; - this.showAxisLine = true; - } - if (this.axisConfig.showLabel) { - const spaceRequired = this.getLabelDimension(); - const maxPadding = MAX_OUTER_PADDING_PERCENT_FOR_WRT_LABEL * availableSpace.width; - this.outerPadding = Math.min(spaceRequired.width / 2, maxPadding); - const heightRequired = spaceRequired.height + this.axisConfig.labelPadding * 2; - this.labelTextHeight = spaceRequired.height; - if (heightRequired <= availableHeight) { - availableHeight -= heightRequired; - this.showLabel = true; - } - } - if (this.axisConfig.showTick && availableHeight >= this.axisConfig.tickLength) { - this.showTick = true; - availableHeight -= this.axisConfig.tickLength; - } - if (this.axisConfig.showTitle && this.title) { - const spaceRequired = this.textDimensionCalculator.getMaxDimension( - [this.title], - this.axisConfig.titleFontSize - ); - const heightRequired = spaceRequired.height + this.axisConfig.titlePadding * 2; - this.titleTextHeight = spaceRequired.height; - if (heightRequired <= availableHeight) { - availableHeight -= heightRequired; - this.showTitle = true; - } - } - this.boundingRect.width = availableSpace.width; - this.boundingRect.height = availableSpace.height - availableHeight; - } - calculateSpaceIfDrawnVertical(availableSpace) { - let availableWidth = availableSpace.width; - if (this.axisConfig.showAxisLine && availableWidth > this.axisConfig.axisLineWidth) { - availableWidth -= this.axisConfig.axisLineWidth; - this.showAxisLine = true; - } - if (this.axisConfig.showLabel) { - const spaceRequired = this.getLabelDimension(); - const maxPadding = MAX_OUTER_PADDING_PERCENT_FOR_WRT_LABEL * availableSpace.height; - this.outerPadding = Math.min(spaceRequired.height / 2, maxPadding); - const widthRequired = spaceRequired.width + this.axisConfig.labelPadding * 2; - if (widthRequired <= availableWidth) { - availableWidth -= widthRequired; - this.showLabel = true; - } - } - if (this.axisConfig.showTick && availableWidth >= this.axisConfig.tickLength) { - this.showTick = true; - availableWidth -= this.axisConfig.tickLength; - } - if (this.axisConfig.showTitle && this.title) { - const spaceRequired = this.textDimensionCalculator.getMaxDimension( - [this.title], - this.axisConfig.titleFontSize - ); - const widthRequired = spaceRequired.height + this.axisConfig.titlePadding * 2; - this.titleTextHeight = spaceRequired.height; - if (widthRequired <= availableWidth) { - availableWidth -= widthRequired; - this.showTitle = true; - } - } - this.boundingRect.width = availableSpace.width - availableWidth; - this.boundingRect.height = availableSpace.height; - } - calculateSpace(availableSpace) { - if (this.axisPosition === "left" || this.axisPosition === "right") { - this.calculateSpaceIfDrawnVertical(availableSpace); - } else { - this.calculateSpaceIfDrawnHorizontally(availableSpace); - } - this.recalculateScale(); - return { - width: this.boundingRect.width, - height: this.boundingRect.height - }; - } - setBoundingBoxXY(point) { - this.boundingRect.x = point.x; - this.boundingRect.y = point.y; - } - getDrawableElementsForLeftAxis() { - const drawableElement = []; - if (this.showAxisLine) { - const x = this.boundingRect.x + this.boundingRect.width - this.axisConfig.axisLineWidth / 2; - drawableElement.push({ - type: "path", - groupTexts: ["left-axis", "axisl-line"], - data: [ - { - path: `M ${x},${this.boundingRect.y} L ${x},${this.boundingRect.y + this.boundingRect.height} `, - strokeFill: this.axisThemeConfig.axisLineColor, - strokeWidth: this.axisConfig.axisLineWidth - } - ] - }); - } - if (this.showLabel) { - drawableElement.push({ - type: "text", - groupTexts: ["left-axis", "label"], - data: this.getTickValues().map((tick) => ({ - text: tick.toString(), - x: this.boundingRect.x + this.boundingRect.width - (this.showLabel ? this.axisConfig.labelPadding : 0) - (this.showTick ? this.axisConfig.tickLength : 0) - (this.showAxisLine ? this.axisConfig.axisLineWidth : 0), - y: this.getScaleValue(tick), - fill: this.axisThemeConfig.labelColor, - fontSize: this.axisConfig.labelFontSize, - rotation: 0, - verticalPos: "middle", - horizontalPos: "right" - })) - }); - } - if (this.showTick) { - const x = this.boundingRect.x + this.boundingRect.width - (this.showAxisLine ? this.axisConfig.axisLineWidth : 0); - drawableElement.push({ - type: "path", - groupTexts: ["left-axis", "ticks"], - data: this.getTickValues().map((tick) => ({ - path: `M ${x},${this.getScaleValue(tick)} L ${x - this.axisConfig.tickLength},${this.getScaleValue(tick)}`, - strokeFill: this.axisThemeConfig.tickColor, - strokeWidth: this.axisConfig.tickWidth - })) - }); - } - if (this.showTitle) { - drawableElement.push({ - type: "text", - groupTexts: ["left-axis", "title"], - data: [ - { - text: this.title, - x: this.boundingRect.x + this.axisConfig.titlePadding, - y: this.boundingRect.y + this.boundingRect.height / 2, - fill: this.axisThemeConfig.titleColor, - fontSize: this.axisConfig.titleFontSize, - rotation: 270, - verticalPos: "top", - horizontalPos: "center" - } - ] - }); - } - return drawableElement; - } - getDrawableElementsForBottomAxis() { - const drawableElement = []; - if (this.showAxisLine) { - const y = this.boundingRect.y + this.axisConfig.axisLineWidth / 2; - drawableElement.push({ - type: "path", - groupTexts: ["bottom-axis", "axis-line"], - data: [ - { - path: `M ${this.boundingRect.x},${y} L ${this.boundingRect.x + this.boundingRect.width},${y}`, - strokeFill: this.axisThemeConfig.axisLineColor, - strokeWidth: this.axisConfig.axisLineWidth - } - ] - }); - } - if (this.showLabel) { - drawableElement.push({ - type: "text", - groupTexts: ["bottom-axis", "label"], - data: this.getTickValues().map((tick) => ({ - text: tick.toString(), - x: this.getScaleValue(tick), - y: this.boundingRect.y + this.axisConfig.labelPadding + (this.showTick ? this.axisConfig.tickLength : 0) + (this.showAxisLine ? this.axisConfig.axisLineWidth : 0), - fill: this.axisThemeConfig.labelColor, - fontSize: this.axisConfig.labelFontSize, - rotation: 0, - verticalPos: "top", - horizontalPos: "center" - })) - }); - } - if (this.showTick) { - const y = this.boundingRect.y + (this.showAxisLine ? this.axisConfig.axisLineWidth : 0); - drawableElement.push({ - type: "path", - groupTexts: ["bottom-axis", "ticks"], - data: this.getTickValues().map((tick) => ({ - path: `M ${this.getScaleValue(tick)},${y} L ${this.getScaleValue(tick)},${y + this.axisConfig.tickLength}`, - strokeFill: this.axisThemeConfig.tickColor, - strokeWidth: this.axisConfig.tickWidth - })) - }); - } - if (this.showTitle) { - drawableElement.push({ - type: "text", - groupTexts: ["bottom-axis", "title"], - data: [ - { - text: this.title, - x: this.range[0] + (this.range[1] - this.range[0]) / 2, - y: this.boundingRect.y + this.boundingRect.height - this.axisConfig.titlePadding - this.titleTextHeight, - fill: this.axisThemeConfig.titleColor, - fontSize: this.axisConfig.titleFontSize, - rotation: 0, - verticalPos: "top", - horizontalPos: "center" - } - ] - }); - } - return drawableElement; - } - getDrawableElementsForTopAxis() { - const drawableElement = []; - if (this.showAxisLine) { - const y = this.boundingRect.y + this.boundingRect.height - this.axisConfig.axisLineWidth / 2; - drawableElement.push({ - type: "path", - groupTexts: ["top-axis", "axis-line"], - data: [ - { - path: `M ${this.boundingRect.x},${y} L ${this.boundingRect.x + this.boundingRect.width},${y}`, - strokeFill: this.axisThemeConfig.axisLineColor, - strokeWidth: this.axisConfig.axisLineWidth - } - ] - }); - } - if (this.showLabel) { - drawableElement.push({ - type: "text", - groupTexts: ["top-axis", "label"], - data: this.getTickValues().map((tick) => ({ - text: tick.toString(), - x: this.getScaleValue(tick), - y: this.boundingRect.y + (this.showTitle ? this.titleTextHeight + this.axisConfig.titlePadding * 2 : 0) + this.axisConfig.labelPadding, - fill: this.axisThemeConfig.labelColor, - fontSize: this.axisConfig.labelFontSize, - rotation: 0, - verticalPos: "top", - horizontalPos: "center" - })) - }); - } - if (this.showTick) { - const y = this.boundingRect.y; - drawableElement.push({ - type: "path", - groupTexts: ["top-axis", "ticks"], - data: this.getTickValues().map((tick) => ({ - path: `M ${this.getScaleValue(tick)},${y + this.boundingRect.height - (this.showAxisLine ? this.axisConfig.axisLineWidth : 0)} L ${this.getScaleValue(tick)},${y + this.boundingRect.height - this.axisConfig.tickLength - (this.showAxisLine ? this.axisConfig.axisLineWidth : 0)}`, - strokeFill: this.axisThemeConfig.tickColor, - strokeWidth: this.axisConfig.tickWidth - })) - }); - } - if (this.showTitle) { - drawableElement.push({ - type: "text", - groupTexts: ["top-axis", "title"], - data: [ - { - text: this.title, - x: this.boundingRect.x + this.boundingRect.width / 2, - y: this.boundingRect.y + this.axisConfig.titlePadding, - fill: this.axisThemeConfig.titleColor, - fontSize: this.axisConfig.titleFontSize, - rotation: 0, - verticalPos: "top", - horizontalPos: "center" - } - ] - }); - } - return drawableElement; - } - getDrawableElements() { - if (this.axisPosition === "left") { - return this.getDrawableElementsForLeftAxis(); - } - if (this.axisPosition === "right") { - throw Error("Drawing of right axis is not implemented"); - } - if (this.axisPosition === "bottom") { - return this.getDrawableElementsForBottomAxis(); - } - if (this.axisPosition === "top") { - return this.getDrawableElementsForTopAxis(); - } - return []; - } -} -class BandAxis extends BaseAxis { - constructor(axisConfig, axisThemeConfig, categories, title, textDimensionCalculator) { - super(axisConfig, title, textDimensionCalculator, axisThemeConfig); - this.categories = categories; - this.scale = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .scaleBand */ .WH)().domain(this.categories).range(this.getRange()); - } - setRange(range) { - super.setRange(range); - } - recalculateScale() { - this.scale = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .scaleBand */ .WH)().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(0.5); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__.l.trace("BandAxis axis final categories, range: ", this.categories, this.getRange()); - } - getTickValues() { - return this.categories; - } - getScaleValue(value) { - return this.scale(value) || this.getRange()[0]; - } -} -class LinearAxis extends BaseAxis { - constructor(axisConfig, axisThemeConfig, domain, title, textDimensionCalculator) { - super(axisConfig, title, textDimensionCalculator, axisThemeConfig); - this.domain = domain; - this.scale = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .scaleLinear */ .m4Y)().domain(this.domain).range(this.getRange()); - } - getTickValues() { - return this.scale.ticks(); - } - recalculateScale() { - const domain = [...this.domain]; - if (this.axisPosition === "left") { - domain.reverse(); - } - this.scale = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .scaleLinear */ .m4Y)().domain(domain).range(this.getRange()); - } - getScaleValue(value) { - return this.scale(value); - } -} -function getAxis(data, axisConfig, axisThemeConfig, tmpSVGGroup2) { - const textDimensionCalculator = new TextDimensionCalculatorWithFont(tmpSVGGroup2); - if (isBandAxisData(data)) { - return new BandAxis( - axisConfig, - axisThemeConfig, - data.categories, - data.title, - textDimensionCalculator - ); - } - return new LinearAxis( - axisConfig, - axisThemeConfig, - [data.min, data.max], - data.title, - textDimensionCalculator - ); -} -class ChartTitle { - constructor(textDimensionCalculator, chartConfig, chartData, chartThemeConfig) { - this.textDimensionCalculator = textDimensionCalculator; - this.chartConfig = chartConfig; - this.chartData = chartData; - this.chartThemeConfig = chartThemeConfig; - this.boundingRect = { - x: 0, - y: 0, - width: 0, - height: 0 - }; - this.showChartTitle = false; - } - setBoundingBoxXY(point) { - this.boundingRect.x = point.x; - this.boundingRect.y = point.y; - } - calculateSpace(availableSpace) { - const titleDimension = this.textDimensionCalculator.getMaxDimension( - [this.chartData.title], - this.chartConfig.titleFontSize - ); - const widthRequired = Math.max(titleDimension.width, availableSpace.width); - const heightRequired = titleDimension.height + 2 * this.chartConfig.titlePadding; - if (titleDimension.width <= widthRequired && titleDimension.height <= heightRequired && this.chartConfig.showTitle && this.chartData.title) { - this.boundingRect.width = widthRequired; - this.boundingRect.height = heightRequired; - this.showChartTitle = true; - } - return { - width: this.boundingRect.width, - height: this.boundingRect.height - }; - } - getDrawableElements() { - const drawableElem = []; - if (this.showChartTitle) { - drawableElem.push({ - groupTexts: ["chart-title"], - type: "text", - data: [ - { - fontSize: this.chartConfig.titleFontSize, - text: this.chartData.title, - verticalPos: "middle", - horizontalPos: "center", - x: this.boundingRect.x + this.boundingRect.width / 2, - y: this.boundingRect.y + this.boundingRect.height / 2, - fill: this.chartThemeConfig.titleColor, - rotation: 0 - } - ] - }); - } - return drawableElem; - } -} -function getChartTitleComponent(chartConfig, chartData, chartThemeConfig, tmpSVGGroup2) { - const textDimensionCalculator = new TextDimensionCalculatorWithFont(tmpSVGGroup2); - return new ChartTitle(textDimensionCalculator, chartConfig, chartData, chartThemeConfig); -} -class LinePlot { - constructor(plotData, xAxis, yAxis, orientation, plotIndex2) { - this.plotData = plotData; - this.xAxis = xAxis; - this.yAxis = yAxis; - this.orientation = orientation; - this.plotIndex = plotIndex2; - } - getDrawableElement() { - const finalData = this.plotData.data.map((d) => [ - this.xAxis.getScaleValue(d[0]), - this.yAxis.getScaleValue(d[1]) - ]); - let path; - if (this.orientation === "horizontal") { - path = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .line */ .n8j)().y((d) => d[0]).x((d) => d[1])(finalData); - } else { - path = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .line */ .n8j)().x((d) => d[0]).y((d) => d[1])(finalData); - } - if (!path) { - return []; - } - return [ - { - groupTexts: ["plot", `line-plot-${this.plotIndex}`], - type: "path", - data: [ - { - path, - strokeFill: this.plotData.strokeFill, - strokeWidth: this.plotData.strokeWidth - } - ] - } - ]; - } -} -class BarPlot { - constructor(barData, boundingRect, xAxis, yAxis, orientation, plotIndex2) { - this.barData = barData; - this.boundingRect = boundingRect; - this.xAxis = xAxis; - this.yAxis = yAxis; - this.orientation = orientation; - this.plotIndex = plotIndex2; - } - getDrawableElement() { - const finalData = this.barData.data.map((d) => [ - this.xAxis.getScaleValue(d[0]), - this.yAxis.getScaleValue(d[1]) - ]); - const barPaddingPercent = 0.05; - const barWidth = Math.min(this.xAxis.getAxisOuterPadding() * 2, this.xAxis.getTickDistance()) * (1 - barPaddingPercent); - const barWidthHalf = barWidth / 2; - if (this.orientation === "horizontal") { - return [ - { - groupTexts: ["plot", `bar-plot-${this.plotIndex}`], - type: "rect", - data: finalData.map((data) => ({ - x: this.boundingRect.x, - y: data[0] - barWidthHalf, - height: barWidth, - width: data[1] - this.boundingRect.x, - fill: this.barData.fill, - strokeWidth: 0, - strokeFill: this.barData.fill - })) - } - ]; - } - return [ - { - groupTexts: ["plot", `bar-plot-${this.plotIndex}`], - type: "rect", - data: finalData.map((data) => ({ - x: data[0] - barWidthHalf, - y: data[1], - width: barWidth, - height: this.boundingRect.y + this.boundingRect.height - data[1], - fill: this.barData.fill, - strokeWidth: 0, - strokeFill: this.barData.fill - })) - } - ]; - } -} -class BasePlot { - constructor(chartConfig, chartData, chartThemeConfig) { - this.chartConfig = chartConfig; - this.chartData = chartData; - this.chartThemeConfig = chartThemeConfig; - this.boundingRect = { - x: 0, - y: 0, - width: 0, - height: 0 - }; - } - setAxes(xAxis, yAxis) { - this.xAxis = xAxis; - this.yAxis = yAxis; - } - setBoundingBoxXY(point) { - this.boundingRect.x = point.x; - this.boundingRect.y = point.y; - } - calculateSpace(availableSpace) { - this.boundingRect.width = availableSpace.width; - this.boundingRect.height = availableSpace.height; - return { - width: this.boundingRect.width, - height: this.boundingRect.height - }; - } - getDrawableElements() { - if (!(this.xAxis && this.yAxis)) { - throw Error("Axes must be passed to render Plots"); - } - const drawableElem = []; - for (const [i, plot] of this.chartData.plots.entries()) { - switch (plot.type) { - case "line": - { - const linePlot = new LinePlot( - plot, - this.xAxis, - this.yAxis, - this.chartConfig.chartOrientation, - i - ); - drawableElem.push(...linePlot.getDrawableElement()); - } - break; - case "bar": - { - const barPlot = new BarPlot( - plot, - this.boundingRect, - this.xAxis, - this.yAxis, - this.chartConfig.chartOrientation, - i - ); - drawableElem.push(...barPlot.getDrawableElement()); - } - break; - } - } - return drawableElem; - } -} -function getPlotComponent(chartConfig, chartData, chartThemeConfig) { - return new BasePlot(chartConfig, chartData, chartThemeConfig); -} -class Orchestrator { - constructor(chartConfig, chartData, chartThemeConfig, tmpSVGGroup2) { - this.chartConfig = chartConfig; - this.chartData = chartData; - this.componentStore = { - title: getChartTitleComponent(chartConfig, chartData, chartThemeConfig, tmpSVGGroup2), - plot: getPlotComponent(chartConfig, chartData, chartThemeConfig), - xAxis: getAxis( - chartData.xAxis, - chartConfig.xAxis, - { - titleColor: chartThemeConfig.xAxisTitleColor, - labelColor: chartThemeConfig.xAxisLabelColor, - tickColor: chartThemeConfig.xAxisTickColor, - axisLineColor: chartThemeConfig.xAxisLineColor - }, - tmpSVGGroup2 - ), - yAxis: getAxis( - chartData.yAxis, - chartConfig.yAxis, - { - titleColor: chartThemeConfig.yAxisTitleColor, - labelColor: chartThemeConfig.yAxisLabelColor, - tickColor: chartThemeConfig.yAxisTickColor, - axisLineColor: chartThemeConfig.yAxisLineColor - }, - tmpSVGGroup2 - ) - }; - } - calculateVerticalSpace() { - let availableWidth = this.chartConfig.width; - let availableHeight = this.chartConfig.height; - let plotX = 0; - let plotY = 0; - let chartWidth = Math.floor(availableWidth * this.chartConfig.plotReservedSpacePercent / 100); - let chartHeight = Math.floor( - availableHeight * this.chartConfig.plotReservedSpacePercent / 100 - ); - let spaceUsed = this.componentStore.plot.calculateSpace({ - width: chartWidth, - height: chartHeight - }); - availableWidth -= spaceUsed.width; - availableHeight -= spaceUsed.height; - spaceUsed = this.componentStore.title.calculateSpace({ - width: this.chartConfig.width, - height: availableHeight - }); - plotY = spaceUsed.height; - availableHeight -= spaceUsed.height; - this.componentStore.xAxis.setAxisPosition("bottom"); - spaceUsed = this.componentStore.xAxis.calculateSpace({ - width: availableWidth, - height: availableHeight - }); - availableHeight -= spaceUsed.height; - this.componentStore.yAxis.setAxisPosition("left"); - spaceUsed = this.componentStore.yAxis.calculateSpace({ - width: availableWidth, - height: availableHeight - }); - plotX = spaceUsed.width; - availableWidth -= spaceUsed.width; - if (availableWidth > 0) { - chartWidth += availableWidth; - availableWidth = 0; - } - if (availableHeight > 0) { - chartHeight += availableHeight; - availableHeight = 0; - } - this.componentStore.plot.calculateSpace({ - width: chartWidth, - height: chartHeight - }); - this.componentStore.plot.setBoundingBoxXY({ x: plotX, y: plotY }); - this.componentStore.xAxis.setRange([plotX, plotX + chartWidth]); - this.componentStore.xAxis.setBoundingBoxXY({ x: plotX, y: plotY + chartHeight }); - this.componentStore.yAxis.setRange([plotY, plotY + chartHeight]); - this.componentStore.yAxis.setBoundingBoxXY({ x: 0, y: plotY }); - if (this.chartData.plots.some((p) => isBarPlot(p))) { - this.componentStore.xAxis.recalculateOuterPaddingToDrawBar(); - } - } - calculateHorizontalSpace() { - let availableWidth = this.chartConfig.width; - let availableHeight = this.chartConfig.height; - let titleYEnd = 0; - let plotX = 0; - let plotY = 0; - let chartWidth = Math.floor(availableWidth * this.chartConfig.plotReservedSpacePercent / 100); - let chartHeight = Math.floor( - availableHeight * this.chartConfig.plotReservedSpacePercent / 100 - ); - let spaceUsed = this.componentStore.plot.calculateSpace({ - width: chartWidth, - height: chartHeight - }); - availableWidth -= spaceUsed.width; - availableHeight -= spaceUsed.height; - spaceUsed = this.componentStore.title.calculateSpace({ - width: this.chartConfig.width, - height: availableHeight - }); - titleYEnd = spaceUsed.height; - availableHeight -= spaceUsed.height; - this.componentStore.xAxis.setAxisPosition("left"); - spaceUsed = this.componentStore.xAxis.calculateSpace({ - width: availableWidth, - height: availableHeight - }); - availableWidth -= spaceUsed.width; - plotX = spaceUsed.width; - this.componentStore.yAxis.setAxisPosition("top"); - spaceUsed = this.componentStore.yAxis.calculateSpace({ - width: availableWidth, - height: availableHeight - }); - availableHeight -= spaceUsed.height; - plotY = titleYEnd + spaceUsed.height; - if (availableWidth > 0) { - chartWidth += availableWidth; - availableWidth = 0; - } - if (availableHeight > 0) { - chartHeight += availableHeight; - availableHeight = 0; - } - this.componentStore.plot.calculateSpace({ - width: chartWidth, - height: chartHeight - }); - this.componentStore.plot.setBoundingBoxXY({ x: plotX, y: plotY }); - this.componentStore.yAxis.setRange([plotX, plotX + chartWidth]); - this.componentStore.yAxis.setBoundingBoxXY({ x: plotX, y: titleYEnd }); - this.componentStore.xAxis.setRange([plotY, plotY + chartHeight]); - this.componentStore.xAxis.setBoundingBoxXY({ x: 0, y: plotY }); - if (this.chartData.plots.some((p) => isBarPlot(p))) { - this.componentStore.xAxis.recalculateOuterPaddingToDrawBar(); - } - } - calculateSpace() { - if (this.chartConfig.chartOrientation === "horizontal") { - this.calculateHorizontalSpace(); - } else { - this.calculateVerticalSpace(); - } - } - getDrawableElement() { - this.calculateSpace(); - const drawableElem = []; - this.componentStore.plot.setAxes(this.componentStore.xAxis, this.componentStore.yAxis); - for (const component of Object.values(this.componentStore)) { - drawableElem.push(...component.getDrawableElements()); - } - return drawableElem; - } -} -class XYChartBuilder { - static build(config, chartData, chartThemeConfig, tmpSVGGroup2) { - const orchestrator = new Orchestrator(config, chartData, chartThemeConfig, tmpSVGGroup2); - return orchestrator.getDrawableElement(); - } -} -let plotIndex = 0; -let tmpSVGGroup; -let xyChartConfig = getChartDefaultConfig(); -let xyChartThemeConfig = getChartDefaultThemeConfig(); -let xyChartData = getChartDefaultData(); -let plotColorPalette = xyChartThemeConfig.plotColorPalette.split(",").map((color) => color.trim()); -let hasSetXAxis = false; -let hasSetYAxis = false; -function getChartDefaultThemeConfig() { - const defaultThemeVariables = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__.E)(); - const config = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__.F)(); - return (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__.C)(defaultThemeVariables.xyChart, config.themeVariables.xyChart); -} -function getChartDefaultConfig() { - const config = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__.F)(); - return (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__.C)( - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__.B.xyChart, - config.xyChart - ); -} -function getChartDefaultData() { - return { - yAxis: { - type: "linear", - title: "", - min: Infinity, - max: -Infinity - }, - xAxis: { - type: "band", - title: "", - categories: [] - }, - title: "", - plots: [] - }; -} -function textSanitizer(text) { - const config = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__.F)(); - return (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__.d)(text.trim(), config); -} -function setTmpSVGG(SVGG) { - tmpSVGGroup = SVGG; -} -function setOrientation(orientation) { - if (orientation === "horizontal") { - xyChartConfig.chartOrientation = "horizontal"; - } else { - xyChartConfig.chartOrientation = "vertical"; - } -} -function setXAxisTitle(title) { - xyChartData.xAxis.title = textSanitizer(title.text); -} -function setXAxisRangeData(min, max) { - xyChartData.xAxis = { type: "linear", title: xyChartData.xAxis.title, min, max }; - hasSetXAxis = true; -} -function setXAxisBand(categories) { - xyChartData.xAxis = { - type: "band", - title: xyChartData.xAxis.title, - categories: categories.map((c) => textSanitizer(c.text)) - }; - hasSetXAxis = true; -} -function setYAxisTitle(title) { - xyChartData.yAxis.title = textSanitizer(title.text); -} -function setYAxisRangeData(min, max) { - xyChartData.yAxis = { type: "linear", title: xyChartData.yAxis.title, min, max }; - hasSetYAxis = true; -} -function setYAxisRangeFromPlotData(data) { - const minValue = Math.min(...data); - const maxValue = Math.max(...data); - const prevMinValue = isLinearAxisData(xyChartData.yAxis) ? xyChartData.yAxis.min : Infinity; - const prevMaxValue = isLinearAxisData(xyChartData.yAxis) ? xyChartData.yAxis.max : -Infinity; - xyChartData.yAxis = { - type: "linear", - title: xyChartData.yAxis.title, - min: Math.min(prevMinValue, minValue), - max: Math.max(prevMaxValue, maxValue) - }; -} -function transformDataWithoutCategory(data) { - let retData = []; - if (data.length === 0) { - return retData; - } - if (!hasSetXAxis) { - const prevMinValue = isLinearAxisData(xyChartData.xAxis) ? xyChartData.xAxis.min : Infinity; - const prevMaxValue = isLinearAxisData(xyChartData.xAxis) ? xyChartData.xAxis.max : -Infinity; - setXAxisRangeData(Math.min(prevMinValue, 1), Math.max(prevMaxValue, data.length)); - } - if (!hasSetYAxis) { - setYAxisRangeFromPlotData(data); - } - if (isBandAxisData(xyChartData.xAxis)) { - retData = xyChartData.xAxis.categories.map((c, i) => [c, data[i]]); - } - if (isLinearAxisData(xyChartData.xAxis)) { - const min = xyChartData.xAxis.min; - const max = xyChartData.xAxis.max; - const step = (max - min + 1) / data.length; - const categories = []; - for (let i = min; i <= max; i += step) { - categories.push(`${i}`); - } - retData = categories.map((c, i) => [c, data[i]]); - } - return retData; -} -function getPlotColorFromPalette(plotIndex2) { - return plotColorPalette[plotIndex2 === 0 ? 0 : plotIndex2 % plotColorPalette.length]; -} -function setLineData(title, data) { - const plotData = transformDataWithoutCategory(data); - xyChartData.plots.push({ - type: "line", - strokeFill: getPlotColorFromPalette(plotIndex), - strokeWidth: 2, - data: plotData - }); - plotIndex++; -} -function setBarData(title, data) { - const plotData = transformDataWithoutCategory(data); - xyChartData.plots.push({ - type: "bar", - fill: getPlotColorFromPalette(plotIndex), - data: plotData - }); - plotIndex++; -} -function getDrawableElem() { - if (xyChartData.plots.length === 0) { - throw Error("No Plot to render, please provide a plot with some data"); - } - xyChartData.title = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__.t)(); - return XYChartBuilder.build(xyChartConfig, xyChartData, xyChartThemeConfig, tmpSVGGroup); -} -function getChartThemeConfig() { - return xyChartThemeConfig; -} -function getChartConfig() { - return xyChartConfig; -} -const clear = function() { - (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__.v)(); - plotIndex = 0; - xyChartConfig = getChartDefaultConfig(); - xyChartData = getChartDefaultData(); - xyChartThemeConfig = getChartDefaultThemeConfig(); - plotColorPalette = xyChartThemeConfig.plotColorPalette.split(",").map((color) => color.trim()); - hasSetXAxis = false; - hasSetYAxis = false; -}; -const db = { - getDrawableElem, - clear, - setAccTitle: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__.s, - getAccTitle: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__.g, - setDiagramTitle: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__.q, - getDiagramTitle: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__.t, - getAccDescription: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__.a, - setAccDescription: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__.b, - setOrientation, - setXAxisTitle, - setXAxisRangeData, - setXAxisBand, - setYAxisTitle, - setYAxisRangeData, - setLineData, - setBarData, - setTmpSVGG, - getChartThemeConfig, - getChartConfig -}; -const draw = (txt, id, _version, diagObj) => { - const db2 = diagObj.db; - const themeConfig = db2.getChartThemeConfig(); - const chartConfig = db2.getChartConfig(); - function getDominantBaseLine(horizontalPos) { - return horizontalPos === "top" ? "text-before-edge" : "middle"; - } - function getTextAnchor(verticalPos) { - return verticalPos === "left" ? "start" : verticalPos === "right" ? "end" : "middle"; - } - function getTextTransformation(data) { - return `translate(${data.x}, ${data.y}) rotate(${data.rotation || 0})`; - } - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__.l.debug("Rendering xychart chart\n" + txt); - const svg = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__.A)(id); - const group = svg.append("g").attr("class", "main"); - const background = group.append("rect").attr("width", chartConfig.width).attr("height", chartConfig.height).attr("class", "background"); - (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__.i)(svg, chartConfig.height, chartConfig.width, true); - svg.attr("viewBox", `0 0 ${chartConfig.width} ${chartConfig.height}`); - background.attr("fill", themeConfig.backgroundColor); - db2.setTmpSVGG(svg.append("g").attr("class", "mermaid-tmp-group")); - const shapes = db2.getDrawableElem(); - const groups = {}; - function getGroup(gList) { - let elem = group; - let prefix = ""; - for (const [i] of gList.entries()) { - let parent = group; - if (i > 0 && groups[prefix]) { - parent = groups[prefix]; - } - prefix += gList[i]; - elem = groups[prefix]; - if (!elem) { - elem = groups[prefix] = parent.append("g").attr("class", gList[i]); - } - } - return elem; - } - for (const shape of shapes) { - if (shape.data.length === 0) { - continue; - } - const shapeGroup = getGroup(shape.groupTexts); - switch (shape.type) { - case "rect": - shapeGroup.selectAll("rect").data(shape.data).enter().append("rect").attr("x", (data) => data.x).attr("y", (data) => data.y).attr("width", (data) => data.width).attr("height", (data) => data.height).attr("fill", (data) => data.fill).attr("stroke", (data) => data.strokeFill).attr("stroke-width", (data) => data.strokeWidth); - break; - case "text": - shapeGroup.selectAll("text").data(shape.data).enter().append("text").attr("x", 0).attr("y", 0).attr("fill", (data) => data.fill).attr("font-size", (data) => data.fontSize).attr("dominant-baseline", (data) => getDominantBaseLine(data.verticalPos)).attr("text-anchor", (data) => getTextAnchor(data.horizontalPos)).attr("transform", (data) => getTextTransformation(data)).text((data) => data.text); - break; - case "path": - shapeGroup.selectAll("path").data(shape.data).enter().append("path").attr("d", (data) => data.path).attr("fill", (data) => data.fill ? data.fill : "none").attr("stroke", (data) => data.strokeFill).attr("stroke-width", (data) => data.strokeWidth); - break; - } - } -}; -const renderer = { - draw -}; -const diagram = { - parser: parser$1, - db, - renderer -}; - - - -/***/ }) - -}; -; \ No newline at end of file diff --git a/assets/js/3292.74841d94.js b/assets/js/3292.74841d94.js deleted file mode 100644 index c4a5f5bbf811..000000000000 --- a/assets/js/3292.74841d94.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3292],{53292:(t,e,n)=>{n.d(e,{diagram:()=>nt});var a=n(86079),i=n(26312),s=n(79186),r=n(16750),l=(n(74353),n(42838),function(){var t=function(t,e,n,a){for(n=n||{},a=t.length;a--;n[t[a]]=e);return n},e=[1,24],n=[1,25],a=[1,26],i=[1,27],s=[1,28],r=[1,63],l=[1,64],o=[1,65],h=[1,66],d=[1,67],u=[1,68],p=[1,69],y=[1,29],f=[1,30],b=[1,31],g=[1,32],x=[1,33],_=[1,34],m=[1,35],E=[1,36],A=[1,37],S=[1,38],C=[1,39],k=[1,40],O=[1,41],v=[1,42],T=[1,43],w=[1,44],R=[1,45],D=[1,46],N=[1,47],P=[1,48],M=[1,50],j=[1,51],B=[1,52],L=[1,53],Y=[1,54],I=[1,55],U=[1,56],F=[1,57],X=[1,58],z=[1,59],W=[1,60],Q=[14,42],$=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],q=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],V=[1,82],G=[1,83],H=[1,84],K=[1,85],J=[12,14,42],Z=[12,14,33,42],tt=[12,14,33,42,76,77,79,80],et=[12,33],nt=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],at={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:function(t,e,n,a,i,s,r){var l=s.length-1;switch(i){case 3:a.setDirection("TB");break;case 4:a.setDirection("BT");break;case 5:a.setDirection("RL");break;case 6:a.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:a.setC4Type(s[l-3]);break;case 19:a.setTitle(s[l].substring(6)),this.$=s[l].substring(6);break;case 20:a.setAccDescription(s[l].substring(15)),this.$=s[l].substring(15);break;case 21:this.$=s[l].trim(),a.setTitle(this.$);break;case 22:case 23:this.$=s[l].trim(),a.setAccDescription(this.$);break;case 28:case 29:s[l].splice(2,0,"ENTERPRISE"),a.addPersonOrSystemBoundary(...s[l]),this.$=s[l];break;case 30:a.addPersonOrSystemBoundary(...s[l]),this.$=s[l];break;case 31:s[l].splice(2,0,"CONTAINER"),a.addContainerBoundary(...s[l]),this.$=s[l];break;case 32:a.addDeploymentNode("node",...s[l]),this.$=s[l];break;case 33:a.addDeploymentNode("nodeL",...s[l]),this.$=s[l];break;case 34:a.addDeploymentNode("nodeR",...s[l]),this.$=s[l];break;case 35:a.popBoundaryParseStack();break;case 39:a.addPersonOrSystem("person",...s[l]),this.$=s[l];break;case 40:a.addPersonOrSystem("external_person",...s[l]),this.$=s[l];break;case 41:a.addPersonOrSystem("system",...s[l]),this.$=s[l];break;case 42:a.addPersonOrSystem("system_db",...s[l]),this.$=s[l];break;case 43:a.addPersonOrSystem("system_queue",...s[l]),this.$=s[l];break;case 44:a.addPersonOrSystem("external_system",...s[l]),this.$=s[l];break;case 45:a.addPersonOrSystem("external_system_db",...s[l]),this.$=s[l];break;case 46:a.addPersonOrSystem("external_system_queue",...s[l]),this.$=s[l];break;case 47:a.addContainer("container",...s[l]),this.$=s[l];break;case 48:a.addContainer("container_db",...s[l]),this.$=s[l];break;case 49:a.addContainer("container_queue",...s[l]),this.$=s[l];break;case 50:a.addContainer("external_container",...s[l]),this.$=s[l];break;case 51:a.addContainer("external_container_db",...s[l]),this.$=s[l];break;case 52:a.addContainer("external_container_queue",...s[l]),this.$=s[l];break;case 53:a.addComponent("component",...s[l]),this.$=s[l];break;case 54:a.addComponent("component_db",...s[l]),this.$=s[l];break;case 55:a.addComponent("component_queue",...s[l]),this.$=s[l];break;case 56:a.addComponent("external_component",...s[l]),this.$=s[l];break;case 57:a.addComponent("external_component_db",...s[l]),this.$=s[l];break;case 58:a.addComponent("external_component_queue",...s[l]),this.$=s[l];break;case 60:a.addRel("rel",...s[l]),this.$=s[l];break;case 61:a.addRel("birel",...s[l]),this.$=s[l];break;case 62:a.addRel("rel_u",...s[l]),this.$=s[l];break;case 63:a.addRel("rel_d",...s[l]),this.$=s[l];break;case 64:a.addRel("rel_l",...s[l]),this.$=s[l];break;case 65:a.addRel("rel_r",...s[l]),this.$=s[l];break;case 66:a.addRel("rel_b",...s[l]),this.$=s[l];break;case 67:s[l].splice(0,1),a.addRel("rel",...s[l]),this.$=s[l];break;case 68:a.updateElStyle("update_el_style",...s[l]),this.$=s[l];break;case 69:a.updateRelStyle("update_rel_style",...s[l]),this.$=s[l];break;case 70:a.updateLayoutConfig("update_layout_config",...s[l]),this.$=s[l];break;case 71:this.$=[s[l]];break;case 72:s[l].unshift(s[l-1]),this.$=s[l];break;case 73:case 75:this.$=s[l].trim();break;case 74:let t={};t[s[l-1].trim()]=s[l].trim(),this.$=t;break;case 76:this.$=""}},table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:e,23:n,24:a,26:i,28:s,29:49,30:61,32:62,34:r,36:l,37:o,38:h,39:d,40:u,41:p,43:23,44:y,45:f,46:b,47:g,48:x,49:_,50:m,51:E,52:A,53:S,54:C,55:k,56:O,57:v,58:T,59:w,60:R,61:D,62:N,63:P,64:M,65:j,66:B,67:L,68:Y,69:I,70:U,71:F,72:X,73:z,74:W},{13:70,19:20,20:21,21:22,22:e,23:n,24:a,26:i,28:s,29:49,30:61,32:62,34:r,36:l,37:o,38:h,39:d,40:u,41:p,43:23,44:y,45:f,46:b,47:g,48:x,49:_,50:m,51:E,52:A,53:S,54:C,55:k,56:O,57:v,58:T,59:w,60:R,61:D,62:N,63:P,64:M,65:j,66:B,67:L,68:Y,69:I,70:U,71:F,72:X,73:z,74:W},{13:71,19:20,20:21,21:22,22:e,23:n,24:a,26:i,28:s,29:49,30:61,32:62,34:r,36:l,37:o,38:h,39:d,40:u,41:p,43:23,44:y,45:f,46:b,47:g,48:x,49:_,50:m,51:E,52:A,53:S,54:C,55:k,56:O,57:v,58:T,59:w,60:R,61:D,62:N,63:P,64:M,65:j,66:B,67:L,68:Y,69:I,70:U,71:F,72:X,73:z,74:W},{13:72,19:20,20:21,21:22,22:e,23:n,24:a,26:i,28:s,29:49,30:61,32:62,34:r,36:l,37:o,38:h,39:d,40:u,41:p,43:23,44:y,45:f,46:b,47:g,48:x,49:_,50:m,51:E,52:A,53:S,54:C,55:k,56:O,57:v,58:T,59:w,60:R,61:D,62:N,63:P,64:M,65:j,66:B,67:L,68:Y,69:I,70:U,71:F,72:X,73:z,74:W},{13:73,19:20,20:21,21:22,22:e,23:n,24:a,26:i,28:s,29:49,30:61,32:62,34:r,36:l,37:o,38:h,39:d,40:u,41:p,43:23,44:y,45:f,46:b,47:g,48:x,49:_,50:m,51:E,52:A,53:S,54:C,55:k,56:O,57:v,58:T,59:w,60:R,61:D,62:N,63:P,64:M,65:j,66:B,67:L,68:Y,69:I,70:U,71:F,72:X,73:z,74:W},{14:[1,74]},t(Q,[2,13],{43:23,29:49,30:61,32:62,20:75,34:r,36:l,37:o,38:h,39:d,40:u,41:p,44:y,45:f,46:b,47:g,48:x,49:_,50:m,51:E,52:A,53:S,54:C,55:k,56:O,57:v,58:T,59:w,60:R,61:D,62:N,63:P,64:M,65:j,66:B,67:L,68:Y,69:I,70:U,71:F,72:X,73:z,74:W}),t(Q,[2,14]),t($,[2,16],{12:[1,76]}),t(Q,[2,36],{12:[1,77]}),t(q,[2,19]),t(q,[2,20]),{25:[1,78]},{27:[1,79]},t(q,[2,23]),{35:80,75:81,76:V,77:G,79:H,80:K},{35:86,75:81,76:V,77:G,79:H,80:K},{35:87,75:81,76:V,77:G,79:H,80:K},{35:88,75:81,76:V,77:G,79:H,80:K},{35:89,75:81,76:V,77:G,79:H,80:K},{35:90,75:81,76:V,77:G,79:H,80:K},{35:91,75:81,76:V,77:G,79:H,80:K},{35:92,75:81,76:V,77:G,79:H,80:K},{35:93,75:81,76:V,77:G,79:H,80:K},{35:94,75:81,76:V,77:G,79:H,80:K},{35:95,75:81,76:V,77:G,79:H,80:K},{35:96,75:81,76:V,77:G,79:H,80:K},{35:97,75:81,76:V,77:G,79:H,80:K},{35:98,75:81,76:V,77:G,79:H,80:K},{35:99,75:81,76:V,77:G,79:H,80:K},{35:100,75:81,76:V,77:G,79:H,80:K},{35:101,75:81,76:V,77:G,79:H,80:K},{35:102,75:81,76:V,77:G,79:H,80:K},{35:103,75:81,76:V,77:G,79:H,80:K},{35:104,75:81,76:V,77:G,79:H,80:K},t(J,[2,59]),{35:105,75:81,76:V,77:G,79:H,80:K},{35:106,75:81,76:V,77:G,79:H,80:K},{35:107,75:81,76:V,77:G,79:H,80:K},{35:108,75:81,76:V,77:G,79:H,80:K},{35:109,75:81,76:V,77:G,79:H,80:K},{35:110,75:81,76:V,77:G,79:H,80:K},{35:111,75:81,76:V,77:G,79:H,80:K},{35:112,75:81,76:V,77:G,79:H,80:K},{35:113,75:81,76:V,77:G,79:H,80:K},{35:114,75:81,76:V,77:G,79:H,80:K},{35:115,75:81,76:V,77:G,79:H,80:K},{20:116,29:49,30:61,32:62,34:r,36:l,37:o,38:h,39:d,40:u,41:p,43:23,44:y,45:f,46:b,47:g,48:x,49:_,50:m,51:E,52:A,53:S,54:C,55:k,56:O,57:v,58:T,59:w,60:R,61:D,62:N,63:P,64:M,65:j,66:B,67:L,68:Y,69:I,70:U,71:F,72:X,73:z,74:W},{12:[1,118],33:[1,117]},{35:119,75:81,76:V,77:G,79:H,80:K},{35:120,75:81,76:V,77:G,79:H,80:K},{35:121,75:81,76:V,77:G,79:H,80:K},{35:122,75:81,76:V,77:G,79:H,80:K},{35:123,75:81,76:V,77:G,79:H,80:K},{35:124,75:81,76:V,77:G,79:H,80:K},{35:125,75:81,76:V,77:G,79:H,80:K},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},t(Q,[2,15]),t($,[2,17],{21:22,19:130,22:e,23:n,24:a,26:i,28:s}),t(Q,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:e,23:n,24:a,26:i,28:s,34:r,36:l,37:o,38:h,39:d,40:u,41:p,44:y,45:f,46:b,47:g,48:x,49:_,50:m,51:E,52:A,53:S,54:C,55:k,56:O,57:v,58:T,59:w,60:R,61:D,62:N,63:P,64:M,65:j,66:B,67:L,68:Y,69:I,70:U,71:F,72:X,73:z,74:W}),t(q,[2,21]),t(q,[2,22]),t(J,[2,39]),t(Z,[2,71],{75:81,35:132,76:V,77:G,79:H,80:K}),t(tt,[2,73]),{78:[1,133]},t(tt,[2,75]),t(tt,[2,76]),t(J,[2,40]),t(J,[2,41]),t(J,[2,42]),t(J,[2,43]),t(J,[2,44]),t(J,[2,45]),t(J,[2,46]),t(J,[2,47]),t(J,[2,48]),t(J,[2,49]),t(J,[2,50]),t(J,[2,51]),t(J,[2,52]),t(J,[2,53]),t(J,[2,54]),t(J,[2,55]),t(J,[2,56]),t(J,[2,57]),t(J,[2,58]),t(J,[2,60]),t(J,[2,61]),t(J,[2,62]),t(J,[2,63]),t(J,[2,64]),t(J,[2,65]),t(J,[2,66]),t(J,[2,67]),t(J,[2,68]),t(J,[2,69]),t(J,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},t(et,[2,28]),t(et,[2,29]),t(et,[2,30]),t(et,[2,31]),t(et,[2,32]),t(et,[2,33]),t(et,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},t($,[2,18]),t(Q,[2,38]),t(Z,[2,72]),t(tt,[2,74]),t(J,[2,24]),t(J,[2,35]),t(nt,[2,25]),t(nt,[2,26],{12:[1,138]}),t(nt,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],a=[],i=[null],s=[],r=this.table,l="",o=0,c=0,h=s.slice.call(arguments,1),d=Object.create(this.lexer),u={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(u.yy[p]=this.yy[p]);d.setInput(t,u.yy),u.yy.lexer=d,u.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var y=d.yylloc;s.push(y);var f=d.options&&d.options.ranges;"function"==typeof u.yy.parseError?this.parseError=u.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var b,g,x,_,m,E,A,S,C,k={};;){if(g=n[n.length-1],this.defaultActions[g]?x=this.defaultActions[g]:(null==b&&(C=void 0,"number"!=typeof(C=a.pop()||d.lex()||1)&&(C instanceof Array&&(C=(a=C).pop()),C=e.symbols_[C]||C),b=C),x=r[g]&&r[g][b]),void 0===x||!x.length||!x[0]){var O="";for(m in S=[],r[g])this.terminals_[m]&&m>2&&S.push("'"+this.terminals_[m]+"'");O=d.showPosition?"Parse error on line "+(o+1)+":\n"+d.showPosition()+"\nExpecting "+S.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(o+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(O,{text:d.match,token:this.terminals_[b]||b,line:d.yylineno,loc:y,expected:S})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+g+", token: "+b);switch(x[0]){case 1:n.push(b),i.push(d.yytext),s.push(d.yylloc),n.push(x[1]),b=null,c=d.yyleng,l=d.yytext,o=d.yylineno,y=d.yylloc;break;case 2:if(E=this.productions_[x[1]][1],k.$=i[i.length-E],k._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},f&&(k._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),void 0!==(_=this.performAction.apply(k,[l,c,o,u.yy,x[1],i,s].concat(h))))return _;E&&(n=n.slice(0,-1*E*2),i=i.slice(0,-1*E),s=s.slice(0,-1*E)),n.push(this.productions_[x[1]][0]),i.push(k.$),s.push(k._$),A=r[n[n.length-2]][n[n.length-1]],n.push(A);break;case 3:return!0}}return!0}},it={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var a=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===a.length?this.yylloc.first_column:0)+a[a.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,a,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(a=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=a.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:a?a[a.length-1].length-a[a.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var s in i)this[s]=i[s];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,a;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),s=0;se[0].length)){if(e=n,a=s,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[s])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[a]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,n,a){switch(n){case 0:return 6;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 22;case 5:return 23;case 6:return this.begin("acc_title"),24;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),26;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:case 73:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:case 16:case 70:break;case 14:c;break;case 15:return 12;case 17:return 11;case 18:return 15;case 19:return 16;case 20:return 17;case 21:return 18;case 22:return this.begin("person_ext"),45;case 23:return this.begin("person"),44;case 24:return this.begin("system_ext_queue"),51;case 25:return this.begin("system_ext_db"),50;case 26:return this.begin("system_ext"),49;case 27:return this.begin("system_queue"),48;case 28:return this.begin("system_db"),47;case 29:return this.begin("system"),46;case 30:return this.begin("boundary"),37;case 31:return this.begin("enterprise_boundary"),34;case 32:return this.begin("system_boundary"),36;case 33:return this.begin("container_ext_queue"),57;case 34:return this.begin("container_ext_db"),56;case 35:return this.begin("container_ext"),55;case 36:return this.begin("container_queue"),54;case 37:return this.begin("container_db"),53;case 38:return this.begin("container"),52;case 39:return this.begin("container_boundary"),38;case 40:return this.begin("component_ext_queue"),63;case 41:return this.begin("component_ext_db"),62;case 42:return this.begin("component_ext"),61;case 43:return this.begin("component_queue"),60;case 44:return this.begin("component_db"),59;case 45:return this.begin("component"),58;case 46:case 47:return this.begin("node"),39;case 48:return this.begin("node_l"),40;case 49:return this.begin("node_r"),41;case 50:return this.begin("rel"),64;case 51:return this.begin("birel"),65;case 52:case 53:return this.begin("rel_u"),66;case 54:case 55:return this.begin("rel_d"),67;case 56:case 57:return this.begin("rel_l"),68;case 58:case 59:return this.begin("rel_r"),69;case 60:return this.begin("rel_b"),70;case 61:return this.begin("rel_index"),71;case 62:return this.begin("update_el_style"),72;case 63:return this.begin("update_rel_style"),73;case 64:return this.begin("update_layout_config"),74;case 65:return"EOF_IN_STRUCT";case 66:return this.begin("attribute"),"ATTRIBUTE_EMPTY";case 67:this.begin("attribute");break;case 68:case 79:this.popState(),this.popState();break;case 69:case 71:return 80;case 72:this.begin("string");break;case 74:case 80:return"STR";case 75:this.begin("string_kv");break;case 76:return this.begin("string_kv_key"),"STR_KEY";case 77:this.popState(),this.begin("string_kv_value");break;case 78:return"STR_VALUE";case 81:return"LBRACE";case 82:return"RBRACE";case 83:return"SPACE";case 84:return"EOL";case 85:return 14}},rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:title\s[^#\n;]+)/,/^(?:accDescription\s[^#\n;]+)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:C4Context\b)/,/^(?:C4Container\b)/,/^(?:C4Component\b)/,/^(?:C4Dynamic\b)/,/^(?:C4Deployment\b)/,/^(?:Person_Ext\b)/,/^(?:Person\b)/,/^(?:SystemQueue_Ext\b)/,/^(?:SystemDb_Ext\b)/,/^(?:System_Ext\b)/,/^(?:SystemQueue\b)/,/^(?:SystemDb\b)/,/^(?:System\b)/,/^(?:Boundary\b)/,/^(?:Enterprise_Boundary\b)/,/^(?:System_Boundary\b)/,/^(?:ContainerQueue_Ext\b)/,/^(?:ContainerDb_Ext\b)/,/^(?:Container_Ext\b)/,/^(?:ContainerQueue\b)/,/^(?:ContainerDb\b)/,/^(?:Container\b)/,/^(?:Container_Boundary\b)/,/^(?:ComponentQueue_Ext\b)/,/^(?:ComponentDb_Ext\b)/,/^(?:Component_Ext\b)/,/^(?:ComponentQueue\b)/,/^(?:ComponentDb\b)/,/^(?:Component\b)/,/^(?:Deployment_Node\b)/,/^(?:Node\b)/,/^(?:Node_L\b)/,/^(?:Node_R\b)/,/^(?:Rel\b)/,/^(?:BiRel\b)/,/^(?:Rel_Up\b)/,/^(?:Rel_U\b)/,/^(?:Rel_Down\b)/,/^(?:Rel_D\b)/,/^(?:Rel_Left\b)/,/^(?:Rel_L\b)/,/^(?:Rel_Right\b)/,/^(?:Rel_R\b)/,/^(?:Rel_Back\b)/,/^(?:RelIndex\b)/,/^(?:UpdateElementStyle\b)/,/^(?:UpdateRelStyle\b)/,/^(?:UpdateLayoutConfig\b)/,/^(?:$)/,/^(?:[(][ ]*[,])/,/^(?:[(])/,/^(?:[)])/,/^(?:,,)/,/^(?:,)/,/^(?:[ ]*["]["])/,/^(?:[ ]*["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[ ]*[\$])/,/^(?:[^=]*)/,/^(?:[=][ ]*["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:[^,]+)/,/^(?:\{)/,/^(?:\})/,/^(?:[\s]+)/,/^(?:[\n\r]+)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},string_kv_value:{rules:[78,79],inclusive:!1},string_kv_key:{rules:[77],inclusive:!1},string_kv:{rules:[76],inclusive:!1},string:{rules:[73,74],inclusive:!1},attribute:{rules:[68,69,70,71,72,75,80],inclusive:!1},update_layout_config:{rules:[65,66,67,68],inclusive:!1},update_rel_style:{rules:[65,66,67,68],inclusive:!1},update_el_style:{rules:[65,66,67,68],inclusive:!1},rel_b:{rules:[65,66,67,68],inclusive:!1},rel_r:{rules:[65,66,67,68],inclusive:!1},rel_l:{rules:[65,66,67,68],inclusive:!1},rel_d:{rules:[65,66,67,68],inclusive:!1},rel_u:{rules:[65,66,67,68],inclusive:!1},rel_bi:{rules:[],inclusive:!1},rel:{rules:[65,66,67,68],inclusive:!1},node_r:{rules:[65,66,67,68],inclusive:!1},node_l:{rules:[65,66,67,68],inclusive:!1},node:{rules:[65,66,67,68],inclusive:!1},index:{rules:[],inclusive:!1},rel_index:{rules:[65,66,67,68],inclusive:!1},component_ext_queue:{rules:[],inclusive:!1},component_ext_db:{rules:[65,66,67,68],inclusive:!1},component_ext:{rules:[65,66,67,68],inclusive:!1},component_queue:{rules:[65,66,67,68],inclusive:!1},component_db:{rules:[65,66,67,68],inclusive:!1},component:{rules:[65,66,67,68],inclusive:!1},container_boundary:{rules:[65,66,67,68],inclusive:!1},container_ext_queue:{rules:[65,66,67,68],inclusive:!1},container_ext_db:{rules:[65,66,67,68],inclusive:!1},container_ext:{rules:[65,66,67,68],inclusive:!1},container_queue:{rules:[65,66,67,68],inclusive:!1},container_db:{rules:[65,66,67,68],inclusive:!1},container:{rules:[65,66,67,68],inclusive:!1},birel:{rules:[65,66,67,68],inclusive:!1},system_boundary:{rules:[65,66,67,68],inclusive:!1},enterprise_boundary:{rules:[65,66,67,68],inclusive:!1},boundary:{rules:[65,66,67,68],inclusive:!1},system_ext_queue:{rules:[65,66,67,68],inclusive:!1},system_ext_db:{rules:[65,66,67,68],inclusive:!1},system_ext:{rules:[65,66,67,68],inclusive:!1},system_queue:{rules:[65,66,67,68],inclusive:!1},system_db:{rules:[65,66,67,68],inclusive:!1},system:{rules:[65,66,67,68],inclusive:!1},person_ext:{rules:[65,66,67,68],inclusive:!1},person:{rules:[65,66,67,68],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,81,82,83,84,85],inclusive:!0}}};function st(){this.yy={}}return at.lexer=it,st.prototype=at,at.Parser=st,new st}());l.parser=l;const o=l;let h=[],d=[""],u="global",p="",y=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],f=[],b="",g=!1,x=4,_=2;var m;const E=function(t){return null==t?h:h.filter((e=>e.parentBoundary===t))},A=function(t){return null==t?y:y.filter((e=>e.parentBoundary===t))},S=function(){return g},C={addPersonOrSystem:function(t,e,n,a,i,s,r){if(null===e||null===n)return;let l={};const o=h.find((t=>t.alias===e));if(o&&e===o.alias?l=o:(l.alias=e,h.push(l)),l.label=null==n?{text:""}:{text:n},null==a)l.descr={text:""};else if("object"==typeof a){let[t,e]=Object.entries(a)[0];l[t]={text:e}}else l.descr={text:a};if("object"==typeof i){let[t,e]=Object.entries(i)[0];l[t]=e}else l.sprite=i;if("object"==typeof s){let[t,e]=Object.entries(s)[0];l[t]=e}else l.tags=s;if("object"==typeof r){let[t,e]=Object.entries(r)[0];l[t]=e}else l.link=r;l.typeC4Shape={text:t},l.parentBoundary=u,l.wrap=S()},addPersonOrSystemBoundary:function(t,e,n,a,i){if(null===t||null===e)return;let s={};const r=y.find((e=>e.alias===t));if(r&&t===r.alias?s=r:(s.alias=t,y.push(s)),s.label=null==e?{text:""}:{text:e},null==n)s.type={text:"system"};else if("object"==typeof n){let[t,e]=Object.entries(n)[0];s[t]={text:e}}else s.type={text:n};if("object"==typeof a){let[t,e]=Object.entries(a)[0];s[t]=e}else s.tags=a;if("object"==typeof i){let[t,e]=Object.entries(i)[0];s[t]=e}else s.link=i;s.parentBoundary=u,s.wrap=S(),p=u,u=t,d.push(p)},addContainer:function(t,e,n,a,i,s,r,l){if(null===e||null===n)return;let o={};const c=h.find((t=>t.alias===e));if(c&&e===c.alias?o=c:(o.alias=e,h.push(o)),o.label=null==n?{text:""}:{text:n},null==a)o.techn={text:""};else if("object"==typeof a){let[t,e]=Object.entries(a)[0];o[t]={text:e}}else o.techn={text:a};if(null==i)o.descr={text:""};else if("object"==typeof i){let[t,e]=Object.entries(i)[0];o[t]={text:e}}else o.descr={text:i};if("object"==typeof s){let[t,e]=Object.entries(s)[0];o[t]=e}else o.sprite=s;if("object"==typeof r){let[t,e]=Object.entries(r)[0];o[t]=e}else o.tags=r;if("object"==typeof l){let[t,e]=Object.entries(l)[0];o[t]=e}else o.link=l;o.wrap=S(),o.typeC4Shape={text:t},o.parentBoundary=u},addContainerBoundary:function(t,e,n,a,i){if(null===t||null===e)return;let s={};const r=y.find((e=>e.alias===t));if(r&&t===r.alias?s=r:(s.alias=t,y.push(s)),s.label=null==e?{text:""}:{text:e},null==n)s.type={text:"container"};else if("object"==typeof n){let[t,e]=Object.entries(n)[0];s[t]={text:e}}else s.type={text:n};if("object"==typeof a){let[t,e]=Object.entries(a)[0];s[t]=e}else s.tags=a;if("object"==typeof i){let[t,e]=Object.entries(i)[0];s[t]=e}else s.link=i;s.parentBoundary=u,s.wrap=S(),p=u,u=t,d.push(p)},addComponent:function(t,e,n,a,i,s,r,l){if(null===e||null===n)return;let o={};const c=h.find((t=>t.alias===e));if(c&&e===c.alias?o=c:(o.alias=e,h.push(o)),o.label=null==n?{text:""}:{text:n},null==a)o.techn={text:""};else if("object"==typeof a){let[t,e]=Object.entries(a)[0];o[t]={text:e}}else o.techn={text:a};if(null==i)o.descr={text:""};else if("object"==typeof i){let[t,e]=Object.entries(i)[0];o[t]={text:e}}else o.descr={text:i};if("object"==typeof s){let[t,e]=Object.entries(s)[0];o[t]=e}else o.sprite=s;if("object"==typeof r){let[t,e]=Object.entries(r)[0];o[t]=e}else o.tags=r;if("object"==typeof l){let[t,e]=Object.entries(l)[0];o[t]=e}else o.link=l;o.wrap=S(),o.typeC4Shape={text:t},o.parentBoundary=u},addDeploymentNode:function(t,e,n,a,i,s,r,l){if(null===e||null===n)return;let o={};const c=y.find((t=>t.alias===e));if(c&&e===c.alias?o=c:(o.alias=e,y.push(o)),o.label=null==n?{text:""}:{text:n},null==a)o.type={text:"node"};else if("object"==typeof a){let[t,e]=Object.entries(a)[0];o[t]={text:e}}else o.type={text:a};if(null==i)o.descr={text:""};else if("object"==typeof i){let[t,e]=Object.entries(i)[0];o[t]={text:e}}else o.descr={text:i};if("object"==typeof r){let[t,e]=Object.entries(r)[0];o[t]=e}else o.tags=r;if("object"==typeof l){let[t,e]=Object.entries(l)[0];o[t]=e}else o.link=l;o.nodeType=t,o.parentBoundary=u,o.wrap=S(),p=u,u=e,d.push(p)},popBoundaryParseStack:function(){u=p,d.pop(),p=d.pop(),d.push(p)},addRel:function(t,e,n,a,i,s,r,l,o){if(null==t||null==e||null==n||null==a)return;let c={};const h=f.find((t=>t.from===e&&t.to===n));if(h?c=h:f.push(c),c.type=t,c.from=e,c.to=n,c.label={text:a},null==i)c.techn={text:""};else if("object"==typeof i){let[t,e]=Object.entries(i)[0];c[t]={text:e}}else c.techn={text:i};if(null==s)c.descr={text:""};else if("object"==typeof s){let[t,e]=Object.entries(s)[0];c[t]={text:e}}else c.descr={text:s};if("object"==typeof r){let[t,e]=Object.entries(r)[0];c[t]=e}else c.sprite=r;if("object"==typeof l){let[t,e]=Object.entries(l)[0];c[t]=e}else c.tags=l;if("object"==typeof o){let[t,e]=Object.entries(o)[0];c[t]=e}else c.link=o;c.wrap=S()},updateElStyle:function(t,e,n,a,i,s,r,l,o,c,d){let u=h.find((t=>t.alias===e));if(void 0!==u||(u=y.find((t=>t.alias===e)),void 0!==u)){if(null!=n)if("object"==typeof n){let[t,e]=Object.entries(n)[0];u[t]=e}else u.bgColor=n;if(null!=a)if("object"==typeof a){let[t,e]=Object.entries(a)[0];u[t]=e}else u.fontColor=a;if(null!=i)if("object"==typeof i){let[t,e]=Object.entries(i)[0];u[t]=e}else u.borderColor=i;if(null!=s)if("object"==typeof s){let[t,e]=Object.entries(s)[0];u[t]=e}else u.shadowing=s;if(null!=r)if("object"==typeof r){let[t,e]=Object.entries(r)[0];u[t]=e}else u.shape=r;if(null!=l)if("object"==typeof l){let[t,e]=Object.entries(l)[0];u[t]=e}else u.sprite=l;if(null!=o)if("object"==typeof o){let[t,e]=Object.entries(o)[0];u[t]=e}else u.techn=o;if(null!=c)if("object"==typeof c){let[t,e]=Object.entries(c)[0];u[t]=e}else u.legendText=c;if(null!=d)if("object"==typeof d){let[t,e]=Object.entries(d)[0];u[t]=e}else u.legendSprite=d}},updateRelStyle:function(t,e,n,a,i,s,r){const l=f.find((t=>t.from===e&&t.to===n));if(void 0!==l){if(null!=a)if("object"==typeof a){let[t,e]=Object.entries(a)[0];l[t]=e}else l.textColor=a;if(null!=i)if("object"==typeof i){let[t,e]=Object.entries(i)[0];l[t]=e}else l.lineColor=i;if(null!=s)if("object"==typeof s){let[t,e]=Object.entries(s)[0];l[t]=parseInt(e)}else l.offsetX=parseInt(s);if(null!=r)if("object"==typeof r){let[t,e]=Object.entries(r)[0];l[t]=parseInt(e)}else l.offsetY=parseInt(r)}},updateLayoutConfig:function(t,e,n){let a=x,i=_;if("object"==typeof e){const t=Object.values(e)[0];a=parseInt(t)}else a=parseInt(e);if("object"==typeof n){const t=Object.values(n)[0];i=parseInt(t)}else i=parseInt(n);a>=1&&(x=a),i>=1&&(_=i)},autoWrap:S,setWrap:function(t){g=t},getC4ShapeArray:E,getC4Shape:function(t){return h.find((e=>e.alias===t))},getC4ShapeKeys:function(t){return Object.keys(E(t))},getBoundaries:A,getBoundarys:A,getCurrentBoundaryParse:function(){return u},getParentBoundaryParse:function(){return p},getRels:function(){return f},getTitle:function(){return b},getC4Type:function(){return m},getC4ShapeInRow:function(){return x},getC4BoundaryInRow:function(){return _},setAccTitle:a.s,getAccTitle:a.g,getAccDescription:a.a,setAccDescription:a.b,getConfig:()=>(0,a.c)().c4,clear:function(){h=[],y=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],p="",u="global",d=[""],f=[],d=[""],b="",g=!1,x=4,_=2},LINETYPE:{SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25},ARROWTYPE:{FILLED:0,OPEN:1},PLACEMENT:{LEFTOF:0,RIGHTOF:1,OVER:2},setTitle:function(t){let e=(0,a.d)(t,(0,a.c)());b=e},setC4Type:function(t){let e=(0,a.d)(t,(0,a.c)());m=e}},k=function(t,e){return(0,s.d)(t,e)},O=function(t,e,n,a,i,s){const l=t.append("image");l.attr("width",e),l.attr("height",n),l.attr("x",a),l.attr("y",i);let o=s.startsWith("data:image/png;base64")?s:(0,r.Jf)(s);l.attr("xlink:href",o)},v=(t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),T=function(){function t(t,e,n,a,s,r,l){i(e.append("text").attr("x",n+s/2).attr("y",a+r/2+5).style("text-anchor","middle").text(t),l)}function e(t,e,n,s,r,l,o,c){const{fontSize:h,fontFamily:d,fontWeight:u}=c,p=t.split(a.e.lineBreakRegex);for(let a=0;a>"),e.typeC4Shape.text){case"person":case"external_person":O(c,48,48,e.x+e.width/2-24,e.y+e.image.Y,o)}let u=n[e.typeC4Shape.text+"Font"]();return u.fontWeight="bold",u.fontSize=u.fontSize+2,u.fontColor=l,T(n)(e.label.text,c,e.x,e.y+e.label.Y,e.width,e.height,{fill:l},u),u=n[e.typeC4Shape.text+"Font"](),u.fontColor=l,e.techn&&""!==(null==(a=e.techn)?void 0:a.text)?T(n)(e.techn.text,c,e.x,e.y+e.techn.Y,e.width,e.height,{fill:l,"font-style":"italic"},u):e.type&&""!==e.type.text&&T(n)(e.type.text,c,e.x,e.y+e.type.Y,e.width,e.height,{fill:l,"font-style":"italic"},u),e.descr&&""!==e.descr.text&&(u=n.personFont(),u.fontColor=l,T(n)(e.descr.text,c,e.x,e.y+e.descr.Y,e.width,e.height,{fill:l},u)),e.height},D=(t,e,n)=>{const a=t.append("g");let i=0;for(let s of e){let t=s.textColor?s.textColor:"#444444",e=s.lineColor?s.lineColor:"#444444",r=s.offsetX?parseInt(s.offsetX):0,l=s.offsetY?parseInt(s.offsetY):0,o="";if(0===i){let t=a.append("line");t.attr("x1",s.startPoint.x),t.attr("y1",s.startPoint.y),t.attr("x2",s.endPoint.x),t.attr("y2",s.endPoint.y),t.attr("stroke-width","1"),t.attr("stroke",e),t.style("fill","none"),"rel_b"!==s.type&&t.attr("marker-end","url("+o+"#arrowhead)"),"birel"!==s.type&&"rel_b"!==s.type||t.attr("marker-start","url("+o+"#arrowend)"),i=-1}else{let t=a.append("path");t.attr("fill","none").attr("stroke-width","1").attr("stroke",e).attr("d","Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx",s.startPoint.x).replaceAll("starty",s.startPoint.y).replaceAll("controlx",s.startPoint.x+(s.endPoint.x-s.startPoint.x)/2-(s.endPoint.x-s.startPoint.x)/4).replaceAll("controly",s.startPoint.y+(s.endPoint.y-s.startPoint.y)/2).replaceAll("stopx",s.endPoint.x).replaceAll("stopy",s.endPoint.y)),"rel_b"!==s.type&&t.attr("marker-end","url("+o+"#arrowhead)"),"birel"!==s.type&&"rel_b"!==s.type||t.attr("marker-start","url("+o+"#arrowend)")}let c=n.messageFont();T(n)(s.label.text,a,Math.min(s.startPoint.x,s.endPoint.x)+Math.abs(s.endPoint.x-s.startPoint.x)/2+r,Math.min(s.startPoint.y,s.endPoint.y)+Math.abs(s.endPoint.y-s.startPoint.y)/2+l,s.label.width,s.label.height,{fill:t},c),s.techn&&""!==s.techn.text&&(c=n.messageFont(),T(n)("["+s.techn.text+"]",a,Math.min(s.startPoint.x,s.endPoint.x)+Math.abs(s.endPoint.x-s.startPoint.x)/2+r,Math.min(s.startPoint.y,s.endPoint.y)+Math.abs(s.endPoint.y-s.startPoint.y)/2+n.messageFontSize+5+l,Math.max(s.label.width,s.techn.width),s.techn.height,{fill:t,"font-style":"italic"},c))}},N=function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")},P=function(t){t.append("defs").append("marker").attr("id","arrowend").attr("refX",1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z")},M=function(t){t.append("defs").append("marker").attr("id","filled-head").attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},j=function(t){const e=t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);e.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),e.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},B=function(t){t.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},L=function(t){t.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},Y=function(t){t.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")};let I=0,U=0,F=4,X=2;l.yy=C;let z={};class W{constructor(t){this.name="",this.data={},this.data.startx=void 0,this.data.stopx=void 0,this.data.starty=void 0,this.data.stopy=void 0,this.data.widthLimit=void 0,this.nextData={},this.nextData.startx=void 0,this.nextData.stopx=void 0,this.nextData.starty=void 0,this.nextData.stopy=void 0,this.nextData.cnt=0,Q(t.db.getConfig())}setData(t,e,n,a){this.nextData.startx=this.data.startx=t,this.nextData.stopx=this.data.stopx=e,this.nextData.starty=this.data.starty=n,this.nextData.stopy=this.data.stopy=a}updateVal(t,e,n,a){void 0===t[e]?t[e]=n:t[e]=a(n,t[e])}insert(t){this.nextData.cnt=this.nextData.cnt+1;let e=this.nextData.startx===this.nextData.stopx?this.nextData.stopx+t.margin:this.nextData.stopx+2*t.margin,n=e+t.width,a=this.nextData.starty+2*t.margin,i=a+t.height;(e>=this.data.widthLimit||n>=this.data.widthLimit||this.nextData.cnt>F)&&(e=this.nextData.startx+t.margin+z.nextLinePaddingX,a=this.nextData.stopy+2*t.margin,this.nextData.stopx=n=e+t.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=i=a+t.height,this.nextData.cnt=1),t.x=e,t.y=a,this.updateVal(this.data,"startx",e,Math.min),this.updateVal(this.data,"starty",a,Math.min),this.updateVal(this.data,"stopx",n,Math.max),this.updateVal(this.data,"stopy",i,Math.max),this.updateVal(this.nextData,"startx",e,Math.min),this.updateVal(this.nextData,"starty",a,Math.min),this.updateVal(this.nextData,"stopx",n,Math.max),this.updateVal(this.nextData,"stopy",i,Math.max)}init(t){this.name="",this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,widthLimit:void 0},this.nextData={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,cnt:0},Q(t.db.getConfig())}bumpLastMargin(t){this.data.stopx+=t,this.data.stopy+=t}}const Q=function(t){(0,a.f)(z,t),t.fontFamily&&(z.personFontFamily=z.systemFontFamily=z.messageFontFamily=t.fontFamily),t.fontSize&&(z.personFontSize=z.systemFontSize=z.messageFontSize=t.fontSize),t.fontWeight&&(z.personFontWeight=z.systemFontWeight=z.messageFontWeight=t.fontWeight)},$=(t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),q=t=>({fontFamily:t.boundaryFontFamily,fontSize:t.boundaryFontSize,fontWeight:t.boundaryFontWeight});function V(t,e,n,i,s){if(!e[t].width)if(n)e[t].text=(0,a.w)(e[t].text,s,i),e[t].textLines=e[t].text.split(a.e.lineBreakRegex).length,e[t].width=s,e[t].height=(0,a.j)(e[t].text,i);else{let n=e[t].text.split(a.e.lineBreakRegex);e[t].textLines=n.length;let s=0;e[t].height=0,e[t].width=0;for(const r of n)e[t].width=Math.max((0,a.h)(r,i),e[t].width),s=(0,a.j)(r,i),e[t].height=e[t].height+s}}const G=function(t,e,n){e.x=n.data.startx,e.y=n.data.starty,e.width=n.data.stopx-n.data.startx,e.height=n.data.stopy-n.data.starty,e.label.y=z.c4ShapeMargin-35;let i=e.wrap&&z.wrap,s=q(z);s.fontSize=s.fontSize+2,s.fontWeight="bold",V("label",e,i,s,(0,a.h)(e.label.text,s)),w(t,e,z)},H=function(t,e,n,i){let s=0;for(const r of i){s=0;const i=n[r];let l=$(z,i.typeC4Shape.text);switch(l.fontSize=l.fontSize-2,i.typeC4Shape.width=(0,a.h)("\xab"+i.typeC4Shape.text+"\xbb",l),i.typeC4Shape.height=l.fontSize+2,i.typeC4Shape.Y=z.c4ShapePadding,s=i.typeC4Shape.Y+i.typeC4Shape.height-4,i.image={width:0,height:0,Y:0},i.typeC4Shape.text){case"person":case"external_person":i.image.width=48,i.image.height=48,i.image.Y=s,s=i.image.Y+i.image.height}i.sprite&&(i.image.width=48,i.image.height=48,i.image.Y=s,s=i.image.Y+i.image.height);let o=i.wrap&&z.wrap,c=z.width-2*z.c4ShapePadding,h=$(z,i.typeC4Shape.text);if(h.fontSize=h.fontSize+2,h.fontWeight="bold",V("label",i,o,h,c),i.label.Y=s+8,s=i.label.Y+i.label.height,i.type&&""!==i.type.text){i.type.text="["+i.type.text+"]",V("type",i,o,$(z,i.typeC4Shape.text),c),i.type.Y=s+5,s=i.type.Y+i.type.height}else if(i.techn&&""!==i.techn.text){i.techn.text="["+i.techn.text+"]",V("techn",i,o,$(z,i.techn.text),c),i.techn.Y=s+5,s=i.techn.Y+i.techn.height}let d=s,u=i.label.width;if(i.descr&&""!==i.descr.text){V("descr",i,o,$(z,i.typeC4Shape.text),c),i.descr.Y=s+20,s=i.descr.Y+i.descr.height,u=Math.max(i.label.width,i.descr.width),d=s-5*i.descr.textLines}u+=z.c4ShapePadding,i.width=Math.max(i.width||z.width,u,z.width),i.height=Math.max(i.height||z.height,d,z.height),i.margin=i.margin||z.c4ShapeMargin,t.insert(i),R(e,i,z)}t.bumpLastMargin(z.c4ShapeMargin)};class K{constructor(t,e){this.x=t,this.y=e}}let J=function(t,e){let n=t.x,a=t.y,i=e.x,s=e.y,r=n+t.width/2,l=a+t.height/2,o=Math.abs(n-i),c=Math.abs(a-s),h=c/o,d=t.height/t.width,u=null;return a==s&&ni?u=new K(n,l):n==i&&as&&(u=new K(r,a)),n>i&&a=h?new K(n,l+h*t.width/2):new K(r-o/c*t.height/2,a+t.height):n=h?new K(n+t.width,l+h*t.width/2):new K(r+o/c*t.height/2,a+t.height):ns?u=d>=h?new K(n+t.width,l-h*t.width/2):new K(r+t.height/2*o/c,a):n>i&&a>s&&(u=d>=h?new K(n,l-t.width/2*h):new K(r-t.height/2*o/c,a)),u},Z=function(t,e){let n={x:0,y:0};n.x=e.x+e.width/2,n.y=e.y+e.height/2;let a=J(t,n);return n.x=t.x+t.width/2,n.y=t.y+t.height/2,{startPoint:a,endPoint:J(e,n)}};function tt(t,e,n,a,i){let s=new W(i);s.data.widthLimit=n.data.widthLimit/Math.min(X,a.length);for(let[r,l]of a.entries()){let a=0;l.image={width:0,height:0,Y:0},l.sprite&&(l.image.width=48,l.image.height=48,l.image.Y=a,a=l.image.Y+l.image.height);let o=l.wrap&&z.wrap,c=q(z);if(c.fontSize=c.fontSize+2,c.fontWeight="bold",V("label",l,o,c,s.data.widthLimit),l.label.Y=a+8,a=l.label.Y+l.label.height,l.type&&""!==l.type.text){l.type.text="["+l.type.text+"]",V("type",l,o,q(z),s.data.widthLimit),l.type.Y=a+5,a=l.type.Y+l.type.height}if(l.descr&&""!==l.descr.text){let t=q(z);t.fontSize=t.fontSize-2,V("descr",l,o,t,s.data.widthLimit),l.descr.Y=a+20,a=l.descr.Y+l.descr.height}if(0==r||r%X==0){let t=n.data.startx+z.diagramMarginX,e=n.data.stopy+z.diagramMarginY+a;s.setData(t,t,e,e)}else{let t=s.data.stopx!==s.data.startx?s.data.stopx+z.diagramMarginX:s.data.startx,e=s.data.starty;s.setData(t,t,e,e)}s.name=l.alias;let h=i.db.getC4ShapeArray(l.alias),d=i.db.getC4ShapeKeys(l.alias);d.length>0&&H(s,t,h,d),e=l.alias;let u=i.db.getBoundarys(e);u.length>0&&tt(t,e,s,u,i),"global"!==l.alias&&G(t,l,s),n.data.stopy=Math.max(s.data.stopy+z.c4ShapeMargin,n.data.stopy),n.data.stopx=Math.max(s.data.stopx+z.c4ShapeMargin,n.data.stopx),I=Math.max(I,n.data.stopx),U=Math.max(U,n.data.stopy)}}const et={drawPersonOrSystemArray:H,drawBoundary:G,setConf:Q,draw:function(t,e,n,s){z=(0,a.c)().c4;const r=(0,a.c)().securityLevel;let l;"sandbox"===r&&(l=(0,i.Ltv)("#i"+e));const o="sandbox"===r?(0,i.Ltv)(l.nodes()[0].contentDocument.body):(0,i.Ltv)("body");let c=s.db;s.db.setWrap(z.wrap),F=c.getC4ShapeInRow(),X=c.getC4BoundaryInRow(),a.l.debug(`C:${JSON.stringify(z,null,2)}`);const h="sandbox"===r?o.select(`[id="${e}"]`):(0,i.Ltv)(`[id="${e}"]`);L(h),B(h),Y(h);let d=new W(s);d.setData(z.diagramMarginX,z.diagramMarginX,z.diagramMarginY,z.diagramMarginY),d.data.widthLimit=screen.availWidth,I=z.diagramMarginX,U=z.diagramMarginY;const u=s.db.getTitle();tt(h,"",d,s.db.getBoundarys(""),s),N(h),P(h),j(h),M(h),function(t,e,n,i){let s=0;for(let l of e){s+=1;let t=l.wrap&&z.wrap,e={fontFamily:(r=z).messageFontFamily,fontSize:r.messageFontSize,fontWeight:r.messageFontWeight};"C4Dynamic"===i.db.getC4Type()&&(l.label.text=s+": "+l.label.text);let o=(0,a.h)(l.label.text,e);V("label",l,t,e,o),l.techn&&""!==l.techn.text&&(o=(0,a.h)(l.techn.text,e),V("techn",l,t,e,o)),l.descr&&""!==l.descr.text&&(o=(0,a.h)(l.descr.text,e),V("descr",l,t,e,o));let c=n(l.from),h=n(l.to),d=Z(c,h);l.startPoint=d.startPoint,l.endPoint=d.endPoint}var r;D(t,e,z)}(h,s.db.getRels(),s.db.getC4Shape,s),d.data.stopx=I,d.data.stopy=U;const p=d.data;let y=p.stopy-p.starty+2*z.diagramMarginY;const f=p.stopx-p.startx+2*z.diagramMarginX;u&&h.append("text").text(u).attr("x",(p.stopx-p.startx)/2-4*z.diagramMarginX).attr("y",p.starty+z.diagramMarginY),(0,a.i)(h,y,f,z.useMaxWidth);const b=u?60:0;h.attr("viewBox",p.startx-z.diagramMarginX+" -"+(z.diagramMarginY+b)+" "+f+" "+(y+b)),a.l.debug("models:",p)}},nt={parser:o,db:C,renderer:et,styles:t=>`.person {\n stroke: ${t.personBorder};\n fill: ${t.personBkg};\n }\n`,init:({c4:t,wrap:e})=>{et.setConf(t),C.setWrap(e)}}},79186:(t,e,n)=>{n.d(e,{a:()=>r,b:()=>c,c:()=>o,d:()=>s,e:()=>d,f:()=>l,g:()=>h});var a=n(16750),i=n(86079);const s=(t,e)=>{const n=t.append("rect");if(n.attr("x",e.x),n.attr("y",e.y),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("width",e.width),n.attr("height",e.height),e.name&&n.attr("name",e.name),void 0!==e.rx&&n.attr("rx",e.rx),void 0!==e.ry&&n.attr("ry",e.ry),void 0!==e.attrs)for(const a in e.attrs)n.attr(a,e.attrs[a]);return void 0!==e.class&&n.attr("class",e.class),n},r=(t,e)=>{const n={x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"};s(t,n).lower()},l=(t,e)=>{const n=e.text.replace(i.J," "),a=t.append("text");a.attr("x",e.x),a.attr("y",e.y),a.attr("class","legend"),a.style("text-anchor",e.anchor),void 0!==e.class&&a.attr("class",e.class);const s=a.append("tspan");return s.attr("x",e.x+2*e.textMargin),s.text(n),a},o=(t,e,n,i)=>{const s=t.append("image");s.attr("x",e),s.attr("y",n);const r=(0,a.Jf)(i);s.attr("xlink:href",r)},c=(t,e,n,i)=>{const s=t.append("use");s.attr("x",e),s.attr("y",n);const r=(0,a.Jf)(i);s.attr("xlink:href",`#${r}`)},h=()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),d=()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0})}}]); \ No newline at end of file diff --git a/assets/js/32c9742a.2daea87e.js b/assets/js/32c9742a.2daea87e.js deleted file mode 100644 index 7f58f15a4808..000000000000 --- a/assets/js/32c9742a.2daea87e.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9682],{70612:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>m,default:()=>c,frontMatter:()=>r,metadata:()=>d,toc:()=>o});var a=t(74848),s=t(28453);const r={id:"learn-xcm-docs-fundamentals-summary",title:"Fundamentals",sidebar_label:"Summary",description:"Summary of the Chapter.",keywords:["xcm","cross-consensus messaging"],slug:"../fundamentals-summary"},m="Fundamentals",d={id:"learn/xcm/fundamentals/learn-xcm-docs-fundamentals-summary",title:"Fundamentals",description:"Summary of the Chapter.",source:"@site/../docs/learn/xcm/fundamentals/summary.md",sourceDirName:"learn/xcm/fundamentals",slug:"/learn/xcm/fundamentals-summary",permalink:"/docs/learn/xcm/fundamentals-summary",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/xcm/fundamentals/summary.md",tags:[],version:"current",lastUpdatedBy:"Radha",lastUpdatedAt:1694074887e3,frontMatter:{id:"learn-xcm-docs-fundamentals-summary",title:"Fundamentals",sidebar_label:"Summary",description:"Summary of the Chapter.",keywords:["xcm","cross-consensus messaging"],slug:"../fundamentals-summary"},sidebar:"docs",previous:{title:"Fundamentals",permalink:"/docs/learn/xcm/fundamentals"},next:{title:"MultiLocation",permalink:"/docs/learn/xcm/fundamentals/multilocation"}},l={},o=[];function u(e){const n={h1:"h1",header:"header",p:"p",...(0,s.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.header,{children:(0,a.jsx)(n.h1,{id:"fundamentals",children:"Fundamentals"})}),"\n",(0,a.jsx)(n.p,{children:"In this chapter we explore all the fundamentals that you should understand before diving deeper into\nXCM."})]})}function c(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(u,{...e})}):u(e)}},28453:(e,n,t)=>{t.d(n,{R:()=>m,x:()=>d});var a=t(96540);const s={},r=a.createContext(s);function m(e){const n=a.useContext(r);return a.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:m(e.components),a.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/32c9742a.acda3fea.js b/assets/js/32c9742a.acda3fea.js new file mode 100644 index 000000000000..92c103e51b6e --- /dev/null +++ b/assets/js/32c9742a.acda3fea.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9682],{37608:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>l,default:()=>c,frontMatter:()=>m,metadata:()=>a,toc:()=>o});const a=JSON.parse('{"id":"learn/xcm/fundamentals/learn-xcm-docs-fundamentals-summary","title":"Fundamentals","description":"Summary of the Chapter.","source":"@site/../docs/learn/xcm/fundamentals/summary.md","sourceDirName":"learn/xcm/fundamentals","slug":"/learn/xcm/fundamentals-summary","permalink":"/docs/learn/xcm/fundamentals-summary","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/xcm/fundamentals/summary.md","tags":[],"version":"current","lastUpdatedBy":"Radha","lastUpdatedAt":1694074887000,"frontMatter":{"id":"learn-xcm-docs-fundamentals-summary","title":"Fundamentals","sidebar_label":"Summary","description":"Summary of the Chapter.","keywords":["xcm","cross-consensus messaging"],"slug":"../fundamentals-summary"},"sidebar":"docs","previous":{"title":"Fundamentals","permalink":"/docs/learn/xcm/fundamentals"},"next":{"title":"MultiLocation","permalink":"/docs/learn/xcm/fundamentals/multilocation"}}');var s=t(74848),r=t(28453);const m={id:"learn-xcm-docs-fundamentals-summary",title:"Fundamentals",sidebar_label:"Summary",description:"Summary of the Chapter.",keywords:["xcm","cross-consensus messaging"],slug:"../fundamentals-summary"},l="Fundamentals",d={},o=[];function u(e){const n={h1:"h1",header:"header",p:"p",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"fundamentals",children:"Fundamentals"})}),"\n",(0,s.jsx)(n.p,{children:"In this chapter we explore all the fundamentals that you should understand before diving deeper into\nXCM."})]})}function c(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(u,{...e})}):u(e)}},28453:(e,n,t)=>{t.d(n,{R:()=>m,x:()=>l});var a=t(96540);const s={},r=a.createContext(s);function m(e){const n=a.useContext(r);return a.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:m(e.components),a.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/3364.cf4ad30f.js b/assets/js/3364.cf4ad30f.js new file mode 100644 index 000000000000..a973e5bd9d77 --- /dev/null +++ b/assets/js/3364.cf4ad30f.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3364],{73364:(t,e,i)=>{i.d(e,{diagram:()=>v});var a=i(45567),n=i(20007),s=function(){var t=(0,a.K2)((function(t,e,i,a){for(i=i||{},a=t.length;a--;i[t[a]]=e);return i}),"o"),e=[1,3],i=[1,4],n=[1,5],s=[1,6],r=[1,7],o=[1,4,5,10,12,13,14,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],l=[1,4,5,10,12,13,14,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],h=[55,56,57],c=[2,36],d=[1,37],u=[1,36],x=[1,38],g=[1,35],f=[1,43],p=[1,41],y=[1,14],T=[1,23],m=[1,18],q=[1,19],A=[1,20],_=[1,21],b=[1,22],S=[1,24],k=[1,25],F=[1,26],P=[1,27],C=[1,28],L=[1,29],v=[1,32],I=[1,33],E=[1,34],D=[1,39],z=[1,40],w=[1,42],K=[1,44],U=[1,62],N=[1,61],R=[4,5,8,10,12,13,14,18,44,47,49,55,56,57,63,64,65,66,67],B=[1,65],W=[1,66],$=[1,67],Q=[1,68],O=[1,69],X=[1,70],H=[1,71],M=[1,72],Y=[1,73],j=[1,74],G=[1,75],V=[1,76],Z=[4,5,6,7,8,9,10,11,12,13,14,15,18],J=[1,90],tt=[1,91],et=[1,92],it=[1,99],at=[1,93],nt=[1,96],st=[1,94],rt=[1,95],ot=[1,97],lt=[1,98],ht=[1,102],ct=[10,55,56,57],dt=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],ut={trace:(0,a.K2)((function(){}),"trace"),yy:{},symbols_:{error:2,idStringToken:3,ALPHA:4,NUM:5,NODE_STRING:6,DOWN:7,MINUS:8,DEFAULT:9,COMMA:10,COLON:11,AMP:12,BRKT:13,MULT:14,UNICODE_TEXT:15,styleComponent:16,UNIT:17,SPACE:18,STYLE:19,PCT:20,idString:21,style:22,stylesOpt:23,classDefStatement:24,CLASSDEF:25,start:26,eol:27,QUADRANT:28,document:29,line:30,statement:31,axisDetails:32,quadrantDetails:33,points:34,title:35,title_value:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,section:42,text:43,point_start:44,point_x:45,point_y:46,class_name:47,"X-AXIS":48,"AXIS-TEXT-DELIMITER":49,"Y-AXIS":50,QUADRANT_1:51,QUADRANT_2:52,QUADRANT_3:53,QUADRANT_4:54,NEWLINE:55,SEMI:56,EOF:57,alphaNumToken:58,textNoTagsToken:59,STR:60,MD_STR:61,alphaNum:62,PUNCTUATION:63,PLUS:64,EQUALS:65,DOT:66,UNDERSCORE:67,$accept:0,$end:1},terminals_:{2:"error",4:"ALPHA",5:"NUM",6:"NODE_STRING",7:"DOWN",8:"MINUS",9:"DEFAULT",10:"COMMA",11:"COLON",12:"AMP",13:"BRKT",14:"MULT",15:"UNICODE_TEXT",17:"UNIT",18:"SPACE",19:"STYLE",20:"PCT",25:"CLASSDEF",28:"QUADRANT",35:"title",36:"title_value",37:"acc_title",38:"acc_title_value",39:"acc_descr",40:"acc_descr_value",41:"acc_descr_multiline_value",42:"section",44:"point_start",45:"point_x",46:"point_y",47:"class_name",48:"X-AXIS",49:"AXIS-TEXT-DELIMITER",50:"Y-AXIS",51:"QUADRANT_1",52:"QUADRANT_2",53:"QUADRANT_3",54:"QUADRANT_4",55:"NEWLINE",56:"SEMI",57:"EOF",60:"STR",61:"MD_STR",63:"PUNCTUATION",64:"PLUS",65:"EQUALS",66:"DOT",67:"UNDERSCORE"},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[21,1],[21,2],[22,1],[22,2],[23,1],[23,3],[24,5],[26,2],[26,2],[26,2],[29,0],[29,2],[30,2],[31,0],[31,1],[31,2],[31,1],[31,1],[31,1],[31,2],[31,2],[31,2],[31,1],[31,1],[34,4],[34,5],[34,5],[34,6],[32,4],[32,3],[32,2],[32,4],[32,3],[32,2],[33,2],[33,2],[33,2],[33,2],[27,1],[27,1],[27,1],[43,1],[43,2],[43,1],[43,1],[62,1],[62,2],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[59,1]],performAction:(0,a.K2)((function(t,e,i,a,n,s,r){var o=s.length-1;switch(n){case 23:case 68:this.$=s[o];break;case 24:case 69:this.$=s[o-1]+""+s[o];break;case 26:this.$=s[o-1]+s[o];break;case 27:this.$=[s[o].trim()];break;case 28:s[o-2].push(s[o].trim()),this.$=s[o-2];break;case 29:this.$=s[o-4],a.addClass(s[o-2],s[o]);break;case 37:this.$=[];break;case 42:this.$=s[o].trim(),a.setDiagramTitle(this.$);break;case 43:this.$=s[o].trim(),a.setAccTitle(this.$);break;case 44:case 45:this.$=s[o].trim(),a.setAccDescription(this.$);break;case 46:a.addSection(s[o].substr(8)),this.$=s[o].substr(8);break;case 47:a.addPoint(s[o-3],"",s[o-1],s[o],[]);break;case 48:a.addPoint(s[o-4],s[o-3],s[o-1],s[o],[]);break;case 49:a.addPoint(s[o-4],"",s[o-2],s[o-1],s[o]);break;case 50:a.addPoint(s[o-5],s[o-4],s[o-2],s[o-1],s[o]);break;case 51:a.setXAxisLeftText(s[o-2]),a.setXAxisRightText(s[o]);break;case 52:s[o-1].text+=" \u27f6 ",a.setXAxisLeftText(s[o-1]);break;case 53:a.setXAxisLeftText(s[o]);break;case 54:a.setYAxisBottomText(s[o-2]),a.setYAxisTopText(s[o]);break;case 55:s[o-1].text+=" \u27f6 ",a.setYAxisBottomText(s[o-1]);break;case 56:a.setYAxisBottomText(s[o]);break;case 57:a.setQuadrant1Text(s[o]);break;case 58:a.setQuadrant2Text(s[o]);break;case 59:a.setQuadrant3Text(s[o]);break;case 60:a.setQuadrant4Text(s[o]);break;case 64:case 66:this.$={text:s[o],type:"text"};break;case 65:this.$={text:s[o-1].text+""+s[o],type:s[o-1].type};break;case 67:this.$={text:s[o],type:"markdown"}}}),"anonymous"),table:[{18:e,26:1,27:2,28:i,55:n,56:s,57:r},{1:[3]},{18:e,26:8,27:2,28:i,55:n,56:s,57:r},{18:e,26:9,27:2,28:i,55:n,56:s,57:r},t(o,[2,33],{29:10}),t(l,[2,61]),t(l,[2,62]),t(l,[2,63]),{1:[2,30]},{1:[2,31]},t(h,c,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:d,5:u,10:x,12:g,13:f,14:p,18:y,25:T,35:m,37:q,39:A,41:_,42:b,48:S,50:k,51:F,52:P,53:C,54:L,60:v,61:I,63:E,64:D,65:z,66:w,67:K}),t(o,[2,34]),{27:45,55:n,56:s,57:r},t(h,[2,37]),t(h,c,{24:13,32:15,33:16,34:17,43:30,58:31,31:46,4:d,5:u,10:x,12:g,13:f,14:p,18:y,25:T,35:m,37:q,39:A,41:_,42:b,48:S,50:k,51:F,52:P,53:C,54:L,60:v,61:I,63:E,64:D,65:z,66:w,67:K}),t(h,[2,39]),t(h,[2,40]),t(h,[2,41]),{36:[1,47]},{38:[1,48]},{40:[1,49]},t(h,[2,45]),t(h,[2,46]),{18:[1,50]},{4:d,5:u,10:x,12:g,13:f,14:p,43:51,58:31,60:v,61:I,63:E,64:D,65:z,66:w,67:K},{4:d,5:u,10:x,12:g,13:f,14:p,43:52,58:31,60:v,61:I,63:E,64:D,65:z,66:w,67:K},{4:d,5:u,10:x,12:g,13:f,14:p,43:53,58:31,60:v,61:I,63:E,64:D,65:z,66:w,67:K},{4:d,5:u,10:x,12:g,13:f,14:p,43:54,58:31,60:v,61:I,63:E,64:D,65:z,66:w,67:K},{4:d,5:u,10:x,12:g,13:f,14:p,43:55,58:31,60:v,61:I,63:E,64:D,65:z,66:w,67:K},{4:d,5:u,10:x,12:g,13:f,14:p,43:56,58:31,60:v,61:I,63:E,64:D,65:z,66:w,67:K},{4:d,5:u,8:U,10:x,12:g,13:f,14:p,18:N,44:[1,57],47:[1,58],58:60,59:59,63:E,64:D,65:z,66:w,67:K},t(R,[2,64]),t(R,[2,66]),t(R,[2,67]),t(R,[2,70]),t(R,[2,71]),t(R,[2,72]),t(R,[2,73]),t(R,[2,74]),t(R,[2,75]),t(R,[2,76]),t(R,[2,77]),t(R,[2,78]),t(R,[2,79]),t(R,[2,80]),t(o,[2,35]),t(h,[2,38]),t(h,[2,42]),t(h,[2,43]),t(h,[2,44]),{3:64,4:B,5:W,6:$,7:Q,8:O,9:X,10:H,11:M,12:Y,13:j,14:G,15:V,21:63},t(h,[2,53],{59:59,58:60,4:d,5:u,8:U,10:x,12:g,13:f,14:p,18:N,49:[1,77],63:E,64:D,65:z,66:w,67:K}),t(h,[2,56],{59:59,58:60,4:d,5:u,8:U,10:x,12:g,13:f,14:p,18:N,49:[1,78],63:E,64:D,65:z,66:w,67:K}),t(h,[2,57],{59:59,58:60,4:d,5:u,8:U,10:x,12:g,13:f,14:p,18:N,63:E,64:D,65:z,66:w,67:K}),t(h,[2,58],{59:59,58:60,4:d,5:u,8:U,10:x,12:g,13:f,14:p,18:N,63:E,64:D,65:z,66:w,67:K}),t(h,[2,59],{59:59,58:60,4:d,5:u,8:U,10:x,12:g,13:f,14:p,18:N,63:E,64:D,65:z,66:w,67:K}),t(h,[2,60],{59:59,58:60,4:d,5:u,8:U,10:x,12:g,13:f,14:p,18:N,63:E,64:D,65:z,66:w,67:K}),{45:[1,79]},{44:[1,80]},t(R,[2,65]),t(R,[2,81]),t(R,[2,82]),t(R,[2,83]),{3:82,4:B,5:W,6:$,7:Q,8:O,9:X,10:H,11:M,12:Y,13:j,14:G,15:V,18:[1,81]},t(Z,[2,23]),t(Z,[2,1]),t(Z,[2,2]),t(Z,[2,3]),t(Z,[2,4]),t(Z,[2,5]),t(Z,[2,6]),t(Z,[2,7]),t(Z,[2,8]),t(Z,[2,9]),t(Z,[2,10]),t(Z,[2,11]),t(Z,[2,12]),t(h,[2,52],{58:31,43:83,4:d,5:u,10:x,12:g,13:f,14:p,60:v,61:I,63:E,64:D,65:z,66:w,67:K}),t(h,[2,55],{58:31,43:84,4:d,5:u,10:x,12:g,13:f,14:p,60:v,61:I,63:E,64:D,65:z,66:w,67:K}),{46:[1,85]},{45:[1,86]},{4:J,5:tt,6:et,8:it,11:at,13:nt,16:89,17:st,18:rt,19:ot,20:lt,22:88,23:87},t(Z,[2,24]),t(h,[2,51],{59:59,58:60,4:d,5:u,8:U,10:x,12:g,13:f,14:p,18:N,63:E,64:D,65:z,66:w,67:K}),t(h,[2,54],{59:59,58:60,4:d,5:u,8:U,10:x,12:g,13:f,14:p,18:N,63:E,64:D,65:z,66:w,67:K}),t(h,[2,47],{22:88,16:89,23:100,4:J,5:tt,6:et,8:it,11:at,13:nt,17:st,18:rt,19:ot,20:lt}),{46:[1,101]},t(h,[2,29],{10:ht}),t(ct,[2,27],{16:103,4:J,5:tt,6:et,8:it,11:at,13:nt,17:st,18:rt,19:ot,20:lt}),t(dt,[2,25]),t(dt,[2,13]),t(dt,[2,14]),t(dt,[2,15]),t(dt,[2,16]),t(dt,[2,17]),t(dt,[2,18]),t(dt,[2,19]),t(dt,[2,20]),t(dt,[2,21]),t(dt,[2,22]),t(h,[2,49],{10:ht}),t(h,[2,48],{22:88,16:89,23:104,4:J,5:tt,6:et,8:it,11:at,13:nt,17:st,18:rt,19:ot,20:lt}),{4:J,5:tt,6:et,8:it,11:at,13:nt,16:89,17:st,18:rt,19:ot,20:lt,22:105},t(dt,[2,26]),t(h,[2,50],{10:ht}),t(ct,[2,28],{16:103,4:J,5:tt,6:et,8:it,11:at,13:nt,17:st,18:rt,19:ot,20:lt})],defaultActions:{8:[2,30],9:[2,31]},parseError:(0,a.K2)((function(t,e){if(!e.recoverable){var i=new Error(t);throw i.hash=e,i}this.trace(t)}),"parseError"),parse:(0,a.K2)((function(t){var e=this,i=[0],n=[],s=[null],r=[],o=this.table,l="",h=0,c=0,d=0,u=r.slice.call(arguments,1),x=Object.create(this.lexer),g={yy:{}};for(var f in this.yy)Object.prototype.hasOwnProperty.call(this.yy,f)&&(g.yy[f]=this.yy[f]);x.setInput(t,g.yy),g.yy.lexer=x,g.yy.parser=this,void 0===x.yylloc&&(x.yylloc={});var p=x.yylloc;r.push(p);var y=x.options&&x.options.ranges;function T(){var t;return"number"!=typeof(t=n.pop()||x.lex()||1)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,a.K2)((function(t){i.length=i.length-2*t,s.length=s.length-t,r.length=r.length-t}),"popStack"),(0,a.K2)(T,"lex");for(var m,q,A,_,b,S,k,F,P,C={};;){if(A=i[i.length-1],this.defaultActions[A]?_=this.defaultActions[A]:(null==m&&(m=T()),_=o[A]&&o[A][m]),void 0===_||!_.length||!_[0]){var L="";for(S in P=[],o[A])this.terminals_[S]&&S>2&&P.push("'"+this.terminals_[S]+"'");L=x.showPosition?"Parse error on line "+(h+1)+":\n"+x.showPosition()+"\nExpecting "+P.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(h+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(L,{text:x.match,token:this.terminals_[m]||m,line:x.yylineno,loc:p,expected:P})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+A+", token: "+m);switch(_[0]){case 1:i.push(m),s.push(x.yytext),r.push(x.yylloc),i.push(_[1]),m=null,q?(m=q,q=null):(c=x.yyleng,l=x.yytext,h=x.yylineno,p=x.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[_[1]][1],C.$=s[s.length-k],C._$={first_line:r[r.length-(k||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(k||1)].first_column,last_column:r[r.length-1].last_column},y&&(C._$.range=[r[r.length-(k||1)].range[0],r[r.length-1].range[1]]),void 0!==(b=this.performAction.apply(C,[l,c,h,g.yy,_[1],s,r].concat(u))))return b;k&&(i=i.slice(0,-1*k*2),s=s.slice(0,-1*k),r=r.slice(0,-1*k)),i.push(this.productions_[_[1]][0]),s.push(C.$),r.push(C._$),F=o[i[i.length-2]][i[i.length-1]],i.push(F);break;case 3:return!0}}return!0}),"parse")},xt=function(){return{EOF:1,parseError:(0,a.K2)((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:(0,a.K2)((function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this}),"setInput"),input:(0,a.K2)((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t}),"input"),unput:(0,a.K2)((function(t){var e=t.length,i=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var a=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),i.length-1&&(this.yylineno-=i.length-1);var n=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:i?(i.length===a.length?this.yylloc.first_column:0)+a[a.length-i.length].length-i[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"unput"),more:(0,a.K2)((function(){return this._more=!0,this}),"more"),reject:(0,a.K2)((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:(0,a.K2)((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:(0,a.K2)((function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:(0,a.K2)((function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:(0,a.K2)((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:(0,a.K2)((function(t,e){var i,a,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(n.yylloc.range=this.yylloc.range.slice(0))),(a=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=a.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:a?a[a.length-1].length-a[a.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],i=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack){for(var s in n)this[s]=n[s];return!1}return!1}),"test_match"),next:(0,a.K2)((function(){if(this.done)return this.EOF;var t,e,i,a;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),s=0;se[0].length)){if(e=i,a=s,this.options.backtrack_lexer){if(!1!==(t=this.test_match(i,n[s])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[a]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:(0,a.K2)((function(){var t=this.next();return t||this.lex()}),"lex"),begin:(0,a.K2)((function(t){this.conditionStack.push(t)}),"begin"),popState:(0,a.K2)((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:(0,a.K2)((function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules}),"_currentRules"),topState:(0,a.K2)((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:(0,a.K2)((function(t){this.begin(t)}),"pushState"),stateStackSize:(0,a.K2)((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,a.K2)((function(t,e,i,a){switch(i){case 0:case 1:case 3:break;case 2:return 55;case 4:return this.begin("title"),35;case 5:return this.popState(),"title_value";case 6:return this.begin("acc_title"),37;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),39;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:case 23:case 25:case 31:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 48;case 14:return 50;case 15:return 49;case 16:return 51;case 17:return 52;case 18:return 53;case 19:return 54;case 20:return 25;case 21:this.begin("md_string");break;case 22:return"MD_STR";case 24:this.begin("string");break;case 26:return"STR";case 27:this.begin("class_name");break;case 28:return this.popState(),47;case 29:return this.begin("point_start"),44;case 30:return this.begin("point_x"),45;case 32:this.popState(),this.begin("point_y");break;case 33:return this.popState(),46;case 34:return 28;case 35:return 4;case 36:return 11;case 37:return 64;case 38:return 10;case 39:case 40:return 65;case 41:return 14;case 42:return 13;case 43:return 67;case 44:return 66;case 45:return 12;case 46:return 8;case 47:return 5;case 48:return 18;case 49:return 56;case 50:return 63;case 51:return 57}}),"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?: *x-axis *)/i,/^(?: *y-axis *)/i,/^(?: *--+> *)/i,/^(?: *quadrant-1 *)/i,/^(?: *quadrant-2 *)/i,/^(?: *quadrant-3 *)/i,/^(?: *quadrant-4 *)/i,/^(?:classDef\b)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?::::)/i,/^(?:^\w+)/i,/^(?:\s*:\s*\[\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?:\s*\] *)/i,/^(?:\s*,\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?: *quadrantChart *)/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s)/i,/^(?:;)/i,/^(?:[!"#$%&'*+,-.`?\\_/])/i,/^(?:$)/i],conditions:{class_name:{rules:[28],inclusive:!1},point_y:{rules:[33],inclusive:!1},point_x:{rules:[32],inclusive:!1},point_start:{rules:[30,31],inclusive:!1},acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},title:{rules:[5],inclusive:!1},md_string:{rules:[22,23],inclusive:!1},string:{rules:[25,26],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,6,8,10,13,14,15,16,17,18,19,20,21,24,27,29,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],inclusive:!0}}}}();function gt(){this.yy={}}return ut.lexer=xt,(0,a.K2)(gt,"Parser"),gt.prototype=ut,ut.Parser=gt,new gt}();s.parser=s;var r=s,o=(0,a.P$)(),l=class{constructor(){this.classes=new Map,this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData()}static{(0,a.K2)(this,"QuadrantBuilder")}getDefaultData(){return{titleText:"",quadrant1Text:"",quadrant2Text:"",quadrant3Text:"",quadrant4Text:"",xAxisLeftText:"",xAxisRightText:"",yAxisBottomText:"",yAxisTopText:"",points:[]}}getDefaultConfig(){return{showXAxis:!0,showYAxis:!0,showTitle:!0,chartHeight:a.UI.quadrantChart?.chartWidth||500,chartWidth:a.UI.quadrantChart?.chartHeight||500,titlePadding:a.UI.quadrantChart?.titlePadding||10,titleFontSize:a.UI.quadrantChart?.titleFontSize||20,quadrantPadding:a.UI.quadrantChart?.quadrantPadding||5,xAxisLabelPadding:a.UI.quadrantChart?.xAxisLabelPadding||5,yAxisLabelPadding:a.UI.quadrantChart?.yAxisLabelPadding||5,xAxisLabelFontSize:a.UI.quadrantChart?.xAxisLabelFontSize||16,yAxisLabelFontSize:a.UI.quadrantChart?.yAxisLabelFontSize||16,quadrantLabelFontSize:a.UI.quadrantChart?.quadrantLabelFontSize||16,quadrantTextTopPadding:a.UI.quadrantChart?.quadrantTextTopPadding||5,pointTextPadding:a.UI.quadrantChart?.pointTextPadding||5,pointLabelFontSize:a.UI.quadrantChart?.pointLabelFontSize||12,pointRadius:a.UI.quadrantChart?.pointRadius||5,xAxisPosition:a.UI.quadrantChart?.xAxisPosition||"top",yAxisPosition:a.UI.quadrantChart?.yAxisPosition||"left",quadrantInternalBorderStrokeWidth:a.UI.quadrantChart?.quadrantInternalBorderStrokeWidth||1,quadrantExternalBorderStrokeWidth:a.UI.quadrantChart?.quadrantExternalBorderStrokeWidth||2}}getDefaultThemeConfig(){return{quadrant1Fill:o.quadrant1Fill,quadrant2Fill:o.quadrant2Fill,quadrant3Fill:o.quadrant3Fill,quadrant4Fill:o.quadrant4Fill,quadrant1TextFill:o.quadrant1TextFill,quadrant2TextFill:o.quadrant2TextFill,quadrant3TextFill:o.quadrant3TextFill,quadrant4TextFill:o.quadrant4TextFill,quadrantPointFill:o.quadrantPointFill,quadrantPointTextFill:o.quadrantPointTextFill,quadrantXAxisTextFill:o.quadrantXAxisTextFill,quadrantYAxisTextFill:o.quadrantYAxisTextFill,quadrantTitleFill:o.quadrantTitleFill,quadrantInternalBorderStrokeFill:o.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:o.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),this.classes=new Map,a.Rm.info("clear called")}setData(t){this.data={...this.data,...t}}addPoints(t){this.data.points=[...t,...this.data.points]}addClass(t,e){this.classes.set(t,e)}setConfig(t){a.Rm.trace("setConfig called with: ",t),this.config={...this.config,...t}}setThemeConfig(t){a.Rm.trace("setThemeConfig called with: ",t),this.themeConfig={...this.themeConfig,...t}}calculateSpace(t,e,i,a){const n=2*this.config.xAxisLabelPadding+this.config.xAxisLabelFontSize,s={top:"top"===t&&e?n:0,bottom:"bottom"===t&&e?n:0},r=2*this.config.yAxisLabelPadding+this.config.yAxisLabelFontSize,o={left:"left"===this.config.yAxisPosition&&i?r:0,right:"right"===this.config.yAxisPosition&&i?r:0},l=this.config.titleFontSize+2*this.config.titlePadding,h={top:a?l:0},c=this.config.quadrantPadding+o.left,d=this.config.quadrantPadding+s.top+h.top,u=this.config.chartWidth-2*this.config.quadrantPadding-o.left-o.right,x=this.config.chartHeight-2*this.config.quadrantPadding-s.top-s.bottom-h.top;return{xAxisSpace:s,yAxisSpace:o,titleSpace:h,quadrantSpace:{quadrantLeft:c,quadrantTop:d,quadrantWidth:u,quadrantHalfWidth:u/2,quadrantHeight:x,quadrantHalfHeight:x/2}}}getAxisLabels(t,e,i,a){const{quadrantSpace:n,titleSpace:s}=a,{quadrantHalfHeight:r,quadrantHeight:o,quadrantLeft:l,quadrantHalfWidth:h,quadrantTop:c,quadrantWidth:d}=n,u=Boolean(this.data.xAxisRightText),x=Boolean(this.data.yAxisTopText),g=[];return this.data.xAxisLeftText&&e&&g.push({text:this.data.xAxisLeftText,fill:this.themeConfig.quadrantXAxisTextFill,x:l+(u?h/2:0),y:"top"===t?this.config.xAxisLabelPadding+s.top:this.config.xAxisLabelPadding+c+o+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:u?"center":"left",horizontalPos:"top",rotation:0}),this.data.xAxisRightText&&e&&g.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:l+h+(u?h/2:0),y:"top"===t?this.config.xAxisLabelPadding+s.top:this.config.xAxisLabelPadding+c+o+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:u?"center":"left",horizontalPos:"top",rotation:0}),this.data.yAxisBottomText&&i&&g.push({text:this.data.yAxisBottomText,fill:this.themeConfig.quadrantYAxisTextFill,x:"left"===this.config.yAxisPosition?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+l+d+this.config.quadrantPadding,y:c+o-(x?r/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:x?"center":"left",horizontalPos:"top",rotation:-90}),this.data.yAxisTopText&&i&&g.push({text:this.data.yAxisTopText,fill:this.themeConfig.quadrantYAxisTextFill,x:"left"===this.config.yAxisPosition?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+l+d+this.config.quadrantPadding,y:c+r-(x?r/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:x?"center":"left",horizontalPos:"top",rotation:-90}),g}getQuadrants(t){const{quadrantSpace:e}=t,{quadrantHalfHeight:i,quadrantLeft:a,quadrantHalfWidth:n,quadrantTop:s}=e,r=[{text:{text:this.data.quadrant1Text,fill:this.themeConfig.quadrant1TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:a+n,y:s,width:n,height:i,fill:this.themeConfig.quadrant1Fill},{text:{text:this.data.quadrant2Text,fill:this.themeConfig.quadrant2TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:a,y:s,width:n,height:i,fill:this.themeConfig.quadrant2Fill},{text:{text:this.data.quadrant3Text,fill:this.themeConfig.quadrant3TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:a,y:s+i,width:n,height:i,fill:this.themeConfig.quadrant3Fill},{text:{text:this.data.quadrant4Text,fill:this.themeConfig.quadrant4TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:a+n,y:s+i,width:n,height:i,fill:this.themeConfig.quadrant4Fill}];for(const o of r)o.text.x=o.x+o.width/2,0===this.data.points.length?(o.text.y=o.y+o.height/2,o.text.horizontalPos="middle"):(o.text.y=o.y+this.config.quadrantTextTopPadding,o.text.horizontalPos="top");return r}getQuadrantPoints(t){const{quadrantSpace:e}=t,{quadrantHeight:i,quadrantLeft:a,quadrantTop:s,quadrantWidth:r}=e,o=(0,n.m4Y)().domain([0,1]).range([a,r+a]),l=(0,n.m4Y)().domain([0,1]).range([i+s,s]);return this.data.points.map((t=>{const e=this.classes.get(t.className);e&&(t={...e,...t});return{x:o(t.x),y:l(t.y),fill:t.color??this.themeConfig.quadrantPointFill,radius:t.radius??this.config.pointRadius,text:{text:t.text,fill:this.themeConfig.quadrantPointTextFill,x:o(t.x),y:l(t.y)+this.config.pointTextPadding,verticalPos:"center",horizontalPos:"top",fontSize:this.config.pointLabelFontSize,rotation:0},strokeColor:t.strokeColor??this.themeConfig.quadrantPointFill,strokeWidth:t.strokeWidth??"0px"}}))}getBorders(t){const e=this.config.quadrantExternalBorderStrokeWidth/2,{quadrantSpace:i}=t,{quadrantHalfHeight:a,quadrantHeight:n,quadrantLeft:s,quadrantHalfWidth:r,quadrantTop:o,quadrantWidth:l}=i;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:s-e,y1:o,x2:s+l+e,y2:o},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:s+l,y1:o+e,x2:s+l,y2:o+n-e},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:s-e,y1:o+n,x2:s+l+e,y2:o+n},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:s,y1:o+e,x2:s,y2:o+n-e},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:s+r,y1:o+e,x2:s+r,y2:o+n-e},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:s+e,y1:o+a,x2:s+l-e,y2:o+a}]}getTitle(t){if(t)return{text:this.data.titleText,fill:this.themeConfig.quadrantTitleFill,fontSize:this.config.titleFontSize,horizontalPos:"top",verticalPos:"center",rotation:0,y:this.config.titlePadding,x:this.config.chartWidth/2}}build(){const t=this.config.showXAxis&&!(!this.data.xAxisLeftText&&!this.data.xAxisRightText),e=this.config.showYAxis&&!(!this.data.yAxisTopText&&!this.data.yAxisBottomText),i=this.config.showTitle&&!!this.data.titleText,a=this.data.points.length>0?"bottom":this.config.xAxisPosition,n=this.calculateSpace(a,t,e,i);return{points:this.getQuadrantPoints(n),quadrants:this.getQuadrants(n),axisLabels:this.getAxisLabels(a,t,e,n),borderLines:this.getBorders(n),title:this.getTitle(i)}}},h=class extends Error{static{(0,a.K2)(this,"InvalidStyleError")}constructor(t,e,i){super(`value for ${t} ${e} is invalid, please use a valid ${i}`),this.name="InvalidStyleError"}};function c(t){return!/^#?([\dA-Fa-f]{6}|[\dA-Fa-f]{3})$/.test(t)}function d(t){return!/^\d+$/.test(t)}function u(t){return!/^\d+px$/.test(t)}(0,a.K2)(c,"validateHexCode"),(0,a.K2)(d,"validateNumber"),(0,a.K2)(u,"validateSizeInPixels");var x=(0,a.D7)();function g(t){return(0,a.jZ)(t.trim(),x)}(0,a.K2)(g,"textSanitizer");var f=new l;function p(t){f.setData({quadrant1Text:g(t.text)})}function y(t){f.setData({quadrant2Text:g(t.text)})}function T(t){f.setData({quadrant3Text:g(t.text)})}function m(t){f.setData({quadrant4Text:g(t.text)})}function q(t){f.setData({xAxisLeftText:g(t.text)})}function A(t){f.setData({xAxisRightText:g(t.text)})}function _(t){f.setData({yAxisTopText:g(t.text)})}function b(t){f.setData({yAxisBottomText:g(t.text)})}function S(t){const e={};for(const i of t){const[t,a]=i.trim().split(/\s*:\s*/);if("radius"===t){if(d(a))throw new h(t,a,"number");e.radius=parseInt(a)}else if("color"===t){if(c(a))throw new h(t,a,"hex code");e.color=a}else if("stroke-color"===t){if(c(a))throw new h(t,a,"hex code");e.strokeColor=a}else{if("stroke-width"!==t)throw new Error(`style named ${t} is not supported.`);if(u(a))throw new h(t,a,"number of pixels (eg. 10px)");e.strokeWidth=a}}return e}function k(t,e,i,a,n){const s=S(n);f.addPoints([{x:i,y:a,text:g(t.text),className:e,...s}])}function F(t,e){f.addClass(t,S(e))}function P(t){f.setConfig({chartWidth:t})}function C(t){f.setConfig({chartHeight:t})}function L(){const t=(0,a.D7)(),{themeVariables:e,quadrantChart:i}=t;return i&&f.setConfig(i),f.setThemeConfig({quadrant1Fill:e.quadrant1Fill,quadrant2Fill:e.quadrant2Fill,quadrant3Fill:e.quadrant3Fill,quadrant4Fill:e.quadrant4Fill,quadrant1TextFill:e.quadrant1TextFill,quadrant2TextFill:e.quadrant2TextFill,quadrant3TextFill:e.quadrant3TextFill,quadrant4TextFill:e.quadrant4TextFill,quadrantPointFill:e.quadrantPointFill,quadrantPointTextFill:e.quadrantPointTextFill,quadrantXAxisTextFill:e.quadrantXAxisTextFill,quadrantYAxisTextFill:e.quadrantYAxisTextFill,quadrantExternalBorderStrokeFill:e.quadrantExternalBorderStrokeFill,quadrantInternalBorderStrokeFill:e.quadrantInternalBorderStrokeFill,quadrantTitleFill:e.quadrantTitleFill}),f.setData({titleText:(0,a.ab)()}),f.build()}(0,a.K2)(p,"setQuadrant1Text"),(0,a.K2)(y,"setQuadrant2Text"),(0,a.K2)(T,"setQuadrant3Text"),(0,a.K2)(m,"setQuadrant4Text"),(0,a.K2)(q,"setXAxisLeftText"),(0,a.K2)(A,"setXAxisRightText"),(0,a.K2)(_,"setYAxisTopText"),(0,a.K2)(b,"setYAxisBottomText"),(0,a.K2)(S,"parseStyles"),(0,a.K2)(k,"addPoint"),(0,a.K2)(F,"addClass"),(0,a.K2)(P,"setWidth"),(0,a.K2)(C,"setHeight"),(0,a.K2)(L,"getQuadrantData");var v={parser:r,db:{setWidth:P,setHeight:C,setQuadrant1Text:p,setQuadrant2Text:y,setQuadrant3Text:T,setQuadrant4Text:m,setXAxisLeftText:q,setXAxisRightText:A,setYAxisTopText:_,setYAxisBottomText:b,parseStyles:S,addPoint:k,addClass:F,getQuadrantData:L,clear:(0,a.K2)((function(){f.clear(),(0,a.IU)()}),"clear"),setAccTitle:a.SV,getAccTitle:a.iN,setDiagramTitle:a.ke,getDiagramTitle:a.ab,getAccDescription:a.m7,setAccDescription:a.EI},renderer:{draw:(0,a.K2)(((t,e,i,s)=>{function r(t){return"top"===t?"hanging":"middle"}function o(t){return"left"===t?"start":"middle"}function l(t){return`translate(${t.x}, ${t.y}) rotate(${t.rotation||0})`}(0,a.K2)(r,"getDominantBaseLine"),(0,a.K2)(o,"getTextAnchor"),(0,a.K2)(l,"getTransformation");const h=(0,a.D7)();a.Rm.debug("Rendering quadrant chart\n"+t);const c=h.securityLevel;let d;"sandbox"===c&&(d=(0,n.Ltv)("#i"+e));const u=("sandbox"===c?(0,n.Ltv)(d.nodes()[0].contentDocument.body):(0,n.Ltv)("body")).select(`[id="${e}"]`),x=u.append("g").attr("class","main"),g=h.quadrantChart?.chartWidth??500,f=h.quadrantChart?.chartHeight??500;(0,a.a$)(u,f,g,h.quadrantChart?.useMaxWidth??!0),u.attr("viewBox","0 0 "+g+" "+f),s.db.setHeight(f),s.db.setWidth(g);const p=s.db.getQuadrantData(),y=x.append("g").attr("class","quadrants"),T=x.append("g").attr("class","border"),m=x.append("g").attr("class","data-points"),q=x.append("g").attr("class","labels"),A=x.append("g").attr("class","title");p.title&&A.append("text").attr("x",0).attr("y",0).attr("fill",p.title.fill).attr("font-size",p.title.fontSize).attr("dominant-baseline",r(p.title.horizontalPos)).attr("text-anchor",o(p.title.verticalPos)).attr("transform",l(p.title)).text(p.title.text),p.borderLines&&T.selectAll("line").data(p.borderLines).enter().append("line").attr("x1",(t=>t.x1)).attr("y1",(t=>t.y1)).attr("x2",(t=>t.x2)).attr("y2",(t=>t.y2)).style("stroke",(t=>t.strokeFill)).style("stroke-width",(t=>t.strokeWidth));const _=y.selectAll("g.quadrant").data(p.quadrants).enter().append("g").attr("class","quadrant");_.append("rect").attr("x",(t=>t.x)).attr("y",(t=>t.y)).attr("width",(t=>t.width)).attr("height",(t=>t.height)).attr("fill",(t=>t.fill)),_.append("text").attr("x",0).attr("y",0).attr("fill",(t=>t.text.fill)).attr("font-size",(t=>t.text.fontSize)).attr("dominant-baseline",(t=>r(t.text.horizontalPos))).attr("text-anchor",(t=>o(t.text.verticalPos))).attr("transform",(t=>l(t.text))).text((t=>t.text.text));q.selectAll("g.label").data(p.axisLabels).enter().append("g").attr("class","label").append("text").attr("x",0).attr("y",0).text((t=>t.text)).attr("fill",(t=>t.fill)).attr("font-size",(t=>t.fontSize)).attr("dominant-baseline",(t=>r(t.horizontalPos))).attr("text-anchor",(t=>o(t.verticalPos))).attr("transform",(t=>l(t)));const b=m.selectAll("g.data-point").data(p.points).enter().append("g").attr("class","data-point");b.append("circle").attr("cx",(t=>t.x)).attr("cy",(t=>t.y)).attr("r",(t=>t.radius)).attr("fill",(t=>t.fill)).attr("stroke",(t=>t.strokeColor)).attr("stroke-width",(t=>t.strokeWidth)),b.append("text").attr("x",0).attr("y",0).text((t=>t.text.text)).attr("fill",(t=>t.text.fill)).attr("font-size",(t=>t.text.fontSize)).attr("dominant-baseline",(t=>r(t.text.horizontalPos))).attr("text-anchor",(t=>o(t.text.verticalPos))).attr("transform",(t=>l(t.text)))}),"draw")},styles:(0,a.K2)((()=>""),"styles")}}}]); \ No newline at end of file diff --git a/assets/js/33b0bcab.063b5334.js b/assets/js/33b0bcab.063b5334.js deleted file mode 100644 index d3c9af9b92f1..000000000000 --- a/assets/js/33b0bcab.063b5334.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1519],{9382:(e,r,t)=>{t.r(r),t.d(r,{assets:()=>l,contentTitle:()=>i,default:()=>m,frontMatter:()=>c,metadata:()=>a,toc:()=>o});var s=t(74848),n=t(28453);const c={id:"learn-xcm-docs-reference-xcvm-registers",title:"All XCVM Registers",sidebar_label:"All XCVM Registers",description:"All XCVM Registers.",keywords:["xcm","cross-consensus messaging","xcvm","registers","reference"],slug:"../reference-xcvm-registers"},i="XCVM Registers",a={id:"learn/xcm/reference/learn-xcm-docs-reference-xcvm-registers",title:"All XCVM Registers",description:"All XCVM Registers.",source:"@site/../docs/learn/xcm/reference/xcvm-registers.md",sourceDirName:"learn/xcm/reference",slug:"/learn/xcm/reference-xcvm-registers",permalink:"/docs/learn/xcm/reference-xcvm-registers",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/xcm/reference/xcvm-registers.md",tags:[],version:"current",lastUpdatedBy:"Radha",lastUpdatedAt:1694074887e3,frontMatter:{id:"learn-xcm-docs-reference-xcvm-registers",title:"All XCVM Registers",sidebar_label:"All XCVM Registers",description:"All XCVM Registers.",keywords:["xcm","cross-consensus messaging","xcvm","registers","reference"],slug:"../reference-xcvm-registers"},sidebar:"docs",previous:{title:"References",permalink:"/docs/learn/xcm/references"},next:{title:"XCM Glossary",permalink:"/docs/learn/xcm/reference-glossary"}},l={},o=[];function h(e){const r={a:"a",h1:"h1",header:"header",li:"li",p:"p",ul:"ul",...(0,n.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r.header,{children:(0,s.jsx)(r.h1,{id:"xcvm-registers",children:"XCVM Registers"})}),"\n",(0,s.jsx)(r.p,{children:"Each implementation of an XCVM contains several registers which cannot generally be set at will, but\nrather begin with specific values and may only be mutated under certain circumstances and/or obeying\ncertain rules. An XCVM has the following registers:"}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://github.com/paritytech/xcm-format#31-programme",children:"Programme"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://github.com/paritytech/xcm-format#32-programme-counter",children:"Programme Counter"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://github.com/paritytech/xcm-format#33-error",children:"Error"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://github.com/paritytech/xcm-format#34-error-handler",children:"Error Handler"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://github.com/paritytech/xcm-format#35-appendix",children:"Appendix"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://github.com/paritytech/xcm-format#36-origin",children:"Origin"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://github.com/paritytech/xcm-format#37-holding-register",children:"Holding"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://github.com/paritytech/xcm-format#38-surplus-weight",children:"Surplus Weight"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://github.com/paritytech/xcm-format#39-refunded-weight",children:"Refunded Weight"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://github.com/paritytech/xcm-format#310-transact-status",children:"Transact Status"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://github.com/paritytech/xcm-format#311-topic",children:"Topic"})}),"\n"]})]})}function m(e={}){const{wrapper:r}={...(0,n.R)(),...e.components};return r?(0,s.jsx)(r,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}},28453:(e,r,t)=>{t.d(r,{R:()=>i,x:()=>a});var s=t(96540);const n={},c=s.createContext(n);function i(e){const r=s.useContext(c);return s.useMemo((function(){return"function"==typeof e?e(r):{...r,...e}}),[r,e])}function a(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:i(e.components),s.createElement(c.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/33b0bcab.8c99289e.js b/assets/js/33b0bcab.8c99289e.js new file mode 100644 index 000000000000..7dc485ee1c52 --- /dev/null +++ b/assets/js/33b0bcab.8c99289e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1519],{15958:(e,r,t)=>{t.r(r),t.d(r,{assets:()=>l,contentTitle:()=>a,default:()=>m,frontMatter:()=>i,metadata:()=>s,toc:()=>o});const s=JSON.parse('{"id":"learn/xcm/reference/learn-xcm-docs-reference-xcvm-registers","title":"All XCVM Registers","description":"All XCVM Registers.","source":"@site/../docs/learn/xcm/reference/xcvm-registers.md","sourceDirName":"learn/xcm/reference","slug":"/learn/xcm/reference-xcvm-registers","permalink":"/docs/learn/xcm/reference-xcvm-registers","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/xcm/reference/xcvm-registers.md","tags":[],"version":"current","lastUpdatedBy":"Radha","lastUpdatedAt":1694074887000,"frontMatter":{"id":"learn-xcm-docs-reference-xcvm-registers","title":"All XCVM Registers","sidebar_label":"All XCVM Registers","description":"All XCVM Registers.","keywords":["xcm","cross-consensus messaging","xcvm","registers","reference"],"slug":"../reference-xcvm-registers"},"sidebar":"docs","previous":{"title":"References","permalink":"/docs/learn/xcm/references"},"next":{"title":"XCM Glossary","permalink":"/docs/learn/xcm/reference-glossary"}}');var n=t(74848),c=t(28453);const i={id:"learn-xcm-docs-reference-xcvm-registers",title:"All XCVM Registers",sidebar_label:"All XCVM Registers",description:"All XCVM Registers.",keywords:["xcm","cross-consensus messaging","xcvm","registers","reference"],slug:"../reference-xcvm-registers"},a="XCVM Registers",l={},o=[];function h(e){const r={a:"a",h1:"h1",header:"header",li:"li",p:"p",ul:"ul",...(0,c.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.header,{children:(0,n.jsx)(r.h1,{id:"xcvm-registers",children:"XCVM Registers"})}),"\n",(0,n.jsx)(r.p,{children:"Each implementation of an XCVM contains several registers which cannot generally be set at will, but\nrather begin with specific values and may only be mutated under certain circumstances and/or obeying\ncertain rules. An XCVM has the following registers:"}),"\n",(0,n.jsxs)(r.ul,{children:["\n",(0,n.jsx)(r.li,{children:(0,n.jsx)(r.a,{href:"https://github.com/paritytech/xcm-format#31-programme",children:"Programme"})}),"\n",(0,n.jsx)(r.li,{children:(0,n.jsx)(r.a,{href:"https://github.com/paritytech/xcm-format#32-programme-counter",children:"Programme Counter"})}),"\n",(0,n.jsx)(r.li,{children:(0,n.jsx)(r.a,{href:"https://github.com/paritytech/xcm-format#33-error",children:"Error"})}),"\n",(0,n.jsx)(r.li,{children:(0,n.jsx)(r.a,{href:"https://github.com/paritytech/xcm-format#34-error-handler",children:"Error Handler"})}),"\n",(0,n.jsx)(r.li,{children:(0,n.jsx)(r.a,{href:"https://github.com/paritytech/xcm-format#35-appendix",children:"Appendix"})}),"\n",(0,n.jsx)(r.li,{children:(0,n.jsx)(r.a,{href:"https://github.com/paritytech/xcm-format#36-origin",children:"Origin"})}),"\n",(0,n.jsx)(r.li,{children:(0,n.jsx)(r.a,{href:"https://github.com/paritytech/xcm-format#37-holding-register",children:"Holding"})}),"\n",(0,n.jsx)(r.li,{children:(0,n.jsx)(r.a,{href:"https://github.com/paritytech/xcm-format#38-surplus-weight",children:"Surplus Weight"})}),"\n",(0,n.jsx)(r.li,{children:(0,n.jsx)(r.a,{href:"https://github.com/paritytech/xcm-format#39-refunded-weight",children:"Refunded Weight"})}),"\n",(0,n.jsx)(r.li,{children:(0,n.jsx)(r.a,{href:"https://github.com/paritytech/xcm-format#310-transact-status",children:"Transact Status"})}),"\n",(0,n.jsx)(r.li,{children:(0,n.jsx)(r.a,{href:"https://github.com/paritytech/xcm-format#311-topic",children:"Topic"})}),"\n"]})]})}function m(e={}){const{wrapper:r}={...(0,c.R)(),...e.components};return r?(0,n.jsx)(r,{...e,children:(0,n.jsx)(h,{...e})}):h(e)}},28453:(e,r,t)=>{t.d(r,{R:()=>i,x:()=>a});var s=t(96540);const n={},c=s.createContext(n);function i(e){const r=s.useContext(c);return s.useMemo((function(){return"function"==typeof e?e(r):{...r,...e}}),[r,e])}function a(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:i(e.components),s.createElement(c.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/33bbe353.f8d01eaa.js b/assets/js/33bbe353.f8d01eaa.js deleted file mode 100644 index 89b3729382e4..000000000000 --- a/assets/js/33bbe353.f8d01eaa.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5033],{72083:(e,t,i)=>{i.r(t),i.d(t,{assets:()=>d,contentTitle:()=>o,default:()=>l,frontMatter:()=>a,metadata:()=>r,toc:()=>h});var s=i(74848),n=i(28453);const a={id:"maintain-guides-society-kusama",title:"Kappa Sigma Mu",sidebar_label:"Kappa Sigma Mu",description:"Learn about the Kappa Sigma Mu society and join as a member.",keywords:["kappa sigma mu","society","kusama","member"],slug:"../../maintain-guides-society-kusama"},o=void 0,r={id:"maintain/kusama/maintain-guides-society-kusama",title:"Kappa Sigma Mu",description:"Learn about the Kappa Sigma Mu society and join as a member.",source:"@site/../docs/maintain/kusama/maintain-guides-society-kusama.md",sourceDirName:"maintain/kusama",slug:"/maintain-guides-society-kusama",permalink:"/docs/maintain-guides-society-kusama",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/maintain/kusama/maintain-guides-society-kusama.md",tags:[],version:"current",lastUpdatedBy:"github-actions[bot]",lastUpdatedAt:1711359007e3,frontMatter:{id:"maintain-guides-society-kusama",title:"Kappa Sigma Mu",sidebar_label:"Kappa Sigma Mu",description:"Learn about the Kappa Sigma Mu society and join as a member.",keywords:["kappa sigma mu","society","kusama","member"],slug:"../../maintain-guides-society-kusama"},sidebar:"docs",previous:{title:"Adversarial Cheatsheet",permalink:"/docs/kusama-adversarial-cheatsheet"},next:{title:"How to run a Validator on Kusama",permalink:"/docs/maintain-guides-how-to-validate-kusama"}},d={},h=[{value:"UI Overview",id:"ui-overview",level:2},{value:"User Types",id:"user-types",level:2},{value:"Procedure",id:"procedure",level:2},{value:"1. Bid Phase",id:"1-bid-phase",level:3},{value:"2. Candidate Phase",id:"2-candidate-phase",level:3},{value:"Lock-up Time",id:"lock-up-time",level:4},{value:"3. Member Phase",id:"3-member-phase",level:3},{value:"Useful links",id:"useful-links",level:2}];function c(e){const t={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",h4:"h4",img:"img",li:"li",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,n.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(t.p,{children:["Kappa Sigma Mu is a membership club using the Substrate\n",(0,s.jsx)(t.a,{href:"https://paritytech.github.io/substrate/master/pallet_society/index.html",children:"Society pallet"}),". It is an\neconomic game to incentivize users to join a society that coordinates around whatever the rules are\ndecided to be. The members of the society are incentivized to participate in the society via the\nrewards paid by the treasury. Currently, there is only one society on Kusama but it is possible to\nhave multiple societies in the future through a runtime upgrade."]}),"\n",(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.img,{alt:"kusama_society_page",src:i(82214).A+"",width:"2880",height:"1650"}),"\n",(0,s.jsx)(t.img,{alt:"kusama_society_page2",src:i(72198).A+"",width:"2874",height:"716"})]}),"\n",(0,s.jsxs)(t.p,{children:["Before joining the society, let's take a brief look at the\n",(0,s.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/society",children:"Society UI"})," on Polkadot-JS apps and read through all the\n",(0,s.jsx)(t.a,{href:"https://kusama.subscan.io/extrinsic/0x948d3a4378914341dc7af9220a4c73acb2b3f72a70f14ee8089799da16d94c17",children:"rules"}),"\nto become a member."]}),"\n",(0,s.jsx)(t.h2,{id:"ui-overview",children:"UI Overview"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"Members"}),": The number of members in the society. Currently, the maximum number of members is set\nto ",(0,s.jsx)(t.code,{children:"150"}),". It can be changed by using governance to increase the number."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"Rotation"}),": The time period for membership rotations."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"Challenge"}),": The time period to randomly select one of the members to defend his membership in the\nsociety."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"Pot"}),": Resource balance that is used to support members of the society."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"Bids"}),": A list of users who submitted a bid to join the society."]}),"\n"]}),"\n",(0,s.jsx)(t.h2,{id:"user-types",children:"User Types"}),"\n",(0,s.jsx)(t.p,{children:"Below are the various types of users at different stages."}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"Bidder"})," - A token holder who intends to join the society by placing a bid."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"Candidate"})," - The selected bidders that will be voted on by members of the society."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"Suspended Candidate"})," - The candidates that failed to join the society."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"Member"})," - Member of the society."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"Suspender Member"})," - A member of the society who has accumulated too many strikes or failed their\nmembership challenge."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"Head"})," - One winning candidate will be randomly chosen as head of the members, weighted by the\nnumber of approvals the winning candidates accumulated."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"Defender"})," - In every challenge period, one of the members will be randomly selected to defend\ntheir membership in the society. The rules for defending the membership are documented\n",(0,s.jsx)(t.a,{href:"https://kusama.subscan.io/extrinsic/0x948d3a4378914341dc7af9220a4c73acb2b3f72a70f14ee8089799da16d94c17",children:"in the rules"}),"."]}),"\n"]}),"\n",(0,s.jsx)(t.h2,{id:"procedure",children:"Procedure"}),"\n",(0,s.jsxs)(t.p,{children:["Remember to take a look at the\n",(0,s.jsx)(t.a,{href:"https://kusama.subscan.io/extrinsic/0x948d3a4378914341dc7af9220a4c73acb2b3f72a70f14ee8089799da16d94c17",children:"rules"}),"\nfirst. And since those rules are not enforced entirely on-chain, it is recommended to join the\n",(0,s.jsx)(t.a,{href:"https://app.element.io/#/room/!BUmiAAnAYSRGarqwOt:matrix.parity.io",children:"Kappa Sigma Mu Lounge"})," to ask\nany questions if anything is unclear."]}),"\n",(0,s.jsx)(t.h3,{id:"1-bid-phase",children:"1. Bid Phase"}),"\n",(0,s.jsxs)(t.p,{children:["To submit a bid, click the Submit Bid button on the\n",(0,s.jsx)(t.a,{href:"https://cloudflare-ipfs.com/ipns/kusama.dotapps.io/#/society",children:"Society page"}),"."]}),"\n",(0,s.jsx)(t.p,{children:"Anyone can submit a bid to join the society by reserving a deposit or finding an existing member to\ncreate a bid on their behalf by vouching for them. At every rotation period, as many bids as the\nsociety pot can support will be selected. The selected bids will be moved to the candidate phase,\nwhereas bids that were not selected will stay in the bidder pool until they are selected or a user\nchooses to unbid."}),"\n",(0,s.jsx)(t.p,{children:"Anyone who wants to join the society is required to deposit 1.6 KSM for reserve on Kusama and\ndeclare the bid amount (1 KSM in this case) that they will receive for joining the society."}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{alt:"test_bid",src:i(79289).A+"",width:"2490",height:"498"})}),"\n",(0,s.jsxs)(t.p,{children:["Once you have submitted the transaction, your bid will be shown on the\n",(0,s.jsx)(t.a,{href:"https://cloudflare-ipfs.com/ipns/kusama.dotapps.io/#/society",children:"Society page"})," under the bids section.\nYou can cancel the bidding if you changed your mind about joining the society by calling ",(0,s.jsx)(t.code,{children:"unbid"})," on\nthe same page."]}),"\n",(0,s.jsxs)(t.p,{children:["You can find an existing member to place a bid on your behalf if you do not have KSM and you are\nwilling to give them a tip. An existing member can submit a ",(0,s.jsx)(t.code,{children:"vouch"})," transaction through the\nExtrinsics page."]}),"\n",(0,s.jsxs)(t.admonition,{title:"vouch(who,value,tip)",type:"info",children:[(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:"who: The user you are vouching for"}),"\n",(0,s.jsx)(t.li,{children:"value: The value that the user would like to get when joining the society"}),"\n",(0,s.jsx)(t.li,{children:"tip: Fees you get"}),"\n"]}),(0,s.jsx)(t.p,{children:"The final value that the candidate will get = (value - tip)"})]}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{alt:"vouch",src:i(98710).A+"",width:"1210",height:"461"})}),"\n",(0,s.jsx)(t.h3,{id:"2-candidate-phase",children:"2. Candidate Phase"}),"\n",(0,s.jsx)(t.p,{children:"Bids selected in this phase will be voted on by the existing members to decide whether or not you\nwill be approved to join the society. Members will vote for all the candidates and the final outcome\nwill be randomly selected by one of the votes. Let's take a look the example shown below:"}),"\n",(0,s.jsx)(t.admonition,{type:"note",children:(0,s.jsx)(t.p,{children:"If the randomly selected member does not vote, it will be treated as a rejection. For each rotation\nperiod, the maximum number of members that can be accepted is set as 10."})}),"\n",(0,s.jsx)(t.p,{children:"A - Accept, R - Reject, S - Skeptic"}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Member"}),(0,s.jsx)(t.th,{children:"1"}),(0,s.jsx)(t.th,{children:"2"}),(0,s.jsx)(t.th,{children:"3"}),(0,s.jsx)(t.th,{children:"4"}),(0,s.jsx)(t.th,{children:"5"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Vote"}),(0,s.jsx)(t.td,{children:"A"}),(0,s.jsx)(t.td,{children:"A"}),(0,s.jsx)(t.td,{children:"A"}),(0,s.jsx)(t.td,{children:"R"}),(0,s.jsx)(t.td,{children:"S"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Selected"}),(0,s.jsx)(t.td,{}),(0,s.jsx)(t.td,{}),(0,s.jsx)(t.td,{children:"X"}),(0,s.jsx)(t.td,{}),(0,s.jsx)(t.td,{})]})]})]}),"\n",(0,s.jsx)(t.p,{children:'In this example, a candidate will be approved to join the society since member 3 was selected as a\nfinal voting outcome. A number of members will also be randomly chosen as "skeptics" to vote for the\ncandidates during the rotation period.'}),"\n",(0,s.jsx)(t.p,{children:"Since member 5 was chosen as a skeptic, they are required to participate in the voting process. If\nthey do not participate in voting, they will be punished with one strike per missing vote. If one\naccumulates too many strikes, one's membership is suspended which means they may need to re-apply\nand their unclaimed payouts will be slashed. Moreover, each member who voted opposite to the\nrandomly selected vote will have their unclaimed payouts slashed and strikes increased. In this\ncase, member 4 will be punished."}),"\n",(0,s.jsx)(t.admonition,{title:"The maximum number of strikes you can have is on Kusama is 10",type:"info"}),"\n",(0,s.jsx)(t.p,{children:"The slashed funds (2 KSM currently) will be given to a random member who voted the same as the\nselected vote as a reward for participating in the vote. The reward is escrowed for some period of\ntime - see below."}),"\n",(0,s.jsx)(t.h4,{id:"lock-up-time",children:"Lock-up Time"}),"\n",(0,s.jsxs)(t.p,{children:["It would take the number of members of the society as the variable to determine how many blocks you\nhave to wait in order to get the payout. The longest lockup time is close to 3 years. The formula is\ndefined\n",(0,s.jsx)(t.a,{href:"https://paritytech.github.io/substrate/master/pallet_society/index.html",children:"in the society pallet"})," if\nyou would like to have a look."]}),"\n",(0,s.jsx)(t.p,{children:"Example:"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{children:"Let's assume we have 5 members in the society\n\nlock_duration = 100 - 50_000 / (5 + 500)\nlock_duration * MAX_LOCK_DURATION_IN_BLOCKS\n\nResult = 1% * 15_552_000 ~ 11 days\n"})}),"\n",(0,s.jsx)(t.p,{children:"Based on the above calculation, it is required to wait close to 11 days to get the slashed funds."}),"\n",(0,s.jsx)(t.p,{children:"If the candidate wins the vote, they receive their bid reward as a future payout. If the bid was\nplaced by a voucher, they will get back the reward that was set during vouching with the remainder\ngiven to the candidate - both escrowed for some time."}),"\n",(0,s.jsxs)(t.p,{children:["If the candidate loses the vote, they are suspended and it is up to the founder of the society (the\n",(0,s.jsx)(t.code,{children:"Suspension Judgement Origin"}),") to determine if the candidate should go through the bidding process\nagain, should be accepted into the membership society, or rejected and their deposit slashed."]}),"\n",(0,s.jsx)(t.h3,{id:"3-member-phase",children:"3. Member Phase"}),"\n",(0,s.jsx)(t.p,{children:"Once you become a member of the society, you will get back the deposit that you have reserved during\nthe bidding. A few things you need to be aware of. First, you should vote on candidates who applied\nfor the membership in every rotation period."}),"\n",(0,s.jsxs)(t.p,{children:["Second, you will need to claim your payout manually by calling ",(0,s.jsx)(t.code,{children:"payout"})," after the lockup time. It is\nthe same as the above mentioned lockup formula."]}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{alt:"Society Payout",src:i(99935).A+"",width:"2580",height:"572"})}),"\n",(0,s.jsxs)(t.p,{children:["Third, there will be a membership challenge every seven days on Kusama. So one of the members will\nbe randomly selected as a defender. Then, other members can vote whether this defender should stay\nin the society or not. A simple majority wins the vote. You can take a look\n",(0,s.jsx)(t.a,{href:"https://kusama.subscan.io/extrinsic/0x948d3a4378914341dc7af9220a4c73acb2b3f72a70f14ee8089799da16d94c17",children:"here"}),'\nand search for "Existing Members (Challenges)". Besides that, you can earn extra KSM by helping a\nuser apply for the membership and requesting a tip. This is useful when a user does not have enough\nbalance to reserve a deposit. The tip will be given when a user successfully joins the society.']}),"\n",(0,s.jsx)(t.admonition,{type:"info",children:(0,s.jsx)(t.p,{children:"Each member can only vouch for one user at a time. A member is not required to reserve the deposit\nwhen vouching for a user."})}),"\n",(0,s.jsx)(t.p,{children:"If a member accumulates too many strikes or fails their membership challenge, they will become\nsuspended. While a member is suspended, they are unable to claim matured payouts. It is up to the\nsuspension judgment origin to determine if the member should re-enter society or be removed from\nsociety with all their future payouts slashed."}),"\n",(0,s.jsx)(t.h2,{id:"useful-links",children:"Useful links"}),"\n",(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.a,{href:"https://kusama.subscan.io/extrinsic/0x948d3a4378914341dc7af9220a4c73acb2b3f72a70f14ee8089799da16d94c17",children:"Convention of Approval of Membership"})," -\nRules about joining the Kusama society"]}),"\n",(0,s.jsx)(t.p,{children:'The rules are encoded on-chain in UTF-8 format. This is displayed in most block explorers as a\nhexadecimal string. In order to see the rules in human-readable format, you can convert it. In the\nextrinsic\'s parameters go to Element 1 ("proposal") -> "value" -> "params" -> Element 2 ("rules")\nand copy the value corresponding to the key "value". You can use a hex-to-UTF8 converter to then\ndisplay the text. Note that the text is formatted with Markdown.'})]})}function l(e={}){const{wrapper:t}={...(0,n.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(c,{...e})}):c(e)}},82214:(e,t,i)=>{i.d(t,{A:()=>s});const s=i.p+"assets/images/kusama_society_page-e9e3297982c38b1f88e7b7a123c83b0c.png"},72198:(e,t,i)=>{i.d(t,{A:()=>s});const s=i.p+"assets/images/kusama_society_page2-042fd01000b37b4bff71e974384e6eb6.png"},99935:(e,t,i)=>{i.d(t,{A:()=>s});const s=i.p+"assets/images/payout-9a8517b19e461e4c56fa825885986f97.jpg"},79289:(e,t,i)=>{i.d(t,{A:()=>s});const s=i.p+"assets/images/test_bid-ce5ef28a241c20b3afa46b8d491bf9ee.jpg"},98710:(e,t,i)=>{i.d(t,{A:()=>s});const s=i.p+"assets/images/vouch-4bdeb1a9c73bb236ecc042feb375149f.jpg"},28453:(e,t,i)=>{i.d(t,{R:()=>o,x:()=>r});var s=i(96540);const n={},a=s.createContext(n);function o(e){const t=s.useContext(a);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:o(e.components),s.createElement(a.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/33bbe353.fdac68a4.js b/assets/js/33bbe353.fdac68a4.js new file mode 100644 index 000000000000..80faf38b9835 --- /dev/null +++ b/assets/js/33bbe353.fdac68a4.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5033],{35831:(e,t,i)=>{i.r(t),i.d(t,{assets:()=>d,contentTitle:()=>r,default:()=>l,frontMatter:()=>o,metadata:()=>s,toc:()=>h});const s=JSON.parse('{"id":"maintain/kusama/maintain-guides-society-kusama","title":"Kappa Sigma Mu","description":"Learn about the Kappa Sigma Mu society and join as a member.","source":"@site/../docs/maintain/kusama/maintain-guides-society-kusama.md","sourceDirName":"maintain/kusama","slug":"/maintain-guides-society-kusama","permalink":"/docs/maintain-guides-society-kusama","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/maintain/kusama/maintain-guides-society-kusama.md","tags":[],"version":"current","lastUpdatedBy":"github-actions[bot]","lastUpdatedAt":1711359007000,"frontMatter":{"id":"maintain-guides-society-kusama","title":"Kappa Sigma Mu","sidebar_label":"Kappa Sigma Mu","description":"Learn about the Kappa Sigma Mu society and join as a member.","keywords":["kappa sigma mu","society","kusama","member"],"slug":"../../maintain-guides-society-kusama"},"sidebar":"docs","previous":{"title":"Adversarial Cheatsheet","permalink":"/docs/kusama-adversarial-cheatsheet"},"next":{"title":"How to run a Validator on Kusama","permalink":"/docs/maintain-guides-how-to-validate-kusama"}}');var n=i(74848),a=i(28453);const o={id:"maintain-guides-society-kusama",title:"Kappa Sigma Mu",sidebar_label:"Kappa Sigma Mu",description:"Learn about the Kappa Sigma Mu society and join as a member.",keywords:["kappa sigma mu","society","kusama","member"],slug:"../../maintain-guides-society-kusama"},r=void 0,d={},h=[{value:"UI Overview",id:"ui-overview",level:2},{value:"User Types",id:"user-types",level:2},{value:"Procedure",id:"procedure",level:2},{value:"1. Bid Phase",id:"1-bid-phase",level:3},{value:"2. Candidate Phase",id:"2-candidate-phase",level:3},{value:"Lock-up Time",id:"lock-up-time",level:4},{value:"3. Member Phase",id:"3-member-phase",level:3},{value:"Useful links",id:"useful-links",level:2}];function c(e){const t={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",h4:"h4",img:"img",li:"li",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,a.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(t.p,{children:["Kappa Sigma Mu is a membership club using the Substrate\n",(0,n.jsx)(t.a,{href:"https://paritytech.github.io/substrate/master/pallet_society/index.html",children:"Society pallet"}),". It is an\neconomic game to incentivize users to join a society that coordinates around whatever the rules are\ndecided to be. The members of the society are incentivized to participate in the society via the\nrewards paid by the treasury. Currently, there is only one society on Kusama but it is possible to\nhave multiple societies in the future through a runtime upgrade."]}),"\n",(0,n.jsxs)(t.p,{children:[(0,n.jsx)(t.img,{alt:"kusama_society_page",src:i(82214).A+"",width:"2880",height:"1650"}),"\n",(0,n.jsx)(t.img,{alt:"kusama_society_page2",src:i(72198).A+"",width:"2874",height:"716"})]}),"\n",(0,n.jsxs)(t.p,{children:["Before joining the society, let's take a brief look at the\n",(0,n.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/society",children:"Society UI"})," on Polkadot-JS apps and read through all the\n",(0,n.jsx)(t.a,{href:"https://kusama.subscan.io/extrinsic/0x948d3a4378914341dc7af9220a4c73acb2b3f72a70f14ee8089799da16d94c17",children:"rules"}),"\nto become a member."]}),"\n",(0,n.jsx)(t.h2,{id:"ui-overview",children:"UI Overview"}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.code,{children:"Members"}),": The number of members in the society. Currently, the maximum number of members is set\nto ",(0,n.jsx)(t.code,{children:"150"}),". It can be changed by using governance to increase the number."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.code,{children:"Rotation"}),": The time period for membership rotations."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.code,{children:"Challenge"}),": The time period to randomly select one of the members to defend his membership in the\nsociety."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.code,{children:"Pot"}),": Resource balance that is used to support members of the society."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.code,{children:"Bids"}),": A list of users who submitted a bid to join the society."]}),"\n"]}),"\n",(0,n.jsx)(t.h2,{id:"user-types",children:"User Types"}),"\n",(0,n.jsx)(t.p,{children:"Below are the various types of users at different stages."}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.code,{children:"Bidder"})," - A token holder who intends to join the society by placing a bid."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.code,{children:"Candidate"})," - The selected bidders that will be voted on by members of the society."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.code,{children:"Suspended Candidate"})," - The candidates that failed to join the society."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.code,{children:"Member"})," - Member of the society."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.code,{children:"Suspender Member"})," - A member of the society who has accumulated too many strikes or failed their\nmembership challenge."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.code,{children:"Head"})," - One winning candidate will be randomly chosen as head of the members, weighted by the\nnumber of approvals the winning candidates accumulated."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.code,{children:"Defender"})," - In every challenge period, one of the members will be randomly selected to defend\ntheir membership in the society. The rules for defending the membership are documented\n",(0,n.jsx)(t.a,{href:"https://kusama.subscan.io/extrinsic/0x948d3a4378914341dc7af9220a4c73acb2b3f72a70f14ee8089799da16d94c17",children:"in the rules"}),"."]}),"\n"]}),"\n",(0,n.jsx)(t.h2,{id:"procedure",children:"Procedure"}),"\n",(0,n.jsxs)(t.p,{children:["Remember to take a look at the\n",(0,n.jsx)(t.a,{href:"https://kusama.subscan.io/extrinsic/0x948d3a4378914341dc7af9220a4c73acb2b3f72a70f14ee8089799da16d94c17",children:"rules"}),"\nfirst. And since those rules are not enforced entirely on-chain, it is recommended to join the\n",(0,n.jsx)(t.a,{href:"https://app.element.io/#/room/!BUmiAAnAYSRGarqwOt:matrix.parity.io",children:"Kappa Sigma Mu Lounge"})," to ask\nany questions if anything is unclear."]}),"\n",(0,n.jsx)(t.h3,{id:"1-bid-phase",children:"1. Bid Phase"}),"\n",(0,n.jsxs)(t.p,{children:["To submit a bid, click the Submit Bid button on the\n",(0,n.jsx)(t.a,{href:"https://cloudflare-ipfs.com/ipns/kusama.dotapps.io/#/society",children:"Society page"}),"."]}),"\n",(0,n.jsx)(t.p,{children:"Anyone can submit a bid to join the society by reserving a deposit or finding an existing member to\ncreate a bid on their behalf by vouching for them. At every rotation period, as many bids as the\nsociety pot can support will be selected. The selected bids will be moved to the candidate phase,\nwhereas bids that were not selected will stay in the bidder pool until they are selected or a user\nchooses to unbid."}),"\n",(0,n.jsx)(t.p,{children:"Anyone who wants to join the society is required to deposit 1.6 KSM for reserve on Kusama and\ndeclare the bid amount (1 KSM in this case) that they will receive for joining the society."}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"test_bid",src:i(79289).A+"",width:"2490",height:"498"})}),"\n",(0,n.jsxs)(t.p,{children:["Once you have submitted the transaction, your bid will be shown on the\n",(0,n.jsx)(t.a,{href:"https://cloudflare-ipfs.com/ipns/kusama.dotapps.io/#/society",children:"Society page"})," under the bids section.\nYou can cancel the bidding if you changed your mind about joining the society by calling ",(0,n.jsx)(t.code,{children:"unbid"})," on\nthe same page."]}),"\n",(0,n.jsxs)(t.p,{children:["You can find an existing member to place a bid on your behalf if you do not have KSM and you are\nwilling to give them a tip. An existing member can submit a ",(0,n.jsx)(t.code,{children:"vouch"})," transaction through the\nExtrinsics page."]}),"\n",(0,n.jsxs)(t.admonition,{title:"vouch(who,value,tip)",type:"info",children:[(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsx)(t.li,{children:"who: The user you are vouching for"}),"\n",(0,n.jsx)(t.li,{children:"value: The value that the user would like to get when joining the society"}),"\n",(0,n.jsx)(t.li,{children:"tip: Fees you get"}),"\n"]}),(0,n.jsx)(t.p,{children:"The final value that the candidate will get = (value - tip)"})]}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"vouch",src:i(98710).A+"",width:"1210",height:"461"})}),"\n",(0,n.jsx)(t.h3,{id:"2-candidate-phase",children:"2. Candidate Phase"}),"\n",(0,n.jsx)(t.p,{children:"Bids selected in this phase will be voted on by the existing members to decide whether or not you\nwill be approved to join the society. Members will vote for all the candidates and the final outcome\nwill be randomly selected by one of the votes. Let's take a look the example shown below:"}),"\n",(0,n.jsx)(t.admonition,{type:"note",children:(0,n.jsx)(t.p,{children:"If the randomly selected member does not vote, it will be treated as a rejection. For each rotation\nperiod, the maximum number of members that can be accepted is set as 10."})}),"\n",(0,n.jsx)(t.p,{children:"A - Accept, R - Reject, S - Skeptic"}),"\n",(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Member"}),(0,n.jsx)(t.th,{children:"1"}),(0,n.jsx)(t.th,{children:"2"}),(0,n.jsx)(t.th,{children:"3"}),(0,n.jsx)(t.th,{children:"4"}),(0,n.jsx)(t.th,{children:"5"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Vote"}),(0,n.jsx)(t.td,{children:"A"}),(0,n.jsx)(t.td,{children:"A"}),(0,n.jsx)(t.td,{children:"A"}),(0,n.jsx)(t.td,{children:"R"}),(0,n.jsx)(t.td,{children:"S"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Selected"}),(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"X"}),(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{})]})]})]}),"\n",(0,n.jsx)(t.p,{children:'In this example, a candidate will be approved to join the society since member 3 was selected as a\nfinal voting outcome. A number of members will also be randomly chosen as "skeptics" to vote for the\ncandidates during the rotation period.'}),"\n",(0,n.jsx)(t.p,{children:"Since member 5 was chosen as a skeptic, they are required to participate in the voting process. If\nthey do not participate in voting, they will be punished with one strike per missing vote. If one\naccumulates too many strikes, one's membership is suspended which means they may need to re-apply\nand their unclaimed payouts will be slashed. Moreover, each member who voted opposite to the\nrandomly selected vote will have their unclaimed payouts slashed and strikes increased. In this\ncase, member 4 will be punished."}),"\n",(0,n.jsx)(t.admonition,{title:"The maximum number of strikes you can have is on Kusama is 10",type:"info"}),"\n",(0,n.jsx)(t.p,{children:"The slashed funds (2 KSM currently) will be given to a random member who voted the same as the\nselected vote as a reward for participating in the vote. The reward is escrowed for some period of\ntime - see below."}),"\n",(0,n.jsx)(t.h4,{id:"lock-up-time",children:"Lock-up Time"}),"\n",(0,n.jsxs)(t.p,{children:["It would take the number of members of the society as the variable to determine how many blocks you\nhave to wait in order to get the payout. The longest lockup time is close to 3 years. The formula is\ndefined\n",(0,n.jsx)(t.a,{href:"https://paritytech.github.io/substrate/master/pallet_society/index.html",children:"in the society pallet"})," if\nyou would like to have a look."]}),"\n",(0,n.jsx)(t.p,{children:"Example:"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{children:"Let's assume we have 5 members in the society\n\nlock_duration = 100 - 50_000 / (5 + 500)\nlock_duration * MAX_LOCK_DURATION_IN_BLOCKS\n\nResult = 1% * 15_552_000 ~ 11 days\n"})}),"\n",(0,n.jsx)(t.p,{children:"Based on the above calculation, it is required to wait close to 11 days to get the slashed funds."}),"\n",(0,n.jsx)(t.p,{children:"If the candidate wins the vote, they receive their bid reward as a future payout. If the bid was\nplaced by a voucher, they will get back the reward that was set during vouching with the remainder\ngiven to the candidate - both escrowed for some time."}),"\n",(0,n.jsxs)(t.p,{children:["If the candidate loses the vote, they are suspended and it is up to the founder of the society (the\n",(0,n.jsx)(t.code,{children:"Suspension Judgement Origin"}),") to determine if the candidate should go through the bidding process\nagain, should be accepted into the membership society, or rejected and their deposit slashed."]}),"\n",(0,n.jsx)(t.h3,{id:"3-member-phase",children:"3. Member Phase"}),"\n",(0,n.jsx)(t.p,{children:"Once you become a member of the society, you will get back the deposit that you have reserved during\nthe bidding. A few things you need to be aware of. First, you should vote on candidates who applied\nfor the membership in every rotation period."}),"\n",(0,n.jsxs)(t.p,{children:["Second, you will need to claim your payout manually by calling ",(0,n.jsx)(t.code,{children:"payout"})," after the lockup time. It is\nthe same as the above mentioned lockup formula."]}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"Society Payout",src:i(99935).A+"",width:"2580",height:"572"})}),"\n",(0,n.jsxs)(t.p,{children:["Third, there will be a membership challenge every seven days on Kusama. So one of the members will\nbe randomly selected as a defender. Then, other members can vote whether this defender should stay\nin the society or not. A simple majority wins the vote. You can take a look\n",(0,n.jsx)(t.a,{href:"https://kusama.subscan.io/extrinsic/0x948d3a4378914341dc7af9220a4c73acb2b3f72a70f14ee8089799da16d94c17",children:"here"}),'\nand search for "Existing Members (Challenges)". Besides that, you can earn extra KSM by helping a\nuser apply for the membership and requesting a tip. This is useful when a user does not have enough\nbalance to reserve a deposit. The tip will be given when a user successfully joins the society.']}),"\n",(0,n.jsx)(t.admonition,{type:"info",children:(0,n.jsx)(t.p,{children:"Each member can only vouch for one user at a time. A member is not required to reserve the deposit\nwhen vouching for a user."})}),"\n",(0,n.jsx)(t.p,{children:"If a member accumulates too many strikes or fails their membership challenge, they will become\nsuspended. While a member is suspended, they are unable to claim matured payouts. It is up to the\nsuspension judgment origin to determine if the member should re-enter society or be removed from\nsociety with all their future payouts slashed."}),"\n",(0,n.jsx)(t.h2,{id:"useful-links",children:"Useful links"}),"\n",(0,n.jsxs)(t.p,{children:[(0,n.jsx)(t.a,{href:"https://kusama.subscan.io/extrinsic/0x948d3a4378914341dc7af9220a4c73acb2b3f72a70f14ee8089799da16d94c17",children:"Convention of Approval of Membership"})," -\nRules about joining the Kusama society"]}),"\n",(0,n.jsx)(t.p,{children:'The rules are encoded on-chain in UTF-8 format. This is displayed in most block explorers as a\nhexadecimal string. In order to see the rules in human-readable format, you can convert it. In the\nextrinsic\'s parameters go to Element 1 ("proposal") -> "value" -> "params" -> Element 2 ("rules")\nand copy the value corresponding to the key "value". You can use a hex-to-UTF8 converter to then\ndisplay the text. Note that the text is formatted with Markdown.'})]})}function l(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(c,{...e})}):c(e)}},82214:(e,t,i)=>{i.d(t,{A:()=>s});const s=i.p+"assets/images/kusama_society_page-e9e3297982c38b1f88e7b7a123c83b0c.png"},72198:(e,t,i)=>{i.d(t,{A:()=>s});const s=i.p+"assets/images/kusama_society_page2-042fd01000b37b4bff71e974384e6eb6.png"},99935:(e,t,i)=>{i.d(t,{A:()=>s});const s=i.p+"assets/images/payout-9a8517b19e461e4c56fa825885986f97.jpg"},79289:(e,t,i)=>{i.d(t,{A:()=>s});const s=i.p+"assets/images/test_bid-ce5ef28a241c20b3afa46b8d491bf9ee.jpg"},98710:(e,t,i)=>{i.d(t,{A:()=>s});const s=i.p+"assets/images/vouch-4bdeb1a9c73bb236ecc042feb375149f.jpg"},28453:(e,t,i)=>{i.d(t,{R:()=>o,x:()=>r});var s=i(96540);const n={},a=s.createContext(n);function o(e){const t=s.useContext(a);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:o(e.components),s.createElement(a.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/3417.751afcab.js b/assets/js/3417.751afcab.js deleted file mode 100644 index 9998b706e4a2..000000000000 --- a/assets/js/3417.751afcab.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3417],{23417:(t,e,i)=>{i.d(e,{diagram:()=>T});var n=i(86079),r=i(26312),s=i(21176),a=i(697),l=(i(74353),i(16750),i(42838),function(){var t=function(t,e,i,n){for(i=i||{},n=t.length;n--;i[t[n]]=e);return i},e=[1,3],i=[1,4],n=[1,5],r=[1,6],s=[5,6,8,9,11,13,31,32,33,34,35,36,44,62,63],a=[1,18],l=[2,7],c=[1,22],o=[1,23],h=[1,24],u=[1,25],y=[1,26],d=[1,27],p=[1,20],_=[1,28],E=[1,29],g=[62,63],R=[5,8,9,11,13,31,32,33,34,35,36,44,51,53,62,63],m=[1,47],f=[1,48],I=[1,49],b=[1,50],k=[1,51],S=[1,52],T=[1,53],N=[53,54],x=[1,64],A=[1,60],v=[1,61],q=[1,62],$=[1,63],O=[1,65],w=[1,69],C=[1,70],L=[1,67],F=[1,68],M=[5,8,9,11,13,31,32,33,34,35,36,44,62,63],D={trace:function(){},yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,requirementType:17,requirementName:18,STRUCT_START:19,requirementBody:20,ID:21,COLONSEP:22,id:23,TEXT:24,text:25,RISK:26,riskLevel:27,VERIFYMTHD:28,verifyType:29,STRUCT_STOP:30,REQUIREMENT:31,FUNCTIONAL_REQUIREMENT:32,INTERFACE_REQUIREMENT:33,PERFORMANCE_REQUIREMENT:34,PHYSICAL_REQUIREMENT:35,DESIGN_CONSTRAINT:36,LOW_RISK:37,MED_RISK:38,HIGH_RISK:39,VERIFY_ANALYSIS:40,VERIFY_DEMONSTRATION:41,VERIFY_INSPECTION:42,VERIFY_TEST:43,ELEMENT:44,elementName:45,elementBody:46,TYPE:47,type:48,DOCREF:49,ref:50,END_ARROW_L:51,relationship:52,LINE:53,END_ARROW_R:54,CONTAINS:55,COPIES:56,DERIVES:57,SATISFIES:58,VERIFIES:59,REFINES:60,TRACES:61,unqString:62,qString:63,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",19:"STRUCT_START",21:"ID",22:"COLONSEP",24:"TEXT",26:"RISK",28:"VERIFYMTHD",30:"STRUCT_STOP",31:"REQUIREMENT",32:"FUNCTIONAL_REQUIREMENT",33:"INTERFACE_REQUIREMENT",34:"PERFORMANCE_REQUIREMENT",35:"PHYSICAL_REQUIREMENT",36:"DESIGN_CONSTRAINT",37:"LOW_RISK",38:"MED_RISK",39:"HIGH_RISK",40:"VERIFY_ANALYSIS",41:"VERIFY_DEMONSTRATION",42:"VERIFY_INSPECTION",43:"VERIFY_TEST",44:"ELEMENT",47:"TYPE",49:"DOCREF",51:"END_ARROW_L",53:"LINE",54:"END_ARROW_R",55:"CONTAINS",56:"COPIES",57:"DERIVES",58:"SATISFIES",59:"VERIFIES",60:"REFINES",61:"TRACES",62:"unqString",63:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[14,5],[20,5],[20,5],[20,5],[20,5],[20,2],[20,1],[17,1],[17,1],[17,1],[17,1],[17,1],[17,1],[27,1],[27,1],[27,1],[29,1],[29,1],[29,1],[29,1],[15,5],[46,5],[46,5],[46,2],[46,1],[16,5],[16,5],[52,1],[52,1],[52,1],[52,1],[52,1],[52,1],[52,1],[18,1],[18,1],[23,1],[23,1],[25,1],[25,1],[45,1],[45,1],[48,1],[48,1],[50,1],[50,1]],performAction:function(t,e,i,n,r,s,a){var l=s.length-1;switch(r){case 4:this.$=s[l].trim(),n.setAccTitle(this.$);break;case 5:case 6:this.$=s[l].trim(),n.setAccDescription(this.$);break;case 7:this.$=[];break;case 13:n.addRequirement(s[l-3],s[l-4]);break;case 14:n.setNewReqId(s[l-2]);break;case 15:n.setNewReqText(s[l-2]);break;case 16:n.setNewReqRisk(s[l-2]);break;case 17:n.setNewReqVerifyMethod(s[l-2]);break;case 20:this.$=n.RequirementType.REQUIREMENT;break;case 21:this.$=n.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 22:this.$=n.RequirementType.INTERFACE_REQUIREMENT;break;case 23:this.$=n.RequirementType.PERFORMANCE_REQUIREMENT;break;case 24:this.$=n.RequirementType.PHYSICAL_REQUIREMENT;break;case 25:this.$=n.RequirementType.DESIGN_CONSTRAINT;break;case 26:this.$=n.RiskLevel.LOW_RISK;break;case 27:this.$=n.RiskLevel.MED_RISK;break;case 28:this.$=n.RiskLevel.HIGH_RISK;break;case 29:this.$=n.VerifyType.VERIFY_ANALYSIS;break;case 30:this.$=n.VerifyType.VERIFY_DEMONSTRATION;break;case 31:this.$=n.VerifyType.VERIFY_INSPECTION;break;case 32:this.$=n.VerifyType.VERIFY_TEST;break;case 33:n.addElement(s[l-3]);break;case 34:n.setNewElementType(s[l-2]);break;case 35:n.setNewElementDocRef(s[l-2]);break;case 38:n.addRelationship(s[l-2],s[l],s[l-4]);break;case 39:n.addRelationship(s[l-2],s[l-4],s[l]);break;case 40:this.$=n.Relationships.CONTAINS;break;case 41:this.$=n.Relationships.COPIES;break;case 42:this.$=n.Relationships.DERIVES;break;case 43:this.$=n.Relationships.SATISFIES;break;case 44:this.$=n.Relationships.VERIFIES;break;case 45:this.$=n.Relationships.REFINES;break;case 46:this.$=n.Relationships.TRACES}},table:[{3:1,4:2,6:e,9:i,11:n,13:r},{1:[3]},{3:8,4:2,5:[1,7],6:e,9:i,11:n,13:r},{5:[1,9]},{10:[1,10]},{12:[1,11]},t(s,[2,6]),{3:12,4:2,6:e,9:i,11:n,13:r},{1:[2,2]},{4:17,5:a,7:13,8:l,9:i,11:n,13:r,14:14,15:15,16:16,17:19,23:21,31:c,32:o,33:h,34:u,35:y,36:d,44:p,62:_,63:E},t(s,[2,4]),t(s,[2,5]),{1:[2,1]},{8:[1,30]},{4:17,5:a,7:31,8:l,9:i,11:n,13:r,14:14,15:15,16:16,17:19,23:21,31:c,32:o,33:h,34:u,35:y,36:d,44:p,62:_,63:E},{4:17,5:a,7:32,8:l,9:i,11:n,13:r,14:14,15:15,16:16,17:19,23:21,31:c,32:o,33:h,34:u,35:y,36:d,44:p,62:_,63:E},{4:17,5:a,7:33,8:l,9:i,11:n,13:r,14:14,15:15,16:16,17:19,23:21,31:c,32:o,33:h,34:u,35:y,36:d,44:p,62:_,63:E},{4:17,5:a,7:34,8:l,9:i,11:n,13:r,14:14,15:15,16:16,17:19,23:21,31:c,32:o,33:h,34:u,35:y,36:d,44:p,62:_,63:E},{4:17,5:a,7:35,8:l,9:i,11:n,13:r,14:14,15:15,16:16,17:19,23:21,31:c,32:o,33:h,34:u,35:y,36:d,44:p,62:_,63:E},{18:36,62:[1,37],63:[1,38]},{45:39,62:[1,40],63:[1,41]},{51:[1,42],53:[1,43]},t(g,[2,20]),t(g,[2,21]),t(g,[2,22]),t(g,[2,23]),t(g,[2,24]),t(g,[2,25]),t(R,[2,49]),t(R,[2,50]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{19:[1,44]},{19:[2,47]},{19:[2,48]},{19:[1,45]},{19:[2,53]},{19:[2,54]},{52:46,55:m,56:f,57:I,58:b,59:k,60:S,61:T},{52:54,55:m,56:f,57:I,58:b,59:k,60:S,61:T},{5:[1,55]},{5:[1,56]},{53:[1,57]},t(N,[2,40]),t(N,[2,41]),t(N,[2,42]),t(N,[2,43]),t(N,[2,44]),t(N,[2,45]),t(N,[2,46]),{54:[1,58]},{5:x,20:59,21:A,24:v,26:q,28:$,30:O},{5:w,30:C,46:66,47:L,49:F},{23:71,62:_,63:E},{23:72,62:_,63:E},t(M,[2,13]),{22:[1,73]},{22:[1,74]},{22:[1,75]},{22:[1,76]},{5:x,20:77,21:A,24:v,26:q,28:$,30:O},t(M,[2,19]),t(M,[2,33]),{22:[1,78]},{22:[1,79]},{5:w,30:C,46:80,47:L,49:F},t(M,[2,37]),t(M,[2,38]),t(M,[2,39]),{23:81,62:_,63:E},{25:82,62:[1,83],63:[1,84]},{27:85,37:[1,86],38:[1,87],39:[1,88]},{29:89,40:[1,90],41:[1,91],42:[1,92],43:[1,93]},t(M,[2,18]),{48:94,62:[1,95],63:[1,96]},{50:97,62:[1,98],63:[1,99]},t(M,[2,36]),{5:[1,100]},{5:[1,101]},{5:[2,51]},{5:[2,52]},{5:[1,102]},{5:[2,26]},{5:[2,27]},{5:[2,28]},{5:[1,103]},{5:[2,29]},{5:[2,30]},{5:[2,31]},{5:[2,32]},{5:[1,104]},{5:[2,55]},{5:[2,56]},{5:[1,105]},{5:[2,57]},{5:[2,58]},{5:x,20:106,21:A,24:v,26:q,28:$,30:O},{5:x,20:107,21:A,24:v,26:q,28:$,30:O},{5:x,20:108,21:A,24:v,26:q,28:$,30:O},{5:x,20:109,21:A,24:v,26:q,28:$,30:O},{5:w,30:C,46:110,47:L,49:F},{5:w,30:C,46:111,47:L,49:F},t(M,[2,14]),t(M,[2,15]),t(M,[2,16]),t(M,[2,17]),t(M,[2,34]),t(M,[2,35])],defaultActions:{8:[2,2],12:[2,1],30:[2,3],31:[2,8],32:[2,9],33:[2,10],34:[2,11],35:[2,12],37:[2,47],38:[2,48],40:[2,53],41:[2,54],83:[2,51],84:[2,52],86:[2,26],87:[2,27],88:[2,28],90:[2,29],91:[2,30],92:[2,31],93:[2,32],95:[2,55],96:[2,56],98:[2,57],99:[2,58]},parseError:function(t,e){if(!e.recoverable){var i=new Error(t);throw i.hash=e,i}this.trace(t)},parse:function(t){var e=this,i=[0],n=[],r=[null],s=[],a=this.table,l="",c=0,o=0,h=s.slice.call(arguments,1),u=Object.create(this.lexer),y={yy:{}};for(var d in this.yy)Object.prototype.hasOwnProperty.call(this.yy,d)&&(y.yy[d]=this.yy[d]);u.setInput(t,y.yy),y.yy.lexer=u,y.yy.parser=this,void 0===u.yylloc&&(u.yylloc={});var p=u.yylloc;s.push(p);var _=u.options&&u.options.ranges;"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var E,g,R,m,f,I,b,k,S,T={};;){if(g=i[i.length-1],this.defaultActions[g]?R=this.defaultActions[g]:(null==E&&(S=void 0,"number"!=typeof(S=n.pop()||u.lex()||1)&&(S instanceof Array&&(S=(n=S).pop()),S=e.symbols_[S]||S),E=S),R=a[g]&&a[g][E]),void 0===R||!R.length||!R[0]){var N="";for(f in k=[],a[g])this.terminals_[f]&&f>2&&k.push("'"+this.terminals_[f]+"'");N=u.showPosition?"Parse error on line "+(c+1)+":\n"+u.showPosition()+"\nExpecting "+k.join(", ")+", got '"+(this.terminals_[E]||E)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==E?"end of input":"'"+(this.terminals_[E]||E)+"'"),this.parseError(N,{text:u.match,token:this.terminals_[E]||E,line:u.yylineno,loc:p,expected:k})}if(R[0]instanceof Array&&R.length>1)throw new Error("Parse Error: multiple actions possible at state: "+g+", token: "+E);switch(R[0]){case 1:i.push(E),r.push(u.yytext),s.push(u.yylloc),i.push(R[1]),E=null,o=u.yyleng,l=u.yytext,c=u.yylineno,p=u.yylloc;break;case 2:if(I=this.productions_[R[1]][1],T.$=r[r.length-I],T._$={first_line:s[s.length-(I||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(I||1)].first_column,last_column:s[s.length-1].last_column},_&&(T._$.range=[s[s.length-(I||1)].range[0],s[s.length-1].range[1]]),void 0!==(m=this.performAction.apply(T,[l,o,c,y.yy,R[1],r,s].concat(h))))return m;I&&(i=i.slice(0,-1*I*2),r=r.slice(0,-1*I),s=s.slice(0,-1*I)),i.push(this.productions_[R[1]][0]),r.push(T.$),s.push(T._$),b=a[i[i.length-2]][i[i.length-1]],i.push(b);break;case 3:return!0}}return!0}},P={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,i=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),i.length-1&&(this.yylineno-=i.length-1);var r=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:i?(i.length===n.length?this.yylloc.first_column:0)+n[n.length-i.length].length-i[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var i,n,r;if(this.options.backtrack_lexer&&(r={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(r.yylloc.range=this.yylloc.range.slice(0))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],i=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack){for(var s in r)this[s]=r[s];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,i,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),s=0;se[0].length)){if(e=i,n=s,this.options.backtrack_lexer){if(!1!==(t=this.test_match(i,r[s])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,r[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,i,n){switch(i){case 0:return"title";case 1:return this.begin("acc_title"),9;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),11;case 4:return this.popState(),"acc_descr_value";case 5:this.begin("acc_descr_multiline");break;case 6:case 48:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:return 5;case 9:case 10:case 11:break;case 12:return 8;case 13:return 6;case 14:return 19;case 15:return 30;case 16:return 22;case 17:return 21;case 18:return 24;case 19:return 26;case 20:return 28;case 21:return 31;case 22:return 32;case 23:return 33;case 24:return 34;case 25:return 35;case 26:return 36;case 27:return 37;case 28:return 38;case 29:return 39;case 30:return 40;case 31:return 41;case 32:return 42;case 33:return 43;case 34:return 44;case 35:return 55;case 36:return 56;case 37:return 57;case 38:return 58;case 39:return 59;case 40:return 60;case 41:return 61;case 42:return 47;case 43:return 49;case 44:return 51;case 45:return 54;case 46:return 53;case 47:this.begin("string");break;case 49:return"qString";case 50:return e.yytext=e.yytext.trim(),62}},rules:[/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^\r\n\{\<\>\-\=]*)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},unqString:{rules:[],inclusive:!1},token:{rules:[],inclusive:!1},string:{rules:[48,49],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,50],inclusive:!0}}};function V(){this.yy={}}return D.lexer=P,V.prototype=D,D.Parser=V,new V}());l.parser=l;const c=l;let o=[],h={},u={},y={},d={};const p={RequirementType:{REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},RiskLevel:{LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},VerifyType:{VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},Relationships:{CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},getConfig:()=>(0,n.c)().req,addRequirement:(t,e)=>(void 0===u[t]&&(u[t]={name:t,type:e,id:h.id,text:h.text,risk:h.risk,verifyMethod:h.verifyMethod}),h={},u[t]),getRequirements:()=>u,setNewReqId:t=>{void 0!==h&&(h.id=t)},setNewReqText:t=>{void 0!==h&&(h.text=t)},setNewReqRisk:t=>{void 0!==h&&(h.risk=t)},setNewReqVerifyMethod:t=>{void 0!==h&&(h.verifyMethod=t)},setAccTitle:n.s,getAccTitle:n.g,setAccDescription:n.b,getAccDescription:n.a,addElement:t=>(void 0===d[t]&&(d[t]={name:t,type:y.type,docRef:y.docRef},n.l.info("Added new requirement: ",t)),y={},d[t]),getElements:()=>d,setNewElementType:t=>{void 0!==y&&(y.type=t)},setNewElementDocRef:t=>{void 0!==y&&(y.docRef=t)},addRelationship:(t,e,i)=>{o.push({type:t,src:e,dst:i})},getRelationships:()=>o,clear:()=>{o=[],h={},u={},y={},d={},(0,n.v)()}},_={CONTAINS:"contains",ARROW:"arrow"},E=_,g=(t,e)=>{let i=t.append("defs").append("marker").attr("id",_.CONTAINS+"_line_ending").attr("refX",0).attr("refY",e.line_height/2).attr("markerWidth",e.line_height).attr("markerHeight",e.line_height).attr("orient","auto").append("g");i.append("circle").attr("cx",e.line_height/2).attr("cy",e.line_height/2).attr("r",e.line_height/2).attr("fill","none"),i.append("line").attr("x1",0).attr("x2",e.line_height).attr("y1",e.line_height/2).attr("y2",e.line_height/2).attr("stroke-width",1),i.append("line").attr("y1",0).attr("y2",e.line_height).attr("x1",e.line_height/2).attr("x2",e.line_height/2).attr("stroke-width",1),t.append("defs").append("marker").attr("id",_.ARROW+"_line_ending").attr("refX",e.line_height).attr("refY",.5*e.line_height).attr("markerWidth",e.line_height).attr("markerHeight",e.line_height).attr("orient","auto").append("path").attr("d",`M0,0\n L${e.line_height},${e.line_height/2}\n M${e.line_height},${e.line_height/2}\n L0,${e.line_height}`).attr("stroke-width",1)};let R={},m=0;const f=(t,e)=>t.insert("rect","#"+e).attr("class","req reqBox").attr("x",0).attr("y",0).attr("width",R.rect_min_width+"px").attr("height",R.rect_min_height+"px"),I=(t,e,i)=>{let n=R.rect_min_width/2,r=t.append("text").attr("class","req reqLabel reqTitle").attr("id",e).attr("x",n).attr("y",R.rect_padding).attr("dominant-baseline","hanging"),s=0;i.forEach((t=>{0==s?r.append("tspan").attr("text-anchor","middle").attr("x",R.rect_min_width/2).attr("dy",0).text(t):r.append("tspan").attr("text-anchor","middle").attr("x",R.rect_min_width/2).attr("dy",.75*R.line_height).text(t),s++}));let a=1.5*R.rect_padding+s*R.line_height*.75;return t.append("line").attr("class","req-title-line").attr("x1","0").attr("x2",R.rect_min_width).attr("y1",a).attr("y2",a),{titleNode:r,y:a}},b=(t,e,i,n)=>{let r=t.append("text").attr("class","req reqLabel").attr("id",e).attr("x",R.rect_padding).attr("y",n).attr("dominant-baseline","hanging"),s=0;let a=[];return i.forEach((t=>{let e=t.length;for(;e>30&&s<3;){let i=t.substring(0,30);e=(t=t.substring(30,t.length)).length,a[a.length]=i,s++}if(3==s){let t=a[a.length-1];a[a.length-1]=t.substring(0,t.length-4)+"..."}else a[a.length]=t;s=0})),a.forEach((t=>{r.append("tspan").attr("x",R.rect_padding).attr("dy",R.line_height).text(t)})),r},k=function(t,e,i,s,a){const l=i.edge(S(e.src),S(e.dst)),c=(0,r.n8j)().x((function(t){return t.x})).y((function(t){return t.y})),o=t.insert("path","#"+s).attr("class","er relationshipLine").attr("d",c(l.points)).attr("fill","none");e.type==a.db.Relationships.CONTAINS?o.attr("marker-start","url("+n.e.getUrl(R.arrowMarkerAbsolute)+"#"+e.type+"_line_ending)"):(o.attr("stroke-dasharray","10,7"),o.attr("marker-end","url("+n.e.getUrl(R.arrowMarkerAbsolute)+"#"+E.ARROW+"_line_ending)")),((t,e,i,n)=>{const r=e.node().getTotalLength(),s=e.node().getPointAtLength(.5*r),a="rel"+m;m++;const l=t.append("text").attr("class","req relationshipLabel").attr("id",a).attr("x",s.x).attr("y",s.y).attr("text-anchor","middle").attr("dominant-baseline","middle").text(n).node().getBBox();t.insert("rect","#"+a).attr("class","req reqLabelBox").attr("x",s.x-l.width/2).attr("y",s.y-l.height/2).attr("width",l.width).attr("height",l.height).attr("fill","white").attr("fill-opacity","85%")})(t,o,0,`<<${e.type}>>`)},S=t=>t.replace(/\s/g,"").replace(/\./g,"_"),T={parser:c,db:p,renderer:{draw:(t,e,i,l)=>{R=(0,n.c)().requirement;const c=R.securityLevel;let o;"sandbox"===c&&(o=(0,r.Ltv)("#i"+e));const h=("sandbox"===c?(0,r.Ltv)(o.nodes()[0].contentDocument.body):(0,r.Ltv)("body")).select(`[id='${e}']`);g(h,R);const u=new a.T({multigraph:!1,compound:!1,directed:!0}).setGraph({rankdir:R.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel((function(){return{}}));let y=l.db.getRequirements(),d=l.db.getElements(),p=l.db.getRelationships();var _,E,m;_=y,E=u,m=h,Object.keys(_).forEach((t=>{let e=_[t];t=S(t),n.l.info("Added new requirement: ",t);const i=m.append("g").attr("id",t),r=f(i,"req-"+t);let s=I(i,t+"_title",[`<<${e.type}>>`,`${e.name}`]);b(i,t+"_body",[`Id: ${e.id}`,`Text: ${e.text}`,`Risk: ${e.risk}`,`Verification: ${e.verifyMethod}`],s.y);const a=r.node().getBBox();E.setNode(t,{width:a.width,height:a.height,shape:"rect",id:t})})),((t,e,i)=>{Object.keys(t).forEach((n=>{let r=t[n];const s=S(n),a=i.append("g").attr("id",s),l="element-"+s,c=f(a,l);let o=I(a,l+"_title",["<>",`${n}`]);b(a,l+"_body",[`Type: ${r.type||"Not Specified"}`,`Doc Ref: ${r.docRef||"None"}`],o.y);const h=c.node().getBBox();e.setNode(s,{width:h.width,height:h.height,shape:"rect",id:s})}))})(d,u,h),((t,e)=>{t.forEach((function(t){let i=S(t.src),n=S(t.dst);e.setEdge(i,n,{relationship:t})}))})(p,u),(0,s.Zp)(u),function(t,e){e.nodes().forEach((function(i){void 0!==i&&void 0!==e.node(i)&&(t.select("#"+i),t.select("#"+i).attr("transform","translate("+(e.node(i).x-e.node(i).width/2)+","+(e.node(i).y-e.node(i).height/2)+" )"))}))}(h,u),p.forEach((function(t){k(h,t,u,e,l)}));const T=R.rect_padding,N=h.node().getBBox(),x=N.width+2*T,A=N.height+2*T;(0,n.i)(h,A,x,R.useMaxWidth),h.attr("viewBox",`${N.x-T} ${N.y-T} ${x} ${A}`)}},styles:t=>`\n\n marker {\n fill: ${t.relationColor};\n stroke: ${t.relationColor};\n }\n\n marker.cross {\n stroke: ${t.lineColor};\n }\n\n svg {\n font-family: ${t.fontFamily};\n font-size: ${t.fontSize};\n }\n\n .reqBox {\n fill: ${t.requirementBackground};\n fill-opacity: 1.0;\n stroke: ${t.requirementBorderColor};\n stroke-width: ${t.requirementBorderSize};\n }\n \n .reqTitle, .reqLabel{\n fill: ${t.requirementTextColor};\n }\n .reqLabelBox {\n fill: ${t.relationLabelBackground};\n fill-opacity: 1.0;\n }\n\n .req-title-line {\n stroke: ${t.requirementBorderColor};\n stroke-width: ${t.requirementBorderSize};\n }\n .relationshipLine {\n stroke: ${t.relationColor};\n stroke-width: 1;\n }\n .relationshipLabel {\n fill: ${t.relationLabelColor};\n }\n\n`}}}]); \ No newline at end of file diff --git a/assets/js/3482.0b39266b.js b/assets/js/3482.483a7910.js similarity index 91% rename from assets/js/3482.0b39266b.js rename to assets/js/3482.483a7910.js index af9bd91d698e..79742028d425 100644 --- a/assets/js/3482.0b39266b.js +++ b/assets/js/3482.483a7910.js @@ -1,2 +1,2 @@ -/*! For license information please see 3482.0b39266b.js.LICENSE.txt */ -(self.webpackChunk=self.webpackChunk||[]).push([[3482],{39404:function(e,t,n){!function(e,t){"use strict";function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function a(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function i(e,t,n){if(i.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this._init(e||0,t||10,n||"be"))}var s;"object"==typeof e?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:n(47790).Buffer}catch(M){}function o(e,t){var n=e.charCodeAt(t);return n>=48&&n<=57?n-48:n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:void r(!1,"Invalid character in "+e)}function c(e,t,n){var r=o(e,n);return n-1>=t&&(r|=o(e,n-1)<<4),r}function d(e,t,n,a){for(var i=0,s=0,o=Math.min(e.length,n),c=t;c=49?d-49+10:d>=17?d-17+10:d,r(d>=0&&s0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,n){if("number"==typeof e)return this._initNumber(e,t,n);if("object"==typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var a=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(a++,this.negative=1),a=0;a-=3)s=e[a]|e[a-1]<<8|e[a-2]<<16,this.words[i]|=s<>>26-o&67108863,(o+=24)>=26&&(o-=26,i++);else if("le"===n)for(a=0,i=0;a>>26-o&67108863,(o+=24)>=26&&(o-=26,i++);return this._strip()},i.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r=t;r-=2)a=c(e,t,r)<=18?(i-=18,s+=1,this.words[s]|=a>>>26):i+=8;else for(r=(e.length-t)%2==0?t+1:t;r=18?(i-=18,s+=1,this.words[s]|=a>>>26):i+=8;this._strip()},i.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var r=0,a=1;a<=67108863;a*=t)r++;r--,a=a/t|0;for(var i=e.length-n,s=i%r,o=Math.min(i,i-s)+n,c=0,u=n;u1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=l}catch(M){i.prototype.inspect=l}else i.prototype.inspect=l;function l(){return(this.red?""}var f=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],p=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],h=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var a=0,i=0,s=0;s>>24-a&16777215,(a+=2)>=26&&(a-=26,s--),n=0!==i||s!==this.length-1?f[6-c.length]+c+n:c+n}for(0!==i&&(n=i.toString(16)+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var d=p[e],u=h[e];n="";var l=this.clone();for(l.negative=0;!l.isZero();){var b=l.modrn(u).toString(e);n=(l=l.idivn(u)).isZero()?b+n:f[d-b.length]+b+n}for(this.isZero()&&(n="0"+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16,2)},s&&(i.prototype.toBuffer=function(e,t){return this.toArrayLike(s,e,t)}),i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};function b(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var a=0|e.words[0],i=0|t.words[0],s=a*i,o=67108863&s,c=s/67108864|0;n.words[0]=o;for(var d=1;d>>26,l=67108863&c,f=Math.min(d,t.length-1),p=Math.max(0,d-e.length+1);p<=f;p++){var h=d-p|0;u+=(s=(a=0|e.words[h])*(i=0|t.words[p])+l)/67108864|0,l=67108863&s}n.words[d]=0|l,c=0|u}return 0!==c?n.words[d]=0|c:n.length--,n._strip()}i.prototype.toArrayLike=function(e,t,n){this._strip();var a=this.byteLength(),i=n||Math.max(1,a);r(a<=i,"byte array longer than desired length"),r(i>0,"Requested array length <= 0");var s=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,i);return this["_toArrayLike"+("le"===t?"LE":"BE")](s,a),s},i.prototype._toArrayLikeLE=function(e,t){for(var n=0,r=0,a=0,i=0;a>8&255),n>16&255),6===i?(n>24&255),r=0,i=0):(r=s>>>24,i+=2)}if(n=0&&(e[n--]=s>>8&255),n>=0&&(e[n--]=s>>16&255),6===i?(n>=0&&(e[n--]=s>>24&255),r=0,i=0):(r=s>>>24,i+=2)}if(n>=0)for(e[n--]=r;n>=0;)e[n--]=0},Math.clz32?i.prototype._countBits=function(e){return 32-Math.clz32(e)}:i.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 8191&t||(n+=13,t>>>=13),127&t||(n+=7,t>>>=7),15&t||(n+=4,t>>>=4),3&t||(n+=2,t>>>=2),1&t||n++,n},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;ne.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var r=0;re.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){r("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var a=0;a0&&(this.words[a]=~this.words[a]&67108863>>26-n),this._strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);var n=e/26|0,a=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<e.length?(n=this,r=e):(n=e,r=this);for(var a=0,i=0;i>>26;for(;0!==a&&i>>26;if(this.length=n.length,0!==a)this.words[this.length]=a,this.length++;else if(n!==this)for(;ie.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,r,a=this.cmp(e);if(0===a)return this.negative=0,this.length=1,this.words[0]=0,this;a>0?(n=this,r=e):(n=e,r=this);for(var i=0,s=0;s>26,this.words[s]=67108863&t;for(;0!==i&&s>26,this.words[s]=67108863&t;if(0===i&&s>>13,p=0|s[1],h=8191&p,b=p>>>13,m=0|s[2],y=8191&m,x=m>>>13,g=0|s[3],v=8191&g,w=g>>>13,V=0|s[4],T=8191&V,S=V>>>13,k=0|s[5],_=8191&k,P=k>>>13,M=0|s[6],I=8191&M,N=M>>>13,E=0|s[7],O=8191&E,A=E>>>13,C=0|s[8],H=8191&C,R=C>>>13,B=0|s[9],L=8191&B,z=B>>>13,U=0|o[0],D=8191&U,q=U>>>13,j=0|o[1],F=8191&j,X=j>>>13,W=0|o[2],Z=8191&W,G=W>>>13,K=0|o[3],J=8191&K,Y=K>>>13,Q=0|o[4],$=8191&Q,ee=Q>>>13,te=0|o[5],ne=8191&te,re=te>>>13,ae=0|o[6],ie=8191&ae,se=ae>>>13,oe=0|o[7],ce=8191&oe,de=oe>>>13,ue=0|o[8],le=8191&ue,fe=ue>>>13,pe=0|o[9],he=8191&pe,be=pe>>>13;n.negative=e.negative^t.negative,n.length=19;var me=(d+(r=Math.imul(l,D))|0)+((8191&(a=(a=Math.imul(l,q))+Math.imul(f,D)|0))<<13)|0;d=((i=Math.imul(f,q))+(a>>>13)|0)+(me>>>26)|0,me&=67108863,r=Math.imul(h,D),a=(a=Math.imul(h,q))+Math.imul(b,D)|0,i=Math.imul(b,q);var ye=(d+(r=r+Math.imul(l,F)|0)|0)+((8191&(a=(a=a+Math.imul(l,X)|0)+Math.imul(f,F)|0))<<13)|0;d=((i=i+Math.imul(f,X)|0)+(a>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(y,D),a=(a=Math.imul(y,q))+Math.imul(x,D)|0,i=Math.imul(x,q),r=r+Math.imul(h,F)|0,a=(a=a+Math.imul(h,X)|0)+Math.imul(b,F)|0,i=i+Math.imul(b,X)|0;var xe=(d+(r=r+Math.imul(l,Z)|0)|0)+((8191&(a=(a=a+Math.imul(l,G)|0)+Math.imul(f,Z)|0))<<13)|0;d=((i=i+Math.imul(f,G)|0)+(a>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(v,D),a=(a=Math.imul(v,q))+Math.imul(w,D)|0,i=Math.imul(w,q),r=r+Math.imul(y,F)|0,a=(a=a+Math.imul(y,X)|0)+Math.imul(x,F)|0,i=i+Math.imul(x,X)|0,r=r+Math.imul(h,Z)|0,a=(a=a+Math.imul(h,G)|0)+Math.imul(b,Z)|0,i=i+Math.imul(b,G)|0;var ge=(d+(r=r+Math.imul(l,J)|0)|0)+((8191&(a=(a=a+Math.imul(l,Y)|0)+Math.imul(f,J)|0))<<13)|0;d=((i=i+Math.imul(f,Y)|0)+(a>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(T,D),a=(a=Math.imul(T,q))+Math.imul(S,D)|0,i=Math.imul(S,q),r=r+Math.imul(v,F)|0,a=(a=a+Math.imul(v,X)|0)+Math.imul(w,F)|0,i=i+Math.imul(w,X)|0,r=r+Math.imul(y,Z)|0,a=(a=a+Math.imul(y,G)|0)+Math.imul(x,Z)|0,i=i+Math.imul(x,G)|0,r=r+Math.imul(h,J)|0,a=(a=a+Math.imul(h,Y)|0)+Math.imul(b,J)|0,i=i+Math.imul(b,Y)|0;var ve=(d+(r=r+Math.imul(l,$)|0)|0)+((8191&(a=(a=a+Math.imul(l,ee)|0)+Math.imul(f,$)|0))<<13)|0;d=((i=i+Math.imul(f,ee)|0)+(a>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(_,D),a=(a=Math.imul(_,q))+Math.imul(P,D)|0,i=Math.imul(P,q),r=r+Math.imul(T,F)|0,a=(a=a+Math.imul(T,X)|0)+Math.imul(S,F)|0,i=i+Math.imul(S,X)|0,r=r+Math.imul(v,Z)|0,a=(a=a+Math.imul(v,G)|0)+Math.imul(w,Z)|0,i=i+Math.imul(w,G)|0,r=r+Math.imul(y,J)|0,a=(a=a+Math.imul(y,Y)|0)+Math.imul(x,J)|0,i=i+Math.imul(x,Y)|0,r=r+Math.imul(h,$)|0,a=(a=a+Math.imul(h,ee)|0)+Math.imul(b,$)|0,i=i+Math.imul(b,ee)|0;var we=(d+(r=r+Math.imul(l,ne)|0)|0)+((8191&(a=(a=a+Math.imul(l,re)|0)+Math.imul(f,ne)|0))<<13)|0;d=((i=i+Math.imul(f,re)|0)+(a>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(I,D),a=(a=Math.imul(I,q))+Math.imul(N,D)|0,i=Math.imul(N,q),r=r+Math.imul(_,F)|0,a=(a=a+Math.imul(_,X)|0)+Math.imul(P,F)|0,i=i+Math.imul(P,X)|0,r=r+Math.imul(T,Z)|0,a=(a=a+Math.imul(T,G)|0)+Math.imul(S,Z)|0,i=i+Math.imul(S,G)|0,r=r+Math.imul(v,J)|0,a=(a=a+Math.imul(v,Y)|0)+Math.imul(w,J)|0,i=i+Math.imul(w,Y)|0,r=r+Math.imul(y,$)|0,a=(a=a+Math.imul(y,ee)|0)+Math.imul(x,$)|0,i=i+Math.imul(x,ee)|0,r=r+Math.imul(h,ne)|0,a=(a=a+Math.imul(h,re)|0)+Math.imul(b,ne)|0,i=i+Math.imul(b,re)|0;var Ve=(d+(r=r+Math.imul(l,ie)|0)|0)+((8191&(a=(a=a+Math.imul(l,se)|0)+Math.imul(f,ie)|0))<<13)|0;d=((i=i+Math.imul(f,se)|0)+(a>>>13)|0)+(Ve>>>26)|0,Ve&=67108863,r=Math.imul(O,D),a=(a=Math.imul(O,q))+Math.imul(A,D)|0,i=Math.imul(A,q),r=r+Math.imul(I,F)|0,a=(a=a+Math.imul(I,X)|0)+Math.imul(N,F)|0,i=i+Math.imul(N,X)|0,r=r+Math.imul(_,Z)|0,a=(a=a+Math.imul(_,G)|0)+Math.imul(P,Z)|0,i=i+Math.imul(P,G)|0,r=r+Math.imul(T,J)|0,a=(a=a+Math.imul(T,Y)|0)+Math.imul(S,J)|0,i=i+Math.imul(S,Y)|0,r=r+Math.imul(v,$)|0,a=(a=a+Math.imul(v,ee)|0)+Math.imul(w,$)|0,i=i+Math.imul(w,ee)|0,r=r+Math.imul(y,ne)|0,a=(a=a+Math.imul(y,re)|0)+Math.imul(x,ne)|0,i=i+Math.imul(x,re)|0,r=r+Math.imul(h,ie)|0,a=(a=a+Math.imul(h,se)|0)+Math.imul(b,ie)|0,i=i+Math.imul(b,se)|0;var Te=(d+(r=r+Math.imul(l,ce)|0)|0)+((8191&(a=(a=a+Math.imul(l,de)|0)+Math.imul(f,ce)|0))<<13)|0;d=((i=i+Math.imul(f,de)|0)+(a>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(H,D),a=(a=Math.imul(H,q))+Math.imul(R,D)|0,i=Math.imul(R,q),r=r+Math.imul(O,F)|0,a=(a=a+Math.imul(O,X)|0)+Math.imul(A,F)|0,i=i+Math.imul(A,X)|0,r=r+Math.imul(I,Z)|0,a=(a=a+Math.imul(I,G)|0)+Math.imul(N,Z)|0,i=i+Math.imul(N,G)|0,r=r+Math.imul(_,J)|0,a=(a=a+Math.imul(_,Y)|0)+Math.imul(P,J)|0,i=i+Math.imul(P,Y)|0,r=r+Math.imul(T,$)|0,a=(a=a+Math.imul(T,ee)|0)+Math.imul(S,$)|0,i=i+Math.imul(S,ee)|0,r=r+Math.imul(v,ne)|0,a=(a=a+Math.imul(v,re)|0)+Math.imul(w,ne)|0,i=i+Math.imul(w,re)|0,r=r+Math.imul(y,ie)|0,a=(a=a+Math.imul(y,se)|0)+Math.imul(x,ie)|0,i=i+Math.imul(x,se)|0,r=r+Math.imul(h,ce)|0,a=(a=a+Math.imul(h,de)|0)+Math.imul(b,ce)|0,i=i+Math.imul(b,de)|0;var Se=(d+(r=r+Math.imul(l,le)|0)|0)+((8191&(a=(a=a+Math.imul(l,fe)|0)+Math.imul(f,le)|0))<<13)|0;d=((i=i+Math.imul(f,fe)|0)+(a>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(L,D),a=(a=Math.imul(L,q))+Math.imul(z,D)|0,i=Math.imul(z,q),r=r+Math.imul(H,F)|0,a=(a=a+Math.imul(H,X)|0)+Math.imul(R,F)|0,i=i+Math.imul(R,X)|0,r=r+Math.imul(O,Z)|0,a=(a=a+Math.imul(O,G)|0)+Math.imul(A,Z)|0,i=i+Math.imul(A,G)|0,r=r+Math.imul(I,J)|0,a=(a=a+Math.imul(I,Y)|0)+Math.imul(N,J)|0,i=i+Math.imul(N,Y)|0,r=r+Math.imul(_,$)|0,a=(a=a+Math.imul(_,ee)|0)+Math.imul(P,$)|0,i=i+Math.imul(P,ee)|0,r=r+Math.imul(T,ne)|0,a=(a=a+Math.imul(T,re)|0)+Math.imul(S,ne)|0,i=i+Math.imul(S,re)|0,r=r+Math.imul(v,ie)|0,a=(a=a+Math.imul(v,se)|0)+Math.imul(w,ie)|0,i=i+Math.imul(w,se)|0,r=r+Math.imul(y,ce)|0,a=(a=a+Math.imul(y,de)|0)+Math.imul(x,ce)|0,i=i+Math.imul(x,de)|0,r=r+Math.imul(h,le)|0,a=(a=a+Math.imul(h,fe)|0)+Math.imul(b,le)|0,i=i+Math.imul(b,fe)|0;var ke=(d+(r=r+Math.imul(l,he)|0)|0)+((8191&(a=(a=a+Math.imul(l,be)|0)+Math.imul(f,he)|0))<<13)|0;d=((i=i+Math.imul(f,be)|0)+(a>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(L,F),a=(a=Math.imul(L,X))+Math.imul(z,F)|0,i=Math.imul(z,X),r=r+Math.imul(H,Z)|0,a=(a=a+Math.imul(H,G)|0)+Math.imul(R,Z)|0,i=i+Math.imul(R,G)|0,r=r+Math.imul(O,J)|0,a=(a=a+Math.imul(O,Y)|0)+Math.imul(A,J)|0,i=i+Math.imul(A,Y)|0,r=r+Math.imul(I,$)|0,a=(a=a+Math.imul(I,ee)|0)+Math.imul(N,$)|0,i=i+Math.imul(N,ee)|0,r=r+Math.imul(_,ne)|0,a=(a=a+Math.imul(_,re)|0)+Math.imul(P,ne)|0,i=i+Math.imul(P,re)|0,r=r+Math.imul(T,ie)|0,a=(a=a+Math.imul(T,se)|0)+Math.imul(S,ie)|0,i=i+Math.imul(S,se)|0,r=r+Math.imul(v,ce)|0,a=(a=a+Math.imul(v,de)|0)+Math.imul(w,ce)|0,i=i+Math.imul(w,de)|0,r=r+Math.imul(y,le)|0,a=(a=a+Math.imul(y,fe)|0)+Math.imul(x,le)|0,i=i+Math.imul(x,fe)|0;var _e=(d+(r=r+Math.imul(h,he)|0)|0)+((8191&(a=(a=a+Math.imul(h,be)|0)+Math.imul(b,he)|0))<<13)|0;d=((i=i+Math.imul(b,be)|0)+(a>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(L,Z),a=(a=Math.imul(L,G))+Math.imul(z,Z)|0,i=Math.imul(z,G),r=r+Math.imul(H,J)|0,a=(a=a+Math.imul(H,Y)|0)+Math.imul(R,J)|0,i=i+Math.imul(R,Y)|0,r=r+Math.imul(O,$)|0,a=(a=a+Math.imul(O,ee)|0)+Math.imul(A,$)|0,i=i+Math.imul(A,ee)|0,r=r+Math.imul(I,ne)|0,a=(a=a+Math.imul(I,re)|0)+Math.imul(N,ne)|0,i=i+Math.imul(N,re)|0,r=r+Math.imul(_,ie)|0,a=(a=a+Math.imul(_,se)|0)+Math.imul(P,ie)|0,i=i+Math.imul(P,se)|0,r=r+Math.imul(T,ce)|0,a=(a=a+Math.imul(T,de)|0)+Math.imul(S,ce)|0,i=i+Math.imul(S,de)|0,r=r+Math.imul(v,le)|0,a=(a=a+Math.imul(v,fe)|0)+Math.imul(w,le)|0,i=i+Math.imul(w,fe)|0;var Pe=(d+(r=r+Math.imul(y,he)|0)|0)+((8191&(a=(a=a+Math.imul(y,be)|0)+Math.imul(x,he)|0))<<13)|0;d=((i=i+Math.imul(x,be)|0)+(a>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,r=Math.imul(L,J),a=(a=Math.imul(L,Y))+Math.imul(z,J)|0,i=Math.imul(z,Y),r=r+Math.imul(H,$)|0,a=(a=a+Math.imul(H,ee)|0)+Math.imul(R,$)|0,i=i+Math.imul(R,ee)|0,r=r+Math.imul(O,ne)|0,a=(a=a+Math.imul(O,re)|0)+Math.imul(A,ne)|0,i=i+Math.imul(A,re)|0,r=r+Math.imul(I,ie)|0,a=(a=a+Math.imul(I,se)|0)+Math.imul(N,ie)|0,i=i+Math.imul(N,se)|0,r=r+Math.imul(_,ce)|0,a=(a=a+Math.imul(_,de)|0)+Math.imul(P,ce)|0,i=i+Math.imul(P,de)|0,r=r+Math.imul(T,le)|0,a=(a=a+Math.imul(T,fe)|0)+Math.imul(S,le)|0,i=i+Math.imul(S,fe)|0;var Me=(d+(r=r+Math.imul(v,he)|0)|0)+((8191&(a=(a=a+Math.imul(v,be)|0)+Math.imul(w,he)|0))<<13)|0;d=((i=i+Math.imul(w,be)|0)+(a>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(L,$),a=(a=Math.imul(L,ee))+Math.imul(z,$)|0,i=Math.imul(z,ee),r=r+Math.imul(H,ne)|0,a=(a=a+Math.imul(H,re)|0)+Math.imul(R,ne)|0,i=i+Math.imul(R,re)|0,r=r+Math.imul(O,ie)|0,a=(a=a+Math.imul(O,se)|0)+Math.imul(A,ie)|0,i=i+Math.imul(A,se)|0,r=r+Math.imul(I,ce)|0,a=(a=a+Math.imul(I,de)|0)+Math.imul(N,ce)|0,i=i+Math.imul(N,de)|0,r=r+Math.imul(_,le)|0,a=(a=a+Math.imul(_,fe)|0)+Math.imul(P,le)|0,i=i+Math.imul(P,fe)|0;var Ie=(d+(r=r+Math.imul(T,he)|0)|0)+((8191&(a=(a=a+Math.imul(T,be)|0)+Math.imul(S,he)|0))<<13)|0;d=((i=i+Math.imul(S,be)|0)+(a>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul(L,ne),a=(a=Math.imul(L,re))+Math.imul(z,ne)|0,i=Math.imul(z,re),r=r+Math.imul(H,ie)|0,a=(a=a+Math.imul(H,se)|0)+Math.imul(R,ie)|0,i=i+Math.imul(R,se)|0,r=r+Math.imul(O,ce)|0,a=(a=a+Math.imul(O,de)|0)+Math.imul(A,ce)|0,i=i+Math.imul(A,de)|0,r=r+Math.imul(I,le)|0,a=(a=a+Math.imul(I,fe)|0)+Math.imul(N,le)|0,i=i+Math.imul(N,fe)|0;var Ne=(d+(r=r+Math.imul(_,he)|0)|0)+((8191&(a=(a=a+Math.imul(_,be)|0)+Math.imul(P,he)|0))<<13)|0;d=((i=i+Math.imul(P,be)|0)+(a>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,r=Math.imul(L,ie),a=(a=Math.imul(L,se))+Math.imul(z,ie)|0,i=Math.imul(z,se),r=r+Math.imul(H,ce)|0,a=(a=a+Math.imul(H,de)|0)+Math.imul(R,ce)|0,i=i+Math.imul(R,de)|0,r=r+Math.imul(O,le)|0,a=(a=a+Math.imul(O,fe)|0)+Math.imul(A,le)|0,i=i+Math.imul(A,fe)|0;var Ee=(d+(r=r+Math.imul(I,he)|0)|0)+((8191&(a=(a=a+Math.imul(I,be)|0)+Math.imul(N,he)|0))<<13)|0;d=((i=i+Math.imul(N,be)|0)+(a>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(L,ce),a=(a=Math.imul(L,de))+Math.imul(z,ce)|0,i=Math.imul(z,de),r=r+Math.imul(H,le)|0,a=(a=a+Math.imul(H,fe)|0)+Math.imul(R,le)|0,i=i+Math.imul(R,fe)|0;var Oe=(d+(r=r+Math.imul(O,he)|0)|0)+((8191&(a=(a=a+Math.imul(O,be)|0)+Math.imul(A,he)|0))<<13)|0;d=((i=i+Math.imul(A,be)|0)+(a>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,r=Math.imul(L,le),a=(a=Math.imul(L,fe))+Math.imul(z,le)|0,i=Math.imul(z,fe);var Ae=(d+(r=r+Math.imul(H,he)|0)|0)+((8191&(a=(a=a+Math.imul(H,be)|0)+Math.imul(R,he)|0))<<13)|0;d=((i=i+Math.imul(R,be)|0)+(a>>>13)|0)+(Ae>>>26)|0,Ae&=67108863;var Ce=(d+(r=Math.imul(L,he))|0)+((8191&(a=(a=Math.imul(L,be))+Math.imul(z,he)|0))<<13)|0;return d=((i=Math.imul(z,be))+(a>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,c[0]=me,c[1]=ye,c[2]=xe,c[3]=ge,c[4]=ve,c[5]=we,c[6]=Ve,c[7]=Te,c[8]=Se,c[9]=ke,c[10]=_e,c[11]=Pe,c[12]=Me,c[13]=Ie,c[14]=Ne,c[15]=Ee,c[16]=Oe,c[17]=Ae,c[18]=Ce,0!==d&&(c[19]=d,n.length++),n};function y(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,a=0,i=0;i>>26)|0)>>>26,s&=67108863}n.words[i]=o,r=s,s=a}return 0!==r?n.words[i]=r:n.length--,n._strip()}function x(e,t,n){return y(e,t,n)}function g(e,t){this.x=e,this.y=t}Math.imul||(m=b),i.prototype.mulTo=function(e,t){var n=this.length+e.length;return 10===this.length&&10===e.length?m(this,e,t):n<63?b(this,e,t):n<1024?y(this,e,t):x(this,e,t)},g.prototype.makeRBT=function(e){for(var t=new Array(e),n=i.prototype._countBits(e)-1,r=0;r>=1;return r},g.prototype.permute=function(e,t,n,r,a,i){for(var s=0;s>>=1)a++;return 1<>>=13,n[2*s+1]=8191&i,i>>>=13;for(s=2*t;s>=26,n+=i/67108864|0,n+=s>>>26,this.words[a]=67108863&s}return 0!==n&&(this.words[a]=n,this.length++),t?this.ineg():this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n>>a&1}return t}(e);if(0===t.length)return new i(1);for(var n=this,r=0;r=0);var t,n=e%26,a=(e-n)/26,i=67108863>>>26-n<<26-n;if(0!==n){var s=0;for(t=0;t>>26-n}s&&(this.words[t]=s,this.length++)}if(0!==a){for(t=this.length-1;t>=0;t--)this.words[t+a]=this.words[t];for(t=0;t=0),a=t?(t-t%26)/26:0;var i=e%26,s=Math.min((e-i)/26,this.length),o=67108863^67108863>>>i<s)for(this.length-=s,d=0;d=0&&(0!==u||d>=a);d--){var l=0|this.words[d];this.words[d]=u<<26-i|l>>>i,u=l&o}return c&&0!==u&&(c.words[c.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(e,t,n){return r(0===this.negative),this.iushrn(e,t,n)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26,a=1<=0);var t=e%26,n=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var a=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(r("number"==typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(c/67108864|0),this.words[a+n]=67108863&i}for(;a>26,this.words[a+n]=67108863&i;if(0===o)return this._strip();for(r(-1===o),o=0,a=0;a>26,this.words[a]=67108863&i;return this.negative=1,this._strip()},i.prototype._wordDiv=function(e,t){var n=(this.length,e.length),r=this.clone(),a=e,s=0|a.words[a.length-1];0!==(n=26-this._countBits(s))&&(a=a.ushln(n),r.iushln(n),s=0|a.words[a.length-1]);var o,c=r.length-a.length;if("mod"!==t){(o=new i(null)).length=c+1,o.words=new Array(o.length);for(var d=0;d=0;l--){var f=67108864*(0|r.words[a.length+l])+(0|r.words[a.length+l-1]);for(f=Math.min(f/s|0,67108863),r._ishlnsubmul(a,f,l);0!==r.negative;)f--,r.negative=0,r._ishlnsubmul(a,1,l),r.isZero()||(r.negative^=1);o&&(o.words[l]=f)}return o&&o._strip(),r._strip(),"div"!==t&&0!==n&&r.iushrn(n),{div:o||null,mod:r}},i.prototype.divmod=function(e,t,n){return r(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(o=this.neg().divmod(e,t),"mod"!==t&&(a=o.div.neg()),"div"!==t&&(s=o.mod.neg(),n&&0!==s.negative&&s.iadd(e)),{div:a,mod:s}):0===this.negative&&0!==e.negative?(o=this.divmod(e.neg(),t),"mod"!==t&&(a=o.div.neg()),{div:a,mod:o.mod}):this.negative&e.negative?(o=this.neg().divmod(e.neg(),t),"div"!==t&&(s=o.mod.neg(),n&&0!==s.negative&&s.isub(e)),{div:o.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modrn(e.words[0]))}:this._wordDiv(e,t);var a,s,o},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),a=e.andln(1),i=n.cmp(r);return i<0||1===a&&0===i?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modrn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var n=(1<<26)%e,a=0,i=this.length-1;i>=0;i--)a=(n*a+(0|this.words[i]))%e;return t?-a:a},i.prototype.modn=function(e){return this.modrn(e)},i.prototype.idivn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var n=0,a=this.length-1;a>=0;a--){var i=(0|this.words[a])+67108864*n;this.words[a]=i/e|0,n=i%e}return this._strip(),t?this.ineg():this},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var a=new i(1),s=new i(0),o=new i(0),c=new i(1),d=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++d;for(var u=n.clone(),l=t.clone();!t.isZero();){for(var f=0,p=1;!(t.words[0]&p)&&f<26;++f,p<<=1);if(f>0)for(t.iushrn(f);f-- >0;)(a.isOdd()||s.isOdd())&&(a.iadd(u),s.isub(l)),a.iushrn(1),s.iushrn(1);for(var h=0,b=1;!(n.words[0]&b)&&h<26;++h,b<<=1);if(h>0)for(n.iushrn(h);h-- >0;)(o.isOdd()||c.isOdd())&&(o.iadd(u),c.isub(l)),o.iushrn(1),c.iushrn(1);t.cmp(n)>=0?(t.isub(n),a.isub(o),s.isub(c)):(n.isub(t),o.isub(a),c.isub(s))}return{a:o,b:c,gcd:n.iushln(d)}},i.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var a,s=new i(1),o=new i(0),c=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var d=0,u=1;!(t.words[0]&u)&&d<26;++d,u<<=1);if(d>0)for(t.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);for(var l=0,f=1;!(n.words[0]&f)&&l<26;++l,f<<=1);if(l>0)for(n.iushrn(l);l-- >0;)o.isOdd()&&o.iadd(c),o.iushrn(1);t.cmp(n)>=0?(t.isub(n),s.isub(o)):(n.isub(t),o.isub(s))}return(a=0===t.cmpn(1)?s:o).cmpn(0)<0&&a.iadd(e),a},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var r=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var a=t.cmp(n);if(a<0){var i=t;t=n,n=i}else if(0===a||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return!(1&this.words[0])},i.prototype.isOdd=function(){return!(1&~this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){r("number"==typeof e);var t=e%26,n=(e-t)/26,a=1<>>26,o&=67108863,this.words[s]=o}return 0!==i&&(this.words[s]=i,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this._strip(),this.length>1)t=1;else{n&&(e=-e),r(e<=67108863,"Number is too big");var a=0|this.words[0];t=a===e?0:ae.length)return 1;if(this.length=0;n--){var r=0|this.words[n],a=0|e.words[n];if(r!==a){ra&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new _(e)},i.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var v={k256:null,p224:null,p192:null,p25519:null};function w(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function V(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function T(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function S(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function k(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function _(e){if("string"==typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function P(e){_.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}w.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},w.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},w.prototype.split=function(e,t){e.iushrn(this.n,0,t)},w.prototype.imulK=function(e){return e.imul(this.k)},a(V,w),V.prototype.split=function(e,t){for(var n=4194303,r=Math.min(e.length,9),a=0;a>>22,i=s}i>>>=22,e.words[a-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},V.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n>>=26,e.words[n]=a,t=r}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(v[e])return v[e];var t;if("k256"===e)t=new V;else if("p224"===e)t=new T;else if("p192"===e)t=new S;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new k}return v[e]=t,t},_.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},_.prototype._verify2=function(e,t){r(!(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},_.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(u(e,e.umod(this.m)._forceRed(this)),e)},_.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},_.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},_.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},_.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},_.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},_.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},_.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},_.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},_.prototype.isqr=function(e){return this.imul(e,e.clone())},_.prototype.sqr=function(e){return this.mul(e,e)},_.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2==1),3===t){var n=this.m.add(new i(1)).iushrn(2);return this.pow(e,n)}for(var a=this.m.subn(1),s=0;!a.isZero()&&0===a.andln(1);)s++,a.iushrn(1);r(!a.isZero());var o=new i(1).toRed(this),c=o.redNeg(),d=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new i(2*u*u).toRed(this);0!==this.pow(u,d).cmp(c);)u.redIAdd(c);for(var l=this.pow(u,a),f=this.pow(e,a.addn(1).iushrn(1)),p=this.pow(e,a),h=s;0!==p.cmp(o);){for(var b=p,m=0;0!==b.cmp(o);m++)b=b.redSqr();r(m=0;r--){for(var d=t.words[r],u=c-1;u>=0;u--){var l=d>>u&1;a!==n[0]&&(a=this.sqr(a)),0!==l||0!==s?(s<<=1,s|=l,(4===++o||0===r&&0===u)&&(a=this.mul(a,n[s]),o=0,s=0)):o=0}c=26}return a},_.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},_.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new P(e)},a(P,_),P.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},P.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},P.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=n.isub(r).iushrn(this.shift),i=a;return a.cmp(this.m)>=0?i=a.isub(this.m):a.cmpn(0)<0&&(i=a.iadd(this.m)),i._forceRed(this)},P.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=n.isub(r).iushrn(this.shift),s=a;return a.cmp(this.m)>=0?s=a.isub(this.m):a.cmpn(0)<0&&(s=a.iadd(this.m)),s._forceRed(this)},P.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=n.nmd(e),this)},30228:e=>{"use strict";var t=Object.prototype.hasOwnProperty,n="~";function r(){}function a(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function i(e,t,r,i,s){if("function"!=typeof r)throw new TypeError("The listener must be a function");var o=new a(r,i||e,s),c=n?n+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],o]:e._events[c].push(o):(e._events[c]=o,e._eventsCount++),e}function s(e,t){0==--e._eventsCount?e._events=new r:delete e._events[t]}function o(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),o.prototype.eventNames=function(){var e,r,a=[];if(0===this._eventsCount)return a;for(r in e=this._events)t.call(e,r)&&a.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?a.concat(Object.getOwnPropertySymbols(e)):a},o.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var a=0,i=r.length,s=new Array(i);a{t.$o=171008,t.qO=339468,t.ee="eNqkvQmYXVd153vuuVPVvTXcmqTSfOpKtmVbskaXJMvYugU2Tuj3mi8vL1++9/X3ZNmSwSXjoSxseJ9iF1gy4oUEhZhEBPIiGhLUEAUxBTkhIIiTVhN3EMMDAaYRgQR3QkDBdMeAg/v3X2ufc4caNCDZOvuss/faa6299tprrz3caNeDr8lFUZT7x9yK2+NHH41uzz+qf3P8z2vuUXvnkdM/BdJ8KOrBs2RPEhHfwgupsqeyjGlBx/LI7ZFV8ohX8Aj/kuwOZVSqkqVVpKv5IUUsqh4JxD1ihD5iGR/xP8IQknop2oszRnW5R6L4Q3FX/uE7XrVw586H77j73t2v2nPvzrsf3Pnae3fvuevue/fsjor6urjl6313TO65c9/O3VP33b9zas9dUawMS5ThVTsf3HPPXTs33LFl16Ztezbt2rbxzm2bt90ZdSvHMs9x59Tr7993385t41vv2rBly8aNW7fs2bj7rvVezZWe51V79v3Srnt33/eaX9l1z2v3PLhz16bdmzbfsfmuPXs23blx6/g2z7zcM0/teeC1d0/t2Tm+fvPWTVs2b9x6/aaNu7Zs2hTl58F41/V7NmzeBZ13bt2zbdv1u6OcMl8RMFrOW+++557/4/X33rlz9/V37N64e/z66+/afdfG68d3kfej+Q/nc4ND0XCUy5UquahciXO5fBTl40JcLhWrpRzwqNpVKpe6yiPFXCEq5/LlXFcUlaOoiobl4q4oF+UKPZTJ5ytV8itV6MnF5VxUiHLFaEGuDDRfWDha0ZO3PNBSFFMuKuejGDSCUTJXjEGZ6y5EXbl8UXAIiCKl+Mj/+VIpjhZFfC4BjnMl/hapL84VQaAC0eLY/kTF/oiPUbREKKElzvG3J5+v5cVfvisqqL6oUCqCNtcPQbmoV50GzHEZoniPCvluaIyEJ1oqpkvFckmcliE8N5CjbK1Y6h2QxGCBz6qHF7gqUSHFomVxnC/Eue7e7jgGxif4MRpzRaTQnSdV4v/8csRL+XyUL5AB1Ppj/ZgKKVPs6+vLFxFYoZi7P/eKV8ByNFTqpvs1pqdPRdXyW8vXlF6z5zX3Tb0+jgb3vG7fzjvuvn/TNnTm3j1Tu/btiV463ASiunvu3Yfqvz763dxoG/w1d997Nx3gzqk9+6LbB9o+PbiHjjTcgvuhXffcvVu4f6km4J7dO++auu81nu+xXDXAHrz7VfdGK3vD20N7pu6+6/XRgH29455de/dsvCO6tl9vr37Nrjt3PvjqXahntLYNcv2GjdHBnKHYu+fOO3ftVZaHW96V4R25igD337EXDY9+398etJ4abfAXx/1b4ZPj/aNcl972PXzf66LVI/Zhz53377z/tXfsvPO+19w/tefBB6P35IbaPux53f30ruhIzoRh4Cbn/7cJw4BTe+68D4aj7UaqgUwa6xfb+9TO3UjjoT0w8fr7d909tfPVu6Z2R+NzfHzwvrv2Rcmi9o9Qc8/dyEjfbvKKp1po+RUTMyCr9honYypthJGe8L7rVVN79kTb7PWhqbs8d6UvfQ3Ze1ZOvfbBfeICKe7dsPOh9Ts379yAlO7dp5yojHThULxq3my79zyI5r0++v14/az5sNi7XnvPvp0Yrj2v2nXPzjt33XPPHbvu3LvzrnujD+avm7fMnqmp+6Y6SqxoMfq7du82Rd6nr/ffdzcUTUV/kO9vyXKXJHEwP9ACeg347rszOh0PtgBh1qDfi4dboHtedy/Y75vaE/1uvvutGKVGrvqLJ/OH8x/I/4/c7+WP5L8eH8k/mf/t/P/zQu7J/Nfi34yfzN/7yifyJ/IfwhjfuvPJ/ENP8n3zb+Z+zPd35v84/288t/5fJ/IfIcfvkO/J/HH+fzL/Z5Rc+mT+z3k8nvuD3AmseZrhG/GbKPRU7uNAnsx/O/ex/J/mpz6Y/2C+8vUjlQ/nn7spd9ujSZREq+Pb65UknhyPb0+iRjI5dktSadz8wFglvyOJG6eipLK3fvMv3FLYkVSSWyaTXHJz7c7FXvBX65XG6D6yd+3D/LxQfmBK6Yca0z/LP0Bq9KGpqXpeGf/DRWQsNBY9nBQafQ8/yL/5hx6cVMGXXURBiFkdJxeRcVQZV11Exj6R0mek9Bkpk0m+0f8w//QCyjcqgOpFYbvxIrCNKOOOi8i4QNUusGoXhGopufkiSm5Sxq0XkXGzqthsVWx2IeetkldeRNl1yrjmIjL2KOP6i8hYETUVo6bSZPi2ekklSy0lSYeSfFLJ9cq4+iIy9qqKXquiV1UkfVRSUGMWrDEL3pglQUoGKTmkLEjZIGWHdAnSZZAuh3Qbvb9cr4qMagsZpAMZfBIZ14uM642M642MdZNJl5X+dxdReoNKb7DSG6z0+smkPJksFnixgRcbeMFkUppMRgQeMfCIgTfD8WSySeBNBt5k4Mpkcv1k0iNwj4F7DNw7mWyYTIpitmjMFp3ZqiBVg1Qd0i9Iv0H6HTIgyIBBBhwyJMiQQYYcMizIsEGGHbJQkIUGWeiQRSJqkRG1yIjKC5A3QN4AUD4wmawTeJ2B1xkYyvsnk/UCrzfwegMvnkyqk0m36um2erq9niWCLDHIEocsFWSpQZY6ZJmEAb6i4SsaPsQ5NJksU95llneZ510OYrJ2W9ZuyzqAvnUJ2GXALgNCI2jLApcNXDYwNC6lCQUuGbhk4OJksmQSQVDbIqttkde2QpAVBlnhkESQxCCJQ8YEGTPImEPqk0iZGhZaDQutBmodm6Q5AA8beNjA1JrAqcBDBh4yMGq/AvELPGDgAQOjz4sQv8D9Bu43MIq6EPELXDVw1cAo6vBkslzkLTfyljt5KwVZaZCVDlklyCqDrHLIFYJcYZArHHKlIFca5EqHXCXIVQa5yiGrBVltkNUOuVpEXW1EXW1ELRNgmQGWGQDKr6BRBF5q4KUGhvJVNIrASwy8xMDoxMrJpK566lZP3eu5RpBrDHKNQ64V5FqDXOuQNRIG+JYbvuWGD3FeOZmsUd41lneN510LYrLWLWvdsl6Bmo0JOGbAMQNCI2gTgRMDJwaGxmtpQoFXGHiFgZdPJtdMIghqu9pqu9pru06Q6wxynUPGBRk3yLhDtgiyxSBbHLJ1EilTw2qrYbXVQK1bJmkOwFcZ+CoDU+s4nAp8pYGvNDCKeh3iF/gKA19hYBT1asQv8CoDrzIwiroa8Qu80sArDYyiXjWZrBV5a428tU7eRkE2GmSjQ7YJss0g2xxygyA3GOQGh2wXZLtBtjvkRkFuNMiNDtkhyA6D7HBII7kxuSHZmKxJrknGkhXJwmQo6U+KybpkAT6VeSVL6y/Xo1YfbSx+OBltjFB6tFF+2L2g0fqEHsP1lwB9IJlgoGwc+eaxJwqT9UF96KnfNlnHnPcko5NJb/KSyaQvmZg03C958AH+Jy28FcNbMbyN33rzN95cnqy/VAi66rdOMmxTgOyjZO9R9h7L3uPZP3Tohc8X9tZfpuyF+k2T9V6y95C9QvZeZe+17L2e/eunj304t7f+C8oeQVu9BnW9ZO8he03Za5a9FrIf+Ppn85P1X0xuBetNU2BNbjKPYbmoHjKqK5LG4GS9D67BkYyIV8a2nmQTcNI10Pcqj9APGvpBR/8v73nqc8VJ3KRK0jcFZj1B3yf0fYa+z9G/FDFM4rHVkkGQ1YCMCNmIIRtxZM/85A3fL+2tb6ZikFVgyZD1CFmPIetxZC9DSGJ8MBkB2eCsjH/gM7/5vuJeWgHpQJCQ9YKsV8h6DVmvI/sFZ1x8g2xkVjafff+3PhWrjXpFWQ/SmIPNXzQ2cRcGNWLW5E+MaJBc0ML4AqFfYOgXOPo3/OlvPJGbxN82xnvnZnxTxviCORn/5K//9bvjSZzKCzG+OWNcyBbMyvhf/vRDx2jf9Rdk/GLa90d/9uO30zE2XJBNb1+kWJAu5tFN8OKYLGhp8ZlSfOO7Dv64vBeGLsT44sk6XaKPlhHjavE+IeszZH2O7Ks/fOu70cURagcZjPMEWV7I8oaM2YqQrZusYy3gJJPizC7+lt8//Fx+b30BSArGOE+QFYSsYMjwloVsPbMfGQDQgaxvVgPwqT9+29cxAIsRThGCHtATZEUhKxoy/Eoh22Bs1nCH5HpWkx48ILx0RDmfwfjJ+cffCPo+aAR9QbQK/UzGMRgwXmoxDyUhKxmykiP76z9//GeRpGOMF+dmfMQYL0OgkEl9ykJWNmRlR/b0X374KIrde0HGFxjjVZCVQVYCUhWyqiGrOrIfnH3vD0BWuyCbKAts4ld2y4ssyzkuySPrJ10FfZk8/ULfb+j7Hf373/yFL1Js4IKM0wNhvETz9IOsOqsUn/niZ/6eTNULMk4PhHFJUcj6Z5Xi137rHz5OJ+y/IOP0QDjoapFil5B1GbIuR/Yn33j8k/SSoQuyWTM28W+75BKX5eeV5AV3k+4KUuwW+m5D3+3of/u5k5/Ehg9fkPEBY5x2SbpB1jWrFE+eeO5Fxlk1yfyMV41xSVHIumeV4pPTv3cQZNULMt5vjM8vxd949sXTmIf+C7I5ZGyaFPEpy3JjS5rvzC/FJ7/xrS8weKmR5md8OPTo+aT4+b/+T+NMNS/INy0SOvTcQvzuF977boa9gQvyTYvA9/xCPPj2Z/6CDq0WmZ9LWgQuTYi48WX5tyV57vML8eRnvnce9Oo28zNOG1mHnk+IL3z9Q/8dGoYuyDgtEjr03FL87d879w5qVJPMzzhNcsEO/aV/+E/HShdjt2iStEMzkyprTlHSjG5+Kf752499BONzYUtGI12wQ3/hn3/0L4z3F7ZkNMkFO/RP/+jj37soS0aTXLBDf/NPpv/xEuyWSZE5VlnzuJKmVfNL8WMf+Z1Pgf5iLdn8Ujz83z//zxifi7Vk80vxG8/87VOXYMnml+J3P/jR5y7BbpkUmdeWk7WSIlPZ+aX4zHPv/BvQX6wpm1+KP33iP38zUpNcnCmbX4rnT73/MezixZqy+aX4O2/87f8Ksos1XCZFYgnlZJukSPhgfikeOvuNfwH9xZqy+aX49Pff/WcY2Ys1ZfNL8WM//swfUuPFmrL5pfiRd5w/bT7lxRkupHiNAibXWMDkGguYYCY3TiZbFcTYakGMrSHYK2+ynGyXuIntzC/uz37p7/4nnC+8SJs3v7g/98Rzz8D5xdq8+cX93Def/DQjx8XavPnF/f2Dn3wv48Sii7RwiHuNxL3GxL3GxI09vYFwnMDXGvhaA2NcUeyZAfaZQfgBb5cdahfFuOdtlx/89dv/CoJLFxTlwiDKZrvMFOX33vrfvsrAtvCirWg5a5eZonz+p99+B8gu2orOy+bj0wd+wih5YZu5yNisJi9n9XMpa5q3XZAXdKeTpnaSTXadNbUT4kasA3V7zcZnCapYS0smKLZWGrLWNGStaQgDB31x5oLLgALu1ZaGmzmpfPsfffIbDMwy8NRA/JGoWzEpGQ88bRkN4kpGHMth4pvMeTJ3kfklkLiWUDAEXWcEXecriUw+GyKnYeQ0jBxXTuakc3bIN598xyGmKBogwD8M/ptgF2JMWiJmpg6QuUDmApmvI3wLIRuNkI1OyI2zyEWLFtJAEaLp60wN/M3f/LOncQrKiGB0Euw1sFe84UpZw81UIYkwSuLk5r1jsRbHJ8dyjWis0pOrVpO4uWges2herf7edfE1j5RYdm8cZjRak0RX57diPnispx9FjZNA116dj+pX8HKEl+v0cvX+/fWl+5OlEz/+zPPv/K33fOT816ODE8mb60sn3vq2X3/T186+8ezXol8j0nLFwYnVb66P7K8vS5YenFj/Zvr54v2seo8cnMi9uV5XNavrqPnV+USL5o0TVLBOFVyZrNFjFfWM7IdYCvzTTx7/2qc+9j8/vcJqWj7xgfNf/NEHv/+Jj9+4v54kV1pFS/Zrcf/q/O31HAXHlHy1ytcJcpMe9Rpr9ZVUdUzsqo6reDnEy3q9XEO5FfuTFRN/cPbHX/3Mb33tje981KpbMfFXH/r/v/q+Dz7x9FMwVk6usvoK+9mnAD0w1mXZuoW/y2uO6ivAfBTMG/SyWrDpXP1aaliwXy+ncsmCgxOfP/h7P/jJ55540+ddggsmDr3tud9/8ekfH/jHaD8r+qutong/0RsyU1E1KQLfX++zDz37icSA6zbhzCfLLUs+SfbT65aYkJfQ3mR4ZX05FVvyV+vJ/mQJkfhKUrU6R/fXyQu2yn7QjxqOwQRh9icVxxFKvo6slGRvRlK0D8VkmeD3k0NtzNd8ssxwLpM5pDn2S30NOW9kN+SxZTFVNjSECIVmR30ZaAqJsVJISparlAyAJhV3r6CmR2DmvwH7MLQfywpT3UnNvnYnfQgo6THkPXSfEfAWk4X7ZUwC1n5ByJEKMcUr6aYlJYFF+4n6mRMYSK2iwqJymVPZbfjyiKQMr3wwlN3763EC1WoNy1CVPAwDQUVku5/RZ/l+AZNBy1AWzeSgcK+IL1thEyL/OaGDIoh+V0mG7WtFshlIhgzvECSsAG+crNwvagJW44ccrkVDGV6D0xCUBD7shYYhp9dgXUQ7lxq2uj6gB2mLmdwLYsYb1T6KGMvSSxZEYpLqS8bA0J3kJClcoM72REh9He1J+/GBHMMSPLG9oPM0RY8EBd5ByBk1yujZcdaexg85nM/B9vbM+OyHJAqpPVMqc8mQUUm3Bxi6hFqW3qAOPld7mgjAUIDPxNoTjSh4M5vkodmVASE12xOU/OftiQ4OiYve0J5EhKWKKDV4B6Czbnyitx3t6WoPP4ytc7QnQld7Nqlk6cOoXCwqrZnBV4Bn+ETyzqe1J1SDkn9ntKdsSDfa29ae0HyB9kRvh1VvVYrYbE8aF7z90Cn5xcLb0Z7kcD7752jPITVbzOplk8oBk1q3Gvqy23ORSQo7dGntid4OqSN1tGdTb71H0e872rNFb+dqT8TX3p791guC1l1me640SaFfl9ae6O2wSnW0Z1NvpSfqpZ3t2aK3c7Un7LS356BJrVv24LLb0zUfVbm09kRvTcE62rNTb62rtbVni97O1Z4MV+3t6XrbJXtw2e2pcSVo/qW0p9lbWqujPZt6q3E5jASXZm+HvFO3tmc/miMq6QWX3Z7S2y7J/TLsLQTNaW/V79VLL8Pe2mDUbm81+gUrcpntKU+jW6gvw95S75z2VniDHbpUe2t+Qru99VHenL/Las8cro8khdwvw96iBXPaW2la0NtLtbfmJ7TbW/WCLnXcy25P+WfBkl2yvcUwzmlv3U+gxS/d3ppz0W5v1QvCKH+Z/VP+dpDUJdtbSs1pb93vs6HwUu2tKUG7vXUrQi+47Pb0kck8x0u2tyjYnPbW/XgbCi/V3ppw2u2tjwo2q7rM9lQ/6lIPvwx7i7bPaW+lJ7K6l2FvTW/b7a28jmBFLqs93Q51y8Rdhr1Fwea0t7KQYVy5VHtrzkW7vZUd6lZDX3Z7uqTg8zLsLfXOaW/lZwU//lLtrQmn3d66FTGv7TL7p+xFtyzKZdhbBD+nvfVxxfT2Uu2t+Qnt9ta9cPTnsttT9qJLFuUy7C12YU576368uaqXam/N+eeR0TmK5soSFfYb0NtzNGtPJ5U0dsZQ8i8Z0KlMVgvgVLqf329AlzwbBPfXSVIYLJg5K7wgKQElXmQfiKzUxMXCrEUXSjpJ0FzFpqVrNA072wzriPhZoMZII1dEICnHd8GdI+BVD1MYMUAWobXyrRbLdi+ivsWGbRH8EmRbyAdDSHpZssgQ8q+pz3KCOgsNx0KUQHJiXFpIaxLSI8NChfRIUpjEEmU1LpYrH9ri0RiFn5JVBzFkixRnzUmSRtUSs0D03EXaVRloikO0bHFCwIkY7VhK25KUNkoB3ZLnaJXH49KesgqM1x7ky3SOePdKjfhW0wjxQOkifXYE6j1Uu1Ay4zvIV/Ipo50qR5KrCc4uT5LQvkUbUTEFuWSxIsaUzvGuRqE0LNVVaZSsJ0Pd0OQoQYYVyTX+ZS0sXnEQua0SSgOt0daAgygdDAbQOspfeRAaV2agDdC7+qBX66DqD9fFxUdHH1kZNc4v21vvXhWxmnOMTc2Knb8vppm6V8d/XKnnxuOPVvztWKUej8cneGscJSO9OMv43ko9Px5/ImQ8WqkXxuOTyniEjIQls4zvqtSL4/FTIeORSr00Hp9SxsNkpHdnGZ+o1Mvj8dMh4+FKvWs8Pq2MZ8jIrLT2+qR7bXSmUtgRVVUPS369jahxLqq9M7cYwPMAQvZGbqqe42SdztGRk01n1aRS+3sqapxl355/Gsux5fnfPvGXUaOv9hdKP33ss1FDmpGvvUtZn2URiS3bjTO5gIedjjFbOU/7u6j58MgN0d8NKb0ud2Jke+4cUcvGr/8FOCu0UtHxnGRToxZgy7XvE1wkQ4rwkDag0t0qtbuB56j3FqCn2WJeqb2gkoe0SsiazCkrAMpQtNJ4E2eRG921t2FuGoeVLqoxRydrb5HRRRgDrJocUiXJePwWPU8vYU2H3O+0ktT1SSwwDfqL4pRvvNVu4/t7/XssTDLbRSPq0NJmjuPKUfYclcbb9cZo1Dg5YLVXGh8VhOWxxrOs/lkuSKN8mW+fMFpr/8XkC0wrRrna7zopB3JAz3Nupfvq/KHF9b6JaOKf/+ubnvzy736hPBHVTqjMNGtvgn/t9B98+2tf/n4uhZ8CTqnDi+v9s5Q6HEq987Nf+erPXnwxg58Brvyd2A6zqAa2I4vrtVmwHQ3YXvQ/GfxcwNZZy1GwCU9nLee8lqOL6wOz1HKirZZ8Cj4fKums/ESopLPy88CFvrPyEyzXUfmxOcSsja0zKz8VKumsfBpkqqSz8lPAZ2utM214MvSHA5pO9GcCmhmCbcufoTkXsneiOd8Gb2Z3hTtfQnXe+cLn3/ahj/7n+JGs8GMun/d95bt/+O0jTQYoI/gb/uZjf/uvf/WTUsaw4zpVxmPgOc0IVlPiDGP3AIMpyXMlre/0T2w+xPvQLx9XRyhNsqSmXmsJrahN9Dx+AG9mVoJMwzsIOhwI+vFffDHKmhiY8nYSOe1EnikzMqrPQOSgJXAARiwBtaNKnCCxyBgqMcBB9mKRjRvwKyL7tJPNgg2vTIMMeNaBtWTYWDtdDqwdssR+/iQLQKIEy6vG5cCsXFrP6+DyaOColcvzHN5T3k4uzwGXuMv4JuplcImhJgGX1jjnSCwwCFzipaACOEmYStqtxEFDZgcrxO7yZIVxdihldxGcjSaLDHjSgSPJqL0e8VdOJ/hrV3hdYsI4mwrjSCYME8jSVCCJC2RwVoGYkegQyInAfKtAzgBT3k6BHHWBnC+zXqy2RSDW2ieQg7X2eRLW2idwz5egTmsely8iAILh5CU6Q2KFCa/IqjD+dl0SGkvqxu6zxcDuYthNteR5By5IFtoru0r1SjzPi7iEhpJh/5q+LvOOkQrsWJvAEFmSimxsPpENzSKyU0E8rSI7DEx5Z/SUAG/Ja72hi5V3qUmqStMIzFTpFImFqKgkZ5p0CoGZ/h0mkZi2FXE3kdwVktyq5ArnO5XcCvhOFe6sA5cmy13V/HVJspRXfGAHdhswVcfnXX6pOp5MX1eaOJ9PxXmyXf/6JoZNmCTHUrkucbn2NaW5hTHZ+T/c7WpxBv7NcpyBbY78GNumStNwu0gLidS7LEm8Mzj9zCXcevirq0mqHaednVQ7DqWvdTcmzg5wSwSS+5vULzHqzXrC1OZDnQwcDgyc6/YOfxS6+9EG0T2sdbKWnn3I6XNRph36rBPEGo4RdMRfgWcEIQUnJ5g5NHMOYo6ImCHq9m54Hlpq0CC72W/dgZUF7wVpLccsAeoBqyMZ9Br656rhqGroS2pg4VCbq4DjGnIEGoX278+Kb8EdkJiXyVfLN84c+HRU+zBuKU66u2a5eV2zeA7XDPg8rlkoNcM1Az6ra8Z1CvO4ZgHbDNcsYJvhQYBtVtfMa5nLNWurpemahUpmuGahkhmuGfBZXTMOv8/jmlFqNtcsVDLDNQPZrK4Z8FldszY8TdcsoJnhmgU0MwTblr/pa4XsM1yzNngzuyvc+dyluGaUmdU1c1yn4mCyieq4a8aMPHXNcjNds1zqmlnislyzQFCbawZsVtfMiTwTB9fMQoxKEKRw1wxq3TUj4a5ZbjbXzMnucM0cmLlmcWpNLfHzumaBozbXLJrDNQMuccfBNbNAohJw6a4ZCXfN4NIs9f2pZ5abzTNLuW3zzByYeWb+mnlm+XbPLJXFkUwWP6dnxoHfGY4ZbM/mmHHwSEoeB78MabhfhhDcLyPhfhmRzja/bH1wy14ZvLLbZ3PKotmcMgdmTpkLJ3PKXDiZU5a+BqcsldWxNln9XE7Zjr0zfDLOq87iks3qjuWDO5aqzzRycneMRJs7tiN4Y8RYzRlLZvHFVs/mirm8Ulds62yeWKHdE3OhZZ5Y+ho8sVSGJ9v17ZI9sULwxGDdPTE4bvPE2HXZ6YiNtvthzlqHH+bMZH5Y+hr8MGcGuCV+Dj+sEPwwqJ7LD2v1aDM3zOnJ3DB/BZ7Rc/luGKTM4YaltRyzxM/nhjmued2wQ7hhOF8tbphCZSRoAM7O5mu7CZl91Wyvjn42Ti0VTsV+kYhBTrZADhvkRAvkhEHOtEBOGuRsC+SUQc41IeaYLEUB6UZKnyZ9bBm0peHWSu0rIul5zpcTtwxhVjbgT+f1tUgI0FOlrESPSlRrjytMeNQuETq/qEnBMYM83wI5YZDpxU2aYksdUVT4MIfbYWqkmf2QQU63QKYNcqoJESMnR7bknxeGo/b1XEv+YwZ5tgVywiDn2zGcBcORHokRAitZ9PkQ4ehzxJVrn6flVsdvqSAQnocqnOMndn0nm9ohrzJZe6sEcCpNnEwTJ9LEuWg8ngZ/QoD+BShNCM0bxdPExyu134lZ1ZDxqziN55dNroqqH1sZX/PoMsX8p9l6HxPztxvorm786LNv+GpprNT48NcO/U15rLvx/dNveEd+bFHj789/+tdLY4ONythoSFfCt8Uh75JQdih8r4bvS8P3ZeH7cPjeE74vD99XhO/c2iYDvH2sAU1mdOs3jk0k2ycY828deykJRsKXj72MBNbtNm7Nu7G+pn7d2Ebf9L5l7CWUM1tW3zp2U7Klvnns+mRr/eaxHb5dfcPYNjKY+aiPj92QbKivHVuXjNfXj23i4r1RTg5sYp1l0/u45uk49mXTRHKI9MjxieTxA8nGg3UDNGoPMyzv8G9lfaOEgKuSHUCuOH4gzdjzMOF1Iv2GwBALtIIro44fSFYdT1Ya4jR3l9ByUChDCYAByDAm0FNoy10GEeeT6wURqgs91lF3j4andU7Zcqf6loN1A4jAkeR6/5ZYFesM2JtcD6RLVHtGSGSbfUBgiAXS1SXQ0Ut1gQ7PDZEjoiNDCaCXEyjCmEBPPs1tJOsWAqdr5DgS8E9GlAswQ9QFVQKBqM/Z72nLLYp0PsZFW1BuSVsNdyDp6sRtkkwmLS85eU24XeH4gfr1SDXDvFEkWp6yC9Eo1pURZcmVFuEdwXhD0HpIo1UU0gsWoAzDFUG6NF8QhLdHm5Ah14VMfQai9XvIfUVTNTIhr+TShRYRX4GIoX9HAmmZiAPNxw+MbUo2pi8q4GwdQNfXM+Svp72XHWfoXu/aMOz8XHewbgCRXU5u9m/GKyVcU25ONcUzGhOcmTIEhlggxqigKabJWW6oZm2+BWWrpkBPyobnRtTL7LYOEbqWFbG11F09jr+11ilb6lS/7GDdACJwONns3xZYFWsN2JdsBtIvqj0jJLIIGxAYYoFYKRyDjj6qC3R4bojE5WlBCaBPRznBmEBPMc1tJOu8qNM13NQOI8oFmCHqhyqBQFRz9qttuUURd9AF0eaVW9JWwx1I+jtxmyQXuH6Qk1f2DEg/NiPVDPN1mX5zliwVcpW7vWRElqpFeEcwoYeiWX1topBeqDt6/3Tp0nxBEN4ebUKGXBcy9aX9s+r9M1WNTMgcDnH6XcRdiBj6b1b/zETc1O/1yXWZfpvkXb/X4oDfQGsvOc7U5AbXhSHnZs3B+pqUi0Jyk38zTpM1QU9ucj1JbkizGhOs+BoKUJMREAujQVNSi+y5oZp14hakrZoCRSkbnhtRs2VB6gKplWQbdVeO44Fvc8oWO9UvpdVSqoeSl/i3MauA1gRYS14CZIAatqVZIRHPPaAANRkBcRtYnVw1qkvVIaV6SHRkSAEQHXCcULSwVXmExQFgybTDTY2JMEM0kGBNAYHoSme/0pZbFOnQpou2qNyStpruQDLQidskOeb6QU5exzgzjX68BKk2MWf6nc/Ug1rqZkQWq0V4RzChh6JZtbYmkWaoO3r/dK2g+YIgvEVaVGOh+qcLOR9Ug9aveP+cRTXokE3FYGoj+jl22RRxqhjoNzfXZfptdLt+b8PFG6e9u4/r/L1rQ8m5mWjhIp9s9W/GaeCklmwNmjLexgSHaw0FqJ2J7kxTUoucMcFh2xakrZoCRZ1saMOX1AVSufHMKGVmvMEpW+RUN1r0ezDZ4t/qLfp9ZbIFyFXUsKFFv1frELGhALnrN2xcQ64rmRF26veg6MiQAriSo96GE4pWt+k3WBwAlkw7jGSnEESuHxsMUE8RqUHackPRtZwzD6JdqPyStpruQFJvEum5oame6gc5TbBXST+2INXk2jRvpt/Fpn4PcpOjjMiioN8IJvRQNOvKTv1GQQ1G/3StoPlEP9x6i7Soxmr1TxdyMagGrT/o/XMW1aBDNhVjwOnfqv6ZirhFv8ddDzr1e4O8hi5PX6cByAbLAzj8WNt+T69RxzUjc4AZAaIc8DQHttMmY/qAd32FpzfKUTOn8gDzhdFGbu/YaA8/eKCLtr9D+G3EjhJbAHKFJ58hudyTXyI57EmF6pZ58mmSSz35FMkhTxKwWuIpzkIv9gPKPePxr/Kojse36YjheLxV+ynH4808usfj9TqQMR6v4TE4Hq+mqGKmmzRbiy1IvN6TigHfYMlkHTNKdmcla5lw67ltS/51PMa35O/nsWFL/tVihvw7vKhi3zd7UuHumxzL9VvyZ1V685b8aT1fsiV/Us+tW4gi89zCFJ6nLZ5sDOSQvC6QQ3KNI7oFcmKeL4McPV/KlFkIJrYQoufZ2JJ/NmeTMq6kHOPUtR52f2ZhjAO33II5ZleJ94wtsbs4x4bs0s2xql3QObZUzFDbjYGZZlJLSCGptZerfVYnwNU88QQiJokEbuRN3hSv4nX9TezzjJPbborPQmnjGUrdZh/Fx8tvik8L+jTQl2fQW2+KTwr6CaC3ZlBEf0zQH8WTE9P6E28xOJPwZwWfZhb+PQmD34fQFe/nYw6nj2qCSQTg5UwyY+a2nHevmzA4XtzoMelwDh8ulOICgkbBUsvJTFDVcodsOnPt2Zguh2xXk411CWXLhWwrqd6zESMK2VYJm2crhWxX6PpuS7H9MWRDTIoRK1t3yNZrYTeltIvLs9kt89HYgiSnRy4p6cG2Lz0IRSiIDZ54siZp6bb46JZeS61q1F5Oiuihz/snxyNdudDj0QDedOPBco8R8KYrB5Z55IA3tTjb4Voxj2aYl6aYOYAcsHIcNGBkI1rA1s0NhY6JkHIrplqGaTjFtJQpuGMqMOo4piqTScdUwj90TOxfasXUlWHqSTGt4Coxx1QmKuCYVnGnhGPiqLxhGoUmWShdZaCVvVVRf7Vajap/Phb3PRpb2GbV3nqFsE1FgVqV1H7JSlLRveYEhH7Z07dp1+YryYRd0ja9NM/L6v3j8X/w9I56TQaqQvTatvWleW6sD4zHuz29tY5pup08LF9wL0uWZ3Mdu3ePp9fXMZKvJg96jX5kedZoQyj30Su9WvtG79feSa6mwyTU3pdrJGOK/klPiAwmtY/F8Y6Ov4+q6CqUOqHjND7NVkECU90EmD6rZE/jC9EYvxaAtJQvGZNQ/mPvZCO6AUlWGtH23FGuzJW+EOOyGpRvKdh6iUGa5qyLpPqVxhcsUzy5NgqFf8g91GxjzABJYXvujK4UoAjJ89wdcX2E1WqsmNwQRTa+6FrhiNCZHlWzYVG/OvPqaGisT4+FMBytjfJV+m6+8c3oFbqsQjte6qx7ynhVtAWw3pW+sImgXggvepzpAkgcsN6b5iAWWGdx1F/YultnGSTLfhTJu4onk9ieTADDLgB2X0rlubV/8urISnH1DvnDiwwCVtVfSjxlv8Gl5QEHcieAxsXw1subVkX8rZIscnqJxUYMRkbLIe5sLQc7TdiXt67s7Xkufiykb0lFe0kYRIb5cpQ7SiuN88OTtd74UQbuytroaG8j9/JeFftbrp+AqbXRe3q93dhWZvtKj3NLZVdKTOOtQKUKH9XdlYJa3o/i0Wh/6imgtEto6Mq66N2923NPK0xduTr6w152gYNRe1V19yz2jR3QaO7a6L29GDxny9qljTVrnFb28LatjVqZPEpstpPJdgbfxvJ7xt5CBJay9KIJLGXle+xizlhovF+t3snQYVhNGVKdibPy7IBlgd/tuWO1wJa6xAchqTer4BhvWduJ9OkyrSqZ/jF3sOebla1GOOPxsaFGjn7ZiIko0xlM184sIrTNrmqGILMDjcJU46mwffmzBqQXZjz8tUHohhnkMwaBtwyiVXMjLZPzxw0C6SnhYu3M6PYcjo6lzy/cnnsqpI/Vtue4pMRbAqng9LDd2TDAVFbL/2cQGiKDsL7sbZrV+1aD0CaZwF7AOlu7tIrmGFbzaKj9cH577l2h9vPDdtTA8jyL9X0dPgM7oW8xNyJ5+dRUr7o+W10IjWj/Of057AAfvSn6J7XWD9gwMYqTcqNXJYFaxV/go2o7TfOeUZoN6l8MsKeAfcnSkrZl/7Jei+PRd/XsG4++rWfPePRNPavj0df17B6PvuLFaBIr9sOA8RQYzytduiF6TmS9AFnWTpIUflKl8Rhb6Kydmi3EClJuS/wj5X+rfaUNWqV2NDce/brGirfZV9qjRbeRIbqtr7/N14I30HssI42SNce7DOIbA5yQJwTRBgJ//aBloNWyVv6AIKvj12lcNoWtxy3HA/AW/XgA54m0rZ9ej5EpZLv54RrzwuGtcDwAWtdGn+26IfoJNsNapGt77vlS83jAYDLgeLQZejgZssMBMgltSI/RtbtY57sbxBoQbShUocIkBv51Ivj8cCN3Kz4HQwsTPD3VRU1fTW1S3XHcnJhYbQcmMGEjk9nA0kweayaPNpOsn1HytJ+1qEzktuRPjfjzCM/GWWLhHJcidUSHHWqMnI3zzChNjTk20Q0Lgp3By8TVCW/HCLdpDV/5i2wy+xSTJ44VfCqeqj2Wb7yYe0CMyWKLciFHGhk3J7gW3FjOIBxRgQi0wYzrWTwP+VQIIPtnsZGIwIN845ZzFEx6/BwFA0Q1nGSQEsjka3uS9Uf9SzMXaqsC04yhnImI01MTXV7ukI5whB2EYYgwCPtJm0MEHgf/2kKwQ46Qp9AchGHIANkQDf8GyAZwtyUF7DtjjY8O+cMSrA8v56qTTDFdNqdYjy1mbwhgutDI1b5lDkJXvciPTxmk8Z3PfNZ+T4Af1EqiJfzkXk/JvK0e7JMsRXxCTlEXv58jD++jowzQXY0X83JtimPdGgI0K3C/L27k9tGHpM6FVywh1bWPpHaJPZDEt9KVaHMmTb+wRI9HHqi9N+ce4JlFjIZ2sRcvX1qk40NWq7UpxFG5qk6K5gkGoI85X1o01tXIQUGximPmh26+EIuoLqZkXWFKFnq36yiLEhxI2cVH1kXxZ21OJ32JJ40hVQGrJ0dB0i0384boc4uMmnP9zPe+5JR9jtlCfNbTSH88lvNoUjClr30Aa4+Ts2gi90uI+i2PnbLZlOaKXT1FVTFNq4T2iOqxtQeQOdsDoTrrXFg4XanxuwuNE5gKQDb5VkDC3apRxrkaWe5FMNMVhufcWDeiSGmjR7XS1kuTJN23UnturKC2RSy4XGW1b3ksD7mRC51+p0/7WDIr87fnF5bwe044mY3cK5Ycn5iuPFIffZ8NUK9s5NXqeJvWzJV7mA50LannaG0f/UJbY8cGnEylvzdgsuEXLo3b8wNy9g2c10lRJqNqVoVXdP0eAtCOAi2Ea0oKxbQcv5xpfyH2GWP1BUbrOAwG3zHIARbwAwQJxD8a3oICqQAWgk0J1jjUhyH/3CIRoCjOWbU9J9O+pCd6cWYRYorsx9uulvppMufSrf1QGESl6TJ5T0k/RrfETwVT2GKLjyzKTO3hZvJQMzndTB5rJk80kyebyVNZUgb6KJTq+fyoNcj70CUmqA36HTwVMbOTY2zPiMcKqEXhFuwtdmCvuYQafFx9H03w7BJ1gKL1pG4xXFQ+2UtyBFU6FffAcAGkr+jNS3/WRBHzuegXfeqD0ni+o3H6qfbv0TnvkDrUnGvkHsJM3dO0XE6EiuZrD0q4oPvfzVduRScFYyTfC0aNG2AVA02so/sao6+dF/c+fiegqUF7YVXGCZMQNEnSRhLPxSHN2CX/UdL5oPriKRI/VMJzhdqZsGe1+fAc2Rk6jWhR20m6KD1JB4aCjT9RepKO1u8NI9IpG9pbR5aTBmmOLCKqZVRJh4hjLDzJMkF01HIKzwZhggqH8nS8CKU3W1SW+ivFDk5tPoH2NEHo1BNM/jzBnNAT06uIXyRd1W8Nx2U/Z3qUO0LZc4Ii5NZEKxrRbbQbcUaNoGqTdByLdTaAoRttaII0zqrlsvEQ39hSh+RoMN15H7obPXADTwW6cN5iyaVe1l71WPt1tS/oWLHePWMTNRm1J33G7mdmu8ApdaJYZ0o9oxSbQ61U+2Zn5sHAlb8TG5tMhe1ksV6dBZsifcLWvhfawkqGrbMWtmEmwtNZC7s1VcupYr1nllrYYNhSS9hZjXhCJZ2Vs0/RKumsnO2MidB3Vs6uR1V+eg4xy2OaWTn7B62SzsrZZmiVdFbObsRZW4vtfi14MvRsBzQ0nejZNThr87GfryV/hob9frO2D51rNokqIoskns+hOrNtezX5tG17hSJt956xyRWGHdfpWLcWcOCCjVAMI2wxY2uUfkSK5LM5XQNQ0cZVZm5sKox1PEObCi1k73vVB9Kto7MRZBreQRC7pI2g5g5bmlhz3VmI1KxYNMXsP+B5xC71VEL3TlgCajkPTQcgMWwM5VjCguwRke2bOW3RQmTzUze8cjWFAVnUEJAbE4011gKcNRYm0h2eA+kG2YXOZc+sXFrP6+BSUXFx1MolO6JNlzq5VGhc4o7ZTit7Apd9loBLa5xndW2nQeCSS0O4VlRbcNVsObbeci+D7cznBgNjjIUe51YbTH2HtS3W+M58bde3dSG9cn2Fv/p2WzZ9mCxYInFZsF7Tund4YceG4d5Z5WE2okMeBITFeqs4sO7WJzrFQcxXSh6z71wNa4colEAI1tTP2x5sQXwPtm3pXSjAVm1E5vmr2orN89XsXOaihmUSzlLbi4wG+17kXtslm+oH62G+u3/QXj24wJq9DjVQxIXD3gv/mr6OepdIZcWyUftedd+i3DzpMLu0Zh4wsYioiaZVXDhAM8+c2DJB+8kP/tIL8ux2kn6kKnQIWZkKnSYxiGpKaKZCt2kXN0+7xYLnavYBIjRttGeFQdu5Y0L1LjPt70+1jFHaN3VrD7VWK5u7/X1PNzoXtiAHFeScUKsKcpzIX5ebHFmacDmyEteqc93NPd/ZUYlwQKa7dQv08zZmYxK04VtGA9bNWJy17dZV49gUyI9U2rGMUdtZr3B2cwe4h6CzgxypUhAOaVUKTiv5q04s8DWlnhl8c796pUl72CMucwlLtoO7jfxp4jbW1wvew4/ZTck9RjUnh9r6Mi5MJse0B3PsydtIO8npuP4KvLlfvZruV3ezhj7OQcsh0aIzIN7znocUbQaWnaxYJyC05Lqf1oI76fvVe3y7ea/XUJmrhsOqgZt7wFK1Xeu0vx+G9OMJSC7dr27FiQEprsW5Y8IhWFKeuWzXOrM9Nqpr5/qh/C24fxCEwhe3RPJDmYXZIgARt6iBF17MXjiqX/IXZqLMwVh+UJQO2ZW0rfkvh+LYXcxpXMw8bmfe4m+4lXL/8jo7i6cb+wtuIZPGXO1LepFDlBcJ9eIMjyVvTpng7a4GKHA1KHW4WKdzzyglx1Cl2j2LvHlZyt+JTY4L2I4UtRI0A5ucU2Frdzzy5hgKW2ctcqeEp7MW+TXUwoFjlphm1CIHuVlLcGMgLVTSWbkcQ1XSWbmcLaHvrFxeEpXjf88mZvnZzVqyyuXiqpLOyuUYqpLOyuWizdZacrybeDL0cmKFphO9HMPZmk+edTN/hkbu6GztI194FonKMUQSJ2NUZ7YxxuTTNsZAUWic9gGFKhzXobx+FMa9EU7qumOoX9IgiWPIrVMljRDMJem9+dQx5DxG6hjKutDtZ/dUTcM7CJJHKoKaQxmtBUx5O4mUYwghOAmDpuUQyX0zbvTZxy03UGZT9JPgl/fkIeJVQbaMH4O3rLhuvTGymf/yyk1BBgyOIb8zYKy5RVfvbzqGbt/gcsi57JqVS+t5HVzK/RVHrVzKMVTeTi7lIUncOk+qJoFL7hPX6C6DLObsfncJAC75GUVzDPkVGnMMR3QRuoYdXdFljAXHkIvK7eSRBg64Sr1FGXaOAoXTqOYkI4twDssMfj4dpPOdjuFQh6PcPas8zEZ0yEPOr3hvlYfcH+XtlAeeodo4xrtT49tMRS1rTo6kYCO9PpmTUwxDPoBXy9nhibPDPWi60J+Ta3iLko6fAoNVH/W7kwFYTRUkeIb8FKm9Bre5mvS67Hz8Yx3LZefS4a557xPuGSL3Ts8w86NH5xPXzNlTXn60JNMqLUXGZhEWjmH7BIS7ljSn0C/daN4XVEiOoanQsyS4289kZiqEN21qp2vY9FytA8NyZpGZn0vMB8eQK+RgONWy4D1xb5+9Bod7MJwTljOFWH2wT3UweCupDgbPsMf8TRomlWM66QxSLDa9q9FUoDqDh0CLrc7GWXaOm1bkXRk0e3RroWv90D73sQDQYWosGciF4rpMo8U9wwHzvPLBy3XlSHUiOEGpTgTHkGvujPgwW0AsLcQj5oz0cLTPnLGiu0pt1J8L1J8ueA/XZJBVByOaLf1tfdkdQxdj1oPDmUI7bY4M/RWZNx3DcuoYBretey5anhUtmjuEjof89FMrspP8cBHV8aOvVktwlhFOqAWCza+TN0cNpblqOK8aikkZLIT8DVeYRbgvjeRSx9CKm9+vSF/qDLLNBGcQPs2JOzAY59yJO6EfyzEnLoTtIo2KxPtIsCOm6RZpgiBLlWRQeRLk61J8RSNU0yEjb01WvplXTpyygaDp7FCYXTGtheUDas6lPt5SkfsUQtB0MlQuwyb/DGyjijk0scnfBFuimXcTmzxAoc+wyTcRtqYn6sGtJno5k6BPJJEmevkowpwhktcnzM3hGIAQtblywpFhluMiHFkReTgqAp6ml6cibZ6XipCr6UMpR1ZEDqAA5GrzgwiQFX5uP0juiBlKN48afLtSP4i15uAH6f5IGURuEW33g7IAWZ9bpPKsBEH9rB5Cpx8kp0x55/CDjsRh1DfbYGNkcBXkGJidV4AseEa6ghRD53dQuOEIoz6/8gQXLM+1+kFcJOt9euZwZoeJW+3uxY/78uzEUacfNNu4Lx/B7Lbbb7k/5pLKN/Wxy0JmwdszS44fZJ4AfhBz/RAO5Mr5Vj8IC2nzT7eTwRVMx/Iw0uPfuiyceX6KxWTh7k/mHGZDkhvzZoRidnd8Zpx21oFd7t/M0G3mBoWRXOEwls3DeGBDfOoX2a265ibLHWoZ0gmQmTv0ap3XkBdi93oo+JGN11z62zKwBDfIQ2CZz5iNgC4NfqbHv6avPuKE2GLqHrW4QdlVIMFrnF1as3nR8hDbg8jmB83mROvHy2b6QYcKuki3xYPWsGoq5N5kweRpKoTPaGqHH2S+42rcT4Sm6B6ngBQ/Sv2gkgUVUy0L/uRgm+vg0aTMkeaGZFc+F1mqi8FpcF1k46O7QakcfQhvc4A6/coQlW8bWlnUMtZPKsJkDkUwFnKbWXBuapB+PYlBWE4dlx23uEEecspcPNeOVCmC15YpRfqqMGnmFqU+cyC40PSDQlBK5nJWz4ANWUb+2YL3cPmr/JaUUd0Lta192f0gF1/ag4OPyeGhVq8idVWMBPdRMrM2t5dyRLTIb3Qjq+lGFyTITnJNM9VxF7e3WeYHpW3m4czgxmD/56jhqPtBXWaOfYodfGZ31pBchx90jJ3AHohqXueggBVe0Il+vKCF8oLOcUK/gBdUsFMQ5gX1MHze/Cbsgp1oL0EZb13qKAW7CMr8oV5cQ8Aj7i9xF4Heip5Jd1KZI1TjRgzAi7Qpxj9pO5O5OQM0L590S0UopfMWve5sLLAaH6Mz2Gn9hYb7MSmnqedq+iUhvOk8wuZ5TnP9R/anwnrx5sd+DYXoVyHr0RkPZa9IZzy6koHH5CqDtMjT8B3O0w14ntfA3oGvDw0AwxLboG5YdIsXCyr+Y3XtFehaLJYT3EUEvT5V/ZNdy0XEPEOjq68GsBr4zAbQtSqU4amreNhTJA0Kd4yQ8Ctd1Np2YRP6YA63Z3KTwY+h2Wu4bagQ7n0xK9A1cdObUDW1x0TMqfCJm6RnpV85vp+VeFByqw0nqP1SJPe52VqY4vErebxubrTCNbC76D1TuFvGNLMQ7mgh4ff2WN3dVjdXBqvmQa+Zxv9l6mYVHp3guI78YjZV6XcGdYZHb25/6kOv1O4PBKj7zpihDxFhUAOHxtDlaMxBhxIDiEFxQUPCm/YyZvcG2W4rvDW/80huDcLObsQZY1uU3Npm0/vuhlIHBEWmRjV/FW8UOoaC5uPDqOXZnmRdKHQa8qrRuTjdATo9pUYvJ57DbgFjC4vfEOZhJmTnYyrSDNTRaBIhUSmJsOQiZLeZRGgMc2eZYdEVXikWv0NM+pBiKQYsRWGhVczUOBabBDOBCcLW0a7ACoui1qWChtuHKjJXtwg8cCmY/9ReqhPBYUKsRt0Zfbcr7v17uBqsm+/dEntm7kzI/DQRfLZDaH4qDvapzEA62NK1dJotWCWdd660NIDOvAVbNEKpUEBn3oIZYv0rawpu+zIh6howBgzX51SIfmmVmWsJkU3IEiLt4k2B9gdmDwcsujItxRKuA0PdUizeJ9jjJSy0izeFYbGmYDoYmkLXmgWm2ptCxwqpoL0pbtfwHQiSJgUPLm2J++UfhpqkIiHONXtD1GY0RE2qoQVJdGAhLgY09TgxnODplYeAIwew14EcD+IKInKGTJzGwekhk38Xn0xUvVF723hjp1SP3IeMNYSnH1WFALt/jGWwNsFpXaflHiQjdhTygSf6eXS7i6uno82AcjNXb0chbRSV22J7YxEOv9fg3q9JzO/iQoVNcmlD8keY+4R5Cz8gitx87A+3X3WZS4KHZzj8yi+6SYrDVCrg6E1x0MA6oVV9c39cerRgI3Zlb73EiF2SIMPZLAyeHWLSSU9LcxROxz118CY9m2XwpXW2E272NMqlA6I6j5OezTL4sM5U3ejpmnbcbmU5rKidkfGjbHnTFUqcG1lMktMgNzdWvMJeMOKlxmciLcPZ3nbOZGzPsQcrPfJUt23zdhgKe9r4MjbRIGy3Uj57fIkWXh3l7aCgwiTsU5tsbKttauSqY11+WottXfiebBYlC45jehippBBEndmAv+DapWeWcPtxz/ykkdZ1/YgSrPXoiJKdsLOzdL4zrN7jBj/yXWF1TmzoEJJd6cNrn2FkYCLdH9DqNkorVbIQhpUo+VWXnpuMJ40jUciTyEftvynBbrOUYPaiZbRnST3w0UvaSDkt8epcllr8D9lfqN1n+qVebSC0HWjHhZIr6W2z3bNvwOGT6pdrH4Jb9UGuy6r9n0lpbSTR6Rp46I0m2Qx652LalyVPHdiyL9RBtq8UGuWH2BNf+7AjMLzKzZvm384Qk08HyfwaKSlAEQpkBxUIeAdnOSlmvz7OWdGpxrtsf2Kp8SMr5lMAbYotNb5nEL/vzCHfMYi76wbRMu2Rwpb4GS31lgMuaeYnlNKGYTjKaRut8TjxZp2hZT+ikL3rDafoGi8jhWZLFDv21v40ZuevZGAbjdFc++Lf/sSUxbZNV/kR6EOf/jTnUsmUFG+QJJPSOtR2OyffsKyG15XbTni81Ot3bW7cmAlKN5dot3Sp8RZeOAZgLwnVcuK61HjC+KUhnB9T+i40PneLtRDjFtj9OOxtHHfyvlIMRxJKjW9Fk2NsfxQLKmpnHHON/v/N+ox+1yJqLEwPrZQa/8UAvgfSAJ82gO+AtP4pbd8SPYl3pr2PLqF/RX/a0OjK/xSNyZkjhxka6wa5G6IXtVxo6LgI3bXVGa1xFo2NwWjdKXZzuyKKUljj1uhWUkuNz7dARCvwJkSnCD9dNmpBXJagqqZ6v2tr84Y1K63dniIDvBnZtpvTMWeUg/NJDtFZFxRbJZ3Px2I0mWv8s3GbHQlz3dEvglQxeBx6oyh7xoNavF9vLWL4N0Ukwi6EUuOgftM8e3sLb7YFNXAHFVui/6FS6kzKoQ6ba2z2tv8Iuw6i9OW7vNgOBnZKjEcfVK2F8egDTAtrH1fPSc9muNnQr518WeHyYFpq73HrQpDYk7gptaP6ha8I1y1sfjcacrX360fStVsWfS9OclClaav+X33Q2dv3xr0MDdqqzXmA8dg4V9PT+czucLhIncu7Ahmekc3kebbgZegx/NaLIVYZY72tDI9n2EZe1dB3FsNOb1E5rBQGp/Y5kGAWHnRkNI7BNJ715hYzybAXfdpqO4tL+DL+XB2e5yp2UjqqHull8rzIftKGybMvIegItNw1BZ9tRpzFyuVD22RYgXabEWbha814bTKtoLYtCXDo1j+FeXJkawkW3+eeW/+ka6Itts9Vrz5d5hbTUJdv8TiXZ6KXhQ4IdR3+ie4QyHL5DbnNcL5MtwjPCNPkRuRm5GhGLyIzIjSPFWlZ1Zrz2sKAiLaQTZeiEBY46ahfHqvKZvVrOiSCsvrlr4ugrH7N70RQVr/iECIord/2nMQe/5TjboE73c1qgbpzthdUW2l0x7GeFrInobm+BT4127ZgHm6lLW6esttNSTBtWaonrqOF+0+lkXTdj2wBBl2EavstR20nnC20eLjJA6hhJu57Cmz1yF91kagtN3hEKHUE/Y9tlbKNBCD2Of2grUPaqlBza51FhX2vmgfmwq2v/OSpvaa3vtruNluk8tp8MtISKvQNVs24feHxifNBiaLHaM31hyb6HzuANn3+TdPTNJf74xZfMXHcrph6S8DKgly+bbHZ1Jogq+2zplYwRm2fNbVmeGr7pqqFts9UjUmGGkybY/WkKa3hztAu+t2v5r44W/7xKLVHKUNYwu96tTU3l0U6q2tdfrW7W8NOtZabVTt6kwmAabcpHvdFm7pxQ7LOPrv8ffpgSxa+/GNb4LT60LkFDu2yOWnbuqBiB21rXgrTSYLNvuGXpzcFpsm5JJgJjHmCuoViO9JfBGa/R4kMMhVySSwIoVkPh/gqUxoKneXC2Zb45GximY49XD5NhRa3U6DOwjn8/JruFG1tKZ9R8UuXRkAIWtgCUEpA0M/W/ZLZpE3io64wk7Fwq6++hWukbfHOZ1l+721LnNUCpzOpJwqSLG7il8yYi2a7xbXo4tFjXx0KF1T7IomtG3u9Hjloj2hbFFkr650xXk07U8t982OBFa1j2EzRQjSdy937NUm02DqTxPf1xPlHh21xO1y8aschsiNftqfWJxd2GiNNYt5DUg9dMaMpxzkkQVuNDbTF4/ot4jlWs+gw4QSNQFzeYgE8fmlTWTzyqWtblKUy8ejYQo5v5RuVW4llTHBqcqKLg4HbddyL8F5pDGUf6wGmM4IFnfGyDpCzsKvHfvkRwaT4azSCzuz2PVYffiyp7qcsQX59AOThDuA9+ydyj3MlBoHG9BNrm0TaHiPAoU/onf1K4K+NscA1kTvExNUPn/mNKAl3Quj6noS7B87oydxOF/ck3Rw/Ts+X+J1BfkdQrsaeWLNSIQrOGaaW6JPfaxTCG3LBLFJsYUq//SgE2NiK5iEov/2IQ5CC6hfdQl77IQy0LwRXSg6VeyFmQ3grYNCIyn2H5A3ZZBN0mJZ7+B0gMytsI5iiJjZ5AsIWwue1QGXANpJik5USNsIhgTatvim+6VHZlDaLEfHLpR6n6w+0afiXSU6x4TsJ2SBn3O0d+y5cIZYXMlkoiB8H9XidRfDs/h9h6g2YDM2Ah/fMQ/JbmmV9eN6OEvBgGLezLEdz2jjs1snOuRCCtd3hso/sHDd/osdyaNWUeExYm7NDVL7JOQ3M8jn20yDkQictqqy1Hzuh43kzAwQqwjzYLiui2FXYMNNlpsROigT0aRGiQSqisC9FqiriS1mcP7YiIcDnN6c0Q8XaZGBFKiri616cNDTC3HzpuIAXYC2AAspOh4fr9S4N/TConvf7JnS8IxPqCe0Z4ClHysTKGGhbw/XLFiZXxmfbW69Y9Iiq9+1fdjjMa04D0myZNCIVN0MIirr5hkQ7UOd53UmyfYXGV82LKIgXdmmWw6md8BMMdqzIi9S8SL8X0ZpH2NbgexjtGE6oJZVevxcZ9CKKkUtuJj1vVh+udAbDC7CekUqP+0paYomYzdblBExktfWVjRetr/xkautrrS3wikHtaX1la1XrK06YDiHrqiJd7ISZIrKAYa49YBMwi8rYWRUGiuneXOVRnZWs7a0XGSaK2m0QfpKTBSvdz8TM62We3qoYoE7eyvHyX+M0+GbFCf+dp9frpzhvI4/6vGaSr1CJ1fEr2X3PQV9tYNFdeDr5rGCqbewo6h68FMI2/PiXdcWchUbewuRU4RTCIUXFab6nRbqiOgSXySi1erJR8+vNCUyOx1xYJwz51awKC/THTD6J6GheyECyhd8DBfjsPyryc4SkXoqgOlYxvmT1ivoN0drzOT9jrOMEHDzX3LnYOFBiBDVU2kOm2ywc/gKxrgB/SzMLv9jGfUchyxNNOD+Wx2l1hzPKxhxFLzae9jP5dmGLoNrtxgnnG6KjxJckP5YR+MJPmBIn4gC4yUG3wGlVUXFNsknj6ZR2csFki62nz6YX6XhU3G7dy/udasxznST9DqvFoQwX1yexnDhuslIdEpTuF5JcT+AOqARzb/t9h1CRoi/ZG1Sf0bYTXvkFVWILHGsWj/xW3ljMyO4SriPX6emnIl0eoviDTkG/LZced87Vfobp1j/wfD8OAo+jOY3m3GuTo2vxfJ1h9eumcqYBhL65/IpHorPiFhiJFeGAfIXXalxECBncnFxyqH4tVibFfhygcZp7K+R42634vPZN1r6a0+nhxhty/960wbFQVD9NmlMMxCuxMx8pln55Ai8h9pg3X+eUcYj3rWz+2S730WkRHg+6flCZ52iBhl4seQRs1HMrITERmSHFa6CAKCI9AyHeg75mH1pwOv92TuXdOqbuHJM0PuH6RMF+Q4BbG7j/rGrXNthtCQpgcQ2M/tHFCwy9CqzZCf68LVGZblPTXuB4VJPyqHQLZiosq6D2TYWK8KRNjMLNjbaclNcFIfvQjBfKD0wp/VBj+mf5B3Sz2kNTU+Pxd1BJmRC6XMEbQEzo5iIn17gwpn5KMAkCyunVAmo1XR3VKeD0xgEO/6OnJhrspreUYfMfUyAuKeXF56lJCM5LEJZ4UZIi/su/GWEsagXCaNoOksByURS5GScZW7KalPeOVcdK9kLfk9FQT2U9x0xan/dcdanav0mRsWqeYAmI33gId7PRS0ZNz3GoSC/Vck3oRMOQwINhHE32zmC8OBadyv8N49aP3hcVHNdTtsIowZSY7cBem+0gqlnwX4jAguBVSz+P1kIQ7e974kG/bPDUz7eexb2A2XoWN63Oup61oGU9a6HWs9Bs3ZOBdlps3G5oaeS5a+RfWR3gvr/usf7G9BtJ1hpXjA2kywJfiDWqNFe3mB7YqhI8BOmmy0q6mNSWlQrN+/4IvlosmFLRmujm+iBXSlBrQTecCH/UWDWpvQ/rooR0XcUatX1T2pjhFwBy+V+B+wDtjtNou91jGm2xO06jTX4V4Dq/CvBaDCWPqzCUrNCtxCgWdDEgK6q6JpB1UF0ayBqqrhBkY5suFGQDDJcGWqScNTxqzG4lNLK5jVDrCYNaAICnsJbwd8SXy60Mlo3Bc1orDCL7h84s3TdE37ZANKsBeg6NRz/VszIe/asFycej5/TkPrAf6Nk7Hv2TnlzP9V09vQrMAVtYVJWejdpD/CK2ovP6/WIitYSgswWFE1pQQM6xXawTqAb+8bITVFoXfazsmNZFHyL0vzb6SDkInuUCW0KwBcmny3blD9MW/cCskopGP+VJISaI7lerlhqf8CQTE/3spV1eKpkI+Ue5vVG53ybD7eTUBzPxsJp0rshdYwpfm4zfphli+DzoOphmbvxHHVhUe7UWP0xbHTbN51K6OIiI9A5uquxmEwrXsTx+wP3GFcyaj0+s1rWSdpNeQJlWl6GjXAXt+V+8nQ20XWV558/Xvefc3HuTnZCQYFLZ9xg1KGicUpKxVLLP8oOUUpmOY5l21hrruFZZCauLfAziTCABcjHX2ho7OmL9QkVBAYmKCpWW8GGLrZY4OjUKOqG1lbHVxhZroFrm9/8/795nn5ub6DiugZV79n733u9+33e/H8/7PP/n/0zSdaboN9N0miY9ZkI9Vw/R6lSFEPUwbnL6u1LYqV5VQd/gFPKuUq5zCpWbX/M3pqLfMPHzTfh+owxUY68H1IGuvwo7xm7F7PeSvLc92urj2oNH/nco/+fz1M83dfpJv46X1l/3Ri66pbCR/Lf0qn2kvUXHqzY0btEvhhPPI0vPabxfv9k5jffod8k5jXfoF/46AonL3kO1nfvvxSl19ikT4HjxUGXtLv6MQzq9Dv9EfBhxeD+HdH0d3iN1QRx+WpC4OPyUNA1xiMpUBDNihq5sfvoEjRpzXCMxxxVvQ8KEawzSN48LG3GDhwz7F11QS2iQx1HosxofZlR8NfWYmxkWeMpU5HEr0B2QT1Ohk4L42WbX4q26PCk6MzYUOla3RiEVdDIfUYoaBDVIBGbHbAQDPD28uMPXRAmjOPQYn7DycslilioF1+1aXzpfmxPbkMwX8xLhtE5sqUEu1Z5Gy8znJlsrdjdtq4GnJ0IRne0BqYpt2sr0L4rokHDCzV5WTPjDEhlyJnpmeG+ZAvg5Pybq5YnOON0jdqixDPACd2ya0Z6CgxfDbLxC8qOpDmD3uTx7VMuCWAk2tC8KKRzqbu0FXiOeb76XSLfY9YgLd9VWRtnEzJgEZ/VucnxNf0xyFqtoeydS0DVYoa1jyf6yham7JLQ1Q1J/XG7PulHko+yVtkr0FPkjdrSd6piawdvEjrBMgp1NgiU/W6XRE5uRxJGwMoOAsVSSty+cbkzKfFY+Z/N5U8RdKAJj/jh5BhdgkVOhTfSL8IdB8eMlwYP3kPo5u8/nuJzCNlPbn8mqyM86b12QETrM+FSC11C93lYy9p2ITXqNeKBFr8Y7aW5tDcQd1Sl2q4awXfL0y7dDONVm58mOGntmouOCHlnElmKyRsMWVNysHVt5eyWYOVPp9IcCOtRojBfS3Y56ftHm1f7siCFqEIE4q6pavEIkye6h1EnOoyeua10iGADfWMiW0JG1s/e6ApcIbsDvqyxVUnGRFp0DGRuvDQ54iY+SlSBmZ8c9k2nLANXWNGRqqU9YqNzqh7UJVOdQ62nzMFlMbVW/wzYAw1t/jI+sa5thA9VT6JHd2rpmP6wtFyLd0Ei6YbJYo2cFfd5ywXQviLJ41FvNjhSrozmoJmTCDbqxtXWmx2/eu1B/VIelF+rLdPKl+rIwOCKNdlhaTXXBcQONUnz8PkxWuojtTulCwJXtu0raYnd8bz/N2c3GmwLMTLktEKTzya1BLydsm66xvftPagG6NSThfOXYdo1dKK07hZKcr02aunJ/2rK7jhZztLk/tZrj1IkAe+dTq8llsXY5q6O3kF1svdq8EDmZd+lN2jjlnZfrRnqklCraq2hToKLoZ3pzf/HqlLPkaVpUAfmmX+7qqEhQU3MU2xcWZb6P2li30Vm2Fldss9ZH3Yu9/YU0bupItF9T2l+UIBqZDjCAdlVt0oG6XKNPki0Pqdcwf8D2p10A3VkdTZuQiusOBX68f0KdTmHg+LIaDk0NOk3c8jxVDLk0R6IfRE5OQ4Bb42lNzYzbKc29npJfujpYBQlloN0Haqt/nmwtitn8AAXB8t7aVHzgU38qUmLNke3iRk6yfyV9UC29uJlDT/k+StoPcafblji2FHZH3S0NRqN4J0elPYp2L97ic/ShnPAFpVbM9tB/ZWwqZmLzJGNQZGvQGXZJW5AwzYjS0BNG8QjaJ7guG+Ig363xgblPu4WvKb2RHTX94m523XFjdl9rZppzNhAaVu3y+aa2GRrDHmJxV3OGeWpSnaP4O9BOJpttO/SEgUXhN8S6okPFm/C0ETiAdAN4llR+L4GQX+pQoSe6cQheIl3fKGVTwOIKIHtXiKJbFOxRQk1C9EutYVzWdkzmR+smX7QFUvUQhE2zqPWj/r8Z/LbRf6jYq2a6CboUl0ha75VGR5eqppoXaVlmTBYcfl4RfS2c5SYYJGwxpBvMXqEVy5Pbawi+gnTOyHqReCa9KuiNSUNwbp/uzXb83Hjf2X2UB6Yo1yLOD9lPLdFS390Ci2Bxz+5fml6sIU0EDhF++ALBEkNPAz1gE1F1TNyW1ndJvmiDn9RMt6fJMHkahIgcZj5s0+l1X2fzat5ANmfnk953eLdPS76w8SL9WtXpJXhePZvZK0iUntBLOcdnNV6nVe6sxhUv0YXLhDlb19rZ77x0m9KV5ev0qBZstTiBd2Jtp6OgjfQv1NH+iterB0ohZ48bkyVDtM8BNzgDrQvRAUtlLJl6qPx2ao80jn6Oq9n3lSZ3v9LxLnqTlYElfbJhlzYeKxyJVWrK7i04cmrkegsZK5cnZUlqDCEEFJW86Gx9frNRrIAE9PIcEBbFVZyPyVBEusPCcFT0Nk+LdB1SwMuzuwwiEXN/b2fcz8kqzd2tNHdb/Y0YYm7RLcXkb2XweqeOGSve2WySNFSsGFxXUqJ6yKhp7DFVVWyVsKXr8+mbpFXSd9pAGfQaNYPiXYiCNt2LwOhGpQoIRhdSao8xfSZ9cgkEVhcgDGwtutv61Jqk7Ldb6t+0gTufPo2GI9LyLmkGNCkdZXegt7CeaSFggokSq6l/2JrqmANHPqMbfDXuReiNYkYFBbNMvSQ9eYLsLTtL7jqb3AzGMmMsL1IG6NOkGUo9ejy7Sm1OJ2YMxDqzdxGwqyWa/PeXsKuASFWYq8rDTwp9I6MElEju26dcVUdkGVIlO7OhWZNcFZxqiH4yGktu20Z1Tes6pFpDyIqBXPJ4tp1xia5XPseaV0e8uCUI1l2fbU8loXqjzLUqTPUK2YX19ipPRy+v5yn7s15SZYpgrJdUOBEpc/WSKk/Zj/WSKk8ZbZVQ5Wkbdj1Pwb70kipTCe517In9QOp5ytIz4v4uW7ZeUuUpk7leUuUpKJdeUmXK7r6G9XIHtLkxgCP2FzhaQkoAHRnUImiJ0VmYde3hit2SURXQLyO95AxknBImTINQMK0Y34V92M6xslza8VMWS+PHhCjKBj8rcphwek0wmdKhMWGpAhZSAbmmkj9h8vZICKASZjWYDkMxuQaQpHQvTiguVC0+TTZm9Lt1IBMiWsBayryT/XEk88qE2DYqxg2Ib46rBDTJrQFUyY0hJyi3hoBwcpqUf2FJe1NhWrpxGiVkcAawLHmzJMfGZHdNuJh6kfj+PyuoS6deLkFdPL3Hh8Uq7+8Z/k8JZecPKhCfNhKyu5aMGgnTVjZdsiiXTVe6syTmieSGlES6kYJ1FigYylctizwajVGhxspWSfC9slUS0geNUNy8MJpv+DqmCgZ+9cJ5b9dcWRl520CAeASIj6BhQEIRgb+4pDkly+2eB6ZL0y1TLFCdscEtH3/TD978/o8ffViGQSU8deNd+z7z5q9e847dmEWV8A9/8+m/ev9NP7zpAySgXBsbfPNzNx36i0N/+/FPk7BH8j3DFevldbciDZ+XCa2NRfdaAMbj2RxE6YTTYW766J/Cydxm059DrgaqKJl8JiSwWH+qLYDosLX9FbVxl92Wl+buJDLu926RDJ7dzrLRzB4QT7UXFpiApQrR+vLggT8VuMgRwxD1ub+0YEp3pRyJe9XZ5icpG+9J1lmXtNjzMV5gczcCP0nFzbUE14YNNknZrytBNbZNNHu6vDDZTh5SjOtrEN4wAejm0nhObpzrh+U/pRwmJaBTY8WR2vFjteOjw2PBqg6RtUE0KlUjOzPZx9HrOXh33CNjF/MJCry1Rm5p7ZeJUtZT8UNbeA1i+ZhjO8UkKpGwY8oDIhmtlkg704mzuNfGYRQV2be1M+PLhXlJIqHTOsWLLGezTX23ZSI9RA2yDZOWV8VXn6x7bREsRpOrAknw3RAAIedrq1osmexRKJWO+QLAv9jqRBF7VAKRuxsSE6/uZXsEYrB2abfKgkOh21sChEaCchCwu3Epi022DAWBtDA9TaGKaOK3ozKqbGcpJ20tisP329xbyyJDr+vZTFsSOjW6HDQ+XOzuJBpp+Fc0LtUs6ad4hfcObLlk0Lfsp1ejzNC2NoLp0aoWReM9hGZXsfVqNKDgaKSzkVqOZskwA8myF3a90brFI+GhE22nb9+NZjs4pjd3NdtJo+OP64c1giVFZXPa+FSNocZJoiyj6OqOhlH6GJhu/XVq4Qr8PvQ1w0/kqGuI+eRP13hDALdcKOUcqBPeRnbSl+1B1taWhpdLLTSZYsGHp/nGNBzkL1gerSuP9JPnE4xRxKSQOKUgRIdUjmvrARGyauPaPa4CNnoPXCKoylRkwvKQlTkOUyeXqq7EP/Kg+CRXVTfnVRHluKNXa8rJXm2vvvAI7U8mwd4ei3Y37U+VSYJfID/LezX8QuNGlgd5r6PT/q+sY+2MnZT9QulSj93BTolFMPt1tJWilwnnWf0lwpAdbfX3zuZe/rtoe/Z5+Rl2s2tQb2ZfV1y0lBsiotZShvWvqp8wqYYzeF9CT7jp9yFqT27a/WkfSpRSttm30A9FzRHuqi+DjO9fUDbJkZn5sZtxCiAh+3iTmZ9W0Qv0yITaQ6+IEzqnXuKTeFNEBIupja+YfT9xDLDQGYGxp7XN/J10Peuz6Q7HymWKG+sTPXNyfZ5HVKvm5eEh9axm5fKQEV/ihAT4ZPeRnRtudXuIwdeSn7Bt4R5cOuMFaTotF8cF5lPFn0zXs3O170EvfHnR3EZABpYxRWigFg9My1DRmvyriXJrc6hV4naRgr1JqXY3XcCr2nIMQaXehPSUnIir7GQyRIB6CyRZO/E0BVo0oI7tE2K3EzZU2erZioJc25oaC1TAVCWoV+/UbqBEPFIkIMptA6wFVJ73Cu0CtE+octeeqLb3CBU4no/XDTcTtp0g3xt4iOBvkOZFwYwtudHbQbkDGM4pGKfhm5sCyBg+8QmhaKqjbiLKTXI7elVD+0Jwq+ETh9SV3XhsSCxSwjqZSQK7WUrBiR09CfVDpGidVC3xQLXneVp0T+Bp4b1uIFQltI+6WgQAubYhDCyvWrT6PNrv6QOWzandnCGcwQPNloB9UJJ8A0tZIVFL54WSB8VeAP64J/cCMI7UH0gbDRoptXE4RTj0wZAblPnGGY5UTbODdq7qaFXn1/ZYhGxVXSV/1LbHNhMFAUx4W5do0ArsOXQEsDuGofTRoYQHrkTyhasE1tU9y/wS1gB4rxK7kfTlS4BoySxRfvR2raIj3h8CkQdwxc+nfURyenAh5adAoPDjvRWswwDbPYBHduitEKRdwCPcMUtvBbVJDVdb0mJQQH1Og4yH/hUV7UXpnFCCVe2coG1gQsByJtIC+3yFc4LcFMI5wUT6TOjvm2hN7F5mxE81yTHEas4JzGnlqst4KQ+ZZmrOCYr9q5lasX/NyNYsJQDNIJU4QM+dWVSMzYzjfHAqYt2LZtDMz6BSmDll0CQObsQFmAKhEXMKTgukL2VeP3WAdv42PHT2/pf+5JVYCJfkk9dhiwVXfh0ACL7yTWifmPxX5JP7ZrRMnTpo/FvOgWhdNWhdaQ676Sv7K6+6arBbgDlenJ96Zf/UmyQwKoxQ5/zVW2/bd+0AzC7KmXzJlTOnyVvnSqDCy3nRJIUCpcMqIi2JYfDMgq1dg961u666MuWZH5/dErLjQWUC1cjMSlFCLLkqP20X1YWf8qp82S7AK+gurspX7ppZkbwdCAroaM+npDUdZ3VHfV7qYIERfiRGYIyy8HbQVFIx+CTfhmXDZSK5D6wuvRISXF9TevIQWCM1SQX/X54vD54gWNkTeH9TzOJM84sNjq/Ny+VkBFraC4BvZPaaTjdWk2451HH0cPeQhK4+o10qinj+/eJqWbQAsvDhV1a8CxgJVlREDqCu9LWRciT4iSy8pDUimF7+tMo7gfBkivvpOdqOC6LpWF3NRvCcUvc11cRLYan2aTr3qtQgO8I2eF45jo7CQpIW88kczjHj7FHkjPJcyK0tQPMx9cCiXhv4IPDNLUGbhbqqHLihrSpn5JXlbbhAxq5+TOJ8yPBhze7IXKrtKA1KOMgYo2ZqDhoEoR80pC6yqw9eLW7cCW0gIsKRpc/Fe7mUDOnKevFFsgmrH8mjZ/xWBhLHe0ErkbJqlsXwV+wUbluk1nG9Ump1fRCee9F1sGWYql0KyOrCqvJCJ22w3KHtyhW4eDYeMWEgkDBH3bWoNR0Gxjy0Kw4jDijPcakFKZNYKiPzZNFn6lmjvVd/SrjC6aVty6iCUC8P1CUaIwTIJLdmMmQZBm0dAgGkZgnwLXsYvszebqF66M2Mj5jESJpiyz+xdfHYWKvdbnpP2X+pjG2NlxrFEMYlW0TYBCC7vt5MBnx+Gcb1h8qSy9JOwwb7fq6CAs/rTRb/wNvR3hff0a+V8JM7CX4s+oSccuVSGyjQWG4cNEWMXbmi1TUvz9nAtIrWzuJLTx70FpSH+4sEK0EPZ5iyMayxDZdxOmeLHLKx1qzmZgGW4A6RXaGl1943RhuQ5L1mcbjMdQVSMw+WpkPgjrIcYHtXmRYXuUJ5LR4ph8SobTOLZI+u0lZcztvux/OdPxesVi/MF20VVKc0M4Y1UovpyzpggohHN43vBPd/6Z/JAp2WI28J+9Cg808iyfNetT5ACJu49vRe7u/x+u9hp31O8bB+DjaLd3yf30+2s0umuzanuDXSXv+xv+fauuLOo/wQTezwP/B7eyu7BK2a7kXJr5oURz6/SF/8ru8swrizeTuHrPOkv/uo09/3rsmtxeLN23Xh0S9z/J5Vmzl89+Mc/uWk7/+zD05tLT7x8HO5yUqQo9du3DwdZpvtv1m0Li+6O4ifx3+HGntBvvq7nejaJNbbNh2s7T4TrBnaznDOjHcTMz/h3mR3Epi3xfwqvQvCAtgf2XjDptoNm2pXNlUH1+vZprrpfEyX0tboLpQYuoufl007/jaiTGV55YXxmPZrW8sejhaEEYbZ1GBLtm0123Jz6+J2u9VQD65Sq7Lq6lij02y1AZYt8bz6plfhnVP8UMZqqqsIiFW6myNXa/xzebn+mC+v1+XvlZf5mqOXD7oxHymvMwjXF18WBmmJQ+XtvLxYghlPUCL0LRoXUvCMZpEph3iYK0q57FoOmlf6LjYQ6TItKrOzlHPJ7Mzh0OwcfRizM8bxDgWNQvFZ1cItzxbS3U76U2uW8DQTBjp7E+Taw0JQNNE666qOVNMH0feuX9vgSzyPY/l85s/L1w8FveexJs08L3bJ2qcpcLl0JLIaspCHh+n54WHKHKSfO4nHod/9CrPJr2z//GwqfVNNGXegGT6q+5rCRiM7IPjws5E1z56rjH7xwSp4usR8RDt+L2ap42e9IqvLaRVwtVYvBaaDM1bTDSLGDDBHnItmiMUuj9Y1dK/nFXf+0f2NmReUtdQEKddRbLJI7RvaV/DzNOH8GvnqDe11CvMfygbcSIkBjUhoAYsld0P7Yn5YSNfzQ0RzBe1fFtpuSWVIYw1Jaa/iZ8WG9kbB6ZNZJxTk+bhFN4bVhvYl/CC5qSy4r0pih4NICofcZnR+ke8u4wdsyvkanxLQ1wu5vJZpTV+p/3xJK3KkhMk0XzPLf0gdkl1Y1PIVPp8aNOdmCSc0MTtozfVPV72eb9J5o57YnueZ7xPmBw9z8en7HJ0Czz19dnDGXD+PpxCcsP/Y5NvNl/ouJCPfNzk7ePZcfybuM3d9cw7hABFp6exgw1y/7ytytNSFidn+2OzgRXPB2LQq/5lZcaLNzpyVs+INds9em58+S0fr53k+o9NZusFK7hosmus/QyiO2cHGuf5asjtldrBkrv/MuAkXRnyPB6vn+s/Kn0GDUPi1c/1nx0U41pSwbM5cnytmB+Nz/XVArMm1Odc/I24CK60cenP951BJXnPaXP+5LtC6Wfoe3rGzg1+YMxormx0sn5M+TbetmWOv6BwyGpEsz5qzuN+MRNEH8u72nAiV2Bo6cYWa0Xm3ZiW3SrSMKyKuJNMVetEaHuQtZw0WV68QZ/vy2cFz52SFK18Bg7BeKfZDn5+Wv8Bytb6WU2Zn1uQvkAz3gjSm87X5s/Nnxd2Cy/nleXuWQZwj8Z4eV9r5s/K1vvLMWYbzGewadfKcWQY18aV8MjPLWH4u7fuceGY5GT8zf0acnJrP5H3fNj3LQH1uvs4nZ8zOyEQwOfm9brOtiehIJ3ACUr5Jb6yljx4uaISsVpLXBfJDI28L1EXSwH4cuxAAcNPTyi+LO0WV0+Em05ukp+WHF2kiPsEfUTp6lkCh3sTUZFxbXOUl5JKWfJ0rP+fl58XoHnvYhZ7n6sjzOh99Xjb69DwS1/znpeOtP6/zeJ76+Xlz2cfz8FvNf56rI8/rPJ4nJz8vXUx6/tTjn+fqyPM6j+fJyc+LfD89f+bxz3N15Hmdx/Pk5OeN5ojnDyMizs+AyyMZ6DwyICtnICDSiQsg9X79eZ2PFsC74hN+QNnb6s/rfPQDCpyXnl95/PNcHXle57UGLMZ/vEc4r765r0lVUnZwOTUyIEy0ajLwKwd3P/rUU/fgIYIGB+66gDMab3Hl4Aex59Slg+mSiVguGbn0YLoEOQVr+silQ+nSOtOyV5eaXDocFIOODpD9OXxnDYZfto+qGRKF1E0QbyequtnVCCqWkzvavL21hwTSRHj/fxUqLCAMhQrLGAgVFi5eFbLFxpAthkKFBQWECssaF4dssT5ki17IFkOhwjLG8ULFwatmnidxgm+plTd/2izrZt7T+qvZmYWJtYLFr1p/V86y4OLKPpt32DPPMtHWFk9WvkVaNlihn64tG6tLvmQ2b/JMrMReS72Snq4IJ+yy81NnWcXyRVq5taiWS6qnZK2ep2tv5wvTFE3L+IyiZXqh9oSsNdGL1XGrKqvccFWVCXS4qk7nq+ur6mlizaxWVVYlr6pa0X/cVfVU4WR+9Kq64vhVFWQrzT5vVV1eX1VRjCy8qk7zyRZYVZEmTr6qrmLtPHbP/UlnNbK2Pk9r68kW1RmW1af/6EX16SHy5H2JDbVF9ZT6oroC2cgLdJ4fv6iKSbwUbhFRTyjcIvhauEVQtXCLkCvhFhlXwi0yroRbBFQLtwi5Fm4RciXcIuP+aOEW6fn/SrhFGvhgr7lc0sCBCjCDgFvnOkh+pj7OxXWwLtQ3da6DNeI6ODuOsckJSWnOBLlDvdAkCZ1N3g2hRxJVvgDTiugvU+QR4sXTx7I323Ipgs7iA/iWFsvlqNVM3lXJX0sOVmSC7CGQS3hYYba0qAItwXgJISVX0gBsFUdraYdJwxG+eGyYJj3YERrxkPAs+3GuYhgErId7e9kn7Q+Pa/wSefdzWabG5KpLKu4KxUFSpaCM1JtJXSovYPlpVamPTeHEqKukDvkBjpB6inIitbQCU0hSpSC7ntTScO5iHuDj7tdcx/F+jg+pHfeBmVhR2myJSA43fEkhQT4rS1yNqBNEKUW2tF1ZBHkhS44rX64PRGSa4WuLR4AHBUbVrxVJ6H4cFVSVKpy5vkgiKLVpj4aqzuhMhOXXREU1yXkVwfl1tioQSxRICPrDclq8S99cJTo6taXARaloZYXeAx5l2GQES68M5tSFs5Emcvmm5aKRUjEVpKPF+fL6nYfQxVISpqBiP7n0Mm3NVlY1OrWqzYr6U0d5SoUWTaamzPCBZ7OPy5+U53HKN6RLL62KeYizrDp7kLMl9Uz3TzJMBUnpZX9tx3Tww4KZWPGqdyT3Q5l6Im08+02rSLEY1LzT/SPrwxEeFS4nu44VRn9ETRI+6eECSNfjmyKC2FPqAf0yrJFWrHwdn++UfkBm+Mmvd5tP865BSm7miWZxnt1hklv6lmJTogQI0m3UGZxJn4EkcvnMait3zdCqJ2SkCapk/4EwAedtPYaTAY/9i+6SqtpnJq9dhV4QpBaLzbrW3ZIn+L21ifcTv5+TZw+/j0hS4Rd5Y0q/hyVv8Iskg05mXetBUWTw+yVpQPh9QEoOfm+U6MHvHU27fQNBsN93C+EGx28QbxJy+EVEEQfXcmOuaP7ua/NTdzCwOZx4bX7KDiw0BMNz+uIdzDQTTl+yAyMQfAnTr82X7sCyAzbft0zuQHLhkFsW7RAJum8Z28FcA/Zp2Wvz8R1GKgFx4u4VO/qQO3Rfu4PpxQ/tYO7gXfHIivyU9Ii9Ddj0O9+pHX0GE7d0dyAPccgt0ztEDe88KZk8E3Tn0/RaXsC9y3ZAGLjE93Z30GCnod44zVd6VNbp2Q6ED6pEHj+j7JglylqQHXe6+lGL3g4a9Wn5Gp9M7ACOSEV5kNdggq2KqTx40I0SBZ3YIS4ySe3LgygDxzemD63xkDqw1gKtNVwEb7Jz+Fb8ZufwDfnFX4u4sp0cYoMH9IvNAT4ZQLL0ev1ChCDYkOYeVlG0dVCj6hdfFdZnxsE59CkZbc+hr/E7eQ59jQkCr1Mp2e11muCFCeYUXVrTnNam7FMlrf6YXWHd+9ZE51NHNwxKg8TPxO0M4aJ9YT7NH3m7cZ6tE0fJFns140Om3Yro1o2OW1mM7Sw2bWMzsBKpf2u+epuNOiKdiMymivPkqsiR8IgungYSd2+ZWYlOlP/kmCsgTDBOHOs2JzW+1+OfoeEtvti1peK/Ugkn92ApLWX00Y9ceVjn5Upqe3QYXKTLX8BdTV5cugOTmbj0M0jw/KARQevRSIfDMUYduxwnD2JmhTGZD+R7LNabcDNOl+xobJdjFLIXqukoRXKo1KRsDFYqt/PUZLceA09kx24mnpabCepksIb6xCVTDY5NUdfkBG0mXZmdBLgZv2D1Oa0pZ8Xny8flMGO81PKprtPOlqNW1CjRxMSzqg7FpOhmXdDTqoavSXEvj9F+Vw6Jds3s8xllZ7PHMHvAfJE+gNBkZGLnXlNw6yfcSMiPjZ8dGumClNXe9S357iaPNTOqhNNkQj2e1YDIXkWU1LUWy9w627QxMshmWew5DCyhUdz45YbMDjgF0RGzO/zOVX0hnXW0RrYqqbZRihOhwpG35Hv0dn27zlarmIBWJn/P8kVn8ntmfKXPdX6r2NPfogfi9LJizW8Vj0ZKo1hzWZ+cJfudKTTDTc9QuowPflVLJ5gahicYFn682jAiW8Xdt/1xo/j6muKRh/5EvxljnzplhjNwsDzsHPb8LKtOT01Vnwozx09aJ5bikTodV43qpB1upTYLpqbWS39EU3uUhVFBOPL1ynG9TBO9yfeW+kAB0UkR1LjcAQBbNG3YelLFkxoyP6lpX3BuHHtfsJF75InMhFbe433Bi+PY+wIBg+VCqY3BZo7hW+s3g267K1QLcydk2hxCByaf9eCP6kbMpOzzkofuEjaueAJkTtB+d4t7nXI1fghliqgjusXraynigO8mqmGJNd1gik3B1iJFwSK7iRPVKVS+8d3WhgYxAtwQ+9l2gYHsFm8yWZX8iUUHclSIoW0vbBisMFact43JdvsLGw+pkqlqIqXoqWpaTtpiQqrXToTiyGDiCWe8Zje6BUhDLyGCcLN1CW0S9zPuIydKjJKunqkbLpq1yjzYpVLmeki8EZBy8CHAJOh9aEnWNX5bEymV+abszLSL87mpYimh7ZzyHoJqBat7V5xt/IU6vkr5kFOIOl+1+0edQuj3KuVOp/yvYYpa+U3sa4mi7+MHoXB/r+TdnLEpt4jiI1aLUrg3EFXAT0BFAhvKrSqpdLZ8CHcZvFii0qrjVxDK9adbfMycX3Idrx6/FSaTA4Lvs0+NR5Di7GqMPE1vXa6Pq8HP2fO58+fl1C5+eFobwh4TiCmzJjE45DwTH6b1wsZ5dH+/NPifuomGo5tkcO0ZpEuno4gdED2KiAEFnomREcI3fc3CN71UtqfJ3++GW8sNK0qQOPc3i7HsNyL+kdT12W+wQQCF8ZT8nfmD4lNoDDFrsaU2vj8e0yfVjGZsSehFEeEEGuiZZUv5+SYxxEtGULTSVnaNhPJ9SH2loZIoN4sr9DeMYOXhweHhncPDI8PDx4aHR4eHx6pDAdgOI3nr9wC/xTEINRylil8V6BC/SPjF/mUy/pIL6zjCVXEn57r/Qc6R4IvHloY/ALBkaMtc+iwBGqIt2rKYi+PrFy3KQb8V92Y3aHjK8p29XBJFcXCpOlk0RbP4F5nEL0fAu3RLihFQvkE5jGU7omEbv+w2r+cqBgwErDJrNelo1qt2Fqv+80kz3+lPom8+WvgyH+4FgE8F/IAVJam8xxqXFscIdbeFI5PYea6+2uAWlzYVZ7S0USS95/yyOs50gQz5yiZHCH8UjZcolYKsUOZThOmn4ysWC7GqOBWnwxJCoBAqiDO0p5RHZ3sgYIA8CBo8nd1sOgawWmmQRXZqE/z/IrND3CLlgW8R2wW3AGIiO18+JkKMEgupSnMZHuI4l+on+c9YJKaXpBaA0Fhrf2C9YvFMveh2N+8Kjc239UCnTwgUdQMyRcQ7MLycgj4rWWCC7lvhW+/54Qf/5WMfeey/H6zCcApO7ni5Dtx5/PXEVz544J6vzb71rx68+TPVFUGYg7VfoT2PfzI50i7wpACKEQZXgXOPfzIBhhd4UiBFPXP8FSEbDV8DPm87iZDk2IDl9+fQv3KoKYlqFVgkLjgoW80/siQCBi0rt6CArAPSrc6FXNc5+QnQGOGLk8v/PL56R7pL8QwUxa88VwiEdM7mL47RIDq70j9S1hwhvocU5bIMJefQjh5Op0ZExzlM2nQgkL4R5nihlgXbGOTrgZMXSKoEbApAv9AjIEAX/v7id17wgtxK5Ohib155fdq/qmTYn0iOmwGE1FepnDEd/C/5wapKPnFkBwiB9aQ+mto6ebHSSerllTrvlf3majkf6AGrIsIvGap2tRBh1SKooWhoXsEyo1tGapD78VfqAo2oCI9bbluwl1Y09IuoY1I9LtAaAoc6CgMM6DLyBa7TzNBCjofOneLK/YEdfy0oAXoDCioy/NC5q3KJOl/Fp99wQXr2Rgb9mpDpW7KH7PCJ7ZOJ4SPdcmLYU00MRgqTefJaGYmSEDQPyQdF+P3hHTGjDB9MyH4/SAAO9aLArCcHcLl1o9XWZ9ckINDsvPw06wxfM3Q/H3nNMIxF6QVi/L19kKv4iwK6q5HKgeUvrkHroebRGtEHNHWIL2BeSTQXDQtYlURT0LCAQ/aBkQKSV1nA5IzhoACad9J30idPcwufzCVVa5XBFwX/V8iBurM84ztcq0vfeE0fKGkx4yafkFSFqqwR3ibVoCqqCWSqGtSKmiYqNGEqqgmy3LEiMoM8Bex+XsUlVL+LFi4nJztbp6okVwj7M2h0p9owhF2bMi4LMwHaawVD0F63qkNVWiaTYR2qwsYcG272IwV001RTyLCACYZeL2ACnBPeb9jWYLhdOrmGyERm56RUpOrlo+2iCSXeGkO4/tZAcddeGrz2YVerZzMc284Om/rG8BtlvH5A49XhIY4GfVIEb0jRVx3KIRPNmUzWyO2ySsslNMZSzd9mSPMwJuKLKvq+iRtIGCWqGHVDiuGgzKqw/lox6kH8y/hA1Q0CpNWz1AyiLKsgKRrU8n2qEjQn6JHqpXSJOi1F3Q8qhpzuHsZsSiUoH7eTlPkT6GRI7dcFaQFfwN9Y/iPpm9sbzwQUEUbAsS1TGCH503DVIWIYil6+Lou4RFqOdM2hiDS3mZECcgRHtqGHY9W/LuISaeKZFn3EdIoGlAY/gSEWJiDgScWoxRsn8UNMJvIJe0cpPnk11UVIlqGEUFImKAtCWyiLlMeE8ohov4tSVPdqMAf9RfTYoUCkPAh9UctjXHlE3y15LdKsFfT/x9NcKA/CYtTyELWE1i3LG8HAUPb/YH+oZKZSOlAenVoe4mOovC3m8TGwJ6uc0UoyBln1a3coPOPwDH7b2pn0tAw0u4LbsC1uCcasltS05GLI1vLsvbAXT4bpwxOt3u6e5e1kirINKims5H6L8q0z5I5fJ0FN6ir0sufGMcw3UlfZVZcBfBvmnfHbgF041ivKZoxN2hRYO2wdKUh4bsRN6Fci/op9TuKHkWZbarmNDYYn2lcWef8AnNPF83U2eOJbhw5987Pv/caj4lWRPV6JH/3QrffedueXPvgLROaWtV9pf/G313znWz+c+94RbsRif7EW2s5VWALYXrFNXzwzbQo56Uj0Y2wTGpXBQ3/xxT/6H39yy1cG8GjsGpw+N3j9W2+//fpPfv0d7959FZYYd5bR2wgJM+82ib2OVVi/bfq426CDiSB/9duWHHcbk4FIzmIDhZElag0QVe2T6hs1tPoQ428ze9xGjDU5wQ6ZjWQ1UXxObTHNvW8P7/P5EGBvGe80bkvd9PSLtRNmGhp85qGvfOy7f/0H33r2Lm3FHfJ3atCd09HFuGc25xym+xI8Xafi8DLCbCzjcEmtLvMqMls/Gbzr/Z/41rUf/Z03PNm4Egebn+Ch7Cd56JSf4CGAvoPmrhQCgH38TKjVZIaSjlXMVmgBZRaY3hWG00xIGjOee30zF2QQNTrY4onLILjP6pGUekHIXMrzIG93zu3IGXU1Of8cOc/La+Vc/V1P/OPXvvv2f3r7LaeqmCIijZxKOo+8HdYLu+SJ3AJS8GFHcH6T8/p52SUHM4Svma29izXkZ1hDZofvVFKuJE0ZImRw6GbUbofDa0e8DVLwRexncTckgjPzGqBCZ/yb832o5SPdM5tNhWGFOzDemgwPq/2QcIYXaESybSooLv6DnEjZO8gbDnwqcOIHTGQGj132P32EsU2OLFg5xoceo8ND1LZ1j1EUz/YYldMaOl5zOOiVE4qjC6aBJCICKU6FX4w+BR9DEqVrSvqUtvQpZIzRik1YPCesC1E4CbSbIt5m97n85jZeFPeI6FgsOh3UPPgCmycbYdWxek3xgPaHByHnaZ3VOIQfotAN3CW3qcPYjpNz2j6wOlNCr/h+wm47uwOkKgi7Mkfci5s5iLIKCyTepCmusgWl5RTIV8B+PS0jei9bJapD+dq4NsPGdcq+yaEL7vDw2KJ62x5Vw6nGqbJ8NR0dJdBHfLMys/IeSlVW6hhU436ocuB1WA4+Q5nwoBMoWdUOaBAl3HGGt+40zrGKL6Pa3h/UAx4Z3OV7hn9QmysasWx6SZMfMq3MYlVC4ICrmK4xEwTmzZrUwKkEV3+reCiRgTxemWnskmg13rcjzUCb1hmNv25pAhdQTaSLijg9vQFvC4WLtZCth2Wi9fLGCZjWYD3ZPylx4NFxmJdS3O8FrFfwI8tOdXYcr5OdakFblmN6J1sWdqoFbVnMkZUtC2FCtizAa4qRTld9nawOdCpbdsT0jrniiFdrk1GgX9+ebPA8f6BnIwu8opr9ElO7ULyG8MKPbLOHjUbxfPmoI59ypeI2j5d2atzmiD7zuc2jnNaTpocU23fIbW4r1od7cJvbBAO3OcEDDssEk7jNGQ8Vt7nEtsimU+M2Zw4LbnMKBDgZHnMamcAkzlA2Gli4OC72GDnVKW6Ku5vZH8ko1cp+UTYnrmmi00yZeNHbkROU5S7+kBGdNgBpIf1xL4xZIAeFY8KY1Qr7C2hAq6IJylNZ+EADGrdF3J6h1c9zHka4YZrsLzegGqLEHVUZA5aG1tB0KIPIMAMp7quzY7KxF/uIuVymEAVYLV5Leb1T3lbFZfYLDUOUnw/HexB8j3JcvCcCLKge8+1TFEt4L+yNGsFig2lidDyP9vhdVedk5qc7hXxjJNyhX3r+AfWyYTySmvVJVPGTP9DG2MFI9oyVwUjEvxKDzIFDXqxB9ktxvEmD7HwT0JeDzOnnapC9Io43apBdlOjYQZI5JNAFWrXguDexF0QyMjI5evfgifuOvaPkbksc/4O/ffK6r97ziX+61w5WBJ0g6T2Hn/jKfYnRzVHmSfvC7O///ZMPveX1X0iPwjgx+O63Hz/2gUT0pjSshYNbjn7x8du/c/enzk3x8kn69J9/+IOHE/1bijcPkxxjgQhT/mUHddugd93sYN/vff+tT33uib3faiAe3ACKRSuHgy44Vq84ranKQGytR0xYLFZ+m2P12fxn82oJvTTNeofTkLVf9gvHEct4bVvxlsRCL8Z3X1hn8q36C8QZpD03WiW+6K/dlr05gqfILdWinANBaDt1RD6Myf73lNnu5SPh3IBnNzJ5ADvOTZkr5lPr/XrOVcuzMlFFZJqPj5YCJzC9wRxMJJTI0h448UWxJumjpqfYSu7mRQ5BrdDiFWqU7+uUPbWUB51CsO0qRcNuXHjWKuWoU1IgfKdoMFbB8lOw8vZRrPiAHR10IV05wik4wY5DbcshRC0LzLgEeKZNh2PwCOZJy0Q4G/lKOOpOBOSJ4anAO4oVo21LGSxI/HUp/kKKEORMoWtikjunpU+vEXlUd8peGCOR0rIzMtvSWPC/uqX9gRxbR3M4IyV6Tk89p+w2OMYPu41TXLsACv0Y3SYhRxqTd3dbnd0dE5MkijLT6OOJL1TJFYGJOqcl0LtNdMBq1HnF+W25hHDoMI4Fl5QETWDx0mGlFOlFykNUXz70ANHGQP+UgkwYlGXaliZusoqDTJtLHwWNlAmoAiDGTHcFi4acwlhp9AGAl2jZCshAaQ7MvqalRY5e4uqSFkBuWL5eEhnGLfKukpRM9XSfjBvj4TAEXQqLmmhCR3yDDFYUO5kvHuNizc/HCEQRmPninvbIxSPpIl+Qv/tGLz6WLjIJiTJteFE+QjC/iAMNJIBZ0Ijro98DLUFmccVpyYDu0vi+G0YLbPSjSoN5dOSVhleqJBCojVwwflKlIALsqPNTugDVZm+kgEJgSkeZfVjzgxni4lAAizY8YeZaCErmQBoIKPiEp03xiyVWOX/IcPdydlAHKiWmVXmOmaXRl/wRzesn0qz0dn1ni2vuDpGXXB2DzlJe5hmRbIKFj7xxelQXbeNU5URROSot3MQaQDG4oPKTaI9IlzHIDN2h9MKqqdUw66+UerpTtZnSNpImvVQ9bRNptNNI2vmkISVVzWqlB2kXeVF+izCE8qWU19d4azzFBJgoHTyYruoOHgQ5A+pZOm8wlPOIf1Z38Fiu9To5gWQKtSgnEMmnrYzeKIA5081XdaQYkBORiJBpMpwAxSN7eZVPsdMOwvz2MJwHJrK71zC8lA3PenbMPih0jl5ih8qUjWJYNbPzqkiC+UggQV2NQIJkMIz7x8vijlrqSQIJ1qITVoEEFZ/yuAyxsp4kkKCEbJbR7CbYX+MZsG6cuJ6yu96QXGDckJqUE8CfoavKawOVbmFIjjNyUXpsj3ia2adV3b0mS/kS/ixlFIw3OuWRWspbnPKNYUpE4bR24mC4ZnwuXfyB4Gtsw3nPA9HcOXavA3L2Gn6AG0z6yieI5lZUmuxmY9CGn1oSsW9gP5tXPgpTicVFX4q5siPR10BSCgQcLLZ6xmLSjWoJrgBLeUoYujHk5S+rs2ZjFtC3pBCg+216rlwZkvPFgYmkZ7m62xqLRe1ILGoRlQhWntFFpFzhyrXkTveitqcatmLqZZxp2ohZp1r7vDL8ZEvfyMvs58QsJ22Ipiy9lM7oAoiWcv4yJuZARQDUveLyWWAZQ41eLmO6b2QZA/HihWVkVTBmfmSNq7ur/vTXOK0SWuNOtHxp2ZKi0qXxfdePFtjOAbHGTY288qe0vqmAWt+k0iiXMQWWLJcx011qGRuuWzYsJPLTnr+evqpWH6lF4nuylFgcdM+xkc1LkZaT9IGswon+ZuXbcJmav0KNLbQ6dcrVqVetTPSR41amdawkWE1GVpyfcLUKRb1Xq+HKdMQr06Njza4xjaxLsadka9bvavqXaEsrsZ4g1DOJLorE2EjHJEO4NtaT8JNy0DvUIGk9qa0ozshZCpjvFSVeY2VAyugGJryGVxRhBVFbOBSWmJu9G1UoV68oDhcZ87xfJ4y+HSXKVHEez3TLFUWZ8d6gIY4VxZnicJAyhILpuAwV2r1KrWUY1ed9Pa0gClSmCnOYQmzGOjE+gDgEk6z3qKBjEXZwadHSAqpZxjj1QzcX+yYHaMS0aSZyhSGWTl67Iva+mcL0Oe6Vwol48+AdE05S9qhghuUAGiH7m3bkI1E2rAqUfVbB1Ca8SFFizhyIy+2vCT2FsjXecbsSUjxbxRpRPNtHpAYk1g87MK+EUXn15FRPfRbeNams3RQogJvVF92vlRbV7nn+6CxOxP1MF7EV6t/m1Qo3KUVO3Bg4evkue7mvhIT4AqbUEmVSFQxXHr+4OhkCXJFWDUM+yaeTLn7tMvjSumVMjhMLX5XnLIKVPGcXEr7OLYUvIe21eZfV72V9R+QWGNnuHOKcFat0cXr2s47W69Wgk5kw/fsOKv62SiProLUSUyp9LJ6qThEda5nigEfFF2opmpnGiq/UUsTRMFY8OkxhyW3swcGYsDk6/CyHHpZigDur8SBdSJGMxoo5+/iFaTyK9GanULAqRZF8XPiy2ApIiS7BzpOv2tC4WnWT/trlGC71TqGsQ99cp4Tdv/K+3OTVwiHHEYGHVuM8+x2HuxYJNPuQe+3LWBy+L0JlWdAVJXpEFIb2/xD80d5bi6WYWIoTFinkISKXp9+7HXbpZnGHg8Io9UBzqQLShAqm4yhcHznZLXL4Kb5528lukXKn+N2T3WI9+SF6oqbbCQmhU9UueqraWRPgrTxKFm4ZCqUOj1NpIsuj8k7QIHEnTscEMYBIT6YvDQT5dPaCXVuWnbtb/SUvEXm2VSlYyyHftk1QjqsPihFNtniHMQBbI64zM3Modg/W96WLBFy38nGcrOT4grOWA0xlmiO8VdBlMW4zj9n1q5m9TwPurVr1+MNtluFa2b8PhHCxl5X7V3MXWxPcISvhOdjLwU4mI9cD3Ah5KXgtNcqe6dVTdcg+qk0FKpSL+8sGG/chLGmK43wTBuU6ASWzENiPwTgwD7FyLhu8kGAX9RsOxg0d33A+N5w774Y74waYN08R8+bINVwZPMejgjoAP3p2ijwLsifNO05VnxmtIwJxN0t2NVPd4L5rvnL157/wtv99z27BicSmvQzkx024p+3eIdW54GC7f2Ub7yxf9VTjFdutHubOd93w5j/8xJ8/fMvXGuA4t22PZ+rJr8SUweTuUPuDG+79u4N/89ifPf4fX7mNgFOraRy9lIPlvj67ixwbcMt2sydbq/srzdjZHXz64Pue/NY7P/XlP0g3r/LLYb3YBRYI1i0h/JbluhvFFRZi30TdRceim06FxWIVQJdlAvKADIt7s1CyrxJryPJdcHedCsZmmQBCIFp1w6rUGyY9iHa4C0xRMJdu+zT9QtY16f2i30tll45CXeUfDaXD6vjTOWx1zZewV6bjY0tQmo/1Fqv9JI/G2+h3ewSLgQnd/e6QZKXcwuRirTOLLQ0w2bO8KuoeEyLh4BVBNULy+Zz1Y4JRUJ07xHma+JSgR7MNBNIGAa9Lxg/FrehPJlIoLp87OKvBSulJtnEvbGwSeyRzqzGtYDTMPmAuo5gyW5owbZOs3MDN8vlGYumlaINart6oIJTMSZuYI5gvd+eO8vd6zYTtcg7DqS3NYdVU+bAmuRPcoPWweOIkN/RUJSFN0lrVM8BuaOnshWm/MnTKrs+hPMm5U0f4jKtFIuL4GY1czuQ6WyYJ+6zGJlknRXcb7K+E3yZgahzxHaD+0EwIuQccB+L2kGDU00Ty6mDC7WWvFmtPj++3FsnCbbuOhguliU2o0cahSxExkYPre+Mts6ZO2G/x0DpZ49FLSzqLa9kfxwVHwVQkWKyJ+CzFntpqlmaiZA2z0ZA5wFG9EqLBCyeCJvvBRNcqsqV5rAGOx6Ot9o3jZVRKwaD5zhGKpJSCQPWva/2HPq7Xr4nji/u4ab+KmyRnJDHIF14hUenSOL5IYtAl5sIkau12BopIHZm2X8arZVg//QKTeSpMyW3EkqfRdt52lfgsGejdOOKpvHupHnyqfUE8xv2dnS/3kz0JIcPu27Mg5KgnTJ2XAm1oSqvBULcPuQv1S3Y/9+H5fXzU2VQS7tQKeUTs7Pn+qIKpwwRbPo6LOdtrP/Nie6v7cFMfl3Z2mO6sfJS4FzsBG2rfcK493H24sY8bPAKekQq+ie2Oy/UN/VKOIyKI4qV29cJ5nWZzr+8JfSpJn1yILuznZW9iYTWfBeaJVMTH9UuRjopNyyOE5qmeXccuwXF5z93qcLSbtJzjhabd1Evwc1b3ltnY/NW4p/PIWtzcHfyRIQFTgJJyubuPbRPb/qWEuBVi4VI7s2uAyJTCnzWiQxQ9hFgRpXiaSTGIY4/EHWcKHAJ7q1k42SuYB5X7fIPowkWDoqD4fN0YQvosUgj/UOOQARYHiI9xUDO7kr1oNvgRji5pMnsSXzVGaM3yQDbWK2gx+uvOaMjLYkZICqleGiUEbRHyWKPkpvHmYolnECsLxcD/3nIKE7CaASpZ0qE+SmswEEXCWwqiuMg4QPA/BgJGaGlvVbanPKzX7LeVjUNSmfJUXox+RNs5/kzA3SuujuHzrN215/00B3Ltj012cXeEkC1azFHF0XvAHOiPecjQdcQ00r404gEVj8clellnU/ZBPN/N3NEhd4iBZQEd3ylXPt0ilWCE1glndGulRUiOsz3QHOn1s3+05ZIIOwKU0N8CXx0Yw/JdeccEDbxFmRvRFkgxWlKgmFVbskdkP+Nx51LGshQgv5P9m+AUUf1TFhFXigIbZub7EUul0NxanL6Nni9KafRSDssMO7KsgGafczObSzpo2u4CU/a6S3OCVY4TrFiu36ahZnbhJX1ZFfuL5ao/DoF2vni1upFMl/wAjdQyiiUvSuqqBnZv4XqqYieqJ0u49q/FrXxHxxYr7iiPEpy1+sT6dYQjvcnCPvw8QJfmffatFloaGUQroRYp6C9Nv0B0EtggygDDzjFef2eZZj/1KG2BiMNAcWePsgqyYyLdW6Q2spLHPNlbhSAU5k/8CfqRFXKJiaiLXdsE3lc0Uvnv8a0oz7a+AlhZazGmR02WzbhI7rw1Vz9EZRB4ykSjT+FrRe6usGps/slD+Sm4a4db0MOBYZRGUMGyi1Xb8MMlM3wnt4lgIsk7SVsCr4NUc7Bvyq4wsTPCmTJvXK7NhnT8VdBnv8kld+B4VcXvKbNiElVFnVW5Otefhwhjm4aV2YvNPGNFhZooKq+c1Shog2gqjzoaZrPVmLU2EVlEjZubHFPT2AqsOOlV0/AKRbiKNlGP+/HaRNAGNUePiLTRHBPeeyWcpyqpt6dW4SXM//WG0CQy0gbzH6o3hSPwmnbdXUZjhYMoQuklHrqestbOwnHurcpiCMUz0f7uQrUHy/affHisOa1ZHQE3/L82ylHZrPlm6dB0IXaQBDDXjpYGlU2JtpwqHv82Sw9+iYmg3mSOrMa4rAzeIIprqWQdrvdMM3o7hq19aWTPcwxc4ov0iTSf6NsF11YvClZ3Ke4ukF+McTdIyeDvHfbMwXq3FBsMPZpIEfLRaSDshVIVdoFdyErUWtK24jCbHl8wCJsTtH7BI9/vgJKIkmkudJTpVZ5E+eDSh7IC6h1ik6/6V9KexmcliJsWo/HyLo2b4fegPHJdnyiuvmZv71I9EgP1gqBUZ1OhVaABFxGbU7ZPum3rNlbdjvcFXCDO3g7O48L2Yg8HV0gzJfk/RZdW+yDDOBS0mb0ZKVX5XAtsexQv6GqsJgTTJFqVeJqR66jLbgQsMayN/ko+J4r2ZlH863itXuOv4NjpDpaP9vMPbW+mqY3XsOiBGEI05wiqvC7o09FRmeHFuiJHandLTfYb2ZuktqgCqledSeZFRTJpEBLBwdK1hlq3RX4qsXBGfuPaRBEjinMQKFpo6ctLJj/ZCcagA4DCAqnsYIeHry0hv1prSmAs0nN5iFxfw8huDPjxelmKHWsSPLOhsPbEuPOae2kcELlmL4vtjgKE9KcCxhv8sbj18FKjfkWbASQP2LHhwOCFmZyEMe4GctlEIso85eZbIy+pi/CNTa8TUvjfCXd8VDYnxwaTqVMR4iqILklyNGzyAJZgYYjf2haMGIAzki7Hn5FyCCNqOqYS6BEoh6I46zXC3R0oiy7UCZJpuLQ7+JMJaN0aoumrAa47KrFymwjktCZgqXjwxXcCBtgKkTw8RIdea/jHxJUpQJpqJZpl5NV4M+jv8pEbhofXjzyNfdVP7xMHSjMaUFzPVcQQ+HtLHgB9QfgIgGQLxDR591hz3Iaf3v8vxkk589QZJzHpVIyT1JBOO2ScHF+IcRKEmvfdxwKyGWpw0nTtaC0NlJr23MVjwzTpv48AlhPirLi/JDkUhSUijUG1wcpYY1MsUWnBpjjExVUch87raOSVciEP4YBL9kdZQJJnEjlwkvyT7Lu0RwagJ/W4YAnEpCSLD1GQ2ud1XKbqAb/vL/UAVDFxc+AEFNAnqds5G/I03szZkKfxQYEyhnSICpI5pLsU2mCkfiJSFTUsxwdVV8XqBIMrUk4ZfdrZLzt850koEMGt1igQ20EEc0IeRAktZjIyfmBjqdJAATJPowHwgd77HgFqKuQAq3odB5dCNVrEKtOOh6QBtzdvuadCzJOahmTXl61eKbIPO7x0xaweVn1RsTustlEBUlORIEoDodHsHudMuaA7tWbJzmsyaTFZLGTX90X0OA5xPd+u74vY9UWxcJxd3xfRMzkG9Xy7vi8KfbiQXZ9E2/UdXxsjJL+26zsKuXzPwh0+CCrm2/V9cSG7vi8sZNf3hYXs+r6wkF3fjpZhzLev7Int+vYFtZOz7Pqy4ts7Njyhpatziu368SnNBlXZ9zXj+gP5Y+v6cfCzH8uuX6HOBBMwcCnZ9dtDu74YxW3Xbw/t9XKttV1/NC3s+qNpYdev0vx1Ru36eCbbrn/vWLPpENzy7ZRWd5RAMDaKi8cIJtMZs1z+DenZwqVDc66Uf1pagIq3ijseuNd0SdoXWhkfMaVi6GR7WuJJO3kOb/xROSA9ie+8xVwDR1zJKyhVQ2TMpKC7H+DQkVBbg3bkfOj+yJkwT5o+jnuBY425LN6Ea6bR0TqOEHrK16MUOHkFbk2vOWEFaPuyAgqdXVWAMH6mOBS0C5OGTpyDNgc6WRNXotJr48rZKkFV0+IHw8PHh03xd8PUWgM9Mmyg7gbag4zuU8lVV27BSLRAA1EF+Qro8GyOrqha6DIfiUnvkqr9oiWXc3SxjxQ+TM3PVE0zeFt7soZ8/N6TN6SeR56kC3+1E134EFucn7qEYmehCF8G5WKYTmyZ3sjmoPQRQkJw4IwvhNnb6w+LBn8/W0uB5o2/8C/VhY1/bVsjF0HLsBILL5bhqVu6JVkzz9+7Kto2RIfIp5YCLZ7eNUxRzh8VSZtNCnrBWY0Dwg4+IBKimg+TIhKLOMzCF9J4ZFat98Lw+IVVijD6LlRdCtgHRh8HmFR+yRCAGsLjyTWzNCaYYTt7SUKaym/IIsEQcCgnGWMmDDjcD69cBThExh0FHCIHjgIOkXcrDILQvnjVHC9AgDzE9GrJ4Vb90i3c+ENd71B+gAeavnUNkep2t20OAfgU8oM4m2P/CLRBdKbW+MnpbXCjIldNReB/6vYQbl5xDZJcU3maZvXBSI4lSR9+xJePuo768knmlUbwOG8+UJQsHfL0zN6RuCckaFQP0n1FG1mdywso7GMpXvhZjd+Hoo81PW8/v3k9FH0K/MrhOzn0yn5W493cAFmE3ogNSVEuGrcTiVSX3jGGForz9yisIr83jYFV8kOfwjzTgGLx2VIRbWg4zMCGhqwA5Kbt9fiGButUccy8eMKBlEU86hThQMoU6OLl+TZMUVHAgRyxI5+Y47MztO+9nn28Y/3bga9d3EiHQDOFm5ZJXJx2a6Qh37v6Z7TeOSZCE8QNuywyEca3onw6ouxoetP3lTaGXhUfTQHPJXm80dl+ieHXLt4pSdm9ft4fCRXiGFcOpRXQn00fNW6wU2ZJGZ70q2ImMS7pvae3spBhb0hoEMMx6g5da/t4WZ4Zx3kAvu3nUnfoWqNZ7ew4XiUr1PqY1nDrRjWMNpF/8jPC0A2orsQpCYIguE6JU1LkQkW1s2m3PbMo3KMi9G2C3ZAqaCu8wtCnJvuxYuYLaBMEENRvStZAS8eG3NhIPFnagNF62AaszJfo8vUyMi94GQpntFzFH5zwBjsZiF5QYBeQI2JbDlLnJWrFMmm7kVnGTmoS8ZGN7uxGsaCH7cve4GmasaVYTuXVud3FK7t+skxXxvpkua6M9cmyXRrrafhMvl8NjHFoXlNbmj7RhvvMUQTPalwvGRxYi9241OzlIiTUkD7Fm7yvGJdPb4JgBRxGcEIxksQoQvsgaKv8poZpQFkad6IluCK8Af2W1GHp7GGgfa/6QqrCePEhLYXVmUBcsq37TJZqOWEJH3PFhsbbdbiIJHUofXa6mgzBLKN+gwBcfmF/SWXGrQG4eEZqbbk1ob/C5iabWGKo/uIJsFgVzOpEYC0LISeDalX9710nuUH714BoV5M4qBFtDB1Lt0rSTkNCSzWNy8szYtqW59KIDCdseYVGBNx0Lv9rU5P4yNMxGq9NYoINp27wWRrRZp0xjY55lhD99+7dK+dyDjHysmXQHxyr2WSUV9IqE6ymr06esa3s14XBbGEroL2dhjoVLzqCUbdbuzEUhg0GgwF0k3wwqSi9EIPlYZkk/phPVr5yuiUtEwpgojXkK38NEplit7ggxGLpfIt9AkJpZ0JR7JSrAqDD35Y9XV3fjtxHmcGuV23/D3XnAqzHeZf373au35G0smVLtpTo06nBMrXBASc2tsHZM8SJkwEMYbh0YCYzDYWRTJsjCced2pYcCVsuMFEH0vEwKag0gwO1iUO4GCYNahPASd0QQgCHcYiSOLETDFGbFJSr+/ye///d3e+cY8cJSUvHY529fPvuu7vvvvu/PP/nkY0iCiP/MoJW6rcjWArplA2qPizAN5UmlkXFZ8qiAjcFDwejAoNLdOrMUL4LKILMCz4CFxJKOTBIwW/pggp0opYvMIRMQXtJ806rFw8mF4Ad274ONoZhvx3U2PnrAGPC1Gmr8GLS+V2zi5FkoNhOLsY21gC4GHObu8t7Yx5yPlJfZ1GstxjIDCDS22UCfZ1SRoRb9MZbGJeyQeblI3uTRF7vFs9X+gqJOrB5qFDpZ8X6M9msEIlmdNFoRVrzxOZIlUQweYKAy2J99rfUy5/BqV2s7/ntWJaEdP0g243Dqx+JRax0oQekWQ4oT5xJ9YP8XjvkNavzZCYW2UVc2hT3RAX1z0z1wy8YHEcBROasxshWtixLbOBnhDnk3Ty+GZIq/XfOS3aa+H3rS3YawCS+BlksICYVt1B8XBhqwv661EBBIs2razt5fgR3Tp8L2kENntgsIAm49p8TTpr3WOws+tlzI8XsvHd9cnPcAEePdFWa7vdXrwGYIXkHDuR6NuPwx2kEJlA3CHXqGWX6wa2Qi66PXMw+d8XnUlf2bIvxKQ9HHV7iwQgewcu3qNnmJgMz3M0o6zyvW9ZJJQljCCICa7PxXT8vZAJt/W4DW3YT2E+/PDQs9M82N6x7JTkWmjaJkZ4sIHmumkP1Gm4mcCXInQ5jS3W3Uhg6cr8O3ERcQVekdvcnvX9JZ2OdXxQgsPrExfkm9ut72sWTzSJ/jl+sv3pPj1zMRxL8ODdLN8nJPZ1eJnmr9jCDgc5cBKJd7Nr6xFD+VT/CGEPcRxN03nXZbBr2hpPor3jv6KS5ZoqZ09uzKfp59uubzj3SLJo65Ovj73v0N8Osp3NR9uUTuagM4KlcFNjsIS3WDyxj3Z7++n31luqH/eg1rHgTY4vQkTiDw8mmHMrnMpSFBVBESzOv8CqyykTSYFiJ3me4hZ0UVz4EwIACYNygvFka9Br/ix61M6bW1zvyUqOnjo32k8fdrGGlzZujpX79xoulgw6UcT8EwowG38ootmr2Hj5YD36is1f3oglkKVr8nosVeXoPj68JUWnrI2x9ZO3W02w9vXbrE2x9orNVV6WgI1vPXKy7of/cG13wpTy14WSrL+vpLmnwjJfE3n9cl2TeBU9dDFFh1Johy5RmPXtf9SauOgaVvtqIavSAh8l6xIpClUUJ3vY2YLNImGSyX9ok+6qzDsq0e+IWCOOiPf/PLj/mwuob4/rOjevjFVl3fSNZJGuuj1TcxtfHnn9c16e5SUAQOU6JZxF85xZcEgN3/erHLzXRamFvfPaFZWtKGPQFR84+8hiD6og91TiarMp/ogHFoYln2Zx3AJt++C+7nGP2SlMHudAWQC60BZALTQGk+PRcKKnb7uBeEDe5VjHLuO3M01kRNmBFbIluV4/pW2DzurX2jRvSwAZIq0+MS3PEyiMsVvigLrrF0kHNXRAWMamY7OFq/cY8N7Gh/nvDbsVLFewM9Z6G54EIk/4I7ljvUcqJdiNEBINH/N0jsaJkd1CeLqgkaAepLYfpC9ODw0QqHXIU/eHRYO7wTOFcCYtIRifSiDEJK03bTbcKJ86mYqz69p1lUFJbbBSUE5YjvqVOZpd8utPYkdeOj7VmBeei40Z7C0ejGMZ3Ucmop3ZbtXxGyqMkLJzJJOekIRl5cnJS0b/I0M9WiiTwaxJ35A4arF6m3V0+HKkQxlXpdXR0SJ/1TJ/azUn+LU8mhlWABFoVYt8hib4eeWo3VGFoiUpBA3lT8XAhYKrTIVGq6Q4RUmwP9cTXEmc0EoOsjd7f6FgRMjbmABYkOx2U47ISSbZIuvhMnRyauRhstrKDzFuXwYEd7s3p6R0ad8A1tOORNRk3dsi0JSE3zTFhdLSTStwJ3R5dU2FbdM5fo+nsaDC43SIvwpc6YuKAIEmOfv0+o37MZ6tXGhdFtxeKD/jRiDe8YLArAztHLBDE3xuMI9VuQRRnq/+A5Y+Fy0sbAC39JiCjNJWIUCSkFeMgVKC7Jw4aDoJvELQLqBZeWmhidMj+ugKG1pwg2PN8KLvhX0HcKo5citBGv36Y8bKy904L/h85cuqpnrRAV66685j+3ZFbT1/HtvlYO7P76DF2zh9n9ewWdu1g+fNzR9m+V8tfFLmpGjkuzzbiw8S8B2vOMvBZBlNnGUyfRavNWfTD5ixqKs+iRspZ2guPu6qc46MA/cU4+CcDIRaItMzfsFPgOh4eQGCwprrz8YSi4FRhZ8J64UDTw7Xd/mr2ONWkggwRtCa45t/QyItw9ykRGn5N4B4kNVq8RxSBGe9R8gUKRLR4D30O5NC0eI/CcTaF94DJsOU5U+pFVHv6NzICkXrxFoXaW8yDt2ReoeQxTiplctKAD/vYFpczz9kgtEWJV8t16KRDiFcrV9DZQrxaCZDpBMkpJUgUsDaIQR7SS7lyGBedDf6DqE4L9RA8+49RBCoQxVR+BAYlXnpIH5RKMZ91Q7QA8+3aBMrplrFhocmcKBqfKRMF5OnuBikS1cQ5RfKOTJGo1G3jFMkpU/r9+UiMQ64YOS0zxN8+Xm1ShXxolwB/errS1QbrEdM109lVKe1StPkkLRnzFEEvne71zFP+hL5gINU2jbCpeYqQNIMLvzI4DfUewqIkMAczjf54pjEDlHHf88xRTePOvOc+Jij9Hoit/iifEhOU0siqDpueOmY9dcxOvYiz0y+iVpsXUT9sXkQ1lS+iGikvYtufuND4elNhqac/OrBH4fKGPIWPn29D4Afpa+UiIEocTGYS3xEHEnX4RZFPQP2NDwcZZGMNLaCmR9RscPpBV1s26NM1uJaw9ESgRs1gyl2Qv9AMJh0zHokO7sjuGbuf7C58lBnpts4pGe+UkG9QPW7IsqXPousyOGMu+rWRaiz0q23yeIhHReTpst5z8AGApsqEZswvxrDaBHTBcaslaRxqyrW0YalJqBD4nCzud1nUtmW9/C5UUE5PiRCqUcnu1du/U9aoXslD9S8dOTJa3SnYJZ+wGyiqr8eHfMGS5dMjkZnuWAjJB1ULoPNmaJKews0CKautwaH6HoEVuQs6VPKAxlsLgqq5zWDVeGIWEBRCuSi/cX26v5f1dr2oQKupN1geXL/KdsCiz/EF6y4TURFEO87NcB7dwGxJPocsPv0VKTBY6vjKvL7057ybDZwnkMLoUjg5yL3HXM1YGRUFeMZTV0Ax6eoeySQq09q2opOdpyPPe9lO2Aomc4K9+wmY3Ff1gYEIZmp+Iwcpn+TcBDDsge6VIm4KMFowrxMZSgE88OaqHHLqTQKpulalIfePKXxKaR+okOXkkyv7lVF/3iDFSA7IvrpLXyBxyzL0e8mbKSQ0X9+5+nNmU1C9wrusYn9Z751I0+qvKiFAClO0EmJ3FO3soPA6WhB+T0OJIStvjXjfnEbn8uZGqUycnJ+FE3J8de8z/NXms/qEcDHsptSE5JwgV8gy6z2vjkE2pPitwjiKdccqrBH/S5gpqkB9WikrNadYVN1VjFgF00HZOaYpGoTPop+pv58BrK6/Z0cJ/48rQXNth1LPySj6lEPs2xq9uKfpuqPuuuDPEXQHQEvBSXBz4mSVFdFSyF5pa8t1gXOkUX1hehUn1S+yRTlPIV8KraZRAM0a2IOGpNMEm8T6gCyc+e9CKJPb0M3hKmQjq0HdIAt/JyOqBgNF1aQD45cA40fVhwFZmRJUVoW+VQ+N+rO3gw1DyWAoBnwI8+mEuj/Fmn/urXDxY16Llb8lzR9Amr88KDsr0f63O6HvF4l/2blDAkHtTvQBpBLgncPO9jlvn2M7fRndujy81hMwxuy1Zq4YqvzxWlPtYuxeK007liotebLVt+banl072h7Q+6/TFr8iosW+Vvl9ls7TEmNrtLJJS/D0j1ZmtATVCloAiP0MVr5BW8yPtLKspa1eulBL0PsPVs7R0hYvLWpps5cGWlKRhM5++fGVOXQFmotTT4Z3Hru2Jw1W3zlEeIYrF+sARAOGK7u1tN1L27V0vpe2aOk8L81paZuPbBucIasyWrnsuFpVLUZcsoSHBisX6dfP9a93aek5XtqmpV1eWtLSTi+NtGSMc6dV0RXeqaf3zbR67pozDlYu1RG749g7ddg38asL5PEHH86JwM0FkLNfnaIiRF/lvXZTg/xz4MlIICib0rUKyXjVZdNp/0VMvukYa3UCbFwvS6U3SN6gkucRVmHrTyuh+gNAteXmG5Fg/BQmqouAbTUIhwXeS//+BfaXAcqBqtKLFTAsY7iE3DK1SXUbZ1XBnrtLMZmRYIVW4yobY1SD6Euzd/Dj/phU+yj93jt4hdlMyABqRpajvXdwU917cYJpX2nhPFe5XljrK152h1k9fNnOMXVGVBKOX7U/LFxfgKIO0EwTKpfr6HgE9Z8qkeZzG2YK1H/ut6jJ4i4vuWOOXdSPfkK+Qp+a6rCuIXwnNuFcqhLhWXPks8DwelVKtBrcCMWzppIsgQj1XR9lKuwXEiNv7up3RBtXZU9lPFGCagOmqWxqzhL3np6/zjjRgh9HrkXz0ttG/ZmpyiNN1YMDmt+d/h51ZZ0no82jvrScXeE0XKWeE1eyLA+rX0A/PYWPJbjMALletZguOLpagAZlA4kk4KLfKt6CXfwgzDcV8/00RV4upcGuu0xTQ7NDn2m1rbFrH36HBawH1y/PuM5TrZmV0AYq0RfKH/TllKW0r3ocQxu3qPpz6iDUrEgJLo3KJWNVLPOBbrQcF3d1BpjY4MUHQk4iISOuXQV+K1/lE4awXrSv+nimkzRlumC1lhXkJkb+qa74CpQLcEGJZJFx1xdNyfu4tZ43VU8dZWhxC1lSsZzuutI/0YPooMvjomItpPFljJGl03XiO1gixfBKF3OJj95Pa9jv9ZWy8V3BM9qVNwQb3DckFBx8XySgLtiUekwDKrLJ69T9/7iKcJPiNQeFP+5R3jP+2LA/sv1zQZEuo7yAyGDij2DTGVUfQw893qQji+FM1Kf1nTaKST/Jn3MY1lhHrUFua/6eOBvAK3tccbAkIw+CVtJ9gIJb8VPtURKVYNvHcF1NX7u+8U5rakjG5JHF7O2YuelNPDDaUa9TxFS7tjdEsifbxXvaxRPt4oPbQSU9FJQA5qR9QHl818Fsx1rmjj8+rlTkT98d5ThYf3te8OG83ifG0UOuTvN7QMMPu47oWayUG9HPu6LLxEngccRlDjDB1IVMCzvkYEVShrTPGkeevMD8oKOoUDwTAX/D+TzjxfhVGeDJY2Xl0n0rb/2Yy4PlNVzTB/IcO/cqK2Fv9nFLjDlCIHaqfZVJn3i1DYp5hyIsZaBFeTQeqpxKVeRVH7KedrU8SrFtjPyQz9Crhp9izohEQzlhCoLeaMSygQnWcMXcYKNMsPV6eLOgCUsSdu87m+toBQXcVTA0LS9SEG4Nb2ICM4Kq6ZdzdoFwqZYHFMuirauwSKR8mJK165BoxxyxvUHJVMTY65HKHpGf16KjwOLAuZ6sKpOc5OU1cRwiAbtzeVP1BvuRr0jRdX0M3U+WXhlOVN6mHw+/9JV7FLFAH2Oheq99PHPZpxbCaD80DUG+ZiPeFYiupdTNrR8L2JPKCjQ97dRcFZJLxAbUrXB7/JWCQ41h8VfDJOfbXFQVxOpvNrUfRfdAlRvS+UIMCXZ/lZ9pt/IEFEN7FpP7NlYgZM+C6SKUeyE+vkBohH90s+TYoT4Lt56reJkag0exU0NLSy7DJM+ogifFt3SF1Qf9vQvBa5gcgJ0RFBBergkKaDmDAtplSrn7MFVn6/skl6EJBTdcV+QiCrqOLydyUMp4q19FYUkvjQOqOIeMJApQG6K/KEKNemC70MkKN9Y7Jko9x6nVWsLo+s6lqyKQ5xyXgROhyyBdpF/rseiXTZ9oMfpE9Gm6NxF9mOrMVC+6VdqqA5VXymIOhWCm28zz/eIgBKVPUchdajfJIGZOyN/bljlU1X/ZMWPOipaKhX0j5TO0/orLB7E9TdvlUkRsKNXopjjLXJQznjF3bgi/iMrICi+euYlVSRKtnJVg7hJkJm5KvIQukEShJYgEqb6h+jLSN5JUzZM6mUUOLr8PJlJdcDWp9yuYKl87yktdvLlUn45F66rr7wJvqSo61bwKN4lFeAGBGC/Yy7Z2jK8/9WOau6DSq5SvGeUunuUKefYR9//YSDo/UUWmJ1BQ4AbJmthP/qjih5TliuQvKn0JfRnpZ/yOYYCS1gK3bVmvPfF8jBhc3krIbVhfwFPcEsvSYZaispeltiXHzZjjydYGyC0lroR4S7MsfkVlUGSLUaAPQDh686q3DQ61FJlXU2Yw7qPQP6zf5mcxrD/IUwBg2Pe3U2ucVcSBy4utzowtBdELLo/peJ5a2O93iilOlQy097g/aVSGwR0I+EczUL+lsvKS+LHi4nS90gcR52MjxI9xJOCQNfpV68ZXWRL76MdhFEhg3xAAhHBE2NtBnCoNbjRqWRPYFUBrxjPVR0XBXS6mGmOT87uMb+VuPoUqxuHyPqVQA7RXQGvki+Stq357cCGv42NpZB3pvIU2U8BEg9q2kaJeNdXTMuizpLqnJ1WWLm+WKGxuDJTCOcwfATulVB/zrEPU6G0I+RMuQEt+bfK7mEvkaYU8vHlyFEjHn1FghvKzeK/AxVOLVtb1iKOyLTBhw6Q/4eMaE7qdIJuRBHiGmDN6LU6lxR17I+RZnxI100MPK8ZnfglMmtdyvLP1roMT72MUFpcwrxM/blntMpG75piL5nauv/Cpi8YmNDixueTrIuj5D+mS0tF61x8fKgUWml6NDjCFFLLUwom6QiuxdHlWLw1la4X5oxNjadl8b6kd+BU8AU6PY2i9kSiBJolHxNvjSQTPW9qZxfMmxQYa3K86aFNP2v362nh9BWjLOlo3LZ/ZxZHKypBuhdkpIduuhPlof4gdavnxOLnLJXxqdpC7S8eYbEq80Mh1KhkmwZp7uZ18Fvod1zo6lHKjcTrmk49a4U0FAnmx2MDbXVJg6cxQs9DJ39ffM4o7AH1jOJ+Pxn5eJDkVdCt96FCOjkoMLNVSbBN33LkMus2ocdVuBoYdK4hnUuGZW28i1vUi8FEdrvG52weruh4qKp3esWq0Boz8Mb/nhbbDDzVdcsciwKK74C3j5bImIUIiPIvL6XFNdBks1/KMSY3Ma8GdNcXF8hw3Qs6owwdo/YhyIvkfFCLXhYXJIJsxuFPi4eXRW4cq5OqNI33mmkKdfUY5gGBbu07sL5zcJEMGsYdzPnVe+9pT58VxxXjZ5TviusWVyd2hrowDax/Aj6M6at/eoRsGO9UQfpbNDksHh6QgiUYAbXYwIOyV4iTOw5wMbvWruTZc73JhLo5wYYE23qDgU3xo5SWbiZEjZbWLUdK3xiRN7YWQNNBAdFWN4cS98XsxmmOqE1JS8SpyAmRNHOsykpSUDvAym3NBVc2T1hMM/i6etKhzmIQg09g/mde8C5x4Mi8Lf5WaC3OJAJrQZQBZ0w9JQlrZhd0Lq4owkOolFpOJTb1kQabj/HxwMTphr3EThE8moeLc2hG9wltQV0DDkcPkSlZ3akzCQmYKGwU3JjNqViPJeXlv4DyyQyKbertaUzijtObfk+DnDDRnFFFwjuDqaJjd5j67Of1ATKGuW8IU9QWY8wVKbJ2TR54n4Nzq6szoMIRcpmPRDd2pywSe2q8eDpuZM+oRN61nxVyIX7oQN6i09HCSCGxu/HvDIsj4QPOR1gw6xCCypVbdhBkUaPk0h2Qtu5z72xq+EVk5TXwO1n7Dtzrb4hNi2FXDA6GI3j2Wxgvoz71hv3hFNRp/L3BamjcidXW53kCMPQZNfRI7uZHdkykfatVxKsHyQhA/Vm32yyrtdEZsv+gWyqRrNilSYQ6U6e49IlpnahW0+KAWtZV+yU6TA5qnD/bXMOpc5BNEJMrnFrIIBUO1VsgiZFNojSqT5izy4H3RS1EBqKv1ZqQrw6r+qNFhDghFaZHutz+8fzMsIg+nmpi6v3QBD/TbqGnFwO6IPjFXCImnGSTwTLaXCphmJD1RUCer9985mTtm2IRTZemlhgljxXfpXGe8f061Fi5vhhB4UfkDMadkQFqsicoddH/ommdyQAsrSyg5X9EWbbCbsD0q6Wp9B4LTe6d3OyBMFmph5SKO3jW9m+LpuZXLObCa3uMCa1XvqN15XRk4gu5u12QrKq3ubqPdS6d3E6oWXdyEIyfTuwi9U2Xl4W7Drz4F245q54qnaUoeMzG+Ee4aCjqbPZiGIrnEknul6yBTAQvpsYCc+OPZKK785TCqtlXSsIZ3oGEdUJx7SJx7oJjpdJ24vELqxEFC3yfWLU8r6+rEBbRJwoBnOv7nv8TxnmigJrPyLi1F8qUc/+kn43iFkTD2Niqbnxi6xxKt6B3MpoMK4OmbfuQrb9oTZTQdXwOq7/MkyQBwqUIrcbpBnO4NX+7p4CJQY81ZudMUdYy/mOl4wRftLAu8IRtf9JKEtPb/mNAHulSCHwq/KRctaOTqZI7A+5zw2PqNiskihs1U0SPYSKbAbJTesj5CZmOZkGDyqmVGQq62Dpi9WfQKGA/qiYrWCMvJ6g4DVHZZpAC2LYtSjjsEtaUyXDrskMw0olwWkateg1/litIQlZup3iVkH8GGncCKbViNsfI0ZOBKhRTdDU96YWgL9AeAZFY3pjKuUwaJ+NrMF+KwpaurBMgOoIA2HlL7BoetCVjOZsBSt03xSq35E6l2lOPUKrFKbKgwrbGhAIYZkslWbgf0goyDqJD1duKB/indAqIOI897UR2pzBwd9wpSONltY86qIJNrlcVEh0dLUlfpHKWKA8eUWAGneXYkk9oOJxXsm+qWEhnVfYl4soMm4kljff0Djula7wchXEg1CeDHQN49mfsxcVkCUDLr5GD8loyHxtwS1JOAE21y685GK1h5mCyMeIMce3ZWjAC7KKoJlJGNmxjfAJw0dbSgs+RVRI0prifkbnZqLutVZtuMC5IBiG21Q3VUlN3M1kvyrMObxc+ZD4eW3IIvN11ageasvOHntfemqGpi8GudP+HPaGz5hZDx7XVZC+azU61VKSgLA7+n8ed2ZFpoHUtLp4KK2TyMc3oAD9h1cwwrrMaIYdl+VO9jmzka9VOzwSr7ShHNTatCIuGOMeK22g9zAkzDVf9ruAYj6776XJvnYvTr61WKQlgghzFlaES9axhEY3o3sr5Xgf1/ahhX5PZw+Zf1slFSN7vPvp6t0foyIyHFnxcEl/UIU5XMVUyDKINV79Zo1k3FCcBCh8Yxniy13oSnfw6KPm0mCoiesSe9cB5s8FrdINlalhfMuYmROr9KBataEU+xKoqqt1nvFd+LjltGhpfKqJ5yHo3HDc8DzAz8T3Un/LP2WJ9d34KjEvdFiUzNZ8rbAmgiP6l3s20kRCDWdnaezJs76zINkulP0z8H8t0/uxXCCtG8UhmO2QA18lTRH//cUFIqfUFraH0BF0t1HpOF/Yp92nWplrfuh4Ed/J4+vdhwmiY9OQPygQENL9mgOVkNnr4hQmbS5hWc2yfr7vhK/+iNrpEBTgXqmFlr/LKdmpFlRFMMMCflGF51GR+b/dIp6Ey+iACkRpLKT0gcWUdIFuk4Tqfr2cZ8PlhSCkdtfKeVgERaekDfh7mJC+kgmE0ya8L7S/pHtw83Z36i2K2mwW2Tc/S6zW6ag/TIyM5dLGVTHjQu9iwtyU+iJZBeTUvysAVtdmOzmyLJNDA8zn00ck/VfNqnsaIGOUUkDnVIhkDIM4UG9/hNg5gVzyiuFTwMcBgCOFaU33XNCvVozfSNsS2U77zNIor4JpEbcACIShWC/fz+B1Nyk2k4qR/FOlxdHNqKclsQeOPASDgoyRB5AU6kb5F34v39/gA2kWJXDtGh50htTmnGqV2cLdMCSBfpVxiZ5qGkY3Ren+UD1dFkd5zN+L6GEBsznlJyDxq6kaORHygz5vVDIZuNhn8gyOMy4BJoeH/XUo0xvnE4ywoJ4WcGE8lvoKQbpLy9a/qwmwXytk0YbGsSBkJtf5P5Nob1N3KNjqIvj+Lob4gEj5lVvWUyuKYPgkLHjK7pK6xySW+O2f2S3ha/UL3tpCEv6w2haqn/2KnW3bw0gMv0ZK/ufXM0AiXt7NW9byFFcmXvxUHYcl0QtlwZbDB7r+mDSMBPv7r3glCbN/uJpTa/qyFR64vlz8HJwvJng0wPD7SqdMRg+eNX4vaz6LejkfoCKCKPyrUJN83Jb9PNXHD9gJwXB1inLjoFvfGDciACy9fbIQiXqiXWlJJ81apIiNVzmuprfBrSuzrN/Nf4NGD5SER9jU+DOSgo5qD6Y9tUNqJMbDP+nUF86Y9A2V3SmYyMoJKF4rMwqTqz6TkiMpW8zsEUy2wEuClSiEwx7PEPg/yV0ePsovOdI7EEXJy0reGsOrMYHLb1ovdZ5bo5DiFijtvmfVSEMC/FcaJLtQp9HAfda3sc9K4c983eF5pl5Tj4bjnfYz3vhBrLk52nqjkfQoSTH1ubsqn6k06rJqT/nCNxODE41CsCQT1/oNfarjd7gIja4mUFlKgFAlgBKIq3w0pAS4GpGuAIRNMr4CitvscKUMoYlFoBTYkZ4xUAleBKvQKmMuScz9/3Lf3eisZGbAf8CUwTqKx7DFAURL97DH7Ue+gxsFKv0OMYoVqhx4BQWQlgKpBc9xigplfoMThRr9Bj4KNeocegSr1CjwGbeoUeMz7739Kfze5qI929IH7Sc3f9RXj+YBTgUW+mr2BKvUJfgZp6hb6CQGVFiNHxm4d9S3jJnn0WxIrgbupP/IGgztuLxx1Gl80Hdr6fnSK4mNppOsR+/fvsq6onIq6Xjj8+/R+zA8dRwCOxa4ldsfqRZB3UD+o/ZTdfiONaqH6k+mCRPdhR/ya7sFy6p3PEol//hdrZ8HSPs4Nq0o1Pd4Q2+WTH6ZLxkD33lI50jqGUcan+xQ2O2eU9v7LBMVAQLtX3TR/DZQU4Z0f9VnookYbuZeGMYLiCs5jxJ+V5Qvzqn+dq8jvGwnNWqljYpcnRCzsVQ/PChZo/vXCBBpIidseWfVfMMH9BPbr5fvb5XWBhu2KFXjhf4TkvnLeyKxa2KRDohXNXLlUrqhjzq/c8DXv9s7V0RW9ILGwpXdlcurKpdGWpdEXJK79LQlyWroxLVxZLVxZKV/T6xMJc6cqsu6JEoF+W52nO0D+j0hWB0GOBqkQv9EtX9P7oQJGvgTcdCRt/tAk1fq+w8Elt870HFH1609mnnvqktn/fgfEjgxK+j8iRk+rHqMaCgDaSXSbUSuQB1pTBFcU8MFJMsIsSxM5Aupw+oSlWei83YGMoepn6sHzBAN0taln+tZT3RdyuL5UCMCRqUGRvPPUj/ZfaYmfunr1ZkBqBl5c4jdavW13edP/x5c33yj01bRrVTHp0UyKUmOXCQVBFbL79wUs1BgmxyoOevfnFo9uBQJAcUpsElzbtV9h68zFRxoxXDtM1cob2ZWdeuvP+O1cO/9TRe8E/yftSNG1VX5HBIcns3dSmjYisOBxiz/jfEVwfcGeV7lRdZyLm5CmOQqdmJlUeEDTpCaFlH9pUcfVDIgatv6Aw6WRB5V+1DEV5WFN+oYvrVZxMyEg28dTW+i+QRVizAzwQhcBKigVwbqE521l+Drhq3QlU/2UmjKs1j8+AdXzUoVuu0JyQ20MMC+cHb2D2koFYVuQdXYJiA38qVF/gFJiQzdSSvGYA0NbNVhnrZJHxCq4ZQVsAuKTDBtUVpv2UYRuX4nVqIiNByUWE7Nfl9efiWrWceUdKpuyHW4IUukhqXR3v+NSov2B3DPxCYnanfIuljm8hHz0wBLD6yF6A7/my3l5X0QqjKsuIF6TlFsWmNvVT/a3tJgwofv68DgXkJb1LyFWsRSAoxAUjW9j68jzXMrIZAkAlelIHE7FJthxzpYkLOLjSFBfrUPFlO2BLulqbG/6amoRQyNxod56XEmViGq1qJVKTqmdAsM9pItxCJXFgwIIAHnlJM4RCoxiCM3BRCP0IkYa+1YrovoiPmQYH7EoOvaW0Ef75jJJa9Ci5osrLTewjGkV63TQHDdUjQKSSP1MMWWslfyZP1TCKkkFzmvzG4MG2jCel2eAtMI5FZ8H6nsBfhOvEUgOUKNl3e06jtZ6TCrb0hbtrOFiIGVaxUSGIKTSxiBAT1jHDnwgcGG1P+UnU4fXq47EsRoo/ZXSiEqNJjvpBh2wSHE4Uyv6ei30jDk+E3DpBv4btbntqh6i0/p6wJyUz7fQNBrk7fRsR7Lgyr0aAnzwbq7Gf75PqDr0GWRsUZphfTn8ltuEoqmG2co5DpR04AFRmv6sD8aI1abpMgkAgZX4vOqAY6QIBrz6XGD9F1Uj79XAdX8bWWaz+yDO4R4etHjdtOpklMWjpWUGj6tw0MWo4lq1FUxRKwEBDLDsULCdznV+TOntp5LVl9iEUnAW/rt0GEi3+tHaLksCq+FVe0nq+il+2WpCMD7nlHb1dDTFr9ip78wFAQRToWMONehtO/ErtVyESj0Vr/Fz8L/qOqnCxQvTPvBI60HEQatYtmMjrSiYG0pTgBCYYiWaXLwmRgDmKbEzfVf3sBhS/ZAhuIWCElptTHK+yYH6pXM+rd3Zy/NZBEQfQy1DMDXGwaoIC9GTjoiXdDfOjw8vr0doS95LtAPMV3LzIylHXO7vCPHSdstDK9PaP6wukP7cpgrhwr9PWgXQTEz7/COkG9d7tlmlK4bLZm21FyMoQhpy4YebF9AJif4zuPx5yPowqgxrLXuVOwpwg6u4euPiSI46JLu3oZPFWunT0Rp+msVLgn1DndBQ44PH37dwfBfdiqaNsdfzP7hdKmfjLz4aV24aVWHkuDmDjjO6wF2VnVJ9zO33pjO6wI5XO6A47Uo0/iiNV/NF0RvVt90lsEYeX2Tij4VnaGS2epZ3R4lk2DignsQNaPMvigKb3WW+Jk9hirjfHSdL7nPdJ7IDKl/FJGgeUkzQOKCdpHFBOUhzQ9D5lXLeu51fT3XzHQDlXq6mR7GEiK2phogrTbEyeM6v1Z787eQQymhiz0xSDgPSTQjIMK5EhIdCTJcMUpgjaQiF4XLfPTCBrWNVeEgqjNsySYbI8oiJqNs8p3UB/OCYLKRkm1Z0pybAkAQjcOycxir453jXpLrfoSoZ1D0rJMMoUOE5/EN4l+RMVPZJfi8teoxnWueze+PSgL1s8C4QH+UgAeagqN8eOuh6jHVqVUhpKhW6Un/LEovyUxxXlpzyrfKQKEjt8wYOPqlUGQ1StMkCiapVBE1WrjKWoWmWIRVGwhSd8SkZnFAUzaKMomLEcRcE5vilh5pS8CDM+pctJfEpem5kmtDPjU/KSzfiUURtc6pCF/Mt3dtTUIY+aOmR5hVmHnIWyl5dyWrVF0a7XZ+XjpZ6QGBciCyHBmUBojQiIVVIrUZKAb4u3JU5LAwz+fP/EJJuG8gg5VL3fJbfykSAv8P4G76XPqeo04gyBQXUlRH0cGZvq2xpijUAMwVlhw43dQ4ffNS23hRvU1ASQvt3aAbRka2qHnC6YWQNbadSVqG5Q9um6BimSaLa2oxGzQfbqf7Q4qq9Ui85WsOZ0RSTYlRUxT/inSVfYx5MZazq4+nTRekT9kRV97QVCYAmQSa9+IrepsgVtSENDDGaU5RI2mJx/PcJ7neOuniLR5FhJG8uqH4uT6Aws1YexHWktcrYqqHR2sFICpz7y9ujP59ONGHkpMI2kd/rXL0tTXm+tYAB3Kcx8izxwBc5kVgyVavj1oTshGVItUgugAE/8yATmshqc8GU7aXn9VflmdCr7GILJwheMqt8UUh8QbqKCnVTwMfUX3kVcqZpx/pjfblSQ5SvU/aifRNOT++YtboxcsSYXEo3stQ0t1uQGXh+KrYIWx7+AOyrXyBvYi9UQiMZyNPjYam680ZX0xn+mGYv3qSHfydI7vUFpmbjmm2KgzpYovmv5wKESU3WEyu86TDMumjZ3hAais1Ga6QVhbEQmFVS/Oc1a15P73B1kYpy6g16MM3fQjeqEKgCablnBQJ5Ks8ESBorgN90EmpcdhlzC20lCG0/ikhBfmfyqtizEW2SttqUh3qKcQVMeoqs/2b9SPO9JQDP+L5ksDTSCkW99uTyaQ12opoI1BY7wg4X1liuxKZwTfyxhonUCDwY7pgojgZgy5GiYPFcQ+cm8jtWq1EUbiUxg4/qGMZbN3Rf0Ka4O1HsYD2DHoXrHT2KdvyRS49dLkFa7qE0T4FI1dSIMonZahxgyLilC4FSkRfoHcVmzuiyQALDR4VBIthAgAPY1Nnejg5sdxcIsNSE4wcHWMtkkyFaUCDepf+1Z5U162yCC3w/MleBGUeQLxo5RfVS+hBTNKOXZV1Fy45yyHqG2CFDSeB+8Ivqlcpverq2In5lLRI9ZNFsxMkQi7C36SDRb4BTRY263+DErsCpeEbWWCgziE6n+Cm/0ISdnBtXz2cgXwkxfpbGzUnDQO9TZcsZbYPrqNA/T1xM4v/qIuPknZrP5vAFuXtpLVE/ozov8iznt8/g3IirRBcwx/N6Q7iFvdTA+uyb3nYRDpPwb4RDNA020xGAm0VcqBkSqfqCQ4E6BVOrXEBXZ+IhSyq5f3fe07WpSlfskj0iB9ia6s+EvR1ZyH0DD/If3Pc2PIv7IZ98xtvi8+8UdicUREQpbXjaUbHfZfrHVpZziMbkq9fsJGK1rO9QPkGNgsBmzL236jNtJVlPgVnxFfTm0RFWGUpM/hLTqhOKHWYc15R5ejj+EeHa9J4QtnH/XbcVe+CHdWwMpwn3WUxKiwk/pPRnC8weZSMqkKfHa0SxVGxSAtUVhbaFYp3rsGerD/Mdg70P17p9kYMkuOGj29qhfXyAWbf58wxySEaCt/zIXQtaGOTTYqQXLwnwmN9VsZg4SuIUrgZi4s95Vd+W+rAa6KBw4nO7qrwds9qvtMrJS8D8+NSgmSgnw45POE76+X1wxt6LGQph8/vuNzMJfXYGaMzRZkwNTz/zGEL5t2C6xEYTYISaI0K3uBuVgduF7EJ/Je2EP5HBGZI4kjB7yrJQoFc0VINtKAbgKXx23OSFLIpkgjOgQy+MM/JlypwITRiLaHGBmOtehPlU40+mMq7uO3cN+RGcwXzXhWt9V1lGAW22s+qbyexebKSqbxIwW7Y2a4Pfkd+lIU5ymjyiFkDo40Ief8cytLorJyVHis+TfdY5P4wM6bOGDtOVMv3p7hBBTyhap/371aXdpVxbYmOnDNcxpoOqmugGSF3E8kKaiddscL4p6H6/KqIDKHelnA4rV/CKFRXQpurEsuV4N5owmOo+Qz2oUQsRwvyGAHJemUC7Sr2C8etWTzCJim8cxAeInYNFu1wPEJUd1tTscR4w4QgO5aPl/Kj9V6/O064DoziC++6/1OVIp79o8rHe+nZ1rs6aGkHv3b7GbguDObjhEjGw1h8/VcsQ8MxM8bBKrzqjWx3R09a+q/xocidHiG2hxTVb4K2nRSEm3eIaA3ravsEXFBKLNBnSuOuD658tpmkzrXzYTQZbfAfjUKJkPkKvCyEEPHcvJ7RKfuEB3GlWauamjfwscm9wU/DHmYu2kjihOUEcjUeN6KoO6OfoOHQhhTPeAUBHQ2WFtcCTbTH0knSgRbJJO+R5E0kkxlcScZ9JJf+cRoCbpZBMrk07BJkPSCaCV44WqjyBJyltEjSEVnH4js8ciUHKZW8kttTVtgl/aVbcrwJudiaW3KIud6GdA5hdn9Wxv5bXv7v2gce+9ezVLfaQnNnVj1Uf1gh1RkaftZwJaOfHu3hFRvZ158+Hbb71XtxyzVJiVf6lwb/9QfZfu2j5h1a5xgc1gv2y/1x++CRJh/27NLxSiKezRZq6UYaXTd9oUL+EzHQ03orkV68Xv8svPxOcuE8Ce/nmyKnZ/cPk+zTmBWgjK2HK1tcTJ9lcvTw2V8fsG/UUHflauuwueCcwOFwdR9KhY0AzbR0dv/alJ/7aIo1LVBFDp6K2TPltVcfPtd+kLpn/5gSDiLg5qf3CrSopin6BARII0wNp9S+zTOOVkJMybHT6zPl5wxbWiMOKSW6M5w8dX+KummIkfKdVOnxqys1ST4acLCgBP/XS4wU8dCp2Mj06WvuRPHdN0qj/3a1iPf28QRT5kOUK4jLxDRxZJcQdvaMLos1gc3bi7laq6gXfLWXUj78KbeOlG85jngT8IB4SXXiUejsM6yhRI3RMFK1GnXRU/GQfbtGtqAZWAqdeUleENJRM8PuXQzdq7DEmgUsPn4rRoJnh3D8jfGFf/poT7pVHvdLetg+r1UdGe4XcLcpGfH3+2H68xcN0Op5NZ/BMXhv2FtHjSnYcieOR58dkN5U3RdW6NvrtswLRLOg7gccqksBX3BCeL6wmNTbYCnnPyNIq85jgdyaJRnAk0HemYsBBT6NyouqZmDBIoDornqhUdaGxbsSJ9xmTGV5rSyNuvwrWXq20u///GtWewIa7y6W5E99rpx5pr/+UM6HQtZI0q28eRJJasHiR+toTnn84S1idxnSUM+5R3fAlDmI/9szGERdDcMYRP9cIQFp992MGSDZgygxWILmawbA+ZBM9sBasXuqhS1jNlBb8uHa/CvugYm223JM2tK+NXdCj1GZT/3DN0RYV/qFBJxGr9Dd9XXy66RHVqi3Js9eINsiD4aISQDnd7y8uwcpSHi7Syw1j++Cty8RGjAOqfCksCVEPwTr+8qU/Z4GxXPuuTPdOZkqr65fQpaAR/LWPrZxq4OjnMDqREqdWwPQw4V9SScS4dLpAZD/eTYk0UFuh5a5p9wcCmsvgS9LXJrOdx6GLKCow/8x0Fekl9YxMqPstxyPxhXUTYnZSqXimFMn8iYOLJbG6UeFb4Waj6rAJxSVxOdW/DXe7a5EJfXjQITY5nELmYy2FKS+UOU3BIuYPShLVICEt2vG4w6EfyF/UUx1hMRm7oPvnkQm9robJktyUD38j280f1LDHdJ6SflDWQfl4d8tYQYJvjx9F0nqC/NyFBytTgzwRur4v6WV6IVolR+iDLnvn3zu3nT/Wry238KQF+SajVr1OjfW/wVxSWjOTL0Ku3UKRoI1wNj25h3b4/vaEy+8D1SX4keSCnpWoFUWkuqQDwPOGtk6qFaEVF7/kYSBNhhVkpyxHZrcn+6xUzkmxvw7VEX9A79Molrcit15/Xitx6/VuTd66s4+5e1tsd5egp2ei7807ujhReU6v38wa/rL1BSQnEimxX3WG+zPG+MimN75lyHss8RPj3qR7VRJ71XE814hZyG/4wQCXEqyKQbmiJKS/UdbXdBOdI2OFUUQsn6ASzayQMjKUHE6Cvm+Lxm722dLMC4lrDFQM20OzeVHvq6x6xxWvn3KxY+0ZHNA22TZgFsNuE1E3ioFNuoh6MBf0o/p3yEq/txMYAuPRW7njNseMnTp4SHSr3k6SPAvcEyKZ3EChbs2V+3Za9xMi85GCalxxMC6IMU/x4Yqv+PZlAEih8SE5LRFEBCjwypsUIfj8ckdjuD2WWbbC1/tCXdbg/pcwljo6NP5IcrynWFFWfUaVVktrwqzCp1APXKpNcezTSPZs1zlwZqm9qAtV6mYQ7LL/3IcGzyA+IE2G1Vk5ApLuYRqT9LvROHFhFiTJ3ZD54byNZrG+Oc0ns1cqDCsxX38FL8r74OXSlJYvoMkR75Oq2zkiK3dSE5ulhApKDptbV83V98gTLd27zYNCTQeF+kYkn1dWsxDtE9W2AU+snIvlmSp05OJ+qT1J+aJ/cxoWbKG+MSYwx/5K+snAEWWrQSdoS1jYlbDwis0veDbhXs+nd4iIi0RZTI3NJ6k8XlJrInggMQANviJryUZDLEq6+skfdvL9thSNTyE3iFdqwIa+jNXwud/4z0MtBmRlV+9f0KTQ+p5F70Cz4T65UTj3Im9tZsIhsDca/EHGVpPGsx7IpViTpf//y7G2Uh0X5qvkHK9cW91+MLFzLLyyHcVExguy45xmbiEWDYwYRglAa8aZtrhcAbgX81+iI2ZXxnXafVp5//F6+D4osOhWsJgFxmJ4H0s1kzTUWVGXnLnRwsFhn8sNSzsNFx0PVDrcnmAxg9pi703VZcyvzXFgABNHduHXPbPLWOv+lb55BRjzLu9tPGxmIfn3HAOnoI4OG6idiP8EiNbPvUr0xv38YybmQ30utHCxpVyG9loJUunwDfbxBWHYRW0slOSihouuDKClVPXgW9A7c7Aullquhq8RZ8gp5jGTFcnuU73xsnD7S6kpuv7oLdKjLsQ23NDxDRgjugN1diWFcGKRQxKfTfv5k+lcn5V91qOyy5CqV4pqqq9QW61cXOzm8N5PD7HF2GFydKNSLBdCqWYVWWCkHtYcUpVoABZtSLR46dV4txwhkSvHjKN4CwYfbGDjY9B+z3XC5suY0HKrsWvBbyk3T5Ktnb8tYz56516+hZg5MA72PzIXXL/dI/NiHMJWXRzUUlQ9Ber1LuXmH0TRaJomSNwIVKozgDFBrJESToYrHYVCDhr9TMcySE70uhOKglbZVYIUST6mOUyvsyPsE/bde/hQXDRUdv7LV38lC91N91CnZ4hiNjRHULHEBH5GrhSmyViqSwt1j9WKJxrAf/uWp4lvn47ZsLLAKe9U42uV2lwLPLA42j2cAb9PHViTF9alx84v/LHSBzUMOLlSl0TwPMl1k60gUFxjH2WfHc7AP32EuzWcbjJ3rR0DjRYscCTBMXuWRLWWEn97EEP8YERg5LkF/DTosdjVM2eSsygA+RUC7pVl9wneyJVA8QYtt0sztWHkQm1mqrCY1bEBGYtC2BVhorvV3i7NmcRyXyzF0SWnKg3l6wg1mRjxpHuoZCLWdWGsItTtdHr8hp7jm2T4rB5BSgXDbbgiyQ9N/Nv6SJgQzfzYbLO/YEmIFNak9w2ZLvJNyHJstfiV5sF2s+0lzUgXhoBZN8ERkoOMZRg7J9rYzxS490EsdFcTF+SMm/+Ph9L0yfMBXbASCj7Fxz0DFMK7r1nTAtzQcOkzXsiSLM5b8J7mnrHLEWaeIp/SSuEgAwD8wshk+T6MO8RSTtUEZDctzKgC0AiHwL4XqkgmjKsuKe1XgdOil5tbSSxmNToB5bkN6KQK3Ko3kwDXMUjueiZTpZzJee0JE0l8TVPqP8rG4CtYGu50SMivybwFpMyIA0J5S7GJeNiDCO0Qir3VmIFEsWxitjBILn/kPxLo5RNYLmzFCUGBS/68NZLhKgIw4V9/WKpudMO3yF/rxNhWKqvhs6LQkIlzMfOlGtE0P/BEuI6wyYmT4UjxKl25A21T9cpLTDMMSI7HEJ2VNWtFu4rqzv745uyqYLird/DI60bA4CcNjDy7QhHnxUPvateFbiRVgGtb60V+1sa9XRCsf6K78VXflg92V092VD3VXPpwrfVY+0l15rPuzj3ZWwuy+Y7Z6x8Df89Ub6tGh6n+HCW62eCH+2H+BYIjvC0NcJlfWMwkx+knm1UdzFSXNpoVAHZu3EO4b/8iV7D46sH+0GA8i4JGEUv5AqXqllMgkOYTrPBI42JU/Ebaxuv1WRZiuQE6ofT2xLUgPRf7Ie3nzO7kW/QaoYFHZcYU+P6Bdc8Y1v1seaF9bdvk97THfIw6ezu+GK7+eJZjfv3q/MDZSIVKsLjpJH9szu8DCp+tuJai7fqv1V9ZtjW2SOWr6r9I7pjqFugyEjqlLoFNz3YP8+GJ+ybNGw2bTKzRtz6CjoxDOVWKVJI+qFRjk5fQkr7wWdx46ILNc8zW08rwH+jS+WU/qSoEsiWQorOrz8FGfr6hnCvBM4B+xuZfNeMnsnfacQciFuh5b7NABNiR/vdbNX2+W/yJz4ahmG7o0FWqJcPIJ6wY5+WI3oU2/hm9PW51ASioLp12NoYWskEkS0gIOmgRLrhVidma/ID/Ark4uAlg/g7rFZVgsQrOyoju0HZPoj6KUsFULfOH+Zt0B8DbERvrt8ly6rPfd5lCv5w4J7LE7LPyYSougLQ8x5FJazGQ9tMcjQjj5ScJSRMYAlH8Bk/CSR5BYAmiJoLXYozCorz5Y/+6nPvA///VNwU+mst2AjBToBxpwADILsCVEXoC2KG2cuRHv37A5Pi4mP4sIAoOdCgsQMd0fy1Aba1UguLIlUAIOEz7Sl/vBSch2GIwgNrv6wlerhfNefVD/zr36oNLV9rqFhaL2c16bxYp30JY1BFrLghgYwh8pDrMKy6vWMMfbEJJydXnxIJHh1YMU4rxa/5yrtkVuQdt8q/ENofhRCl6Ic1jvD64eJJupjsy6I7PuyPIwYpJ6empm4GYGNMO1TxYOrk4WdRg/EnqmX2qo9GjnPTylsgfimzeJcago3ExELB24dLuZo1MQS19rzypsg4EtuSRZUMW07x64Mng64M5XlWv81infjP+bPpUS3+A+LWSqUULJLmiXzJTKWuwiRMguOXjxYpT0reqw+aNSbf7MqibYoRdLqAYkfDz+SD/MpIz6rgnWBlFw4sII3IoUOAK31MB8mYHbwA4RYC2on6ePwK4N0X4FUd5xdUWB6Dyer+xJzTvES541uHENZHEdVlE3XKNnHVZRZqixisQzCkwRv7FBKYaABEHWFqcIKDHytiUCYHNVMtt2ktaAEr1ZjUyDEj8+Hmw+PFeIZwOmoNO3COTojotOxOgVuGlmwerN4AHMXdThrA/dEMfyxEKvL6uilkkVIEXNa1fvP36vkn/QTLbfmyMu9uO0ErpwLoA51/zAqq1VKOav+5JEQLadf7zKjJzfF4MorI4vY/cs4eETIVNBaXhqP+KEL0gPXRaytoDX9u0aVx9wpg432BLpzkJLLJV66fjJ5vhJ5LLNSCwtjhRTX/ARZMIlmFK+Nvq+3TNcPj/8O6WsnZVjZbgsDNUlUonQRqQivDJc3srfB9j4QG58YLisduEp1sYHc+ODw+Vz+XuKjRJYirT90mRz57yUxV8yfIhfsMiKyonYwSYWWVHNMzvYxCIrT3jTaTaxyAo5UKTgUYYvyAIJinAPG9X4ybm3LW+L+vmi/j4557bl86AR7mzaeps0PvBu203bb1s+R+Jz2lTU4Sfn37Z8boh4oPGfimFbQmdfCviRGlVvtMSyHFy8Zm3A1dWy/N9LhsfZgCes5Vfxzwk2aInlW/xs2HCLVHLfTZnrPH9Cz0ujonsv5x3SI5tBWblXoFPVyg6vYDtoZeKVdOL3egVrjAc1nJyrU8EwxkMZTs7RGhA4nsdwslVrpuPQoxhOztOa7pmfwnCyTWs3QqNO8EcVjC/SK/A/pAYryRgvFOGwLR7RAIRUThhjUltG+tkMP9Og1OqCBsmCfnpOuWbVONyia9aMWf2SxlH7BKx7oCc6NXTbZ8bt1e7zpgbx1O4T2j09nKd236Pd0wO7HUmcUrunhvgir544/ngq/vTlXt3lfAcm2Vxs8auS548tfqOyw7HFL15eYWzRRS76VuVI46L1e4ZaeXU5SI2yqby4tKwzs6m8tpxe3WNTeWnpo549m7S4EHzmi/WwukMTG1e3ICtODwFNMf2BdJanw8Obl6ZPWV6qT/yWXK2yCpngSBX3svw1pOHf0lxXaRbdJ4LJKTCVJsbqDthEouL7b8s37cuKjzmPqGkhYmS/QryJ2nf6cCY5HlDXmKnEm/dMwIYTLbDBA3ja7tfnaspLAI62EcjBRHnqmYny1FvTPawDOUTY+0NThko3L60L+d0wGP7/zjSP/zzdwweaR2rKEqsr/42ZMGxI6F8ct0atykKONyYdpbWzDWaZqe72fYxgeByj6aXElhuAWNmgRm6xtgFvqHwroX325jf91CCcyBBPccwbDtqKmJGIesnsFAflPaoVwn3yZ5VQK5KOeV0FWYA4pJLg83glshCQjMxMqVhTHYlxCudzAUKyCgSBImus9g/pVurgW1Y3DQq4CgFrkx8H1W/QWPT3rbIxKbFZl7fFFhfRq8BEBtlhfAp6sr80WuRqXIW0ZCA+1WLySMzAnUoc3ABOsm+1PnTTvub53ZucW23cY03ExMLCJWISMZGIK4z87wzxhBIeARfL71sVYsU3dBlTBFTf0/5ckZBO9EWtdyMheVIklTs/SqhtuyHjNJ0tCbGNQMf0Dgc3Oseui5AkkNYX1QZJwNI+mXOXAPNFcLhEq0tBEV55WZrG6hhG1kHqOK6NGkSB5/CKJWoHG1/KwoqJ/Q3Zi2LXejTb99JXlrDbo1EQ0plvcaVkNKuBpzvUKqe9+hPrDs0KTuKWVjSV9+HYKwVwz5J5tWVHehkbCzlSJB6uLUQnJTdxRbNBs+bgUlsfewff5/SC5+NHTV9SuEgcCPA4dlIt8xBKfEBD0jCZhmyr+UthZ3V8PKVSZZqXKdpBZqdddKEfzwttaaCe3SfJvXjMBT4S6W1ooLCNlCnpH2joh2wpyZsRE17g+4gPPyk4fFD6uATvSSOqB75ufcBUU7EuATOigbjq8jGioaBplWBjfpVQl3o68qEP55TWeif/EHjiQ76MxOkqPFfctQ4AERE7VC4DgIjQpn6T6MONkkzeP32NpA1saKlnb014oY2b5JRpr9FWyPhnB5YPM3bnyYgmk9pnMSrjzxQQCJtPa6X6u4F+e0pPI3ToD0uo06vE9I341cv6vYqLzYz9e4feFSRrV2RwzEc9u4Em8xvII6AftXKHoqXih0pXHopReL4i6jpfOqYmWJLg8NgLwdla9JV5YyPKraJiFb/ThbzM3IPUUlTT8987eeT+OomXRB9D5yk73CQq2Gp5SUbJS2IS5g4th4wWlVgrWaPfIaQw+W4F4Pw1DZIS/S6ON8GHE+3E5hR/LbXpw1XYwPVUV8UKdMDsPv1D0TrFyxuRhKzpQ2/8mzl6icM6HrJ38EKXWJotwWizISgwL3si+3CBi8FuLUAYf7o/MEyMuyH1Kzn2cRVtk7Lp1v7YUG8muslLRBoAYNiEG9U/Nz1PdJQ0BG1E4PXPyvSieTRCG+08KjrsZh71cs6js54AI6Pn7dvI6F0ay9L7YlabtVJR+9aFdDGhvDkRPBH/aN4wmNSonOANmytvmGMVesNmc+qEDYqUnBIEJA8VymMmVaIyXjMDgV2kEYq39w8HcxDMh8Y5qWdRWFhfzYIaAwxXRe6PDJAG/E5EuUj+4Y+oCKf3A1Ef/JC+USiNiPhv5cjgNrsomiQqtMaSXy6mKWzEBvNMJKVgnq2Ts9ABQEeiWGiyfxFqJQZLtKpK9L5RVvKE3TLDMZUISiZnnkilRbH1dfkFdUkAMUc3VaqkeSxqrd8hXGoKLjwUi5ZxQ0Lt4Vi3TkMciyfk9KfCmXGl3GhdaDjPup+gFCLH4SykcsS6iekowKEnVJ84fhz4EiECfFWaw4kAzUnhIRK0QQsneZmbNQ/oB9ars4Wrcr8cheTbLcjRr3/1D/WVmTGH7HyWWk6lVkG+aRB9mp/xMgHR1XL1I74B3SwpSsSGkGHGY4qGRgc6AbDuRzsP0448CRKmb3U79fvZFHZo/dhU083Zf52fkFXVT+IoRaWdJ/0gETjH9n+HeSFnxwL0tZ6Cb2IzYQYU0vQNkDc4GyCahtyHt+Pvzm4JzyPG2ufmj6z0ciAbcsCdH8MnZqGaAz7kTD/D6/XSofLbEP4Z1eeQqDrTU8JPXPDNYapHGo7HvzflYVDJYThbyGuGGI0LPEkvUGln8m2QbtL0aNU9kMjWBB3q2X2rZ/trQEWmqaFQo+E5pZBK5GcCY2EsqtVoAqIX/mio0UTKW8Un6hdMOOBqpEaTXsODaQwDprV7RFLkFpdwG8yUsKMMCo+q1zGTjqr38tSOv0WfN0VSNAn+aeANmL6Y78S06zoY/aUVDLqBVzQBxEtuWNWNISmeW3iLy6Je74yDB2oooDKZmDNGc/zf8lUonAFfFXsPItnW4ntTAK9gjLSps2e9pTMQj+T/4e1LoOMqrrTVrV0tyW2wjYxNaCv8E2ch4WQbkkMm6f4JCSEzySRMhnN+zpxoaVmNJbXcUhubY8AG2zEJGEFYDIbBkIAdwMRAIGYzYjdbEIQEE2MQu9lFgGDAmP/7vlv1+nWrbQzJjH30Xr+l6lXdqrp169a93y0WdGbYLqoTqk2eHi/I2aSCqdBbBpjjhKZ4i8NuogFyVOw+VuwWuUVUMdA5GtbMILnI5NvyslVgQYd+iqJeZm4U9j4tQbFS1ralSHBPNCa7CIuE7gOvW44wzoO3LvREgX8D4RdlLoJS30JliHMltt1cTLTYgrL+yuCEsmhQG0ysZsAb5xJSRVhJH11RCCjYqiBsLkMVygLBQhUaP7JQhRyHshEUUBqe0tgQ1WNURrMbdNk45+Q6FwCS8z2DJ9aRB8vW1puGUwzb4Aj/0SVow9IiAWFcY5JxwTXHZGhKHIoIvRPp2CB2dk86HqePMun49xE43cjyaihwUYKZYPK8RfjgxTioMvNckB58daOLD6vGJNqb9UGogjC4eNjbx331qzYozdjAAR50ZfJhuyUgKy327ouYO46iyDr/GJj2VesXLBEYI7MQLFbeQmDyYT8Pp2wJYr8KckHwWeqvUoNgo8oBq/qYtZhEzMIdy3QZ5OMXPMqdjfrnAkcGbj7Z0/2Cp1jTuXs+lh233/y9Sf6egMYU5NMxSoQaxugkxekUxrIbbhKM19C7uD1C+w0ZXIK8OTy9HLZ11wvkjDZ+6n/wo3IKBIA1BWEbbR292IJogo70mDa4MBoV+OCaRHIj70Z4TVDsIvFU95DeMIq6KRI/ADsHmcuU1/sUtDSR1AjvLsF8BXUlbcno1V3AF4fLP20uzIW7VL+y2HRM4yxvdJ9hAU2nFLpf0C1BcyNbnMWYAOjpDAObatrfuOgZtUtCOqZcLLbc9Zl1k70npzbuZZIEIeG4FOHUadlpEgIMKBvMGNrbdWoVYLHOebkOFqAcHidY45gVKdb3dttdm1eXXaQiMK6RRnQyCXwhjRACrq1SWGHgoXSYC2crmhLoR+7Dv8ECyEe8YxuC9yo8nLAiE0Bqw7Y623Ma+DP8DmhSYpGYJR0cRSTtRmj6xI7pg0u2rqBvxrwdRUIsGhvrcF4w+EW5wh+bGnPUp77PURde7gIIorVk+IXK1JeW0e1cAIhF75ozfpl3qWwredf8/su8axCLRe+aHeexqZH3S94VWgl+pvYEsnshjaBsLo8E0GJyjNq/4kGKsFrLg+VWCBwFkwcnF3JABBamNOSim9o0iXURjFU0TUJtQXcybg8ZPgoh7GnfURn/E3PblyIO4VFo+EHMY+YMQDogWzjNm70Osx3TUtegO240I0s0ySpOOULG1UqvFSpuZyIlLx+/g/1N+gbJdtnQXqR3JsQTxNM5gpBVkEN7SM2kBOGquXJ+dZvxVBgIgdnCrRvgWdVcJcZcNUHQ2+Cysrcv7N9DFvSbHIo2SRWETIQU21jTOF6v/oGMBLVAIUQEcdvMNXoEuhb5GSv8c/JhXKKg6pgEL9Gco5DkXEbAqyh+sQLHg/ZOZLUsShMY3sQzlkBv+DQ2WYG2ZxvLM2Ngi1aAbm7yI1rzJ2tp+4POiG6lTgnQh7Dlr3o2EnC+PXwtdVI/WbsA3Mu6qmyJCYJQ2cL0WKrhHShH9I6imlt8HqZTanxvweqjEK5nbzQ65mmORDT7TKJ/sc3p+eHa3CzaZ8ofzDAxNRjEH0kORIc1dGLo40PMNOQh4tpaPo846OUF6kAcUIWxbomqgIHhdqmdpfsFjnTCwj1+CVj5hvcv2XHVFVvPGkZyrMVTYEfxd6NYnXqVPbe08aaCjaGqSHLHzVuWnPn0xjV3MAkK60MwYbsbLzL2Julqr/P9qH9N9BXZ7KEBFx+/ZAGwnfVCC2XkMKyQ65VY77ADOh9R9UkiDGHutd6IWVW9kaIa19yuN3L7xG/CcJ9O1oXWGQFxJNVroTtaHkphUB+2AA56I1NYf6Tsov5owgJAKlYWJHvouMw1yYY1LfQEeCih1K0IhT2g8KRoGjbPYdMIYFNY/xWHIsVvBJCHkEOzJrSqLrTf5ycERXxmkWgb5By4OPY1XNYVtAhUwEWTt50AsZFBDhJxuHxHk/fbdYApyHce4b1Y/G6ujxlm02OmQscijY1WARCG3W+/ffIUkzULfx94g5TYDI1eHIgeEcEFwzT5C+fRnGA6lvhcL69jc9J8Pj16cc5BAiyMBI4oJsz5CPAWuTfgckQUdP40JnEJSoz9ICfLJN6AfDl2021i1E4ScItRb5ulLU8gJWqD8UyAWlkogALjdH5/slNE0FqpMaj84aRj6yZ0O7mbVcQh55tpppCZbYGg6P3CmLUNVtpRu1o5xz5AydI8H1DCq4GlRxEg6lHFzGr69IJWQkKT2TpGVlM9IkcplAHsiHpgGWIhwimxxbQRyd1PhVsF9io1xAYugfbB0k3ec1IvqT9agm6oH9jP7POJqJka4n3ZuHv9VWyR37gI3OVcNGk0oyDL2IxaxHowOLYV6+zaSi3u2gl+QwY9Jo2ZsT+HSO0WkNzPMImwgAUcFCGwAi4tgjnpcwvDikDVJItwu/UGK4KX3YUX8RGLcComheMwLchoBx6lyPGSq5b8HFGdKe+bzevA2uPYtIjcqWChxIs66gt0ZDvKvQDDv7WJGnsJ/YAMUOGpEDqBDWqgwGQzZsMrw0C5h4phuB6j9XVF7ApvzRGsJU+G6pNQUJHHBGBBRWgF6ETDr+SLDMaYvNZvIz2Hy7PcCyhgZXI5Lrj/GQFaJ6GiaQywj4c0AB6Dk8JBJWiRFNARJmZVyXORLAn9aXyx8LCFYZq8mDcZKzNKxgRrDK1wwFwJp0CPW/OFplYOCx16FB0yTfCZcI6urIhUYO+FYwgynzH0CGB2NYL4C36yQmwnL5A3B7cBNDLkLOKCFtHf0zQN0nFBHQAwMQbG0KCmTk1+2/IXJcM9y9iB5qXooRYUCNMHuoUmKRvUplWB8S22TsXHbA+COkDYRNQRILZ6tXZr0CdZQ238ukC8QuKU2TRzxABzuXjoE8foyB0+wFZV/4l4GItdUphHHSBFOJCaijthdnNDRU1NpKYmWlNTiZ2xJcMAm+YW2dKFsCfFZJP82TB/gKzLFtLVGF4ci+H3K9sTxN/0nsKGDoHWMEy3yFq6kkPEcmFCk2NwjXfLbOmviAbqZbmz1LgkmllmYG0lKxoSAzfgpo+WgDu+Oc3QAB3v1ksm0KpQjizQKnFhRWy6xcR54fgtBrNzaiUh9a3bAGZPOTscy6wVigU4auvDyYrvxO6wJVWwnNHi+tjC0hcuIuFHLcdiigyWUcHCueStePCWWSuUf6sueEs4YqG3/HpJy/3gLUm2btEUeluLpmOku3PoPqBKMw3Tp8owvXLugO08mnm9TWHjX5CNk8kuiO5A83g+Rd/VU5OUKvmgUg/QC/SgKnZy0frCuQMpXrcFvRMOVLSHUZS5bbAwzi0RzJIliwCIXY6rUVDTetmDFUh5j5hjpjpMAmwMYEtSkhd0476fLXXtKUioDyInQlYWFd36YQkUEktM4BWyqu7WLaG6gvdZTbaf3Y8H99lAbH273xLcZ/Mqf3guaVWO/KtwPxGbGxC8MjmBRGsS0RpANO4WSlY1oQBPo3oKHwI+pZbMnpJGJWkLaoHxKeXEX7LYc77zXGzCuMki+N4jrezdCt/DX1QiYp15t0wVaJKGDkTTM9K0GUSPw54AcTSlw9Xr+hF/3RAo92d+Gk7iFAVJ5Rd0zAFj8M4iZLvJNx3wPffi45cAx0Nhr2RxNXsu94lRawpMTq7hdoyWT9x8pVKlcpqQDiCqUqxnxeJvgFu5bBOyLo/A+1us0qVnYTA50+4gtCWiqNqcNejcYKq9xqPiN1holuj3/zn6fSdDRnh0vJhWPbyDY3AHtkAKWervmM5IjWgKVi9haOXq9znmFyF0/T0YWLsJuBWgYB3zIV/+x2N9BZ8+1sIVOFMJt2OA5mdCav4VT1+tja3SOeoMeAuDXtOxZg1LRuZgkpi9xu0HuZXxHaIJ4r4NFQN04d4BQid6znB5ayX5ArsAFZSwKxaMJcL7FtbCHOLSkVbyrl/4ursw2+NdF4gV7mK6i80E3hXPp4bO7mKjiHcTsSGvwQ2b70XGm+9h+Dk1rPNddMpXZ9AXclcOpoFA+RqB8hXpnQoYzEg62MhOdLBLnJZADBL0WIsS3BzoCVAgqasdq8R6P3V7oBHAQypNqC6htiRgnBhzqEeR0gRvFjhosdKAxIrYto0mfmrNuLSVlgtKOGeENaPKlrXcTYPeIoh8V+VxzrFmcTjnQrAFC7iRcQO0yjQ7AyKVKxKUmfQ5q+HABtA7unkbQOcEFVj9CULdkEaYFbddbf1NcJ0TimQwyVxcSVGYtY+btwt3+rRhJHlTOyEUDvkEe3oS480SNNaKAB96Ms5SyXnH23wued/NeyvUlGJqphTjbIoGMcj4FrM6ZYergS+88ylNTVHs6h2uB1WlPrHMdV/EsnFhrb0T7SQ+MhXvZ3xAbD2Kphr4SFC73B9YGvRPA16NneFLVlykhJUzKBmRcUqsSKsRJRVFmcL8WWAU0D4NrwB0fsb4ceVF+fhkODA5/YwvLoqHJ3Qz0pMaAgWgtLG8nw8MBlhaDqfN2ztQ5mnFgvtU2MWv4nKGLqdcvJOxGxiFXJfcWWNwZyo9rpTnBrOzwQfIjbOSKOGCA5Cumj4c8MS0XeHWKq5W5WQrh0HpQhRkIhR5B7zZlj9FMRedhpqzX6/bU/cxUGz3HWFV4B7moUKczbaPBxKC7dBWvxzDQl5lsrDFUo72OyVb+P9lG23QV1amvnkSI56ftATH2mVLCLi7/0k4VOJOTaoGd7y9MF6M6MUIXwQTIVBuLd+u1du17u26WN9u6Iwk8ZQohMLKIKfkka7zqORXd6FYimX/4Z97bFeKrKB6mJ7Lf88UGcLc0ve8eKHvmQID3zPnvt2v3j/uc//b1dvl57js9DOcTbjRYoSBEpaj2bmM1bmf38o9C6a2nVir+7UkmKXecLIAgAQ4FWnM1nCSkapgT/3iBqEmJikVKJniN0ZAYdXnmXFl0T1bIoZuaJpAYMXwPZaJoczC9xKxBVpBAlOOKysEPC67Oneimy3Gta7gQvtKLrQDdUsBfkMPF9pCffwqnDEB/Cr81ILqWrh9yVMMHc/sBk7GRfyLjFxeuJ0ccqIBOoOw8SxYC9c4msdp+ce3DdmP8VllEWD7qYrdqvakDkXmDfGFmtsNMaoiNq94d8Jcg5wRl8FpIKifTHkCZDoh2sncgbY9uC4/e8v4QftCblHuTLycQUJeapIkTEfjdzlNFWnAZReWKXdhF0SGI2DJhBrh9O/6v0KxFNZzrUAbxC4lN07mJC8Ri+KSTYGKnIOv849ldTOsBUwYmQBoEAvpk8PVOEJuItAYXWGS8bnfooXe8dR7RxT/ExZv3s7TbRCyAy9cCItjv1LHfnhhM5tSS+wcF9YZbhqwt3U6KlYxiKgq9ESUEZaaIenPBfTwOHSKszNO/JPw5/MxOfGGnb0oefMWLRhh7SUoOXbrHQrSQywF6jhFrfj/8+hzUoVrTadnfL/ykPgn0IMdNJ2C4iVrD6NmahC6zjnfztG0SUZBBsuu7LSvSqj3CMBb/TVoCNdVyx7vhsLQ6F25UIEvaPNYxayR9nf/ip/CTgo51X4H+43y6EDjNcjT05y9XHSbKG5Q22kme+tp5XcGbU62RIqlIDR8A0RSeCDyKV6Jxi+lSO4iARh0n3KEwR1fWUSYa+jUXNCQRB31AwglYtxaBm3JRVWMP6BAWBSZkUBb68SKpfWtfFrc1OAceJyWUE5R6Hgwh9fWND49LX6OVEJuG9A4vsK6QlT7cryDYybeir5KTa7zramMny6hKL6DG2H63Cz7nKEXOT1ACOuNbr6GxiY3N4+sVyIdOdx2CUdDJ0BKlDTq5SER7D8tGOYXT8Lh85Bkoqm9cKxbQFMCXEEmhVxUz0VTrVPyYb8achAEXKzdKBDtR9noE5KNpp6El+n+WhE7riDU2UzKpsMkGYdy321pGSwlS419L6knnFIjucnfcDqN5Gj4BpQZya3hG1rn20zswDRjWW845bdcnEJFgj41LwW9Cj7oTKYQu8cK5JZawV5c2FgqwLdxChPTHWT+t1bvoS+t/R/+UrctB2xla0hhfjmgmP3EtiJimK0IFAda8Z4nwcIjMHXxz6BSBDMjbpgA4QwsxJbAsV9XQ2VSrd0L2AFrLngHA0GGloZbQYCsEpC3AvCbg7SAyaVhnvrlAngKfJQxc8A5mS4BxMIImxvPs5b1aDw2umoEiiDfcoUYIIFlYgyLjHmpyuPofa+LhRFdITKVLpfZJQKU6XLILhG7Xpcr7HIFi8NPEhgwWLzU+Py9A74uEM0MFwfYxYG6ABasQijqQkutT1d+VxfflXsKshGuncxNYFpEQxOYFtGWBC4ItMgCmIrmQVTS+8lCVmJlBZJNtkpHVrJVy7wGHpTAIjg2cHWXp78rhj3sDh7uK1AAV2B7+NOih64CB7iHRxQ9dFWd6R7+8NjAtR8PgUNCYsnhDYWPpt61hAi/DwLAJ6K/cO8L8JPQve7wPUTL5r2fhu8RJQH3AMOUOvehDz64gPdq7R5itTlCGBRJLHYiNhqdyUqpPymNUxqxkB8NNF98y9byQTRrKQeEKGKWakT9Kww+wP2Z3mKHex4n9l+grmOUbcrBORP34FFn0gc1UndetrOofnTnou+Y45MFnJcC9ksBD8Z7pNJCIv62Q8Cui2Em4rbxLkQ9eYUWVvwfV8rr13fcFyL4gvdgoYZdIcy4LWCfcB9gxnh1YwQgPaZ7Ct5OVhUKs5p4PrhczY0BhHfm9u/GiPgbLiDa7VqYDWJOf9ya/URudISO1ZJAfrURxuOGdH0YEXQAPKwYn1wXmoU9zMidaKE4odhXkB7nO3BSx0rHsp0drAIkq5q1kOz+/7W1GlKQcGwEtiVQ4Yk11BICjVce5nLscjhUFjPE4YAHeXCrms5k5P2xXjHNFiy1RhDJSkWztQN2YolT7nol9m7N4Bt7t7Iv494t5NXkDUjFrdy7ecZO7q08QxH+O5xjig8aXoD9B1sGVIdOziMyybmR9+rVpYUQxkjDDs0wSSRdFJ0Rw8yfUXIcDflNpAPNjtLixdtzO1slSj+r0dxTAUj3dYsELzBg2P0Hu1ngOSWu9ObMP4D6w6Ee8mPYoR7+R2hxP3WaRsuMwkylCxWu+S47q2yocN01t3ZsuqOlzirsV5u70ve9t9I/ItuR18Zl+1+22i8ISIEm1LSyqQOXWvTzaizyHU+qTn2dccKrCorXg5aCjUY9z0O5Uv8imO/Y4c6J0Zmwc4LGIiD+AoeJTNc/jsH5YUWk0PbaRyEEqo9wJ67+f39eiNXo8vo37THLeaaavlYctYchKrb3DjX1KNUEPmI4t65cEH+tLIs0RBLPZZ6pKQP662DKiVP/bFNPaKJpSU3XXUw4oeklkYpbEyKCvGS7Q4MqB/75Cuzl3eyFGhjUlgasVlvbZ1fnceh44EKygkWZIZCmHodO/okPPphgHQoTqcxhU9Li87YJrHV4YL2ERcUFy6mLFlyYztwlqVBOCdxOxL4XLIrCcaUg90iRRKGGQoKWXxQS1Id4kyKXqCbhTuue/9Bmn+MuZjWF0AYRBivlMHFQ7trq4x4vf1RjC1ncIWaGTrDDDtk1caUX64xGjyOTkUHpj2zPKZI67vCcieYwbUjdMHzRuy+e9/tHrj/+8By4B8FOQvd+MgcFJEhH6vh/n4MpgHLE8AmPLrr/wbNfuPn4nwBVMIfxRGt9Z29lRhFSziHI/CqinXNhaQab4l0ecBB25A6lcLZzCnclJ+OPfUfWTYFJEq1YzJaLCCW2MgdD5xCVIt+BjHizJE14oNihscM4EzGGr3ljcQ7HCZRTGGowUg/MbwSWk95xtm2EAjqW6+AJDyuCsBWwTgUgYi1yTbQ8Siz3J4MIjxVxQKqb5urQwnrUR15VQGdh20vrIMbu+pDhalLSLPgmynkYOf1ryXaF34Fwuw9yVgyWIBFey5/wqDhwohTRJsJffqF6sOVGBZLlJk90wZixvwKvSEtMdF/6H5u3TgWwilwob+k0gM0Ai++aUEBOC3HyT7bSxtgqCHy0fT0g+HVgoDvmDqswwL4JhLvIbAWhJvrHoWsF5gOLQQT4FfC023AFxQHrQ0yBQ2ATiIcEhazlhiveCjZcGSM86l7AfmyiDrur8DIPm7qbchqqKr1FXLqCqbuAykwh8uNgcwo62OSIgy0oBEPRHnwyRlshPbVYQDdCT4B4KB40WJbM0qmqU/w4DIzsRQlpUymeMSSpkBmgJMPPnWx3QphEj2a0FfPyc93DbLDdXpxaA35YivSgCKZylkRvYdencCadq5fAzPRWJXRTU6AGGrfqDUPJWGNrrWwAoPJz+w+v6vm2kjkCBBvNitgU2mgOtB9hxNjCRnPs38xKQqZYCiruXPhkn2MGyHTlpqNxVOPZeCatWTWoS+J6kF8YcJVxLdKWigW2hhMJyWRkPAfpDnKcOWdyq54mH2Gx8UdBwD05Y4T3TOh/Ed4noe9FuPvRz8J5VbgQ5gnthHy7WOIyWgUxf7wUYA7nmkHjwFIx7HffTKT8R87lTEWWL87lnv8DI88WjnKCG5hOBjgOnAEX0+OHQAfsaIupMh1p8IxOke45wJuhNKKJO8PBxQn7ZoHyOZhjeBTcHcZdvFeHqKYVCSSyu0P2bpwQDIV3gdqG8KJQlfobQMNi4nhrUzjxKkvcQiCG0IeQmLkhA/cN3GC6ILdRy62FMA2F3BBl36wFgORQyG0EiZl9kNuYyw2fcKXADWYUZD9m2dPsIJT9KCPUhTMCeL1yRmau1rjBjIKc19FbOZzzOrzBPIIkwy4J8nF1xQ0mCfIAZL6S4C1XIfdGkGTM3cBbLgmalmCXNajAyu0Pnn7l7+6KHhdytpwMT5pXVj/y/MVPQwHlc0Ua3l907zV/ePuOdwuNYXkN18I1iVCKtQsAKUmwxxqEt6VDGrAda1rpxUR4qxpxcnixY29QAuM2/QBXZ8SDxYyWW65AU8oUaMgV6J2b/ojpypEP9/huaSEXWiGHagFjykKiOFBiopAoraATh1BamAgC4RA/mlUhFDrRUFLsjVbshkQjLmOJxp/w5ia7CfBgXW6sdVVbph8L8A9tQxOKD6vlXmVqucrVKFzLMUTT5LultRzFfdaFcNKsAWoppMhVqKVAJEfxw1AgUUu10lg1W4kkKVfdZb66zbhsTkzQzfV2c0Jioi5X2GU8MdGIYbVvSsR1uSIgBiYCI8ZHIEhLGYKsc5UPE2QE9/huKUFWGUFG6qzZx0CQvdFnPgehYprIgBvwm0ergzAw+8cr+KGesQ6EUYcYwQ91iNHqMhTaWl2mQ2yzm7HEJL2zxii0Z2KSnm41kuyR2FOXa+yyNrGHEUx0YjcqIliYZLVGslhZkk0tQ7JhR54wyYZwj++OGynufuhddY96iGSkGLZ0NGBGfedahx97oouSqOpbw75LDeEH/LSQiJSLlVBujSdSuG9tspsTEnHranYZT+yjy21GqumJfUSq9XY5LTHdCGmU2zsxDZdNib2tO3pybnPkRPNPEhkDuirWAulaY3Qtis+yBhVQLetRBVYO9Ve3GMKPZnREVlsjaSFqC+zSRAOKat0BjWnlb3QdYaNdWkfw7b/eSjjRtf9Wu6x3w2lZvSv/Gv1wRZ4S1EGmX67sFi+mpALrXAVGXAOOotyN6A0sdwOK26R+22QfK9ckK6wEdYkJVlxfoI1BgUAFK065wjSFC7OehZmKbxsxx1AWEExfN5LVe5bqv7LVfQUl5jeKvtBkX6gPf2GYX6hN1COXWtfRtlleU8MZMDnHE3QaG+lKyBhMoDFc8bHP4sziFP5ILdvAeT51w0X33vP4fW/CWdAxFzzl/Qvuf3ft69s2FUYQNL8EDW6g0DIuFUymlGrxyxdufuy+1yB7O56O+3y/NLcRy22ogaLMuNywjFNuH9z65nUvn/92MOJHXW6lXwEMOOWEcV9ZRfdlbDc1UDQa9xUA+ekr5z45tvk0QAr7ormPlH58nftI6ceBBkIRZNzHEQ9IXKI8mRG9SV8p+Ticq/SR0o/DrEMfKf34KO6Xay0gfSifkuyhLFQ2pdmPuGzGZe/eL8lm2L0+jkTufsnrwOgwlOWPIpchTTm5DDYS6ryVJgwA2drJZZGCXBYZL5cJJSSIBfZx5DKALo+Tyxi6rKxcZoUci9oEDdhyJ5dVumkGuNLGb1fhh6bhdSj0uGl4vRW7RC6zm14uW2bWrD6I2d8plxH7eZxchs3gcnKZzAAINO9EZNRSU+cwaim5bBUQYzV3DqGWaqV+L5aVqy3saMaLZQYtHYhlANgpEsus8l4s2yYSBKHZ/gFiGe1+SsUyhLAuJ5UxODPB+Z1QhipD/0X8fyeVDYEaksrG8GMfJ6+pW/zUdYZvub7wwzLEwWq2jERmN71EZiDbgUS2pqpIIttotPIS2VZPKwt19w+RyGD+VCqQQXtSRh4rJ4shpIKmcgDG2yBZCDqpQ43iR5EsdoDrRgCMkCSGpe84QQwBZcdN+hb5NpDDgDlWkMO8+LXNqObFrxV2aeIXRqTvcE4O80QE5lS4wxWksd2Tw8YqTXQYQmcx8RxVLpLDAKZRKoYp2FIghSnWbokQttUK74WwZXbphbA1nnMgHMbfJYQNM2SPgh3sXAgz+a9ELLbyeBlsmy8PInj8vTLYOtCvvAy20T6qaCJ/rwy23vLahQym+N0ycwnEr5EG7iFTm90pJ3vqsr6pzX7qEV2UYKHWY6fbbxSEA+bCkzoAiXMOz9yuKCB6mTWei9c+m3BI2rnHF68x+EKLwOfQCQVi5Axa/xPlSF5unuRy7Fnn3c4ZboyI1NLJGuC2qUo/XdHi9+AqAMhrO2wVUNTZDpwQuWNfx9ZFcl8Hr3O8lNSGoC0MQNpIVs4FHr72zWApQDiRQXOMiB1S7IXB+nrsEOenTmAmGPBC7SfUG9kvGOgMnSEd9I/bWPDx/yxEnuwQqUI3LKvQHopz+NQuCmCh3a4JFZdheynvmhH2ytCGZanhIS2vhI4Ck6LYdyMEe5UDl9SzsIQKNLNRXARqWV4UXLFwEShkeZGIfUtoRoK5pGkWA9oGuzXejAtoebyrqLIKeeuMIKFsb3H1GR/W/0L1oLJh/bX/V9BZ0ySUSnmLEoV/8wirH0OfCxThNFWOJi9HfENtprHhtsOH2LbrSvXf39r1bpLsyYCdGUBfThNkMKAvvT/LN5EBe5lU8bSBcx2KWxqopNlhu41lZ52CjgKbDSKDVc5GT6X9vMCZ5eEGbA4EcjIsDdn12BkRmGAUwZ3Bwub095gUpsHxf0fkBDq5Bg602vMyoxUZyTtARfOZrBmkYeUJ7Ltx2Jyxt4EMRfvRJJECZxIJVgCFDA8q42OvYi9AsUs5/g12DW1KaMcT8InGURioLLQLwfBVxbsQ2rf9xkcbcxpqTwVD7UBrw0I8bnqHhK0axBIric9ILviDILD1QdpscsHGsdVES2yhVIYCinOfSLAXIRYoW/WDnLVO/I6Qm5S/DMajvxEYAutG7KCiGGhEipohpCham3MHzePLW2QRpDyB+PKOaf5fMs2ZaDpsjqmo+L2z+PjiECzAsluIOB/0+685Yxw3aEuHsl1b+RFrPDyGVwabnUFzGUjbhBMJa+J/1h6HiRFyOtzwWuuPw9zIZ/jdAMeaGjgQQsxQuFjMxlxXoKfA7DBReRzEwQTeIXr14WvxHmY5OPJxKxL+b7SR0U6dTe+O51vYWZHmADcakzNDPJ/SjMaR35Vij3BjiAnG2Xm7mGnOlY3zGNrQ7eIBQVjbh7azXgV4bO92mYi4/XMD9VA/T5XEutNe3snPwSPm5Hjy8pdv5zl+o7asDE7KfgHkIPD5ODDIouCJ6LY0bxJQdJCQG5mhvcvPB1UrWIAH4eCQ+grt3POJKvZZWQ6gRi7coODJyKKKjAIMm34XZbp6l2X6WjABmDe/i+odv1OXsHyyYBahCQBqCzF9pnSGaODucfkXgWESA5YDdEWl53GR+L2yO7Pf90Q+LOXm6E5TfqF4lDr8sPh/Bm46wEgL4L9y34595sP7hret+IplDXsBwUlqNzVwTtHOP42S4knHsSK2Cf+5IJUzQEPMUZks8C38xI2LAxeGLzrhodxs7SPLB8OcTdcS+2oxWEcRrLAMTlyrGg5H4F78WQgYtFKxMKQAskmBNojkDYu0xd5d28L1RGP/XOYTWGXj88Bk3MU3vkI2KZQf7lKvh80tivVbzH6yMWykW9JwxZzkyCKiCDFwUNWcaTnQoCSkO6PtUy5BJHj21yrEiqcAwlhdLsD5l4uHrFmD7kyQ9YP0C2Kn2pMn5nt0tTNodCF35cM4G55P0Ffxrg024BIQtk4Oa1XCHq9IHnsoxBeLR8FHHG5sR2t0DjZnH1rUVYSyVtpPZNqDjOgV7LiSGcMVIj0S5L4q9nnwcw9lVhSR03X3S5HRVwTW4lhskbUesjmJ9GbQG22VKyhwhDfdvvlnXTCaAHzL+dIUmxVCZ4d3P43MaagLMHRDdqtw9ko0eirqR9a7PYS9rUAM078g6lDOtmUJxJ0YiL7bM7Yaw4t0AhhNRPp46Ic7lzBD/kniNfmXoIpQg3L2KbGn66JNAXVjfq1UB3nVSZ3Oz433aebW2IpI7VgyA0TK23lUYCIFKhsjRlTOTdb24KIO1h0Iajo3UUH0eqzJ+VgmC4DPgcWImLd3Saz4ThNs2oieOJis7cP4nAUMz6O0zJPpmg/9IAM02UUTaJHZHUoUsh/k5DZpNnlQ5xyK4AwC3gY3PSpGkYVW6C6cANzb5sJ+Tha5xMv/YMf779XmyPGIicCmQ51qk/JbVyzdSi72zFrewD8BzvolAnhh6cZXE4hI7myM1AX4rSbaly+Ep6WZoOBzREBTzJJmdR643bALNHOM3httnbAa0X0RUQthDK+LwE6qYfZAom5OElOcuK4Ts6vx+C6UWGCLZMYu32qid02gUOocnrTEltM9ltsOANGZkiCoot5INBicJJQRyNCQV6tm46N0SYYRsN0LfURWPszKZSR8R36NzQRymP05QjFiGqlDMBuFLmF5hQUK8Y9uU1WHTou1VqxNNR7XOoEYcWQgiQmAiuM3KdQRmczik5g/qkUkscmKhVIzUw4FpC0gtRP1/CyDjRjOJruB9UCMYaC/sDA0ADmZ4CEKigMUkLWJOoptAmUwlGTFkmFPOorOMLQCQ6XNVhu9hzFMZJ4rc/kKohDSQt4wL2GMpvAMEGJo9Fia1oWpoeOlNRKxIxy6mrWEbFSFvzZBjNxdGVi53nDExTcT5LlwuwNwuBgILWpBy9WtiMYmEL5q0BGMpJER3mVkRRt+xmNLNiKuB9OgZ2tiYKezvsY2Qn8s9CbEMyl0IyQoNDmjvlWgWoqULZzbslK9XCJt7YnCiyWT8cLiy1mWFRlyekH0/wRcW8KgJAf5aShuMCgjVg2mZp7yJj2z/bwfcp2BHGKeqojtZ1ya87aL9U54wOKgZGLlmh7gj1lY8jtRw5z2JQvVxT7ps/OR48vkNrN0Vg4QxLg8ii8PZmJ0C6PYWrGGyxEGiuurf2ut4NI9Eu+PnRlVzJEgJpN6MSGGOEkfmkMRODe3Ksy6nEXoo3UoNT1z4K+rIANRBMYP1tnmHYIfcP2OWQwdwhDBVZ6Jtep1zvBCFJNM40A48MsCJ7AdVHeLF4CZy/FYM1DTqDmWOEUWIpIX4RKgcioD3FgYGDGKYmjxZwHOQQx7y6kEODloTQgOWMF4PZyoPozCP+MUJwoHzTUzaC7vUIpllTXXp0zhCB8DqPTowsMj3TwrnOO0eSDE9t15z1W3nWkr9LCZoy3US1fjn3LeS0KBCoABTYjSckxDFxGrKIAsItCojEfpPhh80lQTbqQEMnYk/nPNrAH8pyQsEiHk08jXvqfe/lzBZe2fit8x1wsC0iNy+3Y2onuNlPqbi4r9uhBdg7opuk3Fd1guChxr5aMWhw2aM9JkqpAJ5rTFcPwN5CJn+Bn0cEorhWhBcYvQJ+1HIRRCcI+Gn5J8ISSqgx4PnVUBZ8vWMwwwIRRmBlHDi37Ua+iYM1lVEzyz5BWOl4GNRAUdvxabrmrSh4d8jwFp0RpzID+AH6FfSMG3wPmgARAwCgB9mgJrQRU71CHy/hS64cuuPnX7ab+6emwz2CqWM6kPfn3dsjtO+8sJK4//ZwZoS/31uRue/tXq91dfjGtMk6nn71s98ueRl66+AddoSOZ0Bnx9EFf3JhBUsoaAB01WPC8aA+mTb3oDZnr8bXOx6eDzxPsw+OWT2FS5TUGJLvbCLvHrKNEIvx3blxqbrS4L6ffnVB0ffw3i1gAWfbHYJxzVQFl+3xYMCxt6QFV22n3KPa4bROPw6dSiMeTdpthl9iJSohbYhZvk3yqo0ES9oxaZD59gPIqu0DXHHzfvdjtjwsGP2D42rl8NBGgEINMF0ZEtNT6ys9R7l41Uunjx4h+yqOqH7Or8RXBhIrtNYZbc9o7Ev6s3FNAh1lKGIoi4EIvtYSNfrQhZ5im03mSH82aucUgT/zleVMYoKxxNQ2W124J6LrodR/7WFW3ZFJsccEvUnrCIGKkTYpOYGluItiHAd8ciobTStloZub0PNrCcntjLK2O3IZDr8Vom0WHeUE62QZlL/5MIYhpSgUcR37uIEoLD4WtINwfM9wJadb/GK3bREUjNBVdhCCQXTka7KD62jKzNhbvttwT6LYYp9pzFj851sGbfmq2oaYGF/EEYx1pkSLeq54yvllw4zJEDgxohBVcgdCj1S3yy2JwCEL0FKAx7J4c5cBAlGR9Org/9XsioiEKKFQHkeJ7cqGiNpjg2j399SJKS0CLFFEBodoOLKcRDT3BIbEKhM8TfR09oVlgYrj0q4vQNDT1GxEZd2/pamOi6RjpDgEF6XT9q4Qpxjk0MLTVtLP53pVAtzYfHALdNA4cWlVoc/jwOeFeuCC6sl/k1UeFOlhri58LflSc+2aa4sw3x/Wz8EYDaZEcQJ6ElUgi/WC1P1ACWd4lm9Olm569dPnPDCD+dZKAY4ugUxjkFUNUO1wkWyGIQQ3U3TfK8YpegePR13WnxVfBGTSvadkeB43+ItlZzk9CIXT0bipwNwszzEQmtFLamR3SU8pkrRBYexpcSr9gBCpUrA+tJDSeUBg2o2Wp1FxuEb9wITSww743Ps/+Ik+ByE7QgsT35zl6Grb/lJXXKmIgDYV5ys70x095YhBh3fGMKOudtzh0luZ09V8yYCb/CeUJC6PN10WYEc3LTsdxpXVwzF2u8td4DhDPOuwcIT13h4L8rk2trLAJHZBAD5bYKIYXXB0jhkdC7keQVNRbAgzER7sO7LjYvZ5G5ifpDprU2c8iIVcSnGOQRg51QnmuUaoBdtjFYGXCtQ6HYFuaAZIWyXvoFt5DVupH8N9FMuaJWCQx+S/Irdy7r4k9Ktci4lQY8YBAEfPWrQCIRvO/BvIHYixY0hRsgiA6JGO4QavfDp9RPquypPCiDp76fG6TS97kJODN6sIQ/7qMg+mgrgqUTjr/Jw/HL90MRijEQQIeHJXY3as8YepqGQ5uwmwHdAeFLuFWLQPyD3NRr4OqVERsI+gQUb0HZAocIW0m5JkJtYNnYIpw+9f9qgCZNPNQeUAHh1hgYF1TiAvPgFJPO8Rg6S4G8S0Sngn22VrFc00GXxLBcWMQtmzExUY3FRg1yIVwuC8Uc48Q3ngEwHy5+IcnBRmOi1uVoGpeMMW+ku6LYTpcvH/MVagzMKFp/I7QNQ1Qw3E018o8fJOl0Aj+TmPgvikPHNTyCFyUj8LOtM/3LIU0N3KVhtuxNPrKBK2+odOQOfFpjpawpU0oGTVQpmZ3zdNKsq9atUilwspKZhtDC5zIwp4iFBbxg/hlUU/pGkhirFuKkMC8cRGUkITQNjIrg3Qdzg/iF5CtacdfChqQe1woQwvlHQYEtd4STEwkZz0N8zTBGuE9ZZ6GTqWf+kjy0eMOFGbE9SjzRdgzf/RLNCXUDeiN1THQ3AzAyD9pG27yBto93hTNyAClFLYLil3tVAoCMHBE05+E2YCt1x62MxOO+HHvkM9GEjwRLHjTBOTdxuiJ3UMw6whb4YOROLxDS97UgyCZlUeBu1sJjFr/nJhfuAPAuHs3NCXaXrrFuwTuBX2niqQrKIJziUKLhNAnIKBM+jQ2gVs00MzAAuR0kMIGqGZNtSt2LPe/TUZh/dONXK8FEoL/5KtAgQSizjwDnAZp+oumr0X7nd8zpGkZ12tWDSISmmpw87aQtJ0H3uFdyxRNrzsCEdLKmmh/OgGTKKOZQFMyMHoHuiNOR6IH6SI99hF/GRzrtIyzARCtA3AqAFTYL0MICKLZfYlJy88Y1V2GNs3fyymXbH6yaHXyuyT5Xb5/DiOHntP80HUODK7wZe2panjFVc/GMKfY5FgWfY1HwORYFn9s1LawoU5Ov/+r2B+CZMCW5efHme7Ai90WZbkXRBH8EMdZYlJoPqTnilfFzcJvk56Ap4uemFz63R/KyW5evrp6d2DP52LuLXq3ZnZp/zhphpjXCftYICTUCPsei4HMsCj7HouBzu1PzeHLRtaecgWXExOTWS5+8OVooiqp8uFX5CFaZRcFstsuaY07i51Aifg4l4udQIv+5luRt710Jz4zEtOSGX9x5IYICltRcm5tHzMAuCz8HNPWZ0YOMHAcaOb5sTXIAqcLPsSj4HIuCz7Eo+ByL0mxFwVYZi4K9s5KaT0+ecN6Sd2pnQ1f45vXvnFlbKMpOa44s+Tlkyc8hy49Q8/rkyecPvVE5G9Pjo3899cJQm6vKh1uVj7AqHzkDaDAJCFjMcrJlubdlOYlZMsMp8dvIHdUPeiBBHMlez4tuXBzBvs+LTlwczkbjxU9xgfUbpIHWT6BYsCeI38k8dkXGfawQqDoLgaqzEKg62AiEBWNEB4MtWS2xIgErIYdOvju29AQqMCBltO6VvPny0zdHCnUW4yo3rPA5FgWfY1HwORYFn9vpsAJ1PIn3Tt5321X0mpiUvPOGpTuwzPOfU3y6Mp0rMcWynGpZ7mlZ7uFJPNFIrA7nSaxO6EmsjulJDC7sSSz9E8iTmCQCz4z2k0XNjA4a/55Hjj0zuoDUKz96Uaud9mG0lq/xXslLT3roj5i8906+tunXr4WGkyOw2OQRxiaPFGZ02T6MLPk5fHw8NUIEnpL8y2nP/R4TxKTkY3+89dnqwufUgofbWDnCyH0kyb2LSYAZxozAJK+mdUdjUlj9ypGZRBY9HaXV6QqUnhIiszr9oDHJeTZZLCCvZN1Yb9SN9UbdQmQGFVhIUIGFRIOwkGiQAr/+5RvrN4Bfx5NXbFm6ITR2wX5Zb1G7iMzIkp9DlvwcsuTnkOV4MqMM/BwIVWCS1y08dwm2xaYl169744PQxLhTMjs2D6bPLMGamSVYs5GZY9AorX7nu7L6ou/K6p++K4upFAjckpgWEFhdftB48TzrXwvEi4sJjFqxxqjV7hB4z+R1W558KEpefMrWDzZWjpuFxjPHXRG4LM8q4sXPP/TrCzHpNSQfvPM3X/3wbixNUiLRFNYHIaq+UXdvI6362kdixCSt58EkrTrToM1v86wzLWDXKs8UHX/+MNJOhRLpZTp/TU4uOfOxm0Is4n+EtBOTvzx39BxM8NOT2zdf+UJIhtxp38XExiwx2zFLzG/MEozZqBs36qqjfTgP1kA06nKGm5iYbjPcx6OgZjgNmYOdYiciNtU6I3nDmWuuBiPU7DYl+fBzv4ETblBVkfRwI+kRJCmruu+HUHZfKwZKymKgpCwGSlrg9e9d8vuXa2ZjKfvQK2++XrsbXAFcl1liPtsF81U/85RV3/OUVX/0lBV/KPTbvbAcKz+1qbfb1IYqsbqoEquLKrG6qNLu9NuW5DVXn3UzeO7eySeuWPhidaG6Yk6HG28vmsx3Rd3imRQU4edAn8LUtuWxP9wO8WxScuiFB18JcaAP47mYSsrx3MlG3Rlh6mrEeeqqX3nq7mJGK2a4YizGcItnclSJ1UWVdoe605KPvbHyXjHc53/7uzdCYr+KFVBXw263ZzRHCkddDOgCwx0bvvREMdz3zrjriYrdoC4mkNAkiYktmCSLZzR1tw+f0XbBdtWfBo37BmwXA8HPaKhViMCo1e6x3WWbtryOGk9PnnXCL+9n5FBXY1E2kMzUJY5kL94lgdHI/BxKVCqn+mXcNe/cejH2kycm73v1wutDXH4nBP6QyUzd7MPZrdhFgapwBgyoKk48aN1pnrHCBZpdUBVWE1UJCWKoyu5QtTl5z8NP/Q3y7j7Jq88Zgx/d/yxVJyffeOK6WwCQsVfygTPeeGx35F03mYHJlpvMyrFc9TtPXfVFT11NHIXJbHJiL5vMPh4FNZlpTBSWa1qovXbnmXf4qawq+eqSDb8OrYXdslz86Qjj7UdKnt4VXd2844jgFq6hpfeU5Lb3nj4HS+9JyZdPffzR0FTm5Oli7gNyeWaLOawcs51udFUv83RVz/N0VW/0dFXvKM9si6cy9fUFZL2sEquLKrG6qFJo6Q8eNZ77heT5+uSZl2zYgqmsAfCji9/dDXUPsxzPepww/WEqnSnJ5cuvv09T2Unrz1kWLB+OtBCSR9h20uHYiJsgtaOKot0y2olRA6l4eROgasVFnSzOJ2Dc46JREQ8n4EPUUOIijgtYlEEVh4tJuJDSsgUXLbiQWnM6LsAnnH/dhZ+NJoRE6BSrrVSsTnCK1eTCZu6KKvpLoFuFPaN2U/TsqNZPJj5JqKipxP6cCqRJH6PrA8CL44ahGS9cOIqwIVNTdS4c074nLubDumWCOp7ARy38vb1WiWbi9w7E3kemy7DpXmyyQ/Vo01GJVn2VpwTciXGqgw8xTjPhQYxTHBoVnA5o3ZenFiwWcDqwFdM/3Gebod+/6LGLrjvljV/ccWvFgvjzVJSMIlM8HGuCOynO25rgZjoVggDcXzHcIS0C4qEZyKb333vTBaef/uDK133CEUs42gTfEZy3NsHFswl93yfGvaFmuPI/eNK95y9aessF91QcawmHLeFIE5xEcd7UBO9euWa6xLi3ohk+KLdv3PTG6l+cdPEUl26dpRtuggMszhub4BkL19UgLe6taoar/voXLzr35nvXXfY1V9BVlm6dq+F61hBdIkiLe2uaAQhxzqqz163ccPu2R30NhyzhKlfDNb6GPjEzbW7dI/Xs6Lk/u+ayC0Zf8TVcaAmHXA1XhGvIxCxFc+u01Nb37778oou3vv6wTzgGUy62lKvisjJVHG6GX/qG9954/q3Lz9z+KZdu1NKNNbpGbBxfxY3NrZNSG5645bIzRv98yx6+DS3daKNrw8bxNRxpbp2YOvnZ099+5vdPrtjPpRu2dCOwhlYTNjL+QXEFNzW37pl66oUdv71p/QVL/+RJus4SDje6NmxUBQuJWZhmABG8dvqrv3zgirOf+KtPuMoSruN+H8nXCC8BK6UlZumbgcj2wEMXrz5v+I9DH3iSDlnCVa6Ka1hFbkL7xCRbM1yH79389IOnXLbjtGeCRrSEQ66OK3wdfWLSuRmGvC9ftXnx1Q+eeNW/+DaMAfsfM+hk0I+sqCn+iJoIt2twcwpmBEwo+GqsFdMBMom1NtsrI3iFre+Is6wRaAC+fvxqc+qKF69f9txdF181zQ8lSzESM6psiokqhVSTU+f/7rabzjv11VVxP4gsxXAMu2psgJjC3BdSkY4xeHVfc9nVj21d//zoBE9/S7cuZtRYjyh32t73adlwMfCXZ9dfddNd161Z6nvKENLVodJ7oHkb8V6tVXUhbk/DzRb6fovMsVZMeiBzrLXBXhkDVg0bLmbUWBOD7z9L6L/akHpr8eV3v3XKvW/u71mZpRhrMGpsaxA1CqmmpE68e+Vbl5x54fX3BEzMkow2GDm2ApvFVcmSsRlQ5dTDb//sxXtvuHTTYz7hsCUcaTCf3U1AlAnRA4ID2hElTl2z+o4Va1Y+tf1vwQhAwkmoNwfmZH7FarsKt/fEzb3QaqLmuoZWGWKtb2idaK8M2SeHG4B5wKZrAAaCbJfdZyem/jT8zMkP/uml0eeDPmxJgKojigD3pgofLyRrSY2t/O3pa69a/vwjAQsCiB4L7ygCeB/L3SdjUzQAAuKWm365/m9Lr93xgE9IfD5Sv94oso1IUr5oTMy2RNFT5z1127LFP1v1x2GfkDh+jah4EygOIQjSqapLREBO/s2EKxCt61shTIHW9a1uTBFFkK1XD0qw9eqBNhCmSFNqw+iW0+9b9P6pX3PfIlQhiVvv2Eg9CLInvu5T7ZXafOWfnl/6yMrLP+P5h6VYVW/0WFPv6OFTsSXqwQZeW7x84X+/uOLZGtfOxEAk6R05VoTJwbRsSZQ7NfbYdSNjl99zxiSXjqiMk1FpwLmgl+wJA3VjH7iN0SM2qeYfq3Psoy5gHzQJEoSZOtCyUmo0p7Y/sfHah0du3fwp34ktBXDjjH3UgRrxEDUmpy45feWTS1ZvPOXzvvdaimHYRqnmDCzKvH0qtgJg+VKv/Gnoz3fcvPKs+wP+bQnXybEQhCdAri8YE7MZ68A/nnj+zy9fd9GJ5/0xmISRcAqqDcEPfaTAQHCbQ3QiSKXGBxqgMZC6gIFwNUHwOzAOthwAO4vo0ZB6/K6btmx88bwlzwbCkCUZq3UcpBYE2SNEkCmpNc8+/vTVj5xwTTCeCejJwtc6DlLrKOKTsSXqwEHOveju4ZV/uf+/dwRikCUcqXUcpDZEESZmU6LoqTvOfHvzFa+9eWcgXRDek/yDVg9hDsINEcJrBByk1nGQ2oCD2CeBYWkcpLaEIhNT571zw4qXXlqyakvAQSwJECWNg5Aik0IUaUl9cMHb599+7XN/LXAQrFRZeEeRZZ4iPhnbohYc5LWR87f99bTz//INz0AsHdA6jYEQqbHAQESQVSh5auTEtfc/cO9Ldx/o+QdXxlwllPAP3MbwCfGPGsc/agL+YV8Ebqfxj5px/GPr5ls3PrX9jms/7/mHpVhX4/hHzTj+Mbb2hYevv2HD1Z/2/MNSrKpx/ANYpOP4Rw34x59vvuH2Sx/467aYJ7ylG3LUWBGmhucfKHdq/a9eO/PE5WuuiXv+AaV3Of6B28X8o9rxj+qAf+AVtluN4x+l1GhObbzw3jtfumjdQ1M9/7AUI9WOf8DOqYR//PHPS3++ZNHmlZ/w/MNSDFc7/lFdhn9Ug3+c88gN2+9/4fxfe05FhEvSvdqxDyItlrKParCPNae9cvLjZ/1205c996AxRRnugdvF3KPacY/qgHvQFkmYjsY9qsdxj6d/d/EVN5514nK/ziD0GglLH1MSllALxczj3jOXnnvF3Ze+/IeAeViS0SrHPKrKMI9qMI837jz1hrfvvuoPmwPxwxKOwH1LlK8qwzxQ8tSvXr/nmpt2rDx7ayB+IGE55oHbxcyjyjGPqoB52CeB7WPMo2oc89j+7IbXnt0yeteb/mMEqSNxHUVWkCLFzGP08cdWvPnKpoe2+SQEpGPhHUWWeYqEmUcVmMfy39w0ds37T658LxA/LCGAk4x7EECplHug6KkzTn7t8h0bbj7vjUD8QMJy7AO3i9lHpWMflQH7sE+OVjr2UTmOfWy67Y1ntiwcXvWa/xjh/EjdSsc/Ksfxj7MXv/WLW5965pHNwQLGkgANyxhIZRkGUgkG8tIpz72weNHZJ94SsG5LOOQosiJMEc9BUPTUnx699pkHn7zwLi8jaZeuDAfB7WIOEkV9SepowEHwChuPWHxsvEqwmGIO8syNz11x2iXrXv6KnwQtBUDSjINEQQ92TJ+qMfXOe9tfP+X5B2/0HJhglSx51LjURtgqK2+fig0RxWr+qd9sH/rlHaOnT/aUt3TAHDQOAuxBVKeQlg0ZxZp82ZbbT140dPktDZ78SFfgINNgBmgcBLeLOUjUcZBo6x6Og0DtzoYjHB4bLoqVJ3wSg6/ukbr+iS1Dq986Z5uXGYmLSMLCuFiEZbQGEtynmpK65MqLzvrL+ieubPAMxFIA4RDaRNQ8AooDeitIxVYAhVJXrHzm7XsXPnfBRM8/LN0IAEpE9wioWQUq+LRsRaEzLn99xYPP3bp+mmcfSGfsow49qAbmsMY+cNvYxx7U2Qu9UKu29RFPDQIJst0iRg3EkGIJC1/dI7X4vdNWPLRjyyszPfewFEOOGisiToviU8VSv7z7vKW/e+3SZ7/omQe8F1ly9/FlpJ9XgTAVWwEUSt34/iVXXHjLbx84yNPd0vUbMeZp2VhIyTZEqVP3nTs8eve2R5ffFnBvYgGKc6Bp2ImspnDNMMaxhzXAD6HjwOmIVjf5wH4Vlz81VU03NDUMFxJ8MHXtknceffnst566z38GdtV48QCj24FOQ+PTTEhduv3Mpx+4+p6bA7UVfQaoHhTVZoZUTwpLwqh1L7+1+c9Xv7X52SdcEotFIZq1jNc4fSt19rrzH7r9yqUXvezeJ8yLSl+HHZVWvDlDwetakc4i1bWi/vsoLF0rcmKogBb8qk98QkEFWlHy6QKMacUX9mYgAfxqSky1kARQxFJFS8PYOPSPNEFHNLIYLj9Jr9pPVshNQBayPbptutrgN4xie9wr8BPpidWZ28n3/L1I/FOFHPKhVPlCquC2/OvsN97+RQRWyN6daUVl6GK5vWUX02P1LDy90eD+IhWykD7ooqvYNOY2iyBIMfhc6WXznqliIK7GitTD1z267NXfvPqX/Xhx1i+WPnnJb39++xxe/OzhTec9+vw9I/Wxas6vTBHBATlVwnePf7ETrmrope09Ioc9vTjykx8d8t22ge6Dv//tf/9hLpvtmpvr+no3D/2z+3PZuZm+WRUH8PJH35j1Xzk99KcBvZBGBj/ID/bnB5OJH2UGBnPpwcFs4scd3X3ZXC6Bh4msniZy6f5ceiDdN5juTLQNJNoSX/ri/u3zB9OhVB3ZXr4zgDf6s5m+wR/m23syHYel55fLul8PE7PT8z9O1j/OzOprG8zn0snEV7+cKHnZf2LAv+RuBG989+DDDubf/n3Zvo50R3dbpm//jmxn2sq0P8qkpwMdbT1tOf3UO3xlIN2BLIJXuttynSDn/n29+/fProN/OP+BagP5dnyrbTBdj+sq99cg/3GgLeCvKXS/GX8T8Bdx6ePuHT6jz3n4Ovx7D/f84Ui84hn3tyeuJ+FvMv6m4K+tva2vM9vX0Nae6ckMzse5J40DGpXHufxNyvOUzbXzhGJ36Dqf68QpP4B3OjpAe54ynXq5oyObt7M97s6kmRUe45DNDwxmOvBjTj6T491cVon5/mCGZekYzOZ4ZIvynG/raWjrbOvHG53IobMzw5c7O+1551HIEKfeDI/5Hh7ntqHheM7wlM5l2/nFrq62DDLu6sqy6F25NpZnFloOR7w2S2WflUvjd3e6Dc8yvfhDikyuP5vDs8wAqYNGx/2e9jyPHdnuLErXk+bznkwaefXwuicNYvb0ZI/GsTfLAvZk+5i4v7sNxxzy5wsDWRwG0/hGz9Ft81GbXnSKPC57247B4MQ5a0fRsxfkRLH62nrmM8e+jm4Sqq8Dn+XlLObTN4tl7JuVQ/Z9mV6Srm+2bvUhE5Kjr08E7csOdivBwNE6Dab7+lC0vsHMnDzfmpdJs0P04a+/jbXrz/ZkZ/GqP92GBP39zLVfXALnXAZ55jq6eVD7ooo8MM/cLOZIquV6WYFcL8ud60VmORSKd3IsPs9p1iyXyzDTXI7047dzg+kudZHcIEYpT0dnc7Mb2gb415/mk4GBNjU+uICOem9gIN+LjAYGu3tRjsHunvQgLgezKMrgYFsHUg+i3ijA4GBmMN/JZ66D511nzHeyX+VnqZOpFfKDInt+EG2XH8z34qW56Zy60NxsR1snbs/Nsmsd3TYb944GEXhEZY9OD2RZnKO78iDW0bPxCK/Nyww0tLe1z8ehozvdg7zxA59ub+tEnu1ts/DXow6NMx7wRfSx9rbe9mwWpz7856kPzdiOlsFfuocv5dS3ccY1ThiKOKBpcJwNGrWjrmjC9jQ+yyNeTaNCSJnuaOPAxZnFbU+nu3DAqOHvWcwy3Y0q85QB7drT6Pe6ZHfHEVmn0Td5THeBeu1s0/Y0CMu8QXCUMT14dBqDpT09P8ssMh3zO1gWkK09A6q1K+OM9bj2DMiEwyCyzFjyHrYdjmgxHFlIUEiV6kFj45hu43MyCPBs5tWTzeo4gCbgWRXsQb/EgRnmB5B7lg2CI3LIYny2Z9Gp27O97Thg8OKQR37ZLLLOcky3g5GwNNkcxypO7K/tZGftWcwj+I4NufbsPPwhP3QtFRKsB3VHn8fXcuikPJKCZAs8po/hRYZ1zGXUC3IZNkIuM6ubyfW5XAa9vz2XBbftyfDHbBI0l+1T4iw/n7MxjvPRfKQ65tvJ49vznaxgHpkjwzxYYw/6Uj7Tg+/ne1DhfA8yz4OP8XFfp5KAwsgMjJ8fyufIb3AiIUiX/ECmTwTPDzBna6j8fB2POaaho60dfTnNMyqPI7LsIHcfwEn30e6YUnt46MWhF4OKp34cmABsj8cOdGacUHocMUPzlGXKvrltzKoPPQqnfveB/syg0vUPkuYdGB/4Q0vy1MnDrCyP/agnTuCaOPInugcO3Txk+vjKAAcLTmSeHegh+APNZvGMvo5jelZWyTWqMILYVDaQcBQz6WAjd6Qx1aL9UI8030/3knt3pPsGSAn8zusuugK+g2lFxYZ8gYJ3t6FRcOztV27d4pk4ZZGwGzUEqXFGu/DE73aznJjLQMLuNHoTjhBReOriQdXt5ujEFI2eyTzZz3BEP8Cxtw/TGGYZTqM4ZZUWPQxMpKM738F5Bec+ZpzPIXVmFumbwUSCeQs/chzUHZnBzDHMmwJGR2YuxlRHD+dWHFEwTKeZLjzoaTuaB/4iL8IRDB5H8FacOBZwFKl6Ml0oY08G4xJHFaYnw5yyeoltgnGOD/eg+/OYR2XAm5hpnmny7FMY8SJYT17tlyUXxJHEyILLQgKiQIdDVxckgg6yAhyQRxaDAjMEzmDVOHIGAKNEr+Zr4EU4gFnyjV6WLdsrYkBE5WSKrNmqPHdijuG5K4OpEWeIHhg++NFn+fcNQJ7iJ/oGcxAycIbAzpYgB8KBtzAZ841+ZpxjjyGXxoEfBN9XPqoS+BHv5VVLzGNs+myeczhOOVILLFHVE8Gz87OYKTvIsHjk+MepCznl2lBYsC7d4AChHIsUubaj8flc2zHIGJ2XL6U5d+KUZh5pNC9ZGgdaLkMygYGhHXLoHqBSLsvf5J04qpRgWmi3XL4jw3rl8hz3uXyGRc3lezW6c2CvfJOMrYM1ykEw4tv5djyFOADpHmfknO835t6Rz2VQUZ4hm6AoeTfC8jmOTWSkoYW+Af7ZkScNNDN1gjF3QirD2MKpHwe2BI5kgp3owhjRnSRHpwa+bqLDdaI/d3Ikd6Yx3SJBmmwbJ8gJvMLob+e7aYrOPKE/64zG1OskJWrcmdZbXeASvOiytzBsOtMSWDvTHDk4Qm7ii72cWnAitcCtSUGK5pSJcOabkulwovSDU3YATYUzBgwXOhip6HoUwrCmQROBnFzcKAnXTTzN5qGfjAln9FAmAS35pUF2vE4M3R60Ks7kHzixS3VmIGKjd+CMNzNkFChApg2tB7mez/EdPkE/6cRAZ3Uys8TEce4jD+nM9KR7Ic91gtHocV8Wsh9/qMPjxMOAifL4YV0aP4yUGbZSZgC0QUNksK7hIMOPfpEQJLKmJSWZz1y1TGZuNqe7x6B/d2a1RMEJ0iU6USdYTifYAg/9kIlw7mWnwspKrZjFxMlUWGXiqAMLksV6kidSWWMLx1nofTixdhhdHBk4H40DR5SteDrBL/luhh9Ex0M75MD+cFBGpDjGBw74JHg0DmCUnXn2GHR+9lPKsp1iezjiLcihXQ2d88G18b00+niOR5QNgj4kSRz7eEDfAAUzuoMccMAvTAs4mKCGc18WUn2aIosGfxolIAnSXHThctashrRkmHRGkkm6px0iU7qHTYD5EGs+lqAnPQvrEJ5FXpyxarIfcyG889UMM+0BFTGA2jBR4ESJDSewLN5NcxpM92Y18aZ7+3vQP3HKcrGDM6qNpQnpjxM6DYcB/iQx4pwlR4T4ysqgj7FufagBc+6bRSaAE8dgug8F092jmH9fD0dYGiutWaBVHyqjE7sG53cwI6oxUAAMRbtAI6X7NE5w2Y/eiM6WnkMZA0e0KmUg/LE0OT0Di1SNIGsin1weq2KM0DYmxwoIuWH9oxKhH5NG+BwFp/QgZnhUjb1ZjzkNY0RC5sKxBz0nPU90mAfuRqrM05oeJ5My8EMkn4f5ksWYp6V9el5aPBLnXAd5TXpeNyQeZtOdgayOM8Yqj7qnG2gRNPE8TIag+Dyt3XASOeZhCGLY4MzxgZP6e3qelmg4kRbz8WA+uCi6TVcbZWScUB8cwO7n44zSYZ2P3oIjeiwE2x4ekGEXFwo4sAfjxGmgC5IG/jp4o2+QHbqL69QucHJSuQvyE/5APxzZX3HKcDHbpbVmFxZ6mL5wmZYiCWcI2WRlXWn0aCYDB8JfJw+8wnqcN9gCXWihzFy9w5HYJUGnC7NkF7gtfkHJoSJkMDr+P3FvGVfV07YNn7uDUpRUCQMx6A4DRQFFQUxURKQbacRAEBNUMDAQG0UEFQsFE0FMxG7FxkCwE95jFv/ruv/P8+F9Pt762+ew915r1qxZM2cc5zGzIYO5+llvQqCFoRxsAEPAamARDmcTINjsRcG0HBwL9hG7oVDmpgdBF3KHc9+x9/Gcxx4UmiwPikCgCcG6CDEUDohgNx/BbhEFu48IbuaiiIFgQRIk9Askdwg3tYIiEhDDQXI1oCOiobeCoChxFWjJIOZGBUWzO8KkYM+QhWUQqIybXizKZC2NxvTlCtQPzcG0F0qoNUgubA6Cq8DVxXlxQRyMEIQ4C7BOMNdLUKJMYhoxHYI/WIsQRrHjmBpkX7IWwZ1lXzMvCRI2G5K5q0HwNfARczuCEvA2IQp2MwhuLjfcmJMehOgfHRzM4vR4FBi6wYjUk1NYwTn3wawNwfBy4RczrYGCi4FQshgKBRxbVnB6LhjxC17saIwpCDbiguFPsDcI6gBQcYMKZSj6EwW7Os7E7aJIYAMgGL3HNSqE3VBwKFObwcxeBIcGM40OrcUGSHAoDE4QexuL+pjhCEYwzQQbmihYFRgGuEoEs3+QkTGYQsER0XAFIOEdQbJbjGD2CzIJAjMjmA2M4OgA+AQ4mT3pYPaIIdjpmC4REX4oAdrgwuwZ4naZfUZvsM6HbzCDCdYKLkqGZLcQyzQcJKsUsTJzA2De2aVg5NlRGHUQCF4g2afR8LLZMfBxmUTr4CziC0xPHJnAtQ5DFZUi6GWfw8VAv+BJB6dEykMQpMZDwrlB0BUEEQmLwgpuuEEnBkDEwO1GvIXAnxXsk1gMMshENoZZ8MXhJCGAeiBmcYewCB8iAqoJBWwiZCKqYTYzBOMxpN0+AghCQA4ZiaGFIgYiCq9YfBiKzsXfOA4C2g0eB45BR4aw+R4CXcseTEj0DGBKIZih8D0AUuKy0RgAEKHMK0XJnlkIC1hCgG6wT/CcQpghAr6F+hmcgRvjTCFGU3sgzQ2rEDhy7E/4XCGcbxWCsCqEjdOQBHieTDLLioJVgJmJSICVDJREgQqAIXAHsAgUkn0Sx6BoeUgKQzzkzBMMZSAYnpAfEzCY8HZD2VnwAlmQw+4cL7gKXMkpMuCdaEQooGA2g0LxzJi/jJLpD4xgZuFQsKGIgkMuUSYw44DIKoQJzrwxMB/9gqLd/YZ+DUxmMpTzZvAHU3koYOtwB6FRzHqwAtOZK6Ohc0PhG7DmRuGpYTBBJccznzc0KozZPBRMh4RGMcQXBfNkITFsuZrggkMyiJwdE8fCLRTtJ7KwkBWc0USJ58KqBZ7JvsX4ZKMPf0RDcCMRBbNSKDhLHwqVJweWzfobHgf0PD4DUgoZH4h2Q+OnyMPaoaowPzZjULAXUJwwDF1mOFFGMRkBHR8WmIThEBY9Ay/M2DDmVIRhcLBBxdyiMIYyQbKHGsZi7zAMBfQMilB0I4pwCLQzHK4GEOFoeTib0xAxEDCOmMJsEIczECAcowMvVnc4M3sQwXC3UeL5h6Of8QKmgdPZLUPAeUCRFCoPj4IRC48KhdoLRz+jqihMgAjoG7xwA5BoDdQgc0ZRpEDgTmASYyCi0A+4C0AW8fCwoSC5N0wZQOKuI1jcxyRGOzsz0Q+CVQ+lBhHHjAkCDO54hBDAOLjLBPoFMYH5Bolnw3xgpr8jAqGzMbjZC4MGkhmuiMBQzouEY4xHGNH+UVQwdAmKOIhohHXsM6Cc7HsOg2MQCmpAiAUB1wKqE2Usc1MwXLkZAkSFE7gkp30iGAbLASwQrOEsyohg7kgEsgN4ApyfCyecmR4Wc0Jw6g1uASdwYDRyRezqgMRxddbfiBFg7VgeBIMGBW4umvUlsAmmqzmcBoKZZs6owGVnpyKGwZcJwZzfDbSFeUcRCVHsdrjwPyIhmc2kiBQ4g3HySJZuwmyJREOgDXBByCiMZERk7BP4DFxsFukXhqcdyZ5wJJQ7LsQ0F17sKix8ZrMCJeBBSM7nRskc80g/5iBHQu+3F2gCJMPFUbRfOpZNHRSxCHbZe8TKEKxxXJ9gynMn4W+mEfAH9y4WbhiK9iOSQyPh7SANhPMxVjBSUeAS0EdsBKDEFVhykuFfyKqwehBy+UFGsEgIBTuA6y0UbEozJ4O7D/gKELHwetvDJEg8ZEjuIJgwCITP7Aum8yFDYBoiYXfYHWPycYMEfjRuC6qXqxPjBO1gMxKive2Iy3HtUEBp7CzYdO5szqowYIJdjE1aiHjuMbDbD02GqYDkJkEk8nbsHAQ+aEU04ACcgrmOF9OSmAOhLBpEydQDivbehUOHW4hmreIwMUhWSWwUC36RjMMIhm5EaMj8q38iRBRcTbBO3Ojg8gORbBRChEIySCoSODn7MoE1CgFAaAwGMpJy3I3hBHbTcHw57B1/sA5hai0SfiJrRgqAjSBWcMM9MgWtjPJjkweBNxMx0GUouCxCFEZKCiTXuPY0tTyK5d2ADYZDoJeioBkQQbDPoU2h+6P+CaqjEC4jjoBF4b5EC9j4x4vLmUUFJiCQikDJLHdUYFIcRDK+Z+q5/clGRbOhHRXNIjoE9BjTrIxmTx+PlM0VFKz1zJAij8jF0Sg5gdkXzEquOnQgOxiNSWCwLq7XPn+jOMiRgazRSNTAp0yB4OwiLh2KkQftAUiOK7nbiJ7BPZfoGYkcfIekB5wPGEtMCQbGsDqjEbXLgdayF3uLZ4UmRAcxA8DCjuhwuD3MD4IHxGqMSAGO7i/H/eGqzO1lOR4MKXR4NAJ57g2eLxwifACY1Q8SQ5t9HcO5ENEx3NPBGGMqC/lxVhHUAVOE7agSJAI0PGyEM6ylLPxgxwDQYnFbdCzDNeRwqTikoH1AIvfOeRco298xVwAFZ/WjWcCITsVJ7Okxjxkv9ldyCiyEPJobXPLoWexeOHcnBvYMTyeGTWcOrItBiIKbRREJAT3HJJ4SJHoDkmtFDPxtJgH9smM5rBRFOBPIKrEC4zOGKbUYTptBcoK7Q5QMsUbB4AeUbDbFMPsW45fCzV3kkFkj8Pxwd1xCGQJuDnsDq4ReYd2OFzxlXAcRM55gDOwbu5dADvXGK4iNGJTsEaJgRo8lcmKYQ8skpnlMCIeexISkYD6i82IQEuHTUH/ubuGusVEWEwokFjKYvQJZLcy7hGB3ymwfS7gwCDYmFO4xYJp4dnfM0YCcNQtd2N6ncBPY5VkOktXOeVYcrIhmc62I4KCxGGbTmMT1YMPYJ9FwvCBwMuOvQMLDYJJ9xaw0CqhWCNTFkP+YaLit3CHIiLMGMwD3nz/iQtl8xB+sHnjCuN1/TGwMGzWsPwGts7vhQvYYlvDmLoGAizWS4fasX2OBN7OvGVbMfcxRQVDGsypioT+4t+2nstEJCaPHvuPuAUg77Ar3lnsyACi5DolFOgiSKRncNIvU2CgCvJXA1RTNoAkUHEyMklMLKKGiua+jg5jE4+aqZpEkayS+bD8MTgRHbWLt4Qg7KEAZgVJCj6HjEhBLtbv8MfBFmcqN4dyImAQ8byYR1MUksGnMHdJ+BwlggLS/5SRMJJuVMchrsp5OQUvhXDDYjh2NElm8SFaCtxCLkkE96AEYHjx3Zn6YmAXBbgkRL9MceArI6USxkn2GAzH38IQhQ6Mh0TguIG5/SNDg0E24bgwEaz5LJsPstOsiRMtoD1w89id3CW5SsyQzqyAJr1lQMe0sFC7TyOIcdvFA5glDcplgwOkstEARyDQmSjb8UTACDQouM4LRwp4bBgtnhFCy4AcFm/Ox4Atw1SJMZ98Fc4M2NpB7pqAl+CUzyc0NlCx857gLsQDK2K0CxuXMBf5gngUKZpGhjNjoRQErx2mmWCgGdmcYqdBwKJh3hIKblSgZ9syQIBYwYRj7I9Rho5mLUvEHc2ZRIGThDo/DNOMaFMdAPjS8/TTwkbhaoTHYpVjwwsrE9u6Dk8Aaw2FTsSGw7eiD0BnsxZLN3CThlDw3UdqT+sDx2fU5k8tMAk5kwxTThr3n+DVcjh9DkPkPbPpwkt0787MhWMOjQTZgkrkamEzM9cRk4YAcbrJAhMOD4bwSTBf2FxceY6ogYmkn4EBynzCHOxYMAXYJFgjHQkXFMncH4Al7MRpLbAJzH+LQALyYbUHBRd9xfogi4thAjYONYV+D+hTFinYZzwS7ThzzdyDYHULnsyORmoJzhzIayCtKNqQgOS80jhkOhm0z9BJ/MesAgYcCybnLcQhj2LsQDBhWMA0Zx2hRrBYA00jyoHkYtlziHH9g8iKtBWAOksWaLMcFJB0FkAzkidiLOfYsZcTOYE8e0TfTwe0UP1Zwcxplu46IYz4ZRDhEMGfj4O6xYY4CrWEjGEMfKpTFvCjwIDhSI9dGOOCBaCFcHTZQ4tCb7XVzARYKRMBxTN/K40K4WAAFgjVIDsRByToDGBIT7GoMcoAnhL5k6DEK7mjm00CirhBuFMUxdIhJ9jHDYCHZl2y6QCZwaRn8wbo/BLqdfcdGRFwIHGHWsBDcNowNG7WwrqiKDe64UASrkGxYc7lC4LRcd7B4AQLzG5K7PoIGpg9QckOBy25DstowryE5bwaWLYEN2DgECHHMdsSFc285bAAFxks4s9eQOCecpf/iwpmuB8SBp4kAHoKBCZCc5ojjLCoka217xIuCHRXN3DQU7APWsRyOHQePF5XBtOFjtBgnRTKMA5IRDOKACOPGolgMA4nLAGNA3zO3Ny6avYe3yq4azWWyUeDoaPhdcfBNIbgegF8ayh2DRjHZThjBH6zvEe4whwYjET3DbATGM8wsJDsfXDIINjIZ1vmPFkPBmgYXEH9z9huSw59QwmuE1YTjzahz7Z9xgxeuF/c3qwshBHcS11OwJqxxMQwWgGSnh7KQETlTTjL3mtOabGjDP2EHcI2D4wHBiF+QDPpEwT1fGFnEYVy7YB4Z34mFZRxTDdEg08soAkJhRVGy3oznNAGCADaT45ndY4laVAjYFtfgNBokqo3n7iyeJVwgWQXs0TNYLBoFN0zjueEC2AYtieeeB9L9jACCknV0PKdAOBgVkj0Cjq2LNCCjCLPZD4+d9QXcXK4OzAqGaAF75xiwKLk2t+OgiOSYTGgPcFAydxUFU6ZxCe3kWZS4OhwVNuxxMuvuBMamgWSYPkruJA6GjoMyxgu+ICSjO8YlMCcIkgWkKJjhRMl6NyGWy4+hZP0HPwYmhfujXfHjj0QEX+AecZk4lFycFZf0j2ZJ4no6iY1imDZ0ZhLz1SHZVZM4tZLEZk4S15dJnEschzgTNacgJYteRJTFuBRxKchVQnKPpP0JMwImVwTjhREErIF1HopwCHjd8Qz0x/Nl6RUk59gHOB0SZJZoFMmhcjxsXBESlbLRy4I9vFggwQit4FqgYH+j7fGsH+NZrBuPsAu1MYQejhH6ChLnhQSyJ85cJe4T9ie7LUhUA33IFEV8CGMVQDKPCAU6KZ7h3UxyyoWNMNZeplyQLOQ+gemLB5rG/c2uFopHB/QAL4aMw/Yx8BUMVNYbnFFHRMvcQZQMq4eEncXJUNTx0egN5szFY9Kx63C0PzZ84eejaCchcsMYguUqUXAqjhvUENALDMLEC74xJFO9GOqsG4GRMP4qStSOYQJrjDuHu8BOhJnjWsa5OCi4NkCVxAPiZaRZdCgXLUKy0JuVDH5DgQEFGRXHRjX+wLU55hAkgwc4Xmi7c8UmFxMYmJhg7Koc9YSFx6x2pLC4GjDgIFg10YjrWMExKTALucPYPcNpYV/Aw2d9BIIQJ9mtsyfM6EHxmFBMx/4zSZFi9GOChcLw8BigxDl6ENxjAcTNHngSRhO+SWJqERLfJ3G9koReS2GjNQW9ioYnBOP6qBkKDfku1M2ugYJjAyPe4N61E1Pahw1kNARHUUfBcIoEJBBYNAJPk/OpUTJqNop4JnAuHhHAcxiaKJQcxgr8CjMpAURV5jImAP9nb2M4NDMhBiEVHlACImNWPRQ2BNMcCcjtoU4kJ/EJUxTtjhfz4DnKOQSjLKPgCBL/VI4rMccn0Q8OWTwrEqCuE5EwCIRkdgyS8eBRoOvAyWcvlntOBJc8FrKdigXaJjub+dqJYBSzrsGwSESD4PAwTIfFmUyXoWRVB2IhAgQDA1kXsGeIkr0B9SECBSY7u1Yo1+eJDOpmzQv1b78aQls2y1mAGA0Jrx1UCCS/2aEA/7gSVphVgLwz7hMld16cHxPoe8j2z9m8SGQEITkjfuNvjijJkb+RaWG8VFYyBjpHfUqEe43qk/4RaHcSKAoQ0HdM3zLB4JAk1l7GyWFjhdO6ECyYRoneg4hhAjUmcQmIJOYfM2MC3czyiijYo+U0NQTrFBSc0kgKnIFXezgMHQ7VEYCS8asxvrmcFzjquDg6P4nLXkGyP9nkhGQ1MU0JwZrGXEkILgJPYvoOgl2fZROSWAAJgTPQl3gxtxUF+4ZdnKEqEAy7QsHdBguzMJtYGIuC+5tV1s5RSIoGdprE4hpIbsYksXwlBK7A7A0HbkKwy3LuESRrDNM3SQhW8SVLjLF74hQZJOtBzoCnMJWWwvorheVdk+Qp0Qnsxb7iHKlZIHb4QSL9ykFrs2B/9MCOZRC0P9bR+Fh1ILa+xw0kZIz8YYyxGZPizuVmtP61lkcbry7/es9e/5wzETfRfsI/H2BlFPN2//X1P38OZVxeuAIzQmMs7OztOSqQvf0wVoxkOcr2o/QYuwiN0GvPEOkBY4jTgx75b7P1mMLSI/qCtmuwtUfW7eV/zm+HavWig/RY/8bphUbptYNp9npkiWN7/OtYqEvWVnxDNB3fsXVH//mOnf0/JxPNxvds7dF/vueoybidfHzO1i+xO40zt2wvzLjCzLa9sGovzLnrdP3XWqdueOngpYsXtpXU00uV95frperNMZQb9jdNNjU1NTM1N7UwtTS1MrU2tTG1NbUzMzUzMzM3szCzNLMyszazMbM1szM3NTczNze3MLc0tzK3NrcxtzW3szC1MLMwt7CwsLSwsrC2sLGwtbCzNLU0szS3tLC0tLSytLa0sbS1tLMytTKzMreysLK0srKytrKxsrWysza1NrM2t7awtrS2sra2trG2tbazMbUxszG3sbCxtLGysbaxsbG1sbM1tTWzNbe1sLW0tbK1trWxtbW1s0MT7XB5O1Rth9Ps8BGWCv7PuNHHqzte7DkQTyASicV8iVgqkXWUd1XQUtRW6qCspCLsIFBV7SRT52kINXlaAm1JF15Xvq66nqCfwAi/QW8qMOOb83bxi/h7hMXSX/zfor/8VkGbrCQ5ZVn2NtOJk5Zlrez6SFllpPvvP8Ymg6b6+D5bkL08J7fowPGK6poLFx+/eNlGwo6qfcwsbewdBriN8FmwHF8eOl5Rc/Fq3YuX+IFBZe5be4dhw91GTAsIXJCzcdOFq3VKHfvgI7eJU6ZO8w0IzM4pwinVF568eNms1HGYW0Bg2oKyypOnbt1pbsnIXLaj8OSp6vNX6+4/cF134krN1Tq30R4Tvaf5Llm+4sCRo6fO1Jy/01FdY8rUb99b29IiZz5+oqwbFd21m++cuaX75lVUqmvo6A53Ge0xafLUaXPnHa6+eethc8vX2LgV8QlrDYxNdu07eup83Z0nGwbnrTNdoXv95tW20R6Tp0ikKh16mzR9jIq2GTBoyLCVOWODE2ovXKu/e+91axvp+XZPfyJMd5Z2EYo7zt+rnFYs0pXN7yLQkvKEJkJLoUTAk4glHeWeKqqS8RKBsKtcJpAKJAK+QMB+olagIOYpq4lGS7pIJkr4YnUlT+FQgZGAJ+woVlG0F3br5asXKQzrlVYrSt8v0Ban/xV4S9RlmrLOip0Vw8RysbbYW9JPNFzeX6go5AnMFPoLtcUKgrS9+MrEbJQgbYfUUaAicJTYSvuJ0ts6akpNOhoJ9FX0VdKyhOl5Wgpqi1eLTEQOEr6ypiztZPd4xbTb2oqitDZR2hPFT5sENrL5UzunlUvTLonkmg4CudhWOlyqKI5X0BFMFnrL0jI0u8rVZe7CtKXi4h2KGkKzrcL59w0kiiJRWmGH+V8lPL2+YnybLUw7KegiUFEiMY+Hm+OLJBK+VCrjy0UKfGVhB15HvqqoU8fOPDW+Bl9Lqauom7QnL0wYzt8nqOTX8ev5NxVvyW7z7/Dv856KGvivhW/4TXrNwh98DFSeYm+HgaM9VhQUbE5dtmrttrLjCw+IJTLrAQMnfL5WL+ysaW0zYeK8PaX7Tlg9VV20ZHnBf0ciG4ijPQICpx452qWrRCpX6KxhbWe/u+juPZnNypzdErnDwKDQFbnRvqeaPk6e8eVP24aNxia9Dcdv2rJ1+45du0uOV54TKyiqdbMfNGxM4a7LV7ZItLS79xo46PX7j23VNUK9Hr0MDC1s7V1HuHuOHT+BDbrp/oFB4XHJc+Yt3bFn3/7T10r3RUWvmtY9VSQQGgmCBDwT47T0bgIzla7CnjIdUT+Rs1C5b9oecU9hT6Gh1FJh9ND5NjJ1uVTTYZidwF8qM1UX6Qu6iHiDbYUjRSZCuUQmGazXW6gosxbYi7QlQkWJp5uNhZKFxFgqn2/gNdpQ2ldd26BrZw3ZaFzAWUlLIhe7SnvLEhQGOfUVO4jk4jFinqiDQJS2bIaOq1SeVjit+zAFuVipk71Ybt1fqJF2zDFgrKKrTD58WBdX6Vglt/mS4fJuAhc3G4GyVC62k8jnW2ulHeWpmCtlbAxKUEg7t9TdX2mByYr6dJetx9LtJH2FU8UG8uFyQ1Gn9P1TAkcK7SQdB7MxkPdDuuB2X9m21/MtjAQdhdL5WUuE4SIlgUzSIXe6iyzeMe2bPE4aozY8bUNnxYkyrbRF810EmUNU1BZ46qY19Eu7ZSTQFvLnD9btaC/iLXia9r2Pu1Au5Gd0dHYfkHbWUcwTjhd1seTPV+4vDFCcIE8rte2m1F8ow7gXp23IuIubVhLEK3pLMItUFIW2uBlDaffR88cpqglEAomsm0BBJJbLxVJo1bRLveQLxEzXCogysJY+RzSdfDptIVUNPV1Fvem6H/tv6dfXVK9/dOHT/vzd0410fk83plY964K26dZ/eQ3WPLm+TU+lBptiZT87E82tdqZdG1w+6+i7N4c1eHhE63tuqtzqSXV+YwLrt46h+/pe9LRhrGmD3/jSZ1snXHvTMEGPoiY289omUgxJyIjH4/Hxn+eqYKrWgRcIJcLHLyf34Ol0maJgL5PxNIU8GeacqJ/AUdpXk6dngxOEUigLiZzfjWfPThdKcYicr83j8+0wOYV8KCeeDl+An5TFexEO4HXmq2Pq4mjULeVJBHK+Ds8B5yriTENUj1rRUTyhhK/A1cqahIvy2fuufDu07z9X6cZz5Ql5qJwn5Y3h8SWK0hk8vkxBPILfBfXxeDbKPFxRpMDrKeMFCXliNIqvxRcKOgiV8KeYp8JDvwu68XXwfzCfJ5Hy+AoyHlQmL4HfnZcoEPJlPLHgAToBrZWwGvlSsZzPM9U1E5rivYhnKFPEHgg4QGCLL3GiwF7K568T4JcyJeyCAn7NYOJV4ef2s3nY4lYcih+f5GHrCE8+rCvarsUX8fL42qpKPAOploKxwBT3xuf35g1Fz/PxW2RSngnPArXy+SLcd1++lNfEuo2HhdsdOnQg1PKMt0ZEAtyl0FAg5O1E/cRfr2AmTOVZq/TBXcoFZqhRwhsg6CniSQfiZyAtZRjNPF8B60gxbwtPIFXjepXHU+cpSwSiKim7EQ3Wo3hO7Cge/x3aJUbZhT9eyj4JY32BbwMFeKAikvH4X/E8MBp4K3E1IU9PbijmnpKYLzBGZ5MEncHzUkdDUMssMS6A/sZIY5fi4T5gN4g3SDiG/W3M1yDcs1AklfIlOsLV2M5baC7lKfPURTwV1NSRq0WEEcsbICRJpISmpzUTpTEHED9BT6bTeTzTmXyZSJUXwNNmfaXQDf2Mn0vklrt/eKUffMJVhSa/CN57+LiAury0etfWpkLsV3r/W2Jx/PZk704XRwnoRJSag+FuHvU5zZu+7bWIKhy3+NfYSajtyLOr1noi8m4pM1i9UUyzHvVN9PQUkFea4LRznYCSUgafz4oTU1tk9abIwXzav0V5RO8uYtqkueLPzlvwaRVP5E/7KKEC97TCNZkS6vZH6Gpezqe3g33S9vwlsrsx0dj1HZ8mVcbz/SREbbUD/BTGoL5fU1fWLpRQ4hnf1WdkQvL4s7WmWEtCC8RlK+dV8ehJ0/iLl8OJBvZb1lfSB10y6oPznskisjKwqBKsFZFhyoh9DpF8KsoLjSpEd50N2mezDJ+/524c9/X/KLsYp7pt+Sah6/vy5NEZPLJNPPnN5Y6E1gXMLZBMEJJl+acuqxIF5FDv1Rh4XUabC0+qnfdXImFiyKXAkyKapz/gfNNDAW0wnd3FCZsVfLjxdaq2P5/mB15JMXmrRD8fdyanrwvOkEJTBR/Oe6xD1teaVYr0rVfV/JlPpHTEfaCCwlcpmbnvyFxlLqKRA7bf+DlbSgNzBt8R2RFti7utYXgcMcGrL70NB/LJUvvs0+sWPJq/os/P6x5CCtkzaxGGBqXcWjVpTYqQtgRvNA1SElHTy5NKRjf5VNO85IhGi5hM85rcd+8X0YvxMy906CamDmGy2nwR+pu3O3v6LEVS3n2sIWCrhAKv/9nxRpdHl/d42JRXSshj1Mcvk01E1CH757rBZiI6MT5hUk4xn5bcvaY0aJWY1gxxr1g4VEhZnjPMIi8JqGZbbHkI7n9jv5aw9G0i0qvYKXWu5NOQcVsevUuWUncnK9UDbXLqv/BrdlOCAulGda6bulpOx2+77KhK59Gnj9YvA/BrimNpnG56Lo+mLk8uaPnJp8MHBr7eNY5Hmel957c8EFBe3qDjGr8wHmzzD+V/E1N25kGlyRjfFQfXviq2F9Kp7aNXX5sqpxmjtMvjJkjo5un6Xsc8ZdTJqc8920Eyqs3ILTzpJ6QD+uZ7NvSX0Kjv8c5JwXzKTCtr3B9AdKG3w9fRzQIye3n91ofbPNp2sJxXGykg02mrbu56SjRH6fLVo4951P+R3uiisUQ/t9Qc+F0koa7+uwuXBosp8ODdxTZvRZQyZP3t213k9OyFlvfrvRK6U2J7o2CkAgWkbRLM1RdT5FwL6Y7HYhKnz1A9M0tEccLngZdcxHShRHenKB8/ib5v2MpTb4R0++kw++edRaTSumyK41gJXeg8N3V8hoik+/X1NBwl9Lhv2tIF2AXj28tzouFPZfQrOK/LtdMiWmY7ZPNijOe7w3uVTu4tJNehC934UyTUzyCmQ4OxiK5M/j2uFD/CeHiP/bX6UwKauom/7vBSHjUumf63ur+ARBtXT/U0ENL1WYqLNcOEdP/yYs3uO4T0ZGw/r0CM+8h5tK37WSl9SHqw8egEBbqi2qrzRkdIc2SSE0V6MoqyfD/3ryWfVp2aZ+7Ak5BS2IcPURi/+z5XbAs8zKfxWt5Lro7lEz+xPj3ZgCh5u3Gc1laiiL7Lj7c4iGnDk5WXV28Wk+ufjUn1ZkLK23I/+ngexvnbuk6Cy2JavyN7QaftMpL10Boy9hKU59/Hj9euEdBj1Xk53XXEpFCXNXzhFQHNP63dfWymkKLko0cOvyAmgVBzwXFfCYmy9W9OdRCS+uFrG00S+XTw0qPfr2t4dOLZ3iqZN/p5oFEeT19Io0o7qN7uKKKoTcprPiaKadKnJU+1y2WUrrmmu5ujmGzMN4661SKnBQ9G5fa6oUyLHus5uy4UEH/+EZ+y23w6HWe49pCnmFZ36v23q1RI6T1bX83TltC42tqd5Rj3yyMHv7w0SEJjvtSZWj7G5jVZe4OPjcM89g4cGREvpH4baiIdUyUU9evswJYPQqp9m3pn8htFupe6vGzbAwk1ejzvtvOCiFw6xgfUDhfRSgPZ+idbMR9uf7mQdRGugcOVC/PCBTTtQZ5lkBafgpVbUupaoF/m9pNfchRSWFLbkyWeRIuX3WhY8IhH3aU1gmFpQjo0b3v/awWKlJG85vBZtCMjaP5y23LokfCj484dUSRR4JildmOVKKHe2v46Au5Il5o4i79C6nutSaePMn6bNta4zthETC+yM9c9nSmhJzrDkq9/hT6IW29xwFRCCaHv9MatFVOd+s5T26UCmtwW0u3DThFlKKu19lVVIjN+RdCFfdBz6Y4Zyed4tKLznyq7ZBn9WDZnyaURQvKO85pU/VREU+/si5tiJ6CYYy927ItFO1QKzDt3F9PfViveEQBMGSM7TescQnS5Kl228AWP1t/p5Psb7+eOc7YxvAD9H/Z48zlPHvXq6CJb80lAdWYXDzX1kVDlqYTD3fPFpPqscqI0R5HWVSRsOVymTCG7H+Y7LuSRTGNyH+UkAXX6q2cz+S6RuHimbhva4/s0JylyKezasS0uI2MkpFGs3Zheyqcr4nVDbmNzord3V6iNTxPT+JJzbed7SahsfV29GvTP4vxCp3F6cho78sqcIa5Cqj6x9E1OvYx0LiXlXl4todPrrnX93o/I9HrE5eJNQioT/bQIlAtpR7nx3o9xuG6m74xxV4Q01nPvWYNzYpomG3l1WqGIjoR/Wjj4HFFmslbImiESqv1zZGIGnI6mgUm2vYOlFOO3OeWUl4R6WDy/X3hITA/r364dflhC17QzG79HSclyxKT0is1wMGf1WjFhlpBySnRki0fxqOfVA5pTOvMpclPQ9lx7Hr2cM/F0V/SH1/plFeKLAlopuFU9H5v2vE+TWKpaCWnfth+P1p5Ff+3qfO+nmohuje/elmMmoY8ndpydip+xvbqs45+JjwR0fqWl3SboU6deuhXG0Oub2nocVXtDNHTcM/VDC/n05mS9besJoqR4Op+7m+jN9hPWPT/A38j5RH/7AvvZ/nh+3EmiVQfKbno1CsjE1NAoEeepTnnuKLOW0tVGr4RRRxTId4FC61MdCb0MvTBdvElM94qGb+lmokAnvhpf7bdcREujs76/yRJTmV/uc4Mm+Dt1CjvlAwSkET2gb3SIhMJme0cWqopoTMLOmA3TidyHOy49DT3WYNdUqzsWenPDUl9TPxGdLM19n50HNG7b7NKSUCmNU+nTo1FHRuE52UucMP5vWg2sLpVL6dbp/a8NL/PpRcTSd9Mx3wuTzmb2EQrp3Y3hqYHWYppd/al0qynRnuv2FPedR4kqZ/oHiIgK//T/4epA1GdoUwdH+GeBg8+eaVTgU2Hc2p53Fwmo7+zch7tPKtFH5cBby0+IqGHwlUHKH6VU3OxnUewJvTmN/2zEC2CGwt55qT/hP70/HWsZIqLZVw8YL17Mo7niYdUBedBzHX5syzDnU32PuT/3JWFeVlRmryknul3yJm8KwLeEmN8H13qIKCg3qI/wk4i+OrmV7lshpUWJ785l+MhomNPFAps6GcVXeOW33oG90DmgXrNPRB+7r3g/AuPL+F4v9YKDAopb7Hlzyg8R+bz5bReyXELhmeU2340EJB7dMiQD/ZzgdGdJ8loBee78LdHS59FislphoCIhF9+0AxnDxHStf8a+Lv3lpH7nZpfT5jJaPmVX1Zf3QlpcUjfsxmkJjf/8MEYPv68e8KJ7fttDCfWyeDr9/ggRbUj8uPzeVD5lbRREvES/L7VIzhqpi3nRr1L9T38x7bmXpvp1No8mF+lNK60Q0Ps9M1wSlPg07KjD+egqCdWPjMs7Xygk5TUHl/ZE/54fuPPCODNl+uAY/aKlXE5Dvx6zOtAqpNJVJbn1sG/fr6gWGo8WUnGG2vovMWI6tHLR/aXLBOTzc8yT/BFE5Wtv/fa/J6IRL/eGbDTi0/pq68XLi4S09V3/g6VuRGYpfxIU5kjJLeH4C/doHrmdHHT6xV4R5av1PaM8V05BKmM1mtZIaG7rQ3/HOWJq0q4taYa/GDgz3b15gIiaTQ9ZTGnl04xsxWlBXUU0/8R7L/kU+NMv/qwRPxTRHGFCteExAb1caDDmswOfxj10O6V1RUwLq/YF6vvBfxfM2K6twaM9u/V2GwfISWWQWWrFZxk97xNv3wV6cHu+htdKOPzX9jWvCjxDZBg/NeVcIPMHfcYM7ornrXBogAr0ztaJq248h148smv1dYtiAR384H085ZyQos1HaSpVCcnx4+ULuR2gj7uJ4vfeFVDJtaFfj8hltOK+yt7P15To+cu4Xt0+imhWp6NT7DUUKSsnQDDIiyh1qX/k10Vi6nRtae5aCZ8sPHaKFtwQ0UT+gP1qb4mW6v9sNosS0Q9+w2JffxGV7wy9V32JT7Msl134bSGi5zs6T5jwR0TL161MetUA/eH2YsOy5zIaO0Fy6LermGKvDL7bki2nwJuyeHd99NOsyHNKE+HXPcvpshl+VPGQQZpHrIW0br7Hnr2eIhp3rvO5jr3FFKMRKI6H3Q88u/CTc72Q5uc2NS+O55Fi4tQHEQU8Kn8fN7gI8cWP60M/+1+VUra1zpzd8OsaC3iVH4ZJ6do1ww8b8pRJ22N1pqRESC821qrKTsFuZn2+WAJ72//qwbVnpvEplefRNj5RQn4rOk+9sgcb4GWYVVli3B24JjR6BT+WFxxrsQ3+TGiekXBDAX7tZWW3S837BPTJsvqLwlAxOcd6vqgK4FNM7natze6YX5Xrvy+An7L+hPn3n5flNG2wnv2782in6b09h//C/8hyeDVxl5Am9MzLXb2cT9fdo9+87sCjF18FtwtgH38s5QnVdUSk2X3EwybojWsLVi0r6iKiVWsV5o6fSrRf+eyS/RUYpwUKv52eiCm6YdGHRR2UyHTX5qkP+DKarrmguXUJn6LnXtA1u8oj3QeHBw3ii2ndnzcJeYckNMzzVElMiYDWtSafGdcgplMbbrda+/Po/c8+x4KahbRqSkRBW6OQjpeNrFySxaOLa/oGnNonpmO7O/2M8VSiin57C/wCJeQd/6WXV7ECuUwp7vwhAsF5+QdHWX8Znbn+dYbiY6LDHnF1vLVC+tbsn151GP575OGvA2cISbCmS+bIB9iPTqtcumoe/DzdGVN7dBZS4mTtL7668JeP7YkLRhxtFZSfstteQAURan8WI/4Lad4xyslfQG+XHrkXBr9jaKl6p5k3hDQpu6viFVU5fZoqPaHzVUINX58H/+rPo7Cbz1sU03i0u9nXz2aoiPSXF3yqsUDceV5zXodbQpqmvfOGxwjo6wpX4ZUvQtJRG5p5Y6aYOmvlJCc94NER7ZhHoS4yCjpyqMUuA+Pk+dKR+sVCat2/5aPcV071Glt29y+VUPTZ8Nl2XgI6mdp9yyyM52W+b89kvYKf0W2W/cBWMfWNuj7rnraAZhzTk31AcuzvkbEOzxfxyL/zrJV9Jokod9dT109OYuoeZF+t+4FHRkayroVDxDSvvuNrGy0F0ne68mHkQ0V6PGCZ4uYJcto6a2fAbQH87E9LRi1v5FFe6x/10g6wQwpXYztq8Cnd+tSHnDEiOr3sk3W/AyKyUStayfy+od4n/7z6KSaVt6/emtjzSazLW5M1U0i6G6aFiEMF1C35rofjSSEtWfonbOYQOSU6nnrxJUJG08y/r/qKuH5KmrDu4XgBuRaElt9VQvuzV7yzHy4hi9M5UZnTYS+eLqd+dUQjXaS9O+K6DxIcL41aJ6Kkn3UXW98KKfXe3EniIB5NOTc5/26ZhF5M7p46aYGIquYWBqmcEZF8yQ/z2PUiyizpZLywVk6nGtt2DeuL/ls38njvaVIqnGjS4r9dQLE1czKTggQ07I7noyiemMYJFXd8SJJQxznlK3Kg90YtnKwzp1BMT893GFIN/OXI8bWDireIKMFl8X4r+D87A0YN+fxDQvsWupZJXPnk71Hpu/iuAh3sMX7gGjUeDbiuWXQH9lDZbMul8a9hr0an9LTuI6b7fvU6Oh+IqqLLVT4vJwpWaJs7foaArMzzRbsuIodmqp3oBbzBt9OVx9cB2YXZrg8KzIFdEc/qMVOTRwdjmvpGwN+pOnZZ//NHBdrY8XvfHfCb/j4LMZ6cJaJF30xMm+4JyG3HVBWfrWL6dXSTN3874pKHzj9EGEf5N45bieHfz+vzR6nNlk8ux53SnlRI6NbuU7KWBhGd6Vhg64w4t3hVjL8+9FqXK/l5c+DHXLEaHKk3VUS9Eh+vLPklIWe/rnYL4V8O3yw1Du4D3KL0w+VFqsoU09TdLvwKxssA53Lv+fCHjDe/vwccKbJO3pwKf1Y8XX61/1TEUfFXlv1J5tP5dxa3V8POSh5//zK8TkRuzgv2eVoivvDQ/NUH/u7i4hwvvxDYp3fut8bYwr95GVFyyltEuxYf2vdiiYCyilZO+DUEOImtlclALxFd/7hzXL6MR5ZNnz7LER9rd74z6CPi+CXnvRWbGsU0esnOoAfw7x7fvJYahXjYd6zj3EMRIlq7YMBNU33oo4H1s5wvS2i/9/hvWYYAKRffa+5zRE4t+lcb9syW07vznz6+M5bR9nO9v5s0SqnHMN/aGOirjYZ58upaEXl9c+nl6SOh0l/+O3veB9zon/LOWi6ggKLxh3mDMB8TbV/uRH+6Zmv19wOu4l6YNuzKOOijQ3VuBXuENKNYfZy6jZAWlvx99Bvj376y5epa9Fer+MjceIGYLmcpVh5+IKWZx1oyG6OFtGHkK2tDbNhp0H/0rlwdxP/3B9/KuSKh7btyzIfo8OjR2diHw98KaNeTZ4szAX+2jn30bssg2IPX+WtuzOTT+5EmEivYEfMvcy7uX0x0OqK1dZyyhBTTy7Z3TeBTQpP97BW3hfSr4yKPv26K9OGrPGb8ecQJe8bNthiG+HjHz8jaOgnZD3ngFzlcSCPeXTv/rZJHDR38xu2/JaG1ovN31tpLqFP0wOm+8E9+Pi+eJlhEFGbZQ6FsAua1/cgJU0uBB3rzBe4lPHLaGDMyewVwrY8eK5dqyEnwNC5tm5kC5WRrORXy5DQlO2bgwldEB06NO9J5PdHRtb2dEut5pBI/cJ2kSkAtS+fr1MGP6+e99ZlDN+jbdxmaE91FtCdqX38zjIuogh2VfVeJ6KmutaIcdnrVtyfSl76KlF42s/kMxsGIwbqd1jyWUUlT/KoeW3iktyxGResV/KePbg36UUKq0zO6SvAXhRkWZy8/45FHqf34u6vBp1DqsdkUcUtSefBe81LEB72d7q54y6Oli98cNgA+cDdV9fj+ndCPHtbrHruL6bVHxJH0Y8o0TXrsaZUmnyKuPRv4fpwynS12zFkrkBJ/SOfLwXky8gzQlby4DXv0YuDbKsQh959/uTJwJwDp63NTzmoi/jz0Mk37HJ9GVm9a/lRFTEe3yKpaysRUWXGpowM2SP6wa9LCiV941LU2KbVyFXCSrCshu4MVyMD6XomWC3DHzpPrR8CP6/F76rcBIwV0o2qD9+F3yjTeZdDRYcBVbHz84iQHeHQzds5bJKLo2aalD38jjhx98VrFVfj3J7ynm96vRjtcT13+uBdx59H1EZNx/eAQvoXmcOAwRYkdS65KqPurUTVSHQUaotg3d+Y+FXq3t6u+62n4i8pTNkbBL7z2wsNGvVxCGS4TQh6gf54ETUq/Yg8+xUV39xUViIObL7w8tZtPdzqfuxNnLKDLgzoKz3SRkJc8fLRWC4++tMSMWTmXR+/sr646f4Coee3V52FfxVR46NvChu18+rjbYF+AjiLNWS9qvW8pI/PzH45ti5fSntw/aysr5RSXq5P1YS3RruJL988CrygZNXfjQ+CsYfUba64sE9PBfa1FvdvE1Mdf128gnsN8o1q7DsDjq6+evrO/nEfX7fkxu4OEtOBZ5JTJ/SRUZbPdcDj0Qvbr6V+CI+AnxIY8frlSEXgT77oVsnev/xbOmuyKfaZfh3yIR7xnMHfNszl4Xgbxz5MIcVVp/mHD1oMY33lK6lu1xbRcdfy81KVCKnxRVr3/uJiMTB6Z6qcL6FDyt2PewPGymwSiqzVImWwcnvhKQ0J96v0dhcCbDlpcU+wD/Ib3cFzMohsyss2wOXz2h5SWGPrnH3iC/MKYAtdemQKymDIr1PU+7N6R2KRPN2E/DO7Vz3qN+G/qg0/dTPn0vNphO7LjlC5IGHQY+N3UJF5M5S/gwb3Oj9O5LKT8Bvvwuw0KyEHu0jDF/C2YpfjC45qUWusaulchTWO03aa7B/yt5f5DE4JOC2neXN0LSxQlNGfdtY0fCvm0ZeydF7NiedQ54erfz8awZwPnfNdII7oU6TpQCfom0SV1Vh7yFru6vL45zYtHQRPqF2UBt+4TKw265SKl4Rc035VNgN9UeCRihy30kenNPf0QZ252u3lGuVRIpvpzD09eIyS/7ScLauE3tJacCiz7wqcFifZ8fU0BrRgWr3FojoR2zTm5beMl5GX2H1fJ5+G6e7VU24DjXBh53Xci4nuz+36WXebxaKFhhGBAuIwsnD7nz36IOLvbO/57kYwuxO19fstARo7Og86lA5fyuiqw3KglpAsHuj6L8BDQguyym/mwC9tOqFeEdBJQUUmnDcdgr88lGMSowl6WnG40zAYe8Nr5VNsBVQmlltzI717Lo4r5J6S5h4iiJUry34hv5p2+3+2GkTId6lHcYzpfkawvXzgwvaecPI3uB8hfKJBTrKHRwYd8Omqwbn9uuZh8vry3m74dOPlc2e2qlYg/dI1TmybyaHPMxU3GwAFby/LaXicLaMiy1eNay4WUnHqnRGWyhH6Pn9oxCfmFIe6ZL/XvSSnYw7rmt5KE3rfklx9zlZKB4dEDLdBj142W5DR8kdJlyjBXw3iZMf7Hl/3wE7r91q96foRHe0+q5/eGf/VEo5i/Efb8g7nTe1XEwUnlRyf07ALcuH7RWJ2zIjK56DarCv3yqKDSeGiZgB7ePT8/b4mUnvAzzV4rySi4ZOVJTdi/LgfUOt6fLqUsc9NOf/0UyNs46+hZ4NRJR3NNbMUSehhg82USX0LfhBvaahBfPyjrqzu1GvH0erXA+Yrw+za82frDGPjP1GeqHd9gnisc2jtpKJ/6p+ZOXgAc+/IYrf53xErks61VpHtCkS7v/njHDvhcjzGTDu+ZIKO5Pc8vXQ+7sf9G9JMSNQlte377nTbsYFEtb2YX5JNCi62KF+E55tzf8kbfT0BXBvpUG0pwn1+C+l4BzqOUOcXBAonLY2F+29uyeXQrqDlCirh/9q0Th9Kmi2mv2fC8GlPE3Z++vmouE1Lahu7ztsGPaOm8cqsv86e1RG81xyDOKdcz+jGcaNiY8xcdRwjgx5zVSrAX0ZuaxWMrQERz+Br7OsoJ77eqboo7RvR8kMHQrpP4VNywunWiIVHcgvktoxcKqVv5NQX73SLaqpW5sEeSApU4aF3/PU5K80dttokzlFHFtzulggg5Hdzgn2cO/IX/ZKa2EgAxHd16x+bFIup2rtd04yMSOj6q6nTJLj5dndN1ksksMVWVGVmJMG97zXrbvNIAeOeAnRGusLvdCtaEjlkGvXA5dOLkWuDu8wKPN44ATv9r44Mt0Hd9FapfKt+XUn1lT/77iYqkpOnzZBzieN1tWfab2ojGad6cc86OTzu01xSvWiAgHZuVlZ1BQFu60mBFK+zvgOjJu8KQZ7ncNPmNQyf4MRsrqx/1BA7zx7I6FjhN3pr4pzRUgRYuXJemGKtIeQ9n5xj04NOl8b/d5Moi0poXpaC4BHGZ0ZTtjmXIF/W0WddrooSsDd+r7p6COPTcRq30zRJSPrIu+wnmwzmfO3+PDuZR7twbfF9sgK98ebm66nU+fdOcuVdtPOzKEp3Q0IlCKhlaOOXhADHpB0f2sAG++TtOf0higYz6Su3vDHNUphpReIzKez49MJpiKXouoPywOJ+0E8gr7tL5mjkReYrvpR15Z8R0hmfSI16BR3e9V0xfrc6nRZtXbD3/XUDlNr3OjrHlkZrNFMPasQL6sr3Xpl+3RXSxcHtZ62RFWnD4Mu/kZ6JDB9cfiQVupfA70ECwXIE2zV7s9CsecXlE1ItMJwk9cL3o8qIX8O9dRZrrv4jo1+9fpxxPIA5P+C58Dfv0S2fJ4/vw+3tp/X44DPqhrtHReZytiDqf2audsh4428VRE5WhN2Uje6weFCUmiW760BDE2Ys+6Od5dZSQ2931O7fZS+mBY/6v6cfl5DjGcost4pX3J+Psn7wRUdq6QetygVfUpHWduBrxaZdJ/fy/AL+7EHBDv6sb9PMhZ7cdiHeaQjR8YkHAfPp+8azi1zzyHXluvatIgh/QBQb2Dz8Rt/F/vAdszH2WPL0D9f7nc6S8CXA2AfInpyi9wABzKyszu5iQ/9mcXw80aj22EF+PbRKhlxCjhy38cZQelv0HgtEKeirbIBWrOg6h3sGsHmwmnhKnx7Ze0JsRqAfesx5bcPgPD9ZeTw8re/9DigVJ9P/3X389Y/qDejm+qV8Hjm9qiPLf711R8v/1fgRKRl6YwDjqbMMgMNT12J5+3B8gbuthdwQ0iS15DA0MoAU4nvXHf1vM/WABx7dtbyW+c1/NdvPH+MGx7DcDTqBkXNmhbAvkeD0Q8/Xaf45AD3zpED22N5QRCL96oPXTGxzLOKL/HMs2F23/tQS9YWznRzB7uTXn1HlGB44/6xmL7b3ZYsKh7f3aTkrm6MVc1/7rPdu4wtcP5/T/Fy8VP3NB7Q339TP+v7jP3Amg5XPfzuDege/PvfPn+iuFq3cI64D/6zrth43l7nI424UinvvKk7Xd+b/3hC7mPm7ftpTboMGwj15oHG4b37PdmwIcuO5ybt/wkzv4nzUUvmzDXyKTf7UZqQjwlNv3UOS+/le9ZviOcb7ZceZ4Rcf5clRsi3+db4nX+Pba9bhLgbmc5d+B+z0Hj7H//Yh24DP2+w9sFfdYtqIUVOr2Fd3/oWG3b/6GpQt62AgFK3LZPbHH+c+2UiBfB8TFB4Dfb6+HNSTYZ4DNEywV+qcaxqH/z/dR0f/6UK99waAeNizCWkw8GgzQSIydKKxQjrLXw466WL5ljIq8uFMmYAUvG5txemzZCttzEGPo3yewPU6M28/6P47ycvZyGu1sj/ay1XLc2tn2eYAVKCDq/88B/7T+n/1VMH+xYirOXm+o53jUh3VSemxzoogUr/gIl8Co9kahmVg+8c+Z6L72T4eC/M4NpP/j6/88DXSGvX1o9D+8eTy4qGh7vQBGe0ej2hd546dG2rdVSAzUA1U9Acta2TIm7oJsTRg0Elua9p8n8d87ab97joPDAxeJN33sOC+PIcMSzYxNjc1HBWLPvyg99gYVGcUFxvzzsx5k9a9xY/1/vbf557NDgR3IFiVcHUKYRkiJkSMbN1HBuG80m/2cyn/1qBHrKr32vTbRpe0rl7nfVIES+ueHUeL6szfcQlCmjZjW8Ro+1NbUwpzN3f8tPs+dmY6r/rxWpKFlR1qd6viUqD1H3nWShJrNR401Qpx1fdEv/9MrRbT71qEh03fyaGx9gdrlJTwSljrueYz8/d3DHT2a9/ApNz9osjfwdt9ZG3ceRBw7T/rR+yDyL/tED87t/iok0ZBrkt3HROT5ttOUfeBv/G/xiDbL/iw/Br9SWbRrx6kVYuqSt2mNW18h/S0Yrv0S+MEkHfMOjcinn9IMEclFKM3H614Gvtrr14XLTvP5lPFq5he/UXya7Hz+i0UKn2RtiecafyOuGGm8Lnwf0cvk42NUS8B/mN30oRR+81irb5eu/ZT8r/GXzGaqJb1rws8XSVrUtMBrm5AfcT8/SEYRlg/MT08Dzto/rGIi8ig7suakHgHp1qLPa+dfC+BnRvu8HA2cd2Wc8QKfIULSeKF9LgD5xJkj3/KDzYV02HS6jSUMZlrVT1XRR6IFvcZ8KgIP5HZzUc5y+G3/W7yp2QMfCYO8VchqmUh5zB9lUrxclq0YjLy9xdX1d/Pgt3cRJ07LkdI9y9zPH4BjjnPULbaGf3X/66SmFeBL2tze0mltA/wtvU4j+EUC0s7ZduHeVx79+PNrdQr8uursZxd334U/qigrOwB//tz7s9USEFi75Zv4Kz8S0r2d3Q3qr8rp3hAXv8ZsGd04/CC6KB/8CNpw0+YReBRj9riNQ36m2MflWnKDgFTztqq6IF9Z8kVl4VnEs2YDmm8nKoG38EKsr+GMPLPRh31j4JJM9viw8Y+liCy96uwm3xVRwBvVmaGKGCfnJ2Vswfhc3eAqdQZe2u/r7plHXRDv3Ag1Pw7+RJrn1+M/HaT02PfknN7nBJTrfnOfFeLkgQnrB6sjj9rjRTQtEiIOuH3yoh/wcGHQpMuGaNez8yuMGf+xzu/Ere3ID7/6pjPFUx344iTLhXeCMO9MJtdkDlEi3fgfl2dME5HzygN+x8IVyVZvpshSTUb2KZa+xz1kZCk9k795h4Rqui9N7gSe1hS7T1Ej20R0SvJt8nLEAVXvd1YmIO9y83tmqDryJBtey8kOuOesnwEp7sh7DJjys0HDmkfVg3Zf7ePKo53vZ442UZCQY8Cf5Z0NwYuZsl4wMEFKQcHFZb6nlOi21bDKKl8pnV3zKG9BqoDetB267aYmJtv6A0bbkPcp2G8srkOcOOn7y5n5f/n06PE+r1LgUHkvtIJ2bQJ/avz1cWLgPjedpl3XSgePqiYhPjEO/JPAnp0vrQE+sLew712+lDxdKzNahkBviuVdPYADSmRxIu9T4H2U1A/+u55P318KNzwGb8G76+XjTcAR5X1+HNgKHGnFgaoJb38DN53i1NCSLKEvZz7GT/oO3JyvNTh0KZ9GPQwvsukHXmphcJ0+nPj6aSZJesFC6n7b+/NpczF5PdveT1bGpzSDjrN7zVCmW7M3D0jgSWm11ya5QpOEel90f/cbOMsm/4H2ugsk5OtcZfoWedn0Tq930S8BWT4YsNaoB4+yJQqvcycISHdWUueLLny69udN+PgHwOGEv5759kOcpxNdYjBbgV6kdp8pA1/PfaORkkmskOyfjtYbDr4ewgTHRrR71PM/a8/9Bq+2dE74yQTkE15dzVTbLqQ2Uzt+I4yp6u+10UfdwI8rLSwVfuPTux6rVj20EZNLtnBjyV8BfZ8svLkfvBu+TnOH938Q54/ueW4T4sqTLme6pOaKyU661zLTVEqDBwkCrMG7K24NyknqJCRnnVa3QuQFl1z+WGoFXP74p0WuQ9t45Gyk3H3+T6Ixjpq7tFcKqfmHdta4ozxSn289Ngv90TjA9nUAFgaumD1p/2/g5fUGRxeVdxHSxpyg2d7uClSlsv6IJ+xOfPfcTe/wHLQXBsz8gHxBUU3M05m7pXRy+NB45znAbXcH7DySzqfwHgk/0sCj81Qc1u3kbzE9+KOaFfsO+cEllSPXH+bRdLH77tSREiovvdKSDD2o2HJ7vxi8F5+QTxTXJCDNBJ0FLilymvvm/uK4/gr0pkvejRLkeVuUTTI8NaW0+Hf/sNk3JXT09pyCF+P5dLzglr9+FvCdSdRXF/j1hdJL7jqMT5DSJ1ENcfHT283LO1/j0+9Fr7P7It96/Wf8NFETnzpJzb7ZDhaDV31jUh3m0eSEFxvmmEhoxB+VUJ2ZKqSmNMVqW7oSHTyS+abuoZQa39483posp97NlinfcoV003D8/GuPJaQapD3GD/PSWe2xpzF4qQ9uvdtq0iagILtVWbohfLJSX6UvAl7htdB0REu8mFa6Fi3OPwE73GhybVQHIe0Mkz0Qj5ZRj/2vluTry+j+toU3i3Ed3TXTc8sGy+nCR9fJU9Sl1HdIz47TTvFpQumE4M7Ic5u+WbTh3gge/U3bH3gReYevv+T7/Wvhr4Qt2BK/A3GBzrqPO6E3Xp0a6VgK/6N/Rud9llOF4G9vnHMkB/yfw5qbZx6UkfWNjCyzccBH8nKOaiDfNX2jdMH+YYj0BME/Di1BHmjjobSuwDt6Dc+ZM/cW+vlloH7saQF5PNWyPfZSRN93z37Pfyygj7nv7I068Gm4veKt7shPjl6SuWq3MfyOz+NPFYAPemntjgrfzeDdTszXyZohouLub6QHkOfVtu5TusIHfPPUovraEinFA2jVDpPSzbopSztsEKJ/5yzP0hBTgmBmnGUzj9ZNH+HnhvxS4amHC0dMB68lQGP2zXqMb+MwMyns1jDPC8MeHOSTomn2fA/wE+KfbX6zRIa85vu3mct6K9KVZ6mB3uAPRS+aFFpvokImCgaiskY5TYpRWXPMVIXmXTay/wvc0txN9XfRauBHahfTliM4DTV/71jfWULBF6/VD0Sw71U9epEVeFN9jrVkCz/zqMdGDYc7WCiiMGf7y9RX4MFmmI6LR96vb8prNX34sUdNj1UcAx5kYK61zAd+1oSbOitGqwMXF/c4MKdCRGfdywzX1PPps4lpeRDyKmNK/t6rhV/Y22bK1IPAf+S2krRd8GdPzrhYE4z8Tv8zPn17IA+0aH+n093GS+iKw/6OiqH4zb4VtwofDoY9GJosnJiFPPWOOEPPuzzKv/l4rk6AhGZ+db/14T2P9p+d4DXoNJ9GX63zkjQRNf5Wn/8IOOS7NpVOweABTF2TWZ4Ovu5b/yLf6348mrNjbGqCpoT0TVSWNWiJSfj+zIsnv8FDqNCpXXdHROH3Hiwbvh78C62isFcDlEh7o7f2D/Bpcp30T+z+rkBaFqo7RnUDbnru1bmGVXKqa73/ZTjm2/bvj3+tWA07W/n57xXkL3t9aF3RiDyzyM5lg34v8OlUx+SO7CSmD+JD/VbDn3726PSwc4hctt851/0ueGbmzS7nREdEZNf8urmmVUazXfqHVl4FH7dIK2xdkpSUlyVt3fNWTMXV7h9NwCNeMvucnneaiPrn/ZzpAj9y8OnNT07Aj5tflkuEPM+7pW8fJo7g0+Dzp5+UdUfetiHNUuuNhI45Dd1yb5CAKvWWBvvXghexdEyZBHwNXt3anV2HKpKwc9rs+2pSOtRhRfRGRympD17VPdRSShNe2Jl9Rh5TU/NJxIpuAlIf2XlkxA8ebRp4pzxhHfhYu9ruNf+G3b185OIsMfiOmwTS8Hl82vOE0kzAE+5VPWNLLvJUGpMkOW+PQ3/2XLj7Up6AXqd0qv1dJSK+ybReldDXngvXT/i+XZmcZj+9Oa+PjLro9OcfAi+4zNu7eZUpjzRrjE2sTiCP8XbxxuQEomOubzU6Is54FSQx3wR+yy4T+zELkUdV6dKw3h5568iy23XKsL8rshusQhxENHO9/pKtZsAnYxM22Zsg73FubCMBn19iEt3xCfLUi58+TTwLfHNDQJvW2r0y4Hgev4dFi2lb67Em28uwqw9iYgMkPKpVin/bAr7ZE4fymuCOAgrpMNJriC30SqvpphvIx1zb4qQ/FPFUr7Plo1uRn17W7OQ/VBXxhoGR9nM32NkDhfNmdQKOODcpt3S+Mnk+/FF9qjufVmZrbO/rhfzbktGLHgD/tuiy4HeakZjyfvVujhoIHqvF2gLHLeDDvpT1OIm8rq2bX+hYAC6LRNtKXsLu83+Gb67twqMHtVoB8Qh4h3p5qrz2FdLczmtq9dzk5OO+2u+9BHzh0xpPvXpLaFbjtkdHu8vAr3vwTQvxQ5aC4tpC9KtblxfVDfBrnbZHjhkE/VfwevdfQRiP7JTtZ9QbIq6Sbuc5w0+WzR9/7GYU+CCLt3xrgZ+n3yN6arS/kG4o3M5Vw3y9VZ2ZuvmIEr3znKBhNEtGm86cihwIf0n5ZJxtt4ES+iHvcuvbTvBs9yoVTgAPz+D90tQE6NETab5fBqA/C9duzhqULKYrBcm7LPl88ipLnnkEfMr7yv3vb4f+vBHT9fSwleA/dOillnqQh7zd2B4h4BE8/bI3ZDr4HJfjZ/3ZIAG/JUAhMA/zZf3o/L3F4F1dKSsbywcP5civRXen7ODR7DORElfw8nZ33ENpiGfjZdIL77cK6fQJ/8VZ4D+Zeg4fUbdfQEazvpaWY9F4Sa/GJHEJeIDD7gQ7IU+QHjZ96SXk7Y+bJZ38hV8f9bToWDUWfIz5StLWQORXtnbhBd2rFtC3mm8PBsPPr928KQvuDWWFp4zLRF6tF62JOVkuIFlhodGSW2IyG6ElHVCJcdOw2VTJVkxKTeX9He8I6cjp4yXpyIuddH/0qDhKQFp7zWf03gH8fK7zg9gzUpq766io+oeAOgya93PibjH8unkTTv9RJK3R6QWK0CO/FsQs7Y98UUjRbsfvqUIKNjRIzIF9udohzYPh14/V387WgL/19/DhYRvugRe3vqdHcA8RdTLQNPj1g2hdlnBd3AoQitVuehiAj3s1VdZaPEKBzO17Cf44KNKnozmt5zfySX3Eghd+u6Q0rSpWdcZUZcp/9vqBBuKcr6vj0uOGieiR57fCpkDwZs5nx3vqwa9aPDzOaCZ4H6vMrv4AP+blbI3ynsAzrgy2VPoVBz++4KYiFlXSVa1iWmcCnuvfqA2PNstpkKFh0eoa5E1Hvmi6Ar+1amqZxBy8nSxv21Ha4Adc+lEwcCn7beC9z6R7xqHDd60YlAv/0WTSjoI9seCludyOcBrEoyz3C+v3AB9xbsMWDt8w/nhZrqNDJXS7ybXxL/LlJ+J3euhLwdcSXBtboSans7v7pxRoYN4Mrg1rBN/iiH3Fs1U95HRxofvShF0KNLL19kA1xI+D1/0o7dFXQvmh671Ogm+q3qPTx5fgUxz/VaO8FveR6Fm66ltHxOMXV+85hbzJovLE1Sngp6S4DleVQX/Pe/xD7S/0mYLXnaa+o8Dj3HX2eiDaMfitrdeUGDmtdfApi4lQxPPfMU+zUoHmxfpH3sD6kRnTC7/9+AV79ni30ZIKPr16dr75Ju7n94/O3p/NBaR4duFbNdjl3SU97y+OxDq6vkHdxeugzydrVb4D3+a3uLHrXU8hDYov7br2Lubr8TlZVcjn+B9q2HXohoQ+lzx7PHIBeAj+a3uXXBJSgpde4dYjWBcReS2n9xvYc8eii7ED+PRlT0jx0WYRDfM/frPXYzxP3Ttbeq7kkXYH346BvjyS5nUOXgm+5b6dl+rvavFIotd69TfWI61eefZztY8ilaYc1vMapkBLxDr+Z2LwW9Qblf1Ph8sp60qk1pWf4AcYhhuEgZ/v8+RZXOkG2NMDWmV3lYSk9Fhj2G+sc0lIfWM1Lk9EITapYQwnMPd3N5mcIaTpTkN9TWF/SyeM5j3Cur4ti4ZKH2G+pl2eHqy5APl2i7GBE4YyXqe1f4iJlEyHfhs+rrsSKWi57nb0ViANoUFkf/AUV1douK5U5dPXceWPtRB/z7k//elN4BWK3W4rn4Ce3LVhwbQNyNMPKfPWrdgrJkX/sS4fsZ6wyKhvn+Hwt25vyzZdFwc8qGeM3F0Zefk7qdv33cf1lwx8GL5ZkV7ef/+wrZVHVbnjVp+NxTy8OW2oYTbwLMP1Wh5i6LGhX0+qYJ2BY/atjEd7cNybd7O8Me5Oml65Pew87ETyk/FJs/m0fd4qi5AkHo3XdFYfM1hElaIst0zgV57+p1S81JQp9H78qcZj4Jl21JNmtOKXsh/39vseJ6P9oVfGGqjgfhsUNi8Gn1YmGbM6LBr8DXWKdf0koZy6hnodlt/cHnPOGDzYTMUze2wvIIc0M+VDAOx55DTNMwdO4rmqTF85DvxOl7Vqg3q3YL2Twq7xd5ZJSfpq6mL7Aqxfm9xlcSZ+zdnH40ZIAvwm34dz159ZKqCOOk+Xzv7Do9dv4saPgv973e1rheNFEQ11qn6vh+d/JLMk9iXmh8OBMbs0wLO9nHYg5gZ4mNpf6nul2ICvIJ0+YcJo8GhbL937A3788qcOHQ55C+lRX6NBIzeI6N3yilpLjDfZCO+TjsjLPnZPT1rXChxJUanq6XXgbTODQvK+Cmi93ZG5k/YQadXkHj7/HHrbWRSRA76QQ85xeT14fw/q5h++MgwY8wr78U+fi6isTUd4EPgPtUk+C8BP/+B8T2mSAPMpMHfO92xFanQ7+Hwz7q9hnzxzyVsphcYUjzmgrkiZWWUat5FP95s857Xxa/D9Rmm0xRaBJ1YT5+//DPhSWfKKLrfBg7Y+0/jxDtEtecCSrsXgwep+KU33FZHSB43PE0Nh73vH79uWw6M3ysM9hvZTpt83fp2ugX+q4p66KiRDTFMWdejzA+vBhomePnhtIyezzo7VI6E/z96r8FEGzzJvamn+71rwPo82TJ2K+XD5sOeLp8+A7x7iBX8AHmBA2+Y1IC86dkjW4j/geZ5ZKll/HM9VrePG0F9Yt1bl6eDS1ZFPrt2edQt+Dbxmq8v4XwYCurfP9+woZSVavOI86FhS6nZkrN1G+FfHLjsafhkP/sh0rd/Bj4Artu7bKnEB/6tfvnFnrBtL0/zhqnmeaKFjj7v3RoIXM6l1+cQ3YjrsFBM5Besw1OZafr6N9QA+WivW/QFe1xC4faDGN+Bsw0p/3h+mTPYzHvjbIN7+uVju+XOZAl3QnXOm7r2EdDLSJYYXMf7uHJhjAR7X7zW2HyOxjs9l7p77f1fxEF+9sXG8wKdfGdWG2kMFlHJ32X032I+uZ2YN3n0I8XPzu/W/wbet6fHiyGH4UbcetTzx1AF/N2G0eeIA8Iac1oxzBc9gWv8vRX+Bd70bL51QgTjItaTTXFWsG3k/eaXwYI2Izm9cvDw8QUBLzEbkJCLOrD8h2n7giZD66M4XtWG9i/E9R8MZH8TU4PV+qJoP8OCTHaw04YdEzDIdygMfsvjzskMrwP+dteLM6Hfw86b1afPpaC0jwU1d59m2MupsVDLNNkiC9V7iZR5Y7zbDIf1bMvBgadyNJQvBIxaXa1yduUUM/n3eonrwEY8nptc27JNQSEnt/E/dEGf33HFCjPz1h5Y9Bl00BFTvsrTs7lElOm1Z0LnpLPTXnw0zvmIdQZHbH8+3iOt6OlsUdgZvZbf7hLyV4N31supROXoB+JVNf4cOg590vUvbnt7gTUrr4lz/6vPJyV/N3kOPTwE7Agc7Yd5m1H1wUAQPTK8wKmYuxkXPY9Hee7LBJ8lzr/WBv19wdrDpmzlCei0JLHu8REbrXR7+enUT+vbNlnkZWUp0Pn/n1CCsL7intFrtfCCP1nTdau+bjPh3wfM761JFtKDkcvQjtk5z5Z+1mSHgE/kJboZhHH6MTdrtDT9rx0nsq4t16hPD+g/6jvmwwHL2nyisv4m0fm+XvA5+6ry6NbrwSypfVC5PKFWgr/ePlngDb63Y4mt6woNPdVsTLq/DujuLBHn3hizgEmcaOszCet6AU/Vpe8HjONjvUI4bePaxQ9dPmY75OmnD1JnPzcS0IrbuY10j/OirrobqrfCXDsz2McrE/H859aSKEvCD1OfDn23F+s1bbaImbSW6l2QtdD8kJ+21qxs8sM7pUmORXSlw7u8/DQ7XgvffrTE4zQ12VeNCtPOmZCEtPzpaUrxISEOfZ01zuMGj4V3ebXYayKMdr3wm6MbyaUPFpyYvRTF1jCydfbZagYRRa3JWhynQzm6dLhzvKaOp/fQef8e6uMCN2T2TgKe0LPvrULkEfobT9rCB4Ne7lp65vR08ubBJCgaL8Nz+XFatuoC8wZQtZweOhF8wRs2xeRvW0aUW+g3XAA/f9tOSbZXQ69F59ifGAz88urclTxNxVbkk9Wh/8NK/hCYNkIJ3KLlq5GLYT4nGzI4bYwMe31hpfd+BiIOKrUtqHoInc/vErcHPCuHHtP7443FWQuqVrl0vYz1JkdahqBt8IXlt6Zz1DXxOu/qzU3ohnxGmaXbzNfBf9ZJdd43A56O5H8rnYL2GvZfJtabJ4A2tvpazpjPmRcwZ4adYMY0Nm99pYT8FUn4fvdlzNXhhe80u3gXP+tex8rhI4MkHfz5dfwn+mquddc2vpxjHV1xfnPwOu6xyv4NKg5Aa9YqPRSAPdS3irccftHuH1Xm1XA0h6V8JNzxmoUyr8x8cP3hRmX6eeDLXdrSE7qksre40FPFvzxkTdusqUN8PD++8Bl93ecflcb+Qn+nX5Ctn9vWmVvOmGOAJ66+YjrDEes0v3a2Nh0TwqfmwKEwMvkxhmnCF8zMhrWl+8PSKM+Kn9X3NykZin4WpP772VUTecfEn983go6le3Ho4Cvq0/vLHbc7LwM9r3bzver2UqoIfm2uA92+l3ie0CutvPa9/cv08EHZx69ZpSEfQ4oaZb563EtbtzjDfijjbwWqfe89+WBf39Ky7OFxMN05gzxC0zyxzZsoVxI8lRxYlV9eAN+R9R/dTsRKlLByrehN2coxZ75kKaQo0ff4Byw8BWIfQbaPRvlgJTRm9zHnhTegRzexHk67yaZmjZ/Bm6BH+qvCPT4F3b3hlouV+D+s6Qrd193IR0cHyhZuSkS98GPr7RBXyO4Mkfn+2ZCMOs1cMaUlD3u7mH0ef7XL6/uj8lZci8OL2JqctBv/ZNtxs5B7wxsJq+r009MF6xktjBDrK4OnrHog3AX9N8PiOouomAR2YUNbkAxy7fLaBVjb4az9/Hy56CNz22db+U/dX8MhizfIENcSJ94+Gyf0swWf6Wp/0OlBOO+x03L+2SGmYgdeaLs1YD/t404O7WAd9Oe941qJxYqyr+ZZ9frmAuodtP1nqiPUTvqNf1rzDejPlASux2QkpYRW3CXDJra+mikQv0K/mO61G8EW06dP9cSu/Ic5eNkupG9p9qaDMJxZ5ysxo0UZF5FXvtv061Qq+otvXUY0VIxRJz+z5nQrYvfU9TL8mwD5O7Dk64wBbV1yRXKVVinXMt+5NSx0GOygakKyE6wq0j7b9AQ9VR0NNaG0tosBkiczCjE+V+yyHOo/BOtsJNplV+/m0sG/fo5cQr65VbfV0n6ZEilUfOz1CvubDy7SqmtMy2jXj9/NuyD99lubcXoH9D2qLDrw1wbpWhe3HVmyDX7xuc5eLRyMRF2rGuE1CXBm+6bDcA/P2rH+IvxnyNvuHzC18KeeBx6rbXDEL1/d4dWxXGvJLb6X6xogT0xLGqiilyshowYXT/jOwzsFu2Nx0rFeyvzP0gRL0So9DKfan9BRp4/Unq9U6gTfqld3Yu1BAfhMynQYjH7ogY/O1BPhLRtnLppfBLrj0m9I1EHn43h1i/HssBB5eo3X2NtZHP560sG0A8ol1p4varqOfJo6+oT8R69DEirMSTT7DXkWdf1t8C+sbG4QNjV0V6cGZcSfVwL88UXuhn85krD+22f+5Futj1kUURU9EXjx60fPFYdCLddOPXe2B9QQj1ptrLfLhU5TCBIfbx7B+8GZtZ0PwnT/skD87iXzM+2TVhR+yRbTmwtkju6cI6FSm2bKd4P2fqOhxZTz8kR8Zrqe13mPdtNnhtYXwr6dWB31aZQPeo8OFosXIjz3o1WO78kaiabPPzCydDT/bNfOxXRtwjOqPVU0DRfTXmN+4+RfWcc7v1P88cNAfuid0EhC/1rm4Ofgjz/xdRdXNBfn5iddOf7+CdbkfspO7vEa8s1jRYUUM1leuOuh40gL89CHkl5O8TkixPJ95mzYhn1rgwFsFv/7iRTvf8rNE3qM2Fpn6gOeX1zj1tDOPPs6zXKoA/fs93qel433oidbTWnuxTjhy3+sPccjLRv30Gd3Al9PIwwMr+W+hX60WlyUsBt+20X5MFnDCNrUtmtaYvzJLm6EBGJ/7ujt4rsE+CU+eve2ih/uYFdfmNgl59V8Sl8C413w608M978sJPnhg12uPHRSSYWVR2Zsw2Kep6h3SxfDzrs2wcD4gpPJ8r66NwA3qYk/VrHOX0/q7VasDwR92+HVneyesfwvat9zJNkZGs3Sjjpw/inWc9z5mbsU6sh/jO8ys/AV8rtU6eTPygoVGCcO/pIMX4W6udyOVRzXrkjsuwX4dCk5bckfB/9hVnaxyD/Pa8H7lua3oH/PQE6Gu83F9nx05VUexzv2I1V51rN8PkzV2e471cqPM5AeLCpXIRagbfQ3rK93sFX7EYJ+H5A21A0eABz7Hbn7JG+xbERDd9cSkagkNGL72Rk815I+1C5zDJyFP+WHEyrnw15c7dlt4vQH8131bpo5APuBktFPfLtjPYUKEmUJYVyV60OVOwc4EJer2Xlebj/Wdy+dFjem9RoFuD90llwCfz+j46FJAOI+GvjNPHTkI+2NYpe8s1oKfX/Lw1BrggPkbfLSN0C6TIZkKehtglx/N3HMK6+j2JPu+BV2XjNILtqVgPeUTy0NenQ4DjzLoei0V68+21E53uGOJ/N/Q1bvvP1WgxG1lI8f0l5JG39Nuc5djXdubaMs1yEMMt1oRYbqE6Ntik/DNdxHXPL0wyhb8iGFHWpbdR55HFhlWdBv5rVEmTR5uVcj/hi/LXweynavaWj1s6gje70Zr9Qng4UfvXVj8XpEO0J1MqlGgxj9KDQP1pRSp43bH5puc9tTd7xOqjrzkN7PwdOAXc0aEBo8H/6X7ywPfv4C3uW5CZa8G8E9Opn7THr5RSGvt+89Uw/4gSoqTPgZvENOfupiPtqNE9Gx21LX0FgmpJOgvjx2JfBGvS95KfL/dv+jTYPhzJwtV9zYqyOick7nwMvT1+xBeccBy8Geid5ef2ManPqFG4Q6WyDc0Zu0RAl9tHFpVOwLrtpMmzvKoCBfRih6zZ5jmIk94p7+qdgn4BM89o3ZiPeqdvma19Vi3pPymy4EJ2M9hwP7UuZ1nKNKTUwPjtWCfDvUN8f4DP+Z8bdbz4jwppdtlKz7H8/2bPnzeIfhTXR+eL88Bnprx8ufKXfPAU71bX1MDvHeH0c65iy7waInf7oxU5Kt2Kpm57bOA/RB2VZ8P3sGbk5YjGpKwrunOqBMnr4pps/mQF2cGK9DAovo2lx4CelrRv9cS5P9k+1eMNEU/yh12+e1FvrHryZOWn8Q4/92lXYJDyJs7bW6ejvxt8t+1TbuwXqgmqs8oK8Ql59UdCr9iX5fOinUHFbBvyOSai5kHgZdYqV98ug5+YdP4o4d+7pHSJ+fSwznhfKo9MCs7Dfvp7DcdHxy6C+vr1402/F0ho88W/WyXisCfyFHXLEpA3Lw0/NgV2Mfr8+9fcIlDXmzyvXsD94jIL/De+Ubk1fZeFjdPQnzhtrd/RQVw+vfu69PNsd5qzZuXneduQd55R9K5K5MUKO0Fv3XxZQUKe/7l6B6s0xu7fviFrMFS+jnibul3OfDon0rrLqkK6WGfprvZ2G/LZ2LWtyfAQd0+frvug63EOt3IqToOvszLKd/UeBjHF0ZZ6/fvCT0zvTBgylExZZ7m8xyxn96J0nAzbeSBlp35fG9DiZzebrCwVYcdcNjtHegQIyLV26JRm38pUD/xxcdu+yX0J6b8yVzgj4YHkm43hYqAv+1/aCPD/mBvk/MFwEHte+t8yQZfOsPZ2WoWcMn1qdeP/sV6/hf6t7slIv5b4sc3dTQHftSn8vIAmZhGChZMPwk/KjVb/p1XhzxfcM047UNSuj++Yv1I4AguR9Ypaj5H/BTzNDNzg4Ba/Q1ez1YHz2nIg/edwSsvj/n5UB96c1b6gi06c5Cn2W+49fUR2EWfhI4J4LEHiladXZAJu+EUfT8VednUe4/WN4Jvc7B05LOHrlgfIHq/ZuJRPl2IvF+945QCdbMpCKzdI6MN0ZUpP83kdE63yerMUOAln7TWd90KHPK4z1l3C+AbdEjj/hqs41m18Ggj5lnN576XR4J/tPDd9o7ndMV02vjMhnrYxafC8poHiFNyF+0vOpUC/Tzk1ra0DzJKntb3fCt4BEbpfW+OwT5Ab8xuH3l3WEYiF+8DHh9l9EXJ9P4YEA1ju07odxh8j5UvO/Bzsf46c21yQSLWzWq4hsw7D0Li+1T1Ka+mianIs1zrPnDiPgGBgQuhj903RHvbFUvo1JYduU3AXZru7JAPq4Q/rOCQVPhFEevtlRW69BST2qpuHvlKivQl/fnrrWDC1ploLl2JdUjrjh/t1Ac8qqrMquQ68DuKiqc94oMHN+iK6szR2FCu2v7n22DkO8zkky7unQ48/FPNLV/kS4vfn1Wb1xXrlMcY7HyPfX/ehryanmiH+j/lTtgFffAxKGJuQZkCrb9fOakQ68a0O/2SdQUfJ19x0LDHWO8dkhwnaXoC/O7mru/vO4rpW8CJiLng662o1o9o2g/96NP8Vwnrcqe51G2aAD+oYl1876lY37+kyuceFnxSM+32+IR5HBeeZ/p1n5y8F5x2nXwX62mGWK99t1ZCBkfOeTYpiGlwRkSrKA04uNku7d9jwe8XZ7z/JcG6aK+BtdOwL9bfBaKVEzYDN/qTm3vTWUSLF3pZbj4OvNjokMq2BXxqjY651z8Q4+jVo5LUv2JS/2zax8UY+iSx7w2rbwr0lx7vfX9JSlZFb506Oglo9aXPQ3S6Yv14KzW/Rp7WQzo/Lwv74l3v+XBrCOKW3YOr5cmngBuPvXN1LuJR+7izb64Xiejl9weC+yL4P6VH1y/szqML4avKevSF/n4VtvMExuPgpzqi1SA1D87bJ6lYBb376+b7I69lNOT3dLVU2L0jvpctg/sg3/Go1995qYpUZnqjqgf0fWH99OdS7D9nHFv7+Sn8Y5sjmkfuLSQqPvnmfAr4LKqPpJX54DG2xYy9OwDrcfdqGbaKkf/6oJZbLH4A+/DWSu6FffSGnw7XHxyNvO89lY0TtynQsvdzBxvg+St4HB5xH/6fauSRKs9FCjRi+6XKQqw/1o6xEEqwX5jyop+TlmMfmcv0wK/WRkBN1xImXkN92i+7rx4MHmovo6snw4GjdBWY7EpD3v/4511pHQYKSWgxp7/ODKLPzQ/2rwUv4utt83wTRxU6MXds/fI9Yvpiq3khF3Ewv8PFJS+RL8vO8E6/jH1dPq+Z8vkG5kuPoqFnk8GbKOvSc5U58gr2J/Km43ZpZNEQ6Rrk5zXunn/ZMRx5AI9LJ5chLvTpKh8pwvqfS2cykgbA/zlvuOmy0AWK89OBdS/B+yiIjF/XNQr4wb41MQoYj+Md3wSkYd1dw6xtPh+3YV+fTcZP9yK+fdMc2OiNRRkWMrUbAcAL7+q8+bTTi09Kb4I8DRCf7/TLzlEpRJyg8vn7SGfs9+T4oUgJ+JHDghMxZ6A3Jly7ddrzijIdS3kdNv0o1i09Cu9+AvvS/NS1G6sD/l25RpxSFuKPtuhfAS/ei2nL9B2Vg5F3Vsz+LS+C/jRU3VqpjTzm5r2W007Djh08M77lZS8xrTWPjWbxx9WPIt467O9i3TRN3W8W4sKHoxqGwc8csuNkv2LgqQZmvT4N/iSjxaPNCh5XIT+348+OncAr/7xYSOuxPnyMW2eHkVhM8jZsbdISrAP7u9kuSmM57MqqQ9OmvoD/YafzeaEZj4wrnsw7CH9df6DvpqHw60eFzW2djv7rNmPj4o/AzxpviAYZY3+inP2PVPP9pVQ268pKoaYypQ7PS8/5LKC98zVOhiB+WvPUa4zWLPAYzxnnVyOOMApMKWgG/rXQ6FP3F9vFtCwiw2E59sUyLznvm4J9SWp9C2z54J2IExZVtnhDbyo6Ka8Xwq8qbb12B3FNs/m1jFasi+tT//FNtruUlPRfiWcDbwjtPG+FDfI8S66XXvXCviWTZmxYMt1ITqu3xYiOqWF9Wq8iaQNwL9mFsarfPsI/iDFS/ojhce5X3tHt2A9vbf2VmNPA61zcxx5YgXxZ318Z890I+aXHPc55g/+RklQuGbUSfITBP12DkGdYOHDR1p1YB10xTvvcCwn08e2RDgqIn2P3vdsrh77Ozzn+6Cbsy/oJh3Ma70oo4ryjixn2a7ht9spsLdYrPzrze6g+5smWNdum5GNfNbHvyF/DU9DOMZOLq3si/3ZjU7LFBOi/B7af7kMPbHbYdCbihpT8ut+Jcca4KS3SjBmQCR5M7dlRA7Fu7WWDRG071i29s7D6+vwYn6rFu3vfQf56u9rV2vGw/8p95BIP7HfiZHN34YjryOdcvdnmmiikTQUZOWvk4J1ozP98C36H8hnV0HP9se9b6YVuBogvxnRaE7FsgAzri1fM5QH3O/dzbMF42Mu3UYuH88oUaVCfntNG9ZNSRUrFYi0d5C8qDw43wbxxSk2/uvs71ofM1FCfhP0bEsu+ThUhP/Apu97w0ngerVbfmq9UhXyLWXFvZdjdI26zRs+Q8unGyw1pEYj/nUIHnJND/+z0nnDPHfta/DRMOKg0VYUscvv/rcT+WGfvCqw99eW0+ICS7pV3YorvOGfkO8QvUz2ehPhhff/S+miNlFNE8m8eGsHYz+dag4LdT+xbNKDf3Pwx2N9ivnTn9SrouQEWy52duiBvsiRu5JMDEsr6+kOiiX3jXi6zn58L3mXs+OyqdfeB2w4fN/6ejpSMrHx6rlsopp7byg4+/QR/oWv/bWHVWLNV1mL3HvvfiFvOf5VfgN1dEfjpKp7/LE3NvpnAbRJ/bzj8IAY4fm6dgiripUWDZ/pswzrm5vtx575gHbbRfLeWXeB79F4gD+0lUaFfKc2N9siv963xc859BP1717N0slhGP1+eK/gAvpF7yHTxdeQHQlLtYvrlgW//88YkO+COh0fXVy5axaeJSnpPeiHPnDm00f3nHay3fR9zhoAvN9/9LBCBR3S1JWC5FuKSDxerH1o6y0h3dtDmlefllHBYd1MG1jkmVlwEdqtIcw1O5BlgP6jKZO17T8FfVfx0WVW+HjiWgW7DWSfsQ2Cx89fVJ1hr4ZYbVmAtoYCQdZ1+Y3+gvZ2+l/cDvvQx71PyB+xj+bFbUO+YUPiX4x5kiIfw6Nrky2eigRtuCsq5VWuuROYRu0el7JPBzkbebXwqJUk39UMZGE959Zt66mCftxUT9DQvIZ68abp45gHgA6/yQuf/xf5fSz1PnfSHn+DRT1ygivzRX9UpTgYvgS/m9v67BTz1oztjvpUs45HnrRnvWuCPDMr6Ouf5YWVSqllo9xn59Fdvp2aUeyjS9pnLzzxeL6XN/QqPR++U0aQBZwM7YN8ilWUWK1URF+jHGxfMhR5ZclNDbyb2jVoSM2xCIe7n/YVNUz2Bgy7yer7wYzzyL2tOO9/Dfk56/e7YuWN/zUn5KdauwPvSri3zCfuNuGGS1O35UiVS3ZeaNwr7VD50ivd+C17slOUPFz0ETnqs4eDk4cCHXAzf924FH0Ps0fzgFfaPTDTv8idLIKBUf/sLachjdGx4EpWBPIpS/1Qr/kk+/bhZO6npoZhy/bpNMsfz/tvLxXkC9nFcVHtcSq+w3ltztu3UAXLaZfG1xacAeE9zdcvPV3Iysf/muWO7As1RnWHxA37DlwPp++wwP4rnfDI2X4w8ydZttjZ5wIW0uucMw/4WvYfb3TWDPmyhbauvpxLVxD+jk4HQ49ZHWt7A39xgb3evFvnwzBvdivsUYL1w+PmDmcBbvF0/2dSBD/KzdfnZvqlK5OFt3nWHTIm0Wtv6CnyENPpxxMYX2NS4ZbZ5pT/WjT5qCXWfhv2Gbm1NqTnfk0+NvX4WPgQPqTzplX8G4oO63y96/YI+Hz1YlngG9rfjUnN+2xSiF6rVSo+2yEjliu+p1VLwRvMH8dywHvS8lctxla8y0nr6eHbvROAyTy/2iEH8WGPwbr3VZB459hujHwvcvbGn1P4S9MKObYMulwNP9jX16FGJPO5jwZmKtG1Yn+8Tar0bfDjtpV5O+64hnuptsMgJvHijNUc6vXFRoOOOXc8GIF+/O/7KAzfs17UxfpXKbcS3ivKL5aM2yWnTgyUailLg5bt0Ps5GPJSWtilRCev9BYXO7nN8sU568tkBW8SYH2MtLPYhfrSqcPTbANwkcUPD6SdYBxxQXdZPB/yzS14ddtoC/1xy+pHvx3rkE+4fe/f2JOLyvVsUbkyS0orSw29zEc9fH70/vKtQgVbdCgnuBdzeI3WI9wLgkTyJf6It/ICXb0U3k7Hfw1LpQ+1H+chvNEy49xN6rfVMYMmrg1ifX3A0Vob1Pvt83HtkY784t8Hzb1cA3/RsmXfbd4MS9bW69nZdEeKEfTt8L2RIKcqA9+fBL2XEdyrbPgnlFPyhJcQM+z8PHJH8Wgn4eZKwLPkS9vNI1zeO2gb+767cmOos7HOWsv+d6QDYG75Wzc69EwU0vuft6pjDeG6aOgVlKgLK6T37gMpEzIue5Qrji+B39tCWf0Iet2ljjzs9wdOsUk+ocrQEj+Fpt5/VTtBjakf6zwMv6MmiUac3ABc68fLOsjXIM5irLfX/Aj/M1HTntCOIl/ZEPB7cB/tWdRkWbDxFCH/rz8DhEuy3khPVGr4M+4g++XPrgx7yqBUdvghHw58K23Lt9AdnrG8fdXfhuBfK9MXf9pLxaPBmu5l7BI6S0ohfMzKK9RDP3bviMhT96b/At2Qd9HyrwqVlLdj3L/HM74E77yFOPXzikTr2haor3llxqB52YuxO16XXhbReQThlOex9zhK/Tzuw/83Ivjb7chCH5Tm3Gpoqw38J87iYaiAH32TI2Sbsk608sHtnf+xTtMb3gC8fvNfVrTMzwrOxT+S9767OwM/ThiS3BsGumz26cs4TvMHbbTukzlhM+8jyQWk6eD4+tlcv1CGPqTNlx/oKQ+zP8urhi0rsFxatsOlclB9wmlczFvj8lFG1d87GgSXYd3XUloQdG+HXqU1o6i/EvhG9ej6bjLzb85tjD0xD3uRC0cZrn3cLaPk7oVIo8lOnZ46svwJ74LR3o3MK8qservrD8+EXZ4erfQrtIKZ9HRwmGrwjulp0YfBr8MLU9ipP/JaMfZrs8i0+OWMfu4g1R12wTvvaeN1Wc1cFmjHDZ9oQrE+6euyhZSlw3c171bRDZwtJcbBP1FPonQMDf9zrjvUyhYGrbYYhXo16fKelUIx9TSR+5063COnuy98PD2B9Vu9OqfKavWj/uBzpBsSV4hEVnW8+AB77oMVNukqFPl4M2lGNfU82vvMY1xP4xkbeR72x36TYc/N6Vbwui0ek2eWIE8Y4ieqSwaOeHW/c2wz7/NVP3TtiWlfgv0//XjyA57rS3jTsPPaF29jmGDoa+6H+XTjxZn/ofdOqx6mV4CUsuZ48aAXWk3T8cVBmuFqJNp79kWQOPlNwa7XDzw5SOrA3cL4b1ocYy/OlPZFPiRO+rgV9gDr16Fa8AHldhzXfPiicAe6lLxh0zA78uK0dc56DPzbLJEdZFftpDC3dG/DlEo8m+k1sjBsLXu6U2lVfkO8jp8QF18+Bn7BXfKq1FRU6pc/6Ddwm8O9rl+WH4Gd0G1VN8K9DJm/0ngSc+t4tp8qEv9CTPkW6f+7xqeNx5U+974PHoWVqfAy8lx9Thy+bD7ypXNbWbeUQ7CuRUePjjf3u/j+uzgIu6uZp4Hso0oqCLXZ3iy12d3d3oGIndneL3d2K3YWoiNinIuKJ2IqK/X7nfvt75P0/z+e8ZW9zdnZ2dmZ2ZsLdDgEtRuIvNeeOFMeRC6cZPKv1ZeT/HYtXvjMCPbNHpcNHfmHvuKrDqYmlLuNfwXHOnjmN0HMeXxgQ2jWJeh6QZugi7HW9vi5JvZp9OmZKVAlH7G7fTMjiFcx7kaJ9x6W/wD1hvneTJFM51yYcKte1Bu1EL4pwdY/Cv8K+4wN9wY+93RteaYhdxehMJZsEpEIPdmBm4IY+zirLkO0rP+H/r+bsGw6xc5EbN3gzcCl+zHKH7JpZ5CjvxlJF7knL/S3b7I77RvEejzhTwdPhQ8Jin/Qc+hh66L/RrR/2od7zsyxthV/H3bYeMx5iH9nuW8CKCYPxC+BQeleZJugPopP3iXzsooa6Lbx1ivcsPa4cXeB6xUXVrR9xsOelJCrNhRHVhzxEvul5qkhd5GYd3i/Lt5P3k80XDNuTrnUiVW7ihUlT8F/pPmH4yCzYP/V6Gf4yO/6k8259/P4Q9kSXbhc9HLEGPX98047p8JNwcMi+NOVfYKdfO3PTQRXc1IUL6+7cg99J2u5r3nOXeT/YMvvUFdjX97uy6mjRVY5q57as7Z3Q0w0sljzzAvxE9F/iu/kB9t1ewQ1alDzrpFY2XK8iNiZRGZY29xzhp1Rbp/5T7jRDf1TP9jkfflXujm474z5+F6sXLt0qYpmrOjKv/LU/tHM3vnxsMH5kRqRstCTpPPyZVErntY570CdricP++HkZuPjbxOursccc55ah+iP8nhUP3FYZu98RV0LXLKjFfXTe4lQf1/KurPi+ew3YF7veOmcIjbQor0y74k/yvmTOyWueiXincXdy1LA47MOu9C36Zv5bd/VrQ6IhTe4mVRHTSg+9jX+PGy1LDpiEXrTK3eK1qmD302h7+6rrI3gvOODlDP8w/FhdPn+4Buf6gwcb1w9F3nK54HqfitxD+wxeX3o8djlDytWNHNsZv7cva2yeh53+0eXFBu2Re8GcXTtPQwedZnqOmY++NtnjzX1TV3FWE33yz015B/ns65arqx5yVTVOlX/dGb9lL91SH7w330E92/q0R8gt7NeWfeo0nncvYzoPXF0f+/c/Qdbe4d7s7wHr0vdCj7Cz/4fcaZAb//r7wektduWPz92Lmo1h8XGnLvGX7ruqQS6T1/XJnVTdrjppr/UV8pLOxZr23uaiqhe15er60EOtrp52UfsS+MuaERs8Cr36wJU3p3VD7pa1z6Pwq/uQ6x78e+kl/mlCsu58Mu0SdhSJ/p4fgp3Y8bTRFTrCr1XPcKl5VfTXn0b82ZEHu+Cv15MOPI2f197Tc02+6Mx5U+yiLTa/u+qVLyZLel/ujZP9Bi1kP/Ws8HL2DuTEWU5G3HiP3PyUR0MXjl31dPKu7MPxj+U3rnZQZ/QG07ZecqmGc4iq3Qvu641d4/3xdcatD1VqdfL0H8/Cz78J2dvmE3asXmdPjX7wFfvPhaN/Lr3hrtLlTt56YmkX1Wz+w5HzeE/YzMXxxCbO3bd9O0XH78U/VHCyQxewf1lmsQ5eAj/zI9nEj3vxF1LJ+jPfVew3SrQev7KKC/ewwHHNanKfzl9mXfp6M7AX/e42o/hQpd5X3Xft6Cv0qaf2tbtDPIyTRb7VqI8/0Z1Jc9Voj7/52U+HN80KH3775ny/iO74pcnc4udc9NTDnq7LMg77o2pJjv1Nin1MkW3LKvVGTl/q84H6nthBec868akKdiGXB0/dtRc558qex9u+W8M78Kmp23ZHbrjwYp/6I3lv82jujfhu4G2LZRfTecI3/lyz6XjZB7znrVhq6XD04G+OuJcqRhwBlevr0NzYLUzt63Md8001ZGhA8nQfnNS8wHWbPEpgD5Ij6shM5I2hdwOnvOM9VfCI2IN7KV/Z2TdZVuztd0ZWPjYU+NieRl0agB/fTUmH1ZoehTx7lPe01Yy/8Psu/TO2d1P9/25Z4Yk+el7OBi82fIWv7RTUJgx70MWp5u0V/+25xh3xLLUJf+6B4Vsyoge8M+zSxvPQ09jiTreXn4U+hq64lhU6l8ohUTNXEOFn8jVpP8Jvz+uTPOzHJ96PHC57xOeBu7qQIrDJhA4e6nHKZblao+/7HnR97xH0VPUXfVqcFjvhpvV3L/LDLnPptLe/XeGHBzYc0ykF8QVWLimR7Db6wPeDatWuyb139JjYNWG/HFTe8NV9UixxwE96XstA7P2zNat3eQFynumVO4ZMF7ulD9VanyJwx+bdb2YeQJ92/JPfo+q/3ZTvjUPHp0Wwrz6s9ikwxkUF5U6ztBbytR2Xo3vMgG99vqdO0xPwpTNedChiAU+HjGoxeypy0t4VKjql2QP/nN2jciz+XRf9jZupljmojEseDZyP35u2l8p99c7qpA7nKRt3FD7owIZ3RWJruSjnVC29hnEfWNa+dMcR7Osm65pdqY0cb+FmpyaVxvGe5fCnvjboeZOg3d0rIy892iRmzOtoR5UhdctZccgdtjsunlOUe8WKCz6TJoBnTtl8pi95g31HwU9/u3x2UKV3R5XGbF3lPD4t9gvxHK4MGfdyQWHe56S9X6k0/gG8pgQ2KOjF+5BGY54sZXx3501t+wQ7uByv2zQNRl/39M+SmV3DOT/3+uyahl+CeyNtGybi1KP0UfdTl32Q97p4du+LP75+l65lrrse+cqU6Pev1idWAztPWpKiPT5TquXPfgV/nkdKlPVMwr2haObPtcdm431KkwPpKudE7pLDt90n7Oha1woqcIB3jw2XFhqWg/M82+myE2vcS6Jq3buT6j7ym2Ulz15VQegfVtUsMod796Eoz7GT0ZsP8t6eKqYs773r7LrdFb9mfw8MzcxxoAo43ziaaqybCq4wuUWhaehdM4XtXB3upFK+PNSqN2+Wv27rtLggercMwxevesa5Wq5ahs6hKRKp0U4PbTur4Yf5VdD7fPOVGnqiSvGx6HWutd90OI5z40bZwcf3vsZfkGNmx97oG3pljop+iz7RYfNH123gp+v9/W2yf3ZTv/p/zvzthbPqe6bjzdCjbirHiM/ZnmNXf3bohPyB3YhnkdG24ldcIpW9wI/XTicSqbURbQ9VPYIdTZYW+5sQF+B2ilX157K+Dzp75t1/KpHaenVC2SToNd8uPdtuA/4W35fflMSdd16pru07V5T774TAOyPzb3RXf1aPGNsdv5/rGl4JaF/QWS2fUr/TI/SMhXtM3jgwNXqPrfXCQ1mXNCM+/D6OvLl3ualTSuAPtsL3YU/fIkcbeLBU72aH4N8i6j3Ljnyr+aUlAdV4J1Pt+uGbfbA/8s6+N+YW9qzFtuRa5fQLOfzFKe5VZ2LfXDYkaAF0ueDTutGf8Oe3b/Oo5EUnJVVld+dzT+3He4dCp6fv5b1r6djiv9ugR/3SfkHd+YkcVLn6kX/H8d542Z43o5tnt6iDgy+4TsHu+e+WKaOzEsdkWNVzp1NwbgwpvHXwJtbV/0r3PJ14B6NmJy754xf67APHiw3knjC0+catlesgH5i8okH/WHe1dnjMuxYDXNUTj7zDr7pjv7Ddv3B9+MCSw5oWmYP91LICVfadXo1d99Iew7YjZ973fmrzO8Q9WdypUPu5vOOvlqj6qvnIyXOl2xV5Dmc1Gx49qJIWe+SQ7X3XV8HevuvV783nz0qswlZknJ2L+EeWk1vmvMDuzn18Hu+FBVzUktDXVY7xbnF4/OImj3lfOyi8RLpiTy0q6bfav9/Az1XpudTHFXlYg1albi8fBh/YcW7TGsR+qvZxeLMb49CT5vV2x+xYrSjhne37QYva133ZxsLEzRiR0+1Vvqrcg8Ysun8bOXzuzM3ONvvJe5XvzX3SIo9o5JJy+ire7V6rUaDAyRzYJZV9Of7MaEd1LdOgIZ7sp6Iftww6hD18z3kFdhbjXlzMf2Ph7+j5diVdH7ezAXxlpaPrv6E3+9xyS86L+N8ZGlr5Qyv0nTkeD611bh/z6LyvbXcfN9X8on908ymuKl/HTZE3G7urE4/ur44HTp/nzF40F/+KO0Ky3T5LfKdG/XNui+B+79Wk04WdOLR6Omx417XIhyM+LEwWiv3kvOTvc9aAP4tP8WXmHd4dByc+cO/ITd7Vvp++9Bz2PQ1PZHkei36gxPFdlc7nwB43X/S6Z/B9t4tfuBaBP9o/Q1YG90X+1DzpvDaziyVSTdI1GVOUdxRr0t/p1Ha/RQ2ZdyBr9TroR9a4hqZEDv30cNDR5PAfvuVeeQcRH2P5xY3jp2MfuWByjoFz8dfxbnPTBlV3u6qzF3+OLM098mf854nDPNDrTLnQocd2V+U1dHXBJPddVPPVyQ7V5Z6+wNL13C3spsLH9V1V/oxSZz27p7wOvHuPX5V9N3ZorUfP2zYZ/n5P3TdZSkEf1pfpufE29/33v5NOvcQ7jRzvZ9wI5px40i2La+wgV9U/rML7EYFJVMadf84cjXJXx7qkd8vzzk2NLjN+YGf8bO53//a+CX5MGl9MujsrdlTZcxXcVh4+Is3JrO4h+B2+cSfxpBnIWUoU6zXxEPxNveCnp4dyHjRY2/zmYt5fN653p1ajEtibd4s42Rl92pf23/Y9RN6y6egp97tRzOtPu9TncjmqTF/m5pux2kPt64yAEL3f+KfDb+dGX7V51pI4P+wdPPo96tPLKbH6+avQ/oHh0OEi44p0qIc9ZsiDHk1f8PuXKUW6sWE/FrC9mQa/ObDWpJL94DNXjW164QR2h78PNR28ejZy7LP93IZgv3F1pyXjtM7wIRafz/3gj3xWWFed5J3KVUu/XGx/1d5hzvz78Hevo1ZveYfeJriey6Q8V3mfsWHx6bmci08HtfyTET1r7xxpsk3l3V3HVl0CXwehB728cOhn9B+xacveyoAcsUmiNqs778FPQsy0tR+RUxXY+i7oF+9zam8oVG7KdA9V8v7WdZs/c/4MSDWgEfQu3ZUW/b6g3w7xre6bFbvPhq57PmZC35mqf+NESbCbdRtfvl1p5BW/npwqnxn9S7MNzW2zsC/Ln+ZE9+L4NfZ6Ef4kGf5BytcI7pmROCCLP49YGpqfd4LNJuxO/Ap+Y+Hn6ruJT9EyQ4lJDTu54x81xad0xFdxCzowPS32CqsHDLD2yok8rOKs/cWxm1p+xqFylm1KFVx7dPcZ7P0X3Fvc68x6/ChkaLHvGvfm/eN/lHTCL+ymttPD13KunLaErj48B7+UnwvMv3LQQ3l8OjdzHH4A9uwJSfWCOE25nvpWmokf842d25U7geOujM51k/154KTyf+rhfQc9lcutjO6hNuSzMQ/f+hAnwSE85KMr76/adQtbNR//n3XPphnTC3nCxvXH513BPi+ksuPCyLr4hXH7/LsZdj3fp0a8uISerpW1jtezOrxHGVDUv1Ul7HKyD56xoBZ6k7NJfn9Bv/a7SkaHfTvQiya/9+ME/hZKjUtc7izv6fqtzV2uPnxGwXTvumzBn0a99if/1sFudEGNY5tLcD7GrHrl0554NTc93vQ7PJ/4GF0fhs2pjV1mf5dqv96Av9MOLnz31kPNOdEo3dkDxB/wd5vZB/qypWjs5fLQj4xegx+dm2tRz1vMzdTtOfqUbR0cmzeHDkx2n10MPvbk4HTLsyDX8m8518+GU6kPq3fOOYt8/dzs5asj8eM8fG/BrRGFibd1ekXfauDrTg/PlJnx03jtz+JKz7Cn7uoy8u7iXdCRa2psBfyE5qj5/Vlh5EUulfr0Xoy+IPJQfIE/yKNt85NvfI6dxDDLxyZbsBfp0sUlqsIv7h09+h0tCX3c19Kp9xv84btkcXg6FTlOuowLztaHntYlmlPnTs4quP2fkMfZkYMWrR55Bz8UsysvmDeTc73HmSeHUvRzU+uDs5ddgT45yC113CH8fb5u9+zJGehMtYDP3Wy8RxmfK/nFKrcSqRbVUo6Yz/6vV9nPaS72uuUXtDjQH79DAwIetV+JfnDCscnDG73HnrJQm8I/8Z/yOMW9/SmAY1R0g6UByG83PF8yMh74rznglqfnCEdl3d1yVn30VJemFXceO8RJzTzxMu8l3qUEYIjij7yljPeOuUewV7Q8y+xahbiBz/9M81nNu90l9W7UOI6+qlTEpGMv8auw/Vy751WI15JmaYVcbfM6q/oz9z+9it1+2kd34uN4PzLXoe/SqaxHwwL3A3+inz//YMy0bt3ZD3t7uw7Fz33fCtkv25BnDftV3f/5UuJBtexhGcS5/eC507aLyE/L+vaZdZV4J9bQ9jm49qtWK7L6dsMPssf579mWYe9/bOqXnh8y8S7qevq0rtg9Z1+dOWgAeHdqe2iHjMPd4POKJF5J3IUYr0MbSkPfu3um/5KNd4nnHyS+Gcd7wpEr17Z24f1fveHlS0Vyj0ibZ0ybdXeRk2yq3nBLOuKr3T6Xccj8JOpClh47fJFfT3y2M2zLQOK8VH2WuTHxkwJL585bkvcfTZeUuD96iKua67Fv5HX8QgSkHnpzJe9k3Y5NvbK9APF8HrbbGXcEv3nLEud/yHna0ZJmew/sLbb097584jxyljwxiV/zvuzP2gEZYzfxXrJvlbZdWN+ZtyK2xmH3FpK36JZt+KneUfXBhtcRLira+jllMuSR2YeXTOqPfjBb+R0Lsi7g/I1J2vMo63Dxkl8hd7w6Bgwc/HQN77lejkkxbpA3/k+Ds43JxTkw0rtguqhF6Ic8XjyejL/ouPK1in87yz2s55Suj3in/GbO3MRjeK/XZ+Opvvdg3LPmGJ4xNfrFTKMf5uyHPdPRFZfT+2BX0LPRmmqZ1zir8PJnegUT72bRA/c3ffEr4droSKIV2NMPvDb/8S30JjVmHBzfgveSwxr3rFgMv6udXQ4XW4o/iOTdco5OyX0+5OPC+ErE2Zv09afzRuy3PL4F+2aEn0x+JXWHEuPcVOvA4k1isFuYEx3+eAf04EW1TKdiiSf39nrxAhXw//Fnz4OxoYRc/TTg1d5ZyNejBjVKnoH4dDl6nc4Qgf63YQPPX57YG67K3r/YxWTYmRT4Wbo7792Hj7o1MJ57UOLxY/uMQJC7LtnplmdzAbejjXZfmOuqbj8KPz29P3xdt6Frsz5zV+cci2feF4I/6lSrakzAX836EcsKVib+0Pk/V6q3wl5lWL75BQ/gV3dT5Jq19Yh/Ejc2bOp7/PYPeXCxY1b4d2um1CV7Yp99PKLSx0XQ86Zpmie+gN/jBU0yF3jgAF36GBl9GP9TR7o13rWU99u/pnitffTaRZXtfcC9EP57+lZ+/eXiW+xJc288sf4s/gcKHb9cmPv2uZmH0scSv6FT2yddWnB/C/k4tGy7pBbVY87DJnfxbzsj75UKi/E3M8p/y9zc+JkK9Fl4vkNp+M9OXhert0FO/nzcjMf1PFR42kt+ofjdmldvZ+duZdzV/ZNbdm56766yZPm8+8xZD7VuXIMip6FvuVPOWH1rPnK5DtO9fmCvM39T7OM5q/BDbi35YxT+oeY+GvHjBP6BnnUv+boO7+QSZw30WQC/f6No2fKT0J/vuD91YSf4jYk/2yyrOtZFZQnNealofQ+F2UMhvyW8z8ye7q4fcd0qH3uxYzL+fgpuqNpk+1fewSRP1nMi8o3t2b4GlqiL/c+1IS3FD97nUfvme/AufP+nTq+LYR8ZXi/vq4ppsS+Na7hpMfLO8tPKHB2AvDtp2c4rG5eAzk4sGHUiFfxKheDChK9VO/eEHcuLX6rp6W/X/4pdpmurRmsLLvVQae7c2nWP+DEZs0Vli+ddV9SY9v3vNsLOPN5/+XnsUTa03RzYBv1L8uFzrZnxv/LD8mXbdOwba/fpHe7JO+5W+5d4RL51VJ8dW1199Y24Ycsblyhf1Vn5vms9ZsxKN/W6eKEVjfDPNPxm9lqV0F/V8q79puAi7muFA1ucwN9R3TeBx0vwnq9czU7pe0AX89wL9a7O+vraFuxaiN33glrZdqeFXh9qEF5jFXKGr333TqtKXJ0UtQet3g4eBr33brJ5LfqVERnKXU+XVL0YMfVI9ZmO6tPIUztXlHRTtwMKB+x14V765HBpazP8feX6/m0c8qnDmy55/8AufnRYv0cnsWN2vjXi7E784p2rMSVLf87pw21mnxuNfCzb0C+nXxEPrMz0TNn34zdmUI9yGZtin7DedaDTBt7HXZ0YcLnCQBcV8uPOIEfkmIF/s9b/3N5VTU3u3WCR4NuNzYuOc64trZ1oTXveJ6w8MXlpkpzYIzaYfLk+dmQhNTc4bEBelHTj5aG/uEcUrNlmeV7itlzOq5wu887IL3XYoi7EaUj9Pl3ujejzR7ru7zUP/UXXR5cPzfpB/KuteZfZ0iRT6dKli1+82k396Nv18yLkt6WHzihcHn/wHln9O/sBnxxhvWZmZ//n6t0t1Qn0M7l7RN39i51mhS1lPM8hz3dc3TJRzhHoX1stWPaIOC7OBXaVk3vv4GPfGlrwj1El8nfZbw68j8rQ6FDkQ3fVLIL7M3Yh47O8vuXsR9zZ3SuThYLXrza2G3QSPL5UrcW4HbwP6eITHv+B99X5Yp03nkLukarf9IWPuP+e2dQ+fCn3vZ0tO3qO4v1Jr3du4fH4G29v6XaEZxHq6ujRxYr25J3S5lVn3/BeYdqP0Vsacc4d8gjxjwtyVfeXOfd3O4xc0/b3cWL8e7Q93enSW/zXefRq26sc8UXT3PRofAX7oaOLAurs4R6cI+v6ObXRX1dJ3fFe62zIAYZMd/K4hn2fe5MKRbBvd9mUff5x7m8fk7fuFkYc4iRP3fPdQI9q86/z4CnxYiJOV1ta0ZeBnb+Qazdys4oVe/ttxC/8jd2+nXLw3n3D5FkXynTlXhZcItcs/I4Mux+XrQR85Kp3M98m5rv6z/ubIuELPK7516wPfFp067evJve8z0tKDOuEnr9Mu1wd6vE+rV4jj8ATyFNnew0avGuVuwrwvP3iCXZtUY/Gtd+EvdC6/qnnLjvmqFq/eey0jTgGA7zicm4kXnHmI0mS/ELf9zCoxPoPaYgL82ZA9Av8Nbydc/NRPH6grIFhFYrwjq1y6nndN6BfHxuyMf9Ud/wdrFaLxmNXebpI7YPJUdO13eLauxd2RCGVd7Vw5V3zld9Jjqx44aJCT/ePcMa/TMPcBWYsw77ave+lin2x//lZ49jZY9jrz0k05GIJ7vdeQRcHnkTuUyIm1YOa6DsLZju5pwlyB4eOYRmP8z65zJ6NNXYjTzv3oLjbaBzzzii5v/Eu/AfF3Mx6IQz/55sGtsp1kPhH5XdlOLH4oZsaMrjN30a8c9s871rbEtwDU2WMvniJd8Pjt9ve9UDPOu9ZvjSrkG+P6DW2+QP0qv1yrKicrC/vuuZXmFdlEXKXx98v1ebcbrIgKkUt7Hjahfes0PUgepFjOeNieR8b4+G/4Sj2+T9rblcdRmPnmShk8rD5bmrZwsv7t7V2Vt+6fb38iXN2zZ/uDz2xQxhz96B1An49CwxJnfQPeoa5e69lfAJ/NT92X80lxONJO2ru5Krc2860zlO7PPL/iJ2N227hfuzpkXV8VfZxkxTfU9bAXv7SMduF8efQFw/tdGDDLjdVv2zbFC8K8f5jZ+1695O7qMejN910hb+ssvvrztz4yxozr/ncHczj0500KfYR1/fRwWyZI+ELuxVqe7rUSvgQ244x0dDNs1+rv6yGv8Qp1S83SdoSfrdij8TroM+3S3qlLc49t9KUz5nuBrmorekPXrjEO83+Jbe4f8OON6Ol78etxFU6mmi9UwvkqF/H5fz6BP/l5YY5B07uD12+9vhiCPgTt8Y1DPdEyrHd9T+/ryN/fvu1yQzegTfP4V3wGPZCLi5nJznyjsoHm4HM2B9E1wxfkgY/E2Ufhq2bT7wzV8ezl08jtzy1reD1+vWTqgGnZn7aN5Y4L3V+tV6If6jd6dP8To2er1/g0PzDXnCuT6+0JA33zeUBTyblxd/D2S4N7r1FX1/ePV+tS7zbLbjwdKVf2Gm6Fcv0MYZ38f3P1evVn/vErNzzDuVF/hB8q+huF+KERh9sHZwxxk1l3F1u4074rMFdGt9zJG7dsV2Xup9+5qyOjrofPSoc/9AH22XLhT1GqQKbk/bHbrt0TP+wuj3gU9T6HG0518dOyz/iFXL/Zid21BvE+aScew4fzf37sa3446e8b5+2u8TMpsjLij+/u64O56xb4edbcqLHufjz1+4zxG+Y0G1ipnXvXNXEqWNyrZ+MPUnw1msb8Cs25X5Uvsr4OzkxfYnfs8LEad22xaks8tpHyQ9WKY6+r/P0iGITOuD3M25P4rn4TUnRZcVvJ/xVrAwvdfk2/N73pIuHd+bd04ybU2I3DMZuMOjnjqhI4toVi/XNix1Hmj+f82R3451Mpzo1T890VWeuZLrTijjraWo8ubuWfVznyIAKZbBXu9NgWgcv9AaT0s9yTYWceHRfrwFtsZOq+6TU+ke8y6264/SNEyPwb9GrXsVtu8H/NC0PBOFvvn9g5Jf76J1/FXx0vNhk/JssSrFkqTf25lNSleyPn6aMq2433jHcXX18/u3dee6hOVWmc7eJh76tgOunUfhzeDJo0q/TxPE5sOFAoxHIS1vdarzgNvrfiDeq1XP8MU0ZtvR0DuJGNFlbIlVb7NJTrE++cSp2s/6O9e9EIScP6FDxwD30FafHTqv4BP9Ph0t3Opkdu9vNm4Ydmoc9ScrOSSq3Hotct+SyqjPXEdd3QMYnjdm/r+8XjMwH3fDtkOrKVOK13P0Wk34X/vW7xxVpsIr3EVVGxNUKxD9lngb5npclLvTd4in/TGgJXg8otygP+yNlm6aD/IujR3p570afrG7qyfS3db2wi21f6UaVeO6NdyeOGNIO+c310OKVv+CP6+CjGeVrD8dPcb5Z707hb2lA57lt/kzjXUjRGrVr4odjQYEml2pjB5BsctOp6ZEXXunk/fQBdGBg0ZdTl6B/PpPO/cqqUOKQRUzx7oHfjcGB7dN1GIB/xqffv9y+k1TZ7vWc64adxOYhzX29kaO+9yl/qAPnzOgF0wtuGAs93vql52bsF6wR63akxF5x6MND55tg1xM48naxrMhxTu4bOr4b/in+eha2BRIPJaBkzNR4vo9W2bz2NvY64Qvdu97P4KzyJbsXsvcI8o6qgdvqTXFT6dsV2F0KuU3y8uv8bxIv5s38NMfWEc8mskzFn/PR9zWOrRM4Kh367Kr9u60k3lyxZ5vfJsGfWjKnlrmK42dtyJmgapHLsIsa3XdXe+QC7X9H9M0I3x22f3n3FLzHfFm+4/rk7/DXU/fyl3PYDzv3TJs3LXQvxuK/d2ATd9XBVr2wK3b/vqs3Vk+HP5qtFzo1e+yK38XVT94e5L1Lh7Tp1pzm3a3biPj2s5GfPTr4K6f4xzz/vNazY9g1F3610XKX98aNk45I9BN7S5/dQ5K1H++scrlOaRXa1V29c9t75EVN7r1z3w9Zgn+YEk3rFn9OPKFCiWuWOove8kzRykP8wojf1mtK4YNZ4L+Cflaag74r/9ohl3ZCB95V2XT8KHEkVzfJXbAV/q7L3L++Y0I99JjPB52dQ1yf6t+PZGmMX7Y8I7+VyRnhqPbunp71cUXirB0d+60reJS/ku/E8PTYj5T23ZQHf7n9FoalCcqTWNWa4TfRDz3rnd1ZLqfJy/vWpROONdrHe9vLdZ68R4/x5d7+HFbiQb1L77y5JP4Jzr+YOq0I8oNnbdLV6offychTl7tlg1+scMC5UJLSbmrfzRa2z8SZ6tGq/5dvI5OqOXdXj7v7yF0VO9K2WWb86Y7LMrCa0y/2Te98K8PXwt+8eBw6HD/MPx6nd6zHvav+qAuJk/Oer27+5M0uehHv8sj3RI2IO+ecZYXPW+KC7DlXtlhW/NV2XRu3rAp+b3KnrVPBBbuNFImujB17w0VNnPvt5JAX+Ad+65Z2ZKakxGfv+3ZXPOf0yRsVHuB38ObXyGofsINadzNn8cPs//vJbmcqc9SiOm/o2aQSfjdX7D/yuzx+kHuWa9wcwqk6vMsyojH64bGBFa794r5RfvabQU+wsxyUK059jsWOrG6JaY2qeagd18rXDrGiv3h9Osz7tptqke9271/IQU+8XOFcbTJxns6ufTX3uUWNKhUVWZ13y5O3ujbPgB+H3Gl7nM6NPdmWxY3ep0Nf9vrQyc6FPqE/LNw4uCf+CE/+/nllUTHe/c0+bQnnvdaSlyObn4zjHdyR1AuvtEYvMv135rLE003Zq6jzJ6IXTNzQpnXQe1e1q8H7gBXIZU439u4Ugb3Ke5fYxG/4e9Irlesa/srLHftyoQrvaa4HrP7xlXfuT5vfjF6M/+gol0tlu2KXOTzmQd6ztYgD4l46pOUW7sPWTj4z8We98pZ7zobY9d8/WKr+DvjOe95NB8diX7aqyzgHX+y/F2ev/sATP37NA9T2PbwvT78hNncm7OzCOqjYgUMt6kiFOtl3YzcT+uxvi0L467MMdh5cmDh3xYMscS2QF2bflKmgM/6ReqcosXkW9hVJH5RvX4j3gpcv+tdeQfzd7L+Gb9+EHxk1ak3ZQstd1Po9F/Ymxm/q8GN7i05Dn/Fm9Mc1dYDf5Y6Rhcchrwq74tF00kRH4oBdsFbh3XO+4LgkO6vjd2ow0V2xU00xY1CGjNibPC+0sNca9Ou/b2UIq0g88c9Jh1ZoWTmZOpKqaIuz+M2pPfDe75rcxxM985rRIR794d+7+zPz7rXqxaXV6+DfOy7+299n2Cs++9ai5zPuwXe+tC3ujR1uoUOOA2ejr0mScfLqa/AtLxanqXGBeI3RXcvfuM59tW6dttX6ob+qs+FP0ea8Bz+XY9mEffPwW56jaKPbL53Vrh1Hnuc766I2BWUcPmwq99J2tWKXzvdQ9x+0+5aP942zTxV/nR/7scvti4de5f61cVnP77OR4w5ZFbcrC+8Ld7d+EZ22I35KM7f7dLEB+o23qxb2bo78JDLVyy74JfWvl8m6Bznaw32hN7PjX/rs4UHjd7RwVS4DeuRwSoG/hDn1w9KsdVd972x6Vw5/o/nuVRs/2YK/owIhkS/wWxU7s3DaI9hdHyqa3qP2AOyKS44/8Q56f2l2fddbvDuLK9mj5PIrrHPb77HH2d8zKs7ruLcf73S6p5jesqODKvRi6KVyc4jPtG3xgxEdXdU+5xFZRiOHbdXNlmioFf1Adrd1T584q8R/O07cjD+bCjOflAvFD+nfrslq3OHd2/TSi2efRf6e0hZ9Low4ZXkb5wu+gx/2y2PKB8fdRt168VHdcdhzlxrR62HjxMSJHrY93zXiogXkPrynJHY4lfYvylwOf/ojS4zLM/mcs4q6O755AfyudWnudMcL+Vv5fCk7NUYefLLcj2OP0AvcmZbjYhHsLtr27OpXBj+W/ZasmL8GvuFhkaLpSkJ/gy311aTGSVRHn1dlm/AeZs1W1deCHwvHDF55TxAn3vv4klzrgW9Ahao/O35OomJjMw+KRl6Yxv3jpk+/8E88cfaBce+Iw3Cx/Y3v8GVtDnSKmjzQUW3zT9q0Kf624p8nqhSIv+c6Z2oX6ck6z+ld1e8a+oSBef/m7IX/l68HlkQV+UQc+epXWmzAT83aE1eLJcE/0dPBv+JP5Mbv5OK/SZ4cdFMbkx/LtdGVuKf9Hp4uQn89xj89V4Z3rd1zPPpbolZi1b9v6n4W+LbdX1Il24vcIG+l5bOP8L7k7chJv7sR/3NU4/HvmsC3tj6w73ob/Hx1L7e+ohvv3F0nzPR1gt9v92DV8ZXIfToNXjNnN/YoRR86dPoGnzAzZHze0ck9VAmXdoe7p3NXPPL0Djzmos7lLNK7EvKnoWMGpUlL/Iikc2q5xb7Ajsu7aJLDGwjTuGZWyg74cW26vLL7z14W5fnuzYO3yF8d0kx+nYr3Hb4X2zZLzTo1mPGidCbs4q4NsPXb9BS5TCsnl2n4VVlYe/K1+7exz9zn/yqOeZ699rZxVfzILXTN1moI+zTThplPMqDfKt86IOLTRgc1Y31E5VVjlbre2n/iGe71lZYOuTgBOcyueQ+WFqvoqFLWi7lcGr/9kaXHZr2AfPHTwk3rHqDnWTTJ/W3y3y4qskWutwd4r3/x7NwX4ld0R6rqVzyxn+u6J/fTLfCXm685Bafsk0jd+5Nu9QziTWWa2zF/EPYRRwKvzXmMP/CIsZNqNtiv1OXY9I1OYae1ss3qB3i8Upb685f04jwef3PcjQ/c5wOb1gi4STy8ydtvDt+BH9wjTdv3z/IcO93Dg0tPwO/WpGnRk2q1dFUlf1YuvCK5swrpsXR43Uj8MAffzJ2+B+8zLz5bPxZ5t59f1ffbxS/E065nT95OpMakPhcThJ+LuPxpjqXAjmXp0BVnZ8APPRgUuv8HctHMTzLOdeae837O5+w7O7gphx1LO7XFb92WQhvP1cF+s2rgQc/rl9nXJWrGHiHebOr+Wz2TY4/fr3qHw/3xF5H5RodsmzNAf48vn/ELf7vO849eCsAfb/yAIsuzcF6/+rztY9N2xF7KdTLsIvrAXXfCgyexbquX5PB8Dl4k65ykS1LwsqOtxtIvxHdLG/Fm7hQ/4F12waz2nuBDmvIRMxzd1M+FL6Z+wZ65QMkbW+og5zzSI+eh7/BVrh8ia7aGT5q9Yrh3I/RlYV2GvvjNfquR5FxENfxRj06WumcF4r7fbX/xucQZLf+n/o9a/N2/e8U9teD3eh6P8MuDHKrc33aZivA+Ifxnpu+rKydVUfm9/ngQp/Tu9z4Zq+P3c2LBvXHvkP/dTDWrawPs+4o2OpY3dhzy0kqXfPrzPn7tjdSxM9BzJDtRMb4KdlnNmp6+kAj/AcvGzt82cwbvujrdt/j8wI5r0dNbaid2hLlOWrIcI97JhaPTprdIpsasiZt++hN6q1dzbt3Abr3oslZjFhEnbV7ajXn/VE+k2qQdMb4u9hm5jo36Gbqc92ZbLpVtPhj/UEFeXZyJB3Z37QOng5xnvRosCMk+x1E17/ryeHXO9a7BliM58ZtWMce6+VfQuxd6Muf2a/yROO5+/ONKP+L/lVrrNyaDqxrz48C+PvDxlgzz/eoil/x+clK1OOIFPplzKVMj/KV9L/G2TH7ew6e/PbDxHuwmVi5cMO478SBSn+23eBrvQS+v+t5ecY6FFtk/aD5xe/MOe93pMfHvLodbdnzf4axeuHaZ6oA84NHbNolDCrqpm0U7lKwyzkN9Od3q8Db24YLynxvG8C7hy9ejK5JjH/yqi63fAOxQLz1Jde3uFuLKfIw98Yr3i82aTlv0CvnQhF1BDw/h73fIK89LfVohL1zzyMN9K3SqbtsKD6Abn56/DO+IHMffd2gjT/xZbg9/E3lhFPqcwV6ZFuG3tHB+dfUq9h2fa0YV64GcYPrzOs+OYH9Ye/jXhx7oGRsOv5QpFv9j8z8+PuSCf+fQj9VbZcP+qeOpQseD8J/TuW3Nu5ugQ2eyveq+CL+fj39dKrwHf0gHm+5Ms+I7dhTvOi3ZsMxNRV2vlLEYcsfNaZ9cSHkdP2lr0gRF5XVRrpEBQytvSaTOBoxtUAh/YCnLzCqykPm8zJhvZ3r89Fb0XbC+NnEtb1o8Ml0jLmyxO19WVye++ekapab54pcvZl6ZF3nxS3FszuI/3pwbc64tPN3+D/Lml9dmPMyJP6exP9dPdObcvVl5uP8i/PUM6vh9MP4P8++olvtpAex4hxb93QC/cdUbp0szG/u8zK9H3NmMvV2NKS9y/l3IPXeZY88/xAfMcnh09BDi+6UNvbNpb3viAKxacMAFPwI1+ly5tpL+352bf7gjfomcbjz/dYw48X3He6dqft1dTd3n32lmS3cV6Bn2vBl2Kx28Ui+vjF89/w8j194k/nLV/ger74Cvftp3Y9mK2G+mexFVeSb+extUdXK3sZ+2+6yvMm03djIp3eZnwW5orN/mxenwL9tzy9bE83h/0Hdq2bRXVRLVbZjHjPTg77o5B8YtGOGm0kU+GjEU/3GvZk+v1DEOPzM3Ck2shjxocH/3cdfRh7R5HvP0J/jW5kWS9ml5N3CjTmBMqdLIWeNG5Uk1kPizS5N4rG6NXrDqlnTf4Hs37Jhx7QP60fY+0+vPIN7R+j5hqcfWJD52twKJ8vJu/WnNhWdyoy8/V+nG/j6jXFUvn+mfvm1G750sudNU4lXsL7At1dQB6CUKD0m//Tp6q5yHWp7C3qvxhBd3V8LH1Hq/ovds3jesG5DlSA/oxYSj55v8JU5k7iUPPTcndVCtmv7alQ599Zj4aw5Xwjiv6zZ7exq70c6V3/c4TPwN69jJOYtgH11p4bCZz4KSqnLxi2/2W8D7inxJU+TAv3bKHx/7vUJOG/r9c8M+6EsKHd57ti16/Wsjlu3Pjf6yfOsU4XO5FwX3DqgzG3+u7lkcKk7n/Z9ni90HlvBeNiR7o7Gp0MtUfHY8xhf732bzCi1qcwf50fxTi72D0NP9TJe9Pu+A14+YXzEcOF6IOfroB+dnTfc/+RrDL25r/X6iCwrtuENTh2ZDrvbFsVje09jhLet2P3s76NKfjll21eE8znurpU9i9IMje0ZvDimEnVTo1FyDiQNTKcm40ZUzuqguszr4tiqJn+k+Qx/EIk9VOfsW+4qfmC8rxlycTbzk4Q1OpT6FfUWdQvGzFqAHTD7AtWMz3kHeff0+aCznRoalfXdUwx711csu/XMj59mVbcaRTtgzWKod2rmc+1H3t07+89Fjhqxv8jh3euwJY6d2iCEejF/7reHPuS9u7nv1x9RTyL+d/2QuGeaiuu6dtKMt/v33Tp4wrAL+yqpE5ijii9+g8ln7H9rA+d5g0oBSx9AbNX1xcP117EkqxSfbkK8y868yqvtL3plU6PCwWWrsrOccbnzaH79BzwbNrnaa96grDy15uSSZu1q/asCqb8RjHRZyqscO/CZXeV1xbK+92McXcmtXh/tVw6atPF8R3bD9QMeBjsSV7JisSVZ//L+9d9n4objInTd0flobf2IPDs88+DbSUSU683NjbfwUZN/Ztn59zvf9fsXjSoXCJ+y+cfUj/O2b1rt2ZoC+tug7MGwW7wEqp1002As/Y4s/DvpWnXeaDYpebtsa/WTy2tnvrCWOhNdUvx578XO0+22zWWPgdxL5egaNx876Su+HUSmQY7Y+Vt61PHHl3eM2z7yKfPRy/w2JxE/j6PdfjyYXuVNswUaf8YPfM2+v0su6uKokjhOLr+dda0SiJO4LiC+9v2uGVe+bEX8z6dMvE+ELcy5bPD0HcTzuXk80tQv+fhwnTx+eCrm9//oVN2/wXtD55OCyx/x5FzTl2bch3tzX802/mh75QuvQvyt31HdQqX29nsQNwT72wMOyD/CTnCPi9Kad+EnuuDRDhsb4Jbv+PdeN8dDD2/mnuVVLllT9mpC6T6LGvKcOHLp3MYET9zsu+J6BuGYH37Tv35P3TXVT+T9dXp79ceZFlvPt8QtQKa7Uc+TLWwpUDJxDZLgy7nMK5SJ+ysP2L171OwM969XvbyX4wR/jSrlMS8/9q+6ttp15t38rdcEce/D/lO/2y/glyCOiLlTYcHckfjpvJ7deJJ5adLZlzbyxH98Xta7hDe4/j879WeeLXvJl2x8e3YijlnLRx62psGManuLlgKsevFOtYJuUCz5+fsf1t0OQ86w4/nj6T/y1lxr74E4J7Jz3538fUBJ71bmPm+ysgd/ZvMk3va2B3/HRX65OqIdfrcZ3N/dcgF3Bt0LjevbDj83aBznrN0B+79d0UXnYKnV7SqvfpXnv8XSlpUYW/IzsDwp72R3/uI8ThS9ug11U0/XFNzSEzyg5qumgasTVHeaVIbAleoX0qUNLXbrtrqKKjwkojB763pYfxxascFOlbvY69JZ47mvzWzctgs5t9mwf0Ar/b0NqqgpfOM+H7xmTfzNxb+rnWmjz4v3QxgP9R6aHnqScM6bXDeJYDdmbN09wdwcV1Lb72pLck3p5Zo5JzbkcsiF/u8B5zmrtcu/XHys6qzTPG37oWNpVeaa62qtkKQ+Vq2KhzDG8Uxif+nDBNXWRB/j7tJmHvP1WbED4FeyKh+/oOa4//tRaNE66YgfvYjbNHNdc4kxNKFc57yj84RW4MPLFPeS1U+f2aF0HPWqE09r1nbe7q34FvvomxV5jQo3QudPw7/03/aeJ+dg3XwveD09mdVV9f9Uu3Qd9ZGjJr3XSL6SfbEXDOmL/mmNm4KVcQkdezt5yAr62fkDa5JOwo3NcGB3T8SJ+9Da9eN8Au+ynWzpejOJ8+NjrwLP0+NMdVPna94UnnLH3G/zoO3YkF54diy2x31WlbZZn6mn0FHdeLvV8A3/+bsYi53rENc74dXaVUthL9vDP1HEy7+qb3LMdO8G77wI5iyc/TL8zxvdbf4/78qdTu84doP3G496sHo0es9/hZ6+PItea+mn+9arYS05MNLjzQvx0lwyq1mjEbyf1slaBRnUbIl+9WHbs26nYmV2uZdmHnndIgO/cGvCNFWb0eLAUvdHnoVebB47GHirr9Gb1Xjso17NnbS6Xmd+77lN7836h74N1I7bzHmZvoZV3FqAHcwpSlfKjl7vR+e+rnrwP//4p2PUO77ejX4zKviPYRU2O3m/b/8BD+XqtqLHph7vynzv4pBd+43cVPlvHFf5p8ZSFI9dh59LvefEfOcWeIzRjwVvYh2x4PTb+M3ZftQ+nfDEEO+oPGZ0a98KuM0nTJZX7cZ9Ys2ZZkk68q49yLVci4wqLOnlyyZ3rg5BLppr21Ae9indgg7s5E7uoBxu23W+AX+reOeeVPokfgvOOP451HJJYbSgUusOKHmPClJs35sOfdpxVZ9tA4iOcz5xhX3X85R08UHxhQ+LjbPffnd8TPWW1uPR3PIj3nmXZnkLd4Xt+TM3XOg/+uw7ELozq1NhDXeu2ckjOrs6qRu/ku7vhv/LEi2OJs8EX7lp8K9htKPr2u2O/TFuJffuGxGlPw2fmb1D/ei3eXT9wSTusIOMLb3y8Qsr6+OcLtF1PjR1VrmmexXdxjzvcrO3Fovmwm6uxsEMq7I93Fjvxqg709Myngd269XJXFSoPuNEJP2drc6W/V+m7m+p1a/Cqj5NdlNXWeVQQcuj9Z4aX6cq7/FGrG5yphr+btj8Kz75LvPHsheZU+Ir9SoEFH9Lkx99YnlVXWr9ALmAZ+Mb7IH5U5rk3Hi3vgZ69H7YyI3LQY9GTjnxh3evkD50e7u2m6p34GNWwuKv6vKBQ6YXXndXoPot6u5dyUUt/t/Yphz1bsRyZplnRuyS5OLTrJ+SMS70Dwp2wZzzwu//JC9yX1nVJfm8E8+p94NfbB/H4NS592hqDHanr5xnFG2APODroY/1BvJ+N8jrxfhNxZNyz3qgcXddFXUuVY8t4/D4P7R7sET8IP32NH2Yqxrl4Zf7QiCLYjw7M3Nnihp6r97r4Q10+4v84Il3xPb2J81T4fokly4DDNVwKjuSdY3zKM28zJla1J7/PNZs4Hd8XVm/5HLn/FpcDLYbXJn5gvVuTD8HvPsty4HlYdGJVaWf480zo92dvezf8K/YBu/70mDKZ+/asurbzBbDnS1YmYm175LHfQu+N8cJu0nfFkWOib+u9eXrVLHnxj5evWFAh3qmV7lD27nT0hUsqvhnxHbn21qODUsYQX6x2r07txuFvZGCXDZYfnEfley+clRT/KZmvH25ZFjuS8Tlf3r6PXqhz3jWPSq3Fr0r4vrRNiZr8t/yirId5n94yXcDX5cTd/1n0U1RaB/jH71sW7MZvQMi+z94liSf5YcKpoyf/oAf1XrC4JnqEJLkm+MY2IV7GlZvZR+NX2jVud5r1yCUWWUZVSEw8lJev3jdLz33vZ8DaS6O4x4Y2e54hGn/1Q75VvFUC/94Vvlz5URO7vd4lYi4FIBdZ/8gpyXDsoQ9XODy2DPbfU2Zt3/l8AffnEjMqvMJ+bOlVh9+eM9FHZwzeeY777YiyN5bNwk5rZ8N6f1LjL3BLlo9Dv6CPyDfo197v6BUu5/ZYuQj7s5zvU7ezcV9ZuiQ+91b8ggz9mjij+Puptu6T3xX4/4G+E3aOxR40Xcu+57cSM/bntsreQ4irZin9Z1535N2tT7Qu5IW9Ye47RRtNxB9ZixkH59Qhjt+Rr98S38EO4Hf38K8vkbdPG5zofUf8oE1J4fNm2lQXtWdOjQxVp+IntGmx3rH4G77T9PWB4RPRDy2au2U7/sbrbRkS48A7ldH7enhNRp793KllgX0Eal5S4LnfPOw6iji45EvCu5u5R152T01chDe+65olI47AjPn5My4hnl7Gitk+V+Vc7XrGYfUa7J+X9sz54kVv3sPOvP3w7Fzi4518EHsDucTa47b4SN5HlK3f6ddT3p1Glm2zw4e4GR8KZbkawXuLR/sq3uiDft/z3L3PSbEvTDU1cO0X/DMFlz43Kx49w6P4voWD8HMzt2Ebj6GL2We5HH6/5m/H5G/yTgh2VtdO5Ay/ectdnRxY68f+lMjbqn1pl5/fl3bZnvjZaeIY9V3+dxH8mmpZoXMj9vWpqpEX1/DOKc+1t1V+8E4yJO/vLrM4nzr9fprn+kXiwu6p+fpMQfTRR77PX4jddKD7zdUOvJM+utez/Xb8udXN0WxiJHLS2eeej2n5mjhpx8esOc6952RA3tYh6HOLVXhb8AD643Mx5fbOIN7cCc/gFR68l5j1Kvv6rtz7vc9vvn8H+9UqdxaPKloTP6Ebnwd25/x3r39+l/dU3jHNyZN0AO8Gn1xOUS0rfs1/DdlWecZxN/UudZ+Dd9BXvPAvknUbcg/bkecVBzbhvVWfcb9L4MekYPGLtfYQF69FotZP22Jf2/H43y2+WfBXWL36rW/4aQutOuNjO/QO3StfqRzGe+Uh1rl5n7+3KN8Uu1+2x26uaExY4II9vHf3SZv8O/p3wgn7d+o1yC9z6ZI6KnnjXsRv7hZAdOcmXXr2HzBokMQTljL+gwYEDCggkbqbELu9V/8eOny4RHIvYK+rKxQgRzLL+PeRL0ra/2ps/7eLUuUTxD0mZJTieYHqYXPpPXl3j+ODPvcvV+ZLg03jGidtNKun48odDyZmSns9so3z1ROfpUzZLSGTpFy++EV/pOzHkj4dpPytCbZdUidT3wr5pF6fk34/pe6ILGO9pH6ezOJ9Tdnjtst/E/A9KP/NML7H2//ne6bOp5w9FajzXXQ5jhb7f4TMsv9Hvv0XLLns39Q3vo2fx0/X9RLpbwf9rbsZ76oTuv54sz9dYLw5DmedD2VS2R1uYV/T1iE5cfDwsKMGSEx3tZKUOXb87Nh/S6Em2uNHG7MuYo9i38geT5qo1fYSFtrzUEntK8ErAnvEcy/8tCt1X/m9OXNeuVVMTiEuvjpANVNWdezfbcnFAZ497LsJWhQ7NFfSHi5e0lzolF/wWZrhrprGXll+EEtrnLdQORmRrjHHIYUPC/v4DLyQ/5LytyOjlZj7iJbs/0lcdRmOzMZvyTkaRmnrbi/iQ5B9HIwQqh31sL0wZsr2EXjqJr3sU5aw+r40ndKeB+tIg1KPx4/2j+QReVb/ismwPSU9CPD9Zp2n07+WpITEMv7LRj8GKHFfbB8+1wD73NnvfAtAs6hU/03LjVYw2LYDWcZowE5AISPxtLcjYCI4tUpuBwzHNrmu9hETKsr+r9RJCugQlWvwYQxFPWMs5nrIR2ZopqQf4z+zHKTQPiZjrRCE63LytyyJQFdKysfFji4Ck2TKb9lF4AAFNKr5bZc/xeO+fewCKQOaRrvSq/yWRucIxGVdUOTZy3rplo0R4ubtjzS3BgbB+M/bDifpzKhvrovUNpDbRGf53Vh1EwYG3GVGAh9jbNKf/EZAQT13RNbUdbbXE4gavxur+a8PGaGgpfwq+cbqGattjN4Ah/mv/CcwNOAtczR6Ndsz1l3+crXXd7fP7F/vAk3pw1g3whTZ2zPmIL/5bb0CnLgHSwH5QTadNCAdGY0YIJU8A9TSjdGYQQMA9gdpBCWa/GjMx/iWf6UA5uj2+UpzRhmzCWlURiVQMuoYcDFxT4ZhdsajbvtgQJboq3RItDQBtXQm/xodmRUTkYe0KQEoTIDY0WNzCA1ctBjLaQxHBmKUwfrPnja3v0zMHJIM1ChnpI3NZMBI+jMWTVqTlGwGE3L/kMCs/7+AMn4zwWRuI+PfhGAw+pMZGgjmNz6U2bz2kd9M1P1XR1oy6TV2xfYaMidjDAbMiOOpkcRYHmOkkrLV5g0F/rFs2f8o2+sCyjZ6s+pTC7subEetkQ4W28vMypaT395uVTb83ljxDWL7sFnZqoRbbK+3qqHBSZU1OJ2y7U2nXLanV9YCf/C1gb+Q6t6W+/63LLY7PsryPIOaFJBM2fqlV0/Qwdp4J2jDl6wNu7sUxOq35vujnEqmsEQWLKxsvJG2DaGtM8kttryRFhtvVq2zPZXtjY+y4Z/c1tRF2V4xzt/OaiTxRmx9vSzWo/R/nt930V/sVvUEfbstB27hTm1XNgfaebVVWZ/zd3QBFYOPO6eQ5BbrvQzKejvGYi3jarFhL2nDd31MS9ontkwsdvOZ8T1je8ecX/io5PgxsKWlfuE+Fsvn3hanE4zhoY96xb2kTx3mXxX+MRdvIfCDZovzUVbic9qIlWnbzng8Ii0TRjH3/umV7aOPuj/gliWQuMaWnrcs1rsxFhu2Bzbix9siMygb/iBsDxkXcukU+MR3qeeubMTmtWVy5h7MOP8WUFZsJWzP6AMfOrZnwKHaK4sVe3wbsd5csP+3fSigorelUS7hqZXNxvjxmWd77qMe5gW24IG1BGWxf7LxZs+GHxpbfAblMimZsuIT24Z+yYoNsg25mNOZlBYb1Nv6mPEgV7URI8IWTb/E9rS5RFo+VCNvDXiQOtJivcM8bgH/MZvREzDn3l4WWzR9/+SdODpYK+8MbNgexuBX2VbrlSX1aebAm3Ybdmo2fG7YiJ9tm8K44plPV2x6q3taXLEZd6nsbbHm/6Os6KmdytEv+kobb31tUbSNTNHmAH7k+KOy4XfL9hQY4cfQhg2yzUY72KK6FGftrzKuS3wOgiPtvZRLvtQW6yhgjw7BRkAOWx/Gin2eLRvj8ZJ1oB3kB1ZsUu93Zy74grcNAq+fsD4p6O8bbTeC6J5wZb2okz3SYnnAHqn5yhICn21LLjjro2KR1VpjMitLXG+LbTrtVH9lsVkpN5F5xrGOyBateZgbPiBf/fJRPtjm2fC7ZiM2tg2/5LYptyyWiAzKeQXr5kM/PRkn9j22Jz7K6cA2ZSUGvhX/v7ZWxBYqhxzuHHN/n1/ZvjH+trTNG39bH3AOW3frEeZ+nA9+oZzK4RMSf0i2GoyHi56VN+y2bOxvbMNsUcztCHvmHv3gu8yCnZPtXQHlkgR4Y9NkXU+9QpS9DDyJ7WbjHmZ7TPoDv3+kLvYJtkFeFsun3hbrb/L30tZ7cOYYfb8FP8uwj5GZ2BQ4gy4gthPp4elUyhO0kwS4/aFOKB/08baXfF/xUS6lPZWTDfijG7Lht8KWBxkr93lrXtI5qTOUtrGntmUk/ZY6zxnLYMojC7NlYay5yf8Inp5gruVoIwA44l/Y+p61iAO30fVZ87IOvJm38Z7UZmW82HnaivaxWOuBA+nJH0b9RJEWlxAPZcW2LfY6Zf7SF/dcGz5SbC8KKAtv32ztvNhTaVWP0kmVC3d9220ZD7+V5LeB9PuIPpFJ2DBot16CBtzOrKwd+NubMaL7tP0BhsWgMdHgGjbYPujpLR/Bn2ngT3rK+Lqy1/gNe++RV6B9yOltkQVUZuRsNmQftgLY2Q0Ct5FT2ZDx2CKBBb6NbD9oV7EX4AOs5xgT9rnWt7STOp2yxPCNf1lbZmBVgjq5WJublPki68qaYwNrI36eFd9z1jDoJbZpVu7F1pr8hh2oldgstrOss2ukxak4+HaXtkYAr8fUmwquf8yvQsJo6xNj2M9auVN3PPPhLY6V+An3+5NG/27F95zL2x2qaTPg9p5xj+QMqJjBYuMNpvUVOM2bP0/iS9tuMd6d1MkEPH6yF46ksth4j2vbQR52vsl44289uF1ZXgDrAYyjEvTEG1pI7HbbX9oZTbmcfD+lnZ/sQ3zgveqMPXgB9llmyiRjP/e4ZXHpyFgtwKwDazqAeQ1MryYMYj68lbL9Zi5pgBPvBmyjNiun897sefK6s8YjE1lsyGetuYDnLcbwkHmd43cf8KfJNpWxPnRpHGUf0T/vfmz4ELEN3awsH1jnu5mVSzHOpsBbFi/eStmww3Q5DR1e66iyYiNmy8ycJzAG3jXa3tJGFG0d9bTYPrDvE/Pbd9pER2wNZ53wqWZ7ybl30VHdL52M+yz1qrLnnwHba6zHG3ClG7C4xx6rB03AF4AN+ZItFzhHPEhbOG3xHsrGW26XetA6YhVY09IGPsGs2clHJmstmxbYkP7sozJg82Itxe9nOeMGAr+KqSxOg5kLMd5tVcMt1rKUQy/QpyZ4+5j1SBlpyZ6cPm2MJZoy+Ii3EV/cSgzSCWOSqT61KZeVPvAJZhuVTk0YSdtrgEms4CWfA+DHha0qOl9h5ca7bNtn4GGljf3g4ssCKksj4BVJuRdblcWWQaXHZ4qtZB+LDRtKWzJXi0sZzm30urZUrCN2otYf1L1P+a/gxDvWDd2tZfUJixdvn3r4JlXRyMqj+rG38m2DBoEj+Iq39gUvLMD9AvXuQhPQj9pioZfFUyvrfeD3inZ6wJ+0ou2klLvH368pi/xxwmjm40neO/7eyvjxaWcbAr76Cw9FH29YJ2d+L86Yid9lfZtZtWnO3qgM35WN/Km3LN7Eq7eEQ0OwF7M5Mo/SwGokbWAvbyMGqC0DeTM4R16DV1+By5cCKhO2o7YzPiomf2HlcjiV5VVb9scn+kQnYz0ETHcwJ+wnregMMqahbF9+j01hsQ1PBL/CnIalU5nQ27hUpRx+G20xjPMD84rgLRx6cZd67AHe5cQig7TV4Pco5ufPmRBLGa9ISwg+k20HGEuJPhaXcZ4Wq6+TcnqVwmIpDW0bB40eJ7jDuXyBfcy7XBs+PmyDabMu39jb25C1WfG7OPQo+IF/Ihtvs23YBVsJImJ5CT2fAE4XAWafBK/hGbCps7kDh43CmzmruzcYz2TKvJI9UIBzHJhGkP4One5Ffi9iUF6FfpdgzrwvsQ1nb75g3sHbldWDMeLD3uVzepWBN2K2EemU83LoBnY1toLs9xHs/V6s928LtN5HRRYqrJ6UTqss95n7L/Az6x9wkXRq6maBHlx3VdbMstfAHWKf24jPYM1NO3co84wP+ncbbxusJ6FFw2h7EXP4wvzRh1m/08ZFxv0R+BOfwfaZv90ExxgL8eRsYrPxIIOyRAGTW/Bnd/k9jHng49uGn0EbPkOcSvF3GPiDHy8bMnobcmVrmnT4XPhJG+z7M/AZ+cHFGPxVl2MN8FNmG8o43rNHcghPSP87aOs0sLExrpnC7/NtzaCcjnlaRl5jjQLAxwjm8oB7wEP6CoFml4IPWE0+fqNcrrsp6xt+J1adNSLGkv4D9bGTth4GF9CrWMeAD9ddVCrepNlGk9eGsdR+ZZnpKNIi7nKJcAauTllCLF76HjZBnVHd7akGar7KqgrZBSUOSLyq2W9AxfQFOQeXaRy4qg7/XcTlvoVHCoQxSqHC478dWqxT3i6NQgqpBTbmLRA/K/aecKCrCutrN7YC3MIqU64fJQhtbxeAiaAGqzYtNpGUKbMyxEwd9E2ulL1HuWnWJJA377jtt1Sp1UQhdtc952BGmVRByhh3OXBM3+uMmyiO0/VdUW78yektHf+KOAWPcfb8EtRBjU9POMvV98MM/JpT3w2JeGWXrckojXtoOmoYMgQpIUKONPYbp3FPxSO1qs93Ln6RdmV1DMGfecXnLRB9y7yNdcpB2hCPVOYeLeIVAzaOiMK4wce/4s7LQ/psVBR5COyj/XJLqCV9nTeEGZha2CVQvD1CnGlcihPTnDPNC+BEmieAlgnKR8Arcrdiys8aSxcTLTJcAYhxkTYXxBAOlP3vOi8TT2yflkyFAIH/iRTkV+nFGbmmSMDc+F0+hjjSQDaRbFS0iwsw5fxPWGDK2tIpv5jXjAX9iyFEk5/9fklWOwP4hoRIBA644LTLAA25kchMCJJrl/WZkkIBpTEn+V3mzvNie8OyaNJO0X+ihag3dDLAGJIpmjMFaUaDxDgEYG52wBlTRkujJ25IGgRDDAGQIcIz/stvH5JgDK907UJK6dyHRUpCt2/p1uKKaEkSM0kZsEiqkV2AIKtsDEG6NWbwT9zBUZVA6COdezCM1LoGBuF0JPA2kcyQUv+rY8grpW2R8RHoUqsckD7NeM+YVllSaHGJiIcMwBhyP3PrG/I242/5XVbdkMaa8jeZFa4P/5Pj+pBjyg8Fp00JovyGyssOTI5Re1tGKyaGiKTV/EtadFN+ez8wyg48PdJCNmlS6AYxb/8TOprDE7QxV1eQX9ZSGjTkU4YcTfap0do/1MTOe9lHupmMxYyHfbMZomBTDPiP4vwT6xrglu0hJVL/J/sSHYKBpESX0nIvk/KKXM0UPjvZxyo01lQYGOOVZfDb+onRcM00oWISboGZCSv5lr3h8Z+6QMpJjrFjBFkNIZsxdG9ww2jFFL6ZYON5gvIL+iyoCiQ2SwKXxwa5NFfIIJ0mUROSZ1AKAw9kjWWyxhj+4bajPVcomci5DYwwpuhip2IySlMy7IFz8TgZg6hKJIEZvqkp+N/lMDauIdyVWQh5drXrO0R3ID0IVsvIjI1p6BFMqfm/xRREgARt/SL9Qib2SwK3mP80B4Yg0RRFGv2aLZjCZQPWpqDS+BjLakq4ZXaGANVAOjmsTNm1Ud4QmPod/MoAiD9oylP/bUNDZG4OQRoWABi4bRD9f3JZU1Ir5BkqNOObUFgD/Y11NY5k41gTWiB6H1MwK3Mx1snEP2OeAl/Zk0ZJAyME1wxs8/sgnWyzmKL2fxQr4URMjZRBoY3fzaPWgIcpyjUp4P8XfmOIqgXUpq7DwAJTs2MSBEO8b+K6SVkEE4wtZh/x+u+MOKUUMf4zKL8hB/c7Iz+uZDrGMYsl03+8hxw20rGAUtDNOLhN9YdsUfO4NLag8Tcyqf+UArJlzWU35dX/9BSu+pQxJeYJJe6GPN5o0+/dD71d4iXRzVDgmL8aNY1tK7+YOgUj1yApBugNtDBOPFOl86/sv8Ux1B9+tp90lshOpn5JktdeJpExSY0pgTdGYRzfxrb/Nx+pY+hrzCU0ycc/dDEW2C/2F90MFMJqUj+TMTXoh+iiTLCYe1U6FN2i0YHRlEGMRcNppA0M+6fX+qcnM7gLv+jfAmBG8EMSuKP9xzQYm1D+EjrnF/SHAvdYC6E15h6QdmSnGaMw+pDj5Z+m7J8qxDgYDEpmjDghk2JQDgN4ouk0SpigNlgSaVNQ1ez53+L9U9uY5MMgGMYozFb+IZZZytQxQhj//BW1ptGZTOnfcIxhmwsiKUP3ZhwB/xr9dwYCzxvjLyg3R6GJwM4qf+BT1tiuBvANzDQJiTFZgzyYx425UKK4NZgXv82BNIRxvmwhAyrGnjeLGxvYYMGN+Rqn2z+aw2jeSCNEyE2o4zIJtEEuTSqQUKtlHKymNQdb8uAEmoF8+J2ShF3HZ+wAcx/LIP/ptP71Y+rFjF0IrMZPpAFMcP6p1cx1MRgKAbffYSlkbMpzkuRJVkLtqTmdf+TB5OqNc9lUHZpLaDLA/7TkBrzMLW60BHe2fxKdYXpgzttEJ4Pz+XcQmAphw7bBRFaT7phYZOSZWyWhetWgC0YZv/2TNWzPSGLPVvwn/Vslk1oZPZn6QJPCJlw7E4eNLWceKgltQv7Ry8SqLqYuzliIVePSiRBc8QhdoUhRKAuVA7cynIophEmqqZwkfDcYqdTpBnhYESM+PtAG9ZEInxnY1yh5FI8k7flSHyWTwimavT0p98CfGzKgQGGjLgmU+O4mt06+7SYZfB/mdZ7ZNg/b7GWkvLRrtrOYwmnxcnkMT0YEwVEI8VUIXvFH8PeLCUp1EpiRh4JK8YjJXn8cYxRLGjFpkDbbt6Q8ZYfIftZ9IRhVGRkjDlv/60u+5TeE9cqrN33T4RNeNuF00j5elIEKwbJ9HtKu5F3Aw4Ffv3/zkDyzTUkLXKoRZQFH2v/93RcvfxbMiuYw+KRTjXHJeLYM4xELnj5bIKTogJACgZU6wID66vVIzVh6STOkS1P/IhZYLJFCOK+O82LxOaiCgkalx4ttcyJAHuOVZRSeM6R9mVMA3yhPFEEz/oMZoLLPXWDVHKEJAWH+G/sBjSeD9FhujyV6LcZXXt3xqgweYWStnvIx8UDmdoSXnrfwUv6eMXgy9lHUQzFmhysKGvtYq+kxC57J91+8X74cjSXjIqIu0O7SRkrNGm6ME4GqfXzBRM7fwwdHgva/U8MvoUxDcmS0K3M5Dk6E4Ekcp5n2+a4FPjj2t89VcE5wQ+pizKda3rIohOoKxbeaqufZVX+bMJCyOKa1w1TkNzLWlCWUCiLKaxFwiqW35wl+mDBbwDw64zVV8M/EEZyKQdmM/SXlexE1lYCC9vH8YbwPu2J1Di7iDMzeZx7WOaD5v/1p4s0xPeZwxF4yzoasr6yttDkTQHSjX9kPMndpB7S0//aAaCEYbv7XjsxF1ttcE8nnAY69rOCp1JV2BeeKajjjcMC+d+U32QcYCagiRD2QvYBA2i5vEzjXB1nvapidAld+MBeRNgldqQVO1tDtZCZiW2MWpyJiphJ8VrHHZY0EZk0wdfvO/P9golcRBE3CYC7Tzh+iuNbT4xQcknmatELmtYAxHeEzh/U5VZ329Tzf0k5jFiucjDTQgRg9vgyOxviFpqSn7Xx6ri30nlhBndf0L39Ln0uI/i74hmDcPk6BkQm/qgBe8Ebq1Qd3hwF8gblJX29VIDIObMc9PjivtOcPwsuwwNukoY1YBJmX4MVFnX8ND9ECP2m3P0i1lH1eiU3fiz0iaybzA83tsOcxmcKgQSVinrJ3BD6yLwQX5RsntHbYS3tS7jzedUyaLGVr53ZQH6E9WcGjM9C+Onrf+zTllRZj7cL5sQqksbI+bjRWAy8uFfgI3prnQ8hgPMywD6VdGZPAJhiawAMHe1rGYu5XEz5ST9avmD5XghjXUL0XBa/sZ4f+W9Zbyh/XYyuGBaO0Y/YvOC1rlaE0eA6ABkL0ZJ2kjaN6/6DIVMMZ4Bx4pCTMdXxbw0xQ6vuzD0N4VSI0xNx7shbmOrr5OKhp0D+Zn/Qjc7wJvSMAhsJYQk3mBTjBlxTKXBVPudbgz2C9l3KzD4V+medEHPujAvRC6KtJI2XtZayyfmb7g/Tc5YyRMQ7Q5ROe3wI/kw5L24d6OKgIXv2emyXrx1jYA6czGWVl7NKOOUcTfmY7oezhVCD9btaxakMiFWhYPyMqsllHyrKd7eN1xFpZzn5pMzd4kxsaXlnv694rOGc1rZO6UqYL8+6I/ausi+w9nCfYYTeM/ghcqJrzyQ1dbAZAOBLtOF4cAlSFdgRPgzE1bgwOXtDjEpjKmO4zPsEXgXUZ1n8QayFzlj5dKJeLDfIS3sGfjiVCo7mulYKgkfSPUZAdxjLWweDOZOiTwErOW6H1Mg4cudtph5ybsj7pKFcTQMg+NvGlOURqJvCbD605D+4n5JPo3l4vGh5gD7CCzbCP1zyTZaxCY0wcMPfQD/Zewj5knVIziKJs5uLQLmfo5wx4AtEDCK5IWelP1lZgtkDTHmcivXeFdggspQ+Zr7SXq7VBF4QWXIQHkfWUPvygeTJXmXsFYHaJG+M5PgIXgRPV7L/t0GtRmvYFj2Vdg8B/R2ixGBnLHA9pPK4JPl6GPu9abOCwzFnaE7oq55ec+TyUsrf/MR8vBqFnedlE3jA/Jo+ZCH7Vhb29YIMxVnP/yz6W8+h+oFLtWJfq4BlOlv6jDfJbBV7D9uHslLNIYHADmiq0VGC9ENrDYy/7Gt/AO2ot6KG0L+VwJmkf01sO8p/Q+P60gWMze14P9ozQNpknj43t40nIWwosL0CozbGae60cL+eknsxdvgXXpL1aeNouAX7IeSB5WUHAIM4CQfBRGo5Cz4WOXwbvTX7XCVhd5TON8QjvI7iGUz07DtwAJ00aiHGbfT+aPJHwKFJG4C7fG4D1EHDXPJ+kzEui8wvvIHCKpo+17Ce2rH3OJn/bHpr6iUU06bz0D6tk7yc3ryXLA4PaeBOQ9Zbygj92ngc+dSabvYUe31FegOzlQ6BX++/DmH8lzvZDfMw5yJ6UvoW+Sj+C6wLX5zS+iczPrN07zkqcldvnZJ6p0q/Jw0vbxTmrO7Du9xnoE+odgPaY6zSbvXKcKCLCxwp+D+Wl1mZ+F37IxFtz38pekvXOBm2SM1H6FBopY2vEJpL9jDL2P9hIHV/uQKMT3MdMWAtudGLxBYfMMUue1DX72w8sMBZR/fBSI3Xld5Omye+daVvuDrKnzflIGYLB2fG7HnPrxVxmssdzwAsJ3UnIFwreyd6X/k6U48WNxkXzvBiuYdIKYESxF3YJX6DnIrRd9lo6cLYheHzULMsPLXQ6I3DvwxwzgL9V2YAJ5/+OFwoJ75My7nDOMBmb8JJrQLwcui+hqTKu5twjzPuAH8TMrG/CTvBF6v4C11bxxw5eX46ngtSRtcoJvB4yplpE2f/FmOPYL3L+CD3qyORN+AjeCJzNvWOeP9LPE+h0OT2u1uDTCs6gziD5VjbjVo3zJWoY/IbAVfao/W7HvnbmziRjljLnaMeEs/xt3le+QjslX8YQyhxL87nGmM0xyHjkTijjlLUX3JOygofCc90Bz837TXPNLwtZkTGU7IsXa40vMlZpa7Neq+YgeiaAcRWcETw2+RSh7cnhf4ROCWy3cqAJbOS30QuMfGlP9on0YZ6F0rac1fbzvAHeGDk3TDpoygoEPnK3krKV6Ff4efv9LQFcTB7IxBHZL+Yd3MR3uQcJPB4xtjvgquCm3MdkbCYNkLNAygi/IPXTwwcm4Z62D08dC4ge4glgFuh713nOQRmrtCH3Eakn57iM19yfgo8EIbTDKQc654J8UoNPXeE3TR5K+j3M/utO9JyM5R3UIxainoa34IXQdk/2Zi9w1aRXgjeypoKX0nYX9pzQP4Hx7DKIkdc72M8FKSPrKuNYAmx76zUSHOCxt33/yzrK30PYf9UBrsBF2pT5f4X2J2MyM2ncpB2S306PT/ahtC1zKKN5PRmTzF1gKd/7OXvH8qkB37uVvSB4IeXPwpN6gLceul4axhcCoZnCBpP1NvvKB8yjKZeYvZ4VGbbARMZXlH3en/NxGGtkwtsuy2BQeUH0AfBdv+CJhJ8RnItiHeV8l/HKWSTrZd5ZpJ9QznLZH9LOOzwymzIlmY/9rgnumeXvaN47J40/03A8w5o25FybCqxqat6/JnMUeArtSHjHE3ycDN8ylw7TM79Uk//RW5wo2NvDaNZOd2XsMtZeIPBV7suxnMnm/UFogLRl0kzzvmfivvS1n7PKvKPa7w28YhUaJmXkviJ9NQCx7rFPBSdNeLQFXji6sv/9ElxPwl3cG8/vclbLmERuI3u9NgAaovFhBTzjOk1P5D5qPw/hFyowAHNskiftC3zlHBQ6ZPbpyIRN2cVJaOYWXtre4M4puCx9peV8WYOX/7nkCX9l0ltZf2n3GHI0G3czUx5gwno5wDVpkLQtuCnf5ppImVT63m+eF1JXaKjsv53cNWR/idwsPQSrNDgn7Ymna/MMmMJeMdcO4277mEz6eATcGcF8ErYtfR5nIXphStQOPN2N10jpQ3BOcEFwWWAs/R/kxfJ7DePd4Nxy9rGsqcx9BfULsclfQOjNsUi+yAgFJvIt9LSepkM7wMlNnhaFwZdKTzsT9TmVVd+Rzf3cRPfnyN6Ve4LQOU/GKX1I+0KHzXNFZCMyblDtv/Gb4zBpsDnnG/DNJu8Tpmmp0ChZXxwqGXJj6PNyYNyfPSVjEjgLXkh/sm4Ce2l7EXgg92wMe+2/m+eyyDgFR4VPlTU3eUJTPp2Qv6rPZWmKhkG0NxZgvv94OKmz1YQPxKMHe0LwWtqUtZH+EvLG0t41zm9T1mC/E7D2DhwMsm8ENuZ9TuAsMjTh3TaAO8JDSxvhyALy44lPcFT+TnhWSvvmvULm/4BzIz0NJ6TNdp4xAe5Nlvsad75TfAiQYKdLsnZyN6tJwVTczQppmUshIiybdM++Dsh1b/LBkF7d1PiAU0g1DTiUp2/ZH+Z623lNYPcO4voGWLloup6ExXjBvjbvygKzhDIxGW8ItFdgLuMNx5vu1lR4fE4gIxK6LO3vZr/4wOiFcN6NAT8kEqGMux8wfgidEbySPt4wNvOeLH0ILAUfbpNvgV6F6/mZ9FzKPGXcXFXt4zPnbd5DpSzk7z95taz/Rw2PXsxvAHukJ4ghcJA1MGW0ImMSPhvjcBUL/e7F2E159hNn7p8QtjlM7jM0ZTX3CxMu0kYP9vxo8ELgJv2d1v0V1vtYzgApt0Pjp6yPnElPtd5DYCl7T8Z+nfPlB5+E904TVrJ+QiPk+6zuw7yDzuQMFXwz6Yl8Pwc/HxKJ36TTUk74RennAOXlbJH9+oQCJi8hY5mvx1mBO3lCWZ2dPnP+yJ4290VH+F45t2UtEtKPZAC/Tz+8Wugx2WCEZH9IGzi9tfd1hkVoBo2TcUhb0vcEGjPlKVLPPB/M/ZKCM3GCHt8XcEn4WVM2JmVkXWXNopjQDn2+7Wd++TT+iTzkLh+5Y0p5At8Ycn3NRwoPKN/h4B9OFOy/mfht3r/ld4GLKfsx714mf3pIxgU+mPoDyTPpbBx4JTyhlG8EojqwF9YxLh6+qdvQHnMdasIzLde0f59e64LIoEZy8EifAn+CdNrXtUhyi8rFR2iFnEHv2XPluUsL7yP1YsCDAgnooYz7tj7/6N6+dlf0Opj0xJSFCMytuqxJqwri9QIyYE+H6d8Ernf4fICmttH9yp1b2ttDRfM8lfZGcPabay59ldP0Z6Wer+xpoWPr9TqnYOxfaSOh/Pk1iG/yQIJvzvwu9wb5zZTf2u8HnLXmvIQ+pSNCTFf2Vx29tp30WEXebco8pb2KnGdbfPEyquEj9FPaFN2oHX6cr5nAffPeI20LvRBanRh5yVNoRGLOe6GHUl/wVGAv7dnPWvBrI2OOp42EcmC7vlHjDU4k7WeAiTvSv5zfUg6HmPa8ofCCO4hidJ9v837bE7wqyR3orK5v3rnkrJWz+zx0Zw0ytGp41TXPOJOPl/oyZlmbMZS7B1I/4ey+r2nWfT3/pdDBPRpvzbuu0FDpQ+ZrysMFP7tz7glfKPm/kBO845wTvOHxp52nlPncBA7pWcArnBWPdF8J9/41ZAmyv4Q/SrnI2FsyDrknyO892XMiLxAYVwd3WvAx5y0wHaZxaXQrB7WLPgTGsldOa7z9xJkSoXmcMmykcI0XafC4I3MReIhcTmCMs0o7/yl8gszRpHt2nl3DM4r9nxf5hNBic10aAtjE0F0/4N6buQptlN9+sVcP6vGd5PeZ4M1uuRcloC1vocXyxl/KCxwElgIDmQPOeux78ADjXk2f8rvgSln+lj6E/shZJGsh9F/qyJ6w44qpl8FzWUfohHjukjFLffOuYuJlHuSBU4hcYt4DpL7QBGnfxAEeKP3Hl0i97wzGDfmNyROK1xGZ5yLusNMZXxIWkOX4jz9LKBOQ9AY8rci5Kvx81wR3WTm3xmEoYb9v6X33DjjK/pXxyN1TcKEYLk8EjtJeBjZxBLoiZw3rq+xhk97KfHsySGlL9rLsa2k7obyio5Y9mTKImgl0XqadhClPNuvIGslvJs8rY5cyPtBo6Utkbjchwus5L0UfaJ6jJt4LrynrJThdgc9m887Gvdfk6z+h89mlYSOwtN8JEugp5O8F7I8g7uDrkN2Y/IDMU+TH0k9T1mEQDY5lE9VnQjI2gbHAR+qvBS/qUlHGI/PZD5E1eSeRTadhjeXslHYX6X0kNM/ENRmLL3SkEjzdI862poznG3uuOHRLfjd5D5Om2+ViGr42zavI3v/O3jBpSzbak3yTNzL5SOEZpT2h6TIeltkO10vcyRWRTNKC6xaxL2EOW8DpYLx73mCw7cDViXJIou+qz1xrwWTiCMpOp/ZCr4cxZkd9VoG+qjNjScK6CU236zCBXRx15C7DQ047HRVe5C6wEx2yzMvcJwKzj+BAV+RFBMe302nTzkLmcoaxmnTfLk/XOBwFYu6iX1kfKdsWgtsSPVIbxmzOX/aN0EWpJ3QWRwAqgHGZ93qhJ9toYwPr7Qk/8oezQPghU49t4p6pOxL6KO3J+ki/0obgkODPOCYpa3YGvi0eZA9DN3sEPVFt9lo18E3orJw5szlPhceSs3Ul/ZaCBgpuyZomtJswz2oZ42Lu4f7w6xzZ/+kNTNsXmYtdjwWQcHZrzxd+37SXMXlBU8Yn9MGEPQ951SR+FFoo7Q6bTbQhPYZCVBYYyDhHQQ8Haxx8wtqLjFXyTd6lKvr3VBrHRjJWoRkyV5Numnemp9gTCQ7Kev0GZxPaS8nvo7mLCWzkbzk/7TZYrFcdZPzf4SUkT+qG+6M7I/89e032rayH/d2Upusmr2nqEqVtk2dyAN4nwbddwNO0LemPEEDQXWBg02eIydtLmzdYP9HvtuBj6mKkXZMPlnuWwEHolfQlNFfw/hgbQmiZjGee1gGZ6yXju8zv1cEpHl2q7ppu3eP8HwRxERoq8PRlMWX9RJZRRa9BPujkdc1TSTvjWZNzFDL5c+lPcET6madpkPAt0r70L/TM3CPmfV3mK7iB43r7/eA55/ZV4CRyMuFBzDUROjaHCfZkXMvI6EanBSkreq9jfJZwzpjrbtd96PohlBUY4ojfvmekL8Ef+Za9Ie1/0GPcCT2szAazMq8K8Adlue/j+Ne+LiaPKHMVHJO2ZN0srGch9v5+DaOM7OX9yN4Snt0/wM0raZHZa9gIvZJ+MzGf6gnukeaZnZ1ORoFYz8FL4XFk7kJ/pE5l6IV5PnVjIVyxAStBwwTMUjhAsMufBDf6wOMLzyx1ZG/ZcV33cRTe2KTzoxlrNj32xzwNlO9UzL2ovtO4aXpr3pNNHZ6sdQqIsCmLtetEKYTDTHv/d9CNjARfFgNL01bRvCubOomEco2j2l7tGoPuQTQ62RcCq+S6/5MaTluw05AoYiI/FNmhuReknXvgZiXW8A9nShpkVXt0nazki17Ufr6BKyf5mPZtj4AnwTrsY+rLxMoB09SsSyL4vZPgmpf+Te5Sst4B/C2484P1KQuvN4Xzw9z7AZxRUUy2MxlCF2T8iTRsDzCuupp3KLzSQZ2CtgkuyXqYMjTpR3SEgrezGYfYWAjuJZR1mPZoMvYGen6Xwb9WOv0d/BvPeTScvfFb593n8Kig4Sg8i+zDR9qGJCGt/IEcpSJ3vW/UbU//FcBb5+oOKhYZUzbMixPqVk0bvj5cRE9zvmZlcUfKpoDQ/ganTBq7jfYIfqHu8aknMhoAI/MVGlNPw0b4FlkbgaPA7C6w2Qd/IDCXv2X/C88zTmw20X1cZl+cY43l7iwwy8r8TdyWscncBG6T6UsCjcpd4bKW6+VmX5SFfgeCZz/Q/wh/KOsq56ucp4IXAp9nYu+ArVYLPu7YVJhzv809fQpt/JiJTEqvuy9nr+C2zCkQ3JE2pC2xETB1c9JmCDCVe7vM6Q8VPBn3d/aanE2yxz/p9TrBHd7ECfs5oX+3AJB8THSBhtsU+jX1GwKH9sy3jcYxOS9kPKauX/o0z2/BH7v+Uuis3pMfNS8n4+6k209Iq+1yA32utwd+0WxQuSfKeGV+0pfcjQUvZR1lvi2wE/rIOj3jbDmg5bdd2B+TmbPAW8rKPhb9zUHk64Iz0n5nfhSZVkL5k+CnKbM37XTMcTVhf9/Xay4wlzLXIe7C/8rczfuQzNPUOxQE6JHwwSITxyGCms/CmLysKTeW9g9y3tfQvH8VzoOt7ANpz7xrmvaMcr4JTBtp+DfTsDHthV8DPPOuY9I/c/xXdFm5o0sbh4kKfVB4HeiPBdiZ+mO5Xwse1MJ2yTxzZU5l+WMiuh7hhaSceT4InMazGEJ/hc/rDyJ90fy7/L2KPbYtgS2FzGNvAhtzU/Ypa1kU+nVIj9O8v5hyOLOs4IHgz0uRf+l7puCu7N3c+nwfAkBMOZ3Ux9GznZ6avHF5Fj6U+smAdWpdx7Sl/QLxcoCxER5Y6q/S47nJWtaASJg8ksBVZHMCiyC9HtP53eQbJX81sC2TxEF95u5m6mbXa3mK2AtKu6HgpMw1oW4mod484fm1D3oiZQWuMhcZ3zb2SBg83KUEcBNYdoQX30qkiCcaFz2A7WDgInRDYDGVAVWB/oyivinfkvFl4qwydWVj9LqZ8k/B29nAzPxbxpnQniOLhqWp6zR504TyhRjOvIbQ64t0aspN5jFoOTME/ibNl7ZT6vaysYcSI5+fyZ2jD7gVynk/H526Kc+qxbwywrzImstdOwl//8LtqckLCJzMccgYzPuHjMnUFw2DHpryC/lN7B8Fblmgd1k03+PLPXY4dCWVHpeMWfaSa2FeoumzLz+2CWJ/YLepdHNQWSDgR5BhSDnxfurMGkn/wvO6wK8LDZI+ZV1kXU25y2/omglnGWcgfJB5RsscTJ5I9sJbdDQR4GdCGwwpcwjG7ojGC7azfa1MfZ2MT2ip0GzpW77TA7NLAO2BxutnnEG32Fw7gXeMziNInx3XTV2GeSeQ+uYdfx9jiUbvK2cywTj+OzdlrBWgUY30mGTusj4bad8Z79TZE8kzc/Ai3gFYGOka4GB+0vLCpiD3p+Kk7S9qsDWspMuU4wF+VV2mKxl1dboNntKb6jLdvnM31OnytNNWt1OGvnrq/DaMta+uu4cyAaRFdOJOepIun4p25unyBD5Vi3T5KDKCdDoP/2zU6VA+O3W6O3M8qOuWps1gnT+S8Z/R7fclP1Sn3zP++7r8DcZp1Wl/xhCp08lpIFq3k5r23+j8xeLtW6cDKB+n09voK163/0Z4h8RG3WK0705ayhQhw5O0fTzUzaDz29NmZp1+STvZdd1BpPPrtDdjLq7LdGUuvrodHM6pqjofR/qqpi5fl/Yb6vwcsl46XUjWS6fjZb10+cHgXledTkm/fXX7hSk/XJcPIT1ap8tSd7wus570LNKypl/pK0iXOUf+Wl3mMnDYqfNPMN+9Ol1R1k6nj1I3WKcHM4YTejyrKEM8VXt+Y8pc0ekO5IfqdEfwPkyXr0Vf93U+wZKUVecHMf5onZ+Hf2J0fhdZU51/hrpxOr1Q1tSECVFScOttz6/yk/UlLfl3GY+7zm9IO546vYO+vHXagbppdFoe32XQdRGPq+w6vVXWmrTAqitpX51eRJtVdd10wLOmzn/N/m2q6w5m7m11+h7lu+ry5RlDT52OJN1Xp/2Zo79OP4E3CtB1t9H+aN1+IdqZpsu4UneWTpeSfarTlWlnkU6PYQzLdDsfGP9a3U4w6Z06vy/pgzodQvsndN1RtHlGp38Dzws63Z/2r+h0atKhOl2W8mE6TVA5bJiNvo5xB400YcJcYnS6NXeIDzr9RNZUl/9Km4mTGO3kpk1nnQ6jrjtpKT9E1lHn5+CfNDq/IO1kJi3t4Bhd5ddlOiMfK6zzp7NG5XR5f9JVdToD7dfVZWqDSy11fnba7GimhX7qNp1k7XS6haydTntQPkCXry1rp9v8TvlpukwdWTudbkT5eboMTtxVkK5bkvyNOn1YomDo8nGU2avz59FvsM4fRZkTOp2a9BmdniN237r8Y/oN1fkNqBum0ysYZwRpoRUngFW0Ln8TmdMbnc4idFWXfyHrpfPX0Je53w9RRjnp84J0Yp3eQ3ln0nbaSNqbtLGODiqDLrOfMWTWZbLKvtNlYkkX1/lxpCuZdWXf6XQEDTTU6WLgVUuddpa103WHQEv76vwFzD1A95ueMsN1Pm5z1Xid/kGZabpMSfBhls5vwbwW6fzclFmm07VpJ0iXqcc+2qjzCbiltur8eOru1fnPqHtQp/3gpYJ1mZfkn9H5BDNSF3T+WoGzzt8me02nT9JXhE6/Jv++Tq8n36rTQ0lH6vRgobc6XZkxx+j2JeDBB53eCmzjNdwWArfEzkb+A9pxJy11rzMeT51uKWuqy4TJmur8uXKG6nRj+s2u0/3Iz63TNYFtfl03BXMvrvMRFStfnX+A/Eo6vz3rW1XnT6Dfujo9n/ab6jKlKd9Sp6dRpq0uEyx0WOcT0FH1JG2n27JndfoB7YzXZa4KL6Tr1mdes3R+NdqZp9NJKLNI1/WgzFqdHwoPvVHXjabMTp0+L2erLpNL+CJd14V+L+j8a3yu6PKNKBOm08upe1+XqSJnqM5PRr/R5nxpJ0anW5H/RqeHk/9Bp+cw3zhd14WMXzqdhPzELkY6o/BIpO17k3xP0jLOm6Qz6DKewhfpdE3Zszr9WNZR1/WRc9OsK+emzt/K2Grq9BDK19XpH8Ij6XRdzq+mus16lG+r889TpqNOXyC/q05L1JeeOr2B/L46PYm0v07XQf4UoNtsJ/RZj20HZabpMh8ZzyydPiv0WZcJpt8gnS/Ecq1u5ylltuoyk2jzIGmhpcXhsS/oMjNk/+q6wzl3wnR+Fure1+mB5Efq9E85K3X6BHD4oNOJ4FvidTuOlPml+40WGutqlFnP+D1J293nyFmp0+uATxqd7iM8jy5/EpqfnbS004vyhXWZ5MLf6vRg2vTV6W7kl9Pp63wq6XZKUKamznegnbo6XZRxNtTtNxf+Vqfj5TzVZS7KearTl5mLvy4zVvhbnV8fWjFe95VMzlOdnw150yydHyr8j84vKPRZpzvJnUWXGcT4N+p8L8azVfe1hDYP6nwCw/639zeTH6zzA0SeqNu5I/RZ193JmMN0OoB1tOoyj2g/WqcHUveNTq8mP4604Ekf0ondjLrThK6Slr42Mn5vna7JGNLo9Fu5p+j0MaGxOn2TdrKTlvZfiV81nS4sd0mdnkq6HGnpt6eska5bh74a6vQmoaU6XZ7xtNTpg8LT6naOUqarzi9Jmz31+P/K/HWZFODqaF3muNxNdH5m2Ws6P5Dxz9LpKpyD88xx0v4ynW8Tvkjn75E7tE73Fb5IlxlDeq9Op+THg7pMXXDmhE7PEhprwhP6fEXnTxZeSOePkPNUp6fK3tRlBtJ+pM4nqL2K1vn5hcbq/ANyZ9Hpi8AqTpfxlH2q01Mok9hd3yv5x5m05K+TPavzW1PGW6dvUDeNLpM3G7DT+V3pN7tOF2NeuXXal/z8Oj2INgvrdEPBAd2OG+tSTuf7AJ9KOp+gqURJNdKBQod1mSjaaarTJ4FJS7Md4a90ugzt9NTpzrJ/dboddYfruvWZ12idzir4QNouZ2A8s3R+M8rP0+m5zGWRTn8mvUynB1A3SNcdJ7RX93WLunt1mTVyzur0B/4J1mU2ivxB161LfqjO30x+hM6/Kmut6y6Q/Uva7iWUfPOO00X4YV3GkXS8Ts+i3186HcZ4lIe+w8q663R/6IMzaen3Eu176vReWWudXiQRkHW6Iv3m1nU9aTO/Tr9nUIV1mYcif9DprsIv6TLV+Keqzm9GO3V1/gmhyTr/MGNrqfM7Cr+k83vTTledH4Juu6fOfy13J50mIKUartM7wfnxOl1L9riui2m7mqXz7wh91vk5SJt8aVpwYJnOjxFarcu/BVYbdbqCyCt0mRuy33V6itBtnb4mPJUun5aMMzr9QngqnSa4nQrT6VMil9B1s4ncSafXCs+s0zbyo3X6/9g6F7irpq2N7+6pV6ULSQghXUhCiNNLCHWEUIRK7rcQkhDihFCE3EMIRci1EEJURFEUopCEkE++03G+5z/nM9qL31e/td9njz3mfYwxxxxzrrVqMy87bRXF5VabPgd5ML5J/GuNN0T3hZGrtszR9XLa7cTfQDitAdF34ynYeeMjVM/m5h+Mr2V8ETpunsvRceMWrJXMc63y6Wz6hfrosp6uOdr0jtLZ7qY3UP/3Mv1s4lHGLzJfm+dz1WegcT3xn2megeIfZHwZayvjb8U/xPx/ij7c9A/1McL0SuJU0S7hsO0T8KtFR+9uYD3ltDcxX5t+O7Ep07/Xx3Tnc6j6YaZwWr+wVjLPvdh24+nYdvO/ihyaPpv1kfEC0VcYXyE5XBVtx382Pk78sf56SPzrzK8XectJyTw9Ra8tDH07/Grj85AB421ZQ5n/dcbd+HDxtzTPq/LTWgnTLr2QrdTRuJ74u5ifJ6x1M/6OOd1p+zCnR1nqw95OuzNrItNbsiZy2o6iDzL9FPXzYGO92L80xDyDseHGDdB381zPnG68DP/ZZY1ijWz+yeyPOP7TlvE1/4uq80Tju1TnScYr0A2nvRh7blySHM4wz8HEqYyPV1/NMs90LW7nGevF5qVFxm8x7uY/Tevc5aZPU9pVxvX14xrjE1X/dcbzmU/drufw3xpk+mzGV5g82+DLGT8q3Nj4GvYRLecniN7U9IWMu/M5Al9OmPw3UbntjWvhe5t/uHAX44PVV12Nb0Te1seCJA+mj2KdZbwB9t9lNWG9bPq7rLOMh8me9zPPH6KfanoVjdeZxjX1Mcg8rxJLcT07sXY2/W7WzuZfIfpo038T/zjjdqrDePPw3OMJpi8mVuk8X1e5L5hnqfRxunnuUZ4zhbEJT6qsBeZ5UPRFpn9ArMP5XKixXuO0y9BZ88/hnomNMr2XcG1h+G9gDSWc9l+IN5rnWmJW5tmVOIbp9Vj/mv9frJuM66j+nY03Y+yM9VL1Ulen/ZGYhvPsy0soTf+38uln/mXYXNOrqA5nGl+s8RpsPFj5DzP/ldhe47tEH2FcoT4caf4L0FPjA1TPcebZmr0D45eU/3jzzFWfTDS9N2e9TK+B32X609hn40nin258mXhmGLdj7NzeU/DDTR9FTFKYsbsUm2z6hYyjy1oj/tWmb6e2rDH9UvTUeBZ+V0PP6fjbwunRk/jbpl+nshoLU1Yj5lnztFHatuZ5k3nWeEvWxcbni6eTsV5mXOrstOPQR9N7oIPGH4m/u3EbfGzjI/CxjcfhYzuf68Tfz/TTCvF5bcOWBopOvy1T/QcZNySmYfw2NtlpK9U/o5xnA+Uz1vQnWWcZDxf9buOvRB9v/APzstNux5rL9PewyaZvqY8XjG9mfM1zEvtExi8pn1nmGc+8bHo1xtp1PkG2d6l5XlHaiCVWMheb/ynxrzLPpuwNmX48frjxb8LrjBuj141y/sPYnxYm7R7Muab/zt6B6R8QnxQmbVOlbWv60bIbHY27MdbGE9QnXc1/NPt9pl/NPRLGa6QjvY1HM6bmP5D4lfHF7A0Zf66PM1231orDDzF9OXoddVOdhzvP74lXm/4lPpXpK1lDma7jvaVxpuvFrqXxxmfhU7msLUWfanpn9hSc9hD2FIx/IO5h/pWsc8w/ivOpxhX4z+bvpY/lpm/D2Dnt3cSZhdG7Ydjbxl4LsyYShqeSeKPpP+ALCSd/jDWR8bn6aGuejfGBnbYFfq/pc9kvMG6itD2ddlf8IuMpxDqMd2ceNO5AvNH4Lo3FQOdzlupzpumHMQ+a3oV50HhX9hSMF4o+0nX7mv1007fTsxnuNu6hPCc4z73UhxONOxJDdtob2PcxfQ5jZFyTMTIeh94ZVxE94tX/lBzOclm3EbMy7kds2fwDCnvBb7AmMl2h09JS87+LHTa+Wni18Z0qa635TyC2bPrv7Os1cT7y2WobVyhthTA8P6Orxt3ZRzDPpur/FsYvYZ/N04E51/gBxt34DOZZ8zcv2P+tWBebvoR1sTD9+TR22PR/Ig/GOyAPxnVZB5n/eJ6P4bKGEOswfS/Fr4aZfgFrHOPmwqOMr0Qfnef+2F7j85lnjfdUnccbzyXe5bQfYXtNP4W9JON6KneqeeYzR5i+G3tJxu2IfRkfgh12nQ9iTWT6tYV9/4nsJZm+ufAS42r4zMbbq+3LXW4n8awy/W7iYOvHTvbZ+CP2DV3ufsjDxpl+Nfu8xsOEK4xfYo421oOTS42FKeslZMP0tdht068TbmV8rNrYXpiyeuIzm/8ibIJ5zlQ9u5n+FTJn+rXKp5fxYPH0NU8f5dnP9IXIgPEg1krmqZRMDjb9YtV/mOnP44MZL1YbRxi3VOx6pPlL7OObfo4+xpp+O/Eu4fSuYmTAPEcRAzHeghiI8WP4XcZPsi52Pm1Vt5nuk5PRfeNq4l9i/hOJfRmvJO5hvBFxD+fzjPBq4x2w4cZTeDnIJt7HZ79eGPo61j7Caf0onqbm2YM9QdM/ZH4yf1fVs73xLPxn86xgHI13Uf5dnM9uxLFNX8W6xmkfI45h+u6Mo/H2yqef8aX6GGj+QZyxMe7Gmtc8F2qsh5jeS/Thpj8gf2CE6bXQceMNiHGZZzfilsZPsP51nfWyudJE06uwxnHazdg/Ms8O6K959GDq0kzzbMEZG9OPJyZp3JZYhHFD4hvm/4gzVKbvwV6hcSP2Co33ZV52ubzraK3TbsSeflP3FTpr/ATztTAyeaDoTU1vznwtTD5biNBKOO3Poo+m9+EMuen1RO9q+q1K29P01the56lbPUp9Tf+EmKTpjViTGuvoaelM88zmjLvxEvaPzNOO/SOXpSPopVHGO2KHzfMNe3zGN3JWym2sSWzZ9BHYSeOpzMXGs5mLjY8j9ug6fKN2zTI+G70zbseca/7fJWNLTL+I9Y7pM8WzwpihWGWeu/F7Ta/NnGu8DL/X+Cv83k1zG39grhUm7U7YUuMfiDkYL2BPQTidldJ9661M/0b09qZfrXVER9MPZp41/WLOZrisXmpLd/McK55e5vlVZfU2/WnWs6ZfwvrC88hQ4YHm6Ys+Os/BxJ1M74hPZbxYeKR5HiFmKMx4bSgfY4Lzv58zGOafK/9tivEhyv8F4wolmmE8hf1fx4XaFfZ3FnL2yXn+m7M0xkNYtxpvogwWOJ/nlf8S120W9sv0jQux5a+U/2qn3VZzwRrzfInv5LQnsW5tlumt2Is3fp79AuHkExIvEqbtvxB/EM7ncCSfjm+M5Iyz0/bBFzLPVcJdjffBT3aekznPZv7jxdPXPM9iP42/JRZhntMZL+NbOVPq+nxKzMH8l+ADO//G2EnTX0UHjUdjJ53PY8SCzH+F7O0U039mT9b8O3Mu0fShnKt0f55MPNA8HRk74zXs+5h/MmtP13M/9npc1lX4MOY/EV0zvp75zvxfMC6bZf7qxPCFUwxNezdNhZNvrzFtYdxAH62MHyaeYP7NJKsdjYcUzjCcoPMDncy/iHiReR7iDLDL/UxnBXsaz2N/1vyDub/B/C9gJ42vYc1iPAbf1fyfUrbxSHwV8xwmPMJ4AGtM4zryOUeZfzlnokyvyTgan8o4um7XsMYUpt+2IkbnOPmBjKP5PxHPdOe5lLEzvR9jZ/yD8pzjPP9Dv5i/PTplngnCy43vVz4rjJuiy8bHqW9XO+0HxA1Mn4b9NJ6LP9M8/HaNtXCKNeHbCFOHb4gHmqcue/HmOQvfxng+92uY5wTmQafdlz0a82yJ/TTPEo1pN+N/c7bN/JexN2f6APwW4z807mcaP6E8BzvP2zknbDwNX9T4E2I95n9F8ZaRzv8QzY9jTR/KWRHPIx8zJzptPeJCxm/S1+b/DL/U9BvxS42PYK40foexNq5QfaYbV1WfzHAd6ksX5pj+ltLOMz6eM6Uu69Xi2WDmTdPnsy9vfB7+jPGTxAaNPxD/OuPd8Wc2z/nchvz43HgP9Fr0FEskFmG8DXtz5l/NGQzj+sSBhdP5Mc5BGf/IushpX1e5XYx/w780Hk0swvkMUT69TF/F/Gd8GjEi84zjzIzxs9hbl3Uk86P5x+KjmqeeCCNMf5J5zfSP9THaab9S/9xtnqs5G2Oeq9FZYXT2FcbO9JnYW6d9g7PfpndFN53PKdhV83yO/2meh/A/jVeypjD/L8yDpq/jbIzpR6vwdcYbspbfwusF8dc2bsv99MKUtRljZHpPfFHTH1OerYTTG6ckY53MM4LzwMLp/CfzoOntlbab6ReypjA+m5i88dfEhcw/ibP6pk/Cxpp+vOzMINNnaQ99iHFPVWS48afCI40/Y3/E+DjRxxkvYi3gOMaVxAec//fimWCeKSJMMv6QdYTbPonnGZi+FF/U9IbolOmbEedxnocxXsadWOObf0k6R+4YFz6neVrhq5j+T3RqS5+RZh/KeIn6oUIYnp3ZTzF9XYqxel1JnMf0O+V/tjT9aelOW+OL2Jvwfuvr+Dnmb6X6dDJeQOzS/PPUP12Nd9T9192Nj2eNbzyVtaHTNmVMjT9WuQPNcyrnCU3fkv1u4w04OypM/+zC+sL8R+HnGFdjXW/+eaKPNf941hfGnZV2kvmXUyfjr1lTOO0NnF0xvb34Zxm/LbmaZ7yE+2jM3xfbaHptYrDGT6jfVplnJGt512Ga0q4zvTtzX4tM31tzfYVwWndoXBobf6p5qrnxJOlRS+MW7JsIp/MPnCc0rs6eqfPcWvQupu/OGtD0u5Q27qkZKdzTPP9gvJz/KcyD5l+HPTTPAuyh6b+rLUNMn0TM3PgP9M75DFD/jDTWqwtLo40/Vn3GGb/MfOe0q4nNGu/PuSPzvMd+qPdbHxWOuMFl+phinnXsWRtXZX/E+WxPXM74DXTT9Ydxgfn/QfzNPFsSfzPej3Wi8U3EY82/G2e5jf8QXmv8AAvIrTL/ZPTUuCG+jfHjnEt3/z+OnyM6NnN3bKkw+cyQT9vS+BNi78LUeThnfU2vxZkE4zeJszn//pxBMv6Ouc+4K887MX8n9NH0XVlrGL+ucgeapxX7nsbnooPGZ7DeN/+vnOU2HsQaJPJBtszfA3vr+v+Bv2p6e8ba/K8q7UTjHVW3ScafSn6mmP9Pxtd4DffOmOcLzgCb3k++1hyXdQbxGdO7FeKlz4m+1Dwno6fOpw4xdvOfyvki06fjr0bdZBNKW3uuIT5j/C3nTITT2Uhsr/F9zJXGn6ktzc1/OmtJ4WQTVLf25mmqj47mWUUsznRezdbF9F+YN43PQ3/NsxH6a3p32Y2+xuNY77usi2VDBpneF/112mbor/Fe7HmZZ4bs3kjjYzg3aJ73tMYfa/p/8V1Nn8/+tenncs7E9DeS/fL8K7mdalyVcq0LxypmNd30mzlfZHwS9zC6/muYp01fyRzq/Beip8bdWUfbPuyEzjrtoeqrNeYZxdxq3IfzhMat0d9trJvc6yucfEti5qavUh82MP1WzpaYvgh/1fg55lnjL9lPEU7nDRhr039TP3R0Phuz12m8J2tP4wM5P2Z8M+tup72B2J1xM330NU8LYnemf8eZYdNrF+6lOqEQs/1AdRhknhPYUzOej60xPg0bbtyVfS7n35U1qfH9rEmN53G20Px3EXcSTm/Rk0841TxnEDMx3pw1qfuHN7POctoTpcvzTP8Nm+y1wyPEfEx/nbWn85nN/apRH3TZ+Zyj8Vpr/CDnRVv6DDz3Txn3xY8yPpr9MuF0LwnnFox/EW4unO515Z5i8zfVj23Nc5L6qqOxHkFS6mw8rHAe4C7G1/QN9NHd+A72xZznB5wfM30HzgAb1yHOYJ5f2F8x/SjWpKZ/jl4bb6C2DzPPtuyJmP4pMT23pXEhLrQP9TTPO5wdctpN2Ms2/pM1vvu5LesX51Odec1pDyfuZ/pBqsNMp92GuJDx+/jGxl2VzxLz78U9qqZvr4/VxvOZZ9f3lT63dfyQe2qEU3yAs2Gmd2Fvy7gq5xDMM4BxFE5nitjPMv1g2cz2xo9ordHJeHPiQs7nGMbO9H2ZZ01/QuPe0/QjOVti3E8/9jN+jXnF+EPuZ3TaLdgHMd6LsTN+RvkMcz03ZP3itJdzb5R5tia+ZzyTezGMv8QmG+uxAaXxTqukpYnG7xNDMM8jjJ3x7syz5pnMPGv6FOIMvkdjhnRzpus2lXMm5tlD9VzgtE9ojlhi3JE1jrGSllYZb4tNdtpe6K/30B8TXmv6O9hn4/ro73aeL/CvjJ/CvzIeIBzn81uzbhU9jTWxXOPh+NLCaY+es75Ou1If7U2/j30x08er/p1Nv5NzR6YvYi52ni2ILZhnAc/ZM/6YM73GfQu6Vg1f2vQByIDz3Fx2cojxfsyPxtcTczB+BF02riH+kcYf4vd67XY7sQjTa4tntPET7I8bd2XvwH01Hfkx/XT2yo0ncm7QeC4+m/GWmpsmuv7Xs3dj+kbIknFN7rs0z0/EoEy/Qzwzjfci9mh8IPEN89dlnRX307GHbp4q7Jsbt2YuMP8dyJhxJXvl5vma9Zfp/SV8az1evbH/23uPGPkxPqcwl82XP1whejrLig0RTnF74pDmX6iPlqZfwTlS8+/LuTXzXM0+jvFs4pDm2Ymz4qavY4/V+En8OuNzuc/UcYDRyJjL+gz7Evlwb4jxGPbKnXYqfrv52+OrWH9Pxm83z/ecD/S9xq8VzpKdw5lV+wn3IG/m35Mzb8ZNua/E+DDWd67D4azvXO5s+ZATjPXYzNIU87TDzhg/yLrbuLPKmuU8X8H3M/4Pdsa4S+H880aqwwLTP2a/z3g1e+7Gx7Dnbtyc+Jjx3viHLncoZx1N/4L4mOnX4f+b3hP/sJXPk+ijunDaS2UdJ5ziY5zt8Z7+x+zFmz6EvT+nvZyzVcY/sb5zPidxxsb8erVfqYvp3bjvz/z/5ZkkpjfTRy/jGdgX48XsGRm/x7OFIr7HHq7pA3n2sstqI1sdceYD2JtwWTXwuxyr78N5G6f9mfPG5unC+s703uzFm/4NZypMf4Lz56ZfINs70fQm9JXprxFPM/0j7JHxPGQyeCRjs0y/kH150zfl3iLTz8XOOFZ2H36F6PifzVnrRbvwD82/HXON6ZO4l8T81+FL7GCfihi1cDorwpgaX4+fb56NOTtn/D3ja3wW8WrzNyzo5lOccTXPftgK49bYCuOvWOM77W+cezQ+jn184XQGlXNTxiV8fvOcwz25zqczcX7v2d3DXGP6x9w7ZjyIc61Ou5a1vOkb4iuafoDszGjjV/APXe4t3OPgvYwZ6pMJTttd+3QTzX+08p9i/nd535jpw1jrGW9duNfyV3Tf9DaMr/EqYjXOvzpredNflM+2wngp8RmXVUHMzfzdeBt+a8e45LPVNn6L+wiEU7ncE2rclr0n8zxa8JH2Fm5hnkHYf/N05flCxgtUz47muQdfwliv5yp1Ns8F3K9t+sHouPHPnFEXpv798SfNf6f0tJ/xJ5yPMq6qj0HGLdVvQ5x2O/GPcJ7VebeHeXZWzGS08anEe82zD36j8UWs5c1TyVka08/hLI3py+kT0//BOQ3jnziLbnwhPqTxW8TijG/nXkWv/afp/pFZznNj9No8d7DH4bYsUH2WmqcD6z7zHCIZW2W6XiFVWmNcoY91xntiq9tYtpVPhXFvxlo4nX3ijI1xL9byxiWV1cK4ueaalsZdpAutnM9p7Dkav13oz4uI15n+HjEc446cV3c+hzLvG6+U/PQ0TwvW6aav4ayscRvOyAmneA4xc9PPZE1hvAXzvvPpKsIw46/ZazbPROye/YqxrPHNM5/7FJx/R/xA81dio+wPzCJma/pd+ITGY4nZOp+rhKcYv8belnn6sd43vRm23fR/s89lPIt7+Y2P0/jOM//PsoeLjF9mTjfPUGLvpl/MvqTxu/SdcSPuQzH/zpzbaZvpw1n7Cyc/UP1fYfoSPVu2sfF/xdPcPDtpj6OF6buyT+SzHxXydVuZfgR+oDB9+CJrB9P7sXZwPk9xPsGx5RWsI8x/M3EA86zlPI/TPkyc1vTaxHmM5xOfNz6dM+3m74EMOM/buI9MmHltmp4XNNo8v+PrOu2bjLVxXdb75mmodk00foV4rPG/iOGY/0L2mo3bSC9mmOdx5jL7Qgs5E+v63Cv+BebfA5/NuJb0a4nxj/gexlNU7nLneSvzuOnLsPNRN9mQtcbvo7ftvJZX/rWFU5xHHVBh+jvovulN2Ys3/hTdN74K3TceU3imzb2cPTC9mvJs5TwrWD8aXyh6J+NreQei72n9gnNBTlsL+2/8PDF842Ox/057I/Jg+iXcR2x8SmHtfIB4+pq+FTEHpz2gcO9Ddcn2qaZfih9i/h686930DXiegOmbi2e4MWHvEebpzL0PwozjUJ5/Zfrh6IL591CCCaZfybl6YWRvO/a1Te+ptDONz0bfnfYYnmlm+iaqz6KgM+8bzyf2a/wnsmH+k5AN07tIbleb3lAfa4170JgdvW4ihi+cnt1H3F443QNO3N74IOTBeFP8E+OneMag8Tb4e8b9uX/ceBjn+oxPZG/OZXXjbK3rsH/B336PecH8L3Ifk/GBrAeNH+M+JmMCOnHf62jmC9NHEAM3PpX5wmU9T/zQ9Dk8n9D0DdhTM30JPqHxInxC85wl+RlhvEyDOcq4D/utxtW4v8lpb+FZPcZjCzpbRx8TzH8i++nGXThfbf7DsC3Gt2FbjH/knIDvc6nJfamm98KHdD6nc27Q9BmcBXWf76VxX2KepZy7Ns9u2ndYYfpszTWrjaezR2Ce04lBGW/PPOs+P5KA2k7e9yQeZbw351uEyed/OE9orFe/lZoaX4EPaf7uuvGjpekvID+m98evMH0g86/pr7A3ZPwD8UnjXYhPmr8K96KafihnnEwfipyYPot9XtN/JE5lXIt1ovGtxJbNfz17BKbfgtw6xjKCeIJ53idWYFyPWIFxLaUd5bT/K50da/x04fzqYuYg8+/J3r1wihuwZ+37EA/C/3Tas8Q/1fyPIDPGy7h31Twv4XOa3oQ5yHkuZg4yva9s4CLzLxXPUuPTiA+Y/1juUzb9Ot4n6OfMdCg863ILfE7z/El8qb3vK0QehJPusNYw/T1iSqYPUJ2bG49lf1AYm/krMQHT53GezWlfZh4xXsKzmM2j6V3PdfK5C2LU9tlGsD9oeiPOexv/wnNmnE8z7o8z7l94ltdN3Evu5yOtYC/JPEPUb4OcT1fshunPoi8+51CDGGbwc67Y/McVnv/ZWro50vTnOcth/v/lvLHpJyj/u01fi39i+tnsQQgzRt8SQzCeShzAeDDPUXTaTiprntOuxp80/g/+hnk6EEs0/XHhVc7nzoIdPkj5rDXPh8SFdo7na8kOGG+t+GFt4XQWmudkmn5UIX44Bxkwz/7sTQhTVk3ukTT/IdqbaGueReiC6ZdxJsf4S+Zm83yGHXA+c9F90w/XePU2Pop7z43nFOzbMTyjwPSjiSE4/0X6GOw8Z+JPGk/RR9wb+47yHOW09bi/xriKbPXdzuc/6LXxcGIFxg8Xnjf7GucBTJ9JXMb51OdZmsafMy+Y5wh0yvft/kQs0XV7kPs4zHMtZ8iNl7BP4XxOJkZk/pasK83zPmt2xw3OY8/C/Btwv5V5HuRcq3F1zmiZZwwy0MHxdp5FI5zWI8SRjM/FxzDPPxh34XQ+kzPM5jmKNYJ5nmNv0fQ/uO/e8+BTrC+cthZny42noe/mv5f1o/Ppp/r0M/0Axtr4v4V9vR04U2d6c864Ou0OrOXjnl/2p1zWRexPmb8q5x6NS+wpOO0D2HbjZpKH8cbHqKwJ5n+bsTa+HH8g6oxtN27D/VbRLnxI42OZ982zIzEE4yOJIbieH6qeS81/D/Ei47E8u8/8/+TZI+bvzH7TLo6DMb8bV3I20vhU7ncWTnqntjQ2HsR5D+PvWC+YfykhZNMfYn4Xxs4/jE9oPAk7Y/5/4VfHXo8+ejkthL7Gu/DcSPskr7E2dNofsefGb3OG2fzV9DHY+CLOLZtnPntMxvvIvo0wTy/2kkzfiXMgxnqMemmseeoSOzJ9GHtGxhPQceM3iQ8I07dzeJer1+YPsbdonv/BB3KeX0pWZxh/xdktp53JfVjm/5RzPqbvjT/mPeg63Gtg+gKe6+v7QfpyLt15/s69BuY5o/Aspg/QX+OrePZIx3jOs8ZXOO3Psp9ifBVrBOOfiN0Ik/9NPDfM9KOI85venbWAcNqHUn26mP4b+0Hm/4S523jngo/xI2e6TL+TtYDxkfh1xo2lX32N69Auy8ZBrAVcVlviBubZnziS8Tjsm+1wM+5fMH9r5nfz7MOcbtxOPw53W65gbWj8IfFh4604B+J8FnKO3WknEyMyz848R848n7I/aJ6+PEfO9G/Ra9Orc4+DcR/14SLz9OYeauN3eaaBeWprPbjK9Mm0MdrCPbOmd0Lfd/U4ou/GP+K/CafYDme9TN9Bz4trbNy/cM9pT+LG5u/NXG+eAzgLZPqOyIPxpsiDcRvuhfGebAXPkXPaJewbCqc5nbWAY3fj8fPNM5z1kXlW4dsbf8m6zzzPcXba+BaeayGMbF+D7pv+gmzFCNfnMmUwKujs9Zj+DrJifA3PvjY+unBO4LjCvZPtuUfMPLtw9sB5NsSHN16sirxgnhnca296dXx442bsFxuvFP8c8z/Bs/X8fN39ZNsXmL6G+d39sA3+vOkf4/8ZP8t5P+d5CXFC49mSq9JuPgPGs8WE03PtuBdJOJ114Z2f5vkA3Tduyhkh89hc423ovUJz9PqCZSW9DiI9iKeGgtbVShv5CZq8UYVfLtXzOCa/Vap7f9U6esLx5qUrSg2S1W6IRusdCFVLW+vbUH1vlN5cQiq9qDKd3/hI8lc74Zp645BeE6Gym5Rqq8Uj9fagTUp6mVZ6rlwt0ZuWttPoJ9ksbaCcU1Q2/V6rtG1pz/T2H95MQUfsL1qFytm2dLtyrpW4NkzvxdlH3zUD610Vm4hCLevpf/5909Jmukj/SJ63iOuknRXFYsS1UX6DRKLTD41KdZWqirayquU5T6no80uEtFQvtU3cw0t6nQSvXdT7JiofmKKe0jPmO7P/JfYN0wt9NFyq5Mapok3T57ZMvSkJmWsqS4JP1/MClD3SbxRBRepnwVNushvpX0tRwI1SBSrHPaVCv6hGw/KQtVeq/K2KUK58WpAJbZ/oDdMv2yQuzWzpG+Xr5ZKq347KvalwBwlBPZ7QlEOx6S+dWSV1Mi8ryp2Vv1EbGRCXVSvlmI78iYvak+4gcVURZTP92kKoRt4QVffzF45ts0nKT91Nw9bY7TpKeTfJN+imnBunoaectOAVqq/21HQ9oNLTddWPOSdyBzVR6RuJbwtxx2DXSi/Kyb831kiRXxX9rSEBCZGgf7IopQNtCW2l/uyfNzxFbaZv9VLrqqhNjFAWmFx+8/SJXKQ3mSSuWhoJ+jyPG5wVqZ+baQwZpTqJvrF4Ni5VXvmsxnkHMquSZDtrFjpSV5Qq6f3zZMBnHf2vnEqCJ6tRSK5iDaWhe6unytGNZK9HkqT0mSc3r0qS//p5/aQuY0ArJJZV9faZTZQK/UCX6HR+y42spmpukfJtoxy2SoNQXVyUUKO0ub7X02cMIKmq6n9FEoTGeX52LZJvaJXYLL15t16O3ZhOK7Mg7q38KTtFtVI9yC23hvZG90d/5UHeUn+xIHR+NfcKeeS2Z8GjTFSVOmRR0TycZwpz0fcoVYP1IrJhfjKWOOhZlA9x3FR5ZHUmHbXacX2dsX25rllYq5Uqf3xB4/ZtlfaJJ5Q31zsLXnVxb6q2M2rUjF7kX3tRyR+O+rpyXzZ2+jqqa4XK06MsU93CBlZTuTX1S0P9hnXOudG3WShraFTo29pCtJbf6Ms8urmMUN8GFvkWqXbY1zAPOc/gwlxUSX2jd1QvfUnt5UlebmY26NWlMWgmg1SetlJAIjUcLgYpC2/mySY63RSexKKqNTZPJ1rSmj9/z8NNh6oS30xLnV4tDVS2XTWSINX0kOaG82tV6XnacHFu2daVVSc3l3xzJ4dwMNRZ5Kll7jzUAI3PAs50g6AyVHnocseifDkXZhL6pqbyr6qUKQAtWvWkWChGWBzsC4LK70z+WViofwP9Xvn5y2rv7PQuMQZzs2RE6KEslPVSHtSMYc/tyuOSBziGNStEbgGqzpDWdJ/V1t9qSYhidOpYLIrikMWNz2zWaognVDbbTOYixDKXgrrkXMJkkS+9Hd/5i1owy9LmPHMy1zB+9VPq+kk0N0y0rFq5zGwia6fxyeOeBRZZyD2D0QulzLNALjHXLstIWQ6yKxHKWx7JpknV89yFOmCEwoiRP6Ujpdk08Z1+zZLDv7rrzVlW0nKvMoZZfkPBmRXzb9DQijyrIX/8QlnIeZb9nKIo0cXRyiObTTe9mP+Rkyacp1+XTF20kaqUOwnljW6g2SFAZYVA/JtI2LK6lDuNGYYKZpufhbea8shikjsiW6DcBdAqn35DxY+pUsOOTM6TvBFFnDFo2abmcug6ZkpSx6BWtxLSVNQzl0Q35e5CsLIblHPOtrtB6grsYsxfdfPzdtL/ygUzVbMjQqKwUDHh5v4P+SvbuGy3cmdlKxUjkmUfjU92a8qbyvodnhlja0eBlJG7h7yzz4QEU27kw/eixaq+XgJJk6UqSxBdlG1ZcOb8m8iDjGmMbqJmIdNoMR2LMGQ9y6mR6siFwS9PQ1kK82fkl60tAxwSne0VgwWupimY39GgnA7Xh5R5kCs8LMWWRitjEsyWHI7cx+XZJgQwW/8t7a2SpolFObshlIooI26IBzY4zxR5VGln1v/cU+UpM5dOXmU9rrzmHY2oNnliZVNXw1o2idlfyh2djR6GKQtQ7oA8ADEJheqXm1ujVLmKIrTnmfWYuvtd+m5tljFGKGea1Thb/OjNLOpIV3ZBQq1QjhgLtWbRuyqKWynWG8oYbKxEtgJljc8eLBNBbhVZVt47W1kouhNWt9iPZfkrmo9GUjkSPco5LPsLZbUvo2hfVCnmqWxwQh6zGcguUQpumx+jQoOie5HtXBPkIq+SsIthFLJURuNzk3PP09jKa+aqxgu588gmrdjXUZdia1kXlGfQsmYznrmN0U66FqsTdOaVsA9YjWh5NoLlMnLv5SVDOG/p9qhUI+qWJShmwiwh4bTSOsQ0C17lyvfUPl5CY9Gq/BPCHbwqMbGFsQn1z0pNw1HqPChlvzRPZOl9OmnAYzqkErGwyz545o0hyo5MbgZNAGEKkbpcg3JTWSaHA5hjErGULYtI/scyjvzyPMHAkipzlDu1RnJw8oI0BIHakC64G683VmXDmjljavirLsUMlfshRCz3TXntkKcYysI+hF8PF84aKhz9FSWSunL8hxqhA7Malu1vLBfpBLo9pCwkPryFLF+hPRrwX8juOwWdqAyeZtF7iW6PWSssa67Yhn/xSP46B5ImD1I0mYblGaRsy/F6yoYx82SBK/rkRS3LxjfTsndXdl3CmdEt8n9ZAGWbBH8OEuXcwunIA4Y9yPkjyvjyoa3ZCmffE/+wPD8U1xF/xWH5cm/mMnJKOR7LP1KPT+aO97/42YxAHtVy6rzSiuVjeSYMHyTbvqhpoLApxV7Jeh+L6ZCcmPezrxveb9G2RI9W3rlQtf6oSkxdZStVVLpIhQCHach9W7afZYVlHVC2TJG6XMfMn81JrC6zq5nVonYKA1BSjEZoBT1ZVtnyujCXR/QrbHkusfJ/F6l1epBttgtkiaiUVau4Oo9gVnGCQySLTkoWWxSkuFDL1Gzm83Kmcs0nKvgZ+cdhM2JKjapnk57Ljk7OJWSLS365PBqWPfTysOeFQXnqyTatbKvC1QoBKk+eZbcvfiuKGL9VTlmsuj+kyTGnycOXuaLfspOY1Z/OD48ip8jllie93IcEGMrCkx3vqGcIf9jccq3DbOSxyYv4oumo/HyJasvZlvWdGQ2tXMdP98tfj4mwmHl5CMtFh02LVWHWknJYK9u67MNl/Q2NzIMQvn5ZW6PaIfflusSv4a2XO6bcDdiOLO95MNDr6Gi4ysKXOxFdL7t91Dr0vOx5l9cpMbWGHS1P80UPKMrOa9gW63sxxDdmgSy2MQsUe7ZotfIclFdlZata+fBSjZQOQYSuZcNY+QrkHaJHIt8cA8Jzjmk7t0kj/gsJPuHOiPXTcFm8ie+XFZxc8/iVlbIY64gZpGjBiwoT37JQhiNQ9nKL66sQ/rwmzLIQDlNZfsojFwqT1T1MRPQpM3TZvucxjYVIKFvZ/oZ/GCqV562ixxplxWiEhJXXy2E8NVILlmV1y51ftmbYPH762p0fyvTXUF0xFlq0E+Xq5v9lA1+cfmMSiMqXF44hGCFcxSV+liaouUNzF4Ua5PIyR3Rd2QsM2xdLs1jxFRW2+C0PdHG4WBeWl+pl5Sr/j37Czc91CMei6IVmhc9r09Tby79Rb1/5RnLpoxNi9bil3suut9mXWmmUDtQ1QUybK2i5u/D+utrpYtNRb7kvfSisN9KXzmQbl1sc2d4X7SBdYxSNPsr7Z7ySfhfRDtbVS9dHuvitiTa1SK+3/qfX8cdFfvuK51+6SL8zR+zYPjf+Wq/vf1yvbX9ak/0P2oKZrdfcRx6D0tZkfh39PezOK4/BHP1k1054Z128ap9X2E8TzzNKy6v6KWes3glPGYOV7x70jf7SB2NGpzcHpa0b6kX7yJe/u7hOrygvNj6n6y+7g+xUba+9zvH6Tt9RfrTtYn0fJ/qLqjv91db9eiJ7av5+gP9SxlW6Gms/4HPxb3CK0nOrDTvNHB3wRX+SlnqzL/e+eB/RRbtoK+1iS4HX/EOjD6G9wCsRjs20Yb0yTV2S+oy2scP1qPK9hOMOloHWutgx/VI/Pu7X6c/S9asufh+lfuzOMSCOebLFTH7Skwt10Tebq6OGXKljbGkrKedxOhvGbu9EfW8j2eCiDrSHPGqr7Wxea+hLD4tvKm1xGsYp9RvHXj0u9A91jX48me1gt+FBpa2qMT1EQj+AY2WMv2jtJcgbqP7QkBPa+Yz4DubYnb7Qb8jYv/SXsWbQq4zTdr/r8pl4u+rv9pb1p0Sv0J46MkKdSF9V7Trtdo0V8shtQaYzBjpJs34MZvD6Bg32ffrLdzW/1Ilb6sQT445uHWT9QoboczbI6X++01b0TtmX3lW/ogNBe0350j98p//4y/WI6Is9rt97bAdyy6HbRF8O1XWm6qGuSmNM/1Uo3amiscX/oxTyLX3/VYaCcbjA8hd5pDppIKHVEB+7ANQNGaYO6Dsy/qI6m3Hqr+sXXYwhF7/vaT2J9pAvY3+05Pln8d6lfJtYB85SWfRrpEcX6Sv6fyh9pnq+ca/KdH70F2NPn19SGCdkkUMOYau6Of3Ztjv0J3VBFjrYfqFLlP3oKMmS6vMNx68tl/Duy/FOjqyJjuyvs17xtzE6r06mHfAx5mOcr+4kS/m+yVEW7LF47tRFGdRxFbfGSOewP8jC970V41WjqSv2iP6jDuRDfrqTtnSaLp3YLJ3tvMfpdyVL/XChxjTkhXTI03u6vuPx0tyiqXp8IV2gTfBw3AI7iJ0P+Q17ga3Ann3kvkBfjrBtiXmGOiE71ONJHtvLXpvK2FcX8h58/NVTMvRKeZWhvyFHtJF5ib59Wmmwvdh66kHe1I28Oyjj4oUd3sm8yBfl1lZ6bTuWXpA+InscK9nT+egkccrnUM+LzEW7uY/qauyWicDm+KPK6GTxzpawh31/TdetMjYNPRdSJvWkb97QhR0/VoI4XIP2ksp/m/lM1zvCB40p2zP64QSO+MGji7GFTv0+EB/1Y9yZo7G7XDqhX2p0n3TT44+MY1/gvU/0Sci76sVFm/kdfXwVvZb9ouzJSvuAZRVbQT70d8zV2O2dxIds8lvoMr/fo3z6CbfjVizJ6ZW6Qi+oe9SHeZV6v6U8Juv6WtdKl9laeo1dRTfJX3d9pLyftR2mX/qrAOqPjUU2kTHsHemgpzlc3+dYDklH/0/Q9aQufIxpltnXdNG35MM8gKw8KxrjicxhJ9FT6s7FnEV+Md6kG6i6Pau2h5xhG9uIjszwO5i/2BqujW0PqEe0Gxs/XDyMKTJ+m/KjPPgpi3bTF5tpng3bSJt1B2lqUzfL0ePajLpf1yTJ2Bnqy2g/V+KnPcr7IV3Ur1Pf3GeMC/25i+Y2+j38sy3VGGwB8yXzI34JdQz/TKZ5va0JORgvfeiivA/XdaQ6BRtMX97Cq1YsB+gbtuJBt585Cf1FX2gzcwV85I2vFnk/Zv6lPHpThng2vgavdws77fkAXvJYJgXGVuGn8FtHKSO/0Z/wM9fG9RR+kMp5nlvEdSHr1JO5E5sL/yHcjoEcSMc34bZp0Ziz6ZeZ+k7etL2nrv0Kc/DPx+W8Lj8+1wObAC+yP0v9Mls8i2zvaRP6pdP46+d3bD9tJi3zWNKJgkyjq3vKliH7XTXI6A96Efb0VI5+ynFEHpATxj7mZvJkviFP7DNygJxsb1832kCdsWnYMOrJOIQeMX70A2P4HLYMfdIV8y8XY8RffG3+3iG+H2R3Rthe6fRmqgPzHdfDupBDxoE64V+hc9DCx0I/qVPyL/TbDnJW7tG8jOzg68Zvz9yQbTm+jU52r9ch7MRTPP7WdaLepA1fRU9RT7IXc9qiO5WX6k2e5I+sUnd0lrr35zEL4h/N48qGSQ/v0DyjiQT9ONrtvF/1gxfM3Byyzfgyd/O9OH/rNHDpJF2Pmw8dQd5iHkOf6S9kgDkcm0Zf0ZZKNRrfJeQ97CrrDvJ6SbQ/5PDQT9hk/jKfYsfewEZYB5CzsJd1NAcyhpFnB9kI5Adfhj6kn7io+0T7uuR7nNL9Q5e25Esbaw2KXcSnCltKfrOUpoEaFusFLtrJXE29GUPqHbJAeeE78B2diHqGnZiiPMO+tbE9TesHjRXjzG8HSqmaSHamWIYP1hoxfMTlyoM6dLd9vUNX+IsD1LiHVTcwNhG5iLmJ+YB2hz1FXqg7fYc8UYekZ/+PjaZ9YdOCho2nraFHv3BLkOU0ZIn8o19Iy/zKPJPmUskhv8dv4X8RWWAeWo299NqAemO/KCvs2WG6sL8xD5MPbWRdhW3QU6RKjeS0jFF+f8re0X/YotDFK2SfTnSfY6dCfqlbLw0sdaNs/G/qRxnUg7Ubuh1zfayxWWt2VbroZ/o4fFUu+gP7ST9TBjpDGV943sWO4buGr/OqrvrWnbAFsd5MdlKKQT34vp1k+AKtL7bX3yXaM41y+Ttf5WJf+Y5NCxuIvWU8pqsPmEORZa6Ipdzt9Rt89FGaj10eY6FT9aU+tg2sB2gL9cY+QDtO/QuNtuFrYpP5nbT0Gb590AfJHoYN7SF57qAr1rTYtMvlBzA+dVUn5IZ5k+/Y/fBF6Z+i/WfxGH3PHIxMnKu6hT9LOybp+/Vq/zPCi7W2YH4hH/xX2sDY04ZzefyVeHdlLvM1gL70fIC+EWNgPXWEBIT11HPqTOaMR12n0DnqHfKbbF/B5tJefLrT9f1N7KXHIuZu8BL5saSjvLDbxNVi/YnsMW4xdxCzoV9jnos5ljgKaYaobTeIxjoj9POnwth0V2TvVG4DzF263l8JfxM6PkjUBbuT5m71wxyl30X2WHeXlnpKF5vLzsKDjsLzltYOC6UIk+n/v/n5+LmRJzEZ8P0a/7nYP9k5+rGR7cXVyh+9Q19vliKGjiM7L+v3WBfSNsaiM36h1iA7S1/GYAMsE2fIdsHL/ILc9tDigH5hfFjP41NQH2Q8xizqcYfm1rAxjLVc2dK1klvGMPnLyq+9+iL8Z8aHtc0/1LiJkr2Ic0wrxBtmFWKUsVaNdQtjqrctrvedsMuku9frV2hha6h3GhPNK8xzyMAB9kuQYfoJe0mbBkoXGQt0K+ZZ5CDGmzmSvtxDHRJ1IT1lUgfKw0enPOQi9ZkEJ9ZeSeYte6xxSIvM8hcfnPU+Zd4uZ153NJXuVZ3o4114BbrHFf+YNUAn6dimyqu1HMr6kq9msg37yO5c41hVxE+inREHY31D+ejqSGV4ndcs1GGAfMCI4YRtod11lT/6fbTyQL/Re8aa9v+qoHZRZy6RTMU65hCVgc+BTxbjyth8ozmJeCMX7fun7VTYquhb5tMYI+ImIQu0hTpAJ673wN/i3MXYFf3MmqOFMmfdhG+FPaAe9OfjuluHeAMX9aGPiEfTR6wD8OmZj0I/wwZGPIV8wo+I+Sri6tizm4k1On67fv6yzIWPTd4hd2H7aTt/Ux9foTi4/X5s32Hq46/vli/m9XH4AMgSF+niL79zRf8jw/Q5Nph1AXXBdlCXk5TvbpKpWGNThzc09lH3mA/xQ5k3qctG8gvRw9DrYvwo+RPOO8onzoJuH84dvc5rqezAN1pDhr4ztmH/sAvgTWQ/zym0I/JH5vl9geaG524r+6/Jx/bfk6VPV/EIYwXcaHuPmIPcJnjO0HiwT4GNoB0N1LcnioZe3m/dDBnHBjDfho9EfLaX8meNgi/EHIoc4hswt4euhMyQf/iO1LWe7DEyFzqLnxvydqX0HBvN+qiF+FaIRvwBexVyspUCQ6sl38gHZeL/M8/MVL3uVzr6E75aGqtYx9NnT+kv+y7UAVuFnsb8EfaCgx/wHqn2zVFdov+pe/QF9QwZpG3kxRwWcyo6BB99yDqAelMnyqFe4QdQF/JHj/i7nX3yQ9inEfNnmpOwP6Fn8ER94LtSctTbPljE2xpqHkIm6b8RuqJvo+5viablYelW5lKN/2XeT8HvIM+Lbs2Ycli706/kz14R+cccQH7YifBj2YOCDzlIsVD3bcwjtKet7APtGa9ysVHsJ90ufbtGCT6QT/uO+G7U9YX7JnwYZBz5QZYDx9qFeWiUrmXXZvmmvFjb9lE54b+8KmclfPvUhxpb2oLNos7oN+uNQ60rEROhbcRlaCf7VtiDiHPEeNBu8gkfgbUN68awT/QFPKzH4eGuPL4TD+f7WarreYqvhe+XYknS4bCXyW9WfYeL1uMa6ZXmdsrFzoU/E3aY+YLx2e3yPBfE3mn4h8kPlD+QYlL+HrGWsGvkzXjhNzJezO3Id4wFaZnnUqyr4AsQX40+QIZvts5y6ek06+UYn4r5jTgDe6RhGyiXvcCwibQj5IB6RYwVHXqIW4QLv1M+7aV85jxiVaOlw4wxNjdiN3fdVI4Zhi38WvNzSx4dq7Lx0/BJYg2eYjGyNdNkbCLGRb8R471WBbGmi9hupEPPkYfod67kS6vMvhpHYsLwIlffGv/b+oNvC28dxQRiLy3WvdS1qujhk4YvgbzG/BW+oJ56VRqjK2KY7fCdPH4RW3qeQ26O9SD7jNnulg181PBBQ96v1pz0meT6CelSH3Vw+MPEgUjDvhVprlO/U1fifWGv8LlirqJ+tTVRPujxjPmii3WKNvSXXSjGK05Tv62QnUJG+R7+FNdD7ndk/w8JIW2hX6LuEZ+PPf/ifk/E57Hpl7HvpzJYd6W9YNs92oYPGnM0PihYT0ZYP8YRY2HM8DPOUx9g4+JsAn4s9m6EZOacR7IMcfUkhux5kLpQD+Qp1t/Us7ECb+cXYofYcOw7PPQrfTRaEzG+xmPUyekYD+qAncEOFGPOx6pcxo9bwvTEydKhqhz+InPqJRrniG3Qd2tld/bmdW3yy5jjsIWxzqJfsSuXYCfYW9RmXcgt9UefY/6hbdiLFKPFBrjujLdUcL3txLZjC2lHaqfHL5294HEhXhfznT4PuY7YEvGyWHNPlTzEuBG/DIwOgPF/sKNRD+qNf08+NXlcsC76car9ceoRsVf2p8njRflh5EG7S9cphuH6k1/EAiJWhm2K+TH0agf77fxGubW8Dxu2m8V4xM+inad5nV7Nv2FHmklHVqpvInaHPsS+UegdMeeYr7GRzO/4dbGOHKx8w88fJRwxOcaA8mIOOYszMbatbxXij8wLj6r+e6ku8FI+7WLvmr1w2tRHaW/2mRrqxvmfiD8VY4d/lx3yDp+RPVr0DH76JOY3xuZg+Y2x7x/nGeBBZot+LXvk9AP6VvSRwubQN6+onnNVcNgMysPfjPMRP6mdL2kMhqpS3b2HiT0P/4HvdXTV1cG/t2Vb75DPprc6rbcZyEVxX4O9nDgLhK36y55yYW2LHUQ3iBljP1op3hC6yT4OeYW9oO20hdg6eh3zK2XT78hurGNin4S2cp0tv4Tf6I9oE+2j38JG8dttales8yJeEvuWYYebqo60GZmBd6XsSayVyKMej8bmXJL6vCib2FBk6O+x6fO1p9VAa+7kj6gtYQtirRRzOPRLNWcVz4dRx2flC0SsgotxYC5gDGK/OvasuegvPZkr6RU4xQCpH+tkyx4xQMaIdlQV5uzWiZIf+p0LWxw2GHkuxrHjLEb03wfSZfyLC9QfT0t+ztU1XNet+s6aI9Y9C8X/s/0HfPY0DxV+f0i+NbKCvoy134B9HCyZjZg08T7mOPxgbGz4whP0Q3O1gTFHvxi7KZK/WIczFvgx5AFPrH3ChvB3J/HHXgyyTd2xER1FRz+K8o8O1tX1iiZe2oPNSPFA/BKPE3Wj/szD+bkamQfZivl+d8la7HtzoSO0jzYwduHrnuv5JdaAE3Q9U+jr9wp7hDEunEHjnMFp2qvBLlFv1s2xNtxQV/j+f18L0vd17C9RbswF1CniOOhCfQlEzDfUi76kvott39P62Gv7BercNd7fZcxD97hqScCgE1OJuY/9sOSPyq8dJUMWsZv/T+f47XzJ2zk8mtPycaXwRO1HNnQ8JuI8zKXgQbbt1JE+KOZVhXMsqkuXkXlu5XfSwUv8lPQRH0aelnovIuYGPRmy9KH6IPZDoBV9m+aaiyPWXlzbpD6zfCADVXVWIOIhxP7o87CfsScTa9uXdZ2gNm0vv428OddK3swjfOdcTvRtxHL01r9UH/Q94gohP2GX0/rNMlnsJ+Y49kLjHBY6gr2NefBqZbLTXVqD2H8n36Eaf2Kxzxfi1KxBsWcxt9JG8ow2xpxAmburfXwvxmjDtif76nNv4MXq8MDskcX+GfLxd3mP85x6alSKt8DPeGO/8ZEo4yt16Isa5/PUhlhzHf541rOzdMV8FXsb6AF+3e7iIR/qSD/hCzFHxbgxhnHGjvZGf/Ib9o54XqzdoLHfkPxKx9j+vu/Js3P4nb3tWOdy1iRiXswLb9u+Rhwh/IbiGddtvTfCGEc+HKIurks466S3pyQZIX5ymNbzpMGHCP3GfsSamusL6eTximmH7U26pL4NH5T+u0/jfKP2QhgLfAfGjXG/zvlj+9P8UYjBIK/sT+MH3648NEylvo570+bifibnRehr7AR6ia0Pn01PN0w6l/rSdjXWouHfRnnMrcgBc2tqZ+HcK/0VfhprhSPtZ4ftD3knL71dpvSZ1wvUKeSWM3YpVqB1ZviQEVPBFt2i9VRVjRNl7W97Hev4GtrDoR3wzuKcg89M8NsSzi4IoyPUBf3eS4YVuaRf8C3Cj8KuRLzmP5qj2eMO3ypip9SJs0pnqL+LZxO4in4EuhdrE+wn+UAPH+AT1YmxiT0e1gFxfjLmCtIeI7uC3p1hvQs/dIXsasj1ChW2WAs2fI3I/zbtiZ2rjbCYB7GN+AWcHU/7fO7XudrvfVrXxeqTK9SmdBa+sNcW50UZf/oO3cJOoOMdVLeQuXSmQryxbxMxIPZHQp4iDhBrQcqEzryD/Mc5wmKcAzsTexPRV7Qn5KmH9jHjbFDsNYVPN1djuFVhnqGexNLDfz9fgVf40Ivr5Z/Mlq7G+pn2dFb7qFP4rJEPZcQcx+//V9iXwHk9fm1PezGYalIIU5Jpn2ratymthFYt2qZmaqqppmamXQstU6KkaFVRaZNpY6QUihCSkAyiEEIIIbzX9eu6/+/1PJ/nfR+fz4zTmfM997n3c59z7nMzzi+MY8YGEJ4C+2fQF4bDRkife7CXRfQanQtcR2NsTyg72FJj2bccOPhbWHPZx5zDIW6CfljKGGxc7DfKcI4+BHy7RrY99iV1/PWak+z/G3Ge4DrRGXUvg7kTfDXh/BbOyYwvJs8uOMtxLMyBDYJrAcc59ziWzzUt+H65VoWzJOWlLZK6OdcfZBiOmga7Ns/Y7PcvMLbDGsmy2b5sq3C+9vND0NG4B3McB/9IsLvy+6sw7pkWL+iIwRbFuswBnnsNbQ8cd1zz+eM6/ynpY/Sl8Cf0O21iwS/IvZ37Vehj4qhzc59lneg3OooxMBmLc4g7YDdy3AT7Ev02QQ8nD/YJ95bS+OBmjL1o9M1CDK6wT4b4vnlYI8O8ug12oICnT4jjiGOLeyj76UPoQuyn+bjoEWKaw3wMbRrszuwbysZ4XPLherGZT7FqnIY43PA95WZ9wli5EcrLeFyqiKR5PFYgarLg1Xh7fhrgSCp1vJOXI3wvrOfzBI/5GzYzwJF0ze8XiFoh/Bfgs1rwVj4nIfhRDIQN4nkt6HOFj/qgQNROwf+i3DzRfPsv7l0Ivw08Dwi+F219SPBJ8DkseCRyfR4RfBblHpNsn6Lck4LHYXCcBcwLWO+BZ5D5Ift2MeS5KPj4P5cMV5Gn38CzcIBh7C4OmHxOgn85wJHUb2jPONFsgfyVBC8HHC/4LtBUF/wmZEgQ3B6yJQqeC54NxbMp2j9J+A1o/9aCd0O29oK7gX9HwQ+BZyfBMahXN8E7APcUfCdo+giehjYcIHgnykoJNJAzTfAi0KQLroSBnwE4koof5U4W/l98O01wHQywGYK/gZw5gp8Az3mCX8C3CwSPhDyLBE/BGFiiug+wcotgvK0W/h7IsEHwvSg3VzQZ1obTOa4E34f2zBP9ZcDvF/4ZG5+VINsB4VuAzyHBt6LNQ1u9jLocFvw+eB5ROwzhExXCt7XxvwaynRR+EvgfVkrVe1H306FNwPOM4KdQ97OScwb4nBf+GuAvCL8U7cCg+sjThCg3GjBpeoJPjOAf0D6xguv/jGShggeDZ3nBL4AmDjB53vlTgah48WyAcZIomgUY5w1FMxcyJwk/Fv0yXs/TDAO+tfBJnLNKeV0JPNuL58d87lB8ElBuH+HfAp8wbrehrdLEpzLaKl1wY4430Re18fkO2n+yePYGzQzBD6FN5unbe9AmCwQ/a2tOE7TholB3m/tLQL9C9N8a/SDAq4XviHLXAuZ10y9Anyd8S9Q3jLeikH+P8O9Atv2SfzDa87DwpfmcgWRYgX45LnxTjM8Ax6Hv8gU/AJ4nBbfHGnha374P/meFvwl8zgnugDFzXjTvgeai8F3RR2G9rc4D2bPqX65pgl8FfYzgebQ7Ao6sFZCtvODRkD9OcCb6pZLgEig3Xt9+CDhB8AjI1lA0WahLeL7qS/BpKvw2lJsk+tXoo/aA2W6rMQe7ieZKG3sbwL+n6J+ADANEkww+KYI749s0wYcgf1hLb+TaIvwc4DMEPwI+WYIfxzo2XvB94Dk5yI8xME2yLQJNwD+Ntp0nuBHGwwLBvVDfRYIXgM8SwVW4BwluC/xqwa9CtrCG9wFNWAN3Qba1oikJnhsE7wS8RfB0roeCK2Bs7xTcDnBYZ26FnGFtGQX580TzO8bzHtVrE/gcEv5erl2CJ9t4OMs1UPQfow3zhc/lWBV8Fco9LfgH0J8RfUHU97zgo6hjWJMXgQ8dq5GnlCBDYcFLQV9c8LOgiRY8HzxjAEd0BtCXEz4XPMO+1hd1LC/8R6CPA8xyN6Cdqwv/PsZ/GGMxplds5RgW/wrYFxrq294Yn60F38A9V3xi8W2YIzPRzt2Efwn0PUV/FPKnCD8G/NPE/2/IH9aHRaDPEH068JNF35xjDzB1j4ngE+bCFMi2QDTPgVnQ5XpCttCef2KuLRLPHejrsO71B361aCbYntIb7bZW+I3gs0HwRNvjDvApKPG8m2NJNIfQnoGmHOj3CJ+OsbFfcLbxTLP5+yHqdUD4mlgDDwl+3cbDLIzDw4JTMMePCC4K/DHBQ9G2xyXbnzanLoMMp0VzG/dftf8wwOeEfxky/Gf8oy/Oi08GDzR5l+BRGJPRgCPPJqLusYAjOi3asJzwpTAG4oRvZGvgv7anXIc5Ukk0P3D91Le/gU+CynoR3wbdZj7kr6RU/yXRPk317X2QIUnwALRVa8H9qCsKrsOc+OJzM+TvKP6FUFZPwWVAE/bBZ1Buir59DX0a9rjvuV8L3wRtlS64MWNtBM+yeTEE34a5eQjyZ4nmI9CEdfJd3ltWud+gHcarHd6CnNMkWzfu7/r2U84X8XwU/BeIZhLmwgrBC3juEJ8HAOcKzuZZQ/BwwPsFb0Ddg473DHgeEp+b0M7HVO5E9OlxwYsB5wvegnFyUvSvoKyz4vkz1zrRFAf+AmDO35bgWfz5S/Q1MYZjAUfWTLRJOcE/4Y9hrRjPtTfMI7R5mOMPok3Ki/5y6nXi+QFoqgufifGWIPh14EM7J0CeRNE/Av5Jomlm/bKMOp7wFVBWe8GV0W4dAUeePUWfdhN+EWToKXgZ+PcRzR7QpwjuiLGaLpobqOMBpvv/AT4pJXx19GNok9mQeZ7gHMomOI17q+D7Mc7n6XmvFahvaJ/u6JclqmMb7MvhLHmUa7XaIZ56nWR7DPXdIp7pkCFXcD3wCXvBoxh7O4V/DjLkCf4EddwjPg0hzwHhx9i8e4+6h8bDqyj3EGgiOd4AHxf8HdrkjL79FXzOSv67IcMFwR1tXf0FPMP+NQHjtvBuPUuK9owBHNFv0b9hDeRT6bGied/OuTdC/jjgI08hcC0SnIT+ShCfLaBPFNwd+IaC94O+qehfwHgOddyLerUWfjD6saPoK6Ftg951hPkvhD8K+m6SrRT6a4DgBuAZ9rseqEs68JF8kOAzWTS9wT+sOV/y7CmeM/kchmhGU/8UvhD4r5BspUG/VvjN6N8gTyGeN/Xth3bOHYv23ymafJ4xxWcn1xPBHTCWwrq9HnwOiX4921Bjbwvwh4W/Dv0YxvkN+PaI8F8BPib4Na4/gjdRRxT/H7gWCT/OzlNHIc9JyfOp6c8bMTbOiH6SrfO3YF06K/xos/NMQpufE/4D1Pe82qQN98QX9Nye7WV90M7RwEfGP/iHcsvb2bYeyooRzafou1jB47AYlAMcecIDdYkT/knufYJ7QbZ4lZvI9hS+ItohrBsFUN+wpi0Fn4ai6Wtn84WQJ4zJdhgPof3/MH3pOGRrqm+38BytcfsWyg31rWx7bnW0eZLkvw34sA7/Aj6h3K9trtXEGGivumzj+Ne33TC/Ql/PQVlxeNaf+Hboiz6iGczzjmTbzj1RT9QdMdnepj1HNPlon3TBd6C/whyJRV+Ec+tMrCEZoIk8ZQgD8TTRf4FvZwiuhfNjjmQYAZkXSP7LIMMK0exAuasFnwHPsN7eh3LXCr8ePDcILgQ+W8RnC+jzBGcAPqCynuQeLfoHOEcEZ9iZ9Cq0yTHJPx1wqNcKyHZa9Kvx7RnB84APY+8K4M8K3g986PfZOPSfkwwnGPCqdaan6Z97uD5L5tFch/dIr0B/RQv+gvYZwBHdEgEhYT8qRVsi8JR5JWjiRdMc/IM+0B/46uJzF5PYq9xo4BOBZ7nP0Fajb4uabe0NjLfW+nYUcjF0FM3nKLeT8GXM1pphZ8AOtB+KfhXx4rkOPPvo29IoN0U0XSFPmvAf2P6yHeM/zJGLPOOovm15VlJZt/KMI3xFjivV60+UtUI84/Ft0A9/sXPTWO7joimI8bxF8lxj9sBj4JMrmkNctwW/QVuNyrqcY0zfvoayjgh/kGus8Pmcy6GdsQedFs1yniOEL86zg/hPQrkXBd+M8VB4r55LBn004MjY43kWMOt+DH0RJ3xvjO1Kgtuj3HA+fQH08eLzEOSfp+cUF6NNEkSfg3GYKJqO3KMFP2ZnkFN2Dr0Da05rfTsb87e94OXU9wCzjpmg6Sn8eLRJH8EnjeZryB/W0rFYzweo3Bd5FgvjFnUJdfwEfs000fRFuRnCDzdbfSWUFeAitOeIfwc7x70DmnBuvZxnDfH5mWNGbXsVvg368C/4NoztqzlOgj4DHSlH8nxtusRRVG6BeFZCXYIuuhc0i4SvRh1D8F/ooxVqk6m02wj/Gfol2H/aY98Julx1jL1gV6yBcRVsI9mg3yI+FTG288TnNT6tKDknQZ6wVhQ3W+KzkOGAaCZg7AUd5ozZ/2txXIlnNso9Ivom1DeEr2DjqgzGW77a83uumcJP5fjXt0+ZntMXZQXfSjzkvyD6p0wPaYQ+uqhvN0Gewi9KDwdNccGf2fnoZp6vw7zAehhsILm0Y2AfjKQAtD2xINo5Gnwiz5mhTWIBU/7XAFcCzLbdzrtfwR4L+jDX/qD9WePkC/OR3W7j/DXQBNvFs2ifBJVVDnBDlRWDtg12p/qoY9g7LoMM7SXDMbRb8N0M4NlKdb8G34a6f8lzlvA30fYefCumgzWhj0n06+nLEH0n08Guoz1K9Bk2ZmrZ+tAa9R2guqzBOEyTnPm0l4rnL2Z/vp6+ReEfMF20icl2NWQO5/cZtOeLf3Xa88U/ivqn8IMhf9DJB6IdlojmV5QbxtVy+nRU7ofUKwT3tW//5N6qun8MeItoCpi9tCXaPzeMN/oCwpyinV/yPAT+e0K/AA5zqrPV9zeeBUT/ONqko57YywPPMN/f5TgX/BbPg6L/jP4mjbeD+DY8s94M8BGVWw40xwQvMFvxQZPhG9sfe5h/Z6zZ0PJQYNDNrkabh312sZ0fmxnPGuw7tXljtEnQ7XNAf1zy3A58vuryOdr5dGhnngGDvxIynBF+Fdfk4C/jmVffvsA9VH39MtotnKcSGHy3T+stbbZaB6IhW2HhE0FTXHAn7h3q36cwhqOBJ8808981xbgKffE5bZiq7zLznTUwv9L1tFWqHUaAfzmV9TfPoWq3j+g3Ef4z6qiCE9CeYR9pyPUHeK4PN9lZPhv7bGKgx1hqCJht0h30SYI/4R4k+hTq86rL05C/vepYEjIEmht5vlBZk8ynUJXjE4GfEduX2e2Hm71iMtonzLXTPJeFdQPfpkjOHqBJU7m78G1on67oxyzhvwA+7LMnAAcd9WHIOU18RpkMjbFfzBA+G7pEjuo+iuuDeC6zuV+W53rhv6QNUPR53BsEv2J9lAk+eaJ/H/KE82M3szUd4R6qb98GTVi3b7fzdTXQHAYNbVnDIMNp0T+Dtjor+ReA/pzw8yBDWId/os1ZcDrPEZLnerRn0F0P49vC++WPABwt+B/3ffAcDXxE30a/lBPc1Wxos+kTEb4+dSe1WxHaD4Fnue+ZrriYZ2TJ0NNkfsfswD9xHEqGAuiv6pLtKM8mKutPxjaI/1k7C6y0NWE3zyn69gLoO4p+n82L8cD3FH4nxkmK+JdFuWmCl9KPLLiIne+uMz9CKsoNa8JF2nM0VoebvjGUZ2HJswbljhe8zmykK1DWNJXVEf0+QzTP0ycofArqtUAyH0ebrBD+VttfnmKcg2gG8ywsONb8Wc9Tb5Sct+PbsHePA888lbuBtibV8SL6d7/weyDnIZW7H3zCul3D7AAHqAeKppjpD0moV7B7zAf/EDu0hfuL6JeD5xHJXJnrv+AnsP+eEc3j5u+bg3F4NpSFcX5OcH/z45w0f9k4yH9eNLsBXxD8NH3cgtPMn96OwU4vSccAXFjwhxazNNXasD79jKChzOtMd72OZ3bguWaeA1xJfP4wH+5+87VNoI4BGrb59dQDATOt9GuoS1gHsjm2RdPA1tiVkDOM4ZdwBukmea4H/QDBW80HdxL80yVPBYuTOQ188D/+jrGXobIaMq5b9M1QVvBZx0G2oJN8bnbOI7bOvwz+kyXDbtAHn91PjBMTzzo8hwaZMa6WCJ+N/loheAfqslryPMT1WfBVmC+5ormPNnbBxTCW8kRTBPT7xf9RyH9YNBt5Thd+KfD5wr/JGDB9G2tn5xy0yRnh+Vb0OdGvNt/KCozbsNZ1tr1+I3UzrSeH6U/Xt9egX4JNex/oLwgfg7q31tPPj0Oeiyq3JWiCT3AQdR7xzEEbFn5Zvl2zpy2njqe+KETdRjR/4G5FtODKkCfw7Mm1TutYN9QlRjTjUPdYwJThT8gwo6r0QLRheeDZhu2t/T8HYdj364N/aIezpsemoc3jxb8k5m91wTVgJ0wQzxn41VTlVkSftha+JmOBwvoDGToJnwy4j+A4tFsaYMbebGLsmfh/TXuReHa1uI5NZuseyPO76M/a2edTrFdBZ34IbTJPfLbxiXzRdze/wF7Gb4imN22boqmLtg06TBWzld0EmrWiKYT1bYO+rYZ9Klf4kfSrCv8LbZXCj+G6LXw0z55q53zYSQ4JP5rndME90P5hHJa1M+kDZsv62/bxjpDtuMrqaHbO2oDzhc8E/5Pi344xe8EnxVgO9ctK+gJE08f8YrNRr4vAc838E/0Y/UrJyBubg2nrAxzxXaKPgr5XF/iwpr1m+nwf7vWgJ/8r0D4DAEfWZ/BMF/wH8MFHGcs9WvQt6TsWTQWL86ln+kY6v1VZ99tZeIbp0rdxbIjnJ1iTF4nnEsqsujyOMbBWcDTaLeyb6TyHCj+Oe7r4nKDtS23e1vr3O5S1UzRbzBZ0nr5FlXuM+7t4fmJrL55E+49uswvtc1j0OfQtCk7hWUzfTqKvU2NjIeQJZ6uGGBtnRLOAuqvg2sCfE9wFdTwPmP2bgLEa7Jl1MLYLH9DeBERxwWkW69vW4lXyGEcBmojewv4TnIU1JNgWfrR53QL05UHDunTAGhL6NANjO9hVfsGvePG5mzE8gr+2eLPV1I1xqSZiE6ZeKpputg/+Qz+O8O1o09O3nzDGQ76ALoxVkzxlaLdRfR+iHUz98g3XmRAHgv23p2hSGYejtWU1feXiswI80wS/iD7KEn1txkVInptR92miuQ3fzgPMc8dXZpNJw5gM4+oLfBTafxptpOJZE+0WzjKtIc8G4euAf9DTnrOzyQWLExsPObdIhl9dZ0B9g1+yE89WojlPm6Ha4QzHg+ZIHPo3rMkPguaAZGiAbw+pvhewxx0R/gD64pjgqzCWjgu+iJyO+YJzGY+hcmdb/FuGxUUPp/4p+pko9wL8a5H68oymcrejrS6I5gHGuoRzMW2V4l/PYmY+oA55UHZp/IoGHNlTzCZ5B9o2VvhhFoeQZ3vTCdO7LkKe8qJPZryl+D+GORL25SfprxfNKYyHBMFdzSbZw+RPhPwNRXMPZAi2u60WE1vD4uHz0e9JKvdZxoQIHgqZw3l5FtqzvfAjzHa9kP76EIuOsdERNGy3kRYv+isQwZ9ygbZN8cmjf0FwA67/+na/2ds7o77pwHMtOgiek1WvKsDPEH0fi8dYjvGzQDyPQp7Q5tmme5zGt4vEpy723BWC/+bZQW24CN+uFf9p4Jkrnp9wrol+Dfd04efRxyR4Be+zieYvW8Mncd0Wz2SLzbuJa3goi2u4+DTEWArr3hzqtOJZEN+eE1zSbM5VsT6HmNUxdnbrj767IJ530JautprDca5y64Gm+Ks6h4ImWvBjtBMK/sB8js+iTWKF74VxFfrrVovbLwn+5UBDOW+kPV/0u9C2lQBHfMEoK0H4PIs7mkr7mPANeOdH9BfQR+Es1on+LNG8bn03hfZtje099L9LhrpAdBLcBm3VUzyb0zaodfVBm1PX0fYl/p+DZ4hp/AntEHSbJXa/5qjZ9otSpxX/TNQ3S+UWBp9whh3I8SyaWMiZA5jj/GXqoqKvbncl3gCfYCuoy7gvwcPQhkHH+x3yBP2qJ9pnteR/g2cH7Ud5tBUL/py2NdHUgTwbVO7NtCuqvqcsHv459GmuZH4PNCEmeQPaLZw1Jpkv4Gbw3yP+6yD/fn27w/TYWoyTEX4p54Jk6Gs2wyza4oRfh7qHc9DP1Ff17V3Ub4UfTNuy8BV4qQsXkAkn0JarckuZrbKOxS9t5/gHfeSsyvEveCPjTwSXtHFSlv594Hl+WYlLfdVFk2Q+0LUc58Jfj3mdKHn2Qc4kwXUsHvha0HQUfhvarafg5hyT4vM17eri39zicGZDzjTRjKSNWn2XYzGQH5rvvgt13XA3weyiDTFH0sVnLMZShuBG9L0KXsJ9R3zyGMcl/I1mkxyGcsP+MoljJsQiYt6FNeouswmvQH0nq75rUVaOeN7Ae0aCZ0Hm4COrZHbLcWZzex99t0D0Lbnmi+fzrGPQnWi3kd5bEm2+WjS54B/i4n43W+gO0Ic9+mOeg0JMBcoNfb3U1sMFtl69ZGeicRaPfZPFLK2zM1oc5NkieaoDn6e67GGcj+p4wPjP4ln46ktz5Gm7u1EXMof+/Zp7lvjczphtwW/h7HNAZeWgr48IfxDtdgwweX7HGAnhH0bdT4r+asYvaY53s/POj+ZXfZvtrG+vBM9zgLnWbTBbXKLZ9+6nPSTEjZhfuDxkYFL6iF+VZ43Q16hLYeHXoqzigvdyLgseZrbfahaz+qnF+9XEfIwBfSSuGG1VTt92QTsHvfdJu9t1OepSHjSRGDmL5bjM4+Iwj+LFZwB9rBpLLc2/M5rxPyq3Iu+7Cb7GxlIBnq+lr14N+qagYRu+ZP6jfejHjvp2JOOlNT6fp685tAn3BsnclLE9wo+yeO9Ys73PtRj1XaTXXtPQ2mo649DEJ4bxyRoD+yBbumju5DiUPE3Rhlmif8X2rIG8d6OyUulrFs2jtE9K5q/Nrvscx4P0q4nQE4It6H0QhvW5Dfs3nF+4z4pnCa4ngkeYnXwXdUjhv7V7jifNb4upGbVI9VqNfl8h+l+p14W2tXPrnRb/f9L23PsZ+6F+/AljaY++TUU7HBLPuzGGg26z0nxhlcDzsGToBviY4EFcQ/TtBp6VxPM72iTVd+VRgbPCP2Dxhz1oe9e35SyGZIbFOn7JeCeV9Sjn3evaF0w/b2/66sd2vljM+2igj8TRoc3DXdcxtMMDT/pl4FlePJvxXg9g7q25FldZEPVKFP13dj7dbXF6s8C/qfgMNx/044yjE/5mzM3WgpfSryrZzqCsbuJ/Hdqqj/BFzIc4xNbtt6nvib4AY5zEswX4ZAlfkXfNxOc46HMAs99LWQx5PeCXiGYT6NeKz3kbV3dA/hDvvZt2qBAfgjqGO92FaJvSt89bbOqDGFdbhJ9v864s5k6u5HzQ4i520fckfB0g9gu+mv4m8VlOW73gqbw7pno1BT7clb4X8p8UzSLQnFYdq5tvbgrgcDdzn50Bv+d+IfpY9MVFwbV5z+INnRN5V1rz91XzCa7iewygocwf2T7+A/jH6tt6WCfD3YdH6H8J96TsznUn+kQE32G+75vNjlGJ9zjE8x36FjVnq5md9hmObdHswEehrAfMB1qAsQSS+W2L9f2C9mSVO5Ex0qBhOww1m2cD8E8U//Zon4aiuYc2XpXVD/VtLfzPFiM3Ct920rdzObaF78G4AtEfps4cxgYEHCD6noxVlsxrLeZwNvAhTi+G+qToXwTPDNEvpe1L/B81f8EFi3t5HXIG/bA6YwbEJxtJOnPEZyzjNwRfTz1f9FNR39CPhdG2S1TWMMaUCr7T4swfQDvnis/rZlcfYmeuknYe/MHsOfMYe6yx1IdnqADzDp1krmFn1R+55kuGXnbmeoh3lCRDA+pj+nY+5AyxTD/YPayTvEcgmjG0m4nnNvaXZL4FNOH8vgzj57RoBptuOY1zTeWWtxiteig35Ge4hjF+Kquq2ZY/sXt/2+kLE5/tjG148xKcYuflaYydBj6yH5ktOt7uj6zEmIwRzfcWIzEadQn7eBbGQCxoIjZw8Al3SK/GWhEnfH3IUx1w5H43acRzqPl06vOelOTca3rUX+az6EGbsHiWod8nxIpQDxH8K2i6gYZr4Ifox6Dzv8k5om9P0WchGc5yjgh+kLGsoinMeDnBNzBeWjxT6WMVvg33gnAOtRiwZRarXNTOgDsYF6c6vm/xYyk8DwZdy+zGMxifJtm2YO7kCR5vdyWesdjU1xmzKv5toLccEP0r3C8EF2dfh3M0dSrh7zIfzWL6fFXHY2Yz2Wj99STaIV80Bc3Wer2d77LNfjvH7DYf0PYbbGIWQ76O9gTJv9nOku+ZHa+F7S9v2t2WshZHdx3jQ+qpT2lzFs9U5nyQzIWM/mHLb1AKdQ+xhYM45pHQLmLfsDPRKoyrGOGfRDuXBxyJQ7M7tncylk/jtiBzmIhmEGPS9G1T4BOEX4h1JtgeF1K/Ek0RzKMkwJTnMP7YXvAws5MncY0VnxOm7yVgrQj22JGcF+L5NuQPvpgudvdzAGgGiOYmlJsu+Bxoxgv+GPAMlfW0rcPL0Q45whfmfR/JeR1jqpE0LuJT4L1C0STT7yN4BmNvAHN+DbTxX4Vn8CCzxQp2R1l5+ravxX3diPG2R/i6tqcUYLyo+NSlvSvUkXGVoi9jeUL625qzCXLmi+ZmsyG8SN1efAba/ZcclHv+Gtk8La5ghJ1/K+Lbs2qflux3rb2beadVZY0wXTfB7Dw7UfcLoqmEtr0ouD/kj3pLfi7zCdZHG4Z9Z7LduX6cvmPRn6LvQDS9IE854CP9Qp+g4Ods/K83W1lDzjXJecjsD8/TTxZ8c7zHrTVnIs8R4BmJgUdbxYt/jt3DLWj3mAbxbKJvD6Cs6kE2i5GYCfqgT7agbqm5X4f+GtDTfzcF37bXt4epY4SYE7MDvIpfHdUmD6MuYY8YwT1CZ/+uaP+e4nMb6tVHcAfIP0D1Gs9YTcHXWl6gya6H2xm/L/dclbuWZ23BswHnCG5B/Vzt/Bbnkcp9FvUNfNJtre6PMRB8T4/wXCM+d1HvEjzObDuX2x2BuXaWv5b+F5V1BWh2ql6Vzf5wm9n832GeFtEvNH2po90leZRx9aJ51PLDTKSPUvzvYcyn4I6gD2eiZNPfruX9cfHZZe0wmf53zbX2jMcQzXvcs8RzI89Bgu9FW4V1rJbZQq/iXqlvpzCWSXB/xmbo24J212CH2UYmW86KJ82286bF/48C/4viecbuHT9k8diX0X6OhL/sr9Zm28ni+VFtstnOOFU4R0TzGOcOkllGbB12v68O89UE/mYf3gx8NMqKrHV2r3OAnRNfxvyNAQ3r3th0m+Jmb9lHm7xoUmzt+sTuyN9puYB+tpwDDRirJvw3tD+o7i/amfSM3Rti0rjqornWbFwrMU8bqi5P00Yne0gp5nYQfjDjEPTtGltvXze7wY2Wu+ZmO5sXN5tzZcYcis89zEkiuDjqEvT2Np5nA/Qpap8y9LEC5hpV22wy26l/iqYn4xAEv2C5aBrbOTEL9ItEM5V3+gS3M/oLwK8VfgDacIva4XOz0S2yvl5IG6z6qxl9T/q2iq0DHRjrqHm32XTUdtz31Q7Pgv6A4D2WY20x70xpP51o/qBnOddUrzcYW6h7RldinQz0XejLkJyvWA6x75gDSmUVtDxvZWyOR3NPV91nQv6TgqvaneVJ2CNOi88UxucEGu6haodlkD+sRWNQ7kXRFLK40970Fwi+k3e637mk55ygbwtwZI+2+vahn0v4ihb3tdziE+IYly6aIrRpCL6atgvAlG0abZ6CX7L2eYo6p+hngCZRNIm2H71k4/wNyNxUNLdClwjr2060T2vg2T6vA/6PTdju2s8HvpO+nUGfkcqtxJgctcM5i1FpRz1WfbSWsT3i35lx0eKzkHfEBH9m83eFnbmSLKdZEsZhjvgU474pGTK5J4pPOdorgt+ZcTW6g9YJ364W/QDG9gguavrbG7x7KPwptP8Wwd9C5nCH+pzlVrrX/LyzQZ8r+heYFy7kwrK+OGZ+tM2WIyID43anvp1KmVXHomZ3/YvzDvjijLuwGK2ZgE+HMYM6nhF8yPzdH1t81yjqxmqrSdRRBRdG3S/q29/sXL+RuugR3cGnLVR1H87YWuAj9Gbf20pdFHjKP8ZyCf5mOTqe4Vqkb58H/5Br7gNrn/N2X+Mbixl+jXqs5MlnjEe462T2tMM8l4lmmsUt/4Kyqku2JoxnA0w7xmrTtTLsvsxOnusUt1nD7JO7wbOj5K+CNg9nvZ4c8+LfwPJj9OYdcMmTa7FV9bCvhX32KdCHWOjR9m0ju8N7P9ao4AesShuIyrradLZ6lh/yU9heMkTzuOk2q3iXUPh3zC7ajD4d4YvRxqU63oK1YonwLRlrJPnvYf4r0czl3BFcymJll9pcftfiOg5Bzi1qkyYod6f4/ws7837hH7WYmccZzyn+HXhXUXXpZ/E/tzAPm2jm8Q6g4LsZCye4mN1rWMT8VyqrBe+5CD+E50HJU4J2SOmfa01PeM/q0gjyBP2tvNm3H8M6cFZ8Hma+U/XvePqGJM9O2vckw1MWgzeLuRHevbSu1jcd4GbalpEQORIzwNgh0ET84MwfBZhl3QL6SoAjbWj70WbUq7poWtGmLXgm88+IfrnZZtswjkj4n1GvYNvsaP6s9cwLJz7fAx/m6XHTIR+h7oqk5ZH9kbmA8IhLZF3lnVnxr4AxliY+HXjPRfPxguX4esNs12+Yfft5KzeD/lDxfIA+ULVPK+7dQdey+Kvdds6daPO6L+OixaeL2Ycng2eOeFay+ywvMP5Z9HPt/v691OXUj68yv0fIhYi+WKv6/gSaXPFsbLnIltBPIZpVtLdr/EyhXUv4UTxbCX7B9LEveSddPCvaGbwfYw+Er2dnllcYFyT5WzFuX3KetpilsvQjS4aHmStJddwMOc9Ihq/Nvvcxz1biuQdz5KLKLUGn71Hd02QsqOA/7P77PrsrvYq2a9BE7LFo/7BPZXNc6ds43ssQfLmdr2sxH46+rWj+95rmTy/M/MOi2WZ6eyfauoGP5LDlfiF4CueLynqR80H4v5kjTnz6o9w+gtvzXhJgjoGSjClS/77OvF76doHtC78zV2S428IYHn27ye7UPGg+jonU21VWNfO7/QzG4bxQjr540bRjDA9g7n2pjKcKsZ12B7Ob6XKp3Pf17eP0s0vmipzLwo+2WLJhdn+tmeGX8j611s8ujNVXGyZaLrLp1HPEv4DJM5T2JZXV23TmTXZOqcA1XzTXUsfT+jCWuW5U1gCUmy/+GyxmabzlQHjN7hdkWQ7MXrRpi8+NkPOc4AmMC1W5T9hcG8LzvubCt7xPLTnncgyLfjxp8LA++dTmexBqn1l2JlrHOQKaiM+OdYRNMrKfWmxAlLXh5bz3Kp6TOUcAs69jGSevvewO1DfcuR7NthX9Uur20mdesXvli3nWkAylGXcHmPjpppt1x7qdJPwm1KWj6N+kPhO+NZvhMMbSCD/PcvTdA3xP4R813SnebLOplhs53e6AvAOdp49kaMU4NLVJGe4vwre2/KXPQc4slfWc+X0O2DlrPA7049U+P0DOaeJzl92Hepr+X9EXtLuZ69GG80RfG20VdLnnba3uYfbJYqYD1GeMsdq2En0lOkeUMF20iNlLX7G4zUN29k9g3IvgXHwUzt0v2RhIhD6wRO3wOfMACE6j303yXG1xBUMtb9hsy33RB2Ngtep7u9myhtNGIZ5NMP6DbWqr2T32cE0L8Us2jyZY7FYP5iZSXzTm+iOef6BN9qjcSnYvqZDZyq6h70z0t6AfDwu+iT4y8axqNrSx8IceF8+hzEku+lHc70RfmvYE4YsZn1VmN+hicSnj6FMQTVfmChD/Oyzn0jOgCee+81hzih+7RDMX/GMFL7dYxNLWj49YfsXWtLmJfq3lUphqMcNtzVazxuKv6ltuq6amq/cCTXXwjPgZqZsBJv5HyNxQ+NdpZxB+qq35jdGGYa3INH37Gt5zlJzlzb7Xwew8c+zufG2saZ1E35B2e5V7L+O6AXOv/Ij3eSXDVsbTiuZFi7/6jOcg8ZnIOCLR9+NeKfoM3KlZJHi+2ZOfZ2y56FuD/2rRYBpFrRV+kL1f0Jb32lTWaosTeJSPaahew6yP2jNfivq0juVSOEn/jvqrL20F4pmIsRTO+zdYTFdlCHRAsp2gDVPwUPqUxbMCdUWNpTZozxCXWB9wyDv3M+eLyvoN/I+rnR+yfJKj7C78Nzw3qawP8e1ZwXXB81yAwSecU5ozb4zqtZtnTOmlnXjWU73K0g8rOT9COwT9cJ7FBD5msWRFmeNdfVHFdMsmnHeqyxDAxd+/VJd7LHfT7cwpB3zELs18yFoTnuEYBT5ivwK+KR4QidhhLKYimWdqfTuafm21SUmzzdaysdGad+FFX958YQtpP5fOvJi6qMrNsnj4r8wW9BRkThSftdRXAbOO35odtYDtTe9Qx5AM8bx/rW+nQ/7itS+VddxsQePBv71oZjIXiuAY5sdTG+41P0sv3kWSzJwYaYJ78G6y+qKs+VmqmZ+rH8/U2u/6WW7q+7gOS4epAJ4ZkuER5k5RfXNt/Txo+QcW2l3vO3gnWjKXtpwt8yxfWRnGxkh/+5u5KST/Ros5eR80S0LfMUZC8JugXy36xebnqmy2sv6oY4gt7253b3dR/9c63J73DcVzG+suffUf6DlbxP8X2vBVl2csRvEG83P9bGfSPvTN6dvJFkNyP8+SwlfkGzEqdwPm2nG17QGeSTVPW1HvlS/1OHPoqdxVjIkSfT/69AWXZtxaXeUEMx9iQ+amEM115pu+0u7ZbWK86weyyVCnFTyB+iRg8pnJWD7hb7M8dX8xvwrwETn5Zrvo5zFHkOCt9CmL5hGuseITj3Wpp+DFFgOzmfdHRP8a8ywpr+AHjNkTzxSMqxDfeD99AdJzFjGuVd9+b/cgbrY7lYPQ/lmiacy4PvEcSFu09L0/7R5rOsez5NwK+ecJ3mQx+d3Nb/Ur79lpbKzm/X2t8xu49mp9TqMfNsRO2/i5m7nFxP8Rfis5f7W42b8sN2wu81dI/o/wK1fwHXZ2uI35K4TPt7iUqoy3DPk3KLPKbWbr6jc25vfzbqBonrS3mSqCJtgtVzDnsGRO43srav91mI/Hha/Me7ji8zx9zdJvO1tM1BE7c43kfqdvy6B/zwr+ink+Nb/ied9Q+FvMR/8T9ynV/SDnguA041/Z9tn78G1hPMob0ZeYD1NwaYsfe5r3KYR/hvsj4EjuR7PvrWX8jNa3vbyvqj1lo9mFqnMPEs+vzM7cjXde1G7F7T7UBJ4BRZ9L2wLKjZx/LXbioO3FX9rdlp/NPtPP4iEnWG6uI/RzqS4pNkdiLF/9U8x5qzmym3f6JMOPNjcncO6rfW63O2iTOfeF38j4EH171vbBooxjlwy17V2hGrxLLvou7HfR7GeMruCRloO3s73/km/nmo30kYnPIca669sinBeCc+wO/tvMJyP8Iuzvi/TtRXuj4TfGK4Y87ZA/2GRehMxLRP+lxbieY447tcMawBsE77O2uhr12gk8/d0Pc+8QzT20q0ueG9GnIR67rPmSTtDeKJplPE/p2zmsu8bku8xlJNmWmC+goflretp55DHevdVZrKD5E1tzDQlvBFjcRTfeZ5cMffhu1HG9uwSakPMtGvWKBp57azHOKcCs72cW83krxyTwEb+q5U1ty3u1miPLbsA4FM1Sq0ss7cCy7b9r98RbmT55hcU1rUKu6dbgE4mvZgytZO7EXEaCO2OfHSCauhbjcYvZFmaazXw5xkywFayi/q9v7+bdvRCrZjbn2ow/1PmiLvU60Vc1G/jbNl9qWd77lWY3aGK+mPlotzBOpvPtA/FsxByS6q/dGCdB7y3IOQUa2rUut1wizTAfZ+jbBLOpTqf9X+OqL/PziD4ab3DniH4r55FgPnIY9OTpZg8cYP6mATwfaf9dZrnNnwCfBeJTwc6tO+lTE34gfdbqr6YWj1GdMV0ab9Usv8Q/nGuiT4Rs+wU/YWf22par7XfOR9FU53lNY++86bdjmZNWY7ii5eSvgXJPij6FeU4k81fgH+yuLfiWitbtVqZDbrWcFXw8M7RhDd4xCbYXuy9Tku+AqL6P8T6UZP4afR3GCR+tLI4HZiN2GOakFdwKa1ewR5W29/saWD7kTOqHoI/ctbH3sAZSVxSfdyy2M4VnZ+HnoO5JgCPrJHNeBX+W5fwsy3eOxL8xY4cAsy79mJdJfDKpb+gscwXv94lnKeYlE/1+rvPi0x/1nSF4IO/Wib6wvdfTw9a9Mmjb8fIJFuC7Wvp2Oe0kwqea7bEoY+pkf2tB2aT7JVqsaSvaNyR/LN8NURzmDbzvH6PzHWOQVNattO9Jzh60/aov3rX9vbXl6Zpl8RIn7I5nUdvjki23xnazoXVgHKPK+ou5ECVDZ8szM9/iwF/EWApr/mG7N3HQ7rY3tJxmO5mbQvy3Mv85YK4zv1O3VH/9Y/7HSdQPJUO02aKr8K0W+XEu51lScDHLKXqT5RupxngGtflHgMMbOk/wXCD+U02H72S2gnNm95tmb3Hmmd/2Pd7lhO+VNDs41tUv96F9LqheQxnXcULrA8ZhNOBIXlnG1Qi/ncujZHvEzuxLLDa7O3MHaV1aw7gmfduQc1bj8EnwDLag+uYzuh/tHKdyE80vudjG23xrhxzzVZ01W2VV2kzE53vT2//hXqlzdAJyrzUUzUj69QSPw/rWSTL3470twOT5vd13+9jeDKpKnVDf1rS3uubxnrK+HU77p3j+ZPfF/sBHgf4Tuxv7LM/dattXGLcsPivtXuoxi7dMpl1F/M9b7sF7eTbUt4XNT9rDcjEdoP0zyMn74KrLHOZmBxy5h2jxD03MN7fG8kJ/ae8jXEOdU9++ZetPcZ6dtafUR1l7JHM1yB/WgQWMKxZ+G22VgtdbTNT3vIOv/Xcc9vFDkrmWnftOo0LH9O1m5sQQzTmzVyfyfpPqtdfy++01P2w6Y/vF5zDv12i8/c13iIQvYb7OJxn7obK28E0rwbNMV3yVd34/Vvye5fK6zfwsd9t9rj74tjjoI7YLyBOjbydzTArf0uxOJeyMnMk5KPrnzZ/SgT4CffsGc4IJXmn5tTZY/vknLE54OmPyRT+B7Rn42L2PctgvklTuLabjHTXbxUK371ncb2WLne5rOQFymY9OPLNNNx5lZ6tP+Jao6K9lbhDZVVbSzqNvt9t59jLmCZH8N0LmbqJZZL7mHYwHBp5tcr/lM6nAGGDguUfEMO5aeu+VqEuIM3na/NQLbS+bz3tq4nkb39gN9jTzj7ezXB9JoJkh2W6nPib8j+aX3Mc3PdVH6zmvxb+XxT+PsHizlxgPoLrHU+cXzzPgGebIGsvVcNpy7bZkzlLJw8fMV6sdmvO+gPCNLB57DH12wg8xG+8NlhdiNe80Sea7Tc/ZC3yQrTG+Db6hXnaX52qLd3qUMWMqawXv+KuO9zInvOCHaecRzW3MUanz5nt8Ly/knGdeF53XhtgZarLZe5+zfE1V7e7kVXb3rZCdKRbwfSLRl6O+rfr2t3tbc/get/B77Rzxk93hutvsWimQOdirk+2+bR+bO+1Q9/BWxTKef1X3VuZv/cPysl4D+ouSYQHkLJ6v9wEtRjqZNijhb0I7lxPcmfMRcGSdZEwmYPLpybwBapMLdue3NWMMRF/Y3naZjrYKMTMrzVY5AWt+onheablYh/FsIj5d+M5aOMOiXiF+4C6eB4X/kXZFreGlubbgW+5ZsZC/m+qygnZC8WyAdgjjsJTlcDiFX6Fe2Za3dgXkD33RjbFA4MM5ci36N8SD9bf7boMYp6GyVjBXp2SYZHeOynFPl5xv0d6rck+AcIHol1kuprGgWaK2asG839JhStg90IFmT+vNc6j4XDQd4wm+bxX2PvggQnzsdLvLf4L7vnguZ/5DlduFc1/1+o73tYXfbvtdSYu/GsZzdPBlWDzMtWjzQ5Jtltn8Y+0dtHWM+4KvIRI7Qf+Xyl1uObWaYmwE2/gce/PlYeYAEf/j5rt80+IPuwAOOQoG2Ju8x3iG0jgsYvN9IO2o2u+y8G2++N9pMn9jbdiJPkfJXI9n8DAeLG/Jjcw9ojY8bXeUhlGfF/977KwdbeeIWnRUfyL7FXMpA474O/i2teDJtHcBjtw7YE5vwc9QrwZMO1gKfbLa157h+/vi2cniOmqDJsi21+4Oz7G3MHrTt6hv14E+5NB7l2dqlTvF3sLYwTevRb8H9Q377AuMHRL+KdPP68MW0Uf4x7jGqo4lGQco/k8zFkg071ks+l12D+Iq7teib4v2D2NyA+cj8JyPK7D+LBCf+3hPQXBrvtUY9Bzzsd5iuSWftlxkD/Ferb5Ns5jkemYnTLI3y5ZTV5dspexdzrE8Nwn/Is9HglvRpqR2+NzeWKlm75e1pZ1fMrRE+wT5C1n822uoS4ibnWJ+t34Ws1TR/EevMsZP5d7KnAzif4zjRDSfMN+gfBANUJdjollv6+1Q2rXEZzDfFxP8kd3H2cj4HH1blPcdRPOF3e8Ya3raC5ZHN4s24U9lU+VZWPAZnoUBR9YT2HV7Il9fRB7uEZL5ceYjBQ3xX9n69hJtGqJZZ7Fbr9pbacdQSOGbLn17n51nl1i+wT8Y4y3+pTkfAXM+vmbxn3G088jm9in3Nclch+NfZ+o1nHfCD+aaprr32Yw+Ff5Kuyf1gMXlbuedILVJf/qptTeNog9R37Y0W8dTvAen+j5hMdjNOa/lC15i9ziaMn5A/CfyDpHgeWZj6WQ6xjHua4otv9biuguabWGN3acYzPfrJWd1+v5CjlmzU9UwPSqN76iqzf+1+I0rWS/gOfeH8D6L5HzO7rEmMt+X9p0ipoueA2HIe/Ai37gX/9aWF+Ip+k/F8zDvSoimJvdQ9Xt/5i1RXbJoDw93ECymcR/vz4pmKPP/Cx4JnifFc6i99XOF5fKqyz1I9C3w66zo34YOcF6yDaLdXnW5jbYdlTuGOT0+U1tx7oQxQD8m8Px2Ee38Omufs7NhbeqWoilhOnYB6k7CX2tx++OsvldYvt+37S7DOoyBeMnzMucOYPZdAcjTFHDknpT5JorbPj7e1p9bOKckQzt7H/Ym2l2FX8k8z4Iv2p2sy+xNn8eY80rlXmP+tQR7w/Ea+jtAw75eaXFNze3e3/0We/Owxb2M4Z0F1fcfi1HPt3vHbe2t/A8gW5gvn/C+qmRLsljorzjOhc83/Kfmy74P7RZ0+/3md+jCsae1bqfdJWnIey7iOcdiWVtaPpyRfC9AdWnDO0eCfzQ/YyPoNotuVtwpbezhfVvzj9TBt1v0bQL25TD3+/INdMnQH2tgnmi+5Nkz+GLs/ZeyzMsq+ll2hh3IWCzBC+zu/GyL1TzH95I0Nhpyj9NZMg7tcEQ8l9AOLBkq2VuZfSFbvvDLbPx3pb1U3460XLKdmH9e5a5irIK+vc/88gUtH3Ut3ivX3L+efmqtz93MFzALsp0Vn6ssr2xT5j7SnOpuft71ZuefiLKiTioOljGugEn/Jv5YTvjraJsSPolvxACO+FPsfkeO5VW42+IHHrG8HzNtTr1s8Veb0Y/BHnKBc19lFWQONMARGz7nsspdy3N0BdmBGR+ld5+noE36SObf7b5Sb9QxRd8OYd5X8Xzc7vIctjNFMu+qiz7K9Od/zJ7Wy+7zfmnyP2l+wLa8Vyt5bqf9RzyXmg12uvkITlk+tz60gUjOXRaf08/uU/exXKlP8Fwp/rWZs138H7dz+ilbGy/a+jPB4iHzIexayXyeZ0b1RSl7x+dN9Eueyh2N9twjOR+g30Hf/kr7g8bhBMZ7i6Y5Y10kZzrt6qIfS71a+P32zstexvDo22KW82Er9UnhH+J81LcjGAP2uc4m9u7YL2j/wsCTZjPflxHNZuYv0j3NOsDHCj+KuXxV3x2MY5HuWtpsgFstZnsufUzC34X2Lwc+5DmGc0fwQdPPh9k90JnmE1lvNt4Myyc2EfWKl2y1IVuwaTxoukEM86urjnVN/ml8+17fbuf8Ek0J5gmUbK3sDZps5irRvOjledJ4J1c27f6Wy+Jl2njDG1vmm76VdyRV7vW2p9ews89kvttbTWOD+WBFP9byDKxi/I/wDfgejXyCd1PPl/w1aPsFTHtOFcuz3c3ufffiuUb7S3XGOYv/NXbe30U7j3gu5FlSbXWU95jUd/fynpfk2cX1SH3Rw3IepnFflo/4c8asimcWvl2ib8vybTXAkfWZYyzkmuNbG5LnBouV3cb5KHmiLLdwa+aFEP5Ky1W4k/GloVyzE5ajb0X62GzLrZRrtosvGLegb0vz/Wu9AzXT3paazTsFkuFTey+yHW19IaaFsQfis8DyBx5kvKVo/qAdRvJ3w5g8E2DOa8E/WizuSL6V9oVyBkLvnaf3/dubPbwy11XRzDXb7EbGrwJP+r6mm9U1O/xj9L3qDawbuJaKvglzjonnM4yZF34u92XArONZ5qUXTXWzR31l+VUe4TtcWsdiTB9oyxg5fTufcapq2ydMD7zfbCAz7I7zdPP9TaVbI+TVhIBJki2L+WAl81TGGeocUZdvUIp+NX2ykmGQxWY0svzbPU2HHMFYDvEfYndhyqOtBojPn9a/fe2dtWYoN+iT3c2uXox36iXnG7yTJT7bLN/vFIyBLOEXW76jhmavXsxzpWhusVwfAxnDGeIbGe8h+d+3+wvjLH7sY4udSGRcltrhL7Mh1LI8G49wT5Q80+z8Oxlv6Iez2DK7S3KH5VV7BX0U2qQy30yRzf9evmEkmcvbO5s96YdSHa+0GOPhlne9lsW4xti9m7U8C6suN1hs6kHeYRfNm4DDfG9EHUb98p3Fh4+zvTvKYoca0J8l+gf5Rq3aOdVie/pxPZS+Pdja5DDPFKrX+ygr7Hfr7bxWgnd5xL+B5UN+ibnIJH9Pi8e41+IqG1gul8uYE0AyPMm7POKZxvg0yVDHcuX1g85/SPho3E07DDgSJ2Y2yWT0Ub7qu4R5sQTPoT9acAveyxb8Fe8Xq51r2Tl3E+VUPFgj5lEPsTfm32/Pu1ca2++Yzlnb7mZuYn4D1WuEvdk6grGap7T/WtvezXhL4HnO7eA5u0xf/cj87Av5BgroI29SQM4wB3+zu4T32B3nl+ljUrmn7f30M+bjyKEtQrbfZHsTpAxkSMS3kVhN3tvV2WeP+Z6a830f+VC+5T04yZZue/EW6h6S4Re7V/Wv7U3jqbOprFVcG0Vfk/ZtwaOZe0f8n0M7BN27nNkJm1jsYnPLx3Kv9WMNuzM1wfJA5jFWTWUlM/YyvKNq++9E80nVoP1N9N9A5qTwLpvlSehv9skRZotLpH1D/T4MMueo7jvwrtACwdfbPdnR9rbsYsaqqdwdllN0gN1xexYMVohmNv3U4lke324AzHnUl7kORLObsSWi2UdfsMrKM5ve/ZDzgGgm27uZ+5mHRHz+YB5v9dF42j2En2N+twlcx0QTwzO15PmZa5rwD1vMfGGLVVtl56xmvKev9aQe74yfVu4Ii4f8xnz6exhLCZrIusE8+cJPtJxLve3t48dYR82prpZrdL75Lx6xOMy77T2LAszbI3keNh/fFWbb6YT5Gy+aKyymtwXPNWGcmE3jXYslTkJdEvEt9fCltv6UsHFyHdqzverbBLprJ8ARvdHuFPTgXBPNUMgQdJ4RtOMJX8psZd2tHWbQNoL36yNrr/k+htEOoG9f5xxRudNAnyE43nJ09wJ9ltrhfsbDa82fZnkFv7P3FOpbzt4hvDcqnq3RpyHeuKG9Y/WXvXf8rb2F/YP5x1+1M2NHxvyoDdeZDaQu1oEZqtc8e/vgPebbke/1FN8p07lsnq0DD9LHrbl8xM4UhWysnrQcUNvsbHKabygLP9befxnLWFnVPZVnQ9EMYjyb5NxseTJ3WazCYPra9O11puf8ZjFI2xjrIpqadjdtNNoh0LxgdsiLXGfUjy/R3qhv/7I1cDx1BtHs4Y/gCxZvXM/G+R7PywE5D6le9dCeQSfPZfuITw3GtwgubXaYeywWaxDf1dIc32V33B5Avc5pH/mQZ95wf9zijh6mX0D1Gk4dQ/KsZ1/oTly8nb8e5J0O0R+yMZZjfvAyZvvdYnM2y2xi5y1+soD5Q88wpkX85zKvjs7sv1EPCWuL5VFsZb6/vbwzojcrC9Mm+eWl9WQJ18bwJgLP8sBH2p9lKV7rDO0twPPbt6g7Ce5KfUP0MebTOWV3tT63HDvFzG/YmW8Q6Ns1PN8JLgX6EOf5FXUMlfUh41cFR5tt/3vmYAc+8nY/c55Ip7qDtqxCit01n/gBzlnxOcX6yvaSxPtNGj+pFitSnH468b9Ie7vkXGR3A59krhvhE6mPqe4z7a2ly0z/LGtj7E36rWrI5sbzl/h8xnc91P5TuE5K5rUWq3Y/350X/WnGrgSYeUVkS29CP77Kepd+RvXRB9z3hR9vOUOW2d2i3+mzU3xmBvUWydDRbEczLEffh3ZHPod5BiTPY3aWzOA9EeF78iysd1huZ1xByF9kZ8mnuXaJPpZrlOBOjAWVPMPpQ1QfJdKHKPgo/fuiv5W5AoRvZWe6JPw6Ij776I8QzMd7Tgp+m349jaufIPMZ8alNG6D4n+C5Q/R3sh/Vd3Nt7+gKfJhfcbyXLfqPLBd6C8bthJwktiZM4vv1X0n3g5yh3EJmE6tg8SdlaEvRXDtgvqfJ9oZsc8sLlGRzagNtNSprN88sgCNzhHXRnYs49HusaJ7nG46AI2dYs6U8x7gafVvO9tnHLYZwjJ2P5jGHm/hMY55JwBHfJWRoL/gH80NtYsyq6F+1e8QjzbbTyOKBqzA2WzI3Yxyp4EzOa8l5ueXuqM/xKd0pDTJkqaw/zV/wLPhME58Jpp/vNjmfNnvy1bz/orIepP9R8DHGG6hNitjZvLidrR4zv/y/tANInvssR/GnFmNfyM7vhW39acR5rW8X2X2fQYxhU1ulm83nVatvU/DZIpmzmXND68ME5tWRrnUPdQzxH8icq5JnjeVuirfcmOMYE6Xx39n05wF8619lPWQ2nzb2Ztmzdj/rEH4dEn0KzyaSYZW1YWPLy5Fp9tvepgu9QjuedPsUi9nowrsw4l/V4rqP292Bc/Y24nv06SgeoCbWk9P6dqzF8T5u+m0jO6NlMZd4eHcDc/+MxtUCu/tzF3Pga6+cbHbaIXbn6xU/v9Dvo7F6hcVwtsF4OCd8EcY2hPeCLR7mUVuTc82PMJG2btXrCOeO5GzFXIWKXXnYfMSzLH9mHvUWfbuAc7OE5injvqTDHwSi8Ne6D8h4CcFt7N70aOoVwEdiV8wH18XmYx3mLQFNJBaFfh/BM80vU8LmyEnTZ2aBvrrot1ourMbMwSh74GCLLRlCvUj0W2xvPc83jkNctMn2sef041kP33Ktu8zy2V5meewHMSdPeMeEb5OprN+trzMYY6Y2yeObqip3mr0LP9viwVbgTdJO4hNtsRlHGGsqX1Ixa58Zdo/pWt4hwre0bwy0u2PNzIaw0853bZkrQ/3YjrqNyh1g7xTfZfbbkrQnq02mMx5YcLz5aofT3q76zjfdIMbuhz4I+YPfrTP6LrzR0NXONbG0S0h3Omvn0JsZMyyZd9p5rRRzC2sP3cX7X6rLLYw/lDwP2lvw+VznwxnHYhGr2L2na2mfUR1Xc28Idh57y6+zvYlzwPSED+xc+azFPwwy+8Zz9ENJttlW920Wm5Fsvo8xkPmY6D9g/J74p1luhDl8K0dnk1/tzgLrwP+SBPOnJdcH6mQ8x+vvkXWIY4Njgu1HWz33S8YC0594KVURr8tG8HRX8f9MMdWM9pjUmKgE/FyLn79SYqK+wM8O/CzETzp+muCnDH5+HRQTlYefwpH/ChQoXDiq5ZLNb0RdXqKDJLktqmUuEWuKBEyHkWOT04emxA1OTx6SGTUoa3xchWZxY7IzszJTB2XUqVd/eO3+YxP6J/av3X/QqJFZqeOz+o8c1T9jTOqgUSMyojJT0wfHZaVmZsUNTh6anpoS1XbUmListKGZcZnJIzLSU6tf+kf9ujUGTshKjcvMGjN05JC4cUPT0+MGpsZlZ6amxCVnxg0dmZGdFZeSnJUcFR8RI65yXNc2t3ZC6bfX7t+2Y8t2Xft369WpTf87Wna9vUpcs2b/819vveuOTl3adO3a4a47Idig4akTWJU7u3fsGJWRPdD/OSo7iyWGf14q/7/+MT115H8wmUOHODwyOSt7TOp/MGgKNN9//bp+4n9lbv8ekTkkLTkzrW6d/8agebO4hLjKleMu/atps7i6Uf9jL6QOGpGdnvWfzhia2X9g9tD0rPjK6LoazcNfs8ZX+f9+PiR15P/CIkJBNhX+Rz6DU/ndxNQxo+IrD0mt0RyEVf9vy6Ey8f/PrmzVoZv3VZW4FnF162bHNY6rXy+7Ckbopf/aR7W8kIuRWqBAVMvV2wBUODd3/Ju7fyherUjVkxnz6/x5Q6eDBypsGldt3cc7iz7x7fBTraZFtZy2HYR3Lil74ep7pheMWrX4wS/yt18RdXF5wWKXz74yqk+Vor0P7r48Kv+PKYNfnMAUbDF/zT9SLOrA0pbd0+YWjtpZ9u8NxUteGbV/310nureNjnqy8rgTjSHHSXJN6JaGATwoOT15TNzgMMrHx+FX9sjhI0eNGym5kTTh33//+ffff6NabtyB72IiF6zgZ3njRI0vfnvtlmLgR3zsD7tfrzVmzRVRBVtfzL58cYGomzq3QVVzduJvSS1b1j8yr1/BqL9fKDT3/LAro/K37gbLq6LAFv+F/2OxidAdbfHDtIp7l2W+UPW7S39A2e+STzmV/dKd4zYtjfo58dJlL65HLRfsUtvmEYh55fS+yzZO7TYqPufKAh9MufV0VMvjxK8vUP3ubc02vJX64YjErGIHL4ufy5r5f7VzP26zLO6RM1PfODM6du6mZmW+m7Hw9IL0M28NP/ZUhaOzEkZPPTB3687RZV4t+uvKLcVLVTzw3woas/em6yY/WvCz8YOnx31bsWap3imlcgqWr7zuZEKf/R2fHtT1hwKLR8enl4gq3Wdpz1qdi0V1OLfim8TE6KhvJ7T+quhobJ2p1YZ9MxH1eY71KRvVckMEKBfVcg+B0pHnSNUzhM8sKhU1uETGmFEp2YNSx2QWiAY4KDUTKxGWqELR3Qdmj8zKjhuUnjxySMnaiTUTaibUqJ0dQdauWbvouOR0zIaiCTVrN6qZED0uOXNEjYFDR6ZgrpRKqFmnZoNGcfGNBiakJCYMapBcJariVVnJY4akZmGyRJaMzALVrhqRnZU8MD21xpD0UQOT0zP/D6UhBWI="},10467:(e,t,n)=>{"use strict";function r(e,t,n,r,a,i,s){try{var o=e[i](s),c=o.value}catch(e){return void n(e)}o.done?t(c):Promise.resolve(c).then(r,a)}function a(e){return function(){var t=this,n=arguments;return new Promise((function(a,i){var s=e.apply(t,n);function o(e){r(s,a,i,o,c,"next",e)}function c(e){r(s,a,i,o,c,"throw",e)}o(void 0)}))}}n.d(t,{A:()=>a})},90675:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(82284);function a(){a=function(){return t};var e,t={},n=Object.prototype,i=n.hasOwnProperty,s=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},c=o.iterator||"@@iterator",d=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function f(e,t,n,r){var a=t&&t.prototype instanceof g?t:g,i=Object.create(a.prototype),o=new O(r||[]);return s(i,"_invoke",{value:M(e,n,o)}),i}function p(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=f;var h="suspendedStart",b="suspendedYield",m="executing",y="completed",x={};function g(){}function v(){}function w(){}var V={};l(V,c,(function(){return this}));var T=Object.getPrototypeOf,S=T&&T(T(A([])));S&&S!==n&&i.call(S,c)&&(V=S);var k=w.prototype=g.prototype=Object.create(V);function _(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function n(a,s,o,c){var d=p(e[a],e,s);if("throw"!==d.type){var u=d.arg,l=u.value;return l&&"object"==(0,r.A)(l)&&i.call(l,"__await")?t.resolve(l.__await).then((function(e){n("next",e,o,c)}),(function(e){n("throw",e,o,c)})):t.resolve(l).then((function(e){u.value=e,o(u)}),(function(e){return n("throw",e,o,c)}))}c(d.arg)}var a;s(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,a){n(e,r,t,a)}))}return a=a?a.then(i,i):i()}})}function M(t,n,r){var a=h;return function(i,s){if(a===m)throw Error("Generator is already running");if(a===y){if("throw"===i)throw s;return{value:e,done:!0}}for(r.method=i,r.arg=s;;){var o=r.delegate;if(o){var c=I(o,r);if(c){if(c===x)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(a===h)throw a=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);a=m;var d=p(t,n,r);if("normal"===d.type){if(a=r.done?y:b,d.arg===x)continue;return{value:d.arg,done:r.done}}"throw"===d.type&&(a=y,r.method="throw",r.arg=d.arg)}}}function I(t,n){var r=n.method,a=t.iterator[r];if(a===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,I(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),x;var i=p(a,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,x;var s=i.arg;return s?s.done?(n[t.resultName]=s.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,x):s:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,x)}function N(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(N,this),this.reset(!0)}function A(t){if(t||""===t){var n=t[c];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,s=function n(){for(;++a=0;--a){var s=this.tryEntries[a],o=s.completion;if("root"===s.tryLoc)return r("end");if(s.tryLoc<=this.prev){var c=i.call(s,"catchLoc"),d=i.call(s,"finallyLoc");if(c&&d){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),E(n),x}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var a=r.arg;E(n)}return a}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:A(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),x}},t}},28453:(e,t,n)=>{"use strict";n.d(t,{R:()=>s,x:()=>o});var r=n(96540);const a={},i=r.createContext(a);function s(e){const t=r.useContext(i);return r.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:s(e.components),r.createElement(i.Provider,{value:t},e.children)}},2026:(e,t,n)=>{"use strict";n.d(t,{G:()=>yV});var r={};n.r(r),n.d(r,{aK:()=>Dc,e8:()=>kc,DO:()=>Sc,dJ:()=>qc,OG:()=>jc,My:()=>Pc,Ph:()=>Ac,lX:()=>Cc,Id:()=>Lc,fg:()=>Wc,qj:()=>Bc,aT:()=>Oc,r4:()=>Uc,aY:()=>Tc,x:()=>Kc,lq:()=>Hc,z:()=>Rc,zW:()=>Mc,Q5:()=>Gc});var a={};n.r(a),n.d(a,{BitVec:()=>Fd,Bool:()=>jo,Bytes:()=>sr,Data:()=>lu,F32:()=>Wd,F64:()=>Zd,GeneralExtrinsic:()=>Ss,GenericAccountId:()=>mo,GenericAccountId32:()=>mo,GenericAccountId33:()=>yo,GenericAccountIndex:()=>To,GenericAddress:()=>qo,GenericBlock:()=>So,GenericCall:()=>Mo,GenericChainProperties:()=>Eo,GenericConsensusEngineId:()=>Bo,GenericEthereumAccountId:()=>zd,GenericEthereumLookupSource:()=>qd,GenericEvent:()=>zi,GenericEventData:()=>Li,GenericExtrinsic:()=>$i,GenericExtrinsicEra:()=>ss,GenericExtrinsicPayload:()=>ds,GenericExtrinsicPayloadUnknown:()=>us,GenericExtrinsicPayloadV4:()=>bs,GenericExtrinsicPayloadV5:()=>vs,GenericExtrinsicSignatureV4:()=>xs,GenericExtrinsicSignatureV5:()=>Ts,GenericExtrinsicUnknown:()=>ls,GenericExtrinsicV4:()=>hs,GenericExtrinsicV5:()=>gs,GenericImmortalEra:()=>as,GenericLookupSource:()=>Uo,GenericMortalEra:()=>is,GenericMultiAddress:()=>qo,GenericSignerPayload:()=>ps,GenericVote:()=>Zo,I128:()=>Qd,I16:()=>Kd,I256:()=>$d,I32:()=>Jd,I64:()=>Yd,I8:()=>Gd,ISize:()=>eu,Null:()=>Jt,OptionBool:()=>tu,StorageKey:()=>mu,Text:()=>ru,Type:()=>au,U128:()=>ou,U16:()=>su,U256:()=>cu,U32:()=>xo,U64:()=>es,U8:()=>iu,USize:()=>du,bool:()=>jo,f32:()=>Wd,f64:()=>Zd,i128:()=>Qd,i16:()=>Kd,i256:()=>$d,i32:()=>Jd,i64:()=>Yd,i8:()=>Gd,isize:()=>eu,u128:()=>ou,u16:()=>su,u256:()=>cu,u32:()=>xo,u64:()=>es,u8:()=>iu,usize:()=>du});var i={};n.r(i),n.d(i,{assetConversion:()=>Nu,assets:()=>Eu,attestations:()=>Cl,aura:()=>Ou,author:()=>mf,authorship:()=>Au,babe:()=>Hu,balances:()=>Ru,beefy:()=>zu,benchmark:()=>Uu,blockbuilder:()=>Xu,bridges:()=>Hl,chain:()=>yf,childstate:()=>xf,claims:()=>Rl,collective:()=>Wu,consensus:()=>Zu,contracts:()=>Ku,contractsAbi:()=>df,crowdloan:()=>Bl,cumulus:()=>Ll,democracy:()=>Ju,dev:()=>Yu,discovery:()=>Qu,dryRunApi:()=>nf,elections:()=>$u,engine:()=>el,eth:()=>lf,evm:()=>tl,extrinsics:()=>nl,finality:()=>Ul,fungibles:()=>rl,genericAsset:()=>al,genesisBuilder:()=>il,gilt:()=>sl,grandpa:()=>cl,identity:()=>dl,imOnline:()=>ul,lottery:()=>ll,metadata:()=>vu,mixnet:()=>fl,mmr:()=>pl,nfts:()=>hl,nimbus:()=>ff,nompools:()=>bl,offchain:()=>gf,offences:()=>ml,ormlOracle:()=>pf,ormlTokens:()=>hf,parachains:()=>$l,payment:()=>kf,poll:()=>ef,pow:()=>yl,proxy:()=>xl,purchase:()=>tf,recovery:()=>gl,rpc:()=>bf,runtime:()=>Mu,scaleInfo:()=>Iu,scheduler:()=>vl,session:()=>wl,society:()=>Vl,staking:()=>Tl,state:()=>_f,statement:()=>Sl,support:()=>kl,syncstate:()=>_l,system:()=>Pl,treasury:()=>Ml,txpayment:()=>Il,txqueue:()=>Nl,uniques:()=>El,utility:()=>Ol,vesting:()=>Al,xcm:()=>sf,xcmPaymentApi:()=>of,xcmRuntimeApi:()=>cf});var s={};n.r(s),n.d(s,{kusama:()=>vh,polkadot:()=>wh,westend:()=>Vh});var o={};n.r(o),n.d(o,{_flags:()=>Tb,_identity:()=>Eb,accountId:()=>Vb,flags:()=>Sb,hasIdentity:()=>Ab,hasIdentityMulti:()=>Cb,idAndIndex:()=>kb,idToIndex:()=>Hb,identity:()=>Ob,indexToId:()=>qb,indexes:()=>Db,info:()=>Fb});var c={};n.r(c),n.d(c,{hasProposals:()=>nm,members:()=>tm,prime:()=>om,proposal:()=>rm,proposalCount:()=>am,proposalHashes:()=>im,proposals:()=>sm});var d={};n.r(d),n.d(d,{_getIds:()=>dm,all:()=>um,expand:()=>fm,get:()=>lm,getExpanded:()=>pm,listNodes:()=>bm});var u={};n.r(u),n.d(u,{account:()=>Am,all:()=>_m,votingBalance:()=>Hm,votingBalances:()=>Cm});var l={};n.r(l),n.d(l,{bounties:()=>Lm});var f={};n.r(f),n.d(f,{_getHeaderRange:()=>Qm,bestNumber:()=>jm,bestNumberFinalized:()=>Fm,bestNumberLag:()=>Xm,getBlock:()=>Zm,getBlockByNumber:()=>Gm,getHeader:()=>Jm,subscribeFinalizedBlocks:()=>Ym,subscribeFinalizedHeads:()=>$m,subscribeNewBlocks:()=>ey,subscribeNewHeads:()=>ty});var p={};n.r(p),n.d(p,{fees:()=>ny});var h={};n.r(h),n.d(h,{hasProposals:()=>dy,members:()=>cy,prime:()=>hy,proposal:()=>uy,proposalCount:()=>ly,proposalHashes:()=>fy,proposals:()=>py,votes:()=>sy,votesOf:()=>oy});var b={};n.r(b),n.d(b,{childKey:()=>by,contributions:()=>Vy,ownContributions:()=>ky});var m={};n.r(m),n.d(m,{_referendumInfo:()=>tx,_referendumVotes:()=>$y,_referendumsVotes:()=>ex,dispatchQueue:()=>Hy,locks:()=>Ly,nextExternal:()=>zy,preimage:()=>Fy,preimages:()=>jy,proposals:()=>Wy,referendumIds:()=>Zy,referendums:()=>Gy,referendumsActive:()=>Ky,referendumsFinished:()=>Jy,referendumsInfo:()=>nx,sqrtElectorate:()=>rx});var y={};n.r(y),n.d(y,{info:()=>ox});var x={};n.r(x),n.d(x,{receivedHeartbeats:()=>dx});var g={};n.r(g),n.d(g,{hasProposals:()=>lx,members:()=>ux,prime:()=>mx,proposal:()=>fx,proposalCount:()=>px,proposalHashes:()=>hx,proposals:()=>bx});var v={};n.r(v),n.d(v,{info:()=>vx,overview:()=>Vx});var w={};n.r(w),n.d(w,{eraLength:()=>Mx,eraProgress:()=>Ix,indexes:()=>Sx,info:()=>kx,progress:()=>Px,sessionProgress:()=>Nx});var V={};n.r(V),n.d(V,{_members:()=>Cx,candidates:()=>Ex,info:()=>Ox,member:()=>Ax,members:()=>Hx});var T={};n.r(T),n.d(T,{_eraExposure:()=>ag,_eraPrefs:()=>hg,_eraSlashes:()=>Vg,_erasExposure:()=>sg,_erasPoints:()=>lg,_erasPrefs:()=>mg,_erasRewards:()=>gg,_erasSlashes:()=>Sg,_ownExposures:()=>Ig,_ownSlashes:()=>Og,_stakerExposures:()=>Ug,_stakerPoints:()=>jg,_stakerPrefs:()=>Xg,_stakerRewards:()=>Jg,_stakerRewardsEras:()=>Kg,_stakerSlashes:()=>ev,account:()=>Ux,accounts:()=>zx,currentPoints:()=>Dx,electedInfo:()=>jx,eraExposure:()=>ig,eraPrefs:()=>bg,eraSlashes:()=>Tg,erasExposure:()=>og,erasHistoric:()=>cg,erasPoints:()=>fg,erasPrefs:()=>yg,erasRewards:()=>vg,erasSlashes:()=>kg,keys:()=>_g,keysMulti:()=>Pg,nextElected:()=>rv,overview:()=>Mg,ownExposure:()=>Ng,ownExposures:()=>Eg,ownSlash:()=>Ag,ownSlashes:()=>Cg,query:()=>Lg,queryMulti:()=>zg,stakerExposure:()=>qg,stakerExposures:()=>Dg,stakerPoints:()=>Fg,stakerPrefs:()=>Wg,stakerRewards:()=>Yg,stakerRewardsMulti:()=>$g,stakerRewardsMultiEras:()=>Qg,stakerSlashes:()=>tv,stashes:()=>nv,validators:()=>av,waitingInfo:()=>sv});var S={};n.r(S),n.d(S,{hasProposals:()=>cv,members:()=>ov,prime:()=>pv,proposal:()=>dv,proposalCount:()=>uv,proposalHashes:()=>lv,proposals:()=>fv});var k={};n.r(k),n.d(k,{proposals:()=>hv});var _={};n.r(_),n.d(_,{events:()=>bv,signingInfo:()=>Sv});var P=n(56199),M=n(76284),I=n(25311),N=n(82422),E=n(79931);const O="@polkadot/api",A=(new URL("file:///home/runner/work/polkadot-wiki/polkadot-wiki/node_modules/@polkadot/api/packageInfo.js").pathname.substring(0,new URL("file:///home/runner/work/polkadot-wiki/polkadot-wiki/node_modules/@polkadot/api/packageInfo.js").pathname.lastIndexOf("/")+1),"14.2.1");function C(e,t){return e.findMetaCall((0,E.e)(t))}function H(e,t){return e.findMetaError((0,E.e)(t))}function R(e){var t=e((function(e){Error.call(e),e.stack=(new Error).stack}));return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var B=R((function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}})),L=n(31635);function z(e){return"function"==typeof e}var U=R((function(e){return function(t){e(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map((function(e,t){return t+1+") "+e.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=t}}));function D(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var q=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var e,t,n,r,a;if(!this.closed){this.closed=!0;var i=this._parentage;if(i)if(this._parentage=null,Array.isArray(i))try{for(var s=(0,L.__values)(i),o=s.next();!o.done;o=s.next()){o.value.remove(this)}}catch(p){e={error:p}}finally{try{o&&!o.done&&(t=s.return)&&t.call(s)}finally{if(e)throw e.error}}else i.remove(this);var c=this.initialTeardown;if(z(c))try{c()}catch(h){a=h instanceof U?h.errors:[h]}var d=this._finalizers;if(d){this._finalizers=null;try{for(var u=(0,L.__values)(d),l=u.next();!l.done;l=u.next()){var f=l.value;try{X(f)}catch(b){a=null!=a?a:[],b instanceof U?a=(0,L.__spreadArray)((0,L.__spreadArray)([],(0,L.__read)(a)),(0,L.__read)(b.errors)):a.push(b)}}}catch(m){n={error:m}}finally{try{l&&!l.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}}if(a)throw new U(a)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)X(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=null!==(n=this._finalizers)&&void 0!==n?n:[]).push(t)}},e.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},e.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},e.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&D(t,e)},e.prototype.remove=function(t){var n=this._finalizers;n&&D(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}(),j=q.EMPTY;function F(e){return e instanceof q||e&&"closed"in e&&z(e.remove)&&z(e.add)&&z(e.unsubscribe)}function X(e){z(e)?e():e.unsubscribe()}var W={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Z={setTimeout:function(e,t){for(var n=[],r=2;r{return n=t,!Array.isArray(n)||2!==n.length||function(e,t){return(0,Fe.b)(e)||(We(e)?!e.eq(t):e!==t)}(e.get(t[0]),t[1]);var n}))}function Ge(e,t){return Array.isArray(t)?Ze(e,t):t instanceof Map?Ze(e,[...t.entries()]):!!(0,Xe.G)(t)&&Ze(e,Object.entries(t))}class Ke extends Map{registry;createdAtHash;initialU8aLength;isStorageFallback;constructor(e,t){const n=function(e){return Object.entries(e||{})}(t);super(n),this.registry=e,De(this,n.map((([e])=>e)),(e=>this.get(e)))}get encodedLength(){return 0}get hash(){return this.registry.hash(this.toU8a())}get isEmpty(){return 0===[...this.keys()].length}eq(e){return Ge(this,e)}getT(e){return this.get(e)}inspect(){throw new Error("Unimplemented")}toHex(){throw new Error("Unimplemented")}toHuman(){return[...this.entries()].reduce(((e,[t,n])=>(e[t]=(0,qe.T)(n?.toHuman)?n.toHuman():n,e)),{})}toJSON(){return[...this.entries()].reduce(((e,[t,n])=>(e[t]=n,e)),{})}toPrimitive(e){return[...this.entries()].reduce(((t,[n,r])=>(t[n]=(0,qe.T)(r.toPrimitive)?r.toPrimitive(e):r,t)),{})}toRawType(){return"Json"}toString(){return(0,je.A)(this.toJSON())}toU8a(e){throw new Error("Unimplemented")}}var Je=n(74749);function Ye(e){for(let t=0,n=e.length;t126)return!1}return!0}function Qe(e){return(0,I.K)(e)?(0,Je.qv)(e)?Ye((0,E.e)(e)):function(e){for(let t=0,n=e.length;t126)return!1}return!0}(e):!!e&&Ye(e)}var $e=n(75487);class et{__encoding;constructor(e){this.__encoding=e}decode(e){let t="";for(let n=0,r=e.length;n!!e)))}get isUtf8(){return function(e){if(!e)return(0,I.K)(e);const t=(0,E.e)(e),n=t.length;let r=0;for(;r=194&&t[r]<=223){if(!(r+1191)return!1;r+=2}else if(224===t[r]){if(!(r+2191)return!1;if(t[r+2]<128||t[r+2]>191)return!1;r+=3}else if(t[r]>=225&&t[r]<=236){if(!(r+2191)return!1;if(t[r+2]<128||t[r+2]>191)return!1;r+=3}else if(237===t[r]){if(!(r+2159)return!1;if(t[r+2]<128||t[r+2]>191)return!1;r+=3}else if(t[r]>=238&&t[r]<=239){if(!(r+2191)return!1;if(t[r+2]<128||t[r+2]>191)return!1;r+=3}else if(240===t[r]){if(!(r+3191)return!1;if(t[r+2]<128||t[r+2]>191)return!1;if(t[r+3]<128||t[r+3]>191)return!1;r+=4}else if(t[r]>=241&&t[r]<=243){if(!(r+3191)return!1;if(t[r+2]<128||t[r+2]>191)return!1;if(t[r+3]<128||t[r+3]>191)return!1;r+=4}else{if(244!==t[r])return!1;if(!(r+3143)return!1;if(t[r+2]<128||t[r+2]>191)return!1;if(t[r+3]<128||t[r+3]>191)return!1;r+=4}return!0}(this)}bitLength(){return 8*this.length}eq(e){return e instanceof Uint8Array?this.length===e.length&&!this.some(((t,n)=>t!==e[n])):this.eq((0,E.e)(e))}inspect(){return{outer:[this.toU8a()]}}toHex(){return(0,N.X)(this)}toHuman(e,t){return this.toPrimitive(t)}toJSON(){return this.toHex()}toPrimitive(e){if(!e&&this.isAscii){const e=this.toUtf8();if(Qe(e))return e}return this.toJSON()}toRawType(){return"Raw"}toString(){return this.toHex()}toU8a(e){return Uint8Array.from(this)}toUtf8(){if(!this.isUtf8)throw new Error("The character sequence is not a valid Utf8 string");return nt(this)}}class at{registry;createdAtHash;isStorageFallback;__internal__neverError;constructor(e,t="DoNotConstruct"){throw this.registry=e,this.__internal__neverError=new Error(`DoNotConstruct: Cannot construct unknown type ${t}`),this.__internal__neverError}static with(e){return class extends at{constructor(t){super(t,e)}}}get encodedLength(){throw this.__internal__neverError}get hash(){throw this.__internal__neverError}get isEmpty(){throw this.__internal__neverError}eq(){throw this.__internal__neverError}inspect(){throw this.__internal__neverError}toHex(){throw this.__internal__neverError}toHuman(){throw this.__internal__neverError}toJSON(){throw this.__internal__neverError}toPrimitive(){throw this.__internal__neverError}toRawType(){throw this.__internal__neverError}toString(){throw this.__internal__neverError}toU8a(){throw this.__internal__neverError}}var it=n(52502),st=n(39404);function ot(e,{isLe:t=!0,isNegative:n=!1}={}){t||(e=e.slice().reverse());const r=e.length;if(n&&r&&128&e[r-1])switch(r){case 0:return new st(0);case 1:return new st(-1*(255^e[0])-1);case 2:return new st(-1*(e[0]+(e[1]<<8)^65535)-1);case 3:return new st(-1*(e[0]+(e[1]<<8)+(e[2]<<16)^16777215)-1);case 4:return new st(-1*(e[0]+(e[1]<<8)+(e[2]<<16)+16777216*e[3]^4294967295)-1);case 5:return new st(-1*((e[0]+(e[1]<<8)+(e[2]<<16)+16777216*e[3]^4294967295)+4294967296*(255^e[4]))-1);case 6:return new st(-1*((e[0]+(e[1]<<8)+(e[2]<<16)+16777216*e[3]^4294967295)+4294967296*(e[4]+(e[5]<<8)^65535))-1);default:return new st(e,"le").fromTwos(8*r)}switch(r){case 0:return new st(0);case 1:return new st(e[0]);case 2:return new st(e[0]+(e[1]<<8));case 3:return new st(e[0]+(e[1]<<8)+(e[2]<<16));case 4:return new st(e[0]+(e[1]<<8)+(e[2]<<16)+16777216*e[3]);case 5:return new st(e[0]+(e[1]<<8)+(e[2]<<16)+16777216*(e[3]+(e[4]<<8)));case 6:return new st(e[0]+(e[1]<<8)+(e[2]<<16)+16777216*(e[3]+(e[4]<<8)+(e[5]<<16)));default:return new st(e,"le")}}function ct(e){const t=(0,E.e)(e);switch(3&t[0]){case 0:return[1,new st(t[0]>>>2)];case 1:return[2,new st(t[0]+(t[1]<<8)>>>2)];case 2:return[4,new st(t[0]+(t[1]<<8)+(t[2]<<16)+16777216*t[3]>>>2)];default:{const e=5+(t[0]>>>2);switch(e){case 5:return[5,new st(t[1]+(t[2]<<8)+(t[3]<<16)+16777216*t[4])];case 6:return[6,new st(t[1]+(t[2]<<8)+(t[3]<<16)+16777216*(t[4]+(t[5]<<8)))];case 7:return[7,new st(t[1]+(t[2]<<8)+(t[3]<<16)+16777216*(t[4]+(t[5]<<8)+(t[6]<<16)))];default:return[e,ot(t.subarray(1,e))]}}}}function dt(e){switch(3&e[0]){case 0:return[1,e[0]>>>2];case 1:return[2,e[0]+(e[1]<<8)>>>2];case 2:return[4,e[0]+(e[1]<<8)+(e[2]<<16)+16777216*e[3]>>>2];default:switch(5+(e[0]>>>2)){case 5:return[5,e[1]+(e[2]<<8)+(e[3]<<16)+16777216*e[4]];case 6:return[6,e[1]+(e[2]<<8)+(e[3]<<16)+16777216*(e[4]+(e[5]<<8))];case 7:return[7,e[1]+(e[2]<<8)+(e[3]<<16)+16777216*(e[4]+(e[5]<<8)+(e[6]<<16))];default:throw new Error("Compact input is > Number.MAX_SAFE_INTEGER")}}}var ut=n(336);const lt=new st(0),ft=new st(1),pt=new st(2),ht=new st(100),bt=new st(1e6),mt=new st(1e9),yt=mt.mul(mt),xt=new st(Number.MAX_SAFE_INTEGER),gt=new st(94906265);function vt(e,{isLe:t=!1,isNegative:n=!1}={}){if(!e||"0x"===e)return new st(0);const r=function(e){if(!e||"0x"===e)return"";if(Je.eR.test(e))return e.substring(2);if(Je.Ed.test(e))return e;throw new Error(`Expected hex value to convert, found '${e}'`)}(e),a=new st(r,16,t?"le":"be");return n?a.fromTwos(4*r.length):a}var wt=n(26805),Vt=n(77389);const Tt=(0,Vt.Mp)("toBigInt"),St=(0,Vt.Mp)("toBn");function kt(e){return e?st.isBN(e)?e:(0,Je.qv)(e)?vt(e.toString()):(0,wt.s)(e)?new st(e.toString()):St(e)?e.toBn():Tt(e)?new st(e.toBigInt().toString()):new st(e):new st(0)}const _t={bitLength:-1,isLe:!0,isNegative:!1};function Pt(e,{bitLength:t=-1,isLe:n=!0,isNegative:r=!1}=_t){const a=kt(e),i=-1===t?Math.ceil(a.bitLength()/8):Math.ceil((t||0)/8);if(!e)return-1===t?new Uint8Array(1):new Uint8Array(i);const s=new Uint8Array(i),o=r?a.toTwos(8*i):a;return s.set(o.toArray(n?"le":"be",i),0),s}function Mt(...e){const t=e.length,n=new Array(t);let r=0;for(let a=0;aWe(e)?!e.eq(t[n]):e!==t[n]))))}class Bt extends Array{registry;createdAtHash;initialU8aLength;isStorageFallback;static get[Symbol.species](){return Array}constructor(e,t){super(t),this.registry=e}get encodedLength(){const e=this.length;let t=Ht(e).length;for(let n=0;n{const n=t.replace(/[-_., ]+/g," ").trim().split(" ");let r="";for(let a=0,i=n.length;a(t?zt[e.charCodeAt(0)]:Ut[e.charCodeAt(0)])+e.slice(1))),Ft=qt((e=>zt[e.charCodeAt(0)]+e.slice(1)));function Xt(e,t){return"function"==typeof t?t:e.createClassUnsafe(t)}function Wt(e,t){const n=t.length,r=new Array(n);for(let a=0;a(0,Lt.E)(e)))){if(!t.every((e=>(0,Lt.E)(e)&&e>=0&&e<=255)))throw new Error("Invalid number-indexed enum definition");return!1}return!0}(t)){const[i,s]=Zt(e,t);for(let e=0,t=s.length;ee!==Jt)),a=!1}else{const e=Object.entries(t);for(let t=0,r=e.length;te.toLowerCase())),i=n.toLowerCase(),s=a.indexOf(i);if(-1===s)throw new Error(`Cannot map Enum JSON, unable to find '${n}' in ${a.join(", ")}`);try{return en(e,t,Object.values(t)[s].index,r)}catch(o){throw new Error(`Enum(${n}):: ${o.message}`)}}class nn{registry;createdAtHash;initialU8aLength;isStorageFallback;__internal__def;__internal__entryIndex;__internal__indexes;__internal__isBasic;__internal__isIndexed;__internal__raw;constructor(e,t,n,r,{definition:a,setDefinition:i=P.D}={}){const{def:s,isBasic:o,isIndexed:c}=a||i(Yt(e,t)),d=(0,ut.b)(n)&&n.length&&!(0,Lt.E)(r)?$t(e,s,n[0],n.subarray(1)):function(e,t,n,r){if((0,Lt.E)(r))return en(e,t,r,n);if((0,ut.b)(n)||(0,Je.qv)(n)){const r=(0,E.e)(n);if(r.length)return $t(e,t,r[0],r.subarray(1))}else{if(n instanceof nn)return en(e,t,n.index,n.value);if((0,Lt.E)(n))return en(e,t,n);if((0,I.K)(n))return tn(e,t,n.toString());if((0,Xe.G)(n)){const r=Object.keys(n)[0];return tn(e,t,r,n[r])}}return en(e,t,Object.values(t)[0].index)}(e,s,n,r);this.registry=e,this.__internal__def=s,this.__internal__isBasic=o,this.__internal__isIndexed=c,this.__internal__indexes=Object.values(s).map((({index:e})=>e)),this.__internal__entryIndex=this.__internal__indexes.indexOf(d.index),this.__internal__raw=d.value,this.__internal__raw.initialU8aLength&&(this.initialU8aLength=1+this.__internal__raw.initialU8aLength)}static with(e){let t;const n=e=>t=e;return class extends nn{static{const t=Array.isArray(e)?e:Object.keys(e),n=t.length,r=new Array(n),a=new Array(n);for(let e=0;er.type===t[n])),De(this.prototype,r,((e,n,r)=>{if(r.type!==t[n])throw new Error(`Cannot convert '${r.type}' via ${e}`);return r.value}))}constructor(r,a,i){super(r,e,a,i,{definition:t,setDefinition:n})}}}get encodedLength(){return 1+this.__internal__raw.encodedLength}get hash(){return this.registry.hash(this.toU8a())}get index(){return this.__internal__indexes[this.__internal__entryIndex]}get inner(){return this.__internal__raw}get isBasic(){return this.__internal__isBasic}get isEmpty(){return this.__internal__raw.isEmpty}get isNone(){return this.__internal__raw instanceof Jt}get defIndexes(){return this.__internal__indexes}get defKeys(){return Object.keys(this.__internal__def)}get type(){return this.defKeys[this.__internal__entryIndex]}get value(){return this.__internal__raw}eq(e){return(0,ut.b)(e)?!this.toU8a().some(((t,n)=>t!==e[n])):(0,Lt.E)(e)?this.toNumber()===e:this.__internal__isBasic&&(0,I.K)(e)?this.type===e:(0,Je.qv)(e)?this.toHex()===e:e instanceof nn?this.index===e.index&&this.value.eq(e.value):(0,Xe.G)(e)?this.value.eq(e[this.type]):this.value.eq(e)}inspect(){if(this.__internal__isBasic)return{outer:[new Uint8Array([this.index])]};const{inner:e,outer:t=[]}=this.__internal__raw.inspect();return{inner:e,outer:[new Uint8Array([this.index]),...t]}}toHex(){return(0,N.X)(this.toU8a())}toHuman(e,t){return this.__internal__isBasic||this.isNone?this.type:{[this.type]:this.__internal__raw.toHuman(e,t)}}toJSON(){return this.__internal__isBasic?this.type:{[jt(this.type)]:this.__internal__raw.toJSON()}}toNumber(){return this.index}toPrimitive(e){return this.__internal__isBasic?this.type:{[jt(this.type)]:this.__internal__raw.toPrimitive(e)}}_toRawStruct(){if(this.__internal__isBasic)return this.__internal__isIndexed?this.defKeys.reduce(((e,t,n)=>(e[t]=this.__internal__indexes[n],e)),{}):this.defKeys;const e=Object.entries(this.__internal__def);return Gt(this.registry,e.reduce(((e,[t,{Type:n}],r)=>(e[0][r]=n,e[1][r]=t,e)),[new Array(e.length),new Array(e.length)]))}toRawType(){return(0,je.A)({_enum:this._toRawStruct()})}toString(){return this.isNone?this.type:(0,je.A)(this.toJSON())}toU8a(e){return e?this.__internal__raw.toU8a(e):It([new Uint8Array([this.index]),this.__internal__raw.toU8a(e)])}}function rn(e){return"boolean"==typeof e}function an(e,t,n,{message:r},a,i,s,o,c){let d="";try{d=`: ${new o(e).toRawType()}`}catch{}return`${t}: failed at ${(0,N.X)(a.subarray(0,16))}\u2026${c?` on ${c}`:""} (index ${i+1}/${s})${d}:: ${r}`}function sn(e,t,n,[r,a]){const i=t.length;let s=0,o=0;try{for(;on=e;return class extends dn{static{const t=Object.keys(e);De(this.prototype,t,((e,t,n)=>n.get(e)))}constructor(a,i){super(a,e,i,t,{definition:n,setDefinition:r})}}}get defKeys(){return this.__internal__Types[1]}get isEmpty(){for(const e of this.values())if(!e.isEmpty)return!1;return!0}get encodedLength(){let e=0;for(const t of this.values())e+=t.encodedLength;return e}get hash(){return this.registry.hash(this.toU8a())}get Type(){const e={},[t,n]=this.__internal__Types;for(let r=0,a=n.length;r ${(0,je.A)(t)} (typeof ${typeof t})`)}const vn=(0,it.v)("Map");function wn(e,t,n,r){const a=new Map;for(const[s,o]of r.entries()){const r=t.prototype instanceof Bt||t.prototype instanceof dn||t.prototype instanceof nn;try{a.set(s instanceof t?s:new t(e,r&&"string"==typeof s?JSON.parse(s):s),o instanceof n?o:new n(e,o))}catch(i){throw vn.error("Failed to decode key or value:",i.message),i}}return[t,n,a,0]}function Vn(e,t,n,r){const a=Xt(e,t),i=Xt(e,n);if(!r)return[a,i,new Map,0];if((0,ut.b)(r)||(0,Je.qv)(r))return function(e,t,n,r){const a=new Map,[i,s]=dt(r),o=[];for(let u=0;uxn("BTreeMap",t,e))).sort((([e],[t])=>gn(e,t))))}(o):o),this.registry=e,this.initialU8aLength=c,this.__internal__KeyClass=i,this.__internal__ValClass=s,this.__internal__type=a}get encodedLength(){let e=Ht(this.size).length;for(const[t,n]of this.entries())e+=t.encodedLength+n.encodedLength;return e}get hash(){return this.registry.hash(this.toU8a())}get isEmpty(){return 0===this.size}eq(e){return Ge(this,e)}inspect(){const e=[];for(const[t,n]of this.entries())e.push(t.inspect()),e.push(n.inspect());return{inner:e,outer:[Ht(this.size)]}}toHex(){return(0,N.X)(this.toU8a())}toHuman(e,t){const n={};for(const[r,a]of this.entries())n[r instanceof rt&&!t&&r.isAscii?r.toUtf8():r.toString()]=a.toHuman(e,t);return n}toJSON(){const e={};for(const[t,n]of this.entries())e[t.toString()]=n.toJSON();return e}toPrimitive(e){const t={};for(const[n,r]of this.entries())t[n instanceof rt&&!e&&n.isAscii?n.toUtf8():n.toString()]=r.toPrimitive(e);return t}toRawType(){return`${this.__internal__type}<${this.registry.getClassName(this.__internal__KeyClass)||new this.__internal__KeyClass(this.registry).toRawType()},${this.registry.getClassName(this.__internal__ValClass)||new this.__internal__ValClass(this.registry).toRawType()}>`}toString(){return(0,je.A)(this.toJSON())}toU8a(e){const t=[];e||t.push(Ht(this.size));for(const[n,r]of this.entries())t.push(n.toU8a(e),r.toU8a(e));return It(t)}}class Sn extends Tn{static with(e,t){return class extends Sn{constructor(n,r){super(n,e,t,r,"BTreeMap")}}}}function kn(e,t){return e.size===t.length&&!t.some((t=>!e.has(t)))}const _n=(0,it.v)("BTreeSet");function Pn(e,t,n){const r=Xt(e,t);if(!n)return[r,new Set,0];if((0,ut.b)(n)||(0,Je.qv)(n))return function(e,t,n){const r=new Set,[a,i]=dt(n),s=new Array(i),[o]=on(e,s,n,a,t);for(let c=0;c{try{r.add(n instanceof t?n:new t(e,n))}catch(a){throw _n.error("Failed to decode key or value:",a.message),a}})),[t,r,0]}(e,r,n);throw new Error("BTreeSet: cannot decode type")}class Mn extends Set{registry;createdAtHash;initialU8aLength;isStorageFallback;__internal__ValClass;constructor(e,t,n){const[r,a,i]=Pn(e,t,n);super(function(e){const t=new Set;return new Set(Array.from(e).filter((e=>xn("BTreeSet",t,e))).sort(gn))}(a)),this.registry=e,this.initialU8aLength=i,this.__internal__ValClass=r}static with(e){return class extends Mn{constructor(t,n){super(t,e,n)}}}get encodedLength(){let e=Ht(this.size).length;for(const t of this.values())e+=t.encodedLength;return e}get hash(){return this.registry.hash(this.toU8a())}get isEmpty(){return 0===this.size}get strings(){return[...super.values()].map((e=>e.toString()))}eq(e){return t=this,n=e,Array.isArray(n)?kn(t,n):n instanceof Set?kn(t,[...n.values()]):!!(0,Xe.G)(n)&&kn(t,Object.values(n));var t,n}inspect(){const e=[];for(const t of this.values())e.push(t.inspect());return{inner:e,outer:[Ht(this.size)]}}toHex(){return(0,N.X)(this.toU8a())}toHuman(e,t){const n=[];for(const r of this.values())n.push(r.toHuman(e,t));return n}toJSON(){const e=[];for(const t of this.values())e.push(t.toJSON());return e}toRawType(){return`BTreeSet<${this.registry.getClassName(this.__internal__ValClass)||new this.__internal__ValClass(this.registry).toRawType()}>`}toPrimitive(e){const t=[];for(const n of this.values())t.push(n.toPrimitive(e));return t}toString(){return(0,je.A)(this.toJSON())}toU8a(e){const t=[];e||t.push(Ht(this.size));for(const n of this.values())t.push(n.toU8a(e));return It(t)}}class In{registry;createdAtHash;initialU8aLength;isStorageFallback;__internal__Type;__internal__raw;constructor(e,t,n=0,{definition:r,setDefinition:a=P.D}={}){this.registry=e,this.__internal__Type=r||a(Xt(e,t));const[i,s]=function(e,t,n){if((0,ut.b)(n)){const[r,a]=(3&n[0])<3?dt(n):ct(n);return[new t(e,a),r]}if(n instanceof In){const r=n.unwrap();return r instanceof t?[r,0]:[new t(e,r),0]}return n instanceof t?[n,0]:[new t(e,n),0]}(e,this.__internal__Type,n);this.initialU8aLength=s,this.__internal__raw=i}static with(e){let t;const n=e=>t=e;return class extends In{constructor(r,a){super(r,e,a,{definition:t,setDefinition:n})}}}get encodedLength(){return this.toU8a().length}get hash(){return this.registry.hash(this.toU8a())}get isEmpty(){return this.__internal__raw.isEmpty}bitLength(){return this.__internal__raw.bitLength()}eq(e){return this.__internal__raw.eq(e instanceof In?e.__internal__raw:e)}inspect(){return{outer:[this.toU8a()]}}toBigInt(){return this.__internal__raw.toBigInt()}toBn(){return this.__internal__raw.toBn()}toHex(e){return this.__internal__raw.toHex(e)}toHuman(e,t){return this.__internal__raw.toHuman(e,t)}toJSON(){return this.__internal__raw.toJSON()}toNumber(){return this.__internal__raw.toNumber()}toPrimitive(e){return this.__internal__raw.toPrimitive(e)}toRawType(){return`Compact<${this.registry.getClassName(this.__internal__Type)||this.__internal__raw.toRawType()}>`}toString(){return this.__internal__raw.toString()}toU8a(e){return Ht(this.__internal__raw.toBn())}unwrap(){return this.__internal__raw}}class Nn extends Tn{static with(e,t){return class extends Nn{constructor(n,r){super(n,e,t,r)}}}}const En=new RegExp("(\\d+?)(?=(\\d{3})+(?!\\d)|$)","g");function On(e,t=","){const n=e[0].startsWith("-"),r=n?e.substring(1).match(En):e.match(En);return r?`${n?"-":""}${r.join(t)}`:e}function An(e){return{decimal:.1.toLocaleString(e).substring(1,2),thousand:1e3.toLocaleString(e).substring(1,2)}}const Cn=[{power:-24,text:"yocto",value:"y"},{power:-21,text:"zepto",value:"z"},{power:-18,text:"atto",value:"a"},{power:-15,text:"femto",value:"f"},{power:-12,text:"pico",value:"p"},{power:-9,text:"nano",value:"n"},{power:-6,text:"micro",value:"\xb5"},{power:-3,text:"milli",value:"m"},{power:0,text:"Unit",value:"-"},{power:3,text:"Kilo",value:"k"},{power:6,text:"Mill",value:"M"},{power:9,text:"Bill",value:"B"},{power:12,text:"Tril",value:"T"},{power:15,text:"Peta",value:"P"},{power:18,text:"Exa",value:"E"},{power:21,text:"Zeta",value:"Z"},{power:24,text:"Yotta",value:"Y"}];function Hn(e){for(let t=0,n=Cn.length;tRn(e,t),Un.findSi=Hn,Un.getDefaults=()=>({decimals:Ln,unit:zn}),Un.getOptions=(e=Ln)=>Cn.filter((({power:t})=>!(t<0)||e+t>=0)),Un.setDefaults=({decimals:e,unit:t})=>{Ln=(Array.isArray(e)?e[0]:e)??Ln,zn=(Array.isArray(t)?t[0]:t)??zn,Cn[8].text=zn};const qn=new st(1e4),jn=[["Perquintill",yt],["Perbill",mt],["Permill",bt],["Percent",ht]];function Fn(e,t){if((0,Lt.E)(e)){if(!Number.isInteger(e)||e>Number.MAX_SAFE_INTEGER||ei)throw new Error(`${this.toRawType()}: Input too large. Found input with ${super.bitLength()} bits, expected ${i}`)}get hash(){return this.registry.hash(this.toU8a())}get isEmpty(){return this.isZero()}bitLength(){return this.__internal__bitLength}eq(e){return super.eq((0,Je.qv)(e)?vt(e.toString(),{isLe:!1,isNegative:!this.isUnsigned}):kt(e))}inspect(){return{outer:[this.toU8a()]}}isMax(){return this.toU8a().filter((e=>255===e)).length===this.__internal__bitLength/8}toBigInt(){return BigInt(this.toString())}toBn(){return this}toHex(e=!1){return function(e,{bitLength:t=-1,isLe:n=!1,isNegative:r=!1}={}){return(0,N.X)(Pt(e,{bitLength:t,isLe:n,isNegative:r}))}(this,{bitLength:this.bitLength(),isLe:e,isNegative:!this.isUnsigned})}toHuman(e){const t=this.toRawType();if("Balance"===t)return this.isMax()?"everything":Un(this,{decimals:this.registry.chainDecimals[0],withSi:!0,withUnit:this.registry.chainTokens[0]});const[,n]=jn.find((([e])=>e===t))||[];return n?function(e,t){return`${(e.mul(qn).div(t).toNumber()/100).toFixed(2)}%`}(this,n):Dn(this)}toJSON(e=!1){return e||this.__internal__bitLength>128||super.bitLength()>52?this.toHex():this.toNumber()}toPrimitive(){return super.bitLength()>52?this.toString():this.toNumber()}toRawType(){return this instanceof this.registry.createClassUnsafe("Balance")?"Balance":`${this.isUnsigned?"u":"i"}${this.bitLength()}`}toString(e){return super.toString(e)}toU8a(e){return Pt(this,{bitLength:this.bitLength(),isLe:!0,isNegative:!this.isUnsigned})}}class Wn extends Xn{constructor(e,t=0,n){super(e,t,n,!0)}static with(e,t){return class extends Wn{constructor(t,n){super(t,n,e)}toRawType(){return t||super.toRawType()}}}}class Zn extends Jt{toRawType(){return"None"}}class Gn{registry;createdAtHash;initialU8aLength;isStorageFallback;__internal__Type;__internal__raw;constructor(e,t,n,{definition:r,setDefinition:a=P.D}={}){const i=r||a(Xt(e,t)),s=(0,ut.b)(n)&&n.length&&!fn(n)?0===n[0]?new Zn(e):new i(e,n.subarray(1)):function(e,t,n){return n instanceof t?n:n instanceof Gn?n.value instanceof t?n.value:n.isNone?new Zn(e):new t(e,n.value):(0,Kt.k)(n)||(0,Fe.b)(n)||"0x"===n||n instanceof Zn?new Zn(e):(0,ut.b)(n)?n.length&&0!==n[0]?new t(e,n.subarray(1)):new Zn(e):new t(e,n)}(e,i,n);this.registry=e,this.__internal__Type=i,this.__internal__raw=s,s?.initialU8aLength&&(this.initialU8aLength=1+s.initialU8aLength)}static with(e){let t;const n=e=>(t=e,e);return class extends Gn{constructor(r,a){super(r,e,a,{definition:t,setDefinition:n})}}}get encodedLength(){return 1+this.__internal__raw.encodedLength}get hash(){return this.registry.hash(this.toU8a())}get isEmpty(){return this.isNone}get isNone(){return this.__internal__raw instanceof Zn}get isSome(){return!this.isNone}get value(){return this.__internal__raw}eq(e){return e instanceof Gn?this.isSome===e.isSome&&this.value.eq(e.value):this.value.eq(e)}inspect(){if(this.isNone)return{outer:[new Uint8Array([0])]};const{inner:e,outer:t=[]}=this.__internal__raw.inspect();return{inner:e,outer:[new Uint8Array([1]),...t]}}toHex(){return this.isNone?"0x":(0,N.X)(this.toU8a().subarray(1))}toHuman(e,t){return this.__internal__raw.toHuman(e,t)}toJSON(){return this.isNone?null:this.__internal__raw.toJSON()}toPrimitive(e){return this.isNone?null:this.__internal__raw.toPrimitive(e)}toRawType(e){const t=this.registry.getClassName(this.__internal__Type)||new this.__internal__Type(this.registry).toRawType();return e?t:`Option<${t}>`}toString(){return this.__internal__raw.toString()}toU8a(e){if(e)return this.__internal__raw.toU8a(!0);const t=new Uint8Array(this.encodedLength);return this.isSome&&(t.set([1]),t.set(this.__internal__raw.toU8a(),1)),t}unwrap(){if(this.isNone)throw new Error("Option: unwrapping a None value");return this.__internal__raw}unwrapOr(e){return this.isSome?this.unwrap():e}unwrapOrDefault(){return this.isSome?this.unwrap():new this.__internal__Type(this.registry)}}class Kn extends Bt{__internal__Types;constructor(e,t,n,{definition:r,setDefinition:a=P.D}={}){const i=r||a(Array.isArray(t)?[Wt(e,t),[]]:(0,qe.T)(t)||(0,I.K)(t)?[[Xt(e,t)],[]]:Zt(e,t));super(e,i[0].length),this.initialU8aLength=((0,ut.b)(n)?sn(e,this,n,i):function(e,t,n,r){if(Array.isArray(n)){const i=r[0];for(let r=0,s=i.length;rt=e;return class extends Kn{constructor(r,a){super(r,e,a,{definition:t,setDefinition:n})}}}get encodedLength(){let e=0;for(let t=0,n=this.length;tnew e(this.registry).toRawType()))}inspect(){return{inner:this.inspectInner()}}toRawType(){return`(${this.__internal__Types[0].map((e=>this.registry.getClassName(e)||new e(this.registry).toRawType())).join(",")})`}toString(){return(0,je.A)(this.toJSON())}toU8a(e){return It(this.toU8aInner(e))}}class Jn extends Kn{__internal__rangeName;constructor(e,t,n,{rangeName:r="Range"}={}){super(e,[t,t],n),this.__internal__rangeName=r}static with(e){return class extends Jn{constructor(t,n){super(t,e,n)}}}get start(){return this[0]}get end(){return this[1]}toRawType(){return`${this.__internal__rangeName}<${this.start.toRawType()}>`}}class Yn extends Jn{constructor(e,t,n){super(e,t,n,{rangeName:"RangeInclusive"})}static with(e){return class extends Yn{constructor(t,n){super(t,e,n)}}}}class Qn extends nn{constructor(e,t,n,r){super(e,{Ok:t,Err:n},r)}static with(e){return class extends Qn{constructor(t,n){super(t,e.Ok,e.Err,n)}}}get asErr(){if(!this.isErr)throw new Error("Cannot extract Err value from Ok result, check isErr first");return this.value}get asOk(){if(!this.isOk)throw new Error("Cannot extract Ok value from Err result, check isOk first");return this.value}get isEmpty(){return this.isOk&&this.value.isEmpty}get isErr(){return!this.isOk}get isOk(){return 0===this.index}toRawType(){const e=this._toRawStruct();return`Result<${e.Ok},${e.Err}>`}}function $n(e,t){const n=new st(0);for(let r=0,a=t.length;rr.strings.includes(t[n])))}constructor(n,r){super(n,e,r,t)}}}get encodedLength(){return this.__internal__byteLength}get hash(){return this.registry.hash(this.toU8a())}get isEmpty(){return 0===this.size}get strings(){return[...super.values()]}get valueEncoded(){return $n(this.__internal__allowed,this.strings)}add=e=>{if(this.__internal__allowed&&(0,Fe.b)(this.__internal__allowed[e]))throw new Error(`Set: Invalid key '${e}' on add`);return super.add(e),this};eq(e){return Array.isArray(e)?Rt(this.strings.sort(),e.sort()):e instanceof Set?this.eq([...e.values()]):!(!(0,Lt.E)(e)&&!(0,pn.f)(e))&&this.valueEncoded.eq(kt(e))}inspect(){return{outer:[this.toU8a()]}}toHex(){return(0,N.X)(this.toU8a())}toHuman(){return this.toJSON()}toJSON(){return this.strings}toNumber(){return this.valueEncoded.toNumber()}toPrimitive(){return this.toJSON()}toRawType(){return(0,je.A)({_set:this.__internal__allowed})}toString(){return`[${this.strings.join(", ")}]`}toU8a(e){return Pt(this.valueEncoded,{bitLength:8*this.__internal__byteLength,isLe:!0})}}class rr extends Xn{static with(e,t){return class extends rr{constructor(t,n){super(t,n,e)}toRawType(){return t||super.toRawType()}}}}function ar(e){return It([Ht(e.length),e])}const ir=10485760;class sr extends rt{constructor(e,t){const[n,r]=!(0,ut.b)(t)||t instanceof rt?Array.isArray(t)||(0,I.K)(t)?[(0,E.e)(t),0]:[t,0]:function(e){if(!e.length)return[new Uint8Array,0];const[t,n]=dt(e),r=t+n;if(n>ir)throw new Error(`Bytes length ${n.toString()} exceeds 10485760`);if(r>e.length)throw new Error(`Bytes: required length less than remainder, expected at least ${r}, found ${e.length}`);return[e.subarray(t,r),r]}(t);super(e,n,r)}get encodedLength(){return this.length+Ht(this.length).length}inspect(e){const t=Ht(this.length);return{outer:e?[super.toU8a()]:this.length?[t,super.toU8a()]:[t]}}toRawType(){return"Bytes"}toU8a(e){return e?super.toU8a(e):ar(this)}}const or=524288,cr=(0,it.v)("Vec");function dr(e,t,n,r,a){if(Array.isArray(n)){const r=t.length;for(let s=0;sor)throw new Error(`Vec length ${r.toString()} exceeds 524288`);return[t,r,n]}if(!e)return[null,0,0];throw new Error(`Expected array/hex input to Vec<*> decoding, found ${typeof e}: ${(0,je.A)(e)}`)}(n);super(e,s),this.__internal__Type=r||a(Xt(e,t)),this.initialU8aLength=((0,ut.b)(i)?on(e,this,i,o,this.__internal__Type):dr(e,this,i,o,this.__internal__Type))[0]}static with(e){let t;const n=e=>t=e;return class extends ur{constructor(r,a){super(r,e,a,{definition:t,setDefinition:n})}}}get Type(){return this.__internal__Type.name}indexOf(e){const t=e instanceof this.__internal__Type?e:new this.__internal__Type(this.registry,e);for(let n=0,r=this.length;n`}}class lr extends rt{constructor(e,t=new Uint8Array,n=256){const[r,a]=function(e,t){const n=(0,E.e)(e),r=t/8;if(!n.length)return[new Uint8Array(r),0];if((0,ut.b)(e)?n.lengthn=e;return class extends fr{constructor(a,i){super(a,e,t,i,{definition:n,setDefinition:r})}}}get Type(){return new this.__internal__Type(this.registry).toRawType()}get encodedLength(){let e=0;for(let t=0,n=this.length;t`}toString(){return this.__internal__decoded?this.__internal__decoded.toString():super.toString()}unwrap(){if(!this.__internal__decoded)throw new Error(`${this.__internal__opaqueName}: unwrapping an undecodable value`);return this.__internal__decoded}}class br extends hr{constructor(e,t,n){super(e,t,n,{opaqueName:"WrapperOpaque"})}static with(e){return class extends br{constructor(t,n){super(t,e,n)}}}get inner(){return this.unwrap()}}var mr;!function(e){e[e.BTreeMap=0]="BTreeMap",e[e.BTreeSet=1]="BTreeSet",e[e.Compact=2]="Compact",e[e.DoNotConstruct=3]="DoNotConstruct",e[e.Enum=4]="Enum",e[e.HashMap=5]="HashMap",e[e.Int=6]="Int",e[e.Linkage=7]="Linkage",e[e.Null=8]="Null",e[e.Option=9]="Option",e[e.Plain=10]="Plain",e[e.Range=11]="Range",e[e.RangeInclusive=12]="RangeInclusive",e[e.Result=13]="Result",e[e.Set=14]="Set",e[e.Si=15]="Si",e[e.Struct=16]="Struct",e[e.Tuple=17]="Tuple",e[e.UInt=18]="UInt",e[e.Vec=19]="Vec",e[e.VecFixed=20]="VecFixed",e[e.WrapperKeepOpaque=21]="WrapperKeepOpaque",e[e.WrapperOpaque=22]="WrapperOpaque"}(mr||(mr={}));const yr=["BTreeMap","BTreeSet","HashMap","Vec"],xr=yr.concat(["Compact","DoNotConstruct","Int","Linkage","Range","RangeInclusive","Result","Opaque","Option","UInt","WrapperKeepOpaque","WrapperOpaque"]),gr=["<","(","[",'"',","," "],vr=[Vr("::Inherent","InherentOfflineReport",!1),Vr("VecDeque<","Vec<",!1),e=>{if(e.includes(" as HasCompact"))for(let t=0,n=e.length;t`)}return e},Sr("Bounded",!0),Sr("Weak",!1),function(){const e=/\s/g,t=/(T|Self)::/g,n=/<(T|Self)asTrait>::/g,r=/::/g,a=//g,i=/::Type/g;return s=>(e.lastIndex=0,t.lastIndex=0,n.lastIndex=0,r.lastIndex=0,a.lastIndex=0,i.lastIndex=0,s.replace(e,"").replace(t,"").replace(n,"").replace(r,"").replace(a,"Lookup").replace(i,""))}(),function(){const e=e=>`(${e},${e})`;return t=>Tr(t,"PairOf<",e)}(),function(e){const t=e=>e;return n=>Tr(n,e,t)}("Box<"),e=>{for(let t=0,n=e.length;t{const r=t-n.length;return r>=0&&e.substring(r,t)===n&&(0===r||gr.includes(e[r-1]))}))){const n=wr(e,t+1);e=`${e.substring(0,t)}${e.substring(n+1)}`}return e},Vr("String","Text"),Vr("Vec","Bytes"),Vr("&\\[u8\\]","Bytes"),Vr("&'static\\[u8\\]","Bytes"),Vr("RawAddress","Address"),Vr("Lookup::Source","LookupSource"),Vr("Lookup::Target","LookupTarget"),Vr("exec::StorageKey","ContractStorageKey"),function(){const e=/,\)/g,t=/\(([^,]+)\)/;return n=>(e.lastIndex=0,n.replace(e,")").replace(t,"$1"))}(),e=>{let t=0;for(;-1!==t;)if(t=e.indexOf("::"),0===t)e=e.substring(2);else if(-1!==t){let n=t;for(;-1!==n&&!gr.includes(e[n]);)n--;e=`${e.substring(0,n+1)}${e.substring(t+2)}`}return e},e=>e.trim()];function wr(e,t){let n=0;for(let r=t,a=e.length;r"===e[r]){if(!n)return r;n--}else"<"===e[r]&&n++;throw new Error(`Unable to find closing matching <> on '${e}' (start ${t})`)}function Vr(e,t,n=!0){const r=new RegExp(`(^${e}|${gr.map((t=>`\\${t}${e}`)).join("|")})`,"g"),a=e=>(r.lastIndex=0,n&&gr.includes(e[0])?`${e[0]}${t}`:t);return e=>e.replace(r,a)}function Tr(e,t,n){let r=-1;for(;;){if(r=e.indexOf(t,r+1),-1===r)return e;const a=r+t.length,i=wr(e,a);e=`${e.substring(0,r)}${n(e.substring(a,i))}${e.substring(i+1)}`}}function Sr(e,t){return n=>{for(let r=0,a=yr.length;r{const n=e.split(",").map((e=>e.trim())).filter((e=>e));return t&&n.pop(),`${a}<${n.join(",")}>`}))}return n}}const kr=new Map;function _r(e){const t=e.toString(),n=kr.get(t);if(n)return n;let r=t;for(let a=0,i=vr.length;a({index:t,info:mr.Plain,name:e,type:"Null"}))):!function(e){const t=Object.values(e);if(t.some((e=>(0,Lt.E)(e)))){if(!t.every((e=>(0,Lt.E)(e)&&e>=0&&e<=255)))throw new Error("Invalid number-indexed enum definition");return!1}return!0}(t)?e.sub=Object.entries(t).map((([e,t])=>({index:t,info:mr.Plain,name:e,type:"Null"}))):e.sub=Object.entries(t).map((([e,t],r)=>(0,M.b)({},Rr(Mr(t||"Null"),{name:e},n),{index:r}))),e}function Nr(e,t,n,r){return e.sub=0===n.length?[]:function(e){const t=[];let n=0,r=0,a=0,i=0,s=0;for(let o=0,c=e.length;o":n--;break;case"[":r++;break;case"]":r--;break;case"{":a++;break;case"}":a--;break;case"(":i++;break;case")":i--}if(n||r||a||i)throw new Error(`Invalid definition (missing terminators) found in ${e}`);return t.push(e.substring(s,e.length).trim()),t}(n).map((e=>Rr(e,{},r))),e}function Er(e,t,n,r){const[a,i]=t.substring(r.length+1,t.length-1).split(","),s=parseInt(a.trim(),10);if(s>8192||s%8)throw new Error(`${t}: Only support for ${r}, where length <= 8192 and a power of 8, found ${s}`);return e.displayName=i,e.length=s,e}function Or(e,[t,n]){return e.startsWith(t)&&e.slice(-1*n.length)===n}const Ar=[["[","]",mr.VecFixed,function(e,t,n,r){const a=t.length-1;let i=-1,s=0;for(let l=1;l":s--}if(-1===i)throw new Error(`${t}: Unable to extract location of ';'`);const o=t.substring(1,i),[c,d]=t.substring(i+1,a).split(";"),u=parseInt(c.trim(),10);if(u>2048)throw new Error(`${t}: Only support for [Type; ], where length <= 2048`);return e.displayName=d,e.length=u,e.sub=Rr(o,{},r),e}],["{","}",mr.Struct,function(e,t,n,r){const a=JSON.parse(t),i=Object.keys(a);return a._enum?Ir(e,a._enum,r,a._fallback):a._set?function(e,t,n){return e.info=mr.Set,e.fallbackType=n,e.length=t._bitLength,e.sub=Object.entries(t).filter((([e])=>!e.startsWith("_"))).map((([e,t])=>({index:t,info:mr.Plain,name:e,type:"Null"}))),e}(e,a._set,a._fallback):(e.alias=a._alias?new Map(Object.entries(a._alias)):void 0,e.fallbackType=a._fallback,e.sub=i.filter((e=>!Pr.includes(e))).map((e=>Rr(Mr(a[e]),{name:e},r))),e)}],["(",")",mr.Tuple,Nr],["BTreeMap<",">",mr.BTreeMap,Nr],["HashMap<",">",mr.HashMap,Nr],["Int<",">",mr.Int,function(e,t,n){return Er(e,t,0,"Int")}],["Result<",">",mr.Result,Nr],["UInt<",">",mr.UInt,function(e,t,n){return Er(e,t,0,"UInt")}],["DoNotConstruct<",">",mr.DoNotConstruct,function(e,t,n){return e.displayName=t.substring(15,t.length-1),e}]],Cr=[["BTreeSet<",">",mr.BTreeSet],["Compact<",">",mr.Compact],["Linkage<",">",mr.Linkage],["Opaque<",">",mr.WrapperOpaque],["Option<",">",mr.Option],["Range<",">",mr.Range],["RangeInclusive<",">",mr.RangeInclusive],["Vec<",">",mr.Vec],["WrapperKeepOpaque<",">",mr.WrapperKeepOpaque],["WrapperOpaque<",">",mr.WrapperOpaque]];function Hr(e,[t,n]){return e.substring(t.length,e.length-n.length)}function Rr(e,{displayName:t,name:n}={},r=0){const a=_r(e),i={displayName:t,info:mr.Plain,name:n,type:a};if(++r>64)throw new Error("getTypeDef: Maximum nested limit reached");const s=Ar.find((e=>Or(a,e)));if(s)return i.info=s[2],s[3](i,a,Hr(a,s),r);const o=Cr.find((e=>Or(a,e)));return o&&(i.info=o[2],i.sub=Rr(Hr(a,o),{},r)),i}function Br({lookupName:e,type:t}){return e||t}function Lr(e){if(!Array.isArray(e.sub))throw new Error(`Expected subtype as TypeDef[] in ${(0,je.A)(e)}`);return e.sub}function zr(e){return Br(function(e){if(!e.sub||Array.isArray(e.sub))throw new Error(`Expected subtype as TypeDef in ${(0,je.A)(e)}`);return e.sub}(e))}function Ur(e){const t=Lr(e),n={};for(let r=0,a=t.length;r`);return e.with(n,t)}function jr(e,t){const[n,r]=Dr(t);return e.with(n,r)}function Fr(e,t){return e.with(zr(t))}const Xr={[mr.BTreeMap]:(e,t)=>jr(Sn,t),[mr.BTreeSet]:(e,t)=>Fr(Mn,t),[mr.Compact]:(e,t)=>Fr(In,t),[mr.DoNotConstruct]:(e,t)=>at.with(t.displayName||t.type),[mr.Enum]:(e,t)=>{const n=Lr(t);return nn.with(n.every((({type:e})=>"Null"===e))?n.reduce(((e,{index:t,name:n},r)=>{if(!n)throw new Error("No name found in sub definition");return e[n]=t||r,e}),{}):Ur(t))},[mr.HashMap]:(e,t)=>jr(Nn,t),[mr.Int]:(e,t)=>qr(Wn,t),[mr.Linkage]:(e,t)=>{const n=`Option<${zr(t)}>`,r=dn.with({previous:n,next:n});return r.prototype.toRawType=function(){return`Linkage<${this.next.toRawType(!0)}>`},r},[mr.Null]:(e,t)=>Jt,[mr.Option]:(e,t)=>{if(!t.sub||Array.isArray(t.sub))throw new Error("Expected type information for Option");return Fr(Gn,t)},[mr.Plain]:(e,t)=>e.getOrUnknown(t.type),[mr.Range]:(e,t)=>Fr(Jn,t),[mr.RangeInclusive]:(e,t)=>Fr(Yn,t),[mr.Result]:(e,t)=>{const[n,r]=Dr(t);return Qn.with({Err:r,Ok:n})},[mr.Set]:(e,t)=>nr.with(Lr(t).reduce(((e,{index:t,name:n})=>{if(!n||!(0,Lt.E)(t))throw new Error("No name found in sub definition");return e[n]=t,e}),{}),t.length),[mr.Si]:(e,t)=>Wr(e,e.lookup.getTypeDef(t.type)),[mr.Struct]:(e,t)=>dn.with(Ur(t),t.alias),[mr.Tuple]:(e,t)=>Kn.with(Dr(t)),[mr.UInt]:(e,t)=>qr(rr,t),[mr.Vec]:(e,{sub:t})=>{if(!t||Array.isArray(t))throw new Error("Expected type information for vector");return"u8"===t.type?sr:ur.with(Br(t))},[mr.VecFixed]:(e,{displayName:t,length:n,sub:r})=>{if(!(0,Lt.E)(n)||!r||Array.isArray(r))throw new Error("Expected length & type information for fixed vector");return"u8"===r.type?lr.with(8*n,t):fr.with(Br(r),n)},[mr.WrapperKeepOpaque]:(e,t)=>Fr(hr,t),[mr.WrapperOpaque]:(e,t)=>Fr(br,t)};function Wr(e,t){return e.getUnsafe(t.type,!1,t)}function Zr(e,t){return e.getUnsafe(t)||Wr(e,e.isLookupType(t)?e.lookup.getTypeDef(t):Rr(t))}function Gr(e,t){const n=(0,E.e)(e),r=(0,E.e)(t);if(n.length===r.length){const e=new DataView(n.buffer,n.byteOffset),t=new DataView(r.buffer,r.byteOffset),a=n.length%4|0,i=n.length-a|0;for(let n=0;n!e))))throw new Error(`${r}:: Decoded input doesn't match input, received ${(0,N.X)(t,512)} (${t.length} bytes), created ${(0,N.X)(n,512)} (${n.length} bytes)`)}function Jr(e,t,n=[],{blockHash:r,isFallback:a,isOptional:i,isPedantic:s}={}){const o=new(i?Gn.with(t):t)(e,...n);return s&&function(e,[t]){(0,ut.b)(t)?Kr(e,t):(0,Je.qv)(t)&&Kr(e,(0,E.e)(t))}(o,n),r&&(o.createdAtHash=Yr(e,"BlockHash",[r])),a&&(o.isStorageFallback=!0),o}function Yr(e,t,n=[],r={}){let a=null,i=null;try{return a=Zr(e,t),Jr(e,a,n,r)}catch(s){i=new Error(`createType(${t}):: ${s.message}`)}if(a?.__fallbackType)try{return a=Zr(e,a.__fallbackType),Jr(e,a,n,r)}catch{}throw i}function Qr(e,t,n,r,a=0){const i=r?r(t,a):t.toString();let s;Object.defineProperty(e,i,{configurable:!0,enumerable:!0,get:function(){if(void 0===s){s=n(t,a,this);try{Object.defineProperty(this,i,{value:s})}catch{}}return s}})}function $r(e,t,n,r){for(let a=0,i=t.length;a0&&!t.includes(e.length))throw new Error(`Uint8Array expected of length ${t}, not of length=${e.length}`)}function ra(e){if("function"!=typeof e||"function"!=typeof e.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");ta(e.outputLen),ta(e.blockLen)}function aa(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function ia(e,t){na(e);const n=t.outputLen;if(e.lengthnew Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4)),ca=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),da=(e,t)=>e<<32-t|e>>>t,ua=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],la=e=>e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255,fa=ua?e=>e:e=>la(e);function pa(e){for(let t=0;te().update(ha(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function ya(e){const t=(t,n)=>e(n).update(ha(t)).digest(),n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=t=>e(t),t}function xa(e=32){if(sa&&"function"==typeof sa.getRandomValues)return sa.getRandomValues(new Uint8Array(e));if(sa&&"function"==typeof sa.randomBytes)return sa.randomBytes(e);throw new Error("crypto.getRandomValues must be defined")}const ga=new Uint8Array([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3]);class va extends ba{constructor(e,t,n={},r,a,i){if(super(),this.blockLen=e,this.outputLen=t,this.length=0,this.pos=0,this.finished=!1,this.destroyed=!1,ta(e),ta(t),ta(r),t<0||t>r)throw new Error("outputLen bigger than keyLen");if(void 0!==n.key&&(n.key.length<1||n.key.length>r))throw new Error(`key must be up 1..${r} byte long or undefined`);if(void 0!==n.salt&&n.salt.length!==a)throw new Error(`salt must be ${a} byte long or undefined`);if(void 0!==n.personalization&&n.personalization.length!==i)throw new Error(`personalization must be ${i} byte long or undefined`);this.buffer32=oa(this.buffer=new Uint8Array(e))}update(e){aa(this);const{blockLen:t,buffer:n,buffer32:r}=this,a=(e=ha(e)).length,i=e.byteOffset,s=e.buffer;for(let o=0;or[t]=fa(e)))}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const n=e.slice(0,t);return this.destroy(),n}_cloneInto(e){const{buffer:t,length:n,finished:r,destroyed:a,outputLen:i,pos:s}=this;return e||(e=new this.constructor({dkLen:i})),e.set(...this.get()),e.length=n,e.finished=r,e.destroyed=a,e.outputLen=i,e.buffer.set(t),e.pos=s,e}}const wa=BigInt(2**32-1),Va=BigInt(32);function Ta(e,t=!1){return t?{h:Number(e&wa),l:Number(e>>Va&wa)}:{h:0|Number(e>>Va&wa),l:0|Number(e&wa)}}function Sa(e,t=!1){let n=new Uint32Array(e.length),r=new Uint32Array(e.length);for(let a=0;ae<>>32-n,_a=(e,t,n)=>t<>>32-n,Pa=(e,t,n)=>t<>>64-n,Ma=(e,t,n)=>e<>>64-n;const Ia={fromBig:Ta,split:Sa,toBig:(e,t)=>BigInt(e>>>0)<>>0),shrSH:(e,t,n)=>e>>>n,shrSL:(e,t,n)=>e<<32-n|t>>>n,rotrSH:(e,t,n)=>e>>>n|t<<32-n,rotrSL:(e,t,n)=>e<<32-n|t>>>n,rotrBH:(e,t,n)=>e<<64-n|t>>>n-32,rotrBL:(e,t,n)=>e>>>n-32|t<<64-n,rotr32H:(e,t)=>t,rotr32L:(e,t)=>e,rotlSH:ka,rotlSL:_a,rotlBH:Pa,rotlBL:Ma,add:function(e,t,n,r){const a=(t>>>0)+(r>>>0);return{h:e+n+(a/2**32|0)|0,l:0|a}},add3L:(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0),add3H:(e,t,n,r)=>t+n+r+(e/2**32|0)|0,add4L:(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0),add4H:(e,t,n,r,a)=>t+n+r+a+(e/2**32|0)|0,add5H:(e,t,n,r,a,i)=>t+n+r+a+i+(e/2**32|0)|0,add5L:(e,t,n,r,a)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(a>>>0)},Na=Ia,Ea=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),Oa=new Uint32Array(32);function Aa(e,t,n,r,a,i){const s=a[i],o=a[i+1];let c=Oa[2*e],d=Oa[2*e+1],u=Oa[2*t],l=Oa[2*t+1],f=Oa[2*n],p=Oa[2*n+1],h=Oa[2*r],b=Oa[2*r+1],m=Na.add3L(c,u,s);d=Na.add3H(m,d,l,o),c=0|m,({Dh:b,Dl:h}={Dh:b^d,Dl:h^c}),({Dh:b,Dl:h}={Dh:Na.rotr32H(b,h),Dl:Na.rotr32L(b,h)}),({h:p,l:f}=Na.add(p,f,b,h)),({Bh:l,Bl:u}={Bh:l^p,Bl:u^f}),({Bh:l,Bl:u}={Bh:Na.rotrSH(l,u,24),Bl:Na.rotrSL(l,u,24)}),Oa[2*e]=c,Oa[2*e+1]=d,Oa[2*t]=u,Oa[2*t+1]=l,Oa[2*n]=f,Oa[2*n+1]=p,Oa[2*r]=h,Oa[2*r+1]=b}function Ca(e,t,n,r,a,i){const s=a[i],o=a[i+1];let c=Oa[2*e],d=Oa[2*e+1],u=Oa[2*t],l=Oa[2*t+1],f=Oa[2*n],p=Oa[2*n+1],h=Oa[2*r],b=Oa[2*r+1],m=Na.add3L(c,u,s);d=Na.add3H(m,d,l,o),c=0|m,({Dh:b,Dl:h}={Dh:b^d,Dl:h^c}),({Dh:b,Dl:h}={Dh:Na.rotrSH(b,h,16),Dl:Na.rotrSL(b,h,16)}),({h:p,l:f}=Na.add(p,f,b,h)),({Bh:l,Bl:u}={Bh:l^p,Bl:u^f}),({Bh:l,Bl:u}={Bh:Na.rotrBH(l,u,63),Bl:Na.rotrBL(l,u,63)}),Oa[2*e]=c,Oa[2*e+1]=d,Oa[2*t]=u,Oa[2*t+1]=l,Oa[2*n]=f,Oa[2*n+1]=p,Oa[2*r]=h,Oa[2*r+1]=b}class Ha extends va{constructor(e={}){super(128,void 0===e.dkLen?64:e.dkLen,e,64,16,16),this.v0l=0|Ea[0],this.v0h=0|Ea[1],this.v1l=0|Ea[2],this.v1h=0|Ea[3],this.v2l=0|Ea[4],this.v2h=0|Ea[5],this.v3l=0|Ea[6],this.v3h=0|Ea[7],this.v4l=0|Ea[8],this.v4h=0|Ea[9],this.v5l=0|Ea[10],this.v5h=0|Ea[11],this.v6l=0|Ea[12],this.v6h=0|Ea[13],this.v7l=0|Ea[14],this.v7h=0|Ea[15];const t=e.key?e.key.length:0;if(this.v0l^=this.outputLen|t<<8|65536|1<<24,e.salt){const t=oa(ha(e.salt));this.v4l^=fa(t[0]),this.v4h^=fa(t[1]),this.v5l^=fa(t[2]),this.v5h^=fa(t[3])}if(e.personalization){const t=oa(ha(e.personalization));this.v6l^=fa(t[0]),this.v6h^=fa(t[1]),this.v7l^=fa(t[2]),this.v7h^=fa(t[3])}if(e.key){const t=new Uint8Array(this.blockLen);t.set(ha(e.key)),this.update(t)}}get(){let{v0l:e,v0h:t,v1l:n,v1h:r,v2l:a,v2h:i,v3l:s,v3h:o,v4l:c,v4h:d,v5l:u,v5h:l,v6l:f,v6h:p,v7l:h,v7h:b}=this;return[e,t,n,r,a,i,s,o,c,d,u,l,f,p,h,b]}set(e,t,n,r,a,i,s,o,c,d,u,l,f,p,h,b){this.v0l=0|e,this.v0h=0|t,this.v1l=0|n,this.v1h=0|r,this.v2l=0|a,this.v2h=0|i,this.v3l=0|s,this.v3h=0|o,this.v4l=0|c,this.v4h=0|d,this.v5l=0|u,this.v5h=0|l,this.v6l=0|f,this.v6h=0|p,this.v7l=0|h,this.v7h=0|b}compress(e,t,n){this.get().forEach(((e,t)=>Oa[t]=e)),Oa.set(Ea,16);let{h:r,l:a}=Na.fromBig(BigInt(this.length));Oa[24]=Ea[8]^a,Oa[25]=Ea[9]^r,n&&(Oa[28]=~Oa[28],Oa[29]=~Oa[29]);let i=0;const s=ga;for(let o=0;o<12;o++)Aa(0,4,8,12,e,t+2*s[i++]),Ca(0,4,8,12,e,t+2*s[i++]),Aa(1,5,9,13,e,t+2*s[i++]),Ca(1,5,9,13,e,t+2*s[i++]),Aa(2,6,10,14,e,t+2*s[i++]),Ca(2,6,10,14,e,t+2*s[i++]),Aa(3,7,11,15,e,t+2*s[i++]),Ca(3,7,11,15,e,t+2*s[i++]),Aa(0,5,10,15,e,t+2*s[i++]),Ca(0,5,10,15,e,t+2*s[i++]),Aa(1,6,11,12,e,t+2*s[i++]),Ca(1,6,11,12,e,t+2*s[i++]),Aa(2,7,8,13,e,t+2*s[i++]),Ca(2,7,8,13,e,t+2*s[i++]),Aa(3,4,9,14,e,t+2*s[i++]),Ca(3,4,9,14,e,t+2*s[i++]);this.v0l^=Oa[0]^Oa[16],this.v0h^=Oa[1]^Oa[17],this.v1l^=Oa[2]^Oa[18],this.v1h^=Oa[3]^Oa[19],this.v2l^=Oa[4]^Oa[20],this.v2h^=Oa[5]^Oa[21],this.v3l^=Oa[6]^Oa[22],this.v3h^=Oa[7]^Oa[23],this.v4l^=Oa[8]^Oa[24],this.v4h^=Oa[9]^Oa[25],this.v5l^=Oa[10]^Oa[26],this.v5h^=Oa[11]^Oa[27],this.v6l^=Oa[12]^Oa[28],this.v6h^=Oa[13]^Oa[29],this.v7l^=Oa[14]^Oa[30],this.v7h^=Oa[15]^Oa[31],Oa.fill(0)}destroy(){this.destroyed=!0,this.buffer32.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}const Ra=ya((e=>new Ha(e)));var Ba=n(8319),La=n(58861);const za=$e.Mn.crypto;const Ua={getRandomValues:function(e){return za.getRandomValues(e)}},Da={crypto:Ua};class qa{__internal__bridge;constructor(e){this.__internal__bridge=e}abort=()=>{throw new Error("abort")};__wbindgen_is_undefined=e=>void 0===this.__internal__bridge.getObject(e);__wbindgen_throw=(e,t)=>{throw new Error(this.__internal__bridge.getString(e,t))};__wbg_self_1b7a39e3a92c949c=()=>this.__internal__bridge.addObject(Da);__wbg_require_604837428532a733=(e,t)=>{throw new Error(`Unable to require ${this.__internal__bridge.getString(e,t)}`)};__wbg_crypto_968f1772287e2df0=e=>this.__internal__bridge.addObject(Ua);__wbg_getRandomValues_a3d34b4fee3c2869=e=>this.__internal__bridge.addObject(Ua.getRandomValues);__wbg_getRandomValues_f5e14ab7ac8e995d=(e,t,n)=>{Ua.getRandomValues(this.__internal__bridge.getU8a(t,n))};__wbg_randomFillSync_d5bd2d655fdf256a=(e,t,n)=>{throw new Error("randomFillsync is not available")};__wbindgen_object_drop_ref=e=>{this.__internal__bridge.takeObject(e)}}function ja(e,t,n){return async r=>{const a={error:null,type:"none",wasm:null};try{if(!t?.length)throw new Error("No WebAssembly provided for initialization");if("object"!=typeof WebAssembly||"function"!=typeof WebAssembly.instantiate)throw new Error("WebAssembly is not available in your environment");const e=await WebAssembly.instantiate(t,{wbg:r});a.wasm=e.instance.exports,a.type="wasm"}catch(i){"function"==typeof n?(a.wasm=n(r),a.type="asm"):(a.error=`FATAL: Unable to initialize @polkadot/wasm-${e}:: ${i.message}`,console.error(a.error))}return a}}const Fa=Uint8Array,Xa=Uint16Array,Wa=Uint32Array,Za=new Fa([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Ga=new Fa([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Ka=new Fa([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Ja=(e,t)=>{const n=new Xa(31);for(let a=0;a<31;++a)n[a]=t+=1<>>1|(21845&xV)<<1;e=(52428&e)>>>2|(13107&e)<<2,e=(61680&e)>>>4|(3855&e)<<4,ei[xV]=((65280&e)>>>8|(255&e)<<8)>>>1}const ti=(e,t,n)=>{const r=e.length;let a=0;const i=new Xa(t);for(;a>n]=r}}else for(o=new Xa(r),a=0;a>15-e[a]);return o},ni=new Fa(288);for(let xV=0;xV<144;++xV)ni[xV]=8;for(let xV=144;xV<256;++xV)ni[xV]=9;for(let xV=256;xV<280;++xV)ni[xV]=7;for(let xV=280;xV<288;++xV)ni[xV]=8;const ri=new Fa(32);for(let xV=0;xV<32;++xV)ri[xV]=5;const ai=ti(ni,9,1),ii=ti(ri,5,1),si=(e,t,n)=>{const r=t>>>3;return(e[r]|e[r+1]<<8)>>>(7&t)&n},oi=(e,t)=>{const n=t>>>3;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>>(7&t)},ci=e=>{let t=e[0];for(let n=1,r=e.length;nt&&(t=e[n]);return t},di=(e,t,n)=>{const r=!n||n.i;n||(n={});const a=e.length,i=!t||!r;t||(t=new Fa(3*a));const s=e=>{let n=t.length;if(e>n){const r=new Fa(Math.max(n<<1,e));r.set(t),t=r}};let o=n.f||0,c=n.p||0,d=n.b||0,u=n.l,l=n.d,f=n.m,p=n.n;if(o&&!u)return t;const h=a<<3;do{if(!u){n.f=o=si(e,c,1);const m=si(e,c+1,3);if(c+=3,!m){const o=((b=c)>>>3)+(7&b&&1)+4,u=e[o-4]|e[o-3]<<8,l=o+u;if(l>a){if(r)throw"unexpected EOF";break}i&&s(d+u),t.set(e.subarray(o,l),d),n.b=d+=u,n.p=c=l<<3;continue}if(1==m)u=ai,l=ii,f=9,p=5;else{if(2!=m)throw"invalid block type";{const t=si(e,c,31)+257,n=si(e,c+10,15)+4,a=t+si(e,c+5,31)+1;c+=14;const i=new Fa(a),s=new Fa(19);for(let r=0;rh)break;const b=ti(s,o,1);for(let r=0;r>>4;if(n<16)i[r++]=n;else{let t=0,a=0;for(16==n?(a=3+si(e,c,3),c+=2,t=i[r-1]):17==n?(a=3+si(e,c,7),c+=3):18==n&&(a=11+si(e,c,127),c+=7);a--;)i[r++]=t}}const m=i.subarray(0,t),y=i.subarray(t);f=ci(m),p=ci(y),u=ti(m,f,1),l=ti(y,p,1)}}if(c>h)throw"unexpected EOF"}i&&s(d+131072);const m=(1<>>4;if(c+=15&n,c>h)throw"unexpected EOF";if(!n)throw"invalid length/literal";if(r<256)t[d++]=r;else{if(256==r){u=void 0;break}{let n=r-254;if(r>264){const t=r-257,a=Ga[t];n=si(e,c,(1<>>4;if(!a)throw"invalid distance";c+=15&a;let u=$a[o];if(o>3){const t=Ka[o];u+=oi(e,c)&(1<h)throw"unexpected EOF";i&&s(d+131072);const f=d+n;for(;d{(null==t||t<0)&&(t=0),(null==n||n>e.length)&&(n=e.length);const r=new(e instanceof Xa?Xa:e instanceof Wa?Wa:Fa)(n-t);return r.set(e.subarray(t,n)),r})(t,0,d)};function ui(e,t){return di(((e=>{if(8!=(15&e[0])||e[0]>>>4>7||(e[0]<<8|e[1])%31)throw"invalid zlib data";if(32&e[1])throw"invalid zlib data: preset dictionaries not supported"})(e),e.subarray(2,-4)),t)}const li="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",fi=new Array(256);for(let xV=0,gV=64;xV=8&&(t[++a]=n>>>(r-=8)&255);return t}(pi.ee,new Uint8Array(pi.$o)),new Uint8Array(pi.qO)),bi=ja("crypto",hi,null),mi=new class{__internal__createWasm;__internal__heap;__internal__wbg;__internal__cachegetInt32;__internal__cachegetUint8;__internal__heapNext;__internal__wasm;__internal__wasmError;__internal__wasmPromise;__internal__type;constructor(e){this.__internal__createWasm=e,this.__internal__cachegetInt32=null,this.__internal__cachegetUint8=null,this.__internal__heap=new Array(32).fill(void 0).concat(void 0,null,!0,!1),this.__internal__heapNext=this.__internal__heap.length,this.__internal__type="none",this.__internal__wasm=null,this.__internal__wasmError=null,this.__internal__wasmPromise=null,this.__internal__wbg={...new qa(this)}}get error(){return this.__internal__wasmError}get type(){return this.__internal__type}get wasm(){return this.__internal__wasm}async init(e){this.__internal__wasmPromise&&!e||(this.__internal__wasmPromise=(e||this.__internal__createWasm)(this.__internal__wbg));const{error:t,type:n,wasm:r}=await this.__internal__wasmPromise;return this.__internal__type=n,this.__internal__wasm=r,this.__internal__wasmError=t,this.__internal__wasm}getObject(e){return this.__internal__heap[e]}dropObject(e){e<36||(this.__internal__heap[e]=this.__internal__heapNext,this.__internal__heapNext=e)}takeObject(e){const t=this.getObject(e);return this.dropObject(e),t}addObject(e){this.__internal__heapNext===this.__internal__heap.length&&this.__internal__heap.push(this.__internal__heap.length+1);const t=this.__internal__heapNext;return this.__internal__heapNext=this.__internal__heap[t],this.__internal__heap[t]=e,t}getInt32(){return null!==this.__internal__cachegetInt32&&this.__internal__cachegetInt32.buffer===this.__internal__wasm.memory.buffer||(this.__internal__cachegetInt32=new Int32Array(this.__internal__wasm.memory.buffer)),this.__internal__cachegetInt32}getUint8(){return null!==this.__internal__cachegetUint8&&this.__internal__cachegetUint8.buffer===this.__internal__wasm.memory.buffer||(this.__internal__cachegetUint8=new Uint8Array(this.__internal__wasm.memory.buffer)),this.__internal__cachegetUint8}getU8a(e,t){return this.getUint8().subarray(e/1,e/1+t)}getString(e,t){return nt(this.getU8a(e,t))}allocU8a(e){const t=this.__internal__wasm.__wbindgen_malloc(1*e.length);return this.getUint8().set(e,t/1),[t,e.length]}allocString(e){return this.allocU8a((0,La.j)(e))}resultU8a(){const e=this.getInt32()[2],t=this.getInt32()[3],n=this.getU8a(e,t).slice();return this.__internal__wasm.__wbindgen_free(e,1*t),n}resultString(){return nt(this.resultU8a())}}(bi);function yi(e){return(...t)=>{if(!mi.wasm)throw new Error("The WASM interface has not been initialized. Ensure that you wait for the initialization Promise with waitReady() from @polkadot/wasm-crypto (or cryptoWaitReady() from @polkadot/util-crypto) before attempting to use WASM-only interfaces.");return e(mi.wasm,...t)}}const xi=yi(((e,t)=>(e.ext_secp_pub_expand(8,...mi.allocU8a(t)),mi.resultU8a()))),gi=yi(((e,t,n,r)=>(e.ext_blake2b(8,...mi.allocU8a(t),...mi.allocU8a(n),r),mi.resultU8a()))),vi=yi(((e,t)=>(e.ext_keccak256(8,...mi.allocU8a(t)),mi.resultU8a()))),wi=yi(((e,t)=>(e.ext_keccak512(8,...mi.allocU8a(t)),mi.resultU8a()))),Vi=yi(((e,t,n)=>(e.ext_twox(8,...mi.allocU8a(t),n),mi.resultU8a())));function Ti(){return!!mi.wasm}async function Si(){try{const e=await async function(e){return mi.init(e)}();return!!e}catch{return!1}}function ki(e){return(...t)=>(0,N.X)(e(...t))}function _i(e,t){return(n,r=256,a)=>{const i=(0,E.e)(n);return!Ba.CW||!a&&Ti()?e[r](i):t[r](i)}}function Pi(e,t=256,n,r){const a=Math.ceil(t/8),i=(0,E.e)(e);return!Ba.CW||!r&&Ti()?gi(i,(0,E.e)(n),a):Ra(i,n?{dkLen:a,key:n}:{dkLen:a})}const Mi=ki(Pi),Ii={extrinsic:{},payload:{}},Ni={LimitParathreadCommits:Ii,OnlyStakingAndClaims:Ii,PrevalidateAttests:Ii,RestrictFunctionality:Ii,TransactionCallFilter:Ii,ValidateDoubleVoteReports:Ii},Ei={DisallowSigned:Ii},Oi={extrinsic:{era:"ExtrinsicEra"},payload:{blockHash:"Hash"}},Ai={extrinsic:{tip:"Compact"},payload:{}},Ci={ChargeTransactionPayment:Ai,CheckBlockGasLimit:Ii,CheckEra:Oi,CheckGenesis:{extrinsic:{},payload:{genesisHash:"Hash"}},CheckMetadataHash:{extrinsic:{mode:"u8"},payload:{metadataHash:"Option<[u8;32]>"}},CheckMortality:Oi,CheckNonZeroSender:Ii,CheckNonce:{extrinsic:{nonce:"Compact"},payload:{}},CheckSpecVersion:{extrinsic:{},payload:{specVersion:"u32"}},CheckTxVersion:{extrinsic:{},payload:{transactionVersion:"u32"}},CheckVersion:{extrinsic:{},payload:{specVersion:"u32"}},CheckWeight:Ii,LockStakingStatus:Ii,SkipCheckIfFeeless:Ai,ValidateEquivocationReport:Ii},Hi=(0,M.b)({},Ci,Ni,Ei,{ChargeAssetTxPayment:{extrinsic:{tip:"Compact",assetId:"TAssetConversion"},payload:{}}}),Ri=["CheckVersion","CheckGenesis","CheckEra","CheckNonce","CheckWeight","ChargeTransactionPayment","CheckBlockGasLimit"];function Bi(e,t,n={}){return e.map((e=>n[e]||Hi[e])).filter((e=>!!e)).reduce(((e,n)=>(0,M.b)(e,n[t])),{})}class Li extends Kn{__internal__meta;__internal__method;__internal__names=null;__internal__section;__internal__typeDef;constructor(e,t,n,r="",a=""){const i=n?.fields||[];super(e,i.map((({type:t})=>e.createLookupType(t))),t),this.__internal__meta=n,this.__internal__method=a,this.__internal__section=r,this.__internal__typeDef=i.map((({type:t})=>e.lookup.getTypeDef(t)));const s=i.map((({name:t})=>e.lookup.sanitizeField(t)[0])).filter((e=>!!e));s.length===i.length&&(this.__internal__names=s,De(this,s,((e,t)=>this[t])))}get meta(){return this.__internal__meta}get method(){return this.__internal__method}get names(){return this.__internal__names}get section(){return this.__internal__section}get typeDef(){return this.__internal__typeDef}toHuman(e,t){if(null!==this.__internal__names){const n={};for(let r=0,a=this.__internal__names.length;re.toString()))}:null,super.toHuman(e,t))}}class Ui{registry;createdAtHash;initialU8aLength;isStorageFallback;__internal__raw;constructor(e,t,n){this.initialU8aLength=n,this.__internal__raw=t,this.registry=e}get encodedLength(){return this.toU8a().length}get hash(){return this.registry.hash(this.toU8a())}get inner(){return this.__internal__raw}get isEmpty(){return this.__internal__raw.isEmpty}eq(e){return this.__internal__raw.eq(e)}inspect(){return this.__internal__raw.inspect()}toHex(e){return this.__internal__raw.toHex(e)}toHuman(e,t){return this.__internal__raw.toHuman(e,t)}toJSON(){return this.__internal__raw.toJSON()}toPrimitive(e){return this.__internal__raw.toPrimitive(e)}toString(){return this.__internal__raw.toString()}toU8a(e){return this.__internal__raw.toU8a(e)}unwrap(){return this.__internal__raw}valueOf(){return this.__internal__raw}}const Di=new Uint8Array,qi=new Uint8Array([0]),ji="bare",Fi=["ExtrinsicUnknown","ExtrinsicUnknown","ExtrinsicUnknown","ExtrinsicUnknown","ExtrinsicV4","ExtrinsicV5"],Xi={bare:"ExtrinsicV5",general:"GeneralExtrinsic",signed:"ExtrinsicV5"},Wi=0,Zi=64,Gi=128,Ki={0:"bare",64:"general",128:"signed"};function Ji(e,t,n,r){if(t instanceof $i)return t.unwrap();const a=!(128&~n),i=5==(63&n)?Xi[r]:Fi[63&n]||Fi[0];return e.createTypeUnsafe(i,[t,{isSigned:a,version:n}])}function Yi(e,t,n=4,r=ji){return(0,ut.b)(t)||Array.isArray(t)||(0,Je.qv)(t)?function(e,t,n,r){if(!t.length)return Ji(e,new Uint8Array,n,r);const[a,i]=ct(t),s=a+i.toNumber();if(s>t.length)throw new Error(`Extrinsic: length less than remainder, expected at least ${s}, found ${t.length}`);const o=t.subarray(a,s),c=192&o[0];return Ji(e,"general"===Ki[`${c}`]?t:o.subarray(1),o[0],Ki[`${c}`]||r)}(e,(0,E.e)(t),n,r):t instanceof e.createClassUnsafe("Call")?Ji(e,{method:t},n,r):Ji(e,t,n,r)}class Qi extends Ui{__internal__preamble;constructor(e,t,n,r){super(e,t,n);const a=Object.keys(e.getSignedExtensionTypes());if(5===this.version&&"general"!==r){const e=e=>this.inner.signature[e];for(let t=0,n=a.length;t>12,1),o=(a>>4)*s;if(i<4||o>=i)throw new Error("Invalid data passed to Mortal era");return[new es(e,i),new es(e,o)]}(e,(0,E.e)(t));if(!t)return[new es(e),new es(e)];if((0,Xe.G)(t))return function(e,t){const{current:n,period:r}=t;let a=Math.pow(2,Math.ceil(Math.log2(r)));a=Math.min(Math.max(a,4),65536);const i=n%a,s=Math.max(a>>12,1),o=i/s*s;return[new es(e,a),new es(e,o)]}(e,t);throw new Error("Invalid data passed to Mortal era")}function rs(e=new Uint8Array){if((0,ut.b)(e))return e.length&&0!==e[0]?new Uint8Array([1,e[0],e[1]]):new Uint8Array([0]);if(!e)return new Uint8Array([0]);if(e instanceof ss)return rs(e.toU8a());if((0,Je.qv)(e))return rs((0,ts.V)(e));if((0,Xe.G)(e)){const t=Object.entries(e).map((([e,t])=>[e.toLowerCase(),t])),n=t.find((([e])=>"mortalera"===e.toLowerCase())),r=t.find((([e])=>"immortalera"===e.toLowerCase()));return n?{MortalEra:n[1]}:r?{ImmortalEra:r[1]}:{MortalEra:e}}throw new Error("Invalid data passed to Era")}class as extends rt{constructor(e,t){super(e,qi)}}class is extends Kn{constructor(e,t){super(e,{period:es,phase:es},ns(e,t))}get encodedLength(){return 2}get period(){return this[0]}get phase(){return this[1]}toHuman(){return{period:Dn(this.period),phase:Dn(this.phase)}}toJSON(){return this.toHex()}toU8a(e){const t=this.period.toNumber(),n=Math.min(15,Math.max(1,function(e){const t=e.toString(2);let n=0;for(;"0"===t[t.length-1-n];)n++;return n}(t)-1))+(this.phase.toNumber()/Math.max(t>>12,1)<<4);return new Uint8Array([255&n,n>>8])}birth(e){const t=this.phase.toNumber(),n=this.period.toNumber();return~~((Math.max(kt(e).toNumber(),t)-t)/n)*n+t}death(e){return this.birth(e)+this.period.toNumber()}}class ss extends nn{constructor(e,t){super(e,{ImmortalEra:as,MortalEra:is},rs(t))}get encodedLength(){return this.isImmortalEra?this.asImmortalEra.encodedLength:this.asMortalEra.encodedLength}get asImmortalEra(){if(!this.isImmortalEra)throw new Error(`Cannot convert '${this.type}' via asImmortalEra`);return this.inner}get asMortalEra(){if(!this.isMortalEra)throw new Error(`Cannot convert '${this.type}' via asMortalEra`);return this.inner}get isImmortalEra(){return 0===this.index}get isMortalEra(){return this.index>0}toU8a(e){return this.isMortalEra?this.asMortalEra.toU8a(e):this.asImmortalEra.toU8a(e)}}const os=["ExtrinsicPayloadUnknown","ExtrinsicPayloadUnknown","ExtrinsicPayloadUnknown","ExtrinsicPayloadUnknown","ExtrinsicPayloadV4","ExtrinsicPayloadV5"],cs={bare:"ExtrinsicPayloadV5",general:"ExtrinsicPayloadV5",signed:"ExtrinsicPayloadV5"};class ds extends Ui{constructor(e,t,{preamble:n,version:r}={}){super(e,function(e,t,n=5,r=ji){if(t instanceof ds)return t.unwrap();const a=5===n?cs[r]:os[n]||os[0];if(t&&t.assetId&&(0,Je.qv)(t.assetId)){const r={...t,assetId:e.createType("TAssetConversion",(0,ts.V)(t.assetId)).toJSON()};return e.createTypeUnsafe(a,[r,{version:n}])}return e.createTypeUnsafe(a,[t,{version:n}])}(e,t,r,n))}get blockHash(){return this.inner.blockHash}get era(){return this.inner.era}get genesisHash(){return this.inner.genesisHash||this.registry.createTypeUnsafe("Hash",[])}get method(){return this.inner.method}get nonce(){return this.inner.nonce}get specVersion(){return this.inner.specVersion||this.registry.createTypeUnsafe("u32",[])}get tip(){return this.inner.tip||this.registry.createTypeUnsafe("Compact",[])}get transactionVersion(){return this.inner.transactionVersion||this.registry.createTypeUnsafe("u32",[])}get assetId(){return this.inner.assetId}get metadataHash(){return this.inner.metadataHash}eq(e){return this.inner.eq(e)}sign(e){const t=this.inner.sign(e);return{signature:(0,N.X)(t)}}toHuman(e,t){return this.inner.toHuman(e,t)}toJSON(){return this.toHex()}toRawType(){return"ExtrinsicPayload"}toString(){return this.toHex()}toU8a(e){return super.toU8a(!!e&&{method:!0})}}class us extends dn{constructor(e,t,{version:n=0}={}){throw super(e,{}),new Error(`Unsupported extrinsic payload version ${n}`)}}class ls extends dn{constructor(e,t,{isSigned:n=!1,version:r=0}={}){throw super(e,{}),new Error(`Unsupported ${n?"":"un"}signed extrinsic version ${127&r}`)}}const fs={address:"Address",assetId:"Option",blockHash:"Hash",blockNumber:"BlockNumber",era:"ExtrinsicEra",genesisHash:"Hash",metadataHash:"Option<[u8;32]>",method:"Call",mode:"u8",nonce:"Compact",runtimeVersion:"RuntimeVersion",signedExtensions:"Vec",tip:"Compact",version:"u8"};class ps extends dn{__internal__extraTypes;constructor(e,t){const n=(0,M.b)({},e.getSignedExtensionTypes(),e.getSignedExtensionExtra());super(e,(0,M.b)({},n,fs,{withSignedTransaction:"bool"}),t),this.__internal__extraTypes={};const r=e=>this.get(e);for(const[a,i]of Object.entries(n))fs[a]||(this.__internal__extraTypes[a]=i),Ue(this,a,r)}get address(){return this.getT("address")}get blockHash(){return this.getT("blockHash")}get blockNumber(){return this.getT("blockNumber")}get era(){return this.getT("era")}get genesisHash(){return this.getT("genesisHash")}get method(){return this.getT("method")}get nonce(){return this.getT("nonce")}get runtimeVersion(){return this.getT("runtimeVersion")}get signedExtensions(){return this.getT("signedExtensions")}get tip(){return this.getT("tip")}get assetId(){return this.getT("assetId")}get version(){return this.getT("version")}get mode(){return this.getT("mode")}get metadataHash(){return this.getT("metadataHash")}get withSignedTransaction(){return this.getT("withSignedTransaction").isTrue}toPayload(){const e={},t=Object.keys(this.__internal__extraTypes);for(let n=0,r=t.length;ne.toString())),specVersion:this.runtimeVersion.specVersion.toHex(),tip:this.tip.toHex(),transactionVersion:this.runtimeVersion.transactionVersion.toHex(),version:this.version.toNumber(),withSignedTransaction:this.withSignedTransaction})}toRaw(){const e=this.toPayload(),t=(0,N.X)(this.registry.createTypeUnsafe("ExtrinsicPayload",[e,{version:e.version}]).toU8a({method:!0}));return{address:e.address,data:t,type:"payload"}}}class hs extends dn{constructor(e,t,{isSigned:n}={}){super(e,{signature:"ExtrinsicSignatureV4",method:"Call"},hs.decodeExtrinsic(e,t,n))}static decodeExtrinsic(e,t,n=!1){if(t instanceof hs)return t;if(t instanceof e.createClassUnsafe("Call"))return{method:t};if((0,ut.b)(t)){const r=e.createTypeUnsafe("ExtrinsicSignatureV4",[t,{isSigned:n}]);return{method:e.createTypeUnsafe("Call",[t.subarray(r.encodedLength)]),signature:r}}return t||{}}get encodedLength(){return this.toU8a().length}get method(){return this.getT("method")}get signature(){return this.getT("signature")}get version(){return 4}addSignature(e,t,n){return this.signature.addSignature(e,t,n),this}sign(e,t){return this.signature.sign(this.method,e,t),this}signFake(e,t){return this.signature.signFake(this.method,e,t),this}}class bs extends dn{__internal__signOptions;constructor(e,t){super(e,(0,M.b)({method:"Bytes"},e.getSignedExtensionTypes(),e.getSignedExtensionExtra()),t),this.__internal__signOptions={withType:e.createTypeUnsafe("ExtrinsicSignature",[])instanceof nn}}inspect(){return super.inspect({method:!0})}get blockHash(){return this.getT("blockHash")}get era(){return this.getT("era")}get genesisHash(){return this.getT("genesisHash")}get method(){return this.getT("method")}get nonce(){return this.getT("nonce")}get specVersion(){return this.getT("specVersion")}get tip(){return this.getT("tip")}get transactionVersion(){return this.getT("transactionVersion")}get assetId(){return this.getT("assetId")}get metadataHash(){return this.getT("metadataHash")}sign(e){return function(e,t,n,r){const a=n.length>256?e.hash(n):n;return t.sign(a,r)}(this.registry,e,this.toU8a({method:!0}),this.__internal__signOptions)}}const ms=new Uint8Array(256).fill(1);function ys(e,t){return e.createTypeUnsafe("Address",[(0,ut.b)(t)?(0,N.X)(t):t])}class xs extends dn{__internal__signKeys;constructor(e,t,{isSigned:n}={}){const r=e.getSignedExtensionTypes();super(e,(0,M.b)({signer:"Address",signature:"ExtrinsicSignature"},r),xs.decodeExtrinsicSignature(t,n)),this.__internal__signKeys=Object.keys(r),De(this,this.__internal__signKeys,(e=>this.get(e)))}static decodeExtrinsicSignature(e,t=!1){return e&&(e instanceof xs||t)?e:Di}get encodedLength(){return this.isSigned?super.encodedLength:0}get isSigned(){return!this.signature.isEmpty}get era(){return this.getT("era")}get nonce(){return this.getT("nonce")}get signature(){return this.multiSignature.value||this.multiSignature}get multiSignature(){return this.getT("signature")}get signer(){return this.getT("signer")}get tip(){return this.getT("tip")}get assetId(){return this.getT("assetId")}get mode(){return this.getT("mode")}get metadataHash(){return this.getT("metadataHash")}_injectSignature(e,t,n){for(let r=0,a=this.__internal__signKeys.length;rthis.get(e)))}static decodeExtrinsicSignature(e,t=!1){return e&&(e instanceof Ts||t)?e:Di}get encodedLength(){return this.isSigned?super.encodedLength:0}get isSigned(){return!this.signature.isEmpty}get era(){return this.getT("era")}get nonce(){return this.getT("nonce")}get signature(){return this.multiSignature.value||this.multiSignature}get multiSignature(){return this.getT("signature")}get signer(){return this.getT("signer")}get tip(){return this.getT("tip")}get assetId(){return this.getT("assetId")}get mode(){return this.getT("mode")}get metadataHash(){return this.getT("metadataHash")}get transactionExtensionVersion(){return this.getT("transactionExtensionVersion")}_injectSignature(e,t,n){for(let r=0,a=this.__internal__signKeys.length;re.length)throw new Error(`Extrinsic: length less than remainder, expected at least ${r}, found ${e.length}`);const a=e.subarray(t,r);if(69!==a[0])throw new Error("Extrinsic: incorrect version for General Transactions, expected 5, found "+(127&a[0]));return a.subarray(1)}((0,E.e)(t));if((0,Xe.G)(t)){const{payload:n,transactionExtensionVersion:r}=t;return(0,M.b)(n||{},{transactionExtensionVersion:r||e.getTransactionExtensionVersion()})}return{}}get encodedLength(){return super.encodedLength}get era(){return this.getT("era")}get nonce(){return this.getT("nonce")}get tip(){return this.getT("tip")}get assetId(){return this.getT("assetId")}get mode(){return this.getT("mode")}get metadataHash(){return this.getT("metadataHash")}get transactionExtensionVersion(){return this.getT("transactionExtensionVersion")}get method(){return this.getT("method")}get version(){return this.__internal__version}get preamble(){return this.__internal__preamble}toHex(e){return(0,N.X)(this.toU8a(e))}toU8a(e){return e?this.encode():ar(this.encode())}toRawType(){return"GeneralExt"}encode(){return Mt(new Uint8Array([this.version|this.preamble]),super.toU8a())}signFake(){throw new Error("Extrinsic: Type GeneralExtrinsic does not have signFake implemented")}addSignature(){throw new Error("Extrinsic: Type GeneralExtrinsic does not have addSignature implemented")}sign(){throw new Error("Extrinsic: Type GeneralExtrinsic does not have sign implemented")}signature(){throw new Error("Extrinsic: Type GeneralExtrinsic does not have the signature getter")}}function ks(e){if(!Number.isSafeInteger(e))throw new Error(`Wrong integer: ${e}`)}function _s(e){return e instanceof Uint8Array||null!=e&&"object"==typeof e&&"Uint8Array"===e.constructor.name}function Ps(...e){const t=e=>e,n=(e,t)=>n=>e(t(n));return{encode:e.map((e=>e.encode)).reduceRight(n,t),decode:e.map((e=>e.decode)).reduce(n,t)}}function Ms(e){return{encode:t=>{if(!Array.isArray(t)||t.length&&"number"!=typeof t[0])throw new Error("alphabet.encode input should be an array of numbers");return t.map((t=>{if(ks(t),t<0||t>=e.length)throw new Error(`Digit index outside alphabet: ${t} (alphabet: ${e.length})`);return e[t]}))},decode:t=>{if(!Array.isArray(t)||t.length&&"string"!=typeof t[0])throw new Error("alphabet.decode input should be array of strings");return t.map((t=>{if("string"!=typeof t)throw new Error(`alphabet.decode: not string element=${t}`);const n=e.indexOf(t);if(-1===n)throw new Error(`Unknown letter: "${t}". Allowed: ${e}`);return n}))}}}function Is(e=""){if("string"!=typeof e)throw new Error("join separator should be string");return{encode:t=>{if(!Array.isArray(t)||t.length&&"string"!=typeof t[0])throw new Error("join.encode input should be array of strings");for(let e of t)if("string"!=typeof e)throw new Error(`join.encode: non-string input=${e}`);return t.join(e)},decode:t=>{if("string"!=typeof t)throw new Error("join.decode input should be string");return t.split(e)}}}function Ns(e,t="="){if(ks(e),"string"!=typeof t)throw new Error("padding chr should be string");return{encode(n){if(!Array.isArray(n)||n.length&&"string"!=typeof n[0])throw new Error("padding.encode input should be array of strings");for(let e of n)if("string"!=typeof e)throw new Error(`padding.encode: non-string input=${e}`);for(;n.length*e%8;)n.push(t);return n},decode(n){if(!Array.isArray(n)||n.length&&"string"!=typeof n[0])throw new Error("padding.encode input should be array of strings");for(let e of n)if("string"!=typeof e)throw new Error(`padding.decode: non-string input=${e}`);let r=n.length;if(r*e%8)throw new Error("Invalid padding: string should have whole number of bytes");for(;r>0&&n[r-1]===t;r--)if(!((r-1)*e%8))throw new Error("Invalid padding: string has too much padding");return n.slice(0,r)}}}function Es(e){if("function"!=typeof e)throw new Error("normalize fn should be function");return{encode:e=>e,decode:t=>e(t)}}function Os(e,t,n){if(t<2)throw new Error(`convertRadix: wrong from=${t}, base cannot be less than 2`);if(n<2)throw new Error(`convertRadix: wrong to=${n}, base cannot be less than 2`);if(!Array.isArray(e))throw new Error("convertRadix: data should be array");if(!e.length)return[];let r=0;const a=[],i=Array.from(e);for(i.forEach((e=>{if(ks(e),e<0||e>=t)throw new Error(`Wrong integer: ${e}`)}));;){let e=0,s=!0;for(let a=r;at?As(t,e%t):e,Cs=(e,t)=>e+(t-As(e,t));function Hs(e,t,n,r){if(!Array.isArray(e))throw new Error("convertRadix2: data should be array");if(t<=0||t>32)throw new Error(`convertRadix2: wrong from=${t}`);if(n<=0||n>32)throw new Error(`convertRadix2: wrong to=${n}`);if(Cs(t,n)>32)throw new Error(`convertRadix2: carry overflow from=${t} to=${n} carryBits=${Cs(t,n)}`);let a=0,i=0;const s=2**n-1,o=[];for(const c of e){if(ks(c),c>=2**t)throw new Error(`convertRadix2: invalid data word=${c} from=${t}`);if(a=a<32)throw new Error(`convertRadix2: carry overflow pos=${i} from=${t}`);for(i+=t;i>=n;i-=n)o.push((a>>i-n&s)>>>0);a&=2**i-1}if(a=a<=t)throw new Error("Excess padding");if(!r&&a)throw new Error(`Non-zero padding: ${a}`);return r&&i>0&&o.push(a>>>0),o}function Rs(e){return ks(e),{encode:t=>{if(!_s(t))throw new Error("radix.encode input should be Uint8Array");return Os(Array.from(t),256,e)},decode:t=>{if(!Array.isArray(t)||t.length&&"number"!=typeof t[0])throw new Error("radix.decode input should be array of numbers");return Uint8Array.from(Os(t,e,256))}}}function Bs(e,t=!1){if(ks(e),e<=0||e>32)throw new Error("radix2: bits should be in (0..32]");if(Cs(8,e)>32||Cs(e,8)>32)throw new Error("radix2: carry overflow");return{encode:n=>{if(!_s(n))throw new Error("radix2.encode input should be Uint8Array");return Hs(Array.from(n),8,e,!t)},decode:n=>{if(!Array.isArray(n)||n.length&&"number"!=typeof n[0])throw new Error("radix2.decode input should be array of numbers");return Uint8Array.from(Hs(n,e,8,t))}}}const Ls=Ps(Bs(4),Ms("0123456789ABCDEF"),Is("")),zs=Ps(Bs(5),Ms("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"),Ns(5),Is("")),Us=(Bs(5),Ms("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"),Is(""),Bs(5),Ms("0123456789ABCDEFGHIJKLMNOPQRSTUV"),Ns(5),Is(""),Bs(5),Ms("0123456789ABCDEFGHIJKLMNOPQRSTUV"),Is(""),Bs(5),Ms("0123456789ABCDEFGHJKMNPQRSTVWXYZ"),Is(""),Es((e=>e.toUpperCase().replace(/O/g,"0").replace(/[IL]/g,"1"))),Ps(Bs(6),Ms("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),Ns(6),Is(""))),Ds=(Bs(6),Ms("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),Is(""),Ps(Bs(6),Ms("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),Ns(6),Is(""))),qs=(Bs(6),Ms("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),Is(""),e=>Ps(Rs(58),Ms(e),Is(""))),js=qs("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),Fs=[0,2,3,5,6,7,9,10,11],Xs={encode(e){let t="";for(let n=0;n(new TextDecoder).decode(e),decode:e=>(new TextEncoder).encode(e)};Bs(4),Ms("0123456789abcdef"),Is(""),Es((e=>{if("string"!=typeof e||e.length%2)throw new TypeError(`hex.decode: expected string, got ${typeof e} with length ${e.length}`);return e.toLowerCase()}));function Zs({coder:e,ipfs:t},n){return(r,a)=>(n(r,a),e.decode(t&&a?r.substring(1):r))}function Gs({coder:e,ipfs:t}){return(n,r)=>{const a=e.encode((0,E.e)(n));return t&&r?`${t}${a}`:a}}function Ks({chars:e,ipfs:t,type:n,withPadding:r}){return(a,i)=>{if("string"!=typeof a)throw new Error(`Expected ${n} string input`);if(t&&i&&!a.startsWith(t))throw new Error(`Expected ipfs-compatible ${n} to start with '${t}'`);for(let t=i?1:0,s=a.length;te)),prefix:42};function fo(e,t,n=-1){if(!e)throw new Error("Invalid empty address passed");if((0,ut.b)(e)||(0,Je.qv)(e))return(0,E.e)(e);try{const r=Qs(e);if(!lo.allowedEncodedLengths.includes(r.length))throw new Error("Invalid decoded address length");const[a,i,s,o]=function(e){const t=64&e[0]?2:1,n=1===t?e[0]:(63&e[0])<<2|e[1]>>6|(63&e[1])<<8,r=[34+t,35+t].includes(e.length),a=e.length-(r?2:1),i=to(e.subarray(0,a));return[!(128&e[0]||[46,47].includes(e[0])||(r?e[e.length-2]!==i[0]||e[e.length-1]!==i[1]:e[e.length-1]!==i[0])),a,t,n]}(r);if(!a&&!t)throw new Error("Invalid decoded address checksum");if(-1!==n&&n!==o)throw new Error(`Expected ss58Format ${n}, received ${o}`);return r.slice(s,i)}catch(r){throw new Error(`Decoding ${e}: ${r.message}`)}}function po(e,t=lo.prefix){const n=fo(e);if(t<0||t>16383||[46,47].includes(t))throw new Error("Out of range ss58Format specified");if(!lo.allowedDecodedLengths.includes(n.length))throw new Error(`Expected a valid key to convert, with length ${lo.allowedDecodedLengths.join(", ")}`);const r=Mt(t<64?[t]:[(252&t)>>2|64,t>>8|(3&t)<<6],n);return $s(Mt(r,to(r).subarray(0,[32,33].includes(n.length)?2:1)))}function ho(e){if((0,ut.b)(e)||Array.isArray(e))return(0,E.e)(e);if(!e)return new Uint8Array;if((0,Je.qv)(e))return(0,ts.V)(e);if((0,I.K)(e))return fo(e.toString());throw new Error("Unknown type passed to AccountId constructor, found typeof "+typeof e)}class bo extends lr{constructor(e,t=264,n){const r=ho(n);if(8*r.lengthe)))throw new Error(`Invalid AccountId provided, expected ${t>>3} bytes, found ${r.length}`);super(e,r,t)}eq(e){return super.eq(ho(e))}toHuman(){return this.toJSON()}toJSON(){return this.toString()}toPrimitive(){return this.toJSON()}toString(){return po(this,this.registry.chainSS58)}toRawType(){return"AccountId"}}class mo extends bo{constructor(e,t){super(e,256,t)}}class yo extends bo{constructor(e,t){super(e,264,t)}}class xo extends(rr.with(32)){__UIntType="u32"}const go=new st(239),vo=new st(1).shln(16),wo=new st(1).shln(32);function Vo(e){return e instanceof To?e.toBn():(0,pn.f)(e)||(0,Lt.E)(e)||(0,Je.qv)(e)||(0,ut.b)(e)||(0,wt.s)(e)?e:Vo(fo(e))}class To extends xo{constructor(e,t=new st(0)){super(e,Vo(t))}static calcLength(e){const t=kt(e);return t.lte(go)?1:t.lt(vo)?2:t.lt(wo)?4:8}static readLength(e){const t=e[0];return 252===t?[1,2]:253===t?[1,4]:254===t?[1,8]:[0,1]}static writeLength(e){switch(e.length){case 2:return new Uint8Array([252]);case 4:return new Uint8Array([253]);case 8:return new Uint8Array([254]);default:return new Uint8Array([])}}eq(e){return(0,pn.f)(e)||(0,Lt.E)(e)?super.eq(e):super.eq(this.registry.createTypeUnsafe("AccountIndex",[e]))}toHuman(){return this.toJSON()}toJSON(){return this.toString()}toPrimitive(){return this.toJSON()}toString(){const e=To.calcLength(this);return po(this.toU8a().subarray(0,e),this.registry.chainSS58)}toRawType(){return"AccountIndex"}}class So extends dn{constructor(e,t){super(e,{header:"Header",extrinsics:"Vec"},t)}get contentHash(){return this.registry.hash(this.toU8a())}get extrinsics(){return this.getT("extrinsics")}get hash(){return this.header.hash}get header(){return this.getT("header")}}function ko(e,t){return t.fields.reduce(((t,{name:n,type:r},a)=>(t[n.unwrapOr(`param${a}`).toString()]=e.createLookupType(r),t)),{})}function _o(e,t=new Uint8Array,n){if((0,ut.b)(t)||(0,Je.qv)(t))return function(e,t,n){const r=e.firstCallIndex.slice();r.set(t.subarray(0,2),0);const a=n||e.findMetaCall(r).meta;return{args:t.subarray(2),argsDef:ko(e,a),callIndex:r,meta:a}}(e,(0,E.e)(t),n);if((0,Xe.G)(t)&&t.callIndex&&t.args)return function(e,t,n){const{args:r,callIndex:a}=t,i=a instanceof Po?a.toU8a():a,s=n||e.findMetaCall(i).meta;return{args:r,argsDef:ko(e,s),callIndex:a,meta:s}}(e,t,n);throw new Error(`Call: Cannot decode value '${t}' of type ${typeof t}`)}class Po extends lr{constructor(e,t){super(e,t,16)}toPrimitive(){return this.toHex()}}class Mo extends dn{_meta;constructor(e,t,n){const r=_o(e,t,n);try{super(e,{callIndex:Po,args:dn.with(r.argsDef)},r)}catch(a){let t="unknown.unknown";try{const n=e.findMetaCall(r.callIndex);t=`${n.section}.${n.method}`}catch{}throw new Error(`Call: failed decoding ${t}:: ${a.message}`)}this._meta=r.meta}get args(){return[...this.getT("args").values()]}get argsDef(){return ko(this.registry,this.meta)}get argsEntries(){return[...this.getT("args").entries()]}get callIndex(){return this.getT("callIndex").toU8a()}get data(){return this.getT("args").toU8a()}get meta(){return this._meta}get method(){return this.registry.findMetaCall(this.callIndex).method}get section(){return this.registry.findMetaCall(this.callIndex).section}is(e){return e.callIndex[0]===this.callIndex[0]&&e.callIndex[1]===this.callIndex[1]}toHuman(e,t){let n;try{n=this.registry.findMetaCall(this.callIndex)}catch{}return(0,M.b)({args:this.argsEntries.reduce(((n,[r,a])=>(0,M.b)(n,{[r]:a.toHuman(e,t)})),{}),method:n?.method,section:n?.section},e&&n?{docs:n.meta.docs.map((e=>e.toString()))}:null)}toRawType(){return"Call"}}function Io(e,t,n,r=!0){return n&&(0,qe.T)(n.unwrapOrDefault)?n:e.createTypeUnsafe(t,[r?(0,Kt.k)(n)||(0,Fe.b)(n)?null:Array.isArray(n)?n:[n]:n])}function No(e,t){return(t&&(0,qe.T)(t.entries)?[...t.entries()]:Object.entries(t||{})).reduce(((t,[n,r])=>(t[n]=function(e,t,n){return"ss58Format"===t?Io(e,"Option",n,!1):"tokenDecimals"===t?Io(e,"Option>",n):"tokenSymbol"===t?Io(e,"Option>",n):"isEthereum"===t?Io(e,"Bool",n,!1):n}(e,n,r),t)),{isEthereum:e.createTypeUnsafe("Bool",[]),ss58Format:e.createTypeUnsafe("Option",[]),tokenDecimals:e.createTypeUnsafe("Option>",[]),tokenSymbol:e.createTypeUnsafe("Option>",[])})}class Eo extends Ke{constructor(e,t){super(e,No(e,t))}get isEthereum(){return this.getT("isEthereum")}get ss58Format(){return this.getT("ss58Format")}get tokenDecimals(){return this.getT("tokenDecimals")}get tokenSymbol(){return this.getT("tokenSymbol")}}const Oo=(0,La.j)("aura"),Ao=(0,La.j)("BABE"),Co=(0,La.j)("FRNK"),Ho=(0,La.j)("pow_"),Ro=(0,La.j)("nmbs");class Bo extends lr{constructor(e,t){super(e,(0,Lt.E)(t)?Pt(t,{isLe:!1}):t,32)}get isAura(){return this.eq(Oo)}get isBabe(){return this.eq(Ao)}get isGrandpa(){return this.eq(Co)}get isPow(){return this.eq(Ho)}get isNimbus(){return this.eq(Ro)}extractAuthor(e,t){if(t?.length){if(this.isAura)return function(e,t,n){return n[e.createTypeUnsafe("RawAuraPreDigest",[t.toU8a(!0)]).slotNumber.mod(new st(n.length)).toNumber()]}(this.registry,e,t);if(this.isBabe)return function(e,t,n){return n[e.createTypeUnsafe("RawBabePreDigestCompat",[t.toU8a(!0)]).value.toNumber()]}(this.registry,e,t)}if(this.isPow||this.isNimbus)return function(e,t){return e.createTypeUnsafe("AccountId",[t])}(this.registry,e)}toHuman(){return this.toString()}toRawType(){return"ConsensusEngineId"}toString(){return this.isAscii?nt(this):(0,N.X)(this)}}const Lo=new Uint8Array([255]);function zo(e,t){return t instanceof Uo?t.inner:t instanceof mo||t instanceof To?t:(0,pn.f)(t)||(0,Lt.E)(t)||(0,wt.s)(t)?e.createTypeUnsafe("AccountIndex",[t]):Array.isArray(t)||(0,Je.qv)(t)||(0,ut.b)(t)?function(e,t){if(32===t.length)return e.createTypeUnsafe("AccountId",[t]);if(255===t[0])return e.createTypeUnsafe("AccountId",[t.subarray(1)]);const[n,r]=To.readLength(t);return e.createTypeUnsafe("AccountIndex",[ot(t.subarray(n,n+r))])}(e,(0,E.e)(t)):function(e,t){const n=fo(t);return 32===n.length?e.createTypeUnsafe("AccountId",[n]):e.createTypeUnsafe("AccountIndex",[ot(n)])}(e,t)}class Uo extends Ui{constructor(e,t=new Uint8Array){super(e,zo(e,t))}get encodedLength(){const e=this._rawLength;return e+(e>1?1:0)}get _rawLength(){return this.inner instanceof To?To.calcLength(this.inner):this.inner.encodedLength}inspect(){const e=this.inner.toU8a().subarray(0,this._rawLength);return{outer:[new Uint8Array(this.inner instanceof To?To.writeLength(e):Lo),e]}}toHex(){return(0,N.X)(this.toU8a())}toRawType(){return"Address"}toU8a(e){const t=this.inner.toU8a().subarray(0,this._rawLength);return e?t:Mt(this.inner instanceof To?To.writeLength(t):Lo,t)}}function Do(e,t){return[0,32].includes(t.length)?{Id:t}:20===t.length?{Address20:t}:t.length<=8?{Index:e.createTypeUnsafe("AccountIndex",[t]).toNumber()}:t}class qo extends nn{constructor(e,t){super(e,{Id:"AccountId",Index:"Compact",Raw:"Bytes",Address32:"H256",Address20:"H160"},function(e,t){return t instanceof mo?{Id:t}:(0,ut.b)(t)?Do(e,t):t instanceof qo?t:t instanceof To||(0,pn.f)(t)||(0,Lt.E)(t)?{Index:(0,Lt.E)(t)?t:t.toNumber()}:(0,I.K)(t)?Do(e,fo(t.toString())):t}(e,t))}inspect(){const{inner:e,outer:t=[]}=this.inner.inspect();return{inner:e,outer:[new Uint8Array([this.index]),...t]}}toString(){return this.value.toString()}}class jo extends Boolean{registry;createdAtHash;initialU8aLength=1;isStorageFallback;constructor(e,t=!1){super((0,ut.b)(t)?1===t[0]:t instanceof Boolean?t.valueOf():!!t),this.registry=e}get encodedLength(){return 1}get hash(){return this.registry.hash(this.toU8a())}get isEmpty(){return this.isFalse}get isFalse(){return!this.isTrue}get isTrue(){return this.valueOf()}eq(e){return this.valueOf()===(e instanceof Boolean?e.valueOf():e)}inspect(){return{outer:[this.toU8a()]}}toHex(){return(0,N.X)(this.toU8a())}toHuman(){return this.toJSON()}toJSON(){return this.valueOf()}toPrimitive(){return this.toJSON()}toRawType(){return"bool"}toString(){return this.toJSON().toString()}toU8a(e){return new Uint8Array([this.valueOf()?1:0])}}const Fo=128;function Xo(e){return e?new Uint8Array([128]):new Uint8Array([0])}function Wo(e,t){return(0,ut.b)(t)?function(e){return e.length?e.subarray(0,1):new Uint8Array([0])}(t):(0,Fe.b)(t)||t instanceof Boolean||rn(t)?Xo(new jo(e,t).isTrue):(0,Lt.E)(t)?Xo(t<0):function(e,t){return new Uint8Array([(new jo(e,t.aye).isTrue?Fo:0)|e.createTypeUnsafe("Conviction",[t.conviction||0]).index])}(e,t)}class Zo extends lr{__internal__aye;__internal__conviction;constructor(e,t){const n=Wo(e,t);super(e,n,8),this.__internal__aye=(n[0]&Fo)===Fo,this.__internal__conviction=this.registry.createTypeUnsafe("Conviction",[127&n[0]])}get conviction(){return this.__internal__conviction}get isAye(){return this.__internal__aye}get isNay(){return!this.isAye}toHuman(e){return{conviction:this.conviction.toHuman(e),vote:this.isAye?"Aye":"Nay"}}toPrimitive(){return{aye:this.isAye,conviction:this.conviction.toPrimitive()}}toRawType(){return"Vote"}}const Go=[],Ko=[],Jo=[],Yo=BigInt(0),Qo=BigInt(1),$o=BigInt(2),ec=BigInt(7),tc=BigInt(256),nc=BigInt(113);for(let xV=0,gV=Qo,vV=1,wV=0;xV<24;xV++){[vV,wV]=[wV,(2*vV+3*wV)%5],Go.push(2*(5*wV+vV)),Ko.push((xV+1)*(xV+2)/2%64);let e=Yo;for(let t=0;t<7;t++)gV=(gV<>ec)*nc)%tc,gV&$o&&(e^=Qo<<(Qo<n>32?Pa(e,t,n):ka(e,t,n),sc=(e,t,n)=>n>32?Ma(e,t,n):_a(e,t,n);class oc extends ba{constructor(e,t,n,r=!1,a=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=n,this.enableXOF=r,this.rounds=a,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,ta(n),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=oa(this.state)}keccak(){ua||pa(this.state32),function(e,t=24){const n=new Uint32Array(10);for(let r=24-t;r<24;r++){for(let r=0;r<10;r++)n[r]=e[r]^e[r+10]^e[r+20]^e[r+30]^e[r+40];for(let r=0;r<10;r+=2){const t=(r+8)%10,a=(r+2)%10,i=n[a],s=n[a+1],o=ic(i,s,1)^n[t],c=sc(i,s,1)^n[t+1];for(let n=0;n<50;n+=10)e[r+n]^=o,e[r+n+1]^=c}let t=e[2],a=e[3];for(let n=0;n<24;n++){const r=Ko[n],i=ic(t,a,r),s=sc(t,a,r),o=Go[n];t=e[o],a=e[o+1],e[o]=i,e[o+1]=s}for(let r=0;r<50;r+=10){for(let t=0;t<10;t++)n[t]=e[r+t];for(let t=0;t<10;t++)e[r+t]^=~n[(t+2)%10]&n[(t+4)%10]}e[0]^=rc[r],e[1]^=ac[r]}n.fill(0)}(this.state32,this.rounds),ua||pa(this.state32),this.posOut=0,this.pos=0}update(e){aa(this);const{blockLen:t,state:n}=this,r=(e=ha(e)).length;for(let a=0;a=n&&this.keccak();const i=Math.min(n-this.posOut,a-r);e.set(t.subarray(this.posOut,this.posOut+i),r),this.posOut+=i,r+=i}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return ta(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(ia(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){const{blockLen:t,suffix:n,outputLen:r,rounds:a,enableXOF:i}=this;return e||(e=new oc(t,n,r,i,a)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=a,e.suffix=n,e.outputLen=r,e.enableXOF=i,e.destroyed=this.destroyed,e}}const cc=(e,t,n)=>ma((()=>new oc(t,e,n))),dc=_i({256:vi,512:wi},{256:cc(1,136,32),512:cc(1,72,64)});function uc(e){return!(!e||42!==e.length||!(0,Je.qv)(e))&&(!(!/^(0x)?[0-9a-f]{40}$/.test(e)&&!/^(0x)?[0-9A-F]{40}$/.test(e))||function(e){const t=e.replace("0x",""),n=(0,N.X)(dc(t.toLowerCase()),-1,!1);for(let i=0;i<40;i++)if(r=t[i],a=parseInt(n[i],16),r!==(a>7?r.toUpperCase():r.toLowerCase()))return!1;var r,a;return!0}(e))}const lc=(e,t,n)=>e&t^e&n^t&n;class fc extends ba{constructor(e,t,n,r){super(),this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=r,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=ca(this.buffer)}update(e){aa(this);const{view:t,buffer:n,blockLen:r}=this,a=(e=ha(e)).length;for(let i=0;ir-i&&(this.process(n,0),i=0);for(let u=i;u>a&i),o=Number(n&i),c=r?4:0,d=r?0:4;e.setUint32(t+c,s,r),e.setUint32(t+d,o,r)}(n,r-8,BigInt(8*this.length),a),this.process(n,0);const s=ca(e),o=this.outputLen;if(o%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const c=o/4,d=this.get();if(c>d.length)throw new Error("_sha2: outputLen bigger than state");for(let u=0;u>>3,r=da(t,17)^da(t,19)^t>>>10;bc[l]=r+bc[l-7]+n+bc[l-16]|0}let{A:n,B:r,C:a,D:i,E:s,F:o,G:c,H:d}=this;for(let l=0;l<64;l++){const e=d+(da(s,6)^da(s,11)^da(s,25))+((u=s)&o^~u&c)+pc[l]+bc[l]|0,t=(da(n,2)^da(n,13)^da(n,22))+lc(n,r,a)|0;d=c,c=o,o=s,s=i+e|0,i=a,a=r,r=n,n=e+t|0}var u;n=n+this.A|0,r=r+this.B|0,a=a+this.C|0,i=i+this.D|0,s=s+this.E|0,o=o+this.F|0,c=c+this.G|0,d=d+this.H|0,this.set(n,r,a,i,s,o,c,d)}roundClean(){bc.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const yc=ma((()=>new mc));class xc extends ba{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,ra(e);const n=ha(t);if(this.iHash=e.create(),"function"!=typeof this.iHash.update)throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const r=this.blockLen,a=new Uint8Array(r);a.set(n.length>r?e.create().update(n).digest():n);for(let i=0;inew xc(e,t).update(n).digest();gc.create=(e,t)=>new xc(e,t);const vc=BigInt(0),wc=BigInt(1),Vc=BigInt(2);function Tc(e){return e instanceof Uint8Array||null!=e&&"object"==typeof e&&"Uint8Array"===e.constructor.name}function Sc(e){if(!Tc(e))throw new Error("Uint8Array expected")}function kc(e,t){if("boolean"!=typeof t)throw new Error(`${e} must be valid boolean, got "${t}".`)}const _c=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function Pc(e){Sc(e);let t="";for(let n=0;n=Nc._0&&e<=Nc._9?e-Nc._0:e>=Nc._A&&e<=Nc._F?e-(Nc._A-10):e>=Nc._a&&e<=Nc._f?e-(Nc._a-10):void 0}function Oc(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);const t=e.length,n=t/2;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(n);for(let a=0,i=0;a"bigint"==typeof e&&vc<=e;function Uc(e,t,n){return zc(e)&&zc(t)&&zc(n)&&t<=e&&evc;e>>=wc,t+=1);return t}const jc=e=>(Vc<new Uint8Array(e),Xc=e=>Uint8Array.from(e);function Wc(e,t,n){if("number"!=typeof e||e<2)throw new Error("hashLen must be a number");if("number"!=typeof t||t<2)throw new Error("qByteLen must be a number");if("function"!=typeof n)throw new Error("hmacFn must be a function");let r=Fc(e),a=Fc(e),i=0;const s=()=>{r.fill(1),a.fill(0),i=0},o=(...e)=>n(a,r,...e),c=(e=Fc())=>{a=o(Xc([0]),e),r=o(),0!==e.length&&(a=o(Xc([1]),e),r=o())},d=()=>{if(i++>=1e3)throw new Error("drbg: tried 1000 values");let e=0;const n=[];for(;e{let n;for(s(),c(e);!(n=t(d()));)c();return s(),n}}const Zc={bigint:e=>"bigint"==typeof e,function:e=>"function"==typeof e,boolean:e=>"boolean"==typeof e,string:e=>"string"==typeof e,stringOrUint8Array:e=>"string"==typeof e||Tc(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>"function"==typeof e&&Number.isSafeInteger(e.outputLen)};function Gc(e,t,n={}){const r=(t,n,r)=>{const a=Zc[n];if("function"!=typeof a)throw new Error(`Invalid validator "${n}", expected function`);const i=e[t];if(!(r&&void 0===i||a(i,e)))throw new Error(`Invalid param ${String(t)}=${i} (${typeof i}), expected ${n}`)};for(const[a,i]of Object.entries(t))r(a,i,!1);for(const[a,i]of Object.entries(n))r(a,i,!0);return e}function Kc(e){const t=new WeakMap;return(n,...r)=>{const a=t.get(n);if(void 0!==a)return a;const i=e(n,...r);return t.set(n,i),i}}const Jc=BigInt(0),Yc=BigInt(1),Qc=BigInt(2),$c=BigInt(3),ed=BigInt(4),td=BigInt(5),nd=BigInt(8);BigInt(9),BigInt(16);function rd(e,t){const n=e%t;return n>=Jc?n:t+n}function ad(e,t,n){if(n<=Jc||t 0");if(n===Yc)return Jc;let r=Yc;for(;t>Jc;)t&Yc&&(r=r*e%n),e=e*e%n,t>>=Yc;return r}function id(e,t,n){let r=e;for(;t-- >Jc;)r*=r,r%=n;return r}function sd(e,t){if(e===Jc||t<=Jc)throw new Error(`invert: expected positive integers, got n=${e} mod=${t}`);let n=rd(e,t),r=t,a=Jc,i=Yc,s=Yc,o=Jc;for(;n!==Jc;){const e=r/n,t=r%n,c=a-s*e,d=i-o*e;r=n,n=t,a=s,i=o,s=c,o=d}if(r!==Yc)throw new Error("invert: does not exist");return rd(a,t)}function od(e){if(e%ed===$c){const t=(e+Yc)/ed;return function(e,n){const r=e.pow(n,t);if(!e.eql(e.sqr(r),n))throw new Error("Cannot find square root");return r}}if(e%nd===td){const t=(e-td)/nd;return function(e,n){const r=e.mul(n,Qc),a=e.pow(r,t),i=e.mul(n,a),s=e.mul(e.mul(i,Qc),a),o=e.mul(i,e.sub(s,e.ONE));if(!e.eql(e.sqr(o),n))throw new Error("Cannot find square root");return o}}return function(e){const t=(e-Yc)/Qc;let n,r,a;for(n=e-Yc,r=0;n%Qc===Jc;n/=Qc,r++);for(a=Qc;a 0, got ${e}`);const{nBitLength:a,nByteLength:i}=dd(e,t);if(i>2048)throw new Error("Field lengths over 2048 bytes are not supported");const s=od(e),o=Object.freeze({ORDER:e,BITS:a,BYTES:i,MASK:jc(a),ZERO:Jc,ONE:Yc,create:t=>rd(t,e),isValid:t=>{if("bigint"!=typeof t)throw new Error("Invalid field element: expected bigint, got "+typeof t);return Jc<=t&&te===Jc,isOdd:e=>(e&Yc)===Yc,neg:t=>rd(-t,e),eql:(e,t)=>e===t,sqr:t=>rd(t*t,e),add:(t,n)=>rd(t+n,e),sub:(t,n)=>rd(t-n,e),mul:(t,n)=>rd(t*n,e),pow:(e,t)=>function(e,t,n){if(n 0");if(n===Jc)return e.ONE;if(n===Yc)return t;let r=e.ONE,a=t;for(;n>Jc;)n&Yc&&(r=e.mul(r,a)),a=e.sqr(a),n>>=Yc;return r}(o,e,t),div:(t,n)=>rd(t*sd(n,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>sd(t,e),sqrt:r.sqrt||(e=>s(o,e)),invertBatch:e=>function(e,t){const n=new Array(t.length),r=t.reduce(((t,r,a)=>e.is0(r)?t:(n[a]=t,e.mul(t,r))),e.ONE),a=e.inv(r);return t.reduceRight(((t,r,a)=>e.is0(r)?t:(n[a]=e.mul(t,n[a]),e.mul(t,r))),a),n}(o,e),cmov:(e,t,n)=>n?t:e,toBytes:e=>n?Rc(e,i):Hc(e,i),fromBytes:e=>{if(e.length!==i)throw new Error(`Fp.fromBytes: expected ${i}, got ${e.length}`);return n?Cc(e):Ac(e)}});return Object.freeze(o)}function ld(e){if("bigint"!=typeof e)throw new Error("field order must be bigint");const t=e.toString(2).length;return Math.ceil(t/8)}function fd(e){const t=ld(e);return t+Math.ceil(t/2)}const pd=BigInt(0),hd=BigInt(1),bd=new WeakMap,md=new WeakMap;function yd(e){return function(e){const t=cd.reduce(((e,t)=>(e[t]="function",e)),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"});Gc(e,t)}(e.Fp),Gc(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...dd(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}function xd(e){void 0!==e.lowS&&kc("lowS",e.lowS),void 0!==e.prehash&&kc("prehash",e.prehash)}const{Ph:gd,aT:vd}=r,wd={Err:class extends Error{constructor(e=""){super(e)}},_tlv:{encode:(e,t)=>{const{Err:n}=wd;if(e<0||e>256)throw new n("tlv.encode: wrong tag");if(1&t.length)throw new n("tlv.encode: unpadded data");const r=t.length/2,a=Mc(r);if(a.length/2&128)throw new n("tlv.encode: long form length too big");const i=r>127?Mc(a.length/2|128):"";return`${Mc(e)}${i}${a}${t}`},decode(e,t){const{Err:n}=wd;let r=0;if(e<0||e>256)throw new n("tlv.encode: wrong tag");if(t.length<2||t[r++]!==e)throw new n("tlv.decode: wrong tlv");const a=t[r++];let i=0;if(!!(128&a)){const e=127&a;if(!e)throw new n("tlv.decode(long): indefinite length not supported");if(e>4)throw new n("tlv.decode(long): byte length is too big");const s=t.subarray(r,r+e);if(s.length!==e)throw new n("tlv.decode: length bytes not complete");if(0===s[0])throw new n("tlv.decode(long): zero leftmost byte");for(const t of s)i=i<<8|t;if(r+=e,i<128)throw new n("tlv.decode(long): not minimal encoding")}else i=a;const s=t.subarray(r,r+i);if(s.length!==i)throw new n("tlv.decode: wrong value length");return{v:s,l:t.subarray(r+i)}}},_int:{encode(e){const{Err:t}=wd;if(e{const a=t.toAffine();return Lc(Uint8Array.from([4]),n.toBytes(a.x),n.toBytes(a.y))}),i=t.fromBytes||(e=>{const t=e.subarray(1);return{x:n.fromBytes(t.subarray(0,n.BYTES)),y:n.fromBytes(t.subarray(n.BYTES,2*n.BYTES))}});function s(e){const{a:r,b:a}=t,i=n.sqr(e),s=n.mul(i,e);return n.add(n.add(s,n.mul(e,r)),a)}if(!n.eql(n.sqr(t.Gy),s(t.Gx)))throw new Error("bad generator point: equation left != right");function o(e){const{allowedPrivateKeyLengths:n,nByteLength:r,wrapPrivateKey:a,n:i}=t;if(n&&"bigint"!=typeof e){if(Tc(e)&&(e=Pc(e)),"string"!=typeof e||!n.includes(e.length))throw new Error("Invalid key");e=e.padStart(2*r,"0")}let s;try{s="bigint"==typeof e?e:Ac(Bc("private key",e,r))}catch(o){throw new Error(`private key must be ${r} bytes, hex or bigint, not ${typeof e}`)}return a&&(s=rd(s,i)),Dc("private key",s,Td,i),s}function c(e){if(!(e instanceof l))throw new Error("ProjectivePoint expected")}const d=Kc(((e,t)=>{const{px:r,py:a,pz:i}=e;if(n.eql(i,n.ONE))return{x:r,y:a};const s=e.is0();null==t&&(t=s?n.ONE:n.inv(i));const o=n.mul(r,t),c=n.mul(a,t),d=n.mul(i,t);if(s)return{x:n.ZERO,y:n.ZERO};if(!n.eql(d,n.ONE))throw new Error("invZ was invalid");return{x:o,y:c}})),u=Kc((e=>{if(e.is0()){if(t.allowInfinityPoint&&!n.is0(e.py))return;throw new Error("bad point: ZERO")}const{x:r,y:a}=e.toAffine();if(!n.isValid(r)||!n.isValid(a))throw new Error("bad point: x or y not FE");const i=n.sqr(a),o=s(r);if(!n.eql(i,o))throw new Error("bad point: equation left != right");if(!e.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0}));class l{constructor(e,t,r){if(this.px=e,this.py=t,this.pz=r,null==e||!n.isValid(e))throw new Error("x required");if(null==t||!n.isValid(t))throw new Error("y required");if(null==r||!n.isValid(r))throw new Error("z required");Object.freeze(this)}static fromAffine(e){const{x:t,y:r}=e||{};if(!e||!n.isValid(t)||!n.isValid(r))throw new Error("invalid affine point");if(e instanceof l)throw new Error("projective point not allowed");const a=e=>n.eql(e,n.ZERO);return a(t)&&a(r)?l.ZERO:new l(t,r,n.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(e){const t=n.invertBatch(e.map((e=>e.pz)));return e.map(((e,n)=>e.toAffine(t[n]))).map(l.fromAffine)}static fromHex(e){const t=l.fromAffine(i(Bc("pointHex",e)));return t.assertValidity(),t}static fromPrivateKey(e){return l.BASE.multiply(o(e))}static msm(e,t){return function(e,t,n,r){if(!Array.isArray(n)||!Array.isArray(r)||r.length!==n.length)throw new Error("arrays of points and scalars must have equal length");r.forEach(((e,n)=>{if(!t.isValid(e))throw new Error(`wrong scalar at index ${n}`)})),n.forEach(((t,n)=>{if(!(t instanceof e))throw new Error(`wrong point at index ${n}`)}));const a=qc(BigInt(n.length)),i=a>12?a-3:a>4?a-2:a?2:1,s=(1<=0;u-=i){o.fill(e.ZERO);for(let e=0;e>BigInt(u)&BigInt(s));o[a]=o[a].add(n[e])}let t=e.ZERO;for(let n=o.length-1,r=e.ZERO;n>0;n--)r=r.add(o[n]),t=t.add(r);if(d=d.add(t),0!==u)for(let e=0;eVd||c>Vd;)s&Td&&(d=d.add(f)),c&Td&&(u=u.add(f)),f=f.double(),s>>=Td,c>>=Td;return i&&(d=d.negate()),o&&(u=u.negate()),u=new l(n.mul(u.px,a.beta),u.py,u.pz),d.add(u)}multiply(e){const{endo:r,n:a}=t;let i,s;if(Dc("scalar",e,Td,a),r){const{k1neg:t,k1:a,k2neg:o,k2:c}=r.splitScalar(e);let{p:d,f:u}=this.wNAF(a),{p:f,f:h}=this.wNAF(c);d=p.constTimeNegate(t,d),f=p.constTimeNegate(o,f),f=new l(n.mul(f.px,r.beta),f.py,f.pz),i=d.add(f),s=u.add(h)}else{const{p:t,f:n}=this.wNAF(e);i=t,s=n}return l.normalizeZ([i,s])[0]}multiplyAndAddUnsafe(e,t,n){const r=l.BASE,a=(e,t)=>t!==Vd&&t!==Td&&e.equals(r)?e.multiply(t):e.multiplyUnsafe(t),i=a(this,t).add(a(e,n));return i.is0()?void 0:i}toAffine(e){return d(this,e)}isTorsionFree(){const{h:e,isTorsionFree:n}=t;if(e===Td)return!0;if(n)return n(l,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:e,clearCofactor:n}=t;return e===Td?this:n?n(l,this):this.multiplyUnsafe(t.h)}toRawBytes(e=!0){return kc("isCompressed",e),this.assertValidity(),a(l,this,e)}toHex(e=!0){return kc("isCompressed",e),Pc(this.toRawBytes(e))}}l.BASE=new l(t.Gx,t.Gy,n.ONE),l.ZERO=new l(n.ZERO,n.ONE,n.ZERO);const f=t.nBitLength,p=function(e,t){const n=(e,t)=>{const n=t.negate();return e?n:t},r=e=>{if(!Number.isSafeInteger(e)||e<=0||e>t)throw new Error(`Wrong window size=${e}, should be [1..${t}]`)},a=e=>(r(e),{windows:Math.ceil(t/e)+1,windowSize:2**(e-1)});return{constTimeNegate:n,unsafeLadder(t,n){let r=e.ZERO,a=t;for(;n>pd;)n&hd&&(r=r.add(a)),a=a.double(),n>>=hd;return r},precomputeWindow(e,t){const{windows:n,windowSize:r}=a(t),i=[];let s=e,o=s;for(let a=0;a>=f,a>o&&(a-=l,i+=hd);const s=t,p=t+Math.abs(a)-1,h=e%2!=0,b=a<0;0===a?d=d.add(n(h,r[s])):c=c.add(n(b,r[p]))}return{p:c,f:d}},wNAFCached(e,t,n){const r=md.get(e)||1;let a=bd.get(e);return a||(a=this.precomputeWindow(e,r),1!==r&&bd.set(e,n(a))),this.wNAF(r,a,t)},setWindowSize(e,t){r(t),md.set(e,t),bd.delete(e)}}}(l,t.endo?Math.ceil(f/2):f);return{CURVE:t,ProjectivePoint:l,normPrivateKeyToScalar:o,weierstrassEquation:s,isWithinCurveOrder:function(e){return Uc(e,Td,t.n)}}}function _d(e){const t=function(e){const t=yd(e);return Gc(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}(e),{Fp:n,n:r}=t,a=n.BYTES+1,i=2*n.BYTES+1;function s(e){return rd(e,r)}function o(e){return sd(e,r)}const{ProjectivePoint:c,normPrivateKeyToScalar:d,weierstrassEquation:u,isWithinCurveOrder:l}=kd({...t,toBytes(e,t,r){const a=t.toAffine(),i=n.toBytes(a.x),s=Lc;return kc("isCompressed",r),r?s(Uint8Array.from([t.hasEvenY()?2:3]),i):s(Uint8Array.from([4]),i,n.toBytes(a.y))},fromBytes(e){const t=e.length,r=e[0],s=e.subarray(1);if(t!==a||2!==r&&3!==r){if(t===i&&4===r){return{x:n.fromBytes(s.subarray(0,n.BYTES)),y:n.fromBytes(s.subarray(n.BYTES,2*n.BYTES))}}throw new Error(`Point of length ${t} was invalid. Expected ${a} compressed bytes or ${i} uncompressed bytes`)}{const e=Ac(s);if(!Uc(e,Td,n.ORDER))throw new Error("Point is not on curve");const t=u(e);let a;try{a=n.sqrt(t)}catch(o){const e=o instanceof Error?": "+o.message:"";throw new Error("Point is not on curve"+e)}return!(1&~r)!==((a&Td)===Td)&&(a=n.neg(a)),{x:e,y:a}}}}),f=e=>Pc(Hc(e,t.nByteLength));function p(e){return e>r>>Td}const h=(e,t,n)=>Ac(e.slice(t,n));class b{constructor(e,t,n){this.r=e,this.s=t,this.recovery=n,this.assertValidity()}static fromCompact(e){const n=t.nByteLength;return e=Bc("compactSignature",e,2*n),new b(h(e,0,n),h(e,n,2*n))}static fromDER(e){const{r:t,s:n}=wd.toSig(Bc("DER",e));return new b(t,n)}assertValidity(){Dc("r",this.r,Td,r),Dc("s",this.s,Td,r)}addRecoveryBit(e){return new b(this.r,this.s,e)}recoverPublicKey(e){const{r:r,s:a,recovery:i}=this,d=g(Bc("msgHash",e));if(null==i||![0,1,2,3].includes(i))throw new Error("recovery id invalid");const u=2===i||3===i?r+t.n:r;if(u>=n.ORDER)throw new Error("recovery id 2 or 3 invalid");const l=1&i?"03":"02",p=c.fromHex(l+f(u)),h=o(u),b=s(-d*h),m=s(a*h),y=c.BASE.multiplyAndAddUnsafe(p,b,m);if(!y)throw new Error("point at infinify");return y.assertValidity(),y}hasHighS(){return p(this.s)}normalizeS(){return this.hasHighS()?new b(this.r,s(-this.s),this.recovery):this}toDERRawBytes(){return Oc(this.toDERHex())}toDERHex(){return wd.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return Oc(this.toCompactHex())}toCompactHex(){return f(this.r)+f(this.s)}}const m={isValidPrivateKey(e){try{return d(e),!0}catch(t){return!1}},normPrivateKeyToScalar:d,randomPrivateKey:()=>{const e=fd(t.n);return function(e,t,n=!1){const r=e.length,a=ld(t),i=fd(t);if(r<16||r1024)throw new Error(`expected ${i}-1024 bytes of input, got ${r}`);const s=rd(n?Ac(e):Cc(e),t-Yc)+Yc;return n?Rc(s,a):Hc(s,a)}(t.randomBytes(e),t.n)},precompute:(e=8,t=c.BASE)=>(t._setWindowSize(e),t.multiply(BigInt(3)),t)};function y(e){const t=Tc(e),n="string"==typeof e,r=(t||n)&&e.length;return t?r===a||r===i:n?r===2*a||r===2*i:e instanceof c}const x=t.bits2int||function(e){const n=Ac(e),r=8*e.length-t.nBitLength;return r>0?n>>BigInt(r):n},g=t.bits2int_modN||function(e){return s(x(e))},v=jc(t.nBitLength);function w(e){return Dc(`num < 2^${t.nBitLength}`,e,Vd,v),Hc(e,t.nByteLength)}function V(e,r,a=T){if(["recovered","canonical"].some((e=>e in a)))throw new Error("sign() legacy options not supported");const{hash:i,randomBytes:u}=t;let{lowS:f,prehash:h,extraEntropy:m}=a;null==f&&(f=!0),e=Bc("msgHash",e),xd(a),h&&(e=Bc("prehashed msgHash",i(e)));const y=g(e),v=d(r),V=[w(v),w(y)];if(null!=m&&!1!==m){const e=!0===m?u(n.BYTES):m;V.push(Bc("extraEntropy",e))}const S=Lc(...V),k=y;return{seed:S,k2sig:function(e){const t=x(e);if(!l(t))return;const n=o(t),r=c.BASE.multiply(t).toAffine(),a=s(r.x);if(a===Vd)return;const i=s(n*s(k+a*v));if(i===Vd)return;let d=(r.x===a?0:2)|Number(r.y&Td),u=i;return f&&p(i)&&(u=function(e){return p(e)?s(-e):e}(i),d^=1),new b(a,u,d)}}}const T={lowS:t.lowS,prehash:!1},S={lowS:t.lowS,prehash:!1};return c.BASE._setWindowSize(8),{CURVE:t,getPublicKey:function(e,t=!0){return c.fromPrivateKey(e).toRawBytes(t)},getSharedSecret:function(e,t,n=!0){if(y(e))throw new Error("first arg must be private key");if(!y(t))throw new Error("second arg must be public key");return c.fromHex(t).multiply(d(e)).toRawBytes(n)},sign:function(e,n,r=T){const{seed:a,k2sig:i}=V(e,n,r),s=t;return Wc(s.hash.outputLen,s.nByteLength,s.hmac)(a,i)},verify:function(e,n,r,a=S){const i=e;if(n=Bc("msgHash",n),r=Bc("publicKey",r),"strict"in a)throw new Error("options.strict was renamed to lowS");xd(a);const{lowS:d,prehash:u}=a;let l,f;try{if("string"==typeof i||Tc(i))try{l=b.fromDER(i)}catch(V){if(!(V instanceof wd.Err))throw V;l=b.fromCompact(i)}else{if("object"!=typeof i||"bigint"!=typeof i.r||"bigint"!=typeof i.s)throw new Error("PARSE");{const{r:e,s:t}=i;l=new b(e,t)}}f=c.fromHex(r)}catch(T){if("PARSE"===T.message)throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(d&&l.hasHighS())return!1;u&&(n=t.hash(n));const{r:p,s:h}=l,m=g(n),y=o(h),x=s(m*y),v=s(p*y),w=c.BASE.multiplyAndAddUnsafe(f,x,v)?.toAffine();return!!w&&s(w.x)===p},ProjectivePoint:c,Signature:b,utils:m}}function Pd(e){return{hash:e,hmac:(t,...n)=>gc(e,t,function(...e){let t=0;for(let r=0;r(e+t/Ed)/t;function Ad(e){const t=Md,n=BigInt(3),r=BigInt(6),a=BigInt(11),i=BigInt(22),s=BigInt(23),o=BigInt(44),c=BigInt(88),d=e*e*e%t,u=d*d*e%t,l=id(u,n,t)*u%t,f=id(l,n,t)*u%t,p=id(f,Ed,t)*d%t,h=id(p,a,t)*p%t,b=id(h,i,t)*h%t,m=id(b,o,t)*b%t,y=id(m,c,t)*m%t,x=id(y,o,t)*b%t,g=id(x,n,t)*u%t,v=id(g,s,t)*h%t,w=id(v,r,t)*d%t,V=id(w,Ed,t);if(!Cd.eql(Cd.sqr(V),e))throw new Error("Cannot find square root");return V}const Cd=ud(Md,void 0,void 0,{sqrt:Ad}),Hd=function(e,t){const n=t=>_d({...e,...Pd(t)});return Object.freeze({...n(t),create:n})}({a:BigInt(0),b:BigInt(7),Fp:Cd,n:Id,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{const t=Id,n=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-Nd*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),a=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),i=n,s=BigInt("0x100000000000000000000000000000000"),o=Od(i*e,t),c=Od(-r*e,t);let d=rd(e-o*n-c*a,t),u=rd(-o*r-c*i,t);const l=d>s,f=u>s;if(l&&(d=t-d),f&&(u=t-u),d>s||u>s)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:l,k1:d,k2neg:f,k2:u}}}},yc);BigInt(0);Hd.ProjectivePoint;const Rd={bitLength:256,isLe:!1};function Bd(e){return[33,65].includes(e.length)&&(e=dc(function(e,t){if(![33,65].includes(e.length))throw new Error(`Invalid publicKey provided, received ${e.length} bytes input`);if(65===e.length)return e.subarray(1);if(!Ba.CW||!t&&Ti())return xi(e).subarray(1);const{px:n,py:r}=Hd.ProjectivePoint.fromHex(e);return Mt(Pt(n,Rd),Pt(r,Rd))}(e))),e.slice(-20)}function Ld(e){return(0,ut.b)(e)||Array.isArray(e)?(0,E.e)(e):(0,Je.qv)(e)||uc(e.toString())?(0,ts.V)(e.toString()):(0,I.K)(e)?(0,E.e)(e):e}class zd extends lr{constructor(e,t=new Uint8Array){super(e,Ld(t),160)}eq(e){return!!e&&super.eq(Ld(e))}toHuman(){return this.toJSON()}toJSON(){return this.toString()}toPrimitive(){return this.toJSON()}toString(){return function(e){if(!e)return"0x";const t=(0,E.e)(e);if(![20,32,33,65].includes(t.length))throw new Error(`Invalid address or publicKey provided, received ${t.length} bytes input`);const n=(0,N.X)(Bd(t),-1,!1),r=(0,N.X)(dc(n),-1,!1);let a="";for(let i=0;i<40;i++)a=`${a}${parseInt(r[i],16)>7?n[i].toUpperCase():n[i]}`;return`0x${a}`}(this)}toRawType(){return"AccountId"}}const Ud=new Uint8Array([255]);function Dd(e,t){return t instanceof qd?t.inner:t instanceof zd||t instanceof To?t:(0,ut.b)(t)||Array.isArray(t)||(0,Je.qv)(t)?function(e,t){if(20===t.length)return e.createTypeUnsafe("EthereumAccountId",[t]);if(255===t[0])return e.createTypeUnsafe("EthereumAccountId",[t.subarray(1)]);const[n,r]=To.readLength(t);return e.createTypeUnsafe("AccountIndex",[ot(t.subarray(n,n+r))])}(e,(0,E.e)(t)):(0,pn.f)(t)||(0,Lt.E)(t)||(0,wt.s)(t)?e.createTypeUnsafe("AccountIndex",[t]):function(e,t){const n=fo(t);return 20===n.length?e.createTypeUnsafe("EthereumAccountId",[n]):e.createTypeUnsafe("AccountIndex",[ot(n)])}(e,t)}class qd extends Ui{constructor(e,t=new Uint8Array){super(e,Dd(e,t))}get encodedLength(){const e=this._rawLength;return e+(e>1?1:0)}get _rawLength(){return this.inner instanceof To?To.calcLength(this.inner):this.inner.encodedLength}toHex(){return(0,N.X)(this.toU8a())}toRawType(){return"Address"}toU8a(e){const t=this.inner.toU8a().subarray(0,this._rawLength);return e?t:Mt(this.inner instanceof To?To.writeLength(t):Ud,t)}}function jd(e){if(Array.isArray(e)||(0,I.K)(e)){const t=(0,E.e)(e);return[t.length/8,t]}return function(e){if(!e?.length)return[0,new Uint8Array];const[t,n]=dt(e),r=t+Math.ceil(n/8);if(r>e.length)throw new Error(`BitVec: required length less than remainder, expected at least ${r}, found ${e.length}`);return[n,e.subarray(t,r)]}(e)}class Fd extends rt{__internal__decodedLength;__internal__isMsb;constructor(e,t,n=!1){const[r,a]=jd(t);super(e,a),this.__internal__decodedLength=r,this.__internal__isMsb=n}get encodedLength(){return this.length+Ht(this.__internal__decodedLength).length}inspect(){return{outer:[Ht(this.__internal__decodedLength),super.toU8a()]}}toBoolArray(){const e=[...this.toU8a(!0)].map((e=>[!!(128&e),!!(64&e),!!(32&e),!!(16&e),!!(8&e),!!(4&e),!!(2&e),!!(1&e)])),t=e.length,n=new Array(8*t);for(let r=0;r`00000000${e.toString(2)}`.slice(-8))).map((e=>this.__internal__isMsb?e:e.split("").reverse().join(""))).join("_")}`}toRawType(){return"BitVec"}toU8a(e){const t=super.toU8a(e);return e?t:It([Ht(this.__internal__decodedLength),t])}}class Xd extends Number{encodedLength;registry;createdAtHash;initialU8aLength;isStorageFallback;__internal__bitLength;constructor(e,t,{bitLength:n=32}={}){super((0,ut.b)(t)||(0,Je.qv)(t)?0===t.length?0:function(e,{bitLength:t=32,isLe:n=!0}={}){if(32!==t&&64!==t)throw new Error("Invalid bitLength provided, expected 32 or 64");if(e.length"}toU8a(e){return e?super.toU8a(!0):this.isSome?new Uint8Array([this.isTrue?1:2]):new Uint8Array([0])}}const nu=131072;class ru extends String{registry;createdAtHash;initialU8aLength;isStorageFallback;__internal__override=null;constructor(e,t){const[n,r]=function(e){if((0,ut.b)(e)){if(!e.length)return["",0];if(e instanceof rt)return[nt(e),0];const[t,n]=dt(e),r=t+n;if(n>nu)throw new Error(`Text: length ${n.toString()} exceeds 131072`);if(r>e.length)throw new Error(`Text: required length less than remainder, expected at least ${r}, found ${e.length}`);return[nt(e.subarray(t,r)),r]}return(0,Je.qv)(e)?[nt((0,ts.V)(e)),0]:[e?e.toString():"",0]}(t);super(n),this.registry=e,this.initialU8aLength=r}get encodedLength(){return this.toU8a().length}get hash(){return this.registry.hash(this.toU8a())}get isEmpty(){return 0===this.length}get length(){return super.length}eq(e){return!!(0,I.K)(e)&&this.toString()===e.toString()}inspect(){const e=(0,La.j)(super.toString());return{outer:e.length?[Ht(e.length),e]:[Ht(e.length)]}}setOverride(e){this.__internal__override=e}toHex(){return(0,N.X)(this.toU8a(!0))}toHuman(){return this.toJSON()}toJSON(){return this.toString()}toPrimitive(){return this.toJSON()}toRawType(){return"Text"}toString(){return this.__internal__override||super.toString()}toU8a(e){const t=(0,La.j)(super.toString());return e?t:ar(t)}}class au extends ru{constructor(e,t=""){super(e,t),this.setOverride(_r(this.toString()))}toRawType(){return"Type"}}class iu extends(rr.with(8)){__UIntType="u8"}class su extends(rr.with(16)){__UIntType="u16"}class ou extends(rr.with(128)){__UIntType="u128"}class cu extends(rr.with(256)){__UIntType="u256"}class du extends xo{constructor(e,t){throw super(e,t),new Error("The `usize` type should not be used. Since it is platform-specific, it creates incompatibilities between native (generally u64) and WASM (always u32) code. Use one of the `u32` or `u64` types explicitly.")}}function uu(e,t){return(0,ut.b)(t)||(0,I.K)(t)?function(e,t){const n=t[0];if(!n)return[void 0,void 0];if(n>=1&&n<=33){const r=n-1,a=t.subarray(1,r+1);return[e.createTypeUnsafe("Raw",[a]),1]}if(n>=34&&n<=37)return[t.subarray(1,33),n-32];throw new Error(`Unable to decode Data, invalid indicator byte ${n}`)}(e,(0,E.e)(t)):t?[t,void 0]:[void 0,void 0]}class lu extends nn{constructor(e,t){if(super(e,{None:"Null",Raw:"Bytes",BlakeTwo256:"H256",Sha256:"H256",Keccak256:"H256",ShaThree256:"H256"},...uu(e,t)),this.isRaw&&this.asRaw.length>32)throw new Error("Data.Raw values are limited to a maximum length of 32 bytes")}get asBlakeTwo256(){return this.value}get asKeccak256(){return this.value}get asRaw(){return this.value}get asSha256(){return this.value}get asShaThree256(){return this.value}get isBlakeTwo256(){return 2===this.index}get isKeccak256(){return 4===this.index}get isNone(){return 0===this.index}get isRaw(){return 1===this.index}get isSha256(){return 3===this.index}get isShaThree256(){return 5===this.index}get encodedLength(){return this.toU8a().length}toU8a(){if(0===this.index)return new Uint8Array(1);if(1===this.index){const e=this.value.toU8a(!0),t=Math.min(e.length,32),n=new Uint8Array(t+1);return n.set([t+1],0),n.set(e.subarray(0,t),1),n}const e=new Uint8Array(33);return e.set([this.index+32],0),e.set(this.value.toU8a(),1),e}}function fu(e,t){const n=e.getTypeDef(t);return n.lookupName||n.type}function pu(e,t,n){const r=fu(e.lookup,function(e){return e.isPlain?e.asPlain:e.asMap.value}(t));return n?`Option<${r}>`:r}const hu={Blake2_128:[16,!1],Blake2_128Concat:[16,!0],Blake2_256:[32,!1],Identity:[0,!0],Twox128:[16,!1],Twox256:[32,!1],Twox64Concat:[8,!0]};function bu(e,t,n){if(!n||!n.type.isMap)return[];const{hashers:r,key:a}=n.type.asMap,i=1===r.length?[a]:e.lookup.getSiType(a).def.asTuple;return function(e,t,n){let r=32;const a=n.length,i=new Array(a);for(let s=0;s[e,i[t]])))}class mu extends sr{__internal__args;__internal__meta;__internal__outputType;__internal__method;__internal__section;constructor(e,t,n={}){const{key:r,method:a,section:i}=function(e){if((0,ut.b)(e)||!e||(0,I.K)(e))return{key:e};if(e instanceof mu)return{key:e,method:e.method,section:e.section};if((0,qe.T)(e))return{key:e(),method:e.method,section:e.section};if(Array.isArray(e)){const[t,n=[]]=e;if(!(0,qe.T)(t))throw new Error("Expected function input for key construction");if(t.meta&&t.meta.type.isMap){const e=t.meta.type.asMap;if(!Array.isArray(n)||n.length!==e.hashers.length)throw new Error(`Expected an array of ${e.hashers.length} values as params to a Map query`)}return{key:t(...n),method:t.method,section:t.section}}throw new Error(`Unable to convert input ${e} to StorageKey`)}(t);super(e,r),this.__internal__outputType=function(e,t){if(t instanceof mu)return t.outputType;if((0,qe.T)(t))return pu(e,t.meta.type);if(Array.isArray(t)){const[n]=t;if(n.meta)return pu(e,n.meta.type)}return"Raw"}(e,t),this.setMeta(function(e){if(e instanceof mu)return e.meta;if((0,qe.T)(e))return e.meta;if(Array.isArray(e)){const[t]=e;return t.meta}}(t),n.section||i,n.method||a)}get args(){return this.__internal__args}get meta(){return this.__internal__meta}get method(){return this.__internal__method}get outputType(){return this.__internal__outputType}get section(){return this.__internal__section}is(e){return e.section===this.section&&e.method===this.method}setMeta(e,t,n){this.__internal__meta=e,this.__internal__method=n||this.__internal__method,this.__internal__section=t||this.__internal__section,e&&(this.__internal__outputType=pu(this.registry,e.type));try{this.__internal__args=bu(this.registry,this.toU8a(!0),e)}catch{}return this}toHuman(e,t){return this.__internal__args.length?this.__internal__args.map((e=>e.toHuman(void 0,t))):super.toHuman(void 0,t)}toRawType(){return"StorageKey"}}const yu={metadata:{description:"Returns the metadata of a runtime",params:[],type:"OpaqueMetadata"}},xu={name:"Text",fields:"Vec",index:"u8",docs:"Vec"},gu={Si1Field:{name:"Option",type:"Si1LookupTypeId",typeName:"Option",docs:"Vec"},Si1LookupTypeId:"Compact",Si1Path:"Si0Path",Si1Type:{path:"Si1Path",params:"Vec",def:"Si1TypeDef",docs:"Vec"},Si1TypeDef:{_enum:{Composite:"Si1TypeDefComposite",Variant:"Si1TypeDefVariant",Sequence:"Si1TypeDefSequence",Array:"Si1TypeDefArray",Tuple:"Si1TypeDefTuple",Primitive:"Si1TypeDefPrimitive",Compact:"Si1TypeDefCompact",BitSequence:"Si1TypeDefBitSequence",HistoricMetaCompat:"Type"}},Si1TypeDefArray:{len:"u32",type:"Si1LookupTypeId"},Si1TypeDefBitSequence:{bitStoreType:"Si1LookupTypeId",bitOrderType:"Si1LookupTypeId"},Si1TypeDefCompact:{type:"Si1LookupTypeId"},Si1TypeDefComposite:{fields:"Vec"},Si1TypeDefPrimitive:"Si0TypeDefPrimitive",Si1TypeDefSequence:{type:"Si1LookupTypeId"},Si1TypeDefTuple:"Vec",Si1TypeParameter:{name:"Text",type:"Option"},Si1TypeDefVariant:{variants:"Vec"},Si1Variant:xu},vu={rpc:{},runtime:{Metadata:[{methods:{metadata_at_version:{description:"Returns the metadata at a given version.",params:[{name:"version",type:"u32"}],type:"Option"},metadata_versions:{description:"Returns the supported metadata versions.",params:[],type:"Vec"},...yu},version:2},{methods:{...yu},version:1}]},types:{ErrorMetadataV9:{name:"Text",docs:"Vec"},EventMetadataV9:{name:"Text",args:"Vec",docs:"Vec"},FunctionArgumentMetadataV9:{name:"Text",type:"Type"},FunctionMetadataV9:{name:"Text",args:"Vec",docs:"Vec"},MetadataV9:{modules:"Vec"},ModuleConstantMetadataV9:{name:"Text",type:"Type",value:"Bytes",docs:"Vec"},ModuleMetadataV9:{name:"Text",storage:"Option",calls:"Option>",events:"Option>",constants:"Vec",errors:"Vec"},StorageEntryMetadataV9:{name:"Text",modifier:"StorageEntryModifierV9",type:"StorageEntryTypeV9",fallback:"Bytes",docs:"Vec"},StorageEntryModifierV9:{_enum:["Optional","Default","Required"]},StorageEntryTypeV9:{_enum:{Plain:"Type",Map:{hasher:"StorageHasherV9",key:"Type",value:"Type",linked:"bool"},DoubleMap:{hasher:"StorageHasherV9",key1:"Type",key2:"Type",value:"Type",key2Hasher:"StorageHasherV9"}}},StorageHasherV9:{_enum:{Blake2_128:null,Blake2_256:null,Twox128:null,Twox256:null,Twox64Concat:null}},StorageMetadataV9:{prefix:"Text",items:"Vec"},ErrorMetadataV10:"ErrorMetadataV9",EventMetadataV10:"EventMetadataV9",FunctionArgumentMetadataV10:"FunctionArgumentMetadataV9",FunctionMetadataV10:"FunctionMetadataV9",MetadataV10:{modules:"Vec"},ModuleConstantMetadataV10:"ModuleConstantMetadataV9",ModuleMetadataV10:{name:"Text",storage:"Option",calls:"Option>",events:"Option>",constants:"Vec",errors:"Vec"},StorageEntryModifierV10:"StorageEntryModifierV9",StorageEntryMetadataV10:{name:"Text",modifier:"StorageEntryModifierV10",type:"StorageEntryTypeV10",fallback:"Bytes",docs:"Vec"},StorageEntryTypeV10:{_enum:{Plain:"Type",Map:{hasher:"StorageHasherV10",key:"Type",value:"Type",linked:"bool"},DoubleMap:{hasher:"StorageHasherV10",key1:"Type",key2:"Type",value:"Type",key2Hasher:"StorageHasherV10"}}},StorageMetadataV10:{prefix:"Text",items:"Vec"},StorageHasherV10:{_enum:{Blake2_128:null,Blake2_256:null,Blake2_128Concat:null,Twox128:null,Twox256:null,Twox64Concat:null}},...{ErrorMetadataV11:"ErrorMetadataV10",EventMetadataV11:"EventMetadataV10",ExtrinsicMetadataV11:{version:"u8",signedExtensions:"Vec"},FunctionArgumentMetadataV11:"FunctionArgumentMetadataV10",FunctionMetadataV11:"FunctionMetadataV10",MetadataV11:{modules:"Vec",extrinsic:"ExtrinsicMetadataV11"},ModuleConstantMetadataV11:"ModuleConstantMetadataV10",ModuleMetadataV11:{name:"Text",storage:"Option",calls:"Option>",events:"Option>",constants:"Vec",errors:"Vec"},StorageEntryModifierV11:"StorageEntryModifierV10",StorageEntryMetadataV11:{name:"Text",modifier:"StorageEntryModifierV11",type:"StorageEntryTypeV11",fallback:"Bytes",docs:"Vec"},StorageEntryTypeV11:{_enum:{Plain:"Type",Map:{hasher:"StorageHasherV11",key:"Type",value:"Type",linked:"bool"},DoubleMap:{hasher:"StorageHasherV11",key1:"Type",key2:"Type",value:"Type",key2Hasher:"StorageHasherV11"}}},StorageMetadataV11:{prefix:"Text",items:"Vec"},StorageHasherV11:{_enum:{Blake2_128:null,Blake2_256:null,Blake2_128Concat:null,Twox128:null,Twox256:null,Twox64Concat:null,Identity:null}}},ErrorMetadataV12:"ErrorMetadataV11",EventMetadataV12:"EventMetadataV11",ExtrinsicMetadataV12:"ExtrinsicMetadataV11",FunctionArgumentMetadataV12:"FunctionArgumentMetadataV11",FunctionMetadataV12:"FunctionMetadataV11",MetadataV12:{modules:"Vec",extrinsic:"ExtrinsicMetadataV12"},ModuleConstantMetadataV12:"ModuleConstantMetadataV11",ModuleMetadataV12:{name:"Text",storage:"Option",calls:"Option>",events:"Option>",constants:"Vec",errors:"Vec",index:"u8"},StorageEntryModifierV12:"StorageEntryModifierV11",StorageEntryMetadataV12:"StorageEntryMetadataV11",StorageEntryTypeV12:"StorageEntryTypeV11",StorageMetadataV12:"StorageMetadataV11",StorageHasherV12:"StorageHasherV11",ErrorMetadataV13:"ErrorMetadataV12",EventMetadataV13:"EventMetadataV12",ExtrinsicMetadataV13:"ExtrinsicMetadataV12",FunctionArgumentMetadataV13:"FunctionArgumentMetadataV12",FunctionMetadataV13:"FunctionMetadataV12",MetadataV13:{modules:"Vec",extrinsic:"ExtrinsicMetadataV13"},ModuleConstantMetadataV13:"ModuleConstantMetadataV12",ModuleMetadataV13:{name:"Text",storage:"Option",calls:"Option>",events:"Option>",constants:"Vec",errors:"Vec",index:"u8"},StorageEntryModifierV13:"StorageEntryModifierV12",StorageEntryMetadataV13:{name:"Text",modifier:"StorageEntryModifierV13",type:"StorageEntryTypeV13",fallback:"Bytes",docs:"Vec"},StorageEntryTypeV13:{_enum:{Plain:"Type",Map:{hasher:"StorageHasherV13",key:"Type",value:"Type",linked:"bool"},DoubleMap:{hasher:"StorageHasherV13",key1:"Type",key2:"Type",value:"Type",key2Hasher:"StorageHasherV13"},NMap:{keyVec:"Vec",hashers:"Vec",value:"Type"}}},StorageMetadataV13:{prefix:"Text",items:"Vec"},StorageHasherV13:"StorageHasherV12",...{PortableTypeV14:{id:"Si1LookupTypeId",type:"Si1Type"},ErrorMetadataV14:{...xu,args:"Vec"},EventMetadataV14:{...xu,args:"Vec"},FunctionArgumentMetadataV14:{name:"Text",type:"Type",typeName:"Option"},FunctionMetadataV14:{...xu,args:"Vec"},ExtrinsicMetadataV14:{type:"SiLookupTypeId",version:"u8",signedExtensions:"Vec"},MetadataV14:{lookup:"PortableRegistry",pallets:"Vec",extrinsic:"ExtrinsicMetadataV14",type:"SiLookupTypeId"},PalletCallMetadataV14:{type:"SiLookupTypeId"},PalletConstantMetadataV14:{name:"Text",type:"SiLookupTypeId",value:"Bytes",docs:"Vec"},PalletErrorMetadataV14:{type:"SiLookupTypeId"},PalletEventMetadataV14:{type:"SiLookupTypeId"},PalletMetadataV14:{name:"Text",storage:"Option",calls:"Option",events:"Option",constants:"Vec",errors:"Option",index:"u8"},PalletStorageMetadataV14:{prefix:"Text",items:"Vec"},SignedExtensionMetadataV14:{identifier:"Text",type:"SiLookupTypeId",additionalSigned:"SiLookupTypeId"},StorageEntryMetadataV14:{name:"Text",modifier:"StorageEntryModifierV14",type:"StorageEntryTypeV14",fallback:"Bytes",docs:"Vec"},StorageEntryModifierV14:"StorageEntryModifierV13",StorageEntryTypeV14:{_enum:{Plain:"SiLookupTypeId",Map:{hashers:"Vec",key:"SiLookupTypeId",value:"SiLookupTypeId"}}},StorageHasherV14:"StorageHasherV13"},CustomMetadata15:{map:"BTreeMap"},CustomValueMetadata15:{type:"SiLookupTypeId",value:"Bytes"},ExtrinsicMetadataV15:{version:"u8",addressType:"SiLookupTypeId",callType:"SiLookupTypeId",signatureType:"SiLookupTypeId",extraType:"SiLookupTypeId",signedExtensions:"Vec"},OuterEnums15:{callType:"SiLookupTypeId",eventType:"SiLookupTypeId",errorType:"SiLookupTypeId"},PalletMetadataV15:{name:"Text",storage:"Option",calls:"Option",events:"Option",constants:"Vec",errors:"Option",index:"u8",docs:"Vec"},RuntimeApiMetadataV15:{name:"Text",methods:"Vec",docs:"Vec"},RuntimeApiMethodMetadataV15:{name:"Text",inputs:"Vec",output:"SiLookupTypeId",docs:"Vec"},RuntimeApiMethodParamMetadataV15:{name:"Text",type:"SiLookupTypeId"},MetadataV15:{lookup:"PortableRegistry",pallets:"Vec",extrinsic:"ExtrinsicMetadataV15",type:"SiLookupTypeId",apis:"Vec",outerEnums:"OuterEnums15",custom:"CustomMetadata15"},ErrorMetadataLatest:"ErrorMetadataV14",EventMetadataLatest:"EventMetadataV14",ExtrinsicMetadataLatest:"ExtrinsicMetadataV15",FunctionArgumentMetadataLatest:"FunctionArgumentMetadataV14",FunctionMetadataLatest:"FunctionMetadataV14",MetadataLatest:"MetadataV15",PalletCallMetadataLatest:"PalletCallMetadataV14",PalletConstantMetadataLatest:"PalletConstantMetadataV14",PalletErrorMetadataLatest:"PalletErrorMetadataV14",PalletEventMetadataLatest:"PalletEventMetadataV14",PalletMetadataLatest:"PalletMetadataV15",PalletStorageMetadataLatest:"PalletStorageMetadataV14",PortableType:"PortableTypeV14",RuntimeApiMetadataLatest:"RuntimeApiMetadataV15",SignedExtensionMetadataLatest:"SignedExtensionMetadataV14",StorageEntryMetadataLatest:"StorageEntryMetadataV14",StorageEntryModifierLatest:"StorageEntryModifierV14",StorageEntryTypeLatest:"StorageEntryTypeV14",StorageHasher:"StorageHasherV14",OpaqueMetadata:"Opaque",MetadataAll:{_enum:{V0:"DoNotConstruct",V1:"DoNotConstruct",V2:"DoNotConstruct",V3:"DoNotConstruct",V4:"DoNotConstruct",V5:"DoNotConstruct",V6:"DoNotConstruct",V7:"DoNotConstruct",V8:"DoNotConstruct",V9:"MetadataV9",V10:"MetadataV10",V11:"MetadataV11",V12:"MetadataV12",V13:"MetadataV13",V14:"MetadataV14",V15:"MetadataV15"}}}},wu={execute_block:{description:"Execute the given block.",params:[{name:"block",type:"Block"}],type:"Null"}},Vu={version:{description:"Returns the version of the runtime.",params:[],type:"RuntimeVersionPre3"}},Tu={initialize_block:{description:"Initialize a block with the given header.",params:[{name:"header",type:"Header"}],type:"Null"}},Su={version:{description:"Returns the version of the runtime.",params:[],type:"RuntimeVersion"}},ku={...wu,initialize_block:{description:"Initialize a block with the given header.",params:[{name:"header",type:"Header"}],type:"ExtrinsicInclusionMode"}},_u={Core:[{methods:{...Su,...ku},version:5},{methods:{...Su,...wu,...Tu},version:4},{methods:{version:{description:"Returns the version of the runtime.",params:[],type:"RuntimeVersionPre4"},...wu,...Tu},version:3},{methods:{...Vu,...wu,...Tu},version:2},{methods:{initialise_block:{description:"Initialize a block with the given header.",params:[{name:"header",type:"Header"}],type:"Null"},...Vu,...wu},version:1}]},Pu={Council:"CollectiveOrigin",System:"SystemOrigin",TechnicalCommittee:"CollectiveOrigin",Xcm:"XcmOrigin",XcmPallet:"XcmOrigin",Authority:"AuthorityOrigin",GeneralCouncil:"CollectiveOrigin"},Mu={rpc:{},runtime:_u,types:{Fixed64:"Int<64, Fixed64>",FixedI64:"Int<64, FixedI64>",FixedU64:"UInt<64, FixedU64>",Fixed128:"Int<128, Fixed128>",FixedI128:"Int<128, FixedI128>",FixedU128:"UInt<128, FixedU128>",I32F32:"Int<64, I32F32>",U32F32:"UInt<64, U32F32>",PerU16:"UInt<16, PerU16>",Perbill:"UInt<32, Perbill>",Percent:"UInt<8, Percent>",Permill:"UInt<32, Permill>",Perquintill:"UInt<64, Perquintill>",AccountId:"AccountId32",AccountId20:"GenericEthereumAccountId",AccountId32:"GenericAccountId32",AccountId33:"GenericAccountId33",AccountIdOf:"AccountId",AccountIndex:"GenericAccountIndex",Address:"MultiAddress",AssetId:"u32",Balance:"UInt<128, Balance>",BalanceOf:"Balance",Block:"GenericBlock",BlockNumber:"u32",BlockNumberFor:"BlockNumber",BlockNumberOf:"BlockNumber",Call:"GenericCall",CallHash:"Hash",CallHashOf:"CallHash",ChangesTrieConfiguration:{digestInterval:"u32",digestLevels:"u32"},ChangesTrieSignal:{_enum:{NewConfiguration:"Option"}},ConsensusEngineId:"GenericConsensusEngineId",CodecHash:"Hash",CrateVersion:{major:"u16",minor:"u8",patch:"u8"},Digest:{logs:"Vec"},DigestItem:{_enum:{Other:"Bytes",AuthoritiesChange:"Vec",ChangesTrieRoot:"Hash",SealV0:"SealV0",Consensus:"Consensus",Seal:"Seal",PreRuntime:"PreRuntime",ChangesTrieSignal:"ChangesTrieSignal",RuntimeEnvironmentUpdated:"Null"}},ExtrinsicsWeight:{normal:"Weight",operational:"Weight"},H32:"[u8; 4; H32]",H64:"[u8; 8; H64]",H128:"[u8; 16; H128]",H160:"[u8; 20; H160]",H256:"[u8; 32; H256]",H512:"[u8; 64; H512]",H1024:"[u8; 128; H1024]",H2048:"[u8; 256; H2048]",Hash:"H256",Header:{parentHash:"Hash",number:"Compact",stateRoot:"Hash",extrinsicsRoot:"Hash",digest:"Digest"},HeaderPartial:{parentHash:"Hash",number:"BlockNumber"},IndicesLookupSource:"GenericLookupSource",Index:"u32",Justification:"(ConsensusEngineId, EncodedJustification)",EncodedJustification:"Bytes",Justifications:"Vec",KeyValue:"(StorageKey, StorageData)",KeyTypeId:"u32",LockIdentifier:"[u8; 8]",LookupSource:"MultiAddress",LookupTarget:"AccountId",ModuleId:"LockIdentifier",MultiAddress:"GenericMultiAddress",MultiSigner:{_enum:{Ed25519:"[u8; 32]",Sr25519:"[u8; 32]",Ecdsa:"[u8; 33]"}},Moment:"UInt<64, Moment>",OpaqueCall:"Bytes",Origin:"DoNotConstruct",OriginCaller:{_enum:{System:"SystemOrigin"}},PalletId:"LockIdentifier",PalletsOrigin:"OriginCaller",PalletVersion:{major:"u16",minor:"u8",patch:"u8"},Pays:{_enum:["Yes","No"]},Phantom:"Null",PhantomData:"Null",Releases:{_enum:["V1","V2","V3","V4","V5","V6","V7","V8","V9","V10"]},RuntimeCall:"Call",RuntimeEvent:"Event",RuntimeDbWeight:{read:"Weight",write:"Weight"},SignedBlock:"SignedBlockWithJustifications",SignedBlockWithJustification:{block:"Block",justification:"Option"},SignedBlockWithJustifications:{block:"Block",justifications:"Option"},Slot:"u64",SlotDuration:"u64",StorageData:"Bytes",StorageInfo:{palletName:"Bytes",storage_name:"Bytes",prefix:"Bytes",maxValues:"Option",maxSize:"Option"},StorageProof:{trieNodes:"Vec"},TransactionPriority:"u64",TransactionLongevity:"u64",TransactionTag:"Bytes",TransactionInfo:{_alias:{dataSize:"size"},chunkRoot:"H256",contentHash:"H256",dataSize:"u32",blockChunks:"u32"},TransactionStorageProof:{chunk:"Vec",proof:"Vec>"},ValidatorId:"AccountId",ValidatorIdOf:"ValidatorId",WeightV0:"u32",WeightV1:"u64",WeightV2:{refTime:"Compact",proofSize:"Compact"},Weight:"WeightV2",WeightMultiplier:"Fixed64",PreRuntime:"(ConsensusEngineId, Bytes)",SealV0:"(u64, Signature)",Seal:"(ConsensusEngineId, Bytes)",Consensus:"(ConsensusEngineId, Bytes)",ExtrinsicInclusionMode:{_enum:["AllExtrinsics","OnlyInherents"]}}},Iu={rpc:{},types:{Si0Field:{name:"Option",type:"Si0LookupTypeId",typeName:"Option",docs:"Vec"},Si0LookupTypeId:"u32",Si0Path:"Vec",Si0Type:{path:"Si0Path",params:"Vec",def:"Si0TypeDef"},Si0TypeDef:{_enum:{Composite:"Si0TypeDefComposite",Variant:"Si0TypeDefVariant",Sequence:"Si0TypeDefSequence",Array:"Si0TypeDefArray",Tuple:"Si0TypeDefTuple",Primitive:"Si0TypeDefPrimitive",Compact:"Si0TypeDefCompact",Phantom:"Si0TypeDefPhantom",BitSequence:"Si0TypeDefBitSequence"}},Si0TypeDefArray:{len:"u32",type:"Si0LookupTypeId"},Si0TypeDefBitSequence:{bitStoreType:"Si0LookupTypeId",bitOrderType:"Si0LookupTypeId"},Si0TypeDefCompact:{type:"Si0LookupTypeId"},Si0TypeDefComposite:{fields:"Vec"},Si0TypeDefPhantom:"Null",Si0TypeDefVariant:{variants:"Vec"},Si0TypeDefPrimitive:{_enum:["Bool","Char","Str","U8","U16","U32","U64","U128","U256","I8","I16","I32","I64","I128","I256"]},Si0TypeDefSequence:{type:"Si0LookupTypeId"},Si0TypeDefTuple:"Vec",Si0TypeParameter:{name:"Text",type:"Option"},Si0Variant:{name:"Text",fields:"Vec",index:"Option",discriminant:"Option",docs:"Vec"},...gu,SiField:"Si1Field",SiLookupTypeId:"Si1LookupTypeId",SiPath:"Si1Path",SiType:"Si1Type",SiTypeDef:"Si1TypeDef",SiTypeDefArray:"Si1TypeDefArray",SiTypeDefBitSequence:"Si1TypeDefBitSequence",SiTypeDefCompact:"Si1TypeDefCompact",SiTypeDefComposite:"Si1TypeDefComposite",SiTypeDefPrimitive:"Si1TypeDefPrimitive",SiTypeDefSequence:"Si1TypeDefSequence",SiTypeDefTuple:"Si1TypeDefTuple",SiTypeParameter:"Si1TypeParameter",SiTypeDefVariant:"Si1TypeDefVariant",SiVariant:"Si1Variant"}},Nu={rpc:{},runtime:{AssetConversionApi:[{methods:{get_reserves:{description:"Get pool reserves",params:[{name:"asset1",type:"StagingXcmV3MultiLocation"},{name:"asset2",type:"StagingXcmV3MultiLocation"}],type:"Option<(Balance,Balance)>"},quote_price_exact_tokens_for_tokens:{description:"Quote price: exact tokens for tokens",params:[{name:"asset1",type:"StagingXcmV3MultiLocation"},{name:"asset2",type:"StagingXcmV3MultiLocation"},{name:"amount",type:"u128"},{name:"include_fee",type:"bool"}],type:"Option<(Balance)>"},quote_price_tokens_for_exact_tokens:{description:"Quote price: tokens for exact tokens",params:[{name:"asset1",type:"StagingXcmV3MultiLocation"},{name:"asset2",type:"StagingXcmV3MultiLocation"},{name:"amount",type:"u128"},{name:"include_fee",type:"bool"}],type:"Option<(Balance)>"}},version:1}]},types:{TAssetConversion:"Option"}},Eu={rpc:{},runtime:{AssetsApi:[{methods:{account_balances:{description:"Return the current set of authorities.",params:[{name:"account",type:"AccountId"}],type:"Vec<(u32, TAssetBalance)>"}},version:1}]},types:{AssetApprovalKey:{owner:"AccountId",delegate:"AccountId"},AssetApproval:{amount:"TAssetBalance",deposit:"TAssetDepositBalance"},AssetBalance:{balance:"TAssetBalance",isFrozen:"bool",isSufficient:"bool"},AssetDestroyWitness:{accounts:"Compact",sufficients:"Compact",approvals:"Compact"},AssetDetails:{owner:"AccountId",issuer:"AccountId",admin:"AccountId",freezer:"AccountId",supply:"TAssetBalance",deposit:"TAssetDepositBalance",minBalance:"TAssetBalance",isSufficient:"bool",accounts:"u32",sufficients:"u32",approvals:"u32",isFrozen:"bool"},AssetMetadata:{deposit:"TAssetDepositBalance",name:"Vec",symbol:"Vec",decimals:"u8",isFrozen:"bool"},TAssetBalance:"u64",TAssetDepositBalance:"BalanceOf"}},Ou={rpc:{},runtime:{AuraApi:[{methods:{authorities:{description:"Return the current set of authorities.",params:[],type:"Vec"},slot_duration:{description:"Returns the slot duration for Aura.",params:[],type:"SlotDuration"}},version:1}]},types:{RawAuraPreDigest:{slotNumber:"u64"}}},Au={rpc:{},types:{UncleEntryItem:{_enum:{InclusionHeight:"BlockNumber",Uncle:"(Hash, Option)"}}}},Cu={current_epoch:{description:"Returns information regarding the current epoch.",params:[],type:"Epoch"},current_epoch_start:{description:"Returns the slot that started the current epoch.",params:[],type:"Slot"},generate_key_ownership_proof:{description:"Generates a proof of key ownership for the given authority in the current epoch.",params:[{name:"slot",type:"Slot"},{name:"authorityId",type:"AuthorityId"}],type:"Option"},next_epoch:{description:"Returns information regarding the next epoch (which was already previously announced).",params:[],type:"Epoch"},submit_report_equivocation_unsigned_extrinsic:{description:"Submits an unsigned extrinsic to report an equivocation.",params:[{name:"equivocationProof",type:"BabeEquivocationProof"},{name:"keyOwnerProof",type:"OpaqueKeyOwnershipProof"}],type:"Option"}},Hu={rpc:{epochAuthorship:{description:"Returns data about which slots (primary or secondary) can be claimed in the current epoch with the keys in the keystore",isUnsafe:!0,params:[],type:"HashMap"}},runtime:{BabeApi:[{methods:{configuration:{description:"Return the genesis configuration for BABE. The configuration is only read on genesis.",params:[],type:"BabeGenesisConfiguration"},...Cu},version:2},{methods:{configuration:{description:"Return the configuration for BABE. Version 1.",params:[],type:"BabeGenesisConfigurationV1"},...Cu},version:1}]},types:{AllowedSlots:{_enum:["PrimarySlots","PrimaryAndSecondaryPlainSlots","PrimaryAndSecondaryVRFSlots"]},BabeAuthorityWeight:"u64",BabeEpochConfiguration:{c:"(u64, u64)",allowedSlots:"AllowedSlots"},BabeBlockWeight:"u32",BabeEquivocationProof:{offender:"AuthorityId",slotNumber:"SlotNumber",firstHeader:"Header",secondHeader:"Header"},BabeGenesisConfiguration:{slotDuration:"u64",epochLength:"u64",c:"(u64, u64)",genesisAuthorities:"Vec<(AuthorityId, BabeAuthorityWeight)>",randomness:"Randomness",allowedSlots:"AllowedSlots"},BabeGenesisConfigurationV1:{slotDuration:"u64",epochLength:"u64",c:"(u64, u64)",genesisAuthorities:"Vec<(AuthorityId, BabeAuthorityWeight)>",randomness:"Randomness",secondarySlots:"bool"},BabeWeight:"u64",MaybeRandomness:"Option",MaybeVrf:"Option",Epoch:{epochIndex:"u64",startSlot:"Slot",duration:"u64",authorities:"Vec<(AuthorityId, BabeAuthorityWeight)>",randomness:"Hash",config:"BabeEpochConfiguration"},EpochAuthorship:{primary:"Vec",secondary:"Vec",secondary_vrf:"Vec"},NextConfigDescriptor:{_enum:{V0:"Null",V1:"NextConfigDescriptorV1"}},NextConfigDescriptorV1:{c:"(u64, u64)",allowedSlots:"AllowedSlots"},OpaqueKeyOwnershipProof:"Bytes",Randomness:"Hash",RawBabePreDigest:{_enum:{Phantom:"Null",Primary:"RawBabePreDigestPrimary",SecondaryPlain:"RawBabePreDigestSecondaryPlain",SecondaryVRF:"RawBabePreDigestSecondaryVRF"}},RawBabePreDigestPrimary:{authorityIndex:"u32",slotNumber:"SlotNumber",vrfOutput:"VrfOutput",vrfProof:"VrfProof"},RawBabePreDigestSecondaryPlain:{authorityIndex:"u32",slotNumber:"SlotNumber"},RawBabePreDigestSecondaryVRF:{authorityIndex:"u32",slotNumber:"SlotNumber",vrfOutput:"VrfOutput",vrfProof:"VrfProof"},RawBabePreDigestTo159:{_enum:{Primary:"RawBabePreDigestPrimaryTo159",Secondary:"RawBabePreDigestSecondaryTo159"}},RawBabePreDigestPrimaryTo159:{authorityIndex:"u32",slotNumber:"SlotNumber",weight:"BabeBlockWeight",vrfOutput:"VrfOutput",vrfProof:"VrfProof"},RawBabePreDigestSecondaryTo159:{authorityIndex:"u32",slotNumber:"SlotNumber",weight:"BabeBlockWeight"},RawBabePreDigestCompat:{_enum:{Zero:"u32",One:"u32",Two:"u32",Three:"u32"}},SlotNumber:"u64",VrfData:"[u8; 32]",VrfOutput:"[u8; 32]",VrfProof:"[u8; 64]"}},Ru={rpc:{},types:{AccountData:{free:"Balance",reserved:"Balance",miscFrozen:"Balance",feeFrozen:"Balance"},BalanceLockTo212:{id:"LockIdentifier",amount:"Balance",until:"BlockNumber",reasons:"WithdrawReasons"},BalanceLock:{id:"LockIdentifier",amount:"Balance",reasons:"Reasons"},BalanceStatus:{_enum:["Free","Reserved"]},Reasons:{_enum:["Fee","Misc","All"]},ReserveData:{id:"ReserveIdentifier",amount:"Balance"},ReserveIdentifier:"[u8; 8]",VestingSchedule:{offset:"Balance",perBlock:"Balance",startingBlock:"BlockNumber"},WithdrawReasons:{_set:{TransactionPayment:1,Transfer:2,Reserve:4,Fee:8,Tip:16}}}},Bu={beefy_genesis:{description:"Return the block number where BEEFY consensus is enabled/started",params:[],type:"Option"},generate_key_ownership_proof:{description:"Generates a proof of key ownership for the given authority in the given set.",params:[{name:"setId",type:"ValidatorSetId"},{name:"authorityId",type:"AuthorityId"}],type:"Option"},validator_set:{description:"Return the current active BEEFY validator set",params:[],type:"Option"}},Lu={...Bu,submit_report_equivocation_unsigned_extrinsic:{description:"Submits an unsigned extrinsic to report an equivocation.",params:[{name:"equivocationProof",type:"BeefyEquivocationProof"},{name:"keyOwnerProof",type:"OpaqueKeyOwnershipProof"}],type:"Option"}},zu={rpc:{getFinalizedHead:{description:"Returns hash of the latest BEEFY finalized block as seen by this client.",params:[],type:"H256"},subscribeJustifications:{description:"Returns the block most recently finalized by BEEFY, alongside its justification.",params:[],pubsub:["justifications","subscribeJustifications","unsubscribeJustifications"],type:"BeefyVersionedFinalityProof"}},runtime:{BeefyApi:[{methods:{...Bu,submit_report_double_voting_unsigned_extrinsic:{description:"Submits an unsigned extrinsic to report a double voting equivocation.",params:[{name:"equivocationProof",type:"SpConsensusBeefyDoubleVotingProof"},{name:"keyOwnerProof",type:"OpaqueKeyOwnershipProof"}],type:"Option"}},version:4},{methods:Lu,version:3},{methods:Lu,version:2},{methods:Lu,version:1}],BeefyMmrApi:[{methods:{authority_set_proof:{description:"Return the currently active BEEFY authority set proof.",params:[],type:"BeefyAuthoritySet"},next_authority_set_proof:{description:"Return the next/queued BEEFY authority set proof.",params:[],type:"BeefyNextAuthoritySet"}},version:1}]},types:{BeefyAuthoritySet:{id:"u64",len:"u32",root:"H256"},BeefyCommitment:{payload:"BeefyPayload",blockNumber:"BlockNumber",validatorSetId:"ValidatorSetId"},BeefyId:"[u8; 33]",BeefyEquivocationProof:{first:"BeefyVoteMessage",second:"BeefyVoteMessage"},BeefyCompactSignedCommitment:{commitment:"BeefyCommitment",signaturesFrom:"Vec",validatorSetLen:"u32",signaturesCompact:"Vec"},BeefySignedCommitment:{commitment:"BeefyCommitment",signatures:"Vec>"},BeefyVersionedFinalityProof:{_enum:{V0:"Null",V1:"BeefyCompactSignedCommitment"}},BeefyNextAuthoritySet:{id:"u64",len:"u32",root:"H256"},BeefyPayload:"Vec<(BeefyPayloadId, Bytes)>",BeefyPayloadId:"[u8;2]",BeefyVoteMessage:{commitment:"BeefyCommitment",id:"AuthorityId",signature:"Signature"},MmrRootHash:"H256",ValidatorSetId:"u64",ValidatorSet:{validators:"Vec",id:"ValidatorSetId"}}},Uu={rpc:{},runtime:{Benchmark:[{methods:{benchmark_metadata:{description:"Get the benchmark metadata available for this runtime.",params:[{name:"extra",type:"bool"}],type:"(Vec, Vec)"},dispatch_benchmark:{description:"Dispatch the given benchmark.",params:[{name:"config",type:"BenchmarkConfig"}],type:"Result, Text>"}},version:1}]},types:{BenchmarkBatch:{pallet:"Text",instance:"Text",benchmark:"Text",results:"Vec"},BenchmarkConfig:{pallet:"Bytes",benchmark:"Bytes",selectedComponents:"Vec<(BenchmarkParameter, u32)>",verify:"bool",internalRepeats:"u32"},BenchmarkList:{pallet:"Bytes",instance:"Bytes",benchmarks:"Vec"},BenchmarkMetadata:{name:"Bytes",components:"Vec<(BenchmarkParameter, u32, u32)>"},BenchmarkParameter:{_enum:["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]},BenchmarkResult:{components:"Vec<(BenchmarkParameter, u32)>",extrinsicTime:"u128",storageRootTime:"u128",reads:"u32",repeatReads:"u32",writes:"u32",repeatWrites:"u32",proofSize:"u32",benchKeys:"Vec<(Vec, u32, u32, bool)>"}}},Du={random_seed:{description:"Generate a random seed.",params:[],type:"Hash"}},qu={apply_extrinsic:{description:"Apply the given extrinsic.",params:[{name:"extrinsic",type:"Extrinsic"}],type:"ApplyExtrinsicResultPre6"}},ju={check_inherents:{description:"Check that the inherents are valid.",params:[{name:"block",type:"Block"},{name:"data",type:"InherentData"}],type:"CheckInherentsResult"},inherent_extrinsics:{description:"Generate inherent extrinsics.",params:[{name:"inherent",type:"InherentData"}],type:"Vec"}},Fu={finalize_block:{description:"Finish the current block.",params:[],type:"Header"}},Xu={rpc:{},runtime:{BlockBuilder:[{methods:{apply_extrinsic:{description:"Apply the given extrinsic.",params:[{name:"extrinsic",type:"Extrinsic"}],type:"ApplyExtrinsicResult"},...ju,...Fu},version:6},{methods:{...qu,...ju,...Fu},version:5},{methods:{...Du,...qu,...ju,...Fu},version:4},{methods:{...Du,...ju,...Fu},version:3},{methods:{finalise_block:{description:"Finish the current block.",params:[],type:"Header"},...Du,...ju},version:2}]},types:{CheckInherentsResult:{okay:"bool",fatalError:"bool",errors:"InherentData"},InherentData:{data:"BTreeMap"},InherentIdentifier:"[u8; 8]"}},Wu={rpc:{},types:{CollectiveOrigin:{_enum:{Members:"(MemberCount, MemberCount)",Member:"AccountId"}},MemberCount:"u32",ProposalIndex:"u32",VotesTo230:{index:"ProposalIndex",threshold:"MemberCount",ayes:"Vec",nays:"Vec"},Votes:{index:"ProposalIndex",threshold:"MemberCount",ayes:"Vec",nays:"Vec",end:"BlockNumber"}}},Zu={rpc:{},types:{AuthorityId:"AccountId",RawVRFOutput:"[u8; 32]"}},Gu={get_storage:{description:"Query a given storage key in a given contract.",params:[{name:"address",type:"AccountId"},{name:"key",type:"Bytes"}],type:"Option"},upload_code:{description:"Upload new code without instantiating a contract from it.",params:[{name:"origin",type:"AccountId"},{name:"code",type:"Bytes"},{name:"storageDepositLimit",type:"Option"}],type:"CodeUploadResult"}},Ku={rpc:{call:{deprecated:"Use the runtime interface `api.call.contractsApi.call` instead",description:"Executes a call to a contract",params:[{name:"callRequest",type:"ContractCallRequest"},{isHistoric:!0,isOptional:!0,name:"at",type:"BlockHash"}],type:"ContractExecResult"},getStorage:{deprecated:"Use the runtime interface `api.call.contractsApi.getStorage` instead",description:"Returns the value under a specified storage key in a contract",params:[{name:"address",type:"AccountId"},{name:"key",type:"H256"},{isHistoric:!0,isOptional:!0,name:"at",type:"BlockHash"}],type:"Option"},instantiate:{deprecated:"Use the runtime interface `api.call.contractsApi.instantiate` instead",description:"Instantiate a new contract",params:[{name:"request",type:"InstantiateRequestV1"},{isHistoric:!0,isOptional:!0,name:"at",type:"BlockHash"}],type:"ContractInstantiateResult"},rentProjection:{deprecated:"Not available in newer versions of the contracts interfaces",description:"Returns the projected time a given contract will be able to sustain paying its rent",params:[{name:"address",type:"AccountId"},{isHistoric:!0,isOptional:!0,name:"at",type:"BlockHash"}],type:"Option"},uploadCode:{deprecated:"Use the runtime interface `api.call.contractsApi.uploadCode` instead",description:"Upload new code without instantiating a contract from it",endpoint:"contracts_upload_code",params:[{name:"uploadRequest",type:"CodeUploadRequest"},{isHistoric:!0,isOptional:!0,name:"at",type:"BlockHash"}],type:"CodeUploadResult"}},runtime:{ContractsApi:[{methods:{call:{description:"Perform a call from a specified account to a given contract.",params:[{name:"origin",type:"AccountId"},{name:"dest",type:"AccountId"},{name:"value",type:"Balance"},{name:"gasLimit",type:"Option"},{name:"storageDepositLimit",type:"Option"},{name:"inputData",type:"Vec"}],type:"ContractExecResult"},instantiate:{description:"Instantiate a new contract.",params:[{name:"origin",type:"AccountId"},{name:"value",type:"Balance"},{name:"gasLimit",type:"Option"},{name:"storageDepositLimit",type:"Option"},{name:"code",type:"CodeSource"},{name:"data",type:"Bytes"},{name:"salt",type:"Bytes"}],type:"ContractInstantiateResult"},...Gu},version:2},{methods:{call:{description:"Perform a call from a specified account to a given contract.",params:[{name:"origin",type:"AccountId"},{name:"dest",type:"AccountId"},{name:"value",type:"Balance"},{name:"gasLimit",type:"u64"},{name:"storageDepositLimit",type:"Option"},{name:"inputData",type:"Vec"}],type:"ContractExecResultU64"},instantiate:{description:"Instantiate a new contract.",params:[{name:"origin",type:"AccountId"},{name:"value",type:"Balance"},{name:"gasLimit",type:"u64"},{name:"storageDepositLimit",type:"Option"},{name:"code",type:"CodeSource"},{name:"data",type:"Bytes"},{name:"salt",type:"Bytes"}],type:"ContractInstantiateResultU64"},...Gu},version:1}]},types:{AliveContractInfo:{trieId:"TrieId",storageSize:"u32",pairCount:"u32",codeHash:"CodeHash",rentAllowance:"Balance",rentPaid:"Balance",deductBlock:"BlockNumber",lastWrite:"Option",_reserved:"Option"},CodeHash:"Hash",CodeSource:{_enum:{Upload:"Bytes",Existing:"Hash"}},CodeUploadRequest:{origin:"AccountId",code:"Bytes",storageDepositLimit:"Option"},CodeUploadResult:"Result",CodeUploadResultValue:{codeHash:"CodeHash",deposit:"Balance"},ContractCallRequest:{origin:"AccountId",dest:"AccountId",value:"Balance",gasLimit:"u64",storageDepositLimit:"Option",inputData:"Bytes"},ContractExecResultSuccessTo255:{status:"u8",data:"Raw"},ContractExecResultTo255:{_enum:{Success:"ContractExecResultSuccessTo255",Error:"Null"}},ContractExecResultSuccessTo260:{flags:"ContractReturnFlags",data:"Bytes",gasConsumed:"u64"},ContractExecResultTo260:{_enum:{Success:"ContractExecResultSuccessTo260",Error:"Null"}},ContractExecResultOk:{flags:"ContractReturnFlags",data:"Bytes"},ContractExecResultResult:"Result",ContractExecResultTo267:{gasConsumed:"u64",debugMessage:"Text",result:"ContractExecResultResult"},ContractExecResult:{gasConsumed:"Weight",gasRequired:"Weight",storageDeposit:"StorageDeposit",debugMessage:"Text",result:"ContractExecResultResult"},ContractExecResultU64:{gasConsumed:"u64",gasRequired:"u64",storageDeposit:"StorageDeposit",debugMessage:"Text",result:"ContractExecResultResult"},ContractInfo:{_enum:{Alive:"AliveContractInfo",Tombstone:"TombstoneContractInfo"}},ContractCallFlags:{_set:{_bitLength:32,ForwardInput:1,CloneInput:2,TailCall:4,AllowReentry:8}},ContractReturnFlags:{_set:{_bitLength:32,Revert:1}},ContractStorageKey:"[u8; 32]",DeletedContract:{pairCount:"u32",trieId:"TrieId"},ExecReturnValue:{flags:"ContractReturnFlags",data:"Bytes"},Gas:"u64",HostFnWeightsTo264:{caller:"Weight",address:"Weight",gasLeft:"Weight",balance:"Weight",valueTransferred:"Weight",minimumBalance:"Weight",tombstoneDeposit:"Weight",rentAllowance:"Weight",blockNumber:"Weight",now:"Weight",weightToFee:"Weight",gas:"Weight",input:"Weight",inputPerByte:"Weight",return:"Weight",returnPerByte:"Weight",terminate:"Weight",restoreTo:"Weight",restoreToPerDelta:"Weight",random:"Weight",depositEvent:"Weight",depositEventPerTopic:"Weight",depositEventPerByte:"Weight",setRentAllowance:"Weight",setStorage:"Weight",setStoragePerByte:"Weight",clearStorage:"Weight",getStorage:"Weight",getStoragePerByte:"Weight",transfer:"Weight",call:"Weight",callTransferSurcharge:"Weight",callPerInputByte:"Weight",callPerOutputByte:"Weight",instantiate:"Weight",instantiatePerInputByte:"Weight",instantiatePerOutputByte:"Weight",hashSha2256:"Weight",hashSha2256PerByte:"Weight",hashKeccak256:"Weight",hashKeccak256PerByte:"Weight",hashBlake2256:"Weight",hashBlake2256PerByte:"Weight",hashBlake2128:"Weight",hashBlake2128PerByte:"Weight"},HostFnWeights:{caller:"Weight",address:"Weight",gasLeft:"Weight",balance:"Weight",valueTransferred:"Weight",minimumBalance:"Weight",tombstoneDeposit:"Weight",rentAllowance:"Weight",blockNumber:"Weight",now:"Weight",weightToFee:"Weight",gas:"Weight",input:"Weight",inputPerByte:"Weight",return:"Weight",returnPerByte:"Weight",terminate:"Weight",terminatePerCodeByte:"Weight",restoreTo:"Weight",restoreToPerCallerCodeByte:"Weight",restoreToPerTombstoneCodeByte:"Weight",restoreToPerDelta:"Weight",random:"Weight",depositEvent:"Weight",depositEventPerTopic:"Weight",depositEventPerByte:"Weight",setRentAllowance:"Weight",setStorage:"Weight",setStoragePerByte:"Weight",clearStorage:"Weight",getStorage:"Weight",getStoragePerByte:"Weight",transfer:"Weight",call:"Weight",callPerCodeByte:"Weight",callTransferSurcharge:"Weight",callPerInputByte:"Weight",callPerOutputByte:"Weight",instantiate:"Weight",instantiatePerCodeByte:"Weight",instantiatePerInputByte:"Weight",instantiatePerOutputByte:"Weight",instantiatePerSaltByte:"Weight",hashSha2256:"Weight",hashSha2256PerByte:"Weight",hashKeccak256:"Weight",hashKeccak256PerByte:"Weight",hashBlake2256:"Weight",hashBlake2256PerByte:"Weight",hashBlake2128:"Weight",hashBlake2128PerByte:"Weight",rentParams:"Weight"},InstantiateRequestV1:{origin:"AccountId",value:"Balance",gasLimit:"Gas",code:"Bytes",data:"Bytes",salt:"Bytes"},InstantiateRequestV2:{_fallback:"InstantiateRequestV1",origin:"AccountId",value:"Balance",gasLimit:"Gas",storageDepositLimit:"Option",code:"Bytes",data:"Bytes",salt:"Bytes"},InstantiateRequest:{_fallback:"InstantiateRequestV2",origin:"AccountId",value:"Balance",gasLimit:"Gas",storageDepositLimit:"Option",code:"CodeSource",data:"Bytes",salt:"Bytes"},ContractInstantiateResultTo267:"Result",ContractInstantiateResultTo299:"Result",ContractInstantiateResult:{gasConsumed:"WeightV2",gasRequired:"WeightV2",storageDeposit:"StorageDeposit",debugMessage:"Text",result:"InstantiateReturnValue"},ContractInstantiateResultU64:{_fallback:"ContractInstantiateResultTo299",gasConsumed:"u64",gasRequired:"u64",storageDeposit:"StorageDeposit",debugMessage:"Text",result:"InstantiateReturnValue"},InstantiateReturnValueTo267:{result:"ExecReturnValue",accountId:"AccountId",rentProjection:"Option"},InstantiateReturnValueOk:{result:"ExecReturnValue",accountId:"AccountId"},InstantiateReturnValue:"Result",InstructionWeights:{i64const:"u32",i64load:"u32",i64store:"u32",select:"u32",rIf:"u32",br:"u32",brIf:"u32",brIable:"u32",brIablePerEntry:"u32",call:"u32",callIndirect:"u32",callIndirectPerParam:"u32",localGet:"u32",localSet:"u32",local_tee:"u32",globalGet:"u32",globalSet:"u32",memoryCurrent:"u32",memoryGrow:"u32",i64clz:"u32",i64ctz:"u32",i64popcnt:"u32",i64eqz:"u32",i64extendsi32:"u32",i64extendui32:"u32",i32wrapi64:"u32",i64eq:"u32",i64ne:"u32",i64lts:"u32",i64ltu:"u32",i64gts:"u32",i64gtu:"u32",i64les:"u32",i64leu:"u32",i64ges:"u32",i64geu:"u32",i64add:"u32",i64sub:"u32",i64mul:"u32",i64divs:"u32",i64divu:"u32",i64rems:"u32",i64remu:"u32",i64and:"u32",i64or:"u32",i64xor:"u32",i64shl:"u32",i64shrs:"u32",i64shru:"u32",i64rotl:"u32",i64rotr:"u32"},LimitsTo264:{eventTopics:"u32",stackHeight:"u32",globals:"u32",parameters:"u32",memoryPages:"u32",tableSize:"u32",brTableSize:"u32",subjectLen:"u32",codeSize:"u32"},Limits:{eventTopics:"u32",stackHeight:"u32",globals:"u32",parameters:"u32",memoryPages:"u32",tableSize:"u32",brTableSize:"u32",subjectLen:"u32"},PrefabWasmModule:{scheduleVersion:"Compact",initial:"Compact",maximum:"Compact",refcount:"Compact",_reserved:"Option",code:"Bytes",originalCodeLen:"u32"},RentProjection:{_enum:{EvictionAt:"BlockNumber",NoEviction:"Null"}},ScheduleTo212:{version:"u32",putCodePerByteCost:"Gas",growMemCost:"Gas",regularOpCost:"Gas",returnDataPerByteCost:"Gas",eventDataPerByteCost:"Gas",eventPerTopicCost:"Gas",eventBaseCost:"Gas",sandboxDataReadCost:"Gas",sandboxDataWriteCost:"Gas",maxEventTopics:"u32",maxStackHeight:"u32",maxMemoryPages:"u32",enablePrintln:"bool",maxSubjectLen:"u32"},ScheduleTo258:{version:"u32",putCodePerByteCost:"Gas",growMemCost:"Gas",regularOpCost:"Gas",returnDataPerByteCost:"Gas",eventDataPerByteCost:"Gas",eventPerTopicCost:"Gas",eventBaseCost:"Gas",sandboxDataReadCost:"Gas",sandboxDataWriteCost:"Gas",transferCost:"Gas",maxEventTopics:"u32",maxStackHeight:"u32",maxMemoryPages:"u32",enablePrintln:"bool",maxSubjectLen:"u32"},ScheduleTo264:{version:"u32",enablePrintln:"bool",limits:"LimitsTo264",instructionWeights:"InstructionWeights",hostFnWeights:"HostFnWeightsTo264"},Schedule:{version:"u32",enablePrintln:"bool",limits:"Limits",instructionWeights:"InstructionWeights",hostFnWeights:"HostFnWeights"},SeedOf:"Hash",StorageDeposit:{_enum:{Refund:"Balance",Charge:"Balance"}},TombstoneContractInfo:"Hash",TrieId:"Bytes"}},Ju={rpc:{},types:{AccountVote:{_enum:{Standard:"AccountVoteStandard",Split:"AccountVoteSplit"}},AccountVoteSplit:{aye:"Balance",nay:"Balance"},AccountVoteStandard:{vote:"Vote",balance:"Balance"},Conviction:{_enum:["None","Locked1x","Locked2x","Locked3x","Locked4x","Locked5x","Locked6x"]},Delegations:{votes:"Balance",capital:"Balance"},PreimageStatus:{_enum:{Missing:"BlockNumber",Available:"PreimageStatusAvailable"}},PreimageStatusAvailable:{data:"Bytes",provider:"AccountId",deposit:"Balance",since:"BlockNumber",expiry:"Option"},PriorLock:"(BlockNumber, Balance)",PropIndex:"u32",Proposal:"Call",ProxyState:{_enum:{Open:"AccountId",Active:"AccountId"}},ReferendumIndex:"u32",ReferendumInfoTo239:{end:"BlockNumber",proposalHash:"Hash",threshold:"VoteThreshold",delay:"BlockNumber"},ReferendumInfo:{_enum:{Ongoing:"ReferendumStatus",Finished:"ReferendumInfoFinished"}},ReferendumInfoFinished:{approved:"bool",end:"BlockNumber"},ReferendumStatus:{end:"BlockNumber",proposalHash:"Hash",threshold:"VoteThreshold",delay:"BlockNumber",tally:"Tally"},Tally:{ayes:"Balance",nays:"Balance",turnout:"Balance"},Voting:{_enum:{Direct:"VotingDirect",Delegating:"VotingDelegating"}},VotingDirect:{votes:"Vec",delegations:"Delegations",prior:"PriorLock"},VotingDirectVote:"(ReferendumIndex, AccountVote)",VotingDelegating:{balance:"Balance",target:"AccountId",conviction:"Conviction",delegations:"Delegations",prior:"PriorLock"}}},Yu={rpc:{getBlockStats:{description:"Reexecute the specified `block_hash` and gather statistics while doing so",isUnsafe:!0,params:[{isHistoric:!0,name:"at",type:"Hash"}],type:"Option"}},types:{BlockStats:{witnessLen:"u64",witnessCompactLen:"u64",blockLen:"u64",blockNumExtrinsics:"u64"}}},Qu={rpc:{},runtime:{AuthorityDiscoveryApi:[{methods:{authorities:{description:"Retrieve authority identifiers of the current and next authority set.",params:[],type:"Vec"}},version:1}]},types:{}},$u={rpc:{},types:{ApprovalFlag:"u32",DefunctVoter:{who:"AccountId",voteCount:"Compact",candidateCount:"Compact"},Renouncing:{_enum:{Member:"Null",RunnerUp:"Null",Candidate:"Compact"}},SetIndex:"u32",Vote:"GenericVote",VoteIndex:"u32",VoterInfo:{lastActive:"VoteIndex",lastWin:"VoteIndex",pot:"Balance",stake:"Balance"},VoteThreshold:{_enum:["Super Majority Approve","Super Majority Against","Simple Majority"]}}},el={rpc:{createBlock:{description:"Instructs the manual-seal authorship task to create a new block",params:[{name:"createEmpty",type:"bool"},{name:"finalize",type:"bool"},{isOptional:!0,name:"parentHash",type:"BlockHash"}],type:"CreatedBlock"},finalizeBlock:{description:"Instructs the manual-seal authorship task to finalize a block",params:[{name:"hash",type:"BlockHash"},{isOptional:!0,name:"justification",type:"Justification"}],type:"bool"}},types:{CreatedBlock:{_alias:{blockHash:"hash"},blockHash:"BlockHash",aux:"ImportedAux"},ImportedAux:{headerOnly:"bool",clearJustificationRequests:"bool",needsJustification:"bool",badJustification:"bool",needsFinalityProof:"bool",isNewBest:"bool"}}},tl={rpc:{},types:{EvmAccount:{nonce:"u256",balance:"u256"},EvmCallInfo:{exitReason:"ExitReason",value:"Bytes",usedGas:"U256",logs:"Vec"},EvmCreateInfo:{exitReason:"ExitReason",value:"H160",usedGas:"U256",logs:"Vec"},EvmCallInfoV2:{exitReason:"ExitReason",value:"Bytes",usedGas:"U256",weightInfo:"Option",logs:"Vec"},EvmCreateInfoV2:{exitReason:"ExitReason",value:"H160",usedGas:"U256",weightInfo:"Option",logs:"Vec"},EvmLog:{address:"H160",topics:"Vec",data:"Bytes"},EvmVicinity:{gasPrice:"u256",origin:"H160"},EvmWeightInfo:{refTimeLimit:"Option",proofSizeLimit:"Option",refTimeUsage:"Option",proofSizeUsage:"Option"},ExitError:{_enum:{StackUnderflow:"Null",StackOverflow:"Null",InvalidJump:"Null",InvalidRange:"Null",DesignatedInvalid:"Null",CallTooDeep:"Null",CreateCollision:"Null",CreateContractLimit:"Null",OutOfOffset:"Null",OutOfGas:"Null",OutOfFund:"Null",PCUnderflow:"Null",CreateEmpty:"Null",Other:"Text"}},ExitFatal:{_enum:{NotSupported:"Null",UnhandledInterrupt:"Null",CallErrorAsFatal:"ExitError",Other:"Text"}},ExitReason:{_enum:{Succeed:"ExitSucceed",Error:"ExitError",Revert:"ExitRevert",Fatal:"ExitFatal"}},ExitRevert:{_enum:["Reverted"]},ExitSucceed:{_enum:["Stopped","Returned","Suicided"]}}},nl={rpc:{},types:{Extrinsic:"GenericExtrinsic",ExtrinsicEra:"GenericExtrinsicEra",ExtrinsicPayload:"GenericExtrinsicPayload",ExtrinsicSignature:"MultiSignature",ExtrinsicV4:"GenericExtrinsicV4",ExtrinsicPayloadV4:"GenericExtrinsicPayloadV4",ExtrinsicSignatureV4:"GenericExtrinsicSignatureV4",ExtrinsicUnknown:"GenericExtrinsicUnknown",ExtrinsicPayloadUnknown:"GenericExtrinsicPayloadUnknown",ExtrinsicV5:"GenericExtrinsicV5",ExtrinsicPayloadV5:"GenericExtrinsicPayloadV5",ExtrinsicSignatureV5:"GenericExtrinsicSignatureV5",Era:"ExtrinsicEra",ImmortalEra:"GenericImmortalEra",MortalEra:"GenericMortalEra",AnySignature:"H512",MultiSignature:{_enum:{Ed25519:"Ed25519Signature",Sr25519:"Sr25519Signature",Ecdsa:"EcdsaSignature"}},Signature:"H512",SignerPayload:"GenericSignerPayload",EcdsaSignature:"[u8; 65]",Ed25519Signature:"H512",Sr25519Signature:"H512"}},rl={rpc:{},runtime:{FungiblesApi:[{methods:{query_account_balances:{description:"Returns the list of all `MultiAsset` that an `AccountId` has",params:[{name:"account",type:"AccountId"}],type:"Result, FungiblesAccessError>"}},version:1},{methods:{query_account_balances:{description:"Returns the list of all `MultiAsset` that an `AccountId` has",params:[{name:"account",type:"AccountId"}],type:"Result"}},version:2}]},types:{FungiblesAccessError:{_enum:["AssetIdConversionFailed","AmountToBalanceConversionFailed"]}}},al={rpc:{},types:{AssetOptions:{initalIssuance:"Compact",permissions:"PermissionLatest"},Owner:{_enum:{None:"Null",Address:"AccountId"}},PermissionsV1:{update:"Owner",mint:"Owner",burn:"Owner"},PermissionVersions:{_enum:{V1:"PermissionsV1"}},PermissionLatest:"PermissionsV1"}},il={rpc:{},runtime:{GenesisBuilder:[{methods:{build_config:{description:"Build `RuntimeGenesisConfig` from a JSON blob not using any defaults and store it in the storage.",params:[{name:"json",type:"Vec"}],type:"Result<(), GenesisBuildErr>"},create_default_config:{description:"Creates the default `RuntimeGenesisConfig` and returns it as a JSON blob.",params:[],type:"Vec"}},version:1}]},types:{GenesisBuildErr:"Text"}},sl={rpc:{},types:{ActiveGilt:{proportion:"Perquintill",amount:"Balance",who:"AccountId",expiry:"BlockNumber"},ActiveGiltsTotal:{frozen:"Balance",proportion:"Perquintill",index:"ActiveIndex",target:"Perquintill"},ActiveIndex:"u32",GiltBid:{amount:"Balance",who:"AccountId"}}},ol={generate_key_ownership_proof:{description:"Generates a proof of key ownership for the given authority in the given set.",params:[{name:"setId",type:"SetId"},{name:"authorityId",type:"AuthorityId"}],type:"Option"},grandpa_authorities:{description:"Get the current GRANDPA authorities and weights. This should not change except for when changes are scheduled and the corresponding delay has passed.",params:[],type:"AuthorityList"},submit_report_equivocation_unsigned_extrinsic:{description:"Submits an unsigned extrinsic to report an equivocation.",params:[{name:"equivocationProof",type:"GrandpaEquivocationProof"},{name:"keyOwnerProof",type:"OpaqueKeyOwnershipProof"}],type:"Option"}},cl={rpc:{proveFinality:{description:"Prove finality for the given block number, returning the Justification for the last block in the set.",params:[{name:"blockNumber",type:"BlockNumber"}],type:"Option"},roundState:{description:"Returns the state of the current best round state as well as the ongoing background rounds",params:[],type:"ReportedRoundStates"},subscribeJustifications:{description:"Subscribes to grandpa justifications",params:[],pubsub:["justifications","subscribeJustifications","unsubscribeJustifications"],type:"JustificationNotification"}},runtime:{GrandpaApi:[{methods:{current_set_id:{description:"Get current GRANDPA authority set id.",params:[],type:"SetId"},...ol},version:3},{methods:ol,version:2}]},types:{AuthorityIndex:"u64",AuthorityList:"Vec",AuthoritySet:{currentAuthorities:"AuthorityList",setId:"u64",pendingStandardChanges:"ForkTreePendingChange",pendingForcedChanges:"Vec",authoritySetChanges:"AuthoritySetChanges"},ForkTreePendingChange:{roots:"Vec",bestFinalizedNumber:"Option"},ForkTreePendingChangeNode:{hash:"BlockHash",number:"BlockNumber",data:"PendingChange",children:"Vec"},AuthoritySetChange:"(U64, BlockNumber)",AuthoritySetChanges:"Vec",AuthorityWeight:"u64",DelayKind:{_enum:{Finalized:"Null",Best:"DelayKindBest"}},DelayKindBest:{medianLastFinalized:"BlockNumber"},EncodedFinalityProofs:"Bytes",GrandpaEquivocation:{_enum:{Prevote:"GrandpaEquivocationValue",Precommit:"GrandpaEquivocationValue"}},GrandpaEquivocationProof:{setId:"SetId",equivocation:"GrandpaEquivocation"},GrandpaEquivocationValue:{roundNumber:"u64",identity:"AuthorityId",first:"(GrandpaPrevote, AuthoritySignature)",second:"(GrandpaPrevote, AuthoritySignature)"},GrandpaPrevote:{targetHash:"Hash",targetNumber:"BlockNumber"},GrandpaCommit:{targetHash:"BlockHash",targetNumber:"BlockNumber",precommits:"Vec"},GrandpaPrecommit:{targetHash:"BlockHash",targetNumber:"BlockNumber"},GrandpaSignedPrecommit:{precommit:"GrandpaPrecommit",signature:"AuthoritySignature",id:"AuthorityId"},GrandpaJustification:{round:"u64",commit:"GrandpaCommit",votesAncestries:"Vec
    "},JustificationNotification:"Bytes",KeyOwnerProof:"MembershipProof",NextAuthority:"(AuthorityId, AuthorityWeight)",PendingChange:{nextAuthorities:"AuthorityList",delay:"BlockNumber",canonHeight:"BlockNumber",canonHash:"BlockHash",delayKind:"DelayKind"},PendingPause:{scheduledAt:"BlockNumber",delay:"BlockNumber"},PendingResume:{scheduledAt:"BlockNumber",delay:"BlockNumber"},Precommits:{currentWeight:"u32",missing:"BTreeSet"},Prevotes:{currentWeight:"u32",missing:"BTreeSet"},ReportedRoundStates:{setId:"u32",best:"RoundState",background:"Vec"},RoundState:{round:"u32",totalWeight:"u32",thresholdWeight:"u32",prevotes:"Prevotes",precommits:"Precommits"},SetId:"u64",StoredPendingChange:{scheduledAt:"BlockNumber",delay:"BlockNumber",nextAuthorities:"AuthorityList"},StoredState:{_enum:{Live:"Null",PendingPause:"PendingPause",Paused:"Null",PendingResume:"PendingResume"}}}},dl={rpc:{},types:{IdentityFields:{_set:{_bitLength:64,Display:1,Legal:2,Web:4,Riot:8,Email:16,PgpFingerprint:32,Image:64,Twitter:128}},IdentityInfoAdditional:"(Data, Data)",IdentityInfoTo198:{additional:"Vec",display:"Data",legal:"Data",web:"Data",riot:"Data",email:"Data",pgpFingerprint:"Option",image:"Data"},IdentityInfo:{_fallback:"IdentityInfoTo198",additional:"Vec",display:"Data",legal:"Data",web:"Data",riot:"Data",email:"Data",pgpFingerprint:"Option",image:"Data",twitter:"Data"},IdentityJudgement:{_enum:{Unknown:"Null",FeePaid:"Balance",Reasonable:"Null",KnownGood:"Null",OutOfDate:"Null",LowQuality:"Null",Erroneous:"Null"}},RegistrationJudgement:"(RegistrarIndex, IdentityJudgement)",RegistrationTo198:{judgements:"Vec",deposit:"Balance",info:"IdentityInfoTo198"},Registration:{_fallback:"RegistrationTo198",judgements:"Vec",deposit:"Balance",info:"IdentityInfo"},RegistrarIndex:"u32",RegistrarInfo:{account:"AccountId",fee:"Balance",fields:"IdentityFields"}}},ul={rpc:{},types:{AuthIndex:"u32",AuthoritySignature:"Signature",Heartbeat:{blockNumber:"BlockNumber",networkState:"OpaqueNetworkState",sessionIndex:"SessionIndex",authorityIndex:"AuthIndex",validatorsLen:"u32"},HeartbeatTo244:{blockNumber:"BlockNumber",networkState:"OpaqueNetworkState",sessionIndex:"SessionIndex",authorityIndex:"AuthIndex"},OpaqueMultiaddr:"Opaque",OpaquePeerId:"Opaque",OpaqueNetworkState:{peerId:"OpaquePeerId",externalAddresses:"Vec"}}},ll={rpc:{},types:{CallIndex:"(u8, u8)",LotteryConfig:{price:"Balance",start:"BlockNumber",length:"BlockNumber",delay:"BlockNumber",repeat:"bool"}}},fl={rpc:{},runtime:{MixnetApi:[{methods:{current_mixnodes:{description:"Get the index and phase of the current session.",params:[],type:"Result"},maybe_register:{description:"Try to register a mixnode for the next session.",params:[{name:"session_index",type:"u32"},{name:"mixnode",type:"Mixnode"}],type:"bool"},prev_mixnodes:{description:"Get the index and phase of the current session.",params:[],type:"Result"},session_status:{description:"Get the index and phase of the current session.",params:[],type:"SessionStatus"}},version:1}]},types:{Mixnode:{externalAddresses:"Vec",kxPublic:"[u8; 32]",peerId:"[u8; 32]"},MixnodesErr:{_enum:{InsufficientRegistrations:{min:"u32",num:"u32"}}},SessionPhase:{_enum:["CoverToCurrent","RequestsToCurrent","CoverToPrev","DisconnectFromPrev"]},SessionStatus:{currentIndex:"u32",phase:"SessionPhase"}}},pl={rpc:{generateProof:{description:"Generate MMR proof for the given block numbers.",params:[{name:"blockNumbers",type:"Vec"},{isOptional:!0,name:"bestKnownBlockNumber",type:"u64"},{isHistoric:!0,isOptional:!0,name:"at",type:"BlockHash"}],type:"MmrLeafBatchProof"},root:{description:"Get the MMR root hash for the current best block.",params:[{isHistoric:!0,isOptional:!0,name:"at",type:"BlockHash"}],type:"MmrHash"},verifyProof:{description:"Verify an MMR proof",params:[{name:"proof",type:"MmrLeafBatchProof"}],type:"bool"},verifyProofStateless:{description:"Verify an MMR proof statelessly given an mmr_root",params:[{name:"root",type:"MmrHash"},{name:"proof",type:"MmrLeafBatchProof"}],type:"bool"}},runtime:{MmrApi:[{methods:{generate_proof:{description:"Generate MMR proof for the given block numbers.",params:[{name:"blockNumbers",type:"Vec"},{name:"bestKnownBlockNumber",type:"Option"}],type:"Result<(Vec, MmrBatchProof), MmrError>"},mmr_leaf_count:{description:"Return the number of MMR blocks in the chain.",params:[],type:"Result"},mmr_root:{description:"Return the on-chain MMR root hash.",params:[],type:"Result"},verify_proof:{description:"Verify MMR proof against on-chain MMR.",params:[{name:"leaves",type:"Vec"},{name:"proof",type:"MmrBatchProof"}],type:"Result<(), MmrError>"},verify_proof_stateless:{description:"Verify MMR proof against given root hash.",params:[{name:"root",type:"Hash"},{name:"leaves",type:"Vec"},{name:"proof",type:"MmrBatchProof"}],type:"Result<(), MmrError>"}},version:2},{methods:{generate_batch_proof:{description:"Generate MMR proof for a series of leaves under given indices.",params:[{name:"leafIndices",type:"Vec"}],type:"Result<(Vec, MmrBatchProof), MmrError>"},generate_proof:{description:"Generate MMR proof for a leaf under given index.",params:[{name:"leafIndex",type:"MmrLeafIndex"}],type:"Result<(MmrEncodableOpaqueLeaf, MmrProof), MmrError>"},mmr_root:{description:"Return the on-chain MMR root hash.",params:[],type:"Result"},verify_batch_proof:{description:"Verify MMR proof against on-chain MMR for a batch of leaves.",params:[{name:"leaves",type:"Vec"},{name:"proof",type:"MmrBatchProof"}],type:"Result<(), MmrError>"},verify_batch_proof_stateless:{description:"Verify MMR proof against given root hash or a batch of leaves.",params:[{name:"root",type:"Hash"},{name:"leaves",type:"Vec"},{name:"proof",type:"MmrBatchProof"}],type:"Result<(), MmrError>"},verify_proof:{description:"Verify MMR proof against on-chain MMR.",params:[{name:"leaf",type:"MmrEncodableOpaqueLeaf"},{name:"proof",type:"MmrProof"}],type:"Result<(), MmrError>"},verify_proof_stateless:{description:"Verify MMR proof against given root hash.",params:[{name:"root",type:"Hash"},{name:"leaf",type:"MmrEncodableOpaqueLeaf"},{name:"proof",type:"MmrProof"}],type:"Result<(), MmrError>"}},version:1}]},types:{MmrBatchProof:{leafIndices:"Vec",leafCount:"MmrNodeIndex",items:"Vec"},MmrEncodableOpaqueLeaf:"Bytes",MmrError:{_enum:["InvalidNumericOp","Push","GetRoot","Commit","GenerateProof","Verify","LeafNotFound"," PalletNotIncluded","InvalidLeafIndex","InvalidBestKnownBlock"]},MmrHash:"Hash",MmrLeafBatchProof:{blockHash:"BlockHash",leaves:"Bytes",proof:"Bytes"},MmrLeafIndex:"u64",MmrLeafProof:{blockHash:"BlockHash",leaf:"Bytes",proof:"Bytes"},MmrNodeIndex:"u64",MmrProof:{leafIndex:"MmrLeafIndex",leafCount:"MmrNodeIndex",items:"Vec"}}},hl={rpc:{},runtime:{NftsApi:[{methods:{attribute:{description:"An attribute",params:[{name:"collection",type:"NftCollectionId"},{name:"item",type:"NftItemId"},{name:"key",type:"Bytes"}],type:"Option"},collection_attribute:{description:"A collection attribute",params:[{name:"collection",type:"NftCollectionId"},{name:"key",type:"Bytes"}],type:"Option"},collection_owner:{description:"A collection owner",params:[{name:"collection",type:"NftCollectionId"}],type:"Option"},custom_attribute:{description:"A custom attribute",params:[{name:"account",type:"AccountId"},{name:"collection",type:"NftCollectionId"},{name:"item",type:"NftItemId"},{name:"key",type:"Bytes"}],type:"Option"},owner:{description:"Collection owner",params:[{name:"collection",type:"NftCollectionId"},{name:"item",type:"NftItemId"}],type:"Option"},system_attribute:{description:"System attribute",params:[{name:"collection",type:"NftCollectionId"},{name:"item",type:"NftItemId"},{name:"key",type:"Bytes"}],type:"Option"}},version:1}]},types:{NftCollectionId:"u32",NftItemId:"u32"}},bl={rpc:{},runtime:{NominationPoolsApi:[{methods:{balance_to_points:{description:"Returns the equivalent points of `new_funds` for a given pool.",params:[{name:"poolId",type:"NpPoolId"},{name:"newFunds",type:"Balance"}],type:"Balance"},pending_rewards:{description:"Returns the pending rewards for the given member.",params:[{name:"member",type:"AccountId"}],type:"Balance"},points_to_balance:{description:"Returns the equivalent balance of `points` for a given pool.",params:[{name:"poolId",type:"NpPoolId"},{name:"points",type:"Balance"}],type:"Balance"}},version:1}]},types:{NpApiError:{_enum:["MemberNotFound","OverflowInPendingRewards"]},NpPoolId:"u32"}},ml={rpc:{},types:{DeferredOffenceOf:"(Vec, Vec, SessionIndex)",Kind:"[u8; 16]",OffenceDetails:{offender:"Offender",reporters:"Vec"},Offender:"IdentificationTuple",OpaqueTimeSlot:"Bytes",ReportIdOf:"Hash",Reporter:"AccountId"}},yl={rpc:{},runtime:{DifficultyApi:[{methods:{difficulty:{description:"Return the target difficulty of the next block.",params:[],type:"Raw"}},version:1}],TimestampApi:[{methods:{timestamp:{description:"API necessary for timestamp-based difficulty adjustment algorithms.",params:[],type:"Moment"}},version:1}]},types:{}},xl={rpc:{},types:{ProxyDefinition:{delegate:"AccountId",proxyType:"ProxyType",delay:"BlockNumber"},ProxyType:{_enum:["Any","NonTransfer","Governance","Staking"]},ProxyAnnouncement:{real:"AccountId",callHash:"Hash",height:"BlockNumber"}}},gl={rpc:{},types:{ActiveRecovery:{created:"BlockNumber",deposit:"Balance",friends:"Vec"},RecoveryConfig:{delayPeriod:"BlockNumber",deposit:"Balance",friends:"Vec",threshold:"u16"}}},vl={rpc:{},types:{Period:"(BlockNumber, u32)",Priority:"u8",SchedulePeriod:"Period",SchedulePriority:"Priority",Scheduled:{maybeId:"Option",priority:"SchedulePriority",call:"Call",maybePeriodic:"Option",origin:"PalletsOrigin"},ScheduledTo254:{maybeId:"Option",priority:"SchedulePriority",call:"Call",maybePeriodic:"Option"},TaskAddress:"(BlockNumber, u32)"}},wl={rpc:{},runtime:{SessionKeys:[{methods:{decode_session_keys:{description:"Decode the given public session keys.",params:[{name:"encoded",type:"Bytes"}],type:"Option>"},generate_session_keys:{description:"Generate a set of session keys with optionally using the given seed.",params:[{name:"seed",type:"Option"}],type:"Bytes"}},version:1}]},types:{BeefyKey:"[u8; 33]",Keys:"SessionKeys4",SessionKeys1:"(AccountId)",SessionKeys2:"(AccountId, AccountId)",SessionKeys3:"(AccountId, AccountId, AccountId)",SessionKeys4:"(AccountId, AccountId, AccountId, AccountId)",SessionKeys5:"(AccountId, AccountId, AccountId, AccountId, AccountId)",SessionKeys6:"(AccountId, AccountId, AccountId, AccountId, AccountId, AccountId)",SessionKeys6B:"(AccountId, AccountId, AccountId, AccountId, AccountId, BeefyKey)",SessionKeys7:"(AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId)",SessionKeys7B:"(AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, BeefyKey)",SessionKeys8:"(AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId)",SessionKeys8B:"(AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, BeefyKey)",SessionKeys9:"(AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId)",SessionKeys9B:"(AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, BeefyKey)",SessionKeys10:"(AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId)",SessionKeys10B:"(AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, BeefyKey)",FullIdentification:"Exposure",IdentificationTuple:"(ValidatorId, FullIdentification)",MembershipProof:{session:"SessionIndex",trieNodes:"Vec",validatorCount:"ValidatorCount"},SessionIndex:"u32",ValidatorCount:"u32"}},Vl={rpc:{},types:{Bid:{who:"AccountId",kind:"BidKind",value:"Balance"},BidKind:{_enum:{Deposit:"Balance",Vouch:"(AccountId, Balance)"}},SocietyJudgement:{_enum:["Rebid","Reject","Approve"]},SocietyVote:{_enum:["Skeptic","Reject","Approve"]},StrikeCount:"u32",VouchingStatus:{_enum:["Vouching","Banned"]}}},Tl={rpc:{},runtime:{StakingApi:[{methods:{nominations_quota:{description:"Returns the nominations quota for a nominator with a given balance.",params:[{name:"balance",type:"Balance"}],type:"u32"}},version:1}]},types:{Points:"u32",EraPoints:{total:"Points",individual:"Vec"},CompactAssignments:"CompactAssignmentsWith16",CompactAssignmentsWith16:{votes1:"Vec<(NominatorIndexCompact, ValidatorIndexCompact)>",votes2:"Vec<(NominatorIndexCompact, CompactScoreCompact, ValidatorIndexCompact)>",votes3:"Vec<(NominatorIndexCompact, [CompactScoreCompact; 2], ValidatorIndexCompact)>",votes4:"Vec<(NominatorIndexCompact, [CompactScoreCompact; 3], ValidatorIndexCompact)>",votes5:"Vec<(NominatorIndexCompact, [CompactScoreCompact; 4], ValidatorIndexCompact)>",votes6:"Vec<(NominatorIndexCompact, [CompactScoreCompact; 5], ValidatorIndexCompact)>",votes7:"Vec<(NominatorIndexCompact, [CompactScoreCompact; 6], ValidatorIndexCompact)>",votes8:"Vec<(NominatorIndexCompact, [CompactScoreCompact; 7], ValidatorIndexCompact)>",votes9:"Vec<(NominatorIndexCompact, [CompactScoreCompact; 8], ValidatorIndexCompact)>",votes10:"Vec<(NominatorIndexCompact, [CompactScoreCompact; 9], ValidatorIndexCompact)>",votes11:"Vec<(NominatorIndexCompact, [CompactScoreCompact; 10], ValidatorIndexCompact)>",votes12:"Vec<(NominatorIndexCompact, [CompactScoreCompact; 11], ValidatorIndexCompact)>",votes13:"Vec<(NominatorIndexCompact, [CompactScoreCompact; 12], ValidatorIndexCompact)>",votes14:"Vec<(NominatorIndexCompact, [CompactScoreCompact; 13], ValidatorIndexCompact)>",votes15:"Vec<(NominatorIndexCompact, [CompactScoreCompact; 14], ValidatorIndexCompact)>",votes16:"Vec<(NominatorIndexCompact, [CompactScoreCompact; 15], ValidatorIndexCompact)>"},CompactAssignmentsWith24:{votes1:"Vec<(NominatorIndexCompact, ValidatorIndexCompact)>",votes2:"Vec<(NominatorIndexCompact, CompactScoreCompact, ValidatorIndexCompact)>",votes3:"Vec<(NominatorIndexCompact, [CompactScoreCompact; 2], ValidatorIndexCompact)>",votes4:"Vec<(NominatorIndexCompact, [CompactScoreCompact; 3], ValidatorIndexCompact)>",votes5:"Vec<(NominatorIndexCompact, [CompactScoreCompact; 4], ValidatorIndexCompact)>",votes6:"Vec<(NominatorIndexCompact, [CompactScoreCompact; 5], ValidatorIndexCompact)>",votes7:"Vec<(NominatorIndexCompact, [CompactScoreCompact; 6], ValidatorIndexCompact)>",votes8:"Vec<(NominatorIndexCompact, [CompactScoreCompact; 7], ValidatorIndexCompact)>",votes9:"Vec<(NominatorIndexCompact, [CompactScoreCompact; 8], ValidatorIndexCompact)>",votes10:"Vec<(NominatorIndexCompact, [CompactScoreCompact; 9], ValidatorIndexCompact)>",votes11:"Vec<(NominatorIndexCompact, [CompactScoreCompact; 10], ValidatorIndexCompact)>",votes12:"Vec<(NominatorIndexCompact, [CompactScoreCompact; 11], ValidatorIndexCompact)>",votes13:"Vec<(NominatorIndexCompact, [CompactScoreCompact; 12], ValidatorIndexCompact)>",votes14:"Vec<(NominatorIndexCompact, [CompactScoreCompact; 13], ValidatorIndexCompact)>",votes15:"Vec<(NominatorIndexCompact, [CompactScoreCompact; 14], ValidatorIndexCompact)>",votes16:"Vec<(NominatorIndexCompact, [CompactScoreCompact; 15], ValidatorIndexCompact)>",votes17:"Vec<(NominatorIndexCompact, [CompactScoreCompact; 16], ValidatorIndexCompact)>",votes18:"Vec<(NominatorIndexCompact, [CompactScoreCompact; 17], ValidatorIndexCompact)>",votes19:"Vec<(NominatorIndexCompact, [CompactScoreCompact; 18], ValidatorIndexCompact)>",votes20:"Vec<(NominatorIndexCompact, [CompactScoreCompact; 19], ValidatorIndexCompact)>",votes21:"Vec<(NominatorIndexCompact, [CompactScoreCompact; 20], ValidatorIndexCompact)>",votes22:"Vec<(NominatorIndexCompact, [CompactScoreCompact; 21], ValidatorIndexCompact)>",votes23:"Vec<(NominatorIndexCompact, [CompactScoreCompact; 22], ValidatorIndexCompact)>",votes24:"Vec<(NominatorIndexCompact, [CompactScoreCompact; 23], ValidatorIndexCompact)>"},CompactAssignmentsTo265:"CompactAssignmentsWith16",CompactAssignmentsTo257:{votes1:"Vec<(NominatorIndex, [CompactScore; 0], ValidatorIndex)>",votes2:"Vec<(NominatorIndex, [CompactScore; 1], ValidatorIndex)>",votes3:"Vec<(NominatorIndex, [CompactScore; 2], ValidatorIndex)>",votes4:"Vec<(NominatorIndex, [CompactScore; 3], ValidatorIndex)>",votes5:"Vec<(NominatorIndex, [CompactScore; 4], ValidatorIndex)>",votes6:"Vec<(NominatorIndex, [CompactScore; 5], ValidatorIndex)>",votes7:"Vec<(NominatorIndex, [CompactScore; 6], ValidatorIndex)>",votes8:"Vec<(NominatorIndex, [CompactScore; 7], ValidatorIndex)>",votes9:"Vec<(NominatorIndex, [CompactScore; 8], ValidatorIndex)>",votes10:"Vec<(NominatorIndex, [CompactScore; 9], ValidatorIndex)>",votes11:"Vec<(NominatorIndex, [CompactScore; 10], ValidatorIndex)>",votes12:"Vec<(NominatorIndex, [CompactScore; 11], ValidatorIndex)>",votes13:"Vec<(NominatorIndex, [CompactScore; 12], ValidatorIndex)>",votes14:"Vec<(NominatorIndex, [CompactScore; 13], ValidatorIndex)>",votes15:"Vec<(NominatorIndex, [CompactScore; 14], ValidatorIndex)>",votes16:"Vec<(NominatorIndex, [CompactScore; 15], ValidatorIndex)>"},CompactScore:"(ValidatorIndex, OffchainAccuracy)",CompactScoreCompact:"(ValidatorIndexCompact, OffchainAccuracyCompact)",ElectionCompute:{_enum:["OnChain","Signed","Unsigned"]},ElectionPhase:{_enum:{Off:null,Signed:null,Unsigned:"(bool, BlockNumber)",Emergency:null}},ElectionResult:{compute:"ElectionCompute",slotStake:"Balance",electedStashes:"Vec",exposures:"Vec<(AccountId, Exposure)>"},ElectionScore:"[u128; 3]",ElectionSize:{validators:"Compact",nominators:"Compact"},ElectionStatus:{_enum:{Close:"Null",Open:"BlockNumber"}},ExtendedBalance:"u128",RawSolution:"RawSolutionWith16",RawSolutionWith16:{compact:"CompactAssignmentsWith16",score:"ElectionScore",round:"u32"},RawSolutionWith24:{compact:"CompactAssignmentsWith24",score:"ElectionScore",round:"u32"},RawSolutionTo265:"RawSolutionWith16",ReadySolution:{supports:"SolutionSupports",score:"ElectionScore",compute:"ElectionCompute"},RoundSnapshot:{voters:"Vec<(AccountId, VoteWeight, Vec)>",targets:"Vec"},SeatHolder:{who:"AccountId",stake:"Balance",deposit:"Balance"},SignedSubmission:{_fallback:"SignedSubmissionTo276",who:"AccountId",deposit:"Balance",solution:"RawSolution",reward:"Balance"},SignedSubmissionTo276:{who:"AccountId",deposit:"Balance",solution:"RawSolution"},SignedSubmissionOf:"SignedSubmission",SolutionOrSnapshotSize:{voters:"Compact",targets:"Compact"},SolutionSupport:{total:"ExtendedBalance",voters:"Vec<(AccountId, ExtendedBalance)>"},SolutionSupports:"Vec<(AccountId, SolutionSupport)>",Supports:"SolutionSupports",SubmissionIndicesOf:"BTreeMap",Voter:{votes:"Vec",stake:"Balance",deposit:"Balance"},VoteWeight:"u64",ActiveEraInfo:{index:"EraIndex",start:"Option"},EraIndex:"u32",EraRewardPoints:{total:"RewardPoint",individual:"BTreeMap"},EraRewards:{total:"u32",rewards:"Vec"},Exposure:{total:"Compact",own:"Compact",others:"Vec"},Forcing:{_enum:["NotForcing","ForceNew","ForceNone","ForceAlways"]},IndividualExposure:{who:"AccountId",value:"Compact"},KeyType:"AccountId",MomentOf:"Moment",Nominations:{targets:"Vec",submittedIn:"EraIndex",suppressed:"bool"},NominatorIndex:"u32",NominatorIndexCompact:"Compact",OffchainAccuracy:"PerU16",OffchainAccuracyCompact:"Compact",PhragmenScore:"[u128; 3]",Points:"u32",RewardDestination:{_enum:{Staked:"Null",Stash:"Null",Controller:"Null",Account:"AccountId",None:"Null"}},RewardPoint:"u32",SlashJournalEntry:{who:"AccountId",amount:"Balance",ownSlash:"Balance"},SlashingSpansTo204:{spanIndex:"SpanIndex",lastStart:"EraIndex",prior:"Vec"},SlashingSpans:{spanIndex:"SpanIndex",lastStart:"EraIndex",lastNonzeroSlash:"EraIndex",prior:"Vec"},SpanIndex:"u32",SpanRecord:{slashed:"Balance",paidOut:"Balance"},StakingLedgerTo223:{stash:"AccountId",total:"Compact",active:"Compact",unlocking:"Vec"},StakingLedgerTo240:{_fallback:"StakingLedgerTo223",stash:"AccountId",total:"Compact",active:"Compact",unlocking:"Vec",lastReward:"Option"},StakingLedger:{stash:"AccountId",total:"Compact",active:"Compact",unlocking:"Vec",claimedRewards:"Vec"},UnappliedSlashOther:"(AccountId, Balance)",UnappliedSlash:{validator:"AccountId",own:"Balance",others:"Vec",reporters:"Vec",payout:"Balance"},UnlockChunk:{value:"Compact",era:"Compact"},ValidatorIndex:"u16",ValidatorIndexCompact:"Compact",ValidatorPrefs:"ValidatorPrefsWithBlocked",ValidatorPrefsWithCommission:{commission:"Compact"},ValidatorPrefsWithBlocked:{commission:"Compact",blocked:"bool"},ValidatorPrefsTo196:{validatorPayment:"Compact"},ValidatorPrefsTo145:{unstakeThreshold:"Compact",validatorPayment:"Compact"}}},Sl={rpc:{},runtime:{ValidateStatement:[{methods:{valdate_statement:{description:"Validate the statement.",params:[{name:"source",type:"StatementStoreStatementSource"},{name:"statement",type:"SpStatementStoreStatement"}],type:"Result"}},version:1}]},types:{StatementStoreStatementSource:{_enum:["Chain","Network","Local"]},StatementStoreValidStatement:{maxCount:"u32",maxSize:"u32"},StatementStoreInvalidStatement:{_enum:["BadProof","NoProof","InternalError"]}}},kl={rpc:{},types:{WeightToFeeCoefficient:{coeffInteger:"Balance",coeffFrac:"Perbill",negative:"bool",degree:"u8"}}},_l={rpc:{genSyncSpec:{description:"Returns the json-serialized chainspec running the node, with a sync state.",endpoint:"sync_state_genSyncSpec",params:[{name:"raw",type:"bool"}],type:"Json"}},types:{}},Pl={rpc:{accountNextIndex:{alias:["account_nextIndex"],description:"Retrieves the next accountIndex as available on the node",params:[{name:"accountId",type:"AccountId"}],type:"Index"},addLogFilter:{description:"Adds the supplied directives to the current log filter",isUnsafe:!0,params:[{name:"directives",type:"Text"}],type:"Null"},addReservedPeer:{description:"Adds a reserved peer",isUnsafe:!0,params:[{name:"peer",type:"Text"}],type:"Text"},chain:{description:"Retrieves the chain",params:[],type:"Text"},chainType:{description:"Retrieves the chain type",params:[],type:"ChainType"},dryRun:{alias:["system_dryRunAt"],description:"Dry run an extrinsic at a given block",isUnsafe:!0,params:[{name:"extrinsic",type:"Bytes"},{isHistoric:!0,isOptional:!0,name:"at",type:"BlockHash"}],type:"ApplyExtrinsicResult"},health:{description:"Return health status of the node",noErrorLog:!0,params:[],type:"Health"},localListenAddresses:{description:"The addresses include a trailing /p2p/ with the local PeerId, and are thus suitable to be passed to addReservedPeer or as a bootnode address for example",params:[],type:"Vec"},localPeerId:{description:"Returns the base58-encoded PeerId of the node",params:[],type:"Text"},name:{description:"Retrieves the node name",params:[],type:"Text"},networkState:{alias:["system_unstable_networkState"],description:"Returns current state of the network",isUnsafe:!0,params:[],type:"NetworkState"},nodeRoles:{description:"Returns the roles the node is running as",params:[],type:"Vec"},peers:{description:"Returns the currently connected peers",isUnsafe:!0,params:[],type:"Vec"},properties:{description:"Get a custom set of properties as a JSON object, defined in the chain spec",params:[],type:"ChainProperties"},removeReservedPeer:{description:"Remove a reserved peer",isUnsafe:!0,params:[{name:"peerId",type:"Text"}],type:"Text"},reservedPeers:{description:"Returns the list of reserved peers",params:[],type:"Vec"},resetLogFilter:{description:"Resets the log filter to Substrate defaults",isUnsafe:!0,params:[],type:"Null"},syncState:{description:"Returns the state of the syncing of the node",params:[],type:"SyncState"},version:{description:"Retrieves the version of the node",params:[],type:"Text"}},runtime:{AccountNonceApi:[{methods:{account_nonce:{description:"The API to query account nonce (aka transaction index)",params:[{name:"accountId",type:"AccountId"}],type:"Index"}},version:1}]},types:{AccountInfo:"AccountInfoWithTripleRefCount",AccountInfoWithRefCountU8:{nonce:"Index",refcount:"u8",data:"AccountData"},AccountInfoWithRefCount:{_fallback:"AccountInfoWithRefCountU8",nonce:"Index",refcount:"RefCount",data:"AccountData"},AccountInfoWithDualRefCount:{_fallback:"AccountInfoWithRefCount",nonce:"Index",consumers:"RefCount",providers:"RefCount",data:"AccountData"},AccountInfoWithProviders:"AccountInfoWithDualRefCount",AccountInfoWithTripleRefCount:{_fallback:"AccountInfoWithDualRefCount",nonce:"Index",consumers:"RefCount",providers:"RefCount",sufficients:"RefCount",data:"AccountData"},ApplyExtrinsicResult:"Result",ApplyExtrinsicResultPre6:"Result",ArithmeticError:{_enum:["Underflow","Overflow","DivisionByZero"]},BlockLength:{max:"PerDispatchClassU32"},BlockWeights:{baseBlock:"Weight",maxBlock:"Weight",perClass:"PerDispatchClassWeightsPerClass"},ChainProperties:"GenericChainProperties",ChainType:{_enum:{Development:"Null",Local:"Null",Live:"Null",Custom:"Text"}},ConsumedWeight:"PerDispatchClassWeight",DigestOf:"Digest",DispatchClass:{_enum:["Normal","Operational","Mandatory"]},DispatchError:{_enum:{Other:"Null",CannotLookup:"Null",BadOrigin:"Null",Module:"DispatchErrorModule",ConsumerRemaining:"Null",NoProviders:"Null",TooManyConsumers:"Null",Token:"TokenError",Arithmetic:"ArithmeticError",Transactional:"TransactionalError",Exhausted:"Null",Corruption:"Null",Unavailable:"Null"}},DispatchErrorPre6:{_enum:{Other:"Null",CannotLookup:"Null",BadOrigin:"Null",Module:"DispatchErrorModulePre6",ConsumerRemaining:"Null",NoProviders:"Null",TooManyConsumers:"Null",Token:"TokenError",Arithmetic:"ArithmeticError",Transactional:"TransactionalError"}},DispatchErrorPre6First:{_enum:{Other:"Null",CannotLookup:"Null",BadOrigin:"Null",Module:"DispatchErrorModulePre6",ConsumerRemaining:"Null",NoProviders:"Null",Token:"TokenError",Arithmetic:"ArithmeticError",Transactional:"TransactionalError"}},DispatchErrorModuleU8:{index:"u8",error:"u8"},DispatchErrorModuleU8a:{index:"u8",error:"[u8; 4]"},DispatchErrorModule:"DispatchErrorModuleU8a",DispatchErrorModulePre6:"DispatchErrorModuleU8",DispatchErrorTo198:{module:"Option",error:"u8"},DispatchInfo:{weight:"Weight",class:"DispatchClass",paysFee:"Pays"},DispatchInfoTo190:{weight:"Weight",class:"DispatchClass"},DispatchInfoTo244:{weight:"Weight",class:"DispatchClass",paysFee:"bool"},DispatchOutcome:"Result<(), DispatchError>",DispatchOutcomePre6:"Result<(), DispatchErrorPre6>",DispatchResult:"Result<(), DispatchError>",DispatchResultOf:"DispatchResult",DispatchResultTo198:"Result<(), Text>",Event:"GenericEvent",EventId:"[u8; 2]",EventIndex:"u32",EventRecord:{phase:"Phase",event:"Event",topics:"Vec"},Health:{peers:"u64",isSyncing:"bool",shouldHavePeers:"bool"},InvalidTransaction:{_enum:{Call:"Null",Payment:"Null",Future:"Null",Stale:"Null",BadProof:"Null",AncientBirthBlock:"Null",ExhaustsResources:"Null",Custom:"u8",BadMandatory:"Null",MandatoryDispatch:"Null",BadSigner:"Null"}},Key:"Bytes",LastRuntimeUpgradeInfo:{specVersion:"Compact",specName:"Text"},NetworkState:{peerId:"Text",listenedAddresses:"Vec",externalAddresses:"Vec",connectedPeers:"HashMap",notConnectedPeers:"HashMap",averageDownloadPerSec:"u64",averageUploadPerSec:"u64",peerset:"NetworkStatePeerset"},NetworkStatePeerset:{messageQueue:"u64",nodes:"HashMap"},NetworkStatePeersetInfo:{connected:"bool",reputation:"i32"},NodeRole:{_enum:{Full:"Null",LightClient:"Null",Authority:"Null",UnknownRole:"u8"}},NotConnectedPeer:{knownAddresses:"Vec",latestPingTime:"Option",versionString:"Option"},Peer:{enabled:"bool",endpoint:"PeerEndpoint",knownAddresses:"Vec",latestPingTime:"PeerPing",open:"bool",versionString:"Text"},PeerEndpoint:{listening:"PeerEndpointAddr"},PeerEndpointAddr:{_alias:{localAddr:"local_addr",sendBackAddr:"send_back_addr"},localAddr:"Text",sendBackAddr:"Text"},PeerPing:{nanos:"u64",secs:"u64"},PeerInfo:{peerId:"Text",roles:"Text",protocolVersion:"u32",bestHash:"Hash",bestNumber:"BlockNumber"},PerDispatchClassU32:{normal:"u32",operational:"u32",mandatory:"u32"},PerDispatchClassWeight:{normal:"Weight",operational:"Weight",mandatory:"Weight"},PerDispatchClassWeightsPerClass:{normal:"WeightPerClass",operational:"WeightPerClass",mandatory:"WeightPerClass"},Phase:{_enum:{ApplyExtrinsic:"u32",Finalization:"Null",Initialization:"Null"}},RawOrigin:{_enum:{Root:"Null",Signed:"AccountId",None:"Null"}},RefCount:"u32",RefCountTo259:"u8",SyncState:{startingBlock:"BlockNumber",currentBlock:"BlockNumber",highestBlock:"Option"},SystemOrigin:"RawOrigin",TokenError:{_enum:["NoFunds","WouldDie","BelowMinimum","CannotCreate","UnknownAsset","Frozen","Unsupported","Underflow","Overflow"]},TransactionValidityError:{_enum:{Invalid:"InvalidTransaction",Unknown:"UnknownTransaction"}},TransactionalError:{_enum:["LimitReached","NoLayer"]},UnknownTransaction:{_enum:{CannotLookup:"Null",NoUnsignedValidator:"Null",Custom:"u8"}},WeightPerClass:{baseExtrinsic:"Weight",maxExtrinsic:"Option",maxTotal:"Option",reserved:"Option"}}},Ml={rpc:{},types:{Bounty:{proposer:"AccountId",value:"Balance",fee:"Balance",curatorDeposit:"Balance",bond:"Balance",status:"BountyStatus"},BountyIndex:"u32",BountyStatus:{_enum:{Proposed:"Null",Approved:"Null",Funded:"Null",CuratorProposed:"BountyStatusCuratorProposed",Active:"BountyStatusActive",PendingPayout:"BountyStatusPendingPayout"}},BountyStatusActive:{curator:"AccountId",updateDue:"BlockNumber"},BountyStatusCuratorProposed:{curator:"AccountId"},BountyStatusPendingPayout:{curator:"AccountId",beneficiary:"AccountId",unlockAt:"BlockNumber"},OpenTip:{reason:"Hash",who:"AccountId",finder:"AccountId",deposit:"Balance",closes:"Option",tips:"Vec",findersFee:"bool"},OpenTipTo225:{reason:"Hash",who:"AccountId",finder:"Option",closes:"Option",tips:"Vec"},OpenTipFinderTo225:"(AccountId, Balance)",OpenTipTip:"(AccountId, Balance)",TreasuryProposal:{proposer:"AccountId",value:"Balance",beneficiary:"AccountId",bond:"Balance"}}},Il={rpc:{},types:{Multiplier:"Fixed128"}},Nl={rpc:{},runtime:{TaggedTransactionQueue:[{methods:{validate_transaction:{description:"Validate the transaction.",params:[{name:"source",type:"TransactionSource"},{name:"tx",type:"Extrinsic"},{name:"blockHash",type:"BlockHash"}],type:"TransactionValidity"}},version:3},{methods:{validate_transaction:{description:"Validate the transaction.",params:[{name:"source",type:"TransactionSource"},{name:"tx",type:"Extrinsic"}],type:"TransactionValidity"}},version:2},{methods:{validate_transaction:{description:"Validate the transaction.",params:[{name:"tx",type:"Extrinsic"}],type:"TransactionValidity"}},version:1}]},types:{TransactionSource:{_enum:["InBlock","Local","External"]},TransactionValidity:"Result",ValidTransaction:{priority:"TransactionPriority",requires:"Vec",provides:"Vec",longevity:"TransactionLongevity",propagate:"bool"}}},El={rpc:{},types:{ClassId:"u32",InstanceId:"u32",DepositBalance:"Balance",DepositBalanceOf:"Balance",ClassDetails:{owner:"AccountId",issuer:"AccountId",admin:"AccountId",freezer:"AccountId",totalDeposit:"DepositBalance",freeHolding:"bool",instances:"u32",instanceMetadatas:"u32",attributes:"u32",isFrozen:"bool"},DestroyWitness:{instances:"Compact",instanceMetadatas:"Compact",attributes:"Compact"},InstanceDetails:{owner:"AccountId",approved:"Option",isFrozen:"bool",deposit:"DepositBalance"},ClassMetadata:{deposit:"DepositBalance",data:"Vec",isFrozen:"bool"},InstanceMetadata:{deposit:"DepositBalance",data:"Vec",isFrozen:"bool"}}},Ol={rpc:{},types:{Multisig:{when:"Timepoint",deposit:"Balance",depositor:"AccountId",approvals:"Vec"},Timepoint:{height:"BlockNumber",index:"u32"}}},Al={rpc:{},types:{VestingInfo:{locked:"Balance",perBlock:"Balance",startingBlock:"BlockNumber"}}},Cl={rpc:{},types:{BlockAttestations:{receipt:"CandidateReceipt",valid:"Vec",invalid:"Vec"},IncludedBlocks:{actualNumber:"BlockNumber",session:"SessionIndex",randomSeed:"H256",activeParachains:"Vec",paraBlocks:"Vec"},MoreAttestations:{}}},Hl={rpc:{},types:{BridgedBlockHash:"H256",BridgedBlockNumber:"BlockNumber",BridgedHeader:"Header",BridgeMessageId:"(LaneId, MessageNonce)",CallOrigin:{_enum:{SourceRoot:"Null",TargetAccount:"(AccountId, MultiSigner, MultiSignature)",SourceAccount:"AccountId"}},ChainId:"[u8; 4]",DeliveredMessages:{begin:"MessageNonce",end:"MessageNonce",dispatchResults:"BitVec"},DispatchFeePayment:{_enum:["AtSourceChain","AtTargetChain"]},InboundLaneData:{relayers:"Vec",lastConfirmedNonce:"MessageNonce"},InboundRelayer:"AccountId",InitializationData:{header:"Header",authorityList:"AuthorityList",setId:"SetId",isHalted:"bool"},LaneId:"[u8; 4]",MessageData:{payload:"Bytes",fee:"Balance"},MessagesDeliveryProofOf:{bridgedHeaderHash:"BlockHash",storageProof:"Vec",lane:"LaneId"},MessageKey:{laneId:"LaneId",nonce:"MessageNonce"},MessageNonce:"u64",MessagesProofOf:{bridgedHeaderHash:"BridgedBlockHash",storageProof:"Vec",lane:"LaneId",noncesStart:"MessageNonce",noncesEnd:"MessageNonce"},OperatingMode:{_enum:["Normal","RejectingOutboundMessages","Halted"]},OutboundLaneData:{oldestUnprunedNonce:"MessageNonce",latestReceivedNonce:"MessageNonce",latestGeneratedNonce:"MessageNonce"},OutboundMessageFee:"Balance",OutboundPayload:{specVersion:"u32",weight:"Weight",origin:"CallOrigin",dispatchFeePayment:"DispatchFeePayment",call:"Bytes"},Parameter:"Null",RelayerId:"AccountId",UnrewardedRelayer:{relayer:"RelayerId",messages:"DeliveredMessages"},UnrewardedRelayersState:{unrewardedRelayer_Entries:"MessageNonce",messagesInOldestEntry:"MessageNonce",totalMessages:"MessageNonce"}}},Rl={rpc:{},types:{StatementKind:{_enum:["Regular","Saft"]}}},Bl={rpc:{},types:{FundIndex:"u32",LastContribution:{_enum:{Never:"Null",PreEnding:"u32",Ending:"BlockNumber"}},FundInfo:{depositor:"AccountId",verifier:"Option",deposit:"Balance",raised:"Balance",end:"BlockNumber",cap:"Balance",lastContribution:"LastContribution",firstPeriod:"LeasePeriod",lastPeriod:"LeasePeriod",trieIndex:"TrieIndex"},TrieIndex:"u32"}},Ll={rpc:{},runtime:{AuraUnincludedSegmentApi:[{methods:{can_build_upon:{description:"Whether it is legal to extend the chain",params:[{name:"includedHash",type:"BlockHash"},{name:"slot",type:"Slot"}],type:"bool"}},version:1}],CollectCollationInfo:[{methods:{collect_collation_info:{description:"Collect information about a collation.",params:[{name:"header",type:"Header"}],type:"CollationInfo"}},version:2},{methods:{collect_collation_info:{description:"Collect information about a collation.",params:[],type:"CollationInfoV1"}},version:1}]},types:{CollationInfo:{upwardMessages:"Vec",horizontalMessages:"Vec",newValidationCode:"Option",processedDownwardMessages:"u32",hrmpWatermark:"RelayBlockNumber",headData:"HeadData"},CollationInfoV1:{upwardMessages:"Vec",horizontalMessages:"Vec",newValidationCode:"Option",processedDownwardMessages:"u32",hrmpWatermark:"RelayBlockNumber"},ConfigData:{maxIndividual:"Weight"},MessageId:"[u8; 32]",OverweightIndex:"u64",PageCounter:"u32",PageIndexData:{beginUsed:"PageCounter",endUsed:"PageCounter",overweightCount:"OverweightIndex"}}},zl={methods:{best_finalized:{description:"Returns number and hash of the best finalized header known to the bridge module.",params:[],type:"(BlockNumber, Hash)"}},version:1},Ul={rpc:{},runtime:{KusamaFinalityApi:[zl],PolkadotFinalityApi:[zl],RococoFinalityApi:[zl],WestendFinalityApi:[zl]},types:{}},Dl={assumed_validation_data:{description:"Returns the persisted validation data for the given `ParaId` along with the corresponding validation code hash.",params:[{name:"paraId",type:"ParaId"},{name:"hash",type:"Hash"}],type:"Option<(PersistedValidationData, ValidationCodeHash)>"},availability_cores:{description:"Yields information on all availability cores as relevant to the child block.",params:[],type:"Vec"},candidate_events:{description:"Get a vector of events concerning candidates that occurred within a block.",params:[],type:"Vec"},candidate_pending_availability:{description:"Get the receipt of a candidate pending availability.",params:[{name:"paraId",type:"ParaId"}],type:"Option"},check_validation_outputs:{description:"Checks if the given validation outputs pass the acceptance criteria.",params:[{name:"paraId",type:"ParaId"},{name:"outputs",type:"CandidateCommitments"}],type:"bool"},dmq_contents:{description:"Get all the pending inbound messages in the downward message queue for a para.",params:[{name:"paraId",type:"ParaId"}],type:"Vec"},inbound_hrmp_channels_contents:{description:"Get the contents of all channels addressed to the given recipient.",params:[{name:"paraId",type:"ParaId"}],type:"Vec"},on_chain_votes:{description:"Scrape dispute relevant from on-chain, backing votes and resolved disputes.",params:[],type:"Option"},persisted_validation_data:{description:"Yields the persisted validation data for the given `ParaId` along with an assumption that should be used if the para currently occupies a core.",params:[{name:"paraId",type:"ParaId"},{name:"assumption",type:"OccupiedCoreAssumption"}],type:"Option"},session_index_for_child:{description:"Returns the session index expected at a child of the block.",params:[],type:"SessionIndex"},validation_code:{description:"Fetch the validation code used by a para, making the given `OccupiedCoreAssumption`.",params:[{name:"paraId",type:"ParaId"},{name:"assumption",type:"OccupiedCoreAssumption"}],type:"Option"},validation_code_by_hash:{description:"Get the validation code from its hash.",params:[{name:"hash",type:"ValidationCodeHash"}],type:"Option"},validator_groups:{description:"Returns the validator groups and rotation info localized based on the hypothetical child of a block whose state this is invoked on",params:[],type:"(Vec>, GroupRotationInfo)"},validators:{description:"Get the current validators.",params:[],type:"Vec"}},ql={pvfs_require_precheck:{description:"Returns code hashes of PVFs that require pre-checking by validators in the active set.",params:[],type:"Vec"},session_info:{description:"Get the session info for the given session, if stored.",params:[{name:"index",type:"SessionIndex"}],type:"Option"},submit_pvf_check_statement:{description:"Submits a PVF pre-checking statement into the transaction pool.",params:[{name:"stmt",type:"PvfCheckStatement"},{name:"signature",type:"ValidatorSignature"}],type:"Null"},validation_code_hash:{description:"Fetch the hash of the validation code used by a para, making the given `OccupiedCoreAssumption`.",params:[{name:"paraId",type:"ParaId"},{name:"assumption",type:"OccupiedCoreAssumption"}],type:"Option"}},jl={disputes:{description:"Returns all onchain disputes.",params:[],type:"Vec<(SessionIndex, CandidateHash, DisputeState)>"}},Fl={session_executor_params:{description:"Returns execution parameters for the session.",params:[{name:"sessionIndex",type:"SessionIndex"}],type:"Option"}},Xl={key_ownership_proof:{description:"Returns a merkle proof of a validator session key",params:[{name:"validatorId",type:"ValidatorId"}],type:"Option"},submit_report_dispute_lost:{description:"Submit an unsigned extrinsic to slash validators who lost a dispute about a candidate of a past session",params:[{name:"disputeProof",type:"DisputeProof"},{name:"keyOwnershipProof",type:"OpaqueKeyOwnershipProof"}],type:"Option"},unapplied_slashes:{description:"Returns a list of validators that lost a past session dispute and need to be slashed",params:[],type:"Vec<(SessionIndex, CandidateHash, PendingSlashes)>"}},Wl={minimum_backing_votes:{description:"Get the minimum number of backing votes for a parachain candidate. This is a staging method! Do not use on production runtimes!",params:[],type:"u32"}},Zl={async_backing_params:{description:"Returns candidate's acceptance limitations for asynchronous backing for a relay parent",params:[],type:"AsyncBackingParams"},para_backing_state:{description:"Returns the state of parachain backing for a given para",params:[{name:"paraId",type:"ParaId"}],type:"Option"}},Gl={disabled_validators:{description:"Returns a list of all disabled validators at the given block",params:[],type:"ValidatorIndex"}},Kl={node_features:{description:"Get node features. This is a staging method! Do not use on production runtimes!",params:[],type:"NodeFeatures"}},Jl={approval_voting_params:{description:"Approval voting configuration parameters",params:[],type:"ApprovalVotingParams"}},Yl={_enum:["ZeroZero","ZeroOne","ZeroTwo","ZeroThree","OneOne","OneTwo","OneThree","TwoTwo","TwoThree","ThreeThree"]},Ql={_enum:["ZeroZero","ZeroOne","ZeroTwo","ZeroThree","ZeroFour","ZeroFive","ZeroSix","ZeroSeven","OneOne","OneTwo","OneThree","OneFour","OneFive","OneSix","OneSeven","TwoTwo","TwoThree","TwoFour","TwoFive","TwoSix","TwoSeven","ThreeThree","ThreeFour","ThreeFive","ThreeSix","ThreeSeven","FourFour","FourFive","FourSix","FourSeven","FiveFive","FiveSix","FiveSeven","SixSix","SixSeven","SevenSeven"]},$l={rpc:{},runtime:{ParachainHost:[{methods:{...Dl,...ql,...jl,...Fl,...Xl,...Wl,...Zl,...Gl,...Kl,...Jl,claim_queue:{description:"Claim queue",params:[],type:"BTreeMap>"}},version:11},{methods:{...Dl,...ql,...jl,...Fl,...Xl,...Wl,...Zl,...Gl,...Kl,...Jl},version:10},{methods:{...Dl,...ql,...jl,...Fl,...Xl,...Wl,...Zl,...Gl,...Kl},version:9},{methods:{...Dl,...ql,...jl,...Fl,...Xl,...Wl,...Zl,...Gl},version:8},{methods:{...Dl,...ql,...jl,...Fl,...Xl,...Wl,...Zl},version:7},{methods:{...Dl,...ql,...jl,...Fl,...Xl,...Wl},version:6},{methods:{...Dl,...ql,...jl,...Fl,...Xl},version:5},{methods:{...Dl,...ql,...jl,...Fl},version:4},{methods:{...Dl,...ql,...jl},version:3},{methods:{...Dl,...ql},version:2},{methods:{session_info:{description:"Get the session info for the given session, if stored.",params:[{name:"index",type:"SessionIndex"}],type:"Option"},...Dl},version:1}]},types:{ServiceQuality:{_enum:["Ordered","Fast"]},DisputeLocation:{_enum:["Local","Remote"]},DisputeResult:{_enum:["Valid","Invalid"]},DisputeState:{validatorsFor:"BitVec",validatorsAgainst:"BitVec",start:"BlockNumber",concludedAt:"Option"},DisputeStatement:{_enum:{Valid:"ValidDisputeStatementKind",Invalid:"InvalidDisputeStatementKind"}},DisputeStatementSet:{candidateHash:"CandidateHash",session:"SessionIndex",statements:"Vec<(DisputeStatement, ParaValidatorIndex, ValidatorSignature)>"},ExecutorParam:{_enum:{Phantom:"Null",MaxMemoryPages:"u32",StackLogicalMax:"u32",StackNativeMax:"u32",PrecheckingMaxMemory:"u64",PvfPrepTimeout:"(PvfPrepTimeoutKind, u64)",PvfExecTimeout:"(PvfExecTimeoutKind, u64)"}},ExecutorParamsHash:"Hash",ExecutorParams:"Vec",ExplicitDisputeStatement:{valid:"bool",candidateHash:"CandidateHash",session:"SessionIndex"},InvalidDisputeStatementKind:{_enum:["Explicit"]},MultiDisputeStatementSet:"Vec",PvfExecTimeoutKind:{_enum:["Backing","Approval"]},PvfPrepTimeoutKind:{_enum:["Precheck","Lenient"]},ValidDisputeStatementKind:{_enum:{Explicit:"Null",BackingSeconded:"Hash",BackingValid:"Hash",ApprovalChecking:"Null"}},HrmpChannel:{maxCapacity:"u32",maxTotalSize:"u32",maxMessageSize:"u32",msgCount:"u32",totalSize:"u32",mqcHead:"Option",senderDeposit:"Balance",recipientDeposit:"Balance"},HrmpChannelId:{sender:"u32",receiver:"u32"},HrmpOpenChannelRequest:{confirmed:"bool",age:"SessionIndex",senderDeposit:"Balance",maxMessageSize:"u32",maxCapacity:"u32",maxTotalSize:"u32"},ParachainProposal:{proposer:"AccountId",genesisHead:"HeadData",validators:"Vec",name:"Bytes",balance:"Balance"},RegisteredParachainInfo:{validators:"Vec",proposer:"AccountId"},...{Bidder:{_enum:{New:"NewBidder",Existing:"ParaId"}},IncomingParachain:{_enum:{Unset:"NewBidder",Fixed:"IncomingParachainFixed",Deploy:"IncomingParachainDeploy"}},IncomingParachainDeploy:{code:"ValidationCode",initialHeadData:"HeadData"},IncomingParachainFixed:{codeHash:"Hash",codeSize:"u32",initialHeadData:"HeadData"},NewBidder:{who:"AccountId",sub:"SubId"},SubId:"u32",AuctionIndex:"u32",LeasePeriod:"BlockNumber",LeasePeriodOf:"BlockNumber",SlotRange10:Yl,SlotRange:Ql,WinningData10:`[WinningDataEntry; ${Yl._enum.length}]`,WinningData:`[WinningDataEntry; ${Ql._enum.length}]`,WinningDataEntry:"Option<(AccountId, ParaId, BalanceOf)>",WinnersData10:"Vec",WinnersData:"Vec",WinnersDataTuple10:"(AccountId, ParaId, BalanceOf, SlotRange10)",WinnersDataTuple:"(AccountId, ParaId, BalanceOf, SlotRange)"},AbridgedCandidateReceipt:{parachainIndex:"ParaId",relayParent:"Hash",headData:"HeadData",collator:"CollatorId",signature:"CollatorSignature",povBlockHash:"Hash",commitments:"CandidateCommitments"},AbridgedHostConfiguration:{maxCodeSize:"u32",maxHeadDataSize:"u32",maxUpwardQueueCount:"u32",maxUpwardQueueSize:"u32",maxUpwardMessageSize:"u32",maxUpwardMessageNumPerCandidate:"u32",hrmpMaxMessageNumPerCandidate:"u32",validationUpgradeFrequency:"BlockNumber",validationUpgradeDelay:"BlockNumber"},AbridgedHrmpChannel:{maxCapacity:"u32",maxTotalSize:"u32",maxMessageSize:"u32",msgCount:"u32",totalSize:"u32",mqcHead:"Option"},ApprovalVotingParams:{maxApprovalCoalesceCount:"u32"},AssignmentId:"AccountId",AssignmentKind:{_enum:{Parachain:"Null",Parathread:"(CollatorId, u32)"}},AsyncBackingParams:{maxCandidateDepth:"u32",allowedAncestryLen:"u32"},AttestedCandidate:{candidate:"AbridgedCandidateReceipt",validityVotes:"Vec",validatorIndices:"BitVec"},AuthorityDiscoveryId:"AccountId",AvailabilityBitfield:"BitVec",AvailabilityBitfieldRecord:{bitfield:"AvailabilityBitfield",submittedTt:"BlockNumber"},BackedCandidate:{candidate:"CommittedCandidateReceipt",validityVotes:"Vec",validatorIndices:"BitVec"},BackingState:{constraints:"Constraints",pendingAvailability:"Vec"},BufferedSessionChange:{applyAt:"BlockNumber",validators:"Vec",queued:"Vec",sessionIndex:"SessionIndex"},CandidateCommitments:{upwardMessages:"Vec",horizontalMessages:"Vec",newValidationCode:"Option",headData:"HeadData",processedDownwardMessages:"u32",hrmpWatermark:"BlockNumber"},CandidateDescriptor:{paraId:"ParaId",relayParent:"RelayChainHash",collatorId:"CollatorId",persistedValidationDataHash:"Hash",povHash:"Hash",erasureRoot:"Hash",signature:"CollatorSignature",paraHead:"Hash",validationCodeHash:"ValidationCodeHash"},CandidateEvent:{_enum:{CandidateBacked:"(CandidateReceipt, HeadData, CoreIndex, GroupIndex)",CandidateIncluded:"(CandidateReceipt, HeadData, CoreIndex, GroupIndex)",CandidateTimedOut:"(CandidateReceipt, HeadData, CoreIndex)"}},CandidateHash:"Hash",CandidateInfo:{who:"AccountId",deposit:"Balance"},CandidatePendingAvailability:{core:"CoreIndex",hash:"CandidateHash",descriptor:"CandidateDescriptor",availabilityVotes:"BitVec",backers:"BitVec",relayParentNumber:"BlockNumber",backedInNumber:"BlockNumber",backingGroup:"GroupIndex"},CandidateReceipt:{descriptor:"CandidateDescriptor",commitmentsHash:"Hash"},GlobalValidationData:{maxCodeSize:"u32",maxHeadDataSize:"u32",blockNumber:"BlockNumber"},CollatorId:"H256",CollatorSignature:"Signature",CommittedCandidateReceipt:{descriptor:"CandidateDescriptor",commitments:"CandidateCommitments"},Constraints:{minRelayParentNumber:"BlockNumber",maxPovSize:"u32",maxCodeSize:"u32",umpRemaining:"u32",umpRemainingBytes:"u32",maxUmpNumPerCandidate:"u32",dmpRemainingMessages:"Vec",hrmpInbound:"InboundHrmpLimitations",hrmpChannelsOut:"HashMap",maxHrmpNumPerCandidate:"u32",requiredParent:"HeadData",validationCodeHash:"ValidationCodeHash",upgradeRestriction:"Option",futureValidationCode:"Option<(BlockNumber, ValidationCodeHash)>"},CoreAssignment:{core:"CoreIndex",paraId:"ParaId",kind:"AssignmentKind",groupIdx:"GroupIndex"},CoreIndex:"u32",CoreOccupied:{_enum:{Parathread:"ParathreadEntry",Parachain:"Null"}},CoreState:{_enum:{Occupied:"OccupiedCore",Scheduled:"ScheduledCore",Free:"Null"}},DisputeProof:{timeSlot:"DisputesTimeSlot",kind:"SlashingOffenceKind",validatorIndex:"ValidatorIndex",validatorId:"ValidatorId"},DisputesTimeSlot:{sessionIndex:"SessionIndex",candidateHash:"CandidateHash"},DoubleVoteReport:{identity:"ValidatorId",first:"(Statement, ValidatorSignature)",second:"(Statement, ValidatorSignature)",proof:"MembershipProof",signingContext:"SigningContext"},DownwardMessage:"Bytes",GroupIndex:"u32",GroupRotationInfo:{sessionStartBlock:"BlockNumber",groupRotationFrequency:"BlockNumber",now:"BlockNumber"},GlobalValidationSchedule:{maxCodeSize:"u32",maxHeadDataSize:"u32",blockNumber:"BlockNumber"},HeadData:"Bytes",HostConfiguration:{maxCodeSize:"u32",maxHeadDataSize:"u32",maxUpwardQueueCount:"u32",maxUpwardQueueSize:"u32",maxUpwardMessageSize:"u32",maxUpwardMessageNumPerCandidate:"u32",hrmpMaxMessageNumPerCandidate:"u32",validationUpgradeFrequency:"BlockNumber",validationUpgradeDelay:"BlockNumber",maxPovSize:"u32",maxDownwardMessageSize:"u32",preferredDispatchableUpwardMessagesStepWeight:"Weight",hrmpMaxParachainOutboundChannels:"u32",hrmpMaxParathreadOutboundChannels:"u32",hrmpOpenRequestTtl:"u32",hrmpSenderDeposit:"Balance",hrmpRecipientDeposit:"Balance",hrmpChannelMaxCapacity:"u32",hrmpChannelMaxTotalSize:"u32",hrmpMaxParachainInboundChannels:"u32",hrmpMaxParathreadInboundChannels:"u32",hrmpChannelMaxMessageSize:"u32",codeRetentionPeriod:"BlockNumber",parathreadCores:"u32",parathreadRetries:"u32",groupRotationFrequency:"BlockNumber",chainAvailabilityPeriod:"BlockNumber",threadAvailabilityPeriod:"BlockNumber",schedulingLookahead:"u32",maxValidatorsPerCore:"Option",maxValidators:"Option",disputePeriod:"SessionIndex",disputePostConclusionAcceptancePeriod:"BlockNumber",disputeMaxSpamSlots:"u32",disputeConclusionByTimeOutPeriod:"BlockNumber",noShowSlots:"u32",nDelayTranches:"u32",zerothDelayTrancheWidth:"u32",neededApprovals:"u32",relayVrfModuloSamples:"u32"},InboundDownwardMessage:{pubSentAt:"BlockNumber",pubMsg:"DownwardMessage"},InboundHrmpMessage:{sentAt:"BlockNumber",data:"Bytes"},InboundHrmpLimitations:{validWatermarks:"Vec"},InboundHrmpMessages:"Vec",LocalValidationData:{parentHead:"HeadData",balance:"Balance",codeUpgradeAllowed:"Option"},MessageIngestionType:{downwardMessages:"Vec",horizontalMessages:"BTreeMap"},MessageQueueChain:"RelayChainHash",NodeFeatures:"BitVec",OccupiedCore:{nextUpOnAvailable:"Option",occupiedSince:"BlockNumber",timeOutAt:"BlockNumber",nextUpOnTimeOut:"Option",availability:"BitVec",groupResponsible:"GroupIndex",candidateHash:"CandidateHash",candidateDescriptor:"CandidateDescriptor"},OccupiedCoreAssumption:{_enum:["Included,","TimedOut","Free"]},OutboundHrmpChannelLimitations:{bytesRemaining:"u32",messagesRemaining:"u32"},OutboundHrmpMessage:{recipient:"u32",data:"Bytes"},PendingSlashes:{_alias:{slashKeys:"keys"},slashKeys:"BTreeMap",kind:"SlashingOffenceKind"},ParachainDispatchOrigin:{_enum:["Signed","Parachain","Root"]},ParachainInherentData:{validationData:"PersistedValidationData",relayChainState:"StorageProof",downwardMessages:"Vec",horizontalMessages:"BTreeMap"},ParachainsInherentData:{bitfields:"SignedAvailabilityBitfields",backedCandidates:"Vec",disputes:"MultiDisputeStatementSet",parentHeader:"Header"},ParaGenesisArgs:{genesisHead:"Bytes",validationCode:"Bytes",parachain:"bool"},ParaId:"u32",ParaInfo:{manager:"AccountId",deposit:"Balance",locked:"bool"},ParaLifecycle:{_enum:["Onboarding","Parathread","Parachain","UpgradingToParachain","DowngradingToParathread","OutgoingParathread","OutgoingParachain"]},ParaPastCodeMeta:{upgradeTimes:"Vec",lastPruned:"Option"},ParaScheduling:{_enum:["Always","Dynamic"]},ParathreadClaim:"(ParaId, CollatorId)",ParathreadClaimQueue:{queue:"Vec",nextCoreOffset:"u32"},ParathreadEntry:{claim:"ParathreadClaim",retries:"u32"},ParaValidatorIndex:"u32",PersistedValidationData:{parentHead:"HeadData",relayParentNumber:"RelayChainBlockNumber",relayParentStorageRoot:"Hash",maxPovSize:"u32"},PvfCheckStatement:{accept:"bool",subject:"ValidationCodeHash",sessionIndex:"SessionIndex",validatorIndex:"ParaValidatorIndex"},QueuedParathread:{claim:"ParathreadEntry",coreOffset:"u32"},RelayBlockNumber:"u32",RelayChainBlockNumber:"RelayBlockNumber",RelayHash:"Hash",RelayChainHash:"RelayHash",Remark:"[u8; 32]",ReplacementTimes:{expectedAt:"BlockNumber",activatedAt:"BlockNumber"},Retriable:{_enum:{Never:"Null",WithRetries:"u32"}},ScheduledCore:{paraId:"ParaId",collator:"Option"},Scheduling:{_enum:["Always","Dynamic"]},ScrapedOnChainVotes:{session:"SessionIndex",backingValidatorsPerCandidate:"Vec<(CandidateReceipt, Vec<(ParaValidatorIndex, ValidityAttestation)>)>",disputes:"MultiDisputeStatementSet"},SessionInfo:{activeValidatorIndices:"Vec",randomSeed:"[u8; 32]",disputePeriod:"SessionIndex",validators:"Vec",discoveryKeys:"Vec",assignmentKeys:"Vec",validatorGroups:"Vec>",nCores:"u32",zerothDelayTrancheWidth:"u32",relayVrfModuloSamples:"u32",nDelayTranches:"u32",noShowSlots:"u32",neededApprovals:"u32"},OldV1SessionInfo:{validators:"Vec",discoveryKeys:"Vec",assignmentKeys:"Vec",validatorGroups:"Vec>",nCores:"u32",zerothDelayTrancheWidth:"u32",relayVrfModuloSamples:"u32",nDelayTranches:"u32",noShowSlots:"u32",neededApprovals:"u32"},SessionInfoValidatorGroup:"Vec",SignedAvailabilityBitfield:{payload:"BitVec",validatorIndex:"ParaValidatorIndex",signature:"ValidatorSignature"},SignedAvailabilityBitfields:"Vec",SigningContext:{sessionIndex:"SessionIndex",parentHash:"Hash"},SlashingOffenceKind:{_enum:["ForInvalid","AgainstValid"]},Statement:{_enum:{Never:"Null",Candidate:"Hash",Valid:"Hash",Invalid:"Hash"}},TransientValidationData:{maxCodeSize:"u32",maxHeadDataSize:"u32",balance:"Balance",codeUpgradeAllowed:"Option",dmqLength:"u32"},UpgradeGoAhead:{_enum:["Abort","GoAhead"]},UpgradeRestriction:{_enum:["Present"]},UpwardMessage:"Bytes",ValidationFunctionParams:{maxCodeSize:"u32",relayChainHeight:"RelayChainBlockNumber",codeUpgradeAllowed:"Option"},ValidationCode:"Bytes",ValidationCodeHash:"Hash",ValidationData:{persisted:"PersistedValidationData",transient:"TransientValidationData"},ValidationDataType:{validationData:"ValidationData",relayChainState:"Vec"},ValidatorSignature:"Signature",ValidityAttestation:{_enum:{Never:"Null",Implicit:"ValidatorSignature",Explicit:"ValidatorSignature"}},MessagingStateSnapshot:{relayDispatchQueueSize:"(u32, u32)",egressChannels:"Vec"},MessagingStateSnapshotEgressEntry:"(ParaId, AbridgedHrmpChannel)",SystemInherentData:"ParachainInherentData",VecInboundHrmpMessage:"Vec"}},ef={rpc:{},types:{Approvals:"[bool; 4]"}},tf={rpc:{},types:{AccountStatus:{validity:"AccountValidity",freeBalance:"Balance",lockedBalance:"Balance",signature:"Vec",vat:"Permill"},AccountValidity:{_enum:["Invalid","Initiated","Pending","ValidLow","ValidHigh","Completed"]}}},nf={rpc:{},runtime:{DryRunApi:[{methods:{dry_run_call:{description:"Dry run call",params:[{name:"origin",type:"OriginCaller"},{name:"call",type:"RuntimeCall"}],type:"Result"},dry_run_xcm:{description:"Dry run XCM program",params:[{name:"originLocation",type:"VersionedMultiLocation"},{name:"xcm",type:"VersionedXcm"}],type:"Result"}},version:1}]},types:{PostDispatchInfo:{actualWeight:"Option",paysFee:"Pays"},DispatchResultWithPostInfo:"Result",CallDryRunEffects:{executionResult:"DispatchResultWithPostInfo",emittedEvents:"Vec",localXcm:"Option",forwardedXcms:"Vec<(VersionedMultiLocation, Vec)>"},XcmDryRunEffects:{executionResult:"OutcomeV4",emittedEvents:"Vec",forwardedXcms:"Vec<(VersionedMultiLocation, Vec)>"},XcmDryRunApiError:{_enum:["Unimplemented","VersionedConversionFailed"]}}},rf=["AssetInstance","Fungibility","Junction","Junctions","MultiAsset","MultiAssetFilter","MultiLocation","Response","WildFungibility","WildMultiAsset","Xcm","XcmError"];function af(e){return rf.reduce(((t,n)=>(0,M.b)(t,{[n]:`${n}${e}`})),{})}const sf={rpc:{},types:{BodyId:{_enum:{Unit:"Null",Named:"Vec",Index:"Compact",Executive:"Null",Technical:"Null",Legislative:"Null",Judicial:"Null"}},BodyPart:{_enum:{Voice:"Null",Members:"Compact",Fraction:{nom:"Compact",denom:"Compact"},AtLeastProportion:{nom:"Compact",denom:"Compact"},MoreThanProportion:{nom:"Compact",denom:"Compact"}}},InteriorMultiLocation:"Junctions",NetworkId:{_enum:{Any:"Null",Named:"Vec",Polkadot:"Null",Kusama:"Null"}},XcmOrigin:{_enum:{Xcm:"MultiLocation"}},XcmpMessageFormat:{_enum:["ConcatenatedVersionedXcm","ConcatenatedEncodedBlob","Signals"]},XcmAssetId:{_enum:{Concrete:"MultiLocation",Abstract:"Bytes"}},InboundStatus:{_enum:["Ok","Suspended"]},OutboundStatus:{_enum:["Ok","Suspended"]},MultiAssets:"Vec",FungibilityV0:"FungibilityV1",WildFungibilityV0:"WildFungibilityV1",AssetInstanceV0:{_enum:{Undefined:"Null",Index8:"u8",Index16:"Compact",Index32:"Compact",Index64:"Compact",Index128:"Compact",Array4:"[u8; 4]",Array8:"[u8; 8]",Array16:"[u8; 16]",Array32:"[u8; 32]",Blob:"Vec"}},JunctionV0:{_enum:{Parent:"Null",Parachain:"Compact",AccountId32:{network:"NetworkId",id:"AccountId"},AccountIndex64:{network:"NetworkId",index:"Compact"},AccountKey20:{network:"NetworkId",key:"[u8; 20]"},PalletInstance:"u8",GeneralIndex:"Compact",GeneralKey:"Vec",OnlyChild:"Null",Plurality:{id:"BodyId",part:"BodyPart"}}},MultiAssetV0:{_enum:{None:"Null",All:"Null",AllFungible:"Null",AllNonFungible:"Null",AllAbstractFungible:"Vec",AllAbstractNonFungible:"Vec",AllConcreteFungible:"MultiLocationV0",AllConcreteNonFungible:"MultiLocationV0",AbstractFungible:{id:"Vec",instance:"Compact"},AbstractNonFungible:{class:"Vec",instance:"AssetInstanceV0"},ConcreteFungible:{id:"MultiLocationV0",amount:"Compact"},ConcreteNonFungible:{class:"MultiLocationV0",instance:"AssetInstanceV0"}}},MultiLocationV0:{_enum:{Here:"Null",X1:"JunctionV0",X2:"(JunctionV0, JunctionV0)",X3:"(JunctionV0, JunctionV0, JunctionV0)",X4:"(JunctionV0, JunctionV0, JunctionV0, JunctionV0)",X5:"(JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0)",X6:"(JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0)",X7:"(JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0)",X8:"(JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0)"}},OriginKindV0:{_enum:["Native","SovereignAccount","Superuser","Xcm"]},ResponseV0:{_enum:{Assets:"Vec"}},XcmV0:{_enum:{WithdrawAsset:{assets:"Vec",effects:"Vec"},ReserveAssetDeposit:{assets:"Vec",effects:"Vec"},ReceiveTeleportedAsset:{assets:"Vec",effects:"Vec"},QueryResponse:{queryId:"Compact",response:"ResponseV0"},TransferAsset:{assets:"Vec",dest:"MultiLocationV0"},TransferReserveAsset:{assets:"Vec",dest:"MultiLocationV0",effects:"Vec"},Transact:{originType:"XcmOriginKind",requireWeightAtMost:"u64",call:"DoubleEncodedCall"},HrmpNewChannelOpenRequest:{sender:"Compact",maxMessageSize:"Compact",maxCapacity:"Compact"},HrmpChannelAccepted:{recipient:"Compact"},HrmpChannelClosing:{initiator:"Compact",sender:"Compact",recipient:"Compact"},RelayedFrom:{who:"MultiLocationV0",message:"XcmV0"}}},XcmErrorV0:{_enum:{Undefined:"Null",Overflow:"Null",Unimplemented:"Null",UnhandledXcmVersion:"Null",UnhandledXcmMessage:"Null",UnhandledEffect:"Null",EscalationOfPrivilege:"Null",UntrustedReserveLocation:"Null",UntrustedTeleportLocation:"Null",DestinationBufferOverflow:"Null",SendFailed:"Null",CannotReachDestination:"(MultiLocation, Xcm)",MultiLocationFull:"Null",FailedToDecode:"Null",BadOrigin:"Null",ExceedsMaxMessageSize:"Null",FailedToTransactAsset:"Null",WeightLimitReached:"Weight",Wildcard:"Null",TooMuchWeightRequired:"Null",NotHoldingFees:"Null",WeightNotComputable:"Null",Barrier:"Null",NotWithdrawable:"Null",LocationCannotHold:"Null",TooExpensive:"Null",AssetNotFound:"Null",RecursionLimitReached:"Null"}},XcmOrderV0:{_enum:{Null:"Null",DepositAsset:{assets:"Vec",dest:"MultiLocationV0"},DepositReserveAsset:{assets:"Vec",dest:"MultiLocationV0",effects:"Vec"},ExchangeAsset:{give:"Vec",receive:"Vec"},InitiateReserveWithdraw:{assets:"Vec",reserve:"MultiLocationV0",effects:"Vec"},InitiateTeleport:{assets:"Vec",dest:"MultiLocationV0",effects:"Vec"},QueryHolding:{queryId:"Compact",dest:"MultiLocationV0",assets:"Vec"},BuyExecution:{fees:"MultiAssetV0",weight:"u64",debt:"u64",haltOnError:"bool",xcm:"Vec"}}},AssetInstanceV1:{_enum:{Undefined:"Null",Index:"Compact",Array4:"[u8; 4]",Array8:"[u8; 8]",Array16:"[u8; 16]",Array32:"[u8; 32]",Blob:"Bytes"}},FungibilityV1:{_enum:{Fungible:"Compact",NonFungible:"AssetInstanceV1"}},JunctionV1:{_enum:{Parachain:"Compact",AccountId32:{network:"NetworkId",id:"AccountId"},AccountIndex64:{network:"NetworkId",index:"Compact"},AccountKey20:{network:"NetworkId",key:"[u8; 20]"},PalletInstance:"u8",GeneralIndex:"Compact",GeneralKey:"Vec",OnlyChild:"Null",Plurality:{id:"BodyId",part:"BodyPart"}}},JunctionsV1:{_enum:{Here:"Null",X1:"JunctionV1",X2:"(JunctionV1, JunctionV1)",X3:"(JunctionV1, JunctionV1, JunctionV1)",X4:"(JunctionV1, JunctionV1, JunctionV1, JunctionV1)",X5:"(JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1)",X6:"(JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1)",X7:"(JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1)",X8:"(JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1)"}},MultiAssetsV1:"Vec",MultiAssetV1:{id:"XcmAssetId",fungibility:"FungibilityV1"},MultiAssetFilterV1:{_enum:{Definite:"MultiAssetsV1",Wild:"WildMultiAssetV1"}},MultiLocationV1:{parents:"u8",interior:"JunctionsV1"},OriginKindV1:"OriginKindV0",ResponseV1:{_enum:{Assets:"MultiAssetsV1"}},WildFungibilityV1:{_enum:["Fungible","NonFungible"]},WildMultiAssetV1:{_enum:{All:"Null",AllOf:{id:"XcmAssetId",fungibility:"WildFungibilityV1"}}},XcmV1:{_enum:{WithdrawAsset:{assets:"MultiAssetsV1",effects:"Vec"},ReserveAssetDeposit:{assets:"MultiAssetsV1",effects:"Vec"},ReceiveTeleportedAsset:{assets:"MultiAssetsV1",effects:"Vec"},QueryResponse:{queryId:"Compact",response:"ResponseV1"},TransferAsset:{assets:"MultiAssetsV1",dest:"MultiLocationV1"},TransferReserveAsset:{assets:"MultiAssetsV1",dest:"MultiLocationV1",effects:"Vec"},Transact:{originType:"XcmOriginKind",requireWeightAtMost:"u64",call:"DoubleEncodedCall"},HrmpNewChannelOpenRequest:{sender:"Compact",maxMessageSize:"Compact",maxCapacity:"Compact"},HrmpChannelAccepted:{recipient:"Compact"},HrmpChannelClosing:{initiator:"Compact",sender:"Compact",recipient:"Compact"},RelayedFrom:{who:"MultiLocationV1",message:"XcmV1"}}},XcmErrorV1:{_enum:{Undefined:"Null",Overflow:"Null",Unimplemented:"Null",UnhandledXcmVersion:"Null",UnhandledXcmMessage:"Null",UnhandledEffect:"Null",EscalationOfPrivilege:"Null",UntrustedReserveLocation:"Null",UntrustedTeleportLocation:"Null",DestinationBufferOverflow:"Null",SendFailed:"Null",CannotReachDestination:"(MultiLocationV1, XcmV1)",MultiLocationFull:"Null",FailedToDecode:"Null",BadOrigin:"Null",ExceedsMaxMessageSize:"Null",FailedToTransactAsset:"Null",WeightLimitReached:"Weight",Wildcard:"Null",TooMuchWeightRequired:"Null",NotHoldingFees:"Null",WeightNotComputable:"Null",Barrier:"Null",NotWithdrawable:"Null",LocationCannotHold:"Null",TooExpensive:"Null",AssetNotFound:"Null",DestinationUnsupported:"Null",RecursionLimitReached:"Null"}},XcmOrderV1:{_enum:{Noop:"Null",DepositAsset:{assets:"MultiAssetFilterV1",maxAssets:"u32",beneficiary:"MultiLocationV1"},DepositReserveAsset:{assets:"MultiAssetFilterV1",maxAssets:"u32",dest:"MultiLocationV1",effects:"Vec"},ExchangeAsset:{give:"MultiAssetFilterV1",receive:"MultiAssetsV1"},InitiateReserveWithdraw:{assets:"MultiAssetFilterV1",reserve:"MultiLocationV1",effects:"Vec"},InitiateTeleport:{assets:"MultiAssetFilterV1",dest:"MultiLocationV1",effects:"Vec"},QueryHolding:{queryId:"Compact",dest:"MultiLocationV1",assets:"MultiAssetFilterV1"},BuyExecution:{fees:"MultiAssetV1",weight:"u64",debt:"u64",haltOnError:"bool",instructions:"Vec"}}},AssetIdV2:{_enum:{Concrete:"MultiLocationV2",Abstract:"Bytes"}},AssetInstanceV2:{_enum:{Undefined:"Null",Index:"Compact",Array4:"[u8;4]",Array8:"[u8;8]",Array16:"[u8;16]",Array32:"[u8;32]",Blob:"Bytes"}},BodyIdV2:{_enum:{Unit:"Null",Named:"Bytes",Index:"Compact",Executive:"Null",Technical:"Null",Legislative:"Null",Judicial:"Null",Defense:"Null",Administration:"Null",Treasury:"Null"}},BodyPartV2:{_enum:{Voice:"Null",Members:{count:"Compact"},Fraction:{nom:"Compact",denom:"Compact"},AtLeastProportion:{nom:"Compact",denom:"Compact"},MoreThanProportion:{nom:"Compact",denom:"Compact"}}},NetworkIdV2:{_enum:{Any:"Null",Named:"Bytes",Polkadot:"Null",Kusama:"Null"}},JunctionV2:{_enum:{Parachain:"Compact",AccountId32:{network:"NetworkIdV2",id:"[u8; 32]"},AccountIndex64:{network:"NetworkIdV2",index:"Compact"},AccountKey20:{network:"NetworkIdV2",key:"[u8; 20]"},PalletInstance:"u8",GeneralIndex:"Compact",GeneralKey:"Bytes",OnlyChild:"Null",Plurality:{id:"BodyIdV2",part:"BodyPartV2"}}},JunctionsV2:{_enum:{Here:"Null",X1:"JunctionV2",X2:"(JunctionV2, JunctionV2)",X3:"(JunctionV2, JunctionV2, JunctionV2)",X4:"(JunctionV2, JunctionV2, JunctionV2, JunctionV2)",X5:"(JunctionV2, JunctionV2, JunctionV2, JunctionV2, JunctionV2)",X6:"(JunctionV2, JunctionV2, JunctionV2, JunctionV2, JunctionV2, JunctionV2)",X7:"(JunctionV2, JunctionV2, JunctionV2, JunctionV2, JunctionV2, JunctionV2, JunctionV2)",X8:"(JunctionV2, JunctionV2, JunctionV2, JunctionV2, JunctionV2, JunctionV2, JunctionV2, JunctionV2)"}},FungibilityV2:{_enum:{Fungible:"Compact",NonFungible:"AssetInstanceV2"}},InteriorMultiLocationV2:"JunctionsV2",MultiAssetV2:{id:"AssetIdV2",fun:"FungibilityV2"},MultiAssetsV2:"Vec",MultiAssetFilterV2:{_enum:{Definite:"MultiAssetsV2",Wild:"WildMultiAssetV2"}},MultiLocationV2:{parents:"u8",interior:"JunctionsV2"},OriginKindV2:{_enum:{Native:"Null",SovereignAccount:"Null",Superuser:"Null",Xcm:"Null"}},WildFungibilityV2:{_enum:{Fungible:"Null",NonFungible:"Null"}},ResponseV2:{_enum:{Null:"Null",Assets:"MultiAssetsV2",ExecutionResult:"Option<(u32, XcmErrorV2)>",Version:"u32"}},ResponseV2Error:"(u32, XcmErrorV2)",WeightLimitV2:{_enum:{Unlimited:"Null",Limited:"Compact"}},InstructionV2:{_enum:{WithdrawAsset:"MultiAssetsV2",ReserveAssetDeposited:"MultiAssetsV2",ReceiveTeleportedAsset:"MultiAssetsV2",QueryResponse:{queryId:"Compact",response:"ResponseV2",maxWeight:"Compact"},TransferAsset:{assets:"MultiAssetsV2",beneficiary:"MultiLocationV2"},TransferReserveAsset:{assets:"MultiAssetsV2",dest:"MultiLocationV2",xcm:"XcmV2"},Transact:{originType:"XcmOriginKind",requireWeightAtMost:"Compact",call:"DoubleEncodedCall"},HrmpNewChannelOpenRequest:{sender:"Compact",maxMessageSize:"Compact",maxCapacity:"Compact"},HrmpChannelAccepted:{recipient:"Compact"},HrmpChannelClosing:{initiator:"Compact",sender:"Compact",recipient:"Compact"},ClearOrigin:"Null",DescendOrigin:"InteriorMultiLocationV2",ReportError:{queryId:"Compact",dest:"MultiLocationV2",maxResponseWeight:"Compact"},DepositAsset:{assets:"MultiAssetFilterV2",maxAssets:"Compact",beneficiary:"MultiLocationV2"},DepositReserveAsset:{assets:"MultiAssetFilterV2",maxAssets:"Compact",dest:"MultiLocationV2",xcm:"XcmV2"},ExchangeAsset:{give:"MultiAssetFilterV2",receive:"MultiAssetsV2"},InitiateReserveWithdraw:{assets:"MultiAssetFilterV2",reserve:"MultiLocationV2",xcm:"XcmV2"},InitiateTeleport:{assets:"MultiAssetFilterV2",dest:"MultiLocationV2",xcm:"XcmV2"},QueryHolding:{queryId:"Compact",dest:"MultiLocationV2",assets:"MultiAssetFilterV2",maxResponseWeight:"Compact"},BuyExecution:{fees:"MultiAssetV2",weightLimit:"WeightLimitV2"},RefundSurplus:"Null",SetErrorHandler:"XcmV2",SetAppendix:"XcmV2",ClearError:"Null",ClaimAsset:{assets:"MultiAssetsV2",ticket:"MultiLocationV2"},Trap:"Compact",SubscribeVersion:{queryId:"Compact",maxResponseWeight:"Compact"},UnsubscribeVersion:"Null"}},WildMultiAssetV2:{_enum:{All:"Null",AllOf:{id:"AssetIdV2",fun:"WildFungibilityV2"}}},XcmV2:"Vec",XcmErrorV2:{_enum:{Overflow:"Null",Unimplemented:"Null",UntrustedReserveLocation:"Null",UntrustedTeleportLocation:"Null",MultiLocationFull:"Null",MultiLocationNotInvertible:"Null",BadOrigin:"Null",InvalidLocation:"Null",AssetNotFound:"Null",FailedToTransactAsset:"Null",NotWithdrawable:"Null",LocationCannotHold:"Null",ExceedsMaxMessageSize:"Null",DestinationUnsupported:"Null",Transport:"Null",Unroutable:"Null",UnknownClaim:"Null",FailedToDecode:"Null",MaxWeightInvalid:"Null",NotHoldingFees:"Null",TooExpensive:"Null",Trap:"u64",UnhandledXcmVersion:"Null",WeightLimitReached:"Weight",Barrier:"Null",WeightNotComputable:"Null"}},AssetIdV3:{_enum:{Concrete:"MultiLocationV3",Abstract:"Bytes"}},BodyIdV3:{_enum:{Unit:"Null",Moniker:"[u8;4]",Index:"Compact",Executive:"Null",Technical:"Null",Legislative:"Null",Judicial:"Null",Defense:"Null",Administration:"Null",Treasury:"Null"}},BodyPartV3:{_enum:{Voice:"Null",Members:{count:"Compact"},Fraction:{nom:"Compact",denom:"Compact"},AtLeastProportion:{nom:"Compact",denom:"Compact"},MoreThanProportion:{nom:"Compact",denom:"Compact"}}},AssetInstanceV3:{_enum:{Undefined:"Null",Index:"Compact",Array4:"[u8;4]",Array8:"[u8;8]",Array16:"[u8;16]",Array32:"[u8;32]"}},FungibilityV3:{_enum:{Fungible:"Compact",NonFungible:"AssetInstanceV3"}},InteriorMultiLocationV3:"JunctionsV3",JunctionV3:{_enum:{Parachain:"Compact",AccountId32:{network:"Option",id:"[u8;32]"},AccountIndex64:{network:"Option",index:"Compact"},AccountKey20:{network:"Option",key:"[u8;20]"},PalletInstance:"u8",GeneralIndex:"Compact",GeneralKey:{length:"u8",data:"[u8;32]"},OnlyChild:"Null",Plurality:{id:"BodyIdV3",part:"BodyPartV3"},GlobalConsensus:"NetworkIdV3"}},JunctionsV3:{_enum:{Here:"Null",X1:"JunctionV3",X2:"(JunctionV3, JunctionV3)",X3:"(JunctionV3, JunctionV3, JunctionV3)",X4:"(JunctionV3, JunctionV3, JunctionV3, JunctionV3)",X5:"(JunctionV3, JunctionV3, JunctionV3, JunctionV3, JunctionV3)",X6:"(JunctionV3, JunctionV3, JunctionV3, JunctionV3, JunctionV3, JunctionV3)",X7:"(JunctionV3, JunctionV3, JunctionV3, JunctionV3, JunctionV3, JunctionV3, JunctionV3)",X8:"(JunctionV3, JunctionV3, JunctionV3, JunctionV3, JunctionV3, JunctionV3, JunctionV3, JunctionV3)"}},MaybeErrorCodeV3:{_enum:{Success:"Null",Error:"Bytes",TruncatedError:"Bytes"}},MaxPalletsInfo:"u32",MultiAssetV3:{id:"AssetIdV3",fun:"FungibilityV3"},MultiAssetsV3:"Vec",MultiAssetFilterV3:{_enum:{Definite:"MultiAssetsV3",Wild:"WildMultiAssetV3"}},MultiLocationV3:{parents:"u8",interior:"JunctionsV3"},MaxPalletNameLen:"u32",NetworkIdV3:{_enum:{ByGenesis:"[u8;32]",ByFork:{blockNumber:"u64",blockHash:"[u8;32]"},Polkadot:"Null",Kusama:"Null",Westend:"Null",Rococo:"Null",Wococo:"Null",Ethereum:{chainId:"Compact"},BitcoinCore:"Null",BitcoinCash:"Null",PolkadotBulletin:"Null"}},OriginKindV3:"OriginKindV2",PalletInfoV3:{index:"Compact",name:"Bytes",moduleName:"Bytes",major:"Compact",minor:"Compact",patch:"Compact"},WildFungibilityV3:"WildFungibilityV2",QueryResponseInfoV3:{destination:"MultiLocationV3",queryId:"Compact",maxWeight:"WeightV2"},ResponseV3:{_enum:{Null:"Null",Assets:"MultiAssetsV3",ExecutionResult:"Option<(u32,XcmErrorV3)>",Version:"u32",PalletsInfo:"Vec",DispatchResult:"MaybeErrorCodeV3"}},XcmErrorV3:{_enum:{Overflow:"Null",Unimplemented:"Null",UntrustedReserveLocation:"Null",UntrustedTeleportLocation:"Null",LocationFull:"Null",LocationNotInvertible:"Null",BadOrigin:"Null",InvalidLocation:"Null",AssetNotFound:"Null",FailedToTransactAsset:"Null",NotWithdrawable:"Null",LocationCannotHold:"Null",ExceedsMaxMessageSize:"Null",DestinationUnsupported:"Null",Transport:"Null",Unroutable:"Null",UnknownClaim:"Null",FailedToDecode:"Null",MaxWeightInvalid:"Null",NotHoldingFees:"Null",TooExpensive:"Null",Trap:"u64",ExpectationFalse:"Null",PalletNotFound:"Null",NameMismatch:"Null",VersionIncompatible:"Null",HoldingWouldOverflow:"Null",ExportError:"Null",ReanchorFailed:"Null",NoDeal:"Null",FeesNotMet:"Null",LockError:"Null",NoPermission:"Null",Unanchored:"Null",NotDepositable:"Null",UnhandledXcmVersion:"Null",WeightLimitReached:"WeightV2",Barrier:"Null",ExceedsStackLimit:"Null"}},ResponseV3Error:"(u32, XcmErrorV3)",ResponseV3Result:"Option<(u32, ResponseV3Error)>",WeightLimitV3:{_enum:{Unlimited:"Null",Limited:"WeightV2"}},InstructionV3:{_enum:{WithdrawAsset:"MultiAssetsV3",ReserveAssetDeposited:"MultiAssetsV3",ReceiveTeleportedAsset:"MultiAssetsV3",QueryResponse:{queryId:"Compact",response:"ResponseV3",maxWeight:"WeightV2",querier:"Option"},TransferAsset:{assets:"MultiAssetsV3",beneficiary:"MultiLocationV3"},TransferReserveAsset:{assets:"MultiAssetsV3",dest:"MultiLocationV3",xcm:"XcmV3"},Transact:{originKind:"XcmOriginKind",requireWeightAtMost:"WeightV2",call:"DoubleEncodedCall"},HrmpNewChannelOpenRequest:{sender:"Compact",maxMessageSize:"Compact",maxCapacity:"Compact"},HrmpChannelAccepted:{recipient:"Compact"},HrmpChannelClosing:{initiator:"Compact",sender:"Compact",recipient:"Compact"},ClearOrigin:"Null",DescendOrigin:"JunctionsV3",ReportError:"QueryResponseInfoV3",DepositAsset:{assets:"MultiAssetFilterV3",beneficiary:"MultiLocationV3"},DepositReserveAsset:{assets:"MultiAssetFilterV3",dest:"MultiLocationV3",xcm:"XcmV3"},ExchangeAsset:{give:"MultiAssetFilterV3",want:"MultiAssetsV3",maximal:"bool"},InitiateReserveWithdraw:{assets:"MultiAssetFilterV3",reserve:"MultiLocationV3",xcm:"XcmV3"},InitiateTeleport:{assets:"MultiAssetFilterV3",dest:"MultiLocationV3",xcm:"XcmV3"},ReportHolding:{responseInfo:"QueryResponseInfoV3",assets:"MultiAssetFilterV3"},BuyExecution:{fees:"MultiAssetV3",weightLimit:"WeightLimitV3"},RefundSurplus:"Null",SetErrorHandler:"XcmV3",SetAppendix:"XcmV3",ClearError:"Null",ClaimAsset:{assets:"MultiAssetsV3",ticket:"MultiLocationV3"},Trap:"Compact",SubscribeVersion:{queryId:"Compact",maxResponseWeight:"WeightV2"},UnsubscribeVersion:"Null",BurnAsset:"MultiAssetsV3",ExpectAsset:"MultiAssetsV3",ExpectOrigin:"Option",ExpectError:"Option<(u32, XcmErrorV3)>",ExpectTransactStatus:"MaybeErrorCodeV3",QueryPallet:{moduleName:"Vec",responseInfo:"QueryResponseInfoV3"},ExpectPallet:{index:"Compact",name:"Vec",moduleName:"Vec",crateMajor:"Compact",minCrateMinor:"Compact"},ReportTransactStatus:"QueryResponseInfoV3",ClearTransactStatus:"Null",UniversalOrigin:"JunctionV3",ExportMessage:{network:"NetworkIdV3",destination:"JunctionsV3",xcm:"XcmV3"},LockAsset:{asset:"MultiAssetV3",unlocker:"MultiLocationV3"},UnlockAsset:{asset:"MultiAssetV3",target:"MultiLocationV3"},NoteUnlockable:{asset:"MultiAssetV3",owner:"MultiLocationV3"},RequestUnlock:{asset:"MultiAssetV3",locker:"MultiLocationV3"},SetFeesMode:{jitWithdraw:"bool"},SetTopic:"[u8; 32]",ClearTopic:"Null",AliasOrigin:"MultiLocationV3",UnpaidExecution:{weightLimit:"WeightLimitV3",checkOrigin:"Option"}}},WildMultiAssetV3:{_enum:{All:"Null",AllOf:{id:"AssetIdV3",fun:"WildFungibilityV2"},AllCounted:"Compact",AllOfCounted:{id:"AssetIdV3",fun:"WildFungibilityV2",count:"Compact"}}},VersionV3:"u32",XcmV3:"Vec",AssetIdV4:"MultiLocationV4",AssetInstanceV4:{_enum:{Undefined:"Null",Index:"Compact",Array4:"[u8;4]",Array8:"[u8;8]",Array16:"[u8;16]",Array32:"[u8;32]"}},FungibilityV4:{_enum:{Fungible:"Compact",NonFungible:"AssetInstanceV4"}},UncheckedFungibilityV4:{_enum:{Fungible:"Compact",NonFungible:"AssetInstanceV4"}},JunctionV4:{_enum:{Parachain:"Compact",AccountId32:{network:"Option",id:"[u8;32]"},AccountIndex64:{network:"Option",index:"Compact"},AccountKey20:{network:"Option",key:"[u8;20]"},PalletInstance:"u8",GeneralIndex:"Compact",GeneralKey:{length:"u8",data:"[u8;32]"},OnlyChild:"Null",Plurality:{id:"BodyIdV3",part:"BodyPartV3"},GlobalConsensus:"NetworkIdV4"}},JunctionsV4:{_enum:{Here:"Null",X1:"[JunctionV4;1]",X2:"[JunctionV4;2]",X3:"[JunctionV4;3]",X4:"[JunctionV4;4]",X5:"[JunctionV4;5]",X6:"[JunctionV4;6]",X7:"[JunctionV4;7]",X8:"[JunctionV4;8]"}},MaxPalletsInfo:"u32",NetworkIdV4:"NetworkIdV3",MultiAssetV4:{id:"AssetIdV4",fun:"FungibilityV4"},MultiAssetsV4:"Vec",MultiAssetFilterV4:{_enum:{Definite:"MultiAssetsV4",Wild:"WildMultiAssetV4"}},MultiLocationV4:{parents:"u8",interior:"JunctionsV4"},OriginKindV4:"XcmOriginKind",PalletInfoV4:"PalletInfoV3",WildFungibilityV4:"WildFungibilityV2",QueryResponseInfoV4:{destination:"MultiLocationV4",queryId:"Compact",maxWeight:"WeightV2"},ResponseV4:{_enum:{Null:"Null",Assets:"MultiAssetsV4",ExecutionResult:"Option<(u32, XcmErrorV3)>",Version:"u32",PalletsInfo:"Vec",DispatchResult:"MaybeErrorCodeV3"}},InstructionV4:{_enum:{WithdrawAsset:"MultiAssetsV4",ReserveAssetDeposited:"MultiAssetsV4",ReceiveTeleportedAsset:"MultiAssetsV4",QueryResponse:{queryId:"Compact",response:"ResponseV4",maxWeight:"WeightV2",querier:"Option"},TransferAsset:{assets:"MultiAssetsV4",beneficiary:"MultiLocationV4"},TransferReserveAsset:{assets:"MultiAssetsV4",dest:"MultiLocationV4",xcm:"XcmV4"},Transact:{originKind:"OriginKindV4",requireWeightAtMost:"WeightV2",call:"DoubleEncodedCall"},HrmpNewChannelOpenRequest:{sender:"Compact",maxMessageSize:"Compact",maxCapacity:"Compact"},HrmpChannelAccepted:{recipient:"Compact"},HrmpChannelClosing:{initiator:"Compact",sender:"Compact",recipient:"Compact"},ClearOrigin:"Null",DescendOrigin:"JunctionsV4",ReportError:"QueryResponseInfoV4",DepositAsset:{assets:"MultiAssetFilterV4",beneficiary:"MultiLocationV4"},DepositReserveAsset:{assets:"MultiAssetFilterV4",dest:"MultiLocationV4",xcm:"XcmV4"},ExchangeAsset:{give:"MultiAssetFilterV4",want:"MultiAssetsV4",maximal:"bool"},InitiateReserveWithdraw:{assets:"MultiAssetFilterV4",reserve:"MultiLocationV4",xcm:"XcmV4"},InitiateTeleport:{assets:"MultiAssetFilterV4",dest:"MultiLocationV4",xcm:"XcmV4"},ReportHolding:{responseInfo:"QueryResponseInfoV4",assets:"MultiAssetFilterV4"},BuyExecution:{fees:"MultiAssetV4",weightLimit:"WeightLimitV3"},RefundSurplus:"Null",SetErrorHandler:"XcmV4",SetAppendix:"XcmV4",ClearError:"Null",ClaimAsset:{assets:"MultiAssetsV4",ticket:"MultiLocationV4"},Trap:"Compact",SubscribeVersion:{queryId:"Compact",maxResponseWeight:"WeightV2"},UnsubscribeVersion:"Null",BurnAsset:"MultiAssetsV4",ExpectAsset:"MultiAssetsV4",ExpectOrigin:"Option",ExpectError:"Option<(u32, XcmErrorV3)>",ExpectTransactStatus:"MaybeErrorCodeV3",QueryPallet:{moduleName:"Vec",responseInfo:"QueryResponseInfoV4"},ExpectPallet:{index:"Compact",name:"Vec",moduleName:"Vec",crateMajor:"Compact",minCrateMinor:"Compact"},ReportTransactStatus:"QueryResponseInfoV4",ClearTransactStatus:"Null",UniversalOrigin:"JunctionV4",ExportMessage:{network:"NetworkIdV4",destination:"JunctionsV4",xcm:"XcmV4"},LockAsset:{asset:"MultiAssetV4",unlocker:"MultiLocationV4"},UnlockAsset:{asset:"MultiAssetV4",target:"MultiLocationV4"},NoteUnlockable:{asset:"MultiAssetV4",owner:"MultiLocationV4"},RequestUnlock:{asset:"MultiAssetV4",locker:"MultiLocationV4"},SetFeesMode:{jitWithdraw:"bool"},SetTopic:"[u8;32]",ClearTopic:"Null",AliasOrigin:"MultiLocationV4",UnpaidExecution:{weightLimit:"WeightLimitV3",checkOrigin:"Option"}}},OutcomeV4:{_enum:{Complete:{used:"WeightV2"},Incomplete:{used:"WeightV2",error:"XcmErrorV3"},Error:{error:"XcmErrorV3"}}},WildMultiAssetV4:{_enum:{All:"Null",AllOf:{id:"AssetIdV4",fun:"WildFungibilityV4"},AllCounted:"Compact",AllOfCounted:{id:"AssetIdV4",fun:"WildFungibilityV4",count:"Compact"}}},VersionV4:"u32",XcmV4:"Vec",XcmErrorV4:"XcmErrorV3",...af("V4"),DoubleEncodedCall:{encoded:"Bytes"},XcmOriginKind:{_enum:["Native","SovereignAccount","Superuser","Xcm"]},Outcome:{_enum:{Complete:"Weight",Incomplete:"(Weight, XcmErrorV0)",Error:"XcmErrorV0"}},QueryId:"u64",QueryStatus:{_enum:{Pending:{responder:"VersionedMultiLocation",maybeNotify:"Option<(u8, u8)>",timeout:"BlockNumber"},Ready:{response:"VersionedResponse",at:"BlockNumber"}}},QueueConfigData:{suspendThreshold:"u32",dropThreshold:"u32",resumeThreshold:"u32",thresholdWeight:"Weight",weightRestrictDecay:"Weight"},VersionMigrationStage:{_enum:{MigrateSupportedVersion:"Null",MigrateVersionNotifiers:"Null",NotifyCurrentTargets:"Option",MigrateAndNotifyOldTargets:"Null"}},VersionedMultiAsset:{_enum:{V0:"MultiAssetV0",V1:"MultiAssetV1",V2:"MultiAssetV2",V3:"MultiAssetV3",V4:"MultiAssetV4"}},VersionedMultiAssets:{_enum:{V0:"Vec",V1:"MultiAssetsV1",V2:"MultiAssetsV2",V3:"MultiAssetsV3",V4:"MultiAssetsV4"}},VersionedMultiLocation:{_enum:{V0:"MultiLocationV0",V1:"MultiLocationV1",V2:"MultiLocationV2",V3:"MultiLocationV3",V4:"MultiLocationV4"}},VersionedResponse:{V0:"ResponseV0",V1:"ResponseV1",V2:"ResponseV2",V3:"ResponseV3",V4:"ResponseV4"},VersionedXcm:{_enum:{V0:"XcmV0",V1:"XcmV1",V2:"XcmV2",V3:"XcmV3",V4:"XcmV4"}},XcmVersion:"u32"}},of={rpc:{},runtime:{XcmPaymentApi:[{methods:{query_acceptable_payment_assets:{description:"The API to query acceptable payment assets",params:[{name:"version",type:"u32"}],type:"Result, XcmPaymentApiError>"},query_weight_to_asset_fee:{description:"",params:[{name:"weight",type:"WeightV2"},{name:"asset",type:"XcmVersionedAssetId"}],type:"Result"},query_xcm_weight:{description:"",params:[{name:"message",type:"XcmVersionedXcm"}],type:"Result"}},version:1}]},types:{XcmPaymentApiError:{_enum:["Unimplemented","VersionedConversionFailed","WeightNotComputable","UnhandledXcmVersion","AssetNotFound"]}}},cf={rpc:{},runtime:{LocationToAccountApi:[{methods:{convert_location:{description:"Converts `Location` to `AccountId`",params:[{name:"location",type:"XcmVersionedLocation"}],type:"Result"}},version:1}]},types:{Error:{_enum:["Unsupported","VersionedConversionFailed"]}}},df={rpc:{},types:{ContractCryptoHasher:{_enum:["Blake2x256","Sha2x256","Keccak256"]},ContractDiscriminant:"u32",ContractLayoutArray:{offset:"ContractLayoutKey",len:"u32",cellsPerElem:"u64",layout:"ContractStorageLayout"},ContractLayoutCell:{key:"ContractLayoutKey",ty:"SiLookupTypeId"},ContractLayoutEnum:{dispatchKey:"ContractLayoutKey",variants:"BTreeMap"},ContractLayoutHash:{offset:"ContractLayoutKey",strategy:"ContractLayoutHashingStrategy",layout:"ContractStorageLayout"},ContractLayoutHashingStrategy:{hasher:"ContractCryptoHasher",postfix:"Vec",prefix:"Vec"},ContractLayoutKey:"[u8; 32]",ContractLayoutStruct:{fields:"Vec"},ContractLayoutStructField:{layout:"ContractStorageLayout",name:"Text"},ContractStorageLayout:{_enum:{Cell:"ContractLayoutCell",Hash:"ContractLayoutHash",Array:"ContractLayoutArray",Struct:"ContractLayoutStruct",Enum:"ContractLayoutEnum"}},ContractConstructorSpecV0:{name:"Text",selector:"ContractSelector",args:"Vec",docs:"Vec"},ContractConstructorSpecV1:{name:"Vec",selector:"ContractSelector",args:"Vec",docs:"Vec"},ContractConstructorSpecV2:{label:"Text",selector:"ContractSelector",args:"Vec",docs:"Vec"},ContractConstructorSpecV3:{label:"Text",selector:"ContractSelector",payable:"bool",args:"Vec",docs:"Vec"},ContractConstructorSpecV4:{label:"Text",selector:"ContractSelector",payable:"bool",args:"Vec",docs:"Vec",default:"bool",returnType:"Option"},ContractContractSpecV0:{constructors:"Vec",messages:"Vec",events:"Vec",docs:"Vec"},ContractContractSpecV1:{constructors:"Vec",messages:"Vec",events:"Vec",docs:"Vec"},ContractContractSpecV2:{constructors:"Vec",messages:"Vec",events:"Vec",docs:"Vec"},ContractContractSpecV3:{constructors:"Vec",messages:"Vec",events:"Vec",docs:"Vec"},ContractContractSpecV4:{constructors:"Vec",messages:"Vec",events:"Vec",docs:"Vec",environment:"ContractEnvironmentV4"},ContractContractSpecV5:{constructors:"Vec",messages:"Vec",events:"Vec",docs:"Vec",environment:"ContractEnvironmentV4"},ContractDisplayName:"SiPath",ContractEventParamSpecV0:{name:"Text",indexed:"bool",type:"ContractTypeSpec",docs:"Vec"},ContractEventParamSpecV2:{label:"Text",indexed:"bool",type:"ContractTypeSpec",docs:"Vec"},ContractEventSpecV0:{name:"Text",args:"Vec",docs:"Vec"},ContractEventSpecV1:{name:"Text",args:"Vec",docs:"Vec"},ContractEventSpecV2:{label:"Text",args:"Vec",docs:"Vec"},ContractEventSpecV3:{label:"Text",args:"Vec",docs:"Vec",module_path:"Text",signature_topic:"Option<[u8; 32]>"},ContractMessageParamSpecV0:{name:"Text",type:"ContractTypeSpec"},ContractMessageParamSpecV2:{label:"Text",type:"ContractTypeSpec"},ContractMessageSpecV0:{name:"Text",selector:"ContractSelector",mutates:"bool",payable:"bool",args:"Vec",returnType:"Option",docs:"Vec"},ContractMessageSpecV1:{name:"Vec",selector:"ContractSelector",mutates:"bool",payable:"bool",args:"Vec",returnType:"Option",docs:"Vec"},ContractMessageSpecV2:{label:"Text",selector:"ContractSelector",mutates:"bool",payable:"bool",args:"Vec",returnType:"Option",docs:"Vec"},ContractMessageSpecV3:{label:"Text",selector:"ContractSelector",mutates:"bool",payable:"bool",args:"Vec",returnType:"Option",docs:"Vec",default:"bool"},ContractSelector:"[u8; 4]",ContractTypeSpec:{type:"SiLookupTypeId",displayName:"ContractDisplayName"},ContractConstructorSpecLatest:"ContractConstructorSpecV4",ContractEventSpecLatest:"ContractEventSpecV3",ContractEventParamSpecLatest:"ContractEventParamSpecV2",ContractMessageParamSpecLatest:"ContractMessageParamSpecV2",ContractMessageSpecLatest:"ContractMessageSpecV3",ContractMetadataLatest:"ContractMetadataV5",ContractProjectInfo:{source:"ContractProjectSource",contract:"ContractProjectContract"},ContractMetadataV0:{metadataVersion:"Text",types:"Vec",spec:"ContractContractSpecV0"},ContractMetadataV1:{types:"Vec",spec:"ContractContractSpecV1"},ContractMetadataV2:{types:"Vec",spec:"ContractContractSpecV2"},ContractMetadataV3:{types:"Vec",spec:"ContractContractSpecV3"},ContractMetadataV4:{types:"Vec",spec:"ContractContractSpecV4",version:"Text"},ContractMetadataV5:{types:"Vec",spec:"ContractContractSpecV5",version:"u64"},ContractMetadata:{_enum:{V0:"ContractMetadataV0",V1:"ContractMetadataV1",V2:"ContractMetadataV2",V3:"ContractMetadataV3",V4:"ContractMetadataV4",V5:"ContractMetadataV5"}},ContractProjectV0:{metadataVersion:"Text",source:"ContractProjectSource",contract:"ContractProjectContract",types:"Vec",spec:"ContractContractSpecV0"},ContractProject:"(ContractProjectInfo, ContractMetadata)",ContractProjectContract:{_alias:{docs:"documentation"},name:"Text",version:"Text",authors:"Vec",description:"Option",docs:"Option",repository:"Option",homepage:"Option",license:"Option"},ContractProjectSource:{_alias:{wasmHash:"hash"},wasmHash:"[u8; 32]",language:"Text",compiler:"Text",wasm:"Raw"},ContractEnvironmentV4:{_alias:{hashType:"hash"},accountId:"Option",balance:"Option",blockNumber:"Option",hashType:"Option",timestamp:"Option",maxEventTopics:"Option"}}},uf={account_basic:{description:"Returns pallet_evm::Accounts by address.",params:[{name:"address",type:"H160"}],type:"EvmAccount"},account_code_at:{description:"For a given account address, returns pallet_evm::AccountCodes.",params:[{name:"address",type:"H160"}],type:"Bytes"},author:{description:"Returns the converted FindAuthor::find_author authority id.",params:[],type:"H160"},call:{description:"Returns a frame_ethereum::call response. If `estimate` is true,",params:[{name:"from",type:"H160"},{name:"to",type:"H160"},{name:"data",type:"Vec"},{name:"value",type:"U256"},{name:"gasLimit",type:"U256"},{name:"maxFeePerGas",type:"Option"},{name:"maxPriorityFeePerGas",type:"Option"},{name:"nonce",type:"Option"},{name:"estimate",type:"bool"},{name:"accessList",type:"Option)>>"}],type:"Result"},chain_id:{description:"Returns runtime defined pallet_evm::ChainId.",params:[],type:"u64"},create:{description:"Returns a frame_ethereum::call response. If `estimate` is true,",params:[{name:"from",type:"H160"},{name:"data",type:"Vec"},{name:"value",type:"U256"},{name:"gasLimit",type:"U256"},{name:"maxFeePerGas",type:"Option"},{name:"maxPriorityFeePerGas",type:"Option"},{name:"nonce",type:"Option"},{name:"estimate",type:"bool"},{name:"accessList",type:"Option)>>"}],type:"Result"},current_all:{description:"Return all the current data for a block in a single runtime call.",params:[],type:"(Option, Option>, Option>)"},current_block:{description:"Return the current block.",params:[],type:"BlockV2"},current_receipts:{description:"Return the current receipt.",params:[],type:"Option>"},current_transaction_statuses:{description:"Return the current transaction status.",params:[],type:"Option>"},elasticity:{description:"Return the elasticity multiplier.",params:[],type:"Option"},extrinsic_filter:{description:"Receives a `Vec` and filters all the ethereum transactions.",params:[{name:"xts",type:"Vec"}],type:"Vec"},gas_price:{description:"Returns FixedGasPrice::min_gas_price",params:[],type:"u256"},storage_at:{description:"For a given account address and index, returns pallet_evm::AccountStorages.",params:[{name:"address",type:"H160"},{name:"index",type:"u256"}],type:"H256"}},lf={rpc:{listening:{aliasSection:"net",description:"Returns true if client is actively listening for network connections. Otherwise false.",params:[],type:"bool"},peerCount:{aliasSection:"net",description:"Returns number of peers connected to node.",params:[],type:"Text"},version:{aliasSection:"net",description:"Returns protocol version.",params:[],type:"Text"},clientVersion:{aliasSection:"web3",description:"Returns current client version.",params:[],type:"Text"},sha3:{aliasSection:"web3",description:"Returns sha3 of the given data",params:[{name:"data",type:"Bytes"}],type:"H256"},accounts:{description:"Returns accounts list.",params:[],type:"Vec"},blockNumber:{description:"Returns the blockNumber",params:[],type:"U256"},call:{description:"Call contract, returning the output data.",params:[{name:"request",type:"EthCallRequest"},{isHistoric:!0,isOptional:!0,name:"number",type:"BlockNumber"}],type:"Bytes"},chainId:{description:"Returns the chain ID used for transaction signing at the current best block. None is returned if not available.",params:[],type:"U64"},coinbase:{description:"Returns block author.",params:[],type:"H160"},estimateGas:{description:"Estimate gas needed for execution of given contract.",params:[{name:"request",type:"EthCallRequest"},{isHistoric:!0,isOptional:!0,name:"number",type:"BlockNumber"}],type:"U256"},feeHistory:{description:"Returns fee history for given block count & reward percentiles",params:[{name:"blockCount",type:"U256"},{name:"newestBlock",type:"BlockNumber"},{name:"rewardPercentiles",type:"Option>"}],type:"EthFeeHistory"},gasPrice:{description:"Returns current gas price.",params:[],type:"U256"},getBalance:{description:"Returns balance of the given account.",params:[{name:"address",type:"H160"},{isHistoric:!0,isOptional:!0,name:"number",type:"BlockNumber"}],type:"U256"},getBlockByHash:{description:"Returns block with given hash.",params:[{name:"hash",type:"H256"},{name:"full",type:"bool"}],type:"Option"},getBlockByNumber:{description:"Returns block with given number.",params:[{name:"block",type:"BlockNumber"},{name:"full",type:"bool"}],type:"Option"},getBlockTransactionCountByHash:{description:"Returns the number of transactions in a block with given hash.",params:[{name:"hash",type:"H256"}],type:"U256"},getBlockTransactionCountByNumber:{description:"Returns the number of transactions in a block with given block number.",params:[{name:"block",type:"BlockNumber"}],type:"U256"},getCode:{description:"Returns the code at given address at given time (block number).",params:[{name:"address",type:"H160"},{isHistoric:!0,isOptional:!0,name:"number",type:"BlockNumber"}],type:"Bytes"},getFilterChanges:{description:"Returns filter changes since last poll.",params:[{name:"index",type:"U256"}],type:"EthFilterChanges"},getFilterLogs:{description:"Returns all logs matching given filter (in a range 'from' - 'to').",params:[{name:"index",type:"U256"}],type:"Vec"},getLogs:{description:"Returns logs matching given filter object.",params:[{name:"filter",type:"EthFilter"}],type:"Vec"},getProof:{description:"Returns proof for account and storage.",params:[{name:"address",type:"H160"},{name:"storageKeys",type:"Vec"},{name:"number",type:"BlockNumber"}],type:"EthAccount"},getStorageAt:{description:"Returns content of the storage at given address.",params:[{name:"address",type:"H160"},{name:"index",type:"U256"},{isHistoric:!0,isOptional:!0,name:"number",type:"BlockNumber"}],type:"H256"},getTransactionByBlockHashAndIndex:{description:"Returns transaction at given block hash and index.",params:[{name:"hash",type:"H256"},{name:"index",type:"U256"}],type:"EthTransaction"},getTransactionByBlockNumberAndIndex:{description:"Returns transaction by given block number and index.",params:[{name:"number",type:"BlockNumber"},{name:"index",type:"U256"}],type:"EthTransaction"},getTransactionByHash:{description:"Get transaction by its hash.",params:[{name:"hash",type:"H256"}],type:"EthTransaction"},getTransactionCount:{description:"Returns the number of transactions sent from given address at given time (block number).",params:[{name:"address",type:"H160"},{isHistoric:!0,isOptional:!0,name:"number",type:"BlockNumber"}],type:"U256"},getTransactionReceipt:{description:"Returns transaction receipt by transaction hash.",params:[{name:"hash",type:"H256"}],type:"EthReceipt"},getUncleByBlockHashAndIndex:{description:"Returns an uncles at given block and index.",params:[{name:"hash",type:"H256"},{name:"index",type:"U256"}],type:"EthRichBlock"},getUncleByBlockNumberAndIndex:{description:"Returns an uncles at given block and index.",params:[{name:"number",type:"BlockNumber"},{name:"index",type:"U256"}],type:"EthRichBlock"},getUncleCountByBlockHash:{description:"Returns the number of uncles in a block with given hash.",params:[{name:"hash",type:"H256"}],type:"U256"},getUncleCountByBlockNumber:{description:"Returns the number of uncles in a block with given block number.",params:[{name:"number",type:"BlockNumber"}],type:"U256"},getWork:{description:"Returns the hash of the current block, the seedHash, and the boundary condition to be met.",params:[],type:"EthWork"},hashrate:{description:"Returns the number of hashes per second that the node is mining with.",params:[],type:"U256"},maxPriorityFeePerGas:{description:"Returns max priority fee per gas",params:[],type:"U256"},mining:{description:"Returns true if client is actively mining new blocks.",params:[],type:"bool"},newBlockFilter:{description:"Returns id of new block filter.",params:[],type:"U256"},newFilter:{description:"Returns id of new filter.",params:[{name:"filter",type:"EthFilter"}],type:"U256"},newPendingTransactionFilter:{description:"Returns id of new block filter.",params:[],type:"U256"},protocolVersion:{description:"Returns protocol version encoded as a string (quotes are necessary).",params:[],type:"u64"},sendRawTransaction:{description:"Sends signed transaction, returning its hash.",params:[{name:"bytes",type:"Bytes"}],type:"H256"},sendTransaction:{description:"Sends transaction; will block waiting for signer to return the transaction hash",params:[{name:"tx",type:"EthTransactionRequest"}],type:"H256"},submitHashrate:{description:"Used for submitting mining hashrate.",params:[{name:"index",type:"U256"},{name:"hash",type:"H256"}],type:"bool"},submitWork:{description:"Used for submitting a proof-of-work solution.",params:[{name:"nonce",type:"H64"},{name:"headerHash",type:"H256"},{name:"mixDigest",type:"H256"}],type:"bool"},subscribe:{description:"Subscribe to Eth subscription.",params:[{name:"kind",type:"EthSubKind"},{isOptional:!0,name:"params",type:"EthSubParams"}],pubsub:["subscription","subscribe","unsubscribe"],type:"Null"},syncing:{description:"Returns an object with data about the sync status or false.",params:[],type:"EthSyncStatus"},uninstallFilter:{description:"Uninstalls filter.",params:[{name:"index",type:"U256"}],type:"bool"}},runtime:{ConvertTransactionRuntimeApi:[{methods:{convert_transaction:{description:"Converts an Ethereum-style transaction to Extrinsic",params:[{name:"transaction",type:"TransactionV2"}],type:"Extrinsic"}},version:2}],DebugRuntimeApi:[{methods:{trace_block:{description:"Trace all block extrinsics",params:[{name:"extrinsics",type:"Vec"},{name:"knownTransactions",type:"Vec"}],type:"Result<(), DispatchError>"},trace_transaction:{description:"Trace transaction extrinsics",params:[{name:"extrinsics",type:"Vec"},{name:"transaction",type:"EthTransaction"}],type:"Result<(), DispatchError>"}},version:4}],EthereumRuntimeRPCApi:[{methods:{...uf},version:4},{methods:{...uf,call:{description:"Returns a frame_ethereum::call response. If `estimate` is true,",params:[{name:"from",type:"H160"},{name:"to",type:"H160"},{name:"data",type:"Vec"},{name:"value",type:"U256"},{name:"gasLimit",type:"U256"},{name:"maxFeePerGas",type:"Option"},{name:"maxPriorityFeePerGas",type:"Option"},{name:"nonce",type:"Option"},{name:"estimate",type:"bool"},{name:"accessList",type:"Option)>>"}],type:"Result"},create:{description:"Returns a frame_ethereum::call response. If `estimate` is true,",params:[{name:"from",type:"H160"},{name:"data",type:"Vec"},{name:"value",type:"U256"},{name:"gasLimit",type:"U256"},{name:"maxFeePerGas",type:"Option"},{name:"maxPriorityFeePerGas",type:"Option"},{name:"nonce",type:"Option"},{name:"estimate",type:"bool"},{name:"accessList",type:"Option)>>"}],type:"Result"}},version:5}]},types:{BlockV0:{header:"EthHeader",transactions:"Vec",ommers:"Vec"},LegacyTransaction:{nonce:"U256",gasPrice:"U256",gasLimit:"U256",action:"EthTransactionAction",value:"U256",input:"Bytes",signature:"EthTransactionSignature"},TransactionV0:"LegacyTransaction",BlockV1:{header:"EthHeader",transactions:"Vec",ommers:"Vec"},EIP2930Transaction:{chainId:"u64",nonce:"U256",gasPrice:"U256",gasLimit:"U256",action:"EthTransactionAction",value:"U256",input:"Bytes",accessList:"EthAccessList",oddYParity:"bool",r:"H256",s:"H256"},TransactionV1:{_enum:{Legacy:"LegacyTransaction",EIP2930:"EIP2930Transaction"}},BlockV2:{header:"EthHeader",transactions:"Vec",ommers:"Vec"},EIP1559Transaction:{chainId:"u64",nonce:"U256",maxPriorityFeePerGas:"U256",maxFeePerGas:"U256",gasLimit:"U256",action:"EthTransactionAction",value:"U256",input:"Bytes",accessList:"EthAccessList",oddYParity:"bool",r:"H256",s:"H256"},TransactionV2:{_enum:{Legacy:"LegacyTransaction",EIP2930:"EIP2930Transaction",EIP1559:"EIP1559Transaction"}},EthereumAccountId:"GenericEthereumAccountId",EthereumAddress:"GenericEthereumAccountId",EthereumLookupSource:"GenericEthereumLookupSource",EthereumSignature:"[u8; 65]",EthAccessListItem:{address:"EthAddress",slots:"Vec"},EthAccessList:"Vec",EthAccount:{address:"EthAddress",balance:"U256",nonce:"U256",codeHash:"H256",storageHash:"H256",accountProof:"Vec",storageProof:"Vec"},EthAddress:"H160",EthBlock:{header:"EthHeader",transactions:"Vec",ommers:"Vec"},EthHeader:{parentHash:"H256",ommersHash:"H256",beneficiary:"EthAddress",stateRoot:"H256",transactionsRoot:"H256",receiptsRoot:"H256",logsBloom:"EthBloom",difficulty:"U256",number:"U256",gasLimit:"U256",gasUsed:"U256",timestamp:"u64",extraData:"Bytes",mixMash:"H256",nonce:"H64"},EthRichBlock:{_alias:{blockHash:"hash",blockSize:"size"},blockHash:"Option",parentHash:"H256",sha3Uncles:"H256",author:"EthAddress",miner:"EthAddress",stateRoot:"H256",transactionsRoot:"H256",receiptsRoot:"H256",number:"Option",gasUsed:"U256",gasLimit:"U256",extraData:"Bytes",logsBloom:"EthBloom",timestamp:"U256",difficulty:"U256",totalDifficulty:"Option",sealFields:"Vec",uncles:"Vec",transactions:"Vec",blockSize:"Option"},EthBloom:"H2048",EthCallRequest:{from:"Option",to:"Option",gasPrice:"Option",gas:"Option",value:"Option",data:"Option",nonce:"Option"},EthFeeHistory:{oldestBlock:"U256",baseFeePerGas:"Vec",gasUsedRatio:"Vec",reward:"Option>>"},EthFilter:{fromBlock:"Option",toBlock:"Option",blockHash:"Option",address:"Option",topics:"Option"},EthFilterAddress:{_enum:{Single:"EthAddress",Multiple:"Vec",Null:"Null"}},EthFilterChanges:{_enum:{Logs:"Vec",Hashes:"Vec",Empty:"Null"}},EthFilterTopic:{_enum:{Single:"EthFilterTopicInner",Multiple:"Vec",Null:"Null"}},EthFilterTopicEntry:"Option",EthFilterTopicInner:{_enum:{Single:"EthFilterTopicEntry",Multiple:"Vec",Null:"Null"}},EthRichHeader:{_alias:{blockHash:"hash",blockSize:"size"},blockHash:"Option",parentHash:"H256",sha3Uncles:"H256",author:"EthAddress",miner:"EthAddress",stateRoot:"H256",transactionsRoot:"H256",receiptsRoot:"H256",number:"Option",gasUsed:"U256",gasLimit:"U256",extraData:"Bytes",logsBloom:"EthBloom",timestamp:"U256",difficulty:"U256",sealFields:"Vec",blockSize:"Option"},EthLog:{address:"EthAddress",topics:"Vec",data:"Bytes",blockHash:"Option",blockNumber:"Option",transactionHash:"Option",transactionIndex:"Option",logIndex:"Option",transactionLogIndex:"Option",removed:"bool"},EthReceipt:{transactionHash:"Option",transactionIndex:"Option",blockHash:"Option",from:"Option",to:"Option",blockNumber:"Option",cumulativeGasUsed:"U256",gasUsed:"Option",contractAddress:"Option",logs:"Vec",root:"Option",logsBloom:"EthBloom",statusCode:"Option"},EthReceiptV0:"EthReceipt",EthReceiptV3:"EthReceipt",EthStorageProof:{key:"U256",value:"U256",proof:"Vec"},EthSubKind:{_enum:["newHeads","logs","newPendingTransactions","syncing"]},EthSubParams:{_enum:{None:"Null",Logs:"EthFilter"}},EthSubResult:{_enum:{Header:"EthRichHeader",Log:"EthLog",TransactionHash:"H256",SyncState:"EthSyncStatus"}},EthSyncInfo:{startingBlock:"U256",currentBlock:"U256",highestBlock:"U256",warpChunksAmount:"Option",warpChunksProcessed:"Option"},EthSyncStatus:{_enum:{Info:"EthSyncInfo",None:"Null"}},EthTransaction:{hash:"H256",nonce:"U256",blockHash:"Option",blockNumber:"Option",transactionIndex:"Option",from:"H160",to:"Option",value:"U256",gasPrice:"Option",maxFeePerGas:"Option",maxPriorityFeePerGas:"Option",gas:"U256",input:"Bytes",creates:"Option",raw:"Bytes",publicKey:"Option",chainId:"Option",standardV:"U256",v:"U256",r:"U256",s:"U256",accessList:"Option>",transactionType:"Option"},EthTransactionSignature:{v:"u64",r:"H256",s:"H256"},EthTransactionAction:{_enum:{Call:"H160",Create:"Null"}},EthTransactionCondition:{_enum:{block:"u64",time:"u64"}},EthTransactionRequest:{from:"Option",to:"Option",gasPrice:"Option",gas:"Option",value:"Option",data:"Option",nonce:"Option"},EthTransactionStatus:{transactionHash:"H256",transactionIndex:"u32",from:"EthAddress",to:"Option",contractAddress:"Option",logs:"Vec",logsBloom:"EthBloom"},EthWork:{powHash:"H256",seedHash:"H256",target:"H256",number:"Option"}}},ff={rpc:{},runtime:{AuthorFilterAPI:[{methods:{can_author:{description:"The runtime api used to predict whether an author will be eligible in the given slot",params:[{name:"author",type:"AccountId"},{name:"relayParent",type:"u32"},{name:"parentHeader",type:"Header"}],type:"bool"}},version:2},{methods:{can_author:{description:"The runtime api used to predict whether an author will be eligible in the given slot",params:[{name:"author",type:"AccountId"},{name:"relayParent",type:"u32"}],type:"bool"}},version:1}],NimbusApi:[{methods:{can_author:{description:"The runtime api used to predict whether a Nimbus author will be eligible in the given slot",params:[{name:"author",type:"AccountId"},{name:"relayParent",type:"u32"},{name:"parentHeader",type:"Header"}],type:"bool"}},version:1}]},types:{}},pf={rpc:{},runtime:{OracleApi:[{methods:{get_all_values:{description:"Retrieves all values",params:[{name:"providerId",type:"Raw"}],type:"Raw"},get_value:{description:"Retrieves a single value",params:[{name:"providerId",type:"Raw"},{name:"key",type:"Raw"}],type:"Option"}},version:1}]},types:{}},hf={rpc:{},runtime:{TokensApi:[{methods:{query_existential_deposit:{description:"Query the existential amount for a specific currency",params:[{name:"currencyId",type:"Raw"}],type:"u128"}},version:1}]},types:{}},bf={rpc:{methods:{description:"Retrieves the list of RPC methods that are exposed by the node",params:[],type:"RpcMethods"}},types:{RpcMethods:{version:"u32",methods:"Vec"}}},mf={rpc:{hasKey:{description:"Returns true if the keystore has private keys for the given public key and key type.",isUnsafe:!0,params:[{name:"publicKey",type:"Bytes"},{name:"keyType",type:"Text"}],type:"bool"},hasSessionKeys:{description:"Returns true if the keystore has private keys for the given session public keys.",isUnsafe:!0,params:[{name:"sessionKeys",type:"Bytes"}],type:"bool"},insertKey:{description:"Insert a key into the keystore.",isUnsafe:!0,params:[{name:"keyType",type:"Text"},{name:"suri",type:"Text"},{name:"publicKey",type:"Bytes"}],type:"Bytes"},pendingExtrinsics:{description:"Returns all pending extrinsics, potentially grouped by sender",params:[],type:"Vec"},removeExtrinsic:{description:"Remove given extrinsic from the pool and temporarily ban it to prevent reimporting",isUnsafe:!0,params:[{name:"bytesOrHash",type:"Vec"}],type:"Vec"},rotateKeys:{description:"Generate new session keys and returns the corresponding public keys",isUnsafe:!0,params:[],type:"Bytes"},submitAndWatchExtrinsic:{description:"Submit and subscribe to watch an extrinsic until unsubscribed",isSigned:!0,params:[{name:"extrinsic",type:"Extrinsic"}],pubsub:["extrinsicUpdate","submitAndWatchExtrinsic","unwatchExtrinsic"],type:"ExtrinsicStatus"},submitExtrinsic:{description:"Submit a fully formatted extrinsic for block inclusion",isSigned:!0,params:[{name:"extrinsic",type:"Extrinsic"}],type:"Hash"}},types:{ExtrinsicOrHash:{_enum:{Hash:"Hash",Extrinsic:"Bytes"}},ExtrinsicStatus:{_enum:{Future:"Null",Ready:"Null",Broadcast:"Vec",InBlock:"Hash",Retracted:"Hash",FinalityTimeout:"Hash",Finalized:"Hash",Usurped:"Hash",Dropped:"Null",Invalid:"Null"}}}},yf={rpc:{getBlock:{description:"Get header and body of a relay chain block",params:[{isHistoric:!0,isOptional:!0,name:"hash",type:"BlockHash"}],type:"SignedBlock"},getBlockHash:{description:"Get the block hash for a specific block",params:[{isOptional:!0,name:"blockNumber",type:"BlockNumber"}],type:"BlockHash"},getFinalizedHead:{alias:["chain_getFinalisedHead"],description:"Get hash of the last finalized block in the canon chain",params:[],type:"BlockHash"},getHeader:{alias:["chain_getHead"],description:"Retrieves the header for a specific block",params:[{isHistoric:!0,isOptional:!0,name:"hash",type:"BlockHash"}],type:"Header"},subscribeAllHeads:{description:"Retrieves the newest header via subscription",params:[],pubsub:["allHead","subscribeAllHeads","unsubscribeAllHeads"],type:"Header"},subscribeFinalizedHeads:{alias:["chain_subscribeFinalisedHeads","chain_unsubscribeFinalisedHeads"],description:"Retrieves the best finalized header via subscription",params:[],pubsub:["finalizedHead","subscribeFinalizedHeads","unsubscribeFinalizedHeads"],type:"Header"},subscribeNewHeads:{alias:["chain_unsubscribeNewHeads","subscribe_newHead","unsubscribe_newHead"],description:"Retrieves the best header via subscription",params:[],pubsub:["newHead","subscribeNewHead","unsubscribeNewHead"],type:"Header"}},types:{BlockHash:"Hash"}},xf={rpc:{getKeys:{description:"Returns the keys with prefix from a child storage, leave empty to get all the keys",params:[{name:"childKey",type:"PrefixedStorageKey"},{name:"prefix",type:"StorageKey"},{isHistoric:!0,isOptional:!0,name:"at",type:"Hash"}],type:"Vec"},getKeysPaged:{alias:["childstate_getKeysPagedAt"],description:"Returns the keys with prefix from a child storage with pagination support",params:[{name:"childKey",type:"PrefixedStorageKey"},{name:"prefix",type:"StorageKey"},{name:"count",type:"u32"},{isOptional:!0,name:"startKey",type:"StorageKey"},{isHistoric:!0,isOptional:!0,name:"at",type:"Hash"}],type:"Vec"},getStorage:{description:"Returns a child storage entry at a specific block state",params:[{name:"childKey",type:"PrefixedStorageKey"},{name:"key",type:"StorageKey"},{isHistoric:!0,isOptional:!0,name:"at",type:"Hash"}],type:"Option"},getStorageEntries:{description:"Returns child storage entries for multiple keys at a specific block state",params:[{name:"childKey",type:"PrefixedStorageKey"},{name:"keys",type:"Vec"},{isHistoric:!0,isOptional:!0,name:"at",type:"Hash"}],type:"Vec>"},getStorageHash:{description:"Returns the hash of a child storage entry at a block state",params:[{name:"childKey",type:"PrefixedStorageKey"},{name:"key",type:"StorageKey"},{isHistoric:!0,isOptional:!0,name:"at",type:"Hash"}],type:"Option"},getStorageSize:{description:"Returns the size of a child storage entry at a block state",params:[{name:"childKey",type:"PrefixedStorageKey"},{name:"key",type:"StorageKey"},{isHistoric:!0,isOptional:!0,name:"at",type:"Hash"}],type:"Option"}},types:{PrefixedStorageKey:"StorageKey"}},gf={rpc:{localStorageGet:{description:"Get offchain local storage under given key and prefix",isUnsafe:!0,params:[{name:"kind",type:"StorageKind"},{name:"key",type:"Bytes"}],type:"Option"},localStorageSet:{description:"Set offchain local storage under given key and prefix",isUnsafe:!0,params:[{name:"kind",type:"StorageKind"},{name:"key",type:"Bytes"},{name:"value",type:"Bytes"}],type:"Null"}},runtime:{OffchainWorkerApi:[{methods:{offchain_worker:{description:"Starts the off-chain task for given block header.",params:[{name:"header",type:"Header"}],type:"Null"}},version:2},{methods:{offchain_worker:{description:"Starts the off-chain task for given block header.",params:[{name:"number",type:"BlockNumber"}],type:"Null"}},version:1}]},types:{StorageKind:{_enum:{PERSISTENT:1,LOCAL:2}}}},vf={query_fee_details:{description:"The transaction fee details",params:[{name:"uxt",type:"Extrinsic"},{name:"len",type:"u32"}],type:"FeeDetails"}},wf={query_call_fee_details:{description:"The call fee details",params:[{name:"call",type:"Call"},{name:"len",type:"u32"}],type:"FeeDetails"}},Vf={query_info:{description:"The transaction info",params:[{name:"uxt",type:"Extrinsic"},{name:"len",type:"u32"}],type:"RuntimeDispatchInfo"}},Tf={query_call_info:{description:"The call info",params:[{name:"call",type:"Call"},{name:"len",type:"u32"}],type:"RuntimeDispatchInfo"}},Sf={query_length_to_fee:{description:"Query the output of the current LengthToFee given some input",params:[{name:"length",type:"u32"}],type:"Balance"},query_weight_to_fee:{description:"Query the output of the current WeightToFee given some input",params:[{name:"weight",type:"Weight"}],type:"Balance"}},kf={rpc:{queryFeeDetails:{deprecated:"Use `api.call.transactionPaymentApi.queryFeeDetails` instead",description:"Query the detailed fee of a given encoded extrinsic",params:[{name:"extrinsic",type:"Bytes"},{isHistoric:!0,isOptional:!0,name:"at",type:"BlockHash"}],type:"FeeDetails"},queryInfo:{deprecated:"Use `api.call.transactionPaymentApi.queryInfo` instead",description:"Retrieves the fee information for an encoded extrinsic",params:[{name:"extrinsic",type:"Bytes"},{isHistoric:!0,isOptional:!0,name:"at",type:"BlockHash"}],type:"RuntimeDispatchInfoV1"}},runtime:{TransactionPaymentApi:[{methods:{...Sf,...Vf,...vf},version:4},{methods:{...Sf,...Vf,...vf},version:3},{methods:{...Vf,...vf},version:2},{methods:{query_info:{description:"The transaction info",params:[{name:"uxt",type:"Extrinsic"},{name:"len",type:"u32"}],type:"RuntimeDispatchInfo"},...vf},version:1}],TransactionPaymentCallApi:[{methods:{...Sf,...Tf,...wf},version:3},{methods:{...Tf,...wf},version:2},{methods:{CALL:{description:"The call info",params:[{name:"call",type:"Call"},{name:"len",type:"u32"}],type:"RuntimeDispatchInfo"},...wf},version:1}]},types:{FeeDetails:{inclusionFee:"Option"},InclusionFee:{baseFee:"Balance",lenFee:"Balance",adjustedWeightFee:"Balance"},RuntimeDispatchInfo:{weight:"Weight",class:"DispatchClass",partialFee:"Balance"},RuntimeDispatchInfoV1:{weight:"WeightV1",class:"DispatchClass",partialFee:"Balance"},RuntimeDispatchInfoV2:{weight:"WeightV2",class:"DispatchClass",partialFee:"Balance"}}},_f={rpc:{call:{alias:["state_callAt"],description:"Perform a call to a builtin on the chain",params:[{name:"method",type:"Text"},{name:"data",type:"Bytes"},{isHistoric:!0,isOptional:!0,name:"at",type:"BlockHash"}],type:"Bytes"},getChildKeys:{description:"Retrieves the keys with prefix of a specific child storage",params:[{name:"childStorageKey",type:"StorageKey"},{name:"childDefinition",type:"StorageKey"},{name:"childType",type:"u32"},{name:"key",type:"StorageKey"},{isHistoric:!0,isOptional:!0,name:"at",type:"BlockHash"}],type:"Vec"},getChildReadProof:{description:"Returns proof of storage for child key entries at a specific block state.",params:[{name:"childStorageKey",type:"PrefixedStorageKey"},{name:"keys",type:"Vec"},{isHistoric:!0,isOptional:!0,name:"at",type:"BlockHash"}],type:"ReadProof"},getChildStorage:{description:"Retrieves the child storage for a key",params:[{name:"childStorageKey",type:"StorageKey"},{name:"childDefinition",type:"StorageKey"},{name:"childType",type:"u32"},{name:"key",type:"StorageKey"},{isHistoric:!0,isOptional:!0,name:"at",type:"BlockHash"}],type:"StorageData"},getChildStorageHash:{description:"Retrieves the child storage hash",params:[{name:"childStorageKey",type:"StorageKey"},{name:"childDefinition",type:"StorageKey"},{name:"childType",type:"u32"},{name:"key",type:"StorageKey"},{isHistoric:!0,isOptional:!0,name:"at",type:"BlockHash"}],type:"Hash"},getChildStorageSize:{description:"Retrieves the child storage size",params:[{name:"childStorageKey",type:"StorageKey"},{name:"childDefinition",type:"StorageKey"},{name:"childType",type:"u32"},{name:"key",type:"StorageKey"},{isHistoric:!0,isOptional:!0,name:"at",type:"BlockHash"}],type:"u64"},getKeys:{deprecated:"Use `api.rpc.state.getKeysPaged` to retrieve keys",description:"Retrieves the keys with a certain prefix",params:[{name:"key",type:"StorageKey"},{isHistoric:!0,isOptional:!0,name:"at",type:"BlockHash"}],type:"Vec"},getKeysPaged:{alias:["state_getKeysPagedAt"],description:"Returns the keys with prefix with pagination support.",params:[{name:"key",type:"StorageKey"},{name:"count",type:"u32"},{isOptional:!0,name:"startKey",type:"StorageKey"},{isHistoric:!0,isOptional:!0,name:"at",type:"BlockHash"}],type:"Vec"},getMetadata:{description:"Returns the runtime metadata",params:[{isHistoric:!0,isOptional:!0,name:"at",type:"BlockHash"}],type:"Metadata"},getPairs:{deprecated:"Use `api.rpc.state.getKeysPaged` to retrieve keys",description:"Returns the keys with prefix, leave empty to get all the keys (deprecated: Use getKeysPaged)",isUnsafe:!0,params:[{name:"prefix",type:"StorageKey"},{isHistoric:!0,isOptional:!0,name:"at",type:"BlockHash"}],type:"Vec"},getReadProof:{description:"Returns proof of storage entries at a specific block state",params:[{name:"keys",type:"Vec"},{isHistoric:!0,isOptional:!0,name:"at",type:"BlockHash"}],type:"ReadProof"},getRuntimeVersion:{alias:["chain_getRuntimeVersion"],description:"Get the runtime version",params:[{isHistoric:!0,isOptional:!0,name:"at",type:"BlockHash"}],type:"RuntimeVersion"},getStorage:{alias:["state_getStorageAt"],description:"Retrieves the storage for a key",params:[{name:"key",type:"StorageKey"},{isHistoric:!0,isOptional:!0,name:"at",type:"BlockHash"}],type:"StorageData"},getStorageHash:{alias:["state_getStorageHashAt"],description:"Retrieves the storage hash",params:[{name:"key",type:"StorageKey"},{isHistoric:!0,isOptional:!0,name:"at",type:"BlockHash"}],type:"Hash"},getStorageSize:{alias:["state_getStorageSizeAt"],description:"Retrieves the storage size",params:[{name:"key",type:"StorageKey"},{isHistoric:!0,isOptional:!0,name:"at",type:"BlockHash"}],type:"u64"},queryStorage:{description:"Query historical storage entries (by key) starting from a start block",isUnsafe:!0,params:[{name:"keys",type:"Vec"},{name:"fromBlock",type:"Hash"},{isOptional:!0,name:"toBlock",type:"BlockHash"}],type:"Vec"},queryStorageAt:{description:"Query storage entries (by key) starting at block hash given as the second parameter",params:[{name:"keys",type:"Vec"},{isHistoric:!0,isOptional:!0,name:"at",type:"BlockHash"}],type:"Vec"},subscribeRuntimeVersion:{alias:["chain_subscribeRuntimeVersion","chain_unsubscribeRuntimeVersion"],description:"Retrieves the runtime version via subscription",params:[],pubsub:["runtimeVersion","subscribeRuntimeVersion","unsubscribeRuntimeVersion"],type:"RuntimeVersion"},subscribeStorage:{description:"Subscribes to storage changes for the provided keys",params:[{isOptional:!0,name:"keys",type:"Vec"}],pubsub:["storage","subscribeStorage","unsubscribeStorage"],type:"StorageChangeSet"},traceBlock:{description:"Provides a way to trace the re-execution of a single block",isUnsafe:!0,params:[{name:"block",type:"Hash"},{name:"targets",type:"Option"},{name:"storageKeys",type:"Option"},{name:"methods",type:"Option"}],type:"TraceBlockResponse"},trieMigrationStatus:{description:"Check current migration state",isUnsafe:!0,params:[{isHistoric:!0,isOptional:!0,name:"at",type:"BlockHash"}],type:"MigrationStatusResult"}},types:{ApiId:"[u8; 8]",BlockTrace:{blockHash:"Text",parentHash:"Text",tracingTargets:"Text",storageKeys:"Text",spans:"Vec",events:"Vec"},BlockTraceEvent:{target:"Text",data:"BlockTraceEventData",parentId:"Option"},BlockTraceEventData:{stringValues:"HashMap"},BlockTraceSpan:{id:"u64",parentId:"Option",name:"Text",target:"Text",wasm:"bool"},KeyValueOption:"(StorageKey, Option)",MigrationStatusResult:{topRemainingToMigrate:"u64",childRemainingToMigrate:"u64"},ReadProof:{at:"Hash",proof:"Vec"},RuntimeVersionApi:"(ApiId, u32)",RuntimeVersion:{specName:"Text",implName:"Text",authoringVersion:"u32",specVersion:"u32",implVersion:"u32",apis:"Vec",transactionVersion:"u32",stateVersion:"u8"},RuntimeVersionPre4:{specName:"Text",implName:"Text",authoringVersion:"u32",specVersion:"u32",implVersion:"u32",apis:"Vec",transactionVersion:"u32"},RuntimeVersionPre3:{specName:"Text",implName:"Text",authoringVersion:"u32",specVersion:"u32",implVersion:"u32",apis:"Vec"},RuntimeVersionPartial:{specName:"Text",specVersion:"u32",apis:"Vec"},SpecVersion:"u32",StorageChangeSet:{block:"Hash",changes:"Vec"},TraceBlockResponse:{_enum:{TraceError:"TraceError",BlockTrace:"BlockTrace"}},TraceError:{error:"Text"}}};function Pf(e,{type:t},n,r){const a={},i=e.getSiType(t).def.asVariant.variants;for(let s=0,o=i.length;se(t)}const If=Mf(jt),Nf=Mf((e=>e.toString()));function Ef({calls:e}){return e.isSome}function Of(e,t,n,r,a){const{fields:i,index:s}=n,o=i.length,c=new Array(o);for(let d=0;d{if(a.length!==s.length)throw new Error(`Extrinsic ${t}.${i} expects ${a.length} arguments, got ${s.length}.`);return e.createTypeUnsafe("Call",[{args:s,callIndex:n},r])};return s.is=e=>function(e,t){return e.callIndex[0]===t[0]&&e.callIndex[1]===t[1]}(e,n),s.callIndex=n,s.meta=r,s.method=i,s.section=t,s.toJSON=()=>r.toJSON(),s}(e,r,new Uint8Array([a,s.toNumber()]),e.createTypeUnsafe("FunctionMetadataLatest",[(0,M.b)({args:c},n)]))}function Af(e,{lookup:t,pallets:n},r){const a={},i=n.filter(Ef);for(let s=0,o=i.length;s=12?o.toNumber():s;Qr(a,d,(()=>Pf(t,n.unwrap(),If,(n=>Of(e,t,n,d,u)))))}return a}function Cf(e,t){return(0,M.b)({args:t.fields.map((({type:t})=>e.getTypeDef(t).type))},t)}function Hf(e,{lookup:t,pallets:n},r){const a={};for(let i=0,s=n.length;i=12?o.toNumber():i;Qr(a,jt(c),(()=>Pf(t,s.unwrap(),Nf,(r=>({is:e=>fn(e)&&fn(e.index)&&e.index.eq(n)&&((0,ut.b)(e.error)?e.error[0]===r.index.toNumber():fn(e.error)&&e.error.eq(r.index)),meta:e.createTypeUnsafe("ErrorMetadataLatest",[Cf(t,r)])})))))}}return a}function Rf({events:e}){return e.isSome}function Bf(e,{lookup:t,pallets:n},r){const a={},i=n.filter(Rf);for(let s=0,o=i.length;s=12?o.toNumber():s;Qr(a,jt(c),(()=>Pf(t,n.unwrap(),Nf,(n=>({is:e=>fn(e)&&(0,ut.b)(e.index)&&d===e.index[0]&&n.index.eq(e.index[1]),meta:e.createTypeUnsafe("EventMetadataLatest",[Cf(t,n)])})))))}return a}function Lf(e,{pallets:t},n){const r={};for(let a=0,i=t.length;a$r({},n,(t=>{const n=e.createTypeUnsafe(e.createLookupType(t.type),[(0,ts.V)(t.value.toHex())]);return n.meta=t,n}),If)))}return r}function zf(e){const t=e.map((e=>e.toString().trim())),n=t.findIndex((e=>!e.length));return-1===n?t:t.slice(0,n)}function Uf(e,{extrinsic:t,lookup:n,pallets:r}){return e.createTypeUnsafe("MetadataLatest",[{extrinsic:t,lookup:{types:n.types.map((({id:t,type:n})=>e.createTypeUnsafe("PortableType",[{id:t,type:(0,M.b)({},n,{docs:zf(n.docs)})}])))},pallets:r.map((({calls:t,index:n,name:r})=>({calls:e.createTypeUnsafe("Option",[t.unwrapOr(null)]),index:n,name:r})))}]).toJSON()}function Df(e,t=[]){for(let n=0,r=e.length;ne||t)))}function Ff(e,{info:t}){throw new Error(`Unhandled: Unable to create and validate type from ${e} (info=${mr[t]})`)}const Xf={[mr.BTreeMap]:jf,[mr.BTreeSet]:qf,[mr.Compact]:qf,[mr.DoNotConstruct]:Ff,[mr.Enum]:jf,[mr.HashMap]:jf,[mr.Int]:Ff,[mr.Linkage]:qf,[mr.Null]:Ff,[mr.Option]:qf,[mr.Plain]:(e,t)=>t.lookupName||t.type,[mr.Range]:qf,[mr.RangeInclusive]:qf,[mr.Result]:jf,[mr.Set]:jf,[mr.Si]:Ff,[mr.Struct]:jf,[mr.Tuple]:jf,[mr.UInt]:Ff,[mr.Vec]:qf,[mr.VecFixed]:qf,[mr.WrapperKeepOpaque]:qf,[mr.WrapperOpaque]:qf};function Wf(e){const t=e.length,n=new Array(t);for(let r=0;re.getTypeDef(t).type))}function Kf(e,t){return e.getSiType(t).def.asVariant.variants.map((({fields:t})=>Gf(e,t)))}function Jf(e,t,n){return function(e,t,n){const r=Df(Wf(n)).filter((t=>!e.hasType(t)&&!e.isLookupType(t))).sort();if(0!==r.length){const e=`Unknown types found, no types for ${r.join(", ")}`;if(t)throw new Error(e);Zf.warn(e)}return n}(e,n,Df(function({lookup:e,pallets:t}){return t.reduce(((t,{calls:n,constants:r,events:a,storage:i})=>(t.push([Gf(e,r)]),n.isSome&&t.push(Kf(e,n.unwrap().type)),a.isSome&&t.push(Kf(e,a.unwrap().type)),i.isSome&&t.push(i.unwrap().items.map((({type:t})=>{if(t.isPlain)return[e.getTypeDef(t.asPlain).type];const{hashers:n,key:r,value:a}=t.asMap;return 1===n.length?[e.getTypeDef(a).type,e.getTypeDef(r).type]:[e.getTypeDef(a).type,...e.getSiType(r).def.asTuple.map((t=>e.getTypeDef(t).type))]}))),t)),[])}(t)))}function Yf(e,t){return t.toNumber()>=2?e.createTypeUnsafe("StorageHasherV10",[t.toNumber()+1]):e.createTypeUnsafe("StorageHasherV10",[t])}function Qf(e,t){return t.isMap?[(0,M.b)({},t.asMap,{hasher:Yf(e,t.asMap.hasher)}),1]:t.isDoubleMap?[(0,M.b)({},t.asDoubleMap,{hasher:Yf(e,t.asDoubleMap.hasher),key2Hasher:Yf(e,t.asDoubleMap.key2Hasher)}),2]:[t.asPlain,0]}function $f(e,{modules:t}){return e.createTypeUnsafe("MetadataV10",[{modules:t.map((t=>function(e,t){const n=t.storage.unwrapOr(null);return e.createTypeUnsafe("ModuleMetadataV10",[(0,M.b)({},t,{storage:n?(0,M.b)({},n,{items:n.items.map((t=>(0,M.b)({},t,{type:e.createTypeUnsafe("StorageEntryTypeV10",Qf(e,t.type))})))}):null})])}(e,t)))}])}function ep(e,{modules:t}){return e.createTypeUnsafe("MetadataV11",[{extrinsic:{signedExtensions:[],version:0},modules:t}])}function tp(e,{extrinsic:t,modules:n}){return e.createTypeUnsafe("MetadataV12",[{extrinsic:t,modules:n.map((t=>e.createTypeUnsafe("ModuleMetadataV12",[(0,M.b)({},t,{index:255})])))}])}function np(e,t){return e.createTypeUnsafe("MetadataV13",[t])}const rp={assets:{Approval:"AssetApproval",ApprovalKey:"AssetApprovalKey",Balance:"TAssetBalance",DestroyWitness:"AssetDestroyWitness"},babe:{EquivocationProof:"BabeEquivocationProof"},balances:{Status:"BalanceStatus"},beefy:{AuthorityId:"BeefyId"},contracts:{StorageKey:"ContractStorageKey"},electionProviderMultiPhase:{Phase:"ElectionPhase"},ethereum:{Block:"EthBlock",Header:"EthHeader",Receipt:"EthReceipt",Transaction:"EthTransaction",TransactionStatus:"EthTransactionStatus"},evm:{Account:"EvmAccount",Log:"EvmLog",Vicinity:"EvmVicinity"},grandpa:{Equivocation:"GrandpaEquivocation",EquivocationProof:"GrandpaEquivocationProof"},identity:{Judgement:"IdentityJudgement"},inclusion:{ValidatorIndex:"ParaValidatorIndex"},paraDisputes:{ValidatorIndex:"ParaValidatorIndex"},paraInclusion:{ValidatorIndex:"ParaValidatorIndex"},paraScheduler:{ValidatorIndex:"ParaValidatorIndex"},paraShared:{ValidatorIndex:"ParaValidatorIndex"},parachains:{Id:"ParaId"},parasDisputes:{ValidatorIndex:"ParaValidatorIndex"},parasInclusion:{ValidatorIndex:"ParaValidatorIndex"},parasScheduler:{ValidatorIndex:"ParaValidatorIndex"},parasShared:{ValidatorIndex:"ParaValidatorIndex"},proposeParachain:{Proposal:"ParachainProposal"},proxy:{Announcement:"ProxyAnnouncement"},scheduler:{ValidatorIndex:"ParaValidatorIndex"},shared:{ValidatorIndex:"ParaValidatorIndex"},society:{Judgement:"SocietyJudgement",Vote:"SocietyVote"},staking:{Compact:"CompactAssignments"},treasury:{Proposal:"TreasuryProposal"},xcm:{AssetId:"XcmAssetId"},xcmPallet:{AssetId:"XcmAssetId"}};const ap=[["<",">"],["<",","],[",",">"],["(",")"],["(",","],[",",","],[",",")"]];function ip(e,t){const n=t.toString(),r=e.findIndex((({def:e})=>e.HistoricMetaCompat===n));return-1!==r?r:e.push({def:{HistoricMetaCompat:n}})-1}function sp(e,t){return e.push({def:{Tuple:t}})-1}function op(e,t,n,r){return n.push({def:{Variant:{variants:r}},path:[`pallet_${e.toString()}`,"pallet",t]})-1}function cp(e,t){t.forEach((t=>{const n=Object.keys(e).find((e=>t.eq(e)));if(n)t.setOverride(e[n]);else{const n=t.toString(),r=Object.entries(e).reduce(((e,[t,n])=>ap.reduce(((e,[r,a])=>e.replace(`${r}${t}${a}`,`${r}${n}${a}`)),e)),n);n!==r&&t.setOverride(r)}}))}function dp(e,t,n,r,a){const i=r.map((({args:n,docs:r,name:i},s)=>(cp(a,n.map((({type:e})=>e))),t.createTypeUnsafe("SiVariant",[{docs:r,fields:n.map((({name:n,type:r})=>t.createTypeUnsafe("SiField",[{name:n,type:ip(e,r)}]))),index:s,name:i}]))));return t.createTypeUnsafe("PalletCallMetadataV14",[{type:op(n,"Call",e,i)}])}function up(e,t,n,r){return n.map((({docs:n,name:a,type:i,value:s})=>(cp(r,[i]),t.createTypeUnsafe("PalletConstantMetadataV14",[{docs:n,name:a,type:ip(e,i),value:s}]))))}function lp(e,t,n,r,a){const i=r.map((({docs:e,name:n},r)=>t.createTypeUnsafe("SiVariant",[{docs:e,fields:[],index:r,name:n}])));return t.createTypeUnsafe("PalletErrorMetadataV14",[{type:op(n,"Error",e,i)}])}function fp(e,t,n,r,a){const i=r.map((({args:n,docs:r,name:i},s)=>(cp(a,n),t.createTypeUnsafe("SiVariant",[{docs:r,fields:n.map((n=>t.createTypeUnsafe("SiField",[{type:ip(e,n)}]))),index:s,name:i}]))));return t.createTypeUnsafe("PalletEventMetadataV14",[{type:op(n,"Event",e,i)}])}function pp(e,t,n,{hashers:r,isLinked:a,isOptional:i,keys:s,value:o}){return cp(n,[o,...Array.isArray(s)?s:[s]]),t.createTypeUnsafe("StorageEntryTypeV14",[{Map:{hashers:r,key:1===r.length?ip(e,s[0]):sp(e,s.map((t=>ip(e,t)))),value:ip(e,a?`(${i?`Option<${o.toString()}>`:o.toString()}, Linkage<${s[0].toString()}>)`:o)}}])}function hp(e,t,{items:n,prefix:r},a){return t.createTypeUnsafe("PalletStorageMetadataV14",[{items:n.map((({docs:n,fallback:r,modifier:i,name:s,type:o})=>{let c;if(o.isPlain){const n=o.asPlain;cp(a,[n]),c=t.createTypeUnsafe("StorageEntryTypeV14",[{Plain:ip(e,n)}])}else if(o.isMap){const n=o.asMap;c=pp(e,t,a,{hashers:[n.hasher],isLinked:n.linked.isTrue,isOptional:i.isOptional,keys:[n.key],value:n.value})}else if(o.isDoubleMap){const n=o.asDoubleMap;c=pp(e,t,a,{hashers:[n.hasher,n.key2Hasher],isLinked:!1,isOptional:i.isOptional,keys:[n.key1,n.key2],value:n.value})}else{const n=o.asNMap;c=pp(e,t,a,{hashers:n.hashers,isLinked:!1,isOptional:i.isOptional,keys:n.keyVec,value:n.value})}return t.createTypeUnsafe("StorageEntryMetadataV14",[{docs:n,fallback:r,modifier:i,name:s,type:c}])})),prefix:r}])}function bp(e,t,n,{calls:r,constants:a,errors:i,events:s,storage:o}){const c=function({knownTypes:e},t){return{...rp[t]??{},...e.typesAlias?.[t]??{}}}(t,jt(n.name));return t.createTypeUnsafe("PalletMetadataV14",[{calls:r&&dp(e,t,n.name,r,c),constants:up(e,t,a,c),errors:i&&lp(e,t,n.name,i),events:s&&fp(e,t,n.name,s,c),index:n.index,name:n.name,storage:o&&hp(e,t,o,c)}])}function mp(e,t,n){const r=[];!function(e,...t){for(let n=0,r=t.length;n[e.name.toString(),n>=12?e.index.toNumber():t])).sort(((e,t)=>e[1]-t[1])).reduce(((e,[t,n])=>{for(let r=Object.keys(e).length;r({identifier:e,type:0}))),type:0,version:n}])}(e,t.extrinsic),i=t.modules.map((t=>bp(r,e,t,{calls:t.calls.unwrapOr(null),constants:t.constants,errors:t.errors.length?t.errors:null,events:t.events.unwrapOr(null),storage:t.storage.unwrapOr(null)})));return e.createTypeUnsafe("MetadataV14",[{extrinsic:a,lookup:{types:r.map(((t,n)=>e.createTypeUnsafe("PortableType",[{id:n,type:t}])))},pallets:i}])}function yp(e,t,n){const r=t.lookup.paramTypes.SpRuntimeUncheckedExtrinsic;return e.createTypeUnsafe("MetadataV15",[(0,M.b)({},t,{extrinsic:e.createTypeUnsafe("ExtrinsicMetadataV15",[(0,M.b)({},t.extrinsic,{addressType:r?.[0].type.unwrapOr(0),callType:r?.[1].type.unwrapOr(0),extraType:r?.[3].type.unwrapOr(0),signatureType:r?.[2].type.unwrapOr(0)})]),outerEnums:e.createTypeUnsafe("OuterEnums15",[{callType:r?.[1].type.unwrapOr(0),eventType:t.lookup.paramTypes.FrameSystemEventRecord?.[0].type.unwrapOr(0)}])})])}function xp(e,t,n){return t}const gp=1635018093;class vp extends xo{constructor(e,t){if(super(e,t),!this.isEmpty&&!this.eq(gp))throw new Error(`MagicNumber mismatch: expected ${e.createTypeUnsafe("u32",[gp]).toHex()}, found ${this.toHex()}`)}}class wp extends dn{__internal__converted=new Map;constructor(e,t){super(e,{magicNumber:vp,metadata:"MetadataAll"},t)}__internal__assertVersion=e=>{if(this.version>e)throw new Error(`Cannot convert metadata from version ${this.version} to ${e}`);return this.version===e};__internal__getVersion=(e,t)=>{if("latest"!==e&&this.__internal__assertVersion(e)){const t=`asV${e}`;return this.__internal__metadata()[t]}if(!this.__internal__converted.has(e)){const n="latest"===e?"asV15":"asV"+(e-1);this.__internal__converted.set(e,t(this.registry,this[n],this.version))}return this.__internal__converted.get(e)};__internal__metadata=()=>this.getT("metadata");get asCallsOnly(){return new wp(this.registry,{magicNumber:this.magicNumber,metadata:this.registry.createTypeUnsafe("MetadataAll",[Uf(this.registry,this.asLatest),14])})}get asV9(){return this.__internal__assertVersion(9),this.__internal__metadata().asV9}get asV10(){return this.__internal__getVersion(10,$f)}get asV11(){return this.__internal__getVersion(11,ep)}get asV12(){return this.__internal__getVersion(12,tp)}get asV13(){return this.__internal__getVersion(13,np)}get asV14(){return this.__internal__getVersion(14,mp)}get asV15(){return this.__internal__getVersion(15,yp)}get asLatest(){return this.__internal__getVersion("latest",xp)}get magicNumber(){return this.getT("magicNumber")}get version(){return this.__internal__metadata().index}getUniqTypes(e){return Jf(this.registry,this.asLatest,e)}toJSON(){return this.asLatest,super.toJSON()}}const Vp=new Uint8Array([109,101,116,97,9]),Tp=Vp.length-1;class Sp extends wp{constructor(e,t){super(e,(0,ut.b)(t)||(0,I.K)(t)?function(e,t){if(0===t.length)return Vp;if(9===t[Tp])try{return new wp(e,t)}catch{t[Tp]=10}return t}(e,(0,E.e)(t)):t)}}const kp=e=>e.toString(),_p=["BTreeMap","BTreeSet","Compact","HashMap","Option","Result","Vec"];function Pp(e,t,n){const{info:r,sub:a}=t;switch(r){case mr.BTreeMap:case mr.BTreeSet:case mr.Compact:case mr.HashMap:case mr.Linkage:case mr.Option:case mr.Range:case mr.RangeInclusive:case mr.Result:case mr.Vec:case mr.WrapperKeepOpaque:case mr.WrapperOpaque:return function(e,t,n=kp){return`${e}${t?`<${(Array.isArray(t)?t:[t]).map(n).join(", ")}>`:""}`}(n,a,(t=>Ep(e,t)))}throw new Error(`Unable to encode ${(0,je.A)(t)} with params`)}function Mp(e,t,n,r){const a=t.map((({name:e})=>e));if(!a.every((e=>!!e)))throw new Error(`Subtypes does not have consistent names, ${a.join(", ")}`);const i=(0,M.b)({},r);for(let s=0,o=t.length;sPp(e,t,"BTreeMap"),[mr.BTreeSet]:(e,t)=>Pp(e,t,"BTreeSet"),[mr.Compact]:(e,t)=>Pp(e,t,"Compact"),[mr.DoNotConstruct]:(e,{displayName:t,lookupIndex:n,lookupName:r})=>`DoNotConstruct<${r||t||((0,Fe.b)(n)?"Unknown":e.createLookupType(n))}>`,[mr.Enum]:(e,{sub:t})=>{if(!Array.isArray(t))throw new Error("Unable to encode Enum type");return t.every((({type:e})=>"Null"===e))?(0,je.A)({_enum:t.map((({name:e},t)=>`${e||`Empty${t}`}`))}):Mp(e,t,!0)},[mr.HashMap]:(e,t)=>Pp(e,t,"HashMap"),[mr.Int]:(e,{length:t=32})=>`Int<${t}>`,[mr.Linkage]:(e,t)=>Pp(e,t,"Linkage"),[mr.Null]:(e,t)=>"Null",[mr.Option]:(e,t)=>Pp(e,t,"Option"),[mr.Plain]:(e,{displayName:t,type:n})=>t||n,[mr.Range]:(e,t)=>Pp(e,t,"Range"),[mr.RangeInclusive]:(e,t)=>Pp(e,t,"RangeInclusive"),[mr.Result]:(e,t)=>Pp(e,t,"Result"),[mr.Set]:(e,{length:t=8,sub:n})=>{if(!Array.isArray(n))throw new Error("Unable to encode Set type");return(0,je.A)({_set:n.reduce(((e,{index:t,name:n},r)=>(0,M.b)(e,{[`${n||`Unknown${t||r}`}`]:t||r})),{_bitLength:t||8})})},[mr.Si]:(e,{lookupName:t,type:n})=>t||n,[mr.Struct]:(e,{alias:t,sub:n})=>{if(!Array.isArray(n))throw new Error("Unable to encode Struct type");return Mp(e,n,!1,t?{_alias:[...t.entries()].reduce(((e,[t,n])=>(0,M.b)(e,{[t]:n})),{})}:{})},[mr.Tuple]:(e,{sub:t})=>{if(!Array.isArray(t))throw new Error("Unable to encode Tuple type");return`(${t.map((t=>Ep(e,t))).join(",")})`},[mr.UInt]:(e,{length:t=32})=>`UInt<${t}>`,[mr.Vec]:(e,t)=>Pp(e,t,"Vec"),[mr.VecFixed]:(e,{length:t,sub:n})=>{if(!(0,Lt.E)(t)||!n||Array.isArray(n))throw new Error("Unable to encode VecFixed type");return`[${n.type};${t}]`},[mr.WrapperKeepOpaque]:(e,t)=>Pp(e,t,"WrapperKeepOpaque"),[mr.WrapperOpaque]:(e,t)=>Pp(e,t,"WrapperOpaque")};function Np(e,t,n=!0){return n&&t.lookupName?t.lookupName:Ip[t.info](e,t)}function Ep(e,t){return t.displayName&&!_p.some((e=>t.displayName===e))?t.displayName:Np(e,t)}function Op(e,t){return(0,M.b)({},t,{type:Np(e,t,!1)})}const Ap=(0,it.v)("PortableRegistry"),Cp={toNumber:()=>-1},Hp={Char:"u32",Str:"Text"},Rp=Fp(["sp_core::crypto::AccountId32","sp_runtime::generic::era::Era","sp_runtime::multiaddress::MultiAddress","fp_account::AccountId20","account::AccountId20","polkadot_runtime_common::claims::EthereumAddress","frame_support::weights::weight_v2::Weight","sp_weights::weight_v2::Weight","*_democracy::vote::Vote","*_conviction_voting::vote::Vote","*_identity::types::Data","sp_core::OpaqueMetadata","sp_core::OpaquePeerId","sp_core::offchain::OpaqueMultiaddr","primitive_types::*","sp_arithmetic::per_things::*","*_runtime::RuntimeCall","*_runtime::RuntimeEvent","ink::env::types::*","ink::primitives::types::*","ink_env::types::*","ink_primitives::types::*"]),Bp=Fp(["pallet_identity::types::BitFlags"]),Lp=["bitvec::order::Lsb0","BitOrderLsb0"],zp=[...Lp,"bitvec::order::Msb0","BitOrderMsb0"],Up=["BoundedBTreeMap","BoundedBTreeSet","BoundedVec","Box","BTreeMap","BTreeSet","Cow","Option","Range","RangeInclusive","Result","WeakBoundedVec","WrapperKeepOpaque","WrapperOpaque"],Dp=["entries","keys","new","size","hash","registry"],qp=["generic","misc","pallet","traits","types"];function jp(e){const t=e.length,n=new Array(t);for(let r=0;r{const r=t[n].toString();if("*"===e||e===r)return!0;if(e.includes("*")&&e.includes("_")&&r.includes("_")){let t=e.split("_"),n=r.split("_");if("*"===t[0]){const e=n.indexOf(t[1]);-1!==e&&(t=t.slice(1),n=n.slice(e))}return 2===t.length&&"*"===t[1]&&t[0]===n[0]||Xp(t,n)}return!1}))}function Wp(e,t,n,r,a=!1){const i=r.length;if(0===i||Up.includes(r[i-1].toString()))return null;const s=new Array(i),o=new Array(i);for(let d=0;d{const{lookupIndex:s,name:o,params:c}=a;if(!o)return null;if(r[s])return a;const d=function(e,t,n){const r=[n[t]];for(let a=t+1,i=n.length;ac.length!==e.params.length||c.some(((t,n)=>!t.name.eq(e.params[n].name)||t.type.unwrapOr(Cp).toNumber()!==e.params[n].type.unwrapOr(Cp).toNumber())))))return a;const u=c.findIndex((({type:e},t)=>d.every((({params:n},r)=>n[t].type.isSome&&(0===r||!n[t].type.eq(e))))));if(-1===u)return a;const l=d.length,f=new Array(l);for(let t=0;t!!e)).map((({lookupIndex:e,name:t,params:n})=>({lookupIndex:e,name:r[e]||t,params:n})))}(e,t,n);for(let c=0,d=o.length;c"},t);const{lookups:r,names:a,params:i,types:s}=Kp(this,this.types);this.__internal__alias=function(e,t){const n=Object.keys(e).some((e=>!e.startsWith("Pallet"))),r={};if(e.SpRuntimeUncheckedExtrinsic){const[,{type:t}]=e.SpRuntimeUncheckedExtrinsic;r[t.unwrap().toNumber()]="Call"}else n&&!t&&Ap.warn("Unable to determine runtime Call type, cannot inspect sp_runtime::generic::unchecked_extrinsic::UncheckedExtrinsic");if(e.FrameSystemEventRecord){const[{type:t}]=e.FrameSystemEventRecord;r[t.unwrap().toNumber()]="Event"}else n&&!t&&Ap.warn("Unable to determine runtime Event type, cannot inspect frame_system::EventRecord");return r}(i,n),this.__internal__lookups=r,this.__internal__names=a,this.__internal__params=i,this.__internal__types=s}get names(){return Object.values(this.__internal__names).sort()}get paramTypes(){return this.__internal__params}get types(){return this.getT("types")}register(){!function(e,t,n,r){if(e.registry.register(t),r.SpRuntimeUncheckedExtrinsic){const[t,,a]=r.SpRuntimeUncheckedExtrinsic,i=e.getSiType(t.type.unwrap()),s=e.getSiType(a.type.unwrap()).path.join("::");let o=i.path.join("::");const c="sp_runtime::multiaddress::MultiAddress"===o;if(c){const[t]=i.params;o=e.getSiType(t.type.unwrap()).path.join("::")}e.registry.register({AccountId:o.endsWith("::AccountId20")||o.endsWith("::H160")?"AccountId20":"AccountId32",Address:c?"MultiAddress":"AccountId",ExtrinsicSignature:["sp_runtime::MultiSignature"].includes(s)?"MultiSignature":n[a.type.unwrap().toNumber()]||"MultiSignature"})}}(this,this.__internal__lookups,this.__internal__names,this.__internal__params)}getName(e){return this.__internal__names[this.__internal__getLookupId(e)]}getSiType(e){const t=(this.__internal__types||this.types)[this.__internal__getLookupId(e)];if(!t)throw new Error(`PortableRegistry: Unable to find type with lookupId ${e.toString()}`);return t.type}getTypeDef(e){const t=this.__internal__getLookupId(e);if(!this.__internal__typeDefs[t]){const n=this.__internal__names[t],r={info:mr.DoNotConstruct,lookupIndex:t,lookupName:n,type:this.registry.createLookupType(t)};n&&(this.__internal__typeDefs[t]=r);const a=this.__internal__extract(this.getSiType(e),t);n||(this.__internal__typeDefs[t]=r),Object.keys(a).forEach((e=>{("lookupName"!==e||a[e])&&(this.__internal__typeDefs[t][e]=a[e])})),a.info===mr.Plain&&(this.__internal__typeDefs[t].lookupNameRoot=this.__internal__typeDefs[t].lookupName,delete this.__internal__typeDefs[t].lookupName)}return this.__internal__typeDefs[t]}sanitizeField(e){let t=null,n=null;return e.isSome&&(t=jt(e.unwrap()),t.includes("#")?(n=t,t=n.replace(/#/g,"_")):Dp.includes(t)&&(n=t,t=`${t}_`)),[t,n]}__internal__createSiDef(e){const t=this.getTypeDef(e),n=e.toNumber();return[mr.DoNotConstruct,mr.Enum,mr.Struct].includes(t.info)&&t.lookupName?{docs:t.docs,info:mr.Si,lookupIndex:n,lookupName:this.__internal__names[n],type:this.registry.createLookupType(e)}:t}__internal__getLookupId(e){if((0,I.K)(e)){if(!this.registry.isLookupType(e))throw new Error(`PortableRegistry: Expected a lookup string type, found ${e}`);return parseInt(e.replace("Lookup",""),10)}return(0,Lt.E)(e)?e:e.toNumber()}__internal__extract(e,t){const n=e.path.join("::");let r;const a=this.__internal__alias[t]||function({def:e,path:t}){return["frame_support::weights::weight_v2::Weight","sp_weights::weight_v2::Weight"].includes(t.join("::"))?e.isComposite&&1!==e.asComposite.fields.length?null:"WeightV1":t.length&&Rp.some((e=>Xp(e,t)))?t[t.length-1].toString():null}(e);try{if(a)r=this.__internal__extractAliasPath(t,a);else switch(e.def.type){case"Array":r=this.__internal__extractArray(t,e.def.asArray);break;case"BitSequence":r=this.__internal__extractBitSequence(t,e.def.asBitSequence);break;case"Compact":r=this.__internal__extractCompact(t,e.def.asCompact);break;case"Composite":r=this.__internal__extractComposite(t,e,e.def.asComposite);break;case"HistoricMetaCompat":r=this.__internal__extractHistoric(t,e.def.asHistoricMetaCompat);break;case"Primitive":r=this.__internal__extractPrimitive(t,e);break;case"Sequence":r=this.__internal__extractSequence(t,e.def.asSequence);break;case"Tuple":r=this.__internal__extractTuple(t,e.def.asTuple);break;case"Variant":r=this.__internal__extractVariant(t,e,e.def.asVariant);break;default:!function(e){throw new Error(`This codepath should be unreachable. Unhandled input: ${e}`)}(e.def.type)}}catch(i){throw new Error(`PortableRegistry: ${t}${n?` (${n})`:""}: Error extracting ${(0,je.A)(e)}: ${i.message}`)}return(0,M.b)({docs:jp(e.docs),namespace:n},r)}__internal__extractArray(e,{len:t,type:n}){const r=t.toNumber();if(r>2048)throw new Error("Only support for [Type; ], where length <= 2048");return Op(this.registry,{info:mr.VecFixed,length:r,sub:this.__internal__createSiDef(n)})}__internal__extractBitSequence(e,{bitOrderType:t,bitStoreType:n}){const r=this.__internal__createSiDef(t),a=this.__internal__createSiDef(n),[i,s]=zp.includes(r.namespace||"")?[r,a]:[a,r];if(!i.namespace||!zp.includes(i.namespace))throw new Error(`Unexpected bitOrder found as ${i.namespace||""}`);if(s.info!==mr.Plain||"u8"!==s.type)throw new Error(`Only u8 bitStore is currently supported, found ${s.type}`);Lp.includes(i.namespace);return{info:mr.Plain,type:"BitVec"}}__internal__extractCompact(e,{type:t}){return Op(this.registry,{info:mr.Compact,sub:this.__internal__createSiDef(t)})}__internal__extractComposite(e,{params:t,path:n},{fields:r}){if(n.length){const e=n[0].toString(),r=n[n.length-1].toString();if(1===n.length&&"BTreeMap"===e){if(2!==t.length)throw new Error(`BTreeMap requires 2 parameters, found ${t.length}`);return Op(this.registry,{info:mr.BTreeMap,sub:t.map((({type:e})=>this.__internal__createSiDef(e.unwrap())))})}if(1===n.length&&"BTreeSet"===e){if(1!==t.length)throw new Error(`BTreeSet requires 1 parameter, found ${t.length}`);return Op(this.registry,{info:mr.BTreeSet,sub:this.__internal__createSiDef(t[0].type.unwrap())})}if(["Range","RangeInclusive"].includes(e)){if(1!==t.length)throw new Error(`Range requires 1 parameter, found ${t.length}`);return Op(this.registry,{info:"Range"===e?mr.Range:mr.RangeInclusive,sub:this.__internal__createSiDef(t[0].type.unwrap()),type:e})}if(["WrapperKeepOpaque","WrapperOpaque"].includes(r)){if(1!==t.length)throw new Error(`WrapperOpaque requires 1 parameter, found ${t.length}`);return Op(this.registry,{info:"WrapperKeepOpaque"===r?mr.WrapperKeepOpaque:mr.WrapperOpaque,sub:this.__internal__createSiDef(t[0].type.unwrap()),type:r})}}return Bp.some((e=>Xp(e,n)))?this.__internal__extractCompositeSet(e,t,r):this.__internal__extractFields(e,r)}__internal__extractCompositeSet(e,t,n){if(1!==t.length||1!==n.length)throw new Error("Set handling expects param/field as single entries");return Op(this.registry,{info:mr.Set,length:this.registry.createTypeUnsafe(this.registry.createLookupType(n[0].type),[]).bitLength(),sub:this.getSiType(t[0].type.unwrap()).def.asVariant.variants.map((({index:e,name:t})=>({index:e.toNumber(),info:mr.Plain,name:t.toString(),type:"Null"})))})}__internal__extractFields(e,t){let n=!0,r=!0;const a=t.length;for(let o=0;othis.__internal__createSiDef(e)));return Op(this.registry,{info:mr.Tuple,lookupIndex:e,lookupName:this.__internal__names[e],sub:n})}__internal__extractVariant(e,{params:t,path:n},{variants:r}){if(n.length){const e=n[0].toString();if("Option"===e){if(1!==t.length)throw new Error(`Option requires 1 parameter, found ${t.length}`);return Op(this.registry,{info:mr.Option,sub:this.__internal__createSiDef(t[0].type.unwrap())})}if("Result"===e){if(2!==t.length)throw new Error(`Result requires 2 parameters, found ${t.length}`);return Op(this.registry,{info:mr.Result,sub:t.map((({type:e},t)=>(0,M.b)({name:["Ok","Error"][t]},this.__internal__createSiDef(e.unwrap()))))})}}return 0===r.length?{info:mr.Null,type:"Null"}:this.__internal__extractVariantEnum(e,r)}__internal__extractVariantEnum(e,t){const n=[];return t.slice().sort(((e,t)=>e.index.cmp(t.index))).forEach((({fields:e,index:t,name:r})=>{const a=t.toNumber();for(;n.length!==a;)n.push({index:n.length,info:mr.Null,name:`__Unused${n.length}`,type:"Null"});n.push((0,M.b)(this.__internal__extractFields(-1,e),{index:a,name:r.toString()}))})),Op(this.registry,{info:mr.Enum,lookupIndex:e,lookupName:this.__internal__names[e],sub:n})}}const Yp=new Uint8Array(2),Qp=(0,it.v)("registry");function $p(e,t){return parseInt(e,10)-parseInt(t,10)}function eh(e){return e.toString()}function th(e,t){const n=t.length,r=new Array(n);for(let a=0;ae.toNumber()))}return[12]}get chainIsEthereum(){return this.__internal__chainProperties?.isEthereum.isTrue||!1}get chainSS58(){return this.__internal__chainProperties?.ss58Format.isSome?this.__internal__chainProperties.ss58Format.unwrap().toNumber():void 0}get chainTokens(){if(this.__internal__chainProperties?.tokenSymbol.isSome){const e=this.__internal__chainProperties.tokenSymbol.unwrap();if(e.length)return e.map(eh)}return[Un.getDefaults().unit]}get firstCallIndex(){return this.__internal__firstCallIndex||Yp}isLookupType(e){return/Lookup\d+$/.test(e)}createLookupType(e){return`Lookup${"number"==typeof e?e:e.toNumber()}`}get knownTypes(){return this.__internal__knownTypes}get lookup(){return ea(this.__internal__lookup,"PortableRegistry has not been set on this registry")}get metadata(){return ea(this.__internal__metadata,"Metadata has not been set on this registry")}get unknownTypes(){return[...this.__internal__unknownTypes.keys()]}get signedExtensions(){return this.__internal__signedExtensions}clearCache(){this.__internal__classes=new Map}createClass(e){return Zr(this,e)}createClassUnsafe(e){return Zr(this,e)}createType(e,...t){return Yr(this,e,t)}createTypeUnsafe(e,t,n){return Yr(this,e,t,n)}findMetaCall(e){const[t,n]=[e[0],e[1]];return ea(this.__internal__metadataCalls[`${t}`]&&this.__internal__metadataCalls[`${t}`][`${n}`],(()=>`findMetaCall: Unable to find Call with index [${t}, ${n}]/[${e.toString()}]`))}findMetaError(e){const[t,n]=(0,ut.b)(e)?[e[0],e[1]]:[e.index.toNumber(),(0,ut.b)(e.error)?e.error[0]:e.error.toNumber()];return ea(this.__internal__metadataErrors[`${t}`]&&this.__internal__metadataErrors[`${t}`][`${n}`],(()=>`findMetaError: Unable to find Error with index [${t}, ${n}]/[${e.toString()}]`))}findMetaEvent(e){const[t,n]=[e[0],e[1]];return ea(this.__internal__metadataEvents[`${t}`]&&this.__internal__metadataEvents[`${t}`][`${n}`],(()=>`findMetaEvent: Unable to find Event with index [${t}, ${n}]/[${e.toString()}]`))}get(e,t,n){return this.getUnsafe(e,t,n)}getUnsafe(e,t,n){let r=this.__internal__classes.get(e)||this.__internal__knownDefaults[e];if(!r){const a=this.__internal__definitions.get(e);let i;a?i=Zr(this,a):n?i=function(e,t){try{const n=Xr[t.info](e,t);if(!n)throw new Error("No class created");return!n.__fallbackType&&t.fallbackType&&(n.__fallbackType=t.fallbackType),n}catch(n){throw new Error(`Unable to construct class from ${(0,je.A)(t)}: ${n.message}`)}}(this,n):t&&(Qp.warn(`Unable to resolve type ${e}, it will fail on construction`),this.__internal__unknownTypes.set(e,!0),i=at.with(e)),i&&(r=class extends i{},this.__internal__classes.set(e,r),n&&(0,Lt.E)(n.lookupIndex)&&this.__internal__classes.set(this.createLookupType(n.lookupIndex),r))}return r}getChainProperties(){return this.__internal__chainProperties}getClassName(e){const t=[];for(const[n,r]of this.__internal__knownDefaultsEntries)e===r&&t.push(n);for(const[n,r]of this.__internal__classes.entries())e===r&&t.push(n);return t.length?t.sort().reverse()[0]:void 0}getDefinition(e){return this.__internal__definitions.get(e)}getModuleInstances(e,t){return this.__internal__knownTypes?.typesBundle?.spec?.[e.toString()]?.instances?.[t]||this.__internal__moduleMap[t]}getOrThrow(e){const t=this.get(e);if(!t)throw new Error(`type ${e} not found`);return t}getOrUnknown(e){return this.get(e,!0)}getTransactionExtensionVersion(){return 0}getSignedExtensionExtra(){return Bi(this.__internal__signedExtensions,"payload",this.__internal__userExtensions)}getSignedExtensionTypes(){return Bi(this.__internal__signedExtensions,"extrinsic",this.__internal__userExtensions)}hasClass(e){return this.__internal__classes.has(e)||!!this.__internal__knownDefaults[e]}hasDef(e){return this.__internal__definitions.has(e)}hasType(e){return!this.__internal__unknownTypes.get(e)&&(this.hasClass(e)||this.hasDef(e))}hash(e){return this.createType("CodecHash",this.__internal__hasher(e))}register(e,t){if((0,qe.T)(e))this.__internal__classes.set(e.name,e);else if((0,I.K)(e)){if(!(0,qe.T)(t))throw new Error(`Expected class definition passed to '${e}' registration`);if(e===t.toString())throw new Error(`Unable to register circular ${e} === ${e}`);this.__internal__classes.set(e,t)}else this.__internal__registerObject(e)}__internal__registerObject=e=>{const t=Object.entries(e);for(let n=0,r=t.length;n{this.setLookup(e);let t=null;if(this.hasType("SpWeightsWeightV2Weight")){const e=this.createType("SpWeightsWeightV2Weight");t=e.refTime&&e.proofSize?"SpWeightsWeightV2Weight":"WeightV1"}else(0,pn.f)(this.createType("Weight"))||(t="WeightV1");t&&this.register({Weight:t})};setMetadata(e,t,n,r){this.__internal__metadata=e.asLatest,this.__internal__metadataVersion=e.version,this.__internal__firstCallIndex=null,this.__internal__registerLookup(this.__internal__metadata.lookup),function(e,{lookup:t,pallets:n},r,a,i){const s=n.filter(Ef);nh(a),nh(i);for(let o=0,c=s.length;o=12?c.toNumber():o,l=jt(d),f=n.unwrap();Qr(a,u,(()=>Pf(t,f,rh,(n=>Of(e,t,n,l,u)))));const{path:p}=e.lookup.getSiType(f.type),h=p.findIndex((e=>e.eq("pallet")));if(-1!==h){const e=jt(p.slice(0,h).map(((e,t)=>0===t?e.replace(/^(frame|pallet)_/,""):e)).join(" "));i[e]?i[e].push(l):i[e]=[l]}}}(this,this.__internal__metadata,this.__internal__metadataVersion,this.__internal__metadataCalls,this.__internal__moduleMap),function(e,{lookup:t,pallets:n},r,a){nh(a);for(let i=0,s=n.length;i=12?s.toNumber():i,(()=>Pf(t,e.unwrap(),rh,(({docs:e,fields:r,index:a,name:i})=>({args:th(t,r),docs:e.map(eh),fields:r,index:a.toNumber(),method:i.toString(),name:i.toString(),section:n})))))}}}(0,this.__internal__metadata,this.__internal__metadataVersion,this.__internal__metadataErrors),function(e,{lookup:t,pallets:n},r,a){const i=n.filter(Rf);nh(a);for(let s=0,o=i.length;s=12?o.toNumber():s,(()=>Pf(t,n.unwrap(),rh,(n=>{const r=e.createType("EventMetadataLatest",(0,M.b)({},n,{args:th(t,n.fields)}));return class extends Li{constructor(e,t){super(e,t,r,jt(c),n.name.toString())}}}))))}}(this,this.__internal__metadata,this.__internal__metadataVersion,this.__internal__metadataEvents);const[a]=Object.keys(this.__internal__metadataCalls).sort($p);if(a){const[e]=Object.keys(this.__internal__metadataCalls[a]).sort($p);e&&(this.__internal__firstCallIndex=new Uint8Array([parseInt(a,10),parseInt(e,10)]))}this.setSignedExtensions(t||(this.__internal__metadata.extrinsic.version.gt(lt)?this.__internal__metadata.extrinsic.signedExtensions.map((({identifier:e})=>e.toString())):Ri),n,r),this.setChainProperties(function(e,t){const n=e.getChainProperties(),r=Lf(e,t.asLatest,t.version),a=r.system&&(r.system.sS58Prefix||r.system.ss58Prefix);if(!a)return n;const{isEthereum:i,tokenDecimals:s,tokenSymbol:o}=n||{};return e.createTypeUnsafe("ChainProperties",[{isEthereum:i,ss58Format:a,tokenDecimals:s,tokenSymbol:o}])}(this,e))}setSignedExtensions(e=Ri,t,n){if(this.__internal__signedExtensions=e,this.__internal__userExtensions=t,!n){const e=function(e,t={}){const n=[...Object.keys(Hi),...Object.keys(t)];return e.filter((e=>!n.includes(e)))}(this.__internal__signedExtensions,this.__internal__userExtensions);e.length&&Qp.warn(`Unknown signed extensions ${e.join(", ")} found, treating them as no-effect`)}}}const ih={},sh={AnchorData:{anchoredBlock:"u64",docRoot:"H256",id:"H256"},DispatchErrorModule:"DispatchErrorModuleU8",PreCommitData:{expirationBlock:"u64",identity:"H256",signingRoot:"H256"},Fee:{key:"Hash",price:"Balance"},MultiAccountData:{deposit:"Balance",depositor:"AccountId",signatories:"Vec",threshold:"u16"},ChainId:"u8",DepositNonce:"u64",ResourceId:"[u8; 32]","chainbridge::ChainId":"u8",RegistryId:"H160",TokenId:"U256",AssetId:{registryId:"RegistryId",tokenId:"TokenId"},AssetInfo:{metadata:"Bytes"},MintInfo:{anchorId:"Hash",proofs:"Vec",staticHashes:"[Hash; 3]"},Proof:{leafHash:"H256",sortedHashes:"H256"},ProofMint:{hashes:"Vec",property:"Bytes",salt:"[u8; 32]",value:"Bytes"},RegistryInfo:{fields:"Vec",ownerCanBurn:"bool"},ProxyType:{_enum:["Any","NonTransfer","Governance","Staking","NonProxy"]}},oh={...sh,AccountInfo:"AccountInfoWithRefCount",Address:"LookupSource",LookupSource:"IndicesLookupSource",Multiplier:"Fixed64",RefCount:"RefCountTo259"},ch={CompactAssignments:"CompactAssignmentsWith24",DispatchErrorModule:"DispatchErrorModuleU8",RawSolution:"RawSolutionWith24",Keys:"SessionKeys6",ProxyType:{_enum:["Any","NonTransfer","Governance","Staking","IdentityJudgement","CancelProxy","Auction"]},Weight:"WeightV1"},dh={AccountInfo:"AccountInfoWithRefCount",Address:"LookupSource",CompactAssignments:"CompactAssignmentsWith16",DispatchErrorModule:"DispatchErrorModuleU8",RawSolution:"RawSolutionWith16",Keys:"SessionKeys5",LookupSource:"IndicesLookupSource",ValidatorPrefs:"ValidatorPrefsWithCommission"},uh={AccountInfo:"AccountInfoWithRefCount",Address:"AccountId",CompactAssignments:"CompactAssignmentsWith16",DispatchErrorModule:"DispatchErrorModuleU8",RawSolution:"RawSolutionWith16",Keys:"SessionKeys5",LookupSource:"AccountId",ValidatorPrefs:"ValidatorPrefsWithCommission"},lh={CompactAssignments:"CompactAssignmentsWith16",DispatchErrorModule:"DispatchErrorModuleU8",RawSolution:"RawSolutionWith16",Keys:"SessionKeys6",ProxyType:{_enum:{Any:0,NonTransfer:1,Governance:2,Staking:3,UnusedSudoBalances:4,IdentityJudgement:5,CancelProxy:6,Auction:7}},Weight:"WeightV1"},fh={AccountInfo:"AccountInfoWithRefCount",Address:"AccountId",DispatchErrorModule:"DispatchErrorModuleU8",Keys:"SessionKeys5",LookupSource:"AccountId",ValidatorPrefs:"ValidatorPrefsWithCommission"},ph={DispatchErrorModule:"DispatchErrorModuleU8",FullIdentification:"()",Keys:"SessionKeys7B",Weight:"WeightV1"},hh={DispatchErrorModule:"DispatchErrorModuleU8",TAssetBalance:"u128",ProxyType:{_enum:["Any","NonTransfer","CancelProxy","Assets","AssetOwner","AssetManager","Staking"]},Weight:"WeightV1"},bh={DispatchErrorModule:"DispatchErrorModuleU8",TAssetBalance:"u128",ProxyType:{_enum:["Any","NonTransfer","CancelProxy","Assets","AssetOwner","AssetManager","Staking"]},Weight:"WeightV1"},mh={CompactAssignments:"CompactAssignmentsWith16",DispatchErrorModule:"DispatchErrorModuleU8",RawSolution:"RawSolutionWith16",Keys:"SessionKeys6",ProxyType:{_enum:["Any","NonTransfer","Staking","SudoBalances","IdentityJudgement","CancelProxy"]},Weight:"WeightV1"},yh={AccountInfo:"AccountInfoWithRefCount",Address:"AccountId",CompactAssignments:"CompactAssignmentsWith16",DispatchErrorModule:"DispatchErrorModuleU8",LookupSource:"AccountId",Keys:"SessionKeys5",RawSolution:"RawSolutionWith16",ValidatorPrefs:"ValidatorPrefsWithCommission"},xh={DispatchErrorModule:"DispatchErrorModuleU8",TAssetBalance:"u128",ProxyType:{_enum:["Any","NonTransfer","CancelProxy","Assets","AssetOwner","AssetManager","Staking"]},Weight:"WeightV1"},gh={"centrifuge-chain":[{minmax:[240,243],types:{...oh,ProxyType:{_enum:["Any","NonTransfer","Governance","Staking","Vesting"]}}},{minmax:[244,999],types:{...oh}},{minmax:[1e3,void 0],types:{...sh}}],kusama:[{minmax:[1019,1031],types:{...dh,BalanceLock:"BalanceLockTo212",CompactAssignments:"CompactAssignmentsTo257",DispatchError:"DispatchErrorTo198",DispatchInfo:"DispatchInfoTo244",Heartbeat:"HeartbeatTo244",IdentityInfo:"IdentityInfoTo198",Keys:"SessionKeys5",Multiplier:"Fixed64",OpenTip:"OpenTipTo225",RefCount:"RefCountTo259",ReferendumInfo:"ReferendumInfoTo239",Scheduled:"ScheduledTo254",SlashingSpans:"SlashingSpansTo204",StakingLedger:"StakingLedgerTo223",Votes:"VotesTo230",Weight:"u32"}},{minmax:[1032,1042],types:{...dh,BalanceLock:"BalanceLockTo212",CompactAssignments:"CompactAssignmentsTo257",DispatchInfo:"DispatchInfoTo244",Heartbeat:"HeartbeatTo244",Keys:"SessionKeys5",Multiplier:"Fixed64",OpenTip:"OpenTipTo225",RefCount:"RefCountTo259",ReferendumInfo:"ReferendumInfoTo239",Scheduled:"ScheduledTo254",SlashingSpans:"SlashingSpansTo204",StakingLedger:"StakingLedgerTo223",Votes:"VotesTo230",Weight:"u32"}},{minmax:[1043,1045],types:{...dh,BalanceLock:"BalanceLockTo212",CompactAssignments:"CompactAssignmentsTo257",DispatchInfo:"DispatchInfoTo244",Heartbeat:"HeartbeatTo244",Keys:"SessionKeys5",Multiplier:"Fixed64",OpenTip:"OpenTipTo225",RefCount:"RefCountTo259",ReferendumInfo:"ReferendumInfoTo239",Scheduled:"ScheduledTo254",StakingLedger:"StakingLedgerTo223",Votes:"VotesTo230",Weight:"u32"}},{minmax:[1046,1049],types:{...ch,...uh,CompactAssignments:"CompactAssignmentsTo257",DispatchInfo:"DispatchInfoTo244",Heartbeat:"HeartbeatTo244",Multiplier:"Fixed64",OpenTip:"OpenTipTo225",RefCount:"RefCountTo259",ReferendumInfo:"ReferendumInfoTo239",Scheduled:"ScheduledTo254",StakingLedger:"StakingLedgerTo223",Weight:"u32"}},{minmax:[1050,1054],types:{...ch,...uh,CompactAssignments:"CompactAssignmentsTo257",DispatchInfo:"DispatchInfoTo244",Heartbeat:"HeartbeatTo244",Multiplier:"Fixed64",OpenTip:"OpenTipTo225",RefCount:"RefCountTo259",ReferendumInfo:"ReferendumInfoTo239",Scheduled:"ScheduledTo254",StakingLedger:"StakingLedgerTo240",Weight:"u32"}},{minmax:[1055,1056],types:{...ch,...uh,CompactAssignments:"CompactAssignmentsTo257",DispatchInfo:"DispatchInfoTo244",Heartbeat:"HeartbeatTo244",Multiplier:"Fixed64",OpenTip:"OpenTipTo225",RefCount:"RefCountTo259",Scheduled:"ScheduledTo254",StakingLedger:"StakingLedgerTo240",Weight:"u32"}},{minmax:[1057,1061],types:{...ch,...uh,CompactAssignments:"CompactAssignmentsTo257",DispatchInfo:"DispatchInfoTo244",Heartbeat:"HeartbeatTo244",OpenTip:"OpenTipTo225",RefCount:"RefCountTo259",Scheduled:"ScheduledTo254"}},{minmax:[1062,2012],types:{...ch,...uh,CompactAssignments:"CompactAssignmentsTo257",OpenTip:"OpenTipTo225",RefCount:"RefCountTo259"}},{minmax:[2013,2022],types:{...ch,...uh,CompactAssignments:"CompactAssignmentsTo257",RefCount:"RefCountTo259"}},{minmax:[2023,2024],types:{...ch,...uh,RefCount:"RefCountTo259"}},{minmax:[2025,2027],types:{...ch,...uh}},{minmax:[2028,2029],types:{...ch,AccountInfo:"AccountInfoWithDualRefCount",CompactAssignments:"CompactAssignmentsWith16",RawSolution:"RawSolutionWith16"}},{minmax:[2030,9e3],types:{...ch,CompactAssignments:"CompactAssignmentsWith16",RawSolution:"RawSolutionWith16"}},{minmax:[9010,9099],types:{...ch,...af("V0")}},{minmax:[9100,9105],types:{...ch,...af("V1")}},{minmax:[9106,void 0],types:{Weight:"WeightV1"}}],node:[{minmax:[0,void 0],types:{Weight:"WeightV2"}}],"node-template":[{minmax:[0,void 0],types:{Weight:"WeightV2"}}],polkadot:[{minmax:[0,12],types:{...lh,...fh,CompactAssignments:"CompactAssignmentsTo257",OpenTip:"OpenTipTo225",RefCount:"RefCountTo259"}},{minmax:[13,22],types:{...lh,...fh,CompactAssignments:"CompactAssignmentsTo257",RefCount:"RefCountTo259"}},{minmax:[23,24],types:{...lh,...fh,RefCount:"RefCountTo259"}},{minmax:[25,27],types:{...lh,...fh}},{minmax:[28,29],types:{...lh,AccountInfo:"AccountInfoWithDualRefCount"}},{minmax:[30,9109],types:{...lh}},{minmax:[9110,void 0],types:{Weight:"WeightV1"}}],rococo:[{minmax:[0,200],types:{...ph,AccountInfo:"AccountInfoWithDualRefCount",Address:"AccountId",LookupSource:"AccountId"}},{minmax:[201,214],types:{...ph,AccountInfo:"AccountInfoWithDualRefCount"}},{minmax:[215,228],types:{...ph,Keys:"SessionKeys6"}},{minmax:[229,9099],types:{...ph,...af("V0")}},{minmax:[9100,9105],types:{...ph,...af("V1")}},{minmax:[9106,void 0],types:{Weight:"WeightV1"}}],shell:[{minmax:[0,void 0],types:{}}],statemine:[{minmax:[0,3],types:{DispatchError:"DispatchErrorPre6First",...hh,...af("V0")}},{minmax:[4,5],types:{DispatchError:"DispatchErrorPre6First",...hh,...af("V1")}},{minmax:[500,9999],types:{Weight:"WeightV1",TAssetConversion:"Option"}},{minmax:[1e4,void 0],types:{Weight:"WeightV1"}}],statemint:[{minmax:[0,3],types:{DispatchError:"DispatchErrorPre6First",...bh,...af("V0")}},{minmax:[4,5],types:{DispatchError:"DispatchErrorPre6First",...bh,...af("V1")}},{minmax:[500,1001003],types:{Weight:"WeightV1",TAssetConversion:"Option"}},{minmax:[1002e3,void 0],types:{Weight:"WeightV1"}}],westend:[{minmax:[1,2],types:{...mh,...yh,CompactAssignments:"CompactAssignmentsTo257",DispatchInfo:"DispatchInfoTo244",Heartbeat:"HeartbeatTo244",Multiplier:"Fixed64",OpenTip:"OpenTipTo225",RefCount:"RefCountTo259",Weight:"u32"}},{minmax:[3,22],types:{...mh,...yh,CompactAssignments:"CompactAssignmentsTo257",DispatchInfo:"DispatchInfoTo244",Heartbeat:"HeartbeatTo244",OpenTip:"OpenTipTo225",RefCount:"RefCountTo259"}},{minmax:[23,42],types:{...mh,...yh,CompactAssignments:"CompactAssignmentsTo257",DispatchInfo:"DispatchInfoTo244",Heartbeat:"HeartbeatTo244",RefCount:"RefCountTo259"}},{minmax:[43,44],types:{...mh,...yh,DispatchInfo:"DispatchInfoTo244",Heartbeat:"HeartbeatTo244",RefCount:"RefCountTo259"}},{minmax:[45,47],types:{...mh,...yh}},{minmax:[48,49],types:{...mh,AccountInfo:"AccountInfoWithDualRefCount"}},{minmax:[50,9099],types:{...mh,...af("V0")}},{minmax:[9100,9105],types:{...mh,...af("V1")}},{minmax:[9106,void 0],types:{Weight:"WeightV1"}}],westmint:[{minmax:[0,3],types:{DispatchError:"DispatchErrorPre6First",...xh,...af("V0")}},{minmax:[4,5],types:{DispatchError:"DispatchErrorPre6First",...xh,...af("V1")}},{minmax:[500,9434],types:{Weight:"WeightV1",TAssetConversion:"Option"}},{minmax:[9435,void 0],types:{Weight:"WeightV1"}}]},vh=[[0,1020,[["0xdf6acb689907609b",2],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",1],["0xf78b278be53f454c",1],["0xaf2c0297a23e6d3d",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",1],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[26669,1021,[["0xdf6acb689907609b",2],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",1],["0xf78b278be53f454c",1],["0xaf2c0297a23e6d3d",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",1],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[38245,1022,[["0xdf6acb689907609b",2],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",1],["0xf78b278be53f454c",1],["0xaf2c0297a23e6d3d",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",1],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[54248,1023,[["0xdf6acb689907609b",2],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",1],["0xf78b278be53f454c",1],["0xaf2c0297a23e6d3d",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",1],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[59659,1024,[["0xdf6acb689907609b",2],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",1],["0xf78b278be53f454c",1],["0xaf2c0297a23e6d3d",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",1],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[67651,1025,[["0xdf6acb689907609b",2],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",1],["0xf78b278be53f454c",1],["0xaf2c0297a23e6d3d",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",1],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[82191,1027,[["0xdf6acb689907609b",2],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",1],["0xf78b278be53f454c",1],["0xaf2c0297a23e6d3d",2],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",1],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[83238,1028,[["0xdf6acb689907609b",2],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",1],["0xf78b278be53f454c",1],["0xaf2c0297a23e6d3d",2],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",1],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[101503,1029,[["0xdf6acb689907609b",2],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",1],["0xf78b278be53f454c",1],["0xaf2c0297a23e6d3d",2],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",1],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[203466,1030,[["0xdf6acb689907609b",2],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",1],["0xf78b278be53f454c",1],["0xaf2c0297a23e6d3d",2],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",1],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[295787,1031,[["0xdf6acb689907609b",2],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",1],["0xf78b278be53f454c",1],["0xaf2c0297a23e6d3d",2],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",1],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[461692,1032,[["0xdf6acb689907609b",2],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",1],["0xf78b278be53f454c",1],["0xaf2c0297a23e6d3d",2],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",1],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[504329,1033,[["0xdf6acb689907609b",2],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",1],["0xf78b278be53f454c",1],["0xaf2c0297a23e6d3d",2],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",1],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[569327,1038,[["0xdf6acb689907609b",2],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",1],["0xf78b278be53f454c",1],["0xaf2c0297a23e6d3d",2],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",1],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[587687,1039,[["0xdf6acb689907609b",2],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",1],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",1],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[653183,1040,[["0xdf6acb689907609b",2],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",1],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",1],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[693488,1042,[["0xdf6acb689907609b",2],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",1],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",1],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[901442,1045,[["0xdf6acb689907609b",2],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",1],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",1],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[1375086,1050,[["0xdf6acb689907609b",2],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",1],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",1],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[1445458,1051,[["0xdf6acb689907609b",2],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",1],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",1],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[1472960,1052,[["0xdf6acb689907609b",2],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",1],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",1],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[1475648,1053,[["0xdf6acb689907609b",2],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",1],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",1],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[1491596,1054,[["0xdf6acb689907609b",2],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",1],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",1],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[1574408,1055,[["0xdf6acb689907609b",2],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",1],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",1],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[2064961,1058,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",1],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[2201991,1062,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[2671528,2005,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[2704202,2007,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[2728002,2008,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[2832534,2011,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[2962294,2012,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[324e4,2013,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[3274408,2015,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[3323565,2019,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[3534175,2022,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[3860281,2023,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[4143129,2024,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[4401242,2025,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[4841367,2026,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[5961600,2027,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[6137912,2028,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[6561855,2029,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[7100891,2030,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[7468792,9010,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[7668600,9030,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[7812476,9040,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[8010981,9050,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[8073833,9070,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[8555825,9080,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[8945245,9090,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[9611377,9100,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[9625129,9111,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[9866422,9122,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[10403784,9130,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[10960765,9150,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[11006614,9151,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[11404482,9160,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[11601803,9170,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[12008022,9180,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[12405451,9190,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[12665416,9200,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[12909508,9220,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[13109752,9230,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[13555777,9250,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[13727747,9260,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[14248044,9271,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1],["0x17a6bc0d0062aeb3",1]]],[14433840,9280,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1],["0xf3ff14d5ab527059",1],["0x17a6bc0d0062aeb3",1]]],[14645900,9291,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1],["0xf3ff14d5ab527059",1],["0x17a6bc0d0062aeb3",1]]],[15048375,9300,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1],["0xf3ff14d5ab527059",1],["0x17a6bc0d0062aeb3",1]]],[15426015,9320,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",2],["0xf3ff14d5ab527059",2],["0x17a6bc0d0062aeb3",1]]],[15680713,9340,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",2],["0xf3ff14d5ab527059",2],["0x17a6bc0d0062aeb3",1]]],[15756296,9350,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",2],["0xf3ff14d5ab527059",2],["0x17a6bc0d0062aeb3",1]]],[15912007,9360,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",2],["0xf3ff14d5ab527059",2],["0x17a6bc0d0062aeb3",1]]],[16356547,9370,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",2],["0xf3ff14d5ab527059",2],["0x17a6bc0d0062aeb3",1]]],[17335450,9381,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",3],["0xf3ff14d5ab527059",3],["0x17a6bc0d0062aeb3",1]]],[18062739,9420,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",4],["0x49eaaf1b548a0cb0",2],["0x91d5df18b0d2cf58",2],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1]]],[18625e3,9430,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",4],["0x49eaaf1b548a0cb0",2],["0x91d5df18b0d2cf58",2],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1]]],[20465806,1e6,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",5],["0x49eaaf1b548a0cb0",3],["0x91d5df18b0d2cf58",2],["0x2a5e924655399e60",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1]]],[2157e4,1001e3,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",7],["0x49eaaf1b548a0cb0",3],["0x91d5df18b0d2cf58",2],["0x2a5e924655399e60",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1],["0xfbc577b9d747efd6",1]]],[21786291,1001002,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",7],["0x49eaaf1b548a0cb0",3],["0x91d5df18b0d2cf58",2],["0x2a5e924655399e60",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1],["0xfbc577b9d747efd6",1]]],[22515962,1001003,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",7],["0x49eaaf1b548a0cb0",3],["0x91d5df18b0d2cf58",2],["0x2a5e924655399e60",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1],["0xfbc577b9d747efd6",1]]],[2279e4,1002e3,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",10],["0x49eaaf1b548a0cb0",3],["0x91d5df18b0d2cf58",2],["0x2a5e924655399e60",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1],["0xfbc577b9d747efd6",1]]],[23176015,1002001,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",10],["0x49eaaf1b548a0cb0",3],["0x91d5df18b0d2cf58",2],["0x2a5e924655399e60",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1],["0xfbc577b9d747efd6",1]]],[23450253,1002004,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",10],["0x49eaaf1b548a0cb0",3],["0x91d5df18b0d2cf58",2],["0x2a5e924655399e60",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1],["0xfbc577b9d747efd6",1]]],[23565293,1002005,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",10],["0x49eaaf1b548a0cb0",3],["0x91d5df18b0d2cf58",2],["0x2a5e924655399e60",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1],["0xfbc577b9d747efd6",1]]],[23780224,1002006,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",10],["0x49eaaf1b548a0cb0",3],["0x91d5df18b0d2cf58",2],["0x2a5e924655399e60",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1],["0xfbc577b9d747efd6",1]]],[24786390,1003e3,[["0xc51ff1fa3f5d0cca",1],["0xdf6acb689907609b",5],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",11],["0x49eaaf1b548a0cb0",3],["0x91d5df18b0d2cf58",2],["0x2a5e924655399e60",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3],["0x6ff52ee858e6c5bd",1],["0x91b1c8b16328eb92",1],["0x9ffb505aa738d69c",1],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1],["0xfbc577b9d747efd6",1]]]],wh=[[0,0,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[29231,1,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[188836,5,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[199405,6,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[214264,7,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[244358,8,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[303079,9,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[314201,10,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[342400,11,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[443963,12,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[528470,13,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[687751,14,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[746085,15,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[787923,16,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[799302,17,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[1205128,18,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[1603423,23,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[1733218,24,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[2005673,25,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[2436698,26,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[3613564,27,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[3899547,28,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[4345767,29,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[4876134,30,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[5661442,9050,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[6321619,9080,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[6713249,9090,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[7217907,9100,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[7229126,9110,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[7560558,9122,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[8115869,9140,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[8638103,9151,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[9280179,9170,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[9738717,9180,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[10156856,9190,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[10458576,9200,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[10655116,9220,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[10879371,9230,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[11328884,9250,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[11532856,9260,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[11933818,9270,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[12217535,9280,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1],["0xf3ff14d5ab527059",1]]],[12245277,9281,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1],["0xf3ff14d5ab527059",1]]],[12532644,9291,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0x17a6bc0d0062aeb3",1],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1],["0xf3ff14d5ab527059",1]]],[12876189,9300,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0x17a6bc0d0062aeb3",1],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1],["0xf3ff14d5ab527059",1]]],[13800015,9340,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0x17a6bc0d0062aeb3",1],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",2],["0xf3ff14d5ab527059",2]]],[14188833,9360,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0x17a6bc0d0062aeb3",1],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",2],["0xf3ff14d5ab527059",2]]],[14543918,9370,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0x17a6bc0d0062aeb3",1],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",2],["0xf3ff14d5ab527059",2]]],[15978362,9420,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",4],["0x49eaaf1b548a0cb0",2],["0x91d5df18b0d2cf58",2],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3]]],[1645e4,9430,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",4],["0x49eaaf1b548a0cb0",2],["0x91d5df18b0d2cf58",2],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3]]],[1784e4,9431,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",4],["0x49eaaf1b548a0cb0",2],["0x91d5df18b0d2cf58",2],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3]]],[18407475,1000001,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",5],["0x49eaaf1b548a0cb0",3],["0x91d5df18b0d2cf58",2],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3]]],[19551e3,1001002,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",5],["0x49eaaf1b548a0cb0",3],["0x91d5df18b0d2cf58",2],["0x2a5e924655399e60",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3],["0xfbc577b9d747efd6",1]]],[20181758,1001003,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",5],["0x49eaaf1b548a0cb0",3],["0x91d5df18b0d2cf58",2],["0x2a5e924655399e60",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3],["0xfbc577b9d747efd6",1]]],[20438530,1002e3,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",10],["0x49eaaf1b548a0cb0",3],["0x91d5df18b0d2cf58",2],["0x2a5e924655399e60",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3],["0xfbc577b9d747efd6",1]]],[21169168,1002004,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",10],["0x49eaaf1b548a0cb0",3],["0x91d5df18b0d2cf58",2],["0x2a5e924655399e60",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3],["0xfbc577b9d747efd6",1]]],[21455374,1002005,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",10],["0x49eaaf1b548a0cb0",3],["0x91d5df18b0d2cf58",2],["0x2a5e924655399e60",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3],["0xfbc577b9d747efd6",1]]],[21558004,1002006,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",10],["0x49eaaf1b548a0cb0",3],["0x91d5df18b0d2cf58",2],["0x2a5e924655399e60",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3],["0xfbc577b9d747efd6",1]]],[21800141,1002007,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",10],["0x49eaaf1b548a0cb0",3],["0x91d5df18b0d2cf58",2],["0x2a5e924655399e60",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3],["0xfbc577b9d747efd6",1]]]],Vh=[[214356,4,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",1],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[392764,7,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[409740,8,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[809976,20,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[877581,24,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[879238,25,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[889472,26,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[902937,27,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[932751,28,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[991142,29,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[1030162,31,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[1119657,32,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[1199282,33,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[1342534,34,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[1392263,35,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[1431703,36,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[1433369,37,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[1490972,41,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[2087397,43,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[2316688,44,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[2549864,45,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[3925782,46,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[3925843,47,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[4207800,48,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[4627944,49,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[5124076,50,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[5478664,900,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[5482450,9e3,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[5584305,9010,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[5784566,9030,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[5879822,9031,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[5896856,9032,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[5897316,9033,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[6117927,9050,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[6210274,9070,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[6379314,9080,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[6979141,9090,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[7568453,9100,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[7766394,9111,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[7911691,9120,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[7968866,9121,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[7982889,9122,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[8514322,9130,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[9091726,9140,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[9091774,9150,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[9406726,9160,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[9921066,9170,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[10007115,9180,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[10480973,9190,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[10578091,9200,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[10678509,9210,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[10811001,9220,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[11096116,9230,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[11409279,9250,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[11584820,9251,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[11716837,9260,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[11876919,9261,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[11987927,9270,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1],["0x17a6bc0d0062aeb3",1]]],[12077324,9271,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1],["0x17a6bc0d0062aeb3",1]]],[12301871,9280,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1],["0xf3ff14d5ab527059",1],["0x17a6bc0d0062aeb3",1]]],[12604343,9290,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1],["0xf3ff14d5ab527059",1],["0x17a6bc0d0062aeb3",1]]],[12841034,9300,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1],["0xf3ff14d5ab527059",1],["0x17a6bc0d0062aeb3",1]]],[13128237,9310,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1],["0xf3ff14d5ab527059",1],["0x17a6bc0d0062aeb3",1]]],[13272363,9320,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",2],["0xf3ff14d5ab527059",2],["0x17a6bc0d0062aeb3",1]]],[13483497,9330,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",2],["0xf3ff14d5ab527059",2],["0x17a6bc0d0062aeb3",1]]],[13649433,9340,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",2],["0xf3ff14d5ab527059",2],["0x17a6bc0d0062aeb3",1]]],[13761100,9350,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",2],["0xf3ff14d5ab527059",2],["0x17a6bc0d0062aeb3",1]]],[13847400,9360,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",2],["0xf3ff14d5ab527059",2],["0x17a6bc0d0062aeb3",1]]],[14249200,9370,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",2],["0xf3ff14d5ab527059",2],["0x17a6bc0d0062aeb3",1]]],[14576855,9380,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",3],["0xf3ff14d5ab527059",3],["0x17a6bc0d0062aeb3",1]]],[14849830,9390,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",4],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",3],["0xf3ff14d5ab527059",3],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1]]],[15146832,9400,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",4],["0x49eaaf1b548a0cb0",2],["0x91d5df18b0d2cf58",2],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",3],["0xf3ff14d5ab527059",3],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1]]],[15332317,9401,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",4],["0x49eaaf1b548a0cb0",2],["0x91d5df18b0d2cf58",2],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",3],["0xf3ff14d5ab527059",3],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1]]],[15661793,9420,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",4],["0x49eaaf1b548a0cb0",2],["0x91d5df18b0d2cf58",2],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1]]],[16165469,9430,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",4],["0x49eaaf1b548a0cb0",2],["0x91d5df18b0d2cf58",2],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1]]],[18293984,102e3,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",7],["0x49eaaf1b548a0cb0",3],["0x91d5df18b0d2cf58",2],["0x2a5e924655399e60",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1],["0xfbc577b9d747efd6",1]]],[18293991,103e3,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",8],["0x49eaaf1b548a0cb0",3],["0x91d5df18b0d2cf58",2],["0x2a5e924655399e60",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1],["0xfbc577b9d747efd6",1]]],[18451783,104e3,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",9],["0x49eaaf1b548a0cb0",3],["0x91d5df18b0d2cf58",2],["0x2a5e924655399e60",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1],["0xfbc577b9d747efd6",1]]],[18679741,1005e3,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",9],["0x49eaaf1b548a0cb0",3],["0x91d5df18b0d2cf58",2],["0x2a5e924655399e60",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1],["0xfbc577b9d747efd6",1]]],[19166695,1006e3,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",10],["0x49eaaf1b548a0cb0",3],["0x91d5df18b0d2cf58",2],["0x2a5e924655399e60",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1],["0xfbc577b9d747efd6",1]]],[19234157,1006001,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",10],["0x49eaaf1b548a0cb0",3],["0x91d5df18b0d2cf58",2],["0x2a5e924655399e60",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1],["0xfbc577b9d747efd6",1]]],[19542944,1007e3,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",10],["0x49eaaf1b548a0cb0",3],["0x91d5df18b0d2cf58",2],["0x2a5e924655399e60",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1],["0xfbc577b9d747efd6",1]]],[19621258,1007001,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",10],["0x49eaaf1b548a0cb0",3],["0x91d5df18b0d2cf58",2],["0x2a5e924655399e60",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1],["0xfbc577b9d747efd6",1]]],[19761406,1008e3,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",10],["0x49eaaf1b548a0cb0",3],["0x91d5df18b0d2cf58",2],["0x2a5e924655399e60",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1],["0xfbc577b9d747efd6",1]]],[20056997,1009e3,[["0xdf6acb689907609b",5],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",10],["0x49eaaf1b548a0cb0",3],["0x91d5df18b0d2cf58",2],["0x2a5e924655399e60",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1],["0xfbc577b9d747efd6",1]]],[20368318,101e4,[["0xdf6acb689907609b",5],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",10],["0x49eaaf1b548a0cb0",3],["0x91d5df18b0d2cf58",2],["0x2a5e924655399e60",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3],["0x6ff52ee858e6c5bd",1],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1],["0xfbc577b9d747efd6",1]]],[20649086,1011e3,[["0xdf6acb689907609b",5],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",11],["0x49eaaf1b548a0cb0",3],["0x91d5df18b0d2cf58",2],["0x2a5e924655399e60",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3],["0x6ff52ee858e6c5bd",1],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1],["0xfbc577b9d747efd6",1]]],[21217837,1011001,[["0xdf6acb689907609b",5],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",11],["0x49eaaf1b548a0cb0",3],["0x91d5df18b0d2cf58",2],["0x2a5e924655399e60",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3],["0x6ff52ee858e6c5bd",1],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1],["0xfbc577b9d747efd6",1]]],[21300429,1013e3,[["0xdf6acb689907609b",5],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",11],["0x49eaaf1b548a0cb0",3],["0x91d5df18b0d2cf58",2],["0x2a5e924655399e60",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3],["0x6ff52ee858e6c5bd",1],["0x91b1c8b16328eb92",1],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1],["0xfbc577b9d747efd6",1]]],[21460051,1014e3,[["0xdf6acb689907609b",5],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",11],["0x49eaaf1b548a0cb0",3],["0x91d5df18b0d2cf58",2],["0x2a5e924655399e60",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3],["0x6ff52ee858e6c5bd",1],["0x91b1c8b16328eb92",1],["0x9ffb505aa738d69c",1],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1],["0xfbc577b9d747efd6",1]]],[21925427,1015e3,[["0xdf6acb689907609b",5],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",11],["0x49eaaf1b548a0cb0",4],["0x91d5df18b0d2cf58",2],["0x2a5e924655399e60",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3],["0x6ff52ee858e6c5bd",1],["0x91b1c8b16328eb92",1],["0x9ffb505aa738d69c",1],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1],["0xfbc577b9d747efd6",1]]]],Th={westend:{genesisHash:["0xe143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e"]}};const Sh=Object.entries(s).map((function([e,t]){const n=uo.find((t=>t.network===e))||Th[e];if(!n)throw new Error(`Unable to find info for chain ${e}`);return{genesisHash:(0,ts.V)(n.genesisHash[0]),network:e,versions:t.map((([e,t,n])=>({apis:n,blockNumber:new st(e),specVersion:new st(t)})))}}));function kh(e,t,n){return n(e.toString(),t.toString())}function _h(e=[],t){return e.filter((({minmax:[e,n]})=>(null==e||t>=e)&&(null==n||t<=n))).reduce(((e,{types:t})=>({...e,...t})),{})}function Ph({knownTypes:e},t,n){return kh(t,n,((t,n)=>({...e.typesBundle?.spec?.[n]?.rpc??{},...e.typesBundle?.chain?.[t]?.rpc??{}})))}var Mh=R((function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),Ih=function(e){function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return(0,L.__extends)(t,e),t.prototype.lift=function(e){var t=new Nh(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new Mh},t.prototype.next=function(e){var t=this;$((function(){var n,r;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var a=(0,L.__values)(t.currentObservers),i=a.next();!i.done;i=a.next()){i.value.next(e)}}catch(s){n={error:s}}finally{try{i&&!i.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}}}))},t.prototype.error=function(e){var t=this;$((function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var n=t.observers;n.length;)n.shift().error(e)}}))},t.prototype.complete=function(){var e=this;$((function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}}))},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return(null===(e=this.observers)||void 0===e?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,n=this,r=n.hasError,a=n.isStopped,i=n.observers;return r||a?j:(this.currentObservers=null,i.push(e),new q((function(){t.currentObservers=null,D(i,e)})))},t.prototype._checkFinalizedStatuses=function(e){var t=this,n=t.hasError,r=t.thrownError,a=t.isStopped;n?e.error(r):a&&e.complete()},t.prototype.asObservable=function(){var e=new he;return e.source=this,e},t.create=function(e,t){return new Nh(e,t)},t}(he),Nh=function(e){function t(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return(0,L.__extends)(t,e),t.prototype.next=function(e){var t,n;null===(n=null===(t=this.destination)||void 0===t?void 0:t.next)||void 0===n||n.call(t,e)},t.prototype.error=function(e){var t,n;null===(n=null===(t=this.destination)||void 0===t?void 0:t.error)||void 0===n||n.call(t,e)},t.prototype.complete=function(){var e,t;null===(t=null===(e=this.destination)||void 0===e?void 0:e.complete)||void 0===t||t.call(e)},t.prototype._subscribe=function(e){var t,n;return null!==(n=null===(t=this.source)||void 0===t?void 0:t.subscribe(e))&&void 0!==n?n:j},t}(Ih),Eh=function(e){function t(t){var n=e.call(this)||this;return n._value=t,n}return(0,L.__extends)(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(t){var n=e.prototype._subscribe.call(this,t);return!n.closed&&t.next(this._value),n},t.prototype.getValue=function(){var e=this,t=e.hasError,n=e.thrownError,r=e._value;if(t)throw n;return this._throwIfClosed(),r},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(Ih),Oh=Array.isArray,Ah=Object.getPrototypeOf,Ch=Object.prototype,Hh=Object.keys;function Rh(e){if(1===e.length){var t=e[0];if(Oh(t))return{args:t,keys:null};if((r=t)&&"object"==typeof r&&Ah(r)===Ch){var n=Hh(t);return{args:n.map((function(e){return t[e]})),keys:n}}}var r;return{args:e,keys:null}}var Bh=Array.isArray;function Lh(e){return ze((function(t){return function(e,t){return Bh(t)?e.apply(void 0,(0,L.__spreadArray)([],(0,L.__read)(t))):e(t)}(e,t)}))}function zh(){for(var e=[],t=0;t=2,!1,!0))}var jh=function(e,t){return e.push(t),e};function Fh(){return _e((function(e,t){qh(jh,[])(e).subscribe(t)}))}function Xh(e,t,n,r){Qr(e,t,(()=>$r({},n(t),(e=>r(t,e)))))}function Wh(){return"none"}function Zh(e,{getInstanceId:t=Wh}={}){const n={},r=(...r)=>{const a=(0,je.A)(r),i=t();return n[i]||(n[i]={}),void 0===n[i][a]&&(n[i][a]=e(...r)),n[i][a]};return r.unmemoize=(...e)=>{const r=(0,je.A)(e),a=t();void 0!==n[a]?.[r]&&delete n[a][r]},r}function Gh(e){return _e((function(t,n){var r,a=null,i=!1;a=t.subscribe(Pe(n,void 0,void 0,(function(s){r=Te(e(s,Gh(e)(t))),a?(a.unsubscribe(),a=null,r.subscribe(n)):i=!0}))),i&&(a.unsubscribe(),a=null,r.subscribe(n))}))}function Kh(e,t){return e===t}var Jh={now:function(){return(Jh.delegate||Date).now()},delegate:void 0},Yh=function(e){function t(t,n,r){void 0===t&&(t=1/0),void 0===n&&(n=1/0),void 0===r&&(r=Jh);var a=e.call(this)||this;return a._bufferSize=t,a._windowTime=n,a._timestampProvider=r,a._buffer=[],a._infiniteTimeWindow=!0,a._infiniteTimeWindow=n===1/0,a._bufferSize=Math.max(1,t),a._windowTime=Math.max(1,n),a}return(0,L.__extends)(t,e),t.prototype.next=function(t){var n=this,r=n.isStopped,a=n._buffer,i=n._infiniteTimeWindow,s=n._timestampProvider,o=n._windowTime;r||(a.push(t),!i&&a.push(s.now()+o)),this._trimBuffer(),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var t=this._innerSubscribe(e),n=this._infiniteTimeWindow,r=this._buffer.slice(),a=0;a0?e.prototype.requestAsyncId.call(this,t,n,r):(t.actions.push(this),t._scheduled||(t._scheduled=fb.setImmediate(t.flush.bind(t,void 0))))},t.prototype.recycleAsyncId=function(t,n,r){var a;if(void 0===r&&(r=0),null!=r?r>0:this.delay>0)return e.prototype.recycleAsyncId.call(this,t,n,r);var i=t.actions;null!=n&&(null===(a=i[i.length-1])||void 0===a?void 0:a.id)!==n&&(fb.clearImmediate(n),t._scheduled===n&&(t._scheduled=void 0))},t}(sb),hb=function(){function e(t,n){void 0===n&&(n=e.now),this.schedulerActionCtor=t,this.now=n}return e.prototype.schedule=function(e,t,n){return void 0===t&&(t=0),new this.schedulerActionCtor(this,e).schedule(n,t)},e.now=Jh.now,e}(),bb=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,L.__extends)(t,e),t.prototype.flush=function(e){this._active=!0;var t=this._scheduled;this._scheduled=void 0;var n,r=this.actions;e=e||r.shift();do{if(n=e.execute(e.state,e.delay))break}while((e=r[0])&&e.id===t&&r.shift());if(this._active=!1,n){for(;(e=r[0])&&e.id===t&&r.shift();)e.unsubscribe();throw n}},t}(function(e){function t(t,n){void 0===n&&(n=hb.now);var r=e.call(this,t,n)||this;return r.actions=[],r._active=!1,r}return(0,L.__extends)(t,e),t.prototype.flush=function(e){var t=this.actions;if(this._active)t.push(e);else{var n;this._active=!0;do{if(n=e.execute(e.state,e.delay))break}while(e=t.shift());if(this._active=!1,n){for(;e=t.shift();)e.unsubscribe();throw n}}},t}(hb)))(pb);function mb(e=1750){return t=>{let[n,r,a,i]=[0,0,q.EMPTY,q.EMPTY];return new he((s=>(t.subscribe(s),0==r++&&(1===n?i.unsubscribe():a=t.connect(),n=3),()=>{0==--r&&(2===n?(n=0,i.unsubscribe()):(n=1,i=bb.schedule((()=>{n=0,a.unsubscribe()}),e)))})))}}function yb(e,t){return(0,je.A)({t:e})===(0,je.A)({t:t})}function xb(e){throw e}function gb(){}function vb({delay:e,skipChange:t=!1,skipTimeout:n=!1}={}){return r=>{return r.pipe(Gh(xb),t?Dh(gb):(void 0===i&&(i=fe),a=null!=(a=yb)?a:Kh,_e((function(e,t){var n,r=!0;e.subscribe(Pe(t,(function(e){var s=i(e);!r&&a(n,s)||(r=!1,n=s,t.next(e))})))}))),nb(1),n?Qh():mb(e));var a,i}}function wb(e,t){const n=Zh(((...e)=>new he((r=>{const a=t(...e).subscribe(r);return()=>{n.unmemoize(...e),a.unsubscribe()}})).pipe(vb())),{getInstanceId:()=>e});return n}function Vb(e,t){return wb(e,(e=>{const n=(0,ut.b)(e)?e:fo((e||"").toString());if(n.length>8)return Le(t.registry.createType(20===n.length?"AccountId20":"AccountId",n));const r=t.registry.createType("AccountIndex",n);return t.derive.accounts.indexToId(r.toString()).pipe(ze((e=>ea(e,"Unable to retrieve accountId"))))}))}function Tb(e,t){return wb(e,(()=>{const e=[void 0,[],[],[],void 0],n=[(t.query.elections||t.query.phragmenElection||t.query.electionsPhragmen)?.members,t.query.council?.members,t.query.technicalCommittee?.members,t.query.society?.members,t.query.sudo?.key],r=n.filter((e=>e));return r.length?t.queryMulti(r).pipe(ze((t=>{let r=-1;for(let a=0,i=n.length;at.derive.accounts._flags().pipe(ze((t=>function(e,[t,n,r,a,i]){const s=e?.toString(),o=e=>e.toString()===s;return{isCouncil:(t?.map((e=>Array.isArray(e)?e[0]:e.who))||n||[]).some(o),isSociety:(a||[]).some(o),isSudo:i?.toString()===s,isTechCommittee:(r||[]).some(o)}}(e,t))))))}function kb(e,t){return wb(e,(e=>{try{const n=(0,ut.b)(e)?e:fo((e||"").toString());if(n.length>8){const e=t.registry.createType(20===n.length?"AccountId20":"AccountId",n);return t.derive.accounts.idToIndex(e).pipe(ze((t=>[e,t])))}const r=t.registry.createType("AccountIndex",n);return t.derive.accounts.indexToId(r.toString()).pipe(ze((e=>[e,r])))}catch{return Le([void 0,void 0])}}))}function _b(e){return e.pipe(ze((([e])=>e)))}function Pb(e){return(t,n)=>wb(t,((...t)=>_b(e(n,...t))))}const Mb={toHex:()=>{}};function Ib(e){return e?e.isRaw?nt(e.asRaw.toU8a(!0)):e.isNone?void 0:e.toHex():e}function Nb(e){const t=e.unwrap();return Array.isArray(t)?t[0]:t}function Eb(e,t){return wb(e,(e=>e&&t.query.identity?.identityOf?zh([t.query.identity.identityOf(e),t.query.identity.superOf(e)]):Le([void 0,void 0])))}function Ob(e,t){return wb(e,(e=>t.derive.accounts._identity(e).pipe(Ie((([e,n])=>function(e,t,n){if(t?.isSome)return Le([t,void 0]);if(n?.isSome){const t=n.unwrap();return zh([e.derive.accounts._identity(t[0]).pipe(ze((([e])=>e))),Le(t)])}return Le([void 0,void 0])}(t,e,n))),ze((([e,t])=>function(e,t){if(!e?.isSome)return{judgements:[]};const{info:n,judgements:r}=Nb(e),a=Ib(n.display);return{discord:Ib(n.discord),display:t&&Ib(t[1])||a,displayParent:t&&a,email:Ib(n.email),github:Ib(n.github),image:Ib(n.image),judgements:r,legal:Ib(n.legal),matrix:Ib(n.matrix),other:n.additional?(i=n.additional,i.reduce(((e,[t,n])=>{const r=Ib(t),a=Ib(n);return r&&a&&(e[r]=a),e}),{})):{},parent:t?.[0],pgp:n.pgpFingerprint.unwrapOr(Mb).toHex(),riot:Ib(n.riot),twitter:Ib(n.twitter),web:Ib(n.web)};var i}(e,t))))))}const Ab=Pb(((e,t)=>e.derive.accounts.hasIdentityMulti([t])));function Cb(e,t){return wb(e,(e=>t.query.identity?.identityOf?zh([t.query.identity.identityOf.multi(e),t.query.identity.superOf.multi(e)]).pipe(ze((([e,t])=>e.map(((e,n)=>{const r=t[n],a=r&&r.isSome?r.unwrap()[0].toString():void 0;let i;if(e&&e.isSome){const t=Ib(Nb(e).info.display);t&&!(0,Je.qv)(t)&&(i=t)}return{display:i,hasIdentity:!(!i&&!a),parentId:a}}))))):Le(e.map((()=>({hasIdentity:!1}))))))}function Hb(e,t){return wb(e,(e=>t.derive.accounts.indexes().pipe(ze((t=>t[e.toString()])))))}function Rb(e,t,n){return void 0===n&&(n=1/0),z(t)?Rb((function(n,r){return ze((function(e,a){return t(n,e,r,a)}))(Te(e(n,r)))}),n):("number"==typeof t&&(n=t),_e((function(t,r){return function(e,t,n,r,a,i,s,o){var c=[],d=0,u=0,l=!1,f=function(){!l||c.length||d||t.complete()},p=function(e){return dUb?Le(Ub):(t.query.indices?function(e){return e.query.indices.accounts.entries().pipe(ze((t=>t.reduce(((t,[n,r])=>(r.isSome&&(t[r.unwrap()[0].toString()]=e.registry.createType("AccountIndex",n.args[0])),t)),{}))))}(t).pipe(zb({})):Le({})).pipe(ze((e=>(Ub=e,e))))))}function qb(e,t){return wb(e,(e=>t.query.indices?t.query.indices.accounts(e).pipe(ze((e=>e.unwrapOr([])[0]))):Le(void 0)))}function jb(e,t){return(t&&e.query.nicks?.nameOf?e.query.nicks.nameOf(t):Le(void 0)).pipe(ze((t=>t?.isSome?nt(t.unwrap()[0]).substring(0,e.consts.nicks.maxLength.toNumber()):void 0)))}function Fb(e,t){return wb(e,(e=>t.derive.accounts.idAndIndex(e).pipe(Ie((([e,n])=>zh([Le({accountId:e,accountIndex:n}),t.derive.accounts.identity(e),jb(t,e)]))),ze((([{accountId:e,accountIndex:t},n,r])=>({accountId:e,accountIndex:t,identity:n,nickname:r}))))))}function Xb(e,t){return(n,r)=>wb(n,t(function(e,t){const n=e.registry.getModuleInstances(e.runtimeVersion.specName,t),r=n?.length?n[0]:t;return e.query[r]}(r,e),r,n))}function Wb(e,t){return n=>Xb(n,(n=>()=>(0,qe.T)(n?.[e])?n[e]():Le(t)))}const Zb=Wb("members",[]);function Gb(e,t,n){return((0,qe.T)(t?.proposals)&&n.length?zh([Le(n),t.proposalOf.multi(n).pipe(Gh((()=>Le(n.map((()=>null)))))),t.voting.multi(n)]):Le([[],[],[]])).pipe(ze((t=>function(e,[t,n,r]){return n.map(((n,a)=>({hash:e.registry.createType("Hash",t[a]),proposal:n&&n.isSome?n.unwrap():null,votes:r[a].unwrapOr(null)})))}(e,t))))}function Kb(e){return Xb(e,(e=>()=>Le((0,qe.T)(e?.proposals))))}function Jb(e){return Xb(e,((t,n)=>()=>n.derive[e].proposalHashes().pipe(Ie((e=>Gb(n,t,e))))))}function Yb(e){return Xb(e,((e,t)=>n=>(0,qe.T)(e?.proposals)?_b(Gb(t,e,[n])):Le(null)))}const Qb=Wb("proposalCount",null),$b=Wb("proposals",[]);function em(e){return Xb(e,(e=>()=>(0,qe.T)(e?.prime)?e.prime().pipe(ze((e=>e.unwrapOr(null)))):Le(null)))}const tm=Zb("allianceMotion"),nm=Kb("allianceMotion"),rm=Yb("allianceMotion"),am=Qb("allianceMotion"),im=$b("allianceMotion"),sm=Jb("allianceMotion"),om=em("allianceMotion");function cm(e){return e.query.voterList||e.query.voterBagsList||e.query.bagsList}function dm(e,t){const n=cm(t);return wb(e,(e=>{const t=e.map((e=>kt(e)));return t.length?n.listBags.multi(t).pipe(ze((e=>function(e,t){const n=e.map(((e,n)=>({bag:t[n].unwrapOr(null),id:e,key:e.toString()}))).sort(((e,t)=>t.id.cmp(e.id))),r=n.length-1;return n.map(((e,t)=>(0,M.b)(e,{bagLower:t===r?lt:n[t+1].id,bagUpper:e.id,index:t})))}(t,e)))):Le([])}))}function um(e,t){const n=cm(t);return wb(e,(()=>n.listBags.keys().pipe(Ie((e=>t.derive.bagsList._getIds(e.map((({args:[e]})=>e))))),ze((e=>e.filter((({bag:e})=>e)))))))}function lm(e,t){return wb(e,(e=>t.derive.bagsList._getIds([kt(e)]).pipe(ze((e=>e[0])))))}function fm(e,t){return wb(e,(e=>t.derive.bagsList.listNodes(e.bag).pipe(ze((t=>(0,M.b)({nodes:t},e))))))}function pm(e,t){return wb(e,(e=>t.derive.bagsList.get(e).pipe(Ie((e=>t.derive.bagsList.expand(e))))))}function hm(e,t){setTimeout((()=>{Promise.resolve().then((()=>{e()})).catch((e=>{t?t(e):console.error(e)}))}),0)}function bm(e,t){return wb(e,(e=>e&&e.head.isSome?function(e,t){const n=new Eh(t),r=cm(e);return n.pipe(Ie((e=>r.listNodes(e))),Dh((e=>{hm((()=>{e.isSome&&e.value.next.isSome?n.next(e.unwrap().next.unwrap()):n.complete()}))})),Fh(),ze((e=>e.map((e=>e.unwrap())))))}(t,e.head.unwrap()):Le([])))}function mm(e){return(...t)=>{const n=t.length;if(0===n)throw new Error("Must provide one or more arguments");let r=t[0];for(let a=1;ae.gt(t))),xm=mm(((e,t)=>e.lt(t))),gm="0x76657374696e6720";function vm(e,t,n,r){const{allLocked:a,lockedBalance:i,lockedBreakdown:s,vestingLocked:o}=function(e,t,n){let r=e.registry.createType("Balance"),a=[],i=e.registry.createType("Balance"),s=!1;if(Array.isArray(n)){a=n.filter((({until:e})=>!e||t&&e.gt(t))),s=a.some((({amount:e})=>e&&e.isMax())),i=e.registry.createType("Balance",a.filter((({id:e})=>e.eq(gm))).reduce(((e,{amount:t})=>e.iadd(t)),new st(0)));const o=a.filter((({amount:e})=>e&&!e.isMax()));o.length&&(r=e.registry.createType("Balance",ym(...o.map((({amount:e})=>e)))))}return{allLocked:s,lockedBalance:r,lockedBreakdown:a,vestingLocked:i}}(e,t,r);let c=null;if(n?.frameSystemAccountInfo?.frozen){const{frameSystemAccountInfo:t,freeBalance:r,reservedBalance:i}=n,s=t.frozen.isZero()&&i.isZero(),o=e.consts.balances.existentialDeposit,d=s?new st(0):o,u=t.frozen.sub(i);c=e.registry.createType("Balance",a?0:r.sub(ym(d,u)))}return(0,M.b)({},n,{availableBalance:e.registry.createType("Balance",a?0:ym(new st(0),n?.freeBalance?n.freeBalance.sub(i):new st(0))),lockedBalance:i,lockedBreakdown:s,transferable:c,vestingLocked:o})}function wm(e,t){const[n,[r,a,i],s]=t,o=vm(e,s,n,a[0]);return(0,M.b)(o,function(e,t,n){const r=n||[],a=!t.vestingLocked.isZero(),i=r.map((({locked:t,perBlock:n,startingBlock:r})=>e.gt(r)?xm(t,n.mul(e.sub(r))):lt)),s=i.reduce(((e,t)=>e.iadd(t)),new st(0)),o=r.reduce(((e,{locked:t})=>e.iadd(t)),new st(0));return{isVesting:a,vestedBalance:s,vestedClaimable:a?t.vestingLocked.sub(o.sub(s)):lt,vesting:r.map((({locked:e,perBlock:t,startingBlock:n},r)=>({endBlock:e.div(t).iadd(n),locked:e,perBlock:t,startingBlock:n,vested:i[r]}))).filter((({locked:e})=>!e.isZero())),vestingTotal:o}}(s,o,r),{accountId:n.accountId,accountNonce:n.accountNonce,additional:a.slice(1).map(((t,r)=>vm(e,s,n.additional[r],t))),namedReserves:i})}function Vm(e,t){return zh([e.query.balances.locks(t),e.query.balances.vesting(t)]).pipe(ze((([t,n])=>{let r=null;if(n.isSome){const{offset:t,perBlock:a,startingBlock:i}=n.unwrap();r=e.registry.createType("VestingInfo",{locked:t,perBlock:a,startingBlock:i})}return[r?[r]:null,[t],[]]})))}const Tm=e=>!!e;function Sm(e){return[e.map((e=>!e)),e.filter(Tm)]}function km(e,t,n=["balances"]){const[r,a]=Sm(n.map((t=>e.derive[t]?.customLocks||e.query[t]?.locks))),[i,s]=Sm(n.map((t=>e.query[t]?.reserves)));return zh([e.query.vesting?.vesting?e.query.vesting.vesting(t):Le(e.registry.createType("Option")),a.length?zh(a.map((e=>e(t)))):Le([]),s.length?zh(s.map((e=>e(t)))):Le([])]).pipe(ze((([t,n,a])=>{let s=-1,o=-1;const c=t.unwrapOr(null);return[c?Array.isArray(c)?c:[c]:null,r.map((t=>t?e.registry.createType("Vec"):n[++s])),i.map((t=>t?e.registry.createType("Vec"):a[++o]))]})))}function _m(e,t){const n=t.registry.getModuleInstances(t.runtimeVersion.specName,"balances");return wb(e,(e=>zh([t.derive.balances.account(e),(0,qe.T)(t.query.system?.account)||(0,qe.T)(t.query.balances?.account)?km(t,e,n):Vm(t,e)]).pipe(Ie((([e,n])=>zh([Le(e),Le(n),t.derive.chain.bestNumber()]))),ze((e=>wm(t,e))))))}function Pm(e){return e.registry.createType("Balance")}function Mm(e,[t,n,r,a],i){const s=e.registry.createType("Balance",t.toBn());return i.isFrameAccountData?{frameSystemAccountInfo:{flags:a,frozen:r},freeBalance:t,frozenFee:e.registry.createType("Balance",0),frozenMisc:e.registry.createType("Balance",0),reservedBalance:n,votingBalance:s}:{freeBalance:t,frozenFee:r,frozenMisc:a,reservedBalance:n,votingBalance:s}}function Im(e,t){return zh([e.query.balances.freeBalance(t),e.query.balances.reservedBalance(t),e.query.system.accountNonce(t)]).pipe(ze((([t,n,r])=>[r,[[t,n,Pm(e),Pm(e)]],{isFrameAccountData:!1}])))}function Nm(e,t){const n=t=>[t,[[Pm(e),Pm(e),Pm(e),Pm(e)]],{isFrameAccountData:!1}];return(0,qe.T)(e.query.system.account)?e.query.system.account(t).pipe(ze((({nonce:e})=>n(e)))):(0,qe.T)(e.query.system.accountNonce)?e.query.system.accountNonce(t).pipe(ze((e=>n(e)))):Le(n(e.registry.createType("Index")))}function Em(e,t,n=["balances"]){const r=n.map((t=>e.derive[t]?.customAccount||e.query[t]?.account)).filter((e=>(0,qe.T)(e))),a=(e,t)=>[e,t.map((({feeFrozen:e,free:t,miscFrozen:n,reserved:r})=>[t,r,e,n])),{isFrameAccountData:!1}];return r.length?(0,qe.T)(e.query.system.account)?zh([e.query.system.account(t),...r.map((e=>e(t)))]).pipe(ze((([{nonce:e},...t])=>a(e,t)))):zh([e.query.system.accountNonce(t),...r.map((e=>e(t)))]).pipe(ze((([e,...t])=>a(e,t)))):Nm(e,t)}function Om(e,t){return e.query.system.account(t).pipe(ze((t=>{const n=t.nonce?t.data:t[1],r=t.nonce||t[0];if(!n||n.isEmpty)return[r,[[Pm(e),Pm(e),Pm(e),Pm(e)]],{isFrameAccountData:!1}];if(!!t.data.frozen){const{flags:e,free:t,frozen:a,reserved:i}=n;return[r,[[t,i,a,e]],{isFrameAccountData:!0}]}{const{feeFrozen:e,free:t,miscFrozen:a,reserved:i}=n;return[r,[[t,i,e,a]],{isFrameAccountData:!1}]}})))}function Am(e,t){const n=t.registry.getModuleInstances(t.runtimeVersion.specName,"balances"),r=n&&"balances"!==n[0];return wb(e,(e=>t.derive.accounts.accountId(e).pipe(Ie((e=>e?zh([Le(e),r?Em(t,e,n):(0,qe.T)(t.query.system?.account)?Om(t,e):(0,qe.T)(t.query.balances?.account)?Em(t,e):(0,qe.T)(t.query.balances?.freeBalance)?Im(t,e):Nm(t,e)]):Le([t.registry.createType("AccountId"),[t.registry.createType("Index"),[[Pm(t),Pm(t),Pm(t),Pm(t)]],{isFrameAccountData:!1}]]))),ze((e=>function(e,[t,[n,[r,...a],i]]){return(0,M.b)({accountId:t,accountNonce:n,additional:a.map((t=>Mm(e,t,i)))},Mm(e,r,i))}(t,e))))))}function Cm(e,t){return wb(e,(e=>e?.length?zh(e.map((e=>t.derive.balances.account(e)))):Le([])))}const Hm=_m;function Rm(e,t){const n=e.tx.bounties?e.tx.bounties:e.tx.treasury,r=[n.approveBounty,n.closeBounty,n.proposeCurator,n.unassignCurator];return t.filter((e=>r.find((t=>e.proposal&&t.is(e.proposal)))))}function Bm([e,t,n,r]){const a=[];return e.forEach(((e,i)=>{e.isSome&&a.push({bounty:e.unwrap(),description:t[i].unwrapOrDefault().toUtf8(),index:n[i],proposals:r.filter((e=>e.proposal&&n[i].eq(e.proposal.args[0])))})})),a}function Lm(e,t){const n=t.query.bounties||t.query.treasury;return wb(e,(()=>n.bounties?zh([n.bountyCount(),t.query.council?t.query.council.proposalCount():Le(0)]).pipe(Ie((()=>zh([n.bounties.keys(),t.derive.council?t.derive.council.proposals():Le([])]))),Ie((([e,r])=>{const a=e.map((({args:[e]})=>e));return zh([n.bounties.multi(a),n.bountyDescriptions.multi(a),Le(a),Le(Rm(t,r))])})),ze(Bm)):Le(Bm([[],[],[],[]]))))}const zm=(0,Vt.D8)("toBigInt","toBn","toNumber","unwrap");function Um(e){return zm(e.number)?e.number.unwrap():e.number}function Dm(e){return(t,n)=>wb(t,(()=>e(n).pipe(ze(Um))))}function qm(e,t,n){return e.queryAt(t.parentHash.isEmpty?n||t.hash:t.parentHash).pipe(Ie((e=>function(e,t){const n=t.session?.validators?t.session.validators():Le(null),{logs:[r]}=e.digest,a=r&&(r.isConsensus&&r.asConsensus[0].isNimbus&&r.asConsensus[1]||r.isPreRuntime&&r.asPreRuntime[0].isNimbus&&r.asPreRuntime[1]);if(a){if(t.authorMapping?.mappingWithDeposit)return zh([Le(e),n,t.authorMapping.mappingWithDeposit(a).pipe(ze((e=>e.unwrapOr({account:null}).account)))]);if(t.parachainStaking?.selectedCandidates&&t.session?.nextKeys){const r=a.toHex();return zh([Le(e),n,t.parachainStaking.selectedCandidates().pipe(Rb((e=>zh([Le(e),t.session.nextKeys.multi(e).pipe(ze((e=>e.findIndex((e=>e.unwrapOrDefault().nimbus.toHex()===r)))))]))),ze((([e,t])=>-1===t?null:e[t])))])}}return zh([Le(e),n,Le(null)])}(t,e))))}const jm=Dm((e=>e.rpc.chain.subscribeNewHeads())),Fm=Dm((e=>e.rpc.chain.subscribeFinalizedHeads()));function Xm(e,t){return wb(e,(()=>zh([t.derive.chain.bestNumber(),t.derive.chain.bestNumberFinalized()]).pipe(ze((([e,n])=>t.registry.createType("BlockNumber",e.sub(n)))))))}function Wm(e,t){const[n]=e.logs.filter((e=>e.isConsensus)),[r]=e.logs.filter((e=>e.isPreRuntime)),[a]=e.logs.filter((e=>e.isSeal));let i;try{if(r){const[e,n]=r.asPreRuntime;i=e.extractAuthor(n,t)}if(!i&&n){const[e,r]=n.asConsensus;i=e.extractAuthor(r,t)}if(!i&&a){const[e,n]=a.asSeal;i=e.extractAuthor(n,t)}}catch{}return i}function Zm(e,t){return wb(e,(e=>zh([t.rpc.chain.getBlock(e),t.queryAt(e)]).pipe(Ie((([n,r])=>zh([Le(n),r.system.events(),qm(t,n.block.header,e)]))),ze((([e,t,[,n,r]])=>function(e,t,n,r,a){const i=e.createClass("SignedBlock");return new class extends i{__internal__author;__internal__events;__internal__extrinsics;constructor(e,t,n,r,a){var i,s;super(e,t),this.__internal__author=a||Wm(this.block.header.digest,r||[]),this.__internal__events=n||[],this.__internal__extrinsics=(i=this.block.extrinsics,s=this.__internal__events,i.map(((e,t)=>{let n,r;const a=s.filter((({phase:e})=>e.isApplyExtrinsic&&e.asApplyExtrinsic.eq(t))).map((({event:e})=>("system"===e.section&&("ExtrinsicSuccess"===e.method?r=e.data[0]:"ExtrinsicFailed"===e.method&&(n=e.data[0],r=e.data[1])),e)));return{dispatchError:n,dispatchInfo:r,events:a,extrinsic:e}}))),this.createdAtHash=t?.createdAtHash}get author(){return this.__internal__author}get events(){return this.__internal__events}get extrinsics(){return this.__internal__extrinsics}}(e,t,n,r,a)}(t.registry,e,t,n,r))))))}function Gm(e,t){return wb(e,(e=>t.rpc.chain.getBlockHash(e).pipe(Ie((e=>t.derive.chain.getBlock(e))))))}function Km(e,t,n,r){const a=e.createClass("Header");return new class extends a{__internal__author;constructor(e,t,n,r){super(e,t),this.__internal__author=r||Wm(this.digest,n||[]),this.createdAtHash=t?.createdAtHash}get author(){return this.__internal__author}}(e,t,n,r)}function Jm(e,t){return wb(e,(e=>t.rpc.chain.getHeader(e).pipe(Ie((n=>qm(t,n,e))),ze((([e,t,n])=>Km((t||e).registry,e,t,n))))))}function Ym(e,t){return wb(e,(()=>t.derive.chain.subscribeFinalizedHeads().pipe(Ie((e=>t.derive.chain.getBlock(e.createdAtHash||e.hash))))))}function Qm(e,t){return wb(e,((e,n,r=[])=>t.rpc.chain.getHeader(e).pipe(Ie((e=>e.parentHash.eq(n)?Le([e,...r]):t.derive.chain._getHeaderRange(e.parentHash,n,[e,...r]))))))}function $m(e,t){return wb(e,(()=>{let e=null;return t.rpc.chain.subscribeFinalizedHeads().pipe(Ie((n=>{const r=e,a=n.parentHash;return e=n.createdAtHash=n.hash,null===r||a.eq(r)?Le(n):t.derive.chain._getHeaderRange(a,r,[n]).pipe(Ie((e=>Be(e))))})))}))}function ey(e,t){return wb(e,(()=>t.derive.chain.subscribeNewHeads().pipe(Ie((e=>t.derive.chain.getBlock(e.createdAtHash||e.hash))))))}function ty(e,t){return wb(e,(()=>t.rpc.chain.subscribeNewHeads().pipe(Ie((e=>qm(t,e))),ze((([e,t,n])=>(e.createdAtHash=e.hash,Km(e.registry,e,t,n)))))))}function ny(e,t){return wb(e,(()=>function(e){return Le([e.consts.contracts.callBaseFee||e.registry.createType("Balance"),e.consts.contracts.contractFee||e.registry.createType("Balance"),e.consts.contracts.creationFee||e.registry.createType("Balance"),e.consts.contracts.transactionBaseFee||e.registry.createType("Balance"),e.consts.contracts.transactionByteFee||e.registry.createType("Balance"),e.consts.contracts.transferFee||e.registry.createType("Balance"),e.consts.contracts.rentByteFee||e.registry.createType("Balance"),e.consts.contracts.rentDepositOffset||e.registry.createType("Balance"),e.consts.contracts.surchargeReward||e.registry.createType("Balance"),e.consts.contracts.tombstoneDeposit||e.registry.createType("Balance")])}(t).pipe(ze((([e,t,n,r,a,i,s,o,c,d])=>({callBaseFee:e,contractFee:t,creationFee:n,rentByteFee:s,rentDepositOffset:o,surchargeReward:c,tombstoneDeposit:d,transactionBaseFee:r,transactionByteFee:a,transferFee:i}))))))}function ry(e){return!Array.isArray(e)}function ay(e){return e.stakeOf.entries().pipe(ze((e=>e.map((([{args:[e]},t])=>[e,t])))))}function iy(e){return e.votesOf.entries().pipe(ze((e=>e.map((([{args:[e]},t])=>[e,t])))))}function sy(e,t){const n=t.query.elections||t.query.phragmenElection||t.query.electionsPhragmen;return wb(e,(()=>n?n.stakeOf?function(e,t){return zh([ay(t),iy(t)]).pipe(ze((([t,n])=>{const r=[];return n.forEach((([t,n])=>{r.push([t,{stake:e.registry.createType("Balance"),votes:n}])})),t.forEach((([e,t])=>{const n=r.find((([t])=>t.eq(e)));n?n[1].stake=t:r.push([e,{stake:t,votes:[]}])})),r})))}(t,n):function(e){return e.voting.entries().pipe(ze((e=>e.map((([{args:[e]},t])=>[e,ry(t)?{stake:t.stake,votes:t.votes}:{stake:t[0],votes:t[1]}])))))}(n):Le([])))}function oy(e,t){return wb(e,(e=>t.derive.council.votes().pipe(ze((n=>(n.find((([t])=>t.eq(e)))||[null,{stake:t.registry.createType("Balance"),votes:[]}])[1])))))}const cy=Zb("council"),dy=Kb("council"),uy=Yb("council"),ly=Qb("council"),fy=$b("council"),py=Jb("council"),hy=em("council");function by(e,t){return wb(e,(e=>t.query.crowdloan.funds(e).pipe(ze((e=>e.isSome?function(e){return(0,N.X)(Mt(":child_storage:default:",Pi(Mt("crowdloan",(e.fundIndex||e.trieIndex).toU8a()))))}(e.unwrap()):null)))))}var my=new he((function(e){return e.complete()}));function yy(e){const t=e.length;if(0===t)return[];if(1===t)return e[0];let n=0;for(let i=0;i"crowdloan"===r&&["Contributed","Withdrew"].includes(n)&&t.eq(e))).reduce(((e,{event:{data:[t],method:n}})=>("Contributed"===n?e.added.push(t.toHex()):e.removed.push(t.toHex()),e)),{added:[],blockHash:t.createdAtHash?.toHex()||"-",removed:[]})}const gy=1e3;function vy(e,t){let n=[],r=[];return e.query.system.events().pipe(Ie((e=>{const a=xy(t,e);return a.added.length||a.removed.length?(n=n.concat(...a.added),r=r.concat(...a.removed),Le({added:n,addedDelta:a.added,blockHash:e.createdAtHash?.toHex()||"-",removed:r,removedDelta:a.removed})):my})),zb({added:n,addedDelta:[],blockHash:"-",removed:r,removedDelta:[]}))}function wy(e,t,n){return function(e,t){return e.query.system.events().pipe(Ie((e=>{const n=e.filter((({event:{data:[e],method:n,section:r}})=>"crowdloan"===r&&["AllRefunded","Dissolved","PartiallyRefunded"].includes(n)&&e.eq(t)));return n.length?Le(e.createdAtHash?.toHex()||"-"):my})),zb("-"))}(e,t).pipe(Ie((()=>(0,qe.T)(e.rpc.childstate.getKeysPaged)?function(e,t){const n=new Eh(void 0);return n.pipe(Ie((n=>e.rpc.childstate.getKeysPaged(t,"0x",gy,n))),Dh((e=>{hm((()=>{e.length===gy?n.next(e[gy-1].toHex()):n.complete()}))})),Fh(),ze((e=>yy(e))))}(e,n):e.rpc.childstate.getKeys(n,"0x"))),ze((e=>e.map((e=>e.toHex())))))}function Vy(e,t){return wb(e,(e=>t.derive.crowdloan.childKey(e).pipe(Ie((n=>n?function(e,t,n){return zh([wy(e,t,n),vy(e,t)]).pipe(ze((([e,{added:t,blockHash:n,removed:r}])=>{const a={};return e.forEach((e=>{a[e]=!0})),t.forEach((e=>{a[e]=!0})),r.forEach((e=>{delete a[e]})),{blockHash:n,contributorsHex:Object.keys(a)}})))}(t,e,n):Le({blockHash:"-",contributorsHex:[]}))))))}function Ty(e,t,n){return zh(n.map((n=>e.rpc.childstate.getStorage(t,n)))).pipe(ze((t=>t.map((t=>e.registry.createType("Option",t))).map((t=>t.isSome?e.registry.createType("Balance",t.unwrap()):e.registry.createType("Balance"))).reduce(((e,t,r)=>(0,M.b)(e,{[n[r]]:t})),{}))))}function Sy(e,t,n,r){return e.query.system.events().pipe(Ie((a=>{const i=xy(t,a),s=r.filter((e=>i.added.includes(e)||i.removed.includes(e)));return s.length?Ty(e,n,s):my})),zb({}))}function ky(e,t){return wb(e,((e,n)=>t.derive.crowdloan.childKey(e).pipe(Ie((r=>r&&n.length?function(e,t,n,r){return zh([Ty(e,n,r),Sy(e,t,n,r)]).pipe(ze((([e,t])=>(0,M.b)({},e,t))))}(t,e,r,n):Le({}))))))}function _y(e){return(0,N.X)((0,La.j)(e))}function Py(e){const t=kt(e);if(t.isNeg())throw new Error("square root of negative numbers is not supported");if(t.lte(xt))return new st(~~Math.sqrt(t.toNumber()));let n=gt.clone();for(;;){const e=t.div(n).iadd(n).ishrn(1);if(n.eq(e)||n.eq(e.sub(ft)))return n;n=e}}function My(e,t,n,r){for(;;){const a=e.div(t),i=n.div(r);if(a.lt(i))return!0;if(i.lt(a))return!1;const s=e.mod(t),o=n.mod(r);if(o.isZero())return!1;if(s.isZero())return!0;e=r,n=t,t=o,r=s}}function Iy(e,t,n){return e.isSimpleMajority?n.votedAye.gt(n.votedNay):function(e,t,{votedAye:n,votedNay:r,votedTotal:a}){const i=Py(a);return!i.isZero()&&(e.isSuperMajorityApprove?My(r,i,n,t):My(r,t,n,i))}(e,t,n)}function Ny(e,t,n){const r=t.status.tally?function(e,t){const n=[],r=[];return t.forEach((e=>{e.vote.isAye?n.push(e):r.push(e)})),{allAye:n,allNay:r,voteCount:n.length+r.length,voteCountAye:n.length,voteCountNay:r.length,votedAye:e.ayes,votedNay:e.nays,votedTotal:e.turnout}}(t.status.tally,n):n.reduce(((e,t)=>{const{balance:n,vote:r}=t,a=0===r.conviction.index,i=n.muln(a?1:r.conviction.index).divn(a?10:1);return r.isAye?(e.allAye.push(t),e.voteCountAye++,e.votedAye.iadd(i)):(e.allNay.push(t),e.voteCountNay++,e.votedNay.iadd(i)),e.voteCount++,e.votedTotal.iadd(i),e}),{allAye:[],allNay:[],voteCount:0,voteCountAye:0,voteCountNay:0,votedAye:new st(0),votedNay:new st(0),votedTotal:new st(0)});return(0,M.b)({},r,{isPassing:Iy(t.status.threshold,e,r),votes:n})}function Ey(e){return e.isLegacy?e.asLegacy.hash_.toHex():e.isLookup?e.asLookup.hash_.toHex():e.isInline?e.asInline.hash.toHex():(0,I.K)(e)?(0,Je.qv)(e)?e:_y(e):(0,ut.b)(e)?(0,N.X)(e):e.toHex()}function Oy(e){return Ey(e.proposal||e.proposalHash)}const Ay=_y("democrac");function Cy(e){return function(e){return e.derive.democracy.referendumsFinished().pipe(Ie((()=>e.query.scheduler.agenda.keys())),Ie((t=>{const n=t.map((({args:[e]})=>e));return n.length?zh([Le(n),e.query.scheduler.agenda.multi(n).pipe(Gh((()=>Le(n.map((()=>[]))))))]):Le([[],[]])})))}(e).pipe(Ie((([t,n])=>{const r=[];return t.forEach(((t,a)=>{(n[a]||[]).filter((e=>e.isSome)).forEach((n=>{const a=n.unwrap();if(a.maybeId.isSome){const n=a.maybeId.unwrap().toHex();if(n.startsWith(Ay)){const i=a.call instanceof nn?function(e){return e.isInline||e.isLegacy||e.isLookup}(a.call)?Ey(a.call):a.call.isHash?a.call.asHash.toHex():a.call.asValue.args[0].toHex():a.call.args[0].toHex();r.push({at:t,imageHash:i,index:e.registry.createType("(u64, ReferendumIndex)",n)[1]})}}}))})),zh([Le(r),r.length?e.derive.democracy.preimages(r.map((({imageHash:e})=>e))):Le([])])})),ze((([e,t])=>e.map(((e,n)=>(0,M.b)({image:t[n]},e))))))}function Hy(e,t){return wb(e,(()=>(0,qe.T)(t.query.scheduler?.agenda)?Cy(t):t.query.democracy.dispatchQueue?function(e){return e.query.democracy.dispatchQueue().pipe(Ie((t=>zh([Le(t),e.derive.democracy.preimages(t.map((([,e])=>e)))]))),ze((([e,t])=>e.map((([e,n,r],a)=>({at:e,image:t[a],imageHash:Ey(n),index:r}))))))}(t):Le([])))}const Ry=[0,1,2,4,8,16,32];function By(e,[t,n],r){const{balance:a,vote:i}=n.asStandard,[s,o]=r.isFinished?function(e,t,{approved:n,end:r}){return[r,n.isTrue&&t.isAye||n.isFalse&&t.isNay?r.add((e.consts.democracy.voteLockingPeriod||e.consts.democracy.enactmentPeriod).muln(Ry[t.conviction.index])):lt]}(e,i,r.asFinished):[lt,lt];return{balance:a,isDelegated:!1,isFinished:r.isFinished,referendumEnd:s,referendumId:t,unlockAt:o,vote:i}}function Ly(e,t){return wb(e,(e=>t.query.democracy.votingOf?t.query.democracy.votingOf(e).pipe(Ie((e=>e.isDirect?function(e,{votes:t}){return t.length?e.query.democracy.referendumInfoOf.multi(t.map((([e])=>e))).pipe(ze((n=>t.map(((e,t)=>[e,n[t].unwrapOr(null)])).filter((e=>!!e[1]&&(0,Fe.b)(e[1].end)&&e[0][1].isStandard)).map((([t,n])=>By(e,t,n)))))):Le([])}(t,e.asDirect):e.isDelegating?function(e,{balance:t,conviction:n,target:r}){return e.derive.democracy.locks(r).pipe(ze((r=>r.map((({isFinished:r,referendumEnd:a,referendumId:i,unlockAt:s,vote:o})=>({balance:t,isDelegated:!0,isFinished:r,referendumEnd:a,referendumId:i,unlockAt:s.isZero()?s:a.add((e.consts.democracy.voteLockingPeriod||e.consts.democracy.enactmentPeriod).muln(Ry[n.index])),vote:e.registry.createType("Vote",{aye:o.isAye,conviction:n})}))))))}(t,e.asDelegating):Le([])))):Le([])))}function zy(e,t){return wb(e,(()=>t.query.democracy?.nextExternal?t.query.democracy.nextExternal().pipe(Ie((e=>function(e,t){if(t.isNone)return Le(null);const[n,r]=t.unwrap();return e.derive.democracy.preimage(n).pipe(ze((e=>({image:e,imageHash:Ey(n),threshold:r}))))}(t,e)))):Le(null)))}function Uy(e,[t,n,r,a]){let i;try{i=e.registry.createType("Call",t.toU8a(!0))}catch(s){console.error(s)}return{at:a,balance:r,proposal:i,proposer:n}}function Dy(e,t){const n=t.map((e=>Ey(e)));return e.query.democracy.preimages.multi(n).pipe(ze((t=>t.map((t=>function(e,t){if(!t.isNone){if(function(e,t){return!!t&&!e.query.democracy.dispatchQueue}(e,t)){const n=t.unwrap();if(n.isMissing)return;const{data:r,deposit:a,provider:i,since:s}=n.asAvailable;return Uy(e,[r,i,a,s])}return Uy(e,t.unwrap())}}(e,t))))))}function qy(e,t){const n=t.map((e=>Ey(e))),r=e.registry.lookup.getTypeDef(e.query.preimage.preimageFor.creator.meta.type.asMap.key).type;return e.query.preimage.statusFor.multi(n).pipe(Ie((t=>{const a=t.map((e=>e.unwrapOr(null))),i=a.map(((e,t)=>e?"H256"===r?n[t]:e.isRequested?[n[t],e.asRequested.len.unwrapOr(0)]:[n[t],e.asUnrequested.len]:null)).filter((e=>!!e));return e.query.preimage.preimageFor.multi(i).pipe(ze((t=>{let r=-1;return a.map(((e,a)=>e?[n[a],e,t[++r].unwrapOr(null)]:[n[a],null,null])).map((t=>function(e,[t,n,r]){if(!n)return;const[a,i]=n.isUnrequested?function(e){return e.ticket||e.deposit}(n.asUnrequested):function(e){return(e.maybeTicket||e.deposit).unwrapOrDefault()}(n.asRequested);let s;if(r)try{s=e.registry.createType("Call",r.toU8a(!0))}catch(o){console.error(o)}return{at:lt,balance:i,proposal:s,proposalHash:t,proposer:a}}(e,t)))})))})))}function jy(e,t){return wb(e,(e=>e.length?(0,qe.T)(t.query.democracy.preimages)?Dy(t,e):(0,qe.T)(t.query.preimage.preimageFor)?qy(t,e):Le([]):Le([])))}const Fy=Pb(((e,t)=>e.derive.democracy.preimages([t])));function Xy([e,t,n]){return e.filter((([,,e],t)=>!!n[t]?.isSome&&!e.isEmpty)).map((([e,r,a],i)=>{const s=n[i].unwrap();return(0,M.b)({image:t[i],imageHash:Ey(r),index:e,proposer:a},function(e){return(0,qe.T)(e[1].mul)}(s)?{balance:s[1],seconds:s[0]}:{balance:s[0],seconds:s[1]})}))}function Wy(e,t){return wb(e,(()=>(0,qe.T)(t.query.democracy?.publicProps)?t.query.democracy.publicProps().pipe(Ie((e=>e.length?zh([Le(e),t.derive.democracy.preimages(e.map((([,e])=>e))),t.query.democracy.depositOf.multi(e.map((([e])=>e)))]):Le([[],[],[]]))),ze(Xy)):Le([])))}function Zy(e,t){return wb(e,(()=>t.query.democracy?.lowestUnbaked?t.queryMulti([t.query.democracy.lowestUnbaked,t.query.democracy.referendumCount]).pipe(ze((([e,t])=>t.gt(e)?[...Array(t.sub(e).toNumber())].map(((t,n)=>e.addn(n))):[]))):Le([])))}function Gy(e,t){return wb(e,(()=>t.derive.democracy.referendumsActive().pipe(Ie((e=>e.length?zh([Le(e),t.derive.democracy._referendumsVotes(e)]):Le([[],[]]))),ze((([e,t])=>e.map(((e,n)=>(0,M.b)({},e,t[n]))))))))}function Ky(e,t){return wb(e,(()=>t.derive.democracy.referendumIds().pipe(Ie((e=>e.length?t.derive.democracy.referendumsInfo(e):Le([]))))))}function Jy(e,t){return wb(e,(()=>t.derive.democracy.referendumIds().pipe(Ie((e=>t.query.democracy.referendumInfoOf.multi(e))),ze((e=>e.map((e=>e.unwrapOr(null))).filter((e=>!!e&&e.isFinished)).map((e=>e.asFinished)))))))}function Yy(e,t){return e.query.democracy.votersFor(t).pipe(Ie((n=>zh([Le(n),n.length?e.query.democracy.voteOf.multi(n.map((e=>[t,e]))):Le([]),e.derive.balances.votingBalances(n)]))),ze((([t,n,r])=>t.map(((t,a)=>({accountId:t,balance:r[a].votingBalance||e.registry.createType("Balance"),isDelegating:!1,vote:n[a]||e.registry.createType("Vote")}))))))}function Qy(e,t){return e.query.democracy.votingOf.entries().pipe(ze((n=>{const r=n.map((([{args:[e]},t])=>[e,t])),a=function(e,t){return e.filter((([,e])=>e.isDirect)).map((([e,n])=>[e,n.asDirect.votes.filter((([e])=>e.eq(t)))])).filter((([,e])=>!!e.length)).reduce(((e,[t,n])=>n.reduce(((e,[,n])=>(n.isStandard&&e.push((0,M.b)({accountId:t,isDelegating:!1},n.asStandard)),e)),e)),[])}(r,t),i=r.filter((([,e])=>e.isDelegating)).map((([e,t])=>[e,t.asDelegating]));return i.forEach((([t,{balance:n,conviction:r,target:s}])=>{const o=i.find((([e])=>e.eq(s))),c=a.find((({accountId:e})=>e.eq(o?o[0]:s)));c&&a.push({accountId:t,balance:n,isDelegating:!0,vote:e.registry.createType("Vote",{aye:c.vote.isAye,conviction:r})})})),a})))}function $y(e,t){return wb(e,(e=>zh([t.derive.democracy.sqrtElectorate(),(0,qe.T)(t.query.democracy.votingOf)?Qy(t,e.index):Yy(t,e.index)]).pipe(ze((([t,n])=>Ny(t,e,n))))))}function ex(e,t){return wb(e,(e=>e.length?zh(e.map((e=>t.derive.democracy._referendumVotes(e)))):Le([])))}function tx(e,t){return wb(e,((e,n)=>{const r=function(e){if(e.isNone)return null;const t=e.unwrap();return function(e){return!!e.proposalHash}(t)?t:t.isOngoing?t.asOngoing:null}(n);return r?t.derive.democracy.preimage(r.proposal||r.proposalHash).pipe(ze((n=>({image:n,imageHash:Oy(r),index:t.registry.createType("ReferendumIndex",e),status:r})))):Le(null)}))}function nx(e,t){return wb(e,(e=>e.length?t.query.democracy.referendumInfoOf.multi(e).pipe(Ie((n=>zh(e.map(((e,r)=>t.derive.democracy._referendumInfo(e,n[r])))))),ze((e=>e.filter((e=>!!e))))):Le([])))}function rx(e,t){return wb(e,(()=>t.query.balances.totalIssuance().pipe(ze(Py))))}function ax(e){return function(e){return!Array.isArray(e)}(e)?[e.who,e.stake]:e}function ix(e){return function(e){return Array.isArray(e)}(e)?e[0]:e}function sx([,e],[,t]){return t.cmp(e)}function ox(e,t){return wb(e,(()=>{const[e,n]=function(e){const[t]=e.registry.getModuleInstances(e.runtimeVersion.specName,"council")||["council"],n=e.query.phragmenElection?"phragmenElection":e.query.electionsPhragmen?"electionsPhragmen":e.query.elections?"elections":null;return[e.query[t]?t:"council",n]}(t);return(n?function(e,t,n){return e.queryMulti([e.query[t].members,e.query[n].candidates,e.query[n].members,e.query[n].runnersUp])}(t,e,n):function(e,t){return zh([e.query[t].members(),Le([]),Le([]),Le([])])}(t,e)).pipe(ze((([e,r,a,i])=>(0,M.b)({},function(e,t){return t?{candidacyBond:e.consts[t].candidacyBond,desiredRunnersUp:e.consts[t].desiredRunnersUp,desiredSeats:e.consts[t].desiredMembers,termDuration:e.consts[t].termDuration,votingBond:e.consts[t].votingBond,votingBondBase:e.consts[t].votingBondBase,votingBondFactor:e.consts[t].votingBondFactor}:{}}(t,n),{candidateCount:t.registry.createType("u32",r.length),candidates:r.map(ix),members:a.length?a.map(ax).sort(sx):e.map((e=>[e,t.registry.createType("Balance")])),runnersUp:i.map(ax).sort(sx)}))))}))}function cx([e,t,n,r]){return t.forEach(((t,a)=>{const i=t.toString(),s=r[a],o=!n[a].isEmpty,c=e[i];c&&c.hasMessage===o&&c.blockCount.eq(s)||(e[i]={blockCount:s,hasMessage:o,isOnline:o||s.gt(lt)})})),e}function dx(e,t){return wb(e,(()=>t.query.imOnline?.receivedHeartbeats?t.derive.staking.overview().pipe(Ie((({currentIndex:e,validators:n})=>zh([Le({}),Le(n),t.query.imOnline.receivedHeartbeats.multi(n.map(((t,n)=>[e,n]))),t.query.imOnline.authoredBlocks.multi(n.map((t=>[e,t])))]))),ze(cx)):Le({})))}const ux=Zb("membership"),lx=Kb("membership"),fx=Yb("membership"),px=Qb("membership"),hx=$b("membership"),bx=Jb("membership"),mx=em("membership");function yx(e,t){return!!e.isSome&&e.unwrap().some((e=>e.eq(t)))}function xx(e,t){const n=t.find((([t])=>t===e));if(n&&n[1].isSome){const[e,t]=n[1].unwrap();return(0,M.b)({collatorId:e},t.isWithRetries?{isRetriable:!0,retries:t.asWithRetries.toNumber()}:{isRetriable:!1,retries:0})}return null}function gx(e,t){return t.map((t=>{const n=t.find((([t])=>t===e));return n?n[1]:null}))}function vx(e,t){return wb(e,(e=>t.query.registrar&&t.query.parachains?t.queryMulti([t.query.registrar.active,t.query.registrar.retryQueue,t.query.registrar.selectedThreads,t.query.parachains.didUpdate,[t.query.registrar.paras,e],[t.query.registrar.pendingSwap,e],[t.query.parachains.heads,e],[t.query.parachains.relayDispatchQueue,e]]).pipe(ze((n=>function(e,[t,n,r,a,i,s,o,c]){return i.isNone?null:{active:xx(e,t),didUpdate:yx(a,e),heads:o,id:e,info:(0,M.b)({id:e},i.unwrap()),pendingSwapId:s.unwrapOr(null),relayDispatchQueue:c,retryCollators:gx(e,n),selectedCollators:gx(e,r)}}(t.registry.createType("ParaId",e),n)))):Le(null)))}function wx([e,t,n,r,a]){return e.map(((e,i)=>({didUpdate:yx(t,e),id:e,info:(0,M.b)({id:e},r[i].unwrapOr(null)),pendingSwapId:a[i].unwrapOr(null),relayDispatchQueueSize:n[i][0].toNumber()})))}function Vx(e,t){return wb(e,(()=>t.query.registrar?.parachains&&t.query.parachains?t.query.registrar.parachains().pipe(Ie((e=>zh([Le(e),t.query.parachains.didUpdate(),t.query.parachains.relayDispatchQueueSize.multi(e),t.query.registrar.paras.multi(e),t.query.registrar.pendingSwap.multi(e)]))),ze(wx)):Le([])))}function Tx([e,t,n,r,a]){return{activeEra:t,activeEraStart:n,currentEra:r,currentIndex:e,validatorCount:a}}function Sx(e,t){return wb(e,(()=>t.query.session?t.query.staking?function(e){return e.queryMulti([e.query.session.currentIndex,e.query.staking.activeEra,e.query.staking.currentEra,e.query.staking.validatorCount]).pipe(ze((([e,t,n,r])=>{const{index:a,start:i}=t.unwrapOrDefault();return Tx([e,a,i,n.unwrapOrDefault(),r])})))}(t):function(e){return e.query.session.currentIndex().pipe(ze((t=>Tx([t,e.registry.createType("EraIndex"),e.registry.createType("Option"),e.registry.createType("EraIndex"),e.registry.createType("u32")]))))}(t):function(e){return Le(Tx([e.registry.createType("SessionIndex",1),e.registry.createType("EraIndex"),e.registry.createType("Option"),e.registry.createType("EraIndex"),e.registry.createType("u32")]))}(t)))}function kx(e,t){return wb(e,(()=>t.derive.session.indexes().pipe(ze((e=>{const n=t.consts?.babe?.epochDuration||t.registry.createType("u64",1),r=t.consts?.staking?.sessionsPerEra||t.registry.createType("SessionIndex",1);return(0,M.b)({eraLength:t.registry.createType("BlockNumber",r.mul(n)),isEpoch:!!t.query.babe,sessionLength:n,sessionsPerEra:r},e)})))))}function _x(e){return(t,n)=>wb(t,(()=>n.derive.session.progress().pipe(ze((t=>t[e])))))}function Px(e,t){return wb(e,(()=>t.query.babe?function(e){return e.derive.session.info().pipe(Ie((t=>zh([Le(t),e.query.staking?.erasStartSessionIndex?e.queryMulti([e.query.babe.currentSlot,e.query.babe.epochIndex,e.query.babe.genesisSlot,[e.query.staking.erasStartSessionIndex,t.activeEra]]):e.queryMulti([e.query.babe.currentSlot,e.query.babe.epochIndex,e.query.babe.genesisSlot])]))),ze((([t,[n,r,a,i]])=>[t,[n,r,a,i&&i.isSome?i.unwrap():e.registry.createType("SessionIndex",1)]])))}(t).pipe(ze((([e,n])=>function(e,t,[n,r,a,i]){const s=r.mul(t.sessionLength).iadd(a),o=n.sub(s),c=t.currentIndex.sub(i).imul(t.sessionLength).iadd(o);return(0,M.b)({eraProgress:e.registry.createType("BlockNumber",c),sessionProgress:e.registry.createType("BlockNumber",o)},t)}(t,e,n)))):function(e){return e.derive.session.info().pipe(ze((t=>(0,M.b)({eraProgress:e.registry.createType("BlockNumber"),sessionProgress:e.registry.createType("BlockNumber")},t))))}(t)))}const Mx=_x("eraLength"),Ix=_x("eraProgress"),Nx=_x("sessionProgress");function Ex(e,t){return wb(e,(()=>t.query.society.suspendedCandidates&&t.query.society.candidates.creator.meta.type.isPlain?function(e){return e.query.society.candidates().pipe(Ie((t=>zh([Le(t),e.query.society.suspendedCandidates.multi(t.map((({who:e})=>e)))]))),ze((([e,t])=>e.map((({kind:e,value:n,who:r},a)=>({accountId:r,isSuspended:t[a].isSome,kind:e,value:n}))))))}(t):function(e){return e.query.society.candidates.entries().pipe(ze((e=>e.filter((([,e])=>e.isSome)).map((([{args:[e]},t])=>[e,t.unwrap()])).map((([e,{bid:t,kind:n}])=>({accountId:e,isSuspended:!1,kind:n,value:t}))))))}(t)))}function Ox(e,t){return wb(e,(()=>zh([t.query.society.bids(),t.query.society.defender?t.query.society.defender():Le(void 0),t.query.society.founder(),t.query.society.head(),t.query.society.maxMembers?t.query.society.maxMembers():Le(void 0),t.query.society.pot()]).pipe(ze((([e,t,n,r,a,i])=>({bids:e,defender:t?.unwrapOr(void 0),founder:n.unwrapOr(void 0),hasDefender:t?.isSome&&r.isSome&&!r.eq(t)||!1,head:r.unwrapOr(void 0),maxMembers:a,pot:i}))))))}function Ax(e,t){return wb(e,(e=>t.derive.society._members([e]).pipe(ze((([e])=>e)))))}function Cx(e,t){return wb(e,(e=>t.query.society.members.creator.meta.type.isMap?function(e,t){return zh([Le(t),e.query.society.members.multi(t),e.query.society.payouts.multi(t),e.query.society.challengeRoundCount().pipe(Ie((n=>e.query.society.defenderVotes.multi(t.map((e=>[n,e])))))),e.query.society.suspendedMembers.multi(t)]).pipe(ze((([e,t,n,r,a])=>e.map(((e,i)=>t[i].isSome?{accountId:e,isDefenderVoter:r[i].isSome,isSuspended:a[i].isSome,member:t[i].unwrap(),payouts:n[i].payouts}:null)).filter((e=>!!e)).map((({accountId:e,isDefenderVoter:t,isSuspended:n,member:r,payouts:a})=>({accountId:e,isDefenderVoter:t,isSuspended:n,payouts:a,strikes:r.strikes,vouching:r.vouching.unwrapOr(void 0)}))))))}(t,e):function(e,t){return zh([Le(t),e.query.society.payouts.multi(t),e.query.society.strikes.multi(t),e.query.society.defenderVotes.multi(t),e.query.society.suspendedMembers.multi(t),e.query.society.vouching.multi(t)]).pipe(ze((([e,t,n,r,a,i])=>e.map(((e,s)=>({accountId:e,isDefenderVoter:r[s].isSome,isSuspended:a[s].isTrue,payouts:t[s],strikes:n[s],vote:r[s].unwrapOr(void 0),vouching:i[s].unwrapOr(void 0)}))))))}(t,e)))}function Hx(e,t){return wb(e,(()=>t.query.society.members.creator.meta.type.isMap?t.query.society.members.keys().pipe(Ie((e=>t.derive.society._members(e.map((({args:[e]})=>e)))))):t.query.society.members().pipe(Ie((e=>t.derive.society._members(e))))))}const Rx={withDestination:!0,withLedger:!0,withNominations:!0,withPrefs:!0};function Bx(e,t,n){const r=Object.entries((a=(t?.unlocking||[]).filter((({era:e})=>e.unwrap().gt(n.activeEra))),a.reduce(((e,{era:t,value:n})=>{const r=t.toString();return e[r]=(e[r]||lt).add(n.unwrap()),e}),{}))).map((([t,r])=>({remainingEras:new st(t).isub(n.activeEra),value:e.registry.createType("Balance",r)})));var a;return r.length?r:void 0}function Lx(e,t,n){return e.registry.createType("Balance",(t?.unlocking||[]).reduce(((e,{era:t,value:r})=>t.unwrap().gt(n.currentEra)?e:e.iadd(r.unwrap())),new st(0)))}function zx(e,t){return wb(e,((e,n=Rx)=>t.derive.session.info().pipe(Ie((r=>zh([t.derive.staking.keysMulti(e),t.derive.staking.queryMulti(e,n)]).pipe(ze((([e,n])=>n.map(((n,a)=>function(e,t,n,r){return(0,M.b)({},n,r,{redeemable:Lx(e,r.stakingLedger,t),unlocking:Bx(e,r.stakingLedger,t)})}(t,r,e[a],n)))))))))))}const Ux=Pb(((e,t,n)=>e.derive.staking.accounts([t],n)));function Dx(e,t){return wb(e,(()=>t.derive.session.indexes().pipe(Ie((({activeEra:e})=>t.query.staking.erasRewardPoints(e))))))}const qx={withController:!0,withExposure:!0,withPrefs:!0};function jx(e,t){return wb(e,((e=qx,n=0)=>t.derive.staking.validators().pipe(Ie((({nextElected:r,validators:a})=>t.derive.staking.queryMulti(function(e,t){return yy([e,t.filter((t=>!e.find((e=>e.eq(t)))))])}(r,a),e,n).pipe(ze((e=>({info:e,nextElected:r,validators:a})))))))))}new Map;const Fx={del:()=>{},forEach:()=>{},get:()=>{},set:(e,t)=>t};let Xx;function Wx(e,t,n){const r=`${e}-${t.toString()}`;return[r,n?void 0:Xx.get(r)]}function Zx(e,t,n){return n?[]:t.map((t=>Xx.get(`${e}-${t.toString()}`))).filter((e=>!!e))}function Gx(e,t,n){return!t&&Xx.set(e,n),n}function Kx(e,t,n){return!t&&n.forEach((t=>Xx.set(`${e}-${t.era.toString()}`,t))),n}function Jx(e,t,n){return e.map((e=>t.find((({era:t})=>e.eq(t)))||n.find((({era:t})=>e.eq(t))))).filter((e=>!!e))}function Yx(e,t){const n=Math.ceil(e.length/t);if(1===n)return[e];const r=Array(n);for(let a=0;at.del(`${e}${n}`),forEach:t.forEach,get:n=>{const r=`${e}${n}`,a=t.get(r);if(a)return a.x=Date.now(),t.set(r,a),a.v},set:(n,r)=>{t.set(`${e}${n}`,{v:r,x:Date.now()})}}}(`derive:${e}:`,t):Fx,t&&function(e){const t=Date.now(),n=[];e.forEach(((e,{x:r})=>{t-r>6048e5&&n.push(e)})),n.forEach((t=>e.del(t)))}(t)}();function Qx(e,t){return e.filter((e=>!t.some((({era:t})=>e.eq(t)))))}function $x(e){return(t,n)=>wb(t,((t=!1)=>n.derive.staking.erasHistoric(t).pipe(Ie((r=>n.derive.staking[e](r,t))))))}function eg(e){return(t,n)=>wb(t,((t,r=!1,a)=>n.derive.staking.erasHistoric(r).pipe(Ie((i=>n.derive.staking[e](t,i,r,a||0))))))}function tg(e){return(t,n)=>wb(t,(t=>n.derive.staking[e](t,!0)))}function ng(e){return(t,n)=>wb(t,((t,r)=>t.length?function(e,t){const n=Yx(e,14);let r=0;const a=new Eh(n[r]);return a.pipe(Ie(t),Dh((()=>{hm((()=>{r++,r===n.length?a.complete():a.next(n[r])}))})),Fh(),ze(yy))}(t,(t=>zh(t.map((t=>n.derive.staking[e](t,r)))))):Le([])))}const rg="eraExposure";function ag(e,t){return wb(e,((e,n=!1)=>{const[r,a]=Wx(rg,e,n);return a?Le(a):t.query.staking.erasStakersPaged?t.query.staking.erasStakersPaged.entries(e).pipe(ze((t=>Gx(r,n,function(e,t){const n={},r={};return t.forEach((([e,t])=>{if(t.isSome){const a=e.args[1].toString(),i=t.unwrap();r[a]=i,i.others.forEach((({who:e},t)=>{const r=e.toString();n[r]=n[r]||[],n[r].push({validatorId:a,validatorIndex:t})}))}})),{era:e,nominators:n,validators:r}}(e,t))))):t.query.staking.erasStakersClipped.entries(e).pipe(ze((t=>Gx(r,n,function(e,t){const n={},r={};return t.forEach((([e,t])=>{const a=e.args[1].toString();r[a]=t,t.others.forEach((({who:e},t)=>{const r=e.toString();n[r]=n[r]||[],n[r].push({validatorId:a,validatorIndex:t})}))})),{era:e,nominators:n,validators:r}}(e,t)))))}))}const ig=tg("_eraExposure"),sg=ng("_eraExposure"),og=$x("_erasExposure");function cg(e,t){return wb(e,(e=>zh([t.query.staking.activeEra(),t.consts.staking.historyDepth?Le(t.consts.staking.historyDepth):t.query.staking.historyDepth()]).pipe(ze((([n,r])=>{const a=[],i=r.toNumber(),s=n.unwrapOrDefault().index;let o=s;for(;o.gte(lt)&&a.lengthe.gt(lt))).reduce(((e,[t,n])=>(e[t.toString()]=n,e)),{})}function lg(e,t){return wb(e,((e,n)=>{if(!e.length)return Le([]);const r=Zx(dg,e,n),a=Qx(e,r);return a.length?t.query.staking.erasRewardPoints.multi(a).pipe(ze((t=>Jx(e,r,Kx(dg,n,function(e,t){return e.map(((e,n)=>({era:e,eraPoints:t[n].total,validators:ug(t[n])})))}(a,t)))))):Le(r)}))}const fg=$x("_erasPoints"),pg="eraPrefs";function hg(e,t){return wb(e,((e,n)=>{const[r,a]=Wx(pg,e,n);return a?Le(a):t.query.staking.erasValidatorPrefs.entries(e).pipe(ze((t=>Gx(r,n,function(e,t){const n={};return t.forEach((([e,t])=>{n[e.args[1].toString()]=t})),{era:e,validators:n}}(e,t)))))}))}const bg=tg("_eraPrefs"),mg=ng("_eraPrefs"),yg=$x("_erasPrefs"),xg="eraRewards";function gg(e,t){return wb(e,((e,n)=>{if(!e.length)return Le([]);const r=Zx(xg,e,n),a=Qx(e,r);return a.length?t.query.staking.erasValidatorReward.multi(a).pipe(ze((t=>Jx(e,r,Kx(xg,n,function(e,t){return e.map(((e,n)=>({era:e,eraReward:t[n].unwrapOrDefault()})))}(a,t)))))):Le(r)}))}const vg=$x("_erasRewards"),wg="eraSlashes";function Vg(e,t){return wb(e,((e,n)=>{const[r,a]=Wx(wg,e,n);return a?Le(a):zh([t.query.staking.nominatorSlashInEra.entries(e),t.query.staking.validatorSlashInEra.entries(e)]).pipe(ze((([t,a])=>Gx(r,n,function(e,t,n){const r={},a={};return t.forEach((([e,t])=>{r[e.args[1].toString()]=t.unwrap()})),n.forEach((([e,t])=>{a[e.args[1].toString()]=t.unwrapOrDefault()[1]})),{era:e,nominators:r,validators:a}}(e,t,a)))))}))}const Tg=tg("_eraSlashes"),Sg=ng("_eraSlashes"),kg=$x("_erasSlashes");const _g=Pb(((e,t)=>e.derive.staking.keysMulti([t])));function Pg(e,t){return wb(e,(e=>e.length?t.query.session.queuedKeys().pipe(Ie((n=>zh([Le(n),t.consts.session?.dedupKeyPrefix?t.query.session.nextKeys.multi(e.map((e=>[t.consts.session.dedupKeyPrefix,e]))):zh(e.map((e=>t.query.session.nextKeys(e))))]))),ze((([t,n])=>e.map(((e,r)=>function(e,t,n){const r=(t.find((([t])=>t.eq(e)))||[void 0,[]])[1],a=n.unwrapOr([]);return{nextSessionIds:Array.isArray(a)?a:[...a.values()],sessionIds:Array.isArray(r)?r:[...r.values()]}}(e,t,n[r])))))):Le([])))}function Mg(e,t){return wb(e,(()=>zh([t.derive.session.indexes(),t.derive.staking.validators()]).pipe(ze((([e,{nextElected:t,validators:n}])=>(0,M.b)({},e,{nextElected:t,validators:n}))))))}function Ig(e,t){return wb(e,((e,n,r,a)=>{const i=t.registry.createType("Exposure"),s=t.registry.createType("Option"),o=t.registry.createType("Option");return n.length?zh([t.query.staking.erasStakersClipped?zh(n.map((n=>t.query.staking.erasStakersClipped(n,e)))):Le(n.map((e=>i))),t.query.staking.erasStakers?zh(n.map((n=>t.query.staking.erasStakers(n,e)))):Le(n.map((e=>i))),t.query.staking.erasStakersPaged?zh(n.map((n=>t.query.staking.erasStakersPaged(n,e,a)))):Le(n.map((e=>s))),t.query.staking.erasStakersOverview?zh(n.map((n=>t.query.staking.erasStakersOverview(n,e)))):Le(n.map((e=>o)))]).pipe(ze((([e,t,r,a])=>n.map(((n,i)=>({clipped:e[i],era:n,exposure:t[i],exposureMeta:a[i],exposurePaged:r[i]})))))):Le([])}))}const Ng=Pb(((e,t,n,r)=>e.derive.staking._ownExposures(t,[n],!0,r||0))),Eg=eg("_ownExposures");function Og(e,t){return wb(e,((e,n,r)=>n.length?zh([zh(n.map((n=>t.query.staking.validatorSlashInEra(n,e)))),zh(n.map((n=>t.query.staking.nominatorSlashInEra(n,e))))]).pipe(ze((([e,t])=>n.map(((n,r)=>({era:n,total:e[r].isSome?e[r].unwrap()[1]:t[r].unwrapOrDefault()})))))):Le([])))}const Ag=Pb(((e,t,n)=>e.derive.staking._ownSlashes(t,[n],!0))),Cg=eg("_ownSlashes");function Hg(e,t){return e.registry.createType("Vec",t.filter((e=>-1!==e)))}function Rg(e,t,n,{withClaimedRewardsEras:r,withController:a,withDestination:i,withExposure:s,withExposureErasStakersLegacy:o,withExposureMeta:c,withLedger:d,withNominations:u,withPrefs:l},f){const p=e.registry.createType("Option"),h=e.registry.createType("RewardDestination"),b=e.registry.createType("Exposure"),m=e.registry.createType("ValidatorPrefs"),y=e.registry.createType("Option"),x=e.registry.createType("Option"),g=[-1],v=Number(e.consts.staking.historyDepth.toNumber()),w=new Array(v).fill(0).map(((e,t)=>0===t?n.toNumber()-1:n.toNumber()-t-1));return zh([a||d?zh(t.map((t=>e.query.staking.bonded(t)))):Le(t.map((()=>null))),u?zh(t.map((t=>e.query.staking.nominators(t)))):Le(t.map((()=>p))),i?zh(t.map((t=>e.query.staking.payee(t)))):Le(t.map((()=>h))),l?zh(t.map((t=>e.query.staking.validators(t)))):Le(t.map((()=>m))),s&&e.query.staking.erasStakersPaged?zh(t.map((t=>e.query.staking.erasStakersPaged(n,t,f)))):Le(t.map((()=>y))),c&&e.query.staking.erasStakersOverview?zh(t.map((t=>e.query.staking.erasStakersOverview(n,t)))):Le(t.map((()=>x))),r&&e.query.staking.claimedRewards?zh([e.query.staking.claimedRewards.entries(),e.query.staking.erasStakersOverview.entries()]).pipe(ze((([e,n])=>function(e,t,n,r){const a={},i={},s=e.map((e=>e.toString()));return n.forEach((([e,t])=>{const n=e.args[1].toString(),r=e.args[0].toNumber();s.includes(n)&&(a[n]||(a[n]=new Map),a[n].set(r,t.toArray()))})),r.forEach((([e,t])=>{const n=e.args[1].toString(),r=e.args[0].toNumber();s.includes(n)&&t.isSome&&(i[n]||(i[n]=new Map),i[n].set(r,t.unwrap().pageCount))})),e.map((e=>{const n=a[e.toString()],r=i[e.toString()];return t.map((e=>{if(n&&n.has(e)&&r&&r.has(e)){const t=n.get(e),a=r.get(e);return t.length===a.toNumber()?e:-1}return-1}))}))}(t,w,e,n)))):Le(t.map((()=>g))),o&&e.query.staking.erasStakers?zh(t.map((t=>e.query.staking.erasStakers(n,t)))):Le(t.map((()=>b)))])}function Bg(e,t,n,r,a){return Rg(e,n,t,r,a).pipe(Ie((([t,a,i,s,o,c,d,u])=>function(e,t,{withLedger:n=!1}){const r=t.filter((e=>n&&!!e&&e.isSome)).map((e=>e.unwrap())),a=e.registry.createType("Option");return(r.length?zh(r.map((t=>e.query.staking.ledger(t)))):Le([])).pipe(ze((e=>{let n=-1;return t.map((t=>t&&t.isSome&&e[++n]||a))})))}(e,t,r).pipe(ze((r=>n.map(((n,l)=>function(e,t,n,r,a,i,s,o,c,d,u){return{accountId:t,claimedRewardsEras:Hg(e,d),controllerId:n?.unwrapOr(null)||null,exposureEraStakers:u,exposureMeta:c,exposurePaged:s,nominators:r.isSome?r.unwrap().targets:[],rewardDestination:(l=a,"boolean"==typeof l.isSome?l.unwrapOr(null):l),stakingLedger:o.unwrapOrDefault(),stashId:t,validatorPrefs:i};var l}(e,n,t[l],a[l],i[l],s[l],o[l],r[l],c[l],d[l],u[l])))))))))}const Lg=Pb(((e,t,n,r)=>e.derive.staking.queryMulti([t],n,r)));function zg(e,t){return wb(e,((e,n,r)=>t.derive.session.indexes().pipe(Ie((({activeEra:a})=>{const i=e.map((e=>t.registry.createType("AccountId",e))),s=r||0;return i.length?Bg(t,a,i,n,s):Le([])})))))}function Ug(e,t){return wb(e,((e,n,r=!1)=>{const a=e.map((e=>t.registry.createType("AccountId",e).toString()));return t.derive.staking._erasExposure(n,r).pipe(ze((e=>a.map((t=>e.map((({era:e,nominators:n,validators:r})=>{const a=!!r[t],i={},s=n[t]||[];return a?i[t]=r[t]:s&&s.forEach((({validatorId:e})=>{i[e]=r[e]})),{era:e,isEmpty:!Object.keys(i).length,isValidator:a,nominating:s,validators:i}})))))))}))}function Dg(e,t){return wb(e,((e,n=!1)=>t.derive.staking.erasHistoric(n).pipe(Ie((r=>t.derive.staking._stakerExposures(e,r,n))))))}const qg=Pb(((e,t,n)=>e.derive.staking.stakerExposures([t],n)));function jg(e,t){return wb(e,((e,n,r)=>{const a=t.registry.createType("AccountId",e).toString();return t.derive.staking._erasPoints(n,r).pipe(ze((e=>e.map((({era:e,eraPoints:n,validators:r})=>({era:e,eraPoints:n,points:r[a]||t.registry.createType("RewardPoint")}))))))}))}const Fg=eg("_stakerPoints");function Xg(e,t){return wb(e,((e,n,r)=>t.query.staking.erasValidatorPrefs.multi(n.map((t=>[t,e]))).pipe(ze((e=>e.map(((e,t)=>({era:n[t],validatorPrefs:e}))))))))}const Wg=eg("_stakerPrefs");function Zg(e,t){const n=t?(t.legacyClaimedRewards||t.claimedRewards).toArray():[];return e.toArray().concat(n)}function Gg(e,t,{claimedRewardsEras:n,rewards:r,stakingLedger:a}){const i=e.filter((e=>!Zg(n,a).some((t=>t.eq(e))))),s=t.map((([e])=>e)),o=t.map((([,e])=>e));return r.filter((({isEmpty:e})=>!e)).filter((e=>!!i.some((t=>e.era.eq(t)))&&(function(e,t,n,r){const a=[];Object.keys(n.validators).forEach((i=>{const s=e.indexOf(i);if(-1!==s){const e=t[s].stakingLedger;Zg(r,e).some((e=>n.era.eq(e)))&&a.push(i)}})),a.forEach((e=>{delete n.validators[e]}))}(s,o,e,n),!0))).filter((({validators:e})=>0!==Object.keys(e).length)).map((e=>(0,M.b)({},e,{isClaimed:i.some((t=>e.era.eq(t))),nominators:e.nominating.filter((t=>e.validators[t.validatorId]))})))}function Kg(e,t){return wb(e,((e,n=!1)=>zh([t.derive.staking._erasPoints(e,n),t.derive.staking._erasPrefs(e,n),t.derive.staking._erasRewards(e,n)])))}function Jg(e,t){return wb(e,((e,n,r=!1)=>{const a=n.map((e=>"number"==typeof e||"string"==typeof e?t.registry.createType("u32",e):e));return zh([t.derive.staking.queryMulti(e,{withClaimedRewardsEras:!0,withLedger:!0}),t.derive.staking._stakerExposures(e,a,r),t.derive.staking._stakerRewardsEras(a,r)]).pipe(Ie((([e,a,i])=>{const s=e.map((({claimedRewardsEras:e,stakingLedger:n,stashId:r},s)=>r&&(n||e)?function(e,t,[n,r,a],i,s){return i.map((({era:i,isEmpty:o,isValidator:c,nominating:d,validators:u})=>{const{eraPoints:l,validators:f}=n.find((e=>e.era.eq(i)))||{eraPoints:lt,validators:{}},{eraReward:p}=a.find((e=>e.era.eq(i)))||{eraReward:e.registry.createType("Balance")},{validators:h}=r.find((e=>e.era.eq(i)))||{validators:{}},b={},m=t.toString();return Object.entries(u).forEach((([t,n])=>{const r=f[t]||lt,a=h[t]?.commission.unwrap()||lt,i=n.total?n.total?.unwrap():n.pageTotal?n.pageTotal?.unwrap():lt;let s,o=lt;if(!(i.isZero()||r.isZero()||l.isZero())){o=p.mul(r).div(l);const e=a.mul(o).div(mt);let c;if(t===m)if(n.own)c=n.own.unwrap();else{const e=n.others.find((({who:e})=>e.eq(t)));c=e?e.value.unwrap():lt}else{const e=n.others.find((({who:e})=>e.eq(m)));c=e?e.value.unwrap():lt}s=o.sub(e).imul(c).div(i).iadd(t===m?e:lt)}b[t]={total:e.registry.createType("Balance",o),value:e.registry.createType("Balance",s)}})),{era:i,eraReward:p,isClaimed:s.some((e=>e.eq(i))),isEmpty:o,isValidator:c,nominating:d,validators:b}}))}(t,r,i,a[s],e):[]));if(r)return Le(s);const[o,c]=s.reduce((([e,t],n)=>{const r=[];return t.push(r),n.forEach((({validators:t})=>Object.keys(t).forEach((t=>{r.includes(t)||(r.push(t),e.includes(t)||e.push(t))})))),[e,t]}),[[],[]]);return t.derive.staking.queryMulti(o,{withClaimedRewardsEras:!0,withLedger:!0}).pipe(ze((t=>e.map((({claimedRewardsEras:e,stakingLedger:r},a)=>Gg(n,c[a].map((e=>[e,t.find((t=>t.accountId.eq(e)))])).filter((e=>!!e[1])),{claimedRewardsEras:e,rewards:s[a],stakingLedger:r}))))))})))}))}const Yg=Pb(((e,t,n)=>e.derive.staking.erasHistoric(n).pipe(Ie((r=>e.derive.staking._stakerRewards([t],r,n))))));function Qg(e,t){return wb(e,((e,n)=>e.length&&n.length?t.derive.staking._stakerRewards(e,n,!1):Le([])))}function $g(e,t){return wb(e,((e,n=!1)=>t.derive.staking.erasHistoric(n).pipe(Ie((n=>t.derive.staking.stakerRewardsMultiEras(e,n))))))}function ev(e,t){return wb(e,((e,n,r)=>{const a=t.registry.createType("AccountId",e).toString();return t.derive.staking._erasSlashes(n,r).pipe(ze((e=>e.map((({era:e,nominators:n,validators:r})=>({era:e,total:n[a]||r[a]||t.registry.createType("Balance")}))))))}))}const tv=eg("_stakerSlashes");function nv(e,t){return wb(e,(()=>function(e){let t=Date.now();return e.query.system.events().pipe(ze((e=>(t=e.filter((({event:e,phase:t})=>{try{return t.isApplyExtrinsic&&"staking"===e.section&&"Bonded"===e.method}catch{return!1}}))?Date.now():t,t))),zb(t),vb({skipTimeout:!0}))}(t).pipe(Ie((()=>t.query.staking.validators.keys())),ze((e=>e.map((({args:[e]})=>e)).filter((e=>e)))))))}function rv(e,t){return wb(e,(()=>t.query.staking.erasStakersPaged?t.derive.session.indexes().pipe(Ie((({currentEra:e})=>t.query.staking.erasStakersPaged.keys(e))),ze((e=>[...new Set(e.map((({args:[,e]})=>e.toString())))].map((e=>t.registry.createType("AccountId",e)))))):t.query.staking.erasStakers?t.derive.session.indexes().pipe(Ie((({currentEra:e})=>t.query.staking.erasStakers.keys(e))),ze((e=>[...new Set(e.map((({args:[,e]})=>e.toString())))].map((e=>t.registry.createType("AccountId",e)))))):t.query.staking.currentElected()))}function av(e,t){return wb(e,(()=>zh([t.query.session?t.query.session.validators():Le([]),t.query.staking?t.derive.staking.nextElected():Le([])]).pipe(ze((([e,t])=>({nextElected:t.length?t:e,validators:e}))))))}const iv={withController:!0,withPrefs:!0};function sv(e,t){return wb(e,((e=iv)=>zh([t.derive.staking.validators(),t.derive.staking.stashes()]).pipe(Ie((([{nextElected:n},r])=>{const a=n.map((e=>e.toString())),i=r.filter((e=>!a.includes(e.toString())));return t.derive.staking.queryMulti(i,e).pipe(ze((e=>({info:e,waiting:i}))))})))))}const ov=Zb("technicalCommittee"),cv=Kb("technicalCommittee"),dv=Yb("technicalCommittee"),uv=Qb("technicalCommittee"),lv=$b("technicalCommittee"),fv=Jb("technicalCommittee"),pv=em("technicalCommittee");function hv(e,t){return wb(e,(()=>t.query.treasury?zh([t.query.treasury.proposalCount(),t.query.treasury.approvals()]).pipe(Ie((([e,n])=>function(e,t,n){const r=[],a=t.toNumber();for(let s=0;se.eqn(s)))||r.push(e.registry.createType("ProposalIndex",s));const i=[...r,...n];return zh([e.query.treasury.proposals.multi(i),e.derive.council?e.derive.council.proposals():Le([])]).pipe(ze((([r,a])=>function(e,{allIds:t,allProposals:n,approvalIds:r,councilProposals:a,proposalCount:i}){const s=[],o=[],c=a.filter((({proposal:t})=>t&&(e.tx.treasury.approveProposal&&e.tx.treasury.approveProposal.is(t)||e.tx.treasury.rejectProposal&&e.tx.treasury.rejectProposal.is(t))));return t.forEach(((e,t)=>{if(n[t].isSome){const a=c.filter((({proposal:t})=>t&&e.eq(t.args[0]))).sort(((e,t)=>e.proposal&&t.proposal?e.proposal.method.localeCompare(t.proposal.method):e.proposal?-1:1)),i=r.some((t=>t.eq(e))),d={council:a,id:e,proposal:n[t].unwrap()};i?s.push(d):o.push(d)}})),{approvals:s,proposalCount:i,proposals:o}}(e,{allIds:i,allProposals:r,approvalIds:n,councilProposals:a,proposalCount:t}))))}(t,e,n)))):Le({approvals:[],proposalCount:t.registry.createType("ProposalIndex"),proposals:[]})))}function bv(e,t){return wb(e,(e=>zh([t.rpc.chain.getBlock(e),t.queryAt(e).pipe(Ie((e=>e.system.events())))]).pipe(ze((([e,t])=>({block:e,events:t}))))))}const mv=250,yv=new st(6e3),xv=new st(5),gv=new st(3e5);function vv(e,t){return e.derive.balances.account(t).pipe(ze((({accountNonce:e})=>e)))}function wv(e,t){return e.call.accountNonceApi?e.call.accountNonceApi.accountNonce(t):e.rpc.system?.accountNextIndex?e.rpc.system.accountNextIndex(t):vv(e,t)}function Vv(e){return zh([e.rpc.chain.getHeader().pipe(Ie((t=>t.parentHash.isEmpty?Le(t):e.rpc.chain.getHeader(t.parentHash).pipe(Gh((()=>Le(t))))))),e.rpc.chain.getFinalizedHead().pipe(Ie((t=>e.rpc.chain.getHeader(t).pipe(Gh((()=>Le(null)))))))]).pipe(ze((([e,t])=>!t||Um(e).sub(Um(t)).gt(xv)?e:t)))}function Tv(e){const t=e.consts.babe?.expectedBlockTime||e.consts.aura?.slotDuration||e.consts.timestamp?.minimumPeriod.muln(2);return t&&t.isZero&&!t.isZero()?t:void 0}function Sv(e,t){return(e,n,r)=>zh([(0,Fe.b)(n)?vv(t,e):-1===n?wv(t,e):Le(t.registry.createType("Index",n)),(0,Fe.b)(r)||(0,Lt.E)(r)&&r>0?Vv(t):Le(null)]).pipe(ze((([e,n])=>({header:n,mortalLength:Math.min(t.consts.system?.blockHashCount?.toNumber()||mv,gv.div(Tv(t)||yv).iadd(xv).toNumber()),nonce:e}))))}const kv={accounts:o,alliance:c,bagsList:d,balances:u,bounties:l,chain:f,contracts:p,council:h,crowdloan:b,democracy:m,elections:y,imOnline:x,membership:g,parachains:v,session:w,society:V,staking:T,technicalCommittee:S,treasury:k,tx:_},_v={allianceMotion:{instances:["allianceMotion"],methods:[]},bagsList:{instances:["voterBagsList","voterList","bagsList"],methods:[],withDetect:!0},contracts:{instances:["contracts"],methods:[]},council:{instances:["council"],methods:[],withDetect:!0},crowdloan:{instances:["crowdloan"],methods:[]},democracy:{instances:["democracy"],methods:[]},elections:{instances:["phragmenElection","electionsPhragmen","elections","council"],methods:[],withDetect:!0},imOnline:{instances:["imOnline"],methods:[]},membership:{instances:["membership"],methods:[]},parachains:{instances:["parachains","registrar"],methods:[]},session:{instances:["session"],methods:[]},society:{instances:["society"],methods:[]},staking:{instances:["staking"],methods:["erasRewardPoints"]},technicalCommittee:{instances:["technicalCommittee"],methods:[],withDetect:!0},treasury:{instances:["treasury"],methods:[]}};function Pv(e,t,n){const r={},a=Object.keys(n),i=Object.keys(t.query),s=t.runtimeVersion.specName,o=e=>i.includes(e),c=e=>function(e,t,n){return e.registry.getModuleInstances(t,n)||[]}(t,s,e).some(o),d=e=>Object.keys(n[e]),u=(r,a)=>n[r][a](e,t),l=e=>{return!_v[e]||_v[e].instances.some(o)&&(!_v[e].methods.length||_v[e].methods.every((n=_v[e].instances,e=>n.some((n=>i.includes(n)&&t.query[n][e])))))||_v[e].withDetect&&_v[e].instances.some(c);var n};for(let f=0,p=a.length;fObject.entries(i[e].rpc||{}).forEach((([t,n])=>{const r=n.aliasSection||e;Iv[r]||(Iv[r]={}),Iv[r][t]=(0,M.b)({},n,{isSubscription:!!n.pubsub,jsonrpc:`${r}_${t}`,method:t,section:r})}))));const Nv=Iv,Ev=(0,it.v)("rpc-core"),Ov={fallback:void 0,modifier:{isOptional:!0},type:{asMap:{linked:{isTrue:!1}},isMap:!1}};function Av(e,{noErrorLog:t,params:n,type:r},a){t||Ev.error(`${e}(${n.map((({isOptional:e,name:t,type:n})=>`${t}${e?"?":""}: ${n}`)).join(", ")}): ${r}:: ${a.message}`)}function Cv(e){return["0x3a636f6465"].includes(e.toHex())}class Hv{__internal__instanceId;__internal__isPedantic;__internal__registryDefault;__internal__storageCache;__internal__storageCacheHits=0;__internal__getBlockRegistry;__internal__getBlockHash;mapping=new Map;provider;sections=[];constructor(e,t,{isPedantic:n=!0,provider:r,userRpc:a={}}){if(!r||!(0,qe.T)(r.send))throw new Error("Expected Provider to API create");this.__internal__instanceId=e,this.__internal__isPedantic=n,this.__internal__registryDefault=t,this.provider=r;const i=Object.keys(Nv);this.sections.push(...i),this.__internal__storageCache=new Mv.q(Mv.b),this.addUserInterfaces(a)}get isConnected(){return this.provider.isConnected}connect(){return this.provider.connect()}async disconnect(){return await this.__internal__storageCache.clearInterval(),this.provider.disconnect()}get stats(){const e=this.provider.stats;return e?{...e,core:{cacheHits:this.__internal__storageCacheHits,cacheSize:this.__internal__storageCache.length}}:void 0}setRegistrySwap(e){this.__internal__getBlockRegistry=Zh(e,{getInstanceId:()=>this.__internal__instanceId})}setResolveBlockHash(e){this.__internal__getBlockHash=Zh(e,{getInstanceId:()=>this.__internal__instanceId})}addUserInterfaces(e){this.sections.push(...Object.keys(e).filter((e=>!this.sections.includes(e))));for(let t=0,n=this.sections.length;te?this._createMethodSubscribe(n,t,i):this._createMethodSend(n,t,i)))}}}}_memomize(e,t){const n={getInstanceId:()=>this.__internal__instanceId},r=Zh(e(!0),n);return r.raw=Zh(e(!1),n),r.meta=t,r}_formatResult(e,t,n,r,a,i,s){return e?this._formatOutput(t,n,r,a,i,s):s}_createMethodSend(e,t,n){const r=n.endpoint||`${e}_${t}`,a=n.params.findIndex((({isHistoric:e})=>e));let i=null;const s=async(e,i)=>{const s=-1===a?null:i[a],o=s&&"BlockNumber"===n.params[a].type?await(this.__internal__getBlockHash?.(s)):s,{registry:c}=e&&o&&this.__internal__getBlockRegistry?await this.__internal__getBlockRegistry((0,E.e)(o)):{registry:this.__internal__registryDefault},d=this._formatParams(c,null,n,i),u=await this.provider.send(r,d.map((e=>e.toJSON())),!!o);return this._formatResult(e,c,o,t,n,d,u)};return i=this._memomize((e=>(...r)=>{const o=e&&-1!==a&&!!r[a];return new he((a=>(s(e,r).then((e=>{a.next(e),a.complete()})).catch((e=>{Av(t,n,e),a.error(e),a.complete()})),()=>{e?i?.unmemoize(...r):i?.raw.unmemoize(...r)}))).pipe(nb(1),o?mb():Qh())}),n),i}_createSubscriber({paramsJson:e,subName:t,subType:n,update:r},a){return new Promise(((i,s)=>{this.provider.subscribe(n,t,e,r).then(i).catch((e=>{a(e),s(e)}))}))}_createMethodSubscribe(e,t,n){const[r,a,i]=n.pubsub,s=`${e}_${a}`,o=`${e}_${i}`,c=`${e}_${r}`;let d=null;return d=this._memomize((e=>(...r)=>new he((a=>{let i=Promise.resolve(null);const u=this.__internal__registryDefault,l=e=>{Av(t,n,e),a.error(e)};try{const o=this._formatParams(u,null,n,r),d=(r,i)=>{if(r)Av(t,n,r);else try{a.next(this._formatResult(e,u,null,t,n,o,i))}catch(r){a.error(r)}};i=this._createSubscriber({paramsJson:o.map((e=>e.toJSON())),subName:s,subType:c,update:d},l)}catch(f){l(f)}return()=>{e?d?.unmemoize(...r):d?.raw.unmemoize(...r),i.then((e=>(0,Kt.k)(e)?Promise.resolve(!1):this.provider.unsubscribe(c,o,e))).catch((e=>Av(t,n,e)))}})).pipe(vb())),n),d}_formatParams(e,t,n,r){const a=r.length,i=n.params.filter((({isOptional:e})=>!e)).length;if(an.params.length)throw new Error(`Expected ${n.params.length} parameters${i===n.params.length?"":` (${n.params.length-i} optional)`}, ${a} found instead`);const s=new Array(a);for(let o=0;o"===r.type){const t=i,r=t.length,s=new Array(r);for(let n=0;ne===s)),c=(0,Fe.b)(o);if(c&&a){const e=this.__internal__storageCache.get(s);if(e)return this.__internal__storageCacheHits++,e}const d=c?null:o[1],u=(0,Kt.k)(d),l=u||Cv(n)?d:(0,E.e)(d),f=this._newType(e,t,n,l,u,i);return this._setToCache(s,f),f}_setToCache(e,t){this.__internal__storageCache.set(e,t)}_newType(e,t,n,r,a,i=-1){const s=n.outputType||"Raw",o=n.meta||Ov,c=-1===i?"":` entry ${i}:`;try{return e.createTypeUnsafe(s,[a?o.fallback?s.includes("Linkage<")?Mt((0,ts.V)(o.fallback.toHex()),new Uint8Array(2)):(0,ts.V)(o.fallback.toHex()):void 0:o.modifier.isOptional?e.createTypeUnsafe(s,[r],{blockHash:t,isPedantic:this.__internal__isPedantic}):r],{blockHash:t,isFallback:a&&!!o.fallback,isOptional:o.modifier.isOptional,isPedantic:this.__internal__isPedantic&&!o.modifier.isOptional})}catch(d){throw new Error(`Unable to decode storage ${n.section||"unknown"}.${n.method||"unknown"}:${c}: ${d.message}`)}}}var Rv=n(19588),Bv=n(98967);const Lv=(0,Bv.Q)(0),zv=(0,Bv.Q)(1),Uv=(Number.MAX_SAFE_INTEGER,(0,Bv.Q)("11400714785074694791")),Dv=(0,Bv.Q)("14029467366897019727"),qv=(0,Bv.Q)("1609587929392839161"),jv=(0,Bv.Q)("9650029242287828579"),Fv=(0,Bv.Q)("2870177450012600261"),Xv=(0,Bv.Q)("0xffffffffffffffff"),Wv=(0,Bv.Q)(7),Zv=(0,Bv.Q)(11),Gv=(0,Bv.Q)(12),Kv=(0,Bv.Q)(16),Jv=(0,Bv.Q)(18),Yv=(0,Bv.Q)(23),Qv=(0,Bv.Q)(27),$v=(0,Bv.Q)(29),ew=(0,Bv.Q)(31),tw=(0,Bv.Q)(32),nw=(0,Bv.Q)(33),rw=(0,Bv.Q)(64),aw=(0,Bv.Q)(256);function iw(e,t){const n=e&Xv;return(n<>rw-t)&Xv}function sw(e,t,n){const r=new Array(n);let a=0;for(let s=0;s=0;s--)i=(i<=0){const e=e=>Uv*iw(e+Dv*sw(t,a,4),ew);do{n.v1=e(n.v1),a+=8,n.v2=e(n.v2),a+=8,n.v3=e(n.v3),a+=8,n.v4=e(n.v4),a+=8}while(a<=r)}return a=32?((((iw(i,zv)+iw(s,Wv)+iw(o,Gv)+iw(c,Jv)^Uv*iw(i*Dv,ew))*Uv+jv^Uv*iw(s*Dv,ew))*Uv+jv^Uv*iw(o*Dv,ew))*Uv+jv^Uv*iw(c*Dv,ew))*Uv+jv:n+Fv);for(;d<=a-8;)u=Xv&jv+Uv*iw(u^Uv*iw(Dv*sw(r,d,4),ew),Qv),d+=8;for(d+4<=a&&(u=Xv&qv+Dv*iw(u^Uv*sw(r,d,2),Yv),d+=4);d>nw),u=Xv&qv*(u^u>>$v),u=Xv&(u^u>>tw);const l=new Uint8Array(8);for(let f=7;f>=0;f--)l[f]=Number(u%aw),u/=aw;return l}function cw(e,t=64,n){const r=Math.ceil(t/64),a=(0,E.e)(e);if(!Ba.CW||!n&&Ti())return Vi(a,r);const i=new Uint8Array(8*r);for(let s=0;scw(e,128),uw={Blake2_128:e=>Pi(e,128),Blake2_128Concat:e=>Mt(Pi(e,128),(0,E.e)(e)),Blake2_256:e=>Pi(e,256),Identity:e=>(0,E.e)(e),Twox128:e=>cw(e,128),Twox256:e=>cw(e,256),Twox64Concat:e=>Mt(cw(e,64),(0,E.e)(e))};const lw={args:[],hashers:[],keys:[]};function fw(e){return!(0,Fe.b)(e)}function pw({method:e,section:t},{args:n,keys:r}){if(!Array.isArray(n))throw new Error(`Call to ${jt(t||"unknown")}.${jt(e||"unknown")} needs ${r.length} arguments`);if(n.filter(fw).length!==r.length)throw new Error(`Call to ${jt(t||"unknown")}.${jt(e||"unknown")} needs ${r.length} arguments, found [${n.join(", ")}]`)}function hw(e,t,{args:n,hashers:r,keys:a}){const i=a.length,s=new Array(i);for(let c=0;c`${t[r].type}(${fu(e.lookup,n)})`))}const o=["module","method"].concat(...n.args.map(((e,t)=>s[t])));return{inner:a.concat(...i).map(((e,t)=>({name:o[t],outer:[e]})))}}function mw(e,t,n){const[r,a]=hw(e,t,n);return Mt(...r,...a)}function yw(e,t,n){return pw(t,n),ar(mw(e,t,n))}function xw(e,t,n){const{meta:r,method:a,prefix:i,section:s}=t,o=function(e,t,n){const{meta:{type:r}}=t;let a=null;return(...i)=>{if(r.isPlain)return a||(a=n.skipHashing?ar((0,E.e)(n.key)):yw(e,t,lw)),a;const{hashers:s,key:o}=r.asMap;return 1===s.length?yw(e,t,{args:i,hashers:s,keys:[o]}):yw(e,t,{args:i,hashers:s,keys:e.lookup.getSiType(o).def.asTuple})}}(e,t,n);return o.inspect=function(e,t,n){const{meta:{type:r}}=t;return(...a)=>{if(r.isPlain)return n.skipHashing?{inner:[],name:"wellKnown",outer:[(0,E.e)(n.key)]}:bw(e,t,lw);const{hashers:i,key:s}=r.asMap;return 1===i.length?bw(e,t,{args:a,hashers:i,keys:[s]}):bw(e,t,{args:a,hashers:i,keys:e.lookup.getSiType(s).def.asTuple})}}(e,t,n),o.meta=r,o.method=jt(a),o.prefix=i,o.section=s,o.toJSON=()=>(0,M.b)({storage:{method:a,prefix:i,section:s}},r.toJSON()),o}function gw(e,t,n){const{meta:{type:r}}=t,a=xw(e,t,n);return r.isMap&&function(e,t,n){const{meta:{type:r},method:a,section:i}=t;n.iterKey=function(e,{meta:{docs:t,name:n,type:r},section:a},{method:i},s){const o=e.createTypeUnsafe("StorageEntryMetadataLatest",[{docs:t,fallback:e.createTypeUnsafe("Bytes",[]),modifier:e.createTypeUnsafe("StorageEntryModifierLatest",[1]),name:n,type:e.createTypeUnsafe("StorageEntryTypeLatest",[r.asMap.key,0])}]);s.meta=o;const c=(...t)=>e.createTypeUnsafe("StorageKey",[s(...t),{method:i,section:a}]);return c.meta=o,c}(e,t,n,((...n)=>{if(n.length&&(r.isPlain||n.length>=r.asMap.hashers.length))throw new Error(`Iteration of ${jt(i||"unknown")}.${jt(a||"unknown")} needs arguments to be at least one less than the full arguments, found [${n.join(", ")}]`);if(n.length&&r.isMap){const{hashers:a,key:i}=r.asMap,s=1===a.length?[i]:e.lookup.getSiType(i).def.asTuple;return new rt(e,mw(e,t,{args:n,hashers:a.slice(0,n.length),keys:s.slice(0,n.length)}))}return new rt(e,mw(e,t,lw))}))}(e,t,a),a.keyPrefix=(...e)=>a.iterKey&&a.iterKey(...e)||pr(a())[1],a}function vw(e,t){const n=t.toLowerCase();return e.lookup.types.find((e=>e.type.def.isPrimitive&&e.type.def.asPrimitive.toString().toLowerCase()===n||e.type.def.isHistoricMetaCompat&&e.type.def.asHistoricMetaCompat.toString().toLowerCase()===n))}function ww(e,t){let n=vw(e,t);if(!n&&("Bytes"===t||t.startsWith("[u8;"))){const r=vw(e,"u8");if(r)if("Bytes"===t)n=e.lookup.types.find((e=>e.type.def.isSequence&&e.type.def.asSequence.type.eq(r.id)||e.type.def.isHistoricMetaCompat&&e.type.def.asHistoricMetaCompat.eq(t)));else{const a=Rr(t);n=e.lookup.types.find((e=>e.type.def.isArray&&e.type.def.asArray.eq({len:a.length,type:r.id})||e.type.def.isHistoricMetaCompat&&e.type.def.asHistoricMetaCompat.eq(t)))}}return n||console.warn(`Unable to map ${t} to a lookup index`),n}function Vw({method:e,prefix:t,section:n},r,{docs:a,type:i}){return s=>gw(s,{meta:s.createTypeUnsafe("StorageEntryMetadataLatest",[{docs:s.createTypeUnsafe("Vec",[[a]]),modifier:s.createTypeUnsafe("StorageEntryModifierLatest",["Required"]),name:s.createTypeUnsafe("Text",[e]),toJSON:()=>r,type:s.createTypeUnsafe("StorageEntryTypeLatest",[{Plain:ww(s,i)?.id||0}])}]),method:e,prefix:t,section:n},{key:r,skipHashing:!0})}function Tw(e,t,n){return Vw({method:e,prefix:"Substrate",section:"substrate"},t,n)}const Sw={changesTrieConfig:Tw("changesTrieConfig",":changes_trie",{docs:"Changes trie configuration is stored under this key.",type:"u32"}),childStorageKeyPrefix:Tw("childStorageKeyPrefix",":child_storage:",{docs:"Prefix of child storage keys.",type:"u32"}),code:Tw("code",":code",{docs:"Wasm code of the runtime.",type:"Bytes"}),extrinsicIndex:Tw("extrinsicIndex",":extrinsic_index",{docs:"Current extrinsic index (u32) is stored under this key.",type:"u32"}),heapPages:Tw("heapPages",":heappages",{docs:"Number of wasm linear memory pages required for execution of the runtime.",type:"u64"}),intrablockEntropy:Tw("intrablockEntropy",":intrablock_entropy",{docs:"Current intra-block entropy (a universally unique `[u8; 32]` value) is stored here.",type:"[u8; 32]"})};const kw={docs:"Returns the current pallet version from storage",type:"u16"};function _w(e,{pallets:t},n){const r=function(e){const t={},n=Object.entries(Sw);for(let r=0,a=n.length;r$r({palletVersion:Vw({method:"palletVersion",prefix:o,section:t},mw(e,{method:":__STORAGE_VERSION__:",prefix:n.toString()},lw),kw)(e)},a,(n=>gw(e,{meta:n,method:n.name.toString(),prefix:o,section:t},{})),If)))}}return r}function Pw(e){return t=>t?e[t.charCodeAt(0)]+t.slice(1):""}const Mw=Pw(zt);function Iw(){return new B}function Nw(e,t){var n=arguments.length>=2;return function(r){return r.pipe(e?function(e,t){return _e((function(n,r){var a=0;n.subscribe(Pe(r,(function(n){return e.call(t,n,a++)&&r.next(n)})))}))}((function(t,n){return e(t,n,r)})):fe,(i=1)<=0?function(){return my}:_e((function(e,t){var n=0;e.subscribe(Pe(t,(function(e){++n<=i&&(t.next(e),i<=n&&t.complete())})))})),n?function(e){return _e((function(t,n){var r=!1;t.subscribe(Pe(n,(function(e){r=!0,n.next(e)}),(function(){r||n.next(e),n.complete()})))}))}(t):(void 0===(a=function(){return new B})&&(a=Iw),_e((function(e,t){var n=!1;e.subscribe(Pe(t,(function(e){n=!0,t.next(e)}),(function(){return n?t.complete():t.error(a())})))}))));var a,i}}function Ew(e){return(0,qe.T)(e.sign)}const Ow=(0,it.v)("api/util");function Aw(e,{block:{extrinsics:t,header:n}},r,a){for(const[i,s]of t.entries())if(s.hash.eq(e))return{blockNumber:zm(n.number)?n.number.unwrap():n.number,events:r.filter((({phase:e})=>e.isApplyExtrinsic&&e.asApplyExtrinsic.eqn(i))),txIndex:i};if(a.isInBlock){const r=t.map((e=>e.hash.toHex()));Ow.warn(`block ${n.hash.toHex()}: Unable to find extrinsic ${e.toHex()} inside ${r.join(", ")}`)}return{}}const Cw=e=>e;function Hw(e,t,n,r){return e.filter((({event:e})=>t===e.section&&n.includes(e.method))).map((e=>r(e)))}function Rw({event:{data:[e]}}){return e}function Bw({event:{data:e,method:t}}){return"ExtrinsicSuccess"===t?e[0]:e[1]}class Lw{dispatchError;dispatchInfo;internalError;events;status;txHash;txIndex;blockNumber;constructor({blockNumber:e,dispatchError:t,dispatchInfo:n,events:r,internalError:a,status:i,txHash:s,txIndex:o}){this.dispatchError=t||function(e=[]){return Hw(e,"system",["ExtrinsicFailed"],Rw)[0]}(r),this.dispatchInfo=n||function(e=[]){return Hw(e,"system",["ExtrinsicFailed","ExtrinsicSuccess"],Bw)[0]}(r),this.events=r||[],this.internalError=a,this.status=i,this.txHash=s,this.txIndex=o,this.blockNumber=e}get isCompleted(){return this.isError||this.status.isInBlock||this.status.isFinalized}get isError(){return this.status.isDropped||this.status.isFinalityTimeout||this.status.isInvalid||this.status.isUsurped}get isFinalized(){return this.status.isFinalized}get isInBlock(){return this.status.isInBlock}get isWarning(){return this.status.isRetracted}filterRecords(e,t){return Hw(this.events,e,Array.isArray(t)?t:[t],Cw)}findRecord(e,t){return this.filterRecords(e,t)[0]}toHuman(e){return{dispatchError:this.dispatchError?.toHuman(),dispatchInfo:this.dispatchInfo?.toHuman(),events:this.events.map((t=>t.toHuman(e))),internalError:this.internalError?.message.toString(),status:this.status.toHuman(e)}}}function zw(e,t,n,{header:r,mortalLength:a,nonce:i}){if(!r){if(n.era&&!n.blockHash)throw new Error("Expected blockHash to be passed alongside non-immortal era options");return(0,Lt.E)(n.era)&&(delete n.era,delete n.blockHash),Dw(e,n,{nonce:i})}return Dw(e,n,{blockHash:r.hash,era:t.createTypeUnsafe("ExtrinsicEra",[{current:r.number,period:n.era||a}]),nonce:i})}function Uw(e,t){let n={};return(0,qe.T)(e)?t=e:n=(0,M.b)({},e),[n,t]}function Dw(e,t,n){return(0,M.b)({blockHash:e.genesisHash,genesisHash:e.genesisHash},t,n,{runtimeVersion:e.runtimeVersion,signedExtensions:e.registry.signedExtensions,version:e.extrinsicType})}function qw({api:e,apiType:t,blockHash:n,decorateMethod:r}){const a=e.registry.createClass("Extrinsic");return class extends a{__internal__ignoreStatusCb;__internal__transformResult=P.D;constructor(n,r){super(n,r,{version:e.extrinsicType}),this.__internal__ignoreStatusCb="rxjs"===t}get hasDryRun(){return(0,qe.T)(e.rpc.system?.dryRun)}get hasPaymentInfo(){return(0,qe.T)(e.call.transactionPaymentApi?.queryInfo)}dryRun(t,a){if(!this.hasDryRun)throw new Error("The system.dryRun RPC call is not available in your environment");return n||(0,I.K)(a)||(0,ut.b)(a)?r((()=>e.rpc.system.dryRun(this.toHex(),n||a))):r((()=>this.__internal__observeSign(t,a).pipe(Ie((()=>e.rpc.system.dryRun(this.toHex()))))))()}paymentInfo(t,a){if(!this.hasPaymentInfo)throw new Error("The transactionPaymentApi.queryInfo runtime call is not available in your environment");if(n||(0,I.K)(a)||(0,ut.b)(a))return r((()=>e.callAt(n||a).pipe(Ie((e=>{const t=this.toU8a();return e.transactionPaymentApi.queryInfo(t,t.length)})))));const[i]=Uw(a),s=Ew(t)?t.address:t.toString();return r((()=>e.derive.tx.signingInfo(s,i.nonce,i.era).pipe(Nw(),Ie((t=>{const n=zw(e,this.registry,i,t),r=Dw(e,n,{}),a=e.tx(this.toU8a()).signFake(s,r).toU8a();return e.call.transactionPaymentApi.queryInfo(a,a.length)})))))()}send(t){const n=e.hasSubscriptions&&(this.__internal__ignoreStatusCb||!!t);return r(n?this.__internal__observeSubscribe:this.__internal__observeSend)(t)}signAsync(e,t){return r((()=>this.__internal__observeSign(e,t).pipe(ze((()=>this)))))()}signAndSend(t,n,a){const[i,s]=Uw(n,a),o=e.hasSubscriptions&&(this.__internal__ignoreStatusCb||!!s);return r((()=>this.__internal__observeSign(t,i).pipe(Ie((e=>o?this.__internal__observeSubscribe(e):this.__internal__observeSend(e))))))(s)}withResultTransform(e){return this.__internal__transformResult=e,this}__internal__observeSign=(t,n)=>{const r=Ew(t)?t.address:t.toString(),a=function(e={}){return(0,pn.f)(e)||(0,Lt.E)(e)?{nonce:e}:e}(n);return e.derive.tx.signingInfo(r,a.nonce,a.era).pipe(Nw(),Rb((async n=>{const i=zw(e,this.registry,a,n);let s=-1,o=null;if(Ew(t))this.sign(t,i);else{const e=await this.__internal__signViaSigner(r,i,n.header);s=e.id,e.signedTransaction&&(o=e.signedTransaction)}return{options:i,signedTransaction:o,updateId:s}})))};__internal__observeStatus=(t,n)=>{if(!n.isFinalized&&!n.isInBlock)return Le(this.__internal__transformResult(new Lw({status:n,txHash:t})));const r=n.isInBlock?n.asInBlock:n.asFinalized;return e.derive.tx.events(r).pipe(ze((({block:e,events:r})=>this.__internal__transformResult(new Lw({...Aw(t,e,r,n),status:n,txHash:t})))),Gh((e=>Le(this.__internal__transformResult(new Lw({internalError:e,status:n,txHash:t}))))))};__internal__observeSend=t=>e.rpc.author.submitExtrinsic(t?.signedTransaction||this).pipe(Dh((e=>{this.__internal__updateSigner(e,t)})));__internal__observeSubscribe=t=>{const n=this.hash;return e.rpc.author.submitAndWatchExtrinsic(t?.signedTransaction||this).pipe(Ie((e=>this.__internal__observeStatus(n,e))),Dh((e=>{this.__internal__updateSigner(e,t)})))};__internal__signViaSigner=async(t,n,r)=>{const a=n.signer||e.signer;if(!a)throw new Error("No signer specified, either via api.setSigner or via sign options. You possibly need to pass through an explicit keypair for the origin so it can be used for signing.");const i=this.registry.createTypeUnsafe("SignerPayload",[(0,M.b)({},n,{address:t,blockNumber:r?r.number:0,method:this.method})]);let s;if((0,qe.T)(a.signPayload)){if(s=await a.signPayload(i.toPayload()),s.signedTransaction&&!n.withSignedTransaction)throw new Error("The `signedTransaction` field may not be submitted when `withSignedTransaction` is disabled");if(s.signedTransaction&&n.withSignedTransaction){const e=this.registry.createTypeUnsafe("Extrinsic",[s.signedTransaction]),n=this.registry.createTypeUnsafe("SignerPayload",[(0,M.b)({},{address:t,assetId:e.assetId&&e.assetId.isSome?e.assetId.toHex():null,blockHash:i.blockHash,blockNumber:r?r.number:0,era:e.era.toHex(),genesisHash:i.genesisHash,metadataHash:e.metadataHash?e.metadataHash.toHex():null,method:e.method.toHex(),mode:e.mode?e.mode.toHex():null,nonce:e.nonce.toHex(),runtimeVersion:i.runtimeVersion,signedExtensions:i.signedExtensions,tip:e.tip?e.tip.toHex():null,version:i.version})]);if(!e.isSigned)throw new Error(`When using the signedTransaction field, the transaction must be signed. Recieved isSigned: ${e.isSigned}`);return this.__internal__validateSignedTransaction(i,e),super.addSignature(t,s.signature,n.toPayload()),{id:s.id,signedTransaction:s.signedTransaction}}}else{if(!(0,qe.T)(a.signRaw))throw new Error("Invalid signer interface, it should implement either signPayload or signRaw (or both)");s=await a.signRaw(i.toRaw())}return super.addSignature(t,s.signature,i.toPayload()),{id:s.id}};__internal__updateSigner=(t,n)=>{if(n&&-1!==n.updateId){const{options:r,updateId:a}=n,i=r.signer||e.signer;i&&(0,qe.T)(i.update)&&i.update(a,t)}};__internal__validateSignedTransaction=(e,t)=>{if(e.toPayload().method!==t.method.toHex())throw new Error(`signAndSend: ${"call data"} does not match the original payload`)}}}function jw(e,t,n,r,a){const i=qw({api:t,apiType:e,blockHash:a,decorateMethod:n});return e=>new i(r||t.registry,e)}const Fw=(0,it.v)("api/augment");function Xw(e,t,n=[]){return t.length?` ${t.length} ${e}${n.length?" and":""}`:""}function Ww(e,t){return t.length?`\n\t${e.padStart(7)}: ${t.sort().join(", ")}`:""}function Zw(e,t,[n,r]){(n.length||r.length)&&Fw.warn(`api.${e}: Found${Xw("added",n,r)}${Xw("removed",r)} ${t}:${Ww("added",n)}${Ww("removed",r)}`)}function Gw(e,t){return e.filter((e=>!t.includes(e)))}function Kw(e,t){const n=Object.keys(e),r=(a=Object.keys(t),i=n,a.filter((e=>i.includes(e))));var a,i;const s=[];for(let o=0,c=r.length;or[e]))}return n}function Yw(e,t){const n=e=>Object.keys(t[e]),r=(n,r)=>e(t[n][r]),a={},i=Object.keys(t);for(let s=0,o=i.length;se.getTypeDef(t).type)).join(", ")})`}function $w(e,t,n){const r=n.filter((e=>!(0,Fe.b)(e)));if(t.meta.type.isPlain){if(0!==r.length)throw new Error(`${Qw(e,t,[])} does not take any arguments, ${r.length} found`)}else{const{hashers:n,key:a}=t.meta.type.asMap,i=1===n.length?[a]:e.lookup.getSiType(a).def.asTuple.map((e=>e));if(r.length!==i.length)throw new Error(`${Qw(e,t,i)} is a map, requiring ${i.length} arguments, ${r.length} found`)}return[t,r]}var eV=n(74486);class tV{__internal__eventemitter=new eV.b;emit(e,...t){return this.__internal__eventemitter.emit(e,...t)}on(e,t){return this.__internal__eventemitter.on(e,t),this}off(e,t){return this.__internal__eventemitter.removeListener(e,t),this}once(e,t){return this.__internal__eventemitter.once(e,t),this}}const nV=1e3,rV=(0,it.v)("api/init");let aV=0;function iV(e,{method:t,section:n}){return ea(e.rx.query[n]&&e.rx.query[n][t],(()=>`query.${n}.${t} is not available in this version of the metadata`))}class sV extends tV{__internal__instanceId;__internal__runtimeLog={};__internal__registry;__internal__storageGetQ=[];__internal__storageSubQ=[];__phantom=new st(0);_type;_call={};_consts={};_derive;_errors={};_events={};_extrinsics;_extrinsicType=$i.LATEST_EXTRINSIC_VERSION;_genesisHash;_isConnected;_isReady=!1;_query={};_queryMulti;_rpc;_rpcCore;_runtimeMap={};_runtimeChain;_runtimeMetadata;_runtimeVersion;_rx={call:{},consts:{},query:{},tx:{}};_options;_decorateMethod;constructor(e,t,n){super(),this.__internal__instanceId=""+ ++aV,this.__internal__registry=e.source?.registry||e.registry||new ah,this._rx.callAt=(e,t)=>Be(this.at(e,t)).pipe(ze((e=>e.rx.call))),this._rx.queryAt=(e,t)=>Be(this.at(e,t)).pipe(ze((e=>e.rx.query))),this._rx.registry=this.__internal__registry,this._decorateMethod=n,this._options=e,this._type=t;const r=e.source?e.source._rpcCore.provider.isClonable?e.source._rpcCore.provider.clone():e.source._rpcCore.provider:e.provider||new Rv.E;this._rpcCore=new Hv(this.__internal__instanceId,this.__internal__registry,{isPedantic:this._options.isPedantic,provider:r,userRpc:this._options.rpc}),this._isConnected=new Eh(this._rpcCore.provider.isConnected),this._rx.hasSubscriptions=this._rpcCore.provider.hasSubscriptions}get registry(){return this.__internal__registry}createType(e,...t){return this.__internal__registry.createType(e,...t)}registerTypes(e){e&&this.__internal__registry.register(e)}get hasSubscriptions(){return this._rpcCore.provider.hasSubscriptions}get supportMulti(){return this._rpcCore.provider.hasSubscriptions||!!this._rpcCore.state.queryStorageAt}_emptyDecorated(e,t){return{call:{},consts:{},errors:{},events:{},query:{},registry:e,rx:{call:{},query:{}},tx:jw(this._type,this._rx,this._decorateMethod,e,t)}}_createDecorated(e,t,n,r){n||(n=this._emptyDecorated(e.registry,r)),!t&&e.decoratedMeta||(e.decoratedMeta=function(e,t){if(!(t instanceof Sp))throw new Error("You need to pass a valid Metadata instance to Decorated");const n=t.asLatest,r=t.version;return{consts:Lf(e,n),errors:Hf(e,n,r),events:Bf(e,n,r),query:_w(e,n),registry:e,tx:Af(e,n,r)}}(e.registry,e.metadata));const a=this._decorateCalls(e,this._decorateMethod,r),i=this._decorateCalls(e,this._rxDecorateMethod,r),s=this._decorateStorage(e.decoratedMeta,this._decorateMethod,r),o=this._decorateStorage(e.decoratedMeta,this._rxDecorateMethod,r);return Jw("consts",e.decoratedMeta.consts,n.consts,t),Jw("errors",e.decoratedMeta.errors,n.errors,t),Jw("events",e.decoratedMeta.events,n.events,t),Jw("query",s,n.query,t),Jw("query",o,n.rx.query,t),Jw("call",a,n.call,t),Jw("call",i,n.rx.call,t),n.findCall=t=>C(e.registry,t),n.findError=t=>H(e.registry,t),n.queryMulti=r?this._decorateMultiAt(n,this._decorateMethod,r):this._decorateMulti(this._decorateMethod),n.runtimeVersion=e.runtimeVersion,{createdAt:r,decoratedApi:n,decoratedMeta:e.decoratedMeta}}_injectMetadata(e,t=!1){!t&&e.decoratedApi||(e.decoratedApi=this._emptyDecorated(e.registry));const{decoratedApi:n,decoratedMeta:r}=this._createDecorated(e,t,e.decoratedApi);this._call=n.call,this._consts=n.consts,this._errors=n.errors,this._events=n.events,this._query=n.query,this._rx.call=n.rx.call,this._rx.query=n.rx.query;const a=this._decorateExtrinsics(r,this._decorateMethod),i=this._decorateExtrinsics(r,this._rxDecorateMethod);t||!this._extrinsics?(this._extrinsics=a,this._rx.tx=i):(Jw("tx",a,this._extrinsics,!1),Jw(null,i,this._rx.tx,!1)),Jw(null,r.consts,this._rx.consts,t),this.emit("decorated")}injectMetadata(e,t,n){this._injectMetadata({counter:0,metadata:e,registry:n||this.__internal__registry,runtimeVersion:this.__internal__registry.createType("RuntimeVersionPartial")},t)}_decorateFunctionMeta(e,t){return t.meta=e.meta,t.method=e.method,t.section=e.section,t.toJSON=e.toJSON,e.callIndex&&(t.callIndex=e.callIndex),t}_filterRpc(e,t){0!==Object.keys(t).length&&(this._rpcCore.addUserInterfaces(t),this._decorateRpc(this._rpcCore,this._decorateMethod,this._rpc),this._decorateRpc(this._rpcCore,this._rxDecorateMethod,this._rx.rpc));const n={};for(let a=0,i=e.length;a!r.includes(e)&&!e.includes("_unstable_")));i.length&&!this._options.noInitWarn&&rV.warn(`RPC methods not decorated: ${i.join(", ")}`);for(let s=0;sBe(this._rpcCore.provider.send(e,t))))}_decorateRpc(e,t,n=this._rpcSubmitter(t)){const r=n,a=(n,r)=>{const a=e[n][r],i=t(a,{methodName:r});return i.meta=a.meta,i.raw=t(a.raw,{methodName:r}),i};for(let i=0,s=e.sections.length;ia(t,e);for(let e=0,a=n.length;er.version===e));i?(0,M.b)(i.methods,r.methods):e[t].push(r)}else e[t]=a}}_getRuntimeDefs(e,t,n=""){const r={},a=Object.values(i);for(let i=0,s=a.length;i({...e.typesBundle?.spec?.[n]?.runtime??{},...e.typesBundle?.chain?.[t]?.runtime??{}})))}(e,n,t)),this._addRuntimeDef(r,this._options.runtime),Object.entries(r)}_getMethods(e,t){const n={};return t.forEach((t=>{const{docs:r,inputs:a,name:i,output:s}=t;n[i.toString()]={description:r.map((e=>e.toString())).join(),params:a.map((({name:t,type:n})=>({name:t.toString(),type:e.lookup.getName(n)||e.lookup.getTypeDef(n).type}))),type:e.lookup.getName(s)||e.lookup.getTypeDef(s).type}})),n}_getRuntimeDefsViaMetadata(e){const t={},{apis:n}=e.metadata;for(let r=0,a=n.length;r0,u=d?this._getRuntimeDefsViaMetadata(e):this._getRuntimeDefs(e,n,this._runtimeChain),l=[],f=`${n.toString()}/${r.toString()}`,p=this.__internal__runtimeLog[f]||!1;if(this.__internal__runtimeLog[f]=!0,d)for(let y=0,x=u.length;ye.eq(a)));if(c[a]=!0,i){const t=r.map((({version:e})=>e)).sort(),n=r.find((({version:e})=>i[1].eq(e)));if(n){const t=jt(e),r=Object.entries(n.methods);if(r.length){o[t]||(o[t]={});for(let n=0,i=r.length;n[e.toHex(),t.toString()])).filter((([e])=>!c[e])).map((([e,t])=>`${this._runtimeMap[e]||e}/${t}`));this._options.noInitWarn||p||(l.length&&rV.warn(`${f}: Not decorating runtime apis without matching versions: ${l.join(", ")}`),e.length&&rV.warn(`${f}: Not decorating unknown runtime apis: ${e.join(", ")}`))}const h=i?(e,t)=>this._rpcCore.state.call(e,t,i):(e,t)=>this._rpcCore.state.call(e,t),b=t=>$r({},Object.keys(o[t]),(n=>this._decorateCall(e,o[t][n],h,a))),m=Object.keys(o);for(let y=0,x=m.length;y{if(r.length!==t.params.length)throw new Error(`${t.name}:: Expected ${t.params.length} arguments, found ${r.length}`);const a=e.createType("Raw",It(r.map(((n,r)=>e.createTypeUnsafe(t.params[r].type,[n]).toU8a()))));return n(t.name,a).pipe(ze((n=>e.createTypeUnsafe(t.type,[n]))))}));return a.meta=t,a}_decorateMulti(e){return e((e=>e.length?(this.hasSubscriptions?this._rpcCore.state.subscribeStorage:this._rpcCore.state.queryStorageAt)(e.map((e=>Array.isArray(e)?e[0].creator.meta.type.isPlain?[e[0].creator]:1===e[0].creator.meta.type.asMap.hashers.length?[e[0].creator,e.slice(1)]:[e[0].creator,...e.slice(1)]:[e.creator]))):Le([])))}_decorateMultiAt(e,t,n){return t((t=>t.length?this._rpcCore.state.queryStorageAt(t.map((t=>{if(Array.isArray(t)){const{creator:n}=iV(e,t[0].creator);return n.meta.type.isPlain?[n]:1===n.meta.type.asMap.hashers.length?[n,t.slice(1)]:[n,...t.slice(1)]}return[iV(e,t.creator).creator]})),n):Le([])))}_decorateExtrinsics({tx:e},t){const n=jw(this._type,this._rx,t),r=t=>$r({},Object.keys(e[t]),(r=>r.startsWith("$")?e[t][r]:this._decorateExtrinsicEntry(e[t][r],n))),a=Object.keys(e);for(let i=0,s=a.length;it(e(...n));return n.is=t=>e.is(t),this._decorateFunctionMeta(e,n)}_decorateStorage({query:e,registry:t},n,r){const a={},i=a=>$r({},Object.keys(e[a]),(i=>r?this._decorateStorageEntryAt(t,e[a][i],n,r):this._decorateStorageEntry(e[a][i],n))),s=Object.keys(e);for(let o=0,c=s.length;o$w(n||this.__internal__registry,e,t),r=t=>Be(this.at(t)).pipe(ze((t=>iV(t,e)))),a=this._decorateStorageCall(e,t);return a.creator=e,a.at=t(((e,...t)=>r(e).pipe(Ie((e=>e(...t)))))),a.hash=t(((...e)=>this._rpcCore.state.getStorageHash(n(e)))),a.is=t=>t.section===e.section&&t.method===e.method,a.key=(...t)=>(0,N.X)(pr(e(...t))[1]),a.keyPrefix=(...t)=>(0,N.X)(e.keyPrefix(...t)),a.size=t(((...e)=>this._rpcCore.state.getStorageSize(n(e)))),a.sizeAt=t(((e,...t)=>r(e).pipe(Ie((r=>this._rpcCore.state.getStorageSize(n(t,r.creator.meta.registry),e)))))),e.iterKey&&e.meta.type.isMap&&(a.entries=t(wb(this.__internal__instanceId,((...t)=>this._retrieveMapEntries(e,null,t)))),a.entriesAt=t(wb(this.__internal__instanceId,((e,...t)=>r(e).pipe(Ie((n=>this._retrieveMapEntries(n.creator,e,t))))))),a.entriesPaged=t(wb(this.__internal__instanceId,(t=>this._retrieveMapEntriesPaged(e,void 0,t)))),a.keys=t(wb(this.__internal__instanceId,((...t)=>this._retrieveMapKeys(e,null,t)))),a.keysAt=t(wb(this.__internal__instanceId,((e,...t)=>r(e).pipe(Ie((n=>this._retrieveMapKeys(n.creator,e,t))))))),a.keysPaged=t(wb(this.__internal__instanceId,(t=>this._retrieveMapKeysPaged(e,void 0,t))))),this.supportMulti&&e.meta.type.isMap&&(a.multi=t((t=>1===e.meta.type.asMap.hashers.length?this._retrieveMulti(t.map((t=>[e,[t]]))):this._retrieveMulti(t.map((t=>[e,t])))))),this._decorateFunctionMeta(e,a)}_decorateStorageEntryAt(e,t,n,r){const a=n=>$w(e,t,n),i=n(((...e)=>this._rpcCore.state.getStorage(a(e),r)));return i.creator=t,i.hash=n(((...e)=>this._rpcCore.state.getStorageHash(a(e),r))),i.is=e=>e.section===t.section&&e.method===t.method,i.key=(...e)=>(0,N.X)(pr(t(...e))[1]),i.keyPrefix=(...e)=>(0,N.X)(t.keyPrefix(...e)),i.size=n(((...e)=>this._rpcCore.state.getStorageSize(a(e),r))),t.iterKey&&t.meta.type.isMap&&(i.entries=n(wb(this.__internal__instanceId,((...e)=>this._retrieveMapEntries(t,r,e)))),i.entriesPaged=n(wb(this.__internal__instanceId,(e=>this._retrieveMapEntriesPaged(t,r,e)))),i.keys=n(wb(this.__internal__instanceId,((...e)=>this._retrieveMapKeys(t,r,e)))),i.keysPaged=n(wb(this.__internal__instanceId,(e=>this._retrieveMapKeysPaged(t,r,e))))),this.supportMulti&&t.meta.type.isMap&&(i.multi=n((e=>1===t.meta.type.asMap.hashers.length?this._retrieveMulti(e.map((e=>[t,[e]])),r):this._retrieveMulti(e.map((e=>[t,e])),r)))),this._decorateFunctionMeta(t,i)}_queueStorage(e,t){const n=t===this.__internal__storageSubQ?this._rpcCore.state.subscribeStorage:this._rpcCore.state.queryStorageAt;let r,a=t.length-1,i=0;return-1!==a&&t[a]&&50!==t[a][1].length?(r=t[a][0],i=t[a][1].length,t[a][1].push(e)):(a++,r=Be(new Promise((e=>{hm((()=>{const n=t[a][1];delete t[a],e(n)}))}))).pipe(Ie((e=>n(e)))),t.push([r,[e]])),r.pipe(ze((e=>e[i])))}_decorateStorageCall(e,t){return t(wb(this.__internal__instanceId,((...t)=>{const n=$w(this.__internal__registry,e,t);return this.hasSubscriptions?this._queueStorage(n,this.__internal__storageSubQ):this._rpcCore.state.getStorage(n)})),{methodName:e.method,overrideNoSub:(...t)=>this._queueStorage($w(this.__internal__registry,e,t),this.__internal__storageGetQ)})}_retrieveMulti(e,t){if(!e.length)return Le([]);const n=this.hasSubscriptions&&!t?this._rpcCore.state.subscribeStorage:this._rpcCore.state.queryStorageAt;return e.length<=250?t?n(e,t):n(e):zh(Yx(e,250).map((e=>t?n(e,t):n(e)))).pipe(ze(yy))}_retrieveMapKeys({iterKey:e,meta:t,method:n,section:r},a,i){if(!e||!t.type.isMap)throw new Error("keys can only be retrieved on maps");const s=e(...i).toHex(),o=new Eh(s),c=a?e=>this._rpcCore.state.getKeysPaged(s,nV,e,a):e=>this._rpcCore.state.getKeysPaged(s,nV,e),d=e=>e.setMeta(t,r,n);return o.pipe(Ie(c),ze((e=>e.map(d))),Dh((e=>hm((()=>{e.length===nV?o.next(e[999].toHex()):o.complete()})))),Fh(),ze(yy))}_retrieveMapKeysPaged({iterKey:e,meta:t,method:n,section:r},a,i){if(!e||!t.type.isMap)throw new Error("keys can only be retrieved on maps");const s=e=>e.setMeta(t,r,n);return(a?e=>this._rpcCore.state.getKeysPaged(e,i.pageSize,i.startKey||e,a):e=>this._rpcCore.state.getKeysPaged(e,i.pageSize,i.startKey||e))(e(...i.args).toHex()).pipe(ze((e=>e.map(s))))}_retrieveMapEntries(e,t,n){const r=t?e=>this._rpcCore.state.queryStorageAt(e,t):e=>this._rpcCore.state.queryStorageAt(e);return this._retrieveMapKeys(e,t,n).pipe(Ie((e=>e.length?zh(Yx(e,250).map(r)).pipe(ze((t=>yy(t).map(((t,n)=>[e[n],t]))))):Le([]))))}_retrieveMapEntriesPaged(e,t,n){const r=t?e=>this._rpcCore.state.queryStorageAt(e,t):e=>this._rpcCore.state.queryStorageAt(e);return this._retrieveMapKeysPaged(e,t,n).pipe(Ie((e=>e.length?r(e).pipe(ze((t=>t.map(((t,n)=>[e[n],t]))))):Le([]))))}_decorateDeriveRx(e){const t=this._runtimeVersion?.specName.toString();return Yw(e,function(e,t,n={}){return{...Pv(e,t,kv),...Pv(e,t,n)}}(this.__internal__instanceId,this._rx,(0,M.b)({},this._options.derives,this._options.typesBundle?.spec?.[t||""]?.derives)))}_decorateDerive(e){return Yw(e,this._rx.derive)}_rxDecorateMethod=e=>e}const oV=[15,14],cV=(0,it.v)("api/init");function dV(e){return e.toString()}class uV extends sV{__internal__atLast=null;__internal__healthTimer=null;__internal__registries=[];__internal__updateSub=null;__internal__waitingRegistries={};constructor(e,t,n){super(e,t,n),this.registry.setKnownTypes(e),e.source?this.__internal__registries=e.source.__internal__registries:this.registerTypes(e.types),this._rpc=this._decorateRpc(this._rpcCore,this._decorateMethod),this._rx.rpc=this._decorateRpc(this._rpcCore,this._rxDecorateMethod),this.supportMulti&&(this._queryMulti=this._decorateMulti(this._decorateMethod),this._rx.queryMulti=this._decorateMulti(this._rxDecorateMethod)),this._rx.signer=e.signer,this._rpcCore.setRegistrySwap((e=>this.getBlockRegistry(e))),this._rpcCore.setResolveBlockHash((e=>ce(this._rpcCore.chain.getBlockHash(e)))),this.hasSubscriptions?(this._rpcCore.provider.on("disconnected",(()=>this.__internal__onProviderDisconnect())),this._rpcCore.provider.on("error",(e=>this.__internal__onProviderError(e))),this._rpcCore.provider.on("connected",(()=>this.__internal__onProviderConnect()))):this._options.noInitWarn||cV.warn("Api will be available in a limited mode since the provider does not support subscriptions"),this._rpcCore.provider.isConnected&&this.__internal__onProviderConnect().catch(P.l)}_initRegistry(e,t,n,r,a){e.clearCache(),e.setChainProperties(a||this.registry.getChainProperties()),e.setKnownTypes(this._options),e.register(function({knownTypes:e},t,n,r){const a=kt(r).toNumber();return kh(t,n,((t,n)=>({..._h(gh[n],a),..._h(ih[t],a),..._h(e.typesBundle?.spec?.[n]?.types,a),..._h(e.typesBundle?.chain?.[t]?.types,a),...e.typesSpec?.[n]??{},...e.typesChain?.[t]??{},...e.types??{}})))}(e,t,n.specName,n.specVersion)),e.setHasher(function({knownTypes:e},t,n){return kh(t,n,((t,n)=>e.hasher||e.typesBundle?.chain?.[t]?.hasher||e.typesBundle?.spec?.[n]?.hasher||null))}(e,t,n.specName)),e.knownTypes.typesBundle&&(e.knownTypes.typesAlias=function({knownTypes:e},t,n){return kh(t,n,((t,n)=>({...e.typesBundle?.spec?.[n]?.alias??{},...e.typesBundle?.chain?.[t]?.alias??{},...e.typesAlias??{}})))}(e,t,n.specName)),e.setMetadata(r,void 0,(0,M.b)({},function({knownTypes:e},t,n){return kh(t,n,((t,n)=>({...e.typesBundle?.spec?.[n]?.signedExtensions??{},...e.typesBundle?.chain?.[t]?.signedExtensions??{}})))}(e,t,n.specName),this._options.signedExtensions),this._options.noInitWarn)}_getDefaultRegistry(){return ea(this.__internal__registries.find((({isDefault:e})=>e)),"Initialization error, cannot find the default registry")}async at(e,t){const n=(0,E.e)(e),r=(0,N.X)(n),a=await this.getBlockRegistry(n,t);return this.__internal__atLast&&this.__internal__atLast[0]===r||(this.__internal__atLast=[r,this._createDecorated(a,!0,null,n).decoratedApi]),this.__internal__atLast[1]}async _createBlockRegistry(e,t,n){const r=new ah(e),a=await this._retrieveMetadata(n.apis,t.parentHash,r),i=this._runtimeChain;if(!i)throw new Error("Invalid initializion order, runtimeChain is not available");this._initRegistry(r,i,n,a);const s={counter:0,lastBlockHash:e,metadata:a,registry:r,runtimeVersion:n};return this.__internal__registries.push(s),s}_cacheBlockRegistryProgress(e,t){let n=this.__internal__waitingRegistries[e];return(0,Fe.b)(n)&&(n=this.__internal__waitingRegistries[e]=new Promise(((n,r)=>{t().then((t=>{delete this.__internal__waitingRegistries[e],n(t)})).catch((t=>{delete this.__internal__waitingRegistries[e],r(t)}))}))),n}_getBlockRegistryViaVersion(e,t){if(t){const n=this.__internal__registries.find((({runtimeVersion:{specName:e,specVersion:n}})=>e.eq(t.specName)&&n.eq(t.specVersion)));if(n)return n.counter++,n.lastBlockHash=e,n}return null}async _getBlockRegistryViaHash(e){if(!this._genesisHash||!this._runtimeVersion)throw new Error("Cannot retrieve data on an uninitialized chain");const t=this.registry.createType("HeaderPartial",this._genesisHash.eq(e)?{number:lt,parentHash:this._genesisHash}:await ce(this._rpcCore.chain.getHeader.raw(e)));if(t.parentHash.isEmpty)throw new Error("Unable to retrieve header and parent from supplied hash");const[n,r]=function(e,t){const n=Sh.find((t=>e.eq(t.genesisHash)));return n?[n.versions.reduce(((e,n)=>t.gt(n.blockNumber)?n:e),void 0),n.versions.find((e=>t.lte(e.blockNumber)))]:[void 0,void 0]}(this._genesisHash,t.number),a=this.registry.createType("RuntimeVersionPartial",await ce(this._rpcCore.state.getRuntimeVersion.raw(t.parentHash)));return this._getBlockRegistryViaVersion(e,a)||await this._cacheBlockRegistryProgress(a.toHex(),(()=>this._createBlockRegistry(e,t,a)))}async getBlockRegistry(e,t){return this.__internal__registries.find((({lastBlockHash:t})=>t&&Gr(t,e)))||this._getBlockRegistryViaVersion(e,t)||await this._cacheBlockRegistryProgress((0,N.X)(e),(()=>this._getBlockRegistryViaHash(e)))}async _loadMeta(){return this._isReady?(this._options.source||this._subscribeUpdates(),!0):(this._unsubscribeUpdates(),[this._genesisHash,this._runtimeMetadata]=this._options.source?._isReady?await this._metaFromSource(this._options.source):await this._metaFromChain(this._options.metadata),this._initFromMeta(this._runtimeMetadata))}async _metaFromSource(e){this._extrinsicType=e.extrinsicVersion,this._runtimeChain=e.runtimeChain,this._runtimeVersion=e.runtimeVersion;const t=Object.keys(e.rpc),n=[];for(let r=0,a=t.length;rthis._runtimeVersion?.specVersion.eq(e.specVersion)?Le(!1):this._rpcCore.state.getMetadata().pipe(ze((t=>{cV.log(`Runtime version updated to spec=${e.specVersion.toString()}, tx=${e.transactionVersion.toString()}`),this._runtimeMetadata=t,this._runtimeVersion=e,this._rx.runtimeVersion=e;const n=this._getDefaultRegistry(),r=this._runtimeChain;if(!r)throw new Error("Invalid initializion order, runtimeChain is not available");return n.metadata=t,n.runtimeVersion=e,this._initRegistry(this.registry,r,e,t),this._injectMetadata(n,!0),!0})))))).subscribe())}async _metaFromChain(e){const[t,n,r,a,i]=await Promise.all([ce(this._rpcCore.chain.getBlockHash(0)),ce(this._rpcCore.state.getRuntimeVersion()),ce(this._rpcCore.system.chain()),ce(this._rpcCore.system.properties()),ce(this._rpcCore.rpc.methods())]);this._runtimeChain=r,this._runtimeVersion=n,this._rx.runtimeVersion=n;const s=`${t.toHex()||"0x"}-${n.specVersion.toString()}`,o=e?.[s]?new Sp(this.registry,e[s]):await this._retrieveMetadata(n.apis);return this._initRegistry(this.registry,r,n,o,a),this._filterRpc(i.methods.map(dV),Ph(this.registry,r,n.specName)),this._subscribeUpdates(),this.__internal__registries.length||this.__internal__registries.push({counter:0,isDefault:!0,metadata:o,registry:this.registry,runtimeVersion:n}),o.getUniqTypes(this._options.throwOnUnknown||!1),[t,o]}_initFromMeta(e){const t=this._runtimeVersion;if(!t)throw new Error("Invalid initializion order, runtimeVersion is not available");return this._extrinsicType=e.asLatest.extrinsic.version.toNumber(),this._rx.extrinsicType=this._extrinsicType,this._rx.genesisHash=this._genesisHash,this._rx.runtimeVersion=t,this._injectMetadata(this._getDefaultRegistry(),!0),this._rx.derive=this._decorateDeriveRx(this._rxDecorateMethod),this._derive=this._decorateDerive(this._decorateMethod),!0}async _retrieveMetadata(e,t,n){let r=null;const a=e.find((([e])=>e.eq(Mi("Metadata",64)))),i=n||this.registry;if(!a||a[1].toNumber()<2)return cV.warn("MetadataApi not available, rpc::state::get_metadata will be used."),t?new Sp(i,await ce(this._rpcCore.state.getMetadata.raw(t))):await ce(this._rpcCore.state.getMetadata());try{const e=t?await ce(this._rpcCore.state.call.raw("Metadata_metadata_versions","0x",t)):await ce(this._rpcCore.state.call("Metadata_metadata_versions","0x"));r=i.createType("Vec",e).reduce(((e,t)=>t.gt(e)?t:e))}catch(s){cV.debug(s.message),cV.warn("error with state_call::Metadata_metadata_versions, rpc::state::get_metadata will be used")}if(r&&!oV.includes(r.toNumber())&&(r=null),r)try{const e=t?await ce(this._rpcCore.state.call.raw("Metadata_metadata_at_version",(0,N.X)(r.toU8a()),t)):await ce(this._rpcCore.state.call("Metadata_metadata_at_version",(0,N.X)(r.toU8a()))),n=t?i.createType("Raw",e).toU8a():e,a=i.createType("Option",n).unwrapOr(null);if(a)return new Sp(i,a.toHex())}catch(s){cV.debug(s.message),cV.warn("error with state_call::Metadata_metadata_at_version, rpc::state::get_metadata will be used")}return t?new Sp(i,await ce(this._rpcCore.state.getMetadata.raw(t))):await ce(this._rpcCore.state.getMetadata())}_subscribeHealth(){this._unsubscribeHealth(),this.__internal__healthTimer=this.hasSubscriptions?setInterval((()=>{ce(this._rpcCore.system.health.raw()).catch(P.l)}),1e4):null}_unsubscribeHealth(){this.__internal__healthTimer&&(clearInterval(this.__internal__healthTimer),this.__internal__healthTimer=null)}_unsubscribeUpdates(){this.__internal__updateSub&&(this.__internal__updateSub.unsubscribe(),this.__internal__updateSub=null)}_unsubscribe(){this._unsubscribeHealth(),this._unsubscribeUpdates()}async __internal__onProviderConnect(){this._isConnected.next(!0),this.emit("connected");try{const e=!1===this._options.initWasm||await Si().then((()=>{if(!Ti())throw new Error("Unable to initialize @polkadot/util-crypto");return!0})).catch((()=>!1)),t=await this._loadMeta();this._subscribeHealth(),t&&!this._isReady&&e&&(this._isReady=!0,this.emit("ready",this))}catch(e){const t=new Error(`FATAL: Unable to initialize the API: ${e.message}`);cV.error(t),this.emit("error",t)}}__internal__onProviderDisconnect(){this._isConnected.next(!1),this._unsubscribe(),this.emit("disconnected")}__internal__onProviderError(e){this.emit("error",e)}}function lV(e){if(void 0===e)throw new Error("Api interfaces needs to be initialized before using, wait for 'isReady'");return e}class fV extends uV{get call(){return lV(this._call)}get consts(){return lV(this._consts)}get derive(){return lV(this._derive)}get errors(){return lV(this._errors)}get events(){return lV(this._events)}get extrinsicVersion(){return this._extrinsicType}get genesisHash(){return lV(this._genesisHash)}get isConnected(){return this._isConnected.getValue()}get libraryInfo(){return`${O} v${A}`}get query(){return lV(this._query)}get queryMulti(){return lV(this._queryMulti)}get rpc(){return lV(this._rpc)}get runtimeChain(){return lV(this._runtimeChain)}get runtimeMetadata(){return lV(this._runtimeMetadata)}get runtimeVersion(){return lV(this._runtimeVersion)}get rx(){return lV(this._rx)}get stats(){return this._rpcCore.stats}get type(){return this._type}get tx(){return lV(this._extrinsics)}findCall(e){return C(this.registry,e)}findError(e){return H(this.registry,e)}}class pV extends fV{constructor(e={},t,n){super(e,t,n)}connect(){return this._rpcCore.connect()}disconnect(){return this._unsubscribe(),this._rpcCore.disconnect()}setSigner(e){this._rx.signer=e}async sign(e,t,{signer:n}={}){if((0,I.K)(e)){const r=n||this._rx.signer;if(!r?.signRaw)throw new Error("No signer exists with a signRaw interface. You possibly need to pass through an explicit keypair for the origin so it can be used for signing.");return(await r.signRaw((0,M.b)({type:"bytes"},t,{address:e}))).signature}return(0,N.X)(e.sign((0,E.e)(t.data)))}}class hV{__internal__allHasFired=!1;__internal__callback;__internal__fired=[];__internal__fns=[];__internal__isActive=!0;__internal__results=[];__internal__subscriptions=[];constructor(e,t){this.__internal__callback=t,this.__internal__subscriptions=e.map((async(e,t)=>{const[n,...r]=Array.isArray(e)?e:[e];return this.__internal__fired.push(!1),this.__internal__fns.push(n),n(...r,this._createCallback(t))}))}_allHasFired(){return this.__internal__allHasFired||=0===this.__internal__fired.filter((e=>!e)).length,this.__internal__allHasFired}_createCallback(e){return t=>{this.__internal__fired[e]=!0,this.__internal__results[e]=t,this._triggerUpdate()}}_triggerUpdate(){if(this.__internal__isActive&&(0,qe.T)(this.__internal__callback)&&this._allHasFired())try{Promise.resolve(this.__internal__callback(this.__internal__results)).catch(P.l)}catch{}}unsubscribe(){this.__internal__isActive&&(this.__internal__isActive=!1,Promise.all(this.__internal__subscriptions.map((async e=>{try{const t=await e;(0,qe.T)(t)&&t()}catch{}}))).catch((()=>{})))}}function bV(e,t){let n=!1;return{reject:e=>(n||(n=!0,t(e)),my),resolve:t=>{n||(n=!0,e(t))}}}function mV(e,t){const n=!(!t?.methodName||!t.methodName.includes("subscribe"));return function(...r){const[a,i]=function(e,t){const n=e.slice(),r=e.length&&(0,qe.T)(e[e.length-1])?n.pop():void 0;if(t&&!(0,qe.T)(r))throw new Error("Expected a callback to be passed with subscriptions");return[n,r]}(r,n);return i?function(e,t,n){return new Promise(((r,a)=>{const i=bV(r,a),s=e(...t).pipe(Gh((e=>i.reject(e))),Dh((()=>i.resolve((()=>s.unsubscribe()))))).subscribe((e=>{hm((()=>n(e)))}))}))}(e,a,i):function(e,t){return new Promise(((n,r)=>{const a=bV(n,r),i=e(...t).pipe(Gh((e=>a.reject(e)))).subscribe((e=>{a.resolve(e),hm((()=>i.unsubscribe()))}))}))}(t?.overrideNoSub||e,a)}}class yV extends pV{__internal__isReadyPromise;__internal__isReadyOrErrorPromise;constructor(e){super(e,"promise",mV),this.__internal__isReadyPromise=new Promise((e=>{super.once("ready",(()=>e(this)))})),this.__internal__isReadyOrErrorPromise=new Promise(((e,t)=>{const n=bV(e,t);super.once("ready",(()=>n.resolve(this))),super.once("error",(e=>n.reject(e)))}))}static create(e){const t=new yV(e);return e&&e.throwOnConnect?t.isReadyOrError:(t.isReadyOrError.catch(P.l),t.isReady)}get isReady(){return this.__internal__isReadyPromise}get isReadyOrError(){return this.__internal__isReadyOrErrorPromise}clone(){return new yV((0,M.b)({},this._options,{source:this}))}async combineLatest(e,t){const n=new hV(e,t);return()=>{n.unsubscribe()}}}},94645:(e,t,n)=>{"use strict";n.d(t,{b:()=>r,q:()=>i});const r=64;class a{key;__internal__lastAccess;createdAt;next;prev;constructor(e){this.key=e,this.__internal__lastAccess=Date.now(),this.createdAt=this.__internal__lastAccess,this.next=this.prev=this}refresh(){this.__internal__lastAccess=Date.now()}get lastAccess(){return this.__internal__lastAccess}}class i{capacity;__internal__data=new Map;__internal__refs=new Map;__internal__length=0;__internal__head;__internal__tail;__internal__ttl;__internal__ttlInterval;__internal__ttlTimerId=null;constructor(e=r,t=3e4,n=15e3){this.capacity=e,this.__internal__ttl=t,this.__internal__ttlInterval=n,this.__internal__head=this.__internal__tail=new a(""),this.__internal__ttlInterval>this.__internal__ttl&&(this.__internal__ttlInterval=this.__internal__ttl)}get ttl(){return this.__internal__ttl}get ttlInterval(){return this.__internal__ttlInterval}get length(){return this.__internal__length}get lengthData(){return this.__internal__data.size}get lengthRefs(){return this.__internal__refs.size}entries(){const e=this.keys(),t=e.length,n=new Array(t);for(let r=0;r0&&!this.__internal__ttlTimerId&&(this.__internal__ttlTimerId=setInterval((()=>{this.__internal__ttlClean()}),this.__internal__ttlInterval)),this.__internal__data.set(e,t)}__internal__ttlClean(){const e=Date.now()-this.__internal__ttl;for(;this.__internal__tail.lastAccess&&this.__internal__tail.lastAccess0;)this.__internal__ttlTimerId&&0===this.__internal__length?(clearInterval(this.__internal__ttlTimerId),this.__internal__ttlTimerId=null,this.__internal__head=this.__internal__tail=new a("")):(this.__internal__refs.delete(this.__internal__tail.key),this.__internal__data.delete(this.__internal__tail.key),this.__internal__length-=1,this.__internal__tail=this.__internal__tail.prev,this.__internal__tail.next=this.__internal__head)}__internal__toHead(e){const t=this.__internal__refs.get(e);t&&t!==this.__internal__head&&(t.refresh(),t.prev.next=t.next,t.next.prev=t.prev,t.next=this.__internal__head,this.__internal__head.prev=t,this.__internal__head=t)}async clearInterval(){this.__internal__ttlTimerId&&(clearInterval(this.__internal__ttlTimerId),this.__internal__ttlTimerId=null)}}},19588:(e,t,n)=>{"use strict";n.d(t,{E:()=>P});var r=n(74486),a=n(52502),i=n(56199);const s=(0,n(77389).MJ)("isPrototypeOf","hasOwnProperty");var o=n(81138),c=n(74032),d=n(48827),u=n(76284),l=n(75487);const f=l.Mn.WebSocket;var p=n(25311),h=n(55471),b=n(8514);const m=-99999;function y(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})}class x extends Error{code;data;message;name;stack;constructor(e="",t=-99999,n){if(super(),y(this,"message",String(e)),y(this,"name",this.constructor.name),y(this,"data",n),y(this,"code",t),(0,b.T)(Error.captureStackTrace))Error.captureStackTrace(this,this.constructor);else{const{stack:t}=new Error(e);t&&y(this,"stack",t)}}static CODES={ASSERT:-90009,INVALID_JSONRPC:-99998,METHOD_NOT_FOUND:-32601,UNKNOWN:m}}function g(e){if(e){const{code:t,data:n,message:r}=e;throw new x(`${t}: ${r}${function(e){if((0,c.b)(e))return"";const t=`: ${(0,p.K)(e)?e.replace(/Error\("/g,"").replace(/\("/g,"(").replace(/"\)/g,")").replace(/\(/g,", ").replace(/\)/g,""):(0,o.A)(e)}`;return t.length<=256?t:`${t.substring(0,255)}\u2026`}(n)}`,t,n)}}class v{__internal__id=0;decodeResponse(e){if(!e||"2.0"!==e.jsonrpc)throw new Error("Invalid jsonrpc field in decoded object");const t=!(0,c.b)(e.params)&&!(0,c.b)(e.method);if(!((0,h.E)(e.id)||t&&((0,h.E)(e.params.subscription)||(0,p.K)(e.params.subscription))))throw new Error("Invalid id field in decoded object");if(g(e.error),void 0===e.result&&!t)throw new Error("No result found in jsonrpc response");return t?(g(e.params.error),e.params.result):e.result}encodeJson(e,t){const[n,r]=this.encodeObject(e,t);return[n,(0,o.A)(r)]}encodeObject(e,t){const n=++this.__internal__id;return[n,{id:n,jsonrpc:"2.0",method:e,params:t}]}}const w="ws://127.0.0.1:9944";var V=n(94645);const T={1e3:"Normal Closure",1001:"Going Away",1002:"Protocol Error",1003:"Unsupported Data",1004:"(For future)",1005:"No Status Received",1006:"Abnormal Closure",1007:"Invalid frame payload data",1008:"Policy Violation",1009:"Message too big",1010:"Missing Extension",1011:"Internal Error",1012:"Service Restart",1013:"Try Again Later",1014:"Bad Gateway",1015:"TLS Handshake"};const S={chain_finalisedHead:"chain_finalizedHead",chain_subscribeFinalisedHeads:"chain_subscribeFinalizedHeads",chain_unsubscribeFinalisedHeads:"chain_unsubscribeFinalizedHeads"},k=(0,a.v)("api-ws");function _(e,t){Object.keys(e).forEach((n=>{t&&t(e[n]),delete e[n]}))}class P{__internal__callCache;__internal__coder;__internal__endpoints;__internal__headers;__internal__eventemitter;__internal__handlers={};__internal__isReadyPromise;__internal__stats;__internal__waitingForId={};__internal__cacheCapacity;__internal__autoConnectMs;__internal__endpointIndex;__internal__endpointStats;__internal__isConnected=!1;__internal__subscriptions={};__internal__timeoutId=null;__internal__websocket;__internal__timeout;constructor(e=w,t=2500,n={},a,s){const o=Array.isArray(e)?e:[e];if(0===o.length)throw new Error("WsProvider requires at least one Endpoint");o.forEach((e=>{if(!/^(wss|ws):\/\//.test(e))throw new Error(`Endpoint should start with 'ws://', received '${e}'`)})),this.__internal__callCache=new V.q(s||V.b),this.__internal__cacheCapacity=s||V.b,this.__internal__eventemitter=new r.b,this.__internal__autoConnectMs=t||0,this.__internal__coder=new v,this.__internal__endpointIndex=-1,this.__internal__endpoints=o,this.__internal__headers=n,this.__internal__websocket=null,this.__internal__stats={active:{requests:0,subscriptions:0},total:{bytesRecv:0,bytesSent:0,cached:0,errors:0,requests:0,subscriptions:0,timeout:0}},this.__internal__endpointStats={bytesRecv:0,bytesSent:0,cached:0,errors:0,requests:0,subscriptions:0,timeout:0},this.__internal__timeout=a||6e4,t&&t>0&&this.connectWithRetry().catch(i.l),this.__internal__isReadyPromise=new Promise((e=>{this.__internal__eventemitter.once("connected",(()=>{e(this)}))}))}get hasSubscriptions(){return!0}get isClonable(){return!0}get isConnected(){return this.__internal__isConnected}get isReady(){return this.__internal__isReadyPromise}get endpoint(){return this.__internal__endpoints[this.__internal__endpointIndex]}clone(){return new P(this.__internal__endpoints)}selectEndpointIndex(e){return(this.__internal__endpointIndex+1)%e.length}async connect(){if(this.__internal__websocket)throw new Error("WebSocket is already connected");try{this.__internal__endpointIndex=this.selectEndpointIndex(this.__internal__endpoints),this.__internal__websocket=void 0!==l.Mn.WebSocket&&(e=l.Mn.WebSocket,s(t=f)&&s(e)&&(e===t||e.isPrototypeOf(t)))?new f(this.endpoint):new f(this.endpoint,void 0,{headers:this.__internal__headers}),this.__internal__websocket&&(this.__internal__websocket.onclose=this.__internal__onSocketClose,this.__internal__websocket.onerror=this.__internal__onSocketError,this.__internal__websocket.onmessage=this.__internal__onSocketMessage,this.__internal__websocket.onopen=this.__internal__onSocketOpen),this.__internal__timeoutId=setInterval((()=>this.__internal__timeoutHandlers()),5e3)}catch(n){throw k.error(n),this.__internal__emit("error",n),n}var e,t}async connectWithRetry(){if(this.__internal__autoConnectMs>0)try{await this.connect()}catch{setTimeout((()=>{this.connectWithRetry().catch(i.l)}),this.__internal__autoConnectMs)}}async disconnect(){this.__internal__autoConnectMs=0;try{this.__internal__websocket&&this.__internal__websocket.close(1e3)}catch(e){throw k.error(e),this.__internal__emit("error",e),e}}get stats(){return{active:{requests:Object.keys(this.__internal__handlers).length,subscriptions:Object.keys(this.__internal__subscriptions).length},total:this.__internal__stats.total}}get endpointStats(){return this.__internal__endpointStats}on(e,t){return this.__internal__eventemitter.on(e,t),()=>{this.__internal__eventemitter.removeListener(e,t)}}send(e,t,n,r){this.__internal__endpointStats.requests++,this.__internal__stats.total.requests++;const[a,i]=this.__internal__coder.encodeJson(e,t);if(0===this.__internal__cacheCapacity)return this.__internal__send(a,i,e,t,r);const s=n?`${e}::${(0,o.A)(t)}`:"";let c=n?this.__internal__callCache.get(s):null;return c?(this.__internal__endpointStats.cached++,this.__internal__stats.total.cached++):(c=this.__internal__send(a,i,e,t,r),n&&this.__internal__callCache.set(s,c)),c}async __internal__send(e,t,n,r,a){return new Promise(((i,s)=>{try{if(!this.isConnected||null===this.__internal__websocket)throw new Error("WebSocket is not connected");const o=(e,t)=>{e?s(e):i(t)};k.debug((()=>["calling",n,t])),this.__internal__handlers[e]={callback:o,method:n,params:r,start:Date.now(),subscription:a};const c=t.length;this.__internal__endpointStats.bytesSent+=c,this.__internal__stats.total.bytesSent+=c,this.__internal__websocket.send(t)}catch(o){this.__internal__endpointStats.errors++,this.__internal__stats.total.errors++,s(o)}}))}subscribe(e,t,n,r){return this.__internal__endpointStats.subscriptions++,this.__internal__stats.total.subscriptions++,this.send(t,n,!1,{callback:r,type:e})}async unsubscribe(e,t,n){const r=`${e}::${n}`;if((0,c.b)(this.__internal__subscriptions[r]))return k.debug((()=>`Unable to find active subscription=${r}`)),!1;delete this.__internal__subscriptions[r];try{return!(this.isConnected&&!(0,d.k)(this.__internal__websocket))||this.send(t,[n])}catch{return!1}}__internal__emit=(e,...t)=>{this.__internal__eventemitter.emit(e,...t)};__internal__onSocketClose=e=>{const t=new Error(`disconnected from ${this.endpoint}: ${e.code}:: ${e.reason||function(e){if(e>=0&&e<=999)return"(Unused)";if(e>=1016){if(e<=1999)return"(For WebSocket standard)";if(e<=2999)return"(For WebSocket extensions)";if(e<=3999)return"(For libraries and frameworks)";if(e<=4999)return"(For applications)"}return T[e]||"(Unknown)"}(e.code)}`);this.__internal__autoConnectMs>0&&k.error(t.message),this.__internal__isConnected=!1,this.__internal__websocket&&(this.__internal__websocket.onclose=null,this.__internal__websocket.onerror=null,this.__internal__websocket.onmessage=null,this.__internal__websocket.onopen=null,this.__internal__websocket=null),this.__internal__timeoutId&&(clearInterval(this.__internal__timeoutId),this.__internal__timeoutId=null),_(this.__internal__handlers,(e=>{try{e.callback(t,void 0)}catch(n){k.error(n)}})),_(this.__internal__waitingForId),this.__internal__endpointStats={bytesRecv:0,bytesSent:0,cached:0,errors:0,requests:0,subscriptions:0,timeout:0},this.__internal__emit("disconnected"),this.__internal__autoConnectMs>0&&setTimeout((()=>{this.connectWithRetry().catch(i.l)}),this.__internal__autoConnectMs)};__internal__onSocketError=e=>{k.debug((()=>["socket error",e])),this.__internal__emit("error",e)};__internal__onSocketMessage=e=>{k.debug((()=>["received",e.data]));const t=e.data.length;this.__internal__endpointStats.bytesRecv+=t,this.__internal__stats.total.bytesRecv+=t;const n=JSON.parse(e.data);return(0,c.b)(n.method)?this.__internal__onSocketMessageResult(n):this.__internal__onSocketMessageSubscribe(n)};__internal__onSocketMessageResult=e=>{const t=this.__internal__handlers[e.id];if(t){try{const{method:n,params:r,subscription:a}=t,i=this.__internal__coder.decodeResponse(e);if(t.callback(null,i),a){const e=`${a.type}::${i}`;this.__internal__subscriptions[e]=(0,u.b)({},a,{method:n,params:r}),this.__internal__waitingForId[e]&&this.__internal__onSocketMessageSubscribe(this.__internal__waitingForId[e])}}catch(n){this.__internal__endpointStats.errors++,this.__internal__stats.total.errors++,t.callback(n,void 0)}delete this.__internal__handlers[e.id]}else k.debug((()=>`Unable to find handler for id=${e.id}`))};__internal__onSocketMessageSubscribe=e=>{if(!e.method)throw new Error("No method found in JSONRPC response");const t=`${S[e.method]||e.method}::${e.params.subscription}`,n=this.__internal__subscriptions[t];if(!n)return this.__internal__waitingForId[t]=e,void k.debug((()=>`Unable to find handler for subscription=${t}`));delete this.__internal__waitingForId[t];try{const t=this.__internal__coder.decodeResponse(e);n.callback(null,t)}catch(r){this.__internal__endpointStats.errors++,this.__internal__stats.total.errors++,n.callback(r,void 0)}};__internal__onSocketOpen=()=>{if(null===this.__internal__websocket)throw new Error("WebSocket cannot be null in onOpen");return k.debug((()=>["connected to",this.endpoint])),this.__internal__isConnected=!0,this.__internal__resubscribe(),this.__internal__emit("connected"),!0};__internal__resubscribe=()=>{const e=this.__internal__subscriptions;this.__internal__subscriptions={},Promise.all(Object.keys(e).map((async t=>{const{callback:n,method:r,params:a,type:i}=e[t];if(!i.startsWith("author_"))try{await this.subscribe(i,r,a,n)}catch(s){k.error(s)}}))).catch(k.error)};__internal__timeoutHandlers=()=>{const e=Date.now(),t=Object.keys(this.__internal__handlers);for(let n=0,r=t.length;nthis.__internal__timeout){try{r.callback(new Error(`No response received from RPC endpoint in ${this.__internal__timeout/1e3}s`),void 0)}catch{}this.__internal__endpointStats.timeout++,this.__internal__stats.total.timeout++,delete this.__internal__handlers[t[n]]}}}}},8319:(e,t,n)=>{"use strict";n.d(t,{CW:()=>i,Ze:()=>s});var r=n(98967),a=n(75487);const i="function"==typeof r.Q&&"function"==typeof r.Q.asIntN,s="function"==typeof a.Mn.Buffer&&"function"==typeof a.Mn.Buffer.isBuffer;a.Mn.process},72598:(e,t,n)=>{"use strict";n.d(t,{V:()=>s});const r="0123456789abcdef",a=new Uint8Array(256),i=new Uint8Array(65536);for(let o=0,c=16;o9&&(a[0|r[o].toUpperCase().charCodeAt(0)]=0|o);for(let o=0;o<256;o++){const e=o<<8;for(let t=0;t<256;t++)i[e|t]=a[o]<<4|a[t]}function s(e,t=-1){if(!e)return new Uint8Array;let n=e.startsWith("0x")?2:0;const r=Math.ceil((e.length-n)/2),a=Math.ceil(-1===t?r:t/8),s=new Uint8Array(a);for(let o=a>r?a-r:0;o{"use strict";function r(e){return"bigint"==typeof e}n.d(t,{s:()=>r})},24466:(e,t,n)=>{"use strict";n.d(t,{f:()=>a});var r=n(39404);function a(e){return r.isBN(e)}},67536:(e,t,n)=>{"use strict";n.d(t,{P:()=>s});var r=n(75487),a=n(8319),i=n(8514);function s(e){return a.Ze&&!!e&&(0,i.T)(e.readDoubleLE)&&r.Mn.Buffer.isBuffer(e)}},8514:(e,t,n)=>{"use strict";function r(e){return"function"==typeof e}n.d(t,{T:()=>r})},77389:(e,t,n)=>{"use strict";n.d(t,{D8:()=>o,MJ:()=>s,Mp:()=>i});var r=n(8514),a=n(34501);function i(...e){return t=>((0,a.G)(t)||(0,r.T)(t))&&e.every((e=>(0,r.T)(t[e])))}function s(...e){return t=>(0,r.T)(t)&&e.every((e=>(0,r.T)(t[e])))}function o(...e){return t=>(0,a.G)(t)&&e.every((e=>(0,r.T)(t[e])))}},74749:(e,t,n)=>{"use strict";n.d(t,{Ed:()=>a,eR:()=>r,qv:()=>i});const r=/^0x[\da-fA-F]+$/,a=/^[\da-fA-F]+$/;function i(e,t=-1,n){return"string"==typeof e&&("0x"===e||r.test(e))&&(-1===t?n||e.length%2==0:e.length===2+Math.ceil(t/4))}},48827:(e,t,n)=>{"use strict";function r(e){return null===e}n.d(t,{k:()=>r})},55471:(e,t,n)=>{"use strict";function r(e){return"number"==typeof e}n.d(t,{E:()=>r})},34501:(e,t,n)=>{"use strict";function r(e){return!!e&&"object"==typeof e}n.d(t,{G:()=>r})},25311:(e,t,n)=>{"use strict";function r(e){return"string"==typeof e||e instanceof String}n.d(t,{K:()=>r})},336:(e,t,n)=>{"use strict";function r(e){return(e&&e.constructor)===Uint8Array||e instanceof Uint8Array}n.d(t,{b:()=>r})},74032:(e,t,n)=>{"use strict";function r(e){return void 0===e}n.d(t,{b:()=>r})},52502:(e,t,n)=>{"use strict";n.d(t,{v:()=>g});var r=n(75487);function a(e){return e.toString().padStart(2,"0")}var i=n(24466),s=n(67536),o=n(8514),c=n(34501),d=n(336),u=n(82422),l=n(79931),f=n(56199);const p={debug:"log",error:"error",log:"log",warn:"warn"};function h(e){return Array.isArray(e)?e.map(h):(0,i.f)(e)?e.toString():(0,d.b)(e)||(0,s.P)(e)?(0,u.X)((0,l.e)(e)):function(e){if(e&&(0,c.G)(e)&&e.constructor===Object){const t={};for(const[n,r]of Object.entries(e))t[n]=h(r);return t}return e}(e)}function b(e,t,n,r=-1){if(1===n.length&&(0,o.T)(n[0])){const a=n[0]();return b(e,t,Array.isArray(a)?a:[a],r)}var i,s;console[p[e]](`${(s=new Date).getFullYear().toString()}-${a(s.getMonth()+1)}-${a(s.getDate())} ${a(s.getHours())}:${a(s.getMinutes())}:${a(s.getSeconds())}`,t,...n.map(h).map((i=r,e=>{if(i<=0)return e;const t=`${e}`;return t.lengthb("debug",t,e,a):f.l,error:(...e)=>b("error",t,e),log:(...e)=>b("log",t,e),noop:f.l,warn:(...e)=>b("warn",t,e)}}},56199:(e,t,n)=>{"use strict";function r(e){return e}function a(){}n.d(t,{D:()=>r,l:()=>a})},76284:(e,t,n)=>{"use strict";function r(e,...t){for(let n=0,r=t.length;nr})},58861:(e,t,n)=>{"use strict";n.d(t,{j:()=>s});var r=n(75487);class a{encode(e){const t=e.length,n=new Uint8Array(t);for(let r=0;r{"use strict";n.d(t,{A:()=>i});var r=n(26805);function a(e,t){return(0,r.s)(t)?t.toString():t}function i(e,t){return JSON.stringify(e,a,t)}},82422:(e,t,n)=>{"use strict";n.d(t,{X:()=>s});const r=new Array(256),a=new Array(65536);for(let o=0;o<256;o++)r[o]=o.toString(16).padStart(2,"0");for(let o=0;o<256;o++){const e=o<<8;for(let t=0;t<256;t++)a[e|t]=r[o]+r[t]}function i(e,t){const n=e.length%2|0,i=e.length-n|0;for(let r=0;r0){const n=Math.ceil(t/8);if(e.length>n)return`${i(e.subarray(0,n/2),r)}\u2026${i(e.subarray(e.length-n/2),"")}`}return i(e,r)}},79931:(e,t,n)=>{"use strict";n.d(t,{e:()=>c});var r=n(72598),a=n(67536),i=n(74749),s=n(336),o=n(58861);function c(e){return(0,s.b)(e)?(0,a.P)(e)?new Uint8Array(e):e:(0,i.qv)(e)?(0,r.V)(e):Array.isArray(e)?new Uint8Array(e):(0,o.j)(e)}},98967:(e,t,n)=>{"use strict";function r(){return Number.NaN}n.d(t,{Q:()=>a});const a=(0,n(75487).pc)("BigInt",r)},75487:(e,t,n)=>{"use strict";n.d(t,{Mn:()=>r,pc:()=>a});const r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this");function a(e,t){return void 0===r[e]?t:r[e]}},74486:(e,t,n)=>{"use strict";n.d(t,{b:()=>r});var r=n(30228)}}]); \ No newline at end of file +/*! For license information please see 3482.483a7910.js.LICENSE.txt */ +(self.webpackChunk=self.webpackChunk||[]).push([[3482],{39404:function(e,t,n){!function(e,t){"use strict";function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function a(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function i(e,t,n){if(i.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this._init(e||0,t||10,n||"be"))}var s;"object"==typeof e?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:n(47790).Buffer}catch(M){}function o(e,t){var n=e.charCodeAt(t);return n>=48&&n<=57?n-48:n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:void r(!1,"Invalid character in "+e)}function c(e,t,n){var r=o(e,n);return n-1>=t&&(r|=o(e,n-1)<<4),r}function d(e,t,n,a){for(var i=0,s=0,o=Math.min(e.length,n),c=t;c=49?d-49+10:d>=17?d-17+10:d,r(d>=0&&s0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,n){if("number"==typeof e)return this._initNumber(e,t,n);if("object"==typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var a=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(a++,this.negative=1),a=0;a-=3)s=e[a]|e[a-1]<<8|e[a-2]<<16,this.words[i]|=s<>>26-o&67108863,(o+=24)>=26&&(o-=26,i++);else if("le"===n)for(a=0,i=0;a>>26-o&67108863,(o+=24)>=26&&(o-=26,i++);return this._strip()},i.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r=t;r-=2)a=c(e,t,r)<=18?(i-=18,s+=1,this.words[s]|=a>>>26):i+=8;else for(r=(e.length-t)%2==0?t+1:t;r=18?(i-=18,s+=1,this.words[s]|=a>>>26):i+=8;this._strip()},i.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var r=0,a=1;a<=67108863;a*=t)r++;r--,a=a/t|0;for(var i=e.length-n,s=i%r,o=Math.min(i,i-s)+n,c=0,u=n;u1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=l}catch(M){i.prototype.inspect=l}else i.prototype.inspect=l;function l(){return(this.red?""}var f=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],p=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],h=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var a=0,i=0,s=0;s>>24-a&16777215,(a+=2)>=26&&(a-=26,s--),n=0!==i||s!==this.length-1?f[6-c.length]+c+n:c+n}for(0!==i&&(n=i.toString(16)+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var d=p[e],u=h[e];n="";var l=this.clone();for(l.negative=0;!l.isZero();){var b=l.modrn(u).toString(e);n=(l=l.idivn(u)).isZero()?b+n:f[d-b.length]+b+n}for(this.isZero()&&(n="0"+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16,2)},s&&(i.prototype.toBuffer=function(e,t){return this.toArrayLike(s,e,t)}),i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};function b(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var a=0|e.words[0],i=0|t.words[0],s=a*i,o=67108863&s,c=s/67108864|0;n.words[0]=o;for(var d=1;d>>26,l=67108863&c,f=Math.min(d,t.length-1),p=Math.max(0,d-e.length+1);p<=f;p++){var h=d-p|0;u+=(s=(a=0|e.words[h])*(i=0|t.words[p])+l)/67108864|0,l=67108863&s}n.words[d]=0|l,c=0|u}return 0!==c?n.words[d]=0|c:n.length--,n._strip()}i.prototype.toArrayLike=function(e,t,n){this._strip();var a=this.byteLength(),i=n||Math.max(1,a);r(a<=i,"byte array longer than desired length"),r(i>0,"Requested array length <= 0");var s=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,i);return this["_toArrayLike"+("le"===t?"LE":"BE")](s,a),s},i.prototype._toArrayLikeLE=function(e,t){for(var n=0,r=0,a=0,i=0;a>8&255),n>16&255),6===i?(n>24&255),r=0,i=0):(r=s>>>24,i+=2)}if(n=0&&(e[n--]=s>>8&255),n>=0&&(e[n--]=s>>16&255),6===i?(n>=0&&(e[n--]=s>>24&255),r=0,i=0):(r=s>>>24,i+=2)}if(n>=0)for(e[n--]=r;n>=0;)e[n--]=0},Math.clz32?i.prototype._countBits=function(e){return 32-Math.clz32(e)}:i.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 8191&t||(n+=13,t>>>=13),127&t||(n+=7,t>>>=7),15&t||(n+=4,t>>>=4),3&t||(n+=2,t>>>=2),1&t||n++,n},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;ne.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var r=0;re.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){r("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var a=0;a0&&(this.words[a]=~this.words[a]&67108863>>26-n),this._strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);var n=e/26|0,a=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<e.length?(n=this,r=e):(n=e,r=this);for(var a=0,i=0;i>>26;for(;0!==a&&i>>26;if(this.length=n.length,0!==a)this.words[this.length]=a,this.length++;else if(n!==this)for(;ie.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,r,a=this.cmp(e);if(0===a)return this.negative=0,this.length=1,this.words[0]=0,this;a>0?(n=this,r=e):(n=e,r=this);for(var i=0,s=0;s>26,this.words[s]=67108863&t;for(;0!==i&&s>26,this.words[s]=67108863&t;if(0===i&&s>>13,p=0|s[1],h=8191&p,b=p>>>13,m=0|s[2],y=8191&m,x=m>>>13,g=0|s[3],v=8191&g,w=g>>>13,V=0|s[4],T=8191&V,S=V>>>13,k=0|s[5],_=8191&k,P=k>>>13,M=0|s[6],I=8191&M,N=M>>>13,E=0|s[7],O=8191&E,A=E>>>13,C=0|s[8],H=8191&C,R=C>>>13,B=0|s[9],L=8191&B,z=B>>>13,U=0|o[0],D=8191&U,q=U>>>13,j=0|o[1],F=8191&j,X=j>>>13,W=0|o[2],Z=8191&W,G=W>>>13,K=0|o[3],J=8191&K,Y=K>>>13,Q=0|o[4],$=8191&Q,ee=Q>>>13,te=0|o[5],ne=8191&te,re=te>>>13,ae=0|o[6],ie=8191&ae,se=ae>>>13,oe=0|o[7],ce=8191&oe,de=oe>>>13,ue=0|o[8],le=8191&ue,fe=ue>>>13,pe=0|o[9],he=8191&pe,be=pe>>>13;n.negative=e.negative^t.negative,n.length=19;var me=(d+(r=Math.imul(l,D))|0)+((8191&(a=(a=Math.imul(l,q))+Math.imul(f,D)|0))<<13)|0;d=((i=Math.imul(f,q))+(a>>>13)|0)+(me>>>26)|0,me&=67108863,r=Math.imul(h,D),a=(a=Math.imul(h,q))+Math.imul(b,D)|0,i=Math.imul(b,q);var ye=(d+(r=r+Math.imul(l,F)|0)|0)+((8191&(a=(a=a+Math.imul(l,X)|0)+Math.imul(f,F)|0))<<13)|0;d=((i=i+Math.imul(f,X)|0)+(a>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(y,D),a=(a=Math.imul(y,q))+Math.imul(x,D)|0,i=Math.imul(x,q),r=r+Math.imul(h,F)|0,a=(a=a+Math.imul(h,X)|0)+Math.imul(b,F)|0,i=i+Math.imul(b,X)|0;var xe=(d+(r=r+Math.imul(l,Z)|0)|0)+((8191&(a=(a=a+Math.imul(l,G)|0)+Math.imul(f,Z)|0))<<13)|0;d=((i=i+Math.imul(f,G)|0)+(a>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(v,D),a=(a=Math.imul(v,q))+Math.imul(w,D)|0,i=Math.imul(w,q),r=r+Math.imul(y,F)|0,a=(a=a+Math.imul(y,X)|0)+Math.imul(x,F)|0,i=i+Math.imul(x,X)|0,r=r+Math.imul(h,Z)|0,a=(a=a+Math.imul(h,G)|0)+Math.imul(b,Z)|0,i=i+Math.imul(b,G)|0;var ge=(d+(r=r+Math.imul(l,J)|0)|0)+((8191&(a=(a=a+Math.imul(l,Y)|0)+Math.imul(f,J)|0))<<13)|0;d=((i=i+Math.imul(f,Y)|0)+(a>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(T,D),a=(a=Math.imul(T,q))+Math.imul(S,D)|0,i=Math.imul(S,q),r=r+Math.imul(v,F)|0,a=(a=a+Math.imul(v,X)|0)+Math.imul(w,F)|0,i=i+Math.imul(w,X)|0,r=r+Math.imul(y,Z)|0,a=(a=a+Math.imul(y,G)|0)+Math.imul(x,Z)|0,i=i+Math.imul(x,G)|0,r=r+Math.imul(h,J)|0,a=(a=a+Math.imul(h,Y)|0)+Math.imul(b,J)|0,i=i+Math.imul(b,Y)|0;var ve=(d+(r=r+Math.imul(l,$)|0)|0)+((8191&(a=(a=a+Math.imul(l,ee)|0)+Math.imul(f,$)|0))<<13)|0;d=((i=i+Math.imul(f,ee)|0)+(a>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(_,D),a=(a=Math.imul(_,q))+Math.imul(P,D)|0,i=Math.imul(P,q),r=r+Math.imul(T,F)|0,a=(a=a+Math.imul(T,X)|0)+Math.imul(S,F)|0,i=i+Math.imul(S,X)|0,r=r+Math.imul(v,Z)|0,a=(a=a+Math.imul(v,G)|0)+Math.imul(w,Z)|0,i=i+Math.imul(w,G)|0,r=r+Math.imul(y,J)|0,a=(a=a+Math.imul(y,Y)|0)+Math.imul(x,J)|0,i=i+Math.imul(x,Y)|0,r=r+Math.imul(h,$)|0,a=(a=a+Math.imul(h,ee)|0)+Math.imul(b,$)|0,i=i+Math.imul(b,ee)|0;var we=(d+(r=r+Math.imul(l,ne)|0)|0)+((8191&(a=(a=a+Math.imul(l,re)|0)+Math.imul(f,ne)|0))<<13)|0;d=((i=i+Math.imul(f,re)|0)+(a>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(I,D),a=(a=Math.imul(I,q))+Math.imul(N,D)|0,i=Math.imul(N,q),r=r+Math.imul(_,F)|0,a=(a=a+Math.imul(_,X)|0)+Math.imul(P,F)|0,i=i+Math.imul(P,X)|0,r=r+Math.imul(T,Z)|0,a=(a=a+Math.imul(T,G)|0)+Math.imul(S,Z)|0,i=i+Math.imul(S,G)|0,r=r+Math.imul(v,J)|0,a=(a=a+Math.imul(v,Y)|0)+Math.imul(w,J)|0,i=i+Math.imul(w,Y)|0,r=r+Math.imul(y,$)|0,a=(a=a+Math.imul(y,ee)|0)+Math.imul(x,$)|0,i=i+Math.imul(x,ee)|0,r=r+Math.imul(h,ne)|0,a=(a=a+Math.imul(h,re)|0)+Math.imul(b,ne)|0,i=i+Math.imul(b,re)|0;var Ve=(d+(r=r+Math.imul(l,ie)|0)|0)+((8191&(a=(a=a+Math.imul(l,se)|0)+Math.imul(f,ie)|0))<<13)|0;d=((i=i+Math.imul(f,se)|0)+(a>>>13)|0)+(Ve>>>26)|0,Ve&=67108863,r=Math.imul(O,D),a=(a=Math.imul(O,q))+Math.imul(A,D)|0,i=Math.imul(A,q),r=r+Math.imul(I,F)|0,a=(a=a+Math.imul(I,X)|0)+Math.imul(N,F)|0,i=i+Math.imul(N,X)|0,r=r+Math.imul(_,Z)|0,a=(a=a+Math.imul(_,G)|0)+Math.imul(P,Z)|0,i=i+Math.imul(P,G)|0,r=r+Math.imul(T,J)|0,a=(a=a+Math.imul(T,Y)|0)+Math.imul(S,J)|0,i=i+Math.imul(S,Y)|0,r=r+Math.imul(v,$)|0,a=(a=a+Math.imul(v,ee)|0)+Math.imul(w,$)|0,i=i+Math.imul(w,ee)|0,r=r+Math.imul(y,ne)|0,a=(a=a+Math.imul(y,re)|0)+Math.imul(x,ne)|0,i=i+Math.imul(x,re)|0,r=r+Math.imul(h,ie)|0,a=(a=a+Math.imul(h,se)|0)+Math.imul(b,ie)|0,i=i+Math.imul(b,se)|0;var Te=(d+(r=r+Math.imul(l,ce)|0)|0)+((8191&(a=(a=a+Math.imul(l,de)|0)+Math.imul(f,ce)|0))<<13)|0;d=((i=i+Math.imul(f,de)|0)+(a>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(H,D),a=(a=Math.imul(H,q))+Math.imul(R,D)|0,i=Math.imul(R,q),r=r+Math.imul(O,F)|0,a=(a=a+Math.imul(O,X)|0)+Math.imul(A,F)|0,i=i+Math.imul(A,X)|0,r=r+Math.imul(I,Z)|0,a=(a=a+Math.imul(I,G)|0)+Math.imul(N,Z)|0,i=i+Math.imul(N,G)|0,r=r+Math.imul(_,J)|0,a=(a=a+Math.imul(_,Y)|0)+Math.imul(P,J)|0,i=i+Math.imul(P,Y)|0,r=r+Math.imul(T,$)|0,a=(a=a+Math.imul(T,ee)|0)+Math.imul(S,$)|0,i=i+Math.imul(S,ee)|0,r=r+Math.imul(v,ne)|0,a=(a=a+Math.imul(v,re)|0)+Math.imul(w,ne)|0,i=i+Math.imul(w,re)|0,r=r+Math.imul(y,ie)|0,a=(a=a+Math.imul(y,se)|0)+Math.imul(x,ie)|0,i=i+Math.imul(x,se)|0,r=r+Math.imul(h,ce)|0,a=(a=a+Math.imul(h,de)|0)+Math.imul(b,ce)|0,i=i+Math.imul(b,de)|0;var Se=(d+(r=r+Math.imul(l,le)|0)|0)+((8191&(a=(a=a+Math.imul(l,fe)|0)+Math.imul(f,le)|0))<<13)|0;d=((i=i+Math.imul(f,fe)|0)+(a>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(L,D),a=(a=Math.imul(L,q))+Math.imul(z,D)|0,i=Math.imul(z,q),r=r+Math.imul(H,F)|0,a=(a=a+Math.imul(H,X)|0)+Math.imul(R,F)|0,i=i+Math.imul(R,X)|0,r=r+Math.imul(O,Z)|0,a=(a=a+Math.imul(O,G)|0)+Math.imul(A,Z)|0,i=i+Math.imul(A,G)|0,r=r+Math.imul(I,J)|0,a=(a=a+Math.imul(I,Y)|0)+Math.imul(N,J)|0,i=i+Math.imul(N,Y)|0,r=r+Math.imul(_,$)|0,a=(a=a+Math.imul(_,ee)|0)+Math.imul(P,$)|0,i=i+Math.imul(P,ee)|0,r=r+Math.imul(T,ne)|0,a=(a=a+Math.imul(T,re)|0)+Math.imul(S,ne)|0,i=i+Math.imul(S,re)|0,r=r+Math.imul(v,ie)|0,a=(a=a+Math.imul(v,se)|0)+Math.imul(w,ie)|0,i=i+Math.imul(w,se)|0,r=r+Math.imul(y,ce)|0,a=(a=a+Math.imul(y,de)|0)+Math.imul(x,ce)|0,i=i+Math.imul(x,de)|0,r=r+Math.imul(h,le)|0,a=(a=a+Math.imul(h,fe)|0)+Math.imul(b,le)|0,i=i+Math.imul(b,fe)|0;var ke=(d+(r=r+Math.imul(l,he)|0)|0)+((8191&(a=(a=a+Math.imul(l,be)|0)+Math.imul(f,he)|0))<<13)|0;d=((i=i+Math.imul(f,be)|0)+(a>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(L,F),a=(a=Math.imul(L,X))+Math.imul(z,F)|0,i=Math.imul(z,X),r=r+Math.imul(H,Z)|0,a=(a=a+Math.imul(H,G)|0)+Math.imul(R,Z)|0,i=i+Math.imul(R,G)|0,r=r+Math.imul(O,J)|0,a=(a=a+Math.imul(O,Y)|0)+Math.imul(A,J)|0,i=i+Math.imul(A,Y)|0,r=r+Math.imul(I,$)|0,a=(a=a+Math.imul(I,ee)|0)+Math.imul(N,$)|0,i=i+Math.imul(N,ee)|0,r=r+Math.imul(_,ne)|0,a=(a=a+Math.imul(_,re)|0)+Math.imul(P,ne)|0,i=i+Math.imul(P,re)|0,r=r+Math.imul(T,ie)|0,a=(a=a+Math.imul(T,se)|0)+Math.imul(S,ie)|0,i=i+Math.imul(S,se)|0,r=r+Math.imul(v,ce)|0,a=(a=a+Math.imul(v,de)|0)+Math.imul(w,ce)|0,i=i+Math.imul(w,de)|0,r=r+Math.imul(y,le)|0,a=(a=a+Math.imul(y,fe)|0)+Math.imul(x,le)|0,i=i+Math.imul(x,fe)|0;var _e=(d+(r=r+Math.imul(h,he)|0)|0)+((8191&(a=(a=a+Math.imul(h,be)|0)+Math.imul(b,he)|0))<<13)|0;d=((i=i+Math.imul(b,be)|0)+(a>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(L,Z),a=(a=Math.imul(L,G))+Math.imul(z,Z)|0,i=Math.imul(z,G),r=r+Math.imul(H,J)|0,a=(a=a+Math.imul(H,Y)|0)+Math.imul(R,J)|0,i=i+Math.imul(R,Y)|0,r=r+Math.imul(O,$)|0,a=(a=a+Math.imul(O,ee)|0)+Math.imul(A,$)|0,i=i+Math.imul(A,ee)|0,r=r+Math.imul(I,ne)|0,a=(a=a+Math.imul(I,re)|0)+Math.imul(N,ne)|0,i=i+Math.imul(N,re)|0,r=r+Math.imul(_,ie)|0,a=(a=a+Math.imul(_,se)|0)+Math.imul(P,ie)|0,i=i+Math.imul(P,se)|0,r=r+Math.imul(T,ce)|0,a=(a=a+Math.imul(T,de)|0)+Math.imul(S,ce)|0,i=i+Math.imul(S,de)|0,r=r+Math.imul(v,le)|0,a=(a=a+Math.imul(v,fe)|0)+Math.imul(w,le)|0,i=i+Math.imul(w,fe)|0;var Pe=(d+(r=r+Math.imul(y,he)|0)|0)+((8191&(a=(a=a+Math.imul(y,be)|0)+Math.imul(x,he)|0))<<13)|0;d=((i=i+Math.imul(x,be)|0)+(a>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,r=Math.imul(L,J),a=(a=Math.imul(L,Y))+Math.imul(z,J)|0,i=Math.imul(z,Y),r=r+Math.imul(H,$)|0,a=(a=a+Math.imul(H,ee)|0)+Math.imul(R,$)|0,i=i+Math.imul(R,ee)|0,r=r+Math.imul(O,ne)|0,a=(a=a+Math.imul(O,re)|0)+Math.imul(A,ne)|0,i=i+Math.imul(A,re)|0,r=r+Math.imul(I,ie)|0,a=(a=a+Math.imul(I,se)|0)+Math.imul(N,ie)|0,i=i+Math.imul(N,se)|0,r=r+Math.imul(_,ce)|0,a=(a=a+Math.imul(_,de)|0)+Math.imul(P,ce)|0,i=i+Math.imul(P,de)|0,r=r+Math.imul(T,le)|0,a=(a=a+Math.imul(T,fe)|0)+Math.imul(S,le)|0,i=i+Math.imul(S,fe)|0;var Me=(d+(r=r+Math.imul(v,he)|0)|0)+((8191&(a=(a=a+Math.imul(v,be)|0)+Math.imul(w,he)|0))<<13)|0;d=((i=i+Math.imul(w,be)|0)+(a>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(L,$),a=(a=Math.imul(L,ee))+Math.imul(z,$)|0,i=Math.imul(z,ee),r=r+Math.imul(H,ne)|0,a=(a=a+Math.imul(H,re)|0)+Math.imul(R,ne)|0,i=i+Math.imul(R,re)|0,r=r+Math.imul(O,ie)|0,a=(a=a+Math.imul(O,se)|0)+Math.imul(A,ie)|0,i=i+Math.imul(A,se)|0,r=r+Math.imul(I,ce)|0,a=(a=a+Math.imul(I,de)|0)+Math.imul(N,ce)|0,i=i+Math.imul(N,de)|0,r=r+Math.imul(_,le)|0,a=(a=a+Math.imul(_,fe)|0)+Math.imul(P,le)|0,i=i+Math.imul(P,fe)|0;var Ie=(d+(r=r+Math.imul(T,he)|0)|0)+((8191&(a=(a=a+Math.imul(T,be)|0)+Math.imul(S,he)|0))<<13)|0;d=((i=i+Math.imul(S,be)|0)+(a>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul(L,ne),a=(a=Math.imul(L,re))+Math.imul(z,ne)|0,i=Math.imul(z,re),r=r+Math.imul(H,ie)|0,a=(a=a+Math.imul(H,se)|0)+Math.imul(R,ie)|0,i=i+Math.imul(R,se)|0,r=r+Math.imul(O,ce)|0,a=(a=a+Math.imul(O,de)|0)+Math.imul(A,ce)|0,i=i+Math.imul(A,de)|0,r=r+Math.imul(I,le)|0,a=(a=a+Math.imul(I,fe)|0)+Math.imul(N,le)|0,i=i+Math.imul(N,fe)|0;var Ne=(d+(r=r+Math.imul(_,he)|0)|0)+((8191&(a=(a=a+Math.imul(_,be)|0)+Math.imul(P,he)|0))<<13)|0;d=((i=i+Math.imul(P,be)|0)+(a>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,r=Math.imul(L,ie),a=(a=Math.imul(L,se))+Math.imul(z,ie)|0,i=Math.imul(z,se),r=r+Math.imul(H,ce)|0,a=(a=a+Math.imul(H,de)|0)+Math.imul(R,ce)|0,i=i+Math.imul(R,de)|0,r=r+Math.imul(O,le)|0,a=(a=a+Math.imul(O,fe)|0)+Math.imul(A,le)|0,i=i+Math.imul(A,fe)|0;var Ee=(d+(r=r+Math.imul(I,he)|0)|0)+((8191&(a=(a=a+Math.imul(I,be)|0)+Math.imul(N,he)|0))<<13)|0;d=((i=i+Math.imul(N,be)|0)+(a>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(L,ce),a=(a=Math.imul(L,de))+Math.imul(z,ce)|0,i=Math.imul(z,de),r=r+Math.imul(H,le)|0,a=(a=a+Math.imul(H,fe)|0)+Math.imul(R,le)|0,i=i+Math.imul(R,fe)|0;var Oe=(d+(r=r+Math.imul(O,he)|0)|0)+((8191&(a=(a=a+Math.imul(O,be)|0)+Math.imul(A,he)|0))<<13)|0;d=((i=i+Math.imul(A,be)|0)+(a>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,r=Math.imul(L,le),a=(a=Math.imul(L,fe))+Math.imul(z,le)|0,i=Math.imul(z,fe);var Ae=(d+(r=r+Math.imul(H,he)|0)|0)+((8191&(a=(a=a+Math.imul(H,be)|0)+Math.imul(R,he)|0))<<13)|0;d=((i=i+Math.imul(R,be)|0)+(a>>>13)|0)+(Ae>>>26)|0,Ae&=67108863;var Ce=(d+(r=Math.imul(L,he))|0)+((8191&(a=(a=Math.imul(L,be))+Math.imul(z,he)|0))<<13)|0;return d=((i=Math.imul(z,be))+(a>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,c[0]=me,c[1]=ye,c[2]=xe,c[3]=ge,c[4]=ve,c[5]=we,c[6]=Ve,c[7]=Te,c[8]=Se,c[9]=ke,c[10]=_e,c[11]=Pe,c[12]=Me,c[13]=Ie,c[14]=Ne,c[15]=Ee,c[16]=Oe,c[17]=Ae,c[18]=Ce,0!==d&&(c[19]=d,n.length++),n};function y(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,a=0,i=0;i>>26)|0)>>>26,s&=67108863}n.words[i]=o,r=s,s=a}return 0!==r?n.words[i]=r:n.length--,n._strip()}function x(e,t,n){return y(e,t,n)}function g(e,t){this.x=e,this.y=t}Math.imul||(m=b),i.prototype.mulTo=function(e,t){var n=this.length+e.length;return 10===this.length&&10===e.length?m(this,e,t):n<63?b(this,e,t):n<1024?y(this,e,t):x(this,e,t)},g.prototype.makeRBT=function(e){for(var t=new Array(e),n=i.prototype._countBits(e)-1,r=0;r>=1;return r},g.prototype.permute=function(e,t,n,r,a,i){for(var s=0;s>>=1)a++;return 1<>>=13,n[2*s+1]=8191&i,i>>>=13;for(s=2*t;s>=26,n+=i/67108864|0,n+=s>>>26,this.words[a]=67108863&s}return 0!==n&&(this.words[a]=n,this.length++),t?this.ineg():this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n>>a&1}return t}(e);if(0===t.length)return new i(1);for(var n=this,r=0;r=0);var t,n=e%26,a=(e-n)/26,i=67108863>>>26-n<<26-n;if(0!==n){var s=0;for(t=0;t>>26-n}s&&(this.words[t]=s,this.length++)}if(0!==a){for(t=this.length-1;t>=0;t--)this.words[t+a]=this.words[t];for(t=0;t=0),a=t?(t-t%26)/26:0;var i=e%26,s=Math.min((e-i)/26,this.length),o=67108863^67108863>>>i<s)for(this.length-=s,d=0;d=0&&(0!==u||d>=a);d--){var l=0|this.words[d];this.words[d]=u<<26-i|l>>>i,u=l&o}return c&&0!==u&&(c.words[c.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(e,t,n){return r(0===this.negative),this.iushrn(e,t,n)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26,a=1<=0);var t=e%26,n=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var a=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(r("number"==typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(c/67108864|0),this.words[a+n]=67108863&i}for(;a>26,this.words[a+n]=67108863&i;if(0===o)return this._strip();for(r(-1===o),o=0,a=0;a>26,this.words[a]=67108863&i;return this.negative=1,this._strip()},i.prototype._wordDiv=function(e,t){var n=(this.length,e.length),r=this.clone(),a=e,s=0|a.words[a.length-1];0!==(n=26-this._countBits(s))&&(a=a.ushln(n),r.iushln(n),s=0|a.words[a.length-1]);var o,c=r.length-a.length;if("mod"!==t){(o=new i(null)).length=c+1,o.words=new Array(o.length);for(var d=0;d=0;l--){var f=67108864*(0|r.words[a.length+l])+(0|r.words[a.length+l-1]);for(f=Math.min(f/s|0,67108863),r._ishlnsubmul(a,f,l);0!==r.negative;)f--,r.negative=0,r._ishlnsubmul(a,1,l),r.isZero()||(r.negative^=1);o&&(o.words[l]=f)}return o&&o._strip(),r._strip(),"div"!==t&&0!==n&&r.iushrn(n),{div:o||null,mod:r}},i.prototype.divmod=function(e,t,n){return r(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(o=this.neg().divmod(e,t),"mod"!==t&&(a=o.div.neg()),"div"!==t&&(s=o.mod.neg(),n&&0!==s.negative&&s.iadd(e)),{div:a,mod:s}):0===this.negative&&0!==e.negative?(o=this.divmod(e.neg(),t),"mod"!==t&&(a=o.div.neg()),{div:a,mod:o.mod}):this.negative&e.negative?(o=this.neg().divmod(e.neg(),t),"div"!==t&&(s=o.mod.neg(),n&&0!==s.negative&&s.isub(e)),{div:o.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modrn(e.words[0]))}:this._wordDiv(e,t);var a,s,o},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),a=e.andln(1),i=n.cmp(r);return i<0||1===a&&0===i?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modrn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var n=(1<<26)%e,a=0,i=this.length-1;i>=0;i--)a=(n*a+(0|this.words[i]))%e;return t?-a:a},i.prototype.modn=function(e){return this.modrn(e)},i.prototype.idivn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var n=0,a=this.length-1;a>=0;a--){var i=(0|this.words[a])+67108864*n;this.words[a]=i/e|0,n=i%e}return this._strip(),t?this.ineg():this},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var a=new i(1),s=new i(0),o=new i(0),c=new i(1),d=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++d;for(var u=n.clone(),l=t.clone();!t.isZero();){for(var f=0,p=1;!(t.words[0]&p)&&f<26;++f,p<<=1);if(f>0)for(t.iushrn(f);f-- >0;)(a.isOdd()||s.isOdd())&&(a.iadd(u),s.isub(l)),a.iushrn(1),s.iushrn(1);for(var h=0,b=1;!(n.words[0]&b)&&h<26;++h,b<<=1);if(h>0)for(n.iushrn(h);h-- >0;)(o.isOdd()||c.isOdd())&&(o.iadd(u),c.isub(l)),o.iushrn(1),c.iushrn(1);t.cmp(n)>=0?(t.isub(n),a.isub(o),s.isub(c)):(n.isub(t),o.isub(a),c.isub(s))}return{a:o,b:c,gcd:n.iushln(d)}},i.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var a,s=new i(1),o=new i(0),c=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var d=0,u=1;!(t.words[0]&u)&&d<26;++d,u<<=1);if(d>0)for(t.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);for(var l=0,f=1;!(n.words[0]&f)&&l<26;++l,f<<=1);if(l>0)for(n.iushrn(l);l-- >0;)o.isOdd()&&o.iadd(c),o.iushrn(1);t.cmp(n)>=0?(t.isub(n),s.isub(o)):(n.isub(t),o.isub(s))}return(a=0===t.cmpn(1)?s:o).cmpn(0)<0&&a.iadd(e),a},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var r=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var a=t.cmp(n);if(a<0){var i=t;t=n,n=i}else if(0===a||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return!(1&this.words[0])},i.prototype.isOdd=function(){return!(1&~this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){r("number"==typeof e);var t=e%26,n=(e-t)/26,a=1<>>26,o&=67108863,this.words[s]=o}return 0!==i&&(this.words[s]=i,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this._strip(),this.length>1)t=1;else{n&&(e=-e),r(e<=67108863,"Number is too big");var a=0|this.words[0];t=a===e?0:ae.length)return 1;if(this.length=0;n--){var r=0|this.words[n],a=0|e.words[n];if(r!==a){ra&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new _(e)},i.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var v={k256:null,p224:null,p192:null,p25519:null};function w(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function V(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function T(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function S(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function k(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function _(e){if("string"==typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function P(e){_.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}w.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},w.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},w.prototype.split=function(e,t){e.iushrn(this.n,0,t)},w.prototype.imulK=function(e){return e.imul(this.k)},a(V,w),V.prototype.split=function(e,t){for(var n=4194303,r=Math.min(e.length,9),a=0;a>>22,i=s}i>>>=22,e.words[a-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},V.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n>>=26,e.words[n]=a,t=r}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(v[e])return v[e];var t;if("k256"===e)t=new V;else if("p224"===e)t=new T;else if("p192"===e)t=new S;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new k}return v[e]=t,t},_.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},_.prototype._verify2=function(e,t){r(!(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},_.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(u(e,e.umod(this.m)._forceRed(this)),e)},_.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},_.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},_.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},_.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},_.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},_.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},_.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},_.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},_.prototype.isqr=function(e){return this.imul(e,e.clone())},_.prototype.sqr=function(e){return this.mul(e,e)},_.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2==1),3===t){var n=this.m.add(new i(1)).iushrn(2);return this.pow(e,n)}for(var a=this.m.subn(1),s=0;!a.isZero()&&0===a.andln(1);)s++,a.iushrn(1);r(!a.isZero());var o=new i(1).toRed(this),c=o.redNeg(),d=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new i(2*u*u).toRed(this);0!==this.pow(u,d).cmp(c);)u.redIAdd(c);for(var l=this.pow(u,a),f=this.pow(e,a.addn(1).iushrn(1)),p=this.pow(e,a),h=s;0!==p.cmp(o);){for(var b=p,m=0;0!==b.cmp(o);m++)b=b.redSqr();r(m=0;r--){for(var d=t.words[r],u=c-1;u>=0;u--){var l=d>>u&1;a!==n[0]&&(a=this.sqr(a)),0!==l||0!==s?(s<<=1,s|=l,(4===++o||0===r&&0===u)&&(a=this.mul(a,n[s]),o=0,s=0)):o=0}c=26}return a},_.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},_.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new P(e)},a(P,_),P.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},P.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},P.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=n.isub(r).iushrn(this.shift),i=a;return a.cmp(this.m)>=0?i=a.isub(this.m):a.cmpn(0)<0&&(i=a.iadd(this.m)),i._forceRed(this)},P.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=n.isub(r).iushrn(this.shift),s=a;return a.cmp(this.m)>=0?s=a.isub(this.m):a.cmpn(0)<0&&(s=a.iadd(this.m)),s._forceRed(this)},P.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=n.nmd(e),this)},30228:e=>{"use strict";var t=Object.prototype.hasOwnProperty,n="~";function r(){}function a(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function i(e,t,r,i,s){if("function"!=typeof r)throw new TypeError("The listener must be a function");var o=new a(r,i||e,s),c=n?n+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],o]:e._events[c].push(o):(e._events[c]=o,e._eventsCount++),e}function s(e,t){0==--e._eventsCount?e._events=new r:delete e._events[t]}function o(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),o.prototype.eventNames=function(){var e,r,a=[];if(0===this._eventsCount)return a;for(r in e=this._events)t.call(e,r)&&a.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?a.concat(Object.getOwnPropertySymbols(e)):a},o.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var a=0,i=r.length,s=new Array(i);a{t.$o=171008,t.qO=339468,t.ee="eNqkvQmYXVd153vuuVPVvTXcmqTSfOpKtmVbskaXJMvYugU2Tuj3mi8vL1++9/X3ZNmSwSXjoSxseJ9iF1gy4oUEhZhEBPIiGhLUEAUxBTkhIIiTVhN3EMMDAaYRgQR3QkDBdMeAg/v3X2ufc4caNCDZOvuss/faa6299tprrz3caNeDr8lFUZT7x9yK2+NHH41uzz+qf3P8z2vuUXvnkdM/BdJ8KOrBs2RPEhHfwgupsqeyjGlBx/LI7ZFV8ohX8Aj/kuwOZVSqkqVVpKv5IUUsqh4JxD1ihD5iGR/xP8IQknop2oszRnW5R6L4Q3FX/uE7XrVw586H77j73t2v2nPvzrsf3Pnae3fvuevue/fsjor6urjl6313TO65c9/O3VP33b9zas9dUawMS5ThVTsf3HPPXTs33LFl16Ztezbt2rbxzm2bt90ZdSvHMs9x59Tr7993385t41vv2rBly8aNW7fs2bj7rvVezZWe51V79v3Srnt33/eaX9l1z2v3PLhz16bdmzbfsfmuPXs23blx6/g2z7zcM0/teeC1d0/t2Tm+fvPWTVs2b9x6/aaNu7Zs2hTl58F41/V7NmzeBZ13bt2zbdv1u6OcMl8RMFrOW+++557/4/X33rlz9/V37N64e/z66+/afdfG68d3kfej+Q/nc4ND0XCUy5UquahciXO5fBTl40JcLhWrpRzwqNpVKpe6yiPFXCEq5/LlXFcUlaOoiobl4q4oF+UKPZTJ5ytV8itV6MnF5VxUiHLFaEGuDDRfWDha0ZO3PNBSFFMuKuejGDSCUTJXjEGZ6y5EXbl8UXAIiCKl+Mj/+VIpjhZFfC4BjnMl/hapL84VQaAC0eLY/kTF/oiPUbREKKElzvG3J5+v5cVfvisqqL6oUCqCNtcPQbmoV50GzHEZoniPCvluaIyEJ1oqpkvFckmcliE8N5CjbK1Y6h2QxGCBz6qHF7gqUSHFomVxnC/Eue7e7jgGxif4MRpzRaTQnSdV4v/8csRL+XyUL5AB1Ppj/ZgKKVPs6+vLFxFYoZi7P/eKV8ByNFTqpvs1pqdPRdXyW8vXlF6z5zX3Tb0+jgb3vG7fzjvuvn/TNnTm3j1Tu/btiV463ASiunvu3Yfqvz763dxoG/w1d997Nx3gzqk9+6LbB9o+PbiHjjTcgvuhXffcvVu4f6km4J7dO++auu81nu+xXDXAHrz7VfdGK3vD20N7pu6+6/XRgH29455de/dsvCO6tl9vr37Nrjt3PvjqXahntLYNcv2GjdHBnKHYu+fOO3ftVZaHW96V4R25igD337EXDY9+398etJ4abfAXx/1b4ZPj/aNcl972PXzf66LVI/Zhz53377z/tXfsvPO+19w/tefBB6P35IbaPux53f30ruhIzoRh4Cbn/7cJw4BTe+68D4aj7UaqgUwa6xfb+9TO3UjjoT0w8fr7d909tfPVu6Z2R+NzfHzwvrv2Rcmi9o9Qc8/dyEjfbvKKp1po+RUTMyCr9honYypthJGe8L7rVVN79kTb7PWhqbs8d6UvfQ3Ze1ZOvfbBfeICKe7dsPOh9Ts379yAlO7dp5yojHThULxq3my79zyI5r0++v14/az5sNi7XnvPvp0Yrj2v2nXPzjt33XPPHbvu3LvzrnujD+avm7fMnqmp+6Y6SqxoMfq7du82Rd6nr/ffdzcUTUV/kO9vyXKXJHEwP9ACeg347rszOh0PtgBh1qDfi4dboHtedy/Y75vaE/1uvvutGKVGrvqLJ/OH8x/I/4/c7+WP5L8eH8k/mf/t/P/zQu7J/Nfi34yfzN/7yifyJ/IfwhjfuvPJ/ENP8n3zb+Z+zPd35v84/288t/5fJ/IfIcfvkO/J/HH+fzL/Z5Rc+mT+z3k8nvuD3AmseZrhG/GbKPRU7uNAnsx/O/ex/J/mpz6Y/2C+8vUjlQ/nn7spd9ujSZREq+Pb65UknhyPb0+iRjI5dktSadz8wFglvyOJG6eipLK3fvMv3FLYkVSSWyaTXHJz7c7FXvBX65XG6D6yd+3D/LxQfmBK6Yca0z/LP0Bq9KGpqXpeGf/DRWQsNBY9nBQafQ8/yL/5hx6cVMGXXURBiFkdJxeRcVQZV11Exj6R0mek9Bkpk0m+0f8w//QCyjcqgOpFYbvxIrCNKOOOi8i4QNUusGoXhGopufkiSm5Sxq0XkXGzqthsVWx2IeetkldeRNl1yrjmIjL2KOP6i8hYETUVo6bSZPi2ekklSy0lSYeSfFLJ9cq4+iIy9qqKXquiV1UkfVRSUGMWrDEL3pglQUoGKTmkLEjZIGWHdAnSZZAuh3Qbvb9cr4qMagsZpAMZfBIZ14uM642M642MdZNJl5X+dxdReoNKb7DSG6z0+smkPJksFnixgRcbeMFkUppMRgQeMfCIgTfD8WSySeBNBt5k4Mpkcv1k0iNwj4F7DNw7mWyYTIpitmjMFp3ZqiBVg1Qd0i9Iv0H6HTIgyIBBBhwyJMiQQYYcMizIsEGGHbJQkIUGWeiQRSJqkRG1yIjKC5A3QN4AUD4wmawTeJ2B1xkYyvsnk/UCrzfwegMvnkyqk0m36um2erq9niWCLDHIEocsFWSpQZY6ZJmEAb6i4SsaPsQ5NJksU95llneZ510OYrJ2W9ZuyzqAvnUJ2GXALgNCI2jLApcNXDYwNC6lCQUuGbhk4OJksmQSQVDbIqttkde2QpAVBlnhkESQxCCJQ8YEGTPImEPqk0iZGhZaDQutBmodm6Q5AA8beNjA1JrAqcBDBh4yMGq/AvELPGDgAQOjz4sQv8D9Bu43MIq6EPELXDVw1cAo6vBkslzkLTfyljt5KwVZaZCVDlklyCqDrHLIFYJcYZArHHKlIFca5EqHXCXIVQa5yiGrBVltkNUOuVpEXW1EXW1ELRNgmQGWGQDKr6BRBF5q4KUGhvJVNIrASwy8xMDoxMrJpK566lZP3eu5RpBrDHKNQ64V5FqDXOuQNRIG+JYbvuWGD3FeOZmsUd41lneN510LYrLWLWvdsl6Bmo0JOGbAMQNCI2gTgRMDJwaGxmtpQoFXGHiFgZdPJtdMIghqu9pqu9pru06Q6wxynUPGBRk3yLhDtgiyxSBbHLJ1EilTw2qrYbXVQK1bJmkOwFcZ+CoDU+s4nAp8pYGvNDCKeh3iF/gKA19hYBT1asQv8CoDrzIwiroa8Qu80sArDYyiXjWZrBV5a428tU7eRkE2GmSjQ7YJss0g2xxygyA3GOQGh2wXZLtBtjvkRkFuNMiNDtkhyA6D7HBII7kxuSHZmKxJrknGkhXJwmQo6U+KybpkAT6VeSVL6y/Xo1YfbSx+OBltjFB6tFF+2L2g0fqEHsP1lwB9IJlgoGwc+eaxJwqT9UF96KnfNlnHnPcko5NJb/KSyaQvmZg03C958AH+Jy28FcNbMbyN33rzN95cnqy/VAi66rdOMmxTgOyjZO9R9h7L3uPZP3Tohc8X9tZfpuyF+k2T9V6y95C9QvZeZe+17L2e/eunj304t7f+C8oeQVu9BnW9ZO8he03Za5a9FrIf+Ppn85P1X0xuBetNU2BNbjKPYbmoHjKqK5LG4GS9D67BkYyIV8a2nmQTcNI10Pcqj9APGvpBR/8v73nqc8VJ3KRK0jcFZj1B3yf0fYa+z9G/FDFM4rHVkkGQ1YCMCNmIIRtxZM/85A3fL+2tb6ZikFVgyZD1CFmPIetxZC9DSGJ8MBkB2eCsjH/gM7/5vuJeWgHpQJCQ9YKsV8h6DVmvI/sFZ1x8g2xkVjafff+3PhWrjXpFWQ/SmIPNXzQ2cRcGNWLW5E+MaJBc0ML4AqFfYOgXOPo3/OlvPJGbxN82xnvnZnxTxviCORn/5K//9bvjSZzKCzG+OWNcyBbMyvhf/vRDx2jf9Rdk/GLa90d/9uO30zE2XJBNb1+kWJAu5tFN8OKYLGhp8ZlSfOO7Dv64vBeGLsT44sk6XaKPlhHjavE+IeszZH2O7Ks/fOu70cURagcZjPMEWV7I8oaM2YqQrZusYy3gJJPizC7+lt8//Fx+b30BSArGOE+QFYSsYMjwloVsPbMfGQDQgaxvVgPwqT9+29cxAIsRThGCHtATZEUhKxoy/Eoh22Bs1nCH5HpWkx48ILx0RDmfwfjJ+cffCPo+aAR9QbQK/UzGMRgwXmoxDyUhKxmykiP76z9//GeRpGOMF+dmfMQYL0OgkEl9ykJWNmRlR/b0X374KIrde0HGFxjjVZCVQVYCUhWyqiGrOrIfnH3vD0BWuyCbKAts4ld2y4ssyzkuySPrJ10FfZk8/ULfb+j7Hf373/yFL1Js4IKM0wNhvETz9IOsOqsUn/niZ/6eTNULMk4PhHFJUcj6Z5Xi137rHz5OJ+y/IOP0QDjoapFil5B1GbIuR/Yn33j8k/SSoQuyWTM28W+75BKX5eeV5AV3k+4KUuwW+m5D3+3of/u5k5/Ehg9fkPEBY5x2SbpB1jWrFE+eeO5Fxlk1yfyMV41xSVHIumeV4pPTv3cQZNULMt5vjM8vxd949sXTmIf+C7I5ZGyaFPEpy3JjS5rvzC/FJ7/xrS8weKmR5md8OPTo+aT4+b/+T+NMNS/INy0SOvTcQvzuF977boa9gQvyTYvA9/xCPPj2Z/6CDq0WmZ9LWgQuTYi48WX5tyV57vML8eRnvnce9Oo28zNOG1mHnk+IL3z9Q/8dGoYuyDgtEjr03FL87d879w5qVJPMzzhNcsEO/aV/+E/HShdjt2iStEMzkyprTlHSjG5+Kf752499BONzYUtGI12wQ3/hn3/0L4z3F7ZkNMkFO/RP/+jj37soS0aTXLBDf/NPpv/xEuyWSZE5VlnzuJKmVfNL8WMf+Z1Pgf5iLdn8Ujz83z//zxifi7Vk80vxG8/87VOXYMnml+J3P/jR5y7BbpkUmdeWk7WSIlPZ+aX4zHPv/BvQX6wpm1+KP33iP38zUpNcnCmbX4rnT73/MezixZqy+aX4O2/87f8Ksos1XCZFYgnlZJukSPhgfikeOvuNfwH9xZqy+aX49Pff/WcY2Ys1ZfNL8WM//swfUuPFmrL5pfiRd5w/bT7lxRkupHiNAibXWMDkGguYYCY3TiZbFcTYakGMrSHYK2+ynGyXuIntzC/uz37p7/4nnC+8SJs3v7g/98Rzz8D5xdq8+cX93Def/DQjx8XavPnF/f2Dn3wv48Sii7RwiHuNxL3GxL3GxI09vYFwnMDXGvhaA2NcUeyZAfaZQfgBb5cdahfFuOdtlx/89dv/CoJLFxTlwiDKZrvMFOX33vrfvsrAtvCirWg5a5eZonz+p99+B8gu2orOy+bj0wd+wih5YZu5yNisJi9n9XMpa5q3XZAXdKeTpnaSTXadNbUT4kasA3V7zcZnCapYS0smKLZWGrLWNGStaQgDB31x5oLLgALu1ZaGmzmpfPsfffIbDMwy8NRA/JGoWzEpGQ88bRkN4kpGHMth4pvMeTJ3kfklkLiWUDAEXWcEXecriUw+GyKnYeQ0jBxXTuakc3bIN598xyGmKBogwD8M/ptgF2JMWiJmpg6QuUDmApmvI3wLIRuNkI1OyI2zyEWLFtJAEaLp60wN/M3f/LOncQrKiGB0Euw1sFe84UpZw81UIYkwSuLk5r1jsRbHJ8dyjWis0pOrVpO4uWges2herf7edfE1j5RYdm8cZjRak0RX57diPnispx9FjZNA116dj+pX8HKEl+v0cvX+/fWl+5OlEz/+zPPv/K33fOT816ODE8mb60sn3vq2X3/T186+8ezXol8j0nLFwYnVb66P7K8vS5YenFj/Zvr54v2seo8cnMi9uV5XNavrqPnV+USL5o0TVLBOFVyZrNFjFfWM7IdYCvzTTx7/2qc+9j8/vcJqWj7xgfNf/NEHv/+Jj9+4v54kV1pFS/Zrcf/q/O31HAXHlHy1ytcJcpMe9Rpr9ZVUdUzsqo6reDnEy3q9XEO5FfuTFRN/cPbHX/3Mb33tje981KpbMfFXH/r/v/q+Dz7x9FMwVk6usvoK+9mnAD0w1mXZuoW/y2uO6ivAfBTMG/SyWrDpXP1aaliwXy+ncsmCgxOfP/h7P/jJ55540+ddggsmDr3tud9/8ekfH/jHaD8r+qutong/0RsyU1E1KQLfX++zDz37icSA6zbhzCfLLUs+SfbT65aYkJfQ3mR4ZX05FVvyV+vJ/mQJkfhKUrU6R/fXyQu2yn7QjxqOwQRh9icVxxFKvo6slGRvRlK0D8VkmeD3k0NtzNd8ssxwLpM5pDn2S30NOW9kN+SxZTFVNjSECIVmR30ZaAqJsVJISparlAyAJhV3r6CmR2DmvwH7MLQfywpT3UnNvnYnfQgo6THkPXSfEfAWk4X7ZUwC1n5ByJEKMcUr6aYlJYFF+4n6mRMYSK2iwqJymVPZbfjyiKQMr3wwlN3763EC1WoNy1CVPAwDQUVku5/RZ/l+AZNBy1AWzeSgcK+IL1thEyL/OaGDIoh+V0mG7WtFshlIhgzvECSsAG+crNwvagJW44ccrkVDGV6D0xCUBD7shYYhp9dgXUQ7lxq2uj6gB2mLmdwLYsYb1T6KGMvSSxZEYpLqS8bA0J3kJClcoM72REh9He1J+/GBHMMSPLG9oPM0RY8EBd5ByBk1yujZcdaexg85nM/B9vbM+OyHJAqpPVMqc8mQUUm3Bxi6hFqW3qAOPld7mgjAUIDPxNoTjSh4M5vkodmVASE12xOU/OftiQ4OiYve0J5EhKWKKDV4B6Czbnyitx3t6WoPP4ytc7QnQld7Nqlk6cOoXCwqrZnBV4Bn+ETyzqe1J1SDkn9ntKdsSDfa29ae0HyB9kRvh1VvVYrYbE8aF7z90Cn5xcLb0Z7kcD7752jPITVbzOplk8oBk1q3Gvqy23ORSQo7dGntid4OqSN1tGdTb71H0e872rNFb+dqT8TX3p791guC1l1me640SaFfl9ae6O2wSnW0Z1NvpSfqpZ3t2aK3c7Un7LS356BJrVv24LLb0zUfVbm09kRvTcE62rNTb62rtbVni97O1Z4MV+3t6XrbJXtw2e2pcSVo/qW0p9lbWqujPZt6q3E5jASXZm+HvFO3tmc/miMq6QWX3Z7S2y7J/TLsLQTNaW/V79VLL8Pe2mDUbm81+gUrcpntKU+jW6gvw95S75z2VniDHbpUe2t+Qru99VHenL/Las8cro8khdwvw96iBXPaW2la0NtLtbfmJ7TbW/WCLnXcy25P+WfBkl2yvcUwzmlv3U+gxS/d3ppz0W5v1QvCKH+Z/VP+dpDUJdtbSs1pb93vs6HwUu2tKUG7vXUrQi+47Pb0kck8x0u2tyjYnPbW/XgbCi/V3ppw2u2tjwo2q7rM9lQ/6lIPvwx7i7bPaW+lJ7K6l2FvTW/b7a28jmBFLqs93Q51y8Rdhr1Fwea0t7KQYVy5VHtrzkW7vZUd6lZDX3Z7uqTg8zLsLfXOaW/lZwU//lLtrQmn3d66FTGv7TL7p+xFtyzKZdhbBD+nvfVxxfT2Uu2t+Qnt9ta9cPTnsttT9qJLFuUy7C12YU576368uaqXam/N+eeR0TmK5soSFfYb0NtzNGtPJ5U0dsZQ8i8Z0KlMVgvgVLqf329AlzwbBPfXSVIYLJg5K7wgKQElXmQfiKzUxMXCrEUXSjpJ0FzFpqVrNA072wzriPhZoMZII1dEICnHd8GdI+BVD1MYMUAWobXyrRbLdi+ivsWGbRH8EmRbyAdDSHpZssgQ8q+pz3KCOgsNx0KUQHJiXFpIaxLSI8NChfRIUpjEEmU1LpYrH9ri0RiFn5JVBzFkixRnzUmSRtUSs0D03EXaVRloikO0bHFCwIkY7VhK25KUNkoB3ZLnaJXH49KesgqM1x7ky3SOePdKjfhW0wjxQOkifXYE6j1Uu1Ay4zvIV/Ipo50qR5KrCc4uT5LQvkUbUTEFuWSxIsaUzvGuRqE0LNVVaZSsJ0Pd0OQoQYYVyTX+ZS0sXnEQua0SSgOt0daAgygdDAbQOspfeRAaV2agDdC7+qBX66DqD9fFxUdHH1kZNc4v21vvXhWxmnOMTc2Knb8vppm6V8d/XKnnxuOPVvztWKUej8cneGscJSO9OMv43ko9Px5/ImQ8WqkXxuOTyniEjIQls4zvqtSL4/FTIeORSr00Hp9SxsNkpHdnGZ+o1Mvj8dMh4+FKvWs8Pq2MZ8jIrLT2+qR7bXSmUtgRVVUPS369jahxLqq9M7cYwPMAQvZGbqqe42SdztGRk01n1aRS+3sqapxl355/Gsux5fnfPvGXUaOv9hdKP33ss1FDmpGvvUtZn2URiS3bjTO5gIedjjFbOU/7u6j58MgN0d8NKb0ud2Jke+4cUcvGr/8FOCu0UtHxnGRToxZgy7XvE1wkQ4rwkDag0t0qtbuB56j3FqCn2WJeqb2gkoe0SsiazCkrAMpQtNJ4E2eRG921t2FuGoeVLqoxRydrb5HRRRgDrJocUiXJePwWPU8vYU2H3O+0ktT1SSwwDfqL4pRvvNVu4/t7/XssTDLbRSPq0NJmjuPKUfYclcbb9cZo1Dg5YLVXGh8VhOWxxrOs/lkuSKN8mW+fMFpr/8XkC0wrRrna7zopB3JAz3Nupfvq/KHF9b6JaOKf/+ubnvzy736hPBHVTqjMNGtvgn/t9B98+2tf/n4uhZ8CTqnDi+v9s5Q6HEq987Nf+erPXnwxg58Brvyd2A6zqAa2I4vrtVmwHQ3YXvQ/GfxcwNZZy1GwCU9nLee8lqOL6wOz1HKirZZ8Cj4fKums/ESopLPy88CFvrPyEyzXUfmxOcSsja0zKz8VKumsfBpkqqSz8lPAZ2utM214MvSHA5pO9GcCmhmCbcufoTkXsneiOd8Gb2Z3hTtfQnXe+cLn3/ahj/7n+JGs8GMun/d95bt/+O0jTQYoI/gb/uZjf/uvf/WTUsaw4zpVxmPgOc0IVlPiDGP3AIMpyXMlre/0T2w+xPvQLx9XRyhNsqSmXmsJrahN9Dx+AG9mVoJMwzsIOhwI+vFffDHKmhiY8nYSOe1EnikzMqrPQOSgJXAARiwBtaNKnCCxyBgqMcBB9mKRjRvwKyL7tJPNgg2vTIMMeNaBtWTYWDtdDqwdssR+/iQLQKIEy6vG5cCsXFrP6+DyaOColcvzHN5T3k4uzwGXuMv4JuplcImhJgGX1jjnSCwwCFzipaACOEmYStqtxEFDZgcrxO7yZIVxdihldxGcjSaLDHjSgSPJqL0e8VdOJ/hrV3hdYsI4mwrjSCYME8jSVCCJC2RwVoGYkegQyInAfKtAzgBT3k6BHHWBnC+zXqy2RSDW2ieQg7X2eRLW2idwz5egTmsely8iAILh5CU6Q2KFCa/IqjD+dl0SGkvqxu6zxcDuYthNteR5By5IFtoru0r1SjzPi7iEhpJh/5q+LvOOkQrsWJvAEFmSimxsPpENzSKyU0E8rSI7DEx5Z/SUAG/Ja72hi5V3qUmqStMIzFTpFImFqKgkZ5p0CoGZ/h0mkZi2FXE3kdwVktyq5ArnO5XcCvhOFe6sA5cmy13V/HVJspRXfGAHdhswVcfnXX6pOp5MX1eaOJ9PxXmyXf/6JoZNmCTHUrkucbn2NaW5hTHZ+T/c7WpxBv7NcpyBbY78GNumStNwu0gLidS7LEm8Mzj9zCXcevirq0mqHaednVQ7DqWvdTcmzg5wSwSS+5vULzHqzXrC1OZDnQwcDgyc6/YOfxS6+9EG0T2sdbKWnn3I6XNRph36rBPEGo4RdMRfgWcEIQUnJ5g5NHMOYo6ImCHq9m54Hlpq0CC72W/dgZUF7wVpLccsAeoBqyMZ9Br656rhqGroS2pg4VCbq4DjGnIEGoX278+Kb8EdkJiXyVfLN84c+HRU+zBuKU66u2a5eV2zeA7XDPg8rlkoNcM1Az6ra8Z1CvO4ZgHbDNcsYJvhQYBtVtfMa5nLNWurpemahUpmuGahkhmuGfBZXTMOv8/jmlFqNtcsVDLDNQPZrK4Z8FldszY8TdcsoJnhmgU0MwTblr/pa4XsM1yzNngzuyvc+dyluGaUmdU1c1yn4mCyieq4a8aMPHXNcjNds1zqmlnislyzQFCbawZsVtfMiTwTB9fMQoxKEKRw1wxq3TUj4a5ZbjbXzMnucM0cmLlmcWpNLfHzumaBozbXLJrDNQMuccfBNbNAohJw6a4ZCXfN4NIs9f2pZ5abzTNLuW3zzByYeWb+mnlm+XbPLJXFkUwWP6dnxoHfGY4ZbM/mmHHwSEoeB78MabhfhhDcLyPhfhmRzja/bH1wy14ZvLLbZ3PKotmcMgdmTpkLJ3PKXDiZU5a+BqcsldWxNln9XE7Zjr0zfDLOq87iks3qjuWDO5aqzzRycneMRJs7tiN4Y8RYzRlLZvHFVs/mirm8Ulds62yeWKHdE3OhZZ5Y+ho8sVSGJ9v17ZI9sULwxGDdPTE4bvPE2HXZ6YiNtvthzlqHH+bMZH5Y+hr8MGcGuCV+Dj+sEPwwqJ7LD2v1aDM3zOnJ3DB/BZ7Rc/luGKTM4YaltRyzxM/nhjmued2wQ7hhOF8tbphCZSRoAM7O5mu7CZl91Wyvjn42Ti0VTsV+kYhBTrZADhvkRAvkhEHOtEBOGuRsC+SUQc41IeaYLEUB6UZKnyZ9bBm0peHWSu0rIul5zpcTtwxhVjbgT+f1tUgI0FOlrESPSlRrjytMeNQuETq/qEnBMYM83wI5YZDpxU2aYksdUVT4MIfbYWqkmf2QQU63QKYNcqoJESMnR7bknxeGo/b1XEv+YwZ5tgVywiDn2zGcBcORHokRAitZ9PkQ4ehzxJVrn6flVsdvqSAQnocqnOMndn0nm9ohrzJZe6sEcCpNnEwTJ9LEuWg8ngZ/QoD+BShNCM0bxdPExyu134lZ1ZDxqziN55dNroqqH1sZX/PoMsX8p9l6HxPztxvorm786LNv+GpprNT48NcO/U15rLvx/dNveEd+bFHj789/+tdLY4ONythoSFfCt8Uh75JQdih8r4bvS8P3ZeH7cPjeE74vD99XhO/c2iYDvH2sAU1mdOs3jk0k2ycY828deykJRsKXj72MBNbtNm7Nu7G+pn7d2Ebf9L5l7CWUM1tW3zp2U7Klvnns+mRr/eaxHb5dfcPYNjKY+aiPj92QbKivHVuXjNfXj23i4r1RTg5sYp1l0/u45uk49mXTRHKI9MjxieTxA8nGg3UDNGoPMyzv8G9lfaOEgKuSHUCuOH4gzdjzMOF1Iv2GwBALtIIro44fSFYdT1Ya4jR3l9ByUChDCYAByDAm0FNoy10GEeeT6wURqgs91lF3j4andU7Zcqf6loN1A4jAkeR6/5ZYFesM2JtcD6RLVHtGSGSbfUBgiAXS1SXQ0Ut1gQ7PDZEjoiNDCaCXEyjCmEBPPs1tJOsWAqdr5DgS8E9GlAswQ9QFVQKBqM/Z72nLLYp0PsZFW1BuSVsNdyDp6sRtkkwmLS85eU24XeH4gfr1SDXDvFEkWp6yC9Eo1pURZcmVFuEdwXhD0HpIo1UU0gsWoAzDFUG6NF8QhLdHm5Ah14VMfQai9XvIfUVTNTIhr+TShRYRX4GIoX9HAmmZiAPNxw+MbUo2pi8q4GwdQNfXM+Svp72XHWfoXu/aMOz8XHewbgCRXU5u9m/GKyVcU25ONcUzGhOcmTIEhlggxqigKabJWW6oZm2+BWWrpkBPyobnRtTL7LYOEbqWFbG11F09jr+11ilb6lS/7GDdACJwONns3xZYFWsN2JdsBtIvqj0jJLIIGxAYYoFYKRyDjj6qC3R4bojE5WlBCaBPRznBmEBPMc1tJOu8qNM13NQOI8oFmCHqhyqBQFRz9qttuUURd9AF0eaVW9JWwx1I+jtxmyQXuH6Qk1f2DEg/NiPVDPN1mX5zliwVcpW7vWRElqpFeEcwoYeiWX1topBeqDt6/3Tp0nxBEN4ebUKGXBcy9aX9s+r9M1WNTMgcDnH6XcRdiBj6b1b/zETc1O/1yXWZfpvkXb/X4oDfQGsvOc7U5AbXhSHnZs3B+pqUi0Jyk38zTpM1QU9ucj1JbkizGhOs+BoKUJMREAujQVNSi+y5oZp14hakrZoCRSkbnhtRs2VB6gKplWQbdVeO44Fvc8oWO9UvpdVSqoeSl/i3MauA1gRYS14CZIAatqVZIRHPPaAANRkBcRtYnVw1qkvVIaV6SHRkSAEQHXCcULSwVXmExQFgybTDTY2JMEM0kGBNAYHoSme/0pZbFOnQpou2qNyStpruQDLQidskOeb6QU5exzgzjX68BKk2MWf6nc/Ug1rqZkQWq0V4RzChh6JZtbYmkWaoO3r/dK2g+YIgvEVaVGOh+qcLOR9Ug9aveP+cRTXokE3FYGoj+jl22RRxqhjoNzfXZfptdLt+b8PFG6e9u4/r/L1rQ8m5mWjhIp9s9W/GaeCklmwNmjLexgSHaw0FqJ2J7kxTUoucMcFh2xakrZoCRZ1saMOX1AVSufHMKGVmvMEpW+RUN1r0ezDZ4t/qLfp9ZbIFyFXUsKFFv1frELGhALnrN2xcQ64rmRF26veg6MiQAriSo96GE4pWt+k3WBwAlkw7jGSnEESuHxsMUE8RqUHackPRtZwzD6JdqPyStpruQFJvEum5oame6gc5TbBXST+2INXk2jRvpt/Fpn4PcpOjjMiioN8IJvRQNOvKTv1GQQ1G/3StoPlEP9x6i7Soxmr1TxdyMagGrT/o/XMW1aBDNhVjwOnfqv6ZirhFv8ddDzr1e4O8hi5PX6cByAbLAzj8WNt+T69RxzUjc4AZAaIc8DQHttMmY/qAd32FpzfKUTOn8gDzhdFGbu/YaA8/eKCLtr9D+G3EjhJbAHKFJ58hudyTXyI57EmF6pZ58mmSSz35FMkhTxKwWuIpzkIv9gPKPePxr/Kojse36YjheLxV+ynH4808usfj9TqQMR6v4TE4Hq+mqGKmmzRbiy1IvN6TigHfYMlkHTNKdmcla5lw67ltS/51PMa35O/nsWFL/tVihvw7vKhi3zd7UuHumxzL9VvyZ1V685b8aT1fsiV/Us+tW4gi89zCFJ6nLZ5sDOSQvC6QQ3KNI7oFcmKeL4McPV/KlFkIJrYQoufZ2JJ/NmeTMq6kHOPUtR52f2ZhjAO33II5ZleJ94wtsbs4x4bs0s2xql3QObZUzFDbjYGZZlJLSCGptZerfVYnwNU88QQiJokEbuRN3hSv4nX9TezzjJPbborPQmnjGUrdZh/Fx8tvik8L+jTQl2fQW2+KTwr6CaC3ZlBEf0zQH8WTE9P6E28xOJPwZwWfZhb+PQmD34fQFe/nYw6nj2qCSQTg5UwyY+a2nHevmzA4XtzoMelwDh8ulOICgkbBUsvJTFDVcodsOnPt2Zguh2xXk411CWXLhWwrqd6zESMK2VYJm2crhWxX6PpuS7H9MWRDTIoRK1t3yNZrYTeltIvLs9kt89HYgiSnRy4p6cG2Lz0IRSiIDZ54siZp6bb46JZeS61q1F5Oiuihz/snxyNdudDj0QDedOPBco8R8KYrB5Z55IA3tTjb4Voxj2aYl6aYOYAcsHIcNGBkI1rA1s0NhY6JkHIrplqGaTjFtJQpuGMqMOo4piqTScdUwj90TOxfasXUlWHqSTGt4Coxx1QmKuCYVnGnhGPiqLxhGoUmWShdZaCVvVVRf7Vajap/Phb3PRpb2GbV3nqFsE1FgVqV1H7JSlLRveYEhH7Z07dp1+YryYRd0ja9NM/L6v3j8X/w9I56TQaqQvTatvWleW6sD4zHuz29tY5pup08LF9wL0uWZ3Mdu3ePp9fXMZKvJg96jX5kedZoQyj30Su9WvtG79feSa6mwyTU3pdrJGOK/klPiAwmtY/F8Y6Ov4+q6CqUOqHjND7NVkECU90EmD6rZE/jC9EYvxaAtJQvGZNQ/mPvZCO6AUlWGtH23FGuzJW+EOOyGpRvKdh6iUGa5qyLpPqVxhcsUzy5NgqFf8g91GxjzABJYXvujK4UoAjJ89wdcX2E1WqsmNwQRTa+6FrhiNCZHlWzYVG/OvPqaGisT4+FMBytjfJV+m6+8c3oFbqsQjte6qx7ynhVtAWw3pW+sImgXggvepzpAkgcsN6b5iAWWGdx1F/YultnGSTLfhTJu4onk9ieTADDLgB2X0rlubV/8urISnH1DvnDiwwCVtVfSjxlv8Gl5QEHcieAxsXw1subVkX8rZIscnqJxUYMRkbLIe5sLQc7TdiXt67s7Xkufiykb0lFe0kYRIb5cpQ7SiuN88OTtd74UQbuytroaG8j9/JeFftbrp+AqbXRe3q93dhWZvtKj3NLZVdKTOOtQKUKH9XdlYJa3o/i0Wh/6imgtEto6Mq66N2923NPK0xduTr6w152gYNRe1V19yz2jR3QaO7a6L29GDxny9qljTVrnFb28LatjVqZPEpstpPJdgbfxvJ7xt5CBJay9KIJLGXle+xizlhovF+t3snQYVhNGVKdibPy7IBlgd/tuWO1wJa6xAchqTer4BhvWduJ9OkyrSqZ/jF3sOebla1GOOPxsaFGjn7ZiIko0xlM184sIrTNrmqGILMDjcJU46mwffmzBqQXZjz8tUHohhnkMwaBtwyiVXMjLZPzxw0C6SnhYu3M6PYcjo6lzy/cnnsqpI/Vtue4pMRbAqng9LDd2TDAVFbL/2cQGiKDsL7sbZrV+1aD0CaZwF7AOlu7tIrmGFbzaKj9cH577l2h9vPDdtTA8jyL9X0dPgM7oW8xNyJ5+dRUr7o+W10IjWj/Of057AAfvSn6J7XWD9gwMYqTcqNXJYFaxV/go2o7TfOeUZoN6l8MsKeAfcnSkrZl/7Jei+PRd/XsG4++rWfPePRNPavj0df17B6PvuLFaBIr9sOA8RQYzytduiF6TmS9AFnWTpIUflKl8Rhb6Kydmi3EClJuS/wj5X+rfaUNWqV2NDce/brGirfZV9qjRbeRIbqtr7/N14I30HssI42SNce7DOIbA5yQJwTRBgJ//aBloNWyVv6AIKvj12lcNoWtxy3HA/AW/XgA54m0rZ9ej5EpZLv54RrzwuGtcDwAWtdGn+26IfoJNsNapGt77vlS83jAYDLgeLQZejgZssMBMgltSI/RtbtY57sbxBoQbShUocIkBv51Ivj8cCN3Kz4HQwsTPD3VRU1fTW1S3XHcnJhYbQcmMGEjk9nA0kweayaPNpOsn1HytJ+1qEzktuRPjfjzCM/GWWLhHJcidUSHHWqMnI3zzChNjTk20Q0Lgp3By8TVCW/HCLdpDV/5i2wy+xSTJ44VfCqeqj2Wb7yYe0CMyWKLciFHGhk3J7gW3FjOIBxRgQi0wYzrWTwP+VQIIPtnsZGIwIN845ZzFEx6/BwFA0Q1nGSQEsjka3uS9Uf9SzMXaqsC04yhnImI01MTXV7ukI5whB2EYYgwCPtJm0MEHgf/2kKwQ46Qp9AchGHIANkQDf8GyAZwtyUF7DtjjY8O+cMSrA8v56qTTDFdNqdYjy1mbwhgutDI1b5lDkJXvciPTxmk8Z3PfNZ+T4Af1EqiJfzkXk/JvK0e7JMsRXxCTlEXv58jD++jowzQXY0X83JtimPdGgI0K3C/L27k9tGHpM6FVywh1bWPpHaJPZDEt9KVaHMmTb+wRI9HHqi9N+ce4JlFjIZ2sRcvX1qk40NWq7UpxFG5qk6K5gkGoI85X1o01tXIQUGximPmh26+EIuoLqZkXWFKFnq36yiLEhxI2cVH1kXxZ21OJ32JJ40hVQGrJ0dB0i0384boc4uMmnP9zPe+5JR9jtlCfNbTSH88lvNoUjClr30Aa4+Ts2gi90uI+i2PnbLZlOaKXT1FVTFNq4T2iOqxtQeQOdsDoTrrXFg4XanxuwuNE5gKQDb5VkDC3apRxrkaWe5FMNMVhufcWDeiSGmjR7XS1kuTJN23UnturKC2RSy4XGW1b3ksD7mRC51+p0/7WDIr87fnF5bwe044mY3cK5Ycn5iuPFIffZ8NUK9s5NXqeJvWzJV7mA50LannaG0f/UJbY8cGnEylvzdgsuEXLo3b8wNy9g2c10lRJqNqVoVXdP0eAtCOAi2Ea0oKxbQcv5xpfyH2GWP1BUbrOAwG3zHIARbwAwQJxD8a3oICqQAWgk0J1jjUhyH/3CIRoCjOWbU9J9O+pCd6cWYRYorsx9uulvppMufSrf1QGESl6TJ5T0k/RrfETwVT2GKLjyzKTO3hZvJQMzndTB5rJk80kyebyVNZUgb6KJTq+fyoNcj70CUmqA36HTwVMbOTY2zPiMcKqEXhFuwtdmCvuYQafFx9H03w7BJ1gKL1pG4xXFQ+2UtyBFU6FffAcAGkr+jNS3/WRBHzuegXfeqD0ni+o3H6qfbv0TnvkDrUnGvkHsJM3dO0XE6EiuZrD0q4oPvfzVduRScFYyTfC0aNG2AVA02so/sao6+dF/c+fiegqUF7YVXGCZMQNEnSRhLPxSHN2CX/UdL5oPriKRI/VMJzhdqZsGe1+fAc2Rk6jWhR20m6KD1JB4aCjT9RepKO1u8NI9IpG9pbR5aTBmmOLCKqZVRJh4hjLDzJMkF01HIKzwZhggqH8nS8CKU3W1SW+ivFDk5tPoH2NEHo1BNM/jzBnNAT06uIXyRd1W8Nx2U/Z3qUO0LZc4Ii5NZEKxrRbbQbcUaNoGqTdByLdTaAoRttaII0zqrlsvEQ39hSh+RoMN15H7obPXADTwW6cN5iyaVe1l71WPt1tS/oWLHePWMTNRm1J33G7mdmu8ApdaJYZ0o9oxSbQ61U+2Zn5sHAlb8TG5tMhe1ksV6dBZsifcLWvhfawkqGrbMWtmEmwtNZC7s1VcupYr1nllrYYNhSS9hZjXhCJZ2Vs0/RKumsnO2MidB3Vs6uR1V+eg4xy2OaWTn7B62SzsrZZmiVdFbObsRZW4vtfi14MvRsBzQ0nejZNThr87GfryV/hob9frO2D51rNokqIoskns+hOrNtezX5tG17hSJt956xyRWGHdfpWLcWcOCCjVAMI2wxY2uUfkSK5LM5XQNQ0cZVZm5sKox1PEObCi1k73vVB9Kto7MRZBreQRC7pI2g5g5bmlhz3VmI1KxYNMXsP+B5xC71VEL3TlgCajkPTQcgMWwM5VjCguwRke2bOW3RQmTzUze8cjWFAVnUEJAbE4011gKcNRYm0h2eA+kG2YXOZc+sXFrP6+BSUXFx1MolO6JNlzq5VGhc4o7ZTit7Apd9loBLa5xndW2nQeCSS0O4VlRbcNVsObbeci+D7cznBgNjjIUe51YbTH2HtS3W+M58bde3dSG9cn2Fv/p2WzZ9mCxYInFZsF7Tund4YceG4d5Z5WE2okMeBITFeqs4sO7WJzrFQcxXSh6z71wNa4colEAI1tTP2x5sQXwPtm3pXSjAVm1E5vmr2orN89XsXOaihmUSzlLbi4wG+17kXtslm+oH62G+u3/QXj24wJq9DjVQxIXD3gv/mr6OepdIZcWyUftedd+i3DzpMLu0Zh4wsYioiaZVXDhAM8+c2DJB+8kP/tIL8ux2kn6kKnQIWZkKnSYxiGpKaKZCt2kXN0+7xYLnavYBIjRttGeFQdu5Y0L1LjPt70+1jFHaN3VrD7VWK5u7/X1PNzoXtiAHFeScUKsKcpzIX5ebHFmacDmyEteqc93NPd/ZUYlwQKa7dQv08zZmYxK04VtGA9bNWJy17dZV49gUyI9U2rGMUdtZr3B2cwe4h6CzgxypUhAOaVUKTiv5q04s8DWlnhl8c796pUl72CMucwlLtoO7jfxp4jbW1wvew4/ZTck9RjUnh9r6Mi5MJse0B3PsydtIO8npuP4KvLlfvZruV3ezhj7OQcsh0aIzIN7znocUbQaWnaxYJyC05Lqf1oI76fvVe3y7ea/XUJmrhsOqgZt7wFK1Xeu0vx+G9OMJSC7dr27FiQEprsW5Y8IhWFKeuWzXOrM9Nqpr5/qh/C24fxCEwhe3RPJDmYXZIgARt6iBF17MXjiqX/IXZqLMwVh+UJQO2ZW0rfkvh+LYXcxpXMw8bmfe4m+4lXL/8jo7i6cb+wtuIZPGXO1LepFDlBcJ9eIMjyVvTpng7a4GKHA1KHW4WKdzzyglx1Cl2j2LvHlZyt+JTY4L2I4UtRI0A5ucU2Frdzzy5hgKW2ctcqeEp7MW+TXUwoFjlphm1CIHuVlLcGMgLVTSWbkcQ1XSWbmcLaHvrFxeEpXjf88mZvnZzVqyyuXiqpLOyuUYqpLOyuWizdZacrybeDL0cmKFphO9HMPZmk+edTN/hkbu6GztI194FonKMUQSJ2NUZ7YxxuTTNsZAUWic9gGFKhzXobx+FMa9EU7qumOoX9IgiWPIrVMljRDMJem9+dQx5DxG6hjKutDtZ/dUTcM7CJJHKoKaQxmtBUx5O4mUYwghOAmDpuUQyX0zbvTZxy03UGZT9JPgl/fkIeJVQbaMH4O3rLhuvTGymf/yyk1BBgyOIb8zYKy5RVfvbzqGbt/gcsi57JqVS+t5HVzK/RVHrVzKMVTeTi7lIUncOk+qJoFL7hPX6C6DLObsfncJAC75GUVzDPkVGnMMR3QRuoYdXdFljAXHkIvK7eSRBg64Sr1FGXaOAoXTqOYkI4twDssMfj4dpPOdjuFQh6PcPas8zEZ0yEPOr3hvlYfcH+XtlAeeodo4xrtT49tMRS1rTo6kYCO9PpmTUwxDPoBXy9nhibPDPWi60J+Ta3iLko6fAoNVH/W7kwFYTRUkeIb8FKm9Bre5mvS67Hz8Yx3LZefS4a557xPuGSL3Ts8w86NH5xPXzNlTXn60JNMqLUXGZhEWjmH7BIS7ljSn0C/daN4XVEiOoanQsyS4289kZiqEN21qp2vY9FytA8NyZpGZn0vMB8eQK+RgONWy4D1xb5+9Bod7MJwTljOFWH2wT3UweCupDgbPsMf8TRomlWM66QxSLDa9q9FUoDqDh0CLrc7GWXaOm1bkXRk0e3RroWv90D73sQDQYWosGciF4rpMo8U9wwHzvPLBy3XlSHUiOEGpTgTHkGvujPgwW0AsLcQj5oz0cLTPnLGiu0pt1J8L1J8ueA/XZJBVByOaLf1tfdkdQxdj1oPDmUI7bY4M/RWZNx3DcuoYBretey5anhUtmjuEjof89FMrspP8cBHV8aOvVktwlhFOqAWCza+TN0cNpblqOK8aikkZLIT8DVeYRbgvjeRSx9CKm9+vSF/qDLLNBGcQPs2JOzAY59yJO6EfyzEnLoTtIo2KxPtIsCOm6RZpgiBLlWRQeRLk61J8RSNU0yEjb01WvplXTpyygaDp7FCYXTGtheUDas6lPt5SkfsUQtB0MlQuwyb/DGyjijk0scnfBFuimXcTmzxAoc+wyTcRtqYn6sGtJno5k6BPJJEmevkowpwhktcnzM3hGIAQtblywpFhluMiHFkReTgqAp6ml6cibZ6XipCr6UMpR1ZEDqAA5GrzgwiQFX5uP0juiBlKN48afLtSP4i15uAH6f5IGURuEW33g7IAWZ9bpPKsBEH9rB5Cpx8kp0x55/CDjsRh1DfbYGNkcBXkGJidV4AseEa6ghRD53dQuOEIoz6/8gQXLM+1+kFcJOt9euZwZoeJW+3uxY/78uzEUacfNNu4Lx/B7Lbbb7k/5pLKN/Wxy0JmwdszS44fZJ4AfhBz/RAO5Mr5Vj8IC2nzT7eTwRVMx/Iw0uPfuiyceX6KxWTh7k/mHGZDkhvzZoRidnd8Zpx21oFd7t/M0G3mBoWRXOEwls3DeGBDfOoX2a265ibLHWoZ0gmQmTv0ap3XkBdi93oo+JGN11z62zKwBDfIQ2CZz5iNgC4NfqbHv6avPuKE2GLqHrW4QdlVIMFrnF1as3nR8hDbg8jmB83mROvHy2b6QYcKuki3xYPWsGoq5N5kweRpKoTPaGqHH2S+42rcT4Sm6B6ngBQ/Sv2gkgUVUy0L/uRgm+vg0aTMkeaGZFc+F1mqi8FpcF1k46O7QakcfQhvc4A6/coQlW8bWlnUMtZPKsJkDkUwFnKbWXBuapB+PYlBWE4dlx23uEEecspcPNeOVCmC15YpRfqqMGnmFqU+cyC40PSDQlBK5nJWz4ANWUb+2YL3cPmr/JaUUd0Lta192f0gF1/ag4OPyeGhVq8idVWMBPdRMrM2t5dyRLTIb3Qjq+lGFyTITnJNM9VxF7e3WeYHpW3m4czgxmD/56jhqPtBXWaOfYodfGZ31pBchx90jJ3AHohqXueggBVe0Il+vKCF8oLOcUK/gBdUsFMQ5gX1MHze/Cbsgp1oL0EZb13qKAW7CMr8oV5cQ8Aj7i9xF4Heip5Jd1KZI1TjRgzAi7Qpxj9pO5O5OQM0L590S0UopfMWve5sLLAaH6Mz2Gn9hYb7MSmnqedq+iUhvOk8wuZ5TnP9R/anwnrx5sd+DYXoVyHr0RkPZa9IZzy6koHH5CqDtMjT8B3O0w14ntfA3oGvDw0AwxLboG5YdIsXCyr+Y3XtFehaLJYT3EUEvT5V/ZNdy0XEPEOjq68GsBr4zAbQtSqU4amreNhTJA0Kd4yQ8Ctd1Np2YRP6YA63Z3KTwY+h2Wu4bagQ7n0xK9A1cdObUDW1x0TMqfCJm6RnpV85vp+VeFByqw0nqP1SJPe52VqY4vErebxubrTCNbC76D1TuFvGNLMQ7mgh4ff2WN3dVjdXBqvmQa+Zxv9l6mYVHp3guI78YjZV6XcGdYZHb25/6kOv1O4PBKj7zpihDxFhUAOHxtDlaMxBhxIDiEFxQUPCm/YyZvcG2W4rvDW/80huDcLObsQZY1uU3Npm0/vuhlIHBEWmRjV/FW8UOoaC5uPDqOXZnmRdKHQa8qrRuTjdATo9pUYvJ57DbgFjC4vfEOZhJmTnYyrSDNTRaBIhUSmJsOQiZLeZRGgMc2eZYdEVXikWv0NM+pBiKQYsRWGhVczUOBabBDOBCcLW0a7ACoui1qWChtuHKjJXtwg8cCmY/9ReqhPBYUKsRt0Zfbcr7v17uBqsm+/dEntm7kzI/DQRfLZDaH4qDvapzEA62NK1dJotWCWdd660NIDOvAVbNEKpUEBn3oIZYv0rawpu+zIh6howBgzX51SIfmmVmWsJkU3IEiLt4k2B9gdmDwcsujItxRKuA0PdUizeJ9jjJSy0izeFYbGmYDoYmkLXmgWm2ptCxwqpoL0pbtfwHQiSJgUPLm2J++UfhpqkIiHONXtD1GY0RE2qoQVJdGAhLgY09TgxnODplYeAIwew14EcD+IKInKGTJzGwekhk38Xn0xUvVF723hjp1SP3IeMNYSnH1WFALt/jGWwNsFpXaflHiQjdhTygSf6eXS7i6uno82AcjNXb0chbRSV22J7YxEOv9fg3q9JzO/iQoVNcmlD8keY+4R5Cz8gitx87A+3X3WZS4KHZzj8yi+6SYrDVCrg6E1x0MA6oVV9c39cerRgI3Zlb73EiF2SIMPZLAyeHWLSSU9LcxROxz118CY9m2XwpXW2E272NMqlA6I6j5OezTL4sM5U3ejpmnbcbmU5rKidkfGjbHnTFUqcG1lMktMgNzdWvMJeMOKlxmciLcPZ3nbOZGzPsQcrPfJUt23zdhgKe9r4MjbRIGy3Uj57fIkWXh3l7aCgwiTsU5tsbKttauSqY11+WottXfiebBYlC45jehippBBEndmAv+DapWeWcPtxz/ykkdZ1/YgSrPXoiJKdsLOzdL4zrN7jBj/yXWF1TmzoEJJd6cNrn2FkYCLdH9DqNkorVbIQhpUo+VWXnpuMJ40jUciTyEftvynBbrOUYPaiZbRnST3w0UvaSDkt8epcllr8D9lfqN1n+qVebSC0HWjHhZIr6W2z3bNvwOGT6pdrH4Jb9UGuy6r9n0lpbSTR6Rp46I0m2Qx652LalyVPHdiyL9RBtq8UGuWH2BNf+7AjMLzKzZvm384Qk08HyfwaKSlAEQpkBxUIeAdnOSlmvz7OWdGpxrtsf2Kp8SMr5lMAbYotNb5nEL/vzCHfMYi76wbRMu2Rwpb4GS31lgMuaeYnlNKGYTjKaRut8TjxZp2hZT+ikL3rDafoGi8jhWZLFDv21v40ZuevZGAbjdFc++Lf/sSUxbZNV/kR6EOf/jTnUsmUFG+QJJPSOtR2OyffsKyG15XbTni81Ot3bW7cmAlKN5dot3Sp8RZeOAZgLwnVcuK61HjC+KUhnB9T+i40PneLtRDjFtj9OOxtHHfyvlIMRxJKjW9Fk2NsfxQLKmpnHHON/v/N+ox+1yJqLEwPrZQa/8UAvgfSAJ82gO+AtP4pbd8SPYl3pr2PLqF/RX/a0OjK/xSNyZkjhxka6wa5G6IXtVxo6LgI3bXVGa1xFo2NwWjdKXZzuyKKUljj1uhWUkuNz7dARCvwJkSnCD9dNmpBXJagqqZ6v2tr84Y1K63dniIDvBnZtpvTMWeUg/NJDtFZFxRbJZ3Px2I0mWv8s3GbHQlz3dEvglQxeBx6oyh7xoNavF9vLWL4N0Ukwi6EUuOgftM8e3sLb7YFNXAHFVui/6FS6kzKoQ6ba2z2tv8Iuw6i9OW7vNgOBnZKjEcfVK2F8egDTAtrH1fPSc9muNnQr518WeHyYFpq73HrQpDYk7gptaP6ha8I1y1sfjcacrX360fStVsWfS9OclClaav+X33Q2dv3xr0MDdqqzXmA8dg4V9PT+czucLhIncu7Ahmekc3kebbgZegx/NaLIVYZY72tDI9n2EZe1dB3FsNOb1E5rBQGp/Y5kGAWHnRkNI7BNJ715hYzybAXfdpqO4tL+DL+XB2e5yp2UjqqHull8rzIftKGybMvIegItNw1BZ9tRpzFyuVD22RYgXabEWbha814bTKtoLYtCXDo1j+FeXJkawkW3+eeW/+ka6Itts9Vrz5d5hbTUJdv8TiXZ6KXhQ4IdR3+ie4QyHL5DbnNcL5MtwjPCNPkRuRm5GhGLyIzIjSPFWlZ1Zrz2sKAiLaQTZeiEBY46ahfHqvKZvVrOiSCsvrlr4ugrH7N70RQVr/iECIord/2nMQe/5TjboE73c1qgbpzthdUW2l0x7GeFrInobm+BT4127ZgHm6lLW6esttNSTBtWaonrqOF+0+lkXTdj2wBBl2EavstR20nnC20eLjJA6hhJu57Cmz1yF91kagtN3hEKHUE/Y9tlbKNBCD2Of2grUPaqlBza51FhX2vmgfmwq2v/OSpvaa3vtruNluk8tp8MtISKvQNVs24feHxifNBiaLHaM31hyb6HzuANn3+TdPTNJf74xZfMXHcrph6S8DKgly+bbHZ1Jogq+2zplYwRm2fNbVmeGr7pqqFts9UjUmGGkybY/WkKa3hztAu+t2v5r44W/7xKLVHKUNYwu96tTU3l0U6q2tdfrW7W8NOtZabVTt6kwmAabcpHvdFm7pxQ7LOPrv8ffpgSxa+/GNb4LT60LkFDu2yOWnbuqBiB21rXgrTSYLNvuGXpzcFpsm5JJgJjHmCuoViO9JfBGa/R4kMMhVySSwIoVkPh/gqUxoKneXC2Zb45GximY49XD5NhRa3U6DOwjn8/JruFG1tKZ9R8UuXRkAIWtgCUEpA0M/W/ZLZpE3io64wk7Fwq6++hWukbfHOZ1l+721LnNUCpzOpJwqSLG7il8yYi2a7xbXo4tFjXx0KF1T7IomtG3u9Hjloj2hbFFkr650xXk07U8t982OBFa1j2EzRQjSdy937NUm02DqTxPf1xPlHh21xO1y8aschsiNftqfWJxd2GiNNYt5DUg9dMaMpxzkkQVuNDbTF4/ot4jlWs+gw4QSNQFzeYgE8fmlTWTzyqWtblKUy8ejYQo5v5RuVW4llTHBqcqKLg4HbddyL8F5pDGUf6wGmM4IFnfGyDpCzsKvHfvkRwaT4azSCzuz2PVYffiyp7qcsQX59AOThDuA9+ydyj3MlBoHG9BNrm0TaHiPAoU/onf1K4K+NscA1kTvExNUPn/mNKAl3Quj6noS7B87oydxOF/ck3Rw/Ts+X+J1BfkdQrsaeWLNSIQrOGaaW6JPfaxTCG3LBLFJsYUq//SgE2NiK5iEov/2IQ5CC6hfdQl77IQy0LwRXSg6VeyFmQ3grYNCIyn2H5A3ZZBN0mJZ7+B0gMytsI5iiJjZ5AsIWwue1QGXANpJik5USNsIhgTatvim+6VHZlDaLEfHLpR6n6w+0afiXSU6x4TsJ2SBn3O0d+y5cIZYXMlkoiB8H9XidRfDs/h9h6g2YDM2Ah/fMQ/JbmmV9eN6OEvBgGLezLEdz2jjs1snOuRCCtd3hso/sHDd/osdyaNWUeExYm7NDVL7JOQ3M8jn20yDkQictqqy1Hzuh43kzAwQqwjzYLiui2FXYMNNlpsROigT0aRGiQSqisC9FqiriS1mcP7YiIcDnN6c0Q8XaZGBFKiri616cNDTC3HzpuIAXYC2AAspOh4fr9S4N/TConvf7JnS8IxPqCe0Z4ClHysTKGGhbw/XLFiZXxmfbW69Y9Iiq9+1fdjjMa04D0myZNCIVN0MIirr5hkQ7UOd53UmyfYXGV82LKIgXdmmWw6md8BMMdqzIi9S8SL8X0ZpH2NbgexjtGE6oJZVevxcZ9CKKkUtuJj1vVh+udAbDC7CekUqP+0paYomYzdblBExktfWVjRetr/xkautrrS3wikHtaX1la1XrK06YDiHrqiJd7ISZIrKAYa49YBMwi8rYWRUGiuneXOVRnZWs7a0XGSaK2m0QfpKTBSvdz8TM62We3qoYoE7eyvHyX+M0+GbFCf+dp9frpzhvI4/6vGaSr1CJ1fEr2X3PQV9tYNFdeDr5rGCqbewo6h68FMI2/PiXdcWchUbewuRU4RTCIUXFab6nRbqiOgSXySi1erJR8+vNCUyOx1xYJwz51awKC/THTD6J6GheyECyhd8DBfjsPyryc4SkXoqgOlYxvmT1ivoN0drzOT9jrOMEHDzX3LnYOFBiBDVU2kOm2ywc/gKxrgB/SzMLv9jGfUchyxNNOD+Wx2l1hzPKxhxFLzae9jP5dmGLoNrtxgnnG6KjxJckP5YR+MJPmBIn4gC4yUG3wGlVUXFNsknj6ZR2csFki62nz6YX6XhU3G7dy/udasxznST9DqvFoQwX1yexnDhuslIdEpTuF5JcT+AOqARzb/t9h1CRoi/ZG1Sf0bYTXvkFVWILHGsWj/xW3ljMyO4SriPX6emnIl0eoviDTkG/LZced87Vfobp1j/wfD8OAo+jOY3m3GuTo2vxfJ1h9eumcqYBhL65/IpHorPiFhiJFeGAfIXXalxECBncnFxyqH4tVibFfhygcZp7K+R42634vPZN1r6a0+nhxhty/960wbFQVD9NmlMMxCuxMx8pln55Ai8h9pg3X+eUcYj3rWz+2S730WkRHg+6flCZ52iBhl4seQRs1HMrITERmSHFa6CAKCI9AyHeg75mH1pwOv92TuXdOqbuHJM0PuH6RMF+Q4BbG7j/rGrXNthtCQpgcQ2M/tHFCwy9CqzZCf68LVGZblPTXuB4VJPyqHQLZiosq6D2TYWK8KRNjMLNjbaclNcFIfvQjBfKD0wp/VBj+mf5B3Sz2kNTU+Pxd1BJmRC6XMEbQEzo5iIn17gwpn5KMAkCyunVAmo1XR3VKeD0xgEO/6OnJhrspreUYfMfUyAuKeXF56lJCM5LEJZ4UZIi/su/GWEsagXCaNoOksByURS5GScZW7KalPeOVcdK9kLfk9FQT2U9x0xan/dcdanav0mRsWqeYAmI33gId7PRS0ZNz3GoSC/Vck3oRMOQwINhHE32zmC8OBadyv8N49aP3hcVHNdTtsIowZSY7cBem+0gqlnwX4jAguBVSz+P1kIQ7e974kG/bPDUz7eexb2A2XoWN63Oup61oGU9a6HWs9Bs3ZOBdlps3G5oaeS5a+RfWR3gvr/usf7G9BtJ1hpXjA2kywJfiDWqNFe3mB7YqhI8BOmmy0q6mNSWlQrN+/4IvlosmFLRmujm+iBXSlBrQTecCH/UWDWpvQ/rooR0XcUatX1T2pjhFwBy+V+B+wDtjtNou91jGm2xO06jTX4V4Dq/CvBaDCWPqzCUrNCtxCgWdDEgK6q6JpB1UF0ayBqqrhBkY5suFGQDDJcGWqScNTxqzG4lNLK5jVDrCYNaAICnsJbwd8SXy60Mlo3Bc1orDCL7h84s3TdE37ZANKsBeg6NRz/VszIe/asFycej5/TkPrAf6Nk7Hv2TnlzP9V09vQrMAVtYVJWejdpD/CK2ovP6/WIitYSgswWFE1pQQM6xXawTqAb+8bITVFoXfazsmNZFHyL0vzb6SDkInuUCW0KwBcmny3blD9MW/cCskopGP+VJISaI7lerlhqf8CQTE/3spV1eKpkI+Ue5vVG53ybD7eTUBzPxsJp0rshdYwpfm4zfphli+DzoOphmbvxHHVhUe7UWP0xbHTbN51K6OIiI9A5uquxmEwrXsTx+wP3GFcyaj0+s1rWSdpNeQJlWl6GjXAXt+V+8nQ20XWV558/Xvefc3HuTnZCQYFLZ9xg1KGicUpKxVLLP8oOUUpmOY5l21hrruFZZCauLfAziTCABcjHX2ho7OmL9QkVBAYmKCpWW8GGLrZY4OjUKOqG1lbHVxhZroFrm9/8/795nn5ub6DiugZV79n733u9+33e/H8/7PP/n/0zSdaboN9N0miY9ZkI9Vw/R6lSFEPUwbnL6u1LYqV5VQd/gFPKuUq5zCpWbX/M3pqLfMPHzTfh+owxUY68H1IGuvwo7xm7F7PeSvLc92urj2oNH/nco/+fz1M83dfpJv46X1l/3Ri66pbCR/Lf0qn2kvUXHqzY0btEvhhPPI0vPabxfv9k5jffod8k5jXfoF/46AonL3kO1nfvvxSl19ikT4HjxUGXtLv6MQzq9Dv9EfBhxeD+HdH0d3iN1QRx+WpC4OPyUNA1xiMpUBDNihq5sfvoEjRpzXCMxxxVvQ8KEawzSN48LG3GDhwz7F11QS2iQx1HosxofZlR8NfWYmxkWeMpU5HEr0B2QT1Ohk4L42WbX4q26PCk6MzYUOla3RiEVdDIfUYoaBDVIBGbHbAQDPD28uMPXRAmjOPQYn7DycslilioF1+1aXzpfmxPbkMwX8xLhtE5sqUEu1Z5Gy8znJlsrdjdtq4GnJ0IRne0BqYpt2sr0L4rokHDCzV5WTPjDEhlyJnpmeG+ZAvg5Pybq5YnOON0jdqixDPACd2ya0Z6CgxfDbLxC8qOpDmD3uTx7VMuCWAk2tC8KKRzqbu0FXiOeb76XSLfY9YgLd9VWRtnEzJgEZ/VucnxNf0xyFqtoeydS0DVYoa1jyf6yham7JLQ1Q1J/XG7PulHko+yVtkr0FPkjdrSd6piawdvEjrBMgp1NgiU/W6XRE5uRxJGwMoOAsVSSty+cbkzKfFY+Z/N5U8RdKAJj/jh5BhdgkVOhTfSL8IdB8eMlwYP3kPo5u8/nuJzCNlPbn8mqyM86b12QETrM+FSC11C93lYy9p2ITXqNeKBFr8Y7aW5tDcQd1Sl2q4awXfL0y7dDONVm58mOGntmouOCHlnElmKyRsMWVNysHVt5eyWYOVPp9IcCOtRojBfS3Y56ftHm1f7siCFqEIE4q6pavEIkye6h1EnOoyeua10iGADfWMiW0JG1s/e6ApcIbsDvqyxVUnGRFp0DGRuvDQ54iY+SlSBmZ8c9k2nLANXWNGRqqU9YqNzqh7UJVOdQ62nzMFlMbVW/wzYAw1t/jI+sa5thA9VT6JHd2rpmP6wtFyLd0Ei6YbJYo2cFfd5ywXQviLJ41FvNjhSrozmoJmTCDbqxtXWmx2/eu1B/VIelF+rLdPKl+rIwOCKNdlhaTXXBcQONUnz8PkxWuojtTulCwJXtu0raYnd8bz/N2c3GmwLMTLktEKTzya1BLydsm66xvftPagG6NSThfOXYdo1dKK07hZKcr02aunJ/2rK7jhZztLk/tZrj1IkAe+dTq8llsXY5q6O3kF1svdq8EDmZd+lN2jjlnZfrRnqklCraq2hToKLoZ3pzf/HqlLPkaVpUAfmmX+7qqEhQU3MU2xcWZb6P2li30Vm2Fldss9ZH3Yu9/YU0bupItF9T2l+UIBqZDjCAdlVt0oG6XKNPki0Pqdcwf8D2p10A3VkdTZuQiusOBX68f0KdTmHg+LIaDk0NOk3c8jxVDLk0R6IfRE5OQ4Bb42lNzYzbKc29npJfujpYBQlloN0Haqt/nmwtitn8AAXB8t7aVHzgU38qUmLNke3iRk6yfyV9UC29uJlDT/k+StoPcafblji2FHZH3S0NRqN4J0elPYp2L97ic/ShnPAFpVbM9tB/ZWwqZmLzJGNQZGvQGXZJW5AwzYjS0BNG8QjaJ7guG+Ig363xgblPu4WvKb2RHTX94m523XFjdl9rZppzNhAaVu3y+aa2GRrDHmJxV3OGeWpSnaP4O9BOJpttO/SEgUXhN8S6okPFm/C0ETiAdAN4llR+L4GQX+pQoSe6cQheIl3fKGVTwOIKIHtXiKJbFOxRQk1C9EutYVzWdkzmR+smX7QFUvUQhE2zqPWj/r8Z/LbRf6jYq2a6CboUl0ha75VGR5eqppoXaVlmTBYcfl4RfS2c5SYYJGwxpBvMXqEVy5Pbawi+gnTOyHqReCa9KuiNSUNwbp/uzXb83Hjf2X2UB6Yo1yLOD9lPLdFS390Ci2Bxz+5fml6sIU0EDhF++ALBEkNPAz1gE1F1TNyW1ndJvmiDn9RMt6fJMHkahIgcZj5s0+l1X2fzat5ANmfnk953eLdPS76w8SL9WtXpJXhePZvZK0iUntBLOcdnNV6nVe6sxhUv0YXLhDlb19rZ77x0m9KV5ev0qBZstTiBd2Jtp6OgjfQv1NH+iterB0ohZ48bkyVDtM8BNzgDrQvRAUtlLJl6qPx2ao80jn6Oq9n3lSZ3v9LxLnqTlYElfbJhlzYeKxyJVWrK7i04cmrkegsZK5cnZUlqDCEEFJW86Gx9frNRrIAE9PIcEBbFVZyPyVBEusPCcFT0Nk+LdB1SwMuzuwwiEXN/b2fcz8kqzd2tNHdb/Y0YYm7RLcXkb2XweqeOGSve2WySNFSsGFxXUqJ6yKhp7DFVVWyVsKXr8+mbpFXSd9pAGfQaNYPiXYiCNt2LwOhGpQoIRhdSao8xfSZ9cgkEVhcgDGwtutv61Jqk7Ldb6t+0gTufPo2GI9LyLmkGNCkdZXegt7CeaSFggokSq6l/2JrqmANHPqMbfDXuReiNYkYFBbNMvSQ9eYLsLTtL7jqb3AzGMmMsL1IG6NOkGUo9ejy7Sm1OJ2YMxDqzdxGwqyWa/PeXsKuASFWYq8rDTwp9I6MElEju26dcVUdkGVIlO7OhWZNcFZxqiH4yGktu20Z1Tes6pFpDyIqBXPJ4tp1xia5XPseaV0e8uCUI1l2fbU8loXqjzLUqTPUK2YX19ipPRy+v5yn7s15SZYpgrJdUOBEpc/WSKk/Zj/WSKk8ZbZVQ5Wkbdj1Pwb70kipTCe517In9QOp5ytIz4v4uW7ZeUuUpk7leUuUpKJdeUmXK7r6G9XIHtLkxgCP2FzhaQkoAHRnUImiJ0VmYde3hit2SURXQLyO95AxknBImTINQMK0Y34V92M6xslza8VMWS+PHhCjKBj8rcphwek0wmdKhMWGpAhZSAbmmkj9h8vZICKASZjWYDkMxuQaQpHQvTiguVC0+TTZm9Lt1IBMiWsBayryT/XEk88qE2DYqxg2Ib46rBDTJrQFUyY0hJyi3hoBwcpqUf2FJe1NhWrpxGiVkcAawLHmzJMfGZHdNuJh6kfj+PyuoS6deLkFdPL3Hh8Uq7+8Z/k8JZecPKhCfNhKyu5aMGgnTVjZdsiiXTVe6syTmieSGlES6kYJ1FigYylctizwajVGhxspWSfC9slUS0geNUNy8MJpv+DqmCgZ+9cJ5b9dcWRl520CAeASIj6BhQEIRgb+4pDkly+2eB6ZL0y1TLFCdscEtH3/TD978/o8ffViGQSU8deNd+z7z5q9e847dmEWV8A9/8+m/ev9NP7zpAySgXBsbfPNzNx36i0N/+/FPk7BH8j3DFevldbciDZ+XCa2NRfdaAMbj2RxE6YTTYW766J/Cydxm059DrgaqKJl8JiSwWH+qLYDosLX9FbVxl92Wl+buJDLu926RDJ7dzrLRzB4QT7UXFpiApQrR+vLggT8VuMgRwxD1ub+0YEp3pRyJe9XZ5icpG+9J1lmXtNjzMV5gczcCP0nFzbUE14YNNknZrytBNbZNNHu6vDDZTh5SjOtrEN4wAejm0nhObpzrh+U/pRwmJaBTY8WR2vFjteOjw2PBqg6RtUE0KlUjOzPZx9HrOXh33CNjF/MJCry1Rm5p7ZeJUtZT8UNbeA1i+ZhjO8UkKpGwY8oDIhmtlkg704mzuNfGYRQV2be1M+PLhXlJIqHTOsWLLGezTX23ZSI9RA2yDZOWV8VXn6x7bREsRpOrAknw3RAAIedrq1osmexRKJWO+QLAv9jqRBF7VAKRuxsSE6/uZXsEYrB2abfKgkOh21sChEaCchCwu3Epi022DAWBtDA9TaGKaOK3ozKqbGcpJ20tisP329xbyyJDr+vZTFsSOjW6HDQ+XOzuJBpp+Fc0LtUs6ad4hfcObLlk0Lfsp1ejzNC2NoLp0aoWReM9hGZXsfVqNKDgaKSzkVqOZskwA8myF3a90brFI+GhE22nb9+NZjs4pjd3NdtJo+OP64c1giVFZXPa+FSNocZJoiyj6OqOhlH6GJhu/XVq4Qr8PvQ1w0/kqGuI+eRP13hDALdcKOUcqBPeRnbSl+1B1taWhpdLLTSZYsGHp/nGNBzkL1gerSuP9JPnE4xRxKSQOKUgRIdUjmvrARGyauPaPa4CNnoPXCKoylRkwvKQlTkOUyeXqq7EP/Kg+CRXVTfnVRHluKNXa8rJXm2vvvAI7U8mwd4ei3Y37U+VSYJfID/LezX8QuNGlgd5r6PT/q+sY+2MnZT9QulSj93BTolFMPt1tJWilwnnWf0lwpAdbfX3zuZe/rtoe/Z5+Rl2s2tQb2ZfV1y0lBsiotZShvWvqp8wqYYzeF9CT7jp9yFqT27a/WkfSpRSttm30A9FzRHuqi+DjO9fUDbJkZn5sZtxCiAh+3iTmZ9W0Qv0yITaQ6+IEzqnXuKTeFNEBIupja+YfT9xDLDQGYGxp7XN/J10Peuz6Q7HymWKG+sTPXNyfZ5HVKvm5eEh9axm5fKQEV/ihAT4ZPeRnRtudXuIwdeSn7Bt4R5cOuMFaTotF8cF5lPFn0zXs3O170EvfHnR3EZABpYxRWigFg9My1DRmvyriXJrc6hV4naRgr1JqXY3XcCr2nIMQaXehPSUnIir7GQyRIB6CyRZO/E0BVo0oI7tE2K3EzZU2erZioJc25oaC1TAVCWoV+/UbqBEPFIkIMptA6wFVJ73Cu0CtE+octeeqLb3CBU4no/XDTcTtp0g3xt4iOBvkOZFwYwtudHbQbkDGM4pGKfhm5sCyBg+8QmhaKqjbiLKTXI7elVD+0Jwq+ETh9SV3XhsSCxSwjqZSQK7WUrBiR09CfVDpGidVC3xQLXneVp0T+Bp4b1uIFQltI+6WgQAubYhDCyvWrT6PNrv6QOWzandnCGcwQPNloB9UJJ8A0tZIVFL54WSB8VeAP64J/cCMI7UH0gbDRoptXE4RTj0wZAblPnGGY5UTbODdq7qaFXn1/ZYhGxVXSV/1LbHNhMFAUx4W5do0ArsOXQEsDuGofTRoYQHrkTyhasE1tU9y/wS1gB4rxK7kfTlS4BoySxRfvR2raIj3h8CkQdwxc+nfURyenAh5adAoPDjvRWswwDbPYBHduitEKRdwCPcMUtvBbVJDVdb0mJQQH1Og4yH/hUV7UXpnFCCVe2coG1gQsByJtIC+3yFc4LcFMI5wUT6TOjvm2hN7F5mxE81yTHEas4JzGnlqst4KQ+ZZmrOCYr9q5lasX/NyNYsJQDNIJU4QM+dWVSMzYzjfHAqYt2LZtDMz6BSmDll0CQObsQFmAKhEXMKTgukL2VeP3WAdv42PHT2/pf+5JVYCJfkk9dhiwVXfh0ACL7yTWifmPxX5JP7ZrRMnTpo/FvOgWhdNWhdaQ676Sv7K6+6arBbgDlenJ96Zf/UmyQwKoxQ5/zVW2/bd+0AzC7KmXzJlTOnyVvnSqDCy3nRJIUCpcMqIi2JYfDMgq1dg961u666MuWZH5/dErLjQWUC1cjMSlFCLLkqP20X1YWf8qp82S7AK+gurspX7ppZkbwdCAroaM+npDUdZ3VHfV7qYIERfiRGYIyy8HbQVFIx+CTfhmXDZSK5D6wuvRISXF9TevIQWCM1SQX/X54vD54gWNkTeH9TzOJM84sNjq/Ny+VkBFraC4BvZPaaTjdWk2451HH0cPeQhK4+o10qinj+/eJqWbQAsvDhV1a8CxgJVlREDqCu9LWRciT4iSy8pDUimF7+tMo7gfBkivvpOdqOC6LpWF3NRvCcUvc11cRLYan2aTr3qtQgO8I2eF45jo7CQpIW88kczjHj7FHkjPJcyK0tQPMx9cCiXhv4IPDNLUGbhbqqHLihrSpn5JXlbbhAxq5+TOJ8yPBhze7IXKrtKA1KOMgYo2ZqDhoEoR80pC6yqw9eLW7cCW0gIsKRpc/Fe7mUDOnKevFFsgmrH8mjZ/xWBhLHe0ErkbJqlsXwV+wUbluk1nG9Ump1fRCee9F1sGWYql0KyOrCqvJCJ22w3KHtyhW4eDYeMWEgkDBH3bWoNR0Gxjy0Kw4jDijPcakFKZNYKiPzZNFn6lmjvVd/SrjC6aVty6iCUC8P1CUaIwTIJLdmMmQZBm0dAgGkZgnwLXsYvszebqF66M2Mj5jESJpiyz+xdfHYWKvdbnpP2X+pjG2NlxrFEMYlW0TYBCC7vt5MBnx+Gcb1h8qSy9JOwwb7fq6CAs/rTRb/wNvR3hff0a+V8JM7CX4s+oSccuVSGyjQWG4cNEWMXbmi1TUvz9nAtIrWzuJLTx70FpSH+4sEK0EPZ5iyMayxDZdxOmeLHLKx1qzmZgGW4A6RXaGl1943RhuQ5L1mcbjMdQVSMw+WpkPgjrIcYHtXmRYXuUJ5LR4ph8SobTOLZI+u0lZcztvux/OdPxesVi/MF20VVKc0M4Y1UovpyzpggohHN43vBPd/6Z/JAp2WI28J+9Cg808iyfNetT5ACJu49vRe7u/x+u9hp31O8bB+DjaLd3yf30+2s0umuzanuDXSXv+xv+fauuLOo/wQTezwP/B7eyu7BK2a7kXJr5oURz6/SF/8ru8swrizeTuHrPOkv/uo09/3rsmtxeLN23Xh0S9z/J5Vmzl89+Mc/uWk7/+zD05tLT7x8HO5yUqQo9du3DwdZpvtv1m0Li+6O4ifx3+HGntBvvq7nejaJNbbNh2s7T4TrBnaznDOjHcTMz/h3mR3Epi3xfwqvQvCAtgf2XjDptoNm2pXNlUH1+vZprrpfEyX0tboLpQYuoufl007/jaiTGV55YXxmPZrW8sejhaEEYbZ1GBLtm0123Jz6+J2u9VQD65Sq7Lq6lij02y1AZYt8bz6plfhnVP8UMZqqqsIiFW6myNXa/xzebn+mC+v1+XvlZf5mqOXD7oxHymvMwjXF18WBmmJQ+XtvLxYghlPUCL0LRoXUvCMZpEph3iYK0q57FoOmlf6LjYQ6TItKrOzlHPJ7Mzh0OwcfRizM8bxDgWNQvFZ1cItzxbS3U76U2uW8DQTBjp7E+Taw0JQNNE666qOVNMH0feuX9vgSzyPY/l85s/L1w8FveexJs08L3bJ2qcpcLl0JLIaspCHh+n54WHKHKSfO4nHod/9CrPJr2z//GwqfVNNGXegGT6q+5rCRiM7IPjws5E1z56rjH7xwSp4usR8RDt+L2ap42e9IqvLaRVwtVYvBaaDM1bTDSLGDDBHnItmiMUuj9Y1dK/nFXf+0f2NmReUtdQEKddRbLJI7RvaV/DzNOH8GvnqDe11CvMfygbcSIkBjUhoAYsld0P7Yn5YSNfzQ0RzBe1fFtpuSWVIYw1Jaa/iZ8WG9kbB6ZNZJxTk+bhFN4bVhvYl/CC5qSy4r0pih4NICofcZnR+ke8u4wdsyvkanxLQ1wu5vJZpTV+p/3xJK3KkhMk0XzPLf0gdkl1Y1PIVPp8aNOdmCSc0MTtozfVPV72eb9J5o57YnueZ7xPmBw9z8en7HJ0Czz19dnDGXD+PpxCcsP/Y5NvNl/ouJCPfNzk7ePZcfybuM3d9cw7hABFp6exgw1y/7ytytNSFidn+2OzgRXPB2LQq/5lZcaLNzpyVs+INds9em58+S0fr53k+o9NZusFK7hosmus/QyiO2cHGuf5asjtldrBkrv/MuAkXRnyPB6vn+s/Kn0GDUPi1c/1nx0U41pSwbM5cnytmB+Nz/XVArMm1Odc/I24CK60cenP951BJXnPaXP+5LtC6Wfoe3rGzg1+YMxormx0sn5M+TbetmWOv6BwyGpEsz5qzuN+MRNEH8u72nAiV2Bo6cYWa0Xm3ZiW3SrSMKyKuJNMVetEaHuQtZw0WV68QZ/vy2cFz52SFK18Bg7BeKfZDn5+Wv8Bytb6WU2Zn1uQvkAz3gjSm87X5s/Nnxd2Cy/nleXuWQZwj8Z4eV9r5s/K1vvLMWYbzGewadfKcWQY18aV8MjPLWH4u7fuceGY5GT8zf0acnJrP5H3fNj3LQH1uvs4nZ8zOyEQwOfm9brOtiehIJ3ACUr5Jb6yljx4uaISsVpLXBfJDI28L1EXSwH4cuxAAcNPTyi+LO0WV0+Em05ukp+WHF2kiPsEfUTp6lkCh3sTUZFxbXOUl5JKWfJ0rP+fl58XoHnvYhZ7n6sjzOh99Xjb69DwS1/znpeOtP6/zeJ76+Xlz2cfz8FvNf56rI8/rPJ4nJz8vXUx6/tTjn+fqyPM6j+fJyc+LfD89f+bxz3N15Hmdx/Pk5OeN5ojnDyMizs+AyyMZ6DwyICtnICDSiQsg9X79eZ2PFsC74hN+QNnb6s/rfPQDCpyXnl95/PNcHXle57UGLMZ/vEc4r765r0lVUnZwOTUyIEy0ajLwKwd3P/rUU/fgIYIGB+66gDMab3Hl4Aex59Slg+mSiVguGbn0YLoEOQVr+silQ+nSOtOyV5eaXDocFIOODpD9OXxnDYZfto+qGRKF1E0QbyequtnVCCqWkzvavL21hwTSRHj/fxUqLCAMhQrLGAgVFi5eFbLFxpAthkKFBQWECssaF4dssT5ki17IFkOhwjLG8ULFwatmnidxgm+plTd/2izrZt7T+qvZmYWJtYLFr1p/V86y4OLKPpt32DPPMtHWFk9WvkVaNlihn64tG6tLvmQ2b/JMrMReS72Snq4IJ+yy81NnWcXyRVq5taiWS6qnZK2ep2tv5wvTFE3L+IyiZXqh9oSsNdGL1XGrKqvccFWVCXS4qk7nq+ur6mlizaxWVVYlr6pa0X/cVfVU4WR+9Kq64vhVFWQrzT5vVV1eX1VRjCy8qk7zyRZYVZEmTr6qrmLtPHbP/UlnNbK2Pk9r68kW1RmW1af/6EX16SHy5H2JDbVF9ZT6oroC2cgLdJ4fv6iKSbwUbhFRTyjcIvhauEVQtXCLkCvhFhlXwi0yroRbBFQLtwi5Fm4RciXcIuP+aOEW6fn/SrhFGvhgr7lc0sCBCjCDgFvnOkh+pj7OxXWwLtQ3da6DNeI6ODuOsckJSWnOBLlDvdAkCZ1N3g2hRxJVvgDTiugvU+QR4sXTx7I323Ipgs7iA/iWFsvlqNVM3lXJX0sOVmSC7CGQS3hYYba0qAItwXgJISVX0gBsFUdraYdJwxG+eGyYJj3YERrxkPAs+3GuYhgErId7e9kn7Q+Pa/wSefdzWabG5KpLKu4KxUFSpaCM1JtJXSovYPlpVamPTeHEqKukDvkBjpB6inIitbQCU0hSpSC7ntTScO5iHuDj7tdcx/F+jg+pHfeBmVhR2myJSA43fEkhQT4rS1yNqBNEKUW2tF1ZBHkhS44rX64PRGSa4WuLR4AHBUbVrxVJ6H4cFVSVKpy5vkgiKLVpj4aqzuhMhOXXREU1yXkVwfl1tioQSxRICPrDclq8S99cJTo6taXARaloZYXeAx5l2GQES68M5tSFs5Emcvmm5aKRUjEVpKPF+fL6nYfQxVISpqBiP7n0Mm3NVlY1OrWqzYr6U0d5SoUWTaamzPCBZ7OPy5+U53HKN6RLL62KeYizrDp7kLMl9Uz3TzJMBUnpZX9tx3Tww4KZWPGqdyT3Q5l6Im08+02rSLEY1LzT/SPrwxEeFS4nu44VRn9ETRI+6eECSNfjmyKC2FPqAf0yrJFWrHwdn++UfkBm+Mmvd5tP865BSm7miWZxnt1hklv6lmJTogQI0m3UGZxJn4EkcvnMait3zdCqJ2SkCapk/4EwAedtPYaTAY/9i+6SqtpnJq9dhV4QpBaLzbrW3ZIn+L21ifcTv5+TZw+/j0hS4Rd5Y0q/hyVv8Iskg05mXetBUWTw+yVpQPh9QEoOfm+U6MHvHU27fQNBsN93C+EGx28QbxJy+EVEEQfXcmOuaP7ua/NTdzCwOZx4bX7KDiw0BMNz+uIdzDQTTl+yAyMQfAnTr82X7sCyAzbft0zuQHLhkFsW7RAJum8Z28FcA/Zp2Wvz8R1GKgFx4u4VO/qQO3Rfu4PpxQ/tYO7gXfHIivyU9Ii9Ddj0O9+pHX0GE7d0dyAPccgt0ztEDe88KZk8E3Tn0/RaXsC9y3ZAGLjE93Z30GCnod44zVd6VNbp2Q6ED6pEHj+j7JglylqQHXe6+lGL3g4a9Wn5Gp9M7ACOSEV5kNdggq2KqTx40I0SBZ3YIS4ySe3LgygDxzemD63xkDqw1gKtNVwEb7Jz+Fb8ZufwDfnFX4u4sp0cYoMH9IvNAT4ZQLL0ev1ChCDYkOYeVlG0dVCj6hdfFdZnxsE59CkZbc+hr/E7eQ59jQkCr1Mp2e11muCFCeYUXVrTnNam7FMlrf6YXWHd+9ZE51NHNwxKg8TPxO0M4aJ9YT7NH3m7cZ6tE0fJFns140Om3Yro1o2OW1mM7Sw2bWMzsBKpf2u+epuNOiKdiMymivPkqsiR8IgungYSd2+ZWYlOlP/kmCsgTDBOHOs2JzW+1+OfoeEtvti1peK/Ugkn92ApLWX00Y9ceVjn5Upqe3QYXKTLX8BdTV5cugOTmbj0M0jw/KARQevRSIfDMUYduxwnD2JmhTGZD+R7LNabcDNOl+xobJdjFLIXqukoRXKo1KRsDFYqt/PUZLceA09kx24mnpabCepksIb6xCVTDY5NUdfkBG0mXZmdBLgZv2D1Oa0pZ8Xny8flMGO81PKprtPOlqNW1CjRxMSzqg7FpOhmXdDTqoavSXEvj9F+Vw6Jds3s8xllZ7PHMHvAfJE+gNBkZGLnXlNw6yfcSMiPjZ8dGumClNXe9S357iaPNTOqhNNkQj2e1YDIXkWU1LUWy9w627QxMshmWew5DCyhUdz45YbMDjgF0RGzO/zOVX0hnXW0RrYqqbZRihOhwpG35Hv0dn27zlarmIBWJn/P8kVn8ntmfKXPdX6r2NPfogfi9LJizW8Vj0ZKo1hzWZ+cJfudKTTDTc9QuowPflVLJ5gahicYFn682jAiW8Xdt/1xo/j6muKRh/5EvxljnzplhjNwsDzsHPb8LKtOT01Vnwozx09aJ5bikTodV43qpB1upTYLpqbWS39EU3uUhVFBOPL1ynG9TBO9yfeW+kAB0UkR1LjcAQBbNG3YelLFkxoyP6lpX3BuHHtfsJF75InMhFbe433Bi+PY+wIBg+VCqY3BZo7hW+s3g267K1QLcydk2hxCByaf9eCP6kbMpOzzkofuEjaueAJkTtB+d4t7nXI1fghliqgjusXraynigO8mqmGJNd1gik3B1iJFwSK7iRPVKVS+8d3WhgYxAtwQ+9l2gYHsFm8yWZX8iUUHclSIoW0vbBisMFact43JdvsLGw+pkqlqIqXoqWpaTtpiQqrXToTiyGDiCWe8Zje6BUhDLyGCcLN1CW0S9zPuIydKjJKunqkbLpq1yjzYpVLmeki8EZBy8CHAJOh9aEnWNX5bEymV+abszLSL87mpYimh7ZzyHoJqBat7V5xt/IU6vkr5kFOIOl+1+0edQuj3KuVOp/yvYYpa+U3sa4mi7+MHoXB/r+TdnLEpt4jiI1aLUrg3EFXAT0BFAhvKrSqpdLZ8CHcZvFii0qrjVxDK9adbfMycX3Idrx6/FSaTA4Lvs0+NR5Di7GqMPE1vXa6Pq8HP2fO58+fl1C5+eFobwh4TiCmzJjE45DwTH6b1wsZ5dH+/NPifuomGo5tkcO0ZpEuno4gdED2KiAEFnomREcI3fc3CN71UtqfJ3++GW8sNK0qQOPc3i7HsNyL+kdT12W+wQQCF8ZT8nfmD4lNoDDFrsaU2vj8e0yfVjGZsSehFEeEEGuiZZUv5+SYxxEtGULTSVnaNhPJ9SH2loZIoN4sr9DeMYOXhweHhncPDI8PDx4aHR4eHx6pDAdgOI3nr9wC/xTEINRylil8V6BC/SPjF/mUy/pIL6zjCVXEn57r/Qc6R4IvHloY/ALBkaMtc+iwBGqIt2rKYi+PrFy3KQb8V92Y3aHjK8p29XBJFcXCpOlk0RbP4F5nEL0fAu3RLihFQvkE5jGU7omEbv+w2r+cqBgwErDJrNelo1qt2Fqv+80kz3+lPom8+WvgyH+4FgE8F/IAVJam8xxqXFscIdbeFI5PYea6+2uAWlzYVZ7S0USS95/yyOs50gQz5yiZHCH8UjZcolYKsUOZThOmn4ysWC7GqOBWnwxJCoBAqiDO0p5RHZ3sgYIA8CBo8nd1sOgawWmmQRXZqE/z/IrND3CLlgW8R2wW3AGIiO18+JkKMEgupSnMZHuI4l+on+c9YJKaXpBaA0Fhrf2C9YvFMveh2N+8Kjc239UCnTwgUdQMyRcQ7MLycgj4rWWCC7lvhW+/54Qf/5WMfeey/H6zCcApO7ni5Dtx5/PXEVz544J6vzb71rx68+TPVFUGYg7VfoT2PfzI50i7wpACKEQZXgXOPfzIBhhd4UiBFPXP8FSEbDV8DPm87iZDk2IDl9+fQv3KoKYlqFVgkLjgoW80/siQCBi0rt6CArAPSrc6FXNc5+QnQGOGLk8v/PL56R7pL8QwUxa88VwiEdM7mL47RIDq70j9S1hwhvocU5bIMJefQjh5Op0ZExzlM2nQgkL4R5nihlgXbGOTrgZMXSKoEbApAv9AjIEAX/v7id17wgtxK5Ohib155fdq/qmTYn0iOmwGE1FepnDEd/C/5wapKPnFkBwiB9aQ+mto6ebHSSerllTrvlf3majkf6AGrIsIvGap2tRBh1SKooWhoXsEyo1tGapD78VfqAo2oCI9bbluwl1Y09IuoY1I9LtAaAoc6CgMM6DLyBa7TzNBCjofOneLK/YEdfy0oAXoDCioy/NC5q3KJOl/Fp99wQXr2Rgb9mpDpW7KH7PCJ7ZOJ4SPdcmLYU00MRgqTefJaGYmSEDQPyQdF+P3hHTGjDB9MyH4/SAAO9aLArCcHcLl1o9XWZ9ckINDsvPw06wxfM3Q/H3nNMIxF6QVi/L19kKv4iwK6q5HKgeUvrkHroebRGtEHNHWIL2BeSTQXDQtYlURT0LCAQ/aBkQKSV1nA5IzhoACad9J30idPcwufzCVVa5XBFwX/V8iBurM84ztcq0vfeE0fKGkx4yafkFSFqqwR3ibVoCqqCWSqGtSKmiYqNGEqqgmy3LEiMoM8Bex+XsUlVL+LFi4nJztbp6okVwj7M2h0p9owhF2bMi4LMwHaawVD0F63qkNVWiaTYR2qwsYcG272IwV001RTyLCACYZeL2ACnBPeb9jWYLhdOrmGyERm56RUpOrlo+2iCSXeGkO4/tZAcddeGrz2YVerZzMc284Om/rG8BtlvH5A49XhIY4GfVIEb0jRVx3KIRPNmUzWyO2ySsslNMZSzd9mSPMwJuKLKvq+iRtIGCWqGHVDiuGgzKqw/lox6kH8y/hA1Q0CpNWz1AyiLKsgKRrU8n2qEjQn6JHqpXSJOi1F3Q8qhpzuHsZsSiUoH7eTlPkT6GRI7dcFaQFfwN9Y/iPpm9sbzwQUEUbAsS1TGCH503DVIWIYil6+Lou4RFqOdM2hiDS3mZECcgRHtqGHY9W/LuISaeKZFn3EdIoGlAY/gSEWJiDgScWoxRsn8UNMJvIJe0cpPnk11UVIlqGEUFImKAtCWyiLlMeE8ohov4tSVPdqMAf9RfTYoUCkPAh9UctjXHlE3y15LdKsFfT/x9NcKA/CYtTyELWE1i3LG8HAUPb/YH+oZKZSOlAenVoe4mOovC3m8TGwJ6uc0UoyBln1a3coPOPwDH7b2pn0tAw0u4LbsC1uCcasltS05GLI1vLsvbAXT4bpwxOt3u6e5e1kirINKims5H6L8q0z5I5fJ0FN6ir0sufGMcw3UlfZVZcBfBvmnfHbgF041ivKZoxN2hRYO2wdKUh4bsRN6Fci/op9TuKHkWZbarmNDYYn2lcWef8AnNPF83U2eOJbhw5987Pv/caj4lWRPV6JH/3QrffedueXPvgLROaWtV9pf/G313znWz+c+94RbsRif7EW2s5VWALYXrFNXzwzbQo56Uj0Y2wTGpXBQ3/xxT/6H39yy1cG8GjsGpw+N3j9W2+//fpPfv0d7959FZYYd5bR2wgJM+82ib2OVVi/bfq426CDiSB/9duWHHcbk4FIzmIDhZElag0QVe2T6hs1tPoQ428ze9xGjDU5wQ6ZjWQ1UXxObTHNvW8P7/P5EGBvGe80bkvd9PSLtRNmGhp85qGvfOy7f/0H33r2Lm3FHfJ3atCd09HFuGc25xym+xI8Xafi8DLCbCzjcEmtLvMqMls/Gbzr/Z/41rUf/Z03PNm4Egebn+Ch7Cd56JSf4CGAvoPmrhQCgH38TKjVZIaSjlXMVmgBZRaY3hWG00xIGjOee30zF2QQNTrY4onLILjP6pGUekHIXMrzIG93zu3IGXU1Of8cOc/La+Vc/V1P/OPXvvv2f3r7LaeqmCIijZxKOo+8HdYLu+SJ3AJS8GFHcH6T8/p52SUHM4Svma29izXkZ1hDZofvVFKuJE0ZImRw6GbUbofDa0e8DVLwRexncTckgjPzGqBCZ/yb832o5SPdM5tNhWGFOzDemgwPq/2QcIYXaESybSooLv6DnEjZO8gbDnwqcOIHTGQGj132P32EsU2OLFg5xoceo8ND1LZ1j1EUz/YYldMaOl5zOOiVE4qjC6aBJCICKU6FX4w+BR9DEqVrSvqUtvQpZIzRik1YPCesC1E4CbSbIt5m97n85jZeFPeI6FgsOh3UPPgCmycbYdWxek3xgPaHByHnaZ3VOIQfotAN3CW3qcPYjpNz2j6wOlNCr/h+wm47uwOkKgi7Mkfci5s5iLIKCyTepCmusgWl5RTIV8B+PS0jei9bJapD+dq4NsPGdcq+yaEL7vDw2KJ62x5Vw6nGqbJ8NR0dJdBHfLMys/IeSlVW6hhU436ocuB1WA4+Q5nwoBMoWdUOaBAl3HGGt+40zrGKL6Pa3h/UAx4Z3OV7hn9QmysasWx6SZMfMq3MYlVC4ICrmK4xEwTmzZrUwKkEV3+reCiRgTxemWnskmg13rcjzUCb1hmNv25pAhdQTaSLijg9vQFvC4WLtZCth2Wi9fLGCZjWYD3ZPylx4NFxmJdS3O8FrFfwI8tOdXYcr5OdakFblmN6J1sWdqoFbVnMkZUtC2FCtizAa4qRTld9nawOdCpbdsT0jrniiFdrk1GgX9+ebPA8f6BnIwu8opr9ElO7ULyG8MKPbLOHjUbxfPmoI59ypeI2j5d2atzmiD7zuc2jnNaTpocU23fIbW4r1od7cJvbBAO3OcEDDssEk7jNGQ8Vt7nEtsimU+M2Zw4LbnMKBDgZHnMamcAkzlA2Gli4OC72GDnVKW6Ku5vZH8ko1cp+UTYnrmmi00yZeNHbkROU5S7+kBGdNgBpIf1xL4xZIAeFY8KY1Qr7C2hAq6IJylNZ+EADGrdF3J6h1c9zHka4YZrsLzegGqLEHVUZA5aG1tB0KIPIMAMp7quzY7KxF/uIuVymEAVYLV5Leb1T3lbFZfYLDUOUnw/HexB8j3JcvCcCLKge8+1TFEt4L+yNGsFig2lidDyP9vhdVedk5qc7hXxjJNyhX3r+AfWyYTySmvVJVPGTP9DG2MFI9oyVwUjEvxKDzIFDXqxB9ktxvEmD7HwT0JeDzOnnapC9Io43apBdlOjYQZI5JNAFWrXguDexF0QyMjI5evfgifuOvaPkbksc/4O/ffK6r97ziX+61w5WBJ0g6T2Hn/jKfYnRzVHmSfvC7O///ZMPveX1X0iPwjgx+O63Hz/2gUT0pjSshYNbjn7x8du/c/enzk3x8kn69J9/+IOHE/1bijcPkxxjgQhT/mUHddugd93sYN/vff+tT33uib3faiAe3ACKRSuHgy44Vq84ranKQGytR0xYLFZ+m2P12fxn82oJvTTNeofTkLVf9gvHEct4bVvxlsRCL8Z3X1hn8q36C8QZpD03WiW+6K/dlr05gqfILdWinANBaDt1RD6Myf73lNnu5SPh3IBnNzJ5ADvOTZkr5lPr/XrOVcuzMlFFZJqPj5YCJzC9wRxMJJTI0h448UWxJumjpqfYSu7mRQ5BrdDiFWqU7+uUPbWUB51CsO0qRcNuXHjWKuWoU1IgfKdoMFbB8lOw8vZRrPiAHR10IV05wik4wY5DbcshRC0LzLgEeKZNh2PwCOZJy0Q4G/lKOOpOBOSJ4anAO4oVo21LGSxI/HUp/kKKEORMoWtikjunpU+vEXlUd8peGCOR0rIzMtvSWPC/uqX9gRxbR3M4IyV6Tk89p+w2OMYPu41TXLsACv0Y3SYhRxqTd3dbnd0dE5MkijLT6OOJL1TJFYGJOqcl0LtNdMBq1HnF+W25hHDoMI4Fl5QETWDx0mGlFOlFykNUXz70ANHGQP+UgkwYlGXaliZusoqDTJtLHwWNlAmoAiDGTHcFi4acwlhp9AGAl2jZCshAaQ7MvqalRY5e4uqSFkBuWL5eEhnGLfKukpRM9XSfjBvj4TAEXQqLmmhCR3yDDFYUO5kvHuNizc/HCEQRmPninvbIxSPpIl+Qv/tGLz6WLjIJiTJteFE+QjC/iAMNJIBZ0Ijro98DLUFmccVpyYDu0vi+G0YLbPSjSoN5dOSVhleqJBCojVwwflKlIALsqPNTugDVZm+kgEJgSkeZfVjzgxni4lAAizY8YeZaCErmQBoIKPiEp03xiyVWOX/IcPdydlAHKiWmVXmOmaXRl/wRzesn0qz0dn1ni2vuDpGXXB2DzlJe5hmRbIKFj7xxelQXbeNU5URROSot3MQaQDG4oPKTaI9IlzHIDN2h9MKqqdUw66+UerpTtZnSNpImvVQ9bRNptNNI2vmkISVVzWqlB2kXeVF+izCE8qWU19d4azzFBJgoHTyYruoOHgQ5A+pZOm8wlPOIf1Z38Fiu9To5gWQKtSgnEMmnrYzeKIA5081XdaQYkBORiJBpMpwAxSN7eZVPsdMOwvz2MJwHJrK71zC8lA3PenbMPih0jl5ih8qUjWJYNbPzqkiC+UggQV2NQIJkMIz7x8vijlrqSQIJ1qITVoEEFZ/yuAyxsp4kkKCEbJbR7CbYX+MZsG6cuJ6yu96QXGDckJqUE8CfoavKawOVbmFIjjNyUXpsj3ia2adV3b0mS/kS/ixlFIw3OuWRWspbnPKNYUpE4bR24mC4ZnwuXfyB4Gtsw3nPA9HcOXavA3L2Gn6AG0z6yieI5lZUmuxmY9CGn1oSsW9gP5tXPgpTicVFX4q5siPR10BSCgQcLLZ6xmLSjWoJrgBLeUoYujHk5S+rs2ZjFtC3pBCg+216rlwZkvPFgYmkZ7m62xqLRe1ILGoRlQhWntFFpFzhyrXkTveitqcatmLqZZxp2ohZp1r7vDL8ZEvfyMvs58QsJ22Ipiy9lM7oAoiWcv4yJuZARQDUveLyWWAZQ41eLmO6b2QZA/HihWVkVTBmfmSNq7ur/vTXOK0SWuNOtHxp2ZKi0qXxfdePFtjOAbHGTY288qe0vqmAWt+k0iiXMQWWLJcx011qGRuuWzYsJPLTnr+evqpWH6lF4nuylFgcdM+xkc1LkZaT9IGswon+ZuXbcJmav0KNLbQ6dcrVqVetTPSR41amdawkWE1GVpyfcLUKRb1Xq+HKdMQr06Njza4xjaxLsadka9bvavqXaEsrsZ4g1DOJLorE2EjHJEO4NtaT8JNy0DvUIGk9qa0ozshZCpjvFSVeY2VAyugGJryGVxRhBVFbOBSWmJu9G1UoV68oDhcZ87xfJ4y+HSXKVHEez3TLFUWZ8d6gIY4VxZnicJAyhILpuAwV2r1KrWUY1ed9Pa0gClSmCnOYQmzGOjE+gDgEk6z3qKBjEXZwadHSAqpZxjj1QzcX+yYHaMS0aSZyhSGWTl67Iva+mcL0Oe6Vwol48+AdE05S9qhghuUAGiH7m3bkI1E2rAqUfVbB1Ca8SFFizhyIy+2vCT2FsjXecbsSUjxbxRpRPNtHpAYk1g87MK+EUXn15FRPfRbeNams3RQogJvVF92vlRbV7nn+6CxOxP1MF7EV6t/m1Qo3KUVO3Bg4evkue7mvhIT4AqbUEmVSFQxXHr+4OhkCXJFWDUM+yaeTLn7tMvjSumVMjhMLX5XnLIKVPGcXEr7OLYUvIe21eZfV72V9R+QWGNnuHOKcFat0cXr2s47W69Wgk5kw/fsOKv62SiProLUSUyp9LJ6qThEda5nigEfFF2opmpnGiq/UUsTRMFY8OkxhyW3swcGYsDk6/CyHHpZigDur8SBdSJGMxoo5+/iFaTyK9GanULAqRZF8XPiy2ApIiS7BzpOv2tC4WnWT/trlGC71TqGsQ99cp4Tdv/K+3OTVwiHHEYGHVuM8+x2HuxYJNPuQe+3LWBy+L0JlWdAVJXpEFIb2/xD80d5bi6WYWIoTFinkISKXp9+7HXbpZnGHg8Io9UBzqQLShAqm4yhcHznZLXL4Kb5528lukXKn+N2T3WI9+SF6oqbbCQmhU9UueqraWRPgrTxKFm4ZCqUOj1NpIsuj8k7QIHEnTscEMYBIT6YvDQT5dPaCXVuWnbtb/SUvEXm2VSlYyyHftk1QjqsPihFNtniHMQBbI64zM3Modg/W96WLBFy38nGcrOT4grOWA0xlmiO8VdBlMW4zj9n1q5m9TwPurVr1+MNtluFa2b8PhHCxl5X7V3MXWxPcISvhOdjLwU4mI9cD3Ah5KXgtNcqe6dVTdcg+qk0FKpSL+8sGG/chLGmK43wTBuU6ASWzENiPwTgwD7FyLhu8kGAX9RsOxg0d33A+N5w774Y74waYN08R8+bINVwZPMejgjoAP3p2ijwLsifNO05VnxmtIwJxN0t2NVPd4L5rvnL157/wtv99z27BicSmvQzkx024p+3eIdW54GC7f2Ub7yxf9VTjFdutHubOd93w5j/8xJ8/fMvXGuA4t22PZ+rJr8SUweTuUPuDG+79u4N/89ifPf4fX7mNgFOraRy9lIPlvj67ixwbcMt2sydbq/srzdjZHXz64Pue/NY7P/XlP0g3r/LLYb3YBRYI1i0h/JbluhvFFRZi30TdRceim06FxWIVQJdlAvKADIt7s1CyrxJryPJdcHedCsZmmQBCIFp1w6rUGyY9iHa4C0xRMJdu+zT9QtY16f2i30tll45CXeUfDaXD6vjTOWx1zZewV6bjY0tQmo/1Fqv9JI/G2+h3ewSLgQnd/e6QZKXcwuRirTOLLQ0w2bO8KuoeEyLh4BVBNULy+Zz1Y4JRUJ07xHma+JSgR7MNBNIGAa9Lxg/FrehPJlIoLp87OKvBSulJtnEvbGwSeyRzqzGtYDTMPmAuo5gyW5owbZOs3MDN8vlGYumlaINart6oIJTMSZuYI5gvd+eO8vd6zYTtcg7DqS3NYdVU+bAmuRPcoPWweOIkN/RUJSFN0lrVM8BuaOnshWm/MnTKrs+hPMm5U0f4jKtFIuL4GY1czuQ6WyYJ+6zGJlknRXcb7K+E3yZgahzxHaD+0EwIuQccB+L2kGDU00Ty6mDC7WWvFmtPj++3FsnCbbuOhguliU2o0cahSxExkYPre+Mts6ZO2G/x0DpZ49FLSzqLa9kfxwVHwVQkWKyJ+CzFntpqlmaiZA2z0ZA5wFG9EqLBCyeCJvvBRNcqsqV5rAGOx6Ot9o3jZVRKwaD5zhGKpJSCQPWva/2HPq7Xr4nji/u4ab+KmyRnJDHIF14hUenSOL5IYtAl5sIkau12BopIHZm2X8arZVg//QKTeSpMyW3EkqfRdt52lfgsGejdOOKpvHupHnyqfUE8xv2dnS/3kz0JIcPu27Mg5KgnTJ2XAm1oSqvBULcPuQv1S3Y/9+H5fXzU2VQS7tQKeUTs7Pn+qIKpwwRbPo6LOdtrP/Nie6v7cFMfl3Z2mO6sfJS4FzsBG2rfcK493H24sY8bPAKekQq+ie2Oy/UN/VKOIyKI4qV29cJ5nWZzr+8JfSpJn1yILuznZW9iYTWfBeaJVMTH9UuRjopNyyOE5qmeXccuwXF5z93qcLSbtJzjhabd1Evwc1b3ltnY/NW4p/PIWtzcHfyRIQFTgJJyubuPbRPb/qWEuBVi4VI7s2uAyJTCnzWiQxQ9hFgRpXiaSTGIY4/EHWcKHAJ7q1k42SuYB5X7fIPowkWDoqD4fN0YQvosUgj/UOOQARYHiI9xUDO7kr1oNvgRji5pMnsSXzVGaM3yQDbWK2gx+uvOaMjLYkZICqleGiUEbRHyWKPkpvHmYolnECsLxcD/3nIKE7CaASpZ0qE+SmswEEXCWwqiuMg4QPA/BgJGaGlvVbanPKzX7LeVjUNSmfJUXox+RNs5/kzA3SuujuHzrN215/00B3Ltj012cXeEkC1azFHF0XvAHOiPecjQdcQ00r404gEVj8clellnU/ZBPN/N3NEhd4iBZQEd3ylXPt0ilWCE1glndGulRUiOsz3QHOn1s3+05ZIIOwKU0N8CXx0Yw/JdeccEDbxFmRvRFkgxWlKgmFVbskdkP+Nx51LGshQgv5P9m+AUUf1TFhFXigIbZub7EUul0NxanL6Nni9KafRSDssMO7KsgGafczObSzpo2u4CU/a6S3OCVY4TrFiu36ahZnbhJX1ZFfuL5ao/DoF2vni1upFMl/wAjdQyiiUvSuqqBnZv4XqqYieqJ0u49q/FrXxHxxYr7iiPEpy1+sT6dYQjvcnCPvw8QJfmffatFloaGUQroRYp6C9Nv0B0EtggygDDzjFef2eZZj/1KG2BiMNAcWePsgqyYyLdW6Q2spLHPNlbhSAU5k/8CfqRFXKJiaiLXdsE3lc0Uvnv8a0oz7a+AlhZazGmR02WzbhI7rw1Vz9EZRB4ykSjT+FrRe6usGps/slD+Sm4a4db0MOBYZRGUMGyi1Xb8MMlM3wnt4lgIsk7SVsCr4NUc7Bvyq4wsTPCmTJvXK7NhnT8VdBnv8kld+B4VcXvKbNiElVFnVW5Otefhwhjm4aV2YvNPGNFhZooKq+c1Shog2gqjzoaZrPVmLU2EVlEjZubHFPT2AqsOOlV0/AKRbiKNlGP+/HaRNAGNUePiLTRHBPeeyWcpyqpt6dW4SXM//WG0CQy0gbzH6o3hSPwmnbdXUZjhYMoQuklHrqestbOwnHurcpiCMUz0f7uQrUHy/affHisOa1ZHQE3/L82ylHZrPlm6dB0IXaQBDDXjpYGlU2JtpwqHv82Sw9+iYmg3mSOrMa4rAzeIIprqWQdrvdMM3o7hq19aWTPcwxc4ov0iTSf6NsF11YvClZ3Ke4ukF+McTdIyeDvHfbMwXq3FBsMPZpIEfLRaSDshVIVdoFdyErUWtK24jCbHl8wCJsTtH7BI9/vgJKIkmkudJTpVZ5E+eDSh7IC6h1ik6/6V9KexmcliJsWo/HyLo2b4fegPHJdnyiuvmZv71I9EgP1gqBUZ1OhVaABFxGbU7ZPum3rNlbdjvcFXCDO3g7O48L2Yg8HV0gzJfk/RZdW+yDDOBS0mb0ZKVX5XAtsexQv6GqsJgTTJFqVeJqR66jLbgQsMayN/ko+J4r2ZlH863itXuOv4NjpDpaP9vMPbW+mqY3XsOiBGEI05wiqvC7o09FRmeHFuiJHandLTfYb2ZuktqgCqledSeZFRTJpEBLBwdK1hlq3RX4qsXBGfuPaRBEjinMQKFpo6ctLJj/ZCcagA4DCAqnsYIeHry0hv1prSmAs0nN5iFxfw8huDPjxelmKHWsSPLOhsPbEuPOae2kcELlmL4vtjgKE9KcCxhv8sbj18FKjfkWbASQP2LHhwOCFmZyEMe4GctlEIso85eZbIy+pi/CNTa8TUvjfCXd8VDYnxwaTqVMR4iqILklyNGzyAJZgYYjf2haMGIAzki7Hn5FyCCNqOqYS6BEoh6I46zXC3R0oiy7UCZJpuLQ7+JMJaN0aoumrAa47KrFymwjktCZgqXjwxXcCBtgKkTw8RIdea/jHxJUpQJpqJZpl5NV4M+jv8pEbhofXjzyNfdVP7xMHSjMaUFzPVcQQ+HtLHgB9QfgIgGQLxDR591hz3Iaf3v8vxkk589QZJzHpVIyT1JBOO2ScHF+IcRKEmvfdxwKyGWpw0nTtaC0NlJr23MVjwzTpv48AlhPirLi/JDkUhSUijUG1wcpYY1MsUWnBpjjExVUch87raOSVciEP4YBL9kdZQJJnEjlwkvyT7Lu0RwagJ/W4YAnEpCSLD1GQ2ud1XKbqAb/vL/UAVDFxc+AEFNAnqds5G/I03szZkKfxQYEyhnSICpI5pLsU2mCkfiJSFTUsxwdVV8XqBIMrUk4ZfdrZLzt850koEMGt1igQ20EEc0IeRAktZjIyfmBjqdJAATJPowHwgd77HgFqKuQAq3odB5dCNVrEKtOOh6QBtzdvuadCzJOahmTXl61eKbIPO7x0xaweVn1RsTustlEBUlORIEoDodHsHudMuaA7tWbJzmsyaTFZLGTX90X0OA5xPd+u74vY9UWxcJxd3xfRMzkG9Xy7vi8KfbiQXZ9E2/UdXxsjJL+26zsKuXzPwh0+CCrm2/V9cSG7vi8sZNf3hYXs+r6wkF3fjpZhzLev7Int+vYFtZOz7Pqy4ts7Njyhpatziu368SnNBlXZ9zXj+gP5Y+v6cfCzH8uuX6HOBBMwcCnZ9dtDu74YxW3Xbw/t9XKttV1/NC3s+qNpYdev0vx1Ru36eCbbrn/vWLPpENzy7ZRWd5RAMDaKi8cIJtMZs1z+DenZwqVDc66Uf1pagIq3ijseuNd0SdoXWhkfMaVi6GR7WuJJO3kOb/xROSA9ie+8xVwDR1zJKyhVQ2TMpKC7H+DQkVBbg3bkfOj+yJkwT5o+jnuBY425LN6Ea6bR0TqOEHrK16MUOHkFbk2vOWEFaPuyAgqdXVWAMH6mOBS0C5OGTpyDNgc6WRNXotJr48rZKkFV0+IHw8PHh03xd8PUWgM9Mmyg7gbag4zuU8lVV27BSLRAA1EF+Qro8GyOrqha6DIfiUnvkqr9oiWXc3SxjxQ+TM3PVE0zeFt7soZ8/N6TN6SeR56kC3+1E134EFucn7qEYmehCF8G5WKYTmyZ3sjmoPQRQkJw4IwvhNnb6w+LBn8/W0uB5o2/8C/VhY1/bVsjF0HLsBILL5bhqVu6JVkzz9+7Kto2RIfIp5YCLZ7eNUxRzh8VSZtNCnrBWY0Dwg4+IBKimg+TIhKLOMzCF9J4ZFat98Lw+IVVijD6LlRdCtgHRh8HmFR+yRCAGsLjyTWzNCaYYTt7SUKaym/IIsEQcCgnGWMmDDjcD69cBThExh0FHCIHjgIOkXcrDILQvnjVHC9AgDzE9GrJ4Vb90i3c+ENd71B+gAeavnUNkep2t20OAfgU8oM4m2P/CLRBdKbW+MnpbXCjIldNReB/6vYQbl5xDZJcU3maZvXBSI4lSR9+xJePuo768knmlUbwOG8+UJQsHfL0zN6RuCckaFQP0n1FG1mdywso7GMpXvhZjd+Hoo81PW8/v3k9FH0K/MrhOzn0yn5W493cAFmE3ogNSVEuGrcTiVSX3jGGForz9yisIr83jYFV8kOfwjzTgGLx2VIRbWg4zMCGhqwA5Kbt9fiGButUccy8eMKBlEU86hThQMoU6OLl+TZMUVHAgRyxI5+Y47MztO+9nn28Y/3bga9d3EiHQDOFm5ZJXJx2a6Qh37v6Z7TeOSZCE8QNuywyEca3onw6ouxoetP3lTaGXhUfTQHPJXm80dl+ieHXLt4pSdm9ft4fCRXiGFcOpRXQn00fNW6wU2ZJGZ70q2ImMS7pvae3spBhb0hoEMMx6g5da/t4WZ4Zx3kAvu3nUnfoWqNZ7ew4XiUr1PqY1nDrRjWMNpF/8jPC0A2orsQpCYIguE6JU1LkQkW1s2m3PbMo3KMi9G2C3ZAqaCu8wtCnJvuxYuYLaBMEENRvStZAS8eG3NhIPFnagNF62AaszJfo8vUyMi94GQpntFzFH5zwBjsZiF5QYBeQI2JbDlLnJWrFMmm7kVnGTmoS8ZGN7uxGsaCH7cve4GmasaVYTuXVud3FK7t+skxXxvpkua6M9cmyXRrrafhMvl8NjHFoXlNbmj7RhvvMUQTPalwvGRxYi9241OzlIiTUkD7Fm7yvGJdPb4JgBRxGcEIxksQoQvsgaKv8poZpQFkad6IluCK8Af2W1GHp7GGgfa/6QqrCePEhLYXVmUBcsq37TJZqOWEJH3PFhsbbdbiIJHUofXa6mgzBLKN+gwBcfmF/SWXGrQG4eEZqbbk1ob/C5iabWGKo/uIJsFgVzOpEYC0LISeDalX9710nuUH714BoV5M4qBFtDB1Lt0rSTkNCSzWNy8szYtqW59KIDCdseYVGBNx0Lv9rU5P4yNMxGq9NYoINp27wWRrRZp0xjY55lhD99+7dK+dyDjHysmXQHxyr2WSUV9IqE6ymr06esa3s14XBbGEroL2dhjoVLzqCUbdbuzEUhg0GgwF0k3wwqSi9EIPlYZkk/phPVr5yuiUtEwpgojXkK38NEplit7ggxGLpfIt9AkJpZ0JR7JSrAqDD35Y9XV3fjtxHmcGuV23/D3XnAqzHeZf373au35G0smVLtpTo06nBMrXBASc2tsHZM8SJkwEMYbh0YCYzDYWRTJsjCced2pYcCVsuMFEH0vEwKag0gwO1iUO4GCYNahPASd0QQgCHcYiSOLETDFGbFJSr+/ye///d3e+cY8cJSUvHY529fPvuu7vvvvu/PP/nkY0iCiP/MoJW6rcjWArplA2qPizAN5UmlkXFZ8qiAjcFDwejAoNLdOrMUL4LKILMCz4CFxJKOTBIwW/pggp0opYvMIRMQXtJ806rFw8mF4Ad274ONoZhvx3U2PnrAGPC1Gmr8GLS+V2zi5FkoNhOLsY21gC4GHObu8t7Yx5yPlJfZ1GstxjIDCDS22UCfZ1SRoRb9MZbGJeyQeblI3uTRF7vFs9X+gqJOrB5qFDpZ8X6M9msEIlmdNFoRVrzxOZIlUQweYKAy2J99rfUy5/BqV2s7/ntWJaEdP0g243Dqx+JRax0oQekWQ4oT5xJ9YP8XjvkNavzZCYW2UVc2hT3RAX1z0z1wy8YHEcBROasxshWtixLbOBnhDnk3Ty+GZIq/XfOS3aa+H3rS3YawCS+BlksICYVt1B8XBhqwv661EBBIs2razt5fgR3Tp8L2kENntgsIAm49p8TTpr3WOws+tlzI8XsvHd9cnPcAEePdFWa7vdXrwGYIXkHDuR6NuPwx2kEJlA3CHXqGWX6wa2Qi66PXMw+d8XnUlf2bIvxKQ9HHV7iwQgewcu3qNnmJgMz3M0o6zyvW9ZJJQljCCICa7PxXT8vZAJt/W4DW3YT2E+/PDQs9M82N6x7JTkWmjaJkZ4sIHmumkP1Gm4mcCXInQ5jS3W3Uhg6cr8O3ERcQVekdvcnvX9JZ2OdXxQgsPrExfkm9ut72sWTzSJ/jl+sv3pPj1zMRxL8ODdLN8nJPZ1eJnmr9jCDgc5cBKJd7Nr6xFD+VT/CGEPcRxN03nXZbBr2hpPor3jv6KS5ZoqZ09uzKfp59uubzj3SLJo65Ovj73v0N8Osp3NR9uUTuagM4KlcFNjsIS3WDyxj3Z7++n31luqH/eg1rHgTY4vQkTiDw8mmHMrnMpSFBVBESzOv8CqyykTSYFiJ3me4hZ0UVz4EwIACYNygvFka9Br/ix61M6bW1zvyUqOnjo32k8fdrGGlzZujpX79xoulgw6UcT8EwowG38ootmr2Hj5YD36is1f3oglkKVr8nosVeXoPj68JUWnrI2x9ZO3W02w9vXbrE2x9orNVV6WgI1vPXKy7of/cG13wpTy14WSrL+vpLmnwjJfE3n9cl2TeBU9dDFFh1Johy5RmPXtf9SauOgaVvtqIavSAh8l6xIpClUUJ3vY2YLNImGSyX9ok+6qzDsq0e+IWCOOiPf/PLj/mwuob4/rOjevjFVl3fSNZJGuuj1TcxtfHnn9c16e5SUAQOU6JZxF85xZcEgN3/erHLzXRamFvfPaFZWtKGPQFR84+8hiD6og91TiarMp/ogHFoYln2Zx3AJt++C+7nGP2SlMHudAWQC60BZALTQGk+PRcKKnb7uBeEDe5VjHLuO3M01kRNmBFbIluV4/pW2DzurX2jRvSwAZIq0+MS3PEyiMsVvigLrrF0kHNXRAWMamY7OFq/cY8N7Gh/nvDbsVLFewM9Z6G54EIk/4I7ljvUcqJdiNEBINH/N0jsaJkd1CeLqgkaAepLYfpC9ODw0QqHXIU/eHRYO7wTOFcCYtIRifSiDEJK03bTbcKJ86mYqz69p1lUFJbbBSUE5YjvqVOZpd8utPYkdeOj7VmBeei40Z7C0ejGMZ3Ucmop3ZbtXxGyqMkLJzJJOekIRl5cnJS0b/I0M9WiiTwaxJ35A4arF6m3V0+HKkQxlXpdXR0SJ/1TJ/azUn+LU8mhlWABFoVYt8hib4eeWo3VGFoiUpBA3lT8XAhYKrTIVGq6Q4RUmwP9cTXEmc0EoOsjd7f6FgRMjbmABYkOx2U47ISSbZIuvhMnRyauRhstrKDzFuXwYEd7s3p6R0ad8A1tOORNRk3dsi0JSE3zTFhdLSTStwJ3R5dU2FbdM5fo+nsaDC43SIvwpc6YuKAIEmOfv0+o37MZ6tXGhdFtxeKD/jRiDe8YLArAztHLBDE3xuMI9VuQRRnq/+A5Y+Fy0sbAC39JiCjNJWIUCSkFeMgVKC7Jw4aDoJvELQLqBZeWmhidMj+ugKG1pwg2PN8KLvhX0HcKo5citBGv36Y8bKy904L/h85cuqpnrRAV66685j+3ZFbT1/HtvlYO7P76DF2zh9n9ewWdu1g+fNzR9m+V8tfFLmpGjkuzzbiw8S8B2vOMvBZBlNnGUyfRavNWfTD5ixqKs+iRspZ2guPu6qc46MA/cU4+CcDIRaItMzfsFPgOh4eQGCwprrz8YSi4FRhZ8J64UDTw7Xd/mr2ONWkggwRtCa45t/QyItw9ykRGn5N4B4kNVq8RxSBGe9R8gUKRLR4D30O5NC0eI/CcTaF94DJsOU5U+pFVHv6NzICkXrxFoXaW8yDt2ReoeQxTiplctKAD/vYFpczz9kgtEWJV8t16KRDiFcrV9DZQrxaCZDpBMkpJUgUsDaIQR7SS7lyGBedDf6DqE4L9RA8+49RBCoQxVR+BAYlXnpIH5RKMZ91Q7QA8+3aBMrplrFhocmcKBqfKRMF5OnuBikS1cQ5RfKOTJGo1G3jFMkpU/r9+UiMQ64YOS0zxN8+Xm1ShXxolwB/errS1QbrEdM109lVKe1StPkkLRnzFEEvne71zFP+hL5gINU2jbCpeYqQNIMLvzI4DfUewqIkMAczjf54pjEDlHHf88xRTePOvOc+Jij9Hoit/iifEhOU0siqDpueOmY9dcxOvYiz0y+iVpsXUT9sXkQ1lS+iGikvYtufuND4elNhqac/OrBH4fKGPIWPn29D4Afpa+UiIEocTGYS3xEHEnX4RZFPQP2NDwcZZGMNLaCmR9RscPpBV1s26NM1uJaw9ESgRs1gyl2Qv9AMJh0zHokO7sjuGbuf7C58lBnpts4pGe+UkG9QPW7IsqXPousyOGMu+rWRaiz0q23yeIhHReTpst5z8AGApsqEZswvxrDaBHTBcaslaRxqyrW0YalJqBD4nCzud1nUtmW9/C5UUE5PiRCqUcnu1du/U9aoXslD9S8dOTJa3SnYJZ+wGyiqr8eHfMGS5dMjkZnuWAjJB1ULoPNmaJKews0CKautwaH6HoEVuQs6VPKAxlsLgqq5zWDVeGIWEBRCuSi/cX26v5f1dr2oQKupN1geXL/KdsCiz/EF6y4TURFEO87NcB7dwGxJPocsPv0VKTBY6vjKvL7057ybDZwnkMLoUjg5yL3HXM1YGRUFeMZTV0Ax6eoeySQq09q2opOdpyPPe9lO2Aomc4K9+wmY3Ff1gYEIZmp+Iwcpn+TcBDDsge6VIm4KMFowrxMZSgE88OaqHHLqTQKpulalIfePKXxKaR+okOXkkyv7lVF/3iDFSA7IvrpLXyBxyzL0e8mbKSQ0X9+5+nNmU1C9wrusYn9Z751I0+qvKiFAClO0EmJ3FO3soPA6WhB+T0OJIStvjXjfnEbn8uZGqUycnJ+FE3J8de8z/NXms/qEcDHsptSE5JwgV8gy6z2vjkE2pPitwjiKdccqrBH/S5gpqkB9WikrNadYVN1VjFgF00HZOaYpGoTPop+pv58BrK6/Z0cJ/48rQXNth1LPySj6lEPs2xq9uKfpuqPuuuDPEXQHQEvBSXBz4mSVFdFSyF5pa8t1gXOkUX1hehUn1S+yRTlPIV8KraZRAM0a2IOGpNMEm8T6gCyc+e9CKJPb0M3hKmQjq0HdIAt/JyOqBgNF1aQD45cA40fVhwFZmRJUVoW+VQ+N+rO3gw1DyWAoBnwI8+mEuj/Fmn/urXDxY16Llb8lzR9Amr88KDsr0f63O6HvF4l/2blDAkHtTvQBpBLgncPO9jlvn2M7fRndujy81hMwxuy1Zq4YqvzxWlPtYuxeK007liotebLVt+banl072h7Q+6/TFr8iosW+Vvl9ls7TEmNrtLJJS/D0j1ZmtATVCloAiP0MVr5BW8yPtLKspa1eulBL0PsPVs7R0hYvLWpps5cGWlKRhM5++fGVOXQFmotTT4Z3Hru2Jw1W3zlEeIYrF+sARAOGK7u1tN1L27V0vpe2aOk8L81paZuPbBucIasyWrnsuFpVLUZcsoSHBisX6dfP9a93aek5XtqmpV1eWtLSTi+NtGSMc6dV0RXeqaf3zbR67pozDlYu1RG749g7ddg38asL5PEHH86JwM0FkLNfnaIiRF/lvXZTg/xz4MlIICib0rUKyXjVZdNp/0VMvukYa3UCbFwvS6U3SN6gkucRVmHrTyuh+gNAteXmG5Fg/BQmqouAbTUIhwXeS//+BfaXAcqBqtKLFTAsY7iE3DK1SXUbZ1XBnrtLMZmRYIVW4yobY1SD6Euzd/Dj/phU+yj93jt4hdlMyABqRpajvXdwU917cYJpX2nhPFe5XljrK152h1k9fNnOMXVGVBKOX7U/LFxfgKIO0EwTKpfr6HgE9Z8qkeZzG2YK1H/ut6jJ4i4vuWOOXdSPfkK+Qp+a6rCuIXwnNuFcqhLhWXPks8DwelVKtBrcCMWzppIsgQj1XR9lKuwXEiNv7up3RBtXZU9lPFGCagOmqWxqzhL3np6/zjjRgh9HrkXz0ttG/ZmpyiNN1YMDmt+d/h51ZZ0no82jvrScXeE0XKWeE1eyLA+rX0A/PYWPJbjMALletZguOLpagAZlA4kk4KLfKt6CXfwgzDcV8/00RV4upcGuu0xTQ7NDn2m1rbFrH36HBawH1y/PuM5TrZmV0AYq0RfKH/TllKW0r3ocQxu3qPpz6iDUrEgJLo3KJWNVLPOBbrQcF3d1BpjY4MUHQk4iISOuXQV+K1/lE4awXrSv+nimkzRlumC1lhXkJkb+qa74CpQLcEGJZJFx1xdNyfu4tZ43VU8dZWhxC1lSsZzuutI/0YPooMvjomItpPFljJGl03XiO1gixfBKF3OJj95Pa9jv9ZWy8V3BM9qVNwQb3DckFBx8XySgLtiUekwDKrLJ69T9/7iKcJPiNQeFP+5R3jP+2LA/sv1zQZEuo7yAyGDij2DTGVUfQw893qQji+FM1Kf1nTaKST/Jn3MY1lhHrUFua/6eOBvAK3tccbAkIw+CVtJ9gIJb8VPtURKVYNvHcF1NX7u+8U5rakjG5JHF7O2YuelNPDDaUa9TxFS7tjdEsifbxXvaxRPt4oPbQSU9FJQA5qR9QHl818Fsx1rmjj8+rlTkT98d5ThYf3te8OG83ifG0UOuTvN7QMMPu47oWayUG9HPu6LLxEngccRlDjDB1IVMCzvkYEVShrTPGkeevMD8oKOoUDwTAX/D+TzjxfhVGeDJY2Xl0n0rb/2Yy4PlNVzTB/IcO/cqK2Fv9nFLjDlCIHaqfZVJn3i1DYp5hyIsZaBFeTQeqpxKVeRVH7KedrU8SrFtjPyQz9Crhp9izohEQzlhCoLeaMSygQnWcMXcYKNMsPV6eLOgCUsSdu87m+toBQXcVTA0LS9SEG4Nb2ICM4Kq6ZdzdoFwqZYHFMuirauwSKR8mJK165BoxxyxvUHJVMTY65HKHpGf16KjwOLAuZ6sKpOc5OU1cRwiAbtzeVP1BvuRr0jRdX0M3U+WXhlOVN6mHw+/9JV7FLFAH2Oheq99PHPZpxbCaD80DUG+ZiPeFYiupdTNrR8L2JPKCjQ97dRcFZJLxAbUrXB7/JWCQ41h8VfDJOfbXFQVxOpvNrUfRfdAlRvS+UIMCXZ/lZ9pt/IEFEN7FpP7NlYgZM+C6SKUeyE+vkBohH90s+TYoT4Lt56reJkag0exU0NLSy7DJM+ogifFt3SF1Qf9vQvBa5gcgJ0RFBBergkKaDmDAtplSrn7MFVn6/skl6EJBTdcV+QiCrqOLydyUMp4q19FYUkvjQOqOIeMJApQG6K/KEKNemC70MkKN9Y7Jko9x6nVWsLo+s6lqyKQ5xyXgROhyyBdpF/rseiXTZ9oMfpE9Gm6NxF9mOrMVC+6VdqqA5VXymIOhWCm28zz/eIgBKVPUchdajfJIGZOyN/bljlU1X/ZMWPOipaKhX0j5TO0/orLB7E9TdvlUkRsKNXopjjLXJQznjF3bgi/iMrICi+euYlVSRKtnJVg7hJkJm5KvIQukEShJYgEqb6h+jLSN5JUzZM6mUUOLr8PJlJdcDWp9yuYKl87yktdvLlUn45F66rr7wJvqSo61bwKN4lFeAGBGC/Yy7Z2jK8/9WOau6DSq5SvGeUunuUKefYR9//YSDo/UUWmJ1BQ4AbJmthP/qjih5TliuQvKn0JfRnpZ/yOYYCS1gK3bVmvPfF8jBhc3krIbVhfwFPcEsvSYZaispeltiXHzZjjydYGyC0lroR4S7MsfkVlUGSLUaAPQDh686q3DQ61FJlXU2Yw7qPQP6zf5mcxrD/IUwBg2Pe3U2ucVcSBy4utzowtBdELLo/peJ5a2O93iilOlQy097g/aVSGwR0I+EczUL+lsvKS+LHi4nS90gcR52MjxI9xJOCQNfpV68ZXWRL76MdhFEhg3xAAhHBE2NtBnCoNbjRqWRPYFUBrxjPVR0XBXS6mGmOT87uMb+VuPoUqxuHyPqVQA7RXQGvki+Stq357cCGv42NpZB3pvIU2U8BEg9q2kaJeNdXTMuizpLqnJ1WWLm+WKGxuDJTCOcwfATulVB/zrEPU6G0I+RMuQEt+bfK7mEvkaYU8vHlyFEjHn1FghvKzeK/AxVOLVtb1iKOyLTBhw6Q/4eMaE7qdIJuRBHiGmDN6LU6lxR17I+RZnxI100MPK8ZnfglMmtdyvLP1roMT72MUFpcwrxM/blntMpG75piL5nauv/Cpi8YmNDixueTrIuj5D+mS0tF61x8fKgUWml6NDjCFFLLUwom6QiuxdHlWLw1la4X5oxNjadl8b6kd+BU8AU6PY2i9kSiBJolHxNvjSQTPW9qZxfMmxQYa3K86aFNP2v362nh9BWjLOlo3LZ/ZxZHKypBuhdkpIduuhPlof4gdavnxOLnLJXxqdpC7S8eYbEq80Mh1KhkmwZp7uZ18Fvod1zo6lHKjcTrmk49a4U0FAnmx2MDbXVJg6cxQs9DJ39ffM4o7AH1jOJ+Pxn5eJDkVdCt96FCOjkoMLNVSbBN33LkMus2ocdVuBoYdK4hnUuGZW28i1vUi8FEdrvG52weruh4qKp3esWq0Boz8Mb/nhbbDDzVdcsciwKK74C3j5bImIUIiPIvL6XFNdBks1/KMSY3Ma8GdNcXF8hw3Qs6owwdo/YhyIvkfFCLXhYXJIJsxuFPi4eXRW4cq5OqNI33mmkKdfUY5gGBbu07sL5zcJEMGsYdzPnVe+9pT58VxxXjZ5TviusWVyd2hrowDax/Aj6M6at/eoRsGO9UQfpbNDksHh6QgiUYAbXYwIOyV4iTOw5wMbvWruTZc73JhLo5wYYE23qDgU3xo5SWbiZEjZbWLUdK3xiRN7YWQNNBAdFWN4cS98XsxmmOqE1JS8SpyAmRNHOsykpSUDvAym3NBVc2T1hMM/i6etKhzmIQg09g/mde8C5x4Mi8Lf5WaC3OJAJrQZQBZ0w9JQlrZhd0Lq4owkOolFpOJTb1kQabj/HxwMTphr3EThE8moeLc2hG9wltQV0DDkcPkSlZ3akzCQmYKGwU3JjNqViPJeXlv4DyyQyKbertaUzijtObfk+DnDDRnFFFwjuDqaJjd5j67Of1ATKGuW8IU9QWY8wVKbJ2TR54n4Nzq6szoMIRcpmPRDd2pywSe2q8eDpuZM+oRN61nxVyIX7oQN6i09HCSCGxu/HvDIsj4QPOR1gw6xCCypVbdhBkUaPk0h2Qtu5z72xq+EVk5TXwO1n7Dtzrb4hNi2FXDA6GI3j2Wxgvoz71hv3hFNRp/L3BamjcidXW53kCMPQZNfRI7uZHdkykfatVxKsHyQhA/Vm32yyrtdEZsv+gWyqRrNilSYQ6U6e49IlpnahW0+KAWtZV+yU6TA5qnD/bXMOpc5BNEJMrnFrIIBUO1VsgiZFNojSqT5izy4H3RS1EBqKv1ZqQrw6r+qNFhDghFaZHutz+8fzMsIg+nmpi6v3QBD/TbqGnFwO6IPjFXCImnGSTwTLaXCphmJD1RUCer9985mTtm2IRTZemlhgljxXfpXGe8f061Fi5vhhB4UfkDMadkQFqsicoddH/ommdyQAsrSyg5X9EWbbCbsD0q6Wp9B4LTe6d3OyBMFmph5SKO3jW9m+LpuZXLObCa3uMCa1XvqN15XRk4gu5u12QrKq3ubqPdS6d3E6oWXdyEIyfTuwi9U2Xl4W7Drz4F245q54qnaUoeMzG+Ee4aCjqbPZiGIrnEknul6yBTAQvpsYCc+OPZKK785TCqtlXSsIZ3oGEdUJx7SJx7oJjpdJ24vELqxEFC3yfWLU8r6+rEBbRJwoBnOv7nv8TxnmigJrPyLi1F8qUc/+kn43iFkTD2Niqbnxi6xxKt6B3MpoMK4OmbfuQrb9oTZTQdXwOq7/MkyQBwqUIrcbpBnO4NX+7p4CJQY81ZudMUdYy/mOl4wRftLAu8IRtf9JKEtPb/mNAHulSCHwq/KRctaOTqZI7A+5zw2PqNiskihs1U0SPYSKbAbJTesj5CZmOZkGDyqmVGQq62Dpi9WfQKGA/qiYrWCMvJ6g4DVHZZpAC2LYtSjjsEtaUyXDrskMw0olwWkateg1/litIQlZup3iVkH8GGncCKbViNsfI0ZOBKhRTdDU96YWgL9AeAZFY3pjKuUwaJ+NrMF+KwpaurBMgOoIA2HlL7BoetCVjOZsBSt03xSq35E6l2lOPUKrFKbKgwrbGhAIYZkslWbgf0goyDqJD1duKB/indAqIOI897UR2pzBwd9wpSONltY86qIJNrlcVEh0dLUlfpHKWKA8eUWAGneXYkk9oOJxXsm+qWEhnVfYl4soMm4kljff0Djula7wchXEg1CeDHQN49mfsxcVkCUDLr5GD8loyHxtwS1JOAE21y685GK1h5mCyMeIMce3ZWjAC7KKoJlJGNmxjfAJw0dbSgs+RVRI0prifkbnZqLutVZtuMC5IBiG21Q3VUlN3M1kvyrMObxc+ZD4eW3IIvN11ageasvOHntfemqGpi8GudP+HPaGz5hZDx7XVZC+azU61VKSgLA7+n8ed2ZFpoHUtLp4KK2TyMc3oAD9h1cwwrrMaIYdl+VO9jmzka9VOzwSr7ShHNTatCIuGOMeK22g9zAkzDVf9ruAYj6776XJvnYvTr61WKQlgghzFlaES9axhEY3o3sr5Xgf1/ahhX5PZw+Zf1slFSN7vPvp6t0foyIyHFnxcEl/UIU5XMVUyDKINV79Zo1k3FCcBCh8Yxniy13oSnfw6KPm0mCoiesSe9cB5s8FrdINlalhfMuYmROr9KBataEU+xKoqqt1nvFd+LjltGhpfKqJ5yHo3HDc8DzAz8T3Un/LP2WJ9d34KjEvdFiUzNZ8rbAmgiP6l3s20kRCDWdnaezJs76zINkulP0z8H8t0/uxXCCtG8UhmO2QA18lTRH//cUFIqfUFraH0BF0t1HpOF/Yp92nWplrfuh4Ed/J4+vdhwmiY9OQPygQENL9mgOVkNnr4hQmbS5hWc2yfr7vhK/+iNrpEBTgXqmFlr/LKdmpFlRFMMMCflGF51GR+b/dIp6Ey+iACkRpLKT0gcWUdIFuk4Tqfr2cZ8PlhSCkdtfKeVgERaekDfh7mJC+kgmE0ya8L7S/pHtw83Z36i2K2mwW2Tc/S6zW6ag/TIyM5dLGVTHjQu9iwtyU+iJZBeTUvysAVtdmOzmyLJNDA8zn00ck/VfNqnsaIGOUUkDnVIhkDIM4UG9/hNg5gVzyiuFTwMcBgCOFaU33XNCvVozfSNsS2U77zNIor4JpEbcACIShWC/fz+B1Nyk2k4qR/FOlxdHNqKclsQeOPASDgoyRB5AU6kb5F34v39/gA2kWJXDtGh50htTmnGqV2cLdMCSBfpVxiZ5qGkY3Ren+UD1dFkd5zN+L6GEBsznlJyDxq6kaORHygz5vVDIZuNhn8gyOMy4BJoeH/XUo0xvnE4ywoJ4WcGE8lvoKQbpLy9a/qwmwXytk0YbGsSBkJtf5P5Nob1N3KNjqIvj+Lob4gEj5lVvWUyuKYPgkLHjK7pK6xySW+O2f2S3ha/UL3tpCEv6w2haqn/2KnW3bw0gMv0ZK/ufXM0AiXt7NW9byFFcmXvxUHYcl0QtlwZbDB7r+mDSMBPv7r3glCbN/uJpTa/qyFR64vlz8HJwvJng0wPD7SqdMRg+eNX4vaz6LejkfoCKCKPyrUJN83Jb9PNXHD9gJwXB1inLjoFvfGDciACy9fbIQiXqiXWlJJ81apIiNVzmuprfBrSuzrN/Nf4NGD5SER9jU+DOSgo5qD6Y9tUNqJMbDP+nUF86Y9A2V3SmYyMoJKF4rMwqTqz6TkiMpW8zsEUy2wEuClSiEwx7PEPg/yV0ePsovOdI7EEXJy0reGsOrMYHLb1ovdZ5bo5DiFijtvmfVSEMC/FcaJLtQp9HAfda3sc9K4c983eF5pl5Tj4bjnfYz3vhBrLk52nqjkfQoSTH1ubsqn6k06rJqT/nCNxODE41CsCQT1/oNfarjd7gIja4mUFlKgFAlgBKIq3w0pAS4GpGuAIRNMr4CitvscKUMoYlFoBTYkZ4xUAleBKvQKmMuScz9/3Lf3eisZGbAf8CUwTqKx7DFAURL97DH7Ue+gxsFKv0OMYoVqhx4BQWQlgKpBc9xigplfoMThRr9Bj4KNeocegSr1CjwGbeoUeMz7739Kfze5qI929IH7Sc3f9RXj+YBTgUW+mr2BKvUJfgZp6hb6CQGVFiNHxm4d9S3jJnn0WxIrgbupP/IGgztuLxx1Gl80Hdr6fnSK4mNppOsR+/fvsq6onIq6Xjj8+/R+zA8dRwCOxa4ldsfqRZB3UD+o/ZTdfiONaqH6k+mCRPdhR/ya7sFy6p3PEol//hdrZ8HSPs4Nq0o1Pd4Q2+WTH6ZLxkD33lI50jqGUcan+xQ2O2eU9v7LBMVAQLtX3TR/DZQU4Z0f9VnookYbuZeGMYLiCs5jxJ+V5Qvzqn+dq8jvGwnNWqljYpcnRCzsVQ/PChZo/vXCBBpIidseWfVfMMH9BPbr5fvb5XWBhu2KFXjhf4TkvnLeyKxa2KRDohXNXLlUrqhjzq/c8DXv9s7V0RW9ILGwpXdlcurKpdGWpdEXJK79LQlyWroxLVxZLVxZKV/T6xMJc6cqsu6JEoF+W52nO0D+j0hWB0GOBqkQv9EtX9P7oQJGvgTcdCRt/tAk1fq+w8Elt870HFH1609mnnvqktn/fgfEjgxK+j8iRk+rHqMaCgDaSXSbUSuQB1pTBFcU8MFJMsIsSxM5Aupw+oSlWei83YGMoepn6sHzBAN0taln+tZT3RdyuL5UCMCRqUGRvPPUj/ZfaYmfunr1ZkBqBl5c4jdavW13edP/x5c33yj01bRrVTHp0UyKUmOXCQVBFbL79wUs1BgmxyoOevfnFo9uBQJAcUpsElzbtV9h68zFRxoxXDtM1cob2ZWdeuvP+O1cO/9TRe8E/yftSNG1VX5HBIcns3dSmjYisOBxiz/jfEVwfcGeV7lRdZyLm5CmOQqdmJlUeEDTpCaFlH9pUcfVDIgatv6Aw6WRB5V+1DEV5WFN+oYvrVZxMyEg28dTW+i+QRVizAzwQhcBKigVwbqE521l+Drhq3QlU/2UmjKs1j8+AdXzUoVuu0JyQ20MMC+cHb2D2koFYVuQdXYJiA38qVF/gFJiQzdSSvGYA0NbNVhnrZJHxCq4ZQVsAuKTDBtUVpv2UYRuX4nVqIiNByUWE7Nfl9efiWrWceUdKpuyHW4IUukhqXR3v+NSov2B3DPxCYnanfIuljm8hHz0wBLD6yF6A7/my3l5X0QqjKsuIF6TlFsWmNvVT/a3tJgwofv68DgXkJb1LyFWsRSAoxAUjW9j68jzXMrIZAkAlelIHE7FJthxzpYkLOLjSFBfrUPFlO2BLulqbG/6amoRQyNxod56XEmViGq1qJVKTqmdAsM9pItxCJXFgwIIAHnlJM4RCoxiCM3BRCP0IkYa+1YrovoiPmQYH7EoOvaW0Ef75jJJa9Ci5osrLTewjGkV63TQHDdUjQKSSP1MMWWslfyZP1TCKkkFzmvzG4MG2jCel2eAtMI5FZ8H6nsBfhOvEUgOUKNl3e06jtZ6TCrb0hbtrOFiIGVaxUSGIKTSxiBAT1jHDnwgcGG1P+UnU4fXq47EsRoo/ZXSiEqNJjvpBh2wSHE4Uyv6ei30jDk+E3DpBv4btbntqh6i0/p6wJyUz7fQNBrk7fRsR7Lgyr0aAnzwbq7Gf75PqDr0GWRsUZphfTn8ltuEoqmG2co5DpR04AFRmv6sD8aI1abpMgkAgZX4vOqAY6QIBrz6XGD9F1Uj79XAdX8bWWaz+yDO4R4etHjdtOpklMWjpWUGj6tw0MWo4lq1FUxRKwEBDLDsULCdznV+TOntp5LVl9iEUnAW/rt0GEi3+tHaLksCq+FVe0nq+il+2WpCMD7nlHb1dDTFr9ip78wFAQRToWMONehtO/ErtVyESj0Vr/Fz8L/qOqnCxQvTPvBI60HEQatYtmMjrSiYG0pTgBCYYiWaXLwmRgDmKbEzfVf3sBhS/ZAhuIWCElptTHK+yYH6pXM+rd3Zy/NZBEQfQy1DMDXGwaoIC9GTjoiXdDfOjw8vr0doS95LtAPMV3LzIylHXO7vCPHSdstDK9PaP6wukP7cpgrhwr9PWgXQTEz7/COkG9d7tlmlK4bLZm21FyMoQhpy4YebF9AJif4zuPx5yPowqgxrLXuVOwpwg6u4euPiSI46JLu3oZPFWunT0Rp+msVLgn1DndBQ44PH37dwfBfdiqaNsdfzP7hdKmfjLz4aV24aVWHkuDmDjjO6wF2VnVJ9zO33pjO6wI5XO6A47Uo0/iiNV/NF0RvVt90lsEYeX2Tij4VnaGS2epZ3R4lk2DignsQNaPMvigKb3WW+Jk9hirjfHSdL7nPdJ7IDKl/FJGgeUkzQOKCdpHFBOUhzQ9D5lXLeu51fT3XzHQDlXq6mR7GEiK2phogrTbEyeM6v1Z787eQQymhiz0xSDgPSTQjIMK5EhIdCTJcMUpgjaQiF4XLfPTCBrWNVeEgqjNsySYbI8oiJqNs8p3UB/OCYLKRkm1Z0pybAkAQjcOycxir453jXpLrfoSoZ1D0rJMMoUOE5/EN4l+RMVPZJfi8teoxnWueze+PSgL1s8C4QH+UgAeagqN8eOuh6jHVqVUhpKhW6Un/LEovyUxxXlpzyrfKQKEjt8wYOPqlUGQ1StMkCiapVBE1WrjKWoWmWIRVGwhSd8SkZnFAUzaKMomLEcRcE5vilh5pS8CDM+pctJfEpem5kmtDPjU/KSzfiUURtc6pCF/Mt3dtTUIY+aOmR5hVmHnIWyl5dyWrVF0a7XZ+XjpZ6QGBciCyHBmUBojQiIVVIrUZKAb4u3JU5LAwz+fP/EJJuG8gg5VL3fJbfykSAv8P4G76XPqeo04gyBQXUlRH0cGZvq2xpijUAMwVlhw43dQ4ffNS23hRvU1ASQvt3aAbRka2qHnC6YWQNbadSVqG5Q9um6BimSaLa2oxGzQfbqf7Q4qq9Ui85WsOZ0RSTYlRUxT/inSVfYx5MZazq4+nTRekT9kRV97QVCYAmQSa9+IrepsgVtSENDDGaU5RI2mJx/PcJ7neOuniLR5FhJG8uqH4uT6Aws1YexHWktcrYqqHR2sFICpz7y9ujP59ONGHkpMI2kd/rXL0tTXm+tYAB3Kcx8izxwBc5kVgyVavj1oTshGVItUgugAE/8yATmshqc8GU7aXn9VflmdCr7GILJwheMqt8UUh8QbqKCnVTwMfUX3kVcqZpx/pjfblSQ5SvU/aifRNOT++YtboxcsSYXEo3stQ0t1uQGXh+KrYIWx7+AOyrXyBvYi9UQiMZyNPjYam680ZX0xn+mGYv3qSHfydI7vUFpmbjmm2KgzpYovmv5wKESU3WEyu86TDMumjZ3hAais1Ga6QVhbEQmFVS/Oc1a15P73B1kYpy6g16MM3fQjeqEKgCablnBQJ5Ks8ESBorgN90EmpcdhlzC20lCG0/ikhBfmfyqtizEW2SttqUh3qKcQVMeoqs/2b9SPO9JQDP+L5ksDTSCkW99uTyaQ12opoI1BY7wg4X1liuxKZwTfyxhonUCDwY7pgojgZgy5GiYPFcQ+cm8jtWq1EUbiUxg4/qGMZbN3Rf0Ka4O1HsYD2DHoXrHT2KdvyRS49dLkFa7qE0T4FI1dSIMonZahxgyLilC4FSkRfoHcVmzuiyQALDR4VBIthAgAPY1Nnejg5sdxcIsNSE4wcHWMtkkyFaUCDepf+1Z5U162yCC3w/MleBGUeQLxo5RfVS+hBTNKOXZV1Fy45yyHqG2CFDSeB+8Ivqlcpverq2In5lLRI9ZNFsxMkQi7C36SDRb4BTRY263+DErsCpeEbWWCgziE6n+Cm/0ISdnBtXz2cgXwkxfpbGzUnDQO9TZcsZbYPrqNA/T1xM4v/qIuPknZrP5vAFuXtpLVE/ozov8iznt8/g3IirRBcwx/N6Q7iFvdTA+uyb3nYRDpPwb4RDNA020xGAm0VcqBkSqfqCQ4E6BVOrXEBXZ+IhSyq5f3fe07WpSlfskj0iB9ia6s+EvR1ZyH0DD/If3Pc2PIv7IZ98xtvi8+8UdicUREQpbXjaUbHfZfrHVpZziMbkq9fsJGK1rO9QPkGNgsBmzL236jNtJVlPgVnxFfTm0RFWGUpM/hLTqhOKHWYc15R5ejj+EeHa9J4QtnH/XbcVe+CHdWwMpwn3WUxKiwk/pPRnC8weZSMqkKfHa0SxVGxSAtUVhbaFYp3rsGerD/Mdg70P17p9kYMkuOGj29qhfXyAWbf58wxySEaCt/zIXQtaGOTTYqQXLwnwmN9VsZg4SuIUrgZi4s95Vd+W+rAa6KBw4nO7qrwds9qvtMrJS8D8+NSgmSgnw45POE76+X1wxt6LGQph8/vuNzMJfXYGaMzRZkwNTz/zGEL5t2C6xEYTYISaI0K3uBuVgduF7EJ/Je2EP5HBGZI4kjB7yrJQoFc0VINtKAbgKXx23OSFLIpkgjOgQy+MM/JlypwITRiLaHGBmOtehPlU40+mMq7uO3cN+RGcwXzXhWt9V1lGAW22s+qbyexebKSqbxIwW7Y2a4Pfkd+lIU5ymjyiFkDo40Ief8cytLorJyVHis+TfdY5P4wM6bOGDtOVMv3p7hBBTyhap/371aXdpVxbYmOnDNcxpoOqmugGSF3E8kKaiddscL4p6H6/KqIDKHelnA4rV/CKFRXQpurEsuV4N5owmOo+Qz2oUQsRwvyGAHJemUC7Sr2C8etWTzCJim8cxAeInYNFu1wPEJUd1tTscR4w4QgO5aPl/Kj9V6/O064DoziC++6/1OVIp79o8rHe+nZ1rs6aGkHv3b7GbguDObjhEjGw1h8/VcsQ8MxM8bBKrzqjWx3R09a+q/xocidHiG2hxTVb4K2nRSEm3eIaA3ravsEXFBKLNBnSuOuD658tpmkzrXzYTQZbfAfjUKJkPkKvCyEEPHcvJ7RKfuEB3GlWauamjfwscm9wU/DHmYu2kjihOUEcjUeN6KoO6OfoOHQhhTPeAUBHQ2WFtcCTbTH0knSgRbJJO+R5E0kkxlcScZ9JJf+cRoCbpZBMrk07BJkPSCaCV44WqjyBJyltEjSEVnH4js8ciUHKZW8kttTVtgl/aVbcrwJudiaW3KIud6GdA5hdn9Wxv5bXv7v2gce+9ezVLfaQnNnVj1Uf1gh1RkaftZwJaOfHu3hFRvZ158+Hbb71XtxyzVJiVf6lwb/9QfZfu2j5h1a5xgc1gv2y/1x++CRJh/27NLxSiKezRZq6UYaXTd9oUL+EzHQ03orkV68Xv8svPxOcuE8Ce/nmyKnZ/cPk+zTmBWgjK2HK1tcTJ9lcvTw2V8fsG/UUHflauuwueCcwOFwdR9KhY0AzbR0dv/alJ/7aIo1LVBFDp6K2TPltVcfPtd+kLpn/5gSDiLg5qf3CrSopin6BARII0wNp9S+zTOOVkJMybHT6zPl5wxbWiMOKSW6M5w8dX+KummIkfKdVOnxqys1ST4acLCgBP/XS4wU8dCp2Mj06WvuRPHdN0qj/3a1iPf28QRT5kOUK4jLxDRxZJcQdvaMLos1gc3bi7laq6gXfLWXUj78KbeOlG85jngT8IB4SXXiUejsM6yhRI3RMFK1GnXRU/GQfbtGtqAZWAqdeUleENJRM8PuXQzdq7DEmgUsPn4rRoJnh3D8jfGFf/poT7pVHvdLetg+r1UdGe4XcLcpGfH3+2H68xcN0Op5NZ/BMXhv2FtHjSnYcieOR58dkN5U3RdW6NvrtswLRLOg7gccqksBX3BCeL6wmNTbYCnnPyNIq85jgdyaJRnAk0HemYsBBT6NyouqZmDBIoDornqhUdaGxbsSJ9xmTGV5rSyNuvwrWXq20u///GtWewIa7y6W5E99rpx5pr/+UM6HQtZI0q28eRJJasHiR+toTnn84S1idxnSUM+5R3fAlDmI/9szGERdDcMYRP9cIQFp992MGSDZgygxWILmawbA+ZBM9sBasXuqhS1jNlBb8uHa/CvugYm223JM2tK+NXdCj1GZT/3DN0RYV/qFBJxGr9Dd9XXy66RHVqi3Js9eINsiD4aISQDnd7y8uwcpSHi7Syw1j++Cty8RGjAOqfCksCVEPwTr+8qU/Z4GxXPuuTPdOZkqr65fQpaAR/LWPrZxq4OjnMDqREqdWwPQw4V9SScS4dLpAZD/eTYk0UFuh5a5p9wcCmsvgS9LXJrOdx6GLKCow/8x0Fekl9YxMqPstxyPxhXUTYnZSqXimFMn8iYOLJbG6UeFb4Waj6rAJxSVxOdW/DXe7a5EJfXjQITY5nELmYy2FKS+UOU3BIuYPShLVICEt2vG4w6EfyF/UUx1hMRm7oPvnkQm9robJktyUD38j280f1LDHdJ6SflDWQfl4d8tYQYJvjx9F0nqC/NyFBytTgzwRur4v6WV6IVolR+iDLnvn3zu3nT/Wry238KQF+SajVr1OjfW/wVxSWjOTL0Ku3UKRoI1wNj25h3b4/vaEy+8D1SX4keSCnpWoFUWkuqQDwPOGtk6qFaEVF7/kYSBNhhVkpyxHZrcn+6xUzkmxvw7VEX9A79Molrcit15/Xitx6/VuTd66s4+5e1tsd5egp2ei7807ujhReU6v38wa/rL1BSQnEimxX3WG+zPG+MimN75lyHss8RPj3qR7VRJ71XE814hZyG/4wQCXEqyKQbmiJKS/UdbXdBOdI2OFUUQsn6ASzayQMjKUHE6Cvm+Lxm722dLMC4lrDFQM20OzeVHvq6x6xxWvn3KxY+0ZHNA22TZgFsNuE1E3ioFNuoh6MBf0o/p3yEq/txMYAuPRW7njNseMnTp4SHSr3k6SPAvcEyKZ3EChbs2V+3Za9xMi85GCalxxMC6IMU/x4Yqv+PZlAEih8SE5LRFEBCjwypsUIfj8ckdjuD2WWbbC1/tCXdbg/pcwljo6NP5IcrynWFFWfUaVVktrwqzCp1APXKpNcezTSPZs1zlwZqm9qAtV6mYQ7LL/3IcGzyA+IE2G1Vk5ApLuYRqT9LvROHFhFiTJ3ZD54byNZrG+Oc0ns1cqDCsxX38FL8r74OXSlJYvoMkR75Oq2zkiK3dSE5ulhApKDptbV83V98gTLd27zYNCTQeF+kYkn1dWsxDtE9W2AU+snIvlmSp05OJ+qT1J+aJ/cxoWbKG+MSYwx/5K+snAEWWrQSdoS1jYlbDwis0veDbhXs+nd4iIi0RZTI3NJ6k8XlJrInggMQANviJryUZDLEq6+skfdvL9thSNTyE3iFdqwIa+jNXwud/4z0MtBmRlV+9f0KTQ+p5F70Cz4T65UTj3Im9tZsIhsDca/EHGVpPGsx7IpViTpf//y7G2Uh0X5qvkHK9cW91+MLFzLLyyHcVExguy45xmbiEWDYwYRglAa8aZtrhcAbgX81+iI2ZXxnXafVp5//F6+D4osOhWsJgFxmJ4H0s1kzTUWVGXnLnRwsFhn8sNSzsNFx0PVDrcnmAxg9pi703VZcyvzXFgABNHduHXPbPLWOv+lb55BRjzLu9tPGxmIfn3HAOnoI4OG6idiP8EiNbPvUr0xv38YybmQ30utHCxpVyG9loJUunwDfbxBWHYRW0slOSihouuDKClVPXgW9A7c7Aullquhq8RZ8gp5jGTFcnuU73xsnD7S6kpuv7oLdKjLsQ23NDxDRgjugN1diWFcGKRQxKfTfv5k+lcn5V91qOyy5CqV4pqqq9QW61cXOzm8N5PD7HF2GFydKNSLBdCqWYVWWCkHtYcUpVoABZtSLR46dV4txwhkSvHjKN4CwYfbGDjY9B+z3XC5suY0HKrsWvBbyk3T5Ktnb8tYz56516+hZg5MA72PzIXXL/dI/NiHMJWXRzUUlQ9Ber1LuXmH0TRaJomSNwIVKozgDFBrJESToYrHYVCDhr9TMcySE70uhOKglbZVYIUST6mOUyvsyPsE/bde/hQXDRUdv7LV38lC91N91CnZ4hiNjRHULHEBH5GrhSmyViqSwt1j9WKJxrAf/uWp4lvn47ZsLLAKe9U42uV2lwLPLA42j2cAb9PHViTF9alx84v/LHSBzUMOLlSl0TwPMl1k60gUFxjH2WfHc7AP32EuzWcbjJ3rR0DjRYscCTBMXuWRLWWEn97EEP8YERg5LkF/DTosdjVM2eSsygA+RUC7pVl9wneyJVA8QYtt0sztWHkQm1mqrCY1bEBGYtC2BVhorvV3i7NmcRyXyzF0SWnKg3l6wg1mRjxpHuoZCLWdWGsItTtdHr8hp7jm2T4rB5BSgXDbbgiyQ9N/Nv6SJgQzfzYbLO/YEmIFNak9w2ZLvJNyHJstfiV5sF2s+0lzUgXhoBZN8ERkoOMZRg7J9rYzxS490EsdFcTF+SMm/+Ph9L0yfMBXbASCj7Fxz0DFMK7r1nTAtzQcOkzXsiSLM5b8J7mnrHLEWaeIp/SSuEgAwD8wshk+T6MO8RSTtUEZDctzKgC0AiHwL4XqkgmjKsuKe1XgdOil5tbSSxmNToB5bkN6KQK3Ko3kwDXMUjueiZTpZzJee0JE0l8TVPqP8rG4CtYGu50SMivybwFpMyIA0J5S7GJeNiDCO0Qir3VmIFEsWxitjBILn/kPxLo5RNYLmzFCUGBS/68NZLhKgIw4V9/WKpudMO3yF/rxNhWKqvhs6LQkIlzMfOlGtE0P/BEuI6wyYmT4UjxKl25A21T9cpLTDMMSI7HEJ2VNWtFu4rqzv745uyqYLird/DI60bA4CcNjDy7QhHnxUPvateFbiRVgGtb60V+1sa9XRCsf6K78VXflg92V092VD3VXPpwrfVY+0l15rPuzj3ZWwuy+Y7Z6x8Df89Ub6tGh6n+HCW62eCH+2H+BYIjvC0NcJlfWMwkx+knm1UdzFSXNpoVAHZu3EO4b/8iV7D46sH+0GA8i4JGEUv5AqXqllMgkOYTrPBI42JU/Ebaxuv1WRZiuQE6ofT2xLUgPRf7Ie3nzO7kW/QaoYFHZcYU+P6Bdc8Y1v1seaF9bdvk97THfIw6ezu+GK7+eJZjfv3q/MDZSIVKsLjpJH9szu8DCp+tuJai7fqv1V9ZtjW2SOWr6r9I7pjqFugyEjqlLoFNz3YP8+GJ+ybNGw2bTKzRtz6CjoxDOVWKVJI+qFRjk5fQkr7wWdx46ILNc8zW08rwH+jS+WU/qSoEsiWQorOrz8FGfr6hnCvBM4B+xuZfNeMnsnfacQciFuh5b7NABNiR/vdbNX2+W/yJz4ahmG7o0FWqJcPIJ6wY5+WI3oU2/hm9PW51ASioLp12NoYWskEkS0gIOmgRLrhVidma/ID/Ark4uAlg/g7rFZVgsQrOyoju0HZPoj6KUsFULfOH+Zt0B8DbERvrt8ly6rPfd5lCv5w4J7LE7LPyYSougLQ8x5FJazGQ9tMcjQjj5ScJSRMYAlH8Bk/CSR5BYAmiJoLXYozCorz5Y/+6nPvA///VNwU+mst2AjBToBxpwADILsCVEXoC2KG2cuRHv37A5Pi4mP4sIAoOdCgsQMd0fy1Aba1UguLIlUAIOEz7Sl/vBSch2GIwgNrv6wlerhfNefVD/zr36oNLV9rqFhaL2c16bxYp30JY1BFrLghgYwh8pDrMKy6vWMMfbEJJydXnxIJHh1YMU4rxa/5yrtkVuQdt8q/ENofhRCl6Ic1jvD64eJJupjsy6I7PuyPIwYpJ6empm4GYGNMO1TxYOrk4WdRg/EnqmX2qo9GjnPTylsgfimzeJcago3ExELB24dLuZo1MQS19rzypsg4EtuSRZUMW07x64Mng64M5XlWv81infjP+bPpUS3+A+LWSqUULJLmiXzJTKWuwiRMguOXjxYpT0reqw+aNSbf7MqibYoRdLqAYkfDz+SD/MpIz6rgnWBlFw4sII3IoUOAK31MB8mYHbwA4RYC2on6ePwK4N0X4FUd5xdUWB6Dyer+xJzTvES541uHENZHEdVlE3XKNnHVZRZqixisQzCkwRv7FBKYaABEHWFqcIKDHytiUCYHNVMtt2ktaAEr1ZjUyDEj8+Hmw+PFeIZwOmoNO3COTojotOxOgVuGlmwerN4AHMXdThrA/dEMfyxEKvL6uilkkVIEXNa1fvP36vkn/QTLbfmyMu9uO0ErpwLoA51/zAqq1VKOav+5JEQLadf7zKjJzfF4MorI4vY/cs4eETIVNBaXhqP+KEL0gPXRaytoDX9u0aVx9wpg432BLpzkJLLJV66fjJ5vhJ5LLNSCwtjhRTX/ARZMIlmFK+Nvq+3TNcPj/8O6WsnZVjZbgsDNUlUonQRqQivDJc3srfB9j4QG58YLisduEp1sYHc+ODw+Vz+XuKjRJYirT90mRz57yUxV8yfIhfsMiKyonYwSYWWVHNMzvYxCIrT3jTaTaxyAo5UKTgUYYvyAIJinAPG9X4ybm3LW+L+vmi/j4557bl86AR7mzaeps0PvBu203bb1s+R+Jz2lTU4Sfn37Z8boh4oPGfimFbQmdfCviRGlVvtMSyHFy8Zm3A1dWy/N9LhsfZgCes5Vfxzwk2aInlW/xs2HCLVHLfTZnrPH9Cz0ujonsv5x3SI5tBWblXoFPVyg6vYDtoZeKVdOL3egVrjAc1nJyrU8EwxkMZTs7RGhA4nsdwslVrpuPQoxhOztOa7pmfwnCyTWs3QqNO8EcVjC/SK/A/pAYryRgvFOGwLR7RAIRUThhjUltG+tkMP9Og1OqCBsmCfnpOuWbVONyia9aMWf2SxlH7BKx7oCc6NXTbZ8bt1e7zpgbx1O4T2j09nKd236Pd0wO7HUmcUrunhvgir544/ngq/vTlXt3lfAcm2Vxs8auS548tfqOyw7HFL15eYWzRRS76VuVI46L1e4ZaeXU5SI2yqby4tKwzs6m8tpxe3WNTeWnpo549m7S4EHzmi/WwukMTG1e3ICtODwFNMf2BdJanw8Obl6ZPWV6qT/yWXK2yCpngSBX3svw1pOHf0lxXaRbdJ4LJKTCVJsbqDthEouL7b8s37cuKjzmPqGkhYmS/QryJ2nf6cCY5HlDXmKnEm/dMwIYTLbDBA3ja7tfnaspLAI62EcjBRHnqmYny1FvTPawDOUTY+0NThko3L60L+d0wGP7/zjSP/zzdwweaR2rKEqsr/42ZMGxI6F8ct0atykKONyYdpbWzDWaZqe72fYxgeByj6aXElhuAWNmgRm6xtgFvqHwroX325jf91CCcyBBPccwbDtqKmJGIesnsFAflPaoVwn3yZ5VQK5KOeV0FWYA4pJLg83glshCQjMxMqVhTHYlxCudzAUKyCgSBImus9g/pVurgW1Y3DQq4CgFrkx8H1W/QWPT3rbIxKbFZl7fFFhfRq8BEBtlhfAp6sr80WuRqXIW0ZCA+1WLySMzAnUoc3ABOsm+1PnTTvub53ZucW23cY03ExMLCJWISMZGIK4z87wzxhBIeARfL71sVYsU3dBlTBFTf0/5ckZBO9EWtdyMheVIklTs/SqhtuyHjNJ0tCbGNQMf0Dgc3Oseui5AkkNYX1QZJwNI+mXOXAPNFcLhEq0tBEV55WZrG6hhG1kHqOK6NGkSB5/CKJWoHG1/KwoqJ/Q3Zi2LXejTb99JXlrDbo1EQ0plvcaVkNKuBpzvUKqe9+hPrDs0KTuKWVjSV9+HYKwVwz5J5tWVHehkbCzlSJB6uLUQnJTdxRbNBs+bgUlsfewff5/SC5+NHTV9SuEgcCPA4dlIt8xBKfEBD0jCZhmyr+UthZ3V8PKVSZZqXKdpBZqdddKEfzwttaaCe3SfJvXjMBT4S6W1ooLCNlCnpH2joh2wpyZsRE17g+4gPPyk4fFD6uATvSSOqB75ufcBUU7EuATOigbjq8jGioaBplWBjfpVQl3o68qEP55TWeif/EHjiQ76MxOkqPFfctQ4AERE7VC4DgIjQpn6T6MONkkzeP32NpA1saKlnb014oY2b5JRpr9FWyPhnB5YPM3bnyYgmk9pnMSrjzxQQCJtPa6X6u4F+e0pPI3ToD0uo06vE9I341cv6vYqLzYz9e4feFSRrV2RwzEc9u4Em8xvII6AftXKHoqXih0pXHopReL4i6jpfOqYmWJLg8NgLwdla9JV5YyPKraJiFb/ThbzM3IPUUlTT8987eeT+OomXRB9D5yk73CQq2Gp5SUbJS2IS5g4th4wWlVgrWaPfIaQw+W4F4Pw1DZIS/S6ON8GHE+3E5hR/LbXpw1XYwPVUV8UKdMDsPv1D0TrFyxuRhKzpQ2/8mzl6icM6HrJ38EKXWJotwWizISgwL3si+3CBi8FuLUAYf7o/MEyMuyH1Kzn2cRVtk7Lp1v7YUG8muslLRBoAYNiEG9U/Nz1PdJQ0BG1E4PXPyvSieTRCG+08KjrsZh71cs6js54AI6Pn7dvI6F0ay9L7YlabtVJR+9aFdDGhvDkRPBH/aN4wmNSonOANmytvmGMVesNmc+qEDYqUnBIEJA8VymMmVaIyXjMDgV2kEYq39w8HcxDMh8Y5qWdRWFhfzYIaAwxXRe6PDJAG/E5EuUj+4Y+oCKf3A1Ef/JC+USiNiPhv5cjgNrsomiQqtMaSXy6mKWzEBvNMJKVgnq2Ts9ABQEeiWGiyfxFqJQZLtKpK9L5RVvKE3TLDMZUISiZnnkilRbH1dfkFdUkAMUc3VaqkeSxqrd8hXGoKLjwUi5ZxQ0Lt4Vi3TkMciyfk9KfCmXGl3GhdaDjPup+gFCLH4SykcsS6iekowKEnVJ84fhz4EiECfFWaw4kAzUnhIRK0QQsneZmbNQ/oB9ars4Wrcr8cheTbLcjRr3/1D/WVmTGH7HyWWk6lVkG+aRB9mp/xMgHR1XL1I74B3SwpSsSGkGHGY4qGRgc6AbDuRzsP0448CRKmb3U79fvZFHZo/dhU083Zf52fkFXVT+IoRaWdJ/0gETjH9n+HeSFnxwL0tZ6Cb2IzYQYU0vQNkDc4GyCahtyHt+Pvzm4JzyPG2ufmj6z0ciAbcsCdH8MnZqGaAz7kTD/D6/XSofLbEP4Z1eeQqDrTU8JPXPDNYapHGo7HvzflYVDJYThbyGuGGI0LPEkvUGln8m2QbtL0aNU9kMjWBB3q2X2rZ/trQEWmqaFQo+E5pZBK5GcCY2EsqtVoAqIX/mio0UTKW8Un6hdMOOBqpEaTXsODaQwDprV7RFLkFpdwG8yUsKMMCo+q1zGTjqr38tSOv0WfN0VSNAn+aeANmL6Y78S06zoY/aUVDLqBVzQBxEtuWNWNISmeW3iLy6Je74yDB2oooDKZmDNGc/zf8lUonAFfFXsPItnW4ntTAK9gjLSps2e9pTMQj+T/4e1LoOMqrrTVrV0tyW2wjYxNaCv8E2ch4WQbkkMm6f4JCSEzySRMhnN+zpxoaVmNJbXcUhubY8AG2zEJGEFYDIbBkIAdwMRAIGYzYjdbEIQEE2MQu9lFgGDAmP/7vlv1+nWrbQzJjH30Xr+l6lXdqrp169a93y0WdGbYLqoTqk2eHi/I2aSCqdBbBpjjhKZ4i8NuogFyVOw+VuwWuUVUMdA5GtbMILnI5NvyslVgQYd+iqJeZm4U9j4tQbFS1ralSHBPNCa7CIuE7gOvW44wzoO3LvREgX8D4RdlLoJS30JliHMltt1cTLTYgrL+yuCEsmhQG0ysZsAb5xJSRVhJH11RCCjYqiBsLkMVygLBQhUaP7JQhRyHshEUUBqe0tgQ1WNURrMbdNk45+Q6FwCS8z2DJ9aRB8vW1puGUwzb4Aj/0SVow9IiAWFcY5JxwTXHZGhKHIoIvRPp2CB2dk86HqePMun49xE43cjyaihwUYKZYPK8RfjgxTioMvNckB58daOLD6vGJNqb9UGogjC4eNjbx331qzYozdjAAR50ZfJhuyUgKy327ouYO46iyDr/GJj2VesXLBEYI7MQLFbeQmDyYT8Pp2wJYr8KckHwWeqvUoNgo8oBq/qYtZhEzMIdy3QZ5OMXPMqdjfrnAkcGbj7Z0/2Cp1jTuXs+lh233/y9Sf6egMYU5NMxSoQaxugkxekUxrIbbhKM19C7uD1C+w0ZXIK8OTy9HLZ11wvkjDZ+6n/wo3IKBIA1BWEbbR292IJogo70mDa4MBoV+OCaRHIj70Z4TVDsIvFU95DeMIq6KRI/ADsHmcuU1/sUtDSR1AjvLsF8BXUlbcno1V3AF4fLP20uzIW7VL+y2HRM4yxvdJ9hAU2nFLpf0C1BcyNbnMWYAOjpDAObatrfuOgZtUtCOqZcLLbc9Zl1k70npzbuZZIEIeG4FOHUadlpEgIMKBvMGNrbdWoVYLHOebkOFqAcHidY45gVKdb3dttdm1eXXaQiMK6RRnQyCXwhjRACrq1SWGHgoXSYC2crmhLoR+7Dv8ECyEe8YxuC9yo8nLAiE0Bqw7Y623Ma+DP8DmhSYpGYJR0cRSTtRmj6xI7pg0u2rqBvxrwdRUIsGhvrcF4w+EW5wh+bGnPUp77PURde7gIIorVk+IXK1JeW0e1cAIhF75ozfpl3qWwredf8/su8axCLRe+aHeexqZH3S94VWgl+pvYEsnshjaBsLo8E0GJyjNq/4kGKsFrLg+VWCBwFkwcnF3JABBamNOSim9o0iXURjFU0TUJtQXcybg8ZPgoh7GnfURn/E3PblyIO4VFo+EHMY+YMQDogWzjNm70Osx3TUtegO240I0s0ySpOOULG1UqvFSpuZyIlLx+/g/1N+gbJdtnQXqR3JsQTxNM5gpBVkEN7SM2kBOGquXJ+dZvxVBgIgdnCrRvgWdVcJcZcNUHQ2+Cysrcv7N9DFvSbHIo2SRWETIQU21jTOF6v/oGMBLVAIUQEcdvMNXoEuhb5GSv8c/JhXKKg6pgEL9Gco5DkXEbAqyh+sQLHg/ZOZLUsShMY3sQzlkBv+DQ2WYG2ZxvLM2Ngi1aAbm7yI1rzJ2tp+4POiG6lTgnQh7Dlr3o2EnC+PXwtdVI/WbsA3Mu6qmyJCYJQ2cL0WKrhHShH9I6imlt8HqZTanxvweqjEK5nbzQ65mmORDT7TKJ/sc3p+eHa3CzaZ8ofzDAxNRjEH0kORIc1dGLo40PMNOQh4tpaPo846OUF6kAcUIWxbomqgIHhdqmdpfsFjnTCwj1+CVj5hvcv2XHVFVvPGkZyrMVTYEfxd6NYnXqVPbe08aaCjaGqSHLHzVuWnPn0xjV3MAkK60MwYbsbLzL2Julqr/P9qH9N9BXZ7KEBFx+/ZAGwnfVCC2XkMKyQ65VY77ADOh9R9UkiDGHutd6IWVW9kaIa19yuN3L7xG/CcJ9O1oXWGQFxJNVroTtaHkphUB+2AA56I1NYf6Tsov5owgJAKlYWJHvouMw1yYY1LfQEeCih1K0IhT2g8KRoGjbPYdMIYFNY/xWHIsVvBJCHkEOzJrSqLrTf5ycERXxmkWgb5By4OPY1XNYVtAhUwEWTt50AsZFBDhJxuHxHk/fbdYApyHce4b1Y/G6ujxlm02OmQscijY1WARCG3W+/ffIUkzULfx94g5TYDI1eHIgeEcEFwzT5C+fRnGA6lvhcL69jc9J8Pj16cc5BAiyMBI4oJsz5CPAWuTfgckQUdP40JnEJSoz9ICfLJN6AfDl2021i1E4ScItRb5ulLU8gJWqD8UyAWlkogALjdH5/slNE0FqpMaj84aRj6yZ0O7mbVcQh55tpppCZbYGg6P3CmLUNVtpRu1o5xz5AydI8H1DCq4GlRxEg6lHFzGr69IJWQkKT2TpGVlM9IkcplAHsiHpgGWIhwimxxbQRyd1PhVsF9io1xAYugfbB0k3ec1IvqT9agm6oH9jP7POJqJka4n3ZuHv9VWyR37gI3OVcNGk0oyDL2IxaxHowOLYV6+zaSi3u2gl+QwY9Jo2ZsT+HSO0WkNzPMImwgAUcFCGwAi4tgjnpcwvDikDVJItwu/UGK4KX3YUX8RGLcComheMwLchoBx6lyPGSq5b8HFGdKe+bzevA2uPYtIjcqWChxIs66gt0ZDvKvQDDv7WJGnsJ/YAMUOGpEDqBDWqgwGQzZsMrw0C5h4phuB6j9XVF7ApvzRGsJU+G6pNQUJHHBGBBRWgF6ETDr+SLDMaYvNZvIz2Hy7PcCyhgZXI5Lrj/GQFaJ6GiaQywj4c0AB6Dk8JBJWiRFNARJmZVyXORLAn9aXyx8LCFYZq8mDcZKzNKxgRrDK1wwFwJp0CPW/OFplYOCx16FB0yTfCZcI6urIhUYO+FYwgynzH0CGB2NYL4C36yQmwnL5A3B7cBNDLkLOKCFtHf0zQN0nFBHQAwMQbG0KCmTk1+2/IXJcM9y9iB5qXooRYUCNMHuoUmKRvUplWB8S22TsXHbA+COkDYRNQRILZ6tXZr0CdZQ238ukC8QuKU2TRzxABzuXjoE8foyB0+wFZV/4l4GItdUphHHSBFOJCaijthdnNDRU1NpKYmWlNTiZ2xJcMAm+YW2dKFsCfFZJP82TB/gKzLFtLVGF4ci+H3K9sTxN/0nsKGDoHWMEy3yFq6kkPEcmFCk2NwjXfLbOmviAbqZbmz1LgkmllmYG0lKxoSAzfgpo+WgDu+Oc3QAB3v1ksm0KpQjizQKnFhRWy6xcR54fgtBrNzaiUh9a3bAGZPOTscy6wVigU4auvDyYrvxO6wJVWwnNHi+tjC0hcuIuFHLcdiigyWUcHCueStePCWWSuUf6sueEs4YqG3/HpJy/3gLUm2btEUeluLpmOku3PoPqBKMw3Tp8owvXLugO08mnm9TWHjX5CNk8kuiO5A83g+Rd/VU5OUKvmgUg/QC/SgKnZy0frCuQMpXrcFvRMOVLSHUZS5bbAwzi0RzJIliwCIXY6rUVDTetmDFUh5j5hjpjpMAmwMYEtSkhd0476fLXXtKUioDyInQlYWFd36YQkUEktM4BWyqu7WLaG6gvdZTbaf3Y8H99lAbH273xLcZ/Mqf3guaVWO/KtwPxGbGxC8MjmBRGsS0RpANO4WSlY1oQBPo3oKHwI+pZbMnpJGJWkLaoHxKeXEX7LYc77zXGzCuMki+N4jrezdCt/DX1QiYp15t0wVaJKGDkTTM9K0GUSPw54AcTSlw9Xr+hF/3RAo92d+Gk7iFAVJ5Rd0zAFj8M4iZLvJNx3wPffi45cAx0Nhr2RxNXsu94lRawpMTq7hdoyWT9x8pVKlcpqQDiCqUqxnxeJvgFu5bBOyLo/A+1us0qVnYTA50+4gtCWiqNqcNejcYKq9xqPiN1holuj3/zn6fSdDRnh0vJhWPbyDY3AHtkAKWervmM5IjWgKVi9haOXq9znmFyF0/T0YWLsJuBWgYB3zIV/+x2N9BZ8+1sIVOFMJt2OA5mdCav4VT1+tja3SOeoMeAuDXtOxZg1LRuZgkpi9xu0HuZXxHaIJ4r4NFQN04d4BQid6znB5ayX5ArsAFZSwKxaMJcL7FtbCHOLSkVbyrl/4ursw2+NdF4gV7mK6i80E3hXPp4bO7mKjiHcTsSGvwQ2b70XGm+9h+Dk1rPNddMpXZ9AXclcOpoFA+RqB8hXpnQoYzEg62MhOdLBLnJZADBL0WIsS3BzoCVAgqasdq8R6P3V7oBHAQypNqC6htiRgnBhzqEeR0gRvFjhosdKAxIrYto0mfmrNuLSVlgtKOGeENaPKlrXcTYPeIoh8V+VxzrFmcTjnQrAFC7iRcQO0yjQ7AyKVKxKUmfQ5q+HABtA7unkbQOcEFVj9CULdkEaYFbddbf1NcJ0TimQwyVxcSVGYtY+btwt3+rRhJHlTOyEUDvkEe3oS480SNNaKAB96Ms5SyXnH23wued/NeyvUlGJqphTjbIoGMcj4FrM6ZYergS+88ylNTVHs6h2uB1WlPrHMdV/EsnFhrb0T7SQ+MhXvZ3xAbD2Kphr4SFC73B9YGvRPA16NneFLVlykhJUzKBmRcUqsSKsRJRVFmcL8WWAU0D4NrwB0fsb4ceVF+fhkODA5/YwvLoqHJ3Qz0pMaAgWgtLG8nw8MBlhaDqfN2ztQ5mnFgvtU2MWv4nKGLqdcvJOxGxiFXJfcWWNwZyo9rpTnBrOzwQfIjbOSKOGCA5Cumj4c8MS0XeHWKq5W5WQrh0HpQhRkIhR5B7zZlj9FMRedhpqzX6/bU/cxUGz3HWFV4B7moUKczbaPBxKC7dBWvxzDQl5lsrDFUo72OyVb+P9lG23QV1amvnkSI56ftATH2mVLCLi7/0k4VOJOTaoGd7y9MF6M6MUIXwQTIVBuLd+u1du17u26WN9u6Iwk8ZQohMLKIKfkka7zqORXd6FYimX/4Z97bFeKrKB6mJ7Lf88UGcLc0ve8eKHvmQID3zPnvt2v3j/uc//b1dvl57js9DOcTbjRYoSBEpaj2bmM1bmf38o9C6a2nVir+7UkmKXecLIAgAQ4FWnM1nCSkapgT/3iBqEmJikVKJniN0ZAYdXnmXFl0T1bIoZuaJpAYMXwPZaJoczC9xKxBVpBAlOOKysEPC67Oneimy3Gta7gQvtKLrQDdUsBfkMPF9pCffwqnDEB/Cr81ILqWrh9yVMMHc/sBk7GRfyLjFxeuJ0ccqIBOoOw8SxYC9c4msdp+ce3DdmP8VllEWD7qYrdqvakDkXmDfGFmtsNMaoiNq94d8Jcg5wRl8FpIKifTHkCZDoh2sncgbY9uC4/e8v4QftCblHuTLycQUJeapIkTEfjdzlNFWnAZReWKXdhF0SGI2DJhBrh9O/6v0KxFNZzrUAbxC4lN07mJC8Ri+KSTYGKnIOv849ldTOsBUwYmQBoEAvpk8PVOEJuItAYXWGS8bnfooXe8dR7RxT/ExZv3s7TbRCyAy9cCItjv1LHfnhhM5tSS+wcF9YZbhqwt3U6KlYxiKgq9ESUEZaaIenPBfTwOHSKszNO/JPw5/MxOfGGnb0oefMWLRhh7SUoOXbrHQrSQywF6jhFrfj/8+hzUoVrTadnfL/ykPgn0IMdNJ2C4iVrD6NmahC6zjnfztG0SUZBBsuu7LSvSqj3CMBb/TVoCNdVyx7vhsLQ6F25UIEvaPNYxayR9nf/ip/CTgo51X4H+43y6EDjNcjT05y9XHSbKG5Q22kme+tp5XcGbU62RIqlIDR8A0RSeCDyKV6Jxi+lSO4iARh0n3KEwR1fWUSYa+jUXNCQRB31AwglYtxaBm3JRVWMP6BAWBSZkUBb68SKpfWtfFrc1OAceJyWUE5R6Hgwh9fWND49LX6OVEJuG9A4vsK6QlT7cryDYybeir5KTa7zramMny6hKL6DG2H63Cz7nKEXOT1ACOuNbr6GxiY3N4+sVyIdOdx2CUdDJ0BKlDTq5SER7D8tGOYXT8Lh85Bkoqm9cKxbQFMCXEEmhVxUz0VTrVPyYb8achAEXKzdKBDtR9noE5KNpp6El+n+WhE7riDU2UzKpsMkGYdy321pGSwlS419L6knnFIjucnfcDqN5Gj4BpQZya3hG1rn20zswDRjWW845bdcnEJFgj41LwW9Cj7oTKYQu8cK5JZawV5c2FgqwLdxChPTHWT+t1bvoS+t/R/+UrctB2xla0hhfjmgmP3EtiJimK0IFAda8Z4nwcIjMHXxz6BSBDMjbpgA4QwsxJbAsV9XQ2VSrd0L2AFrLngHA0GGloZbQYCsEpC3AvCbg7SAyaVhnvrlAngKfJQxc8A5mS4BxMIImxvPs5b1aDw2umoEiiDfcoUYIIFlYgyLjHmpyuPofa+LhRFdITKVLpfZJQKU6XLILhG7Xpcr7HIFi8NPEhgwWLzU+Py9A74uEM0MFwfYxYG6ABasQijqQkutT1d+VxfflXsKshGuncxNYFpEQxOYFtGWBC4ItMgCmIrmQVTS+8lCVmJlBZJNtkpHVrJVy7wGHpTAIjg2cHWXp78rhj3sDh7uK1AAV2B7+NOih64CB7iHRxQ9dFWd6R7+8NjAtR8PgUNCYsnhDYWPpt61hAi/DwLAJ6K/cO8L8JPQve7wPUTL5r2fhu8RJQH3AMOUOvehDz64gPdq7R5itTlCGBRJLHYiNhqdyUqpPymNUxqxkB8NNF98y9byQTRrKQeEKGKWakT9Kww+wP2Z3mKHex4n9l+grmOUbcrBORP34FFn0gc1UndetrOofnTnou+Y45MFnJcC9ksBD8Z7pNJCIv62Q8Cui2Em4rbxLkQ9eYUWVvwfV8rr13fcFyL4gvdgoYZdIcy4LWCfcB9gxnh1YwQgPaZ7Ct5OVhUKs5p4PrhczY0BhHfm9u/GiPgbLiDa7VqYDWJOf9ya/URudISO1ZJAfrURxuOGdH0YEXQAPKwYn1wXmoU9zMidaKE4odhXkB7nO3BSx0rHsp0drAIkq5q1kOz+/7W1GlKQcGwEtiVQ4Yk11BICjVce5nLscjhUFjPE4YAHeXCrms5k5P2xXjHNFiy1RhDJSkWztQN2YolT7nol9m7N4Bt7t7Iv494t5NXkDUjFrdy7ecZO7q08QxH+O5xjig8aXoD9B1sGVIdOziMyybmR9+rVpYUQxkjDDs0wSSRdFJ0Rw8yfUXIcDflNpAPNjtLixdtzO1slSj+r0dxTAUj3dYsELzBg2P0Hu1ngOSWu9ObMP4D6w6Ee8mPYoR7+R2hxP3WaRsuMwkylCxWu+S47q2yocN01t3ZsuqOlzirsV5u70ve9t9I/ItuR18Zl+1+22i8ISIEm1LSyqQOXWvTzaizyHU+qTn2dccKrCorXg5aCjUY9z0O5Uv8imO/Y4c6J0Zmwc4LGIiD+AoeJTNc/jsH5YUWk0PbaRyEEqo9wJ67+f39eiNXo8vo37THLeaaavlYctYchKrb3DjX1KNUEPmI4t65cEH+tLIs0RBLPZZ6pKQP662DKiVP/bFNPaKJpSU3XXUw4oeklkYpbEyKCvGS7Q4MqB/75Cuzl3eyFGhjUlgasVlvbZ1fnceh44EKygkWZIZCmHodO/okPPphgHQoTqcxhU9Li87YJrHV4YL2ERcUFy6mLFlyYztwlqVBOCdxOxL4XLIrCcaUg90iRRKGGQoKWXxQS1Id4kyKXqCbhTuue/9Bmn+MuZjWF0AYRBivlMHFQ7trq4x4vf1RjC1ncIWaGTrDDDtk1caUX64xGjyOTkUHpj2zPKZI67vCcieYwbUjdMHzRuy+e9/tHrj/+8By4B8FOQvd+MgcFJEhH6vh/n4MpgHLE8AmPLrr/wbNfuPn4nwBVMIfxRGt9Z29lRhFSziHI/CqinXNhaQab4l0ecBB25A6lcLZzCnclJ+OPfUfWTYFJEq1YzJaLCCW2MgdD5xCVIt+BjHizJE14oNihscM4EzGGr3ljcQ7HCZRTGGowUg/MbwSWk95xtm2EAjqW6+AJDyuCsBWwTgUgYi1yTbQ8Siz3J4MIjxVxQKqb5urQwnrUR15VQGdh20vrIMbu+pDhalLSLPgmynkYOf1ryXaF34Fwuw9yVgyWIBFey5/wqDhwohTRJsJffqF6sOVGBZLlJk90wZixvwKvSEtMdF/6H5u3TgWwilwob+k0gM0Ai++aUEBOC3HyT7bSxtgqCHy0fT0g+HVgoDvmDqswwL4JhLvIbAWhJvrHoWsF5gOLQQT4FfC023AFxQHrQ0yBQ2ATiIcEhazlhiveCjZcGSM86l7AfmyiDrur8DIPm7qbchqqKr1FXLqCqbuAykwh8uNgcwo62OSIgy0oBEPRHnwyRlshPbVYQDdCT4B4KB40WJbM0qmqU/w4DIzsRQlpUymeMSSpkBmgJMPPnWx3QphEj2a0FfPyc93DbLDdXpxaA35YivSgCKZylkRvYdencCadq5fAzPRWJXRTU6AGGrfqDUPJWGNrrWwAoPJz+w+v6vm2kjkCBBvNitgU2mgOtB9hxNjCRnPs38xKQqZYCiruXPhkn2MGyHTlpqNxVOPZeCatWTWoS+J6kF8YcJVxLdKWigW2hhMJyWRkPAfpDnKcOWdyq54mH2Gx8UdBwD05Y4T3TOh/Ed4noe9FuPvRz8J5VbgQ5gnthHy7WOIyWgUxf7wUYA7nmkHjwFIx7HffTKT8R87lTEWWL87lnv8DI88WjnKCG5hOBjgOnAEX0+OHQAfsaIupMh1p8IxOke45wJuhNKKJO8PBxQn7ZoHyOZhjeBTcHcZdvFeHqKYVCSSyu0P2bpwQDIV3gdqG8KJQlfobQMNi4nhrUzjxKkvcQiCG0IeQmLkhA/cN3GC6ILdRy62FMA2F3BBl36wFgORQyG0EiZl9kNuYyw2fcKXADWYUZD9m2dPsIJT9KCPUhTMCeL1yRmau1rjBjIKc19FbOZzzOrzBPIIkwy4J8nF1xQ0mCfIAZL6S4C1XIfdGkGTM3cBbLgmalmCXNajAyu0Pnn7l7+6KHhdytpwMT5pXVj/y/MVPQwHlc0Ua3l907zV/ePuOdwuNYXkN18I1iVCKtQsAKUmwxxqEt6VDGrAda1rpxUR4qxpxcnixY29QAuM2/QBXZ8SDxYyWW65AU8oUaMgV6J2b/ojpypEP9/huaSEXWiGHagFjykKiOFBiopAoraATh1BamAgC4RA/mlUhFDrRUFLsjVbshkQjLmOJxp/w5ia7CfBgXW6sdVVbph8L8A9tQxOKD6vlXmVqucrVKFzLMUTT5LultRzFfdaFcNKsAWoppMhVqKVAJEfxw1AgUUu10lg1W4kkKVfdZb66zbhsTkzQzfV2c0Jioi5X2GU8MdGIYbVvSsR1uSIgBiYCI8ZHIEhLGYKsc5UPE2QE9/huKUFWGUFG6qzZx0CQvdFnPgehYprIgBvwm0ergzAw+8cr+KGesQ6EUYcYwQ91iNHqMhTaWl2mQ2yzm7HEJL2zxii0Z2KSnm41kuyR2FOXa+yyNrGHEUx0YjcqIliYZLVGslhZkk0tQ7JhR54wyYZwj++OGynufuhddY96iGSkGLZ0NGBGfedahx97oouSqOpbw75LDeEH/LSQiJSLlVBujSdSuG9tspsTEnHranYZT+yjy21GqumJfUSq9XY5LTHdCGmU2zsxDZdNib2tO3pybnPkRPNPEhkDuirWAulaY3Qtis+yBhVQLetRBVYO9Ve3GMKPZnREVlsjaSFqC+zSRAOKat0BjWnlb3QdYaNdWkfw7b/eSjjRtf9Wu6x3w2lZvSv/Gv1wRZ4S1EGmX67sFi+mpALrXAVGXAOOotyN6A0sdwOK26R+22QfK9ckK6wEdYkJVlxfoI1BgUAFK065wjSFC7OehZmKbxsxx1AWEExfN5LVe5bqv7LVfQUl5jeKvtBkX6gPf2GYX6hN1COXWtfRtlleU8MZMDnHE3QaG+lKyBhMoDFc8bHP4sziFP5ILdvAeT51w0X33vP4fW/CWdAxFzzl/Qvuf3ft69s2FUYQNL8EDW6g0DIuFUymlGrxyxdufuy+1yB7O56O+3y/NLcRy22ogaLMuNywjFNuH9z65nUvn/92MOJHXW6lXwEMOOWEcV9ZRfdlbDc1UDQa9xUA+ekr5z45tvk0QAr7ormPlH58nftI6ceBBkIRZNzHEQ9IXKI8mRG9SV8p+Ticq/SR0o/DrEMfKf34KO6Xay0gfSifkuyhLFQ2pdmPuGzGZe/eL8lm2L0+jkTufsnrwOgwlOWPIpchTTm5DDYS6ryVJgwA2drJZZGCXBYZL5cJJSSIBfZx5DKALo+Tyxi6rKxcZoUci9oEDdhyJ5dVumkGuNLGb1fhh6bhdSj0uGl4vRW7RC6zm14uW2bWrD6I2d8plxH7eZxchs3gcnKZzAAINO9EZNRSU+cwaim5bBUQYzV3DqGWaqV+L5aVqy3saMaLZQYtHYhlANgpEsus8l4s2yYSBKHZ/gFiGe1+SsUyhLAuJ5UxODPB+Z1QhipD/0X8fyeVDYEaksrG8GMfJ6+pW/zUdYZvub7wwzLEwWq2jERmN71EZiDbgUS2pqpIIttotPIS2VZPKwt19w+RyGD+VCqQQXtSRh4rJ4shpIKmcgDG2yBZCDqpQ43iR5EsdoDrRgCMkCSGpe84QQwBZcdN+hb5NpDDgDlWkMO8+LXNqObFrxV2aeIXRqTvcE4O80QE5lS4wxWksd2Tw8YqTXQYQmcx8RxVLpLDAKZRKoYp2FIghSnWbokQttUK74WwZXbphbA1nnMgHMbfJYQNM2SPgh3sXAgz+a9ELLbyeBlsmy8PInj8vTLYOtCvvAy20T6qaCJ/rwy23vLahQym+N0ycwnEr5EG7iFTm90pJ3vqsr6pzX7qEV2UYKHWY6fbbxSEA+bCkzoAiXMOz9yuKCB6mTWei9c+m3BI2rnHF68x+EKLwOfQCQVi5Axa/xPlSF5unuRy7Fnn3c4ZboyI1NLJGuC2qUo/XdHi9+AqAMhrO2wVUNTZDpwQuWNfx9ZFcl8Hr3O8lNSGoC0MQNpIVs4FHr72zWApQDiRQXOMiB1S7IXB+nrsEOenTmAmGPBC7SfUG9kvGOgMnSEd9I/bWPDx/yxEnuwQqUI3LKvQHopz+NQuCmCh3a4JFZdheynvmhH2ytCGZanhIS2vhI4Ck6LYdyMEe5UDl9SzsIQKNLNRXARqWV4UXLFwEShkeZGIfUtoRoK5pGkWA9oGuzXejAtoebyrqLIKeeuMIKFsb3H1GR/W/0L1oLJh/bX/V9BZ0ySUSnmLEoV/8wirH0OfCxThNFWOJi9HfENtprHhtsOH2LbrSvXf39r1bpLsyYCdGUBfThNkMKAvvT/LN5EBe5lU8bSBcx2KWxqopNlhu41lZ52CjgKbDSKDVc5GT6X9vMCZ5eEGbA4EcjIsDdn12BkRmGAUwZ3Bwub095gUpsHxf0fkBDq5Bg602vMyoxUZyTtARfOZrBmkYeUJ7Ltx2Jyxt4EMRfvRJJECZxIJVgCFDA8q42OvYi9AsUs5/g12DW1KaMcT8InGURioLLQLwfBVxbsQ2rf9xkcbcxpqTwVD7UBrw0I8bnqHhK0axBIric9ILviDILD1QdpscsHGsdVES2yhVIYCinOfSLAXIRYoW/WDnLVO/I6Qm5S/DMajvxEYAutG7KCiGGhEipohpCham3MHzePLW2QRpDyB+PKOaf5fMs2ZaDpsjqmo+L2z+PjiECzAsluIOB/0+685Yxw3aEuHsl1b+RFrPDyGVwabnUFzGUjbhBMJa+J/1h6HiRFyOtzwWuuPw9zIZ/jdAMeaGjgQQsxQuFjMxlxXoKfA7DBReRzEwQTeIXr14WvxHmY5OPJxKxL+b7SR0U6dTe+O51vYWZHmADcakzNDPJ/SjMaR35Vij3BjiAnG2Xm7mGnOlY3zGNrQ7eIBQVjbh7azXgV4bO92mYi4/XMD9VA/T5XEutNe3snPwSPm5Hjy8pdv5zl+o7asDE7KfgHkIPD5ODDIouCJ6LY0bxJQdJCQG5mhvcvPB1UrWIAH4eCQ+grt3POJKvZZWQ6gRi7coODJyKKKjAIMm34XZbp6l2X6WjABmDe/i+odv1OXsHyyYBahCQBqCzF9pnSGaODucfkXgWESA5YDdEWl53GR+L2yO7Pf90Q+LOXm6E5TfqF4lDr8sPh/Bm46wEgL4L9y34595sP7hret+IplDXsBwUlqNzVwTtHOP42S4knHsSK2Cf+5IJUzQEPMUZks8C38xI2LAxeGLzrhodxs7SPLB8OcTdcS+2oxWEcRrLAMTlyrGg5H4F78WQgYtFKxMKQAskmBNojkDYu0xd5d28L1RGP/XOYTWGXj88Bk3MU3vkI2KZQf7lKvh80tivVbzH6yMWykW9JwxZzkyCKiCDFwUNWcaTnQoCSkO6PtUy5BJHj21yrEiqcAwlhdLsD5l4uHrFmD7kyQ9YP0C2Kn2pMn5nt0tTNodCF35cM4G55P0Ffxrg024BIQtk4Oa1XCHq9IHnsoxBeLR8FHHG5sR2t0DjZnH1rUVYSyVtpPZNqDjOgV7LiSGcMVIj0S5L4q9nnwcw9lVhSR03X3S5HRVwTW4lhskbUesjmJ9GbQG22VKyhwhDfdvvlnXTCaAHzL+dIUmxVCZ4d3P43MaagLMHRDdqtw9ko0eirqR9a7PYS9rUAM078g6lDOtmUJxJ0YiL7bM7Yaw4t0AhhNRPp46Ic7lzBD/kniNfmXoIpQg3L2KbGn66JNAXVjfq1UB3nVSZ3Oz433aebW2IpI7VgyA0TK23lUYCIFKhsjRlTOTdb24KIO1h0Iajo3UUH0eqzJ+VgmC4DPgcWImLd3Saz4ThNs2oieOJis7cP4nAUMz6O0zJPpmg/9IAM02UUTaJHZHUoUsh/k5DZpNnlQ5xyK4AwC3gY3PSpGkYVW6C6cANzb5sJ+Tha5xMv/YMf779XmyPGIicCmQ51qk/JbVyzdSi72zFrewD8BzvolAnhh6cZXE4hI7myM1AX4rSbaly+Ep6WZoOBzREBTzJJmdR643bALNHOM3httnbAa0X0RUQthDK+LwE6qYfZAom5OElOcuK4Ts6vx+C6UWGCLZMYu32qid02gUOocnrTEltM9ltsOANGZkiCoot5INBicJJQRyNCQV6tm46N0SYYRsN0LfURWPszKZSR8R36NzQRymP05QjFiGqlDMBuFLmF5hQUK8Y9uU1WHTou1VqxNNR7XOoEYcWQgiQmAiuM3KdQRmczik5g/qkUkscmKhVIzUw4FpC0gtRP1/CyDjRjOJruB9UCMYaC/sDA0ADmZ4CEKigMUkLWJOoptAmUwlGTFkmFPOorOMLQCQ6XNVhu9hzFMZJ4rc/kKohDSQt4wL2GMpvAMEGJo9Fia1oWpoeOlNRKxIxy6mrWEbFSFvzZBjNxdGVi53nDExTcT5LlwuwNwuBgILWpBy9WtiMYmEL5q0BGMpJER3mVkRRt+xmNLNiKuB9OgZ2tiYKezvsY2Qn8s9CbEMyl0IyQoNDmjvlWgWoqULZzbslK9XCJt7YnCiyWT8cLiy1mWFRlyekH0/wRcW8KgJAf5aShuMCgjVg2mZp7yJj2z/bwfcp2BHGKeqojtZ1ya87aL9U54wOKgZGLlmh7gj1lY8jtRw5z2JQvVxT7ps/OR48vkNrN0Vg4QxLg8ii8PZmJ0C6PYWrGGyxEGiuurf2ut4NI9Eu+PnRlVzJEgJpN6MSGGOEkfmkMRODe3Ksy6nEXoo3UoNT1z4K+rIANRBMYP1tnmHYIfcP2OWQwdwhDBVZ6Jtep1zvBCFJNM40A48MsCJ7AdVHeLF4CZy/FYM1DTqDmWOEUWIpIX4RKgcioD3FgYGDGKYmjxZwHOQQx7y6kEODloTQgOWMF4PZyoPozCP+MUJwoHzTUzaC7vUIpllTXXp0zhCB8DqPTowsMj3TwrnOO0eSDE9t15z1W3nWkr9LCZoy3US1fjn3LeS0KBCoABTYjSckxDFxGrKIAsItCojEfpPhh80lQTbqQEMnYk/nPNrAH8pyQsEiHk08jXvqfe/lzBZe2fit8x1wsC0iNy+3Y2onuNlPqbi4r9uhBdg7opuk3Fd1guChxr5aMWhw2aM9JkqpAJ5rTFcPwN5CJn+Bn0cEorhWhBcYvQJ+1HIRRCcI+Gn5J8ISSqgx4PnVUBZ8vWMwwwIRRmBlHDi37Ua+iYM1lVEzyz5BWOl4GNRAUdvxabrmrSh4d8jwFp0RpzID+AH6FfSMG3wPmgARAwCgB9mgJrQRU71CHy/hS64cuuPnX7ab+6emwz2CqWM6kPfn3dsjtO+8sJK4//ZwZoS/31uRue/tXq91dfjGtMk6nn71s98ueRl66+AddoSOZ0Bnx9EFf3JhBUsoaAB01WPC8aA+mTb3oDZnr8bXOx6eDzxPsw+OWT2FS5TUGJLvbCLvHrKNEIvx3blxqbrS4L6ffnVB0ffw3i1gAWfbHYJxzVQFl+3xYMCxt6QFV22n3KPa4bROPw6dSiMeTdpthl9iJSohbYhZvk3yqo0ES9oxaZD59gPIqu0DXHHzfvdjtjwsGP2D42rl8NBGgEINMF0ZEtNT6ys9R7l41Uunjx4h+yqOqH7Or8RXBhIrtNYZbc9o7Ev6s3FNAh1lKGIoi4EIvtYSNfrQhZ5im03mSH82aucUgT/zleVMYoKxxNQ2W124J6LrodR/7WFW3ZFJsccEvUnrCIGKkTYpOYGluItiHAd8ciobTStloZub0PNrCcntjLK2O3IZDr8Vom0WHeUE62QZlL/5MIYhpSgUcR37uIEoLD4WtINwfM9wJadb/GK3bREUjNBVdhCCQXTka7KD62jKzNhbvttwT6LYYp9pzFj851sGbfmq2oaYGF/EEYx1pkSLeq54yvllw4zJEDgxohBVcgdCj1S3yy2JwCEL0FKAx7J4c5cBAlGR9Org/9XsioiEKKFQHkeJ7cqGiNpjg2j399SJKS0CLFFEBodoOLKcRDT3BIbEKhM8TfR09oVlgYrj0q4vQNDT1GxEZd2/pamOi6RjpDgEF6XT9q4Qpxjk0MLTVtLP53pVAtzYfHALdNA4cWlVoc/jwOeFeuCC6sl/k1UeFOlhri58LflSc+2aa4sw3x/Wz8EYDaZEcQJ6ElUgi/WC1P1ACWd4lm9Olm569dPnPDCD+dZKAY4ugUxjkFUNUO1wkWyGIQQ3U3TfK8YpegePR13WnxVfBGTSvadkeB43+ItlZzk9CIXT0bipwNwszzEQmtFLamR3SU8pkrRBYexpcSr9gBCpUrA+tJDSeUBg2o2Wp1FxuEb9wITSww743Ps/+Ik+ByE7QgsT35zl6Grb/lJXXKmIgDYV5ys70x095YhBh3fGMKOudtzh0luZ09V8yYCb/CeUJC6PN10WYEc3LTsdxpXVwzF2u8td4DhDPOuwcIT13h4L8rk2trLAJHZBAD5bYKIYXXB0jhkdC7keQVNRbAgzER7sO7LjYvZ5G5ifpDprU2c8iIVcSnGOQRg51QnmuUaoBdtjFYGXCtQ6HYFuaAZIWyXvoFt5DVupH8N9FMuaJWCQx+S/Irdy7r4k9Ktci4lQY8YBAEfPWrQCIRvO/BvIHYixY0hRsgiA6JGO4QavfDp9RPquypPCiDp76fG6TS97kJODN6sIQ/7qMg+mgrgqUTjr/Jw/HL90MRijEQQIeHJXY3as8YepqGQ5uwmwHdAeFLuFWLQPyD3NRr4OqVERsI+gQUb0HZAocIW0m5JkJtYNnYIpw+9f9qgCZNPNQeUAHh1hgYF1TiAvPgFJPO8Rg6S4G8S0Sngn22VrFc00GXxLBcWMQtmzExUY3FRg1yIVwuC8Uc48Q3ngEwHy5+IcnBRmOi1uVoGpeMMW+ku6LYTpcvH/MVagzMKFp/I7QNQ1Qw3E018o8fJOl0Aj+TmPgvikPHNTyCFyUj8LOtM/3LIU0N3KVhtuxNPrKBK2+odOQOfFpjpawpU0oGTVQpmZ3zdNKsq9atUilwspKZhtDC5zIwp4iFBbxg/hlUU/pGkhirFuKkMC8cRGUkITQNjIrg3Qdzg/iF5CtacdfChqQe1woQwvlHQYEtd4STEwkZz0N8zTBGuE9ZZ6GTqWf+kjy0eMOFGbE9SjzRdgzf/RLNCXUDeiN1THQ3AzAyD9pG27yBto93hTNyAClFLYLil3tVAoCMHBE05+E2YCt1x62MxOO+HHvkM9GEjwRLHjTBOTdxuiJ3UMw6whb4YOROLxDS97UgyCZlUeBu1sJjFr/nJhfuAPAuHs3NCXaXrrFuwTuBX2niqQrKIJziUKLhNAnIKBM+jQ2gVs00MzAAuR0kMIGqGZNtSt2LPe/TUZh/dONXK8FEoL/5KtAgQSizjwDnAZp+oumr0X7nd8zpGkZ12tWDSISmmpw87aQtJ0H3uFdyxRNrzsCEdLKmmh/OgGTKKOZQFMyMHoHuiNOR6IH6SI99hF/GRzrtIyzARCtA3AqAFTYL0MICKLZfYlJy88Y1V2GNs3fyymXbH6yaHXyuyT5Xb5/DiOHntP80HUODK7wZe2panjFVc/GMKfY5FgWfY1HwORYFn9s1LawoU5Ov/+r2B+CZMCW5efHme7Ai90WZbkXRBH8EMdZYlJoPqTnilfFzcJvk56Ap4uemFz63R/KyW5evrp6d2DP52LuLXq3ZnZp/zhphpjXCftYICTUCPsei4HMsCj7HouBzu1PzeHLRtaecgWXExOTWS5+8OVooiqp8uFX5CFaZRcFstsuaY07i51Aifg4l4udQIv+5luRt710Jz4zEtOSGX9x5IYICltRcm5tHzMAuCz8HNPWZ0YOMHAcaOb5sTXIAqcLPsSj4HIuCz7Eo+ByL0mxFwVYZi4K9s5KaT0+ecN6Sd2pnQ1f45vXvnFlbKMpOa44s+Tlkyc8hy49Q8/rkyecPvVE5G9Pjo3899cJQm6vKh1uVj7AqHzkDaDAJCFjMcrJlubdlOYlZMsMp8dvIHdUPeiBBHMlez4tuXBzBvs+LTlwczkbjxU9xgfUbpIHWT6BYsCeI38k8dkXGfawQqDoLgaqzEKg62AiEBWNEB4MtWS2xIgErIYdOvju29AQqMCBltO6VvPny0zdHCnUW4yo3rPA5FgWfY1HwORYFn9vpsAJ1PIn3Tt5321X0mpiUvPOGpTuwzPOfU3y6Mp0rMcWynGpZ7mlZ7uFJPNFIrA7nSaxO6EmsjulJDC7sSSz9E8iTmCQCz4z2k0XNjA4a/55Hjj0zuoDUKz96Uaud9mG0lq/xXslLT3roj5i8906+tunXr4WGkyOw2OQRxiaPFGZ02T6MLPk5fHw8NUIEnpL8y2nP/R4TxKTkY3+89dnqwufUgofbWDnCyH0kyb2LSYAZxozAJK+mdUdjUlj9ypGZRBY9HaXV6QqUnhIiszr9oDHJeTZZLCCvZN1Yb9SN9UbdQmQGFVhIUIGFRIOwkGiQAr/+5RvrN4Bfx5NXbFm6ITR2wX5Zb1G7iMzIkp9DlvwcsuTnkOV4MqMM/BwIVWCS1y08dwm2xaYl169744PQxLhTMjs2D6bPLMGamSVYs5GZY9AorX7nu7L6ou/K6p++K4upFAjckpgWEFhdftB48TzrXwvEi4sJjFqxxqjV7hB4z+R1W558KEpefMrWDzZWjpuFxjPHXRG4LM8q4sXPP/TrCzHpNSQfvPM3X/3wbixNUiLRFNYHIaq+UXdvI6362kdixCSt58EkrTrToM1v86wzLWDXKs8UHX/+MNJOhRLpZTp/TU4uOfOxm0Is4n+EtBOTvzx39BxM8NOT2zdf+UJIhtxp38XExiwx2zFLzG/MEozZqBs36qqjfTgP1kA06nKGm5iYbjPcx6OgZjgNmYOdYiciNtU6I3nDmWuuBiPU7DYl+fBzv4ETblBVkfRwI+kRJCmruu+HUHZfKwZKymKgpCwGSlrg9e9d8vuXa2ZjKfvQK2++XrsbXAFcl1liPtsF81U/85RV3/OUVX/0lBV/KPTbvbAcKz+1qbfb1IYqsbqoEquLKrG6qNLu9NuW5DVXn3UzeO7eySeuWPhidaG6Yk6HG28vmsx3Rd3imRQU4edAn8LUtuWxP9wO8WxScuiFB18JcaAP47mYSsrx3MlG3Rlh6mrEeeqqX3nq7mJGK2a4YizGcItnclSJ1UWVdoe605KPvbHyXjHc53/7uzdCYr+KFVBXw263ZzRHCkddDOgCwx0bvvREMdz3zrjriYrdoC4mkNAkiYktmCSLZzR1tw+f0XbBdtWfBo37BmwXA8HPaKhViMCo1e6x3WWbtryOGk9PnnXCL+9n5FBXY1E2kMzUJY5kL94lgdHI/BxKVCqn+mXcNe/cejH2kycm73v1wutDXH4nBP6QyUzd7MPZrdhFgapwBgyoKk48aN1pnrHCBZpdUBVWE1UJCWKoyu5QtTl5z8NP/Q3y7j7Jq88Zgx/d/yxVJyffeOK6WwCQsVfygTPeeGx35F03mYHJlpvMyrFc9TtPXfVFT11NHIXJbHJiL5vMPh4FNZlpTBSWa1qovXbnmXf4qawq+eqSDb8OrYXdslz86Qjj7UdKnt4VXd2844jgFq6hpfeU5Lb3nj4HS+9JyZdPffzR0FTm5Oli7gNyeWaLOawcs51udFUv83RVz/N0VW/0dFXvKM9si6cy9fUFZL2sEquLKrG6qFJo6Q8eNZ77heT5+uSZl2zYgqmsAfCji9/dDXUPsxzPepww/WEqnSnJ5cuvv09T2Unrz1kWLB+OtBCSR9h20uHYiJsgtaOKot0y2olRA6l4eROgasVFnSzOJ2Dc46JREQ8n4EPUUOIijgtYlEEVh4tJuJDSsgUXLbiQWnM6LsAnnH/dhZ+NJoRE6BSrrVSsTnCK1eTCZu6KKvpLoFuFPaN2U/TsqNZPJj5JqKipxP6cCqRJH6PrA8CL44ahGS9cOIqwIVNTdS4c074nLubDumWCOp7ARy38vb1WiWbi9w7E3kemy7DpXmyyQ/Vo01GJVn2VpwTciXGqgw8xTjPhQYxTHBoVnA5o3ZenFiwWcDqwFdM/3Gebod+/6LGLrjvljV/ccWvFgvjzVJSMIlM8HGuCOynO25rgZjoVggDcXzHcIS0C4qEZyKb333vTBaef/uDK133CEUs42gTfEZy3NsHFswl93yfGvaFmuPI/eNK95y9aessF91QcawmHLeFIE5xEcd7UBO9euWa6xLi3ohk+KLdv3PTG6l+cdPEUl26dpRtuggMszhub4BkL19UgLe6taoar/voXLzr35nvXXfY1V9BVlm6dq+F61hBdIkiLe2uaAQhxzqqz163ccPu2R30NhyzhKlfDNb6GPjEzbW7dI/Xs6Lk/u+ayC0Zf8TVcaAmHXA1XhGvIxCxFc+u01Nb37778oou3vv6wTzgGUy62lKvisjJVHG6GX/qG9954/q3Lz9z+KZdu1NKNNbpGbBxfxY3NrZNSG5645bIzRv98yx6+DS3daKNrw8bxNRxpbp2YOvnZ099+5vdPrtjPpRu2dCOwhlYTNjL+QXEFNzW37pl66oUdv71p/QVL/+RJus4SDje6NmxUBQuJWZhmABG8dvqrv3zgirOf+KtPuMoSruN+H8nXCC8BK6UlZumbgcj2wEMXrz5v+I9DH3iSDlnCVa6Ka1hFbkL7xCRbM1yH79389IOnXLbjtGeCRrSEQ66OK3wdfWLSuRmGvC9ftXnx1Q+eeNW/+DaMAfsfM+hk0I+sqCn+iJoIt2twcwpmBEwo+GqsFdMBMom1NtsrI3iFre+Is6wRaAC+fvxqc+qKF69f9txdF181zQ8lSzESM6psiokqhVSTU+f/7rabzjv11VVxP4gsxXAMu2psgJjC3BdSkY4xeHVfc9nVj21d//zoBE9/S7cuZtRYjyh32t73adlwMfCXZ9dfddNd161Z6nvKENLVodJ7oHkb8V6tVXUhbk/DzRb6fovMsVZMeiBzrLXBXhkDVg0bLmbUWBOD7z9L6L/akHpr8eV3v3XKvW/u71mZpRhrMGpsaxA1CqmmpE68e+Vbl5x54fX3BEzMkow2GDm2ApvFVcmSsRlQ5dTDb//sxXtvuHTTYz7hsCUcaTCf3U1AlAnRA4ID2hElTl2z+o4Va1Y+tf1vwQhAwkmoNwfmZH7FarsKt/fEzb3QaqLmuoZWGWKtb2idaK8M2SeHG4B5wKZrAAaCbJfdZyem/jT8zMkP/uml0eeDPmxJgKojigD3pgofLyRrSY2t/O3pa69a/vwjAQsCiB4L7ygCeB/L3SdjUzQAAuKWm365/m9Lr93xgE9IfD5Sv94oso1IUr5oTMy2RNFT5z1127LFP1v1x2GfkDh+jah4EygOIQjSqapLREBO/s2EKxCt61shTIHW9a1uTBFFkK1XD0qw9eqBNhCmSFNqw+iW0+9b9P6pX3PfIlQhiVvv2Eg9CLInvu5T7ZXafOWfnl/6yMrLP+P5h6VYVW/0WFPv6OFTsSXqwQZeW7x84X+/uOLZGtfOxEAk6R05VoTJwbRsSZQ7NfbYdSNjl99zxiSXjqiMk1FpwLmgl+wJA3VjH7iN0SM2qeYfq3Psoy5gHzQJEoSZOtCyUmo0p7Y/sfHah0du3fwp34ktBXDjjH3UgRrxEDUmpy45feWTS1ZvPOXzvvdaimHYRqnmDCzKvH0qtgJg+VKv/Gnoz3fcvPKs+wP+bQnXybEQhCdAri8YE7MZ68A/nnj+zy9fd9GJ5/0xmISRcAqqDcEPfaTAQHCbQ3QiSKXGBxqgMZC6gIFwNUHwOzAOthwAO4vo0ZB6/K6btmx88bwlzwbCkCUZq3UcpBYE2SNEkCmpNc8+/vTVj5xwTTCeCejJwtc6DlLrKOKTsSXqwEHOveju4ZV/uf+/dwRikCUcqXUcpDZEESZmU6LoqTvOfHvzFa+9eWcgXRDek/yDVg9hDsINEcJrBByk1nGQ2oCD2CeBYWkcpLaEIhNT571zw4qXXlqyakvAQSwJECWNg5Aik0IUaUl9cMHb599+7XN/LXAQrFRZeEeRZZ4iPhnbohYc5LWR87f99bTz//INz0AsHdA6jYEQqbHAQESQVSh5auTEtfc/cO9Ldx/o+QdXxlwllPAP3MbwCfGPGsc/agL+YV8Ebqfxj5px/GPr5ls3PrX9jms/7/mHpVhX4/hHzTj+Mbb2hYevv2HD1Z/2/MNSrKpx/ANYpOP4Rw34x59vvuH2Sx/467aYJ7ylG3LUWBGmhucfKHdq/a9eO/PE5WuuiXv+AaV3Of6B28X8o9rxj+qAf+AVtluN4x+l1GhObbzw3jtfumjdQ1M9/7AUI9WOf8DOqYR//PHPS3++ZNHmlZ/w/MNSDFc7/lFdhn9Ug3+c88gN2+9/4fxfe05FhEvSvdqxDyItlrKParCPNae9cvLjZ/1205c996AxRRnugdvF3KPacY/qgHvQFkmYjsY9qsdxj6d/d/EVN5514nK/ziD0GglLH1MSllALxczj3jOXnnvF3Ze+/IeAeViS0SrHPKrKMI9qMI837jz1hrfvvuoPmwPxwxKOwH1LlK8qwzxQ8tSvXr/nmpt2rDx7ayB+IGE55oHbxcyjyjGPqoB52CeB7WPMo2oc89j+7IbXnt0yeteb/mMEqSNxHUVWkCLFzGP08cdWvPnKpoe2+SQEpGPhHUWWeYqEmUcVmMfy39w0ds37T658LxA/LCGAk4x7EECplHug6KkzTn7t8h0bbj7vjUD8QMJy7AO3i9lHpWMflQH7sE+OVjr2UTmOfWy67Y1ntiwcXvWa/xjh/EjdSsc/Ksfxj7MXv/WLW5965pHNwQLGkgANyxhIZRkGUgkG8tIpz72weNHZJ94SsG5LOOQosiJMEc9BUPTUnx699pkHn7zwLi8jaZeuDAfB7WIOEkV9SepowEHwChuPWHxsvEqwmGIO8syNz11x2iXrXv6KnwQtBUDSjINEQQ92TJ+qMfXOe9tfP+X5B2/0HJhglSx51LjURtgqK2+fig0RxWr+qd9sH/rlHaOnT/aUt3TAHDQOAuxBVKeQlg0ZxZp82ZbbT140dPktDZ78SFfgINNgBmgcBLeLOUjUcZBo6x6Og0DtzoYjHB4bLoqVJ3wSg6/ukbr+iS1Dq986Z5uXGYmLSMLCuFiEZbQGEtynmpK65MqLzvrL+ieubPAMxFIA4RDaRNQ8AooDeitIxVYAhVJXrHzm7XsXPnfBRM8/LN0IAEpE9wioWQUq+LRsRaEzLn99xYPP3bp+mmcfSGfsow49qAbmsMY+cNvYxx7U2Qu9UKu29RFPDQIJst0iRg3EkGIJC1/dI7X4vdNWPLRjyyszPfewFEOOGisiToviU8VSv7z7vKW/e+3SZ7/omQe8F1ly9/FlpJ9XgTAVWwEUSt34/iVXXHjLbx84yNPd0vUbMeZp2VhIyTZEqVP3nTs8eve2R5ffFnBvYgGKc6Bp2ImspnDNMMaxhzXAD6HjwOmIVjf5wH4Vlz81VU03NDUMFxJ8MHXtknceffnst566z38GdtV48QCj24FOQ+PTTEhduv3Mpx+4+p6bA7UVfQaoHhTVZoZUTwpLwqh1L7+1+c9Xv7X52SdcEotFIZq1jNc4fSt19rrzH7r9yqUXvezeJ8yLSl+HHZVWvDlDwetakc4i1bWi/vsoLF0rcmKogBb8qk98QkEFWlHy6QKMacUX9mYgAfxqSky1kARQxFJFS8PYOPSPNEFHNLIYLj9Jr9pPVshNQBayPbptutrgN4xie9wr8BPpidWZ28n3/L1I/FOFHPKhVPlCquC2/OvsN97+RQRWyN6daUVl6GK5vWUX02P1LDy90eD+IhWykD7ooqvYNOY2iyBIMfhc6WXznqliIK7GitTD1z267NXfvPqX/Xhx1i+WPnnJb39++xxe/OzhTec9+vw9I/Wxas6vTBHBATlVwnePf7ETrmrope09Ioc9vTjykx8d8t22ge6Dv//tf/9hLpvtmpvr+no3D/2z+3PZuZm+WRUH8PJH35j1Xzk99KcBvZBGBj/ID/bnB5OJH2UGBnPpwcFs4scd3X3ZXC6Bh4msniZy6f5ceiDdN5juTLQNJNoSX/ri/u3zB9OhVB3ZXr4zgDf6s5m+wR/m23syHYel55fLul8PE7PT8z9O1j/OzOprG8zn0snEV7+cKHnZf2LAv+RuBG989+DDDubf/n3Zvo50R3dbpm//jmxn2sq0P8qkpwMdbT1tOf3UO3xlIN2BLIJXuttynSDn/n29+/fProN/OP+BagP5dnyrbTBdj+sq99cg/3GgLeCvKXS/GX8T8Bdx6ePuHT6jz3n4Ovx7D/f84Ui84hn3tyeuJ+FvMv6m4K+tva2vM9vX0Nae6ckMzse5J40DGpXHufxNyvOUzbXzhGJ36Dqf68QpP4B3OjpAe54ynXq5oyObt7M97s6kmRUe45DNDwxmOvBjTj6T491cVon5/mCGZekYzOZ4ZIvynG/raWjrbOvHG53IobMzw5c7O+1551HIEKfeDI/5Hh7ntqHheM7wlM5l2/nFrq62DDLu6sqy6F25NpZnFloOR7w2S2WflUvjd3e6Dc8yvfhDikyuP5vDs8wAqYNGx/2e9jyPHdnuLErXk+bznkwaefXwuicNYvb0ZI/GsTfLAvZk+5i4v7sNxxzy5wsDWRwG0/hGz9Ft81GbXnSKPC57247B4MQ5a0fRsxfkRLH62nrmM8e+jm4Sqq8Dn+XlLObTN4tl7JuVQ/Z9mV6Srm+2bvUhE5Kjr08E7csOdivBwNE6Dab7+lC0vsHMnDzfmpdJs0P04a+/jbXrz/ZkZ/GqP92GBP39zLVfXALnXAZ55jq6eVD7ooo8MM/cLOZIquV6WYFcL8ud60VmORSKd3IsPs9p1iyXyzDTXI7047dzg+kudZHcIEYpT0dnc7Mb2gb415/mk4GBNjU+uICOem9gIN+LjAYGu3tRjsHunvQgLgezKMrgYFsHUg+i3ijA4GBmMN/JZ66D511nzHeyX+VnqZOpFfKDInt+EG2XH8z34qW56Zy60NxsR1snbs/Nsmsd3TYb944GEXhEZY9OD2RZnKO78iDW0bPxCK/Nyww0tLe1z8ehozvdg7zxA59ub+tEnu1ts/DXow6NMx7wRfSx9rbe9mwWpz7856kPzdiOlsFfuocv5dS3ccY1ThiKOKBpcJwNGrWjrmjC9jQ+yyNeTaNCSJnuaOPAxZnFbU+nu3DAqOHvWcwy3Y0q85QB7drT6Pe6ZHfHEVmn0Td5THeBeu1s0/Y0CMu8QXCUMT14dBqDpT09P8ssMh3zO1gWkK09A6q1K+OM9bj2DMiEwyCyzFjyHrYdjmgxHFlIUEiV6kFj45hu43MyCPBs5tWTzeo4gCbgWRXsQb/EgRnmB5B7lg2CI3LIYny2Z9Gp27O97Thg8OKQR37ZLLLOcky3g5GwNNkcxypO7K/tZGftWcwj+I4NufbsPPwhP3QtFRKsB3VHn8fXcuikPJKCZAs8po/hRYZ1zGXUC3IZNkIuM6ubyfW5XAa9vz2XBbftyfDHbBI0l+1T4iw/n7MxjvPRfKQ65tvJ49vznaxgHpkjwzxYYw/6Uj7Tg+/ne1DhfA8yz4OP8XFfp5KAwsgMjJ8fyufIb3AiIUiX/ECmTwTPDzBna6j8fB2POaaho60dfTnNMyqPI7LsIHcfwEn30e6YUnt46MWhF4OKp34cmABsj8cOdGacUHocMUPzlGXKvrltzKoPPQqnfveB/syg0vUPkuYdGB/4Q0vy1MnDrCyP/agnTuCaOPInugcO3Txk+vjKAAcLTmSeHegh+APNZvGMvo5jelZWyTWqMILYVDaQcBQz6WAjd6Qx1aL9UI8030/3knt3pPsGSAn8zusuugK+g2lFxYZ8gYJ3t6FRcOztV27d4pk4ZZGwGzUEqXFGu/DE73aznJjLQMLuNHoTjhBReOriQdXt5ujEFI2eyTzZz3BEP8Cxtw/TGGYZTqM4ZZUWPQxMpKM738F5Bec+ZpzPIXVmFumbwUSCeQs/chzUHZnBzDHMmwJGR2YuxlRHD+dWHFEwTKeZLjzoaTuaB/4iL8IRDB5H8FacOBZwFKl6Ml0oY08G4xJHFaYnw5yyeoltgnGOD/eg+/OYR2XAm5hpnmny7FMY8SJYT17tlyUXxJHEyILLQgKiQIdDVxckgg6yAhyQRxaDAjMEzmDVOHIGAKNEr+Zr4EU4gFnyjV6WLdsrYkBE5WSKrNmqPHdijuG5K4OpEWeIHhg++NFn+fcNQJ7iJ/oGcxAycIbAzpYgB8KBtzAZ841+ZpxjjyGXxoEfBN9XPqoS+BHv5VVLzGNs+myeczhOOVILLFHVE8Gz87OYKTvIsHjk+MepCznl2lBYsC7d4AChHIsUubaj8flc2zHIGJ2XL6U5d+KUZh5pNC9ZGgdaLkMygYGhHXLoHqBSLsvf5J04qpRgWmi3XL4jw3rl8hz3uXyGRc3lezW6c2CvfJOMrYM1ykEw4tv5djyFOADpHmfknO835t6Rz2VQUZ4hm6AoeTfC8jmOTWSkoYW+Af7ZkScNNDN1gjF3QirD2MKpHwe2BI5kgp3owhjRnSRHpwa+bqLDdaI/d3Ikd6Yx3SJBmmwbJ8gJvMLob+e7aYrOPKE/64zG1OskJWrcmdZbXeASvOiytzBsOtMSWDvTHDk4Qm7ii72cWnAitcCtSUGK5pSJcOabkulwovSDU3YATYUzBgwXOhip6HoUwrCmQROBnFzcKAnXTTzN5qGfjAln9FAmAS35pUF2vE4M3R60Ks7kHzixS3VmIGKjd+CMNzNkFChApg2tB7mez/EdPkE/6cRAZ3Uys8TEce4jD+nM9KR7Ic91gtHocV8Wsh9/qMPjxMOAifL4YV0aP4yUGbZSZgC0QUNksK7hIMOPfpEQJLKmJSWZz1y1TGZuNqe7x6B/d2a1RMEJ0iU6USdYTifYAg/9kIlw7mWnwspKrZjFxMlUWGXiqAMLksV6kidSWWMLx1nofTixdhhdHBk4H40DR5SteDrBL/luhh9Ex0M75MD+cFBGpDjGBw74JHg0DmCUnXn2GHR+9lPKsp1iezjiLcihXQ2d88G18b00+niOR5QNgj4kSRz7eEDfAAUzuoMccMAvTAs4mKCGc18WUn2aIosGfxolIAnSXHThctashrRkmHRGkkm6px0iU7qHTYD5EGs+lqAnPQvrEJ5FXpyxarIfcyG889UMM+0BFTGA2jBR4ESJDSewLN5NcxpM92Y18aZ7+3vQP3HKcrGDM6qNpQnpjxM6DYcB/iQx4pwlR4T4ysqgj7FufagBc+6bRSaAE8dgug8F092jmH9fD0dYGiutWaBVHyqjE7sG53cwI6oxUAAMRbtAI6X7NE5w2Y/eiM6WnkMZA0e0KmUg/LE0OT0Di1SNIGsin1weq2KM0DYmxwoIuWH9oxKhH5NG+BwFp/QgZnhUjb1ZjzkNY0RC5sKxBz0nPU90mAfuRqrM05oeJ5My8EMkn4f5ksWYp6V9el5aPBLnXAd5TXpeNyQeZtOdgayOM8Yqj7qnG2gRNPE8TIag+Dyt3XASOeZhCGLY4MzxgZP6e3qelmg4kRbz8WA+uCi6TVcbZWScUB8cwO7n44zSYZ2P3oIjeiwE2x4ekGEXFwo4sAfjxGmgC5IG/jp4o2+QHbqL69QucHJSuQvyE/5APxzZX3HKcDHbpbVmFxZ6mL5wmZYiCWcI2WRlXWn0aCYDB8JfJw+8wnqcN9gCXWihzFy9w5HYJUGnC7NkF7gtfkHJoSJkMDr+P3FvGVfV07YNn7uDUpRUCQMx6A4DRQFFQUxURKQbacRAEBNUMDAQG0UEFQsFE0FMxG7FxkCwE95jFv/ruv/P8+F9Pt762+ew915r1qxZM2cc5zGzIYO5+llvQqCFoRxsAEPAamARDmcTINjsRcG0HBwL9hG7oVDmpgdBF3KHc9+x9/Gcxx4UmiwPikCgCcG6CDEUDohgNx/BbhEFu48IbuaiiIFgQRIk9Askdwg3tYIiEhDDQXI1oCOiobeCoChxFWjJIOZGBUWzO8KkYM+QhWUQqIybXizKZC2NxvTlCtQPzcG0F0qoNUgubA6Cq8DVxXlxQRyMEIQ4C7BOMNdLUKJMYhoxHYI/WIsQRrHjmBpkX7IWwZ1lXzMvCRI2G5K5q0HwNfARczuCEvA2IQp2MwhuLjfcmJMehOgfHRzM4vR4FBi6wYjUk1NYwTn3wawNwfBy4RczrYGCi4FQshgKBRxbVnB6LhjxC17saIwpCDbiguFPsDcI6gBQcYMKZSj6EwW7Os7E7aJIYAMgGL3HNSqE3VBwKFObwcxeBIcGM40OrcUGSHAoDE4QexuL+pjhCEYwzQQbmihYFRgGuEoEs3+QkTGYQsER0XAFIOEdQbJbjGD2CzIJAjMjmA2M4OgA+AQ4mT3pYPaIIdjpmC4REX4oAdrgwuwZ4naZfUZvsM6HbzCDCdYKLkqGZLcQyzQcJKsUsTJzA2De2aVg5NlRGHUQCF4g2afR8LLZMfBxmUTr4CziC0xPHJnAtQ5DFZUi6GWfw8VAv+BJB6dEykMQpMZDwrlB0BUEEQmLwgpuuEEnBkDEwO1GvIXAnxXsk1gMMshENoZZ8MXhJCGAeiBmcYewCB8iAqoJBWwiZCKqYTYzBOMxpN0+AghCQA4ZiaGFIgYiCq9YfBiKzsXfOA4C2g0eB45BR4aw+R4CXcseTEj0DGBKIZih8D0AUuKy0RgAEKHMK0XJnlkIC1hCgG6wT/CcQpghAr6F+hmcgRvjTCFGU3sgzQ2rEDhy7E/4XCGcbxWCsCqEjdOQBHieTDLLioJVgJmJSICVDJREgQqAIXAHsAgUkn0Sx6BoeUgKQzzkzBMMZSAYnpAfEzCY8HZD2VnwAlmQw+4cL7gKXMkpMuCdaEQooGA2g0LxzJi/jJLpD4xgZuFQsKGIgkMuUSYw44DIKoQJzrwxMB/9gqLd/YZ+DUxmMpTzZvAHU3koYOtwB6FRzHqwAtOZK6Ohc0PhG7DmRuGpYTBBJccznzc0KozZPBRMh4RGMcQXBfNkITFsuZrggkMyiJwdE8fCLRTtJ7KwkBWc0USJ58KqBZ7JvsX4ZKMPf0RDcCMRBbNSKDhLHwqVJweWzfobHgf0PD4DUgoZH4h2Q+OnyMPaoaowPzZjULAXUJwwDF1mOFFGMRkBHR8WmIThEBY9Ay/M2DDmVIRhcLBBxdyiMIYyQbKHGsZi7zAMBfQMilB0I4pwCLQzHK4GEOFoeTib0xAxEDCOmMJsEIczECAcowMvVnc4M3sQwXC3UeL5h6Of8QKmgdPZLUPAeUCRFCoPj4IRC48KhdoLRz+jqihMgAjoG7xwA5BoDdQgc0ZRpEDgTmASYyCi0A+4C0AW8fCwoSC5N0wZQOKuI1jcxyRGOzsz0Q+CVQ+lBhHHjAkCDO54hBDAOLjLBPoFMYH5Bolnw3xgpr8jAqGzMbjZC4MGkhmuiMBQzouEY4xHGNH+UVQwdAmKOIhohHXsM6Cc7HsOg2MQCmpAiAUB1wKqE2Usc1MwXLkZAkSFE7gkp30iGAbLASwQrOEsyohg7kgEsgN4ApyfCyecmR4Wc0Jw6g1uASdwYDRyRezqgMRxddbfiBFg7VgeBIMGBW4umvUlsAmmqzmcBoKZZs6owGVnpyKGwZcJwZzfDbSFeUcRCVHsdrjwPyIhmc2kiBQ4g3HySJZuwmyJREOgDXBByCiMZERk7BP4DFxsFukXhqcdyZ5wJJQ7LsQ0F17sKix8ZrMCJeBBSM7nRskc80g/5iBHQu+3F2gCJMPFUbRfOpZNHRSxCHbZe8TKEKxxXJ9gynMn4W+mEfAH9y4WbhiK9iOSQyPh7SANhPMxVjBSUeAS0EdsBKDEFVhykuFfyKqwehBy+UFGsEgIBTuA6y0UbEozJ4O7D/gKELHwetvDJEg8ZEjuIJgwCITP7Aum8yFDYBoiYXfYHWPycYMEfjRuC6qXqxPjBO1gMxKive2Iy3HtUEBp7CzYdO5szqowYIJdjE1aiHjuMbDbD02GqYDkJkEk8nbsHAQ+aEU04ACcgrmOF9OSmAOhLBpEydQDivbehUOHW4hmreIwMUhWSWwUC36RjMMIhm5EaMj8q38iRBRcTbBO3Ojg8gORbBRChEIySCoSODn7MoE1CgFAaAwGMpJy3I3hBHbTcHw57B1/sA5hai0SfiJrRgqAjSBWcMM9MgWtjPJjkweBNxMx0GUouCxCFEZKCiTXuPY0tTyK5d2ADYZDoJeioBkQQbDPoU2h+6P+CaqjEC4jjoBF4b5EC9j4x4vLmUUFJiCQikDJLHdUYFIcRDK+Z+q5/clGRbOhHRXNIjoE9BjTrIxmTx+PlM0VFKz1zJAij8jF0Sg5gdkXzEquOnQgOxiNSWCwLq7XPn+jOMiRgazRSNTAp0yB4OwiLh2KkQftAUiOK7nbiJ7BPZfoGYkcfIekB5wPGEtMCQbGsDqjEbXLgdayF3uLZ4UmRAcxA8DCjuhwuD3MD4IHxGqMSAGO7i/H/eGqzO1lOR4MKXR4NAJ57g2eLxwifACY1Q8SQ5t9HcO5ENEx3NPBGGMqC/lxVhHUAVOE7agSJAI0PGyEM6ylLPxgxwDQYnFbdCzDNeRwqTikoH1AIvfOeRco298xVwAFZ/WjWcCITsVJ7Okxjxkv9ldyCiyEPJobXPLoWexeOHcnBvYMTyeGTWcOrItBiIKbRREJAT3HJJ4SJHoDkmtFDPxtJgH9smM5rBRFOBPIKrEC4zOGKbUYTptBcoK7Q5QMsUbB4AeUbDbFMPsW45fCzV3kkFkj8Pxwd1xCGQJuDnsDq4ReYd2OFzxlXAcRM55gDOwbu5dADvXGK4iNGJTsEaJgRo8lcmKYQ8skpnlMCIeexISkYD6i82IQEuHTUH/ubuGusVEWEwokFjKYvQJZLcy7hGB3ymwfS7gwCDYmFO4xYJp4dnfM0YCcNQtd2N6ncBPY5VkOktXOeVYcrIhmc62I4KCxGGbTmMT1YMPYJ9FwvCBwMuOvQMLDYJJ9xaw0CqhWCNTFkP+YaLit3CHIiLMGMwD3nz/iQtl8xB+sHnjCuN1/TGwMGzWsPwGts7vhQvYYlvDmLoGAizWS4fasX2OBN7OvGVbMfcxRQVDGsypioT+4t+2nstEJCaPHvuPuAUg77Ar3lnsyACi5DolFOgiSKRncNIvU2CgCvJXA1RTNoAkUHEyMklMLKKGiua+jg5jE4+aqZpEkayS+bD8MTgRHbWLt4Qg7KEAZgVJCj6HjEhBLtbv8MfBFmcqN4dyImAQ8byYR1MUksGnMHdJ+BwlggLS/5SRMJJuVMchrsp5OQUvhXDDYjh2NElm8SFaCtxCLkkE96AEYHjx3Zn6YmAXBbgkRL9MceArI6USxkn2GAzH38IQhQ6Mh0TguIG5/SNDg0E24bgwEaz5LJsPstOsiRMtoD1w89id3CW5SsyQzqyAJr1lQMe0sFC7TyOIcdvFA5glDcplgwOkstEARyDQmSjb8UTACDQouM4LRwp4bBgtnhFCy4AcFm/Ox4Atw1SJMZ98Fc4M2NpB7pqAl+CUzyc0NlCx857gLsQDK2K0CxuXMBf5gngUKZpGhjNjoRQErx2mmWCgGdmcYqdBwKJh3hIKblSgZ9syQIBYwYRj7I9Rho5mLUvEHc2ZRIGThDo/DNOMaFMdAPjS8/TTwkbhaoTHYpVjwwsrE9u6Dk8Aaw2FTsSGw7eiD0BnsxZLN3CThlDw3UdqT+sDx2fU5k8tMAk5kwxTThr3n+DVcjh9DkPkPbPpwkt0787MhWMOjQTZgkrkamEzM9cRk4YAcbrJAhMOD4bwSTBf2FxceY6ogYmkn4EBynzCHOxYMAXYJFgjHQkXFMncH4Al7MRpLbAJzH+LQALyYbUHBRd9xfogi4thAjYONYV+D+hTFinYZzwS7ThzzdyDYHULnsyORmoJzhzIayCtKNqQgOS80jhkOhm0z9BJ/MesAgYcCybnLcQhj2LsQDBhWMA0Zx2hRrBYA00jyoHkYtlziHH9g8iKtBWAOksWaLMcFJB0FkAzkidiLOfYsZcTOYE8e0TfTwe0UP1Zwcxplu46IYz4ZRDhEMGfj4O6xYY4CrWEjGEMfKpTFvCjwIDhSI9dGOOCBaCFcHTZQ4tCb7XVzARYKRMBxTN/K40K4WAAFgjVIDsRByToDGBIT7GoMcoAnhL5k6DEK7mjm00CirhBuFMUxdIhJ9jHDYCHZl2y6QCZwaRn8wbo/BLqdfcdGRFwIHGHWsBDcNowNG7WwrqiKDe64UASrkGxYc7lC4LRcd7B4AQLzG5K7PoIGpg9QckOBy25DstowryE5bwaWLYEN2DgECHHMdsSFc285bAAFxks4s9eQOCecpf/iwpmuB8SBp4kAHoKBCZCc5ojjLCoka217xIuCHRXN3DQU7APWsRyOHQePF5XBtOFjtBgnRTKMA5IRDOKACOPGolgMA4nLAGNA3zO3Ny6avYe3yq4azWWyUeDoaPhdcfBNIbgegF8ayh2DRjHZThjBH6zvEe4whwYjET3DbATGM8wsJDsfXDIINjIZ1vmPFkPBmgYXEH9z9huSw59QwmuE1YTjzahz7Z9xgxeuF/c3qwshBHcS11OwJqxxMQwWgGSnh7KQETlTTjL3mtOabGjDP2EHcI2D4wHBiF+QDPpEwT1fGFnEYVy7YB4Z34mFZRxTDdEg08soAkJhRVGy3oznNAGCADaT45ndY4laVAjYFtfgNBokqo3n7iyeJVwgWQXs0TNYLBoFN0zjueEC2AYtieeeB9L9jACCknV0PKdAOBgVkj0Cjq2LNCCjCLPZD4+d9QXcXK4OzAqGaAF75xiwKLk2t+OgiOSYTGgPcFAydxUFU6ZxCe3kWZS4OhwVNuxxMuvuBMamgWSYPkruJA6GjoMyxgu+ICSjO8YlMCcIkgWkKJjhRMl6NyGWy4+hZP0HPwYmhfujXfHjj0QEX+AecZk4lFycFZf0j2ZJ4no6iY1imDZ0ZhLz1SHZVZM4tZLEZk4S15dJnEschzgTNacgJYteRJTFuBRxKchVQnKPpP0JMwImVwTjhREErIF1HopwCHjd8Qz0x/Nl6RUk59gHOB0SZJZoFMmhcjxsXBESlbLRy4I9vFggwQit4FqgYH+j7fGsH+NZrBuPsAu1MYQejhH6ChLnhQSyJ85cJe4T9ie7LUhUA33IFEV8CGMVQDKPCAU6KZ7h3UxyyoWNMNZeplyQLOQ+gemLB5rG/c2uFopHB/QAL4aMw/Yx8BUMVNYbnFFHRMvcQZQMq4eEncXJUNTx0egN5szFY9Kx63C0PzZ84eejaCchcsMYguUqUXAqjhvUENALDMLEC74xJFO9GOqsG4GRMP4qStSOYQJrjDuHu8BOhJnjWsa5OCi4NkCVxAPiZaRZdCgXLUKy0JuVDH5DgQEFGRXHRjX+wLU55hAkgwc4Xmi7c8UmFxMYmJhg7Koc9YSFx6x2pLC4GjDgIFg10YjrWMExKTALucPYPcNpYV/Aw2d9BIIQJ9mtsyfM6EHxmFBMx/4zSZFi9GOChcLw8BigxDl6ENxjAcTNHngSRhO+SWJqERLfJ3G9koReS2GjNQW9ioYnBOP6qBkKDfku1M2ugYJjAyPe4N61E1Pahw1kNARHUUfBcIoEJBBYNAJPk/OpUTJqNop4JnAuHhHAcxiaKJQcxgr8CjMpAURV5jImAP9nb2M4NDMhBiEVHlACImNWPRQ2BNMcCcjtoU4kJ/EJUxTtjhfz4DnKOQSjLKPgCBL/VI4rMccn0Q8OWTwrEqCuE5EwCIRkdgyS8eBRoOvAyWcvlntOBJc8FrKdigXaJjub+dqJYBSzrsGwSESD4PAwTIfFmUyXoWRVB2IhAgQDA1kXsGeIkr0B9SECBSY7u1Yo1+eJDOpmzQv1b78aQls2y1mAGA0Jrx1UCCS/2aEA/7gSVphVgLwz7hMld16cHxPoe8j2z9m8SGQEITkjfuNvjijJkb+RaWG8VFYyBjpHfUqEe43qk/4RaHcSKAoQ0HdM3zLB4JAk1l7GyWFjhdO6ECyYRoneg4hhAjUmcQmIJOYfM2MC3czyiijYo+U0NQTrFBSc0kgKnIFXezgMHQ7VEYCS8asxvrmcFzjquDg6P4nLXkGyP9nkhGQ1MU0JwZrGXEkILgJPYvoOgl2fZROSWAAJgTPQl3gxtxUF+4ZdnKEqEAy7QsHdBguzMJtYGIuC+5tV1s5RSIoGdprE4hpIbsYksXwlBK7A7A0HbkKwy3LuESRrDNM3SQhW8SVLjLF74hQZJOtBzoCnMJWWwvorheVdk+Qp0Qnsxb7iHKlZIHb4QSL9ykFrs2B/9MCOZRC0P9bR+Fh1ILa+xw0kZIz8YYyxGZPizuVmtP61lkcbry7/es9e/5wzETfRfsI/H2BlFPN2//X1P38OZVxeuAIzQmMs7OztOSqQvf0wVoxkOcr2o/QYuwiN0GvPEOkBY4jTgx75b7P1mMLSI/qCtmuwtUfW7eV/zm+HavWig/RY/8bphUbptYNp9npkiWN7/OtYqEvWVnxDNB3fsXVH//mOnf0/JxPNxvds7dF/vueoybidfHzO1i+xO40zt2wvzLjCzLa9sGovzLnrdP3XWqdueOngpYsXtpXU00uV95frperNMZQb9jdNNjU1NTM1N7UwtTS1MrU2tTG1NbUzMzUzMzM3szCzNLMyszazMbM1szM3NTczNze3MLc0tzK3NrcxtzW3szC1MLMwt7CwsLSwsrC2sLGwtbCzNLU0szS3tLC0tLSytLa0sbS1tLMytTKzMreysLK0srKytrKxsrWysza1NrM2t7awtrS2sra2trG2tbazMbUxszG3sbCxtLGysbaxsbG1sbM1tTWzNbe1sLW0tbK1trWxtbW1s0MT7XB5O1Rth9Ps8BGWCv7PuNHHqzte7DkQTyASicV8iVgqkXWUd1XQUtRW6qCspCLsIFBV7SRT52kINXlaAm1JF15Xvq66nqCfwAi/QW8qMOOb83bxi/h7hMXSX/zfor/8VkGbrCQ5ZVn2NtOJk5Zlrez6SFllpPvvP8Ymg6b6+D5bkL08J7fowPGK6poLFx+/eNlGwo6qfcwsbewdBriN8FmwHF8eOl5Rc/Fq3YuX+IFBZe5be4dhw91GTAsIXJCzcdOFq3VKHfvgI7eJU6ZO8w0IzM4pwinVF568eNms1HGYW0Bg2oKyypOnbt1pbsnIXLaj8OSp6vNX6+4/cF134krN1Tq30R4Tvaf5Llm+4sCRo6fO1Jy/01FdY8rUb99b29IiZz5+oqwbFd21m++cuaX75lVUqmvo6A53Ge0xafLUaXPnHa6+eethc8vX2LgV8QlrDYxNdu07eup83Z0nGwbnrTNdoXv95tW20R6Tp0ikKh16mzR9jIq2GTBoyLCVOWODE2ovXKu/e+91axvp+XZPfyJMd5Z2EYo7zt+rnFYs0pXN7yLQkvKEJkJLoUTAk4glHeWeKqqS8RKBsKtcJpAKJAK+QMB+olagIOYpq4lGS7pIJkr4YnUlT+FQgZGAJ+woVlG0F3br5asXKQzrlVYrSt8v0Ban/xV4S9RlmrLOip0Vw8RysbbYW9JPNFzeX6go5AnMFPoLtcUKgrS9+MrEbJQgbYfUUaAicJTYSvuJ0ts6akpNOhoJ9FX0VdKyhOl5Wgpqi1eLTEQOEr6ypiztZPd4xbTb2oqitDZR2hPFT5sENrL5UzunlUvTLonkmg4CudhWOlyqKI5X0BFMFnrL0jI0u8rVZe7CtKXi4h2KGkKzrcL59w0kiiJRWmGH+V8lPL2+YnybLUw7KegiUFEiMY+Hm+OLJBK+VCrjy0UKfGVhB15HvqqoU8fOPDW+Bl9Lqauom7QnL0wYzt8nqOTX8ev5NxVvyW7z7/Dv856KGvivhW/4TXrNwh98DFSeYm+HgaM9VhQUbE5dtmrttrLjCw+IJTLrAQMnfL5WL+ysaW0zYeK8PaX7Tlg9VV20ZHnBf0ciG4ijPQICpx452qWrRCpX6KxhbWe/u+juPZnNypzdErnDwKDQFbnRvqeaPk6e8eVP24aNxia9Dcdv2rJ1+45du0uOV54TKyiqdbMfNGxM4a7LV7ZItLS79xo46PX7j23VNUK9Hr0MDC1s7V1HuHuOHT+BDbrp/oFB4XHJc+Yt3bFn3/7T10r3RUWvmtY9VSQQGgmCBDwT47T0bgIzla7CnjIdUT+Rs1C5b9oecU9hT6Gh1FJh9ND5NjJ1uVTTYZidwF8qM1UX6Qu6iHiDbYUjRSZCuUQmGazXW6gosxbYi7QlQkWJp5uNhZKFxFgqn2/gNdpQ2ldd26BrZw3ZaFzAWUlLIhe7SnvLEhQGOfUVO4jk4jFinqiDQJS2bIaOq1SeVjit+zAFuVipk71Ybt1fqJF2zDFgrKKrTD58WBdX6Vglt/mS4fJuAhc3G4GyVC62k8jnW2ulHeWpmCtlbAxKUEg7t9TdX2mByYr6dJetx9LtJH2FU8UG8uFyQ1Gn9P1TAkcK7SQdB7MxkPdDuuB2X9m21/MtjAQdhdL5WUuE4SIlgUzSIXe6iyzeMe2bPE4aozY8bUNnxYkyrbRF810EmUNU1BZ46qY19Eu7ZSTQFvLnD9btaC/iLXia9r2Pu1Au5Gd0dHYfkHbWUcwTjhd1seTPV+4vDFCcIE8rte2m1F8ow7gXp23IuIubVhLEK3pLMItUFIW2uBlDaffR88cpqglEAomsm0BBJJbLxVJo1bRLveQLxEzXCogysJY+RzSdfDptIVUNPV1Fvem6H/tv6dfXVK9/dOHT/vzd0410fk83plY964K26dZ/eQ3WPLm+TU+lBptiZT87E82tdqZdG1w+6+i7N4c1eHhE63tuqtzqSXV+YwLrt46h+/pe9LRhrGmD3/jSZ1snXHvTMEGPoiY289omUgxJyIjH4/Hxn+eqYKrWgRcIJcLHLyf34Ol0maJgL5PxNIU8GeacqJ/AUdpXk6dngxOEUigLiZzfjWfPThdKcYicr83j8+0wOYV8KCeeDl+An5TFexEO4HXmq2Pq4mjULeVJBHK+Ds8B5yriTENUj1rRUTyhhK/A1cqahIvy2fuufDu07z9X6cZz5Ql5qJwn5Y3h8SWK0hk8vkxBPILfBfXxeDbKPFxRpMDrKeMFCXliNIqvxRcKOgiV8KeYp8JDvwu68XXwfzCfJ5Hy+AoyHlQmL4HfnZcoEPJlPLHgAToBrZWwGvlSsZzPM9U1E5rivYhnKFPEHgg4QGCLL3GiwF7K568T4JcyJeyCAn7NYOJV4ef2s3nY4lYcih+f5GHrCE8+rCvarsUX8fL42qpKPAOploKxwBT3xuf35g1Fz/PxW2RSngnPArXy+SLcd1++lNfEuo2HhdsdOnQg1PKMt0ZEAtyl0FAg5O1E/cRfr2AmTOVZq/TBXcoFZqhRwhsg6CniSQfiZyAtZRjNPF8B60gxbwtPIFXjepXHU+cpSwSiKim7EQ3Wo3hO7Cge/x3aJUbZhT9eyj4JY32BbwMFeKAikvH4X/E8MBp4K3E1IU9PbijmnpKYLzBGZ5MEncHzUkdDUMssMS6A/sZIY5fi4T5gN4g3SDiG/W3M1yDcs1AklfIlOsLV2M5baC7lKfPURTwV1NSRq0WEEcsbICRJpISmpzUTpTEHED9BT6bTeTzTmXyZSJUXwNNmfaXQDf2Mn0vklrt/eKUffMJVhSa/CN57+LiAury0etfWpkLsV3r/W2Jx/PZk704XRwnoRJSag+FuHvU5zZu+7bWIKhy3+NfYSajtyLOr1noi8m4pM1i9UUyzHvVN9PQUkFea4LRznYCSUgafz4oTU1tk9abIwXzav0V5RO8uYtqkueLPzlvwaRVP5E/7KKEC97TCNZkS6vZH6Gpezqe3g33S9vwlsrsx0dj1HZ8mVcbz/SREbbUD/BTGoL5fU1fWLpRQ4hnf1WdkQvL4s7WmWEtCC8RlK+dV8ehJ0/iLl8OJBvZb1lfSB10y6oPznskisjKwqBKsFZFhyoh9DpF8KsoLjSpEd50N2mezDJ+/524c9/X/KLsYp7pt+Sah6/vy5NEZPLJNPPnN5Y6E1gXMLZBMEJJl+acuqxIF5FDv1Rh4XUabC0+qnfdXImFiyKXAkyKapz/gfNNDAW0wnd3FCZsVfLjxdaq2P5/mB15JMXmrRD8fdyanrwvOkEJTBR/Oe6xD1teaVYr0rVfV/JlPpHTEfaCCwlcpmbnvyFxlLqKRA7bf+DlbSgNzBt8R2RFti7utYXgcMcGrL70NB/LJUvvs0+sWPJq/os/P6x5CCtkzaxGGBqXcWjVpTYqQtgRvNA1SElHTy5NKRjf5VNO85IhGi5hM85rcd+8X0YvxMy906CamDmGy2nwR+pu3O3v6LEVS3n2sIWCrhAKv/9nxRpdHl/d42JRXSshj1Mcvk01E1CH757rBZiI6MT5hUk4xn5bcvaY0aJWY1gxxr1g4VEhZnjPMIi8JqGZbbHkI7n9jv5aw9G0i0qvYKXWu5NOQcVsevUuWUncnK9UDbXLqv/BrdlOCAulGda6bulpOx2+77KhK59Gnj9YvA/BrimNpnG56Lo+mLk8uaPnJp8MHBr7eNY5Hmel957c8EFBe3qDjGr8wHmzzD+V/E1N25kGlyRjfFQfXviq2F9Kp7aNXX5sqpxmjtMvjJkjo5un6Xsc8ZdTJqc8920Eyqs3ILTzpJ6QD+uZ7NvSX0Kjv8c5JwXzKTCtr3B9AdKG3w9fRzQIye3n91ofbPNp2sJxXGykg02mrbu56SjRH6fLVo4951P+R3uiisUQ/t9Qc+F0koa7+uwuXBosp8ODdxTZvRZQyZP3t213k9OyFlvfrvRK6U2J7o2CkAgWkbRLM1RdT5FwL6Y7HYhKnz1A9M0tEccLngZdcxHShRHenKB8/ib5v2MpTb4R0++kw++edRaTSumyK41gJXeg8N3V8hoik+/X1NBwl9Lhv2tIF2AXj28tzouFPZfQrOK/LtdMiWmY7ZPNijOe7w3uVTu4tJNehC934UyTUzyCmQ4OxiK5M/j2uFD/CeHiP/bX6UwKauom/7vBSHjUumf63ur+ARBtXT/U0ENL1WYqLNcOEdP/yYs3uO4T0ZGw/r0CM+8h5tK37WSl9SHqw8egEBbqi2qrzRkdIc2SSE0V6MoqyfD/3ryWfVp2aZ+7Ak5BS2IcPURi/+z5XbAs8zKfxWt5Lro7lEz+xPj3ZgCh5u3Gc1laiiL7Lj7c4iGnDk5WXV28Wk+ufjUn1ZkLK23I/+ngexvnbuk6Cy2JavyN7QaftMpL10Boy9hKU59/Hj9euEdBj1Xk53XXEpFCXNXzhFQHNP63dfWymkKLko0cOvyAmgVBzwXFfCYmy9W9OdRCS+uFrG00S+XTw0qPfr2t4dOLZ3iqZN/p5oFEeT19Io0o7qN7uKKKoTcprPiaKadKnJU+1y2WUrrmmu5ujmGzMN4661SKnBQ9G5fa6oUyLHus5uy4UEH/+EZ+y23w6HWe49pCnmFZ36v23q1RI6T1bX83TltC42tqd5Rj3yyMHv7w0SEJjvtSZWj7G5jVZe4OPjcM89g4cGREvpH4baiIdUyUU9evswJYPQqp9m3pn8htFupe6vGzbAwk1ejzvtvOCiFw6xgfUDhfRSgPZ+idbMR9uf7mQdRGugcOVC/PCBTTtQZ5lkBafgpVbUupaoF/m9pNfchRSWFLbkyWeRIuX3WhY8IhH3aU1gmFpQjo0b3v/awWKlJG85vBZtCMjaP5y23LokfCj484dUSRR4JildmOVKKHe2v46Au5Il5o4i79C6nutSaePMn6bNta4zthETC+yM9c9nSmhJzrDkq9/hT6IW29xwFRCCaHv9MatFVOd+s5T26UCmtwW0u3DThFlKKu19lVVIjN+RdCFfdBz6Y4Zyed4tKLznyq7ZBn9WDZnyaURQvKO85pU/VREU+/si5tiJ6CYYy927ItFO1QKzDt3F9PfViveEQBMGSM7TescQnS5Kl228AWP1t/p5Psb7+eOc7YxvAD9H/Z48zlPHvXq6CJb80lAdWYXDzX1kVDlqYTD3fPFpPqscqI0R5HWVSRsOVymTCG7H+Y7LuSRTGNyH+UkAXX6q2cz+S6RuHimbhva4/s0JylyKezasS0uI2MkpFGs3Zheyqcr4nVDbmNzord3V6iNTxPT+JJzbed7SahsfV29GvTP4vxCp3F6cho78sqcIa5Cqj6x9E1OvYx0LiXlXl4todPrrnX93o/I9HrE5eJNQioT/bQIlAtpR7nx3o9xuG6m74xxV4Q01nPvWYNzYpomG3l1WqGIjoR/Wjj4HFFmslbImiESqv1zZGIGnI6mgUm2vYOlFOO3OeWUl4R6WDy/X3hITA/r364dflhC17QzG79HSclyxKT0is1wMGf1WjFhlpBySnRki0fxqOfVA5pTOvMpclPQ9lx7Hr2cM/F0V/SH1/plFeKLAlopuFU9H5v2vE+TWKpaCWnfth+P1p5Ff+3qfO+nmohuje/elmMmoY8ndpydip+xvbqs45+JjwR0fqWl3SboU6deuhXG0Oub2nocVXtDNHTcM/VDC/n05mS9besJoqR4Op+7m+jN9hPWPT/A38j5RH/7AvvZ/nh+3EmiVQfKbno1CsjE1NAoEeepTnnuKLOW0tVGr4RRRxTId4FC61MdCb0MvTBdvElM94qGb+lmokAnvhpf7bdcREujs76/yRJTmV/uc4Mm+Dt1CjvlAwSkET2gb3SIhMJme0cWqopoTMLOmA3TidyHOy49DT3WYNdUqzsWenPDUl9TPxGdLM19n50HNG7b7NKSUCmNU+nTo1FHRuE52UucMP5vWg2sLpVL6dbp/a8NL/PpRcTSd9Mx3wuTzmb2EQrp3Y3hqYHWYppd/al0qynRnuv2FPedR4kqZ/oHiIgK//T/4epA1GdoUwdH+GeBg8+eaVTgU2Hc2p53Fwmo7+zch7tPKtFH5cBby0+IqGHwlUHKH6VU3OxnUewJvTmN/2zEC2CGwt55qT/hP70/HWsZIqLZVw8YL17Mo7niYdUBedBzHX5syzDnU32PuT/3JWFeVlRmryknul3yJm8KwLeEmN8H13qIKCg3qI/wk4i+OrmV7lshpUWJ785l+MhomNPFAps6GcVXeOW33oG90DmgXrNPRB+7r3g/AuPL+F4v9YKDAopb7Hlzyg8R+bz5bReyXELhmeU2340EJB7dMiQD/ZzgdGdJ8loBee78LdHS59FislphoCIhF9+0AxnDxHStf8a+Lv3lpH7nZpfT5jJaPmVX1Zf3QlpcUjfsxmkJjf/8MEYPv68e8KJ7fttDCfWyeDr9/ggRbUj8uPzeVD5lbRREvES/L7VIzhqpi3nRr1L9T38x7bmXpvp1No8mF+lNK60Q0Ps9M1wSlPg07KjD+egqCdWPjMs7Xygk5TUHl/ZE/54fuPPCODNl+uAY/aKlXE5Dvx6zOtAqpNJVJbn1sG/fr6gWGo8WUnGG2vovMWI6tHLR/aXLBOTzc8yT/BFE5Wtv/fa/J6IRL/eGbDTi0/pq68XLi4S09V3/g6VuRGYpfxIU5kjJLeH4C/doHrmdHHT6xV4R5av1PaM8V05BKmM1mtZIaG7rQ3/HOWJq0q4taYa/GDgz3b15gIiaTQ9ZTGnl04xsxWlBXUU0/8R7L/kU+NMv/qwRPxTRHGFCteExAb1caDDmswOfxj10O6V1RUwLq/YF6vvBfxfM2K6twaM9u/V2GwfISWWQWWrFZxk97xNv3wV6cHu+htdKOPzX9jWvCjxDZBg/NeVcIPMHfcYM7ornrXBogAr0ztaJq248h148smv1dYtiAR384H085ZyQos1HaSpVCcnx4+ULuR2gj7uJ4vfeFVDJtaFfj8hltOK+yt7P15To+cu4Xt0+imhWp6NT7DUUKSsnQDDIiyh1qX/k10Vi6nRtae5aCZ8sPHaKFtwQ0UT+gP1qb4mW6v9sNosS0Q9+w2JffxGV7wy9V32JT7Msl134bSGi5zs6T5jwR0TL161MetUA/eH2YsOy5zIaO0Fy6LermGKvDL7bki2nwJuyeHd99NOsyHNKE+HXPcvpshl+VPGQQZpHrIW0br7Hnr2eIhp3rvO5jr3FFKMRKI6H3Q88u/CTc72Q5uc2NS+O55Fi4tQHEQU8Kn8fN7gI8cWP60M/+1+VUra1zpzd8OsaC3iVH4ZJ6do1ww8b8pRJ22N1pqRESC821qrKTsFuZn2+WAJ72//qwbVnpvEplefRNj5RQn4rOk+9sgcb4GWYVVli3B24JjR6BT+WFxxrsQ3+TGiekXBDAX7tZWW3S837BPTJsvqLwlAxOcd6vqgK4FNM7natze6YX5Xrvy+An7L+hPn3n5flNG2wnv2782in6b09h//C/8hyeDVxl5Am9MzLXb2cT9fdo9+87sCjF18FtwtgH38s5QnVdUSk2X3EwybojWsLVi0r6iKiVWsV5o6fSrRf+eyS/RUYpwUKv52eiCm6YdGHRR2UyHTX5qkP+DKarrmguXUJn6LnXtA1u8oj3QeHBw3ii2ndnzcJeYckNMzzVElMiYDWtSafGdcgplMbbrda+/Po/c8+x4KahbRqSkRBW6OQjpeNrFySxaOLa/oGnNonpmO7O/2M8VSiin57C/wCJeQd/6WXV7ECuUwp7vwhAsF5+QdHWX8Znbn+dYbiY6LDHnF1vLVC+tbsn151GP575OGvA2cISbCmS+bIB9iPTqtcumoe/DzdGVN7dBZS4mTtL7668JeP7YkLRhxtFZSfstteQAURan8WI/4Lad4xyslfQG+XHrkXBr9jaKl6p5k3hDQpu6viFVU5fZoqPaHzVUINX58H/+rPo7Cbz1sU03i0u9nXz2aoiPSXF3yqsUDceV5zXodbQpqmvfOGxwjo6wpX4ZUvQtJRG5p5Y6aYOmvlJCc94NER7ZhHoS4yCjpyqMUuA+Pk+dKR+sVCat2/5aPcV071Glt29y+VUPTZ8Nl2XgI6mdp9yyyM52W+b89kvYKf0W2W/cBWMfWNuj7rnraAZhzTk31AcuzvkbEOzxfxyL/zrJV9Jokod9dT109OYuoeZF+t+4FHRkayroVDxDSvvuNrGy0F0ne68mHkQ0V6PGCZ4uYJcto6a2fAbQH87E9LRi1v5FFe6x/10g6wQwpXYztq8Cnd+tSHnDEiOr3sk3W/AyKyUStayfy+od4n/7z6KSaVt6/emtjzSazLW5M1U0i6G6aFiEMF1C35rofjSSEtWfonbOYQOSU6nnrxJUJG08y/r/qKuH5KmrDu4XgBuRaElt9VQvuzV7yzHy4hi9M5UZnTYS+eLqd+dUQjXaS9O+K6DxIcL41aJ6Kkn3UXW98KKfXe3EniIB5NOTc5/26ZhF5M7p46aYGIquYWBqmcEZF8yQ/z2PUiyizpZLywVk6nGtt2DeuL/ls38njvaVIqnGjS4r9dQLE1czKTggQ07I7noyiemMYJFXd8SJJQxznlK3Kg90YtnKwzp1BMT893GFIN/OXI8bWDireIKMFl8X4r+D87A0YN+fxDQvsWupZJXPnk71Hpu/iuAh3sMX7gGjUeDbiuWXQH9lDZbMul8a9hr0an9LTuI6b7fvU6Oh+IqqLLVT4vJwpWaJs7foaArMzzRbsuIodmqp3oBbzBt9OVx9cB2YXZrg8KzIFdEc/qMVOTRwdjmvpGwN+pOnZZ//NHBdrY8XvfHfCb/j4LMZ6cJaJF30xMm+4JyG3HVBWfrWL6dXSTN3874pKHzj9EGEf5N45bieHfz+vzR6nNlk8ux53SnlRI6NbuU7KWBhGd6Vhg64w4t3hVjL8+9FqXK/l5c+DHXLEaHKk3VUS9Eh+vLPklIWe/rnYL4V8O3yw1Du4D3KL0w+VFqsoU09TdLvwKxssA53Lv+fCHjDe/vwccKbJO3pwKf1Y8XX61/1TEUfFXlv1J5tP5dxa3V8POSh5//zK8TkRuzgv2eVoivvDQ/NUH/u7i4hwvvxDYp3fut8bYwr95GVFyyltEuxYf2vdiiYCyilZO+DUEOImtlclALxFd/7hzXL6MR5ZNnz7LER9rd74z6CPi+CXnvRWbGsU0esnOoAfw7x7fvJYahXjYd6zj3EMRIlq7YMBNU33oo4H1s5wvS2i/9/hvWYYAKRffa+5zRE4t+lcb9syW07vznz6+M5bR9nO9v5s0SqnHMN/aGOirjYZ58upaEXl9c+nl6SOh0l/+O3veB9zon/LOWi6ggKLxh3mDMB8TbV/uRH+6Zmv19wOu4l6YNuzKOOijQ3VuBXuENKNYfZy6jZAWlvx99Bvj376y5epa9Fer+MjceIGYLmcpVh5+IKWZx1oyG6OFtGHkK2tDbNhp0H/0rlwdxP/3B9/KuSKh7btyzIfo8OjR2diHw98KaNeTZ4szAX+2jn30bssg2IPX+WtuzOTT+5EmEivYEfMvcy7uX0x0OqK1dZyyhBTTy7Z3TeBTQpP97BW3hfSr4yKPv26K9OGrPGb8ecQJe8bNthiG+HjHz8jaOgnZD3ngFzlcSCPeXTv/rZJHDR38xu2/JaG1ovN31tpLqFP0wOm+8E9+Pi+eJlhEFGbZQ6FsAua1/cgJU0uBB3rzBe4lPHLaGDMyewVwrY8eK5dqyEnwNC5tm5kC5WRrORXy5DQlO2bgwldEB06NO9J5PdHRtb2dEut5pBI/cJ2kSkAtS+fr1MGP6+e99ZlDN+jbdxmaE91FtCdqX38zjIuogh2VfVeJ6KmutaIcdnrVtyfSl76KlF42s/kMxsGIwbqd1jyWUUlT/KoeW3iktyxGResV/KePbg36UUKq0zO6SvAXhRkWZy8/45FHqf34u6vBp1DqsdkUcUtSefBe81LEB72d7q54y6Oli98cNgA+cDdV9fj+ndCPHtbrHruL6bVHxJH0Y8o0TXrsaZUmnyKuPRv4fpwynS12zFkrkBJ/SOfLwXky8gzQlby4DXv0YuDbKsQh959/uTJwJwDp63NTzmoi/jz0Mk37HJ9GVm9a/lRFTEe3yKpaysRUWXGpowM2SP6wa9LCiV941LU2KbVyFXCSrCshu4MVyMD6XomWC3DHzpPrR8CP6/F76rcBIwV0o2qD9+F3yjTeZdDRYcBVbHz84iQHeHQzds5bJKLo2aalD38jjhx98VrFVfj3J7ynm96vRjtcT13+uBdx59H1EZNx/eAQvoXmcOAwRYkdS65KqPurUTVSHQUaotg3d+Y+FXq3t6u+62n4i8pTNkbBL7z2wsNGvVxCGS4TQh6gf54ETUq/Yg8+xUV39xUViIObL7w8tZtPdzqfuxNnLKDLgzoKz3SRkJc8fLRWC4++tMSMWTmXR+/sr646f4Coee3V52FfxVR46NvChu18+rjbYF+AjiLNWS9qvW8pI/PzH45ti5fSntw/aysr5RSXq5P1YS3RruJL988CrygZNXfjQ+CsYfUba64sE9PBfa1FvdvE1Mdf128gnsN8o1q7DsDjq6+evrO/nEfX7fkxu4OEtOBZ5JTJ/SRUZbPdcDj0Qvbr6V+CI+AnxIY8frlSEXgT77oVsnev/xbOmuyKfaZfh3yIR7xnMHfNszl4Xgbxz5MIcVVp/mHD1oMY33lK6lu1xbRcdfy81KVCKnxRVr3/uJiMTB6Z6qcL6FDyt2PewPGymwSiqzVImWwcnvhKQ0J96v0dhcCbDlpcU+wD/Ib3cFzMohsyss2wOXz2h5SWGPrnH3iC/MKYAtdemQKymDIr1PU+7N6R2KRPN2E/DO7Vz3qN+G/qg0/dTPn0vNphO7LjlC5IGHQY+N3UJF5M5S/gwb3Oj9O5LKT8Bvvwuw0KyEHu0jDF/C2YpfjC45qUWusaulchTWO03aa7B/yt5f5DE4JOC2neXN0LSxQlNGfdtY0fCvm0ZeydF7NiedQ54erfz8awZwPnfNdII7oU6TpQCfom0SV1Vh7yFru6vL45zYtHQRPqF2UBt+4TKw265SKl4Rc035VNgN9UeCRihy30kenNPf0QZ252u3lGuVRIpvpzD09eIyS/7ScLauE3tJacCiz7wqcFifZ8fU0BrRgWr3FojoR2zTm5beMl5GX2H1fJ5+G6e7VU24DjXBh53Xci4nuz+36WXebxaKFhhGBAuIwsnD7nz36IOLvbO/57kYwuxO19fstARo7Og86lA5fyuiqw3KglpAsHuj6L8BDQguyym/mwC9tOqFeEdBJQUUmnDcdgr88lGMSowl6WnG40zAYe8Nr5VNsBVQmlltzI717Lo4r5J6S5h4iiJUry34hv5p2+3+2GkTId6lHcYzpfkawvXzgwvaecPI3uB8hfKJBTrKHRwYd8Omqwbn9uuZh8vry3m74dOPlc2e2qlYg/dI1TmybyaHPMxU3GwAFby/LaXicLaMiy1eNay4WUnHqnRGWyhH6Pn9oxCfmFIe6ZL/XvSSnYw7rmt5KE3rfklx9zlZKB4dEDLdBj142W5DR8kdJlyjBXw3iZMf7Hl/3wE7r91q96foRHe0+q5/eGf/VEo5i/Efb8g7nTe1XEwUnlRyf07ALcuH7RWJ2zIjK56DarCv3yqKDSeGiZgB7ePT8/b4mUnvAzzV4rySi4ZOVJTdi/LgfUOt6fLqUsc9NOf/0UyNs46+hZ4NRJR3NNbMUSehhg82USX0LfhBvaahBfPyjrqzu1GvH0erXA+Yrw+za82frDGPjP1GeqHd9gnisc2jtpKJ/6p+ZOXgAc+/IYrf53xErks61VpHtCkS7v/njHDvhcjzGTDu+ZIKO5Pc8vXQ+7sf9G9JMSNQlte377nTbsYFEtb2YX5JNCi62KF+E55tzf8kbfT0BXBvpUG0pwn1+C+l4BzqOUOcXBAonLY2F+29uyeXQrqDlCirh/9q0Th9Kmi2mv2fC8GlPE3Z++vmouE1Lahu7ztsGPaOm8cqsv86e1RG81xyDOKdcz+jGcaNiY8xcdRwjgx5zVSrAX0ZuaxWMrQERz+Br7OsoJ77eqboo7RvR8kMHQrpP4VNywunWiIVHcgvktoxcKqVv5NQX73SLaqpW5sEeSApU4aF3/PU5K80dttokzlFHFtzulggg5Hdzgn2cO/IX/ZKa2EgAxHd16x+bFIup2rtd04yMSOj6q6nTJLj5dndN1ksksMVWVGVmJMG97zXrbvNIAeOeAnRGusLvdCtaEjlkGvXA5dOLkWuDu8wKPN44ATv9r44Mt0Hd9FapfKt+XUn1lT/77iYqkpOnzZBzieN1tWfab2ojGad6cc86OTzu01xSvWiAgHZuVlZ1BQFu60mBFK+zvgOjJu8KQZ7ncNPmNQyf4MRsrqx/1BA7zx7I6FjhN3pr4pzRUgRYuXJemGKtIeQ9n5xj04NOl8b/d5Moi0poXpaC4BHGZ0ZTtjmXIF/W0WddrooSsDd+r7p6COPTcRq30zRJSPrIu+wnmwzmfO3+PDuZR7twbfF9sgK98ebm66nU+fdOcuVdtPOzKEp3Q0IlCKhlaOOXhADHpB0f2sAG++TtOf0higYz6Su3vDHNUphpReIzKez49MJpiKXouoPywOJ+0E8gr7tL5mjkReYrvpR15Z8R0hmfSI16BR3e9V0xfrc6nRZtXbD3/XUDlNr3OjrHlkZrNFMPasQL6sr3Xpl+3RXSxcHtZ62RFWnD4Mu/kZ6JDB9cfiQVupfA70ECwXIE2zV7s9CsecXlE1ItMJwk9cL3o8qIX8O9dRZrrv4jo1+9fpxxPIA5P+C58Dfv0S2fJ4/vw+3tp/X44DPqhrtHReZytiDqf2audsh4428VRE5WhN2Uje6weFCUmiW760BDE2Ys+6Od5dZSQ2931O7fZS+mBY/6v6cfl5DjGcost4pX3J+Psn7wRUdq6QetygVfUpHWduBrxaZdJ/fy/AL+7EHBDv6sb9PMhZ7cdiHeaQjR8YkHAfPp+8azi1zzyHXluvatIgh/QBQb2Dz8Rt/F/vAdszH2WPL0D9f7nc6S8CXA2AfInpyi9wABzKyszu5iQ/9mcXw80aj22EF+PbRKhlxCjhy38cZQelv0HgtEKeirbIBWrOg6h3sGsHmwmnhKnx7Ze0JsRqAfesx5bcPgPD9ZeTw8re/9DigVJ9P/3X389Y/qDejm+qV8Hjm9qiPLf711R8v/1fgRKRl6YwDjqbMMgMNT12J5+3B8gbuthdwQ0iS15DA0MoAU4nvXHf1vM/WABx7dtbyW+c1/NdvPH+MGx7DcDTqBkXNmhbAvkeD0Q8/Xaf45AD3zpED22N5QRCL96oPXTGxzLOKL/HMs2F23/tQS9YWznRzB7uTXn1HlGB44/6xmL7b3ZYsKh7f3aTkrm6MVc1/7rPdu4wtcP5/T/Fy8VP3NB7Q339TP+v7jP3Amg5XPfzuDege/PvfPn+iuFq3cI64D/6zrth43l7nI424UinvvKk7Xd+b/3hC7mPm7ftpTboMGwj15oHG4b37PdmwIcuO5ybt/wkzv4nzUUvmzDXyKTf7UZqQjwlNv3UOS+/le9ZviOcb7ZceZ4Rcf5clRsi3+db4nX+Pba9bhLgbmc5d+B+z0Hj7H//Yh24DP2+w9sFfdYtqIUVOr2Fd3/oWG3b/6GpQt62AgFK3LZPbHH+c+2UiBfB8TFB4Dfb6+HNSTYZ4DNEywV+qcaxqH/z/dR0f/6UK99waAeNizCWkw8GgzQSIydKKxQjrLXw466WL5ljIq8uFMmYAUvG5txemzZCttzEGPo3yewPU6M28/6P47ycvZyGu1sj/ay1XLc2tn2eYAVKCDq/88B/7T+n/1VMH+xYirOXm+o53jUh3VSemxzoogUr/gIl8Co9kahmVg+8c+Z6L72T4eC/M4NpP/j6/88DXSGvX1o9D+8eTy4qGh7vQBGe0ej2hd546dG2rdVSAzUA1U9Acta2TIm7oJsTRg0Elua9p8n8d87ab97joPDAxeJN33sOC+PIcMSzYxNjc1HBWLPvyg99gYVGcUFxvzzsx5k9a9xY/1/vbf557NDgR3IFiVcHUKYRkiJkSMbN1HBuG80m/2cyn/1qBHrKr32vTbRpe0rl7nfVIES+ueHUeL6szfcQlCmjZjW8Ro+1NbUwpzN3f8tPs+dmY6r/rxWpKFlR1qd6viUqD1H3nWShJrNR401Qpx1fdEv/9MrRbT71qEh03fyaGx9gdrlJTwSljrueYz8/d3DHT2a9/ApNz9osjfwdt9ZG3ceRBw7T/rR+yDyL/tED87t/iok0ZBrkt3HROT5ttOUfeBv/G/xiDbL/iw/Br9SWbRrx6kVYuqSt2mNW18h/S0Yrv0S+MEkHfMOjcinn9IMEclFKM3H614Gvtrr14XLTvP5lPFq5he/UXya7Hz+i0UKn2RtiecafyOuGGm8Lnwf0cvk42NUS8B/mN30oRR+81irb5eu/ZT8r/GXzGaqJb1rws8XSVrUtMBrm5AfcT8/SEYRlg/MT08Dzto/rGIi8ig7suakHgHp1qLPa+dfC+BnRvu8HA2cd2Wc8QKfIULSeKF9LgD5xJkj3/KDzYV02HS6jSUMZlrVT1XRR6IFvcZ8KgIP5HZzUc5y+G3/W7yp2QMfCYO8VchqmUh5zB9lUrxclq0YjLy9xdX1d/Pgt3cRJ07LkdI9y9zPH4BjjnPULbaGf3X/66SmFeBL2tze0mltA/wtvU4j+EUC0s7ZduHeVx79+PNrdQr8uursZxd334U/qigrOwB//tz7s9USEFi75Zv4Kz8S0r2d3Q3qr8rp3hAXv8ZsGd04/CC6KB/8CNpw0+YReBRj9riNQ36m2MflWnKDgFTztqq6IF9Z8kVl4VnEs2YDmm8nKoG38EKsr+GMPLPRh31j4JJM9viw8Y+liCy96uwm3xVRwBvVmaGKGCfnJ2Vswfhc3eAqdQZe2u/r7plHXRDv3Ag1Pw7+RJrn1+M/HaT02PfknN7nBJTrfnOfFeLkgQnrB6sjj9rjRTQtEiIOuH3yoh/wcGHQpMuGaNez8yuMGf+xzu/Ere3ID7/6pjPFUx344iTLhXeCMO9MJtdkDlEi3fgfl2dME5HzygN+x8IVyVZvpshSTUb2KZa+xz1kZCk9k795h4Rqui9N7gSe1hS7T1Ej20R0SvJt8nLEAVXvd1YmIO9y83tmqDryJBtey8kOuOesnwEp7sh7DJjys0HDmkfVg3Zf7ePKo53vZ442UZCQY8Cf5Z0NwYuZsl4wMEFKQcHFZb6nlOi21bDKKl8pnV3zKG9BqoDetB267aYmJtv6A0bbkPcp2G8srkOcOOn7y5n5f/n06PE+r1LgUHkvtIJ2bQJ/avz1cWLgPjedpl3XSgePqiYhPjEO/JPAnp0vrQE+sLew712+lDxdKzNahkBviuVdPYADSmRxIu9T4H2U1A/+u55P318KNzwGb8G76+XjTcAR5X1+HNgKHGnFgaoJb38DN53i1NCSLKEvZz7GT/oO3JyvNTh0KZ9GPQwvsukHXmphcJ0+nPj6aSZJesFC6n7b+/NpczF5PdveT1bGpzSDjrN7zVCmW7M3D0jgSWm11ya5QpOEel90f/cbOMsm/4H2ugsk5OtcZfoWedn0Tq930S8BWT4YsNaoB4+yJQqvcycISHdWUueLLny69udN+PgHwOGEv5759kOcpxNdYjBbgV6kdp8pA1/PfaORkkmskOyfjtYbDr4ewgTHRrR71PM/a8/9Bq+2dE74yQTkE15dzVTbLqQ2Uzt+I4yp6u+10UfdwI8rLSwVfuPTux6rVj20EZNLtnBjyV8BfZ8svLkfvBu+TnOH938Q54/ueW4T4sqTLme6pOaKyU661zLTVEqDBwkCrMG7K24NyknqJCRnnVa3QuQFl1z+WGoFXP74p0WuQ9t45Gyk3H3+T6Ixjpq7tFcKqfmHdta4ozxSn289Ngv90TjA9nUAFgaumD1p/2/g5fUGRxeVdxHSxpyg2d7uClSlsv6IJ+xOfPfcTe/wHLQXBsz8gHxBUU3M05m7pXRy+NB45znAbXcH7DySzqfwHgk/0sCj81Qc1u3kbzE9+KOaFfsO+cEllSPXH+bRdLH77tSREiovvdKSDD2o2HJ7vxi8F5+QTxTXJCDNBJ0FLilymvvm/uK4/gr0pkvejRLkeVuUTTI8NaW0+Hf/sNk3JXT09pyCF+P5dLzglr9+FvCdSdRXF/j1hdJL7jqMT5DSJ1ENcfHT283LO1/j0+9Fr7P7It96/Wf8NFETnzpJzb7ZDhaDV31jUh3m0eSEFxvmmEhoxB+VUJ2ZKqSmNMVqW7oSHTyS+abuoZQa39483posp97NlinfcoV003D8/GuPJaQapD3GD/PSWe2xpzF4qQ9uvdtq0iagILtVWbohfLJSX6UvAl7htdB0REu8mFa6Fi3OPwE73GhybVQHIe0Mkz0Qj5ZRj/2vluTry+j+toU3i3Ed3TXTc8sGy+nCR9fJU9Sl1HdIz47TTvFpQumE4M7Ic5u+WbTh3gge/U3bH3gReYevv+T7/Wvhr4Qt2BK/A3GBzrqPO6E3Xp0a6VgK/6N/Rud9llOF4G9vnHMkB/yfw5qbZx6UkfWNjCyzccBH8nKOaiDfNX2jdMH+YYj0BME/Di1BHmjjobSuwDt6Dc+ZM/cW+vlloH7saQF5PNWyPfZSRN93z37Pfyygj7nv7I068Gm4veKt7shPjl6SuWq3MfyOz+NPFYAPemntjgrfzeDdTszXyZohouLub6QHkOfVtu5TusIHfPPUovraEinFA2jVDpPSzbopSztsEKJ/5yzP0hBTgmBmnGUzj9ZNH+HnhvxS4amHC0dMB68lQGP2zXqMb+MwMyns1jDPC8MeHOSTomn2fA/wE+KfbX6zRIa85vu3mct6K9KVZ6mB3uAPRS+aFFpvokImCgaiskY5TYpRWXPMVIXmXTay/wvc0txN9XfRauBHahfTliM4DTV/71jfWULBF6/VD0Sw71U9epEVeFN9jrVkCz/zqMdGDYc7WCiiMGf7y9RX4MFmmI6LR96vb8prNX34sUdNj1UcAx5kYK61zAd+1oSbOitGqwMXF/c4MKdCRGfdywzX1PPps4lpeRDyKmNK/t6rhV/Y22bK1IPAf+S2krRd8GdPzrhYE4z8Tv8zPn17IA+0aH+n093GS+iKw/6OiqH4zb4VtwofDoY9GJosnJiFPPWOOEPPuzzKv/l4rk6AhGZ+db/14T2P9p+d4DXoNJ9GX63zkjQRNf5Wn/8IOOS7NpVOweABTF2TWZ4Ovu5b/yLf6348mrNjbGqCpoT0TVSWNWiJSfj+zIsnv8FDqNCpXXdHROH3Hiwbvh78C62isFcDlEh7o7f2D/Bpcp30T+z+rkBaFqo7RnUDbnru1bmGVXKqa73/ZTjm2/bvj3+tWA07W/n57xXkL3t9aF3RiDyzyM5lg34v8OlUx+SO7CSmD+JD/VbDn3726PSwc4hctt851/0ueGbmzS7nREdEZNf8urmmVUazXfqHVl4FH7dIK2xdkpSUlyVt3fNWTMXV7h9NwCNeMvucnneaiPrn/ZzpAj9y8OnNT07Aj5tflkuEPM+7pW8fJo7g0+Dzp5+UdUfetiHNUuuNhI45Dd1yb5CAKvWWBvvXghexdEyZBHwNXt3anV2HKpKwc9rs+2pSOtRhRfRGRympD17VPdRSShNe2Jl9Rh5TU/NJxIpuAlIf2XlkxA8ebRp4pzxhHfhYu9ruNf+G3b185OIsMfiOmwTS8Hl82vOE0kzAE+5VPWNLLvJUGpMkOW+PQ3/2XLj7Up6AXqd0qv1dJSK+ybReldDXngvXT/i+XZmcZj+9Oa+PjLro9OcfAi+4zNu7eZUpjzRrjE2sTiCP8XbxxuQEomOubzU6Is54FSQx3wR+yy4T+zELkUdV6dKw3h5568iy23XKsL8rshusQhxENHO9/pKtZsAnYxM22Zsg73FubCMBn19iEt3xCfLUi58+TTwLfHNDQJvW2r0y4Hgev4dFi2lb67Em28uwqw9iYgMkPKpVin/bAr7ZE4fymuCOAgrpMNJriC30SqvpphvIx1zb4qQ/FPFUr7Plo1uRn17W7OQ/VBXxhoGR9nM32NkDhfNmdQKOODcpt3S+Mnk+/FF9qjufVmZrbO/rhfzbktGLHgD/tuiy4HeakZjyfvVujhoIHqvF2gLHLeDDvpT1OIm8rq2bX+hYAC6LRNtKXsLu83+Gb67twqMHtVoB8Qh4h3p5qrz2FdLczmtq9dzk5OO+2u+9BHzh0xpPvXpLaFbjtkdHu8vAr3vwTQvxQ5aC4tpC9KtblxfVDfBrnbZHjhkE/VfwevdfQRiP7JTtZ9QbIq6Sbuc5w0+WzR9/7GYU+CCLt3xrgZ+n3yN6arS/kG4o3M5Vw3y9VZ2ZuvmIEr3znKBhNEtGm86cihwIf0n5ZJxtt4ES+iHvcuvbTvBs9yoVTgAPz+D90tQE6NETab5fBqA/C9duzhqULKYrBcm7LPl88ipLnnkEfMr7yv3vb4f+vBHT9fSwleA/dOillnqQh7zd2B4h4BE8/bI3ZDr4HJfjZ/3ZIAG/JUAhMA/zZf3o/L3F4F1dKSsbywcP5civRXen7ODR7DORElfw8nZ33ENpiGfjZdIL77cK6fQJ/8VZ4D+Zeg4fUbdfQEazvpaWY9F4Sa/GJHEJeIDD7gQ7IU+QHjZ96SXk7Y+bJZ38hV8f9bToWDUWfIz5StLWQORXtnbhBd2rFtC3mm8PBsPPr928KQvuDWWFp4zLRF6tF62JOVkuIFlhodGSW2IyG6ElHVCJcdOw2VTJVkxKTeX9He8I6cjp4yXpyIuddH/0qDhKQFp7zWf03gH8fK7zg9gzUpq766io+oeAOgya93PibjH8unkTTv9RJK3R6QWK0CO/FsQs7Y98UUjRbsfvqUIKNjRIzIF9udohzYPh14/V387WgL/19/DhYRvugRe3vqdHcA8RdTLQNPj1g2hdlnBd3AoQitVuehiAj3s1VdZaPEKBzO17Cf44KNKnozmt5zfySX3Eghd+u6Q0rSpWdcZUZcp/9vqBBuKcr6vj0uOGieiR57fCpkDwZs5nx3vqwa9aPDzOaCZ4H6vMrv4AP+blbI3ynsAzrgy2VPoVBz++4KYiFlXSVa1iWmcCnuvfqA2PNstpkKFh0eoa5E1Hvmi6Ar+1amqZxBy8nSxv21Ha4Adc+lEwcCn7beC9z6R7xqHDd60YlAv/0WTSjoI9seCludyOcBrEoyz3C+v3AB9xbsMWDt8w/nhZrqNDJXS7ybXxL/LlJ+J3euhLwdcSXBtboSans7v7pxRoYN4Mrg1rBN/iiH3Fs1U95HRxofvShF0KNLL19kA1xI+D1/0o7dFXQvmh671Ogm+q3qPTx5fgUxz/VaO8FveR6Fm66ltHxOMXV+85hbzJovLE1Sngp6S4DleVQX/Pe/xD7S/0mYLXnaa+o8Dj3HX2eiDaMfitrdeUGDmtdfApi4lQxPPfMU+zUoHmxfpH3sD6kRnTC7/9+AV79ni30ZIKPr16dr75Ju7n94/O3p/NBaR4duFbNdjl3SU97y+OxDq6vkHdxeugzydrVb4D3+a3uLHrXU8hDYov7br2Lubr8TlZVcjn+B9q2HXohoQ+lzx7PHIBeAj+a3uXXBJSgpde4dYjWBcReS2n9xvYc8eii7ED+PRlT0jx0WYRDfM/frPXYzxP3Ttbeq7kkXYH346BvjyS5nUOXgm+5b6dl+rvavFIotd69TfWI61eefZztY8ilaYc1vMapkBLxDr+Z2LwW9Qblf1Ph8sp60qk1pWf4AcYhhuEgZ/v8+RZXOkG2NMDWmV3lYSk9Fhj2G+sc0lIfWM1Lk9EITapYQwnMPd3N5mcIaTpTkN9TWF/SyeM5j3Cur4ti4ZKH2G+pl2eHqy5APl2i7GBE4YyXqe1f4iJlEyHfhs+rrsSKWi57nb0ViANoUFkf/AUV1douK5U5dPXceWPtRB/z7k//elN4BWK3W4rn4Ce3LVhwbQNyNMPKfPWrdgrJkX/sS4fsZ6wyKhvn+Hwt25vyzZdFwc8qGeM3F0Zefk7qdv33cf1lwx8GL5ZkV7ef/+wrZVHVbnjVp+NxTy8OW2oYTbwLMP1Wh5i6LGhX0+qYJ2BY/atjEd7cNybd7O8Me5Oml65Pew87ETyk/FJs/m0fd4qi5AkHo3XdFYfM1hElaIst0zgV57+p1S81JQp9H78qcZj4Jl21JNmtOKXsh/39vseJ6P9oVfGGqjgfhsUNi8Gn1YmGbM6LBr8DXWKdf0koZy6hnodlt/cHnPOGDzYTMUze2wvIIc0M+VDAOx55DTNMwdO4rmqTF85DvxOl7Vqg3q3YL2Twq7xd5ZJSfpq6mL7Aqxfm9xlcSZ+zdnH40ZIAvwm34dz159ZKqCOOk+Xzv7Do9dv4saPgv973e1rheNFEQ11qn6vh+d/JLMk9iXmh8OBMbs0wLO9nHYg5gZ4mNpf6nul2ICvIJ0+YcJo8GhbL937A3788qcOHQ55C+lRX6NBIzeI6N3yilpLjDfZCO+TjsjLPnZPT1rXChxJUanq6XXgbTODQvK+Cmi93ZG5k/YQadXkHj7/HHrbWRSRA76QQ85xeT14fw/q5h++MgwY8wr78U+fi6isTUd4EPgPtUk+C8BP/+B8T2mSAPMpMHfO92xFanQ7+Hwz7q9hnzxzyVsphcYUjzmgrkiZWWUat5FP95s857Xxa/D9Rmm0xRaBJ1YT5+//DPhSWfKKLrfBg7Y+0/jxDtEtecCSrsXgwep+KU33FZHSB43PE0Nh73vH79uWw6M3ysM9hvZTpt83fp2ugX+q4p66KiRDTFMWdejzA+vBhomePnhtIyezzo7VI6E/z96r8FEGzzJvamn+71rwPo82TJ2K+XD5sOeLp8+A7x7iBX8AHmBA2+Y1IC86dkjW4j/geZ5ZKll/HM9VrePG0F9Yt1bl6eDS1ZFPrt2edQt+Dbxmq8v4XwYCurfP9+woZSVavOI86FhS6nZkrN1G+FfHLjsafhkP/sh0rd/Bj4Artu7bKnEB/6tfvnFnrBtL0/zhqnmeaKFjj7v3RoIXM6l1+cQ3YjrsFBM5Besw1OZafr6N9QA+WivW/QFe1xC4faDGN+Bsw0p/3h+mTPYzHvjbIN7+uVju+XOZAl3QnXOm7r2EdDLSJYYXMf7uHJhjAR7X7zW2HyOxjs9l7p77f1fxEF+9sXG8wKdfGdWG2kMFlHJ32X032I+uZ2YN3n0I8XPzu/W/wbet6fHiyGH4UbcetTzx1AF/N2G0eeIA8Iac1oxzBc9gWv8vRX+Bd70bL51QgTjItaTTXFWsG3k/eaXwYI2Izm9cvDw8QUBLzEbkJCLOrD8h2n7giZD66M4XtWG9i/E9R8MZH8TU4PV+qJoP8OCTHaw04YdEzDIdygMfsvjzskMrwP+dteLM6Hfw86b1afPpaC0jwU1d59m2MupsVDLNNkiC9V7iZR5Y7zbDIf1bMvBgadyNJQvBIxaXa1yduUUM/n3eonrwEY8nptc27JNQSEnt/E/dEGf33HFCjPz1h5Y9Bl00BFTvsrTs7lElOm1Z0LnpLPTXnw0zvmIdQZHbH8+3iOt6OlsUdgZvZbf7hLyV4N31supROXoB+JVNf4cOg590vUvbnt7gTUrr4lz/6vPJyV/N3kOPTwE7Agc7Yd5m1H1wUAQPTK8wKmYuxkXPY9Hee7LBJ8lzr/WBv19wdrDpmzlCei0JLHu8REbrXR7+enUT+vbNlnkZWUp0Pn/n1CCsL7intFrtfCCP1nTdau+bjPh3wfM761JFtKDkcvQjtk5z5Z+1mSHgE/kJboZhHH6MTdrtDT9rx0nsq4t16hPD+g/6jvmwwHL2nyisv4m0fm+XvA5+6ry6NbrwSypfVC5PKFWgr/ePlngDb63Y4mt6woNPdVsTLq/DujuLBHn3hizgEmcaOszCet6AU/Vpe8HjONjvUI4bePaxQ9dPmY75OmnD1JnPzcS0IrbuY10j/OirrobqrfCXDsz2McrE/H859aSKEvCD1OfDn23F+s1bbaImbSW6l2QtdD8kJ+21qxs8sM7pUmORXSlw7u8/DQ7XgvffrTE4zQ12VeNCtPOmZCEtPzpaUrxISEOfZ01zuMGj4V3ebXYayKMdr3wm6MbyaUPFpyYvRTF1jCydfbZagYRRa3JWhynQzm6dLhzvKaOp/fQef8e6uMCN2T2TgKe0LPvrULkEfobT9rCB4Ne7lp65vR08ubBJCgaL8Nz+XFatuoC8wZQtZweOhF8wRs2xeRvW0aUW+g3XAA/f9tOSbZXQ69F59ifGAz88urclTxNxVbkk9Wh/8NK/hCYNkIJ3KLlq5GLYT4nGzI4bYwMe31hpfd+BiIOKrUtqHoInc/vErcHPCuHHtP7443FWQuqVrl0vYz1JkdahqBt8IXlt6Zz1DXxOu/qzU3ohnxGmaXbzNfBf9ZJdd43A56O5H8rnYL2GvZfJtabJ4A2tvpazpjPmRcwZ4adYMY0Nm99pYT8FUn4fvdlzNXhhe80u3gXP+tex8rhI4MkHfz5dfwn+mquddc2vpxjHV1xfnPwOu6xyv4NKg5Aa9YqPRSAPdS3irccftHuH1Xm1XA0h6V8JNzxmoUyr8x8cP3hRmX6eeDLXdrSE7qksre40FPFvzxkTdusqUN8PD++8Bl93ecflcb+Qn+nX5Ctn9vWmVvOmGOAJ66+YjrDEes0v3a2Nh0TwqfmwKEwMvkxhmnCF8zMhrWl+8PSKM+Kn9X3NykZin4WpP772VUTecfEn983go6le3Ho4Cvq0/vLHbc7LwM9r3bzver2UqoIfm2uA92+l3ie0CutvPa9/cv08EHZx69ZpSEfQ4oaZb563EtbtzjDfijjbwWqfe89+WBf39Ky7OFxMN05gzxC0zyxzZsoVxI8lRxYlV9eAN+R9R/dTsRKlLByrehN2coxZ75kKaQo0ff4Byw8BWIfQbaPRvlgJTRm9zHnhTegRzexHk67yaZmjZ/Bm6BH+qvCPT4F3b3hlouV+D+s6Qrd193IR0cHyhZuSkS98GPr7RBXyO4Mkfn+2ZCMOs1cMaUlD3u7mH0ef7XL6/uj8lZci8OL2JqctBv/ZNtxs5B7wxsJq+r009MF6xktjBDrK4OnrHog3AX9N8PiOouomAR2YUNbkAxy7fLaBVjb4az9/Hy56CNz22db+U/dX8MhizfIENcSJ94+Gyf0swWf6Wp/0OlBOO+x03L+2SGmYgdeaLs1YD/t404O7WAd9Oe941qJxYqyr+ZZ9frmAuodtP1nqiPUTvqNf1rzDejPlASux2QkpYRW3CXDJra+mikQv0K/mO61G8EW06dP9cSu/Ic5eNkupG9p9qaDMJxZ5ysxo0UZF5FXvtv061Qq+otvXUY0VIxRJz+z5nQrYvfU9TL8mwD5O7Dk64wBbV1yRXKVVinXMt+5NSx0GOygakKyE6wq0j7b9AQ9VR0NNaG0tosBkiczCjE+V+yyHOo/BOtsJNplV+/m0sG/fo5cQr65VbfV0n6ZEilUfOz1CvubDy7SqmtMy2jXj9/NuyD99lubcXoH9D2qLDrw1wbpWhe3HVmyDX7xuc5eLRyMRF2rGuE1CXBm+6bDcA/P2rH+IvxnyNvuHzC18KeeBx6rbXDEL1/d4dWxXGvJLb6X6xogT0xLGqiilyshowYXT/jOwzsFu2Nx0rFeyvzP0gRL0So9DKfan9BRp4/Unq9U6gTfqld3Yu1BAfhMynQYjH7ogY/O1BPhLRtnLppfBLrj0m9I1EHn43h1i/HssBB5eo3X2NtZHP560sG0A8ol1p4varqOfJo6+oT8R69DEirMSTT7DXkWdf1t8C+sbG4QNjV0V6cGZcSfVwL88UXuhn85krD+22f+5Futj1kUURU9EXjx60fPFYdCLddOPXe2B9QQj1ptrLfLhU5TCBIfbx7B+8GZtZ0PwnT/skD87iXzM+2TVhR+yRbTmwtkju6cI6FSm2bKd4P2fqOhxZTz8kR8Zrqe13mPdtNnhtYXwr6dWB31aZQPeo8OFosXIjz3o1WO78kaiabPPzCydDT/bNfOxXRtwjOqPVU0DRfTXmN+4+RfWcc7v1P88cNAfuid0EhC/1rm4Ofgjz/xdRdXNBfn5iddOf7+CdbkfspO7vEa8s1jRYUUM1leuOuh40gL89CHkl5O8TkixPJ95mzYhn1rgwFsFv/7iRTvf8rNE3qM2Fpn6gOeX1zj1tDOPPs6zXKoA/fs93qel433oidbTWnuxTjhy3+sPccjLRv30Gd3Al9PIwwMr+W+hX60WlyUsBt+20X5MFnDCNrUtmtaYvzJLm6EBGJ/7ujt4rsE+CU+eve2ih/uYFdfmNgl59V8Sl8C413w608M978sJPnhg12uPHRSSYWVR2Zsw2Kep6h3SxfDzrs2wcD4gpPJ8r66NwA3qYk/VrHOX0/q7VasDwR92+HVneyesfwvat9zJNkZGs3Sjjpw/inWc9z5mbsU6sh/jO8ys/AV8rtU6eTPygoVGCcO/pIMX4W6udyOVRzXrkjsuwX4dCk5bckfB/9hVnaxyD/Pa8H7lua3oH/PQE6Gu83F9nx05VUexzv2I1V51rN8PkzV2e471cqPM5AeLCpXIRagbfQ3rK93sFX7EYJ+H5A21A0eABz7Hbn7JG+xbERDd9cSkagkNGL72Rk815I+1C5zDJyFP+WHEyrnw15c7dlt4vQH8131bpo5APuBktFPfLtjPYUKEmUJYVyV60OVOwc4EJer2Xlebj/Wdy+dFjem9RoFuD90llwCfz+j46FJAOI+GvjNPHTkI+2NYpe8s1oKfX/Lw1BrggPkbfLSN0C6TIZkKehtglx/N3HMK6+j2JPu+BV2XjNILtqVgPeUTy0NenQ4DjzLoei0V68+21E53uGOJ/N/Q1bvvP1WgxG1lI8f0l5JG39Nuc5djXdubaMs1yEMMt1oRYbqE6Ntik/DNdxHXPL0wyhb8iGFHWpbdR55HFhlWdBv5rVEmTR5uVcj/hi/LXweynavaWj1s6gje70Zr9Qng4UfvXVj8XpEO0J1MqlGgxj9KDQP1pRSp43bH5puc9tTd7xOqjrzkN7PwdOAXc0aEBo8H/6X7ywPfv4C3uW5CZa8G8E9Opn7THr5RSGvt+89Uw/4gSoqTPgZvENOfupiPtqNE9Gx21LX0FgmpJOgvjx2JfBGvS95KfL/dv+jTYPhzJwtV9zYqyOick7nwMvT1+xBeccBy8Geid5ef2ManPqFG4Q6WyDc0Zu0RAl9tHFpVOwLrtpMmzvKoCBfRih6zZ5jmIk94p7+qdgn4BM89o3ZiPeqdvma19Vi3pPymy4EJ2M9hwP7UuZ1nKNKTUwPjtWCfDvUN8f4DP+Z8bdbz4jwppdtlKz7H8/2bPnzeIfhTXR+eL88Bnprx8ufKXfPAU71bX1MDvHeH0c65iy7waInf7oxU5Kt2Kpm57bOA/RB2VZ8P3sGbk5YjGpKwrunOqBMnr4pps/mQF2cGK9DAovo2lx4CelrRv9cS5P9k+1eMNEU/yh12+e1FvrHryZOWn8Q4/92lXYJDyJs7bW6ejvxt8t+1TbuwXqgmqs8oK8Ql59UdCr9iX5fOinUHFbBvyOSai5kHgZdYqV98ug5+YdP4o4d+7pHSJ+fSwznhfKo9MCs7Dfvp7DcdHxy6C+vr1402/F0ho88W/WyXisCfyFHXLEpA3Lw0/NgV2Mfr8+9fcIlDXmzyvXsD94jIL/De+Ubk1fZeFjdPQnzhtrd/RQVw+vfu69PNsd5qzZuXneduQd55R9K5K5MUKO0Fv3XxZQUKe/7l6B6s0xu7fviFrMFS+jnibul3OfDon0rrLqkK6WGfprvZ2G/LZ2LWtyfAQd0+frvug63EOt3IqToOvszLKd/UeBjHF0ZZ6/fvCT0zvTBgylExZZ7m8xyxn96J0nAzbeSBlp35fG9DiZzebrCwVYcdcNjtHegQIyLV26JRm38pUD/xxcdu+yX0J6b8yVzgj4YHkm43hYqAv+1/aCPD/mBvk/MFwEHte+t8yQZfOsPZ2WoWcMn1qdeP/sV6/hf6t7slIv5b4sc3dTQHftSn8vIAmZhGChZMPwk/KjVb/p1XhzxfcM047UNSuj++Yv1I4AguR9Ypaj5H/BTzNDNzg4Ba/Q1ez1YHz2nIg/edwSsvj/n5UB96c1b6gi06c5Cn2W+49fUR2EWfhI4J4LEHiladXZAJu+EUfT8VednUe4/WN4Jvc7B05LOHrlgfIHq/ZuJRPl2IvF+945QCdbMpCKzdI6MN0ZUpP83kdE63yerMUOAln7TWd90KHPK4z1l3C+AbdEjj/hqs41m18Ggj5lnN576XR4J/tPDd9o7ndMV02vjMhnrYxafC8poHiFNyF+0vOpUC/Tzk1ra0DzJKntb3fCt4BEbpfW+OwT5Ab8xuH3l3WEYiF+8DHh9l9EXJ9P4YEA1ju07odxh8j5UvO/Bzsf46c21yQSLWzWq4hsw7D0Li+1T1Ka+mianIs1zrPnDiPgGBgQuhj903RHvbFUvo1JYduU3AXZru7JAPq4Q/rOCQVPhFEevtlRW69BST2qpuHvlKivQl/fnrrWDC1ploLl2JdUjrjh/t1Ac8qqrMquQ68DuKiqc94oMHN+iK6szR2FCu2v7n22DkO8zkky7unQ48/FPNLV/kS4vfn1Wb1xXrlMcY7HyPfX/ehryanmiH+j/lTtgFffAxKGJuQZkCrb9fOakQ68a0O/2SdQUfJ19x0LDHWO8dkhwnaXoC/O7mru/vO4rpW8CJiLng662o1o9o2g/96NP8Vwnrcqe51G2aAD+oYl1876lY37+kyuceFnxSM+32+IR5HBeeZ/p1n5y8F5x2nXwX62mGWK99t1ZCBkfOeTYpiGlwRkSrKA04uNku7d9jwe8XZ7z/JcG6aK+BtdOwL9bfBaKVEzYDN/qTm3vTWUSLF3pZbj4OvNjokMq2BXxqjY651z8Q4+jVo5LUv2JS/2zax8UY+iSx7w2rbwr0lx7vfX9JSlZFb506Oglo9aXPQ3S6Yv14KzW/Rp7WQzo/Lwv74l3v+XBrCOKW3YOr5cmngBuPvXN1LuJR+7izb64Xiejl9weC+yL4P6VH1y/szqML4avKevSF/n4VtvMExuPgpzqi1SA1D87bJ6lYBb376+b7I69lNOT3dLVU2L0jvpctg/sg3/Go1995qYpUZnqjqgf0fWH99OdS7D9nHFv7+Sn8Y5sjmkfuLSQqPvnmfAr4LKqPpJX54DG2xYy9OwDrcfdqGbaKkf/6oJZbLH4A+/DWSu6FffSGnw7XHxyNvO89lY0TtynQsvdzBxvg+St4HB5xH/6fauSRKs9FCjRi+6XKQqw/1o6xEEqwX5jyop+TlmMfmcv0wK/WRkBN1xImXkN92i+7rx4MHmovo6snw4GjdBWY7EpD3v/4511pHQYKSWgxp7/ODKLPzQ/2rwUv4utt83wTRxU6MXds/fI9Yvpiq3khF3Ewv8PFJS+RL8vO8E6/jH1dPq+Z8vkG5kuPoqFnk8GbKOvSc5U58gr2J/Km43ZpZNEQ6Rrk5zXunn/ZMRx5AI9LJ5chLvTpKh8pwvqfS2cykgbA/zlvuOmy0AWK89OBdS/B+yiIjF/XNQr4wb41MQoYj+Md3wSkYd1dw6xtPh+3YV+fTcZP9yK+fdMc2OiNRRkWMrUbAcAL7+q8+bTTi09Kb4I8DRCf7/TLzlEpRJyg8vn7SGfs9+T4oUgJ+JHDghMxZ6A3Jly7ddrzijIdS3kdNv0o1i09Cu9+AvvS/NS1G6sD/l25RpxSFuKPtuhfAS/ei2nL9B2Vg5F3Vsz+LS+C/jRU3VqpjTzm5r2W007Djh08M77lZS8xrTWPjWbxx9WPIt467O9i3TRN3W8W4sKHoxqGwc8csuNkv2LgqQZmvT4N/iSjxaPNCh5XIT+348+OncAr/7xYSOuxPnyMW2eHkVhM8jZsbdISrAP7u9kuSmM57MqqQ9OmvoD/YafzeaEZj4wrnsw7CH9df6DvpqHw60eFzW2djv7rNmPj4o/AzxpviAYZY3+inP2PVPP9pVQ268pKoaYypQ7PS8/5LKC98zVOhiB+WvPUa4zWLPAYzxnnVyOOMApMKWgG/rXQ6FP3F9vFtCwiw2E59sUyLznvm4J9SWp9C2z54J2IExZVtnhDbyo6Ka8Xwq8qbb12B3FNs/m1jFasi+tT//FNtruUlPRfiWcDbwjtPG+FDfI8S66XXvXCviWTZmxYMt1ITqu3xYiOqWF9Wq8iaQNwL9mFsarfPsI/iDFS/ojhce5X3tHt2A9vbf2VmNPA61zcxx5YgXxZ318Z890I+aXHPc55g/+RklQuGbUSfITBP12DkGdYOHDR1p1YB10xTvvcCwn08e2RDgqIn2P3vdsrh77Ozzn+6Cbsy/oJh3Ma70oo4ryjixn2a7ht9spsLdYrPzrze6g+5smWNdum5GNfNbHvyF/DU9DOMZOLq3si/3ZjU7LFBOi/B7af7kMPbHbYdCbihpT8ut+Jcca4KS3SjBmQCR5M7dlRA7Fu7WWDRG071i29s7D6+vwYn6rFu3vfQf56u9rV2vGw/8p95BIP7HfiZHN34YjryOdcvdnmmiikTQUZOWvk4J1ozP98C36H8hnV0HP9se9b6YVuBogvxnRaE7FsgAzri1fM5QH3O/dzbMF42Mu3UYuH88oUaVCfntNG9ZNSRUrFYi0d5C8qDw43wbxxSk2/uvs71ofM1FCfhP0bEsu+ThUhP/Apu97w0ngerVbfmq9UhXyLWXFvZdjdI26zRs+Q8unGyw1pEYj/nUIHnJND/+z0nnDPHfta/DRMOKg0VYUscvv/rcT+WGfvCqw99eW0+ICS7pV3YorvOGfkO8QvUz2ehPhhff/S+miNlFNE8m8eGsHYz+dag4LdT+xbNKDf3Pwx2N9ivnTn9SrouQEWy52duiBvsiRu5JMDEsr6+kOiiX3jXi6zn58L3mXs+OyqdfeB2w4fN/6ejpSMrHx6rlsopp7byg4+/QR/oWv/bWHVWLNV1mL3HvvfiFvOf5VfgN1dEfjpKp7/LE3NvpnAbRJ/bzj8IAY4fm6dgiripUWDZ/pswzrm5vtx575gHbbRfLeWXeB79F4gD+0lUaFfKc2N9siv963xc859BP1717N0slhGP1+eK/gAvpF7yHTxdeQHQlLtYvrlgW//88YkO+COh0fXVy5axaeJSnpPeiHPnDm00f3nHay3fR9zhoAvN9/9LBCBR3S1JWC5FuKSDxerH1o6y0h3dtDmlefllHBYd1MG1jkmVlwEdqtIcw1O5BlgP6jKZO17T8FfVfx0WVW+HjiWgW7DWSfsQ2Cx89fVJ1hr4ZYbVmAtoYCQdZ1+Y3+gvZ2+l/cDvvQx71PyB+xj+bFbUO+YUPiX4x5kiIfw6Nrky2eigRtuCsq5VWuuROYRu0el7JPBzkbebXwqJUk39UMZGE959Zt66mCftxUT9DQvIZ68abp45gHgA6/yQuf/xf5fSz1PnfSHn+DRT1ygivzRX9UpTgYvgS/m9v67BTz1oztjvpUs45HnrRnvWuCPDMr6Ouf5YWVSqllo9xn59Fdvp2aUeyjS9pnLzzxeL6XN/QqPR++U0aQBZwM7YN8ilWUWK1URF+jHGxfMhR5ZclNDbyb2jVoSM2xCIe7n/YVNUz2Bgy7yer7wYzzyL2tOO9/Dfk56/e7YuWN/zUn5KdauwPvSri3zCfuNuGGS1O35UiVS3ZeaNwr7VD50ivd+C17slOUPFz0ETnqs4eDk4cCHXAzf924FH0Ps0fzgFfaPTDTv8idLIKBUf/sLachjdGx4EpWBPIpS/1Qr/kk+/bhZO6npoZhy/bpNMsfz/tvLxXkC9nFcVHtcSq+w3ltztu3UAXLaZfG1xacAeE9zdcvPV3Iysf/muWO7As1RnWHxA37DlwPp++wwP4rnfDI2X4w8ydZttjZ5wIW0uucMw/4WvYfb3TWDPmyhbauvpxLVxD+jk4HQ49ZHWt7A39xgb3evFvnwzBvdivsUYL1w+PmDmcBbvF0/2dSBD/KzdfnZvqlK5OFt3nWHTIm0Wtv6CnyENPpxxMYX2NS4ZbZ5pT/WjT5qCXWfhv2Gbm1NqTnfk0+NvX4WPgQPqTzplX8G4oO63y96/YI+Hz1YlngG9rfjUnN+2xSiF6rVSo+2yEjliu+p1VLwRvMH8dywHvS8lctxla8y0nr6eHbvROAyTy/2iEH8WGPwbr3VZB459hujHwvcvbGn1P4S9MKObYMulwNP9jX16FGJPO5jwZmKtG1Yn+8Tar0bfDjtpV5O+64hnuptsMgJvHijNUc6vXFRoOOOXc8GIF+/O/7KAzfs17UxfpXKbcS3ivKL5aM2yWnTgyUailLg5bt0Ps5GPJSWtilRCev9BYXO7nN8sU568tkBW8SYH2MtLPYhfrSqcPTbANwkcUPD6SdYBxxQXdZPB/yzS14ddtoC/1xy+pHvx3rkE+4fe/f2JOLyvVsUbkyS0orSw29zEc9fH70/vKtQgVbdCgnuBdzeI3WI9wLgkTyJf6It/ICXb0U3k7Hfw1LpQ+1H+chvNEy49xN6rfVMYMmrg1ifX3A0Vob1Pvt83HtkY784t8Hzb1cA3/RsmXfbd4MS9bW69nZdEeKEfTt8L2RIKcqA9+fBL2XEdyrbPgnlFPyhJcQM+z8PHJH8Wgn4eZKwLPkS9vNI1zeO2gb+767cmOos7HOWsv+d6QDYG75Wzc69EwU0vuft6pjDeG6aOgVlKgLK6T37gMpEzIue5Qrji+B39tCWf0Iet2ljjzs9wdOsUk+ocrQEj+Fpt5/VTtBjakf6zwMv6MmiUac3ABc68fLOsjXIM5irLfX/Aj/M1HTntCOIl/ZEPB7cB/tWdRkWbDxFCH/rz8DhEuy3khPVGr4M+4g++XPrgx7yqBUdvghHw58K23Lt9AdnrG8fdXfhuBfK9MXf9pLxaPBmu5l7BI6S0ohfMzKK9RDP3bviMhT96b/At2Qd9HyrwqVlLdj3L/HM74E77yFOPXzikTr2haor3llxqB52YuxO16XXhbReQThlOex9zhK/Tzuw/83Ivjb7chCH5Tm3Gpoqw38J87iYaiAH32TI2Sbsk608sHtnf+xTtMb3gC8fvNfVrTMzwrOxT+S9767OwM/ThiS3BsGumz26cs4TvMHbbTukzlhM+8jyQWk6eD4+tlcv1CGPqTNlx/oKQ+zP8urhi0rsFxatsOlclB9wmlczFvj8lFG1d87GgSXYd3XUloQdG+HXqU1o6i/EvhG9ej6bjLzb85tjD0xD3uRC0cZrn3cLaPk7oVIo8lOnZ46svwJ74LR3o3MK8qservrD8+EXZ4erfQrtIKZ9HRwmGrwjulp0YfBr8MLU9ipP/JaMfZrs8i0+OWMfu4g1R12wTvvaeN1Wc1cFmjHDZ9oQrE+6euyhZSlw3c171bRDZwtJcbBP1FPonQMDf9zrjvUyhYGrbYYhXo16fKelUIx9TSR+5063COnuy98PD2B9Vu9OqfKavWj/uBzpBsSV4hEVnW8+AB77oMVNukqFPl4M2lGNfU82vvMY1xP4xkbeR72x36TYc/N6Vbwui0ek2eWIE8Y4ieqSwaOeHW/c2wz7/NVP3TtiWlfgv0//XjyA57rS3jTsPPaF29jmGDoa+6H+XTjxZn/ofdOqx6mV4CUsuZ48aAXWk3T8cVBmuFqJNp79kWQOPlNwa7XDzw5SOrA3cL4b1ocYy/OlPZFPiRO+rgV9gDr16Fa8AHldhzXfPiicAe6lLxh0zA78uK0dc56DPzbLJEdZFftpDC3dG/DlEo8m+k1sjBsLXu6U2lVfkO8jp8QF18+Bn7BXfKq1FRU6pc/6Ddwm8O9rl+WH4Gd0G1VN8K9DJm/0ngSc+t4tp8qEv9CTPkW6f+7xqeNx5U+974PHoWVqfAy8lx9Thy+bD7ypXNbWbeUQ7CuRUePjjf3u/j+uzgIu6uZp4Hso0oqCLXZ3iy12d3d3oGIndneL3d2K3YWoiNinIuKJ2IqK/X7nfvt75P0/z+e8ZW9zdnZ2dmZ2ZsLdDgEtRuIvNeeOFMeRC6cZPKv1ZeT/HYtXvjMCPbNHpcNHfmHvuKrDqYmlLuNfwXHOnjmN0HMeXxgQ2jWJeh6QZugi7HW9vi5JvZp9OmZKVAlH7G7fTMjiFcx7kaJ9x6W/wD1hvneTJFM51yYcKte1Bu1EL4pwdY/Cv8K+4wN9wY+93RteaYhdxehMJZsEpEIPdmBm4IY+zirLkO0rP+H/r+bsGw6xc5EbN3gzcCl+zHKH7JpZ5CjvxlJF7knL/S3b7I77RvEejzhTwdPhQ8Jin/Qc+hh66L/RrR/2od7zsyxthV/H3bYeMx5iH9nuW8CKCYPxC+BQeleZJugPopP3iXzsooa6Lbx1ivcsPa4cXeB6xUXVrR9xsOelJCrNhRHVhzxEvul5qkhd5GYd3i/Lt5P3k80XDNuTrnUiVW7ihUlT8F/pPmH4yCzYP/V6Gf4yO/6k8259/P4Q9kSXbhc9HLEGPX98047p8JNwcMi+NOVfYKdfO3PTQRXc1IUL6+7cg99J2u5r3nOXeT/YMvvUFdjX97uy6mjRVY5q57as7Z3Q0w0sljzzAvxE9F/iu/kB9t1ewQ1alDzrpFY2XK8iNiZRGZY29xzhp1Rbp/5T7jRDf1TP9jkfflXujm474z5+F6sXLt0qYpmrOjKv/LU/tHM3vnxsMH5kRqRstCTpPPyZVErntY570CdricP++HkZuPjbxOursccc55ah+iP8nhUP3FYZu98RV0LXLKjFfXTe4lQf1/KurPi+ew3YF7veOmcIjbQor0y74k/yvmTOyWueiXincXdy1LA47MOu9C36Zv5bd/VrQ6IhTe4mVRHTSg+9jX+PGy1LDpiEXrTK3eK1qmD302h7+6rrI3gvOODlDP8w/FhdPn+4Buf6gwcb1w9F3nK54HqfitxD+wxeX3o8djlDytWNHNsZv7cva2yeh53+0eXFBu2Re8GcXTtPQwedZnqOmY++NtnjzX1TV3FWE33yz015B/ns65arqx5yVTVOlX/dGb9lL91SH7w330E92/q0R8gt7NeWfeo0nncvYzoPXF0f+/c/Qdbe4d7s7wHr0vdCj7Cz/4fcaZAb//r7wektduWPz92Lmo1h8XGnLvGX7ruqQS6T1/XJnVTdrjppr/UV8pLOxZr23uaiqhe15er60EOtrp52UfsS+MuaERs8Cr36wJU3p3VD7pa1z6Pwq/uQ6x78e+kl/mlCsu58Mu0SdhSJ/p4fgp3Y8bTRFTrCr1XPcKl5VfTXn0b82ZEHu+Cv15MOPI2f197Tc02+6Mx5U+yiLTa/u+qVLyZLel/ujZP9Bi1kP/Ws8HL2DuTEWU5G3HiP3PyUR0MXjl31dPKu7MPxj+U3rnZQZ/QG07ZecqmGc4iq3Qvu641d4/3xdcatD1VqdfL0H8/Cz78J2dvmE3asXmdPjX7wFfvPhaN/Lr3hrtLlTt56YmkX1Wz+w5HzeE/YzMXxxCbO3bd9O0XH78U/VHCyQxewf1lmsQ5eAj/zI9nEj3vxF1LJ+jPfVew3SrQev7KKC/ewwHHNanKfzl9mXfp6M7AX/e42o/hQpd5X3Xft6Cv0qaf2tbtDPIyTRb7VqI8/0Z1Jc9Voj7/52U+HN80KH3775ny/iO74pcnc4udc9NTDnq7LMg77o2pJjv1Nin1MkW3LKvVGTl/q84H6nthBec868akKdiGXB0/dtRc558qex9u+W8M78Kmp23ZHbrjwYp/6I3lv82jujfhu4G2LZRfTecI3/lyz6XjZB7znrVhq6XD04G+OuJcqRhwBlevr0NzYLUzt63Md8001ZGhA8nQfnNS8wHWbPEpgD5Ij6shM5I2hdwOnvOM9VfCI2IN7KV/Z2TdZVuztd0ZWPjYU+NieRl0agB/fTUmH1ZoehTx7lPe01Yy/8Psu/TO2d1P9/25Z4Yk+el7OBi82fIWv7RTUJgx70MWp5u0V/+25xh3xLLUJf+6B4Vsyoge8M+zSxvPQ09jiTreXn4U+hq64lhU6l8ohUTNXEOFn8jVpP8Jvz+uTPOzHJ96PHC57xOeBu7qQIrDJhA4e6nHKZblao+/7HnR97xH0VPUXfVqcFjvhpvV3L/LDLnPptLe/XeGHBzYc0ykF8QVWLimR7Db6wPeDatWuyb139JjYNWG/HFTe8NV9UixxwE96XstA7P2zNat3eQFynumVO4ZMF7ulD9VanyJwx+bdb2YeQJ92/JPfo+q/3ZTvjUPHp0Wwrz6s9ikwxkUF5U6ztBbytR2Xo3vMgG99vqdO0xPwpTNedChiAU+HjGoxeypy0t4VKjql2QP/nN2jciz+XRf9jZupljmojEseDZyP35u2l8p99c7qpA7nKRt3FD7owIZ3RWJruSjnVC29hnEfWNa+dMcR7Osm65pdqY0cb+FmpyaVxvGe5fCnvjboeZOg3d0rIy892iRmzOtoR5UhdctZccgdtjsunlOUe8WKCz6TJoBnTtl8pi95g31HwU9/u3x2UKV3R5XGbF3lPD4t9gvxHK4MGfdyQWHe56S9X6k0/gG8pgQ2KOjF+5BGY54sZXx3501t+wQ7uByv2zQNRl/39M+SmV3DOT/3+uyahl+CeyNtGybi1KP0UfdTl32Q97p4du+LP75+l65lrrse+cqU6Pev1idWAztPWpKiPT5TquXPfgV/nkdKlPVMwr2haObPtcdm431KkwPpKudE7pLDt90n7Oha1woqcIB3jw2XFhqWg/M82+myE2vcS6Jq3buT6j7ym2Ulz15VQegfVtUsMod796Eoz7GT0ZsP8t6eKqYs773r7LrdFb9mfw8MzcxxoAo43ziaaqybCq4wuUWhaehdM4XtXB3upFK+PNSqN2+Wv27rtLggercMwxevesa5Wq5ahs6hKRKp0U4PbTur4Yf5VdD7fPOVGnqiSvGx6HWutd90OI5z40bZwcf3vsZfkGNmx97oG3pljop+iz7RYfNH123gp+v9/W2yf3ZTv/p/zvzthbPqe6bjzdCjbirHiM/ZnmNXf3bohPyB3YhnkdG24ldcIpW9wI/XTicSqbURbQ9VPYIdTZYW+5sQF+B2ilX157K+Dzp75t1/KpHaenVC2SToNd8uPdtuA/4W35fflMSdd16pru07V5T774TAOyPzb3RXf1aPGNsdv5/rGl4JaF/QWS2fUr/TI/SMhXtM3jgwNXqPrfXCQ1mXNCM+/D6OvLl3ualTSuAPtsL3YU/fIkcbeLBU72aH4N8i6j3Ljnyr+aUlAdV4J1Pt+uGbfbA/8s6+N+YW9qzFtuRa5fQLOfzFKe5VZ2LfXDYkaAF0ueDTutGf8Oe3b/Oo5EUnJVVld+dzT+3He4dCp6fv5b1r6djiv9ugR/3SfkHd+YkcVLn6kX/H8d542Z43o5tnt6iDgy+4TsHu+e+WKaOzEsdkWNVzp1NwbgwpvHXwJtbV/0r3PJ14B6NmJy754xf67APHiw3knjC0+catlesgH5i8okH/WHe1dnjMuxYDXNUTj7zDr7pjv7Ddv3B9+MCSw5oWmYP91LICVfadXo1d99Iew7YjZ973fmrzO8Q9WdypUPu5vOOvlqj6qvnIyXOl2xV5Dmc1Gx49qJIWe+SQ7X3XV8HevuvV783nz0qswlZknJ2L+EeWk1vmvMDuzn18Hu+FBVzUktDXVY7xbnF4/OImj3lfOyi8RLpiTy0q6bfav9/Az1XpudTHFXlYg1albi8fBh/YcW7TGsR+qvZxeLMb49CT5vV2x+xYrSjhne37QYva133ZxsLEzRiR0+1Vvqrcg8Ysun8bOXzuzM3ONvvJe5XvzX3SIo9o5JJy+ire7V6rUaDAyRzYJZV9Of7MaEd1LdOgIZ7sp6Iftww6hD18z3kFdhbjXlzMf2Ph7+j5diVdH7ezAXxlpaPrv6E3+9xyS86L+N8ZGlr5Qyv0nTkeD611bh/z6LyvbXcfN9X8on908ymuKl/HTZE3G7urE4/ur44HTp/nzF40F/+KO0Ky3T5LfKdG/XNui+B+79Wk04WdOLR6Omx417XIhyM+LEwWiv3kvOTvc9aAP4tP8WXmHd4dByc+cO/ITd7Vvp++9Bz2PQ1PZHkei36gxPFdlc7nwB43X/S6Z/B9t4tfuBaBP9o/Q1YG90X+1DzpvDaziyVSTdI1GVOUdxRr0t/p1Ha/RQ2ZdyBr9TroR9a4hqZEDv30cNDR5PAfvuVeeQcRH2P5xY3jp2MfuWByjoFz8dfxbnPTBlV3u6qzF3+OLM098mf854nDPNDrTLnQocd2V+U1dHXBJPddVPPVyQ7V5Z6+wNL13C3spsLH9V1V/oxSZz27p7wOvHuPX5V9N3ZorUfP2zYZ/n5P3TdZSkEf1pfpufE29/33v5NOvcQ7jRzvZ9wI5px40i2La+wgV9U/rML7EYFJVMadf84cjXJXx7qkd8vzzk2NLjN+YGf8bO53//a+CX5MGl9MujsrdlTZcxXcVh4+Is3JrO4h+B2+cSfxpBnIWUoU6zXxEPxNveCnp4dyHjRY2/zmYt5fN653p1ajEtibd4s42Rl92pf23/Y9RN6y6egp97tRzOtPu9TncjmqTF/m5pux2kPt64yAEL3f+KfDb+dGX7V51pI4P+wdPPo96tPLKbH6+avQ/oHh0OEi44p0qIc9ZsiDHk1f8PuXKUW6sWE/FrC9mQa/ObDWpJL94DNXjW164QR2h78PNR28ejZy7LP93IZgv3F1pyXjtM7wIRafz/3gj3xWWFed5J3KVUu/XGx/1d5hzvz78Hevo1ZveYfeJriey6Q8V3mfsWHx6bmci08HtfyTET1r7xxpsk3l3V3HVl0CXwehB728cOhn9B+xacveyoAcsUmiNqs778FPQsy0tR+RUxXY+i7oF+9zam8oVG7KdA9V8v7WdZs/c/4MSDWgEfQu3ZUW/b6g3w7xre6bFbvPhq57PmZC35mqf+NESbCbdRtfvl1p5BW/npwqnxn9S7MNzW2zsC/Ln+ZE9+L4NfZ6Ef4kGf5BytcI7pmROCCLP49YGpqfd4LNJuxO/Ap+Y+Hn6ruJT9EyQ4lJDTu54x81xad0xFdxCzowPS32CqsHDLD2yok8rOKs/cWxm1p+xqFylm1KFVx7dPcZ7P0X3Fvc68x6/ChkaLHvGvfm/eN/lHTCL+ymttPD13KunLaErj48B7+UnwvMv3LQQ3l8OjdzHH4A9uwJSfWCOE25nvpWmokf842d25U7geOujM51k/154KTyf+rhfQc9lcutjO6hNuSzMQ/f+hAnwSE85KMr76/adQtbNR//n3XPphnTC3nCxvXH513BPi+ksuPCyLr4hXH7/LsZdj3fp0a8uISerpW1jtezOrxHGVDUv1Ul7HKyD56xoBZ6k7NJfn9Bv/a7SkaHfTvQiya/9+ME/hZKjUtc7izv6fqtzV2uPnxGwXTvumzBn0a99if/1sFudEGNY5tLcD7GrHrl0554NTc93vQ7PJ/4GF0fhs2pjV1mf5dqv96Av9MOLnz31kPNOdEo3dkDxB/wd5vZB/qypWjs5fLQj4xegx+dm2tRz1vMzdTtOfqUbR0cmzeHDkx2n10MPvbk4HTLsyDX8m8518+GU6kPq3fOOYt8/dzs5asj8eM8fG/BrRGFibd1ekXfauDrTg/PlJnx03jtz+JKz7Cn7uoy8u7iXdCRa2psBfyE5qj5/Vlh5EUulfr0Xoy+IPJQfIE/yKNt85NvfI6dxDDLxyZbsBfp0sUlqsIv7h09+h0tCX3c19Kp9xv84btkcXg6FTlOuowLztaHntYlmlPnTs4quP2fkMfZkYMWrR55Bz8UsysvmDeTc73HmSeHUvRzU+uDs5ddgT45yC113CH8fb5u9+zJGehMtYDP3Wy8RxmfK/nFKrcSqRbVUo6Yz/6vV9nPaS72uuUXtDjQH79DAwIetV+JfnDCscnDG73HnrJQm8I/8Z/yOMW9/SmAY1R0g6UByG83PF8yMh74rznglqfnCEdl3d1yVn30VJemFXceO8RJzTzxMu8l3qUEYIjij7yljPeOuUewV7Q8y+xahbiBz/9M81nNu90l9W7UOI6+qlTEpGMv8auw/Vy751WI15JmaYVcbfM6q/oz9z+9it1+2kd34uN4PzLXoe/SqaxHwwL3A3+inz//YMy0bt3ZD3t7uw7Fz33fCtkv25BnDftV3f/5UuJBtexhGcS5/eC507aLyE/L+vaZdZV4J9bQ9jm49qtWK7L6dsMPssf579mWYe9/bOqXnh8y8S7qevq0rtg9Z1+dOWgAeHdqe2iHjMPd4POKJF5J3IUYr0MbSkPfu3um/5KNd4nnHyS+Gcd7wpEr17Z24f1fveHlS0Vyj0ibZ0ybdXeRk2yq3nBLOuKr3T6Xccj8JOpClh47fJFfT3y2M2zLQOK8VH2WuTHxkwJL585bkvcfTZeUuD96iKua67Fv5HX8QgSkHnpzJe9k3Y5NvbK9APF8HrbbGXcEv3nLEud/yHna0ZJmew/sLbb097584jxyljwxiV/zvuzP2gEZYzfxXrJvlbZdWN+ZtyK2xmH3FpK36JZt+KneUfXBhtcRLira+jllMuSR2YeXTOqPfjBb+R0Lsi7g/I1J2vMo63Dxkl8hd7w6Bgwc/HQN77lejkkxbpA3/k+Ds43JxTkw0rtguqhF6Ic8XjyejL/ouPK1in87yz2s55Suj3in/GbO3MRjeK/XZ+Opvvdg3LPmGJ4xNfrFTKMf5uyHPdPRFZfT+2BX0LPRmmqZ1zir8PJnegUT72bRA/c3ffEr4droSKIV2NMPvDb/8S30JjVmHBzfgveSwxr3rFgMv6udXQ4XW4o/iOTdco5OyX0+5OPC+ErE2Zv09afzRuy3PL4F+2aEn0x+JXWHEuPcVOvA4k1isFuYEx3+eAf04EW1TKdiiSf39nrxAhXw//Fnz4OxoYRc/TTg1d5ZyNejBjVKnoH4dDl6nc4Qgf63YQPPX57YG67K3r/YxWTYmRT4Wbo7792Hj7o1MJ57UOLxY/uMQJC7LtnplmdzAbejjXZfmOuqbj8KPz29P3xdt6Frsz5zV+cci2feF4I/6lSrakzAX836EcsKVib+0Pk/V6q3wl5lWL75BQ/gV3dT5Jq19Yh/Ejc2bOp7/PYPeXCxY1b4d2um1CV7Yp99PKLSx0XQ86Zpmie+gN/jBU0yF3jgAF36GBl9GP9TR7o13rWU99u/pnitffTaRZXtfcC9EP57+lZ+/eXiW+xJc288sf4s/gcKHb9cmPv2uZmH0scSv6FT2yddWnB/C/k4tGy7pBbVY87DJnfxbzsj75UKi/E3M8p/y9zc+JkK9Fl4vkNp+M9OXhert0FO/nzcjMf1PFR42kt+ofjdmldvZ+duZdzV/ZNbdm56766yZPm8+8xZD7VuXIMip6FvuVPOWH1rPnK5DtO9fmCvM39T7OM5q/BDbi35YxT+oeY+GvHjBP6BnnUv+boO7+QSZw30WQC/f6No2fKT0J/vuD91YSf4jYk/2yyrOtZFZQnNealofQ+F2UMhvyW8z8ye7q4fcd0qH3uxYzL+fgpuqNpk+1fewSRP1nMi8o3t2b4GlqiL/c+1IS3FD97nUfvme/AufP+nTq+LYR8ZXi/vq4ppsS+Na7hpMfLO8tPKHB2AvDtp2c4rG5eAzk4sGHUiFfxKheDChK9VO/eEHcuLX6rp6W/X/4pdpmurRmsLLvVQae7c2nWP+DEZs0Vli+ddV9SY9v3vNsLOPN5/+XnsUTa03RzYBv1L8uFzrZnxv/LD8mXbdOwba/fpHe7JO+5W+5d4RL51VJ8dW1199Y24Ycsblyhf1Vn5vms9ZsxKN/W6eKEVjfDPNPxm9lqV0F/V8q79puAi7muFA1ucwN9R3TeBx0vwnq9czU7pe0AX89wL9a7O+vraFuxaiN33glrZdqeFXh9qEF5jFXKGr333TqtKXJ0UtQet3g4eBr33brJ5LfqVERnKXU+XVL0YMfVI9ZmO6tPIUztXlHRTtwMKB+x14V765HBpazP8feX6/m0c8qnDmy55/8AufnRYv0cnsWN2vjXi7E784p2rMSVLf87pw21mnxuNfCzb0C+nXxEPrMz0TNn34zdmUI9yGZtin7DedaDTBt7HXZ0YcLnCQBcV8uPOIEfkmIF/s9b/3N5VTU3u3WCR4NuNzYuOc64trZ1oTXveJ6w8MXlpkpzYIzaYfLk+dmQhNTc4bEBelHTj5aG/uEcUrNlmeV7itlzOq5wu887IL3XYoi7EaUj9Pl3ujejzR7ru7zUP/UXXR5cPzfpB/KuteZfZ0iRT6dKli1+82k396Nv18yLkt6WHzihcHn/wHln9O/sBnxxhvWZmZ//n6t0t1Qn0M7l7RN39i51mhS1lPM8hz3dc3TJRzhHoX1stWPaIOC7OBXaVk3vv4GPfGlrwj1El8nfZbw68j8rQ6FDkQ3fVLIL7M3Yh47O8vuXsR9zZ3SuThYLXrza2G3QSPL5UrcW4HbwP6eITHv+B99X5Yp03nkLukarf9IWPuP+e2dQ+fCn3vZ0tO3qO4v1Jr3du4fH4G29v6XaEZxHq6ujRxYr25J3S5lVn3/BeYdqP0Vsacc4d8gjxjwtyVfeXOfd3O4xc0/b3cWL8e7Q93enSW/zXefRq26sc8UXT3PRofAX7oaOLAurs4R6cI+v6ObXRX1dJ3fFe62zIAYZMd/K4hn2fe5MKRbBvd9mUff5x7m8fk7fuFkYc4iRP3fPdQI9q86/z4CnxYiJOV1ta0ZeBnb+Qazdys4oVe/ttxC/8jd2+nXLw3n3D5FkXynTlXhZcItcs/I4Mux+XrQR85Kp3M98m5rv6z/ubIuELPK7516wPfFp067evJve8z0tKDOuEnr9Mu1wd6vE+rV4jj8ATyFNnew0avGuVuwrwvP3iCXZtUY/Gtd+EvdC6/qnnLjvmqFq/eey0jTgGA7zicm4kXnHmI0mS/ELf9zCoxPoPaYgL82ZA9Av8Nbydc/NRPH6grIFhFYrwjq1y6nndN6BfHxuyMf9Ud/wdrFaLxmNXebpI7YPJUdO13eLauxd2RCGVd7Vw5V3zld9Jjqx44aJCT/ePcMa/TMPcBWYsw77ave+lin2x//lZ49jZY9jrz0k05GIJ7vdeQRcHnkTuUyIm1YOa6DsLZju5pwlyB4eOYRmP8z65zJ6NNXYjTzv3oLjbaBzzzii5v/Eu/AfF3Mx6IQz/55sGtsp1kPhH5XdlOLH4oZsaMrjN30a8c9s871rbEtwDU2WMvniJd8Pjt9ve9UDPOu9ZvjSrkG+P6DW2+QP0qv1yrKicrC/vuuZXmFdlEXKXx98v1ebcbrIgKkUt7Hjahfes0PUgepFjOeNieR8b4+G/4Sj2+T9rblcdRmPnmShk8rD5bmrZwsv7t7V2Vt+6fb38iXN2zZ/uDz2xQxhz96B1An49CwxJnfQPeoa5e69lfAJ/NT92X80lxONJO2ru5Krc2860zlO7PPL/iJ2N227hfuzpkXV8VfZxkxTfU9bAXv7SMduF8efQFw/tdGDDLjdVv2zbFC8K8f5jZ+1695O7qMejN910hb+ssvvrztz4yxozr/ncHczj0500KfYR1/fRwWyZI+ELuxVqe7rUSvgQ244x0dDNs1+rv6yGv8Qp1S83SdoSfrdij8TroM+3S3qlLc49t9KUz5nuBrmorekPXrjEO83+Jbe4f8OON6Ol78etxFU6mmi9UwvkqF/H5fz6BP/l5YY5B07uD12+9vhiCPgTt8Y1DPdEyrHd9T+/ryN/fvu1yQzegTfP4V3wGPZCLi5nJznyjsoHm4HM2B9E1wxfkgY/E2Ufhq2bT7wzV8ezl08jtzy1reD1+vWTqgGnZn7aN5Y4L3V+tV6If6jd6dP8To2er1/g0PzDXnCuT6+0JA33zeUBTyblxd/D2S4N7r1FX1/ePV+tS7zbLbjwdKVf2Gm6Fcv0MYZ38f3P1evVn/vErNzzDuVF/hB8q+huF+KERh9sHZwxxk1l3F1u4074rMFdGt9zJG7dsV2Xup9+5qyOjrofPSoc/9AH22XLhT1GqQKbk/bHbrt0TP+wuj3gU9T6HG0518dOyz/iFXL/Zid21BvE+aScew4fzf37sa3446e8b5+2u8TMpsjLij+/u64O56xb4edbcqLHufjz1+4zxG+Y0G1ipnXvXNXEqWNyrZ+MPUnw1msb8Cs25X5Uvsr4OzkxfYnfs8LEad22xaks8tpHyQ9WKY6+r/P0iGITOuD3M25P4rn4TUnRZcVvJ/xVrAwvdfk2/N73pIuHd+bd04ybU2I3DMZuMOjnjqhI4toVi/XNix1Hmj+f82R3451Mpzo1T890VWeuZLrTijjraWo8ubuWfVznyIAKZbBXu9NgWgcv9AaT0s9yTYWceHRfrwFtsZOq+6TU+ke8y6264/SNEyPwb9GrXsVtu8H/NC0PBOFvvn9g5Jf76J1/FXx0vNhk/JssSrFkqTf25lNSleyPn6aMq2433jHcXX18/u3dee6hOVWmc7eJh76tgOunUfhzeDJo0q/TxPE5sOFAoxHIS1vdarzgNvrfiDeq1XP8MU0ZtvR0DuJGNFlbIlVb7NJTrE++cSp2s/6O9e9EIScP6FDxwD30FafHTqv4BP9Ph0t3Opkdu9vNm4Ydmoc9ScrOSSq3Hotct+SyqjPXEdd3QMYnjdm/r+8XjMwH3fDtkOrKVOK13P0Wk34X/vW7xxVpsIr3EVVGxNUKxD9lngb5npclLvTd4in/TGgJXg8otygP+yNlm6aD/IujR3p570afrG7qyfS3db2wi21f6UaVeO6NdyeOGNIO+c310OKVv+CP6+CjGeVrD8dPcb5Z707hb2lA57lt/kzjXUjRGrVr4odjQYEml2pjB5BsctOp6ZEXXunk/fQBdGBg0ZdTl6B/PpPO/cqqUOKQRUzx7oHfjcGB7dN1GIB/xqffv9y+k1TZ7vWc64adxOYhzX29kaO+9yl/qAPnzOgF0wtuGAs93vql52bsF6wR63akxF5x6MND55tg1xM48naxrMhxTu4bOr4b/in+eha2BRIPJaBkzNR4vo9W2bz2NvY64Qvdu97P4KzyJbsXsvcI8o6qgdvqTXFT6dsV2F0KuU3y8uv8bxIv5s38NMfWEc8mskzFn/PR9zWOrRM4Kh367Kr9u60k3lyxZ5vfJsGfWjKnlrmK42dtyJmgapHLsIsa3XdXe+QC7X9H9M0I3x22f3n3FLzHfFm+4/rk7/DXU/fyl3PYDzv3TJs3LXQvxuK/d2ATd9XBVr2wK3b/vqs3Vk+HP5qtFzo1e+yK38XVT94e5L1Lh7Tp1pzm3a3biPj2s5GfPTr4K6f4xzz/vNazY9g1F3610XKX98aNk45I9BN7S5/dQ5K1H++scrlOaRXa1V29c9t75EVN7r1z3w9Zgn+YEk3rFn9OPKFCiWuWOove8kzRykP8wojf1mtK4YNZ4L+Cflaag74r/9ohl3ZCB95V2XT8KHEkVzfJXbAV/q7L3L++Y0I99JjPB52dQ1yf6t+PZGmMX7Y8I7+VyRnhqPbunp71cUXirB0d+60reJS/ku/E8PTYj5T23ZQHf7n9FoalCcqTWNWa4TfRDz3rnd1ZLqfJy/vWpROONdrHe9vLdZ68R4/x5d7+HFbiQb1L77y5JP4Jzr+YOq0I8oNnbdLV6offychTl7tlg1+scMC5UJLSbmrfzRa2z8SZ6tGq/5dvI5OqOXdXj7v7yF0VO9K2WWb86Y7LMrCa0y/2Te98K8PXwt+8eBw6HD/MPx6nd6zHvav+qAuJk/Oer27+5M0uehHv8sj3RI2IO+ecZYXPW+KC7DlXtlhW/NV2XRu3rAp+b3KnrVPBBbuNFImujB17w0VNnPvt5JAX+Ad+65Z2ZKakxGfv+3ZXPOf0yRsVHuB38ObXyGofsINadzNn8cPs//vJbmcqc9SiOm/o2aQSfjdX7D/yuzx+kHuWa9wcwqk6vMsyojH64bGBFa794r5RfvabQU+wsxyUK059jsWOrG6JaY2qeagd18rXDrGiv3h9Osz7tptqke9271/IQU+8XOFcbTJxns6ufTX3uUWNKhUVWZ13y5O3ujbPgB+H3Gl7nM6NPdmWxY3ep0Nf9vrQyc6FPqE/LNw4uCf+CE/+/nllUTHe/c0+bQnnvdaSlyObn4zjHdyR1AuvtEYvMv135rLE003Zq6jzJ6IXTNzQpnXQe1e1q8H7gBXIZU439u4Ugb3Ke5fYxG/4e9Irlesa/srLHftyoQrvaa4HrP7xlXfuT5vfjF6M/+gol0tlu2KXOTzmQd6ztYgD4l46pOUW7sPWTj4z8We98pZ7zobY9d8/WKr+DvjOe95NB8diX7aqyzgHX+y/F2ev/sATP37NA9T2PbwvT78hNncm7OzCOqjYgUMt6kiFOtl3YzcT+uxvi0L467MMdh5cmDh3xYMscS2QF2bflKmgM/6ReqcosXkW9hVJH5RvX4j3gpcv+tdeQfzd7L+Gb9+EHxk1ak3ZQstd1Po9F/Ymxm/q8GN7i05Dn/Fm9Mc1dYDf5Y6Rhcchrwq74tF00kRH4oBdsFbh3XO+4LgkO6vjd2ow0V2xU00xY1CGjNibPC+0sNca9Ou/b2UIq0g88c9Jh1ZoWTmZOpKqaIuz+M2pPfDe75rcxxM985rRIR794d+7+zPz7rXqxaXV6+DfOy7+299n2Cs++9ai5zPuwXe+tC3ujR1uoUOOA2ejr0mScfLqa/AtLxanqXGBeI3RXcvfuM59tW6dttX6ob+qs+FP0ea8Bz+XY9mEffPwW56jaKPbL53Vrh1Hnuc766I2BWUcPmwq99J2tWKXzvdQ9x+0+5aP942zTxV/nR/7scvti4de5f61cVnP77OR4w5ZFbcrC+8Ld7d+EZ22I35KM7f7dLEB+o23qxb2bo78JDLVyy74JfWvl8m6Bznaw32hN7PjX/rs4UHjd7RwVS4DeuRwSoG/hDn1w9KsdVd972x6Vw5/o/nuVRs/2YK/owIhkS/wWxU7s3DaI9hdHyqa3qP2AOyKS44/8Q56f2l2fddbvDuLK9mj5PIrrHPb77HH2d8zKs7ruLcf73S6p5jesqODKvRi6KVyc4jPtG3xgxEdXdU+5xFZRiOHbdXNlmioFf1Adrd1T584q8R/O07cjD+bCjOflAvFD+nfrslq3OHd2/TSi2efRf6e0hZ9Low4ZXkb5wu+gx/2y2PKB8fdRt168VHdcdhzlxrR62HjxMSJHrY93zXiogXkPrynJHY4lfYvylwOf/ojS4zLM/mcs4q6O755AfyudWnudMcL+Vv5fCk7NUYefLLcj2OP0AvcmZbjYhHsLtr27OpXBj+W/ZasmL8GvuFhkaLpSkJ/gy311aTGSVRHn1dlm/AeZs1W1deCHwvHDF55TxAn3vv4klzrgW9Ahao/O35OomJjMw+KRl6Yxv3jpk+/8E88cfaBce+Iw3Cx/Y3v8GVtDnSKmjzQUW3zT9q0Kf624p8nqhSIv+c6Z2oX6ck6z+ld1e8a+oSBef/m7IX/l68HlkQV+UQc+epXWmzAT83aE1eLJcE/0dPBv+JP5Mbv5OK/SZ4cdFMbkx/LtdGVuKf9Hp4uQn89xj89V4Z3rd1zPPpbolZi1b9v6n4W+LbdX1Il24vcIG+l5bOP8L7k7chJv7sR/3NU4/HvmsC3tj6w73ob/Hx1L7e+ohvv3F0nzPR1gt9v92DV8ZXIfToNXjNnN/YoRR86dPoGnzAzZHze0ck9VAmXdoe7p3NXPPL0Djzmos7lLNK7EvKnoWMGpUlL/Iikc2q5xb7Ajsu7aJLDGwjTuGZWyg74cW26vLL7z14W5fnuzYO3yF8d0kx+nYr3Hb4X2zZLzTo1mPGidCbs4q4NsPXb9BS5TCsnl2n4VVlYe/K1+7exz9zn/yqOeZ699rZxVfzILXTN1moI+zTThplPMqDfKt86IOLTRgc1Y31E5VVjlbre2n/iGe71lZYOuTgBOcyueQ+WFqvoqFLWi7lcGr/9kaXHZr2AfPHTwk3rHqDnWTTJ/W3y3y4qskWutwd4r3/x7NwX4ld0R6rqVzyxn+u6J/fTLfCXm685Bafsk0jd+5Nu9QziTWWa2zF/EPYRRwKvzXmMP/CIsZNqNtiv1OXY9I1OYae1ss3qB3i8Upb685f04jwef3PcjQ/c5wOb1gi4STy8ydtvDt+BH9wjTdv3z/IcO93Dg0tPwO/WpGnRk2q1dFUlf1YuvCK5swrpsXR43Uj8MAffzJ2+B+8zLz5bPxZ5t59f1ffbxS/E065nT95OpMakPhcThJ+LuPxpjqXAjmXp0BVnZ8APPRgUuv8HctHMTzLOdeae837O5+w7O7gphx1LO7XFb92WQhvP1cF+s2rgQc/rl9nXJWrGHiHebOr+Wz2TY4/fr3qHw/3xF5H5RodsmzNAf48vn/ELf7vO849eCsAfb/yAIsuzcF6/+rztY9N2xF7KdTLsIvrAXXfCgyexbquX5PB8Dl4k65ykS1LwsqOtxtIvxHdLG/Fm7hQ/4F12waz2nuBDmvIRMxzd1M+FL6Z+wZ65QMkbW+og5zzSI+eh7/BVrh8ia7aGT5q9Yrh3I/RlYV2GvvjNfquR5FxENfxRj06WumcF4r7fbX/xucQZLf+n/o9a/N2/e8U9teD3eh6P8MuDHKrc33aZivA+Ifxnpu+rKydVUfm9/ngQp/Tu9z4Zq+P3c2LBvXHvkP/dTDWrawPs+4o2OpY3dhzy0kqXfPrzPn7tjdSxM9BzJDtRMb4KdlnNmp6+kAj/AcvGzt82cwbvujrdt/j8wI5r0dNbaid2hLlOWrIcI97JhaPTprdIpsasiZt++hN6q1dzbt3Abr3oslZjFhEnbV7ajXn/VE+k2qQdMb4u9hm5jo36Gbqc92ZbLpVtPhj/UEFeXZyJB3Z37QOng5xnvRosCMk+x1E17/ryeHXO9a7BliM58ZtWMce6+VfQuxd6Muf2a/yROO5+/ONKP+L/lVrrNyaDqxrz48C+PvDxlgzz/eoil/x+clK1OOIFPplzKVMj/KV9L/G2TH7ew6e/PbDxHuwmVi5cMO478SBSn+23eBrvQS+v+t5ecY6FFtk/aD5xe/MOe93pMfHvLodbdnzf4axeuHaZ6oA84NHbNolDCrqpm0U7lKwyzkN9Od3q8Db24YLynxvG8C7hy9ejK5JjH/yqi63fAOxQLz1Jde3uFuLKfIw98Yr3i82aTlv0CvnQhF1BDw/h73fIK89LfVohL1zzyMN9K3SqbtsKD6Abn56/DO+IHMffd2gjT/xZbg9/E3lhFPqcwV6ZFuG3tHB+dfUq9h2fa0YV64GcYPrzOs+OYH9Ye/jXhx7oGRsOv5QpFv9j8z8+PuSCf+fQj9VbZcP+qeOpQseD8J/TuW3Nu5ugQ2eyveq+CL+fj39dKrwHf0gHm+5Ms+I7dhTvOi3ZsMxNRV2vlLEYcsfNaZ9cSHkdP2lr0gRF5XVRrpEBQytvSaTOBoxtUAh/YCnLzCqykPm8zJhvZ3r89Fb0XbC+NnEtb1o8Ml0jLmyxO19WVye++ekapab54pcvZl6ZF3nxS3FszuI/3pwbc64tPN3+D/Lml9dmPMyJP6exP9dPdObcvVl5uP8i/PUM6vh9MP4P8++olvtpAex4hxb93QC/cdUbp0szG/u8zK9H3NmMvV2NKS9y/l3IPXeZY88/xAfMcnh09BDi+6UNvbNpb3viAKxacMAFPwI1+ly5tpL+352bf7gjfomcbjz/dYw48X3He6dqft1dTd3n32lmS3cV6Bn2vBl2Kx28Ui+vjF89/w8j194k/nLV/ger74Cvftp3Y9mK2G+mexFVeSb+extUdXK3sZ+2+6yvMm03djIp3eZnwW5orN/mxenwL9tzy9bE83h/0Hdq2bRXVRLVbZjHjPTg77o5B8YtGOGm0kU+GjEU/3GvZk+v1DEOPzM3Ck2shjxocH/3cdfRh7R5HvP0J/jW5kWS9ml5N3CjTmBMqdLIWeNG5Uk1kPizS5N4rG6NXrDqlnTf4Hs37Jhx7QP60fY+0+vPIN7R+j5hqcfWJD52twKJ8vJu/WnNhWdyoy8/V+nG/j6jXFUvn+mfvm1G750sudNU4lXsL7At1dQB6CUKD0m//Tp6q5yHWp7C3qvxhBd3V8LH1Hq/ovds3jesG5DlSA/oxYSj55v8JU5k7iUPPTcndVCtmv7alQ599Zj4aw5Xwjiv6zZ7exq70c6V3/c4TPwN69jJOYtgH11p4bCZz4KSqnLxi2/2W8D7inxJU+TAv3bKHx/7vUJOG/r9c8M+6EsKHd57ti16/Wsjlu3Pjf6yfOsU4XO5FwX3DqgzG3+u7lkcKk7n/Z9ni90HlvBeNiR7o7Gp0MtUfHY8xhf732bzCi1qcwf50fxTi72D0NP9TJe9Pu+A14+YXzEcOF6IOfroB+dnTfc/+RrDL25r/X6iCwrtuENTh2ZDrvbFsVje09jhLet2P3s76NKfjll21eE8znurpU9i9IMje0ZvDimEnVTo1FyDiQNTKcm40ZUzuqguszr4tiqJn+k+Qx/EIk9VOfsW+4qfmC8rxlycTbzk4Q1OpT6FfUWdQvGzFqAHTD7AtWMz3kHeff0+aCznRoalfXdUwx711csu/XMj59mVbcaRTtgzWKod2rmc+1H3t07+89Fjhqxv8jh3euwJY6d2iCEejF/7reHPuS9u7nv1x9RTyL+d/2QuGeaiuu6dtKMt/v33Tp4wrAL+yqpE5ijii9+g8ln7H9rA+d5g0oBSx9AbNX1xcP117EkqxSfbkK8y868yqvtL3plU6PCwWWrsrOccbnzaH79BzwbNrnaa96grDy15uSSZu1q/asCqb8RjHRZyqscO/CZXeV1xbK+92McXcmtXh/tVw6atPF8R3bD9QMeBjsSV7JisSVZ//L+9d9n4objInTd0flobf2IPDs88+DbSUSU683NjbfwUZN/Ztn59zvf9fsXjSoXCJ+y+cfUj/O2b1rt2ZoC+tug7MGwW7wEqp1002As/Y4s/DvpWnXeaDYpebtsa/WTy2tnvrCWOhNdUvx578XO0+22zWWPgdxL5egaNx876Su+HUSmQY7Y+Vt61PHHl3eM2z7yKfPRy/w2JxE/j6PdfjyYXuVNswUaf8YPfM2+v0su6uKokjhOLr+dda0SiJO4LiC+9v2uGVe+bEX8z6dMvE+ELcy5bPD0HcTzuXk80tQv+fhwnTx+eCrm9//oVN2/wXtD55OCyx/x5FzTl2bch3tzX802/mh75QuvQvyt31HdQqX29nsQNwT72wMOyD/CTnCPi9Kad+EnuuDRDhsb4Jbv+PdeN8dDD2/mnuVVLllT9mpC6T6LGvKcOHLp3MYET9zsu+J6BuGYH37Tv35P3TXVT+T9dXp79ceZFlvPt8QtQKa7Uc+TLWwpUDJxDZLgy7nMK5SJ+ysP2L171OwM969XvbyX4wR/jSrlMS8/9q+6ttp15t38rdcEce/D/lO/2y/glyCOiLlTYcHckfjpvJ7deJJ5adLZlzbyxH98Xta7hDe4/j879WeeLXvJl2x8e3YijlnLRx62psGManuLlgKsevFOtYJuUCz5+fsf1t0OQ86w4/nj6T/y1lxr74E4J7Jz3538fUBJ71bmPm+ysgd/ZvMk3va2B3/HRX65OqIdfrcZ3N/dcgF3Bt0LjevbDj83aBznrN0B+79d0UXnYKnV7SqvfpXnv8XSlpUYW/IzsDwp72R3/uI8ThS9ug11U0/XFNzSEzyg5qumgasTVHeaVIbAleoX0qUNLXbrtrqKKjwkojB763pYfxxascFOlbvY69JZ47mvzWzctgs5t9mwf0Ar/b0NqqgpfOM+H7xmTfzNxb+rnWmjz4v3QxgP9R6aHnqScM6bXDeJYDdmbN09wdwcV1Lb72pLck3p5Zo5JzbkcsiF/u8B5zmrtcu/XHys6qzTPG37oWNpVeaa62qtkKQ+Vq2KhzDG8Uxif+nDBNXWRB/j7tJmHvP1WbED4FeyKh+/oOa4//tRaNE66YgfvYjbNHNdc4kxNKFc57yj84RW4MPLFPeS1U+f2aF0HPWqE09r1nbe7q34FvvomxV5jQo3QudPw7/03/aeJ+dg3XwveD09mdVV9f9Uu3Qd9ZGjJr3XSL6SfbEXDOmL/mmNm4KVcQkdezt5yAr62fkDa5JOwo3NcGB3T8SJ+9Da9eN8Au+ynWzpejOJ8+NjrwLP0+NMdVPna94UnnLH3G/zoO3YkF54diy2x31WlbZZn6mn0FHdeLvV8A3/+bsYi53rENc74dXaVUthL9vDP1HEy7+qb3LMdO8G77wI5iyc/TL8zxvdbf4/78qdTu84doP3G496sHo0es9/hZ6+PItea+mn+9arYS05MNLjzQvx0lwyq1mjEbyf1slaBRnUbIl+9WHbs26nYmV2uZdmHnndIgO/cGvCNFWb0eLAUvdHnoVebB47GHirr9Gb1Xjso17NnbS6Xmd+77lN7836h74N1I7bzHmZvoZV3FqAHcwpSlfKjl7vR+e+rnrwP//4p2PUO77ejX4zKviPYRU2O3m/b/8BD+XqtqLHph7vynzv4pBd+43cVPlvHFf5p8ZSFI9dh59LvefEfOcWeIzRjwVvYh2x4PTb+M3ZftQ+nfDEEO+oPGZ0a98KuM0nTJZX7cZ9Ys2ZZkk68q49yLVci4wqLOnlyyZ3rg5BLppr21Ae9indgg7s5E7uoBxu23W+AX+reOeeVPokfgvOOP451HJJYbSgUusOKHmPClJs35sOfdpxVZ9tA4iOcz5xhX3X85R08UHxhQ+LjbPffnd8TPWW1uPR3PIj3nmXZnkLd4Xt+TM3XOg/+uw7ELozq1NhDXeu2ckjOrs6qRu/ku7vhv/LEi2OJs8EX7lp8K9htKPr2u2O/TFuJffuGxGlPw2fmb1D/ei3eXT9wSTusIOMLb3y8Qsr6+OcLtF1PjR1VrmmexXdxjzvcrO3Fovmwm6uxsEMq7I93Fjvxqg709Myngd269XJXFSoPuNEJP2drc6W/V+m7m+p1a/Cqj5NdlNXWeVQQcuj9Z4aX6cq7/FGrG5yphr+btj8Kz75LvPHsheZU+Ir9SoEFH9Lkx99YnlVXWr9ALmAZ+Mb7IH5U5rk3Hi3vgZ69H7YyI3LQY9GTjnxh3evkD50e7u2m6p34GNWwuKv6vKBQ6YXXndXoPot6u5dyUUt/t/Yphz1bsRyZplnRuyS5OLTrJ+SMS70Dwp2wZzzwu//JC9yX1nVJfm8E8+p94NfbB/H4NS592hqDHanr5xnFG2APODroY/1BvJ+N8jrxfhNxZNyz3qgcXddFXUuVY8t4/D4P7R7sET8IP32NH2Yqxrl4Zf7QiCLYjw7M3Nnihp6r97r4Q10+4v84Il3xPb2J81T4fokly4DDNVwKjuSdY3zKM28zJla1J7/PNZs4Hd8XVm/5HLn/FpcDLYbXJn5gvVuTD8HvPsty4HlYdGJVaWf480zo92dvezf8K/YBu/70mDKZ+/asurbzBbDnS1YmYm175LHfQu+N8cJu0nfFkWOib+u9eXrVLHnxj5evWFAh3qmV7lD27nT0hUsqvhnxHbn21qODUsYQX6x2r07txuFvZGCXDZYfnEfley+clRT/KZmvH25ZFjuS8Tlf3r6PXqhz3jWPSq3Fr0r4vrRNiZr8t/yirId5n94yXcDX5cTd/1n0U1RaB/jH71sW7MZvQMi+z94liSf5YcKpoyf/oAf1XrC4JnqEJLkm+MY2IV7GlZvZR+NX2jVud5r1yCUWWUZVSEw8lJev3jdLz33vZ8DaS6O4x4Y2e54hGn/1Q75VvFUC/94Vvlz5URO7vd4lYi4FIBdZ/8gpyXDsoQ9XODy2DPbfU2Zt3/l8AffnEjMqvMJ+bOlVh9+eM9FHZwzeeY777YiyN5bNwk5rZ8N6f1LjL3BLlo9Dv6CPyDfo197v6BUu5/ZYuQj7s5zvU7ezcV9ZuiQ+91b8ggz9mjij+Puptu6T3xX4/4G+E3aOxR40Xcu+57cSM/bntsreQ4irZin9Z1535N2tT7Qu5IW9Ye47RRtNxB9ZixkH59Qhjt+Rr98S38EO4Hf38K8vkbdPG5zofUf8oE1J4fNm2lQXtWdOjQxVp+IntGmx3rH4G77T9PWB4RPRDy2au2U7/sbrbRkS48A7ldH7enhNRp793KllgX0Eal5S4LnfPOw6iji45EvCu5u5R152T01chDe+65olI47AjPn5My4hnl7Gitk+V+Vc7XrGYfUa7J+X9sz54kVv3sPOvP3w7Fzi4518EHsDucTa47b4SN5HlK3f6ddT3p1Glm2zw4e4GR8KZbkawXuLR/sq3uiDft/z3L3PSbEvTDU1cO0X/DMFlz43Kx49w6P4voWD8HMzt2Ebj6GL2We5HH6/5m/H5G/yTgh2VtdO5Ay/ectdnRxY68f+lMjbqn1pl5/fl3bZnvjZaeIY9V3+dxH8mmpZoXMj9vWpqpEX1/DOKc+1t1V+8E4yJO/vLrM4nzr9fprn+kXiwu6p+fpMQfTRR77PX4jddKD7zdUOvJM+utez/Xb8udXN0WxiJHLS2eeej2n5mjhpx8esOc6952RA3tYh6HOLVXhb8AD643Mx5fbOIN7cCc/gFR68l5j1Kvv6rtz7vc9vvn8H+9UqdxaPKloTP6Ebnwd25/x3r39+l/dU3jHNyZN0AO8Gn1xOUS0rfs1/DdlWecZxN/UudZ+Dd9BXvPAvknUbcg/bkecVBzbhvVWfcb9L4MekYPGLtfYQF69FotZP22Jf2/H43y2+WfBXWL36rW/4aQutOuNjO/QO3StfqRzGe+Uh1rl5n7+3KN8Uu1+2x26uaExY4II9vHf3SZv8O/p3wgn7d+o1yC9z6ZI6KnnjXsRv7hZAdOcmXXr2HzBokMQTljL+gwYEDCggkbqbELu9V/8eOny4RHIvYK+rKxQgRzLL+PeRL0ra/2ps/7eLUuUTxD0mZJTieYHqYXPpPXl3j+ODPvcvV+ZLg03jGidtNKun48odDyZmSns9so3z1ROfpUzZLSGTpFy++EV/pOzHkj4dpPytCbZdUidT3wr5pF6fk34/pe6ILGO9pH6ezOJ9Tdnjtst/E/A9KP/NML7H2//ne6bOp5w9FajzXXQ5jhb7f4TMsv9Hvv0XLLns39Q3vo2fx0/X9RLpbwf9rbsZ76oTuv54sz9dYLw5DmedD2VS2R1uYV/T1iE5cfDwsKMGSEx3tZKUOXb87Nh/S6Em2uNHG7MuYo9i38geT5qo1fYSFtrzUEntK8ErAnvEcy/8tCt1X/m9OXNeuVVMTiEuvjpANVNWdezfbcnFAZ497LsJWhQ7NFfSHi5e0lzolF/wWZrhrprGXll+EEtrnLdQORmRrjHHIYUPC/v4DLyQ/5LytyOjlZj7iJbs/0lcdRmOzMZvyTkaRmnrbi/iQ5B9HIwQqh31sL0wZsr2EXjqJr3sU5aw+r40ndKeB+tIg1KPx4/2j+QReVb/ismwPSU9CPD9Zp2n07+WpITEMv7LRj8GKHFfbB8+1wD73NnvfAtAs6hU/03LjVYw2LYDWcZowE5AISPxtLcjYCI4tUpuBwzHNrmu9hETKsr+r9RJCugQlWvwYQxFPWMs5nrIR2ZopqQf4z+zHKTQPiZjrRCE63LytyyJQFdKysfFji4Ck2TKb9lF4AAFNKr5bZc/xeO+fewCKQOaRrvSq/yWRucIxGVdUOTZy3rplo0R4ubtjzS3BgbB+M/bDifpzKhvrovUNpDbRGf53Vh1EwYG3GVGAh9jbNKf/EZAQT13RNbUdbbXE4gavxur+a8PGaGgpfwq+cbqGattjN4Ah/mv/CcwNOAtczR6Ndsz1l3+crXXd7fP7F/vAk3pw1g3whTZ2zPmIL/5bb0CnLgHSwH5QTadNCAdGY0YIJU8A9TSjdGYQQMA9gdpBCWa/GjMx/iWf6UA5uj2+UpzRhmzCWlURiVQMuoYcDFxT4ZhdsajbvtgQJboq3RItDQBtXQm/xodmRUTkYe0KQEoTIDY0WNzCA1ctBjLaQxHBmKUwfrPnja3v0zMHJIM1ChnpI3NZMBI+jMWTVqTlGwGE3L/kMCs/7+AMn4zwWRuI+PfhGAw+pMZGgjmNz6U2bz2kd9M1P1XR1oy6TV2xfYaMidjDAbMiOOpkcRYHmOkkrLV5g0F/rFs2f8o2+sCyjZ6s+pTC7subEetkQ4W28vMypaT395uVTb83ljxDWL7sFnZqoRbbK+3qqHBSZU1OJ2y7U2nXLanV9YCf/C1gb+Q6t6W+/63LLY7PsryPIOaFJBM2fqlV0/Qwdp4J2jDl6wNu7sUxOq35vujnEqmsEQWLKxsvJG2DaGtM8kttryRFhtvVq2zPZXtjY+y4Z/c1tRF2V4xzt/OaiTxRmx9vSzWo/R/nt930V/sVvUEfbstB27hTm1XNgfaebVVWZ/zd3QBFYOPO6eQ5BbrvQzKejvGYi3jarFhL2nDd31MS9ontkwsdvOZ8T1je8ecX/io5PgxsKWlfuE+Fsvn3hanE4zhoY96xb2kTx3mXxX+MRdvIfCDZovzUVbic9qIlWnbzng8Ii0TRjH3/umV7aOPuj/gliWQuMaWnrcs1rsxFhu2Bzbix9siMygb/iBsDxkXcukU+MR3qeeubMTmtWVy5h7MOP8WUFZsJWzP6AMfOrZnwKHaK4sVe3wbsd5csP+3fSigorelUS7hqZXNxvjxmWd77qMe5gW24IG1BGWxf7LxZs+GHxpbfAblMimZsuIT24Z+yYoNsg25mNOZlBYb1Nv6mPEgV7URI8IWTb/E9rS5RFo+VCNvDXiQOtJivcM8bgH/MZvREzDn3l4WWzR9/+SdODpYK+8MbNgexuBX2VbrlSX1aebAm3Ybdmo2fG7YiJ9tm8K44plPV2x6q3taXLEZd6nsbbHm/6Os6KmdytEv+kobb31tUbSNTNHmAH7k+KOy4XfL9hQY4cfQhg2yzUY72KK6FGftrzKuS3wOgiPtvZRLvtQW6yhgjw7BRkAOWx/Gin2eLRvj8ZJ1oB3kB1ZsUu93Zy74grcNAq+fsD4p6O8bbTeC6J5wZb2okz3SYnnAHqn5yhICn21LLjjro2KR1VpjMitLXG+LbTrtVH9lsVkpN5F5xrGOyBateZgbPiBf/fJRPtjm2fC7ZiM2tg2/5LYptyyWiAzKeQXr5kM/PRkn9j22Jz7K6cA2ZSUGvhX/v7ZWxBYqhxzuHHN/n1/ZvjH+trTNG39bH3AOW3frEeZ+nA9+oZzK4RMSf0i2GoyHi56VN+y2bOxvbMNsUcztCHvmHv3gu8yCnZPtXQHlkgR4Y9NkXU+9QpS9DDyJ7WbjHmZ7TPoDv3+kLvYJtkFeFsun3hbrb/L30tZ7cOYYfb8FP8uwj5GZ2BQ4gy4gthPp4elUyhO0kwS4/aFOKB/08baXfF/xUS6lPZWTDfijG7Lht8KWBxkr93lrXtI5qTOUtrGntmUk/ZY6zxnLYMojC7NlYay5yf8Inp5gruVoIwA44l/Y+p61iAO30fVZ87IOvJm38Z7UZmW82HnaivaxWOuBA+nJH0b9RJEWlxAPZcW2LfY6Zf7SF/dcGz5SbC8KKAtv32ztvNhTaVWP0kmVC3d9220ZD7+V5LeB9PuIPpFJ2DBot16CBtzOrKwd+NubMaL7tP0BhsWgMdHgGjbYPujpLR/Bn2ngT3rK+Lqy1/gNe++RV6B9yOltkQVUZuRsNmQftgLY2Q0Ct5FT2ZDx2CKBBb6NbD9oV7EX4AOs5xgT9rnWt7STOp2yxPCNf1lbZmBVgjq5WJublPki68qaYwNrI36eFd9z1jDoJbZpVu7F1pr8hh2oldgstrOss2ukxak4+HaXtkYAr8fUmwquf8yvQsJo6xNj2M9auVN3PPPhLY6V+An3+5NG/27F95zL2x2qaTPg9p5xj+QMqJjBYuMNpvUVOM2bP0/iS9tuMd6d1MkEPH6yF46ksth4j2vbQR52vsl44289uF1ZXgDrAYyjEvTEG1pI7HbbX9oZTbmcfD+lnZ/sQ3zgveqMPXgB9llmyiRjP/e4ZXHpyFgtwKwDazqAeQ1MryYMYj68lbL9Zi5pgBPvBmyjNiun897sefK6s8YjE1lsyGetuYDnLcbwkHmd43cf8KfJNpWxPnRpHGUf0T/vfmz4ELEN3awsH1jnu5mVSzHOpsBbFi/eStmww3Q5DR1e66iyYiNmy8ycJzAG3jXa3tJGFG0d9bTYPrDvE/Pbd9pER2wNZ53wqWZ7ybl30VHdL52M+yz1qrLnnwHba6zHG3ClG7C4xx6rB03AF4AN+ZItFzhHPEhbOG3xHsrGW26XetA6YhVY09IGPsGs2clHJmstmxbYkP7sozJg82Itxe9nOeMGAr+KqSxOg5kLMd5tVcMt1rKUQy/QpyZ4+5j1SBlpyZ6cPm2MJZoy+Ii3EV/cSgzSCWOSqT61KZeVPvAJZhuVTk0YSdtrgEms4CWfA+DHha0qOl9h5ca7bNtn4GGljf3g4ssCKksj4BVJuRdblcWWQaXHZ4qtZB+LDRtKWzJXi0sZzm30urZUrCN2otYf1L1P+a/gxDvWDd2tZfUJixdvn3r4JlXRyMqj+rG38m2DBoEj+Iq39gUvLMD9AvXuQhPQj9pioZfFUyvrfeD3inZ6wJ+0ou2klLvH368pi/xxwmjm40neO/7eyvjxaWcbAr76Cw9FH29YJ2d+L86Yid9lfZtZtWnO3qgM35WN/Km3LN7Eq7eEQ0OwF7M5Mo/SwGokbWAvbyMGqC0DeTM4R16DV1+By5cCKhO2o7YzPiomf2HlcjiV5VVb9scn+kQnYz0ETHcwJ+wnregMMqahbF9+j01hsQ1PBL/CnIalU5nQ27hUpRx+G20xjPMD84rgLRx6cZd67AHe5cQig7TV4Pco5ufPmRBLGa9ISwg+k20HGEuJPhaXcZ4Wq6+TcnqVwmIpDW0bB40eJ7jDuXyBfcy7XBs+PmyDabMu39jb25C1WfG7OPQo+IF/Ihtvs23YBVsJImJ5CT2fAE4XAWafBK/hGbCps7kDh43CmzmruzcYz2TKvJI9UIBzHJhGkP4One5Ffi9iUF6FfpdgzrwvsQ1nb75g3sHbldWDMeLD3uVzepWBN2K2EemU83LoBnY1toLs9xHs/V6s928LtN5HRRYqrJ6UTqss95n7L/Az6x9wkXRq6maBHlx3VdbMstfAHWKf24jPYM1NO3co84wP+ncbbxusJ6FFw2h7EXP4wvzRh1m/08ZFxv0R+BOfwfaZv90ExxgL8eRsYrPxIIOyRAGTW/Bnd/k9jHng49uGn0EbPkOcSvF3GPiDHy8bMnobcmVrmnT4XPhJG+z7M/AZ+cHFGPxVl2MN8FNmG8o43rNHcghPSP87aOs0sLExrpnC7/NtzaCcjnlaRl5jjQLAxwjm8oB7wEP6CoFml4IPWE0+fqNcrrsp6xt+J1adNSLGkv4D9bGTth4GF9CrWMeAD9ddVCrepNlGk9eGsdR+ZZnpKNIi7nKJcAauTllCLF76HjZBnVHd7akGar7KqgrZBSUOSLyq2W9AxfQFOQeXaRy4qg7/XcTlvoVHCoQxSqHC478dWqxT3i6NQgqpBTbmLRA/K/aecKCrCutrN7YC3MIqU64fJQhtbxeAiaAGqzYtNpGUKbMyxEwd9E2ulL1HuWnWJJA377jtt1Sp1UQhdtc952BGmVRByhh3OXBM3+uMmyiO0/VdUW78yektHf+KOAWPcfb8EtRBjU9POMvV98MM/JpT3w2JeGWXrckojXtoOmoYMgQpIUKONPYbp3FPxSO1qs93Ln6RdmV1DMGfecXnLRB9y7yNdcpB2hCPVOYeLeIVAzaOiMK4wce/4s7LQ/psVBR5COyj/XJLqCV9nTeEGZha2CVQvD1CnGlcihPTnDPNC+BEmieAlgnKR8Arcrdiys8aSxcTLTJcAYhxkTYXxBAOlP3vOi8TT2yflkyFAIH/iRTkV+nFGbmmSMDc+F0+hjjSQDaRbFS0iwsw5fxPWGDK2tIpv5jXjAX9iyFEk5/9fklWOwP4hoRIBA644LTLAA25kchMCJJrl/WZkkIBpTEn+V3mzvNie8OyaNJO0X+ihag3dDLAGJIpmjMFaUaDxDgEYG52wBlTRkujJ25IGgRDDAGQIcIz/stvH5JgDK907UJK6dyHRUpCt2/p1uKKaEkSM0kZsEiqkV2AIKtsDEG6NWbwT9zBUZVA6COdezCM1LoGBuF0JPA2kcyQUv+rY8grpW2R8RHoUqsckD7NeM+YVllSaHGJiIcMwBhyP3PrG/I242/5XVbdkMaa8jeZFa4P/5Pj+pBjyg8Fp00JovyGyssOTI5Re1tGKyaGiKTV/EtadFN+ez8wyg48PdJCNmlS6AYxb/8TOprDE7QxV1eQX9ZSGjTkU4YcTfap0do/1MTOe9lHupmMxYyHfbMZomBTDPiP4vwT6xrglu0hJVL/J/sSHYKBpESX0nIvk/KKXM0UPjvZxyo01lQYGOOVZfDb+onRcM00oWISboGZCSv5lr3h8Z+6QMpJjrFjBFkNIZsxdG9ww2jFFL6ZYON5gvIL+iyoCiQ2SwKXxwa5NFfIIJ0mUROSZ1AKAw9kjWWyxhj+4bajPVcomci5DYwwpuhip2IySlMy7IFz8TgZg6hKJIEZvqkp+N/lMDauIdyVWQh5drXrO0R3ID0IVsvIjI1p6BFMqfm/xRREgARt/SL9Qib2SwK3mP80B4Yg0RRFGv2aLZjCZQPWpqDS+BjLakq4ZXaGANVAOjmsTNm1Ud4QmPod/MoAiD9oylP/bUNDZG4OQRoWABi4bRD9f3JZU1Ir5BkqNOObUFgD/Y11NY5k41gTWiB6H1MwK3Mx1snEP2OeAl/Zk0ZJAyME1wxs8/sgnWyzmKL2fxQr4URMjZRBoY3fzaPWgIcpyjUp4P8XfmOIqgXUpq7DwAJTs2MSBEO8b+K6SVkEE4wtZh/x+u+MOKUUMf4zKL8hB/c7Iz+uZDrGMYsl03+8hxw20rGAUtDNOLhN9YdsUfO4NLag8Tcyqf+UArJlzWU35dX/9BSu+pQxJeYJJe6GPN5o0+/dD71d4iXRzVDgmL8aNY1tK7+YOgUj1yApBugNtDBOPFOl86/sv8Ux1B9+tp90lshOpn5JktdeJpExSY0pgTdGYRzfxrb/Nx+pY+hrzCU0ycc/dDEW2C/2F90MFMJqUj+TMTXoh+iiTLCYe1U6FN2i0YHRlEGMRcNppA0M+6fX+qcnM7gLv+jfAmBG8EMSuKP9xzQYm1D+EjrnF/SHAvdYC6E15h6QdmSnGaMw+pDj5Z+m7J8qxDgYDEpmjDghk2JQDgN4ouk0SpigNlgSaVNQ1ez53+L9U9uY5MMgGMYozFb+IZZZytQxQhj//BW1ptGZTOnfcIxhmwsiKUP3ZhwB/xr9dwYCzxvjLyg3R6GJwM4qf+BT1tiuBvANzDQJiTFZgzyYx425UKK4NZgXv82BNIRxvmwhAyrGnjeLGxvYYMGN+Rqn2z+aw2jeSCNEyE2o4zIJtEEuTSqQUKtlHKymNQdb8uAEmoF8+J2ShF3HZ+wAcx/LIP/ptP71Y+rFjF0IrMZPpAFMcP6p1cx1MRgKAbffYSlkbMpzkuRJVkLtqTmdf+TB5OqNc9lUHZpLaDLA/7TkBrzMLW60BHe2fxKdYXpgzttEJ4Pz+XcQmAphw7bBRFaT7phYZOSZWyWhetWgC0YZv/2TNWzPSGLPVvwn/Vslk1oZPZn6QJPCJlw7E4eNLWceKgltQv7Ry8SqLqYuzliIVePSiRBc8QhdoUhRKAuVA7cynIophEmqqZwkfDcYqdTpBnhYESM+PtAG9ZEInxnY1yh5FI8k7flSHyWTwimavT0p98CfGzKgQGGjLgmU+O4mt06+7SYZfB/mdZ7ZNg/b7GWkvLRrtrOYwmnxcnkMT0YEwVEI8VUIXvFH8PeLCUp1EpiRh4JK8YjJXn8cYxRLGjFpkDbbt6Q8ZYfIftZ9IRhVGRkjDlv/60u+5TeE9cqrN33T4RNeNuF00j5elIEKwbJ9HtKu5F3Aw4Ffv3/zkDyzTUkLXKoRZQFH2v/93RcvfxbMiuYw+KRTjXHJeLYM4xELnj5bIKTogJACgZU6wID66vVIzVh6STOkS1P/IhZYLJFCOK+O82LxOaiCgkalx4ttcyJAHuOVZRSeM6R9mVMA3yhPFEEz/oMZoLLPXWDVHKEJAWH+G/sBjSeD9FhujyV6LcZXXt3xqgweYWStnvIx8UDmdoSXnrfwUv6eMXgy9lHUQzFmhysKGvtYq+kxC57J91+8X74cjSXjIqIu0O7SRkrNGm6ME4GqfXzBRM7fwwdHgva/U8MvoUxDcmS0K3M5Dk6E4Ekcp5n2+a4FPjj2t89VcE5wQ+pizKda3rIohOoKxbeaqufZVX+bMJCyOKa1w1TkNzLWlCWUCiLKaxFwiqW35wl+mDBbwDw64zVV8M/EEZyKQdmM/SXlexE1lYCC9vH8YbwPu2J1Di7iDMzeZx7WOaD5v/1p4s0xPeZwxF4yzoasr6yttDkTQHSjX9kPMndpB7S0//aAaCEYbv7XjsxF1ttcE8nnAY69rOCp1JV2BeeKajjjcMC+d+U32QcYCagiRD2QvYBA2i5vEzjXB1nvapidAld+MBeRNgldqQVO1tDtZCZiW2MWpyJiphJ8VrHHZY0EZk0wdfvO/P9golcRBE3CYC7Tzh+iuNbT4xQcknmatELmtYAxHeEzh/U5VZ329Tzf0k5jFiucjDTQgRg9vgyOxviFpqSn7Xx6ri30nlhBndf0L39Ln0uI/i74hmDcPk6BkQm/qgBe8Ebq1Qd3hwF8gblJX29VIDIObMc9PjivtOcPwsuwwNukoY1YBJmX4MVFnX8ND9ECP2m3P0i1lH1eiU3fiz0iaybzA83tsOcxmcKgQSVinrJ3BD6yLwQX5RsntHbYS3tS7jzedUyaLGVr53ZQH6E9WcGjM9C+Onrf+zTllRZj7cL5sQqksbI+bjRWAy8uFfgI3prnQ8hgPMywD6VdGZPAJhiawAMHe1rGYu5XEz5ST9avmD5XghjXUL0XBa/sZ4f+W9Zbyh/XYyuGBaO0Y/YvOC1rlaE0eA6ABkL0ZJ2kjaN6/6DIVMMZ4Bx4pCTMdXxbw0xQ6vuzD0N4VSI0xNx7shbmOrr5OKhp0D+Zn/Qjc7wJvSMAhsJYQk3mBTjBlxTKXBVPudbgz2C9l3KzD4V+medEHPujAvRC6KtJI2XtZayyfmb7g/Tc5YyRMQ7Q5ROe3wI/kw5L24d6OKgIXv2emyXrx1jYA6czGWVl7NKOOUcTfmY7oezhVCD9btaxakMiFWhYPyMqsllHyrKd7eN1xFpZzn5pMzd4kxsaXlnv694rOGc1rZO6UqYL8+6I/ausi+w9nCfYYTeM/ghcqJrzyQ1dbAZAOBLtOF4cAlSFdgRPgzE1bgwOXtDjEpjKmO4zPsEXgXUZ1n8QayFzlj5dKJeLDfIS3sGfjiVCo7mulYKgkfSPUZAdxjLWweDOZOiTwErOW6H1Mg4cudtph5ybsj7pKFcTQMg+NvGlOURqJvCbD605D+4n5JPo3l4vGh5gD7CCzbCP1zyTZaxCY0wcMPfQD/Zewj5knVIziKJs5uLQLmfo5wx4AtEDCK5IWelP1lZgtkDTHmcivXeFdggspQ+Zr7SXq7VBF4QWXIQHkfWUPvygeTJXmXsFYHaJG+M5PgIXgRPV7L/t0GtRmvYFj2Vdg8B/R2ixGBnLHA9pPK4JPl6GPu9abOCwzFnaE7oq55ec+TyUsrf/MR8vBqFnedlE3jA/Jo+ZCH7Vhb29YIMxVnP/yz6W8+h+oFLtWJfq4BlOlv6jDfJbBV7D9uHslLNIYHADmiq0VGC9ENrDYy/7Gt/AO2ot6KG0L+VwJmkf01sO8p/Q+P60gWMze14P9ozQNpknj43t40nIWwosL0CozbGae60cL+eknsxdvgXXpL1aeNouAX7IeSB5WUHAIM4CQfBRGo5Cz4WOXwbvTX7XCVhd5TON8QjvI7iGUz07DtwAJ00aiHGbfT+aPJHwKFJG4C7fG4D1EHDXPJ+kzEui8wvvIHCKpo+17Ce2rH3OJn/bHpr6iUU06bz0D6tk7yc3ryXLA4PaeBOQ9Zbygj92ngc+dSabvYUe31FegOzlQ6BX++/DmH8lzvZDfMw5yJ6UvoW+Sj+C6wLX5zS+iczPrN07zkqcldvnZJ6p0q/Jw0vbxTmrO7Du9xnoE+odgPaY6zSbvXKcKCLCxwp+D+Wl1mZ+F37IxFtz38pekvXOBm2SM1H6FBopY2vEJpL9jDL2P9hIHV/uQKMT3MdMWAtudGLxBYfMMUue1DX72w8sMBZR/fBSI3Xld5Omye+daVvuDrKnzflIGYLB2fG7HnPrxVxmssdzwAsJ3UnIFwreyd6X/k6U48WNxkXzvBiuYdIKYESxF3YJX6DnIrRd9lo6cLYheHzULMsPLXQ6I3DvwxwzgL9V2YAJ5/+OFwoJ75My7nDOMBmb8JJrQLwcui+hqTKu5twjzPuAH8TMrG/CTvBF6v4C11bxxw5eX46ngtSRtcoJvB4yplpE2f/FmOPYL3L+CD3qyORN+AjeCJzNvWOeP9LPE+h0OT2u1uDTCs6gziD5VjbjVo3zJWoY/IbAVfao/W7HvnbmziRjljLnaMeEs/xt3le+QjslX8YQyhxL87nGmM0xyHjkTijjlLUX3JOygofCc90Bz837TXPNLwtZkTGU7IsXa40vMlZpa7Neq+YgeiaAcRWcETw2+RSh7cnhf4ROCWy3cqAJbOS30QuMfGlP9on0YZ6F0rac1fbzvAHeGDk3TDpoygoEPnK3krKV6Ff4efv9LQFcTB7IxBHZL+Yd3MR3uQcJPB4xtjvgquCm3MdkbCYNkLNAygi/IPXTwwcm4Z62D08dC4ge4glgFuh713nOQRmrtCH3Eakn57iM19yfgo8EIbTDKQc654J8UoNPXeE3TR5K+j3M/utO9JyM5R3UIxainoa34IXQdk/2Zi9w1aRXgjeypoKX0nYX9pzQP4Hx7DKIkdc72M8FKSPrKuNYAmx76zUSHOCxt33/yzrK30PYf9UBrsBF2pT5f4X2J2MyM2ncpB2S306PT/ahtC1zKKN5PRmTzF1gKd/7OXvH8qkB37uVvSB4IeXPwpN6gLceul4axhcCoZnCBpP1NvvKB8yjKZeYvZ4VGbbARMZXlH3en/NxGGtkwtsuy2BQeUH0AfBdv+CJhJ8RnItiHeV8l/HKWSTrZd5ZpJ9QznLZH9LOOzwymzIlmY/9rgnumeXvaN47J40/03A8w5o25FybCqxqat6/JnMUeArtSHjHE3ycDN8ylw7TM79Uk//RW5wo2NvDaNZOd2XsMtZeIPBV7suxnMnm/UFogLRl0kzzvmfivvS1n7PKvKPa7w28YhUaJmXkviJ9NQCx7rFPBSdNeLQFXji6sv/9ElxPwl3cG8/vclbLmERuI3u9NgAaovFhBTzjOk1P5D5qPw/hFyowAHNskiftC3zlHBQ6ZPbpyIRN2cVJaOYWXtre4M4puCx9peV8WYOX/7nkCX9l0ltZf2n3GHI0G3czUx5gwno5wDVpkLQtuCnf5ppImVT63m+eF1JXaKjsv53cNWR/idwsPQSrNDgn7Ymna/MMmMJeMdcO4277mEz6eATcGcF8ErYtfR5nIXphStQOPN2N10jpQ3BOcEFwWWAs/R/kxfJ7DePd4Nxy9rGsqcx9BfULsclfQOjNsUi+yAgFJvIt9LSepkM7wMlNnhaFwZdKTzsT9TmVVd+Rzf3cRPfnyN6Ve4LQOU/GKX1I+0KHzXNFZCMyblDtv/Gb4zBpsDnnG/DNJu8Tpmmp0ChZXxwqGXJj6PNyYNyfPSVjEjgLXkh/sm4Ce2l7EXgg92wMe+2/m+eyyDgFR4VPlTU3eUJTPp2Qv6rPZWmKhkG0NxZgvv94OKmz1YQPxKMHe0LwWtqUtZH+EvLG0t41zm9T1mC/E7D2DhwMsm8ENuZ9TuAsMjTh3TaAO8JDSxvhyALy44lPcFT+TnhWSvvmvULm/4BzIz0NJ6TNdp4xAe5Nlvsad75TfAiQYKdLsnZyN6tJwVTczQppmUshIiybdM++Dsh1b/LBkF7d1PiAU0g1DTiUp2/ZH+Z623lNYPcO4voGWLloup6ExXjBvjbvygKzhDIxGW8ItFdgLuMNx5vu1lR4fE4gIxK6LO3vZr/4wOiFcN6NAT8kEqGMux8wfgidEbySPt4wNvOeLH0ILAUfbpNvgV6F6/mZ9FzKPGXcXFXt4zPnbd5DpSzk7z95taz/Rw2PXsxvAHukJ4ghcJA1MGW0ImMSPhvjcBUL/e7F2E159hNn7p8QtjlM7jM0ZTX3CxMu0kYP9vxo8ELgJv2d1v0V1vtYzgApt0Pjp6yPnElPtd5DYCl7T8Z+nfPlB5+E904TVrJ+QiPk+6zuw7yDzuQMFXwz6Yl8Pwc/HxKJ36TTUk74RennAOXlbJH9+oQCJi8hY5mvx1mBO3lCWZ2dPnP+yJ4290VH+F45t2UtEtKPZAC/Tz+8Wugx2WCEZH9IGzi9tfd1hkVoBo2TcUhb0vcEGjPlKVLPPB/M/ZKCM3GCHt8XcEn4WVM2JmVkXWXNopjQDn2+7Wd++TT+iTzkLh+5Y0p5At8Ycn3NRwoPKN/h4B9OFOy/mfht3r/ld4GLKfsx714mf3pIxgU+mPoDyTPpbBx4JTyhlG8EojqwF9YxLh6+qdvQHnMdasIzLde0f59e64LIoEZy8EifAn+CdNrXtUhyi8rFR2iFnEHv2XPluUsL7yP1YsCDAgnooYz7tj7/6N6+dlf0Opj0xJSFCMytuqxJqwri9QIyYE+H6d8Ernf4fICmttH9yp1b2ttDRfM8lfZGcPabay59ldP0Z6Wer+xpoWPr9TqnYOxfaSOh/Pk1iG/yQIJvzvwu9wb5zZTf2u8HnLXmvIQ+pSNCTFf2Vx29tp30WEXebco8pb2KnGdbfPEyquEj9FPaFN2oHX6cr5nAffPeI20LvRBanRh5yVNoRGLOe6GHUl/wVGAv7dnPWvBrI2OOp42EcmC7vlHjDU4k7WeAiTvSv5zfUg6HmPa8ofCCO4hidJ9v837bE7wqyR3orK5v3rnkrJWz+zx0Zw0ytGp41TXPOJOPl/oyZlmbMZS7B1I/4ey+r2nWfT3/pdDBPRpvzbuu0FDpQ+ZrysMFP7tz7glfKPm/kBO845wTvOHxp52nlPncBA7pWcArnBWPdF8J9/41ZAmyv4Q/SrnI2FsyDrknyO892XMiLxAYVwd3WvAx5y0wHaZxaXQrB7WLPgTGsldOa7z9xJkSoXmcMmykcI0XafC4I3MReIhcTmCMs0o7/yl8gszRpHt2nl3DM4r9nxf5hNBic10aAtjE0F0/4N6buQptlN9+sVcP6vGd5PeZ4M1uuRcloC1vocXyxl/KCxwElgIDmQPOeux78ADjXk2f8rvgSln+lj6E/shZJGsh9F/qyJ6w44qpl8FzWUfohHjukjFLffOuYuJlHuSBU4hcYt4DpL7QBGnfxAEeKP3Hl0i97wzGDfmNyROK1xGZ5yLusNMZXxIWkOX4jz9LKBOQ9AY8rci5Kvx81wR3WTm3xmEoYb9v6X33DjjK/pXxyN1TcKEYLk8EjtJeBjZxBLoiZw3rq+xhk97KfHsySGlL9rLsa2k7obyio5Y9mTKImgl0XqadhClPNuvIGslvJs8rY5cyPtBo6Utkbjchwus5L0UfaJ6jJt4LrynrJThdgc9m887Gvdfk6z+h89mlYSOwtN8JEugp5O8F7I8g7uDrkN2Y/IDMU+TH0k9T1mEQDY5lE9VnQjI2gbHAR+qvBS/qUlHGI/PZD5E1eSeRTadhjeXslHYX6X0kNM/ENRmLL3SkEjzdI862poznG3uuOHRLfjd5D5Om2+ViGr42zavI3v/O3jBpSzbak3yTNzL5SOEZpT2h6TIeltkO10vcyRWRTNKC6xaxL2EOW8DpYLx73mCw7cDViXJIou+qz1xrwWTiCMpOp/ZCr4cxZkd9VoG+qjNjScK6CU236zCBXRx15C7DQ047HRVe5C6wEx2yzMvcJwKzj+BAV+RFBMe302nTzkLmcoaxmnTfLk/XOBwFYu6iX1kfKdsWgtsSPVIbxmzOX/aN0EWpJ3QWRwAqgHGZ93qhJ9toYwPr7Qk/8oezQPghU49t4p6pOxL6KO3J+ki/0obgkODPOCYpa3YGvi0eZA9DN3sEPVFt9lo18E3orJw5szlPhceSs3Ul/ZaCBgpuyZomtJswz2oZ42Lu4f7w6xzZ/+kNTNsXmYtdjwWQcHZrzxd+37SXMXlBU8Yn9MGEPQ951SR+FFoo7Q6bTbQhPYZCVBYYyDhHQQ8Haxx8wtqLjFXyTd6lKvr3VBrHRjJWoRkyV5Numnemp9gTCQ7Kev0GZxPaS8nvo7mLCWzkbzk/7TZYrFcdZPzf4SUkT+qG+6M7I/89e032rayH/d2Upusmr2nqEqVtk2dyAN4nwbddwNO0LemPEEDQXWBg02eIydtLmzdYP9HvtuBj6mKkXZMPlnuWwEHolfQlNFfw/hgbQmiZjGee1gGZ6yXju8zv1cEpHl2q7ppu3eP8HwRxERoq8PRlMWX9RJZRRa9BPujkdc1TSTvjWZNzFDL5c+lPcET6madpkPAt0r70L/TM3CPmfV3mK7iB43r7/eA55/ZV4CRyMuFBzDUROjaHCfZkXMvI6EanBSkreq9jfJZwzpjrbtd96PohlBUY4ojfvmekL8Ef+Za9Ie1/0GPcCT2szAazMq8K8Adlue/j+Ne+LiaPKHMVHJO2ZN0srGch9v5+DaOM7OX9yN4Snt0/wM0raZHZa9gIvZJ+MzGf6gnukeaZnZ1ORoFYz8FL4XFk7kJ/pE5l6IV5PnVjIVyxAStBwwTMUjhAsMufBDf6wOMLzyx1ZG/ZcV33cRTe2KTzoxlrNj32xzwNlO9UzL2ovtO4aXpr3pNNHZ6sdQqIsCmLtetEKYTDTHv/d9CNjARfFgNL01bRvCubOomEco2j2l7tGoPuQTQ62RcCq+S6/5MaTluw05AoYiI/FNmhuReknXvgZiXW8A9nShpkVXt0nazki17Ufr6BKyf5mPZtj4AnwTrsY+rLxMoB09SsSyL4vZPgmpf+Te5Sst4B/C2484P1KQuvN4Xzw9z7AZxRUUy2MxlCF2T8iTRsDzCuupp3KLzSQZ2CtgkuyXqYMjTpR3SEgrezGYfYWAjuJZR1mPZoMvYGen6Xwb9WOv0d/BvPeTScvfFb593n8Kig4Sg8i+zDR9qGJCGt/IEcpSJ3vW/UbU//FcBb5+oOKhYZUzbMixPqVk0bvj5cRE9zvmZlcUfKpoDQ/ganTBq7jfYIfqHu8aknMhoAI/MVGlNPw0b4FlkbgaPA7C6w2Qd/IDCXv2X/C88zTmw20X1cZl+cY43l7iwwy8r8TdyWscncBG6T6UsCjcpd4bKW6+VmX5SFfgeCZz/Q/wh/KOsq56ucp4IXAp9nYu+ArVYLPu7YVJhzv809fQpt/JiJTEqvuy9nr+C2zCkQ3JE2pC2xETB1c9JmCDCVe7vM6Q8VPBn3d/aanE2yxz/p9TrBHd7ECfs5oX+3AJB8THSBhtsU+jX1GwKH9sy3jcYxOS9kPKauX/o0z2/BH7v+Uuis3pMfNS8n4+6k209Iq+1yA32utwd+0WxQuSfKeGV+0pfcjQUvZR1lvi2wE/rIOj3jbDmg5bdd2B+TmbPAW8rKPhb9zUHk64Iz0n5nfhSZVkL5k+CnKbM37XTMcTVhf9/Xay4wlzLXIe7C/8rczfuQzNPUOxQE6JHwwSITxyGCms/CmLysKTeW9g9y3tfQvH8VzoOt7ANpz7xrmvaMcr4JTBtp+DfTsDHthV8DPPOuY9I/c/xXdFm5o0sbh4kKfVB4HeiPBdiZ+mO5Xwse1MJ2yTxzZU5l+WMiuh7hhaSceT4InMazGEJ/hc/rDyJ90fy7/L2KPbYtgS2FzGNvAhtzU/Ypa1kU+nVIj9O8v5hyOLOs4IHgz0uRf+l7puCu7N3c+nwfAkBMOZ3Ux9GznZ6avHF5Fj6U+smAdWpdx7Sl/QLxcoCxER5Y6q/S47nJWtaASJg8ksBVZHMCiyC9HtP53eQbJX81sC2TxEF95u5m6mbXa3mK2AtKu6HgpMw1oW4mod484fm1D3oiZQWuMhcZ3zb2SBg83KUEcBNYdoQX30qkiCcaFz2A7WDgInRDYDGVAVWB/oyivinfkvFl4qwydWVj9LqZ8k/B29nAzPxbxpnQniOLhqWp6zR504TyhRjOvIbQ64t0aspN5jFoOTME/ibNl7ZT6vaysYcSI5+fyZ2jD7gVynk/H526Kc+qxbwywrzImstdOwl//8LtqckLCJzMccgYzPuHjMnUFw2DHpryC/lN7B8Fblmgd1k03+PLPXY4dCWVHpeMWfaSa2FeoumzLz+2CWJ/YLepdHNQWSDgR5BhSDnxfurMGkn/wvO6wK8LDZI+ZV1kXU25y2/omglnGWcgfJB5RsscTJ5I9sJbdDQR4GdCGwwpcwjG7ojGC7azfa1MfZ2MT2ip0GzpW77TA7NLAO2BxutnnEG32Fw7gXeMziNInx3XTV2GeSeQ+uYdfx9jiUbvK2cywTj+OzdlrBWgUY30mGTusj4bad8Z79TZE8kzc/Ai3gFYGOka4GB+0vLCpiD3p+Kk7S9qsDWspMuU4wF+VV2mKxl1dboNntKb6jLdvnM31OnytNNWt1OGvnrq/DaMta+uu4cyAaRFdOJOepIun4p25unyBD5Vi3T5KDKCdDoP/2zU6VA+O3W6O3M8qOuWps1gnT+S8Z/R7fclP1Sn3zP++7r8DcZp1Wl/xhCp08lpIFq3k5r23+j8xeLtW6cDKB+n09voK163/0Z4h8RG3WK0705ayhQhw5O0fTzUzaDz29NmZp1+STvZdd1BpPPrtDdjLq7LdGUuvrodHM6pqjofR/qqpi5fl/Yb6vwcsl46XUjWS6fjZb10+cHgXledTkm/fXX7hSk/XJcPIT1ap8tSd7wus570LNKypl/pK0iXOUf+Wl3mMnDYqfNPMN+9Ol1R1k6nj1I3WKcHM4YTejyrKEM8VXt+Y8pc0ekO5IfqdEfwPkyXr0Vf93U+wZKUVecHMf5onZ+Hf2J0fhdZU51/hrpxOr1Q1tSECVFScOttz6/yk/UlLfl3GY+7zm9IO546vYO+vHXagbppdFoe32XQdRGPq+w6vVXWmrTAqitpX51eRJtVdd10wLOmzn/N/m2q6w5m7m11+h7lu+ry5RlDT52OJN1Xp/2Zo79OP4E3CtB1t9H+aN1+IdqZpsu4UneWTpeSfarTlWlnkU6PYQzLdDsfGP9a3U4w6Z06vy/pgzodQvsndN1RtHlGp38Dzws63Z/2r+h0atKhOl2W8mE6TVA5bJiNvo5xB400YcJcYnS6NXeIDzr9RNZUl/9Km4mTGO3kpk1nnQ6jrjtpKT9E1lHn5+CfNDq/IO1kJi3t4Bhd5ddlOiMfK6zzp7NG5XR5f9JVdToD7dfVZWqDSy11fnba7GimhX7qNp1k7XS6haydTntQPkCXry1rp9v8TvlpukwdWTudbkT5eboMTtxVkK5bkvyNOn1YomDo8nGU2avz59FvsM4fRZkTOp2a9BmdniN237r8Y/oN1fkNqBum0ysYZwRpoRUngFW0Ln8TmdMbnc4idFWXfyHrpfPX0Je53w9RRjnp84J0Yp3eQ3ln0nbaSNqbtLGODiqDLrOfMWTWZbLKvtNlYkkX1/lxpCuZdWXf6XQEDTTU6WLgVUuddpa103WHQEv76vwFzD1A95ueMsN1Pm5z1Xid/kGZabpMSfBhls5vwbwW6fzclFmm07VpJ0iXqcc+2qjzCbiltur8eOru1fnPqHtQp/3gpYJ1mZfkn9H5BDNSF3T+WoGzzt8me02nT9JXhE6/Jv++Tq8n36rTQ0lH6vRgobc6XZkxx+j2JeDBB53eCmzjNdwWArfEzkb+A9pxJy11rzMeT51uKWuqy4TJmur8uXKG6nRj+s2u0/3Iz63TNYFtfl03BXMvrvMRFStfnX+A/Eo6vz3rW1XnT6Dfujo9n/ab6jKlKd9Sp6dRpq0uEyx0WOcT0FH1JG2n27JndfoB7YzXZa4KL6Tr1mdes3R+NdqZp9NJKLNI1/WgzFqdHwoPvVHXjabMTp0+L2erLpNL+CJd14V+L+j8a3yu6PKNKBOm08upe1+XqSJnqM5PRr/R5nxpJ0anW5H/RqeHk/9Bp+cw3zhd14WMXzqdhPzELkY6o/BIpO17k3xP0jLOm6Qz6DKewhfpdE3Zszr9WNZR1/WRc9OsK+emzt/K2Grq9BDK19XpH8Ij6XRdzq+mus16lG+r889TpqNOXyC/q05L1JeeOr2B/L46PYm0v07XQf4UoNtsJ/RZj20HZabpMh8ZzyydPiv0WZcJpt8gnS/Ecq1u5ylltuoyk2jzIGmhpcXhsS/oMjNk/+q6wzl3wnR+Fure1+mB5Efq9E85K3X6BHD4oNOJ4FvidTuOlPml+40WGutqlFnP+D1J293nyFmp0+uATxqd7iM8jy5/EpqfnbS004vyhXWZ5MLf6vRg2vTV6W7kl9Pp63wq6XZKUKamznegnbo6XZRxNtTtNxf+Vqfj5TzVZS7KearTl5mLvy4zVvhbnV8fWjFe95VMzlOdnw150yydHyr8j84vKPRZpzvJnUWXGcT4N+p8L8azVfe1hDYP6nwCw/639zeTH6zzA0SeqNu5I/RZ193JmMN0OoB1tOoyj2g/WqcHUveNTq8mP4604Ekf0ondjLrThK6Slr42Mn5vna7JGNLo9Fu5p+j0MaGxOn2TdrKTlvZfiV81nS4sd0mdnkq6HGnpt6eska5bh74a6vQmoaU6XZ7xtNTpg8LT6naOUqarzi9Jmz31+P/K/HWZFODqaF3muNxNdH5m2Ws6P5Dxz9LpKpyD88xx0v4ynW8Tvkjn75E7tE73Fb5IlxlDeq9Op+THg7pMXXDmhE7PEhprwhP6fEXnTxZeSOePkPNUp6fK3tRlBtJ+pM4nqL2K1vn5hcbq/ANyZ9Hpi8AqTpfxlH2q01Mok9hd3yv5x5m05K+TPavzW1PGW6dvUDeNLpM3G7DT+V3pN7tOF2NeuXXal/z8Oj2INgvrdEPBAd2OG+tSTuf7AJ9KOp+gqURJNdKBQod1mSjaaarTJ4FJS7Md4a90ugzt9NTpzrJ/dboddYfruvWZ12idzir4QNouZ2A8s3R+M8rP0+m5zGWRTn8mvUynB1A3SNcdJ7RX93WLunt1mTVyzur0B/4J1mU2ivxB161LfqjO30x+hM6/Kmut6y6Q/Uva7iWUfPOO00X4YV3GkXS8Ts+i3186HcZ4lIe+w8q663R/6IMzaen3Eu176vReWWudXiQRkHW6Iv3m1nU9aTO/Tr9nUIV1mYcif9DprsIv6TLV+Keqzm9GO3V1/gmhyTr/MGNrqfM7Cr+k83vTTledH4Juu6fOfy13J50mIKUartM7wfnxOl1L9riui2m7mqXz7wh91vk5SJt8aVpwYJnOjxFarcu/BVYbdbqCyCt0mRuy33V6itBtnb4mPJUun5aMMzr9QngqnSa4nQrT6VMil9B1s4ncSafXCs+s0zbyo3X6/9g6F7irpq2N7+6pV6ULSQghXUhCiNNLCHWEUIRK7rcQkhDihFCE3EMIRci1EEJURFEUopCEkE++03G+5z/nM9qL31e/td9njz3mfYwxxxxzrrVqMy87bRXF5VabPgd5ML5J/GuNN0T3hZGrtszR9XLa7cTfQDitAdF34ynYeeMjVM/m5h+Mr2V8ETpunsvRceMWrJXMc63y6Wz6hfrosp6uOdr0jtLZ7qY3UP/3Mv1s4lHGLzJfm+dz1WegcT3xn2megeIfZHwZayvjb8U/xPx/ij7c9A/1McL0SuJU0S7hsO0T8KtFR+9uYD3ltDcxX5t+O7Ep07/Xx3Tnc6j6YaZwWr+wVjLPvdh24+nYdvO/ihyaPpv1kfEC0VcYXyE5XBVtx382Pk78sf56SPzrzK8XectJyTw9Ra8tDH07/Grj85AB421ZQ5n/dcbd+HDxtzTPq/LTWgnTLr2QrdTRuJ74u5ifJ6x1M/6OOd1p+zCnR1nqw95OuzNrItNbsiZy2o6iDzL9FPXzYGO92L80xDyDseHGDdB381zPnG68DP/ZZY1ijWz+yeyPOP7TlvE1/4uq80Tju1TnScYr0A2nvRh7blySHM4wz8HEqYyPV1/NMs90LW7nGevF5qVFxm8x7uY/Tevc5aZPU9pVxvX14xrjE1X/dcbzmU/drufw3xpk+mzGV5g82+DLGT8q3Nj4GvYRLecniN7U9IWMu/M5Al9OmPw3UbntjWvhe5t/uHAX44PVV12Nb0Te1seCJA+mj2KdZbwB9t9lNWG9bPq7rLOMh8me9zPPH6KfanoVjdeZxjX1Mcg8rxJLcT07sXY2/W7WzuZfIfpo038T/zjjdqrDePPw3OMJpi8mVuk8X1e5L5hnqfRxunnuUZ4zhbEJT6qsBeZ5UPRFpn9ArMP5XKixXuO0y9BZ88/hnomNMr2XcG1h+G9gDSWc9l+IN5rnWmJW5tmVOIbp9Vj/mv9frJuM66j+nY03Y+yM9VL1Ulen/ZGYhvPsy0soTf+38uln/mXYXNOrqA5nGl+s8RpsPFj5DzP/ldhe47tEH2FcoT4caf4L0FPjA1TPcebZmr0D45eU/3jzzFWfTDS9N2e9TK+B32X609hn40nin258mXhmGLdj7NzeU/DDTR9FTFKYsbsUm2z6hYyjy1oj/tWmb6e2rDH9UvTUeBZ+V0PP6fjbwunRk/jbpl+nshoLU1Yj5lnztFHatuZ5k3nWeEvWxcbni6eTsV5mXOrstOPQR9N7oIPGH4m/u3EbfGzjI/CxjcfhYzuf68Tfz/TTCvF5bcOWBopOvy1T/QcZNySmYfw2NtlpK9U/o5xnA+Uz1vQnWWcZDxf9buOvRB9v/APzstNux5rL9PewyaZvqY8XjG9mfM1zEvtExi8pn1nmGc+8bHo1xtp1PkG2d6l5XlHaiCVWMheb/ynxrzLPpuwNmX48frjxb8LrjBuj141y/sPYnxYm7R7Muab/zt6B6R8QnxQmbVOlbWv60bIbHY27MdbGE9QnXc1/NPt9pl/NPRLGa6QjvY1HM6bmP5D4lfHF7A0Zf66PM1231orDDzF9OXoddVOdhzvP74lXm/4lPpXpK1lDma7jvaVxpuvFrqXxxmfhU7msLUWfanpn9hSc9hD2FIx/IO5h/pWsc8w/ivOpxhX4z+bvpY/lpm/D2Dnt3cSZhdG7Ydjbxl4LsyYShqeSeKPpP+ALCSd/jDWR8bn6aGuejfGBnbYFfq/pc9kvMG6itD2ddlf8IuMpxDqMd2ceNO5AvNH4Lo3FQOdzlupzpumHMQ+a3oV50HhX9hSMF4o+0nX7mv1007fTsxnuNu6hPCc4z73UhxONOxJDdtob2PcxfQ5jZFyTMTIeh94ZVxE94tX/lBzOclm3EbMy7kds2fwDCnvBb7AmMl2h09JS87+LHTa+Wni18Z0qa635TyC2bPrv7Os1cT7y2WobVyhthTA8P6Orxt3ZRzDPpur/FsYvYZ/N04E51/gBxt34DOZZ8zcv2P+tWBebvoR1sTD9+TR22PR/Ig/GOyAPxnVZB5n/eJ6P4bKGEOswfS/Fr4aZfgFrHOPmwqOMr0Qfnef+2F7j85lnjfdUnccbzyXe5bQfYXtNP4W9JON6KneqeeYzR5i+G3tJxu2IfRkfgh12nQ9iTWT6tYV9/4nsJZm+ufAS42r4zMbbq+3LXW4n8awy/W7iYOvHTvbZ+CP2DV3ufsjDxpl+Nfu8xsOEK4xfYo421oOTS42FKeslZMP0tdht068TbmV8rNrYXpiyeuIzm/8ibIJ5zlQ9u5n+FTJn+rXKp5fxYPH0NU8f5dnP9IXIgPEg1krmqZRMDjb9YtV/mOnP44MZL1YbRxi3VOx6pPlL7OObfo4+xpp+O/Eu4fSuYmTAPEcRAzHeghiI8WP4XcZPsi52Pm1Vt5nuk5PRfeNq4l9i/hOJfRmvJO5hvBFxD+fzjPBq4x2w4cZTeDnIJt7HZ79eGPo61j7Caf0onqbm2YM9QdM/ZH4yf1fVs73xLPxn86xgHI13Uf5dnM9uxLFNX8W6xmkfI45h+u6Mo/H2yqef8aX6GGj+QZyxMe7Gmtc8F2qsh5jeS/Thpj8gf2CE6bXQceMNiHGZZzfilsZPsP51nfWyudJE06uwxnHazdg/Ms8O6K959GDq0kzzbMEZG9OPJyZp3JZYhHFD4hvm/4gzVKbvwV6hcSP2Co33ZV52ubzraK3TbsSeflP3FTpr/ATztTAyeaDoTU1vznwtTD5biNBKOO3Poo+m9+EMuen1RO9q+q1K29P01the56lbPUp9Tf+EmKTpjViTGuvoaelM88zmjLvxEvaPzNOO/SOXpSPopVHGO2KHzfMNe3zGN3JWym2sSWzZ9BHYSeOpzMXGs5mLjY8j9ug6fKN2zTI+G70zbseca/7fJWNLTL+I9Y7pM8WzwpihWGWeu/F7Ta/NnGu8DL/X+Cv83k1zG39grhUm7U7YUuMfiDkYL2BPQTidldJ9661M/0b09qZfrXVER9MPZp41/WLOZrisXmpLd/McK55e5vlVZfU2/WnWs6ZfwvrC88hQ4YHm6Ys+Os/BxJ1M74hPZbxYeKR5HiFmKMx4bSgfY4Lzv58zGOafK/9tivEhyv8F4wolmmE8hf1fx4XaFfZ3FnL2yXn+m7M0xkNYtxpvogwWOJ/nlf8S120W9sv0jQux5a+U/2qn3VZzwRrzfInv5LQnsW5tlumt2Is3fp79AuHkExIvEqbtvxB/EM7ncCSfjm+M5Iyz0/bBFzLPVcJdjffBT3aekznPZv7jxdPXPM9iP42/JRZhntMZL+NbOVPq+nxKzMH8l+ADO//G2EnTX0UHjUdjJ53PY8SCzH+F7O0U039mT9b8O3Mu0fShnKt0f55MPNA8HRk74zXs+5h/MmtP13M/9npc1lX4MOY/EV0zvp75zvxfMC6bZf7qxPCFUwxNezdNhZNvrzFtYdxAH62MHyaeYP7NJKsdjYcUzjCcoPMDncy/iHiReR7iDLDL/UxnBXsaz2N/1vyDub/B/C9gJ42vYc1iPAbf1fyfUrbxSHwV8xwmPMJ4AGtM4zryOUeZfzlnokyvyTgan8o4um7XsMYUpt+2IkbnOPmBjKP5PxHPdOe5lLEzvR9jZ/yD8pzjPP9Dv5i/PTplngnCy43vVz4rjJuiy8bHqW9XO+0HxA1Mn4b9NJ6LP9M8/HaNtXCKNeHbCFOHb4gHmqcue/HmOQvfxng+92uY5wTmQafdlz0a82yJ/TTPEo1pN+N/c7bN/JexN2f6APwW4z807mcaP6E8BzvP2zknbDwNX9T4E2I95n9F8ZaRzv8QzY9jTR/KWRHPIx8zJzptPeJCxm/S1+b/DL/U9BvxS42PYK40foexNq5QfaYbV1WfzHAd6ksX5pj+ltLOMz6eM6Uu69Xi2WDmTdPnsy9vfB7+jPGTxAaNPxD/OuPd8Wc2z/nchvz43HgP9Fr0FEskFmG8DXtz5l/NGQzj+sSBhdP5Mc5BGf/IushpX1e5XYx/w780Hk0swvkMUT69TF/F/Gd8GjEi84zjzIzxs9hbl3Uk86P5x+KjmqeeCCNMf5J5zfSP9THaab9S/9xtnqs5G2Oeq9FZYXT2FcbO9JnYW6d9g7PfpndFN53PKdhV83yO/2meh/A/jVeypjD/L8yDpq/jbIzpR6vwdcYbspbfwusF8dc2bsv99MKUtRljZHpPfFHTH1OerYTTG6ckY53MM4LzwMLp/CfzoOntlbab6ReypjA+m5i88dfEhcw/ibP6pk/Cxpp+vOzMINNnaQ99iHFPVWS48afCI40/Y3/E+DjRxxkvYi3gOMaVxAec//fimWCeKSJMMv6QdYTbPonnGZi+FF/U9IbolOmbEedxnocxXsadWOObf0k6R+4YFz6neVrhq5j+T3RqS5+RZh/KeIn6oUIYnp3ZTzF9XYqxel1JnMf0O+V/tjT9aelOW+OL2Jvwfuvr+Dnmb6X6dDJeQOzS/PPUP12Nd9T9192Nj2eNbzyVtaHTNmVMjT9WuQPNcyrnCU3fkv1u4w04OypM/+zC+sL8R+HnGFdjXW/+eaKPNf941hfGnZV2kvmXUyfjr1lTOO0NnF0xvb34Zxm/LbmaZ7yE+2jM3xfbaHptYrDGT6jfVplnJGt512Ga0q4zvTtzX4tM31tzfYVwWndoXBobf6p5qrnxJOlRS+MW7JsIp/MPnCc0rs6eqfPcWvQupu/OGtD0u5Q27qkZKdzTPP9gvJz/KcyD5l+HPTTPAuyh6b+rLUNMn0TM3PgP9M75DFD/jDTWqwtLo40/Vn3GGb/MfOe0q4nNGu/PuSPzvMd+qPdbHxWOuMFl+phinnXsWRtXZX/E+WxPXM74DXTT9Ydxgfn/QfzNPFsSfzPej3Wi8U3EY82/G2e5jf8QXmv8AAvIrTL/ZPTUuCG+jfHjnEt3/z+OnyM6NnN3bKkw+cyQT9vS+BNi78LUeThnfU2vxZkE4zeJszn//pxBMv6Ouc+4K887MX8n9NH0XVlrGL+ucgeapxX7nsbnooPGZ7DeN/+vnOU2HsQaJPJBtszfA3vr+v+Bv2p6e8ba/K8q7UTjHVW3ScafSn6mmP9Pxtd4DffOmOcLzgCb3k++1hyXdQbxGdO7FeKlz4m+1Dwno6fOpw4xdvOfyvki06fjr0bdZBNKW3uuIT5j/C3nTITT2Uhsr/F9zJXGn6ktzc1/OmtJ4WQTVLf25mmqj47mWUUsznRezdbF9F+YN43PQ3/NsxH6a3p32Y2+xuNY77usi2VDBpneF/112mbor/Fe7HmZZ4bs3kjjYzg3aJ73tMYfa/p/8V1Nn8/+tenncs7E9DeS/fL8K7mdalyVcq0LxypmNd30mzlfZHwS9zC6/muYp01fyRzq/Beip8bdWUfbPuyEzjrtoeqrNeYZxdxq3IfzhMat0d9trJvc6yucfEti5qavUh82MP1WzpaYvgh/1fg55lnjL9lPEU7nDRhr039TP3R0Phuz12m8J2tP4wM5P2Z8M+tup72B2J1xM330NU8LYnemf8eZYdNrF+6lOqEQs/1AdRhknhPYUzOej60xPg0bbtyVfS7n35U1qfH9rEmN53G20Px3EXcSTm/Rk0841TxnEDMx3pw1qfuHN7POctoTpcvzTP8Nm+y1wyPEfEx/nbWn85nN/apRH3TZ+Zyj8Vpr/CDnRVv6DDz3Txn3xY8yPpr9MuF0LwnnFox/EW4unO515Z5i8zfVj23Nc5L6qqOxHkFS6mw8rHAe4C7G1/QN9NHd+A72xZznB5wfM30HzgAb1yHOYJ5f2F8x/SjWpKZ/jl4bb6C2DzPPtuyJmP4pMT23pXEhLrQP9TTPO5wdctpN2Ms2/pM1vvu5LesX51Odec1pDyfuZ/pBqsNMp92GuJDx+/jGxl2VzxLz78U9qqZvr4/VxvOZZ9f3lT63dfyQe2qEU3yAs2Gmd2Fvy7gq5xDMM4BxFE5nitjPMv1g2cz2xo9ordHJeHPiQs7nGMbO9H2ZZ01/QuPe0/QjOVti3E8/9jN+jXnF+EPuZ3TaLdgHMd6LsTN+RvkMcz03ZP3itJdzb5R5tia+ZzyTezGMv8QmG+uxAaXxTqukpYnG7xNDMM8jjJ3x7syz5pnMPGv6FOIMvkdjhnRzpus2lXMm5tlD9VzgtE9ojlhi3JE1jrGSllYZb4tNdtpe6K/30B8TXmv6O9hn4/ro73aeL/CvjJ/CvzIeIBzn81uzbhU9jTWxXOPh+NLCaY+es75Ou1If7U2/j30x08er/p1Nv5NzR6YvYi52ni2ILZhnAc/ZM/6YM73GfQu6Vg1f2vQByIDz3Fx2cojxfsyPxtcTczB+BF02riH+kcYf4vd67XY7sQjTa4tntPET7I8bd2XvwH01Hfkx/XT2yo0ncm7QeC4+m/GWmpsmuv7Xs3dj+kbIknFN7rs0z0/EoEy/Qzwzjfci9mh8IPEN89dlnRX307GHbp4q7Jsbt2YuMP8dyJhxJXvl5vma9Zfp/SV8az1evbH/23uPGPkxPqcwl82XP1whejrLig0RTnF74pDmX6iPlqZfwTlS8+/LuTXzXM0+jvFs4pDm2Ymz4qavY4/V+En8OuNzuc/UcYDRyJjL+gz7Evlwb4jxGPbKnXYqfrv52+OrWH9Pxm83z/ecD/S9xq8VzpKdw5lV+wn3IG/m35Mzb8ZNua/E+DDWd67D4azvXO5s+ZATjPXYzNIU87TDzhg/yLrbuLPKmuU8X8H3M/4Pdsa4S+H880aqwwLTP2a/z3g1e+7Gx7Dnbtyc+Jjx3viHLncoZx1N/4L4mOnX4f+b3hP/sJXPk+ijunDaS2UdJ5ziY5zt8Z7+x+zFmz6EvT+nvZyzVcY/sb5zPidxxsb8erVfqYvp3bjvz/z/5ZkkpjfTRy/jGdgX48XsGRm/x7OFIr7HHq7pA3n2sstqI1sdceYD2JtwWTXwuxyr78N5G6f9mfPG5unC+s703uzFm/4NZypMf4Lz56ZfINs70fQm9JXprxFPM/0j7JHxPGQyeCRjs0y/kH150zfl3iLTz8XOOFZ2H36F6PifzVnrRbvwD82/HXON6ZO4l8T81+FL7GCfihi1cDorwpgaX4+fb56NOTtn/D3ja3wW8WrzNyzo5lOccTXPftgK49bYCuOvWOM77W+cezQ+jn184XQGlXNTxiV8fvOcwz25zqczcX7v2d3DXGP6x9w7ZjyIc61Ou5a1vOkb4iuafoDszGjjV/APXe4t3OPgvYwZ6pMJTttd+3QTzX+08p9i/nd535jpw1jrGW9duNfyV3Tf9DaMr/EqYjXOvzpredNflM+2wngp8RmXVUHMzfzdeBt+a8e45LPVNn6L+wiEU7ncE2rclr0n8zxa8JH2Fm5hnkHYf/N05flCxgtUz47muQdfwliv5yp1Ns8F3K9t+sHouPHPnFEXpv798SfNf6f0tJ/xJ5yPMq6qj0HGLdVvQ5x2O/GPcJ7VebeHeXZWzGS08anEe82zD36j8UWs5c1TyVka08/hLI3py+kT0//BOQ3jnziLbnwhPqTxW8TijG/nXkWv/afp/pFZznNj9No8d7DH4bYsUH2WmqcD6z7zHCIZW2W6XiFVWmNcoY91xntiq9tYtpVPhXFvxlo4nX3ijI1xL9byxiWV1cK4ueaalsZdpAutnM9p7Dkav13oz4uI15n+HjEc446cV3c+hzLvG6+U/PQ0TwvW6aav4ayscRvOyAmneA4xc9PPZE1hvAXzvvPpKsIw46/ZazbPROye/YqxrPHNM5/7FJx/R/xA81dio+wPzCJma/pd+ITGY4nZOp+rhKcYv8belnn6sd43vRm23fR/s89lPIt7+Y2P0/jOM//PsoeLjF9mTjfPUGLvpl/MvqTxu/SdcSPuQzH/zpzbaZvpw1n7Cyc/UP1fYfoSPVu2sfF/xdPcPDtpj6OF6buyT+SzHxXydVuZfgR+oDB9+CJrB9P7sXZwPk9xPsGx5RWsI8x/M3EA86zlPI/TPkyc1vTaxHmM5xOfNz6dM+3m74EMOM/buI9MmHltmp4XNNo8v+PrOu2bjLVxXdb75mmodk00foV4rPG/iOGY/0L2mo3bSC9mmOdx5jL7Qgs5E+v63Cv+BebfA5/NuJb0a4nxj/gexlNU7nLneSvzuOnLsPNRN9mQtcbvo7ftvJZX/rWFU5xHHVBh+jvovulN2Ys3/hTdN74K3TceU3imzb2cPTC9mvJs5TwrWD8aXyh6J+NreQei72n9gnNBTlsL+2/8PDF842Ox/057I/Jg+iXcR2x8SmHtfIB4+pq+FTEHpz2gcO9Ddcn2qaZfih9i/h686930DXiegOmbi2e4MWHvEebpzL0PwozjUJ5/Zfrh6IL591CCCaZfybl6YWRvO/a1Te+ptDONz0bfnfYYnmlm+iaqz6KgM+8bzyf2a/wnsmH+k5AN07tIbleb3lAfa4170JgdvW4ihi+cnt1H3F443QNO3N74IOTBeFP8E+OneMag8Tb4e8b9uX/ceBjn+oxPZG/OZXXjbK3rsH/B336PecH8L3Ifk/GBrAeNH+M+JmMCOnHf62jmC9NHEAM3PpX5wmU9T/zQ9Dk8n9D0DdhTM30JPqHxInxC85wl+RlhvEyDOcq4D/utxtW4v8lpb+FZPcZjCzpbRx8TzH8i++nGXThfbf7DsC3Gt2FbjH/knIDvc6nJfamm98KHdD6nc27Q9BmcBXWf76VxX2KepZy7Ns9u2ndYYfpszTWrjaezR2Ce04lBGW/PPOs+P5KA2k7e9yQeZbw351uEyed/OE9orFe/lZoaX4EPaf7uuvGjpekvID+m98evMH0g86/pr7A3ZPwD8UnjXYhPmr8K96KafihnnEwfipyYPot9XtN/JE5lXIt1ovGtxJbNfz17BKbfgtw6xjKCeIJ53idWYFyPWIFxLaUd5bT/K50da/x04fzqYuYg8+/J3r1wihuwZ+37EA/C/3Tas8Q/1fyPIDPGy7h31Twv4XOa3oQ5yHkuZg4yva9s4CLzLxXPUuPTiA+Y/1juUzb9Ot4n6OfMdCg863ILfE7z/El8qb3vK0QehJPusNYw/T1iSqYPUJ2bG49lf1AYm/krMQHT53GezWlfZh4xXsKzmM2j6V3PdfK5C2LU9tlGsD9oeiPOexv/wnNmnE8z7o8z7l94ltdN3Evu5yOtYC/JPEPUb4OcT1fshunPoi8+51CDGGbwc67Y/McVnv/ZWro50vTnOcth/v/lvLHpJyj/u01fi39i+tnsQQgzRt8SQzCeShzAeDDPUXTaTiprntOuxp80/g/+hnk6EEs0/XHhVc7nzoIdPkj5rDXPh8SFdo7na8kOGG+t+GFt4XQWmudkmn5UIX44Bxkwz/7sTQhTVk3ukTT/IdqbaGueReiC6ZdxJsf4S+Zm83yGHXA+c9F90w/XePU2Pop7z43nFOzbMTyjwPSjiSE4/0X6GOw8Z+JPGk/RR9wb+47yHOW09bi/xriKbPXdzuc/6LXxcGIFxg8Xnjf7GucBTJ9JXMb51OdZmsafMy+Y5wh0yvft/kQs0XV7kPs4zHMtZ8iNl7BP4XxOJkZk/pasK83zPmt2xw3OY8/C/Btwv5V5HuRcq3F1zmiZZwwy0MHxdp5FI5zWI8SRjM/FxzDPPxh34XQ+kzPM5jmKNYJ5nmNv0fQ/uO/e8+BTrC+cthZny42noe/mv5f1o/Ppp/r0M/0Axtr4v4V9vR04U2d6c864Ou0OrOXjnl/2p1zWRexPmb8q5x6NS+wpOO0D2HbjZpKH8cbHqKwJ5n+bsTa+HH8g6oxtN27D/VbRLnxI42OZ982zIzEE4yOJIbieH6qeS81/D/Ei47E8u8/8/+TZI+bvzH7TLo6DMb8bV3I20vhU7ncWTnqntjQ2HsR5D+PvWC+YfykhZNMfYn4Xxs4/jE9oPAk7Y/5/4VfHXo8+ejkthL7Gu/DcSPskr7E2dNofsefGb3OG2fzV9DHY+CLOLZtnPntMxvvIvo0wTy/2kkzfiXMgxnqMemmseeoSOzJ9GHtGxhPQceM3iQ8I07dzeJer1+YPsbdonv/BB3KeX0pWZxh/xdktp53JfVjm/5RzPqbvjT/mPeg63Gtg+gKe6+v7QfpyLt15/s69BuY5o/Aspg/QX+OrePZIx3jOs8ZXOO3Psp9ifBVrBOOfiN0Ik/9NPDfM9KOI85venbWAcNqHUn26mP4b+0Hm/4S523jngo/xI2e6TL+TtYDxkfh1xo2lX32N69Auy8ZBrAVcVlviBubZnziS8Tjsm+1wM+5fMH9r5nfz7MOcbtxOPw53W65gbWj8IfFh4604B+J8FnKO3WknEyMyz848R848n7I/aJ6+PEfO9G/Ra9Orc4+DcR/14SLz9OYeauN3eaaBeWprPbjK9Mm0MdrCPbOmd0Lfd/U4ou/GP+K/CafYDme9TN9Bz4trbNy/cM9pT+LG5u/NXG+eAzgLZPqOyIPxpsiDcRvuhfGebAXPkXPaJewbCqc5nbWAY3fj8fPNM5z1kXlW4dsbf8m6zzzPcXba+BaeayGMbF+D7pv+gmzFCNfnMmUwKujs9Zj+DrJifA3PvjY+unBO4LjCvZPtuUfMPLtw9sB5NsSHN16sirxgnhnca296dXx442bsFxuvFP8c8z/Bs/X8fN39ZNsXmL6G+d39sA3+vOkf4/8ZP8t5P+d5CXFC49mSq9JuPgPGs8WE03PtuBdJOJ114Z2f5vkA3Tduyhkh89hc423ovUJz9PqCZSW9DiI9iKeGgtbVShv5CZq8UYVfLtXzOCa/Vap7f9U6esLx5qUrSg2S1W6IRusdCFVLW+vbUH1vlN5cQiq9qDKd3/hI8lc74Zp645BeE6Gym5Rqq8Uj9fagTUp6mVZ6rlwt0ZuWttPoJ9ksbaCcU1Q2/V6rtG1pz/T2H95MQUfsL1qFytm2dLtyrpW4NkzvxdlH3zUD610Vm4hCLevpf/5909Jmukj/SJ63iOuknRXFYsS1UX6DRKLTD41KdZWqirayquU5T6no80uEtFQvtU3cw0t6nQSvXdT7JiofmKKe0jPmO7P/JfYN0wt9NFyq5Mapok3T57ZMvSkJmWsqS4JP1/MClD3SbxRBRepnwVNushvpX0tRwI1SBSrHPaVCv6hGw/KQtVeq/K2KUK58WpAJbZ/oDdMv2yQuzWzpG+Xr5ZKq347KvalwBwlBPZ7QlEOx6S+dWSV1Mi8ryp2Vv1EbGRCXVSvlmI78iYvak+4gcVURZTP92kKoRt4QVffzF45ts0nKT91Nw9bY7TpKeTfJN+imnBunoaectOAVqq/21HQ9oNLTddWPOSdyBzVR6RuJbwtxx2DXSi/Kyb831kiRXxX9rSEBCZGgf7IopQNtCW2l/uyfNzxFbaZv9VLrqqhNjFAWmFx+8/SJXKQ3mSSuWhoJ+jyPG5wVqZ+baQwZpTqJvrF4Ni5VXvmsxnkHMquSZDtrFjpSV5Qq6f3zZMBnHf2vnEqCJ6tRSK5iDaWhe6unytGNZK9HkqT0mSc3r0qS//p5/aQuY0ArJJZV9faZTZQK/UCX6HR+y42spmpukfJtoxy2SoNQXVyUUKO0ub7X02cMIKmq6n9FEoTGeX52LZJvaJXYLL15t16O3ZhOK7Mg7q38KTtFtVI9yC23hvZG90d/5UHeUn+xIHR+NfcKeeS2Z8GjTFSVOmRR0TycZwpz0fcoVYP1IrJhfjKWOOhZlA9x3FR5ZHUmHbXacX2dsX25rllYq5Uqf3xB4/ZtlfaJJ5Q31zsLXnVxb6q2M2rUjF7kX3tRyR+O+rpyXzZ2+jqqa4XK06MsU93CBlZTuTX1S0P9hnXOudG3WShraFTo29pCtJbf6Ms8urmMUN8GFvkWqXbY1zAPOc/gwlxUSX2jd1QvfUnt5UlebmY26NWlMWgmg1SetlJAIjUcLgYpC2/mySY63RSexKKqNTZPJ1rSmj9/z8NNh6oS30xLnV4tDVS2XTWSINX0kOaG82tV6XnacHFu2daVVSc3l3xzJ4dwMNRZ5Kll7jzUAI3PAs50g6AyVHnocseifDkXZhL6pqbyr6qUKQAtWvWkWChGWBzsC4LK70z+WViofwP9Xvn5y2rv7PQuMQZzs2RE6KEslPVSHtSMYc/tyuOSBziGNStEbgGqzpDWdJ/V1t9qSYhidOpYLIrikMWNz2zWaognVDbbTOYixDKXgrrkXMJkkS+9Hd/5i1owy9LmPHMy1zB+9VPq+kk0N0y0rFq5zGwia6fxyeOeBRZZyD2D0QulzLNALjHXLstIWQ6yKxHKWx7JpknV89yFOmCEwoiRP6Ujpdk08Z1+zZLDv7rrzVlW0nKvMoZZfkPBmRXzb9DQijyrIX/8QlnIeZb9nKIo0cXRyiObTTe9mP+Rkyacp1+XTF20kaqUOwnljW6g2SFAZYVA/JtI2LK6lDuNGYYKZpufhbea8shikjsiW6DcBdAqn35DxY+pUsOOTM6TvBFFnDFo2abmcug6ZkpSx6BWtxLSVNQzl0Q35e5CsLIblHPOtrtB6grsYsxfdfPzdtL/ygUzVbMjQqKwUDHh5v4P+SvbuGy3cmdlKxUjkmUfjU92a8qbyvodnhlja0eBlJG7h7yzz4QEU27kw/eixaq+XgJJk6UqSxBdlG1ZcOb8m8iDjGmMbqJmIdNoMR2LMGQ9y6mR6siFwS9PQ1kK82fkl60tAxwSne0VgwWupimY39GgnA7Xh5R5kCs8LMWWRitjEsyWHI7cx+XZJgQwW/8t7a2SpolFObshlIooI26IBzY4zxR5VGln1v/cU+UpM5dOXmU9rrzmHY2oNnliZVNXw1o2idlfyh2djR6GKQtQ7oA8ADEJheqXm1ujVLmKIrTnmfWYuvtd+m5tljFGKGea1Thb/OjNLOpIV3ZBQq1QjhgLtWbRuyqKWynWG8oYbKxEtgJljc8eLBNBbhVZVt47W1kouhNWt9iPZfkrmo9GUjkSPco5LPsLZbUvo2hfVCnmqWxwQh6zGcguUQpumx+jQoOie5HtXBPkIq+SsIthFLJURuNzk3PP09jKa+aqxgu588gmrdjXUZdia1kXlGfQsmYznrmN0U66FqsTdOaVsA9YjWh5NoLlMnLv5SVDOG/p9qhUI+qWJShmwiwh4bTSOsQ0C17lyvfUPl5CY9Gq/BPCHbwqMbGFsQn1z0pNw1HqPChlvzRPZOl9OmnAYzqkErGwyz545o0hyo5MbgZNAGEKkbpcg3JTWSaHA5hjErGULYtI/scyjvzyPMHAkipzlDu1RnJw8oI0BIHakC64G683VmXDmjljavirLsUMlfshRCz3TXntkKcYysI+hF8PF84aKhz9FSWSunL8hxqhA7Malu1vLBfpBLo9pCwkPryFLF+hPRrwX8juOwWdqAyeZtF7iW6PWSssa67Yhn/xSP46B5ImD1I0mYblGaRsy/F6yoYx82SBK/rkRS3LxjfTsndXdl3CmdEt8n9ZAGWbBH8OEuXcwunIA4Y9yPkjyvjyoa3ZCmffE/+wPD8U1xF/xWH5cm/mMnJKOR7LP1KPT+aO97/42YxAHtVy6rzSiuVjeSYMHyTbvqhpoLApxV7Jeh+L6ZCcmPezrxveb9G2RI9W3rlQtf6oSkxdZStVVLpIhQCHach9W7afZYVlHVC2TJG6XMfMn81JrC6zq5nVonYKA1BSjEZoBT1ZVtnyujCXR/QrbHkusfJ/F6l1epBttgtkiaiUVau4Oo9gVnGCQySLTkoWWxSkuFDL1Gzm83Kmcs0nKvgZ+cdhM2JKjapnk57Ljk7OJWSLS365PBqWPfTysOeFQXnqyTatbKvC1QoBKk+eZbcvfiuKGL9VTlmsuj+kyTGnycOXuaLfspOY1Z/OD48ip8jllie93IcEGMrCkx3vqGcIf9jccq3DbOSxyYv4oumo/HyJasvZlvWdGQ2tXMdP98tfj4mwmHl5CMtFh02LVWHWknJYK9u67MNl/Q2NzIMQvn5ZW6PaIfflusSv4a2XO6bcDdiOLO95MNDr6Gi4ysKXOxFdL7t91Dr0vOx5l9cpMbWGHS1P80UPKMrOa9gW63sxxDdmgSy2MQsUe7ZotfIclFdlZata+fBSjZQOQYSuZcNY+QrkHaJHIt8cA8Jzjmk7t0kj/gsJPuHOiPXTcFm8ie+XFZxc8/iVlbIY64gZpGjBiwoT37JQhiNQ9nKL66sQ/rwmzLIQDlNZfsojFwqT1T1MRPQpM3TZvucxjYVIKFvZ/oZ/GCqV562ixxplxWiEhJXXy2E8NVILlmV1y51ftmbYPH762p0fyvTXUF0xFlq0E+Xq5v9lA1+cfmMSiMqXF44hGCFcxSV+liaouUNzF4Ua5PIyR3Rd2QsM2xdLs1jxFRW2+C0PdHG4WBeWl+pl5Sr/j37Czc91CMei6IVmhc9r09Tby79Rb1/5RnLpoxNi9bil3suut9mXWmmUDtQ1QUybK2i5u/D+utrpYtNRb7kvfSisN9KXzmQbl1sc2d4X7SBdYxSNPsr7Z7ySfhfRDtbVS9dHuvitiTa1SK+3/qfX8cdFfvuK51+6SL8zR+zYPjf+Wq/vf1yvbX9ak/0P2oKZrdfcRx6D0tZkfh39PezOK4/BHP1k1054Z128ap9X2E8TzzNKy6v6KWes3glPGYOV7x70jf7SB2NGpzcHpa0b6kX7yJe/u7hOrygvNj6n6y+7g+xUba+9zvH6Tt9RfrTtYn0fJ/qLqjv91db9eiJ7av5+gP9SxlW6Gms/4HPxb3CK0nOrDTvNHB3wRX+SlnqzL/e+eB/RRbtoK+1iS4HX/EOjD6G9wCsRjs20Yb0yTV2S+oy2scP1qPK9hOMOloHWutgx/VI/Pu7X6c/S9asufh+lfuzOMSCOebLFTH7Skwt10Tebq6OGXKljbGkrKedxOhvGbu9EfW8j2eCiDrSHPGqr7Wxea+hLD4tvKm1xGsYp9RvHXj0u9A91jX48me1gt+FBpa2qMT1EQj+AY2WMv2jtJcgbqP7QkBPa+Yz4DubYnb7Qb8jYv/SXsWbQq4zTdr/r8pl4u+rv9pb1p0Sv0J46MkKdSF9V7Trtdo0V8shtQaYzBjpJs34MZvD6Bg32ffrLdzW/1Ilb6sQT445uHWT9QoboczbI6X++01b0TtmX3lW/ogNBe0350j98p//4y/WI6Is9rt97bAdyy6HbRF8O1XWm6qGuSmNM/1Uo3amiscX/oxTyLX3/VYaCcbjA8hd5pDppIKHVEB+7ANQNGaYO6Dsy/qI6m3Hqr+sXXYwhF7/vaT2J9pAvY3+05Pln8d6lfJtYB85SWfRrpEcX6Sv6fyh9pnq+ca/KdH70F2NPn19SGCdkkUMOYau6Of3Ztjv0J3VBFjrYfqFLlP3oKMmS6vMNx68tl/Duy/FOjqyJjuyvs17xtzE6r06mHfAx5mOcr+4kS/m+yVEW7LF47tRFGdRxFbfGSOewP8jC970V41WjqSv2iP6jDuRDfrqTtnSaLp3YLJ3tvMfpdyVL/XChxjTkhXTI03u6vuPx0tyiqXp8IV2gTfBw3AI7iJ0P+Q17ga3Ann3kvkBfjrBtiXmGOiE71ONJHtvLXpvK2FcX8h58/NVTMvRKeZWhvyFHtJF5ib59Wmmwvdh66kHe1I28Oyjj4oUd3sm8yBfl1lZ6bTuWXpA+InscK9nT+egkccrnUM+LzEW7uY/qauyWicDm+KPK6GTxzpawh31/TdetMjYNPRdSJvWkb97QhR0/VoI4XIP2ksp/m/lM1zvCB40p2zP64QSO+MGji7GFTv0+EB/1Y9yZo7G7XDqhX2p0n3TT44+MY1/gvU/0Sci76sVFm/kdfXwVvZb9ouzJSvuAZRVbQT70d8zV2O2dxIds8lvoMr/fo3z6CbfjVizJ6ZW6Qi+oe9SHeZV6v6U8Juv6WtdKl9laeo1dRTfJX3d9pLyftR2mX/qrAOqPjUU2kTHsHemgpzlc3+dYDklH/0/Q9aQufIxpltnXdNG35MM8gKw8KxrjicxhJ9FT6s7FnEV+Md6kG6i6Pau2h5xhG9uIjszwO5i/2BqujW0PqEe0Gxs/XDyMKTJ+m/KjPPgpi3bTF5tpng3bSJt1B2lqUzfL0ePajLpf1yTJ2Bnqy2g/V+KnPcr7IV3Ur1Pf3GeMC/25i+Y2+j38sy3VGGwB8yXzI34JdQz/TKZ5va0JORgvfeiivA/XdaQ6BRtMX97Cq1YsB+gbtuJBt585Cf1FX2gzcwV85I2vFnk/Zv6lPHpThng2vgavdws77fkAXvJYJgXGVuGn8FtHKSO/0Z/wM9fG9RR+kMp5nlvEdSHr1JO5E5sL/yHcjoEcSMc34bZp0Ziz6ZeZ+k7etL2nrv0Kc/DPx+W8Lj8+1wObAC+yP0v9Mls8i2zvaRP6pdP46+d3bD9tJi3zWNKJgkyjq3vKliH7XTXI6A96Efb0VI5+ynFEHpATxj7mZvJkviFP7DNygJxsb1832kCdsWnYMOrJOIQeMX70A2P4HLYMfdIV8y8XY8RffG3+3iG+H2R3Rthe6fRmqgPzHdfDupBDxoE64V+hc9DCx0I/qVPyL/TbDnJW7tG8jOzg68Zvz9yQbTm+jU52r9ch7MRTPP7WdaLepA1fRU9RT7IXc9qiO5WX6k2e5I+sUnd0lrr35zEL4h/N48qGSQ/v0DyjiQT9ONrtvF/1gxfM3Byyzfgyd/O9OH/rNHDpJF2Pmw8dQd5iHkOf6S9kgDkcm0Zf0ZZKNRrfJeQ97CrrDvJ6SbQ/5PDQT9hk/jKfYsfewEZYB5CzsJd1NAcyhpFnB9kI5Adfhj6kn7io+0T7uuR7nNL9Q5e25Esbaw2KXcSnCltKfrOUpoEaFusFLtrJXE29GUPqHbJAeeE78B2diHqGnZiiPMO+tbE9TesHjRXjzG8HSqmaSHamWIYP1hoxfMTlyoM6dLd9vUNX+IsD1LiHVTcwNhG5iLmJ+YB2hz1FXqg7fYc8UYekZ/+PjaZ9YdOCho2nraFHv3BLkOU0ZIn8o19Iy/zKPJPmUskhv8dv4X8RWWAeWo299NqAemO/KCvs2WG6sL8xD5MPbWRdhW3QU6RKjeS0jFF+f8re0X/YotDFK2SfTnSfY6dCfqlbLw0sdaNs/G/qRxnUg7Ubuh1zfayxWWt2VbroZ/o4fFUu+gP7ST9TBjpDGV943sWO4buGr/OqrvrWnbAFsd5MdlKKQT34vp1k+AKtL7bX3yXaM41y+Ttf5WJf+Y5NCxuIvWU8pqsPmEORZa6Ipdzt9Rt89FGaj10eY6FT9aU+tg2sB2gL9cY+QDtO/QuNtuFrYpP5nbT0Gb590AfJHoYN7SF57qAr1rTYtMvlBzA+dVUn5IZ5k+/Y/fBF6Z+i/WfxGH3PHIxMnKu6hT9LOybp+/Vq/zPCi7W2YH4hH/xX2sDY04ZzefyVeHdlLvM1gL70fIC+EWNgPXWEBIT11HPqTOaMR12n0DnqHfKbbF/B5tJefLrT9f1N7KXHIuZu8BL5saSjvLDbxNVi/YnsMW4xdxCzoV9jnos5ljgKaYaobTeIxjoj9POnwth0V2TvVG4DzF263l8JfxM6PkjUBbuT5m71wxyl30X2WHeXlnpKF5vLzsKDjsLzltYOC6UIk+n/v/n5+LmRJzEZ8P0a/7nYP9k5+rGR7cXVyh+9Q19vliKGjiM7L+v3WBfSNsaiM36h1iA7S1/GYAMsE2fIdsHL/ILc9tDigH5hfFjP41NQH2Q8xizqcYfm1rAxjLVc2dK1klvGMPnLyq+9+iL8Z8aHtc0/1LiJkr2Ic0wrxBtmFWKUsVaNdQtjqrctrvedsMuku9frV2hha6h3GhPNK8xzyMAB9kuQYfoJe0mbBkoXGQt0K+ZZ5CDGmzmSvtxDHRJ1IT1lUgfKw0enPOQi9ZkEJ9ZeSeYte6xxSIvM8hcfnPU+Zd4uZ153NJXuVZ3o4114BbrHFf+YNUAn6dimyqu1HMr6kq9msg37yO5c41hVxE+inREHY31D+ejqSGV4ndcs1GGAfMCI4YRtod11lT/6fbTyQL/Re8aa9v+qoHZRZy6RTMU65hCVgc+BTxbjyth8ozmJeCMX7fun7VTYquhb5tMYI+ImIQu0hTpAJ673wN/i3MXYFf3MmqOFMmfdhG+FPaAe9OfjuluHeAMX9aGPiEfTR6wD8OmZj0I/wwZGPIV8wo+I+Sri6tizm4k1On67fv6yzIWPTd4hd2H7aTt/Ux9foTi4/X5s32Hq46/vli/m9XH4AMgSF+niL79zRf8jw/Q5Nph1AXXBdlCXk5TvbpKpWGNThzc09lH3mA/xQ5k3qctG8gvRw9DrYvwo+RPOO8onzoJuH84dvc5rqezAN1pDhr4ztmH/sAvgTWQ/zym0I/JH5vl9geaG524r+6/Jx/bfk6VPV/EIYwXcaHuPmIPcJnjO0HiwT4GNoB0N1LcnioZe3m/dDBnHBjDfho9EfLaX8meNgi/EHIoc4hswt4euhMyQf/iO1LWe7DEyFzqLnxvydqX0HBvN+qiF+FaIRvwBexVyspUCQ6sl38gHZeL/M8/MVL3uVzr6E75aGqtYx9NnT+kv+y7UAVuFnsb8EfaCgx/wHqn2zVFdov+pe/QF9QwZpG3kxRwWcyo6BB99yDqAelMnyqFe4QdQF/JHj/i7nX3yQ9inEfNnmpOwP6Fn8ER94LtSctTbPljE2xpqHkIm6b8RuqJvo+5viablYelW5lKN/2XeT8HvIM+Lbs2Ycli706/kz14R+cccQH7YifBj2YOCDzlIsVD3bcwjtKet7APtGa9ysVHsJ90ufbtGCT6QT/uO+G7U9YX7JnwYZBz5QZYDx9qFeWiUrmXXZvmmvFjb9lE54b+8KmclfPvUhxpb2oLNos7oN+uNQ60rEROhbcRlaCf7VtiDiHPEeNBu8gkfgbUN68awT/QFPKzH4eGuPL4TD+f7WarreYqvhe+XYknS4bCXyW9WfYeL1uMa6ZXmdsrFzoU/E3aY+YLx2e3yPBfE3mn4h8kPlD+QYlL+HrGWsGvkzXjhNzJezO3Id4wFaZnnUqyr4AsQX40+QIZvts5y6ek06+UYn4r5jTgDe6RhGyiXvcCwibQj5IB6RYwVHXqIW4QLv1M+7aV85jxiVaOlw4wxNjdiN3fdVI4Zhi38WvNzSx4dq7Lx0/BJYg2eYjGyNdNkbCLGRb8R471WBbGmi9hupEPPkYfod67kS6vMvhpHYsLwIlffGv/b+oNvC28dxQRiLy3WvdS1qujhk4YvgbzG/BW+oJ56VRqjK2KY7fCdPH4RW3qeQ26O9SD7jNnulg181PBBQ96v1pz0meT6CelSH3Vw+MPEgUjDvhVprlO/U1fifWGv8LlirqJ+tTVRPujxjPmii3WKNvSXXSjGK05Tv62QnUJG+R7+FNdD7ndk/w8JIW2hX6LuEZ+PPf/ifk/E57Hpl7HvpzJYd6W9YNs92oYPGnM0PihYT0ZYP8YRY2HM8DPOUx9g4+JsAn4s9m6EZOacR7IMcfUkhux5kLpQD+Qp1t/Us7ECb+cXYofYcOw7PPQrfTRaEzG+xmPUyekYD+qAncEOFGPOx6pcxo9bwvTEydKhqhz+InPqJRrniG3Qd2tld/bmdW3yy5jjsIWxzqJfsSuXYCfYW9RmXcgt9UefY/6hbdiLFKPFBrjujLdUcL3txLZjC2lHaqfHL5294HEhXhfznT4PuY7YEvGyWHNPlTzEuBG/DIwOgPF/sKNRD+qNf08+NXlcsC76car9ceoRsVf2p8njRflh5EG7S9cphuH6k1/EAiJWhm2K+TH0agf77fxGubW8Dxu2m8V4xM+inad5nV7Nv2FHmklHVqpvInaHPsS+UegdMeeYr7GRzO/4dbGOHKx8w88fJRwxOcaA8mIOOYszMbatbxXij8wLj6r+e6ku8FI+7WLvmr1w2tRHaW/2mRrqxvmfiD8VY4d/lx3yDp+RPVr0DH76JOY3xuZg+Y2x7x/nGeBBZot+LXvk9AP6VvSRwubQN6+onnNVcNgMysPfjPMRP6mdL2kMhqpS3b2HiT0P/4HvdXTV1cG/t2Vb75DPprc6rbcZyEVxX4O9nDgLhK36y55yYW2LHUQ3iBljP1op3hC6yT4OeYW9oO20hdg6eh3zK2XT78hurGNin4S2cp0tv4Tf6I9oE+2j38JG8dttales8yJeEvuWYYebqo60GZmBd6XsSayVyKMej8bmXJL6vCib2FBk6O+x6fO1p9VAa+7kj6gtYQtirRRzOPRLNWcVz4dRx2flC0SsgotxYC5gDGK/OvasuegvPZkr6RU4xQCpH+tkyx4xQMaIdlQV5uzWiZIf+p0LWxw2GHkuxrHjLEb03wfSZfyLC9QfT0t+ztU1XNet+s6aI9Y9C8X/s/0HfPY0DxV+f0i+NbKCvoy134B9HCyZjZg08T7mOPxgbGz4whP0Q3O1gTFHvxi7KZK/WIczFvgx5AFPrH3ChvB3J/HHXgyyTd2xER1FRz+K8o8O1tX1iiZe2oPNSPFA/BKPE3Wj/szD+bkamQfZivl+d8la7HtzoSO0jzYwduHrnuv5JdaAE3Q9U+jr9wp7hDEunEHjnMFp2qvBLlFv1s2xNtxQV/j+f18L0vd17C9RbswF1CniOOhCfQlEzDfUi76kvott39P62Gv7BercNd7fZcxD97hqScCgE1OJuY/9sOSPyq8dJUMWsZv/T+f47XzJ2zk8mtPycaXwRO1HNnQ8JuI8zKXgQbbt1JE+KOZVhXMsqkuXkXlu5XfSwUv8lPQRH0aelnovIuYGPRmy9KH6IPZDoBV9m+aaiyPWXlzbpD6zfCADVXVWIOIhxP7o87CfsScTa9uXdZ2gNm0vv428OddK3swjfOdcTvRtxHL01r9UH/Q94gohP2GX0/rNMlnsJ+Y49kLjHBY6gr2NefBqZbLTXVqD2H8n36Eaf2Kxzxfi1KxBsWcxt9JG8ow2xpxAmburfXwvxmjDtif76nNv4MXq8MDskcX+GfLxd3mP85x6alSKt8DPeGO/8ZEo4yt16Isa5/PUhlhzHf541rOzdMV8FXsb6AF+3e7iIR/qSD/hCzFHxbgxhnHGjvZGf/Ib9o54XqzdoLHfkPxKx9j+vu/Js3P4nb3tWOdy1iRiXswLb9u+Rhwh/IbiGddtvTfCGEc+HKIurks466S3pyQZIX5ymNbzpMGHCP3GfsSamusL6eTximmH7U26pL4NH5T+u0/jfKP2QhgLfAfGjXG/zvlj+9P8UYjBIK/sT+MH3648NEylvo570+bifibnRehr7AR6ia0Pn01PN0w6l/rSdjXWouHfRnnMrcgBc2tqZ+HcK/0VfhprhSPtZ4ftD3knL71dpvSZ1wvUKeSWM3YpVqB1ZviQEVPBFt2i9VRVjRNl7W97Hev4GtrDoR3wzuKcg89M8NsSzi4IoyPUBf3eS4YVuaRf8C3Cj8KuRLzmP5qj2eMO3ypip9SJs0pnqL+LZxO4in4EuhdrE+wn+UAPH+AT1YmxiT0e1gFxfjLmCtIeI7uC3p1hvQs/dIXsasj1ChW2WAs2fI3I/zbtiZ2rjbCYB7GN+AWcHU/7fO7XudrvfVrXxeqTK9SmdBa+sNcW50UZf/oO3cJOoOMdVLeQuXSmQryxbxMxIPZHQp4iDhBrQcqEzryD/Mc5wmKcAzsTexPRV7Qn5KmH9jHjbFDsNYVPN1djuFVhnqGexNLDfz9fgVf40Ivr5Z/Mlq7G+pn2dFb7qFP4rJEPZcQcx+//V9iXwHk9fm1PezGYalIIU5Jpn2ratymthFYt2qZmaqqppmamXQstU6KkaFVRaZNpY6QUihCSkAyiEEIIIbzX9eu6/+/1PJ/nfR+fz4zTmfM997n3c59z7nMzzi+MY8YGEJ4C+2fQF4bDRkife7CXRfQanQtcR2NsTyg72FJj2bccOPhbWHPZx5zDIW6CfljKGGxc7DfKcI4+BHy7RrY99iV1/PWak+z/G3Ge4DrRGXUvg7kTfDXh/BbOyYwvJs8uOMtxLMyBDYJrAcc59ziWzzUt+H65VoWzJOWlLZK6OdcfZBiOmga7Ns/Y7PcvMLbDGsmy2b5sq3C+9vND0NG4B3McB/9IsLvy+6sw7pkWL+iIwRbFuswBnnsNbQ8cd1zz+eM6/ynpY/Sl8Cf0O21iwS/IvZ37Vehj4qhzc59lneg3OooxMBmLc4g7YDdy3AT7Ev02QQ8nD/YJ95bS+OBmjL1o9M1CDK6wT4b4vnlYI8O8ug12oICnT4jjiGOLeyj76UPoQuyn+bjoEWKaw3wMbRrszuwbysZ4XPLherGZT7FqnIY43PA95WZ9wli5EcrLeFyqiKR5PFYgarLg1Xh7fhrgSCp1vJOXI3wvrOfzBI/5GzYzwJF0ze8XiFoh/Bfgs1rwVj4nIfhRDIQN4nkt6HOFj/qgQNROwf+i3DzRfPsv7l0Ivw08Dwi+F219SPBJ8DkseCRyfR4RfBblHpNsn6Lck4LHYXCcBcwLWO+BZ5D5Ift2MeS5KPj4P5cMV5Gn38CzcIBh7C4OmHxOgn85wJHUb2jPONFsgfyVBC8HHC/4LtBUF/wmZEgQ3B6yJQqeC54NxbMp2j9J+A1o/9aCd0O29oK7gX9HwQ+BZyfBMahXN8E7APcUfCdo+giehjYcIHgnykoJNJAzTfAi0KQLroSBnwE4koof5U4W/l98O01wHQywGYK/gZw5gp8Az3mCX8C3CwSPhDyLBE/BGFiiug+wcotgvK0W/h7IsEHwvSg3VzQZ1obTOa4E34f2zBP9ZcDvF/4ZG5+VINsB4VuAzyHBt6LNQ1u9jLocFvw+eB5ROwzhExXCt7XxvwaynRR+EvgfVkrVe1H306FNwPOM4KdQ97OScwb4nBf+GuAvCL8U7cCg+sjThCg3GjBpeoJPjOAf0D6xguv/jGShggeDZ3nBL4AmDjB53vlTgah48WyAcZIomgUY5w1FMxcyJwk/Fv0yXs/TDAO+tfBJnLNKeV0JPNuL58d87lB8ElBuH+HfAp8wbrehrdLEpzLaKl1wY4430Re18fkO2n+yePYGzQzBD6FN5unbe9AmCwQ/a2tOE7TholB3m/tLQL9C9N8a/SDAq4XviHLXAuZ10y9Anyd8S9Q3jLeikH+P8O9Atv2SfzDa87DwpfmcgWRYgX45LnxTjM8Ax6Hv8gU/AJ4nBbfHGnha374P/meFvwl8zgnugDFzXjTvgeai8F3RR2G9rc4D2bPqX65pgl8FfYzgebQ7Ao6sFZCtvODRkD9OcCb6pZLgEig3Xt9+CDhB8AjI1lA0WahLeL7qS/BpKvw2lJsk+tXoo/aA2W6rMQe7ieZKG3sbwL+n6J+ADANEkww+KYI749s0wYcgf1hLb+TaIvwc4DMEPwI+WYIfxzo2XvB94Dk5yI8xME2yLQJNwD+Ntp0nuBHGwwLBvVDfRYIXgM8SwVW4BwluC/xqwa9CtrCG9wFNWAN3Qba1oikJnhsE7wS8RfB0roeCK2Bs7xTcDnBYZ26FnGFtGQX580TzO8bzHtVrE/gcEv5erl2CJ9t4OMs1UPQfow3zhc/lWBV8Fco9LfgH0J8RfUHU97zgo6hjWJMXgQ8dq5GnlCBDYcFLQV9c8LOgiRY8HzxjAEd0BtCXEz4XPMO+1hd1LC/8R6CPA8xyN6Cdqwv/PsZ/GGMxplds5RgW/wrYFxrq294Yn60F38A9V3xi8W2YIzPRzt2Efwn0PUV/FPKnCD8G/NPE/2/IH9aHRaDPEH068JNF35xjDzB1j4ngE+bCFMi2QDTPgVnQ5XpCttCef2KuLRLPHejrsO71B361aCbYntIb7bZW+I3gs0HwRNvjDvApKPG8m2NJNIfQnoGmHOj3CJ+OsbFfcLbxTLP5+yHqdUD4mlgDDwl+3cbDLIzDw4JTMMePCC4K/DHBQ9G2xyXbnzanLoMMp0VzG/dftf8wwOeEfxky/Gf8oy/Oi08GDzR5l+BRGJPRgCPPJqLusYAjOi3asJzwpTAG4oRvZGvgv7anXIc5Ukk0P3D91Le/gU+CynoR3wbdZj7kr6RU/yXRPk317X2QIUnwALRVa8H9qCsKrsOc+OJzM+TvKP6FUFZPwWVAE/bBZ1Buir59DX0a9rjvuV8L3wRtlS64MWNtBM+yeTEE34a5eQjyZ4nmI9CEdfJd3ltWud+gHcarHd6CnNMkWzfu7/r2U84X8XwU/BeIZhLmwgrBC3juEJ8HAOcKzuZZQ/BwwPsFb0Ddg473DHgeEp+b0M7HVO5E9OlxwYsB5wvegnFyUvSvoKyz4vkz1zrRFAf+AmDO35bgWfz5S/Q1MYZjAUfWTLRJOcE/4Y9hrRjPtTfMI7R5mOMPok3Ki/5y6nXi+QFoqgufifGWIPh14EM7J0CeRNE/Av5Jomlm/bKMOp7wFVBWe8GV0W4dAUeePUWfdhN+EWToKXgZ+PcRzR7QpwjuiLGaLpobqOMBpvv/AT4pJXx19GNok9mQeZ7gHMomOI17q+D7Mc7n6XmvFahvaJ/u6JclqmMb7MvhLHmUa7XaIZ56nWR7DPXdIp7pkCFXcD3wCXvBoxh7O4V/DjLkCf4EddwjPg0hzwHhx9i8e4+6h8bDqyj3EGgiOd4AHxf8HdrkjL79FXzOSv67IcMFwR1tXf0FPMP+NQHjtvBuPUuK9owBHNFv0b9hDeRT6bGied/OuTdC/jjgI08hcC0SnIT+ShCfLaBPFNwd+IaC94O+qehfwHgOddyLerUWfjD6saPoK6Ftg951hPkvhD8K+m6SrRT6a4DgBuAZ9rseqEs68JF8kOAzWTS9wT+sOV/y7CmeM/kchmhGU/8UvhD4r5BspUG/VvjN6N8gTyGeN/Xth3bOHYv23ymafJ4xxWcn1xPBHTCWwrq9HnwOiX4921Bjbwvwh4W/Dv0YxvkN+PaI8F8BPib4Na4/gjdRRxT/H7gWCT/OzlNHIc9JyfOp6c8bMTbOiH6SrfO3YF06K/xos/NMQpufE/4D1Pe82qQN98QX9Nye7WV90M7RwEfGP/iHcsvb2bYeyooRzafou1jB47AYlAMcecIDdYkT/knufYJ7QbZ4lZvI9hS+ItohrBsFUN+wpi0Fn4ai6Wtn84WQJ4zJdhgPof3/MH3pOGRrqm+38BytcfsWyg31rWx7bnW0eZLkvw34sA7/Aj6h3K9trtXEGGivumzj+Ne33TC/Ql/PQVlxeNaf+Hboiz6iGczzjmTbzj1RT9QdMdnepj1HNPlon3TBd6C/whyJRV+Ec+tMrCEZoIk8ZQgD8TTRf4FvZwiuhfNjjmQYAZkXSP7LIMMK0exAuasFnwHPsN7eh3LXCr8ePDcILgQ+W8RnC+jzBGcAPqCynuQeLfoHOEcEZ9iZ9Cq0yTHJPx1wqNcKyHZa9Kvx7RnB84APY+8K4M8K3g986PfZOPSfkwwnGPCqdaan6Z97uD5L5tFch/dIr0B/RQv+gvYZwBHdEgEhYT8qRVsi8JR5JWjiRdMc/IM+0B/46uJzF5PYq9xo4BOBZ7nP0Fajb4uabe0NjLfW+nYUcjF0FM3nKLeT8GXM1pphZ8AOtB+KfhXx4rkOPPvo29IoN0U0XSFPmvAf2P6yHeM/zJGLPOOovm15VlJZt/KMI3xFjivV60+UtUI84/Ft0A9/sXPTWO7joimI8bxF8lxj9sBj4JMrmkNctwW/QVuNyrqcY0zfvoayjgh/kGus8Pmcy6GdsQedFs1yniOEL86zg/hPQrkXBd+M8VB4r55LBn004MjY43kWMOt+DH0RJ3xvjO1Kgtuj3HA+fQH08eLzEOSfp+cUF6NNEkSfg3GYKJqO3KMFP2ZnkFN2Dr0Da05rfTsb87e94OXU9wCzjpmg6Sn8eLRJH8EnjeZryB/W0rFYzweo3Bd5FgvjFnUJdfwEfs000fRFuRnCDzdbfSWUFeAitOeIfwc7x70DmnBuvZxnDfH5mWNGbXsVvg368C/4NoztqzlOgj4DHSlH8nxtusRRVG6BeFZCXYIuuhc0i4SvRh1D8F/ooxVqk6m02wj/Gfol2H/aY98Julx1jL1gV6yBcRVsI9mg3yI+FTG288TnNT6tKDknQZ6wVhQ3W+KzkOGAaCZg7AUd5ozZ/2txXIlnNso9Ivom1DeEr2DjqgzGW77a83uumcJP5fjXt0+ZntMXZQXfSjzkvyD6p0wPaYQ+uqhvN0Gewi9KDwdNccGf2fnoZp6vw7zAehhsILm0Y2AfjKQAtD2xINo5Gnwiz5mhTWIBU/7XAFcCzLbdzrtfwR4L+jDX/qD9WePkC/OR3W7j/DXQBNvFs2ifBJVVDnBDlRWDtg12p/qoY9g7LoMM7SXDMbRb8N0M4NlKdb8G34a6f8lzlvA30fYefCumgzWhj0n06+nLEH0n08Guoz1K9Bk2ZmrZ+tAa9R2guqzBOEyTnPm0l4rnL2Z/vp6+ReEfMF20icl2NWQO5/cZtOeLf3Xa88U/ivqn8IMhf9DJB6IdlojmV5QbxtVy+nRU7ofUKwT3tW//5N6qun8MeItoCpi9tCXaPzeMN/oCwpyinV/yPAT+e0K/AA5zqrPV9zeeBUT/ONqko57YywPPMN/f5TgX/BbPg6L/jP4mjbeD+DY8s94M8BGVWw40xwQvMFvxQZPhG9sfe5h/Z6zZ0PJQYNDNrkabh312sZ0fmxnPGuw7tXljtEnQ7XNAf1zy3A58vuryOdr5dGhnngGDvxIynBF+Fdfk4C/jmVffvsA9VH39MtotnKcSGHy3T+stbbZaB6IhW2HhE0FTXHAn7h3q36cwhqOBJ8808981xbgKffE5bZiq7zLznTUwv9L1tFWqHUaAfzmV9TfPoWq3j+g3Ef4z6qiCE9CeYR9pyPUHeK4PN9lZPhv7bGKgx1hqCJht0h30SYI/4R4k+hTq86rL05C/vepYEjIEmht5vlBZk8ynUJXjE4GfEduX2e2Hm71iMtonzLXTPJeFdQPfpkjOHqBJU7m78G1on67oxyzhvwA+7LMnAAcd9WHIOU18RpkMjbFfzBA+G7pEjuo+iuuDeC6zuV+W53rhv6QNUPR53BsEv2J9lAk+eaJ/H/KE82M3szUd4R6qb98GTVi3b7fzdTXQHAYNbVnDIMNp0T+Dtjor+ReA/pzw8yBDWId/os1ZcDrPEZLnerRn0F0P49vC++WPABwt+B/3ffAcDXxE30a/lBPc1Wxos+kTEb4+dSe1WxHaD4Fnue+ZrriYZ2TJ0NNkfsfswD9xHEqGAuiv6pLtKM8mKutPxjaI/1k7C6y0NWE3zyn69gLoO4p+n82L8cD3FH4nxkmK+JdFuWmCl9KPLLiIne+uMz9CKsoNa8JF2nM0VoebvjGUZ2HJswbljhe8zmykK1DWNJXVEf0+QzTP0ycofArqtUAyH0ebrBD+VttfnmKcg2gG8ywsONb8Wc9Tb5Sct+PbsHePA888lbuBtibV8SL6d7/weyDnIZW7H3zCul3D7AAHqAeKppjpD0moV7B7zAf/EDu0hfuL6JeD5xHJXJnrv+AnsP+eEc3j5u+bg3F4NpSFcX5OcH/z45w0f9k4yH9eNLsBXxD8NH3cgtPMn96OwU4vSccAXFjwhxazNNXasD79jKChzOtMd72OZ3bguWaeA1xJfP4wH+5+87VNoI4BGrb59dQDATOt9GuoS1gHsjm2RdPA1tiVkDOM4ZdwBukmea4H/QDBW80HdxL80yVPBYuTOQ188D/+jrGXobIaMq5b9M1QVvBZx0G2oJN8bnbOI7bOvwz+kyXDbtAHn91PjBMTzzo8hwaZMa6WCJ+N/loheAfqslryPMT1WfBVmC+5ormPNnbBxTCW8kRTBPT7xf9RyH9YNBt5Thd+KfD5wr/JGDB9G2tn5xy0yRnh+Vb0OdGvNt/KCozbsNZ1tr1+I3UzrSeH6U/Xt9egX4JNex/oLwgfg7q31tPPj0Oeiyq3JWiCT3AQdR7xzEEbFn5Zvl2zpy2njqe+KETdRjR/4G5FtODKkCfw7Mm1TutYN9QlRjTjUPdYwJThT8gwo6r0QLRheeDZhu2t/T8HYdj364N/aIezpsemoc3jxb8k5m91wTVgJ0wQzxn41VTlVkSftha+JmOBwvoDGToJnwy4j+A4tFsaYMbebGLsmfh/TXuReHa1uI5NZuseyPO76M/a2edTrFdBZ34IbTJPfLbxiXzRdze/wF7Gb4imN22boqmLtg06TBWzld0EmrWiKYT1bYO+rYZ9Klf4kfSrCv8LbZXCj+G6LXw0z55q53zYSQ4JP5rndME90P5hHJa1M+kDZsv62/bxjpDtuMrqaHbO2oDzhc8E/5Pi344xe8EnxVgO9ctK+gJE08f8YrNRr4vAc838E/0Y/UrJyBubg2nrAxzxXaKPgr5XF/iwpr1m+nwf7vWgJ/8r0D4DAEfWZ/BMF/wH8MFHGcs9WvQt6TsWTQWL86ln+kY6v1VZ99tZeIbp0rdxbIjnJ1iTF4nnEsqsujyOMbBWcDTaLeyb6TyHCj+Oe7r4nKDtS23e1vr3O5S1UzRbzBZ0nr5FlXuM+7t4fmJrL55E+49uswvtc1j0OfQtCk7hWUzfTqKvU2NjIeQJZ6uGGBtnRLOAuqvg2sCfE9wFdTwPmP2bgLEa7Jl1MLYLH9DeBERxwWkW69vW4lXyGEcBmojewv4TnIU1JNgWfrR53QL05UHDunTAGhL6NANjO9hVfsGvePG5mzE8gr+2eLPV1I1xqSZiE6ZeKpputg/+Qz+O8O1o09O3nzDGQ76ALoxVkzxlaLdRfR+iHUz98g3XmRAHgv23p2hSGYejtWU1feXiswI80wS/iD7KEn1txkVInptR92miuQ3fzgPMc8dXZpNJw5gM4+oLfBTafxptpOJZE+0WzjKtIc8G4euAf9DTnrOzyQWLExsPObdIhl9dZ0B9g1+yE89WojlPm6Ha4QzHg+ZIHPo3rMkPguaAZGiAbw+pvhewxx0R/gD64pjgqzCWjgu+iJyO+YJzGY+hcmdb/FuGxUUPp/4p+pko9wL8a5H68oymcrejrS6I5gHGuoRzMW2V4l/PYmY+oA55UHZp/IoGHNlTzCZ5B9o2VvhhFoeQZ3vTCdO7LkKe8qJPZryl+D+GORL25SfprxfNKYyHBMFdzSbZw+RPhPwNRXMPZAi2u60WE1vD4uHz0e9JKvdZxoQIHgqZw3l5FtqzvfAjzHa9kP76EIuOsdERNGy3kRYv+isQwZ9ygbZN8cmjf0FwA67/+na/2ds7o77pwHMtOgiek1WvKsDPEH0fi8dYjvGzQDyPQp7Q5tmme5zGt4vEpy723BWC/+bZQW24CN+uFf9p4Jkrnp9wrol+Dfd04efRxyR4Be+zieYvW8Mncd0Wz2SLzbuJa3goi2u4+DTEWArr3hzqtOJZEN+eE1zSbM5VsT6HmNUxdnbrj767IJ530JautprDca5y64Gm+Ks6h4ImWvBjtBMK/sB8js+iTWKF74VxFfrrVovbLwn+5UBDOW+kPV/0u9C2lQBHfMEoK0H4PIs7mkr7mPANeOdH9BfQR+Es1on+LNG8bn03hfZtje099L9LhrpAdBLcBm3VUzyb0zaodfVBm1PX0fYl/p+DZ4hp/AntEHSbJXa/5qjZ9otSpxX/TNQ3S+UWBp9whh3I8SyaWMiZA5jj/GXqoqKvbncl3gCfYCuoy7gvwcPQhkHH+x3yBP2qJ9pnteR/g2cH7Ud5tBUL/py2NdHUgTwbVO7NtCuqvqcsHv459GmuZH4PNCEmeQPaLZw1Jpkv4Gbw3yP+6yD/fn27w/TYWoyTEX4p54Jk6Gs2wyza4oRfh7qHc9DP1Ff17V3Ub4UfTNuy8BV4qQsXkAkn0JarckuZrbKOxS9t5/gHfeSsyvEveCPjTwSXtHFSlv594Hl+WYlLfdVFk2Q+0LUc58Jfj3mdKHn2Qc4kwXUsHvha0HQUfhvarafg5hyT4vM17eri39zicGZDzjTRjKSNWn2XYzGQH5rvvgt13XA3weyiDTFH0sVnLMZShuBG9L0KXsJ9R3zyGMcl/I1mkxyGcsP+MoljJsQiYt6FNeouswmvQH0nq75rUVaOeN7Ae0aCZ0Hm4COrZHbLcWZzex99t0D0Lbnmi+fzrGPQnWi3kd5bEm2+WjS54B/i4n43W+gO0Ic9+mOeg0JMBcoNfb3U1sMFtl69ZGeicRaPfZPFLK2zM1oc5NkieaoDn6e67GGcj+p4wPjP4ln46ktz5Gm7u1EXMof+/Zp7lvjczphtwW/h7HNAZeWgr48IfxDtdgwweX7HGAnhH0bdT4r+asYvaY53s/POj+ZXfZvtrG+vBM9zgLnWbTBbXKLZ9+6nPSTEjZhfuDxkYFL6iF+VZ43Q16hLYeHXoqzigvdyLgseZrbfahaz+qnF+9XEfIwBfSSuGG1VTt92QTsHvfdJu9t1OepSHjSRGDmL5bjM4+Iwj+LFZwB9rBpLLc2/M5rxPyq3Iu+7Cb7GxlIBnq+lr14N+qagYRu+ZP6jfejHjvp2JOOlNT6fp685tAn3BsnclLE9wo+yeO9Ys73PtRj1XaTXXtPQ2mo649DEJ4bxyRoD+yBbumju5DiUPE3Rhlmif8X2rIG8d6OyUulrFs2jtE9K5q/Nrvscx4P0q4nQE4It6H0QhvW5Dfs3nF+4z4pnCa4ngkeYnXwXdUjhv7V7jifNb4upGbVI9VqNfl8h+l+p14W2tXPrnRb/f9L23PsZ+6F+/AljaY++TUU7HBLPuzGGg26z0nxhlcDzsGToBviY4EFcQ/TtBp6VxPM72iTVd+VRgbPCP2Dxhz1oe9e35SyGZIbFOn7JeCeV9Sjn3evaF0w/b2/66sd2vljM+2igj8TRoc3DXdcxtMMDT/pl4FlePJvxXg9g7q25FldZEPVKFP13dj7dbXF6s8C/qfgMNx/044yjE/5mzM3WgpfSryrZzqCsbuJ/Hdqqj/BFzIc4xNbtt6nvib4AY5zEswX4ZAlfkXfNxOc46HMAs99LWQx5PeCXiGYT6NeKz3kbV3dA/hDvvZt2qBAfgjqGO92FaJvSt89bbOqDGFdbhJ9v864s5k6u5HzQ4i520fckfB0g9gu+mv4m8VlOW73gqbw7pno1BT7clb4X8p8UzSLQnFYdq5tvbgrgcDdzn50Bv+d+IfpY9MVFwbV5z+INnRN5V1rz91XzCa7iewygocwf2T7+A/jH6tt6WCfD3YdH6H8J96TsznUn+kQE32G+75vNjlGJ9zjE8x36FjVnq5md9hmObdHswEehrAfMB1qAsQSS+W2L9f2C9mSVO5Ex0qBhOww1m2cD8E8U//Zon4aiuYc2XpXVD/VtLfzPFiM3Ct920rdzObaF78G4AtEfps4cxgYEHCD6noxVlsxrLeZwNvAhTi+G+qToXwTPDNEvpe1L/B81f8EFi3t5HXIG/bA6YwbEJxtJOnPEZyzjNwRfTz1f9FNR39CPhdG2S1TWMMaUCr7T4swfQDvnis/rZlcfYmeuknYe/MHsOfMYe6yx1IdnqADzDp1krmFn1R+55kuGXnbmeoh3lCRDA+pj+nY+5AyxTD/YPayTvEcgmjG0m4nnNvaXZL4FNOH8vgzj57RoBptuOY1zTeWWtxiteig35Ge4hjF+Kquq2ZY/sXt/2+kLE5/tjG148xKcYuflaYydBj6yH5ktOt7uj6zEmIwRzfcWIzEadQn7eBbGQCxoIjZw8Al3SK/GWhEnfH3IUx1w5H43acRzqPl06vOelOTca3rUX+az6EGbsHiWod8nxIpQDxH8K2i6gYZr4Ifox6Dzv8k5om9P0WchGc5yjgh+kLGsoinMeDnBNzBeWjxT6WMVvg33gnAOtRiwZRarXNTOgDsYF6c6vm/xYyk8DwZdy+zGMxifJtm2YO7kCR5vdyWesdjU1xmzKv5toLccEP0r3C8EF2dfh3M0dSrh7zIfzWL6fFXHY2Yz2Wj99STaIV80Bc3Wer2d77LNfjvH7DYf0PYbbGIWQ76O9gTJv9nOku+ZHa+F7S9v2t2WshZHdx3jQ+qpT2lzFs9U5nyQzIWM/mHLb1AKdQ+xhYM45pHQLmLfsDPRKoyrGOGfRDuXBxyJQ7M7tncylk/jtiBzmIhmEGPS9G1T4BOEX4h1JtgeF1K/Ek0RzKMkwJTnMP7YXvAws5MncY0VnxOm7yVgrQj22JGcF+L5NuQPvpgudvdzAGgGiOYmlJsu+Bxoxgv+GPAMlfW0rcPL0Q45whfmfR/JeR1jqpE0LuJT4L1C0STT7yN4BmNvAHN+DbTxX4Vn8CCzxQp2R1l5+ravxX3diPG2R/i6tqcUYLyo+NSlvSvUkXGVoi9jeUL625qzCXLmi+ZmsyG8SN1efAba/ZcclHv+Gtk8La5ghJ1/K+Lbs2qflux3rb2beadVZY0wXTfB7Dw7UfcLoqmEtr0ouD/kj3pLfi7zCdZHG4Z9Z7LduX6cvmPRn6LvQDS9IE854CP9Qp+g4Ods/K83W1lDzjXJecjsD8/TTxZ8c7zHrTVnIs8R4BmJgUdbxYt/jt3DLWj3mAbxbKJvD6Cs6kE2i5GYCfqgT7agbqm5X4f+GtDTfzcF37bXt4epY4SYE7MDvIpfHdUmD6MuYY8YwT1CZ/+uaP+e4nMb6tVHcAfIP0D1Gs9YTcHXWl6gya6H2xm/L/dclbuWZ23BswHnCG5B/Vzt/Bbnkcp9FvUNfNJtre6PMRB8T4/wXCM+d1HvEjzObDuX2x2BuXaWv5b+F5V1BWh2ql6Vzf5wm9n832GeFtEvNH2po90leZRx9aJ51PLDTKSPUvzvYcyn4I6gD2eiZNPfruX9cfHZZe0wmf53zbX2jMcQzXvcs8RzI89Bgu9FW4V1rJbZQq/iXqlvpzCWSXB/xmbo24J212CH2UYmW86KJ82286bF/48C/4viecbuHT9k8diX0X6OhL/sr9Zm28ni+VFtstnOOFU4R0TzGOcOkllGbB12v68O89UE/mYf3gx8NMqKrHV2r3OAnRNfxvyNAQ3r3th0m+Jmb9lHm7xoUmzt+sTuyN9puYB+tpwDDRirJvw3tD+o7i/amfSM3Rti0rjqornWbFwrMU8bqi5P00Yne0gp5nYQfjDjEPTtGltvXze7wY2Wu+ZmO5sXN5tzZcYcis89zEkiuDjqEvT2Np5nA/Qpap8y9LEC5hpV22wy26l/iqYn4xAEv2C5aBrbOTEL9ItEM5V3+gS3M/oLwK8VfgDacIva4XOz0S2yvl5IG6z6qxl9T/q2iq0DHRjrqHm32XTUdtz31Q7Pgv6A4D2WY20x70xpP51o/qBnOddUrzcYW6h7RldinQz0XejLkJyvWA6x75gDSmUVtDxvZWyOR3NPV91nQv6TgqvaneVJ2CNOi88UxucEGu6haodlkD+sRWNQ7kXRFLK40970Fwi+k3e637mk55ygbwtwZI+2+vahn0v4ihb3tdziE+IYly6aIrRpCL6atgvAlG0abZ6CX7L2eYo6p+hngCZRNIm2H71k4/wNyNxUNLdClwjr2060T2vg2T6vA/6PTdju2s8HvpO+nUGfkcqtxJgctcM5i1FpRz1WfbSWsT3i35lx0eKzkHfEBH9m83eFnbmSLKdZEsZhjvgU474pGTK5J4pPOdorgt+ZcTW6g9YJ364W/QDG9gguavrbG7x7KPwptP8Wwd9C5nCH+pzlVrrX/LyzQZ8r+heYFy7kwrK+OGZ+tM2WIyID43anvp1KmVXHomZ3/YvzDvjijLuwGK2ZgE+HMYM6nhF8yPzdH1t81yjqxmqrSdRRBRdG3S/q29/sXL+RuugR3cGnLVR1H87YWuAj9Gbf20pdFHjKP8ZyCf5mOTqe4Vqkb58H/5Br7gNrn/N2X+Mbixl+jXqs5MlnjEe462T2tMM8l4lmmsUt/4Kyqku2JoxnA0w7xmrTtTLsvsxOnusUt1nD7JO7wbOj5K+CNg9nvZ4c8+LfwPJj9OYdcMmTa7FV9bCvhX32KdCHWOjR9m0ju8N7P9ao4AesShuIyrradLZ6lh/yU9heMkTzuOk2q3iXUPh3zC7ajD4d4YvRxqU63oK1YonwLRlrJPnvYf4r0czl3BFcymJll9pcftfiOg5Bzi1qkyYod6f4/ws7837hH7WYmccZzyn+HXhXUXXpZ/E/tzAPm2jm8Q6g4LsZCye4mN1rWMT8VyqrBe+5CD+E50HJU4J2SOmfa01PeM/q0gjyBP2tvNm3H8M6cFZ8Hma+U/XvePqGJM9O2vckw1MWgzeLuRHevbSu1jcd4GbalpEQORIzwNgh0ET84MwfBZhl3QL6SoAjbWj70WbUq7poWtGmLXgm88+IfrnZZtswjkj4n1GvYNvsaP6s9cwLJz7fAx/m6XHTIR+h7oqk5ZH9kbmA8IhLZF3lnVnxr4AxliY+HXjPRfPxguX4esNs12+Yfft5KzeD/lDxfIA+ULVPK+7dQdey+Kvdds6daPO6L+OixaeL2Ycng2eOeFay+ywvMP5Z9HPt/v691OXUj68yv0fIhYi+WKv6/gSaXPFsbLnIltBPIZpVtLdr/EyhXUv4UTxbCX7B9LEveSddPCvaGbwfYw+Er2dnllcYFyT5WzFuX3KetpilsvQjS4aHmStJddwMOc9Ihq/Nvvcxz1biuQdz5KLKLUGn71Hd02QsqOA/7P77PrsrvYq2a9BE7LFo/7BPZXNc6ds43ssQfLmdr2sxH46+rWj+95rmTy/M/MOi2WZ6eyfauoGP5LDlfiF4CueLynqR80H4v5kjTnz6o9w+gtvzXhJgjoGSjClS/77OvF76doHtC78zV2S428IYHn27ye7UPGg+jonU21VWNfO7/QzG4bxQjr540bRjDA9g7n2pjKcKsZ12B7Ob6XKp3Pf17eP0s0vmipzLwo+2WLJhdn+tmeGX8j611s8ujNVXGyZaLrLp1HPEv4DJM5T2JZXV23TmTXZOqcA1XzTXUsfT+jCWuW5U1gCUmy/+GyxmabzlQHjN7hdkWQ7MXrRpi8+NkPOc4AmMC1W5T9hcG8LzvubCt7xPLTnncgyLfjxp8LA++dTmexBqn1l2JlrHOQKaiM+OdYRNMrKfWmxAlLXh5bz3Kp6TOUcAs69jGSevvewO1DfcuR7NthX9Uur20mdesXvli3nWkAylGXcHmPjpppt1x7qdJPwm1KWj6N+kPhO+NZvhMMbSCD/PcvTdA3xP4R813SnebLOplhs53e6AvAOdp49kaMU4NLVJGe4vwre2/KXPQc4slfWc+X0O2DlrPA7049U+P0DOaeJzl92Hepr+X9EXtLuZ69GG80RfG20VdLnnba3uYfbJYqYD1GeMsdq2En0lOkeUMF20iNlLX7G4zUN29k9g3IvgXHwUzt0v2RhIhD6wRO3wOfMACE6j303yXG1xBUMtb9hsy33RB2Ngtep7u9myhtNGIZ5NMP6DbWqr2T32cE0L8Us2jyZY7FYP5iZSXzTm+iOef6BN9qjcSnYvqZDZyq6h70z0t6AfDwu+iT4y8axqNrSx8IceF8+hzEku+lHc70RfmvYE4YsZn1VmN+hicSnj6FMQTVfmChD/Oyzn0jOgCee+81hzih+7RDMX/GMFL7dYxNLWj49YfsXWtLmJfq3lUphqMcNtzVazxuKv6ltuq6amq/cCTXXwjPgZqZsBJv5HyNxQ+NdpZxB+qq35jdGGYa3INH37Gt5zlJzlzb7Xwew8c+zufG2saZ1E35B2e5V7L+O6AXOv/Ij3eSXDVsbTiuZFi7/6jOcg8ZnIOCLR9+NeKfoM3KlZJHi+2ZOfZ2y56FuD/2rRYBpFrRV+kL1f0Jb32lTWaosTeJSPaahew6yP2jNfivq0juVSOEn/jvqrL20F4pmIsRTO+zdYTFdlCHRAsp2gDVPwUPqUxbMCdUWNpTZozxCXWB9wyDv3M+eLyvoN/I+rnR+yfJKj7C78Nzw3qawP8e1ZwXXB81yAwSecU5ozb4zqtZtnTOmlnXjWU73K0g8rOT9COwT9cJ7FBD5msWRFmeNdfVHFdMsmnHeqyxDAxd+/VJd7LHfT7cwpB3zELs18yFoTnuEYBT5ivwK+KR4QidhhLKYimWdqfTuafm21SUmzzdaysdGad+FFX958YQtpP5fOvJi6qMrNsnj4r8wW9BRkThSftdRXAbOO35odtYDtTe9Qx5AM8bx/rW+nQ/7itS+VddxsQePBv71oZjIXiuAY5sdTG+41P0sv3kWSzJwYaYJ78G6y+qKs+VmqmZ+rH8/U2u/6WW7q+7gOS4epAJ4ZkuER5k5RfXNt/Txo+QcW2l3vO3gnWjKXtpwt8yxfWRnGxkh/+5u5KST/Ros5eR80S0LfMUZC8JugXy36xebnqmy2sv6oY4gt7253b3dR/9c63J73DcVzG+suffUf6DlbxP8X2vBVl2csRvEG83P9bGfSPvTN6dvJFkNyP8+SwlfkGzEqdwPm2nG17QGeSTVPW1HvlS/1OHPoqdxVjIkSfT/69AWXZtxaXeUEMx9iQ+amEM115pu+0u7ZbWK86weyyVCnFTyB+iRg8pnJWD7hb7M8dX8xvwrwETn5Zrvo5zFHkOCt9CmL5hGuseITj3Wpp+DFFgOzmfdHRP8a8ywpr+AHjNkTzxSMqxDfeD99AdJzFjGuVd9+b/cgbrY7lYPQ/lmiacy4PvEcSFu09L0/7R5rOsez5NwK+ecJ3mQx+d3Nb/Ur79lpbKzm/X2t8xu49mp9TqMfNsRO2/i5m7nFxP8Rfis5f7W42b8sN2wu81dI/o/wK1fwHXZ2uI35K4TPt7iUqoy3DPk3KLPKbWbr6jc25vfzbqBonrS3mSqCJtgtVzDnsGRO43srav91mI/Hha/Me7ji8zx9zdJvO1tM1BE7c43kfqdvy6B/zwr+ink+Nb/ied9Q+FvMR/8T9ynV/SDnguA041/Z9tn78G1hPMob0ZeYD1NwaYsfe5r3KYR/hvsj4EjuR7PvrWX8jNa3vbyvqj1lo9mFqnMPEs+vzM7cjXde1G7F7T7UBJ4BRZ9L2wLKjZx/LXbioO3FX9rdlp/NPtPP4iEnWG6uI/RzqS4pNkdiLF/9U8x5qzmym3f6JMOPNjcncO6rfW63O2iTOfeF38j4EH171vbBooxjlwy17V2hGrxLLvou7HfR7GeMruCRloO3s73/km/nmo30kYnPIca669sinBeCc+wO/tvMJyP8Iuzvi/TtRXuj4TfGK4Y87ZA/2GRehMxLRP+lxbieY447tcMawBsE77O2uhr12gk8/d0Pc+8QzT20q0ueG9GnIR67rPmSTtDeKJplPE/p2zmsu8bku8xlJNmWmC+goflretp55DHevdVZrKD5E1tzDQlvBFjcRTfeZ5cMffhu1HG9uwSakPMtGvWKBp57azHOKcCs72cW83krxyTwEb+q5U1ty3u1miPLbsA4FM1Sq0ss7cCy7b9r98RbmT55hcU1rUKu6dbgE4mvZgytZO7EXEaCO2OfHSCauhbjcYvZFmaazXw5xkywFayi/q9v7+bdvRCrZjbn2ow/1PmiLvU60Vc1G/jbNl9qWd77lWY3aGK+mPlotzBOpvPtA/FsxByS6q/dGCdB7y3IOQUa2rUut1wizTAfZ+jbBLOpTqf9X+OqL/PziD4ab3DniH4r55FgPnIY9OTpZg8cYP6mATwfaf9dZrnNnwCfBeJTwc6tO+lTE34gfdbqr6YWj1GdMV0ab9Usv8Q/nGuiT4Rs+wU/YWf22par7XfOR9FU53lNY++86bdjmZNWY7ii5eSvgXJPij6FeU4k81fgH+yuLfiWitbtVqZDbrWcFXw8M7RhDd4xCbYXuy9Tku+AqL6P8T6UZP4afR3GCR+tLI4HZiN2GOakFdwKa1ewR5W29/saWD7kTOqHoI/ctbH3sAZSVxSfdyy2M4VnZ+HnoO5JgCPrJHNeBX+W5fwsy3eOxL8xY4cAsy79mJdJfDKpb+gscwXv94lnKeYlE/1+rvPi0x/1nSF4IO/Wib6wvdfTw9a9Mmjb8fIJFuC7Wvp2Oe0kwqea7bEoY+pkf2tB2aT7JVqsaSvaNyR/LN8NURzmDbzvH6PzHWOQVNattO9Jzh60/aov3rX9vbXl6Zpl8RIn7I5nUdvjki23xnazoXVgHKPK+ou5ECVDZ8szM9/iwF/EWApr/mG7N3HQ7rY3tJxmO5mbQvy3Mv85YK4zv1O3VH/9Y/7HSdQPJUO02aKr8K0W+XEu51lScDHLKXqT5RupxngGtflHgMMbOk/wXCD+U02H72S2gnNm95tmb3Hmmd/2Pd7lhO+VNDs41tUv96F9LqheQxnXcULrA8ZhNOBIXlnG1Qi/ncujZHvEzuxLLDa7O3MHaV1aw7gmfduQc1bj8EnwDLag+uYzuh/tHKdyE80vudjG23xrhxzzVZ01W2VV2kzE53vT2//hXqlzdAJyrzUUzUj69QSPw/rWSTL3470twOT5vd13+9jeDKpKnVDf1rS3uubxnrK+HU77p3j+ZPfF/sBHgf4Tuxv7LM/dattXGLcsPivtXuoxi7dMpl1F/M9b7sF7eTbUt4XNT9rDcjEdoP0zyMn74KrLHOZmBxy5h2jxD03MN7fG8kJ/ae8jXEOdU9++ZetPcZ6dtafUR1l7JHM1yB/WgQWMKxZ+G22VgtdbTNT3vIOv/Xcc9vFDkrmWnftOo0LH9O1m5sQQzTmzVyfyfpPqtdfy++01P2w6Y/vF5zDv12i8/c13iIQvYb7OJxn7obK28E0rwbNMV3yVd34/Vvye5fK6zfwsd9t9rj74tjjoI7YLyBOjbydzTArf0uxOJeyMnMk5KPrnzZ/SgT4CffsGc4IJXmn5tTZY/vknLE54OmPyRT+B7Rn42L2PctgvklTuLabjHTXbxUK371ncb2WLne5rOQFymY9OPLNNNx5lZ6tP+Jao6K9lbhDZVVbSzqNvt9t59jLmCZH8N0LmbqJZZL7mHYwHBp5tcr/lM6nAGGDguUfEMO5aeu+VqEuIM3na/NQLbS+bz3tq4nkb39gN9jTzj7ezXB9JoJkh2W6nPib8j+aX3Mc3PdVH6zmvxb+XxT+PsHizlxgPoLrHU+cXzzPgGebIGsvVcNpy7bZkzlLJw8fMV6sdmvO+gPCNLB57DH12wg8xG+8NlhdiNe80Sea7Tc/ZC3yQrTG+Db6hXnaX52qLd3qUMWMqawXv+KuO9zInvOCHaecRzW3MUanz5nt8Ly/knGdeF53XhtgZarLZe5+zfE1V7e7kVXb3rZCdKRbwfSLRl6O+rfr2t3tbc/get/B77Rzxk93hutvsWimQOdirk+2+bR+bO+1Q9/BWxTKef1X3VuZv/cPysl4D+ouSYQHkLJ6v9wEtRjqZNijhb0I7lxPcmfMRcGSdZEwmYPLpybwBapMLdue3NWMMRF/Y3naZjrYKMTMrzVY5AWt+onheablYh/FsIj5d+M5aOMOiXiF+4C6eB4X/kXZFreGlubbgW+5ZsZC/m+qygnZC8WyAdgjjsJTlcDiFX6Fe2Za3dgXkD33RjbFA4MM5ci36N8SD9bf7boMYp6GyVjBXp2SYZHeOynFPl5xv0d6rck+AcIHol1kuprGgWaK2asG839JhStg90IFmT+vNc6j4XDQd4wm+bxX2PvggQnzsdLvLf4L7vnguZ/5DlduFc1/1+o73tYXfbvtdSYu/GsZzdPBlWDzMtWjzQ5Jtltn8Y+0dtHWM+4KvIRI7Qf+Xyl1uObWaYmwE2/gce/PlYeYAEf/j5rt80+IPuwAOOQoG2Ju8x3iG0jgsYvN9IO2o2u+y8G2++N9pMn9jbdiJPkfJXI9n8DAeLG/Jjcw9ojY8bXeUhlGfF/977KwdbeeIWnRUfyL7FXMpA474O/i2teDJtHcBjtw7YE5vwc9QrwZMO1gKfbLa157h+/vi2cniOmqDJsi21+4Oz7G3MHrTt6hv14E+5NB7l2dqlTvF3sLYwTevRb8H9Q377AuMHRL+KdPP68MW0Uf4x7jGqo4lGQco/k8zFkg071ks+l12D+Iq7teib4v2D2NyA+cj8JyPK7D+LBCf+3hPQXBrvtUY9Bzzsd5iuSWftlxkD/Ferb5Ns5jkemYnTLI3y5ZTV5dspexdzrE8Nwn/Is9HglvRpqR2+NzeWKlm75e1pZ1fMrRE+wT5C1n822uoS4ibnWJ+t34Ws1TR/EevMsZP5d7KnAzif4zjRDSfMN+gfBANUJdjollv6+1Q2rXEZzDfFxP8kd3H2cj4HH1blPcdRPOF3e8Ya3raC5ZHN4s24U9lU+VZWPAZnoUBR9YT2HV7Il9fRB7uEZL5ceYjBQ3xX9n69hJtGqJZZ7Fbr9pbacdQSOGbLn17n51nl1i+wT8Y4y3+pTkfAXM+vmbxn3G088jm9in3Nclch+NfZ+o1nHfCD+aaprr32Yw+Ff5Kuyf1gMXlbuedILVJf/qptTeNog9R37Y0W8dTvAen+j5hMdjNOa/lC15i9ziaMn5A/CfyDpHgeWZj6WQ6xjHua4otv9biuguabWGN3acYzPfrJWd1+v5CjlmzU9UwPSqN76iqzf+1+I0rWS/gOfeH8D6L5HzO7rEmMt+X9p0ipoueA2HIe/Ai37gX/9aWF+Ip+k/F8zDvSoimJvdQ9Xt/5i1RXbJoDw93ECymcR/vz4pmKPP/Cx4JnifFc6i99XOF5fKqyz1I9C3w66zo34YOcF6yDaLdXnW5jbYdlTuGOT0+U1tx7oQxQD8m8Px2Ee38Omufs7NhbeqWoilhOnYB6k7CX2tx++OsvldYvt+37S7DOoyBeMnzMucOYPZdAcjTFHDknpT5JorbPj7e1p9bOKckQzt7H/Ym2l2FX8k8z4Iv2p2sy+xNn8eY80rlXmP+tQR7w/Ea+jtAw75eaXFNze3e3/0We/Owxb2M4Z0F1fcfi1HPt3vHbe2t/A8gW5gvn/C+qmRLsljorzjOhc83/Kfmy74P7RZ0+/3md+jCsae1bqfdJWnIey7iOcdiWVtaPpyRfC9AdWnDO0eCfzQ/YyPoNotuVtwpbezhfVvzj9TBt1v0bQL25TD3+/INdMnQH2tgnmi+5Nkz+GLs/ZeyzMsq+ll2hh3IWCzBC+zu/GyL1TzH95I0Nhpyj9NZMg7tcEQ8l9AOLBkq2VuZfSFbvvDLbPx3pb1U3460XLKdmH9e5a5irIK+vc/88gUtH3Ut3ivX3L+efmqtz93MFzALsp0Vn6ssr2xT5j7SnOpuft71ZuefiLKiTioOljGugEn/Jv5YTvjraJsSPolvxACO+FPsfkeO5VW42+IHHrG8HzNtTr1s8Veb0Y/BHnKBc19lFWQONMARGz7nsspdy3N0BdmBGR+ld5+noE36SObf7b5Sb9QxRd8OYd5X8Xzc7vIctjNFMu+qiz7K9Od/zJ7Wy+7zfmnyP2l+wLa8Vyt5bqf9RzyXmg12uvkITlk+tz60gUjOXRaf08/uU/exXKlP8Fwp/rWZs138H7dz+ilbGy/a+jPB4iHzIexayXyeZ0b1RSl7x+dN9Eueyh2N9twjOR+g30Hf/kr7g8bhBMZ7i6Y5Y10kZzrt6qIfS71a+P32zstexvDo22KW82Er9UnhH+J81LcjGAP2uc4m9u7YL2j/wsCTZjPflxHNZuYv0j3NOsDHCj+KuXxV3x2MY5HuWtpsgFstZnsufUzC34X2Lwc+5DmGc0fwQdPPh9k90JnmE1lvNt4Myyc2EfWKl2y1IVuwaTxoukEM86urjnVN/ml8+17fbuf8Ek0J5gmUbK3sDZps5irRvOjledJ4J1c27f6Wy+Jl2njDG1vmm76VdyRV7vW2p9ews89kvttbTWOD+WBFP9byDKxi/I/wDfgejXyCd1PPl/w1aPsFTHtOFcuz3c3ufffiuUb7S3XGOYv/NXbe30U7j3gu5FlSbXWU95jUd/fynpfk2cX1SH3Rw3IepnFflo/4c8asimcWvl2ib8vybTXAkfWZYyzkmuNbG5LnBouV3cb5KHmiLLdwa+aFEP5Ky1W4k/GloVyzE5ajb0X62GzLrZRrtosvGLegb0vz/Wu9AzXT3paazTsFkuFTey+yHW19IaaFsQfis8DyBx5kvKVo/qAdRvJ3w5g8E2DOa8E/WizuSL6V9oVyBkLvnaf3/dubPbwy11XRzDXb7EbGrwJP+r6mm9U1O/xj9L3qDawbuJaKvglzjonnM4yZF34u92XArONZ5qUXTXWzR31l+VUe4TtcWsdiTB9oyxg5fTufcapq2ydMD7zfbCAz7I7zdPP9TaVbI+TVhIBJki2L+WAl81TGGeocUZdvUIp+NX2ykmGQxWY0svzbPU2HHMFYDvEfYndhyqOtBojPn9a/fe2dtWYoN+iT3c2uXox36iXnG7yTJT7bLN/vFIyBLOEXW76jhmavXsxzpWhusVwfAxnDGeIbGe8h+d+3+wvjLH7sY4udSGRcltrhL7Mh1LI8G49wT5Q80+z8Oxlv6Iez2DK7S3KH5VV7BX0U2qQy30yRzf9evmEkmcvbO5s96YdSHa+0GOPhlne9lsW4xti9m7U8C6suN1hs6kHeYRfNm4DDfG9EHUb98p3Fh4+zvTvKYoca0J8l+gf5Rq3aOdVie/pxPZS+Pdja5DDPFKrX+ygr7Hfr7bxWgnd5xL+B5UN+ibnIJH9Pi8e41+IqG1gul8uYE0AyPMm7POKZxvg0yVDHcuX1g85/SPho3E07DDgSJ2Y2yWT0Ub7qu4R5sQTPoT9acAveyxb8Fe8Xq51r2Tl3E+VUPFgj5lEPsTfm32/Pu1ca2++Yzlnb7mZuYn4D1WuEvdk6grGap7T/WtvezXhL4HnO7eA5u0xf/cj87Av5BgroI29SQM4wB3+zu4T32B3nl+ljUrmn7f30M+bjyKEtQrbfZHsTpAxkSMS3kVhN3tvV2WeP+Z6a830f+VC+5T04yZZue/EW6h6S4Re7V/Wv7U3jqbOprFVcG0Vfk/ZtwaOZe0f8n0M7BN27nNkJm1jsYnPLx3Kv9WMNuzM1wfJA5jFWTWUlM/YyvKNq++9E80nVoP1N9N9A5qTwLpvlSehv9skRZotLpH1D/T4MMueo7jvwrtACwdfbPdnR9rbsYsaqqdwdllN0gN1xexYMVohmNv3U4lke324AzHnUl7kORLObsSWi2UdfsMrKM5ve/ZDzgGgm27uZ+5mHRHz+YB5v9dF42j2En2N+twlcx0QTwzO15PmZa5rwD1vMfGGLVVtl56xmvKev9aQe74yfVu4Ii4f8xnz6exhLCZrIusE8+cJPtJxLve3t48dYR82prpZrdL75Lx6xOMy77T2LAszbI3keNh/fFWbb6YT5Gy+aKyymtwXPNWGcmE3jXYslTkJdEvEt9fCltv6UsHFyHdqzverbBLprJ8ARvdHuFPTgXBPNUMgQdJ4RtOMJX8psZd2tHWbQNoL36yNrr/k+htEOoG9f5xxRudNAnyE43nJ09wJ9ltrhfsbDa82fZnkFv7P3FOpbzt4hvDcqnq3RpyHeuKG9Y/WXvXf8rb2F/YP5x1+1M2NHxvyoDdeZDaQu1oEZqtc8e/vgPebbke/1FN8p07lsnq0DD9LHrbl8xM4UhWysnrQcUNvsbHKabygLP9befxnLWFnVPZVnQ9EMYjyb5NxseTJ3WazCYPra9O11puf8ZjFI2xjrIpqadjdtNNoh0LxgdsiLXGfUjy/R3qhv/7I1cDx1BtHs4Y/gCxZvXM/G+R7PywE5D6le9dCeQSfPZfuITw3GtwgubXaYeywWaxDf1dIc32V33B5Avc5pH/mQZ95wf9zijh6mX0D1Gk4dQ/KsZ1/oTly8nb8e5J0O0R+yMZZjfvAyZvvdYnM2y2xi5y1+soD5Q88wpkX85zKvjs7sv1EPCWuL5VFsZb6/vbwzojcrC9Mm+eWl9WQJ18bwJgLP8sBH2p9lKV7rDO0twPPbt6g7Ce5KfUP0MebTOWV3tT63HDvFzG/YmW8Q6Ns1PN8JLgX6EOf5FXUMlfUh41cFR5tt/3vmYAc+8nY/c55Ip7qDtqxCit01n/gBzlnxOcX6yvaSxPtNGj+pFitSnH468b9Ie7vkXGR3A59krhvhE6mPqe4z7a2ly0z/LGtj7E36rWrI5sbzl/h8xnc91P5TuE5K5rUWq3Y/350X/WnGrgSYeUVkS29CP77Kepd+RvXRB9z3hR9vOUOW2d2i3+mzU3xmBvUWydDRbEczLEffh3ZHPod5BiTPY3aWzOA9EeF78iysd1huZ1xByF9kZ8mnuXaJPpZrlOBOjAWVPMPpQ1QfJdKHKPgo/fuiv5W5AoRvZWe6JPw6Ij776I8QzMd7Tgp+m349jaufIPMZ8alNG6D4n+C5Q/R3sh/Vd3Nt7+gKfJhfcbyXLfqPLBd6C8bthJwktiZM4vv1X0n3g5yh3EJmE6tg8SdlaEvRXDtgvqfJ9oZsc8sLlGRzagNtNSprN88sgCNzhHXRnYs49HusaJ7nG46AI2dYs6U8x7gafVvO9tnHLYZwjJ2P5jGHm/hMY55JwBHfJWRoL/gH80NtYsyq6F+1e8QjzbbTyOKBqzA2WzI3Yxyp4EzOa8l5ueXuqM/xKd0pDTJkqaw/zV/wLPhME58Jpp/vNjmfNnvy1bz/orIepP9R8DHGG6hNitjZvLidrR4zv/y/tANInvssR/GnFmNfyM7vhW39acR5rW8X2X2fQYxhU1ulm83nVatvU/DZIpmzmXND68ME5tWRrnUPdQzxH8icq5JnjeVuirfcmOMYE6Xx39n05wF8619lPWQ2nzb2Ztmzdj/rEH4dEn0KzyaSYZW1YWPLy5Fp9tvepgu9QjuedPsUi9nowrsw4l/V4rqP292Bc/Y24nv06SgeoCbWk9P6dqzF8T5u+m0jO6NlMZd4eHcDc/+MxtUCu/tzF3Pga6+cbHbaIXbn6xU/v9Dvo7F6hcVwtsF4OCd8EcY2hPeCLR7mUVuTc82PMJG2btXrCOeO5GzFXIWKXXnYfMSzLH9mHvUWfbuAc7OE5injvqTDHwSi8Ne6D8h4CcFt7N70aOoVwEdiV8wH18XmYx3mLQFNJBaFfh/BM80vU8LmyEnTZ2aBvrrot1ourMbMwSh74GCLLRlCvUj0W2xvPc83jkNctMn2sef041kP33Ktu8zy2V5meewHMSdPeMeEb5OprN+trzMYY6Y2yeObqip3mr0LP9viwVbgTdJO4hNtsRlHGGsqX1Ixa58Zdo/pWt4hwre0bwy0u2PNzIaw0853bZkrQ/3YjrqNyh1g7xTfZfbbkrQnq02mMx5YcLz5aofT3q76zjfdIMbuhz4I+YPfrTP6LrzR0NXONbG0S0h3Omvn0JsZMyyZd9p5rRRzC2sP3cX7X6rLLYw/lDwP2lvw+VznwxnHYhGr2L2na2mfUR1Xc28Idh57y6+zvYlzwPSED+xc+azFPwwy+8Zz9ENJttlW920Wm5Fsvo8xkPmY6D9g/J74p1luhDl8K0dnk1/tzgLrwP+SBPOnJdcH6mQ8x+vvkXWIY4Njgu1HWz33S8YC0594KVURr8tG8HRX8f9MMdWM9pjUmKgE/FyLn79SYqK+wM8O/CzETzp+muCnDH5+HRQTlYefwpH/ChQoXDiq5ZLNb0RdXqKDJLktqmUuEWuKBEyHkWOT04emxA1OTx6SGTUoa3xchWZxY7IzszJTB2XUqVd/eO3+YxP6J/av3X/QqJFZqeOz+o8c1T9jTOqgUSMyojJT0wfHZaVmZsUNTh6anpoS1XbUmListKGZcZnJIzLSU6tf+kf9ujUGTshKjcvMGjN05JC4cUPT0+MGpsZlZ6amxCVnxg0dmZGdFZeSnJUcFR8RI65yXNc2t3ZC6bfX7t+2Y8t2Xft369WpTf87Wna9vUpcs2b/819vveuOTl3adO3a4a47Idig4akTWJU7u3fsGJWRPdD/OSo7iyWGf14q/7/+MT115H8wmUOHODwyOSt7TOp/MGgKNN9//bp+4n9lbv8ekTkkLTkzrW6d/8agebO4hLjKleMu/atps7i6Uf9jL6QOGpGdnvWfzhia2X9g9tD0rPjK6LoazcNfs8ZX+f9+PiR15P/CIkJBNhX+Rz6DU/ndxNQxo+IrD0mt0RyEVf9vy6Ey8f/PrmzVoZv3VZW4FnF162bHNY6rXy+7Ckbopf/aR7W8kIuRWqBAVMvV2wBUODd3/Ju7fyherUjVkxnz6/x5Q6eDBypsGldt3cc7iz7x7fBTraZFtZy2HYR3Lil74ep7pheMWrX4wS/yt18RdXF5wWKXz74yqk+Vor0P7r48Kv+PKYNfnMAUbDF/zT9SLOrA0pbd0+YWjtpZ9u8NxUteGbV/310nureNjnqy8rgTjSHHSXJN6JaGATwoOT15TNzgMMrHx+FX9sjhI0eNGym5kTTh33//+ffff6NabtyB72IiF6zgZ3njRI0vfnvtlmLgR3zsD7tfrzVmzRVRBVtfzL58cYGomzq3QVVzduJvSS1b1j8yr1/BqL9fKDT3/LAro/K37gbLq6LAFv+F/2OxidAdbfHDtIp7l2W+UPW7S39A2e+STzmV/dKd4zYtjfo58dJlL65HLRfsUtvmEYh55fS+yzZO7TYqPufKAh9MufV0VMvjxK8vUP3ubc02vJX64YjErGIHL4ufy5r5f7VzP26zLO6RM1PfODM6du6mZmW+m7Hw9IL0M28NP/ZUhaOzEkZPPTB3687RZV4t+uvKLcVLVTzw3woas/em6yY/WvCz8YOnx31bsWap3imlcgqWr7zuZEKf/R2fHtT1hwKLR8enl4gq3Wdpz1qdi0V1OLfim8TE6KhvJ7T+quhobJ2p1YZ9MxH1eY71KRvVckMEKBfVcg+B0pHnSNUzhM8sKhU1uETGmFEp2YNSx2QWiAY4KDUTKxGWqELR3Qdmj8zKjhuUnjxySMnaiTUTaibUqJ0dQdauWbvouOR0zIaiCTVrN6qZED0uOXNEjYFDR6ZgrpRKqFmnZoNGcfGNBiakJCYMapBcJariVVnJY4akZmGyRJaMzALVrhqRnZU8MD21xpD0UQOT0zP/D6UhBWI="},10467:(e,t,n)=>{"use strict";function r(e,t,n,r,a,i,s){try{var o=e[i](s),c=o.value}catch(e){return void n(e)}o.done?t(c):Promise.resolve(c).then(r,a)}function a(e){return function(){var t=this,n=arguments;return new Promise((function(a,i){var s=e.apply(t,n);function o(e){r(s,a,i,o,c,"next",e)}function c(e){r(s,a,i,o,c,"throw",e)}o(void 0)}))}}n.d(t,{A:()=>a})},90675:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(82284);function a(){a=function(){return t};var e,t={},n=Object.prototype,i=n.hasOwnProperty,s=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},c=o.iterator||"@@iterator",d=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function f(e,t,n,r){var a=t&&t.prototype instanceof g?t:g,i=Object.create(a.prototype),o=new O(r||[]);return s(i,"_invoke",{value:M(e,n,o)}),i}function p(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=f;var h="suspendedStart",b="suspendedYield",m="executing",y="completed",x={};function g(){}function v(){}function w(){}var V={};l(V,c,(function(){return this}));var T=Object.getPrototypeOf,S=T&&T(T(A([])));S&&S!==n&&i.call(S,c)&&(V=S);var k=w.prototype=g.prototype=Object.create(V);function _(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function n(a,s,o,c){var d=p(e[a],e,s);if("throw"!==d.type){var u=d.arg,l=u.value;return l&&"object"==(0,r.A)(l)&&i.call(l,"__await")?t.resolve(l.__await).then((function(e){n("next",e,o,c)}),(function(e){n("throw",e,o,c)})):t.resolve(l).then((function(e){u.value=e,o(u)}),(function(e){return n("throw",e,o,c)}))}c(d.arg)}var a;s(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,a){n(e,r,t,a)}))}return a=a?a.then(i,i):i()}})}function M(t,n,r){var a=h;return function(i,s){if(a===m)throw Error("Generator is already running");if(a===y){if("throw"===i)throw s;return{value:e,done:!0}}for(r.method=i,r.arg=s;;){var o=r.delegate;if(o){var c=I(o,r);if(c){if(c===x)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(a===h)throw a=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);a=m;var d=p(t,n,r);if("normal"===d.type){if(a=r.done?y:b,d.arg===x)continue;return{value:d.arg,done:r.done}}"throw"===d.type&&(a=y,r.method="throw",r.arg=d.arg)}}}function I(t,n){var r=n.method,a=t.iterator[r];if(a===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,I(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),x;var i=p(a,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,x;var s=i.arg;return s?s.done?(n[t.resultName]=s.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,x):s:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,x)}function N(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(N,this),this.reset(!0)}function A(t){if(t||""===t){var n=t[c];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,s=function n(){for(;++a=0;--a){var s=this.tryEntries[a],o=s.completion;if("root"===s.tryLoc)return r("end");if(s.tryLoc<=this.prev){var c=i.call(s,"catchLoc"),d=i.call(s,"finallyLoc");if(c&&d){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),E(n),x}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var a=r.arg;E(n)}return a}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:A(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),x}},t}},28453:(e,t,n)=>{"use strict";n.d(t,{R:()=>s,x:()=>o});var r=n(96540);const a={},i=r.createContext(a);function s(e){const t=r.useContext(i);return r.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:s(e.components),r.createElement(i.Provider,{value:t},e.children)}},2026:(e,t,n)=>{"use strict";n.d(t,{G:()=>yV});var r={};n.r(r),n.d(r,{aK:()=>Dc,e8:()=>kc,DO:()=>Sc,dJ:()=>qc,OG:()=>jc,My:()=>Pc,Ph:()=>Ac,lX:()=>Cc,Id:()=>Lc,fg:()=>Wc,qj:()=>Bc,aT:()=>Oc,r4:()=>Uc,aY:()=>Tc,x:()=>Kc,lq:()=>Hc,z:()=>Rc,zW:()=>Mc,Q5:()=>Gc});var a={};n.r(a),n.d(a,{BitVec:()=>Fd,Bool:()=>jo,Bytes:()=>sr,Data:()=>lu,F32:()=>Wd,F64:()=>Zd,GeneralExtrinsic:()=>Ss,GenericAccountId:()=>mo,GenericAccountId32:()=>mo,GenericAccountId33:()=>yo,GenericAccountIndex:()=>To,GenericAddress:()=>qo,GenericBlock:()=>So,GenericCall:()=>Mo,GenericChainProperties:()=>Eo,GenericConsensusEngineId:()=>Bo,GenericEthereumAccountId:()=>zd,GenericEthereumLookupSource:()=>qd,GenericEvent:()=>zi,GenericEventData:()=>Li,GenericExtrinsic:()=>$i,GenericExtrinsicEra:()=>ss,GenericExtrinsicPayload:()=>ds,GenericExtrinsicPayloadUnknown:()=>us,GenericExtrinsicPayloadV4:()=>bs,GenericExtrinsicPayloadV5:()=>vs,GenericExtrinsicSignatureV4:()=>xs,GenericExtrinsicSignatureV5:()=>Ts,GenericExtrinsicUnknown:()=>ls,GenericExtrinsicV4:()=>hs,GenericExtrinsicV5:()=>gs,GenericImmortalEra:()=>as,GenericLookupSource:()=>Uo,GenericMortalEra:()=>is,GenericMultiAddress:()=>qo,GenericSignerPayload:()=>ps,GenericVote:()=>Zo,I128:()=>Qd,I16:()=>Kd,I256:()=>$d,I32:()=>Jd,I64:()=>Yd,I8:()=>Gd,ISize:()=>eu,Null:()=>Jt,OptionBool:()=>tu,StorageKey:()=>mu,Text:()=>ru,Type:()=>au,U128:()=>ou,U16:()=>su,U256:()=>cu,U32:()=>xo,U64:()=>es,U8:()=>iu,USize:()=>du,bool:()=>jo,f32:()=>Wd,f64:()=>Zd,i128:()=>Qd,i16:()=>Kd,i256:()=>$d,i32:()=>Jd,i64:()=>Yd,i8:()=>Gd,isize:()=>eu,u128:()=>ou,u16:()=>su,u256:()=>cu,u32:()=>xo,u64:()=>es,u8:()=>iu,usize:()=>du});var i={};n.r(i),n.d(i,{assetConversion:()=>Nu,assets:()=>Eu,attestations:()=>Cl,aura:()=>Ou,author:()=>mf,authorship:()=>Au,babe:()=>Hu,balances:()=>Ru,beefy:()=>zu,benchmark:()=>Uu,blockbuilder:()=>Xu,bridges:()=>Hl,chain:()=>yf,childstate:()=>xf,claims:()=>Rl,collective:()=>Wu,consensus:()=>Zu,contracts:()=>Ku,contractsAbi:()=>df,crowdloan:()=>Bl,cumulus:()=>Ll,democracy:()=>Ju,dev:()=>Yu,discovery:()=>Qu,dryRunApi:()=>nf,elections:()=>$u,engine:()=>el,eth:()=>lf,evm:()=>tl,extrinsics:()=>nl,finality:()=>Ul,fungibles:()=>rl,genericAsset:()=>al,genesisBuilder:()=>il,gilt:()=>sl,grandpa:()=>cl,identity:()=>dl,imOnline:()=>ul,lottery:()=>ll,metadata:()=>vu,mixnet:()=>fl,mmr:()=>pl,nfts:()=>hl,nimbus:()=>ff,nompools:()=>bl,offchain:()=>gf,offences:()=>ml,ormlOracle:()=>pf,ormlTokens:()=>hf,parachains:()=>$l,payment:()=>kf,poll:()=>ef,pow:()=>yl,proxy:()=>xl,purchase:()=>tf,recovery:()=>gl,rpc:()=>bf,runtime:()=>Mu,scaleInfo:()=>Iu,scheduler:()=>vl,session:()=>wl,society:()=>Vl,staking:()=>Tl,state:()=>_f,statement:()=>Sl,support:()=>kl,syncstate:()=>_l,system:()=>Pl,treasury:()=>Ml,txpayment:()=>Il,txqueue:()=>Nl,uniques:()=>El,utility:()=>Ol,vesting:()=>Al,xcm:()=>sf,xcmPaymentApi:()=>of,xcmRuntimeApi:()=>cf});var s={};n.r(s),n.d(s,{kusama:()=>vh,polkadot:()=>wh,westend:()=>Vh});var o={};n.r(o),n.d(o,{_flags:()=>Tb,_identity:()=>Eb,accountId:()=>Vb,flags:()=>Sb,hasIdentity:()=>Ab,hasIdentityMulti:()=>Cb,idAndIndex:()=>kb,idToIndex:()=>Hb,identity:()=>Ob,indexToId:()=>qb,indexes:()=>Db,info:()=>Fb});var c={};n.r(c),n.d(c,{hasProposals:()=>nm,members:()=>tm,prime:()=>om,proposal:()=>rm,proposalCount:()=>am,proposalHashes:()=>im,proposals:()=>sm});var d={};n.r(d),n.d(d,{_getIds:()=>dm,all:()=>um,expand:()=>fm,get:()=>lm,getExpanded:()=>pm,listNodes:()=>bm});var u={};n.r(u),n.d(u,{account:()=>Am,all:()=>_m,votingBalance:()=>Hm,votingBalances:()=>Cm});var l={};n.r(l),n.d(l,{bounties:()=>Lm});var f={};n.r(f),n.d(f,{_getHeaderRange:()=>Qm,bestNumber:()=>jm,bestNumberFinalized:()=>Fm,bestNumberLag:()=>Xm,getBlock:()=>Zm,getBlockByNumber:()=>Gm,getHeader:()=>Jm,subscribeFinalizedBlocks:()=>Ym,subscribeFinalizedHeads:()=>$m,subscribeNewBlocks:()=>ey,subscribeNewHeads:()=>ty});var p={};n.r(p),n.d(p,{fees:()=>ny});var h={};n.r(h),n.d(h,{hasProposals:()=>dy,members:()=>cy,prime:()=>hy,proposal:()=>uy,proposalCount:()=>ly,proposalHashes:()=>fy,proposals:()=>py,votes:()=>sy,votesOf:()=>oy});var b={};n.r(b),n.d(b,{childKey:()=>by,contributions:()=>Vy,ownContributions:()=>ky});var m={};n.r(m),n.d(m,{_referendumInfo:()=>tx,_referendumVotes:()=>$y,_referendumsVotes:()=>ex,dispatchQueue:()=>Hy,locks:()=>Ly,nextExternal:()=>zy,preimage:()=>Fy,preimages:()=>jy,proposals:()=>Wy,referendumIds:()=>Zy,referendums:()=>Gy,referendumsActive:()=>Ky,referendumsFinished:()=>Jy,referendumsInfo:()=>nx,sqrtElectorate:()=>rx});var y={};n.r(y),n.d(y,{info:()=>ox});var x={};n.r(x),n.d(x,{receivedHeartbeats:()=>dx});var g={};n.r(g),n.d(g,{hasProposals:()=>lx,members:()=>ux,prime:()=>mx,proposal:()=>fx,proposalCount:()=>px,proposalHashes:()=>hx,proposals:()=>bx});var v={};n.r(v),n.d(v,{info:()=>vx,overview:()=>Vx});var w={};n.r(w),n.d(w,{eraLength:()=>Mx,eraProgress:()=>Ix,indexes:()=>Sx,info:()=>kx,progress:()=>Px,sessionProgress:()=>Nx});var V={};n.r(V),n.d(V,{_members:()=>Cx,candidates:()=>Ex,info:()=>Ox,member:()=>Ax,members:()=>Hx});var T={};n.r(T),n.d(T,{_eraExposure:()=>ag,_eraPrefs:()=>hg,_eraSlashes:()=>Vg,_erasExposure:()=>sg,_erasPoints:()=>lg,_erasPrefs:()=>mg,_erasRewards:()=>gg,_erasSlashes:()=>Sg,_ownExposures:()=>Ig,_ownSlashes:()=>Og,_stakerExposures:()=>Ug,_stakerPoints:()=>jg,_stakerPrefs:()=>Xg,_stakerRewards:()=>Jg,_stakerRewardsEras:()=>Kg,_stakerSlashes:()=>ev,account:()=>Ux,accounts:()=>zx,currentPoints:()=>Dx,electedInfo:()=>jx,eraExposure:()=>ig,eraPrefs:()=>bg,eraSlashes:()=>Tg,erasExposure:()=>og,erasHistoric:()=>cg,erasPoints:()=>fg,erasPrefs:()=>yg,erasRewards:()=>vg,erasSlashes:()=>kg,keys:()=>_g,keysMulti:()=>Pg,nextElected:()=>rv,overview:()=>Mg,ownExposure:()=>Ng,ownExposures:()=>Eg,ownSlash:()=>Ag,ownSlashes:()=>Cg,query:()=>Lg,queryMulti:()=>zg,stakerExposure:()=>qg,stakerExposures:()=>Dg,stakerPoints:()=>Fg,stakerPrefs:()=>Wg,stakerRewards:()=>Yg,stakerRewardsMulti:()=>$g,stakerRewardsMultiEras:()=>Qg,stakerSlashes:()=>tv,stashes:()=>nv,validators:()=>av,waitingInfo:()=>sv});var S={};n.r(S),n.d(S,{hasProposals:()=>cv,members:()=>ov,prime:()=>pv,proposal:()=>dv,proposalCount:()=>uv,proposalHashes:()=>lv,proposals:()=>fv});var k={};n.r(k),n.d(k,{proposals:()=>hv});var _={};n.r(_),n.d(_,{events:()=>bv,signingInfo:()=>Sv});var P=n(56199),M=n(76284),I=n(25311),N=n(82422),E=n(79931);const O="@polkadot/api",A=(new URL("file:///home/runner/work/polkadot-wiki/polkadot-wiki/node_modules/@polkadot/api/packageInfo.js").pathname.substring(0,new URL("file:///home/runner/work/polkadot-wiki/polkadot-wiki/node_modules/@polkadot/api/packageInfo.js").pathname.lastIndexOf("/")+1),"14.2.2");function C(e,t){return e.findMetaCall((0,E.e)(t))}function H(e,t){return e.findMetaError((0,E.e)(t))}function R(e){var t=e((function(e){Error.call(e),e.stack=(new Error).stack}));return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var B=R((function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}})),L=n(31635);function z(e){return"function"==typeof e}var U=R((function(e){return function(t){e(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map((function(e,t){return t+1+") "+e.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=t}}));function D(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var q=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var e,t,n,r,a;if(!this.closed){this.closed=!0;var i=this._parentage;if(i)if(this._parentage=null,Array.isArray(i))try{for(var s=(0,L.__values)(i),o=s.next();!o.done;o=s.next()){o.value.remove(this)}}catch(p){e={error:p}}finally{try{o&&!o.done&&(t=s.return)&&t.call(s)}finally{if(e)throw e.error}}else i.remove(this);var c=this.initialTeardown;if(z(c))try{c()}catch(h){a=h instanceof U?h.errors:[h]}var d=this._finalizers;if(d){this._finalizers=null;try{for(var u=(0,L.__values)(d),l=u.next();!l.done;l=u.next()){var f=l.value;try{X(f)}catch(b){a=null!=a?a:[],b instanceof U?a=(0,L.__spreadArray)((0,L.__spreadArray)([],(0,L.__read)(a)),(0,L.__read)(b.errors)):a.push(b)}}}catch(m){n={error:m}}finally{try{l&&!l.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}}if(a)throw new U(a)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)X(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=null!==(n=this._finalizers)&&void 0!==n?n:[]).push(t)}},e.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},e.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},e.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&D(t,e)},e.prototype.remove=function(t){var n=this._finalizers;n&&D(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}(),j=q.EMPTY;function F(e){return e instanceof q||e&&"closed"in e&&z(e.remove)&&z(e.add)&&z(e.unsubscribe)}function X(e){z(e)?e():e.unsubscribe()}var W={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Z={setTimeout:function(e,t){for(var n=[],r=2;r{return n=t,!Array.isArray(n)||2!==n.length||function(e,t){return(0,Fe.b)(e)||(We(e)?!e.eq(t):e!==t)}(e.get(t[0]),t[1]);var n}))}function Ge(e,t){return Array.isArray(t)?Ze(e,t):t instanceof Map?Ze(e,[...t.entries()]):!!(0,Xe.G)(t)&&Ze(e,Object.entries(t))}class Ke extends Map{registry;createdAtHash;initialU8aLength;isStorageFallback;constructor(e,t){const n=function(e){return Object.entries(e||{})}(t);super(n),this.registry=e,De(this,n.map((([e])=>e)),(e=>this.get(e)))}get encodedLength(){return 0}get hash(){return this.registry.hash(this.toU8a())}get isEmpty(){return 0===[...this.keys()].length}eq(e){return Ge(this,e)}getT(e){return this.get(e)}inspect(){throw new Error("Unimplemented")}toHex(){throw new Error("Unimplemented")}toHuman(){return[...this.entries()].reduce(((e,[t,n])=>(e[t]=(0,qe.T)(n?.toHuman)?n.toHuman():n,e)),{})}toJSON(){return[...this.entries()].reduce(((e,[t,n])=>(e[t]=n,e)),{})}toPrimitive(e){return[...this.entries()].reduce(((t,[n,r])=>(t[n]=(0,qe.T)(r.toPrimitive)?r.toPrimitive(e):r,t)),{})}toRawType(){return"Json"}toString(){return(0,je.A)(this.toJSON())}toU8a(e){throw new Error("Unimplemented")}}var Je=n(74749);function Ye(e){for(let t=0,n=e.length;t126)return!1}return!0}function Qe(e){return(0,I.K)(e)?(0,Je.qv)(e)?Ye((0,E.e)(e)):function(e){for(let t=0,n=e.length;t126)return!1}return!0}(e):!!e&&Ye(e)}var $e=n(75487);class et{__encoding;constructor(e){this.__encoding=e}decode(e){let t="";for(let n=0,r=e.length;n!!e)))}get isUtf8(){return function(e){if(!e)return(0,I.K)(e);const t=(0,E.e)(e),n=t.length;let r=0;for(;r=194&&t[r]<=223){if(!(r+1191)return!1;r+=2}else if(224===t[r]){if(!(r+2191)return!1;if(t[r+2]<128||t[r+2]>191)return!1;r+=3}else if(t[r]>=225&&t[r]<=236){if(!(r+2191)return!1;if(t[r+2]<128||t[r+2]>191)return!1;r+=3}else if(237===t[r]){if(!(r+2159)return!1;if(t[r+2]<128||t[r+2]>191)return!1;r+=3}else if(t[r]>=238&&t[r]<=239){if(!(r+2191)return!1;if(t[r+2]<128||t[r+2]>191)return!1;r+=3}else if(240===t[r]){if(!(r+3191)return!1;if(t[r+2]<128||t[r+2]>191)return!1;if(t[r+3]<128||t[r+3]>191)return!1;r+=4}else if(t[r]>=241&&t[r]<=243){if(!(r+3191)return!1;if(t[r+2]<128||t[r+2]>191)return!1;if(t[r+3]<128||t[r+3]>191)return!1;r+=4}else{if(244!==t[r])return!1;if(!(r+3143)return!1;if(t[r+2]<128||t[r+2]>191)return!1;if(t[r+3]<128||t[r+3]>191)return!1;r+=4}return!0}(this)}bitLength(){return 8*this.length}eq(e){return e instanceof Uint8Array?this.length===e.length&&!this.some(((t,n)=>t!==e[n])):this.eq((0,E.e)(e))}inspect(){return{outer:[this.toU8a()]}}toHex(){return(0,N.X)(this)}toHuman(e,t){return this.toPrimitive(t)}toJSON(){return this.toHex()}toPrimitive(e){if(!e&&this.isAscii){const e=this.toUtf8();if(Qe(e))return e}return this.toJSON()}toRawType(){return"Raw"}toString(){return this.toHex()}toU8a(e){return Uint8Array.from(this)}toUtf8(){if(!this.isUtf8)throw new Error("The character sequence is not a valid Utf8 string");return nt(this)}}class at{registry;createdAtHash;isStorageFallback;__internal__neverError;constructor(e,t="DoNotConstruct"){throw this.registry=e,this.__internal__neverError=new Error(`DoNotConstruct: Cannot construct unknown type ${t}`),this.__internal__neverError}static with(e){return class extends at{constructor(t){super(t,e)}}}get encodedLength(){throw this.__internal__neverError}get hash(){throw this.__internal__neverError}get isEmpty(){throw this.__internal__neverError}eq(){throw this.__internal__neverError}inspect(){throw this.__internal__neverError}toHex(){throw this.__internal__neverError}toHuman(){throw this.__internal__neverError}toJSON(){throw this.__internal__neverError}toPrimitive(){throw this.__internal__neverError}toRawType(){throw this.__internal__neverError}toString(){throw this.__internal__neverError}toU8a(){throw this.__internal__neverError}}var it=n(52502),st=n(39404);function ot(e,{isLe:t=!0,isNegative:n=!1}={}){t||(e=e.slice().reverse());const r=e.length;if(n&&r&&128&e[r-1])switch(r){case 0:return new st(0);case 1:return new st(-1*(255^e[0])-1);case 2:return new st(-1*(e[0]+(e[1]<<8)^65535)-1);case 3:return new st(-1*(e[0]+(e[1]<<8)+(e[2]<<16)^16777215)-1);case 4:return new st(-1*(e[0]+(e[1]<<8)+(e[2]<<16)+16777216*e[3]^4294967295)-1);case 5:return new st(-1*((e[0]+(e[1]<<8)+(e[2]<<16)+16777216*e[3]^4294967295)+4294967296*(255^e[4]))-1);case 6:return new st(-1*((e[0]+(e[1]<<8)+(e[2]<<16)+16777216*e[3]^4294967295)+4294967296*(e[4]+(e[5]<<8)^65535))-1);default:return new st(e,"le").fromTwos(8*r)}switch(r){case 0:return new st(0);case 1:return new st(e[0]);case 2:return new st(e[0]+(e[1]<<8));case 3:return new st(e[0]+(e[1]<<8)+(e[2]<<16));case 4:return new st(e[0]+(e[1]<<8)+(e[2]<<16)+16777216*e[3]);case 5:return new st(e[0]+(e[1]<<8)+(e[2]<<16)+16777216*(e[3]+(e[4]<<8)));case 6:return new st(e[0]+(e[1]<<8)+(e[2]<<16)+16777216*(e[3]+(e[4]<<8)+(e[5]<<16)));default:return new st(e,"le")}}function ct(e){const t=(0,E.e)(e);switch(3&t[0]){case 0:return[1,new st(t[0]>>>2)];case 1:return[2,new st(t[0]+(t[1]<<8)>>>2)];case 2:return[4,new st(t[0]+(t[1]<<8)+(t[2]<<16)+16777216*t[3]>>>2)];default:{const e=5+(t[0]>>>2);switch(e){case 5:return[5,new st(t[1]+(t[2]<<8)+(t[3]<<16)+16777216*t[4])];case 6:return[6,new st(t[1]+(t[2]<<8)+(t[3]<<16)+16777216*(t[4]+(t[5]<<8)))];case 7:return[7,new st(t[1]+(t[2]<<8)+(t[3]<<16)+16777216*(t[4]+(t[5]<<8)+(t[6]<<16)))];default:return[e,ot(t.subarray(1,e))]}}}}function dt(e){switch(3&e[0]){case 0:return[1,e[0]>>>2];case 1:return[2,e[0]+(e[1]<<8)>>>2];case 2:return[4,e[0]+(e[1]<<8)+(e[2]<<16)+16777216*e[3]>>>2];default:switch(5+(e[0]>>>2)){case 5:return[5,e[1]+(e[2]<<8)+(e[3]<<16)+16777216*e[4]];case 6:return[6,e[1]+(e[2]<<8)+(e[3]<<16)+16777216*(e[4]+(e[5]<<8))];case 7:return[7,e[1]+(e[2]<<8)+(e[3]<<16)+16777216*(e[4]+(e[5]<<8)+(e[6]<<16))];default:throw new Error("Compact input is > Number.MAX_SAFE_INTEGER")}}}var ut=n(336);const lt=new st(0),ft=new st(1),pt=new st(2),ht=new st(100),bt=new st(1e6),mt=new st(1e9),yt=mt.mul(mt),xt=new st(Number.MAX_SAFE_INTEGER),gt=new st(94906265);function vt(e,{isLe:t=!1,isNegative:n=!1}={}){if(!e||"0x"===e)return new st(0);const r=function(e){if(!e||"0x"===e)return"";if(Je.eR.test(e))return e.substring(2);if(Je.Ed.test(e))return e;throw new Error(`Expected hex value to convert, found '${e}'`)}(e),a=new st(r,16,t?"le":"be");return n?a.fromTwos(4*r.length):a}var wt=n(26805),Vt=n(77389);const Tt=(0,Vt.Mp)("toBigInt"),St=(0,Vt.Mp)("toBn");function kt(e){return e?st.isBN(e)?e:(0,Je.qv)(e)?vt(e.toString()):(0,wt.s)(e)?new st(e.toString()):St(e)?e.toBn():Tt(e)?new st(e.toBigInt().toString()):new st(e):new st(0)}const _t={bitLength:-1,isLe:!0,isNegative:!1};function Pt(e,{bitLength:t=-1,isLe:n=!0,isNegative:r=!1}=_t){const a=kt(e),i=-1===t?Math.ceil(a.bitLength()/8):Math.ceil((t||0)/8);if(!e)return-1===t?new Uint8Array(1):new Uint8Array(i);const s=new Uint8Array(i),o=r?a.toTwos(8*i):a;return s.set(o.toArray(n?"le":"be",i),0),s}function Mt(...e){const t=e.length,n=new Array(t);let r=0;for(let a=0;aWe(e)?!e.eq(t[n]):e!==t[n]))))}class Bt extends Array{registry;createdAtHash;initialU8aLength;isStorageFallback;static get[Symbol.species](){return Array}constructor(e,t){super(t),this.registry=e}get encodedLength(){const e=this.length;let t=Ht(e).length;for(let n=0;n{const n=t.replace(/[-_., ]+/g," ").trim().split(" ");let r="";for(let a=0,i=n.length;a(t?zt[e.charCodeAt(0)]:Ut[e.charCodeAt(0)])+e.slice(1))),Ft=qt((e=>zt[e.charCodeAt(0)]+e.slice(1)));function Xt(e,t){return"function"==typeof t?t:e.createClassUnsafe(t)}function Wt(e,t){const n=t.length,r=new Array(n);for(let a=0;a(0,Lt.E)(e)))){if(!t.every((e=>(0,Lt.E)(e)&&e>=0&&e<=255)))throw new Error("Invalid number-indexed enum definition");return!1}return!0}(t)){const[i,s]=Zt(e,t);for(let e=0,t=s.length;ee!==Jt)),a=!1}else{const e=Object.entries(t);for(let t=0,r=e.length;te.toLowerCase())),i=n.toLowerCase(),s=a.indexOf(i);if(-1===s)throw new Error(`Cannot map Enum JSON, unable to find '${n}' in ${a.join(", ")}`);try{return en(e,t,Object.values(t)[s].index,r)}catch(o){throw new Error(`Enum(${n}):: ${o.message}`)}}class nn{registry;createdAtHash;initialU8aLength;isStorageFallback;__internal__def;__internal__entryIndex;__internal__indexes;__internal__isBasic;__internal__isIndexed;__internal__raw;constructor(e,t,n,r,{definition:a,setDefinition:i=P.D}={}){const{def:s,isBasic:o,isIndexed:c}=a||i(Yt(e,t)),d=(0,ut.b)(n)&&n.length&&!(0,Lt.E)(r)?$t(e,s,n[0],n.subarray(1)):function(e,t,n,r){if((0,Lt.E)(r))return en(e,t,r,n);if((0,ut.b)(n)||(0,Je.qv)(n)){const r=(0,E.e)(n);if(r.length)return $t(e,t,r[0],r.subarray(1))}else{if(n instanceof nn)return en(e,t,n.index,n.value);if((0,Lt.E)(n))return en(e,t,n);if((0,I.K)(n))return tn(e,t,n.toString());if((0,Xe.G)(n)){const r=Object.keys(n)[0];return tn(e,t,r,n[r])}}return en(e,t,Object.values(t)[0].index)}(e,s,n,r);this.registry=e,this.__internal__def=s,this.__internal__isBasic=o,this.__internal__isIndexed=c,this.__internal__indexes=Object.values(s).map((({index:e})=>e)),this.__internal__entryIndex=this.__internal__indexes.indexOf(d.index),this.__internal__raw=d.value,this.__internal__raw.initialU8aLength&&(this.initialU8aLength=1+this.__internal__raw.initialU8aLength)}static with(e){let t;const n=e=>t=e;return class extends nn{static{const t=Array.isArray(e)?e:Object.keys(e),n=t.length,r=new Array(n),a=new Array(n);for(let e=0;er.type===t[n])),De(this.prototype,r,((e,n,r)=>{if(r.type!==t[n])throw new Error(`Cannot convert '${r.type}' via ${e}`);return r.value}))}constructor(r,a,i){super(r,e,a,i,{definition:t,setDefinition:n})}}}get encodedLength(){return 1+this.__internal__raw.encodedLength}get hash(){return this.registry.hash(this.toU8a())}get index(){return this.__internal__indexes[this.__internal__entryIndex]}get inner(){return this.__internal__raw}get isBasic(){return this.__internal__isBasic}get isEmpty(){return this.__internal__raw.isEmpty}get isNone(){return this.__internal__raw instanceof Jt}get defIndexes(){return this.__internal__indexes}get defKeys(){return Object.keys(this.__internal__def)}get type(){return this.defKeys[this.__internal__entryIndex]}get value(){return this.__internal__raw}eq(e){return(0,ut.b)(e)?!this.toU8a().some(((t,n)=>t!==e[n])):(0,Lt.E)(e)?this.toNumber()===e:this.__internal__isBasic&&(0,I.K)(e)?this.type===e:(0,Je.qv)(e)?this.toHex()===e:e instanceof nn?this.index===e.index&&this.value.eq(e.value):(0,Xe.G)(e)?this.value.eq(e[this.type]):this.value.eq(e)}inspect(){if(this.__internal__isBasic)return{outer:[new Uint8Array([this.index])]};const{inner:e,outer:t=[]}=this.__internal__raw.inspect();return{inner:e,outer:[new Uint8Array([this.index]),...t]}}toHex(){return(0,N.X)(this.toU8a())}toHuman(e,t){return this.__internal__isBasic||this.isNone?this.type:{[this.type]:this.__internal__raw.toHuman(e,t)}}toJSON(){return this.__internal__isBasic?this.type:{[jt(this.type)]:this.__internal__raw.toJSON()}}toNumber(){return this.index}toPrimitive(e){return this.__internal__isBasic?this.type:{[jt(this.type)]:this.__internal__raw.toPrimitive(e)}}_toRawStruct(){if(this.__internal__isBasic)return this.__internal__isIndexed?this.defKeys.reduce(((e,t,n)=>(e[t]=this.__internal__indexes[n],e)),{}):this.defKeys;const e=Object.entries(this.__internal__def);return Gt(this.registry,e.reduce(((e,[t,{Type:n}],r)=>(e[0][r]=n,e[1][r]=t,e)),[new Array(e.length),new Array(e.length)]))}toRawType(){return(0,je.A)({_enum:this._toRawStruct()})}toString(){return this.isNone?this.type:(0,je.A)(this.toJSON())}toU8a(e){return e?this.__internal__raw.toU8a(e):It([new Uint8Array([this.index]),this.__internal__raw.toU8a(e)])}}function rn(e){return"boolean"==typeof e}function an(e,t,n,{message:r},a,i,s,o,c){let d="";try{d=`: ${new o(e).toRawType()}`}catch{}return`${t}: failed at ${(0,N.X)(a.subarray(0,16))}\u2026${c?` on ${c}`:""} (index ${i+1}/${s})${d}:: ${r}`}function sn(e,t,n,[r,a]){const i=t.length;let s=0,o=0;try{for(;on=e;return class extends dn{static{const t=Object.keys(e);De(this.prototype,t,((e,t,n)=>n.get(e)))}constructor(a,i){super(a,e,i,t,{definition:n,setDefinition:r})}}}get defKeys(){return this.__internal__Types[1]}get isEmpty(){for(const e of this.values())if(!e.isEmpty)return!1;return!0}get encodedLength(){let e=0;for(const t of this.values())e+=t.encodedLength;return e}get hash(){return this.registry.hash(this.toU8a())}get Type(){const e={},[t,n]=this.__internal__Types;for(let r=0,a=n.length;r ${(0,je.A)(t)} (typeof ${typeof t})`)}const vn=(0,it.v)("Map");function wn(e,t,n,r){const a=new Map;for(const[s,o]of r.entries()){const r=t.prototype instanceof Bt||t.prototype instanceof dn||t.prototype instanceof nn;try{a.set(s instanceof t?s:new t(e,r&&"string"==typeof s?JSON.parse(s):s),o instanceof n?o:new n(e,o))}catch(i){throw vn.error("Failed to decode key or value:",i.message),i}}return[t,n,a,0]}function Vn(e,t,n,r){const a=Xt(e,t),i=Xt(e,n);if(!r)return[a,i,new Map,0];if((0,ut.b)(r)||(0,Je.qv)(r))return function(e,t,n,r){const a=new Map,[i,s]=dt(r),o=[];for(let u=0;uxn("BTreeMap",t,e))).sort((([e],[t])=>gn(e,t))))}(o):o),this.registry=e,this.initialU8aLength=c,this.__internal__KeyClass=i,this.__internal__ValClass=s,this.__internal__type=a}get encodedLength(){let e=Ht(this.size).length;for(const[t,n]of this.entries())e+=t.encodedLength+n.encodedLength;return e}get hash(){return this.registry.hash(this.toU8a())}get isEmpty(){return 0===this.size}eq(e){return Ge(this,e)}inspect(){const e=[];for(const[t,n]of this.entries())e.push(t.inspect()),e.push(n.inspect());return{inner:e,outer:[Ht(this.size)]}}toHex(){return(0,N.X)(this.toU8a())}toHuman(e,t){const n={};for(const[r,a]of this.entries())n[r instanceof rt&&!t&&r.isAscii?r.toUtf8():r.toString()]=a.toHuman(e,t);return n}toJSON(){const e={};for(const[t,n]of this.entries())e[t.toString()]=n.toJSON();return e}toPrimitive(e){const t={};for(const[n,r]of this.entries())t[n instanceof rt&&!e&&n.isAscii?n.toUtf8():n.toString()]=r.toPrimitive(e);return t}toRawType(){return`${this.__internal__type}<${this.registry.getClassName(this.__internal__KeyClass)||new this.__internal__KeyClass(this.registry).toRawType()},${this.registry.getClassName(this.__internal__ValClass)||new this.__internal__ValClass(this.registry).toRawType()}>`}toString(){return(0,je.A)(this.toJSON())}toU8a(e){const t=[];e||t.push(Ht(this.size));for(const[n,r]of this.entries())t.push(n.toU8a(e),r.toU8a(e));return It(t)}}class Sn extends Tn{static with(e,t){return class extends Sn{constructor(n,r){super(n,e,t,r,"BTreeMap")}}}}function kn(e,t){return e.size===t.length&&!t.some((t=>!e.has(t)))}const _n=(0,it.v)("BTreeSet");function Pn(e,t,n){const r=Xt(e,t);if(!n)return[r,new Set,0];if((0,ut.b)(n)||(0,Je.qv)(n))return function(e,t,n){const r=new Set,[a,i]=dt(n),s=new Array(i),[o]=on(e,s,n,a,t);for(let c=0;c{try{r.add(n instanceof t?n:new t(e,n))}catch(a){throw _n.error("Failed to decode key or value:",a.message),a}})),[t,r,0]}(e,r,n);throw new Error("BTreeSet: cannot decode type")}class Mn extends Set{registry;createdAtHash;initialU8aLength;isStorageFallback;__internal__ValClass;constructor(e,t,n){const[r,a,i]=Pn(e,t,n);super(function(e){const t=new Set;return new Set(Array.from(e).filter((e=>xn("BTreeSet",t,e))).sort(gn))}(a)),this.registry=e,this.initialU8aLength=i,this.__internal__ValClass=r}static with(e){return class extends Mn{constructor(t,n){super(t,e,n)}}}get encodedLength(){let e=Ht(this.size).length;for(const t of this.values())e+=t.encodedLength;return e}get hash(){return this.registry.hash(this.toU8a())}get isEmpty(){return 0===this.size}get strings(){return[...super.values()].map((e=>e.toString()))}eq(e){return t=this,n=e,Array.isArray(n)?kn(t,n):n instanceof Set?kn(t,[...n.values()]):!!(0,Xe.G)(n)&&kn(t,Object.values(n));var t,n}inspect(){const e=[];for(const t of this.values())e.push(t.inspect());return{inner:e,outer:[Ht(this.size)]}}toHex(){return(0,N.X)(this.toU8a())}toHuman(e,t){const n=[];for(const r of this.values())n.push(r.toHuman(e,t));return n}toJSON(){const e=[];for(const t of this.values())e.push(t.toJSON());return e}toRawType(){return`BTreeSet<${this.registry.getClassName(this.__internal__ValClass)||new this.__internal__ValClass(this.registry).toRawType()}>`}toPrimitive(e){const t=[];for(const n of this.values())t.push(n.toPrimitive(e));return t}toString(){return(0,je.A)(this.toJSON())}toU8a(e){const t=[];e||t.push(Ht(this.size));for(const n of this.values())t.push(n.toU8a(e));return It(t)}}class In{registry;createdAtHash;initialU8aLength;isStorageFallback;__internal__Type;__internal__raw;constructor(e,t,n=0,{definition:r,setDefinition:a=P.D}={}){this.registry=e,this.__internal__Type=r||a(Xt(e,t));const[i,s]=function(e,t,n){if((0,ut.b)(n)){const[r,a]=(3&n[0])<3?dt(n):ct(n);return[new t(e,a),r]}if(n instanceof In){const r=n.unwrap();return r instanceof t?[r,0]:[new t(e,r),0]}return n instanceof t?[n,0]:[new t(e,n),0]}(e,this.__internal__Type,n);this.initialU8aLength=s,this.__internal__raw=i}static with(e){let t;const n=e=>t=e;return class extends In{constructor(r,a){super(r,e,a,{definition:t,setDefinition:n})}}}get encodedLength(){return this.toU8a().length}get hash(){return this.registry.hash(this.toU8a())}get isEmpty(){return this.__internal__raw.isEmpty}bitLength(){return this.__internal__raw.bitLength()}eq(e){return this.__internal__raw.eq(e instanceof In?e.__internal__raw:e)}inspect(){return{outer:[this.toU8a()]}}toBigInt(){return this.__internal__raw.toBigInt()}toBn(){return this.__internal__raw.toBn()}toHex(e){return this.__internal__raw.toHex(e)}toHuman(e,t){return this.__internal__raw.toHuman(e,t)}toJSON(){return this.__internal__raw.toJSON()}toNumber(){return this.__internal__raw.toNumber()}toPrimitive(e){return this.__internal__raw.toPrimitive(e)}toRawType(){return`Compact<${this.registry.getClassName(this.__internal__Type)||this.__internal__raw.toRawType()}>`}toString(){return this.__internal__raw.toString()}toU8a(e){return Ht(this.__internal__raw.toBn())}unwrap(){return this.__internal__raw}}class Nn extends Tn{static with(e,t){return class extends Nn{constructor(n,r){super(n,e,t,r)}}}}const En=new RegExp("(\\d+?)(?=(\\d{3})+(?!\\d)|$)","g");function On(e,t=","){const n=e[0].startsWith("-"),r=n?e.substring(1).match(En):e.match(En);return r?`${n?"-":""}${r.join(t)}`:e}function An(e){return{decimal:.1.toLocaleString(e).substring(1,2),thousand:1e3.toLocaleString(e).substring(1,2)}}const Cn=[{power:-24,text:"yocto",value:"y"},{power:-21,text:"zepto",value:"z"},{power:-18,text:"atto",value:"a"},{power:-15,text:"femto",value:"f"},{power:-12,text:"pico",value:"p"},{power:-9,text:"nano",value:"n"},{power:-6,text:"micro",value:"\xb5"},{power:-3,text:"milli",value:"m"},{power:0,text:"Unit",value:"-"},{power:3,text:"Kilo",value:"k"},{power:6,text:"Mill",value:"M"},{power:9,text:"Bill",value:"B"},{power:12,text:"Tril",value:"T"},{power:15,text:"Peta",value:"P"},{power:18,text:"Exa",value:"E"},{power:21,text:"Zeta",value:"Z"},{power:24,text:"Yotta",value:"Y"}];function Hn(e){for(let t=0,n=Cn.length;tRn(e,t),Un.findSi=Hn,Un.getDefaults=()=>({decimals:Ln,unit:zn}),Un.getOptions=(e=Ln)=>Cn.filter((({power:t})=>!(t<0)||e+t>=0)),Un.setDefaults=({decimals:e,unit:t})=>{Ln=(Array.isArray(e)?e[0]:e)??Ln,zn=(Array.isArray(t)?t[0]:t)??zn,Cn[8].text=zn};const qn=new st(1e4),jn=[["Perquintill",yt],["Perbill",mt],["Permill",bt],["Percent",ht]];function Fn(e,t){if((0,Lt.E)(e)){if(!Number.isInteger(e)||e>Number.MAX_SAFE_INTEGER||ei)throw new Error(`${this.toRawType()}: Input too large. Found input with ${super.bitLength()} bits, expected ${i}`)}get hash(){return this.registry.hash(this.toU8a())}get isEmpty(){return this.isZero()}bitLength(){return this.__internal__bitLength}eq(e){return super.eq((0,Je.qv)(e)?vt(e.toString(),{isLe:!1,isNegative:!this.isUnsigned}):kt(e))}inspect(){return{outer:[this.toU8a()]}}isMax(){return this.toU8a().filter((e=>255===e)).length===this.__internal__bitLength/8}toBigInt(){return BigInt(this.toString())}toBn(){return this}toHex(e=!1){return function(e,{bitLength:t=-1,isLe:n=!1,isNegative:r=!1}={}){return(0,N.X)(Pt(e,{bitLength:t,isLe:n,isNegative:r}))}(this,{bitLength:this.bitLength(),isLe:e,isNegative:!this.isUnsigned})}toHuman(e){const t=this.toRawType();if("Balance"===t)return this.isMax()?"everything":Un(this,{decimals:this.registry.chainDecimals[0],withSi:!0,withUnit:this.registry.chainTokens[0]});const[,n]=jn.find((([e])=>e===t))||[];return n?function(e,t){return`${(e.mul(qn).div(t).toNumber()/100).toFixed(2)}%`}(this,n):Dn(this)}toJSON(e=!1){return e||this.__internal__bitLength>128||super.bitLength()>52?this.toHex():this.toNumber()}toPrimitive(){return super.bitLength()>52?this.toString():this.toNumber()}toRawType(){return this instanceof this.registry.createClassUnsafe("Balance")?"Balance":`${this.isUnsigned?"u":"i"}${this.bitLength()}`}toString(e){return super.toString(e)}toU8a(e){return Pt(this,{bitLength:this.bitLength(),isLe:!0,isNegative:!this.isUnsigned})}}class Wn extends Xn{constructor(e,t=0,n){super(e,t,n,!0)}static with(e,t){return class extends Wn{constructor(t,n){super(t,n,e)}toRawType(){return t||super.toRawType()}}}}class Zn extends Jt{toRawType(){return"None"}}class Gn{registry;createdAtHash;initialU8aLength;isStorageFallback;__internal__Type;__internal__raw;constructor(e,t,n,{definition:r,setDefinition:a=P.D}={}){const i=r||a(Xt(e,t)),s=(0,ut.b)(n)&&n.length&&!fn(n)?0===n[0]?new Zn(e):new i(e,n.subarray(1)):function(e,t,n){return n instanceof t?n:n instanceof Gn?n.value instanceof t?n.value:n.isNone?new Zn(e):new t(e,n.value):(0,Kt.k)(n)||(0,Fe.b)(n)||"0x"===n||n instanceof Zn?new Zn(e):(0,ut.b)(n)?n.length&&0!==n[0]?new t(e,n.subarray(1)):new Zn(e):new t(e,n)}(e,i,n);this.registry=e,this.__internal__Type=i,this.__internal__raw=s,s?.initialU8aLength&&(this.initialU8aLength=1+s.initialU8aLength)}static with(e){let t;const n=e=>(t=e,e);return class extends Gn{constructor(r,a){super(r,e,a,{definition:t,setDefinition:n})}}}get encodedLength(){return 1+this.__internal__raw.encodedLength}get hash(){return this.registry.hash(this.toU8a())}get isEmpty(){return this.isNone}get isNone(){return this.__internal__raw instanceof Zn}get isSome(){return!this.isNone}get value(){return this.__internal__raw}eq(e){return e instanceof Gn?this.isSome===e.isSome&&this.value.eq(e.value):this.value.eq(e)}inspect(){if(this.isNone)return{outer:[new Uint8Array([0])]};const{inner:e,outer:t=[]}=this.__internal__raw.inspect();return{inner:e,outer:[new Uint8Array([1]),...t]}}toHex(){return this.isNone?"0x":(0,N.X)(this.toU8a().subarray(1))}toHuman(e,t){return this.__internal__raw.toHuman(e,t)}toJSON(){return this.isNone?null:this.__internal__raw.toJSON()}toPrimitive(e){return this.isNone?null:this.__internal__raw.toPrimitive(e)}toRawType(e){const t=this.registry.getClassName(this.__internal__Type)||new this.__internal__Type(this.registry).toRawType();return e?t:`Option<${t}>`}toString(){return this.__internal__raw.toString()}toU8a(e){if(e)return this.__internal__raw.toU8a(!0);const t=new Uint8Array(this.encodedLength);return this.isSome&&(t.set([1]),t.set(this.__internal__raw.toU8a(),1)),t}unwrap(){if(this.isNone)throw new Error("Option: unwrapping a None value");return this.__internal__raw}unwrapOr(e){return this.isSome?this.unwrap():e}unwrapOrDefault(){return this.isSome?this.unwrap():new this.__internal__Type(this.registry)}}class Kn extends Bt{__internal__Types;constructor(e,t,n,{definition:r,setDefinition:a=P.D}={}){const i=r||a(Array.isArray(t)?[Wt(e,t),[]]:(0,qe.T)(t)||(0,I.K)(t)?[[Xt(e,t)],[]]:Zt(e,t));super(e,i[0].length),this.initialU8aLength=((0,ut.b)(n)?sn(e,this,n,i):function(e,t,n,r){if(Array.isArray(n)){const i=r[0];for(let r=0,s=i.length;rt=e;return class extends Kn{constructor(r,a){super(r,e,a,{definition:t,setDefinition:n})}}}get encodedLength(){let e=0;for(let t=0,n=this.length;tnew e(this.registry).toRawType()))}inspect(){return{inner:this.inspectInner()}}toRawType(){return`(${this.__internal__Types[0].map((e=>this.registry.getClassName(e)||new e(this.registry).toRawType())).join(",")})`}toString(){return(0,je.A)(this.toJSON())}toU8a(e){return It(this.toU8aInner(e))}}class Jn extends Kn{__internal__rangeName;constructor(e,t,n,{rangeName:r="Range"}={}){super(e,[t,t],n),this.__internal__rangeName=r}static with(e){return class extends Jn{constructor(t,n){super(t,e,n)}}}get start(){return this[0]}get end(){return this[1]}toRawType(){return`${this.__internal__rangeName}<${this.start.toRawType()}>`}}class Yn extends Jn{constructor(e,t,n){super(e,t,n,{rangeName:"RangeInclusive"})}static with(e){return class extends Yn{constructor(t,n){super(t,e,n)}}}}class Qn extends nn{constructor(e,t,n,r){super(e,{Ok:t,Err:n},r)}static with(e){return class extends Qn{constructor(t,n){super(t,e.Ok,e.Err,n)}}}get asErr(){if(!this.isErr)throw new Error("Cannot extract Err value from Ok result, check isErr first");return this.value}get asOk(){if(!this.isOk)throw new Error("Cannot extract Ok value from Err result, check isOk first");return this.value}get isEmpty(){return this.isOk&&this.value.isEmpty}get isErr(){return!this.isOk}get isOk(){return 0===this.index}toRawType(){const e=this._toRawStruct();return`Result<${e.Ok},${e.Err}>`}}function $n(e,t){const n=new st(0);for(let r=0,a=t.length;rr.strings.includes(t[n])))}constructor(n,r){super(n,e,r,t)}}}get encodedLength(){return this.__internal__byteLength}get hash(){return this.registry.hash(this.toU8a())}get isEmpty(){return 0===this.size}get strings(){return[...super.values()]}get valueEncoded(){return $n(this.__internal__allowed,this.strings)}add=e=>{if(this.__internal__allowed&&(0,Fe.b)(this.__internal__allowed[e]))throw new Error(`Set: Invalid key '${e}' on add`);return super.add(e),this};eq(e){return Array.isArray(e)?Rt(this.strings.sort(),e.sort()):e instanceof Set?this.eq([...e.values()]):!(!(0,Lt.E)(e)&&!(0,pn.f)(e))&&this.valueEncoded.eq(kt(e))}inspect(){return{outer:[this.toU8a()]}}toHex(){return(0,N.X)(this.toU8a())}toHuman(){return this.toJSON()}toJSON(){return this.strings}toNumber(){return this.valueEncoded.toNumber()}toPrimitive(){return this.toJSON()}toRawType(){return(0,je.A)({_set:this.__internal__allowed})}toString(){return`[${this.strings.join(", ")}]`}toU8a(e){return Pt(this.valueEncoded,{bitLength:8*this.__internal__byteLength,isLe:!0})}}class rr extends Xn{static with(e,t){return class extends rr{constructor(t,n){super(t,n,e)}toRawType(){return t||super.toRawType()}}}}function ar(e){return It([Ht(e.length),e])}const ir=10485760;class sr extends rt{constructor(e,t){const[n,r]=!(0,ut.b)(t)||t instanceof rt?Array.isArray(t)||(0,I.K)(t)?[(0,E.e)(t),0]:[t,0]:function(e){if(!e.length)return[new Uint8Array,0];const[t,n]=dt(e),r=t+n;if(n>ir)throw new Error(`Bytes length ${n.toString()} exceeds 10485760`);if(r>e.length)throw new Error(`Bytes: required length less than remainder, expected at least ${r}, found ${e.length}`);return[e.subarray(t,r),r]}(t);super(e,n,r)}get encodedLength(){return this.length+Ht(this.length).length}inspect(e){const t=Ht(this.length);return{outer:e?[super.toU8a()]:this.length?[t,super.toU8a()]:[t]}}toRawType(){return"Bytes"}toU8a(e){return e?super.toU8a(e):ar(this)}}const or=524288,cr=(0,it.v)("Vec");function dr(e,t,n,r,a){if(Array.isArray(n)){const r=t.length;for(let s=0;sor)throw new Error(`Vec length ${r.toString()} exceeds 524288`);return[t,r,n]}if(!e)return[null,0,0];throw new Error(`Expected array/hex input to Vec<*> decoding, found ${typeof e}: ${(0,je.A)(e)}`)}(n);super(e,s),this.__internal__Type=r||a(Xt(e,t)),this.initialU8aLength=((0,ut.b)(i)?on(e,this,i,o,this.__internal__Type):dr(e,this,i,o,this.__internal__Type))[0]}static with(e){let t;const n=e=>t=e;return class extends ur{constructor(r,a){super(r,e,a,{definition:t,setDefinition:n})}}}get Type(){return this.__internal__Type.name}indexOf(e){const t=e instanceof this.__internal__Type?e:new this.__internal__Type(this.registry,e);for(let n=0,r=this.length;n`}}class lr extends rt{constructor(e,t=new Uint8Array,n=256){const[r,a]=function(e,t){const n=(0,E.e)(e),r=t/8;if(!n.length)return[new Uint8Array(r),0];if((0,ut.b)(e)?n.lengthn=e;return class extends fr{constructor(a,i){super(a,e,t,i,{definition:n,setDefinition:r})}}}get Type(){return new this.__internal__Type(this.registry).toRawType()}get encodedLength(){let e=0;for(let t=0,n=this.length;t`}toString(){return this.__internal__decoded?this.__internal__decoded.toString():super.toString()}unwrap(){if(!this.__internal__decoded)throw new Error(`${this.__internal__opaqueName}: unwrapping an undecodable value`);return this.__internal__decoded}}class br extends hr{constructor(e,t,n){super(e,t,n,{opaqueName:"WrapperOpaque"})}static with(e){return class extends br{constructor(t,n){super(t,e,n)}}}get inner(){return this.unwrap()}}var mr;!function(e){e[e.BTreeMap=0]="BTreeMap",e[e.BTreeSet=1]="BTreeSet",e[e.Compact=2]="Compact",e[e.DoNotConstruct=3]="DoNotConstruct",e[e.Enum=4]="Enum",e[e.HashMap=5]="HashMap",e[e.Int=6]="Int",e[e.Linkage=7]="Linkage",e[e.Null=8]="Null",e[e.Option=9]="Option",e[e.Plain=10]="Plain",e[e.Range=11]="Range",e[e.RangeInclusive=12]="RangeInclusive",e[e.Result=13]="Result",e[e.Set=14]="Set",e[e.Si=15]="Si",e[e.Struct=16]="Struct",e[e.Tuple=17]="Tuple",e[e.UInt=18]="UInt",e[e.Vec=19]="Vec",e[e.VecFixed=20]="VecFixed",e[e.WrapperKeepOpaque=21]="WrapperKeepOpaque",e[e.WrapperOpaque=22]="WrapperOpaque"}(mr||(mr={}));const yr=["BTreeMap","BTreeSet","HashMap","Vec"],xr=yr.concat(["Compact","DoNotConstruct","Int","Linkage","Range","RangeInclusive","Result","Opaque","Option","UInt","WrapperKeepOpaque","WrapperOpaque"]),gr=["<","(","[",'"',","," "],vr=[Vr("::Inherent","InherentOfflineReport",!1),Vr("VecDeque<","Vec<",!1),e=>{if(e.includes(" as HasCompact"))for(let t=0,n=e.length;t`)}return e},Sr("Bounded",!0),Sr("Weak",!1),function(){const e=/\s/g,t=/(T|Self)::/g,n=/<(T|Self)asTrait>::/g,r=/::/g,a=//g,i=/::Type/g;return s=>(e.lastIndex=0,t.lastIndex=0,n.lastIndex=0,r.lastIndex=0,a.lastIndex=0,i.lastIndex=0,s.replace(e,"").replace(t,"").replace(n,"").replace(r,"").replace(a,"Lookup").replace(i,""))}(),function(){const e=e=>`(${e},${e})`;return t=>Tr(t,"PairOf<",e)}(),function(e){const t=e=>e;return n=>Tr(n,e,t)}("Box<"),e=>{for(let t=0,n=e.length;t{const r=t-n.length;return r>=0&&e.substring(r,t)===n&&(0===r||gr.includes(e[r-1]))}))){const n=wr(e,t+1);e=`${e.substring(0,t)}${e.substring(n+1)}`}return e},Vr("String","Text"),Vr("Vec","Bytes"),Vr("&\\[u8\\]","Bytes"),Vr("&'static\\[u8\\]","Bytes"),Vr("RawAddress","Address"),Vr("Lookup::Source","LookupSource"),Vr("Lookup::Target","LookupTarget"),Vr("exec::StorageKey","ContractStorageKey"),function(){const e=/,\)/g,t=/\(([^,]+)\)/;return n=>(e.lastIndex=0,n.replace(e,")").replace(t,"$1"))}(),e=>{let t=0;for(;-1!==t;)if(t=e.indexOf("::"),0===t)e=e.substring(2);else if(-1!==t){let n=t;for(;-1!==n&&!gr.includes(e[n]);)n--;e=`${e.substring(0,n+1)}${e.substring(t+2)}`}return e},e=>e.trim()];function wr(e,t){let n=0;for(let r=t,a=e.length;r"===e[r]){if(!n)return r;n--}else"<"===e[r]&&n++;throw new Error(`Unable to find closing matching <> on '${e}' (start ${t})`)}function Vr(e,t,n=!0){const r=new RegExp(`(^${e}|${gr.map((t=>`\\${t}${e}`)).join("|")})`,"g"),a=e=>(r.lastIndex=0,n&&gr.includes(e[0])?`${e[0]}${t}`:t);return e=>e.replace(r,a)}function Tr(e,t,n){let r=-1;for(;;){if(r=e.indexOf(t,r+1),-1===r)return e;const a=r+t.length,i=wr(e,a);e=`${e.substring(0,r)}${n(e.substring(a,i))}${e.substring(i+1)}`}}function Sr(e,t){return n=>{for(let r=0,a=yr.length;r{const n=e.split(",").map((e=>e.trim())).filter((e=>e));return t&&n.pop(),`${a}<${n.join(",")}>`}))}return n}}const kr=new Map;function _r(e){const t=e.toString(),n=kr.get(t);if(n)return n;let r=t;for(let a=0,i=vr.length;a({index:t,info:mr.Plain,name:e,type:"Null"}))):!function(e){const t=Object.values(e);if(t.some((e=>(0,Lt.E)(e)))){if(!t.every((e=>(0,Lt.E)(e)&&e>=0&&e<=255)))throw new Error("Invalid number-indexed enum definition");return!1}return!0}(t)?e.sub=Object.entries(t).map((([e,t])=>({index:t,info:mr.Plain,name:e,type:"Null"}))):e.sub=Object.entries(t).map((([e,t],r)=>(0,M.b)({},Rr(Mr(t||"Null"),{name:e},n),{index:r}))),e}function Nr(e,t,n,r){return e.sub=0===n.length?[]:function(e){const t=[];let n=0,r=0,a=0,i=0,s=0;for(let o=0,c=e.length;o":n--;break;case"[":r++;break;case"]":r--;break;case"{":a++;break;case"}":a--;break;case"(":i++;break;case")":i--}if(n||r||a||i)throw new Error(`Invalid definition (missing terminators) found in ${e}`);return t.push(e.substring(s,e.length).trim()),t}(n).map((e=>Rr(e,{},r))),e}function Er(e,t,n,r){const[a,i]=t.substring(r.length+1,t.length-1).split(","),s=parseInt(a.trim(),10);if(s>8192||s%8)throw new Error(`${t}: Only support for ${r}, where length <= 8192 and a power of 8, found ${s}`);return e.displayName=i,e.length=s,e}function Or(e,[t,n]){return e.startsWith(t)&&e.slice(-1*n.length)===n}const Ar=[["[","]",mr.VecFixed,function(e,t,n,r){const a=t.length-1;let i=-1,s=0;for(let l=1;l":s--}if(-1===i)throw new Error(`${t}: Unable to extract location of ';'`);const o=t.substring(1,i),[c,d]=t.substring(i+1,a).split(";"),u=parseInt(c.trim(),10);if(u>2048)throw new Error(`${t}: Only support for [Type; ], where length <= 2048`);return e.displayName=d,e.length=u,e.sub=Rr(o,{},r),e}],["{","}",mr.Struct,function(e,t,n,r){const a=JSON.parse(t),i=Object.keys(a);return a._enum?Ir(e,a._enum,r,a._fallback):a._set?function(e,t,n){return e.info=mr.Set,e.fallbackType=n,e.length=t._bitLength,e.sub=Object.entries(t).filter((([e])=>!e.startsWith("_"))).map((([e,t])=>({index:t,info:mr.Plain,name:e,type:"Null"}))),e}(e,a._set,a._fallback):(e.alias=a._alias?new Map(Object.entries(a._alias)):void 0,e.fallbackType=a._fallback,e.sub=i.filter((e=>!Pr.includes(e))).map((e=>Rr(Mr(a[e]),{name:e},r))),e)}],["(",")",mr.Tuple,Nr],["BTreeMap<",">",mr.BTreeMap,Nr],["HashMap<",">",mr.HashMap,Nr],["Int<",">",mr.Int,function(e,t,n){return Er(e,t,0,"Int")}],["Result<",">",mr.Result,Nr],["UInt<",">",mr.UInt,function(e,t,n){return Er(e,t,0,"UInt")}],["DoNotConstruct<",">",mr.DoNotConstruct,function(e,t,n){return e.displayName=t.substring(15,t.length-1),e}]],Cr=[["BTreeSet<",">",mr.BTreeSet],["Compact<",">",mr.Compact],["Linkage<",">",mr.Linkage],["Opaque<",">",mr.WrapperOpaque],["Option<",">",mr.Option],["Range<",">",mr.Range],["RangeInclusive<",">",mr.RangeInclusive],["Vec<",">",mr.Vec],["WrapperKeepOpaque<",">",mr.WrapperKeepOpaque],["WrapperOpaque<",">",mr.WrapperOpaque]];function Hr(e,[t,n]){return e.substring(t.length,e.length-n.length)}function Rr(e,{displayName:t,name:n}={},r=0){const a=_r(e),i={displayName:t,info:mr.Plain,name:n,type:a};if(++r>64)throw new Error("getTypeDef: Maximum nested limit reached");const s=Ar.find((e=>Or(a,e)));if(s)return i.info=s[2],s[3](i,a,Hr(a,s),r);const o=Cr.find((e=>Or(a,e)));return o&&(i.info=o[2],i.sub=Rr(Hr(a,o),{},r)),i}function Br({lookupName:e,type:t}){return e||t}function Lr(e){if(!Array.isArray(e.sub))throw new Error(`Expected subtype as TypeDef[] in ${(0,je.A)(e)}`);return e.sub}function zr(e){return Br(function(e){if(!e.sub||Array.isArray(e.sub))throw new Error(`Expected subtype as TypeDef in ${(0,je.A)(e)}`);return e.sub}(e))}function Ur(e){const t=Lr(e),n={};for(let r=0,a=t.length;r`);return e.with(n,t)}function jr(e,t){const[n,r]=Dr(t);return e.with(n,r)}function Fr(e,t){return e.with(zr(t))}const Xr={[mr.BTreeMap]:(e,t)=>jr(Sn,t),[mr.BTreeSet]:(e,t)=>Fr(Mn,t),[mr.Compact]:(e,t)=>Fr(In,t),[mr.DoNotConstruct]:(e,t)=>at.with(t.displayName||t.type),[mr.Enum]:(e,t)=>{const n=Lr(t);return nn.with(n.every((({type:e})=>"Null"===e))?n.reduce(((e,{index:t,name:n},r)=>{if(!n)throw new Error("No name found in sub definition");return e[n]=t||r,e}),{}):Ur(t))},[mr.HashMap]:(e,t)=>jr(Nn,t),[mr.Int]:(e,t)=>qr(Wn,t),[mr.Linkage]:(e,t)=>{const n=`Option<${zr(t)}>`,r=dn.with({previous:n,next:n});return r.prototype.toRawType=function(){return`Linkage<${this.next.toRawType(!0)}>`},r},[mr.Null]:(e,t)=>Jt,[mr.Option]:(e,t)=>{if(!t.sub||Array.isArray(t.sub))throw new Error("Expected type information for Option");return Fr(Gn,t)},[mr.Plain]:(e,t)=>e.getOrUnknown(t.type),[mr.Range]:(e,t)=>Fr(Jn,t),[mr.RangeInclusive]:(e,t)=>Fr(Yn,t),[mr.Result]:(e,t)=>{const[n,r]=Dr(t);return Qn.with({Err:r,Ok:n})},[mr.Set]:(e,t)=>nr.with(Lr(t).reduce(((e,{index:t,name:n})=>{if(!n||!(0,Lt.E)(t))throw new Error("No name found in sub definition");return e[n]=t,e}),{}),t.length),[mr.Si]:(e,t)=>Wr(e,e.lookup.getTypeDef(t.type)),[mr.Struct]:(e,t)=>dn.with(Ur(t),t.alias),[mr.Tuple]:(e,t)=>Kn.with(Dr(t)),[mr.UInt]:(e,t)=>qr(rr,t),[mr.Vec]:(e,{sub:t})=>{if(!t||Array.isArray(t))throw new Error("Expected type information for vector");return"u8"===t.type?sr:ur.with(Br(t))},[mr.VecFixed]:(e,{displayName:t,length:n,sub:r})=>{if(!(0,Lt.E)(n)||!r||Array.isArray(r))throw new Error("Expected length & type information for fixed vector");return"u8"===r.type?lr.with(8*n,t):fr.with(Br(r),n)},[mr.WrapperKeepOpaque]:(e,t)=>Fr(hr,t),[mr.WrapperOpaque]:(e,t)=>Fr(br,t)};function Wr(e,t){return e.getUnsafe(t.type,!1,t)}function Zr(e,t){return e.getUnsafe(t)||Wr(e,e.isLookupType(t)?e.lookup.getTypeDef(t):Rr(t))}function Gr(e,t){const n=(0,E.e)(e),r=(0,E.e)(t);if(n.length===r.length){const e=new DataView(n.buffer,n.byteOffset),t=new DataView(r.buffer,r.byteOffset),a=n.length%4|0,i=n.length-a|0;for(let n=0;n!e))))throw new Error(`${r}:: Decoded input doesn't match input, received ${(0,N.X)(t,512)} (${t.length} bytes), created ${(0,N.X)(n,512)} (${n.length} bytes)`)}function Jr(e,t,n=[],{blockHash:r,isFallback:a,isOptional:i,isPedantic:s}={}){const o=new(i?Gn.with(t):t)(e,...n);return s&&function(e,[t]){(0,ut.b)(t)?Kr(e,t):(0,Je.qv)(t)&&Kr(e,(0,E.e)(t))}(o,n),r&&(o.createdAtHash=Yr(e,"BlockHash",[r])),a&&(o.isStorageFallback=!0),o}function Yr(e,t,n=[],r={}){let a=null,i=null;try{return a=Zr(e,t),Jr(e,a,n,r)}catch(s){i=new Error(`createType(${t}):: ${s.message}`)}if(a?.__fallbackType)try{return a=Zr(e,a.__fallbackType),Jr(e,a,n,r)}catch{}throw i}function Qr(e,t,n,r,a=0){const i=r?r(t,a):t.toString();let s;Object.defineProperty(e,i,{configurable:!0,enumerable:!0,get:function(){if(void 0===s){s=n(t,a,this);try{Object.defineProperty(this,i,{value:s})}catch{}}return s}})}function $r(e,t,n,r){for(let a=0,i=t.length;a0&&!t.includes(e.length))throw new Error(`Uint8Array expected of length ${t}, not of length=${e.length}`)}function ra(e){if("function"!=typeof e||"function"!=typeof e.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");ta(e.outputLen),ta(e.blockLen)}function aa(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function ia(e,t){na(e);const n=t.outputLen;if(e.lengthnew Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4)),ca=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),da=(e,t)=>e<<32-t|e>>>t,ua=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],la=e=>e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255,fa=ua?e=>e:e=>la(e);function pa(e){for(let t=0;te().update(ha(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function ya(e){const t=(t,n)=>e(n).update(ha(t)).digest(),n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=t=>e(t),t}function xa(e=32){if(sa&&"function"==typeof sa.getRandomValues)return sa.getRandomValues(new Uint8Array(e));if(sa&&"function"==typeof sa.randomBytes)return sa.randomBytes(e);throw new Error("crypto.getRandomValues must be defined")}const ga=new Uint8Array([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3]);class va extends ba{constructor(e,t,n={},r,a,i){if(super(),this.blockLen=e,this.outputLen=t,this.length=0,this.pos=0,this.finished=!1,this.destroyed=!1,ta(e),ta(t),ta(r),t<0||t>r)throw new Error("outputLen bigger than keyLen");if(void 0!==n.key&&(n.key.length<1||n.key.length>r))throw new Error(`key must be up 1..${r} byte long or undefined`);if(void 0!==n.salt&&n.salt.length!==a)throw new Error(`salt must be ${a} byte long or undefined`);if(void 0!==n.personalization&&n.personalization.length!==i)throw new Error(`personalization must be ${i} byte long or undefined`);this.buffer32=oa(this.buffer=new Uint8Array(e))}update(e){aa(this);const{blockLen:t,buffer:n,buffer32:r}=this,a=(e=ha(e)).length,i=e.byteOffset,s=e.buffer;for(let o=0;or[t]=fa(e)))}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const n=e.slice(0,t);return this.destroy(),n}_cloneInto(e){const{buffer:t,length:n,finished:r,destroyed:a,outputLen:i,pos:s}=this;return e||(e=new this.constructor({dkLen:i})),e.set(...this.get()),e.length=n,e.finished=r,e.destroyed=a,e.outputLen=i,e.buffer.set(t),e.pos=s,e}}const wa=BigInt(2**32-1),Va=BigInt(32);function Ta(e,t=!1){return t?{h:Number(e&wa),l:Number(e>>Va&wa)}:{h:0|Number(e>>Va&wa),l:0|Number(e&wa)}}function Sa(e,t=!1){let n=new Uint32Array(e.length),r=new Uint32Array(e.length);for(let a=0;ae<>>32-n,_a=(e,t,n)=>t<>>32-n,Pa=(e,t,n)=>t<>>64-n,Ma=(e,t,n)=>e<>>64-n;const Ia={fromBig:Ta,split:Sa,toBig:(e,t)=>BigInt(e>>>0)<>>0),shrSH:(e,t,n)=>e>>>n,shrSL:(e,t,n)=>e<<32-n|t>>>n,rotrSH:(e,t,n)=>e>>>n|t<<32-n,rotrSL:(e,t,n)=>e<<32-n|t>>>n,rotrBH:(e,t,n)=>e<<64-n|t>>>n-32,rotrBL:(e,t,n)=>e>>>n-32|t<<64-n,rotr32H:(e,t)=>t,rotr32L:(e,t)=>e,rotlSH:ka,rotlSL:_a,rotlBH:Pa,rotlBL:Ma,add:function(e,t,n,r){const a=(t>>>0)+(r>>>0);return{h:e+n+(a/2**32|0)|0,l:0|a}},add3L:(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0),add3H:(e,t,n,r)=>t+n+r+(e/2**32|0)|0,add4L:(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0),add4H:(e,t,n,r,a)=>t+n+r+a+(e/2**32|0)|0,add5H:(e,t,n,r,a,i)=>t+n+r+a+i+(e/2**32|0)|0,add5L:(e,t,n,r,a)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(a>>>0)},Na=Ia,Ea=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),Oa=new Uint32Array(32);function Aa(e,t,n,r,a,i){const s=a[i],o=a[i+1];let c=Oa[2*e],d=Oa[2*e+1],u=Oa[2*t],l=Oa[2*t+1],f=Oa[2*n],p=Oa[2*n+1],h=Oa[2*r],b=Oa[2*r+1],m=Na.add3L(c,u,s);d=Na.add3H(m,d,l,o),c=0|m,({Dh:b,Dl:h}={Dh:b^d,Dl:h^c}),({Dh:b,Dl:h}={Dh:Na.rotr32H(b,h),Dl:Na.rotr32L(b,h)}),({h:p,l:f}=Na.add(p,f,b,h)),({Bh:l,Bl:u}={Bh:l^p,Bl:u^f}),({Bh:l,Bl:u}={Bh:Na.rotrSH(l,u,24),Bl:Na.rotrSL(l,u,24)}),Oa[2*e]=c,Oa[2*e+1]=d,Oa[2*t]=u,Oa[2*t+1]=l,Oa[2*n]=f,Oa[2*n+1]=p,Oa[2*r]=h,Oa[2*r+1]=b}function Ca(e,t,n,r,a,i){const s=a[i],o=a[i+1];let c=Oa[2*e],d=Oa[2*e+1],u=Oa[2*t],l=Oa[2*t+1],f=Oa[2*n],p=Oa[2*n+1],h=Oa[2*r],b=Oa[2*r+1],m=Na.add3L(c,u,s);d=Na.add3H(m,d,l,o),c=0|m,({Dh:b,Dl:h}={Dh:b^d,Dl:h^c}),({Dh:b,Dl:h}={Dh:Na.rotrSH(b,h,16),Dl:Na.rotrSL(b,h,16)}),({h:p,l:f}=Na.add(p,f,b,h)),({Bh:l,Bl:u}={Bh:l^p,Bl:u^f}),({Bh:l,Bl:u}={Bh:Na.rotrBH(l,u,63),Bl:Na.rotrBL(l,u,63)}),Oa[2*e]=c,Oa[2*e+1]=d,Oa[2*t]=u,Oa[2*t+1]=l,Oa[2*n]=f,Oa[2*n+1]=p,Oa[2*r]=h,Oa[2*r+1]=b}class Ha extends va{constructor(e={}){super(128,void 0===e.dkLen?64:e.dkLen,e,64,16,16),this.v0l=0|Ea[0],this.v0h=0|Ea[1],this.v1l=0|Ea[2],this.v1h=0|Ea[3],this.v2l=0|Ea[4],this.v2h=0|Ea[5],this.v3l=0|Ea[6],this.v3h=0|Ea[7],this.v4l=0|Ea[8],this.v4h=0|Ea[9],this.v5l=0|Ea[10],this.v5h=0|Ea[11],this.v6l=0|Ea[12],this.v6h=0|Ea[13],this.v7l=0|Ea[14],this.v7h=0|Ea[15];const t=e.key?e.key.length:0;if(this.v0l^=this.outputLen|t<<8|65536|1<<24,e.salt){const t=oa(ha(e.salt));this.v4l^=fa(t[0]),this.v4h^=fa(t[1]),this.v5l^=fa(t[2]),this.v5h^=fa(t[3])}if(e.personalization){const t=oa(ha(e.personalization));this.v6l^=fa(t[0]),this.v6h^=fa(t[1]),this.v7l^=fa(t[2]),this.v7h^=fa(t[3])}if(e.key){const t=new Uint8Array(this.blockLen);t.set(ha(e.key)),this.update(t)}}get(){let{v0l:e,v0h:t,v1l:n,v1h:r,v2l:a,v2h:i,v3l:s,v3h:o,v4l:c,v4h:d,v5l:u,v5h:l,v6l:f,v6h:p,v7l:h,v7h:b}=this;return[e,t,n,r,a,i,s,o,c,d,u,l,f,p,h,b]}set(e,t,n,r,a,i,s,o,c,d,u,l,f,p,h,b){this.v0l=0|e,this.v0h=0|t,this.v1l=0|n,this.v1h=0|r,this.v2l=0|a,this.v2h=0|i,this.v3l=0|s,this.v3h=0|o,this.v4l=0|c,this.v4h=0|d,this.v5l=0|u,this.v5h=0|l,this.v6l=0|f,this.v6h=0|p,this.v7l=0|h,this.v7h=0|b}compress(e,t,n){this.get().forEach(((e,t)=>Oa[t]=e)),Oa.set(Ea,16);let{h:r,l:a}=Na.fromBig(BigInt(this.length));Oa[24]=Ea[8]^a,Oa[25]=Ea[9]^r,n&&(Oa[28]=~Oa[28],Oa[29]=~Oa[29]);let i=0;const s=ga;for(let o=0;o<12;o++)Aa(0,4,8,12,e,t+2*s[i++]),Ca(0,4,8,12,e,t+2*s[i++]),Aa(1,5,9,13,e,t+2*s[i++]),Ca(1,5,9,13,e,t+2*s[i++]),Aa(2,6,10,14,e,t+2*s[i++]),Ca(2,6,10,14,e,t+2*s[i++]),Aa(3,7,11,15,e,t+2*s[i++]),Ca(3,7,11,15,e,t+2*s[i++]),Aa(0,5,10,15,e,t+2*s[i++]),Ca(0,5,10,15,e,t+2*s[i++]),Aa(1,6,11,12,e,t+2*s[i++]),Ca(1,6,11,12,e,t+2*s[i++]),Aa(2,7,8,13,e,t+2*s[i++]),Ca(2,7,8,13,e,t+2*s[i++]),Aa(3,4,9,14,e,t+2*s[i++]),Ca(3,4,9,14,e,t+2*s[i++]);this.v0l^=Oa[0]^Oa[16],this.v0h^=Oa[1]^Oa[17],this.v1l^=Oa[2]^Oa[18],this.v1h^=Oa[3]^Oa[19],this.v2l^=Oa[4]^Oa[20],this.v2h^=Oa[5]^Oa[21],this.v3l^=Oa[6]^Oa[22],this.v3h^=Oa[7]^Oa[23],this.v4l^=Oa[8]^Oa[24],this.v4h^=Oa[9]^Oa[25],this.v5l^=Oa[10]^Oa[26],this.v5h^=Oa[11]^Oa[27],this.v6l^=Oa[12]^Oa[28],this.v6h^=Oa[13]^Oa[29],this.v7l^=Oa[14]^Oa[30],this.v7h^=Oa[15]^Oa[31],Oa.fill(0)}destroy(){this.destroyed=!0,this.buffer32.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}const Ra=ya((e=>new Ha(e)));var Ba=n(8319),La=n(58861);const za=$e.Mn.crypto;const Ua={getRandomValues:function(e){return za.getRandomValues(e)}},Da={crypto:Ua};class qa{__internal__bridge;constructor(e){this.__internal__bridge=e}abort=()=>{throw new Error("abort")};__wbindgen_is_undefined=e=>void 0===this.__internal__bridge.getObject(e);__wbindgen_throw=(e,t)=>{throw new Error(this.__internal__bridge.getString(e,t))};__wbg_self_1b7a39e3a92c949c=()=>this.__internal__bridge.addObject(Da);__wbg_require_604837428532a733=(e,t)=>{throw new Error(`Unable to require ${this.__internal__bridge.getString(e,t)}`)};__wbg_crypto_968f1772287e2df0=e=>this.__internal__bridge.addObject(Ua);__wbg_getRandomValues_a3d34b4fee3c2869=e=>this.__internal__bridge.addObject(Ua.getRandomValues);__wbg_getRandomValues_f5e14ab7ac8e995d=(e,t,n)=>{Ua.getRandomValues(this.__internal__bridge.getU8a(t,n))};__wbg_randomFillSync_d5bd2d655fdf256a=(e,t,n)=>{throw new Error("randomFillsync is not available")};__wbindgen_object_drop_ref=e=>{this.__internal__bridge.takeObject(e)}}function ja(e,t,n){return async r=>{const a={error:null,type:"none",wasm:null};try{if(!t?.length)throw new Error("No WebAssembly provided for initialization");if("object"!=typeof WebAssembly||"function"!=typeof WebAssembly.instantiate)throw new Error("WebAssembly is not available in your environment");const e=await WebAssembly.instantiate(t,{wbg:r});a.wasm=e.instance.exports,a.type="wasm"}catch(i){"function"==typeof n?(a.wasm=n(r),a.type="asm"):(a.error=`FATAL: Unable to initialize @polkadot/wasm-${e}:: ${i.message}`,console.error(a.error))}return a}}const Fa=Uint8Array,Xa=Uint16Array,Wa=Uint32Array,Za=new Fa([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Ga=new Fa([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Ka=new Fa([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Ja=(e,t)=>{const n=new Xa(31);for(let a=0;a<31;++a)n[a]=t+=1<>>1|(21845&xV)<<1;e=(52428&e)>>>2|(13107&e)<<2,e=(61680&e)>>>4|(3855&e)<<4,ei[xV]=((65280&e)>>>8|(255&e)<<8)>>>1}const ti=(e,t,n)=>{const r=e.length;let a=0;const i=new Xa(t);for(;a>n]=r}}else for(o=new Xa(r),a=0;a>15-e[a]);return o},ni=new Fa(288);for(let xV=0;xV<144;++xV)ni[xV]=8;for(let xV=144;xV<256;++xV)ni[xV]=9;for(let xV=256;xV<280;++xV)ni[xV]=7;for(let xV=280;xV<288;++xV)ni[xV]=8;const ri=new Fa(32);for(let xV=0;xV<32;++xV)ri[xV]=5;const ai=ti(ni,9,1),ii=ti(ri,5,1),si=(e,t,n)=>{const r=t>>>3;return(e[r]|e[r+1]<<8)>>>(7&t)&n},oi=(e,t)=>{const n=t>>>3;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>>(7&t)},ci=e=>{let t=e[0];for(let n=1,r=e.length;nt&&(t=e[n]);return t},di=(e,t,n)=>{const r=!n||n.i;n||(n={});const a=e.length,i=!t||!r;t||(t=new Fa(3*a));const s=e=>{let n=t.length;if(e>n){const r=new Fa(Math.max(n<<1,e));r.set(t),t=r}};let o=n.f||0,c=n.p||0,d=n.b||0,u=n.l,l=n.d,f=n.m,p=n.n;if(o&&!u)return t;const h=a<<3;do{if(!u){n.f=o=si(e,c,1);const m=si(e,c+1,3);if(c+=3,!m){const o=((b=c)>>>3)+(7&b&&1)+4,u=e[o-4]|e[o-3]<<8,l=o+u;if(l>a){if(r)throw"unexpected EOF";break}i&&s(d+u),t.set(e.subarray(o,l),d),n.b=d+=u,n.p=c=l<<3;continue}if(1==m)u=ai,l=ii,f=9,p=5;else{if(2!=m)throw"invalid block type";{const t=si(e,c,31)+257,n=si(e,c+10,15)+4,a=t+si(e,c+5,31)+1;c+=14;const i=new Fa(a),s=new Fa(19);for(let r=0;rh)break;const b=ti(s,o,1);for(let r=0;r>>4;if(n<16)i[r++]=n;else{let t=0,a=0;for(16==n?(a=3+si(e,c,3),c+=2,t=i[r-1]):17==n?(a=3+si(e,c,7),c+=3):18==n&&(a=11+si(e,c,127),c+=7);a--;)i[r++]=t}}const m=i.subarray(0,t),y=i.subarray(t);f=ci(m),p=ci(y),u=ti(m,f,1),l=ti(y,p,1)}}if(c>h)throw"unexpected EOF"}i&&s(d+131072);const m=(1<>>4;if(c+=15&n,c>h)throw"unexpected EOF";if(!n)throw"invalid length/literal";if(r<256)t[d++]=r;else{if(256==r){u=void 0;break}{let n=r-254;if(r>264){const t=r-257,a=Ga[t];n=si(e,c,(1<>>4;if(!a)throw"invalid distance";c+=15&a;let u=$a[o];if(o>3){const t=Ka[o];u+=oi(e,c)&(1<h)throw"unexpected EOF";i&&s(d+131072);const f=d+n;for(;d{(null==t||t<0)&&(t=0),(null==n||n>e.length)&&(n=e.length);const r=new(e instanceof Xa?Xa:e instanceof Wa?Wa:Fa)(n-t);return r.set(e.subarray(t,n)),r})(t,0,d)};function ui(e,t){return di(((e=>{if(8!=(15&e[0])||e[0]>>>4>7||(e[0]<<8|e[1])%31)throw"invalid zlib data";if(32&e[1])throw"invalid zlib data: preset dictionaries not supported"})(e),e.subarray(2,-4)),t)}const li="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",fi=new Array(256);for(let xV=0,gV=64;xV=8&&(t[++a]=n>>>(r-=8)&255);return t}(pi.ee,new Uint8Array(pi.$o)),new Uint8Array(pi.qO)),bi=ja("crypto",hi,null),mi=new class{__internal__createWasm;__internal__heap;__internal__wbg;__internal__cachegetInt32;__internal__cachegetUint8;__internal__heapNext;__internal__wasm;__internal__wasmError;__internal__wasmPromise;__internal__type;constructor(e){this.__internal__createWasm=e,this.__internal__cachegetInt32=null,this.__internal__cachegetUint8=null,this.__internal__heap=new Array(32).fill(void 0).concat(void 0,null,!0,!1),this.__internal__heapNext=this.__internal__heap.length,this.__internal__type="none",this.__internal__wasm=null,this.__internal__wasmError=null,this.__internal__wasmPromise=null,this.__internal__wbg={...new qa(this)}}get error(){return this.__internal__wasmError}get type(){return this.__internal__type}get wasm(){return this.__internal__wasm}async init(e){this.__internal__wasmPromise&&!e||(this.__internal__wasmPromise=(e||this.__internal__createWasm)(this.__internal__wbg));const{error:t,type:n,wasm:r}=await this.__internal__wasmPromise;return this.__internal__type=n,this.__internal__wasm=r,this.__internal__wasmError=t,this.__internal__wasm}getObject(e){return this.__internal__heap[e]}dropObject(e){e<36||(this.__internal__heap[e]=this.__internal__heapNext,this.__internal__heapNext=e)}takeObject(e){const t=this.getObject(e);return this.dropObject(e),t}addObject(e){this.__internal__heapNext===this.__internal__heap.length&&this.__internal__heap.push(this.__internal__heap.length+1);const t=this.__internal__heapNext;return this.__internal__heapNext=this.__internal__heap[t],this.__internal__heap[t]=e,t}getInt32(){return null!==this.__internal__cachegetInt32&&this.__internal__cachegetInt32.buffer===this.__internal__wasm.memory.buffer||(this.__internal__cachegetInt32=new Int32Array(this.__internal__wasm.memory.buffer)),this.__internal__cachegetInt32}getUint8(){return null!==this.__internal__cachegetUint8&&this.__internal__cachegetUint8.buffer===this.__internal__wasm.memory.buffer||(this.__internal__cachegetUint8=new Uint8Array(this.__internal__wasm.memory.buffer)),this.__internal__cachegetUint8}getU8a(e,t){return this.getUint8().subarray(e/1,e/1+t)}getString(e,t){return nt(this.getU8a(e,t))}allocU8a(e){const t=this.__internal__wasm.__wbindgen_malloc(1*e.length);return this.getUint8().set(e,t/1),[t,e.length]}allocString(e){return this.allocU8a((0,La.j)(e))}resultU8a(){const e=this.getInt32()[2],t=this.getInt32()[3],n=this.getU8a(e,t).slice();return this.__internal__wasm.__wbindgen_free(e,1*t),n}resultString(){return nt(this.resultU8a())}}(bi);function yi(e){return(...t)=>{if(!mi.wasm)throw new Error("The WASM interface has not been initialized. Ensure that you wait for the initialization Promise with waitReady() from @polkadot/wasm-crypto (or cryptoWaitReady() from @polkadot/util-crypto) before attempting to use WASM-only interfaces.");return e(mi.wasm,...t)}}const xi=yi(((e,t)=>(e.ext_secp_pub_expand(8,...mi.allocU8a(t)),mi.resultU8a()))),gi=yi(((e,t,n,r)=>(e.ext_blake2b(8,...mi.allocU8a(t),...mi.allocU8a(n),r),mi.resultU8a()))),vi=yi(((e,t)=>(e.ext_keccak256(8,...mi.allocU8a(t)),mi.resultU8a()))),wi=yi(((e,t)=>(e.ext_keccak512(8,...mi.allocU8a(t)),mi.resultU8a()))),Vi=yi(((e,t,n)=>(e.ext_twox(8,...mi.allocU8a(t),n),mi.resultU8a())));function Ti(){return!!mi.wasm}async function Si(){try{const e=await async function(e){return mi.init(e)}();return!!e}catch{return!1}}function ki(e){return(...t)=>(0,N.X)(e(...t))}function _i(e,t){return(n,r=256,a)=>{const i=(0,E.e)(n);return!Ba.CW||!a&&Ti()?e[r](i):t[r](i)}}function Pi(e,t=256,n,r){const a=Math.ceil(t/8),i=(0,E.e)(e);return!Ba.CW||!r&&Ti()?gi(i,(0,E.e)(n),a):Ra(i,n?{dkLen:a,key:n}:{dkLen:a})}const Mi=ki(Pi),Ii={extrinsic:{},payload:{}},Ni={LimitParathreadCommits:Ii,OnlyStakingAndClaims:Ii,PrevalidateAttests:Ii,RestrictFunctionality:Ii,TransactionCallFilter:Ii,ValidateDoubleVoteReports:Ii},Ei={DisallowSigned:Ii},Oi={extrinsic:{era:"ExtrinsicEra"},payload:{blockHash:"Hash"}},Ai={extrinsic:{tip:"Compact"},payload:{}},Ci={ChargeTransactionPayment:Ai,CheckBlockGasLimit:Ii,CheckEra:Oi,CheckGenesis:{extrinsic:{},payload:{genesisHash:"Hash"}},CheckMetadataHash:{extrinsic:{mode:"u8"},payload:{metadataHash:"Option<[u8;32]>"}},CheckMortality:Oi,CheckNonZeroSender:Ii,CheckNonce:{extrinsic:{nonce:"Compact"},payload:{}},CheckSpecVersion:{extrinsic:{},payload:{specVersion:"u32"}},CheckTxVersion:{extrinsic:{},payload:{transactionVersion:"u32"}},CheckVersion:{extrinsic:{},payload:{specVersion:"u32"}},CheckWeight:Ii,LockStakingStatus:Ii,SkipCheckIfFeeless:Ai,ValidateEquivocationReport:Ii},Hi=(0,M.b)({},Ci,Ni,Ei,{ChargeAssetTxPayment:{extrinsic:{tip:"Compact",assetId:"TAssetConversion"},payload:{}}}),Ri=["CheckVersion","CheckGenesis","CheckEra","CheckNonce","CheckWeight","ChargeTransactionPayment","CheckBlockGasLimit"];function Bi(e,t,n={}){return e.map((e=>n[e]||Hi[e])).filter((e=>!!e)).reduce(((e,n)=>(0,M.b)(e,n[t])),{})}class Li extends Kn{__internal__meta;__internal__method;__internal__names=null;__internal__section;__internal__typeDef;constructor(e,t,n,r="",a=""){const i=n?.fields||[];super(e,i.map((({type:t})=>e.createLookupType(t))),t),this.__internal__meta=n,this.__internal__method=a,this.__internal__section=r,this.__internal__typeDef=i.map((({type:t})=>e.lookup.getTypeDef(t)));const s=i.map((({name:t})=>e.lookup.sanitizeField(t)[0])).filter((e=>!!e));s.length===i.length&&(this.__internal__names=s,De(this,s,((e,t)=>this[t])))}get meta(){return this.__internal__meta}get method(){return this.__internal__method}get names(){return this.__internal__names}get section(){return this.__internal__section}get typeDef(){return this.__internal__typeDef}toHuman(e,t){if(null!==this.__internal__names){const n={};for(let r=0,a=this.__internal__names.length;re.toString()))}:null,super.toHuman(e,t))}}class Ui{registry;createdAtHash;initialU8aLength;isStorageFallback;__internal__raw;constructor(e,t,n){this.initialU8aLength=n,this.__internal__raw=t,this.registry=e}get encodedLength(){return this.toU8a().length}get hash(){return this.registry.hash(this.toU8a())}get inner(){return this.__internal__raw}get isEmpty(){return this.__internal__raw.isEmpty}eq(e){return this.__internal__raw.eq(e)}inspect(){return this.__internal__raw.inspect()}toHex(e){return this.__internal__raw.toHex(e)}toHuman(e,t){return this.__internal__raw.toHuman(e,t)}toJSON(){return this.__internal__raw.toJSON()}toPrimitive(e){return this.__internal__raw.toPrimitive(e)}toString(){return this.__internal__raw.toString()}toU8a(e){return this.__internal__raw.toU8a(e)}unwrap(){return this.__internal__raw}valueOf(){return this.__internal__raw}}const Di=new Uint8Array,qi=new Uint8Array([0]),ji="bare",Fi=["ExtrinsicUnknown","ExtrinsicUnknown","ExtrinsicUnknown","ExtrinsicUnknown","ExtrinsicV4","ExtrinsicV5"],Xi={bare:"ExtrinsicV5",general:"GeneralExtrinsic",signed:"ExtrinsicV5"},Wi=0,Zi=64,Gi=128,Ki={0:"bare",64:"general",128:"signed"};function Ji(e,t,n,r){if(t instanceof $i)return t.unwrap();const a=!(128&~n),i=5==(63&n)?Xi[r]:Fi[63&n]||Fi[0];return e.createTypeUnsafe(i,[t,{isSigned:a,version:n}])}function Yi(e,t,n=4,r=ji){return(0,ut.b)(t)||Array.isArray(t)||(0,Je.qv)(t)?function(e,t,n,r){if(!t.length)return Ji(e,new Uint8Array,n,r);const[a,i]=ct(t),s=a+i.toNumber();if(s>t.length)throw new Error(`Extrinsic: length less than remainder, expected at least ${s}, found ${t.length}`);const o=t.subarray(a,s),c=192&o[0];return Ji(e,"general"===Ki[`${c}`]?t:o.subarray(1),o[0],Ki[`${c}`]||r)}(e,(0,E.e)(t),n,r):t instanceof e.createClassUnsafe("Call")?Ji(e,{method:t},n,r):Ji(e,t,n,r)}class Qi extends Ui{__internal__preamble;constructor(e,t,n,r){super(e,t,n);const a=Object.keys(e.getSignedExtensionTypes());if(5===this.version&&"general"!==r){const e=e=>this.inner.signature[e];for(let t=0,n=a.length;t>12,1),o=(a>>4)*s;if(i<4||o>=i)throw new Error("Invalid data passed to Mortal era");return[new es(e,i),new es(e,o)]}(e,(0,E.e)(t));if(!t)return[new es(e),new es(e)];if((0,Xe.G)(t))return function(e,t){const{current:n,period:r}=t;let a=Math.pow(2,Math.ceil(Math.log2(r)));a=Math.min(Math.max(a,4),65536);const i=n%a,s=Math.max(a>>12,1),o=i/s*s;return[new es(e,a),new es(e,o)]}(e,t);throw new Error("Invalid data passed to Mortal era")}function rs(e=new Uint8Array){if((0,ut.b)(e))return e.length&&0!==e[0]?new Uint8Array([1,e[0],e[1]]):new Uint8Array([0]);if(!e)return new Uint8Array([0]);if(e instanceof ss)return rs(e.toU8a());if((0,Je.qv)(e))return rs((0,ts.V)(e));if((0,Xe.G)(e)){const t=Object.entries(e).map((([e,t])=>[e.toLowerCase(),t])),n=t.find((([e])=>"mortalera"===e.toLowerCase())),r=t.find((([e])=>"immortalera"===e.toLowerCase()));return n?{MortalEra:n[1]}:r?{ImmortalEra:r[1]}:{MortalEra:e}}throw new Error("Invalid data passed to Era")}class as extends rt{constructor(e,t){super(e,qi)}}class is extends Kn{constructor(e,t){super(e,{period:es,phase:es},ns(e,t))}get encodedLength(){return 2}get period(){return this[0]}get phase(){return this[1]}toHuman(){return{period:Dn(this.period),phase:Dn(this.phase)}}toJSON(){return this.toHex()}toU8a(e){const t=this.period.toNumber(),n=Math.min(15,Math.max(1,function(e){const t=e.toString(2);let n=0;for(;"0"===t[t.length-1-n];)n++;return n}(t)-1))+(this.phase.toNumber()/Math.max(t>>12,1)<<4);return new Uint8Array([255&n,n>>8])}birth(e){const t=this.phase.toNumber(),n=this.period.toNumber();return~~((Math.max(kt(e).toNumber(),t)-t)/n)*n+t}death(e){return this.birth(e)+this.period.toNumber()}}class ss extends nn{constructor(e,t){super(e,{ImmortalEra:as,MortalEra:is},rs(t))}get encodedLength(){return this.isImmortalEra?this.asImmortalEra.encodedLength:this.asMortalEra.encodedLength}get asImmortalEra(){if(!this.isImmortalEra)throw new Error(`Cannot convert '${this.type}' via asImmortalEra`);return this.inner}get asMortalEra(){if(!this.isMortalEra)throw new Error(`Cannot convert '${this.type}' via asMortalEra`);return this.inner}get isImmortalEra(){return 0===this.index}get isMortalEra(){return this.index>0}toU8a(e){return this.isMortalEra?this.asMortalEra.toU8a(e):this.asImmortalEra.toU8a(e)}}const os=["ExtrinsicPayloadUnknown","ExtrinsicPayloadUnknown","ExtrinsicPayloadUnknown","ExtrinsicPayloadUnknown","ExtrinsicPayloadV4","ExtrinsicPayloadV5"],cs={bare:"ExtrinsicPayloadV5",general:"ExtrinsicPayloadV5",signed:"ExtrinsicPayloadV5"};class ds extends Ui{constructor(e,t,{preamble:n,version:r}={}){super(e,function(e,t,n=5,r=ji){if(t instanceof ds)return t.unwrap();const a=5===n?cs[r]:os[n]||os[0];if(t&&t.assetId&&(0,Je.qv)(t.assetId)){const r={...t,assetId:e.createType("TAssetConversion",(0,ts.V)(t.assetId)).toJSON()};return e.createTypeUnsafe(a,[r,{version:n}])}return e.createTypeUnsafe(a,[t,{version:n}])}(e,t,r,n))}get blockHash(){return this.inner.blockHash}get era(){return this.inner.era}get genesisHash(){return this.inner.genesisHash||this.registry.createTypeUnsafe("Hash",[])}get method(){return this.inner.method}get nonce(){return this.inner.nonce}get specVersion(){return this.inner.specVersion||this.registry.createTypeUnsafe("u32",[])}get tip(){return this.inner.tip||this.registry.createTypeUnsafe("Compact",[])}get transactionVersion(){return this.inner.transactionVersion||this.registry.createTypeUnsafe("u32",[])}get assetId(){return this.inner.assetId}get metadataHash(){return this.inner.metadataHash}eq(e){return this.inner.eq(e)}sign(e){const t=this.inner.sign(e);return{signature:(0,N.X)(t)}}toHuman(e,t){return this.inner.toHuman(e,t)}toJSON(){return this.toHex()}toRawType(){return"ExtrinsicPayload"}toString(){return this.toHex()}toU8a(e){return super.toU8a(!!e&&{method:!0})}}class us extends dn{constructor(e,t,{version:n=0}={}){throw super(e,{}),new Error(`Unsupported extrinsic payload version ${n}`)}}class ls extends dn{constructor(e,t,{isSigned:n=!1,version:r=0}={}){throw super(e,{}),new Error(`Unsupported ${n?"":"un"}signed extrinsic version ${127&r}`)}}const fs={address:"Address",assetId:"Option",blockHash:"Hash",blockNumber:"BlockNumber",era:"ExtrinsicEra",genesisHash:"Hash",metadataHash:"Option<[u8;32]>",method:"Call",mode:"u8",nonce:"Compact",runtimeVersion:"RuntimeVersion",signedExtensions:"Vec",tip:"Compact",version:"u8"};class ps extends dn{__internal__extraTypes;constructor(e,t){const n=(0,M.b)({},e.getSignedExtensionTypes(),e.getSignedExtensionExtra());super(e,(0,M.b)({},n,fs,{withSignedTransaction:"bool"}),t),this.__internal__extraTypes={};const r=e=>this.get(e);for(const[a,i]of Object.entries(n))fs[a]||(this.__internal__extraTypes[a]=i),Ue(this,a,r)}get address(){return this.getT("address")}get blockHash(){return this.getT("blockHash")}get blockNumber(){return this.getT("blockNumber")}get era(){return this.getT("era")}get genesisHash(){return this.getT("genesisHash")}get method(){return this.getT("method")}get nonce(){return this.getT("nonce")}get runtimeVersion(){return this.getT("runtimeVersion")}get signedExtensions(){return this.getT("signedExtensions")}get tip(){return this.getT("tip")}get assetId(){return this.getT("assetId")}get version(){return this.getT("version")}get mode(){return this.getT("mode")}get metadataHash(){return this.getT("metadataHash")}get withSignedTransaction(){return this.getT("withSignedTransaction").isTrue}toPayload(){const e={},t=Object.keys(this.__internal__extraTypes);for(let n=0,r=t.length;ne.toString())),specVersion:this.runtimeVersion.specVersion.toHex(),tip:this.tip.toHex(),transactionVersion:this.runtimeVersion.transactionVersion.toHex(),version:this.version.toNumber(),withSignedTransaction:this.withSignedTransaction})}toRaw(){const e=this.toPayload(),t=(0,N.X)(this.registry.createTypeUnsafe("ExtrinsicPayload",[e,{version:e.version}]).toU8a({method:!0}));return{address:e.address,data:t,type:"payload"}}}class hs extends dn{constructor(e,t,{isSigned:n}={}){super(e,{signature:"ExtrinsicSignatureV4",method:"Call"},hs.decodeExtrinsic(e,t,n))}static decodeExtrinsic(e,t,n=!1){if(t instanceof hs)return t;if(t instanceof e.createClassUnsafe("Call"))return{method:t};if((0,ut.b)(t)){const r=e.createTypeUnsafe("ExtrinsicSignatureV4",[t,{isSigned:n}]);return{method:e.createTypeUnsafe("Call",[t.subarray(r.encodedLength)]),signature:r}}return t||{}}get encodedLength(){return this.toU8a().length}get method(){return this.getT("method")}get signature(){return this.getT("signature")}get version(){return 4}addSignature(e,t,n){return this.signature.addSignature(e,t,n),this}sign(e,t){return this.signature.sign(this.method,e,t),this}signFake(e,t){return this.signature.signFake(this.method,e,t),this}}class bs extends dn{__internal__signOptions;constructor(e,t){super(e,(0,M.b)({method:"Bytes"},e.getSignedExtensionTypes(),e.getSignedExtensionExtra()),t),this.__internal__signOptions={withType:e.createTypeUnsafe("ExtrinsicSignature",[])instanceof nn}}inspect(){return super.inspect({method:!0})}get blockHash(){return this.getT("blockHash")}get era(){return this.getT("era")}get genesisHash(){return this.getT("genesisHash")}get method(){return this.getT("method")}get nonce(){return this.getT("nonce")}get specVersion(){return this.getT("specVersion")}get tip(){return this.getT("tip")}get transactionVersion(){return this.getT("transactionVersion")}get assetId(){return this.getT("assetId")}get metadataHash(){return this.getT("metadataHash")}sign(e){return function(e,t,n,r){const a=n.length>256?e.hash(n):n;return t.sign(a,r)}(this.registry,e,this.toU8a({method:!0}),this.__internal__signOptions)}}const ms=new Uint8Array(256).fill(1);function ys(e,t){return e.createTypeUnsafe("Address",[(0,ut.b)(t)?(0,N.X)(t):t])}class xs extends dn{__internal__signKeys;constructor(e,t,{isSigned:n}={}){const r=e.getSignedExtensionTypes();super(e,(0,M.b)({signer:"Address",signature:"ExtrinsicSignature"},r),xs.decodeExtrinsicSignature(t,n)),this.__internal__signKeys=Object.keys(r),De(this,this.__internal__signKeys,(e=>this.get(e)))}static decodeExtrinsicSignature(e,t=!1){return e&&(e instanceof xs||t)?e:Di}get encodedLength(){return this.isSigned?super.encodedLength:0}get isSigned(){return!this.signature.isEmpty}get era(){return this.getT("era")}get nonce(){return this.getT("nonce")}get signature(){return this.multiSignature.value||this.multiSignature}get multiSignature(){return this.getT("signature")}get signer(){return this.getT("signer")}get tip(){return this.getT("tip")}get assetId(){return this.getT("assetId")}get mode(){return this.getT("mode")}get metadataHash(){return this.getT("metadataHash")}_injectSignature(e,t,n){for(let r=0,a=this.__internal__signKeys.length;rthis.get(e)))}static decodeExtrinsicSignature(e,t=!1){return e&&(e instanceof Ts||t)?e:Di}get encodedLength(){return this.isSigned?super.encodedLength:0}get isSigned(){return!this.signature.isEmpty}get era(){return this.getT("era")}get nonce(){return this.getT("nonce")}get signature(){return this.multiSignature.value||this.multiSignature}get multiSignature(){return this.getT("signature")}get signer(){return this.getT("signer")}get tip(){return this.getT("tip")}get assetId(){return this.getT("assetId")}get mode(){return this.getT("mode")}get metadataHash(){return this.getT("metadataHash")}get transactionExtensionVersion(){return this.getT("transactionExtensionVersion")}_injectSignature(e,t,n){for(let r=0,a=this.__internal__signKeys.length;re.length)throw new Error(`Extrinsic: length less than remainder, expected at least ${r}, found ${e.length}`);const a=e.subarray(t,r);if(69!==a[0])throw new Error("Extrinsic: incorrect version for General Transactions, expected 5, found "+(127&a[0]));return a.subarray(1)}((0,E.e)(t));if((0,Xe.G)(t)){const{payload:n,transactionExtensionVersion:r}=t;return(0,M.b)(n||{},{transactionExtensionVersion:r||e.getTransactionExtensionVersion()})}return{}}get encodedLength(){return super.encodedLength}get era(){return this.getT("era")}get nonce(){return this.getT("nonce")}get tip(){return this.getT("tip")}get assetId(){return this.getT("assetId")}get mode(){return this.getT("mode")}get metadataHash(){return this.getT("metadataHash")}get transactionExtensionVersion(){return this.getT("transactionExtensionVersion")}get method(){return this.getT("method")}get version(){return this.__internal__version}get preamble(){return this.__internal__preamble}toHex(e){return(0,N.X)(this.toU8a(e))}toU8a(e){return e?this.encode():ar(this.encode())}toRawType(){return"GeneralExt"}encode(){return Mt(new Uint8Array([this.version|this.preamble]),super.toU8a())}signFake(){throw new Error("Extrinsic: Type GeneralExtrinsic does not have signFake implemented")}addSignature(){throw new Error("Extrinsic: Type GeneralExtrinsic does not have addSignature implemented")}sign(){throw new Error("Extrinsic: Type GeneralExtrinsic does not have sign implemented")}signature(){throw new Error("Extrinsic: Type GeneralExtrinsic does not have the signature getter")}}function ks(e){if(!Number.isSafeInteger(e))throw new Error(`Wrong integer: ${e}`)}function _s(e){return e instanceof Uint8Array||null!=e&&"object"==typeof e&&"Uint8Array"===e.constructor.name}function Ps(...e){const t=e=>e,n=(e,t)=>n=>e(t(n));return{encode:e.map((e=>e.encode)).reduceRight(n,t),decode:e.map((e=>e.decode)).reduce(n,t)}}function Ms(e){return{encode:t=>{if(!Array.isArray(t)||t.length&&"number"!=typeof t[0])throw new Error("alphabet.encode input should be an array of numbers");return t.map((t=>{if(ks(t),t<0||t>=e.length)throw new Error(`Digit index outside alphabet: ${t} (alphabet: ${e.length})`);return e[t]}))},decode:t=>{if(!Array.isArray(t)||t.length&&"string"!=typeof t[0])throw new Error("alphabet.decode input should be array of strings");return t.map((t=>{if("string"!=typeof t)throw new Error(`alphabet.decode: not string element=${t}`);const n=e.indexOf(t);if(-1===n)throw new Error(`Unknown letter: "${t}". Allowed: ${e}`);return n}))}}}function Is(e=""){if("string"!=typeof e)throw new Error("join separator should be string");return{encode:t=>{if(!Array.isArray(t)||t.length&&"string"!=typeof t[0])throw new Error("join.encode input should be array of strings");for(let e of t)if("string"!=typeof e)throw new Error(`join.encode: non-string input=${e}`);return t.join(e)},decode:t=>{if("string"!=typeof t)throw new Error("join.decode input should be string");return t.split(e)}}}function Ns(e,t="="){if(ks(e),"string"!=typeof t)throw new Error("padding chr should be string");return{encode(n){if(!Array.isArray(n)||n.length&&"string"!=typeof n[0])throw new Error("padding.encode input should be array of strings");for(let e of n)if("string"!=typeof e)throw new Error(`padding.encode: non-string input=${e}`);for(;n.length*e%8;)n.push(t);return n},decode(n){if(!Array.isArray(n)||n.length&&"string"!=typeof n[0])throw new Error("padding.encode input should be array of strings");for(let e of n)if("string"!=typeof e)throw new Error(`padding.decode: non-string input=${e}`);let r=n.length;if(r*e%8)throw new Error("Invalid padding: string should have whole number of bytes");for(;r>0&&n[r-1]===t;r--)if(!((r-1)*e%8))throw new Error("Invalid padding: string has too much padding");return n.slice(0,r)}}}function Es(e){if("function"!=typeof e)throw new Error("normalize fn should be function");return{encode:e=>e,decode:t=>e(t)}}function Os(e,t,n){if(t<2)throw new Error(`convertRadix: wrong from=${t}, base cannot be less than 2`);if(n<2)throw new Error(`convertRadix: wrong to=${n}, base cannot be less than 2`);if(!Array.isArray(e))throw new Error("convertRadix: data should be array");if(!e.length)return[];let r=0;const a=[],i=Array.from(e);for(i.forEach((e=>{if(ks(e),e<0||e>=t)throw new Error(`Wrong integer: ${e}`)}));;){let e=0,s=!0;for(let a=r;at?As(t,e%t):e,Cs=(e,t)=>e+(t-As(e,t));function Hs(e,t,n,r){if(!Array.isArray(e))throw new Error("convertRadix2: data should be array");if(t<=0||t>32)throw new Error(`convertRadix2: wrong from=${t}`);if(n<=0||n>32)throw new Error(`convertRadix2: wrong to=${n}`);if(Cs(t,n)>32)throw new Error(`convertRadix2: carry overflow from=${t} to=${n} carryBits=${Cs(t,n)}`);let a=0,i=0;const s=2**n-1,o=[];for(const c of e){if(ks(c),c>=2**t)throw new Error(`convertRadix2: invalid data word=${c} from=${t}`);if(a=a<32)throw new Error(`convertRadix2: carry overflow pos=${i} from=${t}`);for(i+=t;i>=n;i-=n)o.push((a>>i-n&s)>>>0);a&=2**i-1}if(a=a<=t)throw new Error("Excess padding");if(!r&&a)throw new Error(`Non-zero padding: ${a}`);return r&&i>0&&o.push(a>>>0),o}function Rs(e){return ks(e),{encode:t=>{if(!_s(t))throw new Error("radix.encode input should be Uint8Array");return Os(Array.from(t),256,e)},decode:t=>{if(!Array.isArray(t)||t.length&&"number"!=typeof t[0])throw new Error("radix.decode input should be array of numbers");return Uint8Array.from(Os(t,e,256))}}}function Bs(e,t=!1){if(ks(e),e<=0||e>32)throw new Error("radix2: bits should be in (0..32]");if(Cs(8,e)>32||Cs(e,8)>32)throw new Error("radix2: carry overflow");return{encode:n=>{if(!_s(n))throw new Error("radix2.encode input should be Uint8Array");return Hs(Array.from(n),8,e,!t)},decode:n=>{if(!Array.isArray(n)||n.length&&"number"!=typeof n[0])throw new Error("radix2.decode input should be array of numbers");return Uint8Array.from(Hs(n,e,8,t))}}}const Ls=Ps(Bs(4),Ms("0123456789ABCDEF"),Is("")),zs=Ps(Bs(5),Ms("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"),Ns(5),Is("")),Us=(Bs(5),Ms("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"),Is(""),Bs(5),Ms("0123456789ABCDEFGHIJKLMNOPQRSTUV"),Ns(5),Is(""),Bs(5),Ms("0123456789ABCDEFGHIJKLMNOPQRSTUV"),Is(""),Bs(5),Ms("0123456789ABCDEFGHJKMNPQRSTVWXYZ"),Is(""),Es((e=>e.toUpperCase().replace(/O/g,"0").replace(/[IL]/g,"1"))),Ps(Bs(6),Ms("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),Ns(6),Is(""))),Ds=(Bs(6),Ms("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),Is(""),Ps(Bs(6),Ms("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),Ns(6),Is(""))),qs=(Bs(6),Ms("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),Is(""),e=>Ps(Rs(58),Ms(e),Is(""))),js=qs("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),Fs=[0,2,3,5,6,7,9,10,11],Xs={encode(e){let t="";for(let n=0;n(new TextDecoder).decode(e),decode:e=>(new TextEncoder).encode(e)};Bs(4),Ms("0123456789abcdef"),Is(""),Es((e=>{if("string"!=typeof e||e.length%2)throw new TypeError(`hex.decode: expected string, got ${typeof e} with length ${e.length}`);return e.toLowerCase()}));function Zs({coder:e,ipfs:t},n){return(r,a)=>(n(r,a),e.decode(t&&a?r.substring(1):r))}function Gs({coder:e,ipfs:t}){return(n,r)=>{const a=e.encode((0,E.e)(n));return t&&r?`${t}${a}`:a}}function Ks({chars:e,ipfs:t,type:n,withPadding:r}){return(a,i)=>{if("string"!=typeof a)throw new Error(`Expected ${n} string input`);if(t&&i&&!a.startsWith(t))throw new Error(`Expected ipfs-compatible ${n} to start with '${t}'`);for(let t=i?1:0,s=a.length;te)),prefix:42};function fo(e,t,n=-1){if(!e)throw new Error("Invalid empty address passed");if((0,ut.b)(e)||(0,Je.qv)(e))return(0,E.e)(e);try{const r=Qs(e);if(!lo.allowedEncodedLengths.includes(r.length))throw new Error("Invalid decoded address length");const[a,i,s,o]=function(e){const t=64&e[0]?2:1,n=1===t?e[0]:(63&e[0])<<2|e[1]>>6|(63&e[1])<<8,r=[34+t,35+t].includes(e.length),a=e.length-(r?2:1),i=to(e.subarray(0,a));return[!(128&e[0]||[46,47].includes(e[0])||(r?e[e.length-2]!==i[0]||e[e.length-1]!==i[1]:e[e.length-1]!==i[0])),a,t,n]}(r);if(!a&&!t)throw new Error("Invalid decoded address checksum");if(-1!==n&&n!==o)throw new Error(`Expected ss58Format ${n}, received ${o}`);return r.slice(s,i)}catch(r){throw new Error(`Decoding ${e}: ${r.message}`)}}function po(e,t=lo.prefix){const n=fo(e);if(t<0||t>16383||[46,47].includes(t))throw new Error("Out of range ss58Format specified");if(!lo.allowedDecodedLengths.includes(n.length))throw new Error(`Expected a valid key to convert, with length ${lo.allowedDecodedLengths.join(", ")}`);const r=Mt(t<64?[t]:[(252&t)>>2|64,t>>8|(3&t)<<6],n);return $s(Mt(r,to(r).subarray(0,[32,33].includes(n.length)?2:1)))}function ho(e){if((0,ut.b)(e)||Array.isArray(e))return(0,E.e)(e);if(!e)return new Uint8Array;if((0,Je.qv)(e))return(0,ts.V)(e);if((0,I.K)(e))return fo(e.toString());throw new Error("Unknown type passed to AccountId constructor, found typeof "+typeof e)}class bo extends lr{constructor(e,t=264,n){const r=ho(n);if(8*r.lengthe)))throw new Error(`Invalid AccountId provided, expected ${t>>3} bytes, found ${r.length}`);super(e,r,t)}eq(e){return super.eq(ho(e))}toHuman(){return this.toJSON()}toJSON(){return this.toString()}toPrimitive(){return this.toJSON()}toString(){return po(this,this.registry.chainSS58)}toRawType(){return"AccountId"}}class mo extends bo{constructor(e,t){super(e,256,t)}}class yo extends bo{constructor(e,t){super(e,264,t)}}class xo extends(rr.with(32)){__UIntType="u32"}const go=new st(239),vo=new st(1).shln(16),wo=new st(1).shln(32);function Vo(e){return e instanceof To?e.toBn():(0,pn.f)(e)||(0,Lt.E)(e)||(0,Je.qv)(e)||(0,ut.b)(e)||(0,wt.s)(e)?e:Vo(fo(e))}class To extends xo{constructor(e,t=new st(0)){super(e,Vo(t))}static calcLength(e){const t=kt(e);return t.lte(go)?1:t.lt(vo)?2:t.lt(wo)?4:8}static readLength(e){const t=e[0];return 252===t?[1,2]:253===t?[1,4]:254===t?[1,8]:[0,1]}static writeLength(e){switch(e.length){case 2:return new Uint8Array([252]);case 4:return new Uint8Array([253]);case 8:return new Uint8Array([254]);default:return new Uint8Array([])}}eq(e){return(0,pn.f)(e)||(0,Lt.E)(e)?super.eq(e):super.eq(this.registry.createTypeUnsafe("AccountIndex",[e]))}toHuman(){return this.toJSON()}toJSON(){return this.toString()}toPrimitive(){return this.toJSON()}toString(){const e=To.calcLength(this);return po(this.toU8a().subarray(0,e),this.registry.chainSS58)}toRawType(){return"AccountIndex"}}class So extends dn{constructor(e,t){super(e,{header:"Header",extrinsics:"Vec"},t)}get contentHash(){return this.registry.hash(this.toU8a())}get extrinsics(){return this.getT("extrinsics")}get hash(){return this.header.hash}get header(){return this.getT("header")}}function ko(e,t){return t.fields.reduce(((t,{name:n,type:r},a)=>(t[n.unwrapOr(`param${a}`).toString()]=e.createLookupType(r),t)),{})}function _o(e,t=new Uint8Array,n){if((0,ut.b)(t)||(0,Je.qv)(t))return function(e,t,n){const r=e.firstCallIndex.slice();r.set(t.subarray(0,2),0);const a=n||e.findMetaCall(r).meta;return{args:t.subarray(2),argsDef:ko(e,a),callIndex:r,meta:a}}(e,(0,E.e)(t),n);if((0,Xe.G)(t)&&t.callIndex&&t.args)return function(e,t,n){const{args:r,callIndex:a}=t,i=a instanceof Po?a.toU8a():a,s=n||e.findMetaCall(i).meta;return{args:r,argsDef:ko(e,s),callIndex:a,meta:s}}(e,t,n);throw new Error(`Call: Cannot decode value '${t}' of type ${typeof t}`)}class Po extends lr{constructor(e,t){super(e,t,16)}toPrimitive(){return this.toHex()}}class Mo extends dn{_meta;constructor(e,t,n){const r=_o(e,t,n);try{super(e,{callIndex:Po,args:dn.with(r.argsDef)},r)}catch(a){let t="unknown.unknown";try{const n=e.findMetaCall(r.callIndex);t=`${n.section}.${n.method}`}catch{}throw new Error(`Call: failed decoding ${t}:: ${a.message}`)}this._meta=r.meta}get args(){return[...this.getT("args").values()]}get argsDef(){return ko(this.registry,this.meta)}get argsEntries(){return[...this.getT("args").entries()]}get callIndex(){return this.getT("callIndex").toU8a()}get data(){return this.getT("args").toU8a()}get meta(){return this._meta}get method(){return this.registry.findMetaCall(this.callIndex).method}get section(){return this.registry.findMetaCall(this.callIndex).section}is(e){return e.callIndex[0]===this.callIndex[0]&&e.callIndex[1]===this.callIndex[1]}toHuman(e,t){let n;try{n=this.registry.findMetaCall(this.callIndex)}catch{}return(0,M.b)({args:this.argsEntries.reduce(((n,[r,a])=>(0,M.b)(n,{[r]:a.toHuman(e,t)})),{}),method:n?.method,section:n?.section},e&&n?{docs:n.meta.docs.map((e=>e.toString()))}:null)}toRawType(){return"Call"}}function Io(e,t,n,r=!0){return n&&(0,qe.T)(n.unwrapOrDefault)?n:e.createTypeUnsafe(t,[r?(0,Kt.k)(n)||(0,Fe.b)(n)?null:Array.isArray(n)?n:[n]:n])}function No(e,t){return(t&&(0,qe.T)(t.entries)?[...t.entries()]:Object.entries(t||{})).reduce(((t,[n,r])=>(t[n]=function(e,t,n){return"ss58Format"===t?Io(e,"Option",n,!1):"tokenDecimals"===t?Io(e,"Option>",n):"tokenSymbol"===t?Io(e,"Option>",n):"isEthereum"===t?Io(e,"Bool",n,!1):n}(e,n,r),t)),{isEthereum:e.createTypeUnsafe("Bool",[]),ss58Format:e.createTypeUnsafe("Option",[]),tokenDecimals:e.createTypeUnsafe("Option>",[]),tokenSymbol:e.createTypeUnsafe("Option>",[])})}class Eo extends Ke{constructor(e,t){super(e,No(e,t))}get isEthereum(){return this.getT("isEthereum")}get ss58Format(){return this.getT("ss58Format")}get tokenDecimals(){return this.getT("tokenDecimals")}get tokenSymbol(){return this.getT("tokenSymbol")}}const Oo=(0,La.j)("aura"),Ao=(0,La.j)("BABE"),Co=(0,La.j)("FRNK"),Ho=(0,La.j)("pow_"),Ro=(0,La.j)("nmbs");class Bo extends lr{constructor(e,t){super(e,(0,Lt.E)(t)?Pt(t,{isLe:!1}):t,32)}get isAura(){return this.eq(Oo)}get isBabe(){return this.eq(Ao)}get isGrandpa(){return this.eq(Co)}get isPow(){return this.eq(Ho)}get isNimbus(){return this.eq(Ro)}extractAuthor(e,t){if(t?.length){if(this.isAura)return function(e,t,n){return n[e.createTypeUnsafe("RawAuraPreDigest",[t.toU8a(!0)]).slotNumber.mod(new st(n.length)).toNumber()]}(this.registry,e,t);if(this.isBabe)return function(e,t,n){return n[e.createTypeUnsafe("RawBabePreDigestCompat",[t.toU8a(!0)]).value.toNumber()]}(this.registry,e,t)}if(this.isPow||this.isNimbus)return function(e,t){return e.createTypeUnsafe("AccountId",[t])}(this.registry,e)}toHuman(){return this.toString()}toRawType(){return"ConsensusEngineId"}toString(){return this.isAscii?nt(this):(0,N.X)(this)}}const Lo=new Uint8Array([255]);function zo(e,t){return t instanceof Uo?t.inner:t instanceof mo||t instanceof To?t:(0,pn.f)(t)||(0,Lt.E)(t)||(0,wt.s)(t)?e.createTypeUnsafe("AccountIndex",[t]):Array.isArray(t)||(0,Je.qv)(t)||(0,ut.b)(t)?function(e,t){if(32===t.length)return e.createTypeUnsafe("AccountId",[t]);if(255===t[0])return e.createTypeUnsafe("AccountId",[t.subarray(1)]);const[n,r]=To.readLength(t);return e.createTypeUnsafe("AccountIndex",[ot(t.subarray(n,n+r))])}(e,(0,E.e)(t)):function(e,t){const n=fo(t);return 32===n.length?e.createTypeUnsafe("AccountId",[n]):e.createTypeUnsafe("AccountIndex",[ot(n)])}(e,t)}class Uo extends Ui{constructor(e,t=new Uint8Array){super(e,zo(e,t))}get encodedLength(){const e=this._rawLength;return e+(e>1?1:0)}get _rawLength(){return this.inner instanceof To?To.calcLength(this.inner):this.inner.encodedLength}inspect(){const e=this.inner.toU8a().subarray(0,this._rawLength);return{outer:[new Uint8Array(this.inner instanceof To?To.writeLength(e):Lo),e]}}toHex(){return(0,N.X)(this.toU8a())}toRawType(){return"Address"}toU8a(e){const t=this.inner.toU8a().subarray(0,this._rawLength);return e?t:Mt(this.inner instanceof To?To.writeLength(t):Lo,t)}}function Do(e,t){return[0,32].includes(t.length)?{Id:t}:20===t.length?{Address20:t}:t.length<=8?{Index:e.createTypeUnsafe("AccountIndex",[t]).toNumber()}:t}class qo extends nn{constructor(e,t){super(e,{Id:"AccountId",Index:"Compact",Raw:"Bytes",Address32:"H256",Address20:"H160"},function(e,t){return t instanceof mo?{Id:t}:(0,ut.b)(t)?Do(e,t):t instanceof qo?t:t instanceof To||(0,pn.f)(t)||(0,Lt.E)(t)?{Index:(0,Lt.E)(t)?t:t.toNumber()}:(0,I.K)(t)?Do(e,fo(t.toString())):t}(e,t))}inspect(){const{inner:e,outer:t=[]}=this.inner.inspect();return{inner:e,outer:[new Uint8Array([this.index]),...t]}}toString(){return this.value.toString()}}class jo extends Boolean{registry;createdAtHash;initialU8aLength=1;isStorageFallback;constructor(e,t=!1){super((0,ut.b)(t)?1===t[0]:t instanceof Boolean?t.valueOf():!!t),this.registry=e}get encodedLength(){return 1}get hash(){return this.registry.hash(this.toU8a())}get isEmpty(){return this.isFalse}get isFalse(){return!this.isTrue}get isTrue(){return this.valueOf()}eq(e){return this.valueOf()===(e instanceof Boolean?e.valueOf():e)}inspect(){return{outer:[this.toU8a()]}}toHex(){return(0,N.X)(this.toU8a())}toHuman(){return this.toJSON()}toJSON(){return this.valueOf()}toPrimitive(){return this.toJSON()}toRawType(){return"bool"}toString(){return this.toJSON().toString()}toU8a(e){return new Uint8Array([this.valueOf()?1:0])}}const Fo=128;function Xo(e){return e?new Uint8Array([128]):new Uint8Array([0])}function Wo(e,t){return(0,ut.b)(t)?function(e){return e.length?e.subarray(0,1):new Uint8Array([0])}(t):(0,Fe.b)(t)||t instanceof Boolean||rn(t)?Xo(new jo(e,t).isTrue):(0,Lt.E)(t)?Xo(t<0):function(e,t){return new Uint8Array([(new jo(e,t.aye).isTrue?Fo:0)|e.createTypeUnsafe("Conviction",[t.conviction||0]).index])}(e,t)}class Zo extends lr{__internal__aye;__internal__conviction;constructor(e,t){const n=Wo(e,t);super(e,n,8),this.__internal__aye=(n[0]&Fo)===Fo,this.__internal__conviction=this.registry.createTypeUnsafe("Conviction",[127&n[0]])}get conviction(){return this.__internal__conviction}get isAye(){return this.__internal__aye}get isNay(){return!this.isAye}toHuman(e){return{conviction:this.conviction.toHuman(e),vote:this.isAye?"Aye":"Nay"}}toPrimitive(){return{aye:this.isAye,conviction:this.conviction.toPrimitive()}}toRawType(){return"Vote"}}const Go=[],Ko=[],Jo=[],Yo=BigInt(0),Qo=BigInt(1),$o=BigInt(2),ec=BigInt(7),tc=BigInt(256),nc=BigInt(113);for(let xV=0,gV=Qo,vV=1,wV=0;xV<24;xV++){[vV,wV]=[wV,(2*vV+3*wV)%5],Go.push(2*(5*wV+vV)),Ko.push((xV+1)*(xV+2)/2%64);let e=Yo;for(let t=0;t<7;t++)gV=(gV<>ec)*nc)%tc,gV&$o&&(e^=Qo<<(Qo<n>32?Pa(e,t,n):ka(e,t,n),sc=(e,t,n)=>n>32?Ma(e,t,n):_a(e,t,n);class oc extends ba{constructor(e,t,n,r=!1,a=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=n,this.enableXOF=r,this.rounds=a,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,ta(n),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=oa(this.state)}keccak(){ua||pa(this.state32),function(e,t=24){const n=new Uint32Array(10);for(let r=24-t;r<24;r++){for(let r=0;r<10;r++)n[r]=e[r]^e[r+10]^e[r+20]^e[r+30]^e[r+40];for(let r=0;r<10;r+=2){const t=(r+8)%10,a=(r+2)%10,i=n[a],s=n[a+1],o=ic(i,s,1)^n[t],c=sc(i,s,1)^n[t+1];for(let n=0;n<50;n+=10)e[r+n]^=o,e[r+n+1]^=c}let t=e[2],a=e[3];for(let n=0;n<24;n++){const r=Ko[n],i=ic(t,a,r),s=sc(t,a,r),o=Go[n];t=e[o],a=e[o+1],e[o]=i,e[o+1]=s}for(let r=0;r<50;r+=10){for(let t=0;t<10;t++)n[t]=e[r+t];for(let t=0;t<10;t++)e[r+t]^=~n[(t+2)%10]&n[(t+4)%10]}e[0]^=rc[r],e[1]^=ac[r]}n.fill(0)}(this.state32,this.rounds),ua||pa(this.state32),this.posOut=0,this.pos=0}update(e){aa(this);const{blockLen:t,state:n}=this,r=(e=ha(e)).length;for(let a=0;a=n&&this.keccak();const i=Math.min(n-this.posOut,a-r);e.set(t.subarray(this.posOut,this.posOut+i),r),this.posOut+=i,r+=i}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return ta(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(ia(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){const{blockLen:t,suffix:n,outputLen:r,rounds:a,enableXOF:i}=this;return e||(e=new oc(t,n,r,i,a)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=a,e.suffix=n,e.outputLen=r,e.enableXOF=i,e.destroyed=this.destroyed,e}}const cc=(e,t,n)=>ma((()=>new oc(t,e,n))),dc=_i({256:vi,512:wi},{256:cc(1,136,32),512:cc(1,72,64)});function uc(e){return!(!e||42!==e.length||!(0,Je.qv)(e))&&(!(!/^(0x)?[0-9a-f]{40}$/.test(e)&&!/^(0x)?[0-9A-F]{40}$/.test(e))||function(e){const t=e.replace("0x",""),n=(0,N.X)(dc(t.toLowerCase()),-1,!1);for(let i=0;i<40;i++)if(r=t[i],a=parseInt(n[i],16),r!==(a>7?r.toUpperCase():r.toLowerCase()))return!1;var r,a;return!0}(e))}const lc=(e,t,n)=>e&t^e&n^t&n;class fc extends ba{constructor(e,t,n,r){super(),this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=r,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=ca(this.buffer)}update(e){aa(this);const{view:t,buffer:n,blockLen:r}=this,a=(e=ha(e)).length;for(let i=0;ir-i&&(this.process(n,0),i=0);for(let u=i;u>a&i),o=Number(n&i),c=r?4:0,d=r?0:4;e.setUint32(t+c,s,r),e.setUint32(t+d,o,r)}(n,r-8,BigInt(8*this.length),a),this.process(n,0);const s=ca(e),o=this.outputLen;if(o%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const c=o/4,d=this.get();if(c>d.length)throw new Error("_sha2: outputLen bigger than state");for(let u=0;u>>3,r=da(t,17)^da(t,19)^t>>>10;bc[l]=r+bc[l-7]+n+bc[l-16]|0}let{A:n,B:r,C:a,D:i,E:s,F:o,G:c,H:d}=this;for(let l=0;l<64;l++){const e=d+(da(s,6)^da(s,11)^da(s,25))+((u=s)&o^~u&c)+pc[l]+bc[l]|0,t=(da(n,2)^da(n,13)^da(n,22))+lc(n,r,a)|0;d=c,c=o,o=s,s=i+e|0,i=a,a=r,r=n,n=e+t|0}var u;n=n+this.A|0,r=r+this.B|0,a=a+this.C|0,i=i+this.D|0,s=s+this.E|0,o=o+this.F|0,c=c+this.G|0,d=d+this.H|0,this.set(n,r,a,i,s,o,c,d)}roundClean(){bc.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const yc=ma((()=>new mc));class xc extends ba{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,ra(e);const n=ha(t);if(this.iHash=e.create(),"function"!=typeof this.iHash.update)throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const r=this.blockLen,a=new Uint8Array(r);a.set(n.length>r?e.create().update(n).digest():n);for(let i=0;inew xc(e,t).update(n).digest();gc.create=(e,t)=>new xc(e,t);const vc=BigInt(0),wc=BigInt(1),Vc=BigInt(2);function Tc(e){return e instanceof Uint8Array||null!=e&&"object"==typeof e&&"Uint8Array"===e.constructor.name}function Sc(e){if(!Tc(e))throw new Error("Uint8Array expected")}function kc(e,t){if("boolean"!=typeof t)throw new Error(`${e} must be valid boolean, got "${t}".`)}const _c=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function Pc(e){Sc(e);let t="";for(let n=0;n=Nc._0&&e<=Nc._9?e-Nc._0:e>=Nc._A&&e<=Nc._F?e-(Nc._A-10):e>=Nc._a&&e<=Nc._f?e-(Nc._a-10):void 0}function Oc(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);const t=e.length,n=t/2;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(n);for(let a=0,i=0;a"bigint"==typeof e&&vc<=e;function Uc(e,t,n){return zc(e)&&zc(t)&&zc(n)&&t<=e&&evc;e>>=wc,t+=1);return t}const jc=e=>(Vc<new Uint8Array(e),Xc=e=>Uint8Array.from(e);function Wc(e,t,n){if("number"!=typeof e||e<2)throw new Error("hashLen must be a number");if("number"!=typeof t||t<2)throw new Error("qByteLen must be a number");if("function"!=typeof n)throw new Error("hmacFn must be a function");let r=Fc(e),a=Fc(e),i=0;const s=()=>{r.fill(1),a.fill(0),i=0},o=(...e)=>n(a,r,...e),c=(e=Fc())=>{a=o(Xc([0]),e),r=o(),0!==e.length&&(a=o(Xc([1]),e),r=o())},d=()=>{if(i++>=1e3)throw new Error("drbg: tried 1000 values");let e=0;const n=[];for(;e{let n;for(s(),c(e);!(n=t(d()));)c();return s(),n}}const Zc={bigint:e=>"bigint"==typeof e,function:e=>"function"==typeof e,boolean:e=>"boolean"==typeof e,string:e=>"string"==typeof e,stringOrUint8Array:e=>"string"==typeof e||Tc(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>"function"==typeof e&&Number.isSafeInteger(e.outputLen)};function Gc(e,t,n={}){const r=(t,n,r)=>{const a=Zc[n];if("function"!=typeof a)throw new Error(`Invalid validator "${n}", expected function`);const i=e[t];if(!(r&&void 0===i||a(i,e)))throw new Error(`Invalid param ${String(t)}=${i} (${typeof i}), expected ${n}`)};for(const[a,i]of Object.entries(t))r(a,i,!1);for(const[a,i]of Object.entries(n))r(a,i,!0);return e}function Kc(e){const t=new WeakMap;return(n,...r)=>{const a=t.get(n);if(void 0!==a)return a;const i=e(n,...r);return t.set(n,i),i}}const Jc=BigInt(0),Yc=BigInt(1),Qc=BigInt(2),$c=BigInt(3),ed=BigInt(4),td=BigInt(5),nd=BigInt(8);BigInt(9),BigInt(16);function rd(e,t){const n=e%t;return n>=Jc?n:t+n}function ad(e,t,n){if(n<=Jc||t 0");if(n===Yc)return Jc;let r=Yc;for(;t>Jc;)t&Yc&&(r=r*e%n),e=e*e%n,t>>=Yc;return r}function id(e,t,n){let r=e;for(;t-- >Jc;)r*=r,r%=n;return r}function sd(e,t){if(e===Jc||t<=Jc)throw new Error(`invert: expected positive integers, got n=${e} mod=${t}`);let n=rd(e,t),r=t,a=Jc,i=Yc,s=Yc,o=Jc;for(;n!==Jc;){const e=r/n,t=r%n,c=a-s*e,d=i-o*e;r=n,n=t,a=s,i=o,s=c,o=d}if(r!==Yc)throw new Error("invert: does not exist");return rd(a,t)}function od(e){if(e%ed===$c){const t=(e+Yc)/ed;return function(e,n){const r=e.pow(n,t);if(!e.eql(e.sqr(r),n))throw new Error("Cannot find square root");return r}}if(e%nd===td){const t=(e-td)/nd;return function(e,n){const r=e.mul(n,Qc),a=e.pow(r,t),i=e.mul(n,a),s=e.mul(e.mul(i,Qc),a),o=e.mul(i,e.sub(s,e.ONE));if(!e.eql(e.sqr(o),n))throw new Error("Cannot find square root");return o}}return function(e){const t=(e-Yc)/Qc;let n,r,a;for(n=e-Yc,r=0;n%Qc===Jc;n/=Qc,r++);for(a=Qc;a 0, got ${e}`);const{nBitLength:a,nByteLength:i}=dd(e,t);if(i>2048)throw new Error("Field lengths over 2048 bytes are not supported");const s=od(e),o=Object.freeze({ORDER:e,BITS:a,BYTES:i,MASK:jc(a),ZERO:Jc,ONE:Yc,create:t=>rd(t,e),isValid:t=>{if("bigint"!=typeof t)throw new Error("Invalid field element: expected bigint, got "+typeof t);return Jc<=t&&te===Jc,isOdd:e=>(e&Yc)===Yc,neg:t=>rd(-t,e),eql:(e,t)=>e===t,sqr:t=>rd(t*t,e),add:(t,n)=>rd(t+n,e),sub:(t,n)=>rd(t-n,e),mul:(t,n)=>rd(t*n,e),pow:(e,t)=>function(e,t,n){if(n 0");if(n===Jc)return e.ONE;if(n===Yc)return t;let r=e.ONE,a=t;for(;n>Jc;)n&Yc&&(r=e.mul(r,a)),a=e.sqr(a),n>>=Yc;return r}(o,e,t),div:(t,n)=>rd(t*sd(n,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>sd(t,e),sqrt:r.sqrt||(e=>s(o,e)),invertBatch:e=>function(e,t){const n=new Array(t.length),r=t.reduce(((t,r,a)=>e.is0(r)?t:(n[a]=t,e.mul(t,r))),e.ONE),a=e.inv(r);return t.reduceRight(((t,r,a)=>e.is0(r)?t:(n[a]=e.mul(t,n[a]),e.mul(t,r))),a),n}(o,e),cmov:(e,t,n)=>n?t:e,toBytes:e=>n?Rc(e,i):Hc(e,i),fromBytes:e=>{if(e.length!==i)throw new Error(`Fp.fromBytes: expected ${i}, got ${e.length}`);return n?Cc(e):Ac(e)}});return Object.freeze(o)}function ld(e){if("bigint"!=typeof e)throw new Error("field order must be bigint");const t=e.toString(2).length;return Math.ceil(t/8)}function fd(e){const t=ld(e);return t+Math.ceil(t/2)}const pd=BigInt(0),hd=BigInt(1),bd=new WeakMap,md=new WeakMap;function yd(e){return function(e){const t=cd.reduce(((e,t)=>(e[t]="function",e)),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"});Gc(e,t)}(e.Fp),Gc(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...dd(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}function xd(e){void 0!==e.lowS&&kc("lowS",e.lowS),void 0!==e.prehash&&kc("prehash",e.prehash)}const{Ph:gd,aT:vd}=r,wd={Err:class extends Error{constructor(e=""){super(e)}},_tlv:{encode:(e,t)=>{const{Err:n}=wd;if(e<0||e>256)throw new n("tlv.encode: wrong tag");if(1&t.length)throw new n("tlv.encode: unpadded data");const r=t.length/2,a=Mc(r);if(a.length/2&128)throw new n("tlv.encode: long form length too big");const i=r>127?Mc(a.length/2|128):"";return`${Mc(e)}${i}${a}${t}`},decode(e,t){const{Err:n}=wd;let r=0;if(e<0||e>256)throw new n("tlv.encode: wrong tag");if(t.length<2||t[r++]!==e)throw new n("tlv.decode: wrong tlv");const a=t[r++];let i=0;if(!!(128&a)){const e=127&a;if(!e)throw new n("tlv.decode(long): indefinite length not supported");if(e>4)throw new n("tlv.decode(long): byte length is too big");const s=t.subarray(r,r+e);if(s.length!==e)throw new n("tlv.decode: length bytes not complete");if(0===s[0])throw new n("tlv.decode(long): zero leftmost byte");for(const t of s)i=i<<8|t;if(r+=e,i<128)throw new n("tlv.decode(long): not minimal encoding")}else i=a;const s=t.subarray(r,r+i);if(s.length!==i)throw new n("tlv.decode: wrong value length");return{v:s,l:t.subarray(r+i)}}},_int:{encode(e){const{Err:t}=wd;if(e{const a=t.toAffine();return Lc(Uint8Array.from([4]),n.toBytes(a.x),n.toBytes(a.y))}),i=t.fromBytes||(e=>{const t=e.subarray(1);return{x:n.fromBytes(t.subarray(0,n.BYTES)),y:n.fromBytes(t.subarray(n.BYTES,2*n.BYTES))}});function s(e){const{a:r,b:a}=t,i=n.sqr(e),s=n.mul(i,e);return n.add(n.add(s,n.mul(e,r)),a)}if(!n.eql(n.sqr(t.Gy),s(t.Gx)))throw new Error("bad generator point: equation left != right");function o(e){const{allowedPrivateKeyLengths:n,nByteLength:r,wrapPrivateKey:a,n:i}=t;if(n&&"bigint"!=typeof e){if(Tc(e)&&(e=Pc(e)),"string"!=typeof e||!n.includes(e.length))throw new Error("Invalid key");e=e.padStart(2*r,"0")}let s;try{s="bigint"==typeof e?e:Ac(Bc("private key",e,r))}catch(o){throw new Error(`private key must be ${r} bytes, hex or bigint, not ${typeof e}`)}return a&&(s=rd(s,i)),Dc("private key",s,Td,i),s}function c(e){if(!(e instanceof l))throw new Error("ProjectivePoint expected")}const d=Kc(((e,t)=>{const{px:r,py:a,pz:i}=e;if(n.eql(i,n.ONE))return{x:r,y:a};const s=e.is0();null==t&&(t=s?n.ONE:n.inv(i));const o=n.mul(r,t),c=n.mul(a,t),d=n.mul(i,t);if(s)return{x:n.ZERO,y:n.ZERO};if(!n.eql(d,n.ONE))throw new Error("invZ was invalid");return{x:o,y:c}})),u=Kc((e=>{if(e.is0()){if(t.allowInfinityPoint&&!n.is0(e.py))return;throw new Error("bad point: ZERO")}const{x:r,y:a}=e.toAffine();if(!n.isValid(r)||!n.isValid(a))throw new Error("bad point: x or y not FE");const i=n.sqr(a),o=s(r);if(!n.eql(i,o))throw new Error("bad point: equation left != right");if(!e.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0}));class l{constructor(e,t,r){if(this.px=e,this.py=t,this.pz=r,null==e||!n.isValid(e))throw new Error("x required");if(null==t||!n.isValid(t))throw new Error("y required");if(null==r||!n.isValid(r))throw new Error("z required");Object.freeze(this)}static fromAffine(e){const{x:t,y:r}=e||{};if(!e||!n.isValid(t)||!n.isValid(r))throw new Error("invalid affine point");if(e instanceof l)throw new Error("projective point not allowed");const a=e=>n.eql(e,n.ZERO);return a(t)&&a(r)?l.ZERO:new l(t,r,n.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(e){const t=n.invertBatch(e.map((e=>e.pz)));return e.map(((e,n)=>e.toAffine(t[n]))).map(l.fromAffine)}static fromHex(e){const t=l.fromAffine(i(Bc("pointHex",e)));return t.assertValidity(),t}static fromPrivateKey(e){return l.BASE.multiply(o(e))}static msm(e,t){return function(e,t,n,r){if(!Array.isArray(n)||!Array.isArray(r)||r.length!==n.length)throw new Error("arrays of points and scalars must have equal length");r.forEach(((e,n)=>{if(!t.isValid(e))throw new Error(`wrong scalar at index ${n}`)})),n.forEach(((t,n)=>{if(!(t instanceof e))throw new Error(`wrong point at index ${n}`)}));const a=qc(BigInt(n.length)),i=a>12?a-3:a>4?a-2:a?2:1,s=(1<=0;u-=i){o.fill(e.ZERO);for(let e=0;e>BigInt(u)&BigInt(s));o[a]=o[a].add(n[e])}let t=e.ZERO;for(let n=o.length-1,r=e.ZERO;n>0;n--)r=r.add(o[n]),t=t.add(r);if(d=d.add(t),0!==u)for(let e=0;eVd||c>Vd;)s&Td&&(d=d.add(f)),c&Td&&(u=u.add(f)),f=f.double(),s>>=Td,c>>=Td;return i&&(d=d.negate()),o&&(u=u.negate()),u=new l(n.mul(u.px,a.beta),u.py,u.pz),d.add(u)}multiply(e){const{endo:r,n:a}=t;let i,s;if(Dc("scalar",e,Td,a),r){const{k1neg:t,k1:a,k2neg:o,k2:c}=r.splitScalar(e);let{p:d,f:u}=this.wNAF(a),{p:f,f:h}=this.wNAF(c);d=p.constTimeNegate(t,d),f=p.constTimeNegate(o,f),f=new l(n.mul(f.px,r.beta),f.py,f.pz),i=d.add(f),s=u.add(h)}else{const{p:t,f:n}=this.wNAF(e);i=t,s=n}return l.normalizeZ([i,s])[0]}multiplyAndAddUnsafe(e,t,n){const r=l.BASE,a=(e,t)=>t!==Vd&&t!==Td&&e.equals(r)?e.multiply(t):e.multiplyUnsafe(t),i=a(this,t).add(a(e,n));return i.is0()?void 0:i}toAffine(e){return d(this,e)}isTorsionFree(){const{h:e,isTorsionFree:n}=t;if(e===Td)return!0;if(n)return n(l,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:e,clearCofactor:n}=t;return e===Td?this:n?n(l,this):this.multiplyUnsafe(t.h)}toRawBytes(e=!0){return kc("isCompressed",e),this.assertValidity(),a(l,this,e)}toHex(e=!0){return kc("isCompressed",e),Pc(this.toRawBytes(e))}}l.BASE=new l(t.Gx,t.Gy,n.ONE),l.ZERO=new l(n.ZERO,n.ONE,n.ZERO);const f=t.nBitLength,p=function(e,t){const n=(e,t)=>{const n=t.negate();return e?n:t},r=e=>{if(!Number.isSafeInteger(e)||e<=0||e>t)throw new Error(`Wrong window size=${e}, should be [1..${t}]`)},a=e=>(r(e),{windows:Math.ceil(t/e)+1,windowSize:2**(e-1)});return{constTimeNegate:n,unsafeLadder(t,n){let r=e.ZERO,a=t;for(;n>pd;)n&hd&&(r=r.add(a)),a=a.double(),n>>=hd;return r},precomputeWindow(e,t){const{windows:n,windowSize:r}=a(t),i=[];let s=e,o=s;for(let a=0;a>=f,a>o&&(a-=l,i+=hd);const s=t,p=t+Math.abs(a)-1,h=e%2!=0,b=a<0;0===a?d=d.add(n(h,r[s])):c=c.add(n(b,r[p]))}return{p:c,f:d}},wNAFCached(e,t,n){const r=md.get(e)||1;let a=bd.get(e);return a||(a=this.precomputeWindow(e,r),1!==r&&bd.set(e,n(a))),this.wNAF(r,a,t)},setWindowSize(e,t){r(t),md.set(e,t),bd.delete(e)}}}(l,t.endo?Math.ceil(f/2):f);return{CURVE:t,ProjectivePoint:l,normPrivateKeyToScalar:o,weierstrassEquation:s,isWithinCurveOrder:function(e){return Uc(e,Td,t.n)}}}function _d(e){const t=function(e){const t=yd(e);return Gc(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}(e),{Fp:n,n:r}=t,a=n.BYTES+1,i=2*n.BYTES+1;function s(e){return rd(e,r)}function o(e){return sd(e,r)}const{ProjectivePoint:c,normPrivateKeyToScalar:d,weierstrassEquation:u,isWithinCurveOrder:l}=kd({...t,toBytes(e,t,r){const a=t.toAffine(),i=n.toBytes(a.x),s=Lc;return kc("isCompressed",r),r?s(Uint8Array.from([t.hasEvenY()?2:3]),i):s(Uint8Array.from([4]),i,n.toBytes(a.y))},fromBytes(e){const t=e.length,r=e[0],s=e.subarray(1);if(t!==a||2!==r&&3!==r){if(t===i&&4===r){return{x:n.fromBytes(s.subarray(0,n.BYTES)),y:n.fromBytes(s.subarray(n.BYTES,2*n.BYTES))}}throw new Error(`Point of length ${t} was invalid. Expected ${a} compressed bytes or ${i} uncompressed bytes`)}{const e=Ac(s);if(!Uc(e,Td,n.ORDER))throw new Error("Point is not on curve");const t=u(e);let a;try{a=n.sqrt(t)}catch(o){const e=o instanceof Error?": "+o.message:"";throw new Error("Point is not on curve"+e)}return!(1&~r)!==((a&Td)===Td)&&(a=n.neg(a)),{x:e,y:a}}}}),f=e=>Pc(Hc(e,t.nByteLength));function p(e){return e>r>>Td}const h=(e,t,n)=>Ac(e.slice(t,n));class b{constructor(e,t,n){this.r=e,this.s=t,this.recovery=n,this.assertValidity()}static fromCompact(e){const n=t.nByteLength;return e=Bc("compactSignature",e,2*n),new b(h(e,0,n),h(e,n,2*n))}static fromDER(e){const{r:t,s:n}=wd.toSig(Bc("DER",e));return new b(t,n)}assertValidity(){Dc("r",this.r,Td,r),Dc("s",this.s,Td,r)}addRecoveryBit(e){return new b(this.r,this.s,e)}recoverPublicKey(e){const{r:r,s:a,recovery:i}=this,d=g(Bc("msgHash",e));if(null==i||![0,1,2,3].includes(i))throw new Error("recovery id invalid");const u=2===i||3===i?r+t.n:r;if(u>=n.ORDER)throw new Error("recovery id 2 or 3 invalid");const l=1&i?"03":"02",p=c.fromHex(l+f(u)),h=o(u),b=s(-d*h),m=s(a*h),y=c.BASE.multiplyAndAddUnsafe(p,b,m);if(!y)throw new Error("point at infinify");return y.assertValidity(),y}hasHighS(){return p(this.s)}normalizeS(){return this.hasHighS()?new b(this.r,s(-this.s),this.recovery):this}toDERRawBytes(){return Oc(this.toDERHex())}toDERHex(){return wd.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return Oc(this.toCompactHex())}toCompactHex(){return f(this.r)+f(this.s)}}const m={isValidPrivateKey(e){try{return d(e),!0}catch(t){return!1}},normPrivateKeyToScalar:d,randomPrivateKey:()=>{const e=fd(t.n);return function(e,t,n=!1){const r=e.length,a=ld(t),i=fd(t);if(r<16||r1024)throw new Error(`expected ${i}-1024 bytes of input, got ${r}`);const s=rd(n?Ac(e):Cc(e),t-Yc)+Yc;return n?Rc(s,a):Hc(s,a)}(t.randomBytes(e),t.n)},precompute:(e=8,t=c.BASE)=>(t._setWindowSize(e),t.multiply(BigInt(3)),t)};function y(e){const t=Tc(e),n="string"==typeof e,r=(t||n)&&e.length;return t?r===a||r===i:n?r===2*a||r===2*i:e instanceof c}const x=t.bits2int||function(e){const n=Ac(e),r=8*e.length-t.nBitLength;return r>0?n>>BigInt(r):n},g=t.bits2int_modN||function(e){return s(x(e))},v=jc(t.nBitLength);function w(e){return Dc(`num < 2^${t.nBitLength}`,e,Vd,v),Hc(e,t.nByteLength)}function V(e,r,a=T){if(["recovered","canonical"].some((e=>e in a)))throw new Error("sign() legacy options not supported");const{hash:i,randomBytes:u}=t;let{lowS:f,prehash:h,extraEntropy:m}=a;null==f&&(f=!0),e=Bc("msgHash",e),xd(a),h&&(e=Bc("prehashed msgHash",i(e)));const y=g(e),v=d(r),V=[w(v),w(y)];if(null!=m&&!1!==m){const e=!0===m?u(n.BYTES):m;V.push(Bc("extraEntropy",e))}const S=Lc(...V),k=y;return{seed:S,k2sig:function(e){const t=x(e);if(!l(t))return;const n=o(t),r=c.BASE.multiply(t).toAffine(),a=s(r.x);if(a===Vd)return;const i=s(n*s(k+a*v));if(i===Vd)return;let d=(r.x===a?0:2)|Number(r.y&Td),u=i;return f&&p(i)&&(u=function(e){return p(e)?s(-e):e}(i),d^=1),new b(a,u,d)}}}const T={lowS:t.lowS,prehash:!1},S={lowS:t.lowS,prehash:!1};return c.BASE._setWindowSize(8),{CURVE:t,getPublicKey:function(e,t=!0){return c.fromPrivateKey(e).toRawBytes(t)},getSharedSecret:function(e,t,n=!0){if(y(e))throw new Error("first arg must be private key");if(!y(t))throw new Error("second arg must be public key");return c.fromHex(t).multiply(d(e)).toRawBytes(n)},sign:function(e,n,r=T){const{seed:a,k2sig:i}=V(e,n,r),s=t;return Wc(s.hash.outputLen,s.nByteLength,s.hmac)(a,i)},verify:function(e,n,r,a=S){const i=e;if(n=Bc("msgHash",n),r=Bc("publicKey",r),"strict"in a)throw new Error("options.strict was renamed to lowS");xd(a);const{lowS:d,prehash:u}=a;let l,f;try{if("string"==typeof i||Tc(i))try{l=b.fromDER(i)}catch(V){if(!(V instanceof wd.Err))throw V;l=b.fromCompact(i)}else{if("object"!=typeof i||"bigint"!=typeof i.r||"bigint"!=typeof i.s)throw new Error("PARSE");{const{r:e,s:t}=i;l=new b(e,t)}}f=c.fromHex(r)}catch(T){if("PARSE"===T.message)throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(d&&l.hasHighS())return!1;u&&(n=t.hash(n));const{r:p,s:h}=l,m=g(n),y=o(h),x=s(m*y),v=s(p*y),w=c.BASE.multiplyAndAddUnsafe(f,x,v)?.toAffine();return!!w&&s(w.x)===p},ProjectivePoint:c,Signature:b,utils:m}}function Pd(e){return{hash:e,hmac:(t,...n)=>gc(e,t,function(...e){let t=0;for(let r=0;r(e+t/Ed)/t;function Ad(e){const t=Md,n=BigInt(3),r=BigInt(6),a=BigInt(11),i=BigInt(22),s=BigInt(23),o=BigInt(44),c=BigInt(88),d=e*e*e%t,u=d*d*e%t,l=id(u,n,t)*u%t,f=id(l,n,t)*u%t,p=id(f,Ed,t)*d%t,h=id(p,a,t)*p%t,b=id(h,i,t)*h%t,m=id(b,o,t)*b%t,y=id(m,c,t)*m%t,x=id(y,o,t)*b%t,g=id(x,n,t)*u%t,v=id(g,s,t)*h%t,w=id(v,r,t)*d%t,V=id(w,Ed,t);if(!Cd.eql(Cd.sqr(V),e))throw new Error("Cannot find square root");return V}const Cd=ud(Md,void 0,void 0,{sqrt:Ad}),Hd=function(e,t){const n=t=>_d({...e,...Pd(t)});return Object.freeze({...n(t),create:n})}({a:BigInt(0),b:BigInt(7),Fp:Cd,n:Id,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{const t=Id,n=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-Nd*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),a=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),i=n,s=BigInt("0x100000000000000000000000000000000"),o=Od(i*e,t),c=Od(-r*e,t);let d=rd(e-o*n-c*a,t),u=rd(-o*r-c*i,t);const l=d>s,f=u>s;if(l&&(d=t-d),f&&(u=t-u),d>s||u>s)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:l,k1:d,k2neg:f,k2:u}}}},yc);BigInt(0);Hd.ProjectivePoint;const Rd={bitLength:256,isLe:!1};function Bd(e){return[33,65].includes(e.length)&&(e=dc(function(e,t){if(![33,65].includes(e.length))throw new Error(`Invalid publicKey provided, received ${e.length} bytes input`);if(65===e.length)return e.subarray(1);if(!Ba.CW||!t&&Ti())return xi(e).subarray(1);const{px:n,py:r}=Hd.ProjectivePoint.fromHex(e);return Mt(Pt(n,Rd),Pt(r,Rd))}(e))),e.slice(-20)}function Ld(e){return(0,ut.b)(e)||Array.isArray(e)?(0,E.e)(e):(0,Je.qv)(e)||uc(e.toString())?(0,ts.V)(e.toString()):(0,I.K)(e)?(0,E.e)(e):e}class zd extends lr{constructor(e,t=new Uint8Array){super(e,Ld(t),160)}eq(e){return!!e&&super.eq(Ld(e))}toHuman(){return this.toJSON()}toJSON(){return this.toString()}toPrimitive(){return this.toJSON()}toString(){return function(e){if(!e)return"0x";const t=(0,E.e)(e);if(![20,32,33,65].includes(t.length))throw new Error(`Invalid address or publicKey provided, received ${t.length} bytes input`);const n=(0,N.X)(Bd(t),-1,!1),r=(0,N.X)(dc(n),-1,!1);let a="";for(let i=0;i<40;i++)a=`${a}${parseInt(r[i],16)>7?n[i].toUpperCase():n[i]}`;return`0x${a}`}(this)}toRawType(){return"AccountId"}}const Ud=new Uint8Array([255]);function Dd(e,t){return t instanceof qd?t.inner:t instanceof zd||t instanceof To?t:(0,ut.b)(t)||Array.isArray(t)||(0,Je.qv)(t)?function(e,t){if(20===t.length)return e.createTypeUnsafe("EthereumAccountId",[t]);if(255===t[0])return e.createTypeUnsafe("EthereumAccountId",[t.subarray(1)]);const[n,r]=To.readLength(t);return e.createTypeUnsafe("AccountIndex",[ot(t.subarray(n,n+r))])}(e,(0,E.e)(t)):(0,pn.f)(t)||(0,Lt.E)(t)||(0,wt.s)(t)?e.createTypeUnsafe("AccountIndex",[t]):function(e,t){const n=fo(t);return 20===n.length?e.createTypeUnsafe("EthereumAccountId",[n]):e.createTypeUnsafe("AccountIndex",[ot(n)])}(e,t)}class qd extends Ui{constructor(e,t=new Uint8Array){super(e,Dd(e,t))}get encodedLength(){const e=this._rawLength;return e+(e>1?1:0)}get _rawLength(){return this.inner instanceof To?To.calcLength(this.inner):this.inner.encodedLength}toHex(){return(0,N.X)(this.toU8a())}toRawType(){return"Address"}toU8a(e){const t=this.inner.toU8a().subarray(0,this._rawLength);return e?t:Mt(this.inner instanceof To?To.writeLength(t):Ud,t)}}function jd(e){if(Array.isArray(e)||(0,I.K)(e)){const t=(0,E.e)(e);return[t.length/8,t]}return function(e){if(!e?.length)return[0,new Uint8Array];const[t,n]=dt(e),r=t+Math.ceil(n/8);if(r>e.length)throw new Error(`BitVec: required length less than remainder, expected at least ${r}, found ${e.length}`);return[n,e.subarray(t,r)]}(e)}class Fd extends rt{__internal__decodedLength;__internal__isMsb;constructor(e,t,n=!1){const[r,a]=jd(t);super(e,a),this.__internal__decodedLength=r,this.__internal__isMsb=n}get encodedLength(){return this.length+Ht(this.__internal__decodedLength).length}inspect(){return{outer:[Ht(this.__internal__decodedLength),super.toU8a()]}}toBoolArray(){const e=[...this.toU8a(!0)].map((e=>[!!(128&e),!!(64&e),!!(32&e),!!(16&e),!!(8&e),!!(4&e),!!(2&e),!!(1&e)])),t=e.length,n=new Array(8*t);for(let r=0;r`00000000${e.toString(2)}`.slice(-8))).map((e=>this.__internal__isMsb?e:e.split("").reverse().join(""))).join("_")}`}toRawType(){return"BitVec"}toU8a(e){const t=super.toU8a(e);return e?t:It([Ht(this.__internal__decodedLength),t])}}class Xd extends Number{encodedLength;registry;createdAtHash;initialU8aLength;isStorageFallback;__internal__bitLength;constructor(e,t,{bitLength:n=32}={}){super((0,ut.b)(t)||(0,Je.qv)(t)?0===t.length?0:function(e,{bitLength:t=32,isLe:n=!0}={}){if(32!==t&&64!==t)throw new Error("Invalid bitLength provided, expected 32 or 64");if(e.length"}toU8a(e){return e?super.toU8a(!0):this.isSome?new Uint8Array([this.isTrue?1:2]):new Uint8Array([0])}}const nu=131072;class ru extends String{registry;createdAtHash;initialU8aLength;isStorageFallback;__internal__override=null;constructor(e,t){const[n,r]=function(e){if((0,ut.b)(e)){if(!e.length)return["",0];if(e instanceof rt)return[nt(e),0];const[t,n]=dt(e),r=t+n;if(n>nu)throw new Error(`Text: length ${n.toString()} exceeds 131072`);if(r>e.length)throw new Error(`Text: required length less than remainder, expected at least ${r}, found ${e.length}`);return[nt(e.subarray(t,r)),r]}return(0,Je.qv)(e)?[nt((0,ts.V)(e)),0]:[e?e.toString():"",0]}(t);super(n),this.registry=e,this.initialU8aLength=r}get encodedLength(){return this.toU8a().length}get hash(){return this.registry.hash(this.toU8a())}get isEmpty(){return 0===this.length}get length(){return super.length}eq(e){return!!(0,I.K)(e)&&this.toString()===e.toString()}inspect(){const e=(0,La.j)(super.toString());return{outer:e.length?[Ht(e.length),e]:[Ht(e.length)]}}setOverride(e){this.__internal__override=e}toHex(){return(0,N.X)(this.toU8a(!0))}toHuman(){return this.toJSON()}toJSON(){return this.toString()}toPrimitive(){return this.toJSON()}toRawType(){return"Text"}toString(){return this.__internal__override||super.toString()}toU8a(e){const t=(0,La.j)(super.toString());return e?t:ar(t)}}class au extends ru{constructor(e,t=""){super(e,t),this.setOverride(_r(this.toString()))}toRawType(){return"Type"}}class iu extends(rr.with(8)){__UIntType="u8"}class su extends(rr.with(16)){__UIntType="u16"}class ou extends(rr.with(128)){__UIntType="u128"}class cu extends(rr.with(256)){__UIntType="u256"}class du extends xo{constructor(e,t){throw super(e,t),new Error("The `usize` type should not be used. Since it is platform-specific, it creates incompatibilities between native (generally u64) and WASM (always u32) code. Use one of the `u32` or `u64` types explicitly.")}}function uu(e,t){return(0,ut.b)(t)||(0,I.K)(t)?function(e,t){const n=t[0];if(!n)return[void 0,void 0];if(n>=1&&n<=33){const r=n-1,a=t.subarray(1,r+1);return[e.createTypeUnsafe("Raw",[a]),1]}if(n>=34&&n<=37)return[t.subarray(1,33),n-32];throw new Error(`Unable to decode Data, invalid indicator byte ${n}`)}(e,(0,E.e)(t)):t?[t,void 0]:[void 0,void 0]}class lu extends nn{constructor(e,t){if(super(e,{None:"Null",Raw:"Bytes",BlakeTwo256:"H256",Sha256:"H256",Keccak256:"H256",ShaThree256:"H256"},...uu(e,t)),this.isRaw&&this.asRaw.length>32)throw new Error("Data.Raw values are limited to a maximum length of 32 bytes")}get asBlakeTwo256(){return this.value}get asKeccak256(){return this.value}get asRaw(){return this.value}get asSha256(){return this.value}get asShaThree256(){return this.value}get isBlakeTwo256(){return 2===this.index}get isKeccak256(){return 4===this.index}get isNone(){return 0===this.index}get isRaw(){return 1===this.index}get isSha256(){return 3===this.index}get isShaThree256(){return 5===this.index}get encodedLength(){return this.toU8a().length}toU8a(){if(0===this.index)return new Uint8Array(1);if(1===this.index){const e=this.value.toU8a(!0),t=Math.min(e.length,32),n=new Uint8Array(t+1);return n.set([t+1],0),n.set(e.subarray(0,t),1),n}const e=new Uint8Array(33);return e.set([this.index+32],0),e.set(this.value.toU8a(),1),e}}function fu(e,t){const n=e.getTypeDef(t);return n.lookupName||n.type}function pu(e,t,n){const r=fu(e.lookup,function(e){return e.isPlain?e.asPlain:e.asMap.value}(t));return n?`Option<${r}>`:r}const hu={Blake2_128:[16,!1],Blake2_128Concat:[16,!0],Blake2_256:[32,!1],Identity:[0,!0],Twox128:[16,!1],Twox256:[32,!1],Twox64Concat:[8,!0]};function bu(e,t,n){if(!n||!n.type.isMap)return[];const{hashers:r,key:a}=n.type.asMap,i=1===r.length?[a]:e.lookup.getSiType(a).def.asTuple;return function(e,t,n){let r=32;const a=n.length,i=new Array(a);for(let s=0;s[e,i[t]])))}class mu extends sr{__internal__args;__internal__meta;__internal__outputType;__internal__method;__internal__section;constructor(e,t,n={}){const{key:r,method:a,section:i}=function(e){if((0,ut.b)(e)||!e||(0,I.K)(e))return{key:e};if(e instanceof mu)return{key:e,method:e.method,section:e.section};if((0,qe.T)(e))return{key:e(),method:e.method,section:e.section};if(Array.isArray(e)){const[t,n=[]]=e;if(!(0,qe.T)(t))throw new Error("Expected function input for key construction");if(t.meta&&t.meta.type.isMap){const e=t.meta.type.asMap;if(!Array.isArray(n)||n.length!==e.hashers.length)throw new Error(`Expected an array of ${e.hashers.length} values as params to a Map query`)}return{key:t(...n),method:t.method,section:t.section}}throw new Error(`Unable to convert input ${e} to StorageKey`)}(t);super(e,r),this.__internal__outputType=function(e,t){if(t instanceof mu)return t.outputType;if((0,qe.T)(t))return pu(e,t.meta.type);if(Array.isArray(t)){const[n]=t;if(n.meta)return pu(e,n.meta.type)}return"Raw"}(e,t),this.setMeta(function(e){if(e instanceof mu)return e.meta;if((0,qe.T)(e))return e.meta;if(Array.isArray(e)){const[t]=e;return t.meta}}(t),n.section||i,n.method||a)}get args(){return this.__internal__args}get meta(){return this.__internal__meta}get method(){return this.__internal__method}get outputType(){return this.__internal__outputType}get section(){return this.__internal__section}is(e){return e.section===this.section&&e.method===this.method}setMeta(e,t,n){this.__internal__meta=e,this.__internal__method=n||this.__internal__method,this.__internal__section=t||this.__internal__section,e&&(this.__internal__outputType=pu(this.registry,e.type));try{this.__internal__args=bu(this.registry,this.toU8a(!0),e)}catch{}return this}toHuman(e,t){return this.__internal__args.length?this.__internal__args.map((e=>e.toHuman(void 0,t))):super.toHuman(void 0,t)}toRawType(){return"StorageKey"}}const yu={metadata:{description:"Returns the metadata of a runtime",params:[],type:"OpaqueMetadata"}},xu={name:"Text",fields:"Vec",index:"u8",docs:"Vec"},gu={Si1Field:{name:"Option",type:"Si1LookupTypeId",typeName:"Option",docs:"Vec"},Si1LookupTypeId:"Compact",Si1Path:"Si0Path",Si1Type:{path:"Si1Path",params:"Vec",def:"Si1TypeDef",docs:"Vec"},Si1TypeDef:{_enum:{Composite:"Si1TypeDefComposite",Variant:"Si1TypeDefVariant",Sequence:"Si1TypeDefSequence",Array:"Si1TypeDefArray",Tuple:"Si1TypeDefTuple",Primitive:"Si1TypeDefPrimitive",Compact:"Si1TypeDefCompact",BitSequence:"Si1TypeDefBitSequence",HistoricMetaCompat:"Type"}},Si1TypeDefArray:{len:"u32",type:"Si1LookupTypeId"},Si1TypeDefBitSequence:{bitStoreType:"Si1LookupTypeId",bitOrderType:"Si1LookupTypeId"},Si1TypeDefCompact:{type:"Si1LookupTypeId"},Si1TypeDefComposite:{fields:"Vec"},Si1TypeDefPrimitive:"Si0TypeDefPrimitive",Si1TypeDefSequence:{type:"Si1LookupTypeId"},Si1TypeDefTuple:"Vec",Si1TypeParameter:{name:"Text",type:"Option"},Si1TypeDefVariant:{variants:"Vec"},Si1Variant:xu},vu={rpc:{},runtime:{Metadata:[{methods:{metadata_at_version:{description:"Returns the metadata at a given version.",params:[{name:"version",type:"u32"}],type:"Option"},metadata_versions:{description:"Returns the supported metadata versions.",params:[],type:"Vec"},...yu},version:2},{methods:{...yu},version:1}]},types:{ErrorMetadataV9:{name:"Text",docs:"Vec"},EventMetadataV9:{name:"Text",args:"Vec",docs:"Vec"},FunctionArgumentMetadataV9:{name:"Text",type:"Type"},FunctionMetadataV9:{name:"Text",args:"Vec",docs:"Vec"},MetadataV9:{modules:"Vec"},ModuleConstantMetadataV9:{name:"Text",type:"Type",value:"Bytes",docs:"Vec"},ModuleMetadataV9:{name:"Text",storage:"Option",calls:"Option>",events:"Option>",constants:"Vec",errors:"Vec"},StorageEntryMetadataV9:{name:"Text",modifier:"StorageEntryModifierV9",type:"StorageEntryTypeV9",fallback:"Bytes",docs:"Vec"},StorageEntryModifierV9:{_enum:["Optional","Default","Required"]},StorageEntryTypeV9:{_enum:{Plain:"Type",Map:{hasher:"StorageHasherV9",key:"Type",value:"Type",linked:"bool"},DoubleMap:{hasher:"StorageHasherV9",key1:"Type",key2:"Type",value:"Type",key2Hasher:"StorageHasherV9"}}},StorageHasherV9:{_enum:{Blake2_128:null,Blake2_256:null,Twox128:null,Twox256:null,Twox64Concat:null}},StorageMetadataV9:{prefix:"Text",items:"Vec"},ErrorMetadataV10:"ErrorMetadataV9",EventMetadataV10:"EventMetadataV9",FunctionArgumentMetadataV10:"FunctionArgumentMetadataV9",FunctionMetadataV10:"FunctionMetadataV9",MetadataV10:{modules:"Vec"},ModuleConstantMetadataV10:"ModuleConstantMetadataV9",ModuleMetadataV10:{name:"Text",storage:"Option",calls:"Option>",events:"Option>",constants:"Vec",errors:"Vec"},StorageEntryModifierV10:"StorageEntryModifierV9",StorageEntryMetadataV10:{name:"Text",modifier:"StorageEntryModifierV10",type:"StorageEntryTypeV10",fallback:"Bytes",docs:"Vec"},StorageEntryTypeV10:{_enum:{Plain:"Type",Map:{hasher:"StorageHasherV10",key:"Type",value:"Type",linked:"bool"},DoubleMap:{hasher:"StorageHasherV10",key1:"Type",key2:"Type",value:"Type",key2Hasher:"StorageHasherV10"}}},StorageMetadataV10:{prefix:"Text",items:"Vec"},StorageHasherV10:{_enum:{Blake2_128:null,Blake2_256:null,Blake2_128Concat:null,Twox128:null,Twox256:null,Twox64Concat:null}},...{ErrorMetadataV11:"ErrorMetadataV10",EventMetadataV11:"EventMetadataV10",ExtrinsicMetadataV11:{version:"u8",signedExtensions:"Vec"},FunctionArgumentMetadataV11:"FunctionArgumentMetadataV10",FunctionMetadataV11:"FunctionMetadataV10",MetadataV11:{modules:"Vec",extrinsic:"ExtrinsicMetadataV11"},ModuleConstantMetadataV11:"ModuleConstantMetadataV10",ModuleMetadataV11:{name:"Text",storage:"Option",calls:"Option>",events:"Option>",constants:"Vec",errors:"Vec"},StorageEntryModifierV11:"StorageEntryModifierV10",StorageEntryMetadataV11:{name:"Text",modifier:"StorageEntryModifierV11",type:"StorageEntryTypeV11",fallback:"Bytes",docs:"Vec"},StorageEntryTypeV11:{_enum:{Plain:"Type",Map:{hasher:"StorageHasherV11",key:"Type",value:"Type",linked:"bool"},DoubleMap:{hasher:"StorageHasherV11",key1:"Type",key2:"Type",value:"Type",key2Hasher:"StorageHasherV11"}}},StorageMetadataV11:{prefix:"Text",items:"Vec"},StorageHasherV11:{_enum:{Blake2_128:null,Blake2_256:null,Blake2_128Concat:null,Twox128:null,Twox256:null,Twox64Concat:null,Identity:null}}},ErrorMetadataV12:"ErrorMetadataV11",EventMetadataV12:"EventMetadataV11",ExtrinsicMetadataV12:"ExtrinsicMetadataV11",FunctionArgumentMetadataV12:"FunctionArgumentMetadataV11",FunctionMetadataV12:"FunctionMetadataV11",MetadataV12:{modules:"Vec",extrinsic:"ExtrinsicMetadataV12"},ModuleConstantMetadataV12:"ModuleConstantMetadataV11",ModuleMetadataV12:{name:"Text",storage:"Option",calls:"Option>",events:"Option>",constants:"Vec",errors:"Vec",index:"u8"},StorageEntryModifierV12:"StorageEntryModifierV11",StorageEntryMetadataV12:"StorageEntryMetadataV11",StorageEntryTypeV12:"StorageEntryTypeV11",StorageMetadataV12:"StorageMetadataV11",StorageHasherV12:"StorageHasherV11",ErrorMetadataV13:"ErrorMetadataV12",EventMetadataV13:"EventMetadataV12",ExtrinsicMetadataV13:"ExtrinsicMetadataV12",FunctionArgumentMetadataV13:"FunctionArgumentMetadataV12",FunctionMetadataV13:"FunctionMetadataV12",MetadataV13:{modules:"Vec",extrinsic:"ExtrinsicMetadataV13"},ModuleConstantMetadataV13:"ModuleConstantMetadataV12",ModuleMetadataV13:{name:"Text",storage:"Option",calls:"Option>",events:"Option>",constants:"Vec",errors:"Vec",index:"u8"},StorageEntryModifierV13:"StorageEntryModifierV12",StorageEntryMetadataV13:{name:"Text",modifier:"StorageEntryModifierV13",type:"StorageEntryTypeV13",fallback:"Bytes",docs:"Vec"},StorageEntryTypeV13:{_enum:{Plain:"Type",Map:{hasher:"StorageHasherV13",key:"Type",value:"Type",linked:"bool"},DoubleMap:{hasher:"StorageHasherV13",key1:"Type",key2:"Type",value:"Type",key2Hasher:"StorageHasherV13"},NMap:{keyVec:"Vec",hashers:"Vec",value:"Type"}}},StorageMetadataV13:{prefix:"Text",items:"Vec"},StorageHasherV13:"StorageHasherV12",...{PortableTypeV14:{id:"Si1LookupTypeId",type:"Si1Type"},ErrorMetadataV14:{...xu,args:"Vec"},EventMetadataV14:{...xu,args:"Vec"},FunctionArgumentMetadataV14:{name:"Text",type:"Type",typeName:"Option"},FunctionMetadataV14:{...xu,args:"Vec"},ExtrinsicMetadataV14:{type:"SiLookupTypeId",version:"u8",signedExtensions:"Vec"},MetadataV14:{lookup:"PortableRegistry",pallets:"Vec",extrinsic:"ExtrinsicMetadataV14",type:"SiLookupTypeId"},PalletCallMetadataV14:{type:"SiLookupTypeId"},PalletConstantMetadataV14:{name:"Text",type:"SiLookupTypeId",value:"Bytes",docs:"Vec"},PalletErrorMetadataV14:{type:"SiLookupTypeId"},PalletEventMetadataV14:{type:"SiLookupTypeId"},PalletMetadataV14:{name:"Text",storage:"Option",calls:"Option",events:"Option",constants:"Vec",errors:"Option",index:"u8"},PalletStorageMetadataV14:{prefix:"Text",items:"Vec"},SignedExtensionMetadataV14:{identifier:"Text",type:"SiLookupTypeId",additionalSigned:"SiLookupTypeId"},StorageEntryMetadataV14:{name:"Text",modifier:"StorageEntryModifierV14",type:"StorageEntryTypeV14",fallback:"Bytes",docs:"Vec"},StorageEntryModifierV14:"StorageEntryModifierV13",StorageEntryTypeV14:{_enum:{Plain:"SiLookupTypeId",Map:{hashers:"Vec",key:"SiLookupTypeId",value:"SiLookupTypeId"}}},StorageHasherV14:"StorageHasherV13"},CustomMetadata15:{map:"BTreeMap"},CustomValueMetadata15:{type:"SiLookupTypeId",value:"Bytes"},ExtrinsicMetadataV15:{version:"u8",addressType:"SiLookupTypeId",callType:"SiLookupTypeId",signatureType:"SiLookupTypeId",extraType:"SiLookupTypeId",signedExtensions:"Vec"},OuterEnums15:{callType:"SiLookupTypeId",eventType:"SiLookupTypeId",errorType:"SiLookupTypeId"},PalletMetadataV15:{name:"Text",storage:"Option",calls:"Option",events:"Option",constants:"Vec",errors:"Option",index:"u8",docs:"Vec"},RuntimeApiMetadataV15:{name:"Text",methods:"Vec",docs:"Vec"},RuntimeApiMethodMetadataV15:{name:"Text",inputs:"Vec",output:"SiLookupTypeId",docs:"Vec"},RuntimeApiMethodParamMetadataV15:{name:"Text",type:"SiLookupTypeId"},MetadataV15:{lookup:"PortableRegistry",pallets:"Vec",extrinsic:"ExtrinsicMetadataV15",type:"SiLookupTypeId",apis:"Vec",outerEnums:"OuterEnums15",custom:"CustomMetadata15"},ErrorMetadataLatest:"ErrorMetadataV14",EventMetadataLatest:"EventMetadataV14",ExtrinsicMetadataLatest:"ExtrinsicMetadataV15",FunctionArgumentMetadataLatest:"FunctionArgumentMetadataV14",FunctionMetadataLatest:"FunctionMetadataV14",MetadataLatest:"MetadataV15",PalletCallMetadataLatest:"PalletCallMetadataV14",PalletConstantMetadataLatest:"PalletConstantMetadataV14",PalletErrorMetadataLatest:"PalletErrorMetadataV14",PalletEventMetadataLatest:"PalletEventMetadataV14",PalletMetadataLatest:"PalletMetadataV15",PalletStorageMetadataLatest:"PalletStorageMetadataV14",PortableType:"PortableTypeV14",RuntimeApiMetadataLatest:"RuntimeApiMetadataV15",SignedExtensionMetadataLatest:"SignedExtensionMetadataV14",StorageEntryMetadataLatest:"StorageEntryMetadataV14",StorageEntryModifierLatest:"StorageEntryModifierV14",StorageEntryTypeLatest:"StorageEntryTypeV14",StorageHasher:"StorageHasherV14",OpaqueMetadata:"Opaque",MetadataAll:{_enum:{V0:"DoNotConstruct",V1:"DoNotConstruct",V2:"DoNotConstruct",V3:"DoNotConstruct",V4:"DoNotConstruct",V5:"DoNotConstruct",V6:"DoNotConstruct",V7:"DoNotConstruct",V8:"DoNotConstruct",V9:"MetadataV9",V10:"MetadataV10",V11:"MetadataV11",V12:"MetadataV12",V13:"MetadataV13",V14:"MetadataV14",V15:"MetadataV15"}}}},wu={execute_block:{description:"Execute the given block.",params:[{name:"block",type:"Block"}],type:"Null"}},Vu={version:{description:"Returns the version of the runtime.",params:[],type:"RuntimeVersionPre3"}},Tu={initialize_block:{description:"Initialize a block with the given header.",params:[{name:"header",type:"Header"}],type:"Null"}},Su={version:{description:"Returns the version of the runtime.",params:[],type:"RuntimeVersion"}},ku={...wu,initialize_block:{description:"Initialize a block with the given header.",params:[{name:"header",type:"Header"}],type:"ExtrinsicInclusionMode"}},_u={Core:[{methods:{...Su,...ku},version:5},{methods:{...Su,...wu,...Tu},version:4},{methods:{version:{description:"Returns the version of the runtime.",params:[],type:"RuntimeVersionPre4"},...wu,...Tu},version:3},{methods:{...Vu,...wu,...Tu},version:2},{methods:{initialise_block:{description:"Initialize a block with the given header.",params:[{name:"header",type:"Header"}],type:"Null"},...Vu,...wu},version:1}]},Pu={Council:"CollectiveOrigin",System:"SystemOrigin",TechnicalCommittee:"CollectiveOrigin",Xcm:"XcmOrigin",XcmPallet:"XcmOrigin",Authority:"AuthorityOrigin",GeneralCouncil:"CollectiveOrigin"},Mu={rpc:{},runtime:_u,types:{Fixed64:"Int<64, Fixed64>",FixedI64:"Int<64, FixedI64>",FixedU64:"UInt<64, FixedU64>",Fixed128:"Int<128, Fixed128>",FixedI128:"Int<128, FixedI128>",FixedU128:"UInt<128, FixedU128>",I32F32:"Int<64, I32F32>",U32F32:"UInt<64, U32F32>",PerU16:"UInt<16, PerU16>",Perbill:"UInt<32, Perbill>",Percent:"UInt<8, Percent>",Permill:"UInt<32, Permill>",Perquintill:"UInt<64, Perquintill>",AccountId:"AccountId32",AccountId20:"GenericEthereumAccountId",AccountId32:"GenericAccountId32",AccountId33:"GenericAccountId33",AccountIdOf:"AccountId",AccountIndex:"GenericAccountIndex",Address:"MultiAddress",AssetId:"u32",Balance:"UInt<128, Balance>",BalanceOf:"Balance",Block:"GenericBlock",BlockNumber:"u32",BlockNumberFor:"BlockNumber",BlockNumberOf:"BlockNumber",Call:"GenericCall",CallHash:"Hash",CallHashOf:"CallHash",ChangesTrieConfiguration:{digestInterval:"u32",digestLevels:"u32"},ChangesTrieSignal:{_enum:{NewConfiguration:"Option"}},ConsensusEngineId:"GenericConsensusEngineId",CodecHash:"Hash",CrateVersion:{major:"u16",minor:"u8",patch:"u8"},Digest:{logs:"Vec"},DigestItem:{_enum:{Other:"Bytes",AuthoritiesChange:"Vec",ChangesTrieRoot:"Hash",SealV0:"SealV0",Consensus:"Consensus",Seal:"Seal",PreRuntime:"PreRuntime",ChangesTrieSignal:"ChangesTrieSignal",RuntimeEnvironmentUpdated:"Null"}},ExtrinsicsWeight:{normal:"Weight",operational:"Weight"},H32:"[u8; 4; H32]",H64:"[u8; 8; H64]",H128:"[u8; 16; H128]",H160:"[u8; 20; H160]",H256:"[u8; 32; H256]",H512:"[u8; 64; H512]",H1024:"[u8; 128; H1024]",H2048:"[u8; 256; H2048]",Hash:"H256",Header:{parentHash:"Hash",number:"Compact",stateRoot:"Hash",extrinsicsRoot:"Hash",digest:"Digest"},HeaderPartial:{parentHash:"Hash",number:"BlockNumber"},IndicesLookupSource:"GenericLookupSource",Index:"u32",Justification:"(ConsensusEngineId, EncodedJustification)",EncodedJustification:"Bytes",Justifications:"Vec",KeyValue:"(StorageKey, StorageData)",KeyTypeId:"u32",LockIdentifier:"[u8; 8]",LookupSource:"MultiAddress",LookupTarget:"AccountId",ModuleId:"LockIdentifier",MultiAddress:"GenericMultiAddress",MultiSigner:{_enum:{Ed25519:"[u8; 32]",Sr25519:"[u8; 32]",Ecdsa:"[u8; 33]"}},Moment:"UInt<64, Moment>",OpaqueCall:"Bytes",Origin:"DoNotConstruct",OriginCaller:{_enum:{System:"SystemOrigin"}},PalletId:"LockIdentifier",PalletsOrigin:"OriginCaller",PalletVersion:{major:"u16",minor:"u8",patch:"u8"},Pays:{_enum:["Yes","No"]},Phantom:"Null",PhantomData:"Null",Releases:{_enum:["V1","V2","V3","V4","V5","V6","V7","V8","V9","V10"]},RuntimeCall:"Call",RuntimeEvent:"Event",RuntimeDbWeight:{read:"Weight",write:"Weight"},SignedBlock:"SignedBlockWithJustifications",SignedBlockWithJustification:{block:"Block",justification:"Option"},SignedBlockWithJustifications:{block:"Block",justifications:"Option"},Slot:"u64",SlotDuration:"u64",StorageData:"Bytes",StorageInfo:{palletName:"Bytes",storage_name:"Bytes",prefix:"Bytes",maxValues:"Option",maxSize:"Option"},StorageProof:{trieNodes:"Vec"},TransactionPriority:"u64",TransactionLongevity:"u64",TransactionTag:"Bytes",TransactionInfo:{_alias:{dataSize:"size"},chunkRoot:"H256",contentHash:"H256",dataSize:"u32",blockChunks:"u32"},TransactionStorageProof:{chunk:"Vec",proof:"Vec>"},ValidatorId:"AccountId",ValidatorIdOf:"ValidatorId",WeightV0:"u32",WeightV1:"u64",WeightV2:{refTime:"Compact",proofSize:"Compact"},Weight:"WeightV2",WeightMultiplier:"Fixed64",PreRuntime:"(ConsensusEngineId, Bytes)",SealV0:"(u64, Signature)",Seal:"(ConsensusEngineId, Bytes)",Consensus:"(ConsensusEngineId, Bytes)",ExtrinsicInclusionMode:{_enum:["AllExtrinsics","OnlyInherents"]}}},Iu={rpc:{},types:{Si0Field:{name:"Option",type:"Si0LookupTypeId",typeName:"Option",docs:"Vec"},Si0LookupTypeId:"u32",Si0Path:"Vec",Si0Type:{path:"Si0Path",params:"Vec",def:"Si0TypeDef"},Si0TypeDef:{_enum:{Composite:"Si0TypeDefComposite",Variant:"Si0TypeDefVariant",Sequence:"Si0TypeDefSequence",Array:"Si0TypeDefArray",Tuple:"Si0TypeDefTuple",Primitive:"Si0TypeDefPrimitive",Compact:"Si0TypeDefCompact",Phantom:"Si0TypeDefPhantom",BitSequence:"Si0TypeDefBitSequence"}},Si0TypeDefArray:{len:"u32",type:"Si0LookupTypeId"},Si0TypeDefBitSequence:{bitStoreType:"Si0LookupTypeId",bitOrderType:"Si0LookupTypeId"},Si0TypeDefCompact:{type:"Si0LookupTypeId"},Si0TypeDefComposite:{fields:"Vec"},Si0TypeDefPhantom:"Null",Si0TypeDefVariant:{variants:"Vec"},Si0TypeDefPrimitive:{_enum:["Bool","Char","Str","U8","U16","U32","U64","U128","U256","I8","I16","I32","I64","I128","I256"]},Si0TypeDefSequence:{type:"Si0LookupTypeId"},Si0TypeDefTuple:"Vec",Si0TypeParameter:{name:"Text",type:"Option"},Si0Variant:{name:"Text",fields:"Vec",index:"Option",discriminant:"Option",docs:"Vec"},...gu,SiField:"Si1Field",SiLookupTypeId:"Si1LookupTypeId",SiPath:"Si1Path",SiType:"Si1Type",SiTypeDef:"Si1TypeDef",SiTypeDefArray:"Si1TypeDefArray",SiTypeDefBitSequence:"Si1TypeDefBitSequence",SiTypeDefCompact:"Si1TypeDefCompact",SiTypeDefComposite:"Si1TypeDefComposite",SiTypeDefPrimitive:"Si1TypeDefPrimitive",SiTypeDefSequence:"Si1TypeDefSequence",SiTypeDefTuple:"Si1TypeDefTuple",SiTypeParameter:"Si1TypeParameter",SiTypeDefVariant:"Si1TypeDefVariant",SiVariant:"Si1Variant"}},Nu={rpc:{},runtime:{AssetConversionApi:[{methods:{get_reserves:{description:"Get pool reserves",params:[{name:"asset1",type:"StagingXcmV3MultiLocation"},{name:"asset2",type:"StagingXcmV3MultiLocation"}],type:"Option<(Balance,Balance)>"},quote_price_exact_tokens_for_tokens:{description:"Quote price: exact tokens for tokens",params:[{name:"asset1",type:"StagingXcmV3MultiLocation"},{name:"asset2",type:"StagingXcmV3MultiLocation"},{name:"amount",type:"u128"},{name:"include_fee",type:"bool"}],type:"Option<(Balance)>"},quote_price_tokens_for_exact_tokens:{description:"Quote price: tokens for exact tokens",params:[{name:"asset1",type:"StagingXcmV3MultiLocation"},{name:"asset2",type:"StagingXcmV3MultiLocation"},{name:"amount",type:"u128"},{name:"include_fee",type:"bool"}],type:"Option<(Balance)>"}},version:1}]},types:{TAssetConversion:"Option"}},Eu={rpc:{},runtime:{AssetsApi:[{methods:{account_balances:{description:"Return the current set of authorities.",params:[{name:"account",type:"AccountId"}],type:"Vec<(u32, TAssetBalance)>"}},version:1}]},types:{AssetApprovalKey:{owner:"AccountId",delegate:"AccountId"},AssetApproval:{amount:"TAssetBalance",deposit:"TAssetDepositBalance"},AssetBalance:{balance:"TAssetBalance",isFrozen:"bool",isSufficient:"bool"},AssetDestroyWitness:{accounts:"Compact",sufficients:"Compact",approvals:"Compact"},AssetDetails:{owner:"AccountId",issuer:"AccountId",admin:"AccountId",freezer:"AccountId",supply:"TAssetBalance",deposit:"TAssetDepositBalance",minBalance:"TAssetBalance",isSufficient:"bool",accounts:"u32",sufficients:"u32",approvals:"u32",isFrozen:"bool"},AssetMetadata:{deposit:"TAssetDepositBalance",name:"Vec",symbol:"Vec",decimals:"u8",isFrozen:"bool"},TAssetBalance:"u64",TAssetDepositBalance:"BalanceOf"}},Ou={rpc:{},runtime:{AuraApi:[{methods:{authorities:{description:"Return the current set of authorities.",params:[],type:"Vec"},slot_duration:{description:"Returns the slot duration for Aura.",params:[],type:"SlotDuration"}},version:1}]},types:{RawAuraPreDigest:{slotNumber:"u64"}}},Au={rpc:{},types:{UncleEntryItem:{_enum:{InclusionHeight:"BlockNumber",Uncle:"(Hash, Option)"}}}},Cu={current_epoch:{description:"Returns information regarding the current epoch.",params:[],type:"Epoch"},current_epoch_start:{description:"Returns the slot that started the current epoch.",params:[],type:"Slot"},generate_key_ownership_proof:{description:"Generates a proof of key ownership for the given authority in the current epoch.",params:[{name:"slot",type:"Slot"},{name:"authorityId",type:"AuthorityId"}],type:"Option"},next_epoch:{description:"Returns information regarding the next epoch (which was already previously announced).",params:[],type:"Epoch"},submit_report_equivocation_unsigned_extrinsic:{description:"Submits an unsigned extrinsic to report an equivocation.",params:[{name:"equivocationProof",type:"BabeEquivocationProof"},{name:"keyOwnerProof",type:"OpaqueKeyOwnershipProof"}],type:"Option"}},Hu={rpc:{epochAuthorship:{description:"Returns data about which slots (primary or secondary) can be claimed in the current epoch with the keys in the keystore",isUnsafe:!0,params:[],type:"HashMap"}},runtime:{BabeApi:[{methods:{configuration:{description:"Return the genesis configuration for BABE. The configuration is only read on genesis.",params:[],type:"BabeGenesisConfiguration"},...Cu},version:2},{methods:{configuration:{description:"Return the configuration for BABE. Version 1.",params:[],type:"BabeGenesisConfigurationV1"},...Cu},version:1}]},types:{AllowedSlots:{_enum:["PrimarySlots","PrimaryAndSecondaryPlainSlots","PrimaryAndSecondaryVRFSlots"]},BabeAuthorityWeight:"u64",BabeEpochConfiguration:{c:"(u64, u64)",allowedSlots:"AllowedSlots"},BabeBlockWeight:"u32",BabeEquivocationProof:{offender:"AuthorityId",slotNumber:"SlotNumber",firstHeader:"Header",secondHeader:"Header"},BabeGenesisConfiguration:{slotDuration:"u64",epochLength:"u64",c:"(u64, u64)",genesisAuthorities:"Vec<(AuthorityId, BabeAuthorityWeight)>",randomness:"Randomness",allowedSlots:"AllowedSlots"},BabeGenesisConfigurationV1:{slotDuration:"u64",epochLength:"u64",c:"(u64, u64)",genesisAuthorities:"Vec<(AuthorityId, BabeAuthorityWeight)>",randomness:"Randomness",secondarySlots:"bool"},BabeWeight:"u64",MaybeRandomness:"Option",MaybeVrf:"Option",Epoch:{epochIndex:"u64",startSlot:"Slot",duration:"u64",authorities:"Vec<(AuthorityId, BabeAuthorityWeight)>",randomness:"Hash",config:"BabeEpochConfiguration"},EpochAuthorship:{primary:"Vec",secondary:"Vec",secondary_vrf:"Vec"},NextConfigDescriptor:{_enum:{V0:"Null",V1:"NextConfigDescriptorV1"}},NextConfigDescriptorV1:{c:"(u64, u64)",allowedSlots:"AllowedSlots"},OpaqueKeyOwnershipProof:"Bytes",Randomness:"Hash",RawBabePreDigest:{_enum:{Phantom:"Null",Primary:"RawBabePreDigestPrimary",SecondaryPlain:"RawBabePreDigestSecondaryPlain",SecondaryVRF:"RawBabePreDigestSecondaryVRF"}},RawBabePreDigestPrimary:{authorityIndex:"u32",slotNumber:"SlotNumber",vrfOutput:"VrfOutput",vrfProof:"VrfProof"},RawBabePreDigestSecondaryPlain:{authorityIndex:"u32",slotNumber:"SlotNumber"},RawBabePreDigestSecondaryVRF:{authorityIndex:"u32",slotNumber:"SlotNumber",vrfOutput:"VrfOutput",vrfProof:"VrfProof"},RawBabePreDigestTo159:{_enum:{Primary:"RawBabePreDigestPrimaryTo159",Secondary:"RawBabePreDigestSecondaryTo159"}},RawBabePreDigestPrimaryTo159:{authorityIndex:"u32",slotNumber:"SlotNumber",weight:"BabeBlockWeight",vrfOutput:"VrfOutput",vrfProof:"VrfProof"},RawBabePreDigestSecondaryTo159:{authorityIndex:"u32",slotNumber:"SlotNumber",weight:"BabeBlockWeight"},RawBabePreDigestCompat:{_enum:{Zero:"u32",One:"u32",Two:"u32",Three:"u32"}},SlotNumber:"u64",VrfData:"[u8; 32]",VrfOutput:"[u8; 32]",VrfProof:"[u8; 64]"}},Ru={rpc:{},types:{AccountData:{free:"Balance",reserved:"Balance",miscFrozen:"Balance",feeFrozen:"Balance"},BalanceLockTo212:{id:"LockIdentifier",amount:"Balance",until:"BlockNumber",reasons:"WithdrawReasons"},BalanceLock:{id:"LockIdentifier",amount:"Balance",reasons:"Reasons"},BalanceStatus:{_enum:["Free","Reserved"]},Reasons:{_enum:["Fee","Misc","All"]},ReserveData:{id:"ReserveIdentifier",amount:"Balance"},ReserveIdentifier:"[u8; 8]",VestingSchedule:{offset:"Balance",perBlock:"Balance",startingBlock:"BlockNumber"},WithdrawReasons:{_set:{TransactionPayment:1,Transfer:2,Reserve:4,Fee:8,Tip:16}}}},Bu={beefy_genesis:{description:"Return the block number where BEEFY consensus is enabled/started",params:[],type:"Option"},generate_key_ownership_proof:{description:"Generates a proof of key ownership for the given authority in the given set.",params:[{name:"setId",type:"ValidatorSetId"},{name:"authorityId",type:"AuthorityId"}],type:"Option"},validator_set:{description:"Return the current active BEEFY validator set",params:[],type:"Option"}},Lu={...Bu,submit_report_equivocation_unsigned_extrinsic:{description:"Submits an unsigned extrinsic to report an equivocation.",params:[{name:"equivocationProof",type:"BeefyEquivocationProof"},{name:"keyOwnerProof",type:"OpaqueKeyOwnershipProof"}],type:"Option"}},zu={rpc:{getFinalizedHead:{description:"Returns hash of the latest BEEFY finalized block as seen by this client.",params:[],type:"H256"},subscribeJustifications:{description:"Returns the block most recently finalized by BEEFY, alongside its justification.",params:[],pubsub:["justifications","subscribeJustifications","unsubscribeJustifications"],type:"BeefyVersionedFinalityProof"}},runtime:{BeefyApi:[{methods:{...Bu,submit_report_double_voting_unsigned_extrinsic:{description:"Submits an unsigned extrinsic to report a double voting equivocation.",params:[{name:"equivocationProof",type:"SpConsensusBeefyDoubleVotingProof"},{name:"keyOwnerProof",type:"OpaqueKeyOwnershipProof"}],type:"Option"}},version:4},{methods:Lu,version:3},{methods:Lu,version:2},{methods:Lu,version:1}],BeefyMmrApi:[{methods:{authority_set_proof:{description:"Return the currently active BEEFY authority set proof.",params:[],type:"BeefyAuthoritySet"},next_authority_set_proof:{description:"Return the next/queued BEEFY authority set proof.",params:[],type:"BeefyNextAuthoritySet"}},version:1}]},types:{BeefyAuthoritySet:{id:"u64",len:"u32",root:"H256"},BeefyCommitment:{payload:"BeefyPayload",blockNumber:"BlockNumber",validatorSetId:"ValidatorSetId"},BeefyId:"[u8; 33]",BeefyEquivocationProof:{first:"BeefyVoteMessage",second:"BeefyVoteMessage"},BeefyCompactSignedCommitment:{commitment:"BeefyCommitment",signaturesFrom:"Vec",validatorSetLen:"u32",signaturesCompact:"Vec"},BeefySignedCommitment:{commitment:"BeefyCommitment",signatures:"Vec>"},BeefyVersionedFinalityProof:{_enum:{V0:"Null",V1:"BeefyCompactSignedCommitment"}},BeefyNextAuthoritySet:{id:"u64",len:"u32",root:"H256"},BeefyPayload:"Vec<(BeefyPayloadId, Bytes)>",BeefyPayloadId:"[u8;2]",BeefyVoteMessage:{commitment:"BeefyCommitment",id:"AuthorityId",signature:"Signature"},MmrRootHash:"H256",ValidatorSetId:"u64",ValidatorSet:{validators:"Vec",id:"ValidatorSetId"}}},Uu={rpc:{},runtime:{Benchmark:[{methods:{benchmark_metadata:{description:"Get the benchmark metadata available for this runtime.",params:[{name:"extra",type:"bool"}],type:"(Vec, Vec)"},dispatch_benchmark:{description:"Dispatch the given benchmark.",params:[{name:"config",type:"BenchmarkConfig"}],type:"Result, Text>"}},version:1}]},types:{BenchmarkBatch:{pallet:"Text",instance:"Text",benchmark:"Text",results:"Vec"},BenchmarkConfig:{pallet:"Bytes",benchmark:"Bytes",selectedComponents:"Vec<(BenchmarkParameter, u32)>",verify:"bool",internalRepeats:"u32"},BenchmarkList:{pallet:"Bytes",instance:"Bytes",benchmarks:"Vec"},BenchmarkMetadata:{name:"Bytes",components:"Vec<(BenchmarkParameter, u32, u32)>"},BenchmarkParameter:{_enum:["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]},BenchmarkResult:{components:"Vec<(BenchmarkParameter, u32)>",extrinsicTime:"u128",storageRootTime:"u128",reads:"u32",repeatReads:"u32",writes:"u32",repeatWrites:"u32",proofSize:"u32",benchKeys:"Vec<(Vec, u32, u32, bool)>"}}},Du={random_seed:{description:"Generate a random seed.",params:[],type:"Hash"}},qu={apply_extrinsic:{description:"Apply the given extrinsic.",params:[{name:"extrinsic",type:"Extrinsic"}],type:"ApplyExtrinsicResultPre6"}},ju={check_inherents:{description:"Check that the inherents are valid.",params:[{name:"block",type:"Block"},{name:"data",type:"InherentData"}],type:"CheckInherentsResult"},inherent_extrinsics:{description:"Generate inherent extrinsics.",params:[{name:"inherent",type:"InherentData"}],type:"Vec"}},Fu={finalize_block:{description:"Finish the current block.",params:[],type:"Header"}},Xu={rpc:{},runtime:{BlockBuilder:[{methods:{apply_extrinsic:{description:"Apply the given extrinsic.",params:[{name:"extrinsic",type:"Extrinsic"}],type:"ApplyExtrinsicResult"},...ju,...Fu},version:6},{methods:{...qu,...ju,...Fu},version:5},{methods:{...Du,...qu,...ju,...Fu},version:4},{methods:{...Du,...ju,...Fu},version:3},{methods:{finalise_block:{description:"Finish the current block.",params:[],type:"Header"},...Du,...ju},version:2}]},types:{CheckInherentsResult:{okay:"bool",fatalError:"bool",errors:"InherentData"},InherentData:{data:"BTreeMap"},InherentIdentifier:"[u8; 8]"}},Wu={rpc:{},types:{CollectiveOrigin:{_enum:{Members:"(MemberCount, MemberCount)",Member:"AccountId"}},MemberCount:"u32",ProposalIndex:"u32",VotesTo230:{index:"ProposalIndex",threshold:"MemberCount",ayes:"Vec",nays:"Vec"},Votes:{index:"ProposalIndex",threshold:"MemberCount",ayes:"Vec",nays:"Vec",end:"BlockNumber"}}},Zu={rpc:{},types:{AuthorityId:"AccountId",RawVRFOutput:"[u8; 32]"}},Gu={get_storage:{description:"Query a given storage key in a given contract.",params:[{name:"address",type:"AccountId"},{name:"key",type:"Bytes"}],type:"Option"},upload_code:{description:"Upload new code without instantiating a contract from it.",params:[{name:"origin",type:"AccountId"},{name:"code",type:"Bytes"},{name:"storageDepositLimit",type:"Option"}],type:"CodeUploadResult"}},Ku={rpc:{call:{deprecated:"Use the runtime interface `api.call.contractsApi.call` instead",description:"Executes a call to a contract",params:[{name:"callRequest",type:"ContractCallRequest"},{isHistoric:!0,isOptional:!0,name:"at",type:"BlockHash"}],type:"ContractExecResult"},getStorage:{deprecated:"Use the runtime interface `api.call.contractsApi.getStorage` instead",description:"Returns the value under a specified storage key in a contract",params:[{name:"address",type:"AccountId"},{name:"key",type:"H256"},{isHistoric:!0,isOptional:!0,name:"at",type:"BlockHash"}],type:"Option"},instantiate:{deprecated:"Use the runtime interface `api.call.contractsApi.instantiate` instead",description:"Instantiate a new contract",params:[{name:"request",type:"InstantiateRequestV1"},{isHistoric:!0,isOptional:!0,name:"at",type:"BlockHash"}],type:"ContractInstantiateResult"},rentProjection:{deprecated:"Not available in newer versions of the contracts interfaces",description:"Returns the projected time a given contract will be able to sustain paying its rent",params:[{name:"address",type:"AccountId"},{isHistoric:!0,isOptional:!0,name:"at",type:"BlockHash"}],type:"Option"},uploadCode:{deprecated:"Use the runtime interface `api.call.contractsApi.uploadCode` instead",description:"Upload new code without instantiating a contract from it",endpoint:"contracts_upload_code",params:[{name:"uploadRequest",type:"CodeUploadRequest"},{isHistoric:!0,isOptional:!0,name:"at",type:"BlockHash"}],type:"CodeUploadResult"}},runtime:{ContractsApi:[{methods:{call:{description:"Perform a call from a specified account to a given contract.",params:[{name:"origin",type:"AccountId"},{name:"dest",type:"AccountId"},{name:"value",type:"Balance"},{name:"gasLimit",type:"Option"},{name:"storageDepositLimit",type:"Option"},{name:"inputData",type:"Vec"}],type:"ContractExecResult"},instantiate:{description:"Instantiate a new contract.",params:[{name:"origin",type:"AccountId"},{name:"value",type:"Balance"},{name:"gasLimit",type:"Option"},{name:"storageDepositLimit",type:"Option"},{name:"code",type:"CodeSource"},{name:"data",type:"Bytes"},{name:"salt",type:"Bytes"}],type:"ContractInstantiateResult"},...Gu},version:2},{methods:{call:{description:"Perform a call from a specified account to a given contract.",params:[{name:"origin",type:"AccountId"},{name:"dest",type:"AccountId"},{name:"value",type:"Balance"},{name:"gasLimit",type:"u64"},{name:"storageDepositLimit",type:"Option"},{name:"inputData",type:"Vec"}],type:"ContractExecResultU64"},instantiate:{description:"Instantiate a new contract.",params:[{name:"origin",type:"AccountId"},{name:"value",type:"Balance"},{name:"gasLimit",type:"u64"},{name:"storageDepositLimit",type:"Option"},{name:"code",type:"CodeSource"},{name:"data",type:"Bytes"},{name:"salt",type:"Bytes"}],type:"ContractInstantiateResultU64"},...Gu},version:1}]},types:{AliveContractInfo:{trieId:"TrieId",storageSize:"u32",pairCount:"u32",codeHash:"CodeHash",rentAllowance:"Balance",rentPaid:"Balance",deductBlock:"BlockNumber",lastWrite:"Option",_reserved:"Option"},CodeHash:"Hash",CodeSource:{_enum:{Upload:"Bytes",Existing:"Hash"}},CodeUploadRequest:{origin:"AccountId",code:"Bytes",storageDepositLimit:"Option"},CodeUploadResult:"Result",CodeUploadResultValue:{codeHash:"CodeHash",deposit:"Balance"},ContractCallRequest:{origin:"AccountId",dest:"AccountId",value:"Balance",gasLimit:"u64",storageDepositLimit:"Option",inputData:"Bytes"},ContractExecResultSuccessTo255:{status:"u8",data:"Raw"},ContractExecResultTo255:{_enum:{Success:"ContractExecResultSuccessTo255",Error:"Null"}},ContractExecResultSuccessTo260:{flags:"ContractReturnFlags",data:"Bytes",gasConsumed:"u64"},ContractExecResultTo260:{_enum:{Success:"ContractExecResultSuccessTo260",Error:"Null"}},ContractExecResultOk:{flags:"ContractReturnFlags",data:"Bytes"},ContractExecResultResult:"Result",ContractExecResultTo267:{gasConsumed:"u64",debugMessage:"Text",result:"ContractExecResultResult"},ContractExecResult:{gasConsumed:"Weight",gasRequired:"Weight",storageDeposit:"StorageDeposit",debugMessage:"Text",result:"ContractExecResultResult"},ContractExecResultU64:{gasConsumed:"u64",gasRequired:"u64",storageDeposit:"StorageDeposit",debugMessage:"Text",result:"ContractExecResultResult"},ContractInfo:{_enum:{Alive:"AliveContractInfo",Tombstone:"TombstoneContractInfo"}},ContractCallFlags:{_set:{_bitLength:32,ForwardInput:1,CloneInput:2,TailCall:4,AllowReentry:8}},ContractReturnFlags:{_set:{_bitLength:32,Revert:1}},ContractStorageKey:"[u8; 32]",DeletedContract:{pairCount:"u32",trieId:"TrieId"},ExecReturnValue:{flags:"ContractReturnFlags",data:"Bytes"},Gas:"u64",HostFnWeightsTo264:{caller:"Weight",address:"Weight",gasLeft:"Weight",balance:"Weight",valueTransferred:"Weight",minimumBalance:"Weight",tombstoneDeposit:"Weight",rentAllowance:"Weight",blockNumber:"Weight",now:"Weight",weightToFee:"Weight",gas:"Weight",input:"Weight",inputPerByte:"Weight",return:"Weight",returnPerByte:"Weight",terminate:"Weight",restoreTo:"Weight",restoreToPerDelta:"Weight",random:"Weight",depositEvent:"Weight",depositEventPerTopic:"Weight",depositEventPerByte:"Weight",setRentAllowance:"Weight",setStorage:"Weight",setStoragePerByte:"Weight",clearStorage:"Weight",getStorage:"Weight",getStoragePerByte:"Weight",transfer:"Weight",call:"Weight",callTransferSurcharge:"Weight",callPerInputByte:"Weight",callPerOutputByte:"Weight",instantiate:"Weight",instantiatePerInputByte:"Weight",instantiatePerOutputByte:"Weight",hashSha2256:"Weight",hashSha2256PerByte:"Weight",hashKeccak256:"Weight",hashKeccak256PerByte:"Weight",hashBlake2256:"Weight",hashBlake2256PerByte:"Weight",hashBlake2128:"Weight",hashBlake2128PerByte:"Weight"},HostFnWeights:{caller:"Weight",address:"Weight",gasLeft:"Weight",balance:"Weight",valueTransferred:"Weight",minimumBalance:"Weight",tombstoneDeposit:"Weight",rentAllowance:"Weight",blockNumber:"Weight",now:"Weight",weightToFee:"Weight",gas:"Weight",input:"Weight",inputPerByte:"Weight",return:"Weight",returnPerByte:"Weight",terminate:"Weight",terminatePerCodeByte:"Weight",restoreTo:"Weight",restoreToPerCallerCodeByte:"Weight",restoreToPerTombstoneCodeByte:"Weight",restoreToPerDelta:"Weight",random:"Weight",depositEvent:"Weight",depositEventPerTopic:"Weight",depositEventPerByte:"Weight",setRentAllowance:"Weight",setStorage:"Weight",setStoragePerByte:"Weight",clearStorage:"Weight",getStorage:"Weight",getStoragePerByte:"Weight",transfer:"Weight",call:"Weight",callPerCodeByte:"Weight",callTransferSurcharge:"Weight",callPerInputByte:"Weight",callPerOutputByte:"Weight",instantiate:"Weight",instantiatePerCodeByte:"Weight",instantiatePerInputByte:"Weight",instantiatePerOutputByte:"Weight",instantiatePerSaltByte:"Weight",hashSha2256:"Weight",hashSha2256PerByte:"Weight",hashKeccak256:"Weight",hashKeccak256PerByte:"Weight",hashBlake2256:"Weight",hashBlake2256PerByte:"Weight",hashBlake2128:"Weight",hashBlake2128PerByte:"Weight",rentParams:"Weight"},InstantiateRequestV1:{origin:"AccountId",value:"Balance",gasLimit:"Gas",code:"Bytes",data:"Bytes",salt:"Bytes"},InstantiateRequestV2:{_fallback:"InstantiateRequestV1",origin:"AccountId",value:"Balance",gasLimit:"Gas",storageDepositLimit:"Option",code:"Bytes",data:"Bytes",salt:"Bytes"},InstantiateRequest:{_fallback:"InstantiateRequestV2",origin:"AccountId",value:"Balance",gasLimit:"Gas",storageDepositLimit:"Option",code:"CodeSource",data:"Bytes",salt:"Bytes"},ContractInstantiateResultTo267:"Result",ContractInstantiateResultTo299:"Result",ContractInstantiateResult:{gasConsumed:"WeightV2",gasRequired:"WeightV2",storageDeposit:"StorageDeposit",debugMessage:"Text",result:"InstantiateReturnValue"},ContractInstantiateResultU64:{_fallback:"ContractInstantiateResultTo299",gasConsumed:"u64",gasRequired:"u64",storageDeposit:"StorageDeposit",debugMessage:"Text",result:"InstantiateReturnValue"},InstantiateReturnValueTo267:{result:"ExecReturnValue",accountId:"AccountId",rentProjection:"Option"},InstantiateReturnValueOk:{result:"ExecReturnValue",accountId:"AccountId"},InstantiateReturnValue:"Result",InstructionWeights:{i64const:"u32",i64load:"u32",i64store:"u32",select:"u32",rIf:"u32",br:"u32",brIf:"u32",brIable:"u32",brIablePerEntry:"u32",call:"u32",callIndirect:"u32",callIndirectPerParam:"u32",localGet:"u32",localSet:"u32",local_tee:"u32",globalGet:"u32",globalSet:"u32",memoryCurrent:"u32",memoryGrow:"u32",i64clz:"u32",i64ctz:"u32",i64popcnt:"u32",i64eqz:"u32",i64extendsi32:"u32",i64extendui32:"u32",i32wrapi64:"u32",i64eq:"u32",i64ne:"u32",i64lts:"u32",i64ltu:"u32",i64gts:"u32",i64gtu:"u32",i64les:"u32",i64leu:"u32",i64ges:"u32",i64geu:"u32",i64add:"u32",i64sub:"u32",i64mul:"u32",i64divs:"u32",i64divu:"u32",i64rems:"u32",i64remu:"u32",i64and:"u32",i64or:"u32",i64xor:"u32",i64shl:"u32",i64shrs:"u32",i64shru:"u32",i64rotl:"u32",i64rotr:"u32"},LimitsTo264:{eventTopics:"u32",stackHeight:"u32",globals:"u32",parameters:"u32",memoryPages:"u32",tableSize:"u32",brTableSize:"u32",subjectLen:"u32",codeSize:"u32"},Limits:{eventTopics:"u32",stackHeight:"u32",globals:"u32",parameters:"u32",memoryPages:"u32",tableSize:"u32",brTableSize:"u32",subjectLen:"u32"},PrefabWasmModule:{scheduleVersion:"Compact",initial:"Compact",maximum:"Compact",refcount:"Compact",_reserved:"Option",code:"Bytes",originalCodeLen:"u32"},RentProjection:{_enum:{EvictionAt:"BlockNumber",NoEviction:"Null"}},ScheduleTo212:{version:"u32",putCodePerByteCost:"Gas",growMemCost:"Gas",regularOpCost:"Gas",returnDataPerByteCost:"Gas",eventDataPerByteCost:"Gas",eventPerTopicCost:"Gas",eventBaseCost:"Gas",sandboxDataReadCost:"Gas",sandboxDataWriteCost:"Gas",maxEventTopics:"u32",maxStackHeight:"u32",maxMemoryPages:"u32",enablePrintln:"bool",maxSubjectLen:"u32"},ScheduleTo258:{version:"u32",putCodePerByteCost:"Gas",growMemCost:"Gas",regularOpCost:"Gas",returnDataPerByteCost:"Gas",eventDataPerByteCost:"Gas",eventPerTopicCost:"Gas",eventBaseCost:"Gas",sandboxDataReadCost:"Gas",sandboxDataWriteCost:"Gas",transferCost:"Gas",maxEventTopics:"u32",maxStackHeight:"u32",maxMemoryPages:"u32",enablePrintln:"bool",maxSubjectLen:"u32"},ScheduleTo264:{version:"u32",enablePrintln:"bool",limits:"LimitsTo264",instructionWeights:"InstructionWeights",hostFnWeights:"HostFnWeightsTo264"},Schedule:{version:"u32",enablePrintln:"bool",limits:"Limits",instructionWeights:"InstructionWeights",hostFnWeights:"HostFnWeights"},SeedOf:"Hash",StorageDeposit:{_enum:{Refund:"Balance",Charge:"Balance"}},TombstoneContractInfo:"Hash",TrieId:"Bytes"}},Ju={rpc:{},types:{AccountVote:{_enum:{Standard:"AccountVoteStandard",Split:"AccountVoteSplit"}},AccountVoteSplit:{aye:"Balance",nay:"Balance"},AccountVoteStandard:{vote:"Vote",balance:"Balance"},Conviction:{_enum:["None","Locked1x","Locked2x","Locked3x","Locked4x","Locked5x","Locked6x"]},Delegations:{votes:"Balance",capital:"Balance"},PreimageStatus:{_enum:{Missing:"BlockNumber",Available:"PreimageStatusAvailable"}},PreimageStatusAvailable:{data:"Bytes",provider:"AccountId",deposit:"Balance",since:"BlockNumber",expiry:"Option"},PriorLock:"(BlockNumber, Balance)",PropIndex:"u32",Proposal:"Call",ProxyState:{_enum:{Open:"AccountId",Active:"AccountId"}},ReferendumIndex:"u32",ReferendumInfoTo239:{end:"BlockNumber",proposalHash:"Hash",threshold:"VoteThreshold",delay:"BlockNumber"},ReferendumInfo:{_enum:{Ongoing:"ReferendumStatus",Finished:"ReferendumInfoFinished"}},ReferendumInfoFinished:{approved:"bool",end:"BlockNumber"},ReferendumStatus:{end:"BlockNumber",proposalHash:"Hash",threshold:"VoteThreshold",delay:"BlockNumber",tally:"Tally"},Tally:{ayes:"Balance",nays:"Balance",turnout:"Balance"},Voting:{_enum:{Direct:"VotingDirect",Delegating:"VotingDelegating"}},VotingDirect:{votes:"Vec",delegations:"Delegations",prior:"PriorLock"},VotingDirectVote:"(ReferendumIndex, AccountVote)",VotingDelegating:{balance:"Balance",target:"AccountId",conviction:"Conviction",delegations:"Delegations",prior:"PriorLock"}}},Yu={rpc:{getBlockStats:{description:"Reexecute the specified `block_hash` and gather statistics while doing so",isUnsafe:!0,params:[{isHistoric:!0,name:"at",type:"Hash"}],type:"Option"}},types:{BlockStats:{witnessLen:"u64",witnessCompactLen:"u64",blockLen:"u64",blockNumExtrinsics:"u64"}}},Qu={rpc:{},runtime:{AuthorityDiscoveryApi:[{methods:{authorities:{description:"Retrieve authority identifiers of the current and next authority set.",params:[],type:"Vec"}},version:1}]},types:{}},$u={rpc:{},types:{ApprovalFlag:"u32",DefunctVoter:{who:"AccountId",voteCount:"Compact",candidateCount:"Compact"},Renouncing:{_enum:{Member:"Null",RunnerUp:"Null",Candidate:"Compact"}},SetIndex:"u32",Vote:"GenericVote",VoteIndex:"u32",VoterInfo:{lastActive:"VoteIndex",lastWin:"VoteIndex",pot:"Balance",stake:"Balance"},VoteThreshold:{_enum:["Super Majority Approve","Super Majority Against","Simple Majority"]}}},el={rpc:{createBlock:{description:"Instructs the manual-seal authorship task to create a new block",params:[{name:"createEmpty",type:"bool"},{name:"finalize",type:"bool"},{isOptional:!0,name:"parentHash",type:"BlockHash"}],type:"CreatedBlock"},finalizeBlock:{description:"Instructs the manual-seal authorship task to finalize a block",params:[{name:"hash",type:"BlockHash"},{isOptional:!0,name:"justification",type:"Justification"}],type:"bool"}},types:{CreatedBlock:{_alias:{blockHash:"hash"},blockHash:"BlockHash",aux:"ImportedAux"},ImportedAux:{headerOnly:"bool",clearJustificationRequests:"bool",needsJustification:"bool",badJustification:"bool",needsFinalityProof:"bool",isNewBest:"bool"}}},tl={rpc:{},types:{EvmAccount:{nonce:"u256",balance:"u256"},EvmCallInfo:{exitReason:"ExitReason",value:"Bytes",usedGas:"U256",logs:"Vec"},EvmCreateInfo:{exitReason:"ExitReason",value:"H160",usedGas:"U256",logs:"Vec"},EvmCallInfoV2:{exitReason:"ExitReason",value:"Bytes",usedGas:"U256",weightInfo:"Option",logs:"Vec"},EvmCreateInfoV2:{exitReason:"ExitReason",value:"H160",usedGas:"U256",weightInfo:"Option",logs:"Vec"},EvmLog:{address:"H160",topics:"Vec",data:"Bytes"},EvmVicinity:{gasPrice:"u256",origin:"H160"},EvmWeightInfo:{refTimeLimit:"Option",proofSizeLimit:"Option",refTimeUsage:"Option",proofSizeUsage:"Option"},ExitError:{_enum:{StackUnderflow:"Null",StackOverflow:"Null",InvalidJump:"Null",InvalidRange:"Null",DesignatedInvalid:"Null",CallTooDeep:"Null",CreateCollision:"Null",CreateContractLimit:"Null",OutOfOffset:"Null",OutOfGas:"Null",OutOfFund:"Null",PCUnderflow:"Null",CreateEmpty:"Null",Other:"Text"}},ExitFatal:{_enum:{NotSupported:"Null",UnhandledInterrupt:"Null",CallErrorAsFatal:"ExitError",Other:"Text"}},ExitReason:{_enum:{Succeed:"ExitSucceed",Error:"ExitError",Revert:"ExitRevert",Fatal:"ExitFatal"}},ExitRevert:{_enum:["Reverted"]},ExitSucceed:{_enum:["Stopped","Returned","Suicided"]}}},nl={rpc:{},types:{Extrinsic:"GenericExtrinsic",ExtrinsicEra:"GenericExtrinsicEra",ExtrinsicPayload:"GenericExtrinsicPayload",ExtrinsicSignature:"MultiSignature",ExtrinsicV4:"GenericExtrinsicV4",ExtrinsicPayloadV4:"GenericExtrinsicPayloadV4",ExtrinsicSignatureV4:"GenericExtrinsicSignatureV4",ExtrinsicUnknown:"GenericExtrinsicUnknown",ExtrinsicPayloadUnknown:"GenericExtrinsicPayloadUnknown",ExtrinsicV5:"GenericExtrinsicV5",ExtrinsicPayloadV5:"GenericExtrinsicPayloadV5",ExtrinsicSignatureV5:"GenericExtrinsicSignatureV5",Era:"ExtrinsicEra",ImmortalEra:"GenericImmortalEra",MortalEra:"GenericMortalEra",AnySignature:"H512",MultiSignature:{_enum:{Ed25519:"Ed25519Signature",Sr25519:"Sr25519Signature",Ecdsa:"EcdsaSignature"}},Signature:"H512",SignerPayload:"GenericSignerPayload",EcdsaSignature:"[u8; 65]",Ed25519Signature:"H512",Sr25519Signature:"H512"}},rl={rpc:{},runtime:{FungiblesApi:[{methods:{query_account_balances:{description:"Returns the list of all `MultiAsset` that an `AccountId` has",params:[{name:"account",type:"AccountId"}],type:"Result, FungiblesAccessError>"}},version:1},{methods:{query_account_balances:{description:"Returns the list of all `MultiAsset` that an `AccountId` has",params:[{name:"account",type:"AccountId"}],type:"Result"}},version:2}]},types:{FungiblesAccessError:{_enum:["AssetIdConversionFailed","AmountToBalanceConversionFailed"]}}},al={rpc:{},types:{AssetOptions:{initalIssuance:"Compact",permissions:"PermissionLatest"},Owner:{_enum:{None:"Null",Address:"AccountId"}},PermissionsV1:{update:"Owner",mint:"Owner",burn:"Owner"},PermissionVersions:{_enum:{V1:"PermissionsV1"}},PermissionLatest:"PermissionsV1"}},il={rpc:{},runtime:{GenesisBuilder:[{methods:{build_config:{description:"Build `RuntimeGenesisConfig` from a JSON blob not using any defaults and store it in the storage.",params:[{name:"json",type:"Vec"}],type:"Result<(), GenesisBuildErr>"},create_default_config:{description:"Creates the default `RuntimeGenesisConfig` and returns it as a JSON blob.",params:[],type:"Vec"}},version:1}]},types:{GenesisBuildErr:"Text"}},sl={rpc:{},types:{ActiveGilt:{proportion:"Perquintill",amount:"Balance",who:"AccountId",expiry:"BlockNumber"},ActiveGiltsTotal:{frozen:"Balance",proportion:"Perquintill",index:"ActiveIndex",target:"Perquintill"},ActiveIndex:"u32",GiltBid:{amount:"Balance",who:"AccountId"}}},ol={generate_key_ownership_proof:{description:"Generates a proof of key ownership for the given authority in the given set.",params:[{name:"setId",type:"SetId"},{name:"authorityId",type:"AuthorityId"}],type:"Option"},grandpa_authorities:{description:"Get the current GRANDPA authorities and weights. This should not change except for when changes are scheduled and the corresponding delay has passed.",params:[],type:"AuthorityList"},submit_report_equivocation_unsigned_extrinsic:{description:"Submits an unsigned extrinsic to report an equivocation.",params:[{name:"equivocationProof",type:"GrandpaEquivocationProof"},{name:"keyOwnerProof",type:"OpaqueKeyOwnershipProof"}],type:"Option"}},cl={rpc:{proveFinality:{description:"Prove finality for the given block number, returning the Justification for the last block in the set.",params:[{name:"blockNumber",type:"BlockNumber"}],type:"Option"},roundState:{description:"Returns the state of the current best round state as well as the ongoing background rounds",params:[],type:"ReportedRoundStates"},subscribeJustifications:{description:"Subscribes to grandpa justifications",params:[],pubsub:["justifications","subscribeJustifications","unsubscribeJustifications"],type:"JustificationNotification"}},runtime:{GrandpaApi:[{methods:{current_set_id:{description:"Get current GRANDPA authority set id.",params:[],type:"SetId"},...ol},version:3},{methods:ol,version:2}]},types:{AuthorityIndex:"u64",AuthorityList:"Vec",AuthoritySet:{currentAuthorities:"AuthorityList",setId:"u64",pendingStandardChanges:"ForkTreePendingChange",pendingForcedChanges:"Vec",authoritySetChanges:"AuthoritySetChanges"},ForkTreePendingChange:{roots:"Vec",bestFinalizedNumber:"Option"},ForkTreePendingChangeNode:{hash:"BlockHash",number:"BlockNumber",data:"PendingChange",children:"Vec"},AuthoritySetChange:"(U64, BlockNumber)",AuthoritySetChanges:"Vec",AuthorityWeight:"u64",DelayKind:{_enum:{Finalized:"Null",Best:"DelayKindBest"}},DelayKindBest:{medianLastFinalized:"BlockNumber"},EncodedFinalityProofs:"Bytes",GrandpaEquivocation:{_enum:{Prevote:"GrandpaEquivocationValue",Precommit:"GrandpaEquivocationValue"}},GrandpaEquivocationProof:{setId:"SetId",equivocation:"GrandpaEquivocation"},GrandpaEquivocationValue:{roundNumber:"u64",identity:"AuthorityId",first:"(GrandpaPrevote, AuthoritySignature)",second:"(GrandpaPrevote, AuthoritySignature)"},GrandpaPrevote:{targetHash:"Hash",targetNumber:"BlockNumber"},GrandpaCommit:{targetHash:"BlockHash",targetNumber:"BlockNumber",precommits:"Vec"},GrandpaPrecommit:{targetHash:"BlockHash",targetNumber:"BlockNumber"},GrandpaSignedPrecommit:{precommit:"GrandpaPrecommit",signature:"AuthoritySignature",id:"AuthorityId"},GrandpaJustification:{round:"u64",commit:"GrandpaCommit",votesAncestries:"Vec
    "},JustificationNotification:"Bytes",KeyOwnerProof:"MembershipProof",NextAuthority:"(AuthorityId, AuthorityWeight)",PendingChange:{nextAuthorities:"AuthorityList",delay:"BlockNumber",canonHeight:"BlockNumber",canonHash:"BlockHash",delayKind:"DelayKind"},PendingPause:{scheduledAt:"BlockNumber",delay:"BlockNumber"},PendingResume:{scheduledAt:"BlockNumber",delay:"BlockNumber"},Precommits:{currentWeight:"u32",missing:"BTreeSet"},Prevotes:{currentWeight:"u32",missing:"BTreeSet"},ReportedRoundStates:{setId:"u32",best:"RoundState",background:"Vec"},RoundState:{round:"u32",totalWeight:"u32",thresholdWeight:"u32",prevotes:"Prevotes",precommits:"Precommits"},SetId:"u64",StoredPendingChange:{scheduledAt:"BlockNumber",delay:"BlockNumber",nextAuthorities:"AuthorityList"},StoredState:{_enum:{Live:"Null",PendingPause:"PendingPause",Paused:"Null",PendingResume:"PendingResume"}}}},dl={rpc:{},types:{IdentityFields:{_set:{_bitLength:64,Display:1,Legal:2,Web:4,Riot:8,Email:16,PgpFingerprint:32,Image:64,Twitter:128}},IdentityInfoAdditional:"(Data, Data)",IdentityInfoTo198:{additional:"Vec",display:"Data",legal:"Data",web:"Data",riot:"Data",email:"Data",pgpFingerprint:"Option",image:"Data"},IdentityInfo:{_fallback:"IdentityInfoTo198",additional:"Vec",display:"Data",legal:"Data",web:"Data",riot:"Data",email:"Data",pgpFingerprint:"Option",image:"Data",twitter:"Data"},IdentityJudgement:{_enum:{Unknown:"Null",FeePaid:"Balance",Reasonable:"Null",KnownGood:"Null",OutOfDate:"Null",LowQuality:"Null",Erroneous:"Null"}},RegistrationJudgement:"(RegistrarIndex, IdentityJudgement)",RegistrationTo198:{judgements:"Vec",deposit:"Balance",info:"IdentityInfoTo198"},Registration:{_fallback:"RegistrationTo198",judgements:"Vec",deposit:"Balance",info:"IdentityInfo"},RegistrarIndex:"u32",RegistrarInfo:{account:"AccountId",fee:"Balance",fields:"IdentityFields"}}},ul={rpc:{},types:{AuthIndex:"u32",AuthoritySignature:"Signature",Heartbeat:{blockNumber:"BlockNumber",networkState:"OpaqueNetworkState",sessionIndex:"SessionIndex",authorityIndex:"AuthIndex",validatorsLen:"u32"},HeartbeatTo244:{blockNumber:"BlockNumber",networkState:"OpaqueNetworkState",sessionIndex:"SessionIndex",authorityIndex:"AuthIndex"},OpaqueMultiaddr:"Opaque",OpaquePeerId:"Opaque",OpaqueNetworkState:{peerId:"OpaquePeerId",externalAddresses:"Vec"}}},ll={rpc:{},types:{CallIndex:"(u8, u8)",LotteryConfig:{price:"Balance",start:"BlockNumber",length:"BlockNumber",delay:"BlockNumber",repeat:"bool"}}},fl={rpc:{},runtime:{MixnetApi:[{methods:{current_mixnodes:{description:"Get the index and phase of the current session.",params:[],type:"Result"},maybe_register:{description:"Try to register a mixnode for the next session.",params:[{name:"session_index",type:"u32"},{name:"mixnode",type:"Mixnode"}],type:"bool"},prev_mixnodes:{description:"Get the index and phase of the current session.",params:[],type:"Result"},session_status:{description:"Get the index and phase of the current session.",params:[],type:"SessionStatus"}},version:1}]},types:{Mixnode:{externalAddresses:"Vec",kxPublic:"[u8; 32]",peerId:"[u8; 32]"},MixnodesErr:{_enum:{InsufficientRegistrations:{min:"u32",num:"u32"}}},SessionPhase:{_enum:["CoverToCurrent","RequestsToCurrent","CoverToPrev","DisconnectFromPrev"]},SessionStatus:{currentIndex:"u32",phase:"SessionPhase"}}},pl={rpc:{generateProof:{description:"Generate MMR proof for the given block numbers.",params:[{name:"blockNumbers",type:"Vec"},{isOptional:!0,name:"bestKnownBlockNumber",type:"u64"},{isHistoric:!0,isOptional:!0,name:"at",type:"BlockHash"}],type:"MmrLeafBatchProof"},root:{description:"Get the MMR root hash for the current best block.",params:[{isHistoric:!0,isOptional:!0,name:"at",type:"BlockHash"}],type:"MmrHash"},verifyProof:{description:"Verify an MMR proof",params:[{name:"proof",type:"MmrLeafBatchProof"}],type:"bool"},verifyProofStateless:{description:"Verify an MMR proof statelessly given an mmr_root",params:[{name:"root",type:"MmrHash"},{name:"proof",type:"MmrLeafBatchProof"}],type:"bool"}},runtime:{MmrApi:[{methods:{generate_proof:{description:"Generate MMR proof for the given block numbers.",params:[{name:"blockNumbers",type:"Vec"},{name:"bestKnownBlockNumber",type:"Option"}],type:"Result<(Vec, MmrBatchProof), MmrError>"},mmr_leaf_count:{description:"Return the number of MMR blocks in the chain.",params:[],type:"Result"},mmr_root:{description:"Return the on-chain MMR root hash.",params:[],type:"Result"},verify_proof:{description:"Verify MMR proof against on-chain MMR.",params:[{name:"leaves",type:"Vec"},{name:"proof",type:"MmrBatchProof"}],type:"Result<(), MmrError>"},verify_proof_stateless:{description:"Verify MMR proof against given root hash.",params:[{name:"root",type:"Hash"},{name:"leaves",type:"Vec"},{name:"proof",type:"MmrBatchProof"}],type:"Result<(), MmrError>"}},version:2},{methods:{generate_batch_proof:{description:"Generate MMR proof for a series of leaves under given indices.",params:[{name:"leafIndices",type:"Vec"}],type:"Result<(Vec, MmrBatchProof), MmrError>"},generate_proof:{description:"Generate MMR proof for a leaf under given index.",params:[{name:"leafIndex",type:"MmrLeafIndex"}],type:"Result<(MmrEncodableOpaqueLeaf, MmrProof), MmrError>"},mmr_root:{description:"Return the on-chain MMR root hash.",params:[],type:"Result"},verify_batch_proof:{description:"Verify MMR proof against on-chain MMR for a batch of leaves.",params:[{name:"leaves",type:"Vec"},{name:"proof",type:"MmrBatchProof"}],type:"Result<(), MmrError>"},verify_batch_proof_stateless:{description:"Verify MMR proof against given root hash or a batch of leaves.",params:[{name:"root",type:"Hash"},{name:"leaves",type:"Vec"},{name:"proof",type:"MmrBatchProof"}],type:"Result<(), MmrError>"},verify_proof:{description:"Verify MMR proof against on-chain MMR.",params:[{name:"leaf",type:"MmrEncodableOpaqueLeaf"},{name:"proof",type:"MmrProof"}],type:"Result<(), MmrError>"},verify_proof_stateless:{description:"Verify MMR proof against given root hash.",params:[{name:"root",type:"Hash"},{name:"leaf",type:"MmrEncodableOpaqueLeaf"},{name:"proof",type:"MmrProof"}],type:"Result<(), MmrError>"}},version:1}]},types:{MmrBatchProof:{leafIndices:"Vec",leafCount:"MmrNodeIndex",items:"Vec"},MmrEncodableOpaqueLeaf:"Bytes",MmrError:{_enum:["InvalidNumericOp","Push","GetRoot","Commit","GenerateProof","Verify","LeafNotFound"," PalletNotIncluded","InvalidLeafIndex","InvalidBestKnownBlock"]},MmrHash:"Hash",MmrLeafBatchProof:{blockHash:"BlockHash",leaves:"Bytes",proof:"Bytes"},MmrLeafIndex:"u64",MmrLeafProof:{blockHash:"BlockHash",leaf:"Bytes",proof:"Bytes"},MmrNodeIndex:"u64",MmrProof:{leafIndex:"MmrLeafIndex",leafCount:"MmrNodeIndex",items:"Vec"}}},hl={rpc:{},runtime:{NftsApi:[{methods:{attribute:{description:"An attribute",params:[{name:"collection",type:"NftCollectionId"},{name:"item",type:"NftItemId"},{name:"key",type:"Bytes"}],type:"Option"},collection_attribute:{description:"A collection attribute",params:[{name:"collection",type:"NftCollectionId"},{name:"key",type:"Bytes"}],type:"Option"},collection_owner:{description:"A collection owner",params:[{name:"collection",type:"NftCollectionId"}],type:"Option"},custom_attribute:{description:"A custom attribute",params:[{name:"account",type:"AccountId"},{name:"collection",type:"NftCollectionId"},{name:"item",type:"NftItemId"},{name:"key",type:"Bytes"}],type:"Option"},owner:{description:"Collection owner",params:[{name:"collection",type:"NftCollectionId"},{name:"item",type:"NftItemId"}],type:"Option"},system_attribute:{description:"System attribute",params:[{name:"collection",type:"NftCollectionId"},{name:"item",type:"NftItemId"},{name:"key",type:"Bytes"}],type:"Option"}},version:1}]},types:{NftCollectionId:"u32",NftItemId:"u32"}},bl={rpc:{},runtime:{NominationPoolsApi:[{methods:{balance_to_points:{description:"Returns the equivalent points of `new_funds` for a given pool.",params:[{name:"poolId",type:"NpPoolId"},{name:"newFunds",type:"Balance"}],type:"Balance"},pending_rewards:{description:"Returns the pending rewards for the given member.",params:[{name:"member",type:"AccountId"}],type:"Balance"},points_to_balance:{description:"Returns the equivalent balance of `points` for a given pool.",params:[{name:"poolId",type:"NpPoolId"},{name:"points",type:"Balance"}],type:"Balance"}},version:1}]},types:{NpApiError:{_enum:["MemberNotFound","OverflowInPendingRewards"]},NpPoolId:"u32"}},ml={rpc:{},types:{DeferredOffenceOf:"(Vec, Vec, SessionIndex)",Kind:"[u8; 16]",OffenceDetails:{offender:"Offender",reporters:"Vec"},Offender:"IdentificationTuple",OpaqueTimeSlot:"Bytes",ReportIdOf:"Hash",Reporter:"AccountId"}},yl={rpc:{},runtime:{DifficultyApi:[{methods:{difficulty:{description:"Return the target difficulty of the next block.",params:[],type:"Raw"}},version:1}],TimestampApi:[{methods:{timestamp:{description:"API necessary for timestamp-based difficulty adjustment algorithms.",params:[],type:"Moment"}},version:1}]},types:{}},xl={rpc:{},types:{ProxyDefinition:{delegate:"AccountId",proxyType:"ProxyType",delay:"BlockNumber"},ProxyType:{_enum:["Any","NonTransfer","Governance","Staking"]},ProxyAnnouncement:{real:"AccountId",callHash:"Hash",height:"BlockNumber"}}},gl={rpc:{},types:{ActiveRecovery:{created:"BlockNumber",deposit:"Balance",friends:"Vec"},RecoveryConfig:{delayPeriod:"BlockNumber",deposit:"Balance",friends:"Vec",threshold:"u16"}}},vl={rpc:{},types:{Period:"(BlockNumber, u32)",Priority:"u8",SchedulePeriod:"Period",SchedulePriority:"Priority",Scheduled:{maybeId:"Option",priority:"SchedulePriority",call:"Call",maybePeriodic:"Option",origin:"PalletsOrigin"},ScheduledTo254:{maybeId:"Option",priority:"SchedulePriority",call:"Call",maybePeriodic:"Option"},TaskAddress:"(BlockNumber, u32)"}},wl={rpc:{},runtime:{SessionKeys:[{methods:{decode_session_keys:{description:"Decode the given public session keys.",params:[{name:"encoded",type:"Bytes"}],type:"Option>"},generate_session_keys:{description:"Generate a set of session keys with optionally using the given seed.",params:[{name:"seed",type:"Option"}],type:"Bytes"}},version:1}]},types:{BeefyKey:"[u8; 33]",Keys:"SessionKeys4",SessionKeys1:"(AccountId)",SessionKeys2:"(AccountId, AccountId)",SessionKeys3:"(AccountId, AccountId, AccountId)",SessionKeys4:"(AccountId, AccountId, AccountId, AccountId)",SessionKeys5:"(AccountId, AccountId, AccountId, AccountId, AccountId)",SessionKeys6:"(AccountId, AccountId, AccountId, AccountId, AccountId, AccountId)",SessionKeys6B:"(AccountId, AccountId, AccountId, AccountId, AccountId, BeefyKey)",SessionKeys7:"(AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId)",SessionKeys7B:"(AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, BeefyKey)",SessionKeys8:"(AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId)",SessionKeys8B:"(AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, BeefyKey)",SessionKeys9:"(AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId)",SessionKeys9B:"(AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, BeefyKey)",SessionKeys10:"(AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId)",SessionKeys10B:"(AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, BeefyKey)",FullIdentification:"Exposure",IdentificationTuple:"(ValidatorId, FullIdentification)",MembershipProof:{session:"SessionIndex",trieNodes:"Vec",validatorCount:"ValidatorCount"},SessionIndex:"u32",ValidatorCount:"u32"}},Vl={rpc:{},types:{Bid:{who:"AccountId",kind:"BidKind",value:"Balance"},BidKind:{_enum:{Deposit:"Balance",Vouch:"(AccountId, Balance)"}},SocietyJudgement:{_enum:["Rebid","Reject","Approve"]},SocietyVote:{_enum:["Skeptic","Reject","Approve"]},StrikeCount:"u32",VouchingStatus:{_enum:["Vouching","Banned"]}}},Tl={rpc:{},runtime:{StakingApi:[{methods:{nominations_quota:{description:"Returns the nominations quota for a nominator with a given balance.",params:[{name:"balance",type:"Balance"}],type:"u32"}},version:1}]},types:{Points:"u32",EraPoints:{total:"Points",individual:"Vec"},CompactAssignments:"CompactAssignmentsWith16",CompactAssignmentsWith16:{votes1:"Vec<(NominatorIndexCompact, ValidatorIndexCompact)>",votes2:"Vec<(NominatorIndexCompact, CompactScoreCompact, ValidatorIndexCompact)>",votes3:"Vec<(NominatorIndexCompact, [CompactScoreCompact; 2], ValidatorIndexCompact)>",votes4:"Vec<(NominatorIndexCompact, [CompactScoreCompact; 3], ValidatorIndexCompact)>",votes5:"Vec<(NominatorIndexCompact, [CompactScoreCompact; 4], ValidatorIndexCompact)>",votes6:"Vec<(NominatorIndexCompact, [CompactScoreCompact; 5], ValidatorIndexCompact)>",votes7:"Vec<(NominatorIndexCompact, [CompactScoreCompact; 6], ValidatorIndexCompact)>",votes8:"Vec<(NominatorIndexCompact, [CompactScoreCompact; 7], ValidatorIndexCompact)>",votes9:"Vec<(NominatorIndexCompact, [CompactScoreCompact; 8], ValidatorIndexCompact)>",votes10:"Vec<(NominatorIndexCompact, [CompactScoreCompact; 9], ValidatorIndexCompact)>",votes11:"Vec<(NominatorIndexCompact, [CompactScoreCompact; 10], ValidatorIndexCompact)>",votes12:"Vec<(NominatorIndexCompact, [CompactScoreCompact; 11], ValidatorIndexCompact)>",votes13:"Vec<(NominatorIndexCompact, [CompactScoreCompact; 12], ValidatorIndexCompact)>",votes14:"Vec<(NominatorIndexCompact, [CompactScoreCompact; 13], ValidatorIndexCompact)>",votes15:"Vec<(NominatorIndexCompact, [CompactScoreCompact; 14], ValidatorIndexCompact)>",votes16:"Vec<(NominatorIndexCompact, [CompactScoreCompact; 15], ValidatorIndexCompact)>"},CompactAssignmentsWith24:{votes1:"Vec<(NominatorIndexCompact, ValidatorIndexCompact)>",votes2:"Vec<(NominatorIndexCompact, CompactScoreCompact, ValidatorIndexCompact)>",votes3:"Vec<(NominatorIndexCompact, [CompactScoreCompact; 2], ValidatorIndexCompact)>",votes4:"Vec<(NominatorIndexCompact, [CompactScoreCompact; 3], ValidatorIndexCompact)>",votes5:"Vec<(NominatorIndexCompact, [CompactScoreCompact; 4], ValidatorIndexCompact)>",votes6:"Vec<(NominatorIndexCompact, [CompactScoreCompact; 5], ValidatorIndexCompact)>",votes7:"Vec<(NominatorIndexCompact, [CompactScoreCompact; 6], ValidatorIndexCompact)>",votes8:"Vec<(NominatorIndexCompact, [CompactScoreCompact; 7], ValidatorIndexCompact)>",votes9:"Vec<(NominatorIndexCompact, [CompactScoreCompact; 8], ValidatorIndexCompact)>",votes10:"Vec<(NominatorIndexCompact, [CompactScoreCompact; 9], ValidatorIndexCompact)>",votes11:"Vec<(NominatorIndexCompact, [CompactScoreCompact; 10], ValidatorIndexCompact)>",votes12:"Vec<(NominatorIndexCompact, [CompactScoreCompact; 11], ValidatorIndexCompact)>",votes13:"Vec<(NominatorIndexCompact, [CompactScoreCompact; 12], ValidatorIndexCompact)>",votes14:"Vec<(NominatorIndexCompact, [CompactScoreCompact; 13], ValidatorIndexCompact)>",votes15:"Vec<(NominatorIndexCompact, [CompactScoreCompact; 14], ValidatorIndexCompact)>",votes16:"Vec<(NominatorIndexCompact, [CompactScoreCompact; 15], ValidatorIndexCompact)>",votes17:"Vec<(NominatorIndexCompact, [CompactScoreCompact; 16], ValidatorIndexCompact)>",votes18:"Vec<(NominatorIndexCompact, [CompactScoreCompact; 17], ValidatorIndexCompact)>",votes19:"Vec<(NominatorIndexCompact, [CompactScoreCompact; 18], ValidatorIndexCompact)>",votes20:"Vec<(NominatorIndexCompact, [CompactScoreCompact; 19], ValidatorIndexCompact)>",votes21:"Vec<(NominatorIndexCompact, [CompactScoreCompact; 20], ValidatorIndexCompact)>",votes22:"Vec<(NominatorIndexCompact, [CompactScoreCompact; 21], ValidatorIndexCompact)>",votes23:"Vec<(NominatorIndexCompact, [CompactScoreCompact; 22], ValidatorIndexCompact)>",votes24:"Vec<(NominatorIndexCompact, [CompactScoreCompact; 23], ValidatorIndexCompact)>"},CompactAssignmentsTo265:"CompactAssignmentsWith16",CompactAssignmentsTo257:{votes1:"Vec<(NominatorIndex, [CompactScore; 0], ValidatorIndex)>",votes2:"Vec<(NominatorIndex, [CompactScore; 1], ValidatorIndex)>",votes3:"Vec<(NominatorIndex, [CompactScore; 2], ValidatorIndex)>",votes4:"Vec<(NominatorIndex, [CompactScore; 3], ValidatorIndex)>",votes5:"Vec<(NominatorIndex, [CompactScore; 4], ValidatorIndex)>",votes6:"Vec<(NominatorIndex, [CompactScore; 5], ValidatorIndex)>",votes7:"Vec<(NominatorIndex, [CompactScore; 6], ValidatorIndex)>",votes8:"Vec<(NominatorIndex, [CompactScore; 7], ValidatorIndex)>",votes9:"Vec<(NominatorIndex, [CompactScore; 8], ValidatorIndex)>",votes10:"Vec<(NominatorIndex, [CompactScore; 9], ValidatorIndex)>",votes11:"Vec<(NominatorIndex, [CompactScore; 10], ValidatorIndex)>",votes12:"Vec<(NominatorIndex, [CompactScore; 11], ValidatorIndex)>",votes13:"Vec<(NominatorIndex, [CompactScore; 12], ValidatorIndex)>",votes14:"Vec<(NominatorIndex, [CompactScore; 13], ValidatorIndex)>",votes15:"Vec<(NominatorIndex, [CompactScore; 14], ValidatorIndex)>",votes16:"Vec<(NominatorIndex, [CompactScore; 15], ValidatorIndex)>"},CompactScore:"(ValidatorIndex, OffchainAccuracy)",CompactScoreCompact:"(ValidatorIndexCompact, OffchainAccuracyCompact)",ElectionCompute:{_enum:["OnChain","Signed","Unsigned"]},ElectionPhase:{_enum:{Off:null,Signed:null,Unsigned:"(bool, BlockNumber)",Emergency:null}},ElectionResult:{compute:"ElectionCompute",slotStake:"Balance",electedStashes:"Vec",exposures:"Vec<(AccountId, Exposure)>"},ElectionScore:"[u128; 3]",ElectionSize:{validators:"Compact",nominators:"Compact"},ElectionStatus:{_enum:{Close:"Null",Open:"BlockNumber"}},ExtendedBalance:"u128",RawSolution:"RawSolutionWith16",RawSolutionWith16:{compact:"CompactAssignmentsWith16",score:"ElectionScore",round:"u32"},RawSolutionWith24:{compact:"CompactAssignmentsWith24",score:"ElectionScore",round:"u32"},RawSolutionTo265:"RawSolutionWith16",ReadySolution:{supports:"SolutionSupports",score:"ElectionScore",compute:"ElectionCompute"},RoundSnapshot:{voters:"Vec<(AccountId, VoteWeight, Vec)>",targets:"Vec"},SeatHolder:{who:"AccountId",stake:"Balance",deposit:"Balance"},SignedSubmission:{_fallback:"SignedSubmissionTo276",who:"AccountId",deposit:"Balance",solution:"RawSolution",reward:"Balance"},SignedSubmissionTo276:{who:"AccountId",deposit:"Balance",solution:"RawSolution"},SignedSubmissionOf:"SignedSubmission",SolutionOrSnapshotSize:{voters:"Compact",targets:"Compact"},SolutionSupport:{total:"ExtendedBalance",voters:"Vec<(AccountId, ExtendedBalance)>"},SolutionSupports:"Vec<(AccountId, SolutionSupport)>",Supports:"SolutionSupports",SubmissionIndicesOf:"BTreeMap",Voter:{votes:"Vec",stake:"Balance",deposit:"Balance"},VoteWeight:"u64",ActiveEraInfo:{index:"EraIndex",start:"Option"},EraIndex:"u32",EraRewardPoints:{total:"RewardPoint",individual:"BTreeMap"},EraRewards:{total:"u32",rewards:"Vec"},Exposure:{total:"Compact",own:"Compact",others:"Vec"},Forcing:{_enum:["NotForcing","ForceNew","ForceNone","ForceAlways"]},IndividualExposure:{who:"AccountId",value:"Compact"},KeyType:"AccountId",MomentOf:"Moment",Nominations:{targets:"Vec",submittedIn:"EraIndex",suppressed:"bool"},NominatorIndex:"u32",NominatorIndexCompact:"Compact",OffchainAccuracy:"PerU16",OffchainAccuracyCompact:"Compact",PhragmenScore:"[u128; 3]",Points:"u32",RewardDestination:{_enum:{Staked:"Null",Stash:"Null",Controller:"Null",Account:"AccountId",None:"Null"}},RewardPoint:"u32",SlashJournalEntry:{who:"AccountId",amount:"Balance",ownSlash:"Balance"},SlashingSpansTo204:{spanIndex:"SpanIndex",lastStart:"EraIndex",prior:"Vec"},SlashingSpans:{spanIndex:"SpanIndex",lastStart:"EraIndex",lastNonzeroSlash:"EraIndex",prior:"Vec"},SpanIndex:"u32",SpanRecord:{slashed:"Balance",paidOut:"Balance"},StakingLedgerTo223:{stash:"AccountId",total:"Compact",active:"Compact",unlocking:"Vec"},StakingLedgerTo240:{_fallback:"StakingLedgerTo223",stash:"AccountId",total:"Compact",active:"Compact",unlocking:"Vec",lastReward:"Option"},StakingLedger:{stash:"AccountId",total:"Compact",active:"Compact",unlocking:"Vec",claimedRewards:"Vec"},UnappliedSlashOther:"(AccountId, Balance)",UnappliedSlash:{validator:"AccountId",own:"Balance",others:"Vec",reporters:"Vec",payout:"Balance"},UnlockChunk:{value:"Compact",era:"Compact"},ValidatorIndex:"u16",ValidatorIndexCompact:"Compact",ValidatorPrefs:"ValidatorPrefsWithBlocked",ValidatorPrefsWithCommission:{commission:"Compact"},ValidatorPrefsWithBlocked:{commission:"Compact",blocked:"bool"},ValidatorPrefsTo196:{validatorPayment:"Compact"},ValidatorPrefsTo145:{unstakeThreshold:"Compact",validatorPayment:"Compact"}}},Sl={rpc:{},runtime:{ValidateStatement:[{methods:{valdate_statement:{description:"Validate the statement.",params:[{name:"source",type:"StatementStoreStatementSource"},{name:"statement",type:"SpStatementStoreStatement"}],type:"Result"}},version:1}]},types:{StatementStoreStatementSource:{_enum:["Chain","Network","Local"]},StatementStoreValidStatement:{maxCount:"u32",maxSize:"u32"},StatementStoreInvalidStatement:{_enum:["BadProof","NoProof","InternalError"]}}},kl={rpc:{},types:{WeightToFeeCoefficient:{coeffInteger:"Balance",coeffFrac:"Perbill",negative:"bool",degree:"u8"}}},_l={rpc:{genSyncSpec:{description:"Returns the json-serialized chainspec running the node, with a sync state.",endpoint:"sync_state_genSyncSpec",params:[{name:"raw",type:"bool"}],type:"Json"}},types:{}},Pl={rpc:{accountNextIndex:{alias:["account_nextIndex"],description:"Retrieves the next accountIndex as available on the node",params:[{name:"accountId",type:"AccountId"}],type:"Index"},addLogFilter:{description:"Adds the supplied directives to the current log filter",isUnsafe:!0,params:[{name:"directives",type:"Text"}],type:"Null"},addReservedPeer:{description:"Adds a reserved peer",isUnsafe:!0,params:[{name:"peer",type:"Text"}],type:"Text"},chain:{description:"Retrieves the chain",params:[],type:"Text"},chainType:{description:"Retrieves the chain type",params:[],type:"ChainType"},dryRun:{alias:["system_dryRunAt"],description:"Dry run an extrinsic at a given block",isUnsafe:!0,params:[{name:"extrinsic",type:"Bytes"},{isHistoric:!0,isOptional:!0,name:"at",type:"BlockHash"}],type:"ApplyExtrinsicResult"},health:{description:"Return health status of the node",noErrorLog:!0,params:[],type:"Health"},localListenAddresses:{description:"The addresses include a trailing /p2p/ with the local PeerId, and are thus suitable to be passed to addReservedPeer or as a bootnode address for example",params:[],type:"Vec"},localPeerId:{description:"Returns the base58-encoded PeerId of the node",params:[],type:"Text"},name:{description:"Retrieves the node name",params:[],type:"Text"},networkState:{alias:["system_unstable_networkState"],description:"Returns current state of the network",isUnsafe:!0,params:[],type:"NetworkState"},nodeRoles:{description:"Returns the roles the node is running as",params:[],type:"Vec"},peers:{description:"Returns the currently connected peers",isUnsafe:!0,params:[],type:"Vec"},properties:{description:"Get a custom set of properties as a JSON object, defined in the chain spec",params:[],type:"ChainProperties"},removeReservedPeer:{description:"Remove a reserved peer",isUnsafe:!0,params:[{name:"peerId",type:"Text"}],type:"Text"},reservedPeers:{description:"Returns the list of reserved peers",params:[],type:"Vec"},resetLogFilter:{description:"Resets the log filter to Substrate defaults",isUnsafe:!0,params:[],type:"Null"},syncState:{description:"Returns the state of the syncing of the node",params:[],type:"SyncState"},version:{description:"Retrieves the version of the node",params:[],type:"Text"}},runtime:{AccountNonceApi:[{methods:{account_nonce:{description:"The API to query account nonce (aka transaction index)",params:[{name:"accountId",type:"AccountId"}],type:"Index"}},version:1}]},types:{AccountInfo:"AccountInfoWithTripleRefCount",AccountInfoWithRefCountU8:{nonce:"Index",refcount:"u8",data:"AccountData"},AccountInfoWithRefCount:{_fallback:"AccountInfoWithRefCountU8",nonce:"Index",refcount:"RefCount",data:"AccountData"},AccountInfoWithDualRefCount:{_fallback:"AccountInfoWithRefCount",nonce:"Index",consumers:"RefCount",providers:"RefCount",data:"AccountData"},AccountInfoWithProviders:"AccountInfoWithDualRefCount",AccountInfoWithTripleRefCount:{_fallback:"AccountInfoWithDualRefCount",nonce:"Index",consumers:"RefCount",providers:"RefCount",sufficients:"RefCount",data:"AccountData"},ApplyExtrinsicResult:"Result",ApplyExtrinsicResultPre6:"Result",ArithmeticError:{_enum:["Underflow","Overflow","DivisionByZero"]},BlockLength:{max:"PerDispatchClassU32"},BlockWeights:{baseBlock:"Weight",maxBlock:"Weight",perClass:"PerDispatchClassWeightsPerClass"},ChainProperties:"GenericChainProperties",ChainType:{_enum:{Development:"Null",Local:"Null",Live:"Null",Custom:"Text"}},ConsumedWeight:"PerDispatchClassWeight",DigestOf:"Digest",DispatchClass:{_enum:["Normal","Operational","Mandatory"]},DispatchError:{_enum:{Other:"Null",CannotLookup:"Null",BadOrigin:"Null",Module:"DispatchErrorModule",ConsumerRemaining:"Null",NoProviders:"Null",TooManyConsumers:"Null",Token:"TokenError",Arithmetic:"ArithmeticError",Transactional:"TransactionalError",Exhausted:"Null",Corruption:"Null",Unavailable:"Null"}},DispatchErrorPre6:{_enum:{Other:"Null",CannotLookup:"Null",BadOrigin:"Null",Module:"DispatchErrorModulePre6",ConsumerRemaining:"Null",NoProviders:"Null",TooManyConsumers:"Null",Token:"TokenError",Arithmetic:"ArithmeticError",Transactional:"TransactionalError"}},DispatchErrorPre6First:{_enum:{Other:"Null",CannotLookup:"Null",BadOrigin:"Null",Module:"DispatchErrorModulePre6",ConsumerRemaining:"Null",NoProviders:"Null",Token:"TokenError",Arithmetic:"ArithmeticError",Transactional:"TransactionalError"}},DispatchErrorModuleU8:{index:"u8",error:"u8"},DispatchErrorModuleU8a:{index:"u8",error:"[u8; 4]"},DispatchErrorModule:"DispatchErrorModuleU8a",DispatchErrorModulePre6:"DispatchErrorModuleU8",DispatchErrorTo198:{module:"Option",error:"u8"},DispatchInfo:{weight:"Weight",class:"DispatchClass",paysFee:"Pays"},DispatchInfoTo190:{weight:"Weight",class:"DispatchClass"},DispatchInfoTo244:{weight:"Weight",class:"DispatchClass",paysFee:"bool"},DispatchOutcome:"Result<(), DispatchError>",DispatchOutcomePre6:"Result<(), DispatchErrorPre6>",DispatchResult:"Result<(), DispatchError>",DispatchResultOf:"DispatchResult",DispatchResultTo198:"Result<(), Text>",Event:"GenericEvent",EventId:"[u8; 2]",EventIndex:"u32",EventRecord:{phase:"Phase",event:"Event",topics:"Vec"},Health:{peers:"u64",isSyncing:"bool",shouldHavePeers:"bool"},InvalidTransaction:{_enum:{Call:"Null",Payment:"Null",Future:"Null",Stale:"Null",BadProof:"Null",AncientBirthBlock:"Null",ExhaustsResources:"Null",Custom:"u8",BadMandatory:"Null",MandatoryDispatch:"Null",BadSigner:"Null"}},Key:"Bytes",LastRuntimeUpgradeInfo:{specVersion:"Compact",specName:"Text"},NetworkState:{peerId:"Text",listenedAddresses:"Vec",externalAddresses:"Vec",connectedPeers:"HashMap",notConnectedPeers:"HashMap",averageDownloadPerSec:"u64",averageUploadPerSec:"u64",peerset:"NetworkStatePeerset"},NetworkStatePeerset:{messageQueue:"u64",nodes:"HashMap"},NetworkStatePeersetInfo:{connected:"bool",reputation:"i32"},NodeRole:{_enum:{Full:"Null",LightClient:"Null",Authority:"Null",UnknownRole:"u8"}},NotConnectedPeer:{knownAddresses:"Vec",latestPingTime:"Option",versionString:"Option"},Peer:{enabled:"bool",endpoint:"PeerEndpoint",knownAddresses:"Vec",latestPingTime:"PeerPing",open:"bool",versionString:"Text"},PeerEndpoint:{listening:"PeerEndpointAddr"},PeerEndpointAddr:{_alias:{localAddr:"local_addr",sendBackAddr:"send_back_addr"},localAddr:"Text",sendBackAddr:"Text"},PeerPing:{nanos:"u64",secs:"u64"},PeerInfo:{peerId:"Text",roles:"Text",protocolVersion:"u32",bestHash:"Hash",bestNumber:"BlockNumber"},PerDispatchClassU32:{normal:"u32",operational:"u32",mandatory:"u32"},PerDispatchClassWeight:{normal:"Weight",operational:"Weight",mandatory:"Weight"},PerDispatchClassWeightsPerClass:{normal:"WeightPerClass",operational:"WeightPerClass",mandatory:"WeightPerClass"},Phase:{_enum:{ApplyExtrinsic:"u32",Finalization:"Null",Initialization:"Null"}},RawOrigin:{_enum:{Root:"Null",Signed:"AccountId",None:"Null"}},RefCount:"u32",RefCountTo259:"u8",SyncState:{startingBlock:"BlockNumber",currentBlock:"BlockNumber",highestBlock:"Option"},SystemOrigin:"RawOrigin",TokenError:{_enum:["NoFunds","WouldDie","BelowMinimum","CannotCreate","UnknownAsset","Frozen","Unsupported","Underflow","Overflow"]},TransactionValidityError:{_enum:{Invalid:"InvalidTransaction",Unknown:"UnknownTransaction"}},TransactionalError:{_enum:["LimitReached","NoLayer"]},UnknownTransaction:{_enum:{CannotLookup:"Null",NoUnsignedValidator:"Null",Custom:"u8"}},WeightPerClass:{baseExtrinsic:"Weight",maxExtrinsic:"Option",maxTotal:"Option",reserved:"Option"}}},Ml={rpc:{},types:{Bounty:{proposer:"AccountId",value:"Balance",fee:"Balance",curatorDeposit:"Balance",bond:"Balance",status:"BountyStatus"},BountyIndex:"u32",BountyStatus:{_enum:{Proposed:"Null",Approved:"Null",Funded:"Null",CuratorProposed:"BountyStatusCuratorProposed",Active:"BountyStatusActive",PendingPayout:"BountyStatusPendingPayout"}},BountyStatusActive:{curator:"AccountId",updateDue:"BlockNumber"},BountyStatusCuratorProposed:{curator:"AccountId"},BountyStatusPendingPayout:{curator:"AccountId",beneficiary:"AccountId",unlockAt:"BlockNumber"},OpenTip:{reason:"Hash",who:"AccountId",finder:"AccountId",deposit:"Balance",closes:"Option",tips:"Vec",findersFee:"bool"},OpenTipTo225:{reason:"Hash",who:"AccountId",finder:"Option",closes:"Option",tips:"Vec"},OpenTipFinderTo225:"(AccountId, Balance)",OpenTipTip:"(AccountId, Balance)",TreasuryProposal:{proposer:"AccountId",value:"Balance",beneficiary:"AccountId",bond:"Balance"}}},Il={rpc:{},types:{Multiplier:"Fixed128"}},Nl={rpc:{},runtime:{TaggedTransactionQueue:[{methods:{validate_transaction:{description:"Validate the transaction.",params:[{name:"source",type:"TransactionSource"},{name:"tx",type:"Extrinsic"},{name:"blockHash",type:"BlockHash"}],type:"TransactionValidity"}},version:3},{methods:{validate_transaction:{description:"Validate the transaction.",params:[{name:"source",type:"TransactionSource"},{name:"tx",type:"Extrinsic"}],type:"TransactionValidity"}},version:2},{methods:{validate_transaction:{description:"Validate the transaction.",params:[{name:"tx",type:"Extrinsic"}],type:"TransactionValidity"}},version:1}]},types:{TransactionSource:{_enum:["InBlock","Local","External"]},TransactionValidity:"Result",ValidTransaction:{priority:"TransactionPriority",requires:"Vec",provides:"Vec",longevity:"TransactionLongevity",propagate:"bool"}}},El={rpc:{},types:{ClassId:"u32",InstanceId:"u32",DepositBalance:"Balance",DepositBalanceOf:"Balance",ClassDetails:{owner:"AccountId",issuer:"AccountId",admin:"AccountId",freezer:"AccountId",totalDeposit:"DepositBalance",freeHolding:"bool",instances:"u32",instanceMetadatas:"u32",attributes:"u32",isFrozen:"bool"},DestroyWitness:{instances:"Compact",instanceMetadatas:"Compact",attributes:"Compact"},InstanceDetails:{owner:"AccountId",approved:"Option",isFrozen:"bool",deposit:"DepositBalance"},ClassMetadata:{deposit:"DepositBalance",data:"Vec",isFrozen:"bool"},InstanceMetadata:{deposit:"DepositBalance",data:"Vec",isFrozen:"bool"}}},Ol={rpc:{},types:{Multisig:{when:"Timepoint",deposit:"Balance",depositor:"AccountId",approvals:"Vec"},Timepoint:{height:"BlockNumber",index:"u32"}}},Al={rpc:{},types:{VestingInfo:{locked:"Balance",perBlock:"Balance",startingBlock:"BlockNumber"}}},Cl={rpc:{},types:{BlockAttestations:{receipt:"CandidateReceipt",valid:"Vec",invalid:"Vec"},IncludedBlocks:{actualNumber:"BlockNumber",session:"SessionIndex",randomSeed:"H256",activeParachains:"Vec",paraBlocks:"Vec"},MoreAttestations:{}}},Hl={rpc:{},types:{BridgedBlockHash:"H256",BridgedBlockNumber:"BlockNumber",BridgedHeader:"Header",BridgeMessageId:"(LaneId, MessageNonce)",CallOrigin:{_enum:{SourceRoot:"Null",TargetAccount:"(AccountId, MultiSigner, MultiSignature)",SourceAccount:"AccountId"}},ChainId:"[u8; 4]",DeliveredMessages:{begin:"MessageNonce",end:"MessageNonce",dispatchResults:"BitVec"},DispatchFeePayment:{_enum:["AtSourceChain","AtTargetChain"]},InboundLaneData:{relayers:"Vec",lastConfirmedNonce:"MessageNonce"},InboundRelayer:"AccountId",InitializationData:{header:"Header",authorityList:"AuthorityList",setId:"SetId",isHalted:"bool"},LaneId:"[u8; 4]",MessageData:{payload:"Bytes",fee:"Balance"},MessagesDeliveryProofOf:{bridgedHeaderHash:"BlockHash",storageProof:"Vec",lane:"LaneId"},MessageKey:{laneId:"LaneId",nonce:"MessageNonce"},MessageNonce:"u64",MessagesProofOf:{bridgedHeaderHash:"BridgedBlockHash",storageProof:"Vec",lane:"LaneId",noncesStart:"MessageNonce",noncesEnd:"MessageNonce"},OperatingMode:{_enum:["Normal","RejectingOutboundMessages","Halted"]},OutboundLaneData:{oldestUnprunedNonce:"MessageNonce",latestReceivedNonce:"MessageNonce",latestGeneratedNonce:"MessageNonce"},OutboundMessageFee:"Balance",OutboundPayload:{specVersion:"u32",weight:"Weight",origin:"CallOrigin",dispatchFeePayment:"DispatchFeePayment",call:"Bytes"},Parameter:"Null",RelayerId:"AccountId",UnrewardedRelayer:{relayer:"RelayerId",messages:"DeliveredMessages"},UnrewardedRelayersState:{unrewardedRelayer_Entries:"MessageNonce",messagesInOldestEntry:"MessageNonce",totalMessages:"MessageNonce"}}},Rl={rpc:{},types:{StatementKind:{_enum:["Regular","Saft"]}}},Bl={rpc:{},types:{FundIndex:"u32",LastContribution:{_enum:{Never:"Null",PreEnding:"u32",Ending:"BlockNumber"}},FundInfo:{depositor:"AccountId",verifier:"Option",deposit:"Balance",raised:"Balance",end:"BlockNumber",cap:"Balance",lastContribution:"LastContribution",firstPeriod:"LeasePeriod",lastPeriod:"LeasePeriod",trieIndex:"TrieIndex"},TrieIndex:"u32"}},Ll={rpc:{},runtime:{AuraUnincludedSegmentApi:[{methods:{can_build_upon:{description:"Whether it is legal to extend the chain",params:[{name:"includedHash",type:"BlockHash"},{name:"slot",type:"Slot"}],type:"bool"}},version:1}],CollectCollationInfo:[{methods:{collect_collation_info:{description:"Collect information about a collation.",params:[{name:"header",type:"Header"}],type:"CollationInfo"}},version:2},{methods:{collect_collation_info:{description:"Collect information about a collation.",params:[],type:"CollationInfoV1"}},version:1}]},types:{CollationInfo:{upwardMessages:"Vec",horizontalMessages:"Vec",newValidationCode:"Option",processedDownwardMessages:"u32",hrmpWatermark:"RelayBlockNumber",headData:"HeadData"},CollationInfoV1:{upwardMessages:"Vec",horizontalMessages:"Vec",newValidationCode:"Option",processedDownwardMessages:"u32",hrmpWatermark:"RelayBlockNumber"},ConfigData:{maxIndividual:"Weight"},MessageId:"[u8; 32]",OverweightIndex:"u64",PageCounter:"u32",PageIndexData:{beginUsed:"PageCounter",endUsed:"PageCounter",overweightCount:"OverweightIndex"}}},zl={methods:{best_finalized:{description:"Returns number and hash of the best finalized header known to the bridge module.",params:[],type:"(BlockNumber, Hash)"}},version:1},Ul={rpc:{},runtime:{KusamaFinalityApi:[zl],PolkadotFinalityApi:[zl],RococoFinalityApi:[zl],WestendFinalityApi:[zl]},types:{}},Dl={assumed_validation_data:{description:"Returns the persisted validation data for the given `ParaId` along with the corresponding validation code hash.",params:[{name:"paraId",type:"ParaId"},{name:"hash",type:"Hash"}],type:"Option<(PersistedValidationData, ValidationCodeHash)>"},availability_cores:{description:"Yields information on all availability cores as relevant to the child block.",params:[],type:"Vec"},candidate_events:{description:"Get a vector of events concerning candidates that occurred within a block.",params:[],type:"Vec"},candidate_pending_availability:{description:"Get the receipt of a candidate pending availability.",params:[{name:"paraId",type:"ParaId"}],type:"Option"},check_validation_outputs:{description:"Checks if the given validation outputs pass the acceptance criteria.",params:[{name:"paraId",type:"ParaId"},{name:"outputs",type:"CandidateCommitments"}],type:"bool"},dmq_contents:{description:"Get all the pending inbound messages in the downward message queue for a para.",params:[{name:"paraId",type:"ParaId"}],type:"Vec"},inbound_hrmp_channels_contents:{description:"Get the contents of all channels addressed to the given recipient.",params:[{name:"paraId",type:"ParaId"}],type:"Vec"},on_chain_votes:{description:"Scrape dispute relevant from on-chain, backing votes and resolved disputes.",params:[],type:"Option"},persisted_validation_data:{description:"Yields the persisted validation data for the given `ParaId` along with an assumption that should be used if the para currently occupies a core.",params:[{name:"paraId",type:"ParaId"},{name:"assumption",type:"OccupiedCoreAssumption"}],type:"Option"},session_index_for_child:{description:"Returns the session index expected at a child of the block.",params:[],type:"SessionIndex"},validation_code:{description:"Fetch the validation code used by a para, making the given `OccupiedCoreAssumption`.",params:[{name:"paraId",type:"ParaId"},{name:"assumption",type:"OccupiedCoreAssumption"}],type:"Option"},validation_code_by_hash:{description:"Get the validation code from its hash.",params:[{name:"hash",type:"ValidationCodeHash"}],type:"Option"},validator_groups:{description:"Returns the validator groups and rotation info localized based on the hypothetical child of a block whose state this is invoked on",params:[],type:"(Vec>, GroupRotationInfo)"},validators:{description:"Get the current validators.",params:[],type:"Vec"}},ql={pvfs_require_precheck:{description:"Returns code hashes of PVFs that require pre-checking by validators in the active set.",params:[],type:"Vec"},session_info:{description:"Get the session info for the given session, if stored.",params:[{name:"index",type:"SessionIndex"}],type:"Option"},submit_pvf_check_statement:{description:"Submits a PVF pre-checking statement into the transaction pool.",params:[{name:"stmt",type:"PvfCheckStatement"},{name:"signature",type:"ValidatorSignature"}],type:"Null"},validation_code_hash:{description:"Fetch the hash of the validation code used by a para, making the given `OccupiedCoreAssumption`.",params:[{name:"paraId",type:"ParaId"},{name:"assumption",type:"OccupiedCoreAssumption"}],type:"Option"}},jl={disputes:{description:"Returns all onchain disputes.",params:[],type:"Vec<(SessionIndex, CandidateHash, DisputeState)>"}},Fl={session_executor_params:{description:"Returns execution parameters for the session.",params:[{name:"sessionIndex",type:"SessionIndex"}],type:"Option"}},Xl={key_ownership_proof:{description:"Returns a merkle proof of a validator session key",params:[{name:"validatorId",type:"ValidatorId"}],type:"Option"},submit_report_dispute_lost:{description:"Submit an unsigned extrinsic to slash validators who lost a dispute about a candidate of a past session",params:[{name:"disputeProof",type:"DisputeProof"},{name:"keyOwnershipProof",type:"OpaqueKeyOwnershipProof"}],type:"Option"},unapplied_slashes:{description:"Returns a list of validators that lost a past session dispute and need to be slashed",params:[],type:"Vec<(SessionIndex, CandidateHash, PendingSlashes)>"}},Wl={minimum_backing_votes:{description:"Get the minimum number of backing votes for a parachain candidate. This is a staging method! Do not use on production runtimes!",params:[],type:"u32"}},Zl={async_backing_params:{description:"Returns candidate's acceptance limitations for asynchronous backing for a relay parent",params:[],type:"AsyncBackingParams"},para_backing_state:{description:"Returns the state of parachain backing for a given para",params:[{name:"paraId",type:"ParaId"}],type:"Option"}},Gl={disabled_validators:{description:"Returns a list of all disabled validators at the given block",params:[],type:"ValidatorIndex"}},Kl={node_features:{description:"Get node features. This is a staging method! Do not use on production runtimes!",params:[],type:"NodeFeatures"}},Jl={approval_voting_params:{description:"Approval voting configuration parameters",params:[],type:"ApprovalVotingParams"}},Yl={_enum:["ZeroZero","ZeroOne","ZeroTwo","ZeroThree","OneOne","OneTwo","OneThree","TwoTwo","TwoThree","ThreeThree"]},Ql={_enum:["ZeroZero","ZeroOne","ZeroTwo","ZeroThree","ZeroFour","ZeroFive","ZeroSix","ZeroSeven","OneOne","OneTwo","OneThree","OneFour","OneFive","OneSix","OneSeven","TwoTwo","TwoThree","TwoFour","TwoFive","TwoSix","TwoSeven","ThreeThree","ThreeFour","ThreeFive","ThreeSix","ThreeSeven","FourFour","FourFive","FourSix","FourSeven","FiveFive","FiveSix","FiveSeven","SixSix","SixSeven","SevenSeven"]},$l={rpc:{},runtime:{ParachainHost:[{methods:{...Dl,...ql,...jl,...Fl,...Xl,...Wl,...Zl,...Gl,...Kl,...Jl,claim_queue:{description:"Claim queue",params:[],type:"BTreeMap>"}},version:11},{methods:{...Dl,...ql,...jl,...Fl,...Xl,...Wl,...Zl,...Gl,...Kl,...Jl},version:10},{methods:{...Dl,...ql,...jl,...Fl,...Xl,...Wl,...Zl,...Gl,...Kl},version:9},{methods:{...Dl,...ql,...jl,...Fl,...Xl,...Wl,...Zl,...Gl},version:8},{methods:{...Dl,...ql,...jl,...Fl,...Xl,...Wl,...Zl},version:7},{methods:{...Dl,...ql,...jl,...Fl,...Xl,...Wl},version:6},{methods:{...Dl,...ql,...jl,...Fl,...Xl},version:5},{methods:{...Dl,...ql,...jl,...Fl},version:4},{methods:{...Dl,...ql,...jl},version:3},{methods:{...Dl,...ql},version:2},{methods:{session_info:{description:"Get the session info for the given session, if stored.",params:[{name:"index",type:"SessionIndex"}],type:"Option"},...Dl},version:1}]},types:{ServiceQuality:{_enum:["Ordered","Fast"]},DisputeLocation:{_enum:["Local","Remote"]},DisputeResult:{_enum:["Valid","Invalid"]},DisputeState:{validatorsFor:"BitVec",validatorsAgainst:"BitVec",start:"BlockNumber",concludedAt:"Option"},DisputeStatement:{_enum:{Valid:"ValidDisputeStatementKind",Invalid:"InvalidDisputeStatementKind"}},DisputeStatementSet:{candidateHash:"CandidateHash",session:"SessionIndex",statements:"Vec<(DisputeStatement, ParaValidatorIndex, ValidatorSignature)>"},ExecutorParam:{_enum:{Phantom:"Null",MaxMemoryPages:"u32",StackLogicalMax:"u32",StackNativeMax:"u32",PrecheckingMaxMemory:"u64",PvfPrepTimeout:"(PvfPrepTimeoutKind, u64)",PvfExecTimeout:"(PvfExecTimeoutKind, u64)"}},ExecutorParamsHash:"Hash",ExecutorParams:"Vec",ExplicitDisputeStatement:{valid:"bool",candidateHash:"CandidateHash",session:"SessionIndex"},InvalidDisputeStatementKind:{_enum:["Explicit"]},MultiDisputeStatementSet:"Vec",PvfExecTimeoutKind:{_enum:["Backing","Approval"]},PvfPrepTimeoutKind:{_enum:["Precheck","Lenient"]},ValidDisputeStatementKind:{_enum:{Explicit:"Null",BackingSeconded:"Hash",BackingValid:"Hash",ApprovalChecking:"Null"}},HrmpChannel:{maxCapacity:"u32",maxTotalSize:"u32",maxMessageSize:"u32",msgCount:"u32",totalSize:"u32",mqcHead:"Option",senderDeposit:"Balance",recipientDeposit:"Balance"},HrmpChannelId:{sender:"u32",receiver:"u32"},HrmpOpenChannelRequest:{confirmed:"bool",age:"SessionIndex",senderDeposit:"Balance",maxMessageSize:"u32",maxCapacity:"u32",maxTotalSize:"u32"},ParachainProposal:{proposer:"AccountId",genesisHead:"HeadData",validators:"Vec",name:"Bytes",balance:"Balance"},RegisteredParachainInfo:{validators:"Vec",proposer:"AccountId"},...{Bidder:{_enum:{New:"NewBidder",Existing:"ParaId"}},IncomingParachain:{_enum:{Unset:"NewBidder",Fixed:"IncomingParachainFixed",Deploy:"IncomingParachainDeploy"}},IncomingParachainDeploy:{code:"ValidationCode",initialHeadData:"HeadData"},IncomingParachainFixed:{codeHash:"Hash",codeSize:"u32",initialHeadData:"HeadData"},NewBidder:{who:"AccountId",sub:"SubId"},SubId:"u32",AuctionIndex:"u32",LeasePeriod:"BlockNumber",LeasePeriodOf:"BlockNumber",SlotRange10:Yl,SlotRange:Ql,WinningData10:`[WinningDataEntry; ${Yl._enum.length}]`,WinningData:`[WinningDataEntry; ${Ql._enum.length}]`,WinningDataEntry:"Option<(AccountId, ParaId, BalanceOf)>",WinnersData10:"Vec",WinnersData:"Vec",WinnersDataTuple10:"(AccountId, ParaId, BalanceOf, SlotRange10)",WinnersDataTuple:"(AccountId, ParaId, BalanceOf, SlotRange)"},AbridgedCandidateReceipt:{parachainIndex:"ParaId",relayParent:"Hash",headData:"HeadData",collator:"CollatorId",signature:"CollatorSignature",povBlockHash:"Hash",commitments:"CandidateCommitments"},AbridgedHostConfiguration:{maxCodeSize:"u32",maxHeadDataSize:"u32",maxUpwardQueueCount:"u32",maxUpwardQueueSize:"u32",maxUpwardMessageSize:"u32",maxUpwardMessageNumPerCandidate:"u32",hrmpMaxMessageNumPerCandidate:"u32",validationUpgradeFrequency:"BlockNumber",validationUpgradeDelay:"BlockNumber"},AbridgedHrmpChannel:{maxCapacity:"u32",maxTotalSize:"u32",maxMessageSize:"u32",msgCount:"u32",totalSize:"u32",mqcHead:"Option"},ApprovalVotingParams:{maxApprovalCoalesceCount:"u32"},AssignmentId:"AccountId",AssignmentKind:{_enum:{Parachain:"Null",Parathread:"(CollatorId, u32)"}},AsyncBackingParams:{maxCandidateDepth:"u32",allowedAncestryLen:"u32"},AttestedCandidate:{candidate:"AbridgedCandidateReceipt",validityVotes:"Vec",validatorIndices:"BitVec"},AuthorityDiscoveryId:"AccountId",AvailabilityBitfield:"BitVec",AvailabilityBitfieldRecord:{bitfield:"AvailabilityBitfield",submittedTt:"BlockNumber"},BackedCandidate:{candidate:"CommittedCandidateReceipt",validityVotes:"Vec",validatorIndices:"BitVec"},BackingState:{constraints:"Constraints",pendingAvailability:"Vec"},BufferedSessionChange:{applyAt:"BlockNumber",validators:"Vec",queued:"Vec",sessionIndex:"SessionIndex"},CandidateCommitments:{upwardMessages:"Vec",horizontalMessages:"Vec",newValidationCode:"Option",headData:"HeadData",processedDownwardMessages:"u32",hrmpWatermark:"BlockNumber"},CandidateDescriptor:{paraId:"ParaId",relayParent:"RelayChainHash",collatorId:"CollatorId",persistedValidationDataHash:"Hash",povHash:"Hash",erasureRoot:"Hash",signature:"CollatorSignature",paraHead:"Hash",validationCodeHash:"ValidationCodeHash"},CandidateEvent:{_enum:{CandidateBacked:"(CandidateReceipt, HeadData, CoreIndex, GroupIndex)",CandidateIncluded:"(CandidateReceipt, HeadData, CoreIndex, GroupIndex)",CandidateTimedOut:"(CandidateReceipt, HeadData, CoreIndex)"}},CandidateHash:"Hash",CandidateInfo:{who:"AccountId",deposit:"Balance"},CandidatePendingAvailability:{core:"CoreIndex",hash:"CandidateHash",descriptor:"CandidateDescriptor",availabilityVotes:"BitVec",backers:"BitVec",relayParentNumber:"BlockNumber",backedInNumber:"BlockNumber",backingGroup:"GroupIndex"},CandidateReceipt:{descriptor:"CandidateDescriptor",commitmentsHash:"Hash"},GlobalValidationData:{maxCodeSize:"u32",maxHeadDataSize:"u32",blockNumber:"BlockNumber"},CollatorId:"H256",CollatorSignature:"Signature",CommittedCandidateReceipt:{descriptor:"CandidateDescriptor",commitments:"CandidateCommitments"},Constraints:{minRelayParentNumber:"BlockNumber",maxPovSize:"u32",maxCodeSize:"u32",umpRemaining:"u32",umpRemainingBytes:"u32",maxUmpNumPerCandidate:"u32",dmpRemainingMessages:"Vec",hrmpInbound:"InboundHrmpLimitations",hrmpChannelsOut:"HashMap",maxHrmpNumPerCandidate:"u32",requiredParent:"HeadData",validationCodeHash:"ValidationCodeHash",upgradeRestriction:"Option",futureValidationCode:"Option<(BlockNumber, ValidationCodeHash)>"},CoreAssignment:{core:"CoreIndex",paraId:"ParaId",kind:"AssignmentKind",groupIdx:"GroupIndex"},CoreIndex:"u32",CoreOccupied:{_enum:{Parathread:"ParathreadEntry",Parachain:"Null"}},CoreState:{_enum:{Occupied:"OccupiedCore",Scheduled:"ScheduledCore",Free:"Null"}},DisputeProof:{timeSlot:"DisputesTimeSlot",kind:"SlashingOffenceKind",validatorIndex:"ValidatorIndex",validatorId:"ValidatorId"},DisputesTimeSlot:{sessionIndex:"SessionIndex",candidateHash:"CandidateHash"},DoubleVoteReport:{identity:"ValidatorId",first:"(Statement, ValidatorSignature)",second:"(Statement, ValidatorSignature)",proof:"MembershipProof",signingContext:"SigningContext"},DownwardMessage:"Bytes",GroupIndex:"u32",GroupRotationInfo:{sessionStartBlock:"BlockNumber",groupRotationFrequency:"BlockNumber",now:"BlockNumber"},GlobalValidationSchedule:{maxCodeSize:"u32",maxHeadDataSize:"u32",blockNumber:"BlockNumber"},HeadData:"Bytes",HostConfiguration:{maxCodeSize:"u32",maxHeadDataSize:"u32",maxUpwardQueueCount:"u32",maxUpwardQueueSize:"u32",maxUpwardMessageSize:"u32",maxUpwardMessageNumPerCandidate:"u32",hrmpMaxMessageNumPerCandidate:"u32",validationUpgradeFrequency:"BlockNumber",validationUpgradeDelay:"BlockNumber",maxPovSize:"u32",maxDownwardMessageSize:"u32",preferredDispatchableUpwardMessagesStepWeight:"Weight",hrmpMaxParachainOutboundChannels:"u32",hrmpMaxParathreadOutboundChannels:"u32",hrmpOpenRequestTtl:"u32",hrmpSenderDeposit:"Balance",hrmpRecipientDeposit:"Balance",hrmpChannelMaxCapacity:"u32",hrmpChannelMaxTotalSize:"u32",hrmpMaxParachainInboundChannels:"u32",hrmpMaxParathreadInboundChannels:"u32",hrmpChannelMaxMessageSize:"u32",codeRetentionPeriod:"BlockNumber",parathreadCores:"u32",parathreadRetries:"u32",groupRotationFrequency:"BlockNumber",chainAvailabilityPeriod:"BlockNumber",threadAvailabilityPeriod:"BlockNumber",schedulingLookahead:"u32",maxValidatorsPerCore:"Option",maxValidators:"Option",disputePeriod:"SessionIndex",disputePostConclusionAcceptancePeriod:"BlockNumber",disputeMaxSpamSlots:"u32",disputeConclusionByTimeOutPeriod:"BlockNumber",noShowSlots:"u32",nDelayTranches:"u32",zerothDelayTrancheWidth:"u32",neededApprovals:"u32",relayVrfModuloSamples:"u32"},InboundDownwardMessage:{pubSentAt:"BlockNumber",pubMsg:"DownwardMessage"},InboundHrmpMessage:{sentAt:"BlockNumber",data:"Bytes"},InboundHrmpLimitations:{validWatermarks:"Vec"},InboundHrmpMessages:"Vec",LocalValidationData:{parentHead:"HeadData",balance:"Balance",codeUpgradeAllowed:"Option"},MessageIngestionType:{downwardMessages:"Vec",horizontalMessages:"BTreeMap"},MessageQueueChain:"RelayChainHash",NodeFeatures:"BitVec",OccupiedCore:{nextUpOnAvailable:"Option",occupiedSince:"BlockNumber",timeOutAt:"BlockNumber",nextUpOnTimeOut:"Option",availability:"BitVec",groupResponsible:"GroupIndex",candidateHash:"CandidateHash",candidateDescriptor:"CandidateDescriptor"},OccupiedCoreAssumption:{_enum:["Included,","TimedOut","Free"]},OutboundHrmpChannelLimitations:{bytesRemaining:"u32",messagesRemaining:"u32"},OutboundHrmpMessage:{recipient:"u32",data:"Bytes"},PendingSlashes:{_alias:{slashKeys:"keys"},slashKeys:"BTreeMap",kind:"SlashingOffenceKind"},ParachainDispatchOrigin:{_enum:["Signed","Parachain","Root"]},ParachainInherentData:{validationData:"PersistedValidationData",relayChainState:"StorageProof",downwardMessages:"Vec",horizontalMessages:"BTreeMap"},ParachainsInherentData:{bitfields:"SignedAvailabilityBitfields",backedCandidates:"Vec",disputes:"MultiDisputeStatementSet",parentHeader:"Header"},ParaGenesisArgs:{genesisHead:"Bytes",validationCode:"Bytes",parachain:"bool"},ParaId:"u32",ParaInfo:{manager:"AccountId",deposit:"Balance",locked:"bool"},ParaLifecycle:{_enum:["Onboarding","Parathread","Parachain","UpgradingToParachain","DowngradingToParathread","OutgoingParathread","OutgoingParachain"]},ParaPastCodeMeta:{upgradeTimes:"Vec",lastPruned:"Option"},ParaScheduling:{_enum:["Always","Dynamic"]},ParathreadClaim:"(ParaId, CollatorId)",ParathreadClaimQueue:{queue:"Vec",nextCoreOffset:"u32"},ParathreadEntry:{claim:"ParathreadClaim",retries:"u32"},ParaValidatorIndex:"u32",PersistedValidationData:{parentHead:"HeadData",relayParentNumber:"RelayChainBlockNumber",relayParentStorageRoot:"Hash",maxPovSize:"u32"},PvfCheckStatement:{accept:"bool",subject:"ValidationCodeHash",sessionIndex:"SessionIndex",validatorIndex:"ParaValidatorIndex"},QueuedParathread:{claim:"ParathreadEntry",coreOffset:"u32"},RelayBlockNumber:"u32",RelayChainBlockNumber:"RelayBlockNumber",RelayHash:"Hash",RelayChainHash:"RelayHash",Remark:"[u8; 32]",ReplacementTimes:{expectedAt:"BlockNumber",activatedAt:"BlockNumber"},Retriable:{_enum:{Never:"Null",WithRetries:"u32"}},ScheduledCore:{paraId:"ParaId",collator:"Option"},Scheduling:{_enum:["Always","Dynamic"]},ScrapedOnChainVotes:{session:"SessionIndex",backingValidatorsPerCandidate:"Vec<(CandidateReceipt, Vec<(ParaValidatorIndex, ValidityAttestation)>)>",disputes:"MultiDisputeStatementSet"},SessionInfo:{activeValidatorIndices:"Vec",randomSeed:"[u8; 32]",disputePeriod:"SessionIndex",validators:"Vec",discoveryKeys:"Vec",assignmentKeys:"Vec",validatorGroups:"Vec>",nCores:"u32",zerothDelayTrancheWidth:"u32",relayVrfModuloSamples:"u32",nDelayTranches:"u32",noShowSlots:"u32",neededApprovals:"u32"},OldV1SessionInfo:{validators:"Vec",discoveryKeys:"Vec",assignmentKeys:"Vec",validatorGroups:"Vec>",nCores:"u32",zerothDelayTrancheWidth:"u32",relayVrfModuloSamples:"u32",nDelayTranches:"u32",noShowSlots:"u32",neededApprovals:"u32"},SessionInfoValidatorGroup:"Vec",SignedAvailabilityBitfield:{payload:"BitVec",validatorIndex:"ParaValidatorIndex",signature:"ValidatorSignature"},SignedAvailabilityBitfields:"Vec",SigningContext:{sessionIndex:"SessionIndex",parentHash:"Hash"},SlashingOffenceKind:{_enum:["ForInvalid","AgainstValid"]},Statement:{_enum:{Never:"Null",Candidate:"Hash",Valid:"Hash",Invalid:"Hash"}},TransientValidationData:{maxCodeSize:"u32",maxHeadDataSize:"u32",balance:"Balance",codeUpgradeAllowed:"Option",dmqLength:"u32"},UpgradeGoAhead:{_enum:["Abort","GoAhead"]},UpgradeRestriction:{_enum:["Present"]},UpwardMessage:"Bytes",ValidationFunctionParams:{maxCodeSize:"u32",relayChainHeight:"RelayChainBlockNumber",codeUpgradeAllowed:"Option"},ValidationCode:"Bytes",ValidationCodeHash:"Hash",ValidationData:{persisted:"PersistedValidationData",transient:"TransientValidationData"},ValidationDataType:{validationData:"ValidationData",relayChainState:"Vec"},ValidatorSignature:"Signature",ValidityAttestation:{_enum:{Never:"Null",Implicit:"ValidatorSignature",Explicit:"ValidatorSignature"}},MessagingStateSnapshot:{relayDispatchQueueSize:"(u32, u32)",egressChannels:"Vec"},MessagingStateSnapshotEgressEntry:"(ParaId, AbridgedHrmpChannel)",SystemInherentData:"ParachainInherentData",VecInboundHrmpMessage:"Vec"}},ef={rpc:{},types:{Approvals:"[bool; 4]"}},tf={rpc:{},types:{AccountStatus:{validity:"AccountValidity",freeBalance:"Balance",lockedBalance:"Balance",signature:"Vec",vat:"Permill"},AccountValidity:{_enum:["Invalid","Initiated","Pending","ValidLow","ValidHigh","Completed"]}}},nf={rpc:{},runtime:{DryRunApi:[{methods:{dry_run_call:{description:"Dry run call",params:[{name:"origin",type:"OriginCaller"},{name:"call",type:"RuntimeCall"}],type:"Result"},dry_run_xcm:{description:"Dry run XCM program",params:[{name:"originLocation",type:"VersionedMultiLocation"},{name:"xcm",type:"VersionedXcm"}],type:"Result"}},version:1}]},types:{PostDispatchInfo:{actualWeight:"Option",paysFee:"Pays"},DispatchResultWithPostInfo:"Result",CallDryRunEffects:{executionResult:"DispatchResultWithPostInfo",emittedEvents:"Vec",localXcm:"Option",forwardedXcms:"Vec<(VersionedMultiLocation, Vec)>"},XcmDryRunEffects:{executionResult:"OutcomeV4",emittedEvents:"Vec",forwardedXcms:"Vec<(VersionedMultiLocation, Vec)>"},XcmDryRunApiError:{_enum:["Unimplemented","VersionedConversionFailed"]}}},rf=["AssetInstance","Fungibility","Junction","Junctions","MultiAsset","MultiAssetFilter","MultiLocation","Response","WildFungibility","WildMultiAsset","Xcm","XcmError"];function af(e){return rf.reduce(((t,n)=>(0,M.b)(t,{[n]:`${n}${e}`})),{})}const sf={rpc:{},types:{BodyId:{_enum:{Unit:"Null",Named:"Vec",Index:"Compact",Executive:"Null",Technical:"Null",Legislative:"Null",Judicial:"Null"}},BodyPart:{_enum:{Voice:"Null",Members:"Compact",Fraction:{nom:"Compact",denom:"Compact"},AtLeastProportion:{nom:"Compact",denom:"Compact"},MoreThanProportion:{nom:"Compact",denom:"Compact"}}},InteriorMultiLocation:"Junctions",NetworkId:{_enum:{Any:"Null",Named:"Vec",Polkadot:"Null",Kusama:"Null"}},XcmOrigin:{_enum:{Xcm:"MultiLocation"}},XcmpMessageFormat:{_enum:["ConcatenatedVersionedXcm","ConcatenatedEncodedBlob","Signals"]},XcmAssetId:{_enum:{Concrete:"MultiLocation",Abstract:"Bytes"}},InboundStatus:{_enum:["Ok","Suspended"]},OutboundStatus:{_enum:["Ok","Suspended"]},MultiAssets:"Vec",FungibilityV0:"FungibilityV1",WildFungibilityV0:"WildFungibilityV1",AssetInstanceV0:{_enum:{Undefined:"Null",Index8:"u8",Index16:"Compact",Index32:"Compact",Index64:"Compact",Index128:"Compact",Array4:"[u8; 4]",Array8:"[u8; 8]",Array16:"[u8; 16]",Array32:"[u8; 32]",Blob:"Vec"}},JunctionV0:{_enum:{Parent:"Null",Parachain:"Compact",AccountId32:{network:"NetworkId",id:"AccountId"},AccountIndex64:{network:"NetworkId",index:"Compact"},AccountKey20:{network:"NetworkId",key:"[u8; 20]"},PalletInstance:"u8",GeneralIndex:"Compact",GeneralKey:"Vec",OnlyChild:"Null",Plurality:{id:"BodyId",part:"BodyPart"}}},MultiAssetV0:{_enum:{None:"Null",All:"Null",AllFungible:"Null",AllNonFungible:"Null",AllAbstractFungible:"Vec",AllAbstractNonFungible:"Vec",AllConcreteFungible:"MultiLocationV0",AllConcreteNonFungible:"MultiLocationV0",AbstractFungible:{id:"Vec",instance:"Compact"},AbstractNonFungible:{class:"Vec",instance:"AssetInstanceV0"},ConcreteFungible:{id:"MultiLocationV0",amount:"Compact"},ConcreteNonFungible:{class:"MultiLocationV0",instance:"AssetInstanceV0"}}},MultiLocationV0:{_enum:{Here:"Null",X1:"JunctionV0",X2:"(JunctionV0, JunctionV0)",X3:"(JunctionV0, JunctionV0, JunctionV0)",X4:"(JunctionV0, JunctionV0, JunctionV0, JunctionV0)",X5:"(JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0)",X6:"(JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0)",X7:"(JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0)",X8:"(JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0)"}},OriginKindV0:{_enum:["Native","SovereignAccount","Superuser","Xcm"]},ResponseV0:{_enum:{Assets:"Vec"}},XcmV0:{_enum:{WithdrawAsset:{assets:"Vec",effects:"Vec"},ReserveAssetDeposit:{assets:"Vec",effects:"Vec"},ReceiveTeleportedAsset:{assets:"Vec",effects:"Vec"},QueryResponse:{queryId:"Compact",response:"ResponseV0"},TransferAsset:{assets:"Vec",dest:"MultiLocationV0"},TransferReserveAsset:{assets:"Vec",dest:"MultiLocationV0",effects:"Vec"},Transact:{originType:"XcmOriginKind",requireWeightAtMost:"u64",call:"DoubleEncodedCall"},HrmpNewChannelOpenRequest:{sender:"Compact",maxMessageSize:"Compact",maxCapacity:"Compact"},HrmpChannelAccepted:{recipient:"Compact"},HrmpChannelClosing:{initiator:"Compact",sender:"Compact",recipient:"Compact"},RelayedFrom:{who:"MultiLocationV0",message:"XcmV0"}}},XcmErrorV0:{_enum:{Undefined:"Null",Overflow:"Null",Unimplemented:"Null",UnhandledXcmVersion:"Null",UnhandledXcmMessage:"Null",UnhandledEffect:"Null",EscalationOfPrivilege:"Null",UntrustedReserveLocation:"Null",UntrustedTeleportLocation:"Null",DestinationBufferOverflow:"Null",SendFailed:"Null",CannotReachDestination:"(MultiLocation, Xcm)",MultiLocationFull:"Null",FailedToDecode:"Null",BadOrigin:"Null",ExceedsMaxMessageSize:"Null",FailedToTransactAsset:"Null",WeightLimitReached:"Weight",Wildcard:"Null",TooMuchWeightRequired:"Null",NotHoldingFees:"Null",WeightNotComputable:"Null",Barrier:"Null",NotWithdrawable:"Null",LocationCannotHold:"Null",TooExpensive:"Null",AssetNotFound:"Null",RecursionLimitReached:"Null"}},XcmOrderV0:{_enum:{Null:"Null",DepositAsset:{assets:"Vec",dest:"MultiLocationV0"},DepositReserveAsset:{assets:"Vec",dest:"MultiLocationV0",effects:"Vec"},ExchangeAsset:{give:"Vec",receive:"Vec"},InitiateReserveWithdraw:{assets:"Vec",reserve:"MultiLocationV0",effects:"Vec"},InitiateTeleport:{assets:"Vec",dest:"MultiLocationV0",effects:"Vec"},QueryHolding:{queryId:"Compact",dest:"MultiLocationV0",assets:"Vec"},BuyExecution:{fees:"MultiAssetV0",weight:"u64",debt:"u64",haltOnError:"bool",xcm:"Vec"}}},AssetInstanceV1:{_enum:{Undefined:"Null",Index:"Compact",Array4:"[u8; 4]",Array8:"[u8; 8]",Array16:"[u8; 16]",Array32:"[u8; 32]",Blob:"Bytes"}},FungibilityV1:{_enum:{Fungible:"Compact",NonFungible:"AssetInstanceV1"}},JunctionV1:{_enum:{Parachain:"Compact",AccountId32:{network:"NetworkId",id:"AccountId"},AccountIndex64:{network:"NetworkId",index:"Compact"},AccountKey20:{network:"NetworkId",key:"[u8; 20]"},PalletInstance:"u8",GeneralIndex:"Compact",GeneralKey:"Vec",OnlyChild:"Null",Plurality:{id:"BodyId",part:"BodyPart"}}},JunctionsV1:{_enum:{Here:"Null",X1:"JunctionV1",X2:"(JunctionV1, JunctionV1)",X3:"(JunctionV1, JunctionV1, JunctionV1)",X4:"(JunctionV1, JunctionV1, JunctionV1, JunctionV1)",X5:"(JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1)",X6:"(JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1)",X7:"(JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1)",X8:"(JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1)"}},MultiAssetsV1:"Vec",MultiAssetV1:{id:"XcmAssetId",fungibility:"FungibilityV1"},MultiAssetFilterV1:{_enum:{Definite:"MultiAssetsV1",Wild:"WildMultiAssetV1"}},MultiLocationV1:{parents:"u8",interior:"JunctionsV1"},OriginKindV1:"OriginKindV0",ResponseV1:{_enum:{Assets:"MultiAssetsV1"}},WildFungibilityV1:{_enum:["Fungible","NonFungible"]},WildMultiAssetV1:{_enum:{All:"Null",AllOf:{id:"XcmAssetId",fungibility:"WildFungibilityV1"}}},XcmV1:{_enum:{WithdrawAsset:{assets:"MultiAssetsV1",effects:"Vec"},ReserveAssetDeposit:{assets:"MultiAssetsV1",effects:"Vec"},ReceiveTeleportedAsset:{assets:"MultiAssetsV1",effects:"Vec"},QueryResponse:{queryId:"Compact",response:"ResponseV1"},TransferAsset:{assets:"MultiAssetsV1",dest:"MultiLocationV1"},TransferReserveAsset:{assets:"MultiAssetsV1",dest:"MultiLocationV1",effects:"Vec"},Transact:{originType:"XcmOriginKind",requireWeightAtMost:"u64",call:"DoubleEncodedCall"},HrmpNewChannelOpenRequest:{sender:"Compact",maxMessageSize:"Compact",maxCapacity:"Compact"},HrmpChannelAccepted:{recipient:"Compact"},HrmpChannelClosing:{initiator:"Compact",sender:"Compact",recipient:"Compact"},RelayedFrom:{who:"MultiLocationV1",message:"XcmV1"}}},XcmErrorV1:{_enum:{Undefined:"Null",Overflow:"Null",Unimplemented:"Null",UnhandledXcmVersion:"Null",UnhandledXcmMessage:"Null",UnhandledEffect:"Null",EscalationOfPrivilege:"Null",UntrustedReserveLocation:"Null",UntrustedTeleportLocation:"Null",DestinationBufferOverflow:"Null",SendFailed:"Null",CannotReachDestination:"(MultiLocationV1, XcmV1)",MultiLocationFull:"Null",FailedToDecode:"Null",BadOrigin:"Null",ExceedsMaxMessageSize:"Null",FailedToTransactAsset:"Null",WeightLimitReached:"Weight",Wildcard:"Null",TooMuchWeightRequired:"Null",NotHoldingFees:"Null",WeightNotComputable:"Null",Barrier:"Null",NotWithdrawable:"Null",LocationCannotHold:"Null",TooExpensive:"Null",AssetNotFound:"Null",DestinationUnsupported:"Null",RecursionLimitReached:"Null"}},XcmOrderV1:{_enum:{Noop:"Null",DepositAsset:{assets:"MultiAssetFilterV1",maxAssets:"u32",beneficiary:"MultiLocationV1"},DepositReserveAsset:{assets:"MultiAssetFilterV1",maxAssets:"u32",dest:"MultiLocationV1",effects:"Vec"},ExchangeAsset:{give:"MultiAssetFilterV1",receive:"MultiAssetsV1"},InitiateReserveWithdraw:{assets:"MultiAssetFilterV1",reserve:"MultiLocationV1",effects:"Vec"},InitiateTeleport:{assets:"MultiAssetFilterV1",dest:"MultiLocationV1",effects:"Vec"},QueryHolding:{queryId:"Compact",dest:"MultiLocationV1",assets:"MultiAssetFilterV1"},BuyExecution:{fees:"MultiAssetV1",weight:"u64",debt:"u64",haltOnError:"bool",instructions:"Vec"}}},AssetIdV2:{_enum:{Concrete:"MultiLocationV2",Abstract:"Bytes"}},AssetInstanceV2:{_enum:{Undefined:"Null",Index:"Compact",Array4:"[u8;4]",Array8:"[u8;8]",Array16:"[u8;16]",Array32:"[u8;32]",Blob:"Bytes"}},BodyIdV2:{_enum:{Unit:"Null",Named:"Bytes",Index:"Compact",Executive:"Null",Technical:"Null",Legislative:"Null",Judicial:"Null",Defense:"Null",Administration:"Null",Treasury:"Null"}},BodyPartV2:{_enum:{Voice:"Null",Members:{count:"Compact"},Fraction:{nom:"Compact",denom:"Compact"},AtLeastProportion:{nom:"Compact",denom:"Compact"},MoreThanProportion:{nom:"Compact",denom:"Compact"}}},NetworkIdV2:{_enum:{Any:"Null",Named:"Bytes",Polkadot:"Null",Kusama:"Null"}},JunctionV2:{_enum:{Parachain:"Compact",AccountId32:{network:"NetworkIdV2",id:"[u8; 32]"},AccountIndex64:{network:"NetworkIdV2",index:"Compact"},AccountKey20:{network:"NetworkIdV2",key:"[u8; 20]"},PalletInstance:"u8",GeneralIndex:"Compact",GeneralKey:"Bytes",OnlyChild:"Null",Plurality:{id:"BodyIdV2",part:"BodyPartV2"}}},JunctionsV2:{_enum:{Here:"Null",X1:"JunctionV2",X2:"(JunctionV2, JunctionV2)",X3:"(JunctionV2, JunctionV2, JunctionV2)",X4:"(JunctionV2, JunctionV2, JunctionV2, JunctionV2)",X5:"(JunctionV2, JunctionV2, JunctionV2, JunctionV2, JunctionV2)",X6:"(JunctionV2, JunctionV2, JunctionV2, JunctionV2, JunctionV2, JunctionV2)",X7:"(JunctionV2, JunctionV2, JunctionV2, JunctionV2, JunctionV2, JunctionV2, JunctionV2)",X8:"(JunctionV2, JunctionV2, JunctionV2, JunctionV2, JunctionV2, JunctionV2, JunctionV2, JunctionV2)"}},FungibilityV2:{_enum:{Fungible:"Compact",NonFungible:"AssetInstanceV2"}},InteriorMultiLocationV2:"JunctionsV2",MultiAssetV2:{id:"AssetIdV2",fun:"FungibilityV2"},MultiAssetsV2:"Vec",MultiAssetFilterV2:{_enum:{Definite:"MultiAssetsV2",Wild:"WildMultiAssetV2"}},MultiLocationV2:{parents:"u8",interior:"JunctionsV2"},OriginKindV2:{_enum:{Native:"Null",SovereignAccount:"Null",Superuser:"Null",Xcm:"Null"}},WildFungibilityV2:{_enum:{Fungible:"Null",NonFungible:"Null"}},ResponseV2:{_enum:{Null:"Null",Assets:"MultiAssetsV2",ExecutionResult:"Option<(u32, XcmErrorV2)>",Version:"u32"}},ResponseV2Error:"(u32, XcmErrorV2)",WeightLimitV2:{_enum:{Unlimited:"Null",Limited:"Compact"}},InstructionV2:{_enum:{WithdrawAsset:"MultiAssetsV2",ReserveAssetDeposited:"MultiAssetsV2",ReceiveTeleportedAsset:"MultiAssetsV2",QueryResponse:{queryId:"Compact",response:"ResponseV2",maxWeight:"Compact"},TransferAsset:{assets:"MultiAssetsV2",beneficiary:"MultiLocationV2"},TransferReserveAsset:{assets:"MultiAssetsV2",dest:"MultiLocationV2",xcm:"XcmV2"},Transact:{originType:"XcmOriginKind",requireWeightAtMost:"Compact",call:"DoubleEncodedCall"},HrmpNewChannelOpenRequest:{sender:"Compact",maxMessageSize:"Compact",maxCapacity:"Compact"},HrmpChannelAccepted:{recipient:"Compact"},HrmpChannelClosing:{initiator:"Compact",sender:"Compact",recipient:"Compact"},ClearOrigin:"Null",DescendOrigin:"InteriorMultiLocationV2",ReportError:{queryId:"Compact",dest:"MultiLocationV2",maxResponseWeight:"Compact"},DepositAsset:{assets:"MultiAssetFilterV2",maxAssets:"Compact",beneficiary:"MultiLocationV2"},DepositReserveAsset:{assets:"MultiAssetFilterV2",maxAssets:"Compact",dest:"MultiLocationV2",xcm:"XcmV2"},ExchangeAsset:{give:"MultiAssetFilterV2",receive:"MultiAssetsV2"},InitiateReserveWithdraw:{assets:"MultiAssetFilterV2",reserve:"MultiLocationV2",xcm:"XcmV2"},InitiateTeleport:{assets:"MultiAssetFilterV2",dest:"MultiLocationV2",xcm:"XcmV2"},QueryHolding:{queryId:"Compact",dest:"MultiLocationV2",assets:"MultiAssetFilterV2",maxResponseWeight:"Compact"},BuyExecution:{fees:"MultiAssetV2",weightLimit:"WeightLimitV2"},RefundSurplus:"Null",SetErrorHandler:"XcmV2",SetAppendix:"XcmV2",ClearError:"Null",ClaimAsset:{assets:"MultiAssetsV2",ticket:"MultiLocationV2"},Trap:"Compact",SubscribeVersion:{queryId:"Compact",maxResponseWeight:"Compact"},UnsubscribeVersion:"Null"}},WildMultiAssetV2:{_enum:{All:"Null",AllOf:{id:"AssetIdV2",fun:"WildFungibilityV2"}}},XcmV2:"Vec",XcmErrorV2:{_enum:{Overflow:"Null",Unimplemented:"Null",UntrustedReserveLocation:"Null",UntrustedTeleportLocation:"Null",MultiLocationFull:"Null",MultiLocationNotInvertible:"Null",BadOrigin:"Null",InvalidLocation:"Null",AssetNotFound:"Null",FailedToTransactAsset:"Null",NotWithdrawable:"Null",LocationCannotHold:"Null",ExceedsMaxMessageSize:"Null",DestinationUnsupported:"Null",Transport:"Null",Unroutable:"Null",UnknownClaim:"Null",FailedToDecode:"Null",MaxWeightInvalid:"Null",NotHoldingFees:"Null",TooExpensive:"Null",Trap:"u64",UnhandledXcmVersion:"Null",WeightLimitReached:"Weight",Barrier:"Null",WeightNotComputable:"Null"}},AssetIdV3:{_enum:{Concrete:"MultiLocationV3",Abstract:"Bytes"}},BodyIdV3:{_enum:{Unit:"Null",Moniker:"[u8;4]",Index:"Compact",Executive:"Null",Technical:"Null",Legislative:"Null",Judicial:"Null",Defense:"Null",Administration:"Null",Treasury:"Null"}},BodyPartV3:{_enum:{Voice:"Null",Members:{count:"Compact"},Fraction:{nom:"Compact",denom:"Compact"},AtLeastProportion:{nom:"Compact",denom:"Compact"},MoreThanProportion:{nom:"Compact",denom:"Compact"}}},AssetInstanceV3:{_enum:{Undefined:"Null",Index:"Compact",Array4:"[u8;4]",Array8:"[u8;8]",Array16:"[u8;16]",Array32:"[u8;32]"}},FungibilityV3:{_enum:{Fungible:"Compact",NonFungible:"AssetInstanceV3"}},InteriorMultiLocationV3:"JunctionsV3",JunctionV3:{_enum:{Parachain:"Compact",AccountId32:{network:"Option",id:"[u8;32]"},AccountIndex64:{network:"Option",index:"Compact"},AccountKey20:{network:"Option",key:"[u8;20]"},PalletInstance:"u8",GeneralIndex:"Compact",GeneralKey:{length:"u8",data:"[u8;32]"},OnlyChild:"Null",Plurality:{id:"BodyIdV3",part:"BodyPartV3"},GlobalConsensus:"NetworkIdV3"}},JunctionsV3:{_enum:{Here:"Null",X1:"JunctionV3",X2:"(JunctionV3, JunctionV3)",X3:"(JunctionV3, JunctionV3, JunctionV3)",X4:"(JunctionV3, JunctionV3, JunctionV3, JunctionV3)",X5:"(JunctionV3, JunctionV3, JunctionV3, JunctionV3, JunctionV3)",X6:"(JunctionV3, JunctionV3, JunctionV3, JunctionV3, JunctionV3, JunctionV3)",X7:"(JunctionV3, JunctionV3, JunctionV3, JunctionV3, JunctionV3, JunctionV3, JunctionV3)",X8:"(JunctionV3, JunctionV3, JunctionV3, JunctionV3, JunctionV3, JunctionV3, JunctionV3, JunctionV3)"}},MaybeErrorCodeV3:{_enum:{Success:"Null",Error:"Bytes",TruncatedError:"Bytes"}},MaxPalletsInfo:"u32",MultiAssetV3:{id:"AssetIdV3",fun:"FungibilityV3"},MultiAssetsV3:"Vec",MultiAssetFilterV3:{_enum:{Definite:"MultiAssetsV3",Wild:"WildMultiAssetV3"}},MultiLocationV3:{parents:"u8",interior:"JunctionsV3"},MaxPalletNameLen:"u32",NetworkIdV3:{_enum:{ByGenesis:"[u8;32]",ByFork:{blockNumber:"u64",blockHash:"[u8;32]"},Polkadot:"Null",Kusama:"Null",Westend:"Null",Rococo:"Null",Wococo:"Null",Ethereum:{chainId:"Compact"},BitcoinCore:"Null",BitcoinCash:"Null",PolkadotBulletin:"Null"}},OriginKindV3:"OriginKindV2",PalletInfoV3:{index:"Compact",name:"Bytes",moduleName:"Bytes",major:"Compact",minor:"Compact",patch:"Compact"},WildFungibilityV3:"WildFungibilityV2",QueryResponseInfoV3:{destination:"MultiLocationV3",queryId:"Compact",maxWeight:"WeightV2"},ResponseV3:{_enum:{Null:"Null",Assets:"MultiAssetsV3",ExecutionResult:"Option<(u32,XcmErrorV3)>",Version:"u32",PalletsInfo:"Vec",DispatchResult:"MaybeErrorCodeV3"}},XcmErrorV3:{_enum:{Overflow:"Null",Unimplemented:"Null",UntrustedReserveLocation:"Null",UntrustedTeleportLocation:"Null",LocationFull:"Null",LocationNotInvertible:"Null",BadOrigin:"Null",InvalidLocation:"Null",AssetNotFound:"Null",FailedToTransactAsset:"Null",NotWithdrawable:"Null",LocationCannotHold:"Null",ExceedsMaxMessageSize:"Null",DestinationUnsupported:"Null",Transport:"Null",Unroutable:"Null",UnknownClaim:"Null",FailedToDecode:"Null",MaxWeightInvalid:"Null",NotHoldingFees:"Null",TooExpensive:"Null",Trap:"u64",ExpectationFalse:"Null",PalletNotFound:"Null",NameMismatch:"Null",VersionIncompatible:"Null",HoldingWouldOverflow:"Null",ExportError:"Null",ReanchorFailed:"Null",NoDeal:"Null",FeesNotMet:"Null",LockError:"Null",NoPermission:"Null",Unanchored:"Null",NotDepositable:"Null",UnhandledXcmVersion:"Null",WeightLimitReached:"WeightV2",Barrier:"Null",ExceedsStackLimit:"Null"}},ResponseV3Error:"(u32, XcmErrorV3)",ResponseV3Result:"Option<(u32, ResponseV3Error)>",WeightLimitV3:{_enum:{Unlimited:"Null",Limited:"WeightV2"}},InstructionV3:{_enum:{WithdrawAsset:"MultiAssetsV3",ReserveAssetDeposited:"MultiAssetsV3",ReceiveTeleportedAsset:"MultiAssetsV3",QueryResponse:{queryId:"Compact",response:"ResponseV3",maxWeight:"WeightV2",querier:"Option"},TransferAsset:{assets:"MultiAssetsV3",beneficiary:"MultiLocationV3"},TransferReserveAsset:{assets:"MultiAssetsV3",dest:"MultiLocationV3",xcm:"XcmV3"},Transact:{originKind:"XcmOriginKind",requireWeightAtMost:"WeightV2",call:"DoubleEncodedCall"},HrmpNewChannelOpenRequest:{sender:"Compact",maxMessageSize:"Compact",maxCapacity:"Compact"},HrmpChannelAccepted:{recipient:"Compact"},HrmpChannelClosing:{initiator:"Compact",sender:"Compact",recipient:"Compact"},ClearOrigin:"Null",DescendOrigin:"JunctionsV3",ReportError:"QueryResponseInfoV3",DepositAsset:{assets:"MultiAssetFilterV3",beneficiary:"MultiLocationV3"},DepositReserveAsset:{assets:"MultiAssetFilterV3",dest:"MultiLocationV3",xcm:"XcmV3"},ExchangeAsset:{give:"MultiAssetFilterV3",want:"MultiAssetsV3",maximal:"bool"},InitiateReserveWithdraw:{assets:"MultiAssetFilterV3",reserve:"MultiLocationV3",xcm:"XcmV3"},InitiateTeleport:{assets:"MultiAssetFilterV3",dest:"MultiLocationV3",xcm:"XcmV3"},ReportHolding:{responseInfo:"QueryResponseInfoV3",assets:"MultiAssetFilterV3"},BuyExecution:{fees:"MultiAssetV3",weightLimit:"WeightLimitV3"},RefundSurplus:"Null",SetErrorHandler:"XcmV3",SetAppendix:"XcmV3",ClearError:"Null",ClaimAsset:{assets:"MultiAssetsV3",ticket:"MultiLocationV3"},Trap:"Compact",SubscribeVersion:{queryId:"Compact",maxResponseWeight:"WeightV2"},UnsubscribeVersion:"Null",BurnAsset:"MultiAssetsV3",ExpectAsset:"MultiAssetsV3",ExpectOrigin:"Option",ExpectError:"Option<(u32, XcmErrorV3)>",ExpectTransactStatus:"MaybeErrorCodeV3",QueryPallet:{moduleName:"Vec",responseInfo:"QueryResponseInfoV3"},ExpectPallet:{index:"Compact",name:"Vec",moduleName:"Vec",crateMajor:"Compact",minCrateMinor:"Compact"},ReportTransactStatus:"QueryResponseInfoV3",ClearTransactStatus:"Null",UniversalOrigin:"JunctionV3",ExportMessage:{network:"NetworkIdV3",destination:"JunctionsV3",xcm:"XcmV3"},LockAsset:{asset:"MultiAssetV3",unlocker:"MultiLocationV3"},UnlockAsset:{asset:"MultiAssetV3",target:"MultiLocationV3"},NoteUnlockable:{asset:"MultiAssetV3",owner:"MultiLocationV3"},RequestUnlock:{asset:"MultiAssetV3",locker:"MultiLocationV3"},SetFeesMode:{jitWithdraw:"bool"},SetTopic:"[u8; 32]",ClearTopic:"Null",AliasOrigin:"MultiLocationV3",UnpaidExecution:{weightLimit:"WeightLimitV3",checkOrigin:"Option"}}},WildMultiAssetV3:{_enum:{All:"Null",AllOf:{id:"AssetIdV3",fun:"WildFungibilityV2"},AllCounted:"Compact",AllOfCounted:{id:"AssetIdV3",fun:"WildFungibilityV2",count:"Compact"}}},VersionV3:"u32",XcmV3:"Vec",AssetIdV4:"MultiLocationV4",AssetInstanceV4:{_enum:{Undefined:"Null",Index:"Compact",Array4:"[u8;4]",Array8:"[u8;8]",Array16:"[u8;16]",Array32:"[u8;32]"}},FungibilityV4:{_enum:{Fungible:"Compact",NonFungible:"AssetInstanceV4"}},UncheckedFungibilityV4:{_enum:{Fungible:"Compact",NonFungible:"AssetInstanceV4"}},JunctionV4:{_enum:{Parachain:"Compact",AccountId32:{network:"Option",id:"[u8;32]"},AccountIndex64:{network:"Option",index:"Compact"},AccountKey20:{network:"Option",key:"[u8;20]"},PalletInstance:"u8",GeneralIndex:"Compact",GeneralKey:{length:"u8",data:"[u8;32]"},OnlyChild:"Null",Plurality:{id:"BodyIdV3",part:"BodyPartV3"},GlobalConsensus:"NetworkIdV4"}},JunctionsV4:{_enum:{Here:"Null",X1:"[JunctionV4;1]",X2:"[JunctionV4;2]",X3:"[JunctionV4;3]",X4:"[JunctionV4;4]",X5:"[JunctionV4;5]",X6:"[JunctionV4;6]",X7:"[JunctionV4;7]",X8:"[JunctionV4;8]"}},MaxPalletsInfo:"u32",NetworkIdV4:"NetworkIdV3",MultiAssetV4:{id:"AssetIdV4",fun:"FungibilityV4"},MultiAssetsV4:"Vec",MultiAssetFilterV4:{_enum:{Definite:"MultiAssetsV4",Wild:"WildMultiAssetV4"}},MultiLocationV4:{parents:"u8",interior:"JunctionsV4"},OriginKindV4:"XcmOriginKind",PalletInfoV4:"PalletInfoV3",WildFungibilityV4:"WildFungibilityV2",QueryResponseInfoV4:{destination:"MultiLocationV4",queryId:"Compact",maxWeight:"WeightV2"},ResponseV4:{_enum:{Null:"Null",Assets:"MultiAssetsV4",ExecutionResult:"Option<(u32, XcmErrorV3)>",Version:"u32",PalletsInfo:"Vec",DispatchResult:"MaybeErrorCodeV3"}},InstructionV4:{_enum:{WithdrawAsset:"MultiAssetsV4",ReserveAssetDeposited:"MultiAssetsV4",ReceiveTeleportedAsset:"MultiAssetsV4",QueryResponse:{queryId:"Compact",response:"ResponseV4",maxWeight:"WeightV2",querier:"Option"},TransferAsset:{assets:"MultiAssetsV4",beneficiary:"MultiLocationV4"},TransferReserveAsset:{assets:"MultiAssetsV4",dest:"MultiLocationV4",xcm:"XcmV4"},Transact:{originKind:"OriginKindV4",requireWeightAtMost:"WeightV2",call:"DoubleEncodedCall"},HrmpNewChannelOpenRequest:{sender:"Compact",maxMessageSize:"Compact",maxCapacity:"Compact"},HrmpChannelAccepted:{recipient:"Compact"},HrmpChannelClosing:{initiator:"Compact",sender:"Compact",recipient:"Compact"},ClearOrigin:"Null",DescendOrigin:"JunctionsV4",ReportError:"QueryResponseInfoV4",DepositAsset:{assets:"MultiAssetFilterV4",beneficiary:"MultiLocationV4"},DepositReserveAsset:{assets:"MultiAssetFilterV4",dest:"MultiLocationV4",xcm:"XcmV4"},ExchangeAsset:{give:"MultiAssetFilterV4",want:"MultiAssetsV4",maximal:"bool"},InitiateReserveWithdraw:{assets:"MultiAssetFilterV4",reserve:"MultiLocationV4",xcm:"XcmV4"},InitiateTeleport:{assets:"MultiAssetFilterV4",dest:"MultiLocationV4",xcm:"XcmV4"},ReportHolding:{responseInfo:"QueryResponseInfoV4",assets:"MultiAssetFilterV4"},BuyExecution:{fees:"MultiAssetV4",weightLimit:"WeightLimitV3"},RefundSurplus:"Null",SetErrorHandler:"XcmV4",SetAppendix:"XcmV4",ClearError:"Null",ClaimAsset:{assets:"MultiAssetsV4",ticket:"MultiLocationV4"},Trap:"Compact",SubscribeVersion:{queryId:"Compact",maxResponseWeight:"WeightV2"},UnsubscribeVersion:"Null",BurnAsset:"MultiAssetsV4",ExpectAsset:"MultiAssetsV4",ExpectOrigin:"Option",ExpectError:"Option<(u32, XcmErrorV3)>",ExpectTransactStatus:"MaybeErrorCodeV3",QueryPallet:{moduleName:"Vec",responseInfo:"QueryResponseInfoV4"},ExpectPallet:{index:"Compact",name:"Vec",moduleName:"Vec",crateMajor:"Compact",minCrateMinor:"Compact"},ReportTransactStatus:"QueryResponseInfoV4",ClearTransactStatus:"Null",UniversalOrigin:"JunctionV4",ExportMessage:{network:"NetworkIdV4",destination:"JunctionsV4",xcm:"XcmV4"},LockAsset:{asset:"MultiAssetV4",unlocker:"MultiLocationV4"},UnlockAsset:{asset:"MultiAssetV4",target:"MultiLocationV4"},NoteUnlockable:{asset:"MultiAssetV4",owner:"MultiLocationV4"},RequestUnlock:{asset:"MultiAssetV4",locker:"MultiLocationV4"},SetFeesMode:{jitWithdraw:"bool"},SetTopic:"[u8;32]",ClearTopic:"Null",AliasOrigin:"MultiLocationV4",UnpaidExecution:{weightLimit:"WeightLimitV3",checkOrigin:"Option"}}},OutcomeV4:{_enum:{Complete:{used:"WeightV2"},Incomplete:{used:"WeightV2",error:"XcmErrorV3"},Error:{error:"XcmErrorV3"}}},WildMultiAssetV4:{_enum:{All:"Null",AllOf:{id:"AssetIdV4",fun:"WildFungibilityV4"},AllCounted:"Compact",AllOfCounted:{id:"AssetIdV4",fun:"WildFungibilityV4",count:"Compact"}}},VersionV4:"u32",XcmV4:"Vec",XcmErrorV4:"XcmErrorV3",...af("V4"),DoubleEncodedCall:{encoded:"Bytes"},XcmOriginKind:{_enum:["Native","SovereignAccount","Superuser","Xcm"]},Outcome:{_enum:{Complete:"Weight",Incomplete:"(Weight, XcmErrorV0)",Error:"XcmErrorV0"}},QueryId:"u64",QueryStatus:{_enum:{Pending:{responder:"VersionedMultiLocation",maybeNotify:"Option<(u8, u8)>",timeout:"BlockNumber"},Ready:{response:"VersionedResponse",at:"BlockNumber"}}},QueueConfigData:{suspendThreshold:"u32",dropThreshold:"u32",resumeThreshold:"u32",thresholdWeight:"Weight",weightRestrictDecay:"Weight"},VersionMigrationStage:{_enum:{MigrateSupportedVersion:"Null",MigrateVersionNotifiers:"Null",NotifyCurrentTargets:"Option",MigrateAndNotifyOldTargets:"Null"}},VersionedMultiAsset:{_enum:{V0:"MultiAssetV0",V1:"MultiAssetV1",V2:"MultiAssetV2",V3:"MultiAssetV3",V4:"MultiAssetV4"}},VersionedMultiAssets:{_enum:{V0:"Vec",V1:"MultiAssetsV1",V2:"MultiAssetsV2",V3:"MultiAssetsV3",V4:"MultiAssetsV4"}},VersionedMultiLocation:{_enum:{V0:"MultiLocationV0",V1:"MultiLocationV1",V2:"MultiLocationV2",V3:"MultiLocationV3",V4:"MultiLocationV4"}},VersionedResponse:{V0:"ResponseV0",V1:"ResponseV1",V2:"ResponseV2",V3:"ResponseV3",V4:"ResponseV4"},VersionedXcm:{_enum:{V0:"XcmV0",V1:"XcmV1",V2:"XcmV2",V3:"XcmV3",V4:"XcmV4"}},XcmVersion:"u32"}},of={rpc:{},runtime:{XcmPaymentApi:[{methods:{query_acceptable_payment_assets:{description:"The API to query acceptable payment assets",params:[{name:"version",type:"u32"}],type:"Result, XcmPaymentApiError>"},query_weight_to_asset_fee:{description:"",params:[{name:"weight",type:"WeightV2"},{name:"asset",type:"XcmVersionedAssetId"}],type:"Result"},query_xcm_weight:{description:"",params:[{name:"message",type:"XcmVersionedXcm"}],type:"Result"}},version:1}]},types:{XcmPaymentApiError:{_enum:["Unimplemented","VersionedConversionFailed","WeightNotComputable","UnhandledXcmVersion","AssetNotFound"]}}},cf={rpc:{},runtime:{LocationToAccountApi:[{methods:{convert_location:{description:"Converts `Location` to `AccountId`",params:[{name:"location",type:"XcmVersionedLocation"}],type:"Result"}},version:1}]},types:{Error:{_enum:["Unsupported","VersionedConversionFailed"]}}},df={rpc:{},types:{ContractCryptoHasher:{_enum:["Blake2x256","Sha2x256","Keccak256"]},ContractDiscriminant:"u32",ContractLayoutArray:{offset:"ContractLayoutKey",len:"u32",cellsPerElem:"u64",layout:"ContractStorageLayout"},ContractLayoutCell:{key:"ContractLayoutKey",ty:"SiLookupTypeId"},ContractLayoutEnum:{dispatchKey:"ContractLayoutKey",variants:"BTreeMap"},ContractLayoutHash:{offset:"ContractLayoutKey",strategy:"ContractLayoutHashingStrategy",layout:"ContractStorageLayout"},ContractLayoutHashingStrategy:{hasher:"ContractCryptoHasher",postfix:"Vec",prefix:"Vec"},ContractLayoutKey:"[u8; 32]",ContractLayoutStruct:{fields:"Vec"},ContractLayoutStructField:{layout:"ContractStorageLayout",name:"Text"},ContractStorageLayout:{_enum:{Cell:"ContractLayoutCell",Hash:"ContractLayoutHash",Array:"ContractLayoutArray",Struct:"ContractLayoutStruct",Enum:"ContractLayoutEnum"}},ContractConstructorSpecV0:{name:"Text",selector:"ContractSelector",args:"Vec",docs:"Vec"},ContractConstructorSpecV1:{name:"Vec",selector:"ContractSelector",args:"Vec",docs:"Vec"},ContractConstructorSpecV2:{label:"Text",selector:"ContractSelector",args:"Vec",docs:"Vec"},ContractConstructorSpecV3:{label:"Text",selector:"ContractSelector",payable:"bool",args:"Vec",docs:"Vec"},ContractConstructorSpecV4:{label:"Text",selector:"ContractSelector",payable:"bool",args:"Vec",docs:"Vec",default:"bool",returnType:"Option"},ContractContractSpecV0:{constructors:"Vec",messages:"Vec",events:"Vec",docs:"Vec"},ContractContractSpecV1:{constructors:"Vec",messages:"Vec",events:"Vec",docs:"Vec"},ContractContractSpecV2:{constructors:"Vec",messages:"Vec",events:"Vec",docs:"Vec"},ContractContractSpecV3:{constructors:"Vec",messages:"Vec",events:"Vec",docs:"Vec"},ContractContractSpecV4:{constructors:"Vec",messages:"Vec",events:"Vec",docs:"Vec",environment:"ContractEnvironmentV4"},ContractContractSpecV5:{constructors:"Vec",messages:"Vec",events:"Vec",docs:"Vec",environment:"ContractEnvironmentV4"},ContractDisplayName:"SiPath",ContractEventParamSpecV0:{name:"Text",indexed:"bool",type:"ContractTypeSpec",docs:"Vec"},ContractEventParamSpecV2:{label:"Text",indexed:"bool",type:"ContractTypeSpec",docs:"Vec"},ContractEventSpecV0:{name:"Text",args:"Vec",docs:"Vec"},ContractEventSpecV1:{name:"Text",args:"Vec",docs:"Vec"},ContractEventSpecV2:{label:"Text",args:"Vec",docs:"Vec"},ContractEventSpecV3:{label:"Text",args:"Vec",docs:"Vec",module_path:"Text",signature_topic:"Option<[u8; 32]>"},ContractMessageParamSpecV0:{name:"Text",type:"ContractTypeSpec"},ContractMessageParamSpecV2:{label:"Text",type:"ContractTypeSpec"},ContractMessageSpecV0:{name:"Text",selector:"ContractSelector",mutates:"bool",payable:"bool",args:"Vec",returnType:"Option",docs:"Vec"},ContractMessageSpecV1:{name:"Vec",selector:"ContractSelector",mutates:"bool",payable:"bool",args:"Vec",returnType:"Option",docs:"Vec"},ContractMessageSpecV2:{label:"Text",selector:"ContractSelector",mutates:"bool",payable:"bool",args:"Vec",returnType:"Option",docs:"Vec"},ContractMessageSpecV3:{label:"Text",selector:"ContractSelector",mutates:"bool",payable:"bool",args:"Vec",returnType:"Option",docs:"Vec",default:"bool"},ContractSelector:"[u8; 4]",ContractTypeSpec:{type:"SiLookupTypeId",displayName:"ContractDisplayName"},ContractConstructorSpecLatest:"ContractConstructorSpecV4",ContractEventSpecLatest:"ContractEventSpecV3",ContractEventParamSpecLatest:"ContractEventParamSpecV2",ContractMessageParamSpecLatest:"ContractMessageParamSpecV2",ContractMessageSpecLatest:"ContractMessageSpecV3",ContractMetadataLatest:"ContractMetadataV5",ContractProjectInfo:{source:"ContractProjectSource",contract:"ContractProjectContract"},ContractMetadataV0:{metadataVersion:"Text",types:"Vec",spec:"ContractContractSpecV0"},ContractMetadataV1:{types:"Vec",spec:"ContractContractSpecV1"},ContractMetadataV2:{types:"Vec",spec:"ContractContractSpecV2"},ContractMetadataV3:{types:"Vec",spec:"ContractContractSpecV3"},ContractMetadataV4:{types:"Vec",spec:"ContractContractSpecV4",version:"Text"},ContractMetadataV5:{types:"Vec",spec:"ContractContractSpecV5",version:"u64"},ContractMetadata:{_enum:{V0:"ContractMetadataV0",V1:"ContractMetadataV1",V2:"ContractMetadataV2",V3:"ContractMetadataV3",V4:"ContractMetadataV4",V5:"ContractMetadataV5"}},ContractProjectV0:{metadataVersion:"Text",source:"ContractProjectSource",contract:"ContractProjectContract",types:"Vec",spec:"ContractContractSpecV0"},ContractProject:"(ContractProjectInfo, ContractMetadata)",ContractProjectContract:{_alias:{docs:"documentation"},name:"Text",version:"Text",authors:"Vec",description:"Option",docs:"Option",repository:"Option",homepage:"Option",license:"Option"},ContractProjectSource:{_alias:{wasmHash:"hash"},wasmHash:"[u8; 32]",language:"Text",compiler:"Text",wasm:"Raw"},ContractEnvironmentV4:{_alias:{hashType:"hash"},accountId:"Option",balance:"Option",blockNumber:"Option",hashType:"Option",timestamp:"Option",maxEventTopics:"Option"}}},uf={account_basic:{description:"Returns pallet_evm::Accounts by address.",params:[{name:"address",type:"H160"}],type:"EvmAccount"},account_code_at:{description:"For a given account address, returns pallet_evm::AccountCodes.",params:[{name:"address",type:"H160"}],type:"Bytes"},author:{description:"Returns the converted FindAuthor::find_author authority id.",params:[],type:"H160"},call:{description:"Returns a frame_ethereum::call response. If `estimate` is true,",params:[{name:"from",type:"H160"},{name:"to",type:"H160"},{name:"data",type:"Vec"},{name:"value",type:"U256"},{name:"gasLimit",type:"U256"},{name:"maxFeePerGas",type:"Option"},{name:"maxPriorityFeePerGas",type:"Option"},{name:"nonce",type:"Option"},{name:"estimate",type:"bool"},{name:"accessList",type:"Option)>>"}],type:"Result"},chain_id:{description:"Returns runtime defined pallet_evm::ChainId.",params:[],type:"u64"},create:{description:"Returns a frame_ethereum::call response. If `estimate` is true,",params:[{name:"from",type:"H160"},{name:"data",type:"Vec"},{name:"value",type:"U256"},{name:"gasLimit",type:"U256"},{name:"maxFeePerGas",type:"Option"},{name:"maxPriorityFeePerGas",type:"Option"},{name:"nonce",type:"Option"},{name:"estimate",type:"bool"},{name:"accessList",type:"Option)>>"}],type:"Result"},current_all:{description:"Return all the current data for a block in a single runtime call.",params:[],type:"(Option, Option>, Option>)"},current_block:{description:"Return the current block.",params:[],type:"BlockV2"},current_receipts:{description:"Return the current receipt.",params:[],type:"Option>"},current_transaction_statuses:{description:"Return the current transaction status.",params:[],type:"Option>"},elasticity:{description:"Return the elasticity multiplier.",params:[],type:"Option"},extrinsic_filter:{description:"Receives a `Vec` and filters all the ethereum transactions.",params:[{name:"xts",type:"Vec"}],type:"Vec"},gas_price:{description:"Returns FixedGasPrice::min_gas_price",params:[],type:"u256"},storage_at:{description:"For a given account address and index, returns pallet_evm::AccountStorages.",params:[{name:"address",type:"H160"},{name:"index",type:"u256"}],type:"H256"}},lf={rpc:{listening:{aliasSection:"net",description:"Returns true if client is actively listening for network connections. Otherwise false.",params:[],type:"bool"},peerCount:{aliasSection:"net",description:"Returns number of peers connected to node.",params:[],type:"Text"},version:{aliasSection:"net",description:"Returns protocol version.",params:[],type:"Text"},clientVersion:{aliasSection:"web3",description:"Returns current client version.",params:[],type:"Text"},sha3:{aliasSection:"web3",description:"Returns sha3 of the given data",params:[{name:"data",type:"Bytes"}],type:"H256"},accounts:{description:"Returns accounts list.",params:[],type:"Vec"},blockNumber:{description:"Returns the blockNumber",params:[],type:"U256"},call:{description:"Call contract, returning the output data.",params:[{name:"request",type:"EthCallRequest"},{isHistoric:!0,isOptional:!0,name:"number",type:"BlockNumber"}],type:"Bytes"},chainId:{description:"Returns the chain ID used for transaction signing at the current best block. None is returned if not available.",params:[],type:"U64"},coinbase:{description:"Returns block author.",params:[],type:"H160"},estimateGas:{description:"Estimate gas needed for execution of given contract.",params:[{name:"request",type:"EthCallRequest"},{isHistoric:!0,isOptional:!0,name:"number",type:"BlockNumber"}],type:"U256"},feeHistory:{description:"Returns fee history for given block count & reward percentiles",params:[{name:"blockCount",type:"U256"},{name:"newestBlock",type:"BlockNumber"},{name:"rewardPercentiles",type:"Option>"}],type:"EthFeeHistory"},gasPrice:{description:"Returns current gas price.",params:[],type:"U256"},getBalance:{description:"Returns balance of the given account.",params:[{name:"address",type:"H160"},{isHistoric:!0,isOptional:!0,name:"number",type:"BlockNumber"}],type:"U256"},getBlockByHash:{description:"Returns block with given hash.",params:[{name:"hash",type:"H256"},{name:"full",type:"bool"}],type:"Option"},getBlockByNumber:{description:"Returns block with given number.",params:[{name:"block",type:"BlockNumber"},{name:"full",type:"bool"}],type:"Option"},getBlockTransactionCountByHash:{description:"Returns the number of transactions in a block with given hash.",params:[{name:"hash",type:"H256"}],type:"U256"},getBlockTransactionCountByNumber:{description:"Returns the number of transactions in a block with given block number.",params:[{name:"block",type:"BlockNumber"}],type:"U256"},getCode:{description:"Returns the code at given address at given time (block number).",params:[{name:"address",type:"H160"},{isHistoric:!0,isOptional:!0,name:"number",type:"BlockNumber"}],type:"Bytes"},getFilterChanges:{description:"Returns filter changes since last poll.",params:[{name:"index",type:"U256"}],type:"EthFilterChanges"},getFilterLogs:{description:"Returns all logs matching given filter (in a range 'from' - 'to').",params:[{name:"index",type:"U256"}],type:"Vec"},getLogs:{description:"Returns logs matching given filter object.",params:[{name:"filter",type:"EthFilter"}],type:"Vec"},getProof:{description:"Returns proof for account and storage.",params:[{name:"address",type:"H160"},{name:"storageKeys",type:"Vec"},{name:"number",type:"BlockNumber"}],type:"EthAccount"},getStorageAt:{description:"Returns content of the storage at given address.",params:[{name:"address",type:"H160"},{name:"index",type:"U256"},{isHistoric:!0,isOptional:!0,name:"number",type:"BlockNumber"}],type:"H256"},getTransactionByBlockHashAndIndex:{description:"Returns transaction at given block hash and index.",params:[{name:"hash",type:"H256"},{name:"index",type:"U256"}],type:"EthTransaction"},getTransactionByBlockNumberAndIndex:{description:"Returns transaction by given block number and index.",params:[{name:"number",type:"BlockNumber"},{name:"index",type:"U256"}],type:"EthTransaction"},getTransactionByHash:{description:"Get transaction by its hash.",params:[{name:"hash",type:"H256"}],type:"EthTransaction"},getTransactionCount:{description:"Returns the number of transactions sent from given address at given time (block number).",params:[{name:"address",type:"H160"},{isHistoric:!0,isOptional:!0,name:"number",type:"BlockNumber"}],type:"U256"},getTransactionReceipt:{description:"Returns transaction receipt by transaction hash.",params:[{name:"hash",type:"H256"}],type:"EthReceipt"},getUncleByBlockHashAndIndex:{description:"Returns an uncles at given block and index.",params:[{name:"hash",type:"H256"},{name:"index",type:"U256"}],type:"EthRichBlock"},getUncleByBlockNumberAndIndex:{description:"Returns an uncles at given block and index.",params:[{name:"number",type:"BlockNumber"},{name:"index",type:"U256"}],type:"EthRichBlock"},getUncleCountByBlockHash:{description:"Returns the number of uncles in a block with given hash.",params:[{name:"hash",type:"H256"}],type:"U256"},getUncleCountByBlockNumber:{description:"Returns the number of uncles in a block with given block number.",params:[{name:"number",type:"BlockNumber"}],type:"U256"},getWork:{description:"Returns the hash of the current block, the seedHash, and the boundary condition to be met.",params:[],type:"EthWork"},hashrate:{description:"Returns the number of hashes per second that the node is mining with.",params:[],type:"U256"},maxPriorityFeePerGas:{description:"Returns max priority fee per gas",params:[],type:"U256"},mining:{description:"Returns true if client is actively mining new blocks.",params:[],type:"bool"},newBlockFilter:{description:"Returns id of new block filter.",params:[],type:"U256"},newFilter:{description:"Returns id of new filter.",params:[{name:"filter",type:"EthFilter"}],type:"U256"},newPendingTransactionFilter:{description:"Returns id of new block filter.",params:[],type:"U256"},protocolVersion:{description:"Returns protocol version encoded as a string (quotes are necessary).",params:[],type:"u64"},sendRawTransaction:{description:"Sends signed transaction, returning its hash.",params:[{name:"bytes",type:"Bytes"}],type:"H256"},sendTransaction:{description:"Sends transaction; will block waiting for signer to return the transaction hash",params:[{name:"tx",type:"EthTransactionRequest"}],type:"H256"},submitHashrate:{description:"Used for submitting mining hashrate.",params:[{name:"index",type:"U256"},{name:"hash",type:"H256"}],type:"bool"},submitWork:{description:"Used for submitting a proof-of-work solution.",params:[{name:"nonce",type:"H64"},{name:"headerHash",type:"H256"},{name:"mixDigest",type:"H256"}],type:"bool"},subscribe:{description:"Subscribe to Eth subscription.",params:[{name:"kind",type:"EthSubKind"},{isOptional:!0,name:"params",type:"EthSubParams"}],pubsub:["subscription","subscribe","unsubscribe"],type:"Null"},syncing:{description:"Returns an object with data about the sync status or false.",params:[],type:"EthSyncStatus"},uninstallFilter:{description:"Uninstalls filter.",params:[{name:"index",type:"U256"}],type:"bool"}},runtime:{ConvertTransactionRuntimeApi:[{methods:{convert_transaction:{description:"Converts an Ethereum-style transaction to Extrinsic",params:[{name:"transaction",type:"TransactionV2"}],type:"Extrinsic"}},version:2}],DebugRuntimeApi:[{methods:{trace_block:{description:"Trace all block extrinsics",params:[{name:"extrinsics",type:"Vec"},{name:"knownTransactions",type:"Vec"}],type:"Result<(), DispatchError>"},trace_transaction:{description:"Trace transaction extrinsics",params:[{name:"extrinsics",type:"Vec"},{name:"transaction",type:"EthTransaction"}],type:"Result<(), DispatchError>"}},version:4}],EthereumRuntimeRPCApi:[{methods:{...uf},version:4},{methods:{...uf,call:{description:"Returns a frame_ethereum::call response. If `estimate` is true,",params:[{name:"from",type:"H160"},{name:"to",type:"H160"},{name:"data",type:"Vec"},{name:"value",type:"U256"},{name:"gasLimit",type:"U256"},{name:"maxFeePerGas",type:"Option"},{name:"maxPriorityFeePerGas",type:"Option"},{name:"nonce",type:"Option"},{name:"estimate",type:"bool"},{name:"accessList",type:"Option)>>"}],type:"Result"},create:{description:"Returns a frame_ethereum::call response. If `estimate` is true,",params:[{name:"from",type:"H160"},{name:"data",type:"Vec"},{name:"value",type:"U256"},{name:"gasLimit",type:"U256"},{name:"maxFeePerGas",type:"Option"},{name:"maxPriorityFeePerGas",type:"Option"},{name:"nonce",type:"Option"},{name:"estimate",type:"bool"},{name:"accessList",type:"Option)>>"}],type:"Result"}},version:5}]},types:{BlockV0:{header:"EthHeader",transactions:"Vec",ommers:"Vec"},LegacyTransaction:{nonce:"U256",gasPrice:"U256",gasLimit:"U256",action:"EthTransactionAction",value:"U256",input:"Bytes",signature:"EthTransactionSignature"},TransactionV0:"LegacyTransaction",BlockV1:{header:"EthHeader",transactions:"Vec",ommers:"Vec"},EIP2930Transaction:{chainId:"u64",nonce:"U256",gasPrice:"U256",gasLimit:"U256",action:"EthTransactionAction",value:"U256",input:"Bytes",accessList:"EthAccessList",oddYParity:"bool",r:"H256",s:"H256"},TransactionV1:{_enum:{Legacy:"LegacyTransaction",EIP2930:"EIP2930Transaction"}},BlockV2:{header:"EthHeader",transactions:"Vec",ommers:"Vec"},EIP1559Transaction:{chainId:"u64",nonce:"U256",maxPriorityFeePerGas:"U256",maxFeePerGas:"U256",gasLimit:"U256",action:"EthTransactionAction",value:"U256",input:"Bytes",accessList:"EthAccessList",oddYParity:"bool",r:"H256",s:"H256"},TransactionV2:{_enum:{Legacy:"LegacyTransaction",EIP2930:"EIP2930Transaction",EIP1559:"EIP1559Transaction"}},EthereumAccountId:"GenericEthereumAccountId",EthereumAddress:"GenericEthereumAccountId",EthereumLookupSource:"GenericEthereumLookupSource",EthereumSignature:"[u8; 65]",EthAccessListItem:{address:"EthAddress",slots:"Vec"},EthAccessList:"Vec",EthAccount:{address:"EthAddress",balance:"U256",nonce:"U256",codeHash:"H256",storageHash:"H256",accountProof:"Vec",storageProof:"Vec"},EthAddress:"H160",EthBlock:{header:"EthHeader",transactions:"Vec",ommers:"Vec"},EthHeader:{parentHash:"H256",ommersHash:"H256",beneficiary:"EthAddress",stateRoot:"H256",transactionsRoot:"H256",receiptsRoot:"H256",logsBloom:"EthBloom",difficulty:"U256",number:"U256",gasLimit:"U256",gasUsed:"U256",timestamp:"u64",extraData:"Bytes",mixMash:"H256",nonce:"H64"},EthRichBlock:{_alias:{blockHash:"hash",blockSize:"size"},blockHash:"Option",parentHash:"H256",sha3Uncles:"H256",author:"EthAddress",miner:"EthAddress",stateRoot:"H256",transactionsRoot:"H256",receiptsRoot:"H256",number:"Option",gasUsed:"U256",gasLimit:"U256",extraData:"Bytes",logsBloom:"EthBloom",timestamp:"U256",difficulty:"U256",totalDifficulty:"Option",sealFields:"Vec",uncles:"Vec",transactions:"Vec",blockSize:"Option"},EthBloom:"H2048",EthCallRequest:{from:"Option",to:"Option",gasPrice:"Option",gas:"Option",value:"Option",data:"Option",nonce:"Option"},EthFeeHistory:{oldestBlock:"U256",baseFeePerGas:"Vec",gasUsedRatio:"Vec",reward:"Option>>"},EthFilter:{fromBlock:"Option",toBlock:"Option",blockHash:"Option",address:"Option",topics:"Option"},EthFilterAddress:{_enum:{Single:"EthAddress",Multiple:"Vec",Null:"Null"}},EthFilterChanges:{_enum:{Logs:"Vec",Hashes:"Vec",Empty:"Null"}},EthFilterTopic:{_enum:{Single:"EthFilterTopicInner",Multiple:"Vec",Null:"Null"}},EthFilterTopicEntry:"Option",EthFilterTopicInner:{_enum:{Single:"EthFilterTopicEntry",Multiple:"Vec",Null:"Null"}},EthRichHeader:{_alias:{blockHash:"hash",blockSize:"size"},blockHash:"Option",parentHash:"H256",sha3Uncles:"H256",author:"EthAddress",miner:"EthAddress",stateRoot:"H256",transactionsRoot:"H256",receiptsRoot:"H256",number:"Option",gasUsed:"U256",gasLimit:"U256",extraData:"Bytes",logsBloom:"EthBloom",timestamp:"U256",difficulty:"U256",sealFields:"Vec",blockSize:"Option"},EthLog:{address:"EthAddress",topics:"Vec",data:"Bytes",blockHash:"Option",blockNumber:"Option",transactionHash:"Option",transactionIndex:"Option",logIndex:"Option",transactionLogIndex:"Option",removed:"bool"},EthReceipt:{transactionHash:"Option",transactionIndex:"Option",blockHash:"Option",from:"Option",to:"Option",blockNumber:"Option",cumulativeGasUsed:"U256",gasUsed:"Option",contractAddress:"Option",logs:"Vec",root:"Option",logsBloom:"EthBloom",statusCode:"Option"},EthReceiptV0:"EthReceipt",EthReceiptV3:"EthReceipt",EthStorageProof:{key:"U256",value:"U256",proof:"Vec"},EthSubKind:{_enum:["newHeads","logs","newPendingTransactions","syncing"]},EthSubParams:{_enum:{None:"Null",Logs:"EthFilter"}},EthSubResult:{_enum:{Header:"EthRichHeader",Log:"EthLog",TransactionHash:"H256",SyncState:"EthSyncStatus"}},EthSyncInfo:{startingBlock:"U256",currentBlock:"U256",highestBlock:"U256",warpChunksAmount:"Option",warpChunksProcessed:"Option"},EthSyncStatus:{_enum:{Info:"EthSyncInfo",None:"Null"}},EthTransaction:{hash:"H256",nonce:"U256",blockHash:"Option",blockNumber:"Option",transactionIndex:"Option",from:"H160",to:"Option",value:"U256",gasPrice:"Option",maxFeePerGas:"Option",maxPriorityFeePerGas:"Option",gas:"U256",input:"Bytes",creates:"Option",raw:"Bytes",publicKey:"Option",chainId:"Option",standardV:"U256",v:"U256",r:"U256",s:"U256",accessList:"Option>",transactionType:"Option"},EthTransactionSignature:{v:"u64",r:"H256",s:"H256"},EthTransactionAction:{_enum:{Call:"H160",Create:"Null"}},EthTransactionCondition:{_enum:{block:"u64",time:"u64"}},EthTransactionRequest:{from:"Option",to:"Option",gasPrice:"Option",gas:"Option",value:"Option",data:"Option",nonce:"Option"},EthTransactionStatus:{transactionHash:"H256",transactionIndex:"u32",from:"EthAddress",to:"Option",contractAddress:"Option",logs:"Vec",logsBloom:"EthBloom"},EthWork:{powHash:"H256",seedHash:"H256",target:"H256",number:"Option"}}},ff={rpc:{},runtime:{AuthorFilterAPI:[{methods:{can_author:{description:"The runtime api used to predict whether an author will be eligible in the given slot",params:[{name:"author",type:"AccountId"},{name:"relayParent",type:"u32"},{name:"parentHeader",type:"Header"}],type:"bool"}},version:2},{methods:{can_author:{description:"The runtime api used to predict whether an author will be eligible in the given slot",params:[{name:"author",type:"AccountId"},{name:"relayParent",type:"u32"}],type:"bool"}},version:1}],NimbusApi:[{methods:{can_author:{description:"The runtime api used to predict whether a Nimbus author will be eligible in the given slot",params:[{name:"author",type:"AccountId"},{name:"relayParent",type:"u32"},{name:"parentHeader",type:"Header"}],type:"bool"}},version:1}]},types:{}},pf={rpc:{},runtime:{OracleApi:[{methods:{get_all_values:{description:"Retrieves all values",params:[{name:"providerId",type:"Raw"}],type:"Raw"},get_value:{description:"Retrieves a single value",params:[{name:"providerId",type:"Raw"},{name:"key",type:"Raw"}],type:"Option"}},version:1}]},types:{}},hf={rpc:{},runtime:{TokensApi:[{methods:{query_existential_deposit:{description:"Query the existential amount for a specific currency",params:[{name:"currencyId",type:"Raw"}],type:"u128"}},version:1}]},types:{}},bf={rpc:{methods:{description:"Retrieves the list of RPC methods that are exposed by the node",params:[],type:"RpcMethods"}},types:{RpcMethods:{version:"u32",methods:"Vec"}}},mf={rpc:{hasKey:{description:"Returns true if the keystore has private keys for the given public key and key type.",isUnsafe:!0,params:[{name:"publicKey",type:"Bytes"},{name:"keyType",type:"Text"}],type:"bool"},hasSessionKeys:{description:"Returns true if the keystore has private keys for the given session public keys.",isUnsafe:!0,params:[{name:"sessionKeys",type:"Bytes"}],type:"bool"},insertKey:{description:"Insert a key into the keystore.",isUnsafe:!0,params:[{name:"keyType",type:"Text"},{name:"suri",type:"Text"},{name:"publicKey",type:"Bytes"}],type:"Bytes"},pendingExtrinsics:{description:"Returns all pending extrinsics, potentially grouped by sender",params:[],type:"Vec"},removeExtrinsic:{description:"Remove given extrinsic from the pool and temporarily ban it to prevent reimporting",isUnsafe:!0,params:[{name:"bytesOrHash",type:"Vec"}],type:"Vec"},rotateKeys:{description:"Generate new session keys and returns the corresponding public keys",isUnsafe:!0,params:[],type:"Bytes"},submitAndWatchExtrinsic:{description:"Submit and subscribe to watch an extrinsic until unsubscribed",isSigned:!0,params:[{name:"extrinsic",type:"Extrinsic"}],pubsub:["extrinsicUpdate","submitAndWatchExtrinsic","unwatchExtrinsic"],type:"ExtrinsicStatus"},submitExtrinsic:{description:"Submit a fully formatted extrinsic for block inclusion",isSigned:!0,params:[{name:"extrinsic",type:"Extrinsic"}],type:"Hash"}},types:{ExtrinsicOrHash:{_enum:{Hash:"Hash",Extrinsic:"Bytes"}},ExtrinsicStatus:{_enum:{Future:"Null",Ready:"Null",Broadcast:"Vec",InBlock:"Hash",Retracted:"Hash",FinalityTimeout:"Hash",Finalized:"Hash",Usurped:"Hash",Dropped:"Null",Invalid:"Null"}}}},yf={rpc:{getBlock:{description:"Get header and body of a relay chain block",params:[{isHistoric:!0,isOptional:!0,name:"hash",type:"BlockHash"}],type:"SignedBlock"},getBlockHash:{description:"Get the block hash for a specific block",params:[{isOptional:!0,name:"blockNumber",type:"BlockNumber"}],type:"BlockHash"},getFinalizedHead:{alias:["chain_getFinalisedHead"],description:"Get hash of the last finalized block in the canon chain",params:[],type:"BlockHash"},getHeader:{alias:["chain_getHead"],description:"Retrieves the header for a specific block",params:[{isHistoric:!0,isOptional:!0,name:"hash",type:"BlockHash"}],type:"Header"},subscribeAllHeads:{description:"Retrieves the newest header via subscription",params:[],pubsub:["allHead","subscribeAllHeads","unsubscribeAllHeads"],type:"Header"},subscribeFinalizedHeads:{alias:["chain_subscribeFinalisedHeads","chain_unsubscribeFinalisedHeads"],description:"Retrieves the best finalized header via subscription",params:[],pubsub:["finalizedHead","subscribeFinalizedHeads","unsubscribeFinalizedHeads"],type:"Header"},subscribeNewHeads:{alias:["chain_unsubscribeNewHeads","subscribe_newHead","unsubscribe_newHead"],description:"Retrieves the best header via subscription",params:[],pubsub:["newHead","subscribeNewHead","unsubscribeNewHead"],type:"Header"}},types:{BlockHash:"Hash"}},xf={rpc:{getKeys:{description:"Returns the keys with prefix from a child storage, leave empty to get all the keys",params:[{name:"childKey",type:"PrefixedStorageKey"},{name:"prefix",type:"StorageKey"},{isHistoric:!0,isOptional:!0,name:"at",type:"Hash"}],type:"Vec"},getKeysPaged:{alias:["childstate_getKeysPagedAt"],description:"Returns the keys with prefix from a child storage with pagination support",params:[{name:"childKey",type:"PrefixedStorageKey"},{name:"prefix",type:"StorageKey"},{name:"count",type:"u32"},{isOptional:!0,name:"startKey",type:"StorageKey"},{isHistoric:!0,isOptional:!0,name:"at",type:"Hash"}],type:"Vec"},getStorage:{description:"Returns a child storage entry at a specific block state",params:[{name:"childKey",type:"PrefixedStorageKey"},{name:"key",type:"StorageKey"},{isHistoric:!0,isOptional:!0,name:"at",type:"Hash"}],type:"Option"},getStorageEntries:{description:"Returns child storage entries for multiple keys at a specific block state",params:[{name:"childKey",type:"PrefixedStorageKey"},{name:"keys",type:"Vec"},{isHistoric:!0,isOptional:!0,name:"at",type:"Hash"}],type:"Vec>"},getStorageHash:{description:"Returns the hash of a child storage entry at a block state",params:[{name:"childKey",type:"PrefixedStorageKey"},{name:"key",type:"StorageKey"},{isHistoric:!0,isOptional:!0,name:"at",type:"Hash"}],type:"Option"},getStorageSize:{description:"Returns the size of a child storage entry at a block state",params:[{name:"childKey",type:"PrefixedStorageKey"},{name:"key",type:"StorageKey"},{isHistoric:!0,isOptional:!0,name:"at",type:"Hash"}],type:"Option"}},types:{PrefixedStorageKey:"StorageKey"}},gf={rpc:{localStorageGet:{description:"Get offchain local storage under given key and prefix",isUnsafe:!0,params:[{name:"kind",type:"StorageKind"},{name:"key",type:"Bytes"}],type:"Option"},localStorageSet:{description:"Set offchain local storage under given key and prefix",isUnsafe:!0,params:[{name:"kind",type:"StorageKind"},{name:"key",type:"Bytes"},{name:"value",type:"Bytes"}],type:"Null"}},runtime:{OffchainWorkerApi:[{methods:{offchain_worker:{description:"Starts the off-chain task for given block header.",params:[{name:"header",type:"Header"}],type:"Null"}},version:2},{methods:{offchain_worker:{description:"Starts the off-chain task for given block header.",params:[{name:"number",type:"BlockNumber"}],type:"Null"}},version:1}]},types:{StorageKind:{_enum:{PERSISTENT:1,LOCAL:2}}}},vf={query_fee_details:{description:"The transaction fee details",params:[{name:"uxt",type:"Extrinsic"},{name:"len",type:"u32"}],type:"FeeDetails"}},wf={query_call_fee_details:{description:"The call fee details",params:[{name:"call",type:"Call"},{name:"len",type:"u32"}],type:"FeeDetails"}},Vf={query_info:{description:"The transaction info",params:[{name:"uxt",type:"Extrinsic"},{name:"len",type:"u32"}],type:"RuntimeDispatchInfo"}},Tf={query_call_info:{description:"The call info",params:[{name:"call",type:"Call"},{name:"len",type:"u32"}],type:"RuntimeDispatchInfo"}},Sf={query_length_to_fee:{description:"Query the output of the current LengthToFee given some input",params:[{name:"length",type:"u32"}],type:"Balance"},query_weight_to_fee:{description:"Query the output of the current WeightToFee given some input",params:[{name:"weight",type:"Weight"}],type:"Balance"}},kf={rpc:{queryFeeDetails:{deprecated:"Use `api.call.transactionPaymentApi.queryFeeDetails` instead",description:"Query the detailed fee of a given encoded extrinsic",params:[{name:"extrinsic",type:"Bytes"},{isHistoric:!0,isOptional:!0,name:"at",type:"BlockHash"}],type:"FeeDetails"},queryInfo:{deprecated:"Use `api.call.transactionPaymentApi.queryInfo` instead",description:"Retrieves the fee information for an encoded extrinsic",params:[{name:"extrinsic",type:"Bytes"},{isHistoric:!0,isOptional:!0,name:"at",type:"BlockHash"}],type:"RuntimeDispatchInfoV1"}},runtime:{TransactionPaymentApi:[{methods:{...Sf,...Vf,...vf},version:4},{methods:{...Sf,...Vf,...vf},version:3},{methods:{...Vf,...vf},version:2},{methods:{query_info:{description:"The transaction info",params:[{name:"uxt",type:"Extrinsic"},{name:"len",type:"u32"}],type:"RuntimeDispatchInfo"},...vf},version:1}],TransactionPaymentCallApi:[{methods:{...Sf,...Tf,...wf},version:3},{methods:{...Tf,...wf},version:2},{methods:{CALL:{description:"The call info",params:[{name:"call",type:"Call"},{name:"len",type:"u32"}],type:"RuntimeDispatchInfo"},...wf},version:1}]},types:{FeeDetails:{inclusionFee:"Option"},InclusionFee:{baseFee:"Balance",lenFee:"Balance",adjustedWeightFee:"Balance"},RuntimeDispatchInfo:{weight:"Weight",class:"DispatchClass",partialFee:"Balance"},RuntimeDispatchInfoV1:{weight:"WeightV1",class:"DispatchClass",partialFee:"Balance"},RuntimeDispatchInfoV2:{weight:"WeightV2",class:"DispatchClass",partialFee:"Balance"}}},_f={rpc:{call:{alias:["state_callAt"],description:"Perform a call to a builtin on the chain",params:[{name:"method",type:"Text"},{name:"data",type:"Bytes"},{isHistoric:!0,isOptional:!0,name:"at",type:"BlockHash"}],type:"Bytes"},getChildKeys:{description:"Retrieves the keys with prefix of a specific child storage",params:[{name:"childStorageKey",type:"StorageKey"},{name:"childDefinition",type:"StorageKey"},{name:"childType",type:"u32"},{name:"key",type:"StorageKey"},{isHistoric:!0,isOptional:!0,name:"at",type:"BlockHash"}],type:"Vec"},getChildReadProof:{description:"Returns proof of storage for child key entries at a specific block state.",params:[{name:"childStorageKey",type:"PrefixedStorageKey"},{name:"keys",type:"Vec"},{isHistoric:!0,isOptional:!0,name:"at",type:"BlockHash"}],type:"ReadProof"},getChildStorage:{description:"Retrieves the child storage for a key",params:[{name:"childStorageKey",type:"StorageKey"},{name:"childDefinition",type:"StorageKey"},{name:"childType",type:"u32"},{name:"key",type:"StorageKey"},{isHistoric:!0,isOptional:!0,name:"at",type:"BlockHash"}],type:"StorageData"},getChildStorageHash:{description:"Retrieves the child storage hash",params:[{name:"childStorageKey",type:"StorageKey"},{name:"childDefinition",type:"StorageKey"},{name:"childType",type:"u32"},{name:"key",type:"StorageKey"},{isHistoric:!0,isOptional:!0,name:"at",type:"BlockHash"}],type:"Hash"},getChildStorageSize:{description:"Retrieves the child storage size",params:[{name:"childStorageKey",type:"StorageKey"},{name:"childDefinition",type:"StorageKey"},{name:"childType",type:"u32"},{name:"key",type:"StorageKey"},{isHistoric:!0,isOptional:!0,name:"at",type:"BlockHash"}],type:"u64"},getKeys:{deprecated:"Use `api.rpc.state.getKeysPaged` to retrieve keys",description:"Retrieves the keys with a certain prefix",params:[{name:"key",type:"StorageKey"},{isHistoric:!0,isOptional:!0,name:"at",type:"BlockHash"}],type:"Vec"},getKeysPaged:{alias:["state_getKeysPagedAt"],description:"Returns the keys with prefix with pagination support.",params:[{name:"key",type:"StorageKey"},{name:"count",type:"u32"},{isOptional:!0,name:"startKey",type:"StorageKey"},{isHistoric:!0,isOptional:!0,name:"at",type:"BlockHash"}],type:"Vec"},getMetadata:{description:"Returns the runtime metadata",params:[{isHistoric:!0,isOptional:!0,name:"at",type:"BlockHash"}],type:"Metadata"},getPairs:{deprecated:"Use `api.rpc.state.getKeysPaged` to retrieve keys",description:"Returns the keys with prefix, leave empty to get all the keys (deprecated: Use getKeysPaged)",isUnsafe:!0,params:[{name:"prefix",type:"StorageKey"},{isHistoric:!0,isOptional:!0,name:"at",type:"BlockHash"}],type:"Vec"},getReadProof:{description:"Returns proof of storage entries at a specific block state",params:[{name:"keys",type:"Vec"},{isHistoric:!0,isOptional:!0,name:"at",type:"BlockHash"}],type:"ReadProof"},getRuntimeVersion:{alias:["chain_getRuntimeVersion"],description:"Get the runtime version",params:[{isHistoric:!0,isOptional:!0,name:"at",type:"BlockHash"}],type:"RuntimeVersion"},getStorage:{alias:["state_getStorageAt"],description:"Retrieves the storage for a key",params:[{name:"key",type:"StorageKey"},{isHistoric:!0,isOptional:!0,name:"at",type:"BlockHash"}],type:"StorageData"},getStorageHash:{alias:["state_getStorageHashAt"],description:"Retrieves the storage hash",params:[{name:"key",type:"StorageKey"},{isHistoric:!0,isOptional:!0,name:"at",type:"BlockHash"}],type:"Hash"},getStorageSize:{alias:["state_getStorageSizeAt"],description:"Retrieves the storage size",params:[{name:"key",type:"StorageKey"},{isHistoric:!0,isOptional:!0,name:"at",type:"BlockHash"}],type:"u64"},queryStorage:{description:"Query historical storage entries (by key) starting from a start block",isUnsafe:!0,params:[{name:"keys",type:"Vec"},{name:"fromBlock",type:"Hash"},{isOptional:!0,name:"toBlock",type:"BlockHash"}],type:"Vec"},queryStorageAt:{description:"Query storage entries (by key) starting at block hash given as the second parameter",params:[{name:"keys",type:"Vec"},{isHistoric:!0,isOptional:!0,name:"at",type:"BlockHash"}],type:"Vec"},subscribeRuntimeVersion:{alias:["chain_subscribeRuntimeVersion","chain_unsubscribeRuntimeVersion"],description:"Retrieves the runtime version via subscription",params:[],pubsub:["runtimeVersion","subscribeRuntimeVersion","unsubscribeRuntimeVersion"],type:"RuntimeVersion"},subscribeStorage:{description:"Subscribes to storage changes for the provided keys",params:[{isOptional:!0,name:"keys",type:"Vec"}],pubsub:["storage","subscribeStorage","unsubscribeStorage"],type:"StorageChangeSet"},traceBlock:{description:"Provides a way to trace the re-execution of a single block",isUnsafe:!0,params:[{name:"block",type:"Hash"},{name:"targets",type:"Option"},{name:"storageKeys",type:"Option"},{name:"methods",type:"Option"}],type:"TraceBlockResponse"},trieMigrationStatus:{description:"Check current migration state",isUnsafe:!0,params:[{isHistoric:!0,isOptional:!0,name:"at",type:"BlockHash"}],type:"MigrationStatusResult"}},types:{ApiId:"[u8; 8]",BlockTrace:{blockHash:"Text",parentHash:"Text",tracingTargets:"Text",storageKeys:"Text",spans:"Vec",events:"Vec"},BlockTraceEvent:{target:"Text",data:"BlockTraceEventData",parentId:"Option"},BlockTraceEventData:{stringValues:"HashMap"},BlockTraceSpan:{id:"u64",parentId:"Option",name:"Text",target:"Text",wasm:"bool"},KeyValueOption:"(StorageKey, Option)",MigrationStatusResult:{topRemainingToMigrate:"u64",childRemainingToMigrate:"u64"},ReadProof:{at:"Hash",proof:"Vec"},RuntimeVersionApi:"(ApiId, u32)",RuntimeVersion:{specName:"Text",implName:"Text",authoringVersion:"u32",specVersion:"u32",implVersion:"u32",apis:"Vec",transactionVersion:"u32",stateVersion:"u8"},RuntimeVersionPre4:{specName:"Text",implName:"Text",authoringVersion:"u32",specVersion:"u32",implVersion:"u32",apis:"Vec",transactionVersion:"u32"},RuntimeVersionPre3:{specName:"Text",implName:"Text",authoringVersion:"u32",specVersion:"u32",implVersion:"u32",apis:"Vec"},RuntimeVersionPartial:{specName:"Text",specVersion:"u32",apis:"Vec"},SpecVersion:"u32",StorageChangeSet:{block:"Hash",changes:"Vec"},TraceBlockResponse:{_enum:{TraceError:"TraceError",BlockTrace:"BlockTrace"}},TraceError:{error:"Text"}}};function Pf(e,{type:t},n,r){const a={},i=e.getSiType(t).def.asVariant.variants;for(let s=0,o=i.length;se(t)}const If=Mf(jt),Nf=Mf((e=>e.toString()));function Ef({calls:e}){return e.isSome}function Of(e,t,n,r,a){const{fields:i,index:s}=n,o=i.length,c=new Array(o);for(let d=0;d{if(a.length!==s.length)throw new Error(`Extrinsic ${t}.${i} expects ${a.length} arguments, got ${s.length}.`);return e.createTypeUnsafe("Call",[{args:s,callIndex:n},r])};return s.is=e=>function(e,t){return e.callIndex[0]===t[0]&&e.callIndex[1]===t[1]}(e,n),s.callIndex=n,s.meta=r,s.method=i,s.section=t,s.toJSON=()=>r.toJSON(),s}(e,r,new Uint8Array([a,s.toNumber()]),e.createTypeUnsafe("FunctionMetadataLatest",[(0,M.b)({args:c},n)]))}function Af(e,{lookup:t,pallets:n},r){const a={},i=n.filter(Ef);for(let s=0,o=i.length;s=12?o.toNumber():s;Qr(a,d,(()=>Pf(t,n.unwrap(),If,(n=>Of(e,t,n,d,u)))))}return a}function Cf(e,t){return(0,M.b)({args:t.fields.map((({type:t})=>e.getTypeDef(t).type))},t)}function Hf(e,{lookup:t,pallets:n},r){const a={};for(let i=0,s=n.length;i=12?o.toNumber():i;Qr(a,jt(c),(()=>Pf(t,s.unwrap(),Nf,(r=>({is:e=>fn(e)&&fn(e.index)&&e.index.eq(n)&&((0,ut.b)(e.error)?e.error[0]===r.index.toNumber():fn(e.error)&&e.error.eq(r.index)),meta:e.createTypeUnsafe("ErrorMetadataLatest",[Cf(t,r)])})))))}}return a}function Rf({events:e}){return e.isSome}function Bf(e,{lookup:t,pallets:n},r){const a={},i=n.filter(Rf);for(let s=0,o=i.length;s=12?o.toNumber():s;Qr(a,jt(c),(()=>Pf(t,n.unwrap(),Nf,(n=>({is:e=>fn(e)&&(0,ut.b)(e.index)&&d===e.index[0]&&n.index.eq(e.index[1]),meta:e.createTypeUnsafe("EventMetadataLatest",[Cf(t,n)])})))))}return a}function Lf(e,{pallets:t},n){const r={};for(let a=0,i=t.length;a$r({},n,(t=>{const n=e.createTypeUnsafe(e.createLookupType(t.type),[(0,ts.V)(t.value.toHex())]);return n.meta=t,n}),If)))}return r}function zf(e){const t=e.map((e=>e.toString().trim())),n=t.findIndex((e=>!e.length));return-1===n?t:t.slice(0,n)}function Uf(e,{extrinsic:t,lookup:n,pallets:r}){return e.createTypeUnsafe("MetadataLatest",[{extrinsic:t,lookup:{types:n.types.map((({id:t,type:n})=>e.createTypeUnsafe("PortableType",[{id:t,type:(0,M.b)({},n,{docs:zf(n.docs)})}])))},pallets:r.map((({calls:t,index:n,name:r})=>({calls:e.createTypeUnsafe("Option",[t.unwrapOr(null)]),index:n,name:r})))}]).toJSON()}function Df(e,t=[]){for(let n=0,r=e.length;ne||t)))}function Ff(e,{info:t}){throw new Error(`Unhandled: Unable to create and validate type from ${e} (info=${mr[t]})`)}const Xf={[mr.BTreeMap]:jf,[mr.BTreeSet]:qf,[mr.Compact]:qf,[mr.DoNotConstruct]:Ff,[mr.Enum]:jf,[mr.HashMap]:jf,[mr.Int]:Ff,[mr.Linkage]:qf,[mr.Null]:Ff,[mr.Option]:qf,[mr.Plain]:(e,t)=>t.lookupName||t.type,[mr.Range]:qf,[mr.RangeInclusive]:qf,[mr.Result]:jf,[mr.Set]:jf,[mr.Si]:Ff,[mr.Struct]:jf,[mr.Tuple]:jf,[mr.UInt]:Ff,[mr.Vec]:qf,[mr.VecFixed]:qf,[mr.WrapperKeepOpaque]:qf,[mr.WrapperOpaque]:qf};function Wf(e){const t=e.length,n=new Array(t);for(let r=0;re.getTypeDef(t).type))}function Kf(e,t){return e.getSiType(t).def.asVariant.variants.map((({fields:t})=>Gf(e,t)))}function Jf(e,t,n){return function(e,t,n){const r=Df(Wf(n)).filter((t=>!e.hasType(t)&&!e.isLookupType(t))).sort();if(0!==r.length){const e=`Unknown types found, no types for ${r.join(", ")}`;if(t)throw new Error(e);Zf.warn(e)}return n}(e,n,Df(function({lookup:e,pallets:t}){return t.reduce(((t,{calls:n,constants:r,events:a,storage:i})=>(t.push([Gf(e,r)]),n.isSome&&t.push(Kf(e,n.unwrap().type)),a.isSome&&t.push(Kf(e,a.unwrap().type)),i.isSome&&t.push(i.unwrap().items.map((({type:t})=>{if(t.isPlain)return[e.getTypeDef(t.asPlain).type];const{hashers:n,key:r,value:a}=t.asMap;return 1===n.length?[e.getTypeDef(a).type,e.getTypeDef(r).type]:[e.getTypeDef(a).type,...e.getSiType(r).def.asTuple.map((t=>e.getTypeDef(t).type))]}))),t)),[])}(t)))}function Yf(e,t){return t.toNumber()>=2?e.createTypeUnsafe("StorageHasherV10",[t.toNumber()+1]):e.createTypeUnsafe("StorageHasherV10",[t])}function Qf(e,t){return t.isMap?[(0,M.b)({},t.asMap,{hasher:Yf(e,t.asMap.hasher)}),1]:t.isDoubleMap?[(0,M.b)({},t.asDoubleMap,{hasher:Yf(e,t.asDoubleMap.hasher),key2Hasher:Yf(e,t.asDoubleMap.key2Hasher)}),2]:[t.asPlain,0]}function $f(e,{modules:t}){return e.createTypeUnsafe("MetadataV10",[{modules:t.map((t=>function(e,t){const n=t.storage.unwrapOr(null);return e.createTypeUnsafe("ModuleMetadataV10",[(0,M.b)({},t,{storage:n?(0,M.b)({},n,{items:n.items.map((t=>(0,M.b)({},t,{type:e.createTypeUnsafe("StorageEntryTypeV10",Qf(e,t.type))})))}):null})])}(e,t)))}])}function ep(e,{modules:t}){return e.createTypeUnsafe("MetadataV11",[{extrinsic:{signedExtensions:[],version:0},modules:t}])}function tp(e,{extrinsic:t,modules:n}){return e.createTypeUnsafe("MetadataV12",[{extrinsic:t,modules:n.map((t=>e.createTypeUnsafe("ModuleMetadataV12",[(0,M.b)({},t,{index:255})])))}])}function np(e,t){return e.createTypeUnsafe("MetadataV13",[t])}const rp={assets:{Approval:"AssetApproval",ApprovalKey:"AssetApprovalKey",Balance:"TAssetBalance",DestroyWitness:"AssetDestroyWitness"},babe:{EquivocationProof:"BabeEquivocationProof"},balances:{Status:"BalanceStatus"},beefy:{AuthorityId:"BeefyId"},contracts:{StorageKey:"ContractStorageKey"},electionProviderMultiPhase:{Phase:"ElectionPhase"},ethereum:{Block:"EthBlock",Header:"EthHeader",Receipt:"EthReceipt",Transaction:"EthTransaction",TransactionStatus:"EthTransactionStatus"},evm:{Account:"EvmAccount",Log:"EvmLog",Vicinity:"EvmVicinity"},grandpa:{Equivocation:"GrandpaEquivocation",EquivocationProof:"GrandpaEquivocationProof"},identity:{Judgement:"IdentityJudgement"},inclusion:{ValidatorIndex:"ParaValidatorIndex"},paraDisputes:{ValidatorIndex:"ParaValidatorIndex"},paraInclusion:{ValidatorIndex:"ParaValidatorIndex"},paraScheduler:{ValidatorIndex:"ParaValidatorIndex"},paraShared:{ValidatorIndex:"ParaValidatorIndex"},parachains:{Id:"ParaId"},parasDisputes:{ValidatorIndex:"ParaValidatorIndex"},parasInclusion:{ValidatorIndex:"ParaValidatorIndex"},parasScheduler:{ValidatorIndex:"ParaValidatorIndex"},parasShared:{ValidatorIndex:"ParaValidatorIndex"},proposeParachain:{Proposal:"ParachainProposal"},proxy:{Announcement:"ProxyAnnouncement"},scheduler:{ValidatorIndex:"ParaValidatorIndex"},shared:{ValidatorIndex:"ParaValidatorIndex"},society:{Judgement:"SocietyJudgement",Vote:"SocietyVote"},staking:{Compact:"CompactAssignments"},treasury:{Proposal:"TreasuryProposal"},xcm:{AssetId:"XcmAssetId"},xcmPallet:{AssetId:"XcmAssetId"}};const ap=[["<",">"],["<",","],[",",">"],["(",")"],["(",","],[",",","],[",",")"]];function ip(e,t){const n=t.toString(),r=e.findIndex((({def:e})=>e.HistoricMetaCompat===n));return-1!==r?r:e.push({def:{HistoricMetaCompat:n}})-1}function sp(e,t){return e.push({def:{Tuple:t}})-1}function op(e,t,n,r){return n.push({def:{Variant:{variants:r}},path:[`pallet_${e.toString()}`,"pallet",t]})-1}function cp(e,t){t.forEach((t=>{const n=Object.keys(e).find((e=>t.eq(e)));if(n)t.setOverride(e[n]);else{const n=t.toString(),r=Object.entries(e).reduce(((e,[t,n])=>ap.reduce(((e,[r,a])=>e.replace(`${r}${t}${a}`,`${r}${n}${a}`)),e)),n);n!==r&&t.setOverride(r)}}))}function dp(e,t,n,r,a){const i=r.map((({args:n,docs:r,name:i},s)=>(cp(a,n.map((({type:e})=>e))),t.createTypeUnsafe("SiVariant",[{docs:r,fields:n.map((({name:n,type:r})=>t.createTypeUnsafe("SiField",[{name:n,type:ip(e,r)}]))),index:s,name:i}]))));return t.createTypeUnsafe("PalletCallMetadataV14",[{type:op(n,"Call",e,i)}])}function up(e,t,n,r){return n.map((({docs:n,name:a,type:i,value:s})=>(cp(r,[i]),t.createTypeUnsafe("PalletConstantMetadataV14",[{docs:n,name:a,type:ip(e,i),value:s}]))))}function lp(e,t,n,r,a){const i=r.map((({docs:e,name:n},r)=>t.createTypeUnsafe("SiVariant",[{docs:e,fields:[],index:r,name:n}])));return t.createTypeUnsafe("PalletErrorMetadataV14",[{type:op(n,"Error",e,i)}])}function fp(e,t,n,r,a){const i=r.map((({args:n,docs:r,name:i},s)=>(cp(a,n),t.createTypeUnsafe("SiVariant",[{docs:r,fields:n.map((n=>t.createTypeUnsafe("SiField",[{type:ip(e,n)}]))),index:s,name:i}]))));return t.createTypeUnsafe("PalletEventMetadataV14",[{type:op(n,"Event",e,i)}])}function pp(e,t,n,{hashers:r,isLinked:a,isOptional:i,keys:s,value:o}){return cp(n,[o,...Array.isArray(s)?s:[s]]),t.createTypeUnsafe("StorageEntryTypeV14",[{Map:{hashers:r,key:1===r.length?ip(e,s[0]):sp(e,s.map((t=>ip(e,t)))),value:ip(e,a?`(${i?`Option<${o.toString()}>`:o.toString()}, Linkage<${s[0].toString()}>)`:o)}}])}function hp(e,t,{items:n,prefix:r},a){return t.createTypeUnsafe("PalletStorageMetadataV14",[{items:n.map((({docs:n,fallback:r,modifier:i,name:s,type:o})=>{let c;if(o.isPlain){const n=o.asPlain;cp(a,[n]),c=t.createTypeUnsafe("StorageEntryTypeV14",[{Plain:ip(e,n)}])}else if(o.isMap){const n=o.asMap;c=pp(e,t,a,{hashers:[n.hasher],isLinked:n.linked.isTrue,isOptional:i.isOptional,keys:[n.key],value:n.value})}else if(o.isDoubleMap){const n=o.asDoubleMap;c=pp(e,t,a,{hashers:[n.hasher,n.key2Hasher],isLinked:!1,isOptional:i.isOptional,keys:[n.key1,n.key2],value:n.value})}else{const n=o.asNMap;c=pp(e,t,a,{hashers:n.hashers,isLinked:!1,isOptional:i.isOptional,keys:n.keyVec,value:n.value})}return t.createTypeUnsafe("StorageEntryMetadataV14",[{docs:n,fallback:r,modifier:i,name:s,type:c}])})),prefix:r}])}function bp(e,t,n,{calls:r,constants:a,errors:i,events:s,storage:o}){const c=function({knownTypes:e},t){return{...rp[t]??{},...e.typesAlias?.[t]??{}}}(t,jt(n.name));return t.createTypeUnsafe("PalletMetadataV14",[{calls:r&&dp(e,t,n.name,r,c),constants:up(e,t,a,c),errors:i&&lp(e,t,n.name,i),events:s&&fp(e,t,n.name,s,c),index:n.index,name:n.name,storage:o&&hp(e,t,o,c)}])}function mp(e,t,n){const r=[];!function(e,...t){for(let n=0,r=t.length;n[e.name.toString(),n>=12?e.index.toNumber():t])).sort(((e,t)=>e[1]-t[1])).reduce(((e,[t,n])=>{for(let r=Object.keys(e).length;r({identifier:e,type:0}))),type:0,version:n}])}(e,t.extrinsic),i=t.modules.map((t=>bp(r,e,t,{calls:t.calls.unwrapOr(null),constants:t.constants,errors:t.errors.length?t.errors:null,events:t.events.unwrapOr(null),storage:t.storage.unwrapOr(null)})));return e.createTypeUnsafe("MetadataV14",[{extrinsic:a,lookup:{types:r.map(((t,n)=>e.createTypeUnsafe("PortableType",[{id:n,type:t}])))},pallets:i}])}function yp(e,t,n){const r=t.lookup.paramTypes.SpRuntimeUncheckedExtrinsic;return e.createTypeUnsafe("MetadataV15",[(0,M.b)({},t,{extrinsic:e.createTypeUnsafe("ExtrinsicMetadataV15",[(0,M.b)({},t.extrinsic,{addressType:r?.[0].type.unwrapOr(0),callType:r?.[1].type.unwrapOr(0),extraType:r?.[3].type.unwrapOr(0),signatureType:r?.[2].type.unwrapOr(0)})]),outerEnums:e.createTypeUnsafe("OuterEnums15",[{callType:r?.[1].type.unwrapOr(0),eventType:t.lookup.paramTypes.FrameSystemEventRecord?.[0].type.unwrapOr(0)}])})])}function xp(e,t,n){return t}const gp=1635018093;class vp extends xo{constructor(e,t){if(super(e,t),!this.isEmpty&&!this.eq(gp))throw new Error(`MagicNumber mismatch: expected ${e.createTypeUnsafe("u32",[gp]).toHex()}, found ${this.toHex()}`)}}class wp extends dn{__internal__converted=new Map;constructor(e,t){super(e,{magicNumber:vp,metadata:"MetadataAll"},t)}__internal__assertVersion=e=>{if(this.version>e)throw new Error(`Cannot convert metadata from version ${this.version} to ${e}`);return this.version===e};__internal__getVersion=(e,t)=>{if("latest"!==e&&this.__internal__assertVersion(e)){const t=`asV${e}`;return this.__internal__metadata()[t]}if(!this.__internal__converted.has(e)){const n="latest"===e?"asV15":"asV"+(e-1);this.__internal__converted.set(e,t(this.registry,this[n],this.version))}return this.__internal__converted.get(e)};__internal__metadata=()=>this.getT("metadata");get asCallsOnly(){return new wp(this.registry,{magicNumber:this.magicNumber,metadata:this.registry.createTypeUnsafe("MetadataAll",[Uf(this.registry,this.asLatest),14])})}get asV9(){return this.__internal__assertVersion(9),this.__internal__metadata().asV9}get asV10(){return this.__internal__getVersion(10,$f)}get asV11(){return this.__internal__getVersion(11,ep)}get asV12(){return this.__internal__getVersion(12,tp)}get asV13(){return this.__internal__getVersion(13,np)}get asV14(){return this.__internal__getVersion(14,mp)}get asV15(){return this.__internal__getVersion(15,yp)}get asLatest(){return this.__internal__getVersion("latest",xp)}get magicNumber(){return this.getT("magicNumber")}get version(){return this.__internal__metadata().index}getUniqTypes(e){return Jf(this.registry,this.asLatest,e)}toJSON(){return this.asLatest,super.toJSON()}}const Vp=new Uint8Array([109,101,116,97,9]),Tp=Vp.length-1;class Sp extends wp{constructor(e,t){super(e,(0,ut.b)(t)||(0,I.K)(t)?function(e,t){if(0===t.length)return Vp;if(9===t[Tp])try{return new wp(e,t)}catch{t[Tp]=10}return t}(e,(0,E.e)(t)):t)}}const kp=e=>e.toString(),_p=["BTreeMap","BTreeSet","Compact","HashMap","Option","Result","Vec"];function Pp(e,t,n){const{info:r,sub:a}=t;switch(r){case mr.BTreeMap:case mr.BTreeSet:case mr.Compact:case mr.HashMap:case mr.Linkage:case mr.Option:case mr.Range:case mr.RangeInclusive:case mr.Result:case mr.Vec:case mr.WrapperKeepOpaque:case mr.WrapperOpaque:return function(e,t,n=kp){return`${e}${t?`<${(Array.isArray(t)?t:[t]).map(n).join(", ")}>`:""}`}(n,a,(t=>Ep(e,t)))}throw new Error(`Unable to encode ${(0,je.A)(t)} with params`)}function Mp(e,t,n,r){const a=t.map((({name:e})=>e));if(!a.every((e=>!!e)))throw new Error(`Subtypes does not have consistent names, ${a.join(", ")}`);const i=(0,M.b)({},r);for(let s=0,o=t.length;sPp(e,t,"BTreeMap"),[mr.BTreeSet]:(e,t)=>Pp(e,t,"BTreeSet"),[mr.Compact]:(e,t)=>Pp(e,t,"Compact"),[mr.DoNotConstruct]:(e,{displayName:t,lookupIndex:n,lookupName:r})=>`DoNotConstruct<${r||t||((0,Fe.b)(n)?"Unknown":e.createLookupType(n))}>`,[mr.Enum]:(e,{sub:t})=>{if(!Array.isArray(t))throw new Error("Unable to encode Enum type");return t.every((({type:e})=>"Null"===e))?(0,je.A)({_enum:t.map((({name:e},t)=>`${e||`Empty${t}`}`))}):Mp(e,t,!0)},[mr.HashMap]:(e,t)=>Pp(e,t,"HashMap"),[mr.Int]:(e,{length:t=32})=>`Int<${t}>`,[mr.Linkage]:(e,t)=>Pp(e,t,"Linkage"),[mr.Null]:(e,t)=>"Null",[mr.Option]:(e,t)=>Pp(e,t,"Option"),[mr.Plain]:(e,{displayName:t,type:n})=>t||n,[mr.Range]:(e,t)=>Pp(e,t,"Range"),[mr.RangeInclusive]:(e,t)=>Pp(e,t,"RangeInclusive"),[mr.Result]:(e,t)=>Pp(e,t,"Result"),[mr.Set]:(e,{length:t=8,sub:n})=>{if(!Array.isArray(n))throw new Error("Unable to encode Set type");return(0,je.A)({_set:n.reduce(((e,{index:t,name:n},r)=>(0,M.b)(e,{[`${n||`Unknown${t||r}`}`]:t||r})),{_bitLength:t||8})})},[mr.Si]:(e,{lookupName:t,type:n})=>t||n,[mr.Struct]:(e,{alias:t,sub:n})=>{if(!Array.isArray(n))throw new Error("Unable to encode Struct type");return Mp(e,n,!1,t?{_alias:[...t.entries()].reduce(((e,[t,n])=>(0,M.b)(e,{[t]:n})),{})}:{})},[mr.Tuple]:(e,{sub:t})=>{if(!Array.isArray(t))throw new Error("Unable to encode Tuple type");return`(${t.map((t=>Ep(e,t))).join(",")})`},[mr.UInt]:(e,{length:t=32})=>`UInt<${t}>`,[mr.Vec]:(e,t)=>Pp(e,t,"Vec"),[mr.VecFixed]:(e,{length:t,sub:n})=>{if(!(0,Lt.E)(t)||!n||Array.isArray(n))throw new Error("Unable to encode VecFixed type");return`[${n.type};${t}]`},[mr.WrapperKeepOpaque]:(e,t)=>Pp(e,t,"WrapperKeepOpaque"),[mr.WrapperOpaque]:(e,t)=>Pp(e,t,"WrapperOpaque")};function Np(e,t,n=!0){return n&&t.lookupName?t.lookupName:Ip[t.info](e,t)}function Ep(e,t){return t.displayName&&!_p.some((e=>t.displayName===e))?t.displayName:Np(e,t)}function Op(e,t){return(0,M.b)({},t,{type:Np(e,t,!1)})}const Ap=(0,it.v)("PortableRegistry"),Cp={toNumber:()=>-1},Hp={Char:"u32",Str:"Text"},Rp=Fp(["sp_core::crypto::AccountId32","sp_runtime::generic::era::Era","sp_runtime::multiaddress::MultiAddress","fp_account::AccountId20","account::AccountId20","polkadot_runtime_common::claims::EthereumAddress","frame_support::weights::weight_v2::Weight","sp_weights::weight_v2::Weight","*_democracy::vote::Vote","*_conviction_voting::vote::Vote","*_identity::types::Data","sp_core::OpaqueMetadata","sp_core::OpaquePeerId","sp_core::offchain::OpaqueMultiaddr","primitive_types::*","sp_arithmetic::per_things::*","*_runtime::RuntimeCall","*_runtime::RuntimeEvent","ink::env::types::*","ink::primitives::types::*","ink_env::types::*","ink_primitives::types::*"]),Bp=Fp(["pallet_identity::types::BitFlags"]),Lp=["bitvec::order::Lsb0","BitOrderLsb0"],zp=[...Lp,"bitvec::order::Msb0","BitOrderMsb0"],Up=["BoundedBTreeMap","BoundedBTreeSet","BoundedVec","Box","BTreeMap","BTreeSet","Cow","Option","Range","RangeInclusive","Result","WeakBoundedVec","WrapperKeepOpaque","WrapperOpaque"],Dp=["entries","keys","new","size","hash","registry"],qp=["generic","misc","pallet","traits","types"];function jp(e){const t=e.length,n=new Array(t);for(let r=0;r{const r=t[n].toString();if("*"===e||e===r)return!0;if(e.includes("*")&&e.includes("_")&&r.includes("_")){let t=e.split("_"),n=r.split("_");if("*"===t[0]){const e=n.indexOf(t[1]);-1!==e&&(t=t.slice(1),n=n.slice(e))}return 2===t.length&&"*"===t[1]&&t[0]===n[0]||Xp(t,n)}return!1}))}function Wp(e,t,n,r,a=!1){const i=r.length;if(0===i||Up.includes(r[i-1].toString()))return null;const s=new Array(i),o=new Array(i);for(let d=0;d{const{lookupIndex:s,name:o,params:c}=a;if(!o)return null;if(r[s])return a;const d=function(e,t,n){const r=[n[t]];for(let a=t+1,i=n.length;ac.length!==e.params.length||c.some(((t,n)=>!t.name.eq(e.params[n].name)||t.type.unwrapOr(Cp).toNumber()!==e.params[n].type.unwrapOr(Cp).toNumber())))))return a;const u=c.findIndex((({type:e},t)=>d.every((({params:n},r)=>n[t].type.isSome&&(0===r||!n[t].type.eq(e))))));if(-1===u)return a;const l=d.length,f=new Array(l);for(let t=0;t!!e)).map((({lookupIndex:e,name:t,params:n})=>({lookupIndex:e,name:r[e]||t,params:n})))}(e,t,n);for(let c=0,d=o.length;c"},t);const{lookups:r,names:a,params:i,types:s}=Kp(this,this.types);this.__internal__alias=function(e,t){const n=Object.keys(e).some((e=>!e.startsWith("Pallet"))),r={};if(e.SpRuntimeUncheckedExtrinsic){const[,{type:t}]=e.SpRuntimeUncheckedExtrinsic;r[t.unwrap().toNumber()]="Call"}else n&&!t&&Ap.warn("Unable to determine runtime Call type, cannot inspect sp_runtime::generic::unchecked_extrinsic::UncheckedExtrinsic");if(e.FrameSystemEventRecord){const[{type:t}]=e.FrameSystemEventRecord;r[t.unwrap().toNumber()]="Event"}else n&&!t&&Ap.warn("Unable to determine runtime Event type, cannot inspect frame_system::EventRecord");return r}(i,n),this.__internal__lookups=r,this.__internal__names=a,this.__internal__params=i,this.__internal__types=s}get names(){return Object.values(this.__internal__names).sort()}get paramTypes(){return this.__internal__params}get types(){return this.getT("types")}register(){!function(e,t,n,r){if(e.registry.register(t),r.SpRuntimeUncheckedExtrinsic){const[t,,a]=r.SpRuntimeUncheckedExtrinsic,i=e.getSiType(t.type.unwrap()),s=e.getSiType(a.type.unwrap()).path.join("::");let o=i.path.join("::");const c="sp_runtime::multiaddress::MultiAddress"===o;if(c){const[t]=i.params;o=e.getSiType(t.type.unwrap()).path.join("::")}e.registry.register({AccountId:o.endsWith("::AccountId20")||o.endsWith("::H160")?"AccountId20":"AccountId32",Address:c?"MultiAddress":"AccountId",ExtrinsicSignature:["sp_runtime::MultiSignature"].includes(s)?"MultiSignature":n[a.type.unwrap().toNumber()]||"MultiSignature"})}}(this,this.__internal__lookups,this.__internal__names,this.__internal__params)}getName(e){return this.__internal__names[this.__internal__getLookupId(e)]}getSiType(e){const t=(this.__internal__types||this.types)[this.__internal__getLookupId(e)];if(!t)throw new Error(`PortableRegistry: Unable to find type with lookupId ${e.toString()}`);return t.type}getTypeDef(e){const t=this.__internal__getLookupId(e);if(!this.__internal__typeDefs[t]){const n=this.__internal__names[t],r={info:mr.DoNotConstruct,lookupIndex:t,lookupName:n,type:this.registry.createLookupType(t)};n&&(this.__internal__typeDefs[t]=r);const a=this.__internal__extract(this.getSiType(e),t);n||(this.__internal__typeDefs[t]=r),Object.keys(a).forEach((e=>{("lookupName"!==e||a[e])&&(this.__internal__typeDefs[t][e]=a[e])})),a.info===mr.Plain&&(this.__internal__typeDefs[t].lookupNameRoot=this.__internal__typeDefs[t].lookupName,delete this.__internal__typeDefs[t].lookupName)}return this.__internal__typeDefs[t]}sanitizeField(e){let t=null,n=null;return e.isSome&&(t=jt(e.unwrap()),t.includes("#")?(n=t,t=n.replace(/#/g,"_")):Dp.includes(t)&&(n=t,t=`${t}_`)),[t,n]}__internal__createSiDef(e){const t=this.getTypeDef(e),n=e.toNumber();return[mr.DoNotConstruct,mr.Enum,mr.Struct].includes(t.info)&&t.lookupName?{docs:t.docs,info:mr.Si,lookupIndex:n,lookupName:this.__internal__names[n],type:this.registry.createLookupType(e)}:t}__internal__getLookupId(e){if((0,I.K)(e)){if(!this.registry.isLookupType(e))throw new Error(`PortableRegistry: Expected a lookup string type, found ${e}`);return parseInt(e.replace("Lookup",""),10)}return(0,Lt.E)(e)?e:e.toNumber()}__internal__extract(e,t){const n=e.path.join("::");let r;const a=this.__internal__alias[t]||function({def:e,path:t}){return["frame_support::weights::weight_v2::Weight","sp_weights::weight_v2::Weight"].includes(t.join("::"))?e.isComposite&&1!==e.asComposite.fields.length?null:"WeightV1":t.length&&Rp.some((e=>Xp(e,t)))?t[t.length-1].toString():null}(e);try{if(a)r=this.__internal__extractAliasPath(t,a);else switch(e.def.type){case"Array":r=this.__internal__extractArray(t,e.def.asArray);break;case"BitSequence":r=this.__internal__extractBitSequence(t,e.def.asBitSequence);break;case"Compact":r=this.__internal__extractCompact(t,e.def.asCompact);break;case"Composite":r=this.__internal__extractComposite(t,e,e.def.asComposite);break;case"HistoricMetaCompat":r=this.__internal__extractHistoric(t,e.def.asHistoricMetaCompat);break;case"Primitive":r=this.__internal__extractPrimitive(t,e);break;case"Sequence":r=this.__internal__extractSequence(t,e.def.asSequence);break;case"Tuple":r=this.__internal__extractTuple(t,e.def.asTuple);break;case"Variant":r=this.__internal__extractVariant(t,e,e.def.asVariant);break;default:!function(e){throw new Error(`This codepath should be unreachable. Unhandled input: ${e}`)}(e.def.type)}}catch(i){throw new Error(`PortableRegistry: ${t}${n?` (${n})`:""}: Error extracting ${(0,je.A)(e)}: ${i.message}`)}return(0,M.b)({docs:jp(e.docs),namespace:n},r)}__internal__extractArray(e,{len:t,type:n}){const r=t.toNumber();if(r>2048)throw new Error("Only support for [Type; ], where length <= 2048");return Op(this.registry,{info:mr.VecFixed,length:r,sub:this.__internal__createSiDef(n)})}__internal__extractBitSequence(e,{bitOrderType:t,bitStoreType:n}){const r=this.__internal__createSiDef(t),a=this.__internal__createSiDef(n),[i,s]=zp.includes(r.namespace||"")?[r,a]:[a,r];if(!i.namespace||!zp.includes(i.namespace))throw new Error(`Unexpected bitOrder found as ${i.namespace||""}`);if(s.info!==mr.Plain||"u8"!==s.type)throw new Error(`Only u8 bitStore is currently supported, found ${s.type}`);Lp.includes(i.namespace);return{info:mr.Plain,type:"BitVec"}}__internal__extractCompact(e,{type:t}){return Op(this.registry,{info:mr.Compact,sub:this.__internal__createSiDef(t)})}__internal__extractComposite(e,{params:t,path:n},{fields:r}){if(n.length){const e=n[0].toString(),r=n[n.length-1].toString();if(1===n.length&&"BTreeMap"===e){if(2!==t.length)throw new Error(`BTreeMap requires 2 parameters, found ${t.length}`);return Op(this.registry,{info:mr.BTreeMap,sub:t.map((({type:e})=>this.__internal__createSiDef(e.unwrap())))})}if(1===n.length&&"BTreeSet"===e){if(1!==t.length)throw new Error(`BTreeSet requires 1 parameter, found ${t.length}`);return Op(this.registry,{info:mr.BTreeSet,sub:this.__internal__createSiDef(t[0].type.unwrap())})}if(["Range","RangeInclusive"].includes(e)){if(1!==t.length)throw new Error(`Range requires 1 parameter, found ${t.length}`);return Op(this.registry,{info:"Range"===e?mr.Range:mr.RangeInclusive,sub:this.__internal__createSiDef(t[0].type.unwrap()),type:e})}if(["WrapperKeepOpaque","WrapperOpaque"].includes(r)){if(1!==t.length)throw new Error(`WrapperOpaque requires 1 parameter, found ${t.length}`);return Op(this.registry,{info:"WrapperKeepOpaque"===r?mr.WrapperKeepOpaque:mr.WrapperOpaque,sub:this.__internal__createSiDef(t[0].type.unwrap()),type:r})}}return Bp.some((e=>Xp(e,n)))?this.__internal__extractCompositeSet(e,t,r):this.__internal__extractFields(e,r)}__internal__extractCompositeSet(e,t,n){if(1!==t.length||1!==n.length)throw new Error("Set handling expects param/field as single entries");return Op(this.registry,{info:mr.Set,length:this.registry.createTypeUnsafe(this.registry.createLookupType(n[0].type),[]).bitLength(),sub:this.getSiType(t[0].type.unwrap()).def.asVariant.variants.map((({index:e,name:t})=>({index:e.toNumber(),info:mr.Plain,name:t.toString(),type:"Null"})))})}__internal__extractFields(e,t){let n=!0,r=!0;const a=t.length;for(let o=0;othis.__internal__createSiDef(e)));return Op(this.registry,{info:mr.Tuple,lookupIndex:e,lookupName:this.__internal__names[e],sub:n})}__internal__extractVariant(e,{params:t,path:n},{variants:r}){if(n.length){const e=n[0].toString();if("Option"===e){if(1!==t.length)throw new Error(`Option requires 1 parameter, found ${t.length}`);return Op(this.registry,{info:mr.Option,sub:this.__internal__createSiDef(t[0].type.unwrap())})}if("Result"===e){if(2!==t.length)throw new Error(`Result requires 2 parameters, found ${t.length}`);return Op(this.registry,{info:mr.Result,sub:t.map((({type:e},t)=>(0,M.b)({name:["Ok","Error"][t]},this.__internal__createSiDef(e.unwrap()))))})}}return 0===r.length?{info:mr.Null,type:"Null"}:this.__internal__extractVariantEnum(e,r)}__internal__extractVariantEnum(e,t){const n=[];return t.slice().sort(((e,t)=>e.index.cmp(t.index))).forEach((({fields:e,index:t,name:r})=>{const a=t.toNumber();for(;n.length!==a;)n.push({index:n.length,info:mr.Null,name:`__Unused${n.length}`,type:"Null"});n.push((0,M.b)(this.__internal__extractFields(-1,e),{index:a,name:r.toString()}))})),Op(this.registry,{info:mr.Enum,lookupIndex:e,lookupName:this.__internal__names[e],sub:n})}}const Yp=new Uint8Array(2),Qp=(0,it.v)("registry");function $p(e,t){return parseInt(e,10)-parseInt(t,10)}function eh(e){return e.toString()}function th(e,t){const n=t.length,r=new Array(n);for(let a=0;ae.toNumber()))}return[12]}get chainIsEthereum(){return this.__internal__chainProperties?.isEthereum.isTrue||!1}get chainSS58(){return this.__internal__chainProperties?.ss58Format.isSome?this.__internal__chainProperties.ss58Format.unwrap().toNumber():void 0}get chainTokens(){if(this.__internal__chainProperties?.tokenSymbol.isSome){const e=this.__internal__chainProperties.tokenSymbol.unwrap();if(e.length)return e.map(eh)}return[Un.getDefaults().unit]}get firstCallIndex(){return this.__internal__firstCallIndex||Yp}isLookupType(e){return/Lookup\d+$/.test(e)}createLookupType(e){return`Lookup${"number"==typeof e?e:e.toNumber()}`}get knownTypes(){return this.__internal__knownTypes}get lookup(){return ea(this.__internal__lookup,"PortableRegistry has not been set on this registry")}get metadata(){return ea(this.__internal__metadata,"Metadata has not been set on this registry")}get unknownTypes(){return[...this.__internal__unknownTypes.keys()]}get signedExtensions(){return this.__internal__signedExtensions}clearCache(){this.__internal__classes=new Map}createClass(e){return Zr(this,e)}createClassUnsafe(e){return Zr(this,e)}createType(e,...t){return Yr(this,e,t)}createTypeUnsafe(e,t,n){return Yr(this,e,t,n)}findMetaCall(e){const[t,n]=[e[0],e[1]];return ea(this.__internal__metadataCalls[`${t}`]&&this.__internal__metadataCalls[`${t}`][`${n}`],(()=>`findMetaCall: Unable to find Call with index [${t}, ${n}]/[${e.toString()}]`))}findMetaError(e){const[t,n]=(0,ut.b)(e)?[e[0],e[1]]:[e.index.toNumber(),(0,ut.b)(e.error)?e.error[0]:e.error.toNumber()];return ea(this.__internal__metadataErrors[`${t}`]&&this.__internal__metadataErrors[`${t}`][`${n}`],(()=>`findMetaError: Unable to find Error with index [${t}, ${n}]/[${e.toString()}]`))}findMetaEvent(e){const[t,n]=[e[0],e[1]];return ea(this.__internal__metadataEvents[`${t}`]&&this.__internal__metadataEvents[`${t}`][`${n}`],(()=>`findMetaEvent: Unable to find Event with index [${t}, ${n}]/[${e.toString()}]`))}get(e,t,n){return this.getUnsafe(e,t,n)}getUnsafe(e,t,n){let r=this.__internal__classes.get(e)||this.__internal__knownDefaults[e];if(!r){const a=this.__internal__definitions.get(e);let i;a?i=Zr(this,a):n?i=function(e,t){try{const n=Xr[t.info](e,t);if(!n)throw new Error("No class created");return!n.__fallbackType&&t.fallbackType&&(n.__fallbackType=t.fallbackType),n}catch(n){throw new Error(`Unable to construct class from ${(0,je.A)(t)}: ${n.message}`)}}(this,n):t&&(Qp.warn(`Unable to resolve type ${e}, it will fail on construction`),this.__internal__unknownTypes.set(e,!0),i=at.with(e)),i&&(r=class extends i{},this.__internal__classes.set(e,r),n&&(0,Lt.E)(n.lookupIndex)&&this.__internal__classes.set(this.createLookupType(n.lookupIndex),r))}return r}getChainProperties(){return this.__internal__chainProperties}getClassName(e){const t=[];for(const[n,r]of this.__internal__knownDefaultsEntries)e===r&&t.push(n);for(const[n,r]of this.__internal__classes.entries())e===r&&t.push(n);return t.length?t.sort().reverse()[0]:void 0}getDefinition(e){return this.__internal__definitions.get(e)}getModuleInstances(e,t){return this.__internal__knownTypes?.typesBundle?.spec?.[e.toString()]?.instances?.[t]||this.__internal__moduleMap[t]}getOrThrow(e){const t=this.get(e);if(!t)throw new Error(`type ${e} not found`);return t}getOrUnknown(e){return this.get(e,!0)}getTransactionExtensionVersion(){return 0}getSignedExtensionExtra(){return Bi(this.__internal__signedExtensions,"payload",this.__internal__userExtensions)}getSignedExtensionTypes(){return Bi(this.__internal__signedExtensions,"extrinsic",this.__internal__userExtensions)}hasClass(e){return this.__internal__classes.has(e)||!!this.__internal__knownDefaults[e]}hasDef(e){return this.__internal__definitions.has(e)}hasType(e){return!this.__internal__unknownTypes.get(e)&&(this.hasClass(e)||this.hasDef(e))}hash(e){return this.createType("CodecHash",this.__internal__hasher(e))}register(e,t){if((0,qe.T)(e))this.__internal__classes.set(e.name,e);else if((0,I.K)(e)){if(!(0,qe.T)(t))throw new Error(`Expected class definition passed to '${e}' registration`);if(e===t.toString())throw new Error(`Unable to register circular ${e} === ${e}`);this.__internal__classes.set(e,t)}else this.__internal__registerObject(e)}__internal__registerObject=e=>{const t=Object.entries(e);for(let n=0,r=t.length;n{this.setLookup(e);let t=null;if(this.hasType("SpWeightsWeightV2Weight")){const e=this.createType("SpWeightsWeightV2Weight");t=e.refTime&&e.proofSize?"SpWeightsWeightV2Weight":"WeightV1"}else(0,pn.f)(this.createType("Weight"))||(t="WeightV1");t&&this.register({Weight:t})};setMetadata(e,t,n,r){this.__internal__metadata=e.asLatest,this.__internal__metadataVersion=e.version,this.__internal__firstCallIndex=null,this.__internal__registerLookup(this.__internal__metadata.lookup),function(e,{lookup:t,pallets:n},r,a,i){const s=n.filter(Ef);nh(a),nh(i);for(let o=0,c=s.length;o=12?c.toNumber():o,l=jt(d),f=n.unwrap();Qr(a,u,(()=>Pf(t,f,rh,(n=>Of(e,t,n,l,u)))));const{path:p}=e.lookup.getSiType(f.type),h=p.findIndex((e=>e.eq("pallet")));if(-1!==h){const e=jt(p.slice(0,h).map(((e,t)=>0===t?e.replace(/^(frame|pallet)_/,""):e)).join(" "));i[e]?i[e].push(l):i[e]=[l]}}}(this,this.__internal__metadata,this.__internal__metadataVersion,this.__internal__metadataCalls,this.__internal__moduleMap),function(e,{lookup:t,pallets:n},r,a){nh(a);for(let i=0,s=n.length;i=12?s.toNumber():i,(()=>Pf(t,e.unwrap(),rh,(({docs:e,fields:r,index:a,name:i})=>({args:th(t,r),docs:e.map(eh),fields:r,index:a.toNumber(),method:i.toString(),name:i.toString(),section:n})))))}}}(0,this.__internal__metadata,this.__internal__metadataVersion,this.__internal__metadataErrors),function(e,{lookup:t,pallets:n},r,a){const i=n.filter(Rf);nh(a);for(let s=0,o=i.length;s=12?o.toNumber():s,(()=>Pf(t,n.unwrap(),rh,(n=>{const r=e.createType("EventMetadataLatest",(0,M.b)({},n,{args:th(t,n.fields)}));return class extends Li{constructor(e,t){super(e,t,r,jt(c),n.name.toString())}}}))))}}(this,this.__internal__metadata,this.__internal__metadataVersion,this.__internal__metadataEvents);const[a]=Object.keys(this.__internal__metadataCalls).sort($p);if(a){const[e]=Object.keys(this.__internal__metadataCalls[a]).sort($p);e&&(this.__internal__firstCallIndex=new Uint8Array([parseInt(a,10),parseInt(e,10)]))}this.setSignedExtensions(t||(this.__internal__metadata.extrinsic.version.gt(lt)?this.__internal__metadata.extrinsic.signedExtensions.map((({identifier:e})=>e.toString())):Ri),n,r),this.setChainProperties(function(e,t){const n=e.getChainProperties(),r=Lf(e,t.asLatest,t.version),a=r.system&&(r.system.sS58Prefix||r.system.ss58Prefix);if(!a)return n;const{isEthereum:i,tokenDecimals:s,tokenSymbol:o}=n||{};return e.createTypeUnsafe("ChainProperties",[{isEthereum:i,ss58Format:a,tokenDecimals:s,tokenSymbol:o}])}(this,e))}setSignedExtensions(e=Ri,t,n){if(this.__internal__signedExtensions=e,this.__internal__userExtensions=t,!n){const e=function(e,t={}){const n=[...Object.keys(Hi),...Object.keys(t)];return e.filter((e=>!n.includes(e)))}(this.__internal__signedExtensions,this.__internal__userExtensions);e.length&&Qp.warn(`Unknown signed extensions ${e.join(", ")} found, treating them as no-effect`)}}}const ih={},sh={AnchorData:{anchoredBlock:"u64",docRoot:"H256",id:"H256"},DispatchErrorModule:"DispatchErrorModuleU8",PreCommitData:{expirationBlock:"u64",identity:"H256",signingRoot:"H256"},Fee:{key:"Hash",price:"Balance"},MultiAccountData:{deposit:"Balance",depositor:"AccountId",signatories:"Vec",threshold:"u16"},ChainId:"u8",DepositNonce:"u64",ResourceId:"[u8; 32]","chainbridge::ChainId":"u8",RegistryId:"H160",TokenId:"U256",AssetId:{registryId:"RegistryId",tokenId:"TokenId"},AssetInfo:{metadata:"Bytes"},MintInfo:{anchorId:"Hash",proofs:"Vec",staticHashes:"[Hash; 3]"},Proof:{leafHash:"H256",sortedHashes:"H256"},ProofMint:{hashes:"Vec",property:"Bytes",salt:"[u8; 32]",value:"Bytes"},RegistryInfo:{fields:"Vec",ownerCanBurn:"bool"},ProxyType:{_enum:["Any","NonTransfer","Governance","Staking","NonProxy"]}},oh={...sh,AccountInfo:"AccountInfoWithRefCount",Address:"LookupSource",LookupSource:"IndicesLookupSource",Multiplier:"Fixed64",RefCount:"RefCountTo259"},ch={CompactAssignments:"CompactAssignmentsWith24",DispatchErrorModule:"DispatchErrorModuleU8",RawSolution:"RawSolutionWith24",Keys:"SessionKeys6",ProxyType:{_enum:["Any","NonTransfer","Governance","Staking","IdentityJudgement","CancelProxy","Auction"]},Weight:"WeightV1"},dh={AccountInfo:"AccountInfoWithRefCount",Address:"LookupSource",CompactAssignments:"CompactAssignmentsWith16",DispatchErrorModule:"DispatchErrorModuleU8",RawSolution:"RawSolutionWith16",Keys:"SessionKeys5",LookupSource:"IndicesLookupSource",ValidatorPrefs:"ValidatorPrefsWithCommission"},uh={AccountInfo:"AccountInfoWithRefCount",Address:"AccountId",CompactAssignments:"CompactAssignmentsWith16",DispatchErrorModule:"DispatchErrorModuleU8",RawSolution:"RawSolutionWith16",Keys:"SessionKeys5",LookupSource:"AccountId",ValidatorPrefs:"ValidatorPrefsWithCommission"},lh={CompactAssignments:"CompactAssignmentsWith16",DispatchErrorModule:"DispatchErrorModuleU8",RawSolution:"RawSolutionWith16",Keys:"SessionKeys6",ProxyType:{_enum:{Any:0,NonTransfer:1,Governance:2,Staking:3,UnusedSudoBalances:4,IdentityJudgement:5,CancelProxy:6,Auction:7}},Weight:"WeightV1"},fh={AccountInfo:"AccountInfoWithRefCount",Address:"AccountId",DispatchErrorModule:"DispatchErrorModuleU8",Keys:"SessionKeys5",LookupSource:"AccountId",ValidatorPrefs:"ValidatorPrefsWithCommission"},ph={DispatchErrorModule:"DispatchErrorModuleU8",FullIdentification:"()",Keys:"SessionKeys7B",Weight:"WeightV1"},hh={DispatchErrorModule:"DispatchErrorModuleU8",TAssetBalance:"u128",ProxyType:{_enum:["Any","NonTransfer","CancelProxy","Assets","AssetOwner","AssetManager","Staking"]},Weight:"WeightV1"},bh={DispatchErrorModule:"DispatchErrorModuleU8",TAssetBalance:"u128",ProxyType:{_enum:["Any","NonTransfer","CancelProxy","Assets","AssetOwner","AssetManager","Staking"]},Weight:"WeightV1"},mh={CompactAssignments:"CompactAssignmentsWith16",DispatchErrorModule:"DispatchErrorModuleU8",RawSolution:"RawSolutionWith16",Keys:"SessionKeys6",ProxyType:{_enum:["Any","NonTransfer","Staking","SudoBalances","IdentityJudgement","CancelProxy"]},Weight:"WeightV1"},yh={AccountInfo:"AccountInfoWithRefCount",Address:"AccountId",CompactAssignments:"CompactAssignmentsWith16",DispatchErrorModule:"DispatchErrorModuleU8",LookupSource:"AccountId",Keys:"SessionKeys5",RawSolution:"RawSolutionWith16",ValidatorPrefs:"ValidatorPrefsWithCommission"},xh={DispatchErrorModule:"DispatchErrorModuleU8",TAssetBalance:"u128",ProxyType:{_enum:["Any","NonTransfer","CancelProxy","Assets","AssetOwner","AssetManager","Staking"]},Weight:"WeightV1"},gh={"centrifuge-chain":[{minmax:[240,243],types:{...oh,ProxyType:{_enum:["Any","NonTransfer","Governance","Staking","Vesting"]}}},{minmax:[244,999],types:{...oh}},{minmax:[1e3,void 0],types:{...sh}}],kusama:[{minmax:[1019,1031],types:{...dh,BalanceLock:"BalanceLockTo212",CompactAssignments:"CompactAssignmentsTo257",DispatchError:"DispatchErrorTo198",DispatchInfo:"DispatchInfoTo244",Heartbeat:"HeartbeatTo244",IdentityInfo:"IdentityInfoTo198",Keys:"SessionKeys5",Multiplier:"Fixed64",OpenTip:"OpenTipTo225",RefCount:"RefCountTo259",ReferendumInfo:"ReferendumInfoTo239",Scheduled:"ScheduledTo254",SlashingSpans:"SlashingSpansTo204",StakingLedger:"StakingLedgerTo223",Votes:"VotesTo230",Weight:"u32"}},{minmax:[1032,1042],types:{...dh,BalanceLock:"BalanceLockTo212",CompactAssignments:"CompactAssignmentsTo257",DispatchInfo:"DispatchInfoTo244",Heartbeat:"HeartbeatTo244",Keys:"SessionKeys5",Multiplier:"Fixed64",OpenTip:"OpenTipTo225",RefCount:"RefCountTo259",ReferendumInfo:"ReferendumInfoTo239",Scheduled:"ScheduledTo254",SlashingSpans:"SlashingSpansTo204",StakingLedger:"StakingLedgerTo223",Votes:"VotesTo230",Weight:"u32"}},{minmax:[1043,1045],types:{...dh,BalanceLock:"BalanceLockTo212",CompactAssignments:"CompactAssignmentsTo257",DispatchInfo:"DispatchInfoTo244",Heartbeat:"HeartbeatTo244",Keys:"SessionKeys5",Multiplier:"Fixed64",OpenTip:"OpenTipTo225",RefCount:"RefCountTo259",ReferendumInfo:"ReferendumInfoTo239",Scheduled:"ScheduledTo254",StakingLedger:"StakingLedgerTo223",Votes:"VotesTo230",Weight:"u32"}},{minmax:[1046,1049],types:{...ch,...uh,CompactAssignments:"CompactAssignmentsTo257",DispatchInfo:"DispatchInfoTo244",Heartbeat:"HeartbeatTo244",Multiplier:"Fixed64",OpenTip:"OpenTipTo225",RefCount:"RefCountTo259",ReferendumInfo:"ReferendumInfoTo239",Scheduled:"ScheduledTo254",StakingLedger:"StakingLedgerTo223",Weight:"u32"}},{minmax:[1050,1054],types:{...ch,...uh,CompactAssignments:"CompactAssignmentsTo257",DispatchInfo:"DispatchInfoTo244",Heartbeat:"HeartbeatTo244",Multiplier:"Fixed64",OpenTip:"OpenTipTo225",RefCount:"RefCountTo259",ReferendumInfo:"ReferendumInfoTo239",Scheduled:"ScheduledTo254",StakingLedger:"StakingLedgerTo240",Weight:"u32"}},{minmax:[1055,1056],types:{...ch,...uh,CompactAssignments:"CompactAssignmentsTo257",DispatchInfo:"DispatchInfoTo244",Heartbeat:"HeartbeatTo244",Multiplier:"Fixed64",OpenTip:"OpenTipTo225",RefCount:"RefCountTo259",Scheduled:"ScheduledTo254",StakingLedger:"StakingLedgerTo240",Weight:"u32"}},{minmax:[1057,1061],types:{...ch,...uh,CompactAssignments:"CompactAssignmentsTo257",DispatchInfo:"DispatchInfoTo244",Heartbeat:"HeartbeatTo244",OpenTip:"OpenTipTo225",RefCount:"RefCountTo259",Scheduled:"ScheduledTo254"}},{minmax:[1062,2012],types:{...ch,...uh,CompactAssignments:"CompactAssignmentsTo257",OpenTip:"OpenTipTo225",RefCount:"RefCountTo259"}},{minmax:[2013,2022],types:{...ch,...uh,CompactAssignments:"CompactAssignmentsTo257",RefCount:"RefCountTo259"}},{minmax:[2023,2024],types:{...ch,...uh,RefCount:"RefCountTo259"}},{minmax:[2025,2027],types:{...ch,...uh}},{minmax:[2028,2029],types:{...ch,AccountInfo:"AccountInfoWithDualRefCount",CompactAssignments:"CompactAssignmentsWith16",RawSolution:"RawSolutionWith16"}},{minmax:[2030,9e3],types:{...ch,CompactAssignments:"CompactAssignmentsWith16",RawSolution:"RawSolutionWith16"}},{minmax:[9010,9099],types:{...ch,...af("V0")}},{minmax:[9100,9105],types:{...ch,...af("V1")}},{minmax:[9106,void 0],types:{Weight:"WeightV1"}}],node:[{minmax:[0,void 0],types:{Weight:"WeightV2"}}],"node-template":[{minmax:[0,void 0],types:{Weight:"WeightV2"}}],polkadot:[{minmax:[0,12],types:{...lh,...fh,CompactAssignments:"CompactAssignmentsTo257",OpenTip:"OpenTipTo225",RefCount:"RefCountTo259"}},{minmax:[13,22],types:{...lh,...fh,CompactAssignments:"CompactAssignmentsTo257",RefCount:"RefCountTo259"}},{minmax:[23,24],types:{...lh,...fh,RefCount:"RefCountTo259"}},{minmax:[25,27],types:{...lh,...fh}},{minmax:[28,29],types:{...lh,AccountInfo:"AccountInfoWithDualRefCount"}},{minmax:[30,9109],types:{...lh}},{minmax:[9110,void 0],types:{Weight:"WeightV1"}}],rococo:[{minmax:[0,200],types:{...ph,AccountInfo:"AccountInfoWithDualRefCount",Address:"AccountId",LookupSource:"AccountId"}},{minmax:[201,214],types:{...ph,AccountInfo:"AccountInfoWithDualRefCount"}},{minmax:[215,228],types:{...ph,Keys:"SessionKeys6"}},{minmax:[229,9099],types:{...ph,...af("V0")}},{minmax:[9100,9105],types:{...ph,...af("V1")}},{minmax:[9106,void 0],types:{Weight:"WeightV1"}}],shell:[{minmax:[0,void 0],types:{}}],statemine:[{minmax:[0,3],types:{DispatchError:"DispatchErrorPre6First",...hh,...af("V0")}},{minmax:[4,5],types:{DispatchError:"DispatchErrorPre6First",...hh,...af("V1")}},{minmax:[500,9999],types:{Weight:"WeightV1",TAssetConversion:"Option"}},{minmax:[1e4,void 0],types:{Weight:"WeightV1"}}],statemint:[{minmax:[0,3],types:{DispatchError:"DispatchErrorPre6First",...bh,...af("V0")}},{minmax:[4,5],types:{DispatchError:"DispatchErrorPre6First",...bh,...af("V1")}},{minmax:[500,1001003],types:{Weight:"WeightV1",TAssetConversion:"Option"}},{minmax:[1002e3,void 0],types:{Weight:"WeightV1"}}],westend:[{minmax:[1,2],types:{...mh,...yh,CompactAssignments:"CompactAssignmentsTo257",DispatchInfo:"DispatchInfoTo244",Heartbeat:"HeartbeatTo244",Multiplier:"Fixed64",OpenTip:"OpenTipTo225",RefCount:"RefCountTo259",Weight:"u32"}},{minmax:[3,22],types:{...mh,...yh,CompactAssignments:"CompactAssignmentsTo257",DispatchInfo:"DispatchInfoTo244",Heartbeat:"HeartbeatTo244",OpenTip:"OpenTipTo225",RefCount:"RefCountTo259"}},{minmax:[23,42],types:{...mh,...yh,CompactAssignments:"CompactAssignmentsTo257",DispatchInfo:"DispatchInfoTo244",Heartbeat:"HeartbeatTo244",RefCount:"RefCountTo259"}},{minmax:[43,44],types:{...mh,...yh,DispatchInfo:"DispatchInfoTo244",Heartbeat:"HeartbeatTo244",RefCount:"RefCountTo259"}},{minmax:[45,47],types:{...mh,...yh}},{minmax:[48,49],types:{...mh,AccountInfo:"AccountInfoWithDualRefCount"}},{minmax:[50,9099],types:{...mh,...af("V0")}},{minmax:[9100,9105],types:{...mh,...af("V1")}},{minmax:[9106,void 0],types:{Weight:"WeightV1"}}],westmint:[{minmax:[0,3],types:{DispatchError:"DispatchErrorPre6First",...xh,...af("V0")}},{minmax:[4,5],types:{DispatchError:"DispatchErrorPre6First",...xh,...af("V1")}},{minmax:[500,9434],types:{Weight:"WeightV1",TAssetConversion:"Option"}},{minmax:[9435,void 0],types:{Weight:"WeightV1"}}]},vh=[[0,1020,[["0xdf6acb689907609b",2],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",1],["0xf78b278be53f454c",1],["0xaf2c0297a23e6d3d",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",1],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[26669,1021,[["0xdf6acb689907609b",2],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",1],["0xf78b278be53f454c",1],["0xaf2c0297a23e6d3d",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",1],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[38245,1022,[["0xdf6acb689907609b",2],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",1],["0xf78b278be53f454c",1],["0xaf2c0297a23e6d3d",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",1],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[54248,1023,[["0xdf6acb689907609b",2],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",1],["0xf78b278be53f454c",1],["0xaf2c0297a23e6d3d",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",1],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[59659,1024,[["0xdf6acb689907609b",2],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",1],["0xf78b278be53f454c",1],["0xaf2c0297a23e6d3d",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",1],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[67651,1025,[["0xdf6acb689907609b",2],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",1],["0xf78b278be53f454c",1],["0xaf2c0297a23e6d3d",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",1],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[82191,1027,[["0xdf6acb689907609b",2],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",1],["0xf78b278be53f454c",1],["0xaf2c0297a23e6d3d",2],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",1],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[83238,1028,[["0xdf6acb689907609b",2],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",1],["0xf78b278be53f454c",1],["0xaf2c0297a23e6d3d",2],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",1],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[101503,1029,[["0xdf6acb689907609b",2],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",1],["0xf78b278be53f454c",1],["0xaf2c0297a23e6d3d",2],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",1],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[203466,1030,[["0xdf6acb689907609b",2],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",1],["0xf78b278be53f454c",1],["0xaf2c0297a23e6d3d",2],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",1],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[295787,1031,[["0xdf6acb689907609b",2],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",1],["0xf78b278be53f454c",1],["0xaf2c0297a23e6d3d",2],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",1],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[461692,1032,[["0xdf6acb689907609b",2],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",1],["0xf78b278be53f454c",1],["0xaf2c0297a23e6d3d",2],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",1],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[504329,1033,[["0xdf6acb689907609b",2],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",1],["0xf78b278be53f454c",1],["0xaf2c0297a23e6d3d",2],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",1],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[569327,1038,[["0xdf6acb689907609b",2],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",1],["0xf78b278be53f454c",1],["0xaf2c0297a23e6d3d",2],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",1],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[587687,1039,[["0xdf6acb689907609b",2],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",1],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",1],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[653183,1040,[["0xdf6acb689907609b",2],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",1],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",1],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[693488,1042,[["0xdf6acb689907609b",2],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",1],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",1],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[901442,1045,[["0xdf6acb689907609b",2],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",1],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",1],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[1375086,1050,[["0xdf6acb689907609b",2],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",1],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",1],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[1445458,1051,[["0xdf6acb689907609b",2],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",1],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",1],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[1472960,1052,[["0xdf6acb689907609b",2],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",1],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",1],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[1475648,1053,[["0xdf6acb689907609b",2],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",1],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",1],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[1491596,1054,[["0xdf6acb689907609b",2],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",1],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",1],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[1574408,1055,[["0xdf6acb689907609b",2],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",1],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",1],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[2064961,1058,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",1],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[2201991,1062,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[2671528,2005,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[2704202,2007,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[2728002,2008,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[2832534,2011,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[2962294,2012,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[324e4,2013,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[3274408,2015,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[3323565,2019,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[3534175,2022,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[3860281,2023,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[4143129,2024,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[4401242,2025,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[4841367,2026,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[5961600,2027,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[6137912,2028,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[6561855,2029,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[7100891,2030,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[7468792,9010,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[7668600,9030,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[7812476,9040,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[8010981,9050,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[8073833,9070,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[8555825,9080,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[8945245,9090,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[9611377,9100,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[9625129,9111,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[9866422,9122,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[10403784,9130,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[10960765,9150,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[11006614,9151,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[11404482,9160,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[11601803,9170,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[12008022,9180,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[12405451,9190,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[12665416,9200,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[12909508,9220,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[13109752,9230,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[13555777,9250,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[13727747,9260,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[14248044,9271,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1],["0x17a6bc0d0062aeb3",1]]],[14433840,9280,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1],["0xf3ff14d5ab527059",1],["0x17a6bc0d0062aeb3",1]]],[14645900,9291,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1],["0xf3ff14d5ab527059",1],["0x17a6bc0d0062aeb3",1]]],[15048375,9300,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1],["0xf3ff14d5ab527059",1],["0x17a6bc0d0062aeb3",1]]],[15426015,9320,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",2],["0xf3ff14d5ab527059",2],["0x17a6bc0d0062aeb3",1]]],[15680713,9340,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",2],["0xf3ff14d5ab527059",2],["0x17a6bc0d0062aeb3",1]]],[15756296,9350,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",2],["0xf3ff14d5ab527059",2],["0x17a6bc0d0062aeb3",1]]],[15912007,9360,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",2],["0xf3ff14d5ab527059",2],["0x17a6bc0d0062aeb3",1]]],[16356547,9370,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",2],["0xf3ff14d5ab527059",2],["0x17a6bc0d0062aeb3",1]]],[17335450,9381,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",3],["0xf3ff14d5ab527059",3],["0x17a6bc0d0062aeb3",1]]],[18062739,9420,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",4],["0x49eaaf1b548a0cb0",2],["0x91d5df18b0d2cf58",2],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1]]],[18625e3,9430,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",4],["0x49eaaf1b548a0cb0",2],["0x91d5df18b0d2cf58",2],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1]]],[20465806,1e6,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",5],["0x49eaaf1b548a0cb0",3],["0x91d5df18b0d2cf58",2],["0x2a5e924655399e60",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1]]],[2157e4,1001e3,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",7],["0x49eaaf1b548a0cb0",3],["0x91d5df18b0d2cf58",2],["0x2a5e924655399e60",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1],["0xfbc577b9d747efd6",1]]],[21786291,1001002,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",7],["0x49eaaf1b548a0cb0",3],["0x91d5df18b0d2cf58",2],["0x2a5e924655399e60",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1],["0xfbc577b9d747efd6",1]]],[22515962,1001003,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",7],["0x49eaaf1b548a0cb0",3],["0x91d5df18b0d2cf58",2],["0x2a5e924655399e60",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1],["0xfbc577b9d747efd6",1]]],[2279e4,1002e3,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",10],["0x49eaaf1b548a0cb0",3],["0x91d5df18b0d2cf58",2],["0x2a5e924655399e60",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1],["0xfbc577b9d747efd6",1]]],[23176015,1002001,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",10],["0x49eaaf1b548a0cb0",3],["0x91d5df18b0d2cf58",2],["0x2a5e924655399e60",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1],["0xfbc577b9d747efd6",1]]],[23450253,1002004,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",10],["0x49eaaf1b548a0cb0",3],["0x91d5df18b0d2cf58",2],["0x2a5e924655399e60",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1],["0xfbc577b9d747efd6",1]]],[23565293,1002005,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",10],["0x49eaaf1b548a0cb0",3],["0x91d5df18b0d2cf58",2],["0x2a5e924655399e60",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1],["0xfbc577b9d747efd6",1]]],[23780224,1002006,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",10],["0x49eaaf1b548a0cb0",3],["0x91d5df18b0d2cf58",2],["0x2a5e924655399e60",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1],["0xfbc577b9d747efd6",1]]],[24786390,1003e3,[["0xc51ff1fa3f5d0cca",1],["0xdf6acb689907609b",5],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",11],["0x49eaaf1b548a0cb0",3],["0x91d5df18b0d2cf58",2],["0x2a5e924655399e60",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3],["0x6ff52ee858e6c5bd",1],["0x91b1c8b16328eb92",1],["0x9ffb505aa738d69c",1],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1],["0xfbc577b9d747efd6",1]]]],wh=[[0,0,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[29231,1,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[188836,5,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[199405,6,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[214264,7,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[244358,8,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[303079,9,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[314201,10,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[342400,11,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[443963,12,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[528470,13,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[687751,14,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[746085,15,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[787923,16,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[799302,17,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[1205128,18,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[1603423,23,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[1733218,24,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[2005673,25,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[2436698,26,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[3613564,27,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[3899547,28,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[4345767,29,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[4876134,30,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[5661442,9050,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[6321619,9080,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[6713249,9090,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[7217907,9100,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[7229126,9110,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[7560558,9122,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[8115869,9140,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[8638103,9151,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[9280179,9170,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[9738717,9180,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[10156856,9190,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[10458576,9200,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[10655116,9220,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[10879371,9230,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[11328884,9250,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[11532856,9260,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[11933818,9270,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[12217535,9280,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1],["0xf3ff14d5ab527059",1]]],[12245277,9281,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1],["0xf3ff14d5ab527059",1]]],[12532644,9291,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0x17a6bc0d0062aeb3",1],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1],["0xf3ff14d5ab527059",1]]],[12876189,9300,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0x17a6bc0d0062aeb3",1],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1],["0xf3ff14d5ab527059",1]]],[13800015,9340,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0x17a6bc0d0062aeb3",1],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",2],["0xf3ff14d5ab527059",2]]],[14188833,9360,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0x17a6bc0d0062aeb3",1],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",2],["0xf3ff14d5ab527059",2]]],[14543918,9370,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0x17a6bc0d0062aeb3",1],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",2],["0xf3ff14d5ab527059",2]]],[15978362,9420,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",4],["0x49eaaf1b548a0cb0",2],["0x91d5df18b0d2cf58",2],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3]]],[1645e4,9430,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",4],["0x49eaaf1b548a0cb0",2],["0x91d5df18b0d2cf58",2],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3]]],[1784e4,9431,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",4],["0x49eaaf1b548a0cb0",2],["0x91d5df18b0d2cf58",2],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3]]],[18407475,1000001,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",5],["0x49eaaf1b548a0cb0",3],["0x91d5df18b0d2cf58",2],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3]]],[19551e3,1001002,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",5],["0x49eaaf1b548a0cb0",3],["0x91d5df18b0d2cf58",2],["0x2a5e924655399e60",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3],["0xfbc577b9d747efd6",1]]],[20181758,1001003,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",5],["0x49eaaf1b548a0cb0",3],["0x91d5df18b0d2cf58",2],["0x2a5e924655399e60",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3],["0xfbc577b9d747efd6",1]]],[20438530,1002e3,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",10],["0x49eaaf1b548a0cb0",3],["0x91d5df18b0d2cf58",2],["0x2a5e924655399e60",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3],["0xfbc577b9d747efd6",1]]],[21169168,1002004,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",10],["0x49eaaf1b548a0cb0",3],["0x91d5df18b0d2cf58",2],["0x2a5e924655399e60",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3],["0xfbc577b9d747efd6",1]]],[21455374,1002005,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",10],["0x49eaaf1b548a0cb0",3],["0x91d5df18b0d2cf58",2],["0x2a5e924655399e60",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3],["0xfbc577b9d747efd6",1]]],[21558004,1002006,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",10],["0x49eaaf1b548a0cb0",3],["0x91d5df18b0d2cf58",2],["0x2a5e924655399e60",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3],["0xfbc577b9d747efd6",1]]],[21800141,1002007,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",10],["0x49eaaf1b548a0cb0",3],["0x91d5df18b0d2cf58",2],["0x2a5e924655399e60",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3],["0xfbc577b9d747efd6",1]]]],Vh=[[214356,4,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",1],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[392764,7,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[409740,8,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[809976,20,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[877581,24,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[879238,25,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[889472,26,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[902937,27,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[932751,28,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[991142,29,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[1030162,31,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[1119657,32,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[1199282,33,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[1342534,34,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[1392263,35,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[1431703,36,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[1433369,37,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[1490972,41,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[2087397,43,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[2316688,44,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[2549864,45,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[3925782,46,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[3925843,47,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[4207800,48,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[4627944,49,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[5124076,50,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[5478664,900,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[5482450,9e3,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",4],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[5584305,9010,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[5784566,9030,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[5879822,9031,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[5896856,9032,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[5897316,9033,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[6117927,9050,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[6210274,9070,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",2],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[6379314,9080,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",2],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[6979141,9090,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[7568453,9100,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[7766394,9111,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[7911691,9120,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[7968866,9121,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[7982889,9122,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[8514322,9130,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[9091726,9140,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[9091774,9150,[["0xdf6acb689907609b",3],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",1],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[9406726,9160,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[9921066,9170,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[10007115,9180,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",5],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[10480973,9190,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[10578091,9200,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[10678509,9210,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[10811001,9220,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[11096116,9230,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[11409279,9250,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[11584820,9251,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[11716837,9260,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[11876919,9261,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1]]],[11987927,9270,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1],["0x17a6bc0d0062aeb3",1]]],[12077324,9271,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1],["0x17a6bc0d0062aeb3",1]]],[12301871,9280,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1],["0xf3ff14d5ab527059",1],["0x17a6bc0d0062aeb3",1]]],[12604343,9290,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",2],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1],["0xf3ff14d5ab527059",1],["0x17a6bc0d0062aeb3",1]]],[12841034,9300,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1],["0xf3ff14d5ab527059",1],["0x17a6bc0d0062aeb3",1]]],[13128237,9310,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",1],["0xf3ff14d5ab527059",1],["0x17a6bc0d0062aeb3",1]]],[13272363,9320,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",2],["0xf3ff14d5ab527059",2],["0x17a6bc0d0062aeb3",1]]],[13483497,9330,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",2],["0xf3ff14d5ab527059",2],["0x17a6bc0d0062aeb3",1]]],[13649433,9340,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",2],["0xf3ff14d5ab527059",2],["0x17a6bc0d0062aeb3",1]]],[13761100,9350,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",2],["0xf3ff14d5ab527059",2],["0x17a6bc0d0062aeb3",1]]],[13847400,9360,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",2],["0xf3ff14d5ab527059",2],["0x17a6bc0d0062aeb3",1]]],[14249200,9370,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",2],["0xf3ff14d5ab527059",2],["0x17a6bc0d0062aeb3",1]]],[14576855,9380,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",3],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",3],["0xf3ff14d5ab527059",3],["0x17a6bc0d0062aeb3",1]]],[14849830,9390,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",4],["0x49eaaf1b548a0cb0",1],["0x91d5df18b0d2cf58",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",3],["0xf3ff14d5ab527059",3],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1]]],[15146832,9400,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",4],["0x49eaaf1b548a0cb0",2],["0x91d5df18b0d2cf58",2],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",3],["0xf3ff14d5ab527059",3],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1]]],[15332317,9401,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",1],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",4],["0x49eaaf1b548a0cb0",2],["0x91d5df18b0d2cf58",2],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",3],["0xf3ff14d5ab527059",3],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1]]],[15661793,9420,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",4],["0x49eaaf1b548a0cb0",2],["0x91d5df18b0d2cf58",2],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1]]],[16165469,9430,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",4],["0x49eaaf1b548a0cb0",2],["0x91d5df18b0d2cf58",2],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1]]],[18293984,102e3,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",7],["0x49eaaf1b548a0cb0",3],["0x91d5df18b0d2cf58",2],["0x2a5e924655399e60",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1],["0xfbc577b9d747efd6",1]]],[18293991,103e3,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",8],["0x49eaaf1b548a0cb0",3],["0x91d5df18b0d2cf58",2],["0x2a5e924655399e60",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1],["0xfbc577b9d747efd6",1]]],[18451783,104e3,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",9],["0x49eaaf1b548a0cb0",3],["0x91d5df18b0d2cf58",2],["0x2a5e924655399e60",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1],["0xfbc577b9d747efd6",1]]],[18679741,1005e3,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",9],["0x49eaaf1b548a0cb0",3],["0x91d5df18b0d2cf58",2],["0x2a5e924655399e60",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1],["0xfbc577b9d747efd6",1]]],[19166695,1006e3,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",10],["0x49eaaf1b548a0cb0",3],["0x91d5df18b0d2cf58",2],["0x2a5e924655399e60",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1],["0xfbc577b9d747efd6",1]]],[19234157,1006001,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",10],["0x49eaaf1b548a0cb0",3],["0x91d5df18b0d2cf58",2],["0x2a5e924655399e60",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1],["0xfbc577b9d747efd6",1]]],[19542944,1007e3,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",10],["0x49eaaf1b548a0cb0",3],["0x91d5df18b0d2cf58",2],["0x2a5e924655399e60",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1],["0xfbc577b9d747efd6",1]]],[19621258,1007001,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",10],["0x49eaaf1b548a0cb0",3],["0x91d5df18b0d2cf58",2],["0x2a5e924655399e60",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1],["0xfbc577b9d747efd6",1]]],[19761406,1008e3,[["0xdf6acb689907609b",4],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",10],["0x49eaaf1b548a0cb0",3],["0x91d5df18b0d2cf58",2],["0x2a5e924655399e60",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1],["0xfbc577b9d747efd6",1]]],[20056997,1009e3,[["0xdf6acb689907609b",5],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",10],["0x49eaaf1b548a0cb0",3],["0x91d5df18b0d2cf58",2],["0x2a5e924655399e60",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1],["0xfbc577b9d747efd6",1]]],[20368318,101e4,[["0xdf6acb689907609b",5],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",10],["0x49eaaf1b548a0cb0",3],["0x91d5df18b0d2cf58",2],["0x2a5e924655399e60",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3],["0x6ff52ee858e6c5bd",1],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1],["0xfbc577b9d747efd6",1]]],[20649086,1011e3,[["0xdf6acb689907609b",5],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",11],["0x49eaaf1b548a0cb0",3],["0x91d5df18b0d2cf58",2],["0x2a5e924655399e60",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3],["0x6ff52ee858e6c5bd",1],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1],["0xfbc577b9d747efd6",1]]],[21217837,1011001,[["0xdf6acb689907609b",5],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",11],["0x49eaaf1b548a0cb0",3],["0x91d5df18b0d2cf58",2],["0x2a5e924655399e60",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3],["0x6ff52ee858e6c5bd",1],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1],["0xfbc577b9d747efd6",1]]],[21300429,1013e3,[["0xdf6acb689907609b",5],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",11],["0x49eaaf1b548a0cb0",3],["0x91d5df18b0d2cf58",2],["0x2a5e924655399e60",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3],["0x6ff52ee858e6c5bd",1],["0x91b1c8b16328eb92",1],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1],["0xfbc577b9d747efd6",1]]],[21460051,1014e3,[["0xdf6acb689907609b",5],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",11],["0x49eaaf1b548a0cb0",3],["0x91d5df18b0d2cf58",2],["0x2a5e924655399e60",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3],["0x6ff52ee858e6c5bd",1],["0x91b1c8b16328eb92",1],["0x9ffb505aa738d69c",1],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1],["0xfbc577b9d747efd6",1]]],[21925427,1015e3,[["0xdf6acb689907609b",5],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xaf2c0297a23e6d3d",11],["0x49eaaf1b548a0cb0",4],["0x91d5df18b0d2cf58",2],["0x2a5e924655399e60",1],["0xed99c5acb25eedf5",3],["0xcbca25e39f142387",2],["0x687ad44ad37f03c2",1],["0xab3c0572291feb8b",1],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3],["0x6ff52ee858e6c5bd",1],["0x91b1c8b16328eb92",1],["0x9ffb505aa738d69c",1],["0x17a6bc0d0062aeb3",1],["0x18ef58a3b67ba770",1],["0xfbc577b9d747efd6",1]]]],Th={westend:{genesisHash:["0xe143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e"]}};const Sh=Object.entries(s).map((function([e,t]){const n=uo.find((t=>t.network===e))||Th[e];if(!n)throw new Error(`Unable to find info for chain ${e}`);return{genesisHash:(0,ts.V)(n.genesisHash[0]),network:e,versions:t.map((([e,t,n])=>({apis:n,blockNumber:new st(e),specVersion:new st(t)})))}}));function kh(e,t,n){return n(e.toString(),t.toString())}function _h(e=[],t){return e.filter((({minmax:[e,n]})=>(null==e||t>=e)&&(null==n||t<=n))).reduce(((e,{types:t})=>({...e,...t})),{})}function Ph({knownTypes:e},t,n){return kh(t,n,((t,n)=>({...e.typesBundle?.spec?.[n]?.rpc??{},...e.typesBundle?.chain?.[t]?.rpc??{}})))}var Mh=R((function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),Ih=function(e){function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return(0,L.__extends)(t,e),t.prototype.lift=function(e){var t=new Nh(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new Mh},t.prototype.next=function(e){var t=this;$((function(){var n,r;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var a=(0,L.__values)(t.currentObservers),i=a.next();!i.done;i=a.next()){i.value.next(e)}}catch(s){n={error:s}}finally{try{i&&!i.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}}}))},t.prototype.error=function(e){var t=this;$((function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var n=t.observers;n.length;)n.shift().error(e)}}))},t.prototype.complete=function(){var e=this;$((function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}}))},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return(null===(e=this.observers)||void 0===e?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,n=this,r=n.hasError,a=n.isStopped,i=n.observers;return r||a?j:(this.currentObservers=null,i.push(e),new q((function(){t.currentObservers=null,D(i,e)})))},t.prototype._checkFinalizedStatuses=function(e){var t=this,n=t.hasError,r=t.thrownError,a=t.isStopped;n?e.error(r):a&&e.complete()},t.prototype.asObservable=function(){var e=new he;return e.source=this,e},t.create=function(e,t){return new Nh(e,t)},t}(he),Nh=function(e){function t(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return(0,L.__extends)(t,e),t.prototype.next=function(e){var t,n;null===(n=null===(t=this.destination)||void 0===t?void 0:t.next)||void 0===n||n.call(t,e)},t.prototype.error=function(e){var t,n;null===(n=null===(t=this.destination)||void 0===t?void 0:t.error)||void 0===n||n.call(t,e)},t.prototype.complete=function(){var e,t;null===(t=null===(e=this.destination)||void 0===e?void 0:e.complete)||void 0===t||t.call(e)},t.prototype._subscribe=function(e){var t,n;return null!==(n=null===(t=this.source)||void 0===t?void 0:t.subscribe(e))&&void 0!==n?n:j},t}(Ih),Eh=function(e){function t(t){var n=e.call(this)||this;return n._value=t,n}return(0,L.__extends)(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(t){var n=e.prototype._subscribe.call(this,t);return!n.closed&&t.next(this._value),n},t.prototype.getValue=function(){var e=this,t=e.hasError,n=e.thrownError,r=e._value;if(t)throw n;return this._throwIfClosed(),r},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(Ih),Oh=Array.isArray,Ah=Object.getPrototypeOf,Ch=Object.prototype,Hh=Object.keys;function Rh(e){if(1===e.length){var t=e[0];if(Oh(t))return{args:t,keys:null};if((r=t)&&"object"==typeof r&&Ah(r)===Ch){var n=Hh(t);return{args:n.map((function(e){return t[e]})),keys:n}}}var r;return{args:e,keys:null}}var Bh=Array.isArray;function Lh(e){return ze((function(t){return function(e,t){return Bh(t)?e.apply(void 0,(0,L.__spreadArray)([],(0,L.__read)(t))):e(t)}(e,t)}))}function zh(){for(var e=[],t=0;t=2,!1,!0))}var jh=function(e,t){return e.push(t),e};function Fh(){return _e((function(e,t){qh(jh,[])(e).subscribe(t)}))}function Xh(e,t,n,r){Qr(e,t,(()=>$r({},n(t),(e=>r(t,e)))))}function Wh(){return"none"}function Zh(e,{getInstanceId:t=Wh}={}){const n={},r=(...r)=>{const a=(0,je.A)(r),i=t();return n[i]||(n[i]={}),void 0===n[i][a]&&(n[i][a]=e(...r)),n[i][a]};return r.unmemoize=(...e)=>{const r=(0,je.A)(e),a=t();void 0!==n[a]?.[r]&&delete n[a][r]},r}function Gh(e){return _e((function(t,n){var r,a=null,i=!1;a=t.subscribe(Pe(n,void 0,void 0,(function(s){r=Te(e(s,Gh(e)(t))),a?(a.unsubscribe(),a=null,r.subscribe(n)):i=!0}))),i&&(a.unsubscribe(),a=null,r.subscribe(n))}))}function Kh(e,t){return e===t}var Jh={now:function(){return(Jh.delegate||Date).now()},delegate:void 0},Yh=function(e){function t(t,n,r){void 0===t&&(t=1/0),void 0===n&&(n=1/0),void 0===r&&(r=Jh);var a=e.call(this)||this;return a._bufferSize=t,a._windowTime=n,a._timestampProvider=r,a._buffer=[],a._infiniteTimeWindow=!0,a._infiniteTimeWindow=n===1/0,a._bufferSize=Math.max(1,t),a._windowTime=Math.max(1,n),a}return(0,L.__extends)(t,e),t.prototype.next=function(t){var n=this,r=n.isStopped,a=n._buffer,i=n._infiniteTimeWindow,s=n._timestampProvider,o=n._windowTime;r||(a.push(t),!i&&a.push(s.now()+o)),this._trimBuffer(),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var t=this._innerSubscribe(e),n=this._infiniteTimeWindow,r=this._buffer.slice(),a=0;a0?e.prototype.requestAsyncId.call(this,t,n,r):(t.actions.push(this),t._scheduled||(t._scheduled=fb.setImmediate(t.flush.bind(t,void 0))))},t.prototype.recycleAsyncId=function(t,n,r){var a;if(void 0===r&&(r=0),null!=r?r>0:this.delay>0)return e.prototype.recycleAsyncId.call(this,t,n,r);var i=t.actions;null!=n&&(null===(a=i[i.length-1])||void 0===a?void 0:a.id)!==n&&(fb.clearImmediate(n),t._scheduled===n&&(t._scheduled=void 0))},t}(sb),hb=function(){function e(t,n){void 0===n&&(n=e.now),this.schedulerActionCtor=t,this.now=n}return e.prototype.schedule=function(e,t,n){return void 0===t&&(t=0),new this.schedulerActionCtor(this,e).schedule(n,t)},e.now=Jh.now,e}(),bb=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,L.__extends)(t,e),t.prototype.flush=function(e){this._active=!0;var t=this._scheduled;this._scheduled=void 0;var n,r=this.actions;e=e||r.shift();do{if(n=e.execute(e.state,e.delay))break}while((e=r[0])&&e.id===t&&r.shift());if(this._active=!1,n){for(;(e=r[0])&&e.id===t&&r.shift();)e.unsubscribe();throw n}},t}(function(e){function t(t,n){void 0===n&&(n=hb.now);var r=e.call(this,t,n)||this;return r.actions=[],r._active=!1,r}return(0,L.__extends)(t,e),t.prototype.flush=function(e){var t=this.actions;if(this._active)t.push(e);else{var n;this._active=!0;do{if(n=e.execute(e.state,e.delay))break}while(e=t.shift());if(this._active=!1,n){for(;e=t.shift();)e.unsubscribe();throw n}}},t}(hb)))(pb);function mb(e=1750){return t=>{let[n,r,a,i]=[0,0,q.EMPTY,q.EMPTY];return new he((s=>(t.subscribe(s),0==r++&&(1===n?i.unsubscribe():a=t.connect(),n=3),()=>{0==--r&&(2===n?(n=0,i.unsubscribe()):(n=1,i=bb.schedule((()=>{n=0,a.unsubscribe()}),e)))})))}}function yb(e,t){return(0,je.A)({t:e})===(0,je.A)({t:t})}function xb(e){throw e}function gb(){}function vb({delay:e,skipChange:t=!1,skipTimeout:n=!1}={}){return r=>{return r.pipe(Gh(xb),t?Dh(gb):(void 0===i&&(i=fe),a=null!=(a=yb)?a:Kh,_e((function(e,t){var n,r=!0;e.subscribe(Pe(t,(function(e){var s=i(e);!r&&a(n,s)||(r=!1,n=s,t.next(e))})))}))),nb(1),n?Qh():mb(e));var a,i}}function wb(e,t){const n=Zh(((...e)=>new he((r=>{const a=t(...e).subscribe(r);return()=>{n.unmemoize(...e),a.unsubscribe()}})).pipe(vb())),{getInstanceId:()=>e});return n}function Vb(e,t){return wb(e,(e=>{const n=(0,ut.b)(e)?e:fo((e||"").toString());if(n.length>8)return Le(t.registry.createType(20===n.length?"AccountId20":"AccountId",n));const r=t.registry.createType("AccountIndex",n);return t.derive.accounts.indexToId(r.toString()).pipe(ze((e=>ea(e,"Unable to retrieve accountId"))))}))}function Tb(e,t){return wb(e,(()=>{const e=[void 0,[],[],[],void 0],n=[(t.query.elections||t.query.phragmenElection||t.query.electionsPhragmen)?.members,t.query.council?.members,t.query.technicalCommittee?.members,t.query.society?.members,t.query.sudo?.key],r=n.filter((e=>e));return r.length?t.queryMulti(r).pipe(ze((t=>{let r=-1;for(let a=0,i=n.length;at.derive.accounts._flags().pipe(ze((t=>function(e,[t,n,r,a,i]){const s=e?.toString(),o=e=>e.toString()===s;return{isCouncil:(t?.map((e=>Array.isArray(e)?e[0]:e.who))||n||[]).some(o),isSociety:(a||[]).some(o),isSudo:i?.toString()===s,isTechCommittee:(r||[]).some(o)}}(e,t))))))}function kb(e,t){return wb(e,(e=>{try{const n=(0,ut.b)(e)?e:fo((e||"").toString());if(n.length>8){const e=t.registry.createType(20===n.length?"AccountId20":"AccountId",n);return t.derive.accounts.idToIndex(e).pipe(ze((t=>[e,t])))}const r=t.registry.createType("AccountIndex",n);return t.derive.accounts.indexToId(r.toString()).pipe(ze((e=>[e,r])))}catch{return Le([void 0,void 0])}}))}function _b(e){return e.pipe(ze((([e])=>e)))}function Pb(e){return(t,n)=>wb(t,((...t)=>_b(e(n,...t))))}const Mb={toHex:()=>{}};function Ib(e){return e?e.isRaw?nt(e.asRaw.toU8a(!0)):e.isNone?void 0:e.toHex():e}function Nb(e){const t=e.unwrap();return Array.isArray(t)?t[0]:t}function Eb(e,t){return wb(e,(e=>e&&t.query.identity?.identityOf?zh([t.query.identity.identityOf(e),t.query.identity.superOf(e)]):Le([void 0,void 0])))}function Ob(e,t){return wb(e,(e=>t.derive.accounts._identity(e).pipe(Ie((([e,n])=>function(e,t,n){if(t?.isSome)return Le([t,void 0]);if(n?.isSome){const t=n.unwrap();return zh([e.derive.accounts._identity(t[0]).pipe(ze((([e])=>e))),Le(t)])}return Le([void 0,void 0])}(t,e,n))),ze((([e,t])=>function(e,t){if(!e?.isSome)return{judgements:[]};const{info:n,judgements:r}=Nb(e),a=Ib(n.display);return{discord:Ib(n.discord),display:t&&Ib(t[1])||a,displayParent:t&&a,email:Ib(n.email),github:Ib(n.github),image:Ib(n.image),judgements:r,legal:Ib(n.legal),matrix:Ib(n.matrix),other:n.additional?(i=n.additional,i.reduce(((e,[t,n])=>{const r=Ib(t),a=Ib(n);return r&&a&&(e[r]=a),e}),{})):{},parent:t?.[0],pgp:n.pgpFingerprint.unwrapOr(Mb).toHex(),riot:Ib(n.riot),twitter:Ib(n.twitter),web:Ib(n.web)};var i}(e,t))))))}const Ab=Pb(((e,t)=>e.derive.accounts.hasIdentityMulti([t])));function Cb(e,t){return wb(e,(e=>t.query.identity?.identityOf?zh([t.query.identity.identityOf.multi(e),t.query.identity.superOf.multi(e)]).pipe(ze((([e,t])=>e.map(((e,n)=>{const r=t[n],a=r&&r.isSome?r.unwrap()[0].toString():void 0;let i;if(e&&e.isSome){const t=Ib(Nb(e).info.display);t&&!(0,Je.qv)(t)&&(i=t)}return{display:i,hasIdentity:!(!i&&!a),parentId:a}}))))):Le(e.map((()=>({hasIdentity:!1}))))))}function Hb(e,t){return wb(e,(e=>t.derive.accounts.indexes().pipe(ze((t=>t[e.toString()])))))}function Rb(e,t,n){return void 0===n&&(n=1/0),z(t)?Rb((function(n,r){return ze((function(e,a){return t(n,e,r,a)}))(Te(e(n,r)))}),n):("number"==typeof t&&(n=t),_e((function(t,r){return function(e,t,n,r,a,i,s,o){var c=[],d=0,u=0,l=!1,f=function(){!l||c.length||d||t.complete()},p=function(e){return dUb?Le(Ub):(t.query.indices?function(e){return e.query.indices.accounts.entries().pipe(ze((t=>t.reduce(((t,[n,r])=>(r.isSome&&(t[r.unwrap()[0].toString()]=e.registry.createType("AccountIndex",n.args[0])),t)),{}))))}(t).pipe(zb({})):Le({})).pipe(ze((e=>(Ub=e,e))))))}function qb(e,t){return wb(e,(e=>t.query.indices?t.query.indices.accounts(e).pipe(ze((e=>e.unwrapOr([])[0]))):Le(void 0)))}function jb(e,t){return(t&&e.query.nicks?.nameOf?e.query.nicks.nameOf(t):Le(void 0)).pipe(ze((t=>t?.isSome?nt(t.unwrap()[0]).substring(0,e.consts.nicks.maxLength.toNumber()):void 0)))}function Fb(e,t){return wb(e,(e=>t.derive.accounts.idAndIndex(e).pipe(Ie((([e,n])=>zh([Le({accountId:e,accountIndex:n}),t.derive.accounts.identity(e),jb(t,e)]))),ze((([{accountId:e,accountIndex:t},n,r])=>({accountId:e,accountIndex:t,identity:n,nickname:r}))))))}function Xb(e,t){return(n,r)=>wb(n,t(function(e,t){const n=e.registry.getModuleInstances(e.runtimeVersion.specName,t),r=n?.length?n[0]:t;return e.query[r]}(r,e),r,n))}function Wb(e,t){return n=>Xb(n,(n=>()=>(0,qe.T)(n?.[e])?n[e]():Le(t)))}const Zb=Wb("members",[]);function Gb(e,t,n){return((0,qe.T)(t?.proposals)&&n.length?zh([Le(n),t.proposalOf.multi(n).pipe(Gh((()=>Le(n.map((()=>null)))))),t.voting.multi(n)]):Le([[],[],[]])).pipe(ze((t=>function(e,[t,n,r]){return n.map(((n,a)=>({hash:e.registry.createType("Hash",t[a]),proposal:n&&n.isSome?n.unwrap():null,votes:r[a].unwrapOr(null)})))}(e,t))))}function Kb(e){return Xb(e,(e=>()=>Le((0,qe.T)(e?.proposals))))}function Jb(e){return Xb(e,((t,n)=>()=>n.derive[e].proposalHashes().pipe(Ie((e=>Gb(n,t,e))))))}function Yb(e){return Xb(e,((e,t)=>n=>(0,qe.T)(e?.proposals)?_b(Gb(t,e,[n])):Le(null)))}const Qb=Wb("proposalCount",null),$b=Wb("proposals",[]);function em(e){return Xb(e,(e=>()=>(0,qe.T)(e?.prime)?e.prime().pipe(ze((e=>e.unwrapOr(null)))):Le(null)))}const tm=Zb("allianceMotion"),nm=Kb("allianceMotion"),rm=Yb("allianceMotion"),am=Qb("allianceMotion"),im=$b("allianceMotion"),sm=Jb("allianceMotion"),om=em("allianceMotion");function cm(e){return e.query.voterList||e.query.voterBagsList||e.query.bagsList}function dm(e,t){const n=cm(t);return wb(e,(e=>{const t=e.map((e=>kt(e)));return t.length?n.listBags.multi(t).pipe(ze((e=>function(e,t){const n=e.map(((e,n)=>({bag:t[n].unwrapOr(null),id:e,key:e.toString()}))).sort(((e,t)=>t.id.cmp(e.id))),r=n.length-1;return n.map(((e,t)=>(0,M.b)(e,{bagLower:t===r?lt:n[t+1].id,bagUpper:e.id,index:t})))}(t,e)))):Le([])}))}function um(e,t){const n=cm(t);return wb(e,(()=>n.listBags.keys().pipe(Ie((e=>t.derive.bagsList._getIds(e.map((({args:[e]})=>e))))),ze((e=>e.filter((({bag:e})=>e)))))))}function lm(e,t){return wb(e,(e=>t.derive.bagsList._getIds([kt(e)]).pipe(ze((e=>e[0])))))}function fm(e,t){return wb(e,(e=>t.derive.bagsList.listNodes(e.bag).pipe(ze((t=>(0,M.b)({nodes:t},e))))))}function pm(e,t){return wb(e,(e=>t.derive.bagsList.get(e).pipe(Ie((e=>t.derive.bagsList.expand(e))))))}function hm(e,t){setTimeout((()=>{Promise.resolve().then((()=>{e()})).catch((e=>{t?t(e):console.error(e)}))}),0)}function bm(e,t){return wb(e,(e=>e&&e.head.isSome?function(e,t){const n=new Eh(t),r=cm(e);return n.pipe(Ie((e=>r.listNodes(e))),Dh((e=>{hm((()=>{e.isSome&&e.value.next.isSome?n.next(e.unwrap().next.unwrap()):n.complete()}))})),Fh(),ze((e=>e.map((e=>e.unwrap())))))}(t,e.head.unwrap()):Le([])))}function mm(e){return(...t)=>{const n=t.length;if(0===n)throw new Error("Must provide one or more arguments");let r=t[0];for(let a=1;ae.gt(t))),xm=mm(((e,t)=>e.lt(t))),gm="0x76657374696e6720";function vm(e,t,n,r){const{allLocked:a,lockedBalance:i,lockedBreakdown:s,vestingLocked:o}=function(e,t,n){let r=e.registry.createType("Balance"),a=[],i=e.registry.createType("Balance"),s=!1;if(Array.isArray(n)){a=n.filter((({until:e})=>!e||t&&e.gt(t))),s=a.some((({amount:e})=>e&&e.isMax())),i=e.registry.createType("Balance",a.filter((({id:e})=>e.eq(gm))).reduce(((e,{amount:t})=>e.iadd(t)),new st(0)));const o=a.filter((({amount:e})=>e&&!e.isMax()));o.length&&(r=e.registry.createType("Balance",ym(...o.map((({amount:e})=>e)))))}return{allLocked:s,lockedBalance:r,lockedBreakdown:a,vestingLocked:i}}(e,t,r);let c=null;if(n?.frameSystemAccountInfo?.frozen){const{frameSystemAccountInfo:t,freeBalance:r,reservedBalance:i}=n,s=t.frozen.isZero()&&i.isZero(),o=e.consts.balances.existentialDeposit,d=s?new st(0):o,u=t.frozen.sub(i);c=e.registry.createType("Balance",a?0:r.sub(ym(d,u)))}return(0,M.b)({},n,{availableBalance:e.registry.createType("Balance",a?0:ym(new st(0),n?.freeBalance?n.freeBalance.sub(i):new st(0))),lockedBalance:i,lockedBreakdown:s,transferable:c,vestingLocked:o})}function wm(e,t){const[n,[r,a,i],s]=t,o=vm(e,s,n,a[0]);return(0,M.b)(o,function(e,t,n){const r=n||[],a=!t.vestingLocked.isZero(),i=r.map((({locked:t,perBlock:n,startingBlock:r})=>e.gt(r)?xm(t,n.mul(e.sub(r))):lt)),s=i.reduce(((e,t)=>e.iadd(t)),new st(0)),o=r.reduce(((e,{locked:t})=>e.iadd(t)),new st(0));return{isVesting:a,vestedBalance:s,vestedClaimable:a?t.vestingLocked.sub(o.sub(s)):lt,vesting:r.map((({locked:e,perBlock:t,startingBlock:n},r)=>({endBlock:e.div(t).iadd(n),locked:e,perBlock:t,startingBlock:n,vested:i[r]}))).filter((({locked:e})=>!e.isZero())),vestingTotal:o}}(s,o,r),{accountId:n.accountId,accountNonce:n.accountNonce,additional:a.slice(1).map(((t,r)=>vm(e,s,n.additional[r],t))),namedReserves:i})}function Vm(e,t){return zh([e.query.balances.locks(t),e.query.balances.vesting(t)]).pipe(ze((([t,n])=>{let r=null;if(n.isSome){const{offset:t,perBlock:a,startingBlock:i}=n.unwrap();r=e.registry.createType("VestingInfo",{locked:t,perBlock:a,startingBlock:i})}return[r?[r]:null,[t],[]]})))}const Tm=e=>!!e;function Sm(e){return[e.map((e=>!e)),e.filter(Tm)]}function km(e,t,n=["balances"]){const[r,a]=Sm(n.map((t=>e.derive[t]?.customLocks||e.query[t]?.locks))),[i,s]=Sm(n.map((t=>e.query[t]?.reserves)));return zh([e.query.vesting?.vesting?e.query.vesting.vesting(t):Le(e.registry.createType("Option")),a.length?zh(a.map((e=>e(t)))):Le([]),s.length?zh(s.map((e=>e(t)))):Le([])]).pipe(ze((([t,n,a])=>{let s=-1,o=-1;const c=t.unwrapOr(null);return[c?Array.isArray(c)?c:[c]:null,r.map((t=>t?e.registry.createType("Vec"):n[++s])),i.map((t=>t?e.registry.createType("Vec"):a[++o]))]})))}function _m(e,t){const n=t.registry.getModuleInstances(t.runtimeVersion.specName,"balances");return wb(e,(e=>zh([t.derive.balances.account(e),(0,qe.T)(t.query.system?.account)||(0,qe.T)(t.query.balances?.account)?km(t,e,n):Vm(t,e)]).pipe(Ie((([e,n])=>zh([Le(e),Le(n),t.derive.chain.bestNumber()]))),ze((e=>wm(t,e))))))}function Pm(e){return e.registry.createType("Balance")}function Mm(e,[t,n,r,a],i){const s=e.registry.createType("Balance",t.toBn());return i.isFrameAccountData?{frameSystemAccountInfo:{flags:a,frozen:r},freeBalance:t,frozenFee:e.registry.createType("Balance",0),frozenMisc:e.registry.createType("Balance",0),reservedBalance:n,votingBalance:s}:{freeBalance:t,frozenFee:r,frozenMisc:a,reservedBalance:n,votingBalance:s}}function Im(e,t){return zh([e.query.balances.freeBalance(t),e.query.balances.reservedBalance(t),e.query.system.accountNonce(t)]).pipe(ze((([t,n,r])=>[r,[[t,n,Pm(e),Pm(e)]],{isFrameAccountData:!1}])))}function Nm(e,t){const n=t=>[t,[[Pm(e),Pm(e),Pm(e),Pm(e)]],{isFrameAccountData:!1}];return(0,qe.T)(e.query.system.account)?e.query.system.account(t).pipe(ze((({nonce:e})=>n(e)))):(0,qe.T)(e.query.system.accountNonce)?e.query.system.accountNonce(t).pipe(ze((e=>n(e)))):Le(n(e.registry.createType("Index")))}function Em(e,t,n=["balances"]){const r=n.map((t=>e.derive[t]?.customAccount||e.query[t]?.account)).filter((e=>(0,qe.T)(e))),a=(e,t)=>[e,t.map((({feeFrozen:e,free:t,miscFrozen:n,reserved:r})=>[t,r,e,n])),{isFrameAccountData:!1}];return r.length?(0,qe.T)(e.query.system.account)?zh([e.query.system.account(t),...r.map((e=>e(t)))]).pipe(ze((([{nonce:e},...t])=>a(e,t)))):zh([e.query.system.accountNonce(t),...r.map((e=>e(t)))]).pipe(ze((([e,...t])=>a(e,t)))):Nm(e,t)}function Om(e,t){return e.query.system.account(t).pipe(ze((t=>{const n=t.nonce?t.data:t[1],r=t.nonce||t[0];if(!n||n.isEmpty)return[r,[[Pm(e),Pm(e),Pm(e),Pm(e)]],{isFrameAccountData:!1}];if(!!t.data.frozen){const{flags:e,free:t,frozen:a,reserved:i}=n;return[r,[[t,i,a,e]],{isFrameAccountData:!0}]}{const{feeFrozen:e,free:t,miscFrozen:a,reserved:i}=n;return[r,[[t,i,e,a]],{isFrameAccountData:!1}]}})))}function Am(e,t){const n=t.registry.getModuleInstances(t.runtimeVersion.specName,"balances"),r=n&&"balances"!==n[0];return wb(e,(e=>t.derive.accounts.accountId(e).pipe(Ie((e=>e?zh([Le(e),r?Em(t,e,n):(0,qe.T)(t.query.system?.account)?Om(t,e):(0,qe.T)(t.query.balances?.account)?Em(t,e):(0,qe.T)(t.query.balances?.freeBalance)?Im(t,e):Nm(t,e)]):Le([t.registry.createType("AccountId"),[t.registry.createType("Index"),[[Pm(t),Pm(t),Pm(t),Pm(t)]],{isFrameAccountData:!1}]]))),ze((e=>function(e,[t,[n,[r,...a],i]]){return(0,M.b)({accountId:t,accountNonce:n,additional:a.map((t=>Mm(e,t,i)))},Mm(e,r,i))}(t,e))))))}function Cm(e,t){return wb(e,(e=>e?.length?zh(e.map((e=>t.derive.balances.account(e)))):Le([])))}const Hm=_m;function Rm(e,t){const n=e.tx.bounties?e.tx.bounties:e.tx.treasury,r=[n.approveBounty,n.closeBounty,n.proposeCurator,n.unassignCurator];return t.filter((e=>r.find((t=>e.proposal&&t.is(e.proposal)))))}function Bm([e,t,n,r]){const a=[];return e.forEach(((e,i)=>{e.isSome&&a.push({bounty:e.unwrap(),description:t[i].unwrapOrDefault().toUtf8(),index:n[i],proposals:r.filter((e=>e.proposal&&n[i].eq(e.proposal.args[0])))})})),a}function Lm(e,t){const n=t.query.bounties||t.query.treasury;return wb(e,(()=>n.bounties?zh([n.bountyCount(),t.query.council?t.query.council.proposalCount():Le(0)]).pipe(Ie((()=>zh([n.bounties.keys(),t.derive.council?t.derive.council.proposals():Le([])]))),Ie((([e,r])=>{const a=e.map((({args:[e]})=>e));return zh([n.bounties.multi(a),n.bountyDescriptions.multi(a),Le(a),Le(Rm(t,r))])})),ze(Bm)):Le(Bm([[],[],[],[]]))))}const zm=(0,Vt.D8)("toBigInt","toBn","toNumber","unwrap");function Um(e){return zm(e.number)?e.number.unwrap():e.number}function Dm(e){return(t,n)=>wb(t,(()=>e(n).pipe(ze(Um))))}function qm(e,t,n){return e.queryAt(t.parentHash.isEmpty?n||t.hash:t.parentHash).pipe(Ie((e=>function(e,t){const n=t.session?.validators?t.session.validators():Le(null),{logs:[r]}=e.digest,a=r&&(r.isConsensus&&r.asConsensus[0].isNimbus&&r.asConsensus[1]||r.isPreRuntime&&r.asPreRuntime[0].isNimbus&&r.asPreRuntime[1]);if(a){if(t.authorMapping?.mappingWithDeposit)return zh([Le(e),n,t.authorMapping.mappingWithDeposit(a).pipe(ze((e=>e.unwrapOr({account:null}).account)))]);if(t.parachainStaking?.selectedCandidates&&t.session?.nextKeys){const r=a.toHex();return zh([Le(e),n,t.parachainStaking.selectedCandidates().pipe(Rb((e=>zh([Le(e),t.session.nextKeys.multi(e).pipe(ze((e=>e.findIndex((e=>e.unwrapOrDefault().nimbus.toHex()===r)))))]))),ze((([e,t])=>-1===t?null:e[t])))])}}return zh([Le(e),n,Le(null)])}(t,e))))}const jm=Dm((e=>e.rpc.chain.subscribeNewHeads())),Fm=Dm((e=>e.rpc.chain.subscribeFinalizedHeads()));function Xm(e,t){return wb(e,(()=>zh([t.derive.chain.bestNumber(),t.derive.chain.bestNumberFinalized()]).pipe(ze((([e,n])=>t.registry.createType("BlockNumber",e.sub(n)))))))}function Wm(e,t){const[n]=e.logs.filter((e=>e.isConsensus)),[r]=e.logs.filter((e=>e.isPreRuntime)),[a]=e.logs.filter((e=>e.isSeal));let i;try{if(r){const[e,n]=r.asPreRuntime;i=e.extractAuthor(n,t)}if(!i&&n){const[e,r]=n.asConsensus;i=e.extractAuthor(r,t)}if(!i&&a){const[e,n]=a.asSeal;i=e.extractAuthor(n,t)}}catch{}return i}function Zm(e,t){return wb(e,(e=>zh([t.rpc.chain.getBlock(e),t.queryAt(e)]).pipe(Ie((([n,r])=>zh([Le(n),r.system.events(),qm(t,n.block.header,e)]))),ze((([e,t,[,n,r]])=>function(e,t,n,r,a){const i=e.createClass("SignedBlock");return new class extends i{__internal__author;__internal__events;__internal__extrinsics;constructor(e,t,n,r,a){var i,s;super(e,t),this.__internal__author=a||Wm(this.block.header.digest,r||[]),this.__internal__events=n||[],this.__internal__extrinsics=(i=this.block.extrinsics,s=this.__internal__events,i.map(((e,t)=>{let n,r;const a=s.filter((({phase:e})=>e.isApplyExtrinsic&&e.asApplyExtrinsic.eq(t))).map((({event:e})=>("system"===e.section&&("ExtrinsicSuccess"===e.method?r=e.data[0]:"ExtrinsicFailed"===e.method&&(n=e.data[0],r=e.data[1])),e)));return{dispatchError:n,dispatchInfo:r,events:a,extrinsic:e}}))),this.createdAtHash=t?.createdAtHash}get author(){return this.__internal__author}get events(){return this.__internal__events}get extrinsics(){return this.__internal__extrinsics}}(e,t,n,r,a)}(t.registry,e,t,n,r))))))}function Gm(e,t){return wb(e,(e=>t.rpc.chain.getBlockHash(e).pipe(Ie((e=>t.derive.chain.getBlock(e))))))}function Km(e,t,n,r){const a=e.createClass("Header");return new class extends a{__internal__author;constructor(e,t,n,r){super(e,t),this.__internal__author=r||Wm(this.digest,n||[]),this.createdAtHash=t?.createdAtHash}get author(){return this.__internal__author}}(e,t,n,r)}function Jm(e,t){return wb(e,(e=>t.rpc.chain.getHeader(e).pipe(Ie((n=>qm(t,n,e))),ze((([e,t,n])=>Km((t||e).registry,e,t,n))))))}function Ym(e,t){return wb(e,(()=>t.derive.chain.subscribeFinalizedHeads().pipe(Ie((e=>t.derive.chain.getBlock(e.createdAtHash||e.hash))))))}function Qm(e,t){return wb(e,((e,n,r=[])=>t.rpc.chain.getHeader(e).pipe(Ie((e=>e.parentHash.eq(n)?Le([e,...r]):t.derive.chain._getHeaderRange(e.parentHash,n,[e,...r]))))))}function $m(e,t){return wb(e,(()=>{let e=null;return t.rpc.chain.subscribeFinalizedHeads().pipe(Ie((n=>{const r=e,a=n.parentHash;return e=n.createdAtHash=n.hash,null===r||a.eq(r)?Le(n):t.derive.chain._getHeaderRange(a,r,[n]).pipe(Ie((e=>Be(e))))})))}))}function ey(e,t){return wb(e,(()=>t.derive.chain.subscribeNewHeads().pipe(Ie((e=>t.derive.chain.getBlock(e.createdAtHash||e.hash))))))}function ty(e,t){return wb(e,(()=>t.rpc.chain.subscribeNewHeads().pipe(Ie((e=>qm(t,e))),ze((([e,t,n])=>(e.createdAtHash=e.hash,Km(e.registry,e,t,n)))))))}function ny(e,t){return wb(e,(()=>function(e){return Le([e.consts.contracts.callBaseFee||e.registry.createType("Balance"),e.consts.contracts.contractFee||e.registry.createType("Balance"),e.consts.contracts.creationFee||e.registry.createType("Balance"),e.consts.contracts.transactionBaseFee||e.registry.createType("Balance"),e.consts.contracts.transactionByteFee||e.registry.createType("Balance"),e.consts.contracts.transferFee||e.registry.createType("Balance"),e.consts.contracts.rentByteFee||e.registry.createType("Balance"),e.consts.contracts.rentDepositOffset||e.registry.createType("Balance"),e.consts.contracts.surchargeReward||e.registry.createType("Balance"),e.consts.contracts.tombstoneDeposit||e.registry.createType("Balance")])}(t).pipe(ze((([e,t,n,r,a,i,s,o,c,d])=>({callBaseFee:e,contractFee:t,creationFee:n,rentByteFee:s,rentDepositOffset:o,surchargeReward:c,tombstoneDeposit:d,transactionBaseFee:r,transactionByteFee:a,transferFee:i}))))))}function ry(e){return!Array.isArray(e)}function ay(e){return e.stakeOf.entries().pipe(ze((e=>e.map((([{args:[e]},t])=>[e,t])))))}function iy(e){return e.votesOf.entries().pipe(ze((e=>e.map((([{args:[e]},t])=>[e,t])))))}function sy(e,t){const n=t.query.elections||t.query.phragmenElection||t.query.electionsPhragmen;return wb(e,(()=>n?n.stakeOf?function(e,t){return zh([ay(t),iy(t)]).pipe(ze((([t,n])=>{const r=[];return n.forEach((([t,n])=>{r.push([t,{stake:e.registry.createType("Balance"),votes:n}])})),t.forEach((([e,t])=>{const n=r.find((([t])=>t.eq(e)));n?n[1].stake=t:r.push([e,{stake:t,votes:[]}])})),r})))}(t,n):function(e){return e.voting.entries().pipe(ze((e=>e.map((([{args:[e]},t])=>[e,ry(t)?{stake:t.stake,votes:t.votes}:{stake:t[0],votes:t[1]}])))))}(n):Le([])))}function oy(e,t){return wb(e,(e=>t.derive.council.votes().pipe(ze((n=>(n.find((([t])=>t.eq(e)))||[null,{stake:t.registry.createType("Balance"),votes:[]}])[1])))))}const cy=Zb("council"),dy=Kb("council"),uy=Yb("council"),ly=Qb("council"),fy=$b("council"),py=Jb("council"),hy=em("council");function by(e,t){return wb(e,(e=>t.query.crowdloan.funds(e).pipe(ze((e=>e.isSome?function(e){return(0,N.X)(Mt(":child_storage:default:",Pi(Mt("crowdloan",(e.fundIndex||e.trieIndex).toU8a()))))}(e.unwrap()):null)))))}var my=new he((function(e){return e.complete()}));function yy(e){const t=e.length;if(0===t)return[];if(1===t)return e[0];let n=0;for(let i=0;i"crowdloan"===r&&["Contributed","Withdrew"].includes(n)&&t.eq(e))).reduce(((e,{event:{data:[t],method:n}})=>("Contributed"===n?e.added.push(t.toHex()):e.removed.push(t.toHex()),e)),{added:[],blockHash:t.createdAtHash?.toHex()||"-",removed:[]})}const gy=1e3;function vy(e,t){let n=[],r=[];return e.query.system.events().pipe(Ie((e=>{const a=xy(t,e);return a.added.length||a.removed.length?(n=n.concat(...a.added),r=r.concat(...a.removed),Le({added:n,addedDelta:a.added,blockHash:e.createdAtHash?.toHex()||"-",removed:r,removedDelta:a.removed})):my})),zb({added:n,addedDelta:[],blockHash:"-",removed:r,removedDelta:[]}))}function wy(e,t,n){return function(e,t){return e.query.system.events().pipe(Ie((e=>{const n=e.filter((({event:{data:[e],method:n,section:r}})=>"crowdloan"===r&&["AllRefunded","Dissolved","PartiallyRefunded"].includes(n)&&e.eq(t)));return n.length?Le(e.createdAtHash?.toHex()||"-"):my})),zb("-"))}(e,t).pipe(Ie((()=>(0,qe.T)(e.rpc.childstate.getKeysPaged)?function(e,t){const n=new Eh(void 0);return n.pipe(Ie((n=>e.rpc.childstate.getKeysPaged(t,"0x",gy,n))),Dh((e=>{hm((()=>{e.length===gy?n.next(e[gy-1].toHex()):n.complete()}))})),Fh(),ze((e=>yy(e))))}(e,n):e.rpc.childstate.getKeys(n,"0x"))),ze((e=>e.map((e=>e.toHex())))))}function Vy(e,t){return wb(e,(e=>t.derive.crowdloan.childKey(e).pipe(Ie((n=>n?function(e,t,n){return zh([wy(e,t,n),vy(e,t)]).pipe(ze((([e,{added:t,blockHash:n,removed:r}])=>{const a={};return e.forEach((e=>{a[e]=!0})),t.forEach((e=>{a[e]=!0})),r.forEach((e=>{delete a[e]})),{blockHash:n,contributorsHex:Object.keys(a)}})))}(t,e,n):Le({blockHash:"-",contributorsHex:[]}))))))}function Ty(e,t,n){return zh(n.map((n=>e.rpc.childstate.getStorage(t,n)))).pipe(ze((t=>t.map((t=>e.registry.createType("Option",t))).map((t=>t.isSome?e.registry.createType("Balance",t.unwrap()):e.registry.createType("Balance"))).reduce(((e,t,r)=>(0,M.b)(e,{[n[r]]:t})),{}))))}function Sy(e,t,n,r){return e.query.system.events().pipe(Ie((a=>{const i=xy(t,a),s=r.filter((e=>i.added.includes(e)||i.removed.includes(e)));return s.length?Ty(e,n,s):my})),zb({}))}function ky(e,t){return wb(e,((e,n)=>t.derive.crowdloan.childKey(e).pipe(Ie((r=>r&&n.length?function(e,t,n,r){return zh([Ty(e,n,r),Sy(e,t,n,r)]).pipe(ze((([e,t])=>(0,M.b)({},e,t))))}(t,e,r,n):Le({}))))))}function _y(e){return(0,N.X)((0,La.j)(e))}function Py(e){const t=kt(e);if(t.isNeg())throw new Error("square root of negative numbers is not supported");if(t.lte(xt))return new st(~~Math.sqrt(t.toNumber()));let n=gt.clone();for(;;){const e=t.div(n).iadd(n).ishrn(1);if(n.eq(e)||n.eq(e.sub(ft)))return n;n=e}}function My(e,t,n,r){for(;;){const a=e.div(t),i=n.div(r);if(a.lt(i))return!0;if(i.lt(a))return!1;const s=e.mod(t),o=n.mod(r);if(o.isZero())return!1;if(s.isZero())return!0;e=r,n=t,t=o,r=s}}function Iy(e,t,n){return e.isSimpleMajority?n.votedAye.gt(n.votedNay):function(e,t,{votedAye:n,votedNay:r,votedTotal:a}){const i=Py(a);return!i.isZero()&&(e.isSuperMajorityApprove?My(r,i,n,t):My(r,t,n,i))}(e,t,n)}function Ny(e,t,n){const r=t.status.tally?function(e,t){const n=[],r=[];return t.forEach((e=>{e.vote.isAye?n.push(e):r.push(e)})),{allAye:n,allNay:r,voteCount:n.length+r.length,voteCountAye:n.length,voteCountNay:r.length,votedAye:e.ayes,votedNay:e.nays,votedTotal:e.turnout}}(t.status.tally,n):n.reduce(((e,t)=>{const{balance:n,vote:r}=t,a=0===r.conviction.index,i=n.muln(a?1:r.conviction.index).divn(a?10:1);return r.isAye?(e.allAye.push(t),e.voteCountAye++,e.votedAye.iadd(i)):(e.allNay.push(t),e.voteCountNay++,e.votedNay.iadd(i)),e.voteCount++,e.votedTotal.iadd(i),e}),{allAye:[],allNay:[],voteCount:0,voteCountAye:0,voteCountNay:0,votedAye:new st(0),votedNay:new st(0),votedTotal:new st(0)});return(0,M.b)({},r,{isPassing:Iy(t.status.threshold,e,r),votes:n})}function Ey(e){return e.isLegacy?e.asLegacy.hash_.toHex():e.isLookup?e.asLookup.hash_.toHex():e.isInline?e.asInline.hash.toHex():(0,I.K)(e)?(0,Je.qv)(e)?e:_y(e):(0,ut.b)(e)?(0,N.X)(e):e.toHex()}function Oy(e){return Ey(e.proposal||e.proposalHash)}const Ay=_y("democrac");function Cy(e){return function(e){return e.derive.democracy.referendumsFinished().pipe(Ie((()=>e.query.scheduler.agenda.keys())),Ie((t=>{const n=t.map((({args:[e]})=>e));return n.length?zh([Le(n),e.query.scheduler.agenda.multi(n).pipe(Gh((()=>Le(n.map((()=>[]))))))]):Le([[],[]])})))}(e).pipe(Ie((([t,n])=>{const r=[];return t.forEach(((t,a)=>{(n[a]||[]).filter((e=>e.isSome)).forEach((n=>{const a=n.unwrap();if(a.maybeId.isSome){const n=a.maybeId.unwrap().toHex();if(n.startsWith(Ay)){const i=a.call instanceof nn?function(e){return e.isInline||e.isLegacy||e.isLookup}(a.call)?Ey(a.call):a.call.isHash?a.call.asHash.toHex():a.call.asValue.args[0].toHex():a.call.args[0].toHex();r.push({at:t,imageHash:i,index:e.registry.createType("(u64, ReferendumIndex)",n)[1]})}}}))})),zh([Le(r),r.length?e.derive.democracy.preimages(r.map((({imageHash:e})=>e))):Le([])])})),ze((([e,t])=>e.map(((e,n)=>(0,M.b)({image:t[n]},e))))))}function Hy(e,t){return wb(e,(()=>(0,qe.T)(t.query.scheduler?.agenda)?Cy(t):t.query.democracy.dispatchQueue?function(e){return e.query.democracy.dispatchQueue().pipe(Ie((t=>zh([Le(t),e.derive.democracy.preimages(t.map((([,e])=>e)))]))),ze((([e,t])=>e.map((([e,n,r],a)=>({at:e,image:t[a],imageHash:Ey(n),index:r}))))))}(t):Le([])))}const Ry=[0,1,2,4,8,16,32];function By(e,[t,n],r){const{balance:a,vote:i}=n.asStandard,[s,o]=r.isFinished?function(e,t,{approved:n,end:r}){return[r,n.isTrue&&t.isAye||n.isFalse&&t.isNay?r.add((e.consts.democracy.voteLockingPeriod||e.consts.democracy.enactmentPeriod).muln(Ry[t.conviction.index])):lt]}(e,i,r.asFinished):[lt,lt];return{balance:a,isDelegated:!1,isFinished:r.isFinished,referendumEnd:s,referendumId:t,unlockAt:o,vote:i}}function Ly(e,t){return wb(e,(e=>t.query.democracy.votingOf?t.query.democracy.votingOf(e).pipe(Ie((e=>e.isDirect?function(e,{votes:t}){return t.length?e.query.democracy.referendumInfoOf.multi(t.map((([e])=>e))).pipe(ze((n=>t.map(((e,t)=>[e,n[t].unwrapOr(null)])).filter((e=>!!e[1]&&(0,Fe.b)(e[1].end)&&e[0][1].isStandard)).map((([t,n])=>By(e,t,n)))))):Le([])}(t,e.asDirect):e.isDelegating?function(e,{balance:t,conviction:n,target:r}){return e.derive.democracy.locks(r).pipe(ze((r=>r.map((({isFinished:r,referendumEnd:a,referendumId:i,unlockAt:s,vote:o})=>({balance:t,isDelegated:!0,isFinished:r,referendumEnd:a,referendumId:i,unlockAt:s.isZero()?s:a.add((e.consts.democracy.voteLockingPeriod||e.consts.democracy.enactmentPeriod).muln(Ry[n.index])),vote:e.registry.createType("Vote",{aye:o.isAye,conviction:n})}))))))}(t,e.asDelegating):Le([])))):Le([])))}function zy(e,t){return wb(e,(()=>t.query.democracy?.nextExternal?t.query.democracy.nextExternal().pipe(Ie((e=>function(e,t){if(t.isNone)return Le(null);const[n,r]=t.unwrap();return e.derive.democracy.preimage(n).pipe(ze((e=>({image:e,imageHash:Ey(n),threshold:r}))))}(t,e)))):Le(null)))}function Uy(e,[t,n,r,a]){let i;try{i=e.registry.createType("Call",t.toU8a(!0))}catch(s){console.error(s)}return{at:a,balance:r,proposal:i,proposer:n}}function Dy(e,t){const n=t.map((e=>Ey(e)));return e.query.democracy.preimages.multi(n).pipe(ze((t=>t.map((t=>function(e,t){if(!t.isNone){if(function(e,t){return!!t&&!e.query.democracy.dispatchQueue}(e,t)){const n=t.unwrap();if(n.isMissing)return;const{data:r,deposit:a,provider:i,since:s}=n.asAvailable;return Uy(e,[r,i,a,s])}return Uy(e,t.unwrap())}}(e,t))))))}function qy(e,t){const n=t.map((e=>Ey(e))),r=e.registry.lookup.getTypeDef(e.query.preimage.preimageFor.creator.meta.type.asMap.key).type;return e.query.preimage.statusFor.multi(n).pipe(Ie((t=>{const a=t.map((e=>e.unwrapOr(null))),i=a.map(((e,t)=>e?"H256"===r?n[t]:e.isRequested?[n[t],e.asRequested.len.unwrapOr(0)]:[n[t],e.asUnrequested.len]:null)).filter((e=>!!e));return e.query.preimage.preimageFor.multi(i).pipe(ze((t=>{let r=-1;return a.map(((e,a)=>e?[n[a],e,t[++r].unwrapOr(null)]:[n[a],null,null])).map((t=>function(e,[t,n,r]){if(!n)return;const[a,i]=n.isUnrequested?function(e){return e.ticket||e.deposit}(n.asUnrequested):function(e){return(e.maybeTicket||e.deposit).unwrapOrDefault()}(n.asRequested);let s;if(r)try{s=e.registry.createType("Call",r.toU8a(!0))}catch(o){console.error(o)}return{at:lt,balance:i,proposal:s,proposalHash:t,proposer:a}}(e,t)))})))})))}function jy(e,t){return wb(e,(e=>e.length?(0,qe.T)(t.query.democracy.preimages)?Dy(t,e):(0,qe.T)(t.query.preimage.preimageFor)?qy(t,e):Le([]):Le([])))}const Fy=Pb(((e,t)=>e.derive.democracy.preimages([t])));function Xy([e,t,n]){return e.filter((([,,e],t)=>!!n[t]?.isSome&&!e.isEmpty)).map((([e,r,a],i)=>{const s=n[i].unwrap();return(0,M.b)({image:t[i],imageHash:Ey(r),index:e,proposer:a},function(e){return(0,qe.T)(e[1].mul)}(s)?{balance:s[1],seconds:s[0]}:{balance:s[0],seconds:s[1]})}))}function Wy(e,t){return wb(e,(()=>(0,qe.T)(t.query.democracy?.publicProps)?t.query.democracy.publicProps().pipe(Ie((e=>e.length?zh([Le(e),t.derive.democracy.preimages(e.map((([,e])=>e))),t.query.democracy.depositOf.multi(e.map((([e])=>e)))]):Le([[],[],[]]))),ze(Xy)):Le([])))}function Zy(e,t){return wb(e,(()=>t.query.democracy?.lowestUnbaked?t.queryMulti([t.query.democracy.lowestUnbaked,t.query.democracy.referendumCount]).pipe(ze((([e,t])=>t.gt(e)?[...Array(t.sub(e).toNumber())].map(((t,n)=>e.addn(n))):[]))):Le([])))}function Gy(e,t){return wb(e,(()=>t.derive.democracy.referendumsActive().pipe(Ie((e=>e.length?zh([Le(e),t.derive.democracy._referendumsVotes(e)]):Le([[],[]]))),ze((([e,t])=>e.map(((e,n)=>(0,M.b)({},e,t[n]))))))))}function Ky(e,t){return wb(e,(()=>t.derive.democracy.referendumIds().pipe(Ie((e=>e.length?t.derive.democracy.referendumsInfo(e):Le([]))))))}function Jy(e,t){return wb(e,(()=>t.derive.democracy.referendumIds().pipe(Ie((e=>t.query.democracy.referendumInfoOf.multi(e))),ze((e=>e.map((e=>e.unwrapOr(null))).filter((e=>!!e&&e.isFinished)).map((e=>e.asFinished)))))))}function Yy(e,t){return e.query.democracy.votersFor(t).pipe(Ie((n=>zh([Le(n),n.length?e.query.democracy.voteOf.multi(n.map((e=>[t,e]))):Le([]),e.derive.balances.votingBalances(n)]))),ze((([t,n,r])=>t.map(((t,a)=>({accountId:t,balance:r[a].votingBalance||e.registry.createType("Balance"),isDelegating:!1,vote:n[a]||e.registry.createType("Vote")}))))))}function Qy(e,t){return e.query.democracy.votingOf.entries().pipe(ze((n=>{const r=n.map((([{args:[e]},t])=>[e,t])),a=function(e,t){return e.filter((([,e])=>e.isDirect)).map((([e,n])=>[e,n.asDirect.votes.filter((([e])=>e.eq(t)))])).filter((([,e])=>!!e.length)).reduce(((e,[t,n])=>n.reduce(((e,[,n])=>(n.isStandard&&e.push((0,M.b)({accountId:t,isDelegating:!1},n.asStandard)),e)),e)),[])}(r,t),i=r.filter((([,e])=>e.isDelegating)).map((([e,t])=>[e,t.asDelegating]));return i.forEach((([t,{balance:n,conviction:r,target:s}])=>{const o=i.find((([e])=>e.eq(s))),c=a.find((({accountId:e})=>e.eq(o?o[0]:s)));c&&a.push({accountId:t,balance:n,isDelegating:!0,vote:e.registry.createType("Vote",{aye:c.vote.isAye,conviction:r})})})),a})))}function $y(e,t){return wb(e,(e=>zh([t.derive.democracy.sqrtElectorate(),(0,qe.T)(t.query.democracy.votingOf)?Qy(t,e.index):Yy(t,e.index)]).pipe(ze((([t,n])=>Ny(t,e,n))))))}function ex(e,t){return wb(e,(e=>e.length?zh(e.map((e=>t.derive.democracy._referendumVotes(e)))):Le([])))}function tx(e,t){return wb(e,((e,n)=>{const r=function(e){if(e.isNone)return null;const t=e.unwrap();return function(e){return!!e.proposalHash}(t)?t:t.isOngoing?t.asOngoing:null}(n);return r?t.derive.democracy.preimage(r.proposal||r.proposalHash).pipe(ze((n=>({image:n,imageHash:Oy(r),index:t.registry.createType("ReferendumIndex",e),status:r})))):Le(null)}))}function nx(e,t){return wb(e,(e=>e.length?t.query.democracy.referendumInfoOf.multi(e).pipe(Ie((n=>zh(e.map(((e,r)=>t.derive.democracy._referendumInfo(e,n[r])))))),ze((e=>e.filter((e=>!!e))))):Le([])))}function rx(e,t){return wb(e,(()=>t.query.balances.totalIssuance().pipe(ze(Py))))}function ax(e){return function(e){return!Array.isArray(e)}(e)?[e.who,e.stake]:e}function ix(e){return function(e){return Array.isArray(e)}(e)?e[0]:e}function sx([,e],[,t]){return t.cmp(e)}function ox(e,t){return wb(e,(()=>{const[e,n]=function(e){const[t]=e.registry.getModuleInstances(e.runtimeVersion.specName,"council")||["council"],n=e.query.phragmenElection?"phragmenElection":e.query.electionsPhragmen?"electionsPhragmen":e.query.elections?"elections":null;return[e.query[t]?t:"council",n]}(t);return(n?function(e,t,n){return e.queryMulti([e.query[t].members,e.query[n].candidates,e.query[n].members,e.query[n].runnersUp])}(t,e,n):function(e,t){return zh([e.query[t].members(),Le([]),Le([]),Le([])])}(t,e)).pipe(ze((([e,r,a,i])=>(0,M.b)({},function(e,t){return t?{candidacyBond:e.consts[t].candidacyBond,desiredRunnersUp:e.consts[t].desiredRunnersUp,desiredSeats:e.consts[t].desiredMembers,termDuration:e.consts[t].termDuration,votingBond:e.consts[t].votingBond,votingBondBase:e.consts[t].votingBondBase,votingBondFactor:e.consts[t].votingBondFactor}:{}}(t,n),{candidateCount:t.registry.createType("u32",r.length),candidates:r.map(ix),members:a.length?a.map(ax).sort(sx):e.map((e=>[e,t.registry.createType("Balance")])),runnersUp:i.map(ax).sort(sx)}))))}))}function cx([e,t,n,r]){return t.forEach(((t,a)=>{const i=t.toString(),s=r[a],o=!n[a].isEmpty,c=e[i];c&&c.hasMessage===o&&c.blockCount.eq(s)||(e[i]={blockCount:s,hasMessage:o,isOnline:o||s.gt(lt)})})),e}function dx(e,t){return wb(e,(()=>t.query.imOnline?.receivedHeartbeats?t.derive.staking.overview().pipe(Ie((({currentIndex:e,validators:n})=>zh([Le({}),Le(n),t.query.imOnline.receivedHeartbeats.multi(n.map(((t,n)=>[e,n]))),t.query.imOnline.authoredBlocks.multi(n.map((t=>[e,t])))]))),ze(cx)):Le({})))}const ux=Zb("membership"),lx=Kb("membership"),fx=Yb("membership"),px=Qb("membership"),hx=$b("membership"),bx=Jb("membership"),mx=em("membership");function yx(e,t){return!!e.isSome&&e.unwrap().some((e=>e.eq(t)))}function xx(e,t){const n=t.find((([t])=>t===e));if(n&&n[1].isSome){const[e,t]=n[1].unwrap();return(0,M.b)({collatorId:e},t.isWithRetries?{isRetriable:!0,retries:t.asWithRetries.toNumber()}:{isRetriable:!1,retries:0})}return null}function gx(e,t){return t.map((t=>{const n=t.find((([t])=>t===e));return n?n[1]:null}))}function vx(e,t){return wb(e,(e=>t.query.registrar&&t.query.parachains?t.queryMulti([t.query.registrar.active,t.query.registrar.retryQueue,t.query.registrar.selectedThreads,t.query.parachains.didUpdate,[t.query.registrar.paras,e],[t.query.registrar.pendingSwap,e],[t.query.parachains.heads,e],[t.query.parachains.relayDispatchQueue,e]]).pipe(ze((n=>function(e,[t,n,r,a,i,s,o,c]){return i.isNone?null:{active:xx(e,t),didUpdate:yx(a,e),heads:o,id:e,info:(0,M.b)({id:e},i.unwrap()),pendingSwapId:s.unwrapOr(null),relayDispatchQueue:c,retryCollators:gx(e,n),selectedCollators:gx(e,r)}}(t.registry.createType("ParaId",e),n)))):Le(null)))}function wx([e,t,n,r,a]){return e.map(((e,i)=>({didUpdate:yx(t,e),id:e,info:(0,M.b)({id:e},r[i].unwrapOr(null)),pendingSwapId:a[i].unwrapOr(null),relayDispatchQueueSize:n[i][0].toNumber()})))}function Vx(e,t){return wb(e,(()=>t.query.registrar?.parachains&&t.query.parachains?t.query.registrar.parachains().pipe(Ie((e=>zh([Le(e),t.query.parachains.didUpdate(),t.query.parachains.relayDispatchQueueSize.multi(e),t.query.registrar.paras.multi(e),t.query.registrar.pendingSwap.multi(e)]))),ze(wx)):Le([])))}function Tx([e,t,n,r,a]){return{activeEra:t,activeEraStart:n,currentEra:r,currentIndex:e,validatorCount:a}}function Sx(e,t){return wb(e,(()=>t.query.session?t.query.staking?function(e){return e.queryMulti([e.query.session.currentIndex,e.query.staking.activeEra,e.query.staking.currentEra,e.query.staking.validatorCount]).pipe(ze((([e,t,n,r])=>{const{index:a,start:i}=t.unwrapOrDefault();return Tx([e,a,i,n.unwrapOrDefault(),r])})))}(t):function(e){return e.query.session.currentIndex().pipe(ze((t=>Tx([t,e.registry.createType("EraIndex"),e.registry.createType("Option"),e.registry.createType("EraIndex"),e.registry.createType("u32")]))))}(t):function(e){return Le(Tx([e.registry.createType("SessionIndex",1),e.registry.createType("EraIndex"),e.registry.createType("Option"),e.registry.createType("EraIndex"),e.registry.createType("u32")]))}(t)))}function kx(e,t){return wb(e,(()=>t.derive.session.indexes().pipe(ze((e=>{const n=t.consts?.babe?.epochDuration||t.registry.createType("u64",1),r=t.consts?.staking?.sessionsPerEra||t.registry.createType("SessionIndex",1);return(0,M.b)({eraLength:t.registry.createType("BlockNumber",r.mul(n)),isEpoch:!!t.query.babe,sessionLength:n,sessionsPerEra:r},e)})))))}function _x(e){return(t,n)=>wb(t,(()=>n.derive.session.progress().pipe(ze((t=>t[e])))))}function Px(e,t){return wb(e,(()=>t.query.babe?function(e){return e.derive.session.info().pipe(Ie((t=>zh([Le(t),e.query.staking?.erasStartSessionIndex?e.queryMulti([e.query.babe.currentSlot,e.query.babe.epochIndex,e.query.babe.genesisSlot,[e.query.staking.erasStartSessionIndex,t.activeEra]]):e.queryMulti([e.query.babe.currentSlot,e.query.babe.epochIndex,e.query.babe.genesisSlot])]))),ze((([t,[n,r,a,i]])=>[t,[n,r,a,i&&i.isSome?i.unwrap():e.registry.createType("SessionIndex",1)]])))}(t).pipe(ze((([e,n])=>function(e,t,[n,r,a,i]){const s=r.mul(t.sessionLength).iadd(a),o=n.sub(s),c=t.currentIndex.sub(i).imul(t.sessionLength).iadd(o);return(0,M.b)({eraProgress:e.registry.createType("BlockNumber",c),sessionProgress:e.registry.createType("BlockNumber",o)},t)}(t,e,n)))):function(e){return e.derive.session.info().pipe(ze((t=>(0,M.b)({eraProgress:e.registry.createType("BlockNumber"),sessionProgress:e.registry.createType("BlockNumber")},t))))}(t)))}const Mx=_x("eraLength"),Ix=_x("eraProgress"),Nx=_x("sessionProgress");function Ex(e,t){return wb(e,(()=>t.query.society.suspendedCandidates&&t.query.society.candidates.creator.meta.type.isPlain?function(e){return e.query.society.candidates().pipe(Ie((t=>zh([Le(t),e.query.society.suspendedCandidates.multi(t.map((({who:e})=>e)))]))),ze((([e,t])=>e.map((({kind:e,value:n,who:r},a)=>({accountId:r,isSuspended:t[a].isSome,kind:e,value:n}))))))}(t):function(e){return e.query.society.candidates.entries().pipe(ze((e=>e.filter((([,e])=>e.isSome)).map((([{args:[e]},t])=>[e,t.unwrap()])).map((([e,{bid:t,kind:n}])=>({accountId:e,isSuspended:!1,kind:n,value:t}))))))}(t)))}function Ox(e,t){return wb(e,(()=>zh([t.query.society.bids(),t.query.society.defender?t.query.society.defender():Le(void 0),t.query.society.founder(),t.query.society.head(),t.query.society.maxMembers?t.query.society.maxMembers():Le(void 0),t.query.society.pot()]).pipe(ze((([e,t,n,r,a,i])=>({bids:e,defender:t?.unwrapOr(void 0),founder:n.unwrapOr(void 0),hasDefender:t?.isSome&&r.isSome&&!r.eq(t)||!1,head:r.unwrapOr(void 0),maxMembers:a,pot:i}))))))}function Ax(e,t){return wb(e,(e=>t.derive.society._members([e]).pipe(ze((([e])=>e)))))}function Cx(e,t){return wb(e,(e=>t.query.society.members.creator.meta.type.isMap?function(e,t){return zh([Le(t),e.query.society.members.multi(t),e.query.society.payouts.multi(t),e.query.society.challengeRoundCount().pipe(Ie((n=>e.query.society.defenderVotes.multi(t.map((e=>[n,e])))))),e.query.society.suspendedMembers.multi(t)]).pipe(ze((([e,t,n,r,a])=>e.map(((e,i)=>t[i].isSome?{accountId:e,isDefenderVoter:r[i].isSome,isSuspended:a[i].isSome,member:t[i].unwrap(),payouts:n[i].payouts}:null)).filter((e=>!!e)).map((({accountId:e,isDefenderVoter:t,isSuspended:n,member:r,payouts:a})=>({accountId:e,isDefenderVoter:t,isSuspended:n,payouts:a,strikes:r.strikes,vouching:r.vouching.unwrapOr(void 0)}))))))}(t,e):function(e,t){return zh([Le(t),e.query.society.payouts.multi(t),e.query.society.strikes.multi(t),e.query.society.defenderVotes.multi(t),e.query.society.suspendedMembers.multi(t),e.query.society.vouching.multi(t)]).pipe(ze((([e,t,n,r,a,i])=>e.map(((e,s)=>({accountId:e,isDefenderVoter:r[s].isSome,isSuspended:a[s].isTrue,payouts:t[s],strikes:n[s],vote:r[s].unwrapOr(void 0),vouching:i[s].unwrapOr(void 0)}))))))}(t,e)))}function Hx(e,t){return wb(e,(()=>t.query.society.members.creator.meta.type.isMap?t.query.society.members.keys().pipe(Ie((e=>t.derive.society._members(e.map((({args:[e]})=>e)))))):t.query.society.members().pipe(Ie((e=>t.derive.society._members(e))))))}const Rx={withDestination:!0,withLedger:!0,withNominations:!0,withPrefs:!0};function Bx(e,t,n){const r=Object.entries((a=(t?.unlocking||[]).filter((({era:e})=>e.unwrap().gt(n.activeEra))),a.reduce(((e,{era:t,value:n})=>{const r=t.toString();return e[r]=(e[r]||lt).add(n.unwrap()),e}),{}))).map((([t,r])=>({remainingEras:new st(t).isub(n.activeEra),value:e.registry.createType("Balance",r)})));var a;return r.length?r:void 0}function Lx(e,t,n){return e.registry.createType("Balance",(t?.unlocking||[]).reduce(((e,{era:t,value:r})=>t.unwrap().gt(n.currentEra)?e:e.iadd(r.unwrap())),new st(0)))}function zx(e,t){return wb(e,((e,n=Rx)=>t.derive.session.info().pipe(Ie((r=>zh([t.derive.staking.keysMulti(e),t.derive.staking.queryMulti(e,n)]).pipe(ze((([e,n])=>n.map(((n,a)=>function(e,t,n,r){return(0,M.b)({},n,r,{redeemable:Lx(e,r.stakingLedger,t),unlocking:Bx(e,r.stakingLedger,t)})}(t,r,e[a],n)))))))))))}const Ux=Pb(((e,t,n)=>e.derive.staking.accounts([t],n)));function Dx(e,t){return wb(e,(()=>t.derive.session.indexes().pipe(Ie((({activeEra:e})=>t.query.staking.erasRewardPoints(e))))))}const qx={withController:!0,withExposure:!0,withPrefs:!0};function jx(e,t){return wb(e,((e=qx,n=0)=>t.derive.staking.validators().pipe(Ie((({nextElected:r,validators:a})=>t.derive.staking.queryMulti(function(e,t){return yy([e,t.filter((t=>!e.find((e=>e.eq(t)))))])}(r,a),e,n).pipe(ze((e=>({info:e,nextElected:r,validators:a})))))))))}new Map;const Fx={del:()=>{},forEach:()=>{},get:()=>{},set:(e,t)=>t};let Xx;function Wx(e,t,n){const r=`${e}-${t.toString()}`;return[r,n?void 0:Xx.get(r)]}function Zx(e,t,n){return n?[]:t.map((t=>Xx.get(`${e}-${t.toString()}`))).filter((e=>!!e))}function Gx(e,t,n){return!t&&Xx.set(e,n),n}function Kx(e,t,n){return!t&&n.forEach((t=>Xx.set(`${e}-${t.era.toString()}`,t))),n}function Jx(e,t,n){return e.map((e=>t.find((({era:t})=>e.eq(t)))||n.find((({era:t})=>e.eq(t))))).filter((e=>!!e))}function Yx(e,t){const n=Math.ceil(e.length/t);if(1===n)return[e];const r=Array(n);for(let a=0;at.del(`${e}${n}`),forEach:t.forEach,get:n=>{const r=`${e}${n}`,a=t.get(r);if(a)return a.x=Date.now(),t.set(r,a),a.v},set:(n,r)=>{t.set(`${e}${n}`,{v:r,x:Date.now()})}}}(`derive:${e}:`,t):Fx,t&&function(e){const t=Date.now(),n=[];e.forEach(((e,{x:r})=>{t-r>6048e5&&n.push(e)})),n.forEach((t=>e.del(t)))}(t)}();function Qx(e,t){return e.filter((e=>!t.some((({era:t})=>e.eq(t)))))}function $x(e){return(t,n)=>wb(t,((t=!1)=>n.derive.staking.erasHistoric(t).pipe(Ie((r=>n.derive.staking[e](r,t))))))}function eg(e){return(t,n)=>wb(t,((t,r=!1,a)=>n.derive.staking.erasHistoric(r).pipe(Ie((i=>n.derive.staking[e](t,i,r,a||0))))))}function tg(e){return(t,n)=>wb(t,(t=>n.derive.staking[e](t,!0)))}function ng(e){return(t,n)=>wb(t,((t,r)=>t.length?function(e,t){const n=Yx(e,14);let r=0;const a=new Eh(n[r]);return a.pipe(Ie(t),Dh((()=>{hm((()=>{r++,r===n.length?a.complete():a.next(n[r])}))})),Fh(),ze(yy))}(t,(t=>zh(t.map((t=>n.derive.staking[e](t,r)))))):Le([])))}const rg="eraExposure";function ag(e,t){return wb(e,((e,n=!1)=>{const[r,a]=Wx(rg,e,n);return a?Le(a):t.query.staking.erasStakersPaged?t.query.staking.erasStakersPaged.entries(e).pipe(ze((t=>Gx(r,n,function(e,t){const n={},r={};return t.forEach((([e,t])=>{if(t.isSome){const a=e.args[1].toString(),i=t.unwrap();r[a]=i,i.others.forEach((({who:e},t)=>{const r=e.toString();n[r]=n[r]||[],n[r].push({validatorId:a,validatorIndex:t})}))}})),{era:e,nominators:n,validators:r}}(e,t))))):t.query.staking.erasStakersClipped.entries(e).pipe(ze((t=>Gx(r,n,function(e,t){const n={},r={};return t.forEach((([e,t])=>{const a=e.args[1].toString();r[a]=t,t.others.forEach((({who:e},t)=>{const r=e.toString();n[r]=n[r]||[],n[r].push({validatorId:a,validatorIndex:t})}))})),{era:e,nominators:n,validators:r}}(e,t)))))}))}const ig=tg("_eraExposure"),sg=ng("_eraExposure"),og=$x("_erasExposure");function cg(e,t){return wb(e,(e=>zh([t.query.staking.activeEra(),t.consts.staking.historyDepth?Le(t.consts.staking.historyDepth):t.query.staking.historyDepth()]).pipe(ze((([n,r])=>{const a=[],i=r.toNumber(),s=n.unwrapOrDefault().index;let o=s;for(;o.gte(lt)&&a.lengthe.gt(lt))).reduce(((e,[t,n])=>(e[t.toString()]=n,e)),{})}function lg(e,t){return wb(e,((e,n)=>{if(!e.length)return Le([]);const r=Zx(dg,e,n),a=Qx(e,r);return a.length?t.query.staking.erasRewardPoints.multi(a).pipe(ze((t=>Jx(e,r,Kx(dg,n,function(e,t){return e.map(((e,n)=>({era:e,eraPoints:t[n].total,validators:ug(t[n])})))}(a,t)))))):Le(r)}))}const fg=$x("_erasPoints"),pg="eraPrefs";function hg(e,t){return wb(e,((e,n)=>{const[r,a]=Wx(pg,e,n);return a?Le(a):t.query.staking.erasValidatorPrefs.entries(e).pipe(ze((t=>Gx(r,n,function(e,t){const n={};return t.forEach((([e,t])=>{n[e.args[1].toString()]=t})),{era:e,validators:n}}(e,t)))))}))}const bg=tg("_eraPrefs"),mg=ng("_eraPrefs"),yg=$x("_erasPrefs"),xg="eraRewards";function gg(e,t){return wb(e,((e,n)=>{if(!e.length)return Le([]);const r=Zx(xg,e,n),a=Qx(e,r);return a.length?t.query.staking.erasValidatorReward.multi(a).pipe(ze((t=>Jx(e,r,Kx(xg,n,function(e,t){return e.map(((e,n)=>({era:e,eraReward:t[n].unwrapOrDefault()})))}(a,t)))))):Le(r)}))}const vg=$x("_erasRewards"),wg="eraSlashes";function Vg(e,t){return wb(e,((e,n)=>{const[r,a]=Wx(wg,e,n);return a?Le(a):zh([t.query.staking.nominatorSlashInEra.entries(e),t.query.staking.validatorSlashInEra.entries(e)]).pipe(ze((([t,a])=>Gx(r,n,function(e,t,n){const r={},a={};return t.forEach((([e,t])=>{r[e.args[1].toString()]=t.unwrap()})),n.forEach((([e,t])=>{a[e.args[1].toString()]=t.unwrapOrDefault()[1]})),{era:e,nominators:r,validators:a}}(e,t,a)))))}))}const Tg=tg("_eraSlashes"),Sg=ng("_eraSlashes"),kg=$x("_erasSlashes");const _g=Pb(((e,t)=>e.derive.staking.keysMulti([t])));function Pg(e,t){return wb(e,(e=>e.length?t.query.session.queuedKeys().pipe(Ie((n=>zh([Le(n),t.consts.session?.dedupKeyPrefix?t.query.session.nextKeys.multi(e.map((e=>[t.consts.session.dedupKeyPrefix,e]))):zh(e.map((e=>t.query.session.nextKeys(e))))]))),ze((([t,n])=>e.map(((e,r)=>function(e,t,n){const r=(t.find((([t])=>t.eq(e)))||[void 0,[]])[1],a=n.unwrapOr([]);return{nextSessionIds:Array.isArray(a)?a:[...a.values()],sessionIds:Array.isArray(r)?r:[...r.values()]}}(e,t,n[r])))))):Le([])))}function Mg(e,t){return wb(e,(()=>zh([t.derive.session.indexes(),t.derive.staking.validators()]).pipe(ze((([e,{nextElected:t,validators:n}])=>(0,M.b)({},e,{nextElected:t,validators:n}))))))}function Ig(e,t){return wb(e,((e,n,r,a)=>{const i=t.registry.createType("Exposure"),s=t.registry.createType("Option"),o=t.registry.createType("Option");return n.length?zh([t.query.staking.erasStakersClipped?zh(n.map((n=>t.query.staking.erasStakersClipped(n,e)))):Le(n.map((e=>i))),t.query.staking.erasStakers?zh(n.map((n=>t.query.staking.erasStakers(n,e)))):Le(n.map((e=>i))),t.query.staking.erasStakersPaged?zh(n.map((n=>t.query.staking.erasStakersPaged(n,e,a)))):Le(n.map((e=>s))),t.query.staking.erasStakersOverview?zh(n.map((n=>t.query.staking.erasStakersOverview(n,e)))):Le(n.map((e=>o)))]).pipe(ze((([e,t,r,a])=>n.map(((n,i)=>({clipped:e[i],era:n,exposure:t[i],exposureMeta:a[i],exposurePaged:r[i]})))))):Le([])}))}const Ng=Pb(((e,t,n,r)=>e.derive.staking._ownExposures(t,[n],!0,r||0))),Eg=eg("_ownExposures");function Og(e,t){return wb(e,((e,n,r)=>n.length?zh([zh(n.map((n=>t.query.staking.validatorSlashInEra(n,e)))),zh(n.map((n=>t.query.staking.nominatorSlashInEra(n,e))))]).pipe(ze((([e,t])=>n.map(((n,r)=>({era:n,total:e[r].isSome?e[r].unwrap()[1]:t[r].unwrapOrDefault()})))))):Le([])))}const Ag=Pb(((e,t,n)=>e.derive.staking._ownSlashes(t,[n],!0))),Cg=eg("_ownSlashes");function Hg(e,t){return e.registry.createType("Vec",t.filter((e=>-1!==e)))}function Rg(e,t,n,{withClaimedRewardsEras:r,withController:a,withDestination:i,withExposure:s,withExposureErasStakersLegacy:o,withExposureMeta:c,withLedger:d,withNominations:u,withPrefs:l},f){const p=e.registry.createType("Option"),h=e.registry.createType("RewardDestination"),b=e.registry.createType("Exposure"),m=e.registry.createType("ValidatorPrefs"),y=e.registry.createType("Option"),x=e.registry.createType("Option"),g=[-1],v=Number(e.consts.staking.historyDepth.toNumber()),w=new Array(v).fill(0).map(((e,t)=>0===t?n.toNumber()-1:n.toNumber()-t-1));return zh([a||d?zh(t.map((t=>e.query.staking.bonded(t)))):Le(t.map((()=>null))),u?zh(t.map((t=>e.query.staking.nominators(t)))):Le(t.map((()=>p))),i?zh(t.map((t=>e.query.staking.payee(t)))):Le(t.map((()=>h))),l?zh(t.map((t=>e.query.staking.validators(t)))):Le(t.map((()=>m))),s&&e.query.staking.erasStakersPaged?zh(t.map((t=>e.query.staking.erasStakersPaged(n,t,f)))):Le(t.map((()=>y))),c&&e.query.staking.erasStakersOverview?zh(t.map((t=>e.query.staking.erasStakersOverview(n,t)))):Le(t.map((()=>x))),r&&e.query.staking.claimedRewards?zh([e.query.staking.claimedRewards.entries(),e.query.staking.erasStakersOverview.entries()]).pipe(ze((([e,n])=>function(e,t,n,r){const a={},i={},s=e.map((e=>e.toString()));return n.forEach((([e,t])=>{const n=e.args[1].toString(),r=e.args[0].toNumber();s.includes(n)&&(a[n]||(a[n]=new Map),a[n].set(r,t.toArray()))})),r.forEach((([e,t])=>{const n=e.args[1].toString(),r=e.args[0].toNumber();s.includes(n)&&t.isSome&&(i[n]||(i[n]=new Map),i[n].set(r,t.unwrap().pageCount))})),e.map((e=>{const n=a[e.toString()],r=i[e.toString()];return t.map((e=>{if(n&&n.has(e)&&r&&r.has(e)){const t=n.get(e),a=r.get(e);return t.length===a.toNumber()?e:-1}return-1}))}))}(t,w,e,n)))):Le(t.map((()=>g))),o&&e.query.staking.erasStakers?zh(t.map((t=>e.query.staking.erasStakers(n,t)))):Le(t.map((()=>b)))])}function Bg(e,t,n,r,a){return Rg(e,n,t,r,a).pipe(Ie((([t,a,i,s,o,c,d,u])=>function(e,t,{withLedger:n=!1}){const r=t.filter((e=>n&&!!e&&e.isSome)).map((e=>e.unwrap())),a=e.registry.createType("Option");return(r.length?zh(r.map((t=>e.query.staking.ledger(t)))):Le([])).pipe(ze((e=>{let n=-1;return t.map((t=>t&&t.isSome&&e[++n]||a))})))}(e,t,r).pipe(ze((r=>n.map(((n,l)=>function(e,t,n,r,a,i,s,o,c,d,u){return{accountId:t,claimedRewardsEras:Hg(e,d),controllerId:n?.unwrapOr(null)||null,exposureEraStakers:u,exposureMeta:c,exposurePaged:s,nominators:r.isSome?r.unwrap().targets:[],rewardDestination:(l=a,"boolean"==typeof l.isSome?l.unwrapOr(null):l),stakingLedger:o.unwrapOrDefault(),stashId:t,validatorPrefs:i};var l}(e,n,t[l],a[l],i[l],s[l],o[l],r[l],c[l],d[l],u[l])))))))))}const Lg=Pb(((e,t,n,r)=>e.derive.staking.queryMulti([t],n,r)));function zg(e,t){return wb(e,((e,n,r)=>t.derive.session.indexes().pipe(Ie((({activeEra:a})=>{const i=e.map((e=>t.registry.createType("AccountId",e))),s=r||0;return i.length?Bg(t,a,i,n,s):Le([])})))))}function Ug(e,t){return wb(e,((e,n,r=!1)=>{const a=e.map((e=>t.registry.createType("AccountId",e).toString()));return t.derive.staking._erasExposure(n,r).pipe(ze((e=>a.map((t=>e.map((({era:e,nominators:n,validators:r})=>{const a=!!r[t],i={},s=n[t]||[];return a?i[t]=r[t]:s&&s.forEach((({validatorId:e})=>{i[e]=r[e]})),{era:e,isEmpty:!Object.keys(i).length,isValidator:a,nominating:s,validators:i}})))))))}))}function Dg(e,t){return wb(e,((e,n=!1)=>t.derive.staking.erasHistoric(n).pipe(Ie((r=>t.derive.staking._stakerExposures(e,r,n))))))}const qg=Pb(((e,t,n)=>e.derive.staking.stakerExposures([t],n)));function jg(e,t){return wb(e,((e,n,r)=>{const a=t.registry.createType("AccountId",e).toString();return t.derive.staking._erasPoints(n,r).pipe(ze((e=>e.map((({era:e,eraPoints:n,validators:r})=>({era:e,eraPoints:n,points:r[a]||t.registry.createType("RewardPoint")}))))))}))}const Fg=eg("_stakerPoints");function Xg(e,t){return wb(e,((e,n,r)=>t.query.staking.erasValidatorPrefs.multi(n.map((t=>[t,e]))).pipe(ze((e=>e.map(((e,t)=>({era:n[t],validatorPrefs:e}))))))))}const Wg=eg("_stakerPrefs");function Zg(e,t){const n=t?(t.legacyClaimedRewards||t.claimedRewards).toArray():[];return e.toArray().concat(n)}function Gg(e,t,{claimedRewardsEras:n,rewards:r,stakingLedger:a}){const i=e.filter((e=>!Zg(n,a).some((t=>t.eq(e))))),s=t.map((([e])=>e)),o=t.map((([,e])=>e));return r.filter((({isEmpty:e})=>!e)).filter((e=>!!i.some((t=>e.era.eq(t)))&&(function(e,t,n,r){const a=[];Object.keys(n.validators).forEach((i=>{const s=e.indexOf(i);if(-1!==s){const e=t[s].stakingLedger;Zg(r,e).some((e=>n.era.eq(e)))&&a.push(i)}})),a.forEach((e=>{delete n.validators[e]}))}(s,o,e,n),!0))).filter((({validators:e})=>0!==Object.keys(e).length)).map((e=>(0,M.b)({},e,{isClaimed:i.some((t=>e.era.eq(t))),nominators:e.nominating.filter((t=>e.validators[t.validatorId]))})))}function Kg(e,t){return wb(e,((e,n=!1)=>zh([t.derive.staking._erasPoints(e,n),t.derive.staking._erasPrefs(e,n),t.derive.staking._erasRewards(e,n)])))}function Jg(e,t){return wb(e,((e,n,r=!1)=>{const a=n.map((e=>"number"==typeof e||"string"==typeof e?t.registry.createType("u32",e):e));return zh([t.derive.staking.queryMulti(e,{withClaimedRewardsEras:!0,withLedger:!0}),t.derive.staking._stakerExposures(e,a,r),t.derive.staking._stakerRewardsEras(a,r)]).pipe(Ie((([e,a,i])=>{const s=e.map((({claimedRewardsEras:e,stakingLedger:n,stashId:r},s)=>r&&(n||e)?function(e,t,[n,r,a],i,s){return i.map((({era:i,isEmpty:o,isValidator:c,nominating:d,validators:u})=>{const{eraPoints:l,validators:f}=n.find((e=>e.era.eq(i)))||{eraPoints:lt,validators:{}},{eraReward:p}=a.find((e=>e.era.eq(i)))||{eraReward:e.registry.createType("Balance")},{validators:h}=r.find((e=>e.era.eq(i)))||{validators:{}},b={},m=t.toString();return Object.entries(u).forEach((([t,n])=>{const r=f[t]||lt,a=h[t]?.commission.unwrap()||lt,i=n.total?n.total?.unwrap():n.pageTotal?n.pageTotal?.unwrap():lt;let s,o=lt;if(!(i.isZero()||r.isZero()||l.isZero())){o=p.mul(r).div(l);const e=a.mul(o).div(mt);let c;if(t===m)if(n.own)c=n.own.unwrap();else{const e=n.others.find((({who:e})=>e.eq(t)));c=e?e.value.unwrap():lt}else{const e=n.others.find((({who:e})=>e.eq(m)));c=e?e.value.unwrap():lt}s=o.sub(e).imul(c).div(i).iadd(t===m?e:lt)}b[t]={total:e.registry.createType("Balance",o),value:e.registry.createType("Balance",s)}})),{era:i,eraReward:p,isClaimed:s.some((e=>e.eq(i))),isEmpty:o,isValidator:c,nominating:d,validators:b}}))}(t,r,i,a[s],e):[]));if(r)return Le(s);const[o,c]=s.reduce((([e,t],n)=>{const r=[];return t.push(r),n.forEach((({validators:t})=>Object.keys(t).forEach((t=>{r.includes(t)||(r.push(t),e.includes(t)||e.push(t))})))),[e,t]}),[[],[]]);return t.derive.staking.queryMulti(o,{withClaimedRewardsEras:!0,withLedger:!0}).pipe(ze((t=>e.map((({claimedRewardsEras:e,stakingLedger:r},a)=>Gg(n,c[a].map((e=>[e,t.find((t=>t.accountId.eq(e)))])).filter((e=>!!e[1])),{claimedRewardsEras:e,rewards:s[a],stakingLedger:r}))))))})))}))}const Yg=Pb(((e,t,n)=>e.derive.staking.erasHistoric(n).pipe(Ie((r=>e.derive.staking._stakerRewards([t],r,n))))));function Qg(e,t){return wb(e,((e,n)=>e.length&&n.length?t.derive.staking._stakerRewards(e,n,!1):Le([])))}function $g(e,t){return wb(e,((e,n=!1)=>t.derive.staking.erasHistoric(n).pipe(Ie((n=>t.derive.staking.stakerRewardsMultiEras(e,n))))))}function ev(e,t){return wb(e,((e,n,r)=>{const a=t.registry.createType("AccountId",e).toString();return t.derive.staking._erasSlashes(n,r).pipe(ze((e=>e.map((({era:e,nominators:n,validators:r})=>({era:e,total:n[a]||r[a]||t.registry.createType("Balance")}))))))}))}const tv=eg("_stakerSlashes");function nv(e,t){return wb(e,(()=>function(e){let t=Date.now();return e.query.system.events().pipe(ze((e=>(t=e.filter((({event:e,phase:t})=>{try{return t.isApplyExtrinsic&&"staking"===e.section&&"Bonded"===e.method}catch{return!1}}))?Date.now():t,t))),zb(t),vb({skipTimeout:!0}))}(t).pipe(Ie((()=>t.query.staking.validators.keys())),ze((e=>e.map((({args:[e]})=>e)).filter((e=>e)))))))}function rv(e,t){return wb(e,(()=>t.query.staking.erasStakersOverview?t.derive.session.indexes().pipe(Ie((({currentEra:e})=>t.query.staking.erasStakersOverview.keys(e))),ze((e=>[...new Set(e.map((({args:[,e]})=>e.toString())))].map((e=>t.registry.createType("AccountId",e)))))):t.query.staking.erasStakers?t.derive.session.indexes().pipe(Ie((({currentEra:e})=>t.query.staking.erasStakers.keys(e))),ze((e=>[...new Set(e.map((({args:[,e]})=>e.toString())))].map((e=>t.registry.createType("AccountId",e)))))):t.query.staking.currentElected()))}function av(e,t){return wb(e,(()=>zh([t.query.session?t.query.session.validators():Le([]),t.query.staking?t.derive.staking.nextElected():Le([])]).pipe(ze((([e,t])=>({nextElected:t.length?t:e,validators:e}))))))}const iv={withController:!0,withPrefs:!0};function sv(e,t){return wb(e,((e=iv)=>zh([t.derive.staking.validators(),t.derive.staking.stashes()]).pipe(Ie((([{nextElected:n},r])=>{const a=n.map((e=>e.toString())),i=r.filter((e=>!a.includes(e.toString())));return t.derive.staking.queryMulti(i,e).pipe(ze((e=>({info:e,waiting:i}))))})))))}const ov=Zb("technicalCommittee"),cv=Kb("technicalCommittee"),dv=Yb("technicalCommittee"),uv=Qb("technicalCommittee"),lv=$b("technicalCommittee"),fv=Jb("technicalCommittee"),pv=em("technicalCommittee");function hv(e,t){return wb(e,(()=>t.query.treasury?zh([t.query.treasury.proposalCount(),t.query.treasury.approvals()]).pipe(Ie((([e,n])=>function(e,t,n){const r=[],a=t.toNumber();for(let s=0;se.eqn(s)))||r.push(e.registry.createType("ProposalIndex",s));const i=[...r,...n];return zh([e.query.treasury.proposals.multi(i),e.derive.council?e.derive.council.proposals():Le([])]).pipe(ze((([r,a])=>function(e,{allIds:t,allProposals:n,approvalIds:r,councilProposals:a,proposalCount:i}){const s=[],o=[],c=a.filter((({proposal:t})=>t&&(e.tx.treasury.approveProposal&&e.tx.treasury.approveProposal.is(t)||e.tx.treasury.rejectProposal&&e.tx.treasury.rejectProposal.is(t))));return t.forEach(((e,t)=>{if(n[t].isSome){const a=c.filter((({proposal:t})=>t&&e.eq(t.args[0]))).sort(((e,t)=>e.proposal&&t.proposal?e.proposal.method.localeCompare(t.proposal.method):e.proposal?-1:1)),i=r.some((t=>t.eq(e))),d={council:a,id:e,proposal:n[t].unwrap()};i?s.push(d):o.push(d)}})),{approvals:s,proposalCount:i,proposals:o}}(e,{allIds:i,allProposals:r,approvalIds:n,councilProposals:a,proposalCount:t}))))}(t,e,n)))):Le({approvals:[],proposalCount:t.registry.createType("ProposalIndex"),proposals:[]})))}function bv(e,t){return wb(e,(e=>zh([t.rpc.chain.getBlock(e),t.queryAt(e).pipe(Ie((e=>e.system.events())))]).pipe(ze((([e,t])=>({block:e,events:t}))))))}const mv=250,yv=new st(6e3),xv=new st(5),gv=new st(3e5);function vv(e,t){return e.derive.balances.account(t).pipe(ze((({accountNonce:e})=>e)))}function wv(e,t){return e.call.accountNonceApi?e.call.accountNonceApi.accountNonce(t):e.rpc.system?.accountNextIndex?e.rpc.system.accountNextIndex(t):vv(e,t)}function Vv(e){return zh([e.rpc.chain.getHeader().pipe(Ie((t=>t.parentHash.isEmpty?Le(t):e.rpc.chain.getHeader(t.parentHash).pipe(Gh((()=>Le(t))))))),e.rpc.chain.getFinalizedHead().pipe(Ie((t=>e.rpc.chain.getHeader(t).pipe(Gh((()=>Le(null)))))))]).pipe(ze((([e,t])=>!t||Um(e).sub(Um(t)).gt(xv)?e:t)))}function Tv(e){const t=e.consts.babe?.expectedBlockTime||e.consts.aura?.slotDuration||e.consts.timestamp?.minimumPeriod.muln(2);return t&&t.isZero&&!t.isZero()?t:void 0}function Sv(e,t){return(e,n,r)=>zh([(0,Fe.b)(n)?vv(t,e):-1===n?wv(t,e):Le(t.registry.createType("Index",n)),(0,Fe.b)(r)||(0,Lt.E)(r)&&r>0?Vv(t):Le(null)]).pipe(ze((([e,n])=>({header:n,mortalLength:Math.min(t.consts.system?.blockHashCount?.toNumber()||mv,gv.div(Tv(t)||yv).iadd(xv).toNumber()),nonce:e}))))}const kv={accounts:o,alliance:c,bagsList:d,balances:u,bounties:l,chain:f,contracts:p,council:h,crowdloan:b,democracy:m,elections:y,imOnline:x,membership:g,parachains:v,session:w,society:V,staking:T,technicalCommittee:S,treasury:k,tx:_},_v={allianceMotion:{instances:["allianceMotion"],methods:[]},bagsList:{instances:["voterBagsList","voterList","bagsList"],methods:[],withDetect:!0},contracts:{instances:["contracts"],methods:[]},council:{instances:["council"],methods:[],withDetect:!0},crowdloan:{instances:["crowdloan"],methods:[]},democracy:{instances:["democracy"],methods:[]},elections:{instances:["phragmenElection","electionsPhragmen","elections","council"],methods:[],withDetect:!0},imOnline:{instances:["imOnline"],methods:[]},membership:{instances:["membership"],methods:[]},parachains:{instances:["parachains","registrar"],methods:[]},session:{instances:["session"],methods:[]},society:{instances:["society"],methods:[]},staking:{instances:["staking"],methods:["erasRewardPoints"]},technicalCommittee:{instances:["technicalCommittee"],methods:[],withDetect:!0},treasury:{instances:["treasury"],methods:[]}};function Pv(e,t,n){const r={},a=Object.keys(n),i=Object.keys(t.query),s=t.runtimeVersion.specName,o=e=>i.includes(e),c=e=>function(e,t,n){return e.registry.getModuleInstances(t,n)||[]}(t,s,e).some(o),d=e=>Object.keys(n[e]),u=(r,a)=>n[r][a](e,t),l=e=>{return!_v[e]||_v[e].instances.some(o)&&(!_v[e].methods.length||_v[e].methods.every((n=_v[e].instances,e=>n.some((n=>i.includes(n)&&t.query[n][e])))))||_v[e].withDetect&&_v[e].instances.some(c);var n};for(let f=0,p=a.length;fObject.entries(i[e].rpc||{}).forEach((([t,n])=>{const r=n.aliasSection||e;Iv[r]||(Iv[r]={}),Iv[r][t]=(0,M.b)({},n,{isSubscription:!!n.pubsub,jsonrpc:`${r}_${t}`,method:t,section:r})}))));const Nv=Iv,Ev=(0,it.v)("rpc-core"),Ov={fallback:void 0,modifier:{isOptional:!0},type:{asMap:{linked:{isTrue:!1}},isMap:!1}};function Av(e,{noErrorLog:t,params:n,type:r},a){t||Ev.error(`${e}(${n.map((({isOptional:e,name:t,type:n})=>`${t}${e?"?":""}: ${n}`)).join(", ")}): ${r}:: ${a.message}`)}function Cv(e){return["0x3a636f6465"].includes(e.toHex())}class Hv{__internal__instanceId;__internal__isPedantic;__internal__registryDefault;__internal__storageCache;__internal__storageCacheHits=0;__internal__getBlockRegistry;__internal__getBlockHash;mapping=new Map;provider;sections=[];constructor(e,t,{isPedantic:n=!0,provider:r,userRpc:a={}}){if(!r||!(0,qe.T)(r.send))throw new Error("Expected Provider to API create");this.__internal__instanceId=e,this.__internal__isPedantic=n,this.__internal__registryDefault=t,this.provider=r;const i=Object.keys(Nv);this.sections.push(...i),this.__internal__storageCache=new Mv.q(Mv.b),this.addUserInterfaces(a)}get isConnected(){return this.provider.isConnected}connect(){return this.provider.connect()}async disconnect(){return this.provider.disconnect()}get stats(){const e=this.provider.stats;return e?{...e,core:{cacheHits:this.__internal__storageCacheHits,cacheSize:this.__internal__storageCache.length}}:void 0}setRegistrySwap(e){this.__internal__getBlockRegistry=Zh(e,{getInstanceId:()=>this.__internal__instanceId})}setResolveBlockHash(e){this.__internal__getBlockHash=Zh(e,{getInstanceId:()=>this.__internal__instanceId})}addUserInterfaces(e){this.sections.push(...Object.keys(e).filter((e=>!this.sections.includes(e))));for(let t=0,n=this.sections.length;te?this._createMethodSubscribe(n,t,i):this._createMethodSend(n,t,i)))}}}}_memomize(e,t){const n={getInstanceId:()=>this.__internal__instanceId},r=Zh(e(!0),n);return r.raw=Zh(e(!1),n),r.meta=t,r}_formatResult(e,t,n,r,a,i,s){return e?this._formatOutput(t,n,r,a,i,s):s}_createMethodSend(e,t,n){const r=n.endpoint||`${e}_${t}`,a=n.params.findIndex((({isHistoric:e})=>e));let i=null;const s=async(e,i)=>{const s=-1===a?null:i[a],o=s&&"BlockNumber"===n.params[a].type?await(this.__internal__getBlockHash?.(s)):s,{registry:c}=e&&o&&this.__internal__getBlockRegistry?await this.__internal__getBlockRegistry((0,E.e)(o)):{registry:this.__internal__registryDefault},d=this._formatParams(c,null,n,i),u=await this.provider.send(r,d.map((e=>e.toJSON())),!!o);return this._formatResult(e,c,o,t,n,d,u)};return i=this._memomize((e=>(...r)=>{const o=e&&-1!==a&&!!r[a];return new he((a=>(s(e,r).then((e=>{a.next(e),a.complete()})).catch((e=>{Av(t,n,e),a.error(e),a.complete()})),()=>{e?i?.unmemoize(...r):i?.raw.unmemoize(...r)}))).pipe(nb(1),o?mb():Qh())}),n),i}_createSubscriber({paramsJson:e,subName:t,subType:n,update:r},a){return new Promise(((i,s)=>{this.provider.subscribe(n,t,e,r).then(i).catch((e=>{a(e),s(e)}))}))}_createMethodSubscribe(e,t,n){const[r,a,i]=n.pubsub,s=`${e}_${a}`,o=`${e}_${i}`,c=`${e}_${r}`;let d=null;return d=this._memomize((e=>(...r)=>new he((a=>{let i=Promise.resolve(null);const u=this.__internal__registryDefault,l=e=>{Av(t,n,e),a.error(e)};try{const o=this._formatParams(u,null,n,r),d=(r,i)=>{if(r)Av(t,n,r);else try{a.next(this._formatResult(e,u,null,t,n,o,i))}catch(r){a.error(r)}};i=this._createSubscriber({paramsJson:o.map((e=>e.toJSON())),subName:s,subType:c,update:d},l)}catch(f){l(f)}return()=>{e?d?.unmemoize(...r):d?.raw.unmemoize(...r),i.then((e=>(0,Kt.k)(e)?Promise.resolve(!1):this.provider.unsubscribe(c,o,e))).catch((e=>Av(t,n,e)))}})).pipe(vb())),n),d}_formatParams(e,t,n,r){const a=r.length,i=n.params.filter((({isOptional:e})=>!e)).length;if(an.params.length)throw new Error(`Expected ${n.params.length} parameters${i===n.params.length?"":` (${n.params.length-i} optional)`}, ${a} found instead`);const s=new Array(a);for(let o=0;o"===r.type){const t=i,r=t.length,s=new Array(r);for(let n=0;ne===s)),c=(0,Fe.b)(o);if(c&&a){const e=this.__internal__storageCache.get(s);if(e)return this.__internal__storageCacheHits++,e}const d=c?null:o[1],u=(0,Kt.k)(d),l=u||Cv(n)?d:(0,E.e)(d),f=this._newType(e,t,n,l,u,i);return this._setToCache(s,f),f}_setToCache(e,t){this.__internal__storageCache.set(e,t)}_newType(e,t,n,r,a,i=-1){const s=n.outputType||"Raw",o=n.meta||Ov,c=-1===i?"":` entry ${i}:`;try{return e.createTypeUnsafe(s,[a?o.fallback?s.includes("Linkage<")?Mt((0,ts.V)(o.fallback.toHex()),new Uint8Array(2)):(0,ts.V)(o.fallback.toHex()):void 0:o.modifier.isOptional?e.createTypeUnsafe(s,[r],{blockHash:t,isPedantic:this.__internal__isPedantic}):r],{blockHash:t,isFallback:a&&!!o.fallback,isOptional:o.modifier.isOptional,isPedantic:this.__internal__isPedantic&&!o.modifier.isOptional})}catch(d){throw new Error(`Unable to decode storage ${n.section||"unknown"}.${n.method||"unknown"}:${c}: ${d.message}`)}}}var Rv=n(19588),Bv=n(98967);const Lv=(0,Bv.Q)(0),zv=(0,Bv.Q)(1),Uv=(Number.MAX_SAFE_INTEGER,(0,Bv.Q)("11400714785074694791")),Dv=(0,Bv.Q)("14029467366897019727"),qv=(0,Bv.Q)("1609587929392839161"),jv=(0,Bv.Q)("9650029242287828579"),Fv=(0,Bv.Q)("2870177450012600261"),Xv=(0,Bv.Q)("0xffffffffffffffff"),Wv=(0,Bv.Q)(7),Zv=(0,Bv.Q)(11),Gv=(0,Bv.Q)(12),Kv=(0,Bv.Q)(16),Jv=(0,Bv.Q)(18),Yv=(0,Bv.Q)(23),Qv=(0,Bv.Q)(27),$v=(0,Bv.Q)(29),ew=(0,Bv.Q)(31),tw=(0,Bv.Q)(32),nw=(0,Bv.Q)(33),rw=(0,Bv.Q)(64),aw=(0,Bv.Q)(256);function iw(e,t){const n=e&Xv;return(n<>rw-t)&Xv}function sw(e,t,n){const r=new Array(n);let a=0;for(let s=0;s=0;s--)i=(i<=0){const e=e=>Uv*iw(e+Dv*sw(t,a,4),ew);do{n.v1=e(n.v1),a+=8,n.v2=e(n.v2),a+=8,n.v3=e(n.v3),a+=8,n.v4=e(n.v4),a+=8}while(a<=r)}return a=32?((((iw(i,zv)+iw(s,Wv)+iw(o,Gv)+iw(c,Jv)^Uv*iw(i*Dv,ew))*Uv+jv^Uv*iw(s*Dv,ew))*Uv+jv^Uv*iw(o*Dv,ew))*Uv+jv^Uv*iw(c*Dv,ew))*Uv+jv:n+Fv);for(;d<=a-8;)u=Xv&jv+Uv*iw(u^Uv*iw(Dv*sw(r,d,4),ew),Qv),d+=8;for(d+4<=a&&(u=Xv&qv+Dv*iw(u^Uv*sw(r,d,2),Yv),d+=4);d>nw),u=Xv&qv*(u^u>>$v),u=Xv&(u^u>>tw);const l=new Uint8Array(8);for(let f=7;f>=0;f--)l[f]=Number(u%aw),u/=aw;return l}function cw(e,t=64,n){const r=Math.ceil(t/64),a=(0,E.e)(e);if(!Ba.CW||!n&&Ti())return Vi(a,r);const i=new Uint8Array(8*r);for(let s=0;scw(e,128),uw={Blake2_128:e=>Pi(e,128),Blake2_128Concat:e=>Mt(Pi(e,128),(0,E.e)(e)),Blake2_256:e=>Pi(e,256),Identity:e=>(0,E.e)(e),Twox128:e=>cw(e,128),Twox256:e=>cw(e,256),Twox64Concat:e=>Mt(cw(e,64),(0,E.e)(e))};const lw={args:[],hashers:[],keys:[]};function fw(e){return!(0,Fe.b)(e)}function pw({method:e,section:t},{args:n,keys:r}){if(!Array.isArray(n))throw new Error(`Call to ${jt(t||"unknown")}.${jt(e||"unknown")} needs ${r.length} arguments`);if(n.filter(fw).length!==r.length)throw new Error(`Call to ${jt(t||"unknown")}.${jt(e||"unknown")} needs ${r.length} arguments, found [${n.join(", ")}]`)}function hw(e,t,{args:n,hashers:r,keys:a}){const i=a.length,s=new Array(i);for(let c=0;c`${t[r].type}(${fu(e.lookup,n)})`))}const o=["module","method"].concat(...n.args.map(((e,t)=>s[t])));return{inner:a.concat(...i).map(((e,t)=>({name:o[t],outer:[e]})))}}function mw(e,t,n){const[r,a]=hw(e,t,n);return Mt(...r,...a)}function yw(e,t,n){return pw(t,n),ar(mw(e,t,n))}function xw(e,t,n){const{meta:r,method:a,prefix:i,section:s}=t,o=function(e,t,n){const{meta:{type:r}}=t;let a=null;return(...i)=>{if(r.isPlain)return a||(a=n.skipHashing?ar((0,E.e)(n.key)):yw(e,t,lw)),a;const{hashers:s,key:o}=r.asMap;return 1===s.length?yw(e,t,{args:i,hashers:s,keys:[o]}):yw(e,t,{args:i,hashers:s,keys:e.lookup.getSiType(o).def.asTuple})}}(e,t,n);return o.inspect=function(e,t,n){const{meta:{type:r}}=t;return(...a)=>{if(r.isPlain)return n.skipHashing?{inner:[],name:"wellKnown",outer:[(0,E.e)(n.key)]}:bw(e,t,lw);const{hashers:i,key:s}=r.asMap;return 1===i.length?bw(e,t,{args:a,hashers:i,keys:[s]}):bw(e,t,{args:a,hashers:i,keys:e.lookup.getSiType(s).def.asTuple})}}(e,t,n),o.meta=r,o.method=jt(a),o.prefix=i,o.section=s,o.toJSON=()=>(0,M.b)({storage:{method:a,prefix:i,section:s}},r.toJSON()),o}function gw(e,t,n){const{meta:{type:r}}=t,a=xw(e,t,n);return r.isMap&&function(e,t,n){const{meta:{type:r},method:a,section:i}=t;n.iterKey=function(e,{meta:{docs:t,name:n,type:r},section:a},{method:i},s){const o=e.createTypeUnsafe("StorageEntryMetadataLatest",[{docs:t,fallback:e.createTypeUnsafe("Bytes",[]),modifier:e.createTypeUnsafe("StorageEntryModifierLatest",[1]),name:n,type:e.createTypeUnsafe("StorageEntryTypeLatest",[r.asMap.key,0])}]);s.meta=o;const c=(...t)=>e.createTypeUnsafe("StorageKey",[s(...t),{method:i,section:a}]);return c.meta=o,c}(e,t,n,((...n)=>{if(n.length&&(r.isPlain||n.length>=r.asMap.hashers.length))throw new Error(`Iteration of ${jt(i||"unknown")}.${jt(a||"unknown")} needs arguments to be at least one less than the full arguments, found [${n.join(", ")}]`);if(n.length&&r.isMap){const{hashers:a,key:i}=r.asMap,s=1===a.length?[i]:e.lookup.getSiType(i).def.asTuple;return new rt(e,mw(e,t,{args:n,hashers:a.slice(0,n.length),keys:s.slice(0,n.length)}))}return new rt(e,mw(e,t,lw))}))}(e,t,a),a.keyPrefix=(...e)=>a.iterKey&&a.iterKey(...e)||pr(a())[1],a}function vw(e,t){const n=t.toLowerCase();return e.lookup.types.find((e=>e.type.def.isPrimitive&&e.type.def.asPrimitive.toString().toLowerCase()===n||e.type.def.isHistoricMetaCompat&&e.type.def.asHistoricMetaCompat.toString().toLowerCase()===n))}function ww(e,t){let n=vw(e,t);if(!n&&("Bytes"===t||t.startsWith("[u8;"))){const r=vw(e,"u8");if(r)if("Bytes"===t)n=e.lookup.types.find((e=>e.type.def.isSequence&&e.type.def.asSequence.type.eq(r.id)||e.type.def.isHistoricMetaCompat&&e.type.def.asHistoricMetaCompat.eq(t)));else{const a=Rr(t);n=e.lookup.types.find((e=>e.type.def.isArray&&e.type.def.asArray.eq({len:a.length,type:r.id})||e.type.def.isHistoricMetaCompat&&e.type.def.asHistoricMetaCompat.eq(t)))}}return n||console.warn(`Unable to map ${t} to a lookup index`),n}function Vw({method:e,prefix:t,section:n},r,{docs:a,type:i}){return s=>gw(s,{meta:s.createTypeUnsafe("StorageEntryMetadataLatest",[{docs:s.createTypeUnsafe("Vec",[[a]]),modifier:s.createTypeUnsafe("StorageEntryModifierLatest",["Required"]),name:s.createTypeUnsafe("Text",[e]),toJSON:()=>r,type:s.createTypeUnsafe("StorageEntryTypeLatest",[{Plain:ww(s,i)?.id||0}])}]),method:e,prefix:t,section:n},{key:r,skipHashing:!0})}function Tw(e,t,n){return Vw({method:e,prefix:"Substrate",section:"substrate"},t,n)}const Sw={changesTrieConfig:Tw("changesTrieConfig",":changes_trie",{docs:"Changes trie configuration is stored under this key.",type:"u32"}),childStorageKeyPrefix:Tw("childStorageKeyPrefix",":child_storage:",{docs:"Prefix of child storage keys.",type:"u32"}),code:Tw("code",":code",{docs:"Wasm code of the runtime.",type:"Bytes"}),extrinsicIndex:Tw("extrinsicIndex",":extrinsic_index",{docs:"Current extrinsic index (u32) is stored under this key.",type:"u32"}),heapPages:Tw("heapPages",":heappages",{docs:"Number of wasm linear memory pages required for execution of the runtime.",type:"u64"}),intrablockEntropy:Tw("intrablockEntropy",":intrablock_entropy",{docs:"Current intra-block entropy (a universally unique `[u8; 32]` value) is stored here.",type:"[u8; 32]"})};const kw={docs:"Returns the current pallet version from storage",type:"u16"};function _w(e,{pallets:t},n){const r=function(e){const t={},n=Object.entries(Sw);for(let r=0,a=n.length;r$r({palletVersion:Vw({method:"palletVersion",prefix:o,section:t},mw(e,{method:":__STORAGE_VERSION__:",prefix:n.toString()},lw),kw)(e)},a,(n=>gw(e,{meta:n,method:n.name.toString(),prefix:o,section:t},{})),If)))}}return r}function Pw(e){return t=>t?e[t.charCodeAt(0)]+t.slice(1):""}const Mw=Pw(zt);function Iw(){return new B}function Nw(e,t){var n=arguments.length>=2;return function(r){return r.pipe(e?function(e,t){return _e((function(n,r){var a=0;n.subscribe(Pe(r,(function(n){return e.call(t,n,a++)&&r.next(n)})))}))}((function(t,n){return e(t,n,r)})):fe,(i=1)<=0?function(){return my}:_e((function(e,t){var n=0;e.subscribe(Pe(t,(function(e){++n<=i&&(t.next(e),i<=n&&t.complete())})))})),n?function(e){return _e((function(t,n){var r=!1;t.subscribe(Pe(n,(function(e){r=!0,n.next(e)}),(function(){r||n.next(e),n.complete()})))}))}(t):(void 0===(a=function(){return new B})&&(a=Iw),_e((function(e,t){var n=!1;e.subscribe(Pe(t,(function(e){n=!0,t.next(e)}),(function(){return n?t.complete():t.error(a())})))}))));var a,i}}function Ew(e){return(0,qe.T)(e.sign)}const Ow=(0,it.v)("api/util");function Aw(e,{block:{extrinsics:t,header:n}},r,a){for(const[i,s]of t.entries())if(s.hash.eq(e))return{blockNumber:zm(n.number)?n.number.unwrap():n.number,events:r.filter((({phase:e})=>e.isApplyExtrinsic&&e.asApplyExtrinsic.eqn(i))),txIndex:i};if(a.isInBlock){const r=t.map((e=>e.hash.toHex()));Ow.warn(`block ${n.hash.toHex()}: Unable to find extrinsic ${e.toHex()} inside ${r.join(", ")}`)}return{}}const Cw=e=>e;function Hw(e,t,n,r){return e.filter((({event:e})=>t===e.section&&n.includes(e.method))).map((e=>r(e)))}function Rw({event:{data:[e]}}){return e}function Bw({event:{data:e,method:t}}){return"ExtrinsicSuccess"===t?e[0]:e[1]}class Lw{dispatchError;dispatchInfo;internalError;events;status;txHash;txIndex;blockNumber;constructor({blockNumber:e,dispatchError:t,dispatchInfo:n,events:r,internalError:a,status:i,txHash:s,txIndex:o}){this.dispatchError=t||function(e=[]){return Hw(e,"system",["ExtrinsicFailed"],Rw)[0]}(r),this.dispatchInfo=n||function(e=[]){return Hw(e,"system",["ExtrinsicFailed","ExtrinsicSuccess"],Bw)[0]}(r),this.events=r||[],this.internalError=a,this.status=i,this.txHash=s,this.txIndex=o,this.blockNumber=e}get isCompleted(){return this.isError||this.status.isInBlock||this.status.isFinalized}get isError(){return this.status.isDropped||this.status.isFinalityTimeout||this.status.isInvalid||this.status.isUsurped}get isFinalized(){return this.status.isFinalized}get isInBlock(){return this.status.isInBlock}get isWarning(){return this.status.isRetracted}filterRecords(e,t){return Hw(this.events,e,Array.isArray(t)?t:[t],Cw)}findRecord(e,t){return this.filterRecords(e,t)[0]}toHuman(e){return{dispatchError:this.dispatchError?.toHuman(),dispatchInfo:this.dispatchInfo?.toHuman(),events:this.events.map((t=>t.toHuman(e))),internalError:this.internalError?.message.toString(),status:this.status.toHuman(e)}}}function zw(e,t,n,{header:r,mortalLength:a,nonce:i}){if(!r){if(n.era&&!n.blockHash)throw new Error("Expected blockHash to be passed alongside non-immortal era options");return(0,Lt.E)(n.era)&&(delete n.era,delete n.blockHash),Dw(e,n,{nonce:i})}return Dw(e,n,{blockHash:r.hash,era:t.createTypeUnsafe("ExtrinsicEra",[{current:r.number,period:n.era||a}]),nonce:i})}function Uw(e,t){let n={};return(0,qe.T)(e)?t=e:n=(0,M.b)({},e),[n,t]}function Dw(e,t,n){return(0,M.b)({blockHash:e.genesisHash,genesisHash:e.genesisHash},t,n,{runtimeVersion:e.runtimeVersion,signedExtensions:e.registry.signedExtensions,version:e.extrinsicType})}function qw({api:e,apiType:t,blockHash:n,decorateMethod:r}){const a=e.registry.createClass("Extrinsic");return class extends a{__internal__ignoreStatusCb;__internal__transformResult=P.D;constructor(n,r){super(n,r,{version:e.extrinsicType}),this.__internal__ignoreStatusCb="rxjs"===t}get hasDryRun(){return(0,qe.T)(e.rpc.system?.dryRun)}get hasPaymentInfo(){return(0,qe.T)(e.call.transactionPaymentApi?.queryInfo)}dryRun(t,a){if(!this.hasDryRun)throw new Error("The system.dryRun RPC call is not available in your environment");return n||(0,I.K)(a)||(0,ut.b)(a)?r((()=>e.rpc.system.dryRun(this.toHex(),n||a))):r((()=>this.__internal__observeSign(t,a).pipe(Ie((()=>e.rpc.system.dryRun(this.toHex()))))))()}paymentInfo(t,a){if(!this.hasPaymentInfo)throw new Error("The transactionPaymentApi.queryInfo runtime call is not available in your environment");if(n||(0,I.K)(a)||(0,ut.b)(a))return r((()=>e.callAt(n||a).pipe(Ie((e=>{const t=this.toU8a();return e.transactionPaymentApi.queryInfo(t,t.length)})))));const[i]=Uw(a),s=Ew(t)?t.address:t.toString();return r((()=>e.derive.tx.signingInfo(s,i.nonce,i.era).pipe(Nw(),Ie((t=>{const n=zw(e,this.registry,i,t),r=Dw(e,n,{}),a=e.tx(this.toU8a()).signFake(s,r).toU8a();return e.call.transactionPaymentApi.queryInfo(a,a.length)})))))()}send(t){const n=e.hasSubscriptions&&(this.__internal__ignoreStatusCb||!!t);return r(n?this.__internal__observeSubscribe:this.__internal__observeSend)(t)}signAsync(e,t){return r((()=>this.__internal__observeSign(e,t).pipe(ze((()=>this)))))()}signAndSend(t,n,a){const[i,s]=Uw(n,a),o=e.hasSubscriptions&&(this.__internal__ignoreStatusCb||!!s);return r((()=>this.__internal__observeSign(t,i).pipe(Ie((e=>o?this.__internal__observeSubscribe(e):this.__internal__observeSend(e))))))(s)}withResultTransform(e){return this.__internal__transformResult=e,this}__internal__observeSign=(t,n)=>{const r=Ew(t)?t.address:t.toString(),a=function(e={}){return(0,pn.f)(e)||(0,Lt.E)(e)?{nonce:e}:e}(n);return e.derive.tx.signingInfo(r,a.nonce,a.era).pipe(Nw(),Rb((async n=>{const i=zw(e,this.registry,a,n);let s=-1,o=null;if(Ew(t))this.sign(t,i);else{const e=await this.__internal__signViaSigner(r,i,n.header);s=e.id,e.signedTransaction&&(o=e.signedTransaction)}return{options:i,signedTransaction:o,updateId:s}})))};__internal__observeStatus=(t,n)=>{if(!n.isFinalized&&!n.isInBlock)return Le(this.__internal__transformResult(new Lw({status:n,txHash:t})));const r=n.isInBlock?n.asInBlock:n.asFinalized;return e.derive.tx.events(r).pipe(ze((({block:e,events:r})=>this.__internal__transformResult(new Lw({...Aw(t,e,r,n),status:n,txHash:t})))),Gh((e=>Le(this.__internal__transformResult(new Lw({internalError:e,status:n,txHash:t}))))))};__internal__observeSend=t=>e.rpc.author.submitExtrinsic(t?.signedTransaction||this).pipe(Dh((e=>{this.__internal__updateSigner(e,t)})));__internal__observeSubscribe=t=>{const n=this.hash;return e.rpc.author.submitAndWatchExtrinsic(t?.signedTransaction||this).pipe(Ie((e=>this.__internal__observeStatus(n,e))),Dh((e=>{this.__internal__updateSigner(e,t)})))};__internal__signViaSigner=async(t,n,r)=>{const a=n.signer||e.signer;if(!a)throw new Error("No signer specified, either via api.setSigner or via sign options. You possibly need to pass through an explicit keypair for the origin so it can be used for signing.");const i=this.registry.createTypeUnsafe("SignerPayload",[(0,M.b)({},n,{address:t,blockNumber:r?r.number:0,method:this.method})]);let s;if((0,qe.T)(a.signPayload)){if(s=await a.signPayload(i.toPayload()),s.signedTransaction&&!n.withSignedTransaction)throw new Error("The `signedTransaction` field may not be submitted when `withSignedTransaction` is disabled");if(s.signedTransaction&&n.withSignedTransaction){const e=this.registry.createTypeUnsafe("Extrinsic",[s.signedTransaction]),n=this.registry.createTypeUnsafe("SignerPayload",[(0,M.b)({},{address:t,assetId:e.assetId&&e.assetId.isSome?e.assetId.toHex():null,blockHash:i.blockHash,blockNumber:r?r.number:0,era:e.era.toHex(),genesisHash:i.genesisHash,metadataHash:e.metadataHash?e.metadataHash.toHex():null,method:e.method.toHex(),mode:e.mode?e.mode.toHex():null,nonce:e.nonce.toHex(),runtimeVersion:i.runtimeVersion,signedExtensions:i.signedExtensions,tip:e.tip?e.tip.toHex():null,version:i.version})]);if(!e.isSigned)throw new Error(`When using the signedTransaction field, the transaction must be signed. Recieved isSigned: ${e.isSigned}`);return this.__internal__validateSignedTransaction(i,e),super.addSignature(t,s.signature,n.toPayload()),{id:s.id,signedTransaction:s.signedTransaction}}}else{if(!(0,qe.T)(a.signRaw))throw new Error("Invalid signer interface, it should implement either signPayload or signRaw (or both)");s=await a.signRaw(i.toRaw())}return super.addSignature(t,s.signature,i.toPayload()),{id:s.id}};__internal__updateSigner=(t,n)=>{if(n&&-1!==n.updateId){const{options:r,updateId:a}=n,i=r.signer||e.signer;i&&(0,qe.T)(i.update)&&i.update(a,t)}};__internal__validateSignedTransaction=(e,t)=>{if(e.toPayload().method!==t.method.toHex())throw new Error(`signAndSend: ${"call data"} does not match the original payload`)}}}function jw(e,t,n,r,a){const i=qw({api:t,apiType:e,blockHash:a,decorateMethod:n});return e=>new i(r||t.registry,e)}const Fw=(0,it.v)("api/augment");function Xw(e,t,n=[]){return t.length?` ${t.length} ${e}${n.length?" and":""}`:""}function Ww(e,t){return t.length?`\n\t${e.padStart(7)}: ${t.sort().join(", ")}`:""}function Zw(e,t,[n,r]){(n.length||r.length)&&Fw.warn(`api.${e}: Found${Xw("added",n,r)}${Xw("removed",r)} ${t}:${Ww("added",n)}${Ww("removed",r)}`)}function Gw(e,t){return e.filter((e=>!t.includes(e)))}function Kw(e,t){const n=Object.keys(e),r=(a=Object.keys(t),i=n,a.filter((e=>i.includes(e))));var a,i;const s=[];for(let o=0,c=r.length;or[e]))}return n}function Yw(e,t){const n=e=>Object.keys(t[e]),r=(n,r)=>e(t[n][r]),a={},i=Object.keys(t);for(let s=0,o=i.length;se.getTypeDef(t).type)).join(", ")})`}function $w(e,t,n){const r=n.filter((e=>!(0,Fe.b)(e)));if(t.meta.type.isPlain){if(0!==r.length)throw new Error(`${Qw(e,t,[])} does not take any arguments, ${r.length} found`)}else{const{hashers:n,key:a}=t.meta.type.asMap,i=1===n.length?[a]:e.lookup.getSiType(a).def.asTuple.map((e=>e));if(r.length!==i.length)throw new Error(`${Qw(e,t,i)} is a map, requiring ${i.length} arguments, ${r.length} found`)}return[t,r]}var eV=n(74486);class tV{__internal__eventemitter=new eV.b;emit(e,...t){return this.__internal__eventemitter.emit(e,...t)}on(e,t){return this.__internal__eventemitter.on(e,t),this}off(e,t){return this.__internal__eventemitter.removeListener(e,t),this}once(e,t){return this.__internal__eventemitter.once(e,t),this}}const nV=1e3,rV=(0,it.v)("api/init");let aV=0;function iV(e,{method:t,section:n}){return ea(e.rx.query[n]&&e.rx.query[n][t],(()=>`query.${n}.${t} is not available in this version of the metadata`))}class sV extends tV{__internal__instanceId;__internal__runtimeLog={};__internal__registry;__internal__storageGetQ=[];__internal__storageSubQ=[];__phantom=new st(0);_type;_call={};_consts={};_derive;_errors={};_events={};_extrinsics;_extrinsicType=$i.LATEST_EXTRINSIC_VERSION;_genesisHash;_isConnected;_isReady=!1;_query={};_queryMulti;_rpc;_rpcCore;_runtimeMap={};_runtimeChain;_runtimeMetadata;_runtimeVersion;_rx={call:{},consts:{},query:{},tx:{}};_options;_decorateMethod;constructor(e,t,n){super(),this.__internal__instanceId=""+ ++aV,this.__internal__registry=e.source?.registry||e.registry||new ah,this._rx.callAt=(e,t)=>Be(this.at(e,t)).pipe(ze((e=>e.rx.call))),this._rx.queryAt=(e,t)=>Be(this.at(e,t)).pipe(ze((e=>e.rx.query))),this._rx.registry=this.__internal__registry,this._decorateMethod=n,this._options=e,this._type=t;const r=e.source?e.source._rpcCore.provider.isClonable?e.source._rpcCore.provider.clone():e.source._rpcCore.provider:e.provider||new Rv.E;this._rpcCore=new Hv(this.__internal__instanceId,this.__internal__registry,{isPedantic:this._options.isPedantic,provider:r,userRpc:this._options.rpc}),this._isConnected=new Eh(this._rpcCore.provider.isConnected),this._rx.hasSubscriptions=this._rpcCore.provider.hasSubscriptions}get registry(){return this.__internal__registry}createType(e,...t){return this.__internal__registry.createType(e,...t)}registerTypes(e){e&&this.__internal__registry.register(e)}get hasSubscriptions(){return this._rpcCore.provider.hasSubscriptions}get supportMulti(){return this._rpcCore.provider.hasSubscriptions||!!this._rpcCore.state.queryStorageAt}_emptyDecorated(e,t){return{call:{},consts:{},errors:{},events:{},query:{},registry:e,rx:{call:{},query:{}},tx:jw(this._type,this._rx,this._decorateMethod,e,t)}}_createDecorated(e,t,n,r){n||(n=this._emptyDecorated(e.registry,r)),!t&&e.decoratedMeta||(e.decoratedMeta=function(e,t){if(!(t instanceof Sp))throw new Error("You need to pass a valid Metadata instance to Decorated");const n=t.asLatest,r=t.version;return{consts:Lf(e,n),errors:Hf(e,n,r),events:Bf(e,n,r),query:_w(e,n),registry:e,tx:Af(e,n,r)}}(e.registry,e.metadata));const a=this._decorateCalls(e,this._decorateMethod,r),i=this._decorateCalls(e,this._rxDecorateMethod,r),s=this._decorateStorage(e.decoratedMeta,this._decorateMethod,r),o=this._decorateStorage(e.decoratedMeta,this._rxDecorateMethod,r);return Jw("consts",e.decoratedMeta.consts,n.consts,t),Jw("errors",e.decoratedMeta.errors,n.errors,t),Jw("events",e.decoratedMeta.events,n.events,t),Jw("query",s,n.query,t),Jw("query",o,n.rx.query,t),Jw("call",a,n.call,t),Jw("call",i,n.rx.call,t),n.findCall=t=>C(e.registry,t),n.findError=t=>H(e.registry,t),n.queryMulti=r?this._decorateMultiAt(n,this._decorateMethod,r):this._decorateMulti(this._decorateMethod),n.runtimeVersion=e.runtimeVersion,{createdAt:r,decoratedApi:n,decoratedMeta:e.decoratedMeta}}_injectMetadata(e,t=!1){!t&&e.decoratedApi||(e.decoratedApi=this._emptyDecorated(e.registry));const{decoratedApi:n,decoratedMeta:r}=this._createDecorated(e,t,e.decoratedApi);this._call=n.call,this._consts=n.consts,this._errors=n.errors,this._events=n.events,this._query=n.query,this._rx.call=n.rx.call,this._rx.query=n.rx.query;const a=this._decorateExtrinsics(r,this._decorateMethod),i=this._decorateExtrinsics(r,this._rxDecorateMethod);t||!this._extrinsics?(this._extrinsics=a,this._rx.tx=i):(Jw("tx",a,this._extrinsics,!1),Jw(null,i,this._rx.tx,!1)),Jw(null,r.consts,this._rx.consts,t),this.emit("decorated")}injectMetadata(e,t,n){this._injectMetadata({counter:0,metadata:e,registry:n||this.__internal__registry,runtimeVersion:this.__internal__registry.createType("RuntimeVersionPartial")},t)}_decorateFunctionMeta(e,t){return t.meta=e.meta,t.method=e.method,t.section=e.section,t.toJSON=e.toJSON,e.callIndex&&(t.callIndex=e.callIndex),t}_filterRpc(e,t){0!==Object.keys(t).length&&(this._rpcCore.addUserInterfaces(t),this._decorateRpc(this._rpcCore,this._decorateMethod,this._rpc),this._decorateRpc(this._rpcCore,this._rxDecorateMethod,this._rx.rpc));const n={};for(let a=0,i=e.length;a!r.includes(e)&&!e.includes("_unstable_")));i.length&&!this._options.noInitWarn&&rV.warn(`RPC methods not decorated: ${i.join(", ")}`);for(let s=0;sBe(this._rpcCore.provider.send(e,t))))}_decorateRpc(e,t,n=this._rpcSubmitter(t)){const r=n,a=(n,r)=>{const a=e[n][r],i=t(a,{methodName:r});return i.meta=a.meta,i.raw=t(a.raw,{methodName:r}),i};for(let i=0,s=e.sections.length;ia(t,e);for(let e=0,a=n.length;er.version===e));i?(0,M.b)(i.methods,r.methods):e[t].push(r)}else e[t]=a}}_getRuntimeDefs(e,t,n=""){const r={},a=Object.values(i);for(let i=0,s=a.length;i({...e.typesBundle?.spec?.[n]?.runtime??{},...e.typesBundle?.chain?.[t]?.runtime??{}})))}(e,n,t)),this._addRuntimeDef(r,this._options.runtime),Object.entries(r)}_getMethods(e,t){const n={};return t.forEach((t=>{const{docs:r,inputs:a,name:i,output:s}=t;n[i.toString()]={description:r.map((e=>e.toString())).join(),params:a.map((({name:t,type:n})=>({name:t.toString(),type:e.lookup.getName(n)||e.lookup.getTypeDef(n).type}))),type:e.lookup.getName(s)||e.lookup.getTypeDef(s).type}})),n}_getRuntimeDefsViaMetadata(e){const t={},{apis:n}=e.metadata;for(let r=0,a=n.length;r0,u=d?this._getRuntimeDefsViaMetadata(e):this._getRuntimeDefs(e,n,this._runtimeChain),l=[],f=`${n.toString()}/${r.toString()}`,p=this.__internal__runtimeLog[f]||!1;if(this.__internal__runtimeLog[f]=!0,d)for(let y=0,x=u.length;ye.eq(a)));if(c[a]=!0,i){const t=r.map((({version:e})=>e)).sort(),n=r.find((({version:e})=>i[1].eq(e)));if(n){const t=jt(e),r=Object.entries(n.methods);if(r.length){o[t]||(o[t]={});for(let n=0,i=r.length;n[e.toHex(),t.toString()])).filter((([e])=>!c[e])).map((([e,t])=>`${this._runtimeMap[e]||e}/${t}`));this._options.noInitWarn||p||(l.length&&rV.warn(`${f}: Not decorating runtime apis without matching versions: ${l.join(", ")}`),e.length&&rV.warn(`${f}: Not decorating unknown runtime apis: ${e.join(", ")}`))}const h=i?(e,t)=>this._rpcCore.state.call(e,t,i):(e,t)=>this._rpcCore.state.call(e,t),b=t=>$r({},Object.keys(o[t]),(n=>this._decorateCall(e,o[t][n],h,a))),m=Object.keys(o);for(let y=0,x=m.length;y{if(r.length!==t.params.length)throw new Error(`${t.name}:: Expected ${t.params.length} arguments, found ${r.length}`);const a=e.createType("Raw",It(r.map(((n,r)=>e.createTypeUnsafe(t.params[r].type,[n]).toU8a()))));return n(t.name,a).pipe(ze((n=>e.createTypeUnsafe(t.type,[n]))))}));return a.meta=t,a}_decorateMulti(e){return e((e=>e.length?(this.hasSubscriptions?this._rpcCore.state.subscribeStorage:this._rpcCore.state.queryStorageAt)(e.map((e=>Array.isArray(e)?e[0].creator.meta.type.isPlain?[e[0].creator]:1===e[0].creator.meta.type.asMap.hashers.length?[e[0].creator,e.slice(1)]:[e[0].creator,...e.slice(1)]:[e.creator]))):Le([])))}_decorateMultiAt(e,t,n){return t((t=>t.length?this._rpcCore.state.queryStorageAt(t.map((t=>{if(Array.isArray(t)){const{creator:n}=iV(e,t[0].creator);return n.meta.type.isPlain?[n]:1===n.meta.type.asMap.hashers.length?[n,t.slice(1)]:[n,...t.slice(1)]}return[iV(e,t.creator).creator]})),n):Le([])))}_decorateExtrinsics({tx:e},t){const n=jw(this._type,this._rx,t),r=t=>$r({},Object.keys(e[t]),(r=>r.startsWith("$")?e[t][r]:this._decorateExtrinsicEntry(e[t][r],n))),a=Object.keys(e);for(let i=0,s=a.length;it(e(...n));return n.is=t=>e.is(t),this._decorateFunctionMeta(e,n)}_decorateStorage({query:e,registry:t},n,r){const a={},i=a=>$r({},Object.keys(e[a]),(i=>r?this._decorateStorageEntryAt(t,e[a][i],n,r):this._decorateStorageEntry(e[a][i],n))),s=Object.keys(e);for(let o=0,c=s.length;o$w(n||this.__internal__registry,e,t),r=t=>Be(this.at(t)).pipe(ze((t=>iV(t,e)))),a=this._decorateStorageCall(e,t);return a.creator=e,a.at=t(((e,...t)=>r(e).pipe(Ie((e=>e(...t)))))),a.hash=t(((...e)=>this._rpcCore.state.getStorageHash(n(e)))),a.is=t=>t.section===e.section&&t.method===e.method,a.key=(...t)=>(0,N.X)(pr(e(...t))[1]),a.keyPrefix=(...t)=>(0,N.X)(e.keyPrefix(...t)),a.size=t(((...e)=>this._rpcCore.state.getStorageSize(n(e)))),a.sizeAt=t(((e,...t)=>r(e).pipe(Ie((r=>this._rpcCore.state.getStorageSize(n(t,r.creator.meta.registry),e)))))),e.iterKey&&e.meta.type.isMap&&(a.entries=t(wb(this.__internal__instanceId,((...t)=>this._retrieveMapEntries(e,null,t)))),a.entriesAt=t(wb(this.__internal__instanceId,((e,...t)=>r(e).pipe(Ie((n=>this._retrieveMapEntries(n.creator,e,t))))))),a.entriesPaged=t(wb(this.__internal__instanceId,(t=>this._retrieveMapEntriesPaged(e,void 0,t)))),a.keys=t(wb(this.__internal__instanceId,((...t)=>this._retrieveMapKeys(e,null,t)))),a.keysAt=t(wb(this.__internal__instanceId,((e,...t)=>r(e).pipe(Ie((n=>this._retrieveMapKeys(n.creator,e,t))))))),a.keysPaged=t(wb(this.__internal__instanceId,(t=>this._retrieveMapKeysPaged(e,void 0,t))))),this.supportMulti&&e.meta.type.isMap&&(a.multi=t((t=>1===e.meta.type.asMap.hashers.length?this._retrieveMulti(t.map((t=>[e,[t]]))):this._retrieveMulti(t.map((t=>[e,t])))))),this._decorateFunctionMeta(e,a)}_decorateStorageEntryAt(e,t,n,r){const a=n=>$w(e,t,n),i=n(((...e)=>this._rpcCore.state.getStorage(a(e),r)));return i.creator=t,i.hash=n(((...e)=>this._rpcCore.state.getStorageHash(a(e),r))),i.is=e=>e.section===t.section&&e.method===t.method,i.key=(...e)=>(0,N.X)(pr(t(...e))[1]),i.keyPrefix=(...e)=>(0,N.X)(t.keyPrefix(...e)),i.size=n(((...e)=>this._rpcCore.state.getStorageSize(a(e),r))),t.iterKey&&t.meta.type.isMap&&(i.entries=n(wb(this.__internal__instanceId,((...e)=>this._retrieveMapEntries(t,r,e)))),i.entriesPaged=n(wb(this.__internal__instanceId,(e=>this._retrieveMapEntriesPaged(t,r,e)))),i.keys=n(wb(this.__internal__instanceId,((...e)=>this._retrieveMapKeys(t,r,e)))),i.keysPaged=n(wb(this.__internal__instanceId,(e=>this._retrieveMapKeysPaged(t,r,e))))),this.supportMulti&&t.meta.type.isMap&&(i.multi=n((e=>1===t.meta.type.asMap.hashers.length?this._retrieveMulti(e.map((e=>[t,[e]])),r):this._retrieveMulti(e.map((e=>[t,e])),r)))),this._decorateFunctionMeta(t,i)}_queueStorage(e,t){const n=t===this.__internal__storageSubQ?this._rpcCore.state.subscribeStorage:this._rpcCore.state.queryStorageAt;let r,a=t.length-1,i=0;return-1!==a&&t[a]&&50!==t[a][1].length?(r=t[a][0],i=t[a][1].length,t[a][1].push(e)):(a++,r=Be(new Promise((e=>{hm((()=>{const n=t[a][1];delete t[a],e(n)}))}))).pipe(Ie((e=>n(e)))),t.push([r,[e]])),r.pipe(ze((e=>e[i])))}_decorateStorageCall(e,t){return t(wb(this.__internal__instanceId,((...t)=>{const n=$w(this.__internal__registry,e,t);return this.hasSubscriptions?this._queueStorage(n,this.__internal__storageSubQ):this._rpcCore.state.getStorage(n)})),{methodName:e.method,overrideNoSub:(...t)=>this._queueStorage($w(this.__internal__registry,e,t),this.__internal__storageGetQ)})}_retrieveMulti(e,t){if(!e.length)return Le([]);const n=this.hasSubscriptions&&!t?this._rpcCore.state.subscribeStorage:this._rpcCore.state.queryStorageAt;return e.length<=250?t?n(e,t):n(e):zh(Yx(e,250).map((e=>t?n(e,t):n(e)))).pipe(ze(yy))}_retrieveMapKeys({iterKey:e,meta:t,method:n,section:r},a,i){if(!e||!t.type.isMap)throw new Error("keys can only be retrieved on maps");const s=e(...i).toHex(),o=new Eh(s),c=a?e=>this._rpcCore.state.getKeysPaged(s,nV,e,a):e=>this._rpcCore.state.getKeysPaged(s,nV,e),d=e=>e.setMeta(t,r,n);return o.pipe(Ie(c),ze((e=>e.map(d))),Dh((e=>hm((()=>{e.length===nV?o.next(e[999].toHex()):o.complete()})))),Fh(),ze(yy))}_retrieveMapKeysPaged({iterKey:e,meta:t,method:n,section:r},a,i){if(!e||!t.type.isMap)throw new Error("keys can only be retrieved on maps");const s=e=>e.setMeta(t,r,n);return(a?e=>this._rpcCore.state.getKeysPaged(e,i.pageSize,i.startKey||e,a):e=>this._rpcCore.state.getKeysPaged(e,i.pageSize,i.startKey||e))(e(...i.args).toHex()).pipe(ze((e=>e.map(s))))}_retrieveMapEntries(e,t,n){const r=t?e=>this._rpcCore.state.queryStorageAt(e,t):e=>this._rpcCore.state.queryStorageAt(e);return this._retrieveMapKeys(e,t,n).pipe(Ie((e=>e.length?zh(Yx(e,250).map(r)).pipe(ze((t=>yy(t).map(((t,n)=>[e[n],t]))))):Le([]))))}_retrieveMapEntriesPaged(e,t,n){const r=t?e=>this._rpcCore.state.queryStorageAt(e,t):e=>this._rpcCore.state.queryStorageAt(e);return this._retrieveMapKeysPaged(e,t,n).pipe(Ie((e=>e.length?r(e).pipe(ze((t=>t.map(((t,n)=>[e[n],t]))))):Le([]))))}_decorateDeriveRx(e){const t=this._runtimeVersion?.specName.toString();return Yw(e,function(e,t,n={}){return{...Pv(e,t,kv),...Pv(e,t,n)}}(this.__internal__instanceId,this._rx,(0,M.b)({},this._options.derives,this._options.typesBundle?.spec?.[t||""]?.derives)))}_decorateDerive(e){return Yw(e,this._rx.derive)}_rxDecorateMethod=e=>e}const oV=[15,14],cV=(0,it.v)("api/init");function dV(e){return e.toString()}class uV extends sV{__internal__atLast=null;__internal__healthTimer=null;__internal__registries=[];__internal__updateSub=null;__internal__waitingRegistries={};constructor(e,t,n){super(e,t,n),this.registry.setKnownTypes(e),e.source?this.__internal__registries=e.source.__internal__registries:this.registerTypes(e.types),this._rpc=this._decorateRpc(this._rpcCore,this._decorateMethod),this._rx.rpc=this._decorateRpc(this._rpcCore,this._rxDecorateMethod),this.supportMulti&&(this._queryMulti=this._decorateMulti(this._decorateMethod),this._rx.queryMulti=this._decorateMulti(this._rxDecorateMethod)),this._rx.signer=e.signer,this._rpcCore.setRegistrySwap((e=>this.getBlockRegistry(e))),this._rpcCore.setResolveBlockHash((e=>ce(this._rpcCore.chain.getBlockHash(e)))),this.hasSubscriptions?(this._rpcCore.provider.on("disconnected",(()=>this.__internal__onProviderDisconnect())),this._rpcCore.provider.on("error",(e=>this.__internal__onProviderError(e))),this._rpcCore.provider.on("connected",(()=>this.__internal__onProviderConnect()))):this._options.noInitWarn||cV.warn("Api will be available in a limited mode since the provider does not support subscriptions"),this._rpcCore.provider.isConnected&&this.__internal__onProviderConnect().catch(P.l)}_initRegistry(e,t,n,r,a){e.clearCache(),e.setChainProperties(a||this.registry.getChainProperties()),e.setKnownTypes(this._options),e.register(function({knownTypes:e},t,n,r){const a=kt(r).toNumber();return kh(t,n,((t,n)=>({..._h(gh[n],a),..._h(ih[t],a),..._h(e.typesBundle?.spec?.[n]?.types,a),..._h(e.typesBundle?.chain?.[t]?.types,a),...e.typesSpec?.[n]??{},...e.typesChain?.[t]??{},...e.types??{}})))}(e,t,n.specName,n.specVersion)),e.setHasher(function({knownTypes:e},t,n){return kh(t,n,((t,n)=>e.hasher||e.typesBundle?.chain?.[t]?.hasher||e.typesBundle?.spec?.[n]?.hasher||null))}(e,t,n.specName)),e.knownTypes.typesBundle&&(e.knownTypes.typesAlias=function({knownTypes:e},t,n){return kh(t,n,((t,n)=>({...e.typesBundle?.spec?.[n]?.alias??{},...e.typesBundle?.chain?.[t]?.alias??{},...e.typesAlias??{}})))}(e,t,n.specName)),e.setMetadata(r,void 0,(0,M.b)({},function({knownTypes:e},t,n){return kh(t,n,((t,n)=>({...e.typesBundle?.spec?.[n]?.signedExtensions??{},...e.typesBundle?.chain?.[t]?.signedExtensions??{}})))}(e,t,n.specName),this._options.signedExtensions),this._options.noInitWarn)}_getDefaultRegistry(){return ea(this.__internal__registries.find((({isDefault:e})=>e)),"Initialization error, cannot find the default registry")}async at(e,t){const n=(0,E.e)(e),r=(0,N.X)(n),a=await this.getBlockRegistry(n,t);return this.__internal__atLast&&this.__internal__atLast[0]===r||(this.__internal__atLast=[r,this._createDecorated(a,!0,null,n).decoratedApi]),this.__internal__atLast[1]}async _createBlockRegistry(e,t,n){const r=new ah(e),a=await this._retrieveMetadata(n.apis,t.parentHash,r),i=this._runtimeChain;if(!i)throw new Error("Invalid initializion order, runtimeChain is not available");this._initRegistry(r,i,n,a);const s={counter:0,lastBlockHash:e,metadata:a,registry:r,runtimeVersion:n};return this.__internal__registries.push(s),s}_cacheBlockRegistryProgress(e,t){let n=this.__internal__waitingRegistries[e];return(0,Fe.b)(n)&&(n=this.__internal__waitingRegistries[e]=new Promise(((n,r)=>{t().then((t=>{delete this.__internal__waitingRegistries[e],n(t)})).catch((t=>{delete this.__internal__waitingRegistries[e],r(t)}))}))),n}_getBlockRegistryViaVersion(e,t){if(t){const n=this.__internal__registries.find((({runtimeVersion:{specName:e,specVersion:n}})=>e.eq(t.specName)&&n.eq(t.specVersion)));if(n)return n.counter++,n.lastBlockHash=e,n}return null}async _getBlockRegistryViaHash(e){if(!this._genesisHash||!this._runtimeVersion)throw new Error("Cannot retrieve data on an uninitialized chain");const t=this.registry.createType("HeaderPartial",this._genesisHash.eq(e)?{number:lt,parentHash:this._genesisHash}:await ce(this._rpcCore.chain.getHeader.raw(e)));if(t.parentHash.isEmpty)throw new Error("Unable to retrieve header and parent from supplied hash");const[n,r]=function(e,t){const n=Sh.find((t=>e.eq(t.genesisHash)));return n?[n.versions.reduce(((e,n)=>t.gt(n.blockNumber)?n:e),void 0),n.versions.find((e=>t.lte(e.blockNumber)))]:[void 0,void 0]}(this._genesisHash,t.number),a=this.registry.createType("RuntimeVersionPartial",await ce(this._rpcCore.state.getRuntimeVersion.raw(t.parentHash)));return this._getBlockRegistryViaVersion(e,a)||await this._cacheBlockRegistryProgress(a.toHex(),(()=>this._createBlockRegistry(e,t,a)))}async getBlockRegistry(e,t){return this.__internal__registries.find((({lastBlockHash:t})=>t&&Gr(t,e)))||this._getBlockRegistryViaVersion(e,t)||await this._cacheBlockRegistryProgress((0,N.X)(e),(()=>this._getBlockRegistryViaHash(e)))}async _loadMeta(){return this._isReady?(this._options.source||this._subscribeUpdates(),!0):(this._unsubscribeUpdates(),[this._genesisHash,this._runtimeMetadata]=this._options.source?._isReady?await this._metaFromSource(this._options.source):await this._metaFromChain(this._options.metadata),this._initFromMeta(this._runtimeMetadata))}async _metaFromSource(e){this._extrinsicType=e.extrinsicVersion,this._runtimeChain=e.runtimeChain,this._runtimeVersion=e.runtimeVersion;const t=Object.keys(e.rpc),n=[];for(let r=0,a=t.length;rthis._runtimeVersion?.specVersion.eq(e.specVersion)?Le(!1):this._rpcCore.state.getMetadata().pipe(ze((t=>{cV.log(`Runtime version updated to spec=${e.specVersion.toString()}, tx=${e.transactionVersion.toString()}`),this._runtimeMetadata=t,this._runtimeVersion=e,this._rx.runtimeVersion=e;const n=this._getDefaultRegistry(),r=this._runtimeChain;if(!r)throw new Error("Invalid initializion order, runtimeChain is not available");return n.metadata=t,n.runtimeVersion=e,this._initRegistry(this.registry,r,e,t),this._injectMetadata(n,!0),!0})))))).subscribe())}async _metaFromChain(e){const[t,n,r,a,i]=await Promise.all([ce(this._rpcCore.chain.getBlockHash(0)),ce(this._rpcCore.state.getRuntimeVersion()),ce(this._rpcCore.system.chain()),ce(this._rpcCore.system.properties()),ce(this._rpcCore.rpc.methods())]);this._runtimeChain=r,this._runtimeVersion=n,this._rx.runtimeVersion=n;const s=`${t.toHex()||"0x"}-${n.specVersion.toString()}`,o=e?.[s]?new Sp(this.registry,e[s]):await this._retrieveMetadata(n.apis);return this._initRegistry(this.registry,r,n,o,a),this._filterRpc(i.methods.map(dV),Ph(this.registry,r,n.specName)),this._subscribeUpdates(),this.__internal__registries.length||this.__internal__registries.push({counter:0,isDefault:!0,metadata:o,registry:this.registry,runtimeVersion:n}),o.getUniqTypes(this._options.throwOnUnknown||!1),[t,o]}_initFromMeta(e){const t=this._runtimeVersion;if(!t)throw new Error("Invalid initializion order, runtimeVersion is not available");return this._extrinsicType=e.asLatest.extrinsic.version.toNumber(),this._rx.extrinsicType=this._extrinsicType,this._rx.genesisHash=this._genesisHash,this._rx.runtimeVersion=t,this._injectMetadata(this._getDefaultRegistry(),!0),this._rx.derive=this._decorateDeriveRx(this._rxDecorateMethod),this._derive=this._decorateDerive(this._decorateMethod),!0}async _retrieveMetadata(e,t,n){let r=null;const a=e.find((([e])=>e.eq(Mi("Metadata",64)))),i=n||this.registry;if(!a||a[1].toNumber()<2)return cV.warn("MetadataApi not available, rpc::state::get_metadata will be used."),t?new Sp(i,await ce(this._rpcCore.state.getMetadata.raw(t))):await ce(this._rpcCore.state.getMetadata());try{const e=t?await ce(this._rpcCore.state.call.raw("Metadata_metadata_versions","0x",t)):await ce(this._rpcCore.state.call("Metadata_metadata_versions","0x"));r=i.createType("Vec",e).reduce(((e,t)=>t.gt(e)?t:e))}catch(s){cV.debug(s.message),cV.warn("error with state_call::Metadata_metadata_versions, rpc::state::get_metadata will be used")}if(r&&!oV.includes(r.toNumber())&&(r=null),r)try{const e=t?await ce(this._rpcCore.state.call.raw("Metadata_metadata_at_version",(0,N.X)(r.toU8a()),t)):await ce(this._rpcCore.state.call("Metadata_metadata_at_version",(0,N.X)(r.toU8a()))),n=t?i.createType("Raw",e).toU8a():e,a=i.createType("Option",n).unwrapOr(null);if(a)return new Sp(i,a.toHex())}catch(s){cV.debug(s.message),cV.warn("error with state_call::Metadata_metadata_at_version, rpc::state::get_metadata will be used")}return t?new Sp(i,await ce(this._rpcCore.state.getMetadata.raw(t))):await ce(this._rpcCore.state.getMetadata())}_subscribeHealth(){this._unsubscribeHealth(),this.__internal__healthTimer=this.hasSubscriptions?setInterval((()=>{ce(this._rpcCore.system.health.raw()).catch(P.l)}),1e4):null}_unsubscribeHealth(){this.__internal__healthTimer&&(clearInterval(this.__internal__healthTimer),this.__internal__healthTimer=null)}_unsubscribeUpdates(){this.__internal__updateSub&&(this.__internal__updateSub.unsubscribe(),this.__internal__updateSub=null)}_unsubscribe(){this._unsubscribeHealth(),this._unsubscribeUpdates()}async __internal__onProviderConnect(){this._isConnected.next(!0),this.emit("connected");try{const e=!1===this._options.initWasm||await Si().then((()=>{if(!Ti())throw new Error("Unable to initialize @polkadot/util-crypto");return!0})).catch((()=>!1)),t=await this._loadMeta();this._subscribeHealth(),t&&!this._isReady&&e&&(this._isReady=!0,this.emit("ready",this))}catch(e){const t=new Error(`FATAL: Unable to initialize the API: ${e.message}`);cV.error(t),this.emit("error",t)}}__internal__onProviderDisconnect(){this._isConnected.next(!1),this._unsubscribe(),this.emit("disconnected")}__internal__onProviderError(e){this.emit("error",e)}}function lV(e){if(void 0===e)throw new Error("Api interfaces needs to be initialized before using, wait for 'isReady'");return e}class fV extends uV{get call(){return lV(this._call)}get consts(){return lV(this._consts)}get derive(){return lV(this._derive)}get errors(){return lV(this._errors)}get events(){return lV(this._events)}get extrinsicVersion(){return this._extrinsicType}get genesisHash(){return lV(this._genesisHash)}get isConnected(){return this._isConnected.getValue()}get libraryInfo(){return`${O} v${A}`}get query(){return lV(this._query)}get queryMulti(){return lV(this._queryMulti)}get rpc(){return lV(this._rpc)}get runtimeChain(){return lV(this._runtimeChain)}get runtimeMetadata(){return lV(this._runtimeMetadata)}get runtimeVersion(){return lV(this._runtimeVersion)}get rx(){return lV(this._rx)}get stats(){return this._rpcCore.stats}get type(){return this._type}get tx(){return lV(this._extrinsics)}findCall(e){return C(this.registry,e)}findError(e){return H(this.registry,e)}}class pV extends fV{constructor(e={},t,n){super(e,t,n)}connect(){return this._rpcCore.connect()}disconnect(){return this._unsubscribe(),this._rpcCore.disconnect()}setSigner(e){this._rx.signer=e}async sign(e,t,{signer:n}={}){if((0,I.K)(e)){const r=n||this._rx.signer;if(!r?.signRaw)throw new Error("No signer exists with a signRaw interface. You possibly need to pass through an explicit keypair for the origin so it can be used for signing.");return(await r.signRaw((0,M.b)({type:"bytes"},t,{address:e}))).signature}return(0,N.X)(e.sign((0,E.e)(t.data)))}}class hV{__internal__allHasFired=!1;__internal__callback;__internal__fired=[];__internal__fns=[];__internal__isActive=!0;__internal__results=[];__internal__subscriptions=[];constructor(e,t){this.__internal__callback=t,this.__internal__subscriptions=e.map((async(e,t)=>{const[n,...r]=Array.isArray(e)?e:[e];return this.__internal__fired.push(!1),this.__internal__fns.push(n),n(...r,this._createCallback(t))}))}_allHasFired(){return this.__internal__allHasFired||=0===this.__internal__fired.filter((e=>!e)).length,this.__internal__allHasFired}_createCallback(e){return t=>{this.__internal__fired[e]=!0,this.__internal__results[e]=t,this._triggerUpdate()}}_triggerUpdate(){if(this.__internal__isActive&&(0,qe.T)(this.__internal__callback)&&this._allHasFired())try{Promise.resolve(this.__internal__callback(this.__internal__results)).catch(P.l)}catch{}}unsubscribe(){this.__internal__isActive&&(this.__internal__isActive=!1,Promise.all(this.__internal__subscriptions.map((async e=>{try{const t=await e;(0,qe.T)(t)&&t()}catch{}}))).catch((()=>{})))}}function bV(e,t){let n=!1;return{reject:e=>(n||(n=!0,t(e)),my),resolve:t=>{n||(n=!0,e(t))}}}function mV(e,t){const n=!(!t?.methodName||!t.methodName.includes("subscribe"));return function(...r){const[a,i]=function(e,t){const n=e.slice(),r=e.length&&(0,qe.T)(e[e.length-1])?n.pop():void 0;if(t&&!(0,qe.T)(r))throw new Error("Expected a callback to be passed with subscriptions");return[n,r]}(r,n);return i?function(e,t,n){return new Promise(((r,a)=>{const i=bV(r,a),s=e(...t).pipe(Gh((e=>i.reject(e))),Dh((()=>i.resolve((()=>s.unsubscribe()))))).subscribe((e=>{hm((()=>n(e)))}))}))}(e,a,i):function(e,t){return new Promise(((n,r)=>{const a=bV(n,r),i=e(...t).pipe(Gh((e=>a.reject(e)))).subscribe((e=>{a.resolve(e),hm((()=>i.unsubscribe()))}))}))}(t?.overrideNoSub||e,a)}}class yV extends pV{__internal__isReadyPromise;__internal__isReadyOrErrorPromise;constructor(e){super(e,"promise",mV),this.__internal__isReadyPromise=new Promise((e=>{super.once("ready",(()=>e(this)))})),this.__internal__isReadyOrErrorPromise=new Promise(((e,t)=>{const n=bV(e,t);super.once("ready",(()=>n.resolve(this))),super.once("error",(e=>n.reject(e)))}))}static create(e){const t=new yV(e);return e&&e.throwOnConnect?t.isReadyOrError:(t.isReadyOrError.catch(P.l),t.isReady)}get isReady(){return this.__internal__isReadyPromise}get isReadyOrError(){return this.__internal__isReadyOrErrorPromise}clone(){return new yV((0,M.b)({},this._options,{source:this}))}async combineLatest(e,t){const n=new hV(e,t);return()=>{n.unsubscribe()}}}},94645:(e,t,n)=>{"use strict";n.d(t,{b:()=>r,q:()=>i});const r=64;class a{key;__internal__expires;__internal__ttl;createdAt;next;prev;constructor(e,t){this.key=e,this.__internal__ttl=t,this.__internal__expires=Date.now()+t,this.createdAt=Date.now(),this.next=this.prev=this}refresh(){this.__internal__expires=Date.now()+this.__internal__ttl}get expiry(){return this.__internal__expires}}class i{capacity;__internal__data=new Map;__internal__refs=new Map;__internal__length=0;__internal__head;__internal__tail;__internal__ttl;constructor(e=r,t=3e4){this.capacity=e,this.__internal__ttl=t,this.__internal__head=this.__internal__tail=new a("",t)}get ttl(){return this.__internal__ttl}get length(){return this.__internal__length}get lengthData(){return this.__internal__data.size}get lengthRefs(){return this.__internal__refs.size}entries(){const e=this.keys(),t=e.length,n=new Array(t);for(let r=0;r0;)this.__internal__refs.delete(this.__internal__tail.key),this.__internal__data.delete(this.__internal__tail.key),this.__internal__length-=1,this.__internal__tail=this.__internal__tail.prev,this.__internal__tail.next=this.__internal__head;0===this.__internal__length&&(this.__internal__head=this.__internal__tail=new a("",this.__internal__ttl))}__internal__toHead(e){const t=this.__internal__refs.get(e);t&&t!==this.__internal__head&&(t.refresh(),t.prev.next=t.next,t.next.prev=t.prev,t.next=this.__internal__head,this.__internal__head.prev=t,this.__internal__head=t)}}},19588:(e,t,n)=>{"use strict";n.d(t,{E:()=>P});var r=n(74486),a=n(52502),i=n(56199);const s=(0,n(77389).MJ)("isPrototypeOf","hasOwnProperty");var o=n(81138),c=n(74032),d=n(48827),u=n(76284),l=n(75487);const f=l.Mn.WebSocket;var p=n(25311),h=n(55471),b=n(8514);const m=-99999;function y(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})}class x extends Error{code;data;message;name;stack;constructor(e="",t=-99999,n){if(super(),y(this,"message",String(e)),y(this,"name",this.constructor.name),y(this,"data",n),y(this,"code",t),(0,b.T)(Error.captureStackTrace))Error.captureStackTrace(this,this.constructor);else{const{stack:t}=new Error(e);t&&y(this,"stack",t)}}static CODES={ASSERT:-90009,INVALID_JSONRPC:-99998,METHOD_NOT_FOUND:-32601,UNKNOWN:m}}function g(e){if(e){const{code:t,data:n,message:r}=e;throw new x(`${t}: ${r}${function(e){if((0,c.b)(e))return"";const t=`: ${(0,p.K)(e)?e.replace(/Error\("/g,"").replace(/\("/g,"(").replace(/"\)/g,")").replace(/\(/g,", ").replace(/\)/g,""):(0,o.A)(e)}`;return t.length<=256?t:`${t.substring(0,255)}\u2026`}(n)}`,t,n)}}class v{__internal__id=0;decodeResponse(e){if(!e||"2.0"!==e.jsonrpc)throw new Error("Invalid jsonrpc field in decoded object");const t=!(0,c.b)(e.params)&&!(0,c.b)(e.method);if(!((0,h.E)(e.id)||t&&((0,h.E)(e.params.subscription)||(0,p.K)(e.params.subscription))))throw new Error("Invalid id field in decoded object");if(g(e.error),void 0===e.result&&!t)throw new Error("No result found in jsonrpc response");return t?(g(e.params.error),e.params.result):e.result}encodeJson(e,t){const[n,r]=this.encodeObject(e,t);return[n,(0,o.A)(r)]}encodeObject(e,t){const n=++this.__internal__id;return[n,{id:n,jsonrpc:"2.0",method:e,params:t}]}}const w="ws://127.0.0.1:9944";var V=n(94645);const T={1e3:"Normal Closure",1001:"Going Away",1002:"Protocol Error",1003:"Unsupported Data",1004:"(For future)",1005:"No Status Received",1006:"Abnormal Closure",1007:"Invalid frame payload data",1008:"Policy Violation",1009:"Message too big",1010:"Missing Extension",1011:"Internal Error",1012:"Service Restart",1013:"Try Again Later",1014:"Bad Gateway",1015:"TLS Handshake"};const S={chain_finalisedHead:"chain_finalizedHead",chain_subscribeFinalisedHeads:"chain_subscribeFinalizedHeads",chain_unsubscribeFinalisedHeads:"chain_unsubscribeFinalizedHeads"},k=(0,a.v)("api-ws");function _(e,t){Object.keys(e).forEach((n=>{t&&t(e[n]),delete e[n]}))}class P{__internal__callCache;__internal__coder;__internal__endpoints;__internal__headers;__internal__eventemitter;__internal__handlers={};__internal__isReadyPromise;__internal__stats;__internal__waitingForId={};__internal__cacheCapacity;__internal__autoConnectMs;__internal__endpointIndex;__internal__endpointStats;__internal__isConnected=!1;__internal__subscriptions={};__internal__timeoutId=null;__internal__websocket;__internal__timeout;constructor(e=w,t=2500,n={},a,s){const o=Array.isArray(e)?e:[e];if(0===o.length)throw new Error("WsProvider requires at least one Endpoint");o.forEach((e=>{if(!/^(wss|ws):\/\//.test(e))throw new Error(`Endpoint should start with 'ws://', received '${e}'`)})),this.__internal__callCache=new V.q(s||V.b),this.__internal__cacheCapacity=s||V.b,this.__internal__eventemitter=new r.b,this.__internal__autoConnectMs=t||0,this.__internal__coder=new v,this.__internal__endpointIndex=-1,this.__internal__endpoints=o,this.__internal__headers=n,this.__internal__websocket=null,this.__internal__stats={active:{requests:0,subscriptions:0},total:{bytesRecv:0,bytesSent:0,cached:0,errors:0,requests:0,subscriptions:0,timeout:0}},this.__internal__endpointStats={bytesRecv:0,bytesSent:0,cached:0,errors:0,requests:0,subscriptions:0,timeout:0},this.__internal__timeout=a||6e4,t&&t>0&&this.connectWithRetry().catch(i.l),this.__internal__isReadyPromise=new Promise((e=>{this.__internal__eventemitter.once("connected",(()=>{e(this)}))}))}get hasSubscriptions(){return!0}get isClonable(){return!0}get isConnected(){return this.__internal__isConnected}get isReady(){return this.__internal__isReadyPromise}get endpoint(){return this.__internal__endpoints[this.__internal__endpointIndex]}clone(){return new P(this.__internal__endpoints)}selectEndpointIndex(e){return(this.__internal__endpointIndex+1)%e.length}async connect(){if(this.__internal__websocket)throw new Error("WebSocket is already connected");try{this.__internal__endpointIndex=this.selectEndpointIndex(this.__internal__endpoints),this.__internal__websocket=void 0!==l.Mn.WebSocket&&(e=l.Mn.WebSocket,s(t=f)&&s(e)&&(e===t||e.isPrototypeOf(t)))?new f(this.endpoint):new f(this.endpoint,void 0,{headers:this.__internal__headers}),this.__internal__websocket&&(this.__internal__websocket.onclose=this.__internal__onSocketClose,this.__internal__websocket.onerror=this.__internal__onSocketError,this.__internal__websocket.onmessage=this.__internal__onSocketMessage,this.__internal__websocket.onopen=this.__internal__onSocketOpen),this.__internal__timeoutId=setInterval((()=>this.__internal__timeoutHandlers()),5e3)}catch(n){throw k.error(n),this.__internal__emit("error",n),n}var e,t}async connectWithRetry(){if(this.__internal__autoConnectMs>0)try{await this.connect()}catch{setTimeout((()=>{this.connectWithRetry().catch(i.l)}),this.__internal__autoConnectMs)}}async disconnect(){this.__internal__autoConnectMs=0;try{this.__internal__websocket&&this.__internal__websocket.close(1e3)}catch(e){throw k.error(e),this.__internal__emit("error",e),e}}get stats(){return{active:{requests:Object.keys(this.__internal__handlers).length,subscriptions:Object.keys(this.__internal__subscriptions).length},total:this.__internal__stats.total}}get endpointStats(){return this.__internal__endpointStats}on(e,t){return this.__internal__eventemitter.on(e,t),()=>{this.__internal__eventemitter.removeListener(e,t)}}send(e,t,n,r){this.__internal__endpointStats.requests++,this.__internal__stats.total.requests++;const[a,i]=this.__internal__coder.encodeJson(e,t);if(0===this.__internal__cacheCapacity)return this.__internal__send(a,i,e,t,r);const s=n?`${e}::${(0,o.A)(t)}`:"";let c=n?this.__internal__callCache.get(s):null;return c?(this.__internal__endpointStats.cached++,this.__internal__stats.total.cached++):(c=this.__internal__send(a,i,e,t,r),n&&this.__internal__callCache.set(s,c)),c}async __internal__send(e,t,n,r,a){return new Promise(((i,s)=>{try{if(!this.isConnected||null===this.__internal__websocket)throw new Error("WebSocket is not connected");const o=(e,t)=>{e?s(e):i(t)};k.debug((()=>["calling",n,t])),this.__internal__handlers[e]={callback:o,method:n,params:r,start:Date.now(),subscription:a};const c=t.length;this.__internal__endpointStats.bytesSent+=c,this.__internal__stats.total.bytesSent+=c,this.__internal__websocket.send(t)}catch(o){this.__internal__endpointStats.errors++,this.__internal__stats.total.errors++,s(o)}}))}subscribe(e,t,n,r){return this.__internal__endpointStats.subscriptions++,this.__internal__stats.total.subscriptions++,this.send(t,n,!1,{callback:r,type:e})}async unsubscribe(e,t,n){const r=`${e}::${n}`;if((0,c.b)(this.__internal__subscriptions[r]))return k.debug((()=>`Unable to find active subscription=${r}`)),!1;delete this.__internal__subscriptions[r];try{return!(this.isConnected&&!(0,d.k)(this.__internal__websocket))||this.send(t,[n])}catch{return!1}}__internal__emit=(e,...t)=>{this.__internal__eventemitter.emit(e,...t)};__internal__onSocketClose=e=>{const t=new Error(`disconnected from ${this.endpoint}: ${e.code}:: ${e.reason||function(e){if(e>=0&&e<=999)return"(Unused)";if(e>=1016){if(e<=1999)return"(For WebSocket standard)";if(e<=2999)return"(For WebSocket extensions)";if(e<=3999)return"(For libraries and frameworks)";if(e<=4999)return"(For applications)"}return T[e]||"(Unknown)"}(e.code)}`);this.__internal__autoConnectMs>0&&k.error(t.message),this.__internal__isConnected=!1,this.__internal__websocket&&(this.__internal__websocket.onclose=null,this.__internal__websocket.onerror=null,this.__internal__websocket.onmessage=null,this.__internal__websocket.onopen=null,this.__internal__websocket=null),this.__internal__timeoutId&&(clearInterval(this.__internal__timeoutId),this.__internal__timeoutId=null),_(this.__internal__handlers,(e=>{try{e.callback(t,void 0)}catch(n){k.error(n)}})),_(this.__internal__waitingForId),this.__internal__endpointStats={bytesRecv:0,bytesSent:0,cached:0,errors:0,requests:0,subscriptions:0,timeout:0},this.__internal__emit("disconnected"),this.__internal__autoConnectMs>0&&setTimeout((()=>{this.connectWithRetry().catch(i.l)}),this.__internal__autoConnectMs)};__internal__onSocketError=e=>{k.debug((()=>["socket error",e])),this.__internal__emit("error",e)};__internal__onSocketMessage=e=>{k.debug((()=>["received",e.data]));const t=e.data.length;this.__internal__endpointStats.bytesRecv+=t,this.__internal__stats.total.bytesRecv+=t;const n=JSON.parse(e.data);return(0,c.b)(n.method)?this.__internal__onSocketMessageResult(n):this.__internal__onSocketMessageSubscribe(n)};__internal__onSocketMessageResult=e=>{const t=this.__internal__handlers[e.id];if(t){try{const{method:n,params:r,subscription:a}=t,i=this.__internal__coder.decodeResponse(e);if(t.callback(null,i),a){const e=`${a.type}::${i}`;this.__internal__subscriptions[e]=(0,u.b)({},a,{method:n,params:r}),this.__internal__waitingForId[e]&&this.__internal__onSocketMessageSubscribe(this.__internal__waitingForId[e])}}catch(n){this.__internal__endpointStats.errors++,this.__internal__stats.total.errors++,t.callback(n,void 0)}delete this.__internal__handlers[e.id]}else k.debug((()=>`Unable to find handler for id=${e.id}`))};__internal__onSocketMessageSubscribe=e=>{if(!e.method)throw new Error("No method found in JSONRPC response");const t=`${S[e.method]||e.method}::${e.params.subscription}`,n=this.__internal__subscriptions[t];if(!n)return this.__internal__waitingForId[t]=e,void k.debug((()=>`Unable to find handler for subscription=${t}`));delete this.__internal__waitingForId[t];try{const t=this.__internal__coder.decodeResponse(e);n.callback(null,t)}catch(r){this.__internal__endpointStats.errors++,this.__internal__stats.total.errors++,n.callback(r,void 0)}};__internal__onSocketOpen=()=>{if(null===this.__internal__websocket)throw new Error("WebSocket cannot be null in onOpen");return k.debug((()=>["connected to",this.endpoint])),this.__internal__isConnected=!0,this.__internal__resubscribe(),this.__internal__emit("connected"),!0};__internal__resubscribe=()=>{const e=this.__internal__subscriptions;this.__internal__subscriptions={},Promise.all(Object.keys(e).map((async t=>{const{callback:n,method:r,params:a,type:i}=e[t];if(!i.startsWith("author_"))try{await this.subscribe(i,r,a,n)}catch(s){k.error(s)}}))).catch(k.error)};__internal__timeoutHandlers=()=>{const e=Date.now(),t=Object.keys(this.__internal__handlers);for(let n=0,r=t.length;nthis.__internal__timeout){try{r.callback(new Error(`No response received from RPC endpoint in ${this.__internal__timeout/1e3}s`),void 0)}catch{}this.__internal__endpointStats.timeout++,this.__internal__stats.total.timeout++,delete this.__internal__handlers[t[n]]}}}}},8319:(e,t,n)=>{"use strict";n.d(t,{CW:()=>i,Ze:()=>s});var r=n(98967),a=n(75487);const i="function"==typeof r.Q&&"function"==typeof r.Q.asIntN,s="function"==typeof a.Mn.Buffer&&"function"==typeof a.Mn.Buffer.isBuffer;a.Mn.process},72598:(e,t,n)=>{"use strict";n.d(t,{V:()=>s});const r="0123456789abcdef",a=new Uint8Array(256),i=new Uint8Array(65536);for(let o=0,c=16;o9&&(a[0|r[o].toUpperCase().charCodeAt(0)]=0|o);for(let o=0;o<256;o++){const e=o<<8;for(let t=0;t<256;t++)i[e|t]=a[o]<<4|a[t]}function s(e,t=-1){if(!e)return new Uint8Array;let n=e.startsWith("0x")?2:0;const r=Math.ceil((e.length-n)/2),a=Math.ceil(-1===t?r:t/8),s=new Uint8Array(a);for(let o=a>r?a-r:0;o{"use strict";function r(e){return"bigint"==typeof e}n.d(t,{s:()=>r})},24466:(e,t,n)=>{"use strict";n.d(t,{f:()=>a});var r=n(39404);function a(e){return r.isBN(e)}},67536:(e,t,n)=>{"use strict";n.d(t,{P:()=>s});var r=n(75487),a=n(8319),i=n(8514);function s(e){return a.Ze&&!!e&&(0,i.T)(e.readDoubleLE)&&r.Mn.Buffer.isBuffer(e)}},8514:(e,t,n)=>{"use strict";function r(e){return"function"==typeof e}n.d(t,{T:()=>r})},77389:(e,t,n)=>{"use strict";n.d(t,{D8:()=>o,MJ:()=>s,Mp:()=>i});var r=n(8514),a=n(34501);function i(...e){return t=>((0,a.G)(t)||(0,r.T)(t))&&e.every((e=>(0,r.T)(t[e])))}function s(...e){return t=>(0,r.T)(t)&&e.every((e=>(0,r.T)(t[e])))}function o(...e){return t=>(0,a.G)(t)&&e.every((e=>(0,r.T)(t[e])))}},74749:(e,t,n)=>{"use strict";n.d(t,{Ed:()=>a,eR:()=>r,qv:()=>i});const r=/^0x[\da-fA-F]+$/,a=/^[\da-fA-F]+$/;function i(e,t=-1,n){return"string"==typeof e&&("0x"===e||r.test(e))&&(-1===t?n||e.length%2==0:e.length===2+Math.ceil(t/4))}},48827:(e,t,n)=>{"use strict";function r(e){return null===e}n.d(t,{k:()=>r})},55471:(e,t,n)=>{"use strict";function r(e){return"number"==typeof e}n.d(t,{E:()=>r})},34501:(e,t,n)=>{"use strict";function r(e){return!!e&&"object"==typeof e}n.d(t,{G:()=>r})},25311:(e,t,n)=>{"use strict";function r(e){return"string"==typeof e||e instanceof String}n.d(t,{K:()=>r})},336:(e,t,n)=>{"use strict";function r(e){return(e&&e.constructor)===Uint8Array||e instanceof Uint8Array}n.d(t,{b:()=>r})},74032:(e,t,n)=>{"use strict";function r(e){return void 0===e}n.d(t,{b:()=>r})},52502:(e,t,n)=>{"use strict";n.d(t,{v:()=>g});var r=n(75487);function a(e){return e.toString().padStart(2,"0")}var i=n(24466),s=n(67536),o=n(8514),c=n(34501),d=n(336),u=n(82422),l=n(79931),f=n(56199);const p={debug:"log",error:"error",log:"log",warn:"warn"};function h(e){return Array.isArray(e)?e.map(h):(0,i.f)(e)?e.toString():(0,d.b)(e)||(0,s.P)(e)?(0,u.X)((0,l.e)(e)):function(e){if(e&&(0,c.G)(e)&&e.constructor===Object){const t={};for(const[n,r]of Object.entries(e))t[n]=h(r);return t}return e}(e)}function b(e,t,n,r=-1){if(1===n.length&&(0,o.T)(n[0])){const a=n[0]();return b(e,t,Array.isArray(a)?a:[a],r)}var i,s;console[p[e]](`${(s=new Date).getFullYear().toString()}-${a(s.getMonth()+1)}-${a(s.getDate())} ${a(s.getHours())}:${a(s.getMinutes())}:${a(s.getSeconds())}`,t,...n.map(h).map((i=r,e=>{if(i<=0)return e;const t=`${e}`;return t.lengthb("debug",t,e,a):f.l,error:(...e)=>b("error",t,e),log:(...e)=>b("log",t,e),noop:f.l,warn:(...e)=>b("warn",t,e)}}},56199:(e,t,n)=>{"use strict";function r(e){return e}function a(){}n.d(t,{D:()=>r,l:()=>a})},76284:(e,t,n)=>{"use strict";function r(e,...t){for(let n=0,r=t.length;nr})},58861:(e,t,n)=>{"use strict";n.d(t,{j:()=>s});var r=n(75487);class a{encode(e){const t=e.length,n=new Uint8Array(t);for(let r=0;r{"use strict";n.d(t,{A:()=>i});var r=n(26805);function a(e,t){return(0,r.s)(t)?t.toString():t}function i(e,t){return JSON.stringify(e,a,t)}},82422:(e,t,n)=>{"use strict";n.d(t,{X:()=>s});const r=new Array(256),a=new Array(65536);for(let o=0;o<256;o++)r[o]=o.toString(16).padStart(2,"0");for(let o=0;o<256;o++){const e=o<<8;for(let t=0;t<256;t++)a[e|t]=r[o]+r[t]}function i(e,t){const n=e.length%2|0,i=e.length-n|0;for(let r=0;r0){const n=Math.ceil(t/8);if(e.length>n)return`${i(e.subarray(0,n/2),r)}\u2026${i(e.subarray(e.length-n/2),"")}`}return i(e,r)}},79931:(e,t,n)=>{"use strict";n.d(t,{e:()=>c});var r=n(72598),a=n(67536),i=n(74749),s=n(336),o=n(58861);function c(e){return(0,s.b)(e)?(0,a.P)(e)?new Uint8Array(e):e:(0,i.qv)(e)?(0,r.V)(e):Array.isArray(e)?new Uint8Array(e):(0,o.j)(e)}},98967:(e,t,n)=>{"use strict";function r(){return Number.NaN}n.d(t,{Q:()=>a});const a=(0,n(75487).pc)("BigInt",r)},75487:(e,t,n)=>{"use strict";n.d(t,{Mn:()=>r,pc:()=>a});const r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this");function a(e,t){return void 0===r[e]?t:r[e]}},74486:(e,t,n)=>{"use strict";n.d(t,{b:()=>r});var r=n(30228)}}]); \ No newline at end of file diff --git a/assets/js/3482.0b39266b.js.LICENSE.txt b/assets/js/3482.483a7910.js.LICENSE.txt similarity index 100% rename from assets/js/3482.0b39266b.js.LICENSE.txt rename to assets/js/3482.483a7910.js.LICENSE.txt diff --git a/assets/js/36051dfe.588b5a45.js b/assets/js/36051dfe.588b5a45.js new file mode 100644 index 000000000000..0e011b04b275 --- /dev/null +++ b/assets/js/36051dfe.588b5a45.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3949],{78579:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>l,contentTitle:()=>d,default:()=>c,frontMatter:()=>r,metadata:()=>s,toc:()=>o});const s=JSON.parse('{"id":"general/dune-analytics/parachain-dashboards/unique-dashboards","title":"Unique Dashboards","description":"Unique is a leading parachain on Polkadot dedicated to enabling NFTs and their collections.","source":"@site/../docs/general/dune-analytics/parachain-dashboards/unique-dashboards.md","sourceDirName":"general/dune-analytics/parachain-dashboards","slug":"/general/dune-analytics/unique-dashboards","permalink":"/docs/general/dune-analytics/unique-dashboards","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/parachain-dashboards/unique-dashboards.md","tags":[],"version":"current","lastUpdatedBy":"MK","lastUpdatedAt":1719215716000,"frontMatter":{"id":"unique-dashboards","title":"Unique Dashboards","sidebar_label":"Unique","description":"Unique is a leading parachain on Polkadot dedicated to enabling NFTs and their collections.","keywords":["polkadot","dashboard","dune","unique","NFT"],"slug":"../unique-dashboards"},"sidebar":"docs","previous":{"title":"Stellaswap (Moonbeam)","permalink":"/docs/general/dune-analytics/stellaswap-dashboards"},"next":{"title":"Project Dashboards","permalink":"/docs/general/project-dashboards"}}');var a=i(74848),t=i(28453);const r={id:"unique-dashboards",title:"Unique Dashboards",sidebar_label:"Unique",description:"Unique is a leading parachain on Polkadot dedicated to enabling NFTs and their collections.",keywords:["polkadot","dashboard","dune","unique","NFT"],slug:"../unique-dashboards"},d="Unique Dashboards",l={},o=[{value:"Overview",id:"overview",level:2},{value:"Featured Dashboards on Dune",id:"featured-dashboards-on-dune",level:2},{value:"Key Tables",id:"key-tables",level:2},{value:"Useful Queries",id:"useful-queries",level:2},{value:"Getting Started with Queries",id:"getting-started-with-queries",level:2}];function u(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,t.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.header,{children:(0,a.jsx)(n.h1,{id:"unique-dashboards",children:"Unique Dashboards"})}),"\n",(0,a.jsx)(n.h2,{id:"overview",children:"Overview"}),"\n",(0,a.jsx)(n.p,{children:"Unique is a leading parachain on Polkadot dedicated to enabling NFTs and their collections. It\nprovides a robust framework for users and developers to engage with non-fungible tokens across\ndifferent applications."}),"\n",(0,a.jsx)(n.h2,{id:"featured-dashboards-on-dune",children:"Featured Dashboards on Dune"}),"\n",(0,a.jsx)(n.p,{children:"Here you will find a variety of dashboards that help visualize data from the Unique parachain:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.a,{href:"https://dune.com/substrate/unique-nft-dashboard",children:"Unique NFT Dashboard"}),": A comprehensive view of\nNFT activities within the Unique parachain."]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.a,{href:"https://dune.com/substrate/unique-collection-details",children:"Unique Collection Details Dashboard"}),":\nDetailed insights into specific NFT collections."]}),"\n"]}),"\n",(0,a.jsxs)(n.p,{children:["Please also visit our dashboards for Unique on\n",(0,a.jsx)(n.a,{href:"https://dune.com/discover/content/relevant?q=title:Unique%20author:substrate",children:"Dune Analytics"}),"."]}),"\n",(0,a.jsx)(n.h2,{id:"key-tables",children:"Key Tables"}),"\n",(0,a.jsx)(n.p,{children:"Data from the Unique parachain is organized into several key tables:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.code,{children:"unique.balances"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.code,{children:"unique.blocks"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.code,{children:"unique.calls"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.code,{children:"unique.events"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.code,{children:"unique.extrinsics"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.code,{children:"unique.transfers"})}),"\n"]}),"\n",(0,a.jsxs)(n.p,{children:["Start building your own queries using granular data on Dune\n",(0,a.jsx)(n.a,{href:"https://dune.com/queries?category=canonical&namespace=unique",children:"here"}),"."]}),"\n",(0,a.jsx)(n.h2,{id:"useful-queries",children:"Useful Queries"}),"\n",(0,a.jsx)(n.p,{children:"Some useful queries for Unique are provided:"}),"\n",(0,a.jsxs)(n.table,{children:[(0,a.jsx)(n.thead,{children:(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.th,{children:"Title"}),(0,a.jsx)(n.th,{children:"Query"}),(0,a.jsx)(n.th,{children:"Description"})]})}),(0,a.jsxs)(n.tbody,{children:[(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:"Unique ss58 and pubkey Maping Table"}),(0,a.jsx)(n.td,{children:(0,a.jsx)(n.a,{href:"https://dune.com/queries/3632470",children:"query_3632470"})}),(0,a.jsx)(n.td,{children:"Find all Unique ss58 and pubkey mappings"})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:"Unique NFT Info"}),(0,a.jsx)(n.td,{children:(0,a.jsx)(n.a,{href:"https://dune.com/queries/3630265",children:"query_3630265"})}),(0,a.jsx)(n.td,{children:"Find all Unique NFT information"})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:"Unique Collection Info"}),(0,a.jsx)(n.td,{children:(0,a.jsx)(n.a,{href:"https://dune.com/queries/3628043",children:"query_3628043"})}),(0,a.jsx)(n.td,{children:"Find all Unique collection information"})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:"Unique NFT Transaction Info"}),(0,a.jsx)(n.td,{children:(0,a.jsx)(n.a,{href:"https://dune.com/queries/3631785",children:"query_3631785"})}),(0,a.jsx)(n.td,{children:"Find all Unique NFT transaction information"})]})]})]}),"\n",(0,a.jsx)(n.h2,{id:"getting-started-with-queries",children:"Getting Started with Queries"}),"\n",(0,a.jsx)(n.p,{children:"To get started with querying data from Unique, you are welcome to use the mentioned materialized\nqueries. You can use the following DuneSQL queries as examples:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-sql",metastring:'title="Unique Top Collections by Total Sales Amount" showLineNumbers',children:"SELECT\n collection_id_with_dashboard_url,\n token_prefix,\n SUM(for_price) AS total_amount\nFROM\n dune.substrate.result_unique_nft_transaction_info\nGROUP BY\n collection_id_with_dashboard_url,\n token_prefix\nORDER BY\n SUM(for_price) DESC;\n"})}),"\n",(0,a.jsx)(n.p,{children:"Query result:"}),"\n",(0,a.jsx)("iframe",{src:"https://dune.com/embeds/3632384/6118455/c4199fa9-3227-4688-90f1-81f0fc60db31",height:"350",width:"100%"}),"\n",(0,a.jsx)(n.admonition,{title:"DuneSQL Referece",type:"info",children:(0,a.jsxs)(n.p,{children:["For more information on DuneSQL, please refer to the ",(0,a.jsx)(n.a,{href:"/docs/general/dunesql-cheatsheet",children:"DuneSQL Cheatsheet"}),"\nand\n",(0,a.jsx)(n.a,{href:"https://docs.dune.com/query-engine/Functions-and-operators/index",children:"DuneSQL Official Documentation"}),"."]})})]})}function c(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(u,{...e})}):u(e)}},28453:(e,n,i)=>{i.d(n,{R:()=>r,x:()=>d});var s=i(96540);const a={},t=s.createContext(a);function r(e){const n=s.useContext(t);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:r(e.components),s.createElement(t.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/36051dfe.5b64d549.js b/assets/js/36051dfe.5b64d549.js deleted file mode 100644 index 8bb24e44c478..000000000000 --- a/assets/js/36051dfe.5b64d549.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3949],{98233:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>l,contentTitle:()=>r,default:()=>c,frontMatter:()=>t,metadata:()=>d,toc:()=>o});var s=i(74848),a=i(28453);const t={id:"unique-dashboards",title:"Unique Dashboards",sidebar_label:"Unique",description:"Unique is a leading parachain on Polkadot dedicated to enabling NFTs and their collections.",keywords:["polkadot","dashboard","dune","unique","NFT"],slug:"../unique-dashboards"},r="Unique Dashboards",d={id:"general/dune-analytics/parachain-dashboards/unique-dashboards",title:"Unique Dashboards",description:"Unique is a leading parachain on Polkadot dedicated to enabling NFTs and their collections.",source:"@site/../docs/general/dune-analytics/parachain-dashboards/unique-dashboards.md",sourceDirName:"general/dune-analytics/parachain-dashboards",slug:"/general/dune-analytics/unique-dashboards",permalink:"/docs/general/dune-analytics/unique-dashboards",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/parachain-dashboards/unique-dashboards.md",tags:[],version:"current",lastUpdatedBy:"MK",lastUpdatedAt:1719215716e3,frontMatter:{id:"unique-dashboards",title:"Unique Dashboards",sidebar_label:"Unique",description:"Unique is a leading parachain on Polkadot dedicated to enabling NFTs and their collections.",keywords:["polkadot","dashboard","dune","unique","NFT"],slug:"../unique-dashboards"},sidebar:"docs",previous:{title:"Stellaswap (Moonbeam)",permalink:"/docs/general/dune-analytics/stellaswap-dashboards"},next:{title:"Project Dashboards",permalink:"/docs/general/project-dashboards"}},l={},o=[{value:"Overview",id:"overview",level:2},{value:"Featured Dashboards on Dune",id:"featured-dashboards-on-dune",level:2},{value:"Key Tables",id:"key-tables",level:2},{value:"Useful Queries",id:"useful-queries",level:2},{value:"Getting Started with Queries",id:"getting-started-with-queries",level:2}];function u(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,a.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"unique-dashboards",children:"Unique Dashboards"})}),"\n",(0,s.jsx)(n.h2,{id:"overview",children:"Overview"}),"\n",(0,s.jsx)(n.p,{children:"Unique is a leading parachain on Polkadot dedicated to enabling NFTs and their collections. It\nprovides a robust framework for users and developers to engage with non-fungible tokens across\ndifferent applications."}),"\n",(0,s.jsx)(n.h2,{id:"featured-dashboards-on-dune",children:"Featured Dashboards on Dune"}),"\n",(0,s.jsx)(n.p,{children:"Here you will find a variety of dashboards that help visualize data from the Unique parachain:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"https://dune.com/substrate/unique-nft-dashboard",children:"Unique NFT Dashboard"}),": A comprehensive view of\nNFT activities within the Unique parachain."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"https://dune.com/substrate/unique-collection-details",children:"Unique Collection Details Dashboard"}),":\nDetailed insights into specific NFT collections."]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["Please also visit our dashboards for Unique on\n",(0,s.jsx)(n.a,{href:"https://dune.com/discover/content/relevant?q=title:Unique%20author:substrate",children:"Dune Analytics"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"key-tables",children:"Key Tables"}),"\n",(0,s.jsx)(n.p,{children:"Data from the Unique parachain is organized into several key tables:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"unique.balances"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"unique.blocks"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"unique.calls"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"unique.events"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"unique.extrinsics"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"unique.transfers"})}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["Start building your own queries using granular data on Dune\n",(0,s.jsx)(n.a,{href:"https://dune.com/queries?category=canonical&namespace=unique",children:"here"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"useful-queries",children:"Useful Queries"}),"\n",(0,s.jsx)(n.p,{children:"Some useful queries for Unique are provided:"}),"\n",(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Title"}),(0,s.jsx)(n.th,{children:"Query"}),(0,s.jsx)(n.th,{children:"Description"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Unique ss58 and pubkey Maping Table"}),(0,s.jsx)(n.td,{children:(0,s.jsx)(n.a,{href:"https://dune.com/queries/3632470",children:"query_3632470"})}),(0,s.jsx)(n.td,{children:"Find all Unique ss58 and pubkey mappings"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Unique NFT Info"}),(0,s.jsx)(n.td,{children:(0,s.jsx)(n.a,{href:"https://dune.com/queries/3630265",children:"query_3630265"})}),(0,s.jsx)(n.td,{children:"Find all Unique NFT information"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Unique Collection Info"}),(0,s.jsx)(n.td,{children:(0,s.jsx)(n.a,{href:"https://dune.com/queries/3628043",children:"query_3628043"})}),(0,s.jsx)(n.td,{children:"Find all Unique collection information"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Unique NFT Transaction Info"}),(0,s.jsx)(n.td,{children:(0,s.jsx)(n.a,{href:"https://dune.com/queries/3631785",children:"query_3631785"})}),(0,s.jsx)(n.td,{children:"Find all Unique NFT transaction information"})]})]})]}),"\n",(0,s.jsx)(n.h2,{id:"getting-started-with-queries",children:"Getting Started with Queries"}),"\n",(0,s.jsx)(n.p,{children:"To get started with querying data from Unique, you are welcome to use the mentioned materialized\nqueries. You can use the following DuneSQL queries as examples:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-sql",metastring:'title="Unique Top Collections by Total Sales Amount" showLineNumbers',children:"SELECT\n collection_id_with_dashboard_url,\n token_prefix,\n SUM(for_price) AS total_amount\nFROM\n dune.substrate.result_unique_nft_transaction_info\nGROUP BY\n collection_id_with_dashboard_url,\n token_prefix\nORDER BY\n SUM(for_price) DESC;\n"})}),"\n",(0,s.jsx)(n.p,{children:"Query result:"}),"\n",(0,s.jsx)("iframe",{src:"https://dune.com/embeds/3632384/6118455/c4199fa9-3227-4688-90f1-81f0fc60db31",height:"350",width:"100%"}),"\n",(0,s.jsx)(n.admonition,{title:"DuneSQL Referece",type:"info",children:(0,s.jsxs)(n.p,{children:["For more information on DuneSQL, please refer to the ",(0,s.jsx)(n.a,{href:"/docs/general/dunesql-cheatsheet",children:"DuneSQL Cheatsheet"}),"\nand\n",(0,s.jsx)(n.a,{href:"https://docs.dune.com/query-engine/Functions-and-operators/index",children:"DuneSQL Official Documentation"}),"."]})})]})}function c(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(u,{...e})}):u(e)}},28453:(e,n,i)=>{i.d(n,{R:()=>r,x:()=>d});var s=i(96540);const a={},t=s.createContext(a);function r(e){const n=s.useContext(t);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:r(e.components),s.createElement(t.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/3611be04.2795d2bc.js b/assets/js/3611be04.2795d2bc.js deleted file mode 100644 index fdc22b6955ce..000000000000 --- a/assets/js/3611be04.2795d2bc.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5761],{98712:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>h,contentTitle:()=>r,default:()=>u,frontMatter:()=>o,metadata:()=>l,toc:()=>d});var s=t(74848),i=t(28453),a=t(67141);const o={id:"learn-offenses",title:"Offenses & Slashes on Polkadot",sidebar_label:"Offenses & Slashes",description:"Offenses and Slashes in the Polkadot Ecosystem.",keyword:["nominate","nominator","offenses","slashes","validator","equivocation","disabling"],slug:"../learn-offenses"},r=void 0,l={id:"learn/learn-offenses",title:"Offenses & Slashes on Polkadot",description:"Offenses and Slashes in the Polkadot Ecosystem.",source:"@site/../docs/learn/learn-offenses.md",sourceDirName:"learn",slug:"/learn-offenses",permalink:"/docs/learn-offenses",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-offenses.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1726760224e3,frontMatter:{id:"learn-offenses",title:"Offenses & Slashes on Polkadot",sidebar_label:"Offenses & Slashes",description:"Offenses and Slashes in the Polkadot Ecosystem.",keyword:["nominate","nominator","offenses","slashes","validator","equivocation","disabling"],slug:"../learn-offenses"},sidebar:"docs",previous:{title:"Validator",permalink:"/docs/learn-validator"},next:{title:"Components",permalink:"/docs/learn-components-index"}},h={},d=[{value:"Offenses",id:"offenses",level:2},{value:"Equivocation (Conflicting Statements)",id:"equivocation-conflicting-statements",level:3},{value:"Punishments",id:"punishments",level:2},{value:"Slashing",id:"slashing",level:3},{value:"Slash for Equivocation",id:"slash-for-equivocation",level:4},{value:"Slash Calculation for Equivocation",id:"slash-calculation-for-equivocation",level:4},{value:"Good Practices to Avoid Slashing",id:"good-practices-to-avoid-slashing",level:4},{value:"Slashing Across Eras",id:"slashing-across-eras",level:4},{value:"Disabling",id:"disabling",level:3},{value:"Reputation Changes",id:"reputation-changes",level:3}];function c(e){const n={a:"a",admonition:"admonition",br:"br",h2:"h2",h3:"h3",h4:"h4",li:"li",ol:"ol",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a.A,{message:"The material provided here is based on the changes introduced by Step 2 of the Disabling feature.\nSee [this page](https://github.com/orgs/paritytech/projects/119/views/15?pane=issue&itemId=61684472)\nfor more information."}),"\n",(0,s.jsx)(n.admonition,{title:"Disclaimer",type:"info",children:(0,s.jsxs)(n.p,{children:["Various parachains or applications living on top of Polkadot might add various economic schemes and\ninclude slashes, but they are unrelated to the slashes described here as they only refer to the\nstaked tokens via ",(0,s.jsx)(n.a,{href:"/docs/learn-staking#nominated-proof-of-stake-npos",children:"Nominated Proof-of-Stake"}),"."]})}),"\n",(0,s.jsx)(n.p,{children:"Polkadot is a public permissionless network. As such, it has a mechanism to disincentivize offenses\nand incentivize good behavior. Below, you can find a summary of punishments for specific offenses:"}),"\n",(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{style:{textAlign:"center"},children:"Offense"}),(0,s.jsx)(n.th,{style:{textAlign:"center"},children:(0,s.jsx)(n.a,{href:"#slashing",children:"Slash (%)"})}),(0,s.jsx)(n.th,{style:{textAlign:"center"},children:(0,s.jsx)(n.a,{href:"#disabling",children:"On-chain Disabling"})}),(0,s.jsx)(n.th,{style:{textAlign:"center"},children:"Off-chain Disabling"}),(0,s.jsx)(n.th,{style:{textAlign:"center"},children:(0,s.jsx)(n.a,{href:"#reputation-changes",children:"Reputational Changes"})})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Backing Invalid"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"100%"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Yes"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Yes (High Priority)"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"No"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"ForInvalid Vote"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"-"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"No"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Yes (Mid Priority)"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"No"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"AgainstValid Vote"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"-"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"No"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Yes (Low Priority)"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"No"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"GRANDPA / BABE / BEEFY Equivocations"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"0.01-100%"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Yes"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"No"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"No"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Seconded + Valid Equivocation"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"-"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"No"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"No"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"No"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Double Seconded Equivocation"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"-"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"No"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"No"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Yes"})]})]})]}),"\n",(0,s.jsx)(n.h2,{id:"offenses",children:"Offenses"}),"\n",(0,s.jsx)(n.admonition,{title:"Learn more about the parachain protocol",type:"info",children:(0,s.jsxs)(n.p,{children:["To better understand the terminology used for offenses, it is recommended to get familiar with the\n",(0,s.jsx)(n.a,{href:"/docs/learn-parachains-protocol",children:"parachain protocol"}),"."]})}),"\n",(0,s.jsx)(n.p,{children:"On Polkadot, there are six main validator offenses as shown below."}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Backing Invalid:"})," A para-validator is backing an invalid block."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"ForInvalid Vote:"})," A validator (secondary checker) votes in favor of an invalid block."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"AgainstValid Vote:"})," A validator (secondary checker) is voting against a valid block (and\nwasting network resources)."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Equivocation:"})," A validator produces two or more of the same block or vote.","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"GRANDPA and BEEFY Equivocation: A validator signs two or more votes in the same round on\ndifferent chains."}),"\n",(0,s.jsx)(n.li,{children:"BABE Equivocation: A validator produces two or more blocks on the relay chain in the same time\nslot."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Double Seconded Equivocation:"})," Within a backing group of 5 para-validators, at most 5 backed\nparablocks are possible. Each parablock requires exactly one seconded and at least two more valid\nvotes from the five potential backers. This makes an upper bound on the number of parablocks the\nsystem has to deal with while still allowing some choice for relay chain block authors. Backers\nmust decide which parablock to second, and they cannot second another. If another seconding vote\nis found, they will be punished (somewhat lightly as of now, but there is little to gain from\nthis). All of this is made slightly more complicated with\n",(0,s.jsx)(n.a,{href:"/docs/learn-async-backing",children:"asynchronous backing"}),' as it is no longer one candidate per relay chain\nblock as backers can back blocks "into the future" optimistically. See\n',(0,s.jsx)(n.a,{href:"https://paritytech.github.io/polkadot-sdk/book/node/backing/statement-distribution.html#seconding-limit",children:"this page"}),"\nfor more information."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Seconded + Valid Equivocation:"})," This happens when a malicious node first seconds something\n(takes absolute responsibility for it), and then only pretends to be someone who just said it is\ncorrect after someone else takes responsibility. That is a straight-up lie (equivocation). A node\ncould use that tactic to escape responsibility, but once the system notices the two conflicting\nvotes, the offense is reported."]}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"equivocation-conflicting-statements",children:"Equivocation (Conflicting Statements)"}),"\n",(0,s.jsx)(n.p,{children:"Equivocation occurs when a validator produces statements that conflict with each other."}),"\n",(0,s.jsx)(n.p,{children:"For instance, as a block author appointed by BABE, only a single block should be authored for the\ngiven slot, and if two or more are authored, they are in conflict with each other. This would be a\nBABE Equivocation Offence."}),"\n",(0,s.jsx)(n.p,{children:"In BEEFY & GRANDPA validators are expected to cast a single vote for the block they believe is the\nbest, but if they are found with two or more votes for different blocks, it means they tried to\nconfuse the network with conflicting statements and when found out this will be a BEEFY/GRANDPA\nEquivocation Offense."}),"\n",(0,s.jsx)(n.p,{children:"Equivocations usually occur when duplicate signing keys reside on the validator host. If keys are\nnever duplicated, the probability of an honest equivocation slash decreases to near 0."}),"\n",(0,s.jsx)(n.h2,{id:"punishments",children:"Punishments"}),"\n",(0,s.jsx)(n.p,{children:"On Polkadot, offenses to the network can be punished depending on their severity. There are three\nmain punishments: slashing, disabling, and reputation changes."}),"\n",(0,s.jsx)(n.h3,{id:"slashing",children:"Slashing"}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Slashing"})," will happen if a validator misbehaves in the network. They and their nominators will\nget slashed by losing a percentage of their staked tokens, from as little as 0.01% up to 100%."]}),"\n",(0,s.jsxs)(n.p,{children:["Any slashed token will be added to the ",(0,s.jsx)(n.a,{href:"/docs/learn/learn-treasury",children:"Treasury"}),". The rationale for\nthis (rather than burning or distributing them as rewards) is that slashes may be reverted by simply\npaying out from the Treasury. This would be useful in situations such as faulty slashes. In the case\nof legitimate slashing, tokens are moved away from malicious validators to those building the\necosystem through the normal Treasury process."]}),"\n",(0,s.jsx)(n.p,{children:"Slashing only occurs for active validations for a given nominator, and slashes are not mitigated by\nhaving other inactive or waiting nominations. They are also not mitigated by the validator operator\nrunning separate nodes; each node is considered its own entity for slashing purposes."}),"\n",(0,s.jsx)(n.admonition,{title:"Multiple Active Nominations",type:"info",children:(0,s.jsxs)(n.p,{children:["In rare instances, with very large bonds, a nominator may actively nominate several validators in a\nsingle era. In this case, the slash is proportionate to the amount staked to that specific\nvalidator. Note that you cannot control the percentage of stake allocated to each validator or\nchoose who your active validator will be (except in the trivial case of nominating a single\nvalidator). Staking allocations are controlled by the ",(0,s.jsx)(n.a,{href:"/docs/learn-phragmen",children:"Phragm\xe9n algorithm"}),"."]})}),"\n",(0,s.jsxs)(n.p,{children:['Once a validator gets slashed, it goes into the state as an "unapplied slash". You can check this\nvia\n',(0,s.jsx)(n.a,{href:"https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc.polkadot.io#/staking/slashes",children:"Polkadot-JS UI"}),".\nThe UI shows it per validator, followed by all the affected nominators and the amounts. While\nunapplied, a governance proposal can be made to reverse it during a 27-day grace period, after which\nthe slashes are applied."]}),"\n",(0,s.jsx)(n.p,{children:"A slash may occur under the circumstances below:"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsx)(n.li,{children:"Equivocations \u2013 A slash of 0.01% is applied with as little as a single evocation. The slashed\namount increases to 100% incrementally as more validators also equivocate."}),"\n",(0,s.jsx)(n.li,{children:"Disputes \u2013 This may result from a validator trying to represent the contents of a block falsely\n. Slashing penalties of 100% may apply."}),"\n"]}),"\n",(0,s.jsx)(n.h4,{id:"slash-for-equivocation",children:"Slash for Equivocation"}),"\n",(0,s.jsxs)(n.p,{children:["The following levels of offense are\n",(0,s.jsx)(n.a,{href:"https://research.web3.foundation/Polkadot/security/slashing/amounts",children:"defined"}),". However, these\nparticular levels are not implemented or referred to in the code or the system; they are meant as\nguidelines for different levels of severity for offenses."]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Level 1: Isolated equivocation slashes a minimal amount of the stake."}),"\n",(0,s.jsxs)(n.li,{children:["Level 2: Misconducts unlikely to be accidental but do not harm the network's security to any large\nextent. Examples include concurrent equivocation or isolated cases of unjustified voting in\n",(0,s.jsx)(n.a,{href:"/docs/learn-consensus",children:"GRANDPA"}),". Slashes a moderately small amount of the stake."]}),"\n",(0,s.jsx)(n.li,{children:"Level 3: misconduct that poses severe security or monetary risk to the system or mass collusion.\nSlashes all or most of the stake behind the validator."}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"The following are scenarios that build towards slashes under equivocation:"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsx)(n.li,{children:"Cloning a server, i.e., copying all contents when migrating to new hardware. This action should\nbe avoided. If an image is desired, it should be taken before keys are generated."}),"\n",(0,s.jsx)(n.li,{children:"High Availability (HA) Systems \u2013 Equivocation can occur if there are any concurrent operations,\neither when a failed server restarts or if a false positive event results in both servers being\nonline simultaneously. HA systems are to be treated with extreme caution and are not advised."}),"\n",(0,s.jsxs)(n.li,{children:["The keystore folder is copied when attempting to copy a database from one instance to another.",(0,s.jsx)(n.br,{}),"\n","It is important to note that equivocation slashes occur with a single incident. This can happen\nif duplicated keystores are used for only a few seconds. A slash can result in losing nominators\nand funds, removal from the Thousand Validator Programme, and reputational damage."]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["See the next section to understand how slash amounts for equivocations are calculated. If you want\nto know more details about slashing, please look at our\n",(0,s.jsx)(n.a,{href:"https://research.web3.foundation/Polkadot/security/slashing/amounts",children:"research page"}),"."]}),"\n",(0,s.jsx)(n.h4,{id:"slash-calculation-for-equivocation",children:"Slash Calculation for Equivocation"}),"\n",(0,s.jsx)(n.p,{children:"GRANDPA, BABE, and BEEFY equivocation use the same formula for calculating the slashing penalty:"}),"\n",(0,s.jsx)(n.p,{children:"Let x = offenders, n = total number of validators in the active set"}),"\n",(0,s.jsx)(n.p,{children:"min((3 * x / n )^2, 1)"}),"\n",(0,s.jsx)(n.p,{children:"For example, assume that there are 100 validators in the active set, and one equivocates in a slot\n(for our purposes, it does not matter whether it was a BABE or GRANDPA equivocation). This is\nunlikely to be an attack on the network but much more likely to be a misconfiguration of a\nvalidator. The penalty would be min(3 * 1 / 100)^2, 1) = 0.0009, or a 0.09% slash for that\nvalidator (i.e., the stake held by the validator and its nominators)."}),"\n",(0,s.jsx)(n.p,{children:"Now, assume that a group is running several validators, and they all have an issue in the same slot.\nThe penalty would be min((3 * 5 / 100)^2, 1) = 0.0225, or a 2.25% slash. If 20 validators\nequivocate, this is a much more serious offense, possibly indicating a coordinated attack on the\nnetwork. So, the slash will be much greater - min((3 * 20 / 100)^2, 1) = 0.36, or a 36% slash on\nall these validators and their nominators. All slashed validators will also be chilled."}),"\n",(0,s.jsx)(n.p,{children:"The example above shows the risk of nominating or running many validators in the active set. While\nrewards grow linearly (two validators will get you approximately twice as many staking rewards as\none) slashing grows exponentially. A single validator equivocating causes a 0.09% slash, and two\nvalidators equivocating does not cause a 0.09 * 2 = 0.18% slash, but rather a 0.36% slash - 4x as\nmuch as the single validator."}),"\n",(0,s.jsx)(n.p,{children:"Validators may run their nodes on multiple machines to ensure they can still perform validation work\nif one of their nodes goes down. Still, validator operators should be cautious when setting these\nup. Equivocation is possible if they do not have good coordination in managing signing machines."}),"\n",(0,s.jsx)(n.h4,{id:"good-practices-to-avoid-slashing",children:"Good Practices to Avoid Slashing"}),"\n",(0,s.jsx)(n.p,{children:"The following are advised to node operators to ensure that they obtain pristine binaries or source\ncode and to ensure the security of their node:"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsx)(n.li,{children:"Always download either source files or binaries from the official Parity repository"}),"\n",(0,s.jsx)(n.li,{children:"Verify the hash of downloaded files."}),"\n",(0,s.jsx)(n.li,{children:"Use the W3F secure validator setup or adhere to its principles"}),"\n",(0,s.jsx)(n.li,{children:"Ensure essential security items are checked, use a firewall, manage user access, use SSH\ncertificates"}),"\n",(0,s.jsx)(n.li,{children:"Avoid using your server as a general-purpose system. Hosting a validator on your workstation or\none that hosts other services increases the risk of maleficence."}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"Below are some examples of small equivocations that happened in the past."}),"\n",(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Network"}),(0,s.jsx)(n.th,{children:"Era"}),(0,s.jsx)(n.th,{children:"Event Type"}),(0,s.jsx)(n.th,{children:"Details"}),(0,s.jsx)(n.th,{children:"Action Taken"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Polkadot"}),(0,s.jsx)(n.td,{children:"774"}),(0,s.jsx)(n.td,{children:"Small Equivocation"}),(0,s.jsxs)(n.td,{children:[(0,s.jsx)(n.a,{href:"https://matrix.to/#/!NZrbtteFeqYKCUGQtr:matrix.parity.io/$165562246360408hKCfC:matrix.org?via=matrix.parity.io&via=corepaper.org&via=matrix.org",children:"The validator"})," migrated servers and cloned the keystore folder. The on-chain event can be viewed ",(0,s.jsx)(n.a,{href:"https://polkadot.subscan.io/extrinsic/11190109-0?event=11190109-5",children:"here"}),"."]}),(0,s.jsx)(n.td,{children:"The validator did not submit a request for the slash to be canceled."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Kusama"}),(0,s.jsx)(n.td,{children:"3329"}),(0,s.jsx)(n.td,{children:"Small Equivocation"}),(0,s.jsxs)(n.td,{children:["The validator operated a test machine with cloned keys; the test machine was online at the same time as the primary, which resulted in a slash. Details can be found ",(0,s.jsx)(n.a,{href:"https://kusama.polkassembly.io/post/1343",children:"here"}),"."]}),(0,s.jsx)(n.td,{children:"The validator requested a slash cancellation, but the council declined."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Kusama"}),(0,s.jsx)(n.td,{children:"3995"}),(0,s.jsx)(n.td,{children:"Small Equivocation"}),(0,s.jsxs)(n.td,{children:["The validator noticed several errors, after which the client crashed, and a slash was applied. The validator recorded all events and opened GitHub issues to allow for technical opinions to be shared. Details can be found ",(0,s.jsx)(n.a,{href:"https://kusama.polkassembly.io/post/1733",children:"here"}),"."]}),(0,s.jsx)(n.td,{children:"The validator requested to cancel the slash. The council approved the request as they believed the error was not operator-related."})]})]})]}),"\n",(0,s.jsx)(n.h4,{id:"slashing-across-eras",children:"Slashing Across Eras"}),"\n",(0,s.jsx)(n.p,{children:"There are three main difficulties to account for with slashing in NPoS:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"A nominator can nominate multiple validators and be slashed via any of them."}),"\n",(0,s.jsx)(n.li,{children:"Until slashed, the stake is reused from era to era. Nominating with N coins for E eras in a row\ndoes not mean you have N*E coins to be slashed - you've only ever had N."}),"\n",(0,s.jsx)(n.li,{children:"Slashable offenses can be found after the fact and out of order."}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"To balance this, the system applies only the maximum slash a participant can receive in a given time\nperiod rather than the sum. This ensures protection from overslashing."}),"\n",(0,s.jsx)(n.h3,{id:"disabling",children:"Disabling"}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Disabling"})," stops validators from performing specific actions after they have committed an\noffense. Disabling is further divided into:"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"On-chain disabling lasts for a whole era and stops validators from block authoring, backing, and\ninitiating a dispute."}),"\n",(0,s.jsx)(n.li,{children:"Off-chain disabling lasts for a session, is caused by losing a dispute, and stops validators from\ninitiating a dispute."}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"Off-chain disabling is always a lower priority than on-chain disabling. Off-chain disabling\nprioritizes disabling first backers and then approval checkers."}),"\n",(0,s.jsx)(n.h3,{id:"reputation-changes",children:"Reputation Changes"}),"\n",(0,s.jsx)(n.p,{children:"Some minor offenses often connected to spamming are only punished by Networking Reputation Changes.\nWhen validators connect to each other, they use a reputation metric for each of their peers. If our\npeers provide valuable data and behave appropriately, the system adds reputation; if they provide us\nwith faulty or spam data, the system reduces their reputation. A validator can lose enough\nreputation so that the peers will temporarily close their channels. This helps in fighting against\nDoS (Denial of Service) attacks. The consequences of closing channels may vary. In general,\nperforming validator tasks under reduced reputation will be harder, resulting in lower validator\nrewards."})]})}function u(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(c,{...e})}):c(e)}},67141:(e,n,t)=>{t.d(n,{A:()=>a});var s=t(96540),i=t(74848);const a=function(e){var n,t=e.message,a=(0,s.useState)(!0),o=a[0],r=a[1];return(0,i.jsx)(i.Fragment,{children:o&&(0,i.jsxs)("div",{className:"message-box",children:[(0,i.jsx)("button",{className:"close-button",onClick:function(){r(!1)},children:"\u2716 "}),(0,i.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(n=t,n.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},28453:(e,n,t)=>{t.d(n,{R:()=>o,x:()=>r});var s=t(96540);const i={},a=s.createContext(i);function o(e){const n=s.useContext(a);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:o(e.components),s.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/3611be04.39dcb0ef.js b/assets/js/3611be04.39dcb0ef.js new file mode 100644 index 000000000000..d0717f13e82c --- /dev/null +++ b/assets/js/3611be04.39dcb0ef.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5761],{46182:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>h,contentTitle:()=>l,default:()=>u,frontMatter:()=>r,metadata:()=>s,toc:()=>d});const s=JSON.parse('{"id":"learn/learn-offenses","title":"Offenses & Slashes on Polkadot","description":"Offenses and Slashes in the Polkadot Ecosystem.","source":"@site/../docs/learn/learn-offenses.md","sourceDirName":"learn","slug":"/learn-offenses","permalink":"/docs/learn-offenses","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-offenses.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1726760224000,"frontMatter":{"id":"learn-offenses","title":"Offenses & Slashes on Polkadot","sidebar_label":"Offenses & Slashes","description":"Offenses and Slashes in the Polkadot Ecosystem.","keyword":["nominate","nominator","offenses","slashes","validator","equivocation","disabling"],"slug":"../learn-offenses"},"sidebar":"docs","previous":{"title":"Validator","permalink":"/docs/learn-validator"},"next":{"title":"Components","permalink":"/docs/learn-components-index"}}');var i=t(74848),a=t(28453),o=t(67141);const r={id:"learn-offenses",title:"Offenses & Slashes on Polkadot",sidebar_label:"Offenses & Slashes",description:"Offenses and Slashes in the Polkadot Ecosystem.",keyword:["nominate","nominator","offenses","slashes","validator","equivocation","disabling"],slug:"../learn-offenses"},l=void 0,h={},d=[{value:"Offenses",id:"offenses",level:2},{value:"Equivocation (Conflicting Statements)",id:"equivocation-conflicting-statements",level:3},{value:"Punishments",id:"punishments",level:2},{value:"Slashing",id:"slashing",level:3},{value:"Slash for Equivocation",id:"slash-for-equivocation",level:4},{value:"Slash Calculation for Equivocation",id:"slash-calculation-for-equivocation",level:4},{value:"Good Practices to Avoid Slashing",id:"good-practices-to-avoid-slashing",level:4},{value:"Slashing Across Eras",id:"slashing-across-eras",level:4},{value:"Disabling",id:"disabling",level:3},{value:"Reputation Changes",id:"reputation-changes",level:3}];function c(e){const n={a:"a",admonition:"admonition",br:"br",h2:"h2",h3:"h3",h4:"h4",li:"li",ol:"ol",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,a.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(o.A,{message:"The material provided here is based on the changes introduced by Step 2 of the Disabling feature.\nSee [this page](https://github.com/orgs/paritytech/projects/119/views/15?pane=issue&itemId=61684472)\nfor more information."}),"\n",(0,i.jsx)(n.admonition,{title:"Disclaimer",type:"info",children:(0,i.jsxs)(n.p,{children:["Various parachains or applications living on top of Polkadot might add various economic schemes and\ninclude slashes, but they are unrelated to the slashes described here as they only refer to the\nstaked tokens via ",(0,i.jsx)(n.a,{href:"/docs/learn-staking#nominated-proof-of-stake-npos",children:"Nominated Proof-of-Stake"}),"."]})}),"\n",(0,i.jsx)(n.p,{children:"Polkadot is a public permissionless network. As such, it has a mechanism to disincentivize offenses\nand incentivize good behavior. Below, you can find a summary of punishments for specific offenses:"}),"\n",(0,i.jsxs)(n.table,{children:[(0,i.jsx)(n.thead,{children:(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.th,{style:{textAlign:"center"},children:"Offense"}),(0,i.jsx)(n.th,{style:{textAlign:"center"},children:(0,i.jsx)(n.a,{href:"#slashing",children:"Slash (%)"})}),(0,i.jsx)(n.th,{style:{textAlign:"center"},children:(0,i.jsx)(n.a,{href:"#disabling",children:"On-chain Disabling"})}),(0,i.jsx)(n.th,{style:{textAlign:"center"},children:"Off-chain Disabling"}),(0,i.jsx)(n.th,{style:{textAlign:"center"},children:(0,i.jsx)(n.a,{href:"#reputation-changes",children:"Reputational Changes"})})]})}),(0,i.jsxs)(n.tbody,{children:[(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{style:{textAlign:"center"},children:"Backing Invalid"}),(0,i.jsx)(n.td,{style:{textAlign:"center"},children:"100%"}),(0,i.jsx)(n.td,{style:{textAlign:"center"},children:"Yes"}),(0,i.jsx)(n.td,{style:{textAlign:"center"},children:"Yes (High Priority)"}),(0,i.jsx)(n.td,{style:{textAlign:"center"},children:"No"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{style:{textAlign:"center"},children:"ForInvalid Vote"}),(0,i.jsx)(n.td,{style:{textAlign:"center"},children:"-"}),(0,i.jsx)(n.td,{style:{textAlign:"center"},children:"No"}),(0,i.jsx)(n.td,{style:{textAlign:"center"},children:"Yes (Mid Priority)"}),(0,i.jsx)(n.td,{style:{textAlign:"center"},children:"No"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{style:{textAlign:"center"},children:"AgainstValid Vote"}),(0,i.jsx)(n.td,{style:{textAlign:"center"},children:"-"}),(0,i.jsx)(n.td,{style:{textAlign:"center"},children:"No"}),(0,i.jsx)(n.td,{style:{textAlign:"center"},children:"Yes (Low Priority)"}),(0,i.jsx)(n.td,{style:{textAlign:"center"},children:"No"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{style:{textAlign:"center"},children:"GRANDPA / BABE / BEEFY Equivocations"}),(0,i.jsx)(n.td,{style:{textAlign:"center"},children:"0.01-100%"}),(0,i.jsx)(n.td,{style:{textAlign:"center"},children:"Yes"}),(0,i.jsx)(n.td,{style:{textAlign:"center"},children:"No"}),(0,i.jsx)(n.td,{style:{textAlign:"center"},children:"No"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{style:{textAlign:"center"},children:"Seconded + Valid Equivocation"}),(0,i.jsx)(n.td,{style:{textAlign:"center"},children:"-"}),(0,i.jsx)(n.td,{style:{textAlign:"center"},children:"No"}),(0,i.jsx)(n.td,{style:{textAlign:"center"},children:"No"}),(0,i.jsx)(n.td,{style:{textAlign:"center"},children:"No"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{style:{textAlign:"center"},children:"Double Seconded Equivocation"}),(0,i.jsx)(n.td,{style:{textAlign:"center"},children:"-"}),(0,i.jsx)(n.td,{style:{textAlign:"center"},children:"No"}),(0,i.jsx)(n.td,{style:{textAlign:"center"},children:"No"}),(0,i.jsx)(n.td,{style:{textAlign:"center"},children:"Yes"})]})]})]}),"\n",(0,i.jsx)(n.h2,{id:"offenses",children:"Offenses"}),"\n",(0,i.jsx)(n.admonition,{title:"Learn more about the parachain protocol",type:"info",children:(0,i.jsxs)(n.p,{children:["To better understand the terminology used for offenses, it is recommended to get familiar with the\n",(0,i.jsx)(n.a,{href:"/docs/learn-parachains-protocol",children:"parachain protocol"}),"."]})}),"\n",(0,i.jsx)(n.p,{children:"On Polkadot, there are six main validator offenses as shown below."}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Backing Invalid:"})," A para-validator is backing an invalid block."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"ForInvalid Vote:"})," A validator (secondary checker) votes in favor of an invalid block."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"AgainstValid Vote:"})," A validator (secondary checker) is voting against a valid block (and\nwasting network resources)."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Equivocation:"})," A validator produces two or more of the same block or vote.","\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"GRANDPA and BEEFY Equivocation: A validator signs two or more votes in the same round on\ndifferent chains."}),"\n",(0,i.jsx)(n.li,{children:"BABE Equivocation: A validator produces two or more blocks on the relay chain in the same time\nslot."}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Double Seconded Equivocation:"})," Within a backing group of 5 para-validators, at most 5 backed\nparablocks are possible. Each parablock requires exactly one seconded and at least two more valid\nvotes from the five potential backers. This makes an upper bound on the number of parablocks the\nsystem has to deal with while still allowing some choice for relay chain block authors. Backers\nmust decide which parablock to second, and they cannot second another. If another seconding vote\nis found, they will be punished (somewhat lightly as of now, but there is little to gain from\nthis). All of this is made slightly more complicated with\n",(0,i.jsx)(n.a,{href:"/docs/learn-async-backing",children:"asynchronous backing"}),' as it is no longer one candidate per relay chain\nblock as backers can back blocks "into the future" optimistically. See\n',(0,i.jsx)(n.a,{href:"https://paritytech.github.io/polkadot-sdk/book/node/backing/statement-distribution.html#seconding-limit",children:"this page"}),"\nfor more information."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Seconded + Valid Equivocation:"})," This happens when a malicious node first seconds something\n(takes absolute responsibility for it), and then only pretends to be someone who just said it is\ncorrect after someone else takes responsibility. That is a straight-up lie (equivocation). A node\ncould use that tactic to escape responsibility, but once the system notices the two conflicting\nvotes, the offense is reported."]}),"\n"]}),"\n",(0,i.jsx)(n.h3,{id:"equivocation-conflicting-statements",children:"Equivocation (Conflicting Statements)"}),"\n",(0,i.jsx)(n.p,{children:"Equivocation occurs when a validator produces statements that conflict with each other."}),"\n",(0,i.jsx)(n.p,{children:"For instance, as a block author appointed by BABE, only a single block should be authored for the\ngiven slot, and if two or more are authored, they are in conflict with each other. This would be a\nBABE Equivocation Offence."}),"\n",(0,i.jsx)(n.p,{children:"In BEEFY & GRANDPA validators are expected to cast a single vote for the block they believe is the\nbest, but if they are found with two or more votes for different blocks, it means they tried to\nconfuse the network with conflicting statements and when found out this will be a BEEFY/GRANDPA\nEquivocation Offense."}),"\n",(0,i.jsx)(n.p,{children:"Equivocations usually occur when duplicate signing keys reside on the validator host. If keys are\nnever duplicated, the probability of an honest equivocation slash decreases to near 0."}),"\n",(0,i.jsx)(n.h2,{id:"punishments",children:"Punishments"}),"\n",(0,i.jsx)(n.p,{children:"On Polkadot, offenses to the network can be punished depending on their severity. There are three\nmain punishments: slashing, disabling, and reputation changes."}),"\n",(0,i.jsx)(n.h3,{id:"slashing",children:"Slashing"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Slashing"})," will happen if a validator misbehaves in the network. They and their nominators will\nget slashed by losing a percentage of their staked tokens, from as little as 0.01% up to 100%."]}),"\n",(0,i.jsxs)(n.p,{children:["Any slashed token will be added to the ",(0,i.jsx)(n.a,{href:"/docs/learn/learn-treasury",children:"Treasury"}),". The rationale for\nthis (rather than burning or distributing them as rewards) is that slashes may be reverted by simply\npaying out from the Treasury. This would be useful in situations such as faulty slashes. In the case\nof legitimate slashing, tokens are moved away from malicious validators to those building the\necosystem through the normal Treasury process."]}),"\n",(0,i.jsx)(n.p,{children:"Slashing only occurs for active validations for a given nominator, and slashes are not mitigated by\nhaving other inactive or waiting nominations. They are also not mitigated by the validator operator\nrunning separate nodes; each node is considered its own entity for slashing purposes."}),"\n",(0,i.jsx)(n.admonition,{title:"Multiple Active Nominations",type:"info",children:(0,i.jsxs)(n.p,{children:["In rare instances, with very large bonds, a nominator may actively nominate several validators in a\nsingle era. In this case, the slash is proportionate to the amount staked to that specific\nvalidator. Note that you cannot control the percentage of stake allocated to each validator or\nchoose who your active validator will be (except in the trivial case of nominating a single\nvalidator). Staking allocations are controlled by the ",(0,i.jsx)(n.a,{href:"/docs/learn-phragmen",children:"Phragm\xe9n algorithm"}),"."]})}),"\n",(0,i.jsxs)(n.p,{children:['Once a validator gets slashed, it goes into the state as an "unapplied slash". You can check this\nvia\n',(0,i.jsx)(n.a,{href:"https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc.polkadot.io#/staking/slashes",children:"Polkadot-JS UI"}),".\nThe UI shows it per validator, followed by all the affected nominators and the amounts. While\nunapplied, a governance proposal can be made to reverse it during a 27-day grace period, after which\nthe slashes are applied."]}),"\n",(0,i.jsx)(n.p,{children:"A slash may occur under the circumstances below:"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsx)(n.li,{children:"Equivocations \u2013 A slash of 0.01% is applied with as little as a single evocation. The slashed\namount increases to 100% incrementally as more validators also equivocate."}),"\n",(0,i.jsx)(n.li,{children:"Disputes \u2013 This may result from a validator trying to represent the contents of a block falsely\n. Slashing penalties of 100% may apply."}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"slash-for-equivocation",children:"Slash for Equivocation"}),"\n",(0,i.jsxs)(n.p,{children:["The following levels of offense are\n",(0,i.jsx)(n.a,{href:"https://research.web3.foundation/Polkadot/security/slashing/amounts",children:"defined"}),". However, these\nparticular levels are not implemented or referred to in the code or the system; they are meant as\nguidelines for different levels of severity for offenses."]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Level 1: Isolated equivocation slashes a minimal amount of the stake."}),"\n",(0,i.jsxs)(n.li,{children:["Level 2: Misconducts unlikely to be accidental but do not harm the network's security to any large\nextent. Examples include concurrent equivocation or isolated cases of unjustified voting in\n",(0,i.jsx)(n.a,{href:"/docs/learn-consensus",children:"GRANDPA"}),". Slashes a moderately small amount of the stake."]}),"\n",(0,i.jsx)(n.li,{children:"Level 3: misconduct that poses severe security or monetary risk to the system or mass collusion.\nSlashes all or most of the stake behind the validator."}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"The following are scenarios that build towards slashes under equivocation:"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsx)(n.li,{children:"Cloning a server, i.e., copying all contents when migrating to new hardware. This action should\nbe avoided. If an image is desired, it should be taken before keys are generated."}),"\n",(0,i.jsx)(n.li,{children:"High Availability (HA) Systems \u2013 Equivocation can occur if there are any concurrent operations,\neither when a failed server restarts or if a false positive event results in both servers being\nonline simultaneously. HA systems are to be treated with extreme caution and are not advised."}),"\n",(0,i.jsxs)(n.li,{children:["The keystore folder is copied when attempting to copy a database from one instance to another.",(0,i.jsx)(n.br,{}),"\n","It is important to note that equivocation slashes occur with a single incident. This can happen\nif duplicated keystores are used for only a few seconds. A slash can result in losing nominators\nand funds, removal from the Thousand Validator Programme, and reputational damage."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["See the next section to understand how slash amounts for equivocations are calculated. If you want\nto know more details about slashing, please look at our\n",(0,i.jsx)(n.a,{href:"https://research.web3.foundation/Polkadot/security/slashing/amounts",children:"research page"}),"."]}),"\n",(0,i.jsx)(n.h4,{id:"slash-calculation-for-equivocation",children:"Slash Calculation for Equivocation"}),"\n",(0,i.jsx)(n.p,{children:"GRANDPA, BABE, and BEEFY equivocation use the same formula for calculating the slashing penalty:"}),"\n",(0,i.jsx)(n.p,{children:"Let x = offenders, n = total number of validators in the active set"}),"\n",(0,i.jsx)(n.p,{children:"min((3 * x / n )^2, 1)"}),"\n",(0,i.jsx)(n.p,{children:"For example, assume that there are 100 validators in the active set, and one equivocates in a slot\n(for our purposes, it does not matter whether it was a BABE or GRANDPA equivocation). This is\nunlikely to be an attack on the network but much more likely to be a misconfiguration of a\nvalidator. The penalty would be min(3 * 1 / 100)^2, 1) = 0.0009, or a 0.09% slash for that\nvalidator (i.e., the stake held by the validator and its nominators)."}),"\n",(0,i.jsx)(n.p,{children:"Now, assume that a group is running several validators, and they all have an issue in the same slot.\nThe penalty would be min((3 * 5 / 100)^2, 1) = 0.0225, or a 2.25% slash. If 20 validators\nequivocate, this is a much more serious offense, possibly indicating a coordinated attack on the\nnetwork. So, the slash will be much greater - min((3 * 20 / 100)^2, 1) = 0.36, or a 36% slash on\nall these validators and their nominators. All slashed validators will also be chilled."}),"\n",(0,i.jsx)(n.p,{children:"The example above shows the risk of nominating or running many validators in the active set. While\nrewards grow linearly (two validators will get you approximately twice as many staking rewards as\none) slashing grows exponentially. A single validator equivocating causes a 0.09% slash, and two\nvalidators equivocating does not cause a 0.09 * 2 = 0.18% slash, but rather a 0.36% slash - 4x as\nmuch as the single validator."}),"\n",(0,i.jsx)(n.p,{children:"Validators may run their nodes on multiple machines to ensure they can still perform validation work\nif one of their nodes goes down. Still, validator operators should be cautious when setting these\nup. Equivocation is possible if they do not have good coordination in managing signing machines."}),"\n",(0,i.jsx)(n.h4,{id:"good-practices-to-avoid-slashing",children:"Good Practices to Avoid Slashing"}),"\n",(0,i.jsx)(n.p,{children:"The following are advised to node operators to ensure that they obtain pristine binaries or source\ncode and to ensure the security of their node:"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsx)(n.li,{children:"Always download either source files or binaries from the official Parity repository"}),"\n",(0,i.jsx)(n.li,{children:"Verify the hash of downloaded files."}),"\n",(0,i.jsx)(n.li,{children:"Use the W3F secure validator setup or adhere to its principles"}),"\n",(0,i.jsx)(n.li,{children:"Ensure essential security items are checked, use a firewall, manage user access, use SSH\ncertificates"}),"\n",(0,i.jsx)(n.li,{children:"Avoid using your server as a general-purpose system. Hosting a validator on your workstation or\none that hosts other services increases the risk of maleficence."}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"Below are some examples of small equivocations that happened in the past."}),"\n",(0,i.jsxs)(n.table,{children:[(0,i.jsx)(n.thead,{children:(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.th,{children:"Network"}),(0,i.jsx)(n.th,{children:"Era"}),(0,i.jsx)(n.th,{children:"Event Type"}),(0,i.jsx)(n.th,{children:"Details"}),(0,i.jsx)(n.th,{children:"Action Taken"})]})}),(0,i.jsxs)(n.tbody,{children:[(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"Polkadot"}),(0,i.jsx)(n.td,{children:"774"}),(0,i.jsx)(n.td,{children:"Small Equivocation"}),(0,i.jsxs)(n.td,{children:[(0,i.jsx)(n.a,{href:"https://matrix.to/#/!NZrbtteFeqYKCUGQtr:matrix.parity.io/$165562246360408hKCfC:matrix.org?via=matrix.parity.io&via=corepaper.org&via=matrix.org",children:"The validator"})," migrated servers and cloned the keystore folder. The on-chain event can be viewed ",(0,i.jsx)(n.a,{href:"https://polkadot.subscan.io/extrinsic/11190109-0?event=11190109-5",children:"here"}),"."]}),(0,i.jsx)(n.td,{children:"The validator did not submit a request for the slash to be canceled."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"Kusama"}),(0,i.jsx)(n.td,{children:"3329"}),(0,i.jsx)(n.td,{children:"Small Equivocation"}),(0,i.jsxs)(n.td,{children:["The validator operated a test machine with cloned keys; the test machine was online at the same time as the primary, which resulted in a slash. Details can be found ",(0,i.jsx)(n.a,{href:"https://kusama.polkassembly.io/post/1343",children:"here"}),"."]}),(0,i.jsx)(n.td,{children:"The validator requested a slash cancellation, but the council declined."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"Kusama"}),(0,i.jsx)(n.td,{children:"3995"}),(0,i.jsx)(n.td,{children:"Small Equivocation"}),(0,i.jsxs)(n.td,{children:["The validator noticed several errors, after which the client crashed, and a slash was applied. The validator recorded all events and opened GitHub issues to allow for technical opinions to be shared. Details can be found ",(0,i.jsx)(n.a,{href:"https://kusama.polkassembly.io/post/1733",children:"here"}),"."]}),(0,i.jsx)(n.td,{children:"The validator requested to cancel the slash. The council approved the request as they believed the error was not operator-related."})]})]})]}),"\n",(0,i.jsx)(n.h4,{id:"slashing-across-eras",children:"Slashing Across Eras"}),"\n",(0,i.jsx)(n.p,{children:"There are three main difficulties to account for with slashing in NPoS:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"A nominator can nominate multiple validators and be slashed via any of them."}),"\n",(0,i.jsx)(n.li,{children:"Until slashed, the stake is reused from era to era. Nominating with N coins for E eras in a row\ndoes not mean you have N*E coins to be slashed - you've only ever had N."}),"\n",(0,i.jsx)(n.li,{children:"Slashable offenses can be found after the fact and out of order."}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"To balance this, the system applies only the maximum slash a participant can receive in a given time\nperiod rather than the sum. This ensures protection from overslashing."}),"\n",(0,i.jsx)(n.h3,{id:"disabling",children:"Disabling"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Disabling"})," stops validators from performing specific actions after they have committed an\noffense. Disabling is further divided into:"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"On-chain disabling lasts for a whole era and stops validators from block authoring, backing, and\ninitiating a dispute."}),"\n",(0,i.jsx)(n.li,{children:"Off-chain disabling lasts for a session, is caused by losing a dispute, and stops validators from\ninitiating a dispute."}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"Off-chain disabling is always a lower priority than on-chain disabling. Off-chain disabling\nprioritizes disabling first backers and then approval checkers."}),"\n",(0,i.jsx)(n.h3,{id:"reputation-changes",children:"Reputation Changes"}),"\n",(0,i.jsx)(n.p,{children:"Some minor offenses often connected to spamming are only punished by Networking Reputation Changes.\nWhen validators connect to each other, they use a reputation metric for each of their peers. If our\npeers provide valuable data and behave appropriately, the system adds reputation; if they provide us\nwith faulty or spam data, the system reduces their reputation. A validator can lose enough\nreputation so that the peers will temporarily close their channels. This helps in fighting against\nDoS (Denial of Service) attacks. The consequences of closing channels may vary. In general,\nperforming validator tasks under reduced reputation will be harder, resulting in lower validator\nrewards."})]})}function u(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(c,{...e})}):c(e)}},67141:(e,n,t)=>{t.d(n,{A:()=>a});var s=t(96540),i=t(74848);const a=function(e){var n,t=e.message,a=(0,s.useState)(!0),o=a[0],r=a[1];return(0,i.jsx)(i.Fragment,{children:o&&(0,i.jsxs)("div",{className:"message-box",children:[(0,i.jsx)("button",{className:"close-button",onClick:function(){r(!1)},children:"\u2716 "}),(0,i.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(n=t,n.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},28453:(e,n,t)=>{t.d(n,{R:()=>o,x:()=>r});var s=t(96540);const i={},a=s.createContext(i);function o(e){const n=s.useContext(a);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:o(e.components),s.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/3624.b1c6e82b.js b/assets/js/3624.b1c6e82b.js new file mode 100644 index 000000000000..041bc30768e6 --- /dev/null +++ b/assets/js/3624.b1c6e82b.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3624],{62062:(t,n,r)=>{r.d(n,{A:()=>a});var e=r(29471);const o=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this};const c=function(t){return this.__data__.has(t)};function u(t){var n=-1,r=null==t?0:t.length;for(this.__data__=new e.A;++n{r.d(n,{A:()=>e});const e=function(t,n){for(var r=-1,e=null==t?0:t.length;++r{r.d(n,{A:()=>e});const e=function(t,n){for(var r=-1,e=null==t?0:t.length,o=0,c=[];++r{r.d(n,{A:()=>o});var e=r(60818);const o=function(t,n){return!!(null==t?0:t.length)&&(0,e.A)(t,n,0)>-1}},87809:(t,n,r)=>{r.d(n,{A:()=>e});const e=function(t,n,r){for(var e=-1,o=null==t?0:t.length;++e{r.d(n,{A:()=>e});const e=function(t,n){for(var r=-1,e=null==t?0:t.length,o=Array(e);++r{r.d(n,{A:()=>e});const e=function(t,n){for(var r=-1,e=n.length,o=t.length;++r{r.d(n,{A:()=>e});const e=function(t,n){for(var r=-1,e=null==t?0:t.length;++r{r.d(n,{A:()=>Q});var e=r(11754),o=r(72641),c=r(52851),u=r(22031),a=r(27422);const i=function(t,n){return t&&(0,u.A)(n,(0,a.A)(n),t)};var f=r(55615);const A=function(t,n){return t&&(0,u.A)(n,(0,f.A)(n),t)};var s=r(80154),v=r(39759),l=r(14792);const b=function(t,n){return(0,u.A)(t,(0,l.A)(t),n)};var d=r(83511);const j=function(t,n){return(0,u.A)(t,(0,d.A)(t),n)};var p=r(19042),h=r(83973),y=r(9779),g=Object.prototype.hasOwnProperty;const w=function(t){var n=t.length,r=new t.constructor(n);return n&&"string"==typeof t[0]&&g.call(t,"index")&&(r.index=t.index,r.input=t.input),r};var _=r(90565);const O=function(t,n){var r=n?(0,_.A)(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)};var m=/\w*$/;const S=function(t){var n=new t.constructor(t.source,m.exec(t));return n.lastIndex=t.lastIndex,n};var k=r(241),E=k.A?k.A.prototype:void 0,x=E?E.valueOf:void 0;const I=function(t){return x?Object(x.call(t)):{}};var U=r(1801);const B=function(t,n,r){var e=t.constructor;switch(n){case"[object ArrayBuffer]":return(0,_.A)(t);case"[object Boolean]":case"[object Date]":return new e(+t);case"[object DataView]":return O(t,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return(0,U.A)(t,r);case"[object Map]":case"[object Set]":return new e;case"[object Number]":case"[object String]":return new e(t);case"[object RegExp]":return S(t);case"[object Symbol]":return I(t)}};var C=r(18598),D=r(92049),F=r(99912),M=r(53098);const z=function(t){return(0,M.A)(t)&&"[object Map]"==(0,y.A)(t)};var L=r(52789),P=r(64841),$=P.A&&P.A.isMap;const N=$?(0,L.A)($):z;var R=r(23149);const V=function(t){return(0,M.A)(t)&&"[object Set]"==(0,y.A)(t)};var G=P.A&&P.A.isSet;const W=G?(0,L.A)(G):V;var q="[object Arguments]",H="[object Function]",J="[object Object]",K={};K[q]=K["[object Array]"]=K["[object ArrayBuffer]"]=K["[object DataView]"]=K["[object Boolean]"]=K["[object Date]"]=K["[object Float32Array]"]=K["[object Float64Array]"]=K["[object Int8Array]"]=K["[object Int16Array]"]=K["[object Int32Array]"]=K["[object Map]"]=K["[object Number]"]=K[J]=K["[object RegExp]"]=K["[object Set]"]=K["[object String]"]=K["[object Symbol]"]=K["[object Uint8Array]"]=K["[object Uint8ClampedArray]"]=K["[object Uint16Array]"]=K["[object Uint32Array]"]=!0,K["[object Error]"]=K[H]=K["[object WeakMap]"]=!1;const Q=function t(n,r,u,l,d,g){var _,O=1&r,m=2&r,S=4&r;if(u&&(_=d?u(n,l,d,g):u(n)),void 0!==_)return _;if(!(0,R.A)(n))return n;var k=(0,D.A)(n);if(k){if(_=w(n),!O)return(0,v.A)(n,_)}else{var E=(0,y.A)(n),x=E==H||"[object GeneratorFunction]"==E;if((0,F.A)(n))return(0,s.A)(n,O);if(E==J||E==q||x&&!d){if(_=m||x?{}:(0,C.A)(n),!O)return m?j(n,A(_,n)):b(n,i(_,n))}else{if(!K[E])return d?n:{};_=B(n,E,O)}}g||(g=new e.A);var I=g.get(n);if(I)return I;g.set(n,_),W(n)?n.forEach((function(e){_.add(t(e,r,u,e,n,g))})):N(n)&&n.forEach((function(e,o){_.set(o,t(e,r,u,o,n,g))}));var U=S?m?h.A:p.A:m?f.A:a.A,M=k?void 0:U(n);return(0,o.A)(M||n,(function(e,o){M&&(e=n[o=e]),(0,c.A)(_,o,t(e,r,u,o,n,g))})),_}},6240:(t,n,r)=>{r.d(n,{A:()=>c});var e=r(79841),o=r(38446);const c=function(t,n){return function(r,e){if(null==r)return r;if(!(0,o.A)(r))return t(r,e);for(var c=r.length,u=n?c:-1,a=Object(r);(n?u--:++u{r.d(n,{A:()=>o});var e=r(6240);const o=function(t,n){var r=[];return(0,e.A)(t,(function(t,e,o){n(t,e,o)&&r.push(t)})),r}},25707:(t,n,r)=>{r.d(n,{A:()=>e});const e=function(t,n,r,e){for(var o=t.length,c=r+(e?1:-1);e?c--:++c{r.d(n,{A:()=>f});var e=r(76912),o=r(241),c=r(52274),u=r(92049),a=o.A?o.A.isConcatSpreadable:void 0;const i=function(t){return(0,u.A)(t)||(0,c.A)(t)||!!(a&&t&&t[a])};const f=function t(n,r,o,c,u){var a=-1,f=n.length;for(o||(o=i),u||(u=[]);++a0&&o(A)?r>1?t(A,r-1,o,c,u):(0,e.A)(u,A):c||(u[u.length]=A)}return u}},79841:(t,n,r)=>{r.d(n,{A:()=>c});var e=r(4574),o=r(27422);const c=function(t,n){return t&&(0,e.A)(t,n,o.A)}},66318:(t,n,r)=>{r.d(n,{A:()=>c});var e=r(7819),o=r(30901);const c=function(t,n){for(var r=0,c=(n=(0,e.A)(n,t)).length;null!=t&&r{r.d(n,{A:()=>c});var e=r(76912),o=r(92049);const c=function(t,n,r){var c=n(t);return(0,o.A)(t)?c:(0,e.A)(c,r(t))}},60818:(t,n,r)=>{r.d(n,{A:()=>u});var e=r(25707);const o=function(t){return t!=t};const c=function(t,n,r){for(var e=r-1,o=t.length;++e{r.d(n,{A:()=>J});var e=r(11754),o=r(62062),c=r(63736),u=r(64099);const a=function(t,n,r,e,a,i){var f=1&r,A=t.length,s=n.length;if(A!=s&&!(f&&s>A))return!1;var v=i.get(t),l=i.get(n);if(v&&l)return v==n&&l==t;var b=-1,d=!0,j=2&r?new o.A:void 0;for(i.set(t,n),i.set(n,t);++b{r.d(n,{A:()=>e});const e=function(t){return function(n){return null==n?void 0:n[t]}}},99902:(t,n,r)=>{r.d(n,{A:()=>s});var e=r(62062),o=r(83149),c=r(87809),u=r(64099),a=r(39857),i=r(42302),f=r(29959);const A=a.A&&1/(0,f.A)(new a.A([,-0]))[1]==1/0?function(t){return new a.A(t)}:i.A;const s=function(t,n,r){var a=-1,i=o.A,s=t.length,v=!0,l=[],b=l;if(r)v=!1,i=c.A;else if(s>=200){var d=n?null:A(t);if(d)return(0,f.A)(d);v=!1,i=u.A,b=new e.A}else b=n?[]:l;t:for(;++a{r.d(n,{A:()=>e});const e=function(t,n){return t.has(n)}},99922:(t,n,r)=>{r.d(n,{A:()=>o});var e=r(29008);const o=function(t){return"function"==typeof t?t:e.A}},7819:(t,n,r)=>{r.d(n,{A:()=>A});var e=r(92049),o=r(86586),c=r(46632);var u=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,a=/\\(\\)?/g;const i=function(t){var n=(0,c.A)(t,(function(t){return 500===r.size&&r.clear(),t})),r=n.cache;return n}((function(t){var n=[];return 46===t.charCodeAt(0)&&n.push(""),t.replace(u,(function(t,r,e,o){n.push(e?o.replace(a,"$1"):r||t)})),n}));var f=r(28894);const A=function(t,n){return(0,e.A)(t)?t:(0,o.A)(t,n)?[t]:i((0,f.A)(t))}},19042:(t,n,r)=>{r.d(n,{A:()=>u});var e=r(33831),o=r(14792),c=r(27422);const u=function(t){return(0,e.A)(t,c.A,o.A)}},83973:(t,n,r)=>{r.d(n,{A:()=>u});var e=r(33831),o=r(83511),c=r(55615);const u=function(t){return(0,e.A)(t,c.A,o.A)}},14792:(t,n,r)=>{r.d(n,{A:()=>a});var e=r(2634),o=r(13153),c=Object.prototype.propertyIsEnumerable,u=Object.getOwnPropertySymbols;const a=u?function(t){return null==t?[]:(t=Object(t),(0,e.A)(u(t),(function(n){return c.call(t,n)})))}:o.A},83511:(t,n,r)=>{r.d(n,{A:()=>a});var e=r(76912),o=r(15647),c=r(14792),u=r(13153);const a=Object.getOwnPropertySymbols?function(t){for(var n=[];t;)(0,e.A)(n,(0,c.A)(t)),t=(0,o.A)(t);return n}:u.A},85054:(t,n,r)=>{r.d(n,{A:()=>f});var e=r(7819),o=r(52274),c=r(92049),u=r(25353),a=r(5254),i=r(30901);const f=function(t,n,r){for(var f=-1,A=(n=(0,e.A)(n,t)).length,s=!1;++f{r.d(n,{A:()=>a});var e=r(92049),o=r(61882),c=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,u=/^\w*$/;const a=function(t,n){if((0,e.A)(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!(0,o.A)(t))||(u.test(t)||!c.test(t)||null!=n&&t in Object(n))}},29959:(t,n,r)=>{r.d(n,{A:()=>e});const e=function(t){var n=-1,r=Array(t.size);return t.forEach((function(t){r[++n]=t})),r}},30901:(t,n,r)=>{r.d(n,{A:()=>o});var e=r(61882);const o=function(t){if("string"==typeof t||(0,e.A)(t))return t;var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},94092:(t,n,r)=>{r.d(n,{A:()=>a});var e=r(2634),o=r(51790),c=r(23958),u=r(92049);const a=function(t,n){return((0,u.A)(t)?e.A:o.A)(t,(0,c.A)(n,3))}},8058:(t,n,r)=>{r.d(n,{A:()=>a});var e=r(72641),o=r(6240),c=r(99922),u=r(92049);const a=function(t,n){return((0,u.A)(t)?e.A:o.A)(t,(0,c.A)(n))}},39188:(t,n,r)=>{r.d(n,{A:()=>c});const e=function(t,n){return null!=t&&n in Object(t)};var o=r(85054);const c=function(t,n){return null!=t&&(0,o.A)(t,n,e)}},61882:(t,n,r)=>{r.d(n,{A:()=>c});var e=r(88496),o=r(53098);const c=function(t){return"symbol"==typeof t||(0,o.A)(t)&&"[object Symbol]"==(0,e.A)(t)}},69592:(t,n,r)=>{r.d(n,{A:()=>e});const e=function(t){return void 0===t}},27422:(t,n,r)=>{r.d(n,{A:()=>u});var e=r(83607),o=r(69471),c=r(38446);const u=function(t){return(0,c.A)(t)?(0,e.A)(t):(0,o.A)(t)}},42302:(t,n,r)=>{r.d(n,{A:()=>e});const e=function(){}},89463:(t,n,r)=>{r.d(n,{A:()=>i});const e=function(t,n,r,e){var o=-1,c=null==t?0:t.length;for(e&&c&&(r=t[++o]);++o{r.d(n,{A:()=>e});const e=function(){return[]}},28894:(t,n,r)=>{r.d(n,{A:()=>A});var e=r(241),o=r(45572),c=r(92049),u=r(61882),a=e.A?e.A.prototype:void 0,i=a?a.toString:void 0;const f=function t(n){if("string"==typeof n)return n;if((0,c.A)(n))return(0,o.A)(n,t)+"";if((0,u.A)(n))return i?i.call(n):"";var r=n+"";return"0"==r&&1/n==-1/0?"-0":r};const A=function(t){return null==t?"":f(t)}},38207:(t,n,r)=>{r.d(n,{A:()=>u});var e=r(45572);const o=function(t,n){return(0,e.A)(n,(function(n){return t[n]}))};var c=r(27422);const u=function(t){return null==t?[]:o(t,(0,c.A)(t))}}}]); \ No newline at end of file diff --git a/assets/js/3687.fee87800.js b/assets/js/3687.fee87800.js deleted file mode 100644 index 70f1da7f94d9..000000000000 --- a/assets/js/3687.fee87800.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3687],{23687:(t,e,a)=>{a.d(e,{diagram:()=>at});var r=a(86079),s=a(26312),i=a(79186),n=a(16750),o=(a(74353),a(42838),function(){var t=function(t,e,a,r){for(a=a||{},r=t.length;r--;a[t[r]]=e);return a},e=[1,2],a=[1,3],r=[1,4],s=[2,4],i=[1,9],n=[1,11],o=[1,13],c=[1,14],l=[1,16],d=[1,17],h=[1,18],p=[1,24],g=[1,25],u=[1,26],x=[1,27],y=[1,28],m=[1,29],b=[1,30],f=[1,31],T=[1,32],E=[1,33],w=[1,34],P=[1,35],v=[1,36],_=[1,37],L=[1,38],k=[1,39],I=[1,41],M=[1,42],N=[1,43],A=[1,44],O=[1,45],S=[1,46],D=[1,4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,48,49,50,52,53,54,59,60,61,62,70],R=[4,5,16,50,52,53],C=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,54,59,60,61,62,70],$=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,49,50,52,53,54,59,60,61,62,70],Y=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,48,50,52,53,54,59,60,61,62,70],B=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,50,52,53,54,59,60,61,62,70],V=[68,69,70],F=[1,120],q={trace:function(){},yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,box_section:10,box_line:11,participant_statement:12,create:13,box:14,restOfLine:15,end:16,signal:17,autonumber:18,NUM:19,off:20,activate:21,actor:22,deactivate:23,note_statement:24,links_statement:25,link_statement:26,properties_statement:27,details_statement:28,title:29,legacy_title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,loop:36,rect:37,opt:38,alt:39,else_sections:40,par:41,par_sections:42,par_over:43,critical:44,option_sections:45,break:46,option:47,and:48,else:49,participant:50,AS:51,participant_actor:52,destroy:53,note:54,placement:55,text2:56,over:57,actor_pair:58,links:59,link:60,properties:61,details:62,spaceList:63,",":64,left_of:65,right_of:66,signaltype:67,"+":68,"-":69,ACTOR:70,SOLID_OPEN_ARROW:71,DOTTED_OPEN_ARROW:72,SOLID_ARROW:73,DOTTED_ARROW:74,SOLID_CROSS:75,DOTTED_CROSS:76,SOLID_POINT:77,DOTTED_POINT:78,TXT:79,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",13:"create",14:"box",15:"restOfLine",16:"end",18:"autonumber",19:"NUM",20:"off",21:"activate",23:"deactivate",29:"title",30:"legacy_title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"loop",37:"rect",38:"opt",39:"alt",41:"par",43:"par_over",44:"critical",46:"break",47:"option",48:"and",49:"else",50:"participant",51:"AS",52:"participant_actor",53:"destroy",54:"note",57:"over",59:"links",60:"link",61:"properties",62:"details",64:",",65:"left_of",66:"right_of",68:"+",69:"-",70:"ACTOR",71:"SOLID_OPEN_ARROW",72:"DOTTED_OPEN_ARROW",73:"SOLID_ARROW",74:"DOTTED_ARROW",75:"SOLID_CROSS",76:"DOTTED_CROSS",77:"SOLID_POINT",78:"DOTTED_POINT",79:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[10,0],[10,2],[11,2],[11,1],[11,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[45,1],[45,4],[42,1],[42,4],[40,1],[40,4],[12,5],[12,3],[12,5],[12,3],[12,3],[24,4],[24,4],[25,3],[26,3],[27,3],[28,3],[63,2],[63,1],[58,3],[58,1],[55,1],[55,1],[17,5],[17,5],[17,4],[22,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[56,1]],performAction:function(t,e,a,r,s,i,n){var o=i.length-1;switch(s){case 3:return r.apply(i[o]),i[o];case 4:case 9:case 8:case 13:this.$=[];break;case 5:case 10:i[o-1].push(i[o]),this.$=i[o-1];break;case 6:case 7:case 11:case 12:case 62:this.$=i[o];break;case 15:i[o].type="createParticipant",this.$=i[o];break;case 16:i[o-1].unshift({type:"boxStart",boxData:r.parseBoxData(i[o-2])}),i[o-1].push({type:"boxEnd",boxText:i[o-2]}),this.$=i[o-1];break;case 18:this.$={type:"sequenceIndex",sequenceIndex:Number(i[o-2]),sequenceIndexStep:Number(i[o-1]),sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(i[o-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:r.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"activeStart",signalType:r.LINETYPE.ACTIVE_START,actor:i[o-1]};break;case 23:this.$={type:"activeEnd",signalType:r.LINETYPE.ACTIVE_END,actor:i[o-1]};break;case 29:r.setDiagramTitle(i[o].substring(6)),this.$=i[o].substring(6);break;case 30:r.setDiagramTitle(i[o].substring(7)),this.$=i[o].substring(7);break;case 31:this.$=i[o].trim(),r.setAccTitle(this.$);break;case 32:case 33:this.$=i[o].trim(),r.setAccDescription(this.$);break;case 34:i[o-1].unshift({type:"loopStart",loopText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.LOOP_START}),i[o-1].push({type:"loopEnd",loopText:i[o-2],signalType:r.LINETYPE.LOOP_END}),this.$=i[o-1];break;case 35:i[o-1].unshift({type:"rectStart",color:r.parseMessage(i[o-2]),signalType:r.LINETYPE.RECT_START}),i[o-1].push({type:"rectEnd",color:r.parseMessage(i[o-2]),signalType:r.LINETYPE.RECT_END}),this.$=i[o-1];break;case 36:i[o-1].unshift({type:"optStart",optText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.OPT_START}),i[o-1].push({type:"optEnd",optText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.OPT_END}),this.$=i[o-1];break;case 37:i[o-1].unshift({type:"altStart",altText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.ALT_START}),i[o-1].push({type:"altEnd",signalType:r.LINETYPE.ALT_END}),this.$=i[o-1];break;case 38:i[o-1].unshift({type:"parStart",parText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.PAR_START}),i[o-1].push({type:"parEnd",signalType:r.LINETYPE.PAR_END}),this.$=i[o-1];break;case 39:i[o-1].unshift({type:"parStart",parText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.PAR_OVER_START}),i[o-1].push({type:"parEnd",signalType:r.LINETYPE.PAR_END}),this.$=i[o-1];break;case 40:i[o-1].unshift({type:"criticalStart",criticalText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.CRITICAL_START}),i[o-1].push({type:"criticalEnd",signalType:r.LINETYPE.CRITICAL_END}),this.$=i[o-1];break;case 41:i[o-1].unshift({type:"breakStart",breakText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.BREAK_START}),i[o-1].push({type:"breakEnd",optText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.BREAK_END}),this.$=i[o-1];break;case 43:this.$=i[o-3].concat([{type:"option",optionText:r.parseMessage(i[o-1]),signalType:r.LINETYPE.CRITICAL_OPTION},i[o]]);break;case 45:this.$=i[o-3].concat([{type:"and",parText:r.parseMessage(i[o-1]),signalType:r.LINETYPE.PAR_AND},i[o]]);break;case 47:this.$=i[o-3].concat([{type:"else",altText:r.parseMessage(i[o-1]),signalType:r.LINETYPE.ALT_ELSE},i[o]]);break;case 48:i[o-3].draw="participant",i[o-3].type="addParticipant",i[o-3].description=r.parseMessage(i[o-1]),this.$=i[o-3];break;case 49:i[o-1].draw="participant",i[o-1].type="addParticipant",this.$=i[o-1];break;case 50:i[o-3].draw="actor",i[o-3].type="addParticipant",i[o-3].description=r.parseMessage(i[o-1]),this.$=i[o-3];break;case 51:i[o-1].draw="actor",i[o-1].type="addParticipant",this.$=i[o-1];break;case 52:i[o-1].type="destroyParticipant",this.$=i[o-1];break;case 53:this.$=[i[o-1],{type:"addNote",placement:i[o-2],actor:i[o-1].actor,text:i[o]}];break;case 54:i[o-2]=[].concat(i[o-1],i[o-1]).slice(0,2),i[o-2][0]=i[o-2][0].actor,i[o-2][1]=i[o-2][1].actor,this.$=[i[o-1],{type:"addNote",placement:r.PLACEMENT.OVER,actor:i[o-2].slice(0,2),text:i[o]}];break;case 55:this.$=[i[o-1],{type:"addLinks",actor:i[o-1].actor,text:i[o]}];break;case 56:this.$=[i[o-1],{type:"addALink",actor:i[o-1].actor,text:i[o]}];break;case 57:this.$=[i[o-1],{type:"addProperties",actor:i[o-1].actor,text:i[o]}];break;case 58:this.$=[i[o-1],{type:"addDetails",actor:i[o-1].actor,text:i[o]}];break;case 61:this.$=[i[o-2],i[o]];break;case 63:this.$=r.PLACEMENT.LEFTOF;break;case 64:this.$=r.PLACEMENT.RIGHTOF;break;case 65:this.$=[i[o-4],i[o-1],{type:"addMessage",from:i[o-4].actor,to:i[o-1].actor,signalType:i[o-3],msg:i[o],activate:!0},{type:"activeStart",signalType:r.LINETYPE.ACTIVE_START,actor:i[o-1]}];break;case 66:this.$=[i[o-4],i[o-1],{type:"addMessage",from:i[o-4].actor,to:i[o-1].actor,signalType:i[o-3],msg:i[o]},{type:"activeEnd",signalType:r.LINETYPE.ACTIVE_END,actor:i[o-4]}];break;case 67:this.$=[i[o-3],i[o-1],{type:"addMessage",from:i[o-3].actor,to:i[o-1].actor,signalType:i[o-2],msg:i[o]}];break;case 68:this.$={type:"addParticipant",actor:i[o]};break;case 69:this.$=r.LINETYPE.SOLID_OPEN;break;case 70:this.$=r.LINETYPE.DOTTED_OPEN;break;case 71:this.$=r.LINETYPE.SOLID;break;case 72:this.$=r.LINETYPE.DOTTED;break;case 73:this.$=r.LINETYPE.SOLID_CROSS;break;case 74:this.$=r.LINETYPE.DOTTED_CROSS;break;case 75:this.$=r.LINETYPE.SOLID_POINT;break;case 76:this.$=r.LINETYPE.DOTTED_POINT;break;case 77:this.$=r.parseMessage(i[o].trim().substring(1))}},table:[{3:1,4:e,5:a,6:r},{1:[3]},{3:5,4:e,5:a,6:r},{3:6,4:e,5:a,6:r},t([1,4,5,13,14,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,54,59,60,61,62,70],s,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:i,5:n,8:8,9:10,12:12,13:o,14:c,17:15,18:l,21:d,22:40,23:h,24:19,25:20,26:21,27:22,28:23,29:p,30:g,31:u,33:x,35:y,36:m,37:b,38:f,39:T,41:E,43:w,44:P,46:v,50:_,52:L,53:k,54:I,59:M,60:N,61:A,62:O,70:S},t(D,[2,5]),{9:47,12:12,13:o,14:c,17:15,18:l,21:d,22:40,23:h,24:19,25:20,26:21,27:22,28:23,29:p,30:g,31:u,33:x,35:y,36:m,37:b,38:f,39:T,41:E,43:w,44:P,46:v,50:_,52:L,53:k,54:I,59:M,60:N,61:A,62:O,70:S},t(D,[2,7]),t(D,[2,8]),t(D,[2,14]),{12:48,50:_,52:L,53:k},{15:[1,49]},{5:[1,50]},{5:[1,53],19:[1,51],20:[1,52]},{22:54,70:S},{22:55,70:S},{5:[1,56]},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},t(D,[2,29]),t(D,[2,30]),{32:[1,61]},{34:[1,62]},t(D,[2,33]),{15:[1,63]},{15:[1,64]},{15:[1,65]},{15:[1,66]},{15:[1,67]},{15:[1,68]},{15:[1,69]},{15:[1,70]},{22:71,70:S},{22:72,70:S},{22:73,70:S},{67:74,71:[1,75],72:[1,76],73:[1,77],74:[1,78],75:[1,79],76:[1,80],77:[1,81],78:[1,82]},{55:83,57:[1,84],65:[1,85],66:[1,86]},{22:87,70:S},{22:88,70:S},{22:89,70:S},{22:90,70:S},t([5,51,64,71,72,73,74,75,76,77,78,79],[2,68]),t(D,[2,6]),t(D,[2,15]),t(R,[2,9],{10:91}),t(D,[2,17]),{5:[1,93],19:[1,92]},{5:[1,94]},t(D,[2,21]),{5:[1,95]},{5:[1,96]},t(D,[2,24]),t(D,[2,25]),t(D,[2,26]),t(D,[2,27]),t(D,[2,28]),t(D,[2,31]),t(D,[2,32]),t(C,s,{7:97}),t(C,s,{7:98}),t(C,s,{7:99}),t($,s,{40:100,7:101}),t(Y,s,{42:102,7:103}),t(Y,s,{7:103,42:104}),t(B,s,{45:105,7:106}),t(C,s,{7:107}),{5:[1,109],51:[1,108]},{5:[1,111],51:[1,110]},{5:[1,112]},{22:115,68:[1,113],69:[1,114],70:S},t(V,[2,69]),t(V,[2,70]),t(V,[2,71]),t(V,[2,72]),t(V,[2,73]),t(V,[2,74]),t(V,[2,75]),t(V,[2,76]),{22:116,70:S},{22:118,58:117,70:S},{70:[2,63]},{70:[2,64]},{56:119,79:F},{56:121,79:F},{56:122,79:F},{56:123,79:F},{4:[1,126],5:[1,128],11:125,12:127,16:[1,124],50:_,52:L,53:k},{5:[1,129]},t(D,[2,19]),t(D,[2,20]),t(D,[2,22]),t(D,[2,23]),{4:i,5:n,8:8,9:10,12:12,13:o,14:c,16:[1,130],17:15,18:l,21:d,22:40,23:h,24:19,25:20,26:21,27:22,28:23,29:p,30:g,31:u,33:x,35:y,36:m,37:b,38:f,39:T,41:E,43:w,44:P,46:v,50:_,52:L,53:k,54:I,59:M,60:N,61:A,62:O,70:S},{4:i,5:n,8:8,9:10,12:12,13:o,14:c,16:[1,131],17:15,18:l,21:d,22:40,23:h,24:19,25:20,26:21,27:22,28:23,29:p,30:g,31:u,33:x,35:y,36:m,37:b,38:f,39:T,41:E,43:w,44:P,46:v,50:_,52:L,53:k,54:I,59:M,60:N,61:A,62:O,70:S},{4:i,5:n,8:8,9:10,12:12,13:o,14:c,16:[1,132],17:15,18:l,21:d,22:40,23:h,24:19,25:20,26:21,27:22,28:23,29:p,30:g,31:u,33:x,35:y,36:m,37:b,38:f,39:T,41:E,43:w,44:P,46:v,50:_,52:L,53:k,54:I,59:M,60:N,61:A,62:O,70:S},{16:[1,133]},{4:i,5:n,8:8,9:10,12:12,13:o,14:c,16:[2,46],17:15,18:l,21:d,22:40,23:h,24:19,25:20,26:21,27:22,28:23,29:p,30:g,31:u,33:x,35:y,36:m,37:b,38:f,39:T,41:E,43:w,44:P,46:v,49:[1,134],50:_,52:L,53:k,54:I,59:M,60:N,61:A,62:O,70:S},{16:[1,135]},{4:i,5:n,8:8,9:10,12:12,13:o,14:c,16:[2,44],17:15,18:l,21:d,22:40,23:h,24:19,25:20,26:21,27:22,28:23,29:p,30:g,31:u,33:x,35:y,36:m,37:b,38:f,39:T,41:E,43:w,44:P,46:v,48:[1,136],50:_,52:L,53:k,54:I,59:M,60:N,61:A,62:O,70:S},{16:[1,137]},{16:[1,138]},{4:i,5:n,8:8,9:10,12:12,13:o,14:c,16:[2,42],17:15,18:l,21:d,22:40,23:h,24:19,25:20,26:21,27:22,28:23,29:p,30:g,31:u,33:x,35:y,36:m,37:b,38:f,39:T,41:E,43:w,44:P,46:v,47:[1,139],50:_,52:L,53:k,54:I,59:M,60:N,61:A,62:O,70:S},{4:i,5:n,8:8,9:10,12:12,13:o,14:c,16:[1,140],17:15,18:l,21:d,22:40,23:h,24:19,25:20,26:21,27:22,28:23,29:p,30:g,31:u,33:x,35:y,36:m,37:b,38:f,39:T,41:E,43:w,44:P,46:v,50:_,52:L,53:k,54:I,59:M,60:N,61:A,62:O,70:S},{15:[1,141]},t(D,[2,49]),{15:[1,142]},t(D,[2,51]),t(D,[2,52]),{22:143,70:S},{22:144,70:S},{56:145,79:F},{56:146,79:F},{56:147,79:F},{64:[1,148],79:[2,62]},{5:[2,55]},{5:[2,77]},{5:[2,56]},{5:[2,57]},{5:[2,58]},t(D,[2,16]),t(R,[2,10]),{12:149,50:_,52:L,53:k},t(R,[2,12]),t(R,[2,13]),t(D,[2,18]),t(D,[2,34]),t(D,[2,35]),t(D,[2,36]),t(D,[2,37]),{15:[1,150]},t(D,[2,38]),{15:[1,151]},t(D,[2,39]),t(D,[2,40]),{15:[1,152]},t(D,[2,41]),{5:[1,153]},{5:[1,154]},{56:155,79:F},{56:156,79:F},{5:[2,67]},{5:[2,53]},{5:[2,54]},{22:157,70:S},t(R,[2,11]),t($,s,{7:101,40:158}),t(Y,s,{7:103,42:159}),t(B,s,{7:106,45:160}),t(D,[2,48]),t(D,[2,50]),{5:[2,65]},{5:[2,66]},{79:[2,61]},{16:[2,47]},{16:[2,45]},{16:[2,43]}],defaultActions:{5:[2,1],6:[2,2],85:[2,63],86:[2,64],119:[2,55],120:[2,77],121:[2,56],122:[2,57],123:[2,58],145:[2,67],146:[2,53],147:[2,54],155:[2,65],156:[2,66],157:[2,61],158:[2,47],159:[2,45],160:[2,43]},parseError:function(t,e){if(!e.recoverable){var a=new Error(t);throw a.hash=e,a}this.trace(t)},parse:function(t){var e=this,a=[0],r=[],s=[null],i=[],n=this.table,o="",c=0,l=0,d=i.slice.call(arguments,1),h=Object.create(this.lexer),p={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(p.yy[g]=this.yy[g]);h.setInput(t,p.yy),p.yy.lexer=h,p.yy.parser=this,void 0===h.yylloc&&(h.yylloc={});var u=h.yylloc;i.push(u);var x=h.options&&h.options.ranges;"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var y,m,b,f,T,E,w,P,v,_={};;){if(m=a[a.length-1],this.defaultActions[m]?b=this.defaultActions[m]:(null==y&&(v=void 0,"number"!=typeof(v=r.pop()||h.lex()||1)&&(v instanceof Array&&(v=(r=v).pop()),v=e.symbols_[v]||v),y=v),b=n[m]&&n[m][y]),void 0===b||!b.length||!b[0]){var L="";for(T in P=[],n[m])this.terminals_[T]&&T>2&&P.push("'"+this.terminals_[T]+"'");L=h.showPosition?"Parse error on line "+(c+1)+":\n"+h.showPosition()+"\nExpecting "+P.join(", ")+", got '"+(this.terminals_[y]||y)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==y?"end of input":"'"+(this.terminals_[y]||y)+"'"),this.parseError(L,{text:h.match,token:this.terminals_[y]||y,line:h.yylineno,loc:u,expected:P})}if(b[0]instanceof Array&&b.length>1)throw new Error("Parse Error: multiple actions possible at state: "+m+", token: "+y);switch(b[0]){case 1:a.push(y),s.push(h.yytext),i.push(h.yylloc),a.push(b[1]),y=null,l=h.yyleng,o=h.yytext,c=h.yylineno,u=h.yylloc;break;case 2:if(E=this.productions_[b[1]][1],_.$=s[s.length-E],_._$={first_line:i[i.length-(E||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(E||1)].first_column,last_column:i[i.length-1].last_column},x&&(_._$.range=[i[i.length-(E||1)].range[0],i[i.length-1].range[1]]),void 0!==(f=this.performAction.apply(_,[o,l,c,p.yy,b[1],s,i].concat(d))))return f;E&&(a=a.slice(0,-1*E*2),s=s.slice(0,-1*E),i=i.slice(0,-1*E)),a.push(this.productions_[b[1]][0]),s.push(_.$),i.push(_._$),w=n[a[a.length-2]][a[a.length-1]],a.push(w);break;case 3:return!0}}return!0}},W={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,a=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),a.length-1&&(this.yylineno-=a.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:a?(a.length===r.length?this.yylloc.first_column:0)+r[r.length-a.length].length-a[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var a,r,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],a=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a)return a;if(this._backtrack){for(var i in s)this[i]=s[i];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,a,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),i=0;ie[0].length)){if(e=a,r=i,this.options.backtrack_lexer){if(!1!==(t=this.test_match(a,s[i])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,a,r){switch(a){case 0:case 51:case 64:return 5;case 1:case 2:case 3:case 4:case 5:break;case 6:return 19;case 7:return this.begin("LINE"),14;case 8:return this.begin("ID"),50;case 9:return this.begin("ID"),52;case 10:return 13;case 11:return this.begin("ID"),53;case 12:return e.yytext=e.yytext.trim(),this.begin("ALIAS"),70;case 13:return this.popState(),this.popState(),this.begin("LINE"),51;case 14:return this.popState(),this.popState(),5;case 15:return this.begin("LINE"),36;case 16:return this.begin("LINE"),37;case 17:return this.begin("LINE"),38;case 18:return this.begin("LINE"),39;case 19:return this.begin("LINE"),49;case 20:return this.begin("LINE"),41;case 21:return this.begin("LINE"),43;case 22:return this.begin("LINE"),48;case 23:return this.begin("LINE"),44;case 24:return this.begin("LINE"),47;case 25:return this.begin("LINE"),46;case 26:return this.popState(),15;case 27:return 16;case 28:return 65;case 29:return 66;case 30:return 59;case 31:return 60;case 32:return 61;case 33:return 62;case 34:return 57;case 35:return 54;case 36:return this.begin("ID"),21;case 37:return this.begin("ID"),23;case 38:return 29;case 39:return 30;case 40:return this.begin("acc_title"),31;case 41:return this.popState(),"acc_title_value";case 42:return this.begin("acc_descr"),33;case 43:return this.popState(),"acc_descr_value";case 44:this.begin("acc_descr_multiline");break;case 45:this.popState();break;case 46:return"acc_descr_multiline_value";case 47:return 6;case 48:return 18;case 49:return 20;case 50:return 64;case 52:return e.yytext=e.yytext.trim(),70;case 53:return 73;case 54:return 74;case 55:return 71;case 56:return 72;case 57:return 75;case 58:return 76;case 59:return 77;case 60:return 78;case 61:return 79;case 62:return 68;case 63:return 69;case 65:return"INVALID"}},rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[0-9]+(?=[ \n]+))/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:create\b)/i,/^(?:destroy\b)/i,/^(?:[^\->:\n,;]+?([\-]*[^\->:\n,;]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:par_over\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\+\->:\n,;]+((?!(-x|--x|-\)|--\)))[\-]*[^\+\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?::(?:(?:no)?wrap)?[^#\n;]+)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[45,46],inclusive:!1},acc_descr:{rules:[43],inclusive:!1},acc_title:{rules:[41],inclusive:!1},ID:{rules:[2,3,12],inclusive:!1},ALIAS:{rules:[2,3,13,14],inclusive:!1},LINE:{rules:[2,3,26],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,6,7,8,9,10,11,15,16,17,18,19,20,21,22,23,24,25,27,28,29,30,31,32,33,34,35,36,37,38,39,40,42,44,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65],inclusive:!0}}};function z(){this.yy={}}return q.lexer=W,z.prototype=q,q.Parser=z,new z}());o.parser=o;const c=o;const l=new class{constructor(t){this.init=t,this.records=this.init()}reset(){this.records=this.init()}}((()=>({prevActor:void 0,actors:{},createdActors:{},destroyedActors:{},boxes:[],messages:[],notes:[],sequenceNumbersEnabled:!1,wrapEnabled:void 0,currentBox:void 0,lastCreated:void 0,lastDestroyed:void 0}))),d=function(t,e,a,r){let s=l.records.currentBox;const i=l.records.actors[t];if(i){if(l.records.currentBox&&i.box&&l.records.currentBox!==i.box)throw new Error("A same participant should only be defined in one Box: "+i.name+" can't be in '"+i.box.name+"' and in '"+l.records.currentBox.name+"' at the same time.");if(s=i.box?i.box:l.records.currentBox,i.box=s,i&&e===i.name&&null==a)return}null!=a&&null!=a.text||(a={text:e,wrap:null,type:r}),null!=r&&null!=a.text||(a={text:e,wrap:null,type:r}),l.records.actors[t]={box:s,name:e,description:a.text,wrap:void 0===a.wrap&&g()||!!a.wrap,prevActor:l.records.prevActor,links:{},properties:{},actorCnt:null,rectData:null,type:r||"participant"},l.records.prevActor&&l.records.actors[l.records.prevActor]&&(l.records.actors[l.records.prevActor].nextActor=t),l.records.currentBox&&l.records.currentBox.actorKeys.push(t),l.records.prevActor=t},h=function(t,e,a={text:void 0,wrap:void 0},r,s=!1){if(r===u.ACTIVE_END){if((t=>{let e,a=0;for(e=0;e>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},e}}return l.records.messages.push({from:t,to:e,message:a.text,wrap:void 0===a.wrap&&g()||!!a.wrap,type:r,activate:s}),!0},p=function(t){return l.records.actors[t]},g=()=>void 0!==l.records.wrapEnabled?l.records.wrapEnabled:(0,r.c)().sequence.wrap,u={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25,AUTONUMBER:26,CRITICAL_START:27,CRITICAL_OPTION:28,CRITICAL_END:29,BREAK_START:30,BREAK_END:31,PAR_OVER_START:32},x=function(t,e,a){const r={actor:t,placement:e,message:a.text,wrap:void 0===a.wrap&&g()||!!a.wrap},s=[].concat(t,t);l.records.notes.push(r),l.records.messages.push({from:s[0],to:s[1],message:a.text,wrap:void 0===a.wrap&&g()||!!a.wrap,type:u.NOTE,placement:e})},y=function(t,e){const a=p(t);try{let t=(0,r.d)(e.text,(0,r.c)());t=t.replace(/&/g,"&"),t=t.replace(/=/g,"=");m(a,JSON.parse(t))}catch(s){r.l.error("error while parsing actor link text",s)}};function m(t,e){if(null==t.links)t.links=e;else for(let a in e)t.links[a]=e[a]}const b=function(t,e){const a=p(t);try{let t=(0,r.d)(e.text,(0,r.c)());f(a,JSON.parse(t))}catch(s){r.l.error("error while parsing actor properties text",s)}};function f(t,e){if(null==t.properties)t.properties=e;else for(let a in e)t.properties[a]=e[a]}const T=function(t,e){const a=p(t),s=document.getElementById(e.text);try{const t=s.innerHTML,e=JSON.parse(t);e.properties&&f(a,e.properties),e.links&&m(a,e.links)}catch(i){r.l.error("error while parsing actor details text",i)}},E=function(t){if(Array.isArray(t))t.forEach((function(t){E(t)}));else switch(t.type){case"sequenceIndex":l.records.messages.push({from:void 0,to:void 0,message:{start:t.sequenceIndex,step:t.sequenceIndexStep,visible:t.sequenceVisible},wrap:!1,type:t.signalType});break;case"addParticipant":d(t.actor,t.actor,t.description,t.draw);break;case"createParticipant":if(l.records.actors[t.actor])throw new Error("It is not possible to have actors with the same id, even if one is destroyed before the next is created. Use 'AS' aliases to simulate the behavior");l.records.lastCreated=t.actor,d(t.actor,t.actor,t.description,t.draw),l.records.createdActors[t.actor]=l.records.messages.length;break;case"destroyParticipant":l.records.lastDestroyed=t.actor,l.records.destroyedActors[t.actor]=l.records.messages.length;break;case"activeStart":case"activeEnd":h(t.actor,void 0,void 0,t.signalType);break;case"addNote":x(t.actor,t.placement,t.text);break;case"addLinks":y(t.actor,t.text);break;case"addALink":!function(t,e){const a=p(t);try{const t={};let o=(0,r.d)(e.text,(0,r.c)());var s=o.indexOf("@");o=o.replace(/&/g,"&"),o=o.replace(/=/g,"=");var i=o.slice(0,s-1).trim(),n=o.slice(s+1).trim();t[i]=n,m(a,t)}catch(o){r.l.error("error while parsing actor link text",o)}}(t.actor,t.text);break;case"addProperties":b(t.actor,t.text);break;case"addDetails":T(t.actor,t.text);break;case"addMessage":if(l.records.lastCreated){if(t.to!==l.records.lastCreated)throw new Error("The created participant "+l.records.lastCreated+" does not have an associated creating message after its declaration. Please check the sequence diagram.");l.records.lastCreated=void 0}else if(l.records.lastDestroyed){if(t.to!==l.records.lastDestroyed&&t.from!==l.records.lastDestroyed)throw new Error("The destroyed participant "+l.records.lastDestroyed+" does not have an associated destroying message after its declaration. Please check the sequence diagram.");l.records.lastDestroyed=void 0}h(t.from,t.to,t.msg,t.signalType,t.activate);break;case"boxStart":e=t.boxData,l.records.boxes.push({name:e.text,wrap:void 0===e.wrap&&g()||!!e.wrap,fill:e.color,actorKeys:[]}),l.records.currentBox=l.records.boxes.slice(-1)[0];break;case"boxEnd":l.records.currentBox=void 0;break;case"loopStart":h(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":case"rectEnd":case"optEnd":case"altEnd":case"parEnd":case"criticalEnd":case"breakEnd":h(void 0,void 0,void 0,t.signalType);break;case"rectStart":h(void 0,void 0,t.color,t.signalType);break;case"optStart":h(void 0,void 0,t.optText,t.signalType);break;case"altStart":case"else":h(void 0,void 0,t.altText,t.signalType);break;case"setAccTitle":(0,r.s)(t.text);break;case"parStart":case"and":h(void 0,void 0,t.parText,t.signalType);break;case"criticalStart":h(void 0,void 0,t.criticalText,t.signalType);break;case"option":h(void 0,void 0,t.optionText,t.signalType);break;case"breakStart":h(void 0,void 0,t.breakText,t.signalType)}var e},w={addActor:d,addMessage:function(t,e,a,r){l.records.messages.push({from:t,to:e,message:a.text,wrap:void 0===a.wrap&&g()||!!a.wrap,answer:r})},addSignal:h,addLinks:y,addDetails:T,addProperties:b,autoWrap:g,setWrap:function(t){l.records.wrapEnabled=t},enableSequenceNumbers:function(){l.records.sequenceNumbersEnabled=!0},disableSequenceNumbers:function(){l.records.sequenceNumbersEnabled=!1},showSequenceNumbers:()=>l.records.sequenceNumbersEnabled,getMessages:function(){return l.records.messages},getActors:function(){return l.records.actors},getCreatedActors:function(){return l.records.createdActors},getDestroyedActors:function(){return l.records.destroyedActors},getActor:p,getActorKeys:function(){return Object.keys(l.records.actors)},getActorProperty:function(t,e){if(void 0!==t&&void 0!==t.properties)return t.properties[e]},getAccTitle:r.g,getBoxes:function(){return l.records.boxes},getDiagramTitle:r.t,setDiagramTitle:r.q,getConfig:()=>(0,r.c)().sequence,clear:function(){l.reset(),(0,r.v)()},parseMessage:function(t){const e=t.trim(),a={text:e.replace(/^:?(?:no)?wrap:/,"").trim(),wrap:null!==e.match(/^:?wrap:/)||null===e.match(/^:?nowrap:/)&&void 0};return r.l.debug("parseMessage:",a),a},parseBoxData:function(t){const e=t.match(/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/);let a=null!=e&&e[1]?e[1].trim():"transparent",s=null!=e&&e[2]?e[2].trim():void 0;if(window&&window.CSS)window.CSS.supports("color",a)||(a="transparent",s=t.trim());else{const e=(new Option).style;e.color=a,e.color!==a&&(a="transparent",s=t.trim())}return{color:a,text:void 0!==s?(0,r.d)(s.replace(/^:?(?:no)?wrap:/,""),(0,r.c)()):void 0,wrap:void 0!==s?null!==s.match(/^:?wrap:/)||null===s.match(/^:?nowrap:/)&&void 0:void 0}},LINETYPE:u,ARROWTYPE:{FILLED:0,OPEN:1},PLACEMENT:{LEFTOF:0,RIGHTOF:1,OVER:2},addNote:x,setAccTitle:r.s,apply:E,setAccDescription:r.b,getAccDescription:r.a,hasAtLeastOneBox:function(){return l.records.boxes.length>0},hasAtLeastOneBoxWithTitle:function(){return l.records.boxes.some((t=>t.name))}},P=t=>`.actor {\n stroke: ${t.actorBorder};\n fill: ${t.actorBkg};\n }\n\n text.actor > tspan {\n fill: ${t.actorTextColor};\n stroke: none;\n }\n\n .actor-line {\n stroke: ${t.actorLineColor};\n }\n\n .messageLine0 {\n stroke-width: 1.5;\n stroke-dasharray: none;\n stroke: ${t.signalColor};\n }\n\n .messageLine1 {\n stroke-width: 1.5;\n stroke-dasharray: 2, 2;\n stroke: ${t.signalColor};\n }\n\n #arrowhead path {\n fill: ${t.signalColor};\n stroke: ${t.signalColor};\n }\n\n .sequenceNumber {\n fill: ${t.sequenceNumberColor};\n }\n\n #sequencenumber {\n fill: ${t.signalColor};\n }\n\n #crosshead path {\n fill: ${t.signalColor};\n stroke: ${t.signalColor};\n }\n\n .messageText {\n fill: ${t.signalTextColor};\n stroke: none;\n }\n\n .labelBox {\n stroke: ${t.labelBoxBorderColor};\n fill: ${t.labelBoxBkgColor};\n }\n\n .labelText, .labelText > tspan {\n fill: ${t.labelTextColor};\n stroke: none;\n }\n\n .loopText, .loopText > tspan {\n fill: ${t.loopTextColor};\n stroke: none;\n }\n\n .loopLine {\n stroke-width: 2px;\n stroke-dasharray: 2, 2;\n stroke: ${t.labelBoxBorderColor};\n fill: ${t.labelBoxBorderColor};\n }\n\n .note {\n //stroke: #decc93;\n stroke: ${t.noteBorderColor};\n fill: ${t.noteBkgColor};\n }\n\n .noteText, .noteText > tspan {\n fill: ${t.noteTextColor};\n stroke: none;\n }\n\n .activation0 {\n fill: ${t.activationBkgColor};\n stroke: ${t.activationBorderColor};\n }\n\n .activation1 {\n fill: ${t.activationBkgColor};\n stroke: ${t.activationBorderColor};\n }\n\n .activation2 {\n fill: ${t.activationBkgColor};\n stroke: ${t.activationBorderColor};\n }\n\n .actorPopupMenu {\n position: absolute;\n }\n\n .actorPopupMenuPanel {\n position: absolute;\n fill: ${t.actorBkg};\n box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);\n filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));\n}\n .actor-man line {\n stroke: ${t.actorBorder};\n fill: ${t.actorBkg};\n }\n .actor-man circle, line {\n stroke: ${t.actorBorder};\n fill: ${t.actorBkg};\n stroke-width: 2px;\n }\n`,v="actor-top",_="actor-bottom",L=function(t,e){return(0,i.d)(t,e)},k=async function(t,e,a=null){let s=t.append("foreignObject");const i=await(0,r.r)(e.text,(0,r.F)()),n=s.append("xhtml:div").attr("style","width: fit-content;").attr("xmlns","http://www.w3.org/1999/xhtml").html(i).node().getBoundingClientRect();if(s.attr("height",Math.round(n.height)).attr("width",Math.round(n.width)),"noteText"===e.class){const a=t.node().firstChild;a.setAttribute("height",n.height+2*e.textMargin);const r=a.getBBox();s.attr("x",Math.round(r.x+r.width/2-n.width/2)).attr("y",Math.round(r.y+r.height/2-n.height/2))}else if(a){let{startx:t,stopx:r,starty:i}=a;if(t>r){const e=t;t=r,r=e}s.attr("x",Math.round(t+Math.abs(t-r)/2-n.width/2)),"loopText"===e.class?s.attr("y",Math.round(i)):s.attr("y",Math.round(i-n.height))}return[s]},I=function(t,e){let a=0,s=0;const i=e.text.split(r.e.lineBreakRegex),[n,o]=(0,r.D)(e.fontSize);let c=[],l=0,d=()=>e.y;if(void 0!==e.valign&&void 0!==e.textMargin&&e.textMargin>0)switch(e.valign){case"top":case"start":d=()=>Math.round(e.y+e.textMargin);break;case"middle":case"center":d=()=>Math.round(e.y+(a+s+e.textMargin)/2);break;case"bottom":case"end":d=()=>Math.round(e.y+(a+s+2*e.textMargin)-e.textMargin)}if(void 0!==e.anchor&&void 0!==e.textMargin&&void 0!==e.width)switch(e.anchor){case"left":case"start":e.x=Math.round(e.x+e.textMargin),e.anchor="start",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"middle":case"center":e.x=Math.round(e.x+e.width/2),e.anchor="middle",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"right":case"end":e.x=Math.round(e.x+e.width-e.textMargin),e.anchor="end",e.dominantBaseline="middle",e.alignmentBaseline="middle"}for(let[h,p]of i.entries()){void 0!==e.textMargin&&0===e.textMargin&&void 0!==n&&(l=h*n);const i=t.append("text");i.attr("x",e.x),i.attr("y",d()),void 0!==e.anchor&&i.attr("text-anchor",e.anchor).attr("dominant-baseline",e.dominantBaseline).attr("alignment-baseline",e.alignmentBaseline),void 0!==e.fontFamily&&i.style("font-family",e.fontFamily),void 0!==o&&i.style("font-size",o),void 0!==e.fontWeight&&i.style("font-weight",e.fontWeight),void 0!==e.fill&&i.attr("fill",e.fill),void 0!==e.class&&i.attr("class",e.class),void 0!==e.dy?i.attr("dy",e.dy):0!==l&&i.attr("dy",l);const g=p||r.Z;if(e.tspan){const t=i.append("tspan");t.attr("x",e.x),void 0!==e.fill&&t.attr("fill",e.fill),t.text(g)}else i.text(g);void 0!==e.valign&&void 0!==e.textMargin&&e.textMargin>0&&(s+=(i._groups||i)[0][0].getBBox().height,a=s),c.push(i)}return c},M=function(t,e){const a=t.append("polygon");var r,s,i,n,o;return a.attr("points",(r=e.x,s=e.y,i=e.width,n=e.height,r+","+s+" "+(r+i)+","+s+" "+(r+i)+","+(s+n-(o=7))+" "+(r+i-1.2*o)+","+(s+n)+" "+r+","+(s+n))),a.attr("class","labelBox"),e.y=e.y+e.height/2,I(t,e),a};let N=-1;const A=(t,e,a,r)=>{t.select&&a.forEach((a=>{const s=e[a],i=t.select("#actor"+s.actorCnt);!r.mirrorActors&&s.stopy?i.attr("y2",s.stopy+s.height/2):r.mirrorActors&&i.attr("y2",s.stopy)}))},O=function(t,e){(0,i.a)(t,e)},S=function(){return{x:0,y:0,fill:void 0,anchor:void 0,style:"#666",width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0}},D=function(){function t(t,e,a,r,s,n,o){i(e.append("text").attr("x",a+s/2).attr("y",r+n/2+5).style("text-anchor","middle").text(t),o)}function e(t,e,a,s,n,o,c,l){const{actorFontSize:d,actorFontFamily:h,actorFontWeight:p}=l,[g,u]=(0,r.D)(d),x=t.split(r.e.lineBreakRegex);for(let r=0;ra?c.width:a;const g=d.append("rect");if(g.attr("class","actorPopupMenuPanel"+h),g.attr("x",c.x),g.attr("y",c.height),g.attr("fill",c.fill),g.attr("stroke",c.stroke),g.attr("width",p),g.attr("height",c.height),g.attr("rx",c.rx),g.attr("ry",c.ry),null!=i){var u=20;for(let t in i){var x=d.append("a"),y=(0,n.Jf)(i[t]);x.attr("xlink:href",y),x.attr("target","_blank"),R(r)(t,x,c.x+10,c.height+u,p,20,{class:"actor"},r),u+=30}}return g.attr("height",u),{height:c.height+u,width:p}},anchorElement:function(t){return t.append("g")},drawActivation:function(t,e,a,r,s){const n=(0,i.g)(),o=e.anchored;n.x=e.startx,n.y=e.starty,n.class="activation"+s%3,n.width=e.stopx-e.startx,n.height=a-e.starty,L(o,n)},drawLoop:async function(t,e,a,s){const{boxMargin:n,boxTextMargin:o,labelBoxHeight:c,labelBoxWidth:l,messageFontFamily:d,messageFontSize:h,messageFontWeight:p}=s,g=t.append("g"),u=function(t,e,a,r){return g.append("line").attr("x1",t).attr("y1",e).attr("x2",a).attr("y2",r).attr("class","loopLine")};u(e.startx,e.starty,e.stopx,e.starty),u(e.stopx,e.starty,e.stopx,e.stopy),u(e.startx,e.stopy,e.stopx,e.stopy),u(e.startx,e.starty,e.startx,e.stopy),void 0!==e.sections&&e.sections.forEach((function(t){u(e.startx,t.y,e.stopx,t.y).style("stroke-dasharray","3, 3")}));let x=(0,i.e)();x.text=a,x.x=e.startx,x.y=e.starty,x.fontFamily=d,x.fontSize=h,x.fontWeight=p,x.anchor="middle",x.valign="middle",x.tspan=!1,x.width=l||50,x.height=c||20,x.textMargin=o,x.class="labelText",M(g,x),x=S(),x.text=e.title,x.x=e.startx+l/2+(e.stopx-e.startx)/2,x.y=e.starty+n+o,x.anchor="middle",x.valign="middle",x.textMargin=o,x.class="loopText",x.fontFamily=d,x.fontSize=h,x.fontWeight=p,x.wrap=!0;let y=(0,r.G)(x.text)?await k(g,x,e):I(g,x);if(void 0!==e.sectionTitles)for(const[i,m]of Object.entries(e.sectionTitles))if(m.message){x.text=m.message,x.x=e.startx+(e.stopx-e.startx)/2,x.y=e.sections[i].y+n+o,x.class="loopText",x.anchor="middle",x.valign="middle",x.tspan=!1,x.fontFamily=d,x.fontSize=h,x.fontWeight=p,x.wrap=e.wrap,(0,r.G)(x.text)?(e.starty=e.sections[i].y,await k(g,x,e)):I(g,x);let t=Math.round(y.map((t=>(t._groups||t)[0][0].getBBox().height)).reduce(((t,e)=>t+e)));e.sections[i].height+=t-(n+o)}return e.height=Math.round(e.stopy-e.starty),g},drawBackgroundRect:O,insertArrowHead:function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",7.9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")},insertArrowFilledHead:function(t){t.append("defs").append("marker").attr("id","filled-head").attr("refX",15.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},insertSequenceNumber:function(t){t.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},insertArrowCrossHead:function(t){t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",4).attr("refY",4.5).append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1pt").attr("d","M 1,2 L 6,7 M 6,2 L 1,7")},insertDatabaseIcon:function(t){t.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},insertComputerIcon:function(t){t.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},insertClockIcon:function(t){t.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},getTextObj:S,getNoteRect:function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},fixLifeLineHeights:A,sanitizeUrl:n.Jf};let $={};const Y={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight:function(){return Math.max.apply(null,0===this.actors.length?[0]:this.actors.map((t=>t.height||0)))+(0===this.loops.length?0:this.loops.map((t=>t.height||0)).reduce(((t,e)=>t+e)))+(0===this.messages.length?0:this.messages.map((t=>t.height||0)).reduce(((t,e)=>t+e)))+(0===this.notes.length?0:this.notes.map((t=>t.height||0)).reduce(((t,e)=>t+e)))},clear:function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},addBox:function(t){this.boxes.push(t)},addActor:function(t){this.actors.push(t)},addLoop:function(t){this.loops.push(t)},addMessage:function(t){this.messages.push(t)},addNote:function(t){this.notes.push(t)},lastActor:function(){return this.actors[this.actors.length-1]},lastLoop:function(){return this.loops[this.loops.length-1]},lastMessage:function(){return this.messages[this.messages.length-1]},lastNote:function(){return this.notes[this.notes.length-1]},actors:[],boxes:[],loops:[],messages:[],notes:[]},init:function(){this.sequenceItems=[],this.activations=[],this.models.clear(),this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0,j((0,r.c)())},updateVal:function(t,e,a,r){void 0===t[e]?t[e]=a:t[e]=r(a,t[e])},updateBounds:function(t,e,a,r){const s=this;let i=0;function n(n){return function(o){i++;const c=s.sequenceItems.length-i+1;s.updateVal(o,"starty",e-c*$.boxMargin,Math.min),s.updateVal(o,"stopy",r+c*$.boxMargin,Math.max),s.updateVal(Y.data,"startx",t-c*$.boxMargin,Math.min),s.updateVal(Y.data,"stopx",a+c*$.boxMargin,Math.max),"activation"!==n&&(s.updateVal(o,"startx",t-c*$.boxMargin,Math.min),s.updateVal(o,"stopx",a+c*$.boxMargin,Math.max),s.updateVal(Y.data,"starty",e-c*$.boxMargin,Math.min),s.updateVal(Y.data,"stopy",r+c*$.boxMargin,Math.max))}}this.sequenceItems.forEach(n()),this.activations.forEach(n("activation"))},insert:function(t,e,a,s){const i=r.e.getMin(t,a),n=r.e.getMax(t,a),o=r.e.getMin(e,s),c=r.e.getMax(e,s);this.updateVal(Y.data,"startx",i,Math.min),this.updateVal(Y.data,"starty",o,Math.min),this.updateVal(Y.data,"stopx",n,Math.max),this.updateVal(Y.data,"stopy",c,Math.max),this.updateBounds(i,o,n,c)},newActivation:function(t,e,a){const r=a[t.from.actor],s=G(t.from.actor).length||0,i=r.x+r.width/2+(s-1)*$.activationWidth/2;this.activations.push({startx:i,starty:this.verticalPos+2,stopx:i+$.activationWidth,stopy:void 0,actor:t.from.actor,anchored:C.anchorElement(e)})},endActivation:function(t){const e=this.activations.map((function(t){return t.actor})).lastIndexOf(t.from.actor);return this.activations.splice(e,1)[0]},createLoop:function(t={message:void 0,wrap:!1,width:void 0},e){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t.message,wrap:t.wrap,width:t.width,height:0,fill:e}},newLoop:function(t={message:void 0,wrap:!1,width:void 0},e){this.sequenceItems.push(this.createLoop(t,e))},endLoop:function(){return this.sequenceItems.pop()},isLoopOverlap:function(){return!!this.sequenceItems.length&&this.sequenceItems[this.sequenceItems.length-1].overlap},addSectionToLoop:function(t){const e=this.sequenceItems.pop();e.sections=e.sections||[],e.sectionTitles=e.sectionTitles||[],e.sections.push({y:Y.getVerticalPos(),height:0}),e.sectionTitles.push(t),this.sequenceItems.push(e)},saveVerticalPos:function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)},resetVerticalPos:function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=r.e.getMax(this.data.stopy,this.verticalPos)},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return{bounds:this.data,models:this.models}}},B=async function(t,e){Y.bumpVerticalPos($.boxMargin),e.height=$.boxMargin,e.starty=Y.getVerticalPos();const a=(0,i.g)();a.x=e.startx,a.y=e.starty,a.width=e.width||$.width,a.class="note";const s=t.append("g"),n=C.drawRect(s,a),o=(0,i.e)();o.x=e.startx,o.y=e.starty,o.width=a.width,o.dy="1em",o.text=e.message,o.class="noteText",o.fontFamily=$.noteFontFamily,o.fontSize=$.noteFontSize,o.fontWeight=$.noteFontWeight,o.anchor=$.noteAlign,o.textMargin=$.noteMargin,o.valign="center";const c=(0,r.G)(o.text)?await k(s,o):I(s,o),l=Math.round(c.map((t=>(t._groups||t)[0][0].getBBox().height)).reduce(((t,e)=>t+e)));n.attr("height",l+2*$.noteMargin),e.height+=l+2*$.noteMargin,Y.bumpVerticalPos(l+2*$.noteMargin),e.stopy=e.starty+l+2*$.noteMargin,e.stopx=e.startx+a.width,Y.insert(e.startx,e.starty,e.stopx,e.stopy),Y.models.addNote(e)},V=t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),F=t=>({fontFamily:t.noteFontFamily,fontSize:t.noteFontSize,fontWeight:t.noteFontWeight}),q=t=>({fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight});async function W(t,e){Y.bumpVerticalPos(10);const{startx:a,stopx:s,message:i}=e,n=r.e.splitBreaks(i).length,o=(0,r.G)(i),c=o?await(0,r.H)(i,(0,r.c)()):r.u.calculateTextDimensions(i,V($));if(!o){const t=c.height/n;e.height+=t,Y.bumpVerticalPos(t)}let l,d=c.height-10;const h=c.width;if(a===s){l=Y.getVerticalPos()+d,$.rightAngles||(d+=$.boxMargin,l=Y.getVerticalPos()+d),d+=30;const t=r.e.getMax(h/2,$.width/2);Y.insert(a-t,Y.getVerticalPos()-10+d,s+t,Y.getVerticalPos()+30+d)}else d+=$.boxMargin,l=Y.getVerticalPos()+d,Y.insert(a,l-10,s,l);return Y.bumpVerticalPos(d),e.height+=d,e.stopy=e.starty+e.height,Y.insert(e.fromBounds,e.starty,e.toBounds,e.stopy),l}const z=async function(t,e,a,s){const{startx:n,stopx:o,starty:c,message:l,type:d,sequenceIndex:h,sequenceVisible:p}=e,g=r.u.calculateTextDimensions(l,V($)),u=(0,i.e)();u.x=n,u.y=c+10,u.width=o-n,u.class="messageText",u.dy="1em",u.text=l,u.fontFamily=$.messageFontFamily,u.fontSize=$.messageFontSize,u.fontWeight=$.messageFontWeight,u.anchor=$.messageAlign,u.valign="center",u.textMargin=$.wrapPadding,u.tspan=!1,(0,r.G)(u.text)?await k(t,u,{startx:n,stopx:o,starty:a}):I(t,u);const x=g.width;let y;n===o?y=$.rightAngles?t.append("path").attr("d",`M ${n},${a} H ${n+r.e.getMax($.width/2,x/2)} V ${a+25} H ${n}`):t.append("path").attr("d","M "+n+","+a+" C "+(n+60)+","+(a-10)+" "+(n+60)+","+(a+30)+" "+n+","+(a+20)):(y=t.append("line"),y.attr("x1",n),y.attr("y1",a),y.attr("x2",o),y.attr("y2",a)),d===s.db.LINETYPE.DOTTED||d===s.db.LINETYPE.DOTTED_CROSS||d===s.db.LINETYPE.DOTTED_POINT||d===s.db.LINETYPE.DOTTED_OPEN?(y.style("stroke-dasharray","3, 3"),y.attr("class","messageLine1")):y.attr("class","messageLine0");let m="";$.arrowMarkerAbsolute&&(m=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,m=m.replace(/\(/g,"\\("),m=m.replace(/\)/g,"\\)")),y.attr("stroke-width",2),y.attr("stroke","none"),y.style("fill","none"),d!==s.db.LINETYPE.SOLID&&d!==s.db.LINETYPE.DOTTED||y.attr("marker-end","url("+m+"#arrowhead)"),d!==s.db.LINETYPE.SOLID_POINT&&d!==s.db.LINETYPE.DOTTED_POINT||y.attr("marker-end","url("+m+"#filled-head)"),d!==s.db.LINETYPE.SOLID_CROSS&&d!==s.db.LINETYPE.DOTTED_CROSS||y.attr("marker-end","url("+m+"#crosshead)"),(p||$.showSequenceNumbers)&&(y.attr("marker-start","url("+m+"#sequencenumber)"),t.append("text").attr("x",n).attr("y",a+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("class","sequenceNumber").text(h))},H=async function(t,e,a,s){if(s){let s=0;Y.bumpVerticalPos(2*$.boxMargin);for(const i of a){const a=e[i];a.stopy||(a.stopy=Y.getVerticalPos());const n=await C.drawActor(t,a,$,!0);s=r.e.getMax(s,n)}Y.bumpVerticalPos(s+$.boxMargin)}else for(const r of a){const a=e[r];await C.drawActor(t,a,$,!1)}},U=function(t,e,a,r){let s=0,i=0;for(const n of a){const a=e[n],o=Z(a),c=C.drawPopup(t,a,o,$,$.forceMenus,r);c.height>s&&(s=c.height),c.width+a.x>i&&(i=c.width+a.x)}return{maxHeight:s,maxWidth:i}},j=function(t){(0,r.f)($,t),t.fontFamily&&($.actorFontFamily=$.noteFontFamily=$.messageFontFamily=t.fontFamily),t.fontSize&&($.actorFontSize=$.noteFontSize=$.messageFontSize=t.fontSize),t.fontWeight&&($.actorFontWeight=$.noteFontWeight=$.messageFontWeight=t.fontWeight)},G=function(t){return Y.activations.filter((function(e){return e.actor===t}))},K=function(t,e){const a=e[t],s=G(t);return[s.reduce((function(t,e){return r.e.getMin(t,e.startx)}),a.x+a.width/2-1),s.reduce((function(t,e){return r.e.getMax(t,e.stopx)}),a.x+a.width/2+1)]};function X(t,e,a,s,i){Y.bumpVerticalPos(a);let n=s;if(e.id&&e.message&&t[e.id]){const a=t[e.id].width,i=V($);e.message=r.u.wrapLabel(`[${e.message}]`,a-2*$.wrapPadding,i),e.width=a,e.wrap=!0;const o=r.u.calculateTextDimensions(e.message,i),c=r.e.getMax(o.height,$.labelBoxHeight);n=s+c,r.l.debug(`${c} - ${e.message}`)}i(e),Y.bumpVerticalPos(n)}function J(t,e,a,r,s,i,n){function o(a,r){a.x2,p=t=>c?-t:t;t.from===t.to?d=l:(t.activate&&!h&&(d+=p($.activationWidth/2-1)),[a.db.LINETYPE.SOLID_OPEN,a.db.LINETYPE.DOTTED_OPEN].includes(t.type)||(d+=p(3)));const g=[s,i,n,o],u=Math.abs(l-d);t.wrap&&t.message&&(t.message=r.u.wrapLabel(t.message,r.e.getMax(u+2*$.wrapPadding,$.width),V($)));const x=r.u.calculateTextDimensions(t.message,V($));return{width:r.e.getMax(t.wrap?0:x.width+2*$.wrapPadding,u+2*$.wrapPadding,$.width),height:0,startx:l,stopx:d,starty:0,stopy:0,message:t.message,type:t.type,wrap:t.wrap,fromBounds:Math.min.apply(null,g),toBounds:Math.max.apply(null,g)}},et=async function(t,e,a,s){const i={},n=[];let o,c,l;for(const d of t){switch(d.id=r.u.random({length:10}),d.type){case s.db.LINETYPE.LOOP_START:case s.db.LINETYPE.ALT_START:case s.db.LINETYPE.OPT_START:case s.db.LINETYPE.PAR_START:case s.db.LINETYPE.PAR_OVER_START:case s.db.LINETYPE.CRITICAL_START:case s.db.LINETYPE.BREAK_START:n.push({id:d.id,msg:d.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case s.db.LINETYPE.ALT_ELSE:case s.db.LINETYPE.PAR_AND:case s.db.LINETYPE.CRITICAL_OPTION:d.message&&(o=n.pop(),i[o.id]=o,i[d.id]=o,n.push(o));break;case s.db.LINETYPE.LOOP_END:case s.db.LINETYPE.ALT_END:case s.db.LINETYPE.OPT_END:case s.db.LINETYPE.PAR_END:case s.db.LINETYPE.CRITICAL_END:case s.db.LINETYPE.BREAK_END:o=n.pop(),i[o.id]=o;break;case s.db.LINETYPE.ACTIVE_START:{const t=e[d.from?d.from.actor:d.to.actor],a=G(d.from?d.from.actor:d.to.actor).length,r=t.x+t.width/2+(a-1)*$.activationWidth/2,s={startx:r,stopx:r+$.activationWidth,actor:d.from.actor,enabled:!0};Y.activations.push(s)}break;case s.db.LINETYPE.ACTIVE_END:{const t=Y.activations.map((t=>t.actor)).lastIndexOf(d.from.actor);delete Y.activations.splice(t,1)[0]}}void 0!==d.placement?(c=await Q(d,e,s),d.noteModel=c,n.forEach((t=>{o=t,o.from=r.e.getMin(o.from,c.startx),o.to=r.e.getMax(o.to,c.startx+c.width),o.width=r.e.getMax(o.width,Math.abs(o.from-o.to))-$.labelBoxWidth}))):(l=tt(d,e,s),d.msgModel=l,l.startx&&l.stopx&&n.length>0&&n.forEach((t=>{if(o=t,l.startx===l.stopx){const t=e[d.from],a=e[d.to];o.from=r.e.getMin(t.x-l.width/2,t.x-t.width/2,o.from),o.to=r.e.getMax(a.x+l.width/2,a.x+t.width/2,o.to),o.width=r.e.getMax(o.width,Math.abs(o.to-o.from))-$.labelBoxWidth}else o.from=r.e.getMin(l.startx,o.from),o.to=r.e.getMax(l.stopx,o.to),o.width=r.e.getMax(o.width,l.width)-$.labelBoxWidth})))}return Y.activations=[],r.l.debug("Loop type widths:",i),i},at={parser:c,db:w,renderer:{bounds:Y,drawActors:H,drawActorsPopup:U,setConf:j,draw:async function(t,e,a,i){const{securityLevel:n,sequence:o}=(0,r.c)();let c;$=o,"sandbox"===n&&(c=(0,s.Ltv)("#i"+e));const l="sandbox"===n?(0,s.Ltv)(c.nodes()[0].contentDocument.body):(0,s.Ltv)("body"),d="sandbox"===n?c.nodes()[0].contentDocument:document;Y.init(),r.l.debug(i.db);const h="sandbox"===n?l.select(`[id="${e}"]`):(0,s.Ltv)(`[id="${e}"]`),p=i.db.getActors(),g=i.db.getCreatedActors(),u=i.db.getDestroyedActors(),x=i.db.getBoxes();let y=i.db.getActorKeys();const m=i.db.getMessages(),b=i.db.getDiagramTitle(),f=i.db.hasAtLeastOneBox(),T=i.db.hasAtLeastOneBoxWithTitle(),E=await async function(t,e,a){const s={};for(const i of e)if(t[i.to]&&t[i.from]){const e=t[i.to];if(i.placement===a.db.PLACEMENT.LEFTOF&&!e.prevActor)continue;if(i.placement===a.db.PLACEMENT.RIGHTOF&&!e.nextActor)continue;const n=void 0!==i.placement,o=!n,c=n?F($):V($),l=i.wrap?r.u.wrapLabel(i.message,$.width-2*$.wrapPadding,c):i.message,d=((0,r.G)(l)?await(0,r.H)(i.message,(0,r.c)()):r.u.calculateTextDimensions(l,c)).width+2*$.wrapPadding;o&&i.from===e.nextActor?s[i.to]=r.e.getMax(s[i.to]||0,d):o&&i.from===e.prevActor?s[i.from]=r.e.getMax(s[i.from]||0,d):o&&i.from===i.to?(s[i.from]=r.e.getMax(s[i.from]||0,d/2),s[i.to]=r.e.getMax(s[i.to]||0,d/2)):i.placement===a.db.PLACEMENT.RIGHTOF?s[i.from]=r.e.getMax(s[i.from]||0,d):i.placement===a.db.PLACEMENT.LEFTOF?s[e.prevActor]=r.e.getMax(s[e.prevActor]||0,d):i.placement===a.db.PLACEMENT.OVER&&(e.prevActor&&(s[e.prevActor]=r.e.getMax(s[e.prevActor]||0,d/2)),e.nextActor&&(s[i.from]=r.e.getMax(s[i.from]||0,d/2)))}return r.l.debug("maxMessageWidthPerActor:",s),s}(p,m,i);if($.height=await async function(t,e,a){let s=0;for(const n of Object.keys(t)){const e=t[n];e.wrap&&(e.description=r.u.wrapLabel(e.description,$.width-2*$.wrapPadding,q($)));const a=(0,r.G)(e.description)?await(0,r.H)(e.description,(0,r.c)()):r.u.calculateTextDimensions(e.description,q($));e.width=e.wrap?$.width:r.e.getMax($.width,a.width+2*$.wrapPadding),e.height=e.wrap?r.e.getMax(a.height,$.height):$.height,s=r.e.getMax(s,e.height)}for(const n in e){const a=t[n];if(!a)continue;const s=t[a.nextActor];if(!s){const t=e[n]+$.actorMargin-a.width/2;a.margin=r.e.getMax(t,$.actorMargin);continue}const i=e[n]+$.actorMargin-a.width/2-s.width/2;a.margin=r.e.getMax(i,$.actorMargin)}let i=0;return a.forEach((e=>{const a=V($);let s=e.actorKeys.reduce(((e,a)=>e+(t[a].width+(t[a].margin||0))),0);s-=2*$.boxTextMargin,e.wrap&&(e.name=r.u.wrapLabel(e.name,s-2*$.wrapPadding,a));const n=r.u.calculateTextDimensions(e.name,a);i=r.e.getMax(n.height,i);const o=r.e.getMax(s,n.width+2*$.wrapPadding);if(e.margin=$.boxTextMargin,st.textMaxHeight=i)),r.e.getMax(s,$.height)}(p,E,x),C.insertComputerIcon(h),C.insertDatabaseIcon(h),C.insertClockIcon(h),f&&(Y.bumpVerticalPos($.boxMargin),T&&Y.bumpVerticalPos(x[0].textMaxHeight)),!0===$.hideUnusedParticipants){const t=new Set;m.forEach((e=>{t.add(e.from),t.add(e.to)})),y=y.filter((e=>t.has(e)))}await async function(t,e,a,s,i,n,o){let c,l=0,d=0,h=0;for(const p of s){const t=e[p],s=t.box;c&&c!=s&&(o||Y.models.addBox(c),d+=$.boxMargin+c.margin),s&&s!=c&&(o||(s.x=l+d,s.y=i),d+=s.margin),t.width=t.width||$.width,t.height=r.e.getMax(t.height||$.height,$.height),t.margin=t.margin||$.actorMargin,h=r.e.getMax(h,t.height),a[t.name]&&(d+=t.width/2),t.x=l+d,t.starty=Y.getVerticalPos(),Y.insert(t.x,i,t.x+t.width,t.height),l+=t.width+d,t.box&&(t.box.width=l+s.margin-t.box.x),d=t.margin,c=t.box,Y.models.addActor(t)}c&&!o&&Y.models.addBox(c),Y.bumpVerticalPos(h)}(0,p,g,y,0,0,!1);const w=await et(m,p,E,i);function P(t,e){const a=Y.endActivation(t);a.starty+18>e&&(a.starty=e-6,e+=12),C.drawActivation(h,a,e,$,G(t.from.actor).length),Y.insert(a.startx,e-10,a.stopx,e)}C.insertArrowHead(h),C.insertArrowCrossHead(h),C.insertArrowFilledHead(h),C.insertSequenceNumber(h);let v=1,_=1;const L=[],k=[];let I=0;for(const s of m){let t,e,a;switch(s.type){case i.db.LINETYPE.NOTE:Y.resetVerticalPos(),e=s.noteModel,await B(h,e);break;case i.db.LINETYPE.ACTIVE_START:Y.newActivation(s,h,p);break;case i.db.LINETYPE.ACTIVE_END:P(s,Y.getVerticalPos());break;case i.db.LINETYPE.LOOP_START:X(w,s,$.boxMargin,$.boxMargin+$.boxTextMargin,(t=>Y.newLoop(t)));break;case i.db.LINETYPE.LOOP_END:t=Y.endLoop(),await C.drawLoop(h,t,"loop",$),Y.bumpVerticalPos(t.stopy-Y.getVerticalPos()),Y.models.addLoop(t);break;case i.db.LINETYPE.RECT_START:X(w,s,$.boxMargin,$.boxMargin,(t=>Y.newLoop(void 0,t.message)));break;case i.db.LINETYPE.RECT_END:t=Y.endLoop(),k.push(t),Y.models.addLoop(t),Y.bumpVerticalPos(t.stopy-Y.getVerticalPos());break;case i.db.LINETYPE.OPT_START:X(w,s,$.boxMargin,$.boxMargin+$.boxTextMargin,(t=>Y.newLoop(t)));break;case i.db.LINETYPE.OPT_END:t=Y.endLoop(),await C.drawLoop(h,t,"opt",$),Y.bumpVerticalPos(t.stopy-Y.getVerticalPos()),Y.models.addLoop(t);break;case i.db.LINETYPE.ALT_START:X(w,s,$.boxMargin,$.boxMargin+$.boxTextMargin,(t=>Y.newLoop(t)));break;case i.db.LINETYPE.ALT_ELSE:X(w,s,$.boxMargin+$.boxTextMargin,$.boxMargin,(t=>Y.addSectionToLoop(t)));break;case i.db.LINETYPE.ALT_END:t=Y.endLoop(),await C.drawLoop(h,t,"alt",$),Y.bumpVerticalPos(t.stopy-Y.getVerticalPos()),Y.models.addLoop(t);break;case i.db.LINETYPE.PAR_START:case i.db.LINETYPE.PAR_OVER_START:X(w,s,$.boxMargin,$.boxMargin+$.boxTextMargin,(t=>Y.newLoop(t))),Y.saveVerticalPos();break;case i.db.LINETYPE.PAR_AND:X(w,s,$.boxMargin+$.boxTextMargin,$.boxMargin,(t=>Y.addSectionToLoop(t)));break;case i.db.LINETYPE.PAR_END:t=Y.endLoop(),await C.drawLoop(h,t,"par",$),Y.bumpVerticalPos(t.stopy-Y.getVerticalPos()),Y.models.addLoop(t);break;case i.db.LINETYPE.AUTONUMBER:v=s.message.start||v,_=s.message.step||_,s.message.visible?i.db.enableSequenceNumbers():i.db.disableSequenceNumbers();break;case i.db.LINETYPE.CRITICAL_START:X(w,s,$.boxMargin,$.boxMargin+$.boxTextMargin,(t=>Y.newLoop(t)));break;case i.db.LINETYPE.CRITICAL_OPTION:X(w,s,$.boxMargin+$.boxTextMargin,$.boxMargin,(t=>Y.addSectionToLoop(t)));break;case i.db.LINETYPE.CRITICAL_END:t=Y.endLoop(),await C.drawLoop(h,t,"critical",$),Y.bumpVerticalPos(t.stopy-Y.getVerticalPos()),Y.models.addLoop(t);break;case i.db.LINETYPE.BREAK_START:X(w,s,$.boxMargin,$.boxMargin+$.boxTextMargin,(t=>Y.newLoop(t)));break;case i.db.LINETYPE.BREAK_END:t=Y.endLoop(),await C.drawLoop(h,t,"break",$),Y.bumpVerticalPos(t.stopy-Y.getVerticalPos()),Y.models.addLoop(t);break;default:try{a=s.msgModel,a.starty=Y.getVerticalPos(),a.sequenceIndex=v,a.sequenceVisible=i.db.showSequenceNumbers();const t=await W(0,a);J(s,a,t,I,p,g,u),L.push({messageModel:a,lineStartY:t}),Y.models.addMessage(a)}catch(K){r.l.error("error while drawing message",K)}}[i.db.LINETYPE.SOLID_OPEN,i.db.LINETYPE.DOTTED_OPEN,i.db.LINETYPE.SOLID,i.db.LINETYPE.DOTTED,i.db.LINETYPE.SOLID_CROSS,i.db.LINETYPE.DOTTED_CROSS,i.db.LINETYPE.SOLID_POINT,i.db.LINETYPE.DOTTED_POINT].includes(s.type)&&(v+=_),I++}r.l.debug("createdActors",g),r.l.debug("destroyedActors",u),await H(h,p,y,!1);for(const r of L)await z(h,r.messageModel,r.lineStartY,i);$.mirrorActors&&await H(h,p,y,!0),k.forEach((t=>C.drawBackgroundRect(h,t))),A(h,p,y,$);for(const r of Y.models.boxes)r.height=Y.getVerticalPos()-r.y,Y.insert(r.x,r.y,r.x+r.width,r.height),r.startx=r.x,r.starty=r.y,r.stopx=r.startx+r.width,r.stopy=r.starty+r.height,r.stroke="rgb(0,0,0, 0.5)",await C.drawBox(h,r,$);f&&Y.bumpVerticalPos($.boxMargin);const M=U(h,p,y,d),{bounds:N}=Y.getBounds();let O=N.stopy-N.starty;O{w.setWrap(t)}}},79186:(t,e,a)=>{a.d(e,{a:()=>n,b:()=>l,c:()=>c,d:()=>i,e:()=>h,f:()=>o,g:()=>d});var r=a(16750),s=a(86079);const i=(t,e)=>{const a=t.append("rect");if(a.attr("x",e.x),a.attr("y",e.y),a.attr("fill",e.fill),a.attr("stroke",e.stroke),a.attr("width",e.width),a.attr("height",e.height),e.name&&a.attr("name",e.name),void 0!==e.rx&&a.attr("rx",e.rx),void 0!==e.ry&&a.attr("ry",e.ry),void 0!==e.attrs)for(const r in e.attrs)a.attr(r,e.attrs[r]);return void 0!==e.class&&a.attr("class",e.class),a},n=(t,e)=>{const a={x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"};i(t,a).lower()},o=(t,e)=>{const a=e.text.replace(s.J," "),r=t.append("text");r.attr("x",e.x),r.attr("y",e.y),r.attr("class","legend"),r.style("text-anchor",e.anchor),void 0!==e.class&&r.attr("class",e.class);const i=r.append("tspan");return i.attr("x",e.x+2*e.textMargin),i.text(a),r},c=(t,e,a,s)=>{const i=t.append("image");i.attr("x",e),i.attr("y",a);const n=(0,r.Jf)(s);i.attr("xlink:href",n)},l=(t,e,a,s)=>{const i=t.append("use");i.attr("x",e),i.attr("y",a);const n=(0,r.Jf)(s);i.attr("xlink:href",`#${n}`)},d=()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),h=()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0})}}]); \ No newline at end of file diff --git a/assets/js/36b7ae49.3581385f.js b/assets/js/36b7ae49.3581385f.js new file mode 100644 index 000000000000..f7bf79c5a408 --- /dev/null +++ b/assets/js/36b7ae49.3581385f.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1914],{31184:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>d,contentTitle:()=>a,default:()=>h,frontMatter:()=>o,metadata:()=>r,toc:()=>l});const r=JSON.parse('{"id":"learn/learn-snowbridge","title":"Snowbridge","description":"Overview of Snowbridge by Snowfork","source":"@site/../docs/learn/learn-snowbridge.md","sourceDirName":"learn","slug":"/learn-snowbridge","permalink":"/docs/learn-snowbridge","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-snowbridge.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1725460864000,"frontMatter":{"id":"learn-snowbridge","title":"Snowbridge","sidebar_label":"Snowbridge","description":"Overview of Snowbridge by Snowfork","keywords":["Bridge","XCM","Bridge Hub","Snowbridge","Snowfork"],"slug":"../learn-snowbridge"},"sidebar":"docs","previous":{"title":"Bridges","permalink":"/docs/learn-bridges"},"next":{"title":"Hyperbridge","permalink":"/docs/learn-hyperbridge"}}');var i=s(74848),t=s(28453);const o={id:"learn-snowbridge",title:"Snowbridge",sidebar_label:"Snowbridge",description:"Overview of Snowbridge by Snowfork",keywords:["Bridge","XCM","Bridge Hub","Snowbridge","Snowfork"],slug:"../learn-snowbridge"},a=void 0,d={},l=[{value:"Random-sampling BEEFY",id:"random-sampling-beefy",level:2},{value:"Snowbridge Crypto-economic Security",id:"snowbridge-crypto-economic-security",level:2},{value:"Snowbridge Assumptions",id:"snowbridge-assumptions",level:3},{value:"Resources",id:"resources",level:2}];function c(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,t.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.admonition,{title:"Using Snowbridge",type:"info",children:(0,i.jsxs)(n.p,{children:["Snowbridge can be accessed through ",(0,i.jsx)(n.a,{href:"https://app.snowbridge.network/",children:"the web app"}),", where you may\ntrack ",(0,i.jsx)(n.a,{href:"https://app.snowbridge.network/status",children:"processing times of transactions"}),",\n",(0,i.jsx)(n.a,{href:"https://app.snowbridge.network/history",children:"recent transfers"}),", and other information about the bridge's\noverall status."]})}),"\n",(0,i.jsxs)(n.p,{children:["Snowbridge by ",(0,i.jsx)(n.a,{href:"https://snowfork.com/",children:"Snowfork"})," is a general-purpose, trustless bridge between\nPolkadot and Ethereum. It utilizes the\n",(0,i.jsx)(n.a,{href:"/docs/learn-system-chains#bridge-hub",children:"Bridge Hub system parachain"})," to establish a connection to its\nrelayers, allowing for permissionless and trustless messaging between Ethereum and Polkadot."]}),"\n",(0,i.jsxs)(n.p,{children:["With Snowbridge, a sender can (but does not need to) run a\n",(0,i.jsx)(n.a,{href:"https://docs.snowbridge.network/architecture/relayers",children:"relayer"})," to ensure that their cross-chain\ntransaction is successful. A sender is a user using relayers provided by others."]}),"\n",(0,i.jsxs)(n.p,{children:["Snowbridge currently supports\n",(0,i.jsx)(n.a,{href:"https://docs.snowbridge.network/applications/token-transfers",children:"two-way token transfers"})," between\nEthereum and Polkadot parachain."]}),"\n",(0,i.jsx)(n.h2,{id:"random-sampling-beefy",children:"Random-sampling BEEFY"}),"\n",(0,i.jsxs)(n.p,{children:["A trustless bridge always has a ",(0,i.jsx)(n.strong,{children:"prover"})," (needs to compute the proof), a ",(0,i.jsx)(n.strong,{children:"verifier"})," (asks the\nprover to compute the proof and verifies it), and relayers to relay messages. Snowbridge prover uses\n",(0,i.jsx)(n.a,{href:"/docs/learn-consensus#bridging-beefy",children:"BEEFY"}),", a novel bridge protocol drastically reducing\noperational costs without compromising security."]}),"\n",(0,i.jsxs)(n.p,{children:["Even with simplifications ushered in by BEEFY, a smart contract updating Polkadot's state on\nEthereum has to perform 201 signature checks for every update since there are ~300 validators on\nPolkadot. This remains expensive (gas costs), especially as the validator set grows. The solution is\nrandom-sampling BEEFY that leverages\n",(0,i.jsx)(n.a,{href:"https://eth2book.info/capella/part2/building_blocks/randomness/",children:"the RANDAO randomness beacon"})," as\nfollows:"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Commit:"})," Relayer submits a state commitment of a recently finalized block on Polkadot and\nclaims to have a super-majority of validator\u2019s signatures to the light client deployed on\nEthereum. It also provides one validator signature backing the commitment, which can be slashed if\nneeded."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Challenge:"})," Light client queries on-chain randomness (RANDAO) to subsample ",(0,i.jsx)(n.code,{children:"m"})," (~25) signatures\nfrom the list Relayer\u2019s claimed list."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Response:"})," Relayer responds by sharing exactly those ",(0,i.jsx)(n.code,{children:"m"})," signatures that were randomly sampled\nwhich the light client then verifies. If everything checks out, the finalized block is accepted."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["The number of signature checks needed is significantly reduced and independent of the validator set\nsize, making the protocol more efficient. The number of subsampled signatures, ",(0,i.jsx)(n.code,{children:"m,"})," is the parameter\nthat trades off security and efficiency (i.e., ",(0,i.jsx)(n.strong,{children:"security parameter"}),"). The value of this parameter\nis derived using crypto-economic arguments."]}),"\n",(0,i.jsx)(n.h2,{id:"snowbridge-crypto-economic-security",children:"Snowbridge Crypto-economic Security"}),"\n",(0,i.jsxs)(n.p,{children:["If up to a third of the validators are malicious, the chance that all ",(0,i.jsx)(n.code,{children:"m"})," signatures subsampled are\nfrom these bad actors is ",(0,i.jsx)(n.code,{children:"(1/2)^m"})," (exponentially low). Any validator who supports a malicious\ncommitment ",(0,i.jsx)(n.a,{href:"/docs/learn-offenses",children:"faces severe penalties"}),". The expected value of an attack ",(0,i.jsx)(n.code,{children:"E(A)"})," is:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"E(A) = p * V + (1 - p)*(-S)\n"})}),"\n",(0,i.jsxs)(n.p,{children:["Where ",(0,i.jsx)(n.code,{children:"V"})," is the value of attack (bounded by market capitalization), ",(0,i.jsx)(n.code,{children:"S"})," is the validator slashable\nstake, and ",(0,i.jsx)(n.code,{children:"p"})," is the probability of a successful attack."]}),"\n",(0,i.jsx)(n.h3,{id:"snowbridge-assumptions",children:"Snowbridge Assumptions"}),"\n",(0,i.jsx)(n.p,{children:"Snowbridge relies on two major assumptions:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:["The crypto-economic assumption that an adversary is rational, i.e., an attack is launched only if\nthe expected value of an attack is positive. Hence, we derive our security parameter ",(0,i.jsx)(n.code,{children:"m"})," by\nensuring the expected value of an attack is negative, i.e., ",(0,i.jsx)(n.code,{children:"E(A) < 0"}),"."]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:"RANDAO unpredictability. The Web3 Foundation research team performed a thorough analysis of RANDAO\nbias and extended the state-of-the-art in analysing the last-revealer attack on RANDAO. Assuming\n1/3rd of Ethereum validators are malicious, the effect of such bias is mitigated by proportionally\nincreasing the security parameter."}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"resources",children:"Resources"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["Medium article\n",(0,i.jsx)(n.a,{href:"https://medium.com/@bhargav_22496/18a43a2cba9b",children:'"Random Sampling BEEFY: Pillaring the trust-less Snowbridge"'}),"\nby Bhargav Bhatt at Web3 Foundation"]}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://github.com/Snowfork/snowbridge",children:"Snowbridge GitHub repository"})}),"\n",(0,i.jsx)(n.li,{children:"Web3 Foundation Research Repository"}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(c,{...e})}):c(e)}},28453:(e,n,s)=>{s.d(n,{R:()=>o,x:()=>a});var r=s(96540);const i={},t=r.createContext(i);function o(e){const n=r.useContext(t);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:o(e.components),r.createElement(t.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/36b7ae49.5040abab.js b/assets/js/36b7ae49.5040abab.js deleted file mode 100644 index 323400af1921..000000000000 --- a/assets/js/36b7ae49.5040abab.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1914],{70137:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>d,contentTitle:()=>o,default:()=>h,frontMatter:()=>t,metadata:()=>a,toc:()=>l});var r=s(74848),i=s(28453);const t={id:"learn-snowbridge",title:"Snowbridge",sidebar_label:"Snowbridge",description:"Overview of Snowbridge by Snowfork",keywords:["Bridge","XCM","Bridge Hub","Snowbridge","Snowfork"],slug:"../learn-snowbridge"},o=void 0,a={id:"learn/learn-snowbridge",title:"Snowbridge",description:"Overview of Snowbridge by Snowfork",source:"@site/../docs/learn/learn-snowbridge.md",sourceDirName:"learn",slug:"/learn-snowbridge",permalink:"/docs/learn-snowbridge",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-snowbridge.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1725460864e3,frontMatter:{id:"learn-snowbridge",title:"Snowbridge",sidebar_label:"Snowbridge",description:"Overview of Snowbridge by Snowfork",keywords:["Bridge","XCM","Bridge Hub","Snowbridge","Snowfork"],slug:"../learn-snowbridge"},sidebar:"docs",previous:{title:"Bridges",permalink:"/docs/learn-bridges"},next:{title:"Hyperbridge",permalink:"/docs/learn-hyperbridge"}},d={},l=[{value:"Random-sampling BEEFY",id:"random-sampling-beefy",level:2},{value:"Snowbridge Crypto-economic Security",id:"snowbridge-crypto-economic-security",level:2},{value:"Snowbridge Assumptions",id:"snowbridge-assumptions",level:3},{value:"Resources",id:"resources",level:2}];function c(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.admonition,{title:"Using Snowbridge",type:"info",children:(0,r.jsxs)(n.p,{children:["Snowbridge can be accessed through ",(0,r.jsx)(n.a,{href:"https://app.snowbridge.network/",children:"the web app"}),", where you may\ntrack ",(0,r.jsx)(n.a,{href:"https://app.snowbridge.network/status",children:"processing times of transactions"}),",\n",(0,r.jsx)(n.a,{href:"https://app.snowbridge.network/history",children:"recent transfers"}),", and other information about the bridge's\noverall status."]})}),"\n",(0,r.jsxs)(n.p,{children:["Snowbridge by ",(0,r.jsx)(n.a,{href:"https://snowfork.com/",children:"Snowfork"})," is a general-purpose, trustless bridge between\nPolkadot and Ethereum. It utilizes the\n",(0,r.jsx)(n.a,{href:"/docs/learn-system-chains#bridge-hub",children:"Bridge Hub system parachain"})," to establish a connection to its\nrelayers, allowing for permissionless and trustless messaging between Ethereum and Polkadot."]}),"\n",(0,r.jsxs)(n.p,{children:["With Snowbridge, a sender can (but does not need to) run a\n",(0,r.jsx)(n.a,{href:"https://docs.snowbridge.network/architecture/relayers",children:"relayer"})," to ensure that their cross-chain\ntransaction is successful. A sender is a user using relayers provided by others."]}),"\n",(0,r.jsxs)(n.p,{children:["Snowbridge currently supports\n",(0,r.jsx)(n.a,{href:"https://docs.snowbridge.network/applications/token-transfers",children:"two-way token transfers"})," between\nEthereum and Polkadot parachain."]}),"\n",(0,r.jsx)(n.h2,{id:"random-sampling-beefy",children:"Random-sampling BEEFY"}),"\n",(0,r.jsxs)(n.p,{children:["A trustless bridge always has a ",(0,r.jsx)(n.strong,{children:"prover"})," (needs to compute the proof), a ",(0,r.jsx)(n.strong,{children:"verifier"})," (asks the\nprover to compute the proof and verifies it), and relayers to relay messages. Snowbridge prover uses\n",(0,r.jsx)(n.a,{href:"/docs/learn-consensus#bridging-beefy",children:"BEEFY"}),", a novel bridge protocol drastically reducing\noperational costs without compromising security."]}),"\n",(0,r.jsxs)(n.p,{children:["Even with simplifications ushered in by BEEFY, a smart contract updating Polkadot's state on\nEthereum has to perform 201 signature checks for every update since there are ~300 validators on\nPolkadot. This remains expensive (gas costs), especially as the validator set grows. The solution is\nrandom-sampling BEEFY that leverages\n",(0,r.jsx)(n.a,{href:"https://eth2book.info/capella/part2/building_blocks/randomness/",children:"the RANDAO randomness beacon"})," as\nfollows:"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Commit:"})," Relayer submits a state commitment of a recently finalized block on Polkadot and\nclaims to have a super-majority of validator\u2019s signatures to the light client deployed on\nEthereum. It also provides one validator signature backing the commitment, which can be slashed if\nneeded."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Challenge:"})," Light client queries on-chain randomness (RANDAO) to subsample ",(0,r.jsx)(n.code,{children:"m"})," (~25) signatures\nfrom the list Relayer\u2019s claimed list."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Response:"})," Relayer responds by sharing exactly those ",(0,r.jsx)(n.code,{children:"m"})," signatures that were randomly sampled\nwhich the light client then verifies. If everything checks out, the finalized block is accepted."]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:["The number of signature checks needed is significantly reduced and independent of the validator set\nsize, making the protocol more efficient. The number of subsampled signatures, ",(0,r.jsx)(n.code,{children:"m,"})," is the parameter\nthat trades off security and efficiency (i.e., ",(0,r.jsx)(n.strong,{children:"security parameter"}),"). The value of this parameter\nis derived using crypto-economic arguments."]}),"\n",(0,r.jsx)(n.h2,{id:"snowbridge-crypto-economic-security",children:"Snowbridge Crypto-economic Security"}),"\n",(0,r.jsxs)(n.p,{children:["If up to a third of the validators are malicious, the chance that all ",(0,r.jsx)(n.code,{children:"m"})," signatures subsampled are\nfrom these bad actors is ",(0,r.jsx)(n.code,{children:"(1/2)^m"})," (exponentially low). Any validator who supports a malicious\ncommitment ",(0,r.jsx)(n.a,{href:"/docs/learn-offenses",children:"faces severe penalties"}),". The expected value of an attack ",(0,r.jsx)(n.code,{children:"E(A)"})," is:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"E(A) = p * V + (1 - p)*(-S)\n"})}),"\n",(0,r.jsxs)(n.p,{children:["Where ",(0,r.jsx)(n.code,{children:"V"})," is the value of attack (bounded by market capitalization), ",(0,r.jsx)(n.code,{children:"S"})," is the validator slashable\nstake, and ",(0,r.jsx)(n.code,{children:"p"})," is the probability of a successful attack."]}),"\n",(0,r.jsx)(n.h3,{id:"snowbridge-assumptions",children:"Snowbridge Assumptions"}),"\n",(0,r.jsx)(n.p,{children:"Snowbridge relies on two major assumptions:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["The crypto-economic assumption that an adversary is rational, i.e., an attack is launched only if\nthe expected value of an attack is positive. Hence, we derive our security parameter ",(0,r.jsx)(n.code,{children:"m"})," by\nensuring the expected value of an attack is negative, i.e., ",(0,r.jsx)(n.code,{children:"E(A) < 0"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"RANDAO unpredictability. The Web3 Foundation research team performed a thorough analysis of RANDAO\nbias and extended the state-of-the-art in analysing the last-revealer attack on RANDAO. Assuming\n1/3rd of Ethereum validators are malicious, the effect of such bias is mitigated by proportionally\nincreasing the security parameter."}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"resources",children:"Resources"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Medium article\n",(0,r.jsx)(n.a,{href:"https://medium.com/@bhargav_22496/18a43a2cba9b",children:'"Random Sampling BEEFY: Pillaring the trust-less Snowbridge"'}),"\nby Bhargav Bhatt at Web3 Foundation"]}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"https://github.com/Snowfork/snowbridge",children:"Snowbridge GitHub repository"})}),"\n",(0,r.jsx)(n.li,{children:"Web3 Foundation Research Repository"}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(c,{...e})}):c(e)}},28453:(e,n,s)=>{s.d(n,{R:()=>o,x:()=>a});var r=s(96540);const i={},t=r.createContext(i);function o(e){const n=r.useContext(t);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:o(e.components),r.createElement(t.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/3829cf1d.1d1207a7.js b/assets/js/3829cf1d.1d1207a7.js deleted file mode 100644 index 50fb844d09ec..000000000000 --- a/assets/js/3829cf1d.1d1207a7.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5249],{4909:(e,t,i)=>{i.r(t),i.d(t,{assets:()=>l,contentTitle:()=>s,default:()=>c,frontMatter:()=>o,metadata:()=>r,toc:()=>d});var n=i(74848),a=i(28453);const o={id:"doc-maintain-guides-validator-community",title:"Validator Community Overview",sidebar_label:"Validator Community Overview",description:"An extensive guide to help you start and build a validator community.",keywords:["validator","community","reputation","nominations"],slug:"../maintain-guides-validator-community"},s=void 0,r={id:"maintain/doc-maintain-guides-validator-community",title:"Validator Community Overview",description:"An extensive guide to help you start and build a validator community.",source:"@site/../docs/maintain/maintain-guides-validator-community.md",sourceDirName:"maintain",slug:"/maintain-guides-validator-community",permalink:"/docs/maintain-guides-validator-community",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/maintain/maintain-guides-validator-community.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1727167801e3,frontMatter:{id:"doc-maintain-guides-validator-community",title:"Validator Community Overview",sidebar_label:"Validator Community Overview",description:"An extensive guide to help you start and build a validator community.",keywords:["validator","community","reputation","nominations"],slug:"../maintain-guides-validator-community"},sidebar:"docs",previous:{title:"How to Stop Validating",permalink:"/docs/maintain-guides-how-to-stop-validating"},next:{title:"Archive",permalink:"/docs/maintain-archive"}},l={},d=[{value:"Building a Community and Attracting Nominations",id:"building-a-community-and-attracting-nominations",level:2},{value:"Gaining Visibility",id:"gaining-visibility",level:2},{value:"Setting Identity",id:"setting-identity",level:3},{value:"Website",id:"website",level:3},{value:"Transparency & Establishing Trust",id:"transparency--establishing-trust",level:2},{value:"Self Stake",id:"self-stake",level:3},{value:"Commission & Rewards",id:"commission--rewards",level:3},{value:"Commission",id:"commission",level:4},{value:"Rewards",id:"rewards",level:4},{value:"Validator Experience",id:"validator-experience",level:3},{value:"Architecture",id:"architecture",level:3},{value:"Servers",id:"servers",level:4},{value:"Specs",id:"specs",level:4},{value:"Automation and orchestration approaches (Terraform, Ansible, Chef, Puppet, Kubernetes, etc.)",id:"automation-and-orchestration-approaches-terraform-ansible-chef-puppet-kubernetes-etc",level:4},{value:"Network Topology",id:"network-topology",level:4},{value:"Upgrading",id:"upgrading",level:4},{value:"Logging, metrics, monitoring, and observability",id:"logging-metrics-monitoring-and-observability",level:4},{value:"Health checks and alerting conditions",id:"health-checks-and-alerting-conditions",level:5},{value:"Scenario runbooks",id:"scenario-runbooks",level:5},{value:"Which regions nodes are in",id:"which-regions-nodes-are-in",level:5},{value:"Security / Key handling policies",id:"security--key-handling-policies",level:5},{value:"Robust Communication",id:"robust-communication",level:3},{value:"Actively Participating in the Community",id:"actively-participating-in-the-community",level:3},{value:"Participating in Governance",id:"participating-in-governance",level:4},{value:"Producing Educational Content",id:"producing-educational-content",level:4},{value:"Building Tooling",id:"building-tooling",level:4}];function h(e){const t={a:"a",admonition:"admonition",em:"em",h2:"h2",h3:"h3",h4:"h4",h5:"h5",li:"li",mdxAdmonitionTitle:"mdxAdmonitionTitle",p:"p",strong:"strong",ul:"ul",...(0,a.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.h2,{id:"building-a-community-and-attracting-nominations",children:"Building a Community and Attracting Nominations"}),"\n",(0,n.jsxs)(t.p,{children:["After ",(0,n.jsx)(t.a,{href:"maintain-guides-how-to-validate-Polkadot",children:"setting up a validator"}),", nominations will only come\nin with extra work. The community of nominators will need to know about the validator to trust\nstaking with them, and thus the validator must distinguish themselves to attract nominations. The\nfollowing gives some general guidance on different approaches to building a community and attracting\nnominations."]}),"\n",(0,n.jsx)(t.p,{children:"Being a high-quality validator entails effectively running nodes and building a brand, reputation,\nand community around validation services. The responsibilities of a quality validator additionally\ninclude marketing oneself and participating in the greater community. Becoming a known participant\nthroughout the ecosystem is a great way to attract nominations and solidify longevity and\nsustainability as a validator."}),"\n",(0,n.jsxs)(t.p,{children:["One thing to remember is that there is a risk involved in staking for both validators and\nnominators, as both can lose up to 100% of their funds if a validator gets\n",(0,n.jsx)(t.a,{href:"/docs/learn-offenses",children:"slashed"}),". This means it is paramount for nominators only to nominate\nvalidators that they trust, as well as for validators to do their best to instill confidence in\ntheir ability to provide validation services. Validators should do their best to build a reputation\nthrough many different means, as this is one of the most important factors in how nominators should\npick whom they stake with."]}),"\n",(0,n.jsx)(t.h2,{id:"gaining-visibility",children:"Gaining Visibility"}),"\n",(0,n.jsxs)(t.p,{children:["Nominators should be able to know whom they are staking with. If nominators stake with a bunch of\npseudo-anonymous addresses because it seems profitable, they expose themselves to more risks than\nnominating validators that follow best practices to whom they ",(0,n.jsx)(t.em,{children:"know"})," the addresses belong.\nEstablishing a clear identity in multiple places can help gain visibility across the ecosystem. This\nincludes setting an on-chain identity and making a known presence throughout various community\nchannels."]}),"\n",(0,n.jsx)(t.h3,{id:"setting-identity",children:"Setting Identity"}),"\n",(0,n.jsxs)(t.p,{children:["All validators should set an on-chain ",(0,n.jsx)(t.a,{href:"/docs/learn-identity#setting-an-identity",children:"identity"})," and\nget a judgement on the identity so that nominators can find nodes when browsing through various\ndashboards and UIs. When someone interacts with the chain, it ensures that an address they may come\nacross belongs to the validator, and actions of that identity throughout various parts of the\necosystem (staking, governance, block explorers, etc.) form a cohesive representation of their\nparticipation."]}),"\n",(0,n.jsx)(t.admonition,{title:"When running multiple validator nodes, the best way to scale an identity is to use multiple",type:"note",children:(0,n.jsx)(t.p,{children:"sub-identities from a single verified identity"})}),"\n",(0,n.jsx)(t.p,{children:"It's recommended to fill out as many fields in the identity as possible so Nominators have ample\nmeans of reaching out. Nominators may wish to know more about the Validator, the particular setup,\nfuture staking plans, tooling used, or several additional topics. Having a dedicated website\nadditionally to provide this sort of information is ideal."}),"\n",(0,n.jsxs)(t.admonition,{type:"note",children:[(0,n.jsxs)(t.mdxAdmonitionTitle,{children:["Ledger app on ",(0,n.jsx)(t.strong,{children:"Nano S"})," doesn't support the extrinsic for setting identity yet"]}),(0,n.jsx)(t.h3,{id:"website",children:"Website"}),(0,n.jsx)(t.p,{children:"One strategy for helping gain additional visibility is to set up a dedicated site for your\nvalidator, which includes the networks that one is a validator for and validator details such as\naddresses, commission, and so forth. Including all suggestions from this page is potential content\nto include on the site. After setting up a website, a validator should add this website to the\ncorresponding field in their identity so nominators can find it easily."}),(0,n.jsx)(t.h2,{id:"transparency--establishing-trust",children:"Transparency & Establishing Trust"}),(0,n.jsx)(t.p,{children:"Considering the risks involved for both Validators and Nominators, establishing trust is one of the\nmost essential factors in running quality validator services."}),(0,n.jsx)(t.h3,{id:"self-stake",children:"Self Stake"}),(0,n.jsxs)(t.p,{children:["Validators should have skin in the game in their operations in the form of a stake that is\nself-bonded to their validator stash. ",(0,n.jsx)(t.a,{href:"/docs/learn-offenses",children:"Slashing"})," applies to the total\nstake of a Validator, therefore having a high self-stake shows confidence in the operations. This\nhelps show commitment from the Validator as they have skin in the game and can be penalized for\nnegative actions or poor maintenance. mess up. Having very little self-stake can signal to\nnominators that they have nothing to lose in the case of failures."]}),(0,n.jsx)(t.p,{children:"Additionally, it can help nominators to get a sense of how validators manage their stakes. Defining\na self-allocation strategy is also helpful in seeing how efficiently a validator's stake can be\nutilized."}),(0,n.jsx)(t.h3,{id:"commission--rewards",children:"Commission & Rewards"}),(0,n.jsx)(t.h4,{id:"commission",children:"Commission"}),(0,n.jsx)(t.p,{children:"What does your validator charge as commission, and how did you reach this number? It can be helpful\nto be transparent about the long-term plans around the business models of running a validator,\nincluding the costs for infrastructure and person-hours involved in maintaining operations. As many\nvalidators will charge low commissions that often do not cover costs, outlining what commission is\ncharged and why can help justify higher commission rates."}),(0,n.jsxs)(t.p,{children:["Besides the current commission, it would be helpful to describe the ",(0,n.jsx)(t.em,{children:"range"})," of commission charged,\nas nominators can know what to expect if the rate goes up or down. Nominators may want to nominate a\nvalidator with a very narrow commission percent range, as this signals stability in a validator's\noperations and business plans."]}),(0,n.jsxs)(t.p,{children:['Many validators will charge 0% or near 0% commission to bootstrap themselves at first, with plans to\nraise that over time. It can be helpful to elaborate on these plans in the future. For example\n"',(0,n.jsx)(t.em,{children:"after x amount of months in the active set with 0% commission, we plan to increase it to 1%"}),'."']}),(0,n.jsx)(t.h4,{id:"rewards",children:"Rewards"}),(0,n.jsx)(t.p,{children:"Another factor to consider is that claiming rewards for both the validator and the nominator is not\nautomatic. Rewards must be claimed manually or set up in an automated way. Validators are suggested\nto claim rewards on behalf of their nominators and be transparent about how often claiming will\nhappen. A nominator may be more likely to stake with a validator that claims rewards daily instead\nof one that doesn't claim rewards at all."}),(0,n.jsx)(t.p,{children:"The following are some tools for automating reward claiming:"}),(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsx)(t.li,{children:(0,n.jsx)(t.a,{href:"https://github.com/canontech/staking-payouts",children:"staking-payouts"})}),"\n",(0,n.jsx)(t.li,{children:(0,n.jsx)(t.a,{href:"https://github.com/stakelink/substrate-payctl",children:"substrate-payctl"})}),"\n"]}),(0,n.jsx)(t.h3,{id:"validator-experience",children:"Validator Experience"}),(0,n.jsx)(t.h3,{id:"architecture",children:"Architecture"}),(0,n.jsx)(t.p,{children:"One aspect of building trust is being transparent about your validator infrastructure. If nominators\nknow that you are running a tight ship that is focused on security, they are more likely to trust\nyou compared to those that do not disclose their infrastructure."}),(0,n.jsx)(t.p,{children:"Some factors of architecture to highlight might include:"}),(0,n.jsx)(t.h4,{id:"servers",children:"Servers"}),(0,n.jsx)(t.p,{children:"Outlining how a validator runs its servers helps nominators understand how diversified a validator\nis. Does the Validator run in the cloud, on dedicated machines, in a co-located datacenter, or in a\nhome residential setup? Do they run multiple nodes on the same machine? If every validator is hosted\nin AWS, there is a risk of potential outages that cause large amounts of nodes to go offline.\nNominators may want to choose validators that have thoroughly diversified the providers they use or\nthe facilities they operate in."}),(0,n.jsx)(t.p,{children:"Additionally, how does a Validator contribute to decentralization? It can be helpful to outline\nthese efforts so that the values of a Nominator and Validator are aligned."}),(0,n.jsx)(t.p,{children:"It's also helpful to outline what kind of OS is used on these servers and what is the updating\npolicy for the software on that OS. For example, are LTS versions used? Do they use NiXOS,\ndistro-packaged libraries? Any server hardening practices, etc."}),(0,n.jsx)(t.h4,{id:"specs",children:"Specs"}),(0,n.jsx)(t.p,{children:"Are you running the recommended Standard Hardware for Polkadot? Can you ensure that machines have\nenough processing power, memory, file storage, and network connectivity? It's helpful for nominators\nto know the specs of the machines a validator uses to assess how they may perform in the network. If\na validator is running underpowered machines, they may not want to nominate them, as these can\nresult in fewer blocks produced and fewer overall rewards. In certain circumstances, more powerful\nmachines can result in higher rewards for both the Validator and their Nominators."}),(0,n.jsx)(t.h4,{id:"automation-and-orchestration-approaches-terraform-ansible-chef-puppet-kubernetes-etc",children:"Automation and orchestration approaches (Terraform, Ansible, Chef, Puppet, Kubernetes, etc.)"}),(0,n.jsx)(t.p,{children:"What kind of approach is taken for spinning up and provisioning nodes? How might you automate\nspinning up large clusters of nodes and upgrading them? Elaborating on what type of automation (or\nlack thereof) can help get a sense of how robust a validator setup is. Many everyday actions or\nroutine maintenance needs to be done, and automating this type of thing often helps mitigate human\nerrors."}),(0,n.jsx)(t.h4,{id:"network-topology",children:"Network Topology"}),(0,n.jsx)(t.p,{children:"Does the Validator node have protection against Denial of Service attacks, and if so, how is that\ndone? Outlining a desired network topology for a Validators infrastructure design will help\nNominators understand how resilient their operations are to attacks. Some things to highlight are\nthe usage of firewalls, VPNs, network segmentation, proxies, or other layers separation."}),(0,n.jsx)(t.h4,{id:"upgrading",children:"Upgrading"}),(0,n.jsxs)(t.p,{children:["Both Polkadot and Kusama releases are published.\n",(0,n.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/releases",children:"here"}),". Validators are expected to upgrade\ntheir nodes as soon as a new release comes. Although not every release is mandatory to upgrade, each\nnew release usually has bug fixes, optimizations, new features, or other beneficial changes. It's in\nthe best interest of the entire network that validators update their nodes in a timely fashion. This\nsignals to nominators that a validator is timely care about their operations and is quick to adapt\nto necessary circumstances."]}),(0,n.jsx)(t.p,{children:"It can also be helpful for Nominators to know how the Validator runs software and where they get new\nbinaries. How do they get alerted for new releases? Do they receive updates from the matrix\nchatrooms? Do they have alerts for particular GitHub activities? Do they use the Debian/RPM\npackages? Do they use the Parity-provided GitHub binaries? Do they use Parity Docker images? Do they\nmake their own Docker images? Do they build the binaries themselves? Validators often have their own\nbuild server for making binaries. If they take the extra steps to make these and do not rely on\nexternal parties, this can be seen as a plus from nominators, as it helps contribute to\ndecentralization."}),(0,n.jsx)(t.h4,{id:"logging-metrics-monitoring-and-observability",children:"Logging, metrics, monitoring, and observability"}),(0,n.jsx)(t.p,{children:"Good node operators keep tabs on how their systems are running. Observability is one of the most\ncritical aspects of understanding the performance and behavior of a node. One should be able to\noutline the efforts taken in building out monitoring and observability practices. Are Prometheus and\nGrafana set up? What types of metrics are collected and looked at? How is this done across multiple\nnodes? A quality validator may make these metrics and graphs public so that Nominators can see how\nthese nodes are running."}),(0,n.jsx)(t.h5,{id:"health-checks-and-alerting-conditions",children:"Health checks and alerting conditions"}),(0,n.jsx)(t.p,{children:"Similar to the last point, it can be helpful for nominators to know what kind of health checks and\nalerting conditions are in place for validator nodes. What conditions are not typical and may need\nto be looked at? If conditions are not specific, how is the node operator alerted to this? Are there\nany public Telegram, SMS, or email alerts? Nominators will want to know that a Validator can respond\nto abnormal conditions promptly, as their tokens are on the line of potentially being lost."}),(0,n.jsx)(t.h5,{id:"scenario-runbooks",children:"Scenario runbooks"}),(0,n.jsx)(t.p,{children:"Many scenarios happen routinely, such as upgrading nodes, restoring backups, or moving servers.\nCreating runbooks and sharing the procedures and precautions taken around these can instill\nconfidence in nominators that various scenarios are thought out and planned for."}),(0,n.jsx)(t.h5,{id:"which-regions-nodes-are-in",children:"Which regions nodes are in"}),(0,n.jsx)(t.p,{children:"A diverse network of nodes in varying different regions helps strengthen decentralized networks.\nOutlining what regions nodes are in gives clarity to this facet of networks. Nominators may want to\npromote validators that actively try to decentralize networks operating in regions in which others\ndo not run nodes."}),(0,n.jsx)(t.h5,{id:"security--key-handling-policies",children:"Security / Key handling policies"}),(0,n.jsx)(t.p,{children:"It is paramount that session keys and stash/staking proxy keys are stored and handled with the\nutmost care. If compromised, both the validator and nominator can be slashed. Outlining how keys are\nhandled, how they are stored, who has access to them, and the overall policies and procedures around\nthem is a great point of reference for nominators to gauge how comfortable they are with the\nsecurity a validator takes."}),(0,n.jsx)(t.h3,{id:"robust-communication",children:"Robust Communication"}),(0,n.jsx)(t.p,{children:"The relationship between Validators and Nominators is one built on trust, and as such, having direct\nlines of communication with Nominators is a great way to build and reinforce that trust. This could\nmean setting up dedicated Telegram / Matrix / Discord channels or hosting a reoccurring call where\nanyone can join. Creating inclusive environments with direct connections between parties is going\nthe extra mile to ensure that nominators know they're in good hands. Many updates can be given, such\nas nodes being updated to a new version, rewards being paid out, servers being migrated, new\nfeatures or tools being built, or just checking in to say hello. These kinds of gestures can be much\nappreciated in putting words and a person behind the name of someone running a server."}),(0,n.jsx)(t.h3,{id:"actively-participating-in-the-community",children:"Actively Participating in the Community"}),(0,n.jsx)(t.p,{children:"Participating in the community goes hand in hand with building a reputation. This is not only for\nNominators, but for other Validators, builders, developers, governance participants, and general\nenthusiasts. Being helpful or contributing to discussions can go a long way in building a trusted\nbrand and reputation."}),(0,n.jsx)(t.p,{children:"There are many communities to participate in, from validator, developer, and governance communities,\nto local communities dedicated to specific regions. For example, one can be pretty active in the\nSouth American communities and building camaraderie among those who speak the same language or can\nattend the same meetups in an area. One absolute best way to build trust is meeting people in\nperson."}),(0,n.jsx)(t.h4,{id:"participating-in-governance",children:"Participating in Governance"}),(0,n.jsxs)(t.p,{children:["Another way to show that one cares about the network is by actively participating in governance.\nWhether by voting on-chain, or by discussing off-chain, or proposing new things, active\nparticipation in the direction of the chain is an excellent signal that a validator is there for the\nnetwork\u2019s good. There are many ways to participate in different governance aspects, such as weighing\nin on treasury proposals, voting on public referenda, delegating voting power, and more. See the\nsection on ",(0,n.jsx)(t.a,{href:"/docs/learn-polkadot-opengov",children:"Polkadot OpenGov"})," for additional details."]}),(0,n.jsx)(t.h4,{id:"producing-educational-content",children:"Producing Educational Content"}),(0,n.jsx)(t.p,{children:"With a fast-moving ecosystem, there often are gaps in educational content where there are new\nfeatures, changes, deprecations, or just a slow-moving process for putting out information about\nvery complex concepts. Putting out educational content in the form of blog posts, videos, tutorials,\ndevelopment guides, and more (especially if it's geared toward nominators) provides tangible value\nto the ecosystem. It shows that one has a good grasp of how things work, and disseminating this\nknowledge to others can give some credence to one's brand and reputation as a competent entity in\nthe space. Furthermore, one might get tips from the treasury if the community finds something\nbeneficial."}),(0,n.jsx)(t.h4,{id:"building-tooling",children:"Building Tooling"}),(0,n.jsxs)(t.p,{children:["Building public tooling is a great way to support the ecosystem. This provides tangible value to\nthose that use this tooling and gives visibility to the validator for their contributions. A\nnominator might be more likely to nominate a validator for the utilities they provide the ecosystem\nsince the validator then can build a reputation around the quality of their work outside their\nvalidation services. Some potential building categories are block explorers, deployment scripts,\nmonitoring, observability services, staking dashboards, wallets, command-line utilities, or porting\nimplementations to other languages. Additionally, this may also be eligible to be funded via a\n",(0,n.jsx)(t.a,{href:"https://grants.web3.foundation",children:"Web3 Foundation Grant"}),"."]})]})]})}function c(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(h,{...e})}):h(e)}},28453:(e,t,i)=>{i.d(t,{R:()=>s,x:()=>r});var n=i(96540);const a={},o=n.createContext(a);function s(e){const t=n.useContext(o);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:s(e.components),n.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/3829cf1d.821958ba.js b/assets/js/3829cf1d.821958ba.js new file mode 100644 index 000000000000..444db833cbb1 --- /dev/null +++ b/assets/js/3829cf1d.821958ba.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5249],{56435:(e,t,i)=>{i.r(t),i.d(t,{assets:()=>l,contentTitle:()=>r,default:()=>c,frontMatter:()=>s,metadata:()=>n,toc:()=>d});const n=JSON.parse('{"id":"maintain/doc-maintain-guides-validator-community","title":"Validator Community Overview","description":"An extensive guide to help you start and build a validator community.","source":"@site/../docs/maintain/maintain-guides-validator-community.md","sourceDirName":"maintain","slug":"/maintain-guides-validator-community","permalink":"/docs/maintain-guides-validator-community","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/maintain/maintain-guides-validator-community.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1727167801000,"frontMatter":{"id":"doc-maintain-guides-validator-community","title":"Validator Community Overview","sidebar_label":"Validator Community Overview","description":"An extensive guide to help you start and build a validator community.","keywords":["validator","community","reputation","nominations"],"slug":"../maintain-guides-validator-community"},"sidebar":"docs","previous":{"title":"How to Stop Validating","permalink":"/docs/maintain-guides-how-to-stop-validating"},"next":{"title":"Archive","permalink":"/docs/maintain-archive"}}');var a=i(74848),o=i(28453);const s={id:"doc-maintain-guides-validator-community",title:"Validator Community Overview",sidebar_label:"Validator Community Overview",description:"An extensive guide to help you start and build a validator community.",keywords:["validator","community","reputation","nominations"],slug:"../maintain-guides-validator-community"},r=void 0,l={},d=[{value:"Building a Community and Attracting Nominations",id:"building-a-community-and-attracting-nominations",level:2},{value:"Gaining Visibility",id:"gaining-visibility",level:2},{value:"Setting Identity",id:"setting-identity",level:3},{value:"Website",id:"website",level:3},{value:"Transparency & Establishing Trust",id:"transparency--establishing-trust",level:2},{value:"Self Stake",id:"self-stake",level:3},{value:"Commission & Rewards",id:"commission--rewards",level:3},{value:"Commission",id:"commission",level:4},{value:"Rewards",id:"rewards",level:4},{value:"Validator Experience",id:"validator-experience",level:3},{value:"Architecture",id:"architecture",level:3},{value:"Servers",id:"servers",level:4},{value:"Specs",id:"specs",level:4},{value:"Automation and orchestration approaches (Terraform, Ansible, Chef, Puppet, Kubernetes, etc.)",id:"automation-and-orchestration-approaches-terraform-ansible-chef-puppet-kubernetes-etc",level:4},{value:"Network Topology",id:"network-topology",level:4},{value:"Upgrading",id:"upgrading",level:4},{value:"Logging, metrics, monitoring, and observability",id:"logging-metrics-monitoring-and-observability",level:4},{value:"Health checks and alerting conditions",id:"health-checks-and-alerting-conditions",level:5},{value:"Scenario runbooks",id:"scenario-runbooks",level:5},{value:"Which regions nodes are in",id:"which-regions-nodes-are-in",level:5},{value:"Security / Key handling policies",id:"security--key-handling-policies",level:5},{value:"Robust Communication",id:"robust-communication",level:3},{value:"Actively Participating in the Community",id:"actively-participating-in-the-community",level:3},{value:"Participating in Governance",id:"participating-in-governance",level:4},{value:"Producing Educational Content",id:"producing-educational-content",level:4},{value:"Building Tooling",id:"building-tooling",level:4}];function h(e){const t={a:"a",admonition:"admonition",em:"em",h2:"h2",h3:"h3",h4:"h4",h5:"h5",li:"li",mdxAdmonitionTitle:"mdxAdmonitionTitle",p:"p",strong:"strong",ul:"ul",...(0,o.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(t.h2,{id:"building-a-community-and-attracting-nominations",children:"Building a Community and Attracting Nominations"}),"\n",(0,a.jsxs)(t.p,{children:["After ",(0,a.jsx)(t.a,{href:"maintain-guides-how-to-validate-Polkadot",children:"setting up a validator"}),", nominations will only come\nin with extra work. The community of nominators will need to know about the validator to trust\nstaking with them, and thus the validator must distinguish themselves to attract nominations. The\nfollowing gives some general guidance on different approaches to building a community and attracting\nnominations."]}),"\n",(0,a.jsx)(t.p,{children:"Being a high-quality validator entails effectively running nodes and building a brand, reputation,\nand community around validation services. The responsibilities of a quality validator additionally\ninclude marketing oneself and participating in the greater community. Becoming a known participant\nthroughout the ecosystem is a great way to attract nominations and solidify longevity and\nsustainability as a validator."}),"\n",(0,a.jsxs)(t.p,{children:["One thing to remember is that there is a risk involved in staking for both validators and\nnominators, as both can lose up to 100% of their funds if a validator gets\n",(0,a.jsx)(t.a,{href:"/docs/learn-offenses",children:"slashed"}),". This means it is paramount for nominators only to nominate\nvalidators that they trust, as well as for validators to do their best to instill confidence in\ntheir ability to provide validation services. Validators should do their best to build a reputation\nthrough many different means, as this is one of the most important factors in how nominators should\npick whom they stake with."]}),"\n",(0,a.jsx)(t.h2,{id:"gaining-visibility",children:"Gaining Visibility"}),"\n",(0,a.jsxs)(t.p,{children:["Nominators should be able to know whom they are staking with. If nominators stake with a bunch of\npseudo-anonymous addresses because it seems profitable, they expose themselves to more risks than\nnominating validators that follow best practices to whom they ",(0,a.jsx)(t.em,{children:"know"})," the addresses belong.\nEstablishing a clear identity in multiple places can help gain visibility across the ecosystem. This\nincludes setting an on-chain identity and making a known presence throughout various community\nchannels."]}),"\n",(0,a.jsx)(t.h3,{id:"setting-identity",children:"Setting Identity"}),"\n",(0,a.jsxs)(t.p,{children:["All validators should set an on-chain ",(0,a.jsx)(t.a,{href:"/docs/learn-identity#setting-an-identity",children:"identity"})," and\nget a judgement on the identity so that nominators can find nodes when browsing through various\ndashboards and UIs. When someone interacts with the chain, it ensures that an address they may come\nacross belongs to the validator, and actions of that identity throughout various parts of the\necosystem (staking, governance, block explorers, etc.) form a cohesive representation of their\nparticipation."]}),"\n",(0,a.jsx)(t.admonition,{title:"When running multiple validator nodes, the best way to scale an identity is to use multiple",type:"note",children:(0,a.jsx)(t.p,{children:"sub-identities from a single verified identity"})}),"\n",(0,a.jsx)(t.p,{children:"It's recommended to fill out as many fields in the identity as possible so Nominators have ample\nmeans of reaching out. Nominators may wish to know more about the Validator, the particular setup,\nfuture staking plans, tooling used, or several additional topics. Having a dedicated website\nadditionally to provide this sort of information is ideal."}),"\n",(0,a.jsxs)(t.admonition,{type:"note",children:[(0,a.jsxs)(t.mdxAdmonitionTitle,{children:["Ledger app on ",(0,a.jsx)(t.strong,{children:"Nano S"})," doesn't support the extrinsic for setting identity yet"]}),(0,a.jsx)(t.h3,{id:"website",children:"Website"}),(0,a.jsx)(t.p,{children:"One strategy for helping gain additional visibility is to set up a dedicated site for your\nvalidator, which includes the networks that one is a validator for and validator details such as\naddresses, commission, and so forth. Including all suggestions from this page is potential content\nto include on the site. After setting up a website, a validator should add this website to the\ncorresponding field in their identity so nominators can find it easily."}),(0,a.jsx)(t.h2,{id:"transparency--establishing-trust",children:"Transparency & Establishing Trust"}),(0,a.jsx)(t.p,{children:"Considering the risks involved for both Validators and Nominators, establishing trust is one of the\nmost essential factors in running quality validator services."}),(0,a.jsx)(t.h3,{id:"self-stake",children:"Self Stake"}),(0,a.jsxs)(t.p,{children:["Validators should have skin in the game in their operations in the form of a stake that is\nself-bonded to their validator stash. ",(0,a.jsx)(t.a,{href:"/docs/learn-offenses",children:"Slashing"})," applies to the total\nstake of a Validator, therefore having a high self-stake shows confidence in the operations. This\nhelps show commitment from the Validator as they have skin in the game and can be penalized for\nnegative actions or poor maintenance. mess up. Having very little self-stake can signal to\nnominators that they have nothing to lose in the case of failures."]}),(0,a.jsx)(t.p,{children:"Additionally, it can help nominators to get a sense of how validators manage their stakes. Defining\na self-allocation strategy is also helpful in seeing how efficiently a validator's stake can be\nutilized."}),(0,a.jsx)(t.h3,{id:"commission--rewards",children:"Commission & Rewards"}),(0,a.jsx)(t.h4,{id:"commission",children:"Commission"}),(0,a.jsx)(t.p,{children:"What does your validator charge as commission, and how did you reach this number? It can be helpful\nto be transparent about the long-term plans around the business models of running a validator,\nincluding the costs for infrastructure and person-hours involved in maintaining operations. As many\nvalidators will charge low commissions that often do not cover costs, outlining what commission is\ncharged and why can help justify higher commission rates."}),(0,a.jsxs)(t.p,{children:["Besides the current commission, it would be helpful to describe the ",(0,a.jsx)(t.em,{children:"range"})," of commission charged,\nas nominators can know what to expect if the rate goes up or down. Nominators may want to nominate a\nvalidator with a very narrow commission percent range, as this signals stability in a validator's\noperations and business plans."]}),(0,a.jsxs)(t.p,{children:['Many validators will charge 0% or near 0% commission to bootstrap themselves at first, with plans to\nraise that over time. It can be helpful to elaborate on these plans in the future. For example\n"',(0,a.jsx)(t.em,{children:"after x amount of months in the active set with 0% commission, we plan to increase it to 1%"}),'."']}),(0,a.jsx)(t.h4,{id:"rewards",children:"Rewards"}),(0,a.jsx)(t.p,{children:"Another factor to consider is that claiming rewards for both the validator and the nominator is not\nautomatic. Rewards must be claimed manually or set up in an automated way. Validators are suggested\nto claim rewards on behalf of their nominators and be transparent about how often claiming will\nhappen. A nominator may be more likely to stake with a validator that claims rewards daily instead\nof one that doesn't claim rewards at all."}),(0,a.jsx)(t.p,{children:"The following are some tools for automating reward claiming:"}),(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsx)(t.li,{children:(0,a.jsx)(t.a,{href:"https://github.com/canontech/staking-payouts",children:"staking-payouts"})}),"\n",(0,a.jsx)(t.li,{children:(0,a.jsx)(t.a,{href:"https://github.com/stakelink/substrate-payctl",children:"substrate-payctl"})}),"\n"]}),(0,a.jsx)(t.h3,{id:"validator-experience",children:"Validator Experience"}),(0,a.jsx)(t.h3,{id:"architecture",children:"Architecture"}),(0,a.jsx)(t.p,{children:"One aspect of building trust is being transparent about your validator infrastructure. If nominators\nknow that you are running a tight ship that is focused on security, they are more likely to trust\nyou compared to those that do not disclose their infrastructure."}),(0,a.jsx)(t.p,{children:"Some factors of architecture to highlight might include:"}),(0,a.jsx)(t.h4,{id:"servers",children:"Servers"}),(0,a.jsx)(t.p,{children:"Outlining how a validator runs its servers helps nominators understand how diversified a validator\nis. Does the Validator run in the cloud, on dedicated machines, in a co-located datacenter, or in a\nhome residential setup? Do they run multiple nodes on the same machine? If every validator is hosted\nin AWS, there is a risk of potential outages that cause large amounts of nodes to go offline.\nNominators may want to choose validators that have thoroughly diversified the providers they use or\nthe facilities they operate in."}),(0,a.jsx)(t.p,{children:"Additionally, how does a Validator contribute to decentralization? It can be helpful to outline\nthese efforts so that the values of a Nominator and Validator are aligned."}),(0,a.jsx)(t.p,{children:"It's also helpful to outline what kind of OS is used on these servers and what is the updating\npolicy for the software on that OS. For example, are LTS versions used? Do they use NiXOS,\ndistro-packaged libraries? Any server hardening practices, etc."}),(0,a.jsx)(t.h4,{id:"specs",children:"Specs"}),(0,a.jsx)(t.p,{children:"Are you running the recommended Standard Hardware for Polkadot? Can you ensure that machines have\nenough processing power, memory, file storage, and network connectivity? It's helpful for nominators\nto know the specs of the machines a validator uses to assess how they may perform in the network. If\na validator is running underpowered machines, they may not want to nominate them, as these can\nresult in fewer blocks produced and fewer overall rewards. In certain circumstances, more powerful\nmachines can result in higher rewards for both the Validator and their Nominators."}),(0,a.jsx)(t.h4,{id:"automation-and-orchestration-approaches-terraform-ansible-chef-puppet-kubernetes-etc",children:"Automation and orchestration approaches (Terraform, Ansible, Chef, Puppet, Kubernetes, etc.)"}),(0,a.jsx)(t.p,{children:"What kind of approach is taken for spinning up and provisioning nodes? How might you automate\nspinning up large clusters of nodes and upgrading them? Elaborating on what type of automation (or\nlack thereof) can help get a sense of how robust a validator setup is. Many everyday actions or\nroutine maintenance needs to be done, and automating this type of thing often helps mitigate human\nerrors."}),(0,a.jsx)(t.h4,{id:"network-topology",children:"Network Topology"}),(0,a.jsx)(t.p,{children:"Does the Validator node have protection against Denial of Service attacks, and if so, how is that\ndone? Outlining a desired network topology for a Validators infrastructure design will help\nNominators understand how resilient their operations are to attacks. Some things to highlight are\nthe usage of firewalls, VPNs, network segmentation, proxies, or other layers separation."}),(0,a.jsx)(t.h4,{id:"upgrading",children:"Upgrading"}),(0,a.jsxs)(t.p,{children:["Both Polkadot and Kusama releases are published.\n",(0,a.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/releases",children:"here"}),". Validators are expected to upgrade\ntheir nodes as soon as a new release comes. Although not every release is mandatory to upgrade, each\nnew release usually has bug fixes, optimizations, new features, or other beneficial changes. It's in\nthe best interest of the entire network that validators update their nodes in a timely fashion. This\nsignals to nominators that a validator is timely care about their operations and is quick to adapt\nto necessary circumstances."]}),(0,a.jsx)(t.p,{children:"It can also be helpful for Nominators to know how the Validator runs software and where they get new\nbinaries. How do they get alerted for new releases? Do they receive updates from the matrix\nchatrooms? Do they have alerts for particular GitHub activities? Do they use the Debian/RPM\npackages? Do they use the Parity-provided GitHub binaries? Do they use Parity Docker images? Do they\nmake their own Docker images? Do they build the binaries themselves? Validators often have their own\nbuild server for making binaries. If they take the extra steps to make these and do not rely on\nexternal parties, this can be seen as a plus from nominators, as it helps contribute to\ndecentralization."}),(0,a.jsx)(t.h4,{id:"logging-metrics-monitoring-and-observability",children:"Logging, metrics, monitoring, and observability"}),(0,a.jsx)(t.p,{children:"Good node operators keep tabs on how their systems are running. Observability is one of the most\ncritical aspects of understanding the performance and behavior of a node. One should be able to\noutline the efforts taken in building out monitoring and observability practices. Are Prometheus and\nGrafana set up? What types of metrics are collected and looked at? How is this done across multiple\nnodes? A quality validator may make these metrics and graphs public so that Nominators can see how\nthese nodes are running."}),(0,a.jsx)(t.h5,{id:"health-checks-and-alerting-conditions",children:"Health checks and alerting conditions"}),(0,a.jsx)(t.p,{children:"Similar to the last point, it can be helpful for nominators to know what kind of health checks and\nalerting conditions are in place for validator nodes. What conditions are not typical and may need\nto be looked at? If conditions are not specific, how is the node operator alerted to this? Are there\nany public Telegram, SMS, or email alerts? Nominators will want to know that a Validator can respond\nto abnormal conditions promptly, as their tokens are on the line of potentially being lost."}),(0,a.jsx)(t.h5,{id:"scenario-runbooks",children:"Scenario runbooks"}),(0,a.jsx)(t.p,{children:"Many scenarios happen routinely, such as upgrading nodes, restoring backups, or moving servers.\nCreating runbooks and sharing the procedures and precautions taken around these can instill\nconfidence in nominators that various scenarios are thought out and planned for."}),(0,a.jsx)(t.h5,{id:"which-regions-nodes-are-in",children:"Which regions nodes are in"}),(0,a.jsx)(t.p,{children:"A diverse network of nodes in varying different regions helps strengthen decentralized networks.\nOutlining what regions nodes are in gives clarity to this facet of networks. Nominators may want to\npromote validators that actively try to decentralize networks operating in regions in which others\ndo not run nodes."}),(0,a.jsx)(t.h5,{id:"security--key-handling-policies",children:"Security / Key handling policies"}),(0,a.jsx)(t.p,{children:"It is paramount that session keys and stash/staking proxy keys are stored and handled with the\nutmost care. If compromised, both the validator and nominator can be slashed. Outlining how keys are\nhandled, how they are stored, who has access to them, and the overall policies and procedures around\nthem is a great point of reference for nominators to gauge how comfortable they are with the\nsecurity a validator takes."}),(0,a.jsx)(t.h3,{id:"robust-communication",children:"Robust Communication"}),(0,a.jsx)(t.p,{children:"The relationship between Validators and Nominators is one built on trust, and as such, having direct\nlines of communication with Nominators is a great way to build and reinforce that trust. This could\nmean setting up dedicated Telegram / Matrix / Discord channels or hosting a reoccurring call where\nanyone can join. Creating inclusive environments with direct connections between parties is going\nthe extra mile to ensure that nominators know they're in good hands. Many updates can be given, such\nas nodes being updated to a new version, rewards being paid out, servers being migrated, new\nfeatures or tools being built, or just checking in to say hello. These kinds of gestures can be much\nappreciated in putting words and a person behind the name of someone running a server."}),(0,a.jsx)(t.h3,{id:"actively-participating-in-the-community",children:"Actively Participating in the Community"}),(0,a.jsx)(t.p,{children:"Participating in the community goes hand in hand with building a reputation. This is not only for\nNominators, but for other Validators, builders, developers, governance participants, and general\nenthusiasts. Being helpful or contributing to discussions can go a long way in building a trusted\nbrand and reputation."}),(0,a.jsx)(t.p,{children:"There are many communities to participate in, from validator, developer, and governance communities,\nto local communities dedicated to specific regions. For example, one can be pretty active in the\nSouth American communities and building camaraderie among those who speak the same language or can\nattend the same meetups in an area. One absolute best way to build trust is meeting people in\nperson."}),(0,a.jsx)(t.h4,{id:"participating-in-governance",children:"Participating in Governance"}),(0,a.jsxs)(t.p,{children:["Another way to show that one cares about the network is by actively participating in governance.\nWhether by voting on-chain, or by discussing off-chain, or proposing new things, active\nparticipation in the direction of the chain is an excellent signal that a validator is there for the\nnetwork\u2019s good. There are many ways to participate in different governance aspects, such as weighing\nin on treasury proposals, voting on public referenda, delegating voting power, and more. See the\nsection on ",(0,a.jsx)(t.a,{href:"/docs/learn-polkadot-opengov",children:"Polkadot OpenGov"})," for additional details."]}),(0,a.jsx)(t.h4,{id:"producing-educational-content",children:"Producing Educational Content"}),(0,a.jsx)(t.p,{children:"With a fast-moving ecosystem, there often are gaps in educational content where there are new\nfeatures, changes, deprecations, or just a slow-moving process for putting out information about\nvery complex concepts. Putting out educational content in the form of blog posts, videos, tutorials,\ndevelopment guides, and more (especially if it's geared toward nominators) provides tangible value\nto the ecosystem. It shows that one has a good grasp of how things work, and disseminating this\nknowledge to others can give some credence to one's brand and reputation as a competent entity in\nthe space. Furthermore, one might get tips from the treasury if the community finds something\nbeneficial."}),(0,a.jsx)(t.h4,{id:"building-tooling",children:"Building Tooling"}),(0,a.jsxs)(t.p,{children:["Building public tooling is a great way to support the ecosystem. This provides tangible value to\nthose that use this tooling and gives visibility to the validator for their contributions. A\nnominator might be more likely to nominate a validator for the utilities they provide the ecosystem\nsince the validator then can build a reputation around the quality of their work outside their\nvalidation services. Some potential building categories are block explorers, deployment scripts,\nmonitoring, observability services, staking dashboards, wallets, command-line utilities, or porting\nimplementations to other languages. Additionally, this may also be eligible to be funded via a\n",(0,a.jsx)(t.a,{href:"https://grants.web3.foundation",children:"Web3 Foundation Grant"}),"."]})]})]})}function c(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,a.jsx)(t,{...e,children:(0,a.jsx)(h,{...e})}):h(e)}},28453:(e,t,i)=>{i.d(t,{R:()=>s,x:()=>r});var n=i(96540);const a={},o=n.createContext(a);function s(e){const t=n.useContext(o);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:s(e.components),n.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/3840.92eacc9b.js b/assets/js/3840.92eacc9b.js new file mode 100644 index 000000000000..e9253dffdcc3 --- /dev/null +++ b/assets/js/3840.92eacc9b.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3840],{37981:(t,e,r)=>{r.d(e,{T:()=>f});var s=r(39142),a=r(89610),i=r(27422),n=r(94092),o=r(66401),l=r(8058),c=r(69592),d=r(13588),h=r(24326),g=r(99902),u=r(53533);const p=(0,h.A)((function(t){return(0,g.A)((0,d.A)(t,1,u.A,!0))}));var y=r(38207),b=r(89463),x="\0";class f{constructor(t={}){this._isDirected=!Object.prototype.hasOwnProperty.call(t,"directed")||t.directed,this._isMultigraph=!!Object.prototype.hasOwnProperty.call(t,"multigraph")&&t.multigraph,this._isCompound=!!Object.prototype.hasOwnProperty.call(t,"compound")&&t.compound,this._label=void 0,this._defaultNodeLabelFn=s.A(void 0),this._defaultEdgeLabelFn=s.A(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[x]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(t){return this._label=t,this}graph(){return this._label}setDefaultNodeLabel(t){return a.A(t)||(t=s.A(t)),this._defaultNodeLabelFn=t,this}nodeCount(){return this._nodeCount}nodes(){return i.A(this._nodes)}sources(){var t=this;return n.A(this.nodes(),(function(e){return o.A(t._in[e])}))}sinks(){var t=this;return n.A(this.nodes(),(function(e){return o.A(t._out[e])}))}setNodes(t,e){var r=arguments,s=this;return l.A(t,(function(t){r.length>1?s.setNode(t,e):s.setNode(t)})),this}setNode(t,e){return Object.prototype.hasOwnProperty.call(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=e),this):(this._nodes[t]=arguments.length>1?e:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=x,this._children[t]={},this._children[x][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)}node(t){return this._nodes[t]}hasNode(t){return Object.prototype.hasOwnProperty.call(this._nodes,t)}removeNode(t){if(Object.prototype.hasOwnProperty.call(this._nodes,t)){var e=t=>this.removeEdge(this._edgeObjs[t]);delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],l.A(this.children(t),(t=>{this.setParent(t)})),delete this._children[t]),l.A(i.A(this._in[t]),e),delete this._in[t],delete this._preds[t],l.A(i.A(this._out[t]),e),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this}setParent(t,e){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(c.A(e))e=x;else{for(var r=e+="";!c.A(r);r=this.parent(r))if(r===t)throw new Error("Setting "+e+" as parent of "+t+" would create a cycle");this.setNode(e)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=e,this._children[e][t]=!0,this}_removeFromParentsChildList(t){delete this._children[this._parent[t]][t]}parent(t){if(this._isCompound){var e=this._parent[t];if(e!==x)return e}}children(t){if(c.A(t)&&(t=x),this._isCompound){var e=this._children[t];if(e)return i.A(e)}else{if(t===x)return this.nodes();if(this.hasNode(t))return[]}}predecessors(t){var e=this._preds[t];if(e)return i.A(e)}successors(t){var e=this._sucs[t];if(e)return i.A(e)}neighbors(t){var e=this.predecessors(t);if(e)return p(e,this.successors(t))}isLeaf(t){return 0===(this.isDirected()?this.successors(t):this.neighbors(t)).length}filterNodes(t){var e=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});e.setGraph(this.graph());var r=this;l.A(this._nodes,(function(r,s){t(s)&&e.setNode(s,r)})),l.A(this._edgeObjs,(function(t){e.hasNode(t.v)&&e.hasNode(t.w)&&e.setEdge(t,r.edge(t))}));var s={};function a(t){var i=r.parent(t);return void 0===i||e.hasNode(i)?(s[t]=i,i):i in s?s[i]:a(i)}return this._isCompound&&l.A(e.nodes(),(function(t){e.setParent(t,a(t))})),e}setDefaultEdgeLabel(t){return a.A(t)||(t=s.A(t)),this._defaultEdgeLabelFn=t,this}edgeCount(){return this._edgeCount}edges(){return y.A(this._edgeObjs)}setPath(t,e){var r=this,s=arguments;return b.A(t,(function(t,a){return s.length>1?r.setEdge(t,a,e):r.setEdge(t,a),a})),this}setEdge(){var t,e,r,s,a=!1,i=arguments[0];"object"==typeof i&&null!==i&&"v"in i?(t=i.v,e=i.w,r=i.name,2===arguments.length&&(s=arguments[1],a=!0)):(t=i,e=arguments[1],r=arguments[3],arguments.length>2&&(s=arguments[2],a=!0)),t=""+t,e=""+e,c.A(r)||(r=""+r);var n=_(this._isDirected,t,e,r);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,n))return a&&(this._edgeLabels[n]=s),this;if(!c.A(r)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(e),this._edgeLabels[n]=a?s:this._defaultEdgeLabelFn(t,e,r);var o=function(t,e,r,s){var a=""+e,i=""+r;if(!t&&a>i){var n=a;a=i,i=n}var o={v:a,w:i};s&&(o.name=s);return o}(this._isDirected,t,e,r);return t=o.v,e=o.w,Object.freeze(o),this._edgeObjs[n]=o,m(this._preds[e],t),m(this._sucs[t],e),this._in[e][n]=o,this._out[t][n]=o,this._edgeCount++,this}edge(t,e,r){var s=1===arguments.length?L(this._isDirected,arguments[0]):_(this._isDirected,t,e,r);return this._edgeLabels[s]}hasEdge(t,e,r){var s=1===arguments.length?L(this._isDirected,arguments[0]):_(this._isDirected,t,e,r);return Object.prototype.hasOwnProperty.call(this._edgeLabels,s)}removeEdge(t,e,r){var s=1===arguments.length?L(this._isDirected,arguments[0]):_(this._isDirected,t,e,r),a=this._edgeObjs[s];return a&&(t=a.v,e=a.w,delete this._edgeLabels[s],delete this._edgeObjs[s],w(this._preds[e],t),w(this._sucs[t],e),delete this._in[e][s],delete this._out[t][s],this._edgeCount--),this}inEdges(t,e){var r=this._in[t];if(r){var s=y.A(r);return e?n.A(s,(function(t){return t.v===e})):s}}outEdges(t,e){var r=this._out[t];if(r){var s=y.A(r);return e?n.A(s,(function(t){return t.w===e})):s}}nodeEdges(t,e){var r=this.inEdges(t,e);if(r)return r.concat(this.outEdges(t,e))}}function m(t,e){t[e]?t[e]++:t[e]=1}function w(t,e){--t[e]||delete t[e]}function _(t,e,r,s){var a=""+e,i=""+r;if(!t&&a>i){var n=a;a=i,i=n}return a+"\x01"+i+"\x01"+(c.A(s)?"\0":s)}function L(t,e){return _(t,e.v,e.w,e.name)}f.prototype._nodeCount=0,f.prototype._edgeCount=0},697:(t,e,r)=>{r.d(e,{T:()=>s.T});var s=r(37981)},75937:(t,e,r)=>{r.d(e,{A:()=>i});var s=r(72453),a=r(74886);const i=(t,e)=>s.A.lang.round(a.A.parse(t)[e])},50053:(t,e,r)=>{r.d(e,{A:()=>a});var s=r(68675);const a=function(t){return(0,s.A)(t,4)}},53840:(t,e,r)=>{r.d(e,{diagram:()=>fe});var s=r(52294),a=r(62392),i=r(86825),n=r(85039),o=r(45567),l=r(50053),c=r(75937),d=r(25582),h=r(20007),g=r(697),u=function(){var t=(0,o.K2)((function(t,e,r,s){for(r=r||{},s=t.length;s--;r[t[s]]=e);return r}),"o"),e=[1,7],r=[1,13],s=[1,14],a=[1,15],i=[1,19],n=[1,16],l=[1,17],c=[1,18],d=[8,30],h=[8,21,28,29,30,31,32,40,44,47],g=[1,23],u=[1,24],p=[8,15,16,21,28,29,30,31,32,40,44,47],y=[8,15,16,21,27,28,29,30,31,32,40,44,47],b=[1,49],x={trace:(0,o.K2)((function(){}),"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,block:31,NODE_ID:32,nodeShapeNLabel:33,dirList:34,DIR:35,NODE_DSTART:36,NODE_DEND:37,BLOCK_ARROW_START:38,BLOCK_ARROW_END:39,classDef:40,CLASSDEF_ID:41,CLASSDEF_STYLEOPTS:42,DEFAULT:43,class:44,CLASSENTITY_IDS:45,STYLECLASS:46,style:47,STYLE_ENTITY_IDS:48,STYLE_DEFINITION_DATA:49,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"block",32:"NODE_ID",35:"DIR",36:"NODE_DSTART",37:"NODE_DEND",38:"BLOCK_ARROW_START",39:"BLOCK_ARROW_END",40:"classDef",41:"CLASSDEF_ID",42:"CLASSDEF_STYLEOPTS",43:"DEFAULT",44:"class",45:"CLASSENTITY_IDS",46:"STYLECLASS",47:"style",48:"STYLE_ENTITY_IDS",49:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[34,1],[34,2],[33,3],[33,4],[23,3],[23,3],[24,3],[25,3]],performAction:(0,o.K2)((function(t,e,r,s,a,i,n){var o=i.length-1;switch(a){case 4:s.getLogger().debug("Rule: separator (NL) ");break;case 5:s.getLogger().debug("Rule: separator (Space) ");break;case 6:s.getLogger().debug("Rule: separator (EOF) ");break;case 7:s.getLogger().debug("Rule: hierarchy: ",i[o-1]),s.setHierarchy(i[o-1]);break;case 8:s.getLogger().debug("Stop NL ");break;case 9:s.getLogger().debug("Stop EOF ");break;case 10:s.getLogger().debug("Stop NL2 ");break;case 11:s.getLogger().debug("Stop EOF2 ");break;case 12:s.getLogger().debug("Rule: statement: ",i[o]),"number"==typeof i[o].length?this.$=i[o]:this.$=[i[o]];break;case 13:s.getLogger().debug("Rule: statement #2: ",i[o-1]),this.$=[i[o-1]].concat(i[o]);break;case 14:s.getLogger().debug("Rule: link: ",i[o],t),this.$={edgeTypeStr:i[o],label:""};break;case 15:s.getLogger().debug("Rule: LABEL link: ",i[o-3],i[o-1],i[o]),this.$={edgeTypeStr:i[o],label:i[o-1]};break;case 18:const e=parseInt(i[o]),r=s.generateId();this.$={id:r,type:"space",label:"",width:e,children:[]};break;case 23:s.getLogger().debug("Rule: (nodeStatement link node) ",i[o-2],i[o-1],i[o]," typestr: ",i[o-1].edgeTypeStr);const a=s.edgeStrToEdgeData(i[o-1].edgeTypeStr);this.$=[{id:i[o-2].id,label:i[o-2].label,type:i[o-2].type,directions:i[o-2].directions},{id:i[o-2].id+"-"+i[o].id,start:i[o-2].id,end:i[o].id,label:i[o-1].label,type:"edge",directions:i[o].directions,arrowTypeEnd:a,arrowTypeStart:"arrow_open"},{id:i[o].id,label:i[o].label,type:s.typeStr2Type(i[o].typeStr),directions:i[o].directions}];break;case 24:s.getLogger().debug("Rule: nodeStatement (abc88 node size) ",i[o-1],i[o]),this.$={id:i[o-1].id,label:i[o-1].label,type:s.typeStr2Type(i[o-1].typeStr),directions:i[o-1].directions,widthInColumns:parseInt(i[o],10)};break;case 25:s.getLogger().debug("Rule: nodeStatement (node) ",i[o]),this.$={id:i[o].id,label:i[o].label,type:s.typeStr2Type(i[o].typeStr),directions:i[o].directions,widthInColumns:1};break;case 26:s.getLogger().debug("APA123",this?this:"na"),s.getLogger().debug("COLUMNS: ",i[o]),this.$={type:"column-setting",columns:"auto"===i[o]?-1:parseInt(i[o])};break;case 27:s.getLogger().debug("Rule: id-block statement : ",i[o-2],i[o-1]);s.generateId();this.$={...i[o-2],type:"composite",children:i[o-1]};break;case 28:s.getLogger().debug("Rule: blockStatement : ",i[o-2],i[o-1],i[o]);const n=s.generateId();this.$={id:n,type:"composite",label:"",children:i[o-1]};break;case 29:s.getLogger().debug("Rule: node (NODE_ID separator): ",i[o]),this.$={id:i[o]};break;case 30:s.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",i[o-1],i[o]),this.$={id:i[o-1],label:i[o].label,typeStr:i[o].typeStr,directions:i[o].directions};break;case 31:s.getLogger().debug("Rule: dirList: ",i[o]),this.$=[i[o]];break;case 32:s.getLogger().debug("Rule: dirList: ",i[o-1],i[o]),this.$=[i[o-1]].concat(i[o]);break;case 33:s.getLogger().debug("Rule: nodeShapeNLabel: ",i[o-2],i[o-1],i[o]),this.$={typeStr:i[o-2]+i[o],label:i[o-1]};break;case 34:s.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",i[o-3],i[o-2]," #3:",i[o-1],i[o]),this.$={typeStr:i[o-3]+i[o],label:i[o-2],directions:i[o-1]};break;case 35:case 36:this.$={type:"classDef",id:i[o-1].trim(),css:i[o].trim()};break;case 37:this.$={type:"applyClass",id:i[o-1].trim(),styleClass:i[o].trim()};break;case 38:this.$={type:"applyStyles",id:i[o-1].trim(),stylesStr:i[o].trim()}}}),"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{11:3,13:4,19:5,20:6,21:e,22:8,23:9,24:10,25:11,26:12,28:r,29:s,31:a,32:i,40:n,44:l,47:c},{8:[1,20]},t(d,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,21:e,28:r,29:s,31:a,32:i,40:n,44:l,47:c}),t(h,[2,16],{14:22,15:g,16:u}),t(h,[2,17]),t(h,[2,18]),t(h,[2,19]),t(h,[2,20]),t(h,[2,21]),t(h,[2,22]),t(p,[2,25],{27:[1,25]}),t(h,[2,26]),{19:26,26:12,32:i},{11:27,13:4,19:5,20:6,21:e,22:8,23:9,24:10,25:11,26:12,28:r,29:s,31:a,32:i,40:n,44:l,47:c},{41:[1,28],43:[1,29]},{45:[1,30]},{48:[1,31]},t(y,[2,29],{33:32,36:[1,33],38:[1,34]}),{1:[2,7]},t(d,[2,13]),{26:35,32:i},{32:[2,14]},{17:[1,36]},t(p,[2,24]),{11:37,13:4,14:22,15:g,16:u,19:5,20:6,21:e,22:8,23:9,24:10,25:11,26:12,28:r,29:s,31:a,32:i,40:n,44:l,47:c},{30:[1,38]},{42:[1,39]},{42:[1,40]},{46:[1,41]},{49:[1,42]},t(y,[2,30]),{18:[1,43]},{18:[1,44]},t(p,[2,23]),{18:[1,45]},{30:[1,46]},t(h,[2,28]),t(h,[2,35]),t(h,[2,36]),t(h,[2,37]),t(h,[2,38]),{37:[1,47]},{34:48,35:b},{15:[1,50]},t(h,[2,27]),t(y,[2,33]),{39:[1,51]},{34:52,35:b,39:[2,31]},{32:[2,15]},t(y,[2,34]),{39:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:(0,o.K2)((function(t,e){if(!e.recoverable){var r=new Error(t);throw r.hash=e,r}this.trace(t)}),"parseError"),parse:(0,o.K2)((function(t){var e=this,r=[0],s=[],a=[null],i=[],n=this.table,l="",c=0,d=0,h=0,g=i.slice.call(arguments,1),u=Object.create(this.lexer),p={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(p.yy[y]=this.yy[y]);u.setInput(t,p.yy),p.yy.lexer=u,p.yy.parser=this,void 0===u.yylloc&&(u.yylloc={});var b=u.yylloc;i.push(b);var x=u.options&&u.options.ranges;function f(){var t;return"number"!=typeof(t=s.pop()||u.lex()||1)&&(t instanceof Array&&(t=(s=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,o.K2)((function(t){r.length=r.length-2*t,a.length=a.length-t,i.length=i.length-t}),"popStack"),(0,o.K2)(f,"lex");for(var m,w,_,L,k,S,v,E,D,C={};;){if(_=r[r.length-1],this.defaultActions[_]?L=this.defaultActions[_]:(null==m&&(m=f()),L=n[_]&&n[_][m]),void 0===L||!L.length||!L[0]){var R="";for(S in D=[],n[_])this.terminals_[S]&&S>2&&D.push("'"+this.terminals_[S]+"'");R=u.showPosition?"Parse error on line "+(c+1)+":\n"+u.showPosition()+"\nExpecting "+D.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(R,{text:u.match,token:this.terminals_[m]||m,line:u.yylineno,loc:b,expected:D})}if(L[0]instanceof Array&&L.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_+", token: "+m);switch(L[0]){case 1:r.push(m),a.push(u.yytext),i.push(u.yylloc),r.push(L[1]),m=null,w?(m=w,w=null):(d=u.yyleng,l=u.yytext,c=u.yylineno,b=u.yylloc,h>0&&h--);break;case 2:if(v=this.productions_[L[1]][1],C.$=a[a.length-v],C._$={first_line:i[i.length-(v||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(v||1)].first_column,last_column:i[i.length-1].last_column},x&&(C._$.range=[i[i.length-(v||1)].range[0],i[i.length-1].range[1]]),void 0!==(k=this.performAction.apply(C,[l,d,c,p.yy,L[1],a,i].concat(g))))return k;v&&(r=r.slice(0,-1*v*2),a=a.slice(0,-1*v),i=i.slice(0,-1*v)),r.push(this.productions_[L[1]][0]),a.push(C.$),i.push(C._$),E=n[r[r.length-2]][r[r.length-1]],r.push(E);break;case 3:return!0}}return!0}),"parse")},f=function(){return{EOF:1,parseError:(0,o.K2)((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:(0,o.K2)((function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this}),"setInput"),input:(0,o.K2)((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t}),"input"),unput:(0,o.K2)((function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var s=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1);var a=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===s.length?this.yylloc.first_column:0)+s[s.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[a[0],a[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"unput"),more:(0,o.K2)((function(){return this._more=!0,this}),"more"),reject:(0,o.K2)((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:(0,o.K2)((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:(0,o.K2)((function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:(0,o.K2)((function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:(0,o.K2)((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:(0,o.K2)((function(t,e){var r,s,a;if(this.options.backtrack_lexer&&(a={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(a.yylloc.range=this.yylloc.range.slice(0))),(s=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=s.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:s?s[s.length-1].length-s[s.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var i in a)this[i]=a[i];return!1}return!1}),"test_match"),next:(0,o.K2)((function(){if(this.done)return this.EOF;var t,e,r,s;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var a=this._currentRules(),i=0;ie[0].length)){if(e=r,s=i,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,a[i])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,a[s]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:(0,o.K2)((function(){var t=this.next();return t||this.lex()}),"lex"),begin:(0,o.K2)((function(t){this.conditionStack.push(t)}),"begin"),popState:(0,o.K2)((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:(0,o.K2)((function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules}),"_currentRules"),topState:(0,o.K2)((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:(0,o.K2)((function(t){this.begin(t)}),"pushState"),stateStackSize:(0,o.K2)((function(){return this.conditionStack.length}),"stateStackSize"),options:{},performAction:(0,o.K2)((function(t,e,r,s){switch(r){case 0:return 10;case 1:return t.getLogger().debug("Found space-block"),31;case 2:return t.getLogger().debug("Found nl-block"),31;case 3:return t.getLogger().debug("Found space-block"),29;case 4:t.getLogger().debug(".",e.yytext);break;case 5:t.getLogger().debug("_",e.yytext);break;case 6:return 5;case 7:return e.yytext=-1,28;case 8:return e.yytext=e.yytext.replace(/columns\s+/,""),t.getLogger().debug("COLUMNS (LEX)",e.yytext),28;case 9:case 77:case 78:case 100:this.pushState("md_string");break;case 10:return"MD_STR";case 11:case 35:case 80:this.popState();break;case 12:this.pushState("string");break;case 13:t.getLogger().debug("LEX: POPPING STR:",e.yytext),this.popState();break;case 14:return t.getLogger().debug("LEX: STR end:",e.yytext),"STR";case 15:return e.yytext=e.yytext.replace(/space\:/,""),t.getLogger().debug("SPACE NUM (LEX)",e.yytext),21;case 16:return e.yytext="1",t.getLogger().debug("COLUMNS (LEX)",e.yytext),21;case 17:return 43;case 18:return"LINKSTYLE";case 19:return"INTERPOLATE";case 20:return this.pushState("CLASSDEF"),40;case 21:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 22:return this.popState(),this.pushState("CLASSDEFID"),41;case 23:return this.popState(),42;case 24:return this.pushState("CLASS"),44;case 25:return this.popState(),this.pushState("CLASS_STYLE"),45;case 26:return this.popState(),46;case 27:return this.pushState("STYLE_STMNT"),47;case 28:return this.popState(),this.pushState("STYLE_DEFINITION"),48;case 29:return this.popState(),49;case 30:return this.pushState("acc_title"),"acc_title";case 31:return this.popState(),"acc_title_value";case 32:return this.pushState("acc_descr"),"acc_descr";case 33:return this.popState(),"acc_descr_value";case 34:this.pushState("acc_descr_multiline");break;case 36:return"acc_descr_multiline_value";case 37:return 30;case 38:case 39:case 41:case 42:case 45:return this.popState(),t.getLogger().debug("Lex: (("),"NODE_DEND";case 40:return this.popState(),t.getLogger().debug("Lex: ))"),"NODE_DEND";case 43:return this.popState(),t.getLogger().debug("Lex: (-"),"NODE_DEND";case 44:return this.popState(),t.getLogger().debug("Lex: -)"),"NODE_DEND";case 46:return this.popState(),t.getLogger().debug("Lex: ]]"),"NODE_DEND";case 47:return this.popState(),t.getLogger().debug("Lex: ("),"NODE_DEND";case 48:return this.popState(),t.getLogger().debug("Lex: ])"),"NODE_DEND";case 49:case 50:return this.popState(),t.getLogger().debug("Lex: /]"),"NODE_DEND";case 51:return this.popState(),t.getLogger().debug("Lex: )]"),"NODE_DEND";case 52:return this.popState(),t.getLogger().debug("Lex: )"),"NODE_DEND";case 53:return this.popState(),t.getLogger().debug("Lex: ]>"),"NODE_DEND";case 54:return this.popState(),t.getLogger().debug("Lex: ]"),"NODE_DEND";case 55:return t.getLogger().debug("Lexa: -)"),this.pushState("NODE"),36;case 56:return t.getLogger().debug("Lexa: (-"),this.pushState("NODE"),36;case 57:return t.getLogger().debug("Lexa: ))"),this.pushState("NODE"),36;case 58:case 60:case 61:case 62:case 65:return t.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 59:return t.getLogger().debug("Lex: ((("),this.pushState("NODE"),36;case 63:return t.getLogger().debug("Lexc: >"),this.pushState("NODE"),36;case 64:return t.getLogger().debug("Lexa: (["),this.pushState("NODE"),36;case 66:case 67:case 68:case 69:case 70:case 71:case 72:return this.pushState("NODE"),36;case 73:return t.getLogger().debug("Lexa: ["),this.pushState("NODE"),36;case 74:return this.pushState("BLOCK_ARROW"),t.getLogger().debug("LEX ARR START"),38;case 75:return t.getLogger().debug("Lex: NODE_ID",e.yytext),32;case 76:return t.getLogger().debug("Lex: EOF",e.yytext),8;case 79:return"NODE_DESCR";case 81:t.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 82:t.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 83:return t.getLogger().debug("LEX: NODE_DESCR:",e.yytext),"NODE_DESCR";case 84:t.getLogger().debug("LEX POPPING"),this.popState();break;case 85:t.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 86:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (right): dir:",e.yytext),"DIR";case 87:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (left):",e.yytext),"DIR";case 88:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (x):",e.yytext),"DIR";case 89:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (y):",e.yytext),"DIR";case 90:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (up):",e.yytext),"DIR";case 91:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (down):",e.yytext),"DIR";case 92:return e.yytext="]>",t.getLogger().debug("Lex (ARROW_DIR end):",e.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";case 93:return t.getLogger().debug("Lex: LINK","#"+e.yytext+"#"),15;case 94:case 95:case 96:return t.getLogger().debug("Lex: LINK",e.yytext),15;case 97:case 98:case 99:return t.getLogger().debug("Lex: START_LINK",e.yytext),this.pushState("LLABEL"),16;case 101:return t.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";case 102:return this.popState(),t.getLogger().debug("Lex: LINK","#"+e.yytext+"#"),15;case 103:case 104:return this.popState(),t.getLogger().debug("Lex: LINK",e.yytext),15;case 105:return t.getLogger().debug("Lex: COLON",e.yytext),e.yytext=e.yytext.slice(1),27}}),"anonymous"),rules:[/^(?:block-beta\b)/,/^(?:block\s+)/,/^(?:block\n+)/,/^(?:block:)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[29],inclusive:!1},STYLE_STMNT:{rules:[28],inclusive:!1},CLASSDEFID:{rules:[23],inclusive:!1},CLASSDEF:{rules:[21,22],inclusive:!1},CLASS_STYLE:{rules:[26],inclusive:!1},CLASS:{rules:[25],inclusive:!1},LLABEL:{rules:[100,101,102,103,104],inclusive:!1},ARROW_DIR:{rules:[86,87,88,89,90,91,92],inclusive:!1},BLOCK_ARROW:{rules:[77,82,85],inclusive:!1},NODE:{rules:[38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,78,81],inclusive:!1},md_string:{rules:[10,11,79,80],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[13,14,83,84],inclusive:!1},acc_descr_multiline:{rules:[35,36],inclusive:!1},acc_descr:{rules:[33],inclusive:!1},acc_title:{rules:[31],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,12,15,16,17,18,19,20,24,27,30,32,34,37,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,93,94,95,96,97,98,99,105],inclusive:!0}}}}();function m(){this.yy={}}return x.lexer=f,(0,o.K2)(m,"Parser"),m.prototype=x,x.Parser=m,new m}();u.parser=u;var p=u,y=new Map,b=[],x=new Map,f="color",m="fill",w=(0,o.D7)(),_=new Map,L=(0,o.K2)((t=>o.Y2.sanitizeText(t,w)),"sanitizeText"),k=(0,o.K2)((function(t,e=""){let r=_.get(t);r||(r={id:t,styles:[],textStyles:[]},_.set(t,r)),null!=e&&e.split(",").forEach((t=>{const e=t.replace(/([^;]*);/,"$1").trim();if(RegExp(f).exec(t)){const t=e.replace(m,"bgFill").replace(f,m);r.textStyles.push(t)}r.styles.push(e)}))}),"addStyleClass"),S=(0,o.K2)((function(t,e=""){const r=y.get(t);null!=e&&(r.styles=e.split(","))}),"addStyle2Node"),v=(0,o.K2)((function(t,e){t.split(",").forEach((function(t){let r=y.get(t);if(void 0===r){const e=t.trim();r={id:e,type:"na",children:[]},y.set(e,r)}r.classes||(r.classes=[]),r.classes.push(e)}))}),"setCssClass"),E=(0,o.K2)(((t,e)=>{const r=t.flat(),s=[];for(const a of r)if(a.label&&(a.label=L(a.label)),"classDef"!==a.type)if("applyClass"!==a.type)if("applyStyles"!==a.type)if("column-setting"===a.type)e.columns=a.columns??-1;else if("edge"===a.type){const t=(x.get(a.id)??0)+1;x.set(a.id,t),a.id=t+"-"+a.id,b.push(a)}else{a.label||("composite"===a.type?a.label="":a.label=a.id);const t=y.get(a.id);if(void 0===t?y.set(a.id,a):("na"!==a.type&&(t.type=a.type),a.label!==a.id&&(t.label=a.label)),a.children&&E(a.children,a),"space"===a.type){const t=a.width??1;for(let e=0;e{o.Rm.debug("Clear called"),(0,o.IU)(),C={id:"root",type:"composite",children:[],columns:-1},y=new Map([["root",C]]),D=[],_=new Map,b=[],x=new Map}),"clear");function K(t){switch(o.Rm.debug("typeStr2Type",t),t){case"[]":return"square";case"()":return o.Rm.debug("we have a round"),"round";case"(())":return"circle";case">]":return"rect_left_inv_arrow";case"{}":return"diamond";case"{{}}":return"hexagon";case"([])":return"stadium";case"[[]]":return"subroutine";case"[()]":return"cylinder";case"((()))":return"doublecircle";case"[//]":return"lean_right";case"[\\\\]":return"lean_left";case"[/\\]":return"trapezoid";case"[\\/]":return"inv_trapezoid";case"<[]>":return"block_arrow";default:return"na"}}function N(t){return o.Rm.debug("typeStr2Type",t),"=="===t?"thick":"normal"}function T(t){switch(t.trim()){case"--x":return"arrow_cross";case"--o":return"arrow_circle";default:return"arrow_point"}}(0,o.K2)(K,"typeStr2Type"),(0,o.K2)(N,"edgeTypeStr2Type"),(0,o.K2)(T,"edgeStrToEdgeData");var $=0,A=(0,o.K2)((()=>($++,"id-"+Math.random().toString(36).substr(2,12)+"-"+$)),"generateId"),I=(0,o.K2)((t=>{C.children=t,E(t,C),D=C.children}),"setHierarchy"),O=(0,o.K2)((t=>{const e=y.get(t);return e?e.columns?e.columns:e.children?e.children.length:-1:-1}),"getColumns"),B=(0,o.K2)((()=>[...y.values()]),"getBlocksFlat"),z=(0,o.K2)((()=>D||[]),"getBlocks"),M=(0,o.K2)((()=>b),"getEdges"),P=(0,o.K2)((t=>y.get(t)),"getBlock"),Y=(0,o.K2)((t=>{y.set(t.id,t)}),"setBlock"),F=(0,o.K2)((()=>console),"getLogger"),j=(0,o.K2)((function(){return _}),"getClasses"),W={getConfig:(0,o.K2)((()=>(0,o.zj)().block),"getConfig"),typeStr2Type:K,edgeTypeStr2Type:N,edgeStrToEdgeData:T,getLogger:F,getBlocksFlat:B,getBlocks:z,getEdges:M,setHierarchy:I,getBlock:P,setBlock:Y,getColumns:O,getClasses:j,clear:R,generateId:A},X=(0,o.K2)(((t,e)=>{const r=c.A,s=r(t,"r"),a=r(t,"g"),i=r(t,"b");return d.A(s,a,i,e)}),"fade"),H=(0,o.K2)((t=>`.label {\n font-family: ${t.fontFamily};\n color: ${t.nodeTextColor||t.textColor};\n }\n .cluster-label text {\n fill: ${t.titleColor};\n }\n .cluster-label span,p {\n color: ${t.titleColor};\n }\n\n\n\n .label text,span,p {\n fill: ${t.nodeTextColor||t.textColor};\n color: ${t.nodeTextColor||t.textColor};\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n stroke-width: 1px;\n }\n .flowchart-label text {\n text-anchor: middle;\n }\n // .flowchart-label .text-outer-tspan {\n // text-anchor: middle;\n // }\n // .flowchart-label .text-inner-tspan {\n // text-anchor: start;\n // }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ${t.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${t.lineColor};\n stroke-width: 2.0px;\n }\n\n .flowchart-link {\n stroke: ${t.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${t.edgeLabelBackground};\n rect {\n opacity: 0.5;\n background-color: ${t.edgeLabelBackground};\n fill: ${t.edgeLabelBackground};\n }\n text-align: center;\n }\n\n /* For html labels only */\n .labelBkg {\n background-color: ${X(t.edgeLabelBackground,.5)};\n // background-color:\n }\n\n .node .cluster {\n // fill: ${X(t.mainBkg,.5)};\n fill: ${X(t.clusterBkg,.5)};\n stroke: ${X(t.clusterBorder,.2)};\n box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ${t.titleColor};\n }\n\n .cluster span,p {\n color: ${t.titleColor};\n }\n /* .cluster div {\n color: ${t.titleColor};\n } */\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ${t.fontFamily};\n font-size: 12px;\n background: ${t.tertiaryColor};\n border: 1px solid ${t.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .flowchartTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n }\n`),"getStyles"),U=(0,o.K2)(((t,e,r,s)=>{e.forEach((e=>{Z[e](t,r,s)}))}),"insertMarkers"),Z={extension:(0,o.K2)(((t,e,r)=>{o.Rm.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")}),"extension"),composition:(0,o.K2)(((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")}),"composition"),aggregation:(0,o.K2)(((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")}),"aggregation"),dependency:(0,o.K2)(((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")}),"dependency"),lollipop:(0,o.K2)(((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)}),"lollipop"),point:(0,o.K2)(((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",6).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")}),"point"),circle:(0,o.K2)(((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")}),"circle"),cross:(0,o.K2)(((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")}),"cross"),barb:(0,o.K2)(((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")}),"barb")},q=U,G=(0,o.D7)()?.block?.padding??8;function J(t,e){if(0===t||!Number.isInteger(t))throw new Error("Columns must be an integer !== 0.");if(e<0||!Number.isInteger(e))throw new Error("Position must be a non-negative integer."+e);if(t<0)return{px:e,py:0};if(1===t)return{px:0,py:e};return{px:e%t,py:Math.floor(e/t)}}(0,o.K2)(J,"calculateBlockPosition");var V=(0,o.K2)((t=>{let e=0,r=0;for(const s of t.children){const{width:a,height:i,x:n,y:l}=s.size??{width:0,height:0,x:0,y:0};o.Rm.debug("getMaxChildSize abc95 child:",s.id,"width:",a,"height:",i,"x:",n,"y:",l,s.type),"space"!==s.type&&(a>e&&(e=a/(t.widthInColumns??1)),i>r&&(r=i))}return{width:e,height:r}}),"getMaxChildSize");function Q(t,e,r=0,s=0){o.Rm.debug("setBlockSizes abc95 (start)",t.id,t?.size?.x,"block width =",t?.size,"sieblingWidth",r),t?.size?.width||(t.size={width:r,height:s,x:0,y:0});let a=0,i=0;if(t.children?.length>0){for(const r of t.children)Q(r,e);const n=V(t);a=n.width,i=n.height,o.Rm.debug("setBlockSizes abc95 maxWidth of",t.id,":s children is ",a,i);for(const e of t.children)e.size&&(o.Rm.debug(`abc95 Setting size of children of ${t.id} id=${e.id} ${a} ${i} ${JSON.stringify(e.size)}`),e.size.width=a*(e.widthInColumns??1)+G*((e.widthInColumns??1)-1),e.size.height=i,e.size.x=0,e.size.y=0,o.Rm.debug(`abc95 updating size of ${t.id} children child:${e.id} maxWidth:${a} maxHeight:${i}`));for(const r of t.children)Q(r,e,a,i);const l=t.columns??-1;let c=0;for(const e of t.children)c+=e.widthInColumns??1;let d=t.children.length;l>0&&l0?Math.min(t.children.length,l):t.children.length;if(e>0){const r=(g-e*G-G)/e;o.Rm.debug("abc95 (growing to fit) width",t.id,g,t.size?.width,r);for(const e of t.children)e.size&&(e.size.width=r)}}t.size={width:g,height:u,x:0,y:0}}o.Rm.debug("setBlockSizes abc94 (done)",t.id,t?.size?.x,t?.size?.width,t?.size?.y,t?.size?.height)}function tt(t,e){o.Rm.debug(`abc85 layout blocks (=>layoutBlocks) ${t.id} x: ${t?.size?.x} y: ${t?.size?.y} width: ${t?.size?.width}`);const r=t.columns??-1;if(o.Rm.debug("layoutBlocks columns abc95",t.id,"=>",r,t),t.children&&t.children.length>0){const s=t?.children[0]?.size?.width??0,a=t.children.length*s+(t.children.length-1)*G;o.Rm.debug("widthOfChildren 88",a,"posX");let i=0;o.Rm.debug("abc91 block?.size?.x",t.id,t?.size?.x);let n=t?.size?.x?t?.size?.x+(-t?.size?.width/2||0):-G,l=0;for(const c of t.children){const s=t;if(!c.size)continue;const{width:a,height:d}=c.size,{px:h,py:g}=J(r,i);if(g!=l&&(l=g,n=t?.size?.x?t?.size?.x+(-t?.size?.width/2||0):-G,o.Rm.debug("New row in layout for block",t.id," and child ",c.id,l)),o.Rm.debug(`abc89 layout blocks (child) id: ${c.id} Pos: ${i} (px, py) ${h},${g} (${s?.size?.x},${s?.size?.y}) parent: ${s.id} width: ${a}${G}`),s.size){const t=a/2;c.size.x=n+G+t,o.Rm.debug(`abc91 layout blocks (calc) px, pyid:${c.id} startingPos=X${n} new startingPosX${c.size.x} ${t} padding=${G} width=${a} halfWidth=${t} => x:${c.size.x} y:${c.size.y} ${c.widthInColumns} (width * (child?.w || 1)) / 2 ${a*(c?.widthInColumns??1)/2}`),n=c.size.x+t,c.size.y=s.size.y-s.size.height/2+g*(d+G)+d/2+G,o.Rm.debug(`abc88 layout blocks (calc) px, pyid:${c.id}startingPosX${n}${G}${t}=>x:${c.size.x}y:${c.size.y}${c.widthInColumns}(width * (child?.w || 1)) / 2${a*(c?.widthInColumns??1)/2}`)}c.children&&tt(c,e),i+=c?.widthInColumns??1,o.Rm.debug("abc88 columnsPos",c,i)}}o.Rm.debug(`layout blocks (<==layoutBlocks) ${t.id} x: ${t?.size?.x} y: ${t?.size?.y} width: ${t?.size?.width}`)}function et(t,{minX:e,minY:r,maxX:s,maxY:a}={minX:0,minY:0,maxX:0,maxY:0}){if(t.size&&"root"!==t.id){const{x:i,y:n,width:o,height:l}=t.size;i-o/2s&&(s=i+o/2),n+l/2>a&&(a=n+l/2)}if(t.children)for(const i of t.children)({minX:e,minY:r,maxX:s,maxY:a}=et(i,{minX:e,minY:r,maxX:s,maxY:a}));return{minX:e,minY:r,maxX:s,maxY:a}}function rt(t){const e=t.getBlock("root");if(!e)return;Q(e,t,0,0),tt(e,t),o.Rm.debug("getBlocks",JSON.stringify(e,null,2));const{minX:r,minY:s,maxX:a,maxY:i}=et(e);return{x:r,y:s,width:a-r,height:i-s}}function st(t,e){e&&t.attr("style",e)}function at(t){const e=(0,h.Ltv)(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=e.append("xhtml:div"),s=t.label,a=t.isNode?"nodeLabel":"edgeLabel",i=r.append("span");return i.html(s),st(i,t.labelStyle),i.attr("class",a),st(r,t.labelStyle),r.style("display","inline-block"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}(0,o.K2)(Q,"setBlockSizes"),(0,o.K2)(tt,"layoutBlocks"),(0,o.K2)(et,"findBounds"),(0,o.K2)(rt,"layout"),(0,o.K2)(st,"applyStyle"),(0,o.K2)(at,"addHtmlLabel");var it=(0,o.K2)(((t,e,r,s)=>{let a=t||"";if("object"==typeof a&&(a=a[0]),(0,o._3)((0,o.D7)().flowchart.htmlLabels)){a=a.replace(/\\n|\n/g,"
    "),o.Rm.debug("vertexText"+a);return at({isNode:s,label:(0,i.hE)((0,n.Sm)(a)),labelStyle:e.replace("fill:","color:")})}{const t=document.createElementNS("http://www.w3.org/2000/svg","text");t.setAttribute("style",e.replace("color:","fill:"));let s=[];s="string"==typeof a?a.split(/\\n|\n|/gi):Array.isArray(a)?a:[];for(const e of s){const s=document.createElementNS("http://www.w3.org/2000/svg","tspan");s.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),s.setAttribute("dy","1em"),s.setAttribute("x","0"),r?s.setAttribute("class","title-row"):s.setAttribute("class","row"),s.textContent=e.trim(),t.appendChild(s)}return t}}),"createLabel"),nt=(0,o.K2)(((t,e,r,s,a)=>{e.arrowTypeStart&<(t,"start",e.arrowTypeStart,r,s,a),e.arrowTypeEnd&<(t,"end",e.arrowTypeEnd,r,s,a)}),"addEdgeMarkers"),ot={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},lt=(0,o.K2)(((t,e,r,s,a,i)=>{const n=ot[r];if(!n)return void o.Rm.warn(`Unknown arrow type: ${r}`);const l="start"===e?"Start":"End";t.attr(`marker-${e}`,`url(${s}#${a}_${i}-${n}${l})`)}),"addEdgeMarker"),ct={},dt={},ht=(0,o.K2)(((t,e)=>{const r=(0,o.D7)(),s=(0,o._3)(r.flowchart.htmlLabels),a="markdown"===e.labelType?(0,i.GZ)(t,e.label,{style:e.labelStyle,useHtmlLabels:s,addSvgBackground:!0},r):it(e.label,e.labelStyle),n=t.insert("g").attr("class","edgeLabel"),l=n.insert("g").attr("class","label");l.node().appendChild(a);let c,d=a.getBBox();if(s){const t=a.children[0],e=(0,h.Ltv)(a);d=t.getBoundingClientRect(),e.attr("width",d.width),e.attr("height",d.height)}if(l.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),ct[e.id]=n,e.width=d.width,e.height=d.height,e.startLabelLeft){const r=it(e.startLabelLeft,e.labelStyle),s=t.insert("g").attr("class","edgeTerminals"),a=s.insert("g").attr("class","inner");c=a.node().appendChild(r);const i=r.getBBox();a.attr("transform","translate("+-i.width/2+", "+-i.height/2+")"),dt[e.id]||(dt[e.id]={}),dt[e.id].startLeft=s,gt(c,e.startLabelLeft)}if(e.startLabelRight){const r=it(e.startLabelRight,e.labelStyle),s=t.insert("g").attr("class","edgeTerminals"),a=s.insert("g").attr("class","inner");c=s.node().appendChild(r),a.node().appendChild(r);const i=r.getBBox();a.attr("transform","translate("+-i.width/2+", "+-i.height/2+")"),dt[e.id]||(dt[e.id]={}),dt[e.id].startRight=s,gt(c,e.startLabelRight)}if(e.endLabelLeft){const r=it(e.endLabelLeft,e.labelStyle),s=t.insert("g").attr("class","edgeTerminals"),a=s.insert("g").attr("class","inner");c=a.node().appendChild(r);const i=r.getBBox();a.attr("transform","translate("+-i.width/2+", "+-i.height/2+")"),s.node().appendChild(r),dt[e.id]||(dt[e.id]={}),dt[e.id].endLeft=s,gt(c,e.endLabelLeft)}if(e.endLabelRight){const r=it(e.endLabelRight,e.labelStyle),s=t.insert("g").attr("class","edgeTerminals"),a=s.insert("g").attr("class","inner");c=a.node().appendChild(r);const i=r.getBBox();a.attr("transform","translate("+-i.width/2+", "+-i.height/2+")"),s.node().appendChild(r),dt[e.id]||(dt[e.id]={}),dt[e.id].endRight=s,gt(c,e.endLabelRight)}return a}),"insertEdgeLabel");function gt(t,e){(0,o.D7)().flowchart.htmlLabels&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}(0,o.K2)(gt,"setTerminalWidth");var ut=(0,o.K2)(((t,e)=>{o.Rm.debug("Moving label abc88 ",t.id,t.label,ct[t.id],e);let r=e.updatedPath?e.updatedPath:e.originalPath;const s=(0,o.D7)(),{subGraphTitleTotalMargin:i}=(0,a.O)(s);if(t.label){const s=ct[t.id];let a=t.x,l=t.y;if(r){const s=n._K.calcLabelPosition(r);o.Rm.debug("Moving label "+t.label+" from (",a,",",l,") to (",s.x,",",s.y,") abc88"),e.updatedPath&&(a=s.x,l=s.y)}s.attr("transform",`translate(${a}, ${l+i/2})`)}if(t.startLabelLeft){const e=dt[t.id].startLeft;let s=t.x,a=t.y;if(r){const e=n._K.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r);s=e.x,a=e.y}e.attr("transform",`translate(${s}, ${a})`)}if(t.startLabelRight){const e=dt[t.id].startRight;let s=t.x,a=t.y;if(r){const e=n._K.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r);s=e.x,a=e.y}e.attr("transform",`translate(${s}, ${a})`)}if(t.endLabelLeft){const e=dt[t.id].endLeft;let s=t.x,a=t.y;if(r){const e=n._K.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r);s=e.x,a=e.y}e.attr("transform",`translate(${s}, ${a})`)}if(t.endLabelRight){const e=dt[t.id].endRight;let s=t.x,a=t.y;if(r){const e=n._K.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);s=e.x,a=e.y}e.attr("transform",`translate(${s}, ${a})`)}}),"positionEdgeLabel"),pt=(0,o.K2)(((t,e)=>{const r=t.x,s=t.y,a=Math.abs(e.x-r),i=Math.abs(e.y-s),n=t.width/2,o=t.height/2;return a>=n||i>=o}),"outsideNode"),yt=(0,o.K2)(((t,e,r)=>{o.Rm.debug(`intersection calc abc89:\n outsidePoint: ${JSON.stringify(e)}\n insidePoint : ${JSON.stringify(r)}\n node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);const s=t.x,a=t.y,i=Math.abs(s-r.x),n=t.width/2;let l=r.xMath.abs(s-e.x)*c){let t=r.y{o.Rm.debug("abc88 cutPathAtIntersect",t,e);let r=[],s=t[0],a=!1;return t.forEach((t=>{if(pt(e,t)||a)s=t,a||r.push(t);else{const i=yt(e,s,t);let n=!1;r.forEach((t=>{n=n||t.x===i.x&&t.y===i.y})),r.some((t=>t.x===i.x&&t.y===i.y))||r.push(i),a=!0}})),r}),"cutPathAtIntersect"),xt=(0,o.K2)((function(t,e,r,a,i,n,l){let c=r.points;o.Rm.debug("abc88 InsertEdge: edge=",r,"e=",e);let d=!1;const g=n.node(e.v);var u=n.node(e.w);u?.intersect&&g?.intersect&&(c=c.slice(1,r.points.length-1),c.unshift(g.intersect(c[0])),c.push(u.intersect(c[c.length-1]))),r.toCluster&&(o.Rm.debug("to cluster abc88",a[r.toCluster]),c=bt(r.points,a[r.toCluster].node),d=!0),r.fromCluster&&(o.Rm.debug("from cluster abc88",a[r.fromCluster]),c=bt(c.reverse(),a[r.fromCluster].node).reverse(),d=!0);const p=c.filter((t=>!Number.isNaN(t.y)));let y=h.qrM;!r.curve||"graph"!==i&&"flowchart"!==i||(y=r.curve);const{x:b,y:x}=(0,s.R)(r),f=(0,h.n8j)().x(b).y(x).curve(y);let m;switch(r.thickness){case"normal":m="edge-thickness-normal";break;case"thick":case"invisible":m="edge-thickness-thick";break;default:m=""}switch(r.pattern){case"solid":m+=" edge-pattern-solid";break;case"dotted":m+=" edge-pattern-dotted";break;case"dashed":m+=" edge-pattern-dashed"}const w=t.append("path").attr("d",f(p)).attr("id",r.id).attr("class"," "+m+(r.classes?" "+r.classes:"")).attr("style",r.style);let _="";((0,o.D7)().flowchart.arrowMarkerAbsolute||(0,o.D7)().state.arrowMarkerAbsolute)&&(_=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,_=_.replace(/\(/g,"\\("),_=_.replace(/\)/g,"\\)")),nt(w,r,_,l,i);let L={};return d&&(L.updatedPath=c),L.originalPath=r.points,L}),"insertEdge"),ft=(0,o.K2)((t=>{const e=new Set;for(const r of t)switch(r){case"x":e.add("right"),e.add("left");break;case"y":e.add("up"),e.add("down");break;default:e.add(r)}return e}),"expandAndDeduplicateDirections"),mt=(0,o.K2)(((t,e,r)=>{const s=ft(t),a=e.height+2*r.padding,i=a/2,n=e.width+2*i+r.padding,o=r.padding/2;return s.has("right")&&s.has("left")&&s.has("up")&&s.has("down")?[{x:0,y:0},{x:i,y:0},{x:n/2,y:2*o},{x:n-i,y:0},{x:n,y:0},{x:n,y:-a/3},{x:n+2*o,y:-a/2},{x:n,y:-2*a/3},{x:n,y:-a},{x:n-i,y:-a},{x:n/2,y:-a-2*o},{x:i,y:-a},{x:0,y:-a},{x:0,y:-2*a/3},{x:-2*o,y:-a/2},{x:0,y:-a/3}]:s.has("right")&&s.has("left")&&s.has("up")?[{x:i,y:0},{x:n-i,y:0},{x:n,y:-a/2},{x:n-i,y:-a},{x:i,y:-a},{x:0,y:-a/2}]:s.has("right")&&s.has("left")&&s.has("down")?[{x:0,y:0},{x:i,y:-a},{x:n-i,y:-a},{x:n,y:0}]:s.has("right")&&s.has("up")&&s.has("down")?[{x:0,y:0},{x:n,y:-i},{x:n,y:-a+i},{x:0,y:-a}]:s.has("left")&&s.has("up")&&s.has("down")?[{x:n,y:0},{x:0,y:-i},{x:0,y:-a+i},{x:n,y:-a}]:s.has("right")&&s.has("left")?[{x:i,y:0},{x:i,y:-o},{x:n-i,y:-o},{x:n-i,y:0},{x:n,y:-a/2},{x:n-i,y:-a},{x:n-i,y:-a+o},{x:i,y:-a+o},{x:i,y:-a},{x:0,y:-a/2}]:s.has("up")&&s.has("down")?[{x:n/2,y:0},{x:0,y:-o},{x:i,y:-o},{x:i,y:-a+o},{x:0,y:-a+o},{x:n/2,y:-a},{x:n,y:-a+o},{x:n-i,y:-a+o},{x:n-i,y:-o},{x:n,y:-o}]:s.has("right")&&s.has("up")?[{x:0,y:0},{x:n,y:-i},{x:0,y:-a}]:s.has("right")&&s.has("down")?[{x:0,y:0},{x:n,y:0},{x:0,y:-a}]:s.has("left")&&s.has("up")?[{x:n,y:0},{x:0,y:-i},{x:n,y:-a}]:s.has("left")&&s.has("down")?[{x:n,y:0},{x:0,y:0},{x:n,y:-a}]:s.has("right")?[{x:i,y:-o},{x:i,y:-o},{x:n-i,y:-o},{x:n-i,y:0},{x:n,y:-a/2},{x:n-i,y:-a},{x:n-i,y:-a+o},{x:i,y:-a+o},{x:i,y:-a+o}]:s.has("left")?[{x:i,y:0},{x:i,y:-o},{x:n-i,y:-o},{x:n-i,y:-a+o},{x:i,y:-a+o},{x:i,y:-a},{x:0,y:-a/2}]:s.has("up")?[{x:i,y:-o},{x:i,y:-a+o},{x:0,y:-a+o},{x:n/2,y:-a},{x:n,y:-a+o},{x:n-i,y:-a+o},{x:n-i,y:-o}]:s.has("down")?[{x:n/2,y:0},{x:0,y:-o},{x:i,y:-o},{x:i,y:-a+o},{x:n-i,y:-a+o},{x:n-i,y:-o},{x:n,y:-o}]:[{x:0,y:0}]}),"getArrowPoints");function wt(t,e){return t.intersect(e)}(0,o.K2)(wt,"intersectNode");var _t=wt;function Lt(t,e,r,s){var a=t.x,i=t.y,n=a-s.x,o=i-s.y,l=Math.sqrt(e*e*o*o+r*r*n*n),c=Math.abs(e*r*n/l);s.x0}(0,o.K2)(Et,"intersectLine"),(0,o.K2)(Dt,"sameSign");var Ct=Et,Rt=Kt;function Kt(t,e,r){var s=t.x,a=t.y,i=[],n=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach((function(t){n=Math.min(n,t.x),o=Math.min(o,t.y)})):(n=Math.min(n,e.x),o=Math.min(o,e.y));for(var l=s-t.width/2-n,c=a-t.height/2-o,d=0;d1&&i.sort((function(t,e){var s=t.x-r.x,a=t.y-r.y,i=Math.sqrt(s*s+a*a),n=e.x-r.x,o=e.y-r.y,l=Math.sqrt(n*n+o*o);return i{var r,s,a=t.x,i=t.y,n=e.x-a,o=e.y-i,l=t.width/2,c=t.height/2;return Math.abs(o)*l>Math.abs(n)*c?(o<0&&(c=-c),r=0===o?0:c*n/o,s=c):(n<0&&(l=-l),r=l,s=0===n?0:l*o/n),{x:a+r,y:i+s}}),"intersectRect")},Tt=(0,o.K2)((async(t,e,r,s)=>{const a=(0,o.D7)();let l;const c=e.useHtmlLabels||(0,o._3)(a.flowchart.htmlLabels);l=r||"node default";const d=t.insert("g").attr("class",l).attr("id",e.domId||e.id),g=d.insert("g").attr("class","label").attr("style",e.labelStyle);let u;u=void 0===e.labelText?"":"string"==typeof e.labelText?e.labelText:e.labelText[0];const p=g.node();let y;y="markdown"===e.labelType?(0,i.GZ)(g,(0,o.jZ)((0,n.Sm)(u),a),{useHtmlLabels:c,width:e.width||a.flowchart.wrappingWidth,classes:"markdown-node-label"},a):p.appendChild(it((0,o.jZ)((0,n.Sm)(u),a),e.labelStyle,!1,s));let b=y.getBBox();const x=e.padding/2;if((0,o._3)(a.flowchart.htmlLabels)){const t=y.children[0],e=(0,h.Ltv)(y),r=t.getElementsByTagName("img");if(r){const t=""===u.replace(/]*>/g,"").trim();await Promise.all([...r].map((e=>new Promise((r=>{function s(){if(e.style.display="flex",e.style.flexDirection="column",t){const t=a.fontSize?a.fontSize:window.getComputedStyle(document.body).fontSize,r=5,s=parseInt(t,10)*r+"px";e.style.minWidth=s,e.style.maxWidth=s}else e.style.width="100%";r(e)}(0,o.K2)(s,"setupImage"),setTimeout((()=>{e.complete&&s()})),e.addEventListener("error",s),e.addEventListener("load",s)})))))}b=t.getBoundingClientRect(),e.attr("width",b.width),e.attr("height",b.height)}return c?g.attr("transform","translate("+-b.width/2+", "+-b.height/2+")"):g.attr("transform","translate(0, "+-b.height/2+")"),e.centerLabel&&g.attr("transform","translate("+-b.width/2+", "+-b.height/2+")"),g.insert("rect",":first-child"),{shapeSvg:d,bbox:b,halfPadding:x,label:g}}),"labelHelper"),$t=(0,o.K2)(((t,e)=>{const r=e.node().getBBox();t.width=r.width,t.height=r.height}),"updateNodeBounds");function At(t,e,r,s){return t.insert("polygon",":first-child").attr("points",s.map((function(t){return t.x+","+t.y})).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}(0,o.K2)(At,"insertPolygonShape");var It=(0,o.K2)((async(t,e)=>{e.useHtmlLabels||(0,o.D7)().flowchart.htmlLabels||(e.centerLabel=!0);const{shapeSvg:r,bbox:s,halfPadding:a}=await Tt(t,e,"node "+e.classes,!0);o.Rm.info("Classes = ",e.classes);const i=r.insert("rect",":first-child");return i.attr("rx",e.rx).attr("ry",e.ry).attr("x",-s.width/2-a).attr("y",-s.height/2-a).attr("width",s.width+e.padding).attr("height",s.height+e.padding),$t(e,i),e.intersect=function(t){return Nt.rect(e,t)},r}),"note"),Ot=(0,o.K2)((t=>t?" "+t:""),"formatClass"),Bt=(0,o.K2)(((t,e)=>`${e||"node default"}${Ot(t.classes)} ${Ot(t.class)}`),"getClassesFromNode"),zt=(0,o.K2)((async(t,e)=>{const{shapeSvg:r,bbox:s}=await Tt(t,e,Bt(e,void 0),!0),a=s.width+e.padding+(s.height+e.padding),i=[{x:a/2,y:0},{x:a,y:-a/2},{x:a/2,y:-a},{x:0,y:-a/2}];o.Rm.info("Question main (Circle)");const n=At(r,a,a,i);return n.attr("style",e.style),$t(e,n),e.intersect=function(t){return o.Rm.warn("Intersect called"),Nt.polygon(e,i,t)},r}),"question"),Mt=(0,o.K2)(((t,e)=>{const r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),s=[{x:0,y:14},{x:14,y:0},{x:0,y:-14},{x:-14,y:0}];return r.insert("polygon",":first-child").attr("points",s.map((function(t){return t.x+","+t.y})).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),e.width=28,e.height=28,e.intersect=function(t){return Nt.circle(e,14,t)},r}),"choice"),Pt=(0,o.K2)((async(t,e)=>{const{shapeSvg:r,bbox:s}=await Tt(t,e,Bt(e,void 0),!0),a=s.height+e.padding,i=a/4,n=s.width+2*i+e.padding,o=[{x:i,y:0},{x:n-i,y:0},{x:n,y:-a/2},{x:n-i,y:-a},{x:i,y:-a},{x:0,y:-a/2}],l=At(r,n,a,o);return l.attr("style",e.style),$t(e,l),e.intersect=function(t){return Nt.polygon(e,o,t)},r}),"hexagon"),Yt=(0,o.K2)((async(t,e)=>{const{shapeSvg:r,bbox:s}=await Tt(t,e,void 0,!0),a=s.height+2*e.padding,i=a/2,n=s.width+2*i+e.padding,o=mt(e.directions,s,e),l=At(r,n,a,o);return l.attr("style",e.style),$t(e,l),e.intersect=function(t){return Nt.polygon(e,o,t)},r}),"block_arrow"),Ft=(0,o.K2)((async(t,e)=>{const{shapeSvg:r,bbox:s}=await Tt(t,e,Bt(e,void 0),!0),a=s.width+e.padding,i=s.height+e.padding,n=[{x:-i/2,y:0},{x:a,y:0},{x:a,y:-i},{x:-i/2,y:-i},{x:0,y:-i/2}];return At(r,a,i,n).attr("style",e.style),e.width=a+i,e.height=i,e.intersect=function(t){return Nt.polygon(e,n,t)},r}),"rect_left_inv_arrow"),jt=(0,o.K2)((async(t,e)=>{const{shapeSvg:r,bbox:s}=await Tt(t,e,Bt(e),!0),a=s.width+e.padding,i=s.height+e.padding,n=[{x:-2*i/6,y:0},{x:a-i/6,y:0},{x:a+2*i/6,y:-i},{x:i/6,y:-i}],o=At(r,a,i,n);return o.attr("style",e.style),$t(e,o),e.intersect=function(t){return Nt.polygon(e,n,t)},r}),"lean_right"),Wt=(0,o.K2)((async(t,e)=>{const{shapeSvg:r,bbox:s}=await Tt(t,e,Bt(e,void 0),!0),a=s.width+e.padding,i=s.height+e.padding,n=[{x:2*i/6,y:0},{x:a+i/6,y:0},{x:a-2*i/6,y:-i},{x:-i/6,y:-i}],o=At(r,a,i,n);return o.attr("style",e.style),$t(e,o),e.intersect=function(t){return Nt.polygon(e,n,t)},r}),"lean_left"),Xt=(0,o.K2)((async(t,e)=>{const{shapeSvg:r,bbox:s}=await Tt(t,e,Bt(e,void 0),!0),a=s.width+e.padding,i=s.height+e.padding,n=[{x:-2*i/6,y:0},{x:a+2*i/6,y:0},{x:a-i/6,y:-i},{x:i/6,y:-i}],o=At(r,a,i,n);return o.attr("style",e.style),$t(e,o),e.intersect=function(t){return Nt.polygon(e,n,t)},r}),"trapezoid"),Ht=(0,o.K2)((async(t,e)=>{const{shapeSvg:r,bbox:s}=await Tt(t,e,Bt(e,void 0),!0),a=s.width+e.padding,i=s.height+e.padding,n=[{x:i/6,y:0},{x:a-i/6,y:0},{x:a+2*i/6,y:-i},{x:-2*i/6,y:-i}],o=At(r,a,i,n);return o.attr("style",e.style),$t(e,o),e.intersect=function(t){return Nt.polygon(e,n,t)},r}),"inv_trapezoid"),Ut=(0,o.K2)((async(t,e)=>{const{shapeSvg:r,bbox:s}=await Tt(t,e,Bt(e,void 0),!0),a=s.width+e.padding,i=s.height+e.padding,n=[{x:0,y:0},{x:a+i/2,y:0},{x:a,y:-i/2},{x:a+i/2,y:-i},{x:0,y:-i}],o=At(r,a,i,n);return o.attr("style",e.style),$t(e,o),e.intersect=function(t){return Nt.polygon(e,n,t)},r}),"rect_right_inv_arrow"),Zt=(0,o.K2)((async(t,e)=>{const{shapeSvg:r,bbox:s}=await Tt(t,e,Bt(e,void 0),!0),a=s.width+e.padding,i=a/2,n=i/(2.5+a/50),o=s.height+n+e.padding,l="M 0,"+n+" a "+i+","+n+" 0,0,0 "+a+" 0 a "+i+","+n+" 0,0,0 "+-a+" 0 l 0,"+o+" a "+i+","+n+" 0,0,0 "+a+" 0 l 0,"+-o,c=r.attr("label-offset-y",n).insert("path",":first-child").attr("style",e.style).attr("d",l).attr("transform","translate("+-a/2+","+-(o/2+n)+")");return $t(e,c),e.intersect=function(t){const r=Nt.rect(e,t),s=r.x-e.x;if(0!=i&&(Math.abs(s)e.height/2-n)){let a=n*n*(1-s*s/(i*i));0!=a&&(a=Math.sqrt(a)),a=n-a,t.y-e.y>0&&(a=-a),r.y+=a}return r},r}),"cylinder"),qt=(0,o.K2)((async(t,e)=>{const{shapeSvg:r,bbox:s,halfPadding:a}=await Tt(t,e,"node "+e.classes+" "+e.class,!0),i=r.insert("rect",":first-child"),n=e.positioned?e.width:s.width+e.padding,l=e.positioned?e.height:s.height+e.padding,c=e.positioned?-n/2:-s.width/2-a,d=e.positioned?-l/2:-s.height/2-a;if(i.attr("class","basic label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",c).attr("y",d).attr("width",n).attr("height",l),e.props){const t=new Set(Object.keys(e.props));e.props.borders&&(Vt(i,e.props.borders,n,l),t.delete("borders")),t.forEach((t=>{o.Rm.warn(`Unknown node property ${t}`)}))}return $t(e,i),e.intersect=function(t){return Nt.rect(e,t)},r}),"rect"),Gt=(0,o.K2)((async(t,e)=>{const{shapeSvg:r,bbox:s,halfPadding:a}=await Tt(t,e,"node "+e.classes,!0),i=r.insert("rect",":first-child"),n=e.positioned?e.width:s.width+e.padding,l=e.positioned?e.height:s.height+e.padding,c=e.positioned?-n/2:-s.width/2-a,d=e.positioned?-l/2:-s.height/2-a;if(i.attr("class","basic cluster composite label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",c).attr("y",d).attr("width",n).attr("height",l),e.props){const t=new Set(Object.keys(e.props));e.props.borders&&(Vt(i,e.props.borders,n,l),t.delete("borders")),t.forEach((t=>{o.Rm.warn(`Unknown node property ${t}`)}))}return $t(e,i),e.intersect=function(t){return Nt.rect(e,t)},r}),"composite"),Jt=(0,o.K2)((async(t,e)=>{const{shapeSvg:r}=await Tt(t,e,"label",!0);o.Rm.trace("Classes = ",e.class);const s=r.insert("rect",":first-child");if(s.attr("width",0).attr("height",0),r.attr("class","label edgeLabel"),e.props){const t=new Set(Object.keys(e.props));e.props.borders&&(Vt(s,e.props.borders,0,0),t.delete("borders")),t.forEach((t=>{o.Rm.warn(`Unknown node property ${t}`)}))}return $t(e,s),e.intersect=function(t){return Nt.rect(e,t)},r}),"labelRect");function Vt(t,e,r,s){const a=[],i=(0,o.K2)((t=>{a.push(t,0)}),"addBorder"),n=(0,o.K2)((t=>{a.push(0,t)}),"skipBorder");e.includes("t")?(o.Rm.debug("add top border"),i(r)):n(r),e.includes("r")?(o.Rm.debug("add right border"),i(s)):n(s),e.includes("b")?(o.Rm.debug("add bottom border"),i(r)):n(r),e.includes("l")?(o.Rm.debug("add left border"),i(s)):n(s),t.attr("stroke-dasharray",a.join(" "))}(0,o.K2)(Vt,"applyNodePropertyBorders");var Qt=(0,o.K2)(((t,e)=>{let r;r=e.classes?"node "+e.classes:"node default";const s=t.insert("g").attr("class",r).attr("id",e.domId||e.id),a=s.insert("rect",":first-child"),i=s.insert("line"),n=s.insert("g").attr("class","label"),l=e.labelText.flat?e.labelText.flat():e.labelText;let c="";c="object"==typeof l?l[0]:l,o.Rm.info("Label text abc79",c,l,"object"==typeof l);const d=n.node().appendChild(it(c,e.labelStyle,!0,!0));let g={width:0,height:0};if((0,o._3)((0,o.D7)().flowchart.htmlLabels)){const t=d.children[0],e=(0,h.Ltv)(d);g=t.getBoundingClientRect(),e.attr("width",g.width),e.attr("height",g.height)}o.Rm.info("Text 2",l);const u=l.slice(1,l.length);let p=d.getBBox();const y=n.node().appendChild(it(u.join?u.join("
    "):u,e.labelStyle,!0,!0));if((0,o._3)((0,o.D7)().flowchart.htmlLabels)){const t=y.children[0],e=(0,h.Ltv)(y);g=t.getBoundingClientRect(),e.attr("width",g.width),e.attr("height",g.height)}const b=e.padding/2;return(0,h.Ltv)(y).attr("transform","translate( "+(g.width>p.width?0:(p.width-g.width)/2)+", "+(p.height+b+5)+")"),(0,h.Ltv)(d).attr("transform","translate( "+(g.width{const{shapeSvg:r,bbox:s}=await Tt(t,e,Bt(e,void 0),!0),a=s.height+e.padding,i=s.width+a/4+e.padding,n=r.insert("rect",":first-child").attr("style",e.style).attr("rx",a/2).attr("ry",a/2).attr("x",-i/2).attr("y",-a/2).attr("width",i).attr("height",a);return $t(e,n),e.intersect=function(t){return Nt.rect(e,t)},r}),"stadium"),ee=(0,o.K2)((async(t,e)=>{const{shapeSvg:r,bbox:s,halfPadding:a}=await Tt(t,e,Bt(e,void 0),!0),i=r.insert("circle",":first-child");return i.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",s.width/2+a).attr("width",s.width+e.padding).attr("height",s.height+e.padding),o.Rm.info("Circle main"),$t(e,i),e.intersect=function(t){return o.Rm.info("Circle intersect",e,s.width/2+a,t),Nt.circle(e,s.width/2+a,t)},r}),"circle"),re=(0,o.K2)((async(t,e)=>{const{shapeSvg:r,bbox:s,halfPadding:a}=await Tt(t,e,Bt(e,void 0),!0),i=r.insert("g",":first-child"),n=i.insert("circle"),l=i.insert("circle");return i.attr("class",e.class),n.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",s.width/2+a+5).attr("width",s.width+e.padding+10).attr("height",s.height+e.padding+10),l.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",s.width/2+a).attr("width",s.width+e.padding).attr("height",s.height+e.padding),o.Rm.info("DoubleCircle main"),$t(e,n),e.intersect=function(t){return o.Rm.info("DoubleCircle intersect",e,s.width/2+a+5,t),Nt.circle(e,s.width/2+a+5,t)},r}),"doublecircle"),se=(0,o.K2)((async(t,e)=>{const{shapeSvg:r,bbox:s}=await Tt(t,e,Bt(e,void 0),!0),a=s.width+e.padding,i=s.height+e.padding,n=[{x:0,y:0},{x:a,y:0},{x:a,y:-i},{x:0,y:-i},{x:0,y:0},{x:-8,y:0},{x:a+8,y:0},{x:a+8,y:-i},{x:-8,y:-i},{x:-8,y:0}],o=At(r,a,i,n);return o.attr("style",e.style),$t(e,o),e.intersect=function(t){return Nt.polygon(e,n,t)},r}),"subroutine"),ae=(0,o.K2)(((t,e)=>{const r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),s=r.insert("circle",":first-child");return s.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),$t(e,s),e.intersect=function(t){return Nt.circle(e,7,t)},r}),"start"),ie=(0,o.K2)(((t,e,r)=>{const s=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);let a=70,i=10;"LR"===r&&(a=10,i=70);const n=s.append("rect").attr("x",-1*a/2).attr("y",-1*i/2).attr("width",a).attr("height",i).attr("class","fork-join");return $t(e,n),e.height=e.height+e.padding/2,e.width=e.width+e.padding/2,e.intersect=function(t){return Nt.rect(e,t)},s}),"forkJoin"),ne={rhombus:zt,composite:Gt,question:zt,rect:qt,labelRect:Jt,rectWithTitle:Qt,choice:Mt,circle:ee,doublecircle:re,stadium:te,hexagon:Pt,block_arrow:Yt,rect_left_inv_arrow:Ft,lean_right:jt,lean_left:Wt,trapezoid:Xt,inv_trapezoid:Ht,rect_right_inv_arrow:Ut,cylinder:Zt,start:ae,end:(0,o.K2)(((t,e)=>{const r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),s=r.insert("circle",":first-child"),a=r.insert("circle",":first-child");return a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),s.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),$t(e,a),e.intersect=function(t){return Nt.circle(e,7,t)},r}),"end"),note:It,subroutine:se,fork:ie,join:ie,class_box:(0,o.K2)(((t,e)=>{const r=e.padding/2;let s;s=e.classes?"node "+e.classes:"node default";const a=t.insert("g").attr("class",s).attr("id",e.domId||e.id),i=a.insert("rect",":first-child"),n=a.insert("line"),l=a.insert("line");let c=0,d=4;const g=a.insert("g").attr("class","label");let u=0;const p=e.classData.annotations?.[0],y=e.classData.annotations[0]?"\xab"+e.classData.annotations[0]+"\xbb":"",b=g.node().appendChild(it(y,e.labelStyle,!0,!0));let x=b.getBBox();if((0,o._3)((0,o.D7)().flowchart.htmlLabels)){const t=b.children[0],e=(0,h.Ltv)(b);x=t.getBoundingClientRect(),e.attr("width",x.width),e.attr("height",x.height)}e.classData.annotations[0]&&(d+=x.height+4,c+=x.width);let f=e.classData.label;void 0!==e.classData.type&&""!==e.classData.type&&((0,o.D7)().flowchart.htmlLabels?f+="<"+e.classData.type+">":f+="<"+e.classData.type+">");const m=g.node().appendChild(it(f,e.labelStyle,!0,!0));(0,h.Ltv)(m).attr("class","classTitle");let w=m.getBBox();if((0,o._3)((0,o.D7)().flowchart.htmlLabels)){const t=m.children[0],e=(0,h.Ltv)(m);w=t.getBoundingClientRect(),e.attr("width",w.width),e.attr("height",w.height)}d+=w.height+4,w.width>c&&(c=w.width);const _=[];e.classData.members.forEach((t=>{const r=t.getDisplayDetails();let s=r.displayText;(0,o.D7)().flowchart.htmlLabels&&(s=s.replace(//g,">"));const a=g.node().appendChild(it(s,r.cssStyle?r.cssStyle:e.labelStyle,!0,!0));let i=a.getBBox();if((0,o._3)((0,o.D7)().flowchart.htmlLabels)){const t=a.children[0],e=(0,h.Ltv)(a);i=t.getBoundingClientRect(),e.attr("width",i.width),e.attr("height",i.height)}i.width>c&&(c=i.width),d+=i.height+4,_.push(a)})),d+=8;const L=[];if(e.classData.methods.forEach((t=>{const r=t.getDisplayDetails();let s=r.displayText;(0,o.D7)().flowchart.htmlLabels&&(s=s.replace(//g,">"));const a=g.node().appendChild(it(s,r.cssStyle?r.cssStyle:e.labelStyle,!0,!0));let i=a.getBBox();if((0,o._3)((0,o.D7)().flowchart.htmlLabels)){const t=a.children[0],e=(0,h.Ltv)(a);i=t.getBoundingClientRect(),e.attr("width",i.width),e.attr("height",i.height)}i.width>c&&(c=i.width),d+=i.height+4,L.push(a)})),d+=8,p){let t=(c-x.width)/2;(0,h.Ltv)(b).attr("transform","translate( "+(-1*c/2+t)+", "+-1*d/2+")"),u=x.height+4}let k=(c-w.width)/2;return(0,h.Ltv)(m).attr("transform","translate( "+(-1*c/2+k)+", "+(-1*d/2+u)+")"),u+=w.height+4,n.attr("class","divider").attr("x1",-c/2-r).attr("x2",c/2+r).attr("y1",-d/2-r+8+u).attr("y2",-d/2-r+8+u),u+=8,_.forEach((t=>{(0,h.Ltv)(t).attr("transform","translate( "+-c/2+", "+(-1*d/2+u+4)+")");const e=t?.getBBox();u+=(e?.height??0)+4})),u+=8,l.attr("class","divider").attr("x1",-c/2-r).attr("x2",c/2+r).attr("y1",-d/2-r+8+u).attr("y2",-d/2-r+8+u),u+=8,L.forEach((t=>{(0,h.Ltv)(t).attr("transform","translate( "+-c/2+", "+(-1*d/2+u)+")");const e=t?.getBBox();u+=(e?.height??0)+4})),i.attr("style",e.style).attr("class","outer title-state").attr("x",-c/2-r).attr("y",-d/2-r).attr("width",c+e.padding).attr("height",d+e.padding),$t(e,i),e.intersect=function(t){return Nt.rect(e,t)},a}),"class_box")},oe={},le=(0,o.K2)((async(t,e,r)=>{let s,a;if(e.link){let i;"sandbox"===(0,o.D7)().securityLevel?i="_top":e.linkTarget&&(i=e.linkTarget||"_blank"),s=t.insert("svg:a").attr("xlink:href",e.link).attr("target",i),a=await ne[e.shape](s,e,r)}else a=await ne[e.shape](t,e,r),s=a;return e.tooltip&&a.attr("title",e.tooltip),e.class&&a.attr("class","node default "+e.class),oe[e.id]=s,e.haveCallback&&oe[e.id].attr("class",oe[e.id].attr("class")+" clickable"),s}),"insertNode"),ce=(0,o.K2)((t=>{const e=oe[t.id];o.Rm.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");const r=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+r-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),r}),"positionNode");function de(t,e,r=!1){const s=t;let a="default";(s?.classes?.length||0)>0&&(a=(s?.classes??[]).join(" ")),a+=" flowchart-label";let i,l=0,c="";switch(s.type){case"round":l=5,c="rect";break;case"composite":l=0,c="composite",i=0;break;case"square":case"group":default:c="rect";break;case"diamond":c="question";break;case"hexagon":c="hexagon";break;case"block_arrow":c="block_arrow";break;case"odd":case"rect_left_inv_arrow":c="rect_left_inv_arrow";break;case"lean_right":c="lean_right";break;case"lean_left":c="lean_left";break;case"trapezoid":c="trapezoid";break;case"inv_trapezoid":c="inv_trapezoid";break;case"circle":c="circle";break;case"ellipse":c="ellipse";break;case"stadium":c="stadium";break;case"subroutine":c="subroutine";break;case"cylinder":c="cylinder";break;case"doublecircle":c="doublecircle"}const d=(0,n.sM)(s?.styles??[]),h=s.label,g=s.size??{width:0,height:0,x:0,y:0};return{labelStyle:d.labelStyle,shape:c,labelText:h,rx:l,ry:l,class:a,style:d.style,id:s.id,directions:s.directions,width:g.width,height:g.height,x:g.x,y:g.y,positioned:r,intersect:void 0,type:s.type,padding:i??(0,o.zj)()?.block?.padding??0}}async function he(t,e,r){const s=de(e,0,!1);if("group"===s.type)return;const a=(0,o.zj)(),i=await le(t,s,{config:a}),n=i.node().getBBox(),l=r.getBlock(s.id);l.size={width:n.width,height:n.height,x:0,y:0,node:i},r.setBlock(l),i.remove()}async function ge(t,e,r){const s=de(e,0,!0);if("space"!==r.getBlock(s.id).type){const r=(0,o.zj)();await le(t,s,{config:r}),e.intersect=s?.intersect,ce(s)}}async function ue(t,e,r,s){for(const a of e)await s(t,a,r),a.children&&await ue(t,a.children,r,s)}async function pe(t,e,r){await ue(t,e,r,he)}async function ye(t,e,r){await ue(t,e,r,ge)}async function be(t,e,r,s,a){const i=new g.T({multigraph:!0,compound:!0});i.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(const n of r)n.size&&i.setNode(n.id,{width:n.size.width,height:n.size.height,intersect:n.intersect});for(const n of e)if(n.start&&n.end){const e=s.getBlock(n.start),r=s.getBlock(n.end);if(e?.size&&r?.size){const s=e.size,o=r.size,l=[{x:s.x,y:s.y},{x:s.x+(o.x-s.x)/2,y:s.y+(o.y-s.y)/2},{x:o.x,y:o.y}];xt(t,{v:n.start,w:n.end,name:n.id},{...n,arrowTypeEnd:n.arrowTypeEnd,arrowTypeStart:n.arrowTypeStart,points:l,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"},void 0,"block",i,a),n.label&&(await ht(t,{...n,label:n.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:n.arrowTypeEnd,arrowTypeStart:n.arrowTypeStart,points:l,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"}),ut({...n,x:l[1].x,y:l[1].y},{originalPath:l}))}}}(0,o.K2)(de,"getNodeFromBlock"),(0,o.K2)(he,"calculateBlockSize"),(0,o.K2)(ge,"insertBlockPositioned"),(0,o.K2)(ue,"performOperations"),(0,o.K2)(pe,"calculateBlockSizes"),(0,o.K2)(ye,"insertBlocks"),(0,o.K2)(be,"insertEdges");var xe=(0,o.K2)((function(t,e){return e.db.getClasses()}),"getClasses"),fe={parser:p,db:W,renderer:{draw:(0,o.K2)((async function(t,e,r,s){const{securityLevel:a,block:i}=(0,o.zj)(),n=s.db;let l;"sandbox"===a&&(l=(0,h.Ltv)("#i"+e));const c="sandbox"===a?(0,h.Ltv)(l.nodes()[0].contentDocument.body):(0,h.Ltv)("body"),d="sandbox"===a?c.select(`[id="${e}"]`):(0,h.Ltv)(`[id="${e}"]`);q(d,["point","circle","cross"],s.type,e);const g=n.getBlocks(),u=n.getBlocksFlat(),p=n.getEdges(),y=d.insert("g").attr("class","block");await pe(y,g,n);const b=rt(n);if(await ye(y,g,n),await be(y,p,u,n,e),b){const t=b,e=Math.max(1,Math.round(t.width/t.height*.125)),r=t.height+e+10,s=t.width+10,{useMaxWidth:a}=i;(0,o.a$)(d,r,s,!!a),o.Rm.debug("Here Bounds",b,t),d.attr("viewBox",`${t.x-5} ${t.y-5} ${t.width+10} ${t.height+10}`)}}),"draw"),getClasses:xe},styles:H}}}]); \ No newline at end of file diff --git a/assets/js/386099fc.57741657.js b/assets/js/386099fc.57741657.js new file mode 100644 index 000000000000..e94ed9b5d06d --- /dev/null +++ b/assets/js/386099fc.57741657.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3091],{18137:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>l,contentTitle:()=>i,default:()=>h,frontMatter:()=>o,metadata:()=>t,toc:()=>d});const t=JSON.parse('{"id":"learn/learn-polkadot-opengov-treasury","title":"Treasury","description":"Polkadot\'s On-chain Treasury.","source":"@site/../docs/learn/learn-polkadot-opengov-treasury.md","sourceDirName":"learn","slug":"/learn-polkadot-opengov-treasury","permalink":"/docs/learn-polkadot-opengov-treasury","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-polkadot-opengov-treasury.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1726760224000,"frontMatter":{"id":"learn-polkadot-opengov-treasury","title":"Treasury","sidebar_label":"Treasury","description":"Polkadot\'s On-chain Treasury.","keywords":["treasury","funds","funding","tips","tipping"],"slug":"../learn-polkadot-opengov-treasury"},"sidebar":"docs","previous":{"title":"Decentralized Futures","permalink":"/docs/decentralized-futures"},"next":{"title":"Polkadot Community Foundation","permalink":"/docs/polkadot-community-foundation"}}');var r=s(74848),a=s(28453);const o={id:"learn-polkadot-opengov-treasury",title:"Treasury",sidebar_label:"Treasury",description:"Polkadot's On-chain Treasury.",keywords:["treasury","funds","funding","tips","tipping"],slug:"../learn-polkadot-opengov-treasury"},i=void 0,l={},d=[{value:"Treasury Inflow and Outflow",id:"treasury-inflow-and-outflow",level:2},{value:"Treasury Tracks",id:"treasury-tracks",level:2},{value:"Submit Treasury Proposal via Polkassembly",id:"submit-treasury-proposal-via-polkassembly",level:2},{value:"Sub-treasuries",id:"sub-treasuries",level:2},{value:"Multi-Asset Treasury Support",id:"multi-asset-treasury-support",level:2},{value:"Bounties",id:"bounties",level:2},{value:"Parent Bounties",id:"parent-bounties",level:3},{value:"Child Bounties",id:"child-bounties",level:3}];function c(e){const n={a:"a",admonition:"admonition",blockquote:"blockquote",em:"em",h2:"h2",h3:"h3",hr:"hr",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,a.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(n.p,{children:["The Treasury is a pot of funds collected through a portion of block production rewards,\n",(0,r.jsx)(n.a,{href:"/docs/learn-transactions#transaction-fees",children:"transaction fees"}),", ",(0,r.jsx)(n.a,{href:"/docs/learn-offenses",children:"slashing"}),", and\n",(0,r.jsx)(n.a,{href:"/docs/learn-inflation",children:"staking inefficiencies"}),". Treasury funds are held in a\n",(0,r.jsx)(n.a,{href:"/docs/learn-account-advanced#system-accounts",children:"system account"})," that cannot be controlled by any\nexternal account; only the system internal logic can access it."]}),"\n",(0,r.jsx)(n.admonition,{title:"Creating a Treasury Proposal on Polkadot OpenGov",type:"tip",children:(0,r.jsxs)(n.p,{children:["If you would like to create a treasury proposal on Polkadot OpenGov, follow the instructions\noutlined on ",(0,r.jsx)(n.a,{href:"/docs/learn-guides-treasury#creating-a-treasury-proposal",children:"this how-to guide"}),"."]})}),"\n",(0,r.jsx)(n.h2,{id:"treasury-inflow-and-outflow",children:"Treasury Inflow and Outflow"}),"\n",(0,r.jsx)(n.p,{children:"Tokens that are deposited into the Treasury (i.e. the inflow) is determined by the following\nmechanisms:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Transaction fees:"})," 80% of the transaction fees of every submitted extrinsic is diverted to the\nTreasury, while 20% is given to the block producers."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Staking inefficiencies:"})," the network knows an exogenously determined parameter called ideal\nstaking rate. The APY for stakers (nominators & validators) decreases whenever the actual staking\nrate is not equal to the ideal staking rate. To keep inflation constant at 10%, the system does\nnot creates less tokens, rather some share of the overall reward for stakers is diverted to the\nTreasury (more information\n",(0,r.jsx)(n.a,{href:"https://research.web3.foundation/Polkadot/overview/token-economics",children:"here"}),")."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Slashes:"})," whenever validators and nominators are ",(0,r.jsx)(n.a,{href:"/docs/learn-offenses",children:"slashed"}),", a share of the\nslashed tokens are diverted to Treasury. They are typically rare and unpredictable events."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Transfers:"})," everyone can send funds to the Treasury directly. This is a rare event and\ntypically due to grantees reimbursing some of the amount they got allocated for various reasons."]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"The outflow is determined by the following mechanisms:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Burned tokens:"})," at the end of each spend period,\n",(0,r.jsx)(n.a,{href:"/docs/chain-state-values#treasury-burn-factor",children:"a fraction"})," of the available funds are\nburned."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Treasury proposals & Bounties:"})," they make up the largest share of outflow tokens to the\ncommunity and need to be approved by governance. Then, payouts occur at the end of a\n",(0,r.jsx)(n.a,{href:"/docs/glossary#spend-period",children:"spend period"}),"."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Tips:"})," smaller payouts directly to grantees that can happen within a\n",(0,r.jsx)(n.a,{href:"/docs/glossary#spend-period",children:"spend period"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(n.admonition,{title:"Spend Period Schedule",type:"info",children:[(0,r.jsxs)(n.p,{children:["On Polkadot-JS UI, navigate to Governance > Treasury to view the status of current\n",(0,r.jsx)(n.a,{href:"/docs/glossary#spend-period",children:"spend period"}),"."]}),(0,r.jsx)(n.p,{children:(0,r.jsx)(n.img,{alt:"preimage-whitelist",src:s(13900).A+"",width:"2508",height:"413"})})]}),"\n",(0,r.jsx)(n.h2,{id:"treasury-tracks",children:"Treasury Tracks"}),"\n",(0,r.jsxs)(n.p,{children:["OpenGov allows for managing funds through six tracks, each with its own\n",(0,r.jsx)(n.a,{href:"/docs/learn-polkadot-opengov-origins#origins-and-tracks-info",children:"origin and track parameters"}),"."]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/docs/learn-polkadot-opengov-origins#treasurer",children:"Treasurer"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/docs/learn-polkadot-opengov-origins#big-spender",children:"Big Spender"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/docs/learn-polkadot-opengov-origins#medium-spender",children:"Medium Spender"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/docs/learn-polkadot-opengov-origins#small-spender",children:"Small Spender"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/docs/learn-polkadot-opengov-origins#big-tipper",children:"Big Tipper"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/docs/learn-polkadot-opengov-origins#small-tipper",children:"Small Tipper"})}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"submit-treasury-proposal-via-polkassembly",children:"Submit Treasury Proposal via Polkassembly"}),"\n",(0,r.jsxs)(n.p,{children:["Access to Treasury funds requires successful enactment of referendum in the respective treasury\ntrack on-chain. Learn how to submit a treasury proposal for referendum using\n",(0,r.jsx)(n.a,{href:"/docs/governance-apps",children:"Polkassembly"}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["Go to ",(0,r.jsx)(n.a,{href:"https://polkadot.polkassembly.io/opengov",children:"Polkassembly"})," and click on the FAB button in the\nbottom right corner. Then,"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:'Click on "Create Treasury Proposal" and choose an address for the proposer'}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"After choosing an address, you will enter a three-stage guideline:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Write a proposal: you can add a detailed description for the proposal, which will be stored on\nPolkassembly. Alternatively, you can link an existing discussion post."}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.img,{alt:"polkassembly-write-proposal",src:s(14879).A+"",width:"2130",height:"1596"})}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Create a preimage: an existing preimage can be linked, or a new one can be created. To create a\npreimage, add the beneficiary address and the token amount. The track will be auto-selected and\nthe user can proceed with the creation of a preimage."}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.img,{alt:"polkassembly-create-preimage",src:s(94664).A+"",width:"2154",height:"1598"})}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Create a proposal: final confirmation about the proposal creation. The description of the\nproposal and the preimage are automatically linked to the proposal."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"sub-treasuries",children:"Sub-treasuries"}),"\n",(0,r.jsxs)(n.p,{children:["The treasury currently operates on a single account on-chain. The above tracks manage the outflow of\nthe treasury on the network. With ",(0,r.jsx)(n.em,{children:"sub"}),"-treasuries, having treasury accounts that correspond to each\n",(0,r.jsx)(n.a,{href:"./learn-system-chains#collectives",children:"collective"})," is also possible."]}),"\n",(0,r.jsxs)(n.p,{children:["Rather than have many referenda through OpenGov, the treasury can allocate funds to each\nsub-treasury (through ",(0,r.jsx)(n.a,{href:"./learn-polkadot-opengov",children:"governance"}),"), from which each respective collective\ncan spend funds (depending on their specific rule set)."]}),"\n",(0,r.jsxs)(n.p,{children:["New treasuries could be added to respective\n",(0,r.jsx)(n.a,{href:"./learn-system-chains#existing-system-chains",children:"system chains"})," through governance by adding more\ninstances of this pallet."]}),"\n",(0,r.jsx)(n.h2,{id:"multi-asset-treasury-support",children:"Multi-Asset Treasury Support"}),"\n",(0,r.jsxs)(n.p,{children:["The treasuries can support multiple asset types and thus can spend assets other than DOT (or KSM on\nKusama) held within the treasury, and their transfers and interactions across the chains facilitated\nby ",(0,r.jsx)(n.a,{href:"/docs/learn-xcm",children:"cross-consensus messaging"}),". These assets have a few requirements:"]}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["The asset is listed on the ",(0,r.jsx)(n.a,{href:"https://assethub-polkadot.subscan.io/",children:"AssetHub system parachain"}),"."]}),"\n",(0,r.jsx)(n.li,{children:"The asset is active and has sufficient liquidity to be utilized for payouts."}),"\n",(0,r.jsx)(n.li,{children:"The asset has a set conversion rate, as per OpenGov referenda on the Treasurer track (set via the\nasset rate pallet). This conversion rate defines a fixed-point representation for converting from\nthat asset to the native asset (DOT or KSM)."}),"\n",(0,r.jsx)(n.li,{children:"The asset must be approved and onboarded via OpenGov to become spendable via the treasury as a\nvalid spend method."}),"\n"]}),"\n",(0,r.jsxs)(n.blockquote,{children:["\n",(0,r.jsxs)(n.p,{children:["For example,\n",(0,r.jsx)(n.a,{href:"https://forum.polkadot.network/t/multi-asset-treasury-and-milestone-based-spends/6780",children:"see how USDT became approved as an asset on AssetHub"}),",\nwhich can be used in the treasury."]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"bounties",children:"Bounties"}),"\n",(0,r.jsx)(n.h3,{id:"parent-bounties",children:"Parent Bounties"}),"\n",(0,r.jsxs)(n.p,{children:["Getting treasury funding through OpenGov, depending on which treasury track you submit your\nreferendum, can be a long and uncertain process. This is not always a suitable option, for example,\nfor event organizers who need to pay costs upfront or close to the event's date. Bounties solve this\nproblem by procuring access to treasury funds in a single shot and using them to fund multiple\nevents later on through ",(0,r.jsx)(n.a,{href:"#child-bounties",children:"child bounties"}),". This is why bounties are also called\n",(0,r.jsx)(n.em,{children:"parent"})," bounties."]}),"\n",(0,r.jsxs)(n.p,{children:["Parent bounty proposals aim to reserve a portion of treasury funds once, which will be used later.\nThey save proponents the time needed to create and obtain approval for several OpenGov referenda.\nBounties are managed by curators, where the curator is usually a\n",(0,r.jsx)(n.a,{href:"/docs/learn-account-multisig",children:"multi-signature account"}),". Bounties can access a large amount of funds,\nso managing those funds with a multisig is a good practice to enhance security. Essentially,\ncurators are multisig addresses with agency over a portion of the treasury to promote events, fix a\nbug or vulnerability, develop a strategy, or monitor a set of tasks related to a specific topic, all\nfor the benefit of the ecosystem."]}),"\n",(0,r.jsxs)(n.p,{children:["A proposer can ",(0,r.jsx)(n.a,{href:"/docs/learn-guides-bounties#submit-a-bounty-proposal",children:"submit a bounty proposal"})," to\nOpenGov,\n",(0,r.jsx)(n.a,{href:"/docs/learn-guides-bounties#assign-a-curator-to-a-bounty",children:"with a curator to be defined later"}),", whose\nbackground and expertise is such that they can determine when the task is complete."]}),"\n",(0,r.jsx)(n.p,{children:"When submitting the value of the bounty, the proposer can specify a fee that will be paid to\ncurators willing to invest their time and expertise in the task; this amount will be included in the\ntotal value of the bounty. In this sense, the curator's fee can be defined as the difference between\nthe amounts paid to child bounty awardees and the total value of the bounty."}),"\n",(0,r.jsxs)(n.p,{children:["Curators are selected through OpenGov referendum after the bounty proposal passes; and they need to\npay an upfront ",(0,r.jsx)(n.a,{href:"/docs/chain-state-values#bounty-curator-deposit",children:"deposit"})," to take the\nposition. This deposit can be used to punish curators if they act maliciously. However, if they are\nsuccessful in managing the bounty to completion, they will receive their deposit back, and part of\nthe bounty funding as a payment for their efforts."]}),"\n",(0,r.jsx)(n.p,{children:"Curators are expected to have a decent track record in addressing the issues the bounty wants to\nsolve. They should be very knowledgeable on the topics covered by the bounty and have proven project\nmanagement skills or experience. These recommendations help ensure an effective use of the bounty\nmechanism. A Bounty is a reward for a specified body of work or set of objectives that needs to be\nexecuted for a predefined treasury amount designated to be paid out. The responsibility of assigning\na payout address once the specified set of objectives is completed is delegated to the curator."}),"\n",(0,r.jsxs)(n.p,{children:["The bounty has a ",(0,r.jsx)(n.a,{href:"/docs/chain-state-values#bounty-duration",children:"predetermined duration"}),", with\npossible extension(s) to be requested by the curator. To maintain flexibility during the tasks\u2019\ncuration, the curator will also be able to create child bounties for more granularity in the\nallocation of funds and as part of a nested iteration of the bounty mechanism."]}),"\n",(0,r.jsx)(n.h3,{id:"child-bounties",children:"Child Bounties"}),"\n",(0,r.jsxs)(n.p,{children:["Child bounties are spawned from ",(0,r.jsx)(n.a,{href:"#parent-bounties",children:"parent bounties"}),". Child bounties are used to\naccess funds directly from the parent bounty without going through an OpenGov referendum."]}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsx)(n.admonition,{title:"Polkadot-JS Guides",type:"info",children:(0,r.jsxs)(n.p,{children:["If you are an advanced user, see the ",(0,r.jsx)(n.a,{href:"/docs/learn-guides-bounties",children:"Polkadot-JS guides about bounties"}),"\nand ",(0,r.jsx)(n.a,{href:"/docs/learn-guides-treasury",children:"treasury"}),"."]})})]})}function h(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(c,{...e})}):c(e)}},94664:(e,n,s)=>{s.d(n,{A:()=>t});const t=s.p+"assets/images/polkassembly-create-preimage-7396a8ce796d0f0dcad30d3edced8618.png"},14879:(e,n,s)=>{s.d(n,{A:()=>t});const t=s.p+"assets/images/polkassembly-write-proposal-a3ce8ab9303111f6003ac8103ba29507.png"},13900:(e,n,s)=>{s.d(n,{A:()=>t});const t=s.p+"assets/images/treasury-spend-period-a4883f21d69a6f05ca497b9893cc89a5.png"},28453:(e,n,s)=>{s.d(n,{R:()=>o,x:()=>i});var t=s(96540);const r={},a=t.createContext(r);function o(e){const n=t.useContext(a);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:o(e.components),t.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/386099fc.f1f7ff95.js b/assets/js/386099fc.f1f7ff95.js deleted file mode 100644 index e0fdfeec58bc..000000000000 --- a/assets/js/386099fc.f1f7ff95.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3091],{97980:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>l,contentTitle:()=>o,default:()=>h,frontMatter:()=>a,metadata:()=>i,toc:()=>d});var t=s(74848),r=s(28453);const a={id:"learn-polkadot-opengov-treasury",title:"Treasury",sidebar_label:"Treasury",description:"Polkadot's On-chain Treasury.",keywords:["treasury","funds","funding","tips","tipping"],slug:"../learn-polkadot-opengov-treasury"},o=void 0,i={id:"learn/learn-polkadot-opengov-treasury",title:"Treasury",description:"Polkadot's On-chain Treasury.",source:"@site/../docs/learn/learn-polkadot-opengov-treasury.md",sourceDirName:"learn",slug:"/learn-polkadot-opengov-treasury",permalink:"/docs/learn-polkadot-opengov-treasury",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-polkadot-opengov-treasury.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1726760224e3,frontMatter:{id:"learn-polkadot-opengov-treasury",title:"Treasury",sidebar_label:"Treasury",description:"Polkadot's On-chain Treasury.",keywords:["treasury","funds","funding","tips","tipping"],slug:"../learn-polkadot-opengov-treasury"},sidebar:"docs",previous:{title:"Decentralized Futures",permalink:"/docs/decentralized-futures"},next:{title:"Polkadot Community Foundation",permalink:"/docs/polkadot-community-foundation"}},l={},d=[{value:"Treasury Inflow and Outflow",id:"treasury-inflow-and-outflow",level:2},{value:"Treasury Tracks",id:"treasury-tracks",level:2},{value:"Submit Treasury Proposal via Polkassembly",id:"submit-treasury-proposal-via-polkassembly",level:2},{value:"Sub-treasuries",id:"sub-treasuries",level:2},{value:"Multi-Asset Treasury Support",id:"multi-asset-treasury-support",level:2},{value:"Bounties",id:"bounties",level:2},{value:"Parent Bounties",id:"parent-bounties",level:3},{value:"Child Bounties",id:"child-bounties",level:3}];function c(e){const n={a:"a",admonition:"admonition",blockquote:"blockquote",em:"em",h2:"h2",h3:"h3",hr:"hr",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(n.p,{children:["The Treasury is a pot of funds collected through a portion of block production rewards,\n",(0,t.jsx)(n.a,{href:"/docs/learn-transactions#transaction-fees",children:"transaction fees"}),", ",(0,t.jsx)(n.a,{href:"/docs/learn-offenses",children:"slashing"}),", and\n",(0,t.jsx)(n.a,{href:"/docs/learn-inflation",children:"staking inefficiencies"}),". Treasury funds are held in a\n",(0,t.jsx)(n.a,{href:"/docs/learn-account-advanced#system-accounts",children:"system account"})," that cannot be controlled by any\nexternal account; only the system internal logic can access it."]}),"\n",(0,t.jsx)(n.admonition,{title:"Creating a Treasury Proposal on Polkadot OpenGov",type:"tip",children:(0,t.jsxs)(n.p,{children:["If you would like to create a treasury proposal on Polkadot OpenGov, follow the instructions\noutlined on ",(0,t.jsx)(n.a,{href:"/docs/learn-guides-treasury#creating-a-treasury-proposal",children:"this how-to guide"}),"."]})}),"\n",(0,t.jsx)(n.h2,{id:"treasury-inflow-and-outflow",children:"Treasury Inflow and Outflow"}),"\n",(0,t.jsx)(n.p,{children:"Tokens that are deposited into the Treasury (i.e. the inflow) is determined by the following\nmechanisms:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Transaction fees:"})," 80% of the transaction fees of every submitted extrinsic is diverted to the\nTreasury, while 20% is given to the block producers."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Staking inefficiencies:"})," the network knows an exogenously determined parameter called ideal\nstaking rate. The APY for stakers (nominators & validators) decreases whenever the actual staking\nrate is not equal to the ideal staking rate. To keep inflation constant at 10%, the system does\nnot creates less tokens, rather some share of the overall reward for stakers is diverted to the\nTreasury (more information\n",(0,t.jsx)(n.a,{href:"https://research.web3.foundation/Polkadot/overview/token-economics",children:"here"}),")."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Slashes:"})," whenever validators and nominators are ",(0,t.jsx)(n.a,{href:"/docs/learn-offenses",children:"slashed"}),", a share of the\nslashed tokens are diverted to Treasury. They are typically rare and unpredictable events."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Transfers:"})," everyone can send funds to the Treasury directly. This is a rare event and\ntypically due to grantees reimbursing some of the amount they got allocated for various reasons."]}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"The outflow is determined by the following mechanisms:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Burned tokens:"})," at the end of each spend period,\n",(0,t.jsx)(n.a,{href:"/docs/chain-state-values#treasury-burn-factor",children:"a fraction"})," of the available funds are\nburned."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Treasury proposals & Bounties:"})," they make up the largest share of outflow tokens to the\ncommunity and need to be approved by governance. Then, payouts occur at the end of a\n",(0,t.jsx)(n.a,{href:"/docs/glossary#spend-period",children:"spend period"}),"."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Tips:"})," smaller payouts directly to grantees that can happen within a\n",(0,t.jsx)(n.a,{href:"/docs/glossary#spend-period",children:"spend period"}),"."]}),"\n"]}),"\n",(0,t.jsxs)(n.admonition,{title:"Spend Period Schedule",type:"info",children:[(0,t.jsxs)(n.p,{children:["On Polkadot-JS UI, navigate to Governance > Treasury to view the status of current\n",(0,t.jsx)(n.a,{href:"/docs/glossary#spend-period",children:"spend period"}),"."]}),(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"preimage-whitelist",src:s(13900).A+"",width:"2508",height:"413"})})]}),"\n",(0,t.jsx)(n.h2,{id:"treasury-tracks",children:"Treasury Tracks"}),"\n",(0,t.jsxs)(n.p,{children:["OpenGov allows for managing funds through six tracks, each with its own\n",(0,t.jsx)(n.a,{href:"/docs/learn-polkadot-opengov-origins#origins-and-tracks-info",children:"origin and track parameters"}),"."]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"/docs/learn-polkadot-opengov-origins#treasurer",children:"Treasurer"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"/docs/learn-polkadot-opengov-origins#big-spender",children:"Big Spender"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"/docs/learn-polkadot-opengov-origins#medium-spender",children:"Medium Spender"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"/docs/learn-polkadot-opengov-origins#small-spender",children:"Small Spender"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"/docs/learn-polkadot-opengov-origins#big-tipper",children:"Big Tipper"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"/docs/learn-polkadot-opengov-origins#small-tipper",children:"Small Tipper"})}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"submit-treasury-proposal-via-polkassembly",children:"Submit Treasury Proposal via Polkassembly"}),"\n",(0,t.jsxs)(n.p,{children:["Access to Treasury funds requires successful enactment of referendum in the respective treasury\ntrack on-chain. Learn how to submit a treasury proposal for referendum using\n",(0,t.jsx)(n.a,{href:"/docs/governance-apps",children:"Polkassembly"}),"."]}),"\n",(0,t.jsxs)(n.p,{children:["Go to ",(0,t.jsx)(n.a,{href:"https://polkadot.polkassembly.io/opengov",children:"Polkassembly"})," and click on the FAB button in the\nbottom right corner. Then,"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:'Click on "Create Treasury Proposal" and choose an address for the proposer'}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"After choosing an address, you will enter a three-stage guideline:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Write a proposal: you can add a detailed description for the proposal, which will be stored on\nPolkassembly. Alternatively, you can link an existing discussion post."}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"polkassembly-write-proposal",src:s(14879).A+"",width:"2130",height:"1596"})}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Create a preimage: an existing preimage can be linked, or a new one can be created. To create a\npreimage, add the beneficiary address and the token amount. The track will be auto-selected and\nthe user can proceed with the creation of a preimage."}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"polkassembly-create-preimage",src:s(94664).A+"",width:"2154",height:"1598"})}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Create a proposal: final confirmation about the proposal creation. The description of the\nproposal and the preimage are automatically linked to the proposal."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"sub-treasuries",children:"Sub-treasuries"}),"\n",(0,t.jsxs)(n.p,{children:["The treasury currently operates on a single account on-chain. The above tracks manage the outflow of\nthe treasury on the network. With ",(0,t.jsx)(n.em,{children:"sub"}),"-treasuries, having treasury accounts that correspond to each\n",(0,t.jsx)(n.a,{href:"./learn-system-chains#collectives",children:"collective"})," is also possible."]}),"\n",(0,t.jsxs)(n.p,{children:["Rather than have many referenda through OpenGov, the treasury can allocate funds to each\nsub-treasury (through ",(0,t.jsx)(n.a,{href:"./learn-polkadot-opengov",children:"governance"}),"), from which each respective collective\ncan spend funds (depending on their specific rule set)."]}),"\n",(0,t.jsxs)(n.p,{children:["New treasuries could be added to respective\n",(0,t.jsx)(n.a,{href:"./learn-system-chains#existing-system-chains",children:"system chains"})," through governance by adding more\ninstances of this pallet."]}),"\n",(0,t.jsx)(n.h2,{id:"multi-asset-treasury-support",children:"Multi-Asset Treasury Support"}),"\n",(0,t.jsxs)(n.p,{children:["The treasuries can support multiple asset types and thus can spend assets other than DOT (or KSM on\nKusama) held within the treasury, and their transfers and interactions across the chains facilitated\nby ",(0,t.jsx)(n.a,{href:"/docs/learn-xcm",children:"cross-consensus messaging"}),". These assets have a few requirements:"]}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["The asset is listed on the ",(0,t.jsx)(n.a,{href:"https://assethub-polkadot.subscan.io/",children:"AssetHub system parachain"}),"."]}),"\n",(0,t.jsx)(n.li,{children:"The asset is active and has sufficient liquidity to be utilized for payouts."}),"\n",(0,t.jsx)(n.li,{children:"The asset has a set conversion rate, as per OpenGov referenda on the Treasurer track (set via the\nasset rate pallet). This conversion rate defines a fixed-point representation for converting from\nthat asset to the native asset (DOT or KSM)."}),"\n",(0,t.jsx)(n.li,{children:"The asset must be approved and onboarded via OpenGov to become spendable via the treasury as a\nvalid spend method."}),"\n"]}),"\n",(0,t.jsxs)(n.blockquote,{children:["\n",(0,t.jsxs)(n.p,{children:["For example,\n",(0,t.jsx)(n.a,{href:"https://forum.polkadot.network/t/multi-asset-treasury-and-milestone-based-spends/6780",children:"see how USDT became approved as an asset on AssetHub"}),",\nwhich can be used in the treasury."]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"bounties",children:"Bounties"}),"\n",(0,t.jsx)(n.h3,{id:"parent-bounties",children:"Parent Bounties"}),"\n",(0,t.jsxs)(n.p,{children:["Getting treasury funding through OpenGov, depending on which treasury track you submit your\nreferendum, can be a long and uncertain process. This is not always a suitable option, for example,\nfor event organizers who need to pay costs upfront or close to the event's date. Bounties solve this\nproblem by procuring access to treasury funds in a single shot and using them to fund multiple\nevents later on through ",(0,t.jsx)(n.a,{href:"#child-bounties",children:"child bounties"}),". This is why bounties are also called\n",(0,t.jsx)(n.em,{children:"parent"})," bounties."]}),"\n",(0,t.jsxs)(n.p,{children:["Parent bounty proposals aim to reserve a portion of treasury funds once, which will be used later.\nThey save proponents the time needed to create and obtain approval for several OpenGov referenda.\nBounties are managed by curators, where the curator is usually a\n",(0,t.jsx)(n.a,{href:"/docs/learn-account-multisig",children:"multi-signature account"}),". Bounties can access a large amount of funds,\nso managing those funds with a multisig is a good practice to enhance security. Essentially,\ncurators are multisig addresses with agency over a portion of the treasury to promote events, fix a\nbug or vulnerability, develop a strategy, or monitor a set of tasks related to a specific topic, all\nfor the benefit of the ecosystem."]}),"\n",(0,t.jsxs)(n.p,{children:["A proposer can ",(0,t.jsx)(n.a,{href:"/docs/learn-guides-bounties#submit-a-bounty-proposal",children:"submit a bounty proposal"})," to\nOpenGov,\n",(0,t.jsx)(n.a,{href:"/docs/learn-guides-bounties#assign-a-curator-to-a-bounty",children:"with a curator to be defined later"}),", whose\nbackground and expertise is such that they can determine when the task is complete."]}),"\n",(0,t.jsx)(n.p,{children:"When submitting the value of the bounty, the proposer can specify a fee that will be paid to\ncurators willing to invest their time and expertise in the task; this amount will be included in the\ntotal value of the bounty. In this sense, the curator's fee can be defined as the difference between\nthe amounts paid to child bounty awardees and the total value of the bounty."}),"\n",(0,t.jsxs)(n.p,{children:["Curators are selected through OpenGov referendum after the bounty proposal passes; and they need to\npay an upfront ",(0,t.jsx)(n.a,{href:"/docs/chain-state-values#bounty-curator-deposit",children:"deposit"})," to take the\nposition. This deposit can be used to punish curators if they act maliciously. However, if they are\nsuccessful in managing the bounty to completion, they will receive their deposit back, and part of\nthe bounty funding as a payment for their efforts."]}),"\n",(0,t.jsx)(n.p,{children:"Curators are expected to have a decent track record in addressing the issues the bounty wants to\nsolve. They should be very knowledgeable on the topics covered by the bounty and have proven project\nmanagement skills or experience. These recommendations help ensure an effective use of the bounty\nmechanism. A Bounty is a reward for a specified body of work or set of objectives that needs to be\nexecuted for a predefined treasury amount designated to be paid out. The responsibility of assigning\na payout address once the specified set of objectives is completed is delegated to the curator."}),"\n",(0,t.jsxs)(n.p,{children:["The bounty has a ",(0,t.jsx)(n.a,{href:"/docs/chain-state-values#bounty-duration",children:"predetermined duration"}),", with\npossible extension(s) to be requested by the curator. To maintain flexibility during the tasks\u2019\ncuration, the curator will also be able to create child bounties for more granularity in the\nallocation of funds and as part of a nested iteration of the bounty mechanism."]}),"\n",(0,t.jsx)(n.h3,{id:"child-bounties",children:"Child Bounties"}),"\n",(0,t.jsxs)(n.p,{children:["Child bounties are spawned from ",(0,t.jsx)(n.a,{href:"#parent-bounties",children:"parent bounties"}),". Child bounties are used to\naccess funds directly from the parent bounty without going through an OpenGov referendum."]}),"\n",(0,t.jsx)(n.hr,{}),"\n",(0,t.jsx)(n.admonition,{title:"Polkadot-JS Guides",type:"info",children:(0,t.jsxs)(n.p,{children:["If you are an advanced user, see the ",(0,t.jsx)(n.a,{href:"/docs/learn-guides-bounties",children:"Polkadot-JS guides about bounties"}),"\nand ",(0,t.jsx)(n.a,{href:"/docs/learn-guides-treasury",children:"treasury"}),"."]})})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(c,{...e})}):c(e)}},94664:(e,n,s)=>{s.d(n,{A:()=>t});const t=s.p+"assets/images/polkassembly-create-preimage-7396a8ce796d0f0dcad30d3edced8618.png"},14879:(e,n,s)=>{s.d(n,{A:()=>t});const t=s.p+"assets/images/polkassembly-write-proposal-a3ce8ab9303111f6003ac8103ba29507.png"},13900:(e,n,s)=>{s.d(n,{A:()=>t});const t=s.p+"assets/images/treasury-spend-period-a4883f21d69a6f05ca497b9893cc89a5.png"},28453:(e,n,s)=>{s.d(n,{R:()=>o,x:()=>i});var t=s(96540);const r={},a=t.createContext(r);function o(e){const n=t.useContext(a);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:o(e.components),t.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/386bfe51.6fbb1e75.js b/assets/js/386bfe51.6fbb1e75.js new file mode 100644 index 000000000000..a3955ad5bf2f --- /dev/null +++ b/assets/js/386bfe51.6fbb1e75.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6319],{48480:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>a,default:()=>h,frontMatter:()=>r,metadata:()=>i,toc:()=>c});const i=JSON.parse('{"id":"general/contributing","title":"Contributing to the Polkadot Wiki","description":"Contribute to the Polkadot Wiki.","source":"@site/../docs/general/contributing.md","sourceDirName":"general","slug":"/contributing","permalink":"/docs/contributing","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/contributing.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1728544529000,"frontMatter":{"id":"contributing","title":"Contributing to the Polkadot Wiki","sidebar_label":"Contributing to the Wiki","description":"Contribute to the Polkadot Wiki.","keywords":["contributing","contributions","translations"],"slug":"../contributing"},"sidebar":"docs","previous":{"title":"Community","permalink":"/docs/community"},"next":{"title":"Contributors","permalink":"/docs/contributors"}}');var o=t(74848),s=t(28453);const r={id:"contributing",title:"Contributing to the Polkadot Wiki",sidebar_label:"Contributing to the Wiki",description:"Contribute to the Polkadot Wiki.",keywords:["contributing","contributions","translations"],slug:"../contributing"},a=void 0,l={},c=[{value:"How to Contribute",id:"how-to-contribute",level:2},{value:"Ground Rules for Contributing",id:"ground-rules-for-contributing",level:2},{value:"Style Guides",id:"style-guides",level:2},{value:"Render the Wiki Locally",id:"render-the-wiki-locally",level:3},{value:"Rendering On-chain Values",id:"rendering-on-chain-values",level:3},{value:"Heritage",id:"heritage",level:2}];function d(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.p,{children:"The wiki was started and is maintained by the Web3 Foundation. It is an open-source project and aims\nto be the most extensive knowledge resource on the Polkadot and Kusama ecosystems. Much of the\nmaterial currently focuses on Polkadot and Kusama directly, but is open to covering informational\nmaterial for community projects."}),"\n",(0,o.jsx)(n.admonition,{title:"Marketing material",type:"caution",children:(0,o.jsx)(n.p,{children:"Please do not try to pull request any marketing material as this will be rejected."})}),"\n",(0,o.jsxs)(n.p,{children:["Nonetheless, pull requests, discussions, and contributions from the community are encouraged. Active\ncommunity members who demonstrate a record of good contributions may be given ",(0,o.jsx)(n.code,{children:"write"})," access to the\nrepository."]}),"\n",(0,o.jsx)(n.p,{children:"Otherwise, the Web3 Foundation holds the administrative position and has the final say on the\nincluded content. Specifically, the foundation\u2019s Technical Education team is most directly involved."}),"\n",(0,o.jsx)(n.admonition,{title:"Contributing Explainer",type:"note",children:(0,o.jsxs)(n.p,{children:["Check out the ",(0,o.jsx)(n.a,{href:"https://www.youtube.com/watch?v=6i55KOcy7B0",children:"How to Contribute to the Polkadot Wiki"}),"\nvideo for steps on contributions."]})}),"\n",(0,o.jsx)(n.h2,{id:"how-to-contribute",children:"How to Contribute"}),"\n",(0,o.jsxs)(n.p,{children:["You can contribute to the wiki on the\n",(0,o.jsx)(n.a,{href:"https://github.com/w3f/polkadot-wiki",children:"w3f/polkadot-wiki GitHub repository"}),". Every page is a\n",(0,o.jsx)(n.a,{href:"https://guides.github.com/features/mastering-markdown/",children:"MarkDown"})," file, which is an easy-to-learn\nsyntax extension to plain text that makes creating links, rendering images, and nice-looking\nformatting simple."]}),"\n",(0,o.jsx)(n.p,{children:'Each page has an "Edit this page" link at the bottom of the content. By clicking it, you are taken\nto the GitHub sign-in page, where you can either log in or create an account.'}),"\n",(0,o.jsxs)(n.p,{children:["Once logged in, you'll be taken to the GitHub built-in text editor, where you can make your edits\ndirectly. When you've completed your changes, you can add any specific details on what was changed\nand commit to a ",(0,o.jsx)(n.strong,{children:"new branch"})," to create a new Pull Request to the repository. From there, one of\nthe maintainers will review your changes and either merge them or request changes."]}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.img,{alt:"contributing",src:t(94876).A+"",width:"2044",height:"1402"}),"\n",(0,o.jsx)(n.img,{alt:"creating-pull-request",src:t(15389).A+"",width:"2112",height:"812"})]}),"\n",(0,o.jsx)(n.p,{children:'Remember that after you click "Propose Changes", you must also click on "Create Pull Request" on the\nnext page.'}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"creating-pull-request-2",src:t(96916).A+"",width:"1201",height:"655"})}),"\n",(0,o.jsx)(n.h2,{id:"ground-rules-for-contributing",children:"Ground Rules for Contributing"}),"\n",(0,o.jsx)(n.p,{children:"There are a few basic ground rules for contributors:"}),"\n",(0,o.jsxs)(n.ol,{children:["\n",(0,o.jsxs)(n.li,{children:[(0,o.jsxs)(n.strong,{children:["No ",(0,o.jsx)(n.code,{children:"--force"})," pushes"]})," or modifying the Git history in any way."]}),"\n",(0,o.jsx)(n.li,{children:"Pull requests are preferred to issues, especially for small changes such as typos. Issues should\nbe used for generic or broad-based changes or missing content. Suggestions and requests are\nencouraged."}),"\n",(0,o.jsxs)(n.li,{children:["Only use ",(0,o.jsx)(n.strong,{children:"non-master branches"}),"."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Significant modifications"}),", even by contributors, ought to be subject to a ",(0,o.jsx)(n.strong,{children:"pull request"})," to\nsolicit feedback from other contributors."]}),"\n",(0,o.jsxs)(n.li,{children:["Pull requests to solicit feedback are ",(0,o.jsx)(n.em,{children:"encouraged"})," for any other non-trivial contribution but\nleft to the contributor\u2019s discretion."]}),"\n",(0,o.jsxs)(n.li,{children:["Contributors should adhere to the prevailing ",(0,o.jsx)(n.code,{children:"MarkDown"})," style, language, and layout."]}),"\n",(0,o.jsx)(n.li,{children:"Correct grammar should be used at all times. Pull requests with typos will not be merged until\nfixed."}),"\n",(0,o.jsx)(n.li,{children:"Care should be taken to remain as objective and informative as possible. There should be no\neditorializing, and external bias should not be present."}),"\n",(0,o.jsxs)(n.li,{children:["We use the Prettier plugin to standardize the style across documents. You can run this on your\nlocal copy with ",(0,o.jsx)(n.code,{children:"npx lint-staged"}),", but for simplicity, we also have a bot that runs this for us\nin your PRs."]}),"\n"]}),"\n",(0,o.jsx)(n.h2,{id:"style-guides",children:"Style Guides"}),"\n",(0,o.jsx)(n.admonition,{title:"Wiki General Style Guides",type:"info",children:(0,o.jsxs)(n.p,{children:["The style guide from the\n",(0,o.jsx)(n.a,{href:"https://github.com/substrate-developer-hub/knowledgebase/blob/master/CONTRIBUTING.md#documentation-style",children:"Substrate Knowledge Base"}),"\nprovides general guidelines about how to write your Wiki contribution. See also\n",(0,o.jsx)(n.a,{href:"https://github.com/w3f/polkadot-wiki?tab=readme-ov-file#contributing-to-documentation",children:"the Wiki readme file"}),"."]})}),"\n",(0,o.jsxs)(n.p,{children:["The Polkadot Wiki is powered by ",(0,o.jsx)(n.a,{href:"https://docusaurus.io/",children:"Docusaurus"}),". Docusaurus 3 was a major\nversion upgrade that caused ",(0,o.jsx)(n.a,{href:"https://docusaurus.io/docs/3.2.1/migration/v3",children:"MDX errors"}),". As a\ngeneral rule, avoid using curly brackets and special characters. If you must use them, for example,\nto get the <-> symbol, you can escape the error with a ",(0,o.jsx)(n.code,{children:"\\"}),"."]}),"\n",(0,o.jsxs)(n.p,{children:["Following the Docusaurus 3 upgrade, conditional rendering has been disabled for Kusama and system\nchains. The previously used code for conditional rendering can be accessed\n",(0,o.jsx)(n.a,{href:"https://github.com/w3f/polkadot-wiki/blob/master/scripts/injectPlugin.js",children:"here"}),". Although\nDocusaurus 3 can support conditional rendering, due to practicality, we encourage using ",(0,o.jsx)(n.code,{children:"Tabs"})," and\n",(0,o.jsx)(n.code,{children:"TabItem"})," formatting if you need to display text for different chains."]}),"\n",(0,o.jsxs)(n.p,{children:["Avoid using exclamation marks ",(0,o.jsx)(n.code,{children:"!"})," and informal sentences, which are usually more appropriate for\nblog posts. Running a grammar check before submitting your pull request for review can save\nreviewers time and speed up the review process."]}),"\n",(0,o.jsx)(n.p,{children:"To ensure consistency across pages, note the following general terms:"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.code,{children:"relay chain"})," in text and ",(0,o.jsx)(n.code,{children:"Relay chain"})," at the beginning of a sentence."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.code,{children:"parachain"})," in text and ",(0,o.jsx)(n.code,{children:"Parachain"})," at the beginning of a sentence."]}),"\n"]}),"\n",(0,o.jsx)(n.p,{children:"The Polkadot Wiki has multiple moving parts. To ensure your contribution does not introduce\ncompilation errors and that your page is properly rendered in production, we encourage you to build\nand render the Wiki on your local machine before submitting a pull request for review. Rendering the\nWiki locally also adds the benefit of checking for broken links."}),"\n",(0,o.jsx)(n.h3,{id:"render-the-wiki-locally",children:"Render the Wiki Locally"}),"\n",(0,o.jsxs)(n.p,{children:["The Polkadot Wiki is built from the source files in\n",(0,o.jsx)(n.a,{href:"https://github.com/w3f/polkadot-wiki",children:"this GitHub repository"}),". The Wiki uses Algolia search, which\ncan be accessed locally by providing the correct App ID and API key. The ",(0,o.jsx)(n.code,{children:"app_id"})," and ",(0,o.jsx)(n.code,{children:"api_key"}),"\nenvironment variables are needed to build the Wiki successfully. If you are an external contributor,\nset the variables with some values like shown below, which lets the Wiki repo build successfully\n(but disables the search bar)."]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:'export app_id="xxxxxx" api_key="xxxxxxx"\n'})}),"\n",(0,o.jsxs)(n.p,{children:["After cloning the source locally, you can start the website with the commands below (ensure you run\n",(0,o.jsx)(n.code,{children:"yarn"})," at the root of the repository first to install dependencies)."]}),"\n",(0,o.jsx)(n.p,{children:"Using yarn, run:"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:"yarn install\n"})}),"\n",(0,o.jsx)(n.p,{children:"Then you can build the Wiki:"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:"yarn polkadot:build\n"})}),"\n",(0,o.jsx)(n.p,{children:"And finally, you can start the Wiki:"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:"yarn polkadot:start\n"})}),"\n",(0,o.jsx)(n.h3,{id:"rendering-on-chain-values",children:"Rendering On-chain Values"}),"\n",(0,o.jsxs)(n.p,{children:["The Polkadot Wiki can render chain state values via RPC as shown\n",(0,o.jsx)(n.a,{href:"https://github.com/w3f/polkadot-wiki/blob/master/components/RPC-Connection.jsx",children:"here"})," and display\nthem directly in the docs without the need to recompile or even reload the web app. The rendering of\non-chain values is reserved only in the ",(0,o.jsx)(n.a,{href:"/docs/chain-state-values",children:"Chain State page"}),"."]}),"\n",(0,o.jsx)(n.p,{children:"See the example for a react component below:"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:'\n'})}),"\n",(0,o.jsxs)(n.p,{children:["Where ",(0,o.jsx)(n.code,{children:"network"})," can be set to ",(0,o.jsx)(n.code,{children:"polkadot"}),", ",(0,o.jsx)(n.code,{children:"kusama"}),", ",(0,o.jsx)(n.code,{children:"statemint"})," (Polkadot Asset Hub), ",(0,o.jsx)(n.code,{children:"statemine"}),"\n(Kusama Asset Hub), ",(0,o.jsx)(n.code,{children:"polkadotpeople"}),", and ",(0,o.jsx)(n.code,{children:"kusamapeople"}),". The ",(0,o.jsx)(n.code,{children:"path"})," is composed by:"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.code,{children:"query"})," or ",(0,o.jsx)(n.code,{children:"const"})]}),"\n",(0,o.jsx)(n.li,{children:"pallet and call"}),"\n"]}),"\n",(0,o.jsxs)(n.p,{children:["The example above shows the path to query the number of validators within the staking pallet. For\nmore information, see\n",(0,o.jsx)(n.a,{href:"/docs/learn-transactions#pallets-and-extrinsics",children:"pallets and extrinsics"}),". The ",(0,o.jsx)(n.code,{children:"defaultValue"}),"\nis the value the react component shows if there is an issue with fetching data on-chain. A\n",(0,o.jsxs)(n.a,{href:"https://github.com/w3f/polkadot-wiki/blob/master/components/utilities/filters.js",children:[(0,o.jsx)(n.code,{children:"filter"})," flag"]})," is\nalso available to make values human readable, covert block number to days, etc."]}),"\n",(0,o.jsx)(n.h2,{id:"heritage",children:"Heritage"}),"\n",(0,o.jsxs)(n.p,{children:["This document is based on the\n",(0,o.jsx)(n.a,{href:"https://github.com/Level/community/blob/master/CONTRIBUTING.md",children:"Level contribution guidelines"}),"."]})]})}function h(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},94876:(e,n,t)=>{t.d(n,{A:()=>i});const i=t.p+"assets/images/contributing-69801a2ab9b4924d0057fd15ffeb53ab.png"},96916:(e,n,t)=>{t.d(n,{A:()=>i});const i=t.p+"assets/images/creating-pull-request-2-dbd958496c4e13a05ce366472d8235f0.png"},15389:(e,n,t)=>{t.d(n,{A:()=>i});const i=t.p+"assets/images/creating-pull-request-d619fd33e91fa84290fb190070c603f4.png"},28453:(e,n,t)=>{t.d(n,{R:()=>r,x:()=>a});var i=t(96540);const o={},s=i.createContext(o);function r(e){const n=i.useContext(s);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:r(e.components),i.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/386bfe51.e5708b85.js b/assets/js/386bfe51.e5708b85.js deleted file mode 100644 index e4faf3ad9194..000000000000 --- a/assets/js/386bfe51.e5708b85.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6319],{71220:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>r,default:()=>h,frontMatter:()=>s,metadata:()=>a,toc:()=>c});var i=t(74848),o=t(28453);const s={id:"contributing",title:"Contributing to the Polkadot Wiki",sidebar_label:"Contributing to the Wiki",description:"Contribute to the Polkadot Wiki.",keywords:["contributing","contributions","translations"],slug:"../contributing"},r=void 0,a={id:"general/contributing",title:"Contributing to the Polkadot Wiki",description:"Contribute to the Polkadot Wiki.",source:"@site/../docs/general/contributing.md",sourceDirName:"general",slug:"/contributing",permalink:"/docs/contributing",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/contributing.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1728544529e3,frontMatter:{id:"contributing",title:"Contributing to the Polkadot Wiki",sidebar_label:"Contributing to the Wiki",description:"Contribute to the Polkadot Wiki.",keywords:["contributing","contributions","translations"],slug:"../contributing"},sidebar:"docs",previous:{title:"Community",permalink:"/docs/community"},next:{title:"Contributors",permalink:"/docs/contributors"}},l={},c=[{value:"How to Contribute",id:"how-to-contribute",level:2},{value:"Ground Rules for Contributing",id:"ground-rules-for-contributing",level:2},{value:"Style Guides",id:"style-guides",level:2},{value:"Render the Wiki Locally",id:"render-the-wiki-locally",level:3},{value:"Rendering On-chain Values",id:"rendering-on-chain-values",level:3},{value:"Heritage",id:"heritage",level:2}];function d(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,o.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.p,{children:"The wiki was started and is maintained by the Web3 Foundation. It is an open-source project and aims\nto be the most extensive knowledge resource on the Polkadot and Kusama ecosystems. Much of the\nmaterial currently focuses on Polkadot and Kusama directly, but is open to covering informational\nmaterial for community projects."}),"\n",(0,i.jsx)(n.admonition,{title:"Marketing material",type:"caution",children:(0,i.jsx)(n.p,{children:"Please do not try to pull request any marketing material as this will be rejected."})}),"\n",(0,i.jsxs)(n.p,{children:["Nonetheless, pull requests, discussions, and contributions from the community are encouraged. Active\ncommunity members who demonstrate a record of good contributions may be given ",(0,i.jsx)(n.code,{children:"write"})," access to the\nrepository."]}),"\n",(0,i.jsx)(n.p,{children:"Otherwise, the Web3 Foundation holds the administrative position and has the final say on the\nincluded content. Specifically, the foundation\u2019s Technical Education team is most directly involved."}),"\n",(0,i.jsx)(n.admonition,{title:"Contributing Explainer",type:"note",children:(0,i.jsxs)(n.p,{children:["Check out the ",(0,i.jsx)(n.a,{href:"https://www.youtube.com/watch?v=6i55KOcy7B0",children:"How to Contribute to the Polkadot Wiki"}),"\nvideo for steps on contributions."]})}),"\n",(0,i.jsx)(n.h2,{id:"how-to-contribute",children:"How to Contribute"}),"\n",(0,i.jsxs)(n.p,{children:["You can contribute to the wiki on the\n",(0,i.jsx)(n.a,{href:"https://github.com/w3f/polkadot-wiki",children:"w3f/polkadot-wiki GitHub repository"}),". Every page is a\n",(0,i.jsx)(n.a,{href:"https://guides.github.com/features/mastering-markdown/",children:"MarkDown"})," file, which is an easy-to-learn\nsyntax extension to plain text that makes creating links, rendering images, and nice-looking\nformatting simple."]}),"\n",(0,i.jsx)(n.p,{children:'Each page has an "Edit this page" link at the bottom of the content. By clicking it, you are taken\nto the GitHub sign-in page, where you can either log in or create an account.'}),"\n",(0,i.jsxs)(n.p,{children:["Once logged in, you'll be taken to the GitHub built-in text editor, where you can make your edits\ndirectly. When you've completed your changes, you can add any specific details on what was changed\nand commit to a ",(0,i.jsx)(n.strong,{children:"new branch"})," to create a new Pull Request to the repository. From there, one of\nthe maintainers will review your changes and either merge them or request changes."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.img,{alt:"contributing",src:t(94876).A+"",width:"2044",height:"1402"}),"\n",(0,i.jsx)(n.img,{alt:"creating-pull-request",src:t(15389).A+"",width:"2112",height:"812"})]}),"\n",(0,i.jsx)(n.p,{children:'Remember that after you click "Propose Changes", you must also click on "Create Pull Request" on the\nnext page.'}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"creating-pull-request-2",src:t(96916).A+"",width:"1201",height:"655"})}),"\n",(0,i.jsx)(n.h2,{id:"ground-rules-for-contributing",children:"Ground Rules for Contributing"}),"\n",(0,i.jsx)(n.p,{children:"There are a few basic ground rules for contributors:"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsxs)(n.strong,{children:["No ",(0,i.jsx)(n.code,{children:"--force"})," pushes"]})," or modifying the Git history in any way."]}),"\n",(0,i.jsx)(n.li,{children:"Pull requests are preferred to issues, especially for small changes such as typos. Issues should\nbe used for generic or broad-based changes or missing content. Suggestions and requests are\nencouraged."}),"\n",(0,i.jsxs)(n.li,{children:["Only use ",(0,i.jsx)(n.strong,{children:"non-master branches"}),"."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Significant modifications"}),", even by contributors, ought to be subject to a ",(0,i.jsx)(n.strong,{children:"pull request"})," to\nsolicit feedback from other contributors."]}),"\n",(0,i.jsxs)(n.li,{children:["Pull requests to solicit feedback are ",(0,i.jsx)(n.em,{children:"encouraged"})," for any other non-trivial contribution but\nleft to the contributor\u2019s discretion."]}),"\n",(0,i.jsxs)(n.li,{children:["Contributors should adhere to the prevailing ",(0,i.jsx)(n.code,{children:"MarkDown"})," style, language, and layout."]}),"\n",(0,i.jsx)(n.li,{children:"Correct grammar should be used at all times. Pull requests with typos will not be merged until\nfixed."}),"\n",(0,i.jsx)(n.li,{children:"Care should be taken to remain as objective and informative as possible. There should be no\neditorializing, and external bias should not be present."}),"\n",(0,i.jsxs)(n.li,{children:["We use the Prettier plugin to standardize the style across documents. You can run this on your\nlocal copy with ",(0,i.jsx)(n.code,{children:"npx lint-staged"}),", but for simplicity, we also have a bot that runs this for us\nin your PRs."]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"style-guides",children:"Style Guides"}),"\n",(0,i.jsx)(n.admonition,{title:"Wiki General Style Guides",type:"info",children:(0,i.jsxs)(n.p,{children:["The style guide from the\n",(0,i.jsx)(n.a,{href:"https://github.com/substrate-developer-hub/knowledgebase/blob/master/CONTRIBUTING.md#documentation-style",children:"Substrate Knowledge Base"}),"\nprovides general guidelines about how to write your Wiki contribution. See also\n",(0,i.jsx)(n.a,{href:"https://github.com/w3f/polkadot-wiki?tab=readme-ov-file#contributing-to-documentation",children:"the Wiki readme file"}),"."]})}),"\n",(0,i.jsxs)(n.p,{children:["The Polkadot Wiki is powered by ",(0,i.jsx)(n.a,{href:"https://docusaurus.io/",children:"Docusaurus"}),". Docusaurus 3 was a major\nversion upgrade that caused ",(0,i.jsx)(n.a,{href:"https://docusaurus.io/docs/3.2.1/migration/v3",children:"MDX errors"}),". As a\ngeneral rule, avoid using curly brackets and special characters. If you must use them, for example,\nto get the <-> symbol, you can escape the error with a ",(0,i.jsx)(n.code,{children:"\\"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["Following the Docusaurus 3 upgrade, conditional rendering has been disabled for Kusama and system\nchains. The previously used code for conditional rendering can be accessed\n",(0,i.jsx)(n.a,{href:"https://github.com/w3f/polkadot-wiki/blob/master/scripts/injectPlugin.js",children:"here"}),". Although\nDocusaurus 3 can support conditional rendering, due to practicality, we encourage using ",(0,i.jsx)(n.code,{children:"Tabs"})," and\n",(0,i.jsx)(n.code,{children:"TabItem"})," formatting if you need to display text for different chains."]}),"\n",(0,i.jsxs)(n.p,{children:["Avoid using exclamation marks ",(0,i.jsx)(n.code,{children:"!"})," and informal sentences, which are usually more appropriate for\nblog posts. Running a grammar check before submitting your pull request for review can save\nreviewers time and speed up the review process."]}),"\n",(0,i.jsx)(n.p,{children:"To ensure consistency across pages, note the following general terms:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"relay chain"})," in text and ",(0,i.jsx)(n.code,{children:"Relay chain"})," at the beginning of a sentence."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"parachain"})," in text and ",(0,i.jsx)(n.code,{children:"Parachain"})," at the beginning of a sentence."]}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"The Polkadot Wiki has multiple moving parts. To ensure your contribution does not introduce\ncompilation errors and that your page is properly rendered in production, we encourage you to build\nand render the Wiki on your local machine before submitting a pull request for review. Rendering the\nWiki locally also adds the benefit of checking for broken links."}),"\n",(0,i.jsx)(n.h3,{id:"render-the-wiki-locally",children:"Render the Wiki Locally"}),"\n",(0,i.jsxs)(n.p,{children:["The Polkadot Wiki is built from the source files in\n",(0,i.jsx)(n.a,{href:"https://github.com/w3f/polkadot-wiki",children:"this GitHub repository"}),". The Wiki uses Algolia search, which\ncan be accessed locally by providing the correct App ID and API key. The ",(0,i.jsx)(n.code,{children:"app_id"})," and ",(0,i.jsx)(n.code,{children:"api_key"}),"\nenvironment variables are needed to build the Wiki successfully. If you are an external contributor,\nset the variables with some values like shown below, which lets the Wiki repo build successfully\n(but disables the search bar)."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:'export app_id="xxxxxx" api_key="xxxxxxx"\n'})}),"\n",(0,i.jsxs)(n.p,{children:["After cloning the source locally, you can start the website with the commands below (ensure you run\n",(0,i.jsx)(n.code,{children:"yarn"})," at the root of the repository first to install dependencies)."]}),"\n",(0,i.jsx)(n.p,{children:"Using yarn, run:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"yarn install\n"})}),"\n",(0,i.jsx)(n.p,{children:"Then you can build the Wiki:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"yarn polkadot:build\n"})}),"\n",(0,i.jsx)(n.p,{children:"And finally, you can start the Wiki:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"yarn polkadot:start\n"})}),"\n",(0,i.jsx)(n.h3,{id:"rendering-on-chain-values",children:"Rendering On-chain Values"}),"\n",(0,i.jsxs)(n.p,{children:["The Polkadot Wiki can render chain state values via RPC as shown\n",(0,i.jsx)(n.a,{href:"https://github.com/w3f/polkadot-wiki/blob/master/components/RPC-Connection.jsx",children:"here"})," and display\nthem directly in the docs without the need to recompile or even reload the web app. The rendering of\non-chain values is reserved only in the ",(0,i.jsx)(n.a,{href:"/docs/chain-state-values",children:"Chain State page"}),"."]}),"\n",(0,i.jsx)(n.p,{children:"See the example for a react component below:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:'\n'})}),"\n",(0,i.jsxs)(n.p,{children:["Where ",(0,i.jsx)(n.code,{children:"network"})," can be set to ",(0,i.jsx)(n.code,{children:"polkadot"}),", ",(0,i.jsx)(n.code,{children:"kusama"}),", ",(0,i.jsx)(n.code,{children:"statemint"})," (Polkadot Asset Hub), ",(0,i.jsx)(n.code,{children:"statemine"}),"\n(Kusama Asset Hub), ",(0,i.jsx)(n.code,{children:"polkadotpeople"}),", and ",(0,i.jsx)(n.code,{children:"kusamapeople"}),". The ",(0,i.jsx)(n.code,{children:"path"})," is composed by:"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"query"})," or ",(0,i.jsx)(n.code,{children:"const"})]}),"\n",(0,i.jsx)(n.li,{children:"pallet and call"}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["The example above shows the path to query the number of validators within the staking pallet. For\nmore information, see\n",(0,i.jsx)(n.a,{href:"/docs/learn-transactions#pallets-and-extrinsics",children:"pallets and extrinsics"}),". The ",(0,i.jsx)(n.code,{children:"defaultValue"}),"\nis the value the react component shows if there is an issue with fetching data on-chain. A\n",(0,i.jsxs)(n.a,{href:"https://github.com/w3f/polkadot-wiki/blob/master/components/utilities/filters.js",children:[(0,i.jsx)(n.code,{children:"filter"})," flag"]})," is\nalso available to make values human readable, covert block number to days, etc."]}),"\n",(0,i.jsx)(n.h2,{id:"heritage",children:"Heritage"}),"\n",(0,i.jsxs)(n.p,{children:["This document is based on the\n",(0,i.jsx)(n.a,{href:"https://github.com/Level/community/blob/master/CONTRIBUTING.md",children:"Level contribution guidelines"}),"."]})]})}function h(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}},94876:(e,n,t)=>{t.d(n,{A:()=>i});const i=t.p+"assets/images/contributing-69801a2ab9b4924d0057fd15ffeb53ab.png"},96916:(e,n,t)=>{t.d(n,{A:()=>i});const i=t.p+"assets/images/creating-pull-request-2-dbd958496c4e13a05ce366472d8235f0.png"},15389:(e,n,t)=>{t.d(n,{A:()=>i});const i=t.p+"assets/images/creating-pull-request-d619fd33e91fa84290fb190070c603f4.png"},28453:(e,n,t)=>{t.d(n,{R:()=>r,x:()=>a});var i=t(96540);const o={},s=i.createContext(o);function r(e){const n=i.useContext(s);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:r(e.components),i.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/387813b8.378117e3.js b/assets/js/387813b8.378117e3.js deleted file mode 100644 index adfe5834d2ec..000000000000 --- a/assets/js/387813b8.378117e3.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2409],{68766:(e,a,r)=>{r.r(a),r.d(a,{assets:()=>c,contentTitle:()=>s,default:()=>h,frontMatter:()=>t,metadata:()=>o,toc:()=>d});var n=r(74848),i=r(28453);const t={id:"learn-guides-coretime-parachains",title:"Agile Coretime for Parachains",sidebar_label:"Coretime for Parachains",description:"Agile Coretime from Parachains perspective",keywords:["coretime","blockspace","parathread","parachain","cores"],slug:"../learn-guides-coretime-parachains"},s=void 0,o={id:"learn/learn-guides-coretime-parachains",title:"Agile Coretime for Parachains",description:"Agile Coretime from Parachains perspective",source:"@site/../docs/learn/learn-guides-coretime-parachains.md",sourceDirName:"learn",slug:"/learn-guides-coretime-parachains",permalink:"/docs/learn-guides-coretime-parachains",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-coretime-parachains.md",tags:[],version:"current",lastUpdatedBy:"bader y",lastUpdatedAt:1729243924e3,frontMatter:{id:"learn-guides-coretime-parachains",title:"Agile Coretime for Parachains",sidebar_label:"Coretime for Parachains",description:"Agile Coretime from Parachains perspective",keywords:["coretime","blockspace","parathread","parachain","cores"],slug:"../learn-guides-coretime-parachains"},sidebar:"docs",previous:{title:"Coretime Marketplaces",permalink:"/docs/learn-guides-coretime-marketplaces"},next:{title:"Bridges",permalink:"/docs/learn-bridges"}},c={},d=[{value:"Reserve ParaID",id:"reserve-paraid",level:2},{value:"Register Parachain State and Code",id:"register-parachain-state-and-code",level:2},{value:"Run Parachain Collator",id:"run-parachain-collator",level:2},{value:"Run a Parachain with Bulk Coretime",id:"run-a-parachain-with-bulk-coretime",level:2},{value:"Run a Parachain with On-demand Coretime",id:"run-a-parachain-with-on-demand-coretime",level:2}];function l(e){const a={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",img:"img",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(a.admonition,{type:"info",children:(0,n.jsxs)(a.p,{children:["If you aren't sure what Agile Coretime is, be sure to read the\n",(0,n.jsx)(a.a,{href:"/docs/learn-agile-coretime",children:"introduction"}),",\n",(0,n.jsx)(a.a,{href:"/docs/learn-agile-coretime#agile-coretime-terminology",children:"terminology"}),", and\n",(0,n.jsx)(a.a,{href:"/docs/learn-agile-coretime#agile-coretime-faq",children:"FAQ"}),"."]})}),"\n",(0,n.jsxs)(a.p,{children:["The landscape for parachains changes with the rollout of\n",(0,n.jsx)(a.a,{href:"/docs/learn-agile-coretime",children:"Agile Coretime"}),". With ",(0,n.jsx)(a.a,{href:"/docs/learn/learn-auction",children:"parachain auctions"}),"\nbeing phased out in favor of direct ",(0,n.jsx)(a.a,{href:"/docs/learn-agile-coretime#coretime",children:"coretime"})," sales, the\nexisting parachains on the relaychain and the prospective parachains are presented with the\nfollowing scenarios:"]}),"\n",(0,n.jsxs)(a.ul,{children:["\n",(0,n.jsxs)(a.li,{children:[(0,n.jsx)(a.strong,{children:"Migrating"})," from a legacy parachain lease into a\n",(0,n.jsx)(a.a,{href:"/docs/learn-agile-coretime#bulk-coretime",children:"bulk coretime"})," model"]}),"\n",(0,n.jsxs)(a.li,{children:[(0,n.jsx)(a.strong,{children:"Starting"})," with bulk coretime model from scratch"]}),"\n",(0,n.jsxs)(a.li,{children:[(0,n.jsx)(a.strong,{children:"Running"}),' a parachain with on-demand coretime purchases ("pay as you go")']}),"\n"]}),"\n",(0,n.jsxs)(a.p,{children:["The parachain lease auctions stopped on-chain with the enactment of the\n",(0,n.jsx)(a.a,{href:"https://github.com/polkadot-fellows/runtimes/releases/tag/v1.2.0",children:"runtime upgrade 1.2.0"})," on the\n19th of September 2024, and the existing leases were migrated to bulk coretime automatically. Leases\nthat had not started were canceled, and the locked tokens were refunded. The existing parachains\nbenefit from ",(0,n.jsx)(a.a,{href:"https://docs.lastic.xyz/coretime/renewals.html",children:"coretime renewals"}),", allowing for the\ncontinued assignment of bulk coretime for a core without going through the regular purchasing\nprocess."]}),"\n",(0,n.jsx)(a.admonition,{type:"info",children:(0,n.jsxs)(a.p,{children:["The tutorials below assume that you have already developed the parachain runtime and a fully\nconfigured parachain ",(0,n.jsx)(a.a,{href:"/docs/learn-collator",children:"collator"})," for the target relay chain using the Polkadot\nSDK."]})}),"\n",(0,n.jsxs)(a.p,{children:["For the tutorials below,\n",(0,n.jsx)(a.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/6f3d890ed35bfdee3e3f7d59018345635a62d1cd/polkadot/parachain/test-parachains/adder",children:"the adder test parachain"}),"\non the Polkadot SDK has been used. To compile the ",(0,n.jsx)(a.code,{children:"adder-collator"}),", run the command below in the\n",(0,n.jsx)(a.em,{children:"root"})," of the Polkadot SDK repository. You must have ",(0,n.jsx)(a.a,{href:"https://www.rust-lang.org/tools/install",children:"Rust"}),"\nand its associated tooling installed before following along."]}),"\n",(0,n.jsxs)(a.p,{children:["Ensure the Polkadot SDK is cloned, and you are within the root directory (",(0,n.jsx)(a.code,{children:"cd polkadot-sdk"}),")"]}),"\n",(0,n.jsx)(a.pre,{children:(0,n.jsx)(a.code,{className:"language-sh",children:"cargo build -r -p test-parachain-adder-collator\n"})}),"\n",(0,n.jsx)(a.p,{children:"After the test parachain collator node is successfully compiled, export its genesis state and the\ncode using the following commands. If the export succeeds, these two files should appear in the\nPolkadot-SDK repository."}),"\n",(0,n.jsx)(a.pre,{children:(0,n.jsx)(a.code,{className:"language-sh",children:"./target/release/adder-collator export-genesis-state genesis\n"})}),"\n",(0,n.jsx)(a.pre,{children:(0,n.jsx)(a.code,{className:"language-sh",children:"./target/release/adder-collator export-genesis-wasm genesis-wasm\n"})}),"\n",(0,n.jsx)(a.h2,{id:"reserve-paraid",children:"Reserve ParaID"}),"\n",(0,n.jsxs)(a.p,{children:["Reserving a ",(0,n.jsx)(a.code,{children:"ParaID"})," requires a\n",(0,n.jsx)(a.a,{href:"/docs/chain-state-values#parachain-id-registration-deposit",children:"deposit"}),". The first step is to\nregister a ",(0,n.jsx)(a.a,{href:"/docs/glossary#paraid",children:(0,n.jsx)(a.code,{children:"ParaID"})})," for the parachain. This can be done through\nPolkadot-JS UI by navigating to\n",(0,n.jsx)(a.a,{href:"https://polkadot.js.org/apps/#/parachains/parathreads",children:"Network > Parachains > Parathreads"})," and\nclicking on ParaID button. Ensure that you have sufficient tokens to reserve the displayed ",(0,n.jsx)(a.code,{children:"ParaID"}),"\nsuccessfully."]}),"\n",(0,n.jsx)(a.p,{children:(0,n.jsx)(a.img,{alt:"coretime-reserve-paraID",src:r(74180).A+"",width:"2161",height:"713"})}),"\n",(0,n.jsx)(a.h2,{id:"register-parachain-state-and-code",children:"Register Parachain State and Code"}),"\n",(0,n.jsxs)(a.admonition,{title:"Deposit requirements for registering a parachain",type:"info",children:[(0,n.jsxs)(a.p,{children:["Due to the reasons ",(0,n.jsx)(a.a,{href:"https://github.com/paritytech/polkadot-sdk/pull/2372",children:"discussed here"}),", instead\nof the usual per-byte method of charging for storing validation and genesis code upon registration,\nthe cost is fixed to the maximum possible code size (",(0,n.jsx)(a.code,{children:"MAX_CODE_SIZE"}),"), regardless of the actual\nsize."]}),(0,n.jsxs)(a.p,{children:["On ",(0,n.jsx)(a.strong,{children:"Kusama"}),", the deposit required to register a parachain is ",(0,n.jsx)(a.strong,{children:"~1100 KSM"})," and an estimated fee of\n",(0,n.jsx)(a.strong,{children:"~5 KSM"}),"."]}),(0,n.jsxs)(a.p,{children:["On ",(0,n.jsx)(a.strong,{children:"Polkadot"}),", the deposit required to register a parachain is ",(0,n.jsx)(a.strong,{children:"~3300 DOT"})," and an estimated fee\nof ",(0,n.jsx)(a.strong,{children:"~150 DOT"}),"."]}),(0,n.jsx)(a.p,{children:"It is possible to deregister the parachain and withdraw the deposit if the parachain has not\nproduced any blocks. If the parachain produced blocks, then the parachain can only be deregistered\nthrough the relay chain's governance."})]}),"\n",(0,n.jsxs)(a.p,{children:["The next step is to register the parachain's genesis wasm and state, which you should have generated\nearlier. Note that for this example, we are using ",(0,n.jsx)(a.code,{children:"adder-collator"}),", but in theory a custom runtime\ncompiled from a\n",(0,n.jsx)(a.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/88a2f360238787bf5256cfdd14b40c08f519b38e/templates/parachain",children:"template"}),"\nwould work as well."]}),"\n",(0,n.jsx)(a.p,{children:(0,n.jsx)(a.img,{alt:"coretime-register-parathread",src:r(13070).A+"",width:"2140",height:"978"})}),"\n",(0,n.jsx)(a.p,{children:"After successful registration, the parachain starts onboarding as a parathread."}),"\n",(0,n.jsx)(a.h2,{id:"run-parachain-collator",children:"Run Parachain Collator"}),"\n",(0,n.jsxs)(a.p,{children:["While the parachain is onboarding, start syncing the ",(0,n.jsx)(a.a,{href:"/docs/learn-collator",children:"collator"})," using the\nfollowing command to rapidly sync with the specified relay chain."]}),"\n",(0,n.jsx)(a.pre,{children:(0,n.jsx)(a.code,{children:"./target/release/adder-collator --parachain-id= $ParaID --chain=paseo --sync warp\n"})}),"\n",(0,n.jsx)(a.h2,{id:"run-a-parachain-with-bulk-coretime",children:"Run a Parachain with Bulk Coretime"}),"\n",(0,n.jsx)(a.admonition,{type:"info",children:(0,n.jsxs)(a.p,{children:["Note that we have two options: ",(0,n.jsx)(a.strong,{children:"bulk coretime"})," and ",(0,n.jsx)(a.strong,{children:"on-demand coretime"}),". Bulk coretime is\npurchased via the ",(0,n.jsx)(a.code,{children:"broker"})," pallet, which is on the respective Coretime system parachain. On-demand\ncoretime is ordered via the ",(0,n.jsx)(a.code,{children:"OnDemandAssignment"})," pallet/module, which is located on the respective\nrelay chain."]})}),"\n",(0,n.jsxs)(a.p,{children:["You can purchase bulk coretime on ",(0,n.jsx)(a.a,{href:"/docs/learn-guides-coretime-marketplaces",children:"Coretime chain"})," and\nassign the purchased core to the registered ",(0,n.jsx)(a.code,{children:"ParaID"}),". The snapshot below is from\n",(0,n.jsx)(a.a,{href:"https://test.lastic.xyz/",children:"Lastic"})," interface."]}),"\n",(0,n.jsx)(a.p,{children:(0,n.jsx)(a.img,{alt:"coretime-bulk-assign-lastic",src:r(64653).A+"",width:"1322",height:"1033"})}),"\n",(0,n.jsxs)(a.p,{children:["After successful assignment of the core, the ",(0,n.jsx)(a.code,{children:"adder-collator"})," logs show new collations at regular\nintervals, gradually incrementing the state by ",(0,n.jsx)(a.code,{children:"2"}),"."]}),"\n",(0,n.jsx)(a.p,{children:(0,n.jsx)(a.img,{alt:"coretime-collation-bulk",src:r(57502).A+"",width:"1777",height:"696"})}),"\n",(0,n.jsx)(a.h2,{id:"run-a-parachain-with-on-demand-coretime",children:"Run a Parachain with On-demand Coretime"}),"\n",(0,n.jsxs)(a.p,{children:["After the collator node is fully synced with the relay chain, navigate to\n",(0,n.jsx)(a.a,{href:"https://polkadot.js.org/apps/#/extrinsics",children:"Developer > Extrinsics"})," on the relay chain and issue\n",(0,n.jsx)(a.code,{children:"onDemandAssignmentProvider.placeOrderAllowDeath"})," extrinsic from the account that registered the\n",(0,n.jsx)(a.code,{children:"ParaID"})," by specifying sufficient ",(0,n.jsx)(a.code,{children:"maxAmount"}),"for the transaction to go through successfully."]}),"\n",(0,n.jsx)(a.p,{children:(0,n.jsx)(a.img,{alt:"coretime-ondemand-assignment",src:r(4265).A+"",width:"2873",height:"1394"})}),"\n",(0,n.jsxs)(a.admonition,{type:"info",children:[(0,n.jsx)(a.p,{children:"There are two extrinsics which allow you to place orders for on-demand coretime:"}),(0,n.jsxs)(a.ul,{children:["\n",(0,n.jsxs)(a.li,{children:["\n",(0,n.jsxs)(a.p,{children:[(0,n.jsx)(a.code,{children:"onDemandAssignmentProvider.placeOrderAllowDeath"})," will\n",(0,n.jsx)(a.a,{href:"/docs/learn-accounts#existential-deposit-and-reaping",children:"reap"})," the account once the provided funds\nrun out."]}),"\n"]}),"\n",(0,n.jsxs)(a.li,{children:["\n",(0,n.jsxs)(a.p,{children:[(0,n.jsx)(a.code,{children:"onDemandAssignmentProvider.placeOrderKeepAlive"})," includes a check which will ",(0,n.jsx)(a.strong,{children:"not"})," reap the\naccount if the provided funds will run out, ensuring the account is kept alive."]}),"\n"]}),"\n"]})]}),"\n",(0,n.jsx)(a.p,{children:"With each successful on-demand extrinsic, the parachain head changes (you may have to zoom out on\nthe browser for parachain head details to show up on Polkadot-JS UI)."}),"\n",(0,n.jsx)(a.p,{children:(0,n.jsx)(a.img,{alt:"coretime-ondemand-parahead",src:r(68806).A+"",width:"1435",height:"319"})}),"\n",(0,n.jsxs)(a.p,{children:["The successful collation can also be verified in the parachain collator logs. It can be noticed that\nwith each parachain block, the state of ",(0,n.jsx)(a.code,{children:"adder-collator"})," is incremented by ",(0,n.jsx)(a.code,{children:"2"}),"."]}),"\n",(0,n.jsx)(a.p,{children:(0,n.jsx)(a.img,{alt:"coretime-new-collation",src:r(82303).A+"",width:"1782",height:"426"})})]})}function h(e={}){const{wrapper:a}={...(0,i.R)(),...e.components};return a?(0,n.jsx)(a,{...e,children:(0,n.jsx)(l,{...e})}):l(e)}},13070:(e,a,r)=>{r.d(a,{A:()=>n});const n=r.p+"assets/images/Register-Parachain-771de918d394808bfc41e9b6fd097a44.png"},57502:(e,a,r)=>{r.d(a,{A:()=>n});const n=r.p+"assets/images/coretime-collation-bulk-d6f817e5970e0194d4d5a3dfe70959b7.png"},82303:(e,a,r)=>{r.d(a,{A:()=>n});const n=r.p+"assets/images/coretime-create-new-collation-7da7b7b28f77f12a731dc4d84baf2e38.png"},4265:(e,a,r)=>{r.d(a,{A:()=>n});const n=r.p+"assets/images/coretime-on-demand-assignment-098632f2c2246a688ffb1405c12e87b5.png"},68806:(e,a,r)=>{r.d(a,{A:()=>n});const n=r.p+"assets/images/coretime-on-demand-parahead-36a2079a7b6575851931724c54415a4d.png"},74180:(e,a,r)=>{r.d(a,{A:()=>n});const n=r.p+"assets/images/coretime-reserve-paraID-59fe64fdbcc55e6029182070bf3d416d.png"},64653:(e,a,r)=>{r.d(a,{A:()=>n});const n=r.p+"assets/images/lastic-assign-core-bf4ebbb0f6bf5633a10a17c08f22cd79.png"},28453:(e,a,r)=>{r.d(a,{R:()=>s,x:()=>o});var n=r(96540);const i={},t=n.createContext(i);function s(e){const a=n.useContext(t);return n.useMemo((function(){return"function"==typeof e?e(a):{...a,...e}}),[a,e])}function o(e){let a;return a=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:s(e.components),n.createElement(t.Provider,{value:a},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/387813b8.eee8f193.js b/assets/js/387813b8.eee8f193.js new file mode 100644 index 000000000000..1f15177878d7 --- /dev/null +++ b/assets/js/387813b8.eee8f193.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2409],{91313:(e,a,r)=>{r.r(a),r.d(a,{assets:()=>c,contentTitle:()=>o,default:()=>h,frontMatter:()=>s,metadata:()=>n,toc:()=>d});const n=JSON.parse('{"id":"learn/learn-guides-coretime-parachains","title":"Agile Coretime for Parachains","description":"Agile Coretime from Parachains perspective","source":"@site/../docs/learn/learn-guides-coretime-parachains.md","sourceDirName":"learn","slug":"/learn-guides-coretime-parachains","permalink":"/docs/learn-guides-coretime-parachains","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-coretime-parachains.md","tags":[],"version":"current","lastUpdatedBy":"bader y","lastUpdatedAt":1729243924000,"frontMatter":{"id":"learn-guides-coretime-parachains","title":"Agile Coretime for Parachains","sidebar_label":"Coretime for Parachains","description":"Agile Coretime from Parachains perspective","keywords":["coretime","blockspace","parathread","parachain","cores"],"slug":"../learn-guides-coretime-parachains"},"sidebar":"docs","previous":{"title":"Coretime Marketplaces","permalink":"/docs/learn-guides-coretime-marketplaces"},"next":{"title":"Bridges","permalink":"/docs/learn-bridges"}}');var i=r(74848),t=r(28453);const s={id:"learn-guides-coretime-parachains",title:"Agile Coretime for Parachains",sidebar_label:"Coretime for Parachains",description:"Agile Coretime from Parachains perspective",keywords:["coretime","blockspace","parathread","parachain","cores"],slug:"../learn-guides-coretime-parachains"},o=void 0,c={},d=[{value:"Reserve ParaID",id:"reserve-paraid",level:2},{value:"Register Parachain State and Code",id:"register-parachain-state-and-code",level:2},{value:"Run Parachain Collator",id:"run-parachain-collator",level:2},{value:"Run a Parachain with Bulk Coretime",id:"run-a-parachain-with-bulk-coretime",level:2},{value:"Run a Parachain with On-demand Coretime",id:"run-a-parachain-with-on-demand-coretime",level:2}];function l(e){const a={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",img:"img",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,t.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(a.admonition,{type:"info",children:(0,i.jsxs)(a.p,{children:["If you aren't sure what Agile Coretime is, be sure to read the\n",(0,i.jsx)(a.a,{href:"/docs/learn-agile-coretime",children:"introduction"}),",\n",(0,i.jsx)(a.a,{href:"/docs/learn-agile-coretime#agile-coretime-terminology",children:"terminology"}),", and\n",(0,i.jsx)(a.a,{href:"/docs/learn-agile-coretime#agile-coretime-faq",children:"FAQ"}),"."]})}),"\n",(0,i.jsxs)(a.p,{children:["The landscape for parachains changes with the rollout of\n",(0,i.jsx)(a.a,{href:"/docs/learn-agile-coretime",children:"Agile Coretime"}),". With ",(0,i.jsx)(a.a,{href:"/docs/learn/learn-auction",children:"parachain auctions"}),"\nbeing phased out in favor of direct ",(0,i.jsx)(a.a,{href:"/docs/learn-agile-coretime#coretime",children:"coretime"})," sales, the\nexisting parachains on the relaychain and the prospective parachains are presented with the\nfollowing scenarios:"]}),"\n",(0,i.jsxs)(a.ul,{children:["\n",(0,i.jsxs)(a.li,{children:[(0,i.jsx)(a.strong,{children:"Migrating"})," from a legacy parachain lease into a\n",(0,i.jsx)(a.a,{href:"/docs/learn-agile-coretime#bulk-coretime",children:"bulk coretime"})," model"]}),"\n",(0,i.jsxs)(a.li,{children:[(0,i.jsx)(a.strong,{children:"Starting"})," with bulk coretime model from scratch"]}),"\n",(0,i.jsxs)(a.li,{children:[(0,i.jsx)(a.strong,{children:"Running"}),' a parachain with on-demand coretime purchases ("pay as you go")']}),"\n"]}),"\n",(0,i.jsxs)(a.p,{children:["The parachain lease auctions stopped on-chain with the enactment of the\n",(0,i.jsx)(a.a,{href:"https://github.com/polkadot-fellows/runtimes/releases/tag/v1.2.0",children:"runtime upgrade 1.2.0"})," on the\n19th of September 2024, and the existing leases were migrated to bulk coretime automatically. Leases\nthat had not started were canceled, and the locked tokens were refunded. The existing parachains\nbenefit from ",(0,i.jsx)(a.a,{href:"https://docs.lastic.xyz/coretime/renewals.html",children:"coretime renewals"}),", allowing for the\ncontinued assignment of bulk coretime for a core without going through the regular purchasing\nprocess."]}),"\n",(0,i.jsx)(a.admonition,{type:"info",children:(0,i.jsxs)(a.p,{children:["The tutorials below assume that you have already developed the parachain runtime and a fully\nconfigured parachain ",(0,i.jsx)(a.a,{href:"/docs/learn-collator",children:"collator"})," for the target relay chain using the Polkadot\nSDK."]})}),"\n",(0,i.jsxs)(a.p,{children:["For the tutorials below,\n",(0,i.jsx)(a.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/6f3d890ed35bfdee3e3f7d59018345635a62d1cd/polkadot/parachain/test-parachains/adder",children:"the adder test parachain"}),"\non the Polkadot SDK has been used. To compile the ",(0,i.jsx)(a.code,{children:"adder-collator"}),", run the command below in the\n",(0,i.jsx)(a.em,{children:"root"})," of the Polkadot SDK repository. You must have ",(0,i.jsx)(a.a,{href:"https://www.rust-lang.org/tools/install",children:"Rust"}),"\nand its associated tooling installed before following along."]}),"\n",(0,i.jsxs)(a.p,{children:["Ensure the Polkadot SDK is cloned, and you are within the root directory (",(0,i.jsx)(a.code,{children:"cd polkadot-sdk"}),")"]}),"\n",(0,i.jsx)(a.pre,{children:(0,i.jsx)(a.code,{className:"language-sh",children:"cargo build -r -p test-parachain-adder-collator\n"})}),"\n",(0,i.jsx)(a.p,{children:"After the test parachain collator node is successfully compiled, export its genesis state and the\ncode using the following commands. If the export succeeds, these two files should appear in the\nPolkadot-SDK repository."}),"\n",(0,i.jsx)(a.pre,{children:(0,i.jsx)(a.code,{className:"language-sh",children:"./target/release/adder-collator export-genesis-state genesis\n"})}),"\n",(0,i.jsx)(a.pre,{children:(0,i.jsx)(a.code,{className:"language-sh",children:"./target/release/adder-collator export-genesis-wasm genesis-wasm\n"})}),"\n",(0,i.jsx)(a.h2,{id:"reserve-paraid",children:"Reserve ParaID"}),"\n",(0,i.jsxs)(a.p,{children:["Reserving a ",(0,i.jsx)(a.code,{children:"ParaID"})," requires a\n",(0,i.jsx)(a.a,{href:"/docs/chain-state-values#parachain-id-registration-deposit",children:"deposit"}),". The first step is to\nregister a ",(0,i.jsx)(a.a,{href:"/docs/glossary#paraid",children:(0,i.jsx)(a.code,{children:"ParaID"})})," for the parachain. This can be done through\nPolkadot-JS UI by navigating to\n",(0,i.jsx)(a.a,{href:"https://polkadot.js.org/apps/#/parachains/parathreads",children:"Network > Parachains > Parathreads"})," and\nclicking on ParaID button. Ensure that you have sufficient tokens to reserve the displayed ",(0,i.jsx)(a.code,{children:"ParaID"}),"\nsuccessfully."]}),"\n",(0,i.jsx)(a.p,{children:(0,i.jsx)(a.img,{alt:"coretime-reserve-paraID",src:r(74180).A+"",width:"2161",height:"713"})}),"\n",(0,i.jsx)(a.h2,{id:"register-parachain-state-and-code",children:"Register Parachain State and Code"}),"\n",(0,i.jsxs)(a.admonition,{title:"Deposit requirements for registering a parachain",type:"info",children:[(0,i.jsxs)(a.p,{children:["Due to the reasons ",(0,i.jsx)(a.a,{href:"https://github.com/paritytech/polkadot-sdk/pull/2372",children:"discussed here"}),", instead\nof the usual per-byte method of charging for storing validation and genesis code upon registration,\nthe cost is fixed to the maximum possible code size (",(0,i.jsx)(a.code,{children:"MAX_CODE_SIZE"}),"), regardless of the actual\nsize."]}),(0,i.jsxs)(a.p,{children:["On ",(0,i.jsx)(a.strong,{children:"Kusama"}),", the deposit required to register a parachain is ",(0,i.jsx)(a.strong,{children:"~1100 KSM"})," and an estimated fee of\n",(0,i.jsx)(a.strong,{children:"~5 KSM"}),"."]}),(0,i.jsxs)(a.p,{children:["On ",(0,i.jsx)(a.strong,{children:"Polkadot"}),", the deposit required to register a parachain is ",(0,i.jsx)(a.strong,{children:"~3300 DOT"})," and an estimated fee\nof ",(0,i.jsx)(a.strong,{children:"~150 DOT"}),"."]}),(0,i.jsx)(a.p,{children:"It is possible to deregister the parachain and withdraw the deposit if the parachain has not\nproduced any blocks. If the parachain produced blocks, then the parachain can only be deregistered\nthrough the relay chain's governance."})]}),"\n",(0,i.jsxs)(a.p,{children:["The next step is to register the parachain's genesis wasm and state, which you should have generated\nearlier. Note that for this example, we are using ",(0,i.jsx)(a.code,{children:"adder-collator"}),", but in theory a custom runtime\ncompiled from a\n",(0,i.jsx)(a.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/88a2f360238787bf5256cfdd14b40c08f519b38e/templates/parachain",children:"template"}),"\nwould work as well."]}),"\n",(0,i.jsx)(a.p,{children:(0,i.jsx)(a.img,{alt:"coretime-register-parathread",src:r(13070).A+"",width:"2140",height:"978"})}),"\n",(0,i.jsx)(a.p,{children:"After successful registration, the parachain starts onboarding as a parathread."}),"\n",(0,i.jsx)(a.h2,{id:"run-parachain-collator",children:"Run Parachain Collator"}),"\n",(0,i.jsxs)(a.p,{children:["While the parachain is onboarding, start syncing the ",(0,i.jsx)(a.a,{href:"/docs/learn-collator",children:"collator"})," using the\nfollowing command to rapidly sync with the specified relay chain."]}),"\n",(0,i.jsx)(a.pre,{children:(0,i.jsx)(a.code,{children:"./target/release/adder-collator --parachain-id= $ParaID --chain=paseo --sync warp\n"})}),"\n",(0,i.jsx)(a.h2,{id:"run-a-parachain-with-bulk-coretime",children:"Run a Parachain with Bulk Coretime"}),"\n",(0,i.jsx)(a.admonition,{type:"info",children:(0,i.jsxs)(a.p,{children:["Note that we have two options: ",(0,i.jsx)(a.strong,{children:"bulk coretime"})," and ",(0,i.jsx)(a.strong,{children:"on-demand coretime"}),". Bulk coretime is\npurchased via the ",(0,i.jsx)(a.code,{children:"broker"})," pallet, which is on the respective Coretime system parachain. On-demand\ncoretime is ordered via the ",(0,i.jsx)(a.code,{children:"OnDemandAssignment"})," pallet/module, which is located on the respective\nrelay chain."]})}),"\n",(0,i.jsxs)(a.p,{children:["You can purchase bulk coretime on ",(0,i.jsx)(a.a,{href:"/docs/learn-guides-coretime-marketplaces",children:"Coretime chain"})," and\nassign the purchased core to the registered ",(0,i.jsx)(a.code,{children:"ParaID"}),". The snapshot below is from\n",(0,i.jsx)(a.a,{href:"https://test.lastic.xyz/",children:"Lastic"})," interface."]}),"\n",(0,i.jsx)(a.p,{children:(0,i.jsx)(a.img,{alt:"coretime-bulk-assign-lastic",src:r(64653).A+"",width:"1322",height:"1033"})}),"\n",(0,i.jsxs)(a.p,{children:["After successful assignment of the core, the ",(0,i.jsx)(a.code,{children:"adder-collator"})," logs show new collations at regular\nintervals, gradually incrementing the state by ",(0,i.jsx)(a.code,{children:"2"}),"."]}),"\n",(0,i.jsx)(a.p,{children:(0,i.jsx)(a.img,{alt:"coretime-collation-bulk",src:r(57502).A+"",width:"1777",height:"696"})}),"\n",(0,i.jsx)(a.h2,{id:"run-a-parachain-with-on-demand-coretime",children:"Run a Parachain with On-demand Coretime"}),"\n",(0,i.jsxs)(a.p,{children:["After the collator node is fully synced with the relay chain, navigate to\n",(0,i.jsx)(a.a,{href:"https://polkadot.js.org/apps/#/extrinsics",children:"Developer > Extrinsics"})," on the relay chain and issue\n",(0,i.jsx)(a.code,{children:"onDemandAssignmentProvider.placeOrderAllowDeath"})," extrinsic from the account that registered the\n",(0,i.jsx)(a.code,{children:"ParaID"})," by specifying sufficient ",(0,i.jsx)(a.code,{children:"maxAmount"}),"for the transaction to go through successfully."]}),"\n",(0,i.jsx)(a.p,{children:(0,i.jsx)(a.img,{alt:"coretime-ondemand-assignment",src:r(4265).A+"",width:"2873",height:"1394"})}),"\n",(0,i.jsxs)(a.admonition,{type:"info",children:[(0,i.jsx)(a.p,{children:"There are two extrinsics which allow you to place orders for on-demand coretime:"}),(0,i.jsxs)(a.ul,{children:["\n",(0,i.jsxs)(a.li,{children:["\n",(0,i.jsxs)(a.p,{children:[(0,i.jsx)(a.code,{children:"onDemandAssignmentProvider.placeOrderAllowDeath"})," will\n",(0,i.jsx)(a.a,{href:"/docs/learn-accounts#existential-deposit-and-reaping",children:"reap"})," the account once the provided funds\nrun out."]}),"\n"]}),"\n",(0,i.jsxs)(a.li,{children:["\n",(0,i.jsxs)(a.p,{children:[(0,i.jsx)(a.code,{children:"onDemandAssignmentProvider.placeOrderKeepAlive"})," includes a check which will ",(0,i.jsx)(a.strong,{children:"not"})," reap the\naccount if the provided funds will run out, ensuring the account is kept alive."]}),"\n"]}),"\n"]})]}),"\n",(0,i.jsx)(a.p,{children:"With each successful on-demand extrinsic, the parachain head changes (you may have to zoom out on\nthe browser for parachain head details to show up on Polkadot-JS UI)."}),"\n",(0,i.jsx)(a.p,{children:(0,i.jsx)(a.img,{alt:"coretime-ondemand-parahead",src:r(68806).A+"",width:"1435",height:"319"})}),"\n",(0,i.jsxs)(a.p,{children:["The successful collation can also be verified in the parachain collator logs. It can be noticed that\nwith each parachain block, the state of ",(0,i.jsx)(a.code,{children:"adder-collator"})," is incremented by ",(0,i.jsx)(a.code,{children:"2"}),"."]}),"\n",(0,i.jsx)(a.p,{children:(0,i.jsx)(a.img,{alt:"coretime-new-collation",src:r(82303).A+"",width:"1782",height:"426"})})]})}function h(e={}){const{wrapper:a}={...(0,t.R)(),...e.components};return a?(0,i.jsx)(a,{...e,children:(0,i.jsx)(l,{...e})}):l(e)}},13070:(e,a,r)=>{r.d(a,{A:()=>n});const n=r.p+"assets/images/Register-Parachain-771de918d394808bfc41e9b6fd097a44.png"},57502:(e,a,r)=>{r.d(a,{A:()=>n});const n=r.p+"assets/images/coretime-collation-bulk-d6f817e5970e0194d4d5a3dfe70959b7.png"},82303:(e,a,r)=>{r.d(a,{A:()=>n});const n=r.p+"assets/images/coretime-create-new-collation-7da7b7b28f77f12a731dc4d84baf2e38.png"},4265:(e,a,r)=>{r.d(a,{A:()=>n});const n=r.p+"assets/images/coretime-on-demand-assignment-098632f2c2246a688ffb1405c12e87b5.png"},68806:(e,a,r)=>{r.d(a,{A:()=>n});const n=r.p+"assets/images/coretime-on-demand-parahead-36a2079a7b6575851931724c54415a4d.png"},74180:(e,a,r)=>{r.d(a,{A:()=>n});const n=r.p+"assets/images/coretime-reserve-paraID-59fe64fdbcc55e6029182070bf3d416d.png"},64653:(e,a,r)=>{r.d(a,{A:()=>n});const n=r.p+"assets/images/lastic-assign-core-bf4ebbb0f6bf5633a10a17c08f22cd79.png"},28453:(e,a,r)=>{r.d(a,{R:()=>s,x:()=>o});var n=r(96540);const i={},t=n.createContext(i);function s(e){const a=n.useContext(t);return n.useMemo((function(){return"function"==typeof e?e(a):{...a,...e}}),[a,e])}function o(e){let a;return a=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:s(e.components),n.createElement(t.Provider,{value:a},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/390ca211.31d4f22e.js b/assets/js/390ca211.31d4f22e.js new file mode 100644 index 000000000000..e2791bafcb40 --- /dev/null +++ b/assets/js/390ca211.31d4f22e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2623],{86374:(e,n,o)=>{o.r(n),o.d(n,{assets:()=>d,contentTitle:()=>i,default:()=>u,frontMatter:()=>l,metadata:()=>a,toc:()=>c});const a=JSON.parse('{"id":"learn/archive/learn-launch","title":"Polkadot Launch Phases","description":"Polkadot\'s Launch Process and its Individual Phases.","source":"@site/../docs/learn/archive/learn-launch.md","sourceDirName":"learn/archive","slug":"/learn/learn-launch","permalink":"/docs/learn/learn-launch","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/archive/learn-launch.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1714545713000,"frontMatter":{"id":"learn-launch","title":"Polkadot Launch Phases","sidebar_label":"Polkadot Launch Phases","description":"Polkadot\'s Launch Process and its Individual Phases.","keyword":["launch","phases","polkadot","DOT","claim","token sale","redenomination"],"slug":"../learn-launch"},"sidebar":"docs","previous":{"title":"Gov1 Treasury","permalink":"/docs/learn/learn-treasury"},"next":{"title":"Redenomination of DOT","permalink":"/docs/learn/learn-redenomination"}}');var t=o(74848),r=o(28453),s=o(67141);const l={id:"learn-launch",title:"Polkadot Launch Phases",sidebar_label:"Polkadot Launch Phases",description:"Polkadot's Launch Process and its Individual Phases.",keyword:["launch","phases","polkadot","DOT","claim","token sale","redenomination"],slug:"../learn-launch"},i=void 0,d={},c=[{value:"The PoA Launch",id:"the-poa-launch",level:2},{value:"Nominated Proof of Stake",id:"nominated-proof-of-stake",level:2},{value:"Governance",id:"governance",level:2},{value:"Removal of Sudo",id:"removal-of-sudo",level:2},{value:"Balance Transfers",id:"balance-transfers",level:2},{value:"Core Functionality",id:"core-functionality",level:2}];function h(e){const n={a:"a",admonition:"admonition",h2:"h2",li:"li",p:"p",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.A,{message:"The content on this page is archived."}),"\n",(0,t.jsxs)(n.p,{children:["The Polkadot network has a phased roll-out plan, with important milestones toward decentralization\nmarking each phase. Keep up-to-date with the Polkadot's phased roll-out plan at by viewing the\n",(0,t.jsx)(n.a,{href:"https://polkadot.network/launch-roadmap/",children:"roadmap"})]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Current Phase: Post-launch Upgrades"})}),"\n",(0,t.jsxs)(n.admonition,{title:"Claims",type:"info",children:[(0,t.jsx)(n.p,{children:"For the most update-to-date information on DOT claims (if you bought your DOTs before Polkadot went\nlive), check out the following claiming resources and tutorials:"}),(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000063553-why-do-i-need-to-claim-my-dot-tokens-and-is-there-a-deadline-",children:"Why do I need to claim my DOT tokens, and is there a deadline?"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000063667-i-claimed-my-dot-before-polkadot-went-live-but-still-see-zero-balance-",children:"I claimed my DOT before Polkadot went live, but still see zero balance!"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000138217-how-to-claim-your-dot-tutorial",children:"How to claim your DOT - Tutorial"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000103605-how-do-i-know-my-claim-worked-",children:"How do I know my claim worked?"})}),"\n"]})]}),"\n",(0,t.jsx)(n.h2,{id:"the-poa-launch",children:"The PoA Launch"}),"\n",(0,t.jsx)(n.p,{children:"The Genesis block of the Polkadot network was launched on May 26, 2020, as a Proof of Authority\n(PoA) network. Governance was restricted to the single Sudo (super-user) key, which was held by Web3\nFoundation to issue the commands and upgrades necessary to complete the launch process. During this\ntime, validators started joining the network and signaling their intention to participate in\nconsensus."}),"\n",(0,t.jsx)(n.h2,{id:"nominated-proof-of-stake",children:"Nominated Proof of Stake"}),"\n",(0,t.jsxs)(n.p,{children:["Once Web3 Foundation was confident in the stability of the network and there was a sufficient number\nof validator intentions, Web3 Foundation used ",(0,t.jsx)(n.a,{href:"https://youtu.be/InekMjJpVdo",children:"Sudo"})," \u2014 a\nsuperuser account with access to governance functions \u2014 to initiate the first validator\nelection. Following this election, the network transitioned from PoA into its second phase,\n",(0,t.jsx)(n.a,{href:"/docs/learn-staking",children:"Nominated Proof of Stake (NPoS)"}),", on June 18, 2020."]}),"\n",(0,t.jsx)(n.h2,{id:"governance",children:"Governance"}),"\n",(0,t.jsxs)(n.p,{children:["After the chain had been running well with the validator set, the Sudo key issued a runtime upgrade\nthat enabled the suite of governance modules in Polkadot; namely, the modules to enable a\n",(0,t.jsx)(n.a,{href:"/docs/learn/learn-governance#council",children:"Council"}),", a\n",(0,t.jsx)(n.a,{href:"/docs/learn/learn-governance#technical-committee",children:"Technical Committee"}),", and\n",(0,t.jsx)(n.a,{href:"/docs/learn/learn-governance#public-referenda",children:"public referenda"}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"removal-of-sudo",children:"Removal of Sudo"}),"\n",(0,t.jsxs)(n.p,{children:["The Sudo module was removed by a runtime upgrade on July 20, 2020, transitioning the\n",(0,t.jsx)(n.a,{href:"/docs/learn/learn-governance",children:"governance"})," of the chain into the hands of the token (DOT) holders."]}),"\n",(0,t.jsx)(n.p,{children:"From this point, the network has been entirely in the hands of the token holders and is no longer\nunder control of any centralized authority."}),"\n",(0,t.jsx)(n.h2,{id:"balance-transfers",children:"Balance Transfers"}),"\n",(0,t.jsx)(n.p,{children:"To enable balance transfers, the community made a public proposal for a runtime upgrade that lifted\nthe restriction on balance transfers. Transfer functionality was subsequently enabled on Polkadot at\nblock number 1_205_128 on August 18, 2020, at 16:39 UTC."}),"\n",(0,t.jsx)(n.h2,{id:"core-functionality",children:"Core Functionality"}),"\n",(0,t.jsx)(n.p,{children:"After five years of research and development and a multi-stage launch that began in May 2020,\nPolkadot launch was completed on December 18, 2021, with all auction-winning parachains producing\nblocks on the network."}),"\n",(0,t.jsx)(n.p,{children:"Check out these resources for further information:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"https://polkadot.network/blog/parachains-are-live-polkadot-launch-is-now-complete/",children:"Polkadot Network blog"}),"."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"https://www.reddit.com/r/Polkadot/comments/s3yb3d/l_for_polkadot_launch_polkadot_a_to_z/",children:"Polkadot A to Z: L for Polkadot Launch"}),"."]}),"\n"]})]})}function u(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(h,{...e})}):h(e)}},67141:(e,n,o)=>{o.d(n,{A:()=>r});var a=o(96540),t=o(74848);const r=function(e){var n,o=e.message,r=(0,a.useState)(!0),s=r[0],l=r[1];return(0,t.jsx)(t.Fragment,{children:s&&(0,t.jsxs)("div",{className:"message-box",children:[(0,t.jsx)("button",{className:"close-button",onClick:function(){l(!1)},children:"\u2716 "}),(0,t.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(n=o,n.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},28453:(e,n,o)=>{o.d(n,{R:()=>s,x:()=>l});var a=o(96540);const t={},r=a.createContext(t);function s(e){const n=a.useContext(r);return a.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:s(e.components),a.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/390ca211.3c072aff.js b/assets/js/390ca211.3c072aff.js deleted file mode 100644 index 492c65e28487..000000000000 --- a/assets/js/390ca211.3c072aff.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2623],{31287:(e,n,o)=>{o.r(n),o.d(n,{assets:()=>d,contentTitle:()=>l,default:()=>u,frontMatter:()=>s,metadata:()=>i,toc:()=>c});var a=o(74848),t=o(28453),r=o(67141);const s={id:"learn-launch",title:"Polkadot Launch Phases",sidebar_label:"Polkadot Launch Phases",description:"Polkadot's Launch Process and its Individual Phases.",keyword:["launch","phases","polkadot","DOT","claim","token sale","redenomination"],slug:"../learn-launch"},l=void 0,i={id:"learn/archive/learn-launch",title:"Polkadot Launch Phases",description:"Polkadot's Launch Process and its Individual Phases.",source:"@site/../docs/learn/archive/learn-launch.md",sourceDirName:"learn/archive",slug:"/learn/learn-launch",permalink:"/docs/learn/learn-launch",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/archive/learn-launch.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1714545713e3,frontMatter:{id:"learn-launch",title:"Polkadot Launch Phases",sidebar_label:"Polkadot Launch Phases",description:"Polkadot's Launch Process and its Individual Phases.",keyword:["launch","phases","polkadot","DOT","claim","token sale","redenomination"],slug:"../learn-launch"},sidebar:"docs",previous:{title:"Gov1 Treasury",permalink:"/docs/learn/learn-treasury"},next:{title:"Redenomination of DOT",permalink:"/docs/learn/learn-redenomination"}},d={},c=[{value:"The PoA Launch",id:"the-poa-launch",level:2},{value:"Nominated Proof of Stake",id:"nominated-proof-of-stake",level:2},{value:"Governance",id:"governance",level:2},{value:"Removal of Sudo",id:"removal-of-sudo",level:2},{value:"Balance Transfers",id:"balance-transfers",level:2},{value:"Core Functionality",id:"core-functionality",level:2}];function h(e){const n={a:"a",admonition:"admonition",h2:"h2",li:"li",p:"p",strong:"strong",ul:"ul",...(0,t.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(r.A,{message:"The content on this page is archived."}),"\n",(0,a.jsxs)(n.p,{children:["The Polkadot network has a phased roll-out plan, with important milestones toward decentralization\nmarking each phase. Keep up-to-date with the Polkadot's phased roll-out plan at by viewing the\n",(0,a.jsx)(n.a,{href:"https://polkadot.network/launch-roadmap/",children:"roadmap"})]}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.strong,{children:"Current Phase: Post-launch Upgrades"})}),"\n",(0,a.jsxs)(n.admonition,{title:"Claims",type:"info",children:[(0,a.jsx)(n.p,{children:"For the most update-to-date information on DOT claims (if you bought your DOTs before Polkadot went\nlive), check out the following claiming resources and tutorials:"}),(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000063553-why-do-i-need-to-claim-my-dot-tokens-and-is-there-a-deadline-",children:"Why do I need to claim my DOT tokens, and is there a deadline?"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000063667-i-claimed-my-dot-before-polkadot-went-live-but-still-see-zero-balance-",children:"I claimed my DOT before Polkadot went live, but still see zero balance!"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000138217-how-to-claim-your-dot-tutorial",children:"How to claim your DOT - Tutorial"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000103605-how-do-i-know-my-claim-worked-",children:"How do I know my claim worked?"})}),"\n"]})]}),"\n",(0,a.jsx)(n.h2,{id:"the-poa-launch",children:"The PoA Launch"}),"\n",(0,a.jsx)(n.p,{children:"The Genesis block of the Polkadot network was launched on May 26, 2020, as a Proof of Authority\n(PoA) network. Governance was restricted to the single Sudo (super-user) key, which was held by Web3\nFoundation to issue the commands and upgrades necessary to complete the launch process. During this\ntime, validators started joining the network and signaling their intention to participate in\nconsensus."}),"\n",(0,a.jsx)(n.h2,{id:"nominated-proof-of-stake",children:"Nominated Proof of Stake"}),"\n",(0,a.jsxs)(n.p,{children:["Once Web3 Foundation was confident in the stability of the network and there was a sufficient number\nof validator intentions, Web3 Foundation used ",(0,a.jsx)(n.a,{href:"https://youtu.be/InekMjJpVdo",children:"Sudo"})," \u2014 a\nsuperuser account with access to governance functions \u2014 to initiate the first validator\nelection. Following this election, the network transitioned from PoA into its second phase,\n",(0,a.jsx)(n.a,{href:"/docs/learn-staking",children:"Nominated Proof of Stake (NPoS)"}),", on June 18, 2020."]}),"\n",(0,a.jsx)(n.h2,{id:"governance",children:"Governance"}),"\n",(0,a.jsxs)(n.p,{children:["After the chain had been running well with the validator set, the Sudo key issued a runtime upgrade\nthat enabled the suite of governance modules in Polkadot; namely, the modules to enable a\n",(0,a.jsx)(n.a,{href:"/docs/learn/learn-governance#council",children:"Council"}),", a\n",(0,a.jsx)(n.a,{href:"/docs/learn/learn-governance#technical-committee",children:"Technical Committee"}),", and\n",(0,a.jsx)(n.a,{href:"/docs/learn/learn-governance#public-referenda",children:"public referenda"}),"."]}),"\n",(0,a.jsx)(n.h2,{id:"removal-of-sudo",children:"Removal of Sudo"}),"\n",(0,a.jsxs)(n.p,{children:["The Sudo module was removed by a runtime upgrade on July 20, 2020, transitioning the\n",(0,a.jsx)(n.a,{href:"/docs/learn/learn-governance",children:"governance"})," of the chain into the hands of the token (DOT) holders."]}),"\n",(0,a.jsx)(n.p,{children:"From this point, the network has been entirely in the hands of the token holders and is no longer\nunder control of any centralized authority."}),"\n",(0,a.jsx)(n.h2,{id:"balance-transfers",children:"Balance Transfers"}),"\n",(0,a.jsx)(n.p,{children:"To enable balance transfers, the community made a public proposal for a runtime upgrade that lifted\nthe restriction on balance transfers. Transfer functionality was subsequently enabled on Polkadot at\nblock number 1_205_128 on August 18, 2020, at 16:39 UTC."}),"\n",(0,a.jsx)(n.h2,{id:"core-functionality",children:"Core Functionality"}),"\n",(0,a.jsx)(n.p,{children:"After five years of research and development and a multi-stage launch that began in May 2020,\nPolkadot launch was completed on December 18, 2021, with all auction-winning parachains producing\nblocks on the network."}),"\n",(0,a.jsx)(n.p,{children:"Check out these resources for further information:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.a,{href:"https://polkadot.network/blog/parachains-are-live-polkadot-launch-is-now-complete/",children:"Polkadot Network blog"}),"."]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.a,{href:"https://www.reddit.com/r/Polkadot/comments/s3yb3d/l_for_polkadot_launch_polkadot_a_to_z/",children:"Polkadot A to Z: L for Polkadot Launch"}),"."]}),"\n"]})]})}function u(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(h,{...e})}):h(e)}},67141:(e,n,o)=>{o.d(n,{A:()=>r});var a=o(96540),t=o(74848);const r=function(e){var n,o=e.message,r=(0,a.useState)(!0),s=r[0],l=r[1];return(0,t.jsx)(t.Fragment,{children:s&&(0,t.jsxs)("div",{className:"message-box",children:[(0,t.jsx)("button",{className:"close-button",onClick:function(){l(!1)},children:"\u2716 "}),(0,t.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(n=o,n.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},28453:(e,n,o)=>{o.d(n,{R:()=>s,x:()=>l});var a=o(96540);const t={},r=a.createContext(t);function s(e){const n=a.useContext(r);return a.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:s(e.components),a.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/3bd77df4.00191be8.js b/assets/js/3bd77df4.00191be8.js deleted file mode 100644 index 98d05e71e1f2..000000000000 --- a/assets/js/3bd77df4.00191be8.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3976],{40641:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>o,default:()=>u,frontMatter:()=>a,metadata:()=>l,toc:()=>c});var r=t(74848),i=t(28453),s=t(3514);const a={id:"learn-bridges",title:"Bridges",sidebar_label:"Bridges",description:"Bridges and Examples of Common Bridges.",keywords:["bridges","cross-chain","bridge methods"],slug:"../learn-bridges"},o=void 0,l={id:"learn/learn-bridges",title:"Bridges",description:"Bridges and Examples of Common Bridges.",source:"@site/../docs/learn/learn-bridges.md",sourceDirName:"learn",slug:"/learn-bridges",permalink:"/docs/learn-bridges",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-bridges.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1727178265e3,frontMatter:{id:"learn-bridges",title:"Bridges",sidebar_label:"Bridges",description:"Bridges and Examples of Common Bridges.",keywords:["bridges","cross-chain","bridge methods"],slug:"../learn-bridges"},sidebar:"docs",previous:{title:"Coretime for Parachains",permalink:"/docs/learn-guides-coretime-parachains"},next:{title:"Snowbridge",permalink:"/docs/learn-snowbridge"}},d={},c=[{value:"Trustless Bridges",id:"trustless-bridges",level:2},{value:"On-chain Bridge Components",id:"on-chain-bridge-components",level:2},{value:"via Bridge Pallets",id:"via-bridge-pallets",level:3},{value:"via Smart Contracts",id:"via-smart-contracts",level:3},{value:"via Higher-Order Protocols",id:"via-higher-order-protocols",level:3},{value:"Bitcoin Bridge (XCLAIM <-> Substrate <-> Polkadot)",id:"bitcoin-bridge-xclaim---substrate---polkadot",level:4},{value:"Offchain Bridge Components",id:"offchain-bridge-components",level:2},{value:"Bridge Comparison",id:"bridge-comparison",level:2},{value:"Resources",id:"resources",level:2}];function h(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",h4:"h4",li:"li",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,i.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.p,{children:"Bridges are vital infrastructure, enabling cross-chain communication between technically diverse\nnetworks like Polkadot and Ethereum. Bridges allow these chains to acknowledge and trust each\nother\u2019s finalized states, paving the way for many applications like asset swaps and chain\nmigrations."}),"\n",(0,r.jsxs)(n.p,{children:["Current bridge architectures rely on centralized intermediaries, such as multi-signature relayers,\nto validate information passed between chains. This approach introduces additional trust assumptions\nand creates a single point of failure, opening up attack vectors like censorship. Recent history has\nshown how risky this can be \u2014 centralized entities can be compromised or act maliciously. According\nto ",(0,r.jsx)(n.a,{href:"https://www.chainalysis.com/blog/cross-chain-bridge-hacks-2022/",children:"Chainalysis report"}),", failures\nin centralized bridges account for over 60% of all crypto hacks, resulting in losses exceeding $2\nbillion. Four of the top five incidents on the ",(0,r.jsx)(n.a,{href:"https://rekt.news/tr/leaderboard/",children:"rekt leaderboard"}),"\nare bridge-related hacks. A system\u2019s security is only ",(0,r.jsx)(n.strong,{children:"as strong as its weakest link"}),", and bridges\nhave proven to be a critical vulnerability."]}),"\n",(0,r.jsx)(n.admonition,{title:"Purpose of bridging",type:"info",children:(0,r.jsxs)(n.p,{children:["Bridges enable Polkadot to communicate with external blockchains such as Bitcoin and Ethereum.\nWithin Polkadot, chains already benefit from secure interoperability. For more information about the\nnative interoperability technology that allows parachains to communicate trustlessly, please see the\ndedicated ",(0,r.jsx)(n.a,{href:"/docs/learn-xcm",children:"cross consensus"})," page on the Wiki."]})}),"\n",(0,r.jsx)(n.p,{children:"Thus, Bridge designs come in various flavors ranging from centralized and trusted to more\ndecentralized and trustless. Polkadot favors the latter bridge designs for its ecosystem."}),"\n",(0,r.jsx)(s.A,{}),"\n",(0,r.jsx)(n.h2,{id:"trustless-bridges",children:"Trustless Bridges"}),"\n",(0,r.jsxs)(n.p,{children:["A two-way trustless bridge between chains A and B can be viewed as two one-way bridges (A \u2192 B and B\n\u2192 A). Hence, the design of a two-way bridge can be explained in terms of a one-way bridge with a\nsource and a target chain. Any trustless bridge will have ",(0,r.jsx)(n.strong,{children:"on-chain and off-chain components"}),"."]}),"\n",(0,r.jsx)(n.p,{children:"Trustlessness means that users do not need to trust particular individuals or organizations; they\nonly need to trust mathematics, code, cryptography, and protocol. An example of a system which\nimplies a high level of trust would be that of a bridge which is controlled via a multi-signature\nscheme, wherein you must trust the cosignatories."}),"\n",(0,r.jsx)(n.p,{children:"Basic assumptions are always needed in principle when defining a trustless system as a completely\ntrustless setup cannot always be guaranteed."}),"\n",(0,r.jsx)(n.h2,{id:"on-chain-bridge-components",children:"On-chain Bridge Components"}),"\n",(0,r.jsx)(n.p,{children:"Building a trustless bridge can be done through the implementation of the following on-chain\ncomponents (ordered by suggested methodology):"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.em,{children:"Bridge pallets"})," - For Substrate-native chains, use a bridge pallet (e.g.\n",(0,r.jsxs)(n.a,{href:"/docs/learn-dot-ksm-bridge",children:["Kusama ",(0,r.jsx)(n.code,{children:"<->"})," Polkadot bridge"]}),", since both networks' parachains use\nSubstrate)."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.em,{children:"Smart contracts"})," - If the chain is not on Substrate, you should have smart contracts on the\nnon-Substrate chain to bridge (e.g. ",(0,r.jsx)(n.a,{href:"/docs/learn-snowbridge",children:"Snowbridge"}),", Ethereum mainnet has a\nbridge smart contract that initiates Eth transactions based on incoming XCMP messages)."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.em,{children:"Higher-order protocols"})," - If your chain does not support smart contracts (e.g. Bitcoin), you\nshould use ",(0,r.jsx)(n.a,{href:"https://eprint.iacr.org/2018/643.pdf",children:"XClaim"})," or similar protocols to bridge."]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"On-chain bridge components are modules (usually pallets or smart contracts) deployed on the chain's\nruntime. Modules that track the finality of the source chain are required to be deployed on the\ntarget chain, while the modules that deal with cross-chain messaging need to be deployed on both\nsource and target chains."}),"\n",(0,r.jsx)(n.p,{children:"There are also on-chain components responsible for queuing messages at the source chain and\nreceiving the message proofs at the target chain. The messages are sent through a particular lane,\nwhere they are guaranteed to be received in the same order they are sent. On Bridge Hub, the\nmessages are in XCM format, and an XCM executor is used to dispatch them."}),"\n",(0,r.jsx)(n.h3,{id:"via-bridge-pallets",children:"via Bridge Pallets"}),"\n",(0,r.jsxs)(n.p,{children:["Operating a bridge between chains that finalize through GRANDPA consensus is straightforward. A\nGRANDPA light client of the source chain built into the target chain's runtime provides a \"source of\ntruth\" about the source chain's finality. For instance,\n",(0,r.jsx)(n.a,{href:"/docs/learn-system-chains#bridge-hub",children:"Bridge Hub"})," runs an on-chain light client of Kusama which uses\nGRANDPA consensus and infers the finality of all the transactions on Kusama and its parachains."]}),"\n",(0,r.jsx)(n.p,{children:"Receiving messages on Polkadot from an external, non-parachain blockchain is possible through a\nSubstrate pallet. The Substrate instance can then be deployed to Polkadot either as a system-level\nparachain (native extension to the core Polkadot software) or as a community-operated parachain."}),"\n",(0,r.jsxs)(n.p,{children:["An example of a bridge that would strictly use bridge pallets would be\n",(0,r.jsxs)(n.a,{href:"/docs/learn-dot-ksm-bridge",children:["the Kusama ",(0,r.jsx)(n.code,{children:"<->"})," Polkadot bridge"]}),", since both use parachains based on\nSubstrate."]}),"\n",(0,r.jsx)(n.p,{children:"For the standalone chains that will not have a parachain bridging module (non-Substrate), it will be\nnecessary to deploy bridge contracts."}),"\n",(0,r.jsx)(n.h3,{id:"via-smart-contracts",children:"via Smart Contracts"}),"\n",(0,r.jsxs)(n.p,{children:["Given the generality of blockchain platforms with Turing-complete smart contract languages, it is\npossible to bridge Polkadot and any other smart-contract-capable blockchain. For instance,\n",(0,r.jsx)(n.a,{href:"/docs/learn-snowbridge",children:"Snowbridge"})," uses the Polkadot Bridge Hub to run an on-chain light client of\nEthereum to infer the finality of transactions on the Ethereum chain. Running a GRANDPA light client\nthrough smart contracts on Ethereum is possible but expensive. Hence,\n",(0,r.jsx)(n.a,{href:"/docs/learn-consensus#bridging-beefy",children:"BEEFY consensus layer"})," sitting on top of GRANDPA enables a\ncost-effective solution for operating a trustless bridge with Ethereum and other protocols.\nTrustless bridges to chains like Cosmos, Avalanche, NEAR, etc., would require custom pallets to be\ndeployed on Bridge Hub."]}),"\n",(0,r.jsx)(n.admonition,{type:"note",children:(0,r.jsxs)(n.p,{children:["To learn more on how Bitcoin and Ethereum can cooperate and collaborate through Polkadot, check out\nthis explainer video ",(0,r.jsx)(n.a,{href:"https://www.youtube.com/watch?v=rvoFUiOR3cM",children:"here"})]})}),"\n",(0,r.jsx)(n.h3,{id:"via-higher-order-protocols",children:"via Higher-Order Protocols"}),"\n",(0,r.jsxs)(n.p,{children:["Higher-order protocols (like ",(0,r.jsx)(n.a,{href:"https://eprint.iacr.org/2018/643.pdf",children:"XCLAIM"}),") can be used to bridge\nbut should only be used when other options are not available. XCLAIM, in particular, requires any\nswappable asset to be backed by a collateral of higher value than the swappable assets, which adds\nadditional overhead."]}),"\n",(0,r.jsx)(n.p,{children:"An example of a network that would be well-suited for higher-order protocols would be Bitcoin, since\nit does not support smart contracts, and it's not based on Substrate."}),"\n",(0,r.jsx)(n.h4,{id:"bitcoin-bridge-xclaim---substrate---polkadot",children:"Bitcoin Bridge (XCLAIM <-> Substrate <-> Polkadot)"}),"\n",(0,r.jsxs)(n.p,{children:["The Interlay team has written a ",(0,r.jsx)(n.a,{href:"https://spec.interlay.io/",children:"specification"})," on a Bitcoin bridge that\nis based on the ",(0,r.jsx)(n.a,{href:"https://eprint.iacr.org/2018/643.pdf",children:"XCLAIM"})," design paper. The protocol enables a\ntwo-way bridge between Polkadot and Bitcoin. It allows holders of BTC to issue iBTC in Polkadot and\nholders of iBTC to redeem BTC on the Bitcoin chain."]}),"\n",(0,r.jsx)(n.p,{children:"The Bitcoin bridge, as documented in the specification, is composed of two logically different\ncomponents:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"The XCLAIM component maintains all accounts that own iBTC."}),"\n",(0,r.jsx)(n.li,{children:"The BTC-Relay verifies the Bitcoin state when a new transaction is submitted."}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"For full details on how it works, please refer to the specification."}),"\n",(0,r.jsxs)(n.p,{children:["There is now a\n",(0,r.jsx)(n.a,{href:"https://app.interlay.io/btc?tab=issue",children:"working implementation and mainnet bridge available"}),"."]}),"\n",(0,r.jsx)(n.h2,{id:"offchain-bridge-components",children:"Offchain Bridge Components"}),"\n",(0,r.jsx)(n.p,{children:"Offchain bridge components are separate processes called relayers. Relayers are connected both to\nthe source chain and target chain nodes. For instance, the task of relayer between chains that run\non GRANDPA consensus is to submit source chain GRANDPA justifications and their corresponding\nheaders to the Bridge GRANDPA Finality Pallet deployed at the target chain. For that, the relayer\nsubscribes to the source chain GRANDPA justifications stream and submits every new justification to\nthe target chain GRANDPA light client."}),"\n",(0,r.jsxs)(n.p,{children:["Messages between chains are relayed through the relayers, which involve messages delivery relay and\ndelivery confirmation relay. For more information on relayers and the Bridge Hub design, read\nthrough the\n",(0,r.jsx)(n.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/master/bridges/docs/high-level-overview.md",children:"High-level bridge documentation on the Polkadot-SDK repository"}),"."]}),"\n",(0,r.jsx)(n.h2,{id:"bridge-comparison",children:"Bridge Comparison"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"/docs/learn-snowbridge",children:"Snowbridge"})," and ",(0,r.jsx)(n.a,{href:"/docs/learn-hyperbridge",children:"Hyperbridge"})," are two trustless\nbridges that connect Polkadot with other ecosystems. Here below is a main technical comparison\nbetween the two."]}),"\n",(0,r.jsx)(n.admonition,{title:"Tokens sent through different bridges are different",type:"danger",children:(0,r.jsxs)(n.p,{children:["Unless specific logic is implemented, WETH sent through Snowbridge cannot be sent back using\nHyperbridge, and ",(0,r.jsx)(n.em,{children:"vice versa"}),". ",(0,r.jsx)(n.strong,{children:"Sending tokens using different bridges might lead to loss of\nfunds."})]})}),"\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{style:{textAlign:"center"},children:"Snowbridge"}),(0,r.jsx)(n.th,{style:{textAlign:"center"},children:"Hyperbridge"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsxs)(n.td,{style:{textAlign:"center"},children:["Ethereum only",(0,r.jsx)("sup",{children:"1"}),"."]}),(0,r.jsx)(n.td,{style:{textAlign:"center"},children:"Multichain."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsxs)(n.td,{style:{textAlign:"center"},children:["Ethereum light client on ",(0,r.jsx)(n.a,{href:"/docs/learn-system-chains#bridge-hub",children:"Bridge Hub System Chain"}),(0,r.jsx)("sup",{children:"2"})," and Polkadot light client on Ethereum smart contract."]}),(0,r.jsx)(n.td,{style:{textAlign:"center"},children:"Own parachain."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsxs)(n.td,{style:{textAlign:"center"},children:[(0,r.jsx)(n.a,{href:"/docs/learn-DOT",children:"DOT token"}),"."]}),(0,r.jsx)(n.td,{style:{textAlign:"center"},children:"Hyperbridge native token."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsxs)(n.td,{style:{textAlign:"center"},children:[(0,r.jsx)(n.a,{href:"/docs/learn-snowbridge#random-sampling-beefy",children:"Random-sampling BEEFY"})," for prover."]}),(0,r.jsx)(n.td,{style:{textAlign:"center"},children:"Zero-knowledge Proofs."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{style:{textAlign:"center"},children:"Simple codebase but complex analysis by the verifier."}),(0,r.jsx)(n.td,{style:{textAlign:"center"},children:"Complex codebase, but simple analysis by the verifier."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{style:{textAlign:"center"},children:"Low-spec hardware for prover, permissionless."}),(0,r.jsx)(n.td,{style:{textAlign:"center"},children:"High-spec hardware for prover, permissionless but somewhat permissioned due to the ZK-based nature."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{style:{textAlign:"center"},children:"Possible high-level decentralization for the prover."}),(0,r.jsxs)(n.td,{style:{textAlign:"center"},children:["Prover decentralization possible but probably by removing dependency on ZK circuits through BLS (",(0,r.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/BLS_digital_signature",children:"Boneh\u2013Lynn\u2013Shacham"}),") version of BEEFY and BLS precompiles on Ethereum."]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsxs)(n.td,{style:{textAlign:"center"},children:["Ethereum > Polkadot: In the range of ",(0,r.jsx)(n.a,{href:"https://app.snowbridge.network/status",children:"10-20 minutes"}),". Polkadot > Ethereum: High latency (half an hour) as two epochs are needed on Ethereum to achieve unpredictable randomness to update the Polkadot's state."]}),(0,r.jsx)(n.td,{style:{textAlign:"center"},children:"Ethereum > Polkadot: In the range of 10-20 minutes (to Polkadot, both bridges have the same latency). Polkadot > Ethereum: Low latency, 5-7 minutes on reference hardware."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsxs)(n.td,{style:{textAlign:"center"},children:["Dependency on external library for BLS signature verification (",(0,r.jsx)(n.a,{href:"https://github.com/sigp/milagro_bls",children:"Milagro BLS"}),", used by Lighthouse, the Rust Ethereum consensus client)."]}),(0,r.jsxs)(n.td,{style:{textAlign:"center"},children:["Dependency on external libraries due to ZK-based nature. Such libraries include ",(0,r.jsx)(n.a,{href:"https://eprint.iacr.org/2019/953.pdf",children:"PLONK"}),"."]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsxs)(n.td,{style:{textAlign:"center"},children:[(0,r.jsx)(n.a,{href:"/docs/learn-xcm",children:"XCM"})," as a cross-chain message format."]}),(0,r.jsxs)(n.td,{style:{textAlign:"center"},children:[(0,r.jsx)(n.a,{href:"https://docs.hyperbridge.network/protocol/ismp",children:"ISMP"})," as a bridge integration protocol."]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{style:{textAlign:"center"},children:"Live."}),(0,r.jsx)(n.td,{style:{textAlign:"center"},children:"On Testnet."})]})]})]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)("sup",{children:"1"})," WETH sent through different bridges are different. Unless specific logic is\nimplemented, WETH sent through Snowbridge cannot be sent back using Hyperbridge.",(0,r.jsx)("br",{}),(0,r.jsx)("br",{})]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)("sup",{children:"2"}),' Because Snowbridge is deployed on a system chain, Snowbridge WETH can be considered as\nthe "official" WETH on Polkadot (although this must not be interpreted as a positive sign for\nSnowbridge and negative sign for Hyperbridge).',(0,r.jsx)("br",{}),(0,r.jsx)("br",{})]}),"\n",(0,r.jsx)(n.h2,{id:"resources",children:"Resources"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"https://docs.snowbridge.network/",children:"Snowbridge - a trustless, decentralized bridge between Polkadot and Ethereum"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"https://github.com/paritytech/parity-bridges-common",children:"Parity Bridges Common Resources"})}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"https://github.com/ChainSafe/ChainBridge",children:"Substrate/Ethereum Bridge"})," - ChainSafe and Centrifuge\nwere awarded a grant in W3F Grants\n",(0,r.jsx)(n.a,{href:"https://medium.com/web3foundation/web3-foundation-grants-wave-5-recipients-2205f4fde096",children:"Wave 5"}),"\nto build a Substrate to Ethereum two-way bridge."]}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"https://docs.interlay.io/#//",children:"iBTC (Bitcoin <-> Polkadot Bridge)"})}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"https://github.com/bifrost-codes/bifrost",children:"EOS Bridge"})," - The Bifrost team was awarded a grant in\nW3F Grants\n",(0,r.jsx)(n.a,{href:"https://medium.com/web3foundation/web3-foundation-grants-wave-5-recipients-2205f4fde096",children:"Wave 5"}),"\nto build a bridge to EOS."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"https://github.com/ChorusOne/tendermint-light-client",children:"Tendermint Bridge"})," - ChorusOne was awarded\na grant in\n",(0,r.jsx)(n.a,{href:"https://medium.com/web3foundation/web3-foundation-grants-wave-5-recipients-2205f4fde096",children:"Wave 5"}),"\nto build a GRANDPA light client in Tendermint."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"https://app.interlay.io/btc?tab=issue",children:"Interlay BTC Bridge"})," - The Interlay team was awarded a\ngrant in W3F grants\n",(0,r.jsx)(n.a,{href:"https://medium.com/web3foundation/web3-foundation-grants-wave-5-recipients-2205f4fde096",children:"Wave 5"}),"\nto build a trust-minimized BTC bridge."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"https://github.com/chainx-org/ChainX/tree/master/xpallets/gateway/bitcoin",children:"ChainX BTC Bridge"})," -\nChainX has implemented a BTC to Substrate bridge for their parachain."]}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"https://poa.network/",children:"POA Network"})}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"https://medium.com/giveth/ethereum-dapp-scaling-poa-network-acee8a51e772",children:"Case study"})," of POA\nNetwork's implementation of Parity's bridge chain solution."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"https://github.com/hicommonwealth/edgeth_bridge/",children:"Edgeth Bridge"})," - a bridge from Ethereum to\nEdgeware chain (a Substrate-based chain) is now defunct and not maintained, but it is a good\nexample."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"https://eprint.iacr.org/2018/643.pdf",children:"XCLAIM"})," - XCLAIM is a framework for achieving trustless and\nefficient cross-chain exchanges using cryptocurrency-backed assets."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"https://github.com/celer-network/cBridge-contracts",children:"Celer cBridge"})," - a bridge to transfer assets\nfrom Ethereum & Binance Smart Chain to the Astar Polkadot EVM."]}),"\n"]})]})}function u(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(h,{...e})}):h(e)}},3514:(e,n,t)=>{t.d(n,{A:()=>x});t(96540);var r=t(34164),i=t(26972),s=t(28774),a=t(53465),o=t(16654),l=t(21312),d=t(51107);const c={cardContainer:"cardContainer_fWXF",cardTitle:"cardTitle_rnsV",cardDescription:"cardDescription_PWke"};var h=t(74848);function u(e){var n=e.href,t=e.children;return(0,h.jsx)(s.A,{href:n,className:(0,r.A)("card padding--lg",c.cardContainer),children:t})}function g(e){var n=e.href,t=e.icon,i=e.title,s=e.description;return(0,h.jsxs)(u,{href:n,children:[(0,h.jsxs)(d.A,{as:"h2",className:(0,r.A)("text--truncate",c.cardTitle),title:i,children:[t," ",i]}),s&&(0,h.jsx)("p",{className:(0,r.A)("text--truncate",c.cardDescription),title:s,children:s})]})}function p(e){var n,t,r=e.item,s=(0,i.Nr)(r),o=(t=(0,a.W)().selectMessage,function(e){return t(e,(0,l.T)({message:"1 item|{count} items",id:"theme.docs.DocCard.categoryDescription.plurals",description:"The default description for a category card in the generated index about how many items this category includes"},{count:e}))});return s?(0,h.jsx)(g,{href:s,icon:"\ud83d\uddc3\ufe0f",title:r.label,description:null!=(n=r.description)?n:o(r.items.length)}):null}function m(e){var n,t,r=e.item,s=(0,o.A)(r.href)?"\ud83d\udcc4\ufe0f":"\ud83d\udd17",a=(0,i.cC)(null!=(n=r.docId)?n:void 0);return(0,h.jsx)(g,{href:r.href,icon:s,title:r.label,description:null!=(t=r.description)?t:null==a?void 0:a.description})}function b(e){var n=e.item;switch(n.type){case"link":return(0,h.jsx)(m,{item:n});case"category":return(0,h.jsx)(p,{item:n});default:throw new Error("unknown item type "+JSON.stringify(n))}}function f(e){var n=e.className,t=(0,i.$S)();return(0,h.jsx)(x,{items:t.items,className:n})}function x(e){var n=e.items,t=e.className;if(!n)return(0,h.jsx)(f,Object.assign({},e));var s=(0,i.d1)(n);return(0,h.jsx)("section",{className:(0,r.A)("row",t),children:s.map((function(e,n){return(0,h.jsx)("article",{className:"col col--6 margin-bottom--lg",children:(0,h.jsx)(b,{item:e})},n)}))})}},53465:(e,n,t)=>{t.d(n,{W:()=>d});var r=t(96540),i=t(44586),s=["zero","one","two","few","many","other"];function a(e){return s.filter((function(n){return e.includes(n)}))}var o={locale:"en",pluralForms:a(["one","other"]),select:function(e){return 1===e?"one":"other"}};function l(){var e=(0,i.A)().i18n.currentLocale;return(0,r.useMemo)((function(){try{return n=e,t=new Intl.PluralRules(n),{locale:n,pluralForms:a(t.resolvedOptions().pluralCategories),select:function(e){return t.select(e)}}}catch(r){return console.error('Failed to use Intl.PluralRules for locale "'+e+'".\nDocusaurus will fallback to the default (English) implementation.\nError: '+r.message+"\n"),o}var n,t}),[e])}function d(){var e=l();return{selectMessage:function(n,t){return function(e,n,t){var r=e.split("|");if(1===r.length)return r[0];r.length>t.pluralForms.length&&console.error("For locale="+t.locale+", a maximum of "+t.pluralForms.length+" plural forms are expected ("+t.pluralForms.join(",")+"), but the message contains "+r.length+": "+e);var i=t.select(n),s=t.pluralForms.indexOf(i);return r[Math.min(s,r.length-1)]}(t,n,e)}}}},28453:(e,n,t)=>{t.d(n,{R:()=>a,x:()=>o});var r=t(96540);const i={},s=r.createContext(i);function a(e){const n=r.useContext(s);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:a(e.components),r.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/3bd77df4.a4225464.js b/assets/js/3bd77df4.a4225464.js new file mode 100644 index 000000000000..1f6ce39222bd --- /dev/null +++ b/assets/js/3bd77df4.a4225464.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3976],{50628:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>l,default:()=>u,frontMatter:()=>o,metadata:()=>r,toc:()=>c});const r=JSON.parse('{"id":"learn/learn-bridges","title":"Bridges","description":"Bridges and Examples of Common Bridges.","source":"@site/../docs/learn/learn-bridges.md","sourceDirName":"learn","slug":"/learn-bridges","permalink":"/docs/learn-bridges","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-bridges.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1727178265000,"frontMatter":{"id":"learn-bridges","title":"Bridges","sidebar_label":"Bridges","description":"Bridges and Examples of Common Bridges.","keywords":["bridges","cross-chain","bridge methods"],"slug":"../learn-bridges"},"sidebar":"docs","previous":{"title":"Coretime for Parachains","permalink":"/docs/learn-guides-coretime-parachains"},"next":{"title":"Snowbridge","permalink":"/docs/learn-snowbridge"}}');var i=t(74848),s=t(28453),a=t(3514);const o={id:"learn-bridges",title:"Bridges",sidebar_label:"Bridges",description:"Bridges and Examples of Common Bridges.",keywords:["bridges","cross-chain","bridge methods"],slug:"../learn-bridges"},l=void 0,d={},c=[{value:"Trustless Bridges",id:"trustless-bridges",level:2},{value:"On-chain Bridge Components",id:"on-chain-bridge-components",level:2},{value:"via Bridge Pallets",id:"via-bridge-pallets",level:3},{value:"via Smart Contracts",id:"via-smart-contracts",level:3},{value:"via Higher-Order Protocols",id:"via-higher-order-protocols",level:3},{value:"Bitcoin Bridge (XCLAIM <-> Substrate <-> Polkadot)",id:"bitcoin-bridge-xclaim---substrate---polkadot",level:4},{value:"Offchain Bridge Components",id:"offchain-bridge-components",level:2},{value:"Bridge Comparison",id:"bridge-comparison",level:2},{value:"Resources",id:"resources",level:2}];function h(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",h4:"h4",li:"li",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,s.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.p,{children:"Bridges are vital infrastructure, enabling cross-chain communication between technically diverse\nnetworks like Polkadot and Ethereum. Bridges allow these chains to acknowledge and trust each\nother\u2019s finalized states, paving the way for many applications like asset swaps and chain\nmigrations."}),"\n",(0,i.jsxs)(n.p,{children:["Current bridge architectures rely on centralized intermediaries, such as multi-signature relayers,\nto validate information passed between chains. This approach introduces additional trust assumptions\nand creates a single point of failure, opening up attack vectors like censorship. Recent history has\nshown how risky this can be \u2014 centralized entities can be compromised or act maliciously. According\nto ",(0,i.jsx)(n.a,{href:"https://www.chainalysis.com/blog/cross-chain-bridge-hacks-2022/",children:"Chainalysis report"}),", failures\nin centralized bridges account for over 60% of all crypto hacks, resulting in losses exceeding $2\nbillion. Four of the top five incidents on the ",(0,i.jsx)(n.a,{href:"https://rekt.news/tr/leaderboard/",children:"rekt leaderboard"}),"\nare bridge-related hacks. A system\u2019s security is only ",(0,i.jsx)(n.strong,{children:"as strong as its weakest link"}),", and bridges\nhave proven to be a critical vulnerability."]}),"\n",(0,i.jsx)(n.admonition,{title:"Purpose of bridging",type:"info",children:(0,i.jsxs)(n.p,{children:["Bridges enable Polkadot to communicate with external blockchains such as Bitcoin and Ethereum.\nWithin Polkadot, chains already benefit from secure interoperability. For more information about the\nnative interoperability technology that allows parachains to communicate trustlessly, please see the\ndedicated ",(0,i.jsx)(n.a,{href:"/docs/learn-xcm",children:"cross consensus"})," page on the Wiki."]})}),"\n",(0,i.jsx)(n.p,{children:"Thus, Bridge designs come in various flavors ranging from centralized and trusted to more\ndecentralized and trustless. Polkadot favors the latter bridge designs for its ecosystem."}),"\n",(0,i.jsx)(a.A,{}),"\n",(0,i.jsx)(n.h2,{id:"trustless-bridges",children:"Trustless Bridges"}),"\n",(0,i.jsxs)(n.p,{children:["A two-way trustless bridge between chains A and B can be viewed as two one-way bridges (A \u2192 B and B\n\u2192 A). Hence, the design of a two-way bridge can be explained in terms of a one-way bridge with a\nsource and a target chain. Any trustless bridge will have ",(0,i.jsx)(n.strong,{children:"on-chain and off-chain components"}),"."]}),"\n",(0,i.jsx)(n.p,{children:"Trustlessness means that users do not need to trust particular individuals or organizations; they\nonly need to trust mathematics, code, cryptography, and protocol. An example of a system which\nimplies a high level of trust would be that of a bridge which is controlled via a multi-signature\nscheme, wherein you must trust the cosignatories."}),"\n",(0,i.jsx)(n.p,{children:"Basic assumptions are always needed in principle when defining a trustless system as a completely\ntrustless setup cannot always be guaranteed."}),"\n",(0,i.jsx)(n.h2,{id:"on-chain-bridge-components",children:"On-chain Bridge Components"}),"\n",(0,i.jsx)(n.p,{children:"Building a trustless bridge can be done through the implementation of the following on-chain\ncomponents (ordered by suggested methodology):"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.em,{children:"Bridge pallets"})," - For Substrate-native chains, use a bridge pallet (e.g.\n",(0,i.jsxs)(n.a,{href:"/docs/learn-dot-ksm-bridge",children:["Kusama ",(0,i.jsx)(n.code,{children:"<->"})," Polkadot bridge"]}),", since both networks' parachains use\nSubstrate)."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.em,{children:"Smart contracts"})," - If the chain is not on Substrate, you should have smart contracts on the\nnon-Substrate chain to bridge (e.g. ",(0,i.jsx)(n.a,{href:"/docs/learn-snowbridge",children:"Snowbridge"}),", Ethereum mainnet has a\nbridge smart contract that initiates Eth transactions based on incoming XCMP messages)."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.em,{children:"Higher-order protocols"})," - If your chain does not support smart contracts (e.g. Bitcoin), you\nshould use ",(0,i.jsx)(n.a,{href:"https://eprint.iacr.org/2018/643.pdf",children:"XClaim"})," or similar protocols to bridge."]}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"On-chain bridge components are modules (usually pallets or smart contracts) deployed on the chain's\nruntime. Modules that track the finality of the source chain are required to be deployed on the\ntarget chain, while the modules that deal with cross-chain messaging need to be deployed on both\nsource and target chains."}),"\n",(0,i.jsx)(n.p,{children:"There are also on-chain components responsible for queuing messages at the source chain and\nreceiving the message proofs at the target chain. The messages are sent through a particular lane,\nwhere they are guaranteed to be received in the same order they are sent. On Bridge Hub, the\nmessages are in XCM format, and an XCM executor is used to dispatch them."}),"\n",(0,i.jsx)(n.h3,{id:"via-bridge-pallets",children:"via Bridge Pallets"}),"\n",(0,i.jsxs)(n.p,{children:["Operating a bridge between chains that finalize through GRANDPA consensus is straightforward. A\nGRANDPA light client of the source chain built into the target chain's runtime provides a \"source of\ntruth\" about the source chain's finality. For instance,\n",(0,i.jsx)(n.a,{href:"/docs/learn-system-chains#bridge-hub",children:"Bridge Hub"})," runs an on-chain light client of Kusama which uses\nGRANDPA consensus and infers the finality of all the transactions on Kusama and its parachains."]}),"\n",(0,i.jsx)(n.p,{children:"Receiving messages on Polkadot from an external, non-parachain blockchain is possible through a\nSubstrate pallet. The Substrate instance can then be deployed to Polkadot either as a system-level\nparachain (native extension to the core Polkadot software) or as a community-operated parachain."}),"\n",(0,i.jsxs)(n.p,{children:["An example of a bridge that would strictly use bridge pallets would be\n",(0,i.jsxs)(n.a,{href:"/docs/learn-dot-ksm-bridge",children:["the Kusama ",(0,i.jsx)(n.code,{children:"<->"})," Polkadot bridge"]}),", since both use parachains based on\nSubstrate."]}),"\n",(0,i.jsx)(n.p,{children:"For the standalone chains that will not have a parachain bridging module (non-Substrate), it will be\nnecessary to deploy bridge contracts."}),"\n",(0,i.jsx)(n.h3,{id:"via-smart-contracts",children:"via Smart Contracts"}),"\n",(0,i.jsxs)(n.p,{children:["Given the generality of blockchain platforms with Turing-complete smart contract languages, it is\npossible to bridge Polkadot and any other smart-contract-capable blockchain. For instance,\n",(0,i.jsx)(n.a,{href:"/docs/learn-snowbridge",children:"Snowbridge"})," uses the Polkadot Bridge Hub to run an on-chain light client of\nEthereum to infer the finality of transactions on the Ethereum chain. Running a GRANDPA light client\nthrough smart contracts on Ethereum is possible but expensive. Hence,\n",(0,i.jsx)(n.a,{href:"/docs/learn-consensus#bridging-beefy",children:"BEEFY consensus layer"})," sitting on top of GRANDPA enables a\ncost-effective solution for operating a trustless bridge with Ethereum and other protocols.\nTrustless bridges to chains like Cosmos, Avalanche, NEAR, etc., would require custom pallets to be\ndeployed on Bridge Hub."]}),"\n",(0,i.jsx)(n.admonition,{type:"note",children:(0,i.jsxs)(n.p,{children:["To learn more on how Bitcoin and Ethereum can cooperate and collaborate through Polkadot, check out\nthis explainer video ",(0,i.jsx)(n.a,{href:"https://www.youtube.com/watch?v=rvoFUiOR3cM",children:"here"})]})}),"\n",(0,i.jsx)(n.h3,{id:"via-higher-order-protocols",children:"via Higher-Order Protocols"}),"\n",(0,i.jsxs)(n.p,{children:["Higher-order protocols (like ",(0,i.jsx)(n.a,{href:"https://eprint.iacr.org/2018/643.pdf",children:"XCLAIM"}),") can be used to bridge\nbut should only be used when other options are not available. XCLAIM, in particular, requires any\nswappable asset to be backed by a collateral of higher value than the swappable assets, which adds\nadditional overhead."]}),"\n",(0,i.jsx)(n.p,{children:"An example of a network that would be well-suited for higher-order protocols would be Bitcoin, since\nit does not support smart contracts, and it's not based on Substrate."}),"\n",(0,i.jsx)(n.h4,{id:"bitcoin-bridge-xclaim---substrate---polkadot",children:"Bitcoin Bridge (XCLAIM <-> Substrate <-> Polkadot)"}),"\n",(0,i.jsxs)(n.p,{children:["The Interlay team has written a ",(0,i.jsx)(n.a,{href:"https://spec.interlay.io/",children:"specification"})," on a Bitcoin bridge that\nis based on the ",(0,i.jsx)(n.a,{href:"https://eprint.iacr.org/2018/643.pdf",children:"XCLAIM"})," design paper. The protocol enables a\ntwo-way bridge between Polkadot and Bitcoin. It allows holders of BTC to issue iBTC in Polkadot and\nholders of iBTC to redeem BTC on the Bitcoin chain."]}),"\n",(0,i.jsx)(n.p,{children:"The Bitcoin bridge, as documented in the specification, is composed of two logically different\ncomponents:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"The XCLAIM component maintains all accounts that own iBTC."}),"\n",(0,i.jsx)(n.li,{children:"The BTC-Relay verifies the Bitcoin state when a new transaction is submitted."}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"For full details on how it works, please refer to the specification."}),"\n",(0,i.jsxs)(n.p,{children:["There is now a\n",(0,i.jsx)(n.a,{href:"https://app.interlay.io/btc?tab=issue",children:"working implementation and mainnet bridge available"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"offchain-bridge-components",children:"Offchain Bridge Components"}),"\n",(0,i.jsx)(n.p,{children:"Offchain bridge components are separate processes called relayers. Relayers are connected both to\nthe source chain and target chain nodes. For instance, the task of relayer between chains that run\non GRANDPA consensus is to submit source chain GRANDPA justifications and their corresponding\nheaders to the Bridge GRANDPA Finality Pallet deployed at the target chain. For that, the relayer\nsubscribes to the source chain GRANDPA justifications stream and submits every new justification to\nthe target chain GRANDPA light client."}),"\n",(0,i.jsxs)(n.p,{children:["Messages between chains are relayed through the relayers, which involve messages delivery relay and\ndelivery confirmation relay. For more information on relayers and the Bridge Hub design, read\nthrough the\n",(0,i.jsx)(n.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/master/bridges/docs/high-level-overview.md",children:"High-level bridge documentation on the Polkadot-SDK repository"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"bridge-comparison",children:"Bridge Comparison"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.a,{href:"/docs/learn-snowbridge",children:"Snowbridge"})," and ",(0,i.jsx)(n.a,{href:"/docs/learn-hyperbridge",children:"Hyperbridge"})," are two trustless\nbridges that connect Polkadot with other ecosystems. Here below is a main technical comparison\nbetween the two."]}),"\n",(0,i.jsx)(n.admonition,{title:"Tokens sent through different bridges are different",type:"danger",children:(0,i.jsxs)(n.p,{children:["Unless specific logic is implemented, WETH sent through Snowbridge cannot be sent back using\nHyperbridge, and ",(0,i.jsx)(n.em,{children:"vice versa"}),". ",(0,i.jsx)(n.strong,{children:"Sending tokens using different bridges might lead to loss of\nfunds."})]})}),"\n",(0,i.jsxs)(n.table,{children:[(0,i.jsx)(n.thead,{children:(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.th,{style:{textAlign:"center"},children:"Snowbridge"}),(0,i.jsx)(n.th,{style:{textAlign:"center"},children:"Hyperbridge"})]})}),(0,i.jsxs)(n.tbody,{children:[(0,i.jsxs)(n.tr,{children:[(0,i.jsxs)(n.td,{style:{textAlign:"center"},children:["Ethereum only",(0,i.jsx)("sup",{children:"1"}),"."]}),(0,i.jsx)(n.td,{style:{textAlign:"center"},children:"Multichain."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsxs)(n.td,{style:{textAlign:"center"},children:["Ethereum light client on ",(0,i.jsx)(n.a,{href:"/docs/learn-system-chains#bridge-hub",children:"Bridge Hub System Chain"}),(0,i.jsx)("sup",{children:"2"})," and Polkadot light client on Ethereum smart contract."]}),(0,i.jsx)(n.td,{style:{textAlign:"center"},children:"Own parachain."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsxs)(n.td,{style:{textAlign:"center"},children:[(0,i.jsx)(n.a,{href:"/docs/learn-DOT",children:"DOT token"}),"."]}),(0,i.jsx)(n.td,{style:{textAlign:"center"},children:"Hyperbridge native token."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsxs)(n.td,{style:{textAlign:"center"},children:[(0,i.jsx)(n.a,{href:"/docs/learn-snowbridge#random-sampling-beefy",children:"Random-sampling BEEFY"})," for prover."]}),(0,i.jsx)(n.td,{style:{textAlign:"center"},children:"Zero-knowledge Proofs."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{style:{textAlign:"center"},children:"Simple codebase but complex analysis by the verifier."}),(0,i.jsx)(n.td,{style:{textAlign:"center"},children:"Complex codebase, but simple analysis by the verifier."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{style:{textAlign:"center"},children:"Low-spec hardware for prover, permissionless."}),(0,i.jsx)(n.td,{style:{textAlign:"center"},children:"High-spec hardware for prover, permissionless but somewhat permissioned due to the ZK-based nature."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{style:{textAlign:"center"},children:"Possible high-level decentralization for the prover."}),(0,i.jsxs)(n.td,{style:{textAlign:"center"},children:["Prover decentralization possible but probably by removing dependency on ZK circuits through BLS (",(0,i.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/BLS_digital_signature",children:"Boneh\u2013Lynn\u2013Shacham"}),") version of BEEFY and BLS precompiles on Ethereum."]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsxs)(n.td,{style:{textAlign:"center"},children:["Ethereum > Polkadot: In the range of ",(0,i.jsx)(n.a,{href:"https://app.snowbridge.network/status",children:"10-20 minutes"}),". Polkadot > Ethereum: High latency (half an hour) as two epochs are needed on Ethereum to achieve unpredictable randomness to update the Polkadot's state."]}),(0,i.jsx)(n.td,{style:{textAlign:"center"},children:"Ethereum > Polkadot: In the range of 10-20 minutes (to Polkadot, both bridges have the same latency). Polkadot > Ethereum: Low latency, 5-7 minutes on reference hardware."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsxs)(n.td,{style:{textAlign:"center"},children:["Dependency on external library for BLS signature verification (",(0,i.jsx)(n.a,{href:"https://github.com/sigp/milagro_bls",children:"Milagro BLS"}),", used by Lighthouse, the Rust Ethereum consensus client)."]}),(0,i.jsxs)(n.td,{style:{textAlign:"center"},children:["Dependency on external libraries due to ZK-based nature. Such libraries include ",(0,i.jsx)(n.a,{href:"https://eprint.iacr.org/2019/953.pdf",children:"PLONK"}),"."]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsxs)(n.td,{style:{textAlign:"center"},children:[(0,i.jsx)(n.a,{href:"/docs/learn-xcm",children:"XCM"})," as a cross-chain message format."]}),(0,i.jsxs)(n.td,{style:{textAlign:"center"},children:[(0,i.jsx)(n.a,{href:"https://docs.hyperbridge.network/protocol/ismp",children:"ISMP"})," as a bridge integration protocol."]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{style:{textAlign:"center"},children:"Live."}),(0,i.jsx)(n.td,{style:{textAlign:"center"},children:"On Testnet."})]})]})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)("sup",{children:"1"})," WETH sent through different bridges are different. Unless specific logic is\nimplemented, WETH sent through Snowbridge cannot be sent back using Hyperbridge.",(0,i.jsx)("br",{}),(0,i.jsx)("br",{})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)("sup",{children:"2"}),' Because Snowbridge is deployed on a system chain, Snowbridge WETH can be considered as\nthe "official" WETH on Polkadot (although this must not be interpreted as a positive sign for\nSnowbridge and negative sign for Hyperbridge).',(0,i.jsx)("br",{}),(0,i.jsx)("br",{})]}),"\n",(0,i.jsx)(n.h2,{id:"resources",children:"Resources"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://docs.snowbridge.network/",children:"Snowbridge - a trustless, decentralized bridge between Polkadot and Ethereum"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://github.com/paritytech/parity-bridges-common",children:"Parity Bridges Common Resources"})}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.a,{href:"https://github.com/ChainSafe/ChainBridge",children:"Substrate/Ethereum Bridge"})," - ChainSafe and Centrifuge\nwere awarded a grant in W3F Grants\n",(0,i.jsx)(n.a,{href:"https://medium.com/web3foundation/web3-foundation-grants-wave-5-recipients-2205f4fde096",children:"Wave 5"}),"\nto build a Substrate to Ethereum two-way bridge."]}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://docs.interlay.io/#//",children:"iBTC (Bitcoin <-> Polkadot Bridge)"})}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.a,{href:"https://github.com/bifrost-codes/bifrost",children:"EOS Bridge"})," - The Bifrost team was awarded a grant in\nW3F Grants\n",(0,i.jsx)(n.a,{href:"https://medium.com/web3foundation/web3-foundation-grants-wave-5-recipients-2205f4fde096",children:"Wave 5"}),"\nto build a bridge to EOS."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.a,{href:"https://github.com/ChorusOne/tendermint-light-client",children:"Tendermint Bridge"})," - ChorusOne was awarded\na grant in\n",(0,i.jsx)(n.a,{href:"https://medium.com/web3foundation/web3-foundation-grants-wave-5-recipients-2205f4fde096",children:"Wave 5"}),"\nto build a GRANDPA light client in Tendermint."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.a,{href:"https://app.interlay.io/btc?tab=issue",children:"Interlay BTC Bridge"})," - The Interlay team was awarded a\ngrant in W3F grants\n",(0,i.jsx)(n.a,{href:"https://medium.com/web3foundation/web3-foundation-grants-wave-5-recipients-2205f4fde096",children:"Wave 5"}),"\nto build a trust-minimized BTC bridge."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.a,{href:"https://github.com/chainx-org/ChainX/tree/master/xpallets/gateway/bitcoin",children:"ChainX BTC Bridge"})," -\nChainX has implemented a BTC to Substrate bridge for their parachain."]}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://poa.network/",children:"POA Network"})}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.a,{href:"https://medium.com/giveth/ethereum-dapp-scaling-poa-network-acee8a51e772",children:"Case study"})," of POA\nNetwork's implementation of Parity's bridge chain solution."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.a,{href:"https://github.com/hicommonwealth/edgeth_bridge/",children:"Edgeth Bridge"})," - a bridge from Ethereum to\nEdgeware chain (a Substrate-based chain) is now defunct and not maintained, but it is a good\nexample."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.a,{href:"https://eprint.iacr.org/2018/643.pdf",children:"XCLAIM"})," - XCLAIM is a framework for achieving trustless and\nefficient cross-chain exchanges using cryptocurrency-backed assets."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.a,{href:"https://github.com/celer-network/cBridge-contracts",children:"Celer cBridge"})," - a bridge to transfer assets\nfrom Ethereum & Binance Smart Chain to the Astar Polkadot EVM."]}),"\n"]})]})}function u(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(h,{...e})}):h(e)}},3514:(e,n,t)=>{t.d(n,{A:()=>x});t(96540);var r=t(34164),i=t(26972),s=t(28774),a=t(53465),o=t(16654),l=t(21312),d=t(51107);const c={cardContainer:"cardContainer_fWXF",cardTitle:"cardTitle_rnsV",cardDescription:"cardDescription_PWke"};var h=t(74848);function u(e){var n=e.href,t=e.children;return(0,h.jsx)(s.A,{href:n,className:(0,r.A)("card padding--lg",c.cardContainer),children:t})}function g(e){var n=e.href,t=e.icon,i=e.title,s=e.description;return(0,h.jsxs)(u,{href:n,children:[(0,h.jsxs)(d.A,{as:"h2",className:(0,r.A)("text--truncate",c.cardTitle),title:i,children:[t," ",i]}),s&&(0,h.jsx)("p",{className:(0,r.A)("text--truncate",c.cardDescription),title:s,children:s})]})}function p(e){var n,t,r=e.item,s=(0,i.Nr)(r),o=(t=(0,a.W)().selectMessage,function(e){return t(e,(0,l.T)({message:"1 item|{count} items",id:"theme.docs.DocCard.categoryDescription.plurals",description:"The default description for a category card in the generated index about how many items this category includes"},{count:e}))});return s?(0,h.jsx)(g,{href:s,icon:"\ud83d\uddc3\ufe0f",title:r.label,description:null!=(n=r.description)?n:o(r.items.length)}):null}function m(e){var n,t,r=e.item,s=(0,o.A)(r.href)?"\ud83d\udcc4\ufe0f":"\ud83d\udd17",a=(0,i.cC)(null!=(n=r.docId)?n:void 0);return(0,h.jsx)(g,{href:r.href,icon:s,title:r.label,description:null!=(t=r.description)?t:null==a?void 0:a.description})}function b(e){var n=e.item;switch(n.type){case"link":return(0,h.jsx)(m,{item:n});case"category":return(0,h.jsx)(p,{item:n});default:throw new Error("unknown item type "+JSON.stringify(n))}}function f(e){var n=e.className,t=(0,i.$S)();return(0,h.jsx)(x,{items:t.items,className:n})}function x(e){var n=e.items,t=e.className;if(!n)return(0,h.jsx)(f,Object.assign({},e));var s=(0,i.d1)(n);return(0,h.jsx)("section",{className:(0,r.A)("row",t),children:s.map((function(e,n){return(0,h.jsx)("article",{className:"col col--6 margin-bottom--lg",children:(0,h.jsx)(b,{item:e})},n)}))})}},53465:(e,n,t)=>{t.d(n,{W:()=>d});var r=t(96540),i=t(44586),s=["zero","one","two","few","many","other"];function a(e){return s.filter((function(n){return e.includes(n)}))}var o={locale:"en",pluralForms:a(["one","other"]),select:function(e){return 1===e?"one":"other"}};function l(){var e=(0,i.A)().i18n.currentLocale;return(0,r.useMemo)((function(){try{return n=e,t=new Intl.PluralRules(n),{locale:n,pluralForms:a(t.resolvedOptions().pluralCategories),select:function(e){return t.select(e)}}}catch(r){return console.error('Failed to use Intl.PluralRules for locale "'+e+'".\nDocusaurus will fallback to the default (English) implementation.\nError: '+r.message+"\n"),o}var n,t}),[e])}function d(){var e=l();return{selectMessage:function(n,t){return function(e,n,t){var r=e.split("|");if(1===r.length)return r[0];r.length>t.pluralForms.length&&console.error("For locale="+t.locale+", a maximum of "+t.pluralForms.length+" plural forms are expected ("+t.pluralForms.join(",")+"), but the message contains "+r.length+": "+e);var i=t.select(n),s=t.pluralForms.indexOf(i);return r[Math.min(s,r.length-1)]}(t,n,e)}}}},28453:(e,n,t)=>{t.d(n,{R:()=>a,x:()=>o});var r=t(96540);const i={},s=r.createContext(i);function a(e){const n=r.useContext(s);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:a(e.components),r.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/3d1bf5db.731ffac3.js b/assets/js/3d1bf5db.731ffac3.js new file mode 100644 index 000000000000..f8c43fffc741 --- /dev/null +++ b/assets/js/3d1bf5db.731ffac3.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4190],{3413:(e,n,a)=>{a.r(n),a.d(n,{assets:()=>l,contentTitle:()=>c,default:()=>h,frontMatter:()=>r,metadata:()=>i,toc:()=>o});const i=JSON.parse('{"id":"maintain/maintain-guides-async-backing","title":"Upgrade Parachain for Asynchronous Backing Compatibility","description":"Steps on how to upgrade a parachain to be compatible with the relay chain\'s async backing feature.","source":"@site/../docs/maintain/maintain-guides-async-backing.md","sourceDirName":"maintain","slug":"/maintain-guides-async-backing","permalink":"/docs/maintain-guides-async-backing","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/maintain/maintain-guides-async-backing.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1727991122000,"frontMatter":{"id":"maintain-guides-async-backing","title":"Upgrade Parachain for Asynchronous Backing Compatibility","sidebar_label":"Async Backing Upgrade","description":"Steps on how to upgrade a parachain to be compatible with the relay chain\'s async backing feature.","keywords":["async","backing","parachain","consensus"],"slug":"../maintain-guides-async-backing"},"sidebar":"docs","previous":{"title":"Collator Guides","permalink":"/docs/maintain-collator-index"},"next":{"title":"Validator Guides","permalink":"/docs/maintain-validator-index"}}');var t=a(74848),s=a(28453);const r={id:"maintain-guides-async-backing",title:"Upgrade Parachain for Asynchronous Backing Compatibility",sidebar_label:"Async Backing Upgrade",description:"Steps on how to upgrade a parachain to be compatible with the relay chain's async backing feature.",keywords:["async","backing","parachain","consensus"],slug:"../maintain-guides-async-backing"},c=void 0,l={},o=[{value:"Async Backing Prerequisites",id:"async-backing-prerequisites",level:2},{value:"Async Backing Terminology and Parameters",id:"async-backing-terminology-and-parameters",level:2},{value:"Prerequisite",id:"prerequisite",level:2},{value:"Phase 1 - Update Parachain Runtime",id:"phase-1---update-parachain-runtime",level:2},{value:"Phase 2 - Update Parachain Nodes",id:"phase-2---update-parachain-nodes",level:2},{value:"Phase 3 - Activate Async Backing",id:"phase-3---activate-async-backing",level:2},{value:"Timing by Block Number",id:"timing-by-block-number",level:2}];function d(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",li:"li",mdxAdmonitionTitle:"mdxAdmonitionTitle",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.admonition,{title:"Who is this guide for?",type:"info",children:(0,t.jsxs)(n.p,{children:["This guide is relevant for cumulus based parachain projects started in 2023 or before. Later\nprojects should already be async backing compatible. If starting a new parachain project, please use\nan async backing compatible template such as\n",(0,t.jsx)(n.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/templates/parachain",children:(0,t.jsx)(n.code,{children:"cumulus/parachain-template"})}),"."]})}),"\n",(0,t.jsx)(n.p,{children:"The rollout process for Async Backing has three phases. Phases 1 and 2 below put new infrastructure\nin place. Then we can simply turn on async backing in phase 3. But first, some pre-reqs and context\nto set the stage."}),"\n",(0,t.jsx)(n.h2,{id:"async-backing-prerequisites",children:"Async Backing Prerequisites"}),"\n",(0,t.jsx)(n.admonition,{type:"info",children:(0,t.jsxs)(n.p,{children:["For more contextual information about asynchronous backing, see\n",(0,t.jsx)(n.a,{href:"/docs/learn-async-backing",children:"this page"}),"."]})}),"\n",(0,t.jsxs)(n.p,{children:["Pull the latest version of Cumulus for use with your parachain. It contains necessary changes for\nasync backing compatibility. Latest on master branch of\n",(0,t.jsx)(n.a,{href:"https://github.com/paritytech/polkadot-sdk",children:"Polkadot-SDK"})," is currently sufficient. Any 2024 release\nwill work as well."]}),"\n",(0,t.jsx)(n.h2,{id:"async-backing-terminology-and-parameters",children:"Async Backing Terminology and Parameters"}),"\n",(0,t.jsx)(n.p,{children:"Time for a bit of context before we get started. The following concepts will aid in demystifying the\ncollator side of Async Backing and establish a basic understanding of the changes being made:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Unincluded segment"})," - From the perspective of a parachain block under construction, the\nunincluded segment describes a chain of recent block ancestors which have yet to be included on\nthe relay chain. The ability to build new blocks on top of the unincluded segment rather than on\ntop of blocks freshly included in the relay chain is the core of asynchronous backing."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Capacity"})," - The maximum size of the unincluded segment. The longer this is, the farther ahead a\nparachain can work, producing new candidates before the ancestors of those candidates have been\nseen as included on-chain. Practically, a capacity of 2-3 is sufficient to realize the full\nbenefits of asynchronous backing, at least until the release of elastic scaling."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Velocity"})," - The base rate at which a parachain should produce blocks. A velocity of 1 indicates\nthat 1 parachain block should be produced per relay chain block. In order to fill the unincluded\nsegment with candidates, collators may build up to ",(0,t.jsx)(n.code,{children:"Velocity + 1"})," candidates per aura slot while\nthere is remaining capacity. When elastic scaling has been released velocities greater than 1 will\nbe supported."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"AllowMultipleBlocksPerSlot"})," - If this is ",(0,t.jsx)(n.code,{children:"true"}),", Aura will allow slots to stay the same across\nsequential parablocks. Otherwise the slot number must increase with each block. To fill the\nunincluded segment as described above we need this to be ",(0,t.jsx)(n.code,{children:"true"}),"."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"FixedVelocityConsensusHook"})," - This is a variety of ",(0,t.jsx)(n.code,{children:"ConsensusHook"})," intended to be passed to\n",(0,t.jsx)(n.code,{children:"parachain-system"})," as part of its ",(0,t.jsx)(n.code,{children:"Config"}),". It is triggered on initialization of a new runtime. An\ninstance of ",(0,t.jsx)(n.code,{children:"FixedVelocityConsensusHook"})," is defined with both a fixed capacity and velocity. It\naborts the runtime early if either capacity or velocity is exceeded, as the collator shouldn\u2019t be\ncreating additional blocks in that case."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"AsyncBackingParams.max_candidate_depth"})," - This parameter determines the maximum unincluded\nsegment depth the relay chain will support. Candidates sent to validators which exceed\n",(0,t.jsx)(n.code,{children:"max_candidate_depth"})," will be ignored. ",(0,t.jsx)(n.code,{children:"Capacity"}),", as mentioned above, should not exceed\n",(0,t.jsx)(n.code,{children:"max_candidate_depth"}),"."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"AsyncBackingParams.allowed_ancestry_len"})," - Each parachain block candidate has a ",(0,t.jsx)(n.code,{children:"relay_parent"}),"\nfrom which its execution and validation context is derived. Before async backing the\n",(0,t.jsx)(n.code,{children:"relay_parent"})," for a candidate not yet backed was required to be the fresh head of a fork. With\nasync backing we can relax this requirement. Instead we set a conservative maximum age in blocks\nfor the ",(0,t.jsx)(n.code,{children:"relay_parent"}),"s of candidates in the unincluded segment. This age, ",(0,t.jsx)(n.code,{children:"allowed_ancestry_len"}),"\nlives on the relay chain and is queried by parachains when deciding which block to build on top\nof."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Lookahead Collator"})," - A collator for Aura that looks ahead of the most recently included\nparachain block when determining what to build upon. This collator also builds additional blocks\nwhen the maximum backlog is not saturated. The size of the backlog is determined by invoking the\nAuraUnincludedSegmentApi. If that runtime API is not supported, this assumes a maximum backlog\nsize of 1."]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"prerequisite",children:"Prerequisite"}),"\n",(0,t.jsx)(n.p,{children:"The relay chain needs to have async backing enabled so double-check that the relay chain\nconfiguration contains the following three parameters (especially when testing locally e.g. with\nzombienet):"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",children:'"async_backing_params": {\n "max_candidate_depth": 3,\n "allowed_ancestry_len": 2\n},\n"scheduling_lookahead": 2\n'})}),"\n",(0,t.jsxs)(n.admonition,{type:"warning",children:[(0,t.jsxs)(n.mdxAdmonitionTitle,{children:["warning ",(0,t.jsx)(n.code,{children:"scheduling_lookahead"})," must be set to 2, otherwise parachain block times will"]}),(0,t.jsx)(n.p,{children:"degrade to worse than with sync backing!"})]}),"\n",(0,t.jsx)(n.h2,{id:"phase-1---update-parachain-runtime",children:"Phase 1 - Update Parachain Runtime"}),"\n",(0,t.jsx)(n.p,{children:"This phase involves configuring your parachain\u2019s runtime to make use of async backing system."}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Establish constants for ",(0,t.jsx)(n.code,{children:"capacity"})," and ",(0,t.jsx)(n.code,{children:"velocity"})," and set both of them to 1 in\n",(0,t.jsx)(n.code,{children:"/runtime/src/lib.rs"}),"."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Establish a constant relay chain slot duration measured in milliseconds equal to ",(0,t.jsx)(n.code,{children:"6000"})," in\n",(0,t.jsx)(n.code,{children:"/runtime/src/lib.rs"}),"."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-rust",children:"/// Maximum number of blocks simultaneously accepted by the Runtime, not yet included into the\n/// relay chain.\npub const UNINCLUDED_SEGMENT_CAPACITY: u32 = 1;\n/// How many parachain blocks are processed by the relay chain per parent. Limits the number of\n/// blocks authored per slot.\npub const BLOCK_PROCESSING_VELOCITY: u32 = 1;\n/// Relay chain slot duration, in milliseconds.\npub const RELAY_CHAIN_SLOT_DURATION_MILLIS: u32 = 6000;\n"})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Establish constants ",(0,t.jsx)(n.code,{children:"MILLISECS_PER_BLOCK"})," and ",(0,t.jsx)(n.code,{children:"SLOT_DURATION"})," if not already present in\n",(0,t.jsx)(n.code,{children:"/runtime/src/lib.rs"}),"."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-rust",children:"\n/// BLOCKSkkhasd will be produced at a minimum duration defined by `SLOT_DURATION`.\n/// `SLOT_DURATION` is picked up by `pallet_timestamp` which is in turn picked\n/// up by `pallet_aura` to implement `fn slot_duration()`.\n///\n/// Change this to adjust the block time.\npub const MILLISECS_PER_BLOCK: u64 = 12000;\npub const SLOT_DURATION: u64 = MILLISECS_PER_BLOCK;\n"})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Configure ",(0,t.jsx)(n.code,{children:"cumulus_pallet_parachain_system"})," in ",(0,t.jsx)(n.code,{children:"runtime/src/lib.rs"})]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["Define a ",(0,t.jsx)(n.code,{children:"FixedVelocityConsensusHook"})," using our capacity, velocity, and relay slot duration\nconstants. Use this to set the parachain system ",(0,t.jsx)(n.code,{children:"ConsensusHook"})," property."]}),"\n"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-rust",children:"impl cumulus_pallet_parachain_system::Config for Runtime {\n\ttype RuntimeEvent = RuntimeEvent;\n\ttype OnSystemEvent = ();\n\ttype SelfParaId = parachain_info::Pallet;\n\ttype OutboundXcmpMessageSource = XcmpQueue;\n\ttype DmpQueue = frame_support::traits::EnqueueWithOrigin;\n\ttype ReservedDmpWeight = ReservedDmpWeight;\n\ttype XcmpMessageHandler = XcmpQueue;\n\ttype ReservedXcmpWeight = ReservedXcmpWeight;\n\ttype CheckAssociatedRelayNumber = RelayNumberMonotonicallyIncreases;\n // highlight-next-line\n\ttype ConsensusHook = ConsensusHook;\n\ttype WeightInfo = weights::cumulus_pallet_parachain_system::WeightInfo;\n}\n// highlight-start\ntype ConsensusHook = cumulus_pallet_aura_ext::FixedVelocityConsensusHook<\n\tRuntime,\n\tRELAY_CHAIN_SLOT_DURATION_MILLIS,\n\tBLOCK_PROCESSING_VELOCITY,\n\tUNINCLUDED_SEGMENT_CAPACITY,\n>;\n// highlight-end\n"})}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["Set the parachain system property ",(0,t.jsx)(n.code,{children:"CheckAssociatedRelayNumber"})," to\n",(0,t.jsx)(n.code,{children:"RelayNumberMonotonicallyIncreases"})]}),"\n"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-rust",children:"impl cumulus_pallet_parachain_system::Config for Runtime {\n\ttype RuntimeEvent = RuntimeEvent;\n\ttype OnSystemEvent = ();\n\ttype SelfParaId = parachain_info::Pallet;\n\ttype OutboundXcmpMessageSource = XcmpQueue;\n\ttype DmpQueue = frame_support::traits::EnqueueWithOrigin;\n\ttype ReservedDmpWeight = ReservedDmpWeight;\n\ttype XcmpMessageHandler = XcmpQueue;\n\ttype ReservedXcmpWeight = ReservedXcmpWeight;\n // highlight-next-line\n\ttype CheckAssociatedRelayNumber = RelayNumberMonotonicallyIncreases;\n\ttype ConsensusHook = ConsensusHook;\n\ttype WeightInfo = weights::cumulus_pallet_parachain_system::WeightInfo;\n}\ntype ConsensusHook = cumulus_pallet_aura_ext::FixedVelocityConsensusHook<\n\tRuntime,\n\tRELAY_CHAIN_SLOT_DURATION_MILLIS,\n\tBLOCK_PROCESSING_VELOCITY,\n\tUNINCLUDED_SEGMENT_CAPACITY,\n>;\n"})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Configure ",(0,t.jsx)(n.code,{children:"pallet_aura"})," in ",(0,t.jsx)(n.code,{children:"runtime/src/lib.rs"})]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["Set ",(0,t.jsx)(n.code,{children:"AllowMultipleBlocksPerSlot"})," to ",(0,t.jsx)(n.code,{children:"false"})," (don't worry, we will set it to ",(0,t.jsx)(n.code,{children:"true"})," when we\nactivate async backing in phase 3)."]}),"\n",(0,t.jsxs)(n.li,{children:["Define ",(0,t.jsx)(n.code,{children:"pallet_aura::SlotDuration"})," using our constant ",(0,t.jsx)(n.code,{children:"SLOT_DURATION"})]}),"\n"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-rust",children:'impl pallet_aura::Config for Runtime {\n\ttype AuthorityId = AuraId;\n\ttype DisabledValidators = ();\n\ttype MaxAuthorities = ConstU32<100_000>;\n // highlight-start\n\ttype AllowMultipleBlocksPerSlot = ConstBool;\n\t#[cfg(feature = "experimental")]\n\ttype SlotDuration = ConstU64;\n // highlight-end\n}\n'})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Update ",(0,t.jsx)(n.code,{children:"aura_api::SlotDuration()"})," to match the constant ",(0,t.jsx)(n.code,{children:"SLOT_DURATION"})]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-rust",children:"impl_runtime_apis! {\n\timpl sp_consensus_aura::AuraApi for Runtime {\n\t\tfn slot_duration() -> sp_consensus_aura::SlotDuration {\n // highlight-next-line\n\t\t\tsp_consensus_aura::SlotDuration::from_millis(SLOT_DURATION)\n\t\t}\n\n\t\tfn authorities() -> Vec {\n\t\t\tAura::authorities().into_inner()\n\t\t}\n\t}\n...\n"})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Implement the ",(0,t.jsx)(n.code,{children:"AuraUnincludedSegmentApi"}),", which allows the collator client to query its runtime\nto determine whether it should author a block."]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["Add the dependency ",(0,t.jsx)(n.code,{children:"cumulus-primitives-aura"})," to the ",(0,t.jsx)(n.code,{children:"runtime/Cargo.toml"})," file for your runtime"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-rust",children:'cumulus-pallet-aura-ext = { path = "../../../../pallets/aura-ext", default-features = false }\ncumulus-pallet-parachain-system = { path = "../../../../pallets/parachain-system", default-features = false, features = ["parameterized-consensus-hook"] }\ncumulus-pallet-session-benchmarking = { path = "../../../../pallets/session-benchmarking", default-features = false }\ncumulus-pallet-xcm = { path = "../../../../pallets/xcm", default-features = false }\ncumulus-pallet-xcmp-queue = { path = "../../../../pallets/xcmp-queue", default-features = false, features = ["bridging"] }\n// highlight-next-line\ncumulus-primitives-aura = { path = "../../../../primitives/aura", default-features = false }\n'})}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["In the same file, add ",(0,t.jsx)(n.code,{children:'"cumulus-primitives-aura/std",'})," to the ",(0,t.jsx)(n.code,{children:"std"})," feature."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Inside the ",(0,t.jsx)(n.code,{children:"impl_runtime_apis!"})," block for your runtime, implement the ",(0,t.jsx)(n.code,{children:"AuraUnincludedSegmentApi"}),"\nas shown below."]}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-rust",children:"impl cumulus_primitives_aura::AuraUnincludedSegmentApi for Runtime {\n\tfn can_build_upon(\n\t\tincluded_hash: ::Hash,\n\t\tslot: cumulus_primitives_aura::Slot,\n\t) -> bool {\n\t\tConsensusHook::can_build_upon(included_hash, slot)\n\t}\n}\n"})}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Note:"})," With a capacity of 1 we have an effective velocity of \xbd even when velocity is configured\nto some larger value. This is because capacity will be filled after a single block is produced and\nwill only be freed up after that block is included on the relay chain, which takes 2 relay blocks to\naccomplish. Thus with capacity 1 and velocity 1 we get the customary 12 second parachain block time."]}),"\n",(0,t.jsxs)(n.ol,{start:"8",children:["\n",(0,t.jsxs)(n.li,{children:["If your ",(0,t.jsx)(n.code,{children:"runtime/src/lib.rs"})," provides a ",(0,t.jsx)(n.code,{children:"CheckInherents"})," type to ",(0,t.jsx)(n.code,{children:"register_validate_block"}),",\nremove it. ",(0,t.jsx)(n.code,{children:"FixedVelocityConsensusHook"})," makes it unnecessary. The following example shows how\n",(0,t.jsx)(n.code,{children:"register_validate_block"})," should look after removing ",(0,t.jsx)(n.code,{children:"CheckInherents"}),"."]}),"\n"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-rust",children:"cumulus_pallet_parachain_system::register_validate_block! {\n\tRuntime = Runtime,\n\tBlockExecutor = cumulus_pallet_aura_ext::BlockExecutor::,\n}\n"})}),"\n",(0,t.jsx)(n.h2,{id:"phase-2---update-parachain-nodes",children:"Phase 2 - Update Parachain Nodes"}),"\n",(0,t.jsx)(n.p,{children:"This phase consists of plugging in the new lookahead collator node."}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["Import ",(0,t.jsx)(n.code,{children:"cumulus_primitives_core::ValidationCode"})," to ",(0,t.jsx)(n.code,{children:"node/src/service.rs"})]}),"\n"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-rust",children:"use cumulus_primitives_core::{\n// highlight-next-line\n\trelay_chain::{CollatorPair, ValidationCode},\n\tParaId,\n};\n"})}),"\n",(0,t.jsxs)(n.ol,{start:"2",children:["\n",(0,t.jsxs)(n.li,{children:["In ",(0,t.jsx)(n.code,{children:"node/src/service.rs"}),", modify ",(0,t.jsx)(n.code,{children:"sc_service::spawn_tasks"})," to use a clone of ",(0,t.jsx)(n.code,{children:"Backend"})," rather\nthan the original"]}),"\n"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-rust",children:"sc_service::spawn_tasks(sc_service::SpawnTasksParams {\n\trpc_builder,\n\tclient: client.clone(),\n\ttransaction_pool: transaction_pool.clone(),\n\ttask_manager: &mut task_manager,\n\tconfig: parachain_config,\n\tkeystore: params.keystore_container.keystore(),\n // highlight-next-line\n\tbackend: backend.clone(),\n\tnetwork: network.clone(),\n\tsync_service: sync_service.clone(),\n\tsystem_rpc_tx,\n\ttx_handler_controller,\n\ttelemetry: telemetry.as_mut(),\n})?;\n"})}),"\n",(0,t.jsxs)(n.ol,{start:"3",children:["\n",(0,t.jsxs)(n.li,{children:["Add ",(0,t.jsx)(n.code,{children:"backend"})," as a parameter to ",(0,t.jsx)(n.code,{children:"start_consensus()"})," in ",(0,t.jsx)(n.code,{children:"node/src/service.rs"})]}),"\n"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-rust",children:"fn start_consensus(\n client: Arc,\n // highlight-next-line\n backend: Arc,\n block_import: ParachainBlockImport,\n prometheus_registry: Option<&Registry>,\n telemetry: Option,\n task_manager: &TaskManager,\n"})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-rust",children:"if validator {\n start_consensus(\n client.clone(),\n // highlight-next-line\n backend.clone(),\n block_import,\n prometheus_registry.as_ref(),\n"})}),"\n",(0,t.jsxs)(n.ol,{start:"4",children:["\n",(0,t.jsxs)(n.li,{children:["In ",(0,t.jsx)(n.code,{children:"node/src/service.rs"})," import the lookahead collator rather than the basic collator"]}),"\n"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-rust",children:"use cumulus_client_consensus_aura::collators::lookahead::{self as aura, Params as AuraParams};\n"})}),"\n",(0,t.jsxs)(n.ol,{start:"5",children:["\n",(0,t.jsxs)(n.li,{children:["In ",(0,t.jsx)(n.code,{children:"start_consensus()"})," replace the ",(0,t.jsx)(n.code,{children:"BasicAuraParams"})," struct with ",(0,t.jsx)(n.code,{children:"AuraParams"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["Change the struct type from ",(0,t.jsx)(n.code,{children:"BasicAuraParams"})," to ",(0,t.jsx)(n.code,{children:"AuraParams"})]}),"\n",(0,t.jsxs)(n.li,{children:["In the ",(0,t.jsx)(n.code,{children:"para_client"})," field, pass in a cloned para client rather than the original"]}),"\n",(0,t.jsxs)(n.li,{children:["Add a ",(0,t.jsx)(n.code,{children:"para_backend"})," parameter after ",(0,t.jsx)(n.code,{children:"para_client"}),", passing in our para backend"]}),"\n",(0,t.jsxs)(n.li,{children:["Provide a ",(0,t.jsx)(n.code,{children:"code_hash_provider"})," closure like that shown below"]}),"\n",(0,t.jsxs)(n.li,{children:["Increase ",(0,t.jsx)(n.code,{children:"authoring_duration"})," from 500 milliseconds to 1500"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-rust",children:"let params = AuraParams {\n create_inherent_data_providers: move |_, ()| async move { Ok(()) },\n block_import,\n para_client: client.clone(),\n para_backend: backend.clone(),\n relay_client: relay_chain_interface,\n code_hash_provider: move |block_hash| {\n client.code_at(block_hash).ok().map(|c| ValidationCode::from(c).hash())\n },\n sync_oracle,\n keystore,\n collator_key,\n para_id,\n overseer_handle,\n relay_chain_slot_duration,\n proposer,\n collator_service,\n // highlight-next-line\n authoring_duration: Duration::from_millis(1500),\n reinitialize: false,\n};\n"})}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Note:"})," Set ",(0,t.jsx)(n.code,{children:"authoring_duration"})," to whatever you want, taking your own hardware into account. But\nif the backer who should be slower than you due to reading from disk, times out at two seconds your\ncandidates will be rejected."]}),"\n",(0,t.jsxs)(n.ol,{start:"6",children:["\n",(0,t.jsxs)(n.li,{children:["In ",(0,t.jsx)(n.code,{children:"start_consensus()"})," replace ",(0,t.jsx)(n.code,{children:"basic_aura::run"})," with ",(0,t.jsx)(n.code,{children:"aura::run"})]}),"\n"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-rust",children:'let fut = aura::run::<\n Block,\n sp_consensus_aura::sr25519::AuthorityPair,\n _,\n _,\n _,\n _,\n _,\n _,\n _,\n _,\n _,\n >(params);\ntask_manager.spawn_essential_handle().spawn("aura", None, fut);\n'})}),"\n",(0,t.jsx)(n.h2,{id:"phase-3---activate-async-backing",children:"Phase 3 - Activate Async Backing"}),"\n",(0,t.jsx)(n.p,{children:"This phase consists of changes to your parachain\u2019s runtime that activate async backing feature."}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["Configure ",(0,t.jsx)(n.code,{children:"pallet_aura"}),", setting ",(0,t.jsx)(n.code,{children:"AllowMultipleBlocksPerSlot"})," to true in ",(0,t.jsx)(n.code,{children:"runtime/src/lib.rs"}),"."]}),"\n"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-rust",children:'impl pallet_aura::Config for Runtime {\n type AuthorityId = AuraId;\n type DisabledValidators = ();\n type MaxAuthorities = ConstU32<100_000>;\n // highlight-next-line\n type AllowMultipleBlocksPerSlot = ConstBool;\n #[cfg(feature = "experimental")]\n type SlotDuration = ConstU64;\n}\n'})}),"\n",(0,t.jsxs)(n.ol,{start:"2",children:["\n",(0,t.jsxs)(n.li,{children:["Increase the maximum ",(0,t.jsx)(n.code,{children:"UNINCLUDED_SEGMENT_CAPACITY"})," in ",(0,t.jsx)(n.code,{children:"runtime/src/lib.rs"}),"."]}),"\n"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-rust",children:"/// Maximum number of blocks simultaneously accepted by the Runtime, not yet included into the\n/// relay chain.\npub const UNINCLUDED_SEGMENT_CAPACITY: u32 = 3;\n/// How many parachain blocks are processed by the relay chain per parent. Limits the number of\n/// blocks authored per slot.\npub const BLOCK_PROCESSING_VELOCITY: u32 = 1;\n"})}),"\n",(0,t.jsxs)(n.ol,{start:"3",children:["\n",(0,t.jsxs)(n.li,{children:["Decrease ",(0,t.jsx)(n.code,{children:"MILLISECS_PER_BLOCK"})," to 6000."]}),"\n"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Note: For a parachain which measures time in terms of its own block number rather than by relay\nblock number it may be preferable to increase velocity. Changing block time may cause\ncomplications, requiring additional changes. See the section \u201cTiming by Block Number\u201d."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-rust",children:"/// This determines the average expected block time that we are targeting.\n/// Blocks will be produced at a minimum duration defined by `SLOT_DURATION`.\n/// `SLOT_DURATION` is picked up by `pallet_timestamp` which is in turn picked\n/// up by `pallet_aura` to implement `fn slot_duration()`.\n///\n/// Change this to adjust the block time.\npub const MILLISECS_PER_BLOCK: u64 = 6000;\n"})}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(n.ol,{start:"4",children:["\n",(0,t.jsxs)(n.li,{children:["Update ",(0,t.jsx)(n.code,{children:"MAXIMUM_BLOCK_WEIGHT"})," to reflect the increased time available for block production."]}),"\n"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-rust",children:"/// We allow for 2 seconds of compute with a 6 second average block.\npub const MAXIMUM_BLOCK_WEIGHT: Weight = Weight::from_parts(\n WEIGHT_REF_TIME_PER_SECOND.saturating_mul(2),\n cumulus_primitives_core::relay_chain::MAX_POV_SIZE as u64,\n);\n"})}),"\n",(0,t.jsxs)(n.ol,{start:"5",children:["\n",(0,t.jsxs)(n.li,{children:["Add a feature flagged alternative for ",(0,t.jsx)(n.code,{children:"MinimumPeriod"})," in ",(0,t.jsx)(n.code,{children:"pallet_timestamp"}),". The type should be\n",(0,t.jsx)(n.code,{children:"ConstU64<0>"})," with the feature flag experimental, and ",(0,t.jsx)(n.code,{children:"ConstU64<{SLOT_DURATION / 2}>"})," without."]}),"\n"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-rust",children:'impl pallet_timestamp::Config for Runtime {\n type Moment = u64;\n type OnTimestampSet = Aura;\n #[cfg(feature = "experimental")]\n type MinimumPeriod = ConstU64<0>;\n #[cfg(not(feature = "experimental"))]\n type MinimumPeriod = ConstU64<{ SLOT_DURATION / 2 }>;\n type WeightInfo = weights::pallet_timestamp::WeightInfo;\n}\n'})}),"\n",(0,t.jsx)(n.h2,{id:"timing-by-block-number",children:"Timing by Block Number"}),"\n",(0,t.jsx)(n.p,{children:"With asynchronous backing it will be possible for parachains to opt for a block time of 6 seconds\nrather than 12 seconds. But modifying block duration isn\u2019t so simple for a parachain which was\nmeasuring time in terms of its own block number. It could result in expected and actual time not\nmatching up, stalling the parachain."}),"\n",(0,t.jsxs)(n.p,{children:["One strategy to deal with this issue is to instead rely on relay chain block numbers for timing.\nRelay block number is kept track of by each parachain in ",(0,t.jsx)(n.code,{children:"pallet-parachain-system"})," with the storage\nvalue ",(0,t.jsx)(n.code,{children:"LastRelayChainBlockNumber"}),". This value can be obtained and used wherever timing based on\nblock number is needed."]})]})}function h(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(d,{...e})}):d(e)}},28453:(e,n,a)=>{a.d(n,{R:()=>r,x:()=>c});var i=a(96540);const t={},s=i.createContext(t);function r(e){const n=i.useContext(s);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:r(e.components),i.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/3d1bf5db.acb11ad2.js b/assets/js/3d1bf5db.acb11ad2.js deleted file mode 100644 index 0f705ce80a12..000000000000 --- a/assets/js/3d1bf5db.acb11ad2.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4190],{47347:(e,n,a)=>{a.r(n),a.d(n,{assets:()=>l,contentTitle:()=>r,default:()=>h,frontMatter:()=>s,metadata:()=>c,toc:()=>o});var i=a(74848),t=a(28453);const s={id:"maintain-guides-async-backing",title:"Upgrade Parachain for Asynchronous Backing Compatibility",sidebar_label:"Async Backing Upgrade",description:"Steps on how to upgrade a parachain to be compatible with the relay chain's async backing feature.",keywords:["async","backing","parachain","consensus"],slug:"../maintain-guides-async-backing"},r=void 0,c={id:"maintain/maintain-guides-async-backing",title:"Upgrade Parachain for Asynchronous Backing Compatibility",description:"Steps on how to upgrade a parachain to be compatible with the relay chain's async backing feature.",source:"@site/../docs/maintain/maintain-guides-async-backing.md",sourceDirName:"maintain",slug:"/maintain-guides-async-backing",permalink:"/docs/maintain-guides-async-backing",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/maintain/maintain-guides-async-backing.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1727991122e3,frontMatter:{id:"maintain-guides-async-backing",title:"Upgrade Parachain for Asynchronous Backing Compatibility",sidebar_label:"Async Backing Upgrade",description:"Steps on how to upgrade a parachain to be compatible with the relay chain's async backing feature.",keywords:["async","backing","parachain","consensus"],slug:"../maintain-guides-async-backing"},sidebar:"docs",previous:{title:"Collator Guides",permalink:"/docs/maintain-collator-index"},next:{title:"Validator Guides",permalink:"/docs/maintain-validator-index"}},l={},o=[{value:"Async Backing Prerequisites",id:"async-backing-prerequisites",level:2},{value:"Async Backing Terminology and Parameters",id:"async-backing-terminology-and-parameters",level:2},{value:"Prerequisite",id:"prerequisite",level:2},{value:"Phase 1 - Update Parachain Runtime",id:"phase-1---update-parachain-runtime",level:2},{value:"Phase 2 - Update Parachain Nodes",id:"phase-2---update-parachain-nodes",level:2},{value:"Phase 3 - Activate Async Backing",id:"phase-3---activate-async-backing",level:2},{value:"Timing by Block Number",id:"timing-by-block-number",level:2}];function d(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",li:"li",mdxAdmonitionTitle:"mdxAdmonitionTitle",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,t.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.admonition,{title:"Who is this guide for?",type:"info",children:(0,i.jsxs)(n.p,{children:["This guide is relevant for cumulus based parachain projects started in 2023 or before. Later\nprojects should already be async backing compatible. If starting a new parachain project, please use\nan async backing compatible template such as\n",(0,i.jsx)(n.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/templates/parachain",children:(0,i.jsx)(n.code,{children:"cumulus/parachain-template"})}),"."]})}),"\n",(0,i.jsx)(n.p,{children:"The rollout process for Async Backing has three phases. Phases 1 and 2 below put new infrastructure\nin place. Then we can simply turn on async backing in phase 3. But first, some pre-reqs and context\nto set the stage."}),"\n",(0,i.jsx)(n.h2,{id:"async-backing-prerequisites",children:"Async Backing Prerequisites"}),"\n",(0,i.jsx)(n.admonition,{type:"info",children:(0,i.jsxs)(n.p,{children:["For more contextual information about asynchronous backing, see\n",(0,i.jsx)(n.a,{href:"/docs/learn-async-backing",children:"this page"}),"."]})}),"\n",(0,i.jsxs)(n.p,{children:["Pull the latest version of Cumulus for use with your parachain. It contains necessary changes for\nasync backing compatibility. Latest on master branch of\n",(0,i.jsx)(n.a,{href:"https://github.com/paritytech/polkadot-sdk",children:"Polkadot-SDK"})," is currently sufficient. Any 2024 release\nwill work as well."]}),"\n",(0,i.jsx)(n.h2,{id:"async-backing-terminology-and-parameters",children:"Async Backing Terminology and Parameters"}),"\n",(0,i.jsx)(n.p,{children:"Time for a bit of context before we get started. The following concepts will aid in demystifying the\ncollator side of Async Backing and establish a basic understanding of the changes being made:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Unincluded segment"})," - From the perspective of a parachain block under construction, the\nunincluded segment describes a chain of recent block ancestors which have yet to be included on\nthe relay chain. The ability to build new blocks on top of the unincluded segment rather than on\ntop of blocks freshly included in the relay chain is the core of asynchronous backing."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Capacity"})," - The maximum size of the unincluded segment. The longer this is, the farther ahead a\nparachain can work, producing new candidates before the ancestors of those candidates have been\nseen as included on-chain. Practically, a capacity of 2-3 is sufficient to realize the full\nbenefits of asynchronous backing, at least until the release of elastic scaling."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Velocity"})," - The base rate at which a parachain should produce blocks. A velocity of 1 indicates\nthat 1 parachain block should be produced per relay chain block. In order to fill the unincluded\nsegment with candidates, collators may build up to ",(0,i.jsx)(n.code,{children:"Velocity + 1"})," candidates per aura slot while\nthere is remaining capacity. When elastic scaling has been released velocities greater than 1 will\nbe supported."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"AllowMultipleBlocksPerSlot"})," - If this is ",(0,i.jsx)(n.code,{children:"true"}),", Aura will allow slots to stay the same across\nsequential parablocks. Otherwise the slot number must increase with each block. To fill the\nunincluded segment as described above we need this to be ",(0,i.jsx)(n.code,{children:"true"}),"."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"FixedVelocityConsensusHook"})," - This is a variety of ",(0,i.jsx)(n.code,{children:"ConsensusHook"})," intended to be passed to\n",(0,i.jsx)(n.code,{children:"parachain-system"})," as part of its ",(0,i.jsx)(n.code,{children:"Config"}),". It is triggered on initialization of a new runtime. An\ninstance of ",(0,i.jsx)(n.code,{children:"FixedVelocityConsensusHook"})," is defined with both a fixed capacity and velocity. It\naborts the runtime early if either capacity or velocity is exceeded, as the collator shouldn\u2019t be\ncreating additional blocks in that case."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"AsyncBackingParams.max_candidate_depth"})," - This parameter determines the maximum unincluded\nsegment depth the relay chain will support. Candidates sent to validators which exceed\n",(0,i.jsx)(n.code,{children:"max_candidate_depth"})," will be ignored. ",(0,i.jsx)(n.code,{children:"Capacity"}),", as mentioned above, should not exceed\n",(0,i.jsx)(n.code,{children:"max_candidate_depth"}),"."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"AsyncBackingParams.allowed_ancestry_len"})," - Each parachain block candidate has a ",(0,i.jsx)(n.code,{children:"relay_parent"}),"\nfrom which its execution and validation context is derived. Before async backing the\n",(0,i.jsx)(n.code,{children:"relay_parent"})," for a candidate not yet backed was required to be the fresh head of a fork. With\nasync backing we can relax this requirement. Instead we set a conservative maximum age in blocks\nfor the ",(0,i.jsx)(n.code,{children:"relay_parent"}),"s of candidates in the unincluded segment. This age, ",(0,i.jsx)(n.code,{children:"allowed_ancestry_len"}),"\nlives on the relay chain and is queried by parachains when deciding which block to build on top\nof."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Lookahead Collator"})," - A collator for Aura that looks ahead of the most recently included\nparachain block when determining what to build upon. This collator also builds additional blocks\nwhen the maximum backlog is not saturated. The size of the backlog is determined by invoking the\nAuraUnincludedSegmentApi. If that runtime API is not supported, this assumes a maximum backlog\nsize of 1."]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"prerequisite",children:"Prerequisite"}),"\n",(0,i.jsx)(n.p,{children:"The relay chain needs to have async backing enabled so double-check that the relay chain\nconfiguration contains the following three parameters (especially when testing locally e.g. with\nzombienet):"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'"async_backing_params": {\n "max_candidate_depth": 3,\n "allowed_ancestry_len": 2\n},\n"scheduling_lookahead": 2\n'})}),"\n",(0,i.jsxs)(n.admonition,{type:"warning",children:[(0,i.jsxs)(n.mdxAdmonitionTitle,{children:["warning ",(0,i.jsx)(n.code,{children:"scheduling_lookahead"})," must be set to 2, otherwise parachain block times will"]}),(0,i.jsx)(n.p,{children:"degrade to worse than with sync backing!"})]}),"\n",(0,i.jsx)(n.h2,{id:"phase-1---update-parachain-runtime",children:"Phase 1 - Update Parachain Runtime"}),"\n",(0,i.jsx)(n.p,{children:"This phase involves configuring your parachain\u2019s runtime to make use of async backing system."}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:["Establish constants for ",(0,i.jsx)(n.code,{children:"capacity"})," and ",(0,i.jsx)(n.code,{children:"velocity"})," and set both of them to 1 in\n",(0,i.jsx)(n.code,{children:"/runtime/src/lib.rs"}),"."]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:["Establish a constant relay chain slot duration measured in milliseconds equal to ",(0,i.jsx)(n.code,{children:"6000"})," in\n",(0,i.jsx)(n.code,{children:"/runtime/src/lib.rs"}),"."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-rust",children:"/// Maximum number of blocks simultaneously accepted by the Runtime, not yet included into the\n/// relay chain.\npub const UNINCLUDED_SEGMENT_CAPACITY: u32 = 1;\n/// How many parachain blocks are processed by the relay chain per parent. Limits the number of\n/// blocks authored per slot.\npub const BLOCK_PROCESSING_VELOCITY: u32 = 1;\n/// Relay chain slot duration, in milliseconds.\npub const RELAY_CHAIN_SLOT_DURATION_MILLIS: u32 = 6000;\n"})}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:["Establish constants ",(0,i.jsx)(n.code,{children:"MILLISECS_PER_BLOCK"})," and ",(0,i.jsx)(n.code,{children:"SLOT_DURATION"})," if not already present in\n",(0,i.jsx)(n.code,{children:"/runtime/src/lib.rs"}),"."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-rust",children:"\n/// BLOCKSkkhasd will be produced at a minimum duration defined by `SLOT_DURATION`.\n/// `SLOT_DURATION` is picked up by `pallet_timestamp` which is in turn picked\n/// up by `pallet_aura` to implement `fn slot_duration()`.\n///\n/// Change this to adjust the block time.\npub const MILLISECS_PER_BLOCK: u64 = 12000;\npub const SLOT_DURATION: u64 = MILLISECS_PER_BLOCK;\n"})}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:["Configure ",(0,i.jsx)(n.code,{children:"cumulus_pallet_parachain_system"})," in ",(0,i.jsx)(n.code,{children:"runtime/src/lib.rs"})]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["Define a ",(0,i.jsx)(n.code,{children:"FixedVelocityConsensusHook"})," using our capacity, velocity, and relay slot duration\nconstants. Use this to set the parachain system ",(0,i.jsx)(n.code,{children:"ConsensusHook"})," property."]}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-rust",children:"impl cumulus_pallet_parachain_system::Config for Runtime {\n\ttype RuntimeEvent = RuntimeEvent;\n\ttype OnSystemEvent = ();\n\ttype SelfParaId = parachain_info::Pallet;\n\ttype OutboundXcmpMessageSource = XcmpQueue;\n\ttype DmpQueue = frame_support::traits::EnqueueWithOrigin;\n\ttype ReservedDmpWeight = ReservedDmpWeight;\n\ttype XcmpMessageHandler = XcmpQueue;\n\ttype ReservedXcmpWeight = ReservedXcmpWeight;\n\ttype CheckAssociatedRelayNumber = RelayNumberMonotonicallyIncreases;\n // highlight-next-line\n\ttype ConsensusHook = ConsensusHook;\n\ttype WeightInfo = weights::cumulus_pallet_parachain_system::WeightInfo;\n}\n// highlight-start\ntype ConsensusHook = cumulus_pallet_aura_ext::FixedVelocityConsensusHook<\n\tRuntime,\n\tRELAY_CHAIN_SLOT_DURATION_MILLIS,\n\tBLOCK_PROCESSING_VELOCITY,\n\tUNINCLUDED_SEGMENT_CAPACITY,\n>;\n// highlight-end\n"})}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["Set the parachain system property ",(0,i.jsx)(n.code,{children:"CheckAssociatedRelayNumber"})," to\n",(0,i.jsx)(n.code,{children:"RelayNumberMonotonicallyIncreases"})]}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-rust",children:"impl cumulus_pallet_parachain_system::Config for Runtime {\n\ttype RuntimeEvent = RuntimeEvent;\n\ttype OnSystemEvent = ();\n\ttype SelfParaId = parachain_info::Pallet;\n\ttype OutboundXcmpMessageSource = XcmpQueue;\n\ttype DmpQueue = frame_support::traits::EnqueueWithOrigin;\n\ttype ReservedDmpWeight = ReservedDmpWeight;\n\ttype XcmpMessageHandler = XcmpQueue;\n\ttype ReservedXcmpWeight = ReservedXcmpWeight;\n // highlight-next-line\n\ttype CheckAssociatedRelayNumber = RelayNumberMonotonicallyIncreases;\n\ttype ConsensusHook = ConsensusHook;\n\ttype WeightInfo = weights::cumulus_pallet_parachain_system::WeightInfo;\n}\ntype ConsensusHook = cumulus_pallet_aura_ext::FixedVelocityConsensusHook<\n\tRuntime,\n\tRELAY_CHAIN_SLOT_DURATION_MILLIS,\n\tBLOCK_PROCESSING_VELOCITY,\n\tUNINCLUDED_SEGMENT_CAPACITY,\n>;\n"})}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:["Configure ",(0,i.jsx)(n.code,{children:"pallet_aura"})," in ",(0,i.jsx)(n.code,{children:"runtime/src/lib.rs"})]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["Set ",(0,i.jsx)(n.code,{children:"AllowMultipleBlocksPerSlot"})," to ",(0,i.jsx)(n.code,{children:"false"})," (don't worry, we will set it to ",(0,i.jsx)(n.code,{children:"true"})," when we\nactivate async backing in phase 3)."]}),"\n",(0,i.jsxs)(n.li,{children:["Define ",(0,i.jsx)(n.code,{children:"pallet_aura::SlotDuration"})," using our constant ",(0,i.jsx)(n.code,{children:"SLOT_DURATION"})]}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-rust",children:'impl pallet_aura::Config for Runtime {\n\ttype AuthorityId = AuraId;\n\ttype DisabledValidators = ();\n\ttype MaxAuthorities = ConstU32<100_000>;\n // highlight-start\n\ttype AllowMultipleBlocksPerSlot = ConstBool;\n\t#[cfg(feature = "experimental")]\n\ttype SlotDuration = ConstU64;\n // highlight-end\n}\n'})}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:["Update ",(0,i.jsx)(n.code,{children:"aura_api::SlotDuration()"})," to match the constant ",(0,i.jsx)(n.code,{children:"SLOT_DURATION"})]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-rust",children:"impl_runtime_apis! {\n\timpl sp_consensus_aura::AuraApi for Runtime {\n\t\tfn slot_duration() -> sp_consensus_aura::SlotDuration {\n // highlight-next-line\n\t\t\tsp_consensus_aura::SlotDuration::from_millis(SLOT_DURATION)\n\t\t}\n\n\t\tfn authorities() -> Vec {\n\t\t\tAura::authorities().into_inner()\n\t\t}\n\t}\n...\n"})}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:["Implement the ",(0,i.jsx)(n.code,{children:"AuraUnincludedSegmentApi"}),", which allows the collator client to query its runtime\nto determine whether it should author a block."]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["Add the dependency ",(0,i.jsx)(n.code,{children:"cumulus-primitives-aura"})," to the ",(0,i.jsx)(n.code,{children:"runtime/Cargo.toml"})," file for your runtime"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-rust",children:'cumulus-pallet-aura-ext = { path = "../../../../pallets/aura-ext", default-features = false }\ncumulus-pallet-parachain-system = { path = "../../../../pallets/parachain-system", default-features = false, features = ["parameterized-consensus-hook"] }\ncumulus-pallet-session-benchmarking = { path = "../../../../pallets/session-benchmarking", default-features = false }\ncumulus-pallet-xcm = { path = "../../../../pallets/xcm", default-features = false }\ncumulus-pallet-xcmp-queue = { path = "../../../../pallets/xcmp-queue", default-features = false, features = ["bridging"] }\n// highlight-next-line\ncumulus-primitives-aura = { path = "../../../../primitives/aura", default-features = false }\n'})}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:["In the same file, add ",(0,i.jsx)(n.code,{children:'"cumulus-primitives-aura/std",'})," to the ",(0,i.jsx)(n.code,{children:"std"})," feature."]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:["Inside the ",(0,i.jsx)(n.code,{children:"impl_runtime_apis!"})," block for your runtime, implement the ",(0,i.jsx)(n.code,{children:"AuraUnincludedSegmentApi"}),"\nas shown below."]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-rust",children:"impl cumulus_primitives_aura::AuraUnincludedSegmentApi for Runtime {\n\tfn can_build_upon(\n\t\tincluded_hash: ::Hash,\n\t\tslot: cumulus_primitives_aura::Slot,\n\t) -> bool {\n\t\tConsensusHook::can_build_upon(included_hash, slot)\n\t}\n}\n"})}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Note:"})," With a capacity of 1 we have an effective velocity of \xbd even when velocity is configured\nto some larger value. This is because capacity will be filled after a single block is produced and\nwill only be freed up after that block is included on the relay chain, which takes 2 relay blocks to\naccomplish. Thus with capacity 1 and velocity 1 we get the customary 12 second parachain block time."]}),"\n",(0,i.jsxs)(n.ol,{start:"8",children:["\n",(0,i.jsxs)(n.li,{children:["If your ",(0,i.jsx)(n.code,{children:"runtime/src/lib.rs"})," provides a ",(0,i.jsx)(n.code,{children:"CheckInherents"})," type to ",(0,i.jsx)(n.code,{children:"register_validate_block"}),",\nremove it. ",(0,i.jsx)(n.code,{children:"FixedVelocityConsensusHook"})," makes it unnecessary. The following example shows how\n",(0,i.jsx)(n.code,{children:"register_validate_block"})," should look after removing ",(0,i.jsx)(n.code,{children:"CheckInherents"}),"."]}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-rust",children:"cumulus_pallet_parachain_system::register_validate_block! {\n\tRuntime = Runtime,\n\tBlockExecutor = cumulus_pallet_aura_ext::BlockExecutor::,\n}\n"})}),"\n",(0,i.jsx)(n.h2,{id:"phase-2---update-parachain-nodes",children:"Phase 2 - Update Parachain Nodes"}),"\n",(0,i.jsx)(n.p,{children:"This phase consists of plugging in the new lookahead collator node."}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsxs)(n.li,{children:["Import ",(0,i.jsx)(n.code,{children:"cumulus_primitives_core::ValidationCode"})," to ",(0,i.jsx)(n.code,{children:"node/src/service.rs"})]}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-rust",children:"use cumulus_primitives_core::{\n// highlight-next-line\n\trelay_chain::{CollatorPair, ValidationCode},\n\tParaId,\n};\n"})}),"\n",(0,i.jsxs)(n.ol,{start:"2",children:["\n",(0,i.jsxs)(n.li,{children:["In ",(0,i.jsx)(n.code,{children:"node/src/service.rs"}),", modify ",(0,i.jsx)(n.code,{children:"sc_service::spawn_tasks"})," to use a clone of ",(0,i.jsx)(n.code,{children:"Backend"})," rather\nthan the original"]}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-rust",children:"sc_service::spawn_tasks(sc_service::SpawnTasksParams {\n\trpc_builder,\n\tclient: client.clone(),\n\ttransaction_pool: transaction_pool.clone(),\n\ttask_manager: &mut task_manager,\n\tconfig: parachain_config,\n\tkeystore: params.keystore_container.keystore(),\n // highlight-next-line\n\tbackend: backend.clone(),\n\tnetwork: network.clone(),\n\tsync_service: sync_service.clone(),\n\tsystem_rpc_tx,\n\ttx_handler_controller,\n\ttelemetry: telemetry.as_mut(),\n})?;\n"})}),"\n",(0,i.jsxs)(n.ol,{start:"3",children:["\n",(0,i.jsxs)(n.li,{children:["Add ",(0,i.jsx)(n.code,{children:"backend"})," as a parameter to ",(0,i.jsx)(n.code,{children:"start_consensus()"})," in ",(0,i.jsx)(n.code,{children:"node/src/service.rs"})]}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-rust",children:"fn start_consensus(\n client: Arc,\n // highlight-next-line\n backend: Arc,\n block_import: ParachainBlockImport,\n prometheus_registry: Option<&Registry>,\n telemetry: Option,\n task_manager: &TaskManager,\n"})}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-rust",children:"if validator {\n start_consensus(\n client.clone(),\n // highlight-next-line\n backend.clone(),\n block_import,\n prometheus_registry.as_ref(),\n"})}),"\n",(0,i.jsxs)(n.ol,{start:"4",children:["\n",(0,i.jsxs)(n.li,{children:["In ",(0,i.jsx)(n.code,{children:"node/src/service.rs"})," import the lookahead collator rather than the basic collator"]}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-rust",children:"use cumulus_client_consensus_aura::collators::lookahead::{self as aura, Params as AuraParams};\n"})}),"\n",(0,i.jsxs)(n.ol,{start:"5",children:["\n",(0,i.jsxs)(n.li,{children:["In ",(0,i.jsx)(n.code,{children:"start_consensus()"})," replace the ",(0,i.jsx)(n.code,{children:"BasicAuraParams"})," struct with ",(0,i.jsx)(n.code,{children:"AuraParams"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["Change the struct type from ",(0,i.jsx)(n.code,{children:"BasicAuraParams"})," to ",(0,i.jsx)(n.code,{children:"AuraParams"})]}),"\n",(0,i.jsxs)(n.li,{children:["In the ",(0,i.jsx)(n.code,{children:"para_client"})," field, pass in a cloned para client rather than the original"]}),"\n",(0,i.jsxs)(n.li,{children:["Add a ",(0,i.jsx)(n.code,{children:"para_backend"})," parameter after ",(0,i.jsx)(n.code,{children:"para_client"}),", passing in our para backend"]}),"\n",(0,i.jsxs)(n.li,{children:["Provide a ",(0,i.jsx)(n.code,{children:"code_hash_provider"})," closure like that shown below"]}),"\n",(0,i.jsxs)(n.li,{children:["Increase ",(0,i.jsx)(n.code,{children:"authoring_duration"})," from 500 milliseconds to 1500"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-rust",children:"let params = AuraParams {\n create_inherent_data_providers: move |_, ()| async move { Ok(()) },\n block_import,\n para_client: client.clone(),\n para_backend: backend.clone(),\n relay_client: relay_chain_interface,\n code_hash_provider: move |block_hash| {\n client.code_at(block_hash).ok().map(|c| ValidationCode::from(c).hash())\n },\n sync_oracle,\n keystore,\n collator_key,\n para_id,\n overseer_handle,\n relay_chain_slot_duration,\n proposer,\n collator_service,\n // highlight-next-line\n authoring_duration: Duration::from_millis(1500),\n reinitialize: false,\n};\n"})}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Note:"})," Set ",(0,i.jsx)(n.code,{children:"authoring_duration"})," to whatever you want, taking your own hardware into account. But\nif the backer who should be slower than you due to reading from disk, times out at two seconds your\ncandidates will be rejected."]}),"\n",(0,i.jsxs)(n.ol,{start:"6",children:["\n",(0,i.jsxs)(n.li,{children:["In ",(0,i.jsx)(n.code,{children:"start_consensus()"})," replace ",(0,i.jsx)(n.code,{children:"basic_aura::run"})," with ",(0,i.jsx)(n.code,{children:"aura::run"})]}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-rust",children:'let fut = aura::run::<\n Block,\n sp_consensus_aura::sr25519::AuthorityPair,\n _,\n _,\n _,\n _,\n _,\n _,\n _,\n _,\n _,\n >(params);\ntask_manager.spawn_essential_handle().spawn("aura", None, fut);\n'})}),"\n",(0,i.jsx)(n.h2,{id:"phase-3---activate-async-backing",children:"Phase 3 - Activate Async Backing"}),"\n",(0,i.jsx)(n.p,{children:"This phase consists of changes to your parachain\u2019s runtime that activate async backing feature."}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsxs)(n.li,{children:["Configure ",(0,i.jsx)(n.code,{children:"pallet_aura"}),", setting ",(0,i.jsx)(n.code,{children:"AllowMultipleBlocksPerSlot"})," to true in ",(0,i.jsx)(n.code,{children:"runtime/src/lib.rs"}),"."]}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-rust",children:'impl pallet_aura::Config for Runtime {\n type AuthorityId = AuraId;\n type DisabledValidators = ();\n type MaxAuthorities = ConstU32<100_000>;\n // highlight-next-line\n type AllowMultipleBlocksPerSlot = ConstBool;\n #[cfg(feature = "experimental")]\n type SlotDuration = ConstU64;\n}\n'})}),"\n",(0,i.jsxs)(n.ol,{start:"2",children:["\n",(0,i.jsxs)(n.li,{children:["Increase the maximum ",(0,i.jsx)(n.code,{children:"UNINCLUDED_SEGMENT_CAPACITY"})," in ",(0,i.jsx)(n.code,{children:"runtime/src/lib.rs"}),"."]}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-rust",children:"/// Maximum number of blocks simultaneously accepted by the Runtime, not yet included into the\n/// relay chain.\npub const UNINCLUDED_SEGMENT_CAPACITY: u32 = 3;\n/// How many parachain blocks are processed by the relay chain per parent. Limits the number of\n/// blocks authored per slot.\npub const BLOCK_PROCESSING_VELOCITY: u32 = 1;\n"})}),"\n",(0,i.jsxs)(n.ol,{start:"3",children:["\n",(0,i.jsxs)(n.li,{children:["Decrease ",(0,i.jsx)(n.code,{children:"MILLISECS_PER_BLOCK"})," to 6000."]}),"\n"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:"Note: For a parachain which measures time in terms of its own block number rather than by relay\nblock number it may be preferable to increase velocity. Changing block time may cause\ncomplications, requiring additional changes. See the section \u201cTiming by Block Number\u201d."}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-rust",children:"/// This determines the average expected block time that we are targeting.\n/// Blocks will be produced at a minimum duration defined by `SLOT_DURATION`.\n/// `SLOT_DURATION` is picked up by `pallet_timestamp` which is in turn picked\n/// up by `pallet_aura` to implement `fn slot_duration()`.\n///\n/// Change this to adjust the block time.\npub const MILLISECS_PER_BLOCK: u64 = 6000;\n"})}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.ol,{start:"4",children:["\n",(0,i.jsxs)(n.li,{children:["Update ",(0,i.jsx)(n.code,{children:"MAXIMUM_BLOCK_WEIGHT"})," to reflect the increased time available for block production."]}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-rust",children:"/// We allow for 2 seconds of compute with a 6 second average block.\npub const MAXIMUM_BLOCK_WEIGHT: Weight = Weight::from_parts(\n WEIGHT_REF_TIME_PER_SECOND.saturating_mul(2),\n cumulus_primitives_core::relay_chain::MAX_POV_SIZE as u64,\n);\n"})}),"\n",(0,i.jsxs)(n.ol,{start:"5",children:["\n",(0,i.jsxs)(n.li,{children:["Add a feature flagged alternative for ",(0,i.jsx)(n.code,{children:"MinimumPeriod"})," in ",(0,i.jsx)(n.code,{children:"pallet_timestamp"}),". The type should be\n",(0,i.jsx)(n.code,{children:"ConstU64<0>"})," with the feature flag experimental, and ",(0,i.jsx)(n.code,{children:"ConstU64<{SLOT_DURATION / 2}>"})," without."]}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-rust",children:'impl pallet_timestamp::Config for Runtime {\n type Moment = u64;\n type OnTimestampSet = Aura;\n #[cfg(feature = "experimental")]\n type MinimumPeriod = ConstU64<0>;\n #[cfg(not(feature = "experimental"))]\n type MinimumPeriod = ConstU64<{ SLOT_DURATION / 2 }>;\n type WeightInfo = weights::pallet_timestamp::WeightInfo;\n}\n'})}),"\n",(0,i.jsx)(n.h2,{id:"timing-by-block-number",children:"Timing by Block Number"}),"\n",(0,i.jsx)(n.p,{children:"With asynchronous backing it will be possible for parachains to opt for a block time of 6 seconds\nrather than 12 seconds. But modifying block duration isn\u2019t so simple for a parachain which was\nmeasuring time in terms of its own block number. It could result in expected and actual time not\nmatching up, stalling the parachain."}),"\n",(0,i.jsxs)(n.p,{children:["One strategy to deal with this issue is to instead rely on relay chain block numbers for timing.\nRelay block number is kept track of by each parachain in ",(0,i.jsx)(n.code,{children:"pallet-parachain-system"})," with the storage\nvalue ",(0,i.jsx)(n.code,{children:"LastRelayChainBlockNumber"}),". This value can be obtained and used wherever timing based on\nblock number is needed."]})]})}function h(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}},28453:(e,n,a)=>{a.d(n,{R:()=>r,x:()=>c});var i=a(96540);const t={},s=i.createContext(t);function r(e){const n=i.useContext(s);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:r(e.components),i.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/3e56470e.7828f2b6.js b/assets/js/3e56470e.7828f2b6.js new file mode 100644 index 000000000000..cece845df69a --- /dev/null +++ b/assets/js/3e56470e.7828f2b6.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1608],{97325:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>i,default:()=>h,frontMatter:()=>a,metadata:()=>s,toc:()=>l});const s=JSON.parse('{"id":"maintain/maintain-wss","title":"Secure the WebSocket","description":"Steps on setting up a secure socket for remote connections.","source":"@site/../docs/maintain/maintain-wss.md","sourceDirName":"maintain","slug":"/maintain-wss","permalink":"/docs/maintain-wss","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/maintain/maintain-wss.md","tags":[],"version":"current","lastUpdatedBy":"Stakeworld","lastUpdatedAt":1683623723000,"frontMatter":{"id":"maintain-wss","title":"Secure the WebSocket","sidebar_label":"Secure the WebSocket","description":"Steps on setting up a secure socket for remote connections.","keywords":["web socket","remote","connection","secure websocket"],"slug":"../maintain-wss"},"sidebar":"docs","previous":{"title":"Set up a RPC node","permalink":"/docs/maintain-rpc"},"next":{"title":"Networks","permalink":"/docs/maintain-networks"}}');var o=t(74848),r=t(28453);const a={id:"maintain-wss",title:"Secure the WebSocket",sidebar_label:"Secure the WebSocket",description:"Steps on setting up a secure socket for remote connections.",keywords:["web socket","remote","connection","secure websocket"],slug:"../maintain-wss"},i=void 0,c={},l=[{value:"Secure a WS Port",id:"secure-a-ws-port",level:2},{value:"Obtaining an SSL Certificate",id:"obtaining-an-ssl-certificate",level:3},{value:"Installing a Proxy Server",id:"installing-a-proxy-server",level:2},{value:"Nginx",id:"nginx",level:3},{value:"Apache2",id:"apache2",level:3},{value:"Connecting to the Node",id:"connecting-to-the-node",level:2}];function d(e){const n={a:"a",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",p:"p",pre:"pre",...(0,r.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.h2,{id:"secure-a-ws-port",children:"Secure a WS Port"}),"\n",(0,o.jsxs)(n.p,{children:["A non-secure ws port can be converted to a secure wss port by placing it behind an SSL-enabled\nproxy. This can be used to secure a ",(0,o.jsx)(n.a,{href:"/docs/maintain-bootnode",children:"bootnode"})," or secure a\n",(0,o.jsx)(n.a,{href:"/docs/maintain-rpc",children:"RPC server"}),". The SSL-enabled apache2/nginx/other proxy server redirects\nrequests to the internal ws and converts it to a secure (wss) connection. For this, you will need an\nSSL certificate for which you can use a service like letsencrypt or self-signing."]}),"\n",(0,o.jsx)(n.h3,{id:"obtaining-an-ssl-certificate",children:"Obtaining an SSL Certificate"}),"\n",(0,o.jsxs)(n.p,{children:["One easy way to get a free SSL certificate can be achieved by following the LetsEncrypt instructions\n(",(0,o.jsx)(n.a,{href:"https://certbot.eff.org/instructions?ws=nginx&os=ubuntufocal",children:"nginx"}),"/",(0,o.jsx)(n.a,{href:"https://certbot.eff.org/instructions?ws=apache&os=ubuntufocal",children:"apache"}),").\nThis will auto-generate an SSL certificate and include it in your configuration."]}),"\n",(0,o.jsx)(n.p,{children:"Alternatively, you can generate a self-signed certificate and rely on the raw IP address of your\nnode when connecting to it. This is not preferable since you will have to whitelist the certificate\nto access it from a browser."}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:"sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/selfsigned.key -out /etc/ssl/certs/selfsigned.crt\nsudo openssl dhparam -out /etc/ssl/certs/dhparam.pem 2048\n"})}),"\n",(0,o.jsx)(n.h2,{id:"installing-a-proxy-server",children:"Installing a Proxy Server"}),"\n",(0,o.jsxs)(n.p,{children:["There are a lot of different implementations of a WebSocket proxy, some of the more widely used are\n",(0,o.jsx)(n.a,{href:"https://www.nginx.com/",children:"nginx"})," and ",(0,o.jsx)(n.a,{href:"https://httpd.apache.org/",children:"apache2"}),", for which configuration\nexamples provided below."]}),"\n",(0,o.jsx)(n.h3,{id:"nginx",children:"Nginx"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:"apt install nginx\n"})}),"\n",(0,o.jsx)(n.p,{children:"In an SSL-enabled virtual host add:"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-conf",children:'server {\n (...)\n location / {\n proxy_buffers 16 4k;\n proxy_buffer_size 2k;\n proxy_pass http://localhost:9944;\n proxy_http_version 1.1;\n proxy_set_header Upgrade $http_upgrade;\n proxy_set_header Connection "Upgrade";\n proxy_set_header Host $host;\n }\n}\n'})}),"\n",(0,o.jsx)(n.p,{children:"Optionally some form of rate limiting can be introduced:"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-conf",children:'http {\n limit_req_zone "$http_x_forwarded_for" zone=zone:10m rate=2r/s;\n (...)\n}\n\nlocation / {\n limit_req zone=zone burst=5;\n (...)\n}\n'})}),"\n",(0,o.jsx)(n.h3,{id:"apache2",children:"Apache2"}),"\n",(0,o.jsxs)(n.p,{children:["You can run it in different modes such as prefork, worker, or event. In this example, we use\n",(0,o.jsx)(n.a,{href:"https://httpd.apache.org/docs/2.4/mod/event.html",children:"event"})," which works well on higher load\nenvironments but other modes are also useful given the requirements."]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:"apt install apache2\na2dismod mpm_prefork\na2enmod mpm_event proxy proxy_html proxy_http proxy_wstunnel rewrite ssl\n"})}),"\n",(0,o.jsxs)(n.p,{children:["The ",(0,o.jsx)(n.a,{href:"https://httpd.apache.org/docs/2.4/mod/mod_proxy_wstunnel.html",children:"mod_proxy_wstunnel"})," provides\n",(0,o.jsx)(n.em,{children:"support for the tunneling of web socket connections to a backend websockets server. The connection\nis automatically upgraded to a WebSocket connection"}),". In an SSL-enabled virtualhost add:"]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-apacheconf",children:"(...)\nSSLProxyEngine on\nProxyRequests off\n\nProxyPass / ws://localhost:9944\nProxyPassReverse / ws://localhost:9944\n"})}),"\n",(0,o.jsx)(n.p,{children:"Older versions of mod_proxy_wstunnel do not upgrade the connection automatically and will need the\nfollowing config added:"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-apacheconf",children:"RewriteEngine on\nRewriteCond %{HTTP:Upgrade} websocket [NC]\nRewriteRule /(.*) ws://localhost:9944/$1 [P,L]\nRewriteRule /(.*) http://localhost:9944/$1 [P,L]\n"})}),"\n",(0,o.jsx)(n.p,{children:"Optionally some form of rate limiting can be introduced:"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:"apt install libapache2-mod-qos\na2enmod qos\n"})}),"\n",(0,o.jsxs)(n.p,{children:["And edit ",(0,o.jsx)(n.code,{children:"/etc/apache2/mods-available/qos.conf"})]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-conf",children:"# allows max 50 connections from a single ip address:\nQS_SrvMaxConnPerIP 50\n"})}),"\n",(0,o.jsx)(n.h2,{id:"connecting-to-the-node",children:"Connecting to the Node"}),"\n",(0,o.jsxs)(n.p,{children:["Open ",(0,o.jsx)(n.a,{href:"https://polkadot.js.org/apps",children:"Polkadot-JS UI"}),' and click the logo in the top left to switch the\nnode. Activate the "Development" toggle and input your node\'s address - either the domain or the IP\naddress. Remember to prefix with ',(0,o.jsx)(n.code,{children:"wss://"})," and if you're using the 443 port, append ",(0,o.jsx)(n.code,{children:":443"}),", like so:\n",(0,o.jsx)(n.code,{children:"wss://example.com:443"}),"."]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"A sync-in-progress chain connected to Polkadot-JS UI",src:t(61189).A+"",width:"2876",height:"1626"})}),"\n",(0,o.jsx)(n.p,{children:"Now you have a secure remote connect setup for your Substrate node."})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},61189:(e,n,t)=>{t.d(n,{A:()=>s});const s=t.p+"assets/images/maintain-wss-image-0fe72147f38d8b6766328dd834a517a6.png"},28453:(e,n,t)=>{t.d(n,{R:()=>a,x:()=>i});var s=t(96540);const o={},r=s.createContext(o);function a(e){const n=s.useContext(r);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:a(e.components),s.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/3e56470e.d6dd520e.js b/assets/js/3e56470e.d6dd520e.js deleted file mode 100644 index d0570fa2e497..000000000000 --- a/assets/js/3e56470e.d6dd520e.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1608],{17740:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>a,default:()=>h,frontMatter:()=>r,metadata:()=>i,toc:()=>l});var s=t(74848),o=t(28453);const r={id:"maintain-wss",title:"Secure the WebSocket",sidebar_label:"Secure the WebSocket",description:"Steps on setting up a secure socket for remote connections.",keywords:["web socket","remote","connection","secure websocket"],slug:"../maintain-wss"},a=void 0,i={id:"maintain/maintain-wss",title:"Secure the WebSocket",description:"Steps on setting up a secure socket for remote connections.",source:"@site/../docs/maintain/maintain-wss.md",sourceDirName:"maintain",slug:"/maintain-wss",permalink:"/docs/maintain-wss",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/maintain/maintain-wss.md",tags:[],version:"current",lastUpdatedBy:"Stakeworld",lastUpdatedAt:1683623723e3,frontMatter:{id:"maintain-wss",title:"Secure the WebSocket",sidebar_label:"Secure the WebSocket",description:"Steps on setting up a secure socket for remote connections.",keywords:["web socket","remote","connection","secure websocket"],slug:"../maintain-wss"},sidebar:"docs",previous:{title:"Set up a RPC node",permalink:"/docs/maintain-rpc"},next:{title:"Networks",permalink:"/docs/maintain-networks"}},c={},l=[{value:"Secure a WS Port",id:"secure-a-ws-port",level:2},{value:"Obtaining an SSL Certificate",id:"obtaining-an-ssl-certificate",level:3},{value:"Installing a Proxy Server",id:"installing-a-proxy-server",level:2},{value:"Nginx",id:"nginx",level:3},{value:"Apache2",id:"apache2",level:3},{value:"Connecting to the Node",id:"connecting-to-the-node",level:2}];function d(e){const n={a:"a",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",p:"p",pre:"pre",...(0,o.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h2,{id:"secure-a-ws-port",children:"Secure a WS Port"}),"\n",(0,s.jsxs)(n.p,{children:["A non-secure ws port can be converted to a secure wss port by placing it behind an SSL-enabled\nproxy. This can be used to secure a ",(0,s.jsx)(n.a,{href:"/docs/maintain-bootnode",children:"bootnode"})," or secure a\n",(0,s.jsx)(n.a,{href:"/docs/maintain-rpc",children:"RPC server"}),". The SSL-enabled apache2/nginx/other proxy server redirects\nrequests to the internal ws and converts it to a secure (wss) connection. For this, you will need an\nSSL certificate for which you can use a service like letsencrypt or self-signing."]}),"\n",(0,s.jsx)(n.h3,{id:"obtaining-an-ssl-certificate",children:"Obtaining an SSL Certificate"}),"\n",(0,s.jsxs)(n.p,{children:["One easy way to get a free SSL certificate can be achieved by following the LetsEncrypt instructions\n(",(0,s.jsx)(n.a,{href:"https://certbot.eff.org/instructions?ws=nginx&os=ubuntufocal",children:"nginx"}),"/",(0,s.jsx)(n.a,{href:"https://certbot.eff.org/instructions?ws=apache&os=ubuntufocal",children:"apache"}),").\nThis will auto-generate an SSL certificate and include it in your configuration."]}),"\n",(0,s.jsx)(n.p,{children:"Alternatively, you can generate a self-signed certificate and rely on the raw IP address of your\nnode when connecting to it. This is not preferable since you will have to whitelist the certificate\nto access it from a browser."}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/selfsigned.key -out /etc/ssl/certs/selfsigned.crt\nsudo openssl dhparam -out /etc/ssl/certs/dhparam.pem 2048\n"})}),"\n",(0,s.jsx)(n.h2,{id:"installing-a-proxy-server",children:"Installing a Proxy Server"}),"\n",(0,s.jsxs)(n.p,{children:["There are a lot of different implementations of a WebSocket proxy, some of the more widely used are\n",(0,s.jsx)(n.a,{href:"https://www.nginx.com/",children:"nginx"})," and ",(0,s.jsx)(n.a,{href:"https://httpd.apache.org/",children:"apache2"}),", for which configuration\nexamples provided below."]}),"\n",(0,s.jsx)(n.h3,{id:"nginx",children:"Nginx"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"apt install nginx\n"})}),"\n",(0,s.jsx)(n.p,{children:"In an SSL-enabled virtual host add:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-conf",children:'server {\n (...)\n location / {\n proxy_buffers 16 4k;\n proxy_buffer_size 2k;\n proxy_pass http://localhost:9944;\n proxy_http_version 1.1;\n proxy_set_header Upgrade $http_upgrade;\n proxy_set_header Connection "Upgrade";\n proxy_set_header Host $host;\n }\n}\n'})}),"\n",(0,s.jsx)(n.p,{children:"Optionally some form of rate limiting can be introduced:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-conf",children:'http {\n limit_req_zone "$http_x_forwarded_for" zone=zone:10m rate=2r/s;\n (...)\n}\n\nlocation / {\n limit_req zone=zone burst=5;\n (...)\n}\n'})}),"\n",(0,s.jsx)(n.h3,{id:"apache2",children:"Apache2"}),"\n",(0,s.jsxs)(n.p,{children:["You can run it in different modes such as prefork, worker, or event. In this example, we use\n",(0,s.jsx)(n.a,{href:"https://httpd.apache.org/docs/2.4/mod/event.html",children:"event"})," which works well on higher load\nenvironments but other modes are also useful given the requirements."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"apt install apache2\na2dismod mpm_prefork\na2enmod mpm_event proxy proxy_html proxy_http proxy_wstunnel rewrite ssl\n"})}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.a,{href:"https://httpd.apache.org/docs/2.4/mod/mod_proxy_wstunnel.html",children:"mod_proxy_wstunnel"})," provides\n",(0,s.jsx)(n.em,{children:"support for the tunneling of web socket connections to a backend websockets server. The connection\nis automatically upgraded to a WebSocket connection"}),". In an SSL-enabled virtualhost add:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-apacheconf",children:"(...)\nSSLProxyEngine on\nProxyRequests off\n\nProxyPass / ws://localhost:9944\nProxyPassReverse / ws://localhost:9944\n"})}),"\n",(0,s.jsx)(n.p,{children:"Older versions of mod_proxy_wstunnel do not upgrade the connection automatically and will need the\nfollowing config added:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-apacheconf",children:"RewriteEngine on\nRewriteCond %{HTTP:Upgrade} websocket [NC]\nRewriteRule /(.*) ws://localhost:9944/$1 [P,L]\nRewriteRule /(.*) http://localhost:9944/$1 [P,L]\n"})}),"\n",(0,s.jsx)(n.p,{children:"Optionally some form of rate limiting can be introduced:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"apt install libapache2-mod-qos\na2enmod qos\n"})}),"\n",(0,s.jsxs)(n.p,{children:["And edit ",(0,s.jsx)(n.code,{children:"/etc/apache2/mods-available/qos.conf"})]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-conf",children:"# allows max 50 connections from a single ip address:\nQS_SrvMaxConnPerIP 50\n"})}),"\n",(0,s.jsx)(n.h2,{id:"connecting-to-the-node",children:"Connecting to the Node"}),"\n",(0,s.jsxs)(n.p,{children:["Open ",(0,s.jsx)(n.a,{href:"https://polkadot.js.org/apps",children:"Polkadot-JS UI"}),' and click the logo in the top left to switch the\nnode. Activate the "Development" toggle and input your node\'s address - either the domain or the IP\naddress. Remember to prefix with ',(0,s.jsx)(n.code,{children:"wss://"})," and if you're using the 443 port, append ",(0,s.jsx)(n.code,{children:":443"}),", like so:\n",(0,s.jsx)(n.code,{children:"wss://example.com:443"}),"."]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"A sync-in-progress chain connected to Polkadot-JS UI",src:t(61189).A+"",width:"2876",height:"1626"})}),"\n",(0,s.jsx)(n.p,{children:"Now you have a secure remote connect setup for your Substrate node."})]})}function h(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},61189:(e,n,t)=>{t.d(n,{A:()=>s});const s=t.p+"assets/images/maintain-wss-image-0fe72147f38d8b6766328dd834a517a6.png"},28453:(e,n,t)=>{t.d(n,{R:()=>a,x:()=>i});var s=t(96540);const o={},r=s.createContext(o);function a(e){const n=s.useContext(r);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:a(e.components),s.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/4073.65c44f84.js b/assets/js/4073.65c44f84.js deleted file mode 100644 index a05d6e773e52..000000000000 --- a/assets/js/4073.65c44f84.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4073],{24073:(t,e,r)=>{r.d(e,{diagram:()=>z});var i=r(86079),a=r(26312),n=(r(74353),r(16750),r(42838),function(){var t=function(t,e,r,i){for(r=r||{},i=t.length;i--;r[t[i]]=e);return r},e=[1,3],r=[1,6],i=[1,4],a=[1,5],n=[2,5],c=[1,12],s=[5,7,13,19,21,23,24,26,28,31,37,40,47],o=[7,13,19,21,23,24,26,28,31,37,40],l=[7,12,13,19,21,23,24,26,28,31,37,40],h=[7,13,47],m=[1,42],y=[1,41],u=[7,13,29,32,35,38,47],p=[1,55],g=[1,56],b=[1,57],d=[7,13,32,35,42,47],f={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,GG:5,document:6,EOF:7,":":8,DIR:9,options:10,body:11,OPT:12,NL:13,line:14,statement:15,commitStatement:16,mergeStatement:17,cherryPickStatement:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,section:24,branchStatement:25,CHECKOUT:26,ref:27,BRANCH:28,ORDER:29,NUM:30,CHERRY_PICK:31,COMMIT_ID:32,STR:33,PARENT_COMMIT:34,COMMIT_TAG:35,EMPTYSTR:36,MERGE:37,COMMIT_TYPE:38,commitType:39,COMMIT:40,commit_arg:41,COMMIT_MSG:42,NORMAL:43,REVERSE:44,HIGHLIGHT:45,ID:46,";":47,$accept:0,$end:1},terminals_:{2:"error",5:"GG",7:"EOF",8:":",9:"DIR",12:"OPT",13:"NL",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"section",26:"CHECKOUT",28:"BRANCH",29:"ORDER",30:"NUM",31:"CHERRY_PICK",32:"COMMIT_ID",33:"STR",34:"PARENT_COMMIT",35:"COMMIT_TAG",36:"EMPTYSTR",37:"MERGE",38:"COMMIT_TYPE",40:"COMMIT",42:"COMMIT_MSG",43:"NORMAL",44:"REVERSE",45:"HIGHLIGHT",46:"ID",47:";"},productions_:[0,[3,2],[3,3],[3,4],[3,5],[6,0],[6,2],[10,2],[10,1],[11,0],[11,2],[14,2],[14,1],[15,1],[15,1],[15,1],[15,2],[15,2],[15,1],[15,1],[15,1],[15,2],[25,2],[25,4],[18,3],[18,5],[18,5],[18,7],[18,7],[18,5],[18,5],[18,5],[18,7],[18,7],[18,7],[18,7],[17,2],[17,4],[17,4],[17,4],[17,6],[17,6],[17,6],[17,6],[17,6],[17,6],[17,8],[17,8],[17,8],[17,8],[17,8],[17,8],[16,2],[16,3],[16,3],[16,5],[16,5],[16,3],[16,5],[16,5],[16,5],[16,5],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,3],[16,5],[16,5],[16,5],[16,5],[16,5],[16,5],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[41,0],[41,1],[39,1],[39,1],[39,1],[27,1],[27,1],[4,1],[4,1],[4,1]],performAction:function(t,e,r,i,a,n,c){var s=n.length-1;switch(a){case 2:return n[s];case 3:return n[s-1];case 4:return i.setDirection(n[s-3]),n[s-1];case 6:i.setOptions(n[s-1]),this.$=n[s];break;case 7:n[s-1]+=n[s],this.$=n[s-1];break;case 9:this.$=[];break;case 10:n[s-1].push(n[s]),this.$=n[s-1];break;case 11:this.$=n[s-1];break;case 16:this.$=n[s].trim(),i.setAccTitle(this.$);break;case 17:case 18:this.$=n[s].trim(),i.setAccDescription(this.$);break;case 19:i.addSection(n[s].substr(8)),this.$=n[s].substr(8);break;case 21:i.checkout(n[s]);break;case 22:i.branch(n[s]);break;case 23:i.branch(n[s-2],n[s]);break;case 24:i.cherryPick(n[s],"",void 0);break;case 25:i.cherryPick(n[s-2],"",void 0,n[s]);break;case 26:i.cherryPick(n[s-2],"",n[s]);break;case 27:i.cherryPick(n[s-4],"",n[s],n[s-2]);break;case 28:i.cherryPick(n[s-4],"",n[s-2],n[s]);break;case 29:i.cherryPick(n[s],"",n[s-2]);break;case 30:i.cherryPick(n[s],"","");break;case 31:i.cherryPick(n[s-2],"","");break;case 32:i.cherryPick(n[s-4],"","",n[s-2]);break;case 33:i.cherryPick(n[s-4],"","",n[s]);break;case 34:i.cherryPick(n[s-2],"",n[s-4],n[s]);break;case 35:i.cherryPick(n[s-2],"","",n[s]);break;case 36:i.merge(n[s],"","","");break;case 37:i.merge(n[s-2],n[s],"","");break;case 38:i.merge(n[s-2],"",n[s],"");break;case 39:i.merge(n[s-2],"","",n[s]);break;case 40:i.merge(n[s-4],n[s],"",n[s-2]);break;case 41:i.merge(n[s-4],"",n[s],n[s-2]);break;case 42:i.merge(n[s-4],"",n[s-2],n[s]);break;case 43:i.merge(n[s-4],n[s-2],n[s],"");break;case 44:i.merge(n[s-4],n[s-2],"",n[s]);break;case 45:i.merge(n[s-4],n[s],n[s-2],"");break;case 46:i.merge(n[s-6],n[s-4],n[s-2],n[s]);break;case 47:i.merge(n[s-6],n[s],n[s-4],n[s-2]);break;case 48:i.merge(n[s-6],n[s-4],n[s],n[s-2]);break;case 49:i.merge(n[s-6],n[s-2],n[s-4],n[s]);break;case 50:i.merge(n[s-6],n[s],n[s-2],n[s-4]);break;case 51:i.merge(n[s-6],n[s-2],n[s],n[s-4]);break;case 52:i.commit(n[s]);break;case 53:i.commit("","",i.commitType.NORMAL,n[s]);break;case 54:i.commit("","",n[s],"");break;case 55:i.commit("","",n[s],n[s-2]);break;case 56:i.commit("","",n[s-2],n[s]);break;case 57:i.commit("",n[s],i.commitType.NORMAL,"");break;case 58:i.commit("",n[s-2],i.commitType.NORMAL,n[s]);break;case 59:i.commit("",n[s],i.commitType.NORMAL,n[s-2]);break;case 60:i.commit("",n[s-2],n[s],"");break;case 61:i.commit("",n[s],n[s-2],"");break;case 62:i.commit("",n[s-4],n[s-2],n[s]);break;case 63:i.commit("",n[s-4],n[s],n[s-2]);break;case 64:i.commit("",n[s-2],n[s-4],n[s]);break;case 65:i.commit("",n[s],n[s-4],n[s-2]);break;case 66:i.commit("",n[s],n[s-2],n[s-4]);break;case 67:i.commit("",n[s-2],n[s],n[s-4]);break;case 68:i.commit(n[s],"",i.commitType.NORMAL,"");break;case 69:i.commit(n[s],"",i.commitType.NORMAL,n[s-2]);break;case 70:i.commit(n[s-2],"",i.commitType.NORMAL,n[s]);break;case 71:i.commit(n[s-2],"",n[s],"");break;case 72:i.commit(n[s],"",n[s-2],"");break;case 73:i.commit(n[s],n[s-2],i.commitType.NORMAL,"");break;case 74:i.commit(n[s-2],n[s],i.commitType.NORMAL,"");break;case 75:i.commit(n[s-4],"",n[s-2],n[s]);break;case 76:i.commit(n[s-4],"",n[s],n[s-2]);break;case 77:i.commit(n[s-2],"",n[s-4],n[s]);break;case 78:i.commit(n[s],"",n[s-4],n[s-2]);break;case 79:i.commit(n[s],"",n[s-2],n[s-4]);break;case 80:i.commit(n[s-2],"",n[s],n[s-4]);break;case 81:i.commit(n[s-4],n[s],n[s-2],"");break;case 82:i.commit(n[s-4],n[s-2],n[s],"");break;case 83:i.commit(n[s-2],n[s],n[s-4],"");break;case 84:i.commit(n[s],n[s-2],n[s-4],"");break;case 85:i.commit(n[s],n[s-4],n[s-2],"");break;case 86:i.commit(n[s-2],n[s-4],n[s],"");break;case 87:i.commit(n[s-4],n[s],i.commitType.NORMAL,n[s-2]);break;case 88:i.commit(n[s-4],n[s-2],i.commitType.NORMAL,n[s]);break;case 89:i.commit(n[s-2],n[s],i.commitType.NORMAL,n[s-4]);break;case 90:i.commit(n[s],n[s-2],i.commitType.NORMAL,n[s-4]);break;case 91:i.commit(n[s],n[s-4],i.commitType.NORMAL,n[s-2]);break;case 92:i.commit(n[s-2],n[s-4],i.commitType.NORMAL,n[s]);break;case 93:i.commit(n[s-6],n[s-4],n[s-2],n[s]);break;case 94:i.commit(n[s-6],n[s-4],n[s],n[s-2]);break;case 95:i.commit(n[s-6],n[s-2],n[s-4],n[s]);break;case 96:i.commit(n[s-6],n[s],n[s-4],n[s-2]);break;case 97:i.commit(n[s-6],n[s-2],n[s],n[s-4]);break;case 98:i.commit(n[s-6],n[s],n[s-2],n[s-4]);break;case 99:i.commit(n[s-4],n[s-6],n[s-2],n[s]);break;case 100:i.commit(n[s-4],n[s-6],n[s],n[s-2]);break;case 101:i.commit(n[s-2],n[s-6],n[s-4],n[s]);break;case 102:i.commit(n[s],n[s-6],n[s-4],n[s-2]);break;case 103:i.commit(n[s-2],n[s-6],n[s],n[s-4]);break;case 104:i.commit(n[s],n[s-6],n[s-2],n[s-4]);break;case 105:i.commit(n[s],n[s-4],n[s-2],n[s-6]);break;case 106:i.commit(n[s-2],n[s-4],n[s],n[s-6]);break;case 107:i.commit(n[s],n[s-2],n[s-4],n[s-6]);break;case 108:i.commit(n[s-2],n[s],n[s-4],n[s-6]);break;case 109:i.commit(n[s-4],n[s-2],n[s],n[s-6]);break;case 110:i.commit(n[s-4],n[s],n[s-2],n[s-6]);break;case 111:i.commit(n[s-2],n[s-4],n[s-6],n[s]);break;case 112:i.commit(n[s],n[s-4],n[s-6],n[s-2]);break;case 113:i.commit(n[s-2],n[s],n[s-6],n[s-4]);break;case 114:i.commit(n[s],n[s-2],n[s-6],n[s-4]);break;case 115:i.commit(n[s-4],n[s-2],n[s-6],n[s]);break;case 116:i.commit(n[s-4],n[s],n[s-6],n[s-2]);break;case 117:this.$="";break;case 118:this.$=n[s];break;case 119:this.$=i.commitType.NORMAL;break;case 120:this.$=i.commitType.REVERSE;break;case 121:this.$=i.commitType.HIGHLIGHT}},table:[{3:1,4:2,5:e,7:r,13:i,47:a},{1:[3]},{3:7,4:2,5:e,7:r,13:i,47:a},{6:8,7:n,8:[1,9],9:[1,10],10:11,13:c},t(s,[2,124]),t(s,[2,125]),t(s,[2,126]),{1:[2,1]},{7:[1,13]},{6:14,7:n,10:11,13:c},{8:[1,15]},t(o,[2,9],{11:16,12:[1,17]}),t(l,[2,8]),{1:[2,2]},{7:[1,18]},{6:19,7:n,10:11,13:c},{7:[2,6],13:[1,22],14:20,15:21,16:23,17:24,18:25,19:[1,26],21:[1,27],23:[1,28],24:[1,29],25:30,26:[1,31],28:[1,35],31:[1,34],37:[1,33],40:[1,32]},t(l,[2,7]),{1:[2,3]},{7:[1,36]},t(o,[2,10]),{4:37,7:r,13:i,47:a},t(o,[2,12]),t(h,[2,13]),t(h,[2,14]),t(h,[2,15]),{20:[1,38]},{22:[1,39]},t(h,[2,18]),t(h,[2,19]),t(h,[2,20]),{27:40,33:m,46:y},t(h,[2,117],{41:43,32:[1,46],33:[1,48],35:[1,44],38:[1,45],42:[1,47]}),{27:49,33:m,46:y},{32:[1,50],35:[1,51]},{27:52,33:m,46:y},{1:[2,4]},t(o,[2,11]),t(h,[2,16]),t(h,[2,17]),t(h,[2,21]),t(u,[2,122]),t(u,[2,123]),t(h,[2,52]),{33:[1,53]},{39:54,43:p,44:g,45:b},{33:[1,58]},{33:[1,59]},t(h,[2,118]),t(h,[2,36],{32:[1,60],35:[1,62],38:[1,61]}),{33:[1,63]},{33:[1,64],36:[1,65]},t(h,[2,22],{29:[1,66]}),t(h,[2,53],{32:[1,68],38:[1,67],42:[1,69]}),t(h,[2,54],{32:[1,71],35:[1,70],42:[1,72]}),t(d,[2,119]),t(d,[2,120]),t(d,[2,121]),t(h,[2,57],{35:[1,73],38:[1,74],42:[1,75]}),t(h,[2,68],{32:[1,78],35:[1,76],38:[1,77]}),{33:[1,79]},{39:80,43:p,44:g,45:b},{33:[1,81]},t(h,[2,24],{34:[1,82],35:[1,83]}),{32:[1,84]},{32:[1,85]},{30:[1,86]},{39:87,43:p,44:g,45:b},{33:[1,88]},{33:[1,89]},{33:[1,90]},{33:[1,91]},{33:[1,92]},{33:[1,93]},{39:94,43:p,44:g,45:b},{33:[1,95]},{33:[1,96]},{39:97,43:p,44:g,45:b},{33:[1,98]},t(h,[2,37],{35:[1,100],38:[1,99]}),t(h,[2,38],{32:[1,102],35:[1,101]}),t(h,[2,39],{32:[1,103],38:[1,104]}),{33:[1,105]},{33:[1,106],36:[1,107]},{33:[1,108]},{33:[1,109]},t(h,[2,23]),t(h,[2,55],{32:[1,110],42:[1,111]}),t(h,[2,59],{38:[1,112],42:[1,113]}),t(h,[2,69],{32:[1,115],38:[1,114]}),t(h,[2,56],{32:[1,116],42:[1,117]}),t(h,[2,61],{35:[1,118],42:[1,119]}),t(h,[2,72],{32:[1,121],35:[1,120]}),t(h,[2,58],{38:[1,122],42:[1,123]}),t(h,[2,60],{35:[1,124],42:[1,125]}),t(h,[2,73],{35:[1,127],38:[1,126]}),t(h,[2,70],{32:[1,129],38:[1,128]}),t(h,[2,71],{32:[1,131],35:[1,130]}),t(h,[2,74],{35:[1,133],38:[1,132]}),{39:134,43:p,44:g,45:b},{33:[1,135]},{33:[1,136]},{33:[1,137]},{33:[1,138]},{39:139,43:p,44:g,45:b},t(h,[2,25],{35:[1,140]}),t(h,[2,26],{34:[1,141]}),t(h,[2,31],{34:[1,142]}),t(h,[2,29],{34:[1,143]}),t(h,[2,30],{34:[1,144]}),{33:[1,145]},{33:[1,146]},{39:147,43:p,44:g,45:b},{33:[1,148]},{39:149,43:p,44:g,45:b},{33:[1,150]},{33:[1,151]},{33:[1,152]},{33:[1,153]},{33:[1,154]},{33:[1,155]},{33:[1,156]},{39:157,43:p,44:g,45:b},{33:[1,158]},{33:[1,159]},{33:[1,160]},{39:161,43:p,44:g,45:b},{33:[1,162]},{39:163,43:p,44:g,45:b},{33:[1,164]},{33:[1,165]},{33:[1,166]},{39:167,43:p,44:g,45:b},{33:[1,168]},t(h,[2,43],{35:[1,169]}),t(h,[2,44],{38:[1,170]}),t(h,[2,42],{32:[1,171]}),t(h,[2,45],{35:[1,172]}),t(h,[2,40],{38:[1,173]}),t(h,[2,41],{32:[1,174]}),{33:[1,175],36:[1,176]},{33:[1,177]},{33:[1,178]},{33:[1,179]},{33:[1,180]},t(h,[2,66],{42:[1,181]}),t(h,[2,79],{32:[1,182]}),t(h,[2,67],{42:[1,183]}),t(h,[2,90],{38:[1,184]}),t(h,[2,80],{32:[1,185]}),t(h,[2,89],{38:[1,186]}),t(h,[2,65],{42:[1,187]}),t(h,[2,78],{32:[1,188]}),t(h,[2,64],{42:[1,189]}),t(h,[2,84],{35:[1,190]}),t(h,[2,77],{32:[1,191]}),t(h,[2,83],{35:[1,192]}),t(h,[2,63],{42:[1,193]}),t(h,[2,91],{38:[1,194]}),t(h,[2,62],{42:[1,195]}),t(h,[2,85],{35:[1,196]}),t(h,[2,86],{35:[1,197]}),t(h,[2,92],{38:[1,198]}),t(h,[2,76],{32:[1,199]}),t(h,[2,87],{38:[1,200]}),t(h,[2,75],{32:[1,201]}),t(h,[2,81],{35:[1,202]}),t(h,[2,82],{35:[1,203]}),t(h,[2,88],{38:[1,204]}),{33:[1,205]},{39:206,43:p,44:g,45:b},{33:[1,207]},{33:[1,208]},{39:209,43:p,44:g,45:b},{33:[1,210]},t(h,[2,27]),t(h,[2,32]),t(h,[2,28]),t(h,[2,33]),t(h,[2,34]),t(h,[2,35]),{33:[1,211]},{33:[1,212]},{33:[1,213]},{39:214,43:p,44:g,45:b},{33:[1,215]},{39:216,43:p,44:g,45:b},{33:[1,217]},{33:[1,218]},{33:[1,219]},{33:[1,220]},{33:[1,221]},{33:[1,222]},{33:[1,223]},{39:224,43:p,44:g,45:b},{33:[1,225]},{33:[1,226]},{33:[1,227]},{39:228,43:p,44:g,45:b},{33:[1,229]},{39:230,43:p,44:g,45:b},{33:[1,231]},{33:[1,232]},{33:[1,233]},{39:234,43:p,44:g,45:b},t(h,[2,46]),t(h,[2,48]),t(h,[2,47]),t(h,[2,49]),t(h,[2,51]),t(h,[2,50]),t(h,[2,107]),t(h,[2,108]),t(h,[2,105]),t(h,[2,106]),t(h,[2,110]),t(h,[2,109]),t(h,[2,114]),t(h,[2,113]),t(h,[2,112]),t(h,[2,111]),t(h,[2,116]),t(h,[2,115]),t(h,[2,104]),t(h,[2,103]),t(h,[2,102]),t(h,[2,101]),t(h,[2,99]),t(h,[2,100]),t(h,[2,98]),t(h,[2,97]),t(h,[2,96]),t(h,[2,95]),t(h,[2,93]),t(h,[2,94])],defaultActions:{7:[2,1],13:[2,2],18:[2,3],36:[2,4]},parseError:function(t,e){if(!e.recoverable){var r=new Error(t);throw r.hash=e,r}this.trace(t)},parse:function(t){var e=this,r=[0],i=[],a=[null],n=[],c=this.table,s="",o=0,l=0,h=n.slice.call(arguments,1),m=Object.create(this.lexer),y={yy:{}};for(var u in this.yy)Object.prototype.hasOwnProperty.call(this.yy,u)&&(y.yy[u]=this.yy[u]);m.setInput(t,y.yy),y.yy.lexer=m,y.yy.parser=this,void 0===m.yylloc&&(m.yylloc={});var p=m.yylloc;n.push(p);var g=m.options&&m.options.ranges;"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var b,d,f,$,k,x,_,T,w,E={};;){if(d=r[r.length-1],this.defaultActions[d]?f=this.defaultActions[d]:(null==b&&(w=void 0,"number"!=typeof(w=i.pop()||m.lex()||1)&&(w instanceof Array&&(w=(i=w).pop()),w=e.symbols_[w]||w),b=w),f=c[d]&&c[d][b]),void 0===f||!f.length||!f[0]){var L="";for(k in T=[],c[d])this.terminals_[k]&&k>2&&T.push("'"+this.terminals_[k]+"'");L=m.showPosition?"Parse error on line "+(o+1)+":\n"+m.showPosition()+"\nExpecting "+T.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(o+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(L,{text:m.match,token:this.terminals_[b]||b,line:m.yylineno,loc:p,expected:T})}if(f[0]instanceof Array&&f.length>1)throw new Error("Parse Error: multiple actions possible at state: "+d+", token: "+b);switch(f[0]){case 1:r.push(b),a.push(m.yytext),n.push(m.yylloc),r.push(f[1]),b=null,l=m.yyleng,s=m.yytext,o=m.yylineno,p=m.yylloc;break;case 2:if(x=this.productions_[f[1]][1],E.$=a[a.length-x],E._$={first_line:n[n.length-(x||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(x||1)].first_column,last_column:n[n.length-1].last_column},g&&(E._$.range=[n[n.length-(x||1)].range[0],n[n.length-1].range[1]]),void 0!==($=this.performAction.apply(E,[s,l,o,y.yy,f[1],a,n].concat(h))))return $;x&&(r=r.slice(0,-1*x*2),a=a.slice(0,-1*x),n=n.slice(0,-1*x)),r.push(this.productions_[f[1]][0]),a.push(E.$),n.push(E._$),_=c[r[r.length-2]][r[r.length-1]],r.push(_);break;case 3:return!0}}return!0}},$={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1);var a=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===i.length?this.yylloc.first_column:0)+i[i.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[a[0],a[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var r,i,a;if(this.options.backtrack_lexer&&(a={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(a.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var n in a)this[n]=a[n];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,r,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var a=this._currentRules(),n=0;ne[0].length)){if(e=r,i=n,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,a[n])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,a[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,r,i){switch(r){case 0:return this.begin("acc_title"),19;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),21;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:case 30:case 34:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return 13;case 8:case 9:break;case 10:return 5;case 11:return 40;case 12:return 32;case 13:return 38;case 14:return 42;case 15:return 43;case 16:return 44;case 17:return 45;case 18:return 35;case 19:return 28;case 20:return 29;case 21:return 37;case 22:return 31;case 23:return 34;case 24:return 26;case 25:case 26:return 9;case 27:return 8;case 28:return"CARET";case 29:this.begin("options");break;case 31:return 12;case 32:return 36;case 33:this.begin("string");break;case 35:return 33;case 36:return 30;case 37:return 46;case 38:return 7}},rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:(\r?\n)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:gitGraph\b)/i,/^(?:commit(?=\s|$))/i,/^(?:id:)/i,/^(?:type:)/i,/^(?:msg:)/i,/^(?:NORMAL\b)/i,/^(?:REVERSE\b)/i,/^(?:HIGHLIGHT\b)/i,/^(?:tag:)/i,/^(?:branch(?=\s|$))/i,/^(?:order:)/i,/^(?:merge(?=\s|$))/i,/^(?:cherry-pick(?=\s|$))/i,/^(?:parent:)/i,/^(?:checkout(?=\s|$))/i,/^(?:LR\b)/i,/^(?:TB\b)/i,/^(?::)/i,/^(?:\^)/i,/^(?:options\r?\n)/i,/^(?:[ \r\n\t]+end\b)/i,/^(?:[\s\S]+(?=[ \r\n\t]+end))/i,/^(?:["]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[0-9]+(?=\s|$))/i,/^(?:\w([-\./\w]*[-\w])?)/i,/^(?:$)/i,/^(?:\s+)/i],conditions:{acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},options:{rules:[30,31],inclusive:!1},string:{rules:[34,35],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,32,33,36,37,38,39],inclusive:!0}}};function k(){this.yy={}}return f.lexer=$,k.prototype=f,f.Parser=k,new k}());n.parser=n;const c=n;let s=(0,i.c)().gitGraph.mainBranchName,o=(0,i.c)().gitGraph.mainBranchOrder,l={},h=null,m={};m[s]={name:s,order:o};let y={};y[s]=h;let u=s,p="LR",g=0;function b(){return(0,i.y)({length:7})}let d={};const f=function(t){if(t=i.e.sanitizeText(t,(0,i.c)()),void 0===y[t]){let e=new Error('Trying to checkout branch which is not yet created. (Help try using "branch '+t+'")');throw e.hash={text:"checkout "+t,token:"checkout "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"branch '+t+'"']},e}{u=t;const e=y[u];h=l[e]}};function $(t,e,r){const i=t.indexOf(e);-1===i?t.push(r):t.splice(i,1,r)}function k(t){const e=t.reduce(((t,e)=>t.seq>e.seq?t:e),t[0]);let r="";t.forEach((function(t){r+=t===e?"\t*":"\t|"}));const a=[r,e.id,e.seq];for(let i in y)y[i]===e.id&&a.push(i);if(i.l.debug(a.join(" ")),e.parents&&2==e.parents.length){const r=l[e.parents[0]];$(t,e,r),t.push(l[e.parents[1]])}else{if(0==e.parents.length)return;{const r=l[e.parents];$(t,e,r)}}k(t=function(t,e){const r=Object.create(null);return t.reduce(((t,i)=>{const a=e(i);return r[a]||(r[a]=!0,t.push(i)),t}),[])}(t,(t=>t.id)))}const x=function(){const t=Object.keys(l).map((function(t){return l[t]}));return t.forEach((function(t){i.l.debug(t.id)})),t.sort(((t,e)=>t.seq-e.seq)),t},_={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},T={getConfig:()=>(0,i.c)().gitGraph,setDirection:function(t){p=t},setOptions:function(t){i.l.debug("options str",t),t=(t=t&&t.trim())||"{}";try{d=JSON.parse(t)}catch(e){i.l.error("error while parsing gitGraph options",e.message)}},getOptions:function(){return d},commit:function(t,e,r,a){i.l.debug("Entering commit:",t,e,r,a),e=i.e.sanitizeText(e,(0,i.c)()),t=i.e.sanitizeText(t,(0,i.c)()),a=i.e.sanitizeText(a,(0,i.c)());const n={id:e||g+"-"+b(),message:t,seq:g++,type:r||_.NORMAL,tag:a||"",parents:null==h?[]:[h.id],branch:u};h=n,l[n.id]=n,y[u]=n.id,i.l.debug("in pushCommit "+n.id)},branch:function(t,e){if(t=i.e.sanitizeText(t,(0,i.c)()),void 0!==y[t]){let e=new Error('Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout '+t+'")');throw e.hash={text:"branch "+t,token:"branch "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"checkout '+t+'"']},e}y[t]=null!=h?h.id:null,m[t]={name:t,order:e?parseInt(e,10):null},f(t),i.l.debug("in createBranch")},merge:function(t,e,r,a){t=i.e.sanitizeText(t,(0,i.c)()),e=i.e.sanitizeText(e,(0,i.c)());const n=l[y[u]],c=l[y[t]];if(u===t){let e=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw e.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch abc"]},e}if(void 0===n||!n){let e=new Error('Incorrect usage of "merge". Current branch ('+u+")has no commits");throw e.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["commit"]},e}if(void 0===y[t]){let e=new Error('Incorrect usage of "merge". Branch to be merged ('+t+") does not exist");throw e.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch "+t]},e}if(void 0===c||!c){let e=new Error('Incorrect usage of "merge". Branch to be merged ('+t+") has no commits");throw e.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"commit"']},e}if(n===c){let e=new Error('Incorrect usage of "merge". Both branches have same head');throw e.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch abc"]},e}if(e&&void 0!==l[e]){let i=new Error('Incorrect usage of "merge". Commit with id:'+e+" already exists, use different custom Id");throw i.hash={text:"merge "+t+e+r+a,token:"merge "+t+e+r+a,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["merge "+t+" "+e+"_UNIQUE "+r+" "+a]},i}const s={id:e||g+"-"+b(),message:"merged branch "+t+" into "+u,seq:g++,parents:[null==h?null:h.id,y[t]],branch:u,type:_.MERGE,customType:r,customId:!!e,tag:a||""};h=s,l[s.id]=s,y[u]=s.id,i.l.debug(y),i.l.debug("in mergeBranch")},cherryPick:function(t,e,r,a){if(i.l.debug("Entering cherryPick:",t,e,r),t=i.e.sanitizeText(t,(0,i.c)()),e=i.e.sanitizeText(e,(0,i.c)()),r=i.e.sanitizeText(r,(0,i.c)()),a=i.e.sanitizeText(a,(0,i.c)()),!t||void 0===l[t]){let r=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw r.hash={text:"cherryPick "+t+" "+e,token:"cherryPick "+t+" "+e,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},r}let n=l[t],c=n.branch;if(a&&(!Array.isArray(n.parents)||!n.parents.includes(a))){throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.")}if(n.type===_.MERGE&&!a){throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.")}if(!e||void 0===l[e]){if(c===u){let r=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw r.hash={text:"cherryPick "+t+" "+e,token:"cherryPick "+t+" "+e,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},r}const s=l[y[u]];if(void 0===s||!s){let r=new Error('Incorrect usage of "cherry-pick". Current branch ('+u+")has no commits");throw r.hash={text:"cherryPick "+t+" "+e,token:"cherryPick "+t+" "+e,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},r}const o={id:g+"-"+b(),message:"cherry-picked "+n+" into "+u,seq:g++,parents:[null==h?null:h.id,n.id],branch:u,type:_.CHERRY_PICK,tag:r??`cherry-pick:${n.id}${n.type===_.MERGE?`|parent:${a}`:""}`};h=o,l[o.id]=o,y[u]=o.id,i.l.debug(y),i.l.debug("in cherryPick")}},checkout:f,prettyPrint:function(){i.l.debug(l);k([x()[0]])},clear:function(){l={},h=null;let t=(0,i.c)().gitGraph.mainBranchName,e=(0,i.c)().gitGraph.mainBranchOrder;y={},y[t]=null,m={},m[t]={name:t,order:e},u=t,g=0,(0,i.v)()},getBranchesAsObjArray:function(){return Object.values(m).map(((t,e)=>null!==t.order?t:{...t,order:parseFloat(`0.${e}`,10)})).sort(((t,e)=>t.order-e.order)).map((({name:t})=>({name:t})))},getBranches:function(){return y},getCommits:function(){return l},getCommitsArray:x,getCurrentBranch:function(){return u},getDirection:function(){return p},getHead:function(){return h},setAccTitle:i.s,getAccTitle:i.g,getAccDescription:i.a,setAccDescription:i.b,setDiagramTitle:i.q,getDiagramTitle:i.t,commitType:_};let w={};const E=0,L=1,M=2,v=3,I=4;let A={},R={},O=[],C=0,S="LR";const P=t=>{const e=document.createElementNS("http://www.w3.org/2000/svg","text");let r=[];r="string"==typeof t?t.split(/\\n|\n|/gi):Array.isArray(t)?t:[];for(const i of r){const t=document.createElementNS("http://www.w3.org/2000/svg","tspan");t.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),t.setAttribute("dy","1em"),t.setAttribute("x","0"),t.setAttribute("class","row"),t.textContent=i.trim(),e.appendChild(t)}return e},B=(t,e,r)=>{const a=(0,i.c)().gitGraph,n=t.append("g").attr("class","commit-bullets"),c=t.append("g").attr("class","commit-labels");let s=0;"TB"===S&&(s=30);const o=Object.keys(e).sort(((t,r)=>e[t].seq-e[r].seq)),l=a.parallelCommits,h=10;o.forEach((t=>{const i=e[t];if(l)if(i.parents.length){const t=(t=>{let e="",r=0;return t.forEach((t=>{const i="TB"===S?R[t].y:R[t].x;i>=r&&(e=t,r=i)})),e||void 0})(i.parents);s="TB"===S?R[t].y+40:R[t].x+40}else s=0,"TB"===S&&(s=30);const o=s+h,m="TB"===S?o:A[i.branch].pos,y="TB"===S?A[i.branch].pos:o;if(r){let t,e=void 0!==i.customType&&""!==i.customType?i.customType:i.type;switch(e){case E:t="commit-normal";break;case L:t="commit-reverse";break;case M:t="commit-highlight";break;case v:t="commit-merge";break;case I:t="commit-cherry-pick";break;default:t="commit-normal"}if(e===M){const e=n.append("rect");e.attr("x",y-10),e.attr("y",m-10),e.attr("height",20),e.attr("width",20),e.attr("class",`commit ${i.id} commit-highlight${A[i.branch].index%8} ${t}-outer`),n.append("rect").attr("x",y-6).attr("y",m-6).attr("height",12).attr("width",12).attr("class",`commit ${i.id} commit${A[i.branch].index%8} ${t}-inner`)}else if(e===I)n.append("circle").attr("cx",y).attr("cy",m).attr("r",10).attr("class",`commit ${i.id} ${t}`),n.append("circle").attr("cx",y-3).attr("cy",m+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${i.id} ${t}`),n.append("circle").attr("cx",y+3).attr("cy",m+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${i.id} ${t}`),n.append("line").attr("x1",y+3).attr("y1",m+1).attr("x2",y).attr("y2",m-5).attr("stroke","#fff").attr("class",`commit ${i.id} ${t}`),n.append("line").attr("x1",y-3).attr("y1",m+1).attr("x2",y).attr("y2",m-5).attr("stroke","#fff").attr("class",`commit ${i.id} ${t}`);else{const r=n.append("circle");if(r.attr("cx",y),r.attr("cy",m),r.attr("r",i.type===v?9:10),r.attr("class",`commit ${i.id} commit${A[i.branch].index%8}`),e===v){const e=n.append("circle");e.attr("cx",y),e.attr("cy",m),e.attr("r",6),e.attr("class",`commit ${t} ${i.id} commit${A[i.branch].index%8}`)}if(e===L){n.append("path").attr("d",`M ${y-5},${m-5}L${y+5},${m+5}M${y-5},${m+5}L${y+5},${m-5}`).attr("class",`commit ${t} ${i.id} commit${A[i.branch].index%8}`)}}}if(R[i.id]="TB"===S?{x:y,y:o}:{x:o,y:m},r){const t=4,e=2;if(i.type!==I&&(i.customId&&i.type===v||i.type!==v)&&a.showCommitLabel){const r=c.append("g"),n=r.insert("rect").attr("class","commit-label-bkg"),l=r.append("text").attr("x",s).attr("y",m+25).attr("class","commit-label").text(i.id);let h=l.node().getBBox();if(n.attr("x",o-h.width/2-e).attr("y",m+13.5).attr("width",h.width+2*e).attr("height",h.height+2*e),"TB"===S&&(n.attr("x",y-(h.width+4*t+5)).attr("y",m-12),l.attr("x",y-(h.width+4*t)).attr("y",m+h.height-12)),"TB"!==S&&l.attr("x",o-h.width/2),a.rotateCommitLabel)if("TB"===S)l.attr("transform","rotate(-45, "+y+", "+m+")"),n.attr("transform","rotate(-45, "+y+", "+m+")");else{let t=-7.5-(h.width+10)/25*9.5,e=10+h.width/25*8.5;r.attr("transform","translate("+t+", "+e+") rotate(-45, "+s+", "+m+")")}}if(i.tag){const r=c.insert("polygon"),a=c.append("circle"),n=c.append("text").attr("y",m-16).attr("class","tag-label").text(i.tag);let l=n.node().getBBox();n.attr("x",o-l.width/2);const u=l.height/2,p=m-19.2;r.attr("class","tag-label-bkg").attr("points",`\n ${s-l.width/2-t/2},${p+e}\n ${s-l.width/2-t/2},${p-e}\n ${o-l.width/2-t},${p-u-e}\n ${o+l.width/2+t},${p-u-e}\n ${o+l.width/2+t},${p+u+e}\n ${o-l.width/2-t},${p+u+e}`),a.attr("cx",s-l.width/2+t/2).attr("cy",p).attr("r",1.5).attr("class","tag-hole"),"TB"===S&&(r.attr("class","tag-label-bkg").attr("points",`\n ${y},${s+e}\n ${y},${s-e}\n ${y+h},${s-u-e}\n ${y+h+l.width+t},${s-u-e}\n ${y+h+l.width+t},${s+u+e}\n ${y+h},${s+u+e}`).attr("transform","translate(12,12) rotate(45, "+y+","+s+")"),a.attr("cx",y+t/2).attr("cy",s).attr("transform","translate(12,12) rotate(45, "+y+","+s+")"),n.attr("x",y+5).attr("y",s+3).attr("transform","translate(14,14) rotate(45, "+y+","+s+")"))}}s+=50,s>C&&(C=s)}))},N=(t,e,r,i,a)=>{const n=("TB"===S?r.x{return(i=r).seq>t.seq&&i.seqt.branch===n)(r);var i}))},G=(t,e,r=0)=>{const i=t+Math.abs(t-e)/2;if(r>5)return i;if(O.every((t=>Math.abs(t-i)>=10)))return O.push(i),i;const a=Math.abs(t-e);return G(t,e-a/5,r+1)},H=(t,e)=>{const r=t.append("g").attr("class","commit-arrows");Object.keys(e).forEach((t=>{const i=e[t];i.parents&&i.parents.length>0&&i.parents.forEach((t=>{((t,e,r,i)=>{const a=R[e.id],n=R[r.id],c=N(e,r,a,n,i);let s,o="",l="",h=0,m=0,y=A[r.branch].index;if(r.type===v&&e.id!==r.parents[0]&&(y=A[e.branch].index),c){o="A 10 10, 0, 0, 0,",l="A 10 10, 0, 0, 1,",h=10,m=10;const t=a.yn.x&&(o="A 20 20, 0, 0, 0,",l="A 20 20, 0, 0, 1,",h=20,m=20,s=r.type===v&&e.id!==r.parents[0]?`M ${a.x} ${a.y} L ${a.x} ${n.y-h} ${l} ${a.x-m} ${n.y} L ${n.x} ${n.y}`:`M ${a.x} ${a.y} L ${n.x+h} ${a.y} ${o} ${n.x} ${a.y+m} L ${n.x} ${n.y}`),a.x===n.x&&(s=`M ${a.x} ${a.y} L ${n.x} ${n.y}`)):(a.yn.y&&(s=r.type===v&&e.id!==r.parents[0]?`M ${a.x} ${a.y} L ${n.x-h} ${a.y} ${o} ${n.x} ${a.y-m} L ${n.x} ${n.y}`:`M ${a.x} ${a.y} L ${a.x} ${n.y+h} ${l} ${a.x+m} ${n.y} L ${n.x} ${n.y}`),a.y===n.y&&(s=`M ${a.x} ${a.y} L ${n.x} ${n.y}`));t.append("path").attr("d",s).attr("class","arrow arrow"+y%8)})(r,e[t],i,e)}))}))},z={parser:c,db:T,renderer:{draw:function(t,e,r,n){A={},R={},w={},C=0,O=[],S="LR";const c=(0,i.c)(),s=c.gitGraph;i.l.debug("in gitgraph renderer",t+"\n","id:",e,r),w=n.db.getCommits();const o=n.db.getBranchesAsObjArray();S=n.db.getDirection();const l=(0,a.Ltv)(`[id="${e}"]`);let h=0;o.forEach(((t,e)=>{const r=P(t.name),i=l.append("g"),a=i.insert("g").attr("class","branchLabel"),n=a.insert("g").attr("class","label branch-label");n.node().appendChild(r);let c=r.getBBox();A[t.name]={pos:h,index:e},h+=50+(s.rotateCommitLabel?40:0)+("TB"===S?c.width/2:0),n.remove(),a.remove(),i.remove()})),B(l,w,!1),s.showBranches&&((t,e)=>{const r=(0,i.c)().gitGraph,a=t.append("g");e.forEach(((t,e)=>{const i=e%8,n=A[t.name].pos,c=a.append("line");c.attr("x1",0),c.attr("y1",n),c.attr("x2",C),c.attr("y2",n),c.attr("class","branch branch"+i),"TB"===S&&(c.attr("y1",30),c.attr("x1",n),c.attr("y2",C),c.attr("x2",n)),O.push(n);let s=t.name;const o=P(s),l=a.insert("rect"),h=a.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+i);h.node().appendChild(o);let m=o.getBBox();l.attr("class","branchLabelBkg label"+i).attr("rx",4).attr("ry",4).attr("x",-m.width-4-(!0===r.rotateCommitLabel?30:0)).attr("y",-m.height/2+8).attr("width",m.width+18).attr("height",m.height+4),h.attr("transform","translate("+(-m.width-14-(!0===r.rotateCommitLabel?30:0))+", "+(n-m.height/2-1)+")"),"TB"===S&&(l.attr("x",n-m.width/2-10).attr("y",0),h.attr("transform","translate("+(n-m.width/2-5)+", 0)")),"TB"!==S&&l.attr("transform","translate(-19, "+(n-m.height/2)+")")}))})(l,o),H(l,w),B(l,w,!0),i.u.insertTitle(l,"gitTitleText",s.titleTopMargin,n.db.getDiagramTitle()),(0,i.z)(void 0,l,s.diagramPadding,s.useMaxWidth??c.useMaxWidth)}},styles:t=>`\n .commit-id,\n .commit-msg,\n .branch-label {\n fill: lightgrey;\n color: lightgrey;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n ${[0,1,2,3,4,5,6,7].map((e=>`\n .branch-label${e} { fill: ${t["gitBranchLabel"+e]}; }\n .commit${e} { stroke: ${t["git"+e]}; fill: ${t["git"+e]}; }\n .commit-highlight${e} { stroke: ${t["gitInv"+e]}; fill: ${t["gitInv"+e]}; }\n .label${e} { fill: ${t["git"+e]}; }\n .arrow${e} { stroke: ${t["git"+e]}; }\n `)).join("\n")}\n\n .branch {\n stroke-width: 1;\n stroke: ${t.lineColor};\n stroke-dasharray: 2;\n }\n .commit-label { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelColor};}\n .commit-label-bkg { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelBackground}; opacity: 0.5; }\n .tag-label { font-size: ${t.tagLabelFontSize}; fill: ${t.tagLabelColor};}\n .tag-label-bkg { fill: ${t.tagLabelBackground}; stroke: ${t.tagLabelBorder}; }\n .tag-hole { fill: ${t.textColor}; }\n\n .commit-merge {\n stroke: ${t.primaryColor};\n fill: ${t.primaryColor};\n }\n .commit-reverse {\n stroke: ${t.primaryColor};\n fill: ${t.primaryColor};\n stroke-width: 3;\n }\n .commit-highlight-outer {\n }\n .commit-highlight-inner {\n stroke: ${t.primaryColor};\n fill: ${t.primaryColor};\n }\n\n .arrow { stroke-width: 8; stroke-linecap: round; fill: none}\n .gitTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n }\n`}}}]); \ No newline at end of file diff --git a/assets/js/4092.d8598acb.js b/assets/js/4092.d8598acb.js new file mode 100644 index 000000000000..ad7ca653aaa9 --- /dev/null +++ b/assets/js/4092.d8598acb.js @@ -0,0 +1 @@ +(self.webpackChunk=self.webpackChunk||[]).push([[4092],{97375:function(t){t.exports=function(){"use strict";return function(t,e){var n=e.prototype,i=n.format;n.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return i.bind(this)(t);var s=this.$utils(),r=(t||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(t){switch(t){case"Q":return Math.ceil((e.$M+1)/3);case"Do":return n.ordinal(e.$D);case"gggg":return e.weekYear();case"GGGG":return e.isoWeekYear();case"wo":return n.ordinal(e.week(),"W");case"w":case"ww":return s.s(e.week(),"w"===t?1:2,"0");case"W":case"WW":return s.s(e.isoWeek(),"W"===t?1:2,"0");case"k":case"kk":return s.s(String(0===e.$H?24:e.$H),"k"===t?1:2,"0");case"X":return Math.floor(e.$d.getTime()/1e3);case"x":return e.$d.getTime();case"z":return"["+e.offsetName()+"]";case"zzz":return"["+e.offsetName("long")+"]";default:return t}}));return i.bind(this)(r)}}}()},90445:function(t){t.exports=function(){"use strict";var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},e=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,i=/\d\d/,s=/\d\d?/,r=/\d*[^-_:/,()\s\d]+/,a={},o=function(t){return(t=+t)+(t>68?1900:2e3)},c=function(t){return function(e){this[t]=+e}},l=[/[+-]\d\d:?(\d\d)?|Z/,function(t){(this.zone||(this.zone={})).offset=function(t){if(!t)return 0;if("Z"===t)return 0;var e=t.match(/([+-]|\d\d)/g),n=60*e[1]+(+e[2]||0);return 0===n?0:"+"===e[0]?-n:n}(t)}],d=function(t){var e=a[t];return e&&(e.indexOf?e:e.s.concat(e.f))},u=function(t,e){var n,i=a.meridiem;if(i){for(var s=1;s<=24;s+=1)if(t.indexOf(i(s,0,e))>-1){n=s>12;break}}else n=t===(e?"pm":"PM");return n},h={A:[r,function(t){this.afternoon=u(t,!1)}],a:[r,function(t){this.afternoon=u(t,!0)}],Q:[n,function(t){this.month=3*(t-1)+1}],S:[n,function(t){this.milliseconds=100*+t}],SS:[i,function(t){this.milliseconds=10*+t}],SSS:[/\d{3}/,function(t){this.milliseconds=+t}],s:[s,c("seconds")],ss:[s,c("seconds")],m:[s,c("minutes")],mm:[s,c("minutes")],H:[s,c("hours")],h:[s,c("hours")],HH:[s,c("hours")],hh:[s,c("hours")],D:[s,c("day")],DD:[i,c("day")],Do:[r,function(t){var e=a.ordinal,n=t.match(/\d+/);if(this.day=n[0],e)for(var i=1;i<=31;i+=1)e(i).replace(/\[|\]/g,"")===t&&(this.day=i)}],w:[s,c("week")],ww:[i,c("week")],M:[s,c("month")],MM:[i,c("month")],MMM:[r,function(t){var e=d("months"),n=(d("monthsShort")||e.map((function(t){return t.slice(0,3)}))).indexOf(t)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[r,function(t){var e=d("months").indexOf(t)+1;if(e<1)throw new Error;this.month=e%12||e}],Y:[/[+-]?\d+/,c("year")],YY:[i,function(t){this.year=o(t)}],YYYY:[/\d{4}/,c("year")],Z:l,ZZ:l};function f(n){var i,s;i=n,s=a&&a.formats;for(var r=(n=i.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(e,n,i){var r=i&&i.toUpperCase();return n||s[i]||t[i]||s[r].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(t,e,n){return e||n.slice(1)}))}))).match(e),o=r.length,c=0;c-1)return new Date(("X"===e?1e3:1)*t);var s=f(e)(t),r=s.year,a=s.month,o=s.day,c=s.hours,l=s.minutes,d=s.seconds,u=s.milliseconds,h=s.zone,y=s.week,k=new Date,m=o||(r||a?1:k.getDate()),p=r||k.getFullYear(),g=0;r&&!a||(g=a>0?a-1:k.getMonth());var b,T=c||0,v=l||0,x=d||0,w=u||0;return h?new Date(Date.UTC(p,g,m,T,v,x,w+60*h.offset*1e3)):n?new Date(Date.UTC(p,g,m,T,v,x,w)):(b=new Date(p,g,m,T,v,x,w),y&&(b=i(b).week(y).toDate()),b)}catch(t){return new Date("")}}(e,o,i,n),this.init(),u&&!0!==u&&(this.$L=this.locale(u).$L),d&&e!=this.format(o)&&(this.$d=new Date("")),a={}}else if(o instanceof Array)for(var h=o.length,y=1;y<=h;y+=1){r[1]=o[y-1];var k=n.apply(this,r);if(k.isValid()){this.$d=k.$d,this.$L=k.$L,this.init();break}y===h&&(this.$d=new Date(""))}else s.call(this,t)}}}()},68313:function(t){t.exports=function(){"use strict";var t="day";return function(e,n,i){var s=function(e){return e.add(4-e.isoWeekday(),t)},r=n.prototype;r.isoWeekYear=function(){return s(this).year()},r.isoWeek=function(e){if(!this.$utils().u(e))return this.add(7*(e-this.isoWeek()),t);var n,r,a,o=s(this),c=(n=this.isoWeekYear(),a=4-(r=(this.$u?i.utc:i)().year(n).startOf("year")).isoWeekday(),r.isoWeekday()>4&&(a+=7),r.add(a,t));return o.diff(c,"week")+1},r.isoWeekday=function(t){return this.$utils().u(t)?this.day()||7:this.day(this.day()%7?t:t-7)};var a=r.startOf;r.startOf=function(t,e){var n=this.$utils(),i=!!n.u(e)||e;return"isoweek"===n.p(t)?i?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):a.bind(this)(t,e)}}}()},81711:(t,e,n)=>{"use strict";n.d(e,{diagram:()=>Yt});var i=n(85039),s=n(45567),r=n(16750),a=n(74353),o=n(68313),c=n(90445),l=n(97375),d=n(20007),u=function(){var t=(0,s.K2)((function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n}),"o"),e=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],n=[1,26],i=[1,27],r=[1,28],a=[1,29],o=[1,30],c=[1,31],l=[1,32],d=[1,33],u=[1,34],h=[1,9],f=[1,10],y=[1,11],k=[1,12],m=[1,13],p=[1,14],g=[1,15],b=[1,16],T=[1,19],v=[1,20],x=[1,21],w=[1,22],_=[1,23],D=[1,25],$=[1,35],C={trace:(0,s.K2)((function(){}),"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:(0,s.K2)((function(t,e,n,i,s,r,a){var o=r.length-1;switch(s){case 1:return r[o-1];case 2:case 6:case 7:this.$=[];break;case 3:r[o-1].push(r[o]),this.$=r[o-1];break;case 4:case 5:this.$=r[o];break;case 8:i.setWeekday("monday");break;case 9:i.setWeekday("tuesday");break;case 10:i.setWeekday("wednesday");break;case 11:i.setWeekday("thursday");break;case 12:i.setWeekday("friday");break;case 13:i.setWeekday("saturday");break;case 14:i.setWeekday("sunday");break;case 15:i.setWeekend("friday");break;case 16:i.setWeekend("saturday");break;case 17:i.setDateFormat(r[o].substr(11)),this.$=r[o].substr(11);break;case 18:i.enableInclusiveEndDates(),this.$=r[o].substr(18);break;case 19:i.TopAxis(),this.$=r[o].substr(8);break;case 20:i.setAxisFormat(r[o].substr(11)),this.$=r[o].substr(11);break;case 21:i.setTickInterval(r[o].substr(13)),this.$=r[o].substr(13);break;case 22:i.setExcludes(r[o].substr(9)),this.$=r[o].substr(9);break;case 23:i.setIncludes(r[o].substr(9)),this.$=r[o].substr(9);break;case 24:i.setTodayMarker(r[o].substr(12)),this.$=r[o].substr(12);break;case 27:i.setDiagramTitle(r[o].substr(6)),this.$=r[o].substr(6);break;case 28:this.$=r[o].trim(),i.setAccTitle(this.$);break;case 29:case 30:this.$=r[o].trim(),i.setAccDescription(this.$);break;case 31:i.addSection(r[o].substr(8)),this.$=r[o].substr(8);break;case 33:i.addTask(r[o-1],r[o]),this.$="task";break;case 34:this.$=r[o-1],i.setClickEvent(r[o-1],r[o],null);break;case 35:this.$=r[o-2],i.setClickEvent(r[o-2],r[o-1],r[o]);break;case 36:this.$=r[o-2],i.setClickEvent(r[o-2],r[o-1],null),i.setLink(r[o-2],r[o]);break;case 37:this.$=r[o-3],i.setClickEvent(r[o-3],r[o-2],r[o-1]),i.setLink(r[o-3],r[o]);break;case 38:this.$=r[o-2],i.setClickEvent(r[o-2],r[o],null),i.setLink(r[o-2],r[o-1]);break;case 39:this.$=r[o-3],i.setClickEvent(r[o-3],r[o-1],r[o]),i.setLink(r[o-3],r[o-2]);break;case 40:this.$=r[o-1],i.setLink(r[o-1],r[o]);break;case 41:case 47:this.$=r[o-1]+" "+r[o];break;case 42:case 43:case 45:this.$=r[o-2]+" "+r[o-1]+" "+r[o];break;case 44:case 46:this.$=r[o-3]+" "+r[o-2]+" "+r[o-1]+" "+r[o]}}),"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:n,13:i,14:r,15:a,16:o,17:c,18:l,19:18,20:d,21:u,22:h,23:f,24:y,25:k,26:m,27:p,28:g,29:b,30:T,31:v,33:x,35:w,36:_,37:24,38:D,40:$},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:36,11:17,12:n,13:i,14:r,15:a,16:o,17:c,18:l,19:18,20:d,21:u,22:h,23:f,24:y,25:k,26:m,27:p,28:g,29:b,30:T,31:v,33:x,35:w,36:_,37:24,38:D,40:$},t(e,[2,5]),t(e,[2,6]),t(e,[2,17]),t(e,[2,18]),t(e,[2,19]),t(e,[2,20]),t(e,[2,21]),t(e,[2,22]),t(e,[2,23]),t(e,[2,24]),t(e,[2,25]),t(e,[2,26]),t(e,[2,27]),{32:[1,37]},{34:[1,38]},t(e,[2,30]),t(e,[2,31]),t(e,[2,32]),{39:[1,39]},t(e,[2,8]),t(e,[2,9]),t(e,[2,10]),t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),{41:[1,40],43:[1,41]},t(e,[2,4]),t(e,[2,28]),t(e,[2,29]),t(e,[2,33]),t(e,[2,34],{42:[1,42],43:[1,43]}),t(e,[2,40],{41:[1,44]}),t(e,[2,35],{43:[1,45]}),t(e,[2,36]),t(e,[2,38],{42:[1,46]}),t(e,[2,37]),t(e,[2,39])],defaultActions:{},parseError:(0,s.K2)((function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)}),"parseError"),parse:(0,s.K2)((function(t){var e=this,n=[0],i=[],r=[null],a=[],o=this.table,c="",l=0,d=0,u=0,h=a.slice.call(arguments,1),f=Object.create(this.lexer),y={yy:{}};for(var k in this.yy)Object.prototype.hasOwnProperty.call(this.yy,k)&&(y.yy[k]=this.yy[k]);f.setInput(t,y.yy),y.yy.lexer=f,y.yy.parser=this,void 0===f.yylloc&&(f.yylloc={});var m=f.yylloc;a.push(m);var p=f.options&&f.options.ranges;function g(){var t;return"number"!=typeof(t=i.pop()||f.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,s.K2)((function(t){n.length=n.length-2*t,r.length=r.length-t,a.length=a.length-t}),"popStack"),(0,s.K2)(g,"lex");for(var b,T,v,x,w,_,D,$,C,S={};;){if(v=n[n.length-1],this.defaultActions[v]?x=this.defaultActions[v]:(null==b&&(b=g()),x=o[v]&&o[v][b]),void 0===x||!x.length||!x[0]){var K="";for(_ in C=[],o[v])this.terminals_[_]&&_>2&&C.push("'"+this.terminals_[_]+"'");K=f.showPosition?"Parse error on line "+(l+1)+":\n"+f.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(K,{text:f.match,token:this.terminals_[b]||b,line:f.yylineno,loc:m,expected:C})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+v+", token: "+b);switch(x[0]){case 1:n.push(b),r.push(f.yytext),a.push(f.yylloc),n.push(x[1]),b=null,T?(b=T,T=null):(d=f.yyleng,c=f.yytext,l=f.yylineno,m=f.yylloc,u>0&&u--);break;case 2:if(D=this.productions_[x[1]][1],S.$=r[r.length-D],S._$={first_line:a[a.length-(D||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(D||1)].first_column,last_column:a[a.length-1].last_column},p&&(S._$.range=[a[a.length-(D||1)].range[0],a[a.length-1].range[1]]),void 0!==(w=this.performAction.apply(S,[c,d,l,y.yy,x[1],r,a].concat(h))))return w;D&&(n=n.slice(0,-1*D*2),r=r.slice(0,-1*D),a=a.slice(0,-1*D)),n.push(this.productions_[x[1]][0]),r.push(S.$),a.push(S._$),$=o[n[n.length-2]][n[n.length-1]],n.push($);break;case 3:return!0}}return!0}),"parse")},S=function(){return{EOF:1,parseError:(0,s.K2)((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:(0,s.K2)((function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this}),"setInput"),input:(0,s.K2)((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t}),"input"),unput:(0,s.K2)((function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"unput"),more:(0,s.K2)((function(){return this._more=!0,this}),"more"),reject:(0,s.K2)((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:(0,s.K2)((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:(0,s.K2)((function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:(0,s.K2)((function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:(0,s.K2)((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:(0,s.K2)((function(t,e){var n,i,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var r in s)this[r]=s[r];return!1}return!1}),"test_match"),next:(0,s.K2)((function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),r=0;re[0].length)){if(e=n,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,s[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:(0,s.K2)((function(){var t=this.next();return t||this.lex()}),"lex"),begin:(0,s.K2)((function(t){this.conditionStack.push(t)}),"begin"),popState:(0,s.K2)((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:(0,s.K2)((function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules}),"_currentRules"),topState:(0,s.K2)((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:(0,s.K2)((function(t){this.begin(t)}),"pushState"),stateStackSize:(0,s.K2)((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,s.K2)((function(t,e,n,i){switch(n){case 0:return this.begin("open_directive"),"open_directive";case 1:return this.begin("acc_title"),31;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),33;case 4:return this.popState(),"acc_descr_value";case 5:this.begin("acc_descr_multiline");break;case 6:case 15:case 18:case 21:case 24:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:case 9:case 10:case 12:case 13:break;case 11:return 10;case 14:this.begin("href");break;case 16:return 43;case 17:this.begin("callbackname");break;case 19:this.popState(),this.begin("callbackargs");break;case 20:return 41;case 22:return 42;case 23:this.begin("click");break;case 25:return 40;case 26:return 4;case 27:return 22;case 28:return 23;case 29:return 24;case 30:return 25;case 31:return 26;case 32:return 28;case 33:return 27;case 34:return 29;case 35:return 12;case 36:return 13;case 37:return 14;case 38:return 15;case 39:return 16;case 40:return 17;case 41:return 18;case 42:return 20;case 43:return 21;case 44:return"date";case 45:return 30;case 46:return"accDescription";case 47:return 36;case 48:return 38;case 49:return 39;case 50:return":";case 51:return 6;case 52:return"INVALID"}}),"anonymous"),rules:[/^(?:%%\{)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:tickInterval\s[^#\n;]+)/i,/^(?:includes\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:weekday\s+monday\b)/i,/^(?:weekday\s+tuesday\b)/i,/^(?:weekday\s+wednesday\b)/i,/^(?:weekday\s+thursday\b)/i,/^(?:weekday\s+friday\b)/i,/^(?:weekday\s+saturday\b)/i,/^(?:weekday\s+sunday\b)/i,/^(?:weekend\s+friday\b)/i,/^(?:weekend\s+saturday\b)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accDescription\s[^#\n;]+)/i,/^(?:section\s[^\n]+)/i,/^(?:[^:\n]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},callbackargs:{rules:[21,22],inclusive:!1},callbackname:{rules:[18,19,20],inclusive:!1},href:{rules:[15,16],inclusive:!1},click:{rules:[24,25],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,17,23,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52],inclusive:!0}}}}();function K(){this.yy={}}return C.lexer=S,(0,s.K2)(K,"Parser"),K.prototype=C,C.Parser=K,new K}();u.parser=u;var h=u;a.extend(o),a.extend(c),a.extend(l);var f,y,k={friday:5,saturday:6},m="",p="",g=void 0,b="",T=[],v=[],x=new Map,w=[],_=[],D="",$="",C=["active","done","crit","milestone"],S=[],K=!1,E=!1,M="sunday",A="saturday",L=0,Y=(0,s.K2)((function(){w=[],_=[],D="",S=[],ht=0,f=void 0,y=void 0,mt=[],m="",p="",$="",g=void 0,b="",T=[],v=[],K=!1,E=!1,L=0,x=new Map,(0,s.IU)(),M="sunday",A="saturday"}),"clear"),I=(0,s.K2)((function(t){p=t}),"setAxisFormat"),W=(0,s.K2)((function(){return p}),"getAxisFormat"),F=(0,s.K2)((function(t){g=t}),"setTickInterval"),O=(0,s.K2)((function(){return g}),"getTickInterval"),P=(0,s.K2)((function(t){b=t}),"setTodayMarker"),B=(0,s.K2)((function(){return b}),"getTodayMarker"),z=(0,s.K2)((function(t){m=t}),"setDateFormat"),N=(0,s.K2)((function(){K=!0}),"enableInclusiveEndDates"),G=(0,s.K2)((function(){return K}),"endDatesAreInclusive"),H=(0,s.K2)((function(){E=!0}),"enableTopAxis"),R=(0,s.K2)((function(){return E}),"topAxisEnabled"),j=(0,s.K2)((function(t){$=t}),"setDisplayMode"),U=(0,s.K2)((function(){return $}),"getDisplayMode"),V=(0,s.K2)((function(){return m}),"getDateFormat"),Z=(0,s.K2)((function(t){T=t.toLowerCase().split(/[\s,]+/)}),"setIncludes"),X=(0,s.K2)((function(){return T}),"getIncludes"),q=(0,s.K2)((function(t){v=t.toLowerCase().split(/[\s,]+/)}),"setExcludes"),Q=(0,s.K2)((function(){return v}),"getExcludes"),J=(0,s.K2)((function(){return x}),"getLinks"),tt=(0,s.K2)((function(t){D=t,w.push(t)}),"addSection"),et=(0,s.K2)((function(){return w}),"getSections"),nt=(0,s.K2)((function(){let t=vt();let e=0;for(;!t&&e<10;)t=vt(),e++;return _=mt}),"getTasks"),it=(0,s.K2)((function(t,e,n,i){return!i.includes(t.format(e.trim()))&&(!(!n.includes("weekends")||t.isoWeekday()!==k[A]&&t.isoWeekday()!==k[A]+1)||(!!n.includes(t.format("dddd").toLowerCase())||n.includes(t.format(e.trim()))))}),"isInvalidDate"),st=(0,s.K2)((function(t){M=t}),"setWeekday"),rt=(0,s.K2)((function(){return M}),"getWeekday"),at=(0,s.K2)((function(t){A=t}),"setWeekend"),ot=(0,s.K2)((function(t,e,n,i){if(!n.length||t.manualEndTime)return;let s,r;s=t.startTime instanceof Date?a(t.startTime):a(t.startTime,e,!0),s=s.add(1,"d"),r=t.endTime instanceof Date?a(t.endTime):a(t.endTime,e,!0);const[o,c]=ct(s,r,e,n,i);t.endTime=o.toDate(),t.renderEndTime=c}),"checkTaskDates"),ct=(0,s.K2)((function(t,e,n,i,s){let r=!1,a=null;for(;t<=e;)r||(a=e.toDate()),r=it(t,n,i,s),r&&(e=e.add(1,"d")),t=t.add(1,"d");return[e,a]}),"fixTaskDates"),lt=(0,s.K2)((function(t,e,n){n=n.trim();const i=/^after\s+(?[\d\w- ]+)/.exec(n);if(null!==i){let t=null;for(const n of i.groups.ids.split(" ")){let e=bt(n);void 0!==e&&(!t||e.endTime>t.endTime)&&(t=e)}if(t)return t.endTime;const e=new Date;return e.setHours(0,0,0,0),e}let r=a(n,e.trim(),!0);if(r.isValid())return r.toDate();{s.Rm.debug("Invalid date:"+n),s.Rm.debug("With date format:"+e.trim());const t=new Date(n);if(void 0===t||isNaN(t.getTime())||t.getFullYear()<-1e4||t.getFullYear()>1e4)throw new Error("Invalid date:"+n);return t}}),"getStartDate"),dt=(0,s.K2)((function(t){const e=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(t.trim());return null!==e?[Number.parseFloat(e[1]),e[2]]:[NaN,"ms"]}),"parseDuration"),ut=(0,s.K2)((function(t,e,n,i=!1){n=n.trim();const s=/^until\s+(?[\d\w- ]+)/.exec(n);if(null!==s){let t=null;for(const n of s.groups.ids.split(" ")){let e=bt(n);void 0!==e&&(!t||e.startTime{window.open(n,"_self")})),x.set(t,n))})),wt(t,"clickable")}),"setLink"),wt=(0,s.K2)((function(t,e){t.split(",").forEach((function(t){let n=bt(t);void 0!==n&&n.classes.push(e)}))}),"setClass"),_t=(0,s.K2)((function(t,e,n){if("loose"!==(0,s.D7)().securityLevel)return;if(void 0===e)return;let r=[];if("string"==typeof n){r=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let t=0;t{i._K.runFunc(e,...r)}))}),"setClickFun"),Dt=(0,s.K2)((function(t,e){S.push((function(){const n=document.querySelector(`[id="${t}"]`);null!==n&&n.addEventListener("click",(function(){e()}))}),(function(){const n=document.querySelector(`[id="${t}-text"]`);null!==n&&n.addEventListener("click",(function(){e()}))}))}),"pushFun"),$t=(0,s.K2)((function(t,e,n){t.split(",").forEach((function(t){_t(t,e,n)})),wt(t,"clickable")}),"setClickEvent"),Ct=(0,s.K2)((function(t){S.forEach((function(e){e(t)}))}),"bindFunctions"),St={getConfig:(0,s.K2)((()=>(0,s.D7)().gantt),"getConfig"),clear:Y,setDateFormat:z,getDateFormat:V,enableInclusiveEndDates:N,endDatesAreInclusive:G,enableTopAxis:H,topAxisEnabled:R,setAxisFormat:I,getAxisFormat:W,setTickInterval:F,getTickInterval:O,setTodayMarker:P,getTodayMarker:B,setAccTitle:s.SV,getAccTitle:s.iN,setDiagramTitle:s.ke,getDiagramTitle:s.ab,setDisplayMode:j,getDisplayMode:U,setAccDescription:s.EI,getAccDescription:s.m7,addSection:tt,getSections:et,getTasks:nt,addTask:gt,findTaskById:bt,addTaskOrg:Tt,setIncludes:Z,getIncludes:X,setExcludes:q,getExcludes:Q,setClickEvent:$t,setLink:xt,getLinks:J,bindFunctions:Ct,parseDuration:dt,isInvalidDate:it,setWeekday:st,getWeekday:rt,setWeekend:at};function Kt(t,e,n){let i=!0;for(;i;)i=!1,n.forEach((function(n){const s=new RegExp("^\\s*"+n+"\\s*$");t[0].match(s)&&(e[n]=!0,t.shift(1),i=!0)}))}(0,s.K2)(Kt,"getTaskTags");var Et,Mt=(0,s.K2)((function(){s.Rm.debug("Something is calling, setConf, remove the call")}),"setConf"),At={monday:d.ABi,tuesday:d.PGu,wednesday:d.GuW,thursday:d.Mol,friday:d.TUC,saturday:d.rGn,sunday:d.YPH},Lt=(0,s.K2)(((t,e)=>{let n=[...t].map((()=>-1/0)),i=[...t].sort(((t,e)=>t.startTime-e.startTime||t.order-e.order)),s=0;for(const r of i)for(let t=0;t=n[t]){n[t]=r.endTime,r.order=t+e,t>s&&(s=t);break}return s}),"getMaxIntersections"),Yt={parser:h,db:St,renderer:{setConf:Mt,draw:(0,s.K2)((function(t,e,n,i){const r=(0,s.D7)().gantt,o=(0,s.D7)().securityLevel;let c;"sandbox"===o&&(c=(0,d.Ltv)("#i"+e));const l="sandbox"===o?(0,d.Ltv)(c.nodes()[0].contentDocument.body):(0,d.Ltv)("body"),u="sandbox"===o?c.nodes()[0].contentDocument:document,h=u.getElementById(e);void 0===(Et=h.parentElement.offsetWidth)&&(Et=1200),void 0!==r.useWidth&&(Et=r.useWidth);const f=i.db.getTasks();let y=[];for(const s of f)y.push(s.type);y=$(y);const k={};let m=2*r.topPadding;if("compact"===i.db.getDisplayMode()||"compact"===r.displayMode){const t={};for(const n of f)void 0===t[n.section]?t[n.section]=[n]:t[n.section].push(n);let e=0;for(const n of Object.keys(t)){const i=Lt(t[n],e)+1;e+=i,m+=i*(r.barHeight+r.barGap),k[n]=i}}else{m+=f.length*(r.barHeight+r.barGap);for(const t of y)k[t]=f.filter((e=>e.type===t)).length}h.setAttribute("viewBox","0 0 "+Et+" "+m);const p=l.select(`[id="${e}"]`),g=(0,d.w7C)().domain([(0,d.jkA)(f,(function(t){return t.startTime})),(0,d.T9B)(f,(function(t){return t.endTime}))]).rangeRound([0,Et-r.leftPadding-r.rightPadding]);function b(t,e){const n=t.startTime,i=e.startTime;let s=0;return n>i?s=1:nt.order)))].map((e=>t.find((t=>t.order===e))));p.append("g").selectAll("rect").data(h).enter().append("rect").attr("x",0).attr("y",(function(t,e){return t.order*n+a-2})).attr("width",(function(){return u-r.rightPadding/2})).attr("height",n).attr("class",(function(t){for(const[e,n]of y.entries())if(t.type===n)return"section section"+e%r.numberSectionStyles;return"section section0"}));const f=p.append("g").selectAll("rect").data(t).enter(),k=i.db.getLinks();f.append("rect").attr("id",(function(t){return t.id})).attr("rx",3).attr("ry",3).attr("x",(function(t){return t.milestone?g(t.startTime)+o+.5*(g(t.endTime)-g(t.startTime))-.5*c:g(t.startTime)+o})).attr("y",(function(t,e){return t.order*n+a})).attr("width",(function(t){return t.milestone?c:g(t.renderEndTime||t.endTime)-g(t.startTime)})).attr("height",c).attr("transform-origin",(function(t,e){return e=t.order,(g(t.startTime)+o+.5*(g(t.endTime)-g(t.startTime))).toString()+"px "+(e*n+a+.5*c).toString()+"px"})).attr("class",(function(t){let e="";t.classes.length>0&&(e=t.classes.join(" "));let n=0;for(const[s,a]of y.entries())t.type===a&&(n=s%r.numberSectionStyles);let i="";return t.active?t.crit?i+=" activeCrit":i=" active":t.done?i=t.crit?" doneCrit":" done":t.crit&&(i+=" crit"),0===i.length&&(i=" task"),t.milestone&&(i=" milestone "+i),i+=n,i+=" "+e,"task"+i})),f.append("text").attr("id",(function(t){return t.id+"-text"})).text((function(t){return t.task})).attr("font-size",r.fontSize).attr("x",(function(t){let e=g(t.startTime),n=g(t.renderEndTime||t.endTime);t.milestone&&(e+=.5*(g(t.endTime)-g(t.startTime))-.5*c),t.milestone&&(n=e+c);const i=this.getBBox().width;return i>n-e?n+i+1.5*r.leftPadding>u?e+o-5:n+o+5:(n-e)/2+e+o})).attr("y",(function(t,e){return t.order*n+r.barHeight/2+(r.fontSize/2-2)+a})).attr("text-height",c).attr("class",(function(t){const e=g(t.startTime);let n=g(t.endTime);t.milestone&&(n=e+c);const i=this.getBBox().width;let s="";t.classes.length>0&&(s=t.classes.join(" "));let a=0;for(const[c,l]of y.entries())t.type===l&&(a=c%r.numberSectionStyles);let o="";return t.active&&(o=t.crit?"activeCritText"+a:"activeText"+a),t.done?o=t.crit?o+" doneCritText"+a:o+" doneText"+a:t.crit&&(o=o+" critText"+a),t.milestone&&(o+=" milestoneText"),i>n-e?n+i+1.5*r.leftPadding>u?s+" taskTextOutsideLeft taskTextOutside"+a+" "+o:s+" taskTextOutsideRight taskTextOutside"+a+" "+o+" width-"+i:s+" taskText taskText"+a+" "+o+" width-"+i}));if("sandbox"===(0,s.D7)().securityLevel){let t;t=(0,d.Ltv)("#i"+e);const n=t.nodes()[0].contentDocument;f.filter((function(t){return k.has(t.id)})).each((function(t){var e=n.querySelector("#"+t.id),i=n.querySelector("#"+t.id+"-text");const s=e.parentNode;var r=n.createElement("a");r.setAttribute("xlink:href",k.get(t.id)),r.setAttribute("target","_top"),s.appendChild(r),r.appendChild(e),r.appendChild(i)}))}}function x(t,e,n,o,c,l,d,u){if(0===d.length&&0===u.length)return;let h,f;for(const{startTime:i,endTime:s}of l)(void 0===h||if)&&(f=s);if(!h||!f)return;if(a(f).diff(a(h),"year")>5)return void s.Rm.warn("The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days.");const y=i.db.getDateFormat(),k=[];let m=null,b=a(h);for(;b.valueOf()<=f;)i.db.isInvalidDate(b,y,d,u)?m?m.end=b:m={start:b,end:b}:m&&(k.push(m),m=null),b=b.add(1,"d");p.append("g").selectAll("rect").data(k).enter().append("rect").attr("id",(function(t){return"exclude-"+t.start.format("YYYY-MM-DD")})).attr("x",(function(t){return g(t.start)+n})).attr("y",r.gridLineStartPadding).attr("width",(function(t){const e=t.end.add(1,"day");return g(e)-g(t.start)})).attr("height",c-e-r.gridLineStartPadding).attr("transform-origin",(function(e,i){return(g(e.start)+n+.5*(g(e.end)-g(e.start))).toString()+"px "+(i*t+.5*c).toString()+"px"})).attr("class","exclude-range")}function w(t,e,n,s){let a=(0,d.l78)(g).tickSize(-s+e+r.gridLineStartPadding).tickFormat((0,d.DCK)(i.db.getAxisFormat()||r.axisFormat||"%Y-%m-%d"));const o=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(i.db.getTickInterval()||r.tickInterval);if(null!==o){const t=o[1],e=o[2],n=i.db.getWeekday()||r.weekday;switch(e){case"millisecond":a.ticks(d.t6C.every(t));break;case"second":a.ticks(d.ucG.every(t));break;case"minute":a.ticks(d.wXd.every(t));break;case"hour":a.ticks(d.Agd.every(t));break;case"day":a.ticks(d.UAC.every(t));break;case"week":a.ticks(At[n].every(t));break;case"month":a.ticks(d.Ui6.every(t))}}if(p.append("g").attr("class","grid").attr("transform","translate("+t+", "+(s-50)+")").call(a).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),i.db.topAxisEnabled()||r.topAxis){let n=(0,d.tlR)(g).tickSize(-s+e+r.gridLineStartPadding).tickFormat((0,d.DCK)(i.db.getAxisFormat()||r.axisFormat||"%Y-%m-%d"));if(null!==o){const t=o[1],e=o[2],s=i.db.getWeekday()||r.weekday;switch(e){case"millisecond":n.ticks(d.t6C.every(t));break;case"second":n.ticks(d.ucG.every(t));break;case"minute":n.ticks(d.wXd.every(t));break;case"hour":n.ticks(d.Agd.every(t));break;case"day":n.ticks(d.UAC.every(t));break;case"week":n.ticks(At[s].every(t));break;case"month":n.ticks(d.Ui6.every(t))}}p.append("g").attr("class","grid").attr("transform","translate("+t+", "+e+")").call(n).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}function _(t,e){let n=0;const i=Object.keys(k).map((t=>[t,k[t]]));p.append("g").selectAll("text").data(i).enter().append((function(t){const e=t[0].split(s.Y2.lineBreakRegex),n=-(e.length-1)/2,i=u.createElementNS("http://www.w3.org/2000/svg","text");i.setAttribute("dy",n+"em");for(const[s,r]of e.entries()){const t=u.createElementNS("http://www.w3.org/2000/svg","tspan");t.setAttribute("alignment-baseline","central"),t.setAttribute("x","10"),s>0&&t.setAttribute("dy","1em"),t.textContent=r,i.appendChild(t)}return i})).attr("x",10).attr("y",(function(s,r){if(!(r>0))return s[1]*t/2+e;for(let a=0;a`\n .mermaid-main-font {\n font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);\n }\n\n .exclude-range {\n fill: ${t.excludeBkgColor};\n }\n\n .section {\n stroke: none;\n opacity: 0.2;\n }\n\n .section0 {\n fill: ${t.sectionBkgColor};\n }\n\n .section2 {\n fill: ${t.sectionBkgColor2};\n }\n\n .section1,\n .section3 {\n fill: ${t.altSectionBkgColor};\n opacity: 0.2;\n }\n\n .sectionTitle0 {\n fill: ${t.titleColor};\n }\n\n .sectionTitle1 {\n fill: ${t.titleColor};\n }\n\n .sectionTitle2 {\n fill: ${t.titleColor};\n }\n\n .sectionTitle3 {\n fill: ${t.titleColor};\n }\n\n .sectionTitle {\n text-anchor: start;\n font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);\n }\n\n\n /* Grid and axis */\n\n .grid .tick {\n stroke: ${t.gridColor};\n opacity: 0.8;\n shape-rendering: crispEdges;\n }\n\n .grid .tick text {\n font-family: ${t.fontFamily};\n fill: ${t.textColor};\n }\n\n .grid path {\n stroke-width: 0;\n }\n\n\n /* Today line */\n\n .today {\n fill: none;\n stroke: ${t.todayLineColor};\n stroke-width: 2px;\n }\n\n\n /* Task styling */\n\n /* Default task */\n\n .task {\n stroke-width: 2;\n }\n\n .taskText {\n text-anchor: middle;\n font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);\n }\n\n .taskTextOutsideRight {\n fill: ${t.taskTextDarkColor};\n text-anchor: start;\n font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);\n }\n\n .taskTextOutsideLeft {\n fill: ${t.taskTextDarkColor};\n text-anchor: end;\n }\n\n\n /* Special case clickable */\n\n .task.clickable {\n cursor: pointer;\n }\n\n .taskText.clickable {\n cursor: pointer;\n fill: ${t.taskTextClickableColor} !important;\n font-weight: bold;\n }\n\n .taskTextOutsideLeft.clickable {\n cursor: pointer;\n fill: ${t.taskTextClickableColor} !important;\n font-weight: bold;\n }\n\n .taskTextOutsideRight.clickable {\n cursor: pointer;\n fill: ${t.taskTextClickableColor} !important;\n font-weight: bold;\n }\n\n\n /* Specific task settings for the sections*/\n\n .taskText0,\n .taskText1,\n .taskText2,\n .taskText3 {\n fill: ${t.taskTextColor};\n }\n\n .task0,\n .task1,\n .task2,\n .task3 {\n fill: ${t.taskBkgColor};\n stroke: ${t.taskBorderColor};\n }\n\n .taskTextOutside0,\n .taskTextOutside2\n {\n fill: ${t.taskTextOutsideColor};\n }\n\n .taskTextOutside1,\n .taskTextOutside3 {\n fill: ${t.taskTextOutsideColor};\n }\n\n\n /* Active task */\n\n .active0,\n .active1,\n .active2,\n .active3 {\n fill: ${t.activeTaskBkgColor};\n stroke: ${t.activeTaskBorderColor};\n }\n\n .activeText0,\n .activeText1,\n .activeText2,\n .activeText3 {\n fill: ${t.taskTextDarkColor} !important;\n }\n\n\n /* Completed task */\n\n .done0,\n .done1,\n .done2,\n .done3 {\n stroke: ${t.doneTaskBorderColor};\n fill: ${t.doneTaskBkgColor};\n stroke-width: 2;\n }\n\n .doneText0,\n .doneText1,\n .doneText2,\n .doneText3 {\n fill: ${t.taskTextDarkColor} !important;\n }\n\n\n /* Tasks on the critical line */\n\n .crit0,\n .crit1,\n .crit2,\n .crit3 {\n stroke: ${t.critBorderColor};\n fill: ${t.critBkgColor};\n stroke-width: 2;\n }\n\n .activeCrit0,\n .activeCrit1,\n .activeCrit2,\n .activeCrit3 {\n stroke: ${t.critBorderColor};\n fill: ${t.activeTaskBkgColor};\n stroke-width: 2;\n }\n\n .doneCrit0,\n .doneCrit1,\n .doneCrit2,\n .doneCrit3 {\n stroke: ${t.critBorderColor};\n fill: ${t.doneTaskBkgColor};\n stroke-width: 2;\n cursor: pointer;\n shape-rendering: crispEdges;\n }\n\n .milestone {\n transform: rotate(45deg) scale(0.8,0.8);\n }\n\n .milestoneText {\n font-style: italic;\n }\n .doneCritText0,\n .doneCritText1,\n .doneCritText2,\n .doneCritText3 {\n fill: ${t.taskTextDarkColor} !important;\n }\n\n .activeCritText0,\n .activeCritText1,\n .activeCritText2,\n .activeCritText3 {\n fill: ${t.taskTextDarkColor} !important;\n }\n\n .titleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.titleColor||t.textColor};\n font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);\n }\n`),"getStyles")}}}]); \ No newline at end of file diff --git a/assets/js/4104.03d9336c.js b/assets/js/4104.03d9336c.js deleted file mode 100644 index 3628b7f3de22..000000000000 --- a/assets/js/4104.03d9336c.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk=self.webpackChunk||[]).push([[4104],{62954:(n,t,e)=>{n.exports=function(){function n(t,e,i){function r(a,o){if(!e[a]){if(!t[a]){if(c)return c(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var s=e[a]={exports:{}};t[a][0].call(s.exports,(function(n){return r(t[a][1][n]||n)}),s,s.exports,n,t,e,i)}return e[a].exports}for(var c=void 0,a=0;a0&&void 0!==arguments[0]?arguments[0]:{},i=e.defaultLayoutOptions,c=void 0===i?{}:i,o=e.algorithms,u=void 0===o?["layered","stress","mrtree","radial","force","disco","sporeOverlap","sporeCompaction","rectpacking"]:o,s=e.workerFactory,h=e.workerUrl;if(r(this,n),this.defaultLayoutOptions=c,this.initialized=!1,void 0===h&&void 0===s)throw new Error("Cannot construct an ELK without both 'workerUrl' and 'workerFactory'.");var f=s;void 0!==h&&void 0===s&&(f=function(n){return new Worker(n)});var l=f(h);if("function"!=typeof l.postMessage)throw new TypeError("Created worker does not provide the required 'postMessage' function.");this.worker=new a(l),this.worker.postMessage({cmd:"register",algorithms:u}).then((function(n){return t.initialized=!0})).catch(console.err)}return i(n,[{key:"layout",value:function(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=t.layoutOptions,i=void 0===e?this.defaultLayoutOptions:e,r=t.logging,c=void 0!==r&&r,a=t.measureExecutionTime,o=void 0!==a&&a;return n?this.worker.postMessage({cmd:"layout",graph:n,layoutOptions:i,options:{logging:c,measureExecutionTime:o}}):Promise.reject(new Error("Missing mandatory parameter 'graph'."))}},{key:"knownLayoutAlgorithms",value:function(){return this.worker.postMessage({cmd:"algorithms"})}},{key:"knownLayoutOptions",value:function(){return this.worker.postMessage({cmd:"options"})}},{key:"knownLayoutCategories",value:function(){return this.worker.postMessage({cmd:"categories"})}},{key:"terminateWorker",value:function(){this.worker&&this.worker.terminate()}}]),n}();e.default=c;var a=function(){function n(t){var e=this;if(r(this,n),void 0===t)throw new Error("Missing mandatory parameter 'worker'.");this.resolvers={},this.worker=t,this.worker.onmessage=function(n){setTimeout((function(){e.receive(e,n)}),0)}}return i(n,[{key:"postMessage",value:function(n){var t=this.id||0;this.id=t+1,n.id=t;var e=this;return new Promise((function(i,r){e.resolvers[t]=function(n,t){n?(e.convertGwtStyleError(n),r(n)):i(t)},e.worker.postMessage(n)}))}},{key:"receive",value:function(n,t){var e=t.data,i=n.resolvers[e.id];i&&(delete n.resolvers[e.id],e.error?i(e.error):i(null,e.data))}},{key:"terminate",value:function(){this.worker&&this.worker.terminate()}},{key:"convertGwtStyleError",value:function(n){if(n){var t=n.__java$exception;t&&(t.cause&&t.cause.backingJsObject&&(n.cause=t.cause.backingJsObject,this.convertGwtStyleError(n.cause)),delete n.__java$exception)}}}]),n}()},{}],2:[function(n,t,i){(function(n){(function(){"use strict";var e;function r(){}function c(){}function a(){}function o(){}function u(){}function s(){}function h(){}function f(){}function l(){}function b(){}function w(){}function d(){}function g(){}function p(){}function m(){}function v(){}function k(){}function y(){}function M(){}function T(){}function j(){}function E(){}function S(){}function P(){}function C(){}function I(){}function O(){}function A(){}function L(){}function N(){}function $(){}function D(){}function x(){}function R(){}function K(){}function F(){}function _(){}function B(){}function H(){}function U(){}function G(){}function q(){}function X(){}function z(){}function V(){}function W(){}function Q(){}function J(){}function Y(){}function Z(){}function nn(){}function tn(){}function en(){}function rn(){}function cn(){}function an(){}function on(){}function un(){}function sn(){}function hn(){}function fn(){}function ln(){}function bn(){}function wn(){}function dn(){}function gn(){}function pn(){}function mn(){}function vn(){}function kn(){}function yn(){}function Mn(){}function Tn(){}function jn(){}function En(){}function Sn(){}function Pn(){}function Cn(){}function In(){}function On(){}function An(){}function Ln(){}function Nn(){}function $n(){}function Dn(){}function xn(){}function Rn(){}function Kn(){}function Fn(){}function _n(){}function Bn(){}function Hn(){}function Un(){}function Gn(){}function qn(){}function Xn(){}function zn(){}function Vn(){}function Wn(){}function Qn(){}function Jn(){}function Yn(){}function Zn(){}function nt(){}function tt(){}function et(){}function it(){}function rt(){}function ct(){}function at(){}function ot(){}function ut(){}function st(){}function ht(){}function ft(){}function lt(){}function bt(){}function wt(){}function dt(){}function gt(){}function pt(){}function mt(){}function vt(){}function kt(){}function yt(){}function Mt(){}function Tt(){}function jt(){}function Et(){}function St(){}function Pt(){}function Ct(){}function It(){}function Ot(){}function At(){}function Lt(){}function Nt(){}function $t(){}function Dt(){}function xt(){}function Rt(){}function Kt(){}function Ft(){}function _t(){}function Bt(){}function Ht(){}function Ut(){}function Gt(){}function qt(){}function Xt(){}function zt(){}function Vt(){}function Wt(){}function Qt(){}function Jt(){}function Yt(){}function Zt(){}function ne(){}function te(){}function ee(){}function ie(){}function re(){}function ce(){}function ae(){}function oe(){}function ue(){}function se(){}function he(){}function fe(){}function le(){}function be(){}function we(){}function de(){}function ge(){}function pe(){}function me(){}function ve(){}function ke(){}function ye(){}function Me(){}function Te(){}function je(){}function Ee(){}function Se(){}function Pe(){}function Ce(){}function Ie(){}function Oe(){}function Ae(){}function Le(){}function Ne(){}function $e(){}function De(){}function xe(){}function Re(){}function Ke(){}function Fe(){}function _e(){}function Be(){}function He(){}function Ue(){}function Ge(){}function qe(){}function Xe(){}function ze(){}function Ve(){}function We(){}function Qe(){}function Je(){}function Ye(){}function Ze(){}function ni(){}function ti(){}function ei(){}function ii(){}function ri(){}function ci(){}function ai(){}function oi(){}function ui(){}function si(){}function hi(){}function fi(){}function li(){}function bi(){}function wi(){}function di(){}function gi(){}function pi(){}function mi(){}function vi(){}function ki(){}function yi(){}function Mi(){}function Ti(){}function ji(){}function Ei(){}function Si(){}function Pi(){}function Ci(){}function Ii(){}function Oi(){}function Ai(){}function Li(){}function Ni(){}function $i(){}function Di(){}function xi(){}function Ri(){}function Ki(){}function Fi(){}function _i(){}function Bi(){}function Hi(){}function Ui(){}function Gi(){}function qi(){}function Xi(){}function zi(){}function Vi(){}function Wi(){}function Qi(){}function Ji(){}function Yi(){}function Zi(){}function nr(){}function tr(){}function er(){}function ir(){}function rr(){}function cr(){}function ar(){}function or(){}function ur(){}function sr(){}function hr(){}function fr(){}function lr(){}function br(){}function wr(){}function dr(){}function gr(){}function pr(){}function mr(){}function vr(){}function kr(){}function yr(){}function Mr(){}function Tr(){}function jr(){}function Er(){}function Sr(){}function Pr(){}function Cr(){}function Ir(){}function Or(){}function Ar(){}function Lr(){}function Nr(){}function $r(){}function Dr(){}function xr(){}function Rr(){}function Kr(){}function Fr(){}function _r(){}function Br(){}function Hr(){}function Ur(){}function Gr(){}function qr(){}function Xr(){}function zr(){}function Vr(){}function Wr(){}function Qr(){}function Jr(){}function Yr(){}function Zr(){}function nc(){}function tc(){}function ec(){}function ic(){}function rc(){}function cc(){}function ac(){}function oc(){}function uc(){}function sc(){}function hc(){}function fc(){}function lc(){}function bc(){}function wc(){}function dc(){}function gc(){}function pc(){}function mc(){}function vc(){}function kc(){}function yc(){}function Mc(){}function Tc(){}function jc(){}function Ec(){}function Sc(){}function Pc(){}function Cc(){}function Ic(){}function Oc(){}function Ac(){}function Lc(){}function Nc(){}function $c(){}function Dc(){}function xc(){}function Rc(){}function Kc(){}function Fc(){}function _c(){}function Bc(){}function Hc(){}function Uc(){}function Gc(){}function qc(){}function Xc(){}function zc(){}function Vc(){}function Wc(){}function Qc(){}function Jc(){}function Yc(){}function Zc(){}function na(){}function ta(){}function ea(){}function ia(){}function ra(){}function ca(){}function aa(){}function oa(){}function ua(){}function sa(){}function ha(){}function fa(){}function la(){}function ba(){}function wa(){}function da(){}function ga(){}function pa(){}function ma(){}function va(){}function ka(){}function ya(){}function Ma(){}function Ta(){}function ja(){}function Ea(){}function Sa(){}function Pa(){}function Ca(){}function Ia(){}function Oa(){}function Aa(){}function La(){}function Na(){}function $a(){}function Da(){}function xa(){}function Ra(){}function Ka(){}function Fa(){}function _a(){}function Ba(){}function Ha(){}function Ua(){}function Ga(){}function qa(){}function Xa(){}function za(){}function Va(){}function Wa(){}function Qa(){}function Ja(){}function Ya(){}function Za(){}function no(){}function to(){}function eo(){}function io(){}function ro(){}function co(){}function ao(){}function oo(){}function uo(){}function so(){}function ho(){}function fo(){}function lo(){}function bo(){}function wo(){}function go(){}function po(){}function mo(){}function vo(){}function ko(){}function yo(){}function Mo(){}function To(){}function jo(){}function Eo(){}function So(){}function Po(){}function Co(){}function Io(){}function Oo(){}function Ao(){}function Lo(){}function No(){}function $o(){}function Do(){}function xo(){}function Ro(){}function Ko(){}function Fo(){}function _o(){}function Bo(){}function Ho(){}function Uo(){}function Go(){}function qo(){}function Xo(){}function zo(){}function Vo(){}function Wo(){}function Qo(){}function Jo(){}function Yo(){}function Zo(){}function nu(){}function tu(){}function eu(){}function iu(){}function ru(){}function cu(){}function au(){}function ou(){}function uu(){}function su(){}function hu(){}function fu(){}function lu(){}function bu(){}function wu(){}function du(){}function gu(){}function pu(){}function mu(){}function vu(){}function ku(){}function yu(){}function Mu(){}function Tu(){}function ju(){}function Eu(){}function Su(){}function Pu(){}function Cu(){}function Iu(){}function Ou(){}function Au(){}function Lu(){}function Nu(){}function $u(){}function Du(){}function xu(){}function Ru(){}function Ku(){}function Fu(){}function _u(){}function Bu(){}function Hu(){}function Uu(){}function Gu(){}function qu(){}function Xu(){}function zu(){}function Vu(){}function Wu(){}function Qu(){}function Ju(){}function Yu(){}function Zu(){}function ns(){}function ts(){}function es(){}function is(){}function rs(){}function cs(){}function as(){}function os(){}function us(){}function ss(){}function hs(){}function fs(){}function ls(){}function bs(){}function ws(){}function ds(){}function gs(){}function ps(){}function ms(){}function vs(){}function ks(){}function ys(){}function Ms(){}function Ts(){}function js(){}function Es(){}function Ss(){}function Ps(){}function Cs(){}function Is(){}function Os(){}function As(){}function Ls(){}function Ns(){}function $s(){}function Ds(){}function xs(){}function Rs(){}function Ks(){}function Fs(){}function _s(){}function Bs(){}function Hs(){}function Us(){}function Gs(){}function qs(){}function Xs(){}function zs(){}function Vs(){}function Ws(){}function Qs(){}function Js(){}function Ys(){}function Zs(){}function nh(){}function th(){}function eh(){}function ih(){}function rh(){}function ch(){}function ah(){}function oh(){}function uh(){}function sh(){}function hh(){}function fh(){}function lh(){}function bh(){}function wh(){}function dh(){}function gh(){}function ph(){}function mh(){}function vh(){}function kh(){}function yh(){}function Mh(){}function Th(){}function jh(){}function Eh(){}function Sh(){}function Ph(){}function Ch(){}function Ih(){}function Oh(){}function Ah(){}function Lh(){}function Nh(){}function $h(){}function Dh(){}function xh(){}function Rh(){}function Kh(){}function Fh(){}function _h(){}function Bh(){}function Hh(){}function Uh(){}function Gh(){}function qh(){}function Xh(){}function zh(){}function Vh(){}function Wh(){}function Qh(){}function Jh(){}function Yh(){}function Zh(){}function nf(){}function tf(){}function ef(){}function rf(){}function cf(){}function af(){}function of(){}function uf(){}function sf(){}function hf(){}function ff(){}function lf(){}function bf(){}function wf(){}function df(){}function gf(){}function pf(){}function mf(){}function vf(){}function kf(){}function yf(){}function Mf(){}function Tf(){}function jf(){}function Ef(){}function Sf(){}function Pf(){}function Cf(){}function If(){}function Of(){}function Af(){}function Lf(){}function Nf(){}function $f(){}function Df(){}function xf(){}function Rf(n){}function Kf(n){}function Ff(){gy()}function _f(){VS()}function Bf(){MEn()}function Hf(){pbn()}function Uf(){ryn()}function Gf(){oOn()}function qf(){rGn()}function Xf(){yjn()}function zf(){Bjn()}function Vf(){WS()}function Wf(){HB()}function Qf(){QS()}function Jf(){Pun()}function Yf(){F7()}function Zf(){Ean()}function nl(){Y0()}function tl(){Pan()}function el(){Unn()}function il(){Q0()}function rl(){Cln()}function cl(){Ian()}function al(){Can()}function ol(){c6()}function ul(){Oan()}function sl(){jIn()}function hl(){YS()}function fl(){VYn()}function ll(){jYn()}function bl(){Aan()}function wl(){Iun()}function dl(){Z0()}function gl(){Pjn()}function pl(){t2()}function ml(){dUn()}function vl(){eDn()}function kl(){tcn()}function yl(){Kdn()}function Ml(){QGn()}function Tl(){e3()}function jl(){ncn()}function El(){EHn()}function Sl(){jOn()}function Pl(){IHn()}function Cl(){S_n()}function Il(){fIn()}function Ol(){uBn()}function Al(){jMn()}function Ll(){oB()}function Nl(){Stn()}function $l(){lIn()}function Dl(){XYn()}function xl(){Iln()}function Rl(){Wmn()}function Kl(){Oun()}function Fl(){tXn()}function _l(){vGn()}function Bl(n){tJ(n)}function Hl(n){this.a=n}function Ul(n){this.a=n}function Gl(n){this.a=n}function ql(n){this.a=n}function Xl(n){this.a=n}function zl(n){this.a=n}function Vl(n){this.a=n}function Wl(n){this.a=n}function Ql(n){this.a=n}function Jl(n){this.a=n}function Yl(n){this.a=n}function Zl(n){this.a=n}function nb(n){this.a=n}function tb(n){this.a=n}function eb(n){this.a=n}function ib(n){this.a=n}function rb(n){this.a=n}function cb(n){this.a=n}function ab(n){this.a=n}function ob(n){this.a=n}function ub(n){this.a=n}function sb(n){this.a=n}function hb(n){this.b=n}function fb(n){this.c=n}function lb(n){this.a=n}function bb(n){this.a=n}function wb(n){this.a=n}function db(n){this.a=n}function gb(n){this.a=n}function pb(n){this.a=n}function mb(n){this.a=n}function vb(n){this.a=n}function kb(n){this.a=n}function yb(n){this.a=n}function Mb(n){this.a=n}function Tb(n){this.a=n}function jb(n){this.a=n}function Eb(n){this.a=n}function Sb(n){this.a=n}function Pb(n){this.a=n}function Cb(n){this.a=n}function Ib(){this.a=[]}function Ob(n,t){n.a=t}function Ab(n,t){n.a=t}function Lb(n,t){n.b=t}function Nb(n,t){n.b=t}function $b(n,t){n.b=t}function Db(n,t){n.j=t}function xb(n,t){n.g=t}function Rb(n,t){n.i=t}function Kb(n,t){n.c=t}function Fb(n,t){n.c=t}function _b(n,t){n.d=t}function Bb(n,t){n.d=t}function Hb(n,t){n.k=t}function Ub(n,t){n.c=t}function Gb(n,t){n.c=t}function qb(n,t){n.a=t}function Xb(n,t){n.a=t}function zb(n,t){n.f=t}function Vb(n,t){n.a=t}function Wb(n,t){n.b=t}function Qb(n,t){n.d=t}function Jb(n,t){n.i=t}function Yb(n,t){n.o=t}function Zb(n,t){n.r=t}function nw(n,t){n.a=t}function tw(n,t){n.b=t}function ew(n,t){n.e=t}function iw(n,t){n.f=t}function rw(n,t){n.g=t}function cw(n,t){n.e=t}function aw(n,t){n.f=t}function ow(n,t){n.f=t}function uw(n,t){n.a=t}function sw(n,t){n.b=t}function hw(n,t){n.n=t}function fw(n,t){n.a=t}function lw(n,t){n.c=t}function bw(n,t){n.c=t}function ww(n,t){n.c=t}function dw(n,t){n.a=t}function gw(n,t){n.a=t}function pw(n,t){n.d=t}function mw(n,t){n.d=t}function vw(n,t){n.e=t}function kw(n,t){n.e=t}function yw(n,t){n.g=t}function Mw(n,t){n.f=t}function Tw(n,t){n.j=t}function jw(n,t){n.a=t}function Ew(n,t){n.a=t}function Sw(n,t){n.b=t}function Pw(n){n.b=n.a}function Cw(n){n.c=n.d.d}function Iw(n){this.a=n}function Ow(n){this.a=n}function Aw(n){this.a=n}function Lw(n){this.a=n}function Nw(n){this.a=n}function $w(n){this.a=n}function Dw(n){this.a=n}function xw(n){this.a=n}function Rw(n){this.a=n}function Kw(n){this.a=n}function Fw(n){this.a=n}function _w(n){this.a=n}function Bw(n){this.a=n}function Hw(n){this.a=n}function Uw(n){this.b=n}function Gw(n){this.b=n}function qw(n){this.b=n}function Xw(n){this.a=n}function zw(n){this.a=n}function Vw(n){this.c=n}function Ww(n){this.c=n}function Qw(n){this.c=n}function Jw(n){this.d=n}function Yw(n){this.a=n}function Zw(n){this.a=n}function nd(n){this.a=n}function td(n){this.a=n}function ed(n){this.a=n}function id(n){this.a=n}function rd(n){this.a=n}function cd(n){this.a=n}function ad(n){this.a=n}function od(n){this.a=n}function ud(n){this.a=n}function sd(n){this.a=n}function hd(n){this.a=n}function fd(n){this.a=n}function ld(n){this.a=n}function bd(n){this.a=n}function wd(n){this.a=n}function dd(n){this.a=n}function gd(n){this.a=n}function pd(n){this.a=n}function md(n){this.a=n}function vd(n){this.a=n}function kd(n){this.a=n}function yd(n){this.a=n}function Md(n){this.a=n}function Td(n){this.a=n}function jd(n){this.a=n}function Ed(n){this.a=n}function Sd(n){this.a=n}function Pd(n){this.a=n}function Cd(n){this.a=n}function Id(n){this.a=n}function Od(n){this.a=n}function Ad(n){this.a=n}function Ld(n){this.a=n}function Nd(n){this.a=n}function $d(n){this.a=n}function Dd(n){this.a=n}function xd(n){this.a=n}function Rd(n){this.a=n}function Kd(n){this.a=n}function Fd(n){this.a=n}function _d(n){this.a=n}function Bd(n){this.a=n}function Hd(n){this.a=n}function Ud(n){this.a=n}function Gd(n){this.a=n}function qd(n){this.a=n}function Xd(n){this.e=n}function zd(n){this.a=n}function Vd(n){this.a=n}function Wd(n){this.a=n}function Qd(n){this.a=n}function Jd(n){this.a=n}function Yd(n){this.a=n}function Zd(n){this.a=n}function ng(n){this.a=n}function tg(n){this.a=n}function eg(n){this.a=n}function ig(n){this.a=n}function rg(n){this.a=n}function cg(n){this.a=n}function ag(n){this.a=n}function og(n){this.a=n}function ug(n){this.a=n}function sg(n){this.a=n}function hg(n){this.a=n}function fg(n){this.a=n}function lg(n){this.a=n}function bg(n){this.a=n}function wg(n){this.a=n}function dg(n){this.a=n}function gg(n){this.a=n}function pg(n){this.a=n}function mg(n){this.a=n}function vg(n){this.a=n}function kg(n){this.a=n}function yg(n){this.a=n}function Mg(n){this.a=n}function Tg(n){this.a=n}function jg(n){this.a=n}function Eg(n){this.a=n}function Sg(n){this.a=n}function Pg(n){this.a=n}function Cg(n){this.a=n}function Ig(n){this.a=n}function Og(n){this.a=n}function Ag(n){this.a=n}function Lg(n){this.a=n}function Ng(n){this.a=n}function $g(n){this.a=n}function Dg(n){this.a=n}function xg(n){this.a=n}function Rg(n){this.a=n}function Kg(n){this.a=n}function Fg(n){this.a=n}function _g(n){this.a=n}function Bg(n){this.a=n}function Hg(n){this.a=n}function Ug(n){this.a=n}function Gg(n){this.a=n}function qg(n){this.a=n}function Xg(n){this.a=n}function zg(n){this.c=n}function Vg(n){this.b=n}function Wg(n){this.a=n}function Qg(n){this.a=n}function Jg(n){this.a=n}function Yg(n){this.a=n}function Zg(n){this.a=n}function np(n){this.a=n}function tp(n){this.a=n}function ep(n){this.a=n}function ip(n){this.a=n}function rp(n){this.a=n}function cp(n){this.a=n}function ap(n){this.a=n}function op(n){this.a=n}function up(n){this.a=n}function sp(n){this.a=n}function hp(n){this.a=n}function fp(n){this.a=n}function lp(n){this.a=n}function bp(n){this.a=n}function wp(n){this.a=n}function dp(n){this.a=n}function gp(n){this.a=n}function pp(n){this.a=n}function mp(n){this.a=n}function vp(n){this.a=n}function kp(n){this.a=n}function yp(n){this.a=n}function Mp(n){this.a=n}function Tp(n){this.a=n}function jp(n){this.a=n}function Ep(n){this.a=n}function Sp(n){this.a=n}function Pp(n){this.a=n}function Cp(n){this.a=n}function Ip(n){this.a=n}function Op(n){this.a=n}function Ap(n){this.a=n}function Lp(n){this.a=n}function Np(n){this.a=n}function $p(n){this.a=n}function Dp(n){this.a=n}function xp(n){this.a=n}function Rp(n){this.a=n}function Kp(n){this.a=n}function Fp(n){this.a=n}function _p(n){this.a=n}function Bp(n){this.a=n}function Hp(n){this.a=n}function Up(n){this.a=n}function Gp(n){this.a=n}function qp(n){this.a=n}function Xp(n){this.a=n}function zp(n){this.a=n}function Vp(n){this.a=n}function Wp(n){this.a=n}function Qp(n){this.a=n}function Jp(n){this.f=n}function Yp(n){this.a=n}function Zp(n){this.a=n}function nm(n){this.a=n}function tm(n){this.a=n}function em(n){this.a=n}function im(n){this.a=n}function rm(n){this.a=n}function cm(n){this.a=n}function am(n){this.a=n}function om(n){this.a=n}function um(n){this.a=n}function sm(n){this.a=n}function hm(n){this.a=n}function fm(n){this.a=n}function lm(n){this.a=n}function bm(n){this.a=n}function wm(n){this.a=n}function dm(n){this.a=n}function gm(n){this.a=n}function pm(n){this.a=n}function mm(n){this.a=n}function vm(n){this.a=n}function km(n){this.a=n}function ym(n){this.a=n}function Mm(n){this.a=n}function Tm(n){this.a=n}function jm(n){this.a=n}function Em(n){this.a=n}function Sm(n){this.a=n}function Pm(n){this.a=n}function Cm(n){this.b=n}function Im(n){this.a=n}function Om(n){this.a=n}function Am(n){this.a=n}function Lm(n){this.a=n}function Nm(n){this.a=n}function $m(n){this.a=n}function Dm(n){this.a=n}function xm(n){this.b=n}function Rm(n){this.a=n}function Km(n){this.a=n}function Fm(n){this.a=n}function _m(n){this.a=n}function Bm(n){this.c=n}function Hm(n){this.e=n}function Um(n){this.a=n}function Gm(n){this.a=n}function qm(n){this.a=n}function Xm(n){this.d=n}function zm(n){this.a=n}function Vm(n){this.a=n}function Wm(n){this.a=n}function Qm(n){this.e=n}function Jm(){this.a=0}function Ym(){$V(this)}function Zm(){IN(this)}function nv(){XQ(this)}function tv(){Rf(this)}function ev(){this.c=nBt}function iv(n,t){n.b+=t}function rv(n,t){t.Wb(n)}function cv(n){return n.a}function av(n){return n.a}function ov(n){return n.a}function uv(n){return n.a}function sv(n){return n.a}function hv(n){return n.e}function fv(){return null}function lv(){return null}function bv(){mj(),xJn()}function wv(n){n.b.Of(n.e)}function dv(n){n.b=new rT}function gv(n,t){n.b=t-n.b}function pv(n,t){n.a=t-n.a}function mv(n,t){n.push(t)}function vv(n,t){n.sort(t)}function kv(n,t){t.jd(n.a)}function yv(n,t){NLn(t,n)}function Mv(n,t,e){n.Yd(e,t)}function Tv(n,t){n.e=t,t.b=n}function jv(n){sB(),this.a=n}function Ev(n){sB(),this.a=n}function Sv(n){sB(),this.a=n}function Pv(n){ZW(),this.a=n}function Cv(n){EZ(),_at.le(n)}function Iv(){Iv=E,new Ym}function Ov(){vx.call(this)}function Av(){vx.call(this)}function Lv(){Ov.call(this)}function Nv(){Ov.call(this)}function $v(){Ov.call(this)}function Dv(){Ov.call(this)}function xv(){Ov.call(this)}function Rv(){Ov.call(this)}function Kv(){Ov.call(this)}function Fv(){Ov.call(this)}function _v(){Ov.call(this)}function Bv(){Ov.call(this)}function Hv(){Ov.call(this)}function Uv(){this.a=this}function Gv(){this.Bb|=256}function qv(){this.b=new hL}function Xv(n,t){n.length=t}function zv(n,t){kD(n.a,t)}function Vv(n,t){LOn(n.c,t)}function Wv(n,t){FV(n.b,t)}function Qv(n,t){bMn(n.a,t)}function Jv(n,t){Vdn(n.a,t)}function Yv(n,t){Msn(n.e,t)}function Zv(n){C$n(n.c,n.b)}function nk(n,t){n.kc().Nb(t)}function tk(n){this.a=Agn(n)}function ek(){this.a=new Ym}function ik(){this.a=new Ym}function rk(){this.a=new hS}function ck(){this.a=new Zm}function ak(){this.a=new Zm}function ok(){this.a=new Zm}function uk(){this.a=new kn}function sk(){this.a=new g7}function hk(){this.a=new lt}function fk(){this.a=new V0}function lk(){this.a=new NF}function bk(){this.a=new Zm}function wk(){this.a=new Zm}function dk(){this.a=new Zm}function gk(){this.a=new Zm}function pk(){this.d=new Zm}function mk(){this.a=new i4}function vk(){this.a=new ek}function kk(){this.a=new Ym}function yk(){this.b=new Ym}function Mk(){this.b=new Zm}function Tk(){this.e=new Zm}function jk(){this.a=new sl}function Ek(){this.d=new Zm}function Sk(){BZ.call(this)}function Pk(){BZ.call(this)}function Ck(){Zm.call(this)}function Ik(){Lv.call(this)}function Ok(){ck.call(this)}function Ak(){HF.call(this)}function Lk(){gk.call(this)}function Nk(){tv.call(this)}function $k(){Nk.call(this)}function Dk(){tv.call(this)}function xk(){Dk.call(this)}function Rk(){oy.call(this)}function Kk(){oy.call(this)}function Fk(){oy.call(this)}function _k(){hy.call(this)}function Bk(){ts.call(this)}function Hk(){ts.call(this)}function Uk(){lS.call(this)}function Gk(){wy.call(this)}function qk(){wy.call(this)}function Xk(){Ym.call(this)}function zk(){Ym.call(this)}function Vk(){Ym.call(this)}function Wk(){Kan.call(this)}function Qk(){ek.call(this)}function Jk(){Gv.call(this)}function Yk(){$D.call(this)}function Zk(){Ym.call(this)}function ny(){$D.call(this)}function ty(){Ym.call(this)}function ey(){Ym.call(this)}function iy(){ps.call(this)}function ry(){iy.call(this)}function cy(){ps.call(this)}function ay(){$f.call(this)}function oy(){this.a=new ek}function uy(){this.a=new Ym}function sy(){this.a=new Zm}function hy(){this.a=new Ym}function fy(){this.a=new lS}function ly(){this.j=new Zm}function by(){this.a=new zj}function wy(){this.a=new gs}function dy(){this.a=new Do}function gy(){gy=E,wat=new c}function py(){py=E,Mat=new ky}function my(){my=E,Tat=new vy}function vy(){ib.call(this,"")}function ky(){ib.call(this,"")}function yy(n){Arn.call(this,n)}function My(n){Arn.call(this,n)}function Ty(n){Ql.call(this,n)}function jy(n){HE.call(this,n)}function Ey(n){HE.call(this,n)}function Sy(n){jy.call(this,n)}function Py(n){jy.call(this,n)}function Cy(n){jy.call(this,n)}function Iy(n){c8.call(this,n)}function Oy(n){c8.call(this,n)}function Ay(n){K_.call(this,n)}function Ly(n){XE.call(this,n)}function Ny(n){WE.call(this,n)}function $y(n){WE.call(this,n)}function Dy(n){WE.call(this,n)}function xy(n){cOn.call(this,n)}function Ry(n){xy.call(this,n)}function Ky(n){Uz.call(this,n)}function Fy(n){Ky.call(this,n)}function _y(){Cb.call(this,{})}function By(){By=E,Vat=new T}function Hy(){Hy=E,Iat=new X$}function Uy(){Uy=E,Dat=new r}function Gy(){Gy=E,Fat=new p}function qy(){qy=E,Hat=new k}function Xy(n){UD(),this.a=n}function zy(n){Cun(),this.a=n}function Vy(n){rz(),this.f=n}function Wy(n){rz(),this.f=n}function Qy(n){aB(),this.a=n}function Jy(n){n.b=null,n.c=0}function Yy(n,t){n.e=t,yFn(n,t)}function Zy(n,t){n.a=t,WAn(n)}function nM(n,t,e){n.a[t.g]=e}function tM(n,t,e){nSn(e,n,t)}function eM(n,t){F_(t.i,n.n)}function iM(n,t){yln(n).Cd(t)}function rM(n,t){n.a.ec().Mc(t)}function cM(n,t){return n.g-t.g}function aM(n,t){return n*n/t}function oM(n){return tJ(n),n}function uM(n){return tJ(n),n}function sM(n){return tJ(n),n}function hM(n){return new Pb(n)}function fM(n){return new QW(n)}function lM(n){return tJ(n),n}function bM(n){return tJ(n),n}function wM(n){Ky.call(this,n)}function dM(n){Ky.call(this,n)}function gM(n){Ky.call(this,n)}function pM(n){Uz.call(this,n)}function mM(n){Ky.call(this,n)}function vM(n){Ky.call(this,n)}function kM(n){Ky.call(this,n)}function yM(n){Ky.call(this,n)}function MM(n){Ky.call(this,n)}function TM(n){Ky.call(this,n)}function jM(n){Ky.call(this,n)}function EM(n){Ky.call(this,n)}function SM(n){Ky.call(this,n)}function PM(n){Ky.call(this,n)}function CM(n){Ky.call(this,n)}function IM(n){tJ(n),this.a=n}function OM(n){return hln(n),n}function AM(n){zV(n,n.length)}function LM(n){return n.b==n.c}function NM(n){return!!n&&n.b}function $M(n){return!!n&&n.k}function DM(n){return!!n&&n.j}function xM(n,t,e){n.c.Ef(t,e)}function RM(n,t){n.be(t),t.ae(n)}function KM(n){sB(),this.a=WW(n)}function FM(){this.a=mK(WW(TZn))}function _M(){throw hv(new Kv)}function BM(){throw hv(new Kv)}function HM(){throw hv(new Kv)}function UM(){throw hv(new Kv)}function GM(){throw hv(new Kv)}function qM(){throw hv(new Kv)}function XM(){XM=E,EZ()}function zM(){$w.call(this,"")}function VM(){$w.call(this,"")}function WM(){$w.call(this,"")}function QM(){$w.call(this,"")}function JM(n){dM.call(this,n)}function YM(n){dM.call(this,n)}function ZM(n){vM.call(this,n)}function nT(n){qw.call(this,n)}function tT(n){nT.call(this,n)}function eT(n){gx.call(this,n)}function iT(n){Qx.call(this,n,0)}function rT(){L2.call(this,12,3)}function cT(n,t){return B0(n,t)}function aT(n,t){return Ltn(n,t)}function oT(n,t){return n.a-t.a}function uT(n,t){return n.a-t.a}function sT(n,t){return n.a-t.a}function hT(n,t){return t in n.a}function fT(n){return n.a?n.b:0}function lT(n){return n.a?n.b:0}function bT(n,t,e){t.Cd(n.a[e])}function wT(n,t,e){t.Pe(n.a[e])}function dT(n,t){n.b=new eN(t)}function gT(n,t){return n.b=t,n}function pT(n,t){return n.c=t,n}function mT(n,t){return n.f=t,n}function vT(n,t){return n.g=t,n}function kT(n,t){return n.a=t,n}function yT(n,t){return n.f=t,n}function MT(n,t){return n.k=t,n}function TT(n,t){return n.a=t,n}function jT(n,t){return n.e=t,n}function ET(n,t){return n.e=t,n}function ST(n,t){return n.f=t,n}function PT(n,t){n.b=!0,n.d=t}function CT(n,t){return n.b-t.b}function IT(n,t){return n.g-t.g}function OT(n,t){return n?0:t-1}function AT(n,t){return n?0:t-1}function LT(n,t){return n?t-1:0}function NT(n,t){return n.s-t.s}function $T(n,t){return t.rg(n)}function DT(n,t){return n.b=t,n}function xT(n,t){return n.a=t,n}function RT(n,t){return n.c=t,n}function KT(n,t){return n.d=t,n}function FT(n,t){return n.e=t,n}function _T(n,t){return n.f=t,n}function BT(n,t){return n.a=t,n}function HT(n,t){return n.b=t,n}function UT(n,t){return n.c=t,n}function GT(n,t){return n.c=t,n}function qT(n,t){return n.b=t,n}function XT(n,t){return n.d=t,n}function zT(n,t){return n.e=t,n}function VT(n,t){return n.f=t,n}function WT(n,t){return n.g=t,n}function QT(n,t){return n.a=t,n}function JT(n,t){return n.i=t,n}function YT(n,t){return n.j=t,n}function ZT(n,t){jIn(),o2(t,n)}function nj(n,t,e){az(n.a,t,e)}function tj(n){Y_.call(this,n)}function ej(n){dpn.call(this,n)}function ij(n){TY.call(this,n)}function rj(n){TY.call(this,n)}function cj(n){Drn.call(this,n)}function aj(n){HY.call(this,n)}function oj(n){HY.call(this,n)}function uj(){S$.call(this,"")}function sj(){this.a=0,this.b=0}function hj(){this.b=0,this.a=0}function fj(n,t){n.b=0,Ccn(n,t)}function lj(n,t){return n.k=t,n}function bj(n,t){return n.j=t,n}function wj(n,t){n.c=t,n.b=!0}function dj(){dj=E,rut=ePn()}function gj(){gj=E,xKt=AEn()}function pj(){pj=E,RKt=VPn()}function mj(){mj=E,NFt=aan()}function vj(){vj=E,y_t=LEn()}function kj(){kj=E,xBt=NEn()}function yj(){yj=E,RBt=qAn()}function Mj(n){return n.e&&n.e()}function Tj(n){return n.l|n.m<<22}function jj(n,t){return n.c._b(t)}function Ej(n,t){return Uwn(n.b,t)}function Sj(n){return n?n.d:null}function Pj(n){return n?n.g:null}function Cj(n){return n?n.i:null}function Ij(n){return vK(n),n.o}function Oj(n,t){return n.a+=t,n}function Aj(n,t){return n.a+=t,n}function Lj(n,t){return n.a+=t,n}function Nj(n,t){return n.a+=t,n}function $j(n,t){for(;n.Bd(t););}function Dj(n){this.a=new sS(n)}function xj(){throw hv(new Kv)}function Rj(){throw hv(new Kv)}function Kj(){throw hv(new Kv)}function Fj(){throw hv(new Kv)}function _j(){throw hv(new Kv)}function Bj(){throw hv(new Kv)}function Hj(n){this.a=new Hz(n)}function Uj(){this.a=new mKn(iIt)}function Gj(){this.b=new mKn(ZSt)}function qj(){this.a=new mKn(dOt)}function Xj(){this.b=new mKn(VAt)}function zj(){this.b=new mKn(VAt)}function Vj(n){this.a=0,this.b=n}function Wj(n){CQn(),uYn(this,n)}function Qj(n){return GQ(n),n.a}function Jj(n){return n.b!=n.d.c}function Yj(n,t){return n.d[t.p]}function Zj(n,t){return vFn(n,t)}function nE(n,t,e){n.splice(t,e)}function tE(n,t){for(;n.Re(t););}function eE(n){n.c?P_n(n):C_n(n)}function iE(){throw hv(new Kv)}function rE(){throw hv(new Kv)}function cE(){throw hv(new Kv)}function aE(){throw hv(new Kv)}function oE(){throw hv(new Kv)}function uE(){throw hv(new Kv)}function sE(){throw hv(new Kv)}function hE(){throw hv(new Kv)}function fE(){throw hv(new Kv)}function lE(){throw hv(new Kv)}function bE(){throw hv(new Bv)}function wE(){throw hv(new Bv)}function dE(n){this.a=new gE(n)}function gE(n){Zan(this,n,fOn())}function pE(n){return!n||FQ(n)}function mE(n){return-1!=dHt[n]}function vE(){0!=Uat&&(Uat=0),qat=-1}function kE(){null==hZn&&(hZn=[])}function yE(n,t){RD.call(this,n,t)}function ME(n,t){yE.call(this,n,t)}function TE(n,t){this.a=n,this.b=t}function jE(n,t){this.a=n,this.b=t}function EE(n,t){this.a=n,this.b=t}function SE(n,t){this.a=n,this.b=t}function PE(n,t){this.a=n,this.b=t}function CE(n,t){this.a=n,this.b=t}function IE(n,t){this.a=n,this.b=t}function OE(n,t){this.e=n,this.d=t}function AE(n,t){this.b=n,this.c=t}function LE(n,t){this.b=n,this.a=t}function NE(n,t){this.b=n,this.a=t}function $E(n,t){this.b=n,this.a=t}function DE(n,t){this.b=n,this.a=t}function xE(n,t){this.a=n,this.b=t}function RE(n,t){this.a=n,this.b=t}function KE(n,t){this.a=n,this.f=t}function FE(n,t){this.g=n,this.i=t}function _E(n,t){this.f=n,this.g=t}function BE(n,t){this.b=n,this.c=t}function HE(n){FD(n.dc()),this.c=n}function UE(n,t){this.a=n,this.b=t}function GE(n,t){this.a=n,this.b=t}function qE(n){this.a=uG(WW(n),15)}function XE(n){this.a=uG(WW(n),15)}function zE(n){this.a=uG(WW(n),85)}function VE(n){this.b=uG(WW(n),85)}function WE(n){this.b=uG(WW(n),51)}function QE(){this.q=new e.Date}function JE(n,t){this.a=n,this.b=t}function YE(n,t){return PV(n.b,t)}function ZE(n,t){return n.b.Hc(t)}function nS(n,t){return n.b.Ic(t)}function tS(n,t){return n.b.Qc(t)}function eS(n,t){return n.b.Hc(t)}function iS(n,t){return n.c.uc(t)}function rS(n,t){return udn(n.c,t)}function cS(n,t){return n.a._b(t)}function aS(n,t){return n>t&&t0}function $P(n,t){return dwn(n,t)<0}function DP(n,t){return RX(n.a,t)}function xP(n,t){U0.call(this,n,t)}function RP(n){nQ(),K_.call(this,n)}function KP(n,t){zX(n,n.length,t)}function FP(n,t){dW(n,n.length,t)}function _P(n,t){return n.a.get(t)}function BP(n,t){return PV(n.e,t)}function HP(n){return tJ(n),!1}function UP(n){this.a=uG(WW(n),229)}function GP(n){h3.call(this,n,21)}function qP(n,t){_E.call(this,n,t)}function XP(n,t){_E.call(this,n,t)}function zP(n,t){this.b=n,this.a=t}function VP(n,t){this.d=n,this.e=t}function WP(n,t){this.a=n,this.b=t}function QP(n,t){this.a=n,this.b=t}function JP(n,t){this.a=n,this.b=t}function YP(n,t){this.a=n,this.b=t}function ZP(n,t){this.a=n,this.b=t}function nC(n,t){this.b=n,this.a=t}function tC(n,t){this.b=n,this.a=t}function eC(n,t){_E.call(this,n,t)}function iC(n,t){_E.call(this,n,t)}function rC(n,t){_E.call(this,n,t)}function cC(n,t){_E.call(this,n,t)}function aC(n,t){_E.call(this,n,t)}function oC(n,t){_E.call(this,n,t)}function uC(n,t){_E.call(this,n,t)}function sC(n,t){this.b=n,this.a=t}function hC(n,t){_E.call(this,n,t)}function fC(n,t){this.b=n,this.a=t}function lC(n,t){_E.call(this,n,t)}function bC(n,t){this.b=n,this.a=t}function wC(n,t){_E.call(this,n,t)}function dC(n,t){_E.call(this,n,t)}function gC(n,t){_E.call(this,n,t)}function pC(n,t,e){n.splice(t,0,e)}function mC(n,t,e){n.Mb(e)&&t.Cd(e)}function vC(n,t,e){t.Pe(n.a.Ye(e))}function kC(n,t,e){t.Dd(n.a.Ze(e))}function yC(n,t,e){t.Cd(n.a.Kb(e))}function MC(n,t){return $x(n.c,t)}function TC(n,t){return $x(n.e,t)}function jC(n,t){_E.call(this,n,t)}function EC(n,t){_E.call(this,n,t)}function SC(n,t){_E.call(this,n,t)}function PC(n,t){_E.call(this,n,t)}function CC(n,t){_E.call(this,n,t)}function IC(n,t){_E.call(this,n,t)}function OC(n,t){this.a=n,this.b=t}function AC(n,t){this.a=n,this.b=t}function LC(n,t){this.a=n,this.b=t}function NC(n,t){this.a=n,this.b=t}function $C(n,t){this.a=n,this.b=t}function DC(n,t){this.a=n,this.b=t}function xC(n,t){this.b=n,this.a=t}function RC(n,t){this.b=n,this.a=t}function KC(n,t){this.b=n,this.a=t}function FC(n,t){this.c=n,this.d=t}function _C(n,t){this.e=n,this.d=t}function BC(n,t){this.a=n,this.b=t}function HC(n,t){this.a=n,this.b=t}function UC(n,t){this.a=n,this.b=t}function GC(n,t){this.b=n,this.a=t}function qC(n,t){this.b=t,this.c=n}function XC(n,t){_E.call(this,n,t)}function zC(n,t){_E.call(this,n,t)}function VC(n,t){_E.call(this,n,t)}function WC(n,t){_E.call(this,n,t)}function QC(n,t){_E.call(this,n,t)}function JC(n,t){_E.call(this,n,t)}function YC(n,t){_E.call(this,n,t)}function ZC(n,t){_E.call(this,n,t)}function nI(n,t){_E.call(this,n,t)}function tI(n,t){_E.call(this,n,t)}function eI(n,t){_E.call(this,n,t)}function iI(n,t){_E.call(this,n,t)}function rI(n,t){_E.call(this,n,t)}function cI(n,t){_E.call(this,n,t)}function aI(n,t){_E.call(this,n,t)}function oI(n,t){_E.call(this,n,t)}function uI(n,t){_E.call(this,n,t)}function sI(n,t){_E.call(this,n,t)}function hI(n,t){_E.call(this,n,t)}function fI(n,t){_E.call(this,n,t)}function lI(n,t){_E.call(this,n,t)}function bI(n,t){_E.call(this,n,t)}function wI(n,t){_E.call(this,n,t)}function dI(n,t){_E.call(this,n,t)}function gI(n,t){_E.call(this,n,t)}function pI(n,t){_E.call(this,n,t)}function mI(n,t){_E.call(this,n,t)}function vI(n,t){_E.call(this,n,t)}function kI(n,t){_E.call(this,n,t)}function yI(n,t){_E.call(this,n,t)}function MI(n,t){_E.call(this,n,t)}function TI(n,t){_E.call(this,n,t)}function jI(n,t){_E.call(this,n,t)}function EI(n,t){this.b=n,this.a=t}function SI(n,t){_E.call(this,n,t)}function PI(n,t){this.a=n,this.b=t}function CI(n,t){this.a=n,this.b=t}function II(n,t){this.a=n,this.b=t}function OI(n,t){_E.call(this,n,t)}function AI(n,t){_E.call(this,n,t)}function LI(n,t){this.a=n,this.b=t}function NI(n,t){return PU(),t!=n}function $I(n){return MK(n.a),n.b}function DI(n){return K$n(n,n.c),n}function xI(){return dj(),new rut}function RI(){UB(),this.a=new xF}function KI(){oFn(),this.a=new ek}function FI(){e2(),this.b=new ek}function _I(n,t){this.b=n,this.d=t}function BI(n,t){this.a=n,this.b=t}function HI(n,t){this.a=n,this.b=t}function UI(n,t){this.a=n,this.b=t}function GI(n,t){this.b=n,this.a=t}function qI(n,t){_E.call(this,n,t)}function XI(n,t){_E.call(this,n,t)}function zI(n,t){_E.call(this,n,t)}function VI(n,t){_E.call(this,n,t)}function WI(n,t){_E.call(this,n,t)}function QI(n,t){_E.call(this,n,t)}function JI(n,t){_E.call(this,n,t)}function YI(n,t){_E.call(this,n,t)}function ZI(n,t){_E.call(this,n,t)}function nO(n,t){_E.call(this,n,t)}function tO(n,t){_E.call(this,n,t)}function eO(n,t){_E.call(this,n,t)}function iO(n,t){_E.call(this,n,t)}function rO(n,t){_E.call(this,n,t)}function cO(n,t){_E.call(this,n,t)}function aO(n,t){_E.call(this,n,t)}function oO(n,t){_E.call(this,n,t)}function uO(n,t){_E.call(this,n,t)}function sO(n,t){_E.call(this,n,t)}function hO(n,t){_E.call(this,n,t)}function fO(n,t){_E.call(this,n,t)}function lO(n,t){_E.call(this,n,t)}function bO(n,t){_E.call(this,n,t)}function wO(n,t){_E.call(this,n,t)}function dO(n,t){this.b=n,this.a=t}function gO(n,t){this.b=n,this.a=t}function pO(n,t){this.b=n,this.a=t}function mO(n,t){this.b=n,this.a=t}function vO(n,t){this.a=n,this.b=t}function kO(n,t){this.a=n,this.b=t}function yO(n,t){this.a=n,this.b=t}function MO(n,t){this.a=n,this.b=t}function TO(n,t){_E.call(this,n,t)}function jO(n,t){_E.call(this,n,t)}function EO(n,t){_E.call(this,n,t)}function SO(n,t){_E.call(this,n,t)}function PO(n,t){_E.call(this,n,t)}function CO(n,t){_E.call(this,n,t)}function IO(n,t){_E.call(this,n,t)}function OO(n,t){_E.call(this,n,t)}function AO(n,t){_E.call(this,n,t)}function LO(n,t){_E.call(this,n,t)}function NO(n,t){_E.call(this,n,t)}function $O(n,t){_E.call(this,n,t)}function DO(n,t){_E.call(this,n,t)}function xO(n,t){_E.call(this,n,t)}function RO(n,t){_E.call(this,n,t)}function KO(n,t){_E.call(this,n,t)}function FO(n,t){_E.call(this,n,t)}function _O(n,t){_E.call(this,n,t)}function BO(n,t){_E.call(this,n,t)}function HO(n,t){_E.call(this,n,t)}function UO(n,t){this.a=n,this.b=t}function GO(n,t){this.a=n,this.b=t}function qO(n,t){this.a=n,this.b=t}function XO(n,t){this.a=n,this.b=t}function zO(n,t){this.a=n,this.b=t}function VO(n,t){this.a=n,this.b=t}function WO(n,t){this.a=n,this.b=t}function QO(n,t){this.a=n,this.b=t}function JO(n,t){this.a=n,this.b=t}function YO(n,t){this.a=n,this.b=t}function ZO(n,t){this.a=n,this.b=t}function nA(n,t){this.a=n,this.b=t}function tA(n,t){this.a=n,this.b=t}function eA(n,t){this.b=n,this.a=t}function iA(n,t){this.b=n,this.a=t}function rA(n,t){this.b=n,this.a=t}function cA(n,t){this.b=n,this.a=t}function aA(n,t){this.a=n,this.b=t}function oA(n,t){this.a=n,this.b=t}function uA(n,t){_E.call(this,n,t)}function sA(n,t){this.a=n,this.b=t}function hA(n,t){this.a=n,this.b=t}function fA(n,t){_E.call(this,n,t)}function lA(n,t){this.f=n,this.c=t}function bA(n,t){return $x(n.g,t)}function wA(n,t){return $x(t.b,n)}function dA(n,t){return ymn(n.a,t)}function gA(n,t){return-n.b.af(t)}function pA(n,t){n&&vJ(AFt,n,t)}function mA(n,t){n.i=null,lon(n,t)}function vA(n,t,e){MSn(t,jAn(n,e))}function kA(n,t,e){MSn(t,jAn(n,e))}function yA(n,t){BRn(n.a,uG(t,58))}function MA(n,t){aen(n.a,uG(t,12))}function TA(n,t){this.a=n,this.b=t}function jA(n,t){this.a=n,this.b=t}function EA(n,t){this.a=n,this.b=t}function SA(n,t){this.a=n,this.b=t}function PA(n,t){this.a=n,this.b=t}function CA(n,t){this.d=n,this.b=t}function IA(n,t){this.e=n,this.a=t}function OA(n,t){this.b=n,this.c=t}function AA(n,t){this.i=n,this.g=t}function LA(n,t){this.d=n,this.e=t}function NA(n,t){Iin(new DD(n),t)}function $A(n){return kmn(n.c,n.b)}function DA(n){return n?n.md():null}function xA(n){return null==n?null:n}function RA(n){return typeof n===pZn}function KA(n){return typeof n===dZn}function FA(n){return typeof n===gZn}function _A(n,t){return 0==dwn(n,t)}function BA(n,t){return dwn(n,t)>=0}function HA(n,t){return 0!=dwn(n,t)}function UA(n,t){return Zun(n.Kc(),t)}function GA(n,t){return n.Rd().Xb(t)}function qA(n){return bpn(n),n.d.gc()}function XA(n){return Fq(null==n),n}function zA(n,t){return n.a+=""+t,n}function VA(n,t){return n.a+=""+t,n}function WA(n,t){return n.a+=""+t,n}function QA(n,t){return n.a+=""+t,n}function JA(n,t){return n.a+=""+t,n}function YA(n,t){return n.a+=""+t,n}function ZA(n){return""+(tJ(n),n)}function nL(n){$V(this),xun(this,n)}function tL(){J0(),ez.call(this)}function eL(n,t){Bz.call(this,n,t)}function iL(n,t){Bz.call(this,n,t)}function rL(n,t){Bz.call(this,n,t)}function cL(n,t){s8(n,t,n.c.b,n.c)}function aL(n,t){s8(n,t,n.a,n.a.a)}function oL(n){return u3(n,0),null}function uL(){this.b=0,this.a=!1}function sL(){this.b=0,this.a=!1}function hL(){this.b=new sS(orn(12))}function fL(){fL=E,fht=Abn(Nkn())}function lL(){lL=E,_wt=Abn(bKn())}function bL(){bL=E,bPt=Abn(usn())}function wL(){wL=E,Iv(),Bat=new Ym}function dL(n){return n.a=0,n.b=0,n}function gL(n,t){return n.a=t.g+1,n}function pL(n,t){w_.call(this,n,t)}function mL(n,t){uF.call(this,n,t)}function vL(n,t){AA.call(this,n,t)}function kL(n,t){zx.call(this,n,t)}function yL(n,t){Zsn.call(this,n,t)}function ML(n,t){TP(),vJ(_Ft,n,t)}function TL(n,t){n.q.setTime(W4(t))}function jL(n){e.clearTimeout(n)}function EL(n){return WW(n),new iN(n)}function SL(n,t){return xA(n)===xA(t)}function PL(n,t){return n.a.a.a.cc(t)}function CL(n,t){return r1(n.a,0,t)}function IL(n){return jW(uG(n,74))}function OL(n){return t0((tJ(n),n))}function AL(n){return t0((tJ(n),n))}function LL(n){return p$(n.l,n.m,n.h)}function NL(n,t){return d$(n.a,t.a)}function $L(n,t){return rW(n.a,t.a)}function DL(n,t){return ugn(n.a,t.a)}function xL(n,t){return n.indexOf(t)}function RL(n,t){return 2==n.j[t.p]}function KL(n,t){return n==t?0:n?1:-1}function FL(n){return n<10?"0"+n:""+n}function _L(n){return typeof n===gZn}function BL(n){return n==Flt||n==Hlt}function HL(n){return n==Flt||n==_lt}function UL(n,t){return d$(n.g,t.g)}function GL(n){return Ten(n.b.b,n,0)}function qL(){lX.call(this,0,0,0,0)}function XL(){td.call(this,new u8)}function zL(n,t){Ntn(n,0,n.length,t)}function VL(n,t){return kD(n.a,t),t}function WL(n,t){return GB(),t.a+=n}function QL(n,t){return GB(),t.a+=n}function JL(n,t){return GB(),t.c+=n}function YL(n,t){return kD(n.c,t),n}function ZL(n,t){return gsn(n.a,t),n}function nN(n){this.a=xI(),this.b=n}function tN(n){this.a=xI(),this.b=n}function eN(n){this.a=n.a,this.b=n.b}function iN(n){this.a=n,Ff.call(this)}function rN(n){this.a=n,Ff.call(this)}function cN(){gY.call(this,0,0,0,0)}function aN(n){return gsn(new wJ,n)}function oN(n){return xJ(uG(n,123))}function uN(n){return n.vh()&&n.wh()}function sN(n){return n!=uRt&&n!=sRt}function hN(n){return n==JDt||n==YDt}function fN(n){return n==nxt||n==QDt}function lN(n){return n==wjt||n==bjt}function bN(n,t){return d$(n.g,t.g)}function wN(n,t){return new Zsn(t,n)}function dN(n,t){return new Zsn(t,n)}function gN(n){return nG(n.b.Kc(),n.a)}function pN(n,t){sbn(n,t),Ocn(n,n.D)}function mN(n,t,e){Scn(n,t),pcn(n,e)}function vN(n,t,e){kcn(n,t),vcn(n,e)}function kN(n,t,e){ycn(n,t),Mcn(n,e)}function yN(n,t,e){mcn(n,t),jcn(n,e)}function MN(n,t,e){Tcn(n,t),Ecn(n,e)}function TN(n,t,e){AK.call(this,n,t,e)}function jN(n){lA.call(this,n,!0)}function EN(){qP.call(this,"Tail",3)}function SN(){qP.call(this,"Head",1)}function PN(n){cHn(),Bun.call(this,n)}function CN(n){lX.call(this,n,n,n,n)}function IN(n){n.c=Inn(dat,EZn,1,0,5,1)}function ON(n){return n.b&&sXn(n),n.a}function AN(n){return n.b&&sXn(n),n.c}function LN(n,t){Nut||(n.b=t)}function NN(n,t){return n[n.length]=t}function $N(n,t){return n[n.length]=t}function DN(n,t){return Ern(t,h0(n))}function xN(n,t){return Ern(t,h0(n))}function RN(n,t){return kan(UW(n.d),t)}function KN(n,t){return kan(UW(n.g),t)}function FN(n,t){return kan(UW(n.j),t)}function _N(n,t){uF.call(this,n.b,t)}function BN(n,t){ttn(z5(n.a),v2(t))}function HN(n,t){ttn(Aen(n.a),k2(t))}function UN(n,t,e){kN(e,e.i+n,e.j+t)}function GN(n,t,e){uQ(n.c[t.g],t.g,e)}function qN(n,t,e){uG(n.c,71).Gi(t,e)}function XN(n,t,e){return uQ(n,t,e),e}function zN(n){Prn(n.Sf(),new Od(n))}function VN(n){return null!=n?Hon(n):0}function WN(n){return null==n?0:Hon(n)}function QN(n){QYn(),Qm.call(this,n)}function JN(n){this.a=n,WU.call(this,n)}function YN(){YN=E,e.Math.log(2)}function ZN(){ZN=E,kP(),rBt=WKt}function n$(){n$=E,vSt=new rpn(kxt)}function t$(){t$=E,new e$,new Zm}function e$(){new Ym,new Ym,new Ym}function i$(){throw hv(new TM(hat))}function r$(){throw hv(new TM(hat))}function c$(){throw hv(new TM(fat))}function a$(){throw hv(new TM(fat))}function o$(n){this.a=n,VE.call(this,n)}function u$(n){this.a=n,VE.call(this,n)}function s$(n,t){ZW(),this.a=n,this.b=t}function h$(n,t){WW(t),uY(n).Jc(new b)}function f$(n,t){UX(n.c,n.c.length,t)}function l$(n){return n.at?1:0}function g$(n,t){return dwn(n,t)>0?n:t}function p$(n,t,e){return{l:n,m:t,h:e}}function m$(n,t){null!=n.a&&MA(t,n.a)}function v$(n){c2(n,null),u2(n,null)}function k$(n,t,e){return vJ(n.g,e,t)}function y$(n,t,e){return avn(t,e,n.c)}function M$(n,t,e){return vJ(n.k,e,t)}function T$(n,t,e){return gWn(n,t,e),e}function j$(n,t){return n2(),t.n.b+=n}function E$(n){HZ.call(this),this.b=n}function S$(n){LF.call(this),this.a=n}function P$(){qP.call(this,"Range",2)}function C$(n){this.b=n,this.a=new Zm}function I$(n){this.b=new tt,this.a=n}function O$(n){n.a=new R,n.c=new R}function A$(n){n.a=new Ym,n.d=new Ym}function L$(n){s2(n,null),h2(n,null)}function N$(n,t){return kWn(n.a,t,null)}function $$(n,t){return vJ(n.a,t.a,t)}function D$(n){return new MO(n.a,n.b)}function x$(n){return new MO(n.c,n.d)}function R$(n){return new MO(n.c,n.d)}function K$(n,t){return rVn(n.c,n.b,t)}function F$(n,t){return null!=n&&Eyn(n,t)}function _$(n,t){return-1!=Yhn(n.Kc(),t)}function B$(n){return n.Ob()?n.Pb():null}function H$(n){this.b=(hZ(),new Vw(n))}function U$(n){this.a=n,Ym.call(this)}function G$(){zx.call(this,null,null)}function q$(){Vx.call(this,null,null)}function X$(){_E.call(this,"INSTANCE",0)}function z$(){FEn(),this.a=new mKn(Llt)}function V$(n){return mvn(n,0,n.length)}function W$(n,t){return new ex(n.Kc(),t)}function Q$(n,t){return null!=n.a.Bc(t)}function J$(n,t){Czn(n),n.Gc(uG(t,15))}function Y$(n,t,e){n.c.bd(t,uG(e,136))}function Z$(n,t,e){n.c.Ui(t,uG(e,136))}function nD(n,t){n.c&&(cq(t),B1(t))}function tD(n,t){n.q.setHours(t),Iqn(n,t)}function eD(n,t){KR(t,n.a.a.a,n.a.a.b)}function iD(n,t,e,i){uQ(n.a[t.g],e.g,i)}function rD(n,t,e){return n.a[t.g][e.g]}function cD(n,t){return n.e[t.c.p][t.p]}function aD(n,t){return n.c[t.c.p][t.p]}function oD(n,t){return n.a[t.c.p][t.p]}function uD(n,t){return n.j[t.p]=oRn(t)}function sD(n,t){return null!=n.a.Bc(t)}function hD(n,t){return uM(pK(t.a))<=n}function fD(n,t){return uM(pK(t.a))>=n}function lD(n,t){return r7(n.f,t.Pg())}function bD(n,t){return n.a*t.a+n.b*t.b}function wD(n,t){return n.a0?t/(n*n):100*t}function jR(n,t){return n>0?t*t/n:t*t*100}function ER(n,t){return uG(ain(n.a,t),34)}function SR(n,t){return jIn(),UNn(n,t.e,t)}function PR(n,t,e){return ZS(),e.Mg(n,t)}function CR(n){return tcn(),n.e.a+n.f.a/2}function IR(n,t,e){return tcn(),e.e.a-n*t}function OR(n){return tcn(),n.e.b+n.f.b/2}function AR(n,t,e){return tcn(),e.e.b-n*t}function LR(n){n.d=new bR(n),n.e=new Ym}function NR(){this.a=new K1,this.b=new K1}function $R(n){this.c=n,this.a=1,this.b=1}function DR(n){aYn(),dv(this),this.Ff(n)}function xR(n,t,e){Stn(),n.pf(t)&&e.Cd(n)}function RR(n,t,e){return kD(t,xpn(n,e))}function KR(n,t,e){return n.a+=t,n.b+=e,n}function FR(n,t,e){return n.a*=t,n.b*=e,n}function _R(n,t){return n.a=t.a,n.b=t.b,n}function BR(n){return n.a=-n.a,n.b=-n.b,n}function HR(n,t,e){return n.a-=t,n.b-=e,n}function UR(n){lS.call(this),dan(this,n)}function GR(){_E.call(this,"GROW_TREE",0)}function qR(){_E.call(this,"POLYOMINO",0)}function XR(n,t,e){ltn.call(this,n,t,e,2)}function zR(n,t,e){$dn(z5(n.a),t,v2(e))}function VR(n,t){jP(),zx.call(this,n,t)}function WR(n,t){EP(),Vx.call(this,n,t)}function QR(n,t){EP(),WR.call(this,n,t)}function JR(n,t){EP(),Vx.call(this,n,t)}function YR(n,t){return n.c.Fc(uG(t,136))}function ZR(n,t,e){$dn(Aen(n.a),t,k2(e))}function nK(n){this.c=n,ycn(n,0),Mcn(n,0)}function tK(n,t){ZN(),OX.call(this,n,t)}function eK(n,t){ZN(),tK.call(this,n,t)}function iK(n,t){ZN(),tK.call(this,n,t)}function rK(n,t){ZN(),OX.call(this,n,t)}function cK(n,t){ZN(),iK.call(this,n,t)}function aK(n,t){ZN(),rK.call(this,n,t)}function oK(n,t){ZN(),OX.call(this,n,t)}function uK(n,t,e){return t.zl(n.e,n.c,e)}function sK(n,t,e){return t.Al(n.e,n.c,e)}function hK(n,t,e){return QXn(Len(n,t),e)}function fK(n,t){return mwn(n.e,uG(t,54))}function lK(n){return null==n?null:AQn(n)}function bK(n){return null==n?null:mOn(n)}function wK(n){return null==n?null:cpn(n)}function dK(n){return null==n?null:cpn(n)}function gK(n){return Fq(null==n||KA(n)),n}function pK(n){return Fq(null==n||FA(n)),n}function mK(n){return Fq(null==n||RA(n)),n}function vK(n){null==n.o&&axn(n)}function kK(n){if(!n)throw hv(new Dv)}function yK(n){if(!n)throw hv(new Nv)}function MK(n){if(!n)throw hv(new Bv)}function TK(n){if(!n)throw hv(new xv)}function jK(n){if(!n)throw hv(new Fv)}function EK(){EK=E,KFt=new Gk,new qk}function SK(){SK=E,zCt=new Cm("root")}function PK(){Kan.call(this),this.Bb|=P0n}function CK(n,t){this.d=n,Cw(this),this.b=t}function IK(n,t){Fnn.call(this,n),this.a=t}function OK(n,t){Fnn.call(this,n),this.a=t}function AK(n,t,e){A7.call(this,n,t,e,null)}function LK(n,t,e){A7.call(this,n,t,e,null)}function NK(n,t){this.c=n,OE.call(this,n,t)}function $K(n,t){this.a=n,NK.call(this,n,t)}function DK(n){this.q=new e.Date(W4(n))}function xK(n){return n>8?0:n+1}function RK(n,t){Nut||kD(n.a,t)}function KK(n,t){return WS(),jsn(t.d.i,n)}function FK(n,t){return Pun(),new oHn(t,n)}function _K(n,t,e){return n.Ne(t,e)<=0?e:t}function BK(n,t,e){return n.Ne(t,e)<=0?t:e}function HK(n,t){return uG(ain(n.b,t),143)}function UK(n,t){return uG(ain(n.c,t),233)}function GK(n){return uG(zq(n.a,n.b),294)}function qK(n){return new MO(n.c,n.d+n.a)}function XK(n){return tJ(n),n?1231:1237}function zK(n){return n2(),lN(uG(n,203))}function VK(){VK=E,lht=ggn((Qmn(),JRt))}function WK(n,t){t.a?W$n(n,t):sD(n.a,t.b)}function QK(n,t,e){++n.j,n.tj(),Ann(n,t,e)}function JK(n,t,e){++n.j,n.qj(t,n.Zi(t,e))}function YK(n,t,e){n.fd(t).Rb(e)}function ZK(n,t,e){return e=$Un(n,t,6,e)}function nF(n,t,e){return e=$Un(n,t,3,e)}function tF(n,t,e){return e=$Un(n,t,9,e)}function eF(n,t){return ZZ(t,W2n),n.f=t,n}function iF(n,t){return(t&vZn)%n.d.length}function rF(n,t,e){return fXn(n.c,n.b,t,e)}function cF(n,t){this.c=n,Drn.call(this,t)}function aF(n,t){this.a=n,xm.call(this,t)}function oF(n,t){this.a=n,xm.call(this,t)}function uF(n,t){Cm.call(this,n),this.a=t}function sF(n,t){Bm.call(this,n),this.a=t}function hF(n,t){Bm.call(this,n),this.a=t}function fF(n){smn.call(this,0,0),this.f=n}function lF(n,t,e){return n.a+=mvn(t,0,e),n}function bF(n){return!n.a&&(n.a=new M),n.a}function wF(n,t){var e;return e=n.e,n.e=t,e}function dF(n,t){var e;return e=t,!!n.Fe(e)}function gF(n,t){return qx(),n==t?0:n?1:-1}function pF(n,t){n.a.bd(n.b,t),++n.b,n.c=-1}function mF(n){n.b?mF(n.b):n.f.c.zc(n.e,n.d)}function vF(n){$V(n.e),n.d.b=n.d,n.d.a=n.d}function kF(n,t,e){vS(),Ob(n,t.Ve(n.a,e))}function yF(n,t,e){return UV(n,uG(t,22),e)}function MF(n,t){return aT(new Array(t),n)}function TF(n){return pz(Dz(n,32))^pz(n)}function jF(n){return String.fromCharCode(n)}function EF(n){return null==n?null:n.message}function SF(n,t,e){return n.apply(t,e)}function PF(n,t){n[U0n].call(n,t)}function CF(n,t){n[U0n].call(n,t)}function IF(n,t){return WS(),!jsn(t.d.i,n)}function OF(n,t,e,i){lX.call(this,n,t,e,i)}function AF(){HF.call(this),this.a=new sj}function LF(){this.n=new sj,this.o=new sj}function NF(){this.b=new sj,this.c=new Zm}function $F(){this.a=new Zm,this.b=new Zm}function DF(){this.a=new lt,this.b=new qv}function xF(){this.b=new u8,this.a=new u8}function RF(){this.b=new ek,this.a=new ek}function KF(){this.b=new Ym,this.a=new Ym}function FF(){this.b=new Gj,this.a=new Ma}function _F(){this.a=new hl,this.b=new oc}function BF(){this.a=new Zm,this.d=new Zm}function HF(){this.n=new Dk,this.i=new cN}function UF(n){this.a=(man(n,g1n),new R7(n))}function GF(n){this.a=(man(n,g1n),new R7(n))}function qF(n){return n<100?null:new cj(n)}function XF(n,t){return n.n.a=(tJ(t),t+10)}function zF(n,t){return n.n.a=(tJ(t),t+10)}function VF(n,t){return t==n||sSn(mRn(t),n)}function WF(n,t){return null==vJ(n.a,t,"")}function QF(n,t){return t.qi(n.a)}function JF(n,t){return n.a+=t.a,n.b+=t.b,n}function YF(n,t){return n.a-=t.a,n.b-=t.b,n}function ZF(n){return Xv(n.j.c,0),n.a=-1,n}function n_(n,t,e){return e=$Un(n,t,11,e)}function t_(n,t,e){null!=e&&Xan(t,gTn(n,e))}function e_(n,t,e){null!=e&&zan(t,gTn(n,e))}function i_(n,t,e,i){fV.call(this,n,t,e,i)}function r_(n,t,e,i){fV.call(this,n,t,e,i)}function c_(n,t,e,i){r_.call(this,n,t,e,i)}function a_(n,t,e,i){wV.call(this,n,t,e,i)}function o_(n,t,e,i){wV.call(this,n,t,e,i)}function u_(n,t,e,i){wV.call(this,n,t,e,i)}function s_(n,t,e,i){o_.call(this,n,t,e,i)}function h_(n,t,e,i){o_.call(this,n,t,e,i)}function f_(n,t,e,i){u_.call(this,n,t,e,i)}function l_(n,t,e,i){h_.call(this,n,t,e,i)}function b_(n,t,e,i){kV.call(this,n,t,e,i)}function w_(n,t){dM.call(this,Hit+n+Vet+t)}function d_(n,t){return n.jk().wi().ri(n,t)}function g_(n,t){return n.jk().wi().ti(n,t)}function p_(n,t){return tJ(n),xA(n)===xA(t)}function m_(n,t){return tJ(n),xA(n)===xA(t)}function v_(n,t){return n.b.Bd(new QP(n,t))}function k_(n,t){return n.b.Bd(new JP(n,t))}function y_(n,t){return n.b.Bd(new YP(n,t))}function M_(n,t){return n.e=uG(n.d.Kb(t),159)}function T_(n,t,e){return n.lastIndexOf(t,e)}function j_(n,t,e){return ugn(n[t.a],n[e.a])}function E_(n,t){return kfn(t,(jYn(),Oyt),n)}function S_(n,t){return d$(t.a.d.p,n.a.d.p)}function P_(n,t){return d$(n.a.d.p,t.a.d.p)}function C_(n,t){return ugn(n.c-n.s,t.c-t.s)}function I_(n,t){return ugn(n.b.e.a,t.b.e.a)}function O_(n,t){return ugn(n.c.e.a,t.c.e.a)}function A_(n){return n.c?Ten(n.c.a,n,0):-1}function L_(n){return n==rRt||n==aRt||n==cRt}function N_(n,t){this.c=n,QV.call(this,n,t)}function $_(n,t,e){this.a=n,Qx.call(this,t,e)}function D_(n){this.c=n,rL.call(this,YZn,0)}function x_(n,t,e){this.c=t,this.b=e,this.a=n}function R_(n){PU(),this.d=n,this.a=new ND}function K_(n){sB(),this.a=(hZ(),new nT(n))}function F_(n,t){hN(n.f)?JDn(n,t):wCn(n,t)}function __(n,t){sG.call(this,n,n.length,t)}function B_(n,t){Nut||t&&(n.d=t)}function H_(n,t){return F$(t,15)&&G_n(n.c,t)}function U_(n,t,e){return uG(n.c,71).Wk(t,e)}function G_(n,t,e){return uG(n.c,71).Xk(t,e)}function q_(n,t,e){return uK(n,uG(t,343),e)}function X_(n,t,e){return sK(n,uG(t,343),e)}function z_(n,t,e){return yPn(n,uG(t,343),e)}function V_(n,t,e){return FCn(n,uG(t,343),e)}function W_(n,t){return null==t?null:Xwn(n.b,t)}function Q_(n){return FA(n)?(tJ(n),n):n.ue()}function J_(n){return!isNaN(n)&&!isFinite(n)}function Y_(n){O$(this),BY(this),Qon(this,n)}function Z_(n){IN(this),dG(this.c,0,n.Pc())}function nB(n,t,e){this.a=n,this.b=t,this.c=e}function tB(n,t,e){this.a=n,this.b=t,this.c=e}function eB(n,t,e){this.d=n,this.b=e,this.a=t}function iB(n){this.a=n,bS(),Bsn(Date.now())}function rB(n){LQ(n.a),Lnn(n.c,n.b),n.b=null}function cB(){cB=E,out=new K,uut=new F}function aB(){aB=E,DFt=Inn(dat,EZn,1,0,5,1)}function oB(){oB=E,X_t=Inn(dat,EZn,1,0,5,1)}function uB(){uB=E,z_t=Inn(dat,EZn,1,0,5,1)}function sB(){sB=E,new jv((hZ(),hZ(),zot))}function hB(n){return Rtn(),Fcn((xtn(),Mut),n)}function fB(n){return ybn(),Fcn((bnn(),xut),n)}function lB(n){return _kn(),Fcn((k8(),Jut),n)}function bB(n){return Xin(),Fcn((y8(),tst),n)}function wB(n){return W_n(),Fcn((uhn(),kst),n)}function dB(n){return Yrn(),Fcn((fnn(),Cst),n)}function gB(n){return Ktn(),Fcn((hnn(),Dst),n)}function pB(n){return Yen(),Fcn((lnn(),Bst),n)}function mB(n){return JYn(),Fcn((fL(),fht),n)}function vB(n){return ehn(),Fcn((_tn(),vht),n)}function kB(n){return vyn(),Fcn((Htn(),Eht),n)}function yB(n){return myn(),Fcn((Btn(),Rht),n)}function MB(n){return BS(),Fcn((r6(),_ht),n)}function TB(n){return zin(),Fcn((M8(),vft),n)}function jB(n){return Jen(),Fcn((wnn(),vlt),n)}function EB(n){return uIn(),Fcn(($in(),Ilt),n)}function SB(n){return Xhn(),Fcn((Gtn(),Glt),n)}function PB(n){return Uvn(),Fcn((Utn(),ibt),n)}function CB(n,t){if(!n)throw hv(new vM(t))}function IB(n){if(!n)throw hv(new kM(PZn))}function OB(n,t){if(n!=t)throw hv(new Fv)}function AB(n,t,e){this.a=n,this.b=t,this.c=e}function LB(n,t,e){this.a=n,this.b=t,this.c=e}function NB(n,t,e){this.a=n,this.b=t,this.c=e}function $B(n,t,e){this.b=n,this.a=t,this.c=e}function DB(n,t,e){this.b=n,this.c=t,this.a=e}function xB(n,t,e){this.a=n,this.b=t,this.c=e}function RB(n,t,e){this.e=t,this.b=n,this.d=e}function KB(n,t,e){this.b=n,this.a=t,this.c=e}function FB(n,t,e){return vS(),n.a.Yd(t,e),t}function _B(n){var t;return(t=new yn).e=n,t}function BB(n){var t;return(t=new pk).b=n,t}function HB(){HB=E,Nbt=new $e,$bt=new De}function UB(){UB=E,Jwt=new ui,Qwt=new si}function GB(){GB=E,rdt=new mr,cdt=new vr}function qB(n){return gon(),Fcn((q7(),Cdt),n)}function XB(n){return zYn(),Fcn((lL(),_wt),n)}function zB(n){return Ghn(),Fcn((Xtn(),Wwt),n)}function VB(n){return qhn(),Fcn((qtn(),ldt),n)}function WB(n){return gPn(),Fcn((Din(),vdt),n)}function QB(n){return h_n(),Fcn((osn(),Kdt),n)}function JB(n){return vAn(),Fcn((ecn(),zdt),n)}function YB(n){return H7(),Fcn((I8(),Jdt),n)}function ZB(n){return jan(),Fcn((U7(),egt),n)}function nH(n){return ran(),Fcn((G7(),ogt),n)}function tH(n){return kvn(),Fcn((xin(),wgt),n)}function eH(n){return Vin(),Fcn((E8(),mgt),n)}function iH(n){return RIn(),Fcn((ccn(),Jgt),n)}function rH(n){return r_n(),Fcn((Efn(),spt),n)}function cH(n){return ihn(),Fcn((z7(),wpt),n)}function aH(n){return Zen(),Fcn((V7(),vpt),n)}function oH(n){return Y6(),Fcn((j8(),Tpt),n)}function uH(n){return ESn(),Fcn((rcn(),Ugt),n)}function sH(n){return Pfn(),Fcn((X7(),Tgt),n)}function hH(n){return tOn(),Fcn((icn(),Agt),n)}function fH(n){return Wtn(),Fcn((S8(),Dgt),n)}function lH(n){return Gpn(),Fcn((Kin(),$mt),n)}function bH(n){return MKn(),Fcn((chn(),ojt),n)}function wH(n){return Cwn(),Fcn((W7(),ljt),n)}function dH(n){return Yyn(),Fcn((ztn(),mjt),n)}function gH(n){return pyn(),Fcn((Rin(),Ejt),n)}function pH(n){return THn(),Fcn((Sfn(),Rjt),n)}function mH(n){return yvn(),Fcn((Vtn(),Ujt),n)}function vH(n){return nin(),Fcn((P8(),zjt),n)}function kH(n){return can(),Fcn((Y7(),Yjt),n)}function yH(n){return isn(),Fcn((Q7(),iEt),n)}function MH(n){return Sln(),Fcn((J7(),uEt),n)}function TH(n){return kbn(),Fcn((Z7(),bEt),n)}function jH(n){return ian(),Fcn((nnn(),mEt),n)}function EH(n){return zhn(),Fcn((tnn(),TEt),n)}function SH(n){return ean(),Fcn((snn(),GEt),n)}function PH(n){return Z6(),Fcn((C8(),nSt),n)}function CH(n){return b0(),Fcn((L8(),bSt),n)}function IH(n){return w0(),Fcn((N8(),pSt),n)}function OH(n){return _7(),Fcn(($8(),RSt),n)}function AH(n){return l0(),Fcn((D8(),XSt),n)}function LH(n){return Cjn(),Fcn((sen(),YSt),n)}function NH(n){return OHn(),Fcn((bL(),bPt),n)}function $H(n){return Pln(),Fcn((enn(),mPt),n)}function DH(n){return mbn(),Fcn((uen(),KCt),n)}function xH(n){return i3(),Fcn((O8(),HCt),n)}function RH(n){return pon(),Fcn((A8(),JCt),n)}function KH(n){return zPn(),Fcn((Fin(),rIt),n)}function FH(n){return vbn(),Fcn((inn(),bIt),n)}function _H(n){return Ptn(),Fcn((x8(),uIt),n)}function BH(n){return dTn(),Fcn((oen(),tOt),n)}function HH(n){return esn(),Fcn((rnn(),aOt),n)}function UH(n){return Jmn(),Fcn((cnn(),fOt),n)}function GH(n){return Zyn(),Fcn((ann(),gOt),n)}function qH(n){return Bgn(),Fcn((onn(),LOt),n)}function XH(n){return a9(),Fcn((R8(),jAt),n)}function zH(n){return Aun(),Fcn((T8(),Lbt),n)}function VH(n){return zIn(),Fcn((acn(),mbt),n)}function WH(n){return den(),Fcn((unn(),IAt),n)}function QH(n){return rhn(),Fcn((K8(),NAt),n)}function JH(n){return _Rn(),Fcn((_in(),BAt),n)}function YH(n){return nP(),Fcn(($6(),WAt),n)}function ZH(n){return Rdn(),Fcn((gnn(),XAt),n)}function nU(n){return tP(),Fcn((D6(),YAt),n)}function tU(n){return B7(),Fcn((F8(),eLt),n)}function eU(n){return pOn(),Fcn((Bin(),sLt),n)}function iU(n){return eP(),Fcn((x6(),XLt),n)}function rU(n){return Vhn(),Fcn((_8(),QLt),n)}function cU(n){return Rkn(),Fcn((Uin(),bNt),n)}function aU(n){return lAn(),Fcn((csn(),TNt),n)}function oU(n){return nMn(),Fcn((ocn(),DNt),n)}function uU(n){return ZSn(),Fcn((ucn(),t$t),n)}function sU(n){return xdn(),Fcn((Hin(),ext),n)}function hU(n){return Zrn(),Fcn((pnn(),oxt),n)}function fU(n){return _gn(),Fcn((hen(),bxt),n)}function lU(n){return RCn(),Fcn((scn(),yxt),n)}function bU(n){return Own(),Fcn((dnn(),Nxt),n)}function wU(n){return Ajn(),Fcn((fen(),Fxt),n)}function dU(n){return VDn(),Fcn((ohn(),Qxt),n)}function gU(n){return Vkn(),Fcn((Gin(),iRt),n)}function pU(n){return $Pn(),Fcn((hcn(),fRt),n)}function mU(n){return eNn(),Fcn((fcn(),vRt),n)}function vU(n){return KQn(),Fcn((qin(),HRt),n)}function kU(n){return Qmn(),Fcn((len(),ZRt),n)}function yU(n){return aUn(),Fcn((ahn(),hKt),n)}function MU(n){return Iwn(),Fcn((mnn(),dKt),n)}function TU(n,t){return tJ(n),n+(tJ(t),t)}function jU(n){return CU(),Fcn((B8(),vKt),n)}function EU(n){return qpn(),Fcn((ben(),EKt),n)}function SU(n){return Eln(),Fcn((wen(),LKt),n)}function PU(){PU=E,KQn(),zEt=_Rt,VEt=kRt}function CU(){CU=E,gKt=new Pq,pKt=new gV}function IU(n){return!n.e&&(n.e=new Zm),n.e}function OU(n,t){this.c=n,this.a=t,this.b=t-n}function AU(n,t,e){this.a=n,this.b=t,this.c=e}function LU(n,t,e){this.a=n,this.b=t,this.c=e}function NU(n,t,e){this.a=n,this.b=t,this.c=e}function $U(n,t,e){this.a=n,this.b=t,this.c=e}function DU(n,t,e){this.a=n,this.b=t,this.c=e}function xU(n,t,e){this.a=n,this.b=t,this.c=e}function RU(n,t,e){this.e=n,this.a=t,this.c=e}function KU(n,t,e){ZN(),_1.call(this,n,t,e)}function FU(n,t,e){ZN(),CQ.call(this,n,t,e)}function _U(n,t,e){ZN(),CQ.call(this,n,t,e)}function BU(n,t,e){ZN(),CQ.call(this,n,t,e)}function HU(n,t,e){ZN(),FU.call(this,n,t,e)}function UU(n,t,e){ZN(),FU.call(this,n,t,e)}function GU(n,t,e){ZN(),UU.call(this,n,t,e)}function qU(n,t,e){ZN(),_U.call(this,n,t,e)}function XU(n,t,e){ZN(),BU.call(this,n,t,e)}function zU(n){lX.call(this,n.d,n.c,n.a,n.b)}function VU(n){lX.call(this,n.d,n.c,n.a,n.b)}function WU(n){this.d=n,Cw(this),this.b=Ez(n.d)}function QU(n){return rDn(),Fcn((asn(),SFt),n)}function JU(n,t){return WW(n),WW(t),new jE(n,t)}function YU(n,t){return WW(n),WW(t),new WG(n,t)}function ZU(n,t){return WW(n),WW(t),new QG(n,t)}function nG(n,t){return WW(n),WW(t),new DE(n,t)}function tG(n){return MK(0!=n.b),Lrn(n,n.a.a)}function eG(n){return MK(0!=n.b),Lrn(n,n.c.b)}function iG(n){return!n.c&&(n.c=new Ks),n.c}function rG(n){var t;return cin(t=new Zm,n),t}function cG(n){var t;return cin(t=new ek,n),t}function aG(n){var t;return Fon(t=new rk,n),t}function oG(n){var t;return Fon(t=new lS,n),t}function uG(n,t){return Fq(null==n||Eyn(n,t)),n}function sG(n,t,e){_z.call(this,t,e),this.a=n}function hG(n,t){this.c=n,this.b=t,this.a=!1}function fG(){this.a=";,;",this.b="",this.c=""}function lG(n,t,e){this.b=n,eL.call(this,t,e)}function bG(n,t,e){this.c=n,VP.call(this,t,e)}function wG(n,t,e){FC.call(this,n,t),this.b=e}function dG(n,t,e){b$n(e,0,n,t,e.length,!1)}function gG(n,t,e,i,r){n.b=t,n.c=e,n.d=i,n.a=r}function pG(n,t,e,i,r){n.d=t,n.c=e,n.a=i,n.b=r}function mG(n,t){t&&(n.b=t,n.a=(GQ(t),t.a))}function vG(n,t){if(!n)throw hv(new vM(t))}function kG(n,t){if(!n)throw hv(new kM(t))}function yG(n,t){if(!n)throw hv(new gM(t))}function MG(n,t){return YS(),d$(n.d.p,t.d.p)}function TG(n,t){return tcn(),ugn(n.e.b,t.e.b)}function jG(n,t){return tcn(),ugn(n.e.a,t.e.a)}function EG(n,t){return d$(wq(n.d),wq(t.d))}function SG(n,t){return t&&$Q(n,t.d)?t:null}function PG(n,t){return t==(KQn(),_Rt)?n.c:n.d}function CG(n){return Esn(LV(_L(n)?Gsn(n):n))}function IG(n){return new MO(n.c+n.b,n.d+n.a)}function OG(n){return null!=n&&!mpn(n,n_t,t_t)}function AG(n,t){return(ldn(n)<<4|ldn(t))&D1n}function LG(n,t,e,i,r){n.c=t,n.d=e,n.b=i,n.a=r}function NG(n){var t,e;t=n.b,e=n.c,n.b=e,n.c=t}function $G(n){var t,e;e=n.d,t=n.a,n.d=t,n.a=e}function DG(n,t){var e;return e=n.c,Jan(n,t),e}function xG(n,t){return n.g=t<0?-1:t,n}function RG(n,t){return Brn(n),n.a*=t,n.b*=t,n}function KG(n,t,e){Orn.call(this,t,e),this.d=n}function FG(n,t,e){LA.call(this,n,t),this.c=e}function _G(n,t,e){LA.call(this,n,t),this.c=e}function BG(n){uB(),ps.call(this),this.ci(n)}function HG(){N7(),OQ.call(this,(MP(),l_t))}function UG(n){return QYn(),new IX(0,n)}function GG(){GG=E,hZ(),CBt=new Xw(bct)}function qG(){qG=E,new Gyn((my(),Tat),(py(),Mat))}function XG(){XG=E,bot=Inn(dot,zZn,17,256,0,1)}function zG(){this.b=uM(pK(Jkn((rGn(),Bft))))}function VG(n){this.b=n,this.a=Mz(this.b.a).Od()}function WG(n,t){this.b=n,this.a=t,Ff.call(this)}function QG(n,t){this.a=n,this.b=t,Ff.call(this)}function JG(n,t,e){this.a=n,vL.call(this,t,e)}function YG(n,t,e){this.a=n,vL.call(this,t,e)}function ZG(n,t,e){nrn(n,t,new QW(e))}function nq(n,t,e){var i;return i=n[t],n[t]=e,i}function tq(n){return Ltn(n.slice(),n)}function eq(n){var t;return t=n.n,n.a.b+t.d+t.a}function iq(n){var t;return t=n.n,n.e.b+t.d+t.a}function rq(n){var t;return t=n.n,n.e.a+t.b+t.c}function cq(n){n.a.b=n.b,n.b.a=n.a,n.a=n.b=null}function aq(n,t){return s8(n,t,n.c.b,n.c),!0}function oq(n){return n.a?n.a:sY(n)}function uq(n){return lZ(),bIn(n)==R0(gIn(n))}function sq(n){return lZ(),gIn(n)==R0(bIn(n))}function hq(n,t){return CEn(n,new FC(t.a,t.b))}function fq(n,t){return TJ(),IMn(n,t),new bJ(n,t)}function lq(n,t){return n.c=t)throw hv(new Ik)}function Wz(n,t){return cdn(n,(tJ(t),new ud(t)))}function Qz(n,t){return cdn(n,(tJ(t),new sd(t)))}function Jz(n,t,e){return BYn(n,uG(t,12),uG(e,12))}function Yz(n){return Lun(),0!=uG(n,12).g.c.length}function Zz(n){return Lun(),0!=uG(n,12).e.c.length}function nV(n,t){return Pun(),ugn(t.a.o.a,n.a.o.a)}function tV(n,t){t.Bb&Qtt&&!n.a.o&&(n.a.o=t)}function eV(n,t){t.Ug("General 'Rotator",1),lQn(n)}function iV(n,t,e){t.qf(e,uM(pK(cQ(n.b,e)))*n.a)}function rV(n,t,e){return l_n(),qun(n,t)&&qun(n,e)}function cV(n){return eNn(),!n.Hc(wRt)&&!n.Hc(gRt)}function aV(n){return n.e?T7(n.e):null}function oV(n){return _L(n)?""+n:K_n(n)}function uV(n){var t;for(t=n;t.f;)t=t.f;return t}function sV(n,t,e){return uQ(t,0,nX(t[0],e[0])),t}function hV(n,t,e,i){var r;(r=n.i).i=t,r.a=e,r.b=i}function fV(n,t,e,i){MD.call(this,n,t,e),this.b=i}function lV(n,t,e,i,r){btn.call(this,n,t,e,i,r,-1)}function bV(n,t,e,i,r){wtn.call(this,n,t,e,i,r,-1)}function wV(n,t,e,i){FG.call(this,n,t,e),this.b=i}function dV(n){lA.call(this,n,!1),this.a=!1}function gV(){BO.call(this,"LOOKAHEAD_LAYOUT",1)}function pV(n){this.b=n,Zx.call(this,n),qD(this)}function mV(n){this.b=n,tR.call(this,n),XD(this)}function vV(n,t,e){this.a=n,i_.call(this,t,e,5,6)}function kV(n,t,e,i){this.b=n,MD.call(this,t,e,i)}function yV(n,t){this.b=n,fb.call(this,n.b),this.a=t}function MV(n){this.a=Fyn(n.a),this.b=new Z_(n.b)}function TV(n,t){ZW(),UE.call(this,n,Dwn(new IM(t)))}function jV(n,t){return QYn(),new PQ(n,t,0)}function EV(n,t){return QYn(),new PQ(6,n,t)}function SV(n,t){for(tJ(t);n.Ob();)t.Cd(n.Pb())}function PV(n,t){return RA(t)?AZ(n,t):!!FX(n.f,t)}function CV(n,t){return t.Vh()?mwn(n.b,uG(t,54)):t}function IV(n,t){return m_(n.substr(0,t.length),t)}function OV(n){return new Fz(new YD(n.a.length,n.a))}function AV(n){return new MO(n.c+n.b/2,n.d+n.a/2)}function LV(n){return p$(~n.l&f0n,~n.m&f0n,~n.h&l0n)}function NV(n){return typeof n===wZn||typeof n===mZn}function $V(n){n.f=new nN(n),n.i=new tN(n),++n.g}function DV(n){if(!n)throw hv(new Bv);return n.d}function xV(n){var t;return MK(null!=(t=Rfn(n))),t}function RV(n){var t;return MK(null!=(t=sgn(n))),t}function KV(n,t){var e;return e7(t,e=n.a.gc()),e-t}function FV(n,t){return null==n.a.zc(t,n)}function _V(n,t){return null==n.a.zc(t,(qx(),tot))}function BV(n){return new fX(null,oW(n,n.length))}function HV(n,t,e){return HXn(n,uG(t,42),uG(e,176))}function UV(n,t,e){return Mon(n.a,t),nq(n.b,t.g,e)}function GV(n,t,e){Vz(e,n.a.c.length),Y8(n.a,e,t)}function qV(n,t,e,i){ubn(t,e,n.length),XV(n,t,e,i)}function XV(n,t,e,i){var r;for(r=t;r0?e.Math.log(n/t):-100}function rW(n,t){return dwn(n,t)<0?-1:dwn(n,t)>0?1:0}function cW(n,t){J$(n,F$(t,160)?t:uG(t,2036).Rl())}function aW(n,t){if(null==n)throw hv(new MM(t))}function oW(n,t){return $rn(t,n.length),new Sq(n,t)}function uW(n,t){return!!t&&Qon(n,t)}function sW(){return Hy(),Uhn(cT(Lat,1),p1n,549,0,[Iat])}function hW(n){return 0==n.e?n:new VV(-n.e,n.d,n.a)}function fW(n,t){return ugn(n.c.c+n.c.b,t.c.c+t.c.b)}function lW(n,t){s8(n.d,t,n.b.b,n.b),++n.a,n.c=null}function bW(n,t){return n.c?bW(n.c,t):kD(n.b,t),n}function wW(n,t,e){var i;return i=uin(n,t),W5(n,t,e),i}function dW(n,t,e){var i;for(i=0;i=n.g}function uQ(n,t,e){return yK(null==e||cGn(n,e)),n[t]=e}function sQ(n,t){return s3(t,n.length+1),n.substr(t)}function hQ(n,t){for(tJ(t);n.c=n?new mS:ton(n-1)}function HQ(n){return!n.a&&n.c?n.c.b:n.a}function UQ(n){return F$(n,616)?n:new e0(n)}function GQ(n){n.c?GQ(n.c):(vgn(n),n.d=!0)}function qQ(n){n.c?n.c.$e():(n.d=!0,uKn(n))}function XQ(n){n.b=!1,n.c=!1,n.d=!1,n.a=!1}function zQ(n){return n.c.i.c==n.d.i.c}function VQ(n,t){var e;(e=n.Ih(t))>=0?n.ki(e):zLn(n,t)}function WQ(n,t){n.c<0||n.b.b0;)n=n<<1|(n<0?1:0);return n}function CJ(n,t){var e;return e=new bQ(n),mv(t.c,e),e}function IJ(n,t){n.u.Hc((eNn(),wRt))&&vNn(n,t),knn(n,t)}function OJ(n,t){return xA(n)===xA(t)||null!=n&&udn(n,t)}function AJ(n,t){return RX(n.a,t)?n.b[uG(t,22).g]:null}function LJ(){return BS(),Uhn(cT(oft,1),p1n,489,0,[Kht])}function NJ(){return nP(),Uhn(cT(JAt,1),p1n,490,0,[zAt])}function $J(){return tP(),Uhn(cT(tLt,1),p1n,558,0,[QAt])}function DJ(){return eP(),Uhn(cT(WLt,1),p1n,539,0,[GLt])}function xJ(n){return!n.n&&(n.n=new fV(lFt,n,1,7)),n.n}function RJ(n){return!n.c&&(n.c=new fV(wFt,n,9,9)),n.c}function KJ(n){return!n.c&&(n.c=new f_(cFt,n,5,8)),n.c}function FJ(n){return!n.b&&(n.b=new f_(cFt,n,4,7)),n.b}function _J(n){return n.j.c.length=0,oY(n.c),ZF(n.a),n}function BJ(n){return n.e==wct&&kw(n,akn(n.g,n.b)),n.e}function HJ(n){return n.f==wct&&Mw(n,tEn(n.g,n.b)),n.f}function UJ(n,t,e,i){return Dsn(n,t,e,!1),pdn(n,i),n}function GJ(n,t){this.b=n,QV.call(this,n,t),qD(this)}function qJ(n,t){this.b=n,N_.call(this,n,t),XD(this)}function XJ(n){this.d=n,this.a=this.d.b,this.b=this.d.c}function zJ(n,t){this.b=n,this.c=t,this.a=new fS(this.b)}function VJ(n,t){return s3(t,n.length),n.charCodeAt(t)}function WJ(n,t){jgn(n,uM($cn(t,"x")),uM($cn(t,"y")))}function QJ(n,t){jgn(n,uM($cn(t,"x")),uM($cn(t,"y")))}function JJ(n,t){return vgn(n),new fX(n,new ien(t,n.a))}function YJ(n,t){return vgn(n),new fX(n,new f7(t,n.a))}function ZJ(n,t){return vgn(n),new IK(n,new s7(t,n.a))}function nY(n,t){return vgn(n),new OK(n,new h7(t,n.a))}function tY(n,t){return new MZ(uG(WW(n),50),uG(WW(t),50))}function eY(n,t){return ugn(n.d.c+n.d.b/2,t.d.c+t.d.b/2)}function iY(n,t,e){e.a?Mcn(n,t.b-n.f/2):ycn(n,t.a-n.g/2)}function rY(n,t){return ugn(n.g.c+n.g.b/2,t.g.c+t.g.b/2)}function cY(n,t){return qS(),ugn((tJ(n),n),(tJ(t),t))}function aY(n){return null!=n&&ZE(UFt,n.toLowerCase())}function oY(n){var t;for(t=n.Kc();t.Ob();)t.Pb(),t.Qb()}function uY(n){var t;return!(t=n.b)&&(n.b=t=new Yl(n)),t}function sY(n){return con(n)||null}function hY(n,t){var e,i;return(e=n/t)>(i=t0(e))&&++i,i}function fY(n,t,e){var i;(i=uG(n.d.Kb(e),159))&&i.Nb(t)}function lY(n,t,e){KXn(n.a,e),jhn(e),EDn(n.b,e),Mzn(t,e)}function bY(n,t,e,i){this.a=n,this.c=t,this.b=e,this.d=i}function wY(n,t,e,i){this.c=n,this.b=t,this.a=e,this.d=i}function dY(n,t,e,i){this.c=n,this.b=t,this.d=e,this.a=i}function gY(n,t,e,i){this.c=n,this.d=t,this.b=e,this.a=i}function pY(n,t,e,i){this.a=n,this.d=t,this.c=e,this.b=i}function mY(n,t,e,i){this.a=n,this.e=t,this.d=e,this.c=i}function vY(n,t,e,i){this.a=n,this.c=t,this.d=e,this.b=i}function kY(n,t,e){this.a=L1n,this.d=n,this.b=t,this.c=e}function yY(n,t,e,i){_E.call(this,n,t),this.a=e,this.b=i}function MY(n,t){this.d=(tJ(n),n),this.a=16449,this.c=t}function TY(n){this.a=new Zm,this.e=Inn(YHt,zZn,53,n,0,2)}function jY(n){n.Ug("No crossing minimization",1),n.Vg()}function EY(){Ky.call(this,"There is no more element.")}function SY(n,t,e,i){this.a=n,this.b=t,this.c=e,this.d=i}function PY(n,t,e,i){this.a=n,this.b=t,this.c=e,this.d=i}function CY(n,t,e,i){this.e=n,this.a=t,this.c=e,this.d=i}function IY(n,t,e,i){this.a=n,this.c=t,this.d=e,this.b=i}function OY(n,t,e,i){ZN(),l7.call(this,t,e,i),this.a=n}function AY(n,t,e,i){ZN(),l7.call(this,t,e,i),this.a=n}function LY(n,t,e){var i;return i=eJn(n),t.ti(e,i)}function NY(n){var t;return Urn(t=new ev,n),t}function $Y(n){var t;return MIn(t=new ev,n),t}function DY(n,t){return Qun(t,cQ(n.f,t)),null}function xY(n){return!n.b&&(n.b=new fV(aFt,n,12,3)),n.b}function RY(n){return Fq(null==n||NV(n)&&!(n.Tm===j)),n}function KY(n){return n.n&&(n.e!==E1n&&n.je(),n.j=null),n}function FY(n){if(bpn(n.d),n.d.d!=n.c)throw hv(new Fv)}function _Y(n){return MK(n.b0&&XEn(this)}function UY(n,t){this.a=n,CK.call(this,n,uG(n.d,15).fd(t))}function GY(n,t){return ugn(EX(n)*jX(n),EX(t)*jX(t))}function qY(n,t){return ugn(EX(n)*jX(n),EX(t)*jX(t))}function XY(n){return BNn(n)&&oM(gK(zDn(n,(jYn(),hMt))))}function zY(n,t){return UNn(n,uG(oIn(t,(jYn(),UMt)),17),t)}function VY(n,t){return uG(oIn(n,(GYn(),Vpt)),15).Fc(t),t}function WY(n,t){return n.b=t.b,n.c=t.c,n.d=t.d,n.a=t.a,n}function QY(n,t,e,i){this.b=n,this.c=i,rL.call(this,t,e)}function JY(n,t,e){n.i=0,n.e=0,t!=e&&tln(n,t,e)}function YY(n,t,e){n.i=0,n.e=0,t!=e&&eln(n,t,e)}function ZY(n,t,e){return JS(),opn(uG(cQ(n.e,t),529),e)}function nZ(n){return n.f||(n.f=new OE(n,n.c))}function tZ(n,t){return Hwn(n.j,t.s,t.c)+Hwn(t.e,n.s,n.c)}function eZ(n,t){n.e&&!n.e.a&&(iv(n.e,t),eZ(n.e,t))}function iZ(n,t){n.d&&!n.d.a&&(iv(n.d,t),iZ(n.d,t))}function rZ(n,t){return-ugn(EX(n)*jX(n),EX(t)*jX(t))}function cZ(n){return uG(n.ld(),149).Pg()+":"+cpn(n.md())}function aZ(){HIn(this,new Fl),this.wb=(tQ(),M_t),vj()}function oZ(n){this.b=new Zm,Ohn(this.b,this.b),this.a=n}function uZ(n,t){new lS,this.a=new Uk,this.b=n,this.c=t}function sZ(){sZ=E,Jot=new N,Yot=new N,Zot=new $}function hZ(){hZ=E,zot=new C,Vot=new O,Wot=new A}function fZ(){fZ=E,Gut=new dn,Xut=new tz,qut=new gn}function lZ(){lZ=E,aft=new Zm,cft=new Ym,rft=new Zm}function bZ(n,t){if(null==n)throw hv(new MM(t));return n}function wZ(n){return!n.a&&(n.a=new fV(bFt,n,10,11)),n.a}function dZ(n){return!n.q&&(n.q=new fV(p_t,n,11,10)),n.q}function gZ(n){return!n.s&&(n.s=new fV(o_t,n,21,17)),n.s}function pZ(n){return WW(n),KMn(new Fz(ix(n.a.Kc(),new h)))}function mZ(n,t){return Tbn(n),Tbn(t),cM(uG(n,22),uG(t,22))}function vZ(n,t,e){nrn(n,t,new Pb(Q_(e)))}function kZ(n,t,e,i,r,c){wtn.call(this,n,t,e,i,r,c?-2:-1)}function yZ(n,t,e,i){LA.call(this,t,e),this.b=n,this.a=i}function MZ(n,t){Sy.call(this,new Hz(n)),this.a=n,this.b=t}function TZ(n){this.b=n,this.c=n,n.e=null,n.c=null,this.a=1}function jZ(n){var t;GB(),(t=uG(n.g,10)).n.a=n.d.c+t.d.b}function EZ(){var n,t;EZ=E,t=!ovn(),n=new v,_at=t?new m:n}function SZ(n){return hZ(),F$(n,59)?new eT(n):new gx(n)}function PZ(n){return F$(n,16)?new oX(uG(n,16)):cG(n.Kc())}function CZ(n){return new WD(n,n.e.Rd().gc()*n.c.Rd().gc())}function IZ(n){return new QD(n,n.e.Rd().gc()*n.c.Rd().gc())}function OZ(n){return n&&n.hashCode?n.hashCode():xx(n)}function AZ(n,t){return null==t?!!FX(n.f,null):_X(n.i,t)}function LZ(n,t){var e;return(e=Q$(n.a,t))&&(t.d=null),e}function NZ(n,t,e){return!!n.f&&n.f.ef(t,e)}function $Z(n,t,e,i){uQ(n.c[t.g],e.g,i),uQ(n.c[e.g],t.g,i)}function DZ(n,t,e,i){uQ(n.c[t.g],t.g,e),uQ(n.b[t.g],t.g,i)}function xZ(n,t,e){return uM(pK(e.a))<=n&&uM(pK(e.b))>=t}function RZ(n,t){this.g=n,this.d=Uhn(cT(pbt,1),e6n,10,0,[t])}function KZ(n){this.c=n,this.b=new Hj(uG(WW(new pn),50))}function FZ(n){this.c=n,this.b=new Hj(uG(WW(new jt),50))}function _Z(n){this.b=n,this.a=new Hj(uG(WW(new nt),50))}function BZ(){this.b=new ek,this.d=new lS,this.e=new Ok}function HZ(){this.c=new sj,this.d=new sj,this.e=new sj}function UZ(){this.a=new Uk,this.b=(man(3,g1n),new R7(3))}function GZ(n,t){this.e=n,this.a=dat,this.b=$Bn(t),this.c=t}function qZ(n){this.c=n.c,this.d=n.d,this.b=n.b,this.a=n.a}function XZ(n,t,e,i,r,c){this.a=n,Ran.call(this,t,e,i,r,c)}function zZ(n,t,e,i,r,c){this.a=n,Ran.call(this,t,e,i,r,c)}function VZ(n,t,e,i,r,c,a){return new i8(n.e,t,e,i,r,c,a)}function WZ(n,t,e){return e>=0&&m_(n.substr(e,t.length),t)}function QZ(n,t){return F$(t,149)&&m_(n.b,uG(t,149).Pg())}function JZ(n,t){return n.a?t.Gh().Kc():uG(t.Gh(),71).Ii()}function YZ(n,t){var e;return w8(e=n.b.Qc(t),n.b.gc()),e}function ZZ(n,t){if(null==n)throw hv(new MM(t));return n}function n1(n){return n.u||(y9(n),n.u=new aF(n,n)),n.u}function t1(n){this.a=(hZ(),F$(n,59)?new eT(n):new gx(n))}function e1(n){return uG(Lsn(n,16),29)||n.ii()}function i1(n,t){var e;return e=Ij(n.Rm),null==t?e:e+": "+t}function r1(n,t,e){return Knn(t,e,n.length),n.substr(t,e-t)}function c1(n,t){HF.call(this),Qrn(this),this.a=n,this.c=t}function a1(n){n&&i1(n,n.ie()),String.fromCharCode(10)}function o1(n){XM(),e.setTimeout((function(){throw n}),0)}function u1(){return _kn(),Uhn(cT(nst,1),p1n,436,0,[Wut,Vut])}function s1(){return Xin(),Uhn(cT(mst,1),p1n,435,0,[Yut,Zut])}function h1(){return zin(),Uhn(cT(mlt,1),p1n,432,0,[gft,pft])}function f1(){return Aun(),Uhn(cT(Dbt,1),p1n,517,0,[Obt,Ibt])}function l1(){return Y6(),Uhn(cT(Nmt,1),p1n,429,0,[kpt,ypt])}function b1(){return Vin(),Uhn(cT(Mgt,1),p1n,428,0,[dgt,ggt])}function w1(){return H7(),Uhn(cT(tgt,1),p1n,431,0,[Vdt,Wdt])}function d1(){return nin(),Uhn(cT(Jjt,1),p1n,430,0,[Gjt,qjt])}function g1(){return Z6(),Uhn(cT(cSt,1),p1n,531,0,[YEt,JEt])}function p1(){return pon(),Uhn(cT(iIt,1),p1n,501,0,[VCt,WCt])}function m1(){return b0(),Uhn(cT(gSt,1),p1n,523,0,[fSt,hSt])}function v1(){return w0(),Uhn(cT(xSt,1),p1n,522,0,[wSt,dSt])}function k1(){return _7(),Uhn(cT(qSt,1),p1n,528,0,[DSt,$St])}function y1(){return Wtn(),Uhn(cT(Hgt,1),p1n,488,0,[Ngt,Lgt])}function M1(){return a9(),Uhn(cT(CAt,1),p1n,491,0,[yAt,MAt])}function T1(){return rhn(),Uhn(cT($At,1),p1n,492,0,[OAt,AAt])}function j1(){return i3(),Uhn(cT(QCt,1),p1n,433,0,[_Ct,FCt])}function E1(){return Ptn(),Uhn(cT(lIt,1),p1n,434,0,[cIt,aIt])}function S1(){return l0(),Uhn(cT(JSt,1),p1n,465,0,[USt,GSt])}function P1(){return B7(),Uhn(cT(uLt,1),p1n,438,0,[nLt,ZAt])}function C1(){return Vhn(),Uhn(cT(JLt,1),p1n,437,0,[VLt,zLt])}function I1(){return CU(),Uhn(cT(jKt,1),p1n,347,0,[gKt,pKt])}function O1(n,t,e,i){return e>=0?n.Uh(t,e,i):n.Ch(null,e,i)}function A1(n){return 0==n.b.b?n.a.sf():tG(n.b)}function L1(n){if(5!=n.p)throw hv(new xv);return pz(n.f)}function N1(n){if(5!=n.p)throw hv(new xv);return pz(n.k)}function $1(n){return xA(n.a)===xA((Oun(),Q_t))&&eVn(n),n.a}function D1(n,t){n.b=t,n.c>0&&n.b>0&&(n.g=mX(n.c,n.b,n.a))}function x1(n,t){n.c=t,n.c>0&&n.b>0&&(n.g=mX(n.c,n.b,n.a))}function R1(n,t){nw(this,new MO(n.a,n.b)),tw(this,oG(t))}function K1(){Py.call(this,new sS(orn(12))),FD(!0),this.a=2}function F1(n,t,e){QYn(),Qm.call(this,n),this.b=t,this.a=e}function _1(n,t,e){ZN(),Hm.call(this,t),this.a=n,this.b=e}function B1(n){var t;t=n.c.d.b,n.b=t,n.a=n.c.d,t.a=n.c.d.b=n}function H1(n){return 0==n.b?null:(MK(0!=n.b),Lrn(n,n.a.a))}function U1(n,t){return null==t?DA(FX(n.f,null)):_P(n.i,t)}function G1(n,t,e,i,r){return new AOn(n,(Rtn(),vut),t,e,i,r)}function q1(n,t){return V5(t),Jcn(n,Inn(YHt,W1n,28,t,15,1),t)}function X1(n,t){return bZ(n,"set1"),bZ(t,"set2"),new GE(n,t)}function z1(n,t){var e=Rat[n.charCodeAt(0)];return null==e?n:e}function V1(n,t){var e;return pWn(n,t,e=new B),e.d}function W1(n,t,e,i){var r;r=new AF,t.a[e.g]=r,UV(n.b,i,r)}function Q1(n,t){return JF(BR(Lcn(n.f,t)),n.f.d)}function J1(n){Lan(n.a),zN(n.a),Apn(new Ad(n.a))}function Y1(n,t){iBn(n,!0),Prn(n.e.Rf(),new DB(n,!0,t))}function Z1(n,t){return lZ(),n==R0(bIn(t))||n==R0(gIn(t))}function n0(n,t){return tcn(),uG(oIn(t,(QGn(),ACt)),17).a==n}function t0(n){return 0|Math.max(Math.min(n,vZn),-2147483648)}function e0(n){this.a=uG(WW(n),277),this.b=(hZ(),new mx(n))}function i0(n,t,e){this.i=new Zm,this.b=n,this.g=t,this.a=e}function r0(n,t,e){this.a=new Zm,this.e=n,this.f=t,this.c=e}function c0(n,t,e){this.c=new Zm,this.e=n,this.f=t,this.b=e}function a0(n){HF.call(this),Qrn(this),this.a=n,this.c=!0}function o0(n){function t(){}return t.prototype=n||{},new t}function u0(n){if(n.Ae())return null;var t=n.n;return sZn[t]}function s0(n){return n.Db>>16!=3?null:uG(n.Cb,27)}function h0(n){return n.Db>>16!=9?null:uG(n.Cb,27)}function f0(n){return n.Db>>16!=6?null:uG(n.Cb,74)}function l0(){l0=E,USt=new XI(z2n,0),GSt=new XI(V2n,1)}function b0(){b0=E,fSt=new OI(V2n,0),hSt=new OI(z2n,1)}function w0(){w0=E,wSt=new AI(c3n,0),dSt=new AI("UP",1)}function d0(){d0=E,Aat=Abn((Hy(),Uhn(cT(Lat,1),p1n,549,0,[Iat])))}function g0(n){var t;return Dfn(t=new Dj(orn(n.length)),n),t}function p0(n,t){return n.b+=t.b,n.c+=t.c,n.d+=t.d,n.a+=t.a,n}function m0(n,t){return!!Chn(n,t)&&(lan(n),!0)}function v0(n,t){if(null==t)throw hv(new Rv);return Tvn(n,t)}function k0(n,t){var e;e=n.q.getHours(),n.q.setDate(t),Iqn(n,e)}function y0(n,t,e){var i;(i=n.Ih(t))>=0?n.bi(i,e):lRn(n,t,e)}function M0(n,t){var e;return(e=n.Ih(t))>=0?n.Wh(e):$Nn(n,t)}function T0(n,t){var e;for(WW(t),e=n.a;e;e=e.c)t.Yd(e.g,e.i)}function j0(n,t,e){var i;i=Ufn(n,t,e),n.b=new Don(i.c.length)}function E0(n,t,e){W0(),n&&vJ(LFt,n,t),n&&vJ(AFt,n,e)}function S0(n,t){return UB(),qx(),uG(t.a,17).a0}function O0(n){var t;return t=n.d,t=n.bj(n.f),ttn(n,t),t.Ob()}function A0(n,t){var e;return zCn(e=new aX(t),n),new Z_(e)}function L0(n){if(0!=n.p)throw hv(new xv);return HA(n.f,0)}function N0(n){if(0!=n.p)throw hv(new xv);return HA(n.k,0)}function $0(n){return n.Db>>16!=7?null:uG(n.Cb,241)}function D0(n){return n.Db>>16!=6?null:uG(n.Cb,241)}function x0(n){return n.Db>>16!=7?null:uG(n.Cb,167)}function R0(n){return n.Db>>16!=11?null:uG(n.Cb,27)}function K0(n){return n.Db>>16!=17?null:uG(n.Cb,29)}function F0(n){return n.Db>>16!=3?null:uG(n.Cb,155)}function _0(n){return vgn(n),JJ(n,new Md(new ek))}function B0(n,t){var e=n.a=n.a||[];return e[t]||(e[t]=n.ve(t))}function H0(n,t){var e;e=n.q.getHours(),n.q.setMonth(t),Iqn(n,e)}function U0(n,t){LD(this),this.f=t,this.g=n,KY(this),this.je()}function G0(n,t){this.a=n,this.c=D$(this.a),this.b=new qZ(t)}function q0(n,t,e){this.a=t,this.c=n,this.b=(WW(e),new Z_(e))}function X0(n,t,e){this.a=t,this.c=n,this.b=(WW(e),new Z_(e))}function z0(n){this.a=n,this.b=Inn(WEt,zZn,2043,n.e.length,0,2)}function V0(){this.a=new XL,this.e=new ek,this.g=0,this.i=0}function W0(){W0=E,LFt=new Ym,AFt=new Ym,pA(iut,new fs)}function Q0(){Q0=E,jEt=wz(new wJ,(uIn(),Plt),(zYn(),Owt))}function J0(){J0=E,EEt=wz(new wJ,(uIn(),Plt),(zYn(),Owt))}function Y0(){Y0=E,PEt=wz(new wJ,(uIn(),Plt),(zYn(),Owt))}function Z0(){Z0=E,tSt=Aq(new wJ,(uIn(),Plt),(zYn(),ewt))}function n2(){n2=E,aSt=Aq(new wJ,(uIn(),Plt),(zYn(),ewt))}function t2(){t2=E,sSt=Aq(new wJ,(uIn(),Plt),(zYn(),ewt))}function e2(){e2=E,mSt=Aq(new wJ,(uIn(),Plt),(zYn(),ewt))}function i2(n,t,e,i,r,c){return new Ken(n.e,t,n.Lj(),e,i,r,c)}function r2(n,t,e){return null==t?VAn(n.f,null,e):kgn(n.i,t,e)}function c2(n,t){n.c&&men(n.c.g,n),n.c=t,n.c&&kD(n.c.g,n)}function a2(n,t){n.c&&men(n.c.a,n),n.c=t,n.c&&kD(n.c.a,n)}function o2(n,t){n.i&&men(n.i.j,n),n.i=t,n.i&&kD(n.i.j,n)}function u2(n,t){n.d&&men(n.d.e,n),n.d=t,n.d&&kD(n.d.e,n)}function s2(n,t){n.a&&men(n.a.k,n),n.a=t,n.a&&kD(n.a.k,n)}function h2(n,t){n.b&&men(n.b.f,n),n.b=t,n.b&&kD(n.b.f,n)}function f2(n,t){dQ(n,n.b,n.c),uG(n.b.b,68),t&&uG(t.b,68).b}function l2(n,t){return ugn(uG(n.c,65).c.e.b,uG(t.c,65).c.e.b)}function b2(n,t){return ugn(uG(n.c,65).c.e.a,uG(t.c,65).c.e.a)}function w2(n){return Mbn(),qx(),0!=uG(n.a,86).d.e}function d2(n,t){F$(n.Cb,184)&&(uG(n.Cb,184).tb=null),qon(n,t)}function g2(n,t){F$(n.Cb,90)&&yLn(y9(uG(n.Cb,90)),4),qon(n,t)}function p2(n,t){Pgn(n,t),F$(n.Cb,90)&&yLn(y9(uG(n.Cb,90)),2)}function m2(n,t){null!=t.c&&pQ(n,new QW(t.c))}function v2(n){var t;return vj(),Urn(t=new ev,n),t}function k2(n){var t;return vj(),Urn(t=new ev,n),t}function y2(n){for(var t;;)if(t=n.Pb(),!n.Ob())return t}function M2(n,t,e){return kD(n.a,(TJ(),IMn(t,e),new FE(t,e))),n}function T2(n,t){return PP(),ein(t)?new Cq(t,n):new OA(t,n)}function j2(n){return cHn(),dwn(n,0)>=0?Rmn(n):hW(Rmn(Men(n)))}function E2(n){var t;return t=uG(tq(n.b),9),new nB(n.a,t,n.c)}function S2(n,t){var e;return(e=uG(Xwn(nZ(n.a),t),16))?e.gc():0}function P2(n,t,e){var i;hdn(t,e,n.c.length),i=e-t,nE(n.c,t,i)}function C2(n,t,e){hdn(t,e,n.gc()),this.c=n,this.a=t,this.b=e-t}function I2(n){this.c=new lS,this.b=n.b,this.d=n.c,this.a=n.a}function O2(n){this.a=e.Math.cos(n),this.b=e.Math.sin(n)}function A2(n,t,e,i){this.c=n,this.d=i,s2(this,t),h2(this,e)}function L2(n,t){Ey.call(this,new sS(orn(n))),man(t,XZn),this.a=t}function N2(n,t,e){return new AOn(n,(Rtn(),mut),null,!1,t,e)}function $2(n,t,e){return new AOn(n,(Rtn(),kut),t,e,null,!1)}function D2(){return ybn(),Uhn(cT(Rut,1),p1n,108,0,[Cut,Iut,Out])}function x2(){return Yen(),Uhn(cT(hht,1),p1n,472,0,[Fst,Kst,Rst])}function R2(){return Ktn(),Uhn(cT(xst,1),p1n,471,0,[Ast,Ost,Lst])}function K2(){return Yrn(),Uhn(cT(Ist,1),p1n,237,0,[jst,Est,Sst])}function F2(){return Jen(),Uhn(cT(Clt,1),p1n,391,0,[glt,dlt,plt])}function _2(){return gon(),Uhn(cT(Rdt,1),p1n,372,0,[Sdt,Edt,jdt])}function B2(){return jan(),Uhn(cT(agt,1),p1n,322,0,[Zdt,Ydt,ngt])}function H2(){return ran(),Uhn(cT(bgt,1),p1n,351,0,[igt,cgt,rgt])}function U2(){return Pfn(),Uhn(cT(Ogt,1),p1n,460,0,[kgt,vgt,ygt])}function G2(){return ihn(),Uhn(cT(mpt,1),p1n,299,0,[fpt,lpt,hpt])}function q2(){return Zen(),Uhn(cT(Mpt,1),p1n,311,0,[gpt,ppt,dpt])}function X2(){return Cwn(),Uhn(cT(pjt,1),p1n,390,0,[ujt,sjt,hjt])}function z2(){return can(),Uhn(cT(eEt,1),p1n,463,0,[Qjt,Vjt,Wjt])}function V2(){return isn(),Uhn(cT(oEt,1),p1n,387,0,[Zjt,nEt,tEt])}function W2(){return Sln(),Uhn(cT(lEt,1),p1n,349,0,[aEt,rEt,cEt])}function Q2(){return kbn(),Uhn(cT(pEt,1),p1n,350,0,[sEt,hEt,fEt])}function J2(){return ian(),Uhn(cT(MEt,1),p1n,352,0,[gEt,wEt,dEt])}function Y2(){return zhn(),Uhn(cT(xEt,1),p1n,388,0,[kEt,yEt,vEt])}function Z2(){return ean(),Uhn(cT(qEt,1),p1n,464,0,[_Et,BEt,HEt])}function n3(n){return Gfn(Uhn(cT(PNt,1),zZn,8,0,[n.i.n,n.n,n.a]))}function t3(){return Pln(),Uhn(cT(RCt,1),p1n,392,0,[gPt,dPt,wPt])}function e3(){e3=E,UCt=wz(new wJ,(Cjn(),WSt),(OHn(),ePt))}function i3(){i3=E,_Ct=new JI("DFS",0),FCt=new JI("BFS",1)}function r3(n,t,e){var i;(i=new ia).b=t,i.a=e,++t.b,kD(n.d,i)}function c3(n,t,e){var i;JF(i=new eN(e.d),n),jgn(t,i.a,i.b)}function a3(n,t){pD(n,pz(E3($z(t,24),W0n)),pz(E3(t,W0n)))}function o3(n,t){if(n<0||n>t)throw hv(new dM(h2n+n+f2n+t))}function u3(n,t){if(n<0||n>=t)throw hv(new dM(h2n+n+f2n+t))}function s3(n,t){if(n<0||n>=t)throw hv(new JM(h2n+n+f2n+t))}function h3(n,t){this.b=(tJ(n),n),this.a=t&j0n?t:64|t|VZn}function f3(n){return vgn(n),sZ(),sZ(),krn(n,Yot)}function l3(n,t,e){var i;return(i=uXn(n,t,!1)).b<=t&&i.a<=e}function b3(){return den(),Uhn(cT(LAt,1),p1n,439,0,[EAt,PAt,SAt])}function w3(){return Bgn(),Uhn(cT(kAt,1),p1n,394,0,[IOt,OOt,COt])}function d3(){return Jmn(),Uhn(cT(dOt,1),p1n,445,0,[oOt,uOt,sOt])}function g3(){return Zyn(),Uhn(cT(AOt,1),p1n,456,0,[lOt,wOt,bOt])}function p3(){return vbn(),Uhn(cT(nOt,1),p1n,393,0,[sIt,hIt,fIt])}function m3(){return esn(),Uhn(cT(hOt,1),p1n,300,0,[iOt,rOt,eOt])}function v3(){return Own(),Uhn(cT(Kxt,1),p1n,346,0,[Oxt,Ixt,Axt])}function k3(){return Rdn(),Uhn(cT(VAt,1),p1n,444,0,[HAt,UAt,GAt])}function y3(){return Zrn(),Uhn(cT(lxt,1),p1n,278,0,[ixt,rxt,cxt])}function M3(){return Iwn(),Uhn(cT(mKt,1),p1n,280,0,[lKt,fKt,bKt])}function T3(n){return WW(n),F$(n,16)?new Z_(uG(n,16)):rG(n.Kc())}function j3(n,t){return n&&n.equals?n.equals(t):xA(n)===xA(t)}function E3(n,t){return Esn(Oz(_L(n)?Gsn(n):n,_L(t)?Gsn(t):t))}function S3(n,t){return Esn(Az(_L(n)?Gsn(n):n,_L(t)?Gsn(t):t))}function P3(n,t){return Esn(Lz(_L(n)?Gsn(n):n,_L(t)?Gsn(t):t))}function C3(n,t){var e;return kK(!!(e=(tJ(n),n).g)),tJ(t),e(t)}function I3(n,t){var e,i;return i=KV(n,t),e=n.a.fd(i),new BE(n,e)}function O3(n){return n.Db>>16!=6?null:uG(J$n(n),241)}function A3(n){if(2!=n.p)throw hv(new xv);return pz(n.f)&D1n}function L3(n){if(2!=n.p)throw hv(new xv);return pz(n.k)&D1n}function N3(n){return MK(n.ai?1:0}function Y3(n,t){var e;return e=jen(t),uG(cQ(n.c,e),17).a}function Z3(n,t,e){var i;i=n.d[t.p],n.d[t.p]=n.d[e.p],n.d[e.p]=i}function n4(n,t,e){var i;n.n&&t&&e&&(i=new Yu,kD(n.e,i))}function t4(n,t){if(FV(n.a,t),t.d)throw hv(new Ky(p2n));t.d=n}function e4(n,t){this.a=new Zm,this.d=new Zm,this.f=n,this.c=t}function i4(){this.c=new z$,this.a=new p7,this.b=new yk,XS()}function r4(){Whn(),this.b=new Ym,this.a=new Ym,this.c=new Zm}function c4(n,t,e){this.d=n,this.j=t,this.e=e,this.o=-1,this.p=3}function a4(n,t,e){this.d=n,this.k=t,this.f=e,this.o=-1,this.p=5}function o4(n,t,e,i,r,c){Bcn.call(this,n,t,e,i,r),c&&(this.o=-2)}function u4(n,t,e,i,r,c){Hcn.call(this,n,t,e,i,r),c&&(this.o=-2)}function s4(n,t,e,i,r,c){E9.call(this,n,t,e,i,r),c&&(this.o=-2)}function h4(n,t,e,i,r,c){qcn.call(this,n,t,e,i,r),c&&(this.o=-2)}function f4(n,t,e,i,r,c){S9.call(this,n,t,e,i,r),c&&(this.o=-2)}function l4(n,t,e,i,r,c){Ucn.call(this,n,t,e,i,r),c&&(this.o=-2)}function b4(n,t,e,i,r,c){Gcn.call(this,n,t,e,i,r),c&&(this.o=-2)}function w4(n,t,e,i,r,c){P9.call(this,n,t,e,i,r),c&&(this.o=-2)}function d4(n,t,e,i){Hm.call(this,e),this.b=n,this.c=t,this.d=i}function g4(n,t){this.f=n,this.a=(N7(),MBt),this.c=MBt,this.b=t}function p4(n,t){this.g=n,this.d=(N7(),TBt),this.a=TBt,this.b=t}function m4(n,t){!n.c&&(n.c=new wsn(n,0)),BXn(n.c,(uVn(),nHt),t)}function v4(n,t){return lxn(n,t,F$(t,102)&&!!(uG(t,19).Bb&P0n))}function k4(n,t){return rW(Bsn(n.q.getTime()),Bsn(t.q.getTime()))}function y4(n){return Dq(n.e.Rd().gc()*n.c.Rd().gc(),16,new zl(n))}function M4(n){return!(!n.u||0==z5(n.u.a).i||n.n&&yMn(n.n))}function T4(n){return!(!n.a||0==Aen(n.a.a).i||n.b&&MMn(n.b))}function j4(n,t){return 0==t?!!n.o&&0!=n.o.f:Wkn(n,t)}function E4(n,t,e){var i;return!!(i=uG(n.Zb().xc(t),16))&&i.Hc(e)}function S4(n,t,e){var i;return!!(i=uG(n.Zb().xc(t),16))&&i.Mc(e)}function P4(n,t){var e;return e=1-t,n.a[e]=Ton(n.a[e],e),Ton(n,t)}function C4(n,t){var e;return e=E3(n,L0n),S3(Nz(t,32),e)}function I4(n,t,e){WW(n),mjn(new q0(new Z_(n),t,e))}function O4(n,t,e){WW(n),vjn(new X0(new Z_(n),t,e))}function A4(n,t,e,i,r,c){return Dsn(n,t,e,c),gdn(n,i),vdn(n,r),n}function L4(n,t,e,i){return n.a+=""+r1(null==t?IZn:cpn(t),e,i),n}function N4(n,t){this.a=n,Jw.call(this,n),o3(t,n.gc()),this.b=t}function $4(n){this.a=Inn(dat,EZn,1,pfn(e.Math.max(8,n))<<1,5,1)}function D4(n){return uG(Ekn(n,Inn(pbt,e6n,10,n.c.length,0,1)),199)}function x4(n){return uG(Ekn(n,Inn(obt,t6n,18,n.c.length,0,1)),483)}function R4(n){return n.a?0==n.e.length?n.a.a:n.a.a+""+n.e:n.c}function K4(n){for(;n.d>0&&0==n.a[--n.d];);0==n.a[n.d++]&&(n.e=0)}function F4(n){return MK(n.b.b!=n.d.a),n.c=n.b=n.b.b,--n.a,n.c.c}function _4(n,t,e){n.a=t,n.c=e,n.b.a.$b(),BY(n.d),Xv(n.e.a.c,0)}function B4(n,t){var e;n.e=new dy,f$(e=GFn(t),n.c),T_n(n,e,0)}function H4(n,t,e,i){var r;(r=new gu).a=t,r.b=e,r.c=i,aq(n.a,r)}function U4(n,t,e,i){var r;(r=new gu).a=t,r.b=e,r.c=i,aq(n.b,r)}function G4(n,t,e){if(n<0||te)throw hv(new dM(QOn(n,t,e)))}function q4(n,t){if(n<0||n>=t)throw hv(new dM(TLn(n,t)));return n}function X4(n){if(!("stack"in n))try{throw n}catch(t){}return n}function z4(n){return JS(),F$(n.g,10)?uG(n.g,10):null}function V4(n){return!uY(n).dc()&&(h$(n,new w),!0)}function W4(n){var t;return _L(n)?-0==(t=n)?0:t:Gen(n)}function Q4(n,t){return!!F$(t,44)&&sTn(n.a,uG(t,44))}function J4(n,t){return!!F$(t,44)&&sTn(n.a,uG(t,44))}function Y4(n,t){return!!F$(t,44)&&sTn(n.a,uG(t,44))}function Z4(n){var t;return GQ(n),t=new D,tE(n.a,new vd(t)),t}function n6(){var n,t;return n=new ev,kD(gBt,t=n),t}function t6(n){var t;return GQ(n),t=new x,tE(n.a,new kd(t)),t}function e6(n,t){return n.a<=n.b&&(t.Dd(n.a++),!0)}function i6(n){dun.call(this,n,(Rtn(),put),null,!1,null,!1)}function r6(){r6=E,_ht=Abn((BS(),Uhn(cT(oft,1),p1n,489,0,[Kht])))}function c6(){c6=E,$Et=MJ(xwn(1),xwn(4)),NEt=MJ(xwn(1),xwn(2))}function a6(n,t){return new LU(t,HR(D$(t.e),n,n),(qx(),!0))}function o6(n){return new R7((man(n,v1n),arn(Lgn(Lgn(5,n),n/10|0))))}function u6(n){return Dq(n.e.Rd().gc()*n.c.Rd().gc(),273,new Xl(n))}function s6(n){return uG(Ekn(n,Inn(Abt,i6n,12,n.c.length,0,1)),2042)}function h6(n){return n2(),!(v9(n)||!v9(n)&&n.c.i.c==n.d.i.c)}function f6(n,t){return ncn(),uG(oIn(t,(QGn(),kCt)),17).a>=n.gc()}function l6(n,t){_Jn(t,n),NG(n.d),NG(uG(oIn(n,(jYn(),SMt)),214))}function b6(n,t){BJn(t,n),$G(n.d),$G(uG(oIn(n,(jYn(),SMt)),214))}function w6(n,t,e){n.d&&men(n.d.e,n),n.d=t,n.d&&GX(n.d.e,e,n)}function d6(n,t,e){return e.f.c.length>0?HV(n.a,t,e):HV(n.b,t,e)}function g6(n,t,e){var i;i=bkn();try{return SF(n,t,e)}finally{m8(i)}}function p6(n,t){var e,i;return i=null,(e=v0(n,t))&&(i=e.pe()),i}function m6(n,t){var e,i;return i=null,(e=v0(n,t))&&(i=e.se()),i}function v6(n,t){var e,i;return i=null,(e=uin(n,t))&&(i=e.se()),i}function k6(n,t){var e,i;return i=null,(e=v0(n,t))&&(i=uAn(e)),i}function y6(n,t,e){var i;return i=jvn(e),yHn(n.g,i,t),yHn(n.i,t,e),t}function M6(n,t,e){this.d=new qg(this),this.e=n,this.i=t,this.f=e}function T6(n,t,e,i){this.e=null,this.c=n,this.d=t,this.a=e,this.b=i}function j6(n,t,e,i){A$(this),this.c=n,this.e=t,this.f=e,this.b=i}function E6(n,t,e,i){this.d=n,this.n=t,this.g=e,this.o=i,this.p=-1}function S6(n,t,e,i){return F$(e,59)?new Yx(n,t,e,i):new qz(n,t,e,i)}function P6(n){return F$(n,16)?uG(n,16).dc():!n.Kc().Ob()}function C6(n){if(n.e.g!=n.b)throw hv(new Fv);return!!n.c&&n.d>0}function I6(n){return MK(n.b!=n.d.c),n.c=n.b,n.b=n.b.a,++n.a,n.c.c}function O6(n,t){tJ(t),uQ(n.a,n.c,t),n.c=n.c+1&n.a.length-1,JTn(n)}function A6(n,t){tJ(t),n.b=n.b-1&n.a.length-1,uQ(n.a,n.b,t),JTn(n)}function L6(n){var t;t=n.Gh(),this.a=F$(t,71)?uG(t,71).Ii():t.Kc()}function N6(n){return new h3(Vrn(uG(n.a.md(),16).gc(),n.a.ld()),16)}function $6(){$6=E,WAt=Abn((nP(),Uhn(cT(JAt,1),p1n,490,0,[zAt])))}function D6(){D6=E,YAt=Abn((tP(),Uhn(cT(tLt,1),p1n,558,0,[QAt])))}function x6(){x6=E,XLt=Abn((eP(),Uhn(cT(WLt,1),p1n,539,0,[GLt])))}function R6(){return Uvn(),Uhn(cT(abt,1),p1n,389,0,[tbt,Zlt,Ylt,nbt])}function K6(){return Rtn(),Uhn(cT(Tut,1),p1n,304,0,[put,mut,vut,kut])}function F6(){return vyn(),Uhn(cT(Sht,1),p1n,332,0,[yht,kht,Mht,Tht])}function _6(){return myn(),Uhn(cT(Fht,1),p1n,406,0,[Nht,Lht,$ht,Dht])}function B6(){return ehn(),Uhn(cT(jht,1),p1n,417,0,[pht,wht,dht,ght])}function H6(){return Xhn(),Uhn(cT(ebt,1),p1n,416,0,[Flt,Hlt,_lt,Blt])}function U6(){return qhn(),Uhn(cT(mdt,1),p1n,421,0,[odt,udt,sdt,hdt])}function G6(){return Ghn(),Uhn(cT(adt,1),p1n,371,0,[zwt,qwt,Xwt,Gwt])}function q6(){return Yyn(),Uhn(cT(jjt,1),p1n,203,0,[djt,gjt,wjt,bjt])}function X6(){return yvn(),Uhn(cT(Xjt,1),p1n,284,0,[Fjt,Kjt,_jt,Bjt])}function z6(n){return n.j==(KQn(),KRt)&&$x(_$n(n),kRt)}function V6(n,t){var e;c2(e=t.a,t.c.d),u2(e,t.d.d),Xun(e.a,n.n)}function W6(n,t){var e;return!(e=uG(ain(n.b,t),67))&&(e=new lS),e}function Q6(n){return JS(),F$(n.g,154)?uG(n.g,154):null}function J6(n){n.a=null,n.e=null,Xv(n.b.c,0),Xv(n.f.c,0),n.c=null}function Y6(){Y6=E,kpt=new sI(G2n,0),ypt=new sI("TOP_LEFT",1)}function Z6(){Z6=E,YEt=new SI("UPPER",0),JEt=new SI("LOWER",1)}function n5(n,t){return bD(new MO(t.e.a+t.f.a/2,t.e.b+t.f.b/2),n)}function t5(n,t){return uG(yx(Wz(uG(Y9(n.k,t),15).Oc(),Fdt)),113)}function e5(n,t){return uG(yx(Qz(uG(Y9(n.k,t),15).Oc(),Fdt)),113)}function i5(){return Cjn(),Uhn(cT(ZSt,1),p1n,405,0,[zSt,VSt,WSt,QSt])}function r5(){return mbn(),Uhn(cT(BCt,1),p1n,353,0,[xCt,$Ct,DCt,NCt])}function c5(){return dTn(),Uhn(cT(cOt,1),p1n,354,0,[ZIt,JIt,YIt,QIt])}function a5(){return Qmn(),Uhn(cT(sKt,1),p1n,386,0,[QRt,JRt,WRt,VRt])}function o5(){return Ajn(),Uhn(cT(Wxt,1),p1n,291,0,[Rxt,$xt,Dxt,xxt])}function u5(){return _gn(),Uhn(cT(kxt,1),p1n,223,0,[fxt,sxt,uxt,hxt])}function s5(){return qpn(),Uhn(cT(SKt,1),p1n,320,0,[TKt,kKt,MKt,yKt])}function h5(){return Eln(),Uhn(cT(DKt,1),p1n,415,0,[CKt,IKt,PKt,OKt])}function f5(n){return W0(),PV(LFt,n)?uG(cQ(LFt,n),341).Qg():null}function l5(n,t,e){return t<0?$Nn(n,e):uG(e,69).wk().Bk(n,n.hi(),t)}function b5(n,t,e){var i;return i=jvn(e),yHn(n.j,i,t),vJ(n.k,t,e),t}function w5(n,t,e){var i;return i=jvn(e),yHn(n.d,i,t),vJ(n.e,t,e),t}function d5(n){var t;return gj(),t=new es,n&&ARn(t,n),t}function g5(n){var t;return t=n.aj(n.i),n.i>0&&qGn(n.g,0,t,0,n.i),t}function p5(n,t){var e;for(e=n.j.c.length;e>24}function y5(n){if(1!=n.p)throw hv(new xv);return pz(n.k)<<24>>24}function M5(n){if(7!=n.p)throw hv(new xv);return pz(n.k)<<16>>16}function T5(n){if(7!=n.p)throw hv(new xv);return pz(n.f)<<16>>16}function j5(n,t){return 0==t.e||0==n.e?_ot:(b_n(),yKn(n,t))}function E5(n,t){return xA(t)===xA(n)?"(this Map)":null==t?IZn:cpn(t)}function S5(n,t,e){return Rz(pK(DA(FX(n.f,t))),pK(DA(FX(n.f,e))))}function P5(n,t,e){var i;i=uG(cQ(n.g,e),60),kD(n.a.c,new WO(t,i))}function C5(n,t,e){n.i=0,n.e=0,t!=e&&(eln(n,t,e),tln(n,t,e))}function I5(n,t,e,i,r){kD(t,uLn(r,Bxn(r,e,i))),LIn(n,r,t)}function O5(n,t,e,i,r){this.i=n,this.a=t,this.e=e,this.j=i,this.f=r}function A5(n,t){HZ.call(this),this.a=n,this.b=t,kD(this.a.b,this)}function L5(n){this.b=new Ym,this.c=new Ym,this.d=new Ym,this.a=n}function N5(n,t){var e;return e=new QM,n.Gd(e),e.a+="..",t.Hd(e),e.a}function $5(n,t){var e;for(e=t;e;)KR(n,e.i,e.j),e=R0(e);return n}function D5(n,t,e){var i;return i=jvn(e),vJ(n.b,i,t),vJ(n.c,t,e),t}function x5(n){var t;for(t=0;n.Ob();)n.Pb(),t=Lgn(t,1);return arn(t)}function R5(n,t){var e;return PP(),uOn(e=uG(n,69).vk(),t),e.xl(t)}function K5(n,t,e){if(e){var i=e.oe();n.a[t]=i(e)}else delete n.a[t]}function F5(n,t){var e;e=n.q.getHours(),n.q.setFullYear(t+V1n),Iqn(n,e)}function _5(n,t){return uG(null==t?DA(FX(n.f,null)):_P(n.i,t),288)}function B5(n,t){return n==(zIn(),dbt)&&t==dbt?4:n==dbt||t==dbt?8:32}function H5(n,t,e){return aqn(n,t,e,F$(t,102)&&!!(uG(t,19).Bb&P0n))}function U5(n,t,e){return Dqn(n,t,e,F$(t,102)&&!!(uG(t,19).Bb&P0n))}function G5(n,t,e){return Cxn(n,t,e,F$(t,102)&&!!(uG(t,19).Bb&P0n))}function q5(n){n.b!=n.c&&(n.a=Inn(dat,EZn,1,8,5,1),n.b=0,n.c=0)}function X5(n){return MK(n.a=0&&n.a[e]===t[e];e--);return e<0}function g8(n){var t;return n?new aX(n):(Fon(t=new XL,n),t)}function p8(n,t){var e,i;i=!1;do{i|=e=Tfn(n,t)}while(e);return i}function m8(n){n&&Cin((Gy(),Fat)),--Uat,n&&-1!=qat&&(jL(qat),qat=-1)}function v8(n){aCn(),pD(this,pz(E3($z(n,24),W0n)),pz(E3(n,W0n)))}function k8(){k8=E,Jut=Abn((_kn(),Uhn(cT(nst,1),p1n,436,0,[Wut,Vut])))}function y8(){y8=E,tst=Abn((Xin(),Uhn(cT(mst,1),p1n,435,0,[Yut,Zut])))}function M8(){M8=E,vft=Abn((zin(),Uhn(cT(mlt,1),p1n,432,0,[gft,pft])))}function T8(){T8=E,Lbt=Abn((Aun(),Uhn(cT(Dbt,1),p1n,517,0,[Obt,Ibt])))}function j8(){j8=E,Tpt=Abn((Y6(),Uhn(cT(Nmt,1),p1n,429,0,[kpt,ypt])))}function E8(){E8=E,mgt=Abn((Vin(),Uhn(cT(Mgt,1),p1n,428,0,[dgt,ggt])))}function S8(){S8=E,Dgt=Abn((Wtn(),Uhn(cT(Hgt,1),p1n,488,0,[Ngt,Lgt])))}function P8(){P8=E,zjt=Abn((nin(),Uhn(cT(Jjt,1),p1n,430,0,[Gjt,qjt])))}function C8(){C8=E,nSt=Abn((Z6(),Uhn(cT(cSt,1),p1n,531,0,[YEt,JEt])))}function I8(){I8=E,Jdt=Abn((H7(),Uhn(cT(tgt,1),p1n,431,0,[Vdt,Wdt])))}function O8(){O8=E,HCt=Abn((i3(),Uhn(cT(QCt,1),p1n,433,0,[_Ct,FCt])))}function A8(){A8=E,JCt=Abn((pon(),Uhn(cT(iIt,1),p1n,501,0,[VCt,WCt])))}function L8(){L8=E,bSt=Abn((b0(),Uhn(cT(gSt,1),p1n,523,0,[fSt,hSt])))}function N8(){N8=E,pSt=Abn((w0(),Uhn(cT(xSt,1),p1n,522,0,[wSt,dSt])))}function $8(){$8=E,RSt=Abn((_7(),Uhn(cT(qSt,1),p1n,528,0,[DSt,$St])))}function D8(){D8=E,XSt=Abn((l0(),Uhn(cT(JSt,1),p1n,465,0,[USt,GSt])))}function x8(){x8=E,uIt=Abn((Ptn(),Uhn(cT(lIt,1),p1n,434,0,[cIt,aIt])))}function R8(){R8=E,jAt=Abn((a9(),Uhn(cT(CAt,1),p1n,491,0,[yAt,MAt])))}function K8(){K8=E,NAt=Abn((rhn(),Uhn(cT($At,1),p1n,492,0,[OAt,AAt])))}function F8(){F8=E,eLt=Abn((B7(),Uhn(cT(uLt,1),p1n,438,0,[nLt,ZAt])))}function _8(){_8=E,QLt=Abn((Vhn(),Uhn(cT(JLt,1),p1n,437,0,[VLt,zLt])))}function B8(){B8=E,vKt=Abn((CU(),Uhn(cT(jKt,1),p1n,347,0,[gKt,pKt])))}function H8(){return xdn(),Uhn(cT(axt,1),p1n,88,0,[ZDt,YDt,JDt,QDt,nxt])}function U8(){return KQn(),Uhn(cT(YRt,1),z4n,64,0,[FRt,yRt,kRt,KRt,_Rt])}function G8(n,t,e){return uG(null==t?VAn(n.f,null,e):kgn(n.i,t,e),288)}function q8(n){return(n.k==(zIn(),dbt)||n.k==lbt)&&vR(n,(GYn(),$pt))}function X8(n){return n.c&&n.d?z3(n.c)+"->"+z3(n.d):"e_"+xx(n)}function z8(n,t){var e,i;for(tJ(t),i=n.Kc();i.Ob();)e=i.Pb(),t.Cd(e)}function V8(n,t){var e;vZ(e=new _y,"x",t.a),vZ(e,"y",t.b),pQ(n,e)}function W8(n,t){var e;vZ(e=new _y,"x",t.a),vZ(e,"y",t.b),pQ(n,e)}function Q8(n,t){var e;for(e=t;e;)KR(n,-e.i,-e.j),e=R0(e);return n}function J8(n,t){var e,i;for(e=t,i=0;e>0;)i+=n.a[e],e-=e&-e;return i}function Y8(n,t,e){var i;return u3(t,n.c.length),i=n.c[t],n.c[t]=e,i}function Z8(n,t,e){n.a.c.length=0,sVn(n,t,e),0==n.a.c.length||pUn(n,t)}function n9(n){n.i=0,FP(n.b,null),FP(n.c,null),n.a=null,n.e=null,++n.g}function t9(){t9=E,Nut=!0,Aut=!1,Lut=!1,Dut=!1,$ut=!1}function e9(n){t9(),Nut||(this.c=n,this.e=!0,this.a=new Zm)}function i9(n,t){this.c=0,this.b=t,iL.call(this,n,17493),this.a=this.c}function r9(n){NYn(),dv(this),this.a=new lS,Lln(this,n),aq(this.a,n)}function c9(){IN(this),this.b=new MO(M0n,M0n),this.a=new MO(T0n,T0n)}function a9(){a9=E,yAt=new oO(x6n,0),MAt=new oO("TARGET_WIDTH",1)}function o9(n,t){return(vgn(n),Qj(new fX(n,new ien(t,n.a)))).Bd(Kut)}function u9(){return uIn(),Uhn(cT(Llt,1),p1n,367,0,[Tlt,jlt,Elt,Slt,Plt])}function s9(){return gPn(),Uhn(cT(Pdt,1),p1n,375,0,[wdt,gdt,pdt,ddt,bdt])}function h9(){return kvn(),Uhn(cT(pgt,1),p1n,348,0,[sgt,ugt,fgt,lgt,hgt])}function f9(){return pyn(),Uhn(cT(xjt,1),p1n,323,0,[Tjt,kjt,yjt,vjt,Mjt])}function l9(){return Gpn(),Uhn(cT(ajt,1),p1n,171,0,[Lmt,Cmt,Imt,Omt,Amt])}function b9(){return zPn(),Uhn(cT(oIt,1),p1n,368,0,[tIt,YCt,eIt,ZCt,nIt])}function w9(){return _Rn(),Uhn(cT(qAt,1),p1n,373,0,[xAt,DAt,KAt,RAt,FAt])}function d9(){return pOn(),Uhn(cT(qLt,1),p1n,324,0,[iLt,rLt,oLt,cLt,aLt])}function g9(){return Rkn(),Uhn(cT(MNt,1),p1n,170,0,[hNt,sNt,oNt,fNt,uNt])}function p9(){return Vkn(),Uhn(cT(hRt,1),p1n,256,0,[Zxt,tRt,Jxt,Yxt,nRt])}function m9(n){return XM(),function(){return g6(n,this,arguments)}}function v9(n){return!(!n.c||!n.d||!n.c.i||n.c.i!=n.d.i)}function k9(n,t){return!!F$(t,143)&&m_(n.c,uG(t,143).c)}function y9(n){return n.t||(n.t=new $m(n),$dn(new Qy(n),0,n.t)),n.t}function M9(n){this.b=n,DD.call(this,n),this.a=uG(Lsn(this.b.a,4),129)}function T9(n){this.b=n,nR.call(this,n),this.a=uG(Lsn(this.b.a,4),129)}function j9(n,t,e,i,r){b7.call(this,t,i,r),Kf(this),this.c=n,this.b=e}function E9(n,t,e,i,r){c4.call(this,t,i,r),Kf(this),this.c=n,this.a=e}function S9(n,t,e,i,r){a4.call(this,t,i,r),Kf(this),this.c=n,this.a=e}function P9(n,t,e,i,r){b7.call(this,t,i,r),Kf(this),this.c=n,this.a=e}function C9(n,t){return uG(ain(n.d,t),23)||uG(ain(n.e,t),23)}function I9(n,t){var e,i;return e=t.ld(),!!(i=n.Fe(e))&&OJ(i.e,t.md())}function O9(n,t){var e;return new FE(e=t.ld(),n.e.pc(e,uG(t.md(),16)))}function A9(n,t){var e;return null==(e=n.a.get(t))?Inn(dat,EZn,1,0,5,1):e}function L9(n){var t;return t=n.length,m_(S0n.substr(S0n.length-t,t),n)}function N9(n){if(hDn(n))return n.c=n.a,n.a.Pb();throw hv(new Bv)}function $9(n,t){return 0==t||0==n.e?n:t>0?MFn(n,t):rvn(n,-t)}function D9(n,t){return 0==t||0==n.e?n:t>0?rvn(n,t):MFn(n,-t)}function x9(n){xP.call(this,null==n?IZn:cpn(n),F$(n,82)?uG(n,82):null)}function R9(n){var t;return n.c||F$(t=n.r,90)&&(n.c=uG(t,29)),n.c}function K9(n){var t;return zsn(t=new UZ,n),kfn(t,(jYn(),bMt),null),t}function F9(n){var t,e;return t=n.c.i,e=n.d.i,t.k==(zIn(),lbt)&&e.k==lbt}function _9(n){return p$(n&f0n,n>>22&f0n,n<0?l0n:0)}function B9(n){var t,e,i;for(e=0,i=(t=n).length;e=0?n.Lh(i,e,!0):YNn(n,t,e)}function G9(n,t,e){return ugn(bD($kn(n),D$(t.b)),bD($kn(n),D$(e.b)))}function q9(n,t,e){return ugn(bD($kn(n),D$(t.e)),bD($kn(n),D$(e.e)))}function X9(n,t){return e.Math.min(atn(t.a,n.d.d.c),atn(t.b,n.d.d.c))}function z9(n,t){n._i(n.i+1),yD(n,n.i,n.Zi(n.i,t)),n.Mi(n.i++,t),n.Ni()}function V9(n){var t,e;++n.j,t=n.g,e=n.i,n.g=null,n.i=0,n.Oi(e,t),n.Ni()}function W9(n,t,e){var i;xun(i=new U$(n.a),n.a.a),VAn(i.f,t,e),n.a.a=i}function Q9(n,t,e,i){var r;for(r=0;r<$st;r++)qX(n.a[r][t.g],e,i[t.g])}function J9(n,t,e,i){var r;for(r=0;rt)throw hv(new dM(iLn(n,t,"index")));return n}function i7(n,t){var e;return u3(t,n.c.length),e=n.c[t],nE(n.c,t,1),e}function r7(n,t){var e,i;return tJ(n),e=n,tJ(t),e==(i=t)?0:et.p?-1:0}function E7(n){var t;return n.a||F$(t=n.r,156)&&(n.a=uG(t,156)),n.a}function S7(n,t,e){return++n.e,--n.f,uG(n.d[t].gd(e),136).md()}function P7(n){var t;return t=n.ld(),JU(uG(n.md(),16).Nc(),new Wl(t))}function C7(n,t){return!!PV(n.a,t)&&(u7(n.a,t),!0)}function I7(n,t,e){return q4(t,n.e.Rd().gc()),q4(e,n.c.Rd().gc()),n.a[t][e]}function O7(n,t,e){this.a=n,this.b=t,this.c=e,kD(n.t,this),kD(t.i,this)}function A7(n,t,e,i){this.f=n,this.e=t,this.d=e,this.b=i,this.c=i?i.d:null}function L7(){this.b=new lS,this.a=new lS,this.b=new lS,this.a=new lS}function N7(){var n,t;N7=E,vj(),t=new Gv,MBt=t,n=new Wk,TBt=n}function $7(n){return vgn(n),new IK(n,new lG(n,n.a.e,4|n.a.d))}function D7(n){var t;for(GQ(n),t=0;n.a.Bd(new hn);)t=Lgn(t,1);return t}function x7(n,t){return tJ(t),n.c=0,"Initial capacity must not be negative")}function K7(){K7=E,jNt=new Cm("org.eclipse.elk.labels.labelManager")}function F7(){F7=E,Uwt=new uF("separateLayerConnections",(Ghn(),zwt))}function _7(){_7=E,DSt=new qI("REGULAR",0),$St=new qI("CRITICAL",1)}function B7(){B7=E,nLt=new lO("FIXED",0),ZAt=new lO("CENTER_NODE",1)}function H7(){H7=E,Vdt=new WC("QUADRATIC",0),Wdt=new WC("SCANLINE",1)}function U7(){U7=E,egt=Abn((jan(),Uhn(cT(agt,1),p1n,322,0,[Zdt,Ydt,ngt])))}function G7(){G7=E,ogt=Abn((ran(),Uhn(cT(bgt,1),p1n,351,0,[igt,cgt,rgt])))}function q7(){q7=E,Cdt=Abn((gon(),Uhn(cT(Rdt,1),p1n,372,0,[Sdt,Edt,jdt])))}function X7(){X7=E,Tgt=Abn((Pfn(),Uhn(cT(Ogt,1),p1n,460,0,[kgt,vgt,ygt])))}function z7(){z7=E,wpt=Abn((ihn(),Uhn(cT(mpt,1),p1n,299,0,[fpt,lpt,hpt])))}function V7(){V7=E,vpt=Abn((Zen(),Uhn(cT(Mpt,1),p1n,311,0,[gpt,ppt,dpt])))}function W7(){W7=E,ljt=Abn((Cwn(),Uhn(cT(pjt,1),p1n,390,0,[ujt,sjt,hjt])))}function Q7(){Q7=E,iEt=Abn((isn(),Uhn(cT(oEt,1),p1n,387,0,[Zjt,nEt,tEt])))}function J7(){J7=E,uEt=Abn((Sln(),Uhn(cT(lEt,1),p1n,349,0,[aEt,rEt,cEt])))}function Y7(){Y7=E,Yjt=Abn((can(),Uhn(cT(eEt,1),p1n,463,0,[Qjt,Vjt,Wjt])))}function Z7(){Z7=E,bEt=Abn((kbn(),Uhn(cT(pEt,1),p1n,350,0,[sEt,hEt,fEt])))}function nnn(){nnn=E,mEt=Abn((ian(),Uhn(cT(MEt,1),p1n,352,0,[gEt,wEt,dEt])))}function tnn(){tnn=E,TEt=Abn((zhn(),Uhn(cT(xEt,1),p1n,388,0,[kEt,yEt,vEt])))}function enn(){enn=E,mPt=Abn((Pln(),Uhn(cT(RCt,1),p1n,392,0,[gPt,dPt,wPt])))}function inn(){inn=E,bIt=Abn((vbn(),Uhn(cT(nOt,1),p1n,393,0,[sIt,hIt,fIt])))}function rnn(){rnn=E,aOt=Abn((esn(),Uhn(cT(hOt,1),p1n,300,0,[iOt,rOt,eOt])))}function cnn(){cnn=E,fOt=Abn((Jmn(),Uhn(cT(dOt,1),p1n,445,0,[oOt,uOt,sOt])))}function ann(){ann=E,gOt=Abn((Zyn(),Uhn(cT(AOt,1),p1n,456,0,[lOt,wOt,bOt])))}function onn(){onn=E,LOt=Abn((Bgn(),Uhn(cT(kAt,1),p1n,394,0,[IOt,OOt,COt])))}function unn(){unn=E,IAt=Abn((den(),Uhn(cT(LAt,1),p1n,439,0,[EAt,PAt,SAt])))}function snn(){snn=E,GEt=Abn((ean(),Uhn(cT(qEt,1),p1n,464,0,[_Et,BEt,HEt])))}function hnn(){hnn=E,Dst=Abn((Ktn(),Uhn(cT(xst,1),p1n,471,0,[Ast,Ost,Lst])))}function fnn(){fnn=E,Cst=Abn((Yrn(),Uhn(cT(Ist,1),p1n,237,0,[jst,Est,Sst])))}function lnn(){lnn=E,Bst=Abn((Yen(),Uhn(cT(hht,1),p1n,472,0,[Fst,Kst,Rst])))}function bnn(){bnn=E,xut=Abn((ybn(),Uhn(cT(Rut,1),p1n,108,0,[Cut,Iut,Out])))}function wnn(){wnn=E,vlt=Abn((Jen(),Uhn(cT(Clt,1),p1n,391,0,[glt,dlt,plt])))}function dnn(){dnn=E,Nxt=Abn((Own(),Uhn(cT(Kxt,1),p1n,346,0,[Oxt,Ixt,Axt])))}function gnn(){gnn=E,XAt=Abn((Rdn(),Uhn(cT(VAt,1),p1n,444,0,[HAt,UAt,GAt])))}function pnn(){pnn=E,oxt=Abn((Zrn(),Uhn(cT(lxt,1),p1n,278,0,[ixt,rxt,cxt])))}function mnn(){mnn=E,dKt=Abn((Iwn(),Uhn(cT(mKt,1),p1n,280,0,[lKt,fKt,bKt])))}function vnn(n,t){return!n.o&&(n.o=new ltn((tYn(),XKt),EFt,n,0)),ymn(n.o,t)}function knn(n,t){var e;n.C&&((e=uG(AJ(n.b,t),127).n).d=n.C.d,e.a=n.C.a)}function ynn(n){var t,e,i,r;r=n.d,t=n.a,e=n.b,i=n.c,n.d=e,n.a=i,n.b=r,n.c=t}function Mnn(n){return!n.g&&(n.g=new ds),!n.g.b&&(n.g.b=new Om(n)),n.g.b}function Tnn(n){return!n.g&&(n.g=new ds),!n.g.c&&(n.g.c=new Nm(n)),n.g.c}function jnn(n){return!n.g&&(n.g=new ds),!n.g.d&&(n.g.d=new Am(n)),n.g.d}function Enn(n){return!n.g&&(n.g=new ds),!n.g.a&&(n.g.a=new Lm(n)),n.g.a}function Snn(n,t,e,i){return e&&(i=e.Rh(t,emn(e.Dh(),n.c.uk()),null,i)),i}function Pnn(n,t,e,i){return e&&(i=e.Th(t,emn(e.Dh(),n.c.uk()),null,i)),i}function Cnn(n,t,e,i){var r;return KGn(r=Inn(YHt,W1n,28,t+1,15,1),n,t,e,i),r}function Inn(n,t,e,i,r,c){var a;return a=PTn(r,i),10!=r&&Uhn(cT(n,c),t,e,r,a),a}function Onn(n,t,e){var i,r;for(r=new Zsn(t,n),i=0;ie||t=0?n.Lh(e,!0,!0):YNn(n,t,!0)}function ktn(n,t,e){var i;return i=Ufn(n,t,e),n.b=new Don(i.c.length),ZFn(n,i)}function ytn(n){if(n.b<=0)throw hv(new Bv);return--n.b,n.a-=n.c.c,xwn(n.a)}function Mtn(n){var t;if(!n.a)throw hv(new EY);return t=n.a,n.a=R0(n.a),t}function Ttn(n){for(;!n.a;)if(!y_(n.c,new yd(n)))return!1;return!0}function jtn(n){return WW(n),F$(n,204)?uG(n,204):new sb(n)}function Etn(n){Stn(),uG(n.of((XYn(),bDt)),181).Fc((eNn(),dRt)),n.qf(lDt,null)}function Stn(){Stn=E,tNt=new hu,iNt=new fu,eNt=Rln((XYn(),lDt),tNt,q$t,iNt)}function Ptn(){Ptn=E,cIt=new nO("LEAF_NUMBER",0),aIt=new nO("NODE_SIZE",1)}function Ctn(n){n.a=Inn(YHt,W1n,28,n.b+1,15,1),n.c=Inn(YHt,W1n,28,n.b,15,1),n.d=0}function Itn(n,t){n.a.Ne(t.d,n.b)>0&&(kD(n.c,new wG(t.c,t.d,n.d)),n.b=t.d)}function Otn(n,t){if(null==n.g||t>=n.i)throw hv(new pL(t,n.i));return n.g[t]}function Atn(n,t,e){if(gln(n,e),null!=e&&!n.fk(e))throw hv(new Nv);return e}function Ltn(n,t){return 10!=Min(t)&&Uhn(Tbn(t),t.Sm,t.__elementTypeId$,Min(t),n),n}function Ntn(n,t,e,i){sZ(),i=i||Jot,rLn(n.slice(t,e),n,t,e,-t,i)}function $tn(n,t,e,i,r){return t<0?YNn(n,e,i):uG(e,69).wk().yk(n,n.hi(),t,i,r)}function Dtn(n,t){return ugn(uM(pK(oIn(n,(GYn(),bmt)))),uM(pK(oIn(t,bmt))))}function xtn(){xtn=E,Mut=Abn((Rtn(),Uhn(cT(Tut,1),p1n,304,0,[put,mut,vut,kut])))}function Rtn(){Rtn=E,put=new qP("All",0),mut=new SN,vut=new P$,kut=new EN}function Ktn(){Ktn=E,Ast=new aC(z2n,0),Ost=new aC(G2n,1),Lst=new aC(V2n,2)}function Ftn(){Ftn=E,tXn(),sHt=M0n,uHt=T0n,fHt=new Rw(M0n),hHt=new Rw(T0n)}function _tn(){_tn=E,vht=Abn((ehn(),Uhn(cT(jht,1),p1n,417,0,[pht,wht,dht,ght])))}function Btn(){Btn=E,Rht=Abn((myn(),Uhn(cT(Fht,1),p1n,406,0,[Nht,Lht,$ht,Dht])))}function Htn(){Htn=E,Eht=Abn((vyn(),Uhn(cT(Sht,1),p1n,332,0,[yht,kht,Mht,Tht])))}function Utn(){Utn=E,ibt=Abn((Uvn(),Uhn(cT(abt,1),p1n,389,0,[tbt,Zlt,Ylt,nbt])))}function Gtn(){Gtn=E,Glt=Abn((Xhn(),Uhn(cT(ebt,1),p1n,416,0,[Flt,Hlt,_lt,Blt])))}function qtn(){qtn=E,ldt=Abn((qhn(),Uhn(cT(mdt,1),p1n,421,0,[odt,udt,sdt,hdt])))}function Xtn(){Xtn=E,Wwt=Abn((Ghn(),Uhn(cT(adt,1),p1n,371,0,[zwt,qwt,Xwt,Gwt])))}function ztn(){ztn=E,mjt=Abn((Yyn(),Uhn(cT(jjt,1),p1n,203,0,[djt,gjt,wjt,bjt])))}function Vtn(){Vtn=E,Ujt=Abn((yvn(),Uhn(cT(Xjt,1),p1n,284,0,[Fjt,Kjt,_jt,Bjt])))}function Wtn(){Wtn=E,Ngt=new iI(q4n,0),Lgt=new iI("IMPROVE_STRAIGHTNESS",1)}function Qtn(n,t){var e,i;return i=t/n.c.Rd().gc()|0,e=t%n.c.Rd().gc(),I7(n,i,e)}function Jtn(n){var t;if(n.nl())for(t=n.i-1;t>=0;--t)zrn(n,t);return g5(n)}function Ytn(n){var t,e;if(!n.b)return null;for(e=n.b;t=e.a[0];)e=t;return e}function Ztn(n){var t,e;if(!n.b)return null;for(e=n.b;t=e.a[1];)e=t;return e}function nen(n){return F$(n,180)?""+uG(n,180).a:null==n?null:cpn(n)}function ten(n){return F$(n,180)?""+uG(n,180).a:null==n?null:cpn(n)}function een(n,t){if(t.a)throw hv(new Ky(p2n));FV(n.a,t),t.a=n,!n.j&&(n.j=t)}function ien(n,t){rL.call(this,t.zd(),-16449&t.yd()),tJ(n),this.a=n,this.c=t}function ren(n,t){return new LU(t,KR(D$(t.e),t.f.a+n,t.f.b+n),(qx(),!1))}function cen(n,t){return PU(),kD(n,new WO(t,xwn(t.e.c.length+t.g.c.length)))}function aen(n,t){return PU(),kD(n,new WO(t,xwn(t.e.c.length+t.g.c.length)))}function oen(){oen=E,tOt=Abn((dTn(),Uhn(cT(cOt,1),p1n,354,0,[ZIt,JIt,YIt,QIt])))}function uen(){uen=E,KCt=Abn((mbn(),Uhn(cT(BCt,1),p1n,353,0,[xCt,$Ct,DCt,NCt])))}function sen(){sen=E,YSt=Abn((Cjn(),Uhn(cT(ZSt,1),p1n,405,0,[zSt,VSt,WSt,QSt])))}function hen(){hen=E,bxt=Abn((_gn(),Uhn(cT(kxt,1),p1n,223,0,[fxt,sxt,uxt,hxt])))}function fen(){fen=E,Fxt=Abn((Ajn(),Uhn(cT(Wxt,1),p1n,291,0,[Rxt,$xt,Dxt,xxt])))}function len(){len=E,ZRt=Abn((Qmn(),Uhn(cT(sKt,1),p1n,386,0,[QRt,JRt,WRt,VRt])))}function ben(){ben=E,EKt=Abn((qpn(),Uhn(cT(SKt,1),p1n,320,0,[TKt,kKt,MKt,yKt])))}function wen(){wen=E,LKt=Abn((Eln(),Uhn(cT(DKt,1),p1n,415,0,[CKt,IKt,PKt,OKt])))}function den(){den=E,EAt=new uO(g7n,0),PAt=new uO(k9n,1),SAt=new uO(q4n,2)}function gen(n,t,e,i,r){return tJ(n),tJ(t),tJ(e),tJ(i),tJ(r),new WV(n,t,i)}function pen(n,t){var e;return(e=uG(u7(n.e,t),400))?(cq(e),e.e):null}function men(n,t){var e;return-1!=(e=Ten(n,t,0))&&(i7(n,e),!0)}function ven(n,t,e){var i;return GQ(n),(i=new un).a=t,n.a.Nb(new nC(i,e)),i.a}function ken(n){var t;return GQ(n),t=Inn(eUt,I0n,28,0,15,1),tE(n.a,new md(t)),t}function yen(n){var t;if(!oon(n))throw hv(new Bv);return n.e=1,t=n.d,n.d=null,t}function Men(n){var t;return _L(n)&&(t=0-n,!isNaN(t))?t:Esn(gfn(n))}function Ten(n,t,e){for(;e=0?Dyn(n,e,!0,!0):YNn(n,t,!0)}function Ven(n){var t;return null==(t=Kcn(Lsn(n,32)))&&($vn(n),t=Kcn(Lsn(n,32))),t}function Wen(n){var t;return n.Oh()||(t=iQ(n.Dh())-n.ji(),n.$h().Mk(t)),n.zh()}function Qen(n,t){Iht=new et,xht=t,uG((Cht=n).b,68),Rnn(Cht,Iht,null),Szn(Cht)}function Jen(){Jen=E,glt=new dC("XY",0),dlt=new dC("X",1),plt=new dC("Y",2)}function Yen(){Yen=E,Fst=new oC("TOP",0),Kst=new oC(G2n,1),Rst=new oC(Q2n,2)}function Zen(){Zen=E,gpt=new uI(q4n,0),ppt=new uI("TOP",1),dpt=new uI(Q2n,2)}function nin(){nin=E,Gjt=new pI("INPUT_ORDER",0),qjt=new pI("PORT_DEGREE",1)}function tin(){tin=E,Jat=p$(f0n,f0n,524287),Yat=p$(0,0,b0n),Zat=_9(1),_9(2),not=_9(0)}function ein(n){var t;return n.d!=n.r&&(t=bEn(n),n.e=!!t&&t.lk()==srt,n.d=t),n.e}function iin(n,t,e){var i;return i=n.g[t],yD(n,t,n.Zi(t,e)),n.Ri(t,e,i),n.Ni(),i}function rin(n,t){var e;return(e=n.dd(t))>=0&&(n.gd(e),!0)}function cin(n,t){var e;for(WW(n),WW(t),e=!1;t.Ob();)e|=n.Fc(t.Pb());return e}function ain(n,t){var e;return(e=uG(cQ(n.e,t),400))?(nD(n,e),e.e):null}function oin(n){var t,e;return t=n/60|0,0==(e=n%60)?""+t:t+":"+e}function uin(n,t){var e=n.a[t],i=(Cfn(),Wat)[typeof e];return i?i(e):Vbn(typeof e)}function sin(n,t){return vgn(n),new fX(n,new D_(new f7(t,n.a)))}function hin(n){var t;return null!=(t=0==n.b.c.length?null:zq(n.b,0))&&Con(n,0),t}function fin(n,t){var e,i,r;r=t.c.i,i=(e=uG(cQ(n.f,r),60)).d.c-e.e.c,fun(t.a,i,0)}function lin(n,t){var e;for(++n.d,++n.c[t],e=t+1;e=0;)++t[0]}function din(n,t){ycn(n,null==t||J_((tJ(t),t))||isNaN((tJ(t),t))?0:(tJ(t),t))}function gin(n,t){Mcn(n,null==t||J_((tJ(t),t))||isNaN((tJ(t),t))?0:(tJ(t),t))}function pin(n,t){kcn(n,null==t||J_((tJ(t),t))||isNaN((tJ(t),t))?0:(tJ(t),t))}function min(n,t){vcn(n,null==t||J_((tJ(t),t))||isNaN((tJ(t),t))?0:(tJ(t),t))}function vin(n,t,e){return bD(new MO(e.e.a+e.f.a/2,e.e.b+e.f.b/2),n)==(tJ(t),t)}function kin(n,t){return F$(t,102)&&uG(t,19).Bb&P0n?new yL(t,n):new Zsn(t,n)}function yin(n,t){return F$(t,102)&&uG(t,19).Bb&P0n?new yL(t,n):new Zsn(t,n)}function Min(n){return null==n.__elementTypeCategory$?10:n.__elementTypeCategory$}function Tin(n,t){return t==(cB(),cB(),uut)?n.toLocaleLowerCase():n.toLowerCase()}function jin(n){if(!n.e)throw hv(new Bv);return n.c=n.a=n.e,n.e=n.e.e,--n.d,n.a.f}function Ein(n){if(!n.c)throw hv(new Bv);return n.e=n.a=n.c,n.c=n.c.c,++n.d,n.a.f}function Sin(n){var t;for(++n.a,t=n.c.a.length;n.an.a[i]&&(i=e);return i}function Lin(n){var t;return!!(t=uG(oIn(n,(GYn(),Spt)),313))&&t.a==n}function Nin(n){var t;return!!(t=uG(oIn(n,(GYn(),Spt)),313))&&t.i==n}function $in(){$in=E,Ilt=Abn((uIn(),Uhn(cT(Llt,1),p1n,367,0,[Tlt,jlt,Elt,Slt,Plt])))}function Din(){Din=E,vdt=Abn((gPn(),Uhn(cT(Pdt,1),p1n,375,0,[wdt,gdt,pdt,ddt,bdt])))}function xin(){xin=E,wgt=Abn((kvn(),Uhn(cT(pgt,1),p1n,348,0,[sgt,ugt,fgt,lgt,hgt])))}function Rin(){Rin=E,Ejt=Abn((pyn(),Uhn(cT(xjt,1),p1n,323,0,[Tjt,kjt,yjt,vjt,Mjt])))}function Kin(){Kin=E,$mt=Abn((Gpn(),Uhn(cT(ajt,1),p1n,171,0,[Lmt,Cmt,Imt,Omt,Amt])))}function Fin(){Fin=E,rIt=Abn((zPn(),Uhn(cT(oIt,1),p1n,368,0,[tIt,YCt,eIt,ZCt,nIt])))}function _in(){_in=E,BAt=Abn((_Rn(),Uhn(cT(qAt,1),p1n,373,0,[xAt,DAt,KAt,RAt,FAt])))}function Bin(){Bin=E,sLt=Abn((pOn(),Uhn(cT(qLt,1),p1n,324,0,[iLt,rLt,oLt,cLt,aLt])))}function Hin(){Hin=E,ext=Abn((xdn(),Uhn(cT(axt,1),p1n,88,0,[ZDt,YDt,JDt,QDt,nxt])))}function Uin(){Uin=E,bNt=Abn((Rkn(),Uhn(cT(MNt,1),p1n,170,0,[hNt,sNt,oNt,fNt,uNt])))}function Gin(){Gin=E,iRt=Abn((Vkn(),Uhn(cT(hRt,1),p1n,256,0,[Zxt,tRt,Jxt,Yxt,nRt])))}function qin(){qin=E,HRt=Abn((KQn(),Uhn(cT(YRt,1),z4n,64,0,[FRt,yRt,kRt,KRt,_Rt])))}function Xin(){Xin=E,Yut=new iC("BY_SIZE",0),Zut=new iC("BY_SIZE_AND_SHAPE",1)}function zin(){zin=E,gft=new wC("EADES",0),pft=new wC("FRUCHTERMAN_REINGOLD",1)}function Vin(){Vin=E,dgt=new nI("READING_DIRECTION",0),ggt=new nI("ROTATION",1)}function Win(){Win=E,zlt=new Pt,Vlt=new At,qlt=new Lt,Xlt=new Ot,Wlt=new Nt}function Qin(n){this.b=new Zm,this.a=new Zm,this.c=new Zm,this.d=new Zm,this.e=n}function Jin(n){this.g=n,this.f=new Zm,this.a=e.Math.min(this.g.c.c,this.g.d.c)}function Yin(n,t,e){HF.call(this),Qrn(this),this.a=n,this.c=e,this.b=t.d,this.f=t.e}function Zin(n,t,e){var i;for(i=new Ww(e);i.a=0&&t0?t-1:t,lj(bj(xcn(xG(new fy,e),n.n),n.j),n.k)}function rrn(n){var t;t=new Yk,ttn((!n.q&&(n.q=new fV(p_t,n,11,10)),n.q),t)}function crn(n){return(2&n.i?"interface ":1&n.i?"":"class ")+(vK(n),n.o)}function arn(n){return dwn(n,vZn)>0?vZn:dwn(n,j1n)<0?j1n:pz(n)}function orn(n){return n<3?(man(n,b1n),n+1):n=-.01&&n.a<=Z2n&&(n.a=0),n.b>=-.01&&n.b<=Z2n&&(n.b=0),n}function Trn(n){var t,e;for(l_n(),e=G9n,t=0;te&&(e=n[t]);return e}function jrn(n,t){var e;if(!(e=EKn(n.Dh(),t)))throw hv(new vM(Gtt+t+ztt));return e}function Ern(n,t){var e;for(e=n;R0(e);)if((e=R0(e))==t)return!0;return!1}function Srn(n,t){var e,i,r;for(i=t.a.ld(),e=uG(t.a.md(),16).gc(),r=0;rn||n>t)throw hv(new YM("fromIndex: 0, toIndex: "+n+Q0n+t))}function Drn(n){if(n<0)throw hv(new vM("Illegal Capacity: "+n));this.g=this.aj(n)}function xrn(n,t){return YN(),oan(T1n),e.Math.abs(n-t)<=T1n||n==t||isNaN(n)&&isNaN(t)}function Rrn(n,t){var e,i,r,c;for(r=0,c=(i=n.d).length;r0&&(n.a/=t,n.b/=t),n}function Hrn(n){var t;return n.w?n.w:((t=O3(n))&&!t.Vh()&&(n.w=t),t)}function Urn(n,t){var e,i;i=n.a,e=kdn(n,t,null),i!=t&&!n.e&&(e=PWn(n,t,e)),e&&e.oj()}function Grn(n,t,e){var i,r;i=t;do{r=uM(n.p[i.p])+e,n.p[i.p]=r,i=n.a[i.p]}while(i!=t)}function qrn(n,t,e){var i=function(){return n.apply(i,arguments)};return t.apply(i,e),i}function Xrn(n){var t;return null==n?null:NCn(t=uG(n,195),t.length)}function zrn(n,t){if(null==n.g||t>=n.i)throw hv(new pL(t,n.i));return n.Wi(t,n.g[t])}function Vrn(n,t){var e,i;for(hZ(),i=new Zm,e=0;e=14&&t<=16)),n}function Fcn(n,t){var e;return tJ(t),vG(!!(e=n[":"+t]),"Enum constant undefined: "+t),e}function _cn(n,t,e,i,r,c){var a;return Rcn(e,a=VW(n,t)),a.i=r?8:0,a.f=i,a.e=r,a.g=c,a}function Bcn(n,t,e,i,r){this.d=t,this.k=i,this.f=r,this.o=-1,this.p=1,this.c=n,this.a=e}function Hcn(n,t,e,i,r){this.d=t,this.k=i,this.f=r,this.o=-1,this.p=2,this.c=n,this.a=e}function Ucn(n,t,e,i,r){this.d=t,this.k=i,this.f=r,this.o=-1,this.p=6,this.c=n,this.a=e}function Gcn(n,t,e,i,r){this.d=t,this.k=i,this.f=r,this.o=-1,this.p=7,this.c=n,this.a=e}function qcn(n,t,e,i,r){this.d=t,this.j=i,this.e=r,this.o=-1,this.p=4,this.c=n,this.a=e}function Xcn(n,t){var e,i,r,c;for(r=0,c=(i=t).length;r=0))throw hv(new vM("tolerance ("+n+") must be >= 0"));return n}function uan(n,t){var e;return F$(t,44)?n.c.Mc(t):(e=ymn(n,t),Svn(n,t),e)}function san(n,t,e){return Kbn(n,t),qon(n,e),Pcn(n,0),Ccn(n,1),mdn(n,!0),ddn(n,!0),n}function han(n,t){var e;if(e=n.gc(),t<0||t>e)throw hv(new w_(t,e));return new N_(n,t)}function fan(n,t){n.b=e.Math.max(n.b,t.d),n.e+=t.r+(0==n.a.c.length?0:n.c),kD(n.a,t)}function lan(n){TK(n.c>=0),Rvn(n.d,n.c)<0&&(n.a=n.a-1&n.d.a.length-1,n.b=n.d.c),n.c=-1}function ban(n){var t;for(t=n.c.Cc().Kc();t.Ob();)uG(t.Pb(),16).$b();n.c.$b(),n.d=0}function wan(n){var t,e,i,r;for(i=0,r=(e=n.a).length;i=0}function Ban(n,t){n.r>0&&n.c0&&0!=n.g&&Ban(n.i,t/n.r*n.i.d))}function Han(n,t){var e;e=n.c,n.c=t,4&n.Db&&!(1&n.Db)&&Msn(n,new lV(n,1,1,e,n.c))}function Uan(n,t){var e;e=n.c,n.c=t,4&n.Db&&!(1&n.Db)&&Msn(n,new lV(n,1,4,e,n.c))}function Gan(n,t){var e;e=n.k,n.k=t,4&n.Db&&!(1&n.Db)&&Msn(n,new lV(n,1,2,e,n.k))}function qan(n,t){var e;e=n.D,n.D=t,4&n.Db&&!(1&n.Db)&&Msn(n,new lV(n,1,2,e,n.D))}function Xan(n,t){var e;e=n.f,n.f=t,4&n.Db&&!(1&n.Db)&&Msn(n,new lV(n,1,8,e,n.f))}function zan(n,t){var e;e=n.i,n.i=t,4&n.Db&&!(1&n.Db)&&Msn(n,new lV(n,1,7,e,n.i))}function Van(n,t){var e;e=n.a,n.a=t,4&n.Db&&!(1&n.Db)&&Msn(n,new lV(n,1,8,e,n.a))}function Wan(n,t){var e;e=n.b,n.b=t,4&n.Db&&!(1&n.Db)&&Msn(n,new lV(n,1,0,e,n.b))}function Qan(n,t){var e;e=n.b,n.b=t,4&n.Db&&!(1&n.Db)&&Msn(n,new lV(n,1,0,e,n.b))}function Jan(n,t){var e;e=n.c,n.c=t,4&n.Db&&!(1&n.Db)&&Msn(n,new lV(n,1,1,e,n.c))}function Yan(n,t){var e;e=n.d,n.d=t,4&n.Db&&!(1&n.Db)&&Msn(n,new lV(n,1,1,e,n.d))}function Zan(n,t,e){var i;n.b=t,n.a=e,i=512&~n.a?new $f:new ay,n.c=qFn(i,n.b,n.a)}function non(n,t){return EFn(n.e,t)?(PP(),ein(t)?new Cq(t,n):new OA(t,n)):new PA(t,n)}function ton(n){return 0>n?new mS:new OK(null,new i9(n+1,n))}function eon(n,t){var e;return hZ(),e=new sS(1),RA(n)?r2(e,n,t):VAn(e.f,n,t),new Vw(e)}function ion(n,t){var e,i;return e=n.c,(i=t.e[n.p])>0?uG(zq(e.a,i-1),10):null}function ron(n,t){var e,i;return(e=n.o+n.p)<(i=t.o+t.p)?-1:e==i?0:1}function con(n){var t;return F$(t=oIn(n,(GYn(),rmt)),167)?Qpn(uG(t,167)):null}function aon(n){var t;return(n=e.Math.max(n,2))>(t=pfn(n))?(t<<=1)>0?t:d1n:t}function oon(n){switch(_D(3!=n.e),n.e){case 2:return!1;case 0:return!0}return a7(n)}function uon(n,t){var e;return!!F$(t,8)&&(e=uG(t,8),n.a==e.a&&n.b==e.b)}function son(n,t){var e;e=new et,uG(t.b,68),uG(t.b,68),uG(t.b,68),Prn(t.a,new $U(n,e,t))}function hon(n,t){var e,i;for(i=t.vc().Kc();i.Ob();)rSn(n,(e=uG(i.Pb(),44)).ld(),e.md())}function fon(n,t){var e;e=n.d,n.d=t,4&n.Db&&!(1&n.Db)&&Msn(n,new lV(n,1,11,e,n.d))}function lon(n,t){var e;e=n.j,n.j=t,4&n.Db&&!(1&n.Db)&&Msn(n,new lV(n,1,13,e,n.j))}function bon(n,t){var e;e=n.b,n.b=t,4&n.Db&&!(1&n.Db)&&Msn(n,new lV(n,1,21,e,n.b))}function won(n,t){0==(t9(),Nut?null:t.c).length&&RK(t,new G),r2(n.a,Nut?null:t.c,t)}function don(n,t){t.Ug("Hierarchical port constraint processing",1),ayn(n),yYn(n),t.Vg()}function gon(){gon=E,Sdt=new VC("START",0),Edt=new VC("MIDDLE",1),jdt=new VC("END",2)}function pon(){pon=E,VCt=new YI("P1_NODE_PLACEMENT",0),WCt=new YI("P2_EDGE_ROUTING",1)}function mon(){mon=E,Wft=new Cm(E4n),Qft=new Cm(S4n),Vft=new Cm(P4n),zft=new Cm(C4n)}function von(n){var t;return OB(n.f.g,n.d),MK(n.b),n.c=n.a,t=uG(n.a.Pb(),44),n.b=Phn(n),t}function kon(n){return null==n.b?(EP(),EP(),eBt):n.ul()?n.tl():n.sl()}function yon(n,t){var e;return!((e=null==t?-1:Ten(n.b,t,0))<0||(Con(n,e),0))}function Mon(n,t){var e;return tJ(t),e=t.g,!n.b[e]&&(uQ(n.b,e,t),++n.c,!0)}function Ton(n,t){var e,i;return e=1-t,i=n.a[e],n.a[e]=i.a[t],i.a[t]=n,n.b=!0,i.b=!1,i}function jon(n,t){var e,i;for(i=t.Kc();i.Ob();)e=uG(i.Pb(),272),n.b=!0,FV(n.e,e),e.b=n}function Eon(n,t){var e,i;return e=uG(oIn(n,(jYn(),rTt)),8),i=uG(oIn(t,rTt),8),ugn(e.b,i.b)}function Son(n,t,e){var i,r;return r=t>>5,i=31&t,E3(Dz(n.n[e][r],pz(Nz(i,1))),3)}function Pon(n,t,e){var i,r,c;for(c=n.a.length-1,r=n.b,i=0;i0?1:0:(!n.c&&(n.c=j2(Bsn(n.f))),n.c).e}function tun(n,t){t?null==n.B&&(n.B=n.D,n.D=null):null!=n.B&&(n.D=n.B,n.B=null)}function eun(n,t){return Xhn(),n==Flt&&t==Hlt||n==Hlt&&t==Flt||n==Blt&&t==_lt||n==_lt&&t==Blt}function iun(n,t){return Xhn(),n==Flt&&t==_lt||n==Flt&&t==Blt||n==Hlt&&t==Blt||n==Hlt&&t==_lt}function run(n,t){return YN(),oan(Z2n),e.Math.abs(0-t)<=Z2n||0==t||isNaN(0)&&isNaN(t)?0:n/t}function cun(n,t){return uM(pK(yx(cdn(YJ(new fX(null,new h3(n.c.b,16)),new _g(n)),t))))}function aun(n,t){return uM(pK(yx(cdn(YJ(new fX(null,new h3(n.c.b,16)),new Fg(n)),t))))}function oun(){return r_n(),Uhn(cT(bpt,1),p1n,259,0,[Zgt,tpt,ept,ipt,rpt,cpt,opt,Ygt,npt,apt])}function uun(){return THn(),Uhn(cT(Hjt,1),p1n,243,0,[$jt,Ijt,Ljt,Ojt,Ajt,Sjt,Njt,Djt,Pjt,Cjt])}function sun(n,t){t.Ug("General Compactor",1),Bpn(uG(zDn(n,(jOn(),LIt)),393)).Cg(n)}function hun(n,t){var e,i;return e=uG(zDn(n,(jOn(),FIt)),17),i=uG(zDn(t,FIt),17),d$(e.a,i.a)}function fun(n,t,e){var i,r;for(r=Fkn(n,0);r.b!=r.d.c;)(i=uG(I6(r),8)).a+=t,i.b+=e;return n}function lun(n,t,e){var i;for(i=n.b[e&n.f];i;i=i.b)if(e==i.a&&xQ(t,i.g))return i;return null}function bun(n,t,e){var i;for(i=n.c[e&n.f];i;i=i.d)if(e==i.f&&xQ(t,i.i))return i;return null}function wun(n,t,e){var i,r,c;for(i=0,r=0;r>>31;0!=i&&(n[e]=i)}function dun(n,t,e,i,r,c){var a;this.c=n,tTn(n,a=new Zm,t,n.b,e,i,r,c),this.a=new N4(a,0)}function gun(){this.c=new Vj(0),this.b=new Vj(F9n),this.d=new Vj(K9n),this.a=new Vj(_3n)}function pun(n,t,e,i,r,c,a){_E.call(this,n,t),this.d=e,this.e=i,this.c=r,this.b=c,this.a=n7(a)}function mun(n,t,e,i,r,c,a,o,u,s,h,f,l){return eLn(n,t,e,i,r,c,a,o,u,s,h,f,l),Sgn(n,!1),n}function vun(n){return n.b.c.i.k==(zIn(),lbt)?uG(oIn(n.b.c.i,(GYn(),rmt)),12):n.b.c}function kun(n){return n.b.d.i.k==(zIn(),lbt)?uG(oIn(n.b.d.i,(GYn(),rmt)),12):n.b.d}function yun(n){var t;return _A((t=t6(n)).a,0)?(gS(),gS(),fut):(gS(),new dR(t.b))}function Mun(n){var t;return _A((t=Z4(n)).a,0)?(dS(),dS(),hut):(dS(),new wR(t.b))}function Tun(n){var t;return _A((t=Z4(n)).a,0)?(dS(),dS(),hut):(dS(),new wR(t.c))}function jun(n){switch(n.g){case 2:return KQn(),_Rt;case 4:return KQn(),kRt;default:return n}}function Eun(n){switch(n.g){case 1:return KQn(),KRt;case 3:return KQn(),yRt;default:return n}}function Sun(n){switch(n.g){case 0:return new Wo;case 1:return new Qo;default:return null}}function Pun(){Pun=E,Hwt=new uF("edgelabelcenterednessanalysis.includelabel",(qx(),tot))}function Cun(){Cun=E,FEt=Lvn(gL(Aq(Aq(new wJ,(uIn(),Elt),(zYn(),kwt)),Slt,hwt),Plt),vwt)}function Iun(){Iun=E,XEt=Lvn(gL(Aq(Aq(new wJ,(uIn(),Elt),(zYn(),kwt)),Slt,hwt),Plt),vwt)}function Oun(){Oun=E,V_t=new Qk,Q_t=Uhn(cT(o_t,1),krt,179,0,[]),W_t=Uhn(cT(p_t,1),yrt,62,0,[])}function Aun(){Aun=E,Obt=new PC("TO_INTERNAL_LTR",0),Ibt=new PC("TO_INPUT_DIRECTION",1)}function Lun(){Lun=E,Tbt=new Bt,ybt=new Ht,Mbt=new Ut,kbt=new Gt,jbt=new qt,Ebt=new Xt}function Nun(n,t){t.Ug(g6n,1),Apn(FS(new Ad((zS(),new mY(n,!1,!1,new Ft))))),t.Vg()}function $un(n,t,e){e.Ug("DFS Treeifying phase",1),qmn(n,t),qKn(n,t),n.a=null,n.b=null,e.Vg()}function Dun(n,t){return qx(),RA(n)?r7(n,mK(t)):FA(n)?Rz(n,pK(t)):KA(n)?xz(n,gK(t)):n.Fd(t)}function xun(n,t){var e,i;for(tJ(t),i=t.vc().Kc();i.Ob();)e=uG(i.Pb(),44),n.zc(e.ld(),e.md())}function Run(n,t,e){var i;for(i=e.Kc();i.Ob();)if(!H5(n,t,i.Pb()))return!1;return!0}function Kun(n,t,e,i,r){var c;return e&&(c=emn(t.Dh(),n.c),r=e.Rh(t,-1-(-1==c?i:c),null,r)),r}function Fun(n,t,e,i,r){var c;return e&&(c=emn(t.Dh(),n.c),r=e.Th(t,-1-(-1==c?i:c),null,r)),r}function _un(n){var t;if(-2==n.b){if(0==n.e)t=-1;else for(t=0;0==n.a[t];t++);n.b=t}return n.b}function Bun(n){if(tJ(n),0==n.length)throw hv(new ZM("Zero length BigInteger"));qHn(this,n)}function Hun(n){this.i=n.gc(),this.i>0&&(this.g=this.aj(this.i+(this.i/8|0)+1),n.Qc(this.g))}function Uun(n,t,e){this.g=n,this.d=t,this.e=e,this.a=new Zm,RLn(this),hZ(),f$(this.a,null)}function Gun(n,t){t.q=n,n.d=e.Math.max(n.d,t.r),n.b+=t.d+(0==n.a.c.length?0:n.c),kD(n.a,t)}function qun(n,t){var e,i,r,c;return r=n.c,e=n.c+n.b,c=n.d,i=n.d+n.a,t.a>r&&t.ac&&t.b(r=n.a.length)?e=r:s3(t,e+1),n.a=r1(n.a,0,t)+""+i+sQ(n.a,e)}function msn(n,t){n.a=Lgn(n.a,1),n.c=e.Math.min(n.c,t),n.b=e.Math.max(n.b,t),n.d=Lgn(n.d,t)}function vsn(n,t){return t1||n.Ob())return++n.a,n.g=0,t=n.i,n.Ob(),t;throw hv(new Bv)}function Fsn(n){switch(n.a.g){case 1:return new KI;case 3:return new zTn;default:return new ml}}function _sn(n,t){switch(t){case 1:return!!n.n&&0!=n.n.i;case 2:return null!=n.k}return j4(n,t)}function Bsn(n){return p0n>22),r=n.h+t.h+(i>>22),p$(e&f0n,i&f0n,r&l0n)}function Thn(n,t){var e,i,r;return e=n.l-t.l,i=n.m-t.m+(e>>22),r=n.h-t.h+(i>>22),p$(e&f0n,i&f0n,r&l0n)}function jhn(n){var t,e;for(BQn(n),e=new Ww(n.d);e.a(i=n.gc()))throw hv(new w_(t,i));return n.Si()&&(e=A0(n,e)),n.Ei(t,e)}function wfn(n,t,e,i,r){var c,a;for(a=e;a<=r;a++)for(c=t;c<=i;c++)eTn(n,c,a)||HBn(n,c,a,!0,!1)}function dfn(n){var t,e,i;for(l_n(),e=Inn(PNt,zZn,8,2,0,1),i=0,t=0;t<2;t++)i+=.5,e[t]=WMn(i,n);return e}function gfn(n){var t,e;return p$(t=1+~n.l&f0n,e=~n.m+(0==t?1:0)&f0n,~n.h+(0==t&&0==e?1:0)&l0n)}function pfn(n){var t;if(n<0)return j1n;if(0==n)return 0;for(t=d1n;!(t&n);t>>=1);return t}function mfn(n,t,e){return!(n>=128)&&HA(n<64?E3(Nz(1,n),e):E3(Nz(1,n-64),t),0)}function vfn(n,t,e){return null==e?(!n.q&&(n.q=new Ym),u7(n.q,t)):(!n.q&&(n.q=new Ym),vJ(n.q,t,e)),n}function kfn(n,t,e){return null==e?(!n.q&&(n.q=new Ym),u7(n.q,t)):(!n.q&&(n.q=new Ym),vJ(n.q,t,e)),n}function yfn(n){var t,e;return zsn(e=new d7,n),kfn(e,(mon(),Wft),n),kqn(n,e,t=new Ym),zWn(n,e,t),e}function Mfn(n){var t,e;return t=n.t-n.k[n.o.p]*n.d+n.j[n.o.p]>n.f,e=n.u+n.e[n.o.p]*n.d>n.f*n.s*n.d,t||e}function Tfn(n,t){var e,i,r;for(e=!1,i=n.a[t].length,r=0;r=0,"Negative initial capacity"),vG(t>=0,"Non-positive load factor"),$V(this)}function $fn(n,t,e,i,r){var c,a;if(a=n.length,c=e.length,t<0||i<0||r<0||t+r>a||i+r>c)throw hv(new Lv)}function Dfn(n,t){var e,i,r,c,a;for(hZ(),a=!1,r=0,c=(i=t).length;r1||t>=0&&n.b<3)}function Yfn(n){var t,e,i;t=1+~n.l&f0n,e=~n.m+(0==t?1:0)&f0n,i=~n.h+(0==t&&0==e?1:0)&l0n,n.l=t,n.m=e,n.h=i}function Zfn(n){var t,e,i;for(hZ(),i=1,e=n.Kc();e.Ob();)i=31*i+(null!=(t=e.Pb())?Hon(t):0),i|=0;return i}function nln(n,t,e,i,r){var c;return c=gDn(n,t),e&&Yfn(c),r&&(n=hTn(n,t),Qat=i?gfn(n):p$(n.l,n.m,n.h)),c}function tln(n,t,e){n.g=mAn(n,t,(KQn(),kRt),n.b),n.d=mAn(n,e,kRt,n.b),0!=n.g.c&&0!=n.d.c&&AIn(n)}function eln(n,t,e){n.g=mAn(n,t,(KQn(),_Rt),n.j),n.d=mAn(n,e,_Rt,n.j),0!=n.g.c&&0!=n.d.c&&AIn(n)}function iln(n,t){switch(t){case 7:return!!n.e&&0!=n.e.i;case 8:return!!n.d&&0!=n.d.i}return Kpn(n,t)}function rln(n,t){switch(t.g){case 0:F$(n.b,641)||(n.b=new lsn);break;case 1:F$(n.b,642)||(n.b=new zG)}}function cln(n){if(0===n.g)return new eu;throw hv(new vM(lnt+(null!=n.f?n.f:""+n.g)))}function aln(n){if(0===n.g)return new nu;throw hv(new vM(lnt+(null!=n.f?n.f:""+n.g)))}function oln(n,t,e){return!Qj(JJ(new fX(null,new h3(n.c,16)),new hd(new GO(t,e)))).Bd((vS(),Kut))}function uln(n,t){return bD($kn(uG(oIn(t,(QGn(),cCt)),88)),new MO(n.c.e.a-n.b.e.a,n.c.e.b-n.b.e.b))<=0}function sln(n,t){for(;null!=n.g||n.c?null==n.g||0!=n.i&&uG(n.g[n.i-1],51).Ob():O0(n);)yA(t,Wxn(n))}function hln(n){var t;for(t=new Ww(n.a.b);t.ai?1:0}function yln(n){return kD(n.c,(Whn(),ZLt)),xrn(n.a,uM(pK(Jkn((lmn(),WTt)))))?new zu:new zp(n)}function Mln(n){for(;!n.d||!n.d.Ob();){if(!n.b||LM(n.b))return null;n.d=uG(xV(n.b),51)}return n.d}function Tln(n){switch(n.g){case 1:return K9n;default:case 2:return 0;case 3:return _3n;case 4:return F9n}}function jln(){var n;return QYn(),VHt||(n=eR(kJn("M",!0)),n=CX(kJn("M",!1),n),VHt=n)}function Eln(){Eln=E,CKt=new uA("ELK",0),IKt=new uA("JSON",1),PKt=new uA("DOT",2),OKt=new uA("SVG",3)}function Sln(){Sln=E,aEt=new kI("STACKED",0),rEt=new kI("REVERSE_STACKED",1),cEt=new kI("SEQUENCED",2)}function Pln(){Pln=E,gPt=new WI(q4n,0),dPt=new WI("MIDDLE_TO_MIDDLE",1),wPt=new WI("AVOID_OVERLAP",2)}function Cln(){Cln=E,tdt=new ji,edt=new Ei,ndt=new Mi,Zwt=new Si,tJ(new Ti),Ywt=new L}function Iln(){Iln=E,Pxt=new CN(15),Sxt=new _N((XYn(),W$t),Pxt),Cxt=mDt,Mxt=a$t,Txt=_$t,Ext=U$t,jxt=H$t}function Oln(n,t){var e,i,r,c,a;for(r=0,c=(i=t).length;r=n.b.c.length||(_ln(n,2*t+1),(e=2*t+2)0&&(t.Cd(e),e.i&&Zdn(e))}function Hln(n,t,e){var i;for(i=e-1;i>=0&&n[i]===t[i];i--);return i<0?0:$P(E3(n[i],L0n),E3(t[i],L0n))?-1:1}function Uln(n,t,e){var i,r;this.g=n,this.c=t,this.a=this,this.d=this,r=aon(e),i=Inn($at,l1n,227,r,0,1),this.b=i}function Gln(n,t,e,i,r){var c,a;for(a=e;a<=r;a++)for(c=t;c<=i;c++)if(eTn(n,c,a))return!0;return!1}function qln(n,t){var e;for(e=n.Zb().Cc().Kc();e.Ob();)if(uG(e.Pb(),16).Hc(t))return!0;return!1}function Xln(n,t,e){var i,r,c,a;for(tJ(e),a=!1,c=n.fd(t),r=e.Kc();r.Ob();)i=r.Pb(),c.Rb(i),a=!0;return a}function zln(n,t){var e,i;return i=uG(Lsn(n.a,4),129),e=Inn(xFt,Uit,424,t,0,1),null!=i&&qGn(i,0,e,0,i.length),e}function Vln(n,t){var e;return e=new Z_n(!!(256&n.f),n.i,n.a,n.d,!!(16&n.f),n.j,n.g,t),null!=n.e||(e.c=n),e}function Wln(n,t){var e;return n===t||!!F$(t,85)&&(e=uG(t,85),OOn(Mz(n),e.vc()))}function Qln(n,t,e){var i,r;for(r=e.Kc();r.Ob();)if(i=uG(r.Pb(),44),n.Be(t,i.md()))return!0;return!1}function Jln(n,t,e){return n.d[t.p][e.p]||(Kyn(n,t,e),n.d[t.p][e.p]=!0,n.d[e.p][t.p]=!0),n.a[t.p][e.p]}function Yln(n,t){return!(!n||n==t||!vR(t,(GYn(),zpt)))&&uG(oIn(t,(GYn(),zpt)),10)!=n}function Zln(n){switch(n.i){case 2:return!0;case 1:return!1;case-1:++n.c;default:return n.$l()}}function nbn(n){switch(n.i){case-2:return!0;case-1:return!1;case 1:--n.c;default:return n._l()}}function tbn(n){U0.call(this,"The given string does not match the expected format for individual spacings.",n)}function ebn(n,t){var e;t.Ug("Min Size Preprocessing",1),e=xAn(n),Myn(n,(lBn(),EOt),e.a),Myn(n,MOt,e.b),t.Vg()}function ibn(n){var t,e,i;for(t=0,i=Inn(PNt,zZn,8,n.b,0,1),e=Fkn(n,0);e.b!=e.d.c;)i[t++]=uG(I6(e),8);return i}function rbn(n,t,e){var i,r;for(i=new lS,r=Fkn(e,0);r.b!=r.d.c;)aq(i,new eN(uG(I6(r),8)));Xln(n,t,i)}function cbn(n,t){var e;return e=Lgn(n,t),$P(P3(n,t),0)|BA(P3(n,e),0)?e:Lgn(YZn,P3(Dz(e,63),1))}function abn(n,t){var e,i;return(e=uG(n.d.Bc(t),16))?((i=n.e.hc()).Gc(e),n.e.d-=e.gc(),e.$b(),i):null}function obn(n){var t;if((t=n.a.c.length)>0)return Vz(t-1,n.a.c.length),i7(n.a,t-1);throw hv(new _v)}function ubn(n,t,e){if(n>t)throw hv(new vM(o2n+n+u2n+t));if(n<0||t>e)throw hv(new YM(o2n+n+s2n+t+Q0n+e))}function sbn(n,t){null==n.D&&null!=n.B&&(n.D=n.B,n.B=null),qan(n,null==t?null:(tJ(t),t)),n.C&&n.hl(null)}function hbn(n,t){var e;e=null!=Jkn((lmn(),WTt))&&null!=t.Sg()?uM(pK(t.Sg()))/uM(pK(Jkn(WTt))):1,vJ(n.b,t,e)}function fbn(n,t){var e,i;if(0!=(i=n.c[t]))for(n.c[t]=0,n.d-=i,e=t+1;eR9n?n-i>R9n:i-n>R9n)}function Qbn(n,t){var e;for(e=0;er&&(USn(t.q,r),i=e!=t.q.d)),i}function Zbn(n,t){var i,r,c,a,o;return a=t.i,o=t.j,r=a-(i=n.f).i,c=o-i.j,e.Math.sqrt(r*r+c*c)}function nwn(n,t){var e;return(e=Kvn(n))||(!ZKt&&(ZKt=new Ps),YXn(),ttn((e=new Xm(sxn(t))).El(),n)),e}function twn(n,t){var e,i;return(e=uG(n.c.Bc(t),16))?((i=n.hc()).Gc(e),n.d-=e.gc(),e.$b(),n.mc(i)):n.jc()}function ewn(n,t){var e,i;for(i=0!=uRn(n.d,1),e=!0;e;)e=!1,e=t.c.mg(t.e,i),e|=PKn(n,t,i,!1),i=!i;Gon(n)}function iwn(n,t,e,i){var r,c;n.a=t,c=i?0:1,n.f=(r=new _On(n.c,n.a,e,c),new eBn(e,n.a,r,n.e,n.b,n.c==(ean(),BEt)))}function rwn(n){var t;return MK(n.a!=n.b),t=n.d.a[n.a],jK(n.b==n.d.c&&null!=t),n.c=n.a,n.a=n.a+1&n.d.a.length-1,t}function cwn(n){var t;if(0!=n.c)return n.c;for(t=0;t=n.c.b:n.a<=n.c.b))throw hv(new Bv);return t=n.a,n.a+=n.c.c,++n.b,xwn(t)}function own(n){var t;return zsn(t=new S$(n.a),n),kfn(t,(GYn(),rmt),n),t.o.a=n.g,t.o.b=n.f,t.n.a=n.i,t.n.b=n.j,t}function uwn(n){return(KQn(),LRt).Hc(n.j)?uM(pK(oIn(n,(GYn(),Mmt)))):Gfn(Uhn(cT(PNt,1),zZn,8,0,[n.i.n,n.n,n.a])).b}function swn(n){var t;return t=aN(KEt),uG(oIn(n,(GYn(),Hpt)),21).Hc((r_n(),rpt))&&Aq(t,(uIn(),Elt),(zYn(),Cwt)),t}function hwn(n){var t,e;for(e=new ek,t=new Ww(n);t.a=0?t:-t;i>0;)i%2==0?(e*=e,i=i/2|0):(r*=e,i-=1);return t<0?1/r:r}function pwn(n,t){var e,i,r;for(r=1,e=n,i=t>=0?t:-t;i>0;)i%2==0?(e*=e,i=i/2|0):(r*=e,i-=1);return t<0?1/r:r}function mwn(n,t){var e,i,r,c;return(c=fLn((i=t,(r=n?Kvn(n):null)&&r.Gl(),i)))==t&&(e=Kvn(n))&&e.Gl(),c}function vwn(n,t,e){var i,r;return r=n.f,n.f=t,4&n.Db&&!(1&n.Db)&&(i=new lV(n,1,0,r,t),e?e.nj(i):e=i),e}function kwn(n,t,e){var i,r;return r=n.b,n.b=t,4&n.Db&&!(1&n.Db)&&(i=new lV(n,1,3,r,t),e?e.nj(i):e=i),e}function ywn(n,t,e){var i,r;return r=n.a,n.a=t,4&n.Db&&!(1&n.Db)&&(i=new lV(n,1,1,r,t),e?e.nj(i):e=i),e}function Mwn(n){var t,e,i,r;if(null!=n)for(e=0;e=i||t-129&&n<128?(XG(),!(e=bot[t=n+128])&&(e=bot[t]=new Iw(n)),e):new Iw(n)}function Rwn(n){var t,e;return n>-129&&n<128?(eX(),!(e=Mot[t=n+128])&&(e=Mot[t]=new Aw(n)),e):new Aw(n)}function Kwn(n,t){n.a.c.length>0&&Lln(uG(zq(n.a,n.a.c.length-1),579),t)||kD(n.a,new r9(t))}function Fwn(n){var t,e;GB(),t=n.d.c-n.e.c,Prn((e=uG(n.g,154)).b,new Pg(t)),Prn(e.c,new Cg(t)),z8(e.i,new Ig(t))}function _wn(n){var t;return(t=new WM).a+="VerticalSegment ",QA(t,n.e),t.a+=" ",JA(t,KD(new FM,new Ww(n.k))),t.a}function Bwn(n,t){var e,i;for(e=0,i=Dgn(n,t).Kc();i.Ob();)e+=null!=oIn(uG(i.Pb(),12),(GYn(),lmt))?1:0;return e}function Hwn(n,t,e){var i,r,c;for(i=0,c=Fkn(n,0);c.b!=c.d.c&&!((r=uM(pK(I6(c))))>e);)r>=t&&++i;return i}function Uwn(n,t){WW(n);try{return n._b(t)}catch(e){if(F$(e=Ehn(e),212)||F$(e,169))return!1;throw hv(e)}}function Gwn(n,t){WW(n);try{return n.Hc(t)}catch(e){if(F$(e=Ehn(e),212)||F$(e,169))return!1;throw hv(e)}}function qwn(n,t){WW(n);try{return n.Mc(t)}catch(e){if(F$(e=Ehn(e),212)||F$(e,169))return!1;throw hv(e)}}function Xwn(n,t){WW(n);try{return n.xc(t)}catch(e){if(F$(e=Ehn(e),212)||F$(e,169))return null;throw hv(e)}}function zwn(n,t){WW(n);try{return n.Bc(t)}catch(e){if(F$(e=Ehn(e),212)||F$(e,169))return null;throw hv(e)}}function Vwn(n,t){switch(t.g){case 2:case 1:return Dgn(n,t);case 3:case 4:return Spn(Dgn(n,t))}return hZ(),hZ(),zot}function Wwn(n){var t;return 64&n.Db?vxn(n):((t=new fx(vxn(n))).a+=" (name: ",VA(t,n.zb),t.a+=")",t.a)}function Qwn(n){var t;return(t=uG(ain(n.c.c,""),233))||(t=new I2(UT(HT(new du,""),"Other")),Akn(n.c.c,"",t)),t}function Jwn(n,t,e){var i,r;return r=n.sb,n.sb=t,4&n.Db&&!(1&n.Db)&&(i=new lV(n,1,4,r,t),e?e.nj(i):e=i),e}function Ywn(n,t,e){var i,r;return r=n.r,n.r=t,4&n.Db&&!(1&n.Db)&&(i=new lV(n,1,8,r,n.r),e?e.nj(i):e=i),e}function Zwn(n,t,e){var i;return i=new Ken(n.e,4,13,t.c||(YYn(),N_t),null,Hyn(n,t),!1),e?e.nj(i):e=i,e}function ndn(n,t,e){var i;return i=new Ken(n.e,3,13,null,t.c||(YYn(),N_t),Hyn(n,t),!1),e?e.nj(i):e=i,e}function tdn(n,t){var e,i;return!(i=(e=uG(t,691)).el())&&e.fl(i=F$(t,90)?new CA(n,uG(t,29)):new g4(n,uG(t,156))),i}function edn(n,t,e){var i;n._i(n.i+1),i=n.Zi(t,e),t!=n.i&&qGn(n.g,t,n.g,t+1,n.i-t),uQ(n.g,t,i),++n.i,n.Mi(t,e),n.Ni()}function idn(n,t){var e;return t.a&&(e=t.a.a.length,n.a?JA(n.a,n.b):n.a=new lx(n.d),L4(n.a,t.a,t.d.length,e)),n}function rdn(n,t){var e;n.c=t,n.a=Jpn(t),n.a<54&&(n.f=(e=t.d>1?C4(t.a[0],t.a[1]):C4(t.a[0],0),W4(t.e>0?e:Men(e))))}function cdn(n,t){var e;return e=new un,n.a.Bd(e)?(UD(),new Xy(tJ(ven(n,e.a,t)))):(GQ(n),UD(),UD(),sut)}function adn(n,t){var e;0!=n.c.length&&(zL(e=uG(Ekn(n,Inn(pbt,e6n,10,n.c.length,0,1)),199),new Oe),WNn(e,t))}function odn(n,t){var e;0!=n.c.length&&(zL(e=uG(Ekn(n,Inn(pbt,e6n,10,n.c.length,0,1)),199),new Ae),WNn(e,t))}function udn(n,t){return RA(n)?m_(n,t):FA(n)?p_(n,t):KA(n)?(tJ(n),xA(n)===xA(t)):Cz(n)?n.Fb(t):xX(n)?SL(n,t):j3(n,t)}function sdn(n,t,e){if(t<0)zLn(n,e);else{if(!e.rk())throw hv(new vM(Gtt+e.xe()+qtt));uG(e,69).wk().Ek(n,n.hi(),t)}}function hdn(n,t,e){if(n<0||t>e)throw hv(new dM(o2n+n+s2n+t+", size: "+e));if(n>t)throw hv(new vM(o2n+n+u2n+t))}function fdn(n){var t;return 64&n.Db?vxn(n):((t=new fx(vxn(n))).a+=" (source: ",VA(t,n.d),t.a+=")",t.a)}function ldn(n){return n>=65&&n<=70?n-65+10:n>=97&&n<=102?n-97+10:n>=48&&n<=57?n-48:0}function bdn(n){var t,e,i,r;for(JYn(),i=0,r=(e=Nkn()).length;i=0?Rmn(n):hW(Rmn(Men(n))))}function Sdn(n,t,e,i,r,c){this.e=new Zm,this.f=(can(),Qjt),kD(this.e,n),this.d=t,this.a=e,this.b=i,this.f=r,this.c=c}function Pdn(n,t,i){n.n=Jq(nUt,[zZn,E0n],[376,28],14,[i,t0(e.Math.ceil(t/32))],2),n.o=t,n.p=i,n.j=t-1>>1,n.k=i-1>>1}function Cdn(n){return n=((n=((n-=n>>1&1431655765)>>2&858993459)+(858993459&n))>>4)+n&252645135,n+=n>>8,63&(n+=n>>16)}function Idn(n,t){var e,i;for(i=new DD(n);i.e!=i.i.gc();)if(e=uG(Zkn(i),142),xA(t)===xA(e))return!0;return!1}function Odn(n,t,e){var i,r;return(r=jxn(n.b,t))&&(i=uG(QXn(Len(n,r),""),29))?hxn(n,i,t,e):null}function Adn(n,t,e){var i,r;return(r=jxn(n.b,t))&&(i=uG(QXn(Len(n,r),""),29))?fxn(n,i,t,e):null}function Ldn(n,t){var e;if(null==(e=dcn(n.i,t)))throw hv(new SM("Node did not exist in input."));return Qun(t,e),null}function Ndn(n,t){var e;if(F$(e=EKn(n,t),331))return uG(e,35);throw hv(new vM(Gtt+t+"' is not a valid attribute"))}function $dn(n,t,e){var i;if(t>(i=n.gc()))throw hv(new w_(t,i));if(n.Si()&&n.Hc(e))throw hv(new vM(Xet));n.Gi(t,e)}function Ddn(n,t){t.Ug("Sort end labels",1),kS(JJ(sin(new fX(null,new h3(n.b,16)),new we),new de),new ge),t.Vg()}function xdn(){xdn=E,ZDt=new PO(Y2n,0),YDt=new PO(V2n,1),JDt=new PO(z2n,2),QDt=new PO(c3n,3),nxt=new PO("UP",4)}function Rdn(){Rdn=E,HAt=new fO("P1_STRUCTURE",0),UAt=new fO("P2_PROCESSING_ORDER",1),GAt=new fO("P3_EXECUTION",2)}function Kdn(){Kdn=E,qCt=Lvn(Lvn(gP(Lvn(Lvn(gP(Aq(new wJ,(Cjn(),VSt),(OHn(),fPt)),WSt),oPt),sPt),QSt),iPt),hPt)}function Fdn(n){switch(uG(oIn(n,(GYn(),Xpt)),311).g){case 1:kfn(n,Xpt,(Zen(),dpt));break;case 2:kfn(n,Xpt,(Zen(),ppt))}}function _dn(n){switch(n){case 0:return new Fk;case 1:return new Rk;case 2:return new Kk;default:throw hv(new Dv)}}function Bdn(n){switch(n.g){case 2:return YDt;case 1:return JDt;case 4:return QDt;case 3:return nxt;default:return ZDt}}function Hdn(n,t){switch(n.b.g){case 0:case 1:return t;case 2:case 3:return new gY(t.d,0,t.a,t.b);default:return null}}function Udn(n){switch(n.g){case 1:return _Rt;case 2:return yRt;case 3:return kRt;case 4:return KRt;default:return FRt}}function Gdn(n){switch(n.g){case 1:return KRt;case 2:return _Rt;case 3:return yRt;case 4:return kRt;default:return FRt}}function qdn(n){switch(n.g){case 1:return kRt;case 2:return KRt;case 3:return _Rt;case 4:return yRt;default:return FRt}}function Xdn(n,t,e,i){switch(t){case 1:return!n.n&&(n.n=new fV(lFt,n,1,7)),n.n;case 2:return n.k}return ajn(n,t,e,i)}function zdn(n,t,e){var i,r;return n.Pj()?(r=n.Qj(),i=HNn(n,t,e),n.Jj(n.Ij(7,xwn(e),i,t,r)),i):HNn(n,t,e)}function Vdn(n,t){var e,i,r;null==n.d?(++n.e,--n.f):(r=t.ld(),S7(n,i=((e=t.Bi())&vZn)%n.d.length,Txn(n,i,e,r)))}function Wdn(n,t){var e;e=!!(n.Bb&w1n),t?n.Bb|=w1n:n.Bb&=-1025,4&n.Db&&!(1&n.Db)&&Msn(n,new j9(n,1,10,e,t))}function Qdn(n,t){var e;e=!!(n.Bb&j0n),t?n.Bb|=j0n:n.Bb&=-4097,4&n.Db&&!(1&n.Db)&&Msn(n,new j9(n,1,12,e,t))}function Jdn(n,t){var e;e=!!(n.Bb&hrt),t?n.Bb|=hrt:n.Bb&=-8193,4&n.Db&&!(1&n.Db)&&Msn(n,new j9(n,1,15,e,t))}function Ydn(n,t){var e;e=!!(n.Bb&frt),t?n.Bb|=frt:n.Bb&=-2049,4&n.Db&&!(1&n.Db)&&Msn(n,new j9(n,1,11,e,t))}function Zdn(n){var t;n.g&&(CFn((t=n.c.kg()?n.f:n.a).a,n.o,!0),CFn(t.a,n.o,!1),kfn(n.o,(jYn(),JMt),($Pn(),rRt)))}function ngn(n){var t;if(!n.a)throw hv(new kM("Cannot offset an unassigned cut."));t=n.c-n.b,n.b+=t,iZ(n,t),eZ(n,t)}function tgn(n,t){var e;if(null==(e=cQ(n.k,t)))throw hv(new SM("Port did not exist in input."));return Qun(t,e),null}function egn(n){var t,e;for(e=bxn(Hrn(n)).Kc();e.Ob();)if(GUn(n,t=mK(e.Pb())))return h8((yP(),r_t),t);return null}function ign(n){var t,e;for(e=n.p.a.ec().Kc();e.Ob();)if((t=uG(e.Pb(),218)).f&&n.b[t.c]<-1e-10)return t;return null}function rgn(n){var t,e;for(e=jQ(new WM,91),t=!0;n.Ob();)t||(e.a+=TZn),t=!1,QA(e,n.Pb());return(e.a+="]",e).a}function cgn(n){var t,e,i;for(t=new Zm,i=new Ww(n.b);i.at?1:n==t?0==n?ugn(1/n,1/t):0:isNaN(n)?isNaN(t)?0:1:-1}function sgn(n){var t;return null==(t=n.a[n.c-1&n.a.length-1])?null:(n.c=n.c-1&n.a.length-1,uQ(n.a,n.c,null),t)}function hgn(n){var t,e,i;for(i=0,e=n.length,t=0;t=1?YDt:QDt:t}function mgn(n){switch(uG(oIn(n,(jYn(),Vyt)),223).g){case 1:return new ic;case 3:return new uc;default:return new ec}}function vgn(n){if(n.c)vgn(n.c);else if(n.d)throw hv(new kM("Stream already terminated, can't be modified or used"))}function kgn(n,t,e){var i;return i=n.a.get(t),n.a.set(t,void 0===e?null:e),void 0===i?(++n.c,++n.b.g):++n.d,i}function ygn(n,t,e){var i,r;for(r=n.a.ec().Kc();r.Ob();)if(i=uG(r.Pb(),10),yhn(e,uG(zq(t,i.p),16)))return i;return null}function Mgn(n,t,e){var i;return i=0,t&&(fN(n.a)?i+=t.f.a/2:i+=t.f.b/2),e&&(fN(n.a)?i+=e.f.a/2:i+=e.f.b/2),i}function Tgn(n,t,e){var i;!(i=e)&&(i=xG(new fy,0)),i.Ug(K4n,2),zyn(n.b,t,i.eh(1)),Xzn(n,t,i.eh(1)),hJn(t,i.eh(1)),i.Vg()}function jgn(n,t,e){var i;return gj(),Scn(i=new ns,t),pcn(i,e),n&&ttn((!n.a&&(n.a=new MD(eFt,n,5)),n.a),i),i}function Egn(n){var t;return 64&n.Db?vxn(n):((t=new fx(vxn(n))).a+=" (identifier: ",VA(t,n.k),t.a+=")",t.a)}function Sgn(n,t){var e;e=!!(n.Bb&Qtt),t?n.Bb|=Qtt:n.Bb&=-32769,4&n.Db&&!(1&n.Db)&&Msn(n,new j9(n,1,18,e,t))}function Pgn(n,t){var e;e=!!(n.Bb&Qtt),t?n.Bb|=Qtt:n.Bb&=-32769,4&n.Db&&!(1&n.Db)&&Msn(n,new j9(n,1,18,e,t))}function Cgn(n,t){var e;e=!!(n.Bb&VZn),t?n.Bb|=VZn:n.Bb&=-16385,4&n.Db&&!(1&n.Db)&&Msn(n,new j9(n,1,16,e,t))}function Ign(n,t){var e;e=!!(n.Bb&P0n),t?n.Bb|=P0n:n.Bb&=-65537,4&n.Db&&!(1&n.Db)&&Msn(n,new j9(n,1,20,e,t))}function Ogn(n){var t;return t=Inn(JHt,N1n,28,2,15,1),n-=P0n,t[0]=(n>>10)+C0n&D1n,t[1]=56320+(1023&n)&D1n,mvn(t,0,t.length)}function Agn(n){var t;return(t=YIn(n))>34028234663852886e22?M0n:t<-34028234663852886e22?T0n:t}function Lgn(n,t){var e;return _L(n)&&_L(t)&&p0n<(e=n+t)&&e"+V3(t.c):"e_"+Hon(t),n.b&&n.c?V3(n.b)+"->"+V3(n.c):"e_"+Hon(n))}function Kgn(n,t){return m_(t.b&&t.c?V3(t.b)+"->"+V3(t.c):"e_"+Hon(t),n.b&&n.c?V3(n.b)+"->"+V3(n.c):"e_"+Hon(n))}function Fgn(n,t){return YN(),oan(T1n),e.Math.abs(n-t)<=T1n||n==t||isNaN(n)&&isNaN(t)?0:nt?1:KL(isNaN(n),isNaN(t))}function _gn(){_gn=E,fxt=new IO(Y2n,0),sxt=new IO("POLYLINE",1),uxt=new IO("ORTHOGONAL",2),hxt=new IO("SPLINES",3)}function Bgn(){Bgn=E,IOt=new aO("ASPECT_RATIO_DRIVEN",0),OOt=new aO("MAX_SCALE_DRIVEN",1),COt=new aO("AREA_DRIVEN",2)}function Hgn(n,t,e){try{Vfn(n,t,e)}catch(i){throw F$(i=Ehn(i),606)?hv(new x9(i)):hv(i)}return t}function Ugn(n){var t,e;for(t=0,e=n.length;tt&&i.Ne(n[c-1],n[c])>0;--c)a=n[c],uQ(n,c,n[c-1]),uQ(n,c-1,a)}function Zgn(n,t){var e,i,r,c,a;if(e=t.f,Akn(n.c.d,e,t),null!=t.g)for(c=0,a=(r=t.g).length;ct){F4(e);break}}lW(e,t)}function tpn(n,t){var i,r;r=uM(pK(Omn(z4(t),(jYn(),dTt)))),TEn(t,i=e.Math.max(0,r/2-.5),1),kD(n,new xC(t,i))}function epn(n,t,e){e.Ug("Straight Line Edge Routing",1),e.dh(t,l7n),DXn(n,uG(zDn(t,(SK(),zCt)),27)),e.dh(t,w7n)}function ipn(n,t){0==n.n.c.length&&kD(n.n,new c0(n.s,n.t,n.i)),kD(n.b,t),zMn(uG(zq(n.n,n.n.c.length-1),209),t),nqn(n,t)}function rpn(n){var t;this.a=new nB(t=uG(n.e&&n.e(),9),uG(MF(t,t.length),9),0),this.b=Inn(dat,EZn,1,this.a.a.length,5,1)}function cpn(n){return Array.isArray(n)&&n.Tm===j?Ij(Tbn(n))+"@"+(Hon(n)>>>0).toString(16):n.toString()}function apn(n,t){return n.h==b0n&&0==n.m&&0==n.l?(t&&(Qat=p$(0,0,0)),LL((tin(),Zat))):(t&&(Qat=p$(n.l,n.m,n.h)),p$(0,0,0))}function opn(n,t){switch(t.g){case 2:return n.b;case 1:return n.c;case 4:return n.d;case 3:return n.a;default:return!1}}function upn(n,t){switch(t.g){case 2:return n.b;case 1:return n.c;case 4:return n.d;case 3:return n.a;default:return!1}}function spn(n,t,e,i){switch(t){case 3:return n.f;case 4:return n.g;case 5:return n.i;case 6:return n.j}return Xdn(n,t,e,i)}function hpn(n,t){if(t==n.d)return n.e;if(t==n.e)return n.d;throw hv(new vM("Node "+t+" not part of edge "+n))}function fpn(n,t){var e;if(F$(e=EKn(n.Dh(),t),102))return uG(e,19);throw hv(new vM(Gtt+t+"' is not a valid reference"))}function lpn(n,t,e,i){if(t<0)lRn(n,e,i);else{if(!e.rk())throw hv(new vM(Gtt+e.xe()+qtt));uG(e,69).wk().Ck(n,n.hi(),t,i)}}function bpn(n){var t;if(n.b){if(bpn(n.b),n.b.d!=n.c)throw hv(new Fv)}else n.d.dc()&&(t=uG(n.f.c.xc(n.e),16))&&(n.d=t)}function wpn(n){var t,e;for(VK(),t=n.o.b,e=uG(uG(Y9(n.r,(KQn(),KRt)),21),87).Kc();e.Ob();)uG(e.Pb(),117).e.b+=t}function dpn(n){var t,e,i;for(this.a=new XL,i=new Ww(n);i.a=r)return t.c+e;return t.c+t.b.gc()}function ppn(n,t){var e,i,r,c;for(EK(),r=t,Ntn(i=Jtn(n),0,i.length,r),e=0;e0&&(i+=r,++e);return e>1&&(i+=n.d*(e-1)),i}function Mpn(n){var t,e,i;return i=gCn(n),!pE(n.c)&&(nrn(i,"knownLayouters",e=new Ib),t=new jm(e),z8(n.c,t)),i}function Tpn(n){var t,e,i;for((i=new zM).a+="[",t=0,e=n.gc();t0&&(s3(t-1,n.length),58==n.charCodeAt(t-1))&&!mpn(n,n_t,t_t)}function Cpn(n,t){var e;return xA(n)===xA(t)||!!F$(t,92)&&(e=uG(t,92),n.e==e.e&&n.d==e.d&&d8(n,e.a))}function Ipn(n){switch(KQn(),n.g){case 4:return yRt;case 1:return kRt;case 3:return KRt;case 2:return _Rt;default:return FRt}}function Opn(n){var t,e;if(n.b)return n.b;for(e=Nut?null:n.d;e;){if(t=Nut?null:e.b)return t;e=Nut?null:e.d}return pS(),Eut}function Apn(n){var t,e;for(e=uM(pK(n.a.of((XYn(),LDt)))),t=new Ww(n.a.Sf());t.a>5),15,1))[e]=1<3;)r*=10,--c;n=(n+(r>>1))/r|0}return i.i=n,!0}function emn(n,t){var e,i,r;if(null==n.i&&eqn(n),e=n.i,-1!=(i=t.Lj()))for(r=e.length;i=0;--i)for(t=e[i],r=0;r>1,this.k=t-1>>1}function hmn(n){Stn(),uG(n.of((XYn(),q$t)),181).Hc((aUn(),oKt))&&(uG(n.of(bDt),181).Fc((eNn(),pRt)),uG(n.of(q$t),181).Mc(oKt))}function fmn(n){var t,e;t=n.d==(vAn(),Bdt),e=dPn(n),kfn(n.a,(jYn(),byt),t&&!e||!t&&e?(nMn(),LNt):(nMn(),ANt))}function lmn(){lmn=E,ZS(),jYn(),WTt=ETt,QTt=n7(Uhn(cT(lNt,1),m9n,149,0,[wTt,dTt,pTt,mTt,yTt,MTt,TTt,jTt,PTt,ITt,gTt,vTt,STt]))}function bmn(n,t){var e;return(e=uG(l8(n,ftn(new V,new z,new en,Uhn(cT(Rut,1),p1n,108,0,[(ybn(),Iut)]))),15)).Qc(Nq(e.gc()))}function wmn(n,t){var e,i;if((i=new od(n.a.ad(t,!0))).a.gc()<=1)throw hv(new Rv);return(e=i.a.ec().Kc()).Pb(),uG(e.Pb(),40)}function dmn(n,t,e){var i;return i=uM(n.p[t.i.p])+uM(n.d[t.i.p])+t.n.b+t.a.b,uM(n.p[e.i.p])+uM(n.d[e.i.p])+e.n.b+e.a.b-i}function gmn(n,t){return n.i>0&&(t.lengthn.i&&uQ(t,n.i,null),t}function pmn(n){var t;return 64&n.Db?Wwn(n):((t=new fx(Wwn(n))).a+=" (instanceClassName: ",VA(t,n.D),t.a+=")",t.a)}function mmn(n){var t,e,i,r;for(r=0,e=0,i=n.length;e0&&(n._j(),-1!=Txn(n,((e=null==t?0:Hon(t))&vZn)%n.d.length,e,t))}function Mmn(n,t){var i,r;n.a=Lgn(n.a,1),n.c=e.Math.min(n.c,t),n.b=e.Math.max(n.b,t),n.d+=t,i=t-n.f,r=n.e+i,n.f=r-n.e-i,n.e=r}function Tmn(n,t){switch(t){case 3:return void vcn(n,0);case 4:return void kcn(n,0);case 5:return void ycn(n,0);case 6:return void Mcn(n,0)}Awn(n,t)}function jmn(n,t){switch(t.g){case 1:return YU(n.j,(Lun(),ybt));case 2:return YU(n.j,(Lun(),Tbt));default:return hZ(),hZ(),zot}}function Emn(n){var t;switch(ZW(),(t=n.Pc()).length){case 0:return jat;case 1:return new Uq(WW(t[0]));default:return new t1(Ugn(t))}}function Smn(n,t){n.Xj();try{n.d.bd(n.e++,t),n.f=n.d.j,n.g=-1}catch(e){throw F$(e=Ehn(e),77)?hv(new Fv):hv(e)}}function Pmn(){Pmn=E,lBt=new Is,cBt=new Os,aBt=new As,oBt=new Ls,uBt=new Ns,sBt=new $s,hBt=new Ds,fBt=new xs,bBt=new Rs}function Cmn(n,t){var e,i;return wL(),i=null,t==(e=bF((qy(),qy(),Hat)))&&(i=uG(U1(Bat,n),624)),i||(i=new JW(n),t==e&&r2(Bat,n,i)),i}function Imn(n){return Yyn(),(n.q?n.q:(hZ(),hZ(),Vot))._b((jYn(),LMt))?uG(oIn(n,LMt),203):uG(oIn(HQ(n),NMt),203)}function Omn(n,t){var e,i;return i=null,vR(n,(jYn(),kTt))&&(e=uG(oIn(n,kTt),96)).pf(t)&&(i=e.of(t)),null==i&&(i=oIn(HQ(n),t)),i}function Amn(n,t){var e,i,r;return!!F$(t,44)&&(i=(e=uG(t,44)).ld(),xQ(r=Xwn(n.Rc(),i),e.md())&&(null!=r||n.Rc()._b(i)))}function Lmn(n,t){var e,i;return n.f>0&&(n._j(),e=ZNn(n,((i=null==t?0:Hon(t))&vZn)%n.d.length,i,t))?e.md():null}function Nmn(n,t,e){var i,r,c;return n.Pj()?(i=n.i,c=n.Qj(),edn(n,i,t),r=n.Ij(3,null,t,i,c),e?e.nj(r):e=r):edn(n,n.i,t),e}function $mn(n,t,e){var i,r;return i=new Ken(n.e,4,10,F$(r=t.c,90)?uG(r,29):(YYn(),x_t),null,Hyn(n,t),!1),e?e.nj(i):e=i,e}function Dmn(n,t,e){var i,r;return i=new Ken(n.e,3,10,null,F$(r=t.c,90)?uG(r,29):(YYn(),x_t),Hyn(n,t),!1),e?e.nj(i):e=i,e}function xmn(n){var t;return VK(),t=new eN(uG(n.e.of((XYn(),U$t)),8)),n.B.Hc((aUn(),eKt))&&(t.a<=0&&(t.a=20),t.b<=0&&(t.b=20)),t}function Rmn(n){var t,e;return cHn(),e=pz(n),0!=(t=pz(Dz(n,32)))?new x3(e,t):e>10||e<0?new Z5(1,e):Rot[e]}function Kmn(n,t){var e;return _L(n)&&_L(t)&&p0n<(e=n%t)&&e=0?c=c.a[1]:(r=c,c=c.a[0])}return r}function nvn(n,t,e){var i,r,c;for(r=null,c=n.b;c;){if(i=n.a.Ne(t,c.d),e&&0==i)return c;i<=0?c=c.a[0]:(r=c,c=c.a[1])}return r}function tvn(n,t,e,i){var r,c,a;return r=!1,nWn(n.f,e,i)&&(hkn(n.f,n.a[t][e],n.a[t][i]),a=(c=n.a[t])[i],c[i]=c[e],c[e]=a,r=!0),r}function evn(n,t,e){var i,r,c;for(r=uG(cQ(n.b,e),183),i=0,c=new Ww(t.j);c.a>5,t&=31,r=n.d+e+(0==t?0:1),kCn(i=Inn(YHt,W1n,28,r,15,1),n.a,e,t),K4(c=new VV(n.e,r,i)),c}function cvn(n,t){var e;for(e=new Fz(ix(Xgn(n).a.Kc(),new h));hDn(e);)if(uG(N9(e),18).d.i.c==t)return!1;return!0}function avn(n,t,i){var r,c,a,o,u;return o=n.k,u=t.k,c=pK(Omn(n,r=i[o.g][u.g])),a=pK(Omn(t,r)),e.Math.max((tJ(c),c),(tJ(a),a))}function ovn(){return Error.stackTraceLimit>0?(e.Error.stackTraceLimit=Error.stackTraceLimit=64,!0):"stack"in new Error}function uvn(n,t){return YN(),YN(),oan(T1n),(e.Math.abs(n-t)<=T1n||n==t||isNaN(n)&&isNaN(t)?0:nt?1:KL(isNaN(n),isNaN(t)))>0}function svn(n,t){return YN(),YN(),oan(T1n),(e.Math.abs(n-t)<=T1n||n==t||isNaN(n)&&isNaN(t)?0:nt?1:KL(isNaN(n),isNaN(t)))<0}function hvn(n,t){return YN(),YN(),oan(T1n),(e.Math.abs(n-t)<=T1n||n==t||isNaN(n)&&isNaN(t)?0:nt?1:KL(isNaN(n),isNaN(t)))<=0}function fvn(n,t){for(var e=0;!t[e]||""==t[e];)e++;for(var i=t[e++];e0&&this.b>0&&(this.g=mX(this.c,this.b,this.a))}function Tvn(n,t){var e,i=n.a;t=String(t),i.hasOwnProperty(t)&&(e=i[t]);var r=(Cfn(),Wat)[typeof e];return r?r(e):Vbn(typeof e)}function jvn(n){if(!(Iet in n.a))throw hv(new SM("Every element must have an id."));return fNn(v0(n,Iet))}function Evn(n){var t,e;for(e=WOn(n),t=null;2==n.c;)EYn(n),t||(QYn(),QYn(),vzn(t=new QN(2),e),e=t),e.Jm(WOn(n));return e}function Svn(n,t){var e,i;return n._j(),(e=ZNn(n,((i=null==t?0:Hon(t))&vZn)%n.d.length,i,t))?(uan(n,e),e.md()):null}function Pvn(n,t){return n.e>t.e?1:n.et.d?n.e:n.d=48&&n<48+e.Math.min(10,10)?n-48:n>=97&&n<97?n-97+10:n>=65&&n<65?n-65+10:-1}function Ivn(n,t){if(t.c==n)return t.d;if(t.d==n)return t.c;throw hv(new vM("Input edge is not connected to the input port."))}function Ovn(n){if(Bvn(Fnt,n))return qx(),eot;if(Bvn(_nt,n))return qx(),tot;throw hv(new vM("Expecting true or false"))}function Avn(n){switch(typeof n){case pZn:return pln(n);case gZn:return OL(n);case dZn:return XK(n);default:return null==n?0:xx(n)}}function Lvn(n,t){if(n.a<0)throw hv(new kM("Did not call before(...) or after(...) before calling add(...)."));return hR(n,n.a,t),n}function Nvn(n){return W0(),F$(n,162)?uG(cQ(AFt,iut),295).Rg(n):PV(AFt,Tbn(n))?uG(cQ(AFt,Tbn(n)),295).Rg(n):null}function $vn(n){var t;return 32&n.Db||0!=(t=iQ(uG(Lsn(n,16),29)||n.ii())-iQ(n.ii()))&&Dvn(n,32,Inn(dat,EZn,1,t,5,1)),n}function Dvn(n,t,e){var i;n.Db&t?null==e?H$n(n,t):-1==(i=jTn(n,t))?n.Eb=e:uQ(Kcn(n.Eb),i,e):null!=e&&lFn(n,t,e)}function xvn(n,t,e,i){var r;0!=t.c.length&&(r=gRn(e,i),kS(krn(new fX(null,new h3(WLn(t),1)),new ba),new pY(n,e,r,i)))}function Rvn(n,t){var e,i,r;return i=n.a.length-1,e=t-n.b&i,r=n.c-t&i,jK(e<(n.c-n.b&i)),e>=r?(Pbn(n,t),-1):(Sbn(n,t),1)}function Kvn(n){var t,e,i;if(!(i=n.Jh()))for(t=0,e=n.Ph();e;e=e.Ph()){if(++t>O0n)return e.Qh();if((i=e.Jh())||e==n)break}return i}function Fvn(n,t){var e;return xA(t)===xA(n)||!!F$(t,21)&&(e=uG(t,21)).gc()==n.gc()&&n.Ic(e)}function _vn(n,t){return n.et.e?1:n.ft.f?1:Hon(n)-Hon(t)}function Bvn(n,t){return tJ(n),null!=t&&(!!m_(n,t)||n.length==t.length&&m_(n.toLowerCase(),t.toLowerCase()))}function Hvn(n){var t,e;return dwn(n,-129)>0&&dwn(n,128)<0?(tX(),t=pz(n)+128,!(e=got[t])&&(e=got[t]=new Ow(n)),e):new Ow(n)}function Uvn(){Uvn=E,tbt=new EC(q4n,0),Zlt=new EC("INSIDE_PORT_SIDE_GROUPS",1),Ylt=new EC("GROUP_MODEL_ORDER",2),nbt=new EC(X4n,3)}function Gvn(n){var t;return n.b||wj(n,!(t=QF(n.e,n.a))||!m_(_nt,Lmn((!t.b&&(t.b=new XR((YYn(),H_t),wBt,t)),t.b),"qualified"))),n.c}function qvn(n,t){var e,i;for(s3(t,n.length),e=n.charCodeAt(t),i=t+1;i2e3&&(Gat=n,qat=e.setTimeout(vE,10)),0==Uat++&&(Pin((Gy(),Fat)),!0)}function wkn(n,t,e){var i;(Aut?(Opn(n),1):Lut||Dut?(pS(),1):$ut&&(pS(),0))&&((i=new iB(t)).b=e,qIn(n,i))}function dkn(n,t){var e;e=!n.A.Hc((Qmn(),JRt))||n.q==($Pn(),cRt),n.u.Hc((eNn(),wRt))?e?QQn(n,t):MQn(n,t):n.u.Hc(gRt)&&(e?YWn(n,t):MJn(n,t))}function gkn(n){var t;xA(zDn(n,(XYn(),E$t)))===xA((Own(),Oxt))&&(R0(n)?(t=uG(zDn(R0(n),E$t),346),Myn(n,E$t,t)):Myn(n,E$t,Axt))}function pkn(n){var t,e;return!!vR(n.d.i,(jYn(),UMt))&&(t=uG(oIn(n.c.i,UMt),17),e=uG(oIn(n.d.i,UMt),17),d$(t.a,e.a)>0)}function mkn(n,t,i){return new gY(e.Math.min(n.a,t.a)-i/2,e.Math.min(n.b,t.b)-i/2,e.Math.abs(n.a-t.a)+i,e.Math.abs(n.b-t.b)+i)}function vkn(n){var t;this.d=new Zm,this.j=new sj,this.g=new sj,t=n.g.b,this.f=uG(oIn(HQ(t),(jYn(),Byt)),88),this.e=uM(pK(eyn(t,yTt)))}function kkn(n){this.d=new Zm,this.e=new u8,this.c=Inn(YHt,W1n,28,(KQn(),Uhn(cT(YRt,1),z4n,64,0,[FRt,yRt,kRt,KRt,_Rt])).length,15,1),this.b=n}function ykn(n,t,e){var i;switch(i=e[n.g][t],n.g){case 1:case 3:return new MO(0,i);case 2:case 4:return new MO(i,0);default:return null}}function Mkn(n,t,e){var i;i=uG(A1(t.f),205);try{i.rf(n,e),WQ(t.f,i)}catch(r){throw F$(r=Ehn(r),103),hv(r)}}function Tkn(n,t,e){var i,r,c,a;return i=null,(c=DVn(aan(),t))&&(r=null,null!=(a=vVn(c,e))&&(r=n.qf(c,a)),i=r),i}function jkn(n,t,e,i){var r;if(t>=(r=n.length))return r;for(t=t>0?t:0;ti&&uQ(t,i,null),t}function Skn(n,t){var e,i;for(i=n.a.length,t.lengthi&&uQ(t,i,null),t}function Pkn(n,t){var e,i;++n.j,null!=t&&e$n(t,e=F$(i=n.a.Cb,99)?uG(i,99).th():null)?Dvn(n.a,4,e):Dvn(n.a,4,uG(t,129))}function Ckn(n){var t;if(null==n)return null;if(null==(t=Exn(yXn(n,!0))))throw hv(new PM("Invalid hexBinary value: '"+n+"'"));return t}function Ikn(n,t,e){var i;t.a.length>0&&(kD(n.b,new hG(t.a,e)),0<(i=t.a.length)?t.a=r1(t.a,0,0):0>i&&(t.a+=V$(Inn(JHt,N1n,28,-i,15,1))))}function Okn(n,t,e){var i;if(!e[t.d])for(e[t.d]=!0,i=new Ww(Ebn(t));i.a=n.b>>1)for(i=n.c,e=n.b;e>t;--e)i=i.b;else for(i=n.a.a,e=0;e=0?n.Wh(r):$Nn(n,i):e<0?$Nn(n,i):uG(i,69).wk().Bk(n,n.hi(),e)}function Qkn(n){var t,e;for(!n.o&&(n.o=new ltn((tYn(),XKt),EFt,n,0)),t=(e=n.o).c.Kc();t.e!=t.i.gc();)uG(t.Yj(),44).md();return Tnn(e)}function Jkn(n){var t;if(F$(n.a,4)){if(null==(t=Nvn(n.a)))throw hv(new kM(Bnt+n.b+"'. "+Rnt+(vK($Ft),$Ft.k)+Knt));return t}return n.a}function Ykn(n,t){var e,i;if(n.j.length!=t.j.length)return!1;for(e=0,i=n.j.length;e=64&&t<128&&(r=S3(r,Nz(1,t-64)));return r}function eyn(n,t){var e,i;return i=null,vR(n,(XYn(),ODt))&&(e=uG(oIn(n,ODt),96)).pf(t)&&(i=e.of(t)),null==i&&HQ(n)&&(i=oIn(HQ(n),t)),i}function iyn(n,t){var e;return e=uG(oIn(n,(jYn(),bMt)),75),_$(t,cbt)?e?BY(e):(e=new Uk,kfn(n,bMt,e)):e&&kfn(n,bMt,null),e}function ryn(){ryn=E,XYn(),ift=SDt,Jht=M$t,Xht=c$t,Yht=W$t,MEn(),tft=cst,nft=ist,eft=ost,Zht=est,pbn(),Vht=Hht,zht=Bht,Wht=Ght,Qht=qht}function cyn(n){switch(qS(),this.c=new Zm,this.d=n,n.g){case 0:case 2:this.a=kJ(Qlt),this.b=M0n;break;case 3:case 1:this.a=Qlt,this.b=T0n}}function ayn(n){var t;L_(uG(oIn(n,(jYn(),JMt)),101))&&(c$n((u3(0,(t=n.b).c.length),uG(t.c[0],30))),c$n(uG(zq(t,t.c.length-1),30)))}function oyn(n,t){t.Ug("Self-Loop post-processing",1),kS(JJ(JJ(sin(new fX(null,new h3(n.b,16)),new Di),new xi),new Ri),new Ki),t.Vg()}function uyn(n,t,e){var i;if(n.c)ycn(n.c,n.c.i+t),Mcn(n.c,n.c.j+e);else for(i=new Ww(n.b);i.a=0&&(e.d=n.t);break;case 3:n.t>=0&&(e.a=n.t)}n.C&&(e.b=n.C.b,e.c=n.C.c)}function pyn(){pyn=E,Tjt=new wI(k9n,0),kjt=new wI(D6n,1),yjt=new wI("LINEAR_SEGMENTS",2),vjt=new wI("BRANDES_KOEPF",3),Mjt=new wI(v9n,4)}function myn(){myn=E,Nht=new lC(o3n,0),Lht=new lC(u3n,1),$ht=new lC(s3n,2),Dht=new lC(h3n,3),Nht.a=!1,Lht.a=!0,$ht.a=!1,Dht.a=!0}function vyn(){vyn=E,yht=new hC(o3n,0),kht=new hC(u3n,1),Mht=new hC(s3n,2),Tht=new hC(h3n,3),yht.a=!1,kht.a=!0,Mht.a=!1,Tht.a=!0}function kyn(n,t,e,i){var r;return e>=0?n.Sh(t,e,i):(n.Ph()&&(i=(r=n.Fh())>=0?n.Ah(i):n.Ph().Th(n,-1-r,null,i)),n.Ch(t,e,i))}function yyn(n,t){switch(t){case 7:return!n.e&&(n.e=new f_(aFt,n,7,4)),void Czn(n.e);case 8:return!n.d&&(n.d=new f_(aFt,n,8,5)),void Czn(n.d)}Tmn(n,t)}function Myn(n,t,e){return null==e?(!n.o&&(n.o=new ltn((tYn(),XKt),EFt,n,0)),Svn(n.o,t)):(!n.o&&(n.o=new ltn((tYn(),XKt),EFt,n,0)),rSn(n.o,t,e)),n}function Tyn(n,t){var e,i,r,c;for(hZ(),e=n,c=t,F$(n,21)&&!F$(t,21)&&(e=t,c=n),r=e.Kc();r.Ob();)if(i=r.Pb(),c.Hc(i))return!1;return!0}function jyn(n,t,e,i){if(t.ae.b)return!0}return!1}function Eyn(n,t){return RA(n)?!!bZn[t]:n.Sm?!!n.Sm[t]:FA(n)?!!lZn[t]:!!KA(n)&&!!fZn[t]}function Syn(n){var t;t=n.a;do{(t=uG(N9(new Fz(ix(qgn(t).a.Kc(),new h))),18).c.i).k==(zIn(),wbt)&&n.b.Fc(t)}while(t.k==(zIn(),wbt));n.b=Spn(n.b)}function Pyn(n,t){var i,r,c;for(c=n,r=new Fz(ix(qgn(t).a.Kc(),new h));hDn(r);)(i=uG(N9(r),18)).c.i.c&&(c=e.Math.max(c,i.c.i.c.p));return c}function Cyn(n,t){var e,i,r;for(r=0,i=uG(uG(Y9(n.r,t),21),87).Kc();i.Ob();)r+=(e=uG(i.Pb(),117)).d.d+e.b.Mf().b+e.d.a,i.Ob()&&(r+=n.w);return r}function Iyn(n,t){var e,i,r;for(r=0,i=uG(uG(Y9(n.r,t),21),87).Kc();i.Ob();)r+=(e=uG(i.Pb(),117)).d.b+e.b.Mf().a+e.d.c,i.Ob()&&(r+=n.w);return r}function Oyn(n){var t,e,i;if(e=0,0==(i=GFn(n)).c.length)return 1;for(t=new Ww(i);t.a=0?n.Lh(a,e,!0):YNn(n,c,e):uG(c,69).wk().yk(n,n.hi(),r,e,i)}function xyn(n,t,e,i){var r;(r=bdn(t.pf((XYn(),K$t))?uG(t.of(K$t),21):n.j))!=(JYn(),sht)&&(e&&!vvn(r)||LOn(Sxn(n,r,i),t))}function Ryn(n){switch(n.g){case 1:return ehn(),pht;case 3:return ehn(),wht;case 2:return ehn(),ght;case 4:return ehn(),dht;default:return null}}function Kyn(n,t,e){if(n.e)switch(n.b){case 1:JY(n.c,t,e);break;case 0:YY(n.c,t,e)}else C5(n.c,t,e);n.a[t.p][e.p]=n.c.i,n.a[e.p][t.p]=n.c.e}function Fyn(n){var t,e;if(null==n)return null;for(e=Inn(pbt,zZn,199,n.length,0,2),t=0;t=0)return i;if(n.ol())for(e=0;e=(r=n.gc()))throw hv(new w_(t,r));if(n.Si()&&(i=n.dd(e))>=0&&i!=t)throw hv(new vM(Xet));return n.Xi(t,e)}function Gyn(n,t){if(this.a=uG(WW(n),253),this.b=uG(WW(t),253),n.Ed(t)>0||n==(py(),Mat)||t==(my(),Tat))throw hv(new vM("Invalid range: "+N5(n,t)))}function qyn(n){var t,e;for(this.b=new Zm,this.c=n,this.a=!1,e=new Ww(n.a);e.a0),(t&-t)==t)return t0(t*uRn(n,31)*4.656612873077393e-10);do{i=(e=uRn(n,31))%t}while(e-i+(t-1)<0);return t0(i)}function rMn(n,t,e){switch(e.g){case 1:n.a=t.a/2,n.b=0;break;case 2:n.a=t.a,n.b=t.b/2;break;case 3:n.a=t.a/2,n.b=t.b;break;case 4:n.a=0,n.b=t.b/2}}function cMn(n,t,e,i){var r,c;for(r=t;r1&&(r=Xyn(n,t)),r}function sMn(n){var t;return new MO(t=uM(pK(zDn(n,(XYn(),BDt))))*e.Math.sqrt((!n.a&&(n.a=new fV(bFt,n,10,11)),n.a).i),t/uM(pK(zDn(n,_Dt))))}function hMn(n){var t;return n.f&&n.f.Vh()&&(t=uG(n.f,54),n.f=uG(mwn(n,t),84),n.f!=t&&4&n.Db&&!(1&n.Db)&&Msn(n,new lV(n,9,8,t,n.f))),n.f}function fMn(n){var t;return n.i&&n.i.Vh()&&(t=uG(n.i,54),n.i=uG(mwn(n,t),84),n.i!=t&&4&n.Db&&!(1&n.Db)&&Msn(n,new lV(n,9,7,t,n.i))),n.i}function lMn(n){var t;return n.b&&64&n.b.Db&&(t=n.b,n.b=uG(mwn(n,t),19),n.b!=t&&4&n.Db&&!(1&n.Db)&&Msn(n,new lV(n,9,21,t,n.b))),n.b}function bMn(n,t){var e,i,r;null==n.d?(++n.e,++n.f):(i=t.Bi(),eKn(n,n.f+1),r=(i&vZn)%n.d.length,!(e=n.d[r])&&(e=n.d[r]=n.dk()),e.Fc(t),++n.f)}function wMn(n,t,e){var i;return!t.tk()&&(-2!=t.Ik()?null==(i=t.ik())?null==e:udn(i,e):t.qk()==n.e.Dh()&&null==e)}function dMn(){var n;man(16,b1n),n=aon(16),this.b=Inn(Cat,l1n,303,n,0,1),this.c=Inn(Cat,l1n,303,n,0,1),this.a=null,this.e=null,this.i=0,this.f=n-1,this.g=0}function gMn(n){LF.call(this),this.k=(zIn(),dbt),this.j=(man(6,g1n),new R7(6)),this.b=(man(2,g1n),new R7(2)),this.d=new $k,this.f=new xk,this.a=n}function pMn(n){var t,e;n.c.length<=1||(iAn(n,uG((t=w_n(n,(KQn(),KRt))).a,17).a,uG(t.b,17).a),iAn(n,uG((e=w_n(n,_Rt)).a,17).a,uG(e.b,17).a))}function mMn(n,t,e){var i,r;for(i=(r=n.a.b).c.length;i102?-1:n<=57?n-48:n<65?-1:n<=70?n-65+10:n<97?-1:n-97+10}function IMn(n,t){if(null==n)throw hv(new MM("null key in entry: null="+t));if(null==t)throw hv(new MM("null value in entry: "+n+"=null"))}function OMn(n,t){for(var e,i;n.Ob();){if(!t.Ob())return!1;if(e=n.Pb(),i=t.Pb(),!(xA(e)===xA(i)||null!=e&&udn(e,i)))return!1}return!t.Ob()}function AMn(n,t){var i;return i=Uhn(cT(eUt,1),I0n,28,15,[Nbn(n.a[0],t),Nbn(n.a[1],t),Nbn(n.a[2],t)]),n.d&&(i[0]=e.Math.max(i[0],i[2]),i[2]=i[0]),i}function LMn(n,t){var i;return i=Uhn(cT(eUt,1),I0n,28,15,[$bn(n.a[0],t),$bn(n.a[1],t),$bn(n.a[2],t)]),n.d&&(i[0]=e.Math.max(i[0],i[2]),i[2]=i[0]),i}function NMn(n,t,e){L_(uG(oIn(t,(jYn(),JMt)),101))||(Z8(n,t,yOn(t,e)),Z8(n,t,yOn(t,(KQn(),KRt))),Z8(n,t,yOn(t,yRt)),hZ(),f$(t.j,new Gg(n)))}function $Mn(n){var t,e;for(n.c||oVn(n),e=new Uk,N3(t=new Ww(n.a));t.a0&&(s3(0,t.length),43==t.charCodeAt(0))?(s3(1,t.length+1),t.substr(1)):t)}function nTn(n){var t;return null==n?null:new PN((t=yXn(n,!0)).length>0&&(s3(0,t.length),43==t.charCodeAt(0))?(s3(1,t.length+1),t.substr(1)):t)}function tTn(n,t,e,i,r,c,a,o){var u,s;i&&((u=i.a[0])&&tTn(n,t,e,u,r,c,a,o),ljn(n,e,i.d,r,c,a,o)&&t.Fc(i),(s=i.a[1])&&tTn(n,t,e,s,r,c,a,o))}function eTn(n,t,e){try{return _A(Son(n,t,e),1)}catch(i){throw F$(i=Ehn(i),333)?hv(new dM(b3n+n.o+"*"+n.p+w3n+t+TZn+e+d3n)):hv(i)}}function iTn(n,t,e){try{return _A(Son(n,t,e),0)}catch(i){throw F$(i=Ehn(i),333)?hv(new dM(b3n+n.o+"*"+n.p+w3n+t+TZn+e+d3n)):hv(i)}}function rTn(n,t,e){try{return _A(Son(n,t,e),2)}catch(i){throw F$(i=Ehn(i),333)?hv(new dM(b3n+n.o+"*"+n.p+w3n+t+TZn+e+d3n)):hv(i)}}function cTn(n,t){if(-1==n.g)throw hv(new xv);n.Xj();try{n.d.hd(n.g,t),n.f=n.d.j}catch(e){throw F$(e=Ehn(e),77)?hv(new Fv):hv(e)}}function aTn(n){var t,e,i;for(e=new Ww(n.b);e.ac&&uQ(t,c,null),t}function uTn(n,t){var e,i;if(i=n.gc(),null==t){for(e=0;e0&&(u+=r),s[h]=a,a+=o*(u+i)}function TTn(n){var t,e,i;for(i=n.f,n.n=Inn(eUt,I0n,28,i,15,1),n.d=Inn(eUt,I0n,28,i,15,1),t=0;t0?n.c:0),++c;n.b=r,n.d=a}function ATn(n,t){var i;return i=Uhn(cT(eUt,1),I0n,28,15,[eMn(n,(Yrn(),jst),t),eMn(n,Est,t),eMn(n,Sst,t)]),n.f&&(i[0]=e.Math.max(i[0],i[2]),i[2]=i[0]),i}function LTn(n,t,e){try{HBn(n,t+n.j,e+n.k,!1,!0)}catch(i){throw F$(i=Ehn(i),77)?hv(new dM(i.g+g3n+t+TZn+e+").")):hv(i)}}function NTn(n,t,e){try{HBn(n,t+n.j,e+n.k,!0,!1)}catch(i){throw F$(i=Ehn(i),77)?hv(new dM(i.g+g3n+t+TZn+e+").")):hv(i)}}function $Tn(n){var t;vR(n,(jYn(),PMt))&&((t=uG(oIn(n,PMt),21)).Hc((VDn(),Bxt))?(t.Mc(Bxt),t.Fc(Uxt)):t.Hc(Uxt)&&(t.Mc(Uxt),t.Fc(Bxt)))}function DTn(n){var t;vR(n,(jYn(),PMt))&&((t=uG(oIn(n,PMt),21)).Hc((VDn(),Vxt))?(t.Mc(Vxt),t.Fc(Xxt)):t.Hc(Xxt)&&(t.Mc(Xxt),t.Fc(Vxt)))}function xTn(n,t,e,i){var r,c,a;return null==n.a&&nOn(n,t),a=t.b.j.c.length,c=e.d.p,(r=i.d.p-1)<0&&(r=a-1),c<=r?n.a[r]-n.a[c]:n.a[a-1]-n.a[c]+n.a[r]}function RTn(n){var t,e;if(!n.b)for(n.b=o6(uG(n.f,27).kh().i),e=new DD(uG(n.f,27).kh());e.e!=e.i.gc();)t=uG(Zkn(e),135),kD(n.b,new Wy(t));return n.b}function KTn(n){var t,e;if(!n.e)for(n.e=o6(RJ(uG(n.f,27)).i),e=new DD(RJ(uG(n.f,27)));e.e!=e.i.gc();)t=uG(Zkn(e),123),kD(n.e,new Jp(t));return n.e}function FTn(n){var t,e;if(!n.a)for(n.a=o6(wZ(uG(n.f,27)).i),e=new DD(wZ(uG(n.f,27)));e.e!=e.i.gc();)t=uG(Zkn(e),27),kD(n.a,new Wx(n,t));return n.a}function _Tn(n){var t;if(!n.C&&(null!=n.D||null!=n.B))if(t=KWn(n))n.hl(t);else try{n.hl(null)}catch(e){if(!F$(e=Ehn(e),63))throw hv(e)}return n.C}function BTn(n){switch(n.q.g){case 5:QEn(n,(KQn(),yRt)),QEn(n,KRt);break;case 4:TVn(n,(KQn(),yRt)),TVn(n,KRt);break;default:PAn(n,(KQn(),yRt)),PAn(n,KRt)}}function HTn(n){switch(n.q.g){case 5:JEn(n,(KQn(),kRt)),JEn(n,_Rt);break;case 4:jVn(n,(KQn(),kRt)),jVn(n,_Rt);break;default:CAn(n,(KQn(),kRt)),CAn(n,_Rt)}}function UTn(n,t){var i,r,c;for(c=new sj,r=n.Kc();r.Ob();)tHn(i=uG(r.Pb(),36),c.a,0),c.a+=i.f.a+t,c.b=e.Math.max(c.b,i.f.b);return c.b>0&&(c.b+=t),c}function GTn(n,t){var i,r,c;for(c=new sj,r=n.Kc();r.Ob();)tHn(i=uG(r.Pb(),36),0,c.b),c.b+=i.f.b+t,c.a=e.Math.max(c.a,i.f.a);return c.a>0&&(c.a+=t),c}function qTn(n){var t,i,r;for(r=vZn,i=new Ww(n.a);i.a>16==6?n.Cb.Th(n,5,fFt,t):(e=lMn(uG(ern(uG(Lsn(n,16),29)||n.ii(),n.Db>>16),19)),n.Cb.Th(n,e.n,e.f,t))}function WTn(n){EZ();var t=n.e;if(t&&t.stack){var e=t.stack,i=t+"\n";return e.substring(0,i.length)==i&&(e=e.substring(i.length)),e.split("\n")}return[]}function QTn(n){var t;return Tan(),(t=wot)[n>>>28]|t[n>>24&15]<<4|t[n>>20&15]<<8|t[n>>16&15]<<12|t[n>>12&15]<<16|t[n>>8&15]<<20|t[n>>4&15]<<24|t[15&n]<<28}function JTn(n){var t,i,r;n.b==n.c&&(r=n.a.length,i=pfn(e.Math.max(8,r))<<1,0!=n.b?(Pon(n,t=MF(n.a,i),r),n.a=t,n.b=0):Xv(n.a,i),n.c=r)}function YTn(n,t){var e;return(e=n.b).pf((XYn(),uDt))?e.ag()==(KQn(),_Rt)?-e.Mf().a-uM(pK(e.of(uDt))):t+uM(pK(e.of(uDt))):e.ag()==(KQn(),_Rt)?-e.Mf().a:t}function ZTn(n){var t;return 0!=n.b.c.length&&uG(zq(n.b,0),72).a?uG(zq(n.b,0),72).a:null!=(t=sY(n))?t:""+(n.c?Ten(n.c.a,n,0):-1)}function njn(n){var t;return 0!=n.f.c.length&&uG(zq(n.f,0),72).a?uG(zq(n.f,0),72).a:null!=(t=sY(n))?t:""+(n.i?Ten(n.i.j,n,0):-1)}function tjn(n,t){var e,i;if(t<0||t>=n.gc())return null;for(e=t;e0?n.c:0),c=e.Math.max(c,t.d),++r;n.e=a,n.b=c}function rjn(n){var t,e;if(!n.b)for(n.b=o6(uG(n.f,123).kh().i),e=new DD(uG(n.f,123).kh());e.e!=e.i.gc();)t=uG(Zkn(e),135),kD(n.b,new Wy(t));return n.b}function cjn(n,t){var e,i,r;if(t.dc())return EK(),EK(),KFt;for(e=new cF(n,t.gc()),r=new DD(n);r.e!=r.i.gc();)i=Zkn(r),t.Hc(i)&&ttn(e,i);return e}function ajn(n,t,e,i){return 0==t?i?(!n.o&&(n.o=new ltn((tYn(),XKt),EFt,n,0)),n.o):(!n.o&&(n.o=new ltn((tYn(),XKt),EFt,n,0)),Tnn(n.o)):Dyn(n,t,e,i)}function ojn(n){var t,e;if(n.rb)for(t=0,e=n.rb.i;t>22))>>22)<0||(n.l=e&f0n,n.m=i&f0n,n.h=r&l0n,0)))}function ljn(n,t,e,i,r,c,a){var o,u;return!(t.Te()&&(u=n.a.Ne(e,i),u<0||!r&&0==u)||t.Ue()&&(o=n.a.Ne(e,c),o>0||!a&&0==o))}function bjn(n,t){if(Cln(),0!=n.j.g-t.j.g)return 0;switch(n.j.g){case 2:return Wgn(t,edt)-Wgn(n,edt);case 4:return Wgn(n,tdt)-Wgn(t,tdt)}return 0}function wjn(n){switch(n.g){case 0:return jgt;case 1:return Egt;case 2:return Sgt;case 3:return Pgt;case 4:return Cgt;case 5:return Igt;default:return null}}function djn(n,t,e){var i,r;return Kbn(r=new ny,t),qon(r,e),ttn((!n.c&&(n.c=new fV(m_t,n,12,10)),n.c),r),Pcn(i=r,0),Ccn(i,1),mdn(i,!0),ddn(i,!0),i}function gjn(n,t){var e,i;if(t>=n.i)throw hv(new pL(t,n.i));return++n.j,e=n.g[t],(i=n.i-t-1)>0&&qGn(n.g,t+1,n.g,t,i),uQ(n.g,--n.i,null),n.Qi(t,e),n.Ni(),e}function pjn(n,t){var e;return n.Db>>16==17?n.Cb.Th(n,21,h_t,t):(e=lMn(uG(ern(uG(Lsn(n,16),29)||n.ii(),n.Db>>16),19)),n.Cb.Th(n,e.n,e.f,t))}function mjn(n){var t,e,i;for(hZ(),f$(n.c,n.a),i=new Ww(n.c);i.ae.a.c.length))throw hv(new vM("index must be >= 0 and <= layer node count"));n.c&&men(n.c.a,n),n.c=e,e&&GX(e.a,t,n)}function Djn(n,t){var e,i,r;for(i=new Fz(ix(Ggn(n).a.Kc(),new h));hDn(i);)return e=uG(N9(i),18),new Ul(WW((r=uG(t.Kb(e),10)).n.b+r.o.b/2));return gy(),gy(),wat}function xjn(n,t){this.c=new Ym,this.a=n,this.b=t,this.d=uG(oIn(n,(GYn(),kmt)),312),xA(oIn(n,(jYn(),CMt)))===xA((Wtn(),Lgt))?this.e=new Pk:this.e=new Sk}function Rjn(n,t){var e,i;return i=null,n.pf((XYn(),ODt))&&(e=uG(n.of(ODt),96)).pf(t)&&(i=e.of(t)),null==i&&n.Tf()&&(i=n.Tf().of(t)),null==i&&(i=Jkn(t)),i}function Kjn(n,t){var e,i;e=n.fd(t);try{return i=e.Pb(),e.Qb(),i}catch(r){throw F$(r=Ehn(r),112)?hv(new dM("Can't remove element "+t)):hv(r)}}function Fjn(n,t){var e,i,r;if(0==(e=Wqn(n,t,r=new Lfn((i=new QE).q.getFullYear()-V1n,i.q.getMonth(),i.q.getDate())))||e0?t:0),++i;return new MO(r,c)}function zjn(n,t){var e;return n.Db>>16==6?n.Cb.Th(n,6,aFt,t):(e=lMn(uG(ern(uG(Lsn(n,16),29)||(tYn(),BKt),n.Db>>16),19)),n.Cb.Th(n,e.n,e.f,t))}function Vjn(n,t){var e;return n.Db>>16==7?n.Cb.Th(n,1,iFt,t):(e=lMn(uG(ern(uG(Lsn(n,16),29)||(tYn(),UKt),n.Db>>16),19)),n.Cb.Th(n,e.n,e.f,t))}function Wjn(n,t){var e;return n.Db>>16==9?n.Cb.Th(n,9,bFt,t):(e=lMn(uG(ern(uG(Lsn(n,16),29)||(tYn(),qKt),n.Db>>16),19)),n.Cb.Th(n,e.n,e.f,t))}function Qjn(n,t){var e;return n.Db>>16==5?n.Cb.Th(n,9,w_t,t):(e=lMn(uG(ern(uG(Lsn(n,16),29)||(YYn(),O_t),n.Db>>16),19)),n.Cb.Th(n,e.n,e.f,t))}function Jjn(n,t){var e;return n.Db>>16==7?n.Cb.Th(n,6,fFt,t):(e=lMn(uG(ern(uG(Lsn(n,16),29)||(YYn(),F_t),n.Db>>16),19)),n.Cb.Th(n,e.n,e.f,t))}function Yjn(n,t){var e;return n.Db>>16==3?n.Cb.Th(n,0,uFt,t):(e=lMn(uG(ern(uG(Lsn(n,16),29)||(YYn(),T_t),n.Db>>16),19)),n.Cb.Th(n,e.n,e.f,t))}function Zjn(){this.a=new ss,this.g=new dMn,this.j=new dMn,this.b=new Ym,this.d=new dMn,this.i=new dMn,this.k=new Ym,this.c=new Ym,this.e=new Ym,this.f=new Ym}function nEn(n,t,e){var i,r,c;for(e<0&&(e=0),c=n.i,r=e;rO0n)return eEn(n,i);if(i==n)return!0}}return!1}function iEn(n){switch(Gx(),n.q.g){case 5:uNn(n,(KQn(),yRt)),uNn(n,KRt);break;case 4:Kxn(n,(KQn(),yRt)),Kxn(n,KRt);break;default:$Qn(n,(KQn(),yRt)),$Qn(n,KRt)}}function rEn(n){switch(Gx(),n.q.g){case 5:k$n(n,(KQn(),kRt)),k$n(n,_Rt);break;case 4:fyn(n,(KQn(),kRt)),fyn(n,_Rt);break;default:DQn(n,(KQn(),kRt)),DQn(n,_Rt)}}function cEn(n){var t,e;(t=uG(oIn(n,(rGn(),Dft)),17))?(e=t.a,kfn(n,(mon(),Qft),0==e?new Upn:new v8(e))):kfn(n,(mon(),Qft),new v8(1))}function aEn(n,t){var e;switch(e=n.i,t.g){case 1:return-(n.n.b+n.o.b);case 2:return n.n.a-e.o.a;case 3:return n.n.b-e.o.b;case 4:return-(n.n.a+n.o.a)}return 0}function oEn(n,t){switch(n.g){case 0:return t==(Gpn(),Imt)?qwt:Xwt;case 1:return t==(Gpn(),Imt)?qwt:Gwt;case 2:return t==(Gpn(),Imt)?Gwt:Xwt;default:return Gwt}}function uEn(n,t){var i,r,c;for(men(n.a,t),n.e-=t.r+(0==n.a.c.length?0:n.c),c=b7n,r=new Ww(n.a);r.a>16==3?n.Cb.Th(n,12,bFt,t):(e=lMn(uG(ern(uG(Lsn(n,16),29)||(tYn(),_Kt),n.Db>>16),19)),n.Cb.Th(n,e.n,e.f,t))}function hEn(n,t){var e;return n.Db>>16==11?n.Cb.Th(n,10,bFt,t):(e=lMn(uG(ern(uG(Lsn(n,16),29)||(tYn(),GKt),n.Db>>16),19)),n.Cb.Th(n,e.n,e.f,t))}function fEn(n,t){var e;return n.Db>>16==10?n.Cb.Th(n,11,h_t,t):(e=lMn(uG(ern(uG(Lsn(n,16),29)||(YYn(),R_t),n.Db>>16),19)),n.Cb.Th(n,e.n,e.f,t))}function lEn(n,t){var e;return n.Db>>16==10?n.Cb.Th(n,12,p_t,t):(e=lMn(uG(ern(uG(Lsn(n,16),29)||(YYn(),__t),n.Db>>16),19)),n.Cb.Th(n,e.n,e.f,t))}function bEn(n){var t;return 1&n.Bb||!n.r||!n.r.Vh()||(t=uG(n.r,54),n.r=uG(mwn(n,t),142),n.r!=t&&4&n.Db&&!(1&n.Db)&&Msn(n,new lV(n,9,8,t,n.r))),n.r}function wEn(n,t,i){var r;return r=Uhn(cT(eUt,1),I0n,28,15,[BCn(n,(Yrn(),jst),t,i),BCn(n,Est,t,i),BCn(n,Sst,t,i)]),n.f&&(r[0]=e.Math.max(r[0],r[2]),r[2]=r[0]),r}function dEn(n,t){var e,i,r;if(0!=(r=lyn(n,t)).c.length)for(f$(r,new ti),e=r.c.length,i=0;i>19)!=(o=t.h>>19)?o-a:(i=n.h)!=(c=t.h)?i-c:(e=n.m)!=(r=t.m)?e-r:n.l-t.l}function MEn(){MEn=E,W_n(),ost=new mL($2n,ust=dst),Xin(),cst=new mL(D2n,ast=Zut),_kn(),ist=new mL(x2n,rst=Wut),est=new mL(R2n,(qx(),!0))}function TEn(n,t,e){var i,r;i=t*e,F$(n.g,154)?(r=Q6(n)).f.d?r.f.a||(n.d.a+=i+Z2n):(n.d.d-=i+Z2n,n.d.a+=i+Z2n):F$(n.g,10)&&(n.d.d-=i,n.d.a+=2*i)}function jEn(n,t,i){var r,c,a,o,u;for(c=n[i.g],u=new Ww(t.d);u.a0?n.b:0),++i;t.b=r,t.e=c}function SEn(n){var t,e,i;if(i=n.b,aS(n.i,i.length)){for(e=2*i.length,n.b=Inn(Cat,l1n,303,e,0,1),n.c=Inn(Cat,l1n,303,e,0,1),n.f=e-1,n.i=0,t=n.a;t;t=t.c)HLn(n,t,t);++n.g}}function PEn(n,t,e,i){var r,c,a,o;for(r=0;ro&&(u=o/r),(c=e.Math.abs(n.b))>a&&(s=a/c),vD(n,e.Math.min(u,s)),n}function AEn(){var n,t;tXn();try{if(t=uG(ASn((MP(),l_t),aet),2113))return t}catch(e){if(!F$(e=Ehn(e),103))throw hv(e);n=e,AW((t$(),n))}return new rs}function LEn(){var n,t;tXn();try{if(t=uG(ASn((MP(),l_t),Drt),2040))return t}catch(e){if(!F$(e=Ehn(e),103))throw hv(e);n=e,AW((t$(),n))}return new _s}function NEn(){var n,t;Ftn();try{if(t=uG(ASn((MP(),l_t),lct),2122))return t}catch(e){if(!F$(e=Ehn(e),103))throw hv(e);n=e,AW((t$(),n))}return new Nh}function $En(n,t,e){var i,r;return r=n.e,n.e=t,4&n.Db&&!(1&n.Db)&&(i=new lV(n,1,4,r,t),e?e.nj(i):e=i),r!=t&&(e=PWn(n,t?bRn(n,t):n.a,e)),e}function DEn(){QE.call(this),this.e=-1,this.a=!1,this.p=j1n,this.k=-1,this.c=-1,this.b=-1,this.g=!1,this.f=-1,this.j=-1,this.n=-1,this.i=-1,this.d=-1,this.o=j1n}function xEn(n,t){var e,i,r;if(i=n.b.d.d,n.a||(i+=n.b.d.a),r=t.b.d.d,t.a||(r+=t.b.d.a),0==(e=ugn(i,r))){if(!n.a&&t.a)return-1;if(!t.a&&n.a)return 1}return e}function REn(n,t){var e,i,r;if(i=n.b.b.d,n.a||(i+=n.b.b.a),r=t.b.b.d,t.a||(r+=t.b.b.a),0==(e=ugn(i,r))){if(!n.a&&t.a)return-1;if(!t.a&&n.a)return 1}return e}function KEn(n,t){var e,i,r;if(i=n.b.g.d,n.a||(i+=n.b.g.a),r=t.b.g.d,t.a||(r+=t.b.g.a),0==(e=ugn(i,r))){if(!n.a&&t.a)return-1;if(!t.a&&n.a)return 1}return e}function FEn(){FEn=E,klt=wz(Aq(Aq(Aq(new wJ,(uIn(),Slt),(zYn(),owt)),Slt,fwt),Plt,mwt),Plt,Wbt),Mlt=Aq(Aq(new wJ,Slt,Fbt),Slt,Qbt),ylt=wz(new wJ,Plt,Ybt)}function _En(n){var t,e,i,r,c;for(t=uG(oIn(n,(GYn(),$pt)),85),c=n.n,i=t.Cc().Kc();i.Ob();)(r=(e=uG(i.Pb(),314)).i).c+=c.a,r.d+=c.b,e.c?P_n(e):C_n(e);kfn(n,$pt,null)}function BEn(n,t,e){var i,r;switch(i=(r=n.b).d,t.g){case 1:return-i.d-e;case 2:return r.o.a+i.c+e;case 3:return r.o.b+i.a+e;case 4:return-i.b-e;default:return-1}}function HEn(n,t,e){var i;for(e.Ug("Interactive node placement",1),n.a=uG(oIn(t,(GYn(),kmt)),312),i=new Ww(t.b);i.a0&&(r=ZNn(n,(c&vZn)%n.d.length,c,t))?r.nd(e):(i=n.ck(c,t,e),n.c.Fc(i),null)}function cSn(n,t){var e,i,r,c;switch(tdn(n,t).Kl()){case 3:case 2:for(r=0,c=(e=hXn(t)).i;r=0;r--)if(m_(n[r].d,t)||m_(n[r].d,i)){n.length>=r+1&&n.splice(0,r+1);break}return n}function bSn(n,t){var i;return _L(n)&&_L(t)&&p0n<(i=n/t)&&i0&&(n.b+=2,n.a+=r):(n.b+=1,n.a+=e.Math.min(r,c))}function ySn(n){var t;t=uG(oIn(uG(hyn(n.b,0),40),(QGn(),pCt)),107),kfn(n,(OQn(),kPt),new MO(0,0)),iUn(new L7,n,t.b+t.c-uM(pK(oIn(n,PPt))),t.d+t.a-uM(pK(oIn(n,IPt))))}function MSn(n,t){var e;if(e=!1,RA(t)&&(e=!0,pQ(n,new QW(mK(t)))),e||F$(t,242)&&(e=!0,pQ(n,new Pb(Q_(uG(t,242))))),!e)throw hv(new pM(Cet))}function TSn(n,t,e,i){var r,c,a;return r=new Ken(n.e,1,10,F$(a=t.c,90)?uG(a,29):(YYn(),x_t),F$(c=e.c,90)?uG(c,29):(YYn(),x_t),Hyn(n,t),!1),i?i.nj(r):i=r,i}function jSn(n){var t,e;switch(uG(oIn(HQ(n),(jYn(),lMt)),429).g){case 0:return t=n.n,e=n.o,new MO(t.a+e.a/2,t.b+e.b/2);case 1:return new eN(n.n);default:return null}}function ESn(){ESn=E,Fgt=new rI(q4n,0),Kgt=new rI("LEFTUP",1),Bgt=new rI("RIGHTUP",2),Rgt=new rI("LEFTDOWN",3),_gt=new rI("RIGHTDOWN",4),xgt=new rI("BALANCED",5)}function SSn(n,t,e){var i,r,c;if(0==(i=ugn(n.a[t.p],n.a[e.p]))){if(r=uG(oIn(t,(GYn(),Vpt)),15),c=uG(oIn(e,Vpt),15),r.Hc(e))return-1;if(c.Hc(t))return 1}return i}function PSn(n){switch(n.g){case 1:return new So;case 2:return new Po;case 3:return new Eo;case 0:return null;default:throw hv(new vM(k7n+(null!=n.f?n.f:""+n.g)))}}function CSn(n,t,e){switch(t){case 1:return!n.n&&(n.n=new fV(lFt,n,1,7)),Czn(n.n),!n.n&&(n.n=new fV(lFt,n,1,7)),void CW(n.n,uG(e,16));case 2:return void Gan(n,mK(e))}bln(n,t,e)}function ISn(n,t,e){switch(t){case 3:return void vcn(n,uM(pK(e)));case 4:return void kcn(n,uM(pK(e)));case 5:return void ycn(n,uM(pK(e)));case 6:return void Mcn(n,uM(pK(e)))}CSn(n,t,e)}function OSn(n,t,e){var i,r;(i=CCn(r=new ny,t,null))&&i.oj(),qon(r,e),ttn((!n.c&&(n.c=new fV(m_t,n,12,10)),n.c),r),Pcn(r,0),Ccn(r,1),mdn(r,!0),ddn(r,!0)}function ASn(n,t){var e,i;return F$(e=_P(n.i,t),241)?((i=uG(e,241)).zi(),i.wi()):F$(e,507)?i=uG(e,2037).b:null}function LSn(n,t,e,i){var r,c;return WW(t),WW(e),Ren(!!(c=uG(W_(n.d,t),17)),"Row %s not in %s",t,n.e),Ren(!!(r=uG(W_(n.b,e),17)),"Column %s not in %s",e,n.c),Hhn(n,c.a,r.a,i)}function NSn(n,t,e,i,r,c,a){var o,u,s,h,f;if(f=PTn(o=(s=c==a-1)?i:0,h=r[c]),10!=i&&Uhn(cT(n,a-c),t[c],e[c],o,f),!s)for(++c,u=0;u1||-1==o?(c=uG(u,15),r.Wb(Vpn(n,c))):r.Wb(oUn(n,uG(u,58))))}function zSn(n,t,e,i){kE();var r=hZn;function c(){for(var n=0;n0)return!1;return!0}function QSn(n){var t,e,i,r,c;for(i=new bsn(new Nw(n.b).a);i.b;)t=uG((e=von(i)).ld(),10),c=uG(uG(e.md(),42).a,10),r=uG(uG(e.md(),42).b,8),JF(dL(t.n),JF(D$(c.n),r))}function JSn(n){switch(uG(oIn(n.b,(jYn(),Jyt)),387).g){case 1:kS(YJ(sin(new fX(null,new h3(n.d,16)),new Vr),new Wr),new Qr);break;case 2:gBn(n);break;case 0:mLn(n)}}function YSn(n,t,e){var i,r,c;for(!(i=e)&&(i=new fy),i.Ug("Layout",n.a.c.length),c=new Ww(n.a);c.a$9n)return e;i>-1e-6&&++e}return e}function rPn(n,t){var e;t!=n.b?(e=null,n.b&&(e=O1(n.b,n,-4,e)),t&&(e=kyn(t,n,-4,e)),(e=kwn(n,t,e))&&e.oj()):4&n.Db&&!(1&n.Db)&&Msn(n,new lV(n,1,3,t,t))}function cPn(n,t){var e;t!=n.f?(e=null,n.f&&(e=O1(n.f,n,-1,e)),t&&(e=kyn(t,n,-1,e)),(e=vwn(n,t,e))&&e.oj()):4&n.Db&&!(1&n.Db)&&Msn(n,new lV(n,1,0,t,t))}function aPn(n,t,e,i){var r,c,a;return uN(n.e)&&(a=VZ(n,1,r=t.Lk(),t.md(),c=e.md(),r.Jk()?Dqn(n,r,c,F$(r,102)&&!!(uG(r,19).Bb&P0n)):-1,!0),i?i.nj(a):i=a),i}function oPn(n){var t,e,i;if(null==n)return null;if((e=uG(n,15)).dc())return"";for(i=new zM,t=e.Kc();t.Ob();)VA(i,(uVn(),mK(t.Pb()))),i.a+=" ";return CL(i,i.a.length-1)}function uPn(n){var t,e,i;if(null==n)return null;if((e=uG(n,15)).dc())return"";for(i=new zM,t=e.Kc();t.Ob();)VA(i,(uVn(),mK(t.Pb()))),i.a+=" ";return CL(i,i.a.length-1)}function sPn(n,t,e){var i,r;return i=n.c[t.c.p][t.p],r=n.c[e.c.p][e.p],null!=i.a&&null!=r.a?Rz(i.a,r.a):null!=i.a?-1:null!=r.a?1:0}function hPn(n,t,e){return e.Ug("Tree layout",1),_J(n.b),JV(n.b,(Cjn(),zSt),zSt),JV(n.b,VSt,VSt),JV(n.b,WSt,WSt),JV(n.b,QSt,QSt),n.a=Qzn(n.b,t),YSn(n,t,e.eh(1)),e.Vg(),t}function fPn(n,t){var e,i,r;if(t)for(r=((e=new Gz(t.a.length)).b-e.a)*e.c<0?(CP(),XHt):new xD(e);r.Ob();)i=v6(t,uG(r.Pb(),17).a),QJ(new om(n).a,i)}function lPn(n,t){var e,i,r;if(t)for(r=((e=new Gz(t.a.length)).b-e.a)*e.c<0?(CP(),XHt):new xD(e);r.Ob();)i=v6(t,uG(r.Pb(),17).a),WJ(new Yp(n).a,i)}function bPn(n){if(null!=n&&n.length>0&&33==VJ(n,n.length-1))try{return null==sxn(r1(n,0,n.length-1)).e}catch(t){if(!F$(t=Ehn(t),33))throw hv(t)}return!1}function wPn(n,t,e){var i,r;switch(i=pgn(HQ(t)),o2(r=new lOn,t),e.g){case 1:NLn(r,Gdn(Ipn(i)));break;case 2:NLn(r,Ipn(i))}return kfn(r,(jYn(),QMt),pK(oIn(n,QMt))),r}function dPn(n){var t,e;return t=uG(N9(new Fz(ix(qgn(n.a).a.Kc(),new h))),18),e=uG(N9(new Fz(ix(Xgn(n.a).a.Kc(),new h))),18),oM(gK(oIn(t,(GYn(),pmt))))||oM(gK(oIn(e,pmt)))}function gPn(){gPn=E,wdt=new zC("ONE_SIDE",0),gdt=new zC("TWO_SIDES_CORNER",1),pdt=new zC("TWO_SIDES_OPPOSING",2),ddt=new zC("THREE_SIDES",3),bdt=new zC("FOUR_SIDES",4)}function pPn(n,t){var e,i,r,c;for(c=new Zm,r=0,i=t.Kc();i.Ob();){for(e=xwn(uG(i.Pb(),17).a+r);e.a=n.f)break;mv(c.c,e)}return c}function mPn(n,t){var e,i,r;for(i=new Ww(t.a);i.a0&&Mjn(this,this.c-1,(KQn(),kRt)),this.c0&&n[0].length>0&&(this.c=oM(gK(oIn(HQ(n[0][0]),(GYn(),Wpt))))),this.a=Inn(REt,zZn,2117,n.length,0,2),this.b=Inn(UEt,zZn,2118,n.length,0,2),this.d=new zbn}function LPn(n){return 0!=n.c.length&&((u3(0,n.c.length),uG(n.c[0],18)).c.i.k==(zIn(),wbt)||o9(YJ(new fX(null,new h3(n,16)),new xc),new Rc))}function NPn(n,t){var i,r,c,a,o,u;for(o=GFn(t),c=t.f,u=t.g,a=e.Math.sqrt(c*c+u*u),r=0,i=new Ww(o);i.a=0?(e=bSn(n,g0n),i=Kmn(n,g0n)):(e=bSn(t=Dz(n,1),5e8),i=Lgn(Nz(i=Kmn(t,5e8),1),E3(n,1))),S3(Nz(i,32),E3(e,L0n))}function YPn(n,t,e){var i;switch(MK(0!=t.b),i=uG(Lrn(t,t.a.a),8),e.g){case 0:i.b=0;break;case 2:i.b=n.f;break;case 3:i.a=0;break;default:i.a=n.g}return lW(Fkn(t,0),i),t}function ZPn(n,t,e,i){var r,c,a,o,u;switch(u=n.b,o=ykn(a=(c=t.d).j,u.d[a.g],e),r=JF(D$(c.n),c.a),c.j.g){case 1:case 3:o.a+=r.a;break;case 2:case 4:o.b+=r.b}s8(i,o,i.c.b,i.c)}function nCn(n,t,e){var i,r,c,a;for(a=Ten(n.e,t,0),(c=new Tk).b=e,i=new N4(n.e,a);i.b1;t>>=1)1&t&&(i=j5(i,e)),e=1==e.d?j5(e,e):new nkn(FUn(e.a,e.d,Inn(YHt,W1n,28,e.d<<1,15,1)));return i=j5(i,e)}function aCn(){var n,t,e,i;for(aCn=E,but=Inn(eUt,I0n,28,25,15,1),wut=Inn(eUt,I0n,28,33,15,1),i=152587890625e-16,t=32;t>=0;t--)wut[t]=i,i*=.5;for(e=1,n=24;n>=0;n--)but[n]=e,e*=.5}function oCn(n){var t,e;if(oM(gK(zDn(n,(jYn(),sMt)))))for(e=new Fz(ix(eRn(n).a.Kc(),new h));hDn(e);)if(BNn(t=uG(N9(e),74))&&oM(gK(zDn(t,hMt))))return!0;return!1}function uCn(n,t){var e,i,r;FV(n.f,t)&&(t.b=n,i=t.c,-1!=Ten(n.j,i,0)||kD(n.j,i),r=t.d,-1!=Ten(n.j,r,0)||kD(n.j,r),0!=(e=t.a.b).c.length&&(!n.i&&(n.i=new vkn(n)),Psn(n.i,e)))}function sCn(n){var t,e,i,r;return(e=(t=n.c.d).j)==(r=(i=n.d.d).j)?t.p=0&&m_(n.substr(t,3),"GMT")||t>=0&&m_(n.substr(t,3),"UTC")?(e[0]=t+3,SUn(n,e,i)):SUn(n,e,i)}function wCn(n,t){var e,i,r,c,a;for(c=n.g.a,a=n.g.b,i=new Ww(n.d);i.ae;c--)n[c]|=t[c-e-1]>>>a,n[c-1]=t[c-e-1]<0&&qGn(n.g,t,n.g,t+i,o),a=e.Kc(),n.i+=i,r=0;r>4&15,c=15&n[i],a[r++]=JKt[e],a[r++]=JKt[c];return mvn(a,0,a.length)}function $Cn(n){var t,e;return n>=P0n?(t=C0n+(n-P0n>>10&1023)&D1n,e=56320+(n-P0n&1023)&D1n,String.fromCharCode(t)+""+String.fromCharCode(e)):String.fromCharCode(n&D1n)}function DCn(n,t){var e,i,r,c;return VK(),(r=uG(uG(Y9(n.r,t),21),87)).gc()>=2&&(i=uG(r.Kc().Pb(),117),e=n.u.Hc((eNn(),bRt)),c=n.u.Hc(pRt),!i.a&&!e&&(2==r.gc()||c))}function xCn(n,t,e,i,r){var c,a,o;for(c=zFn(n,t,e,i,r),o=!1;!c;)gxn(n,r,!0),o=!0,c=zFn(n,t,e,i,r);o&&gxn(n,r,!1),0!=(a=Jhn(r)).c.length&&(n.d&&n.d.Gg(a),xCn(n,r,e,i,a))}function RCn(){RCn=E,mxt=new OO(q4n,0),gxt=new OO("DIRECTED",1),vxt=new OO("UNDIRECTED",2),wxt=new OO("ASSOCIATION",3),pxt=new OO("GENERALIZATION",4),dxt=new OO("DEPENDENCY",5)}function KCn(n,t){var e;if(!h0(n))throw hv(new kM(Stt));switch(e=h0(n),t.g){case 1:return-(n.j+n.f);case 2:return n.i-e.g;case 3:return n.j-e.f;case 4:return-(n.i+n.g)}return 0}function FCn(n,t,e){var i,r,c;return i=t.Lk(),c=t.md(),r=i.Jk()?VZ(n,4,i,c,null,Dqn(n,i,c,F$(i,102)&&!!(uG(i,19).Bb&P0n)),!0):VZ(n,i.tk()?2:1,i,c,i.ik(),-1,!0),e?e.nj(r):e=r,e}function _Cn(n,t){var e,i;for(tJ(t),i=n.b.c.length,kD(n.b,t);i>0;){if(e=i,i=(i-1)/2|0,n.a.Ne(zq(n.b,i),t)<=0)return Y8(n.b,e,t),!0;Y8(n.b,e,zq(n.b,i))}return Y8(n.b,i,t),!0}function BCn(n,t,i,r){var c,a;if(c=0,i)c=$bn(n.a[i.g][t.g],r);else for(a=0;a<$st;a++)c=e.Math.max(c,$bn(n.a[a][t.g],r));return t==(Yrn(),Est)&&n.b&&(c=e.Math.max(c,n.b.a)),c}function HCn(n,t){var e,i,r,c,a;return i=n.i,r=t.i,!(!i||!r)&&i.i==r.i&&i.i!=(KQn(),kRt)&&i.i!=(KQn(),_Rt)&&(e=(c=i.g.a)+i.j.a,c<=(a=r.g.a)+r.j.a&&e>=a)}function UCn(n){switch(n.g){case 0:return new Uo;case 1:return new qo;default:throw hv(new vM("No implementation is available for the width approximator "+(null!=n.f?n.f:""+n.g)))}}function GCn(n,t,e,i){var r;if(r=!1,RA(i)&&(r=!0,ZG(t,e,mK(i))),r||KA(i)&&(r=!0,GCn(n,t,e,i)),r||F$(i,242)&&(r=!0,vZ(t,e,uG(i,242))),!r)throw hv(new pM(Cet))}function qCn(n,t){var e,i,r;if((e=t.qi(n.a))&&null!=(r=Lmn((!e.b&&(e.b=new XR((YYn(),H_t),wBt,e)),e.b),Srt)))for(i=1;i<(gAn(),mBt).length;++i)if(m_(mBt[i],r))return i;return 0}function XCn(n,t){var e,i,r;if((e=t.qi(n.a))&&null!=(r=Lmn((!e.b&&(e.b=new XR((YYn(),H_t),wBt,e)),e.b),Srt)))for(i=1;i<(gAn(),vBt).length;++i)if(m_(vBt[i],r))return i;return 0}function zCn(n,t){var e,i,r,c;if(tJ(t),(c=n.a.gc())0?1:0;c.a[r]!=e;)c=c.a[r],r=n.a.Ne(e.d,c.d)>0?1:0;c.a[r]=i,i.b=e.b,i.a[0]=e.a[0],i.a[1]=e.a[1],e.a[0]=null,e.a[1]=null}function ZCn(n){var t,e,i,r;for(t=new Zm,zV(e=Inn(ZHt,B2n,28,n.a.c.length,16,1),e.length),r=new Ww(n.a);r.a0&&fUn((u3(0,e.c.length),uG(e.c[0],30)),n),e.c.length>1&&fUn(uG(zq(e,e.c.length-1),30),n),t.Vg()}function eIn(n){return eNn(),!(qsn(X1(WX(wRt,Uhn(cT(BRt,1),p1n,279,0,[gRt])),n))>1||qsn(X1(WX(bRt,Uhn(cT(BRt,1),p1n,279,0,[lRt,pRt])),n))>1)}function iIn(n,t){F$(U1((MP(),l_t),n),507)?r2(l_t,n,new EA(this,t)):r2(l_t,n,this),HIn(this,t),t==(vj(),y_t)?(this.wb=uG(this,2038),uG(t,2040)):this.wb=(tQ(),M_t)}function rIn(n){var t,e;if(null==n)return null;for(t=null,e=0;e=$1n?"error":i>=900?"warn":i>=800?"info":"log",n.a),n.b&&SKn(t,e,n.b,"Exception: ",!0))}function oIn(n,t){var e,i;return!n.q&&(n.q=new Ym),null!=(i=cQ(n.q,t))?i:(F$(e=t.Sg(),4)&&(null==e?(!n.q&&(n.q=new Ym),u7(n.q,t)):(!n.q&&(n.q=new Ym),vJ(n.q,t,e))),e)}function uIn(){uIn=E,Tlt=new gC("P1_CYCLE_BREAKING",0),jlt=new gC("P2_LAYERING",1),Elt=new gC("P3_NODE_ORDERING",2),Slt=new gC("P4_NODE_PLACEMENT",3),Plt=new gC("P5_EDGE_ROUTING",4)}function sIn(n,t){var e;if(Win(),n.c==t.c){if(n.b==t.b||eun(n.b,t.b)){if(e=BL(n.b)?1:-1,n.a&&!t.a)return e;if(!n.a&&t.a)return-e}return d$(n.b.g,t.b.g)}return ugn(n.c,t.c)}function hIn(n,t){var e,i;if(kIn(n,t))return!0;for(i=new Ww(t);i.a=(r=n.Ej())||t<0)throw hv(new dM(zet+t+Vet+r));if(e>=r||e<0)throw hv(new dM(Wet+e+Vet+r));return t!=e?(c=n.Cj(e),n.qj(t,c),i=c):i=n.xj(e),i}function mIn(n){var t,e,i;if(i=n,n)for(t=0,e=n.Eh();e;e=e.Eh()){if(++t>O0n)return mIn(e);if(i=e,e==n)throw hv(new kM("There is a cycle in the containment hierarchy of "+n))}return i}function vIn(n){var t,e,i;for(i=new Ysn(TZn,"[","]"),e=n.Kc();e.Ob();)o7(i,xA(t=e.Pb())===xA(n)?"(this Collection)":null==t?IZn:cpn(t));return i.a?0==i.e.length?i.a.a:i.a.a+""+i.e:i.c}function kIn(n,t){var e,i;if(i=!1,t.gc()<2)return!1;for(e=0;e1&&(n.j.b+=n.e)):(n.j.a+=i.a,n.j.b=e.Math.max(n.j.b,i.b),n.d.c.length>1&&(n.j.a+=n.e))}function jIn(){jIn=E,ydt=Uhn(cT(YRt,1),z4n,64,0,[(KQn(),yRt),kRt,KRt]),kdt=Uhn(cT(YRt,1),z4n,64,0,[kRt,KRt,_Rt]),Mdt=Uhn(cT(YRt,1),z4n,64,0,[KRt,_Rt,yRt]),Tdt=Uhn(cT(YRt,1),z4n,64,0,[_Rt,yRt,kRt])}function EIn(n,t,e,i){var r,c,a,o,u;if(c=n.c.d,a=n.d.d,c.j!=a.j)for(u=n.b,r=c.j,o=null;r!=a.j;)o=0==t?qdn(r):Udn(r),aq(i,JF(ykn(r,u.d[r.g],e),ykn(o,u.d[o.g],e))),r=o}function SIn(n,t,e,i){var r,c,a,o,u;return o=uG((a=Sjn(n.a,t,e)).a,17).a,c=uG(a.b,17).a,i&&(u=uG(oIn(t,(GYn(),lmt)),10),r=uG(oIn(e,lmt),10),u&&r&&(C5(n.b,u,r),o+=n.b.i,c+=n.b.e)),o>c}function PIn(n){var t,e,i,r,c,a,o,u;for(this.a=Fyn(n),this.b=new Zm,i=0,r=(e=n).length;iGK(n.d).c?(n.i+=n.g.c,Bmn(n.d)):GK(n.d).c>GK(n.g).c?(n.e+=n.d.c,Bmn(n.g)):(n.i+=TX(n.g),n.e+=TX(n.d),Bmn(n.g),Bmn(n.d))}function LIn(n,t,e){var i,r,c,a;for(c=t.q,a=t.r,new A2((_7(),$St),t,c,1),new A2($St,c,a,1),r=new Ww(e);r.au&&(s=u/r),(c=e.Math.abs(t.b-n.b))>a&&(h=a/c),o=e.Math.min(s,h),n.a+=o*(t.a-n.a),n.b+=o*(t.b-n.b)}function FIn(n,t,e,i,r){var c,a;for(a=!1,c=uG(zq(e.b,0),27);Sqn(n,t,c,i,r)&&(a=!0,HSn(e,c),0!=e.b.c.length);)c=uG(zq(e.b,0),27);return 0==e.b.c.length&&uEn(e.j,e),a&&OTn(t.q),a}function _In(n,t){var e,i,r,c;if(l_n(),t.b<2)return!1;for(i=e=uG(I6(c=Fkn(t,0)),8);c.b!=c.d.c;){if(VRn(n,i,r=uG(I6(c),8)))return!0;i=r}return!!VRn(n,i,e)}function BIn(n,t,e,i){return 0==e?(!n.o&&(n.o=new ltn((tYn(),XKt),EFt,n,0)),G_(n.o,t,i)):uG(ern(uG(Lsn(n,16),29)||n.ii(),e),69).wk().Ak(n,$vn(n),e-iQ(n.ii()),t,i)}function HIn(n,t){var e;t!=n.sb?(e=null,n.sb&&(e=uG(n.sb,54).Th(n,1,sFt,e)),t&&(e=uG(t,54).Rh(n,1,sFt,e)),(e=Jwn(n,t,e))&&e.oj()):4&n.Db&&!(1&n.Db)&&Msn(n,new lV(n,1,4,t,t))}function UIn(n,t){var e,i;if(!t)throw hv(new SM("All edge sections need an end point."));e=$cn(t,"x"),mcn(new rm(n).a,(tJ(e),e)),i=$cn(t,"y"),jcn(new cm(n).a,(tJ(i),i))}function GIn(n,t){var e,i;if(!t)throw hv(new SM("All edge sections need a start point."));e=$cn(t,"x"),Tcn(new tm(n).a,(tJ(e),e)),i=$cn(t,"y"),Ecn(new em(n).a,(tJ(i),i))}function qIn(n,t){var e,i,r,c,a;for(i=0,c=xln(n).length;i>22-t,r=n.h<>22-t):t<44?(e=0,i=n.l<>44-t):(e=0,i=0,r=n.l<n)throw hv(new vM("k must be smaller than n"));return 0==t||t==n?1:0==n?0:uSn(n)/(uSn(t)*uSn(n-t))}function iOn(n,t){var e,i,r,c;for(e=new jN(n);null!=e.g||e.c?null==e.g||0!=e.i&&uG(e.g[e.i-1],51).Ob():O0(e);)if(F$(c=uG(Wxn(e),58),167))for(i=uG(c,167),r=0;r>4],t[2*e+1]=mHt[15&r];return mvn(t,0,t.length)}function vOn(n){var t;switch(TJ(),n.c.length){case 0:return Eat;case 1:return fq((t=uG(ULn(new Ww(n)),44)).ld(),t.md());default:return new xy(uG(Ekn(n,Inn(Sat,c1n,44,n.c.length,0,1)),173))}}function kOn(n){var t,e,i,r,c;for(t=new ND,e=new ND,A6(t,n),A6(e,n);e.b!=e.c;)for(c=new Ww(uG(xV(e),36).a);c.a0&&sHn(n,e,t),r):j$n(n,t,e)}function jOn(){jOn=E,XYn(),BIt=mDt,VIt=DDt,$It=_$t,DIt=U$t,xIt=q$t,NIt=K$t,RIt=V$t,_It=bDt,EHn(),AIt=dIt,LIt=gIt,UIt=MIt,XIt=EIt,GIt=TIt,qIt=jIt,KIt=mIt,FIt=kIt,HIt=yIt,zIt=SIt,WIt=CIt,OIt=wIt}function EOn(n,t){var e,i,r,c,a;if(n.e<=t)return n.g;if(l3(n,n.g,t))return n.g;for(c=n.r,i=n.g,a=n.r,r=(c-i)/2+i;i+11&&(n.e.b+=n.a)):(n.e.a+=i.a,n.e.b=e.Math.max(n.e.b,i.b),n.d.c.length>1&&(n.e.a+=n.a))}function NOn(n){var t,e,i,r;switch(t=(r=n.i).b,i=r.j,e=r.g,r.a.g){case 0:e.a=(n.g.b.o.a-i.a)/2;break;case 1:e.a=t.d.n.a+t.d.a.a;break;case 2:e.a=t.d.n.a+t.d.a.a-i.a;break;case 3:e.b=t.d.n.b+t.d.a.b}}function $On(n,t,e){var i,r,c;for(r=new Fz(ix(Ggn(e).a.Kc(),new h));hDn(r);)v9(i=uG(N9(r),18))||!v9(i)&&i.c.i.c==i.d.i.c||(c=aRn(n,i,e,new Ck)).c.length>1&&mv(t.c,c)}function DOn(n,t,e,i,r){if(ii&&(n.a=i),n.br&&(n.b=r),n}function xOn(n){if(F$(n,143))return dKn(uG(n,143));if(F$(n,233))return Mpn(uG(n,233));if(F$(n,23))return WIn(uG(n,23));throw hv(new vM(Aet+vIn(new IM(Uhn(cT(dat,1),EZn,1,5,[n])))))}function ROn(n,t,e,i,r){var c,a,o;for(c=!0,a=0;a>>r|e[a+i+1]<>>r,++a}return c}function KOn(n,t,e,i){var r,c;if(t.k==(zIn(),wbt))for(c=new Fz(ix(qgn(t).a.Kc(),new h));hDn(c);)if((r=uG(N9(c),18)).c.i.k==wbt&&n.c.a[r.c.i.c.p]==i&&n.c.a[t.c.p]==e)return!0;return!1}function FOn(n,t){var e,i,r,c;return t&=63,e=n.h&l0n,t<22?(c=e>>>t,r=n.m>>t|e<<22-t,i=n.l>>t|n.m<<22-t):t<44?(c=0,r=e>>>t-22,i=n.m>>t-22|n.h<<44-t):(c=0,r=0,i=e>>>t-44),p$(i&f0n,r&f0n,c&l0n)}function _On(n,t,e,i){var r;this.b=i,this.e=n==(ean(),BEt),r=t[e],this.d=Jq(ZHt,[zZn,B2n],[183,28],16,[r.length,r.length],2),this.a=Jq(YHt,[zZn,W1n],[53,28],15,[r.length,r.length],2),this.c=new IPn(t,e)}function BOn(n){var t,e,i;for(n.k=new L2((KQn(),Uhn(cT(YRt,1),z4n,64,0,[FRt,yRt,kRt,KRt,_Rt])).length,n.j.c.length),i=new Ww(n.j);i.a=e)return YOn(n,t,i.p),!0;return!1}function XOn(n,t,e,i){var r,c,a,o,u,s;for(a=e.length,c=0,r=-1,s=Tin((s3(t,n.length+1),n.substr(t)),(cB(),out)),o=0;oc&&IV(s,Tin(e[o],out))&&(r=o,c=u);return r>=0&&(i[0]=t+c),r}function zOn(n){var t;return 64&n.Db?rOn(n):(t=new lx(Ftt),!n.a||JA(JA((t.a+=' "',t),n.a),'"'),JA(Nj(JA(Nj(JA(Nj(JA(Nj((t.a+=" (",t),n.i),","),n.j)," | "),n.g),","),n.f),")"),t.a)}function VOn(n,t,e){var i,r,c,a,o;for(o=VKn(n.e.Dh(),t),r=uG(n.g,124),i=0,a=0;ae?iLn(n,e,"start index"):t<0||t>e?iLn(t,e,"end index"):LBn("end index (%s) must not be less than start index (%s)",Uhn(cT(dat,1),EZn,1,5,[xwn(t),xwn(n)]))}function JOn(n,t){var e,i,r,c;for(i=0,r=n.length;i0&&nAn(n,c,e));t.p=0}function tAn(n){var t;this.c=new lS,this.f=n.e,this.e=n.d,this.i=n.g,this.d=n.c,this.b=n.b,this.k=n.j,this.a=n.a,n.i?this.j=n.i:this.j=new nB(t=uG(Mj(MNt),9),uG(MF(t,t.length),9),0),this.g=n.f}function eAn(n){var t,e,i,r;for(t=jQ(JA(new lx("Predicates."),"and"),40),e=!0,r=new Jw(n);r.b0?o[a-1]:Inn(pbt,e6n,10,0,0,1),r=o[a],s=a=0?n.ki(r):zLn(n,i)}else sdn(n,e,i)}function uAn(n){var t,e;if(e=null,t=!1,F$(n,211)&&(t=!0,e=uG(n,211).a),t||F$(n,263)&&(t=!0,e=""+uG(n,263).a),t||F$(n,493)&&(t=!0,e=""+uG(n,493).a),!t)throw hv(new pM(Cet));return e}function sAn(n,t,e){var i,r,c,a,o,u;for(u=VKn(n.e.Dh(),t),i=0,o=n.i,r=uG(n.g,124),a=0;a=n.d.b.c.length&&((t=new bQ(n.d)).p=i.p-1,kD(n.d.b,t),(e=new bQ(n.d)).p=i.p,kD(n.d.b,e)),a2(i,uG(zq(n.d.b,i.p),30))}function yAn(n,t,e){var i,r,c;if(!n.b[t.g]){for(n.b[t.g]=!0,!(i=e)&&(i=new L7),aq(i.b,t),c=n.a[t.g].Kc();c.Ob();)(r=uG(c.Pb(),65)).b!=t&&yAn(n,r.b,i),r.c!=t&&yAn(n,r.c,i),aq(i.a,r);return i}return null}function MAn(n){switch(n.g){case 0:case 1:case 2:return KQn(),yRt;case 3:case 4:case 5:return KQn(),KRt;case 6:case 7:case 8:return KQn(),_Rt;case 9:case 10:case 11:return KQn(),kRt;default:return KQn(),FRt}}function TAn(n,t){var e;return 0!=n.c.length&&(e=Imn((u3(0,n.c.length),uG(n.c[0],18)).c.i),n2(),e==(Yyn(),wjt)||e==bjt||o9(YJ(new fX(null,new h3(n,16)),new Kc),new up(t)))}function jAn(n,t){if(F$(t,207))return KN(n,uG(t,27));if(F$(t,193))return FN(n,uG(t,123));if(F$(t,452))return RN(n,uG(t,166));throw hv(new vM(Aet+vIn(new IM(Uhn(cT(dat,1),EZn,1,5,[t])))))}function EAn(n,t,e){var i,r;if(this.f=n,e7(e,r=(i=uG(cQ(n.b,t),260))?i.a:0),e>=(r/2|0))for(this.e=i?i.c:null,this.d=r;e++0;)Ein(this);this.b=t,this.a=null}function SAn(n,t){var e,i;t.a?WKn(n,t):(!!(e=uG(jS(n.b,t.b),60))&&e==n.a[t.b.f]&&!!e.a&&e.a!=t.b.a&&e.c.Fc(t.b),!!(i=uG(TS(n.b,t.b),60))&&n.a[i.f]==t.b&&!!i.a&&i.a!=t.b.a&&t.b.c.Fc(i),sD(n.b,t.b))}function PAn(n,t){var e,i;if(e=uG(AJ(n.b,t),127),uG(uG(Y9(n.r,t),21),87).dc())return e.n.b=0,void(e.n.c=0);e.n.b=n.C.b,e.n.c=n.C.c,n.A.Hc((Qmn(),JRt))&&vBn(n,t),i=Iyn(n,t),M_n(n,t)==(Vkn(),Zxt)&&(i+=2*n.w),e.a.a=i}function CAn(n,t){var e,i;if(e=uG(AJ(n.b,t),127),uG(uG(Y9(n.r,t),21),87).dc())return e.n.d=0,void(e.n.a=0);e.n.d=n.C.d,e.n.a=n.C.a,n.A.Hc((Qmn(),JRt))&&kBn(n,t),i=Cyn(n,t),M_n(n,t)==(Vkn(),Zxt)&&(i+=2*n.w),e.a.b=i}function IAn(n,t){var e,i,r,c;for(c=new Zm,i=new Ww(t);i.ai&&(s3(t-1,n.length),n.charCodeAt(t-1)<=32);)--t;return i>0||te.a&&(i.Hc((ZSn(),VNt))?r=(t.a-e.a)/2:i.Hc(QNt)&&(r=t.a-e.a)),t.b>e.b&&(i.Hc((ZSn(),YNt))?c=(t.b-e.b)/2:i.Hc(JNt)&&(c=t.b-e.b)),JCn(n,r,c)}function eLn(n,t,e,i,r,c,a,o,u,s,h,f,l){F$(n.Cb,90)&&yLn(y9(uG(n.Cb,90)),4),qon(n,e),n.f=a,Qdn(n,o),Ydn(n,u),Wdn(n,s),Jdn(n,h),mdn(n,f),Cgn(n,l),ddn(n,!0),Pcn(n,r),n.Zk(c),Kbn(n,t),null!=i&&(n.i=null,lon(n,i))}function iLn(n,t,e){if(n<0)return LBn(jZn,Uhn(cT(dat,1),EZn,1,5,[e,xwn(n)]));if(t<0)throw hv(new vM(SZn+t));return LBn("%s (%s) must not be greater than size (%s)",Uhn(cT(dat,1),EZn,1,5,[e,xwn(n),xwn(t)]))}function rLn(n,t,e,i,r,c){var a,o,u;if(i-e<7)Ygn(t,e,i,c);else if(rLn(t,n,o=e+r,u=o+((a=i+r)-o>>1),-r,c),rLn(t,n,u,a,-r,c),c.Ne(n[u-1],n[u])<=0)for(;e=0?n.bi(c,e):lRn(n,r,e)}else lpn(n,i,r,e)}function hLn(n){var t,e;if(n.f){for(;n.n>0;){if(F$(e=(t=uG(n.k.Xb(n.n-1),76)).Lk(),102)&&uG(e,19).Bb&Qtt&&(!n.e||e.pk()!=tFt||0!=e.Lj())&&null!=t.md())return!0;--n.n}return!1}return n.n>0}function fLn(n){var t,e,i,r;if(e=uG(n,54)._h())try{if(i=null,(t=jxn((MP(),l_t),DUn(jpn(e))))&&(r=t.ai())&&(i=r.Fl(bM(e.e))),i&&i!=n)return fLn(i)}catch(c){if(!F$(c=Ehn(c),63))throw hv(c)}return n}function lLn(n,t,e){var i,r;e.Ug("Remove overlaps",1),e.dh(t,l7n),i=uG(zDn(t,(SK(),zCt)),27),n.f=i,n.a=aMn(uG(zDn(t,(jOn(),zIt)),300)),rw(n,(tJ(r=pK(zDn(t,(XYn(),DDt)))),r)),xWn(n,t,GFn(i),e),e.dh(t,w7n)}function bLn(n){var t,e,i;if(oM(gK(zDn(n,(XYn(),C$t))))){for(i=new Zm,e=new Fz(ix(eRn(n).a.Kc(),new h));hDn(e);)BNn(t=uG(N9(e),74))&&oM(gK(zDn(t,I$t)))&&mv(i.c,t);return i}return hZ(),hZ(),zot}function wLn(n){if(!n)return By(),Vat;var t=n.valueOf?n.valueOf():n;if(t!==n){var i=Wat[typeof t];return i?i(t):Vbn(typeof t)}return n instanceof Array||n instanceof e.Array?new Eb(n):new Cb(n)}function dLn(n,t,i){var r,c,a;switch(a=n.o,(c=(r=uG(AJ(n.p,i),252)).i).b=gNn(r),c.a=dNn(r),c.b=e.Math.max(c.b,a.a),c.b>a.a&&!t&&(c.b=a.a),c.c=-(c.b-a.a)/2,i.g){case 1:c.d=-c.a;break;case 3:c.d=a.b}YGn(r),rqn(r)}function gLn(n,t,i){var r,c,a;switch(a=n.o,(c=(r=uG(AJ(n.p,i),252)).i).b=gNn(r),c.a=dNn(r),c.a=e.Math.max(c.a,a.b),c.a>a.b&&!t&&(c.a=a.b),c.d=-(c.a-a.b)/2,i.g){case 4:c.c=-c.b;break;case 2:c.c=a.a}YGn(r),rqn(r)}function pLn(n,t){var e,i,r,c,a;if(!t.dc())if(r=uG(t.Xb(0),131),1!=t.gc())for(e=1;e0)try{i=mUn(t,j1n,vZn)}catch(r){throw F$(r=Ehn(r),130)?hv(new Pen(r)):hv(r)}return!n.a&&(n.a=new qm(n)),i<(e=n.a).i&&i>=0?uG(zrn(e,i),58):null}function TLn(n,t){if(n<0)return LBn(jZn,Uhn(cT(dat,1),EZn,1,5,["index",xwn(n)]));if(t<0)throw hv(new vM(SZn+t));return LBn("%s (%s) must be less than size (%s)",Uhn(cT(dat,1),EZn,1,5,["index",xwn(n),xwn(t)]))}function jLn(n){var t,e,i,r,c;if(null==n)return IZn;for(c=new Ysn(TZn,"[","]"),i=0,r=(e=n).length;i=0?n.Lh(e,!0,!0):YNn(n,r,!0),160),uG(i,220).Zl(t)}function VLn(n){var t,i;return n>-0x800000000000&&n<0x800000000000?0==n?0:((t=n<0)&&(n=-n),i=t0(e.Math.floor(e.Math.log(n)/.6931471805599453)),(!t||n!=e.Math.pow(2,i))&&++i,i):dhn(Bsn(n))}function WLn(n){var t,e,i,r,c,a,o;for(c=new XL,e=new Ww(n);e.a2&&o.e.b+o.j.b<=2&&(r=o,i=a),c.a.zc(r,c),r.q=i);return c}function QLn(n,t,e){e.Ug("Eades radial",1),e.dh(t,w7n),n.d=uG(zDn(t,(SK(),zCt)),27),n.c=uM(pK(zDn(t,(jOn(),HIt)))),n.e=aMn(uG(zDn(t,zIt),300)),n.a=_pn(uG(zDn(t,WIt),434)),n.b=PSn(uG(zDn(t,KIt),354)),UEn(n),e.dh(t,w7n)}function JLn(n,t){if(t.Ug("Target Width Setter",1),!vnn(n,(S_n(),vAt)))throw hv(new jM("A target width has to be set if the TargetWidthWidthApproximator should be used."));Myn(n,(lBn(),POt),pK(zDn(n,vAt))),t.Vg()}function YLn(n,t){var e,i,r;return zsn(i=new gMn(n),t),kfn(i,(GYn(),Kpt),t),kfn(i,(jYn(),JMt),($Pn(),cRt)),kfn(i,byt,(nMn(),ONt)),Hb(i,(zIn(),lbt)),o2(e=new lOn,i),NLn(e,(KQn(),_Rt)),o2(r=new lOn,i),NLn(r,kRt),i}function ZLn(n){switch(n.g){case 0:return new zy((ean(),_Et));case 1:return new bl;case 2:return new wl;default:throw hv(new vM("No implementation is available for the crossing minimizer "+(null!=n.f?n.f:""+n.g)))}}function nNn(n,t){var e,i,r,c;for(n.c[t.p]=!0,kD(n.a,t),c=new Ww(t.j);c.a=(c=a.gc()))a.$b();else for(r=a.Kc(),i=0;i0?HM():c<0&&bNn(n,t,-c),!0)}function dNn(n){var t,e,i,r,c,a;if(a=0,0==n.b){for(t=0,r=0,c=(i=AMn(n,!0)).length;r0&&(a+=e,++t);t>1&&(a+=n.c*(t-1))}else a=fT(Mun(ZJ(JJ(BV(n.a),new jn),new En)));return a>0?a+n.n.d+n.n.a:0}function gNn(n){var t,e,i,r,c,a;if(a=0,0==n.b)a=fT(Mun(ZJ(JJ(BV(n.a),new Mn),new Tn)));else{for(t=0,r=0,c=(i=LMn(n,!0)).length;r0&&(a+=e,++t);t>1&&(a+=n.c*(t-1))}return a>0?a+n.n.b+n.n.c:0}function pNn(n){var t,e;if(2!=n.c.length)throw hv(new kM("Order only allowed for two paths."));u3(0,n.c.length),t=uG(n.c[0],18),u3(1,n.c.length),e=uG(n.c[1],18),t.d.i!=e.c.i&&(n.c.length=0,mv(n.c,e),mv(n.c,t))}function mNn(n,t,e){var i;for(vN(e,t.g,t.f),kN(e,t.i,t.j),i=0;i<(!t.a&&(t.a=new fV(bFt,t,10,11)),t.a).i;i++)mNn(n,uG(zrn((!t.a&&(t.a=new fV(bFt,t,10,11)),t.a),i),27),uG(zrn((!e.a&&(e.a=new fV(bFt,e,10,11)),e.a),i),27))}function vNn(n,t){var i,r,c,a;for(i=(a=uG(AJ(n.b,t),127)).a,c=uG(uG(Y9(n.r,t),21),87).Kc();c.Ob();)(r=uG(c.Pb(),117)).c&&(i.a=e.Math.max(i.a,rq(r.c)));if(i.a>0)switch(t.g){case 2:a.n.c=n.s;break;case 4:a.n.b=n.s}}function kNn(n,t){var e,i,r;return 0==(e=uG(oIn(t,(rGn(),$ft)),17).a-uG(oIn(n,$ft),17).a)?(i=YF(D$(uG(oIn(n,(mon(),zft)),8)),uG(oIn(n,Vft),8)),r=YF(D$(uG(oIn(t,zft),8)),uG(oIn(t,Vft),8)),ugn(i.a*i.b,r.a*r.b)):e}function yNn(n,t){var e,i,r;return 0==(e=uG(oIn(t,(QGn(),yCt)),17).a-uG(oIn(n,yCt),17).a)?(i=YF(D$(uG(oIn(n,(OQn(),vPt)),8)),uG(oIn(n,kPt),8)),r=YF(D$(uG(oIn(t,vPt),8)),uG(oIn(t,kPt),8)),ugn(i.a*i.b,r.a*r.b)):e}function MNn(n){var t,e;return(e=new WM).a+="e_",null!=(t=bhn(n))&&(e.a+=""+t),n.c&&n.d&&(JA((e.a+=" ",e),njn(n.c)),JA(QA((e.a+="[",e),n.c.i),"]"),JA((e.a+=Y4n,e),njn(n.d)),JA(QA((e.a+="[",e),n.d.i),"]")),e.a}function TNn(n){switch(n.g){case 0:return new Tl;case 1:return new jl;case 2:return new yl;case 3:return new kl;default:throw hv(new vM("No implementation is available for the layout phase "+(null!=n.f?n.f:""+n.g)))}}function jNn(n,t,i,r,c){var a;switch(a=0,c.g){case 1:a=e.Math.max(0,t.b+n.b-(i.b+r));break;case 3:a=e.Math.max(0,-n.b-r);break;case 2:a=e.Math.max(0,-n.a-r);break;case 4:a=e.Math.max(0,t.a+n.a-(i.a+r))}return a}function ENn(n,t,e){var i,r,c;if(e)for(c=((i=new Gz(e.a.length)).b-i.a)*i.c<0?(CP(),XHt):new xD(i);c.Ob();)r=v6(e,uG(c.Pb(),17).a),vet in r.a||ket in r.a?bHn(n,r,t):JJn(n,r,t),GD(uG(cQ(n.b,jvn(r)),74))}function SNn(n){var t,e;switch(n.b){case-1:return!0;case 0:return(e=n.t)>1||-1==e||(t=bEn(n))&&(PP(),t.lk()==srt)?(n.b=-1,!0):(n.b=1,!1);default:return!1}}function PNn(n,t){var e,i,r,c;if(EYn(n),0!=n.c||123!=n.a)throw hv(new CM(rZn((t$(),bit))));if(c=112==t,i=n.d,(e=aR(n.i,125,i))<0)throw hv(new CM(rZn((t$(),wit))));return r=r1(n.i,i,e),n.d=e+1,itn(r,c,!(512&~n.e))}function CNn(n){var t,e,i,r,c,a,o;if((i=n.a.c.length)>0)for(a=n.c.d,r=vD(YF(new MO((o=n.d.d).a,o.b),a),1/(i+1)),c=new MO(a.a,a.b),e=new Ww(n.a);e.a=0&&i=0?n.Lh(e,!0,!0):YNn(n,r,!0),160),uG(i,220).Wl(t);throw hv(new vM(Gtt+t.xe()+ztt))}function DNn(){var n;return IP(),pBt?uG(jxn((MP(),l_t),Drt),2038):(ML(Sat,new Eh),yWn(),n=uG(F$(U1((MP(),l_t),Drt),560)?U1(l_t,Drt):new dJ,560),pBt=!0,HYn(n),oZn(n),vJ((pP(),k_t),n,new Bs),r2(l_t,Drt,n),n)}function xNn(n,t){var e,i,r,c;n.j=-1,uN(n.e)?(e=n.i,c=0!=n.i,z9(n,t),i=new Ken(n.e,3,n.c,null,t,e,c),r=t.zl(n.e,n.c,null),(r=yPn(n,t,r))?(r.nj(i),r.oj()):Msn(n.e,i)):(z9(n,t),(r=t.zl(n.e,n.c,null))&&r.oj())}function RNn(n,t){var e,i,r;if(r=0,(i=t[0])>=n.length)return-1;for(s3(i,n.length),e=n.charCodeAt(i);e>=48&&e<=57&&(r=10*r+(e-48),!(++i>=n.length));)s3(i,n.length),e=n.charCodeAt(i);return i>t[0]?t[0]=i:r=-1,r}function KNn(n){var t,i,r,c,a;return i=c=uG(n.a,17).a,r=a=uG(n.b,17).a,t=e.Math.max(e.Math.abs(c),e.Math.abs(a)),c<=0&&c==a?(i=0,r=a-1):c==-t&&a!=t?(i=a,r=c,a>=0&&++i):(i=-a,r=c),new WO(xwn(i),xwn(r))}function FNn(n,t,e,i){var r,c,a,o,u,s;for(r=0;r=0&&s>=0&&u=n.i)throw hv(new dM(zet+t+Vet+n.i));if(e>=n.i)throw hv(new dM(Wet+e+Vet+n.i));return i=n.g[e],t!=e&&(t>16))>>16&16),e+=t=(i=(n>>=t)-256)>>16&8,e+=t=(i=(n<<=t)-j0n)>>16&4,(e+=t=(i=(n<<=t)-VZn)>>16&2)+2-(t=(i=(n<<=t)>>14)&~(i>>1)))}function qNn(n){var t,e,i,r;for(lZ(),aft=new Zm,cft=new Ym,rft=new Zm,!n.a&&(n.a=new fV(bFt,n,10,11)),JQn(t=n.a),r=new DD(t);r.e!=r.i.gc();)i=uG(Zkn(r),27),-1==Ten(aft,i,0)&&(e=new Zm,kD(rft,e),skn(i,e));return rft}function XNn(n,t,e){var i,r,c,a;n.a=e.b.d,F$(t,326)?(z8(c=COn(r=JFn(uG(t,74),!1,!1)),i=new Kd(n)),sqn(c,r),null!=t.of((XYn(),L$t))&&z8(uG(t.of(L$t),75),i)):((a=uG(t,422)).rh(a.nh()+n.a.a),a.sh(a.oh()+n.a.b))}function zNn(n,t){var e,i,r;for(r=new Zm,i=Fkn(t.a,0);i.b!=i.d.c;)(e=uG(I6(i),65)).c.g==n.g&&xA(oIn(e.b,(QGn(),ACt)))!==xA(oIn(e.c,ACt))&&!o9(new fX(null,new h3(r,16)),new kp(e))&&mv(r.c,e);return f$(r,new ja),r}function VNn(n,t,e){var i,r,c,a;return F$(t,153)&&F$(e,153)?(c=uG(t,153),a=uG(e,153),n.a[c.a][a.a]+n.a[a.a][c.a]):F$(t,250)&&F$(e,250)&&(i=uG(t,250),r=uG(e,250),i.a==r.a)?uG(oIn(r.a,(rGn(),$ft)),17).a:0}function WNn(n,t){var i,r,c,a,o,u,s,h;for(h=uM(pK(oIn(t,(jYn(),ITt)))),s=n[0].n.a+n[0].o.a+n[0].d.c+h,u=1;u=0?e:(o=NQ(YF(new MO(a.c+a.b/2,a.d+a.a/2),new MO(c.c+c.b/2,c.d+c.a/2))),-(oGn(c,a)-1)*o)}function JNn(n,t,e){var i;kS(new fX(null,(!e.a&&(e.a=new fV(oFt,e,6,6)),new h3(e.a,16))),new zO(n,t)),kS(new fX(null,(!e.n&&(e.n=new fV(lFt,e,1,7)),new h3(e.n,16))),new VO(n,t)),(i=uG(zDn(e,(XYn(),L$t)),75))&&fun(i,n,t)}function YNn(n,t,e){var i,r,c;if(c=iVn((gAn(),kBt),n.Dh(),t))return PP(),uG(c,69).xk()||(c=_3(Nen(kBt,c))),r=uG((i=n.Ih(c))>=0?n.Lh(i,!0,!0):YNn(n,c,!0),160),uG(r,220).Sl(t,e);throw hv(new vM(Gtt+t.xe()+ztt))}function ZNn(n,t,e,i){var r,c,a,o,u;if(r=n.d[t])if(c=r.g,u=r.i,null!=i){for(o=0;o=e&&(i=t,c=(u=(o.c+o.a)/2)-e,o.c<=u-e&&GX(n,i++,new OU(o.c,c)),(a=u+e)<=o.a&&(r=new OU(a,o.a),o3(i,n.c.length),pC(n.c,i,r)))}function o$n(n,t,e){var i,r,c,a;if(!t.dc()){for(i=new lS,a=t.Kc();a.Ob();)for(c=uG(a.Pb(),40),vJ(n.a,xwn(c.g),xwn(e)),r=new Tp(Fkn(new Mp(c).a.d,0));Jj(r.a);)s8(i,uG(I6(r.a),65).c,i.c.b,i.c);o$n(n,i,e+1)}}function u$n(n){var t;if(n.c||null!=n.g){if(null==n.g)return!0;if(0==n.i)return!1;t=uG(n.g[n.i-1],51)}else n.d=n.bj(n.f),ttn(n,n.d),t=n.d;return t==n.b&&null.Vm>=null.Um()?(Wxn(n),u$n(n)):t.Ob()}function s$n(n){if(this.a=n,n.c.i.k==(zIn(),lbt))this.c=n.c,this.d=uG(oIn(n.c.i,(GYn(),Fpt)),64);else{if(n.d.i.k!=lbt)throw hv(new vM("Edge "+n+" is not an external edge."));this.c=n.d,this.d=uG(oIn(n.d.i,(GYn(),Fpt)),64)}}function h$n(n,t){var e,i,r;r=n.b,n.b=t,4&n.Db&&!(1&n.Db)&&Msn(n,new lV(n,1,3,r,n.b)),t?t!=n&&(qon(n,t.zb),Icn(n,t.d),Uan(n,null==(e=null==(i=t.c)?t.zb:i)||m_(e,t.zb)?null:e)):(qon(n,null),Icn(n,0),Uan(n,null))}function f$n(n,t){var e;this.e=(ZW(),WW(n),ZW(),Emn(n)),this.c=(WW(t),Emn(t)),FD(this.e.Rd().dc()==this.c.Rd().dc()),this.d=Qgn(this.e),this.b=Qgn(this.c),e=Jq(dat,[zZn,EZn],[5,1],5,[this.e.Rd().gc(),this.c.Rd().gc()],2),this.a=e,wan(this)}function l$n(n){var t=(!Rat&&(Rat=mJn()),Rat);return'"'+n.replace(/[\x00-\x1f\xad\u0600-\u0603\u06dd\u070f\u17b4\u17b5\u200b-\u200f\u2028-\u202e\u2060-\u2064\u206a-\u206f\ufeff\ufff9-\ufffb"\\]/g,(function(n){return z1(n,t)}))+'"'}function b$n(n,t,i,r,c,a){var o,u,s,h,f;if(0!=c)for(xA(n)===xA(i)&&(n=n.slice(t,t+c),t=0),s=i,u=t,h=t+c;u=(a=null==(e=uG(Lsn(n.a,4),129))?0:e.length))throw hv(new w_(t,a));return r=e[t],1==a?i=null:(qGn(e,0,i=Inn(xFt,Uit,424,a-1,0,1),0,t),(c=a-t-1)>0&&qGn(e,t+1,i,t,c)),Pkn(n,i),GAn(n,t,r),r}function p$n(n){var t,e;if(n.f){for(;n.n0?Ipn(e):Gdn(Ipn(e)),Myn(t,eTt,r)}function M$n(n,t){t.Ug("Partition preprocessing",1),kS(uG(l8(JJ(sin(JJ(new fX(null,new h3(n.a,16)),new mi),new vi),new ki),ftn(new V,new z,new en,Uhn(cT(Rut,1),p1n,108,0,[(ybn(),Iut)]))),15).Oc(),new yi),t.Vg()}function T$n(n,t){var e,i,r,c,a;for(a=n.j,t.a!=t.b&&f$(a,new Yr),r=a.c.length/2|0,i=0;i0&&sHn(n,e,t),c):null!=i.a?(sHn(n,t,e),-1):null!=r.a?(sHn(n,e,t),1):0}function E$n(n,t){var e,i,r,c,a;for(r=t.b.b,n.a=Inn(yat,H3n,15,r,0,1),n.b=Inn(ZHt,B2n,28,r,16,1),a=Fkn(t.b,0);a.b!=a.d.c;)c=uG(I6(a),40),n.a[c.g]=new lS;for(i=Fkn(t.a,0);i.b!=i.d.c;)e=uG(I6(i),65),n.a[e.b.g].Fc(e),n.a[e.c.g].Fc(e)}function S$n(n,t){var e,i,r,c;n.Pj()?(e=n.Ej(),c=n.Qj(),++n.j,n.qj(e,n.Zi(e,t)),i=n.Ij(3,null,t,e,c),n.Mj()&&(r=n.Nj(t,null))?(r.nj(i),r.oj()):n.Jj(i)):(vQ(n,t),n.Mj()&&(r=n.Nj(t,null))&&r.oj())}function P$n(n,t,e){var i,r,c;n.Pj()?(c=n.Qj(),edn(n,t,e),i=n.Ij(3,null,e,t,c),n.Mj()?(r=n.Nj(e,null),n.Tj()&&(r=n.Uj(e,r)),r?(r.nj(i),r.oj()):n.Jj(i)):n.Jj(i)):(edn(n,t,e),n.Mj()&&(r=n.Nj(e,null))&&r.oj())}function C$n(n,t){var e,i,r,c,a;for(a=VKn(n.e.Dh(),t),r=new ls,e=uG(n.g,124),c=n.i;--c>=0;)i=e[c],a.am(i.Lk())&&ttn(r,i);!PJn(n,r)&&uN(n.e)&&Yv(n,t.Jk()?VZ(n,6,t,(hZ(),zot),null,-1,!1):VZ(n,t.tk()?2:1,t,null,null,-1,!1))}function I$n(n,t){var e,i,r,c;return n.a==(RIn(),Vgt)||(r=t.a.c,e=t.a.c+t.a.b,!(t.j&&(c=(i=t.A).c.c.a-i.o.a/2,r-(i.n.a+i.o.a)>c)||t.q&&(c=(i=t.C).c.c.a-i.o.a/2,i.n.a-e>c)))}function O$n(n){var t,e,i,r,c,a;for(e2(),e=new u8,i=new Ww(n.e.b);i.a1?n.e*=uM(n.a):n.f/=uM(n.a),_bn(n),Vvn(n),EBn(n),kfn(n.b,(ryn(),Qht),n.g)}function x$n(n,t,e){var i,r,c,a,o;for(i=0,o=e,t||(i=e*(n.c.length-1),o*=-1),c=new Ww(n);c.a=0?n.Ah(null):n.Ph().Th(n,-1-t,null,null),n.Bh(uG(r,54),e),i&&i.oj(),n.vh()&&n.wh()&&e>-1&&Msn(n,new lV(n,9,e,c,r)),r):c}function Y$n(n,t){var e,i,r,c,a;for(c=n.b.Ce(t),i=null==(e=n.a.get(c))?Inn(dat,EZn,1,0,5,1):e,a=0;a>5)>=n.d)return n.e<0;if(e=n.a[r],t=1<<(31&t),n.e<0){if(r<(i=_un(n)))return!1;e=i==r?-e:~e}return!!(e&t)}function oDn(n,t,e,i){var r;uG(e.b,68),uG(e.b,68),uG(i.b,68),uG(i.b,68),RG(r=YF(D$(uG(e.b,68).c),uG(i.b,68).c),LLn(uG(e.b,68),uG(i.b,68),r)),uG(i.b,68),uG(i.b,68),uG(i.b,68).c.a,r.a,uG(i.b,68).c.b,r.b,uG(i.b,68),Prn(i.a,new $U(n,t,i))}function uDn(n,t){var e,i,r,c,a,o,u;if(c=t.e)for(e=J$n(c),i=uG(n.g,689),a=0;a>16)),15).dd(c))0&&((!hN(n.a.c)||!t.n.d)&&(!fN(n.a.c)||!t.n.b)&&(t.g.d+=e.Math.max(0,r/2-.5)),(!hN(n.a.c)||!t.n.a)&&(!fN(n.a.c)||!t.n.c)&&(t.g.a-=r-1))}function bDn(n){var t,i,r,c,a;if(a=zUn(n,c=new Zm),t=uG(oIn(n,(GYn(),lmt)),10))for(r=new Ww(t.j);r.a>t,c=n.m>>t|e<<22-t,r=n.l>>t|n.m<<22-t):t<44?(a=i?l0n:0,c=e>>t-22,r=n.m>>t-22|e<<44-t):(a=i?l0n:0,c=i?f0n:0,r=e>>t-44),p$(r&f0n,c&f0n,a&l0n)}function pDn(n){var t,i,r,c,a,o;for(this.c=new Zm,this.d=n,r=M0n,c=M0n,t=T0n,i=T0n,o=Fkn(n,0);o.b!=o.d.c;)a=uG(I6(o),8),r=e.Math.min(r,a.a),c=e.Math.min(c,a.b),t=e.Math.max(t,a.a),i=e.Math.max(i,a.b);this.a=new gY(r,c,t-r,i-c)}function mDn(n,t){var e,i,r,c;for(i=new Ww(n.b);i.a0&&F$(t,44)&&(n.a._j(),c=null==(u=(s=uG(t,44)).ld())?0:Hon(u),a=iF(n.a,c),e=n.a.d[a]))for(i=uG(e.g,379),h=e.i,o=0;o=2)for(t=pK((i=c.Kc()).Pb());i.Ob();)a=t,t=pK(i.Pb()),r=e.Math.min(r,(tJ(t),t-(tJ(a),a)));return r}function xDn(n,t){var e,i,r;for(r=new Zm,i=Fkn(t.a,0);i.b!=i.d.c;)(e=uG(I6(i),65)).b.g==n.g&&!m_(e.b.c,H9n)&&xA(oIn(e.b,(QGn(),ACt)))!==xA(oIn(e.c,ACt))&&!o9(new fX(null,new h3(r,16)),new yp(e))&&mv(r.c,e);return f$(r,new Ca),r}function RDn(n,t){var e,i,r;if(xA(t)===xA(WW(n)))return!0;if(!F$(t,15))return!1;if(i=uG(t,15),(r=n.gc())!=i.gc())return!1;if(F$(i,59)){for(e=0;e0&&(r=e),a=new Ww(n.f.e);a.a0?(t-=1,e-=1):i>=0&&r<0?(t+=1,e+=1):i>0&&r>=0?(t-=1,e+=1):(t+=1,e-=1),new WO(xwn(t),xwn(e))}function exn(n,t){return n.ct.c?1:n.bt.b?1:n.a!=t.a?Hon(n.a)-Hon(t.a):n.d==(Z6(),YEt)&&t.d==JEt?-1:n.d==JEt&&t.d==YEt?1:0}function ixn(n,t){var e,i,r,c,a;return a=(c=t.a).c.i==t.b?c.d:c.c,i=c.c.i==t.b?c.c:c.d,(r=dmn(n.a,a,i))>0&&r0):r<0&&-r0)}function rxn(n,t,e,i){var r,c,a,o,u,s;for(r=(t-n.d)/n.c.c.length,c=0,n.a+=e,n.d=t,s=new Ww(n.c);s.a>24;return a}function axn(n){if(n.ze()){var t=n.c;return t.Ae()?n.o="["+t.n:t.ze()?n.o="["+t.xe():n.o="[L"+t.xe()+";",n.b=t.we()+"[]",void(n.k=t.ye()+"[]")}var e=n.j,i=n.d;i=i.split("/"),n.o=fvn(".",[e,fvn("$",i)]),n.b=fvn(".",[e,fvn(".",i)]),n.k=i[i.length-1]}function oxn(n,t){var e,i,r,c,a;for(a=null,c=new Ww(n.e.a);c.a=0;t-=2)for(e=0;e<=t;e+=2)(n.b[e]>n.b[e+2]||n.b[e]===n.b[e+2]&&n.b[e+1]>n.b[e+3])&&(i=n.b[e+2],n.b[e+2]=n.b[e],n.b[e]=i,i=n.b[e+3],n.b[e+3]=n.b[e+1],n.b[e+1]=i);n.c=!0}}function mxn(n,t){var e,i,r,c,a,o,u,s,h;for(s=-1,h=0,o=0,u=(a=n).length;o0&&++h;++s}return h}function vxn(n){var t;return(t=new lx(Ij(n.Rm))).a+="@",JA(t,(Hon(n)>>>0).toString(16)),n.Vh()?(t.a+=" (eProxyURI: ",QA(t,n._h()),n.Kh()&&(t.a+=" eClass: ",QA(t,n.Kh())),t.a+=")"):n.Kh()&&(t.a+=" (eClass: ",QA(t,n.Kh()),t.a+=")"),t.a}function kxn(n){var t,e,i;if(n.e)throw hv(new kM((vK(Qut),v2n+Qut.k+k2n)));for(n.d==(xdn(),ZDt)&&GWn(n,JDt),e=new Ww(n.a.a);e.a>24}return e}function Sxn(n,t,e){var i,r,c;if(!(r=uG(AJ(n.i,t),314)))if(r=new Yin(n.d,t,e),UV(n.i,t,r),vvn(t))iD(n.a,t.c,t.b,r);else switch(c=MAn(t),i=uG(AJ(n.p,c),252),c.g){case 1:case 3:r.j=!0,nM(i,t.b,r);break;case 4:case 2:r.k=!0,nM(i,t.c,r)}return r}function Pxn(n,t){var e,i,r,c,a,o,u,s,h;for(u=iR(n.c-n.b&n.a.length-1),s=null,h=null,c=new XJ(n);c.a!=c.b;)r=uG(rwn(c),10),e=(o=uG(oIn(r,(GYn(),Zpt)),12))?o.i:null,i=(a=uG(oIn(r,nmt),12))?a.i:null,s==e&&h==i||(F$n(u,t),s=e,h=i),mv(u.c,r);F$n(u,t)}function Cxn(n,t,e,i){var r,c,a,o,u,s;if(o=new ls,u=VKn(n.e.Dh(),t),r=uG(n.g,124),PP(),uG(t,69).xk())for(a=0;a=0)return r;for(c=1,a=new Ww(t.j);a.a=0)return r;for(c=1,a=new Ww(t.j);a.a0&&t.Ne((u3(r-1,n.c.length),uG(n.c[r-1],10)),c)>0;)Y8(n,r,(u3(r-1,n.c.length),uG(n.c[r-1],10))),--r;u3(r,n.c.length),n.c[r]=c}e.a=new Ym,e.b=new Ym}function Lxn(n,t,e){var i,r,c,a,o,u,s;for(s=new nB(i=uG(t.e&&t.e(),9),uG(MF(i,i.length),9),0),a=0,o=(c=WGn(e,"[\\[\\]\\s,]+")).length;a=0?(t||(t=new VM,i>0&&VA(t,(Knn(0,i,n.length),n.substr(0,i)))),t.a+="\\",TQ(t,e&D1n)):t&&TQ(t,e&D1n);return t?t.a:n}function $xn(n){var t,i,r;for(i=new Ww(n.a.a.b);i.a0&&((!hN(n.a.c)||!t.n.d)&&(!fN(n.a.c)||!t.n.b)&&(t.g.d-=e.Math.max(0,r/2-.5)),(!hN(n.a.c)||!t.n.a)&&(!fN(n.a.c)||!t.n.c)&&(t.g.a+=e.Math.max(0,r-1)))}function Dxn(n,t,e){var i;if(2==(n.c-n.b&n.a.length-1))t==(KQn(),yRt)||t==kRt?(prn(uG(Rfn(n),15),(Ajn(),$xt)),prn(uG(Rfn(n),15),Dxt)):(prn(uG(Rfn(n),15),(Ajn(),Dxt)),prn(uG(Rfn(n),15),$xt));else for(i=new XJ(n);i.a!=i.b;)prn(uG(rwn(i),15),e)}function xxn(n,t){var e,i,r,c,a,o;for(a=new N4(i=rG(new Pm(n)),i.c.length),o=new N4(r=rG(new Pm(t)),r.c.length),c=null;a.b>0&&o.b>0&&(MK(a.b>0),e=uG(a.a.Xb(a.c=--a.b),27),MK(o.b>0),e==uG(o.a.Xb(o.c=--o.b),27));)c=e;return c}function Rxn(n,t,e){var i,r,c,a;Y3(n,t)>Y3(n,e)?(i=Dgn(e,(KQn(),kRt)),n.d=i.dc()?0:dq(uG(i.Xb(0),12)),a=Dgn(t,_Rt),n.b=a.dc()?0:dq(uG(a.Xb(0),12))):(r=Dgn(e,(KQn(),_Rt)),n.d=r.dc()?0:dq(uG(r.Xb(0),12)),c=Dgn(t,kRt),n.b=c.dc()?0:dq(uG(c.Xb(0),12)))}function Kxn(n,t){var e,i,r,c;for(e=n.o.a,c=uG(uG(Y9(n.r,t),21),87).Kc();c.Ob();)(r=uG(c.Pb(),117)).e.a=e*uM(pK(r.b.of(bht))),r.e.b=(i=r.b).pf((XYn(),uDt))?i.ag()==(KQn(),yRt)?-i.Mf().b-uM(pK(i.of(uDt))):uM(pK(i.of(uDt))):i.ag()==(KQn(),yRt)?-i.Mf().b:0}function Fxn(n,t){var e,i,r,c;for(t.Ug("Self-Loop pre-processing",1),i=new Ww(n.a);i.an.c));a++)r.a>=n.s&&(c<0&&(c=a),o=a);return u=(n.s+n.c)/2,c>=0&&(u=wP((u3(i=fHn(n,t,c,o),t.c.length),uG(t.c[i],339))),a$n(t,i,e)),u}function Hxn(n,t,e){var i,r,c,a,o;for(Yan(r=new vs,(tJ(t),t)),!r.b&&(r.b=new XR((YYn(),H_t),wBt,r)),o=r.b,a=1;a0&&tVn(this,r)}function Gxn(n,t,e,i,r,c){var a,o,u;if(!r[t.a]){for(r[t.a]=!0,!(a=i)&&(a=new d7),kD(a.e,t),u=c[t.a].Kc();u.Ob();)(o=uG(u.Pb(),290)).d!=e&&o.c!=e&&(o.c!=t&&Gxn(n,o.c,t,a,r,c),o.d!=t&&Gxn(n,o.d,t,a,r,c),kD(a.c,o),Ohn(a.d,o.b));return a}return null}function qxn(n){var t,e,i;for(t=0,e=new Ww(n.e);e.a=2}function Xxn(n,t,e,i,r){var c,a,o,u,s;for(c=n.c.d.j,a=uG(hyn(e,0),8),s=1;s1||qsn(X1(WX(Bxt,Uhn(cT(eRt,1),p1n,95,0,[_xt,Uxt])),n))>1||qsn(X1(WX(Vxt,Uhn(cT(eRt,1),p1n,95,0,[zxt,Xxt])),n))>1)}function Vxn(n,t,e){var i,r,c;for(c=new Ww(n.t);c.a0&&(i.b.n-=i.c,i.b.n<=0&&i.b.u>0&&aq(t,i.b));for(r=new Ww(n.i);r.a0&&(i.a.u-=i.c,i.a.u<=0&&i.a.n>0&&aq(e,i.a))}function Wxn(n){var t,e,i;if(null==n.g&&(n.d=n.bj(n.f),ttn(n,n.d),n.c))return n.f;if(i=(t=uG(n.g[n.i-1],51)).Pb(),n.e=t,(e=n.bj(i)).Ob())n.d=e,ttn(n,e);else for(n.d=null;!t.Ob()&&(uQ(n.g,--n.i,null),0!=n.i);)t=uG(n.g[n.i-1],51);return i}function Qxn(n,t){var e,i,r,c,a,o;if(r=(i=t).Lk(),EFn(n.e,r)){if(r.Si()&&H5(n,r,i.md()))return!1}else for(o=VKn(n.e.Dh(),r),e=uG(n.g,124),c=0;c1||e>1)return 2;return t+e==1?2:0}function uRn(n,t){var i,r,c,a;return c=n.a*X0n+1502*n.b,a=n.b*X0n+11,c+=i=e.Math.floor(a*z0n),a-=i*V0n,c%=V0n,n.a=c,n.b=a,t<=24?e.Math.floor(n.a*but[t]):((r=n.a*(1<=2147483648&&(r-=4294967296),r)}function sRn(n,t,e){var i,r,c,a,o,u,s;for(c=new Zm,Uqn(n,s=new lS,a=new lS,t),RVn(n,s,a,t,e),u=new Ww(n);u.ai.b.g&&mv(c.c,i);return c}function hRn(n,t,e){var i,r,c,a,o;for(a=n.c,c=(e.q?e.q:(hZ(),hZ(),Vot)).vc().Kc();c.Ob();)r=uG(c.Pb(),44),!Qj(JJ(new fX(null,new h3(a,16)),new hd(new kO(t,r)))).Bd((vS(),Kut))&&(F$(o=r.md(),4)&&null!=(i=Nvn(o))&&(o=i),t.qf(uG(r.ld(),149),o))}function fRn(n,t,e){var i;if(_J(n.b),JV(n.b,(Rdn(),HAt),(eP(),GLt)),JV(n.b,UAt,t.g),JV(n.b,GAt,t.a),n.a=Qzn(n.b,t),e.Ug("Compaction by shrinking a tree",n.a.c.length),t.i.c.length>1)for(i=new Ww(n.a);i.a=0?n.Lh(i,!0,!0):YNn(n,c,!0),160),uG(r,220).Xl(t,e)}function bRn(n,t){var e,i,r,c;if(t){for(c=!(r=F$(n.Cb,90)||F$(n.Cb,102))&&F$(n.Cb,331),e=new DD((!t.a&&(t.a=new AX(t,g_t,t)),t.a));e.e!=e.i.gc();)if(i=MGn(uG(Zkn(e),89)),r?F$(i,90):c?F$(i,156):i)return i;return r?(YYn(),x_t):(YYn(),N_t)}return null}function wRn(n,t){var e,i,r;for(t.Ug("Resize child graph to fit parent.",1),i=new Ww(n.b);i.a=2*t&&kD(e,new OU(a[i-1]+t,a[i]-t));return e}function pRn(n,t,e){var i,r,c,a,o;if(e)for(c=((i=new Gz(e.a.length)).b-i.a)*i.c<0?(CP(),XHt):new xD(i);c.Ob();)(r=v6(e,uG(c.Pb(),17).a))&&(Gan(a=b5(n,(gj(),o=new Hk,!!t&&LRn(o,t),o),r),k6(r,Iet)),fCn(r,a),kLn(r,a),qfn(n,r,a))}function mRn(n){var t,e,i,r;if(!n.j){if(r=new Ss,null==(t=V_t).a.zc(n,t)){for(i=new DD(n1(n));i.e!=i.i.gc();)CW(r,mRn(e=uG(Zkn(i),29))),ttn(r,e);t.a.Bc(n)}lbn(r),n.j=new vL((uG(zrn(gZ((tQ(),M_t).o),11),19),r.i),r.g),y9(n).b&=-33}return n.j}function vRn(n){var t,e,i,r;if(null==n)return null;if(i=yXn(n,!0),r=yct.length,m_(i.substr(i.length-r,r),yct))if(4==(e=i.length)){if(s3(0,i.length),43==(t=i.charCodeAt(0)))return fHt;if(45==t)return hHt}else if(3==e)return fHt;return new tk(i)}function kRn(n){var t,e,i;return(e=n.l)&e-1||(i=n.m)&i-1||(t=n.h)&t-1||0==t&&0==i&&0==e?-1:0==t&&0==i&&0!=e?pan(e):0==t&&0!=i&&0==e?pan(i)+22:0!=t&&0==i&&0==e?pan(t)+44:-1}function yRn(n,t){var e,i,r,c,a;for(r=t.a&n.f,c=null,i=n.b[r];;i=i.b){if(i==t){c?c.b=t.b:n.b[r]=t.b;break}c=i}for(a=t.f&n.f,c=null,e=n.c[a];;e=e.d){if(e==t){c?c.d=t.d:n.c[a]=t.d;break}c=e}t.e?t.e.c=t.c:n.a=t.c,t.c?t.c.e=t.e:n.e=t.e,--n.i,++n.g}function MRn(n,t){var e;t.d?t.d.b=t.b:n.a=t.b,t.b?t.b.d=t.d:n.e=t.d,t.e||t.c?(--(e=uG(nJ(uG(cQ(n.b,t.a),260)),260)).a,t.e?t.e.c=t.c:e.b=uG(nJ(t.c),511),t.c?t.c.e=t.e:e.c=uG(nJ(t.e),511)):((e=uG(nJ(uG(u7(n.b,t.a),260)),260)).a=0,++n.c),--n.d}function TRn(n){var t,i,r,c,a,o,u,s,h,f;for(i=n.o,t=n.p,o=vZn,c=j1n,u=vZn,a=j1n,h=0;h0),c.a.Xb(c.c=--c.b),pF(c,r),MK(c.b3&&Fen(n,0,t-3))}function CRn(n){var t,e,i,r;return xA(oIn(n,(jYn(),rMt)))===xA((Own(),Ixt))?!n.e&&xA(oIn(n,Oyt))!==xA((ihn(),hpt)):(i=uG(oIn(n,Ayt),299),r=oM(gK(oIn(n,Ryt)))||xA(oIn(n,Kyt))===xA((jan(),Ydt)),t=uG(oIn(n,Iyt),17).a,e=n.a.c.length,!r&&i!=(ihn(),hpt)&&(0==t||t>e))}function IRn(n){var t,e;for(e=0;e0);e++);if(e>0&&e0);t++);return t>0&&e>16!=6&&t){if(eEn(n,t))throw hv(new vM(net+A$n(n)));i=null,n.Cb&&(i=(e=n.Db>>16)>=0?zjn(n,i):n.Cb.Th(n,-1-e,null,i)),t&&(i=kyn(t,n,6,i)),(i=ZK(n,t,i))&&i.oj()}else 4&n.Db&&!(1&n.Db)&&Msn(n,new lV(n,1,6,t,t))}function ARn(n,t){var e,i;if(t!=n.Cb||n.Db>>16!=3&&t){if(eEn(n,t))throw hv(new vM(net+SXn(n)));i=null,n.Cb&&(i=(e=n.Db>>16)>=0?sEn(n,i):n.Cb.Th(n,-1-e,null,i)),t&&(i=kyn(t,n,12,i)),(i=nF(n,t,i))&&i.oj()}else 4&n.Db&&!(1&n.Db)&&Msn(n,new lV(n,1,3,t,t))}function LRn(n,t){var e,i;if(t!=n.Cb||n.Db>>16!=9&&t){if(eEn(n,t))throw hv(new vM(net+VBn(n)));i=null,n.Cb&&(i=(e=n.Db>>16)>=0?Wjn(n,i):n.Cb.Th(n,-1-e,null,i)),t&&(i=kyn(t,n,9,i)),(i=tF(n,t,i))&&i.oj()}else 4&n.Db&&!(1&n.Db)&&Msn(n,new lV(n,1,9,t,t))}function NRn(n){var t,e,i,r,c;if(i=bEn(n),null==(c=n.j)&&i)return n.Jk()?null:i.ik();if(F$(i,156)){if((e=i.jk())&&(r=e.wi())!=n.i){if((t=uG(i,156)).nk())try{n.g=r.ti(t,c)}catch(a){if(!F$(a=Ehn(a),82))throw hv(a);n.g=null}n.i=r}return n.g}return null}function $Rn(n){var t;return kD(t=new Zm,new ZP(new MO(n.c,n.d),new MO(n.c+n.b,n.d))),kD(t,new ZP(new MO(n.c,n.d),new MO(n.c,n.d+n.a))),kD(t,new ZP(new MO(n.c+n.b,n.d+n.a),new MO(n.c+n.b,n.d))),kD(t,new ZP(new MO(n.c+n.b,n.d+n.a),new MO(n.c,n.d+n.a))),t}function DRn(n){var t,e;if(null==n)return IZn;try{return cpn(n)}catch(i){if(F$(i=Ehn(i),103))return t=i,e=Ij(Tbn(n))+"@"+(bS(),(Avn(n)>>>0).toString(16)),wkn(ghn(),(pS(),"Exception during lenientFormat for "+e),t),"<"+e+" threw "+Ij(t.Rm)+">";throw hv(i)}}function xRn(n,t,e){var i,r;for(r=t.a.ec().Kc();r.Ob();)i=uG(r.Pb(),74),!uG(cQ(n.b,i),272)&&(R0(bIn(i))==R0(gIn(i))?QKn(n,i,e):bIn(i)==R0(gIn(i))?null==cQ(n.c,i)&&null!=cQ(n.b,gIn(i))&&bWn(n,i,e,!1):null==cQ(n.d,i)&&null!=cQ(n.b,bIn(i))&&bWn(n,i,e,!0))}function RRn(n,t){var e,i,r,c,a,o,u;for(r=n.Kc();r.Ob();)for(i=uG(r.Pb(),10),o2(o=new lOn,i),NLn(o,(KQn(),kRt)),kfn(o,(GYn(),fmt),(qx(),!0)),a=t.Kc();a.Ob();)c=uG(a.Pb(),10),o2(u=new lOn,c),NLn(u,_Rt),kfn(u,fmt,!0),kfn(e=new UZ,fmt,!0),c2(e,o),u2(e,u)}function KRn(n,t,e,i){var r,c,a,o;r=evn(n,t,e),c=evn(n,e,t),a=uG(cQ(n.c,t),118),o=uG(cQ(n.c,e),118),r1)for(t=jx((e=new sk,++n.b,e),n.d),o=Fkn(c,0);o.b!=o.d.c;)a=uG(I6(o),125),RKn(xS(DS(RS($S(new uk,1),0),t),a))}function URn(n,t,e){var i,r,c,a;for(e.Ug("Breaking Point Removing",1),n.a=uG(oIn(t,(jYn(),Vyt)),223),r=new Ww(t.b);r.a>16!=11&&t){if(eEn(n,t))throw hv(new vM(net+zBn(n)));i=null,n.Cb&&(i=(e=n.Db>>16)>=0?hEn(n,i):n.Cb.Th(n,-1-e,null,i)),t&&(i=kyn(t,n,10,i)),(i=n_(n,t,i))&&i.oj()}else 4&n.Db&&!(1&n.Db)&&Msn(n,new lV(n,1,11,t,t))}function qRn(n){var t,e,i,r;for(i=new bsn(new Nw(n.b).a);i.b;)r=uG((e=von(i)).ld(),12),kfn(t=uG(e.md(),10),(GYn(),rmt),r),kfn(r,lmt,t),kfn(r,qpt,(qx(),!0)),NLn(r,uG(oIn(t,Fpt),64)),oIn(t,Fpt),kfn(r.i,(jYn(),JMt),($Pn(),oRt)),uG(oIn(HQ(r.i),Hpt),21).Fc((r_n(),rpt))}function XRn(n,t,e){var i,r,c;if(i=0,r=0,n.c)for(c=new Ww(n.d.i.j);c.ac.a)return-1;if(r.a(u=null==n.d?0:n.d.length)){for(h=n.d,n.d=Inn(IFt,qit,66,2*u+4,0,1),c=0;c=0x8000000000000000?(tin(),Jat):(i=!1,n<0&&(i=!0,n=-n),e=0,n>=d0n&&(n-=(e=t0(n/d0n))*d0n),t=0,n>=w0n&&(n-=(t=t0(n/w0n))*w0n),r=p$(t0(n),t,e),i&&Yfn(r),r)}function uKn(n){var t,e,i,r,c;if(c=new Zm,Prn(n.b,new Ed(c)),n.b.c.length=0,0!=c.c.length){for(u3(0,c.c.length),t=uG(c.c[0],82),e=1,i=c.c.length;e=-t&&r==t?new WO(xwn(i-1),xwn(r)):new WO(xwn(i),xwn(r-1))}function bKn(){return zYn(),Uhn(cT(Vwt,1),p1n,81,0,[qbt,Hbt,Xbt,uwt,Pwt,lwt,Nwt,pwt,Ewt,iwt,ywt,gwt,Swt,Zbt,Dwt,xbt,kwt,Iwt,swt,Cwt,Rwt,Twt,Rbt,jwt,Kwt,Awt,xwt,hwt,Qbt,fwt,owt,$wt,_bt,Vbt,wwt,Fbt,dwt,cwt,nwt,mwt,ewt,Ubt,Bbt,awt,twt,vwt,Lwt,Kbt,Mwt,rwt,bwt,Jbt,Wbt,Owt,zbt,Ybt,Gbt])}function wKn(n,t,e){n.d=0,n.b=0,t.k==(zIn(),gbt)&&e.k==gbt&&uG(oIn(t,(GYn(),rmt)),10)==uG(oIn(e,rmt),10)&&(jen(t).j==(KQn(),yRt)?Rxn(n,t,e):Rxn(n,e,t)),t.k==gbt&&e.k==wbt?jen(t).j==(KQn(),yRt)?n.d=1:n.b=1:e.k==gbt&&t.k==wbt&&(jen(e).j==(KQn(),yRt)?n.b=1:n.d=1),GMn(n,t,e)}function dKn(n){var t,e,i,r,c;return c=gCn(n),null!=n.a&&ZG(c,"category",n.a),!pE(new Lw(n.d))&&(nrn(c,"knownOptions",i=new Ib),t=new Mm(i),z8(new Lw(n.d),t)),!pE(n.g)&&(nrn(c,"supportedFeatures",r=new Ib),e=new Tm(r),z8(n.g,e)),c}function gKn(n){var t,e,i,r,c,a,o,u;for(t=336,e=0,r=new UF(n.length),o=0,u=(a=n).length;o>16!=7&&t){if(eEn(n,t))throw hv(new vM(net+zOn(n)));i=null,n.Cb&&(i=(e=n.Db>>16)>=0?Vjn(n,i):n.Cb.Th(n,-1-e,null,i)),t&&(i=uG(t,54).Rh(n,1,iFt,i)),(i=dz(n,t,i))&&i.oj()}else 4&n.Db&&!(1&n.Db)&&Msn(n,new lV(n,1,7,t,t))}function kKn(n,t){var e,i;if(t!=n.Cb||n.Db>>16!=3&&t){if(eEn(n,t))throw hv(new vM(net+fdn(n)));i=null,n.Cb&&(i=(e=n.Db>>16)>=0?Yjn(n,i):n.Cb.Th(n,-1-e,null,i)),t&&(i=uG(t,54).Rh(n,0,uFt,i)),(i=gz(n,t,i))&&i.oj()}else 4&n.Db&&!(1&n.Db)&&Msn(n,new lV(n,1,3,t,t))}function yKn(n,t){var e,i,r,c,a,o,u,s,h;return b_n(),t.d>n.d&&(o=n,n=t,t=o),t.d<63?KFn(n,t):(s=$9(n,a=(-2&n.d)<<4),h=$9(t,a),i=mXn(n,D9(s,a)),r=mXn(t,D9(h,a)),u=yKn(s,h),e=yKn(i,r),c=D9(c=Zzn(Zzn(c=yKn(mXn(s,i),mXn(r,h)),u),e),a),Zzn(Zzn(u=D9(u,a<<1),c),e))}function MKn(){MKn=E,rjt=new fI(v9n,0),tjt=new fI("LONGEST_PATH",1),ejt=new fI("LONGEST_PATH_SOURCE",2),YTt=new fI("COFFMAN_GRAHAM",3),njt=new fI(D6n,4),cjt=new fI("STRETCH_WIDTH",5),ijt=new fI("MIN_WIDTH",6),JTt=new fI("BF_MODEL_ORDER",7),ZTt=new fI("DF_MODEL_ORDER",8)}function TKn(n,t,e){var i,r,c,a,o;for(a=Vwn(n,e),o=Inn(pbt,e6n,10,t.length,0,1),i=0,c=a.Kc();c.Ob();)oM(gK(oIn(r=uG(c.Pb(),12),(GYn(),qpt))))&&(o[i++]=uG(oIn(r,lmt),10));if(i=0;r+=e?1:-1)c|=t.c.lg(o,r,e,i&&!oM(gK(oIn(t.j,(GYn(),Bpt))))&&!oM(gK(oIn(t.j,(GYn(),mmt))))),c|=t.q.ug(o,r,e),c|=wBn(n,o[r],e,i);return FV(n.c,t),c}function CKn(n,t,e){var i,r,c,a,o,u,s,h;for(s=0,h=(u=s6(n.j)).length;s1&&(n.a=!0),YX(uG(e.b,68),JF(D$(uG(t.b,68).c),vD(YF(D$(uG(e.b,68).a),uG(t.b,68).a),r))),f2(n,t),AKn(n,e)}function LKn(n){var t,e,i,r,c,a;for(r=new Ww(n.a.a);r.a0&&c>0?t++:i>0?e++:c>0?r++:e++}hZ(),f$(n.j,new bi)}function $Kn(n){var t,e;e=null,t=uG(zq(n.g,0),18);do{if(vR(e=t.d.i,(GYn(),nmt)))return uG(oIn(e,nmt),12).i;if(e.k!=(zIn(),dbt)&&hDn(new Fz(ix(Xgn(e).a.Kc(),new h))))t=uG(N9(new Fz(ix(Xgn(e).a.Kc(),new h))),18);else if(e.k!=dbt)return null}while(e&&e.k!=(zIn(),dbt));return e}function DKn(n,t){var e,i,r,c,a,o,u,s,h;for(o=t.j,a=t.g,u=uG(zq(o,o.c.length-1),113),u3(0,o.c.length),s=xTn(n,a,u,h=uG(o.c[0],113)),c=1;cs&&(u=e,h=r,s=i);t.a=h,t.c=u}function xKn(n,t,e){var i,r,c,a,o,u,s;for(s=new Hj(new ip(n)),o=0,u=(a=Uhn(cT(Abt,1),i6n,12,0,[t,e])).length;ou-n.b&&ou-n.a&&o0?c.a?e>(o=c.b.Mf().a)&&(r=(e-o)/2,c.d.b=r,c.d.c=r):c.d.c=n.s+e:cV(n.u)&&((i=ECn(c.b)).c<0&&(c.d.b=-i.c),i.c+i.b>c.b.Mf().a&&(c.d.c=i.c+i.b-c.b.Mf().a))}function rFn(n,t){var e,i,r,c,a;a=new Zm,e=t;do{(c=uG(cQ(n.b,e),131)).B=e.c,c.D=e.d,mv(a.c,c),e=uG(cQ(n.k,e),18)}while(e);return u3(0,a.c.length),(i=uG(a.c[0],131)).j=!0,i.A=uG(i.d.a.ec().Kc().Pb(),18).c.i,(r=uG(zq(a,a.c.length-1),131)).q=!0,r.C=uG(r.d.a.ec().Kc().Pb(),18).d.i,a}function cFn(n){var t,i;if(t=uG(n.a,17).a,i=uG(n.b,17).a,t>=0){if(t==i)return new WO(xwn(-t-1),xwn(-t-1));if(t==-i)return new WO(xwn(-t),xwn(i+1))}return e.Math.abs(t)>e.Math.abs(i)?new WO(xwn(-t),xwn(t<0?i:i+1)):new WO(xwn(t+1),xwn(i))}function aFn(n){var t,e;e=uG(oIn(n,(jYn(),gMt)),171),t=uG(oIn(n,(GYn(),Xpt)),311),e==(Gpn(),Imt)?(kfn(n,gMt,Lmt),kfn(n,Xpt,(Zen(),ppt))):e==Amt?(kfn(n,gMt,Lmt),kfn(n,Xpt,(Zen(),dpt))):t==(Zen(),ppt)?(kfn(n,gMt,Imt),kfn(n,Xpt,gpt)):t==dpt&&(kfn(n,gMt,Amt),kfn(n,Xpt,gpt))}function oFn(){oFn=E,LSt=new oa,CSt=Aq(new wJ,(uIn(),Elt),(zYn(),swt)),ASt=wz(Aq(new wJ,Elt,Twt),Plt,Mwt),NSt=Lvn(Lvn(gP(wz(Aq(new wJ,Tlt,Nwt),Plt,Lwt),Slt),Awt),$wt),ISt=wz(Aq(Aq(Aq(new wJ,jlt,lwt),Slt,wwt),Slt,dwt),Plt,bwt),OSt=wz(Aq(Aq(new wJ,Slt,dwt),Slt,Vbt),Plt,zbt)}function uFn(){uFn=E,KSt=Aq(wz(new wJ,(uIn(),Plt),(zYn(),Jbt)),Elt,swt),HSt=Lvn(Lvn(gP(wz(Aq(new wJ,Tlt,Nwt),Plt,Lwt),Slt),Awt),$wt),FSt=wz(Aq(Aq(Aq(new wJ,jlt,lwt),Slt,wwt),Slt,dwt),Plt,bwt),BSt=Aq(Aq(new wJ,Elt,Twt),Plt,Mwt),_St=wz(Aq(Aq(new wJ,Slt,dwt),Slt,Vbt),Plt,zbt)}function sFn(n,t,e,i,r){var c,a;(v9(t)||t.c.i.c!=t.d.i.c)&&uon(Gfn(Uhn(cT(PNt,1),zZn,8,0,[r.i.n,r.n,r.a])),e)||v9(t)||(t.c==r?sR(t.a,0,new eN(e)):aq(t.a,new eN(e)),i&&!cS(n.a,e)&&((a=uG(oIn(t,(jYn(),bMt)),75))||(a=new Uk,kfn(t,bMt,a)),s8(a,c=new eN(e),a.c.b,a.c),FV(n.a,c)))}function hFn(n,t){var e,i,r,c;for(e=(c=pz(Ngn(h1n,PJ(pz(Ngn(null==t?0:Hon(t),f1n)),15))))&n.b.length-1,r=null,i=n.b[e];i;r=i,i=i.a)if(i.d==c&&xQ(i.i,t))return r?r.a=i.a:n.b[e]=i.a,RM(uG(nJ(i.c),604),uG(nJ(i.f),604)),Tv(uG(nJ(i.b),227),uG(nJ(i.e),227)),--n.f,++n.e,!0;return!1}function fFn(n){var t;for(t=new Fz(ix(qgn(n).a.Kc(),new h));hDn(t);)if(uG(N9(t),18).c.i.k!=(zIn(),bbt))throw hv(new jM(y6n+ZTn(n)+"' has its layer constraint set to FIRST, but has at least one incoming edge that does not come from a FIRST_SEPARATE node. That must not happen."))}function lFn(n,t,e){var i,r,c,a,o,u;if(0==(r=Cdn(254&n.Db)))n.Eb=e;else{if(1==r)a=Inn(dat,EZn,1,2,5,1),0==jTn(n,t)?(a[0]=e,a[1]=n.Eb):(a[0]=n.Eb,a[1]=e);else for(a=Inn(dat,EZn,1,r+1,5,1),c=Kcn(n.Eb),i=2,o=0,u=0;i<=128;i<<=1)i==t?a[u++]=e:n.Db&i&&(a[u++]=c[o++]);n.Eb=a}n.Db|=t}function bFn(n,t,i){var r,c,a,o;for(this.b=new Zm,c=0,r=0,o=new Ww(n);o.a0&&(c+=(a=uG(zq(this.b,0),176)).o,r+=a.p),c*=2,r*=2,t>1?c=t0(e.Math.ceil(c*t)):r=t0(e.Math.ceil(r/t)),this.a=new smn(c,r)}function wFn(n,t,i,r,c,a){var o,u,s,h,f,l,b,w,d,g;for(h=r,t.j&&t.o?(d=(b=uG(cQ(n.f,t.A),60)).d.c+b.d.b,--h):d=t.a.c+t.a.b,f=c,i.q&&i.o?(s=(b=uG(cQ(n.f,i.C),60)).d.c,++f):s=i.a.c,w=d+(u=(s-d)/e.Math.max(2,f-h)),l=h;l=0;a+=r?1:-1){for(o=t[a],u=i==(KQn(),kRt)?r?Dgn(o,i):Spn(Dgn(o,i)):r?Spn(Dgn(o,i)):Dgn(o,i),c&&(n.c[o.p]=u.gc()),f=u.Kc();f.Ob();)h=uG(f.Pb(),12),n.d[h.p]=s++;Ohn(e,u)}}function pFn(n,t,e){var i,r,c,a,o,u,s,h;for(c=uM(pK(n.b.Kc().Pb())),s=uM(pK(whn(t.b))),i=vD(D$(n.a),s-e),r=vD(D$(t.a),e-c),vD(h=JF(i,r),1/(s-c)),this.a=h,this.b=new Zm,o=!0,(a=n.b.Kc()).Pb();a.Ob();)u=uM(pK(a.Pb())),o&&u-e>$9n&&(this.b.Fc(e),o=!1),this.b.Fc(u);o&&this.b.Fc(e)}function mFn(n){var t,e,i,r;if(wHn(n,n.n),n.d.c.length>0){for(AM(n.c);fDn(n,uG(N3(new Ww(n.e.a)),125))>5,t&=31,i>=n.d)return n.e<0?(cHn(),Dot):(cHn(),_ot);if(c=n.d-i,ROn(r=Inn(YHt,W1n,28,c+1,15,1),c,n.a,i,t),n.e<0){for(e=0;e0&&n.a[e]<<32-t){for(e=0;e=0)&&(!(e=iVn((gAn(),kBt),r,t))||((i=e.Ik())>1||-1==i)&&3!=sJ(Nen(kBt,e))))}function SFn(n,t,e,i){var r,c,a,o,u;return o=lCn(uG(zrn((!t.b&&(t.b=new f_(cFt,t,4,7)),t.b),0),84)),u=lCn(uG(zrn((!t.c&&(t.c=new f_(cFt,t,5,8)),t.c),0),84)),R0(o)==R0(u)||Ern(u,o)?null:(a=s0(t))==e?i:(c=uG(cQ(n.a,a),10))&&(r=c.e)?r:null}function PFn(n,t,e){var i,r,c,a;for(e.Ug("Longest path to source layering",1),n.a=t,a=n.a.a,n.b=Inn(YHt,W1n,28,a.c.length,15,1),i=0,c=new Ww(a);c.a0&&(i[0]+=n.d,o-=i[0]),i[2]>0&&(i[2]+=n.d,o-=i[2]),a=e.Math.max(0,o),i[1]=e.Math.max(i[1],o),Q9(n,Est,c.c+r.b+i[0]-(i[1]-o)/2,i),t==Est&&(n.c.b=a,n.c.c=c.c+r.b+(a-o)/2)}function BFn(){this.c=Inn(eUt,I0n,28,(KQn(),Uhn(cT(YRt,1),z4n,64,0,[FRt,yRt,kRt,KRt,_Rt])).length,15,1),this.b=Inn(eUt,I0n,28,Uhn(cT(YRt,1),z4n,64,0,[FRt,yRt,kRt,KRt,_Rt]).length,15,1),this.a=Inn(eUt,I0n,28,Uhn(cT(YRt,1),z4n,64,0,[FRt,yRt,kRt,KRt,_Rt]).length,15,1),KP(this.c,M0n),KP(this.b,T0n),KP(this.a,T0n)}function HFn(n,t,e){var i,r,c,a;if(t<=e?(r=t,c=e):(r=e,c=t),i=0,null==n.b)n.b=Inn(YHt,W1n,28,2,15,1),n.b[0]=r,n.b[1]=c,n.c=!0;else{if(i=n.b.length,n.b[i-1]+1==r)return void(n.b[i-1]=c);a=Inn(YHt,W1n,28,i+2,15,1),qGn(n.b,0,a,0,i),n.b=a,n.b[i-1]>=r&&(n.c=!1,n.a=!1),n.b[i++]=r,n.b[i]=c,n.c||pxn(n)}}function UFn(n,t,e){var i,r,c,a,o,u,s;for(s=t.d,n.a=new R7(s.c.length),n.c=new Ym,o=new Ww(s);o.a=0?n.Lh(s,!1,!0):YNn(n,e,!1),61).Kc();c.Ob();){for(r=uG(c.Pb(),58),h=0;h1;)e_n(r,r.i-1);return i}function YFn(n,t){var e,i,r,c,a,o;for(e=new ND,r=new Ww(n.b);r.an.d[a.p]&&(e+=J8(n.b,c),A6(n.a,xwn(c)));for(;!LM(n.a);)lin(n.b,uG(xV(n.a),17).a)}return e}function n_n(n){var t,e,i,r,c,a,o;for(n.a=new xF,o=0,r=0,i=new Ww(n.i.b);i.au.d&&(f=u.d+u.a+h));i.c.d=f,t.a.zc(i,t),s=e.Math.max(s,i.c.d+i.c.a)}return s}function r_n(){r_n=E,Zgt=new aI("COMMENTS",0),tpt=new aI("EXTERNAL_PORTS",1),ept=new aI("HYPEREDGES",2),ipt=new aI("HYPERNODES",3),rpt=new aI("NON_FREE_PORTS",4),cpt=new aI("NORTH_SOUTH_PORTS",5),opt=new aI(F6n,6),Ygt=new aI("CENTER_LABELS",7),npt=new aI("END_LABELS",8),apt=new aI("PARTITIONS",9)}function c_n(n,t,e,i,r){return i<0?((i=XOn(n,r,Uhn(cT($ot,1),zZn,2,6,[x1n,R1n,K1n,F1n,_1n,B1n,H1n,U1n,G1n,q1n,X1n,z1n]),t))<0&&(i=XOn(n,r,Uhn(cT($ot,1),zZn,2,6,["Jan","Feb","Mar","Apr",_1n,"Jun","Jul","Aug","Sep","Oct","Nov","Dec"]),t)),!(i<0||(e.k=i,0))):i>0&&(e.k=i-1,!0)}function a_n(n,t,e,i,r){return i<0?((i=XOn(n,r,Uhn(cT($ot,1),zZn,2,6,[x1n,R1n,K1n,F1n,_1n,B1n,H1n,U1n,G1n,q1n,X1n,z1n]),t))<0&&(i=XOn(n,r,Uhn(cT($ot,1),zZn,2,6,["Jan","Feb","Mar","Apr",_1n,"Jun","Jul","Aug","Sep","Oct","Nov","Dec"]),t)),!(i<0||(e.k=i,0))):i>0&&(e.k=i-1,!0)}function o_n(n,t,e,i,r,c){var a,o,u;if(o=32,i<0){if(t[0]>=n.length)return!1;if(43!=(o=VJ(n,t[0]))&&45!=o)return!1;if(++t[0],(i=RNn(n,t))<0)return!1;45==o&&(i=-i)}return 32==o&&t[0]-e==2&&2==r.b&&(a=(u=(new QE).q.getFullYear()-V1n+V1n-80)%100,c.a=i==a,i+=100*(u/100|0)+(i=0?Rmn(n):hW(Rmn(Men(n)))),qot[t]=BA(Nz(n,t),0)?Rmn(Nz(n,t)):hW(Rmn(Men(Nz(n,t)))),n=Ngn(n,5);for(;t=h&&(s=r);s&&(f=e.Math.max(f,s.a.o.a)),f>b&&(l=h,b=f)}return l}function v_n(n){var t,e,i,r,c,a,o;for(c=new Hj(uG(WW(new Dn),50)),o=T0n,e=new Ww(n.d);e.aF7n?f$(s,n.b):r<=F7n&&r>_7n?f$(s,n.d):r<=_7n&&r>B7n?f$(s,n.c):r<=B7n&&f$(s,n.a),a=T_n(n,s,a);return c}function j_n(n,t,e,i){var r,c,a,o,u;for(r=(i.c+i.a)/2,BY(t.j),aq(t.j,r),BY(e.e),aq(e.e,r),u=new hj,a=new Ww(n.f);a.a1&&(i=new MO(r,e.b),aq(t.a,i)),dan(t.a,Uhn(cT(PNt,1),zZn,8,0,[f,h]))}function O_n(n,t,e){var i,r;for(t=48;e--)pHt[e]=e-48<<24>>24;for(i=70;i>=65;i--)pHt[i]=i-65+10<<24>>24;for(r=102;r>=97;r--)pHt[r]=r-97+10<<24>>24;for(c=0;c<10;c++)mHt[c]=48+c&D1n;for(n=10;n<=15;n++)mHt[n]=65+n-10&D1n}function N_n(n,t){t.Ug("Process graph bounds",1),kfn(n,(OQn(),PPt),$I(Tun(ZJ(new fX(null,new h3(n.b,16)),new Ka)))),kfn(n,IPt,$I(Tun(ZJ(new fX(null,new h3(n.b,16)),new Fa)))),kfn(n,SPt,$I(Mun(ZJ(new fX(null,new h3(n.b,16)),new _a)))),kfn(n,CPt,$I(Mun(ZJ(new fX(null,new h3(n.b,16)),new Ba)))),t.Vg()}function $_n(n){var t,i,r,c,a;c=uG(oIn(n,(jYn(),DMt)),21),a=uG(oIn(n,KMt),21),t=new eN(i=new MO(n.f.a+n.d.b+n.d.c,n.f.b+n.d.d+n.d.a)),c.Hc((Qmn(),VRt))&&(r=uG(oIn(n,RMt),8),a.Hc((aUn(),eKt))&&(r.a<=0&&(r.a=20),r.b<=0&&(r.b=20)),t.a=e.Math.max(i.a,r.a),t.b=e.Math.max(i.b,r.b)),oM(gK(oIn(n,xMt)))||cXn(n,i,t)}function D_n(n,t){var e,i,r,c;for(c=Dgn(t,(KQn(),KRt)).Kc();c.Ob();)i=uG(c.Pb(),12),(e=uG(oIn(i,(GYn(),lmt)),10))&&RKn(xS(DS(RS($S(new uk,0),.1),n.i[t.p].d),n.i[e.p].a));for(r=Dgn(t,yRt).Kc();r.Ob();)i=uG(r.Pb(),12),(e=uG(oIn(i,(GYn(),lmt)),10))&&RKn(xS(DS(RS($S(new uk,0),.1),n.i[e.p].d),n.i[t.p].a))}function x_n(n){var t,e,i,r,c;if(!n.c){if(c=new ks,null==(t=V_t).a.zc(n,t)){for(i=new DD(z5(n));i.e!=i.i.gc();)F$(r=MGn(e=uG(Zkn(i),89)),90)&&CW(c,x_n(uG(r,29))),ttn(c,e);t.a.Bc(n),t.a.gc()}imn(c),lbn(c),n.c=new vL((uG(zrn(gZ((tQ(),M_t).o),15),19),c.i),c.g),y9(n).b&=-33}return n.c}function R_n(n){var t;if(10!=n.c)throw hv(new CM(rZn((t$(),eit))));switch(t=n.a){case 110:t=10;break;case 114:t=13;break;case 116:t=9;break;case 92:case 124:case 46:case 94:case 45:case 63:case 42:case 43:case 123:case 125:case 40:case 41:case 91:case 93:break;default:throw hv(new CM(rZn((t$(),Lit))))}return t}function K_n(n){var t,e,i,r;if(0==n.l&&0==n.m&&0==n.h)return"0";if(n.h==b0n&&0==n.m&&0==n.l)return"-9223372036854775808";if(n.h>>19)return"-"+K_n(gfn(n));for(e=n,i="";0!=e.l||0!=e.m||0!=e.h;){if(e=Yzn(e,_9(g0n),!0),t=""+Tj(Qat),0!=e.l||0!=e.m||0!=e.h)for(r=9-t.length;r>0;r--)t="0"+t;i=t+i}return i}function F_n(n){var t,e,i,r,c,a,o;for(t=!1,e=0,r=new Ww(n.d.b);r.a=n.a)return-1;if(!_Pn(t,i))return-1;if(P6(uG(r.Kb(t),20)))return 1;for(c=0,o=uG(r.Kb(t),20).Kc();o.Ob();){if(-1==(u=U_n(n,(a=uG(o.Pb(),18)).c.i==t?a.d.i:a.c.i,i,r)))return-1;if((c=e.Math.max(c,u))>n.c-1)return-1}return c+1}function G_n(n,t){var e,i,r,c,a,o;if(xA(t)===xA(n))return!0;if(!F$(t,15))return!1;if(i=uG(t,15),o=n.gc(),i.gc()!=o)return!1;if(a=i.Kc(),n.Yi()){for(e=0;e0)if(n._j(),null!=t){for(c=0;c>24;case 97:case 98:case 99:case 100:case 101:case 102:return n-97+10<<24>>24;case 65:case 66:case 67:case 68:case 69:case 70:return n-65+10<<24>>24;default:throw hv(new ZM("Invalid hexadecimal"))}}function W_n(){W_n=E,pst=new rC("SPIRAL",0),lst=new rC("LINE_BY_LINE",1),bst=new rC("MANHATTAN",2),fst=new rC("JITTER",3),dst=new rC("QUADRANTS_LINE_BY_LINE",4),gst=new rC("QUADRANTS_MANHATTAN",5),wst=new rC("QUADRANTS_JITTER",6),hst=new rC("COMBINE_LINE_BY_LINE_MANHATTAN",7),sst=new rC("COMBINE_JITTER_MANHATTAN",8)}function Q_n(n,t,e,i){var r,c,a,o,u,s;for(u=pSn(n,e),s=pSn(t,e),r=!1;u&&s&&(i||ejn(u,s,e));)a=pSn(u,e),o=pSn(s,e),Ien(t),Ien(n),c=u.c,pVn(u,!1),pVn(s,!1),e?($jn(t,s.p,c),t.p=s.p,$jn(n,u.p+1,c),n.p=u.p):($jn(n,u.p,c),n.p=u.p,$jn(t,s.p+1,c),t.p=s.p),a2(u,null),a2(s,null),u=a,s=o,r=!0;return r}function J_n(n){switch(n.g){case 0:return new ul;case 1:return new al;case 3:return new iP;case 4:return new Sc;case 5:return new RF;case 6:return new ol;case 2:return new cl;case 7:return new Zf;case 8:return new tl;default:throw hv(new vM("No implementation is available for the layerer "+(null!=n.f?n.f:""+n.g)))}}function Y_n(n,t,e,i){var r,c,a,o,u;for(r=!1,c=!1,o=new Ww(i.j);o.a=t.length)throw hv(new dM("Greedy SwitchDecider: Free layer not in graph."));this.c=t[n],this.e=new R_(i),Aon(this.e,this.c,(KQn(),_Rt)),this.i=new R_(i),Aon(this.i,this.c,kRt),this.f=new sX(this.c),this.a=!c&&r.i&&!r.s&&this.c[0].k==(zIn(),lbt),this.a&&rAn(this,n,t.length)}function iBn(n,t){var e,i,r,c,a,o;c=!n.B.Hc((aUn(),nKt)),a=n.B.Hc(iKt),n.a=new umn(a,c,n.c),n.n&&WY(n.a.n,n.n),nM(n.g,(Yrn(),Est),n.a),t||((i=new tkn(1,c,n.c)).n.a=n.k,UV(n.p,(KQn(),yRt),i),(r=new tkn(1,c,n.c)).n.d=n.k,UV(n.p,KRt,r),(o=new tkn(0,c,n.c)).n.c=n.k,UV(n.p,_Rt,o),(e=new tkn(0,c,n.c)).n.b=n.k,UV(n.p,kRt,e))}function rBn(n){var t,e,i;switch((t=uG(oIn(n.d,(jYn(),Vyt)),223)).g){case 2:e=UJn(n);break;case 3:i=new Zm,kS(JJ(YJ(sin(sin(new fX(null,new h3(n.d.b,16)),new Or),new Ar),new Lr),new pr),new Ng(i)),e=i;break;default:throw hv(new kM("Compaction not supported for "+t+" edges."))}xzn(n,e),z8(new Lw(n.g),new Ag(n))}function cBn(n,t){var e,i,r,c,a,o,u;if(t.Ug("Process directions",1),(e=uG(oIn(n,(QGn(),cCt)),88))!=(xdn(),QDt))for(r=Fkn(n.b,0);r.b!=r.d.c;){switch(i=uG(I6(r),40),o=uG(oIn(i,(OQn(),GPt)),17).a,u=uG(oIn(i,qPt),17).a,e.g){case 4:u*=-1;break;case 1:c=o,o=u,u=c;break;case 2:a=o,o=-u,u=a}kfn(i,GPt,xwn(o)),kfn(i,qPt,xwn(u))}t.Vg()}function aBn(n,t){var e;return e=new Yn,t&&zsn(e,uG(cQ(n.a,iFt),96)),F$(t,422)&&zsn(e,uG(cQ(n.a,rFt),96)),F$(t,366)?(zsn(e,uG(cQ(n.a,lFt),96)),e):(F$(t,84)&&zsn(e,uG(cQ(n.a,cFt),96)),F$(t,207)?(zsn(e,uG(cQ(n.a,bFt),96)),e):F$(t,193)?(zsn(e,uG(cQ(n.a,wFt),96)),e):(F$(t,326)&&zsn(e,uG(cQ(n.a,aFt),96)),e))}function oBn(n){var t,e,i,r,c,a,o;for(o=new c9,a=new Ww(n.a);a.a0&&t=0)return!1;if(t.p=e.b,kD(e.e,t),i==(zIn(),wbt)||i==gbt)for(r=new Ww(t.j);r.an.d[o.p]&&(e+=J8(n.b,c),A6(n.a,xwn(c))):++a;for(e+=n.b.d*a;!LM(n.a);)lin(n.b,uG(xV(n.a),17).a)}return e}function $Bn(n){var t,e,i,r,c,a;return c=0,(t=bEn(n)).kk()&&(c|=4),n.Bb&hrt&&(c|=2),F$(n,102)?(r=lMn(e=uG(n,19)),e.Bb&Qtt&&(c|=32),r&&(iQ(K0(r)),c|=8,((a=r.t)>1||-1==a)&&(c|=16),r.Bb&Qtt&&(c|=64)),e.Bb&P0n&&(c|=frt),c|=w1n):F$(t,469)?c|=512:(i=t.kk())&&1&i.i&&(c|=256),512&n.Bb&&(c|=128),c}function DBn(n,t){var e;return n.f==CBt?(e=sJ(Nen((gAn(),kBt),t)),n.e?4==e&&t!=(m$n(),NBt)&&t!=(m$n(),OBt)&&t!=(m$n(),ABt)&&t!=(m$n(),LBt):2==e):!(!n.d||!(n.d.Hc(t)||n.d.Hc(_3(Nen((gAn(),kBt),t)))||n.d.Hc(iVn((gAn(),kBt),n.b,t))))||!(!n.f||!WRn((gAn(),n.f),HJ(Nen(kBt,t))))&&(e=sJ(Nen(kBt,t)),n.e?4==e:2==e)}function xBn(n){var t,e,i,r,c,a,o,u,s,h,f,l;for(f=-1,l=0,s=0,h=(u=n).length;s0&&++l;++f}return l}function RBn(n,t,i,r){var c,a,o,u,s,h,f,l;return s=(o=uG(zDn(i,(XYn(),mDt)),8)).a,f=o.b+n,(c=e.Math.atan2(f,s))<0&&(c+=f7n),(c+=t)>f7n&&(c-=f7n),h=(u=uG(zDn(r,mDt),8)).a,l=u.b+n,(a=e.Math.atan2(l,h))<0&&(a+=f7n),(a+=t)>f7n&&(a-=f7n),YN(),oan(1e-10),e.Math.abs(c-a)<=1e-10||c==a||isNaN(c)&&isNaN(a)?0:ca?1:KL(isNaN(c),isNaN(a))}function KBn(n){var t,e,i,r,c,a,o;for(o=new Ym,i=new Ww(n.a.b);i.a=n.o)throw hv(new Ik);a=t>>5,c=Nz(1,pz(Nz(31&t,1))),n.n[e][a]=r?S3(n.n[e][a],c):E3(n.n[e][a],CG(c)),c=Nz(c,1),n.n[e][a]=i?S3(n.n[e][a],c):E3(n.n[e][a],CG(c))}catch(o){throw F$(o=Ehn(o),333)?hv(new dM(b3n+n.o+"*"+n.p+w3n+t+TZn+e+d3n)):hv(o)}}function UBn(n,t,e,i){var r,c,a,o,u,s,h,f;for(f=new Hj(new ep(n)),o=0,u=(a=Uhn(cT(pbt,1),e6n,10,0,[t,e])).length;o0&&(!(i=(!n.n&&(n.n=new fV(lFt,n,1,7)),uG(zrn(n.n,0),135)).a)||JA(JA((t.a+=' "',t),i),'"'))),JA(Nj(JA(Nj(JA(Nj(JA(Nj((t.a+=" (",t),n.i),","),n.j)," | "),n.g),","),n.f),")"),t.a)}function VBn(n){var t,e,i;return 64&n.Db?rOn(n):(t=new lx(Btt),(e=n.k)?JA(JA((t.a+=' "',t),e),'"'):(!n.n&&(n.n=new fV(lFt,n,1,7)),n.n.i>0&&(!(i=(!n.n&&(n.n=new fV(lFt,n,1,7)),uG(zrn(n.n,0),135)).a)||JA(JA((t.a+=' "',t),i),'"'))),JA(Nj(JA(Nj(JA(Nj(JA(Nj((t.a+=" (",t),n.i),","),n.j)," | "),n.g),","),n.f),")"),t.a)}function WBn(n,t){var e,i,r,c,a;for(t==(Sln(),rEt)&&_An(uG(Y9(n.a,(gPn(),wdt)),15)),r=uG(Y9(n.a,(gPn(),wdt)),15).Kc();r.Ob();)switch(i=uG(r.Pb(),105),e=uG(zq(i.j,0),113).d.j,f$(c=new Z_(i.j),new Fr),t.g){case 2:TCn(n,c,e,(gon(),Edt),1);break;case 1:case 0:TCn(n,new C2(c,0,a=IRn(c)),e,(gon(),Edt),0),TCn(n,new C2(c,a,c.c.length),e,Edt,1)}}function QBn(n,t){var e,i,r,c,a,o;if(null==t||0==t.length)return null;if(!(r=uG(U1(n.a,t),143))){for(i=new _w(new Fw(n.b).a.vc().Kc());i.a.Ob();)if(c=uG(i.a.Pb(),44),a=(e=uG(c.md(),143)).c,o=t.length,m_(a.substr(a.length-o,o),t)&&(t.length==a.length||46==VJ(a,a.length-t.length-1))){if(r)return null;r=e}r&&r2(n.a,t,r)}return r}function JBn(n,t){var e,i,r;return e=new Bn,(i=uG(l8(YJ(new fX(null,new h3(n.f,16)),e),gen(new W,new Q,new rn,new cn,Uhn(cT(Rut,1),p1n,108,0,[(ybn(),Out),Iut]))),21).gc())<(r=uG(l8(YJ(new fX(null,new h3(t.f,16)),e),gen(new W,new Q,new rn,new cn,Uhn(cT(Rut,1),p1n,108,0,[Out,Iut]))),21).gc())?-1:i==r?0:1}function YBn(n){var t,e,i;vR(n,(jYn(),PMt))&&((i=uG(oIn(n,PMt),21)).dc()||(e=new nB(t=uG(Mj(eRt),9),uG(MF(t,t.length),9),0),i.Hc((VDn(),Gxt))?Mon(e,Gxt):Mon(e,qxt),i.Hc(Hxt)||Mon(e,Hxt),i.Hc(Bxt)?Mon(e,Vxt):i.Hc(_xt)?Mon(e,zxt):i.Hc(Uxt)&&Mon(e,Xxt),i.Hc(Vxt)?Mon(e,Bxt):i.Hc(zxt)?Mon(e,_xt):i.Hc(Xxt)&&Mon(e,Uxt),kfn(n,PMt,e)))}function ZBn(n){var t,e,i,r,c,a,o;for(r=uG(oIn(n,(GYn(),zpt)),10),u3(0,(i=n.j).c.length),e=uG(i.c[0],12),a=new Ww(r.j);a.ar.p?(NLn(c,KRt),c.d&&(o=c.o.b,t=c.a.b,c.a.b=o-t)):c.j==KRt&&r.p>n.p&&(NLn(c,yRt),c.d&&(o=c.o.b,t=c.a.b,c.a.b=-(o-t)));break}return r}function nHn(n,t,e,i,r){var c,a,o,u,s,h,f;if(!(F$(t,207)||F$(t,366)||F$(t,193)))throw hv(new vM("Method only works for ElkNode-, ElkLabel and ElkPort-objects."));return a=n.a/2,u=t.i+i-a,h=t.j+r-a,s=u+t.g+n.a,f=h+t.f+n.a,aq(c=new Uk,new MO(u,h)),aq(c,new MO(u,f)),aq(c,new MO(s,f)),aq(c,new MO(s,h)),zsn(o=new pDn(c),t),e&&vJ(n.b,t,o),o}function tHn(n,t,e){var i,r,c,a,o,u,s,h;for(c=new MO(t,e),s=new Ww(n.a);s.a1&&(i=new MO(r,e.b),aq(t.a,i)),dan(t.a,Uhn(cT(PNt,1),zZn,8,0,[f,h]))}function THn(){THn=E,$jt=new dI(q4n,0),Ijt=new dI("NIKOLOV",1),Ljt=new dI("NIKOLOV_PIXEL",2),Ojt=new dI("NIKOLOV_IMPROVED",3),Ajt=new dI("NIKOLOV_IMPROVED_PIXEL",4),Sjt=new dI("DUMMYNODE_PERCENTAGE",5),Njt=new dI("NODECOUNT_PERCENTAGE",6),Djt=new dI("NO_BOUNDARY",7),Pjt=new dI("MODEL_ORDER_LEFT_TO_RIGHT",8),Cjt=new dI("MODEL_ORDER_RIGHT_TO_LEFT",9)}function jHn(n){var t,e,i,r,c;for(i=n.length,t=new VM,c=0;c=40)&&IGn(n),izn(n),mFn(n),e=ign(n),i=0;e&&i0&&aq(n.f,c)):(n.c[a]-=s+1,n.c[a]<=0&&n.a[a]>0&&aq(n.e,c))))}function iUn(n,t,e,i){var r,c,a,o,u,s,h;for(YF(u=new MO(e,i),uG(oIn(t,(OQn(),kPt)),8)),h=Fkn(t.b,0);h.b!=h.d.c;)JF((s=uG(I6(h),40)).e,u),aq(n.b,s);for(o=uG(l8(_0(new fX(null,new h3(t.a,16))),ftn(new V,new z,new en,Uhn(cT(Rut,1),p1n,108,0,[(ybn(),Iut)]))),15).Kc();o.Ob();){for(c=Fkn((a=uG(o.Pb(),65)).a,0);c.b!=c.d.c;)(r=uG(I6(c),8)).a+=u.a,r.b+=u.b;aq(n.a,a)}}function rUn(n,t){var e,i,r,c;if(0<(F$(n,16)?uG(n,16).gc():x5(n.Kc()))){if(1<(r=t)){for(--r,c=new Ea,i=n.Kc();i.Ob();)e=uG(i.Pb(),40),c=zcn(Uhn(cT(vat,1),EZn,20,0,[c,new Mp(e)]));return rUn(c,r)}if(r<0){for(c=new Sa,i=n.Kc();i.Ob();)e=uG(i.Pb(),40),c=zcn(Uhn(cT(vat,1),EZn,20,0,[c,new Mp(e)]));if(0<(F$(c,16)?uG(c,16).gc():x5(c.Kc())))return rUn(c,r)}}return uG(B$(n.Kc()),40)}function cUn(n,t,e){var i,r,c,a;for(e.Ug("Processor order nodes",2),n.b=uM(pK(oIn(t,(QGn(),ECt)))),n.a=uG(oIn(t,cCt),88),n.a==(xdn(),ZDt)&&(n.a=QDt,kfn(t,cCt,n.a)),r=new lS,a=Fkn(t.b,0);a.b!=a.d.c;)oM(gK(oIn(c=uG(I6(a),40),(OQn(),UPt))))&&s8(r,c,r.c.b,r.c);MK(0!=r.b),ezn(n,i=uG(r.a.a.c,40)),e.fh(1),GBn(n,i,0-uM(pK(oIn(i,(OQn(),NPt))))/2,0),e.fh(1),e.Vg()}function aUn(){aUn=E,eKt=new FO("DEFAULT_MINIMUM_SIZE",0),rKt=new FO("MINIMUM_SIZE_ACCOUNTS_FOR_PADDING",1),tKt=new FO("COMPUTE_PADDING",2),cKt=new FO("OUTSIDE_NODE_LABELS_OVERHANG",3),aKt=new FO("PORTS_OVERHANG",4),uKt=new FO("UNIFORM_PORT_SPACING",5),oKt=new FO("SPACE_EFFICIENT_PORT_LABELS",6),iKt=new FO("FORCE_TABULAR_NODE_LABELS",7),nKt=new FO("ASYMMETRICAL",8)}function oUn(n,t){var e,i,r,c,a,o,u,s;if(t){if(e=(c=t.Dh())?Hrn(c).wi().si(c):null){for(Akn(n,t,e),u=0,s=(null==(r=t.Dh()).i&&eqn(r),r.i).length;u=0&&u2*c?(h=new Jrn(f),s=EX(a)/jX(a),u=KJn(h,t,new Dk,e,i,r,s),JF(dL(h.e),u),f.c.length=0,c=0,mv(f.c,h),mv(f.c,a),c=EX(h)*jX(h)+EX(a)*jX(a)):(mv(f.c,a),c+=EX(a)*jX(a));return f}function fUn(n,t){var e,i,r,c,a,o;if((o=uG(oIn(t,(jYn(),JMt)),101))==($Pn(),aRt)||o==cRt)for(r=new MO(t.f.a+t.d.b+t.d.c,t.f.b+t.d.d+t.d.a).b,a=new Ww(n.a);a.ae?t:e;s<=f;++s)s==e?o=i++:(c=r[s],h=w.am(c.Lk()),s==t&&(u=s!=f||h?i:i-1),h&&++i);return l=uG(zdn(n,t,e),76),o!=u&&Yv(n,new wtn(n.e,7,a,xwn(o),b.md(),u)),l}return uG(zdn(n,t,e),76)}function bUn(n,t){var e,i,r,c,a,o;for(t.Ug("Port order processing",1),o=uG(oIn(n,(jYn(),iTt)),430),e=new Ww(n.b);e.a=0&&(!fjn(n,a)||(u<22?o.l|=1<>>1,a.m=s>>>1|(1&h)<<21,a.l=f>>>1|(1&s)<<21,--u;return e&&Yfn(o),c&&(i?(Qat=gfn(n),r&&(Qat=Thn(Qat,(tin(),Zat)))):Qat=p$(n.l,n.m,n.h)),o}function pUn(n,t){var e,i,r,c,a,o,u,s,h,f;for(s=n.e[t.c.p][t.p]+1,u=t.c.a.c.length+1,o=new Ww(n.a);o.a0&&(s3(0,n.length),45==n.charCodeAt(0)||(s3(0,n.length),43==n.charCodeAt(0)))?1:0;ie)throw hv(new ZM(y0n+n+'"'));return a}function vUn(n){var t,i,r,c,a,o;for(a=new lS,c=new Ww(n.a);c.a1)&&1==t&&uG(n.a[n.b],10).k==(zIn(),bbt)?Gqn(uG(n.a[n.b],10),(Ajn(),$xt)):i&&(!e||(n.c-n.b&n.a.length-1)>1)&&1==t&&uG(n.a[n.c-1&n.a.length-1],10).k==(zIn(),bbt)?Gqn(uG(n.a[n.c-1&n.a.length-1],10),(Ajn(),Dxt)):2==(n.c-n.b&n.a.length-1)?(Gqn(uG(Rfn(n),10),(Ajn(),$xt)),Gqn(uG(Rfn(n),10),Dxt)):Pxn(n,r),q5(n)}function jUn(n,t,i){var r,c,a,o,u;for(a=0,c=new DD((!n.a&&(n.a=new fV(bFt,n,10,11)),n.a));c.e!=c.i.gc();)o="",0==(!(r=uG(Zkn(c),27)).n&&(r.n=new fV(lFt,r,1,7)),r.n).i||(o=uG(zrn((!r.n&&(r.n=new fV(lFt,r,1,7)),r.n),0),135).a),zsn(u=new wln(a++,t,o),r),kfn(u,(OQn(),RPt),r),u.e.b=r.j+r.f/2,u.f.a=e.Math.max(r.g,1),u.e.a=r.i+r.g/2,u.f.b=e.Math.max(r.f,1),aq(t.b,u),VAn(i.f,r,u)}function EUn(n){var t,e,i,r,c;i=uG(oIn(n,(GYn(),rmt)),27),c=uG(zDn(i,(jYn(),DMt)),181).Hc((Qmn(),JRt)),n.e||(r=uG(oIn(n,Hpt),21),t=new MO(n.f.a+n.d.b+n.d.c,n.f.b+n.d.d+n.d.a),r.Hc((r_n(),tpt))?(Myn(i,JMt,($Pn(),cRt)),ZQn(i,t.a,t.b,!1,!0)):oM(gK(zDn(i,xMt)))||ZQn(i,t.a,t.b,!0,!0)),Myn(i,DMt,c?ggn(JRt):new nB(e=uG(Mj(sKt),9),uG(MF(e,e.length),9),0))}function SUn(n,t,e){var i,r,c,a;if(t[0]>=n.length)return e.o=0,!0;switch(VJ(n,t[0])){case 43:r=1;break;case 45:r=-1;break;default:return e.o=0,!0}if(++t[0],c=t[0],0==(a=RNn(n,t))&&t[0]==c)return!1;if(t[0]a&&(a=r,s.c.length=0),r==a&&kD(s,new WO(e.c.i,e)));hZ(),f$(s,n.c),GX(n.b,o.p,s)}}function OUn(n,t){var e,i,r,c,a,o,u,s;for(c=new Ww(t.b);c.aa&&(a=r,s.c.length=0),r==a&&kD(s,new WO(e.d.i,e)));hZ(),f$(s,n.c),GX(n.f,o.p,s)}}function AUn(n,t){var e,i,r,c,a,o,u;if(null==(u=gK(oIn(t,(QGn(),TCt))))||(tJ(u),u)){for(E$n(n,t),r=new Zm,o=Fkn(t.b,0);o.b!=o.d.c;)(e=yAn(n,uG(I6(o),40),null))&&(zsn(e,t),mv(r.c,e));if(n.a=null,n.b=null,r.c.length>1)for(i=new Ww(r);i.a=0&&o!=e&&(c=new lV(n,1,o,a,null),i?i.nj(c):i=c),e>=0&&(c=new lV(n,1,e,o==e?a:null,t),i?i.nj(c):i=c)),i}function DUn(n){var t,e,i;if(null==n.b){if(i=new zM,null!=n.i&&(VA(i,n.i),i.a+=":"),256&n.f){for(256&n.f&&null!=n.a&&(aY(n.i)||(i.a+="//"),VA(i,n.a)),null!=n.d&&(i.a+="/",VA(i,n.d)),16&n.f&&(i.a+="/"),t=0,e=n.j.length;ts)&&(u+o+uXn(i,s,!1).a<=t.b&&(dtn(e,c-e.s),e.c=!0,dtn(i,c-e.s),oMn(i,e.s,e.t+e.d+o),i.k=!0,Gun(e.q,i),h=!0,r&&(fan(t,i),i.j=t,n.c.length>a&&(uEn((u3(a,n.c.length),uG(n.c[a],186)),i),0==(u3(a,n.c.length),uG(n.c[a],186)).a.c.length&&i7(n,a)))),h)}function HUn(n,t){var e,i,r,c,a;if(t.Ug("Partition midprocessing",1),r=new K1,kS(JJ(new fX(null,new h3(n.a,16)),new di),new kg(r)),0!=r.d){for(a=uG(l8(f3(new fX(null,(r.i||(r.i=new RD(r,r.c))).Nc())),ftn(new V,new z,new en,Uhn(cT(Rut,1),p1n,108,0,[(ybn(),Iut)]))),15),e=uG((i=a.Kc()).Pb(),17);i.Ob();)c=uG(i.Pb(),17),RRn(uG(Y9(r,e),21),uG(Y9(r,c),21)),e=c;t.Vg()}}function UUn(n,t,e){var i,r,c,a,o;if(0==t.p){for(t.p=1,(r=e)||(r=new WO(new Zm,new nB(i=uG(Mj(YRt),9),uG(MF(i,i.length),9),0))),uG(r.a,15).Fc(t),t.k==(zIn(),lbt)&&uG(r.b,21).Fc(uG(oIn(t,(GYn(),Fpt)),64)),a=new Ww(t.j);a.a0)if(r=uG(n.Ab.g,2033),null==t){for(c=0;ci.s&&ua)return KQn(),kRt;break;case 4:case 3:if(h<0)return KQn(),yRt;if(h+e>c)return KQn(),KRt}return(u=(s+o/2)/a)+(i=(h+e/2)/c)<=1&&u-i<=0?(KQn(),_Rt):u+i>=1&&u-i>=0?(KQn(),kRt):i<.5?(KQn(),yRt):(KQn(),KRt)}function nGn(n,t){var e,i,r,c,a,o,u,s,h,f,l,b;for(e=!1,u=uM(pK(oIn(t,(jYn(),ETt)))),l=T1n*u,r=new Ww(t.b);r.aa.n.b-a.d.d+h.a+l&&(b=s.g+h.g,h.a=(h.g*h.a+s.g*s.a)/b,h.g=b,s.f=h,e=!0)),c=a,s=h;return e}function tGn(n,t,e,i,r,c,a){var o,u,s,h,f;for(f=new cN,u=t.Kc();u.Ob();)for(h=new Ww(uG(u.Pb(),853).Rf());h.a0?o.a?r>(s=o.b.Mf().b)&&(n.v||1==o.c.d.c.length?(a=(r-s)/2,o.d.d=a,o.d.a=a):(i=(uG(zq(o.c.d,0),187).Mf().b-s)/2,o.d.d=e.Math.max(0,i),o.d.a=r-i-s)):o.d.a=n.t+r:cV(n.u)&&((c=ECn(o.b)).d<0&&(o.d.d=-c.d),c.d+c.a>o.b.Mf().b&&(o.d.a=c.d+c.a-o.b.Mf().b))}function rGn(){rGn=E,$ft=new _N((XYn(),vDt),xwn(1)),_ft=new _N(DDt,80),Fft=new _N(CDt,5),kft=new _N(c$t,r4n),Dft=new _N(kDt,xwn(1)),Kft=new _N(TDt,(qx(),!0)),Aft=new CN(50),Oft=new _N(W$t,Aft),Mft=O$t,Lft=sDt,yft=new _N(p$t,!1),Ift=V$t,Pft=H$t,Cft=q$t,Sft=_$t,Eft=K$t,Nft=bDt,oOn(),jft=sft,Bft=wft,Tft=uft,xft=fft,Rft=bft,Gft=HDt,Xft=XDt,Uft=BDt,Hft=_Dt,Iwn(),new _N(UDt,qft=fKt)}function cGn(n,t){var e;switch(Min(n)){case 6:return RA(t);case 7:return FA(t);case 8:return KA(t);case 3:return Array.isArray(t)&&!((e=Min(t))>=14&&e<=16);case 11:return null!=t&&typeof t===mZn;case 12:return null!=t&&(typeof t===wZn||typeof t==mZn);case 0:return Eyn(t,n.__elementTypeId$);case 2:return NV(t)&&!(t.Tm===j);case 1:return NV(t)&&!(t.Tm===j)||Eyn(t,n.__elementTypeId$);default:return!0}}function aGn(n){var t,i,r,c;r=n.o,VK(),n.A.dc()||udn(n.A,lht)?c=r.a:(c=n.D?e.Math.max(r.a,gNn(n.f)):gNn(n.f),n.A.Hc((Qmn(),WRt))&&!n.B.Hc((aUn(),cKt))&&(c=e.Math.max(c,gNn(uG(AJ(n.p,(KQn(),yRt)),252))),c=e.Math.max(c,gNn(uG(AJ(n.p,KRt),252)))),(t=fsn(n))&&(c=e.Math.max(c,t.a))),oM(gK(n.e.Tf().of((XYn(),H$t))))?r.a=e.Math.max(r.a,c):r.a=c,(i=n.f.i).c=0,i.b=c,YGn(n.f)}function oGn(n,t){var i,r,c,a;return r=e.Math.min(e.Math.abs(n.c-(t.c+t.b)),e.Math.abs(n.c+n.b-t.c)),a=e.Math.min(e.Math.abs(n.d-(t.d+t.a)),e.Math.abs(n.d+n.a-t.d)),(i=e.Math.abs(n.c+n.b/2-(t.c+t.b/2)))>n.b/2+t.b/2||(c=e.Math.abs(n.d+n.a/2-(t.d+t.a/2)))>n.a/2+t.a/2?1:0==i&&0==c?0:0==i?a/c+1:0==c?r/i+1:e.Math.min(r/i,a/c)+1}function uGn(n,t){var e,i,r,c,a,o,u;for(c=0,o=0,u=0,r=new Ww(n.f.e);r.a0&&n.d!=(Jen(),plt)&&(o+=a*(i.d.a+n.a[t.a][i.a]*(t.d.a-i.d.a)/e)),e>0&&n.d!=(Jen(),dlt)&&(u+=a*(i.d.b+n.a[t.a][i.a]*(t.d.b-i.d.b)/e)));switch(n.d.g){case 1:return new MO(o/c,t.d.b);case 2:return new MO(t.d.a,u/c);default:return new MO(o/c,u/c)}}function sGn(n){var t,e,i,r,c;for(kD(c=new R7((!n.a&&(n.a=new MD(eFt,n,5)),n.a).i+2),new MO(n.j,n.k)),kS(new fX(null,(!n.a&&(n.a=new MD(eFt,n,5)),new h3(n.a,16))),new Vp(c)),kD(c,new MO(n.b,n.c)),t=1;t0&&(hfn(u,!1,(xdn(),JDt)),hfn(u,!0,YDt)),Prn(t.g,new UC(n,e)),vJ(n.g,t,e)}function lGn(){var n;for(lGn=E,pot=Uhn(cT(YHt,1),W1n,28,15,[-1,-1,30,19,15,13,11,11,10,9,9,8,8,8,8,7,7,7,7,7,7,7,6,6,6,6,6,6,6,6,6,6,6,6,6,6,5]),mot=Inn(YHt,W1n,28,37,15,1),vot=Uhn(cT(YHt,1),W1n,28,15,[-1,-1,63,40,32,28,25,23,21,20,19,19,18,18,17,17,16,16,16,15,15,15,15,14,14,14,14,14,14,13,13,13,13,13,13,13,13]),kot=Inn(nUt,E0n,28,37,14,1),n=2;n<=36;n++)mot[n]=t0(e.Math.pow(n,pot[n])),kot[n]=bSn(YZn,mot[n])}function bGn(n){var t;if(1!=(!n.a&&(n.a=new fV(oFt,n,6,6)),n.a).i)throw hv(new vM(Ptt+(!n.a&&(n.a=new fV(oFt,n,6,6)),n.a).i));return t=new Uk,Shn(uG(zrn((!n.b&&(n.b=new f_(cFt,n,4,7)),n.b),0),84))&&Qon(t,pYn(n,Shn(uG(zrn((!n.b&&(n.b=new f_(cFt,n,4,7)),n.b),0),84)),!1)),Shn(uG(zrn((!n.c&&(n.c=new f_(cFt,n,5,8)),n.c),0),84))&&Qon(t,pYn(n,Shn(uG(zrn((!n.c&&(n.c=new f_(cFt,n,5,8)),n.c),0),84)),!0)),t}function wGn(n,t){var e,i,r;for(r=!1,i=new Fz(ix((t.d?n.a.c==(b0(),fSt)?qgn(t.b):Xgn(t.b):n.a.c==(b0(),hSt)?qgn(t.b):Xgn(t.b)).a.Kc(),new h));hDn(i);)if(e=uG(N9(i),18),(oM(n.a.f[n.a.g[t.b.p].p])||v9(e)||e.c.i.c!=e.d.i.c)&&!oM(n.a.n[n.a.g[t.b.p].p])&&!oM(n.a.n[n.a.g[t.b.p].p])&&(r=!0,cS(n.b,n.a.g[vTn(e,t.b).p])))return t.c=!0,t.a=e,t;return t.c=r,t.a=null,t}function dGn(n,t,e){var i,r,c,a,o,u,s;if(0==(i=e.gc()))return!1;if(n.Pj())if(u=n.Qj(),nmn(n,t,e),a=1==i?n.Ij(3,null,e.Kc().Pb(),t,u):n.Ij(5,null,e,t,u),n.Mj()){for(o=i<100?null:new cj(i),c=t+i,r=t;r0){for(o=0;o>16==-15&&n.Cb.Yh()&&Cen(new btn(n.Cb,9,13,e,n.c,Hyn(Aen(uG(n.Cb,62)),n))):F$(n.Cb,90)&&n.Db>>16==-23&&n.Cb.Yh()&&(F$(t=n.c,90)||(YYn(),t=x_t),F$(e,90)||(YYn(),e=x_t),Cen(new btn(n.Cb,9,10,e,t,Hyn(z5(uG(n.Cb,29)),n)))))),n.c}function TGn(n,t,e){var i,r,c,a,o,u,s,h;for(e.Ug("Hyperedge merging",1),CDn(n,t),o=new N4(t.b,0);o.b0,o=hpn(t,c),Px(e?o.b:o.g,t),1==Ebn(o).c.length&&s8(i,o,i.c.b,i.c),r=new WO(c,t),A6(n.o,r),men(n.e.a,c))}function OGn(n,t){var i,r,c,a;return r=e.Math.abs(AV(n.b).a-AV(t.b).a),a=e.Math.abs(AV(n.b).b-AV(t.b).b),i=1,c=1,r>n.b.b/2+t.b.b/2&&(i=1-e.Math.min(e.Math.abs(n.b.c-(t.b.c+t.b.b)),e.Math.abs(n.b.c+n.b.b-t.b.c))/r),a>n.b.a/2+t.b.a/2&&(c=1-e.Math.min(e.Math.abs(n.b.d-(t.b.d+t.b.a)),e.Math.abs(n.b.d+n.b.a-t.b.d))/a),(1-e.Math.min(i,c))*e.Math.sqrt(r*r+a*a)}function AGn(n){var t,e,i;for(wQn(n,n.e,n.f,(l0(),USt),!0,n.c,n.i),wQn(n,n.e,n.f,USt,!1,n.c,n.i),wQn(n,n.e,n.f,GSt,!0,n.c,n.i),wQn(n,n.e,n.f,GSt,!1,n.c,n.i),yGn(n,n.c,n.e,n.f,n.i),e=new N4(n.i,0);e.b=65;e--)dHt[e]=e-65<<24>>24;for(i=122;i>=97;i--)dHt[i]=i-97+26<<24>>24;for(r=57;r>=48;r--)dHt[r]=r-48+52<<24>>24;for(dHt[43]=62,dHt[47]=63,c=0;c<=25;c++)gHt[c]=65+c&D1n;for(a=26,u=0;a<=51;++a,u++)gHt[a]=97+u&D1n;for(n=52,o=0;n<=61;++n,o++)gHt[n]=48+o&D1n;gHt[62]=43,gHt[63]=47}function $Gn(n,t){var i,r,c,a,o,u;return(c=nun(n))==(u=nun(t))?n.e==t.e&&n.a<54&&t.a<54?n.ft.f?1:0:(r=n.e-t.e,(i=(n.d>0?n.d:e.Math.floor((n.a-1)*A0n)+1)-(t.d>0?t.d:e.Math.floor((t.a-1)*A0n)+1))>r+1?c:i0&&(o=j5(o,_qn(r))),Pvn(a,o))):cs&&(l=0,b+=u+t,u=0),tHn(a,l,b),i=e.Math.max(i,l+h.a),u=e.Math.max(u,h.b),l+=h.a+t;return new MO(i+t,b+u+t)}function RGn(n,t){var e,i,r,c,a,o,u;if(!h0(n))throw hv(new kM(Stt));if(c=(i=h0(n)).g,r=i.f,c<=0&&r<=0)return KQn(),FRt;switch(o=n.i,u=n.j,t.g){case 2:case 1:if(o<0)return KQn(),_Rt;if(o+n.g>c)return KQn(),kRt;break;case 4:case 3:if(u<0)return KQn(),yRt;if(u+n.f>r)return KQn(),KRt}return(a=(o+n.g/2)/c)+(e=(u+n.f/2)/r)<=1&&a-e<=0?(KQn(),_Rt):a+e>=1&&a-e>=0?(KQn(),kRt):e<.5?(KQn(),yRt):(KQn(),KRt)}function KGn(n,t,e,i,r){var c,a;if(c=Lgn(E3(t[0],L0n),E3(i[0],L0n)),n[0]=pz(c),c=$z(c,32),e>=r){for(a=1;a0&&(r.b[a++]=0,r.b[a++]=c.b[0]-1),t=1;t0&&(Qb(u,u.d-r.d),r.c==(_7(),$St)&&Vb(u,u.a-r.d),u.d<=0&&u.i>0&&s8(t,u,t.c.b,t.c));for(c=new Ww(n.f);c.a0&&(Jb(o,o.i-r.d),r.c==(_7(),$St)&&Wb(o,o.b-r.d),o.i<=0&&o.d>0&&s8(e,o,e.c.b,e.c))}function GGn(n,t,e,i,r){var c,a,o,u,s,h,f,l,b;for(hZ(),f$(n,new Bu),a=oG(n),b=new Zm,l=new Zm,o=null,u=0;0!=a.b;)c=uG(0==a.b?null:(MK(0!=a.b),Lrn(a,a.a.a)),163),!o||EX(o)*jX(o)/21&&(u>EX(o)*jX(o)/2||0==a.b)&&(f=new Jrn(l),h=EX(o)/jX(o),s=KJn(f,t,new Dk,e,i,r,h),JF(dL(f.e),s),o=f,mv(b.c,f),u=0,l.c.length=0));return Ohn(b,l),b}function qGn(n,t,e,i,r){var c,a,o,u,s,h,f;if(bS(),aW(n,"src"),aW(e,"dest"),f=Tbn(n),u=Tbn(e),yG(!!(4&f.i),"srcType is not an array"),yG(!!(4&u.i),"destType is not an array"),h=f.c,a=u.c,yG(1&h.i?h==a:!(1&a.i),"Array types don't match"),$fn(n,t,e,i,r),1&h.i||f==u)b$n(n,t,e,i,r,!0);else if(s=Kcn(n),c=Kcn(e),xA(n)===xA(e)&&ti;)uQ(c,o,s[--t]);else for(o=i+r;i0),i.a.Xb(i.c=--i.b),h>f+o&&LQ(i);for(c=new Ww(l);c.a0),i.a.Xb(i.c=--i.b)}}function VGn(){var n,t,e,i,r,c;if(QYn(),WHt)return WHt;for(TXn(n=new K3(4),kJn(iat,!0)),lWn(n,kJn("M",!0)),lWn(n,kJn("C",!0)),c=new K3(4),i=0;i<11;i++)HFn(c,i,i);return TXn(t=new K3(4),kJn("M",!0)),HFn(t,4448,4607),HFn(t,65438,65439),vzn(r=new QN(2),n),vzn(r,OHt),(e=new QN(2)).Jm(CX(c,kJn("L",!0))),e.Jm(t),e=new n8(3,e),e=new eW(r,e),WHt=e}function WGn(n,t){var e,i,r,c,a,o,u,s;for(e=new RegExp(t,"g"),u=Inn($ot,zZn,2,0,6,1),i=0,s=n,c=null;;){if(null==(o=e.exec(s))||""==s){u[i]=s;break}a=o.index,u[i]=(Knn(0,a,s.length),s.substr(0,a)),s=r1(s,a+o[0].length,s.length),e.lastIndex=0,c==s&&(u[i]=(Knn(0,1,s.length),s.substr(0,1)),s3(1,s.length+1),s=s.substr(1)),c=s,++i}if(n.length>0){for(r=u.length;r>0&&""==u[r-1];)--r;r0&&(l-=r[0]+n.c,r[0]+=n.c),r[2]>0&&(l-=r[2]+n.c),r[1]=e.Math.max(r[1],l),qX(n.a[1],i.c+t.b+r[0]-(r[1]-l)/2,r[1]);for(u=0,h=(a=n.a).length;u0?(n.n.c.length-1)*n.i:0,i=new Ww(n.n);i.a1)for(i=Fkn(r,0);i.b!=i.d.c;)for(c=0,o=new Ww((e=uG(I6(i),235)).e);o.a0&&(t[0]+=n.c,l-=t[0]),t[2]>0&&(l-=t[2]+n.c),t[1]=e.Math.max(t[1],l),XX(n.a[1],r.d+i.d+t[0]-(t[1]-l)/2,t[1]);else for(w=r.d+i.d,b=r.a-i.d-i.a,s=0,f=(o=n.a).length;s0||0==Fgn(c.b.d,n.b.d+n.b.a)&&r.b<0||0==Fgn(c.b.d+c.b.a,n.b.d)&&r.b>0){u=0;break}}else u=e.Math.min(u,LLn(n,c,r));u=e.Math.min(u,uqn(n,a,u,r))}return u}function sqn(n,t){var e,i,r,c,a,o;if(n.b<2)throw hv(new vM("The vector chain must contain at least a source and a target point."));for(MK(0!=n.b),MN(t,(i=uG(n.a.a.c,8)).a,i.b),o=new Zx((!t.a&&(t.a=new MD(eFt,t,5)),t.a)),c=Fkn(n,1);c.a=0&&c!=e)throw hv(new vM(Xet));for(r=0,u=0;uuM(oD(a.g,a.d[0]).a)?(MK(u.b>0),u.a.Xb(u.c=--u.b),pF(u,a),r=!0):o.e&&o.e.gc()>0&&(c=(!o.e&&(o.e=new Zm),o.e).Mc(t),s=(!o.e&&(o.e=new Zm),o.e).Mc(e),(c||s)&&((!o.e&&(o.e=new Zm),o.e).Fc(a),++a.c));r||mv(i.c,a)}function bqn(n,t,e){var i,r,c,a,o,u,s,h,f,l;return h=n.a.i+n.a.g/2,f=n.a.i+n.a.g/2,a=new MO(t.i+t.g/2,t.j+t.f/2),(u=uG(zDn(t,(XYn(),mDt)),8)).a=u.a+h,u.b=u.b+f,r=(a.b-u.b)/(a.a-u.a),i=a.b-r*a.a,o=new MO(e.i+e.g/2,e.j+e.f/2),(s=uG(zDn(e,mDt),8)).a=s.a+h,s.b=s.b+f,c=(o.b-s.b)/(o.a-s.a),l=(i-(o.b-c*o.a))/(c-r),!(u.a>>0).toString(16),t.length-2,t.length):n>=P0n?"\\v"+r1(t="0"+(n>>>0).toString(16),t.length-6,t.length):""+String.fromCharCode(n&D1n)}return e}function Tqn(n){var t,e,i;if(sN(uG(oIn(n,(jYn(),JMt)),101)))for(e=new Ww(n.j);e.a=t.o&&e.f<=t.f||.5*t.a<=e.f&&1.5*t.a>=e.f){if((c=uG(zq(t.n,t.n.c.length-1),209)).e+c.d+e.g+r<=i&&(uG(zq(t.n,t.n.c.length-1),209).f-n.f+e.f<=n.b||1==n.a.c.length))return ipn(t,e),!0;if(t.s+e.g<=i&&(t.t+t.d+e.f+r<=n.b||1==n.a.c.length))return kD(t.b,e),a=uG(zq(t.n,t.n.c.length-1),209),kD(t.n,new c0(t.s,a.f+a.a+t.i,t.i)),zMn(uG(zq(t.n,t.n.c.length-1),209),e),nqn(t,e),!0}return!1}function Pqn(n,t,e){var i,r,c,a;return n.Pj()?(r=null,c=n.Qj(),i=n.Ij(1,a=iin(n,t,e),e,t,c),n.Mj()&&!(n.Yi()&&null!=a?udn(a,e):xA(a)===xA(e))?(null!=a&&(r=n.Oj(a,r)),r=n.Nj(e,r),n.Tj()&&(r=n.Wj(a,e,r)),r?(r.nj(i),r.oj()):n.Jj(i)):(n.Tj()&&(r=n.Wj(a,e,r)),r?(r.nj(i),r.oj()):n.Jj(i)),a):(a=iin(n,t,e),n.Mj()&&!(n.Yi()&&null!=a?udn(a,e):xA(a)===xA(e))&&(r=null,null!=a&&(r=n.Oj(a,null)),(r=n.Nj(e,r))&&r.oj()),a)}function Cqn(n,t){var e,i,r,c;if(t.Ug("Path-Like Graph Wrapping",1),0!=n.b.c.length)if(null==(r=new dDn(n)).i&&(r.i=aun(r,new pc)),e=uM(r.i)*r.f/(null==r.i&&(r.i=aun(r,new pc)),uM(r.i)),r.b>e)t.Vg();else{switch(uG(oIn(n,(jYn(),BTt)),351).g){case 2:c=new kc;break;case 0:c=new hc;break;default:c=new yc}if(i=c.og(n,r),!c.pg())switch(uG(oIn(n,zTt),352).g){case 2:i=KLn(r,i);break;case 1:i=pPn(r,i)}kzn(n,r,i),t.Vg()}else t.Vg()}function Iqn(n,t){var i,r,c,a,o,u,s;t%=24,n.q.getHours()!=t&&((i=new e.Date(n.q.getTime())).setDate(i.getDate()+1),(o=n.q.getTimezoneOffset()-i.getTimezoneOffset())>0&&(u=o/60|0,s=o%60,r=n.q.getDate(),n.q.getHours()+u>=24&&++r,c=new e.Date(n.q.getFullYear(),n.q.getMonth(),r,t+u,n.q.getMinutes()+s,n.q.getSeconds(),n.q.getMilliseconds()),n.q.setTime(c.getTime()))),a=n.q.getTime(),n.q.setTime(a+36e5),n.q.getHours()!=t&&n.q.setTime(a)}function Oqn(n,t){var e,i,r,c;if(a3(n.d,n.e),n.c.a.$b(),0!=uM(pK(oIn(t.j,(jYn(),yyt))))||0!=uM(pK(oIn(t.j,yyt))))for(e=B3n,xA(oIn(t.j,Syt))!==xA((yvn(),Fjt))&&kfn(t.j,(GYn(),Bpt),(qx(),!0)),c=uG(oIn(t.j,OTt),17).a,r=0;r(u3(c+1,t.c.length),uG(t.c[c+1],17)).a-i&&++o,kD(r,(u3(c+o,t.c.length),uG(t.c[c+o],17))),a+=(u3(c+o,t.c.length),uG(t.c[c+o],17)).a-i,++e;e=g&&n.e[s.p]>w*n.b||v>=i*g)&&(mv(l.c,u),u=new Zm,Qon(o,a),a.a.$b(),h-=f,b=e.Math.max(b,h*n.b+d),h+=v,m=v,v=0,f=0,d=0);return new WO(b,l)}function $qn(n){var t,e,i,r,c;if(!n.d){if(c=new js,null==(t=V_t).a.zc(n,t)){for(e=new DD(n1(n));e.e!=e.i.gc();)CW(c,$qn(uG(Zkn(e),29)));t.a.Bc(n),t.a.gc()}for(r=c.i,!n.q&&(n.q=new fV(p_t,n,11,10)),i=new DD(n.q);i.e!=i.i.gc();++r)uG(Zkn(i),411);CW(c,(!n.q&&(n.q=new fV(p_t,n,11,10)),n.q)),lbn(c),n.d=new vL((uG(zrn(gZ((tQ(),M_t).o),9),19),c.i),c.g),n.e=uG(c.g,688),null==n.e&&(n.e=W_t),y9(n).b&=-17}return n.d}function Dqn(n,t,e,i){var r,c,a,o,u,s;if(s=VKn(n.e.Dh(),t),u=0,r=uG(n.g,124),PP(),uG(t,69).xk()){for(a=0;a1||-1==w)if(f=uG(d,71),l=uG(h,71),f.dc())l.$b();else for(a=!!lMn(t),c=0,o=n.a?f.Kc():f.Ii();o.Ob();)s=uG(o.Pb(),58),(r=uG(ain(n,s),58))?(a?-1==(u=l.dd(r))?l.Gi(c,r):c!=u&&l.Ui(c,r):l.Gi(c,r),++c):n.b&&!a&&(l.Gi(c,s),++c);else null==d?h.Wb(null):null==(r=ain(n,d))?n.b&&!lMn(t)&&h.Wb(d):h.Wb(r)}function Rqn(n,t){var i,r,c,a,o,u,s,f;for(i=new Ne,c=new Fz(ix(qgn(t).a.Kc(),new h));hDn(c);)if(!v9(r=uG(N9(c),18))&&_Pn(u=r.c.i,$bt)){if(-1==(f=U_n(n,u,$bt,Nbt)))continue;i.b=e.Math.max(i.b,f),!i.a&&(i.a=new Zm),kD(i.a,u)}for(o=new Fz(ix(Xgn(t).a.Kc(),new h));hDn(o);)if(!v9(a=uG(N9(o),18))&&_Pn(s=a.d.i,Nbt)){if(-1==(f=U_n(n,s,Nbt,$bt)))continue;i.d=e.Math.max(i.d,f),!i.c&&(i.c=new Zm),kD(i.c,s)}return i}function Kqn(n,t,e,i){var r,c,a,o,u,s,h;if(e.d.i!=t.i){for(Hb(r=new gMn(n),(zIn(),wbt)),kfn(r,(GYn(),rmt),e),kfn(r,(jYn(),JMt),($Pn(),cRt)),mv(i.c,r),o2(a=new lOn,r),NLn(a,(KQn(),_Rt)),o2(o=new lOn,r),NLn(o,kRt),h=e.d,u2(e,a),zsn(c=new UZ,e),kfn(c,bMt,null),c2(c,o),u2(c,h),s=new N4(e.b,0);s.b1e6)throw hv(new wM("power of ten too big"));if(n<=vZn)return D9(t$n(Got[1],t),t);for(r=i=t$n(Got[1],vZn),e=Bsn(n-vZn),t=t0(n%vZn);dwn(e,vZn)>0;)r=j5(r,i),e=$gn(e,vZn);for(r=D9(r=j5(r,t$n(Got[1],t)),vZn),e=Bsn(n-vZn);dwn(e,vZn)>0;)r=D9(r,vZn),e=$gn(e,vZn);return r=D9(r,t)}function Bqn(n){var t,e,i,r,c,a,o,u;for(a=new Ww(n.a);a.as&&i>s)){r=!1,e._g()&&e.bh("bk node placement breaks on "+o+" which should have been after "+h);break}h=o,s=uM(t.p[o.p])+uM(t.d[o.p])+o.o.b+o.d.a}if(!r)break}return e._g()&&e.bh(t+" is feasible: "+r),r}function Xqn(n,t,e,i){var r,c,a,o,u,s,h;if(Hb(c=new gMn(n),(zIn(),gbt)),kfn(c,(jYn(),JMt),($Pn(),cRt)),r=0,t){for(kfn(a=new lOn,(GYn(),rmt),t),kfn(c,rmt,t.i),NLn(a,(KQn(),_Rt)),o2(a,c),s=0,h=(u=x4(t.e)).length;s0)){if(r=-1,32==VJ(h.c,0)){if(f=s[0],win(t,s),s[0]>f)continue}else if(WZ(t,h.c,s[0])){s[0]+=h.c.length;continue}return 0}if(r<0&&h.a&&(r=u,c=s[0],i=0),r>=0){if(o=h.b,u==r&&0==(o-=i++))return 0;if(!rJn(t,s,h,o,a)){u=r-1,s[0]=c;continue}}else if(r=-1,!rJn(t,s,h,0,a))return 0}return LQn(a,e)?s[0]:0}function Qqn(n,t,e){var i,r,c,a,o,u,s,h,f,l;for(h=new Kz(new Fd(e)),zV(o=Inn(ZHt,B2n,28,n.f.e.c.length,16,1),o.length),e[t.a]=0,s=new Ww(n.f.e);s.a=0&&!eTn(n,h,f);)--f;r[h]=f}for(b=0;b=0&&!eTn(n,o,w);)--o;c[w]=o}for(u=0;ut[l]&&li[u]&&HBn(n,u,l,!1,!0)}function Yqn(n){var t,e,i,r,c,a,o,u;e=oM(gK(oIn(n,(rGn(),yft)))),c=n.a.c.d,o=n.a.d.d,e?(a=vD(YF(new MO(o.a,o.b),c),.5),u=vD(D$(n.e),.5),t=YF(JF(new MO(c.a,c.b),a),u),_R(n.d,t)):(r=uM(pK(oIn(n.a,Fft))),i=n.d,c.a>=o.a?c.b>=o.b?(i.a=o.a+(c.a-o.a)/2+r,i.b=o.b+(c.b-o.b)/2-r-n.e.b):(i.a=o.a+(c.a-o.a)/2+r,i.b=c.b+(o.b-c.b)/2+r):c.b>=o.b?(i.a=c.a+(o.a-c.a)/2+r,i.b=o.b+(c.b-o.b)/2+r):(i.a=c.a+(o.a-c.a)/2+r,i.b=c.b+(o.b-c.b)/2-r-n.e.b))}function Zqn(n){var t,e,i,r,c,a;if(!n.f){if(a=new Ms,c=new Ms,null==(t=V_t).a.zc(n,t)){for(r=new DD(n1(n));r.e!=r.i.gc();)CW(a,Zqn(uG(Zkn(r),29)));t.a.Bc(n),t.a.gc()}for(!n.s&&(n.s=new fV(o_t,n,21,17)),i=new DD(n.s);i.e!=i.i.gc();)F$(e=uG(Zkn(i),179),102)&&ttn(c,uG(e,19));lbn(c),n.r=new JG(n,(uG(zrn(gZ((tQ(),M_t).o),6),19),c.i),c.g),CW(a,n.r),lbn(a),n.f=new vL((uG(zrn(gZ(M_t.o),5),19),a.i),a.g),y9(n).b&=-3}return n.f}function nXn(n){hP(n,new hCn(FT(DT(KT(RT(new bu,$3n),"ELK DisCo"),"Layouter for arranging unconnected subgraphs. The subgraphs themselves are, by default, not laid out."),new ct))),U4(n,$3n,D3n,Jkn(ift)),U4(n,$3n,x3n,Jkn(Jht)),U4(n,$3n,R3n,Jkn(Xht)),U4(n,$3n,K3n,Jkn(Yht)),U4(n,$3n,D2n,Jkn(tft)),U4(n,$3n,x2n,Jkn(nft)),U4(n,$3n,$2n,Jkn(eft)),U4(n,$3n,R2n,Jkn(Zht)),U4(n,$3n,I3n,Jkn(Vht)),U4(n,$3n,O3n,Jkn(zht)),U4(n,$3n,A3n,Jkn(Wht)),U4(n,$3n,L3n,Jkn(Qht))}function tXn(){tXn=E,JKt=Uhn(cT(JHt,1),N1n,28,15,[48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,70]),YKt=new RegExp("[ \t\n\r\f]+");try{QKt=Uhn(cT(iBt,1),EZn,2114,0,[new Km((wL(),Cmn("yyyy-MM-dd'T'HH:mm:ss'.'SSSZ",bF((qy(),qy(),Hat))))),new Km(Cmn("yyyy-MM-dd'T'HH:mm:ss'.'SSS",bF(Hat))),new Km(Cmn("yyyy-MM-dd'T'HH:mm:ss",bF(Hat))),new Km(Cmn("yyyy-MM-dd'T'HH:mm",bF(Hat))),new Km(Cmn("yyyy-MM-dd",bF(Hat)))])}catch(n){if(!F$(n=Ehn(n),82))throw hv(n)}}function eXn(n,t){var e,i,r;if(i=0!=uRn(n.d,1),0==rHn(n,t)&&oM(gK(oIn(t.j,(GYn(),Bpt)))))return 0;!oM(gK(oIn(t.j,(GYn(),Bpt))))&&!oM(gK(oIn(t.j,mmt)))||xA(oIn(t.j,(jYn(),Syt)))===xA((yvn(),Fjt))?t.c.mg(t.e,i):i=oM(gK(oIn(t.j,Bpt))),PKn(n,t,i,!0),oM(gK(oIn(t.j,mmt)))&&kfn(t.j,mmt,(qx(),!1)),oM(gK(oIn(t.j,Bpt)))&&(kfn(t.j,Bpt,(qx(),!1)),kfn(t.j,mmt,!0)),e=rHn(n,t);do{if(Gon(n),0==e)return 0;r=e,PKn(n,t,i=!i,!1),e=rHn(n,t)}while(r>e);return r}function iXn(n,t){var e,i,r;if(i=0!=uRn(n.d,1),0==BAn(n,t)&&oM(gK(oIn(t.j,(GYn(),Bpt)))))return 0;!oM(gK(oIn(t.j,(GYn(),Bpt))))&&!oM(gK(oIn(t.j,mmt)))||xA(oIn(t.j,(jYn(),Syt)))===xA((yvn(),Fjt))?t.c.mg(t.e,i):i=oM(gK(oIn(t.j,Bpt))),PKn(n,t,i,!0),oM(gK(oIn(t.j,mmt)))&&kfn(t.j,mmt,(qx(),!1)),oM(gK(oIn(t.j,Bpt)))&&(kfn(t.j,Bpt,(qx(),!1)),kfn(t.j,mmt,!0)),e=BAn(n,t);do{if(Gon(n),0==e)return 0;r=e,PKn(n,t,i=!i,!1),e=BAn(n,t)}while(r>e);return r}function rXn(n,t,i,r){var c,a,o,u,s,h,f,l,b;return h=(s=YF(new MO(i.a,i.b),n)).a*t.b-s.b*t.a,f=t.a*r.b-t.b*r.a,l=(s.a*r.b-s.b*r.a)/f,b=h/f,0==f?0==h?(a=atn(n,c=JF(new MO(i.a,i.b),vD(new MO(r.a,r.b),.5))),o=atn(JF(new MO(n.a,n.b),t),c),u=.5*e.Math.sqrt(r.a*r.a+r.b*r.b),a=0&&l<=1&&b>=0&&b<=1?JF(new MO(n.a,n.b),vD(new MO(t.a,t.b),l)):null}function cXn(n,t,e){var i,r,c,a,o;if(i=uG(oIn(n,(jYn(),Pyt)),21),e.a>t.a&&(i.Hc((ZSn(),VNt))?n.c.a+=(e.a-t.a)/2:i.Hc(QNt)&&(n.c.a+=e.a-t.a)),e.b>t.b&&(i.Hc((ZSn(),YNt))?n.c.b+=(e.b-t.b)/2:i.Hc(JNt)&&(n.c.b+=e.b-t.b)),uG(oIn(n,(GYn(),Hpt)),21).Hc((r_n(),tpt))&&(e.a>t.a||e.b>t.b))for(o=new Ww(n.a);o.at.a&&(i.Hc((ZSn(),VNt))?n.c.a+=(e.a-t.a)/2:i.Hc(QNt)&&(n.c.a+=e.a-t.a)),e.b>t.b&&(i.Hc((ZSn(),YNt))?n.c.b+=(e.b-t.b)/2:i.Hc(JNt)&&(n.c.b+=e.b-t.b)),uG(oIn(n,(GYn(),Hpt)),21).Hc((r_n(),tpt))&&(e.a>t.a||e.b>t.b))for(a=new Ww(n.a);a.a0?n.i:0)>t&&s>0&&(a=0,o+=s+n.i,c=e.Math.max(c,b),r+=s+n.i,s=0,b=0,i&&(++l,kD(n.n,new c0(n.s,o,n.i))),u=0),b+=h.g+(u>0?n.i:0),s=e.Math.max(s,h.f),i&&zMn(uG(zq(n.n,l),209),h),a+=h.g+(u>0?n.i:0),++u;return c=e.Math.max(c,b),r+=s,i&&(n.r=c,n.d=r,ijn(n.j)),new gY(n.s,n.t,c,r)}function sXn(n){var t,i,r,c,a,o,u,s,h,f,l;for(n.b=!1,f=M0n,u=T0n,l=M0n,s=T0n,i=n.e.a.ec().Kc();i.Ob();)for(r=(t=uG(i.Pb(),272)).a,f=e.Math.min(f,r.c),u=e.Math.max(u,r.c+r.b),l=e.Math.min(l,r.d),s=e.Math.max(s,r.d+r.a),a=new Ww(t.c);a.an.o.a&&(f=(s-n.o.a)/2,u.b=e.Math.max(u.b,f),u.c=e.Math.max(u.c,f))}}function wXn(n){var t,e,i,r,c,a;for(YL(r=new r4,(Whn(),YLt)),i=new Jw(new IM(new JE(n,Yon(n,Inn($ot,zZn,2,0,6,1))).b));i.bo?1:-1:Hln(n.a,t.a,c)))f=-u,h=a==u?t7(t.a,o,n.a,c):Cnn(t.a,o,n.a,c);else if(f=a,a==u){if(0==r)return cHn(),_ot;h=t7(n.a,c,t.a,o)}else h=Cnn(n.a,c,t.a,o);return K4(s=new VV(f,h.length,h)),s}function vXn(n,t){var e,i,r;if(r=PGn(t),!t.c&&(t.c=new fV(wFt,t,9,9)),kS(new fX(null,(!t.c&&(t.c=new fV(wFt,t,9,9)),new h3(t.c,16))),new Jd(r)),CWn(t,i=uG(oIn(r,(GYn(),Hpt)),21)),i.Hc((r_n(),tpt)))for(e=new DD((!t.c&&(t.c=new fV(wFt,t,9,9)),t.c));e.e!=e.i.gc();)pQn(n,t,r,uG(Zkn(e),123));return 0!=uG(zDn(t,(jYn(),DMt)),181).gc()&&u_n(t,r),oM(gK(oIn(r,HMt)))&&i.Fc(apt),vR(r,fTt)&&iM(new omn(uM(pK(oIn(r,fTt)))),r),xA(zDn(t,rMt))===xA((Own(),Ixt))?UYn(n,t,r):dYn(n,t,r),r}function kXn(n){var t,e,i,r,c,a,o;for(i=new Ww(n.b);i.a0?r1(e.a,0,c-1):"":(Knn(0,c-1,n.length),n.substr(0,c-1)):e?e.a:n}function MXn(n,t){var e,i,r,c,a,o,u;for(t.Ug("Sort By Input Model "+oIn(n,(jYn(),Syt)),1),r=0,i=new Ww(n.b);i.a=n.b.length?(c[r++]=a.b[i++],c[r++]=a.b[i++]):i>=a.b.length?(c[r++]=n.b[e++],c[r++]=n.b[e++]):a.b[i]0?n.i:0)),++t;for(dgn(n.n,s),n.d=i,n.r=r,n.g=0,n.f=0,n.e=0,n.o=M0n,n.p=M0n,a=new Ww(n.b);a.a0&&(!(r=(!n.n&&(n.n=new fV(lFt,n,1,7)),uG(zrn(n.n,0),135)).a)||JA(JA((t.a+=' "',t),r),'"'))),!n.b&&(n.b=new f_(cFt,n,4,7)),e=!(n.b.i<=1&&(!n.c&&(n.c=new f_(cFt,n,5,8)),n.c.i<=1)),t.a+=e?" [":" ",JA(t,KD(new FM,new DD(n.b))),e&&(t.a+="]"),t.a+=Y4n,e&&(t.a+="["),JA(t,KD(new FM,new DD(n.c))),e&&(t.a+="]"),t.a)}function PXn(n,t){var e,i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y,M,T,j,E;for(k=n.c,y=t.c,e=Ten(k.a,n,0),i=Ten(y.a,t,0),m=uG(jmn(n,(can(),Vjt)).Kc().Pb(),12),j=uG(jmn(n,Wjt).Kc().Pb(),12),v=uG(jmn(t,Vjt).Kc().Pb(),12),E=uG(jmn(t,Wjt).Kc().Pb(),12),g=x4(m.e),M=x4(j.g),p=x4(v.e),T=x4(E.g),$jn(n,i,y),s=0,b=(c=p).length;sh?new A2((_7(),DSt),i,t,s-h):s>0&&h>0&&(new A2((_7(),DSt),t,i,0),new A2(DSt,i,t,0))),a)}function AXn(n,t,e){var i,r,c;for(n.a=new Zm,c=Fkn(t.b,0);c.b!=c.d.c;){for(r=uG(I6(c),40);uG(oIn(r,(QGn(),ACt)),17).a>n.a.c.length-1;)kD(n.a,new WO(B3n,G9n));i=uG(oIn(r,ACt),17).a,e==(xdn(),JDt)||e==YDt?(r.e.auM(pK(uG(zq(n.a,i),42).b))&&sw(uG(zq(n.a,i),42),r.e.a+r.f.a)):(r.e.buM(pK(uG(zq(n.a,i),42).b))&&sw(uG(zq(n.a,i),42),r.e.b+r.f.b))}}function LXn(n,t,e,i){var r,c,a,o,u,s;if(c=pgn(i),!oM(gK(oIn(i,(jYn(),jMt))))&&!oM(gK(oIn(n,uMt)))||sN(uG(oIn(n,JMt),101)))switch(o2(o=new lOn,n),t?((s=o.n).a=t.a-n.n.a,s.b=t.b-n.n.b,DOn(s,0,0,n.o.a,n.o.b),NLn(o,ZUn(o,c))):(r=Ipn(c),NLn(o,e==(can(),Wjt)?r:Gdn(r))),a=uG(oIn(i,(GYn(),Hpt)),21),u=o.j,c.g){case 2:case 1:(u==(KQn(),yRt)||u==KRt)&&a.Fc((r_n(),cpt));break;case 4:case 3:(u==(KQn(),kRt)||u==_Rt)&&a.Fc((r_n(),cpt))}else r=Ipn(c),o=XUn(n,e,e==(can(),Wjt)?r:Gdn(r));return o}function NXn(n,t){var i,r,c,a,o;for(o=new bsn(new Nw(n.f.b).a);o.b;){if(c=uG((a=von(o)).ld(),602),1==t){if(c.Af()!=(xdn(),nxt)&&c.Af()!=QDt)continue}else if(c.Af()!=(xdn(),JDt)&&c.Af()!=YDt)continue;switch(r=uG(uG(a.md(),42).b,86),i=uG(uG(a.md(),42).a,194).c,c.Af().g){case 2:r.g.c=n.e.a,r.g.b=e.Math.max(1,r.g.b+i);break;case 1:r.g.c=r.g.c+i,r.g.b=e.Math.max(1,r.g.b-i);break;case 4:r.g.d=n.e.b,r.g.a=e.Math.max(1,r.g.a+i);break;case 3:r.g.d=r.g.d+i,r.g.a=e.Math.max(1,r.g.a-i)}}}function $Xn(n,t){var i,r,c,a,o,u,s,h,f,l,b,w,d,g;for(u=Inn(YHt,W1n,28,t.b.c.length,15,1),h=Inn(vbt,p1n,273,t.b.c.length,0,1),s=Inn(pbt,e6n,10,t.b.c.length,0,1),b=0,w=(l=n.a).length;b0&&s[r]&&(d=y$(n.b,s[r],c)),g=e.Math.max(g,c.c.c.b+d);for(a=new Ww(f.e);a.a1)throw hv(new vM(dct));u||(c=R5(t,i.Kc().Pb()),a.Fc(c))}return bfn(n,sAn(n,t,e),a)}function BXn(n,t,e){var i,r,c,a,o,u,s;if(EFn(n.e,t))PP(),C$n((o=uG(t,69).xk()?new Cq(t,n):new OA(t,n)).c,o.b),K$(o,uG(e,16));else{for(s=VKn(n.e.Dh(),t),i=uG(n.g,124),c=0;c"}null!=u&&(t.a+=""+u)}else n.e?null!=(o=n.e.zb)&&(t.a+=""+o):(t.a+="?",n.b?(t.a+=" super ",qXn(n.b,t)):n.f&&(t.a+=" extends ",qXn(n.f,t)))}function XXn(n){n.b=null,n.a=null,n.o=null,n.q=null,n.v=null,n.w=null,n.B=null,n.p=null,n.Q=null,n.R=null,n.S=null,n.T=null,n.U=null,n.V=null,n.W=null,n.bb=null,n.eb=null,n.ab=null,n.H=null,n.db=null,n.c=null,n.d=null,n.f=null,n.n=null,n.r=null,n.s=null,n.u=null,n.G=null,n.J=null,n.e=null,n.j=null,n.i=null,n.g=null,n.k=null,n.t=null,n.F=null,n.I=null,n.L=null,n.M=null,n.O=null,n.P=null,n.$=null,n.N=null,n.Z=null,n.cb=null,n.K=null,n.D=null,n.A=null,n.C=null,n._=null,n.fb=null,n.X=null,n.Y=null,n.gb=!1,n.hb=!1}function zXn(n){var t,i,r,c;if(r=bYn((!n.c&&(n.c=j2(Bsn(n.f))),n.c),0),0==n.e||0==n.a&&-1!=n.f&&n.e<0)return r;if(t=nun(n)<0?1:0,i=n.e,r.length,e.Math.abs(t0(n.e)),c=new QM,1==t&&(c.a+="-"),n.e>0)if((i-=r.length-t)>=0){for(c.a+="0.";i>Pot.length;i-=Pot.length)Xq(c,Pot);lF(c,Pot,t0(i)),JA(c,(s3(t,r.length+1),r.substr(t)))}else JA(c,r1(r,t,t0(i=t-i))),c.a+=".",JA(c,sQ(r,t0(i)));else{for(JA(c,(s3(t,r.length+1),r.substr(t)));i<-Pot.length;i+=Pot.length)Xq(c,Pot);lF(c,Pot,t0(-i))}return c.a}function VXn(n){var t,e,i,r,c;if(n.k!=(zIn(),dbt))return!1;if(n.j.c.length<=1)return!1;if(uG(oIn(n,(jYn(),JMt)),101)==($Pn(),cRt))return!1;if(Yyn(),(i=(n.q?n.q:(hZ(),hZ(),Vot))._b(LMt)?uG(oIn(n,LMt),203):uG(oIn(HQ(n),NMt),203))==djt)return!1;if(i!=wjt&&i!=bjt){if(r=uM(pK(Omn(n,ITt))),!(t=uG(oIn(n,CTt),140))&&(t=new OF(r,r,r,r)),c=Dgn(n,(KQn(),_Rt)),t.d+t.a+(c.gc()-1)*r>n.o.b)return!1;if(e=Dgn(n,kRt),t.d+t.a+(e.gc()-1)*r>n.o.b)return!1}return!0}function WXn(n,t){var e,i,r,c,a,o,u,s,h,f,l,b,w,d;t.Ug("Orthogonal edge routing",1),s=uM(pK(oIn(n,(jYn(),STt)))),e=uM(pK(oIn(n,gTt))),i=uM(pK(oIn(n,vTt))),l=new NW(0,e),d=0,a=new N4(n.b,0),o=null,h=null,u=null,f=null;do{f=(h=a.b0?(b=(w-1)*e,o&&(b+=i),h&&(b+=i),bt||oM(gK(zDn(o,(S_n(),nAt)))))&&(r=0,c+=s.b+e,mv(h.c,s),fan(s=new e4(c,e),i=new dln(0,s.f,s,e)),r=0),0==i.b.c.length||!oM(gK(zDn(R0(o),(S_n(),uAt))))&&(o.f>=i.o&&o.f<=i.f||.5*i.a<=o.f&&1.5*i.a>=o.f)?ipn(i,o):(fan(s,a=new dln(i.s+i.r+e,s.f,s,e)),ipn(a,o)),r=o.i+o.g;return mv(h.c,s),h}function uzn(n){var t,e,i,r;if(!(null==n.b||n.b.length<=2||n.a)){for(t=0,r=0;r=n.b[r+1])r+=2;else{if(!(e0)for(i=new Z_(uG(Y9(n.a,c),21)),hZ(),f$(i,new Gd(t)),r=new N4(c.b,0);r.b0&&i>=-6?i>=0?Ex(c,e-t0(n.e),String.fromCharCode(46)):(psn(c,t-1,t-1,"0."),Ex(c,t+1,mvn(Pot,0,-t0(i)-1))):(e-t>=1&&(Ex(c,t,String.fromCharCode(46)),++e),Ex(c,e,String.fromCharCode(69)),i>0&&Ex(c,++e,String.fromCharCode(43)),Ex(c,++e,""+oV(Bsn(i)))),n.g=c.a,n.g))}function dzn(n,t){var i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y,M,T;r=uM(pK(oIn(t,(jYn(),AMt)))),l=4,c=3,M=20/(y=uG(oIn(t,OTt),17).a),b=!1,s=0,o=vZn;do{for(a=1!=s,f=0!=s,T=0,m=0,k=(g=n.a).length;my)?(s=2,o=vZn):0==s?(s=1,o=T):(s=0,o=T):(b=T>=o||o-T0?1:KL(isNaN(r),isNaN(0)))>=0^(oan(I9n),(e.Math.abs(u)<=I9n||0==u||isNaN(u)&&isNaN(0)?0:u<0?-1:u>0?1:KL(isNaN(u),isNaN(0)))>=0)?e.Math.max(u,r):(oan(I9n),(e.Math.abs(r)<=I9n||0==r||isNaN(r)&&isNaN(0)?0:r<0?-1:r>0?1:KL(isNaN(r),isNaN(0)))>0?e.Math.sqrt(u*u+r*r):-e.Math.sqrt(u*u+r*r))}function vzn(n,t){var e,i,r,c,a;if(t)if(!n.a&&(n.a=new ck),2!=n.e)if(1!=t.e)0!=(a=n.a.a.c.length)?0!=(c=uG(DQ(n.a,a-1),122)).e&&10!=c.e||0!=t.e&&10!=t.e?zv(n.a,t):(0==t.e||t.Mm().length,0==c.e?(e=new VM,(i=c.Km())>=P0n?VA(e,Ogn(i)):TQ(e,i&D1n),c=new F1(10,null,0),GV(n.a,c,a-1)):(c.Mm().length,VA(e=new VM,c.Mm())),0==t.e?(i=t.Km())>=P0n?VA(e,Ogn(i)):TQ(e,i&D1n):VA(e,t.Mm()),uG(c,530).b=e.a):zv(n.a,t);else for(r=0;r1&&(u=s.Hg(u,n.a,o));return 1==u.c.length?uG(zq(u,u.c.length-1),238):2==u.c.length?tzn((u3(0,u.c.length),uG(u.c[0],238)),(u3(1,u.c.length),uG(u.c[1],238)),a,c):null}function Ezn(n,t,e){var i,r,c,a,o,u,s;for(e.Ug("Find roots",1),n.a.c.length=0,r=Fkn(t.b,0);r.b!=r.d.c;)0==(i=uG(I6(r),40)).b.b&&(kfn(i,(OQn(),UPt),(qx(),!0)),kD(n.a,i));switch(n.a.c.length){case 0:kfn(c=new wln(0,t,"DUMMY_ROOT"),(OQn(),UPt),(qx(),!0)),kfn(c,jPt,!0),aq(t.b,c);break;case 1:break;default:for(a=new wln(0,t,H9n),u=new Ww(n.a);u.a=e.Math.abs(r.b)?(r.b=0,a.d+a.a>o.d&&a.do.c&&a.c0){if(t=new AA(n.i,n.g),c=(e=n.i)<100?null:new cj(e),n.Tj())for(i=0;i0){for(o=n.g,s=n.i,V9(n),c=s<100?null:new cj(s),i=0;i>13|(15&n.m)<<9,r=n.m>>4&8191,c=n.m>>17|(255&n.h)<<5,a=(1048320&n.h)>>8,g=i*(o=8191&t.l),p=r*o,m=c*o,v=a*o,0!=(u=t.l>>13|(15&t.m)<<9)&&(g+=e*u,p+=i*u,m+=r*u,v+=c*u),0!=(s=t.m>>4&8191)&&(p+=e*s,m+=i*s,v+=r*s),0!=(h=t.m>>17|(255&t.h)<<5)&&(m+=e*h,v+=i*h),0!=(f=(1048320&t.h)>>8)&&(v+=e*f),b=((d=e*o)>>22)+(g>>9)+((262143&p)<<4)+((31&m)<<17),w=(p>>18)+(m>>5)+((4095&v)<<8),w+=(b+=(l=(d&f0n)+((511&g)<<13))>>22)>>22,p$(l&=f0n,b&=f0n,w&=l0n)}function Azn(n){var t,i,r,c,a,o,u;if(0!=(u=uG(zq(n.j,0),12)).g.c.length&&0!=u.e.c.length)throw hv(new kM("Interactive layout does not support NORTH/SOUTH ports with incoming _and_ outgoing edges."));if(0!=u.g.c.length){for(a=M0n,i=new Ww(u.g);i.a4){if(!n.fk(t))return!1;if(n.al()){if(o=(e=(i=uG(t,54)).Eh())==n.e&&(n.ml()?i.yh(i.Fh(),n.il())==n.jl():-1-i.Fh()==n.Lj()),n.nl()&&!o&&!e&&i.Jh())for(r=0;r0&&nAn(n,o,h);for(r=new Ww(h);r.an.d[r.p]&&(e+=J8(n.b,i)*uG(a.b,17).a,A6(n.a,xwn(i)));for(;!LM(n.a);)lin(n.b,uG(xV(n.a),17).a)}return e}function Dzn(n,t){var e,i,r,c,a,o,u,s,h,f;if(h=uG(oIn(n,(GYn(),Fpt)),64),i=uG(zq(n.j,0),12),h==(KQn(),yRt)?NLn(i,KRt):h==KRt&&NLn(i,yRt),uG(oIn(t,(jYn(),DMt)),181).Hc((Qmn(),JRt))){if(u=uM(pK(oIn(n,TTt))),s=uM(pK(oIn(n,jTt))),a=uM(pK(oIn(n,yTt))),(o=uG(oIn(t,nTt),21)).Hc((eNn(),wRt)))for(e=s,f=n.o.a/2-i.n.a,c=new Ww(i.f);c.a0&&(s=n.n.a/c);break;case 2:case 4:(r=n.i.o.b)>0&&(s=n.n.b/r)}kfn(n,(GYn(),bmt),s)}if(u=n.o,a=n.a,i)a.a=i.a,a.b=i.b,n.d=!0;else if(t!=uRt&&t!=sRt&&o!=FRt)switch(o.g){case 1:a.a=u.a/2;break;case 2:a.a=u.a,a.b=u.b/2;break;case 3:a.a=u.a/2,a.b=u.b;break;case 4:a.b=u.b/2}else a.a=u.a/2,a.b=u.b/2}function _zn(n){var t,e,i,r,c,a,o,u,s,h;if(n.Pj())if(h=n.Ej(),u=n.Qj(),h>0)if(t=new Hun(n.pj()),c=(e=h)<100?null:new cj(e),QK(n,e,t.g),r=1==e?n.Ij(4,zrn(t,0),null,0,u):n.Ij(6,t,null,-1,u),n.Mj()){for(i=new DD(t);i.e!=i.i.gc();)c=n.Oj(Zkn(i),c);c?(c.nj(r),c.oj()):n.Jj(r)}else c?(c.nj(r),c.oj()):n.Jj(r);else QK(n,n.Ej(),n.Fj()),n.Jj(n.Ij(6,(hZ(),zot),null,-1,u));else if(n.Mj())if((h=n.Ej())>0){for(o=n.Fj(),s=h,QK(n,h,o),c=s<100?null:new cj(s),i=0;i1&&EX(a)*jX(a)/2>o[0]){for(c=0;co[c];)++c;f=new Jrn(new C2(b,0,c+1)),h=EX(a)/jX(a),u=KJn(f,t,new Dk,e,i,r,h),JF(dL(f.e),u),kG(_Cn(l,f),D0n),_jn(l,new C2(b,c+1,b.c.length)),b.c.length=0,s=0,zX(o,o.length,0)}else null!=(0==l.b.c.length?null:zq(l.b,0))&&Con(l,0),s>0&&(o[s]=o[s-1]),o[s]+=EX(a)*jX(a),++s,mv(b.c,a);return b}function Hzn(n,t){var e,i,r,c;c=new Z_((e=t.b).j),r=0,(i=e.j).c.length=0,mW(uG(ssn(n.b,(KQn(),yRt),(gon(),Sdt)),15),e),r=cMn(c,r,new Br,i),mW(uG(ssn(n.b,yRt,Edt),15),e),r=cMn(c,r,new $r,i),mW(uG(ssn(n.b,yRt,jdt),15),e),mW(uG(ssn(n.b,kRt,Sdt),15),e),mW(uG(ssn(n.b,kRt,Edt),15),e),r=cMn(c,r,new Hr,i),mW(uG(ssn(n.b,kRt,jdt),15),e),mW(uG(ssn(n.b,KRt,Sdt),15),e),r=cMn(c,r,new Ur,i),mW(uG(ssn(n.b,KRt,Edt),15),e),r=cMn(c,r,new Gr,i),mW(uG(ssn(n.b,KRt,jdt),15),e),mW(uG(ssn(n.b,_Rt,Sdt),15),e),r=cMn(c,r,new Rr,i),mW(uG(ssn(n.b,_Rt,Edt),15),e),mW(uG(ssn(n.b,_Rt,jdt),15),e)}function Uzn(n,t,e){var i,r,c,a,o,u,s,h,f,l,b;for(o=new Ww(t);o.a.5?p-=2*a*(w-.5):w<.5&&(p+=2*c*(.5-w)),p<(r=o.d.b)&&(p=r),d=o.d.c,p>g.a-d-h&&(p=g.a-d-h),o.n.a=t+p}}function Wzn(n){var t,e,i;if((e=uG(oIn(n,(jYn(),gMt)),171))==(Gpn(),Imt)){for(t=new Fz(ix(qgn(n).a.Kc(),new h));hDn(t);)if(!F9(uG(N9(t),18)))throw hv(new jM(y6n+ZTn(n)+"' has its layer constraint set to FIRST_SEPARATE, but has at least one incoming edge. FIRST_SEPARATE nodes must not have incoming edges."))}else if(e==Amt)for(i=new Fz(ix(Xgn(n).a.Kc(),new h));hDn(i);)if(!F9(uG(N9(i),18)))throw hv(new jM(y6n+ZTn(n)+"' has its layer constraint set to LAST_SEPARATE, but has at least one outgoing edge. LAST_SEPARATE nodes must not have outgoing edges."))}function Qzn(n,t){var e,i,r,c,a,o,u,s,h,f,l,b,w;if(n.e&&n.c.c>19&&(t=gfn(t),u=!u),a=kRn(t),c=!1,r=!1,i=!1,n.h==b0n&&0==n.m&&0==n.l){if(r=!0,c=!0,-1!=a)return o=gDn(n,a),u&&Yfn(o),e&&(Qat=p$(0,0,0)),o;n=LL((tin(),Jat)),i=!0,u=!u}else n.h>>19&&(c=!0,n=gfn(n),i=!0,u=!u);return-1!=a?nln(n,a,u,c,e):yEn(n,t)<0?(e&&(Qat=c?gfn(n):p$(n.l,n.m,n.h)),p$(0,0,0)):gUn(i?n:p$(n.l,n.m,n.h),t,u,c,r,e)}function Zzn(n,t){var e,i,r,c,a,o,u,s,h,f,l,b,w;if(a=n.e,u=t.e,0==a)return t;if(0==u)return n;if((c=n.d)+(o=t.d)==2)return e=E3(n.a[0],L0n),i=E3(t.a[0],L0n),a==u?(w=pz(h=Lgn(e,i)),0==(b=pz(Dz(h,32)))?new Z5(a,w):new VV(a,2,Uhn(cT(YHt,1),W1n,28,15,[w,b]))):(cHn(),BA(a<0?$gn(i,e):$gn(e,i),0)?Rmn(a<0?$gn(i,e):$gn(e,i)):hW(Rmn(Men(a<0?$gn(i,e):$gn(e,i)))));if(a==u)l=a,f=c>=o?Cnn(n.a,c,t.a,o):Cnn(t.a,o,n.a,c);else{if(0==(r=c!=o?c>o?1:-1:Hln(n.a,t.a,c)))return cHn(),_ot;1==r?(l=a,f=t7(n.a,c,t.a,o)):(l=u,f=t7(t.a,o,n.a,c))}return K4(s=new VV(l,f.length,f)),s}function nVn(n,t){var e,i,r,c,a,o,u;if(!(n.g>t.f||t.g>n.f)){for(e=0,i=0,a=n.w.a.ec().Kc();a.Ob();)r=uG(a.Pb(),12),Wbn(Gfn(Uhn(cT(PNt,1),zZn,8,0,[r.i.n,r.n,r.a])).b,t.g,t.f)&&++e;for(o=n.r.a.ec().Kc();o.Ob();)r=uG(o.Pb(),12),Wbn(Gfn(Uhn(cT(PNt,1),zZn,8,0,[r.i.n,r.n,r.a])).b,t.g,t.f)&&--e;for(u=t.w.a.ec().Kc();u.Ob();)r=uG(u.Pb(),12),Wbn(Gfn(Uhn(cT(PNt,1),zZn,8,0,[r.i.n,r.n,r.a])).b,n.g,n.f)&&++i;for(c=t.r.a.ec().Kc();c.Ob();)r=uG(c.Pb(),12),Wbn(Gfn(Uhn(cT(PNt,1),zZn,8,0,[r.i.n,r.n,r.a])).b,n.g,n.f)&&--i;e=0)return e;switch(sJ(Nen(n,e))){case 2:if(m_("",tdn(n,e.qk()).xe())){if(u=hxn(n,t,o=HJ(Nen(n,e)),BJ(Nen(n,e))))return u;for(a=0,s=(r=AHn(n,t)).gc();a1)throw hv(new vM(dct));for(h=VKn(n.e.Dh(),t),i=uG(n.g,124),a=0;a1,h=new w7(b.b);l$(h.a)||l$(h.b);)l=(s=uG(l$(h.a)?N3(h.a):N3(h.b),18)).c==b?s.d:s.c,e.Math.abs(Gfn(Uhn(cT(PNt,1),zZn,8,0,[l.i.n,l.n,l.a])).b-o.b)>1&&sFn(n,s,o,a,b)}}function oVn(n){var t,i,r,c,a,o;if(c=new N4(n.e,0),r=new N4(n.a,0),n.d)for(i=0;i$9n;){for(a=t,o=0;e.Math.abs(t-a)<$9n;)++o,t=uM((MK(c.b0),c.a.Xb(c.c=--c.b),zGn(n,n.b-o,a,r,c),MK(c.b0),r.a.Xb(r.c=--r.b)}if(!n.d)for(i=0;i0?(n.f[s.p]=l/(s.e.c.length+s.g.c.length),n.c=e.Math.min(n.c,n.f[s.p]),n.b=e.Math.max(n.b,n.f[s.p])):o&&(n.f[s.p]=l)}}function hVn(n){n.b=null,n.bb=null,n.fb=null,n.qb=null,n.a=null,n.c=null,n.d=null,n.e=null,n.f=null,n.n=null,n.M=null,n.L=null,n.Q=null,n.R=null,n.K=null,n.db=null,n.eb=null,n.g=null,n.i=null,n.j=null,n.k=null,n.gb=null,n.o=null,n.p=null,n.q=null,n.r=null,n.$=null,n.ib=null,n.S=null,n.T=null,n.t=null,n.s=null,n.u=null,n.v=null,n.w=null,n.B=null,n.A=null,n.C=null,n.D=null,n.F=null,n.G=null,n.H=null,n.I=null,n.J=null,n.P=null,n.Z=null,n.U=null,n.V=null,n.W=null,n.X=null,n.Y=null,n._=null,n.ab=null,n.cb=null,n.hb=null,n.nb=null,n.lb=null,n.mb=null,n.ob=null,n.pb=null,n.jb=null,n.kb=null,n.N=!1,n.O=!1}function fVn(n,t,e){var i,r;for(e.Ug("Graph transformation ("+n.a+")",1),r=T3(t.a),i=new Ww(t.b);i.a=o.b.c)&&(o.b=t),(!o.c||t.c<=o.c.c)&&(o.d=o.c,o.c=t),(!o.e||t.d>=o.e.d)&&(o.e=t),(!o.f||t.d<=o.f.d)&&(o.f=t);return i=new cyn((Xhn(),Flt)),O4(n,Vlt,new IM(Uhn(cT(Klt,1),EZn,382,0,[i]))),a=new cyn(Hlt),O4(n,zlt,new IM(Uhn(cT(Klt,1),EZn,382,0,[a]))),r=new cyn(_lt),O4(n,Xlt,new IM(Uhn(cT(Klt,1),EZn,382,0,[r]))),c=new cyn(Blt),O4(n,qlt,new IM(Uhn(cT(Klt,1),EZn,382,0,[c]))),jRn(i.c,Flt),jRn(r.c,_lt),jRn(c.c,Blt),jRn(a.c,Hlt),o.a.c.length=0,Ohn(o.a,i.c),Ohn(o.a,Spn(r.c)),Ohn(o.a,c.c),Ohn(o.a,Spn(a.c)),o}function wVn(n,t){var i,r,c,a,o,u,s,h,f,l,b,w,d;for(t.Ug(snt,1),w=uM(pK(zDn(n,(lBn(),POt)))),o=uM(pK(zDn(n,(S_n(),bAt)))),u=uG(zDn(n,hAt),107),Non((!n.a&&(n.a=new fV(bFt,n,10,11)),n.a)),f=ozn((!n.a&&(n.a=new fV(bFt,n,10,11)),n.a),w,o),!n.a&&(n.a=new fV(bFt,n,10,11)),h=new Ww(f);h.a0&&(n.a=o+(l-1)*r,t.c.b+=n.a,t.f.b+=n.a),0!=b.a.gc()&&(l=YVn(new NW(1,r),t,b,w,t.f.b+o-t.c.b))>0&&(t.f.b+=o+(l-1)*r)}function gVn(n,t,i){var r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y;for(f=uM(pK(oIn(n,(jYn(),mTt)))),r=uM(pK(oIn(n,RTt))),kfn(b=new Qu,mTt,f+r),m=(h=t).d,g=h.c.i,v=h.d.i,p=GL(g.c),k=GL(v.c),c=new Zm,l=p;l<=k;l++)Hb(u=new gMn(n),(zIn(),wbt)),kfn(u,(GYn(),rmt),h),kfn(u,JMt,($Pn(),cRt)),kfn(u,kTt,b),w=uG(zq(n.b,l),30),l==p?$jn(u,w.a.c.length-i,w):a2(u,w),(y=uM(pK(oIn(h,tMt))))<0&&kfn(h,tMt,y=0),u.o.b=y,d=e.Math.floor(y/2),NLn(o=new lOn,(KQn(),_Rt)),o2(o,u),o.n.b=d,NLn(s=new lOn,kRt),o2(s,u),s.n.b=d,u2(h,o),zsn(a=new UZ,h),kfn(a,bMt,null),c2(a,s),u2(a,m),IEn(u,h,a),mv(c.c,a),h=a;return c}function pVn(n,t){var e,i,r,c,a,o,u,s,h,f,l,b,w,d,g;for(o=uG(yOn(n,(KQn(),_Rt)).Kc().Pb(),12).e,f=uG(yOn(n,kRt).Kc().Pb(),12).g,a=o.c.length,g=n3(uG(zq(n.j,0),12));a-- >0;){for(u3(0,o.c.length),b=uG(o.c[0],18),u3(0,f.c.length),r=Ten((i=uG(f.c[0],18)).d.e,i,0),w6(b,i.d,r),c2(i,null),u2(i,null),l=b.a,t&&aq(l,new eN(g)),e=Fkn(i.a,0);e.b!=e.d.c;)aq(l,new eN(uG(I6(e),8)));for(d=b.b,h=new Ww(i.b);h.aa)&&FV(n.b,uG(g.b,18));++o}c=a}}}function vVn(n,t){var e;if(null==t||m_(t,IZn))return null;if(0==t.length&&n.k!=(lAn(),pNt))return null;switch(n.k.g){case 1:return Bvn(t,Fnt)?(qx(),eot):Bvn(t,_nt)?(qx(),tot):null;case 2:try{return xwn(mUn(t,j1n,vZn))}catch(i){if(F$(i=Ehn(i),130))return null;throw hv(i)}case 4:try{return YIn(t)}catch(i){if(F$(i=Ehn(i),130))return null;throw hv(i)}case 3:return t;case 5:return wbn(n),NNn(n,t);case 6:return wbn(n),Lxn(n,n.a,t);case 7:try{return(e=Q$n(n)).cg(t),e}catch(i){if(F$(i=Ehn(i),33))return null;throw hv(i)}default:throw hv(new kM("Invalid type set for this layout option."))}}function kVn(n){var t;switch(n.d){case 1:if(n.Sj())return-2!=n.o;break;case 2:if(n.Sj())return-2==n.o;break;case 3:case 5:case 4:case 6:case 7:return n.o>-2;default:return!1}switch(t=n.Rj(),n.p){case 0:return null!=t&&oM(gK(t))!=HA(n.k,0);case 1:return null!=t&&uG(t,222).a!=pz(n.k)<<24>>24;case 2:return null!=t&&uG(t,180).a!=(pz(n.k)&D1n);case 6:return null!=t&&HA(uG(t,168).a,n.k);case 5:return null!=t&&uG(t,17).a!=pz(n.k);case 7:return null!=t&&uG(t,191).a!=pz(n.k)<<16>>16;case 3:return null!=t&&uM(pK(t))!=n.j;case 4:return null!=t&&uG(t,161).a!=n.j;default:return null==t?null!=n.n:!udn(t,n.n)}}function yVn(n,t,e){var i,r,c,a;return n.ol()&&n.nl()&&xA(a=CV(n,uG(e,58)))!==xA(e)?(n.xj(t),n.Dj(t,Atn(n,t,a)),n.al()&&(r=uG(e,54),c=n.ml()?n.kl()?r.Th(n.b,lMn(uG(ern(e1(n.b),n.Lj()),19)).n,uG(ern(e1(n.b),n.Lj()).Hk(),29).kk(),null):r.Th(n.b,emn(r.Dh(),lMn(uG(ern(e1(n.b),n.Lj()),19))),null,null):r.Th(n.b,-1-n.Lj(),null,null),!uG(a,54).Ph()&&(i=uG(a,54),c=n.ml()?n.kl()?i.Rh(n.b,lMn(uG(ern(e1(n.b),n.Lj()),19)).n,uG(ern(e1(n.b),n.Lj()).Hk(),29).kk(),c):i.Rh(n.b,emn(i.Dh(),lMn(uG(ern(e1(n.b),n.Lj()),19))),null,c):i.Rh(n.b,-1-n.Lj(),null,c)),c&&c.oj()),uN(n.b)&&n.Jj(n.Ij(9,e,a,t,!1)),a):e}function MVn(n){var t,e,i,r,c,a,o,u,s,h;for(i=new Zm,a=new Ww(n.e.a);a.a0&&(o=e.Math.max(o,run(n.C.b+r.d.b,c))),f=r,l=c,b=a;n.C&&n.C.c>0&&(w=b+n.C.c,h&&(w+=f.d.c),o=e.Math.max(o,(YN(),oan(Z2n),e.Math.abs(l-1)<=Z2n||1==l||isNaN(l)&&isNaN(1)?0:w/(1-l)))),i.n.b=0,i.a.a=o}function jVn(n,t){var i,r,c,a,o,u,s,h,f,l,b,w;if(i=uG(AJ(n.b,t),127),(s=uG(uG(Y9(n.r,t),21),87)).dc())return i.n.d=0,void(i.n.a=0);for(h=n.u.Hc((eNn(),wRt)),o=0,n.A.Hc((Qmn(),JRt))&&kBn(n,t),u=s.Kc(),f=null,b=0,l=0;u.Ob();)a=uM(pK((r=uG(u.Pb(),117)).b.of((Gx(),bht)))),c=r.b.Mf().b,f?(w=l+f.d.a+n.w+r.d.d,o=e.Math.max(o,(YN(),oan(Z2n),e.Math.abs(b-a)<=Z2n||b==a||isNaN(b)&&isNaN(a)?0:w/(a-b)))):n.C&&n.C.d>0&&(o=e.Math.max(o,run(n.C.d+r.d.d,a))),f=r,b=a,l=c;n.C&&n.C.a>0&&(w=l+n.C.a,h&&(w+=f.d.a),o=e.Math.max(o,(YN(),oan(Z2n),e.Math.abs(b-1)<=Z2n||1==b||isNaN(b)&&isNaN(1)?0:w/(1-b)))),i.n.d=0,i.a.b=o}function EVn(n,t,e,i,r,c,a,o){var u,s,h,f,l,b,w,d;if(b=!1,u=cKn(e.q,t.f+t.b-e.q.f),l=i.f>t.b&&o,h=uXn(i,d=r-(e.q.e+u-a),!1).a,l&&h>i.f)return!1;if(l){for(f=0,w=new Ww(t.d);w.a=(u3(c,n.c.length),uG(n.c[c],186)).e,!(!l&&h>t.b&&!s)&&((s||l||h<=t.b)&&(s&&h>t.b?(e.d=h,dtn(e,EOn(e,h))):(USn(e.q,u),e.c=!0),dtn(i,r-(e.s+e.r)),oMn(i,e.q.e+e.q.d,t.f),fan(t,i),n.c.length>c&&(uEn((u3(c,n.c.length),uG(n.c[c],186)),i),0==(u3(c,n.c.length),uG(n.c[c],186)).a.c.length&&i7(n,c)),b=!0),b))}function SVn(n,t,e){var i,r,c,a,o,u;for(this.g=n,o=t.d.length,u=e.d.length,this.d=Inn(pbt,e6n,10,o+u,0,1),a=0;a0?Rrn(this,this.f/this.a):null!=oD(t.g,t.d[0]).a&&null!=oD(e.g,e.d[0]).a?Rrn(this,(uM(oD(t.g,t.d[0]).a)+uM(oD(e.g,e.d[0]).a))/2):null!=oD(t.g,t.d[0]).a?Rrn(this,oD(t.g,t.d[0]).a):null!=oD(e.g,e.d[0]).a&&Rrn(this,oD(e.g,e.d[0]).a)}function PVn(n,t){var e,i,r,c,a,o,u,s,h;for(n.a=new wQ(efn(axt)),i=new Ww(t.a);i.a=1&&(g-a>0&&f>=0?(u.n.a+=d,u.n.b+=c*a):g-a<0&&h>=0&&(u.n.a+=d*g,u.n.b+=c));n.o.a=t.a,n.o.b=t.b,kfn(n,(jYn(),DMt),(Qmn(),new nB(i=uG(Mj(sKt),9),uG(MF(i,i.length),9),0)))}function LVn(n,t,e,i,r,c){if(null!=t&&mpn(t,YFt,ZFt))throw hv(new vM("invalid scheme: "+t));if(!(n||null!=e&&-1==xL(e,$Cn(35))&&e.length>0&&(s3(0,e.length),47!=e.charCodeAt(0))))throw hv(new vM("invalid opaquePart: "+e));if(n&&(null==t||!ZE(UFt,t.toLowerCase()))&&null!=e&&mpn(e,n_t,t_t))throw hv(new vM(Vit+e));if(n&&null!=t&&ZE(UFt,t.toLowerCase())&&!bPn(e))throw hv(new vM(Vit+e));if(!Ppn(i))throw hv(new vM("invalid device: "+i));if(!Jbn(r))throw hv(new vM(null==r?"invalid segments: null":"invalid segment: "+Lbn(r)));if(null!=c&&-1!=xL(c,$Cn(35)))throw hv(new vM("invalid query: "+c))}function NVn(n,t,i){var r,c,a,o,u,s,h,f,l,b,w,d,g,p;if(i.Ug("Network simplex layering",1),n.b=t,p=4*uG(oIn(t,(jYn(),OTt)),17).a,(g=n.b.a).c.length<1)i.Vg();else{for(d=null,c=Fkn(a=xHn(n,g),0);c.b!=c.d.c;){for(r=uG(I6(c),15),u=p*t0(e.Math.sqrt(r.gc())),JHn(kT(MT(yT(_B(o=wUn(r)),u),d),!0),i.eh(1)),l=n.b.b,w=new Ww(o.a);w.a1)for(d=Inn(YHt,W1n,28,n.b.b.c.length,15,1),f=0,h=new Ww(n.b.b);h.a0?(Ikn(n,e,0),e.a+=String.fromCharCode(i),Ikn(n,e,r=qvn(t,c)),c+=r-1):39==i?c+10&&w.a<=0){u.c.length=0,mv(u.c,w);break}(b=w.i-w.d)>=o&&(b>o&&(u.c.length=0,o=b),mv(u.c,w))}0!=u.c.length&&(a=uG(zq(u,iMn(r,u.c.length)),118),v.a.Bc(a),a.g=h++,UGn(a,t,e,i),u.c.length=0)}for(g=n.c.length+1,l=new Ww(n);l.aT0n||t.o==wSt&&s=o&&r<=u)o<=r&&c<=u?(e[h++]=r,e[h++]=c,i+=2):o<=r?(e[h++]=r,e[h++]=u,n.b[i]=u+1,a+=2):c<=u?(e[h++]=o,e[h++]=c,i+=2):(e[h++]=o,e[h++]=u,n.b[i]=u+1);else{if(!(uT1n)&&u<10);ET(n.c,new yt),_Vn(n),YV(n.c),lVn(n.f)}function XVn(n,t){var i,r,c,a,o,u,s,h,f,l,b,w,d,g;for(i=uG(oIn(n,(jYn(),JMt)),101),o=n.f,a=n.d,u=o.a+a.b+a.c,s=0-a.d-n.c.b,f=o.b+a.d+a.a-n.c.b,h=new Zm,l=new Zm,c=new Ww(t);c.a=2){for(a=uG(I6(u=Fkn(e,0)),8),o=uG(I6(u),8);o.a0&&hfn(u,!0,(xdn(),YDt)),a.k==(zIn(),lbt)&&XQ(u),vJ(n.f,a,t)):((s=(i=uG(pZ(Ggn(a)),18)).c.i)==a&&(s=i.d.i),f=new WO(s,YF(D$(a.n),s.n)),vJ(n.b,a,f))}function WVn(n){var t,i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v;for(i=uG(oIn(n,(OQn(),RPt)),27),u=vZn,s=vZn,a=j1n,o=j1n,m=Fkn(n.b,0);m.b!=m.d.c;)l=(g=uG(I6(m),40)).e,b=g.f,u=e.Math.min(u,l.a-b.a/2),s=e.Math.min(s,l.b-b.b/2),a=e.Math.max(a,l.a+b.a/2),o=e.Math.max(o,l.b+b.b/2);for(f=uG(zDn(i,(QGn(),pCt)),107),p=Fkn(n.b,0);p.b!=p.d.c;)F$(h=oIn(g=uG(I6(p),40),RPt),207)&&(kN(r=uG(h,27),g.e.a,g.e.b),aKn(r,g));for(d=Fkn(n.a,0);d.b!=d.d.c;)w=uG(I6(d),65),(t=uG(oIn(w,RPt),74))&&sqn(w.a,JFn(t,!0,!0));v=a-u+(f.b+f.c),c=o-s+(f.d+f.a),oM(gK(zDn(i,(XYn(),H$t))))||ZQn(i,v,c,!1,!1),Myn(i,h$t,v-(f.b+f.c)),Myn(i,s$t,c-(f.d+f.a))}function QVn(n,t){var e,i,r,c,a,o,u,s,f;for(o=!0,r=0,u=n.g[t.p],s=t.o.b+n.o,e=n.d[t.p][2],Y8(n.b,u,xwn(uG(zq(n.b,u),17).a-1+e)),Y8(n.c,u,uM(pK(zq(n.c,u)))-s+e*n.f),++u>=n.j?(++n.j,kD(n.b,xwn(1)),kD(n.c,s)):(i=n.d[t.p][1],Y8(n.b,u,xwn(uG(zq(n.b,u),17).a+1-i)),Y8(n.c,u,uM(pK(zq(n.c,u)))+s-i*n.f)),(n.r==(THn(),Ijt)&&(uG(zq(n.b,u),17).a>n.k||uG(zq(n.b,u-1),17).a>n.k)||n.r==Ljt&&(uM(pK(zq(n.c,u)))>n.n||uM(pK(zq(n.c,u-1)))>n.n))&&(o=!1),c=new Fz(ix(qgn(t).a.Kc(),new h));hDn(c);)a=uG(N9(c),18).c.i,n.g[a.p]==u&&(r+=uG((f=QVn(n,a)).a,17).a,o=o&&oM(gK(f.b)));return n.g[t.p]=u,new WO(xwn(r+=n.d[t.p][0]),(qx(),!!o))}function JVn(n,t){var e,i;uM(pK(oIn(t,(jYn(),dTt))))<2&&kfn(t,dTt,2),uG(oIn(t,Byt),88)==(xdn(),ZDt)&&kfn(t,Byt,pgn(t)),0==(e=uG(oIn(t,sTt),17)).a?kfn(t,(GYn(),dmt),new Upn):kfn(t,(GYn(),dmt),new v8(e.a)),null==gK(oIn(t,OMt))&&kfn(t,OMt,(qx(),xA(oIn(t,Vyt))===xA((_gn(),uxt)))),kS(new fX(null,new h3(t.a,16)),new Hd(n)),kS(sin(new fX(null,new h3(t.b,16)),new dt),new Ud(n)),i=new CVn(t),kfn(t,(GYn(),kmt),i),_J(n.a),JV(n.a,(uIn(),Tlt),uG(oIn(t,Fyt),188)),JV(n.a,jlt,uG(oIn(t,MMt),188)),JV(n.a,Elt,uG(oIn(t,Kyt),188)),JV(n.a,Slt,uG(oIn(t,$Mt),188)),JV(n.a,Plt,Rsn(uG(oIn(t,Vyt),223))),ZL(n.a,iYn(t)),kfn(t,wmt,Qzn(n.a,t))}function YVn(n,t,i,r,c){var a,o,u,s,h,f,l,b,w,d,g,p,m;for(l=new Ym,o=new Zm,HAn(n,i,n.d.Ag(),o,l),HAn(n,r,n.d.Bg(),o,l),n.b=.2*(g=DDn(sin(new fX(null,new h3(o,16)),new pa)),p=DDn(sin(new fX(null,new h3(o,16)),new ma)),e.Math.min(g,p)),a=0,u=0;u=2&&(m=sRn(o,!0,b),!n.e&&(n.e=new pp(n)),xvn(n.e,m,o,n.b)),BPn(o,b),oWn(o),w=-1,f=new Ww(o);f.ao)}function tWn(n,t){var i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v;for(h=M0n,f=M0n,u=T0n,s=T0n,b=new Ww(t.i);b.a-1){for(r=Fkn(o,0);r.b!=r.d.c;)(i=uG(I6(r),131)).v=a;for(;0!=o.b;)for(t=new Ww((i=uG(Kjn(o,0),131)).i);t.a-1){for(c=new Ww(o);c.a0||(Yb(u,e.Math.min(u.o,r.o-1)),Jb(u,u.i-1),0==u.i&&mv(o.c,u))}}function uWn(n,t,i,r,c){var a,o,u,s;return s=M0n,o=!1,a=!!(u=rXn(n,YF(new MO(t.a,t.b),n),JF(new MO(i.a,i.b),c),YF(new MO(r.a,r.b),i)))&&!(e.Math.abs(u.a-n.a)<=Hnt&&e.Math.abs(u.b-n.b)<=Hnt||e.Math.abs(u.a-t.a)<=Hnt&&e.Math.abs(u.b-t.b)<=Hnt),(u=rXn(n,YF(new MO(t.a,t.b),n),i,c))&&((e.Math.abs(u.a-n.a)<=Hnt&&e.Math.abs(u.b-n.b)<=Hnt)==(e.Math.abs(u.a-t.a)<=Hnt&&e.Math.abs(u.b-t.b)<=Hnt)||a?s=e.Math.min(s,NQ(YF(u,i))):o=!0),(u=rXn(n,YF(new MO(t.a,t.b),n),r,c))&&(o||(e.Math.abs(u.a-n.a)<=Hnt&&e.Math.abs(u.b-n.b)<=Hnt)==(e.Math.abs(u.a-t.a)<=Hnt&&e.Math.abs(u.b-t.b)<=Hnt)||a)&&(s=e.Math.min(s,NQ(YF(u,r)))),s}function sWn(n){hP(n,new hCn(xT(FT(DT(KT(RT(new bu,$4n),D4n),"Minimizes the stress within a layout using stress majorization. Stress exists if the euclidean distance between a pair of nodes doesn't match their graph theoretic distance, that is, the shortest path between the two nodes. The method allows to specify individual edge lengths."),new gt),c4n))),U4(n,$4n,f4n,Jkn(olt)),U4(n,$4n,b4n,(qx(),!0)),U4(n,$4n,p4n,Jkn(hlt)),U4(n,$4n,x4n,Jkn(flt)),U4(n,$4n,g4n,Jkn(llt)),U4(n,$4n,m4n,Jkn(slt)),U4(n,$4n,w4n,Jkn(blt)),U4(n,$4n,v4n,Jkn(wlt)),U4(n,$4n,I4n,Jkn(alt)),U4(n,$4n,A4n,Jkn(rlt)),U4(n,$4n,L4n,Jkn(clt)),U4(n,$4n,N4n,Jkn(ult)),U4(n,$4n,O4n,Jkn(ilt))}function hWn(n){var t,e,i,r,c,a,o,u;for(t=null,i=new Ww(n);i.a0&&0==e.c&&(!t&&(t=new Zm),mv(t.c,e));if(t)for(;0!=t.c.length;){if((e=uG(i7(t,0),239)).b&&e.b.c.length>0)for(!e.b&&(e.b=new Zm),c=new Ww(e.b);c.aTen(n,e,0))return new WO(r,e)}else if(uM(oD(r.g,r.d[0]).a)>uM(oD(e.g,e.d[0]).a))return new WO(r,e);for(o=(!e.e&&(e.e=new Zm),e.e).Kc();o.Ob();)!(a=uG(o.Pb(),239)).b&&(a.b=new Zm),o3(0,(u=a.b).c.length),pC(u.c,0,e),a.c==u.c.length&&mv(t.c,a)}return null}function fWn(n,t){var e,i,r,c,a,o,u,s,h,f,l,b,w,d,g;for(t.Ug("Interactive crossing minimization",1),a=0,c=new Ww(n.b);c.a0&&(e+=u.n.a+u.o.a/2,++f),b=new Ww(u.j);b.a0&&(e/=f),g=Inn(eUt,I0n,28,i.a.c.length,15,1),o=0,s=new Ww(i.a);s.a=o&&r<=u)o<=r&&c<=u?i+=2:o<=r?(n.b[i]=u+1,a+=2):c<=u?(e[h++]=r,e[h++]=o-1,i+=2):(e[h++]=r,e[h++]=o-1,n.b[i]=u+1,a+=2);else{if(!(u2?(Ohn(s=new Zm,new C2(w,1,w.b)),zsn(d=new pDn(vYn(s,g+n.a)),t),mv(i.c,d)):d=uG(cQ(n.b,r?bIn(t):gIn(t)),272),o=bIn(t),r&&(o=gIn(t)),a=GOn(b,o),u=g+n.a,a.a?(u+=e.Math.abs(b.b-h.b),l=new MO(h.a,(h.b+b.b)/2)):(u+=e.Math.abs(b.a-h.a),l=new MO((h.a+b.a)/2,h.b)),vJ(r?n.d:n.c,t,new bTn(d,a,l,u)),vJ(n.b,t,d),!t.n&&(t.n=new fV(lFt,t,1,7)),f=new DD(t.n);f.e!=f.i.gc();)c=nHn(n,uG(Zkn(f),135),!0,0,0),mv(i.c,c)}function wWn(n){var t,e,i,r,c,a,o;if(!n.A.dc()){if(n.A.Hc((Qmn(),QRt))&&(uG(AJ(n.b,(KQn(),yRt)),127).k=!0,uG(AJ(n.b,KRt),127).k=!0,t=n.q!=($Pn(),aRt)&&n.q!=cRt,Db(uG(AJ(n.b,kRt),127),t),Db(uG(AJ(n.b,_Rt),127),t),Db(n.g,t),n.A.Hc(JRt)&&(uG(AJ(n.b,yRt),127).j=!0,uG(AJ(n.b,KRt),127).j=!0,uG(AJ(n.b,kRt),127).k=!0,uG(AJ(n.b,_Rt),127).k=!0,n.g.k=!0)),n.A.Hc(WRt))for(n.a.j=!0,n.a.k=!0,n.g.j=!0,n.g.k=!0,o=n.B.Hc((aUn(),cKt)),c=0,a=(r=Nkn()).length;c0),c=uG(s.a.Xb(s.c=--s.b),18);c!=i&&s.b>0;)n.a[c.p]=!0,n.a[i.p]=!0,MK(s.b>0),c=uG(s.a.Xb(s.c=--s.b),18);s.b>0&&LQ(s)}}function pWn(n,t,e){var i,r,c,a,o,u,s,h,f,l,b;if(!n.b)return!1;for(a=null,l=null,r=1,(u=new _nn(null,null)).a[1]=n.b,f=u;f.a[r];)s=r,o=l,l=f,f=f.a[r],r=(i=n.a.Ne(t,f.d))<0?0:1,0==i&&(!e.c||OJ(f.e,e.d))&&(a=f),f&&f.b||NM(f.a[r])||(NM(f.a[1-r])?l=l.a[s]=Ton(f,r):NM(f.a[1-r])||(b=l.a[1-s])&&(NM(b.a[1-s])||NM(b.a[s])?(c=o.a[1]==l?1:0,NM(b.a[s])?o.a[c]=P4(l,s):NM(b.a[1-s])&&(o.a[c]=Ton(l,s)),f.b=o.a[c].b=!0,o.a[c].a[0].b=!1,o.a[c].a[1].b=!1):(l.b=!1,b.b=!0,f.b=!0)));return a&&(e.b=!0,e.d=a.e,f!=a&&(YCn(n,u,a,h=new _nn(f.d,f.e)),l==a&&(l=h)),l.a[l.a[1]==f?1:0]=f.a[f.a[0]?0:1],--n.c),n.b=u.a[1],n.b&&(n.b.b=!1),e.b}function mWn(n){var t,i,r,c,a,o,u,s,h,f,l,b;for(c=new Ww(n.a.a.b);c.a0?r-=864e5:r+=864e5,u=new DK(Lgn(Bsn(t.q.getTime()),r))),h=new QM,s=n.a.length,c=0;c=97&&i<=122||i>=65&&i<=90){for(a=c+1;a=s)throw hv(new vM("Missing trailing '"));a+1=14&&o<=16?F$(i,183)?o7(e,PLn(uG(i,183))):F$(i,195)?o7(e,xPn(uG(i,195))):F$(i,201)?o7(e,aOn(uG(i,201))):F$(i,2111)?o7(e,RPn(uG(i,2111))):F$(i,53)?o7(e,SLn(uG(i,53))):F$(i,376)?o7(e,aNn(uG(i,376))):F$(i,846)?o7(e,ELn(uG(i,846))):F$(i,109)&&o7(e,jLn(uG(i,109))):t.a._b(i)?(e.a?JA(e.a,e.b):e.a=new lx(e.d),WA(e.a,"[...]")):o7(e,MWn(Kcn(i),new oX(t))):o7(e,null==i?IZn:cpn(i));return e.a?0==e.e.length?e.a.a:e.a.a+""+e.e:e.c}function TWn(n,t){var e,i,r,c;c=n.F,null==t?(n.F=null,sbn(n,null)):(n.F=(tJ(t),t),-1!=(i=xL(t,$Cn(60)))?(Knn(0,i,t.length),r=t.substr(0,i),-1==xL(t,$Cn(46))&&!m_(r,dZn)&&!m_(r,lrt)&&!m_(r,brt)&&!m_(r,wrt)&&!m_(r,drt)&&!m_(r,grt)&&!m_(r,prt)&&!m_(r,mrt)&&(r=vrt),-1!=(e=ax(t,$Cn(62)))&&(r+=""+(s3(e+1,t.length+1),t.substr(e+1))),sbn(n,r)):(r=t,-1==xL(t,$Cn(46))&&(-1!=(i=xL(t,$Cn(91)))&&(Knn(0,i,t.length),r=t.substr(0,i)),m_(r,dZn)||m_(r,lrt)||m_(r,brt)||m_(r,wrt)||m_(r,drt)||m_(r,grt)||m_(r,prt)||m_(r,mrt)?r=t:(r=vrt,-1!=i&&(r+=""+(s3(i,t.length+1),t.substr(i))))),sbn(n,r),r==t&&(n.F=n.D))),4&n.Db&&!(1&n.Db)&&Msn(n,new lV(n,1,5,c,t))}function jWn(n,t){var e,i,r,c,a,o,u,s;if(s3(o=t.length-1,t.length),93==(a=t.charCodeAt(o))){if((c=xL(t,$Cn(91)))>=0)return r=fpn(n,(Knn(1,c,t.length),t.substr(1,c-1))),Knn(c+1,o,t.length),GJn(n,t.substr(c+1,o-(c+1)),r)}else{if(e=-1,null==oot&&(oot=new RegExp("\\d")),oot.test(String.fromCharCode(a))&&(e=T_(t,$Cn(46),o-1))>=0){i=uG(U9(n,jrn(n,(Knn(1,e,t.length),t.substr(1,e-1))),!1),61),u=0;try{u=mUn((s3(e+1,t.length+1),t.substr(e+1)),j1n,vZn)}catch(h){throw F$(h=Ehn(h),130)?hv(new Pen(h)):hv(h)}if(u>16==-10?e=uG(n.Cb,292).Yk(t,e):n.Db>>16==-15&&(!t&&(YYn(),t=N_t),!o&&(YYn(),o=N_t),n.Cb.Yh()&&(a=new Ken(n.Cb,1,13,o,t,Hyn(Aen(uG(n.Cb,62)),n),!1),e?e.nj(a):e=a));else if(F$(n.Cb,90))n.Db>>16==-23&&(F$(t,90)||(YYn(),t=x_t),F$(o,90)||(YYn(),o=x_t),n.Cb.Yh()&&(a=new Ken(n.Cb,1,10,o,t,Hyn(z5(uG(n.Cb,29)),n),!1),e?e.nj(a):e=a));else if(F$(n.Cb,457))for(!(c=uG(n.Cb,850)).b&&(c.b=new Um(new ty)),r=new Gm(new bsn(new Nw(c.b.a).a));r.a.b;)e=PWn(i=uG(von(r.a).ld(),89),bRn(i,c),e);return e}function CWn(n,t){var e,i,r,c,a,o,u,s,h,f,l;for(a=oM(gK(zDn(n,(jYn(),sMt)))),l=uG(zDn(n,nTt),21),u=!1,s=!1,f=new DD((!n.c&&(n.c=new fV(wFt,n,9,9)),n.c));!(f.e==f.i.gc()||u&&s);){for(c=uG(Zkn(f),123),o=0,r=OV(zcn(Uhn(cT(vat,1),EZn,20,0,[(!c.d&&(c.d=new f_(aFt,c,8,5)),c.d),(!c.e&&(c.e=new f_(aFt,c,7,4)),c.e)])));hDn(r)&&(i=uG(N9(r),74),h=a&&BNn(i)&&oM(gK(zDn(i,hMt))),e=Lzn((!i.b&&(i.b=new f_(cFt,i,4,7)),i.b),c)?n==R0(lCn(uG(zrn((!i.c&&(i.c=new f_(cFt,i,5,8)),i.c),0),84))):n==R0(lCn(uG(zrn((!i.b&&(i.b=new f_(cFt,i,4,7)),i.b),0),84))),!((h||e)&&++o>1)););(o>0||l.Hc((eNn(),wRt))&&(!c.n&&(c.n=new fV(lFt,c,1,7)),c.n).i>0)&&(u=!0),o>1&&(s=!0)}u&&t.Fc((r_n(),tpt)),s&&t.Fc((r_n(),ept))}function IWn(n){var t,i,r,c,a,o,u,s,h,f,l,b;if((b=uG(zDn(n,(XYn(),_$t)),21)).dc())return null;if(u=0,o=0,b.Hc((Qmn(),QRt))){for(f=uG(zDn(n,sDt),101),r=2,i=2,c=2,a=2,t=R0(n)?uG(zDn(R0(n),d$t),88):uG(zDn(n,d$t),88),h=new DD((!n.c&&(n.c=new fV(wFt,n,9,9)),n.c));h.e!=h.i.gc();)if(s=uG(Zkn(h),123),(l=uG(zDn(s,gDt),64))==(KQn(),FRt)&&(l=RGn(s,t),Myn(s,gDt,l)),f==($Pn(),cRt))switch(l.g){case 1:r=e.Math.max(r,s.i+s.g);break;case 2:i=e.Math.max(i,s.j+s.f);break;case 3:c=e.Math.max(c,s.i+s.g);break;case 4:a=e.Math.max(a,s.j+s.f)}else switch(l.g){case 1:r+=s.g+2;break;case 2:i+=s.f+2;break;case 3:c+=s.g+2;break;case 4:a+=s.f+2}u=e.Math.max(r,c),o=e.Math.max(i,a)}return ZQn(n,u,o,!0,!0)}function OWn(n,t,i,r,c){var a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y;for(v=uG(l8(krn(JJ(new fX(null,new h3(t.d,16)),new Rg(i)),new Kg(i)),ftn(new V,new z,new en,Uhn(cT(Rut,1),p1n,108,0,[(ybn(),Iut)]))),15),l=vZn,f=j1n,s=new Ww(t.b.j);s.a0)?s&&(h=d.p,a?++h:--h,f=!(VRn(i=afn(uG(zq(d.c.a,h),10)),k,e[0])||rV(i,k,e[0]))):f=!0),l=!1,(v=t.D.i)&&v.c&&o.e&&(a&&v.p>0||!a&&v.p=0){for(u=null,o=new N4(h.a,s+1);o.ba?1:KL(isNaN(0),isNaN(a)))<0&&(oan(I9n),(e.Math.abs(a-1)<=I9n||1==a||isNaN(a)&&isNaN(1)?0:a<1?-1:a>1?1:KL(isNaN(a),isNaN(1)))<0)&&(oan(I9n),(e.Math.abs(0-o)<=I9n||0==o||isNaN(0)&&isNaN(o)?0:0o?1:KL(isNaN(0),isNaN(o)))<0)&&(oan(I9n),(e.Math.abs(o-1)<=I9n||1==o||isNaN(o)&&isNaN(1)?0:o<1?-1:o>1?1:KL(isNaN(o),isNaN(1)))<0))}function KWn(n){var t,e,i,r;if(-1!=(t=xL(e=null!=n.D?n.D:n.B,$Cn(91)))){Knn(0,t,e.length),i=e.substr(0,t),r=new zM;do{r.a+="["}while(-1!=(t=aR(e,91,++t)));m_(i,dZn)?r.a+="Z":m_(i,lrt)?r.a+="B":m_(i,brt)?r.a+="C":m_(i,wrt)?r.a+="D":m_(i,drt)?r.a+="F":m_(i,grt)?r.a+="I":m_(i,prt)?r.a+="J":m_(i,mrt)?r.a+="S":(r.a+="L",r.a+=""+i,r.a+=";");try{return null}catch(c){if(!F$(c=Ehn(c),63))throw hv(c)}}else if(-1==xL(e,$Cn(46))){if(m_(e,dZn))return ZHt;if(m_(e,lrt))return tUt;if(m_(e,brt))return JHt;if(m_(e,wrt))return eUt;if(m_(e,drt))return iUt;if(m_(e,grt))return YHt;if(m_(e,prt))return nUt;if(m_(e,mrt))return rUt}return null}function FWn(n,t){var e,i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k;for(n.e=t,o=qNn(t),v=new Zm,i=new Ww(o);i.a=0&&d=s.c.c.length?B5((zIn(),dbt),wbt):B5((zIn(),wbt),wbt),h*=2,c=i.a.g,i.a.g=e.Math.max(c,c+(h-c)),a=i.b.g,i.b.g=e.Math.max(a,a+(h-a)),r=t}else pNn(o),VXn((u3(0,o.c.length),uG(o.c[0],18)).d.i)||kD(n.o,o)}function UWn(n){var t,i,r,c;for(kS(JJ(new fX(null,new h3(n.a.b,16)),new kr),new yr),QSn(n),kS(JJ(new fX(null,new h3(n.a.b,16)),new Mr),new Tr),n.c==(_gn(),hxt)&&(kS(JJ(sin(new fX(null,new h3(new Lw(n.f),1)),new jr),new Er),new Og(n)),kS(JJ(YJ(sin(sin(new fX(null,new h3(n.d.b,16)),new Sr),new Pr),new Cr),new Ir),new Lg(n))),c=new MO(M0n,M0n),t=new MO(T0n,T0n),r=new Ww(n.a.b);r.a0&&(t.a+=TZn),XWn(uG(Zkn(a),167),t);for(t.a+=Y4n,o=new Zx((!i.c&&(i.c=new f_(cFt,i,5,8)),i.c));o.e!=o.i.gc();)o.e>0&&(t.a+=TZn),XWn(uG(Zkn(o),167),t);t.a+=")"}}}function zWn(n,t,i){var r,c,a,o,u,s,f,l;for(s=new DD((!n.a&&(n.a=new fV(bFt,n,10,11)),n.a));s.e!=s.i.gc();)for(c=new Fz(ix(eRn(u=uG(Zkn(s),27)).a.Kc(),new h));hDn(c);){if(!(r=uG(N9(c),74)).b&&(r.b=new f_(cFt,r,4,7)),!(r.b.i<=1&&(!r.c&&(r.c=new f_(cFt,r,5,8)),r.c.i<=1)))throw hv(new EM("Graph must not contain hyperedges."));if(!z$n(r)&&u!=lCn(uG(zrn((!r.c&&(r.c=new f_(cFt,r,5,8)),r.c),0),84)))for(zsn(f=new $F,r),kfn(f,(mon(),Wft),r),Kb(f,uG(DA(FX(i.f,u)),153)),Bb(f,uG(cQ(i,lCn(uG(zrn((!r.c&&(r.c=new f_(cFt,r,5,8)),r.c),0),84))),153)),kD(t.c,f),o=new DD((!r.n&&(r.n=new fV(lFt,r,1,7)),r.n));o.e!=o.i.gc();)zsn(l=new A5(f,(a=uG(Zkn(o),135)).a),a),kfn(l,Wft,a),l.e.a=e.Math.max(a.g,1),l.e.b=e.Math.max(a.f,1),Yqn(l),kD(t.d,l)}}function VWn(n,t,i){var r,c,a,o,u,s,h,f;switch(i.Ug("Node promotion heuristic",1),n.i=t,n.r=uG(oIn(t,(jYn(),yMt)),243),n.r!=(THn(),Pjt)&&n.r!=Cjt?RQn(n):n_n(n),f=uG(oIn(n.i,kMt),17).a,a=new hi,n.r.g){case 2:case 1:default:nzn(n,a);break;case 3:for(n.r=Djt,nzn(n,a),s=0,u=new Ww(n.b);u.an.k&&(n.r=Ijt,nzn(n,a));break;case 4:for(n.r=Djt,nzn(n,a),h=0,c=new Ww(n.c);c.an.n&&(n.r=Ljt,nzn(n,a));break;case 6:nzn(n,new mg(t0(e.Math.ceil(n.g.length*f/100))));break;case 5:nzn(n,new vg(t0(e.Math.ceil(n.e*f/100))));break;case 8:IYn(n,!0);break;case 9:IYn(n,!1)}n.r!=Pjt&&n.r!=Cjt?JKn(n,t):BBn(n,t),i.Vg()}function WWn(n){var t,e,i,r,c,a,o,u,s,h,f,l,b,w,d,g,p;for(pF(u=new N4(s=n.b,0),new bQ(n)),g=!1,c=1;u.b0&&(b.d+=f.n.d,b.d+=f.d),b.a>0&&(b.a+=f.n.a,b.a+=f.d),b.b>0&&(b.b+=f.n.b,b.b+=f.d),b.c>0&&(b.c+=f.n.c,b.c+=f.d),b}function JWn(n,t,i){var r,c,a,o,u,s,h,f,l,b,w,d;for(b=i.d,l=i.c,o=(a=new MO(i.f.a+i.d.b+i.d.c,i.f.b+i.d.d+i.d.a)).b,h=new Ww(n.a);h.a0&&(n.c[t.c.p][t.p].d+=uRn(n.i,24)*z0n*.07000000029802322-.03500000014901161,n.c[t.c.p][t.p].a=n.c[t.c.p][t.p].d/n.c[t.c.p][t.p].b)}}function tQn(n){var t,e,i,r,c,a,o,u,s,h,f,l,b,w;for(l=new Ww(n);l.ar.d,r.d=e.Math.max(r.d,t),u&&i&&(r.d=e.Math.max(r.d,r.a),r.a=r.d+c);break;case 3:i=t>r.a,r.a=e.Math.max(r.a,t),u&&i&&(r.a=e.Math.max(r.a,r.d),r.d=r.a+c);break;case 2:i=t>r.c,r.c=e.Math.max(r.c,t),u&&i&&(r.c=e.Math.max(r.b,r.c),r.b=r.c+c);break;case 4:i=t>r.b,r.b=e.Math.max(r.b,t),u&&i&&(r.b=e.Math.max(r.b,r.c),r.c=r.b+c)}}}function rQn(n,t){var e,i,r,c,a,o,u,s,h;return s="",0==t.length?n.ne(L1n,O1n,-1,-1):(m_((h=KAn(t)).substr(0,3),"at ")&&(s3(3,h.length+1),h=h.substr(3)),-1==(a=(h=h.replace(/\[.*?\]/g,"")).indexOf("("))?-1==(a=h.indexOf("@"))?(s=h,h=""):(s=KAn((s3(a+1,h.length+1),h.substr(a+1))),h=KAn((Knn(0,a,h.length),h.substr(0,a)))):(Knn(a+1,e=h.indexOf(")",a),h.length),s=h.substr(a+1,e-(a+1)),h=KAn((Knn(0,a,h.length),h.substr(0,a)))),-1!=(a=xL(h,$Cn(46)))&&(s3(a+1,h.length+1),h=h.substr(a+1)),(0==h.length||m_(h,"Anonymous function"))&&(h=O1n),o=ax(s,$Cn(58)),r=T_(s,$Cn(58),o-1),u=-1,i=-1,c=L1n,-1!=o&&-1!=r&&(Knn(0,r,s.length),c=s.substr(0,r),u=rR((Knn(r+1,o,s.length),s.substr(r+1,o-(r+1)))),i=rR((s3(o+1,s.length+1),s.substr(o+1)))),n.ne(c,h,u,i))}function cQn(n){var t,e,i,r,c,a,o,u,s,h,f;for(s=new Ww(n);s.a0||h.j==_Rt&&h.e.c.length-h.g.c.length<0)){t=!1;break}for(r=new Ww(h.g);r.a=h&&M>=p&&(b+=d.n.b+g.n.b+g.a.b-y,++u));if(i)for(o=new Ww(v.e);o.a=h&&M>=p&&(b+=d.n.b+g.n.b+g.a.b-y,++u))}u>0&&(T+=b/u,++w)}w>0?(t.a=c*T/w,t.g=w):(t.a=0,t.g=0)}function oQn(n){var t,e,i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y,M,T;for(l=(c=n.f.b).a,h=c.b,w=n.e.g,b=n.e.f,vN(n.e,c.a,c.b),M=l/w,T=h/b,s=new DD(xJ(n.e));s.e!=s.i.gc();)ycn(u=uG(Zkn(s),135),u.i*M),Mcn(u,u.j*T);for(m=new DD(RJ(n.e));m.e!=m.i.gc();)k=(p=uG(Zkn(m),123)).i,y=p.j,k>0&&ycn(p,k*M),y>0&&Mcn(p,y*T);for(Yun(n.b,new ft),t=new Zm,o=new bsn(new Nw(n.c).a);o.b;)i=uG((a=von(o)).ld(),74),e=uG(a.md(),407).a,r=JFn(i,!1,!1),sqn(f=YPn(bIn(i),COn(r),e),r),(v=wIn(i))&&-1==Ten(t,v,0)&&(mv(t.c,v),iY(v,(MK(0!=f.b),uG(f.a.a.c,8)),e));for(g=new bsn(new Nw(n.d).a);g.b;)i=uG((d=von(g)).ld(),74),e=uG(d.md(),407).a,r=JFn(i,!1,!1),f=YPn(gIn(i),fln(COn(r)),e),sqn(f=fln(f),r),(v=dIn(i))&&-1==Ten(t,v,0)&&(mv(t.c,v),iY(v,(MK(0!=f.b),uG(f.c.b.c,8)),e))}function uQn(n,t,e,i){var r,c,a,o,u;return sKn(o=new EQn(t),i),r=!0,n&&n.pf((XYn(),d$t))&&(r=(c=uG(n.of((XYn(),d$t)),88))==(xdn(),ZDt)||c==JDt||c==YDt),iBn(o,!1),Prn(o.e.Rf(),new DB(o,!1,r)),W1(o,o.f,(Yrn(),jst),(KQn(),yRt)),W1(o,o.f,Sst,KRt),W1(o,o.g,jst,_Rt),W1(o,o.g,Sst,kRt),gyn(o,yRt),gyn(o,KRt),IJ(o,kRt),IJ(o,_Rt),VK(),(a=o.A.Hc((Qmn(),VRt))&&o.B.Hc((aUn(),rKt))?xmn(o):null)&&dT(o.a,a),iQn(o),BTn(o),HTn(o),wWn(o),aGn(o),iEn(o),dkn(o,yRt),dkn(o,KRt),IBn(o),Tzn(o),e?(wpn(o),rEn(o),dkn(o,kRt),dkn(o,_Rt),u=o.B.Hc((aUn(),cKt)),dLn(o,u,yRt),dLn(o,u,KRt),gLn(o,u,kRt),gLn(o,u,_Rt),kS(new fX(null,new h3(new Fw(o.i),0)),new Cn),kS(JJ(new fX(null,FW(o.r).a.oc()),new In),new On),jPn(o),o.e.Pf(o.o),kS(new fX(null,FW(o.r).a.oc()),new An),o.o):o.o}function sQn(n){var t,i,r,c,a,o,u,s,h,f,l,b,w,d,g;for(h=M0n,r=new Ww(n.a.b);r.a1)for(z8(v,new BI(n,b=new Izn(w,v,r))),mv(o.c,b),f=v.a.ec().Kc();f.Ob();)men(a,uG(f.Pb(),42).b);if(u.a.gc()>1)for(z8(u,new HI(n,b=new Izn(w,u,r))),mv(o.c,b),f=u.a.ec().Kc();f.Ob();)men(a,uG(f.Pb(),42).b)}}function dQn(n,t,i){var r,c,a,o,u,s,h,f,l,b,w,d,g,p,m;if(g=n.n,p=n.o,b=n.d,l=uM(pK(Omn(n,(jYn(),lTt)))),t){for(f=l*(t.gc()-1),w=0,s=t.Kc();s.Ob();)f+=(o=uG(s.Pb(),10)).o.a,w=e.Math.max(w,o.o.b);for(m=g.a-(f-p.a)/2,a=g.b-b.d+w,c=r=p.a/(t.gc()+1),u=t.Kc();u.Ob();)(o=uG(u.Pb(),10)).n.a=m,o.n.b=a-o.o.b,m+=o.o.a+l,(h=ERn(o)).n.a=o.o.a/2-h.a.a,h.n.b=o.o.b,(d=uG(oIn(o,(GYn(),Ppt)),12)).e.c.length+d.g.c.length==1&&(d.n.a=c-d.a.a,d.n.b=0,o2(d,n)),c+=r}if(i){for(f=l*(i.gc()-1),w=0,s=i.Kc();s.Ob();)f+=(o=uG(s.Pb(),10)).o.a,w=e.Math.max(w,o.o.b);for(m=g.a-(f-p.a)/2,a=g.b+p.b+b.a-w,c=r=p.a/(i.gc()+1),u=i.Kc();u.Ob();)(o=uG(u.Pb(),10)).n.a=m,o.n.b=a,m+=o.o.a+l,(h=ERn(o)).n.a=o.o.a/2-h.a.a,h.n.b=0,(d=uG(oIn(o,(GYn(),Ppt)),12)).e.c.length+d.g.c.length==1&&(d.n.a=c-d.a.a,d.n.b=p.b,o2(d,n)),c+=r}}function gQn(n,t){var i,r,c,a,o,u;if(uG(oIn(t,(GYn(),Hpt)),21).Hc((r_n(),tpt))){for(u=new Ww(t.a);u.a=0&&a0&&(uG(AJ(n.b,t),127).a.b=i)}function TQn(n,t,e,i){var r,c,a,o,u,s,h,f,l,b,w,d;if(l=uM(pK(oIn(n,(jYn(),TTt)))),b=uM(pK(oIn(n,jTt))),f=uM(pK(oIn(n,yTt))),o=n.o,a=(c=uG(zq(n.j,0),12)).n,d=hAn(c,f)){if(t.Hc((eNn(),wRt)))switch(uG(oIn(n,(GYn(),Fpt)),64).g){case 1:d.c=(o.a-d.b)/2-a.a,d.d=b;break;case 3:d.c=(o.a-d.b)/2-a.a,d.d=-b-d.a;break;case 2:e&&0==c.e.c.length&&0==c.g.c.length?(h=i?d.a:uG(zq(c.f,0),72).o.b,d.d=(o.b-h)/2-a.b):d.d=o.b+b-a.b,d.c=-l-d.b;break;case 4:e&&0==c.e.c.length&&0==c.g.c.length?(h=i?d.a:uG(zq(c.f,0),72).o.b,d.d=(o.b-h)/2-a.b):d.d=o.b+b-a.b,d.c=l}else if(t.Hc(gRt))switch(uG(oIn(n,(GYn(),Fpt)),64).g){case 1:case 3:d.c=a.a+l;break;case 2:case 4:e&&!c.c?(h=i?d.a:uG(zq(c.f,0),72).o.b,d.d=(o.b-h)/2-a.b):d.d=a.b+b}for(r=d.d,s=new Ww(c.f);s.a=n.length)return{done:!0};var i=n[e++];return{value:[i,t.get(i)],done:!1}}}},__n()||(n.prototype.createObject=function(){return{}},n.prototype.get=function(n){return this.obj[":"+n]},n.prototype.set=function(n,t){this.obj[":"+n]=t},n.prototype[U0n]=function(n){delete this.obj[":"+n]},n.prototype.keys=function(){var n=[];for(var t in this.obj)58==t.charCodeAt(0)&&n.push(t.substring(1));return n}),n}function OQn(){OQn=E,RPt=new Cm(E4n),new Cm(S4n),new uF("DEPTH",xwn(0)),EPt=new uF("FAN",xwn(0)),TPt=new uF(Q9n,xwn(0)),UPt=new uF("ROOT",(qx(),!1)),APt=new uF("LEFTNEIGHBOR",null),BPt=new uF("RIGHTNEIGHBOR",null),LPt=new uF("LEFTSIBLING",null),HPt=new uF("RIGHTSIBLING",null),jPt=new uF("DUMMY",!1),new uF("LEVEL",xwn(0)),_Pt=new uF("REMOVABLE_EDGES",new lS),GPt=new uF("XCOOR",xwn(0)),qPt=new uF("YCOOR",xwn(0)),NPt=new uF("LEVELHEIGHT",0),DPt=new uF("LEVELMIN",0),$Pt=new uF("LEVELMAX",0),PPt=new uF("GRAPH_XMIN",0),IPt=new uF("GRAPH_YMIN",0),SPt=new uF("GRAPH_XMAX",0),CPt=new uF("GRAPH_YMAX",0),MPt=new uF("COMPACT_LEVEL_ASCENSION",!1),yPt=new uF("COMPACT_CONSTRAINTS",new Zm),OPt=new uF("ID",""),KPt=new uF("POSITION",xwn(0)),FPt=new uF("PRELIM",0),xPt=new uF("MODIFIER",0),kPt=new Cm(P4n),vPt=new Cm(C4n)}function AQn(n){var t,e,i,r,c,a,o,u,s,h,f,l,b,w,d;if(NGn(),null==n)return null;if(0==(f=8*n.length))return"";for(l=f/24|0,c=null,c=Inn(JHt,N1n,28,4*(0!=(o=f%24)?l+1:l),15,1),s=0,h=0,t=0,e=0,i=0,a=0,r=0,u=0;u>24,s=(3&t)<<24>>24,b=-128&t?(t>>2^192)<<24>>24:t>>2<<24>>24,w=-128&e?(e>>4^240)<<24>>24:e>>4<<24>>24,d=-128&(i=n[r++])?(i>>6^252)<<24>>24:i>>6<<24>>24,c[a++]=gHt[b],c[a++]=gHt[w|s<<4],c[a++]=gHt[h<<2|d],c[a++]=gHt[63&i];return 8==o?(s=(3&(t=n[r]))<<24>>24,b=-128&t?(t>>2^192)<<24>>24:t>>2<<24>>24,c[a++]=gHt[b],c[a++]=gHt[s<<4],c[a++]=61,c[a++]=61):16==o&&(t=n[r],h=(15&(e=n[r+1]))<<24>>24,s=(3&t)<<24>>24,b=-128&t?(t>>2^192)<<24>>24:t>>2<<24>>24,w=-128&e?(e>>4^240)<<24>>24:e>>4<<24>>24,c[a++]=gHt[b],c[a++]=gHt[w|s<<4],c[a++]=gHt[h<<2],c[a++]=61),mvn(c,0,c.length)}function LQn(n,t){var i,r,c,a,o,u;if(0==n.e&&n.p>0&&(n.p=-(n.p-1)),n.p>j1n&&F5(t,n.p-V1n),o=t.q.getDate(),k0(t,1),n.k>=0&&H0(t,n.k),n.c>=0?k0(t,n.c):n.k>=0?(r=35-new Lfn(t.q.getFullYear()-V1n,t.q.getMonth(),35).q.getDate(),k0(t,e.Math.min(r,o))):k0(t,o),n.f<0&&(n.f=t.q.getHours()),n.b>0&&n.f<12&&(n.f+=12),tD(t,24==n.f&&n.g?0:n.f),n.j>=0&&y7(t,n.j),n.n>=0&&Nnn(t,n.n),n.i>=0&&TL(t,Lgn(Ngn(bSn(Bsn(t.q.getTime()),$1n),$1n),n.i)),n.a&&(F5(c=new QE,c.q.getFullYear()-V1n-80),$P(Bsn(t.q.getTime()),Bsn(c.q.getTime()))&&F5(t,c.q.getFullYear()-V1n+100)),n.d>=0)if(-1==n.c)(i=(7+n.d-t.q.getDay())%7)>3&&(i-=7),u=t.q.getMonth(),k0(t,t.q.getDate()+i),t.q.getMonth()!=u&&k0(t,t.q.getDate()+(i>0?-7:7));else if(t.q.getDay()!=n.d)return!1;return n.o>j1n&&(a=t.q.getTimezoneOffset(),TL(t,Lgn(Bsn(t.q.getTime()),60*(n.o-a)*$1n))),!0}function NQn(n,t){var e,i,r,c,a,o,u,s,h,f,l,b,w,d,g,p;if(F$(r=oIn(t,(GYn(),rmt)),207)){for(b=uG(r,27),w=t.e,f=new eN(t.c),c=t.d,f.a+=c.b,f.b+=c.d,$x(uG(zDn(b,(jYn(),KMt)),181),(aUn(),tKt))&&(Ab(l=uG(zDn(b,_Mt),107),c.a),_b(l,c.d),Lb(l,c.b),Fb(l,c.c)),e=new Zm,s=new Ww(t.a);s.ai.c.length-1;)kD(i,new WO(B3n,G9n));e=uG(oIn(r,ACt),17).a,hN(uG(oIn(n,cCt),88))?(r.e.auM(pK((u3(e,i.c.length),uG(i.c[e],42)).b))&&sw((u3(e,i.c.length),uG(i.c[e],42)),r.e.a+r.f.a)):(r.e.buM(pK((u3(e,i.c.length),uG(i.c[e],42)).b))&&sw((u3(e,i.c.length),uG(i.c[e],42)),r.e.b+r.f.b))}for(c=Fkn(n.b,0);c.b!=c.d.c;)r=uG(I6(c),40),e=uG(oIn(r,(QGn(),ACt)),17).a,kfn(r,(OQn(),DPt),pK((u3(e,i.c.length),uG(i.c[e],42)).a)),kfn(r,$Pt,pK((u3(e,i.c.length),uG(i.c[e],42)).b));t.Vg()}function RQn(n){var t,i,r,c,a,o,u,s,f,l,b,w,d,g,p;for(n.o=uM(pK(oIn(n.i,(jYn(),ETt)))),n.f=uM(pK(oIn(n.i,vTt))),n.j=n.i.b.c.length,u=n.j-1,w=0,n.k=0,n.n=0,n.b=n7(Inn(dot,zZn,17,n.j,0,1)),n.c=n7(Inn(fot,zZn,345,n.j,7,1)),o=new Ww(n.i.b);o.a0&&kD(n.q,l),kD(n.p,l);d=s+(t-=r),f+=t*n.f,Y8(n.b,u,xwn(d)),Y8(n.c,u,f),n.k=e.Math.max(n.k,d),n.n=e.Math.max(n.n,f),n.e+=t,t+=p}}function KQn(){var n;KQn=E,FRt=new RO(Y2n,0),yRt=new RO(o3n,1),kRt=new RO(u3n,2),KRt=new RO(s3n,3),_Rt=new RO(h3n,4),hZ(),SRt=new nT(new nB(n=uG(Mj(YRt),9),uG(MF(n,n.length),9),0)),PRt=Nwn(WX(yRt,Uhn(cT(YRt,1),z4n,64,0,[]))),MRt=Nwn(WX(kRt,Uhn(cT(YRt,1),z4n,64,0,[]))),DRt=Nwn(WX(KRt,Uhn(cT(YRt,1),z4n,64,0,[]))),RRt=Nwn(WX(_Rt,Uhn(cT(YRt,1),z4n,64,0,[]))),LRt=Nwn(WX(yRt,Uhn(cT(YRt,1),z4n,64,0,[KRt]))),ERt=Nwn(WX(kRt,Uhn(cT(YRt,1),z4n,64,0,[_Rt]))),$Rt=Nwn(WX(yRt,Uhn(cT(YRt,1),z4n,64,0,[_Rt]))),CRt=Nwn(WX(yRt,Uhn(cT(YRt,1),z4n,64,0,[kRt]))),xRt=Nwn(WX(KRt,Uhn(cT(YRt,1),z4n,64,0,[_Rt]))),TRt=Nwn(WX(kRt,Uhn(cT(YRt,1),z4n,64,0,[KRt]))),ARt=Nwn(WX(yRt,Uhn(cT(YRt,1),z4n,64,0,[kRt,_Rt]))),jRt=Nwn(WX(kRt,Uhn(cT(YRt,1),z4n,64,0,[KRt,_Rt]))),NRt=Nwn(WX(yRt,Uhn(cT(YRt,1),z4n,64,0,[KRt,_Rt]))),IRt=Nwn(WX(yRt,Uhn(cT(YRt,1),z4n,64,0,[kRt,KRt]))),ORt=Nwn(WX(yRt,Uhn(cT(YRt,1),z4n,64,0,[kRt,KRt,_Rt])))}function FQn(n,t){var e,i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y;for(t.Ug(j6n,1),w=new Zm,k=new Zm,s=new Ww(n.b);s.a0&&(y-=d),Vzn(o,y),l=0,w=new Ww(o.a);w.a0),u.a.Xb(u.c=--u.b)),s=.4*r*l,!a&&u.b0&&(s3(0,t.length),64!=(o=t.charCodeAt(0)))){if(37==o&&(u=!1,0!=(h=t.lastIndexOf("%"))&&(h==f-1||(s3(h+1,t.length),u=46==t.charCodeAt(h+1))))){if(Knn(1,h,t.length),m=m_("%",a=t.substr(1,h-1))?null:eJn(a),i=0,u)try{i=mUn((s3(h+2,t.length+1),t.substr(h+2)),j1n,vZn)}catch(v){throw F$(v=Ehn(v),130)?hv(new Pen(v)):hv(v)}for(d=kon(n.Gh());d.Ob();)if(F$(b=Ksn(d),519)&&(p=(r=uG(b,598)).d,(null==m?null==p:m_(m,p))&&0==i--))return r;return null}if(l=-1==(s=t.lastIndexOf("."))?t:(Knn(0,s,t.length),t.substr(0,s)),e=0,-1!=s)try{e=mUn((s3(s+1,t.length+1),t.substr(s+1)),j1n,vZn)}catch(v){if(!F$(v=Ehn(v),130))throw hv(v);l=t}for(l=m_("%",l)?null:eJn(l),w=kon(n.Gh());w.Ob();)if(F$(b=Ksn(w),197)&&(g=(c=uG(b,197)).xe(),(null==l?null==g:m_(l,g))&&0==e--))return c;return null}return jWn(n,t)}function WQn(n){var t,e,i,r,c,a,o,u,s,f,l,b,w,d,g,p,m;for(s=new Ym,o=new K1,i=new Ww(n.a.a.b);i.at.d.c){if((b=n.c[t.a.d])==(g=n.c[f.a.d]))continue;RKn(xS(DS(RS($S(new uk,1),100),b),g))}}}function QQn(n,t){var i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y,M,T;if(b=uG(uG(Y9(n.r,t),21),87),t!=(KQn(),kRt)&&t!=_Rt){for(a=t==yRt?(ehn(),wht):(ehn(),pht),y=t==yRt?(Yen(),Fst):(Yen(),Rst),c=(r=(i=uG(AJ(n.b,t),127)).i).c+Trn(Uhn(cT(eUt,1),I0n,28,15,[i.n.b,n.C.b,n.k])),m=r.c+r.b-Trn(Uhn(cT(eUt,1),I0n,28,15,[i.n.c,n.C.c,n.k])),o=TT(BB(a),n.t),v=t==yRt?T0n:M0n,l=b.Kc();l.Ob();)!(h=uG(l.Pb(),117)).c||h.c.d.c.length<=0||(p=h.b.Mf(),g=h.e,(d=(w=h.c).i).b=(s=w.n,w.e.a+s.b+s.c),d.a=(u=w.n,w.e.b+u.d+u.a),ZZ(y,W2n),w.f=y,etn(w,(Ktn(),Lst)),d.c=g.a-(d.b-p.a)/2,M=e.Math.min(c,g.a),T=e.Math.max(m,g.a+p.a),d.cT&&(d.c=T-d.b),kD(o.d,new ZX(d,Hdn(o,d))),v=t==yRt?e.Math.max(v,g.b+h.b.Mf().b):e.Math.min(v,g.b));for(v+=t==yRt?n.t:-n.t,(k=cmn((o.e=v,o)))>0&&(uG(AJ(n.b,t),127).a.b=k),f=b.Kc();f.Ob();)!(h=uG(f.Pb(),117)).c||h.c.d.c.length<=0||((d=h.c.i).c-=h.e.a,d.d-=h.e.b)}else MQn(n,t)}function JQn(n){var t,e,i,r,c,a,o,u,s,f;for(t=new Ym,a=new DD(n);a.e!=a.i.gc();){for(c=uG(Zkn(a),27),e=new ek,vJ(cft,c,e),f=new at,i=uG(l8(new fX(null,new LW(new Fz(ix(tRn(c).a.Kc(),new h)))),HX(f,ftn(new V,new z,new en,Uhn(cT(Rut,1),p1n,108,0,[(ybn(),Iut)])))),85),Ycn(e,uG(i.xc((qx(),!0)),16),new ot),r=uG(l8(JJ(uG(i.xc(!1),15).Lc(),new ut),ftn(new V,new z,new en,Uhn(cT(Rut,1),p1n,108,0,[Iut]))),15).Kc();r.Ob();)(s=wIn(uG(r.Pb(),74)))&&((o=uG(DA(FX(t.f,s)),21))||(o=TFn(s),VAn(t.f,s,o)),Qon(e,o));for(i=uG(l8(new fX(null,new LW(new Fz(ix(eRn(c).a.Kc(),new h)))),HX(f,ftn(new V,new z,new en,Uhn(cT(Rut,1),p1n,108,0,[Iut])))),85),Ycn(e,uG(i.xc(!0),16),new st),u=uG(l8(JJ(uG(i.xc(!1),15).Lc(),new ht),ftn(new V,new z,new en,Uhn(cT(Rut,1),p1n,108,0,[Iut]))),15).Kc();u.Ob();)(s=dIn(uG(u.Pb(),74)))&&((o=uG(DA(FX(t.f,s)),21))||(o=TFn(s),VAn(t.f,s,o)),Qon(e,o))}}function YQn(n,t){var e,i,r,c,a,o,u,s,h,f,l,b,w,d;if(pXn(),(u=dwn(n,0)<0)&&(n=Men(n)),0==dwn(n,0))switch(t){case 0:return"0";case 1:return N0n;case 2:return"0.00";case 3:return"0.000";case 4:return"0.0000";case 5:return"0.00000";case 6:return"0.000000";default:return(b=new WM).a+=t<0?"0E+":"0E",b.a+=t==j1n?"2147483648":""+-t,b.a}f=Inn(JHt,N1n,28,1+(h=18),15,1),e=h,d=n;do{s=d,d=bSn(d,10),f[--e]=pz(Lgn(48,$gn(s,Ngn(d,10))))&D1n}while(0!=dwn(d,0));if(r=$gn($gn($gn(h,e),t),1),0==t)return u&&(f[--e]=45),mvn(f,e,h-e);if(t>0&&dwn(r,-6)>=0){if(dwn(r,0)>=0){for(c=e+pz(r),o=h-1;o>=c;o--)f[o+1]=f[o];return f[++c]=46,u&&(f[--e]=45),mvn(f,e,h-e+1)}for(a=2;$P(a,Lgn(Men(r),1));a++)f[--e]=48;return f[--e]=46,f[--e]=48,u&&(f[--e]=45),mvn(f,e,h-e)}return w=e+1,i=h,l=new QM,u&&(l.a+="-"),i-w>=1?(jQ(l,f[e]),l.a+=".",l.a+=mvn(f,e+1,h-e-1)):l.a+=mvn(f,e,h-e),l.a+="E",dwn(r,0)>0&&(l.a+="+"),l.a+=""+oV(r),l.a}function ZQn(n,t,i,r,c){var a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y,M,T;if(p=new MO(n.g,n.f),(g=xAn(n)).a=e.Math.max(g.a,t),g.b=e.Math.max(g.b,i),T=g.a/p.a,f=g.b/p.b,y=g.a-p.a,s=g.b-p.b,r)for(o=R0(n)?uG(zDn(R0(n),(XYn(),d$t)),88):uG(zDn(n,(XYn(),d$t)),88),u=xA(zDn(n,(XYn(),sDt)))===xA(($Pn(),cRt)),v=new DD((!n.c&&(n.c=new fV(wFt,n,9,9)),n.c));v.e!=v.i.gc();)switch(m=uG(Zkn(v),123),(k=uG(zDn(m,gDt),64))==(KQn(),FRt)&&(k=RGn(m,o),Myn(m,gDt,k)),k.g){case 1:u||ycn(m,m.i*T);break;case 2:ycn(m,m.i+y),u||Mcn(m,m.j*f);break;case 3:u||ycn(m,m.i*T),Mcn(m,m.j+s);break;case 4:u||Mcn(m,m.j*f)}if(vN(n,g.a,g.b),c)for(b=new DD((!n.n&&(n.n=new fV(lFt,n,1,7)),n.n));b.e!=b.i.gc();)w=(l=uG(Zkn(b),135)).i+l.g/2,d=l.j+l.f/2,(M=w/p.a)+(h=d/p.b)>=1&&(M-h>0&&d>=0?(ycn(l,l.i+y),Mcn(l,l.j+s*h)):M-h<0&&w>=0&&(ycn(l,l.i+y*M),Mcn(l,l.j+s)));return Myn(n,(XYn(),_$t),(Qmn(),new nB(a=uG(Mj(sKt),9),uG(MF(a,a.length),9),0))),new MO(T,f)}function nJn(n){hP(n,new hCn(xT(FT(DT(KT(RT(new bu,x7n),"ELK Radial"),'A radial layout provider which is based on the algorithm of Peter Eades published in "Drawing free trees.", published by International Institute for Advanced Study of Social Information Science, Fujitsu Limited in 1991. The radial layouter takes a tree and places the nodes in radial order around the root. The nodes of the same tree level are placed on the same radius.'),new Oo),x7n))),U4(n,x7n,b9n,Jkn(BIt)),U4(n,x7n,o4n,Jkn(VIt)),U4(n,x7n,p4n,Jkn($It)),U4(n,x7n,x4n,Jkn(DIt)),U4(n,x7n,g4n,Jkn(xIt)),U4(n,x7n,m4n,Jkn(NIt)),U4(n,x7n,w4n,Jkn(RIt)),U4(n,x7n,v4n,Jkn(_It)),U4(n,x7n,P7n,Jkn(AIt)),U4(n,x7n,S7n,Jkn(LIt)),U4(n,x7n,E7n,Jkn(UIt)),U4(n,x7n,A7n,Jkn(XIt)),U4(n,x7n,L7n,Jkn(GIt)),U4(n,x7n,N7n,Jkn(qIt)),U4(n,x7n,O7n,Jkn(KIt)),U4(n,x7n,T7n,Jkn(FIt)),U4(n,x7n,j7n,Jkn(HIt)),U4(n,x7n,C7n,Jkn(zIt)),U4(n,x7n,I7n,Jkn(WIt)),U4(n,x7n,M7n,Jkn(OIt))}function tJn(n){var t,e,i,r,c,a,o,u,s,h,f;if(null==n)throw hv(new ZM(IZn));if(s=n,u=!1,(c=n.length)>0&&(s3(0,n.length),45!=(t=n.charCodeAt(0))&&43!=t||(s3(1,n.length+1),n=n.substr(1),--c,u=45==t)),0==c)throw hv(new ZM(y0n+s+'"'));for(;n.length>0&&(s3(0,n.length),48==n.charCodeAt(0));)s3(1,n.length+1),n=n.substr(1),--c;if(c>(lGn(),vot)[10])throw hv(new ZM(y0n+s+'"'));for(r=0;r0&&(f=-parseInt((Knn(0,i,n.length),n.substr(0,i)),10),s3(i,n.length+1),n=n.substr(i),c-=i,e=!1);c>=a;){if(i=parseInt((Knn(0,a,n.length),n.substr(0,a)),10),s3(a,n.length+1),n=n.substr(a),c-=a,e)e=!1;else{if(dwn(f,o)<0)throw hv(new ZM(y0n+s+'"'));f=Ngn(f,h)}f=$gn(f,i)}if(dwn(f,0)>0)throw hv(new ZM(y0n+s+'"'));if(!u&&dwn(f=Men(f),0)<0)throw hv(new ZM(y0n+s+'"'));return f}function eJn(n){var t,e,i,r,c,a,o,u;if(YXn(),null==n)return null;if((r=xL(n,$Cn(37)))<0)return n;for(u=new lx((Knn(0,r,n.length),n.substr(0,r))),t=Inn(tUt,ret,28,4,15,1),o=0,i=0,a=n.length;rr+2&&mfn((s3(r+1,n.length),n.charCodeAt(r+1)),QFt,JFt)&&mfn((s3(r+2,n.length),n.charCodeAt(r+2)),QFt,JFt))if(e=AG((s3(r+1,n.length),n.charCodeAt(r+1)),(s3(r+2,n.length),n.charCodeAt(r+2))),r+=2,i>0?128==(192&e)?t[o++]=e<<24>>24:i=0:e>=128&&(192==(224&e)?(t[o++]=e<<24>>24,i=2):224==(240&e)?(t[o++]=e<<24>>24,i=3):240==(248&e)&&(t[o++]=e<<24>>24,i=4)),i>0){if(o==i){switch(o){case 2:jQ(u,((31&t[0])<<6|63&t[1])&D1n);break;case 3:jQ(u,((15&t[0])<<12|(63&t[1])<<6|63&t[2])&D1n)}o=0,i=0}}else{for(c=0;c=2){if(0==(!n.a&&(n.a=new fV(oFt,n,6,6)),n.a).i)gj(),i=new is,ttn((!n.a&&(n.a=new fV(oFt,n,6,6)),n.a),i);else if((!n.a&&(n.a=new fV(oFt,n,6,6)),n.a).i>1)for(l=new Zx((!n.a&&(n.a=new fV(oFt,n,6,6)),n.a));l.e!=l.i.gc();)$Sn(l);sqn(t,uG(zrn((!n.a&&(n.a=new fV(oFt,n,6,6)),n.a),0),166))}if(f)for(r=new DD((!n.a&&(n.a=new fV(oFt,n,6,6)),n.a));r.e!=r.i.gc();)for(s=new DD((!(i=uG(Zkn(r),166)).a&&(i.a=new MD(eFt,i,5)),i.a));s.e!=s.i.gc();)u=uG(Zkn(s),377),o.a=e.Math.max(o.a,u.a),o.b=e.Math.max(o.b,u.b);for(a=new DD((!n.n&&(n.n=new fV(lFt,n,1,7)),n.n));a.e!=a.i.gc();)c=uG(Zkn(a),135),(h=uG(zDn(c,Cxt),8))&&kN(c,h.a,h.b),f&&(o.a=e.Math.max(o.a,c.i+c.g),o.b=e.Math.max(o.b,c.j+c.f));return o}function rJn(n,t,e,i,r){var c,a,o;if(win(n,t),a=t[0],c=VJ(e.c,0),o=-1,Jfn(e))if(i>0){if(a+i>n.length)return!1;o=RNn((Knn(0,a+i,n.length),n.substr(0,a+i)),t)}else o=RNn(n,t);switch(c){case 71:return o=XOn(n,a,Uhn(cT($ot,1),zZn,2,6,[Q1n,J1n]),t),r.e=o,!0;case 77:return c_n(n,t,r,o,a);case 76:return a_n(n,t,r,o,a);case 69:return XAn(n,t,a,r);case 99:return zAn(n,t,a,r);case 97:return o=XOn(n,a,Uhn(cT($ot,1),zZn,2,6,["AM","PM"]),t),r.b=o,!0;case 121:return o_n(n,t,a,o,e,r);case 100:return!(o<=0||(r.c=o,0));case 83:return!(o<0)&&tmn(o,a,t[0],r);case 104:12==o&&(o=0);case 75:case 72:return!(o<0||(r.f=o,r.g=!1,0));case 107:return!(o<0||(r.f=o,r.g=!0,0));case 109:return!(o<0||(r.j=o,0));case 115:return!(o<0||(r.n=o,0));case 90:if(aT[s]&&(d=s),f=new Ww(n.a.b);f.a1;){if(c=nKn(t),l=a.g,d=uG(zDn(t,hAt),107),g=uM(pK(zDn(t,VOt))),(!t.a&&(t.a=new fV(bFt,t,10,11)),t.a).i>1&&uM(pK(zDn(t,(lBn(),jOt))))!=M0n&&(a.c+(d.b+d.c))/(a.b+(d.d+d.a))1&&uM(pK(zDn(t,(lBn(),TOt))))!=M0n&&(a.c+(d.b+d.c))/(a.b+(d.d+d.a))>g&&Myn(c,(lBn(),POt),e.Math.max(uM(pK(zDn(t,EOt))),uM(pK(zDn(c,POt)))-uM(pK(zDn(t,TOt))))),(h=(s=kYn(w=new vO(r,f),c,b)).g)>=l&&h==h){for(o=0;o<(!c.a&&(c.a=new fV(bFt,c,10,11)),c.a).i;o++)mNn(n,uG(zrn((!c.a&&(c.a=new fV(bFt,c,10,11)),c.a),o),27),uG(zrn((!t.a&&(t.a=new fV(bFt,t,10,11)),t.a),o),27));Irn(t,w),x1(a,s.c),D1(a,s.b)}--u}Myn(t,(lBn(),mOt),a.b),Myn(t,vOt,a.c),i.Vg()}function uJn(n,t){var i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v;for(t.Ug("Interactive node layering",1),i=new Zm,b=new Ww(n.a);b.a=u){MK(v.b>0),v.a.Xb(v.c=--v.b);break}p.a>s&&(r?(Ohn(r.b,p.b),r.a=e.Math.max(r.a,p.a),LQ(v)):(kD(p.b,f),p.c=e.Math.min(p.c,s),p.a=e.Math.max(p.a,u),r=p))}r||((r=new Mk).c=s,r.a=u,pF(v,r),kD(r.b,f))}for(o=n.b,h=0,m=new Ww(i);m.aw&&(a&&(cL(M,b),cL(j,xwn(h.b-1))),I=i.b,O+=b+t,b=0,f=e.Math.max(f,i.b+i.c+C)),ycn(u,I),Mcn(u,O),f=e.Math.max(f,I+C+i.c),b=e.Math.max(b,l),I+=C+t;if(f=e.Math.max(f,r),(P=O+b+i.a)t4n,S=e.Math.abs(b.b-d.b)>t4n,(!i&&E&&S||i&&(E||S))&&aq(p.a,y)),Qon(p.a,r),0==r.b?b=y:(MK(0!=r.b),b=uG(r.c.b.c,8)),hhn(w,l,g),kun(c)==j&&(HQ(j.i)!=c.a&&pAn(g=new sj,HQ(j.i),v),kfn(p,Smt,g)),sOn(w,p,v),f.a.zc(w,f);c2(p,M),u2(p,j)}for(h=f.a.ec().Kc();h.Ob();)c2(s=uG(h.Pb(),18),null),u2(s,null);t.Vg()}function fJn(n,t){var e,i,r,c,a,o,u,s,h,f,l;for(h=(r=uG(oIn(n,(QGn(),cCt)),88))==(xdn(),JDt)||r==YDt?QDt:YDt,e=uG(l8(JJ(new fX(null,new h3(n.b,16)),new $a),ftn(new V,new z,new en,Uhn(cT(Rut,1),p1n,108,0,[(ybn(),Iut)]))),15),(u=uG(l8(YJ(e.Oc(),new Pp(t)),ftn(new V,new z,new en,Uhn(cT(Rut,1),p1n,108,0,[Iut]))),15)).Gc(uG(l8(YJ(e.Oc(),new Cp(t)),ftn(new V,new z,new en,Uhn(cT(Rut,1),p1n,108,0,[Iut]))),16)),u.jd(new Ip(h)),l=new Hj(new Op(r)),i=new Ym,o=u.Kc();o.Ob();)a=uG(o.Pb(),240),s=uG(a.a,40),oM(gK(a.c))?(l.a.zc(s,(qx(),tot)),new od(l.a.Zc(s,!1)).a.gc()>0&&vJ(i,s,uG(new od(l.a.Zc(s,!1)).a.Vc(),40)),new od(l.a.ad(s,!0)).a.gc()>1&&vJ(i,wmn(l,s),s)):(new od(l.a.Zc(s,!1)).a.gc()>0&&xA(c=uG(new od(l.a.Zc(s,!1)).a.Vc(),40))===xA(DA(FX(i.f,s)))&&uG(oIn(s,(OQn(),yPt)),15).Fc(c),new od(l.a.ad(s,!0)).a.gc()>1&&(f=wmn(l,s),xA(DA(FX(i.f,f)))===xA(s)&&uG(oIn(f,(OQn(),yPt)),15).Fc(s)),l.a.Bc(s))}function lJn(n){var t,i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y;if(1==n.gc())return uG(n.Xb(0),235);if(n.gc()<=0)return new d7;for(c=n.Kc();c.Ob();){for(i=uG(c.Pb(),235),d=0,f=vZn,l=vZn,s=j1n,h=j1n,w=new Ww(i.e);w.au&&(k=0,y+=o+m,o=0),tUn(g,i,k,y),t=e.Math.max(t,k+p.a),o=e.Math.max(o,p.b),k+=p.a+m;return g}function bJn(n){var t,e,i,r,c,a,o,u,s,h,f,l,b,w,d,g;if(NGn(),null==n)return null;if((w=hgn(c=_en(n)))%4!=0)return null;if(0==(d=w/4|0))return Inn(tUt,ret,28,0,15,1);for(f=null,t=0,e=0,i=0,r=0,a=0,o=0,u=0,s=0,b=0,l=0,h=0,f=Inn(tUt,ret,28,3*d,15,1);b>4)<<24>>24,f[l++]=((15&e)<<4|i>>2&15)<<24>>24,f[l++]=(i<<6|r)<<24>>24}return mE(a=c[h++])&&mE(o=c[h++])?(t=dHt[a],e=dHt[o],u=c[h++],s=c[h++],-1==dHt[u]||-1==dHt[s]?61==u&&61==s?15&e?null:(qGn(f,0,g=Inn(tUt,ret,28,3*b+1,15,1),0,3*b),g[l]=(t<<2|e>>4)<<24>>24,g):61!=u&&61==s?3&(i=dHt[u])?null:(qGn(f,0,g=Inn(tUt,ret,28,3*b+2,15,1),0,3*b),g[l++]=(t<<2|e>>4)<<24>>24,g[l]=((15&e)<<4|i>>2&15)<<24>>24,g):null:(i=dHt[u],r=dHt[s],f[l++]=(t<<2|e>>4)<<24>>24,f[l++]=((15&e)<<4|i>>2&15)<<24>>24,f[l++]=(i<<6|r)<<24>>24,f)):null}function wJn(n,t){var e,i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v;for(t.Ug(j6n,1),l=uG(oIn(n,(jYn(),Vyt)),223),i=new Ww(n.b);i.a=2){for(b=!0,e=uG(N3(h=new Ww(r.j)),12),f=null;h.a0)if(r=f.gc(),s=t0(e.Math.floor((r+1)/2))-1,c=t0(e.Math.ceil((r+1)/2))-1,t.o==dSt)for(h=c;h>=s;h--)t.a[k.p]==k&&(d=uG(f.Xb(h),42),w=uG(d.a,10),!cS(i,d.b)&&b>n.b.e[w.p]&&(t.a[w.p]=k,t.g[k.p]=t.g[w.p],t.a[k.p]=t.g[k.p],t.f[t.g[k.p].p]=(qx(),!!(oM(t.f[t.g[k.p].p])&k.k==(zIn(),wbt))),b=n.b.e[w.p]));else for(h=s;h<=c;h++)t.a[k.p]==k&&(p=uG(f.Xb(h),42),g=uG(p.a,10),!cS(i,p.b)&&b0&&(c=uG(zq(p.c.a,T-1),10),o=n.i[c.p],E=e.Math.ceil(y$(n.n,c,p)),a=M.a.e-p.d.d-(o.a.e+c.o.b+c.d.a)-E),h=M0n,T0&&j.a.e.e-j.a.a-(j.b.e.e-j.b.a)<0,d=k.a.e.e-k.a.a-(k.b.e.e-k.b.a)<0&&j.a.e.e-j.a.a-(j.b.e.e-j.b.a)>0,w=k.a.e.e+k.b.aj.b.e.e+j.a.a,y=0,!g&&!d&&(b?a+l>0?y=l:h-r>0&&(y=r):w&&(a+u>0?y=u:h-v>0&&(y=v))),M.a.e+=y,M.b&&(M.d.e+=y),1)))}function pJn(n,t,i){var r,c,a,o,u,s,h,f,l,b;if(r=new gY(t.Lf().a,t.Lf().b,t.Mf().a,t.Mf().b),c=new cN,n.c)for(o=new Ww(t.Rf());o.as&&(i.a+=V$(Inn(JHt,N1n,28,-s,15,1))),i.a+="Is",xL(u,$Cn(32))>=0)for(r=0;r=i.o.b/2}p?(g=uG(oIn(i,(GYn(),Pmt)),15))?l?c=g:(r=uG(oIn(i,Ept),15))?c=g.gc()<=r.gc()?g:r:(c=new Zm,kfn(i,Ept,c)):(c=new Zm,kfn(i,Pmt,c)):(r=uG(oIn(i,(GYn(),Ept)),15))?f?c=r:(g=uG(oIn(i,Pmt),15))?c=r.gc()<=g.gc()?r:g:(c=new Zm,kfn(i,Pmt,c)):(c=new Zm,kfn(i,Ept,c)),c.Fc(n),kfn(n,(GYn(),Ppt),e),t.d==e?(u2(t,null),e.e.c.length+e.g.c.length==0&&o2(e,null),Nln(e)):(c2(t,null),e.e.c.length+e.g.c.length==0&&o2(e,null)),BY(t.a)}function jJn(n,t,i){var r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y,M,T,j,E,S,P,C,I,O,A;for(i.Ug("MinWidth layering",1),w=t.b,j=t.a,A=uG(oIn(t,(jYn(),mMt)),17).a,u=uG(oIn(t,vMt),17).a,n.b=uM(pK(oIn(t,dTt))),n.d=M0n,y=new Ww(j);y.a0?(h=0,p&&(h+=u),h+=(E-1)*o,v&&(h+=u),j&&v&&(h=e.Math.max(h,GKn(v,o,m,T))),h=n.a&&(r=Rqn(n,m),l=e.Math.max(l,r.b),k=e.Math.max(k,r.d),kD(u,new WO(m,r)));for(T=new Zm,f=0;f0),g.a.Xb(g.c=--g.b),pF(g,j=new bQ(n.b)),MK(g.b0){for(l=h<100?null:new cj(h),w=(s=new Hun(t)).g,g=Inn(YHt,W1n,28,h,15,1),i=0,v=new Drn(h),r=0;r=0;)if(null!=b?udn(b,w[u]):xA(b)===xA(w[u])){g.length<=i&&qGn(g,0,g=Inn(YHt,W1n,28,2*g.length,15,1),0,i),g[i++]=r,ttn(v,w[u]);break n}if(xA(b)===xA(o))break}}if(s=v,w=v.g,h=i,i>g.length&&qGn(g,0,g=Inn(YHt,W1n,28,i,15,1),0,i),i>0){for(m=!0,c=0;c=0;)gjn(n,g[a]);if(i!=h){for(r=h;--r>=i;)gjn(s,r);qGn(g,0,g=Inn(YHt,W1n,28,i,15,1),0,i)}t=s}}}else for(t=cjn(n,t),r=n.i;--r>=0;)t.Hc(n.g[r])&&(gjn(n,r),m=!0);if(m){if(null!=g){for(f=1==(e=t.gc())?i2(n,4,t.Kc().Pb(),null,g[0],d):i2(n,6,t,g,g[0],d),l=e<100?null:new cj(e),r=t.Kc();r.Ob();)l=X_(n,uG(b=r.Pb(),76),l);l?(l.nj(f),l.oj()):Msn(n.e,f)}else{for(l=qF(t.gc()),r=t.Kc();r.Ob();)l=X_(n,uG(b=r.Pb(),76),l);l&&l.oj()}return!0}return!1}function CJn(n,t){var e,i,r,c,a,o,u,s,f,l,b,w,d,g,p,m,v;for((e=new qyn(t)).a||MUn(t),s=oBn(t),u=new K1,g=new BFn,d=new Ww(t.a);d.a0||i.o==dSt&&c=e}function AJn(n,t,e){var i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m;for(f=t,h=new K1,l=new K1,c=p6(f,yet),IOn((i=new SY(n,e,h,l)).a,i.b,i.c,i.d,c),d=(h.i||(h.i=new RD(h,h.c))).Kc();d.Ob();)for(w=uG(d.Pb(),166),o=uG(Y9(h,w),21).Kc();o.Ob();){if(a=o.Pb(),!(b=uG(dcn(n.d,a),166)))throw r=k6(f,Iet),hv(new SM(Det+a+xet+r+$et));!w.e&&(w.e=new f_(oFt,w,10,9)),ttn(w.e,b)}for(p=(l.i||(l.i=new RD(l,l.c))).Kc();p.Ob();)for(g=uG(p.Pb(),166),s=uG(Y9(l,g),21).Kc();s.Ob();){if(u=s.Pb(),!(b=uG(dcn(n.d,u),166)))throw r=k6(f,Iet),hv(new SM(Det+u+xet+r+$et));!g.g&&(g.g=new f_(oFt,g,9,10)),ttn(g.g,b)}!e.b&&(e.b=new f_(cFt,e,4,7)),0!=e.b.i&&(!e.c&&(e.c=new f_(cFt,e,5,8)),0!=e.c.i)&&(!e.b&&(e.b=new f_(cFt,e,4,7)),e.b.i<=1&&(!e.c&&(e.c=new f_(cFt,e,5,8)),e.c.i<=1))&&1==(!e.a&&(e.a=new fV(oFt,e,6,6)),e.a).i&&(hMn(m=uG(zrn((!e.a&&(e.a=new fV(oFt,e,6,6)),e.a),0),166))||fMn(m)||(Xan(m,uG(zrn((!e.b&&(e.b=new f_(cFt,e,4,7)),e.b),0),84)),zan(m,uG(zrn((!e.c&&(e.c=new f_(cFt,e,5,8)),e.c),0),84))))}function LJn(n){var t,i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y,M,T,j,E,S;for(k=0,y=(v=n.a).length;k0?(f=uG(zq(l.c.a,a-1),10),j=y$(n.b,l,f),g=l.n.b-l.d.d-(f.n.b+f.o.b+f.d.a+j)):g=l.n.b-l.d.d,s=e.Math.min(g,s),a1&&(o=e.Math.min(o,e.Math.abs(uG(hyn(u.a,1),8).b-f.b)))));else for(d=new Ww(t.j);d.ac&&(a=b.a-c,o=vZn,r.c.length=0,c=b.a),b.a>=c&&(mv(r.c,u),u.a.b>1&&(o=e.Math.min(o,e.Math.abs(uG(hyn(u.a,u.a.b-2),8).b-b.b)))));if(0!=r.c.length&&a>t.o.a/2&&o>t.o.b/2){for(o2(w=new lOn,t),NLn(w,(KQn(),yRt)),w.n.a=t.o.a/2,o2(g=new lOn,t),NLn(g,KRt),g.n.a=t.o.a/2,g.n.b=t.o.b,s=new Ww(r);s.a=h.b?c2(u,g):c2(u,w)):(h=uG(eG(u.a),8),(0==u.a.b?n3(u.c):uG(pR(u.a),8)).b>=h.b?u2(u,g):u2(u,w)),(l=uG(oIn(u,(jYn(),bMt)),75))&&Wpn(l,h,!0);t.n.a=c-t.o.a/2}}function $Jn(n,t,i){var r,c,a,o,u,s,h,f,l;for(u=Fkn(n.b,0);u.b!=u.d.c;)if(!m_((o=uG(I6(u),40)).c,H9n))for(h=xDn(o,n),t==(xdn(),JDt)||t==YDt?f$(h,new co):f$(h,new ao),s=h.c.length,r=0;r=0?Ipn(o):Gdn(Ipn(o)),n.qf(eTt,b)),s=new sj,l=!1,n.pf(WMt)?(_R(s,uG(n.of(WMt),8)),l=!0):mD(s,a.a/2,a.b/2),b.g){case 4:kfn(h,gMt,(Gpn(),Imt)),kfn(h,Npt,(Pfn(),ygt)),h.o.b=a.b,d<0&&(h.o.a=-d),NLn(f,(KQn(),kRt)),l||(s.a=a.a),s.a-=a.a;break;case 2:kfn(h,gMt,(Gpn(),Amt)),kfn(h,Npt,(Pfn(),vgt)),h.o.b=a.b,d<0&&(h.o.a=-d),NLn(f,(KQn(),_Rt)),l||(s.a=0);break;case 1:kfn(h,Xpt,(Zen(),ppt)),h.o.a=a.a,d<0&&(h.o.b=-d),NLn(f,(KQn(),KRt)),l||(s.b=a.b),s.b-=a.b;break;case 3:kfn(h,Xpt,(Zen(),dpt)),h.o.a=a.a,d<0&&(h.o.b=-d),NLn(f,(KQn(),yRt)),l||(s.b=0)}if(_R(f.n,s),kfn(h,WMt,s),t==rRt||t==aRt||t==cRt){if(w=0,t==rRt&&n.pf(YMt))switch(b.g){case 1:case 2:w=uG(n.of(YMt),17).a;break;case 3:case 4:w=-uG(n.of(YMt),17).a}else switch(b.g){case 4:case 2:w=c.b,t==aRt&&(w/=r.b);break;case 1:case 3:w=c.a,t==aRt&&(w/=r.a)}kfn(h,bmt,w)}return kfn(h,Fpt,b),h}function xJn(){function n(n){var t=this;this.dispatch=function(t){var e=t.data;switch(e.cmd){case"algorithms":var i=rmn((hZ(),new qw(new Fw(NFt.b))));n.postMessage({id:e.id,data:i});break;case"categories":var r=rmn((hZ(),new qw(new Fw(NFt.c))));n.postMessage({id:e.id,data:r});break;case"options":var c=rmn((hZ(),new qw(new Fw(NFt.d))));n.postMessage({id:e.id,data:c});break;case"register":OVn(e.algorithms),n.postMessage({id:e.id});break;case"layout":Vqn(e.graph,e.layoutOptions||{},e.options||{}),n.postMessage({id:e.id,data:e.graph})}},this.saveDispatch=function(e){try{t.dispatch(e)}catch(i){n.postMessage({id:e.data.id,error:i})}}}function e(t){var e=this;this.dispatcher=new n({postMessage:function(n){e.onmessage({data:n})}}),this.postMessage=function(n){setTimeout((function(){e.dispatcher.saveDispatch({data:n})}),0)}}if(mj(),typeof document===r2n&&typeof self!==r2n){var r=new n(self);self.onmessage=r.saveDispatch}else typeof t!==r2n&&t.exports&&(Object.defineProperty(i,"__esModule",{value:!0}),t.exports={default:e,Worker:e})}function RJn(n,t,e){var i,r,c,a,o,u,s,h,f,l;for(zsn(h=new gMn(e),t),kfn(h,(GYn(),rmt),t),h.o.a=t.g,h.o.b=t.f,h.n.a=t.i,h.n.b=t.j,kD(e.a,h),vJ(n.a,t,h),(0!=(!t.a&&(t.a=new fV(bFt,t,10,11)),t.a).i||oM(gK(zDn(t,(jYn(),sMt)))))&&kfn(h,Cpt,(qx(),!0)),s=uG(oIn(e,Hpt),21),(f=uG(oIn(h,(jYn(),JMt)),101))==($Pn(),sRt)?kfn(h,JMt,uRt):f!=uRt&&s.Fc((r_n(),rpt)),l=0,i=uG(oIn(e,Byt),88),u=new DD((!t.c&&(t.c=new fV(wFt,t,9,9)),t.c));u.e!=u.i.gc();)o=uG(Zkn(u),123),(xA(zDn(r=R0(t),Syt))!==xA((yvn(),Fjt))||xA(zDn(r,Fyt))===xA((kvn(),lgt))||xA(zDn(r,Fyt))===xA((kvn(),hgt))||oM(gK(zDn(r,Cyt)))||xA(zDn(r,kyt))!==xA((Uvn(),tbt))||xA(zDn(r,yMt))===xA((THn(),Pjt))||xA(zDn(r,yMt))===xA((THn(),Cjt))||xA(zDn(r,MMt))===xA((MKn(),JTt))||xA(zDn(r,MMt))===xA((MKn(),ZTt)))&&!oM(gK(zDn(t,jyt)))&&Myn(o,imt,xwn(l++)),oM(gK(zDn(o,FMt)))||mQn(n,o,h,s,i,f);for(a=new DD((!t.n&&(t.n=new fV(lFt,t,1,7)),t.n));a.e!=a.i.gc();)!oM(gK(zDn(c=uG(Zkn(a),135),FMt)))&&c.a&&kD(h.b,own(c));return oM(gK(oIn(h,gyt)))&&s.Fc((r_n(),Zgt)),oM(gK(oIn(h,uMt)))&&(s.Fc((r_n(),ipt)),s.Fc(ept),kfn(h,JMt,uRt)),h}function KJn(n,t,i,r,c,a,o){var u,s,h,f,l,b,w,d,g,p,m,v,k,y,M,T,j,E,S,P,C,I,O,A;for(g=0,P=0,h=new Ww(n.b);h.ag&&(a&&(cL(T,w),cL(E,xwn(f.b-1)),kD(n.d,d),u.c.length=0),O=i.b,A+=w+t,w=0,l=e.Math.max(l,i.b+i.c+I)),mv(u.c,s),uyn(s,O,A),l=e.Math.max(l,O+I+i.c),w=e.Math.max(w,b),O+=I+t,d=s;if(Ohn(n.a,u),kD(n.d,uG(zq(u,u.c.length-1),163)),l=e.Math.max(l,r),(C=A+w+i.a)r.d.d+r.d.a?f.f.d=!0:(f.f.d=!0,f.f.a=!0))),i.b!=i.d.c&&(t=e);f&&(c=uG(cQ(n.f,a.d.i),60),t.bc.d.d+c.d.a?f.f.d=!0:(f.f.d=!0,f.f.a=!0))}for(o=new Fz(ix(qgn(b).a.Kc(),new h));hDn(o);)0!=(a=uG(N9(o),18)).a.b&&(t=uG(pR(a.a),8),a.d.j==(KQn(),yRt)&&((g=new Hqn(t,new MO(t.a,r.d.d),r,a)).f.a=!0,g.a=a.d,mv(d.c,g)),a.d.j==KRt&&((g=new Hqn(t,new MO(t.a,r.d.d+r.d.a),r,a)).f.d=!0,g.a=a.d,mv(d.c,g)))}return d}function GJn(n,t,e){var i,r,c,a,o,u,s,h,f,l;for(u=new Zm,f=t.length,a=Ffn(e),s=0;s=w&&(m>w&&(b.c.length=0,w=m),mv(b.c,a));0!=b.c.length&&(l=uG(zq(b,iMn(t,b.c.length)),131),P.a.Bc(l),l.s=d++,Vxn(l,E,M),b.c.length=0)}for(k=n.c.length+1,o=new Ww(n);o.aS.s&&(LQ(e),men(S.i,i),i.c>0&&(i.a=S,kD(S.t,i),i.b=T,kD(T.i,i)))}function zJn(n,t,e,i,r){var c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y,M,T,j,E;for(w=new R7(t.b),m=new R7(t.b),l=new R7(t.b),M=new R7(t.b),d=new R7(t.b),y=Fkn(t,0);y.b!=y.d.c;)for(o=new Ww((v=uG(I6(y),12)).g);o.a0,g=v.g.c.length>0,s&&g?mv(l.c,v):s?mv(w.c,v):g&&mv(m.c,v);for(b=new Ww(w);b.av.nh()-h.b&&(b=v.nh()-h.b),w>v.oh()-h.d&&(w=v.oh()-h.d),f0){for(k=Fkn(n.f,0);k.b!=k.d.c;)uG(I6(k),10).p+=w-n.e;kAn(n),BY(n.f),O_n(n,r,d)}else{for(aq(n.f,d),d.p=r,n.e=e.Math.max(n.e,r),a=new Fz(ix(qgn(d).a.Kc(),new h));hDn(a);)(c=uG(N9(a),18)).c.i.c||c.c.i.k!=(zIn(),bbt)||(aq(n.f,c.c.i),c.c.i.p=r-1);n.c=r}else kAn(n),BY(n.f),r=0,hDn(new Fz(ix(qgn(d).a.Kc(),new h)))?O_n(n,r=(w=Pyn(w=0,d))+2,d):(aq(n.f,d),d.p=0,n.e=e.Math.max(n.e,0),n.b=uG(zq(n.d.b,0),30),n.c=0);for(0==n.f.b||kAn(n),n.d.a.c.length=0,v=new Zm,f=new Ww(n.d.b);f.a=48&&t<=57))throw hv(new CM(rZn((t$(),Nit))));for(i=t-48;r=48&&t<=57;)if((i=10*i+t-48)<0)throw hv(new CM(rZn((t$(),Rit))));if(e=i,44==t){if(r>=n.j)throw hv(new CM(rZn((t$(),Dit))));if((t=VJ(n.i,r++))>=48&&t<=57){for(e=t-48;r=48&&t<=57;)if((e=10*e+t-48)<0)throw hv(new CM(rZn((t$(),Rit))));if(i>e)throw hv(new CM(rZn((t$(),xit))))}else e=-1}if(125!=t)throw hv(new CM(rZn((t$(),$it))));n.bm(r)?(QYn(),QYn(),c=new n8(9,c),n.d=r+1):(QYn(),QYn(),c=new n8(3,c),n.d=r),c.Om(i),c.Nm(e),EYn(n)}}return c}function iYn(n){var t,e,i;switch(e=uG(oIn(n,(GYn(),Hpt)),21),t=aN(klt),uG(oIn(n,(jYn(),rMt)),346)==(Own(),Ixt)&&gsn(t,ylt),oM(gK(oIn(n,eMt)))?Aq(t,(uIn(),Tlt),(zYn(),Iwt)):Aq(t,(uIn(),Elt),(zYn(),Iwt)),null!=oIn(n,(K7(),jNt))&&gsn(t,Mlt),(oM(gK(oIn(n,fMt)))||oM(gK(oIn(n,iMt))))&&wz(t,(uIn(),Plt),(zYn(),Ubt)),uG(oIn(n,Byt),88).g){case 2:case 3:case 4:wz(Aq(t,(uIn(),Tlt),(zYn(),qbt)),Plt,Gbt)}switch(e.Hc((r_n(),Zgt))&&wz(Aq(Aq(t,(uIn(),Tlt),(zYn(),Hbt)),Slt,_bt),Plt,Bbt),xA(oIn(n,yMt))!==xA((THn(),$jt))&&Aq(t,(uIn(),Elt),(zYn(),ywt)),e.Hc(apt)&&(Aq(t,(uIn(),Tlt),(zYn(),Pwt)),Aq(t,jlt,Ewt),Aq(t,Elt,Swt)),xA(oIn(n,vyt))!==xA((RIn(),Vgt))&&xA(oIn(n,Vyt))!==xA((_gn(),sxt))&&wz(t,(uIn(),Plt),(zYn(),rwt)),oM(gK(oIn(n,aMt)))&&Aq(t,(uIn(),Elt),(zYn(),iwt)),oM(gK(oIn(n,Ryt)))&&Aq(t,(uIn(),Elt),(zYn(),Dwt)),CRn(n)&&(i=(xA(oIn(n,rMt))===xA(Ixt)?uG(oIn(n,Oyt),299):uG(oIn(n,Ayt),299))==(ihn(),fpt)?(zYn(),jwt):(zYn(),Kwt),Aq(t,(uIn(),Slt),i)),uG(oIn(n,qTt),388).g){case 1:Aq(t,(uIn(),Slt),(zYn(),xwt));break;case 2:wz(Aq(Aq(t,(uIn(),Elt),(zYn(),xbt)),Slt,Rbt),Plt,Kbt)}return xA(oIn(n,Syt))!==xA((yvn(),Fjt))&&Aq(t,(uIn(),Elt),(zYn(),Rwt)),t}function rYn(n,t,e){var i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v;if(PV(n.a,t)){if(cS(uG(cQ(n.a,t),49),e))return 1}else vJ(n.a,t,new ek);if(PV(n.a,e)){if(cS(uG(cQ(n.a,e),49),t))return-1}else vJ(n.a,e,new ek);if(PV(n.e,t)){if(cS(uG(cQ(n.e,t),49),e))return-1}else vJ(n.e,t,new ek);if(PV(n.e,e)){if(cS(uG(cQ(n.a,e),49),t))return 1}else vJ(n.e,e,new ek);if(n.c==(yvn(),_jt)||!vR(t,(GYn(),imt))||!vR(e,(GYn(),imt))){for(f=null,s=new Ww(t.j);s.a(a=_Sn(n,e))?uHn(n,t,e):uHn(n,e,t),ra?1:0}return(i=uG(oIn(t,(GYn(),imt)),17).a)>(c=uG(oIn(e,imt),17).a)?uHn(n,t,e):uHn(n,e,t),ic?1:0}function cYn(n,t,e){var i,r,c,a,o,u,s,h,f,l,b,w,d;if(null==e)return null;if(n.a!=t.jk())throw hv(new vM(tet+t.xe()+eet));if(F$(t,469)){if(!(d=y_n(uG(t,685),e)))throw hv(new vM(iet+e+"' is not a valid enumerator of '"+t.xe()+"'"));return d}switch(tdn((gAn(),kBt),t).Nl()){case 2:e=yXn(e,!1);break;case 3:e=yXn(e,!0)}if(i=tdn(kBt,t).Jl())return i.jk().wi().ti(i,e);if(f=tdn(kBt,t).Ll()){for(d=new Zm,s=0,h=(u=Fln(e)).length;s1)for(b=new Zx((!n.a&&(n.a=new fV(oFt,n,6,6)),n.a));b.e!=b.i.gc();)$Sn(b);for(d=C,C>k+v?d=k+v:Cy+w?g=y+w:Ik-v&&dy-w&&gC+P?T=C+P:kI+M?j=I+M:yC-P&&TI-M&&ji&&(f=i-1),(l=N+uRn(t,24)*z0n*h-h/2)<0?l=1:l>r&&(l=r-1),gj(),Scn(c=new ns,f),pcn(c,l),ttn((!o.a&&(o.a=new MD(eFt,o,5)),o.a),c)}function lYn(n){hP(n,new hCn(FT(DT(KT(RT(new bu,ant),"ELK Rectangle Packing"),"Algorithm for packing of unconnected boxes, i.e. graphs without edges. The given order of the boxes is always preserved and the main reading direction of the boxes is left to right. The algorithm is divided into two phases. One phase approximates the width in which the rectangles can be placed. The next phase places the rectangles in rows using the previously calculated width as bounding width and bundles rectangles with a similar height in blocks. A compaction step reduces the size of the drawing. Finally, the rectangles are expanded to fill their bounding box and eliminate empty unused spaces."),new _o))),U4(n,ant,R3n,1.3),U4(n,ant,d4n,(qx(),!1)),U4(n,ant,K3n,fAt),U4(n,ant,o4n,15),U4(n,ant,r9n,Jkn(WOt)),U4(n,ant,p4n,Jkn(eAt)),U4(n,ant,x4n,Jkn(rAt)),U4(n,ant,g4n,Jkn(cAt)),U4(n,ant,m4n,Jkn(tAt)),U4(n,ant,w4n,Jkn(aAt)),U4(n,ant,v4n,Jkn(lAt)),U4(n,ant,J7n,Jkn(pAt)),U4(n,ant,Y7n,Jkn(gAt)),U4(n,ant,Q7n,Jkn(vAt)),U4(n,ant,W7n,Jkn(mAt)),U4(n,ant,Z7n,Jkn(sAt)),U4(n,ant,nnt,Jkn(uAt)),U4(n,ant,tnt,Jkn(oAt)),U4(n,ant,ent,Jkn(dAt)),U4(n,ant,f4n,Jkn(YOt)),U4(n,ant,g9n,Jkn(ZOt)),U4(n,ant,z7n,Jkn(JOt)),U4(n,ant,X7n,Jkn(QOt)),U4(n,ant,V7n,Jkn(nAt)),U4(n,ant,q7n,Jkn(wAt))}function bYn(n,t){var e,i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y,M,T,j,E,S,P,C;if(pXn(),j=n.e,w=n.d,r=n.a,0==j)switch(t){case 0:return"0";case 1:return N0n;case 2:return"0.00";case 3:return"0.000";case 4:return"0.0000";case 5:return"0.00000";case 6:return"0.000000";default:return(M=new WM).a+=t<0?"0E+":"0E",M.a+=-t,M.a}if(k=Inn(JHt,N1n,28,1+(v=10*w+1+7),15,1),e=v,1==w)if((o=r[0])<0){C=E3(o,L0n);do{d=C,C=bSn(C,10),k[--e]=48+pz($gn(d,Ngn(C,10)))&D1n}while(0!=dwn(C,0))}else{C=o;do{d=C,C=C/10|0,k[--e]=d-10*C+48&D1n}while(0!=C)}else{qGn(r,0,S=Inn(YHt,W1n,28,w,15,1),0,P=w);n:for(;;){for(T=0,s=P-1;s>=0;s--)p=JPn(Lgn(Nz(T,32),E3(S[s],L0n))),S[s]=pz(p),T=pz($z(p,32));m=pz(T),g=e;do{k[--e]=48+m%10&D1n}while(0!=(m=m/10|0)&&0!=e);for(i=9-g+e,u=0;u0;u++)k[--e]=48;for(f=P-1;0==S[f];f--)if(0==f)break n;P=f+1}for(;48==k[e];)++e}if(b=j<0,a=v-e-t-1,0==t)return b&&(k[--e]=45),mvn(k,e,v-e);if(t>0&&a>=-6){if(a>=0){for(h=e+a,l=v-1;l>=h;l--)k[l+1]=k[l];return k[++h]=46,b&&(k[--e]=45),mvn(k,e,v-e+1)}for(f=2;f<1-a;f++)k[--e]=48;return k[--e]=46,k[--e]=48,b&&(k[--e]=45),mvn(k,e,v-e)}return E=e+1,c=v,y=new QM,b&&(y.a+="-"),c-E>=1?(jQ(y,k[e]),y.a+=".",y.a+=mvn(k,e+1,v-e-1)):y.a+=mvn(k,e,v-e),y.a+="E",a>0&&(y.a+="+"),y.a+=""+a,y.a}function wYn(n,t){var i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y;switch(n.c=t,n.g=new Ym,vP(),Apn(new Ad(new Vy(n.c))),m=mK(zDn(n.c,(fIn(),dLt))),o=uG(zDn(n.c,pLt),324),k=uG(zDn(n.c,mLt),437),c=uG(zDn(n.c,hLt),490),v=uG(zDn(n.c,gLt),438),n.j=uM(pK(zDn(n.c,vLt))),a=n.a,o.g){case 0:a=n.a;break;case 1:a=n.b;break;case 2:a=n.i;break;case 3:a=n.e;break;case 4:a=n.f;break;default:throw hv(new vM(lnt+(null!=o.f?o.f:""+o.g)))}if(n.d=new i0(a,k,c),kfn(n.d,(rsn(),Oht),gK(zDn(n.c,lLt))),n.d.c=oM(gK(zDn(n.c,fLt))),0==wZ(n.c).i)return n.d;for(h=new DD(wZ(n.c));h.e!=h.i.gc();){for(l=(s=uG(Zkn(h),27)).g/2,f=s.f/2,y=new MO(s.i+l,s.j+f);PV(n.g,y);)KR(y,(e.Math.random()-.5)*t4n,(e.Math.random()-.5)*t4n);w=uG(zDn(s,(XYn(),$$t)),140),d=new G0(y,new gY(y.a-l-n.j/2-w.b,y.b-f-n.j/2-w.d,s.g+n.j+(w.b+w.c),s.f+n.j+(w.d+w.a))),kD(n.d.i,d),vJ(n.g,y,new WO(d,s))}switch(v.g){case 0:if(null==m)n.d.d=uG(zq(n.d.i,0),68);else for(p=new Ww(n.d.i);p.a0?S+1:1);for(a=new Ww(y.g);a.a0?S+1:1)}0==n.c[s]?aq(n.e,d):0==n.a[s]&&aq(n.f,d),++s}for(w=-1,b=1,f=new Zm,n.d=uG(oIn(t,(GYn(),dmt)),234);A>0;){for(;0!=n.e.b;)C=uG(tG(n.e),10),n.b[C.p]=w--,eUn(n,C),--A;for(;0!=n.f.b;)I=uG(tG(n.f),10),n.b[I.p]=b++,eUn(n,I),--A;if(A>0){for(l=j1n,m=new Ww(v);m.a=l&&(k>l&&(f.c.length=0,l=k),mv(f.c,d));h=n.sg(f),n.b[h.p]=b++,eUn(n,h),--A}}for(P=v.c.length+1,s=0;sn.b[O]&&(pqn(i,!0),kfn(t,Lpt,(qx(),!0)));n.a=null,n.c=null,n.b=null,BY(n.f),BY(n.e),e.Vg()}function pYn(n,t,i){var r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y,M,T;for(M=uG(zrn((!n.a&&(n.a=new fV(oFt,n,6,6)),n.a),0),166),f=new Uk,y=new Ym,T=sGn(M),VAn(y.f,M,T),b=new Ym,r=new lS,d=OV(zcn(Uhn(cT(vat,1),EZn,20,0,[(!t.d&&(t.d=new f_(aFt,t,8,5)),t.d),(!t.e&&(t.e=new f_(aFt,t,7,4)),t.e)])));hDn(d);){if(w=uG(N9(d),74),1!=(!n.a&&(n.a=new fV(oFt,n,6,6)),n.a).i)throw hv(new vM(Ptt+(!n.a&&(n.a=new fV(oFt,n,6,6)),n.a).i));w!=n&&(s8(r,p=uG(zrn((!w.a&&(w.a=new fV(oFt,w,6,6)),w.a),0),166),r.c.b,r.c),(g=uG(DA(FX(y.f,p)),13))||(g=sGn(p),VAn(y.f,p,g)),l=i?YF(new eN(uG(zq(T,T.c.length-1),8)),uG(zq(g,g.c.length-1),8)):YF(new eN((u3(0,T.c.length),uG(T.c[0],8))),(u3(0,g.c.length),uG(g.c[0],8))),VAn(b.f,p,l))}if(0!=r.b)for(m=uG(zq(T,i?T.c.length-1:0),8),h=1;h1&&s8(f,m,f.c.b,f.c),yrn(c)));m=v}return f}function mYn(n,t,e){var i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y,M,T,j,E,S;for(e.Ug(o7n,1),S=uG(l8(JJ(new fX(null,new h3(t,16)),new wo),ftn(new V,new z,new en,Uhn(cT(Rut,1),p1n,108,0,[(ybn(),Iut)]))),15),h=uG(l8(JJ(new fX(null,new h3(t,16)),new Lp(t)),ftn(new V,new z,new en,Uhn(cT(Rut,1),p1n,108,0,[Iut]))),15),w=uG(l8(JJ(new fX(null,new h3(t,16)),new Ap(t)),ftn(new V,new z,new en,Uhn(cT(Rut,1),p1n,108,0,[Iut]))),15),d=Inn(lPt,z9n,40,t.gc(),0,1),a=0;a=0&&E=0&&!d[b]){d[b]=r,h.gd(o),--o;break}if((b=E-l)=0&&!d[b]){d[b]=r,h.gd(o),--o;break}}for(w.jd(new go),u=d.length-1;u>=0;u--)d[u]||w.dc()||(d[u]=uG(w.Xb(0),40),w.gd(0));for(s=0;s=0;u--)aq(e,(u3(u,a.c.length),uG(a.c[u],8)));return e}function kYn(n,t,i){var r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k;for(v=uM(pK(zDn(t,(lBn(),POt)))),b=uM(pK(zDn(t,EOt))),l=uM(pK(zDn(t,MOt))),Non((!t.a&&(t.a=new fV(bFt,t,10,11)),t.a)),p=ozn((!t.a&&(t.a=new fV(bFt,t,10,11)),t.a),v,n.b),g=0;gl&&uEn((u3(l,t.c.length),uG(t.c[l],186)),h),h=null;t.c.length>l&&0==(u3(l,t.c.length),uG(t.c[l],186)).a.c.length;)men(t,(u3(l,t.c.length),t.c[l]));if(!h){--a;continue}if(!oM(gK(uG(zq(h.b,0),27).of((S_n(),nAt))))&&BUn(t,w,c,h,g,e,l,i)){d=!0;continue}if(g){if(b=w.b,f=h.f,!oM(gK(uG(zq(h.b,0),27).of(nAt)))&&EVn(t,w,c,h,e,l,i,r)){if(d=!0,b=n.j)return n.a=-1,void(n.c=1);if(t=VJ(n.i,n.d++),n.a=t,1!=n.b){switch(t){case 124:i=2;break;case 42:i=3;break;case 43:i=4;break;case 63:i=5;break;case 41:i=7;break;case 46:i=8;break;case 91:i=9;break;case 94:i=11;break;case 36:i=12;break;case 40:if(i=6,n.d>=n.j)break;if(63!=VJ(n.i,n.d))break;if(++n.d>=n.j)throw hv(new CM(rZn((t$(),iit))));switch(t=VJ(n.i,n.d++)){case 58:i=13;break;case 61:i=14;break;case 33:i=15;break;case 91:i=19;break;case 62:i=18;break;case 60:if(n.d>=n.j)throw hv(new CM(rZn((t$(),iit))));if(61==(t=VJ(n.i,n.d++)))i=16;else{if(33!=t)throw hv(new CM(rZn((t$(),rit))));i=17}break;case 35:for(;n.d=n.j)throw hv(new CM(rZn((t$(),eit))));n.a=VJ(n.i,n.d++);break;default:i=0}n.c=i}else{switch(t){case 92:if(i=10,n.d>=n.j)throw hv(new CM(rZn((t$(),eit))));n.a=VJ(n.i,n.d++);break;case 45:!(512&~n.e)&&n.df&&(f=d.e.a+d.f.a+b),l=f+u.f.a;break;case 4:f=g.b-b-u.f.b,d.e.b-b-u.f.bf&&(f=d.e.b+d.f.b+b),l=f+u.f.b}else if(d)switch(r.g){case 2:l=(f=d.e.a-b-u.f.a)+u.f.a;break;case 1:l=(f=d.e.a+d.f.a+b)+u.f.a;break;case 4:l=(f=d.e.b-b-u.f.b)+u.f.b;break;case 3:l=(f=d.e.b+d.f.b+b)+u.f.b}xA(oIn(t,uCt))===xA((Pln(),wPt))?(c=f,a=l,null!=(o=lln(JJ(new fX(null,new h3(n.a,16)),new GI(c,a)))).a?r==(xdn(),JDt)||r==YDt?u.e.a=f:u.e.b=f:null!=(o=r==(xdn(),JDt)||r==nxt?lln(JJ(Wrn(new fX(null,new h3(n.a,16))),new Ep(c))):lln(JJ(Wrn(new fX(null,new h3(n.a,16))),new Sp(c)))).a&&(r==JDt||r==YDt?u.e.a=uM(pK((MK(null!=o.a),uG(o.a,42)).a)):u.e.b=uM(pK((MK(null!=o.a),uG(o.a,42)).a))),null!=o.a&&(h=Ten(n.a,(MK(null!=o.a),o.a),0))>0&&h!=uG(oIn(u,ACt),17).a&&(kfn(u,MPt,(qx(),!0)),kfn(u,ACt,xwn(h)))):r==(xdn(),JDt)||r==YDt?u.e.a=f:u.e.b=f}e.Vg()}}function PYn(n){var t,e,i,r,c,a,o,u;for(n.b=1,EYn(n),t=null,0==n.c&&94==n.a?(EYn(n),QYn(),QYn(),HFn(t=new K3(4),0,zct),a=new K3(4)):(QYn(),QYn(),a=new K3(4)),r=!0;1!=(u=n.c);){if(0==u&&93==n.a&&!r){t&&(lWn(t,a),a=t);break}if(e=n.a,i=!1,10==u)switch(e){case 100:case 68:case 119:case 87:case 115:case 83:TXn(a,yUn(e)),i=!0;break;case 105:case 73:case 99:case 67:TXn(a,yUn(e)),(e=-1)<0&&(i=!0);break;case 112:case 80:if(!(o=PNn(n,e)))throw hv(new CM(rZn((t$(),git))));TXn(a,o),i=!0;break;default:e=R_n(n)}else if(24==u&&!r){if(t&&(lWn(t,a),a=t),lWn(a,PYn(n)),0!=n.c||93!=n.a)throw hv(new CM(rZn((t$(),kit))));break}if(EYn(n),!i){if(0==u){if(91==e)throw hv(new CM(rZn((t$(),yit))));if(93==e)throw hv(new CM(rZn((t$(),Mit))));if(45==e&&!r&&93!=n.a)throw hv(new CM(rZn((t$(),Tit))))}if(0!=n.c||45!=n.a||45==e&&r)HFn(a,e,e);else{if(EYn(n),1==(u=n.c))throw hv(new CM(rZn((t$(),mit))));if(0==u&&93==n.a)HFn(a,e,e),HFn(a,45,45);else{if(0==u&&93==n.a||24==u)throw hv(new CM(rZn((t$(),Tit))));if(c=n.a,0==u){if(91==c)throw hv(new CM(rZn((t$(),yit))));if(93==c)throw hv(new CM(rZn((t$(),Mit))));if(45==c)throw hv(new CM(rZn((t$(),Tit))))}else 10==u&&(c=R_n(n));if(EYn(n),e>c)throw hv(new CM(rZn((t$(),Sit))));HFn(a,e,c)}}}r=!1}if(1==n.c)throw hv(new CM(rZn((t$(),mit))));return pxn(a),uzn(a),n.b=0,EYn(n),a}function CYn(n,t,e){var i,r,c,a,o,u,s,f,l,b,w,d,g,p,m,v,k,y,M;if(e.Ug("Coffman-Graham Layering",1),0!=t.a.c.length){for(M=uG(oIn(t,(jYn(),wMt)),17).a,u=0,a=0,b=new Ww(t.a);b.a=M||!cvn(m,i))&&(i=CJ(t,f)),a2(m,i),c=new Fz(ix(qgn(m).a.Kc(),new h));hDn(c);)r=uG(N9(c),18),n.a[r.p]||(g=r.c.i,--n.e[g.p],0==n.e[g.p]&&kG(_Cn(w,g),D0n));for(s=f.c.length-1;s>=0;--s)kD(t.b,(u3(s,f.c.length),uG(f.c[s],30)));t.a.c.length=0,e.Vg()}else e.Vg()}function IYn(n,t){var e,i,r,c,a,o,u,s,f,l,b,w,d,g,p,m,v,k;k=!1;do{for(k=!1,c=t?new Lw(n.a.b).a.gc()-2:1;t?c>=0:cuG(oIn(g,imt),17).a)&&(v=!1);if(v){for(o=t?c+1:c-1,a=!1,m=!0,i=!1,s=Fkn(W6(n.a,xwn(o)),0);s.b!=s.d.c;)vR(u=uG(I6(s),10),imt)?u.p!=f.p&&(a|=t?uG(oIn(u,imt),17).auG(oIn(f,imt),17).a,m=!1):!a&&m&&u.k==(zIn(),bbt)&&(i=!0,(l=t?uG(N9(new Fz(ix(qgn(u).a.Kc(),new h))),18).c.i:uG(N9(new Fz(ix(Xgn(u).a.Kc(),new h))),18).d.i)==f&&(e=t?uG(N9(new Fz(ix(Xgn(u).a.Kc(),new h))),18).d.i:uG(N9(new Fz(ix(qgn(u).a.Kc(),new h))),18).c.i,(t?uG(ER(n.a,e),17).a-uG(ER(n.a,l),17).a:uG(ER(n.a,l),17).a-uG(ER(n.a,e),17).a)<=2&&(m=!1)));if(i&&m&&(e=t?uG(N9(new Fz(ix(Xgn(f).a.Kc(),new h))),18).d.i:uG(N9(new Fz(ix(qgn(f).a.Kc(),new h))),18).c.i,(t?uG(ER(n.a,e),17).a-uG(ER(n.a,f),17).a:uG(ER(n.a,f),17).a-uG(ER(n.a,e),17).a)<=2&&e.k==(zIn(),dbt)&&(m=!1)),a||m){for(d=SRn(n,f,t);0!=d.a.gc();)w=uG(d.a.ec().Kc().Pb(),10),d.a.Bc(w),Qon(d,SRn(n,w,t));--b,k=!0}}}}while(k)}function OYn(n){Hxn(n.c,Ert,Uhn(cT($ot,1),zZn,2,6,[Krt,"http://www.w3.org/2001/XMLSchema#decimal"])),Hxn(n.d,Ert,Uhn(cT($ot,1),zZn,2,6,[Krt,"http://www.w3.org/2001/XMLSchema#integer"])),Hxn(n.e,Ert,Uhn(cT($ot,1),zZn,2,6,[Krt,"http://www.w3.org/2001/XMLSchema#boolean"])),Hxn(n.f,Ert,Uhn(cT($ot,1),zZn,2,6,[Krt,"EBoolean",Bet,"EBoolean:Object"])),Hxn(n.i,Ert,Uhn(cT($ot,1),zZn,2,6,[Krt,"http://www.w3.org/2001/XMLSchema#byte"])),Hxn(n.g,Ert,Uhn(cT($ot,1),zZn,2,6,[Krt,"http://www.w3.org/2001/XMLSchema#hexBinary"])),Hxn(n.j,Ert,Uhn(cT($ot,1),zZn,2,6,[Krt,"EByte",Bet,"EByte:Object"])),Hxn(n.n,Ert,Uhn(cT($ot,1),zZn,2,6,[Krt,"EChar",Bet,"EChar:Object"])),Hxn(n.t,Ert,Uhn(cT($ot,1),zZn,2,6,[Krt,"http://www.w3.org/2001/XMLSchema#double"])),Hxn(n.u,Ert,Uhn(cT($ot,1),zZn,2,6,[Krt,"EDouble",Bet,"EDouble:Object"])),Hxn(n.F,Ert,Uhn(cT($ot,1),zZn,2,6,[Krt,"http://www.w3.org/2001/XMLSchema#float"])),Hxn(n.G,Ert,Uhn(cT($ot,1),zZn,2,6,[Krt,"EFloat",Bet,"EFloat:Object"])),Hxn(n.I,Ert,Uhn(cT($ot,1),zZn,2,6,[Krt,"http://www.w3.org/2001/XMLSchema#int"])),Hxn(n.J,Ert,Uhn(cT($ot,1),zZn,2,6,[Krt,"EInt",Bet,"EInt:Object"])),Hxn(n.N,Ert,Uhn(cT($ot,1),zZn,2,6,[Krt,"http://www.w3.org/2001/XMLSchema#long"])),Hxn(n.O,Ert,Uhn(cT($ot,1),zZn,2,6,[Krt,"ELong",Bet,"ELong:Object"])),Hxn(n.Z,Ert,Uhn(cT($ot,1),zZn,2,6,[Krt,"http://www.w3.org/2001/XMLSchema#short"])),Hxn(n.$,Ert,Uhn(cT($ot,1),zZn,2,6,[Krt,"EShort",Bet,"EShort:Object"])),Hxn(n._,Ert,Uhn(cT($ot,1),zZn,2,6,[Krt,"http://www.w3.org/2001/XMLSchema#string"]))}function AYn(n,t,e,i,r,c,a){var o,u,s,h,f,l,b,w;return l=uG(i.a,17).a,b=uG(i.b,17).a,f=n.b,w=n.c,o=0,h=0,t==(xdn(),JDt)||t==YDt?(h=$I(jdn(ZJ(YJ(new fX(null,new h3(e.b,16)),new mo),new Ya))),f.e.b+f.f.b/2>h?(s=++b,o=uM(pK(yx(Wz(YJ(new fX(null,new h3(e.b,16)),new pO(r,s)),new Za))))):(u=++l,o=uM(pK(yx(Qz(YJ(new fX(null,new h3(e.b,16)),new mO(r,u)),new no)))))):(h=$I(jdn(ZJ(YJ(new fX(null,new h3(e.b,16)),new ro),new Ja))),f.e.a+f.f.a/2>h?(s=++b,o=uM(pK(yx(Wz(YJ(new fX(null,new h3(e.b,16)),new dO(r,s)),new to))))):(u=++l,o=uM(pK(yx(Qz(YJ(new fX(null,new h3(e.b,16)),new gO(r,u)),new eo)))))),t==JDt?(cL(n.a,new MO(uM(pK(oIn(f,(OQn(),DPt))))-r,o)),cL(n.a,new MO(w.e.a+w.f.a+r+c,o)),cL(n.a,new MO(w.e.a+w.f.a+r+c,w.e.b+w.f.b/2)),cL(n.a,new MO(w.e.a+w.f.a,w.e.b+w.f.b/2))):t==YDt?(cL(n.a,new MO(uM(pK(oIn(f,(OQn(),$Pt))))+r,f.e.b+f.f.b/2)),cL(n.a,new MO(f.e.a+f.f.a+r,o)),cL(n.a,new MO(w.e.a-r-c,o)),cL(n.a,new MO(w.e.a-r-c,w.e.b+w.f.b/2)),cL(n.a,new MO(w.e.a,w.e.b+w.f.b/2))):t==nxt?(cL(n.a,new MO(o,uM(pK(oIn(f,(OQn(),DPt))))-r)),cL(n.a,new MO(o,w.e.b+w.f.b+r+c)),cL(n.a,new MO(w.e.a+w.f.a/2,w.e.b+w.f.b+r+c)),cL(n.a,new MO(w.e.a+w.f.a/2,w.e.b+w.f.b+r))):(0==n.a.b||(uG(pR(n.a),8).b=uM(pK(oIn(f,(OQn(),$Pt))))+r*uG(a.b,17).a),cL(n.a,new MO(o,uM(pK(oIn(f,(OQn(),$Pt))))+r*uG(a.b,17).a)),cL(n.a,new MO(o,w.e.b-r*uG(a.a,17).a-c))),new WO(xwn(l),xwn(b))}function LYn(n){var t,e,i,r,c,a,o,u,s,h,f,l,b;if(a=!0,f=null,i=null,r=null,t=!1,b=HFt,s=null,c=null,(u=jkn(n,o=0,YFt,ZFt))=0&&m_(n.substr(o,2),"//")?(Knn(o+=2,u=jkn(n,o,n_t,t_t),n.length),i=n.substr(o,u-o),o=u):null==f||o!=n.length&&(s3(o,n.length),47==n.charCodeAt(o))||(a=!1,-1==(u=cx(n,$Cn(35),o))&&(u=n.length),Knn(o,u,n.length),i=n.substr(o,u-o),o=u);if(!e&&o0&&58==VJ(h,h.length-1)&&(r=h,o=u)),ouxn(c))&&(f=c);for(!f&&(u3(0,d.c.length),f=uG(d.c[0],185)),w=new Ww(t.b);w.al&&(P=0,C+=f+T,f=0),iUn(y,o,P,C),t=e.Math.max(t,P+M.a),f=e.Math.max(f,M.b),P+=M.a+T;for(k=new Ym,i=new Ym,E=new Ww(n);E.a=-1900?1:0,JA(n,e>=4?Uhn(cT($ot,1),zZn,2,6,[Q1n,J1n])[a]:Uhn(cT($ot,1),zZn,2,6,["BC","AD"])[a]);break;case 121:Kkn(n,e,i);break;case 77:nUn(n,e,i);break;case 107:Fen(n,0==(o=r.q.getHours())?24:o,e);break;case 83:PRn(n,e,r);break;case 69:u=i.q.getDay(),JA(n,5==e?Uhn(cT($ot,1),zZn,2,6,["S","M","T","W","T","F","S"])[u]:4==e?Uhn(cT($ot,1),zZn,2,6,[Y1n,Z1n,n0n,t0n,e0n,i0n,r0n])[u]:Uhn(cT($ot,1),zZn,2,6,["Sun","Mon","Tue","Wed","Thu","Fri","Sat"])[u]);break;case 97:r.q.getHours()>=12&&r.q.getHours()<24?JA(n,Uhn(cT($ot,1),zZn,2,6,["AM","PM"])[1]):JA(n,Uhn(cT($ot,1),zZn,2,6,["AM","PM"])[0]);break;case 104:Fen(n,0==(s=r.q.getHours()%12)?12:s,e);break;case 75:Fen(n,r.q.getHours()%12,e);break;case 72:Fen(n,r.q.getHours(),e);break;case 99:h=i.q.getDay(),5==e?JA(n,Uhn(cT($ot,1),zZn,2,6,["S","M","T","W","T","F","S"])[h]):4==e?JA(n,Uhn(cT($ot,1),zZn,2,6,[Y1n,Z1n,n0n,t0n,e0n,i0n,r0n])[h]):3==e?JA(n,Uhn(cT($ot,1),zZn,2,6,["Sun","Mon","Tue","Wed","Thu","Fri","Sat"])[h]):Fen(n,h,1);break;case 76:f=i.q.getMonth(),5==e?JA(n,Uhn(cT($ot,1),zZn,2,6,["J","F","M","A","M","J","J","A","S","O","N","D"])[f]):4==e?JA(n,Uhn(cT($ot,1),zZn,2,6,[x1n,R1n,K1n,F1n,_1n,B1n,H1n,U1n,G1n,q1n,X1n,z1n])[f]):3==e?JA(n,Uhn(cT($ot,1),zZn,2,6,["Jan","Feb","Mar","Apr",_1n,"Jun","Jul","Aug","Sep","Oct","Nov","Dec"])[f]):Fen(n,f+1,e);break;case 81:l=i.q.getMonth()/3|0,JA(n,e<4?Uhn(cT($ot,1),zZn,2,6,["Q1","Q2","Q3","Q4"])[l]:Uhn(cT($ot,1),zZn,2,6,["1st quarter","2nd quarter","3rd quarter","4th quarter"])[l]);break;case 100:Fen(n,i.q.getDate(),e);break;case 109:Fen(n,r.q.getMinutes(),e);break;case 115:Fen(n,r.q.getSeconds(),e);break;case 122:JA(n,e<4?c.c[0]:c.c[1]);break;case 118:JA(n,c.b);break;case 90:JA(n,e<3?GLn(c):3==e?rNn(c):cNn(c.a));break;default:return!1}return!0}function FYn(n,t,e,i){var r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y,M,T,j,E,S,P,C;if(iHn(t),u=uG(zrn((!t.b&&(t.b=new f_(cFt,t,4,7)),t.b),0),84),h=uG(zrn((!t.c&&(t.c=new f_(cFt,t,5,8)),t.c),0),84),o=lCn(u),s=lCn(h),a=0==(!t.a&&(t.a=new fV(oFt,t,6,6)),t.a).i?null:uG(zrn((!t.a&&(t.a=new fV(oFt,t,6,6)),t.a),0),166),M=uG(cQ(n.a,o),10),S=uG(cQ(n.a,s),10),T=null,P=null,F$(u,193)&&(F$(y=uG(cQ(n.a,u),305),12)?T=uG(y,12):F$(y,10)&&(M=uG(y,10),T=uG(zq(M.j,0),12))),F$(h,193)&&(F$(E=uG(cQ(n.a,h),305),12)?P=uG(E,12):F$(E,10)&&(S=uG(E,10),P=uG(zq(S.j,0),12))),!M||!S)throw hv(new EM("The source or the target of edge "+t+" could not be found. This usually happens when an edge connects a node laid out by ELK Layered to a node in another level of hierarchy laid out by either another instance of ELK Layered or another layout algorithm alltogether. The former can be solved by setting the hierarchyHandling option to INCLUDE_CHILDREN."));for(zsn(d=new UZ,t),kfn(d,(GYn(),rmt),t),kfn(d,(jYn(),bMt),null),b=uG(oIn(i,Hpt),21),M==S&&b.Fc((r_n(),opt)),T||(can(),k=Wjt,j=null,a&&sN(uG(oIn(M,JMt),101))&&($5(j=new MO(a.j,a.k),s0(t)),Q8(j,e),Ern(s,o)&&(k=Vjt,JF(j,M.n))),T=LXn(M,j,k,i)),P||(can(),k=Vjt,C=null,a&&sN(uG(oIn(S,JMt),101))&&($5(C=new MO(a.b,a.c),s0(t)),Q8(C,e)),P=LXn(S,C,k,HQ(S))),c2(d,T),u2(d,P),(T.e.c.length>1||T.g.c.length>1||P.e.c.length>1||P.g.c.length>1)&&b.Fc((r_n(),ept)),l=new DD((!t.n&&(t.n=new fV(lFt,t,1,7)),t.n));l.e!=l.i.gc();)if(!oM(gK(zDn(f=uG(Zkn(l),135),FMt)))&&f.a)switch(g=own(f),kD(d.b,g),uG(oIn(g,Xyt),278).g){case 1:case 2:b.Fc((r_n(),npt));break;case 0:b.Fc((r_n(),Ygt)),kfn(g,Xyt,(Zrn(),ixt))}if(c=uG(oIn(i,Kyt),322),p=uG(oIn(i,$Mt),323),r=c==(jan(),Ydt)||p==(pyn(),kjt),a&&0!=(!a.a&&(a.a=new MD(eFt,a,5)),a.a).i&&r){for(m=COn(a),w=new Uk,v=Fkn(m,0);v.b!=v.d.c;)aq(w,new eN(uG(I6(v),8)));kfn(d,cmt,w)}return d}function _Yn(n,t,e,i){var r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y,M,T,j,E,S,P,C,I;for(j=0,E=0,M=new Ym,k=uG(yx(Wz(YJ(new fX(null,new h3(n.b,16)),new io),new fo)),17).a+1,T=Inn(YHt,W1n,28,k,15,1),d=Inn(YHt,W1n,28,k,15,1),w=0;w1)for(o=P+1;ou.b.e.b*(1-g)+u.c.e.b*g));b++);if(y.gc()>0){if(C=0==u.a.b?D$(u.b.e):uG(pR(u.a),8),m=JF(D$(uG(y.Xb(y.gc()-1),40).e),uG(y.Xb(y.gc()-1),40).f),f=JF(D$(uG(y.Xb(0),40).e),uG(y.Xb(0),40).f),b>=y.gc()-1&&C.b>m.b&&u.c.e.b>m.b)continue;if(b<=0&&C.bu.b.e.a*(1-g)+u.c.e.a*g));b++);if(y.gc()>0){if(C=0==u.a.b?D$(u.b.e):uG(pR(u.a),8),m=JF(D$(uG(y.Xb(y.gc()-1),40).e),uG(y.Xb(y.gc()-1),40).f),f=JF(D$(uG(y.Xb(0),40).e),uG(y.Xb(0),40).f),b>=y.gc()-1&&C.a>m.a&&u.c.e.a>m.a)continue;if(b<=0&&C.a=uM(pK(oIn(n,(OQn(),CPt))))&&++E):(l.f&&l.d.e.a<=uM(pK(oIn(n,(OQn(),PPt))))&&++j,l.g&&l.c.e.a+l.c.f.a>=uM(pK(oIn(n,(OQn(),SPt))))&&++E)}else 0==v?hNn(u):v<0&&(++T[P],++d[I],j=uG((S=AYn(u,t,n,new WO(xwn(j),xwn(E)),e,i,new WO(xwn(d[I]),xwn(T[P])))).a,17).a,E=uG(S.b,17).a)}function BYn(n,t,e){var i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m;if(i=t,u=e,n.b&&i.j==(KQn(),_Rt)&&u.j==(KQn(),_Rt)&&(m=i,i=u,u=m),PV(n.a,i)){if(cS(uG(cQ(n.a,i),49),u))return 1}else vJ(n.a,i,new ek);if(PV(n.a,u)){if(cS(uG(cQ(n.a,u),49),i))return-1}else vJ(n.a,u,new ek);if(PV(n.d,i)){if(cS(uG(cQ(n.d,i),49),u))return-1}else vJ(n.d,i,new ek);if(PV(n.d,u)){if(cS(uG(cQ(n.a,u),49),i))return 1}else vJ(n.d,u,new ek);if(i.j!=u.j)return-1==(p=bN(i.j,u.j))?hHn(n,u,i):hHn(n,i,u),p;if(0!=i.e.c.length&&0!=u.e.c.length){if(n.b&&0!=(p=Dbn(i,u)))return-1==p?hHn(n,u,i):1==p&&hHn(n,i,u),p;if((c=uG(zq(i.e,0),18).c.i)==(h=uG(zq(u.e,0),18).c.i))return(r=uG(oIn(uG(zq(i.e,0),18),(GYn(),imt)),17).a)>(s=uG(oIn(uG(zq(u.e,0),18),imt),17).a)?hHn(n,i,u):hHn(n,u,i),rs?1:0;for(d=0,g=(w=n.c).length;d(s=uG(oIn(l,imt),17).a)?hHn(n,i,u):hHn(n,u,i),rs?1:0):n.b&&0!=(p=Dbn(i,u))?(-1==p?hHn(n,u,i):1==p&&hHn(n,i,u),p):(a=0,f=0,vR(uG(zq(i.g,0),18),imt)&&(a=uG(oIn(uG(zq(i.g,0),18),imt),17).a),vR(uG(zq(u.g,0),18),imt)&&(f=uG(oIn(uG(zq(i.g,0),18),imt),17).a),o&&o==l?oM(gK(oIn(uG(zq(i.g,0),18),pmt)))&&!oM(gK(oIn(uG(zq(u.g,0),18),pmt)))?(hHn(n,i,u),1):!oM(gK(oIn(uG(zq(i.g,0),18),pmt)))&&oM(gK(oIn(uG(zq(u.g,0),18),pmt)))?(hHn(n,u,i),-1):(a>f?hHn(n,i,u):hHn(n,u,i),af?1:0):(n.f&&(n.f._b(o)&&(a=uG(n.f.xc(o),17).a),n.f._b(l)&&(f=uG(n.f.xc(l),17).a)),a>f?hHn(n,i,u):hHn(n,u,i),af?1:0))):0!=i.e.c.length&&0!=u.g.c.length?(hHn(n,i,u),1):0!=i.g.c.length&&0!=u.e.c.length?(hHn(n,u,i),-1):vR(i,(GYn(),imt))&&vR(u,imt)?((r=uG(oIn(i,imt),17).a)>(s=uG(oIn(u,imt),17).a)?hHn(n,i,u):hHn(n,u,i),rs?1:0):(hHn(n,u,i),-1)}function HYn(n){n.gb||(n.gb=!0,n.b=Nsn(n,0),Von(n.b,18),Won(n.b,19),n.a=Nsn(n,1),Von(n.a,1),Won(n.a,2),Won(n.a,3),Won(n.a,4),Won(n.a,5),n.o=Nsn(n,2),Von(n.o,8),Von(n.o,9),Won(n.o,10),Won(n.o,11),Won(n.o,12),Won(n.o,13),Won(n.o,14),Won(n.o,15),Won(n.o,16),Won(n.o,17),Won(n.o,18),Won(n.o,19),Won(n.o,20),Won(n.o,21),Won(n.o,22),Won(n.o,23),rrn(n.o),rrn(n.o),rrn(n.o),rrn(n.o),rrn(n.o),rrn(n.o),rrn(n.o),rrn(n.o),rrn(n.o),rrn(n.o),n.p=Nsn(n,3),Von(n.p,2),Von(n.p,3),Von(n.p,4),Von(n.p,5),Won(n.p,6),Won(n.p,7),rrn(n.p),rrn(n.p),n.q=Nsn(n,4),Von(n.q,8),n.v=Nsn(n,5),Won(n.v,9),rrn(n.v),rrn(n.v),rrn(n.v),n.w=Nsn(n,6),Von(n.w,2),Von(n.w,3),Von(n.w,4),Won(n.w,5),n.B=Nsn(n,7),Won(n.B,1),rrn(n.B),rrn(n.B),rrn(n.B),n.Q=Nsn(n,8),Won(n.Q,0),rrn(n.Q),n.R=Nsn(n,9),Von(n.R,1),n.S=Nsn(n,10),rrn(n.S),rrn(n.S),rrn(n.S),rrn(n.S),rrn(n.S),rrn(n.S),rrn(n.S),rrn(n.S),rrn(n.S),rrn(n.S),rrn(n.S),rrn(n.S),rrn(n.S),rrn(n.S),rrn(n.S),n.T=Nsn(n,11),Won(n.T,10),Won(n.T,11),Won(n.T,12),Won(n.T,13),Won(n.T,14),rrn(n.T),rrn(n.T),n.U=Nsn(n,12),Von(n.U,2),Von(n.U,3),Won(n.U,4),Won(n.U,5),Won(n.U,6),Won(n.U,7),rrn(n.U),n.V=Nsn(n,13),Won(n.V,10),n.W=Nsn(n,14),Von(n.W,18),Von(n.W,19),Von(n.W,20),Won(n.W,21),Won(n.W,22),Won(n.W,23),n.bb=Nsn(n,15),Von(n.bb,10),Von(n.bb,11),Von(n.bb,12),Von(n.bb,13),Von(n.bb,14),Von(n.bb,15),Von(n.bb,16),Won(n.bb,17),rrn(n.bb),rrn(n.bb),n.eb=Nsn(n,16),Von(n.eb,2),Von(n.eb,3),Von(n.eb,4),Von(n.eb,5),Von(n.eb,6),Von(n.eb,7),Won(n.eb,8),Won(n.eb,9),n.ab=Nsn(n,17),Von(n.ab,0),Von(n.ab,1),n.H=Nsn(n,18),Won(n.H,0),Won(n.H,1),Won(n.H,2),Won(n.H,3),Won(n.H,4),Won(n.H,5),rrn(n.H),n.db=Nsn(n,19),Won(n.db,2),n.c=$sn(n,20),n.d=$sn(n,21),n.e=$sn(n,22),n.f=$sn(n,23),n.i=$sn(n,24),n.g=$sn(n,25),n.j=$sn(n,26),n.k=$sn(n,27),n.n=$sn(n,28),n.r=$sn(n,29),n.s=$sn(n,30),n.t=$sn(n,31),n.u=$sn(n,32),n.fb=$sn(n,33),n.A=$sn(n,34),n.C=$sn(n,35),n.D=$sn(n,36),n.F=$sn(n,37),n.G=$sn(n,38),n.I=$sn(n,39),n.J=$sn(n,40),n.L=$sn(n,41),n.M=$sn(n,42),n.N=$sn(n,43),n.O=$sn(n,44),n.P=$sn(n,45),n.X=$sn(n,46),n.Y=$sn(n,47),n.Z=$sn(n,48),n.$=$sn(n,49),n._=$sn(n,50),n.cb=$sn(n,51),n.K=$sn(n,52))}function UYn(n,t,e){var i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y,M,T,j,E;for(a=new lS,v=uG(oIn(e,(jYn(),Byt)),88),d=0,Qon(a,(!t.a&&(t.a=new fV(bFt,t,10,11)),t.a));0!=a.b;)(xA(zDn(s=R0(h=uG(0==a.b?null:(MK(0!=a.b),Lrn(a,a.a.a)),27)),Syt))!==xA((yvn(),Fjt))||xA(zDn(s,Fyt))===xA((kvn(),lgt))||xA(zDn(s,Fyt))===xA((kvn(),hgt))||oM(gK(zDn(s,Cyt)))||xA(zDn(s,kyt))!==xA((Uvn(),tbt))||xA(zDn(s,yMt))===xA((THn(),Pjt))||xA(zDn(s,yMt))===xA((THn(),Cjt))||xA(zDn(s,MMt))===xA((MKn(),JTt))||xA(zDn(s,MMt))===xA((MKn(),ZTt)))&&!oM(gK(zDn(h,jyt)))&&Myn(h,(GYn(),imt),xwn(d++)),!oM(gK(zDn(h,FMt)))&&(l=0!=(!h.a&&(h.a=new fV(bFt,h,10,11)),h.a).i,w=oCn(h),b=xA(zDn(h,rMt))===xA((Own(),Ixt)),p=null,(E=!vnn(h,(XYn(),e$t))||L9(mK(zDn(h,e$t))))&&b&&(l||w)&&(kfn(p=PGn(h),Byt,v),vR(p,fTt)&&iM(new omn(uM(pK(oIn(p,fTt)))),p),0!=uG(zDn(h,DMt),181).gc()&&(f=p,kS(new fX(null,(!h.c&&(h.c=new fV(wFt,h,9,9)),new h3(h.c,16))),new Yd(f)),u_n(h,p))),k=e,(y=uG(cQ(n.a,R0(h)),10))&&(k=y.e),g=RJn(n,h,k),p&&(g.e=p,p.e=g,Qon(a,(!h.a&&(h.a=new fV(bFt,h,10,11)),h.a))));for(d=0,s8(a,t,a.c.b,a.c);0!=a.b;){for(u=new DD((!(c=uG(0==a.b?null:(MK(0!=a.b),Lrn(a,a.a.a)),27)).b&&(c.b=new fV(aFt,c,12,3)),c.b));u.e!=u.i.gc();)iHn(o=uG(Zkn(u),74)),(xA(zDn(t,Syt))!==xA((yvn(),Fjt))||xA(zDn(t,Fyt))===xA((kvn(),lgt))||xA(zDn(t,Fyt))===xA((kvn(),hgt))||oM(gK(zDn(t,Cyt)))||xA(zDn(t,kyt))!==xA((Uvn(),tbt))||xA(zDn(t,yMt))===xA((THn(),Pjt))||xA(zDn(t,yMt))===xA((THn(),Cjt))||xA(zDn(t,MMt))===xA((MKn(),JTt))||xA(zDn(t,MMt))===xA((MKn(),ZTt)))&&Myn(o,(GYn(),imt),xwn(d++)),T=lCn(uG(zrn((!o.b&&(o.b=new f_(cFt,o,4,7)),o.b),0),84)),j=lCn(uG(zrn((!o.c&&(o.c=new f_(cFt,o,5,8)),o.c),0),84)),oM(gK(zDn(o,FMt)))||oM(gK(zDn(T,FMt)))||oM(gK(zDn(j,FMt)))||(m=c,BNn(o)&&oM(gK(zDn(T,sMt)))&&oM(gK(zDn(o,hMt)))||Ern(j,T)?m=T:Ern(T,j)&&(m=j),k=e,(y=uG(cQ(n.a,m),10))&&(k=y.e),kfn(FYn(n,o,m,k),(GYn(),Ipt),SFn(n,o,t,e)));if(b=xA(zDn(c,rMt))===xA((Own(),Ixt)))for(r=new DD((!c.a&&(c.a=new fV(bFt,c,10,11)),c.a));r.e!=r.i.gc();)E=!vnn(i=uG(Zkn(r),27),(XYn(),e$t))||L9(mK(zDn(i,e$t))),M=xA(zDn(i,rMt))===xA(Ixt),E&&M&&s8(a,i,a.c.b,a.c)}}function GYn(){var n,t;GYn=E,rmt=new Cm(E4n),Ipt=new Cm("coordinateOrigin"),wmt=new Cm("processors"),Cpt=new uF("compoundNode",(qx(),!1)),qpt=new uF("insideConnections",!1),cmt=new Cm("originalBendpoints"),amt=new Cm("originalDummyNodePosition"),omt=new Cm("originalLabelEdge"),gmt=new Cm("representedLabels"),$pt=new Cm("endLabels"),Dpt=new Cm("endLabel.origin"),Qpt=new uF("labelSide",(Ajn(),Rxt)),emt=new uF("maxEdgeThickness",0),pmt=new uF("reversed",!1),dmt=new Cm(S4n),Zpt=new uF("longEdgeSource",null),nmt=new uF("longEdgeTarget",null),Ypt=new uF("longEdgeHasLabelDummies",!1),Jpt=new uF("longEdgeBeforeLabelDummy",!1),Npt=new uF("edgeConstraint",(Pfn(),kgt)),zpt=new Cm("inLayerLayoutUnit"),Xpt=new uF("inLayerConstraint",(Zen(),gpt)),Vpt=new uF("inLayerSuccessorConstraint",new Zm),Wpt=new uF("inLayerSuccessorConstraintBetweenNonDummies",!1),lmt=new Cm("portDummy"),Opt=new uF("crossingHint",xwn(0)),Hpt=new uF("graphProperties",new nB(t=uG(Mj(bpt),9),uG(MF(t,t.length),9),0)),Fpt=new uF("externalPortSide",(KQn(),FRt)),_pt=new uF("externalPortSize",new sj),Rpt=new Cm("externalPortReplacedDummies"),Kpt=new Cm("externalPortReplacedDummy"),xpt=new uF("externalPortConnections",new nB(n=uG(Mj(YRt),9),uG(MF(n,n.length),9),0)),bmt=new uF(i3n,0),jpt=new Cm("barycenterAssociates"),Pmt=new Cm("TopSideComments"),Ept=new Cm("BottomSideComments"),Ppt=new Cm("CommentConnectionPort"),Gpt=new uF("inputCollect",!1),hmt=new uF("outputCollect",!1),Lpt=new uF("cyclic",!1),Apt=new Cm("crossHierarchyMap"),Smt=new Cm("targetOffset"),new uF("splineLabelSize",new sj),kmt=new Cm("spacings"),fmt=new uF("partitionConstraint",!1),Spt=new Cm("breakingPoint.info"),jmt=new Cm("splines.survivingEdge"),Tmt=new Cm("splines.route.start"),ymt=new Cm("splines.edgeChain"),smt=new Cm("originalPortConstraints"),vmt=new Cm("selfLoopHolder"),Mmt=new Cm("splines.nsPortY"),imt=new Cm("modelOrder"),tmt=new Cm("longEdgeTargetNode"),Bpt=new uF(_6n,!1),mmt=new uF(_6n,!1),Upt=new Cm("layerConstraints.hiddenNodes"),umt=new Cm("layerConstraints.opposidePort"),Emt=new Cm("targetNode.modelOrder")}function qYn(n,t,i,r){var c,a,o,u,s,h,f,l,b,w,d;for(l=Fkn(n.b,0);l.b!=l.d.c;)if(!m_((f=uG(I6(l),40)).c,H9n))for(a=uG(l8(new fX(null,new h3(zNn(f,n),16)),ftn(new V,new z,new en,Uhn(cT(Rut,1),p1n,108,0,[(ybn(),Iut)]))),15),t==(xdn(),JDt)||t==YDt?a.jd(new oo):a.jd(new uo),d=a.gc(),c=0;c0&&(u=uG(pR(uG(a.Xb(c),65).a),8).a,b=f.e.a+f.f.a/2,s=uG(pR(uG(a.Xb(c),65).a),8).b,w=f.e.b+f.f.b/2,r>0&&e.Math.abs(s-w)/(e.Math.abs(u-b)/40)>50&&cL(uG(a.Xb(c),65).a,new MO(f.e.a+f.f.a+r/5.3,w>s?f.e.b+f.f.b*o-r/2:f.e.b+f.f.b*o+r/2))),cL(uG(a.Xb(c),65).a,new MO(f.e.a+f.f.a,f.e.b+f.f.b*o))):t==YDt?(h=uM(pK(oIn(f,(OQn(),DPt)))),f.e.a-r>h?cL(uG(a.Xb(c),65).a,new MO(h-i,f.e.b+f.f.b*o)):uG(a.Xb(c),65).a.b>0&&(u=uG(pR(uG(a.Xb(c),65).a),8).a,b=f.e.a+f.f.a/2,s=uG(pR(uG(a.Xb(c),65).a),8).b,w=f.e.b+f.f.b/2,r>0&&e.Math.abs(s-w)/(e.Math.abs(u-b)/40)>50&&cL(uG(a.Xb(c),65).a,new MO(f.e.a-r/5.3,w>s?f.e.b+f.f.b*o-r/2:f.e.b+f.f.b*o+r/2))),cL(uG(a.Xb(c),65).a,new MO(f.e.a,f.e.b+f.f.b*o))):t==nxt?(h=uM(pK(oIn(f,(OQn(),$Pt)))),f.e.b+f.f.b+r0&&(u=uG(pR(uG(a.Xb(c),65).a),8).a,b=f.e.a+f.f.a/2,s=uG(pR(uG(a.Xb(c),65).a),8).b,w=f.e.b+f.f.b/2,r>0&&e.Math.abs(u-b)/(e.Math.abs(s-w)/40)>50&&cL(uG(a.Xb(c),65).a,new MO(b>u?f.e.a+f.f.a*o-r/2:f.e.a+f.f.a*o+r/2,f.e.b+r/5.3+f.f.b))),cL(uG(a.Xb(c),65).a,new MO(f.e.a+f.f.a*o,f.e.b+f.f.b))):(h=uM(pK(oIn(f,(OQn(),DPt)))),uln(uG(a.Xb(c),65),n)?cL(uG(a.Xb(c),65).a,new MO(f.e.a+f.f.a*o,uG(pR(uG(a.Xb(c),65).a),8).b)):f.e.b-r>h?cL(uG(a.Xb(c),65).a,new MO(f.e.a+f.f.a*o,h-i)):uG(a.Xb(c),65).a.b>0&&(u=uG(pR(uG(a.Xb(c),65).a),8).a,b=f.e.a+f.f.a/2,s=uG(pR(uG(a.Xb(c),65).a),8).b,w=f.e.b+f.f.b/2,r>0&&e.Math.abs(u-b)/(e.Math.abs(s-w)/40)>50&&cL(uG(a.Xb(c),65).a,new MO(b>u?f.e.a+f.f.a*o-r/2:f.e.a+f.f.a*o+r/2,f.e.b-r/5.3))),cL(uG(a.Xb(c),65).a,new MO(f.e.a+f.f.a*o,f.e.b)))}function XYn(){var n,t;XYn=E,e$t=new Cm(Vnt),yDt=new Cm(Wnt),nMn(),i$t=new mL(X8n,r$t=CNt),new Jm,c$t=new mL(R3n,null),a$t=new Cm(Qnt),ZSn(),b$t=WX(ZNt,Uhn(cT(txt,1),p1n,298,0,[WNt])),l$t=new mL(r9n,b$t),w$t=new mL(q8n,(qx(),!1)),xdn(),d$t=new mL(W8n,g$t=ZDt),_gn(),k$t=new mL(m8n,y$t=fxt),j$t=new mL(Xnt,!1),Own(),E$t=new mL(b8n,S$t=Oxt),Q$t=new CN(12),W$t=new mL(K3n,Q$t),O$t=new mL(f4n,!1),A$t=new mL(g9n,!1),V$t=new mL(w4n,!1),$Pn(),sDt=new mL(l4n,hDt=sRt),mDt=new Cm(b9n),vDt=new Cm(a4n),kDt=new Cm(s4n),TDt=new Cm(h4n),N$t=new Uk,L$t=new mL(c9n,N$t),f$t=new mL(u9n,!1),P$t=new mL(s9n,!1),new Cm(Jnt),D$t=new Nk,$$t=new mL(w9n,D$t),z$t=new mL(U8n,!1),new Jm,MDt=new mL(Ynt,1),h$t=new Cm(Znt),s$t=new Cm(ntt),HDt=new mL(k4n,!1),new mL(ttt,!0),xwn(0),new mL(ett,xwn(100)),new mL(itt,!1),xwn(0),new mL(rtt,xwn(4e3)),xwn(0),new mL(ctt,xwn(400)),new mL(att,!1),new mL(ott,!1),new mL(utt,!0),new mL(stt,!1),qpn(),o$t=new mL(znt,u$t=TKt),jDt=new mL(A8n,10),EDt=new mL(L8n,10),SDt=new mL(D3n,20),PDt=new mL(N8n,10),CDt=new mL(u4n,2),IDt=new mL($8n,10),ADt=new mL(D8n,0),LDt=new mL(K8n,5),NDt=new mL(x8n,1),$Dt=new mL(R8n,1),DDt=new mL(o4n,20),xDt=new mL(F8n,10),FDt=new mL(_8n,10),ODt=new Cm(B8n),KDt=new qL,RDt=new mL(d9n,KDt),Z$t=new Cm(l9n),J$t=new mL(f9n,Y$t=!1),R$t=new CN(5),x$t=new mL(Q8n,R$t),VDn(),t=uG(Mj(eRt),9),F$t=new nB(t,uG(MF(t,t.length),9),0),K$t=new mL(m4n,F$t),Vkn(),tDt=new mL(Z8n,eDt=Zxt),rDt=new Cm(n9n),cDt=new Cm(t9n),aDt=new Cm(e9n),iDt=new Cm(i9n),n=uG(Mj(sKt),9),B$t=new nB(n,uG(MF(n,n.length),9),0),_$t=new mL(p4n,B$t),X$t=ggn((aUn(),eKt)),q$t=new mL(g4n,X$t),G$t=new MO(0,0),U$t=new mL(x4n,G$t),H$t=new mL(d4n,!1),Zrn(),m$t=new mL(a9n,v$t=ixt),p$t=new mL(b4n,!1),new Cm(htt),xwn(1),new mL(ftt,null),oDt=new Cm(h9n),fDt=new Cm(o9n),KQn(),gDt=new mL(G8n,pDt=FRt),uDt=new Cm(H8n),eNn(),wDt=ggn(gRt),bDt=new mL(v4n,wDt),lDt=new mL(J8n,!1),dDt=new mL(Y8n,!0),new Jm,XDt=new mL(y4n,1),VDt=new mL(ltt,null),BDt=new mL(M4n,150),_Dt=new mL(T4n,1.414),UDt=new mL(j4n,null),GDt=new mL(btt,1),C$t=new mL(z8n,!1),I$t=new mL(V8n,!1),M$t=new mL(x3n,1),RCn(),new mL(wtt,T$t=mxt),nDt=!0,Iwn(),zDt=fKt,WDt=fKt,qDt=fKt}function zYn(){zYn=E,qbt=new CC("DIRECTION_PREPROCESSOR",0),Hbt=new CC("COMMENT_PREPROCESSOR",1),Xbt=new CC("EDGE_AND_LAYER_CONSTRAINT_EDGE_REVERSER",2),uwt=new CC("INTERACTIVE_EXTERNAL_PORT_POSITIONER",3),Pwt=new CC("PARTITION_PREPROCESSOR",4),lwt=new CC("LABEL_DUMMY_INSERTER",5),Nwt=new CC("SELF_LOOP_PREPROCESSOR",6),pwt=new CC("LAYER_CONSTRAINT_PREPROCESSOR",7),Ewt=new CC("PARTITION_MIDPROCESSOR",8),iwt=new CC("HIGH_DEGREE_NODE_LAYER_PROCESSOR",9),ywt=new CC("NODE_PROMOTION",10),gwt=new CC("LAYER_CONSTRAINT_POSTPROCESSOR",11),Swt=new CC("PARTITION_POSTPROCESSOR",12),Zbt=new CC("HIERARCHICAL_PORT_CONSTRAINT_PROCESSOR",13),Dwt=new CC("SEMI_INTERACTIVE_CROSSMIN_PROCESSOR",14),xbt=new CC("BREAKING_POINT_INSERTER",15),kwt=new CC("LONG_EDGE_SPLITTER",16),Iwt=new CC("PORT_SIDE_PROCESSOR",17),swt=new CC("INVERTED_PORT_PROCESSOR",18),Cwt=new CC("PORT_LIST_SORTER",19),Rwt=new CC("SORT_BY_INPUT_ORDER_OF_MODEL",20),Twt=new CC("NORTH_SOUTH_PORT_PREPROCESSOR",21),Rbt=new CC("BREAKING_POINT_PROCESSOR",22),jwt=new CC(p6n,23),Kwt=new CC(m6n,24),Awt=new CC("SELF_LOOP_PORT_RESTORER",25),xwt=new CC("SINGLE_EDGE_GRAPH_WRAPPER",26),hwt=new CC("IN_LAYER_CONSTRAINT_PROCESSOR",27),Qbt=new CC("END_NODE_PORT_LABEL_MANAGEMENT_PROCESSOR",28),fwt=new CC("LABEL_AND_NODE_SIZE_PROCESSOR",29),owt=new CC("INNERMOST_NODE_MARGIN_CALCULATOR",30),$wt=new CC("SELF_LOOP_ROUTER",31),_bt=new CC("COMMENT_NODE_MARGIN_CALCULATOR",32),Vbt=new CC("END_LABEL_PREPROCESSOR",33),wwt=new CC("LABEL_DUMMY_SWITCHER",34),Fbt=new CC("CENTER_LABEL_MANAGEMENT_PROCESSOR",35),dwt=new CC("LABEL_SIDE_SELECTOR",36),cwt=new CC("HYPEREDGE_DUMMY_MERGER",37),nwt=new CC("HIERARCHICAL_PORT_DUMMY_SIZE_PROCESSOR",38),mwt=new CC("LAYER_SIZE_AND_GRAPH_HEIGHT_CALCULATOR",39),ewt=new CC("HIERARCHICAL_PORT_POSITION_PROCESSOR",40),Ubt=new CC("CONSTRAINTS_POSTPROCESSOR",41),Bbt=new CC("COMMENT_POSTPROCESSOR",42),awt=new CC("HYPERNODE_PROCESSOR",43),twt=new CC("HIERARCHICAL_PORT_ORTHOGONAL_EDGE_ROUTER",44),vwt=new CC("LONG_EDGE_JOINER",45),Lwt=new CC("SELF_LOOP_POSTPROCESSOR",46),Kbt=new CC("BREAKING_POINT_REMOVER",47),Mwt=new CC("NORTH_SOUTH_PORT_POSTPROCESSOR",48),rwt=new CC("HORIZONTAL_COMPACTOR",49),bwt=new CC("LABEL_DUMMY_REMOVER",50),Jbt=new CC("FINAL_SPLINE_BENDPOINTS_CALCULATOR",51),Wbt=new CC("END_LABEL_SORTER",52),Owt=new CC("REVERSED_EDGE_RESTORER",53),zbt=new CC("END_LABEL_POSTPROCESSOR",54),Ybt=new CC("HIERARCHICAL_NODE_RESIZER",55),Gbt=new CC("DIRECTION_POSTPROCESSOR",56)}function VYn(){VYn=E,Vin(),mvt=new mL(B6n,vvt=dgt),xvt=new mL(H6n,(qx(),!1)),Y6(),Bvt=new mL(U6n,Hvt=kpt),akt=new mL(G6n,!1),okt=new mL(q6n,!0),Dmt=new mL(X6n,!1),nin(),Skt=new mL(z6n,Pkt=Gjt),xwn(1),Dkt=new mL(V6n,xwn(7)),xkt=new mL(W6n,!1),Rvt=new mL(Q6n,!1),kvn(),gvt=new mL(J6n,pvt=sgt),MKn(),rkt=new mL(Y6n,ckt=rjt),Gpn(),Vvt=new mL(Z6n,Wvt=Lmt),xwn(-1),zvt=new mL(n5n,null),xwn(-1),Qvt=new mL(t5n,xwn(-1)),xwn(-1),Jvt=new mL(e5n,xwn(4)),xwn(-1),Zvt=new mL(i5n,xwn(2)),THn(),ekt=new mL(r5n,ikt=$jt),xwn(0),tkt=new mL(c5n,xwn(0)),qvt=new mL(a5n,xwn(vZn)),jan(),wvt=new mL(o5n,dvt=Zdt),Jmt=new mL(u5n,!1),avt=new mL(s5n,.1),lvt=new mL(h5n,!1),uvt=new mL(f5n,null),svt=new mL(l5n,null),xwn(-1),hvt=new mL(b5n,null),xwn(-1),fvt=new mL(w5n,xwn(-1)),xwn(0),Ymt=new mL(d5n,xwn(40)),ihn(),ivt=new mL(g5n,rvt=lpt),Zmt=new mL(p5n,nvt=hpt),pyn(),jkt=new mL(m5n,Ekt=vjt),wkt=new Cm(v5n),Wtn(),ukt=new mL(k5n,skt=Lgt),ESn(),fkt=new mL(y5n,lkt=Fgt),new Jm,pkt=new mL(M5n,.3),vkt=new Cm(T5n),Yyn(),kkt=new mL(j5n,ykt=djt),isn(),Svt=new mL(E5n,Pvt=nEt),Sln(),Cvt=new mL(S5n,Ivt=aEt),kbn(),Ovt=new mL(P5n,Avt=fEt),Nvt=new mL(C5n,.2),jvt=new mL(I5n,2),Akt=new mL(O5n,null),Nkt=new mL(A5n,10),Lkt=new mL(L5n,10),$kt=new mL(N5n,20),xwn(0),Ckt=new mL($5n,xwn(0)),xwn(0),Ikt=new mL(D5n,xwn(0)),xwn(0),Okt=new mL(x5n,xwn(0)),xmt=new mL(R5n,!1),RIn(),Fmt=new mL(K5n,_mt=Vgt),H7(),Rmt=new mL(F5n,Kmt=Wdt),Fvt=new mL(_5n,!1),xwn(0),Kvt=new mL(B5n,xwn(16)),xwn(0),_vt=new mL(H5n,xwn(5)),zhn(),ryt=new mL(U5n,cyt=kEt),Rkt=new mL(G5n,10),_kt=new mL(q5n,1),ran(),Vkt=new mL(X5n,Wkt=cgt),Ukt=new Cm(z5n),Xkt=xwn(1),xwn(0),qkt=new mL(V5n,Xkt),ian(),syt=new mL(W5n,hyt=wEt),ayt=new Cm(Q5n),nyt=new mL(J5n,!0),Ykt=new mL(Y5n,2),eyt=new mL(Z5n,!0),tOn(),Mvt=new mL(n8n,Tvt=Cgt),vAn(),kvt=new mL(t8n,yvt=Hdt),yvn(),Wmt=new mL(e8n,Qmt=Fjt),Vmt=new mL(i8n,!1),zmt=new mL(r8n,!1),Uvn(),Bmt=new mL(c8n,Hmt=tbt),Cwn(),qmt=new mL(a8n,Xmt=ujt),Umt=new mL(o8n,0),Gmt=new mL(u8n,0),Gvt=fgt,Uvt=Ydt,Yvt=ijt,nkt=ijt,Xvt=YTt,Own(),ovt=Ixt,bvt=Zdt,cvt=Zdt,tvt=Zdt,evt=Ixt,dkt=Mjt,gkt=vjt,hkt=vjt,bkt=vjt,mkt=yjt,Tkt=Mjt,Mkt=Mjt,_gn(),Lvt=hxt,$vt=hxt,Dvt=fEt,Evt=sxt,Kkt=yEt,Fkt=vEt,Bkt=yEt,Hkt=vEt,Qkt=yEt,Jkt=vEt,Gkt=rgt,zkt=cgt,fyt=yEt,lyt=vEt,oyt=yEt,uyt=vEt,tyt=vEt,Zkt=vEt,iyt=vEt}function WYn(n,t,i){var r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y,M,T,j,E,S,P,C,I,O,A,L,N,$,D,x,R,K,F,_,B,H,U,G,q,X,z,V,W,Q,J,Y,Z,nn,tn,en,rn,cn,an,on,un;for(Y=0,N=0,x=(O=t).length;N0&&(n.a[U.p]=Y++)}for(rn=0,$=0,R=(A=i).length;$0;){for(MK(z.b>0),X=0,u=new Ww((U=uG(z.a.Xb(z.c=--z.b),12)).e);u.a0&&(U.j==(KQn(),yRt)?(n.a[U.p]=rn,++rn):(n.a[U.p]=rn+K+_,++_))}rn+=_}for(q=new Ym,d=new XL,L=0,D=(I=t).length;Lh.b&&(h.b=V)):U.i.c==J&&(Vh.c&&(h.c=V));for(Ntn(g,0,g.length,null),en=Inn(YHt,W1n,28,g.length,15,1),r=Inn(YHt,W1n,28,rn+1,15,1),m=0;m0;)j%2>0&&(c+=on[j+1]),++on[j=(j-1)/2|0];for(S=Inn(ZEt,EZn,374,2*g.length,0,1),y=0;y0&&(A1(O.f),0)){if(uG(zDn(g,UDt),280)==fKt)throw hv(new jM("Topdown Layout Providers should only be used on parallel nodes."));XA(A1(O.f)),null.Um(),vN(g,e.Math.max(g.g,null.Vm),e.Math.max(g.f,null.Vm))}else null!=zDn(g,VDt)&&(H=uG(zDn(g,VDt),347).Tg(g),vN(g,e.Math.max(g.g,H.a),e.Math.max(g.f,H.b)));if(D=uG(zDn(t,W$t),107),b=t.g-(D.b+D.c),l=t.f-(D.d+D.a),G.bh("Available Child Area: ("+b+"|"+l+")"),Myn(t,c$t,b/l),Mkn(t,c,r.eh(N)),uG(zDn(t,UDt),280)==bKt&&(VJn(t),vN(t,D.b+uM(pK(zDn(t,h$t)))+D.c,D.d+uM(pK(zDn(t,s$t)))+D.a)),G.bh("Executed layout algorithm: "+mK(zDn(t,e$t))+" on node "+t.k),uG(zDn(t,UDt),280)==fKt){if(b<0||l<0)throw hv(new jM("The size defined by the parent parallel node is too small for the space provided by the paddings of the child hierarchical node. "+t.k));for(vnn(t,h$t)||vnn(t,s$t)||VJn(t),d=uM(pK(zDn(t,h$t))),w=uM(pK(zDn(t,s$t))),G.bh("Desired Child Area: ("+d+"|"+w+")"),R=b/d,K=l/w,x=e.Math.min(R,e.Math.min(K,uM(pK(zDn(t,GDt))))),Myn(t,XDt,x),G.bh(t.k+" -- Local Scale Factor (X|Y): ("+R+"|"+K+")"),v=uG(zDn(t,l$t),21),a=0,o=0,x'?":m_(rit,n)?"'(?<' or '(? toIndex: ",s2n=", toIndex: ",h2n="Index: ",f2n=", Size: ",l2n="org.eclipse.elk.alg.common",b2n={50:1},w2n="org.eclipse.elk.alg.common.compaction",d2n="Scanline/EventHandler",g2n="org.eclipse.elk.alg.common.compaction.oned",p2n="CNode belongs to another CGroup.",m2n="ISpacingsHandler/1",v2n="The ",k2n=" instance has been finished already.",y2n="The direction ",M2n=" is not supported by the CGraph instance.",T2n="OneDimensionalCompactor",j2n="OneDimensionalCompactor/lambda$0$Type",E2n="Quadruplet",S2n="ScanlineConstraintCalculator",P2n="ScanlineConstraintCalculator/ConstraintsScanlineHandler",C2n="ScanlineConstraintCalculator/ConstraintsScanlineHandler/lambda$0$Type",I2n="ScanlineConstraintCalculator/Timestamp",O2n="ScanlineConstraintCalculator/lambda$0$Type",A2n={178:1,46:1},L2n="org.eclipse.elk.alg.common.compaction.options",N2n="org.eclipse.elk.core.data",$2n="org.eclipse.elk.polyomino.traversalStrategy",D2n="org.eclipse.elk.polyomino.lowLevelSort",x2n="org.eclipse.elk.polyomino.highLevelSort",R2n="org.eclipse.elk.polyomino.fill",K2n={134:1},F2n="polyomino",_2n="org.eclipse.elk.alg.common.networksimplex",B2n={183:1,3:1,4:1},H2n="org.eclipse.elk.alg.common.nodespacing",U2n="org.eclipse.elk.alg.common.nodespacing.cellsystem",G2n="CENTER",q2n={217:1,336:1},X2n={3:1,4:1,5:1,603:1},z2n="LEFT",V2n="RIGHT",W2n="Vertical alignment cannot be null",Q2n="BOTTOM",J2n="org.eclipse.elk.alg.common.nodespacing.internal",Y2n="UNDEFINED",Z2n=.01,n3n="org.eclipse.elk.alg.common.nodespacing.internal.algorithm",t3n="LabelPlacer/lambda$0$Type",e3n="LabelPlacer/lambda$1$Type",i3n="portRatioOrPosition",r3n="org.eclipse.elk.alg.common.overlaps",c3n="DOWN",a3n="org.eclipse.elk.alg.common.polyomino",o3n="NORTH",u3n="EAST",s3n="SOUTH",h3n="WEST",f3n="org.eclipse.elk.alg.common.polyomino.structures",l3n="Direction",b3n="Grid is only of size ",w3n=". Requested point (",d3n=") is out of bounds.",g3n=" Given center based coordinates were (",p3n="org.eclipse.elk.graph.properties",m3n="IPropertyHolder",v3n={3:1,96:1,137:1},k3n="org.eclipse.elk.alg.common.spore",y3n="org.eclipse.elk.alg.common.utils",M3n={205:1},T3n="org.eclipse.elk.core",j3n="Connected Components Compaction",E3n="org.eclipse.elk.alg.disco",S3n="org.eclipse.elk.alg.disco.graph",P3n="org.eclipse.elk.alg.disco.options",C3n="CompactionStrategy",I3n="org.eclipse.elk.disco.componentCompaction.strategy",O3n="org.eclipse.elk.disco.componentCompaction.componentLayoutAlgorithm",A3n="org.eclipse.elk.disco.debug.discoGraph",L3n="org.eclipse.elk.disco.debug.discoPolys",N3n="componentCompaction",$3n="org.eclipse.elk.disco",D3n="org.eclipse.elk.spacing.componentComponent",x3n="org.eclipse.elk.edge.thickness",R3n="org.eclipse.elk.aspectRatio",K3n="org.eclipse.elk.padding",F3n="org.eclipse.elk.alg.disco.transform",_3n=1.5707963267948966,B3n=17976931348623157e292,H3n={3:1,4:1,5:1,198:1},U3n={3:1,6:1,4:1,5:1,100:1,115:1},G3n="org.eclipse.elk.alg.force",q3n="ComponentsProcessor",X3n="ComponentsProcessor/1",z3n="ElkGraphImporter/lambda$0$Type",V3n="org.eclipse.elk.alg.force.graph",W3n="Component Layout",Q3n="org.eclipse.elk.alg.force.model",J3n="org.eclipse.elk.force.model",Y3n="org.eclipse.elk.force.iterations",Z3n="org.eclipse.elk.force.repulsivePower",n4n="org.eclipse.elk.force.temperature",t4n=.001,e4n="org.eclipse.elk.force.repulsion",i4n="org.eclipse.elk.alg.force.options",r4n=1.600000023841858,c4n="org.eclipse.elk.force",a4n="org.eclipse.elk.priority",o4n="org.eclipse.elk.spacing.nodeNode",u4n="org.eclipse.elk.spacing.edgeLabel",s4n="org.eclipse.elk.randomSeed",h4n="org.eclipse.elk.separateConnectedComponents",f4n="org.eclipse.elk.interactive",l4n="org.eclipse.elk.portConstraints",b4n="org.eclipse.elk.edgeLabels.inline",w4n="org.eclipse.elk.omitNodeMicroLayout",d4n="org.eclipse.elk.nodeSize.fixedGraphSize",g4n="org.eclipse.elk.nodeSize.options",p4n="org.eclipse.elk.nodeSize.constraints",m4n="org.eclipse.elk.nodeLabels.placement",v4n="org.eclipse.elk.portLabels.placement",k4n="org.eclipse.elk.topdownLayout",y4n="org.eclipse.elk.topdown.scaleFactor",M4n="org.eclipse.elk.topdown.hierarchicalNodeWidth",T4n="org.eclipse.elk.topdown.hierarchicalNodeAspectRatio",j4n="org.eclipse.elk.topdown.nodeType",E4n="origin",S4n="random",P4n="boundingBox.upLeft",C4n="boundingBox.lowRight",I4n="org.eclipse.elk.stress.fixed",O4n="org.eclipse.elk.stress.desiredEdgeLength",A4n="org.eclipse.elk.stress.dimension",L4n="org.eclipse.elk.stress.epsilon",N4n="org.eclipse.elk.stress.iterationLimit",$4n="org.eclipse.elk.stress",D4n="ELK Stress",x4n="org.eclipse.elk.nodeSize.minimum",R4n="org.eclipse.elk.alg.force.stress",K4n="Layered layout",F4n="org.eclipse.elk.alg.layered",_4n="org.eclipse.elk.alg.layered.compaction.components",B4n="org.eclipse.elk.alg.layered.compaction.oned",H4n="org.eclipse.elk.alg.layered.compaction.oned.algs",U4n="org.eclipse.elk.alg.layered.compaction.recthull",G4n="org.eclipse.elk.alg.layered.components",q4n="NONE",X4n="MODEL_ORDER",z4n={3:1,6:1,4:1,9:1,5:1,126:1},V4n={3:1,6:1,4:1,5:1,150:1,100:1,115:1},W4n="org.eclipse.elk.alg.layered.compound",Q4n={47:1},J4n="org.eclipse.elk.alg.layered.graph",Y4n=" -> ",Z4n="Not supported by LGraph",n6n="Port side is undefined",t6n={3:1,6:1,4:1,5:1,483:1,150:1,100:1,115:1},e6n={3:1,6:1,4:1,5:1,150:1,199:1,210:1,100:1,115:1},i6n={3:1,6:1,4:1,5:1,150:1,2042:1,210:1,100:1,115:1},r6n="([{\"' \t\r\n",c6n=")]}\"' \t\r\n",a6n="The given string contains parts that cannot be parsed as numbers.",o6n="org.eclipse.elk.core.math",u6n={3:1,4:1,140:1,214:1,423:1},s6n={3:1,4:1,107:1,214:1,423:1},h6n="org.eclipse.elk.alg.layered.graph.transform",f6n="ElkGraphImporter",l6n="ElkGraphImporter/lambda$1$Type",b6n="ElkGraphImporter/lambda$2$Type",w6n="ElkGraphImporter/lambda$4$Type",d6n="org.eclipse.elk.alg.layered.intermediate",g6n="Node margin calculation",p6n="ONE_SIDED_GREEDY_SWITCH",m6n="TWO_SIDED_GREEDY_SWITCH",v6n="No implementation is available for the layout processor ",k6n="IntermediateProcessorStrategy",y6n="Node '",M6n="FIRST_SEPARATE",T6n="LAST_SEPARATE",j6n="Odd port side processing",E6n="org.eclipse.elk.alg.layered.intermediate.compaction",S6n="org.eclipse.elk.alg.layered.intermediate.greedyswitch",P6n="org.eclipse.elk.alg.layered.p3order.counting",C6n={230:1},I6n="org.eclipse.elk.alg.layered.intermediate.loops",O6n="org.eclipse.elk.alg.layered.intermediate.loops.ordering",A6n="org.eclipse.elk.alg.layered.intermediate.loops.routing",L6n="org.eclipse.elk.alg.layered.intermediate.preserveorder",N6n="org.eclipse.elk.alg.layered.intermediate.wrapping",$6n="org.eclipse.elk.alg.layered.options",D6n="INTERACTIVE",x6n="GREEDY",R6n="DEPTH_FIRST",K6n="EDGE_LENGTH",F6n="SELF_LOOPS",_6n="firstTryWithInitialOrder",B6n="org.eclipse.elk.layered.directionCongruency",H6n="org.eclipse.elk.layered.feedbackEdges",U6n="org.eclipse.elk.layered.interactiveReferencePoint",G6n="org.eclipse.elk.layered.mergeEdges",q6n="org.eclipse.elk.layered.mergeHierarchyEdges",X6n="org.eclipse.elk.layered.allowNonFlowPortsToSwitchSides",z6n="org.eclipse.elk.layered.portSortingStrategy",V6n="org.eclipse.elk.layered.thoroughness",W6n="org.eclipse.elk.layered.unnecessaryBendpoints",Q6n="org.eclipse.elk.layered.generatePositionAndLayerIds",J6n="org.eclipse.elk.layered.cycleBreaking.strategy",Y6n="org.eclipse.elk.layered.layering.strategy",Z6n="org.eclipse.elk.layered.layering.layerConstraint",n5n="org.eclipse.elk.layered.layering.layerChoiceConstraint",t5n="org.eclipse.elk.layered.layering.layerId",e5n="org.eclipse.elk.layered.layering.minWidth.upperBoundOnWidth",i5n="org.eclipse.elk.layered.layering.minWidth.upperLayerEstimationScalingFactor",r5n="org.eclipse.elk.layered.layering.nodePromotion.strategy",c5n="org.eclipse.elk.layered.layering.nodePromotion.maxIterations",a5n="org.eclipse.elk.layered.layering.coffmanGraham.layerBound",o5n="org.eclipse.elk.layered.crossingMinimization.strategy",u5n="org.eclipse.elk.layered.crossingMinimization.forceNodeModelOrder",s5n="org.eclipse.elk.layered.crossingMinimization.hierarchicalSweepiness",h5n="org.eclipse.elk.layered.crossingMinimization.semiInteractive",f5n="org.eclipse.elk.layered.crossingMinimization.inLayerPredOf",l5n="org.eclipse.elk.layered.crossingMinimization.inLayerSuccOf",b5n="org.eclipse.elk.layered.crossingMinimization.positionChoiceConstraint",w5n="org.eclipse.elk.layered.crossingMinimization.positionId",d5n="org.eclipse.elk.layered.crossingMinimization.greedySwitch.activationThreshold",g5n="org.eclipse.elk.layered.crossingMinimization.greedySwitch.type",p5n="org.eclipse.elk.layered.crossingMinimization.greedySwitchHierarchical.type",m5n="org.eclipse.elk.layered.nodePlacement.strategy",v5n="org.eclipse.elk.layered.nodePlacement.favorStraightEdges",k5n="org.eclipse.elk.layered.nodePlacement.bk.edgeStraightening",y5n="org.eclipse.elk.layered.nodePlacement.bk.fixedAlignment",M5n="org.eclipse.elk.layered.nodePlacement.linearSegments.deflectionDampening",T5n="org.eclipse.elk.layered.nodePlacement.networkSimplex.nodeFlexibility",j5n="org.eclipse.elk.layered.nodePlacement.networkSimplex.nodeFlexibility.default",E5n="org.eclipse.elk.layered.edgeRouting.selfLoopDistribution",S5n="org.eclipse.elk.layered.edgeRouting.selfLoopOrdering",P5n="org.eclipse.elk.layered.edgeRouting.splines.mode",C5n="org.eclipse.elk.layered.edgeRouting.splines.sloppy.layerSpacingFactor",I5n="org.eclipse.elk.layered.edgeRouting.polyline.slopedEdgeZoneWidth",O5n="org.eclipse.elk.layered.spacing.baseValue",A5n="org.eclipse.elk.layered.spacing.edgeNodeBetweenLayers",L5n="org.eclipse.elk.layered.spacing.edgeEdgeBetweenLayers",N5n="org.eclipse.elk.layered.spacing.nodeNodeBetweenLayers",$5n="org.eclipse.elk.layered.priority.direction",D5n="org.eclipse.elk.layered.priority.shortness",x5n="org.eclipse.elk.layered.priority.straightness",R5n="org.eclipse.elk.layered.compaction.connectedComponents",K5n="org.eclipse.elk.layered.compaction.postCompaction.strategy",F5n="org.eclipse.elk.layered.compaction.postCompaction.constraints",_5n="org.eclipse.elk.layered.highDegreeNodes.treatment",B5n="org.eclipse.elk.layered.highDegreeNodes.threshold",H5n="org.eclipse.elk.layered.highDegreeNodes.treeHeight",U5n="org.eclipse.elk.layered.wrapping.strategy",G5n="org.eclipse.elk.layered.wrapping.additionalEdgeSpacing",q5n="org.eclipse.elk.layered.wrapping.correctionFactor",X5n="org.eclipse.elk.layered.wrapping.cutting.strategy",z5n="org.eclipse.elk.layered.wrapping.cutting.cuts",V5n="org.eclipse.elk.layered.wrapping.cutting.msd.freedom",W5n="org.eclipse.elk.layered.wrapping.validify.strategy",Q5n="org.eclipse.elk.layered.wrapping.validify.forbiddenIndices",J5n="org.eclipse.elk.layered.wrapping.multiEdge.improveCuts",Y5n="org.eclipse.elk.layered.wrapping.multiEdge.distancePenalty",Z5n="org.eclipse.elk.layered.wrapping.multiEdge.improveWrappedEdges",n8n="org.eclipse.elk.layered.edgeLabels.sideSelection",t8n="org.eclipse.elk.layered.edgeLabels.centerLabelPlacementStrategy",e8n="org.eclipse.elk.layered.considerModelOrder.strategy",i8n="org.eclipse.elk.layered.considerModelOrder.portModelOrder",r8n="org.eclipse.elk.layered.considerModelOrder.noModelOrder",c8n="org.eclipse.elk.layered.considerModelOrder.components",a8n="org.eclipse.elk.layered.considerModelOrder.longEdgeStrategy",o8n="org.eclipse.elk.layered.considerModelOrder.crossingCounterNodeInfluence",u8n="org.eclipse.elk.layered.considerModelOrder.crossingCounterPortInfluence",s8n="layering",h8n="layering.minWidth",f8n="layering.nodePromotion",l8n="crossingMinimization",b8n="org.eclipse.elk.hierarchyHandling",w8n="crossingMinimization.greedySwitch",d8n="nodePlacement",g8n="nodePlacement.bk",p8n="edgeRouting",m8n="org.eclipse.elk.edgeRouting",v8n="spacing",k8n="priority",y8n="compaction",M8n="compaction.postCompaction",T8n="Specifies whether and how post-process compaction is applied.",j8n="highDegreeNodes",E8n="wrapping",S8n="wrapping.cutting",P8n="wrapping.validify",C8n="wrapping.multiEdge",I8n="edgeLabels",O8n="considerModelOrder",A8n="org.eclipse.elk.spacing.commentComment",L8n="org.eclipse.elk.spacing.commentNode",N8n="org.eclipse.elk.spacing.edgeEdge",$8n="org.eclipse.elk.spacing.edgeNode",D8n="org.eclipse.elk.spacing.labelLabel",x8n="org.eclipse.elk.spacing.labelPortHorizontal",R8n="org.eclipse.elk.spacing.labelPortVertical",K8n="org.eclipse.elk.spacing.labelNode",F8n="org.eclipse.elk.spacing.nodeSelfLoop",_8n="org.eclipse.elk.spacing.portPort",B8n="org.eclipse.elk.spacing.individual",H8n="org.eclipse.elk.port.borderOffset",U8n="org.eclipse.elk.noLayout",G8n="org.eclipse.elk.port.side",q8n="org.eclipse.elk.debugMode",X8n="org.eclipse.elk.alignment",z8n="org.eclipse.elk.insideSelfLoops.activate",V8n="org.eclipse.elk.insideSelfLoops.yo",W8n="org.eclipse.elk.direction",Q8n="org.eclipse.elk.nodeLabels.padding",J8n="org.eclipse.elk.portLabels.nextToPortIfPossible",Y8n="org.eclipse.elk.portLabels.treatAsGroup",Z8n="org.eclipse.elk.portAlignment.default",n9n="org.eclipse.elk.portAlignment.north",t9n="org.eclipse.elk.portAlignment.south",e9n="org.eclipse.elk.portAlignment.west",i9n="org.eclipse.elk.portAlignment.east",r9n="org.eclipse.elk.contentAlignment",c9n="org.eclipse.elk.junctionPoints",a9n="org.eclipse.elk.edgeLabels.placement",o9n="org.eclipse.elk.port.index",u9n="org.eclipse.elk.commentBox",s9n="org.eclipse.elk.hypernode",h9n="org.eclipse.elk.port.anchor",f9n="org.eclipse.elk.partitioning.activate",l9n="org.eclipse.elk.partitioning.partition",b9n="org.eclipse.elk.position",w9n="org.eclipse.elk.margins",d9n="org.eclipse.elk.spacing.portsSurrounding",g9n="org.eclipse.elk.interactiveLayout",p9n="org.eclipse.elk.core.util",m9n={3:1,4:1,5:1,601:1},v9n="NETWORK_SIMPLEX",k9n="SIMPLE",y9n={106:1,47:1},M9n="org.eclipse.elk.alg.layered.p1cycles",T9n="org.eclipse.elk.alg.layered.p2layers",j9n={413:1,230:1},E9n={846:1,3:1,4:1},S9n="org.eclipse.elk.alg.layered.p3order",P9n="org.eclipse.elk.alg.layered.p4nodes",C9n={3:1,4:1,5:1,854:1},I9n=1e-5,O9n="org.eclipse.elk.alg.layered.p4nodes.bk",A9n="org.eclipse.elk.alg.layered.p5edges",L9n="org.eclipse.elk.alg.layered.p5edges.orthogonal",N9n="org.eclipse.elk.alg.layered.p5edges.orthogonal.direction",$9n=1e-6,D9n="org.eclipse.elk.alg.layered.p5edges.splines",x9n=.09999999999999998,R9n=1e-8,K9n=4.71238898038469,F9n=3.141592653589793,_9n="org.eclipse.elk.alg.mrtree",B9n=.10000000149011612,H9n="SUPER_ROOT",U9n="org.eclipse.elk.alg.mrtree.graph",G9n=-17976931348623157e292,q9n="org.eclipse.elk.alg.mrtree.intermediate",X9n="Processor compute fanout",z9n={3:1,6:1,4:1,5:1,534:1,100:1,115:1},V9n="Set neighbors in level",W9n="org.eclipse.elk.alg.mrtree.options",Q9n="DESCENDANTS",J9n="org.eclipse.elk.mrtree.compaction",Y9n="org.eclipse.elk.mrtree.edgeEndTextureLength",Z9n="org.eclipse.elk.mrtree.treeLevel",n7n="org.eclipse.elk.mrtree.positionConstraint",t7n="org.eclipse.elk.mrtree.weighting",e7n="org.eclipse.elk.mrtree.edgeRoutingMode",i7n="org.eclipse.elk.mrtree.searchOrder",r7n="Position Constraint",c7n="org.eclipse.elk.mrtree",a7n="org.eclipse.elk.tree",o7n="Processor arrange level",u7n="org.eclipse.elk.alg.mrtree.p2order",s7n="org.eclipse.elk.alg.mrtree.p4route",h7n="org.eclipse.elk.alg.radial",f7n=6.283185307179586,l7n="Before",b7n=5e-324,w7n="After",d7n="org.eclipse.elk.alg.radial.intermediate",g7n="COMPACTION",p7n="org.eclipse.elk.alg.radial.intermediate.compaction",m7n={3:1,4:1,5:1,100:1},v7n="org.eclipse.elk.alg.radial.intermediate.optimization",k7n="No implementation is available for the layout option ",y7n="org.eclipse.elk.alg.radial.options",M7n="org.eclipse.elk.radial.centerOnRoot",T7n="org.eclipse.elk.radial.orderId",j7n="org.eclipse.elk.radial.radius",E7n="org.eclipse.elk.radial.rotate",S7n="org.eclipse.elk.radial.compactor",P7n="org.eclipse.elk.radial.compactionStepSize",C7n="org.eclipse.elk.radial.sorter",I7n="org.eclipse.elk.radial.wedgeCriteria",O7n="org.eclipse.elk.radial.optimizationCriteria",A7n="org.eclipse.elk.radial.rotation.targetAngle",L7n="org.eclipse.elk.radial.rotation.computeAdditionalWedgeSpace",N7n="org.eclipse.elk.radial.rotation.outgoingEdgeAngles",$7n="Compaction",D7n="rotation",x7n="org.eclipse.elk.radial",R7n="org.eclipse.elk.alg.radial.p1position.wedge",K7n="org.eclipse.elk.alg.radial.sorting",F7n=5.497787143782138,_7n=3.9269908169872414,B7n=2.356194490192345,H7n="org.eclipse.elk.alg.rectpacking",U7n="org.eclipse.elk.alg.rectpacking.intermediate",G7n="org.eclipse.elk.alg.rectpacking.options",q7n="org.eclipse.elk.rectpacking.trybox",X7n="org.eclipse.elk.rectpacking.currentPosition",z7n="org.eclipse.elk.rectpacking.desiredPosition",V7n="org.eclipse.elk.rectpacking.inNewRow",W7n="org.eclipse.elk.rectpacking.widthApproximation.strategy",Q7n="org.eclipse.elk.rectpacking.widthApproximation.targetWidth",J7n="org.eclipse.elk.rectpacking.widthApproximation.optimizationGoal",Y7n="org.eclipse.elk.rectpacking.widthApproximation.lastPlaceShift",Z7n="org.eclipse.elk.rectpacking.packing.strategy",nnt="org.eclipse.elk.rectpacking.packing.compaction.rowHeightReevaluation",tnt="org.eclipse.elk.rectpacking.packing.compaction.iterations",ent="org.eclipse.elk.rectpacking.whiteSpaceElimination.strategy",int="widthApproximation",rnt="Compaction Strategy",cnt="packing.compaction",ant="org.eclipse.elk.rectpacking",ont="org.eclipse.elk.alg.rectpacking.p1widthapproximation",unt="org.eclipse.elk.alg.rectpacking.p2packing",snt="No Compaction",hnt="org.eclipse.elk.alg.rectpacking.p3whitespaceelimination",fnt="org.eclipse.elk.alg.rectpacking.util",lnt="No implementation available for ",bnt="org.eclipse.elk.alg.spore",wnt="org.eclipse.elk.alg.spore.options",dnt="org.eclipse.elk.sporeCompaction",gnt="org.eclipse.elk.underlyingLayoutAlgorithm",pnt="org.eclipse.elk.processingOrder.treeConstruction",mnt="org.eclipse.elk.processingOrder.spanningTreeCostFunction",vnt="org.eclipse.elk.processingOrder.preferredRoot",knt="org.eclipse.elk.processingOrder.rootSelection",ynt="org.eclipse.elk.structure.structureExtractionStrategy",Mnt="org.eclipse.elk.compaction.compactionStrategy",Tnt="org.eclipse.elk.compaction.orthogonal",jnt="org.eclipse.elk.overlapRemoval.maxIterations",Ent="org.eclipse.elk.overlapRemoval.runScanline",Snt="processingOrder",Pnt="overlapRemoval",Cnt="org.eclipse.elk.sporeOverlap",Int="org.eclipse.elk.alg.spore.p1structure",Ont="org.eclipse.elk.alg.spore.p2processingorder",Ant="org.eclipse.elk.alg.spore.p3execution",Lnt="Topdown Layout",Nnt="Invalid index: ",$nt="org.eclipse.elk.core.alg",Dnt={341:1},xnt={295:1},Rnt="Make sure its type is registered with the ",Knt=" utility class.",Fnt="true",_nt="false",Bnt="Couldn't clone property '",Hnt=.05,Unt="org.eclipse.elk.core.options",Gnt=1.2999999523162842,qnt="org.eclipse.elk.box",Xnt="org.eclipse.elk.expandNodes",znt="org.eclipse.elk.box.packingMode",Vnt="org.eclipse.elk.algorithm",Wnt="org.eclipse.elk.resolvedAlgorithm",Qnt="org.eclipse.elk.bendPoints",Jnt="org.eclipse.elk.labelManager",Ynt="org.eclipse.elk.scaleFactor",Znt="org.eclipse.elk.childAreaWidth",ntt="org.eclipse.elk.childAreaHeight",ttt="org.eclipse.elk.animate",ett="org.eclipse.elk.animTimeFactor",itt="org.eclipse.elk.layoutAncestors",rtt="org.eclipse.elk.maxAnimTime",ctt="org.eclipse.elk.minAnimTime",att="org.eclipse.elk.progressBar",ott="org.eclipse.elk.validateGraph",utt="org.eclipse.elk.validateOptions",stt="org.eclipse.elk.zoomToFit",htt="org.eclipse.elk.font.name",ftt="org.eclipse.elk.font.size",ltt="org.eclipse.elk.topdown.sizeApproximator",btt="org.eclipse.elk.topdown.scaleCap",wtt="org.eclipse.elk.edge.type",dtt="partitioning",gtt="nodeLabels",ptt="portAlignment",mtt="nodeSize",vtt="port",ktt="portLabels",ytt="topdown",Mtt="insideSelfLoops",Ttt="org.eclipse.elk.fixed",jtt="org.eclipse.elk.random",Ett={3:1,34:1,22:1,347:1},Stt="port must have a parent node to calculate the port side",Ptt="The edge needs to have exactly one edge section. Found: ",Ctt="org.eclipse.elk.core.util.adapters",Itt="org.eclipse.emf.ecore",Ott="org.eclipse.elk.graph",Att="EMapPropertyHolder",Ltt="ElkBendPoint",Ntt="ElkGraphElement",$tt="ElkConnectableShape",Dtt="ElkEdge",xtt="ElkEdgeSection",Rtt="EModelElement",Ktt="ENamedElement",Ftt="ElkLabel",_tt="ElkNode",Btt="ElkPort",Htt={94:1,93:1},Utt="org.eclipse.emf.common.notify.impl",Gtt="The feature '",qtt="' is not a valid changeable feature",Xtt="Expecting null",ztt="' is not a valid feature",Vtt="The feature ID",Wtt=" is not a valid feature ID",Qtt=32768,Jtt={110:1,94:1,93:1,58:1,54:1,99:1},Ytt="org.eclipse.emf.ecore.impl",Ztt="org.eclipse.elk.graph.impl",net="Recursive containment not allowed for ",tet="The datatype '",eet="' is not a valid classifier",iet="The value '",ret={195:1,3:1,4:1},cet="The class '",aet="http://www.eclipse.org/elk/ElkGraph",oet="property",uet="value",set="source",het="properties",fet="identifier",bet="height",wet="width",det="parent",get="text",pet="children",met="hierarchical",vet="sources",ket="targets",yet="sections",Met="bendPoints",Tet="outgoingShape",jet="incomingShape",Eet="outgoingSections",Set="incomingSections",Pet="org.eclipse.emf.common.util",Cet="Severe implementation error in the Json to ElkGraph importer.",Iet="id",Oet="org.eclipse.elk.graph.json",Aet="Unhandled parameter types: ",Let="startPoint",Net="An edge must have at least one source and one target (edge id: '",$et="').",Det="Referenced edge section does not exist: ",xet=" (edge id: '",Ret="target",Ket="sourcePoint",Fet="targetPoint",_et="group",Bet="name",Het="connectableShape cannot be null",Uet="edge cannot be null",Get="Passed edge is not 'simple'.",qet="org.eclipse.elk.graph.util",Xet="The 'no duplicates' constraint is violated",zet="targetIndex=",Vet=", size=",Wet="sourceIndex=",Qet={3:1,4:1,20:1,31:1,56:1,16:1,15:1,59:1,70:1,66:1,61:1},Jet={3:1,4:1,20:1,31:1,56:1,16:1,51:1,15:1,59:1,70:1,66:1,61:1,596:1},Yet="logging",Zet="measureExecutionTime",nit="parser.parse.1",tit="parser.parse.2",eit="parser.next.1",iit="parser.next.2",rit="parser.next.3",cit="parser.next.4",ait="parser.factor.1",oit="parser.factor.2",uit="parser.factor.3",sit="parser.factor.4",hit="parser.factor.5",fit="parser.factor.6",lit="parser.atom.1",bit="parser.atom.2",wit="parser.atom.3",dit="parser.atom.4",git="parser.atom.5",pit="parser.cc.1",mit="parser.cc.2",vit="parser.cc.3",kit="parser.cc.5",yit="parser.cc.6",Mit="parser.cc.7",Tit="parser.cc.8",jit="parser.ope.1",Eit="parser.ope.2",Sit="parser.ope.3",Pit="parser.descape.1",Cit="parser.descape.2",Iit="parser.descape.3",Oit="parser.descape.4",Ait="parser.descape.5",Lit="parser.process.1",Nit="parser.quantifier.1",$it="parser.quantifier.2",Dit="parser.quantifier.3",xit="parser.quantifier.4",Rit="parser.quantifier.5",Kit="org.eclipse.emf.common.notify",Fit={424:1,686:1},_it={3:1,4:1,20:1,31:1,56:1,16:1,15:1,70:1,61:1},Bit={378:1,152:1},Hit="index=",Uit={3:1,4:1,5:1,129:1},Git={3:1,4:1,20:1,31:1,56:1,16:1,15:1,59:1,70:1,61:1},qit={3:1,6:1,4:1,5:1,198:1},Xit={3:1,4:1,5:1,173:1,379:1},zit=";/?:@&=+$,",Vit="invalid authority: ",Wit="EAnnotation",Qit="ETypedElement",Jit="EStructuralFeature",Yit="EAttribute",Zit="EClassifier",nrt="EEnumLiteral",trt="EGenericType",ert="EOperation",irt="EParameter",rrt="EReference",crt="ETypeParameter",art="org.eclipse.emf.ecore.util",ort={79:1},urt={3:1,20:1,16:1,15:1,61:1,597:1,79:1,71:1,97:1},srt="org.eclipse.emf.ecore.util.FeatureMap$Entry",hrt=8192,frt=2048,lrt="byte",brt="char",wrt="double",drt="float",grt="int",prt="long",mrt="short",vrt="java.lang.Object",krt={3:1,4:1,5:1,254:1},yrt={3:1,4:1,5:1,688:1},Mrt={3:1,4:1,20:1,31:1,56:1,16:1,15:1,59:1,70:1,66:1,61:1,71:1},Trt={3:1,4:1,20:1,31:1,56:1,16:1,15:1,59:1,70:1,66:1,61:1,79:1,71:1,97:1},jrt="mixed",Ert="http:///org/eclipse/emf/ecore/util/ExtendedMetaData",Srt="kind",Prt={3:1,4:1,5:1,689:1},Crt={3:1,4:1,20:1,31:1,56:1,16:1,15:1,70:1,61:1,79:1,71:1,97:1},Irt={20:1,31:1,56:1,16:1,15:1,61:1,71:1},Ort={51:1,128:1,287:1},Art={76:1,343:1},Lrt="The value of type '",Nrt="' must be of type '",$rt=1352,Drt="http://www.eclipse.org/emf/2002/Ecore",xrt=-32768,Rrt="constraints",Krt="baseType",Frt="getEStructuralFeature",_rt="getFeatureID",Brt="feature",Hrt="getOperationID",Urt="operation",Grt="defaultValue",qrt="eTypeParameters",Xrt="isInstance",zrt="getEEnumLiteral",Vrt="eContainingClass",Wrt={57:1},Qrt={3:1,4:1,5:1,124:1},Jrt="org.eclipse.emf.ecore.resource",Yrt={94:1,93:1,599:1,2034:1},Zrt="org.eclipse.emf.ecore.resource.impl",nct="unspecified",tct="simple",ect="attribute",ict="attributeWildcard",rct="element",cct="elementWildcard",act="collapse",oct="itemType",uct="namespace",sct="##targetNamespace",hct="whiteSpace",fct="wildcards",lct="http://www.eclipse.org/emf/2003/XMLType",bct="##any",wct="uninitialized",dct="The multiplicity constraint is violated",gct="org.eclipse.emf.ecore.xml.type",pct="ProcessingInstruction",mct="SimpleAnyType",vct="XMLTypeDocumentRoot",kct="org.eclipse.emf.ecore.xml.type.impl",yct="INF",Mct="processing",Tct="ENTITIES_._base",jct="minLength",Ect="ENTITY",Sct="NCName",Pct="IDREFS_._base",Cct="integer",Ict="token",Oct="pattern",Act="[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*",Lct="\\i\\c*",Nct="[\\i-[:]][\\c-[:]]*",$ct="nonPositiveInteger",Dct="maxInclusive",xct="NMTOKEN",Rct="NMTOKENS_._base",Kct="nonNegativeInteger",Fct="minInclusive",_ct="normalizedString",Bct="unsignedByte",Hct="unsignedInt",Uct="18446744073709551615",Gct="unsignedShort",qct="processingInstruction",Xct="org.eclipse.emf.ecore.xml.type.internal",zct=1114111,Vct="Internal Error: shorthands: \\u",Wct="xml:isDigit",Qct="xml:isWord",Jct="xml:isSpace",Yct="xml:isNameChar",Zct="xml:isInitialNameChar",nat="09\u0660\u0669\u06f0\u06f9\u0966\u096f\u09e6\u09ef\u0a66\u0a6f\u0ae6\u0aef\u0b66\u0b6f\u0be7\u0bef\u0c66\u0c6f\u0ce6\u0cef\u0d66\u0d6f\u0e50\u0e59\u0ed0\u0ed9\u0f20\u0f29",tat="AZaz\xc0\xd6\xd8\xf6\xf8\u0131\u0134\u013e\u0141\u0148\u014a\u017e\u0180\u01c3\u01cd\u01f0\u01f4\u01f5\u01fa\u0217\u0250\u02a8\u02bb\u02c1\u0386\u0386\u0388\u038a\u038c\u038c\u038e\u03a1\u03a3\u03ce\u03d0\u03d6\u03da\u03da\u03dc\u03dc\u03de\u03de\u03e0\u03e0\u03e2\u03f3\u0401\u040c\u040e\u044f\u0451\u045c\u045e\u0481\u0490\u04c4\u04c7\u04c8\u04cb\u04cc\u04d0\u04eb\u04ee\u04f5\u04f8\u04f9\u0531\u0556\u0559\u0559\u0561\u0586\u05d0\u05ea\u05f0\u05f2\u0621\u063a\u0641\u064a\u0671\u06b7\u06ba\u06be\u06c0\u06ce\u06d0\u06d3\u06d5\u06d5\u06e5\u06e6\u0905\u0939\u093d\u093d\u0958\u0961\u0985\u098c\u098f\u0990\u0993\u09a8\u09aa\u09b0\u09b2\u09b2\u09b6\u09b9\u09dc\u09dd\u09df\u09e1\u09f0\u09f1\u0a05\u0a0a\u0a0f\u0a10\u0a13\u0a28\u0a2a\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59\u0a5c\u0a5e\u0a5e\u0a72\u0a74\u0a85\u0a8b\u0a8d\u0a8d\u0a8f\u0a91\u0a93\u0aa8\u0aaa\u0ab0\u0ab2\u0ab3\u0ab5\u0ab9\u0abd\u0abd\u0ae0\u0ae0\u0b05\u0b0c\u0b0f\u0b10\u0b13\u0b28\u0b2a\u0b30\u0b32\u0b33\u0b36\u0b39\u0b3d\u0b3d\u0b5c\u0b5d\u0b5f\u0b61\u0b85\u0b8a\u0b8e\u0b90\u0b92\u0b95\u0b99\u0b9a\u0b9c\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8\u0baa\u0bae\u0bb5\u0bb7\u0bb9\u0c05\u0c0c\u0c0e\u0c10\u0c12\u0c28\u0c2a\u0c33\u0c35\u0c39\u0c60\u0c61\u0c85\u0c8c\u0c8e\u0c90\u0c92\u0ca8\u0caa\u0cb3\u0cb5\u0cb9\u0cde\u0cde\u0ce0\u0ce1\u0d05\u0d0c\u0d0e\u0d10\u0d12\u0d28\u0d2a\u0d39\u0d60\u0d61\u0e01\u0e2e\u0e30\u0e30\u0e32\u0e33\u0e40\u0e45\u0e81\u0e82\u0e84\u0e84\u0e87\u0e88\u0e8a\u0e8a\u0e8d\u0e8d\u0e94\u0e97\u0e99\u0e9f\u0ea1\u0ea3\u0ea5\u0ea5\u0ea7\u0ea7\u0eaa\u0eab\u0ead\u0eae\u0eb0\u0eb0\u0eb2\u0eb3\u0ebd\u0ebd\u0ec0\u0ec4\u0f40\u0f47\u0f49\u0f69\u10a0\u10c5\u10d0\u10f6\u1100\u1100\u1102\u1103\u1105\u1107\u1109\u1109\u110b\u110c\u110e\u1112\u113c\u113c\u113e\u113e\u1140\u1140\u114c\u114c\u114e\u114e\u1150\u1150\u1154\u1155\u1159\u1159\u115f\u1161\u1163\u1163\u1165\u1165\u1167\u1167\u1169\u1169\u116d\u116e\u1172\u1173\u1175\u1175\u119e\u119e\u11a8\u11a8\u11ab\u11ab\u11ae\u11af\u11b7\u11b8\u11ba\u11ba\u11bc\u11c2\u11eb\u11eb\u11f0\u11f0\u11f9\u11f9\u1e00\u1e9b\u1ea0\u1ef9\u1f00\u1f15\u1f18\u1f1d\u1f20\u1f45\u1f48\u1f4d\u1f50\u1f57\u1f59\u1f59\u1f5b\u1f5b\u1f5d\u1f5d\u1f5f\u1f7d\u1f80\u1fb4\u1fb6\u1fbc\u1fbe\u1fbe\u1fc2\u1fc4\u1fc6\u1fcc\u1fd0\u1fd3\u1fd6\u1fdb\u1fe0\u1fec\u1ff2\u1ff4\u1ff6\u1ffc\u2126\u2126\u212a\u212b\u212e\u212e\u2180\u2182\u3007\u3007\u3021\u3029\u3041\u3094\u30a1\u30fa\u3105\u312c\u4e00\u9fa5\uac00\ud7a3",eat="Private Use",iat="ASSIGNED",rat="\0\x7f\x80\xff\u0100\u017f\u0180\u024f\u0250\u02af\u02b0\u02ff\u0300\u036f\u0370\u03ff\u0400\u04ff\u0530\u058f\u0590\u05ff\u0600\u06ff\u0700\u074f\u0780\u07bf\u0900\u097f\u0980\u09ff\u0a00\u0a7f\u0a80\u0aff\u0b00\u0b7f\u0b80\u0bff\u0c00\u0c7f\u0c80\u0cff\u0d00\u0d7f\u0d80\u0dff\u0e00\u0e7f\u0e80\u0eff\u0f00\u0fff\u1000\u109f\u10a0\u10ff\u1100\u11ff\u1200\u137f\u13a0\u13ff\u1400\u167f\u1680\u169f\u16a0\u16ff\u1780\u17ff\u1800\u18af\u1e00\u1eff\u1f00\u1fff\u2000\u206f\u2070\u209f\u20a0\u20cf\u20d0\u20ff\u2100\u214f\u2150\u218f\u2190\u21ff\u2200\u22ff\u2300\u23ff\u2400\u243f\u2440\u245f\u2460\u24ff\u2500\u257f\u2580\u259f\u25a0\u25ff\u2600\u26ff\u2700\u27bf\u2800\u28ff\u2e80\u2eff\u2f00\u2fdf\u2ff0\u2fff\u3000\u303f\u3040\u309f\u30a0\u30ff\u3100\u312f\u3130\u318f\u3190\u319f\u31a0\u31bf\u3200\u32ff\u3300\u33ff\u3400\u4db5\u4e00\u9fff\ua000\ua48f\ua490\ua4cf\uac00\ud7a3\ue000\uf8ff\uf900\ufaff\ufb00\ufb4f\ufb50\ufdff\ufe20\ufe2f\ufe30\ufe4f\ufe50\ufe6f\ufe70\ufefe\ufeff\ufeff\uff00\uffef",cat="UNASSIGNED",aat={3:1,122:1},oat="org.eclipse.emf.ecore.xml.type.util",uat={3:1,4:1,5:1,381:1},sat="org.eclipse.xtext.xbase.lib",hat="Cannot add elements to a Range",fat="Cannot set elements in a Range",lat="Cannot remove elements from a Range",bat="user.agent";e.goog=e.goog||{},e.goog.global=e.goog.global||e,sZn={},sDn(1,null,{},r),uZn.Fb=function(n){return SL(this,n)},uZn.Gb=function(){return this.Rm},uZn.Hb=function(){return xx(this)},uZn.Ib=function(){return Ij(Tbn(this))+"@"+(Hon(this)>>>0).toString(16)},uZn.equals=function(n){return this.Fb(n)},uZn.hashCode=function(){return this.Hb()},uZn.toString=function(){return this.Ib()},sDn(297,1,{297:1,2124:1},Ifn),uZn.ve=function(n){var t;return(t=new Ifn).i=4,t.c=n>1?B0(this,n-1):this,t},uZn.we=function(){return vK(this),this.b},uZn.xe=function(){return Ij(this)},uZn.ye=function(){return vK(this),this.k},uZn.ze=function(){return!!(4&this.i)},uZn.Ae=function(){return!!(1&this.i)},uZn.Ib=function(){return crn(this)},uZn.i=0;var wat,dat=zW(kZn,"Object",1),gat=zW(kZn,"Class",297);sDn(2096,1,yZn),zW(MZn,"Optional",2096),sDn(1191,2096,yZn,c),uZn.Fb=function(n){return n===this},uZn.Hb=function(){return 2040732332},uZn.Ib=function(){return"Optional.absent()"},uZn.Jb=function(n){return WW(n),gy(),wat},zW(MZn,"Absent",1191),sDn(636,1,{},FM),zW(MZn,"Joiner",636);var pat=Iq(MZn,"Predicate");sDn(589,1,{178:1,589:1,3:1,46:1},Hl),uZn.Mb=function(n){return Wfn(this,n)},uZn.Lb=function(n){return Wfn(this,n)},uZn.Fb=function(n){var t;return!!F$(n,589)&&(t=uG(n,589),PDn(this.a,t.a))},uZn.Hb=function(){return Zfn(this.a)+306654252},uZn.Ib=function(){return eAn(this.a)},zW(MZn,"Predicates/AndPredicate",589),sDn(419,2096,{419:1,3:1},Ul),uZn.Fb=function(n){var t;return!!F$(n,419)&&(t=uG(n,419),udn(this.a,t.a))},uZn.Hb=function(){return 1502476572+Hon(this.a)},uZn.Ib=function(){return CZn+this.a+")"},uZn.Jb=function(n){return new Ul(bZ(n.Kb(this.a),"the Function passed to Optional.transform() must not return null."))},zW(MZn,"Present",419),sDn(204,1,OZn),uZn.Nb=function(n){SV(this,n)},uZn.Qb=function(){_M()},zW(AZn,"UnmodifiableIterator",204),sDn(2076,204,LZn),uZn.Qb=function(){_M()},uZn.Rb=function(n){throw hv(new Kv)},uZn.Wb=function(n){throw hv(new Kv)},zW(AZn,"UnmodifiableListIterator",2076),sDn(399,2076,LZn),uZn.Ob=function(){return this.c0},uZn.Pb=function(){if(this.c>=this.d)throw hv(new Bv);return this.Xb(this.c++)},uZn.Tb=function(){return this.c},uZn.Ub=function(){if(this.c<=0)throw hv(new Bv);return this.Xb(--this.c)},uZn.Vb=function(){return this.c-1},uZn.c=0,uZn.d=0,zW(AZn,"AbstractIndexedListIterator",399),sDn(713,204,OZn),uZn.Ob=function(){return oon(this)},uZn.Pb=function(){return yen(this)},uZn.e=1,zW(AZn,"AbstractIterator",713),sDn(2084,1,{229:1}),uZn.Zb=function(){return this.f||(this.f=this.ac())},uZn.Fb=function(n){return Aln(this,n)},uZn.Hb=function(){return Hon(this.Zb())},uZn.dc=function(){return 0==this.gc()},uZn.ec=function(){return kz(this)},uZn.Ib=function(){return cpn(this.Zb())},zW(AZn,"AbstractMultimap",2084),sDn(742,2084,NZn),uZn.$b=function(){ban(this)},uZn._b=function(n){return jj(this,n)},uZn.ac=function(){return new OE(this,this.c)},uZn.ic=function(n){return this.hc()},uZn.bc=function(){return new RD(this,this.c)},uZn.jc=function(){return this.mc(this.hc())},uZn.kc=function(){return new My(this)},uZn.lc=function(){return ICn(this.c.vc().Nc(),new o,64,this.d)},uZn.cc=function(n){return Y9(this,n)},uZn.fc=function(n){return twn(this,n)},uZn.gc=function(){return this.d},uZn.mc=function(n){return hZ(),new qw(n)},uZn.nc=function(){return new yy(this)},uZn.oc=function(){return ICn(this.c.Cc().Nc(),new a,64,this.d)},uZn.pc=function(n,t){return new A7(this,n,t,null)},uZn.d=0,zW(AZn,"AbstractMapBasedMultimap",742),sDn(1696,742,NZn),uZn.hc=function(){return new R7(this.a)},uZn.jc=function(){return hZ(),hZ(),zot},uZn.cc=function(n){return uG(Y9(this,n),15)},uZn.fc=function(n){return uG(twn(this,n),15)},uZn.Zb=function(){return nZ(this)},uZn.Fb=function(n){return Aln(this,n)},uZn.qc=function(n){return uG(Y9(this,n),15)},uZn.rc=function(n){return uG(twn(this,n),15)},uZn.mc=function(n){return SZ(uG(n,15))},uZn.pc=function(n,t){return S6(this,n,uG(t,15),null)},zW(AZn,"AbstractListMultimap",1696),sDn(748,1,$Zn),uZn.Nb=function(n){SV(this,n)},uZn.Ob=function(){return this.c.Ob()||this.e.Ob()},uZn.Pb=function(){var n;return this.e.Ob()||(n=uG(this.c.Pb(),44),this.b=n.ld(),this.a=uG(n.md(),16),this.e=this.a.Kc()),this.sc(this.b,this.e.Pb())},uZn.Qb=function(){this.e.Qb(),uG(nJ(this.a),16).dc()&&this.c.Qb(),--this.d.d},zW(AZn,"AbstractMapBasedMultimap/Itr",748),sDn(1129,748,$Zn,yy),uZn.sc=function(n,t){return t},zW(AZn,"AbstractMapBasedMultimap/1",1129),sDn(1130,1,{},a),uZn.Kb=function(n){return uG(n,16).Nc()},zW(AZn,"AbstractMapBasedMultimap/1methodref$spliterator$Type",1130),sDn(1131,748,$Zn,My),uZn.sc=function(n,t){return new FE(n,t)},zW(AZn,"AbstractMapBasedMultimap/2",1131);var mat=Iq(DZn,"Map");sDn(2065,1,xZn),uZn.wc=function(n){Yun(this,n)},uZn.yc=function(n,t,e){return Jgn(this,n,t,e)},uZn.$b=function(){this.vc().$b()},uZn.tc=function(n){return sTn(this,n)},uZn._b=function(n){return!!TPn(this,n,!1)},uZn.uc=function(n){var t,e;for(t=this.vc().Kc();t.Ob();)if(e=uG(t.Pb(),44).md(),xA(n)===xA(e)||null!=n&&udn(n,e))return!0;return!1},uZn.Fb=function(n){var t,e,i;if(n===this)return!0;if(!F$(n,85))return!1;if(i=uG(n,85),this.gc()!=i.gc())return!1;for(e=i.vc().Kc();e.Ob();)if(t=uG(e.Pb(),44),!this.tc(t))return!1;return!0},uZn.xc=function(n){return DA(TPn(this,n,!1))},uZn.Hb=function(){return tfn(this.vc())},uZn.dc=function(){return 0==this.gc()},uZn.ec=function(){return new Lw(this)},uZn.zc=function(n,t){throw hv(new TM("Put not supported on this map"))},uZn.Ac=function(n){xun(this,n)},uZn.Bc=function(n){return DA(TPn(this,n,!0))},uZn.gc=function(){return this.vc().gc()},uZn.Ib=function(){return KPn(this)},uZn.Cc=function(){return new Fw(this)},zW(DZn,"AbstractMap",2065),sDn(2085,2065,xZn),uZn.bc=function(){return new VE(this)},uZn.vc=function(){return vz(this)},uZn.ec=function(){return this.g||(this.g=this.bc())},uZn.Cc=function(){return this.i||(this.i=new zE(this))},zW(AZn,"Maps/ViewCachingAbstractMap",2085),sDn(402,2085,xZn,OE),uZn.xc=function(n){return srn(this,n)},uZn.Bc=function(n){return abn(this,n)},uZn.$b=function(){this.d==this.e.c?this.e.$b():Hq(new Gq(this))},uZn._b=function(n){return Uwn(this.d,n)},uZn.Ec=function(){return new Gl(this)},uZn.Dc=function(){return this.Ec()},uZn.Fb=function(n){return this===n||udn(this.d,n)},uZn.Hb=function(){return Hon(this.d)},uZn.ec=function(){return this.e.ec()},uZn.gc=function(){return this.d.gc()},uZn.Ib=function(){return cpn(this.d)},zW(AZn,"AbstractMapBasedMultimap/AsMap",402);var vat=Iq(kZn,"Iterable");sDn(31,1,RZn),uZn.Jc=function(n){z8(this,n)},uZn.Lc=function(){return this.Oc()},uZn.Nc=function(){return new h3(this,0)},uZn.Oc=function(){return new fX(null,this.Nc())},uZn.Fc=function(n){throw hv(new TM("Add not supported on this collection"))},uZn.Gc=function(n){return Qon(this,n)},uZn.$b=function(){oY(this)},uZn.Hc=function(n){return Wpn(this,n,!1)},uZn.Ic=function(n){return yhn(this,n)},uZn.dc=function(){return 0==this.gc()},uZn.Mc=function(n){return Wpn(this,n,!0)},uZn.Pc=function(){return Sz(this)},uZn.Qc=function(n){return oTn(this,n)},uZn.Ib=function(){return vIn(this)},zW(DZn,"AbstractCollection",31);var kat=Iq(DZn,"Set");sDn(KZn,31,FZn),uZn.Nc=function(){return new h3(this,1)},uZn.Fb=function(n){return Fvn(this,n)},uZn.Hb=function(){return tfn(this)},zW(DZn,"AbstractSet",KZn),sDn(2068,KZn,FZn),zW(AZn,"Sets/ImprovedAbstractSet",2068),sDn(2069,2068,FZn),uZn.$b=function(){this.Rc().$b()},uZn.Hc=function(n){return Amn(this,n)},uZn.dc=function(){return this.Rc().dc()},uZn.Mc=function(n){var t;return!(!this.Hc(n)||!F$(n,44))&&(t=uG(n,44),this.Rc().ec().Mc(t.ld()))},uZn.gc=function(){return this.Rc().gc()},zW(AZn,"Maps/EntrySet",2069),sDn(1127,2069,FZn,Gl),uZn.Hc=function(n){return Gwn(this.a.d.vc(),n)},uZn.Kc=function(){return new Gq(this.a)},uZn.Rc=function(){return this.a},uZn.Mc=function(n){var t;return!!Gwn(this.a.d.vc(),n)&&(t=uG(nJ(uG(n,44)),44),H9(this.a.e,t.ld()),!0)},uZn.Nc=function(){return JU(this.a.d.vc().Nc(),new ql(this.a))},zW(AZn,"AbstractMapBasedMultimap/AsMap/AsMapEntries",1127),sDn(1128,1,{},ql),uZn.Kb=function(n){return O9(this.a,uG(n,44))},zW(AZn,"AbstractMapBasedMultimap/AsMap/AsMapEntries/0methodref$wrapEntry$Type",1128),sDn(746,1,$Zn,Gq),uZn.Nb=function(n){SV(this,n)},uZn.Pb=function(){var n;return n=uG(this.b.Pb(),44),this.a=uG(n.md(),16),O9(this.c,n)},uZn.Ob=function(){return this.b.Ob()},uZn.Qb=function(){IB(!!this.a),this.b.Qb(),this.c.e.d-=this.a.gc(),this.a.$b(),this.a=null},zW(AZn,"AbstractMapBasedMultimap/AsMap/AsMapIterator",746),sDn(542,2068,FZn,VE),uZn.$b=function(){this.b.$b()},uZn.Hc=function(n){return this.b._b(n)},uZn.Jc=function(n){WW(n),this.b.wc(new db(n))},uZn.dc=function(){return this.b.dc()},uZn.Kc=function(){return new Ny(this.b.vc().Kc())},uZn.Mc=function(n){return!!this.b._b(n)&&(this.b.Bc(n),!0)},uZn.gc=function(){return this.b.gc()},zW(AZn,"Maps/KeySet",542),sDn(327,542,FZn,RD),uZn.$b=function(){Hq(new AE(this,this.b.vc().Kc()))},uZn.Ic=function(n){return this.b.ec().Ic(n)},uZn.Fb=function(n){return this===n||udn(this.b.ec(),n)},uZn.Hb=function(){return Hon(this.b.ec())},uZn.Kc=function(){return new AE(this,this.b.vc().Kc())},uZn.Mc=function(n){var t,e;return e=0,(t=uG(this.b.Bc(n),16))&&(e=t.gc(),t.$b(),this.a.d-=e),e>0},uZn.Nc=function(){return this.b.ec().Nc()},zW(AZn,"AbstractMapBasedMultimap/KeySet",327),sDn(747,1,$Zn,AE),uZn.Nb=function(n){SV(this,n)},uZn.Ob=function(){return this.c.Ob()},uZn.Pb=function(){return this.a=uG(this.c.Pb(),44),this.a.ld()},uZn.Qb=function(){var n;IB(!!this.a),n=uG(this.a.md(),16),this.c.Qb(),this.b.a.d-=n.gc(),n.$b(),this.a=null},zW(AZn,"AbstractMapBasedMultimap/KeySet/1",747),sDn(503,402,{85:1,133:1},NK),uZn.bc=function(){return this.Sc()},uZn.ec=function(){return this.Uc()},uZn.Sc=function(){return new yE(this.c,this.Wc())},uZn.Tc=function(){return this.Wc().Tc()},uZn.Uc=function(){return this.b||(this.b=this.Sc())},uZn.Vc=function(){return this.Wc().Vc()},uZn.Wc=function(){return uG(this.d,133)},zW(AZn,"AbstractMapBasedMultimap/SortedAsMap",503),sDn(446,503,_Zn,$K),uZn.bc=function(){return new ME(this.a,uG(uG(this.d,133),139))},uZn.Sc=function(){return new ME(this.a,uG(uG(this.d,133),139))},uZn.ec=function(){return uG(this.b||(this.b=new ME(this.a,uG(uG(this.d,133),139))),277)},uZn.Uc=function(){return uG(this.b||(this.b=new ME(this.a,uG(uG(this.d,133),139))),277)},uZn.Wc=function(){return uG(uG(this.d,133),139)},uZn.Xc=function(n){return uG(uG(this.d,133),139).Xc(n)},uZn.Yc=function(n){return uG(uG(this.d,133),139).Yc(n)},uZn.Zc=function(n,t){return new $K(this.a,uG(uG(this.d,133),139).Zc(n,t))},uZn.$c=function(n){return uG(uG(this.d,133),139).$c(n)},uZn._c=function(n){return uG(uG(this.d,133),139)._c(n)},uZn.ad=function(n,t){return new $K(this.a,uG(uG(this.d,133),139).ad(n,t))},zW(AZn,"AbstractMapBasedMultimap/NavigableAsMap",446),sDn(502,327,BZn,yE),uZn.Nc=function(){return this.b.ec().Nc()},zW(AZn,"AbstractMapBasedMultimap/SortedKeySet",502),sDn(401,502,HZn,ME),zW(AZn,"AbstractMapBasedMultimap/NavigableKeySet",401),sDn(551,31,RZn,A7),uZn.Fc=function(n){var t,e;return bpn(this),e=this.d.dc(),(t=this.d.Fc(n))&&(++this.f.d,e&&mF(this)),t},uZn.Gc=function(n){var t,e,i;return!n.dc()&&(bpn(this),i=this.d.gc(),(t=this.d.Gc(n))&&(e=this.d.gc(),this.f.d+=e-i,0==i&&mF(this)),t)},uZn.$b=function(){var n;bpn(this),0!=(n=this.d.gc())&&(this.d.$b(),this.f.d-=n,DX(this))},uZn.Hc=function(n){return bpn(this),this.d.Hc(n)},uZn.Ic=function(n){return bpn(this),this.d.Ic(n)},uZn.Fb=function(n){return n===this||(bpn(this),udn(this.d,n))},uZn.Hb=function(){return bpn(this),Hon(this.d)},uZn.Kc=function(){return bpn(this),new WU(this)},uZn.Mc=function(n){var t;return bpn(this),(t=this.d.Mc(n))&&(--this.f.d,DX(this)),t},uZn.gc=function(){return qA(this)},uZn.Nc=function(){return bpn(this),this.d.Nc()},uZn.Ib=function(){return bpn(this),cpn(this.d)},zW(AZn,"AbstractMapBasedMultimap/WrappedCollection",551);var yat=Iq(DZn,"List");sDn(744,551,{20:1,31:1,16:1,15:1},qz),uZn.jd=function(n){Lon(this,n)},uZn.Nc=function(){return bpn(this),this.d.Nc()},uZn.bd=function(n,t){var e;bpn(this),e=this.d.dc(),uG(this.d,15).bd(n,t),++this.a.d,e&&mF(this)},uZn.cd=function(n,t){var e,i,r;return!t.dc()&&(bpn(this),r=this.d.gc(),(e=uG(this.d,15).cd(n,t))&&(i=this.d.gc(),this.a.d+=i-r,0==r&&mF(this)),e)},uZn.Xb=function(n){return bpn(this),uG(this.d,15).Xb(n)},uZn.dd=function(n){return bpn(this),uG(this.d,15).dd(n)},uZn.ed=function(){return bpn(this),new JN(this)},uZn.fd=function(n){return bpn(this),new UY(this,n)},uZn.gd=function(n){var t;return bpn(this),t=uG(this.d,15).gd(n),--this.a.d,DX(this),t},uZn.hd=function(n,t){return bpn(this),uG(this.d,15).hd(n,t)},uZn.kd=function(n,t){return bpn(this),S6(this.a,this.e,uG(this.d,15).kd(n,t),this.b?this.b:this)},zW(AZn,"AbstractMapBasedMultimap/WrappedList",744),sDn(1126,744,{20:1,31:1,16:1,15:1,59:1},Yx),zW(AZn,"AbstractMapBasedMultimap/RandomAccessWrappedList",1126),sDn(628,1,$Zn,WU),uZn.Nb=function(n){SV(this,n)},uZn.Ob=function(){return FY(this),this.b.Ob()},uZn.Pb=function(){return FY(this),this.b.Pb()},uZn.Qb=function(){zD(this)},zW(AZn,"AbstractMapBasedMultimap/WrappedCollection/WrappedIterator",628),sDn(745,628,UZn,JN,UY),uZn.Qb=function(){zD(this)},uZn.Rb=function(n){var t;t=0==qA(this.a),(FY(this),uG(this.b,128)).Rb(n),++this.a.a.d,t&&mF(this.a)},uZn.Sb=function(){return(FY(this),uG(this.b,128)).Sb()},uZn.Tb=function(){return(FY(this),uG(this.b,128)).Tb()},uZn.Ub=function(){return(FY(this),uG(this.b,128)).Ub()},uZn.Vb=function(){return(FY(this),uG(this.b,128)).Vb()},uZn.Wb=function(n){(FY(this),uG(this.b,128)).Wb(n)},zW(AZn,"AbstractMapBasedMultimap/WrappedList/WrappedListIterator",745),sDn(743,551,BZn,AK),uZn.Nc=function(){return bpn(this),this.d.Nc()},zW(AZn,"AbstractMapBasedMultimap/WrappedSortedSet",743),sDn(1125,743,HZn,TN),zW(AZn,"AbstractMapBasedMultimap/WrappedNavigableSet",1125),sDn(1124,551,FZn,LK),uZn.Nc=function(){return bpn(this),this.d.Nc()},zW(AZn,"AbstractMapBasedMultimap/WrappedSet",1124),sDn(1133,1,{},o),uZn.Kb=function(n){return P7(uG(n,44))},zW(AZn,"AbstractMapBasedMultimap/lambda$1$Type",1133),sDn(1132,1,{},Wl),uZn.Kb=function(n){return new FE(this.a,n)},zW(AZn,"AbstractMapBasedMultimap/lambda$2$Type",1132);var Mat,Tat,jat,Eat,Sat=Iq(DZn,"Map/Entry");sDn(358,1,GZn),uZn.Fb=function(n){var t;return!!F$(n,44)&&(t=uG(n,44),xQ(this.ld(),t.ld())&&xQ(this.md(),t.md()))},uZn.Hb=function(){var n,t;return n=this.ld(),t=this.md(),(null==n?0:Hon(n))^(null==t?0:Hon(t))},uZn.nd=function(n){throw hv(new Kv)},uZn.Ib=function(){return this.ld()+"="+this.md()},zW(AZn,qZn,358),sDn(2086,31,RZn),uZn.$b=function(){this.od().$b()},uZn.Hc=function(n){var t;return!!F$(n,44)&&(t=uG(n,44),E4(this.od(),t.ld(),t.md()))},uZn.Mc=function(n){var t;return!!F$(n,44)&&(t=uG(n,44),S4(this.od(),t.ld(),t.md()))},uZn.gc=function(){return this.od().d},zW(AZn,"Multimaps/Entries",2086),sDn(749,2086,RZn,Ql),uZn.Kc=function(){return this.a.kc()},uZn.od=function(){return this.a},uZn.Nc=function(){return this.a.lc()},zW(AZn,"AbstractMultimap/Entries",749),sDn(750,749,FZn,Ty),uZn.Nc=function(){return this.a.lc()},uZn.Fb=function(n){return OOn(this,n)},uZn.Hb=function(){return Jon(this)},zW(AZn,"AbstractMultimap/EntrySet",750),sDn(751,31,RZn,Jl),uZn.$b=function(){this.a.$b()},uZn.Hc=function(n){return qln(this.a,n)},uZn.Kc=function(){return this.a.nc()},uZn.gc=function(){return this.a.d},uZn.Nc=function(){return this.a.oc()},zW(AZn,"AbstractMultimap/Values",751),sDn(2087,31,{849:1,20:1,31:1,16:1}),uZn.Jc=function(n){WW(n),uY(this).Jc(new yb(n))},uZn.Nc=function(){var n;return ICn(n=uY(this).Nc(),new d,64|1296&n.yd(),this.a.d)},uZn.Fc=function(n){return HM(),!0},uZn.Gc=function(n){return WW(this),WW(n),F$(n,552)?V4(uG(n,849)):!n.dc()&&cin(this,n.Kc())},uZn.Hc=function(n){var t;return((t=uG(Xwn(nZ(this.a),n),16))?t.gc():0)>0},uZn.Fb=function(n){return nxn(this,n)},uZn.Hb=function(){return Hon(uY(this))},uZn.dc=function(){return uY(this).dc()},uZn.Mc=function(n){return bNn(this,n,1)>0},uZn.Ib=function(){return cpn(uY(this))},zW(AZn,"AbstractMultiset",2087),sDn(2089,2068,FZn),uZn.$b=function(){ban(this.a.a)},uZn.Hc=function(n){var t;return!(!F$(n,504)||(t=uG(n,425),uG(t.a.md(),16).gc()<=0||S2(this.a,t.a.ld())!=uG(t.a.md(),16).gc()))},uZn.Mc=function(n){var t,e,i;return!(!F$(n,504)||(t=(e=uG(n,425)).a.ld(),0==(i=uG(e.a.md(),16).gc())))&&wNn(this.a,t,i)},zW(AZn,"Multisets/EntrySet",2089),sDn(1139,2089,FZn,Yl),uZn.Kc=function(){return new Dy(vz(nZ(this.a.a)).Kc())},uZn.gc=function(){return nZ(this.a.a).gc()},zW(AZn,"AbstractMultiset/EntrySet",1139),sDn(627,742,NZn),uZn.hc=function(){return this.pd()},uZn.jc=function(){return this.qd()},uZn.cc=function(n){return this.rd(n)},uZn.fc=function(n){return this.sd(n)},uZn.Zb=function(){return this.f||(this.f=this.ac())},uZn.qd=function(){return hZ(),hZ(),Wot},uZn.Fb=function(n){return Aln(this,n)},uZn.rd=function(n){return uG(Y9(this,n),21)},uZn.sd=function(n){return uG(twn(this,n),21)},uZn.mc=function(n){return hZ(),new nT(uG(n,21))},uZn.pc=function(n,t){return new LK(this,n,uG(t,21))},zW(AZn,"AbstractSetMultimap",627),sDn(1723,627,NZn),uZn.hc=function(){return new Hj(this.b)},uZn.pd=function(){return new Hj(this.b)},uZn.jc=function(){return UQ(new Hj(this.b))},uZn.qd=function(){return UQ(new Hj(this.b))},uZn.cc=function(n){return uG(uG(Y9(this,n),21),87)},uZn.rd=function(n){return uG(uG(Y9(this,n),21),87)},uZn.fc=function(n){return uG(uG(twn(this,n),21),87)},uZn.sd=function(n){return uG(uG(twn(this,n),21),87)},uZn.mc=function(n){return F$(n,277)?UQ(uG(n,277)):(hZ(),new mx(uG(n,87)))},uZn.Zb=function(){return this.f||(this.f=F$(this.c,139)?new $K(this,uG(this.c,139)):F$(this.c,133)?new NK(this,uG(this.c,133)):new OE(this,this.c))},uZn.pc=function(n,t){return F$(t,277)?new TN(this,n,uG(t,277)):new AK(this,n,uG(t,87))},zW(AZn,"AbstractSortedSetMultimap",1723),sDn(1724,1723,NZn),uZn.Zb=function(){return uG(uG(this.f||(this.f=F$(this.c,139)?new $K(this,uG(this.c,139)):F$(this.c,133)?new NK(this,uG(this.c,133)):new OE(this,this.c)),133),139)},uZn.ec=function(){return uG(uG(this.i||(this.i=F$(this.c,139)?new ME(this,uG(this.c,139)):F$(this.c,133)?new yE(this,uG(this.c,133)):new RD(this,this.c)),87),277)},uZn.bc=function(){return F$(this.c,139)?new ME(this,uG(this.c,139)):F$(this.c,133)?new yE(this,uG(this.c,133)):new RD(this,this.c)},zW(AZn,"AbstractSortedKeySortedSetMultimap",1724),sDn(2109,1,{2046:1}),uZn.Fb=function(n){return fSn(this,n)},uZn.Hb=function(){return tfn(this.g||(this.g=new nb(this)))},uZn.Ib=function(){return KPn(this.f||(this.f=new VD(this)))},zW(AZn,"AbstractTable",2109),sDn(679,KZn,FZn,nb),uZn.$b=function(){UM()},uZn.Hc=function(n){var t,e;return!!F$(n,479)&&(t=uG(n,697),!!(e=uG(Xwn(BW(this.a),GA(t.c.e,t.b)),85))&&Gwn(e.vc(),new FE(GA(t.c.c,t.a),I7(t.c,t.b,t.a))))},uZn.Kc=function(){return CZ(this.a)},uZn.Mc=function(n){var t,e;return!!F$(n,479)&&(t=uG(n,697),!!(e=uG(Xwn(BW(this.a),GA(t.c.e,t.b)),85))&&qwn(e.vc(),new FE(GA(t.c.c,t.a),I7(t.c,t.b,t.a))))},uZn.gc=function(){return $q(this.a)},uZn.Nc=function(){return u6(this.a)},zW(AZn,"AbstractTable/CellSet",679),sDn(2025,31,RZn,tb),uZn.$b=function(){UM()},uZn.Hc=function(n){return QPn(this.a,n)},uZn.Kc=function(){return IZ(this.a)},uZn.gc=function(){return $q(this.a)},uZn.Nc=function(){return y4(this.a)},zW(AZn,"AbstractTable/Values",2025),sDn(1697,1696,NZn),zW(AZn,"ArrayListMultimapGwtSerializationDependencies",1697),sDn(520,1697,NZn,rT,L2),uZn.hc=function(){return new R7(this.a)},uZn.a=0,zW(AZn,"ArrayListMultimap",520),sDn(678,2109,{678:1,2046:1,3:1},f$n),zW(AZn,"ArrayTable",678),sDn(2021,399,LZn,WD),uZn.Xb=function(n){return new Ofn(this.a,n)},zW(AZn,"ArrayTable/1",2021),sDn(2022,1,{},Xl),uZn.td=function(n){return new Ofn(this.a,n)},zW(AZn,"ArrayTable/1methodref$getCell$Type",2022),sDn(2110,1,{697:1}),uZn.Fb=function(n){var t;return n===this||!!F$(n,479)&&(t=uG(n,697),xQ(GA(this.c.e,this.b),GA(t.c.e,t.b))&&xQ(GA(this.c.c,this.a),GA(t.c.c,t.a))&&xQ(I7(this.c,this.b,this.a),I7(t.c,t.b,t.a)))},uZn.Hb=function(){return Obn(Uhn(cT(dat,1),EZn,1,5,[GA(this.c.e,this.b),GA(this.c.c,this.a),I7(this.c,this.b,this.a)]))},uZn.Ib=function(){return"("+GA(this.c.e,this.b)+","+GA(this.c.c,this.a)+")="+I7(this.c,this.b,this.a)},zW(AZn,"Tables/AbstractCell",2110),sDn(479,2110,{479:1,697:1},Ofn),uZn.a=0,uZn.b=0,uZn.d=0,zW(AZn,"ArrayTable/2",479),sDn(2024,1,{},zl),uZn.td=function(n){return Qtn(this.a,n)},zW(AZn,"ArrayTable/2methodref$getValue$Type",2024),sDn(2023,399,LZn,QD),uZn.Xb=function(n){return Qtn(this.a,n)},zW(AZn,"ArrayTable/3",2023),sDn(2077,2065,xZn),uZn.$b=function(){Hq(this.kc())},uZn.vc=function(){return new wb(this)},uZn.lc=function(){return new MY(this.kc(),this.gc())},zW(AZn,"Maps/IteratorBasedAbstractMap",2077),sDn(842,2077,xZn),uZn.$b=function(){throw hv(new Kv)},uZn._b=function(n){return Ej(this.c,n)},uZn.kc=function(){return new JD(this,this.c.b.c.gc())},uZn.lc=function(){return Dq(this.c.b.c.gc(),16,new Vl(this))},uZn.xc=function(n){var t;return(t=uG(W_(this.c,n),17))?this.vd(t.a):null},uZn.dc=function(){return this.c.b.c.dc()},uZn.ec=function(){return Tz(this.c)},uZn.zc=function(n,t){var e;if(!(e=uG(W_(this.c,n),17)))throw hv(new vM(this.ud()+" "+n+" not in "+Tz(this.c)));return this.wd(e.a,t)},uZn.Bc=function(n){throw hv(new Kv)},uZn.gc=function(){return this.c.b.c.gc()},zW(AZn,"ArrayTable/ArrayMap",842),sDn(2020,1,{},Vl),uZn.td=function(n){return qW(this.a,n)},zW(AZn,"ArrayTable/ArrayMap/0methodref$getEntry$Type",2020),sDn(2018,358,GZn,TE),uZn.ld=function(){return uR(this.a,this.b)},uZn.md=function(){return this.a.vd(this.b)},uZn.nd=function(n){return this.a.wd(this.b,n)},uZn.b=0,zW(AZn,"ArrayTable/ArrayMap/1",2018),sDn(2019,399,LZn,JD),uZn.Xb=function(n){return qW(this.a,n)},zW(AZn,"ArrayTable/ArrayMap/2",2019),sDn(2017,842,xZn,yV),uZn.ud=function(){return"Column"},uZn.vd=function(n){return I7(this.b,this.a,n)},uZn.wd=function(n,t){return Hhn(this.b,this.a,n,t)},uZn.a=0,zW(AZn,"ArrayTable/Row",2017),sDn(843,842,xZn,VD),uZn.vd=function(n){return new yV(this.a,n)},uZn.zc=function(n,t){return uG(t,85),GM()},uZn.wd=function(n,t){return uG(t,85),qM()},uZn.ud=function(){return"Row"},zW(AZn,"ArrayTable/RowMap",843),sDn(1157,1,WZn,jE),uZn.Ad=function(n){return!!(-262&this.a.yd()&n)},uZn.yd=function(){return-262&this.a.yd()},uZn.zd=function(){return this.a.zd()},uZn.Nb=function(n){this.a.Nb(new SE(n,this.b))},uZn.Bd=function(n){return this.a.Bd(new EE(n,this.b))},zW(AZn,"CollectSpliterators/1",1157),sDn(1158,1,QZn,EE),uZn.Cd=function(n){this.a.Cd(this.b.Kb(n))},zW(AZn,"CollectSpliterators/1/lambda$0$Type",1158),sDn(1159,1,QZn,SE),uZn.Cd=function(n){this.a.Cd(this.b.Kb(n))},zW(AZn,"CollectSpliterators/1/lambda$1$Type",1159),sDn(1154,1,WZn,x_),uZn.Ad=function(n){return!!((16464|this.b)&n)},uZn.yd=function(){return 16464|this.b},uZn.zd=function(){return this.a.zd()},uZn.Nb=function(n){this.a.Qe(new CE(n,this.c))},uZn.Bd=function(n){return this.a.Re(new PE(n,this.c))},uZn.b=0,zW(AZn,"CollectSpliterators/1WithCharacteristics",1154),sDn(1155,1,JZn,PE),uZn.Dd=function(n){this.a.Cd(this.b.td(n))},zW(AZn,"CollectSpliterators/1WithCharacteristics/lambda$0$Type",1155),sDn(1156,1,JZn,CE),uZn.Dd=function(n){this.a.Cd(this.b.td(n))},zW(AZn,"CollectSpliterators/1WithCharacteristics/lambda$1$Type",1156),sDn(1150,1,WZn),uZn.Ad=function(n){return!!(this.a&n)},uZn.yd=function(){return this.a},uZn.zd=function(){return this.e&&(this.b=g$(this.b,this.e.zd())),g$(this.b,0)},uZn.Nb=function(n){this.e&&(this.e.Nb(n),this.e=null),this.c.Nb(new IE(this,n)),this.b=0},uZn.Bd=function(n){for(;;){if(this.e&&this.e.Bd(n))return HA(this.b,YZn)&&(this.b=$gn(this.b,1)),!0;if(this.e=null,!this.c.Bd(new eb(this)))return!1}},uZn.a=0,uZn.b=0,zW(AZn,"CollectSpliterators/FlatMapSpliterator",1150),sDn(1152,1,QZn,eb),uZn.Cd=function(n){M_(this.a,n)},zW(AZn,"CollectSpliterators/FlatMapSpliterator/lambda$0$Type",1152),sDn(1153,1,QZn,IE),uZn.Cd=function(n){fY(this.a,this.b,n)},zW(AZn,"CollectSpliterators/FlatMapSpliterator/lambda$1$Type",1153),sDn(1151,1150,WZn,T6),zW(AZn,"CollectSpliterators/FlatMapSpliteratorOfObject",1151),sDn(253,1,ZZn),uZn.Fd=function(n){return this.Ed(uG(n,253))},uZn.Ed=function(n){var t;return n==(my(),Tat)?1:n==(py(),Mat)?-1:(qG(),0!=(t=Dun(this.a,n.a))?t:F$(this,526)==F$(n,526)?0:F$(this,526)?1:-1)},uZn.Id=function(){return this.a},uZn.Fb=function(n){return pTn(this,n)},zW(AZn,"Cut",253),sDn(1823,253,ZZn,ky),uZn.Ed=function(n){return n==this?0:1},uZn.Gd=function(n){throw hv(new Av)},uZn.Hd=function(n){n.a+="+\u221e)"},uZn.Id=function(){throw hv(new kM(n1n))},uZn.Hb=function(){return bS(),Avn(this)},uZn.Jd=function(n){return!1},uZn.Ib=function(){return"+\u221e"},zW(AZn,"Cut/AboveAll",1823),sDn(526,253,{253:1,526:1,3:1,34:1},bx),uZn.Gd=function(n){QA((n.a+="(",n),this.a)},uZn.Hd=function(n){jQ(QA(n,this.a),93)},uZn.Hb=function(){return~Hon(this.a)},uZn.Jd=function(n){return qG(),Dun(this.a,n)<0},uZn.Ib=function(){return"/"+this.a+"\\"},zW(AZn,"Cut/AboveValue",526),sDn(1822,253,ZZn,vy),uZn.Ed=function(n){return n==this?0:-1},uZn.Gd=function(n){n.a+="(-\u221e"},uZn.Hd=function(n){throw hv(new Av)},uZn.Id=function(){throw hv(new kM(n1n))},uZn.Hb=function(){return bS(),Avn(this)},uZn.Jd=function(n){return!0},uZn.Ib=function(){return"-\u221e"},zW(AZn,"Cut/BelowAll",1822),sDn(1824,253,ZZn,wx),uZn.Gd=function(n){QA((n.a+="[",n),this.a)},uZn.Hd=function(n){jQ(QA(n,this.a),41)},uZn.Hb=function(){return Hon(this.a)},uZn.Jd=function(n){return qG(),Dun(this.a,n)<=0},uZn.Ib=function(){return"\\"+this.a+"/"},zW(AZn,"Cut/BelowValue",1824),sDn(547,1,t1n),uZn.Jc=function(n){z8(this,n)},uZn.Ib=function(){return rgn(uG(bZ(this,"use Optional.orNull() instead of Optional.or(null)"),20).Kc())},zW(AZn,"FluentIterable",547),sDn(442,547,t1n,iN),uZn.Kc=function(){return new Fz(ix(this.a.Kc(),new h))},zW(AZn,"FluentIterable/2",442),sDn(1059,547,t1n,rN),uZn.Kc=function(){return OV(this)},zW(AZn,"FluentIterable/3",1059),sDn(724,399,LZn,YD),uZn.Xb=function(n){return this.a[n].Kc()},zW(AZn,"FluentIterable/3/1",724),sDn(2070,1,{}),uZn.Ib=function(){return cpn(this.Kd().b)},zW(AZn,"ForwardingObject",2070),sDn(2071,2070,e1n),uZn.Kd=function(){return this.Ld()},uZn.Jc=function(n){z8(this,n)},uZn.Lc=function(){return this.Oc()},uZn.Nc=function(){return new h3(this,0)},uZn.Oc=function(){return new fX(null,this.Nc())},uZn.Fc=function(n){return this.Ld(),Rj()},uZn.Gc=function(n){return this.Ld(),Kj()},uZn.$b=function(){this.Ld(),Fj()},uZn.Hc=function(n){return this.Ld().Hc(n)},uZn.Ic=function(n){return this.Ld().Ic(n)},uZn.dc=function(){return this.Ld().b.dc()},uZn.Kc=function(){return this.Ld().Kc()},uZn.Mc=function(n){return this.Ld(),_j()},uZn.gc=function(){return this.Ld().b.gc()},uZn.Pc=function(){return this.Ld().Pc()},uZn.Qc=function(n){return this.Ld().Qc(n)},zW(AZn,"ForwardingCollection",2071),sDn(2078,31,i1n),uZn.Kc=function(){return this.Od()},uZn.Fc=function(n){throw hv(new Kv)},uZn.Gc=function(n){throw hv(new Kv)},uZn.Md=function(){return this.c||(this.c=this.Nd())},uZn.$b=function(){throw hv(new Kv)},uZn.Hc=function(n){return null!=n&&Wpn(this,n,!1)},uZn.Nd=function(){switch(this.gc()){case 0:return ZW(),ZW(),jat;case 1:return ZW(),new Uq(WW(this.Od().Pb()));default:return new TV(this,this.Pc())}},uZn.Mc=function(n){throw hv(new Kv)},zW(AZn,"ImmutableCollection",2078),sDn(727,2078,i1n,jv),uZn.Kc=function(){return jtn(this.a.Kc())},uZn.Hc=function(n){return null!=n&&this.a.Hc(n)},uZn.Ic=function(n){return this.a.Ic(n)},uZn.dc=function(){return this.a.dc()},uZn.Od=function(){return jtn(this.a.Kc())},uZn.gc=function(){return this.a.gc()},uZn.Pc=function(){return this.a.Pc()},uZn.Qc=function(n){return this.a.Qc(n)},uZn.Ib=function(){return cpn(this.a)},zW(AZn,"ForwardingImmutableCollection",727),sDn(307,2078,r1n),uZn.Kc=function(){return this.Od()},uZn.ed=function(){return this.Pd(0)},uZn.fd=function(n){return this.Pd(n)},uZn.jd=function(n){Lon(this,n)},uZn.Nc=function(){return new h3(this,16)},uZn.kd=function(n,t){return this.Qd(n,t)},uZn.bd=function(n,t){throw hv(new Kv)},uZn.cd=function(n,t){throw hv(new Kv)},uZn.Md=function(){return this},uZn.Fb=function(n){return RDn(this,n)},uZn.Hb=function(){return Xsn(this)},uZn.dd=function(n){return null==n?-1:uTn(this,n)},uZn.Od=function(){return this.Pd(0)},uZn.Pd=function(n){return oR(this,n)},uZn.gd=function(n){throw hv(new Kv)},uZn.hd=function(n,t){throw hv(new Kv)},uZn.Qd=function(n,t){return Dwn(new C2(new qE(this),n,t))},zW(AZn,"ImmutableList",307),sDn(2105,307,r1n),uZn.Kc=function(){return jtn(this.Rd().Kc())},uZn.kd=function(n,t){return Dwn(this.Rd().kd(n,t))},uZn.Hc=function(n){return null!=n&&this.Rd().Hc(n)},uZn.Ic=function(n){return this.Rd().Ic(n)},uZn.Fb=function(n){return udn(this.Rd(),n)},uZn.Xb=function(n){return GA(this,n)},uZn.Hb=function(){return Hon(this.Rd())},uZn.dd=function(n){return this.Rd().dd(n)},uZn.dc=function(){return this.Rd().dc()},uZn.Od=function(){return jtn(this.Rd().Kc())},uZn.gc=function(){return this.Rd().gc()},uZn.Qd=function(n,t){return Dwn(this.Rd().kd(n,t))},uZn.Pc=function(){return this.Rd().Qc(Inn(dat,EZn,1,this.Rd().gc(),5,1))},uZn.Qc=function(n){return this.Rd().Qc(n)},uZn.Ib=function(){return cpn(this.Rd())},zW(AZn,"ForwardingImmutableList",2105),sDn(729,1,a1n),uZn.vc=function(){return Mz(this)},uZn.wc=function(n){Yun(this,n)},uZn.ec=function(){return Tz(this)},uZn.yc=function(n,t,e){return Jgn(this,n,t,e)},uZn.Cc=function(){return this.Vd()},uZn.$b=function(){throw hv(new Kv)},uZn._b=function(n){return null!=this.xc(n)},uZn.uc=function(n){return this.Vd().Hc(n)},uZn.Td=function(){return new Ev(this)},uZn.Ud=function(){return new Sv(this)},uZn.Fb=function(n){return Wln(this,n)},uZn.Hb=function(){return Mz(this).Hb()},uZn.dc=function(){return 0==this.gc()},uZn.zc=function(n,t){return BM()},uZn.Bc=function(n){throw hv(new Kv)},uZn.Ib=function(){return QIn(this)},uZn.Vd=function(){return this.e?this.e:this.e=this.Ud()},uZn.c=null,uZn.d=null,uZn.e=null,zW(AZn,"ImmutableMap",729),sDn(730,729,a1n),uZn._b=function(n){return Ej(this,n)},uZn.uc=function(n){return iS(this.b,n)},uZn.Sd=function(){return $wn(new Zl(this))},uZn.Td=function(){return $wn(SJ(this.b))},uZn.Ud=function(){return sB(),new jv(jJ(this.b))},uZn.Fb=function(n){return rS(this.b,n)},uZn.xc=function(n){return W_(this,n)},uZn.Hb=function(){return Hon(this.b.c)},uZn.dc=function(){return this.b.c.dc()},uZn.gc=function(){return this.b.c.gc()},uZn.Ib=function(){return cpn(this.b.c)},zW(AZn,"ForwardingImmutableMap",730),sDn(2072,2071,o1n),uZn.Kd=function(){return this.Wd()},uZn.Ld=function(){return this.Wd()},uZn.Nc=function(){return new h3(this,1)},uZn.Fb=function(n){return n===this||this.Wd().Fb(n)},uZn.Hb=function(){return this.Wd().Hb()},zW(AZn,"ForwardingSet",2072),sDn(1085,2072,o1n,Zl),uZn.Kd=function(){return EJ(this.a.b)},uZn.Ld=function(){return EJ(this.a.b)},uZn.Hc=function(n){if(F$(n,44)&&null==uG(n,44).ld())return!1;try{return eS(EJ(this.a.b),n)}catch(t){if(F$(t=Ehn(t),212))return!1;throw hv(t)}},uZn.Wd=function(){return EJ(this.a.b)},uZn.Qc=function(n){var t;return t=YZ(EJ(this.a.b),n),EJ(this.a.b).b.gc()=0?"+":"")+(i/60|0),t=FL(e.Math.abs(i)%60),(cIn(),nut)[this.q.getDay()]+" "+tut[this.q.getMonth()]+" "+FL(this.q.getDate())+" "+FL(this.q.getHours())+":"+FL(this.q.getMinutes())+":"+FL(this.q.getSeconds())+" GMT"+n+t+" "+this.q.getFullYear()};var Xat,zat,Vat,Wat,Qat,Jat,Yat,Zat,not,tot,eot,iot=zW(DZn,"Date",206);sDn(2015,206,s0n,DEn),uZn.a=!1,uZn.b=0,uZn.c=0,uZn.d=0,uZn.e=0,uZn.f=0,uZn.g=!1,uZn.i=0,uZn.j=0,uZn.k=0,uZn.n=0,uZn.o=0,uZn.p=0,zW("com.google.gwt.i18n.shared.impl","DateRecord",2015),sDn(2064,1,{}),uZn.pe=function(){return null},uZn.qe=function(){return null},uZn.re=function(){return null},uZn.se=function(){return null},uZn.te=function(){return null},zW(h0n,"JSONValue",2064),sDn(221,2064,{221:1},Ib,Eb),uZn.Fb=function(n){return!!F$(n,221)&&j3(this.a,uG(n,221).a)},uZn.oe=function(){return uv},uZn.Hb=function(){return OZ(this.a)},uZn.pe=function(){return this},uZn.Ib=function(){var n,t,e;for(e=new lx("["),t=0,n=this.a.length;t0&&(e.a+=","),QA(e,uin(this,t));return e.a+="]",e.a},zW(h0n,"JSONArray",221),sDn(493,2064,{493:1},Sb),uZn.oe=function(){return sv},uZn.qe=function(){return this},uZn.Ib=function(){return qx(),""+this.a},uZn.a=!1,zW(h0n,"JSONBoolean",493),sDn(997,63,S1n,Fy),zW(h0n,"JSONException",997),sDn(1036,2064,{},T),uZn.oe=function(){return fv},uZn.Ib=function(){return IZn},zW(h0n,"JSONNull",1036),sDn(263,2064,{263:1},Pb),uZn.Fb=function(n){return!!F$(n,263)&&this.a==uG(n,263).a},uZn.oe=function(){return av},uZn.Hb=function(){return OL(this.a)},uZn.re=function(){return this},uZn.Ib=function(){return this.a+""},uZn.a=0,zW(h0n,"JSONNumber",263),sDn(190,2064,{190:1},_y,Cb),uZn.Fb=function(n){return!!F$(n,190)&&j3(this.a,uG(n,190).a)},uZn.oe=function(){return ov},uZn.Hb=function(){return OZ(this.a)},uZn.se=function(){return this},uZn.Ib=function(){var n,t,e,i,r,c;for(c=new lx("{"),n=!0,i=0,r=(e=Yon(this,Inn($ot,zZn,2,0,6,1))).length;i=0?":"+this.c:"")+")"},uZn.c=0;var jot=zW(kZn,"StackTraceElement",319);bZn={3:1,484:1,34:1,2:1};var Eot,Sot,Pot,Cot,Iot,Oot,Aot,Lot,Not,$ot=zW(kZn,C1n,2);sDn(111,427,{484:1},zM,VM,fx),zW(kZn,"StringBuffer",111),sDn(104,427,{484:1},WM,QM,lx),zW(kZn,"StringBuilder",104),sDn(702,77,v0n,JM),zW(kZn,"StringIndexOutOfBoundsException",702),sDn(2145,1,{}),sDn(48,63,{3:1,103:1,63:1,82:1,48:1},Kv,TM),zW(kZn,"UnsupportedOperationException",48),sDn(247,242,{3:1,34:1,242:1,247:1},Edn,Wj),uZn.Fd=function(n){return $Gn(this,uG(n,247))},uZn.ue=function(){return YIn(wzn(this))},uZn.Fb=function(n){var t;return this===n||!!F$(n,247)&&(t=uG(n,247),this.e==t.e&&0==$Gn(this,t))},uZn.Hb=function(){var n;return 0!=this.b?this.b:this.a<54?(n=Bsn(this.f),this.b=pz(E3(n,-1)),this.b=33*this.b+pz(E3($z(n,32),-1)),this.b=17*this.b+t0(this.e),this.b):(this.b=17*cwn(this.c)+t0(this.e),this.b)},uZn.Ib=function(){return wzn(this)},uZn.a=0,uZn.b=0,uZn.d=0,uZn.e=0,uZn.f=0;var Dot,xot,Rot,Kot,Fot,_ot,Bot=zW("java.math","BigDecimal",247);sDn(92,242,{3:1,34:1,242:1,92:1},Z5,x3,VV,nkn,PN),uZn.Fd=function(n){return Pvn(this,uG(n,92))},uZn.ue=function(){return YIn(bYn(this,0))},uZn.Fb=function(n){return Cpn(this,n)},uZn.Hb=function(){return cwn(this)},uZn.Ib=function(){return bYn(this,0)},uZn.b=-2,uZn.c=0,uZn.d=0,uZn.e=0;var Hot,Uot,Got,qot,Xot=zW("java.math","BigInteger",92);sDn(498,2065,xZn),uZn.$b=function(){$V(this)},uZn._b=function(n){return PV(this,n)},uZn.uc=function(n){return Qln(this,n,this.i)||Qln(this,n,this.f)},uZn.vc=function(){return new Nw(this)},uZn.xc=function(n){return cQ(this,n)},uZn.zc=function(n,t){return vJ(this,n,t)},uZn.Bc=function(n){return u7(this,n)},uZn.gc=function(){return oS(this)},uZn.g=0,zW(DZn,"AbstractHashMap",498),sDn(267,KZn,FZn,Nw),uZn.$b=function(){this.a.$b()},uZn.Hc=function(n){return Q4(this,n)},uZn.Kc=function(){return new bsn(this.a)},uZn.Mc=function(n){var t;return!!Q4(this,n)&&(t=uG(n,44).ld(),this.a.Bc(t),!0)},uZn.gc=function(){return this.a.gc()},zW(DZn,"AbstractHashMap/EntrySet",267),sDn(268,1,$Zn,bsn),uZn.Nb=function(n){SV(this,n)},uZn.Pb=function(){return von(this)},uZn.Ob=function(){return this.b},uZn.Qb=function(){Oen(this)},uZn.b=!1,uZn.d=0,zW(DZn,"AbstractHashMap/EntrySetIterator",268),sDn(426,1,$Zn,Jw),uZn.Nb=function(n){SV(this,n)},uZn.Ob=function(){return AP(this)},uZn.Pb=function(){return _Y(this)},uZn.Qb=function(){LQ(this)},uZn.b=0,uZn.c=-1,zW(DZn,"AbstractList/IteratorImpl",426),sDn(98,426,UZn,N4),uZn.Qb=function(){LQ(this)},uZn.Rb=function(n){pF(this,n)},uZn.Sb=function(){return this.b>0},uZn.Tb=function(){return this.b},uZn.Ub=function(){return MK(this.b>0),this.a.Xb(this.c=--this.b)},uZn.Vb=function(){return this.b-1},uZn.Wb=function(n){TK(-1!=this.c),this.a.hd(this.c,n)},zW(DZn,"AbstractList/ListIteratorImpl",98),sDn(244,56,m1n,C2),uZn.bd=function(n,t){o3(n,this.b),this.c.bd(this.a+n,t),++this.b},uZn.Xb=function(n){return u3(n,this.b),this.c.Xb(this.a+n)},uZn.gd=function(n){var t;return u3(n,this.b),t=this.c.gd(this.a+n),--this.b,t},uZn.hd=function(n,t){return u3(n,this.b),this.c.hd(this.a+n,t)},uZn.gc=function(){return this.b},uZn.a=0,uZn.b=0,zW(DZn,"AbstractList/SubList",244),sDn(266,KZn,FZn,Lw),uZn.$b=function(){this.a.$b()},uZn.Hc=function(n){return this.a._b(n)},uZn.Kc=function(){return new Kw(this.a.vc().Kc())},uZn.Mc=function(n){return!!this.a._b(n)&&(this.a.Bc(n),!0)},uZn.gc=function(){return this.a.gc()},zW(DZn,"AbstractMap/1",266),sDn(541,1,$Zn,Kw),uZn.Nb=function(n){SV(this,n)},uZn.Ob=function(){return this.a.Ob()},uZn.Pb=function(){return uG(this.a.Pb(),44).ld()},uZn.Qb=function(){this.a.Qb()},zW(DZn,"AbstractMap/1/1",541),sDn(231,31,RZn,Fw),uZn.$b=function(){this.a.$b()},uZn.Hc=function(n){return this.a.uc(n)},uZn.Kc=function(){return new _w(this.a.vc().Kc())},uZn.gc=function(){return this.a.gc()},zW(DZn,"AbstractMap/2",231),sDn(301,1,$Zn,_w),uZn.Nb=function(n){SV(this,n)},uZn.Ob=function(){return this.a.Ob()},uZn.Pb=function(){return uG(this.a.Pb(),44).md()},uZn.Qb=function(){this.a.Qb()},zW(DZn,"AbstractMap/2/1",301),sDn(494,1,{494:1,44:1}),uZn.Fb=function(n){var t;return!!F$(n,44)&&(t=uG(n,44),OJ(this.d,t.ld())&&OJ(this.e,t.md()))},uZn.ld=function(){return this.d},uZn.md=function(){return this.e},uZn.Hb=function(){return VN(this.d)^VN(this.e)},uZn.nd=function(n){return wF(this,n)},uZn.Ib=function(){return this.d+"="+this.e},zW(DZn,"AbstractMap/AbstractEntry",494),sDn(397,494,{494:1,397:1,44:1},VP),zW(DZn,"AbstractMap/SimpleEntry",397),sDn(2082,1,$0n),uZn.Fb=function(n){var t;return!!F$(n,44)&&(t=uG(n,44),OJ(this.ld(),t.ld())&&OJ(this.md(),t.md()))},uZn.Hb=function(){return VN(this.ld())^VN(this.md())},uZn.Ib=function(){return this.ld()+"="+this.md()},zW(DZn,qZn,2082),sDn(2090,2065,_Zn),uZn.Xc=function(n){return Sj(this.Ee(n))},uZn.tc=function(n){return I9(this,n)},uZn._b=function(n){return dF(this,n)},uZn.vc=function(){return new Uw(this)},uZn.Tc=function(){return DV(this.Ge())},uZn.Yc=function(n){return Sj(this.He(n))},uZn.xc=function(n){var t;return t=n,DA(this.Fe(t))},uZn.$c=function(n){return Sj(this.Ie(n))},uZn.ec=function(){return new Bw(this)},uZn.Vc=function(){return DV(this.Je())},uZn._c=function(n){return Sj(this.Ke(n))},zW(DZn,"AbstractNavigableMap",2090),sDn(629,KZn,FZn,Uw),uZn.Hc=function(n){return F$(n,44)&&I9(this.b,uG(n,44))},uZn.Kc=function(){return this.b.De()},uZn.Mc=function(n){var t;return!!F$(n,44)&&(t=uG(n,44),this.b.Le(t))},uZn.gc=function(){return this.b.gc()},zW(DZn,"AbstractNavigableMap/EntrySet",629),sDn(1146,KZn,HZn,Bw),uZn.Nc=function(){return new GP(this)},uZn.$b=function(){this.a.$b()},uZn.Hc=function(n){return dF(this.a,n)},uZn.Kc=function(){return new Hw(this.a.vc().b.De())},uZn.Mc=function(n){return!!dF(this.a,n)&&(this.a.Bc(n),!0)},uZn.gc=function(){return this.a.gc()},zW(DZn,"AbstractNavigableMap/NavigableKeySet",1146),sDn(1147,1,$Zn,Hw),uZn.Nb=function(n){SV(this,n)},uZn.Ob=function(){return AP(this.a.a)},uZn.Pb=function(){return kR(this.a).ld()},uZn.Qb=function(){rB(this.a)},zW(DZn,"AbstractNavigableMap/NavigableKeySet/1",1147),sDn(2103,31,RZn),uZn.Fc=function(n){return kG(_Cn(this,n),D0n),!0},uZn.Gc=function(n){return tJ(n),vG(n!=this,"Can't add a queue to itself"),Qon(this,n)},uZn.$b=function(){for(;null!=hin(this););},zW(DZn,"AbstractQueue",2103),sDn(310,31,{4:1,20:1,31:1,16:1},ND,$4),uZn.Fc=function(n){return O6(this,n),!0},uZn.$b=function(){q5(this)},uZn.Hc=function(n){return Chn(new XJ(this),n)},uZn.dc=function(){return LM(this)},uZn.Kc=function(){return new XJ(this)},uZn.Mc=function(n){return m0(new XJ(this),n)},uZn.gc=function(){return this.c-this.b&this.a.length-1},uZn.Nc=function(){return new h3(this,272)},uZn.Qc=function(n){var t;return t=this.c-this.b&this.a.length-1,n.lengtht&&uQ(n,t,null),n},uZn.b=0,uZn.c=0,zW(DZn,"ArrayDeque",310),sDn(459,1,$Zn,XJ),uZn.Nb=function(n){SV(this,n)},uZn.Ob=function(){return this.a!=this.b},uZn.Pb=function(){return rwn(this)},uZn.Qb=function(){lan(this)},uZn.a=0,uZn.b=0,uZn.c=-1,zW(DZn,"ArrayDeque/IteratorImpl",459),sDn(13,56,x0n,Zm,R7,Z_),uZn.bd=function(n,t){GX(this,n,t)},uZn.Fc=function(n){return kD(this,n)},uZn.cd=function(n,t){return Cbn(this,n,t)},uZn.Gc=function(n){return Ohn(this,n)},uZn.$b=function(){Xv(this.c,0)},uZn.Hc=function(n){return-1!=Ten(this,n,0)},uZn.Jc=function(n){Prn(this,n)},uZn.Xb=function(n){return zq(this,n)},uZn.dd=function(n){return Ten(this,n,0)},uZn.dc=function(){return 0==this.c.length},uZn.Kc=function(){return new Ww(this)},uZn.gd=function(n){return i7(this,n)},uZn.Mc=function(n){return men(this,n)},uZn.ce=function(n,t){P2(this,n,t)},uZn.hd=function(n,t){return Y8(this,n,t)},uZn.gc=function(){return this.c.length},uZn.jd=function(n){f$(this,n)},uZn.Pc=function(){return tq(this.c)},uZn.Qc=function(n){return Ekn(this,n)};var zot,Vot,Wot,Qot,Jot,Yot,Zot,nut,tut,eut=zW(DZn,"ArrayList",13);sDn(7,1,$Zn,Ww),uZn.Nb=function(n){SV(this,n)},uZn.Ob=function(){return l$(this)},uZn.Pb=function(){return N3(this)},uZn.Qb=function(){tW(this)},uZn.a=0,uZn.b=-1,zW(DZn,"ArrayList/1",7),sDn(2112,e.Function,{},P),uZn.Me=function(n,t){return ugn(n,t)},sDn(151,56,R0n,IM),uZn.Hc=function(n){return-1!=gan(this,n)},uZn.Jc=function(n){var t,e,i,r;for(tJ(n),i=0,r=(e=this.a).length;i0)throw hv(new vM(Y0n+n+" greater than "+this.e));return this.f.Te()?G1(this.c,this.b,this.a,n,t):N2(this.c,n,t)},uZn.zc=function(n,t){if(!ljn(this.c,this.f,n,this.b,this.a,this.e,this.d))throw hv(new vM(n+" outside the range "+this.b+" to "+this.e));return xfn(this.c,n,t)},uZn.Bc=function(n){var t;return t=n,ljn(this.c,this.f,t,this.b,this.a,this.e,this.d)?V1(this.c,t):null},uZn.Le=function(n){return $Q(this,n.ld())&&Lnn(this.c,n)},uZn.gc=function(){var n,t,e;if(!((t=this.f.Te()?this.a?Zmn(this.c,this.b,!0):Zmn(this.c,this.b,!1):Ytn(this.c))&&$Q(this,t.d)&&t))return 0;for(n=0,e=new dun(this.c,this.f,this.b,this.a,this.e,this.d);AP(e.a);e.b=uG(_Y(e.a),44))++n;return n},uZn.ad=function(n,t){if(this.f.Te()&&this.c.a.Ne(n,this.b)<0)throw hv(new vM(Y0n+n+Z0n+this.b));return this.f.Ue()?G1(this.c,n,t,this.e,this.d):$2(this.c,n,t)},uZn.a=!1,uZn.d=!1,zW(DZn,"TreeMap/SubMap",631),sDn(304,22,n2n,qP),uZn.Te=function(){return!1},uZn.Ue=function(){return!1};var Mut,Tut=_cn(DZn,"TreeMap/SubMapType",304,Oat,K6,hB);sDn(1143,304,n2n,SN),uZn.Ue=function(){return!0},_cn(DZn,"TreeMap/SubMapType/1",1143,Tut,null,null),sDn(1144,304,n2n,P$),uZn.Te=function(){return!0},uZn.Ue=function(){return!0},_cn(DZn,"TreeMap/SubMapType/2",1144,Tut,null,null),sDn(1145,304,n2n,EN),uZn.Te=function(){return!0},_cn(DZn,"TreeMap/SubMapType/3",1145,Tut,null,null),sDn(157,KZn,{3:1,20:1,31:1,16:1,277:1,21:1,87:1,157:1},rk,Hj,od),uZn.Nc=function(){return new GP(this)},uZn.Fc=function(n){return _V(this,n)},uZn.$b=function(){this.a.$b()},uZn.Hc=function(n){return this.a._b(n)},uZn.Kc=function(){return this.a.ec().Kc()},uZn.Mc=function(n){return sD(this,n)},uZn.gc=function(){return this.a.gc()};var jut=zW(DZn,"TreeSet",157);sDn(1082,1,{},ud),uZn.Ve=function(n,t){return _K(this.a,n,t)},zW(t2n,"BinaryOperator/lambda$0$Type",1082),sDn(1083,1,{},sd),uZn.Ve=function(n,t){return BK(this.a,n,t)},zW(t2n,"BinaryOperator/lambda$1$Type",1083),sDn(952,1,{},H),uZn.Kb=function(n){return n},zW(t2n,"Function/lambda$0$Type",952),sDn(395,1,y1n,hd),uZn.Mb=function(n){return!this.a.Mb(n)},zW(t2n,"Predicate/lambda$2$Type",395),sDn(581,1,{581:1});var Eut,Sut,Put=zW(e2n,"Handler",581);sDn(2107,1,yZn),uZn.xe=function(){return"DUMMY"},uZn.Ib=function(){return this.xe()},zW(e2n,"Level",2107),sDn(1706,2107,yZn,U),uZn.xe=function(){return"INFO"},zW(e2n,"Level/LevelInfo",1706),sDn(1843,1,{},ik),zW(e2n,"LogManager",1843),sDn(1896,1,yZn,iB),uZn.b=null,zW(e2n,"LogRecord",1896),sDn(525,1,{525:1},e9),uZn.e=!1;var Cut,Iut,Out,Aut=!1,Lut=!1,Nut=!1,$ut=!1,Dut=!1;zW(e2n,"Logger",525),sDn(835,581,{581:1},G),zW(e2n,"SimpleConsoleLogHandler",835),sDn(108,22,{3:1,34:1,22:1,108:1},XP);var xut,Rut=_cn(c2n,"Collector/Characteristics",108,Oat,D2,fB);sDn(758,1,{},WV),zW(c2n,"CollectorImpl",758),sDn(1074,1,{},q),uZn.Ve=function(n,t){return idn(uG(n,213),uG(t,213))},zW(c2n,"Collectors/10methodref$merge$Type",1074),sDn(1075,1,{},X),uZn.Kb=function(n){return R4(uG(n,213))},zW(c2n,"Collectors/11methodref$toString$Type",1075),sDn(1076,1,{},fd),uZn.Kb=function(n){return qx(),!!IL(n)},zW(c2n,"Collectors/12methodref$test$Type",1076),sDn(144,1,{},z),uZn.Yd=function(n,t){uG(n,16).Fc(t)},zW(c2n,"Collectors/20methodref$add$Type",144),sDn(146,1,{},V),uZn.Xe=function(){return new Zm},zW(c2n,"Collectors/21methodref$ctor$Type",146),sDn(359,1,{},W),uZn.Xe=function(){return new ek},zW(c2n,"Collectors/23methodref$ctor$Type",359),sDn(360,1,{},Q),uZn.Yd=function(n,t){FV(uG(n,49),t)},zW(c2n,"Collectors/24methodref$add$Type",360),sDn(1069,1,{},J),uZn.Ve=function(n,t){return IS(uG(n,15),uG(t,16))},zW(c2n,"Collectors/4methodref$addAll$Type",1069),sDn(1073,1,{},Y),uZn.Yd=function(n,t){o7(uG(n,213),uG(t,484))},zW(c2n,"Collectors/9methodref$add$Type",1073),sDn(1072,1,{},fG),uZn.Xe=function(){return new Ysn(this.a,this.b,this.c)},zW(c2n,"Collectors/lambda$15$Type",1072),sDn(1077,1,{},Z),uZn.Xe=function(){var n;return Akn(n=new u8,(qx(),!1),new Zm),Akn(n,!0,new Zm),n},zW(c2n,"Collectors/lambda$22$Type",1077),sDn(1078,1,{},ld),uZn.Xe=function(){return Uhn(cT(dat,1),EZn,1,5,[this.a])},zW(c2n,"Collectors/lambda$25$Type",1078),sDn(1079,1,{},bd),uZn.Yd=function(n,t){Yq(this.a,Kcn(n))},zW(c2n,"Collectors/lambda$26$Type",1079),sDn(1080,1,{},wd),uZn.Ve=function(n,t){return sV(this.a,Kcn(n),Kcn(t))},zW(c2n,"Collectors/lambda$27$Type",1080),sDn(1081,1,{},nn),uZn.Kb=function(n){return Kcn(n)[0]},zW(c2n,"Collectors/lambda$28$Type",1081),sDn(728,1,{},tn),uZn.Ve=function(n,t){return nX(n,t)},zW(c2n,"Collectors/lambda$4$Type",728),sDn(145,1,{},en),uZn.Ve=function(n,t){return ES(uG(n,16),uG(t,16))},zW(c2n,"Collectors/lambda$42$Type",145),sDn(361,1,{},rn),uZn.Ve=function(n,t){return SS(uG(n,49),uG(t,49))},zW(c2n,"Collectors/lambda$50$Type",361),sDn(362,1,{},cn),uZn.Kb=function(n){return uG(n,49)},zW(c2n,"Collectors/lambda$51$Type",362),sDn(1068,1,{},dd),uZn.Yd=function(n,t){vln(this.a,uG(n,85),t)},zW(c2n,"Collectors/lambda$7$Type",1068),sDn(1070,1,{},an),uZn.Ve=function(n,t){return Ahn(uG(n,85),uG(t,85),new J)},zW(c2n,"Collectors/lambda$8$Type",1070),sDn(1071,1,{},gd),uZn.Kb=function(n){return zgn(this.a,uG(n,85))},zW(c2n,"Collectors/lambda$9$Type",1071),sDn(550,1,{}),uZn.$e=function(){qQ(this)},uZn.d=!1,zW(c2n,"TerminatableStream",550),sDn(827,550,a2n,IK),uZn.$e=function(){qQ(this)},zW(c2n,"DoubleStreamImpl",827),sDn(1847,736,WZn,lG),uZn.Re=function(n){return FMn(this,uG(n,189))},uZn.a=null,zW(c2n,"DoubleStreamImpl/2",1847),sDn(1848,1,_0n,pd),uZn.Pe=function(n){$N(this.a,n)},zW(c2n,"DoubleStreamImpl/2/lambda$0$Type",1848),sDn(1845,1,_0n,md),uZn.Pe=function(n){NN(this.a,n)},zW(c2n,"DoubleStreamImpl/lambda$0$Type",1845),sDn(1846,1,_0n,vd),uZn.Pe=function(n){Mmn(this.a,n)},zW(c2n,"DoubleStreamImpl/lambda$2$Type",1846),sDn(1397,735,WZn,i9),uZn.Re=function(n){return e6(this,uG(n,202))},uZn.a=0,uZn.b=0,uZn.c=0,zW(c2n,"IntStream/5",1397),sDn(806,550,a2n,OK),uZn.$e=function(){qQ(this)},uZn._e=function(){return GQ(this),this.a},zW(c2n,"IntStreamImpl",806),sDn(807,550,a2n,mS),uZn.$e=function(){qQ(this)},uZn._e=function(){return GQ(this),BD(),dut},zW(c2n,"IntStreamImpl/Empty",807),sDn(1687,1,JZn,kd),uZn.Dd=function(n){msn(this.a,n)},zW(c2n,"IntStreamImpl/lambda$4$Type",1687);var Kut,Fut=Iq(c2n,"Stream");sDn(26,550,{533:1,687:1,848:1},fX),uZn.$e=function(){qQ(this)},zW(c2n,"StreamImpl",26),sDn(1102,500,WZn,D_),uZn.Bd=function(n){for(;Ttn(this);){if(this.a.Bd(n))return!0;qQ(this.b),this.b=null,this.a=null}return!1},zW(c2n,"StreamImpl/1",1102),sDn(1103,1,QZn,yd),uZn.Cd=function(n){mG(this.a,uG(n,848))},zW(c2n,"StreamImpl/1/lambda$0$Type",1103),sDn(1104,1,y1n,Md),uZn.Mb=function(n){return FV(this.a,n)},zW(c2n,"StreamImpl/1methodref$add$Type",1104),sDn(1105,500,WZn,QY),uZn.Bd=function(n){var t;return this.a||(t=new Zm,this.b.a.Nb(new Td(t)),hZ(),f$(t,this.c),this.a=new h3(t,16)),urn(this.a,n)},uZn.a=null,zW(c2n,"StreamImpl/5",1105),sDn(1106,1,QZn,Td),uZn.Cd=function(n){kD(this.a,n)},zW(c2n,"StreamImpl/5/2methodref$add$Type",1106),sDn(737,500,WZn,ien),uZn.Bd=function(n){for(this.b=!1;!this.b&&this.c.Bd(new WP(this,n)););return this.b},uZn.b=!1,zW(c2n,"StreamImpl/FilterSpliterator",737),sDn(1096,1,QZn,WP),uZn.Cd=function(n){Xz(this.a,this.b,n)},zW(c2n,"StreamImpl/FilterSpliterator/lambda$0$Type",1096),sDn(1091,736,WZn,s7),uZn.Re=function(n){return v_(this,uG(n,189))},zW(c2n,"StreamImpl/MapToDoubleSpliterator",1091),sDn(1095,1,QZn,QP),uZn.Cd=function(n){vC(this.a,this.b,n)},zW(c2n,"StreamImpl/MapToDoubleSpliterator/lambda$0$Type",1095),sDn(1090,735,WZn,h7),uZn.Re=function(n){return k_(this,uG(n,202))},zW(c2n,"StreamImpl/MapToIntSpliterator",1090),sDn(1094,1,QZn,JP),uZn.Cd=function(n){kC(this.a,this.b,n)},zW(c2n,"StreamImpl/MapToIntSpliterator/lambda$0$Type",1094),sDn(734,500,WZn,f7),uZn.Bd=function(n){return y_(this,n)},zW(c2n,"StreamImpl/MapToObjSpliterator",734),sDn(1093,1,QZn,YP),uZn.Cd=function(n){yC(this.a,this.b,n)},zW(c2n,"StreamImpl/MapToObjSpliterator/lambda$0$Type",1093),sDn(1092,500,WZn,Fan),uZn.Bd=function(n){for(;NP(this.b,0);){if(!this.a.Bd(new on))return!1;this.b=$gn(this.b,1)}return this.a.Bd(n)},uZn.b=0,zW(c2n,"StreamImpl/SkipSpliterator",1092),sDn(1097,1,QZn,on),uZn.Cd=function(n){},zW(c2n,"StreamImpl/SkipSpliterator/lambda$0$Type",1097),sDn(626,1,QZn,un),uZn.Cd=function(n){Ob(this,n)},zW(c2n,"StreamImpl/ValueConsumer",626),sDn(1098,1,QZn,sn),uZn.Cd=function(n){vS()},zW(c2n,"StreamImpl/lambda$0$Type",1098),sDn(1099,1,QZn,hn),uZn.Cd=function(n){vS()},zW(c2n,"StreamImpl/lambda$1$Type",1099),sDn(1100,1,{},jd),uZn.Ve=function(n,t){return FB(this.a,n,t)},zW(c2n,"StreamImpl/lambda$4$Type",1100),sDn(1101,1,QZn,nC),uZn.Cd=function(n){kF(this.b,this.a,n)},zW(c2n,"StreamImpl/lambda$5$Type",1101),sDn(1107,1,QZn,Ed),uZn.Cd=function(n){Usn(this.a,uG(n,380))},zW(c2n,"TerminatableStream/lambda$0$Type",1107),sDn(2142,1,{}),sDn(2014,1,{},fn),zW("javaemul.internal","ConsoleLogger",2014);var _ut=0;sDn(2134,1,{}),sDn(1830,1,QZn,ln),uZn.Cd=function(n){uG(n,317)},zW(l2n,"BowyerWatsonTriangulation/lambda$0$Type",1830),sDn(1831,1,QZn,Pd),uZn.Cd=function(n){Qon(this.a,uG(n,317).e)},zW(l2n,"BowyerWatsonTriangulation/lambda$1$Type",1831),sDn(1832,1,QZn,bn),uZn.Cd=function(n){uG(n,177)},zW(l2n,"BowyerWatsonTriangulation/lambda$2$Type",1832),sDn(1827,1,b2n,Cd),uZn.Ne=function(n,t){return S5(this.a,uG(n,177),uG(t,177))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(l2n,"NaiveMinST/lambda$0$Type",1827),sDn(449,1,{},Sd),zW(l2n,"NodeMicroLayout",449),sDn(177,1,{177:1},ZP),uZn.Fb=function(n){var t;return!!F$(n,177)&&(t=uG(n,177),OJ(this.a,t.a)&&OJ(this.b,t.b)||OJ(this.a,t.b)&&OJ(this.b,t.a))},uZn.Hb=function(){return VN(this.a)+VN(this.b)};var But=zW(l2n,"TEdge",177);sDn(317,1,{317:1},gqn),uZn.Fb=function(n){var t;return!!F$(n,317)&&Den(this,(t=uG(n,317)).a)&&Den(this,t.b)&&Den(this,t.c)},uZn.Hb=function(){return VN(this.a)+VN(this.b)+VN(this.c)},zW(l2n,"TTriangle",317),sDn(225,1,{225:1},C$),zW(l2n,"Tree",225),sDn(1218,1,{},q0),zW(w2n,"Scanline",1218);var Hut=Iq(w2n,d2n);sDn(1758,1,{},Qin),zW(g2n,"CGraph",1758),sDn(316,1,{316:1},V0),uZn.b=0,uZn.c=0,uZn.d=0,uZn.g=0,uZn.i=0,uZn.k=T0n,zW(g2n,"CGroup",316),sDn(830,1,{},fk),zW(g2n,"CGroup/CGroupBuilder",830),sDn(60,1,{60:1},NF),uZn.Ib=function(){return this.j?mK(this.j.Kb(this)):(vK(zut),zut.o+"@"+(xx(this)>>>0).toString(16))},uZn.f=0,uZn.i=T0n;var Uut,Gut,qut,Xut,zut=zW(g2n,"CNode",60);sDn(829,1,{},lk),zW(g2n,"CNode/CNodeBuilder",829),sDn(1590,1,{},wn),uZn.ff=function(n,t){return 0},uZn.gf=function(n,t){return 0},zW(g2n,m2n,1590),sDn(1853,1,{},dn),uZn.cf=function(n){var t,i,r,c,a,o,u,s,h,f,l,b,w,d,g;for(h=M0n,r=new Ww(n.a.b);r.ae.d.c||e.d.c==r.d.c&&e.d.b0?n+this.n.d+this.n.a:0},uZn.kf=function(){var n,t,i,r,c;if(c=0,this.e)this.b?c=this.b.a:this.a[1][1]&&(c=this.a[1][1].kf());else if(this.g)c=ypn(this,wEn(this,null,!0));else for(Yrn(),i=0,r=(t=Uhn(cT(Ist,1),p1n,237,0,[jst,Est,Sst])).length;i0?c+this.n.b+this.n.c:0},uZn.lf=function(){var n,t,e,i,r;if(this.g)for(n=wEn(this,null,!1),Yrn(),i=0,r=(e=Uhn(cT(Ist,1),p1n,237,0,[jst,Est,Sst])).length;i0&&(r[0]+=this.d,i-=r[0]),r[2]>0&&(r[2]+=this.d,i-=r[2]),this.c.a=e.Math.max(0,i),this.c.d=t.d+n.d+(this.c.a-i)/2,r[1]=e.Math.max(r[1],i),J9(this,Est,t.d+n.d+r[0]-(r[1]-i)/2,r)},uZn.b=null,uZn.d=0,uZn.e=!1,uZn.f=!1,uZn.g=!1;var Ost,Ast,Lst,Nst=0,$st=0;zW(U2n,"GridContainerCell",1538),sDn(471,22,{3:1,34:1,22:1,471:1},aC);var Dst,xst=_cn(U2n,"HorizontalLabelAlignment",471,Oat,R2,gB);sDn(314,217,{217:1,314:1},a0,Yin,c1),uZn.jf=function(){return iq(this)},uZn.kf=function(){return rq(this)},uZn.a=0,uZn.c=!1;var Rst,Kst,Fst,_st=zW(U2n,"LabelCell",314);sDn(252,336,{217:1,336:1,252:1},tkn),uZn.jf=function(){return dNn(this)},uZn.kf=function(){return gNn(this)},uZn.lf=function(){YGn(this)},uZn.mf=function(){rqn(this)},uZn.b=0,uZn.c=0,uZn.d=!1,zW(U2n,"StripContainerCell",252),sDn(1691,1,y1n,Mn),uZn.Mb=function(n){return $M(uG(n,217))},zW(U2n,"StripContainerCell/lambda$0$Type",1691),sDn(1692,1,{},Tn),uZn.Ye=function(n){return uG(n,217).kf()},zW(U2n,"StripContainerCell/lambda$1$Type",1692),sDn(1693,1,y1n,jn),uZn.Mb=function(n){return DM(uG(n,217))},zW(U2n,"StripContainerCell/lambda$2$Type",1693),sDn(1694,1,{},En),uZn.Ye=function(n){return uG(n,217).jf()},zW(U2n,"StripContainerCell/lambda$3$Type",1694),sDn(472,22,{3:1,34:1,22:1,472:1},oC);var Bst,Hst,Ust,Gst,qst,Xst,zst,Vst,Wst,Qst,Jst,Yst,Zst,nht,tht,eht,iht,rht,cht,aht,oht,uht,sht,hht=_cn(U2n,"VerticalLabelAlignment",472,Oat,x2,pB);sDn(800,1,{},EQn),uZn.c=0,uZn.d=0,uZn.k=0,uZn.s=0,uZn.t=0,uZn.v=!1,uZn.w=0,uZn.D=!1,uZn.F=!1,zW(J2n,"NodeContext",800),sDn(1536,1,b2n,Sn),uZn.Ne=function(n,t){return UL(uG(n,64),uG(t,64))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(J2n,"NodeContext/0methodref$comparePortSides$Type",1536),sDn(1537,1,b2n,Pn),uZn.Ne=function(n,t){return ACn(uG(n,117),uG(t,117))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(J2n,"NodeContext/1methodref$comparePortContexts$Type",1537),sDn(164,22,{3:1,34:1,22:1,164:1},pun);var fht,lht,bht,wht,dht,ght,pht,mht=_cn(J2n,"NodeLabelLocation",164,Oat,Nkn,mB);sDn(117,1,{117:1},v$n),uZn.a=!1,zW(J2n,"PortContext",117),sDn(1541,1,QZn,Cn),uZn.Cd=function(n){eE(uG(n,314))},zW(n3n,t3n,1541),sDn(1542,1,y1n,In),uZn.Mb=function(n){return!!uG(n,117).c},zW(n3n,e3n,1542),sDn(1543,1,QZn,On),uZn.Cd=function(n){eE(uG(n,117).c)},zW(n3n,"LabelPlacer/lambda$2$Type",1543),sDn(1540,1,QZn,An),uZn.Cd=function(n){VK(),wv(uG(n,117))},zW(n3n,"NodeLabelAndSizeUtilities/lambda$0$Type",1540),sDn(801,1,QZn,DB),uZn.Cd=function(n){aP(this.b,this.c,this.a,uG(n,187))},uZn.a=!1,uZn.c=!1,zW(n3n,"NodeLabelCellCreator/lambda$0$Type",801),sDn(1539,1,QZn,Ld),uZn.Cd=function(n){Vv(this.a,uG(n,187))},zW(n3n,"PortContextCreator/lambda$0$Type",1539),sDn(1902,1,{},Ln),zW(r3n,"GreedyRectangleStripOverlapRemover",1902),sDn(1903,1,b2n,Nn),uZn.Ne=function(n,t){return Cx(uG(n,226),uG(t,226))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(r3n,"GreedyRectangleStripOverlapRemover/0methodref$compareByYCoordinate$Type",1903),sDn(1849,1,{},pk),uZn.a=5,uZn.e=0,zW(r3n,"RectangleStripOverlapRemover",1849),sDn(1850,1,b2n,$n),uZn.Ne=function(n,t){return Ix(uG(n,226),uG(t,226))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(r3n,"RectangleStripOverlapRemover/0methodref$compareLeftRectangleBorders$Type",1850),sDn(1852,1,b2n,Dn),uZn.Ne=function(n,t){return fW(uG(n,226),uG(t,226))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(r3n,"RectangleStripOverlapRemover/1methodref$compareRightRectangleBorders$Type",1852),sDn(417,22,{3:1,34:1,22:1,417:1},uC);var vht,kht,yht,Mht,Tht,jht=_cn(r3n,"RectangleStripOverlapRemover/OverlapRemovalDirection",417,Oat,B6,vB);sDn(226,1,{226:1},ZX),zW(r3n,"RectangleStripOverlapRemover/RectangleNode",226),sDn(1851,1,QZn,Nd),uZn.Cd=function(n){lTn(this.a,uG(n,226))},zW(r3n,"RectangleStripOverlapRemover/lambda$1$Type",1851),sDn(1323,1,b2n,xn),uZn.Ne=function(n,t){return hzn(uG(n,176),uG(t,176))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(a3n,"PolyominoCompactor/CornerCasesGreaterThanRestComparator",1323),sDn(1326,1,{},Rn),uZn.Kb=function(n){return uG(n,334).a},zW(a3n,"PolyominoCompactor/CornerCasesGreaterThanRestComparator/lambda$0$Type",1326),sDn(1327,1,y1n,Kn),uZn.Mb=function(n){return uG(n,332).a},zW(a3n,"PolyominoCompactor/CornerCasesGreaterThanRestComparator/lambda$1$Type",1327),sDn(1328,1,y1n,Fn),uZn.Mb=function(n){return uG(n,332).a},zW(a3n,"PolyominoCompactor/CornerCasesGreaterThanRestComparator/lambda$2$Type",1328),sDn(1321,1,b2n,_n),uZn.Ne=function(n,t){return JBn(uG(n,176),uG(t,176))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(a3n,"PolyominoCompactor/MinNumOfExtensionDirectionsComparator",1321),sDn(1324,1,{},Bn),uZn.Kb=function(n){return uG(n,334).a},zW(a3n,"PolyominoCompactor/MinNumOfExtensionDirectionsComparator/lambda$0$Type",1324),sDn(781,1,b2n,Hn),uZn.Ne=function(n,t){return lhn(uG(n,176),uG(t,176))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(a3n,"PolyominoCompactor/MinNumOfExtensionsComparator",781),sDn(1319,1,b2n,Un),uZn.Ne=function(n,t){return ron(uG(n,330),uG(t,330))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(a3n,"PolyominoCompactor/MinPerimeterComparator",1319),sDn(1320,1,b2n,Gn),uZn.Ne=function(n,t){return Byn(uG(n,330),uG(t,330))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(a3n,"PolyominoCompactor/MinPerimeterComparatorWithShape",1320),sDn(1322,1,b2n,qn),uZn.Ne=function(n,t){return XHn(uG(n,176),uG(t,176))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(a3n,"PolyominoCompactor/SingleExtensionSideGreaterThanRestComparator",1322),sDn(1325,1,{},Xn),uZn.Kb=function(n){return uG(n,334).a},zW(a3n,"PolyominoCompactor/SingleExtensionSideGreaterThanRestComparator/lambda$0$Type",1325),sDn(782,1,{},sC),uZn.Ve=function(n,t){return d6(this,uG(n,42),uG(t,176))},zW(a3n,"SuccessorCombination",782),sDn(649,1,{},zn),uZn.Ve=function(n,t){var e;return KNn((e=uG(n,42),uG(t,176),e))},zW(a3n,"SuccessorJitter",649),sDn(648,1,{},Vn),uZn.Ve=function(n,t){var e;return cFn((e=uG(n,42),uG(t,176),e))},zW(a3n,"SuccessorLineByLine",648),sDn(573,1,{},Wn),uZn.Ve=function(n,t){var e;return txn((e=uG(n,42),uG(t,176),e))},zW(a3n,"SuccessorManhattan",573),sDn(1344,1,{},Qn),uZn.Ve=function(n,t){var e;return lKn((e=uG(n,42),uG(t,176),e))},zW(a3n,"SuccessorMaxNormWindingInMathPosSense",1344),sDn(409,1,{},$d),uZn.Ve=function(n,t){return HV(this,n,t)},uZn.c=!1,uZn.d=!1,uZn.e=!1,uZn.f=!1,zW(a3n,"SuccessorQuadrantsGeneric",409),sDn(1345,1,{},Jn),uZn.Kb=function(n){return uG(n,334).a},zW(a3n,"SuccessorQuadrantsGeneric/lambda$0$Type",1345),sDn(332,22,{3:1,34:1,22:1,332:1},hC),uZn.a=!1;var Eht,Sht=_cn(f3n,l3n,332,Oat,F6,kB);sDn(1317,1,{}),uZn.Ib=function(){var n,t,e,i,r,c;for(e=" ",n=xwn(0),r=0;r=0?"b"+n+"["+X8(this.a)+"]":"b["+X8(this.a)+"]":"b_"+xx(this)},zW(V3n,"FBendpoint",250),sDn(290,137,{3:1,290:1,96:1,137:1},$F),uZn.Ib=function(){return X8(this)},zW(V3n,"FEdge",290),sDn(235,137,{3:1,235:1,96:1,137:1},d7);var uft,sft,hft,fft,lft,bft,wft,dft,gft,pft,mft=zW(V3n,"FGraph",235);sDn(454,309,{3:1,454:1,309:1,96:1,137:1},A5),uZn.Ib=function(){return null==this.b||0==this.b.length?"l["+X8(this.a)+"]":"l_"+this.b},zW(V3n,"FLabel",454),sDn(153,309,{3:1,153:1,309:1,96:1,137:1},E$),uZn.Ib=function(){return z3(this)},uZn.a=0,zW(V3n,"FNode",153),sDn(2100,1,{}),uZn.vf=function(n){pGn(this,n)},uZn.wf=function(){ITn(this)},uZn.d=0,zW(Q3n,"AbstractForceModel",2100),sDn(641,2100,{641:1},lsn),uZn.uf=function(n,t){var i,r,c,a;return qzn(this.f,n,t),c=YF(D$(t.d),n.d),a=e.Math.sqrt(c.a*c.a+c.b*c.b),r=e.Math.max(0,a-NQ(n.e)/2-NQ(t.e)/2),vD(c,((i=VNn(this.e,n,t))>0?-iW(r,this.c)*i:TR(r,this.b)*uG(oIn(n,(rGn(),$ft)),17).a)/a),c},uZn.vf=function(n){pGn(this,n),this.a=uG(oIn(n,(rGn(),Tft)),17).a,this.c=uM(pK(oIn(n,_ft))),this.b=uM(pK(oIn(n,xft)))},uZn.xf=function(n){return n0&&(a-=aM(r,this.a)*i),vD(c,a*this.b/o),c},uZn.vf=function(n){var t,i,r,c,a,o,u;for(pGn(this,n),this.b=uM(pK(oIn(n,(rGn(),Bft)))),this.c=this.b/uG(oIn(n,Tft),17).a,r=n.e.c.length,a=0,c=0,u=new Ww(n.e);u.a0},uZn.a=0,uZn.b=0,uZn.c=0,zW(Q3n,"FruchtermanReingoldModel",642),sDn(860,1,K2n,Gf),uZn.hf=function(n){Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,J3n),""),"Force Model"),"Determines the model for force calculation."),hft),(lAn(),gNt)),mlt),ggn((Rkn(),hNt))))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,Y3n),""),"Iterations"),"The number of iterations on the force model."),xwn(300)),mNt),dot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,Z3n),""),"Repulsive Power"),"Determines how many bend points are added to the edge; such bend points are regarded as repelling particles in the force model"),xwn(0)),mNt),dot),ggn(oNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,n4n),""),"FR Temperature"),"The temperature is used as a scaling factor for particle displacements."),t4n),dNt),fot),ggn(hNt)))),H4(n,n4n,J3n,dft),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,e4n),""),"Eades Repulsion"),"Factor for repulsive forces in Eades' model."),5),dNt),fot),ggn(hNt)))),H4(n,e4n,J3n,lft),vJn((new qf,n))},zW(i4n,"ForceMetaDataProvider",860),sDn(432,22,{3:1,34:1,22:1,432:1},wC);var vft,kft,yft,Mft,Tft,jft,Eft,Sft,Pft,Cft,Ift,Oft,Aft,Lft,Nft,$ft,Dft,xft,Rft,Kft,Fft,_ft,Bft,Hft,Uft,Gft,qft,Xft,zft,Vft,Wft,Qft,Jft,Yft,Zft,nlt,tlt,elt,ilt,rlt,clt,alt,olt,ult,slt,hlt,flt,llt,blt,wlt,dlt,glt,plt,mlt=_cn(i4n,"ForceModelStrategy",432,Oat,h1,TB);sDn($1n,1,K2n,qf),uZn.hf=function(n){vJn(n)},zW(i4n,"ForceOptions",$1n),sDn(1001,1,{},mt),uZn.sf=function(){return new hk},uZn.tf=function(n){},zW(i4n,"ForceOptions/ForceFactory",1001),sDn(861,1,K2n,Xf),uZn.hf=function(n){Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,I4n),""),"Fixed Position"),"Prevent that the node is moved by the layout algorithm."),(qx(),!1)),(lAn(),wNt)),cot),ggn((Rkn(),sNt))))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,O4n),""),"Desired Edge Length"),"Either specified for parent nodes or for individual edges, where the latter takes higher precedence."),100),dNt),fot),WX(hNt,Uhn(cT(MNt,1),p1n,170,0,[oNt]))))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,A4n),""),"Layout Dimension"),"Dimensions that are permitted to be altered during layout."),Zft),gNt),Clt),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,L4n),""),"Stress Epsilon"),"Termination criterion for the iterative process."),t4n),dNt),fot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,N4n),""),"Iteration Limit"),"Maximum number of performed iterations. Takes higher precedence than 'epsilon'."),xwn(vZn)),mNt),dot),ggn(hNt)))),sWn((new zf,n))},zW(i4n,"StressMetaDataProvider",861),sDn(1004,1,K2n,zf),uZn.hf=function(n){sWn(n)},zW(i4n,"StressOptions",1004),sDn(1005,1,{},gt),uZn.sf=function(){return new DF},uZn.tf=function(n){},zW(i4n,"StressOptions/StressFactory",1005),sDn(1110,205,M3n,DF),uZn.rf=function(n,t){var e,i,r,c;for(t.Ug(D4n,1),oM(gK(zDn(n,(Bjn(),olt))))?oM(gK(zDn(n,blt)))||J1(new Sd((vP(),new Vy(n)))):Zxn(new hk,n,t.eh(1)),i=yfn(n),c=(e=tqn(this.a,i)).Kc();c.Ob();)(r=uG(c.Pb(),235)).e.c.length<=1||(rzn(this.b,r),QDn(this.b),Prn(r.d,new pt));YJn(i=lJn(e)),t.Vg()},zW(R4n,"StressLayoutProvider",1110),sDn(1111,1,QZn,pt),uZn.Cd=function(n){Yqn(uG(n,454))},zW(R4n,"StressLayoutProvider/lambda$0$Type",1111),sDn(1002,1,{},qv),uZn.c=0,uZn.e=0,uZn.g=0,zW(R4n,"StressMajorization",1002),sDn(391,22,{3:1,34:1,22:1,391:1},dC);var vlt,klt,ylt,Mlt,Tlt,jlt,Elt,Slt,Plt,Clt=_cn(R4n,"StressMajorization/Dimension",391,Oat,F2,jB);sDn(1003,1,b2n,Fd),uZn.Ne=function(n,t){return j_(this.a,uG(n,153),uG(t,153))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(R4n,"StressMajorization/lambda$0$Type",1003),sDn(1192,1,{},i4),zW(F4n,"ElkLayered",1192),sDn(1193,1,QZn,_d),uZn.Cd=function(n){OLn(this.a,uG(n,36))},zW(F4n,"ElkLayered/lambda$0$Type",1193),sDn(1194,1,QZn,Bd),uZn.Cd=function(n){E_(this.a,uG(n,36))},zW(F4n,"ElkLayered/lambda$1$Type",1194),sDn(1281,1,{},z$),zW(F4n,"GraphConfigurator",1281),sDn(770,1,QZn,Hd),uZn.Cd=function(n){XIn(this.a,uG(n,10))},zW(F4n,"GraphConfigurator/lambda$0$Type",770),sDn(771,1,{},dt),uZn.Kb=function(n){return FEn(),new fX(null,new h3(uG(n,30).a,16))},zW(F4n,"GraphConfigurator/lambda$1$Type",771),sDn(772,1,QZn,Ud),uZn.Cd=function(n){XIn(this.a,uG(n,10))},zW(F4n,"GraphConfigurator/lambda$2$Type",772),sDn(1109,205,M3n,mk),uZn.rf=function(n,t){var e;e=vXn(new kk,n),xA(zDn(n,(jYn(),rMt)))===xA((Own(),Ixt))?Tgn(this.a,e,t):BDn(this.a,e,t),t.$g()||NQn(new Vf,e)},zW(F4n,"LayeredLayoutProvider",1109),sDn(367,22,{3:1,34:1,22:1,367:1},gC);var Ilt,Olt,Alt,Llt=_cn(F4n,"LayeredPhases",367,Oat,u9,EB);sDn(1717,1,{},$an),uZn.i=0,zW(_4n,"ComponentsToCGraphTransformer",1717),sDn(1718,1,{},wt),uZn.yf=function(n,t){return e.Math.min(null!=n.a?uM(n.a):n.c.i,null!=t.a?uM(t.a):t.c.i)},uZn.zf=function(n,t){return e.Math.min(null!=n.a?uM(n.a):n.c.i,null!=t.a?uM(t.a):t.c.i)},zW(_4n,"ComponentsToCGraphTransformer/1",1718),sDn(86,1,{86:1}),uZn.i=0,uZn.k=!0,uZn.o=T0n;var Nlt,$lt,Dlt,xlt=zW(B4n,"CNode",86);sDn(470,86,{470:1,86:1},Jx,Yvn),uZn.Ib=function(){return""},zW(_4n,"ComponentsToCGraphTransformer/CRectNode",470),sDn(1688,1,{},vt),zW(_4n,"OneDimensionalComponentsCompaction",1688),sDn(1689,1,{},kt),uZn.Kb=function(n){return w2(uG(n,42))},uZn.Fb=function(n){return this===n},zW(_4n,"OneDimensionalComponentsCompaction/lambda$0$Type",1689),sDn(1690,1,{},yt),uZn.Kb=function(n){return xgn(uG(n,42))},uZn.Fb=function(n){return this===n},zW(_4n,"OneDimensionalComponentsCompaction/lambda$1$Type",1690),sDn(1720,1,{},wQ),zW(B4n,"CGraph",1720),sDn(194,1,{194:1},Zvn),uZn.b=0,uZn.c=0,uZn.e=0,uZn.g=!0,uZn.i=T0n,zW(B4n,"CGroup",194),sDn(1719,1,{},Mt),uZn.yf=function(n,t){return e.Math.max(null!=n.a?uM(n.a):n.c.i,null!=t.a?uM(t.a):t.c.i)},uZn.zf=function(n,t){return e.Math.max(null!=n.a?uM(n.a):n.c.i,null!=t.a?uM(t.a):t.c.i)},zW(B4n,m2n,1719),sDn(1721,1,{},i$n),uZn.d=!1;var Rlt=zW(B4n,T2n,1721);sDn(1722,1,{},Tt),uZn.Kb=function(n){return GS(),qx(),0!=uG(uG(n,42).a,86).d.e},uZn.Fb=function(n){return this===n},zW(B4n,j2n,1722),sDn(833,1,{},cX),uZn.a=!1,uZn.b=!1,uZn.c=!1,uZn.d=!1,zW(B4n,E2n,833),sDn(1898,1,{},nz),zW(H4n,S2n,1898);var Klt=Iq(U4n,d2n);sDn(1899,1,{382:1},FZ),uZn.bf=function(n){DFn(this,uG(n,476))},zW(H4n,P2n,1899),sDn(V1n,1,b2n,jt),uZn.Ne=function(n,t){return rY(uG(n,86),uG(t,86))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(H4n,C2n,V1n),sDn(476,1,{476:1},KC),uZn.a=!1,zW(H4n,I2n,476),sDn(1901,1,b2n,Et),uZn.Ne=function(n,t){return KEn(uG(n,476),uG(t,476))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(H4n,O2n,1901),sDn(148,1,{148:1},FC,wG),uZn.Fb=function(n){var t;return null!=n&&Ult==Tbn(n)&&(t=uG(n,148),OJ(this.c,t.c)&&OJ(this.d,t.d))},uZn.Hb=function(){return Obn(Uhn(cT(dat,1),EZn,1,5,[this.c,this.d]))},uZn.Ib=function(){return"("+this.c+TZn+this.d+(this.a?"cx":"")+this.b+")"},uZn.a=!0,uZn.c=0,uZn.d=0;var Flt,_lt,Blt,Hlt,Ult=zW(U4n,"Point",148);sDn(416,22,{3:1,34:1,22:1,416:1},jC);var Glt,qlt,Xlt,zlt,Vlt,Wlt,Qlt,Jlt,Ylt,Zlt,nbt,tbt,ebt=_cn(U4n,"Point/Quadrant",416,Oat,H6,SB);sDn(1708,1,{},dk),uZn.b=null,uZn.c=null,uZn.d=null,uZn.e=null,uZn.f=null,zW(U4n,"RectilinearConvexHull",1708),sDn(583,1,{382:1},cyn),uZn.bf=function(n){Itn(this,uG(n,148))},uZn.b=0,zW(U4n,"RectilinearConvexHull/MaximalElementsEventHandler",583),sDn(1710,1,b2n,St),uZn.Ne=function(n,t){return cY(pK(n),pK(t))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(U4n,"RectilinearConvexHull/MaximalElementsEventHandler/lambda$0$Type",1710),sDn(1709,1,{382:1},Jin),uZn.bf=function(n){pKn(this,uG(n,148))},uZn.a=0,uZn.b=null,uZn.c=null,uZn.d=null,uZn.e=null,zW(U4n,"RectilinearConvexHull/RectangleEventHandler",1709),sDn(1711,1,b2n,Pt),uZn.Ne=function(n,t){return H3(uG(n,148),uG(t,148))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(U4n,"RectilinearConvexHull/lambda$0$Type",1711),sDn(1712,1,b2n,At),uZn.Ne=function(n,t){return U3(uG(n,148),uG(t,148))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(U4n,"RectilinearConvexHull/lambda$1$Type",1712),sDn(1713,1,b2n,Lt),uZn.Ne=function(n,t){return B3(uG(n,148),uG(t,148))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(U4n,"RectilinearConvexHull/lambda$2$Type",1713),sDn(1714,1,b2n,Ot),uZn.Ne=function(n,t){return G3(uG(n,148),uG(t,148))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(U4n,"RectilinearConvexHull/lambda$3$Type",1714),sDn(1715,1,b2n,Nt),uZn.Ne=function(n,t){return sIn(uG(n,148),uG(t,148))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(U4n,"RectilinearConvexHull/lambda$4$Type",1715),sDn(1716,1,{},X0),zW(U4n,"Scanline",1716),sDn(2104,1,{}),zW(G4n,"AbstractGraphPlacer",2104),sDn(335,1,{335:1},DR),uZn.Ff=function(n){return!!this.Gf(n)&&(UNn(this.b,uG(oIn(n,(GYn(),xpt)),21),n),!0)},uZn.Gf=function(n){var t,e,i;for(t=uG(oIn(n,(GYn(),xpt)),21),i=uG(Y9(Jlt,t),21).Kc();i.Ob();)if(e=uG(i.Pb(),21),!uG(Y9(this.b,e),15).dc())return!1;return!0},zW(G4n,"ComponentGroup",335),sDn(779,2104,{},gk),uZn.Hf=function(n){var t;for(t=new Ww(this.a);t.ai&&(f=0,l+=u+r,u=0),tHn(a,f+(s=a.c).a,l+s.b),dL(s),c=e.Math.max(c,f+h.a),u=e.Math.max(u,h.b),f+=h.a+r;t.f.a=c,t.f.b=l+u},uZn.Jf=function(n,t){var e,i,r,c,a;if(xA(oIn(t,(jYn(),kyt)))===xA((Uvn(),tbt))){for(i=n.Kc();i.Ob();){for(a=0,c=new Ww((e=uG(i.Pb(),36)).a);c.ai&&!uG(oIn(a,(GYn(),xpt)),21).Hc((KQn(),yRt))||s&&uG(oIn(s,(GYn(),xpt)),21).Hc((KQn(),kRt))||uG(oIn(a,(GYn(),xpt)),21).Hc((KQn(),_Rt)))&&(b=l,w+=u+r,u=0),h=a.c,uG(oIn(a,(GYn(),xpt)),21).Hc((KQn(),yRt))&&(b=c+r),tHn(a,b+h.a,w+h.b),c=e.Math.max(c,b+f.a),uG(oIn(a,xpt),21).Hc(KRt)&&(l=e.Math.max(l,b+f.a+r)),dL(h),u=e.Math.max(u,f.b),b+=f.a+r,s=a;t.f.a=c,t.f.b=w+u},uZn.Jf=function(n,t){},zW(G4n,"ModelOrderRowGraphPlacer",1313),sDn(1311,1,b2n,xt),uZn.Ne=function(n,t){return Wsn(uG(n,36),uG(t,36))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(G4n,"SimpleRowGraphPlacer/1",1311),sDn(1280,1,A2n,Rt),uZn.Lb=function(n){var t;return!!(t=uG(oIn(uG(n,249).b,(jYn(),bMt)),75))&&0!=t.b},uZn.Fb=function(n){return this===n},uZn.Mb=function(n){var t;return!!(t=uG(oIn(uG(n,249).b,(jYn(),bMt)),75))&&0!=t.b},zW(W4n,"CompoundGraphPostprocessor/1",1280),sDn(1279,1,Q4n,yk),uZn.Kf=function(n,t){zyn(this,uG(n,36),t)},zW(W4n,"CompoundGraphPreprocessor",1279),sDn(453,1,{453:1},Sdn),uZn.c=!1,zW(W4n,"CompoundGraphPreprocessor/ExternalPort",453),sDn(249,1,{249:1},$B),uZn.Ib=function(){return MR(this.c)+":"+MNn(this.b)},zW(W4n,"CrossHierarchyEdge",249),sDn(777,1,b2n,Gd),uZn.Ne=function(n,t){return Njn(this,uG(n,249),uG(t,249))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(W4n,"CrossHierarchyEdgeComparator",777),sDn(305,137,{3:1,305:1,96:1,137:1}),uZn.p=0,zW(J4n,"LGraphElement",305),sDn(18,305,{3:1,18:1,305:1,96:1,137:1},UZ),uZn.Ib=function(){return MNn(this)};var obt=zW(J4n,"LEdge",18);sDn(36,305,{3:1,20:1,36:1,305:1,96:1,137:1},Dan),uZn.Jc=function(n){z8(this,n)},uZn.Kc=function(){return new Ww(this.b)},uZn.Ib=function(){return 0==this.b.c.length?"G-unlayered"+vIn(this.a):0==this.a.c.length?"G-layered"+vIn(this.b):"G[layerless"+vIn(this.a)+", layers"+vIn(this.b)+"]"};var ubt,sbt=zW(J4n,"LGraph",36);sDn(666,1,{}),uZn.Lf=function(){return this.e.n},uZn.of=function(n){return oIn(this.e,n)},uZn.Mf=function(){return this.e.o},uZn.Nf=function(){return this.e.p},uZn.pf=function(n){return vR(this.e,n)},uZn.Of=function(n){this.e.n.a=n.a,this.e.n.b=n.b},uZn.Pf=function(n){this.e.o.a=n.a,this.e.o.b=n.b},uZn.Qf=function(n){this.e.p=n},zW(J4n,"LGraphAdapters/AbstractLShapeAdapter",666),sDn(474,1,{853:1},qd),uZn.Rf=function(){var n,t;if(!this.b)for(this.b=iR(this.a.b.c.length),t=new Ww(this.a.b);t.a0&&Hbn((s3(t-1,n.length),n.charCodeAt(t-1)),c6n);)--t;if(r> ",n),njn(e)),JA(QA((n.a+="[",n),e.i),"]")),n.a},uZn.c=!0,uZn.d=!1;var Pbt,Cbt,Ibt,Obt,Abt=zW(J4n,"LPort",12);sDn(408,1,t1n,zd),uZn.Jc=function(n){z8(this,n)},uZn.Kc=function(){return new Vd(new Ww(this.a.e))},zW(J4n,"LPort/1",408),sDn(1309,1,$Zn,Vd),uZn.Nb=function(n){SV(this,n)},uZn.Pb=function(){return uG(N3(this.a),18).c},uZn.Ob=function(){return l$(this.a)},uZn.Qb=function(){tW(this.a)},zW(J4n,"LPort/1/1",1309),sDn(369,1,t1n,Wd),uZn.Jc=function(n){z8(this,n)},uZn.Kc=function(){return new Qd(new Ww(this.a.g))},zW(J4n,"LPort/2",369),sDn(776,1,$Zn,Qd),uZn.Nb=function(n){SV(this,n)},uZn.Pb=function(){return uG(N3(this.a),18).d},uZn.Ob=function(){return l$(this.a)},uZn.Qb=function(){tW(this.a)},zW(J4n,"LPort/2/1",776),sDn(1302,1,t1n,LC),uZn.Jc=function(n){z8(this,n)},uZn.Kc=function(){return new w7(this)},zW(J4n,"LPort/CombineIter",1302),sDn(208,1,$Zn,w7),uZn.Nb=function(n){SV(this,n)},uZn.Qb=function(){xj()},uZn.Ob=function(){return Dx(this)},uZn.Pb=function(){return l$(this.a)?N3(this.a):N3(this.b)},zW(J4n,"LPort/CombineIter/1",208),sDn(1303,1,A2n,Bt),uZn.Lb=function(n){return Yz(n)},uZn.Fb=function(n){return this===n},uZn.Mb=function(n){return Lun(),0!=uG(n,12).g.c.length},zW(J4n,"LPort/lambda$0$Type",1303),sDn(1304,1,A2n,Ht),uZn.Lb=function(n){return Zz(n)},uZn.Fb=function(n){return this===n},uZn.Mb=function(n){return Lun(),0!=uG(n,12).e.c.length},zW(J4n,"LPort/lambda$1$Type",1304),sDn(1305,1,A2n,Ut),uZn.Lb=function(n){return Lun(),uG(n,12).j==(KQn(),yRt)},uZn.Fb=function(n){return this===n},uZn.Mb=function(n){return Lun(),uG(n,12).j==(KQn(),yRt)},zW(J4n,"LPort/lambda$2$Type",1305),sDn(1306,1,A2n,Gt),uZn.Lb=function(n){return Lun(),uG(n,12).j==(KQn(),kRt)},uZn.Fb=function(n){return this===n},uZn.Mb=function(n){return Lun(),uG(n,12).j==(KQn(),kRt)},zW(J4n,"LPort/lambda$3$Type",1306),sDn(1307,1,A2n,qt),uZn.Lb=function(n){return Lun(),uG(n,12).j==(KQn(),KRt)},uZn.Fb=function(n){return this===n},uZn.Mb=function(n){return Lun(),uG(n,12).j==(KQn(),KRt)},zW(J4n,"LPort/lambda$4$Type",1307),sDn(1308,1,A2n,Xt),uZn.Lb=function(n){return Lun(),uG(n,12).j==(KQn(),_Rt)},uZn.Fb=function(n){return this===n},uZn.Mb=function(n){return Lun(),uG(n,12).j==(KQn(),_Rt)},zW(J4n,"LPort/lambda$5$Type",1308),sDn(30,305,{3:1,20:1,305:1,30:1,96:1,137:1},bQ),uZn.Jc=function(n){z8(this,n)},uZn.Kc=function(){return new Ww(this.a)},uZn.Ib=function(){return"L_"+Ten(this.b.b,this,0)+vIn(this.a)},zW(J4n,"Layer",30),sDn(1330,1,{},kk),zW(h6n,f6n,1330),sDn(1334,1,{},zt),uZn.Kb=function(n){return lCn(uG(n,84))},zW(h6n,"ElkGraphImporter/0methodref$connectableShapeToNode$Type",1334),sDn(1337,1,{},Vt),uZn.Kb=function(n){return lCn(uG(n,84))},zW(h6n,"ElkGraphImporter/1methodref$connectableShapeToNode$Type",1337),sDn(1331,1,QZn,Jd),uZn.Cd=function(n){y$n(this.a,uG(n,123))},zW(h6n,z3n,1331),sDn(1332,1,QZn,Yd),uZn.Cd=function(n){y$n(this.a,uG(n,123))},zW(h6n,l6n,1332),sDn(1333,1,{},Wt),uZn.Kb=function(n){return new fX(null,new h3(KJ(uG(n,74)),16))},zW(h6n,b6n,1333),sDn(1335,1,y1n,Zd),uZn.Mb=function(n){return DN(this.a,uG(n,27))},zW(h6n,w6n,1335),sDn(1336,1,{},Qt),uZn.Kb=function(n){return new fX(null,new h3(FJ(uG(n,74)),16))},zW(h6n,"ElkGraphImporter/lambda$5$Type",1336),sDn(1338,1,y1n,ng),uZn.Mb=function(n){return xN(this.a,uG(n,27))},zW(h6n,"ElkGraphImporter/lambda$7$Type",1338),sDn(1339,1,y1n,Jt),uZn.Mb=function(n){return XY(uG(n,74))},zW(h6n,"ElkGraphImporter/lambda$8$Type",1339),sDn(1297,1,{},Vf),zW(h6n,"ElkGraphLayoutTransferrer",1297),sDn(1298,1,y1n,tg),uZn.Mb=function(n){return IF(this.a,uG(n,18))},zW(h6n,"ElkGraphLayoutTransferrer/lambda$0$Type",1298),sDn(1299,1,QZn,eg),uZn.Cd=function(n){WS(),kD(this.a,uG(n,18))},zW(h6n,"ElkGraphLayoutTransferrer/lambda$1$Type",1299),sDn(1300,1,y1n,ig),uZn.Mb=function(n){return KK(this.a,uG(n,18))},zW(h6n,"ElkGraphLayoutTransferrer/lambda$2$Type",1300),sDn(1301,1,QZn,rg),uZn.Cd=function(n){WS(),kD(this.a,uG(n,18))},zW(h6n,"ElkGraphLayoutTransferrer/lambda$3$Type",1301),sDn(819,1,{},xF),zW(d6n,"BiLinkedHashMultiMap",819),sDn(1550,1,Q4n,Yt),uZn.Kf=function(n,t){Bon(uG(n,36),t)},zW(d6n,"CommentNodeMarginCalculator",1550),sDn(1551,1,{},Zt),uZn.Kb=function(n){return new fX(null,new h3(uG(n,30).a,16))},zW(d6n,"CommentNodeMarginCalculator/lambda$0$Type",1551),sDn(1552,1,QZn,ne),uZn.Cd=function(n){bXn(uG(n,10))},zW(d6n,"CommentNodeMarginCalculator/lambda$1$Type",1552),sDn(1553,1,Q4n,te),uZn.Kf=function(n,t){WFn(uG(n,36),t)},zW(d6n,"CommentPostprocessor",1553),sDn(1554,1,Q4n,ee),uZn.Kf=function(n,t){kQn(uG(n,36),t)},zW(d6n,"CommentPreprocessor",1554),sDn(1555,1,Q4n,ie),uZn.Kf=function(n,t){KKn(uG(n,36),t)},zW(d6n,"ConstraintsPostprocessor",1555),sDn(1556,1,Q4n,re),uZn.Kf=function(n,t){Csn(uG(n,36),t)},zW(d6n,"EdgeAndLayerConstraintEdgeReverser",1556),sDn(1557,1,Q4n,ce),uZn.Kf=function(n,t){amn(uG(n,36),t)},zW(d6n,"EndLabelPostprocessor",1557),sDn(1558,1,{},ae),uZn.Kb=function(n){return new fX(null,new h3(uG(n,30).a,16))},zW(d6n,"EndLabelPostprocessor/lambda$0$Type",1558),sDn(1559,1,y1n,oe),uZn.Mb=function(n){return q8(uG(n,10))},zW(d6n,"EndLabelPostprocessor/lambda$1$Type",1559),sDn(1560,1,QZn,ue),uZn.Cd=function(n){_En(uG(n,10))},zW(d6n,"EndLabelPostprocessor/lambda$2$Type",1560),sDn(1561,1,Q4n,se),uZn.Kf=function(n,t){AAn(uG(n,36),t)},zW(d6n,"EndLabelPreprocessor",1561),sDn(1562,1,{},he),uZn.Kb=function(n){return new fX(null,new h3(uG(n,30).a,16))},zW(d6n,"EndLabelPreprocessor/lambda$0$Type",1562),sDn(1563,1,QZn,NB),uZn.Cd=function(n){oP(this.a,this.b,this.c,uG(n,10))},uZn.a=0,uZn.b=0,uZn.c=!1,zW(d6n,"EndLabelPreprocessor/lambda$1$Type",1563),sDn(1564,1,y1n,fe),uZn.Mb=function(n){return xA(oIn(uG(n,72),(jYn(),Xyt)))===xA((Zrn(),cxt))},zW(d6n,"EndLabelPreprocessor/lambda$2$Type",1564),sDn(1565,1,QZn,cg),uZn.Cd=function(n){aq(this.a,uG(n,72))},zW(d6n,"EndLabelPreprocessor/lambda$3$Type",1565),sDn(1566,1,y1n,le),uZn.Mb=function(n){return xA(oIn(uG(n,72),(jYn(),Xyt)))===xA((Zrn(),rxt))},zW(d6n,"EndLabelPreprocessor/lambda$4$Type",1566),sDn(1567,1,QZn,ag),uZn.Cd=function(n){aq(this.a,uG(n,72))},zW(d6n,"EndLabelPreprocessor/lambda$5$Type",1567),sDn(1615,1,Q4n,_f),uZn.Kf=function(n,t){Ddn(uG(n,36),t)},zW(d6n,"EndLabelSorter",1615),sDn(1616,1,b2n,be),uZn.Ne=function(n,t){return okn(uG(n,466),uG(t,466))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(d6n,"EndLabelSorter/1",1616),sDn(466,1,{466:1},oZ),zW(d6n,"EndLabelSorter/LabelGroup",466),sDn(1617,1,{},we),uZn.Kb=function(n){return VS(),new fX(null,new h3(uG(n,30).a,16))},zW(d6n,"EndLabelSorter/lambda$0$Type",1617),sDn(1618,1,y1n,de),uZn.Mb=function(n){return VS(),uG(n,10).k==(zIn(),dbt)},zW(d6n,"EndLabelSorter/lambda$1$Type",1618),sDn(1619,1,QZn,ge),uZn.Cd=function(n){VIn(uG(n,10))},zW(d6n,"EndLabelSorter/lambda$2$Type",1619),sDn(1620,1,y1n,pe),uZn.Mb=function(n){return VS(),xA(oIn(uG(n,72),(jYn(),Xyt)))===xA((Zrn(),rxt))},zW(d6n,"EndLabelSorter/lambda$3$Type",1620),sDn(1621,1,y1n,me),uZn.Mb=function(n){return VS(),xA(oIn(uG(n,72),(jYn(),Xyt)))===xA((Zrn(),cxt))},zW(d6n,"EndLabelSorter/lambda$4$Type",1621),sDn(1568,1,Q4n,ve),uZn.Kf=function(n,t){GXn(this,uG(n,36))},uZn.b=0,uZn.c=0,zW(d6n,"FinalSplineBendpointsCalculator",1568),sDn(1569,1,{},ke),uZn.Kb=function(n){return new fX(null,new h3(uG(n,30).a,16))},zW(d6n,"FinalSplineBendpointsCalculator/lambda$0$Type",1569),sDn(1570,1,{},ye),uZn.Kb=function(n){return new fX(null,new LW(new Fz(ix(Xgn(uG(n,10)).a.Kc(),new h))))},zW(d6n,"FinalSplineBendpointsCalculator/lambda$1$Type",1570),sDn(1571,1,y1n,Me),uZn.Mb=function(n){return!v9(uG(n,18))},zW(d6n,"FinalSplineBendpointsCalculator/lambda$2$Type",1571),sDn(1572,1,y1n,Te),uZn.Mb=function(n){return vR(uG(n,18),(GYn(),Tmt))},zW(d6n,"FinalSplineBendpointsCalculator/lambda$3$Type",1572),sDn(1573,1,QZn,og),uZn.Cd=function(n){YHn(this.a,uG(n,131))},zW(d6n,"FinalSplineBendpointsCalculator/lambda$4$Type",1573),sDn(1574,1,QZn,je),uZn.Cd=function(n){_An(uG(n,18).a)},zW(d6n,"FinalSplineBendpointsCalculator/lambda$5$Type",1574),sDn(803,1,Q4n,ug),uZn.Kf=function(n,t){fVn(this,uG(n,36),t)},zW(d6n,"GraphTransformer",803),sDn(517,22,{3:1,34:1,22:1,517:1},PC);var Lbt,Nbt,$bt,Dbt=_cn(d6n,"GraphTransformer/Mode",517,Oat,f1,zH);sDn(1575,1,Q4n,Ee),uZn.Kf=function(n,t){wRn(uG(n,36),t)},zW(d6n,"HierarchicalNodeResizingProcessor",1575),sDn(1576,1,Q4n,Se),uZn.Kf=function(n,t){don(uG(n,36),t)},zW(d6n,"HierarchicalPortConstraintProcessor",1576),sDn(1577,1,b2n,Pe),uZn.Ne=function(n,t){return wyn(uG(n,10),uG(t,10))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(d6n,"HierarchicalPortConstraintProcessor/NodeComparator",1577),sDn(1578,1,Q4n,Ce),uZn.Kf=function(n,t){HGn(uG(n,36),t)},zW(d6n,"HierarchicalPortDummySizeProcessor",1578),sDn(1579,1,Q4n,Ie),uZn.Kf=function(n,t){z_n(this,uG(n,36),t)},uZn.a=0,zW(d6n,"HierarchicalPortOrthogonalEdgeRouter",1579),sDn(1580,1,b2n,Oe),uZn.Ne=function(n,t){return Ox(uG(n,10),uG(t,10))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(d6n,"HierarchicalPortOrthogonalEdgeRouter/1",1580),sDn(1581,1,b2n,Ae),uZn.Ne=function(n,t){return Dtn(uG(n,10),uG(t,10))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(d6n,"HierarchicalPortOrthogonalEdgeRouter/2",1581),sDn(1582,1,Q4n,Le),uZn.Kf=function(n,t){tIn(uG(n,36),t)},zW(d6n,"HierarchicalPortPositionProcessor",1582),sDn(1583,1,Q4n,Wf),uZn.Kf=function(n,t){SJn(this,uG(n,36))},uZn.a=0,uZn.c=0,zW(d6n,"HighDegreeNodeLayeringProcessor",1583),sDn(580,1,{580:1},Ne),uZn.b=-1,uZn.d=-1,zW(d6n,"HighDegreeNodeLayeringProcessor/HighDegreeNodeInformation",580),sDn(1584,1,{},$e),uZn.Kb=function(n){return HB(),qgn(uG(n,10))},uZn.Fb=function(n){return this===n},zW(d6n,"HighDegreeNodeLayeringProcessor/lambda$0$Type",1584),sDn(1585,1,{},De),uZn.Kb=function(n){return HB(),Xgn(uG(n,10))},uZn.Fb=function(n){return this===n},zW(d6n,"HighDegreeNodeLayeringProcessor/lambda$1$Type",1585),sDn(1591,1,Q4n,xe),uZn.Kf=function(n,t){TGn(this,uG(n,36),t)},zW(d6n,"HyperedgeDummyMerger",1591),sDn(804,1,{},xB),uZn.a=!1,uZn.b=!1,uZn.c=!1,zW(d6n,"HyperedgeDummyMerger/MergeState",804),sDn(1592,1,{},Re),uZn.Kb=function(n){return new fX(null,new h3(uG(n,30).a,16))},zW(d6n,"HyperedgeDummyMerger/lambda$0$Type",1592),sDn(1593,1,{},Ke),uZn.Kb=function(n){return new fX(null,new h3(uG(n,10).j,16))},zW(d6n,"HyperedgeDummyMerger/lambda$1$Type",1593),sDn(1594,1,QZn,Fe),uZn.Cd=function(n){uG(n,12).p=-1},zW(d6n,"HyperedgeDummyMerger/lambda$2$Type",1594),sDn(1595,1,Q4n,_e),uZn.Kf=function(n,t){kGn(uG(n,36),t)},zW(d6n,"HypernodesProcessor",1595),sDn(1596,1,Q4n,Be),uZn.Kf=function(n,t){_Gn(uG(n,36),t)},zW(d6n,"InLayerConstraintProcessor",1596),sDn(1597,1,Q4n,He),uZn.Kf=function(n,t){Nun(uG(n,36),t)},zW(d6n,"InnermostNodeMarginCalculator",1597),sDn(1598,1,Q4n,Ue),uZn.Kf=function(n,t){gQn(this,uG(n,36))},uZn.a=T0n,uZn.b=T0n,uZn.c=M0n,uZn.d=M0n;var xbt,Rbt,Kbt,Fbt,_bt,Bbt,Hbt,Ubt,Gbt,qbt,Xbt,zbt,Vbt,Wbt,Qbt,Jbt,Ybt,Zbt,nwt,twt,ewt,iwt,rwt,cwt,awt,owt,uwt,swt,hwt,fwt,lwt,bwt,wwt,dwt,gwt,pwt,mwt,vwt,kwt,ywt,Mwt,Twt,jwt,Ewt,Swt,Pwt,Cwt,Iwt,Owt,Awt,Lwt,Nwt,$wt,Dwt,xwt,Rwt,Kwt,Fwt=zW(d6n,"InteractiveExternalPortPositioner",1598);sDn(1599,1,{},Ge),uZn.Kb=function(n){return uG(n,18).d.i},uZn.Fb=function(n){return this===n},zW(d6n,"InteractiveExternalPortPositioner/lambda$0$Type",1599),sDn(1600,1,{},sg),uZn.Kb=function(n){return Lx(this.a,pK(n))},uZn.Fb=function(n){return this===n},zW(d6n,"InteractiveExternalPortPositioner/lambda$1$Type",1600),sDn(1601,1,{},qe),uZn.Kb=function(n){return uG(n,18).c.i},uZn.Fb=function(n){return this===n},zW(d6n,"InteractiveExternalPortPositioner/lambda$2$Type",1601),sDn(1602,1,{},hg),uZn.Kb=function(n){return Nx(this.a,pK(n))},uZn.Fb=function(n){return this===n},zW(d6n,"InteractiveExternalPortPositioner/lambda$3$Type",1602),sDn(1603,1,{},fg),uZn.Kb=function(n){return XF(this.a,pK(n))},uZn.Fb=function(n){return this===n},zW(d6n,"InteractiveExternalPortPositioner/lambda$4$Type",1603),sDn(1604,1,{},lg),uZn.Kb=function(n){return zF(this.a,pK(n))},uZn.Fb=function(n){return this===n},zW(d6n,"InteractiveExternalPortPositioner/lambda$5$Type",1604),sDn(81,22,{3:1,34:1,22:1,81:1,196:1},CC),uZn.dg=function(){switch(this.g){case 15:return new fc;case 22:return new lc;case 47:return new dc;case 28:case 35:return new ei;case 32:return new Yt;case 42:return new te;case 1:return new ee;case 41:return new ie;case 56:return new ug((Aun(),Obt));case 0:return new ug((Aun(),Ibt));case 2:return new re;case 54:return new ce;case 33:return new se;case 51:return new ve;case 55:return new Ee;case 13:return new Se;case 38:return new Ce;case 44:return new Ie;case 40:return new Le;case 9:return new Wf;case 49:return new Ux;case 37:return new xe;case 43:return new _e;case 27:return new Be;case 30:return new He;case 3:return new Ue;case 18:return new ze;case 29:return new Ve;case 5:return new Qf;case 50:return new Xe;case 34:return new Jf;case 36:return new ii;case 52:return new _f;case 11:return new ri;case 7:return new Yf;case 39:return new ci;case 45:return new ai;case 16:return new oi;case 10:return new RI;case 48:return new fi;case 21:return new li;case 23:return new zy((ean(),BEt));case 8:return new wi;case 12:return new gi;case 4:return new pi;case 19:return new rl;case 17:return new Pi;case 53:return new Ci;case 6:return new Bi;case 25:return new jk;case 46:return new $i;case 31:return new _F;case 14:return new Wi;case 26:return new Mc;case 20:return new nr;case 24:return new zy((ean(),HEt));default:throw hv(new vM(v6n+(null!=this.f?this.f:""+this.g)))}};var _wt,Bwt,Hwt,Uwt,Gwt,qwt,Xwt,zwt,Vwt=_cn(d6n,k6n,81,Oat,bKn,XB);sDn(1605,1,Q4n,ze),uZn.Kf=function(n,t){bQn(uG(n,36),t)},zW(d6n,"InvertedPortProcessor",1605),sDn(1606,1,Q4n,Ve),uZn.Kf=function(n,t){DHn(uG(n,36),t)},zW(d6n,"LabelAndNodeSizeProcessor",1606),sDn(1607,1,y1n,We),uZn.Mb=function(n){return uG(n,10).k==(zIn(),dbt)},zW(d6n,"LabelAndNodeSizeProcessor/lambda$0$Type",1607),sDn(1608,1,y1n,Qe),uZn.Mb=function(n){return uG(n,10).k==(zIn(),lbt)},zW(d6n,"LabelAndNodeSizeProcessor/lambda$1$Type",1608),sDn(1609,1,QZn,KB),uZn.Cd=function(n){uP(this.b,this.a,this.c,uG(n,10))},uZn.a=!1,uZn.c=!1,zW(d6n,"LabelAndNodeSizeProcessor/lambda$2$Type",1609),sDn(1610,1,Q4n,Qf),uZn.Kf=function(n,t){EWn(uG(n,36),t)},zW(d6n,"LabelDummyInserter",1610),sDn(1611,1,A2n,Je),uZn.Lb=function(n){return xA(oIn(uG(n,72),(jYn(),Xyt)))===xA((Zrn(),ixt))},uZn.Fb=function(n){return this===n},uZn.Mb=function(n){return xA(oIn(uG(n,72),(jYn(),Xyt)))===xA((Zrn(),ixt))},zW(d6n,"LabelDummyInserter/1",1611),sDn(1612,1,Q4n,Xe),uZn.Kf=function(n,t){eWn(uG(n,36),t)},zW(d6n,"LabelDummyRemover",1612),sDn(1613,1,y1n,Ye),uZn.Mb=function(n){return oM(gK(oIn(uG(n,72),(jYn(),qyt))))},zW(d6n,"LabelDummyRemover/lambda$0$Type",1613),sDn(1378,1,Q4n,Jf),uZn.Kf=function(n,t){UVn(this,uG(n,36),t)},uZn.a=null,zW(d6n,"LabelDummySwitcher",1378),sDn(293,1,{293:1},oHn),uZn.c=0,uZn.d=null,uZn.f=0,zW(d6n,"LabelDummySwitcher/LabelDummyInfo",293),sDn(1379,1,{},Ze),uZn.Kb=function(n){return Pun(),new fX(null,new h3(uG(n,30).a,16))},zW(d6n,"LabelDummySwitcher/lambda$0$Type",1379),sDn(1380,1,y1n,ni),uZn.Mb=function(n){return Pun(),uG(n,10).k==(zIn(),bbt)},zW(d6n,"LabelDummySwitcher/lambda$1$Type",1380),sDn(1381,1,{},bg),uZn.Kb=function(n){return FK(this.a,uG(n,10))},zW(d6n,"LabelDummySwitcher/lambda$2$Type",1381),sDn(1382,1,QZn,wg),uZn.Cd=function(n){gQ(this.a,uG(n,293))},zW(d6n,"LabelDummySwitcher/lambda$3$Type",1382),sDn(1383,1,b2n,ti),uZn.Ne=function(n,t){return nV(uG(n,293),uG(t,293))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(d6n,"LabelDummySwitcher/lambda$4$Type",1383),sDn(802,1,Q4n,ei),uZn.Kf=function(n,t){Dnn(uG(n,36),t)},zW(d6n,"LabelManagementProcessor",802),sDn(1614,1,Q4n,ii),uZn.Kf=function(n,t){jFn(uG(n,36),t)},zW(d6n,"LabelSideSelector",1614),sDn(1622,1,Q4n,ri),uZn.Kf=function(n,t){yqn(uG(n,36),t)},zW(d6n,"LayerConstraintPostprocessor",1622),sDn(1623,1,Q4n,Yf),uZn.Kf=function(n,t){vDn(uG(n,36),t)},zW(d6n,"LayerConstraintPreprocessor",1623),sDn(371,22,{3:1,34:1,22:1,371:1},IC);var Wwt,Qwt,Jwt,Ywt,Zwt,ndt,tdt,edt,idt,rdt,cdt,adt=_cn(d6n,"LayerConstraintPreprocessor/HiddenNodeConnections",371,Oat,G6,zB);sDn(1624,1,Q4n,ci),uZn.Kf=function(n,t){zzn(uG(n,36),t)},zW(d6n,"LayerSizeAndGraphHeightCalculator",1624),sDn(1625,1,Q4n,ai),uZn.Kf=function(n,t){dRn(uG(n,36),t)},zW(d6n,"LongEdgeJoiner",1625),sDn(1626,1,Q4n,oi),uZn.Kf=function(n,t){lzn(uG(n,36),t)},zW(d6n,"LongEdgeSplitter",1626),sDn(1627,1,Q4n,RI),uZn.Kf=function(n,t){VWn(this,uG(n,36),t)},uZn.e=0,uZn.f=0,uZn.j=0,uZn.k=0,uZn.n=0,uZn.o=0,zW(d6n,"NodePromotion",1627),sDn(1628,1,b2n,ui),uZn.Ne=function(n,t){return $ln(uG(n,10),uG(t,10))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(d6n,"NodePromotion/1",1628),sDn(1629,1,b2n,si),uZn.Ne=function(n,t){return Dln(uG(n,10),uG(t,10))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(d6n,"NodePromotion/2",1629),sDn(1630,1,{},hi),uZn.Kb=function(n){return uG(n,42),UB(),qx(),!0},uZn.Fb=function(n){return this===n},zW(d6n,"NodePromotion/lambda$0$Type",1630),sDn(1631,1,{},mg),uZn.Kb=function(n){return P0(this.a,uG(n,42))},uZn.Fb=function(n){return this===n},uZn.a=0,zW(d6n,"NodePromotion/lambda$1$Type",1631),sDn(1632,1,{},vg),uZn.Kb=function(n){return S0(this.a,uG(n,42))},uZn.Fb=function(n){return this===n},uZn.a=0,zW(d6n,"NodePromotion/lambda$2$Type",1632),sDn(1633,1,Q4n,fi),uZn.Kf=function(n,t){wJn(uG(n,36),t)},zW(d6n,"NorthSouthPortPostprocessor",1633),sDn(1634,1,Q4n,li),uZn.Kf=function(n,t){FQn(uG(n,36),t)},zW(d6n,"NorthSouthPortPreprocessor",1634),sDn(1635,1,b2n,bi),uZn.Ne=function(n,t){return Qsn(uG(n,12),uG(t,12))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(d6n,"NorthSouthPortPreprocessor/lambda$0$Type",1635),sDn(1636,1,Q4n,wi),uZn.Kf=function(n,t){HUn(uG(n,36),t)},zW(d6n,"PartitionMidprocessor",1636),sDn(1637,1,y1n,di),uZn.Mb=function(n){return vR(uG(n,10),(jYn(),UMt))},zW(d6n,"PartitionMidprocessor/lambda$0$Type",1637),sDn(1638,1,QZn,kg),uZn.Cd=function(n){zY(this.a,uG(n,10))},zW(d6n,"PartitionMidprocessor/lambda$1$Type",1638),sDn(1639,1,Q4n,gi),uZn.Kf=function(n,t){JRn(uG(n,36),t)},zW(d6n,"PartitionPostprocessor",1639),sDn(1640,1,Q4n,pi),uZn.Kf=function(n,t){M$n(uG(n,36),t)},zW(d6n,"PartitionPreprocessor",1640),sDn(1641,1,y1n,mi),uZn.Mb=function(n){return vR(uG(n,10),(jYn(),UMt))},zW(d6n,"PartitionPreprocessor/lambda$0$Type",1641),sDn(1642,1,{},vi),uZn.Kb=function(n){return new fX(null,new LW(new Fz(ix(Xgn(uG(n,10)).a.Kc(),new h))))},zW(d6n,"PartitionPreprocessor/lambda$1$Type",1642),sDn(1643,1,y1n,ki),uZn.Mb=function(n){return pkn(uG(n,18))},zW(d6n,"PartitionPreprocessor/lambda$2$Type",1643),sDn(1644,1,QZn,yi),uZn.Cd=function(n){rfn(uG(n,18))},zW(d6n,"PartitionPreprocessor/lambda$3$Type",1644),sDn(1645,1,Q4n,rl),uZn.Kf=function(n,t){bUn(uG(n,36),t)},zW(d6n,"PortListSorter",1645),sDn(1648,1,b2n,Mi),uZn.Ne=function(n,t){return Q5(uG(n,12),uG(t,12))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(d6n,"PortListSorter/lambda$0$Type",1648),sDn(1650,1,b2n,Ti),uZn.Ne=function(n,t){return hGn(uG(n,12),uG(t,12))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(d6n,"PortListSorter/lambda$1$Type",1650),sDn(1646,1,{},ji),uZn.Kb=function(n){return Cln(),uG(n,12).e},zW(d6n,"PortListSorter/lambda$2$Type",1646),sDn(1647,1,{},Ei),uZn.Kb=function(n){return Cln(),uG(n,12).g},zW(d6n,"PortListSorter/lambda$3$Type",1647),sDn(1649,1,b2n,Si),uZn.Ne=function(n,t){return bjn(uG(n,12),uG(t,12))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(d6n,"PortListSorter/lambda$4$Type",1649),sDn(1651,1,Q4n,Pi),uZn.Kf=function(n,t){FDn(uG(n,36),t)},zW(d6n,"PortSideProcessor",1651),sDn(1652,1,Q4n,Ci),uZn.Kf=function(n,t){SBn(uG(n,36),t)},zW(d6n,"ReversedEdgeRestorer",1652),sDn(1657,1,Q4n,jk),uZn.Kf=function(n,t){kTn(this,uG(n,36),t)},zW(d6n,"SelfLoopPortRestorer",1657),sDn(1658,1,{},Ii),uZn.Kb=function(n){return new fX(null,new h3(uG(n,30).a,16))},zW(d6n,"SelfLoopPortRestorer/lambda$0$Type",1658),sDn(1659,1,y1n,Oi),uZn.Mb=function(n){return uG(n,10).k==(zIn(),dbt)},zW(d6n,"SelfLoopPortRestorer/lambda$1$Type",1659),sDn(1660,1,y1n,Ai),uZn.Mb=function(n){return vR(uG(n,10),(GYn(),vmt))},zW(d6n,"SelfLoopPortRestorer/lambda$2$Type",1660),sDn(1661,1,{},Li),uZn.Kb=function(n){return uG(oIn(uG(n,10),(GYn(),vmt)),337)},zW(d6n,"SelfLoopPortRestorer/lambda$3$Type",1661),sDn(1662,1,QZn,gg),uZn.Cd=function(n){gOn(this.a,uG(n,337))},zW(d6n,"SelfLoopPortRestorer/lambda$4$Type",1662),sDn(805,1,QZn,Ni),uZn.Cd=function(n){BOn(uG(n,105))},zW(d6n,"SelfLoopPortRestorer/lambda$5$Type",805),sDn(1663,1,Q4n,$i),uZn.Kf=function(n,t){oyn(uG(n,36),t)},zW(d6n,"SelfLoopPostProcessor",1663),sDn(1664,1,{},Di),uZn.Kb=function(n){return new fX(null,new h3(uG(n,30).a,16))},zW(d6n,"SelfLoopPostProcessor/lambda$0$Type",1664),sDn(1665,1,y1n,xi),uZn.Mb=function(n){return uG(n,10).k==(zIn(),dbt)},zW(d6n,"SelfLoopPostProcessor/lambda$1$Type",1665),sDn(1666,1,y1n,Ri),uZn.Mb=function(n){return vR(uG(n,10),(GYn(),vmt))},zW(d6n,"SelfLoopPostProcessor/lambda$2$Type",1666),sDn(1667,1,QZn,Ki),uZn.Cd=function(n){gSn(uG(n,10))},zW(d6n,"SelfLoopPostProcessor/lambda$3$Type",1667),sDn(1668,1,{},Fi),uZn.Kb=function(n){return new fX(null,new h3(uG(n,105).f,1))},zW(d6n,"SelfLoopPostProcessor/lambda$4$Type",1668),sDn(1669,1,QZn,dg),uZn.Cd=function(n){V6(this.a,uG(n,340))},zW(d6n,"SelfLoopPostProcessor/lambda$5$Type",1669),sDn(1670,1,y1n,_i),uZn.Mb=function(n){return!!uG(n,105).i},zW(d6n,"SelfLoopPostProcessor/lambda$6$Type",1670),sDn(1671,1,QZn,pg),uZn.Cd=function(n){eM(this.a,uG(n,105))},zW(d6n,"SelfLoopPostProcessor/lambda$7$Type",1671),sDn(1653,1,Q4n,Bi),uZn.Kf=function(n,t){Fxn(uG(n,36),t)},zW(d6n,"SelfLoopPreProcessor",1653),sDn(1654,1,{},Hi),uZn.Kb=function(n){return new fX(null,new h3(uG(n,105).f,1))},zW(d6n,"SelfLoopPreProcessor/lambda$0$Type",1654),sDn(1655,1,{},Ui),uZn.Kb=function(n){return uG(n,340).a},zW(d6n,"SelfLoopPreProcessor/lambda$1$Type",1655),sDn(1656,1,QZn,Gi),uZn.Cd=function(n){v$(uG(n,18))},zW(d6n,"SelfLoopPreProcessor/lambda$2$Type",1656),sDn(1672,1,Q4n,_F),uZn.Kf=function(n,t){xIn(this,uG(n,36),t)},zW(d6n,"SelfLoopRouter",1672),sDn(1673,1,{},qi),uZn.Kb=function(n){return new fX(null,new h3(uG(n,30).a,16))},zW(d6n,"SelfLoopRouter/lambda$0$Type",1673),sDn(1674,1,y1n,Xi),uZn.Mb=function(n){return uG(n,10).k==(zIn(),dbt)},zW(d6n,"SelfLoopRouter/lambda$1$Type",1674),sDn(1675,1,y1n,zi),uZn.Mb=function(n){return vR(uG(n,10),(GYn(),vmt))},zW(d6n,"SelfLoopRouter/lambda$2$Type",1675),sDn(1676,1,{},Vi),uZn.Kb=function(n){return uG(oIn(uG(n,10),(GYn(),vmt)),337)},zW(d6n,"SelfLoopRouter/lambda$3$Type",1676),sDn(1677,1,QZn,OC),uZn.Cd=function(n){lY(this.a,this.b,uG(n,337))},zW(d6n,"SelfLoopRouter/lambda$4$Type",1677),sDn(1678,1,Q4n,Wi),uZn.Kf=function(n,t){tFn(uG(n,36),t)},zW(d6n,"SemiInteractiveCrossMinProcessor",1678),sDn(1679,1,y1n,Qi),uZn.Mb=function(n){return uG(n,10).k==(zIn(),dbt)},zW(d6n,"SemiInteractiveCrossMinProcessor/lambda$0$Type",1679),sDn(1680,1,y1n,Ji),uZn.Mb=function(n){return MX(uG(n,10))._b((jYn(),rTt))},zW(d6n,"SemiInteractiveCrossMinProcessor/lambda$1$Type",1680),sDn(1681,1,b2n,Yi),uZn.Ne=function(n,t){return Eon(uG(n,10),uG(t,10))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(d6n,"SemiInteractiveCrossMinProcessor/lambda$2$Type",1681),sDn(1682,1,{},Zi),uZn.Ve=function(n,t){return VY(uG(n,10),uG(t,10))},zW(d6n,"SemiInteractiveCrossMinProcessor/lambda$3$Type",1682),sDn(1684,1,Q4n,nr),uZn.Kf=function(n,t){MXn(uG(n,36),t)},zW(d6n,"SortByInputModelProcessor",1684),sDn(1685,1,y1n,tr),uZn.Mb=function(n){return 0!=uG(n,12).g.c.length},zW(d6n,"SortByInputModelProcessor/lambda$0$Type",1685),sDn(1686,1,QZn,yg),uZn.Cd=function(n){ZOn(this.a,uG(n,12))},zW(d6n,"SortByInputModelProcessor/lambda$1$Type",1686),sDn(1759,817,{},Kon),uZn.df=function(n){var t,e,i,r;switch(this.c=n,this.a.g){case 2:t=new Zm,kS(JJ(new fX(null,new h3(this.c.a.b,16)),new dr),new BC(this,t)),QAn(this,new ir),Prn(t,new rr),t.c.length=0,kS(JJ(new fX(null,new h3(this.c.a.b,16)),new cr),new Tg(t)),QAn(this,new ar),Prn(t,new or),t.c.length=0,e=w$(Tun(ZJ(new fX(null,new h3(this.c.a.b,16)),new jg(this))),new ur),kS(new fX(null,new h3(this.c.a.a,16)),new NC(e,t)),QAn(this,new hr),Prn(t,new fr),t.c.length=0;break;case 3:i=new Zm,QAn(this,new er),r=w$(Tun(ZJ(new fX(null,new h3(this.c.a.b,16)),new Mg(this))),new sr),kS(JJ(new fX(null,new h3(this.c.a.b,16)),new lr),new DC(r,i)),QAn(this,new br),Prn(i,new wr),i.c.length=0;break;default:throw hv(new Hv)}},uZn.b=0,zW(E6n,"EdgeAwareScanlineConstraintCalculation",1759),sDn(1760,1,A2n,er),uZn.Lb=function(n){return F$(uG(n,60).g,154)},uZn.Fb=function(n){return this===n},uZn.Mb=function(n){return F$(uG(n,60).g,154)},zW(E6n,"EdgeAwareScanlineConstraintCalculation/lambda$0$Type",1760),sDn(1761,1,{},Mg),uZn.Ye=function(n){return $Ln(this.a,uG(n,60))},zW(E6n,"EdgeAwareScanlineConstraintCalculation/lambda$1$Type",1761),sDn(1769,1,M1n,AC),uZn.de=function(){TEn(this.a,this.b,-1)},uZn.b=0,zW(E6n,"EdgeAwareScanlineConstraintCalculation/lambda$10$Type",1769),sDn(1771,1,A2n,ir),uZn.Lb=function(n){return F$(uG(n,60).g,154)},uZn.Fb=function(n){return this===n},uZn.Mb=function(n){return F$(uG(n,60).g,154)},zW(E6n,"EdgeAwareScanlineConstraintCalculation/lambda$11$Type",1771),sDn(1772,1,QZn,rr),uZn.Cd=function(n){uG(n,380).de()},zW(E6n,"EdgeAwareScanlineConstraintCalculation/lambda$12$Type",1772),sDn(1773,1,y1n,cr),uZn.Mb=function(n){return F$(uG(n,60).g,10)},zW(E6n,"EdgeAwareScanlineConstraintCalculation/lambda$13$Type",1773),sDn(1775,1,QZn,Tg),uZn.Cd=function(n){tpn(this.a,uG(n,60))},zW(E6n,"EdgeAwareScanlineConstraintCalculation/lambda$14$Type",1775),sDn(1774,1,M1n,xC),uZn.de=function(){TEn(this.b,this.a,-1)},uZn.a=0,zW(E6n,"EdgeAwareScanlineConstraintCalculation/lambda$15$Type",1774),sDn(1776,1,A2n,ar),uZn.Lb=function(n){return F$(uG(n,60).g,10)},uZn.Fb=function(n){return this===n},uZn.Mb=function(n){return F$(uG(n,60).g,10)},zW(E6n,"EdgeAwareScanlineConstraintCalculation/lambda$16$Type",1776),sDn(1777,1,QZn,or),uZn.Cd=function(n){uG(n,380).de()},zW(E6n,"EdgeAwareScanlineConstraintCalculation/lambda$17$Type",1777),sDn(1778,1,{},jg),uZn.Ye=function(n){return DLn(this.a,uG(n,60))},zW(E6n,"EdgeAwareScanlineConstraintCalculation/lambda$18$Type",1778),sDn(1779,1,{},ur),uZn.We=function(){return 0},zW(E6n,"EdgeAwareScanlineConstraintCalculation/lambda$19$Type",1779),sDn(1762,1,{},sr),uZn.We=function(){return 0},zW(E6n,"EdgeAwareScanlineConstraintCalculation/lambda$2$Type",1762),sDn(1781,1,QZn,NC),uZn.Cd=function(n){uz(this.a,this.b,uG(n,316))},uZn.a=0,zW(E6n,"EdgeAwareScanlineConstraintCalculation/lambda$20$Type",1781),sDn(1780,1,M1n,$C),uZn.de=function(){HDn(this.a,this.b,-1)},uZn.b=0,zW(E6n,"EdgeAwareScanlineConstraintCalculation/lambda$21$Type",1780),sDn(1782,1,A2n,hr),uZn.Lb=function(n){return uG(n,60),!0},uZn.Fb=function(n){return this===n},uZn.Mb=function(n){return uG(n,60),!0},zW(E6n,"EdgeAwareScanlineConstraintCalculation/lambda$22$Type",1782),sDn(1783,1,QZn,fr),uZn.Cd=function(n){uG(n,380).de()},zW(E6n,"EdgeAwareScanlineConstraintCalculation/lambda$23$Type",1783),sDn(1763,1,y1n,lr),uZn.Mb=function(n){return F$(uG(n,60).g,10)},zW(E6n,"EdgeAwareScanlineConstraintCalculation/lambda$3$Type",1763),sDn(1765,1,QZn,DC),uZn.Cd=function(n){sz(this.a,this.b,uG(n,60))},uZn.a=0,zW(E6n,"EdgeAwareScanlineConstraintCalculation/lambda$4$Type",1765),sDn(1764,1,M1n,RC),uZn.de=function(){TEn(this.b,this.a,-1)},uZn.a=0,zW(E6n,"EdgeAwareScanlineConstraintCalculation/lambda$5$Type",1764),sDn(1766,1,A2n,br),uZn.Lb=function(n){return uG(n,60),!0},uZn.Fb=function(n){return this===n},uZn.Mb=function(n){return uG(n,60),!0},zW(E6n,"EdgeAwareScanlineConstraintCalculation/lambda$6$Type",1766),sDn(1767,1,QZn,wr),uZn.Cd=function(n){uG(n,380).de()},zW(E6n,"EdgeAwareScanlineConstraintCalculation/lambda$7$Type",1767),sDn(1768,1,y1n,dr),uZn.Mb=function(n){return F$(uG(n,60).g,154)},zW(E6n,"EdgeAwareScanlineConstraintCalculation/lambda$8$Type",1768),sDn(1770,1,QZn,BC),uZn.Cd=function(n){mrn(this.a,this.b,uG(n,60))},zW(E6n,"EdgeAwareScanlineConstraintCalculation/lambda$9$Type",1770),sDn(1586,1,Q4n,Ux),uZn.Kf=function(n,t){yzn(this,uG(n,36),t)},zW(E6n,"HorizontalGraphCompactor",1586),sDn(1587,1,{},Eg),uZn.ff=function(n,t){var e,i;return $en(n,t)?0:(e=z4(n),i=z4(t),e&&e.k==(zIn(),lbt)||i&&i.k==(zIn(),lbt)?0:_x(uG(oIn(this.a.a,(GYn(),kmt)),312),e?e.k:(zIn(),wbt),i?i.k:(zIn(),wbt)))},uZn.gf=function(n,t){var e,i;return $en(n,t)?1:(e=z4(n),i=z4(t),Bx(uG(oIn(this.a.a,(GYn(),kmt)),312),e?e.k:(zIn(),wbt),i?i.k:(zIn(),wbt)))},zW(E6n,"HorizontalGraphCompactor/1",1587),sDn(1588,1,{},gr),uZn.ef=function(n,t){return JS(),0==n.a.i},zW(E6n,"HorizontalGraphCompactor/lambda$0$Type",1588),sDn(1589,1,{},Sg),uZn.ef=function(n,t){return ZY(this.a,n,t)},zW(E6n,"HorizontalGraphCompactor/lambda$1$Type",1589),sDn(1730,1,{},Sen),zW(E6n,"LGraphToCGraphTransformer",1730),sDn(1738,1,y1n,pr),uZn.Mb=function(n){return null!=n},zW(E6n,"LGraphToCGraphTransformer/0methodref$nonNull$Type",1738),sDn(1731,1,{},mr),uZn.Kb=function(n){return GB(),cpn(oIn(uG(uG(n,60).g,10),(GYn(),rmt)))},zW(E6n,"LGraphToCGraphTransformer/lambda$0$Type",1731),sDn(1732,1,{},vr),uZn.Kb=function(n){return GB(),_wn(uG(uG(n,60).g,154))},zW(E6n,"LGraphToCGraphTransformer/lambda$1$Type",1732),sDn(1741,1,y1n,kr),uZn.Mb=function(n){return GB(),F$(uG(n,60).g,10)},zW(E6n,"LGraphToCGraphTransformer/lambda$10$Type",1741),sDn(1742,1,QZn,yr),uZn.Cd=function(n){jZ(uG(n,60))},zW(E6n,"LGraphToCGraphTransformer/lambda$11$Type",1742),sDn(1743,1,y1n,Mr),uZn.Mb=function(n){return GB(),F$(uG(n,60).g,154)},zW(E6n,"LGraphToCGraphTransformer/lambda$12$Type",1743),sDn(1747,1,QZn,Tr),uZn.Cd=function(n){Fwn(uG(n,60))},zW(E6n,"LGraphToCGraphTransformer/lambda$13$Type",1747),sDn(1744,1,QZn,Pg),uZn.Cd=function(n){WL(this.a,uG(n,8))},uZn.a=0,zW(E6n,"LGraphToCGraphTransformer/lambda$14$Type",1744),sDn(1745,1,QZn,Cg),uZn.Cd=function(n){JL(this.a,uG(n,116))},uZn.a=0,zW(E6n,"LGraphToCGraphTransformer/lambda$15$Type",1745),sDn(1746,1,QZn,Ig),uZn.Cd=function(n){QL(this.a,uG(n,8))},uZn.a=0,zW(E6n,"LGraphToCGraphTransformer/lambda$16$Type",1746),sDn(1748,1,{},jr),uZn.Kb=function(n){return GB(),new fX(null,new LW(new Fz(ix(Xgn(uG(n,10)).a.Kc(),new h))))},zW(E6n,"LGraphToCGraphTransformer/lambda$17$Type",1748),sDn(1749,1,y1n,Er),uZn.Mb=function(n){return GB(),v9(uG(n,18))},zW(E6n,"LGraphToCGraphTransformer/lambda$18$Type",1749),sDn(1750,1,QZn,Og),uZn.Cd=function(n){fin(this.a,uG(n,18))},zW(E6n,"LGraphToCGraphTransformer/lambda$19$Type",1750),sDn(1734,1,QZn,Ag),uZn.Cd=function(n){Q3(this.a,uG(n,154))},zW(E6n,"LGraphToCGraphTransformer/lambda$2$Type",1734),sDn(1751,1,{},Sr),uZn.Kb=function(n){return GB(),new fX(null,new h3(uG(n,30).a,16))},zW(E6n,"LGraphToCGraphTransformer/lambda$20$Type",1751),sDn(1752,1,{},Pr),uZn.Kb=function(n){return GB(),new fX(null,new LW(new Fz(ix(Xgn(uG(n,10)).a.Kc(),new h))))},zW(E6n,"LGraphToCGraphTransformer/lambda$21$Type",1752),sDn(1753,1,{},Cr),uZn.Kb=function(n){return GB(),uG(oIn(uG(n,18),(GYn(),Tmt)),15)},zW(E6n,"LGraphToCGraphTransformer/lambda$22$Type",1753),sDn(1754,1,y1n,Ir),uZn.Mb=function(n){return Hx(uG(n,15))},zW(E6n,"LGraphToCGraphTransformer/lambda$23$Type",1754),sDn(1755,1,QZn,Lg),uZn.Cd=function(n){pLn(this.a,uG(n,15))},zW(E6n,"LGraphToCGraphTransformer/lambda$24$Type",1755),sDn(1733,1,QZn,HC),uZn.Cd=function(n){P5(this.a,this.b,uG(n,154))},zW(E6n,"LGraphToCGraphTransformer/lambda$3$Type",1733),sDn(1735,1,{},Or),uZn.Kb=function(n){return GB(),new fX(null,new h3(uG(n,30).a,16))},zW(E6n,"LGraphToCGraphTransformer/lambda$4$Type",1735),sDn(1736,1,{},Ar),uZn.Kb=function(n){return GB(),new fX(null,new LW(new Fz(ix(Xgn(uG(n,10)).a.Kc(),new h))))},zW(E6n,"LGraphToCGraphTransformer/lambda$5$Type",1736),sDn(1737,1,{},Lr),uZn.Kb=function(n){return GB(),uG(oIn(uG(n,18),(GYn(),Tmt)),15)},zW(E6n,"LGraphToCGraphTransformer/lambda$6$Type",1737),sDn(1739,1,QZn,Ng),uZn.Cd=function(n){xLn(this.a,uG(n,15))},zW(E6n,"LGraphToCGraphTransformer/lambda$8$Type",1739),sDn(1740,1,QZn,UC),uZn.Cd=function(n){k$(this.a,this.b,uG(n,154))},zW(E6n,"LGraphToCGraphTransformer/lambda$9$Type",1740),sDn(1729,1,{},Nr),uZn.cf=function(n){var t,e,i,r,c;for(this.a=n,this.d=new ak,this.c=Inn(Tst,EZn,125,this.a.a.a.c.length,0,1),this.b=0,e=new Ww(this.a.a.a);e.a=g&&(kD(a,xwn(f)),v=e.Math.max(v,k[f-1]-l),u+=d,p+=k[f-1]-p,l=k[f-1],d=s[f]),d=e.Math.max(d,s[f]),++f;u+=d}(w=e.Math.min(1/v,1/t.b/u))>r&&(r=w,i=a)}return i},uZn.pg=function(){return!1},zW(N6n,"MSDCutIndexHeuristic",816),sDn(1683,1,Q4n,Mc),uZn.Kf=function(n,t){Cqn(uG(n,36),t)},zW(N6n,"SingleEdgeGraphWrapper",1683),sDn(232,22,{3:1,34:1,22:1,232:1},QC);var zdt,Vdt,Wdt,Qdt=_cn($6n,"CenterEdgeLabelPlacementStrategy",232,Oat,znn,JB);sDn(431,22,{3:1,34:1,22:1,431:1},WC);var Jdt,Ydt,Zdt,ngt,tgt=_cn($6n,"ConstraintCalculationStrategy",431,Oat,w1,YB);sDn(322,22,{3:1,34:1,22:1,322:1,188:1,196:1},JC),uZn.dg=function(){return ZLn(this)},uZn.qg=function(){return ZLn(this)};var egt,igt,rgt,cgt,agt=_cn($6n,"CrossingMinimizationStrategy",322,Oat,B2,ZB);sDn(351,22,{3:1,34:1,22:1,351:1},YC);var ogt,ugt,sgt,hgt,fgt,lgt,bgt=_cn($6n,"CuttingStrategy",351,Oat,H2,nH);sDn(348,22,{3:1,34:1,22:1,348:1,188:1,196:1},ZC),uZn.dg=function(){return ODn(this)},uZn.qg=function(){return ODn(this)};var wgt,dgt,ggt,pgt=_cn($6n,"CycleBreakingStrategy",348,Oat,h9,tH);sDn(428,22,{3:1,34:1,22:1,428:1},nI);var mgt,vgt,kgt,ygt,Mgt=_cn($6n,"DirectionCongruency",428,Oat,b1,eH);sDn(460,22,{3:1,34:1,22:1,460:1},tI);var Tgt,jgt,Egt,Sgt,Pgt,Cgt,Igt,Ogt=_cn($6n,"EdgeConstraint",460,Oat,U2,sH);sDn(283,22,{3:1,34:1,22:1,283:1},eI);var Agt,Lgt,Ngt,$gt=_cn($6n,"EdgeLabelSideSelection",283,Oat,Gnn,hH);sDn(488,22,{3:1,34:1,22:1,488:1},iI);var Dgt,xgt,Rgt,Kgt,Fgt,_gt,Bgt,Hgt=_cn($6n,"EdgeStraighteningStrategy",488,Oat,y1,fH);sDn(281,22,{3:1,34:1,22:1,281:1},rI);var Ugt,Ggt,qgt,Xgt,zgt,Vgt,Wgt,Qgt=_cn($6n,"FixedAlignment",281,Oat,qnn,uH);sDn(282,22,{3:1,34:1,22:1,282:1},cI);var Jgt,Ygt,Zgt,npt,tpt,ept,ipt,rpt,cpt,apt,opt,upt=_cn($6n,"GraphCompactionStrategy",282,Oat,Xnn,iH);sDn(259,22,{3:1,34:1,22:1,259:1},aI);var spt,hpt,fpt,lpt,bpt=_cn($6n,"GraphProperties",259,Oat,oun,rH);sDn(299,22,{3:1,34:1,22:1,299:1},oI);var wpt,dpt,gpt,ppt,mpt=_cn($6n,"GreedySwitchType",299,Oat,G2,cH);sDn(311,22,{3:1,34:1,22:1,311:1},uI);var vpt,kpt,ypt,Mpt=_cn($6n,"InLayerConstraint",311,Oat,q2,aH);sDn(429,22,{3:1,34:1,22:1,429:1},sI);var Tpt,jpt,Ept,Spt,Ppt,Cpt,Ipt,Opt,Apt,Lpt,Npt,$pt,Dpt,xpt,Rpt,Kpt,Fpt,_pt,Bpt,Hpt,Upt,Gpt,qpt,Xpt,zpt,Vpt,Wpt,Qpt,Jpt,Ypt,Zpt,nmt,tmt,emt,imt,rmt,cmt,amt,omt,umt,smt,hmt,fmt,lmt,bmt,wmt,dmt,gmt,pmt,mmt,vmt,kmt,ymt,Mmt,Tmt,jmt,Emt,Smt,Pmt,Cmt,Imt,Omt,Amt,Lmt,Nmt=_cn($6n,"InteractiveReferencePoint",429,Oat,l1,oH);sDn(171,22,{3:1,34:1,22:1,171:1},hI);var $mt,Dmt,xmt,Rmt,Kmt,Fmt,_mt,Bmt,Hmt,Umt,Gmt,qmt,Xmt,zmt,Vmt,Wmt,Qmt,Jmt,Ymt,Zmt,nvt,tvt,evt,ivt,rvt,cvt,avt,ovt,uvt,svt,hvt,fvt,lvt,bvt,wvt,dvt,gvt,pvt,mvt,vvt,kvt,yvt,Mvt,Tvt,jvt,Evt,Svt,Pvt,Cvt,Ivt,Ovt,Avt,Lvt,Nvt,$vt,Dvt,xvt,Rvt,Kvt,Fvt,_vt,Bvt,Hvt,Uvt,Gvt,qvt,Xvt,zvt,Vvt,Wvt,Qvt,Jvt,Yvt,Zvt,nkt,tkt,ekt,ikt,rkt,ckt,akt,okt,ukt,skt,hkt,fkt,lkt,bkt,wkt,dkt,gkt,pkt,mkt,vkt,kkt,ykt,Mkt,Tkt,jkt,Ekt,Skt,Pkt,Ckt,Ikt,Okt,Akt,Lkt,Nkt,$kt,Dkt,xkt,Rkt,Kkt,Fkt,_kt,Bkt,Hkt,Ukt,Gkt,qkt,Xkt,zkt,Vkt,Wkt,Qkt,Jkt,Ykt,Zkt,nyt,tyt,eyt,iyt,ryt,cyt,ayt,oyt,uyt,syt,hyt,fyt,lyt,byt,wyt,dyt,gyt,pyt,myt,vyt,kyt,yyt,Myt,Tyt,jyt,Eyt,Syt,Pyt,Cyt,Iyt,Oyt,Ayt,Lyt,Nyt,$yt,Dyt,xyt,Ryt,Kyt,Fyt,_yt,Byt,Hyt,Uyt,Gyt,qyt,Xyt,zyt,Vyt,Wyt,Qyt,Jyt,Yyt,Zyt,nMt,tMt,eMt,iMt,rMt,cMt,aMt,oMt,uMt,sMt,hMt,fMt,lMt,bMt,wMt,dMt,gMt,pMt,mMt,vMt,kMt,yMt,MMt,TMt,jMt,EMt,SMt,PMt,CMt,IMt,OMt,AMt,LMt,NMt,$Mt,DMt,xMt,RMt,KMt,FMt,_Mt,BMt,HMt,UMt,GMt,qMt,XMt,zMt,VMt,WMt,QMt,JMt,YMt,ZMt,nTt,tTt,eTt,iTt,rTt,cTt,aTt,oTt,uTt,sTt,hTt,fTt,lTt,bTt,wTt,dTt,gTt,pTt,mTt,vTt,kTt,yTt,MTt,TTt,jTt,ETt,STt,PTt,CTt,ITt,OTt,ATt,LTt,NTt,$Tt,DTt,xTt,RTt,KTt,FTt,_Tt,BTt,HTt,UTt,GTt,qTt,XTt,zTt,VTt,WTt,QTt,JTt,YTt,ZTt,njt,tjt,ejt,ijt,rjt,cjt,ajt=_cn($6n,"LayerConstraint",171,Oat,l9,lH);sDn(859,1,K2n,fl),uZn.hf=function(n){Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,B6n),""),"Direction Congruency"),"Specifies how drawings of the same graph with different layout directions compare to each other: either a natural reading direction is preserved or the drawings are rotated versions of each other."),vvt),(lAn(),gNt)),Mgt),ggn((Rkn(),hNt))))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,H6n),""),"Feedback Edges"),"Whether feedback edges should be highlighted by routing around the nodes."),(qx(),!1)),wNt),cot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,U6n),""),"Interactive Reference Point"),"Determines which point of a node is considered by interactive layout phases."),Hvt),gNt),Nmt),ggn(hNt)))),H4(n,U6n,J6n,Gvt),H4(n,U6n,o5n,Uvt),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,G6n),""),"Merge Edges"),"Edges that have no ports are merged so they touch the connected nodes at the same points. When this option is disabled, one port is created for each edge directly connected to a node. When it is enabled, all such incoming edges share an input port, and all outgoing edges share an output port."),!1),wNt),cot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,q6n),""),"Merge Hierarchy-Crossing Edges"),"If hierarchical layout is active, hierarchy-crossing edges use as few hierarchical ports as possible. They are broken by the algorithm, with hierarchical ports inserted as required. Usually, one such port is created for each edge at each hierarchy crossing point. With this option set to true, we try to create as few hierarchical ports as possible in the process. In particular, all edges that form a hyperedge can share a port."),!0),wNt),cot),ggn(hNt)))),Zgn(n,new tAn(VT(JT(QT(YT(qT(GT(WT(XT(zT(new xu,X6n),""),"Allow Non-Flow Ports To Switch Sides"),"Specifies whether non-flow ports may switch sides if their node's port constraints are either FIXED_SIDE or FIXED_ORDER. A non-flow port is a port on a side that is not part of the currently configured layout flow. For instance, given a left-to-right layout direction, north and south ports would be considered non-flow ports. Further note that the underlying criterium whether to switch sides or not solely relies on the minimization of edge crossings. Hence, edge length and other aesthetics criteria are not addressed."),!1),wNt),cot),ggn(fNt)),Uhn(cT($ot,1),zZn,2,6,["org.eclipse.elk.layered.northOrSouthPort"])))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,z6n),""),"Port Sorting Strategy"),"Only relevant for nodes with FIXED_SIDE port constraints. Determines the way a node's ports are distributed on the sides of a node if their order is not prescribed. The option is set on parent nodes."),Pkt),gNt),Jjt),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,V6n),""),"Thoroughness"),"How much effort should be spent to produce a nice layout."),xwn(7)),mNt),dot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,W6n),""),"Add Unnecessary Bendpoints"),"Adds bend points even if an edge does not change direction. If true, each long edge dummy will contribute a bend point to its edges and hierarchy-crossing edges will always get a bend point where they cross hierarchy boundaries. By default, bend points are only added where an edge changes direction."),!1),wNt),cot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,Q6n),""),"Generate Position and Layer IDs"),"If enabled position id and layer id are generated, which are usually only used internally when setting the interactiveLayout option. This option should be specified on the root node."),!1),wNt),cot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,J6n),"cycleBreaking"),"Cycle Breaking Strategy"),"Strategy for cycle breaking. Cycle breaking looks for cycles in the graph and determines which edges to reverse to break the cycles. Reversed edges will end up pointing to the opposite direction of regular edges (that is, reversed edges will point left if edges usually point right)."),pvt),gNt),pgt),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,Y6n),s8n),"Node Layering Strategy"),"Strategy for node layering."),ckt),gNt),fjt),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,Z6n),s8n),"Layer Constraint"),"Determines a constraint on the placement of the node regarding the layering."),Wvt),gNt),ajt),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,n5n),s8n),"Layer Choice Constraint"),"Allows to set a constraint regarding the layer placement of a node. Let i be the value of teh constraint. Assumed the drawing has n layers and i < n. If set to i, it expresses that the node should be placed in i-th layer. Should i>=n be true then the node is placed in the last layer of the drawing. Note that this option is not part of any of ELK Layered's default configurations but is only evaluated as part of the `InteractiveLayeredGraphVisitor`, which must be applied manually or used via the `DiagramLayoutEngine."),null),mNt),dot),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,t5n),s8n),"Layer ID"),"Layer identifier that was calculated by ELK Layered for a node. This is only generated if interactiveLayot or generatePositionAndLayerIds is set."),xwn(-1)),mNt),dot),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,e5n),h8n),"Upper Bound On Width [MinWidth Layerer]"),"Defines a loose upper bound on the width of the MinWidth layerer. If set to '-1' multiple values are tested and the best result is selected."),xwn(4)),mNt),dot),ggn(hNt)))),H4(n,e5n,Y6n,Yvt),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,i5n),h8n),"Upper Layer Estimation Scaling Factor [MinWidth Layerer]"),"Multiplied with Upper Bound On Width for defining an upper bound on the width of layers which haven't been determined yet, but whose maximum width had been (roughly) estimated by the MinWidth algorithm. Compensates for too high estimations. If set to '-1' multiple values are tested and the best result is selected."),xwn(2)),mNt),dot),ggn(hNt)))),H4(n,i5n,Y6n,nkt),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,r5n),f8n),"Node Promotion Strategy"),"Reduces number of dummy nodes after layering phase (if possible)."),ikt),gNt),Hjt),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,c5n),f8n),"Max Node Promotion Iterations"),"Limits the number of iterations for node promotion."),xwn(0)),mNt),dot),ggn(hNt)))),H4(n,c5n,r5n,null),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,a5n),"layering.coffmanGraham"),"Layer Bound"),"The maximum number of nodes allowed per layer."),xwn(vZn)),mNt),dot),ggn(hNt)))),H4(n,a5n,Y6n,Xvt),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,o5n),l8n),"Crossing Minimization Strategy"),"Strategy for crossing minimization."),dvt),gNt),agt),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,u5n),l8n),"Force Node Model Order"),"The node order given by the model does not change to produce a better layout. E.g. if node A is before node B in the model this is not changed during crossing minimization. This assumes that the node model order is already respected before crossing minimization. This can be achieved by setting considerModelOrder.strategy to NODES_AND_EDGES."),!1),wNt),cot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,s5n),l8n),"Hierarchical Sweepiness"),"How likely it is to use cross-hierarchy (1) vs bottom-up (-1)."),.1),dNt),fot),ggn(hNt)))),H4(n,s5n,b8n,ovt),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,h5n),l8n),"Semi-Interactive Crossing Minimization"),"Preserves the order of nodes within a layer but still minimizes crossings between edges connecting long edge dummies. Derives the desired order from positions specified by the 'org.eclipse.elk.position' layout option. Requires a crossing minimization strategy that is able to process 'in-layer' constraints."),!1),wNt),cot),ggn(hNt)))),H4(n,h5n,o5n,bvt),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,f5n),l8n),"In Layer Predecessor of"),"Allows to set a constraint which specifies of which node the current node is the predecessor. If set to 's' then the node is the predecessor of 's' and is in the same layer"),null),kNt),$ot),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,l5n),l8n),"In Layer Successor of"),"Allows to set a constraint which specifies of which node the current node is the successor. If set to 's' then the node is the successor of 's' and is in the same layer"),null),kNt),$ot),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,b5n),l8n),"Position Choice Constraint"),"Allows to set a constraint regarding the position placement of a node in a layer. Assumed the layer in which the node placed includes n other nodes and i < n. If set to i, it expresses that the node should be placed at the i-th position. Should i>=n be true then the node is placed at the last position in the layer. Note that this option is not part of any of ELK Layered's default configurations but is only evaluated as part of the `InteractiveLayeredGraphVisitor`, which must be applied manually or used via the `DiagramLayoutEngine."),null),mNt),dot),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,w5n),l8n),"Position ID"),"Position within a layer that was determined by ELK Layered for a node. This is only generated if interactiveLayot or generatePositionAndLayerIds is set."),xwn(-1)),mNt),dot),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,d5n),w8n),"Greedy Switch Activation Threshold"),"By default it is decided automatically if the greedy switch is activated or not. The decision is based on whether the size of the input graph (without dummy nodes) is smaller than the value of this option. A '0' enforces the activation."),xwn(40)),mNt),dot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,g5n),w8n),"Greedy Switch Crossing Minimization"),"Greedy Switch strategy for crossing minimization. The greedy switch heuristic is executed after the regular crossing minimization as a post-processor. Note that if 'hierarchyHandling' is set to 'INCLUDE_CHILDREN', the 'greedySwitchHierarchical.type' option must be used."),rvt),gNt),mpt),ggn(hNt)))),H4(n,g5n,o5n,cvt),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,p5n),"crossingMinimization.greedySwitchHierarchical"),"Greedy Switch Crossing Minimization (hierarchical)"),"Activates the greedy switch heuristic in case hierarchical layout is used. The differences to the non-hierarchical case (see 'greedySwitch.type') are: 1) greedy switch is inactive by default, 3) only the option value set on the node at which hierarchical layout starts is relevant, and 2) if it's activated by the user, it properly addresses hierarchy-crossing edges."),nvt),gNt),mpt),ggn(hNt)))),H4(n,p5n,o5n,tvt),H4(n,p5n,b8n,evt),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,m5n),d8n),"Node Placement Strategy"),"Strategy for node placement."),Ekt),gNt),xjt),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(zT(new xu,v5n),d8n),"Favor Straight Edges Over Balancing"),"Favor straight edges over a balanced node placement. The default behavior is determined automatically based on the used 'edgeRouting'. For an orthogonal style it is set to true, for all other styles to false."),wNt),cot),ggn(hNt)))),H4(n,v5n,m5n,dkt),H4(n,v5n,m5n,gkt),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,k5n),g8n),"BK Edge Straightening"),"Specifies whether the Brandes Koepf node placer tries to increase the number of straight edges at the expense of diagram size. There is a subtle difference to the 'favorStraightEdges' option, which decides whether a balanced placement of the nodes is desired, or not. In bk terms this means combining the four alignments into a single balanced one, or not. This option on the other hand tries to straighten additional edges during the creation of each of the four alignments."),skt),gNt),Hgt),ggn(hNt)))),H4(n,k5n,m5n,hkt),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,y5n),g8n),"BK Fixed Alignment"),"Tells the BK node placer to use a certain alignment (out of its four) instead of the one producing the smallest height, or the combination of all four."),lkt),gNt),Qgt),ggn(hNt)))),H4(n,y5n,m5n,bkt),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,M5n),"nodePlacement.linearSegments"),"Linear Segments Deflection Dampening"),"Dampens the movement of nodes to keep the diagram from getting too large."),.3),dNt),fot),ggn(hNt)))),H4(n,M5n,m5n,mkt),Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(zT(new xu,T5n),"nodePlacement.networkSimplex"),"Node Flexibility"),"Aims at shorter and straighter edges. Two configurations are possible: (a) allow ports to move freely on the side they are assigned to (the order is always defined beforehand), (b) additionally allow to enlarge a node wherever it helps. If this option is not configured for a node, the 'nodeFlexibility.default' value is used, which is specified for the node's parent."),gNt),jjt),ggn(sNt)))),H4(n,T5n,m5n,Tkt),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,j5n),"nodePlacement.networkSimplex.nodeFlexibility"),"Node Flexibility Default"),"Default value of the 'nodeFlexibility' option for the children of a hierarchical node."),ykt),gNt),jjt),ggn(hNt)))),H4(n,j5n,m5n,Mkt),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,E5n),p8n),"Self-Loop Distribution"),"Alter the distribution of the loops around the node. It only takes effect for PortConstraints.FREE."),Pvt),gNt),oEt),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,S5n),p8n),"Self-Loop Ordering"),"Alter the ordering of the loops they can either be stacked or sequenced. It only takes effect for PortConstraints.FREE."),Ivt),gNt),lEt),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,P5n),"edgeRouting.splines"),"Spline Routing Mode"),"Specifies the way control points are assembled for each individual edge. CONSERVATIVE ensures that edges are properly routed around the nodes but feels rather orthogonal at times. SLOPPY uses fewer control points to obtain curvier edge routes but may result in edges overlapping nodes."),Avt),gNt),pEt),ggn(hNt)))),H4(n,P5n,m8n,Lvt),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,C5n),"edgeRouting.splines.sloppy"),"Sloppy Spline Layer Spacing Factor"),"Spacing factor for routing area between layers when using sloppy spline routing."),.2),dNt),fot),ggn(hNt)))),H4(n,C5n,m8n,$vt),H4(n,C5n,P5n,Dvt),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,I5n),"edgeRouting.polyline"),"Sloped Edge Zone Width"),"Width of the strip to the left and to the right of each layer where the polyline edge router is allowed to refrain from ensuring that edges are routed horizontally. This prevents awkward bend points for nodes that extent almost to the edge of their layer."),2),dNt),fot),ggn(hNt)))),H4(n,I5n,m8n,Evt),Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(zT(new xu,O5n),v8n),"Spacing Base Value"),"An optional base value for all other layout options of the 'spacing' group. It can be used to conveniently alter the overall 'spaciousness' of the drawing. Whenever an explicit value is set for the other layout options, this base value will have no effect. The base value is not inherited, i.e. it must be set for each hierarchical node."),dNt),fot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,A5n),v8n),"Edge Node Between Layers Spacing"),"The spacing to be preserved between nodes and edges that are routed next to the node's layer. For the spacing between nodes and edges that cross the node's layer 'spacing.edgeNode' is used."),10),dNt),fot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,L5n),v8n),"Edge Edge Between Layer Spacing"),"Spacing to be preserved between pairs of edges that are routed between the same pair of layers. Note that 'spacing.edgeEdge' is used for the spacing between pairs of edges crossing the same layer."),10),dNt),fot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,N5n),v8n),"Node Node Between Layers Spacing"),"The spacing to be preserved between any pair of nodes of two adjacent layers. Note that 'spacing.nodeNode' is used for the spacing between nodes within the layer itself."),20),dNt),fot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,$5n),k8n),"Direction Priority"),"Defines how important it is to have a certain edge point into the direction of the overall layout. This option is evaluated during the cycle breaking phase."),xwn(0)),mNt),dot),ggn(oNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,D5n),k8n),"Shortness Priority"),"Defines how important it is to keep an edge as short as possible. This option is evaluated during the layering phase."),xwn(0)),mNt),dot),ggn(oNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,x5n),k8n),"Straightness Priority"),"Defines how important it is to keep an edge straight, i.e. aligned with one of the two axes. This option is evaluated during node placement."),xwn(0)),mNt),dot),ggn(oNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,R5n),y8n),j3n),"Tries to further compact components (disconnected sub-graphs)."),!1),wNt),cot),ggn(hNt)))),H4(n,R5n,h4n,!0),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,K5n),M8n),"Post Compaction Strategy"),T8n),_mt),gNt),upt),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,F5n),M8n),"Post Compaction Constraint Calculation"),T8n),Kmt),gNt),tgt),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,_5n),j8n),"High Degree Node Treatment"),"Makes room around high degree nodes to place leafs and trees."),!1),wNt),cot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,B5n),j8n),"High Degree Node Threshold"),"Whether a node is considered to have a high degree."),xwn(16)),mNt),dot),ggn(hNt)))),H4(n,B5n,_5n,!0),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,H5n),j8n),"High Degree Node Maximum Tree Height"),"Maximum height of a subtree connected to a high degree node to be moved to separate layers."),xwn(5)),mNt),dot),ggn(hNt)))),H4(n,H5n,_5n,!0),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,U5n),E8n),"Graph Wrapping Strategy"),"For certain graphs and certain prescribed drawing areas it may be desirable to split the laid out graph into chunks that are placed side by side. The edges that connect different chunks are 'wrapped' around from the end of one chunk to the start of the other chunk. The points between the chunks are referred to as 'cuts'."),cyt),gNt),xEt),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,G5n),E8n),"Additional Wrapped Edges Spacing"),"To visually separate edges that are wrapped from regularly routed edges an additional spacing value can be specified in form of this layout option. The spacing is added to the regular edgeNode spacing."),10),dNt),fot),ggn(hNt)))),H4(n,G5n,U5n,Kkt),H4(n,G5n,U5n,Fkt),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,q5n),E8n),"Correction Factor for Wrapping"),"At times and for certain types of graphs the executed wrapping may produce results that are consistently biased in the same fashion: either wrapping to often or to rarely. This factor can be used to correct the bias. Internally, it is simply multiplied with the 'aspect ratio' layout option."),1),dNt),fot),ggn(hNt)))),H4(n,q5n,U5n,Bkt),H4(n,q5n,U5n,Hkt),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,X5n),S8n),"Cutting Strategy"),"The strategy by which the layer indexes are determined at which the layering crumbles into chunks."),Wkt),gNt),bgt),ggn(hNt)))),H4(n,X5n,U5n,Qkt),H4(n,X5n,U5n,Jkt),Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(zT(new xu,z5n),S8n),"Manually Specified Cuts"),"Allows the user to specify her own cuts for a certain graph."),vNt),yat),ggn(hNt)))),H4(n,z5n,X5n,Gkt),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,V5n),"wrapping.cutting.msd"),"MSD Freedom"),"The MSD cutting strategy starts with an initial guess on the number of chunks the graph should be split into. The freedom specifies how much the strategy may deviate from this guess. E.g. if an initial number of 3 is computed, a freedom of 1 allows 2, 3, and 4 cuts."),Xkt),mNt),dot),ggn(hNt)))),H4(n,V5n,X5n,zkt),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,W5n),P8n),"Validification Strategy"),"When wrapping graphs, one can specify indices that are not allowed as split points. The validification strategy makes sure every computed split point is allowed."),hyt),gNt),MEt),ggn(hNt)))),H4(n,W5n,U5n,fyt),H4(n,W5n,U5n,lyt),Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(zT(new xu,Q5n),P8n),"Valid Indices for Wrapping"),null),vNt),yat),ggn(hNt)))),H4(n,Q5n,U5n,oyt),H4(n,Q5n,U5n,uyt),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,J5n),C8n),"Improve Cuts"),"For general graphs it is important that not too many edges wrap backwards. Thus a compromise between evenly-distributed cuts and the total number of cut edges is sought."),!0),wNt),cot),ggn(hNt)))),H4(n,J5n,U5n,tyt),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,Y5n),C8n),"Distance Penalty When Improving Cuts"),null),2),dNt),fot),ggn(hNt)))),H4(n,Y5n,U5n,Zkt),H4(n,Y5n,J5n,!0),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,Z5n),C8n),"Improve Wrapped Edges"),"The initial wrapping is performed in a very simple way. As a consequence, edges that wrap from one chunk to another may be unnecessarily long. Activating this option tries to shorten such edges."),!0),wNt),cot),ggn(hNt)))),H4(n,Z5n,U5n,iyt),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,n8n),I8n),"Edge Label Side Selection"),"Method to decide on edge label sides."),Tvt),gNt),$gt),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,t8n),I8n),"Edge Center Label Placement Strategy"),"Determines in which layer center labels of long edges should be placed."),yvt),gNt),Qdt),WX(hNt,Uhn(cT(MNt,1),p1n,170,0,[uNt]))))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,e8n),O8n),"Consider Model Order"),"Preserves the order of nodes and edges in the model file if this does not lead to additional edge crossings. Depending on the strategy this is not always possible since the node and edge order might be conflicting."),Qmt),gNt),Xjt),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,i8n),O8n),"Consider Port Order"),"If disabled the port order of output ports is derived from the edge order and input ports are ordered by their incoming connections. If enabled all ports are ordered by the port model order."),!1),wNt),cot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,r8n),O8n),"No Model Order"),"Set on a node to not set a model order for this node even though it is a real node."),!1),wNt),cot),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,c8n),O8n),"Consider Model Order for Components"),"If set to NONE the usual ordering strategy (by cumulative node priority and size of nodes) is used. INSIDE_PORT_SIDES orders the components with external ports only inside the groups with the same port side. FORCE_MODEL_ORDER enforces the mode order on components. This option might produce bad alignments and sub optimal drawings in terms of used area since the ordering should be respected."),Hmt),gNt),abt),ggn(hNt)))),H4(n,c8n,h4n,null),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,a8n),O8n),"Long Edge Ordering Strategy"),"Indicates whether long edges are sorted under, over, or equal to nodes that have no connection to a previous layer in a left-to-right or right-to-left layout. Under and over changes to right and left in a vertical layout."),Xmt),gNt),pjt),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,o8n),O8n),"Crossing Counter Node Order Influence"),"Indicates with what percentage (1 for 100%) violations of the node model order are weighted against the crossings e.g. a value of 0.5 means two model order violations are as important as on edge crossing. This allows some edge crossings in favor of preserving the model order. It is advised to set this value to a very small positive value (e.g. 0.001) to have minimal crossing and a optimal node order. Defaults to no influence (0)."),0),dNt),fot),ggn(hNt)))),H4(n,o8n,e8n,null),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,u8n),O8n),"Crossing Counter Port Order Influence"),"Indicates with what percentage (1 for 100%) violations of the port model order are weighted against the crossings e.g. a value of 0.5 means two model order violations are as important as on edge crossing. This allows some edge crossings in favor of preserving the model order. It is advised to set this value to a very small positive value (e.g. 0.001) to have minimal crossing and a optimal port order. Defaults to no influence (0)."),0),dNt),fot),ggn(hNt)))),H4(n,u8n,e8n,null),eZn((new ll,n))},zW($6n,"LayeredMetaDataProvider",859),sDn(998,1,K2n,ll),uZn.hf=function(n){eZn(n)},zW($6n,"LayeredOptions",998),sDn(999,1,{},Tc),uZn.sf=function(){return new mk},uZn.tf=function(n){},zW($6n,"LayeredOptions/LayeredFactory",999),sDn(1391,1,{}),uZn.a=0,zW(p9n,"ElkSpacings/AbstractSpacingsBuilder",1391),sDn(792,1391,{},omn),zW($6n,"LayeredSpacings/LayeredSpacingsBuilder",792),sDn(265,22,{3:1,34:1,22:1,265:1,188:1,196:1},fI),uZn.dg=function(){return J_n(this)},uZn.qg=function(){return J_n(this)};var ojt,ujt,sjt,hjt,fjt=_cn($6n,"LayeringStrategy",265,Oat,tan,bH);sDn(390,22,{3:1,34:1,22:1,390:1},lI);var ljt,bjt,wjt,djt,gjt,pjt=_cn($6n,"LongEdgeOrderingStrategy",390,Oat,X2,wH);sDn(203,22,{3:1,34:1,22:1,203:1},bI);var mjt,vjt,kjt,yjt,Mjt,Tjt,jjt=_cn($6n,"NodeFlexibility",203,Oat,q6,dH);sDn(323,22,{3:1,34:1,22:1,323:1,188:1,196:1},wI),uZn.dg=function(){return IDn(this)},uZn.qg=function(){return IDn(this)};var Ejt,Sjt,Pjt,Cjt,Ijt,Ojt,Ajt,Ljt,Njt,$jt,Djt,xjt=_cn($6n,"NodePlacementStrategy",323,Oat,f9,gH);sDn(243,22,{3:1,34:1,22:1,243:1},dI);var Rjt,Kjt,Fjt,_jt,Bjt,Hjt=_cn($6n,"NodePromotionStrategy",243,Oat,uun,pH);sDn(284,22,{3:1,34:1,22:1,284:1},gI);var Ujt,Gjt,qjt,Xjt=_cn($6n,"OrderingStrategy",284,Oat,X6,mH);sDn(430,22,{3:1,34:1,22:1,430:1},pI);var zjt,Vjt,Wjt,Qjt,Jjt=_cn($6n,"PortSortingStrategy",430,Oat,d1,vH);sDn(463,22,{3:1,34:1,22:1,463:1},mI);var Yjt,Zjt,nEt,tEt,eEt=_cn($6n,"PortType",463,Oat,z2,kH);sDn(387,22,{3:1,34:1,22:1,387:1},vI);var iEt,rEt,cEt,aEt,oEt=_cn($6n,"SelfLoopDistributionStrategy",387,Oat,V2,yH);sDn(349,22,{3:1,34:1,22:1,349:1},kI);var uEt,sEt,hEt,fEt,lEt=_cn($6n,"SelfLoopOrderingStrategy",349,Oat,W2,MH);sDn(312,1,{312:1},CVn),zW($6n,"Spacings",312),sDn(350,22,{3:1,34:1,22:1,350:1},yI);var bEt,wEt,dEt,gEt,pEt=_cn($6n,"SplineRoutingMode",350,Oat,Q2,TH);sDn(352,22,{3:1,34:1,22:1,352:1},MI);var mEt,vEt,kEt,yEt,MEt=_cn($6n,"ValidifyStrategy",352,Oat,J2,jH);sDn(388,22,{3:1,34:1,22:1,388:1},TI);var TEt,jEt,EEt,SEt,PEt,CEt,IEt,OEt,AEt,LEt,NEt,$Et,DEt,xEt=_cn($6n,"WrappingStrategy",388,Oat,Y2,EH);sDn(1398,1,y9n,il),uZn.rg=function(n){return uG(n,36),jEt},uZn.Kf=function(n,t){pzn(this,uG(n,36),t)},zW(M9n,"DepthFirstCycleBreaker",1398),sDn(793,1,y9n,ez),uZn.rg=function(n){return uG(n,36),EEt},uZn.Kf=function(n,t){gYn(this,uG(n,36),t)},uZn.sg=function(n){return uG(zq(n,iMn(this.d,n.c.length)),10)},zW(M9n,"GreedyCycleBreaker",793),sDn(1401,793,y9n,tL),uZn.sg=function(n){var t,e,i,r;for(r=null,t=vZn,i=new Ww(n);i.a1&&(oM(gK(oIn(HQ((u3(0,n.c.length),uG(n.c[0],10))),(jYn(),Cyt))))?Axn(n,this.d,uG(this,669)):(hZ(),f$(n,this.d)),xsn(this.e,n))},uZn.lg=function(n,t,e,i){var r,c,a,o,u,s,h;for(t!=vX(e,n.length)&&(c=n[t-(e?1:-1)],v7(this.f,c,e?(can(),Wjt):(can(),Vjt))),r=n[t][0],h=!i||r.k==(zIn(),lbt),s=n7(n[t]),this.vg(s,h,!1,e),a=0,u=new Ww(s);u.a"),n0?j0(this.a,n[t-1],n[t]):!e&&t1&&(oM(gK(oIn(HQ((u3(0,n.c.length),uG(n.c[0],10))),(jYn(),Cyt))))?Axn(n,this.d,this):(hZ(),f$(n,this.d)),oM(gK(oIn(HQ((u3(0,n.c.length),uG(n.c[0],10))),Cyt)))||xsn(this.e,n))},zW(S9n,"ModelOrderBarycenterHeuristic",669),sDn(1866,1,b2n,Zg),uZn.Ne=function(n,t){return TOn(this.a,uG(n,10),uG(t,10))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(S9n,"ModelOrderBarycenterHeuristic/lambda$0$Type",1866),sDn(1423,1,y9n,wl),uZn.rg=function(n){var t;return uG(n,36),Aq(t=aN(XEt),(uIn(),Elt),(zYn(),Cwt)),t},uZn.Kf=function(n,t){jY((uG(n,36),t))},zW(S9n,"NoCrossingMinimizer",1423),sDn(809,413,j9n,rj),uZn.tg=function(n,t,e){var i,r,c,a,o,u,s,h,f,l,b;switch(f=this.g,e.g){case 1:for(r=0,c=0,h=new Ww(n.j);h.a1&&(r.j==(KQn(),kRt)?this.b[n]=!0:r.j==_Rt&&n>0&&(this.b[n-1]=!0))},uZn.f=0,zW(P6n,"AllCrossingsCounter",1861),sDn(595,1,{},Don),uZn.b=0,uZn.d=0,zW(P6n,"BinaryIndexedTree",595),sDn(532,1,{},R_),zW(P6n,"CrossingsCounter",532),sDn(1950,1,b2n,np),uZn.Ne=function(n,t){return wX(this.a,uG(n,12),uG(t,12))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(P6n,"CrossingsCounter/lambda$0$Type",1950),sDn(1951,1,b2n,tp),uZn.Ne=function(n,t){return dX(this.a,uG(n,12),uG(t,12))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(P6n,"CrossingsCounter/lambda$1$Type",1951),sDn(1952,1,b2n,ep),uZn.Ne=function(n,t){return gX(this.a,uG(n,12),uG(t,12))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(P6n,"CrossingsCounter/lambda$2$Type",1952),sDn(1953,1,b2n,ip),uZn.Ne=function(n,t){return pX(this.a,uG(n,12),uG(t,12))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(P6n,"CrossingsCounter/lambda$3$Type",1953),sDn(1954,1,QZn,rp),uZn.Cd=function(n){cen(this.a,uG(n,12))},zW(P6n,"CrossingsCounter/lambda$4$Type",1954),sDn(1955,1,y1n,cp),uZn.Mb=function(n){return NI(this.a,uG(n,12))},zW(P6n,"CrossingsCounter/lambda$5$Type",1955),sDn(1956,1,QZn,ap),uZn.Cd=function(n){MA(this,n)},zW(P6n,"CrossingsCounter/lambda$6$Type",1956),sDn(1957,1,QZn,EI),uZn.Cd=function(n){var t;PU(),A6(this.b,(t=this.a,uG(n,12),t))},zW(P6n,"CrossingsCounter/lambda$7$Type",1957),sDn(839,1,A2n,Nc),uZn.Lb=function(n){return PU(),vR(uG(n,12),(GYn(),lmt))},uZn.Fb=function(n){return this===n},uZn.Mb=function(n){return PU(),vR(uG(n,12),(GYn(),lmt))},zW(P6n,"CrossingsCounter/lambda$8$Type",839),sDn(1949,1,{},op),zW(P6n,"HyperedgeCrossingsCounter",1949),sDn(478,1,{34:1,478:1},BF),uZn.Fd=function(n){return _vn(this,uG(n,478))},uZn.b=0,uZn.c=0,uZn.e=0,uZn.f=0;var QEt=zW(P6n,"HyperedgeCrossingsCounter/Hyperedge",478);sDn(374,1,{34:1,374:1},bY),uZn.Fd=function(n){return exn(this,uG(n,374))},uZn.b=0,uZn.c=0;var JEt,YEt,ZEt=zW(P6n,"HyperedgeCrossingsCounter/HyperedgeCorner",374);sDn(531,22,{3:1,34:1,22:1,531:1},SI);var nSt,tSt,eSt,iSt,rSt,cSt=_cn(P6n,"HyperedgeCrossingsCounter/HyperedgeCorner/Type",531,Oat,g1,PH);sDn(1425,1,y9n,dl),uZn.rg=function(n){return uG(oIn(uG(n,36),(GYn(),Hpt)),21).Hc((r_n(),tpt))?tSt:null},uZn.Kf=function(n,t){HEn(this,uG(n,36),t)},zW(P9n,"InteractiveNodePlacer",1425),sDn(1426,1,y9n,gl),uZn.rg=function(n){return uG(oIn(uG(n,36),(GYn(),Hpt)),21).Hc((r_n(),tpt))?eSt:null},uZn.Kf=function(n,t){XMn(this,uG(n,36),t)},zW(P9n,"LinearSegmentsNodePlacer",1426),sDn(261,1,{34:1,261:1},Tk),uZn.Fd=function(n){return CT(this,uG(n,261))},uZn.Fb=function(n){var t;return!!F$(n,261)&&(t=uG(n,261),this.b==t.b)},uZn.Hb=function(){return this.b},uZn.Ib=function(){return"ls"+vIn(this.e)},uZn.a=0,uZn.b=0,uZn.c=-1,uZn.d=-1,uZn.g=0;var aSt,oSt=zW(P9n,"LinearSegmentsNodePlacer/LinearSegment",261);sDn(1428,1,y9n,iz),uZn.rg=function(n){return uG(oIn(uG(n,36),(GYn(),Hpt)),21).Hc((r_n(),tpt))?aSt:null},uZn.Kf=function(n,t){WJn(this,uG(n,36),t)},uZn.b=0,uZn.g=0,zW(P9n,"NetworkSimplexPlacer",1428),sDn(1447,1,b2n,$c),uZn.Ne=function(n,t){return d$(uG(n,17).a,uG(t,17).a)},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(P9n,"NetworkSimplexPlacer/0methodref$compare$Type",1447),sDn(1449,1,b2n,Dc),uZn.Ne=function(n,t){return d$(uG(n,17).a,uG(t,17).a)},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(P9n,"NetworkSimplexPlacer/1methodref$compare$Type",1449),sDn(655,1,{655:1},PI);var uSt=zW(P9n,"NetworkSimplexPlacer/EdgeRep",655);sDn(412,1,{412:1},wY),uZn.b=!1;var sSt,hSt,fSt,lSt=zW(P9n,"NetworkSimplexPlacer/NodeRep",412);sDn(515,13,{3:1,4:1,20:1,31:1,56:1,13:1,16:1,15:1,59:1,515:1},Ck),zW(P9n,"NetworkSimplexPlacer/Path",515),sDn(1429,1,{},xc),uZn.Kb=function(n){return uG(n,18).d.i.k},zW(P9n,"NetworkSimplexPlacer/Path/lambda$0$Type",1429),sDn(1430,1,y1n,Rc),uZn.Mb=function(n){return uG(n,273)==(zIn(),wbt)},zW(P9n,"NetworkSimplexPlacer/Path/lambda$1$Type",1430),sDn(1431,1,{},Kc),uZn.Kb=function(n){return uG(n,18).d.i},zW(P9n,"NetworkSimplexPlacer/Path/lambda$2$Type",1431),sDn(1432,1,y1n,up),uZn.Mb=function(n){return zK(Imn(uG(n,10)))},zW(P9n,"NetworkSimplexPlacer/Path/lambda$3$Type",1432),sDn(1433,1,y1n,Fc),uZn.Mb=function(n){return mq(uG(n,12))},zW(P9n,"NetworkSimplexPlacer/lambda$0$Type",1433),sDn(1434,1,QZn,CI),uZn.Cd=function(n){M$(this.a,this.b,uG(n,12))},zW(P9n,"NetworkSimplexPlacer/lambda$1$Type",1434),sDn(1443,1,QZn,sp),uZn.Cd=function(n){FLn(this.a,uG(n,18))},zW(P9n,"NetworkSimplexPlacer/lambda$10$Type",1443),sDn(1444,1,{},_c),uZn.Kb=function(n){return n2(),new fX(null,new h3(uG(n,30).a,16))},zW(P9n,"NetworkSimplexPlacer/lambda$11$Type",1444),sDn(1445,1,QZn,hp),uZn.Cd=function(n){D_n(this.a,uG(n,10))},zW(P9n,"NetworkSimplexPlacer/lambda$12$Type",1445),sDn(1446,1,{},Bc),uZn.Kb=function(n){return n2(),xwn(uG(n,125).e)},zW(P9n,"NetworkSimplexPlacer/lambda$13$Type",1446),sDn(1448,1,{},Hc),uZn.Kb=function(n){return n2(),xwn(uG(n,125).e)},zW(P9n,"NetworkSimplexPlacer/lambda$15$Type",1448),sDn(1450,1,y1n,Uc),uZn.Mb=function(n){return n2(),uG(n,412).c.k==(zIn(),dbt)},zW(P9n,"NetworkSimplexPlacer/lambda$17$Type",1450),sDn(1451,1,y1n,Gc),uZn.Mb=function(n){return n2(),uG(n,412).c.j.c.length>1},zW(P9n,"NetworkSimplexPlacer/lambda$18$Type",1451),sDn(1452,1,QZn,dY),uZn.Cd=function(n){Dpn(this.c,this.b,this.d,this.a,uG(n,412))},uZn.c=0,uZn.d=0,zW(P9n,"NetworkSimplexPlacer/lambda$19$Type",1452),sDn(1435,1,{},qc),uZn.Kb=function(n){return n2(),new fX(null,new h3(uG(n,30).a,16))},zW(P9n,"NetworkSimplexPlacer/lambda$2$Type",1435),sDn(1453,1,QZn,fp),uZn.Cd=function(n){j$(this.a,uG(n,12))},uZn.a=0,zW(P9n,"NetworkSimplexPlacer/lambda$20$Type",1453),sDn(1454,1,{},Xc),uZn.Kb=function(n){return n2(),new fX(null,new h3(uG(n,30).a,16))},zW(P9n,"NetworkSimplexPlacer/lambda$21$Type",1454),sDn(1455,1,QZn,lp),uZn.Cd=function(n){uD(this.a,uG(n,10))},zW(P9n,"NetworkSimplexPlacer/lambda$22$Type",1455),sDn(1456,1,y1n,zc),uZn.Mb=function(n){return zK(n)},zW(P9n,"NetworkSimplexPlacer/lambda$23$Type",1456),sDn(1457,1,{},Vc),uZn.Kb=function(n){return n2(),new fX(null,new h3(uG(n,30).a,16))},zW(P9n,"NetworkSimplexPlacer/lambda$24$Type",1457),sDn(1458,1,y1n,bp),uZn.Mb=function(n){return RL(this.a,uG(n,10))},zW(P9n,"NetworkSimplexPlacer/lambda$25$Type",1458),sDn(1459,1,QZn,II),uZn.Cd=function(n){$On(this.a,this.b,uG(n,10))},zW(P9n,"NetworkSimplexPlacer/lambda$26$Type",1459),sDn(1460,1,y1n,Wc),uZn.Mb=function(n){return n2(),!v9(uG(n,18))},zW(P9n,"NetworkSimplexPlacer/lambda$27$Type",1460),sDn(1461,1,y1n,Qc),uZn.Mb=function(n){return n2(),!v9(uG(n,18))},zW(P9n,"NetworkSimplexPlacer/lambda$28$Type",1461),sDn(1462,1,{},wp),uZn.Ve=function(n,t){return T$(this.a,uG(n,30),uG(t,30))},zW(P9n,"NetworkSimplexPlacer/lambda$29$Type",1462),sDn(1436,1,{},Jc),uZn.Kb=function(n){return n2(),new fX(null,new LW(new Fz(ix(Xgn(uG(n,10)).a.Kc(),new h))))},zW(P9n,"NetworkSimplexPlacer/lambda$3$Type",1436),sDn(1437,1,y1n,Yc),uZn.Mb=function(n){return n2(),h6(uG(n,18))},zW(P9n,"NetworkSimplexPlacer/lambda$4$Type",1437),sDn(1438,1,QZn,dp),uZn.Cd=function(n){vqn(this.a,uG(n,18))},zW(P9n,"NetworkSimplexPlacer/lambda$5$Type",1438),sDn(1439,1,{},Zc),uZn.Kb=function(n){return n2(),new fX(null,new h3(uG(n,30).a,16))},zW(P9n,"NetworkSimplexPlacer/lambda$6$Type",1439),sDn(1440,1,y1n,na),uZn.Mb=function(n){return n2(),uG(n,10).k==(zIn(),dbt)},zW(P9n,"NetworkSimplexPlacer/lambda$7$Type",1440),sDn(1441,1,{},ta),uZn.Kb=function(n){return n2(),new fX(null,new LW(new Fz(ix(Ggn(uG(n,10)).a.Kc(),new h))))},zW(P9n,"NetworkSimplexPlacer/lambda$8$Type",1441),sDn(1442,1,y1n,ea),uZn.Mb=function(n){return n2(),pq(uG(n,18))},zW(P9n,"NetworkSimplexPlacer/lambda$9$Type",1442),sDn(1424,1,y9n,pl),uZn.rg=function(n){return uG(oIn(uG(n,36),(GYn(),Hpt)),21).Hc((r_n(),tpt))?sSt:null},uZn.Kf=function(n,t){RXn(uG(n,36),t)},zW(P9n,"SimpleNodePlacer",1424),sDn(185,1,{185:1},VHn),uZn.Ib=function(){var n;return n="",this.c==(b0(),fSt)?n+=V2n:this.c==hSt&&(n+=z2n),this.o==(w0(),wSt)?n+=c3n:this.o==dSt?n+="UP":n+="BALANCED",n},zW(O9n,"BKAlignedLayout",185),sDn(523,22,{3:1,34:1,22:1,523:1},OI);var bSt,wSt,dSt,gSt=_cn(O9n,"BKAlignedLayout/HDirection",523,Oat,m1,CH);sDn(522,22,{3:1,34:1,22:1,522:1},AI);var pSt,mSt,vSt,kSt,ySt,MSt,TSt,jSt,ESt,SSt,PSt,CSt,ISt,OSt,ASt,LSt,NSt,$St,DSt,xSt=_cn(O9n,"BKAlignedLayout/VDirection",522,Oat,v1,IH);sDn(1699,1,{},LI),zW(O9n,"BKAligner",1699),sDn(1702,1,{},xjn),zW(O9n,"BKCompactor",1702),sDn(663,1,{663:1},ia),uZn.a=0,zW(O9n,"BKCompactor/ClassEdge",663),sDn(467,1,{467:1},Ek),uZn.a=null,uZn.b=0,zW(O9n,"BKCompactor/ClassNode",467),sDn(1427,1,y9n,FI),uZn.rg=function(n){return uG(oIn(uG(n,36),(GYn(),Hpt)),21).Hc((r_n(),tpt))?mSt:null},uZn.Kf=function(n,t){$Yn(this,uG(n,36),t)},uZn.d=!1,zW(O9n,"BKNodePlacer",1427),sDn(1700,1,{},ra),uZn.d=0,zW(O9n,"NeighborhoodInformation",1700),sDn(1701,1,b2n,gp),uZn.Ne=function(n,t){return vrn(this,uG(n,42),uG(t,42))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(O9n,"NeighborhoodInformation/NeighborComparator",1701),sDn(823,1,{}),zW(O9n,"ThresholdStrategy",823),sDn(1825,823,{},Sk),uZn.wg=function(n,t,e){return this.a.o==(w0(),dSt)?M0n:T0n},uZn.xg=function(){},zW(O9n,"ThresholdStrategy/NullThresholdStrategy",1825),sDn(587,1,{587:1},_I),uZn.c=!1,uZn.d=!1,zW(O9n,"ThresholdStrategy/Postprocessable",587),sDn(1826,823,{},Pk),uZn.wg=function(n,t,e){var i,r,c;return r=t==e,i=this.a.a[e.p]==t,r||i?(c=n,this.a.c,b0(),r&&(c=FXn(this,t,!0)),!isNaN(c)&&!isFinite(c)&&i&&(c=FXn(this,e,!1)),c):n},uZn.xg=function(){for(var n,t,e;0!=this.d.b;)(t=wGn(this,e=uG(H1(this.d),587))).a&&(n=t.a,(oM(this.a.f[this.a.g[e.b.p].p])||v9(n)||n.c.i.c!=n.d.i.c)&&(ixn(this,e)||VL(this.e,e)));for(;0!=this.e.a.c.length;)ixn(this,uG(obn(this.e),587))},zW(O9n,"ThresholdStrategy/SimpleThresholdStrategy",1826),sDn(645,1,{645:1,188:1,196:1},ca),uZn.dg=function(){return Fsn(this)},uZn.qg=function(){return Fsn(this)},zW(A9n,"EdgeRouterFactory",645),sDn(1485,1,y9n,ml),uZn.rg=function(n){return RFn(uG(n,36))},uZn.Kf=function(n,t){WXn(uG(n,36),t)},zW(A9n,"OrthogonalEdgeRouter",1485),sDn(1478,1,y9n,KI),uZn.rg=function(n){return oSn(uG(n,36))},uZn.Kf=function(n,t){XQn(this,uG(n,36),t)},zW(A9n,"PolylineEdgeRouter",1478),sDn(1479,1,A2n,oa),uZn.Lb=function(n){return shn(uG(n,10))},uZn.Fb=function(n){return this===n},uZn.Mb=function(n){return shn(uG(n,10))},zW(A9n,"PolylineEdgeRouter/1",1479),sDn(1872,1,y1n,ua),uZn.Mb=function(n){return uG(n,132).c==(_7(),$St)},zW(L9n,"HyperEdgeCycleDetector/lambda$0$Type",1872),sDn(1873,1,{},sa),uZn.Ze=function(n){return uG(n,132).d},zW(L9n,"HyperEdgeCycleDetector/lambda$1$Type",1873),sDn(1874,1,y1n,ha),uZn.Mb=function(n){return uG(n,132).c==(_7(),$St)},zW(L9n,"HyperEdgeCycleDetector/lambda$2$Type",1874),sDn(1875,1,{},fa),uZn.Ze=function(n){return uG(n,132).d},zW(L9n,"HyperEdgeCycleDetector/lambda$3$Type",1875),sDn(1876,1,{},la),uZn.Ze=function(n){return uG(n,132).d},zW(L9n,"HyperEdgeCycleDetector/lambda$4$Type",1876),sDn(1877,1,{},aa),uZn.Ze=function(n){return uG(n,132).d},zW(L9n,"HyperEdgeCycleDetector/lambda$5$Type",1877),sDn(118,1,{34:1,118:1},nhn),uZn.Fd=function(n){return IT(this,uG(n,118))},uZn.Fb=function(n){var t;return!!F$(n,118)&&(t=uG(n,118),this.g==t.g)},uZn.Hb=function(){return this.g},uZn.Ib=function(){var n,t,e,i;for(n=new lx("{"),i=new Ww(this.n);i.a"+this.b+" ("+yR(this.c)+")"},uZn.d=0,zW(L9n,"HyperEdgeSegmentDependency",132),sDn(528,22,{3:1,34:1,22:1,528:1},qI);var RSt,KSt,FSt,_St,BSt,HSt,USt,GSt,qSt=_cn(L9n,"HyperEdgeSegmentDependency/DependencyType",528,Oat,k1,OH);sDn(1878,1,{},pp),zW(L9n,"HyperEdgeSegmentSplitter",1878),sDn(1879,1,{},hj),uZn.a=0,uZn.b=0,zW(L9n,"HyperEdgeSegmentSplitter/AreaRating",1879),sDn(339,1,{339:1},OU),uZn.a=0,uZn.b=0,uZn.c=0,zW(L9n,"HyperEdgeSegmentSplitter/FreeArea",339),sDn(1880,1,b2n,ba),uZn.Ne=function(n,t){return C_(uG(n,118),uG(t,118))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(L9n,"HyperEdgeSegmentSplitter/lambda$0$Type",1880),sDn(1881,1,QZn,pY),uZn.Cd=function(n){I5(this.a,this.d,this.c,this.b,uG(n,118))},uZn.b=0,zW(L9n,"HyperEdgeSegmentSplitter/lambda$1$Type",1881),sDn(1882,1,{},wa),uZn.Kb=function(n){return new fX(null,new h3(uG(n,118).e,16))},zW(L9n,"HyperEdgeSegmentSplitter/lambda$2$Type",1882),sDn(1883,1,{},da),uZn.Kb=function(n){return new fX(null,new h3(uG(n,118).j,16))},zW(L9n,"HyperEdgeSegmentSplitter/lambda$3$Type",1883),sDn(1884,1,{},ga),uZn.Ye=function(n){return uM(pK(n))},zW(L9n,"HyperEdgeSegmentSplitter/lambda$4$Type",1884),sDn(664,1,{},NW),uZn.a=0,uZn.b=0,uZn.c=0,zW(L9n,"OrthogonalRoutingGenerator",664),sDn(1703,1,{},pa),uZn.Kb=function(n){return new fX(null,new h3(uG(n,118).e,16))},zW(L9n,"OrthogonalRoutingGenerator/lambda$0$Type",1703),sDn(1704,1,{},ma),uZn.Kb=function(n){return new fX(null,new h3(uG(n,118).j,16))},zW(L9n,"OrthogonalRoutingGenerator/lambda$1$Type",1704),sDn(670,1,{}),zW(N9n,"BaseRoutingDirectionStrategy",670),sDn(1870,670,{},Rk),uZn.yg=function(n,t,i){var r,c,a,o,u,s,h,f,l,b,w,d,g;if(!n.r||n.q)for(f=t+n.o*i,h=new Ww(n.n);h.at4n&&(c=n,r=new MO(l,a=f),aq(o.a,r),VUn(this,o,c,r,!1),(b=n.r)&&(r=new MO(w=uM(pK(hyn(b.e,0))),a),aq(o.a,r),VUn(this,o,c,r,!1),c=b,r=new MO(w,a=t+b.o*i),aq(o.a,r),VUn(this,o,c,r,!1)),r=new MO(g,a),aq(o.a,r),VUn(this,o,c,r,!1)))},uZn.zg=function(n){return n.i.n.a+n.n.a+n.a.a},uZn.Ag=function(){return KQn(),KRt},uZn.Bg=function(){return KQn(),yRt},zW(N9n,"NorthToSouthRoutingStrategy",1870),sDn(1871,670,{},Kk),uZn.yg=function(n,t,i){var r,c,a,o,u,s,h,f,l,b,w,d,g;if(!n.r||n.q)for(f=t-n.o*i,h=new Ww(n.n);h.at4n&&(c=n,r=new MO(l,a=f),aq(o.a,r),VUn(this,o,c,r,!1),(b=n.r)&&(r=new MO(w=uM(pK(hyn(b.e,0))),a),aq(o.a,r),VUn(this,o,c,r,!1),c=b,r=new MO(w,a=t-b.o*i),aq(o.a,r),VUn(this,o,c,r,!1)),r=new MO(g,a),aq(o.a,r),VUn(this,o,c,r,!1)))},uZn.zg=function(n){return n.i.n.a+n.n.a+n.a.a},uZn.Ag=function(){return KQn(),yRt},uZn.Bg=function(){return KQn(),KRt},zW(N9n,"SouthToNorthRoutingStrategy",1871),sDn(1869,670,{},Fk),uZn.yg=function(n,t,i){var r,c,a,o,u,s,h,f,l,b,w,d,g;if(!n.r||n.q)for(f=t+n.o*i,h=new Ww(n.n);h.at4n&&(c=n,r=new MO(a=f,l),aq(o.a,r),VUn(this,o,c,r,!0),(b=n.r)&&(r=new MO(a,w=uM(pK(hyn(b.e,0)))),aq(o.a,r),VUn(this,o,c,r,!0),c=b,r=new MO(a=t+b.o*i,w),aq(o.a,r),VUn(this,o,c,r,!0)),r=new MO(a,g),aq(o.a,r),VUn(this,o,c,r,!0)))},uZn.zg=function(n){return n.i.n.b+n.n.b+n.a.b},uZn.Ag=function(){return KQn(),kRt},uZn.Bg=function(){return KQn(),_Rt},zW(N9n,"WestToEastRoutingStrategy",1869),sDn(828,1,{},jqn),uZn.Ib=function(){return vIn(this.a)},uZn.b=0,uZn.c=!1,uZn.d=!1,uZn.f=0,zW(D9n,"NubSpline",828),sDn(418,1,{418:1},pFn,R1),zW(D9n,"NubSpline/PolarCP",418),sDn(1480,1,y9n,zTn),uZn.rg=function(n){return HPn(uG(n,36))},uZn.Kf=function(n,t){EJn(this,uG(n,36),t)},zW(D9n,"SplineEdgeRouter",1480),sDn(274,1,{274:1},O7),uZn.Ib=function(){return this.a+" ->("+this.c+") "+this.b},uZn.c=0,zW(D9n,"SplineEdgeRouter/Dependency",274),sDn(465,22,{3:1,34:1,22:1,465:1},XI);var XSt,zSt,VSt,WSt,QSt,JSt=_cn(D9n,"SplineEdgeRouter/SideToProcess",465,Oat,S1,AH);sDn(1481,1,y1n,va),uZn.Mb=function(n){return uFn(),!uG(n,131).o},zW(D9n,"SplineEdgeRouter/lambda$0$Type",1481),sDn(1482,1,{},ka),uZn.Ze=function(n){return uFn(),uG(n,131).v+1},zW(D9n,"SplineEdgeRouter/lambda$1$Type",1482),sDn(1483,1,QZn,BI),uZn.Cd=function(n){yq(this.a,this.b,uG(n,42))},zW(D9n,"SplineEdgeRouter/lambda$2$Type",1483),sDn(1484,1,QZn,HI),uZn.Cd=function(n){Mq(this.a,this.b,uG(n,42))},zW(D9n,"SplineEdgeRouter/lambda$3$Type",1484),sDn(131,1,{34:1,131:1},UAn,Izn),uZn.Fd=function(n){return NT(this,uG(n,131))},uZn.b=0,uZn.e=!1,uZn.f=0,uZn.g=0,uZn.j=!1,uZn.k=!1,uZn.n=0,uZn.o=!1,uZn.p=!1,uZn.q=!1,uZn.s=0,uZn.u=0,uZn.v=0,uZn.F=0,zW(D9n,"SplineSegment",131),sDn(468,1,{468:1},ya),uZn.a=0,uZn.b=!1,uZn.c=!1,uZn.d=!1,uZn.e=!1,uZn.f=0,zW(D9n,"SplineSegment/EdgeInformation",468),sDn(1198,1,{},Ma),zW(_9n,q3n,1198),sDn(1199,1,b2n,Ta),uZn.Ne=function(n,t){return yNn(uG(n,121),uG(t,121))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(_9n,X3n,1199),sDn(1197,1,{},Gj),zW(_9n,"MrTree",1197),sDn(405,22,{3:1,34:1,22:1,405:1,188:1,196:1},zI),uZn.dg=function(){return TNn(this)},uZn.qg=function(){return TNn(this)};var YSt,ZSt=_cn(_9n,"TreeLayoutPhases",405,Oat,i5,LH);sDn(1112,205,M3n,FF),uZn.rf=function(n,t){var e,i,r,c,a,o,u;for(oM(gK(zDn(n,(QGn(),gCt))))||J1(new Sd((vP(),new Vy(n)))),(c=t.eh(B9n)).Ug("build tGraph",1),zsn(o=new L7,n),kfn(o,(OQn(),RPt),n),jUn(n,o,u=new Ym),eGn(n,o,u),a=o,c.Vg(),(c=t.eh(B9n)).Ug("Split graph",1),r=AUn(this.a,a),c.Vg(),i=new Ww(r);i.a"+V3(this.c):"e_"+Hon(this)},zW(U9n,"TEdge",65),sDn(121,137,{3:1,121:1,96:1,137:1},L7),uZn.Ib=function(){var n,t,e,i,r;for(r=null,i=Fkn(this.b,0);i.b!=i.d.c;)r+=(null==(e=uG(I6(i),40)).c||0==e.c.length?"n_"+e.g:"n_"+e.c)+"\n";for(t=Fkn(this.a,0);t.b!=t.d.c;)r+=((n=uG(I6(t),65)).b&&n.c?V3(n.b)+"->"+V3(n.c):"e_"+Hon(n))+"\n";return r};var nPt=zW(U9n,"TGraph",121);sDn(643,508,{3:1,508:1,643:1,96:1,137:1}),zW(U9n,"TShape",643),sDn(40,643,{3:1,508:1,40:1,643:1,96:1,137:1},wln),uZn.Ib=function(){return V3(this)};var tPt,ePt,iPt,rPt,cPt,aPt,oPt,uPt,sPt,hPt,fPt,lPt=zW(U9n,"TNode",40);sDn(236,1,t1n,Mp),uZn.Jc=function(n){z8(this,n)},uZn.Kc=function(){return new Tp(Fkn(this.a.d,0))},zW(U9n,"TNode/2",236),sDn(329,1,$Zn,Tp),uZn.Nb=function(n){SV(this,n)},uZn.Pb=function(){return uG(I6(this.a),65).c},uZn.Ob=function(){return Jj(this.a)},uZn.Qb=function(){yrn(this.a)},zW(U9n,"TNode/2/1",329),sDn(1923,1,Q4n,Oa),uZn.Kf=function(n,t){SYn(this,uG(n,121),t)},zW(q9n,"CompactionProcessor",1923),sDn(1924,1,b2n,jp),uZn.Ne=function(n,t){return ksn(this.a,uG(n,40),uG(t,40))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(q9n,"CompactionProcessor/lambda$0$Type",1924),sDn(1925,1,y1n,GI),uZn.Mb=function(n){return xZ(this.b,this.a,uG(n,42))},uZn.a=0,uZn.b=0,zW(q9n,"CompactionProcessor/lambda$1$Type",1925),sDn(1934,1,b2n,Aa),uZn.Ne=function(n,t){return vW(uG(n,40),uG(t,40))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(q9n,"CompactionProcessor/lambda$10$Type",1934),sDn(1935,1,b2n,La),uZn.Ne=function(n,t){return Kx(uG(n,40),uG(t,40))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(q9n,"CompactionProcessor/lambda$11$Type",1935),sDn(1936,1,b2n,Na),uZn.Ne=function(n,t){return kW(uG(n,40),uG(t,40))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(q9n,"CompactionProcessor/lambda$12$Type",1936),sDn(1926,1,y1n,Ep),uZn.Mb=function(n){return hD(this.a,uG(n,42))},uZn.a=0,zW(q9n,"CompactionProcessor/lambda$2$Type",1926),sDn(1927,1,y1n,Sp),uZn.Mb=function(n){return fD(this.a,uG(n,42))},uZn.a=0,zW(q9n,"CompactionProcessor/lambda$3$Type",1927),sDn(1928,1,y1n,$a),uZn.Mb=function(n){return-1==uG(n,40).c.indexOf(H9n)},zW(q9n,"CompactionProcessor/lambda$4$Type",1928),sDn(1929,1,{},Pp),uZn.Kb=function(n){return a6(this.a,uG(n,40))},uZn.a=0,zW(q9n,"CompactionProcessor/lambda$5$Type",1929),sDn(1930,1,{},Cp),uZn.Kb=function(n){return ren(this.a,uG(n,40))},uZn.a=0,zW(q9n,"CompactionProcessor/lambda$6$Type",1930),sDn(1931,1,b2n,Ip),uZn.Ne=function(n,t){return G9(this.a,uG(n,240),uG(t,240))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(q9n,"CompactionProcessor/lambda$7$Type",1931),sDn(1932,1,b2n,Op),uZn.Ne=function(n,t){return q9(this.a,uG(n,40),uG(t,40))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(q9n,"CompactionProcessor/lambda$8$Type",1932),sDn(1933,1,b2n,Da),uZn.Ne=function(n,t){return Fx(uG(n,40),uG(t,40))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(q9n,"CompactionProcessor/lambda$9$Type",1933),sDn(1921,1,Q4n,xa),uZn.Kf=function(n,t){cBn(uG(n,121),t)},zW(q9n,"DirectionProcessor",1921),sDn(1913,1,Q4n,KF),uZn.Kf=function(n,t){JUn(this,uG(n,121),t)},zW(q9n,"FanProcessor",1913),sDn(1937,1,Q4n,Ra),uZn.Kf=function(n,t){N_n(uG(n,121),t)},zW(q9n,"GraphBoundsProcessor",1937),sDn(1938,1,{},Ka),uZn.Ye=function(n){return uG(n,40).e.a},zW(q9n,"GraphBoundsProcessor/lambda$0$Type",1938),sDn(1939,1,{},Fa),uZn.Ye=function(n){return uG(n,40).e.b},zW(q9n,"GraphBoundsProcessor/lambda$1$Type",1939),sDn(1940,1,{},_a),uZn.Ye=function(n){return lP(uG(n,40))},zW(q9n,"GraphBoundsProcessor/lambda$2$Type",1940),sDn(1941,1,{},Ba),uZn.Ye=function(n){return fP(uG(n,40))},zW(q9n,"GraphBoundsProcessor/lambda$3$Type",1941),sDn(262,22,{3:1,34:1,22:1,262:1,196:1},VI),uZn.dg=function(){switch(this.g){case 0:return new sy;case 1:return new KF;case 2:return new uy;case 3:return new Xa;case 4:return new Ua;case 8:return new Ha;case 5:return new xa;case 6:return new Va;case 7:return new Oa;case 9:return new Ra;case 10:return new Wa;default:throw hv(new vM(v6n+(null!=this.f?this.f:""+this.g)))}};var bPt,wPt,dPt,gPt,pPt=_cn(q9n,k6n,262,Oat,usn,NH);sDn(1920,1,Q4n,Ha),uZn.Kf=function(n,t){xQn(uG(n,121),t)},zW(q9n,"LevelCoordinatesProcessor",1920),sDn(1918,1,Q4n,Ua),uZn.Kf=function(n,t){ZRn(this,uG(n,121),t)},uZn.a=0,zW(q9n,"LevelHeightProcessor",1918),sDn(1919,1,t1n,Ga),uZn.Jc=function(n){z8(this,n)},uZn.Kc=function(){return hZ(),wS(),Qot},zW(q9n,"LevelHeightProcessor/1",1919),sDn(1914,1,Q4n,uy),uZn.Kf=function(n,t){g_n(this,uG(n,121),t)},zW(q9n,"LevelProcessor",1914),sDn(1915,1,y1n,qa),uZn.Mb=function(n){return oM(gK(oIn(uG(n,40),(OQn(),UPt))))},zW(q9n,"LevelProcessor/lambda$0$Type",1915),sDn(1916,1,Q4n,Xa),uZn.Kf=function(n,t){DAn(this,uG(n,121),t)},uZn.a=0,zW(q9n,"NeighborsProcessor",1916),sDn(1917,1,t1n,za),uZn.Jc=function(n){z8(this,n)},uZn.Kc=function(){return hZ(),wS(),Qot},zW(q9n,"NeighborsProcessor/1",1917),sDn(1922,1,Q4n,Va),uZn.Kf=function(n,t){QUn(this,uG(n,121),t)},uZn.a=0,zW(q9n,"NodePositionProcessor",1922),sDn(1912,1,Q4n,sy),uZn.Kf=function(n,t){Ezn(this,uG(n,121),t)},zW(q9n,"RootProcessor",1912),sDn(1942,1,Q4n,Wa),uZn.Kf=function(n,t){Wyn(uG(n,121),t)},zW(q9n,"Untreeifyer",1942),sDn(392,22,{3:1,34:1,22:1,392:1},WI);var mPt,vPt,kPt,yPt,MPt,TPt,jPt,EPt,SPt,PPt,CPt,IPt,OPt,APt,LPt,NPt,$Pt,DPt,xPt,RPt,KPt,FPt,_Pt,BPt,HPt,UPt,GPt,qPt,XPt,zPt,VPt,WPt,QPt,JPt,YPt,ZPt,nCt,tCt,eCt,iCt,rCt,cCt,aCt,oCt,uCt,sCt,hCt,fCt,lCt,bCt,wCt,dCt,gCt,pCt,mCt,vCt,kCt,yCt,MCt,TCt,jCt,ECt,SCt,PCt,CCt,ICt,OCt,ACt,LCt,NCt,$Ct,DCt,xCt,RCt=_cn(W9n,"EdgeRoutingMode",392,Oat,t3,$H);sDn(862,1,K2n,vl),uZn.hf=function(n){Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,J9n),""),r7n),"Turns on Tree compaction which decreases the size of the whole tree by placing nodes of multiple levels in one large level"),(qx(),!1)),(lAn(),wNt)),cot),ggn((Rkn(),hNt))))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,Y9n),""),"Edge End Texture Length"),"Should be set to the length of the texture at the end of an edge. This value can be used to improve the Edge Routing."),7),dNt),fot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,Z9n),""),"Tree Level"),"The index for the tree level the node is in"),xwn(0)),mNt),dot),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,n7n),""),r7n),"When set to a positive number this option will force the algorithm to place the node to the specified position within the trees layer if weighting is set to constraint"),xwn(-1)),mNt),dot),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,t7n),""),"Weighting of Nodes"),"Which weighting to use when computing a node order."),tCt),gNt),BCt),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,e7n),""),"Edge Routing Mode"),"Chooses an Edge Routing algorithm."),WPt),gNt),RCt),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,i7n),""),"Search Order"),"Which search order to use when computing a spanning tree."),YPt),gNt),QCt),ggn(hNt)))),yJn((new Ml,n))},zW(W9n,"MrTreeMetaDataProvider",862),sDn(1006,1,K2n,Ml),uZn.hf=function(n){yJn(n)},zW(W9n,"MrTreeOptions",1006),sDn(1007,1,{},Qa),uZn.sf=function(){return new FF},uZn.tf=function(n){},zW(W9n,"MrTreeOptions/MrtreeFactory",1007),sDn(353,22,{3:1,34:1,22:1,353:1},QI);var KCt,FCt,_Ct,BCt=_cn(W9n,"OrderWeighting",353,Oat,r5,DH);sDn(433,22,{3:1,34:1,22:1,433:1},JI);var HCt,UCt,GCt,qCt,XCt,zCt,VCt,WCt,QCt=_cn(W9n,"TreeifyingOrder",433,Oat,j1,xH);sDn(1486,1,y9n,Tl),uZn.rg=function(n){return uG(n,121),UCt},uZn.Kf=function(n,t){$un(this,uG(n,121),t)},zW("org.eclipse.elk.alg.mrtree.p1treeify","DFSTreeifyer",1486),sDn(1487,1,y9n,jl),uZn.rg=function(n){return uG(n,121),GCt},uZn.Kf=function(n,t){E_n(this,uG(n,121),t)},zW(u7n,"NodeOrderer",1487),sDn(1494,1,{},lo),uZn.td=function(n){return Nq(n)},zW(u7n,"NodeOrderer/0methodref$lambda$6$Type",1494),sDn(1488,1,y1n,bo),uZn.Mb=function(n){return ncn(),oM(gK(oIn(uG(n,40),(OQn(),UPt))))},zW(u7n,"NodeOrderer/lambda$0$Type",1488),sDn(1489,1,y1n,wo),uZn.Mb=function(n){return ncn(),uG(oIn(uG(n,40),(QGn(),kCt)),17).a<0},zW(u7n,"NodeOrderer/lambda$1$Type",1489),sDn(1490,1,y1n,Lp),uZn.Mb=function(n){return _an(this.a,uG(n,40))},zW(u7n,"NodeOrderer/lambda$2$Type",1490),sDn(1491,1,y1n,Ap),uZn.Mb=function(n){return f6(this.a,uG(n,40))},zW(u7n,"NodeOrderer/lambda$3$Type",1491),sDn(1492,1,b2n,go),uZn.Ne=function(n,t){return frn(uG(n,40),uG(t,40))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(u7n,"NodeOrderer/lambda$4$Type",1492),sDn(1493,1,y1n,po),uZn.Mb=function(n){return ncn(),0!=uG(oIn(uG(n,40),(OQn(),EPt)),17).a},zW(u7n,"NodeOrderer/lambda$5$Type",1493),sDn(1495,1,y9n,yl),uZn.rg=function(n){return uG(n,121),qCt},uZn.Kf=function(n,t){cUn(this,uG(n,121),t)},uZn.b=0,zW("org.eclipse.elk.alg.mrtree.p3place","NodePlacer",1495),sDn(1496,1,y9n,kl),uZn.rg=function(n){return uG(n,121),XCt},uZn.Kf=function(n,t){gHn(uG(n,121),t)},zW(s7n,"EdgeRouter",1496),sDn(1498,1,b2n,fo),uZn.Ne=function(n,t){return d$(uG(n,17).a,uG(t,17).a)},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(s7n,"EdgeRouter/0methodref$compare$Type",1498),sDn(1503,1,{},Ya),uZn.Ye=function(n){return uM(pK(n))},zW(s7n,"EdgeRouter/1methodref$doubleValue$Type",1503),sDn(1505,1,b2n,Za),uZn.Ne=function(n,t){return ugn(uM(pK(n)),uM(pK(t)))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(s7n,"EdgeRouter/2methodref$compare$Type",1505),sDn(1507,1,b2n,no),uZn.Ne=function(n,t){return ugn(uM(pK(n)),uM(pK(t)))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(s7n,"EdgeRouter/3methodref$compare$Type",1507),sDn(1509,1,{},Ja),uZn.Ye=function(n){return uM(pK(n))},zW(s7n,"EdgeRouter/4methodref$doubleValue$Type",1509),sDn(1511,1,b2n,to),uZn.Ne=function(n,t){return ugn(uM(pK(n)),uM(pK(t)))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(s7n,"EdgeRouter/5methodref$compare$Type",1511),sDn(1513,1,b2n,eo),uZn.Ne=function(n,t){return ugn(uM(pK(n)),uM(pK(t)))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(s7n,"EdgeRouter/6methodref$compare$Type",1513),sDn(1497,1,{},io),uZn.Kb=function(n){return tcn(),uG(oIn(uG(n,40),(QGn(),ACt)),17)},zW(s7n,"EdgeRouter/lambda$0$Type",1497),sDn(1508,1,{},ro),uZn.Kb=function(n){return CR(uG(n,40))},zW(s7n,"EdgeRouter/lambda$11$Type",1508),sDn(1510,1,{},dO),uZn.Kb=function(n){return vq(this.b,this.a,uG(n,40))},uZn.a=0,uZn.b=0,zW(s7n,"EdgeRouter/lambda$13$Type",1510),sDn(1512,1,{},gO),uZn.Kb=function(n){return IR(this.b,this.a,uG(n,40))},uZn.a=0,uZn.b=0,zW(s7n,"EdgeRouter/lambda$15$Type",1512),sDn(1514,1,b2n,co),uZn.Ne=function(n,t){return Gkn(uG(n,65),uG(t,65))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(s7n,"EdgeRouter/lambda$17$Type",1514),sDn(1515,1,b2n,ao),uZn.Ne=function(n,t){return qkn(uG(n,65),uG(t,65))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(s7n,"EdgeRouter/lambda$18$Type",1515),sDn(1516,1,b2n,oo),uZn.Ne=function(n,t){return zkn(uG(n,65),uG(t,65))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(s7n,"EdgeRouter/lambda$19$Type",1516),sDn(1499,1,y1n,Np),uZn.Mb=function(n){return n0(this.a,uG(n,40))},uZn.a=0,zW(s7n,"EdgeRouter/lambda$2$Type",1499),sDn(1517,1,b2n,uo),uZn.Ne=function(n,t){return Xkn(uG(n,65),uG(t,65))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(s7n,"EdgeRouter/lambda$20$Type",1517),sDn(1500,1,b2n,so),uZn.Ne=function(n,t){return TG(uG(n,40),uG(t,40))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(s7n,"EdgeRouter/lambda$3$Type",1500),sDn(1501,1,b2n,ho),uZn.Ne=function(n,t){return jG(uG(n,40),uG(t,40))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(s7n,"EdgeRouter/lambda$4$Type",1501),sDn(1502,1,{},mo),uZn.Kb=function(n){return OR(uG(n,40))},zW(s7n,"EdgeRouter/lambda$5$Type",1502),sDn(1504,1,{},pO),uZn.Kb=function(n){return kq(this.b,this.a,uG(n,40))},uZn.a=0,uZn.b=0,zW(s7n,"EdgeRouter/lambda$7$Type",1504),sDn(1506,1,{},mO),uZn.Kb=function(n){return AR(this.b,this.a,uG(n,40))},uZn.a=0,uZn.b=0,zW(s7n,"EdgeRouter/lambda$9$Type",1506),sDn(675,1,{675:1},wTn),uZn.e=0,uZn.f=!1,uZn.g=!1,zW(s7n,"MultiLevelEdgeNodeNodeGap",675),sDn(1943,1,b2n,vo),uZn.Ne=function(n,t){return l2(uG(n,240),uG(t,240))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(s7n,"MultiLevelEdgeNodeNodeGap/lambda$0$Type",1943),sDn(1944,1,b2n,ko),uZn.Ne=function(n,t){return b2(uG(n,240),uG(t,240))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(s7n,"MultiLevelEdgeNodeNodeGap/lambda$1$Type",1944),sDn(501,22,{3:1,34:1,22:1,501:1,188:1,196:1},YI),uZn.dg=function(){return Fpn(this)},uZn.qg=function(){return Fpn(this)};var JCt,YCt,ZCt,nIt,tIt,eIt,iIt=_cn(h7n,"RadialLayoutPhases",501,Oat,p1,RH);sDn(1113,205,M3n,Uj),uZn.rf=function(n,t){var e,i,r,c;if(e=_Kn(this,n),t.Ug("Radial layout",e.c.length),oM(gK(zDn(n,(jOn(),RIt))))||J1(new Sd((vP(),new Vy(n)))),c=XPn(n),Myn(n,(SK(),zCt),c),!c)throw hv(new vM("The given graph is not a tree!"));for(0==(i=uM(pK(zDn(n,HIt))))&&(i=tNn(n)),Myn(n,HIt,i),r=new Ww(_Kn(this,n));r.a=3)for(v=uG(zrn(p,0),27),k=uG(zrn(p,1),27),r=0;r+2=v.f+k.f+u||k.f>=m.f+v.f+u){y=!0;break}++r}else y=!0;if(!y){for(h=p.i,c=new DD(p);c.e!=c.i.gc();)Myn(uG(Zkn(c),27),(XYn(),vDt),xwn(h)),--h;return XGn(n,new fy),void t.Vg()}for(_J(this.a),JV(this.a,(Jmn(),oOt),uG(zDn(n,mAt),188)),JV(this.a,uOt,uG(zDn(n,sAt),188)),JV(this.a,sOt,uG(zDn(n,dAt),188)),ZL(this.a,(Aq(T=new wJ,oOt,(Zyn(),wOt)),Aq(T,uOt,bOt),oM(gK(zDn(n,YOt)))&&Aq(T,oOt,lOt),T)),o=1/(i=Qzn(this.a,n)).c.length,l=new Ww(i);l.a0&&Qbn((s3(t-1,n.length),n.charCodeAt(t-1)),c6n);)--t;if(e>=t)throw hv(new vM("The given string does not contain any numbers."));if(2!=(i=WGn((Knn(e,t,n.length),n.substr(e,t-e)),",|;|\r|\n")).length)throw hv(new vM("Exactly two numbers are expected, "+i.length+" were found."));try{this.a=YIn(KAn(i[0])),this.b=YIn(KAn(i[1]))}catch(r){throw F$(r=Ehn(r),130)?hv(new vM(a6n+r)):hv(r)}},uZn.Ib=function(){return"("+this.a+","+this.b+")"},uZn.a=0,uZn.b=0;var PNt=zW(o6n,"KVector",8);sDn(75,67,{3:1,4:1,20:1,31:1,56:1,16:1,67:1,15:1,75:1,423:1},Uk,tj,UR),uZn.Pc=function(){return ibn(this)},uZn.cg=function(n){var t,e,i,r,c;e=WGn(n,",|;|\\(|\\)|\\[|\\]|\\{|\\}| |\t|\n"),BY(this);try{for(t=0,r=0,i=0,c=0;t0&&(r%2==0?i=YIn(e[t]):c=YIn(e[t]),r>0&&r%2!=0&&aq(this,new MO(i,c)),++r),++t}catch(a){throw F$(a=Ehn(a),130)?hv(new vM("The given string does not match the expected format for vectors."+a)):hv(a)}},uZn.Ib=function(){var n,t,e;for(n=new lx("("),t=Fkn(this,0);t.b!=t.d.c;)JA(n,(e=uG(I6(t),8)).a+","+e.b),t.b!=t.d.c&&(n.a+="; ");return(n.a+=")",n).a};var CNt,INt,ONt,ANt,LNt,NNt,$Nt=zW(o6n,"KVectorChain",75);sDn(255,22,{3:1,34:1,22:1,255:1},TO);var DNt,xNt,RNt,KNt,FNt,_Nt,BNt,HNt,UNt,GNt,qNt,XNt,zNt,VNt,WNt,QNt,JNt,YNt,ZNt,n$t=_cn(Unt,"Alignment",255,Oat,Ynn,oU);sDn(991,1,K2n,$l),uZn.hf=function(n){YUn(n)},zW(Unt,"BoxLayouterOptions",991),sDn(992,1,{},Ru),uZn.sf=function(){return new _u},uZn.tf=function(n){},zW(Unt,"BoxLayouterOptions/BoxFactory",992),sDn(298,22,{3:1,34:1,22:1,298:1},SO);var t$t,e$t,i$t,r$t,c$t,a$t,o$t,u$t,s$t,h$t,f$t,l$t,b$t,w$t,d$t,g$t,p$t,m$t,v$t,k$t,y$t,M$t,T$t,j$t,E$t,S$t,P$t,C$t,I$t,O$t,A$t,L$t,N$t,$$t,D$t,x$t,R$t,K$t,F$t,_$t,B$t,H$t,U$t,G$t,q$t,X$t,z$t,V$t,W$t,Q$t,J$t,Y$t,Z$t,nDt,tDt,eDt,iDt,rDt,cDt,aDt,oDt,uDt,sDt,hDt,fDt,lDt,bDt,wDt,dDt,gDt,pDt,mDt,vDt,kDt,yDt,MDt,TDt,jDt,EDt,SDt,PDt,CDt,IDt,ODt,ADt,LDt,NDt,$Dt,DDt,xDt,RDt,KDt,FDt,_Dt,BDt,HDt,UDt,GDt,qDt,XDt,zDt,VDt,WDt,QDt,JDt,YDt,ZDt,nxt,txt=_cn(Unt,"ContentAlignment",298,Oat,Znn,uU);sDn(699,1,K2n,Dl),uZn.hf=function(n){Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(zT(new xu,Vnt),""),"Layout Algorithm"),"Select a specific layout algorithm."),(lAn(),kNt)),$ot),ggn((Rkn(),hNt))))),Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(zT(new xu,Wnt),""),"Resolved Layout Algorithm"),"Meta data associated with the selected algorithm."),vNt),aNt),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,X8n),""),"Alignment"),"Alignment of the selected node relative to other nodes; the exact meaning depends on the used algorithm."),r$t),gNt),n$t),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(zT(new xu,R3n),""),"Aspect Ratio"),"The desired aspect ratio of the drawing, that is the quotient of width by height."),dNt),fot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(zT(new xu,Qnt),""),"Bend Points"),"A fixed list of bend points for the edge. This is used by the 'Fixed Layout' algorithm to specify a pre-defined routing for an edge. The vector chain must include the source point, any bend points, and the target point, so it must have at least two points."),vNt),$Nt),ggn(oNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,r9n),""),"Content Alignment"),"Specifies how the content of a node are aligned. Each node can individually control the alignment of its contents. I.e. if a node should be aligned top left in its parent node, the parent node should specify that option."),b$t),pNt),txt),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,q8n),""),"Debug Mode"),"Whether additional debug information shall be generated."),(qx(),!1)),wNt),cot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,W8n),""),l3n),"Overall direction of edges: horizontal (right / left) or vertical (down / up)."),g$t),gNt),axt),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,m8n),""),"Edge Routing"),"What kind of edge routing style should be applied for the content of a parent node. Algorithms may also set this option to single edges in order to mark them as splines. The bend point list of edges with this option set to SPLINES must be interpreted as control points for a piecewise cubic spline."),y$t),gNt),kxt),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,Xnt),""),"Expand Nodes"),"If active, nodes are expanded to fill the area of their parent."),!1),wNt),cot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,b8n),""),"Hierarchy Handling"),"Determines whether separate layout runs are triggered for different compound nodes in a hierarchical graph. Setting a node's hierarchy handling to `INCLUDE_CHILDREN` will lay out that node and all of its descendants in a single layout run, until a descendant is encountered which has its hierarchy handling set to `SEPARATE_CHILDREN`. In general, `SEPARATE_CHILDREN` will ensure that a new layout run is triggered for a node with that setting. Including multiple levels of hierarchy in a single layout run may allow cross-hierarchical edges to be laid out properly. If the root node is set to `INHERIT` (or not set at all), the default behavior is `SEPARATE_CHILDREN`."),S$t),gNt),Kxt),WX(hNt,Uhn(cT(MNt,1),p1n,170,0,[sNt]))))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,K3n),""),"Padding"),"The padding to be left to a parent element's border when placing child elements. This can also serve as an output option of a layout algorithm if node size calculation is setup appropriately."),Q$t),vNt),Sbt),WX(hNt,Uhn(cT(MNt,1),p1n,170,0,[sNt]))))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,f4n),""),"Interactive"),"Whether the algorithm should be run in interactive mode for the content of a parent node. What this means exactly depends on how the specific algorithm interprets this option. Usually in the interactive mode algorithms try to modify the current layout as little as possible."),!1),wNt),cot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,g9n),""),"interactive Layout"),"Whether the graph should be changeable interactively and by setting constraints"),!1),wNt),cot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,w4n),""),"Omit Node Micro Layout"),"Node micro layout comprises the computation of node dimensions (if requested), the placement of ports and their labels, and the placement of node labels. The functionality is implemented independent of any specific layout algorithm and shouldn't have any negative impact on the layout algorithm's performance itself. Yet, if any unforeseen behavior occurs, this option allows to deactivate the micro layout."),!1),wNt),cot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,l4n),""),"Port Constraints"),"Defines constraints of the position of the ports of a node."),hDt),gNt),mRt),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(zT(new xu,b9n),""),"Position"),"The position of a node, port, or label. This is used by the 'Fixed Layout' algorithm to specify a pre-defined position."),vNt),PNt),WX(sNt,Uhn(cT(MNt,1),p1n,170,0,[fNt,uNt]))))),Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(zT(new xu,a4n),""),"Priority"),"Defines the priority of an object; its meaning depends on the specific layout algorithm and the context where it is used."),mNt),dot),WX(sNt,Uhn(cT(MNt,1),p1n,170,0,[oNt]))))),Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(zT(new xu,s4n),""),"Randomization Seed"),"Seed used for pseudo-random number generators to control the layout algorithm. If the value is 0, the seed shall be determined pseudo-randomly (e.g. from the system time)."),mNt),dot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(zT(new xu,h4n),""),"Separate Connected Components"),"Whether each connected component should be processed separately."),wNt),cot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,c9n),""),"Junction Points"),"This option is not used as option, but as output of the layout algorithms. It is attached to edges and determines the points where junction symbols should be drawn in order to represent hyperedges with orthogonal routing. Whether such points are computed depends on the chosen layout algorithm and edge routing style. The points are put into the vector chain with no specific order."),N$t),vNt),$Nt),ggn(oNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,u9n),""),"Comment Box"),"Whether the node should be regarded as a comment box instead of a regular node. In that case its placement should be similar to how labels are handled. Any edges incident to a comment box specify to which graph elements the comment is related."),!1),wNt),cot),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,s9n),""),"Hypernode"),"Whether the node should be handled as a hypernode."),!1),wNt),cot),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(zT(new xu,Jnt),""),"Label Manager"),"Label managers can shorten labels upon a layout algorithm's request."),vNt),cUt),WX(hNt,Uhn(cT(MNt,1),p1n,170,0,[uNt]))))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,w9n),""),"Margins"),"Margins define additional space around the actual bounds of a graph element. For instance, ports or labels being placed on the outside of a node's border might introduce such a margin. The margin is used to guarantee non-overlap of other graph elements with those ports or labels."),D$t),vNt),hbt),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,U8n),""),"No Layout"),"No layout is done for the associated element. This is used to mark parts of a diagram to avoid their inclusion in the layout graph, or to mark parts of the layout graph to prevent layout engines from processing them. If you wish to exclude the contents of a compound node from automatic layout, while the node itself is still considered on its own layer, use the 'Fixed Layout' algorithm for that node."),!1),wNt),cot),WX(sNt,Uhn(cT(MNt,1),p1n,170,0,[oNt,fNt,uNt]))))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,Ynt),""),"Scale Factor"),"The scaling factor to be applied to the corresponding node in recursive layout. It causes the corresponding node's size to be adjusted, and its ports and labels to be sized and placed accordingly after the layout of that node has been determined (and before the node itself and its siblings are arranged). The scaling is not reverted afterwards, so the resulting layout graph contains the adjusted size and position data. This option is currently not supported if 'Layout Hierarchy' is set."),1),dNt),fot),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(zT(new xu,Znt),""),"Child Area Width"),"The width of the area occupied by the laid out children of a node."),dNt),fot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(zT(new xu,ntt),""),"Child Area Height"),"The height of the area occupied by the laid out children of a node."),dNt),fot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,k4n),""),Lnt),"Turns topdown layout on and off. If this option is enabled, hierarchical layout will be computed first for the root node and then for its children recursively. Layouts are then scaled down to fit the area provided by their parents. Graphs must follow a certain structure for topdown layout to work properly. {@link TopdownNodeTypes.PARALLEL_NODE} nodes must have children of type {@link TopdownNodeTypes.HIERARCHICAL_NODE} and must define {@link topdown.hierarchicalNodeWidth} and {@link topdown.hierarchicalNodeAspectRatio} for their children. Furthermore they need to be laid out using an algorithm that is a {@link TopdownLayoutProvider}. Hierarchical nodes can also be parents of other hierarchical nodes and can optionally use a {@link TopdownSizeApproximator} to dynamically set sizes during topdown layout. In this case {@link topdown.hierarchicalNodeWidth} and {@link topdown.hierarchicalNodeAspectRatio} should be set on the node itself rather than the parent. The values are then used by the size approximator as base values. Hierarchical nodes require the layout option {@link nodeSize.fixedGraphSize} to be true to prevent the algorithm used there from resizing the hierarchical node. This option is not supported if 'Hierarchy Handling' is set to 'INCLUDE_CHILDREN'"),!1),wNt),cot),ggn(hNt)))),H4(n,k4n,j4n,null),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,ttt),""),"Animate"),"Whether the shift from the old layout to the new computed layout shall be animated."),!0),wNt),cot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,ett),""),"Animation Time Factor"),"Factor for computation of animation time. The higher the value, the longer the animation time. If the value is 0, the resulting time is always equal to the minimum defined by 'Minimal Animation Time'."),xwn(100)),mNt),dot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,itt),""),"Layout Ancestors"),"Whether the hierarchy levels on the path from the selected element to the root of the diagram shall be included in the layout process."),!1),wNt),cot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,rtt),""),"Maximal Animation Time"),"The maximal time for animations, in milliseconds."),xwn(4e3)),mNt),dot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,ctt),""),"Minimal Animation Time"),"The minimal time for animations, in milliseconds."),xwn(400)),mNt),dot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,att),""),"Progress Bar"),"Whether a progress bar shall be displayed during layout computations."),!1),wNt),cot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,ott),""),"Validate Graph"),"Whether the graph shall be validated before any layout algorithm is applied. If this option is enabled and at least one error is found, the layout process is aborted and a message is shown to the user."),!1),wNt),cot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,utt),""),"Validate Options"),"Whether layout options shall be validated before any layout algorithm is applied. If this option is enabled and at least one error is found, the layout process is aborted and a message is shown to the user."),!0),wNt),cot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,stt),""),"Zoom to Fit"),"Whether the zoom level shall be set to view the whole diagram after layout."),!1),wNt),cot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,znt),"box"),"Box Layout Mode"),"Configures the packing mode used by the {@link BoxLayoutProvider}. If SIMPLE is not required (neither priorities are used nor the interactive mode), GROUP_DEC can improve the packing and decrease the area. GROUP_MIXED and GROUP_INC may, in very specific scenarios, work better."),u$t),gNt),SKt),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,A8n),v8n),"Comment Comment Spacing"),"Spacing to be preserved between a comment box and other comment boxes connected to the same node. The space left between comment boxes of different nodes is controlled by the node-node spacing."),10),dNt),fot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,L8n),v8n),"Comment Node Spacing"),"Spacing to be preserved between a node and its connected comment boxes. The space left between a node and the comments of another node is controlled by the node-node spacing."),10),dNt),fot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,D3n),v8n),"Components Spacing"),"Spacing to be preserved between pairs of connected components. This option is only relevant if 'separateConnectedComponents' is activated."),20),dNt),fot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,N8n),v8n),"Edge Spacing"),"Spacing to be preserved between any two edges. Note that while this can somewhat easily be satisfied for the segments of orthogonally drawn edges, it is harder for general polylines or splines."),10),dNt),fot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,u4n),v8n),"Edge Label Spacing"),"The minimal distance to be preserved between a label and the edge it is associated with. Note that the placement of a label is influenced by the 'edgelabels.placement' option."),2),dNt),fot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,$8n),v8n),"Edge Node Spacing"),"Spacing to be preserved between nodes and edges."),10),dNt),fot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,D8n),v8n),"Label Spacing"),"Determines the amount of space to be left between two labels of the same graph element."),0),dNt),fot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,K8n),v8n),"Label Node Spacing"),"Spacing to be preserved between labels and the border of node they are associated with. Note that the placement of a label is influenced by the 'nodelabels.placement' option."),5),dNt),fot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,x8n),v8n),"Horizontal spacing between Label and Port"),"Horizontal spacing to be preserved between labels and the ports they are associated with. Note that the placement of a label is influenced by the 'portlabels.placement' option."),1),dNt),fot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,R8n),v8n),"Vertical spacing between Label and Port"),"Vertical spacing to be preserved between labels and the ports they are associated with. Note that the placement of a label is influenced by the 'portlabels.placement' option."),1),dNt),fot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,o4n),v8n),"Node Spacing"),"The minimal distance to be preserved between each two nodes."),20),dNt),fot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,F8n),v8n),"Node Self Loop Spacing"),"Spacing to be preserved between a node and its self loops."),10),dNt),fot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,_8n),v8n),"Port Spacing"),"Spacing between pairs of ports of the same node."),10),dNt),fot),WX(hNt,Uhn(cT(MNt,1),p1n,170,0,[sNt]))))),Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(zT(new xu,B8n),v8n),"Individual Spacing"),"Allows to specify individual spacing values for graph elements that shall be different from the value specified for the element's parent."),vNt),AKt),WX(sNt,Uhn(cT(MNt,1),p1n,170,0,[oNt,fNt,uNt]))))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,d9n),v8n),"Additional Port Space"),"Additional space around the sets of ports on each node side. For each side of a node, this option can reserve additional space before and after the ports on each side. For example, a top spacing of 20 makes sure that the first port on the western and eastern side is 20 units away from the northern border."),KDt),vNt),hbt),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(zT(new xu,l9n),dtt),"Layout Partition"),"Partition to which the node belongs. This requires Layout Partitioning to be active. Nodes with lower partition IDs will appear to the left of nodes with higher partition IDs (assuming a left-to-right layout direction)."),mNt),dot),WX(hNt,Uhn(cT(MNt,1),p1n,170,0,[sNt]))))),H4(n,l9n,f9n,nDt),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,f9n),dtt),"Layout Partitioning"),"Whether to activate partitioned layout. This will allow to group nodes through the Layout Partition option. a pair of nodes with different partition indices is then placed such that the node with lower index is placed to the left of the other node (with left-to-right layout direction). Depending on the layout algorithm, this may only be guaranteed to work if all nodes have a layout partition configured, or at least if edges that cross partitions are not part of a partition-crossing cycle."),Y$t),wNt),cot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,Q8n),gtt),"Node Label Padding"),"Define padding for node labels that are placed inside of a node."),R$t),vNt),Sbt),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,m4n),gtt),"Node Label Placement"),"Hints for where node labels are to be placed; if empty, the node label's position is not modified."),F$t),pNt),eRt),WX(sNt,Uhn(cT(MNt,1),p1n,170,0,[uNt]))))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,Z8n),ptt),"Port Alignment"),"Defines the default port distribution for a node. May be overridden for each side individually."),eDt),gNt),hRt),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(zT(new xu,n9n),ptt),"Port Alignment (North)"),"Defines how ports on the northern side are placed, overriding the node's general port alignment."),gNt),hRt),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(zT(new xu,t9n),ptt),"Port Alignment (South)"),"Defines how ports on the southern side are placed, overriding the node's general port alignment."),gNt),hRt),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(zT(new xu,e9n),ptt),"Port Alignment (West)"),"Defines how ports on the western side are placed, overriding the node's general port alignment."),gNt),hRt),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(zT(new xu,i9n),ptt),"Port Alignment (East)"),"Defines how ports on the eastern side are placed, overriding the node's general port alignment."),gNt),hRt),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,p4n),mtt),"Node Size Constraints"),"What should be taken into account when calculating a node's size. Empty size constraints specify that a node's size is already fixed and should not be changed."),B$t),pNt),sKt),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,g4n),mtt),"Node Size Options"),"Options modifying the behavior of the size constraints set on a node. Each member of the set specifies something that should be taken into account when calculating node sizes. The empty set corresponds to no further modifications."),X$t),pNt),wKt),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,x4n),mtt),"Node Size Minimum"),"The minimal size to which a node can be reduced."),G$t),vNt),PNt),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,d4n),mtt),"Fixed Graph Size"),"By default, the fixed layout provider will enlarge a graph until it is large enough to contain its children. If this option is set, it won't do so."),!1),wNt),cot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,a9n),I8n),"Edge Label Placement"),"Gives a hint on where to put edge labels."),v$t),gNt),lxt),ggn(uNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,b4n),I8n),"Inline Edge Labels"),"If true, an edge label is placed directly on its edge. May only apply to center edge labels. This kind of label placement is only advisable if the label's rendering is such that it is not crossed by its edge and thus stays legible."),!1),wNt),cot),ggn(uNt)))),Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(zT(new xu,htt),"font"),"Font Name"),"Font name used for a label."),kNt),$ot),ggn(uNt)))),Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(zT(new xu,ftt),"font"),"Font Size"),"Font size used for a label."),mNt),dot),ggn(uNt)))),Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(zT(new xu,h9n),vtt),"Port Anchor Offset"),"The offset to the port position where connections shall be attached."),vNt),PNt),ggn(fNt)))),Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(zT(new xu,o9n),vtt),"Port Index"),"The index of a port in the fixed order around a node. The order is assumed as clockwise, starting with the leftmost port on the top side. This option must be set if 'Port Constraints' is set to FIXED_ORDER and no specific positions are given for the ports. Additionally, the option 'Port Side' must be defined in this case."),mNt),dot),ggn(fNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,G8n),vtt),"Port Side"),"The side of a node on which a port is situated. This option must be set if 'Port Constraints' is set to FIXED_SIDE or FIXED_ORDER and no specific positions are given for the ports."),pDt),gNt),YRt),ggn(fNt)))),Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(zT(new xu,H8n),vtt),"Port Border Offset"),"The offset of ports on the node border. With a positive offset the port is moved outside of the node, while with a negative offset the port is moved towards the inside. An offset of 0 means that the port is placed directly on the node border, i.e. if the port side is north, the port's south border touches the nodes's north border; if the port side is east, the port's west border touches the nodes's east border; if the port side is south, the port's north border touches the node's south border; if the port side is west, the port's east border touches the node's west border."),dNt),fot),ggn(fNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,v4n),ktt),"Port Label Placement"),"Decides on a placement method for port labels; if empty, the node label's position is not modified."),wDt),pNt),BRt),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,J8n),ktt),"Port Labels Next to Port"),"Use 'portLabels.placement': NEXT_TO_PORT_OF_POSSIBLE."),!1),wNt),cot),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,Y8n),ktt),"Treat Port Labels as Group"),"If this option is true (default), the labels of a port will be treated as a group when it comes to centering them next to their port. If this option is false, only the first label will be centered next to the port, with the others being placed below. This only applies to labels of eastern and western ports and will have no effect if labels are not placed next to their port."),!0),wNt),cot),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,y4n),ytt),"Topdown Scale Factor"),"The scaling factor to be applied to the nodes laid out within the node in recursive topdown layout. The difference to 'Scale Factor' is that the node itself is not scaled. This value has to be set on hierarchical nodes."),1),dNt),fot),ggn(hNt)))),H4(n,y4n,j4n,zDt),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,ltt),ytt),"Topdown Size Approximator"),"The size approximator to be used to set sizes of hierarchical nodes during topdown layout. The default value is null, which results in nodes keeping whatever size is defined for them e.g. through parent parallel node or by manually setting the size."),null),gNt),jKt),ggn(sNt)))),H4(n,ltt,j4n,WDt),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,M4n),ytt),"Topdown Hierarchical Node Width"),"The fixed size of a hierarchical node when using topdown layout. If this value is set on a parallel node it applies to its children, when set on a hierarchical node it applies to the node itself."),150),dNt),fot),WX(hNt,Uhn(cT(MNt,1),p1n,170,0,[sNt]))))),H4(n,M4n,j4n,null),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,T4n),ytt),"Topdown Hierarchical Node Aspect Ratio"),"The fixed aspect ratio of a hierarchical node when using topdown layout. Default is 1/sqrt(2). If this value is set on a parallel node it applies to its children, when set on a hierarchical node it applies to the node itself."),1.414),dNt),fot),WX(hNt,Uhn(cT(MNt,1),p1n,170,0,[sNt]))))),H4(n,T4n,j4n,null),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,j4n),ytt),"Topdown Node Type"),"The different node types used for topdown layout. If the node type is set to {@link TopdownNodeTypes.PARALLEL_NODE} the algorithm must be set to a {@link TopdownLayoutProvider} such as {@link TopdownPacking}. The {@link nodeSize.fixedGraphSize} option is technically only required for hierarchical nodes."),null),gNt),mKt),ggn(sNt)))),H4(n,j4n,d4n,null),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,btt),ytt),"Topdown Scale Cap"),"Determines the upper limit for the topdown scale factor. The default value is 1.0 which ensures that nested children never end up appearing larger than their parents in terms of unit sizes such as the font size. If the limit is larger, nodes will fully utilize the available space, but it is counteriniuitive for inner nodes to have a larger scale than outer nodes."),1),dNt),fot),ggn(hNt)))),H4(n,btt,j4n,qDt),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,z8n),Mtt),"Activate Inside Self Loops"),"Whether this node allows to route self loops inside of it instead of around it. If set to true, this will make the node a compound node if it isn't already, and will require the layout algorithm to support compound nodes with hierarchical ports."),!1),wNt),cot),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,V8n),Mtt),"Inside Self Loop"),"Whether a self loop should be routed inside a node instead of around that node."),!1),wNt),cot),ggn(oNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,x3n),"edge"),"Edge Thickness"),"The thickness of an edge. This is a hint on the line width used to draw an edge, possibly requiring more space to be reserved for it."),1),dNt),fot),ggn(oNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,wtt),"edge"),"Edge Type"),"The type of an edge. This is usually used for UML class diagrams, where associations must be handled differently from generalizations."),T$t),gNt),Lxt),ggn(oNt)))),sP(n,new I2(BT(UT(HT(new du,S0n),"Layered"),'The layer-based method was introduced by Sugiyama, Tagawa and Toda in 1981. It emphasizes the direction of edges by pointing as many edges as possible into the same direction. The nodes are arranged in layers, which are sometimes called "hierarchies", and then reordered such that the number of edge crossings is minimized. Afterwards, concrete coordinates are computed for the nodes and edge bend points.'))),sP(n,new I2(BT(UT(HT(new du,"org.eclipse.elk.orthogonal"),"Orthogonal"),'Orthogonal methods that follow the "topology-shape-metrics" approach by Batini, Nardelli and Tamassia \'86. The first phase determines the topology of the drawing by applying a planarization technique, which results in a planar representation of the graph. The orthogonal shape is computed in the second phase, which aims at minimizing the number of edge bends, and is called orthogonalization. The third phase leads to concrete coordinates for nodes and edge bend points by applying a compaction method, thus defining the metrics.'))),sP(n,new I2(BT(UT(HT(new du,c4n),"Force"),"Layout algorithms that follow physical analogies by simulating a system of attractive and repulsive forces. The first successful method of this kind was proposed by Eades in 1984."))),sP(n,new I2(BT(UT(HT(new du,"org.eclipse.elk.circle"),"Circle"),"Circular layout algorithms emphasize cycles or biconnected components of a graph by arranging them in circles. This is useful if a drawing is desired where such components are clearly grouped, or where cycles are shown as prominent OPTIONS of the graph."))),sP(n,new I2(BT(UT(HT(new du,a7n),"Tree"),"Specialized layout methods for trees, i.e. acyclic graphs. The regular structure of graphs that have no undirected cycles can be emphasized using an algorithm of this type."))),sP(n,new I2(BT(UT(HT(new du,"org.eclipse.elk.planar"),"Planar"),"Algorithms that require a planar or upward planar graph. Most of these algorithms are theoretically interesting, but not practically usable."))),sP(n,new I2(BT(UT(HT(new du,x7n),"Radial"),"Radial layout algorithms usually position the nodes of the graph on concentric circles."))),kHn((new xl,n)),YUn((new $l,n)),A_n((new Rl,n))},zW(Unt,"CoreOptions",699),sDn(88,22,{3:1,34:1,22:1,88:1},PO);var ext,ixt,rxt,cxt,axt=_cn(Unt,l3n,88,Oat,H8,sU);sDn(278,22,{3:1,34:1,22:1,278:1},CO);var oxt,uxt,sxt,hxt,fxt,lxt=_cn(Unt,"EdgeLabelPlacement",278,Oat,y3,hU);sDn(223,22,{3:1,34:1,22:1,223:1},IO);var bxt,wxt,dxt,gxt,pxt,mxt,vxt,kxt=_cn(Unt,"EdgeRouting",223,Oat,u5,fU);sDn(321,22,{3:1,34:1,22:1,321:1},OO);var yxt,Mxt,Txt,jxt,Ext,Sxt,Pxt,Cxt,Ixt,Oxt,Axt,Lxt=_cn(Unt,"EdgeType",321,Oat,Jnn,lU);sDn(989,1,K2n,xl),uZn.hf=function(n){kHn(n)},zW(Unt,"FixedLayouterOptions",989),sDn(990,1,{},Ku),uZn.sf=function(){return new Wu},uZn.tf=function(n){},zW(Unt,"FixedLayouterOptions/FixedFactory",990),sDn(346,22,{3:1,34:1,22:1,346:1},AO);var Nxt,$xt,Dxt,xxt,Rxt,Kxt=_cn(Unt,"HierarchyHandling",346,Oat,v3,bU);sDn(291,22,{3:1,34:1,22:1,291:1},LO);var Fxt,_xt,Bxt,Hxt,Uxt,Gxt,qxt,Xxt,zxt,Vxt,Wxt=_cn(Unt,"LabelSide",291,Oat,o5,wU);sDn(95,22,{3:1,34:1,22:1,95:1},NO);var Qxt,Jxt,Yxt,Zxt,nRt,tRt,eRt=_cn(Unt,"NodeLabelPlacement",95,Oat,bcn,dU);sDn(256,22,{3:1,34:1,22:1,256:1},$O);var iRt,rRt,cRt,aRt,oRt,uRt,sRt,hRt=_cn(Unt,"PortAlignment",256,Oat,p9,gU);sDn(101,22,{3:1,34:1,22:1,101:1},DO);var fRt,lRt,bRt,wRt,dRt,gRt,pRt,mRt=_cn(Unt,"PortConstraints",101,Oat,Qnn,pU);sDn(279,22,{3:1,34:1,22:1,279:1},xO);var vRt,kRt,yRt,MRt,TRt,jRt,ERt,SRt,PRt,CRt,IRt,ORt,ARt,LRt,NRt,$Rt,DRt,xRt,RRt,KRt,FRt,_Rt,BRt=_cn(Unt,"PortLabelPlacement",279,Oat,Wnn,mU);sDn(64,22,{3:1,34:1,22:1,64:1},RO);var HRt,URt,GRt,qRt,XRt,zRt,VRt,WRt,QRt,JRt,YRt=_cn(Unt,"PortSide",64,Oat,U8,vU);sDn(993,1,K2n,Rl),uZn.hf=function(n){A_n(n)},zW(Unt,"RandomLayouterOptions",993),sDn(994,1,{},Fu),uZn.sf=function(){return new Xu},uZn.tf=function(n){},zW(Unt,"RandomLayouterOptions/RandomFactory",994),sDn(386,22,{3:1,34:1,22:1,386:1},KO);var ZRt,nKt,tKt,eKt,iKt,rKt,cKt,aKt,oKt,uKt,sKt=_cn(Unt,"SizeConstraint",386,Oat,a5,kU);sDn(264,22,{3:1,34:1,22:1,264:1},FO);var hKt,fKt,lKt,bKt,wKt=_cn(Unt,"SizeOptions",264,Oat,Man,yU);sDn(280,22,{3:1,34:1,22:1,280:1},_O);var dKt,gKt,pKt,mKt=_cn(Unt,"TopdownNodeTypes",280,Oat,M3,MU);sDn(347,22,Ett);var vKt,kKt,yKt,MKt,TKt,jKt=_cn(Unt,"TopdownSizeApproximator",347,Oat,I1,jU);sDn(987,347,Ett,Pq),uZn.Tg=function(n){return sMn(n)},_cn(Unt,"TopdownSizeApproximator/1",987,jKt,null,null),sDn(988,347,Ett,gV),uZn.Tg=function(n){var t,i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k;for(t=uG(zDn(n,(XYn(),yDt)),143),gj(),aKn(p=new Bk,n),m=new Ym,a=new DD((!n.a&&(n.a=new fV(bFt,n,10,11)),n.a));a.e!=a.i.gc();)r=uG(Zkn(a),27),GRn(b=new Bk,p),aKn(b,r),k=sMn(r),vN(b,e.Math.max(r.g,k.a),e.Math.max(r.f,k.b)),VAn(m.f,r,b);for(c=new DD((!n.a&&(n.a=new fV(bFt,n,10,11)),n.a));c.e!=c.i.gc();)for(s=new DD((!(r=uG(Zkn(c),27)).e&&(r.e=new f_(aFt,r,7,4)),r.e));s.e!=s.i.gc();)u=uG(Zkn(s),74),d=uG(DA(FX(m.f,r)),27),g=uG(cQ(m,zrn((!u.c&&(u.c=new f_(cFt,u,5,8)),u.c),0)),27),ttn((!(w=new es).b&&(w.b=new f_(cFt,w,4,7)),w.b),d),ttn((!w.c&&(w.c=new f_(cFt,w,5,8)),w.c),g),ARn(w,R0(d)),aKn(w,u);h=uG(A1(t.f),205);try{h.rf(p,new Zu),WQ(t.f,h)}catch(y){throw F$(y=Ehn(y),103),hv(y)}return vnn(p,h$t)||vnn(p,s$t)||VJn(p),o=uM(pK(zDn(p,h$t)))/uM(pK(zDn(p,s$t))),i=uM(pK(zDn(p,BDt)))*e.Math.sqrt((!p.a&&(p.a=new fV(bFt,p,10,11)),p.a).i),l=(v=uG(zDn(p,W$t),107)).b+v.c+1,f=v.d+v.a+1,new MO(e.Math.max(l,i),e.Math.max(f,i/o))},_cn(Unt,"TopdownSizeApproximator/2",988,jKt,null,null),sDn(344,1,{871:1},fy),uZn.Ug=function(n,t){return dCn(this,n,t)},uZn.Vg=function(){POn(this)},uZn.Wg=function(){return this.q},uZn.Xg=function(){return this.f?SZ(this.f):null},uZn.Yg=function(){return SZ(this.a)},uZn.Zg=function(){return this.p},uZn.$g=function(){return!1},uZn._g=function(){return this.n},uZn.ah=function(){return null!=this.p&&!this.b},uZn.bh=function(n){var t;this.n&&(t=n,kD(this.f,t))},uZn.dh=function(n,t){var e,i;this.n&&n&&n4(this,(i=oUn(e=new DW,n),_Wn(e),i),(Eln(),CKt))},uZn.eh=function(n){var t;return this.b?null:(t=irn(this,this.g),aq(this.a,t),t.i=this,this.d=n,t)},uZn.fh=function(n){n>0&&!this.b&&Ban(this,n)},uZn.b=!1,uZn.c=0,uZn.d=-1,uZn.e=null,uZn.f=null,uZn.g=-1,uZn.j=!1,uZn.k=!1,uZn.n=!1,uZn.o=0,uZn.q=0,uZn.r=0,zW(p9n,"BasicProgressMonitor",344),sDn(717,205,M3n,_u),uZn.rf=function(n,t){XGn(n,t)},zW(p9n,"BoxLayoutProvider",717),sDn(983,1,b2n,qp),uZn.Ne=function(n,t){return tKn(this,uG(n,27),uG(t,27))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},uZn.a=!1,zW(p9n,"BoxLayoutProvider/1",983),sDn(163,1,{163:1},Jrn,nK),uZn.Ib=function(){return this.c?zBn(this.c):vIn(this.b)},zW(p9n,"BoxLayoutProvider/Group",163),sDn(320,22,{3:1,34:1,22:1,320:1},HO);var EKt,SKt=_cn(p9n,"BoxLayoutProvider/PackingMode",320,Oat,s5,EU);sDn(984,1,b2n,Bu),uZn.Ne=function(n,t){return rZ(uG(n,163),uG(t,163))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(p9n,"BoxLayoutProvider/lambda$0$Type",984),sDn(985,1,b2n,Hu),uZn.Ne=function(n,t){return GY(uG(n,163),uG(t,163))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(p9n,"BoxLayoutProvider/lambda$1$Type",985),sDn(986,1,b2n,Uu),uZn.Ne=function(n,t){return qY(uG(n,163),uG(t,163))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(p9n,"BoxLayoutProvider/lambda$2$Type",986),sDn(1384,1,{845:1},Gu),uZn.Mg=function(n,t){return ZS(),!F$(t,167)||Zj((Whn(),uG(n,167)),t)},zW(p9n,"ElkSpacings/AbstractSpacingsBuilder/lambda$0$Type",1384),sDn(1385,1,QZn,Xp),uZn.Cd=function(n){hbn(this.a,uG(n,149))},zW(p9n,"ElkSpacings/AbstractSpacingsBuilder/lambda$1$Type",1385),sDn(1386,1,QZn,zu),uZn.Cd=function(n){uG(n,96),ZS()},zW(p9n,"ElkSpacings/AbstractSpacingsBuilder/lambda$2$Type",1386),sDn(1390,1,QZn,zp),uZn.Cd=function(n){_on(this.a,uG(n,96))},zW(p9n,"ElkSpacings/AbstractSpacingsBuilder/lambda$3$Type",1390),sDn(1388,1,y1n,UO),uZn.Mb=function(n){return oln(this.a,this.b,uG(n,149))},zW(p9n,"ElkSpacings/AbstractSpacingsBuilder/lambda$4$Type",1388),sDn(1387,1,y1n,GO),uZn.Mb=function(n){return PR(this.a,this.b,uG(n,845))},zW(p9n,"ElkSpacings/AbstractSpacingsBuilder/lambda$5$Type",1387),sDn(1389,1,QZn,qO),uZn.Cd=function(n){iV(this.a,this.b,uG(n,149))},zW(p9n,"ElkSpacings/AbstractSpacingsBuilder/lambda$6$Type",1389),sDn(947,1,{},Vu),uZn.Kb=function(n){return oN(n)},uZn.Fb=function(n){return this===n},zW(p9n,"ElkUtil/lambda$0$Type",947),sDn(948,1,QZn,XO),uZn.Cd=function(n){JNn(this.a,this.b,uG(n,74))},uZn.a=0,uZn.b=0,zW(p9n,"ElkUtil/lambda$1$Type",948),sDn(949,1,QZn,zO),uZn.Cd=function(n){tM(this.a,this.b,uG(n,166))},uZn.a=0,uZn.b=0,zW(p9n,"ElkUtil/lambda$2$Type",949),sDn(950,1,QZn,VO),uZn.Cd=function(n){UN(this.a,this.b,uG(n,135))},uZn.a=0,uZn.b=0,zW(p9n,"ElkUtil/lambda$3$Type",950),sDn(951,1,QZn,Vp),uZn.Cd=function(n){Lq(this.a,uG(n,377))},zW(p9n,"ElkUtil/lambda$4$Type",951),sDn(325,1,{34:1,325:1},Jm),uZn.Fd=function(n){return wD(this,uG(n,242))},uZn.Fb=function(n){var t;return!!F$(n,325)&&(t=uG(n,325),this.a==t.a)},uZn.Hb=function(){return t0(this.a)},uZn.Ib=function(){return this.a+" (exclusive)"},uZn.a=0,zW(p9n,"ExclusiveBounds/ExclusiveLowerBound",325),sDn(1119,205,M3n,Wu),uZn.rf=function(n,t){var i,r,c,a,o,u,s,f,l,b,w,d,g,p,m,v,k,y,M,T,j;for(t.Ug("Fixed Layout",1),a=uG(zDn(n,(XYn(),k$t)),223),b=0,w=0,m=new DD((!n.a&&(n.a=new fV(bFt,n,10,11)),n.a));m.e!=m.i.gc();){for(g=uG(Zkn(m),27),(j=uG(zDn(g,(Iln(),Cxt)),8))&&(kN(g,j.a,j.b),uG(zDn(g,Txt),181).Hc((Qmn(),VRt))&&(d=uG(zDn(g,Ext),8)).a>0&&d.b>0&&ZQn(g,d.a,d.b,!0,!0)),b=e.Math.max(b,g.i+g.g),w=e.Math.max(w,g.j+g.f),f=new DD((!g.n&&(g.n=new fV(lFt,g,1,7)),g.n));f.e!=f.i.gc();)u=uG(Zkn(f),135),(j=uG(zDn(u,Cxt),8))&&kN(u,j.a,j.b),b=e.Math.max(b,g.i+u.i+u.g),w=e.Math.max(w,g.j+u.j+u.f);for(y=new DD((!g.c&&(g.c=new fV(wFt,g,9,9)),g.c));y.e!=y.i.gc();)for(k=uG(Zkn(y),123),(j=uG(zDn(k,Cxt),8))&&kN(k,j.a,j.b),M=g.i+k.i,T=g.j+k.j,b=e.Math.max(b,M+k.g),w=e.Math.max(w,T+k.f),s=new DD((!k.n&&(k.n=new fV(lFt,k,1,7)),k.n));s.e!=s.i.gc();)u=uG(Zkn(s),135),(j=uG(zDn(u,Cxt),8))&&kN(u,j.a,j.b),b=e.Math.max(b,M+u.i+u.g),w=e.Math.max(w,T+u.j+u.f);for(c=new Fz(ix(eRn(g).a.Kc(),new h));hDn(c);)l=iJn(i=uG(N9(c),74)),b=e.Math.max(b,l.a),w=e.Math.max(w,l.b);for(r=new Fz(ix(tRn(g).a.Kc(),new h));hDn(r);)R0(bIn(i=uG(N9(r),74)))!=n&&(l=iJn(i),b=e.Math.max(b,l.a),w=e.Math.max(w,l.b))}if(a==(_gn(),uxt))for(p=new DD((!n.a&&(n.a=new fV(bFt,n,10,11)),n.a));p.e!=p.i.gc();)for(r=new Fz(ix(eRn(g=uG(Zkn(p),27)).a.Kc(),new h));hDn(r);)0==(o=bGn(i=uG(N9(r),74))).b?Myn(i,L$t,null):Myn(i,L$t,o);oM(gK(zDn(n,(Iln(),jxt))))||ZQn(n,b+(v=uG(zDn(n,Sxt),107)).b+v.c,w+v.d+v.a,!0,!0),t.Vg()},zW(p9n,"FixedLayoutProvider",1119),sDn(385,137,{3:1,423:1,385:1,96:1,137:1},Qu,qen),uZn.cg=function(n){var t,e,i,r,c,a,o;if(n)try{for(a=WGn(n,";,;"),r=0,c=(i=a).length;r>16&D1n|n^(e&D1n)<<16},uZn.Kc=function(){return new Wp(this)},uZn.Ib=function(){return null==this.a&&null==this.b?"pair(null,null)":null==this.a?"pair(null,"+cpn(this.b)+")":null==this.b?"pair("+cpn(this.a)+",null)":"pair("+cpn(this.a)+","+cpn(this.b)+")"},zW(p9n,"Pair",42),sDn(995,1,$Zn,Wp),uZn.Nb=function(n){SV(this,n)},uZn.Ob=function(){return!this.c&&(!this.b&&null!=this.a.a||null!=this.a.b)},uZn.Pb=function(){if(!this.c&&!this.b&&null!=this.a.a)return this.b=!0,this.a.a;if(!this.c&&null!=this.a.b)return this.c=!0,this.a.b;throw hv(new Bv)},uZn.Qb=function(){throw this.c&&null!=this.a.b?this.a.b=null:this.b&&null!=this.a.a&&(this.a.a=null),hv(new xv)},uZn.b=!1,uZn.c=!1,zW(p9n,"Pair/1",995),sDn(455,1,{455:1},vY),uZn.Fb=function(n){return OJ(this.a,uG(n,455).a)&&OJ(this.c,uG(n,455).c)&&OJ(this.d,uG(n,455).d)&&OJ(this.b,uG(n,455).b)},uZn.Hb=function(){return Obn(Uhn(cT(dat,1),EZn,1,5,[this.a,this.c,this.d,this.b]))},uZn.Ib=function(){return"("+this.a+TZn+this.c+TZn+this.d+TZn+this.b+")"},zW(p9n,"Quadruple",455),sDn(1108,205,M3n,Xu),uZn.rf=function(n,t){var e;t.Ug("Random Layout",1),0!=(!n.a&&(n.a=new fV(bFt,n,10,11)),n.a).i?(vQn(n,(e=uG(zDn(n,(Wmn(),XRt)),17))&&0!=e.a?new v8(e.a):new Upn,sM(pK(zDn(n,URt))),sM(pK(zDn(n,zRt))),uG(zDn(n,GRt),107)),t.Vg()):t.Vg()},zW(p9n,"RandomLayoutProvider",1108),sDn(240,1,{240:1},LU),uZn.Fb=function(n){return OJ(this.a,uG(n,240).a)&&OJ(this.b,uG(n,240).b)&&OJ(this.c,uG(n,240).c)},uZn.Hb=function(){return Obn(Uhn(cT(dat,1),EZn,1,5,[this.a,this.b,this.c]))},uZn.Ib=function(){return"("+this.a+TZn+this.b+TZn+this.c+")"},zW(p9n,"Triple",240),sDn(562,1,{}),uZn.Lf=function(){return new MO(this.f.i,this.f.j)},uZn.of=function(n){return QZ(n,(XYn(),uDt))?zDn(this.f,$Kt):zDn(this.f,n)},uZn.Mf=function(){return new MO(this.f.g,this.f.f)},uZn.Nf=function(){return this.g},uZn.pf=function(n){return vnn(this.f,n)},uZn.Of=function(n){ycn(this.f,n.a),Mcn(this.f,n.b)},uZn.Pf=function(n){kcn(this.f,n.a),vcn(this.f,n.b)},uZn.Qf=function(n){this.g=n},uZn.g=0,zW(Ctt,"ElkGraphAdapters/AbstractElkGraphElementAdapter",562),sDn(563,1,{853:1},Qp),uZn.Rf=function(){var n,t;if(!this.b)for(this.b=o6(xJ(this.a).i),t=new DD(xJ(this.a));t.e!=t.i.gc();)n=uG(Zkn(t),135),kD(this.b,new Wy(n));return this.b},uZn.b=null,zW(Ctt,"ElkGraphAdapters/ElkEdgeAdapter",563),sDn(289,562,{},Vy),uZn.Sf=function(){return FTn(this)},uZn.a=null,zW(Ctt,"ElkGraphAdapters/ElkGraphAdapter",289),sDn(640,562,{187:1},Wy),zW(Ctt,"ElkGraphAdapters/ElkLabelAdapter",640),sDn(639,562,{695:1},Wx),uZn.Rf=function(){return RTn(this)},uZn.Vf=function(){var n;return!(n=uG(zDn(this.f,(XYn(),$$t)),140))&&(n=new Nk),n},uZn.Xf=function(){return KTn(this)},uZn.Zf=function(n){var t;t=new zU(n),Myn(this.f,(XYn(),$$t),t)},uZn.$f=function(n){Myn(this.f,(XYn(),W$t),new VU(n))},uZn.Tf=function(){return this.d},uZn.Uf=function(){var n,t;if(!this.a)for(this.a=new Zm,t=new Fz(ix(tRn(uG(this.f,27)).a.Kc(),new h));hDn(t);)n=uG(N9(t),74),kD(this.a,new Qp(n));return this.a},uZn.Wf=function(){var n,t;if(!this.c)for(this.c=new Zm,t=new Fz(ix(eRn(uG(this.f,27)).a.Kc(),new h));hDn(t);)n=uG(N9(t),74),kD(this.c,new Qp(n));return this.c},uZn.Yf=function(){return 0!=wZ(uG(this.f,27)).i||oM(gK(uG(this.f,27).of((XYn(),C$t))))},uZn._f=function(){Xen(this,(vP(),NKt))},uZn.a=null,uZn.b=null,uZn.c=null,uZn.d=null,uZn.e=null,zW(Ctt,"ElkGraphAdapters/ElkNodeAdapter",639),sDn(1284,562,{852:1},Jp),uZn.Rf=function(){return rjn(this)},uZn.Uf=function(){var n,t;if(!this.a)for(this.a=iR(uG(this.f,123).hh().i),t=new DD(uG(this.f,123).hh());t.e!=t.i.gc();)n=uG(Zkn(t),74),kD(this.a,new Qp(n));return this.a},uZn.Wf=function(){var n,t;if(!this.c)for(this.c=iR(uG(this.f,123).ih().i),t=new DD(uG(this.f,123).ih());t.e!=t.i.gc();)n=uG(Zkn(t),74),kD(this.c,new Qp(n));return this.c},uZn.ag=function(){return uG(uG(this.f,123).of((XYn(),gDt)),64)},uZn.bg=function(){var n,t,e,i,r,c,a;for(i=h0(uG(this.f,123)),e=new DD(uG(this.f,123).ih());e.e!=e.i.gc();)for(a=new DD((!(n=uG(Zkn(e),74)).c&&(n.c=new f_(cFt,n,5,8)),n.c));a.e!=a.i.gc();){if(Ern(lCn(c=uG(Zkn(a),84)),i))return!0;if(lCn(c)==i&&oM(gK(zDn(n,(XYn(),I$t)))))return!0}for(t=new DD(uG(this.f,123).hh());t.e!=t.i.gc();)for(r=new DD((!(n=uG(Zkn(t),74)).b&&(n.b=new f_(cFt,n,4,7)),n.b));r.e!=r.i.gc();)if(Ern(lCn(uG(Zkn(r),84)),i))return!0;return!1},uZn.a=null,uZn.b=null,uZn.c=null,zW(Ctt,"ElkGraphAdapters/ElkPortAdapter",1284),sDn(1285,1,b2n,qu),uZn.Ne=function(n,t){return XBn(uG(n,123),uG(t,123))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(Ctt,"ElkGraphAdapters/PortComparator",1285);var xKt,RKt,KKt,FKt,_Kt,BKt,HKt,UKt,GKt,qKt,XKt,zKt,VKt,WKt,QKt,JKt,YKt,ZKt,nFt=Iq(Itt,"EObject"),tFt=Iq(Ott,Att),eFt=Iq(Ott,Ltt),iFt=Iq(Ott,Ntt),rFt=Iq(Ott,"ElkShape"),cFt=Iq(Ott,$tt),aFt=Iq(Ott,Dtt),oFt=Iq(Ott,xtt),uFt=Iq(Itt,Rtt),sFt=Iq(Itt,"EFactory"),hFt=Iq(Itt,Ktt),fFt=Iq(Itt,"EPackage"),lFt=Iq(Ott,Ftt),bFt=Iq(Ott,_tt),wFt=Iq(Ott,Btt);sDn(93,1,Htt),uZn.th=function(){return this.uh(),null},uZn.uh=function(){return null},uZn.vh=function(){return this.uh(),!1},uZn.wh=function(){return!1},uZn.xh=function(n){Msn(this,n)},zW(Utt,"BasicNotifierImpl",93),sDn(99,93,Jtt),uZn.Yh=function(){return uN(this)},uZn.yh=function(n,t){return n},uZn.zh=function(){throw hv(new Kv)},uZn.Ah=function(n){var t;return t=lMn(uG(ern(this.Dh(),this.Fh()),19)),this.Ph().Th(this,t.n,t.f,n)},uZn.Bh=function(n,t){throw hv(new Kv)},uZn.Ch=function(n,t,e){return $Un(this,n,t,e)},uZn.Dh=function(){var n;return this.zh()&&(n=this.zh().Nk())?n:this.ii()},uZn.Eh=function(){return J$n(this)},uZn.Fh=function(){throw hv(new Kv)},uZn.Gh=function(){var n,t;return!(t=this.$h().Ok())&&this.zh().Tk((jP(),t=null==(n=$1(eqn(this.Dh())))?tBt:new zx(this,n))),t},uZn.Hh=function(n,t){return n},uZn.Ih=function(n){return n.pk()?n.Lj():emn(this.Dh(),n)},uZn.Jh=function(){var n;return(n=this.zh())?n.Qk():null},uZn.Kh=function(){return this.zh()?this.zh().Nk():null},uZn.Lh=function(n,t,e){return Dyn(this,n,t,e)},uZn.Mh=function(n){return vtn(this,n)},uZn.Nh=function(n,t){return U9(this,n,t)},uZn.Oh=function(){var n;return!!(n=this.zh())&&n.Rk()},uZn.Ph=function(){throw hv(new Kv)},uZn.Qh=function(){return Kvn(this)},uZn.Rh=function(n,t,e,i){return kyn(this,n,t,i)},uZn.Sh=function(n,t,e){return uG(ern(this.Dh(),t),69).wk().zk(this,this.hi(),t-this.ji(),n,e)},uZn.Th=function(n,t,e,i){return O1(this,n,t,i)},uZn.Uh=function(n,t,e){return uG(ern(this.Dh(),t),69).wk().Ak(this,this.hi(),t-this.ji(),n,e)},uZn.Vh=function(){return!!this.zh()&&!!this.zh().Pk()},uZn.Wh=function(n){return Wkn(this,n)},uZn.Xh=function(n){return M0(this,n)},uZn.Zh=function(n){return jWn(this,n)},uZn.$h=function(){throw hv(new Kv)},uZn._h=function(){return this.zh()?this.zh().Pk():null},uZn.ai=function(){return Kvn(this)},uZn.bi=function(n,t){sLn(this,n,t)},uZn.ci=function(n){this.$h().Sk(n)},uZn.di=function(n){this.$h().Vk(n)},uZn.ei=function(n){this.$h().Uk(n)},uZn.fi=function(n,t){var e,i,r,c;return(c=this.Jh())&&n&&(t=Nyn(c.El(),this,t),c.Il(this)),(i=this.Ph())&&(PHn(this,this.Ph(),this.Fh()).Bb&P0n?(r=i.Qh())&&(n?!c&&r.Il(this):r.Hl(this)):(t=(e=this.Fh())>=0?this.Ah(t):this.Ph().Th(this,-1-e,null,t),t=this.Ch(null,-1,t))),this.di(n),t},uZn.gi=function(n){var t,e,i,r,c,a,o;if((c=emn(e=this.Dh(),n))>=(t=this.ji()))return uG(n,69).wk().Dk(this,this.hi(),c-t);if(c<=-1){if(!(a=iVn((gAn(),kBt),e,n)))throw hv(new vM(Gtt+n.xe()+ztt));if(PP(),uG(a,69).xk()||(a=_3(Nen(kBt,a))),r=uG((i=this.Ih(a))>=0?this.Lh(i,!0,!0):YNn(this,a,!0),160),(o=a.Ik())>1||-1==o)return uG(uG(r,220).Sl(n,!1),79)}else if(n.Jk())return uG((i=this.Ih(n))>=0?this.Lh(i,!1,!0):YNn(this,n,!1),79);return new jA(this,n)},uZn.hi=function(){return Wen(this)},uZn.ii=function(){return(tQ(),M_t).S},uZn.ji=function(){return iQ(this.ii())},uZn.ki=function(n){oAn(this,n)},uZn.Ib=function(){return vxn(this)},zW(Ytt,"BasicEObjectImpl",99),sDn(119,99,{110:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1}),uZn.li=function(n){return Ven(this)[n]},uZn.mi=function(n,t){uQ(Ven(this),n,t)},uZn.ni=function(n){uQ(Ven(this),n,null)},uZn.th=function(){return uG(Lsn(this,4),129)},uZn.uh=function(){throw hv(new Kv)},uZn.vh=function(){return!!(4&this.Db)},uZn.zh=function(){throw hv(new Kv)},uZn.oi=function(n){Dvn(this,2,n)},uZn.Bh=function(n,t){this.Db=t<<16|255&this.Db,this.oi(n)},uZn.Dh=function(){return e1(this)},uZn.Fh=function(){return this.Db>>16},uZn.Gh=function(){var n;return jP(),null==(n=$1(eqn(uG(Lsn(this,16),29)||this.ii())))?tBt:new zx(this,n)},uZn.wh=function(){return!(1&this.Db)},uZn.Jh=function(){return uG(Lsn(this,128),2034)},uZn.Kh=function(){return uG(Lsn(this,16),29)},uZn.Oh=function(){return!!(32&this.Db)},uZn.Ph=function(){return uG(Lsn(this,2),54)},uZn.Vh=function(){return!!(64&this.Db)},uZn.$h=function(){throw hv(new Kv)},uZn._h=function(){return uG(Lsn(this,64),288)},uZn.ci=function(n){Dvn(this,16,n)},uZn.di=function(n){Dvn(this,128,n)},uZn.ei=function(n){Dvn(this,64,n)},uZn.hi=function(){return $vn(this)},uZn.Db=0,zW(Ytt,"MinimalEObjectImpl",119),sDn(120,119,{110:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1,120:1}),uZn.oi=function(n){this.Cb=n},uZn.Ph=function(){return this.Cb},zW(Ytt,"MinimalEObjectImpl/Container",120),sDn(2083,120,{110:1,342:1,96:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1,120:1}),uZn.Lh=function(n,t,e){return ajn(this,n,t,e)},uZn.Uh=function(n,t,e){return BIn(this,n,t,e)},uZn.Wh=function(n){return j4(this,n)},uZn.bi=function(n,t){bln(this,n,t)},uZn.ii=function(){return tYn(),VKt},uZn.ki=function(n){ffn(this,n)},uZn.nf=function(){return Qkn(this)},uZn.gh=function(){return!this.o&&(this.o=new ltn((tYn(),XKt),EFt,this,0)),this.o},uZn.of=function(n){return zDn(this,n)},uZn.pf=function(n){return vnn(this,n)},uZn.qf=function(n,t){return Myn(this,n,t)},zW(Ztt,"EMapPropertyHolderImpl",2083),sDn(572,120,{110:1,377:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1,120:1},ns),uZn.Lh=function(n,t,e){switch(n){case 0:return this.a;case 1:return this.b}return Dyn(this,n,t,e)},uZn.Wh=function(n){switch(n){case 0:return 0!=this.a;case 1:return 0!=this.b}return Wkn(this,n)},uZn.bi=function(n,t){switch(n){case 0:return void Scn(this,uM(pK(t)));case 1:return void pcn(this,uM(pK(t)))}sLn(this,n,t)},uZn.ii=function(){return tYn(),KKt},uZn.ki=function(n){switch(n){case 0:return void Scn(this,0);case 1:return void pcn(this,0)}oAn(this,n)},uZn.Ib=function(){var n;return 64&this.Db?vxn(this):((n=new fx(vxn(this))).a+=" (x: ",Oj(n,this.a),n.a+=", y: ",Oj(n,this.b),n.a+=")",n.a)},uZn.a=0,uZn.b=0,zW(Ztt,"ElkBendPointImpl",572),sDn(739,2083,{110:1,342:1,167:1,96:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1,120:1}),uZn.Lh=function(n,t,e){return Xdn(this,n,t,e)},uZn.Sh=function(n,t,e){return SCn(this,n,t,e)},uZn.Uh=function(n,t,e){return phn(this,n,t,e)},uZn.Wh=function(n){return _sn(this,n)},uZn.bi=function(n,t){CSn(this,n,t)},uZn.ii=function(){return tYn(),HKt},uZn.ki=function(n){Awn(this,n)},uZn.jh=function(){return this.k},uZn.kh=function(){return xJ(this)},uZn.Ib=function(){return Egn(this)},uZn.k=null,zW(Ztt,"ElkGraphElementImpl",739),sDn(740,739,{110:1,342:1,167:1,422:1,96:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1,120:1}),uZn.Lh=function(n,t,e){return spn(this,n,t,e)},uZn.Wh=function(n){return Kpn(this,n)},uZn.bi=function(n,t){ISn(this,n,t)},uZn.ii=function(){return tYn(),zKt},uZn.ki=function(n){Tmn(this,n)},uZn.lh=function(){return this.f},uZn.mh=function(){return this.g},uZn.nh=function(){return this.i},uZn.oh=function(){return this.j},uZn.ph=function(n,t){vN(this,n,t)},uZn.qh=function(n,t){kN(this,n,t)},uZn.rh=function(n){ycn(this,n)},uZn.sh=function(n){Mcn(this,n)},uZn.Ib=function(){return rOn(this)},uZn.f=0,uZn.g=0,uZn.i=0,uZn.j=0,zW(Ztt,"ElkShapeImpl",740),sDn(741,740,{110:1,342:1,84:1,167:1,422:1,96:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1,120:1}),uZn.Lh=function(n,t,e){return SMn(this,n,t,e)},uZn.Sh=function(n,t,e){return tSn(this,n,t,e)},uZn.Uh=function(n,t,e){return eSn(this,n,t,e)},uZn.Wh=function(n){return iln(this,n)},uZn.bi=function(n,t){SDn(this,n,t)},uZn.ii=function(){return tYn(),FKt},uZn.ki=function(n){yyn(this,n)},uZn.hh=function(){return!this.d&&(this.d=new f_(aFt,this,8,5)),this.d},uZn.ih=function(){return!this.e&&(this.e=new f_(aFt,this,7,4)),this.e},zW(Ztt,"ElkConnectableShapeImpl",741),sDn(326,739,{110:1,342:1,74:1,167:1,326:1,96:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1,120:1},es),uZn.Ah=function(n){return sEn(this,n)},uZn.Lh=function(n,t,e){switch(n){case 3:return s0(this);case 4:return!this.b&&(this.b=new f_(cFt,this,4,7)),this.b;case 5:return!this.c&&(this.c=new f_(cFt,this,5,8)),this.c;case 6:return!this.a&&(this.a=new fV(oFt,this,6,6)),this.a;case 7:return qx(),!this.b&&(this.b=new f_(cFt,this,4,7)),!(this.b.i<=1&&(!this.c&&(this.c=new f_(cFt,this,5,8)),this.c.i<=1));case 8:return qx(),!!z$n(this);case 9:return qx(),!!BNn(this);case 10:return qx(),!this.b&&(this.b=new f_(cFt,this,4,7)),0!=this.b.i&&(!this.c&&(this.c=new f_(cFt,this,5,8)),0!=this.c.i)}return Xdn(this,n,t,e)},uZn.Sh=function(n,t,e){var i;switch(t){case 3:return this.Cb&&(e=(i=this.Db>>16)>=0?sEn(this,e):this.Cb.Th(this,-1-i,null,e)),nF(this,uG(n,27),e);case 4:return!this.b&&(this.b=new f_(cFt,this,4,7)),Nmn(this.b,n,e);case 5:return!this.c&&(this.c=new f_(cFt,this,5,8)),Nmn(this.c,n,e);case 6:return!this.a&&(this.a=new fV(oFt,this,6,6)),Nmn(this.a,n,e)}return SCn(this,n,t,e)},uZn.Uh=function(n,t,e){switch(t){case 3:return nF(this,null,e);case 4:return!this.b&&(this.b=new f_(cFt,this,4,7)),Nyn(this.b,n,e);case 5:return!this.c&&(this.c=new f_(cFt,this,5,8)),Nyn(this.c,n,e);case 6:return!this.a&&(this.a=new fV(oFt,this,6,6)),Nyn(this.a,n,e)}return phn(this,n,t,e)},uZn.Wh=function(n){switch(n){case 3:return!!s0(this);case 4:return!!this.b&&0!=this.b.i;case 5:return!!this.c&&0!=this.c.i;case 6:return!!this.a&&0!=this.a.i;case 7:return!this.b&&(this.b=new f_(cFt,this,4,7)),!(this.b.i<=1&&(!this.c&&(this.c=new f_(cFt,this,5,8)),this.c.i<=1));case 8:return z$n(this);case 9:return BNn(this);case 10:return!this.b&&(this.b=new f_(cFt,this,4,7)),0!=this.b.i&&(!this.c&&(this.c=new f_(cFt,this,5,8)),0!=this.c.i)}return _sn(this,n)},uZn.bi=function(n,t){switch(n){case 3:return void ARn(this,uG(t,27));case 4:return!this.b&&(this.b=new f_(cFt,this,4,7)),Czn(this.b),!this.b&&(this.b=new f_(cFt,this,4,7)),void CW(this.b,uG(t,16));case 5:return!this.c&&(this.c=new f_(cFt,this,5,8)),Czn(this.c),!this.c&&(this.c=new f_(cFt,this,5,8)),void CW(this.c,uG(t,16));case 6:return!this.a&&(this.a=new fV(oFt,this,6,6)),Czn(this.a),!this.a&&(this.a=new fV(oFt,this,6,6)),void CW(this.a,uG(t,16))}CSn(this,n,t)},uZn.ii=function(){return tYn(),_Kt},uZn.ki=function(n){switch(n){case 3:return void ARn(this,null);case 4:return!this.b&&(this.b=new f_(cFt,this,4,7)),void Czn(this.b);case 5:return!this.c&&(this.c=new f_(cFt,this,5,8)),void Czn(this.c);case 6:return!this.a&&(this.a=new fV(oFt,this,6,6)),void Czn(this.a)}Awn(this,n)},uZn.Ib=function(){return SXn(this)},zW(Ztt,"ElkEdgeImpl",326),sDn(452,2083,{110:1,342:1,166:1,452:1,96:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1,120:1},is),uZn.Ah=function(n){return zjn(this,n)},uZn.Lh=function(n,t,e){switch(n){case 1:return this.j;case 2:return this.k;case 3:return this.b;case 4:return this.c;case 5:return!this.a&&(this.a=new MD(eFt,this,5)),this.a;case 6:return f0(this);case 7:return t?fMn(this):this.i;case 8:return t?hMn(this):this.f;case 9:return!this.g&&(this.g=new f_(oFt,this,9,10)),this.g;case 10:return!this.e&&(this.e=new f_(oFt,this,10,9)),this.e;case 11:return this.d}return ajn(this,n,t,e)},uZn.Sh=function(n,t,e){var i;switch(t){case 6:return this.Cb&&(e=(i=this.Db>>16)>=0?zjn(this,e):this.Cb.Th(this,-1-i,null,e)),ZK(this,uG(n,74),e);case 9:return!this.g&&(this.g=new f_(oFt,this,9,10)),Nmn(this.g,n,e);case 10:return!this.e&&(this.e=new f_(oFt,this,10,9)),Nmn(this.e,n,e)}return uG(ern(uG(Lsn(this,16),29)||(tYn(),BKt),t),69).wk().zk(this,$vn(this),t-iQ((tYn(),BKt)),n,e)},uZn.Uh=function(n,t,e){switch(t){case 5:return!this.a&&(this.a=new MD(eFt,this,5)),Nyn(this.a,n,e);case 6:return ZK(this,null,e);case 9:return!this.g&&(this.g=new f_(oFt,this,9,10)),Nyn(this.g,n,e);case 10:return!this.e&&(this.e=new f_(oFt,this,10,9)),Nyn(this.e,n,e)}return BIn(this,n,t,e)},uZn.Wh=function(n){switch(n){case 1:return 0!=this.j;case 2:return 0!=this.k;case 3:return 0!=this.b;case 4:return 0!=this.c;case 5:return!!this.a&&0!=this.a.i;case 6:return!!f0(this);case 7:return!!this.i;case 8:return!!this.f;case 9:return!!this.g&&0!=this.g.i;case 10:return!!this.e&&0!=this.e.i;case 11:return null!=this.d}return j4(this,n)},uZn.bi=function(n,t){switch(n){case 1:return void Tcn(this,uM(pK(t)));case 2:return void Ecn(this,uM(pK(t)));case 3:return void mcn(this,uM(pK(t)));case 4:return void jcn(this,uM(pK(t)));case 5:return!this.a&&(this.a=new MD(eFt,this,5)),Czn(this.a),!this.a&&(this.a=new MD(eFt,this,5)),void CW(this.a,uG(t,16));case 6:return void ORn(this,uG(t,74));case 7:return void zan(this,uG(t,84));case 8:return void Xan(this,uG(t,84));case 9:return!this.g&&(this.g=new f_(oFt,this,9,10)),Czn(this.g),!this.g&&(this.g=new f_(oFt,this,9,10)),void CW(this.g,uG(t,16));case 10:return!this.e&&(this.e=new f_(oFt,this,10,9)),Czn(this.e),!this.e&&(this.e=new f_(oFt,this,10,9)),void CW(this.e,uG(t,16));case 11:return void fon(this,mK(t))}bln(this,n,t)},uZn.ii=function(){return tYn(),BKt},uZn.ki=function(n){switch(n){case 1:return void Tcn(this,0);case 2:return void Ecn(this,0);case 3:return void mcn(this,0);case 4:return void jcn(this,0);case 5:return!this.a&&(this.a=new MD(eFt,this,5)),void Czn(this.a);case 6:return void ORn(this,null);case 7:return void zan(this,null);case 8:return void Xan(this,null);case 9:return!this.g&&(this.g=new f_(oFt,this,9,10)),void Czn(this.g);case 10:return!this.e&&(this.e=new f_(oFt,this,10,9)),void Czn(this.e);case 11:return void fon(this,null)}ffn(this,n)},uZn.Ib=function(){return A$n(this)},uZn.b=0,uZn.c=0,uZn.d=null,uZn.j=0,uZn.k=0,zW(Ztt,"ElkEdgeSectionImpl",452),sDn(158,120,{110:1,94:1,93:1,155:1,58:1,114:1,54:1,99:1,158:1,119:1,120:1}),uZn.Lh=function(n,t,e){return 0==n?(!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),this.Ab):$tn(this,n-iQ(this.ii()),ern(uG(Lsn(this,16),29)||this.ii(),n),t,e)},uZn.Sh=function(n,t,e){return 0==t?(!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),Nmn(this.Ab,n,e)):uG(ern(uG(Lsn(this,16),29)||this.ii(),t),69).wk().zk(this,$vn(this),t-iQ(this.ii()),n,e)},uZn.Uh=function(n,t,e){return 0==t?(!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),Nyn(this.Ab,n,e)):uG(ern(uG(Lsn(this,16),29)||this.ii(),t),69).wk().Ak(this,$vn(this),t-iQ(this.ii()),n,e)},uZn.Wh=function(n){return 0==n?!!this.Ab&&0!=this.Ab.i:l5(this,n-iQ(this.ii()),ern(uG(Lsn(this,16),29)||this.ii(),n))},uZn.Zh=function(n){return VQn(this,n)},uZn.bi=function(n,t){if(0===n)return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),Czn(this.Ab),!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),void CW(this.Ab,uG(t,16));lpn(this,n-iQ(this.ii()),ern(uG(Lsn(this,16),29)||this.ii(),n),t)},uZn.di=function(n){Dvn(this,128,n)},uZn.ii=function(){return YYn(),$_t},uZn.ki=function(n){if(0===n)return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),void Czn(this.Ab);sdn(this,n-iQ(this.ii()),ern(uG(Lsn(this,16),29)||this.ii(),n))},uZn.pi=function(){this.Bb|=1},uZn.qi=function(n){return GUn(this,n)},uZn.Bb=0,zW(Ytt,"EModelElementImpl",158),sDn(720,158,{110:1,94:1,93:1,480:1,155:1,58:1,114:1,54:1,99:1,158:1,119:1,120:1},Fl),uZn.ri=function(n,t){return cWn(this,n,t)},uZn.si=function(n){var t,e,i,r;if(this.a!=Hrn(n)||256&n.Bb)throw hv(new vM(cet+n.zb+eet));for(e=n1(n);0!=z5(e.a).i;){if(_Tn(t=uG(yVn(e,0,F$(r=uG(zrn(z5(e.a),0),89).c,90)?uG(r,29):(YYn(),x_t)),29)))return uG(i=Hrn(t).wi().si(t),54).ci(n),i;e=n1(t)}return"java.util.Map$Entry"==(null!=n.D?n.D:n.B)?new Eq(n):new BG(n)},uZn.ti=function(n,t){return cYn(this,n,t)},uZn.Lh=function(n,t,e){switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),this.Ab;case 1:return this.a}return $tn(this,n-iQ((YYn(),A_t)),ern(uG(Lsn(this,16),29)||A_t,n),t,e)},uZn.Sh=function(n,t,e){switch(t){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),Nmn(this.Ab,n,e);case 1:return this.a&&(e=uG(this.a,54).Th(this,4,fFt,e)),ywn(this,uG(n,241),e)}return uG(ern(uG(Lsn(this,16),29)||(YYn(),A_t),t),69).wk().zk(this,$vn(this),t-iQ((YYn(),A_t)),n,e)},uZn.Uh=function(n,t,e){switch(t){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),Nyn(this.Ab,n,e);case 1:return ywn(this,null,e)}return uG(ern(uG(Lsn(this,16),29)||(YYn(),A_t),t),69).wk().Ak(this,$vn(this),t-iQ((YYn(),A_t)),n,e)},uZn.Wh=function(n){switch(n){case 0:return!!this.Ab&&0!=this.Ab.i;case 1:return!!this.a}return l5(this,n-iQ((YYn(),A_t)),ern(uG(Lsn(this,16),29)||A_t,n))},uZn.bi=function(n,t){switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),Czn(this.Ab),!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),void CW(this.Ab,uG(t,16));case 1:return void yIn(this,uG(t,241))}lpn(this,n-iQ((YYn(),A_t)),ern(uG(Lsn(this,16),29)||A_t,n),t)},uZn.ii=function(){return YYn(),A_t},uZn.ki=function(n){switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),void Czn(this.Ab);case 1:return void yIn(this,null)}sdn(this,n-iQ((YYn(),A_t)),ern(uG(Lsn(this,16),29)||A_t,n))},zW(Ytt,"EFactoryImpl",720),sDn(1037,720,{110:1,2113:1,94:1,93:1,480:1,155:1,58:1,114:1,54:1,99:1,158:1,119:1,120:1},rs),uZn.ri=function(n,t){switch(n.hk()){case 12:return uG(t,149).Pg();case 13:return cpn(t);default:throw hv(new vM(tet+n.xe()+eet))}},uZn.si=function(n){var t;switch(-1==n.G&&(n.G=(t=Hrn(n))?Hyn(t.vi(),n):-1),n.G){case 4:return new cs;case 6:return new Bk;case 7:return new Hk;case 8:return new es;case 9:return new ns;case 10:return new is;case 11:return new as;default:throw hv(new vM(cet+n.zb+eet))}},uZn.ti=function(n,t){switch(n.hk()){case 13:case 12:return null;default:throw hv(new vM(tet+n.xe()+eet))}},zW(Ztt,"ElkGraphFactoryImpl",1037),sDn(448,158,{110:1,94:1,93:1,155:1,197:1,58:1,114:1,54:1,99:1,158:1,119:1,120:1}),uZn.Gh=function(){var n;return null==(n=$1(eqn(uG(Lsn(this,16),29)||this.ii())))?(jP(),jP(),tBt):new VR(this,n)},uZn.Lh=function(n,t,e){switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),this.Ab;case 1:return this.xe()}return $tn(this,n-iQ(this.ii()),ern(uG(Lsn(this,16),29)||this.ii(),n),t,e)},uZn.Wh=function(n){switch(n){case 0:return!!this.Ab&&0!=this.Ab.i;case 1:return null!=this.zb}return l5(this,n-iQ(this.ii()),ern(uG(Lsn(this,16),29)||this.ii(),n))},uZn.bi=function(n,t){switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),Czn(this.Ab),!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),void CW(this.Ab,uG(t,16));case 1:return void this.ui(mK(t))}lpn(this,n-iQ(this.ii()),ern(uG(Lsn(this,16),29)||this.ii(),n),t)},uZn.ii=function(){return YYn(),D_t},uZn.ki=function(n){switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),void Czn(this.Ab);case 1:return void this.ui(null)}sdn(this,n-iQ(this.ii()),ern(uG(Lsn(this,16),29)||this.ii(),n))},uZn.xe=function(){return this.zb},uZn.ui=function(n){qon(this,n)},uZn.Ib=function(){return Wwn(this)},uZn.zb=null,zW(Ytt,"ENamedElementImpl",448),sDn(184,448,{110:1,94:1,93:1,155:1,197:1,58:1,241:1,114:1,54:1,99:1,158:1,184:1,119:1,120:1,690:1},aZ),uZn.Ah=function(n){return Jjn(this,n)},uZn.Lh=function(n,t,e){switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),this.Ab;case 1:return this.zb;case 2:return this.yb;case 3:return this.xb;case 4:return this.sb;case 5:return!this.rb&&(this.rb=new vV(this,s_t,this)),this.rb;case 6:return!this.vb&&(this.vb=new i_(fFt,this,6,7)),this.vb;case 7:return t?this.Db>>16==7?uG(this.Cb,241):null:$0(this)}return $tn(this,n-iQ((YYn(),F_t)),ern(uG(Lsn(this,16),29)||F_t,n),t,e)},uZn.Sh=function(n,t,e){var i;switch(t){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),Nmn(this.Ab,n,e);case 4:return this.sb&&(e=uG(this.sb,54).Th(this,1,sFt,e)),Jwn(this,uG(n,480),e);case 5:return!this.rb&&(this.rb=new vV(this,s_t,this)),Nmn(this.rb,n,e);case 6:return!this.vb&&(this.vb=new i_(fFt,this,6,7)),Nmn(this.vb,n,e);case 7:return this.Cb&&(e=(i=this.Db>>16)>=0?Jjn(this,e):this.Cb.Th(this,-1-i,null,e)),$Un(this,n,7,e)}return uG(ern(uG(Lsn(this,16),29)||(YYn(),F_t),t),69).wk().zk(this,$vn(this),t-iQ((YYn(),F_t)),n,e)},uZn.Uh=function(n,t,e){switch(t){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),Nyn(this.Ab,n,e);case 4:return Jwn(this,null,e);case 5:return!this.rb&&(this.rb=new vV(this,s_t,this)),Nyn(this.rb,n,e);case 6:return!this.vb&&(this.vb=new i_(fFt,this,6,7)),Nyn(this.vb,n,e);case 7:return $Un(this,null,7,e)}return uG(ern(uG(Lsn(this,16),29)||(YYn(),F_t),t),69).wk().Ak(this,$vn(this),t-iQ((YYn(),F_t)),n,e)},uZn.Wh=function(n){switch(n){case 0:return!!this.Ab&&0!=this.Ab.i;case 1:return null!=this.zb;case 2:return null!=this.yb;case 3:return null!=this.xb;case 4:return!!this.sb;case 5:return!!this.rb&&0!=this.rb.i;case 6:return!!this.vb&&0!=this.vb.i;case 7:return!!$0(this)}return l5(this,n-iQ((YYn(),F_t)),ern(uG(Lsn(this,16),29)||F_t,n))},uZn.Zh=function(n){return jKn(this,n)||VQn(this,n)},uZn.bi=function(n,t){switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),Czn(this.Ab),!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),void CW(this.Ab,uG(t,16));case 1:return void qon(this,mK(t));case 2:return void zon(this,mK(t));case 3:return void Xon(this,mK(t));case 4:return void HIn(this,uG(t,480));case 5:return!this.rb&&(this.rb=new vV(this,s_t,this)),Czn(this.rb),!this.rb&&(this.rb=new vV(this,s_t,this)),void CW(this.rb,uG(t,16));case 6:return!this.vb&&(this.vb=new i_(fFt,this,6,7)),Czn(this.vb),!this.vb&&(this.vb=new i_(fFt,this,6,7)),void CW(this.vb,uG(t,16))}lpn(this,n-iQ((YYn(),F_t)),ern(uG(Lsn(this,16),29)||F_t,n),t)},uZn.ei=function(n){var t,e;if(n&&this.rb)for(e=new DD(this.rb);e.e!=e.i.gc();)F$(t=Zkn(e),364)&&(uG(t,364).w=null);Dvn(this,64,n)},uZn.ii=function(){return YYn(),F_t},uZn.ki=function(n){switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),void Czn(this.Ab);case 1:return void qon(this,null);case 2:return void zon(this,null);case 3:return void Xon(this,null);case 4:return void HIn(this,null);case 5:return!this.rb&&(this.rb=new vV(this,s_t,this)),void Czn(this.rb);case 6:return!this.vb&&(this.vb=new i_(fFt,this,6,7)),void Czn(this.vb)}sdn(this,n-iQ((YYn(),F_t)),ern(uG(Lsn(this,16),29)||F_t,n))},uZn.pi=function(){ojn(this)},uZn.vi=function(){return!this.rb&&(this.rb=new vV(this,s_t,this)),this.rb},uZn.wi=function(){return this.sb},uZn.xi=function(){return this.ub},uZn.yi=function(){return this.xb},uZn.zi=function(){return this.yb},uZn.Ai=function(n){this.ub=n},uZn.Ib=function(){var n;return 64&this.Db?Wwn(this):((n=new fx(Wwn(this))).a+=" (nsURI: ",VA(n,this.yb),n.a+=", nsPrefix: ",VA(n,this.xb),n.a+=")",n.a)},uZn.xb=null,uZn.yb=null,zW(Ytt,"EPackageImpl",184),sDn(569,184,{110:1,2115:1,569:1,94:1,93:1,155:1,197:1,58:1,241:1,114:1,54:1,99:1,158:1,184:1,119:1,120:1,690:1},iDn),uZn.q=!1,uZn.r=!1;var dFt=!1;zW(Ztt,"ElkGraphPackageImpl",569),sDn(366,740,{110:1,342:1,167:1,135:1,422:1,366:1,96:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1,120:1},cs),uZn.Ah=function(n){return Vjn(this,n)},uZn.Lh=function(n,t,e){switch(n){case 7:return x0(this);case 8:return this.a}return spn(this,n,t,e)},uZn.Sh=function(n,t,e){var i;return 7===t?(this.Cb&&(e=(i=this.Db>>16)>=0?Vjn(this,e):this.Cb.Th(this,-1-i,null,e)),dz(this,uG(n,167),e)):SCn(this,n,t,e)},uZn.Uh=function(n,t,e){return 7==t?dz(this,null,e):phn(this,n,t,e)},uZn.Wh=function(n){switch(n){case 7:return!!x0(this);case 8:return!m_("",this.a)}return Kpn(this,n)},uZn.bi=function(n,t){switch(n){case 7:return void vKn(this,uG(t,167));case 8:return void Van(this,mK(t))}ISn(this,n,t)},uZn.ii=function(){return tYn(),UKt},uZn.ki=function(n){switch(n){case 7:return void vKn(this,null);case 8:return void Van(this,"")}Tmn(this,n)},uZn.Ib=function(){return zOn(this)},uZn.a="",zW(Ztt,"ElkLabelImpl",366),sDn(207,741,{110:1,342:1,84:1,167:1,27:1,422:1,207:1,96:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1,120:1},Bk),uZn.Ah=function(n){return hEn(this,n)},uZn.Lh=function(n,t,e){switch(n){case 9:return!this.c&&(this.c=new fV(wFt,this,9,9)),this.c;case 10:return!this.a&&(this.a=new fV(bFt,this,10,11)),this.a;case 11:return R0(this);case 12:return!this.b&&(this.b=new fV(aFt,this,12,3)),this.b;case 13:return qx(),!this.a&&(this.a=new fV(bFt,this,10,11)),this.a.i>0}return SMn(this,n,t,e)},uZn.Sh=function(n,t,e){var i;switch(t){case 9:return!this.c&&(this.c=new fV(wFt,this,9,9)),Nmn(this.c,n,e);case 10:return!this.a&&(this.a=new fV(bFt,this,10,11)),Nmn(this.a,n,e);case 11:return this.Cb&&(e=(i=this.Db>>16)>=0?hEn(this,e):this.Cb.Th(this,-1-i,null,e)),n_(this,uG(n,27),e);case 12:return!this.b&&(this.b=new fV(aFt,this,12,3)),Nmn(this.b,n,e)}return tSn(this,n,t,e)},uZn.Uh=function(n,t,e){switch(t){case 9:return!this.c&&(this.c=new fV(wFt,this,9,9)),Nyn(this.c,n,e);case 10:return!this.a&&(this.a=new fV(bFt,this,10,11)),Nyn(this.a,n,e);case 11:return n_(this,null,e);case 12:return!this.b&&(this.b=new fV(aFt,this,12,3)),Nyn(this.b,n,e)}return eSn(this,n,t,e)},uZn.Wh=function(n){switch(n){case 9:return!!this.c&&0!=this.c.i;case 10:return!!this.a&&0!=this.a.i;case 11:return!!R0(this);case 12:return!!this.b&&0!=this.b.i;case 13:return!this.a&&(this.a=new fV(bFt,this,10,11)),this.a.i>0}return iln(this,n)},uZn.bi=function(n,t){switch(n){case 9:return!this.c&&(this.c=new fV(wFt,this,9,9)),Czn(this.c),!this.c&&(this.c=new fV(wFt,this,9,9)),void CW(this.c,uG(t,16));case 10:return!this.a&&(this.a=new fV(bFt,this,10,11)),Czn(this.a),!this.a&&(this.a=new fV(bFt,this,10,11)),void CW(this.a,uG(t,16));case 11:return void GRn(this,uG(t,27));case 12:return!this.b&&(this.b=new fV(aFt,this,12,3)),Czn(this.b),!this.b&&(this.b=new fV(aFt,this,12,3)),void CW(this.b,uG(t,16))}SDn(this,n,t)},uZn.ii=function(){return tYn(),GKt},uZn.ki=function(n){switch(n){case 9:return!this.c&&(this.c=new fV(wFt,this,9,9)),void Czn(this.c);case 10:return!this.a&&(this.a=new fV(bFt,this,10,11)),void Czn(this.a);case 11:return void GRn(this,null);case 12:return!this.b&&(this.b=new fV(aFt,this,12,3)),void Czn(this.b)}yyn(this,n)},uZn.Ib=function(){return zBn(this)},zW(Ztt,"ElkNodeImpl",207),sDn(193,741,{110:1,342:1,84:1,167:1,123:1,422:1,193:1,96:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1,120:1},Hk),uZn.Ah=function(n){return Wjn(this,n)},uZn.Lh=function(n,t,e){return 9==n?h0(this):SMn(this,n,t,e)},uZn.Sh=function(n,t,e){var i;return 9===t?(this.Cb&&(e=(i=this.Db>>16)>=0?Wjn(this,e):this.Cb.Th(this,-1-i,null,e)),tF(this,uG(n,27),e)):tSn(this,n,t,e)},uZn.Uh=function(n,t,e){return 9==t?tF(this,null,e):eSn(this,n,t,e)},uZn.Wh=function(n){return 9==n?!!h0(this):iln(this,n)},uZn.bi=function(n,t){9!==n?SDn(this,n,t):LRn(this,uG(t,27))},uZn.ii=function(){return tYn(),qKt},uZn.ki=function(n){9!==n?yyn(this,n):LRn(this,null)},uZn.Ib=function(){return VBn(this)},zW(Ztt,"ElkPortImpl",193);var gFt=Iq(Pet,"BasicEMap/Entry");sDn(1122,120,{110:1,44:1,94:1,93:1,136:1,58:1,114:1,54:1,99:1,119:1,120:1},as),uZn.Fb=function(n){return this===n},uZn.ld=function(){return this.b},uZn.Hb=function(){return xx(this)},uZn.Di=function(n){Wan(this,uG(n,149))},uZn.Lh=function(n,t,e){switch(n){case 0:return this.b;case 1:return this.c}return Dyn(this,n,t,e)},uZn.Wh=function(n){switch(n){case 0:return!!this.b;case 1:return null!=this.c}return Wkn(this,n)},uZn.bi=function(n,t){switch(n){case 0:return void Wan(this,uG(t,149));case 1:return void Han(this,t)}sLn(this,n,t)},uZn.ii=function(){return tYn(),XKt},uZn.ki=function(n){switch(n){case 0:return void Wan(this,null);case 1:return void Han(this,null)}oAn(this,n)},uZn.Bi=function(){var n;return-1==this.a&&(n=this.b,this.a=n?Hon(n):0),this.a},uZn.md=function(){return this.c},uZn.Ci=function(n){this.a=n},uZn.nd=function(n){var t;return t=this.c,Han(this,n),t},uZn.Ib=function(){var n;return 64&this.Db?vxn(this):(JA(JA(JA(n=new WM,this.b?this.b.Pg():IZn),Y4n),ox(this.c)),n.a)},uZn.a=-1,uZn.c=null;var pFt,mFt,vFt,kFt,yFt,MFt,TFt,jFt,EFt=zW(Ztt,"ElkPropertyToValueMapEntryImpl",1122);sDn(996,1,{},ss),zW(Oet,"JsonAdapter",996),sDn(216,63,S1n,SM),zW(Oet,"JsonImportException",216),sDn(868,1,{},Zjn),zW(Oet,"JsonImporter",868),sDn(903,1,{},QO),zW(Oet,"JsonImporter/lambda$0$Type",903),sDn(904,1,{},JO),zW(Oet,"JsonImporter/lambda$1$Type",904),sDn(912,1,{},Yp),zW(Oet,"JsonImporter/lambda$10$Type",912),sDn(914,1,{},YO),zW(Oet,"JsonImporter/lambda$11$Type",914),sDn(915,1,{},ZO),zW(Oet,"JsonImporter/lambda$12$Type",915),sDn(921,1,{},SY),zW(Oet,"JsonImporter/lambda$13$Type",921),sDn(920,1,{},PY),zW(Oet,"JsonImporter/lambda$14$Type",920),sDn(916,1,{},nA),zW(Oet,"JsonImporter/lambda$15$Type",916),sDn(917,1,{},tA),zW(Oet,"JsonImporter/lambda$16$Type",917),sDn(918,1,{},eA),zW(Oet,"JsonImporter/lambda$17$Type",918),sDn(919,1,{},iA),zW(Oet,"JsonImporter/lambda$18$Type",919),sDn(924,1,{},Zp),zW(Oet,"JsonImporter/lambda$19$Type",924),sDn(905,1,{},nm),zW(Oet,"JsonImporter/lambda$2$Type",905),sDn(922,1,{},tm),zW(Oet,"JsonImporter/lambda$20$Type",922),sDn(923,1,{},em),zW(Oet,"JsonImporter/lambda$21$Type",923),sDn(927,1,{},im),zW(Oet,"JsonImporter/lambda$22$Type",927),sDn(925,1,{},rm),zW(Oet,"JsonImporter/lambda$23$Type",925),sDn(926,1,{},cm),zW(Oet,"JsonImporter/lambda$24$Type",926),sDn(929,1,{},am),zW(Oet,"JsonImporter/lambda$25$Type",929),sDn(928,1,{},om),zW(Oet,"JsonImporter/lambda$26$Type",928),sDn(930,1,QZn,rA),uZn.Cd=function(n){ptn(this.b,this.a,mK(n))},zW(Oet,"JsonImporter/lambda$27$Type",930),sDn(931,1,QZn,cA),uZn.Cd=function(n){mtn(this.b,this.a,mK(n))},zW(Oet,"JsonImporter/lambda$28$Type",931),sDn(932,1,{},aA),zW(Oet,"JsonImporter/lambda$29$Type",932),sDn(908,1,{},um),zW(Oet,"JsonImporter/lambda$3$Type",908),sDn(933,1,{},oA),zW(Oet,"JsonImporter/lambda$30$Type",933),sDn(934,1,{},sm),zW(Oet,"JsonImporter/lambda$31$Type",934),sDn(935,1,{},hm),zW(Oet,"JsonImporter/lambda$32$Type",935),sDn(936,1,{},fm),zW(Oet,"JsonImporter/lambda$33$Type",936),sDn(937,1,{},lm),zW(Oet,"JsonImporter/lambda$34$Type",937),sDn(870,1,{},bm),zW(Oet,"JsonImporter/lambda$35$Type",870),sDn(941,1,{},DU),zW(Oet,"JsonImporter/lambda$36$Type",941),sDn(938,1,QZn,wm),uZn.Cd=function(n){V8(this.a,uG(n,377))},zW(Oet,"JsonImporter/lambda$37$Type",938),sDn(939,1,QZn,sA),uZn.Cd=function(n){vA(this.a,this.b,uG(n,166))},zW(Oet,"JsonImporter/lambda$38$Type",939),sDn(940,1,QZn,hA),uZn.Cd=function(n){kA(this.a,this.b,uG(n,166))},zW(Oet,"JsonImporter/lambda$39$Type",940),sDn(906,1,{},dm),zW(Oet,"JsonImporter/lambda$4$Type",906),sDn(942,1,QZn,gm),uZn.Cd=function(n){W8(this.a,uG(n,8))},zW(Oet,"JsonImporter/lambda$40$Type",942),sDn(907,1,{},pm),zW(Oet,"JsonImporter/lambda$5$Type",907),sDn(911,1,{},mm),zW(Oet,"JsonImporter/lambda$6$Type",911),sDn(909,1,{},vm),zW(Oet,"JsonImporter/lambda$7$Type",909),sDn(910,1,{},km),zW(Oet,"JsonImporter/lambda$8$Type",910),sDn(913,1,{},ym),zW(Oet,"JsonImporter/lambda$9$Type",913),sDn(961,1,QZn,Mm),uZn.Cd=function(n){pQ(this.a,new QW(mK(n)))},zW(Oet,"JsonMetaDataConverter/lambda$0$Type",961),sDn(962,1,QZn,Tm),uZn.Cd=function(n){SW(this.a,uG(n,245))},zW(Oet,"JsonMetaDataConverter/lambda$1$Type",962),sDn(963,1,QZn,jm),uZn.Cd=function(n){m2(this.a,uG(n,143))},zW(Oet,"JsonMetaDataConverter/lambda$2$Type",963),sDn(964,1,QZn,Em),uZn.Cd=function(n){PW(this.a,uG(n,170))},zW(Oet,"JsonMetaDataConverter/lambda$3$Type",964),sDn(245,22,{3:1,34:1,22:1,245:1},fA);var SFt,PFt=_cn(p3n,"GraphFeature",245,Oat,brn,QU);sDn(11,1,{34:1,149:1},Cm,uF,mL,_N),uZn.Fd=function(n){return dD(this,uG(n,149))},uZn.Fb=function(n){return QZ(this,n)},uZn.Sg=function(){return Jkn(this)},uZn.Pg=function(){return this.b},uZn.Hb=function(){return pln(this.b)},uZn.Ib=function(){return this.b},zW(p3n,"Property",11),sDn(671,1,b2n,Sm),uZn.Ne=function(n,t){return wgn(this,uG(n,96),uG(t,96))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(p3n,"PropertyHolderComparator",671),sDn(709,1,$Zn,Pm),uZn.Nb=function(n){SV(this,n)},uZn.Pb=function(){return Mtn(this)},uZn.Qb=function(){xj()},uZn.Ob=function(){return!!this.a},zW(qet,"ElkGraphUtil/AncestorIterator",709);var CFt=Iq(Pet,"EList");sDn(70,56,{20:1,31:1,56:1,16:1,15:1,70:1,61:1}),uZn.bd=function(n,t){$dn(this,n,t)},uZn.Fc=function(n){return ttn(this,n)},uZn.cd=function(n,t){return bfn(this,n,t)},uZn.Gc=function(n){return CW(this,n)},uZn.Ii=function(){return new nR(this)},uZn.Ji=function(){return new tR(this)},uZn.Ki=function(n){return han(this,n)},uZn.Li=function(){return!0},uZn.Mi=function(n,t){},uZn.Ni=function(){},uZn.Oi=function(n,t){Ann(this,n,t)},uZn.Pi=function(n,t,e){},uZn.Qi=function(n,t){},uZn.Ri=function(n,t,e){},uZn.Fb=function(n){return G_n(this,n)},uZn.Hb=function(){return Bhn(this)},uZn.Si=function(){return!1},uZn.Kc=function(){return new DD(this)},uZn.ed=function(){return new Zx(this)},uZn.fd=function(n){var t;if(t=this.gc(),n<0||n>t)throw hv(new w_(n,t));return new QV(this,n)},uZn.Ui=function(n,t){this.Ti(n,this.dd(t))},uZn.Mc=function(n){return rin(this,n)},uZn.Wi=function(n,t){return t},uZn.hd=function(n,t){return Uyn(this,n,t)},uZn.Ib=function(){return Tpn(this)},uZn.Yi=function(){return!0},uZn.Zi=function(n,t){return gln(this,t)},zW(Pet,"AbstractEList",70),sDn(66,70,Qet,ls,Drn,Hun),uZn.Ei=function(n,t){return PCn(this,n,t)},uZn.Fi=function(n){return QMn(this,n)},uZn.Gi=function(n,t){edn(this,n,t)},uZn.Hi=function(n){z9(this,n)},uZn.$i=function(n){return Otn(this,n)},uZn.$b=function(){V9(this)},uZn.Hc=function(n){return sSn(this,n)},uZn.Xb=function(n){return zrn(this,n)},uZn._i=function(n){var t,e,i;++this.j,n>(e=null==this.g?0:this.g.length)&&(i=this.g,(t=e+(e/2|0)+4)=0&&(this.gd(t),!0)},uZn.Xi=function(n,t){return this.Dj(n,this.Zi(n,t))},uZn.gc=function(){return this.Ej()},uZn.Pc=function(){return this.Fj()},uZn.Qc=function(n){return this.Gj(n)},uZn.Ib=function(){return this.Hj()},zW(Pet,"DelegatingEList",2093),sDn(2094,2093,_it),uZn.Ei=function(n,t){return dGn(this,n,t)},uZn.Fi=function(n){return this.Ei(this.Ej(),n)},uZn.Gi=function(n,t){cDn(this,n,t)},uZn.Hi=function(n){S$n(this,n)},uZn.Li=function(){return!this.Mj()},uZn.$b=function(){_zn(this)},uZn.Ij=function(n,t,e,i,r){return new zZ(this,n,t,e,i,r)},uZn.Jj=function(n){Msn(this.jj(),n)},uZn.Kj=function(){return null},uZn.Lj=function(){return-1},uZn.jj=function(){return null},uZn.Mj=function(){return!1},uZn.Nj=function(n,t){return t},uZn.Oj=function(n,t){return t},uZn.Pj=function(){return!1},uZn.Qj=function(){return!this.Aj()},uZn.Ti=function(n,t){var e,i;return this.Pj()?(i=this.Qj(),e=pIn(this,n,t),this.Jj(this.Ij(7,xwn(t),e,n,i)),e):pIn(this,n,t)},uZn.gd=function(n){var t,e,i,r;return this.Pj()?(e=null,i=this.Qj(),t=this.Ij(4,r=Oq(this,n),null,n,i),this.Mj()&&r?(e=this.Oj(r,e))?(e.nj(t),e.oj()):this.Jj(t):e?(e.nj(t),e.oj()):this.Jj(t),r):(r=Oq(this,n),this.Mj()&&r&&(e=this.Oj(r,null))&&e.oj(),r)},uZn.Xi=function(n,t){return gGn(this,n,t)},zW(Utt,"DelegatingNotifyingListImpl",2094),sDn(152,1,Bit),uZn.nj=function(n){return kPn(this,n)},uZn.oj=function(){Cen(this)},uZn.gj=function(){return this.d},uZn.Kj=function(){return null},uZn.Rj=function(){return null},uZn.hj=function(n){return-1},uZn.ij=function(){return OFn(this)},uZn.jj=function(){return null},uZn.kj=function(){return AFn(this)},uZn.lj=function(){return this.o<0?this.o<-2?-2-this.o-1:-1:this.o},uZn.Sj=function(){return!1},uZn.mj=function(n){var t,e,i,r,c,a,o,u;switch(this.d){case 1:case 2:switch(n.gj()){case 1:case 2:if(xA(n.jj())===xA(this.jj())&&this.hj(null)==n.hj(null))return this.g=n.ij(),1==n.gj()&&(this.d=1),!0}case 4:if(4===n.gj()&&xA(n.jj())===xA(this.jj())&&this.hj(null)==n.hj(null))return a=kVn(this),c=this.o<0?this.o<-2?-2-this.o-1:-1:this.o,i=n.lj(),this.d=6,u=new Drn(2),c<=i?(ttn(u,this.n),ttn(u,n.kj()),this.g=Uhn(cT(YHt,1),W1n,28,15,[this.o=c,i+1])):(ttn(u,n.kj()),ttn(u,this.n),this.g=Uhn(cT(YHt,1),W1n,28,15,[this.o=i,c])),this.n=u,a||(this.o=-2-this.o-1),!0;break;case 6:if(4===n.gj()&&xA(n.jj())===xA(this.jj())&&this.hj(null)==n.hj(null)){for(a=kVn(this),i=n.lj(),o=uG(this.g,53),e=Inn(YHt,W1n,28,o.length+1,15,1),t=0;t>>0).toString(16))).a+=" (eventType: ",this.d){case 1:e.a+="SET";break;case 2:e.a+="UNSET";break;case 3:e.a+="ADD";break;case 5:e.a+="ADD_MANY";break;case 4:e.a+="REMOVE";break;case 6:e.a+="REMOVE_MANY";break;case 7:e.a+="MOVE";break;case 8:e.a+="REMOVING_ADAPTER";break;case 9:e.a+="RESOLVE";break;default:Aj(e,this.d)}if(pHn(this)&&(e.a+=", touch: true"),e.a+=", position: ",Aj(e,this.o<0?this.o<-2?-2-this.o-1:-1:this.o),e.a+=", notifier: ",zA(e,this.jj()),e.a+=", feature: ",zA(e,this.Kj()),e.a+=", oldValue: ",zA(e,AFn(this)),e.a+=", newValue: ",6==this.d&&F$(this.g,53)){for(t=uG(this.g,53),e.a+="[",n=0;n10?(this.b&&this.c.j==this.a||(this.b=new oX(this),this.a=this.j),cS(this.b,n)):sSn(this,n)},uZn.Yi=function(){return!0},uZn.a=0,zW(Pet,"AbstractEList/1",966),sDn(302,77,v0n,w_),zW(Pet,"AbstractEList/BasicIndexOutOfBoundsException",302),sDn(37,1,$Zn,DD),uZn.Nb=function(n){SV(this,n)},uZn.Xj=function(){if(this.i.j!=this.f)throw hv(new Fv)},uZn.Yj=function(){return Zkn(this)},uZn.Ob=function(){return this.e!=this.i.gc()},uZn.Pb=function(){return this.Yj()},uZn.Qb=function(){$Sn(this)},uZn.e=0,uZn.f=0,uZn.g=-1,zW(Pet,"AbstractEList/EIterator",37),sDn(286,37,UZn,Zx,QV),uZn.Qb=function(){$Sn(this)},uZn.Rb=function(n){Smn(this,n)},uZn.Zj=function(){var n;try{return n=this.d.Xb(--this.e),this.Xj(),this.g=this.e,n}catch(t){throw F$(t=Ehn(t),77)?(this.Xj(),hv(new Bv)):hv(t)}},uZn.$j=function(n){cTn(this,n)},uZn.Sb=function(){return 0!=this.e},uZn.Tb=function(){return this.e},uZn.Ub=function(){return this.Zj()},uZn.Vb=function(){return this.e-1},uZn.Wb=function(n){this.$j(n)},zW(Pet,"AbstractEList/EListIterator",286),sDn(355,37,$Zn,nR),uZn.Yj=function(){return nyn(this)},uZn.Qb=function(){throw hv(new Kv)},zW(Pet,"AbstractEList/NonResolvingEIterator",355),sDn(398,286,UZn,tR,N_),uZn.Rb=function(n){throw hv(new Kv)},uZn.Yj=function(){var n;try{return n=this.c.Vi(this.e),this.Xj(),this.g=this.e++,n}catch(t){throw F$(t=Ehn(t),77)?(this.Xj(),hv(new Bv)):hv(t)}},uZn.Zj=function(){var n;try{return n=this.c.Vi(--this.e),this.Xj(),this.g=this.e,n}catch(t){throw F$(t=Ehn(t),77)?(this.Xj(),hv(new Bv)):hv(t)}},uZn.Qb=function(){throw hv(new Kv)},uZn.Wb=function(n){throw hv(new Kv)},zW(Pet,"AbstractEList/NonResolvingEListIterator",398),sDn(2080,70,Git),uZn.Ei=function(n,t){var e,i,r,c,a,o,u,s,h;if(0!=(i=t.gc())){for(e=zln(this,(s=null==(u=uG(Lsn(this.a,4),129))?0:u.length)+i),(h=s-n)>0&&qGn(u,n,e,n+i,h),o=t.Kc(),c=0;ce)throw hv(new w_(n,e));return new qJ(this,n)},uZn.$b=function(){var n,t;++this.j,t=null==(n=uG(Lsn(this.a,4),129))?0:n.length,Pkn(this,null),Ann(this,t,n)},uZn.Hc=function(n){var t,e,i,r;if(null!=(t=uG(Lsn(this.a,4),129)))if(null!=n){for(i=0,r=(e=t).length;i=(e=null==(t=uG(Lsn(this.a,4),129))?0:t.length))throw hv(new w_(n,e));return t[n]},uZn.dd=function(n){var t,e,i;if(null!=(t=uG(Lsn(this.a,4),129)))if(null!=n){for(e=0,i=t.length;ee)throw hv(new w_(n,e));return new GJ(this,n)},uZn.Ti=function(n,t){var e,i,r;if(n>=(r=null==(e=lvn(this))?0:e.length))throw hv(new dM(zet+n+Vet+r));if(t>=r)throw hv(new dM(Wet+t+Vet+r));return i=e[t],n!=t&&(n0&&qGn(n,0,t,0,e),t},uZn.Qc=function(n){var t,e;return(e=null==(t=uG(Lsn(this.a,4),129))?0:t.length)>0&&(n.lengthe&&uQ(n,e,null),n},zW(Pet,"ArrayDelegatingEList",2080),sDn(1051,37,$Zn,M9),uZn.Xj=function(){if(this.b.j!=this.f||xA(uG(Lsn(this.b.a,4),129))!==xA(this.a))throw hv(new Fv)},uZn.Qb=function(){$Sn(this),this.a=uG(Lsn(this.b.a,4),129)},zW(Pet,"ArrayDelegatingEList/EIterator",1051),sDn(722,286,UZn,pV,GJ),uZn.Xj=function(){if(this.b.j!=this.f||xA(uG(Lsn(this.b.a,4),129))!==xA(this.a))throw hv(new Fv)},uZn.$j=function(n){cTn(this,n),this.a=uG(Lsn(this.b.a,4),129)},uZn.Qb=function(){$Sn(this),this.a=uG(Lsn(this.b.a,4),129)},zW(Pet,"ArrayDelegatingEList/EListIterator",722),sDn(1052,355,$Zn,T9),uZn.Xj=function(){if(this.b.j!=this.f||xA(uG(Lsn(this.b.a,4),129))!==xA(this.a))throw hv(new Fv)},zW(Pet,"ArrayDelegatingEList/NonResolvingEIterator",1052),sDn(723,398,UZn,mV,qJ),uZn.Xj=function(){if(this.b.j!=this.f||xA(uG(Lsn(this.b.a,4),129))!==xA(this.a))throw hv(new Fv)},zW(Pet,"ArrayDelegatingEList/NonResolvingEListIterator",723),sDn(615,302,v0n,pL),zW(Pet,"BasicEList/BasicIndexOutOfBoundsException",615),sDn(710,66,Qet,AA),uZn.bd=function(n,t){throw hv(new Kv)},uZn.Fc=function(n){throw hv(new Kv)},uZn.cd=function(n,t){throw hv(new Kv)},uZn.Gc=function(n){throw hv(new Kv)},uZn.$b=function(){throw hv(new Kv)},uZn._i=function(n){throw hv(new Kv)},uZn.Kc=function(){return this.Ii()},uZn.ed=function(){return this.Ji()},uZn.fd=function(n){return this.Ki(n)},uZn.Ti=function(n,t){throw hv(new Kv)},uZn.Ui=function(n,t){throw hv(new Kv)},uZn.gd=function(n){throw hv(new Kv)},uZn.Mc=function(n){throw hv(new Kv)},uZn.hd=function(n,t){throw hv(new Kv)},zW(Pet,"BasicEList/UnmodifiableEList",710),sDn(721,1,{3:1,20:1,16:1,15:1,61:1,597:1}),uZn.bd=function(n,t){Y$(this,n,uG(t,44))},uZn.Fc=function(n){return YR(this,uG(n,44))},uZn.Jc=function(n){z8(this,n)},uZn.Xb=function(n){return uG(zrn(this.c,n),136)},uZn.Ti=function(n,t){return uG(this.c.Ti(n,t),44)},uZn.Ui=function(n,t){Z$(this,n,uG(t,44))},uZn.Lc=function(){return new fX(null,new h3(this,16))},uZn.gd=function(n){return uG(this.c.gd(n),44)},uZn.hd=function(n,t){return EW(this,n,uG(t,44))},uZn.jd=function(n){Lon(this,n)},uZn.Nc=function(){return new h3(this,16)},uZn.Oc=function(){return new fX(null,new h3(this,16))},uZn.cd=function(n,t){return this.c.cd(n,t)},uZn.Gc=function(n){return this.c.Gc(n)},uZn.$b=function(){this.c.$b()},uZn.Hc=function(n){return this.c.Hc(n)},uZn.Ic=function(n){return yhn(this.c,n)},uZn._j=function(){var n,t;if(null==this.d){for(this.d=Inn(IFt,qit,66,2*this.f+1,0,1),t=this.e,this.f=0,n=this.c.Kc();n.e!=n.i.gc();)bMn(this,uG(n.Yj(),136));this.e=t}},uZn.Fb=function(n){return H_(this,n)},uZn.Hb=function(){return Bhn(this.c)},uZn.dd=function(n){return this.c.dd(n)},uZn.ak=function(){this.c=new Im(this)},uZn.dc=function(){return 0==this.f},uZn.Kc=function(){return this.c.Kc()},uZn.ed=function(){return this.c.ed()},uZn.fd=function(n){return this.c.fd(n)},uZn.bk=function(){return Tnn(this)},uZn.ck=function(n,t,e){return new xU(n,t,e)},uZn.dk=function(){return new ws},uZn.Mc=function(n){return uan(this,n)},uZn.gc=function(){return this.f},uZn.kd=function(n,t){return new C2(this.c,n,t)},uZn.Pc=function(){return this.c.Pc()},uZn.Qc=function(n){return this.c.Qc(n)},uZn.Ib=function(){return Tpn(this.c)},uZn.e=0,uZn.f=0,zW(Pet,"BasicEMap",721),sDn(1046,66,Qet,Im),uZn.Mi=function(n,t){Qv(this,uG(t,136))},uZn.Pi=function(n,t,e){var i;++(i=this,uG(t,136),i).a.e},uZn.Qi=function(n,t){Jv(this,uG(t,136))},uZn.Ri=function(n,t,e){fR(this,uG(t,136),uG(e,136))},uZn.Oi=function(n,t){Osn(this.a)},zW(Pet,"BasicEMap/1",1046),sDn(1047,66,Qet,ws),uZn.aj=function(n){return Inn(FFt,Xit,621,n,0,1)},zW(Pet,"BasicEMap/2",1047),sDn(1048,KZn,FZn,Om),uZn.$b=function(){this.a.c.$b()},uZn.Hc=function(n){return ymn(this.a,n)},uZn.Kc=function(){return 0==this.a.f?(EK(),KFt.a):new aj(this.a)},uZn.Mc=function(n){var t;return t=this.a.f,Svn(this.a,n),this.a.f!=t},uZn.gc=function(){return this.a.f},zW(Pet,"BasicEMap/3",1048),sDn(1049,31,RZn,Am),uZn.$b=function(){this.a.c.$b()},uZn.Hc=function(n){return q_n(this.a,n)},uZn.Kc=function(){return 0==this.a.f?(EK(),KFt.a):new oj(this.a)},uZn.gc=function(){return this.a.f},zW(Pet,"BasicEMap/4",1049),sDn(1050,KZn,FZn,Lm),uZn.$b=function(){this.a.c.$b()},uZn.Hc=function(n){var t,e,i,r,c,a,o,u,s;if(this.a.f>0&&F$(n,44)&&(this.a._j(),r=null==(o=(u=uG(n,44)).ld())?0:Hon(o),c=iF(this.a,r),t=this.a.d[c]))for(e=uG(t.g,379),s=t.i,a=0;a"+this.c},uZn.a=0;var KFt,FFt=zW(Pet,"BasicEMap/EntryImpl",621);sDn(546,1,{},ds),zW(Pet,"BasicEMap/View",546),sDn(783,1,{}),uZn.Fb=function(n){return PDn((hZ(),zot),n)},uZn.Hb=function(){return Zfn((hZ(),zot))},uZn.Ib=function(){return vIn((hZ(),zot))},zW(Pet,"ECollections/BasicEmptyUnmodifiableEList",783),sDn(1348,1,UZn,gs),uZn.Nb=function(n){SV(this,n)},uZn.Rb=function(n){throw hv(new Kv)},uZn.Ob=function(){return!1},uZn.Sb=function(){return!1},uZn.Pb=function(){throw hv(new Bv)},uZn.Tb=function(){return 0},uZn.Ub=function(){throw hv(new Bv)},uZn.Vb=function(){return-1},uZn.Qb=function(){throw hv(new Kv)},uZn.Wb=function(n){throw hv(new Kv)},zW(Pet,"ECollections/BasicEmptyUnmodifiableEList/1",1348),sDn(1346,783,{20:1,16:1,15:1,61:1},Gk),uZn.bd=function(n,t){iE()},uZn.Fc=function(n){return rE()},uZn.cd=function(n,t){return cE()},uZn.Gc=function(n){return aE()},uZn.$b=function(){oE()},uZn.Hc=function(n){return!1},uZn.Ic=function(n){return!1},uZn.Jc=function(n){z8(this,n)},uZn.Xb=function(n){return oL((hZ(),n)),null},uZn.dd=function(n){return-1},uZn.dc=function(){return!0},uZn.Kc=function(){return this.a},uZn.ed=function(){return this.a},uZn.fd=function(n){return this.a},uZn.Ti=function(n,t){return uE()},uZn.Ui=function(n,t){sE()},uZn.Lc=function(){return new fX(null,new h3(this,16))},uZn.gd=function(n){return hE()},uZn.Mc=function(n){return fE()},uZn.hd=function(n,t){return lE()},uZn.gc=function(){return 0},uZn.jd=function(n){Lon(this,n)},uZn.Nc=function(){return new h3(this,16)},uZn.Oc=function(){return new fX(null,new h3(this,16))},uZn.kd=function(n,t){return hZ(),new C2(zot,n,t)},uZn.Pc=function(){return Sz((hZ(),zot))},uZn.Qc=function(n){return hZ(),oTn(zot,n)},zW(Pet,"ECollections/EmptyUnmodifiableEList",1346),sDn(1347,783,{20:1,16:1,15:1,61:1,597:1},qk),uZn.bd=function(n,t){iE()},uZn.Fc=function(n){return rE()},uZn.cd=function(n,t){return cE()},uZn.Gc=function(n){return aE()},uZn.$b=function(){oE()},uZn.Hc=function(n){return!1},uZn.Ic=function(n){return!1},uZn.Jc=function(n){z8(this,n)},uZn.Xb=function(n){return oL((hZ(),n)),null},uZn.dd=function(n){return-1},uZn.dc=function(){return!0},uZn.Kc=function(){return this.a},uZn.ed=function(){return this.a},uZn.fd=function(n){return this.a},uZn.Ti=function(n,t){return uE()},uZn.Ui=function(n,t){sE()},uZn.Lc=function(){return new fX(null,new h3(this,16))},uZn.gd=function(n){return hE()},uZn.Mc=function(n){return fE()},uZn.hd=function(n,t){return lE()},uZn.gc=function(){return 0},uZn.jd=function(n){Lon(this,n)},uZn.Nc=function(){return new h3(this,16)},uZn.Oc=function(){return new fX(null,new h3(this,16))},uZn.kd=function(n,t){return hZ(),new C2(zot,n,t)},uZn.Pc=function(){return Sz((hZ(),zot))},uZn.Qc=function(n){return hZ(),oTn(zot,n)},uZn.bk=function(){return hZ(),hZ(),Vot},zW(Pet,"ECollections/EmptyUnmodifiableEMap",1347);var _Ft,BFt=Iq(Pet,"Enumerator");sDn(288,1,{288:1},Z_n),uZn.Fb=function(n){var t;return this===n||!!F$(n,288)&&(t=uG(n,288),this.f==t.f&&yX(this.i,t.i)&&kX(this.a,256&this.f?256&t.f?t.a:null:256&t.f?null:t.a)&&kX(this.d,t.d)&&kX(this.g,t.g)&&kX(this.e,t.e)&&Ykn(this,t))},uZn.Hb=function(){return this.f},uZn.Ib=function(){return DUn(this)},uZn.f=0;var HFt,UFt,GFt,qFt=0,XFt=0,zFt=0,VFt=0,WFt=0,QFt=0,JFt=0,YFt=0,ZFt=0,n_t=0,t_t=0,e_t=0,i_t=0;zW(Pet,"URI",288),sDn(1121,45,B0n,Xk),uZn.zc=function(n,t){return uG(r2(this,mK(n),uG(t,288)),288)},zW(Pet,"URI/URICache",1121),sDn(506,66,Qet,us,$X),uZn.Si=function(){return!0},zW(Pet,"UniqueEList",506),sDn(590,63,S1n,Pen),zW(Pet,"WrappedException",590);var r_t,c_t=Iq(Itt,Wit),a_t=Iq(Itt,Qit),o_t=Iq(Itt,Jit),u_t=Iq(Itt,Yit),s_t=Iq(Itt,Zit),h_t=Iq(Itt,"EClass"),f_t=Iq(Itt,"EDataType");sDn(1233,45,B0n,zk),uZn.xc=function(n){return RA(n)?U1(this,n):DA(FX(this.f,n))},zW(Itt,"EDataType/Internal/ConversionDelegate/Factory/Registry/Impl",1233);var l_t,b_t,w_t=Iq(Itt,"EEnum"),d_t=Iq(Itt,nrt),g_t=Iq(Itt,trt),p_t=Iq(Itt,ert),m_t=Iq(Itt,irt),v_t=Iq(Itt,rrt);sDn(1042,1,{},os),uZn.Ib=function(){return"NIL"},zW(Itt,"EStructuralFeature/Internal/DynamicValueHolder/1",1042),sDn(1041,45,B0n,Vk),uZn.xc=function(n){return RA(n)?U1(this,n):DA(FX(this.f,n))},zW(Itt,"EStructuralFeature/Internal/SettingDelegate/Factory/Registry/Impl",1041);var k_t,y_t,M_t,T_t,j_t,E_t,S_t,P_t,C_t,I_t,O_t,A_t,L_t,N_t,$_t,D_t,x_t,R_t,K_t,F_t,__t,B_t,H_t,U_t,G_t,q_t,X_t,z_t,V_t,W_t,Q_t,J_t=Iq(Itt,crt),Y_t=Iq(Itt,"EValidator/PatternMatcher"),Z_t=Iq(art,"FeatureMap/Entry");sDn(545,1,{76:1},TA),uZn.Lk=function(){return this.a},uZn.md=function(){return this.b},zW(Ytt,"BasicEObjectImpl/1",545),sDn(1040,1,ort,jA),uZn.Fk=function(n){return U9(this.a,this.b,n)},uZn.Qj=function(){return M0(this.a,this.b)},uZn.Wb=function(n){y0(this.a,this.b,n)},uZn.Gk=function(){VQ(this.a,this.b)},zW(Ytt,"BasicEObjectImpl/4",1040),sDn(2081,1,{114:1}),uZn.Mk=function(n){this.e=0==n?X_t:Inn(dat,EZn,1,n,5,1)},uZn.li=function(n){return this.e[n]},uZn.mi=function(n,t){this.e[n]=t},uZn.ni=function(n){this.e[n]=null},uZn.Nk=function(){return this.c},uZn.Ok=function(){throw hv(new Kv)},uZn.Pk=function(){throw hv(new Kv)},uZn.Qk=function(){return this.d},uZn.Rk=function(){return null!=this.e},uZn.Sk=function(n){this.c=n},uZn.Tk=function(n){throw hv(new Kv)},uZn.Uk=function(n){throw hv(new Kv)},uZn.Vk=function(n){this.d=n},zW(Ytt,"BasicEObjectImpl/EPropertiesHolderBaseImpl",2081),sDn(192,2081,{114:1},Ll),uZn.Ok=function(){return this.a},uZn.Pk=function(){return this.b},uZn.Tk=function(n){this.a=n},uZn.Uk=function(n){this.b=n},zW(Ytt,"BasicEObjectImpl/EPropertiesHolderImpl",192),sDn(516,99,Jtt,ps),uZn.uh=function(){return this.f},uZn.zh=function(){return this.k},uZn.Bh=function(n,t){this.g=n,this.i=t},uZn.Dh=function(){return 2&this.j?this.$h().Nk():this.ii()},uZn.Fh=function(){return this.i},uZn.wh=function(){return!!(1&this.j)},uZn.Ph=function(){return this.g},uZn.Vh=function(){return!!(4&this.j)},uZn.$h=function(){return!this.k&&(this.k=new Ll),this.k},uZn.ci=function(n){this.$h().Sk(n),n?this.j|=2:this.j&=-3},uZn.ei=function(n){this.$h().Uk(n),n?this.j|=4:this.j&=-5},uZn.ii=function(){return(tQ(),M_t).S},uZn.i=0,uZn.j=1,zW(Ytt,"EObjectImpl",516),sDn(798,516,{110:1,94:1,93:1,58:1,114:1,54:1,99:1},BG),uZn.li=function(n){return this.e[n]},uZn.mi=function(n,t){this.e[n]=t},uZn.ni=function(n){this.e[n]=null},uZn.Dh=function(){return this.d},uZn.Ih=function(n){return emn(this.d,n)},uZn.Kh=function(){return this.d},uZn.Oh=function(){return null!=this.e},uZn.$h=function(){return!this.k&&(this.k=new ms),this.k},uZn.ci=function(n){this.d=n},uZn.hi=function(){var n;return null==this.e&&(n=iQ(this.d),this.e=0==n?z_t:Inn(dat,EZn,1,n,5,1)),this},uZn.ji=function(){return 0},zW(Ytt,"DynamicEObjectImpl",798),sDn(1522,798,{110:1,44:1,94:1,93:1,136:1,58:1,114:1,54:1,99:1},Eq),uZn.Fb=function(n){return this===n},uZn.Hb=function(){return xx(this)},uZn.ci=function(n){this.d=n,this.b=EKn(n,"key"),this.c=EKn(n,uet)},uZn.Bi=function(){var n;return-1==this.a&&(n=zen(this,this.b),this.a=null==n?0:Hon(n)),this.a},uZn.ld=function(){return zen(this,this.b)},uZn.md=function(){return zen(this,this.c)},uZn.Ci=function(n){this.a=n},uZn.Di=function(n){y0(this,this.b,n)},uZn.nd=function(n){var t;return t=zen(this,this.c),y0(this,this.c,n),t},uZn.a=0,zW(Ytt,"DynamicEObjectImpl/BasicEMapEntry",1522),sDn(1523,1,{114:1},ms),uZn.Mk=function(n){throw hv(new Kv)},uZn.li=function(n){throw hv(new Kv)},uZn.mi=function(n,t){throw hv(new Kv)},uZn.ni=function(n){throw hv(new Kv)},uZn.Nk=function(){throw hv(new Kv)},uZn.Ok=function(){return this.a},uZn.Pk=function(){return this.b},uZn.Qk=function(){return this.c},uZn.Rk=function(){throw hv(new Kv)},uZn.Sk=function(n){throw hv(new Kv)},uZn.Tk=function(n){this.a=n},uZn.Uk=function(n){this.b=n},uZn.Vk=function(n){this.c=n},zW(Ytt,"DynamicEObjectImpl/DynamicEPropertiesHolderImpl",1523),sDn(519,158,{110:1,94:1,93:1,598:1,155:1,58:1,114:1,54:1,99:1,519:1,158:1,119:1,120:1},vs),uZn.Ah=function(n){return Yjn(this,n)},uZn.Lh=function(n,t,e){switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),this.Ab;case 1:return this.d;case 2:return e?(!this.b&&(this.b=new XR((YYn(),H_t),wBt,this)),this.b):(!this.b&&(this.b=new XR((YYn(),H_t),wBt,this)),Tnn(this.b));case 3:return F0(this);case 4:return!this.a&&(this.a=new MD(nFt,this,4)),this.a;case 5:return!this.c&&(this.c=new OD(nFt,this,5)),this.c}return $tn(this,n-iQ((YYn(),T_t)),ern(uG(Lsn(this,16),29)||T_t,n),t,e)},uZn.Sh=function(n,t,e){var i;switch(t){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),Nmn(this.Ab,n,e);case 3:return this.Cb&&(e=(i=this.Db>>16)>=0?Yjn(this,e):this.Cb.Th(this,-1-i,null,e)),gz(this,uG(n,155),e)}return uG(ern(uG(Lsn(this,16),29)||(YYn(),T_t),t),69).wk().zk(this,$vn(this),t-iQ((YYn(),T_t)),n,e)},uZn.Uh=function(n,t,e){switch(t){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),Nyn(this.Ab,n,e);case 2:return!this.b&&(this.b=new XR((YYn(),H_t),wBt,this)),G_(this.b,n,e);case 3:return gz(this,null,e);case 4:return!this.a&&(this.a=new MD(nFt,this,4)),Nyn(this.a,n,e)}return uG(ern(uG(Lsn(this,16),29)||(YYn(),T_t),t),69).wk().Ak(this,$vn(this),t-iQ((YYn(),T_t)),n,e)},uZn.Wh=function(n){switch(n){case 0:return!!this.Ab&&0!=this.Ab.i;case 1:return null!=this.d;case 2:return!!this.b&&0!=this.b.f;case 3:return!!F0(this);case 4:return!!this.a&&0!=this.a.i;case 5:return!!this.c&&0!=this.c.i}return l5(this,n-iQ((YYn(),T_t)),ern(uG(Lsn(this,16),29)||T_t,n))},uZn.bi=function(n,t){switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),Czn(this.Ab),!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),void CW(this.Ab,uG(t,16));case 1:return void xq(this,mK(t));case 2:return!this.b&&(this.b=new XR((YYn(),H_t),wBt,this)),void Jun(this.b,t);case 3:return void kKn(this,uG(t,155));case 4:return!this.a&&(this.a=new MD(nFt,this,4)),Czn(this.a),!this.a&&(this.a=new MD(nFt,this,4)),void CW(this.a,uG(t,16));case 5:return!this.c&&(this.c=new OD(nFt,this,5)),Czn(this.c),!this.c&&(this.c=new OD(nFt,this,5)),void CW(this.c,uG(t,16))}lpn(this,n-iQ((YYn(),T_t)),ern(uG(Lsn(this,16),29)||T_t,n),t)},uZn.ii=function(){return YYn(),T_t},uZn.ki=function(n){switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),void Czn(this.Ab);case 1:return void Yan(this,null);case 2:return!this.b&&(this.b=new XR((YYn(),H_t),wBt,this)),void this.b.c.$b();case 3:return void kKn(this,null);case 4:return!this.a&&(this.a=new MD(nFt,this,4)),void Czn(this.a);case 5:return!this.c&&(this.c=new OD(nFt,this,5)),void Czn(this.c)}sdn(this,n-iQ((YYn(),T_t)),ern(uG(Lsn(this,16),29)||T_t,n))},uZn.Ib=function(){return fdn(this)},uZn.d=null,zW(Ytt,"EAnnotationImpl",519),sDn(141,721,urt,ltn),uZn.Gi=function(n,t){qN(this,n,uG(t,44))},uZn.Wk=function(n,t){return U_(this,uG(n,44),t)},uZn.$i=function(n){return uG(uG(this.c,71).$i(n),136)},uZn.Ii=function(){return uG(this.c,71).Ii()},uZn.Ji=function(){return uG(this.c,71).Ji()},uZn.Ki=function(n){return uG(this.c,71).Ki(n)},uZn.Xk=function(n,t){return G_(this,n,t)},uZn.Fk=function(n){return uG(this.c,79).Fk(n)},uZn.ak=function(){},uZn.Qj=function(){return uG(this.c,79).Qj()},uZn.ck=function(n,t,e){var i;return(i=uG(Hrn(this.b).wi().si(this.b),136)).Ci(n),i.Di(t),i.nd(e),i},uZn.dk=function(){return new Vm(this)},uZn.Wb=function(n){Jun(this,n)},uZn.Gk=function(){uG(this.c,79).Gk()},zW(art,"EcoreEMap",141),sDn(165,141,urt,XR),uZn._j=function(){var n,t,e,i,r;if(null==this.d){for(r=Inn(IFt,qit,66,2*this.f+1,0,1),e=this.c.Kc();e.e!=e.i.gc();)!(n=r[i=((t=uG(e.Yj(),136)).Bi()&vZn)%r.length])&&(n=r[i]=new Vm(this)),n.Fc(t);this.d=r}},zW(Ytt,"EAnnotationImpl/1",165),sDn(292,448,{110:1,94:1,93:1,155:1,197:1,58:1,114:1,481:1,54:1,99:1,158:1,292:1,119:1,120:1}),uZn.Lh=function(n,t,e){switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),this.Ab;case 1:return this.zb;case 2:return qx(),!!(256&this.Bb);case 3:return qx(),!!(512&this.Bb);case 4:return xwn(this.s);case 5:return xwn(this.t);case 6:return qx(),!!this.Jk();case 7:return qx(),this.s>=1;case 8:return t?bEn(this):this.r;case 9:return this.q}return $tn(this,n-iQ(this.ii()),ern(uG(Lsn(this,16),29)||this.ii(),n),t,e)},uZn.Uh=function(n,t,e){switch(t){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),Nyn(this.Ab,n,e);case 9:return IW(this,e)}return uG(ern(uG(Lsn(this,16),29)||this.ii(),t),69).wk().Ak(this,$vn(this),t-iQ(this.ii()),n,e)},uZn.Wh=function(n){switch(n){case 0:return!!this.Ab&&0!=this.Ab.i;case 1:return null!=this.zb;case 2:return!(256&this.Bb);case 3:return!(512&this.Bb);case 4:return 0!=this.s;case 5:return 1!=this.t;case 6:return this.Jk();case 7:return this.s>=1;case 8:return!!this.r&&!this.q.e&&0==yQ(this.q).i;case 9:return!(!this.q||this.r&&!this.q.e&&0==yQ(this.q).i)}return l5(this,n-iQ(this.ii()),ern(uG(Lsn(this,16),29)||this.ii(),n))},uZn.bi=function(n,t){var e;switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),Czn(this.Ab),!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),void CW(this.Ab,uG(t,16));case 1:return void this.ui(mK(t));case 2:return void ddn(this,oM(gK(t)));case 3:return void mdn(this,oM(gK(t)));case 4:return void Pcn(this,uG(t,17).a);case 5:return void this.Zk(uG(t,17).a);case 8:return void Kbn(this,uG(t,142));case 9:return void((e=CCn(this,uG(t,89),null))&&e.oj())}lpn(this,n-iQ(this.ii()),ern(uG(Lsn(this,16),29)||this.ii(),n),t)},uZn.ii=function(){return YYn(),G_t},uZn.ki=function(n){var t;switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),void Czn(this.Ab);case 1:return void this.ui(null);case 2:return void ddn(this,!0);case 3:return void mdn(this,!0);case 4:return void Pcn(this,0);case 5:return void this.Zk(1);case 8:return void Kbn(this,null);case 9:return void((t=CCn(this,null,null))&&t.oj())}sdn(this,n-iQ(this.ii()),ern(uG(Lsn(this,16),29)||this.ii(),n))},uZn.pi=function(){bEn(this),this.Bb|=1},uZn.Hk=function(){return bEn(this)},uZn.Ik=function(){return this.t},uZn.Jk=function(){var n;return(n=this.t)>1||-1==n},uZn.Si=function(){return!!(512&this.Bb)},uZn.Yk=function(n,t){return Ywn(this,n,t)},uZn.Zk=function(n){Ccn(this,n)},uZn.Ib=function(){return L$n(this)},uZn.s=0,uZn.t=1,zW(Ytt,"ETypedElementImpl",292),sDn(462,292,{110:1,94:1,93:1,155:1,197:1,58:1,179:1,69:1,114:1,481:1,54:1,99:1,158:1,462:1,292:1,119:1,120:1,692:1}),uZn.Ah=function(n){return pjn(this,n)},uZn.Lh=function(n,t,e){switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),this.Ab;case 1:return this.zb;case 2:return qx(),!!(256&this.Bb);case 3:return qx(),!!(512&this.Bb);case 4:return xwn(this.s);case 5:return xwn(this.t);case 6:return qx(),!!this.Jk();case 7:return qx(),this.s>=1;case 8:return t?bEn(this):this.r;case 9:return this.q;case 10:return qx(),!!(this.Bb&w1n);case 11:return qx(),!!(this.Bb&frt);case 12:return qx(),!!(this.Bb&j0n);case 13:return this.j;case 14:return NRn(this);case 15:return qx(),!!(this.Bb&hrt);case 16:return qx(),!!(this.Bb&VZn);case 17:return K0(this)}return $tn(this,n-iQ(this.ii()),ern(uG(Lsn(this,16),29)||this.ii(),n),t,e)},uZn.Sh=function(n,t,e){var i;switch(t){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),Nmn(this.Ab,n,e);case 17:return this.Cb&&(e=(i=this.Db>>16)>=0?pjn(this,e):this.Cb.Th(this,-1-i,null,e)),$Un(this,n,17,e)}return uG(ern(uG(Lsn(this,16),29)||this.ii(),t),69).wk().zk(this,$vn(this),t-iQ(this.ii()),n,e)},uZn.Uh=function(n,t,e){switch(t){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),Nyn(this.Ab,n,e);case 9:return IW(this,e);case 17:return $Un(this,null,17,e)}return uG(ern(uG(Lsn(this,16),29)||this.ii(),t),69).wk().Ak(this,$vn(this),t-iQ(this.ii()),n,e)},uZn.Wh=function(n){switch(n){case 0:return!!this.Ab&&0!=this.Ab.i;case 1:return null!=this.zb;case 2:return!(256&this.Bb);case 3:return!(512&this.Bb);case 4:return 0!=this.s;case 5:return 1!=this.t;case 6:return this.Jk();case 7:return this.s>=1;case 8:return!!this.r&&!this.q.e&&0==yQ(this.q).i;case 9:return!(!this.q||this.r&&!this.q.e&&0==yQ(this.q).i);case 10:return!(this.Bb&w1n);case 11:return!!(this.Bb&frt);case 12:return!!(this.Bb&j0n);case 13:return null!=this.j;case 14:return null!=NRn(this);case 15:return!!(this.Bb&hrt);case 16:return!!(this.Bb&VZn);case 17:return!!K0(this)}return l5(this,n-iQ(this.ii()),ern(uG(Lsn(this,16),29)||this.ii(),n))},uZn.bi=function(n,t){var e;switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),Czn(this.Ab),!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),void CW(this.Ab,uG(t,16));case 1:return void g2(this,mK(t));case 2:return void ddn(this,oM(gK(t)));case 3:return void mdn(this,oM(gK(t)));case 4:return void Pcn(this,uG(t,17).a);case 5:return void this.Zk(uG(t,17).a);case 8:return void Kbn(this,uG(t,142));case 9:return void((e=CCn(this,uG(t,89),null))&&e.oj());case 10:return void Wdn(this,oM(gK(t)));case 11:return void Ydn(this,oM(gK(t)));case 12:return void Qdn(this,oM(gK(t)));case 13:return void mA(this,mK(t));case 15:return void Jdn(this,oM(gK(t)));case 16:return void Cgn(this,oM(gK(t)))}lpn(this,n-iQ(this.ii()),ern(uG(Lsn(this,16),29)||this.ii(),n),t)},uZn.ii=function(){return YYn(),U_t},uZn.ki=function(n){var t;switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),void Czn(this.Ab);case 1:return F$(this.Cb,90)&&yLn(y9(uG(this.Cb,90)),4),void qon(this,null);case 2:return void ddn(this,!0);case 3:return void mdn(this,!0);case 4:return void Pcn(this,0);case 5:return void this.Zk(1);case 8:return void Kbn(this,null);case 9:return void((t=CCn(this,null,null))&&t.oj());case 10:return void Wdn(this,!0);case 11:return void Ydn(this,!1);case 12:return void Qdn(this,!1);case 13:return this.i=null,void lon(this,null);case 15:return void Jdn(this,!1);case 16:return void Cgn(this,!1)}sdn(this,n-iQ(this.ii()),ern(uG(Lsn(this,16),29)||this.ii(),n))},uZn.pi=function(){BJ(Nen((gAn(),kBt),this)),bEn(this),this.Bb|=1},uZn.pk=function(){return this.f},uZn.ik=function(){return NRn(this)},uZn.qk=function(){return K0(this)},uZn.uk=function(){return null},uZn.$k=function(){return this.k},uZn.Lj=function(){return this.n},uZn.vk=function(){return qSn(this)},uZn.wk=function(){var n,t,e,i,r,c,a,o,u;return this.p||((null==(e=K0(this)).i&&eqn(e),e.i).length,(i=this.uk())&&iQ(K0(i)),n=(a=(r=bEn(this)).kk())?1&a.i?a==ZHt?cot:a==YHt?dot:a==iUt?lot:a==eUt?fot:a==nUt?yot:a==rUt?Tot:a==tUt?uot:hot:a:null,t=NRn(this),o=r.ik(),Vgn(this),this.Bb&VZn&&((c=cSn((gAn(),kBt),e))&&c!=this||(c=_3(Nen(kBt,this))))?this.p=new SA(this,c):this.Jk()?this.al()?i?this.Bb&hrt?n?this.bl()?this.p=new CY(47,n,this,i):this.p=new CY(5,n,this,i):this.bl()?this.p=new r8(46,this,i):this.p=new r8(4,this,i):n?this.bl()?this.p=new CY(49,n,this,i):this.p=new CY(7,n,this,i):this.bl()?this.p=new r8(48,this,i):this.p=new r8(6,this,i):this.Bb&hrt?n?n==Sat?this.p=new RU(50,gFt,this):this.bl()?this.p=new RU(43,n,this):this.p=new RU(1,n,this):this.bl()?this.p=new GZ(42,this):this.p=new GZ(0,this):n?n==Sat?this.p=new RU(41,gFt,this):this.bl()?this.p=new RU(45,n,this):this.p=new RU(3,n,this):this.bl()?this.p=new GZ(44,this):this.p=new GZ(2,this):F$(r,156)?n==Z_t?this.p=new GZ(40,this):512&this.Bb?this.Bb&hrt?this.p=n?new RU(9,n,this):new GZ(8,this):this.p=n?new RU(11,n,this):new GZ(10,this):this.Bb&hrt?this.p=n?new RU(13,n,this):new GZ(12,this):this.p=n?new RU(15,n,this):new GZ(14,this):i?(u=i.t)>1||-1==u?this.bl()?this.Bb&hrt?this.p=n?new CY(25,n,this,i):new r8(24,this,i):this.p=n?new CY(27,n,this,i):new r8(26,this,i):this.Bb&hrt?this.p=n?new CY(29,n,this,i):new r8(28,this,i):this.p=n?new CY(31,n,this,i):new r8(30,this,i):this.bl()?this.Bb&hrt?this.p=n?new CY(33,n,this,i):new r8(32,this,i):this.p=n?new CY(35,n,this,i):new r8(34,this,i):this.Bb&hrt?this.p=n?new CY(37,n,this,i):new r8(36,this,i):this.p=n?new CY(39,n,this,i):new r8(38,this,i):this.bl()?this.Bb&hrt?this.p=n?new RU(17,n,this):new GZ(16,this):this.p=n?new RU(19,n,this):new GZ(18,this):this.Bb&hrt?this.p=n?new RU(21,n,this):new GZ(20,this):this.p=n?new RU(23,n,this):new GZ(22,this):this._k()?this.bl()?this.p=new KU(uG(r,29),this,i):this.p=new _1(uG(r,29),this,i):F$(r,156)?n==Z_t?this.p=new GZ(40,this):this.Bb&hrt?this.p=n?new bz(t,o,this,(Pmn(),a==YHt?hBt:a==ZHt?cBt:a==nUt?fBt:a==iUt?sBt:a==eUt?uBt:a==rUt?bBt:a==tUt?aBt:a==JHt?oBt:lBt)):new AY(uG(r,156),t,o,this):this.p=n?new lz(t,o,this,(Pmn(),a==YHt?hBt:a==ZHt?cBt:a==nUt?fBt:a==iUt?sBt:a==eUt?uBt:a==rUt?bBt:a==tUt?aBt:a==JHt?oBt:lBt)):new OY(uG(r,156),t,o,this):this.al()?i?this.Bb&hrt?this.bl()?this.p=new GU(uG(r,29),this,i):this.p=new UU(uG(r,29),this,i):this.bl()?this.p=new HU(uG(r,29),this,i):this.p=new FU(uG(r,29),this,i):this.Bb&hrt?this.bl()?this.p=new cK(uG(r,29),this):this.p=new iK(uG(r,29),this):this.bl()?this.p=new eK(uG(r,29),this):this.p=new tK(uG(r,29),this):this.bl()?i?this.Bb&hrt?this.p=new qU(uG(r,29),this,i):this.p=new _U(uG(r,29),this,i):this.Bb&hrt?this.p=new aK(uG(r,29),this):this.p=new rK(uG(r,29),this):i?this.Bb&hrt?this.p=new XU(uG(r,29),this,i):this.p=new BU(uG(r,29),this,i):this.Bb&hrt?this.p=new oK(uG(r,29),this):this.p=new OX(uG(r,29),this)),this.p},uZn.rk=function(){return!!(this.Bb&w1n)},uZn._k=function(){return!1},uZn.al=function(){return!1},uZn.sk=function(){return!!(this.Bb&VZn)},uZn.xk=function(){return ein(this)},uZn.bl=function(){return!1},uZn.tk=function(){return!!(this.Bb&hrt)},uZn.cl=function(n){this.k=n},uZn.ui=function(n){g2(this,n)},uZn.Ib=function(){return MBn(this)},uZn.e=!1,uZn.n=0,zW(Ytt,"EStructuralFeatureImpl",462),sDn(331,462,{110:1,94:1,93:1,35:1,155:1,197:1,58:1,179:1,69:1,114:1,481:1,54:1,99:1,331:1,158:1,462:1,292:1,119:1,120:1,692:1},Wk),uZn.Lh=function(n,t,e){switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),this.Ab;case 1:return this.zb;case 2:return qx(),!!(256&this.Bb);case 3:return qx(),!!(512&this.Bb);case 4:return xwn(this.s);case 5:return xwn(this.t);case 6:return qx(),!!SNn(this);case 7:return qx(),this.s>=1;case 8:return t?bEn(this):this.r;case 9:return this.q;case 10:return qx(),!!(this.Bb&w1n);case 11:return qx(),!!(this.Bb&frt);case 12:return qx(),!!(this.Bb&j0n);case 13:return this.j;case 14:return NRn(this);case 15:return qx(),!!(this.Bb&hrt);case 16:return qx(),!!(this.Bb&VZn);case 17:return K0(this);case 18:return qx(),!!(this.Bb&Qtt);case 19:return t?khn(this):E7(this)}return $tn(this,n-iQ((YYn(),j_t)),ern(uG(Lsn(this,16),29)||j_t,n),t,e)},uZn.Wh=function(n){switch(n){case 0:return!!this.Ab&&0!=this.Ab.i;case 1:return null!=this.zb;case 2:return!(256&this.Bb);case 3:return!(512&this.Bb);case 4:return 0!=this.s;case 5:return 1!=this.t;case 6:return SNn(this);case 7:return this.s>=1;case 8:return!!this.r&&!this.q.e&&0==yQ(this.q).i;case 9:return!(!this.q||this.r&&!this.q.e&&0==yQ(this.q).i);case 10:return!(this.Bb&w1n);case 11:return!!(this.Bb&frt);case 12:return!!(this.Bb&j0n);case 13:return null!=this.j;case 14:return null!=NRn(this);case 15:return!!(this.Bb&hrt);case 16:return!!(this.Bb&VZn);case 17:return!!K0(this);case 18:return!!(this.Bb&Qtt);case 19:return!!E7(this)}return l5(this,n-iQ((YYn(),j_t)),ern(uG(Lsn(this,16),29)||j_t,n))},uZn.bi=function(n,t){var e;switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),Czn(this.Ab),!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),void CW(this.Ab,uG(t,16));case 1:return void g2(this,mK(t));case 2:return void ddn(this,oM(gK(t)));case 3:return void mdn(this,oM(gK(t)));case 4:return void Pcn(this,uG(t,17).a);case 5:return void fj(this,uG(t,17).a);case 8:return void Kbn(this,uG(t,142));case 9:return void((e=CCn(this,uG(t,89),null))&&e.oj());case 10:return void Wdn(this,oM(gK(t)));case 11:return void Ydn(this,oM(gK(t)));case 12:return void Qdn(this,oM(gK(t)));case 13:return void mA(this,mK(t));case 15:return void Jdn(this,oM(gK(t)));case 16:return void Cgn(this,oM(gK(t)));case 18:return void Sgn(this,oM(gK(t)))}lpn(this,n-iQ((YYn(),j_t)),ern(uG(Lsn(this,16),29)||j_t,n),t)},uZn.ii=function(){return YYn(),j_t},uZn.ki=function(n){var t;switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),void Czn(this.Ab);case 1:return F$(this.Cb,90)&&yLn(y9(uG(this.Cb,90)),4),void qon(this,null);case 2:return void ddn(this,!0);case 3:return void mdn(this,!0);case 4:return void Pcn(this,0);case 5:return this.b=0,void Ccn(this,1);case 8:return void Kbn(this,null);case 9:return void((t=CCn(this,null,null))&&t.oj());case 10:return void Wdn(this,!0);case 11:return void Ydn(this,!1);case 12:return void Qdn(this,!1);case 13:return this.i=null,void lon(this,null);case 15:return void Jdn(this,!1);case 16:return void Cgn(this,!1);case 18:return void Sgn(this,!1)}sdn(this,n-iQ((YYn(),j_t)),ern(uG(Lsn(this,16),29)||j_t,n))},uZn.pi=function(){khn(this),BJ(Nen((gAn(),kBt),this)),bEn(this),this.Bb|=1},uZn.Jk=function(){return SNn(this)},uZn.Yk=function(n,t){return this.b=0,this.a=null,Ywn(this,n,t)},uZn.Zk=function(n){fj(this,n)},uZn.Ib=function(){var n;return 64&this.Db?MBn(this):((n=new fx(MBn(this))).a+=" (iD: ",Lj(n,!!(this.Bb&Qtt)),n.a+=")",n.a)},uZn.b=0,zW(Ytt,"EAttributeImpl",331),sDn(364,448,{110:1,94:1,93:1,142:1,155:1,197:1,58:1,114:1,54:1,99:1,364:1,158:1,119:1,120:1,691:1}),uZn.dl=function(n){return n.Dh()==this},uZn.Ah=function(n){return VTn(this,n)},uZn.Bh=function(n,t){this.w=null,this.Db=t<<16|255&this.Db,this.Cb=n},uZn.Lh=function(n,t,e){switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),this.Ab;case 1:return this.zb;case 2:return null!=this.D?this.D:this.B;case 3:return _Tn(this);case 4:return this.ik();case 5:return this.F;case 6:return t?Hrn(this):D0(this);case 7:return!this.A&&(this.A=new PD(J_t,this,7)),this.A}return $tn(this,n-iQ(this.ii()),ern(uG(Lsn(this,16),29)||this.ii(),n),t,e)},uZn.Sh=function(n,t,e){var i;switch(t){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),Nmn(this.Ab,n,e);case 6:return this.Cb&&(e=(i=this.Db>>16)>=0?VTn(this,e):this.Cb.Th(this,-1-i,null,e)),$Un(this,n,6,e)}return uG(ern(uG(Lsn(this,16),29)||this.ii(),t),69).wk().zk(this,$vn(this),t-iQ(this.ii()),n,e)},uZn.Uh=function(n,t,e){switch(t){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),Nyn(this.Ab,n,e);case 6:return $Un(this,null,6,e);case 7:return!this.A&&(this.A=new PD(J_t,this,7)),Nyn(this.A,n,e)}return uG(ern(uG(Lsn(this,16),29)||this.ii(),t),69).wk().Ak(this,$vn(this),t-iQ(this.ii()),n,e)},uZn.Wh=function(n){switch(n){case 0:return!!this.Ab&&0!=this.Ab.i;case 1:return null!=this.zb;case 2:return null!=this.D&&this.D==this.F;case 3:return!!_Tn(this);case 4:return null!=this.ik();case 5:return null!=this.F&&this.F!=this.D&&this.F!=this.B;case 6:return!!D0(this);case 7:return!!this.A&&0!=this.A.i}return l5(this,n-iQ(this.ii()),ern(uG(Lsn(this,16),29)||this.ii(),n))},uZn.bi=function(n,t){switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),Czn(this.Ab),!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),void CW(this.Ab,uG(t,16));case 1:return void d2(this,mK(t));case 2:return void pN(this,mK(t));case 5:return void TWn(this,mK(t));case 7:return!this.A&&(this.A=new PD(J_t,this,7)),Czn(this.A),!this.A&&(this.A=new PD(J_t,this,7)),void CW(this.A,uG(t,16))}lpn(this,n-iQ(this.ii()),ern(uG(Lsn(this,16),29)||this.ii(),n),t)},uZn.ii=function(){return YYn(),S_t},uZn.ki=function(n){switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),void Czn(this.Ab);case 1:return F$(this.Cb,184)&&(uG(this.Cb,184).tb=null),void qon(this,null);case 2:return sbn(this,null),void Ocn(this,this.D);case 5:return void TWn(this,null);case 7:return!this.A&&(this.A=new PD(J_t,this,7)),void Czn(this.A)}sdn(this,n-iQ(this.ii()),ern(uG(Lsn(this,16),29)||this.ii(),n))},uZn.hk=function(){var n;return-1==this.G&&(this.G=(n=Hrn(this))?Hyn(n.vi(),this):-1),this.G},uZn.ik=function(){return null},uZn.jk=function(){return Hrn(this)},uZn.el=function(){return this.v},uZn.kk=function(){return _Tn(this)},uZn.lk=function(){return null!=this.D?this.D:this.B},uZn.mk=function(){return this.F},uZn.fk=function(n){return LGn(this,n)},uZn.fl=function(n){this.v=n},uZn.gl=function(n){tun(this,n)},uZn.hl=function(n){this.C=n},uZn.ui=function(n){d2(this,n)},uZn.Ib=function(){return pmn(this)},uZn.C=null,uZn.D=null,uZn.G=-1,zW(Ytt,"EClassifierImpl",364),sDn(90,364,{110:1,94:1,93:1,29:1,142:1,155:1,197:1,58:1,114:1,54:1,99:1,90:1,364:1,158:1,482:1,119:1,120:1,691:1},Kl),uZn.dl=function(n){return VF(this,n.Dh())},uZn.Lh=function(n,t,e){switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),this.Ab;case 1:return this.zb;case 2:return null!=this.D?this.D:this.B;case 3:return _Tn(this);case 4:return null;case 5:return this.F;case 6:return t?Hrn(this):D0(this);case 7:return!this.A&&(this.A=new PD(J_t,this,7)),this.A;case 8:return qx(),!!(256&this.Bb);case 9:return qx(),!!(512&this.Bb);case 10:return n1(this);case 11:return!this.q&&(this.q=new fV(p_t,this,11,10)),this.q;case 12:return hXn(this);case 13:return Zqn(this);case 14:return Zqn(this),this.r;case 15:return hXn(this),this.k;case 16:return RAn(this);case 17:return $qn(this);case 18:return eqn(this);case 19:return mRn(this);case 20:return hXn(this),this.o;case 21:return!this.s&&(this.s=new fV(o_t,this,21,17)),this.s;case 22:return z5(this);case 23:return x_n(this)}return $tn(this,n-iQ((YYn(),E_t)),ern(uG(Lsn(this,16),29)||E_t,n),t,e)},uZn.Sh=function(n,t,e){var i;switch(t){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),Nmn(this.Ab,n,e);case 6:return this.Cb&&(e=(i=this.Db>>16)>=0?VTn(this,e):this.Cb.Th(this,-1-i,null,e)),$Un(this,n,6,e);case 11:return!this.q&&(this.q=new fV(p_t,this,11,10)),Nmn(this.q,n,e);case 21:return!this.s&&(this.s=new fV(o_t,this,21,17)),Nmn(this.s,n,e)}return uG(ern(uG(Lsn(this,16),29)||(YYn(),E_t),t),69).wk().zk(this,$vn(this),t-iQ((YYn(),E_t)),n,e)},uZn.Uh=function(n,t,e){switch(t){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),Nyn(this.Ab,n,e);case 6:return $Un(this,null,6,e);case 7:return!this.A&&(this.A=new PD(J_t,this,7)),Nyn(this.A,n,e);case 11:return!this.q&&(this.q=new fV(p_t,this,11,10)),Nyn(this.q,n,e);case 21:return!this.s&&(this.s=new fV(o_t,this,21,17)),Nyn(this.s,n,e);case 22:return Nyn(z5(this),n,e)}return uG(ern(uG(Lsn(this,16),29)||(YYn(),E_t),t),69).wk().Ak(this,$vn(this),t-iQ((YYn(),E_t)),n,e)},uZn.Wh=function(n){switch(n){case 0:return!!this.Ab&&0!=this.Ab.i;case 1:return null!=this.zb;case 2:return null!=this.D&&this.D==this.F;case 3:return!!_Tn(this);case 4:return!1;case 5:return null!=this.F&&this.F!=this.D&&this.F!=this.B;case 6:return!!D0(this);case 7:return!!this.A&&0!=this.A.i;case 8:return!!(256&this.Bb);case 9:return!!(512&this.Bb);case 10:return!(!this.u||0==z5(this.u.a).i||this.n&&yMn(this.n));case 11:return!!this.q&&0!=this.q.i;case 12:return 0!=hXn(this).i;case 13:return 0!=Zqn(this).i;case 14:return Zqn(this),0!=this.r.i;case 15:return hXn(this),0!=this.k.i;case 16:return 0!=RAn(this).i;case 17:return 0!=$qn(this).i;case 18:return 0!=eqn(this).i;case 19:return 0!=mRn(this).i;case 20:return hXn(this),!!this.o;case 21:return!!this.s&&0!=this.s.i;case 22:return!!this.n&&yMn(this.n);case 23:return 0!=x_n(this).i}return l5(this,n-iQ((YYn(),E_t)),ern(uG(Lsn(this,16),29)||E_t,n))},uZn.Zh=function(n){return(null==this.i||this.q&&0!=this.q.i?null:EKn(this,n))||VQn(this,n)},uZn.bi=function(n,t){switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),Czn(this.Ab),!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),void CW(this.Ab,uG(t,16));case 1:return void d2(this,mK(t));case 2:return void pN(this,mK(t));case 5:return void TWn(this,mK(t));case 7:return!this.A&&(this.A=new PD(J_t,this,7)),Czn(this.A),!this.A&&(this.A=new PD(J_t,this,7)),void CW(this.A,uG(t,16));case 8:return void gdn(this,oM(gK(t)));case 9:return void vdn(this,oM(gK(t)));case 10:return _zn(n1(this)),void CW(n1(this),uG(t,16));case 11:return!this.q&&(this.q=new fV(p_t,this,11,10)),Czn(this.q),!this.q&&(this.q=new fV(p_t,this,11,10)),void CW(this.q,uG(t,16));case 21:return!this.s&&(this.s=new fV(o_t,this,21,17)),Czn(this.s),!this.s&&(this.s=new fV(o_t,this,21,17)),void CW(this.s,uG(t,16));case 22:return Czn(z5(this)),void CW(z5(this),uG(t,16))}lpn(this,n-iQ((YYn(),E_t)),ern(uG(Lsn(this,16),29)||E_t,n),t)},uZn.ii=function(){return YYn(),E_t},uZn.ki=function(n){switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),void Czn(this.Ab);case 1:return F$(this.Cb,184)&&(uG(this.Cb,184).tb=null),void qon(this,null);case 2:return sbn(this,null),void Ocn(this,this.D);case 5:return void TWn(this,null);case 7:return!this.A&&(this.A=new PD(J_t,this,7)),void Czn(this.A);case 8:return void gdn(this,!1);case 9:return void vdn(this,!1);case 10:return void(this.u&&_zn(this.u));case 11:return!this.q&&(this.q=new fV(p_t,this,11,10)),void Czn(this.q);case 21:return!this.s&&(this.s=new fV(o_t,this,21,17)),void Czn(this.s);case 22:return void(this.n&&Czn(this.n))}sdn(this,n-iQ((YYn(),E_t)),ern(uG(Lsn(this,16),29)||E_t,n))},uZn.pi=function(){var n,t;if(hXn(this),Zqn(this),RAn(this),$qn(this),eqn(this),mRn(this),x_n(this),V9(iG(y9(this))),this.s)for(n=0,t=this.s.i;n=0;--t)zrn(this,t);return gmn(this,n)},uZn.Gk=function(){Czn(this)},uZn.Zi=function(n,t){return Dcn(this,n,t)},zW(art,"EcoreEList",632),sDn(505,632,Trt,FG),uZn.Li=function(){return!1},uZn.Lj=function(){return this.c},uZn.Mj=function(){return!1},uZn.ol=function(){return!0},uZn.Si=function(){return!0},uZn.Wi=function(n,t){return t},uZn.Yi=function(){return!1},uZn.c=0,zW(art,"EObjectEList",505),sDn(83,505,Trt,MD),uZn.Mj=function(){return!0},uZn.ml=function(){return!1},uZn.al=function(){return!0},zW(art,"EObjectContainmentEList",83),sDn(555,83,Trt,TD),uZn.Ni=function(){this.b=!0},uZn.Qj=function(){return this.b},uZn.Gk=function(){var n;Czn(this),uN(this.e)?(n=this.b,this.b=!1,Msn(this.e,new j9(this.e,2,this.c,n,!1))):this.b=!1},uZn.b=!1,zW(art,"EObjectContainmentEList/Unsettable",555),sDn(1161,555,Trt,hz),uZn.Ti=function(n,t){var e,i;return e=uG(zdn(this,n,t),89),uN(this.e)&&Yv(this,new wtn(this.a,7,(YYn(),P_t),xwn(t),F$(i=e.c,90)?uG(i,29):x_t,n)),e},uZn.Uj=function(n,t){return Dmn(this,uG(n,89),t)},uZn.Vj=function(n,t){return $mn(this,uG(n,89),t)},uZn.Wj=function(n,t,e){return TSn(this,uG(n,89),uG(t,89),e)},uZn.Ij=function(n,t,e,i,r){switch(n){case 3:return i2(this,n,t,e,i,this.i>1);case 5:return i2(this,n,t,e,i,this.i-uG(e,15).gc()>0);default:return new Ken(this.e,n,this.c,t,e,i,!0)}},uZn.Tj=function(){return!0},uZn.Qj=function(){return yMn(this)},uZn.Gk=function(){Czn(this)},zW(Ytt,"EClassImpl/1",1161),sDn(1175,1174,Fit),uZn.dj=function(n){var t,e,i,r,c,a,o;if(8!=(e=n.gj())){if(0==(i=xkn(n)))switch(e){case 1:case 9:null!=(o=n.kj())&&(!(t=y9(uG(o,482))).c&&(t.c=new Ks),rin(t.c,n.jj())),null!=(a=n.ij())&&(1&(r=uG(a,482)).Bb||(!(t=y9(r)).c&&(t.c=new Ks),ttn(t.c,uG(n.jj(),29))));break;case 3:null!=(a=n.ij())&&(1&(r=uG(a,482)).Bb||(!(t=y9(r)).c&&(t.c=new Ks),ttn(t.c,uG(n.jj(),29))));break;case 5:if(null!=(a=n.ij()))for(c=uG(a,16).Kc();c.Ob();)1&(r=uG(c.Pb(),482)).Bb||(!(t=y9(r)).c&&(t.c=new Ks),ttn(t.c,uG(n.jj(),29)));break;case 4:null!=(o=n.kj())&&(1&(r=uG(o,482)).Bb||(!(t=y9(r)).c&&(t.c=new Ks),rin(t.c,n.jj())));break;case 6:if(null!=(o=n.kj()))for(c=uG(o,16).Kc();c.Ob();)1&(r=uG(c.Pb(),482)).Bb||(!(t=y9(r)).c&&(t.c=new Ks),rin(t.c,n.jj()))}this.ql(i)}},uZn.ql=function(n){bBn(this,n)},uZn.b=63,zW(Ytt,"ESuperAdapter",1175),sDn(1176,1175,Fit,$m),uZn.ql=function(n){yLn(this,n)},zW(Ytt,"EClassImpl/10",1176),sDn(1165,710,Trt),uZn.Ei=function(n,t){return PCn(this,n,t)},uZn.Fi=function(n){return QMn(this,n)},uZn.Gi=function(n,t){edn(this,n,t)},uZn.Hi=function(n){z9(this,n)},uZn.$i=function(n){return Otn(this,n)},uZn.Xi=function(n,t){return iin(this,n,t)},uZn.Wk=function(n,t){throw hv(new Kv)},uZn.Ii=function(){return new nR(this)},uZn.Ji=function(){return new tR(this)},uZn.Ki=function(n){return han(this,n)},uZn.Xk=function(n,t){throw hv(new Kv)},uZn.Fk=function(n){return this},uZn.Qj=function(){return 0!=this.i},uZn.Wb=function(n){throw hv(new Kv)},uZn.Gk=function(){throw hv(new Kv)},zW(art,"EcoreEList/UnmodifiableEList",1165),sDn(328,1165,Trt,vL),uZn.Yi=function(){return!1},zW(art,"EcoreEList/UnmodifiableEList/FastCompare",328),sDn(1168,328,Trt,Afn),uZn.dd=function(n){var t,e;if(F$(n,179)&&-1!=(t=uG(n,179).Lj()))for(e=this.i;t4){if(!this.fk(n))return!1;if(this.al()){if(a=(t=(e=uG(n,54)).Eh())==this.b&&(this.ml()?e.yh(e.Fh(),uG(ern(e1(this.b),this.Lj()).Hk(),29).kk())==lMn(uG(ern(e1(this.b),this.Lj()),19)).n:-1-e.Fh()==this.Lj()),this.nl()&&!a&&!t&&e.Jh())for(i=0;i1||-1==e)},uZn.ml=function(){var n;return!!F$(n=ern(e1(this.b),this.Lj()),102)&&!!lMn(uG(n,19))},uZn.nl=function(){var n;return!!F$(n=ern(e1(this.b),this.Lj()),102)&&!!(uG(n,19).Bb&P0n)},uZn.dd=function(n){var t,e,i;if((e=this.zj(n))>=0)return e;if(this.ol())for(t=0,i=this.Ej();t=0;--n)yVn(this,n,this.xj(n));return this.Fj()},uZn.Qc=function(n){var t;if(this.nl())for(t=this.Ej()-1;t>=0;--t)yVn(this,t,this.xj(t));return this.Gj(n)},uZn.Gk=function(){_zn(this)},uZn.Zi=function(n,t){return Atn(this,n,t)},zW(art,"DelegatingEcoreEList",756),sDn(1171,756,Crt,aF),uZn.qj=function(n,t){zR(this,n,uG(t,29))},uZn.rj=function(n){BN(this,uG(n,29))},uZn.xj=function(n){var t;return F$(t=uG(zrn(z5(this.a),n),89).c,90)?uG(t,29):(YYn(),x_t)},uZn.Cj=function(n){var t;return F$(t=uG(e_n(z5(this.a),n),89).c,90)?uG(t,29):(YYn(),x_t)},uZn.Dj=function(n,t){return YMn(this,n,uG(t,29))},uZn.Li=function(){return!1},uZn.Ij=function(n,t,e,i,r){return null},uZn.sj=function(){return new Rm(this)},uZn.tj=function(){Czn(z5(this.a))},uZn.uj=function(n){return Mdn(this,n)},uZn.vj=function(n){var t;for(t=n.Kc();t.Ob();)if(!Mdn(this,t.Pb()))return!1;return!0},uZn.wj=function(n){var t,e,i;if(F$(n,15)&&(i=uG(n,15)).gc()==z5(this.a).i){for(t=i.Kc(),e=new DD(this);t.Ob();)if(xA(t.Pb())!==xA(Zkn(e)))return!1;return!0}return!1},uZn.yj=function(){var n,t,e,i;for(t=1,n=new DD(z5(this.a));n.e!=n.i.gc();)t=31*t+((e=F$(i=uG(Zkn(n),89).c,90)?uG(i,29):(YYn(),x_t))?xx(e):0);return t},uZn.zj=function(n){var t,e,i,r;for(i=0,e=new DD(z5(this.a));e.e!=e.i.gc();){if(t=uG(Zkn(e),89),xA(n)===xA(F$(r=t.c,90)?uG(r,29):(YYn(),x_t)))return i;++i}return-1},uZn.Aj=function(){return 0==z5(this.a).i},uZn.Bj=function(){return null},uZn.Ej=function(){return z5(this.a).i},uZn.Fj=function(){var n,t,e,i,r,c;for(c=z5(this.a).i,r=Inn(dat,EZn,1,c,5,1),e=0,t=new DD(z5(this.a));t.e!=t.i.gc();)n=uG(Zkn(t),89),r[e++]=F$(i=n.c,90)?uG(i,29):(YYn(),x_t);return r},uZn.Gj=function(n){var t,e,i,r;for(r=z5(this.a).i,n.lengthr&&uQ(n,r,null),e=0,t=new DD(z5(this.a));t.e!=t.i.gc();)uQ(n,e++,F$(i=uG(Zkn(t),89).c,90)?uG(i,29):(YYn(),x_t));return n},uZn.Hj=function(){var n,t,e,i,r;for((r=new zM).a+="[",n=z5(this.a),t=0,i=z5(this.a).i;t>16)>=0?VTn(this,e):this.Cb.Th(this,-1-i,null,e)),$Un(this,n,6,e);case 9:return!this.a&&(this.a=new fV(d_t,this,9,5)),Nmn(this.a,n,e)}return uG(ern(uG(Lsn(this,16),29)||(YYn(),I_t),t),69).wk().zk(this,$vn(this),t-iQ((YYn(),I_t)),n,e)},uZn.Uh=function(n,t,e){switch(t){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),Nyn(this.Ab,n,e);case 6:return $Un(this,null,6,e);case 7:return!this.A&&(this.A=new PD(J_t,this,7)),Nyn(this.A,n,e);case 9:return!this.a&&(this.a=new fV(d_t,this,9,5)),Nyn(this.a,n,e)}return uG(ern(uG(Lsn(this,16),29)||(YYn(),I_t),t),69).wk().Ak(this,$vn(this),t-iQ((YYn(),I_t)),n,e)},uZn.Wh=function(n){switch(n){case 0:return!!this.Ab&&0!=this.Ab.i;case 1:return null!=this.zb;case 2:return null!=this.D&&this.D==this.F;case 3:return!!_Tn(this);case 4:return!!dbn(this);case 5:return null!=this.F&&this.F!=this.D&&this.F!=this.B;case 6:return!!D0(this);case 7:return!!this.A&&0!=this.A.i;case 8:return!(256&this.Bb);case 9:return!!this.a&&0!=this.a.i}return l5(this,n-iQ((YYn(),I_t)),ern(uG(Lsn(this,16),29)||I_t,n))},uZn.bi=function(n,t){switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),Czn(this.Ab),!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),void CW(this.Ab,uG(t,16));case 1:return void d2(this,mK(t));case 2:return void pN(this,mK(t));case 5:return void TWn(this,mK(t));case 7:return!this.A&&(this.A=new PD(J_t,this,7)),Czn(this.A),!this.A&&(this.A=new PD(J_t,this,7)),void CW(this.A,uG(t,16));case 8:return void pdn(this,oM(gK(t)));case 9:return!this.a&&(this.a=new fV(d_t,this,9,5)),Czn(this.a),!this.a&&(this.a=new fV(d_t,this,9,5)),void CW(this.a,uG(t,16))}lpn(this,n-iQ((YYn(),I_t)),ern(uG(Lsn(this,16),29)||I_t,n),t)},uZn.ii=function(){return YYn(),I_t},uZn.ki=function(n){switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),void Czn(this.Ab);case 1:return F$(this.Cb,184)&&(uG(this.Cb,184).tb=null),void qon(this,null);case 2:return sbn(this,null),void Ocn(this,this.D);case 5:return void TWn(this,null);case 7:return!this.A&&(this.A=new PD(J_t,this,7)),void Czn(this.A);case 8:return void pdn(this,!0);case 9:return!this.a&&(this.a=new fV(d_t,this,9,5)),void Czn(this.a)}sdn(this,n-iQ((YYn(),I_t)),ern(uG(Lsn(this,16),29)||I_t,n))},uZn.pi=function(){var n,t;if(this.a)for(n=0,t=this.a.i;n>16==5?uG(this.Cb,685):null}return $tn(this,n-iQ((YYn(),O_t)),ern(uG(Lsn(this,16),29)||O_t,n),t,e)},uZn.Sh=function(n,t,e){var i;switch(t){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),Nmn(this.Ab,n,e);case 5:return this.Cb&&(e=(i=this.Db>>16)>=0?Qjn(this,e):this.Cb.Th(this,-1-i,null,e)),$Un(this,n,5,e)}return uG(ern(uG(Lsn(this,16),29)||(YYn(),O_t),t),69).wk().zk(this,$vn(this),t-iQ((YYn(),O_t)),n,e)},uZn.Uh=function(n,t,e){switch(t){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),Nyn(this.Ab,n,e);case 5:return $Un(this,null,5,e)}return uG(ern(uG(Lsn(this,16),29)||(YYn(),O_t),t),69).wk().Ak(this,$vn(this),t-iQ((YYn(),O_t)),n,e)},uZn.Wh=function(n){switch(n){case 0:return!!this.Ab&&0!=this.Ab.i;case 1:return null!=this.zb;case 2:return 0!=this.d;case 3:return!!this.b;case 4:return null!=this.c;case 5:return!(this.Db>>16!=5||!uG(this.Cb,685))}return l5(this,n-iQ((YYn(),O_t)),ern(uG(Lsn(this,16),29)||O_t,n))},uZn.bi=function(n,t){switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),Czn(this.Ab),!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),void CW(this.Ab,uG(t,16));case 1:return void qon(this,mK(t));case 2:return void Icn(this,uG(t,17).a);case 3:return void h$n(this,uG(t,2039));case 4:return void Uan(this,mK(t))}lpn(this,n-iQ((YYn(),O_t)),ern(uG(Lsn(this,16),29)||O_t,n),t)},uZn.ii=function(){return YYn(),O_t},uZn.ki=function(n){switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),void Czn(this.Ab);case 1:return void qon(this,null);case 2:return void Icn(this,0);case 3:return void h$n(this,null);case 4:return void Uan(this,null)}sdn(this,n-iQ((YYn(),O_t)),ern(uG(Lsn(this,16),29)||O_t,n))},uZn.Ib=function(){var n;return null==(n=this.c)?this.zb:n},uZn.b=null,uZn.c=null,uZn.d=0,zW(Ytt,"EEnumLiteralImpl",582);var nBt,tBt,eBt,iBt=Iq(Ytt,"EFactoryImpl/InternalEDateTimeFormat");sDn(499,1,{2114:1},Km),zW(Ytt,"EFactoryImpl/1ClientInternalEDateTimeFormat",499),sDn(248,120,{110:1,94:1,93:1,89:1,58:1,114:1,54:1,99:1,248:1,119:1,120:1},ev),uZn.Ch=function(n,t,e){var i;return e=$Un(this,n,t,e),this.e&&F$(n,179)&&(i=bRn(this,this.e))!=this.c&&(e=PWn(this,i,e)),e},uZn.Lh=function(n,t,e){switch(n){case 0:return this.f;case 1:return!this.d&&(this.d=new MD(g_t,this,1)),this.d;case 2:return t?MGn(this):this.c;case 3:return this.b;case 4:return this.e;case 5:return t?PMn(this):this.a}return $tn(this,n-iQ((YYn(),L_t)),ern(uG(Lsn(this,16),29)||L_t,n),t,e)},uZn.Uh=function(n,t,e){switch(t){case 0:return vwn(this,null,e);case 1:return!this.d&&(this.d=new MD(g_t,this,1)),Nyn(this.d,n,e);case 3:return kwn(this,null,e)}return uG(ern(uG(Lsn(this,16),29)||(YYn(),L_t),t),69).wk().Ak(this,$vn(this),t-iQ((YYn(),L_t)),n,e)},uZn.Wh=function(n){switch(n){case 0:return!!this.f;case 1:return!!this.d&&0!=this.d.i;case 2:return!!this.c;case 3:return!!this.b;case 4:return!!this.e;case 5:return!!this.a}return l5(this,n-iQ((YYn(),L_t)),ern(uG(Lsn(this,16),29)||L_t,n))},uZn.bi=function(n,t){switch(n){case 0:return void cPn(this,uG(t,89));case 1:return!this.d&&(this.d=new MD(g_t,this,1)),Czn(this.d),!this.d&&(this.d=new MD(g_t,this,1)),void CW(this.d,uG(t,16));case 3:return void rPn(this,uG(t,89));case 4:return void MIn(this,uG(t,850));case 5:return void Urn(this,uG(t,142))}lpn(this,n-iQ((YYn(),L_t)),ern(uG(Lsn(this,16),29)||L_t,n),t)},uZn.ii=function(){return YYn(),L_t},uZn.ki=function(n){switch(n){case 0:return void cPn(this,null);case 1:return!this.d&&(this.d=new MD(g_t,this,1)),void Czn(this.d);case 3:return void rPn(this,null);case 4:return void MIn(this,null);case 5:return void Urn(this,null)}sdn(this,n-iQ((YYn(),L_t)),ern(uG(Lsn(this,16),29)||L_t,n))},uZn.Ib=function(){var n;return(n=new lx(vxn(this))).a+=" (expression: ",qXn(this,n),n.a+=")",n.a},zW(Ytt,"EGenericTypeImpl",248),sDn(2067,2062,Irt),uZn.Gi=function(n,t){YK(this,n,t)},uZn.Wk=function(n,t){return YK(this,this.gc(),n),t},uZn.$i=function(n){return hyn(this.pj(),n)},uZn.Ii=function(){return this.Ji()},uZn.pj=function(){return new zm(this)},uZn.Ji=function(){return this.Ki(0)},uZn.Ki=function(n){return this.pj().fd(n)},uZn.Xk=function(n,t){return Wpn(this,n,!0),t},uZn.Ti=function(n,t){var e;return e=Kjn(this,t),this.fd(n).Rb(e),e},uZn.Ui=function(n,t){Wpn(this,t,!0),this.fd(n).Rb(t)},zW(art,"AbstractSequentialInternalEList",2067),sDn(496,2067,Irt,zx),uZn.$i=function(n){return hyn(this.pj(),n)},uZn.Ii=function(){return null==this.b?(EP(),EP(),eBt):this.sl()},uZn.pj=function(){return new kL(this.a,this.b)},uZn.Ji=function(){return null==this.b?(EP(),EP(),eBt):this.sl()},uZn.Ki=function(n){var t,e;if(null==this.b){if(n<0||n>1)throw hv(new dM(Hit+n+", size=0"));return EP(),EP(),eBt}for(e=this.sl(),t=0;t0;)if(t=this.c[--this.d],(!this.e||t.pk()!=tFt||0!=t.Lj())&&(!this.vl()||this.b.Xh(t)))if(c=this.b.Nh(t,this.ul()),this.f=(PP(),uG(t,69).xk()),this.f||t.Jk()){if(this.ul()?(i=uG(c,15),this.k=i):(i=uG(c,71),this.k=this.j=i),F$(this.k,59)?(this.o=this.k.gc(),this.n=this.o):this.p=this.j?this.j.Ki(this.k.gc()):this.k.fd(this.k.gc()),this.p?dAn(this,this.p):hLn(this))return r=this.p?this.p.Ub():this.j?this.j.$i(--this.n):this.k.Xb(--this.n),this.f?((n=uG(r,76)).Lk(),e=n.md(),this.i=e):(e=r,this.i=e),this.g=-3,!0}else if(null!=c)return this.k=null,this.p=null,e=c,this.i=e,this.g=-2,!0;return this.k=null,this.p=null,this.g=-1,!1}},uZn.Pb=function(){return Ksn(this)},uZn.Tb=function(){return this.a},uZn.Ub=function(){var n;if(this.g<-1||this.Sb())return--this.a,this.g=0,n=this.i,this.Sb(),n;throw hv(new Bv)},uZn.Vb=function(){return this.a-1},uZn.Qb=function(){throw hv(new Kv)},uZn.ul=function(){return!1},uZn.Wb=function(n){throw hv(new Kv)},uZn.vl=function(){return!0},uZn.a=0,uZn.d=0,uZn.f=!1,uZn.g=0,uZn.n=0,uZn.o=0,zW(art,"EContentsEList/FeatureIteratorImpl",287),sDn(711,287,Ort,WR),uZn.ul=function(){return!0},zW(art,"EContentsEList/ResolvingFeatureIteratorImpl",711),sDn(1178,711,Ort,QR),uZn.vl=function(){return!1},zW(Ytt,"ENamedElementImpl/1/1",1178),sDn(1179,287,Ort,JR),uZn.vl=function(){return!1},zW(Ytt,"ENamedElementImpl/1/2",1179),sDn(39,152,Bit,t8,e8,lV,btn,Ken,j9,Bcn,o4,Hcn,u4,E9,s4,qcn,h4,S9,f4,Ucn,l4,bV,wtn,kZ,Gcn,b4,P9,w4),uZn.Kj=function(){return ntn(this)},uZn.Rj=function(){var n;return(n=ntn(this))?n.ik():null},uZn.hj=function(n){return-1==this.b&&this.a&&(this.b=this.c.Hh(this.a.Lj(),this.a.pk())),this.c.yh(this.b,n)},uZn.jj=function(){return this.c},uZn.Sj=function(){var n;return!!(n=ntn(this))&&n.tk()},uZn.b=-1,zW(Ytt,"ENotificationImpl",39),sDn(411,292,{110:1,94:1,93:1,155:1,197:1,58:1,62:1,114:1,481:1,54:1,99:1,158:1,411:1,292:1,119:1,120:1},Yk),uZn.Ah=function(n){return fEn(this,n)},uZn.Lh=function(n,t,e){var i;switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),this.Ab;case 1:return this.zb;case 2:return qx(),!!(256&this.Bb);case 3:return qx(),!!(512&this.Bb);case 4:return xwn(this.s);case 5:return xwn(this.t);case 6:return qx(),(i=this.t)>1||-1==i;case 7:return qx(),this.s>=1;case 8:return t?bEn(this):this.r;case 9:return this.q;case 10:return this.Db>>16==10?uG(this.Cb,29):null;case 11:return!this.d&&(this.d=new PD(J_t,this,11)),this.d;case 12:return!this.c&&(this.c=new fV(m_t,this,12,10)),this.c;case 13:return!this.a&&(this.a=new oF(this,this)),this.a;case 14:return Aen(this)}return $tn(this,n-iQ((YYn(),R_t)),ern(uG(Lsn(this,16),29)||R_t,n),t,e)},uZn.Sh=function(n,t,e){var i;switch(t){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),Nmn(this.Ab,n,e);case 10:return this.Cb&&(e=(i=this.Db>>16)>=0?fEn(this,e):this.Cb.Th(this,-1-i,null,e)),$Un(this,n,10,e);case 12:return!this.c&&(this.c=new fV(m_t,this,12,10)),Nmn(this.c,n,e)}return uG(ern(uG(Lsn(this,16),29)||(YYn(),R_t),t),69).wk().zk(this,$vn(this),t-iQ((YYn(),R_t)),n,e)},uZn.Uh=function(n,t,e){switch(t){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),Nyn(this.Ab,n,e);case 9:return IW(this,e);case 10:return $Un(this,null,10,e);case 11:return!this.d&&(this.d=new PD(J_t,this,11)),Nyn(this.d,n,e);case 12:return!this.c&&(this.c=new fV(m_t,this,12,10)),Nyn(this.c,n,e);case 14:return Nyn(Aen(this),n,e)}return uG(ern(uG(Lsn(this,16),29)||(YYn(),R_t),t),69).wk().Ak(this,$vn(this),t-iQ((YYn(),R_t)),n,e)},uZn.Wh=function(n){var t;switch(n){case 0:return!!this.Ab&&0!=this.Ab.i;case 1:return null!=this.zb;case 2:return!(256&this.Bb);case 3:return!(512&this.Bb);case 4:return 0!=this.s;case 5:return 1!=this.t;case 6:return(t=this.t)>1||-1==t;case 7:return this.s>=1;case 8:return!!this.r&&!this.q.e&&0==yQ(this.q).i;case 9:return!(!this.q||this.r&&!this.q.e&&0==yQ(this.q).i);case 10:return!(this.Db>>16!=10||!uG(this.Cb,29));case 11:return!!this.d&&0!=this.d.i;case 12:return!!this.c&&0!=this.c.i;case 13:return!(!this.a||0==Aen(this.a.a).i||this.b&&MMn(this.b));case 14:return!!this.b&&MMn(this.b)}return l5(this,n-iQ((YYn(),R_t)),ern(uG(Lsn(this,16),29)||R_t,n))},uZn.bi=function(n,t){var e;switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),Czn(this.Ab),!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),void CW(this.Ab,uG(t,16));case 1:return void qon(this,mK(t));case 2:return void ddn(this,oM(gK(t)));case 3:return void mdn(this,oM(gK(t)));case 4:return void Pcn(this,uG(t,17).a);case 5:return void Ccn(this,uG(t,17).a);case 8:return void Kbn(this,uG(t,142));case 9:return void((e=CCn(this,uG(t,89),null))&&e.oj());case 11:return!this.d&&(this.d=new PD(J_t,this,11)),Czn(this.d),!this.d&&(this.d=new PD(J_t,this,11)),void CW(this.d,uG(t,16));case 12:return!this.c&&(this.c=new fV(m_t,this,12,10)),Czn(this.c),!this.c&&(this.c=new fV(m_t,this,12,10)),void CW(this.c,uG(t,16));case 13:return!this.a&&(this.a=new oF(this,this)),_zn(this.a),!this.a&&(this.a=new oF(this,this)),void CW(this.a,uG(t,16));case 14:return Czn(Aen(this)),void CW(Aen(this),uG(t,16))}lpn(this,n-iQ((YYn(),R_t)),ern(uG(Lsn(this,16),29)||R_t,n),t)},uZn.ii=function(){return YYn(),R_t},uZn.ki=function(n){var t;switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),void Czn(this.Ab);case 1:return void qon(this,null);case 2:return void ddn(this,!0);case 3:return void mdn(this,!0);case 4:return void Pcn(this,0);case 5:return void Ccn(this,1);case 8:return void Kbn(this,null);case 9:return void((t=CCn(this,null,null))&&t.oj());case 11:return!this.d&&(this.d=new PD(J_t,this,11)),void Czn(this.d);case 12:return!this.c&&(this.c=new fV(m_t,this,12,10)),void Czn(this.c);case 13:return void(this.a&&_zn(this.a));case 14:return void(this.b&&Czn(this.b))}sdn(this,n-iQ((YYn(),R_t)),ern(uG(Lsn(this,16),29)||R_t,n))},uZn.pi=function(){var n,t;if(this.c)for(n=0,t=this.c.i;ni&&uQ(n,i,null),e=0,t=new DD(Aen(this.a));t.e!=t.i.gc();)uQ(n,e++,uG(Zkn(t),89).c||(YYn(),N_t));return n},uZn.Hj=function(){var n,t,e,i;for((i=new zM).a+="[",n=Aen(this.a),t=0,e=Aen(this.a).i;t1);case 5:return i2(this,n,t,e,i,this.i-uG(e,15).gc()>0);default:return new Ken(this.e,n,this.c,t,e,i,!0)}},uZn.Tj=function(){return!0},uZn.Qj=function(){return MMn(this)},uZn.Gk=function(){Czn(this)},zW(Ytt,"EOperationImpl/2",1377),sDn(507,1,{2037:1,507:1},EA),zW(Ytt,"EPackageImpl/1",507),sDn(14,83,Trt,fV),uZn.il=function(){return this.d},uZn.jl=function(){return this.b},uZn.ml=function(){return!0},uZn.b=0,zW(art,"EObjectContainmentWithInverseEList",14),sDn(365,14,Trt,i_),uZn.nl=function(){return!0},uZn.Wi=function(n,t){return R$n(this,n,uG(t,58))},zW(art,"EObjectContainmentWithInverseEList/Resolving",365),sDn(308,365,Trt,vV),uZn.Ni=function(){this.a.tb=null},zW(Ytt,"EPackageImpl/2",308),sDn(1278,1,{},Ps),zW(Ytt,"EPackageImpl/3",1278),sDn(733,45,B0n,Zk),uZn._b=function(n){return RA(n)?AZ(this,n):!!FX(this.f,n)},zW(Ytt,"EPackageRegistryImpl",733),sDn(518,292,{110:1,94:1,93:1,155:1,197:1,58:1,2116:1,114:1,481:1,54:1,99:1,158:1,518:1,292:1,119:1,120:1},ny),uZn.Ah=function(n){return lEn(this,n)},uZn.Lh=function(n,t,e){var i;switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),this.Ab;case 1:return this.zb;case 2:return qx(),!!(256&this.Bb);case 3:return qx(),!!(512&this.Bb);case 4:return xwn(this.s);case 5:return xwn(this.t);case 6:return qx(),(i=this.t)>1||-1==i;case 7:return qx(),this.s>=1;case 8:return t?bEn(this):this.r;case 9:return this.q;case 10:return this.Db>>16==10?uG(this.Cb,62):null}return $tn(this,n-iQ((YYn(),__t)),ern(uG(Lsn(this,16),29)||__t,n),t,e)},uZn.Sh=function(n,t,e){var i;switch(t){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),Nmn(this.Ab,n,e);case 10:return this.Cb&&(e=(i=this.Db>>16)>=0?lEn(this,e):this.Cb.Th(this,-1-i,null,e)),$Un(this,n,10,e)}return uG(ern(uG(Lsn(this,16),29)||(YYn(),__t),t),69).wk().zk(this,$vn(this),t-iQ((YYn(),__t)),n,e)},uZn.Uh=function(n,t,e){switch(t){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),Nyn(this.Ab,n,e);case 9:return IW(this,e);case 10:return $Un(this,null,10,e)}return uG(ern(uG(Lsn(this,16),29)||(YYn(),__t),t),69).wk().Ak(this,$vn(this),t-iQ((YYn(),__t)),n,e)},uZn.Wh=function(n){var t;switch(n){case 0:return!!this.Ab&&0!=this.Ab.i;case 1:return null!=this.zb;case 2:return!(256&this.Bb);case 3:return!(512&this.Bb);case 4:return 0!=this.s;case 5:return 1!=this.t;case 6:return(t=this.t)>1||-1==t;case 7:return this.s>=1;case 8:return!!this.r&&!this.q.e&&0==yQ(this.q).i;case 9:return!(!this.q||this.r&&!this.q.e&&0==yQ(this.q).i);case 10:return!(this.Db>>16!=10||!uG(this.Cb,62))}return l5(this,n-iQ((YYn(),__t)),ern(uG(Lsn(this,16),29)||__t,n))},uZn.ii=function(){return YYn(),__t},zW(Ytt,"EParameterImpl",518),sDn(102,462,{110:1,94:1,93:1,155:1,197:1,58:1,19:1,179:1,69:1,114:1,481:1,54:1,99:1,158:1,102:1,462:1,292:1,119:1,120:1,692:1},PK),uZn.Lh=function(n,t,e){var i,r;switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),this.Ab;case 1:return this.zb;case 2:return qx(),!!(256&this.Bb);case 3:return qx(),!!(512&this.Bb);case 4:return xwn(this.s);case 5:return xwn(this.t);case 6:return qx(),(r=this.t)>1||-1==r;case 7:return qx(),this.s>=1;case 8:return t?bEn(this):this.r;case 9:return this.q;case 10:return qx(),!!(this.Bb&w1n);case 11:return qx(),!!(this.Bb&frt);case 12:return qx(),!!(this.Bb&j0n);case 13:return this.j;case 14:return NRn(this);case 15:return qx(),!!(this.Bb&hrt);case 16:return qx(),!!(this.Bb&VZn);case 17:return K0(this);case 18:return qx(),!!(this.Bb&Qtt);case 19:return qx(),!!((i=lMn(this))&&i.Bb&Qtt);case 20:return qx(),!!(this.Bb&P0n);case 21:return t?lMn(this):this.b;case 22:return t?Ffn(this):R9(this);case 23:return!this.a&&(this.a=new OD(u_t,this,23)),this.a}return $tn(this,n-iQ((YYn(),B_t)),ern(uG(Lsn(this,16),29)||B_t,n),t,e)},uZn.Wh=function(n){var t,e;switch(n){case 0:return!!this.Ab&&0!=this.Ab.i;case 1:return null!=this.zb;case 2:return!(256&this.Bb);case 3:return!(512&this.Bb);case 4:return 0!=this.s;case 5:return 1!=this.t;case 6:return(e=this.t)>1||-1==e;case 7:return this.s>=1;case 8:return!!this.r&&!this.q.e&&0==yQ(this.q).i;case 9:return!(!this.q||this.r&&!this.q.e&&0==yQ(this.q).i);case 10:return!(this.Bb&w1n);case 11:return!!(this.Bb&frt);case 12:return!!(this.Bb&j0n);case 13:return null!=this.j;case 14:return null!=NRn(this);case 15:return!!(this.Bb&hrt);case 16:return!!(this.Bb&VZn);case 17:return!!K0(this);case 18:return!!(this.Bb&Qtt);case 19:return!!(t=lMn(this))&&!!(t.Bb&Qtt);case 20:return!(this.Bb&P0n);case 21:return!!this.b;case 22:return!!R9(this);case 23:return!!this.a&&0!=this.a.i}return l5(this,n-iQ((YYn(),B_t)),ern(uG(Lsn(this,16),29)||B_t,n))},uZn.bi=function(n,t){var e;switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),Czn(this.Ab),!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),void CW(this.Ab,uG(t,16));case 1:return void g2(this,mK(t));case 2:return void ddn(this,oM(gK(t)));case 3:return void mdn(this,oM(gK(t)));case 4:return void Pcn(this,uG(t,17).a);case 5:return void Ccn(this,uG(t,17).a);case 8:return void Kbn(this,uG(t,142));case 9:return void((e=CCn(this,uG(t,89),null))&&e.oj());case 10:return void Wdn(this,oM(gK(t)));case 11:return void Ydn(this,oM(gK(t)));case 12:return void Qdn(this,oM(gK(t)));case 13:return void mA(this,mK(t));case 15:return void Jdn(this,oM(gK(t)));case 16:return void Cgn(this,oM(gK(t)));case 18:return void p2(this,oM(gK(t)));case 20:return void Ign(this,oM(gK(t)));case 21:return void bon(this,uG(t,19));case 23:return!this.a&&(this.a=new OD(u_t,this,23)),Czn(this.a),!this.a&&(this.a=new OD(u_t,this,23)),void CW(this.a,uG(t,16))}lpn(this,n-iQ((YYn(),B_t)),ern(uG(Lsn(this,16),29)||B_t,n),t)},uZn.ii=function(){return YYn(),B_t},uZn.ki=function(n){var t;switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),void Czn(this.Ab);case 1:return F$(this.Cb,90)&&yLn(y9(uG(this.Cb,90)),4),void qon(this,null);case 2:return void ddn(this,!0);case 3:return void mdn(this,!0);case 4:return void Pcn(this,0);case 5:return void Ccn(this,1);case 8:return void Kbn(this,null);case 9:return void((t=CCn(this,null,null))&&t.oj());case 10:return void Wdn(this,!0);case 11:return void Ydn(this,!1);case 12:return void Qdn(this,!1);case 13:return this.i=null,void lon(this,null);case 15:return void Jdn(this,!1);case 16:return void Cgn(this,!1);case 18:return Pgn(this,!1),void(F$(this.Cb,90)&&yLn(y9(uG(this.Cb,90)),2));case 20:return void Ign(this,!0);case 21:return void bon(this,null);case 23:return!this.a&&(this.a=new OD(u_t,this,23)),void Czn(this.a)}sdn(this,n-iQ((YYn(),B_t)),ern(uG(Lsn(this,16),29)||B_t,n))},uZn.pi=function(){Ffn(this),BJ(Nen((gAn(),kBt),this)),bEn(this),this.Bb|=1},uZn.uk=function(){return lMn(this)},uZn._k=function(){var n;return!!(n=lMn(this))&&!!(n.Bb&Qtt)},uZn.al=function(){return!!(this.Bb&Qtt)},uZn.bl=function(){return!!(this.Bb&P0n)},uZn.Yk=function(n,t){return this.c=null,Ywn(this,n,t)},uZn.Ib=function(){var n;return 64&this.Db?MBn(this):((n=new fx(MBn(this))).a+=" (containment: ",Lj(n,!!(this.Bb&Qtt)),n.a+=", resolveProxies: ",Lj(n,!!(this.Bb&P0n)),n.a+=")",n.a)},zW(Ytt,"EReferenceImpl",102),sDn(561,120,{110:1,44:1,94:1,93:1,136:1,58:1,114:1,54:1,99:1,561:1,119:1,120:1},Cs),uZn.Fb=function(n){return this===n},uZn.ld=function(){return this.b},uZn.md=function(){return this.c},uZn.Hb=function(){return xx(this)},uZn.Di=function(n){Rq(this,mK(n))},uZn.nd=function(n){return DG(this,mK(n))},uZn.Lh=function(n,t,e){switch(n){case 0:return this.b;case 1:return this.c}return $tn(this,n-iQ((YYn(),H_t)),ern(uG(Lsn(this,16),29)||H_t,n),t,e)},uZn.Wh=function(n){switch(n){case 0:return null!=this.b;case 1:return null!=this.c}return l5(this,n-iQ((YYn(),H_t)),ern(uG(Lsn(this,16),29)||H_t,n))},uZn.bi=function(n,t){switch(n){case 0:return void Kq(this,mK(t));case 1:return void Jan(this,mK(t))}lpn(this,n-iQ((YYn(),H_t)),ern(uG(Lsn(this,16),29)||H_t,n),t)},uZn.ii=function(){return YYn(),H_t},uZn.ki=function(n){switch(n){case 0:return void Qan(this,null);case 1:return void Jan(this,null)}sdn(this,n-iQ((YYn(),H_t)),ern(uG(Lsn(this,16),29)||H_t,n))},uZn.Bi=function(){var n;return-1==this.a&&(n=this.b,this.a=null==n?0:pln(n)),this.a},uZn.Ci=function(n){this.a=n},uZn.Ib=function(){var n;return 64&this.Db?vxn(this):((n=new fx(vxn(this))).a+=" (key: ",VA(n,this.b),n.a+=", value: ",VA(n,this.c),n.a+=")",n.a)},uZn.a=-1,uZn.b=null,uZn.c=null;var rBt,cBt,aBt,oBt,uBt,sBt,hBt,fBt,lBt,bBt,wBt=zW(Ytt,"EStringToStringMapEntryImpl",561),dBt=Iq(art,"FeatureMap/Entry/Internal");sDn(576,1,Art),uZn.xl=function(n){return this.yl(uG(n,54))},uZn.yl=function(n){return this.xl(n)},uZn.Fb=function(n){var t,e;return this===n||!!F$(n,76)&&(t=uG(n,76)).Lk()==this.c&&(null==(e=this.md())?null==t.md():udn(e,t.md()))},uZn.Lk=function(){return this.c},uZn.Hb=function(){var n;return n=this.md(),Hon(this.c)^(null==n?0:Hon(n))},uZn.Ib=function(){var n,t;return t=Hrn((n=this.c).qk()).yi(),n.xe(),(null!=t&&0!=t.length?t+":"+n.xe():n.xe())+"="+this.md()},zW(Ytt,"EStructuralFeatureImpl/BasicFeatureMapEntry",576),sDn(791,576,Art,sF),uZn.yl=function(n){return new sF(this.c,n)},uZn.md=function(){return this.a},uZn.zl=function(n,t,e){return Kun(this,n,this.a,t,e)},uZn.Al=function(n,t,e){return Fun(this,n,this.a,t,e)},zW(Ytt,"EStructuralFeatureImpl/ContainmentUpdatingFeatureMapEntry",791),sDn(1350,1,{},SA),uZn.yk=function(n,t,e,i,r){return uG(vtn(n,this.b),220).Yl(this.a).Fk(i)},uZn.zk=function(n,t,e,i,r){return uG(vtn(n,this.b),220).Pl(this.a,i,r)},uZn.Ak=function(n,t,e,i,r){return uG(vtn(n,this.b),220).Ql(this.a,i,r)},uZn.Bk=function(n,t,e){return uG(vtn(n,this.b),220).Yl(this.a).Qj()},uZn.Ck=function(n,t,e,i){uG(vtn(n,this.b),220).Yl(this.a).Wb(i)},uZn.Dk=function(n,t,e){return uG(vtn(n,this.b),220).Yl(this.a)},uZn.Ek=function(n,t,e){uG(vtn(n,this.b),220).Yl(this.a).Gk()},zW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateFeatureMapDelegator",1350),sDn(91,1,{},RU,CY,GZ,r8),uZn.yk=function(n,t,e,i,r){var c;if(null==(c=t.li(e))&&t.mi(e,c=xYn(this,n)),!r)switch(this.e){case 50:case 41:return uG(c,597).bk();case 40:return uG(c,220).Vl()}return c},uZn.zk=function(n,t,e,i,r){var c;return null==(c=t.li(e))&&t.mi(e,c=xYn(this,n)),uG(c,71).Wk(i,r)},uZn.Ak=function(n,t,e,i,r){var c;return null!=(c=t.li(e))&&(r=uG(c,71).Xk(i,r)),r},uZn.Bk=function(n,t,e){var i;return null!=(i=t.li(e))&&uG(i,79).Qj()},uZn.Ck=function(n,t,e,i){var r;!(r=uG(t.li(e),79))&&t.mi(e,r=xYn(this,n)),r.Wb(i)},uZn.Dk=function(n,t,e){var i;return null==(i=t.li(e))&&t.mi(e,i=xYn(this,n)),F$(i,79)?uG(i,79):new _m(uG(t.li(e),15))},uZn.Ek=function(n,t,e){var i;!(i=uG(t.li(e),79))&&t.mi(e,i=xYn(this,n)),i.Gk()},uZn.b=0,uZn.e=0,zW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateMany",91),sDn(512,1,{}),uZn.zk=function(n,t,e,i,r){throw hv(new Kv)},uZn.Ak=function(n,t,e,i,r){throw hv(new Kv)},uZn.Dk=function(n,t,e){return new IY(this,n,t,e)},zW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingle",512),sDn(1367,1,ort,IY),uZn.Fk=function(n){return this.a.yk(this.c,this.d,this.b,n,!0)},uZn.Qj=function(){return this.a.Bk(this.c,this.d,this.b)},uZn.Wb=function(n){this.a.Ck(this.c,this.d,this.b,n)},uZn.Gk=function(){this.a.Ek(this.c,this.d,this.b)},uZn.b=0,zW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingle/1",1367),sDn(784,512,{},_1),uZn.yk=function(n,t,e,i,r){return PHn(n,n.Ph(),n.Fh())==this.b?this.bl()&&i?J$n(n):n.Ph():null},uZn.zk=function(n,t,e,i,r){var c,a;return n.Ph()&&(r=(c=n.Fh())>=0?n.Ah(r):n.Ph().Th(n,-1-c,null,r)),a=emn(n.Dh(),this.e),n.Ch(i,a,r)},uZn.Ak=function(n,t,e,i,r){var c;return c=emn(n.Dh(),this.e),n.Ch(null,c,r)},uZn.Bk=function(n,t,e){var i;return i=emn(n.Dh(),this.e),!!n.Ph()&&n.Fh()==i},uZn.Ck=function(n,t,e,i){var r,c,a,o,u;if(null!=i&&!LGn(this.a,i))throw hv(new mM(Lrt+(F$(i,58)?nPn(uG(i,58).Dh()):crn(Tbn(i)))+Nrt+this.a+"'"));if(r=n.Ph(),a=emn(n.Dh(),this.e),xA(i)!==xA(r)||n.Fh()!=a&&null!=i){if(eEn(n,uG(i,58)))throw hv(new vM(net+n.Ib()));u=null,r&&(u=(c=n.Fh())>=0?n.Ah(u):n.Ph().Th(n,-1-c,null,u)),(o=uG(i,54))&&(u=o.Rh(n,emn(o.Dh(),this.b),null,u)),(u=n.Ch(o,a,u))&&u.oj()}else n.vh()&&n.wh()&&Msn(n,new lV(n,1,a,i,i))},uZn.Ek=function(n,t,e){var i,r,c;n.Ph()?(c=(i=n.Fh())>=0?n.Ah(null):n.Ph().Th(n,-1-i,null,null),r=emn(n.Dh(),this.e),(c=n.Ch(null,r,c))&&c.oj()):n.vh()&&n.wh()&&Msn(n,new bV(n,1,this.e,null,null))},uZn.bl=function(){return!1},zW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleContainer",784),sDn(1351,784,{},KU),uZn.bl=function(){return!0},zW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleContainerResolving",1351),sDn(574,512,{}),uZn.yk=function(n,t,e,i,r){var c;return null==(c=t.li(e))?this.b:xA(c)===xA(rBt)?null:c},uZn.Bk=function(n,t,e){var i;return null!=(i=t.li(e))&&(xA(i)===xA(rBt)||!udn(i,this.b))},uZn.Ck=function(n,t,e,i){var r,c;n.vh()&&n.wh()?(r=null==(c=t.li(e))?this.b:xA(c)===xA(rBt)?null:c,null==i?null!=this.c?(t.mi(e,null),i=this.b):null!=this.b?t.mi(e,rBt):t.mi(e,null):(this.Bl(i),t.mi(e,i)),Msn(n,this.d.Cl(n,1,this.e,r,i))):null==i?null!=this.c?t.mi(e,null):null!=this.b?t.mi(e,rBt):t.mi(e,null):(this.Bl(i),t.mi(e,i))},uZn.Ek=function(n,t,e){var i,r;n.vh()&&n.wh()?(i=null==(r=t.li(e))?this.b:xA(r)===xA(rBt)?null:r,t.ni(e),Msn(n,this.d.Cl(n,1,this.e,i,this.b))):t.ni(e)},uZn.Bl=function(n){throw hv(new $v)},zW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleData",574),sDn($rt,1,{},Is),uZn.Cl=function(n,t,e,i,r){return new bV(n,t,e,i,r)},uZn.Dl=function(n,t,e,i,r,c){return new kZ(n,t,e,i,r,c)},zW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator",$rt),sDn(1368,$rt,{},Os),uZn.Cl=function(n,t,e,i,r){return new P9(n,t,e,oM(gK(i)),oM(gK(r)))},uZn.Dl=function(n,t,e,i,r,c){return new w4(n,t,e,oM(gK(i)),oM(gK(r)),c)},zW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/1",1368),sDn(1369,$rt,{},As),uZn.Cl=function(n,t,e,i,r){return new Bcn(n,t,e,uG(i,222).a,uG(r,222).a)},uZn.Dl=function(n,t,e,i,r,c){return new o4(n,t,e,uG(i,222).a,uG(r,222).a,c)},zW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/2",1369),sDn(1370,$rt,{},Ls),uZn.Cl=function(n,t,e,i,r){return new Hcn(n,t,e,uG(i,180).a,uG(r,180).a)},uZn.Dl=function(n,t,e,i,r,c){return new u4(n,t,e,uG(i,180).a,uG(r,180).a,c)},zW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/3",1370),sDn(1371,$rt,{},Ns),uZn.Cl=function(n,t,e,i,r){return new E9(n,t,e,uM(pK(i)),uM(pK(r)))},uZn.Dl=function(n,t,e,i,r,c){return new s4(n,t,e,uM(pK(i)),uM(pK(r)),c)},zW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/4",1371),sDn(1372,$rt,{},$s),uZn.Cl=function(n,t,e,i,r){return new qcn(n,t,e,uG(i,161).a,uG(r,161).a)},uZn.Dl=function(n,t,e,i,r,c){return new h4(n,t,e,uG(i,161).a,uG(r,161).a,c)},zW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/5",1372),sDn(1373,$rt,{},Ds),uZn.Cl=function(n,t,e,i,r){return new S9(n,t,e,uG(i,17).a,uG(r,17).a)},uZn.Dl=function(n,t,e,i,r,c){return new f4(n,t,e,uG(i,17).a,uG(r,17).a,c)},zW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/6",1373),sDn(1374,$rt,{},xs),uZn.Cl=function(n,t,e,i,r){return new Ucn(n,t,e,uG(i,168).a,uG(r,168).a)},uZn.Dl=function(n,t,e,i,r,c){return new l4(n,t,e,uG(i,168).a,uG(r,168).a,c)},zW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/7",1374),sDn(1375,$rt,{},Rs),uZn.Cl=function(n,t,e,i,r){return new Gcn(n,t,e,uG(i,191).a,uG(r,191).a)},uZn.Dl=function(n,t,e,i,r,c){return new b4(n,t,e,uG(i,191).a,uG(r,191).a,c)},zW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/8",1375),sDn(1353,574,{},OY),uZn.Bl=function(n){if(!this.a.fk(n))throw hv(new mM(Lrt+Tbn(n)+Nrt+this.a+"'"))},zW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleDataDynamic",1353),sDn(1354,574,{},lz),uZn.Bl=function(n){},zW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleDataStatic",1354),sDn(785,574,{}),uZn.Bk=function(n,t,e){return null!=t.li(e)},uZn.Ck=function(n,t,e,i){var r,c;n.vh()&&n.wh()?(r=!0,null==(c=t.li(e))?(r=!1,c=this.b):xA(c)===xA(rBt)&&(c=null),null==i?null!=this.c?(t.mi(e,null),i=this.b):t.mi(e,rBt):(this.Bl(i),t.mi(e,i)),Msn(n,this.d.Dl(n,1,this.e,c,i,!r))):null==i?null!=this.c?t.mi(e,null):t.mi(e,rBt):(this.Bl(i),t.mi(e,i))},uZn.Ek=function(n,t,e){var i,r;n.vh()&&n.wh()?(i=!0,null==(r=t.li(e))?(i=!1,r=this.b):xA(r)===xA(rBt)&&(r=null),t.ni(e),Msn(n,this.d.Dl(n,2,this.e,r,this.b,i))):t.ni(e)},zW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleDataUnsettable",785),sDn(1355,785,{},AY),uZn.Bl=function(n){if(!this.a.fk(n))throw hv(new mM(Lrt+Tbn(n)+Nrt+this.a+"'"))},zW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleDataUnsettableDynamic",1355),sDn(1356,785,{},bz),uZn.Bl=function(n){},zW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleDataUnsettableStatic",1356),sDn(410,512,{},OX),uZn.yk=function(n,t,e,i,r){var c,a,o,u,s;if(s=t.li(e),this.tk()&&xA(s)===xA(rBt))return null;if(this.bl()&&i&&null!=s){if((o=uG(s,54)).Vh()&&o!=(u=mwn(n,o))){if(!LGn(this.a,u))throw hv(new mM(Lrt+Tbn(u)+Nrt+this.a+"'"));t.mi(e,s=u),this.al()&&(c=uG(u,54),a=o.Th(n,this.b?emn(o.Dh(),this.b):-1-emn(n.Dh(),this.e),null,null),!c.Ph()&&(a=c.Rh(n,this.b?emn(c.Dh(),this.b):-1-emn(n.Dh(),this.e),null,a)),a&&a.oj()),n.vh()&&n.wh()&&Msn(n,new bV(n,9,this.e,o,u))}return s}return s},uZn.zk=function(n,t,e,i,r){var c,a;return xA(a=t.li(e))===xA(rBt)&&(a=null),t.mi(e,i),this.Mj()?xA(a)!==xA(i)&&null!=a&&(r=(c=uG(a,54)).Th(n,emn(c.Dh(),this.b),null,r)):this.al()&&null!=a&&(r=uG(a,54).Th(n,-1-emn(n.Dh(),this.e),null,r)),n.vh()&&n.wh()&&(!r&&(r=new cj(4)),r.nj(new bV(n,1,this.e,a,i))),r},uZn.Ak=function(n,t,e,i,r){var c;return xA(c=t.li(e))===xA(rBt)&&(c=null),t.ni(e),n.vh()&&n.wh()&&(!r&&(r=new cj(4)),this.tk()?r.nj(new bV(n,2,this.e,c,null)):r.nj(new bV(n,1,this.e,c,null))),r},uZn.Bk=function(n,t,e){return null!=t.li(e)},uZn.Ck=function(n,t,e,i){var r,c,a,o,u;if(null!=i&&!LGn(this.a,i))throw hv(new mM(Lrt+(F$(i,58)?nPn(uG(i,58).Dh()):crn(Tbn(i)))+Nrt+this.a+"'"));o=null!=(u=t.li(e)),this.tk()&&xA(u)===xA(rBt)&&(u=null),a=null,this.Mj()?xA(u)!==xA(i)&&(null!=u&&(a=(r=uG(u,54)).Th(n,emn(r.Dh(),this.b),null,a)),null!=i&&(a=(r=uG(i,54)).Rh(n,emn(r.Dh(),this.b),null,a))):this.al()&&xA(u)!==xA(i)&&(null!=u&&(a=uG(u,54).Th(n,-1-emn(n.Dh(),this.e),null,a)),null!=i&&(a=uG(i,54).Rh(n,-1-emn(n.Dh(),this.e),null,a))),null==i&&this.tk()?t.mi(e,rBt):t.mi(e,i),n.vh()&&n.wh()?(c=new kZ(n,1,this.e,u,i,this.tk()&&!o),a?(a.nj(c),a.oj()):Msn(n,c)):a&&a.oj()},uZn.Ek=function(n,t,e){var i,r,c,a,o;a=null!=(o=t.li(e)),this.tk()&&xA(o)===xA(rBt)&&(o=null),c=null,null!=o&&(this.Mj()?c=(i=uG(o,54)).Th(n,emn(i.Dh(),this.b),null,c):this.al()&&(c=uG(o,54).Th(n,-1-emn(n.Dh(),this.e),null,c))),t.ni(e),n.vh()&&n.wh()?(r=new kZ(n,this.tk()?2:1,this.e,o,null,a),c?(c.nj(r),c.oj()):Msn(n,r)):c&&c.oj()},uZn.Mj=function(){return!1},uZn.al=function(){return!1},uZn.bl=function(){return!1},uZn.tk=function(){return!1},zW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObject",410),sDn(575,410,{},tK),uZn.al=function(){return!0},zW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainment",575),sDn(1359,575,{},eK),uZn.bl=function(){return!0},zW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentResolving",1359),sDn(787,575,{},iK),uZn.tk=function(){return!0},zW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentUnsettable",787),sDn(1361,787,{},cK),uZn.bl=function(){return!0},zW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentUnsettableResolving",1361),sDn(650,575,{},FU),uZn.Mj=function(){return!0},zW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverse",650),sDn(1360,650,{},HU),uZn.bl=function(){return!0},zW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverseResolving",1360),sDn(788,650,{},UU),uZn.tk=function(){return!0},zW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverseUnsettable",788),sDn(1362,788,{},GU),uZn.bl=function(){return!0},zW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverseUnsettableResolving",1362),sDn(651,410,{},rK),uZn.bl=function(){return!0},zW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolving",651),sDn(1363,651,{},aK),uZn.tk=function(){return!0},zW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolvingUnsettable",1363),sDn(789,651,{},_U),uZn.Mj=function(){return!0},zW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolvingWithInverse",789),sDn(1364,789,{},qU),uZn.tk=function(){return!0},zW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolvingWithInverseUnsettable",1364),sDn(1357,410,{},oK),uZn.tk=function(){return!0},zW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectUnsettable",1357),sDn(786,410,{},BU),uZn.Mj=function(){return!0},zW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectWithInverse",786),sDn(1358,786,{},XU),uZn.tk=function(){return!0},zW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectWithInverseUnsettable",1358),sDn(790,576,Art,EQ),uZn.yl=function(n){return new EQ(this.a,this.c,n)},uZn.md=function(){return this.b},uZn.zl=function(n,t,e){return Snn(this,n,this.b,e)},uZn.Al=function(n,t,e){return Pnn(this,n,this.b,e)},zW(Ytt,"EStructuralFeatureImpl/InverseUpdatingFeatureMapEntry",790),sDn(1365,1,ort,_m),uZn.Fk=function(n){return this.a},uZn.Qj=function(){return F$(this.a,97)?uG(this.a,97).Qj():!this.a.dc()},uZn.Wb=function(n){this.a.$b(),this.a.Gc(uG(n,15))},uZn.Gk=function(){F$(this.a,97)?uG(this.a,97).Gk():this.a.$b()},zW(Ytt,"EStructuralFeatureImpl/SettingMany",1365),sDn(1366,576,Art,o8),uZn.xl=function(n){return new hF((uVn(),oHt),this.b.ri(this.a,n))},uZn.md=function(){return null},uZn.zl=function(n,t,e){return e},uZn.Al=function(n,t,e){return e},zW(Ytt,"EStructuralFeatureImpl/SimpleContentFeatureMapEntry",1366),sDn(652,576,Art,hF),uZn.xl=function(n){return new hF(this.c,n)},uZn.md=function(){return this.a},uZn.zl=function(n,t,e){return e},uZn.Al=function(n,t,e){return e},zW(Ytt,"EStructuralFeatureImpl/SimpleFeatureMapEntry",652),sDn(403,506,Qet,Ks),uZn.aj=function(n){return Inn(h_t,EZn,29,n,0,1)},uZn.Yi=function(){return!1},zW(Ytt,"ESuperAdapter/1",403),sDn(457,448,{110:1,94:1,93:1,155:1,197:1,58:1,114:1,850:1,54:1,99:1,158:1,457:1,119:1,120:1},Fs),uZn.Lh=function(n,t,e){switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),this.Ab;case 1:return this.zb;case 2:return!this.a&&(this.a=new AX(this,g_t,this)),this.a}return $tn(this,n-iQ((YYn(),q_t)),ern(uG(Lsn(this,16),29)||q_t,n),t,e)},uZn.Uh=function(n,t,e){switch(t){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),Nyn(this.Ab,n,e);case 2:return!this.a&&(this.a=new AX(this,g_t,this)),Nyn(this.a,n,e)}return uG(ern(uG(Lsn(this,16),29)||(YYn(),q_t),t),69).wk().Ak(this,$vn(this),t-iQ((YYn(),q_t)),n,e)},uZn.Wh=function(n){switch(n){case 0:return!!this.Ab&&0!=this.Ab.i;case 1:return null!=this.zb;case 2:return!!this.a&&0!=this.a.i}return l5(this,n-iQ((YYn(),q_t)),ern(uG(Lsn(this,16),29)||q_t,n))},uZn.bi=function(n,t){switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),Czn(this.Ab),!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),void CW(this.Ab,uG(t,16));case 1:return void qon(this,mK(t));case 2:return!this.a&&(this.a=new AX(this,g_t,this)),Czn(this.a),!this.a&&(this.a=new AX(this,g_t,this)),void CW(this.a,uG(t,16))}lpn(this,n-iQ((YYn(),q_t)),ern(uG(Lsn(this,16),29)||q_t,n),t)},uZn.ii=function(){return YYn(),q_t},uZn.ki=function(n){switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),void Czn(this.Ab);case 1:return void qon(this,null);case 2:return!this.a&&(this.a=new AX(this,g_t,this)),void Czn(this.a)}sdn(this,n-iQ((YYn(),q_t)),ern(uG(Lsn(this,16),29)||q_t,n))},zW(Ytt,"ETypeParameterImpl",457),sDn(458,83,Trt,AX),uZn.Nj=function(n,t){return mCn(this,uG(n,89),t)},uZn.Oj=function(n,t){return vCn(this,uG(n,89),t)},zW(Ytt,"ETypeParameterImpl/1",458),sDn(647,45,B0n,ty),uZn.ec=function(){return new Um(this)},zW(Ytt,"ETypeParameterImpl/2",647),sDn(570,KZn,FZn,Um),uZn.Fc=function(n){return WF(this,uG(n,89))},uZn.Gc=function(n){var t,e,i;for(i=!1,e=n.Kc();e.Ob();)t=uG(e.Pb(),89),null==vJ(this.a,t,"")&&(i=!0);return i},uZn.$b=function(){$V(this.a)},uZn.Hc=function(n){return PV(this.a,n)},uZn.Kc=function(){return new Gm(new bsn(new Nw(this.a).a))},uZn.Mc=function(n){return C7(this,n)},uZn.gc=function(){return oS(this.a)},zW(Ytt,"ETypeParameterImpl/2/1",570),sDn(571,1,$Zn,Gm),uZn.Nb=function(n){SV(this,n)},uZn.Pb=function(){return uG(von(this.a).ld(),89)},uZn.Ob=function(){return this.a.b},uZn.Qb=function(){Oen(this.a)},zW(Ytt,"ETypeParameterImpl/2/1/1",571),sDn(1329,45,B0n,ey),uZn._b=function(n){return RA(n)?AZ(this,n):!!FX(this.f,n)},uZn.xc=function(n){var t;return F$(t=RA(n)?U1(this,n):DA(FX(this.f,n)),851)?(t=uG(t,851).Kk(),vJ(this,uG(n,241),t),t):null!=t?t:null==n?(SP(),EBt):null},zW(Ytt,"EValidatorRegistryImpl",1329),sDn(1349,720,{110:1,94:1,93:1,480:1,155:1,58:1,114:1,2040:1,54:1,99:1,158:1,119:1,120:1},_s),uZn.ri=function(n,t){switch(n.hk()){case 21:case 22:case 23:case 24:case 26:case 31:case 32:case 37:case 38:case 39:case 40:case 43:case 44:case 48:case 49:case 20:return null==t?null:cpn(t);case 25:return Xrn(t);case 27:return nen(t);case 28:return ten(t);case 29:return null==t?null:N$(QKt[0],uG(t,206));case 41:return null==t?"":Ij(uG(t,297));case 42:return cpn(t);case 50:return mK(t);default:throw hv(new vM(tet+n.xe()+eet))}},uZn.si=function(n){var t;switch(-1==n.G&&(n.G=(t=Hrn(n))?Hyn(t.vi(),n):-1),n.G){case 0:return new Wk;case 1:return new vs;case 2:return new Kl;case 4:return new Gv;case 5:return new Jk;case 6:return new Uv;case 7:return new Fl;case 10:return new ps;case 11:return new Yk;case 12:return new aZ;case 13:return new ny;case 14:return new PK;case 17:return new Cs;case 18:return new ev;case 19:return new Fs;default:throw hv(new vM(cet+n.zb+eet))}},uZn.ti=function(n,t){switch(n.hk()){case 20:return null==t?null:new Wj(t);case 21:return null==t?null:new PN(t);case 23:case 22:return null==t?null:Ovn(t);case 26:case 24:return null==t?null:Ben(mUn(t,-128,127)<<24>>24);case 25:return cxn(t);case 27:return sjn(t);case 28:return hjn(t);case 29:return rIn(t);case 32:case 31:return null==t?null:YIn(t);case 38:case 37:return null==t?null:new tk(t);case 40:case 39:return null==t?null:xwn(mUn(t,j1n,vZn));case 41:case 42:return null;case 44:case 43:return null==t?null:Hvn(tJn(t));case 49:case 48:return null==t?null:Rwn(mUn(t,xrt,32767)<<16>>16);case 50:return t;default:throw hv(new vM(tet+n.xe()+eet))}},zW(Ytt,"EcoreFactoryImpl",1349),sDn(560,184,{110:1,94:1,93:1,155:1,197:1,58:1,241:1,114:1,2038:1,54:1,99:1,158:1,184:1,560:1,119:1,120:1,690:1},dJ),uZn.gb=!1,uZn.hb=!1;var gBt,pBt=!1;zW(Ytt,"EcorePackageImpl",560),sDn(1234,1,{851:1},Bs),uZn.Kk=function(){return HD(),SBt},zW(Ytt,"EcorePackageImpl/1",1234),sDn(1243,1,Wrt,Hs),uZn.fk=function(n){return F$(n,155)},uZn.gk=function(n){return Inn(uFt,EZn,155,n,0,1)},zW(Ytt,"EcorePackageImpl/10",1243),sDn(1244,1,Wrt,Us),uZn.fk=function(n){return F$(n,197)},uZn.gk=function(n){return Inn(hFt,EZn,197,n,0,1)},zW(Ytt,"EcorePackageImpl/11",1244),sDn(1245,1,Wrt,Gs),uZn.fk=function(n){return F$(n,58)},uZn.gk=function(n){return Inn(nFt,EZn,58,n,0,1)},zW(Ytt,"EcorePackageImpl/12",1245),sDn(1246,1,Wrt,qs),uZn.fk=function(n){return F$(n,411)},uZn.gk=function(n){return Inn(p_t,yrt,62,n,0,1)},zW(Ytt,"EcorePackageImpl/13",1246),sDn(1247,1,Wrt,Xs),uZn.fk=function(n){return F$(n,241)},uZn.gk=function(n){return Inn(fFt,EZn,241,n,0,1)},zW(Ytt,"EcorePackageImpl/14",1247),sDn(1248,1,Wrt,zs),uZn.fk=function(n){return F$(n,518)},uZn.gk=function(n){return Inn(m_t,EZn,2116,n,0,1)},zW(Ytt,"EcorePackageImpl/15",1248),sDn(1249,1,Wrt,Vs),uZn.fk=function(n){return F$(n,102)},uZn.gk=function(n){return Inn(v_t,krt,19,n,0,1)},zW(Ytt,"EcorePackageImpl/16",1249),sDn(1250,1,Wrt,Ws),uZn.fk=function(n){return F$(n,179)},uZn.gk=function(n){return Inn(o_t,krt,179,n,0,1)},zW(Ytt,"EcorePackageImpl/17",1250),sDn(1251,1,Wrt,Qs),uZn.fk=function(n){return F$(n,481)},uZn.gk=function(n){return Inn(a_t,EZn,481,n,0,1)},zW(Ytt,"EcorePackageImpl/18",1251),sDn(1252,1,Wrt,Js),uZn.fk=function(n){return F$(n,561)},uZn.gk=function(n){return Inn(wBt,Xit,561,n,0,1)},zW(Ytt,"EcorePackageImpl/19",1252),sDn(1235,1,Wrt,Ys),uZn.fk=function(n){return F$(n,331)},uZn.gk=function(n){return Inn(u_t,krt,35,n,0,1)},zW(Ytt,"EcorePackageImpl/2",1235),sDn(1253,1,Wrt,Zs),uZn.fk=function(n){return F$(n,248)},uZn.gk=function(n){return Inn(g_t,Prt,89,n,0,1)},zW(Ytt,"EcorePackageImpl/20",1253),sDn(1254,1,Wrt,nh),uZn.fk=function(n){return F$(n,457)},uZn.gk=function(n){return Inn(J_t,EZn,850,n,0,1)},zW(Ytt,"EcorePackageImpl/21",1254),sDn(1255,1,Wrt,th),uZn.fk=function(n){return KA(n)},uZn.gk=function(n){return Inn(cot,zZn,485,n,8,1)},zW(Ytt,"EcorePackageImpl/22",1255),sDn(1256,1,Wrt,eh),uZn.fk=function(n){return F$(n,195)},uZn.gk=function(n){return Inn(tUt,zZn,195,n,0,2)},zW(Ytt,"EcorePackageImpl/23",1256),sDn(1257,1,Wrt,ih),uZn.fk=function(n){return F$(n,222)},uZn.gk=function(n){return Inn(uot,zZn,222,n,0,1)},zW(Ytt,"EcorePackageImpl/24",1257),sDn(1258,1,Wrt,rh),uZn.fk=function(n){return F$(n,180)},uZn.gk=function(n){return Inn(hot,zZn,180,n,0,1)},zW(Ytt,"EcorePackageImpl/25",1258),sDn(1259,1,Wrt,ch),uZn.fk=function(n){return F$(n,206)},uZn.gk=function(n){return Inn(iot,zZn,206,n,0,1)},zW(Ytt,"EcorePackageImpl/26",1259),sDn(1260,1,Wrt,ah),uZn.fk=function(n){return!1},uZn.gk=function(n){return Inn(aUt,EZn,2215,n,0,1)},zW(Ytt,"EcorePackageImpl/27",1260),sDn(1261,1,Wrt,oh),uZn.fk=function(n){return FA(n)},uZn.gk=function(n){return Inn(fot,zZn,345,n,7,1)},zW(Ytt,"EcorePackageImpl/28",1261),sDn(1262,1,Wrt,uh),uZn.fk=function(n){return F$(n,61)},uZn.gk=function(n){return Inn(CFt,H3n,61,n,0,1)},zW(Ytt,"EcorePackageImpl/29",1262),sDn(1236,1,Wrt,sh),uZn.fk=function(n){return F$(n,519)},uZn.gk=function(n){return Inn(c_t,{3:1,4:1,5:1,2033:1},598,n,0,1)},zW(Ytt,"EcorePackageImpl/3",1236),sDn(1263,1,Wrt,hh),uZn.fk=function(n){return F$(n,582)},uZn.gk=function(n){return Inn(BFt,EZn,2039,n,0,1)},zW(Ytt,"EcorePackageImpl/30",1263),sDn(1264,1,Wrt,fh),uZn.fk=function(n){return F$(n,160)},uZn.gk=function(n){return Inn(IBt,H3n,160,n,0,1)},zW(Ytt,"EcorePackageImpl/31",1264),sDn(1265,1,Wrt,lh),uZn.fk=function(n){return F$(n,76)},uZn.gk=function(n){return Inn(Z_t,Qrt,76,n,0,1)},zW(Ytt,"EcorePackageImpl/32",1265),sDn(1266,1,Wrt,bh),uZn.fk=function(n){return F$(n,161)},uZn.gk=function(n){return Inn(lot,zZn,161,n,0,1)},zW(Ytt,"EcorePackageImpl/33",1266),sDn(1267,1,Wrt,wh),uZn.fk=function(n){return F$(n,17)},uZn.gk=function(n){return Inn(dot,zZn,17,n,0,1)},zW(Ytt,"EcorePackageImpl/34",1267),sDn(1268,1,Wrt,dh),uZn.fk=function(n){return F$(n,297)},uZn.gk=function(n){return Inn(gat,EZn,297,n,0,1)},zW(Ytt,"EcorePackageImpl/35",1268),sDn(1269,1,Wrt,gh),uZn.fk=function(n){return F$(n,168)},uZn.gk=function(n){return Inn(yot,zZn,168,n,0,1)},zW(Ytt,"EcorePackageImpl/36",1269),sDn(1270,1,Wrt,ph),uZn.fk=function(n){return F$(n,85)},uZn.gk=function(n){return Inn(mat,EZn,85,n,0,1)},zW(Ytt,"EcorePackageImpl/37",1270),sDn(1271,1,Wrt,mh),uZn.fk=function(n){return F$(n,599)},uZn.gk=function(n){return Inn(jBt,EZn,599,n,0,1)},zW(Ytt,"EcorePackageImpl/38",1271),sDn(1272,1,Wrt,vh),uZn.fk=function(n){return!1},uZn.gk=function(n){return Inn(oUt,EZn,2216,n,0,1)},zW(Ytt,"EcorePackageImpl/39",1272),sDn(1237,1,Wrt,kh),uZn.fk=function(n){return F$(n,90)},uZn.gk=function(n){return Inn(h_t,EZn,29,n,0,1)},zW(Ytt,"EcorePackageImpl/4",1237),sDn(1273,1,Wrt,yh),uZn.fk=function(n){return F$(n,191)},uZn.gk=function(n){return Inn(Tot,zZn,191,n,0,1)},zW(Ytt,"EcorePackageImpl/40",1273),sDn(1274,1,Wrt,Mh),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,zZn,2,n,6,1)},zW(Ytt,"EcorePackageImpl/41",1274),sDn(1275,1,Wrt,Th),uZn.fk=function(n){return F$(n,596)},uZn.gk=function(n){return Inn(OFt,EZn,596,n,0,1)},zW(Ytt,"EcorePackageImpl/42",1275),sDn(1276,1,Wrt,jh),uZn.fk=function(n){return!1},uZn.gk=function(n){return Inn(uUt,zZn,2217,n,0,1)},zW(Ytt,"EcorePackageImpl/43",1276),sDn(1277,1,Wrt,Eh),uZn.fk=function(n){return F$(n,44)},uZn.gk=function(n){return Inn(Sat,c1n,44,n,0,1)},zW(Ytt,"EcorePackageImpl/44",1277),sDn(1238,1,Wrt,Sh),uZn.fk=function(n){return F$(n,142)},uZn.gk=function(n){return Inn(s_t,EZn,142,n,0,1)},zW(Ytt,"EcorePackageImpl/5",1238),sDn(1239,1,Wrt,Ph),uZn.fk=function(n){return F$(n,156)},uZn.gk=function(n){return Inn(f_t,EZn,156,n,0,1)},zW(Ytt,"EcorePackageImpl/6",1239),sDn(1240,1,Wrt,Ch),uZn.fk=function(n){return F$(n,469)},uZn.gk=function(n){return Inn(w_t,EZn,685,n,0,1)},zW(Ytt,"EcorePackageImpl/7",1240),sDn(1241,1,Wrt,Ih),uZn.fk=function(n){return F$(n,582)},uZn.gk=function(n){return Inn(d_t,EZn,694,n,0,1)},zW(Ytt,"EcorePackageImpl/8",1241),sDn(1242,1,Wrt,Oh),uZn.fk=function(n){return F$(n,480)},uZn.gk=function(n){return Inn(sFt,EZn,480,n,0,1)},zW(Ytt,"EcorePackageImpl/9",1242),sDn(1038,2080,Git,Qy),uZn.Mi=function(n,t){wdn(this,uG(t,424))},uZn.Qi=function(n,t){GAn(this,n,uG(t,424))},zW(Ytt,"MinimalEObjectImpl/1ArrayDelegatingAdapterList",1038),sDn(1039,152,Bit,SQ),uZn.jj=function(){return this.a.a},zW(Ytt,"MinimalEObjectImpl/1ArrayDelegatingAdapterList/1",1039),sDn(1067,1066,{},e$),zW("org.eclipse.emf.ecore.plugin","EcorePlugin",1067);var mBt,vBt,kBt,yBt,MBt,TBt,jBt=Iq(Jrt,"Resource");sDn(799,1524,Yrt),uZn.Hl=function(n){},uZn.Il=function(n){},uZn.El=function(){return!this.a&&(this.a=new qm(this)),this.a},uZn.Fl=function(n){var t,e,i,r,c;if((i=n.length)>0){if(s3(0,n.length),47==n.charCodeAt(0)){for(c=new R7(4),r=1,t=1;t0&&(Knn(0,e,n.length),n=n.substr(0,e))}return lNn(this,n)},uZn.Gl=function(){return this.c},uZn.Ib=function(){return Ij(this.Rm)+"@"+(Hon(this)>>>0).toString(16)+" uri='"+this.d+"'"},uZn.b=!1,zW(Zrt,"ResourceImpl",799),sDn(1525,799,Yrt,Xm),zW(Zrt,"BinaryResourceImpl",1525),sDn(1190,708,Jet),uZn.bj=function(n){return F$(n,58)?JZ(this,uG(n,58)):F$(n,599)?new DD(uG(n,599).El()):xA(n)===xA(this.f)?uG(n,16).Kc():(EK(),KFt.a)},uZn.Ob=function(){return u$n(this)},uZn.a=!1,zW(art,"EcoreUtil/ContentTreeIterator",1190),sDn(1526,1190,Jet,dV),uZn.bj=function(n){return xA(n)===xA(this.f)?uG(n,15).Kc():new L6(uG(n,58))},zW(Zrt,"ResourceImpl/5",1526),sDn(658,2092,Mrt,qm),uZn.Hc=function(n){return this.i<=4?sSn(this,n):F$(n,54)&&uG(n,54).Jh()==this.a},uZn.Mi=function(n,t){n==this.i-1&&(this.a.b||(this.a.b=!0))},uZn.Oi=function(n,t){0==n?this.a.b||(this.a.b=!0):Ann(this,n,t)},uZn.Qi=function(n,t){},uZn.Ri=function(n,t,e){},uZn.Lj=function(){return 2},uZn.jj=function(){return this.a},uZn.Mj=function(){return!0},uZn.Nj=function(n,t){return t=uG(n,54).fi(this.a,t)},uZn.Oj=function(n,t){return uG(n,54).fi(null,t)},uZn.Pj=function(){return!1},uZn.Si=function(){return!0},uZn.aj=function(n){return Inn(nFt,EZn,58,n,0,1)},uZn.Yi=function(){return!1},zW(Zrt,"ResourceImpl/ContentsEList",658),sDn(970,2062,m1n,zm),uZn.fd=function(n){return this.a.Ki(n)},uZn.gc=function(){return this.a.gc()},zW(art,"AbstractSequentialInternalEList/1",970),sDn(634,1,{},HG),zW(art,"BasicExtendedMetaData",634),sDn(1181,1,{},CA),uZn.Jl=function(){return null},uZn.Kl=function(){return-2==this.a&&fw(this,qCn(this.d,this.b)),this.a},uZn.Ll=function(){return null},uZn.Ml=function(){return hZ(),hZ(),zot},uZn.xe=function(){return this.c==wct&&lw(this,ckn(this.d,this.b)),this.c},uZn.Nl=function(){return 0},uZn.a=-2,uZn.c=wct,zW(art,"BasicExtendedMetaData/EClassExtendedMetaDataImpl",1181),sDn(1182,1,{},g4),uZn.Jl=function(){return this.a==(N7(),MBt)&&dw(this,TBn(this.f,this.b)),this.a},uZn.Kl=function(){return 0},uZn.Ll=function(){return this.c==(N7(),MBt)&&bw(this,jBn(this.f,this.b)),this.c},uZn.Ml=function(){return!this.d&&pw(this,iqn(this.f,this.b)),this.d},uZn.xe=function(){return this.e==wct&&vw(this,ckn(this.f,this.b)),this.e},uZn.Nl=function(){return-2==this.g&&yw(this,DPn(this.f,this.b)),this.g},uZn.e=wct,uZn.g=-2,zW(art,"BasicExtendedMetaData/EDataTypeExtendedMetaDataImpl",1182),sDn(1180,1,{},IA),uZn.b=!1,uZn.c=!1,zW(art,"BasicExtendedMetaData/EPackageExtendedMetaDataImpl",1180),sDn(1183,1,{},p4),uZn.c=-2,uZn.e=wct,uZn.f=wct,zW(art,"BasicExtendedMetaData/EStructuralFeatureExtendedMetaDataImpl",1183),sDn(593,632,Trt,_G),uZn.Lj=function(){return this.c},uZn.ol=function(){return!1},uZn.Wi=function(n,t){return t},uZn.c=0,zW(art,"EDataTypeEList",593);var EBt,SBt,PBt,CBt,IBt=Iq(art,"FeatureMap");sDn(78,593,{3:1,4:1,20:1,31:1,56:1,16:1,15:1,59:1,70:1,66:1,61:1,79:1,160:1,220:1,2036:1,71:1,97:1},wsn),uZn.bd=function(n,t){iKn(this,n,uG(t,76))},uZn.Fc=function(n){return Qxn(this,uG(n,76))},uZn.Hi=function(n){OW(this,uG(n,76))},uZn.Nj=function(n,t){return q_(this,uG(n,76),t)},uZn.Oj=function(n,t){return X_(this,uG(n,76),t)},uZn.Ti=function(n,t){return lUn(this,n,t)},uZn.Wi=function(n,t){return IVn(this,n,uG(t,76))},uZn.hd=function(n,t){return kFn(this,n,uG(t,76))},uZn.Uj=function(n,t){return z_(this,uG(n,76),t)},uZn.Vj=function(n,t){return V_(this,uG(n,76),t)},uZn.Wj=function(n,t,e){return aPn(this,uG(n,76),uG(t,76),e)},uZn.Zi=function(n,t){return WPn(this,n,uG(t,76))},uZn.Ol=function(n,t){return UHn(this,n,t)},uZn.cd=function(n,t){var e,i,r,c,a,o,u,s,h;for(s=new Drn(t.gc()),r=t.Kc();r.Ob();)if(c=(i=uG(r.Pb(),76)).Lk(),EFn(this.e,c))(!c.Si()||!H5(this,c,i.md())&&!sSn(s,i))&&ttn(s,i);else{for(h=VKn(this.e.Dh(),c),e=uG(this.g,124),a=!0,o=0;o=0;)if(t=n[this.c],this.k.am(t.Lk()))return this.j=this.f?t:t.md(),this.i=-2,!0;return this.i=-1,this.g=-1,!1},zW(art,"BasicFeatureMap/FeatureEIterator",420),sDn(676,420,UZn,yL),uZn.ul=function(){return!0},zW(art,"BasicFeatureMap/ResolvingFeatureEIterator",676),sDn(968,496,Irt,G$),uZn.pj=function(){return this},zW(art,"EContentsEList/1",968),sDn(969,496,Irt,kL),uZn.ul=function(){return!1},zW(art,"EContentsEList/2",969),sDn(967,287,Ort,q$),uZn.wl=function(n){},uZn.Ob=function(){return!1},uZn.Sb=function(){return!1},zW(art,"EContentsEList/FeatureIteratorImpl/1",967),sDn(840,593,Trt,jD),uZn.Ni=function(){this.a=!0},uZn.Qj=function(){return this.a},uZn.Gk=function(){var n;Czn(this),uN(this.e)?(n=this.a,this.a=!1,Msn(this.e,new j9(this.e,2,this.c,n,!1))):this.a=!1},uZn.a=!1,zW(art,"EDataTypeEList/Unsettable",840),sDn(1958,593,Trt,ED),uZn.Si=function(){return!0},zW(art,"EDataTypeUniqueEList",1958),sDn(1959,840,Trt,SD),uZn.Si=function(){return!0},zW(art,"EDataTypeUniqueEList/Unsettable",1959),sDn(147,83,Trt,PD),uZn.nl=function(){return!0},uZn.Wi=function(n,t){return R$n(this,n,uG(t,58))},zW(art,"EObjectContainmentEList/Resolving",147),sDn(1184,555,Trt,CD),uZn.nl=function(){return!0},uZn.Wi=function(n,t){return R$n(this,n,uG(t,58))},zW(art,"EObjectContainmentEList/Unsettable/Resolving",1184),sDn(766,14,Trt,r_),uZn.Ni=function(){this.a=!0},uZn.Qj=function(){return this.a},uZn.Gk=function(){var n;Czn(this),uN(this.e)?(n=this.a,this.a=!1,Msn(this.e,new j9(this.e,2,this.c,n,!1))):this.a=!1},uZn.a=!1,zW(art,"EObjectContainmentWithInverseEList/Unsettable",766),sDn(1222,766,Trt,c_),uZn.nl=function(){return!0},uZn.Wi=function(n,t){return R$n(this,n,uG(t,58))},zW(art,"EObjectContainmentWithInverseEList/Unsettable/Resolving",1222),sDn(757,505,Trt,ID),uZn.Ni=function(){this.a=!0},uZn.Qj=function(){return this.a},uZn.Gk=function(){var n;Czn(this),uN(this.e)?(n=this.a,this.a=!1,Msn(this.e,new j9(this.e,2,this.c,n,!1))):this.a=!1},uZn.a=!1,zW(art,"EObjectEList/Unsettable",757),sDn(338,505,Trt,OD),uZn.nl=function(){return!0},uZn.Wi=function(n,t){return R$n(this,n,uG(t,58))},zW(art,"EObjectResolvingEList",338),sDn(1844,757,Trt,AD),uZn.nl=function(){return!0},uZn.Wi=function(n,t){return R$n(this,n,uG(t,58))},zW(art,"EObjectResolvingEList/Unsettable",1844),sDn(1527,1,{},Ah),zW(art,"EObjectValidator",1527),sDn(559,505,Trt,wV),uZn.il=function(){return this.d},uZn.jl=function(){return this.b},uZn.Mj=function(){return!0},uZn.ml=function(){return!0},uZn.b=0,zW(art,"EObjectWithInverseEList",559),sDn(1225,559,Trt,a_),uZn.ll=function(){return!0},zW(art,"EObjectWithInverseEList/ManyInverse",1225),sDn(635,559,Trt,o_),uZn.Ni=function(){this.a=!0},uZn.Qj=function(){return this.a},uZn.Gk=function(){var n;Czn(this),uN(this.e)?(n=this.a,this.a=!1,Msn(this.e,new j9(this.e,2,this.c,n,!1))):this.a=!1},uZn.a=!1,zW(art,"EObjectWithInverseEList/Unsettable",635),sDn(1224,635,Trt,s_),uZn.ll=function(){return!0},zW(art,"EObjectWithInverseEList/Unsettable/ManyInverse",1224),sDn(767,559,Trt,u_),uZn.nl=function(){return!0},uZn.Wi=function(n,t){return R$n(this,n,uG(t,58))},zW(art,"EObjectWithInverseResolvingEList",767),sDn(32,767,Trt,f_),uZn.ll=function(){return!0},zW(art,"EObjectWithInverseResolvingEList/ManyInverse",32),sDn(768,635,Trt,h_),uZn.nl=function(){return!0},uZn.Wi=function(n,t){return R$n(this,n,uG(t,58))},zW(art,"EObjectWithInverseResolvingEList/Unsettable",768),sDn(1223,768,Trt,l_),uZn.ll=function(){return!0},zW(art,"EObjectWithInverseResolvingEList/Unsettable/ManyInverse",1223),sDn(1185,632,Trt),uZn.Li=function(){return!(1792&this.b)},uZn.Ni=function(){this.b|=1},uZn.kl=function(){return!!(4&this.b)},uZn.Mj=function(){return!!(40&this.b)},uZn.ll=function(){return!!(16&this.b)},uZn.ml=function(){return!!(8&this.b)},uZn.nl=function(){return!!(this.b&frt)},uZn.al=function(){return!!(32&this.b)},uZn.ol=function(){return!!(this.b&w1n)},uZn.fk=function(n){return this.d?v5(this.d,n):this.Lk().Hk().fk(n)},uZn.Qj=function(){return 2&this.b?!!(1&this.b):0!=this.i},uZn.Si=function(){return!!(128&this.b)},uZn.Gk=function(){var n;Czn(this),2&this.b&&(uN(this.e)?(n=!!(1&this.b),this.b&=-2,Yv(this,new j9(this.e,2,emn(this.e.Dh(),this.Lk()),n,!1))):this.b&=-2)},uZn.Yi=function(){return!(1536&this.b)},uZn.b=0,zW(art,"EcoreEList/Generic",1185),sDn(1186,1185,Trt,yZ),uZn.Lk=function(){return this.a},zW(art,"EcoreEList/Dynamic",1186),sDn(765,66,Qet,Vm),uZn.aj=function(n){return Acn(this.a.a,n)},zW(art,"EcoreEMap/1",765),sDn(764,83,Trt,kV),uZn.Mi=function(n,t){bMn(this.b,uG(t,136))},uZn.Oi=function(n,t){Osn(this.b)},uZn.Pi=function(n,t,e){var i;++(i=this.b,uG(t,136),i).e},uZn.Qi=function(n,t){Vdn(this.b,uG(t,136))},uZn.Ri=function(n,t,e){Vdn(this.b,uG(e,136)),xA(e)===xA(t)&&uG(e,136).Ci(WN(uG(t,136).ld())),bMn(this.b,uG(t,136))},zW(art,"EcoreEMap/DelegateEObjectContainmentEList",764),sDn(1220,141,urt,xan),zW(art,"EcoreEMap/Unsettable",1220),sDn(1221,764,Trt,b_),uZn.Ni=function(){this.a=!0},uZn.Qj=function(){return this.a},uZn.Gk=function(){var n;Czn(this),uN(this.e)?(n=this.a,this.a=!1,Msn(this.e,new j9(this.e,2,this.c,n,!1))):this.a=!1},uZn.a=!1,zW(art,"EcoreEMap/Unsettable/UnsettableDelegateEObjectContainmentEList",1221),sDn(1189,215,B0n,DW),uZn.a=!1,uZn.b=!1,zW(art,"EcoreUtil/Copier",1189),sDn(759,1,$Zn,L6),uZn.Nb=function(n){SV(this,n)},uZn.Ob=function(){return Ymn(this)},uZn.Pb=function(){var n;return Ymn(this),n=this.b,this.b=null,n},uZn.Qb=function(){this.a.Qb()},zW(art,"EcoreUtil/ProperContentIterator",759),sDn(1528,1527,{},_l),zW(art,"EcoreValidator",1528),Iq(art,"FeatureMapUtil/Validator"),sDn(1295,1,{2041:1},Lh),uZn.am=function(n){return!0},zW(art,"FeatureMapUtil/1",1295),sDn(773,1,{2041:1},yQn),uZn.am=function(n){var t;return this.c==n||(null==(t=gK(cQ(this.a,n)))?DBn(this,n)?(W9(this.a,n,(qx(),eot)),!0):(W9(this.a,n,(qx(),tot)),!1):t==(qx(),eot))},uZn.e=!1,zW(art,"FeatureMapUtil/BasicValidator",773),sDn(774,45,B0n,U$),zW(art,"FeatureMapUtil/BasicValidator/Cache",774),sDn(509,56,{20:1,31:1,56:1,16:1,15:1,61:1,79:1,71:1,97:1},OA),uZn.bd=function(n,t){LFn(this.c,this.b,n,t)},uZn.Fc=function(n){return UHn(this.c,this.b,n)},uZn.cd=function(n,t){return _Xn(this.c,this.b,n,t)},uZn.Gc=function(n){return K$(this,n)},uZn.Gi=function(n,t){hrn(this.c,this.b,n,t)},uZn.Wk=function(n,t){return OBn(this.c,this.b,n,t)},uZn.$i=function(n){return gXn(this.c,this.b,n,!1)},uZn.Ii=function(){return wN(this.c,this.b)},uZn.Ji=function(){return dN(this.c,this.b)},uZn.Ki=function(n){return Onn(this.c,this.b,n)},uZn.Xk=function(n,t){return rF(this,n,t)},uZn.$b=function(){Zv(this)},uZn.Hc=function(n){return H5(this.c,this.b,n)},uZn.Ic=function(n){return Run(this.c,this.b,n)},uZn.Xb=function(n){return gXn(this.c,this.b,n,!0)},uZn.Fk=function(n){return this},uZn.dd=function(n){return U5(this.c,this.b,n)},uZn.dc=function(){return $A(this)},uZn.Qj=function(){return!kmn(this.c,this.b)},uZn.Kc=function(){return kin(this.c,this.b)},uZn.ed=function(){return yin(this.c,this.b)},uZn.fd=function(n){return lgn(this.c,this.b,n)},uZn.Ti=function(n,t){return EGn(this.c,this.b,n,t)},uZn.Ui=function(n,t){xnn(this.c,this.b,n,t)},uZn.gd=function(n){return VOn(this.c,this.b,n)},uZn.Mc=function(n){return $Hn(this.c,this.b,n)},uZn.hd=function(n,t){return hqn(this.c,this.b,n,t)},uZn.Wb=function(n){C$n(this.c,this.b),K$(this,uG(n,15))},uZn.gc=function(){return fgn(this.c,this.b)},uZn.Pc=function(){return v4(this.c,this.b)},uZn.Qc=function(n){return G5(this.c,this.b,n)},uZn.Ib=function(){var n,t;for((t=new zM).a+="[",n=wN(this.c,this.b);Zln(n);)VA(t,ox(_yn(n))),Zln(n)&&(t.a+=TZn);return t.a+="]",t.a},uZn.Gk=function(){C$n(this.c,this.b)},zW(art,"FeatureMapUtil/FeatureEList",509),sDn(644,39,Bit,i8),uZn.hj=function(n){return ydn(this,n)},uZn.mj=function(n){var t,e,i,r;switch(this.d){case 1:case 2:if(xA(n.jj())===xA(this.c)&&ydn(this,null)==n.hj(null))return this.g=n.ij(),1==n.gj()&&(this.d=1),!0;break;case 3:if(3===n.gj()&&xA(n.jj())===xA(this.c)&&ydn(this,null)==n.hj(null))return this.d=5,ttn(t=new Drn(2),this.g),ttn(t,n.ij()),this.g=t,!0;break;case 5:if(3===n.gj()&&xA(n.jj())===xA(this.c)&&ydn(this,null)==n.hj(null))return uG(this.g,16).Fc(n.ij()),!0;break;case 4:switch(n.gj()){case 3:if(xA(n.jj())===xA(this.c)&&ydn(this,null)==n.hj(null))return this.d=1,this.g=n.ij(),!0;break;case 4:if(xA(n.jj())===xA(this.c)&&ydn(this,null)==n.hj(null))return this.d=6,ttn(r=new Drn(2),this.n),ttn(r,n.kj()),this.n=r,i=Uhn(cT(YHt,1),W1n,28,15,[this.o,n.lj()]),this.g=i,!0}break;case 6:if(4===n.gj()&&xA(n.jj())===xA(this.c)&&ydn(this,null)==n.hj(null))return uG(this.n,16).Fc(n.kj()),qGn(i=uG(this.g,53),0,e=Inn(YHt,W1n,28,i.length+1,15,1),0,i.length),e[i.length]=n.lj(),this.g=e,!0}return!1},zW(art,"FeatureMapUtil/FeatureENotificationImpl",644),sDn(564,509,{20:1,31:1,56:1,16:1,15:1,61:1,79:1,160:1,220:1,2036:1,71:1,97:1},Cq),uZn.Ol=function(n,t){return UHn(this.c,n,t)},uZn.Pl=function(n,t,e){return OBn(this.c,n,t,e)},uZn.Ql=function(n,t,e){return fXn(this.c,n,t,e)},uZn.Rl=function(){return this},uZn.Sl=function(n,t){return dXn(this.c,n,t)},uZn.Tl=function(n){return uG(gXn(this.c,this.b,n,!1),76).Lk()},uZn.Ul=function(n){return uG(gXn(this.c,this.b,n,!1),76).md()},uZn.Vl=function(){return this.a},uZn.Wl=function(n){return!kmn(this.c,n)},uZn.Xl=function(n,t){BXn(this.c,n,t)},uZn.Yl=function(n){return non(this.c,n)},uZn.Zl=function(n){ETn(this.c,n)},zW(art,"FeatureMapUtil/FeatureFeatureMap",564),sDn(1294,1,ort,PA),uZn.Fk=function(n){return gXn(this.b,this.a,-1,n)},uZn.Qj=function(){return!kmn(this.b,this.a)},uZn.Wb=function(n){BXn(this.b,this.a,n)},uZn.Gk=function(){C$n(this.b,this.a)},zW(art,"FeatureMapUtil/FeatureValue",1294);var OBt,ABt,LBt,NBt,$Bt,DBt=Iq(gct,"AnyType");sDn(680,63,S1n,PM),zW(gct,"InvalidDatatypeValueException",680);var xBt,RBt,KBt,FBt,_Bt,BBt,HBt,UBt,GBt,qBt,XBt,zBt,VBt,WBt,QBt,JBt,YBt,ZBt,nHt,tHt,eHt,iHt,rHt,cHt,aHt,oHt,uHt,sHt,hHt,fHt,lHt=Iq(gct,pct),bHt=Iq(gct,mct),wHt=Iq(gct,vct);sDn(844,516,{110:1,94:1,93:1,58:1,54:1,99:1,857:1},iy),uZn.Lh=function(n,t,e){switch(n){case 0:return e?(!this.c&&(this.c=new wsn(this,0)),this.c):(!this.c&&(this.c=new wsn(this,0)),this.c.b);case 1:return e?(!this.c&&(this.c=new wsn(this,0)),uG(T2(this.c,(uVn(),FBt)),160)):(!this.c&&(this.c=new wsn(this,0)),uG(uG(T2(this.c,(uVn(),FBt)),160),220)).Vl();case 2:return e?(!this.b&&(this.b=new wsn(this,2)),this.b):(!this.b&&(this.b=new wsn(this,2)),this.b.b)}return $tn(this,n-iQ(this.ii()),ern(2&this.j?(!this.k&&(this.k=new Ll),this.k).Nk():this.ii(),n),t,e)},uZn.Uh=function(n,t,e){switch(t){case 0:return!this.c&&(this.c=new wsn(this,0)),NHn(this.c,n,e);case 1:return(!this.c&&(this.c=new wsn(this,0)),uG(uG(T2(this.c,(uVn(),FBt)),160),71)).Xk(n,e);case 2:return!this.b&&(this.b=new wsn(this,2)),NHn(this.b,n,e)}return uG(ern(2&this.j?(!this.k&&(this.k=new Ll),this.k).Nk():this.ii(),t),69).wk().Ak(this,Wen(this),t-iQ(this.ii()),n,e)},uZn.Wh=function(n){switch(n){case 0:return!!this.c&&0!=this.c.i;case 1:return!(!this.c&&(this.c=new wsn(this,0)),uG(T2(this.c,(uVn(),FBt)),160)).dc();case 2:return!!this.b&&0!=this.b.i}return l5(this,n-iQ(this.ii()),ern(2&this.j?(!this.k&&(this.k=new Ll),this.k).Nk():this.ii(),n))},uZn.bi=function(n,t){switch(n){case 0:return!this.c&&(this.c=new wsn(this,0)),void cW(this.c,t);case 1:return void(!this.c&&(this.c=new wsn(this,0)),uG(uG(T2(this.c,(uVn(),FBt)),160),220)).Wb(t);case 2:return!this.b&&(this.b=new wsn(this,2)),void cW(this.b,t)}lpn(this,n-iQ(this.ii()),ern(2&this.j?(!this.k&&(this.k=new Ll),this.k).Nk():this.ii(),n),t)},uZn.ii=function(){return uVn(),KBt},uZn.ki=function(n){switch(n){case 0:return!this.c&&(this.c=new wsn(this,0)),void Czn(this.c);case 1:return void(!this.c&&(this.c=new wsn(this,0)),uG(T2(this.c,(uVn(),FBt)),160)).$b();case 2:return!this.b&&(this.b=new wsn(this,2)),void Czn(this.b)}sdn(this,n-iQ(this.ii()),ern(2&this.j?(!this.k&&(this.k=new Ll),this.k).Nk():this.ii(),n))},uZn.Ib=function(){var n;return 4&this.j?vxn(this):((n=new fx(vxn(this))).a+=" (mixed: ",zA(n,this.c),n.a+=", anyAttribute: ",zA(n,this.b),n.a+=")",n.a)},zW(kct,"AnyTypeImpl",844),sDn(681,516,{110:1,94:1,93:1,58:1,54:1,99:1,2119:1,681:1},Uh),uZn.Lh=function(n,t,e){switch(n){case 0:return this.a;case 1:return this.b}return $tn(this,n-iQ((uVn(),JBt)),ern(2&this.j?(!this.k&&(this.k=new Ll),this.k).Nk():JBt,n),t,e)},uZn.Wh=function(n){switch(n){case 0:return null!=this.a;case 1:return null!=this.b}return l5(this,n-iQ((uVn(),JBt)),ern(2&this.j?(!this.k&&(this.k=new Ll),this.k).Nk():JBt,n))},uZn.bi=function(n,t){switch(n){case 0:return void jw(this,mK(t));case 1:return void Sw(this,mK(t))}lpn(this,n-iQ((uVn(),JBt)),ern(2&this.j?(!this.k&&(this.k=new Ll),this.k).Nk():JBt,n),t)},uZn.ii=function(){return uVn(),JBt},uZn.ki=function(n){switch(n){case 0:return void(this.a=null);case 1:return void(this.b=null)}sdn(this,n-iQ((uVn(),JBt)),ern(2&this.j?(!this.k&&(this.k=new Ll),this.k).Nk():JBt,n))},uZn.Ib=function(){var n;return 4&this.j?vxn(this):((n=new fx(vxn(this))).a+=" (data: ",VA(n,this.a),n.a+=", target: ",VA(n,this.b),n.a+=")",n.a)},uZn.a=null,uZn.b=null,zW(kct,"ProcessingInstructionImpl",681),sDn(682,844,{110:1,94:1,93:1,58:1,54:1,99:1,857:1,2120:1,682:1},ry),uZn.Lh=function(n,t,e){switch(n){case 0:return e?(!this.c&&(this.c=new wsn(this,0)),this.c):(!this.c&&(this.c=new wsn(this,0)),this.c.b);case 1:return e?(!this.c&&(this.c=new wsn(this,0)),uG(T2(this.c,(uVn(),FBt)),160)):(!this.c&&(this.c=new wsn(this,0)),uG(uG(T2(this.c,(uVn(),FBt)),160),220)).Vl();case 2:return e?(!this.b&&(this.b=new wsn(this,2)),this.b):(!this.b&&(this.b=new wsn(this,2)),this.b.b);case 3:return!this.c&&(this.c=new wsn(this,0)),mK(dXn(this.c,(uVn(),nHt),!0));case 4:return g_(this.a,(!this.c&&(this.c=new wsn(this,0)),mK(dXn(this.c,(uVn(),nHt),!0))));case 5:return this.a}return $tn(this,n-iQ((uVn(),ZBt)),ern(2&this.j?(!this.k&&(this.k=new Ll),this.k).Nk():ZBt,n),t,e)},uZn.Wh=function(n){switch(n){case 0:return!!this.c&&0!=this.c.i;case 1:return!(!this.c&&(this.c=new wsn(this,0)),uG(T2(this.c,(uVn(),FBt)),160)).dc();case 2:return!!this.b&&0!=this.b.i;case 3:return!this.c&&(this.c=new wsn(this,0)),null!=mK(dXn(this.c,(uVn(),nHt),!0));case 4:return null!=g_(this.a,(!this.c&&(this.c=new wsn(this,0)),mK(dXn(this.c,(uVn(),nHt),!0))));case 5:return!!this.a}return l5(this,n-iQ((uVn(),ZBt)),ern(2&this.j?(!this.k&&(this.k=new Ll),this.k).Nk():ZBt,n))},uZn.bi=function(n,t){switch(n){case 0:return!this.c&&(this.c=new wsn(this,0)),void cW(this.c,t);case 1:return void(!this.c&&(this.c=new wsn(this,0)),uG(uG(T2(this.c,(uVn(),FBt)),160),220)).Wb(t);case 2:return!this.b&&(this.b=new wsn(this,2)),void cW(this.b,t);case 3:return void m4(this,mK(t));case 4:return void m4(this,d_(this.a,t));case 5:return void Ew(this,uG(t,156))}lpn(this,n-iQ((uVn(),ZBt)),ern(2&this.j?(!this.k&&(this.k=new Ll),this.k).Nk():ZBt,n),t)},uZn.ii=function(){return uVn(),ZBt},uZn.ki=function(n){switch(n){case 0:return!this.c&&(this.c=new wsn(this,0)),void Czn(this.c);case 1:return void(!this.c&&(this.c=new wsn(this,0)),uG(T2(this.c,(uVn(),FBt)),160)).$b();case 2:return!this.b&&(this.b=new wsn(this,2)),void Czn(this.b);case 3:return!this.c&&(this.c=new wsn(this,0)),void BXn(this.c,(uVn(),nHt),null);case 4:return void m4(this,d_(this.a,null));case 5:return void(this.a=null)}sdn(this,n-iQ((uVn(),ZBt)),ern(2&this.j?(!this.k&&(this.k=new Ll),this.k).Nk():ZBt,n))},zW(kct,"SimpleAnyTypeImpl",682),sDn(683,516,{110:1,94:1,93:1,58:1,54:1,99:1,2121:1,683:1},cy),uZn.Lh=function(n,t,e){switch(n){case 0:return e?(!this.a&&(this.a=new wsn(this,0)),this.a):(!this.a&&(this.a=new wsn(this,0)),this.a.b);case 1:return e?(!this.b&&(this.b=new ltn((YYn(),H_t),wBt,this,1)),this.b):(!this.b&&(this.b=new ltn((YYn(),H_t),wBt,this,1)),Tnn(this.b));case 2:return e?(!this.c&&(this.c=new ltn((YYn(),H_t),wBt,this,2)),this.c):(!this.c&&(this.c=new ltn((YYn(),H_t),wBt,this,2)),Tnn(this.c));case 3:return!this.a&&(this.a=new wsn(this,0)),T2(this.a,(uVn(),iHt));case 4:return!this.a&&(this.a=new wsn(this,0)),T2(this.a,(uVn(),rHt));case 5:return!this.a&&(this.a=new wsn(this,0)),T2(this.a,(uVn(),aHt));case 6:return!this.a&&(this.a=new wsn(this,0)),T2(this.a,(uVn(),oHt))}return $tn(this,n-iQ((uVn(),eHt)),ern(2&this.j?(!this.k&&(this.k=new Ll),this.k).Nk():eHt,n),t,e)},uZn.Uh=function(n,t,e){switch(t){case 0:return!this.a&&(this.a=new wsn(this,0)),NHn(this.a,n,e);case 1:return!this.b&&(this.b=new ltn((YYn(),H_t),wBt,this,1)),G_(this.b,n,e);case 2:return!this.c&&(this.c=new ltn((YYn(),H_t),wBt,this,2)),G_(this.c,n,e);case 5:return!this.a&&(this.a=new wsn(this,0)),rF(T2(this.a,(uVn(),aHt)),n,e)}return uG(ern(2&this.j?(!this.k&&(this.k=new Ll),this.k).Nk():(uVn(),eHt),t),69).wk().Ak(this,Wen(this),t-iQ((uVn(),eHt)),n,e)},uZn.Wh=function(n){switch(n){case 0:return!!this.a&&0!=this.a.i;case 1:return!!this.b&&0!=this.b.f;case 2:return!!this.c&&0!=this.c.f;case 3:return!this.a&&(this.a=new wsn(this,0)),!$A(T2(this.a,(uVn(),iHt)));case 4:return!this.a&&(this.a=new wsn(this,0)),!$A(T2(this.a,(uVn(),rHt)));case 5:return!this.a&&(this.a=new wsn(this,0)),!$A(T2(this.a,(uVn(),aHt)));case 6:return!this.a&&(this.a=new wsn(this,0)),!$A(T2(this.a,(uVn(),oHt)))}return l5(this,n-iQ((uVn(),eHt)),ern(2&this.j?(!this.k&&(this.k=new Ll),this.k).Nk():eHt,n))},uZn.bi=function(n,t){switch(n){case 0:return!this.a&&(this.a=new wsn(this,0)),void cW(this.a,t);case 1:return!this.b&&(this.b=new ltn((YYn(),H_t),wBt,this,1)),void Jun(this.b,t);case 2:return!this.c&&(this.c=new ltn((YYn(),H_t),wBt,this,2)),void Jun(this.c,t);case 3:return!this.a&&(this.a=new wsn(this,0)),Zv(T2(this.a,(uVn(),iHt))),!this.a&&(this.a=new wsn(this,0)),void K$(T2(this.a,iHt),uG(t,16));case 4:return!this.a&&(this.a=new wsn(this,0)),Zv(T2(this.a,(uVn(),rHt))),!this.a&&(this.a=new wsn(this,0)),void K$(T2(this.a,rHt),uG(t,16));case 5:return!this.a&&(this.a=new wsn(this,0)),Zv(T2(this.a,(uVn(),aHt))),!this.a&&(this.a=new wsn(this,0)),void K$(T2(this.a,aHt),uG(t,16));case 6:return!this.a&&(this.a=new wsn(this,0)),Zv(T2(this.a,(uVn(),oHt))),!this.a&&(this.a=new wsn(this,0)),void K$(T2(this.a,oHt),uG(t,16))}lpn(this,n-iQ((uVn(),eHt)),ern(2&this.j?(!this.k&&(this.k=new Ll),this.k).Nk():eHt,n),t)},uZn.ii=function(){return uVn(),eHt},uZn.ki=function(n){switch(n){case 0:return!this.a&&(this.a=new wsn(this,0)),void Czn(this.a);case 1:return!this.b&&(this.b=new ltn((YYn(),H_t),wBt,this,1)),void this.b.c.$b();case 2:return!this.c&&(this.c=new ltn((YYn(),H_t),wBt,this,2)),void this.c.c.$b();case 3:return!this.a&&(this.a=new wsn(this,0)),void Zv(T2(this.a,(uVn(),iHt)));case 4:return!this.a&&(this.a=new wsn(this,0)),void Zv(T2(this.a,(uVn(),rHt)));case 5:return!this.a&&(this.a=new wsn(this,0)),void Zv(T2(this.a,(uVn(),aHt)));case 6:return!this.a&&(this.a=new wsn(this,0)),void Zv(T2(this.a,(uVn(),oHt)))}sdn(this,n-iQ((uVn(),eHt)),ern(2&this.j?(!this.k&&(this.k=new Ll),this.k).Nk():eHt,n))},uZn.Ib=function(){var n;return 4&this.j?vxn(this):((n=new fx(vxn(this))).a+=" (mixed: ",zA(n,this.a),n.a+=")",n.a)},zW(kct,"XMLTypeDocumentRootImpl",683),sDn(2028,720,{110:1,94:1,93:1,480:1,155:1,58:1,114:1,54:1,99:1,158:1,119:1,120:1,2122:1},Nh),uZn.ri=function(n,t){switch(n.hk()){case 7:case 8:case 9:case 10:case 16:case 22:case 23:case 24:case 25:case 26:case 32:case 33:case 34:case 36:case 37:case 44:case 45:case 50:case 51:case 53:case 55:case 56:case 57:case 58:case 60:case 61:case 4:return null==t?null:cpn(t);case 19:case 28:case 29:case 35:case 38:case 39:case 41:case 46:case 52:case 54:case 5:return mK(t);case 6:return lK(uG(t,195));case 12:case 47:case 49:case 11:return cWn(this,n,t);case 13:return null==t?null:zXn(uG(t,247));case 15:case 14:return null==t?null:MW(uM(pK(t)));case 17:return oPn((uVn(),t));case 18:return oPn(t);case 21:case 20:return null==t?null:TW(uG(t,161).a);case 27:return bK(uG(t,195));case 30:return STn((uVn(),uG(t,15)));case 31:return STn(uG(t,15));case 40:return dK((uVn(),t));case 42:return uPn((uVn(),t));case 43:return uPn(t);case 59:case 48:return wK((uVn(),t));default:throw hv(new vM(tet+n.xe()+eet))}},uZn.si=function(n){var t;switch(-1==n.G&&(n.G=(t=Hrn(n))?Hyn(t.vi(),n):-1),n.G){case 0:return new iy;case 1:return new Uh;case 2:return new ry;case 3:return new cy;default:throw hv(new vM(cet+n.zb+eet))}},uZn.ti=function(n,t){var e,i,r,c,a,o,u,s,h,f,l,b,w,d,g,p;switch(n.hk()){case 5:case 52:case 4:return t;case 6:return syn(t);case 8:case 7:return null==t?null:MPn(t);case 9:return null==t?null:Ben(mUn((i=yXn(t,!0)).length>0&&(s3(0,i.length),43==i.charCodeAt(0))?(s3(1,i.length+1),i.substr(1)):i,-128,127)<<24>>24);case 10:return null==t?null:Ben(mUn((r=yXn(t,!0)).length>0&&(s3(0,r.length),43==r.charCodeAt(0))?(s3(1,r.length+1),r.substr(1)):r,-128,127)<<24>>24);case 11:return mK(cYn(this,(uVn(),HBt),t));case 12:return mK(cYn(this,(uVn(),UBt),t));case 13:return null==t?null:new Wj(yXn(t,!0));case 15:case 14:return iRn(t);case 16:return mK(cYn(this,(uVn(),GBt),t));case 17:return bvn((uVn(),t));case 18:return bvn(t);case 28:case 29:case 35:case 38:case 39:case 41:case 54:case 19:return yXn(t,!0);case 21:case 20:return vRn(t);case 22:return mK(cYn(this,(uVn(),qBt),t));case 23:return mK(cYn(this,(uVn(),XBt),t));case 24:return mK(cYn(this,(uVn(),zBt),t));case 25:return mK(cYn(this,(uVn(),VBt),t));case 26:return mK(cYn(this,(uVn(),WBt),t));case 27:return Ckn(t);case 30:return wvn((uVn(),t));case 31:return wvn(t);case 32:return null==t?null:xwn(mUn((h=yXn(t,!0)).length>0&&(s3(0,h.length),43==h.charCodeAt(0))?(s3(1,h.length+1),h.substr(1)):h,j1n,vZn));case 33:return null==t?null:new PN((f=yXn(t,!0)).length>0&&(s3(0,f.length),43==f.charCodeAt(0))?(s3(1,f.length+1),f.substr(1)):f);case 34:return null==t?null:xwn(mUn((l=yXn(t,!0)).length>0&&(s3(0,l.length),43==l.charCodeAt(0))?(s3(1,l.length+1),l.substr(1)):l,j1n,vZn));case 36:return null==t?null:Hvn(tJn((b=yXn(t,!0)).length>0&&(s3(0,b.length),43==b.charCodeAt(0))?(s3(1,b.length+1),b.substr(1)):b));case 37:return null==t?null:Hvn(tJn((w=yXn(t,!0)).length>0&&(s3(0,w.length),43==w.charCodeAt(0))?(s3(1,w.length+1),w.substr(1)):w));case 40:return nTn((uVn(),t));case 42:return dvn((uVn(),t));case 43:return dvn(t);case 44:return null==t?null:new PN((d=yXn(t,!0)).length>0&&(s3(0,d.length),43==d.charCodeAt(0))?(s3(1,d.length+1),d.substr(1)):d);case 45:return null==t?null:new PN((g=yXn(t,!0)).length>0&&(s3(0,g.length),43==g.charCodeAt(0))?(s3(1,g.length+1),g.substr(1)):g);case 46:return yXn(t,!1);case 47:return mK(cYn(this,(uVn(),QBt),t));case 59:case 48:return ZMn((uVn(),t));case 49:return mK(cYn(this,(uVn(),YBt),t));case 50:return null==t?null:Rwn(mUn((p=yXn(t,!0)).length>0&&(s3(0,p.length),43==p.charCodeAt(0))?(s3(1,p.length+1),p.substr(1)):p,xrt,32767)<<16>>16);case 51:return null==t?null:Rwn(mUn((c=yXn(t,!0)).length>0&&(s3(0,c.length),43==c.charCodeAt(0))?(s3(1,c.length+1),c.substr(1)):c,xrt,32767)<<16>>16);case 53:return mK(cYn(this,(uVn(),tHt),t));case 55:return null==t?null:Rwn(mUn((a=yXn(t,!0)).length>0&&(s3(0,a.length),43==a.charCodeAt(0))?(s3(1,a.length+1),a.substr(1)):a,xrt,32767)<<16>>16);case 56:return null==t?null:Rwn(mUn((o=yXn(t,!0)).length>0&&(s3(0,o.length),43==o.charCodeAt(0))?(s3(1,o.length+1),o.substr(1)):o,xrt,32767)<<16>>16);case 57:return null==t?null:Hvn(tJn((u=yXn(t,!0)).length>0&&(s3(0,u.length),43==u.charCodeAt(0))?(s3(1,u.length+1),u.substr(1)):u));case 58:return null==t?null:Hvn(tJn((s=yXn(t,!0)).length>0&&(s3(0,s.length),43==s.charCodeAt(0))?(s3(1,s.length+1),s.substr(1)):s));case 60:return null==t?null:xwn(mUn((e=yXn(t,!0)).length>0&&(s3(0,e.length),43==e.charCodeAt(0))?(s3(1,e.length+1),e.substr(1)):e,j1n,vZn));case 61:return null==t?null:xwn(mUn(yXn(t,!0),j1n,vZn));default:throw hv(new vM(tet+n.xe()+eet))}},zW(kct,"XMLTypeFactoryImpl",2028),sDn(594,184,{110:1,94:1,93:1,155:1,197:1,58:1,241:1,114:1,54:1,99:1,158:1,184:1,119:1,120:1,690:1,2044:1,594:1},gJ),uZn.N=!1,uZn.O=!1;var dHt,gHt,pHt,mHt,vHt,kHt=!1;zW(kct,"XMLTypePackageImpl",594),sDn(1961,1,{851:1},$h),uZn.Kk=function(){return vGn(),qHt},zW(kct,"XMLTypePackageImpl/1",1961),sDn(1970,1,Wrt,Dh),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,zZn,2,n,6,1)},zW(kct,"XMLTypePackageImpl/10",1970),sDn(1971,1,Wrt,xh),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,zZn,2,n,6,1)},zW(kct,"XMLTypePackageImpl/11",1971),sDn(1972,1,Wrt,Rh),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,zZn,2,n,6,1)},zW(kct,"XMLTypePackageImpl/12",1972),sDn(1973,1,Wrt,Kh),uZn.fk=function(n){return FA(n)},uZn.gk=function(n){return Inn(fot,zZn,345,n,7,1)},zW(kct,"XMLTypePackageImpl/13",1973),sDn(1974,1,Wrt,Fh),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,zZn,2,n,6,1)},zW(kct,"XMLTypePackageImpl/14",1974),sDn(1975,1,Wrt,_h),uZn.fk=function(n){return F$(n,15)},uZn.gk=function(n){return Inn(yat,H3n,15,n,0,1)},zW(kct,"XMLTypePackageImpl/15",1975),sDn(1976,1,Wrt,Bh),uZn.fk=function(n){return F$(n,15)},uZn.gk=function(n){return Inn(yat,H3n,15,n,0,1)},zW(kct,"XMLTypePackageImpl/16",1976),sDn(1977,1,Wrt,Hh),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,zZn,2,n,6,1)},zW(kct,"XMLTypePackageImpl/17",1977),sDn(1978,1,Wrt,Gh),uZn.fk=function(n){return F$(n,161)},uZn.gk=function(n){return Inn(lot,zZn,161,n,0,1)},zW(kct,"XMLTypePackageImpl/18",1978),sDn(1979,1,Wrt,qh),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,zZn,2,n,6,1)},zW(kct,"XMLTypePackageImpl/19",1979),sDn(1962,1,Wrt,Xh),uZn.fk=function(n){return F$(n,857)},uZn.gk=function(n){return Inn(DBt,EZn,857,n,0,1)},zW(kct,"XMLTypePackageImpl/2",1962),sDn(1980,1,Wrt,zh),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,zZn,2,n,6,1)},zW(kct,"XMLTypePackageImpl/20",1980),sDn(1981,1,Wrt,Vh),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,zZn,2,n,6,1)},zW(kct,"XMLTypePackageImpl/21",1981),sDn(1982,1,Wrt,Wh),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,zZn,2,n,6,1)},zW(kct,"XMLTypePackageImpl/22",1982),sDn(1983,1,Wrt,Qh),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,zZn,2,n,6,1)},zW(kct,"XMLTypePackageImpl/23",1983),sDn(1984,1,Wrt,Jh),uZn.fk=function(n){return F$(n,195)},uZn.gk=function(n){return Inn(tUt,zZn,195,n,0,2)},zW(kct,"XMLTypePackageImpl/24",1984),sDn(1985,1,Wrt,Yh),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,zZn,2,n,6,1)},zW(kct,"XMLTypePackageImpl/25",1985),sDn(1986,1,Wrt,Zh),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,zZn,2,n,6,1)},zW(kct,"XMLTypePackageImpl/26",1986),sDn(1987,1,Wrt,nf),uZn.fk=function(n){return F$(n,15)},uZn.gk=function(n){return Inn(yat,H3n,15,n,0,1)},zW(kct,"XMLTypePackageImpl/27",1987),sDn(1988,1,Wrt,tf),uZn.fk=function(n){return F$(n,15)},uZn.gk=function(n){return Inn(yat,H3n,15,n,0,1)},zW(kct,"XMLTypePackageImpl/28",1988),sDn(1989,1,Wrt,ef),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,zZn,2,n,6,1)},zW(kct,"XMLTypePackageImpl/29",1989),sDn(1963,1,Wrt,rf),uZn.fk=function(n){return F$(n,681)},uZn.gk=function(n){return Inn(lHt,EZn,2119,n,0,1)},zW(kct,"XMLTypePackageImpl/3",1963),sDn(1990,1,Wrt,cf),uZn.fk=function(n){return F$(n,17)},uZn.gk=function(n){return Inn(dot,zZn,17,n,0,1)},zW(kct,"XMLTypePackageImpl/30",1990),sDn(1991,1,Wrt,af),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,zZn,2,n,6,1)},zW(kct,"XMLTypePackageImpl/31",1991),sDn(1992,1,Wrt,of),uZn.fk=function(n){return F$(n,168)},uZn.gk=function(n){return Inn(yot,zZn,168,n,0,1)},zW(kct,"XMLTypePackageImpl/32",1992),sDn(1993,1,Wrt,uf),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,zZn,2,n,6,1)},zW(kct,"XMLTypePackageImpl/33",1993),sDn(1994,1,Wrt,sf),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,zZn,2,n,6,1)},zW(kct,"XMLTypePackageImpl/34",1994),sDn(1995,1,Wrt,hf),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,zZn,2,n,6,1)},zW(kct,"XMLTypePackageImpl/35",1995),sDn(1996,1,Wrt,ff),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,zZn,2,n,6,1)},zW(kct,"XMLTypePackageImpl/36",1996),sDn(1997,1,Wrt,lf),uZn.fk=function(n){return F$(n,15)},uZn.gk=function(n){return Inn(yat,H3n,15,n,0,1)},zW(kct,"XMLTypePackageImpl/37",1997),sDn(1998,1,Wrt,bf),uZn.fk=function(n){return F$(n,15)},uZn.gk=function(n){return Inn(yat,H3n,15,n,0,1)},zW(kct,"XMLTypePackageImpl/38",1998),sDn(1999,1,Wrt,wf),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,zZn,2,n,6,1)},zW(kct,"XMLTypePackageImpl/39",1999),sDn(1964,1,Wrt,df),uZn.fk=function(n){return F$(n,682)},uZn.gk=function(n){return Inn(bHt,EZn,2120,n,0,1)},zW(kct,"XMLTypePackageImpl/4",1964),sDn(2e3,1,Wrt,gf),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,zZn,2,n,6,1)},zW(kct,"XMLTypePackageImpl/40",2e3),sDn(2001,1,Wrt,pf),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,zZn,2,n,6,1)},zW(kct,"XMLTypePackageImpl/41",2001),sDn(2002,1,Wrt,mf),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,zZn,2,n,6,1)},zW(kct,"XMLTypePackageImpl/42",2002),sDn(2003,1,Wrt,vf),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,zZn,2,n,6,1)},zW(kct,"XMLTypePackageImpl/43",2003),sDn(2004,1,Wrt,kf),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,zZn,2,n,6,1)},zW(kct,"XMLTypePackageImpl/44",2004),sDn(2005,1,Wrt,yf),uZn.fk=function(n){return F$(n,191)},uZn.gk=function(n){return Inn(Tot,zZn,191,n,0,1)},zW(kct,"XMLTypePackageImpl/45",2005),sDn(2006,1,Wrt,Mf),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,zZn,2,n,6,1)},zW(kct,"XMLTypePackageImpl/46",2006),sDn(2007,1,Wrt,Tf),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,zZn,2,n,6,1)},zW(kct,"XMLTypePackageImpl/47",2007),sDn(2008,1,Wrt,jf),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,zZn,2,n,6,1)},zW(kct,"XMLTypePackageImpl/48",2008),sDn(2009,1,Wrt,Ef),uZn.fk=function(n){return F$(n,191)},uZn.gk=function(n){return Inn(Tot,zZn,191,n,0,1)},zW(kct,"XMLTypePackageImpl/49",2009),sDn(1965,1,Wrt,Sf),uZn.fk=function(n){return F$(n,683)},uZn.gk=function(n){return Inn(wHt,EZn,2121,n,0,1)},zW(kct,"XMLTypePackageImpl/5",1965),sDn(2010,1,Wrt,Pf),uZn.fk=function(n){return F$(n,168)},uZn.gk=function(n){return Inn(yot,zZn,168,n,0,1)},zW(kct,"XMLTypePackageImpl/50",2010),sDn(2011,1,Wrt,Cf),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,zZn,2,n,6,1)},zW(kct,"XMLTypePackageImpl/51",2011),sDn(2012,1,Wrt,If),uZn.fk=function(n){return F$(n,17)},uZn.gk=function(n){return Inn(dot,zZn,17,n,0,1)},zW(kct,"XMLTypePackageImpl/52",2012),sDn(1966,1,Wrt,Of),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,zZn,2,n,6,1)},zW(kct,"XMLTypePackageImpl/6",1966),sDn(1967,1,Wrt,Af),uZn.fk=function(n){return F$(n,195)},uZn.gk=function(n){return Inn(tUt,zZn,195,n,0,2)},zW(kct,"XMLTypePackageImpl/7",1967),sDn(1968,1,Wrt,Lf),uZn.fk=function(n){return KA(n)},uZn.gk=function(n){return Inn(cot,zZn,485,n,8,1)},zW(kct,"XMLTypePackageImpl/8",1968),sDn(1969,1,Wrt,Nf),uZn.fk=function(n){return F$(n,222)},uZn.gk=function(n){return Inn(uot,zZn,222,n,0,1)},zW(kct,"XMLTypePackageImpl/9",1969),sDn(55,63,S1n,CM),zW(Xct,"RegEx/ParseException",55),sDn(836,1,{},$f),uZn.bm=function(n){return n16*e)throw hv(new CM(rZn((t$(),Cit))));e=16*e+r}if(125!=this.a)throw hv(new CM(rZn((t$(),Iit))));if(e>zct)throw hv(new CM(rZn((t$(),Oit))));n=e}else{if(r=0,0!=this.c||(r=CMn(this.a))<0)throw hv(new CM(rZn((t$(),Pit))));if(e=r,EYn(this),0!=this.c||(r=CMn(this.a))<0)throw hv(new CM(rZn((t$(),Pit))));n=e=16*e+r}break;case 117:if(i=0,EYn(this),0!=this.c||(i=CMn(this.a))<0)throw hv(new CM(rZn((t$(),Pit))));if(t=i,EYn(this),0!=this.c||(i=CMn(this.a))<0)throw hv(new CM(rZn((t$(),Pit))));if(t=16*t+i,EYn(this),0!=this.c||(i=CMn(this.a))<0)throw hv(new CM(rZn((t$(),Pit))));if(t=16*t+i,EYn(this),0!=this.c||(i=CMn(this.a))<0)throw hv(new CM(rZn((t$(),Pit))));n=t=16*t+i;break;case 118:if(EYn(this),0!=this.c||(i=CMn(this.a))<0)throw hv(new CM(rZn((t$(),Pit))));if(t=i,EYn(this),0!=this.c||(i=CMn(this.a))<0)throw hv(new CM(rZn((t$(),Pit))));if(t=16*t+i,EYn(this),0!=this.c||(i=CMn(this.a))<0)throw hv(new CM(rZn((t$(),Pit))));if(t=16*t+i,EYn(this),0!=this.c||(i=CMn(this.a))<0)throw hv(new CM(rZn((t$(),Pit))));if(t=16*t+i,EYn(this),0!=this.c||(i=CMn(this.a))<0)throw hv(new CM(rZn((t$(),Pit))));if(t=16*t+i,EYn(this),0!=this.c||(i=CMn(this.a))<0)throw hv(new CM(rZn((t$(),Pit))));if((t=16*t+i)>zct)throw hv(new CM(rZn((t$(),"parser.descappe.4"))));n=t;break;case 65:case 90:case 122:throw hv(new CM(rZn((t$(),Ait))))}return n},uZn.dm=function(n){var t;switch(n){case 100:t=32&~this.e?(QYn(),CHt):kJn("Nd",!0);break;case 68:t=32&~this.e?(QYn(),NHt):kJn("Nd",!1);break;case 119:t=32&~this.e?(QYn(),HHt):kJn("IsWord",!0);break;case 87:t=32&~this.e?(QYn(),DHt):kJn("IsWord",!1);break;case 115:t=32&~this.e?(QYn(),RHt):kJn("IsSpace",!0);break;case 83:t=32&~this.e?(QYn(),$Ht):kJn("IsSpace",!1);break;default:throw hv(new Ky(Vct+n.toString(16)))}return t},uZn.em=function(n){var t,e,i,r,c,a,o,u,s,h,f;for(this.b=1,EYn(this),t=null,0==this.c&&94==this.a?(EYn(this),n?(QYn(),QYn(),s=new K3(5)):(QYn(),QYn(),HFn(t=new K3(4),0,zct),s=new K3(4))):(QYn(),QYn(),s=new K3(4)),r=!0;1!=(f=this.c)&&(0!=f||93!=this.a||r);){if(r=!1,e=this.a,i=!1,10==f)switch(e){case 100:case 68:case 119:case 87:case 115:case 83:TXn(s,this.dm(e)),i=!0;break;case 105:case 73:case 99:case 67:(e=this.um(s,e))<0&&(i=!0);break;case 112:case 80:if(!(h=PNn(this,e)))throw hv(new CM(rZn((t$(),git))));TXn(s,h),i=!0;break;default:e=this.cm()}else if(20==f){if((c=aR(this.i,58,this.d))<0)throw hv(new CM(rZn((t$(),pit))));if(a=!0,94==VJ(this.i,this.d)&&(++this.d,a=!1),!(o=itn(r1(this.i,this.d,c),a,!(512&~this.e))))throw hv(new CM(rZn((t$(),vit))));if(TXn(s,o),i=!0,c+1>=this.j||93!=VJ(this.i,c+1))throw hv(new CM(rZn((t$(),pit))));this.d=c+2}if(EYn(this),!i)if(0!=this.c||45!=this.a)HFn(s,e,e);else{if(EYn(this),1==(f=this.c))throw hv(new CM(rZn((t$(),mit))));0==f&&93==this.a?(HFn(s,e,e),HFn(s,45,45)):(u=this.a,10==f&&(u=this.cm()),EYn(this),HFn(s,e,u))}(this.e&w1n)==w1n&&0==this.c&&44==this.a&&EYn(this)}if(1==this.c)throw hv(new CM(rZn((t$(),mit))));return t&&(lWn(t,s),s=t),pxn(s),uzn(s),this.b=0,EYn(this),s},uZn.fm=function(){var n,t,e,i;for(e=this.em(!1);7!=(i=this.c);){if(n=this.a,(0!=i||45!=n&&38!=n)&&4!=i)throw hv(new CM(rZn((t$(),Eit))));if(EYn(this),9!=this.c)throw hv(new CM(rZn((t$(),jit))));if(t=this.em(!1),4==i)TXn(e,t);else if(45==n)lWn(e,t);else{if(38!=n)throw hv(new Ky("ASSERT"));GVn(e,t)}}return EYn(this),e},uZn.gm=function(){var n,t;return n=this.a-48,QYn(),QYn(),t=new F1(12,null,n),!this.g&&(this.g=new ck),zv(this.g,new Wm(n)),EYn(this),t},uZn.hm=function(){return EYn(this),QYn(),KHt},uZn.im=function(){return EYn(this),QYn(),xHt},uZn.jm=function(){throw hv(new CM(rZn((t$(),Lit))))},uZn.km=function(){throw hv(new CM(rZn((t$(),Lit))))},uZn.lm=function(){return EYn(this),jln()},uZn.mm=function(){return EYn(this),QYn(),_Ht},uZn.nm=function(){return EYn(this),QYn(),UHt},uZn.om=function(){var n;if(this.d>=this.j||64!=(65504&(n=VJ(this.i,this.d++))))throw hv(new CM(rZn((t$(),lit))));return EYn(this),QYn(),QYn(),new IX(0,n-64)},uZn.pm=function(){return EYn(this),VGn()},uZn.qm=function(){return EYn(this),QYn(),GHt},uZn.rm=function(){var n;return QYn(),QYn(),n=new IX(0,105),EYn(this),n},uZn.sm=function(){return EYn(this),QYn(),BHt},uZn.tm=function(){return EYn(this),QYn(),FHt},uZn.um=function(n,t){return this.cm()},uZn.vm=function(){return EYn(this),QYn(),AHt},uZn.wm=function(){var n,t,e,i,r;if(this.d+1>=this.j)throw hv(new CM(rZn((t$(),sit))));if(i=-1,t=null,49<=(n=VJ(this.i,this.d))&&n<=57){if(i=n-48,!this.g&&(this.g=new ck),zv(this.g,new Wm(i)),++this.d,41!=VJ(this.i,this.d))throw hv(new CM(rZn((t$(),ait))));++this.d}else switch(63==n&&--this.d,EYn(this),(t=eYn(this)).e){case 20:case 21:case 22:case 23:break;case 8:if(7!=this.c)throw hv(new CM(rZn((t$(),ait))));break;default:throw hv(new CM(rZn((t$(),hit))))}if(EYn(this),e=null,2==(r=Evn(this)).e){if(2!=r.Pm())throw hv(new CM(rZn((t$(),fit))));e=r.Lm(1),r=r.Lm(0)}if(7!=this.c)throw hv(new CM(rZn((t$(),ait))));return EYn(this),QYn(),QYn(),new bin(i,t,r,e)},uZn.xm=function(){return EYn(this),QYn(),LHt},uZn.ym=function(){var n;if(EYn(this),n=jV(24,Evn(this)),7!=this.c)throw hv(new CM(rZn((t$(),ait))));return EYn(this),n},uZn.zm=function(){var n;if(EYn(this),n=jV(20,Evn(this)),7!=this.c)throw hv(new CM(rZn((t$(),ait))));return EYn(this),n},uZn.Am=function(){var n;if(EYn(this),n=jV(22,Evn(this)),7!=this.c)throw hv(new CM(rZn((t$(),ait))));return EYn(this),n},uZn.Bm=function(){var n,t,e,i,r;for(n=0,e=0,t=-1;this.d=this.j)throw hv(new CM(rZn((t$(),oit))));if(45==t){for(++this.d;this.d=this.j)throw hv(new CM(rZn((t$(),oit))))}if(58==t){if(++this.d,EYn(this),i=GW(Evn(this),n,e),7!=this.c)throw hv(new CM(rZn((t$(),ait))));EYn(this)}else{if(41!=t)throw hv(new CM(rZn((t$(),uit))));++this.d,EYn(this),i=GW(Evn(this),n,e)}return i},uZn.Cm=function(){var n;if(EYn(this),n=jV(21,Evn(this)),7!=this.c)throw hv(new CM(rZn((t$(),ait))));return EYn(this),n},uZn.Dm=function(){var n;if(EYn(this),n=jV(23,Evn(this)),7!=this.c)throw hv(new CM(rZn((t$(),ait))));return EYn(this),n},uZn.Em=function(){var n,t;if(EYn(this),n=this.f++,t=EV(Evn(this),n),7!=this.c)throw hv(new CM(rZn((t$(),ait))));return EYn(this),t},uZn.Fm=function(){var n;if(EYn(this),n=EV(Evn(this),0),7!=this.c)throw hv(new CM(rZn((t$(),ait))));return EYn(this),n},uZn.Gm=function(n){return EYn(this),5==this.c?(EYn(this),CX(n,(QYn(),QYn(),new n8(9,n)))):CX(n,(QYn(),QYn(),new n8(3,n)))},uZn.Hm=function(n){var t;return EYn(this),QYn(),QYn(),t=new QN(2),5==this.c?(EYn(this),vzn(t,OHt),vzn(t,n)):(vzn(t,n),vzn(t,OHt)),t},uZn.Im=function(n){return EYn(this),5==this.c?(EYn(this),QYn(),QYn(),new n8(9,n)):(QYn(),QYn(),new n8(3,n))},uZn.a=0,uZn.b=0,uZn.c=0,uZn.d=0,uZn.e=0,uZn.f=1,uZn.g=null,uZn.j=0,zW(Xct,"RegEx/RegexParser",836),sDn(1947,836,{},ay),uZn.bm=function(n){return!1},uZn.cm=function(){return R_n(this)},uZn.dm=function(n){return yUn(n)},uZn.em=function(n){return PYn(this)},uZn.fm=function(){throw hv(new CM(rZn((t$(),Lit))))},uZn.gm=function(){throw hv(new CM(rZn((t$(),Lit))))},uZn.hm=function(){throw hv(new CM(rZn((t$(),Lit))))},uZn.im=function(){throw hv(new CM(rZn((t$(),Lit))))},uZn.jm=function(){return EYn(this),yUn(67)},uZn.km=function(){return EYn(this),yUn(73)},uZn.lm=function(){throw hv(new CM(rZn((t$(),Lit))))},uZn.mm=function(){throw hv(new CM(rZn((t$(),Lit))))},uZn.nm=function(){throw hv(new CM(rZn((t$(),Lit))))},uZn.om=function(){return EYn(this),yUn(99)},uZn.pm=function(){throw hv(new CM(rZn((t$(),Lit))))},uZn.qm=function(){throw hv(new CM(rZn((t$(),Lit))))},uZn.rm=function(){return EYn(this),yUn(105)},uZn.sm=function(){throw hv(new CM(rZn((t$(),Lit))))},uZn.tm=function(){throw hv(new CM(rZn((t$(),Lit))))},uZn.um=function(n,t){return TXn(n,yUn(t)),-1},uZn.vm=function(){return EYn(this),QYn(),QYn(),new IX(0,94)},uZn.wm=function(){throw hv(new CM(rZn((t$(),Lit))))},uZn.xm=function(){return EYn(this),QYn(),QYn(),new IX(0,36)},uZn.ym=function(){throw hv(new CM(rZn((t$(),Lit))))},uZn.zm=function(){throw hv(new CM(rZn((t$(),Lit))))},uZn.Am=function(){throw hv(new CM(rZn((t$(),Lit))))},uZn.Bm=function(){throw hv(new CM(rZn((t$(),Lit))))},uZn.Cm=function(){throw hv(new CM(rZn((t$(),Lit))))},uZn.Dm=function(){throw hv(new CM(rZn((t$(),Lit))))},uZn.Em=function(){var n;if(EYn(this),n=EV(Evn(this),0),7!=this.c)throw hv(new CM(rZn((t$(),ait))));return EYn(this),n},uZn.Fm=function(){throw hv(new CM(rZn((t$(),Lit))))},uZn.Gm=function(n){return EYn(this),CX(n,(QYn(),QYn(),new n8(3,n)))},uZn.Hm=function(n){var t;return EYn(this),QYn(),QYn(),vzn(t=new QN(2),n),vzn(t,OHt),t},uZn.Im=function(n){return EYn(this),QYn(),QYn(),new n8(3,n)};var yHt=null,MHt=null;zW(Xct,"RegEx/ParserForXMLSchema",1947),sDn(122,1,aat,Qm),uZn.Jm=function(n){throw hv(new Ky("Not supported."))},uZn.Km=function(){return-1},uZn.Lm=function(n){return null},uZn.Mm=function(){return null},uZn.Nm=function(n){},uZn.Om=function(n){},uZn.Pm=function(){return 0},uZn.Ib=function(){return this.Qm(0)},uZn.Qm=function(n){return 11==this.e?".":""},uZn.e=0;var THt,jHt,EHt,SHt,PHt,CHt,IHt,OHt,AHt,LHt,NHt,$Ht,DHt,xHt,RHt,KHt,FHt,_Ht,BHt,HHt,UHt,GHt,qHt,XHt,zHt=null,VHt=null,WHt=null,QHt=zW(Xct,"RegEx/Token",122);sDn(138,122,{3:1,138:1,122:1},K3),uZn.Qm=function(n){var t,e,i;if(4==this.e)if(this==IHt)e=".";else if(this==CHt)e="\\d";else if(this==HHt)e="\\w";else if(this==RHt)e="\\s";else{for((i=new zM).a+="[",t=0;t0&&(i.a+=","),this.b[t]===this.b[t+1]?VA(i,Mqn(this.b[t])):(VA(i,Mqn(this.b[t])),i.a+="-",VA(i,Mqn(this.b[t+1])));i.a+="]",e=i.a}else if(this==NHt)e="\\D";else if(this==DHt)e="\\W";else if(this==$Ht)e="\\S";else{for((i=new zM).a+="[^",t=0;t0&&(i.a+=","),this.b[t]===this.b[t+1]?VA(i,Mqn(this.b[t])):(VA(i,Mqn(this.b[t])),i.a+="-",VA(i,Mqn(this.b[t+1])));i.a+="]",e=i.a}return e},uZn.a=!1,uZn.c=!1,zW(Xct,"RegEx/RangeToken",138),sDn(592,1,{592:1},Wm),uZn.a=0,zW(Xct,"RegEx/RegexParser/ReferencePosition",592),sDn(591,1,{3:1,591:1},gE),uZn.Fb=function(n){var t;return null!=n&&!!F$(n,591)&&(t=uG(n,591),m_(this.b,t.b)&&this.a==t.a)},uZn.Hb=function(){return pln(this.b+"/"+XKn(this.a))},uZn.Ib=function(){return this.c.Qm(this.a)},uZn.a=0,zW(Xct,"RegEx/RegularExpression",591),sDn(228,122,aat,IX),uZn.Km=function(){return this.a},uZn.Qm=function(n){var t,e;switch(this.e){case 0:switch(this.a){case 124:case 42:case 43:case 63:case 40:case 41:case 46:case 91:case 123:case 92:e="\\"+jF(this.a&D1n);break;case 12:e="\\f";break;case 10:e="\\n";break;case 13:e="\\r";break;case 9:e="\\t";break;case 27:e="\\e";break;default:e=this.a>=P0n?"\\v"+r1(t="0"+(this.a>>>0).toString(16),t.length-6,t.length):""+jF(this.a&D1n)}break;case 8:e=this==AHt||this==LHt?""+jF(this.a&D1n):"\\"+jF(this.a&D1n);break;default:e=null}return e},uZn.a=0,zW(Xct,"RegEx/Token/CharToken",228),sDn(318,122,aat,n8),uZn.Lm=function(n){return this.a},uZn.Nm=function(n){this.b=n},uZn.Om=function(n){this.c=n},uZn.Pm=function(){return 1},uZn.Qm=function(n){var t;if(3==this.e)if(this.c<0&&this.b<0)t=this.a.Qm(n)+"*";else if(this.c==this.b)t=this.a.Qm(n)+"{"+this.c+"}";else if(this.c>=0&&this.b>=0)t=this.a.Qm(n)+"{"+this.c+","+this.b+"}";else{if(!(this.c>=0&&this.b<0))throw hv(new Ky("Token#toString(): CLOSURE "+this.c+TZn+this.b));t=this.a.Qm(n)+"{"+this.c+",}"}else if(this.c<0&&this.b<0)t=this.a.Qm(n)+"*?";else if(this.c==this.b)t=this.a.Qm(n)+"{"+this.c+"}?";else if(this.c>=0&&this.b>=0)t=this.a.Qm(n)+"{"+this.c+","+this.b+"}?";else{if(!(this.c>=0&&this.b<0))throw hv(new Ky("Token#toString(): NONGREEDYCLOSURE "+this.c+TZn+this.b));t=this.a.Qm(n)+"{"+this.c+",}?"}return t},uZn.b=0,uZn.c=0,zW(Xct,"RegEx/Token/ClosureToken",318),sDn(837,122,aat,eW),uZn.Lm=function(n){return 0==n?this.a:this.b},uZn.Pm=function(){return 2},uZn.Qm=function(n){return 3==this.b.e&&this.b.Lm(0)==this.a?this.a.Qm(n)+"+":9==this.b.e&&this.b.Lm(0)==this.a?this.a.Qm(n)+"+?":this.a.Qm(n)+""+this.b.Qm(n)},zW(Xct,"RegEx/Token/ConcatToken",837),sDn(1945,122,aat,bin),uZn.Lm=function(n){if(0==n)return this.d;if(1==n)return this.b;throw hv(new Ky("Internal Error: "+n))},uZn.Pm=function(){return this.b?2:1},uZn.Qm=function(n){var t;return t=this.c>0?"(?("+this.c+")":8==this.a.e?"(?("+this.a+")":"(?"+this.a,this.b?t+=this.d+"|"+this.b+")":t+=this.d+")",t},uZn.c=0,zW(Xct,"RegEx/Token/ConditionToken",1945),sDn(1946,122,aat,R3),uZn.Lm=function(n){return this.b},uZn.Pm=function(){return 1},uZn.Qm=function(n){return"(?"+(0==this.a?"":XKn(this.a))+(0==this.c?"":XKn(this.c))+":"+this.b.Qm(n)+")"},uZn.a=0,uZn.c=0,zW(Xct,"RegEx/Token/ModifierToken",1946),sDn(838,122,aat,PQ),uZn.Lm=function(n){return this.a},uZn.Pm=function(){return 1},uZn.Qm=function(n){var t;switch(t=null,this.e){case 6:t=0==this.b?"(?:"+this.a.Qm(n)+")":"("+this.a.Qm(n)+")";break;case 20:t="(?="+this.a.Qm(n)+")";break;case 21:t="(?!"+this.a.Qm(n)+")";break;case 22:t="(?<="+this.a.Qm(n)+")";break;case 23:t="(?"+this.a.Qm(n)+")"}return t},uZn.b=0,zW(Xct,"RegEx/Token/ParenToken",838),sDn(530,122,{3:1,122:1,530:1},F1),uZn.Mm=function(){return this.b},uZn.Qm=function(n){return 12==this.e?"\\"+this.a:Nxn(this.b)},uZn.a=0,zW(Xct,"RegEx/Token/StringToken",530),sDn(477,122,aat,QN),uZn.Jm=function(n){vzn(this,n)},uZn.Lm=function(n){return uG(DQ(this.a,n),122)},uZn.Pm=function(){return this.a?this.a.a.c.length:0},uZn.Qm=function(n){var t,e,i,r,c;if(1==this.e){if(2==this.a.a.c.length)t=uG(DQ(this.a,0),122),r=3==(e=uG(DQ(this.a,1),122)).e&&e.Lm(0)==t?t.Qm(n)+"+":9==e.e&&e.Lm(0)==t?t.Qm(n)+"+?":t.Qm(n)+""+e.Qm(n);else{for(c=new zM,i=0;i=this.c.b:this.a<=this.c.b},uZn.Sb=function(){return this.b>0},uZn.Tb=function(){return this.b},uZn.Vb=function(){return this.b-1},uZn.Qb=function(){throw hv(new TM(lat))},uZn.a=0,uZn.b=0,zW(sat,"ExclusiveRange/RangeIterator",258);var JHt=hJ(brt,"C"),YHt=hJ(grt,"I"),ZHt=hJ(dZn,"Z"),nUt=hJ(prt,"J"),tUt=hJ(lrt,"B"),eUt=hJ(wrt,"D"),iUt=hJ(drt,"F"),rUt=hJ(mrt,"S"),cUt=Iq("org.eclipse.elk.core.labels","ILabelManager"),aUt=Iq(Pet,"DiagnosticChain"),oUt=Iq(Jrt,"ResourceSet"),uUt=zW(Pet,"InvocationTargetException",null),sUt=(XM(),m9),hUt=hUt=zSn;Nan(bv),van("permProps",[[["locale","default"],[bat,"gecko1_8"]],[["locale","default"],[bat,"safari"]]]),hUt(null,"elk",null)}).call(this)}).call(this,void 0!==e.g?e.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],3:[function(n,t,e){"use strict";function i(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function r(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?n:t}function c(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}var a=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,e);var c=Object.assign({},t),a=!1;try{n.resolve("web-worker"),a=!0}catch(s){}if(t.workerUrl)if(a){var o=n("web-worker");c.workerFactory=function(n){return new o(n)}}else console.warn("Web worker requested but 'web-worker' package not installed. \nConsider installing the package or pass your own 'workerFactory' to ELK's constructor.\n... Falling back to non-web worker version.");if(!c.workerFactory){var u=n("./elk-worker.min.js").Worker;c.workerFactory=function(n){return new u(n)}}return r(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,c))}return c(e,t),e}(n("./elk-api.js").default);Object.defineProperty(t.exports,"__esModule",{value:!0}),t.exports=a,a.default=a},{"./elk-api.js":1,"./elk-worker.min.js":2,"web-worker":4}],4:[function(n,t,e){t.exports=Worker},{}]},{},[3])(3)},24104:(n,t,e)=>{"use strict";e.d(t,{diagram:()=>y});var i=e(35860),r=e(26312),c=e(88146),a=e(86079),o=e(62954);e(74353),e(16750),e(42838);const u=new o;let s={};const h={};let f={};const l=(n,t,e)=>{const i={TB:{in:{north:"north"},out:{south:"west",west:"east",east:"south"}},LR:{in:{west:"west"},out:{east:"south",south:"north",north:"east"}},RL:{in:{east:"east"},out:{west:"north",north:"south",south:"west"}},BT:{in:{south:"south"},out:{north:"east",east:"west",west:"north"}}};return i.TD=i.TB,i[e][t][n]},b=(n,t,e)=>{if(a.l.info("getNextPort",{node:n,edgeDirection:t,graphDirection:e}),!s[n])switch(e){case"TB":case"TD":s[n]={inPosition:"north",outPosition:"south"};break;case"BT":s[n]={inPosition:"south",outPosition:"north"};break;case"RL":s[n]={inPosition:"east",outPosition:"west"};break;case"LR":s[n]={inPosition:"west",outPosition:"east"}}const i="in"===t?s[n].inPosition:s[n].outPosition;return"in"===t?s[n].inPosition=l(s[n].inPosition,t,e):s[n].outPosition=l(s[n].outPosition,t,e),i},w=function(n,t,e,i){a.l.info("abc78 edges = ",n);const o=i.insert("g").attr("class","edgeLabels");let u,s,l={},w=t.db.getDirection();if(void 0!==n.defaultStyle){const t=(0,a.k)(n.defaultStyle);u=t.style,s=t.labelStyle}return n.forEach((function(t){const i="L-"+t.start+"-"+t.end;void 0===l[i]?(l[i]=0,a.l.info("abc78 new entry",i,l[i])):(l[i]++,a.l.info("abc78 new entry",i,l[i]));let d=i+"-"+l[i];a.l.info("abc78 new link id to be used is",i,d,l[i]);const g="LS-"+t.start,p="LE-"+t.end,m={style:"",labelStyle:""};switch(m.minlen=t.length||1,"arrow_open"===t.type?m.arrowhead="none":m.arrowhead="normal",m.arrowTypeStart="arrow_open",m.arrowTypeEnd="arrow_open",t.type){case"double_arrow_cross":m.arrowTypeStart="arrow_cross";case"arrow_cross":m.arrowTypeEnd="arrow_cross";break;case"double_arrow_point":m.arrowTypeStart="arrow_point";case"arrow_point":m.arrowTypeEnd="arrow_point";break;case"double_arrow_circle":m.arrowTypeStart="arrow_circle";case"arrow_circle":m.arrowTypeEnd="arrow_circle"}let v="",k="";switch(t.stroke){case"normal":v="fill:none;",void 0!==u&&(v=u),void 0!==s&&(k=s),m.thickness="normal",m.pattern="solid";break;case"dotted":m.thickness="normal",m.pattern="dotted",m.style="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":m.thickness="thick",m.pattern="solid",m.style="stroke-width: 3.5px;fill:none;"}if(void 0!==t.style){const n=(0,a.k)(t.style);v=n.style,k=n.labelStyle}m.style=m.style+=v,m.labelStyle=m.labelStyle+=k,void 0!==t.interpolate?m.curve=(0,a.n)(t.interpolate,r.lUB):void 0!==n.defaultInterpolate?m.curve=(0,a.n)(n.defaultInterpolate,r.lUB):m.curve=(0,a.n)(h.curve,r.lUB),void 0===t.text?void 0!==t.style&&(m.arrowheadStyle="fill: #333"):(m.arrowheadStyle="fill: #333",m.labelpos="c"),m.labelType=t.labelType,m.label=t.text.replace(a.e.lineBreakRegex,"\n"),void 0===t.style&&(m.style=m.style||"stroke: #333; stroke-width: 1.5px;fill:none;"),m.labelStyle=m.labelStyle.replace("color:","fill:"),m.id=d,m.classes="flowchart-link "+g+" "+p;const y=(0,c.f)(o,m),{source:M,target:T,sourceId:j,targetId:E}=((n,t)=>{let e=n.start,i=n.end;const r=e,c=i,a=f[e],o=f[i];return a&&o?("diamond"===a.type&&(e=`${e}-${b(e,"out",t)}`),"diamond"===o.type&&(i=`${i}-${b(i,"in",t)}`),{source:e,target:i,sourceId:r,targetId:c}):{source:e,target:i}})(t,w);a.l.debug("abc78 source and target",M,T),e.edges.push({id:"e"+t.start+t.end,sources:[M],targets:[T],sourceId:j,targetId:E,labelEl:y,labels:[{width:m.width,height:m.height,orgWidth:m.width,orgHeight:m.height,text:m.label,layoutOptions:{"edgeLabels.inline":"true","edgeLabels.placement":"CENTER"}}],edgeData:m})})),e},d=function(n,t,e){const i=((n,t,e)=>{const{parentById:i}=e,r=new Set;let c=n;for(;c;){if(r.add(c),c===t)return c;c=i[c]}for(c=t;c;){if(r.has(c))return c;c=i[c]}return"root"})(n,t,e);if(void 0===i||"root"===i)return{x:0,y:0};const r=f[i].offset;return{x:r.posX,y:r.posY}},g=function(n,t,e,i,a,o){const u=d(t.sourceId,t.targetId,a),s=t.sections[0].startPoint,h=t.sections[0].endPoint,f=(t.sections[0].bendPoints?t.sections[0].bendPoints:[]).map((n=>[n.x+u.x,n.y+u.y])),l=[[s.x+u.x,s.y+u.y],...f,[h.x+u.x,h.y+u.y]],{x:b,y:w}=(0,c.k)(t.edgeData),g=(0,r.n8j)().x(b).y(w).curve(r.lUB),p=n.insert("path").attr("d",g(l)).attr("class","path "+e.classes).attr("fill","none"),m=n.insert("g").attr("class","edgeLabel"),v=(0,r.Ltv)(m.node().appendChild(t.labelEl)),k=v.node().firstChild.getBoundingClientRect();v.attr("width",k.width),v.attr("height",k.height),m.attr("transform",`translate(${t.labels[0].x+u.x}, ${t.labels[0].y+u.y})`),function(n,t,e,i,r){let a="";i&&(a=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,a=a.replace(/\(/g,"\\("),a=a.replace(/\)/g,"\\)")),(0,c.m)(n,t,a,r,e)}(p,e,i.type,i.arrowMarkerAbsolute,o)},p=(n,t)=>{n.forEach((n=>{n.children||(n.children=[]);const e=t.childrenById[n.id];e&&e.forEach((t=>{n.children.push(f[t])})),p(n.children,t)}))},m=(n,t,e,i,r,c,o)=>{e.forEach((function(e){if(e)if(f[e.id].offset={posX:e.x+n,posY:e.y+t,x:n,y:t,depth:o,width:e.width,height:e.height},"group"===e.type){const i=r.insert("g").attr("class","subgraph");i.insert("rect").attr("class","subgraph subgraph-lvl-"+o%5+" node").attr("x",e.x+n).attr("y",e.y+t).attr("width",e.width).attr("height",e.height);const c=i.insert("g").attr("class","label"),u=(0,a.F)().flowchart.htmlLabels?e.labelData.width/2:0;c.attr("transform",`translate(${e.labels[0].x+n+e.x+u}, ${e.labels[0].y+t+e.y+3})`),c.node().appendChild(e.labelData.labelNode),a.l.info("Id (UGH)= ",e.type,e.labels)}else a.l.info("Id (UGH)= ",e.id),e.el.attr("transform",`translate(${e.x+n+e.width/2}, ${e.y+t+e.height/2})`)})),e.forEach((function(e){e&&"group"===e.type&&m(n+e.x,t+e.y,e.children,i,r,c,o+1)}))},v={getClasses:function(n,t){return a.l.info("Extracting classes"),t.db.getClasses()},draw:async function(n,t,e,i){var o;i.db.clear(),f={},s={},i.db.setGen("gen-2"),i.parser.parse(n);const h=(0,r.Ltv)("body").append("div").attr("style","height:400px").attr("id","cy");let l={id:"root",layoutOptions:{"elk.hierarchyHandling":"INCLUDE_CHILDREN","org.eclipse.elk.padding":"[top=100, left=100, bottom=110, right=110]","elk.layered.spacing.edgeNodeBetweenLayers":"30","elk.direction":"DOWN"},children:[],edges:[]};switch(a.l.info("Drawing flowchart using v3 renderer",u),i.db.getDirection()){case"BT":l.layoutOptions["elk.direction"]="UP";break;case"TB":l.layoutOptions["elk.direction"]="DOWN";break;case"LR":l.layoutOptions["elk.direction"]="RIGHT";break;case"RL":l.layoutOptions["elk.direction"]="LEFT"}const{securityLevel:b,flowchart:d}=(0,a.F)();let v;"sandbox"===b&&(v=(0,r.Ltv)("#i"+t));const k="sandbox"===b?(0,r.Ltv)(v.nodes()[0].contentDocument.body):(0,r.Ltv)("body"),y="sandbox"===b?v.nodes()[0].contentDocument:document,M=k.select(`[id="${t}"]`);(0,c.a)(M,["point","circle","cross"],i.type,t);const T=i.db.getVertices();let j;const E=i.db.getSubGraphs();a.l.info("Subgraphs - ",E);for(let r=E.length-1;r>=0;r--)j=E[r],i.db.addVertex(j.id,{text:j.title,type:j.labelType},"group",void 0,j.classes,j.dir);const S=M.insert("g").attr("class","subgraphs"),P=function(n){const t={parentById:{},childrenById:{}},e=n.getSubGraphs();return a.l.info("Subgraphs - ",e),e.forEach((function(n){n.nodes.forEach((function(e){t.parentById[e]=n.id,void 0===t.childrenById[n.id]&&(t.childrenById[n.id]=[]),t.childrenById[n.id].push(e)}))})),e.forEach((function(n){n.id,void 0!==t.parentById[n.id]&&t.parentById[n.id]})),t}(i.db);l=await async function(n,t,e,i,r,o,u){const s=e.select(`[id="${t}"]`).insert("g").attr("class","nodes"),h=Object.keys(n);return await Promise.all(h.map((async function(t){const e=n[t];let u="default";e.classes.length>0&&(u=e.classes.join(" ")),u+=" flowchart-label";const h=(0,a.k)(e.styles);let l=void 0!==e.text?e.text:e.id;const b={width:0,height:0},w=[{id:e.id+"-west",layoutOptions:{"port.side":"WEST"}},{id:e.id+"-east",layoutOptions:{"port.side":"EAST"}},{id:e.id+"-south",layoutOptions:{"port.side":"SOUTH"}},{id:e.id+"-north",layoutOptions:{"port.side":"NORTH"}}];let d=0,g="",p={};switch(e.type){case"round":d=5,g="rect";break;case"square":case"group":default:g="rect";break;case"diamond":g="question",p={portConstraints:"FIXED_SIDE"};break;case"hexagon":g="hexagon";break;case"odd":case"odd_right":g="rect_left_inv_arrow";break;case"lean_right":g="lean_right";break;case"lean_left":g="lean_left";break;case"trapezoid":g="trapezoid";break;case"inv_trapezoid":g="inv_trapezoid";break;case"circle":g="circle";break;case"ellipse":g="ellipse";break;case"stadium":g="stadium";break;case"subroutine":g="subroutine";break;case"cylinder":g="cylinder";break;case"doublecircle":g="doublecircle"}const m={labelStyle:h.labelStyle,shape:g,labelText:l,labelType:e.labelType,rx:d,ry:d,class:u,style:h.style,id:e.id,link:e.link,linkTarget:e.linkTarget,tooltip:r.db.getTooltip(e.id)||"",domId:r.db.lookUpDomId(e.id),haveCallback:e.haveCallback,width:"group"===e.type?500:void 0,dir:e.dir,type:e.type,props:e.props,padding:(0,a.F)().flowchart.padding};let v,k;if("group"!==m.type)k=await(0,c.e)(s,m,e.dir),v=k.node().getBBox();else{i.createElementNS("http://www.w3.org/2000/svg","text");const{shapeSvg:n,bbox:t}=await(0,c.l)(s,m,void 0,!0);b.width=t.width,b.wrappingWidth=(0,a.F)().flowchart.wrappingWidth,b.height=t.height,b.labelNode=n.node(),m.labelData=b}const y={id:e.id,ports:"diamond"===e.type?w:[],layoutOptions:p,labelText:l,labelData:b,domId:r.db.lookUpDomId(e.id),width:null==v?void 0:v.width,height:null==v?void 0:v.height,type:e.type,el:k,parent:o.parentById[e.id]};f[m.id]=y}))),u}(T,t,k,y,i,P,l);const C=M.insert("g").attr("class","edges edgePath"),I=i.db.getEdges();l=w(I,i,l,M);Object.keys(f).forEach((n=>{const t=f[n];t.parent||l.children.push(t),void 0!==P.childrenById[n]&&(t.labels=[{text:t.labelText,layoutOptions:{"nodeLabels.placement":"[H_CENTER, V_TOP, INSIDE]"},width:t.labelData.width,height:t.labelData.height}],delete t.x,delete t.y,delete t.width,delete t.height)})),p(l.children,P),a.l.info("after layout",JSON.stringify(l,null,2));const O=await u.layout(l);m(0,0,O.children,M,S,i,0),a.l.info("after layout",O),null==(o=O.edges)||o.map((n=>{g(C,n,n.edgeData,i,P,t)})),(0,a.o)({},M,d.diagramPadding,d.useMaxWidth),h.remove()}},k=n=>`.label {\n font-family: ${n.fontFamily};\n color: ${n.nodeTextColor||n.textColor};\n }\n .cluster-label text {\n fill: ${n.titleColor};\n }\n .cluster-label span {\n color: ${n.titleColor};\n }\n\n .label text,span {\n fill: ${n.nodeTextColor||n.textColor};\n color: ${n.nodeTextColor||n.textColor};\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${n.mainBkg};\n stroke: ${n.nodeBorder};\n stroke-width: 1px;\n }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ${n.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${n.lineColor};\n stroke-width: 2.0px;\n }\n\n .flowchart-link {\n stroke: ${n.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${n.edgeLabelBackground};\n rect {\n opacity: 0.85;\n background-color: ${n.edgeLabelBackground};\n fill: ${n.edgeLabelBackground};\n }\n text-align: center;\n }\n\n .cluster rect {\n fill: ${n.clusterBkg};\n stroke: ${n.clusterBorder};\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ${n.titleColor};\n }\n\n .cluster span {\n color: ${n.titleColor};\n }\n /* .cluster div {\n color: ${n.titleColor};\n } */\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ${n.fontFamily};\n font-size: 12px;\n background: ${n.tertiaryColor};\n border: 1px solid ${n.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .flowchartTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${n.textColor};\n }\n .subgraph {\n stroke-width:2;\n rx:3;\n }\n // .subgraph-lvl-1 {\n // fill:#ccc;\n // // stroke:black;\n // }\n\n .flowchart-label text {\n text-anchor: middle;\n }\n\n ${(n=>{let t="";for(let e=0;e<5;e++)t+=`\n .subgraph-lvl-${e} {\n fill: ${n[`surface${e}`]};\n stroke: ${n[`surfacePeer${e}`]};\n }\n `;return t})(n)}\n`,y={db:i.d,renderer:v,parser:i.p,styles:k}}}]); \ No newline at end of file diff --git a/assets/js/417.39131a40.js b/assets/js/417.39131a40.js deleted file mode 100644 index 653037815f6e..000000000000 --- a/assets/js/417.39131a40.js +++ /dev/null @@ -1,10065 +0,0 @@ -"use strict"; -exports.id = 417; -exports.ids = [417]; -exports.modules = { - -/***/ 21176: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - Zp: () => (/* reexport */ layout) -}); - -// UNUSED EXPORTS: acyclic, normalize, rank - -// EXTERNAL MODULE: ./node_modules/lodash-es/forEach.js -var forEach = __webpack_require__(8058); -// EXTERNAL MODULE: ./node_modules/lodash-es/uniqueId.js -var uniqueId = __webpack_require__(5664); -// EXTERNAL MODULE: ./node_modules/lodash-es/has.js + 1 modules -var has = __webpack_require__(48585); -// EXTERNAL MODULE: ./node_modules/lodash-es/constant.js -var constant = __webpack_require__(39142); -// EXTERNAL MODULE: ./node_modules/lodash-es/flatten.js -var flatten = __webpack_require__(34098); -// EXTERNAL MODULE: ./node_modules/lodash-es/map.js -var map = __webpack_require__(74722); -// EXTERNAL MODULE: ./node_modules/lodash-es/range.js + 2 modules -var range = __webpack_require__(91395); -// EXTERNAL MODULE: ./node_modules/dagre-d3-es/src/graphlib/index.js -var graphlib = __webpack_require__(697); -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/data/list.js -/* - * Simple doubly linked list implementation derived from Cormen, et al., - * "Introduction to Algorithms". - */ - - - -class List { - constructor() { - var sentinel = {}; - sentinel._next = sentinel._prev = sentinel; - this._sentinel = sentinel; - } - dequeue() { - var sentinel = this._sentinel; - var entry = sentinel._prev; - if (entry !== sentinel) { - unlink(entry); - return entry; - } - } - enqueue(entry) { - var sentinel = this._sentinel; - if (entry._prev && entry._next) { - unlink(entry); - } - entry._next = sentinel._next; - sentinel._next._prev = entry; - sentinel._next = entry; - entry._prev = sentinel; - } - toString() { - var strs = []; - var sentinel = this._sentinel; - var curr = sentinel._prev; - while (curr !== sentinel) { - strs.push(JSON.stringify(curr, filterOutLinks)); - curr = curr._prev; - } - return '[' + strs.join(', ') + ']'; - } -} - -function unlink(entry) { - entry._prev._next = entry._next; - entry._next._prev = entry._prev; - delete entry._next; - delete entry._prev; -} - -function filterOutLinks(k, v) { - if (k !== '_next' && k !== '_prev') { - return v; - } -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/greedy-fas.js - - - - -/* - * A greedy heuristic for finding a feedback arc set for a graph. A feedback - * arc set is a set of edges that can be removed to make a graph acyclic. - * The algorithm comes from: P. Eades, X. Lin, and W. F. Smyth, "A fast and - * effective heuristic for the feedback arc set problem." This implementation - * adjusts that from the paper to allow for weighted edges. - */ - - -var DEFAULT_WEIGHT_FN = constant/* default */.A(1); - -function greedyFAS(g, weightFn) { - if (g.nodeCount() <= 1) { - return []; - } - var state = buildState(g, weightFn || DEFAULT_WEIGHT_FN); - var results = doGreedyFAS(state.graph, state.buckets, state.zeroIdx); - - // Expand multi-edges - return flatten/* default */.A( - map/* default */.A(results, function (e) { - return g.outEdges(e.v, e.w); - }) - ); -} - -function doGreedyFAS(g, buckets, zeroIdx) { - var results = []; - var sources = buckets[buckets.length - 1]; - var sinks = buckets[0]; - - var entry; - while (g.nodeCount()) { - while ((entry = sinks.dequeue())) { - removeNode(g, buckets, zeroIdx, entry); - } - while ((entry = sources.dequeue())) { - removeNode(g, buckets, zeroIdx, entry); - } - if (g.nodeCount()) { - for (var i = buckets.length - 2; i > 0; --i) { - entry = buckets[i].dequeue(); - if (entry) { - results = results.concat(removeNode(g, buckets, zeroIdx, entry, true)); - break; - } - } - } - } - - return results; -} - -function removeNode(g, buckets, zeroIdx, entry, collectPredecessors) { - var results = collectPredecessors ? [] : undefined; - - forEach/* default */.A(g.inEdges(entry.v), function (edge) { - var weight = g.edge(edge); - var uEntry = g.node(edge.v); - - if (collectPredecessors) { - results.push({ v: edge.v, w: edge.w }); - } - - uEntry.out -= weight; - assignBucket(buckets, zeroIdx, uEntry); - }); - - forEach/* default */.A(g.outEdges(entry.v), function (edge) { - var weight = g.edge(edge); - var w = edge.w; - var wEntry = g.node(w); - wEntry['in'] -= weight; - assignBucket(buckets, zeroIdx, wEntry); - }); - - g.removeNode(entry.v); - - return results; -} - -function buildState(g, weightFn) { - var fasGraph = new graphlib/* Graph */.T(); - var maxIn = 0; - var maxOut = 0; - - forEach/* default */.A(g.nodes(), function (v) { - fasGraph.setNode(v, { v: v, in: 0, out: 0 }); - }); - - // Aggregate weights on nodes, but also sum the weights across multi-edges - // into a single edge for the fasGraph. - forEach/* default */.A(g.edges(), function (e) { - var prevWeight = fasGraph.edge(e.v, e.w) || 0; - var weight = weightFn(e); - var edgeWeight = prevWeight + weight; - fasGraph.setEdge(e.v, e.w, edgeWeight); - maxOut = Math.max(maxOut, (fasGraph.node(e.v).out += weight)); - maxIn = Math.max(maxIn, (fasGraph.node(e.w)['in'] += weight)); - }); - - var buckets = range/* default */.A(maxOut + maxIn + 3).map(function () { - return new List(); - }); - var zeroIdx = maxIn + 1; - - forEach/* default */.A(fasGraph.nodes(), function (v) { - assignBucket(buckets, zeroIdx, fasGraph.node(v)); - }); - - return { graph: fasGraph, buckets: buckets, zeroIdx: zeroIdx }; -} - -function assignBucket(buckets, zeroIdx, entry) { - if (!entry.out) { - buckets[0].enqueue(entry); - } else if (!entry['in']) { - buckets[buckets.length - 1].enqueue(entry); - } else { - buckets[entry.out - entry['in'] + zeroIdx].enqueue(entry); - } -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/acyclic.js - - - - - -function run(g) { - var fas = g.graph().acyclicer === 'greedy' ? greedyFAS(g, weightFn(g)) : dfsFAS(g); - forEach/* default */.A(fas, function (e) { - var label = g.edge(e); - g.removeEdge(e); - label.forwardName = e.name; - label.reversed = true; - g.setEdge(e.w, e.v, label, uniqueId/* default */.A('rev')); - }); - - function weightFn(g) { - return function (e) { - return g.edge(e).weight; - }; - } -} - -function dfsFAS(g) { - var fas = []; - var stack = {}; - var visited = {}; - - function dfs(v) { - if (has/* default */.A(visited, v)) { - return; - } - visited[v] = true; - stack[v] = true; - forEach/* default */.A(g.outEdges(v), function (e) { - if (has/* default */.A(stack, e.w)) { - fas.push(e); - } else { - dfs(e.w); - } - }); - delete stack[v]; - } - - forEach/* default */.A(g.nodes(), dfs); - return fas; -} - -function undo(g) { - forEach/* default */.A(g.edges(), function (e) { - var label = g.edge(e); - if (label.reversed) { - g.removeEdge(e); - - var forwardName = label.forwardName; - delete label.reversed; - delete label.forwardName; - g.setEdge(e.w, e.v, label, forwardName); - } - }); -} - -// EXTERNAL MODULE: ./node_modules/lodash-es/merge.js + 6 modules -var merge = __webpack_require__(98879); -// EXTERNAL MODULE: ./node_modules/lodash-es/pick.js + 4 modules -var pick = __webpack_require__(81942); -// EXTERNAL MODULE: ./node_modules/lodash-es/defaults.js -var defaults = __webpack_require__(23068); -// EXTERNAL MODULE: ./node_modules/lodash-es/isSymbol.js -var isSymbol = __webpack_require__(61882); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseExtremum.js - - -/** - * The base implementation of methods like `_.max` and `_.min` which accepts a - * `comparator` to determine the extremum value. - * - * @private - * @param {Array} array The array to iterate over. - * @param {Function} iteratee The iteratee invoked per iteration. - * @param {Function} comparator The comparator used to compare values. - * @returns {*} Returns the extremum value. - */ -function baseExtremum(array, iteratee, comparator) { - var index = -1, - length = array.length; - - while (++index < length) { - var value = array[index], - current = iteratee(value); - - if (current != null && (computed === undefined - ? (current === current && !(0,isSymbol/* default */.A)(current)) - : comparator(current, computed) - )) { - var computed = current, - result = value; - } - } - return result; -} - -/* harmony default export */ const _baseExtremum = (baseExtremum); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseGt.js -/** - * The base implementation of `_.gt` which doesn't coerce arguments. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if `value` is greater than `other`, - * else `false`. - */ -function baseGt(value, other) { - return value > other; -} - -/* harmony default export */ const _baseGt = (baseGt); - -// EXTERNAL MODULE: ./node_modules/lodash-es/identity.js -var identity = __webpack_require__(29008); -;// CONCATENATED MODULE: ./node_modules/lodash-es/max.js - - - - -/** - * Computes the maximum value of `array`. If `array` is empty or falsey, - * `undefined` is returned. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Math - * @param {Array} array The array to iterate over. - * @returns {*} Returns the maximum value. - * @example - * - * _.max([4, 2, 8, 6]); - * // => 8 - * - * _.max([]); - * // => undefined - */ -function max(array) { - return (array && array.length) - ? _baseExtremum(array, identity/* default */.A, _baseGt) - : undefined; -} - -/* harmony default export */ const lodash_es_max = (max); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/last.js -/** - * Gets the last element of `array`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to query. - * @returns {*} Returns the last element of `array`. - * @example - * - * _.last([1, 2, 3]); - * // => 3 - */ -function last(array) { - var length = array == null ? 0 : array.length; - return length ? array[length - 1] : undefined; -} - -/* harmony default export */ const lodash_es_last = (last); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseAssignValue.js -var _baseAssignValue = __webpack_require__(52528); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseForOwn.js -var _baseForOwn = __webpack_require__(79841); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseIteratee.js + 16 modules -var _baseIteratee = __webpack_require__(49574); -;// CONCATENATED MODULE: ./node_modules/lodash-es/mapValues.js - - - - -/** - * Creates an object with the same keys as `object` and values generated - * by running each own enumerable string keyed property of `object` thru - * `iteratee`. The iteratee is invoked with three arguments: - * (value, key, object). - * - * @static - * @memberOf _ - * @since 2.4.0 - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Object} Returns the new mapped object. - * @see _.mapKeys - * @example - * - * var users = { - * 'fred': { 'user': 'fred', 'age': 40 }, - * 'pebbles': { 'user': 'pebbles', 'age': 1 } - * }; - * - * _.mapValues(users, function(o) { return o.age; }); - * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) - * - * // The `_.property` iteratee shorthand. - * _.mapValues(users, 'age'); - * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) - */ -function mapValues(object, iteratee) { - var result = {}; - iteratee = (0,_baseIteratee/* default */.A)(iteratee, 3); - - (0,_baseForOwn/* default */.A)(object, function(value, key, object) { - (0,_baseAssignValue/* default */.A)(result, key, iteratee(value, key, object)); - }); - return result; -} - -/* harmony default export */ const lodash_es_mapValues = (mapValues); - -// EXTERNAL MODULE: ./node_modules/lodash-es/isUndefined.js -var isUndefined = __webpack_require__(69592); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseLt.js -/** - * The base implementation of `_.lt` which doesn't coerce arguments. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if `value` is less than `other`, - * else `false`. - */ -function baseLt(value, other) { - return value < other; -} - -/* harmony default export */ const _baseLt = (baseLt); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/min.js - - - - -/** - * Computes the minimum value of `array`. If `array` is empty or falsey, - * `undefined` is returned. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Math - * @param {Array} array The array to iterate over. - * @returns {*} Returns the minimum value. - * @example - * - * _.min([4, 2, 8, 6]); - * // => 2 - * - * _.min([]); - * // => undefined - */ -function min(array) { - return (array && array.length) - ? _baseExtremum(array, identity/* default */.A, _baseLt) - : undefined; -} - -/* harmony default export */ const lodash_es_min = (min); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_root.js -var _root = __webpack_require__(41917); -;// CONCATENATED MODULE: ./node_modules/lodash-es/now.js - - -/** - * Gets the timestamp of the number of milliseconds that have elapsed since - * the Unix epoch (1 January 1970 00:00:00 UTC). - * - * @static - * @memberOf _ - * @since 2.4.0 - * @category Date - * @returns {number} Returns the timestamp. - * @example - * - * _.defer(function(stamp) { - * console.log(_.now() - stamp); - * }, _.now()); - * // => Logs the number of milliseconds it took for the deferred invocation. - */ -var now = function() { - return _root/* default */.A.Date.now(); -}; - -/* harmony default export */ const lodash_es_now = (now); - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/util.js - - - - - -/* - * Adds a dummy node to the graph and return v. - */ -function addDummyNode(g, type, attrs, name) { - var v; - do { - v = uniqueId/* default */.A(name); - } while (g.hasNode(v)); - - attrs.dummy = type; - g.setNode(v, attrs); - return v; -} - -/* - * Returns a new graph with only simple edges. Handles aggregation of data - * associated with multi-edges. - */ -function simplify(g) { - var simplified = new graphlib/* Graph */.T().setGraph(g.graph()); - forEach/* default */.A(g.nodes(), function (v) { - simplified.setNode(v, g.node(v)); - }); - forEach/* default */.A(g.edges(), function (e) { - var simpleLabel = simplified.edge(e.v, e.w) || { weight: 0, minlen: 1 }; - var label = g.edge(e); - simplified.setEdge(e.v, e.w, { - weight: simpleLabel.weight + label.weight, - minlen: Math.max(simpleLabel.minlen, label.minlen), - }); - }); - return simplified; -} - -function asNonCompoundGraph(g) { - var simplified = new graphlib/* Graph */.T({ multigraph: g.isMultigraph() }).setGraph(g.graph()); - forEach/* default */.A(g.nodes(), function (v) { - if (!g.children(v).length) { - simplified.setNode(v, g.node(v)); - } - }); - forEach/* default */.A(g.edges(), function (e) { - simplified.setEdge(e, g.edge(e)); - }); - return simplified; -} - -function successorWeights(g) { - var weightMap = _.map(g.nodes(), function (v) { - var sucs = {}; - _.forEach(g.outEdges(v), function (e) { - sucs[e.w] = (sucs[e.w] || 0) + g.edge(e).weight; - }); - return sucs; - }); - return _.zipObject(g.nodes(), weightMap); -} - -function predecessorWeights(g) { - var weightMap = _.map(g.nodes(), function (v) { - var preds = {}; - _.forEach(g.inEdges(v), function (e) { - preds[e.v] = (preds[e.v] || 0) + g.edge(e).weight; - }); - return preds; - }); - return _.zipObject(g.nodes(), weightMap); -} - -/* - * Finds where a line starting at point ({x, y}) would intersect a rectangle - * ({x, y, width, height}) if it were pointing at the rectangle's center. - */ -function intersectRect(rect, point) { - var x = rect.x; - var y = rect.y; - - // Rectangle intersection algorithm from: - // http://math.stackexchange.com/questions/108113/find-edge-between-two-boxes - var dx = point.x - x; - var dy = point.y - y; - var w = rect.width / 2; - var h = rect.height / 2; - - if (!dx && !dy) { - throw new Error('Not possible to find intersection inside of the rectangle'); - } - - var sx, sy; - if (Math.abs(dy) * w > Math.abs(dx) * h) { - // Intersection is top or bottom of rect. - if (dy < 0) { - h = -h; - } - sx = (h * dx) / dy; - sy = h; - } else { - // Intersection is left or right of rect. - if (dx < 0) { - w = -w; - } - sx = w; - sy = (w * dy) / dx; - } - - return { x: x + sx, y: y + sy }; -} - -/* - * Given a DAG with each node assigned "rank" and "order" properties, this - * function will produce a matrix with the ids of each node. - */ -function buildLayerMatrix(g) { - var layering = map/* default */.A(range/* default */.A(util_maxRank(g) + 1), function () { - return []; - }); - forEach/* default */.A(g.nodes(), function (v) { - var node = g.node(v); - var rank = node.rank; - if (!isUndefined/* default */.A(rank)) { - layering[rank][node.order] = v; - } - }); - return layering; -} - -/* - * Adjusts the ranks for all nodes in the graph such that all nodes v have - * rank(v) >= 0 and at least one node w has rank(w) = 0. - */ -function normalizeRanks(g) { - var min = lodash_es_min( - map/* default */.A(g.nodes(), function (v) { - return g.node(v).rank; - }) - ); - forEach/* default */.A(g.nodes(), function (v) { - var node = g.node(v); - if (has/* default */.A(node, 'rank')) { - node.rank -= min; - } - }); -} - -function removeEmptyRanks(g) { - // Ranks may not start at 0, so we need to offset them - var offset = lodash_es_min( - map/* default */.A(g.nodes(), function (v) { - return g.node(v).rank; - }) - ); - - var layers = []; - forEach/* default */.A(g.nodes(), function (v) { - var rank = g.node(v).rank - offset; - if (!layers[rank]) { - layers[rank] = []; - } - layers[rank].push(v); - }); - - var delta = 0; - var nodeRankFactor = g.graph().nodeRankFactor; - forEach/* default */.A(layers, function (vs, i) { - if (isUndefined/* default */.A(vs) && i % nodeRankFactor !== 0) { - --delta; - } else if (delta) { - forEach/* default */.A(vs, function (v) { - g.node(v).rank += delta; - }); - } - }); -} - -function addBorderNode(g, prefix, rank, order) { - var node = { - width: 0, - height: 0, - }; - if (arguments.length >= 4) { - node.rank = rank; - node.order = order; - } - return addDummyNode(g, 'border', node, prefix); -} - -function util_maxRank(g) { - return lodash_es_max( - map/* default */.A(g.nodes(), function (v) { - var rank = g.node(v).rank; - if (!isUndefined/* default */.A(rank)) { - return rank; - } - }) - ); -} - -/* - * Partition a collection into two groups: `lhs` and `rhs`. If the supplied - * function returns true for an entry it goes into `lhs`. Otherwise it goes - * into `rhs. - */ -function partition(collection, fn) { - var result = { lhs: [], rhs: [] }; - forEach/* default */.A(collection, function (value) { - if (fn(value)) { - result.lhs.push(value); - } else { - result.rhs.push(value); - } - }); - return result; -} - -/* - * Returns a new function that wraps `fn` with a timer. The wrapper logs the - * time it takes to execute the function. - */ -function util_time(name, fn) { - var start = lodash_es_now(); - try { - return fn(); - } finally { - console.log(name + ' time: ' + (lodash_es_now() - start) + 'ms'); - } -} - -function notime(name, fn) { - return fn(); -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/add-border-segments.js - - - - - -function addBorderSegments(g) { - function dfs(v) { - var children = g.children(v); - var node = g.node(v); - if (children.length) { - forEach/* default */.A(children, dfs); - } - - if (has/* default */.A(node, 'minRank')) { - node.borderLeft = []; - node.borderRight = []; - for (var rank = node.minRank, maxRank = node.maxRank + 1; rank < maxRank; ++rank) { - add_border_segments_addBorderNode(g, 'borderLeft', '_bl', v, node, rank); - add_border_segments_addBorderNode(g, 'borderRight', '_br', v, node, rank); - } - } - } - - forEach/* default */.A(g.children(), dfs); -} - -function add_border_segments_addBorderNode(g, prop, prefix, sg, sgNode, rank) { - var label = { width: 0, height: 0, rank: rank, borderType: prop }; - var prev = sgNode[prop][rank - 1]; - var curr = addDummyNode(g, 'border', label, prefix); - sgNode[prop][rank] = curr; - g.setParent(curr, sg); - if (prev) { - g.setEdge(prev, curr, { weight: 1 }); - } -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/coordinate-system.js - - - - -function adjust(g) { - var rankDir = g.graph().rankdir.toLowerCase(); - if (rankDir === 'lr' || rankDir === 'rl') { - swapWidthHeight(g); - } -} - -function coordinate_system_undo(g) { - var rankDir = g.graph().rankdir.toLowerCase(); - if (rankDir === 'bt' || rankDir === 'rl') { - reverseY(g); - } - - if (rankDir === 'lr' || rankDir === 'rl') { - swapXY(g); - swapWidthHeight(g); - } -} - -function swapWidthHeight(g) { - forEach/* default */.A(g.nodes(), function (v) { - swapWidthHeightOne(g.node(v)); - }); - forEach/* default */.A(g.edges(), function (e) { - swapWidthHeightOne(g.edge(e)); - }); -} - -function swapWidthHeightOne(attrs) { - var w = attrs.width; - attrs.width = attrs.height; - attrs.height = w; -} - -function reverseY(g) { - forEach/* default */.A(g.nodes(), function (v) { - reverseYOne(g.node(v)); - }); - - forEach/* default */.A(g.edges(), function (e) { - var edge = g.edge(e); - forEach/* default */.A(edge.points, reverseYOne); - if (has/* default */.A(edge, 'y')) { - reverseYOne(edge); - } - }); -} - -function reverseYOne(attrs) { - attrs.y = -attrs.y; -} - -function swapXY(g) { - forEach/* default */.A(g.nodes(), function (v) { - swapXYOne(g.node(v)); - }); - - forEach/* default */.A(g.edges(), function (e) { - var edge = g.edge(e); - forEach/* default */.A(edge.points, swapXYOne); - if (has/* default */.A(edge, 'x')) { - swapXYOne(edge); - } - }); -} - -function swapXYOne(attrs) { - var x = attrs.x; - attrs.x = attrs.y; - attrs.y = x; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/normalize.js - - - - - -/* - * Breaks any long edges in the graph into short segments that span 1 layer - * each. This operation is undoable with the denormalize function. - * - * Pre-conditions: - * - * 1. The input graph is a DAG. - * 2. Each node in the graph has a "rank" property. - * - * Post-condition: - * - * 1. All edges in the graph have a length of 1. - * 2. Dummy nodes are added where edges have been split into segments. - * 3. The graph is augmented with a "dummyChains" attribute which contains - * the first dummy in each chain of dummy nodes produced. - */ -function normalize_run(g) { - g.graph().dummyChains = []; - forEach/* default */.A(g.edges(), function (edge) { - normalizeEdge(g, edge); - }); -} - -function normalizeEdge(g, e) { - var v = e.v; - var vRank = g.node(v).rank; - var w = e.w; - var wRank = g.node(w).rank; - var name = e.name; - var edgeLabel = g.edge(e); - var labelRank = edgeLabel.labelRank; - - if (wRank === vRank + 1) return; - - g.removeEdge(e); - - var dummy, attrs, i; - for (i = 0, ++vRank; vRank < wRank; ++i, ++vRank) { - edgeLabel.points = []; - attrs = { - width: 0, - height: 0, - edgeLabel: edgeLabel, - edgeObj: e, - rank: vRank, - }; - dummy = addDummyNode(g, 'edge', attrs, '_d'); - if (vRank === labelRank) { - attrs.width = edgeLabel.width; - attrs.height = edgeLabel.height; - // @ts-expect-error - attrs.dummy = 'edge-label'; - // @ts-expect-error - attrs.labelpos = edgeLabel.labelpos; - } - g.setEdge(v, dummy, { weight: edgeLabel.weight }, name); - if (i === 0) { - g.graph().dummyChains.push(dummy); - } - v = dummy; - } - - g.setEdge(v, w, { weight: edgeLabel.weight }, name); -} - -function normalize_undo(g) { - forEach/* default */.A(g.graph().dummyChains, function (v) { - var node = g.node(v); - var origLabel = node.edgeLabel; - var w; - g.setEdge(node.edgeObj, origLabel); - while (node.dummy) { - w = g.successors(v)[0]; - g.removeNode(v); - origLabel.points.push({ x: node.x, y: node.y }); - if (node.dummy === 'edge-label') { - origLabel.x = node.x; - origLabel.y = node.y; - origLabel.width = node.width; - origLabel.height = node.height; - } - v = w; - node = g.node(v); - } - }); -} - -;// CONCATENATED MODULE: ./node_modules/lodash-es/minBy.js - - - - -/** - * This method is like `_.min` except that it accepts `iteratee` which is - * invoked for each element in `array` to generate the criterion by which - * the value is ranked. The iteratee is invoked with one argument: (value). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Math - * @param {Array} array The array to iterate over. - * @param {Function} [iteratee=_.identity] The iteratee invoked per element. - * @returns {*} Returns the minimum value. - * @example - * - * var objects = [{ 'n': 1 }, { 'n': 2 }]; - * - * _.minBy(objects, function(o) { return o.n; }); - * // => { 'n': 1 } - * - * // The `_.property` iteratee shorthand. - * _.minBy(objects, 'n'); - * // => { 'n': 1 } - */ -function minBy(array, iteratee) { - return (array && array.length) - ? _baseExtremum(array, (0,_baseIteratee/* default */.A)(iteratee, 2), _baseLt) - : undefined; -} - -/* harmony default export */ const lodash_es_minBy = (minBy); - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/rank/util.js - - - - -/* - * Initializes ranks for the input graph using the longest path algorithm. This - * algorithm scales well and is fast in practice, it yields rather poor - * solutions. Nodes are pushed to the lowest layer possible, leaving the bottom - * ranks wide and leaving edges longer than necessary. However, due to its - * speed, this algorithm is good for getting an initial ranking that can be fed - * into other algorithms. - * - * This algorithm does not normalize layers because it will be used by other - * algorithms in most cases. If using this algorithm directly, be sure to - * run normalize at the end. - * - * Pre-conditions: - * - * 1. Input graph is a DAG. - * 2. Input graph node labels can be assigned properties. - * - * Post-conditions: - * - * 1. Each node will be assign an (unnormalized) "rank" property. - */ -function longestPath(g) { - var visited = {}; - - function dfs(v) { - var label = g.node(v); - if (has/* default */.A(visited, v)) { - return label.rank; - } - visited[v] = true; - - var rank = lodash_es_min( - map/* default */.A(g.outEdges(v), function (e) { - return dfs(e.w) - g.edge(e).minlen; - }) - ); - - if ( - rank === Number.POSITIVE_INFINITY || // return value of _.map([]) for Lodash 3 - rank === undefined || // return value of _.map([]) for Lodash 4 - rank === null - ) { - // return value of _.map([null]) - rank = 0; - } - - return (label.rank = rank); - } - - forEach/* default */.A(g.sources(), dfs); -} - -/* - * Returns the amount of slack for the given edge. The slack is defined as the - * difference between the length of the edge and its minimum length. - */ -function slack(g, e) { - return g.node(e.w).rank - g.node(e.v).rank - g.edge(e).minlen; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/rank/feasible-tree.js - - - - - - -/* - * Constructs a spanning tree with tight edges and adjusted the input node's - * ranks to achieve this. A tight edge is one that is has a length that matches - * its "minlen" attribute. - * - * The basic structure for this function is derived from Gansner, et al., "A - * Technique for Drawing Directed Graphs." - * - * Pre-conditions: - * - * 1. Graph must be a DAG. - * 2. Graph must be connected. - * 3. Graph must have at least one node. - * 5. Graph nodes must have been previously assigned a "rank" property that - * respects the "minlen" property of incident edges. - * 6. Graph edges must have a "minlen" property. - * - * Post-conditions: - * - * - Graph nodes will have their rank adjusted to ensure that all edges are - * tight. - * - * Returns a tree (undirected graph) that is constructed using only "tight" - * edges. - */ -function feasibleTree(g) { - var t = new graphlib/* Graph */.T({ directed: false }); - - // Choose arbitrary node from which to start our tree - var start = g.nodes()[0]; - var size = g.nodeCount(); - t.setNode(start, {}); - - var edge, delta; - while (tightTree(t, g) < size) { - edge = findMinSlackEdge(t, g); - delta = t.hasNode(edge.v) ? slack(g, edge) : -slack(g, edge); - shiftRanks(t, g, delta); - } - - return t; -} - -/* - * Finds a maximal tree of tight edges and returns the number of nodes in the - * tree. - */ -function tightTree(t, g) { - function dfs(v) { - forEach/* default */.A(g.nodeEdges(v), function (e) { - var edgeV = e.v, - w = v === edgeV ? e.w : edgeV; - if (!t.hasNode(w) && !slack(g, e)) { - t.setNode(w, {}); - t.setEdge(v, w, {}); - dfs(w); - } - }); - } - - forEach/* default */.A(t.nodes(), dfs); - return t.nodeCount(); -} - -/* - * Finds the edge with the smallest slack that is incident on tree and returns - * it. - */ -function findMinSlackEdge(t, g) { - return lodash_es_minBy(g.edges(), function (e) { - if (t.hasNode(e.v) !== t.hasNode(e.w)) { - return slack(g, e); - } - }); -} - -function shiftRanks(t, g, delta) { - forEach/* default */.A(t.nodes(), function (v) { - g.node(v).rank += delta; - }); -} - -// EXTERNAL MODULE: ./node_modules/lodash-es/isArrayLike.js -var isArrayLike = __webpack_require__(38446); -// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js -var keys = __webpack_require__(27422); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_createFind.js - - - - -/** - * Creates a `_.find` or `_.findLast` function. - * - * @private - * @param {Function} findIndexFunc The function to find the collection index. - * @returns {Function} Returns the new find function. - */ -function createFind(findIndexFunc) { - return function(collection, predicate, fromIndex) { - var iterable = Object(collection); - if (!(0,isArrayLike/* default */.A)(collection)) { - var iteratee = (0,_baseIteratee/* default */.A)(predicate, 3); - collection = (0,keys/* default */.A)(collection); - predicate = function(key) { return iteratee(iterable[key], key, iterable); }; - } - var index = findIndexFunc(collection, predicate, fromIndex); - return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined; - }; -} - -/* harmony default export */ const _createFind = (createFind); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFindIndex.js -var _baseFindIndex = __webpack_require__(25707); -// EXTERNAL MODULE: ./node_modules/lodash-es/toFinite.js + 3 modules -var toFinite = __webpack_require__(74342); -;// CONCATENATED MODULE: ./node_modules/lodash-es/toInteger.js - - -/** - * Converts `value` to an integer. - * - * **Note:** This method is loosely based on - * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {number} Returns the converted integer. - * @example - * - * _.toInteger(3.2); - * // => 3 - * - * _.toInteger(Number.MIN_VALUE); - * // => 0 - * - * _.toInteger(Infinity); - * // => 1.7976931348623157e+308 - * - * _.toInteger('3.2'); - * // => 3 - */ -function toInteger(value) { - var result = (0,toFinite/* default */.A)(value), - remainder = result % 1; - - return result === result ? (remainder ? result - remainder : result) : 0; -} - -/* harmony default export */ const lodash_es_toInteger = (toInteger); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/findIndex.js - - - - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max; - -/** - * This method is like `_.find` except that it returns the index of the first - * element `predicate` returns truthy for instead of the element itself. - * - * @static - * @memberOf _ - * @since 1.1.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @param {number} [fromIndex=0] The index to search from. - * @returns {number} Returns the index of the found element, else `-1`. - * @example - * - * var users = [ - * { 'user': 'barney', 'active': false }, - * { 'user': 'fred', 'active': false }, - * { 'user': 'pebbles', 'active': true } - * ]; - * - * _.findIndex(users, function(o) { return o.user == 'barney'; }); - * // => 0 - * - * // The `_.matches` iteratee shorthand. - * _.findIndex(users, { 'user': 'fred', 'active': false }); - * // => 1 - * - * // The `_.matchesProperty` iteratee shorthand. - * _.findIndex(users, ['active', false]); - * // => 0 - * - * // The `_.property` iteratee shorthand. - * _.findIndex(users, 'active'); - * // => 2 - */ -function findIndex(array, predicate, fromIndex) { - var length = array == null ? 0 : array.length; - if (!length) { - return -1; - } - var index = fromIndex == null ? 0 : lodash_es_toInteger(fromIndex); - if (index < 0) { - index = nativeMax(length + index, 0); - } - return (0,_baseFindIndex/* default */.A)(array, (0,_baseIteratee/* default */.A)(predicate, 3), index); -} - -/* harmony default export */ const lodash_es_findIndex = (findIndex); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/find.js - - - -/** - * Iterates over elements of `collection`, returning the first element - * `predicate` returns truthy for. The predicate is invoked with three - * arguments: (value, index|key, collection). - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to inspect. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @param {number} [fromIndex=0] The index to search from. - * @returns {*} Returns the matched element, else `undefined`. - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': true }, - * { 'user': 'fred', 'age': 40, 'active': false }, - * { 'user': 'pebbles', 'age': 1, 'active': true } - * ]; - * - * _.find(users, function(o) { return o.age < 40; }); - * // => object for 'barney' - * - * // The `_.matches` iteratee shorthand. - * _.find(users, { 'age': 1, 'active': true }); - * // => object for 'pebbles' - * - * // The `_.matchesProperty` iteratee shorthand. - * _.find(users, ['active', false]); - * // => object for 'fred' - * - * // The `_.property` iteratee shorthand. - * _.find(users, 'active'); - * // => object for 'barney' - */ -var find = _createFind(lodash_es_findIndex); - -/* harmony default export */ const lodash_es_find = (find); - -// EXTERNAL MODULE: ./node_modules/lodash-es/filter.js + 1 modules -var filter = __webpack_require__(11662); -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/dijkstra.js - - - - - -var DEFAULT_WEIGHT_FUNC = constant/* default */.A(1); - -function dijkstra_dijkstra(g, source, weightFn, edgeFn) { - return runDijkstra( - g, - String(source), - weightFn || DEFAULT_WEIGHT_FUNC, - edgeFn || - function (v) { - return g.outEdges(v); - } - ); -} - -function runDijkstra(g, source, weightFn, edgeFn) { - var results = {}; - var pq = new PriorityQueue(); - var v, vEntry; - - var updateNeighbors = function (edge) { - var w = edge.v !== v ? edge.v : edge.w; - var wEntry = results[w]; - var weight = weightFn(edge); - var distance = vEntry.distance + weight; - - if (weight < 0) { - throw new Error( - 'dijkstra does not allow negative edge weights. ' + - 'Bad edge: ' + - edge + - ' Weight: ' + - weight - ); - } - - if (distance < wEntry.distance) { - wEntry.distance = distance; - wEntry.predecessor = v; - pq.decrease(w, distance); - } - }; - - g.nodes().forEach(function (v) { - var distance = v === source ? 0 : Number.POSITIVE_INFINITY; - results[v] = { distance: distance }; - pq.add(v, distance); - }); - - while (pq.size() > 0) { - v = pq.removeMin(); - vEntry = results[v]; - if (vEntry.distance === Number.POSITIVE_INFINITY) { - break; - } - - edgeFn(v).forEach(updateNeighbors); - } - - return results; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/dijkstra-all.js - - - - - -function dijkstraAll(g, weightFunc, edgeFunc) { - return _.transform( - g.nodes(), - function (acc, v) { - acc[v] = dijkstra(g, v, weightFunc, edgeFunc); - }, - {} - ); -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/floyd-warshall.js - - - - -var floyd_warshall_DEFAULT_WEIGHT_FUNC = constant/* default */.A(1); - -function floydWarshall(g, weightFn, edgeFn) { - return runFloydWarshall( - g, - weightFn || floyd_warshall_DEFAULT_WEIGHT_FUNC, - edgeFn || - function (v) { - return g.outEdges(v); - } - ); -} - -function runFloydWarshall(g, weightFn, edgeFn) { - var results = {}; - var nodes = g.nodes(); - - nodes.forEach(function (v) { - results[v] = {}; - results[v][v] = { distance: 0 }; - nodes.forEach(function (w) { - if (v !== w) { - results[v][w] = { distance: Number.POSITIVE_INFINITY }; - } - }); - edgeFn(v).forEach(function (edge) { - var w = edge.v === v ? edge.w : edge.v; - var d = weightFn(edge); - results[v][w] = { distance: d, predecessor: v }; - }); - }); - - nodes.forEach(function (k) { - var rowK = results[k]; - nodes.forEach(function (i) { - var rowI = results[i]; - nodes.forEach(function (j) { - var ik = rowI[k]; - var kj = rowK[j]; - var ij = rowI[j]; - var altDistance = ik.distance + kj.distance; - if (altDistance < ij.distance) { - ij.distance = altDistance; - ij.predecessor = kj.predecessor; - } - }); - }); - }); - - return results; -} - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseKeys.js + 1 modules -var _baseKeys = __webpack_require__(69471); -// EXTERNAL MODULE: ./node_modules/lodash-es/_getTag.js + 3 modules -var _getTag = __webpack_require__(9779); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGetTag.js + 2 modules -var _baseGetTag = __webpack_require__(88496); -// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js -var isArray = __webpack_require__(92049); -// EXTERNAL MODULE: ./node_modules/lodash-es/isObjectLike.js -var isObjectLike = __webpack_require__(53098); -;// CONCATENATED MODULE: ./node_modules/lodash-es/isString.js - - - - -/** `Object#toString` result references. */ -var stringTag = '[object String]'; - -/** - * Checks if `value` is classified as a `String` primitive or object. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a string, else `false`. - * @example - * - * _.isString('abc'); - * // => true - * - * _.isString(1); - * // => false - */ -function isString(value) { - return typeof value == 'string' || - (!(0,isArray/* default */.A)(value) && (0,isObjectLike/* default */.A)(value) && (0,_baseGetTag/* default */.A)(value) == stringTag); -} - -/* harmony default export */ const lodash_es_isString = (isString); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseProperty.js -var _baseProperty = __webpack_require__(70805); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_asciiSize.js - - -/** - * Gets the size of an ASCII `string`. - * - * @private - * @param {string} string The string inspect. - * @returns {number} Returns the string size. - */ -var asciiSize = (0,_baseProperty/* default */.A)('length'); - -/* harmony default export */ const _asciiSize = (asciiSize); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_hasUnicode.js -/** Used to compose unicode character classes. */ -var rsAstralRange = '\\ud800-\\udfff', - rsComboMarksRange = '\\u0300-\\u036f', - reComboHalfMarksRange = '\\ufe20-\\ufe2f', - rsComboSymbolsRange = '\\u20d0-\\u20ff', - rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, - rsVarRange = '\\ufe0e\\ufe0f'; - -/** Used to compose unicode capture groups. */ -var rsZWJ = '\\u200d'; - -/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ -var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']'); - -/** - * Checks if `string` contains Unicode symbols. - * - * @private - * @param {string} string The string to inspect. - * @returns {boolean} Returns `true` if a symbol is found, else `false`. - */ -function hasUnicode(string) { - return reHasUnicode.test(string); -} - -/* harmony default export */ const _hasUnicode = (hasUnicode); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_unicodeSize.js -/** Used to compose unicode character classes. */ -var _unicodeSize_rsAstralRange = '\\ud800-\\udfff', - _unicodeSize_rsComboMarksRange = '\\u0300-\\u036f', - _unicodeSize_reComboHalfMarksRange = '\\ufe20-\\ufe2f', - _unicodeSize_rsComboSymbolsRange = '\\u20d0-\\u20ff', - _unicodeSize_rsComboRange = _unicodeSize_rsComboMarksRange + _unicodeSize_reComboHalfMarksRange + _unicodeSize_rsComboSymbolsRange, - _unicodeSize_rsVarRange = '\\ufe0e\\ufe0f'; - -/** Used to compose unicode capture groups. */ -var rsAstral = '[' + _unicodeSize_rsAstralRange + ']', - rsCombo = '[' + _unicodeSize_rsComboRange + ']', - rsFitz = '\\ud83c[\\udffb-\\udfff]', - rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', - rsNonAstral = '[^' + _unicodeSize_rsAstralRange + ']', - rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', - rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', - _unicodeSize_rsZWJ = '\\u200d'; - -/** Used to compose unicode regexes. */ -var reOptMod = rsModifier + '?', - rsOptVar = '[' + _unicodeSize_rsVarRange + ']?', - rsOptJoin = '(?:' + _unicodeSize_rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', - rsSeq = rsOptVar + reOptMod + rsOptJoin, - rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; - -/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ -var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); - -/** - * Gets the size of a Unicode `string`. - * - * @private - * @param {string} string The string inspect. - * @returns {number} Returns the string size. - */ -function unicodeSize(string) { - var result = reUnicode.lastIndex = 0; - while (reUnicode.test(string)) { - ++result; - } - return result; -} - -/* harmony default export */ const _unicodeSize = (unicodeSize); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_stringSize.js - - - - -/** - * Gets the number of symbols in `string`. - * - * @private - * @param {string} string The string to inspect. - * @returns {number} Returns the string size. - */ -function stringSize(string) { - return _hasUnicode(string) - ? _unicodeSize(string) - : _asciiSize(string); -} - -/* harmony default export */ const _stringSize = (stringSize); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/size.js - - - - - - -/** `Object#toString` result references. */ -var mapTag = '[object Map]', - setTag = '[object Set]'; - -/** - * Gets the size of `collection` by returning its length for array-like - * values or the number of own enumerable string keyed properties for objects. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object|string} collection The collection to inspect. - * @returns {number} Returns the collection size. - * @example - * - * _.size([1, 2, 3]); - * // => 3 - * - * _.size({ 'a': 1, 'b': 2 }); - * // => 2 - * - * _.size('pebbles'); - * // => 7 - */ -function size(collection) { - if (collection == null) { - return 0; - } - if ((0,isArrayLike/* default */.A)(collection)) { - return lodash_es_isString(collection) ? _stringSize(collection) : collection.length; - } - var tag = (0,_getTag/* default */.A)(collection); - if (tag == mapTag || tag == setTag) { - return collection.size; - } - return (0,_baseKeys/* default */.A)(collection).length; -} - -/* harmony default export */ const lodash_es_size = (size); - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/topsort.js - - - - -topsort_topsort.CycleException = topsort_CycleException; - -function topsort_topsort(g) { - var visited = {}; - var stack = {}; - var results = []; - - function visit(node) { - if (has/* default */.A(stack, node)) { - throw new topsort_CycleException(); - } - - if (!has/* default */.A(visited, node)) { - stack[node] = true; - visited[node] = true; - forEach/* default */.A(g.predecessors(node), visit); - delete stack[node]; - results.push(node); - } - } - - forEach/* default */.A(g.sinks(), visit); - - if (lodash_es_size(visited) !== g.nodeCount()) { - throw new topsort_CycleException(); - } - - return results; -} - -function topsort_CycleException() {} -topsort_CycleException.prototype = new Error(); // must be an instance of Error to pass testing - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/is-acyclic.js - - - - -function isAcyclic(g) { - try { - topsort(g); - } catch (e) { - if (e instanceof CycleException) { - return false; - } - throw e; - } - return true; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/dfs.js - - - - -/* - * A helper that preforms a pre- or post-order traversal on the input graph - * and returns the nodes in the order they were visited. If the graph is - * undirected then this algorithm will navigate using neighbors. If the graph - * is directed then this algorithm will navigate using successors. - * - * Order must be one of "pre" or "post". - */ -function dfs(g, vs, order) { - if (!isArray/* default */.A(vs)) { - vs = [vs]; - } - - var navigation = (g.isDirected() ? g.successors : g.neighbors).bind(g); - - var acc = []; - var visited = {}; - forEach/* default */.A(vs, function (v) { - if (!g.hasNode(v)) { - throw new Error('Graph does not have node: ' + v); - } - - doDfs(g, v, order === 'post', visited, navigation, acc); - }); - return acc; -} - -function doDfs(g, v, postorder, visited, navigation, acc) { - if (!has/* default */.A(visited, v)) { - visited[v] = true; - - if (!postorder) { - acc.push(v); - } - forEach/* default */.A(navigation(v), function (w) { - doDfs(g, w, postorder, visited, navigation, acc); - }); - if (postorder) { - acc.push(v); - } - } -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/postorder.js - - - - -function postorder(g, vs) { - return dfs(g, vs, 'post'); -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/preorder.js - - - - -function preorder(g, vs) { - return dfs(g, vs, 'pre'); -} - -// EXTERNAL MODULE: ./node_modules/dagre-d3-es/src/graphlib/graph.js + 9 modules -var graph = __webpack_require__(73046); -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/prim.js - - - - - - -function prim(g, weightFunc) { - var result = new Graph(); - var parents = {}; - var pq = new PriorityQueue(); - var v; - - function updateNeighbors(edge) { - var w = edge.v === v ? edge.w : edge.v; - var pri = pq.priority(w); - if (pri !== undefined) { - var edgeWeight = weightFunc(edge); - if (edgeWeight < pri) { - parents[w] = v; - pq.decrease(w, edgeWeight); - } - } - } - - if (g.nodeCount() === 0) { - return result; - } - - _.each(g.nodes(), function (v) { - pq.add(v, Number.POSITIVE_INFINITY); - result.setNode(v); - }); - - // Start from an arbitrary node - pq.decrease(g.nodes()[0], 0); - - var init = false; - while (pq.size() > 0) { - v = pq.removeMin(); - if (_.has(parents, v)) { - result.setEdge(v, parents[v]); - } else if (init) { - throw new Error('Input graph is not connected: ' + g); - } else { - init = true; - } - - g.nodeEdges(v).forEach(updateNeighbors); - } - - return result; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/index.js - - - - - - - - - - - - - - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/rank/network-simplex.js - - - - - - - - -// Expose some internals for testing purposes -networkSimplex.initLowLimValues = initLowLimValues; -networkSimplex.initCutValues = initCutValues; -networkSimplex.calcCutValue = calcCutValue; -networkSimplex.leaveEdge = leaveEdge; -networkSimplex.enterEdge = enterEdge; -networkSimplex.exchangeEdges = exchangeEdges; - -/* - * The network simplex algorithm assigns ranks to each node in the input graph - * and iteratively improves the ranking to reduce the length of edges. - * - * Preconditions: - * - * 1. The input graph must be a DAG. - * 2. All nodes in the graph must have an object value. - * 3. All edges in the graph must have "minlen" and "weight" attributes. - * - * Postconditions: - * - * 1. All nodes in the graph will have an assigned "rank" attribute that has - * been optimized by the network simplex algorithm. Ranks start at 0. - * - * - * A rough sketch of the algorithm is as follows: - * - * 1. Assign initial ranks to each node. We use the longest path algorithm, - * which assigns ranks to the lowest position possible. In general this - * leads to very wide bottom ranks and unnecessarily long edges. - * 2. Construct a feasible tight tree. A tight tree is one such that all - * edges in the tree have no slack (difference between length of edge - * and minlen for the edge). This by itself greatly improves the assigned - * rankings by shorting edges. - * 3. Iteratively find edges that have negative cut values. Generally a - * negative cut value indicates that the edge could be removed and a new - * tree edge could be added to produce a more compact graph. - * - * Much of the algorithms here are derived from Gansner, et al., "A Technique - * for Drawing Directed Graphs." The structure of the file roughly follows the - * structure of the overall algorithm. - */ -function networkSimplex(g) { - g = simplify(g); - longestPath(g); - var t = feasibleTree(g); - initLowLimValues(t); - initCutValues(t, g); - - var e, f; - while ((e = leaveEdge(t))) { - f = enterEdge(t, g, e); - exchangeEdges(t, g, e, f); - } -} - -/* - * Initializes cut values for all edges in the tree. - */ -function initCutValues(t, g) { - var vs = postorder(t, t.nodes()); - vs = vs.slice(0, vs.length - 1); - forEach/* default */.A(vs, function (v) { - assignCutValue(t, g, v); - }); -} - -function assignCutValue(t, g, child) { - var childLab = t.node(child); - var parent = childLab.parent; - t.edge(child, parent).cutvalue = calcCutValue(t, g, child); -} - -/* - * Given the tight tree, its graph, and a child in the graph calculate and - * return the cut value for the edge between the child and its parent. - */ -function calcCutValue(t, g, child) { - var childLab = t.node(child); - var parent = childLab.parent; - // True if the child is on the tail end of the edge in the directed graph - var childIsTail = true; - // The graph's view of the tree edge we're inspecting - var graphEdge = g.edge(child, parent); - // The accumulated cut value for the edge between this node and its parent - var cutValue = 0; - - if (!graphEdge) { - childIsTail = false; - graphEdge = g.edge(parent, child); - } - - cutValue = graphEdge.weight; - - forEach/* default */.A(g.nodeEdges(child), function (e) { - var isOutEdge = e.v === child, - other = isOutEdge ? e.w : e.v; - - if (other !== parent) { - var pointsToHead = isOutEdge === childIsTail, - otherWeight = g.edge(e).weight; - - cutValue += pointsToHead ? otherWeight : -otherWeight; - if (isTreeEdge(t, child, other)) { - var otherCutValue = t.edge(child, other).cutvalue; - cutValue += pointsToHead ? -otherCutValue : otherCutValue; - } - } - }); - - return cutValue; -} - -function initLowLimValues(tree, root) { - if (arguments.length < 2) { - root = tree.nodes()[0]; - } - dfsAssignLowLim(tree, {}, 1, root); -} - -function dfsAssignLowLim(tree, visited, nextLim, v, parent) { - var low = nextLim; - var label = tree.node(v); - - visited[v] = true; - forEach/* default */.A(tree.neighbors(v), function (w) { - if (!has/* default */.A(visited, w)) { - nextLim = dfsAssignLowLim(tree, visited, nextLim, w, v); - } - }); - - label.low = low; - label.lim = nextLim++; - if (parent) { - label.parent = parent; - } else { - // TODO should be able to remove this when we incrementally update low lim - delete label.parent; - } - - return nextLim; -} - -function leaveEdge(tree) { - return lodash_es_find(tree.edges(), function (e) { - return tree.edge(e).cutvalue < 0; - }); -} - -function enterEdge(t, g, edge) { - var v = edge.v; - var w = edge.w; - - // For the rest of this function we assume that v is the tail and w is the - // head, so if we don't have this edge in the graph we should flip it to - // match the correct orientation. - if (!g.hasEdge(v, w)) { - v = edge.w; - w = edge.v; - } - - var vLabel = t.node(v); - var wLabel = t.node(w); - var tailLabel = vLabel; - var flip = false; - - // If the root is in the tail of the edge then we need to flip the logic that - // checks for the head and tail nodes in the candidates function below. - if (vLabel.lim > wLabel.lim) { - tailLabel = wLabel; - flip = true; - } - - var candidates = filter/* default */.A(g.edges(), function (edge) { - return ( - flip === isDescendant(t, t.node(edge.v), tailLabel) && - flip !== isDescendant(t, t.node(edge.w), tailLabel) - ); - }); - - return lodash_es_minBy(candidates, function (edge) { - return slack(g, edge); - }); -} - -function exchangeEdges(t, g, e, f) { - var v = e.v; - var w = e.w; - t.removeEdge(v, w); - t.setEdge(f.v, f.w, {}); - initLowLimValues(t); - initCutValues(t, g); - updateRanks(t, g); -} - -function updateRanks(t, g) { - var root = lodash_es_find(t.nodes(), function (v) { - return !g.node(v).parent; - }); - var vs = preorder(t, root); - vs = vs.slice(1); - forEach/* default */.A(vs, function (v) { - var parent = t.node(v).parent, - edge = g.edge(v, parent), - flipped = false; - - if (!edge) { - edge = g.edge(parent, v); - flipped = true; - } - - g.node(v).rank = g.node(parent).rank + (flipped ? edge.minlen : -edge.minlen); - }); -} - -/* - * Returns true if the edge is in the tree. - */ -function isTreeEdge(tree, u, v) { - return tree.hasEdge(u, v); -} - -/* - * Returns true if the specified node is descendant of the root node per the - * assigned low and lim attributes in the tree. - */ -function isDescendant(tree, vLabel, rootLabel) { - return rootLabel.low <= vLabel.lim && vLabel.lim <= rootLabel.lim; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/rank/index.js - - - - - - -/* - * Assigns a rank to each node in the input graph that respects the "minlen" - * constraint specified on edges between nodes. - * - * This basic structure is derived from Gansner, et al., "A Technique for - * Drawing Directed Graphs." - * - * Pre-conditions: - * - * 1. Graph must be a connected DAG - * 2. Graph nodes must be objects - * 3. Graph edges must have "weight" and "minlen" attributes - * - * Post-conditions: - * - * 1. Graph nodes will have a "rank" attribute based on the results of the - * algorithm. Ranks can start at any index (including negative), we'll - * fix them up later. - */ -function rank(g) { - switch (g.graph().ranker) { - case 'network-simplex': - networkSimplexRanker(g); - break; - case 'tight-tree': - tightTreeRanker(g); - break; - case 'longest-path': - longestPathRanker(g); - break; - default: - networkSimplexRanker(g); - } -} - -// A fast and simple ranker, but results are far from optimal. -var longestPathRanker = longestPath; - -function tightTreeRanker(g) { - longestPath(g); - feasibleTree(g); -} - -function networkSimplexRanker(g) { - networkSimplex(g); -} - -// EXTERNAL MODULE: ./node_modules/lodash-es/values.js + 1 modules -var values = __webpack_require__(38207); -// EXTERNAL MODULE: ./node_modules/lodash-es/reduce.js + 2 modules -var reduce = __webpack_require__(89463); -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/nesting-graph.js - - - - - -/* - * A nesting graph creates dummy nodes for the tops and bottoms of subgraphs, - * adds appropriate edges to ensure that all cluster nodes are placed between - * these boundries, and ensures that the graph is connected. - * - * In addition we ensure, through the use of the minlen property, that nodes - * and subgraph border nodes to not end up on the same rank. - * - * Preconditions: - * - * 1. Input graph is a DAG - * 2. Nodes in the input graph has a minlen attribute - * - * Postconditions: - * - * 1. Input graph is connected. - * 2. Dummy nodes are added for the tops and bottoms of subgraphs. - * 3. The minlen attribute for nodes is adjusted to ensure nodes do not - * get placed on the same rank as subgraph border nodes. - * - * The nesting graph idea comes from Sander, "Layout of Compound Directed - * Graphs." - */ -function nesting_graph_run(g) { - var root = addDummyNode(g, 'root', {}, '_root'); - var depths = treeDepths(g); - var height = lodash_es_max(values/* default */.A(depths)) - 1; // Note: depths is an Object not an array - var nodeSep = 2 * height + 1; - - g.graph().nestingRoot = root; - - // Multiply minlen by nodeSep to align nodes on non-border ranks. - forEach/* default */.A(g.edges(), function (e) { - g.edge(e).minlen *= nodeSep; - }); - - // Calculate a weight that is sufficient to keep subgraphs vertically compact - var weight = sumWeights(g) + 1; - - // Create border nodes and link them up - forEach/* default */.A(g.children(), function (child) { - nesting_graph_dfs(g, root, nodeSep, weight, height, depths, child); - }); - - // Save the multiplier for node layers for later removal of empty border - // layers. - g.graph().nodeRankFactor = nodeSep; -} - -function nesting_graph_dfs(g, root, nodeSep, weight, height, depths, v) { - var children = g.children(v); - if (!children.length) { - if (v !== root) { - g.setEdge(root, v, { weight: 0, minlen: nodeSep }); - } - return; - } - - var top = addBorderNode(g, '_bt'); - var bottom = addBorderNode(g, '_bb'); - var label = g.node(v); - - g.setParent(top, v); - label.borderTop = top; - g.setParent(bottom, v); - label.borderBottom = bottom; - - forEach/* default */.A(children, function (child) { - nesting_graph_dfs(g, root, nodeSep, weight, height, depths, child); - - var childNode = g.node(child); - var childTop = childNode.borderTop ? childNode.borderTop : child; - var childBottom = childNode.borderBottom ? childNode.borderBottom : child; - var thisWeight = childNode.borderTop ? weight : 2 * weight; - var minlen = childTop !== childBottom ? 1 : height - depths[v] + 1; - - g.setEdge(top, childTop, { - weight: thisWeight, - minlen: minlen, - nestingEdge: true, - }); - - g.setEdge(childBottom, bottom, { - weight: thisWeight, - minlen: minlen, - nestingEdge: true, - }); - }); - - if (!g.parent(v)) { - g.setEdge(root, top, { weight: 0, minlen: height + depths[v] }); - } -} - -function treeDepths(g) { - var depths = {}; - function dfs(v, depth) { - var children = g.children(v); - if (children && children.length) { - forEach/* default */.A(children, function (child) { - dfs(child, depth + 1); - }); - } - depths[v] = depth; - } - forEach/* default */.A(g.children(), function (v) { - dfs(v, 1); - }); - return depths; -} - -function sumWeights(g) { - return reduce/* default */.A( - g.edges(), - function (acc, e) { - return acc + g.edge(e).weight; - }, - 0 - ); -} - -function cleanup(g) { - var graphLabel = g.graph(); - g.removeNode(graphLabel.nestingRoot); - delete graphLabel.nestingRoot; - forEach/* default */.A(g.edges(), function (e) { - var edge = g.edge(e); - if (edge.nestingEdge) { - g.removeEdge(e); - } - }); -} - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseClone.js + 15 modules -var _baseClone = __webpack_require__(91641); -;// CONCATENATED MODULE: ./node_modules/lodash-es/cloneDeep.js - - -/** Used to compose bitmasks for cloning. */ -var CLONE_DEEP_FLAG = 1, - CLONE_SYMBOLS_FLAG = 4; - -/** - * This method is like `_.clone` except that it recursively clones `value`. - * - * @static - * @memberOf _ - * @since 1.0.0 - * @category Lang - * @param {*} value The value to recursively clone. - * @returns {*} Returns the deep cloned value. - * @see _.clone - * @example - * - * var objects = [{ 'a': 1 }, { 'b': 2 }]; - * - * var deep = _.cloneDeep(objects); - * console.log(deep[0] === objects[0]); - * // => false - */ -function cloneDeep(value) { - return (0,_baseClone/* default */.A)(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); -} - -/* harmony default export */ const lodash_es_cloneDeep = (cloneDeep); - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/add-subgraph-constraints.js - - - - -function addSubgraphConstraints(g, cg, vs) { - var prev = {}, - rootPrev; - - forEach/* default */.A(vs, function (v) { - var child = g.parent(v), - parent, - prevChild; - while (child) { - parent = g.parent(child); - if (parent) { - prevChild = prev[parent]; - prev[parent] = child; - } else { - prevChild = rootPrev; - rootPrev = child; - } - if (prevChild && prevChild !== child) { - cg.setEdge(prevChild, child); - return; - } - child = parent; - } - }); - - /* - function dfs(v) { - var children = v ? g.children(v) : g.children(); - if (children.length) { - var min = Number.POSITIVE_INFINITY, - subgraphs = []; - _.each(children, function(child) { - var childMin = dfs(child); - if (g.children(child).length) { - subgraphs.push({ v: child, order: childMin }); - } - min = Math.min(min, childMin); - }); - _.reduce(_.sortBy(subgraphs, "order"), function(prev, curr) { - cg.setEdge(prev.v, curr.v); - return curr; - }); - return min; - } - return g.node(v).order; - } - dfs(undefined); - */ -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/build-layer-graph.js - - - - - -/* - * Constructs a graph that can be used to sort a layer of nodes. The graph will - * contain all base and subgraph nodes from the request layer in their original - * hierarchy and any edges that are incident on these nodes and are of the type - * requested by the "relationship" parameter. - * - * Nodes from the requested rank that do not have parents are assigned a root - * node in the output graph, which is set in the root graph attribute. This - * makes it easy to walk the hierarchy of movable nodes during ordering. - * - * Pre-conditions: - * - * 1. Input graph is a DAG - * 2. Base nodes in the input graph have a rank attribute - * 3. Subgraph nodes in the input graph has minRank and maxRank attributes - * 4. Edges have an assigned weight - * - * Post-conditions: - * - * 1. Output graph has all nodes in the movable rank with preserved - * hierarchy. - * 2. Root nodes in the movable layer are made children of the node - * indicated by the root attribute of the graph. - * 3. Non-movable nodes incident on movable nodes, selected by the - * relationship parameter, are included in the graph (without hierarchy). - * 4. Edges incident on movable nodes, selected by the relationship - * parameter, are added to the output graph. - * 5. The weights for copied edges are aggregated as need, since the output - * graph is not a multi-graph. - */ -function buildLayerGraph(g, rank, relationship) { - var root = createRootNode(g), - result = new graphlib/* Graph */.T({ compound: true }) - .setGraph({ root: root }) - .setDefaultNodeLabel(function (v) { - return g.node(v); - }); - - forEach/* default */.A(g.nodes(), function (v) { - var node = g.node(v), - parent = g.parent(v); - - if (node.rank === rank || (node.minRank <= rank && rank <= node.maxRank)) { - result.setNode(v); - result.setParent(v, parent || root); - - // This assumes we have only short edges! - forEach/* default */.A(g[relationship](v), function (e) { - var u = e.v === v ? e.w : e.v, - edge = result.edge(u, v), - weight = !isUndefined/* default */.A(edge) ? edge.weight : 0; - result.setEdge(u, v, { weight: g.edge(e).weight + weight }); - }); - - if (has/* default */.A(node, 'minRank')) { - result.setNode(v, { - borderLeft: node.borderLeft[rank], - borderRight: node.borderRight[rank], - }); - } - } - }); - - return result; -} - -function createRootNode(g) { - var v; - while (g.hasNode((v = uniqueId/* default */.A('_root')))); - return v; -} - -// EXTERNAL MODULE: ./node_modules/lodash-es/_assignValue.js -var _assignValue = __webpack_require__(52851); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseZipObject.js -/** - * This base implementation of `_.zipObject` which assigns values using `assignFunc`. - * - * @private - * @param {Array} props The property identifiers. - * @param {Array} values The property values. - * @param {Function} assignFunc The function to assign values. - * @returns {Object} Returns the new object. - */ -function baseZipObject(props, values, assignFunc) { - var index = -1, - length = props.length, - valsLength = values.length, - result = {}; - - while (++index < length) { - var value = index < valsLength ? values[index] : undefined; - assignFunc(result, props[index], value); - } - return result; -} - -/* harmony default export */ const _baseZipObject = (baseZipObject); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/zipObject.js - - - -/** - * This method is like `_.fromPairs` except that it accepts two arrays, - * one of property identifiers and one of corresponding values. - * - * @static - * @memberOf _ - * @since 0.4.0 - * @category Array - * @param {Array} [props=[]] The property identifiers. - * @param {Array} [values=[]] The property values. - * @returns {Object} Returns the new object. - * @example - * - * _.zipObject(['a', 'b'], [1, 2]); - * // => { 'a': 1, 'b': 2 } - */ -function zipObject(props, values) { - return _baseZipObject(props || [], values || [], _assignValue/* default */.A); -} - -/* harmony default export */ const lodash_es_zipObject = (zipObject); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFlatten.js + 1 modules -var _baseFlatten = __webpack_require__(13588); -// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayMap.js -var _arrayMap = __webpack_require__(45572); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGet.js -var _baseGet = __webpack_require__(66318); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseMap.js -var _baseMap = __webpack_require__(52568); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseSortBy.js -/** - * The base implementation of `_.sortBy` which uses `comparer` to define the - * sort order of `array` and replaces criteria objects with their corresponding - * values. - * - * @private - * @param {Array} array The array to sort. - * @param {Function} comparer The function to define sort order. - * @returns {Array} Returns `array`. - */ -function baseSortBy(array, comparer) { - var length = array.length; - - array.sort(comparer); - while (length--) { - array[length] = array[length].value; - } - return array; -} - -/* harmony default export */ const _baseSortBy = (baseSortBy); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseUnary.js -var _baseUnary = __webpack_require__(52789); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_compareAscending.js - - -/** - * Compares values to sort them in ascending order. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {number} Returns the sort order indicator for `value`. - */ -function compareAscending(value, other) { - if (value !== other) { - var valIsDefined = value !== undefined, - valIsNull = value === null, - valIsReflexive = value === value, - valIsSymbol = (0,isSymbol/* default */.A)(value); - - var othIsDefined = other !== undefined, - othIsNull = other === null, - othIsReflexive = other === other, - othIsSymbol = (0,isSymbol/* default */.A)(other); - - if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) || - (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) || - (valIsNull && othIsDefined && othIsReflexive) || - (!valIsDefined && othIsReflexive) || - !valIsReflexive) { - return 1; - } - if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) || - (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) || - (othIsNull && valIsDefined && valIsReflexive) || - (!othIsDefined && valIsReflexive) || - !othIsReflexive) { - return -1; - } - } - return 0; -} - -/* harmony default export */ const _compareAscending = (compareAscending); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_compareMultiple.js - - -/** - * Used by `_.orderBy` to compare multiple properties of a value to another - * and stable sort them. - * - * If `orders` is unspecified, all values are sorted in ascending order. Otherwise, - * specify an order of "desc" for descending or "asc" for ascending sort order - * of corresponding values. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {boolean[]|string[]} orders The order to sort by for each property. - * @returns {number} Returns the sort order indicator for `object`. - */ -function compareMultiple(object, other, orders) { - var index = -1, - objCriteria = object.criteria, - othCriteria = other.criteria, - length = objCriteria.length, - ordersLength = orders.length; - - while (++index < length) { - var result = _compareAscending(objCriteria[index], othCriteria[index]); - if (result) { - if (index >= ordersLength) { - return result; - } - var order = orders[index]; - return result * (order == 'desc' ? -1 : 1); - } - } - // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications - // that causes it, under certain circumstances, to provide the same value for - // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247 - // for more details. - // - // This also ensures a stable sort in V8 and other engines. - // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details. - return object.index - other.index; -} - -/* harmony default export */ const _compareMultiple = (compareMultiple); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseOrderBy.js - - - - - - - - - - -/** - * The base implementation of `_.orderBy` without param guards. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. - * @param {string[]} orders The sort orders of `iteratees`. - * @returns {Array} Returns the new sorted array. - */ -function baseOrderBy(collection, iteratees, orders) { - if (iteratees.length) { - iteratees = (0,_arrayMap/* default */.A)(iteratees, function(iteratee) { - if ((0,isArray/* default */.A)(iteratee)) { - return function(value) { - return (0,_baseGet/* default */.A)(value, iteratee.length === 1 ? iteratee[0] : iteratee); - } - } - return iteratee; - }); - } else { - iteratees = [identity/* default */.A]; - } - - var index = -1; - iteratees = (0,_arrayMap/* default */.A)(iteratees, (0,_baseUnary/* default */.A)(_baseIteratee/* default */.A)); - - var result = (0,_baseMap/* default */.A)(collection, function(value, key, collection) { - var criteria = (0,_arrayMap/* default */.A)(iteratees, function(iteratee) { - return iteratee(value); - }); - return { 'criteria': criteria, 'index': ++index, 'value': value }; - }); - - return _baseSortBy(result, function(object, other) { - return _compareMultiple(object, other, orders); - }); -} - -/* harmony default export */ const _baseOrderBy = (baseOrderBy); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseRest.js -var _baseRest = __webpack_require__(24326); -// EXTERNAL MODULE: ./node_modules/lodash-es/_isIterateeCall.js -var _isIterateeCall = __webpack_require__(6832); -;// CONCATENATED MODULE: ./node_modules/lodash-es/sortBy.js - - - - - -/** - * Creates an array of elements, sorted in ascending order by the results of - * running each element in a collection thru each iteratee. This method - * performs a stable sort, that is, it preserves the original sort order of - * equal elements. The iteratees are invoked with one argument: (value). - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {...(Function|Function[])} [iteratees=[_.identity]] - * The iteratees to sort by. - * @returns {Array} Returns the new sorted array. - * @example - * - * var users = [ - * { 'user': 'fred', 'age': 48 }, - * { 'user': 'barney', 'age': 36 }, - * { 'user': 'fred', 'age': 30 }, - * { 'user': 'barney', 'age': 34 } - * ]; - * - * _.sortBy(users, [function(o) { return o.user; }]); - * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]] - * - * _.sortBy(users, ['user', 'age']); - * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]] - */ -var sortBy = (0,_baseRest/* default */.A)(function(collection, iteratees) { - if (collection == null) { - return []; - } - var length = iteratees.length; - if (length > 1 && (0,_isIterateeCall/* default */.A)(collection, iteratees[0], iteratees[1])) { - iteratees = []; - } else if (length > 2 && (0,_isIterateeCall/* default */.A)(iteratees[0], iteratees[1], iteratees[2])) { - iteratees = [iteratees[0]]; - } - return _baseOrderBy(collection, (0,_baseFlatten/* default */.A)(iteratees, 1), []); -}); - -/* harmony default export */ const lodash_es_sortBy = (sortBy); - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/cross-count.js - - - - -/* - * A function that takes a layering (an array of layers, each with an array of - * ordererd nodes) and a graph and returns a weighted crossing count. - * - * Pre-conditions: - * - * 1. Input graph must be simple (not a multigraph), directed, and include - * only simple edges. - * 2. Edges in the input graph must have assigned weights. - * - * Post-conditions: - * - * 1. The graph and layering matrix are left unchanged. - * - * This algorithm is derived from Barth, et al., "Bilayer Cross Counting." - */ -function crossCount(g, layering) { - var cc = 0; - for (var i = 1; i < layering.length; ++i) { - cc += twoLayerCrossCount(g, layering[i - 1], layering[i]); - } - return cc; -} - -function twoLayerCrossCount(g, northLayer, southLayer) { - // Sort all of the edges between the north and south layers by their position - // in the north layer and then the south. Map these edges to the position of - // their head in the south layer. - var southPos = lodash_es_zipObject( - southLayer, - map/* default */.A(southLayer, function (v, i) { - return i; - }) - ); - var southEntries = flatten/* default */.A( - map/* default */.A(northLayer, function (v) { - return lodash_es_sortBy( - map/* default */.A(g.outEdges(v), function (e) { - return { pos: southPos[e.w], weight: g.edge(e).weight }; - }), - 'pos' - ); - }) - ); - - // Build the accumulator tree - var firstIndex = 1; - while (firstIndex < southLayer.length) firstIndex <<= 1; - var treeSize = 2 * firstIndex - 1; - firstIndex -= 1; - var tree = map/* default */.A(new Array(treeSize), function () { - return 0; - }); - - // Calculate the weighted crossings - var cc = 0; - forEach/* default */.A( - // @ts-expect-error - southEntries.forEach(function (entry) { - var index = entry.pos + firstIndex; - tree[index] += entry.weight; - var weightSum = 0; - // @ts-expect-error - while (index > 0) { - // @ts-expect-error - if (index % 2) { - weightSum += tree[index + 1]; - } - // @ts-expect-error - index = (index - 1) >> 1; - tree[index] += entry.weight; - } - cc += entry.weight * weightSum; - }) - ); - - return cc; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/init-order.js - - - - -/* - * Assigns an initial order value for each node by performing a DFS search - * starting from nodes in the first rank. Nodes are assigned an order in their - * rank as they are first visited. - * - * This approach comes from Gansner, et al., "A Technique for Drawing Directed - * Graphs." - * - * Returns a layering matrix with an array per layer and each layer sorted by - * the order of its nodes. - */ -function initOrder(g) { - var visited = {}; - var simpleNodes = filter/* default */.A(g.nodes(), function (v) { - return !g.children(v).length; - }); - var maxRank = lodash_es_max( - map/* default */.A(simpleNodes, function (v) { - return g.node(v).rank; - }) - ); - var layers = map/* default */.A(range/* default */.A(maxRank + 1), function () { - return []; - }); - - function dfs(v) { - if (has/* default */.A(visited, v)) return; - visited[v] = true; - var node = g.node(v); - layers[node.rank].push(v); - forEach/* default */.A(g.successors(v), dfs); - } - - var orderedVs = lodash_es_sortBy(simpleNodes, function (v) { - return g.node(v).rank; - }); - forEach/* default */.A(orderedVs, dfs); - - return layers; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/barycenter.js - - - - -function barycenter(g, movable) { - return map/* default */.A(movable, function (v) { - var inV = g.inEdges(v); - if (!inV.length) { - return { v: v }; - } else { - var result = reduce/* default */.A( - inV, - function (acc, e) { - var edge = g.edge(e), - nodeU = g.node(e.v); - return { - sum: acc.sum + edge.weight * nodeU.order, - weight: acc.weight + edge.weight, - }; - }, - { sum: 0, weight: 0 } - ); - - return { - v: v, - barycenter: result.sum / result.weight, - weight: result.weight, - }; - } - }); -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/resolve-conflicts.js - - - - -/* - * Given a list of entries of the form {v, barycenter, weight} and a - * constraint graph this function will resolve any conflicts between the - * constraint graph and the barycenters for the entries. If the barycenters for - * an entry would violate a constraint in the constraint graph then we coalesce - * the nodes in the conflict into a new node that respects the contraint and - * aggregates barycenter and weight information. - * - * This implementation is based on the description in Forster, "A Fast and - * Simple Hueristic for Constrained Two-Level Crossing Reduction," thought it - * differs in some specific details. - * - * Pre-conditions: - * - * 1. Each entry has the form {v, barycenter, weight}, or if the node has - * no barycenter, then {v}. - * - * Returns: - * - * A new list of entries of the form {vs, i, barycenter, weight}. The list - * `vs` may either be a singleton or it may be an aggregation of nodes - * ordered such that they do not violate constraints from the constraint - * graph. The property `i` is the lowest original index of any of the - * elements in `vs`. - */ -function resolveConflicts(entries, cg) { - var mappedEntries = {}; - forEach/* default */.A(entries, function (entry, i) { - var tmp = (mappedEntries[entry.v] = { - indegree: 0, - in: [], - out: [], - vs: [entry.v], - i: i, - }); - if (!isUndefined/* default */.A(entry.barycenter)) { - // @ts-expect-error - tmp.barycenter = entry.barycenter; - // @ts-expect-error - tmp.weight = entry.weight; - } - }); - - forEach/* default */.A(cg.edges(), function (e) { - var entryV = mappedEntries[e.v]; - var entryW = mappedEntries[e.w]; - if (!isUndefined/* default */.A(entryV) && !isUndefined/* default */.A(entryW)) { - entryW.indegree++; - entryV.out.push(mappedEntries[e.w]); - } - }); - - var sourceSet = filter/* default */.A(mappedEntries, function (entry) { - // @ts-expect-error - return !entry.indegree; - }); - - return doResolveConflicts(sourceSet); -} - -function doResolveConflicts(sourceSet) { - var entries = []; - - function handleIn(vEntry) { - return function (uEntry) { - if (uEntry.merged) { - return; - } - if ( - isUndefined/* default */.A(uEntry.barycenter) || - isUndefined/* default */.A(vEntry.barycenter) || - uEntry.barycenter >= vEntry.barycenter - ) { - mergeEntries(vEntry, uEntry); - } - }; - } - - function handleOut(vEntry) { - return function (wEntry) { - wEntry['in'].push(vEntry); - if (--wEntry.indegree === 0) { - sourceSet.push(wEntry); - } - }; - } - - while (sourceSet.length) { - var entry = sourceSet.pop(); - entries.push(entry); - forEach/* default */.A(entry['in'].reverse(), handleIn(entry)); - forEach/* default */.A(entry.out, handleOut(entry)); - } - - return map/* default */.A( - filter/* default */.A(entries, function (entry) { - return !entry.merged; - }), - function (entry) { - return pick/* default */.A(entry, ['vs', 'i', 'barycenter', 'weight']); - } - ); -} - -function mergeEntries(target, source) { - var sum = 0; - var weight = 0; - - if (target.weight) { - sum += target.barycenter * target.weight; - weight += target.weight; - } - - if (source.weight) { - sum += source.barycenter * source.weight; - weight += source.weight; - } - - target.vs = source.vs.concat(target.vs); - target.barycenter = sum / weight; - target.weight = weight; - target.i = Math.min(source.i, target.i); - source.merged = true; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/sort.js - - - - - -function sort(entries, biasRight) { - var parts = partition(entries, function (entry) { - return has/* default */.A(entry, 'barycenter'); - }); - var sortable = parts.lhs, - unsortable = lodash_es_sortBy(parts.rhs, function (entry) { - return -entry.i; - }), - vs = [], - sum = 0, - weight = 0, - vsIndex = 0; - - sortable.sort(compareWithBias(!!biasRight)); - - vsIndex = consumeUnsortable(vs, unsortable, vsIndex); - - forEach/* default */.A(sortable, function (entry) { - vsIndex += entry.vs.length; - vs.push(entry.vs); - sum += entry.barycenter * entry.weight; - weight += entry.weight; - vsIndex = consumeUnsortable(vs, unsortable, vsIndex); - }); - - var result = { vs: flatten/* default */.A(vs) }; - if (weight) { - result.barycenter = sum / weight; - result.weight = weight; - } - return result; -} - -function consumeUnsortable(vs, unsortable, index) { - var last; - while (unsortable.length && (last = lodash_es_last(unsortable)).i <= index) { - unsortable.pop(); - vs.push(last.vs); - index++; - } - return index; -} - -function compareWithBias(bias) { - return function (entryV, entryW) { - if (entryV.barycenter < entryW.barycenter) { - return -1; - } else if (entryV.barycenter > entryW.barycenter) { - return 1; - } - - return !bias ? entryV.i - entryW.i : entryW.i - entryV.i; - }; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/sort-subgraph.js - - - - - - - -function sortSubgraph(g, v, cg, biasRight) { - var movable = g.children(v); - var node = g.node(v); - var bl = node ? node.borderLeft : undefined; - var br = node ? node.borderRight : undefined; - var subgraphs = {}; - - if (bl) { - movable = filter/* default */.A(movable, function (w) { - return w !== bl && w !== br; - }); - } - - var barycenters = barycenter(g, movable); - forEach/* default */.A(barycenters, function (entry) { - if (g.children(entry.v).length) { - var subgraphResult = sortSubgraph(g, entry.v, cg, biasRight); - subgraphs[entry.v] = subgraphResult; - if (has/* default */.A(subgraphResult, 'barycenter')) { - mergeBarycenters(entry, subgraphResult); - } - } - }); - - var entries = resolveConflicts(barycenters, cg); - expandSubgraphs(entries, subgraphs); - - var result = sort(entries, biasRight); - - if (bl) { - result.vs = flatten/* default */.A([bl, result.vs, br]); - if (g.predecessors(bl).length) { - var blPred = g.node(g.predecessors(bl)[0]), - brPred = g.node(g.predecessors(br)[0]); - if (!has/* default */.A(result, 'barycenter')) { - result.barycenter = 0; - result.weight = 0; - } - result.barycenter = - (result.barycenter * result.weight + blPred.order + brPred.order) / (result.weight + 2); - result.weight += 2; - } - } - - return result; -} - -function expandSubgraphs(entries, subgraphs) { - forEach/* default */.A(entries, function (entry) { - entry.vs = flatten/* default */.A( - entry.vs.map(function (v) { - if (subgraphs[v]) { - return subgraphs[v].vs; - } - return v; - }) - ); - }); -} - -function mergeBarycenters(target, other) { - if (!isUndefined/* default */.A(target.barycenter)) { - target.barycenter = - (target.barycenter * target.weight + other.barycenter * other.weight) / - (target.weight + other.weight); - target.weight += other.weight; - } else { - target.barycenter = other.barycenter; - target.weight = other.weight; - } -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/index.js - - - - - - - - - - - -/* - * Applies heuristics to minimize edge crossings in the graph and sets the best - * order solution as an order attribute on each node. - * - * Pre-conditions: - * - * 1. Graph must be DAG - * 2. Graph nodes must be objects with a "rank" attribute - * 3. Graph edges must have the "weight" attribute - * - * Post-conditions: - * - * 1. Graph nodes will have an "order" attribute based on the results of the - * algorithm. - */ -function order(g) { - var maxRank = util_maxRank(g), - downLayerGraphs = buildLayerGraphs(g, range/* default */.A(1, maxRank + 1), 'inEdges'), - upLayerGraphs = buildLayerGraphs(g, range/* default */.A(maxRank - 1, -1, -1), 'outEdges'); - - var layering = initOrder(g); - assignOrder(g, layering); - - var bestCC = Number.POSITIVE_INFINITY, - best; - - for (var i = 0, lastBest = 0; lastBest < 4; ++i, ++lastBest) { - sweepLayerGraphs(i % 2 ? downLayerGraphs : upLayerGraphs, i % 4 >= 2); - - layering = buildLayerMatrix(g); - var cc = crossCount(g, layering); - if (cc < bestCC) { - lastBest = 0; - best = lodash_es_cloneDeep(layering); - bestCC = cc; - } - } - - assignOrder(g, best); -} - -function buildLayerGraphs(g, ranks, relationship) { - return map/* default */.A(ranks, function (rank) { - return buildLayerGraph(g, rank, relationship); - }); -} - -function sweepLayerGraphs(layerGraphs, biasRight) { - var cg = new graphlib/* Graph */.T(); - forEach/* default */.A(layerGraphs, function (lg) { - var root = lg.graph().root; - var sorted = sortSubgraph(lg, root, cg, biasRight); - forEach/* default */.A(sorted.vs, function (v, i) { - lg.node(v).order = i; - }); - addSubgraphConstraints(lg, cg, sorted.vs); - }); -} - -function assignOrder(g, layering) { - forEach/* default */.A(layering, function (layer) { - forEach/* default */.A(layer, function (v, i) { - g.node(v).order = i; - }); - }); -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/parent-dummy-chains.js - - - - -function parentDummyChains(g) { - var postorderNums = parent_dummy_chains_postorder(g); - - forEach/* default */.A(g.graph().dummyChains, function (v) { - var node = g.node(v); - var edgeObj = node.edgeObj; - var pathData = findPath(g, postorderNums, edgeObj.v, edgeObj.w); - var path = pathData.path; - var lca = pathData.lca; - var pathIdx = 0; - var pathV = path[pathIdx]; - var ascending = true; - - while (v !== edgeObj.w) { - node = g.node(v); - - if (ascending) { - while ((pathV = path[pathIdx]) !== lca && g.node(pathV).maxRank < node.rank) { - pathIdx++; - } - - if (pathV === lca) { - ascending = false; - } - } - - if (!ascending) { - while ( - pathIdx < path.length - 1 && - g.node((pathV = path[pathIdx + 1])).minRank <= node.rank - ) { - pathIdx++; - } - pathV = path[pathIdx]; - } - - g.setParent(v, pathV); - v = g.successors(v)[0]; - } - }); -} - -// Find a path from v to w through the lowest common ancestor (LCA). Return the -// full path and the LCA. -function findPath(g, postorderNums, v, w) { - var vPath = []; - var wPath = []; - var low = Math.min(postorderNums[v].low, postorderNums[w].low); - var lim = Math.max(postorderNums[v].lim, postorderNums[w].lim); - var parent; - var lca; - - // Traverse up from v to find the LCA - parent = v; - do { - parent = g.parent(parent); - vPath.push(parent); - } while (parent && (postorderNums[parent].low > low || lim > postorderNums[parent].lim)); - lca = parent; - - // Traverse from w to LCA - parent = w; - while ((parent = g.parent(parent)) !== lca) { - wPath.push(parent); - } - - return { path: vPath.concat(wPath.reverse()), lca: lca }; -} - -function parent_dummy_chains_postorder(g) { - var result = {}; - var lim = 0; - - function dfs(v) { - var low = lim; - forEach/* default */.A(g.children(v), dfs); - result[v] = { low: low, lim: lim++ }; - } - forEach/* default */.A(g.children(), dfs); - - return result; -} - -// EXTERNAL MODULE: ./node_modules/lodash-es/_castFunction.js -var _castFunction = __webpack_require__(99922); -;// CONCATENATED MODULE: ./node_modules/lodash-es/forOwn.js - - - -/** - * Iterates over own enumerable string keyed properties of an object and - * invokes `iteratee` for each property. The iteratee is invoked with three - * arguments: (value, key, object). Iteratee functions may exit iteration - * early by explicitly returning `false`. - * - * @static - * @memberOf _ - * @since 0.3.0 - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Object} Returns `object`. - * @see _.forOwnRight - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.forOwn(new Foo, function(value, key) { - * console.log(key); - * }); - * // => Logs 'a' then 'b' (iteration order is not guaranteed). - */ -function forOwn(object, iteratee) { - return object && (0,_baseForOwn/* default */.A)(object, (0,_castFunction/* default */.A)(iteratee)); -} - -/* harmony default export */ const lodash_es_forOwn = (forOwn); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFor.js + 1 modules -var _baseFor = __webpack_require__(4574); -// EXTERNAL MODULE: ./node_modules/lodash-es/keysIn.js + 2 modules -var keysIn = __webpack_require__(55615); -;// CONCATENATED MODULE: ./node_modules/lodash-es/forIn.js - - - - -/** - * Iterates over own and inherited enumerable string keyed properties of an - * object and invokes `iteratee` for each property. The iteratee is invoked - * with three arguments: (value, key, object). Iteratee functions may exit - * iteration early by explicitly returning `false`. - * - * @static - * @memberOf _ - * @since 0.3.0 - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Object} Returns `object`. - * @see _.forInRight - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.forIn(new Foo, function(value, key) { - * console.log(key); - * }); - * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed). - */ -function forIn(object, iteratee) { - return object == null - ? object - : (0,_baseFor/* default */.A)(object, (0,_castFunction/* default */.A)(iteratee), keysIn/* default */.A); -} - -/* harmony default export */ const lodash_es_forIn = (forIn); - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/position/bk.js - - - - -/* - * This module provides coordinate assignment based on Brandes and Köpf, "Fast - * and Simple Horizontal Coordinate Assignment." - */ - - - -/* - * Marks all edges in the graph with a type-1 conflict with the "type1Conflict" - * property. A type-1 conflict is one where a non-inner segment crosses an - * inner segment. An inner segment is an edge with both incident nodes marked - * with the "dummy" property. - * - * This algorithm scans layer by layer, starting with the second, for type-1 - * conflicts between the current layer and the previous layer. For each layer - * it scans the nodes from left to right until it reaches one that is incident - * on an inner segment. It then scans predecessors to determine if they have - * edges that cross that inner segment. At the end a final scan is done for all - * nodes on the current rank to see if they cross the last visited inner - * segment. - * - * This algorithm (safely) assumes that a dummy node will only be incident on a - * single node in the layers being scanned. - */ -function findType1Conflicts(g, layering) { - var conflicts = {}; - - function visitLayer(prevLayer, layer) { - var // last visited node in the previous layer that is incident on an inner - // segment. - k0 = 0, - // Tracks the last node in this layer scanned for crossings with a type-1 - // segment. - scanPos = 0, - prevLayerLength = prevLayer.length, - lastNode = lodash_es_last(layer); - - forEach/* default */.A(layer, function (v, i) { - var w = findOtherInnerSegmentNode(g, v), - k1 = w ? g.node(w).order : prevLayerLength; - - if (w || v === lastNode) { - forEach/* default */.A(layer.slice(scanPos, i + 1), function (scanNode) { - forEach/* default */.A(g.predecessors(scanNode), function (u) { - var uLabel = g.node(u), - uPos = uLabel.order; - if ((uPos < k0 || k1 < uPos) && !(uLabel.dummy && g.node(scanNode).dummy)) { - addConflict(conflicts, u, scanNode); - } - }); - }); - // @ts-expect-error - scanPos = i + 1; - k0 = k1; - } - }); - - return layer; - } - - reduce/* default */.A(layering, visitLayer); - return conflicts; -} - -function findType2Conflicts(g, layering) { - var conflicts = {}; - - function scan(south, southPos, southEnd, prevNorthBorder, nextNorthBorder) { - var v; - forEach/* default */.A(range/* default */.A(southPos, southEnd), function (i) { - v = south[i]; - if (g.node(v).dummy) { - forEach/* default */.A(g.predecessors(v), function (u) { - var uNode = g.node(u); - if (uNode.dummy && (uNode.order < prevNorthBorder || uNode.order > nextNorthBorder)) { - addConflict(conflicts, u, v); - } - }); - } - }); - } - - function visitLayer(north, south) { - var prevNorthPos = -1, - nextNorthPos, - southPos = 0; - - forEach/* default */.A(south, function (v, southLookahead) { - if (g.node(v).dummy === 'border') { - var predecessors = g.predecessors(v); - if (predecessors.length) { - nextNorthPos = g.node(predecessors[0]).order; - scan(south, southPos, southLookahead, prevNorthPos, nextNorthPos); - // @ts-expect-error - southPos = southLookahead; - prevNorthPos = nextNorthPos; - } - } - scan(south, southPos, south.length, nextNorthPos, north.length); - }); - - return south; - } - - reduce/* default */.A(layering, visitLayer); - return conflicts; -} - -function findOtherInnerSegmentNode(g, v) { - if (g.node(v).dummy) { - return lodash_es_find(g.predecessors(v), function (u) { - return g.node(u).dummy; - }); - } -} - -function addConflict(conflicts, v, w) { - if (v > w) { - var tmp = v; - v = w; - w = tmp; - } - - var conflictsV = conflicts[v]; - if (!conflictsV) { - conflicts[v] = conflictsV = {}; - } - conflictsV[w] = true; -} - -function hasConflict(conflicts, v, w) { - if (v > w) { - var tmp = v; - v = w; - w = tmp; - } - return has/* default */.A(conflicts[v], w); -} - -/* - * Try to align nodes into vertical "blocks" where possible. This algorithm - * attempts to align a node with one of its median neighbors. If the edge - * connecting a neighbor is a type-1 conflict then we ignore that possibility. - * If a previous node has already formed a block with a node after the node - * we're trying to form a block with, we also ignore that possibility - our - * blocks would be split in that scenario. - */ -function verticalAlignment(g, layering, conflicts, neighborFn) { - var root = {}, - align = {}, - pos = {}; - - // We cache the position here based on the layering because the graph and - // layering may be out of sync. The layering matrix is manipulated to - // generate different extreme alignments. - forEach/* default */.A(layering, function (layer) { - forEach/* default */.A(layer, function (v, order) { - root[v] = v; - align[v] = v; - pos[v] = order; - }); - }); - - forEach/* default */.A(layering, function (layer) { - var prevIdx = -1; - forEach/* default */.A(layer, function (v) { - var ws = neighborFn(v); - if (ws.length) { - ws = lodash_es_sortBy(ws, function (w) { - return pos[w]; - }); - var mp = (ws.length - 1) / 2; - for (var i = Math.floor(mp), il = Math.ceil(mp); i <= il; ++i) { - var w = ws[i]; - if (align[v] === v && prevIdx < pos[w] && !hasConflict(conflicts, v, w)) { - align[w] = v; - align[v] = root[v] = root[w]; - prevIdx = pos[w]; - } - } - } - }); - }); - - return { root: root, align: align }; -} - -function horizontalCompaction(g, layering, root, align, reverseSep) { - // This portion of the algorithm differs from BK due to a number of problems. - // Instead of their algorithm we construct a new block graph and do two - // sweeps. The first sweep places blocks with the smallest possible - // coordinates. The second sweep removes unused space by moving blocks to the - // greatest coordinates without violating separation. - var xs = {}, - blockG = buildBlockGraph(g, layering, root, reverseSep), - borderType = reverseSep ? 'borderLeft' : 'borderRight'; - - function iterate(setXsFunc, nextNodesFunc) { - var stack = blockG.nodes(); - var elem = stack.pop(); - var visited = {}; - while (elem) { - if (visited[elem]) { - setXsFunc(elem); - } else { - visited[elem] = true; - stack.push(elem); - stack = stack.concat(nextNodesFunc(elem)); - } - - elem = stack.pop(); - } - } - - // First pass, assign smallest coordinates - function pass1(elem) { - xs[elem] = blockG.inEdges(elem).reduce(function (acc, e) { - return Math.max(acc, xs[e.v] + blockG.edge(e)); - }, 0); - } - - // Second pass, assign greatest coordinates - function pass2(elem) { - var min = blockG.outEdges(elem).reduce(function (acc, e) { - return Math.min(acc, xs[e.w] - blockG.edge(e)); - }, Number.POSITIVE_INFINITY); - - var node = g.node(elem); - if (min !== Number.POSITIVE_INFINITY && node.borderType !== borderType) { - xs[elem] = Math.max(xs[elem], min); - } - } - - iterate(pass1, blockG.predecessors.bind(blockG)); - iterate(pass2, blockG.successors.bind(blockG)); - - // Assign x coordinates to all nodes - forEach/* default */.A(align, function (v) { - xs[v] = xs[root[v]]; - }); - - return xs; -} - -function buildBlockGraph(g, layering, root, reverseSep) { - var blockGraph = new graphlib/* Graph */.T(), - graphLabel = g.graph(), - sepFn = sep(graphLabel.nodesep, graphLabel.edgesep, reverseSep); - - forEach/* default */.A(layering, function (layer) { - var u; - forEach/* default */.A(layer, function (v) { - var vRoot = root[v]; - blockGraph.setNode(vRoot); - if (u) { - var uRoot = root[u], - prevMax = blockGraph.edge(uRoot, vRoot); - blockGraph.setEdge(uRoot, vRoot, Math.max(sepFn(g, v, u), prevMax || 0)); - } - u = v; - }); - }); - - return blockGraph; -} - -/* - * Returns the alignment that has the smallest width of the given alignments. - */ -function findSmallestWidthAlignment(g, xss) { - return lodash_es_minBy(values/* default */.A(xss), function (xs) { - var max = Number.NEGATIVE_INFINITY; - var min = Number.POSITIVE_INFINITY; - - lodash_es_forIn(xs, function (x, v) { - var halfWidth = width(g, v) / 2; - - max = Math.max(x + halfWidth, max); - min = Math.min(x - halfWidth, min); - }); - - return max - min; - }); -} - -/* - * Align the coordinates of each of the layout alignments such that - * left-biased alignments have their minimum coordinate at the same point as - * the minimum coordinate of the smallest width alignment and right-biased - * alignments have their maximum coordinate at the same point as the maximum - * coordinate of the smallest width alignment. - */ -function alignCoordinates(xss, alignTo) { - var alignToVals = values/* default */.A(alignTo), - alignToMin = lodash_es_min(alignToVals), - alignToMax = lodash_es_max(alignToVals); - - forEach/* default */.A(['u', 'd'], function (vert) { - forEach/* default */.A(['l', 'r'], function (horiz) { - var alignment = vert + horiz, - xs = xss[alignment], - delta; - if (xs === alignTo) return; - - var xsVals = values/* default */.A(xs); - delta = horiz === 'l' ? alignToMin - lodash_es_min(xsVals) : alignToMax - lodash_es_max(xsVals); - - if (delta) { - xss[alignment] = lodash_es_mapValues(xs, function (x) { - return x + delta; - }); - } - }); - }); -} - -function balance(xss, align) { - return lodash_es_mapValues(xss.ul, function (ignore, v) { - if (align) { - return xss[align.toLowerCase()][v]; - } else { - var xs = lodash_es_sortBy(map/* default */.A(xss, v)); - return (xs[1] + xs[2]) / 2; - } - }); -} - -function positionX(g) { - var layering = buildLayerMatrix(g); - var conflicts = merge/* default */.A(findType1Conflicts(g, layering), findType2Conflicts(g, layering)); - - var xss = {}; - var adjustedLayering; - forEach/* default */.A(['u', 'd'], function (vert) { - adjustedLayering = vert === 'u' ? layering : values/* default */.A(layering).reverse(); - forEach/* default */.A(['l', 'r'], function (horiz) { - if (horiz === 'r') { - adjustedLayering = map/* default */.A(adjustedLayering, function (inner) { - return values/* default */.A(inner).reverse(); - }); - } - - var neighborFn = (vert === 'u' ? g.predecessors : g.successors).bind(g); - var align = verticalAlignment(g, adjustedLayering, conflicts, neighborFn); - var xs = horizontalCompaction(g, adjustedLayering, align.root, align.align, horiz === 'r'); - if (horiz === 'r') { - xs = lodash_es_mapValues(xs, function (x) { - return -x; - }); - } - xss[vert + horiz] = xs; - }); - }); - - var smallestWidth = findSmallestWidthAlignment(g, xss); - alignCoordinates(xss, smallestWidth); - return balance(xss, g.graph().align); -} - -function sep(nodeSep, edgeSep, reverseSep) { - return function (g, v, w) { - var vLabel = g.node(v); - var wLabel = g.node(w); - var sum = 0; - var delta; - - sum += vLabel.width / 2; - if (has/* default */.A(vLabel, 'labelpos')) { - switch (vLabel.labelpos.toLowerCase()) { - case 'l': - delta = -vLabel.width / 2; - break; - case 'r': - delta = vLabel.width / 2; - break; - } - } - if (delta) { - sum += reverseSep ? delta : -delta; - } - delta = 0; - - sum += (vLabel.dummy ? edgeSep : nodeSep) / 2; - sum += (wLabel.dummy ? edgeSep : nodeSep) / 2; - - sum += wLabel.width / 2; - if (has/* default */.A(wLabel, 'labelpos')) { - switch (wLabel.labelpos.toLowerCase()) { - case 'l': - delta = wLabel.width / 2; - break; - case 'r': - delta = -wLabel.width / 2; - break; - } - } - if (delta) { - sum += reverseSep ? delta : -delta; - } - delta = 0; - - return sum; - }; -} - -function width(g, v) { - return g.node(v).width; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/position/index.js - - - - - - -function position(g) { - g = asNonCompoundGraph(g); - - positionY(g); - lodash_es_forOwn(positionX(g), function (x, v) { - g.node(v).x = x; - }); -} - -function positionY(g) { - var layering = buildLayerMatrix(g); - var rankSep = g.graph().ranksep; - var prevY = 0; - forEach/* default */.A(layering, function (layer) { - var maxHeight = lodash_es_max( - map/* default */.A(layer, function (v) { - return g.node(v).height; - }) - ); - forEach/* default */.A(layer, function (v) { - g.node(v).y = prevY + maxHeight / 2; - }); - prevY += maxHeight + rankSep; - }); -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/layout.js - - - - - - - - - - - - - - - -function layout(g, opts) { - var time = opts && opts.debugTiming ? util_time : notime; - time('layout', function () { - var layoutGraph = time(' buildLayoutGraph', function () { - return buildLayoutGraph(g); - }); - time(' runLayout', function () { - runLayout(layoutGraph, time); - }); - time(' updateInputGraph', function () { - updateInputGraph(g, layoutGraph); - }); - }); -} - -function runLayout(g, time) { - time(' makeSpaceForEdgeLabels', function () { - makeSpaceForEdgeLabels(g); - }); - time(' removeSelfEdges', function () { - removeSelfEdges(g); - }); - time(' acyclic', function () { - run(g); - }); - time(' nestingGraph.run', function () { - nesting_graph_run(g); - }); - time(' rank', function () { - rank(asNonCompoundGraph(g)); - }); - time(' injectEdgeLabelProxies', function () { - injectEdgeLabelProxies(g); - }); - time(' removeEmptyRanks', function () { - removeEmptyRanks(g); - }); - time(' nestingGraph.cleanup', function () { - cleanup(g); - }); - time(' normalizeRanks', function () { - normalizeRanks(g); - }); - time(' assignRankMinMax', function () { - assignRankMinMax(g); - }); - time(' removeEdgeLabelProxies', function () { - removeEdgeLabelProxies(g); - }); - time(' normalize.run', function () { - normalize_run(g); - }); - time(' parentDummyChains', function () { - parentDummyChains(g); - }); - time(' addBorderSegments', function () { - addBorderSegments(g); - }); - time(' order', function () { - order(g); - }); - time(' insertSelfEdges', function () { - insertSelfEdges(g); - }); - time(' adjustCoordinateSystem', function () { - adjust(g); - }); - time(' position', function () { - position(g); - }); - time(' positionSelfEdges', function () { - positionSelfEdges(g); - }); - time(' removeBorderNodes', function () { - removeBorderNodes(g); - }); - time(' normalize.undo', function () { - normalize_undo(g); - }); - time(' fixupEdgeLabelCoords', function () { - fixupEdgeLabelCoords(g); - }); - time(' undoCoordinateSystem', function () { - coordinate_system_undo(g); - }); - time(' translateGraph', function () { - translateGraph(g); - }); - time(' assignNodeIntersects', function () { - assignNodeIntersects(g); - }); - time(' reversePoints', function () { - reversePointsForReversedEdges(g); - }); - time(' acyclic.undo', function () { - undo(g); - }); -} - -/* - * Copies final layout information from the layout graph back to the input - * graph. This process only copies whitelisted attributes from the layout graph - * to the input graph, so it serves as a good place to determine what - * attributes can influence layout. - */ -function updateInputGraph(inputGraph, layoutGraph) { - forEach/* default */.A(inputGraph.nodes(), function (v) { - var inputLabel = inputGraph.node(v); - var layoutLabel = layoutGraph.node(v); - - if (inputLabel) { - inputLabel.x = layoutLabel.x; - inputLabel.y = layoutLabel.y; - - if (layoutGraph.children(v).length) { - inputLabel.width = layoutLabel.width; - inputLabel.height = layoutLabel.height; - } - } - }); - - forEach/* default */.A(inputGraph.edges(), function (e) { - var inputLabel = inputGraph.edge(e); - var layoutLabel = layoutGraph.edge(e); - - inputLabel.points = layoutLabel.points; - if (has/* default */.A(layoutLabel, 'x')) { - inputLabel.x = layoutLabel.x; - inputLabel.y = layoutLabel.y; - } - }); - - inputGraph.graph().width = layoutGraph.graph().width; - inputGraph.graph().height = layoutGraph.graph().height; -} - -var graphNumAttrs = ['nodesep', 'edgesep', 'ranksep', 'marginx', 'marginy']; -var graphDefaults = { ranksep: 50, edgesep: 20, nodesep: 50, rankdir: 'tb' }; -var graphAttrs = ['acyclicer', 'ranker', 'rankdir', 'align']; -var nodeNumAttrs = ['width', 'height']; -var nodeDefaults = { width: 0, height: 0 }; -var edgeNumAttrs = ['minlen', 'weight', 'width', 'height', 'labeloffset']; -var edgeDefaults = { - minlen: 1, - weight: 1, - width: 0, - height: 0, - labeloffset: 10, - labelpos: 'r', -}; -var edgeAttrs = ['labelpos']; - -/* - * Constructs a new graph from the input graph, which can be used for layout. - * This process copies only whitelisted attributes from the input graph to the - * layout graph. Thus this function serves as a good place to determine what - * attributes can influence layout. - */ -function buildLayoutGraph(inputGraph) { - var g = new graphlib/* Graph */.T({ multigraph: true, compound: true }); - var graph = canonicalize(inputGraph.graph()); - - g.setGraph( - merge/* default */.A({}, graphDefaults, selectNumberAttrs(graph, graphNumAttrs), pick/* default */.A(graph, graphAttrs)) - ); - - forEach/* default */.A(inputGraph.nodes(), function (v) { - var node = canonicalize(inputGraph.node(v)); - g.setNode(v, defaults/* default */.A(selectNumberAttrs(node, nodeNumAttrs), nodeDefaults)); - g.setParent(v, inputGraph.parent(v)); - }); - - forEach/* default */.A(inputGraph.edges(), function (e) { - var edge = canonicalize(inputGraph.edge(e)); - g.setEdge( - e, - merge/* default */.A({}, edgeDefaults, selectNumberAttrs(edge, edgeNumAttrs), pick/* default */.A(edge, edgeAttrs)) - ); - }); - - return g; -} - -/* - * This idea comes from the Gansner paper: to account for edge labels in our - * layout we split each rank in half by doubling minlen and halving ranksep. - * Then we can place labels at these mid-points between nodes. - * - * We also add some minimal padding to the width to push the label for the edge - * away from the edge itself a bit. - */ -function makeSpaceForEdgeLabels(g) { - var graph = g.graph(); - graph.ranksep /= 2; - forEach/* default */.A(g.edges(), function (e) { - var edge = g.edge(e); - edge.minlen *= 2; - if (edge.labelpos.toLowerCase() !== 'c') { - if (graph.rankdir === 'TB' || graph.rankdir === 'BT') { - edge.width += edge.labeloffset; - } else { - edge.height += edge.labeloffset; - } - } - }); -} - -/* - * Creates temporary dummy nodes that capture the rank in which each edge's - * label is going to, if it has one of non-zero width and height. We do this - * so that we can safely remove empty ranks while preserving balance for the - * label's position. - */ -function injectEdgeLabelProxies(g) { - forEach/* default */.A(g.edges(), function (e) { - var edge = g.edge(e); - if (edge.width && edge.height) { - var v = g.node(e.v); - var w = g.node(e.w); - var label = { rank: (w.rank - v.rank) / 2 + v.rank, e: e }; - addDummyNode(g, 'edge-proxy', label, '_ep'); - } - }); -} - -function assignRankMinMax(g) { - var maxRank = 0; - forEach/* default */.A(g.nodes(), function (v) { - var node = g.node(v); - if (node.borderTop) { - node.minRank = g.node(node.borderTop).rank; - node.maxRank = g.node(node.borderBottom).rank; - // @ts-expect-error - maxRank = lodash_es_max(maxRank, node.maxRank); - } - }); - g.graph().maxRank = maxRank; -} - -function removeEdgeLabelProxies(g) { - forEach/* default */.A(g.nodes(), function (v) { - var node = g.node(v); - if (node.dummy === 'edge-proxy') { - g.edge(node.e).labelRank = node.rank; - g.removeNode(v); - } - }); -} - -function translateGraph(g) { - var minX = Number.POSITIVE_INFINITY; - var maxX = 0; - var minY = Number.POSITIVE_INFINITY; - var maxY = 0; - var graphLabel = g.graph(); - var marginX = graphLabel.marginx || 0; - var marginY = graphLabel.marginy || 0; - - function getExtremes(attrs) { - var x = attrs.x; - var y = attrs.y; - var w = attrs.width; - var h = attrs.height; - minX = Math.min(minX, x - w / 2); - maxX = Math.max(maxX, x + w / 2); - minY = Math.min(minY, y - h / 2); - maxY = Math.max(maxY, y + h / 2); - } - - forEach/* default */.A(g.nodes(), function (v) { - getExtremes(g.node(v)); - }); - forEach/* default */.A(g.edges(), function (e) { - var edge = g.edge(e); - if (has/* default */.A(edge, 'x')) { - getExtremes(edge); - } - }); - - minX -= marginX; - minY -= marginY; - - forEach/* default */.A(g.nodes(), function (v) { - var node = g.node(v); - node.x -= minX; - node.y -= minY; - }); - - forEach/* default */.A(g.edges(), function (e) { - var edge = g.edge(e); - forEach/* default */.A(edge.points, function (p) { - p.x -= minX; - p.y -= minY; - }); - if (has/* default */.A(edge, 'x')) { - edge.x -= minX; - } - if (has/* default */.A(edge, 'y')) { - edge.y -= minY; - } - }); - - graphLabel.width = maxX - minX + marginX; - graphLabel.height = maxY - minY + marginY; -} - -function assignNodeIntersects(g) { - forEach/* default */.A(g.edges(), function (e) { - var edge = g.edge(e); - var nodeV = g.node(e.v); - var nodeW = g.node(e.w); - var p1, p2; - if (!edge.points) { - edge.points = []; - p1 = nodeW; - p2 = nodeV; - } else { - p1 = edge.points[0]; - p2 = edge.points[edge.points.length - 1]; - } - edge.points.unshift(intersectRect(nodeV, p1)); - edge.points.push(intersectRect(nodeW, p2)); - }); -} - -function fixupEdgeLabelCoords(g) { - forEach/* default */.A(g.edges(), function (e) { - var edge = g.edge(e); - if (has/* default */.A(edge, 'x')) { - if (edge.labelpos === 'l' || edge.labelpos === 'r') { - edge.width -= edge.labeloffset; - } - switch (edge.labelpos) { - case 'l': - edge.x -= edge.width / 2 + edge.labeloffset; - break; - case 'r': - edge.x += edge.width / 2 + edge.labeloffset; - break; - } - } - }); -} - -function reversePointsForReversedEdges(g) { - forEach/* default */.A(g.edges(), function (e) { - var edge = g.edge(e); - if (edge.reversed) { - edge.points.reverse(); - } - }); -} - -function removeBorderNodes(g) { - forEach/* default */.A(g.nodes(), function (v) { - if (g.children(v).length) { - var node = g.node(v); - var t = g.node(node.borderTop); - var b = g.node(node.borderBottom); - var l = g.node(lodash_es_last(node.borderLeft)); - var r = g.node(lodash_es_last(node.borderRight)); - - node.width = Math.abs(r.x - l.x); - node.height = Math.abs(b.y - t.y); - node.x = l.x + node.width / 2; - node.y = t.y + node.height / 2; - } - }); - - forEach/* default */.A(g.nodes(), function (v) { - if (g.node(v).dummy === 'border') { - g.removeNode(v); - } - }); -} - -function removeSelfEdges(g) { - forEach/* default */.A(g.edges(), function (e) { - if (e.v === e.w) { - var node = g.node(e.v); - if (!node.selfEdges) { - node.selfEdges = []; - } - node.selfEdges.push({ e: e, label: g.edge(e) }); - g.removeEdge(e); - } - }); -} - -function insertSelfEdges(g) { - var layers = buildLayerMatrix(g); - forEach/* default */.A(layers, function (layer) { - var orderShift = 0; - forEach/* default */.A(layer, function (v, i) { - var node = g.node(v); - node.order = i + orderShift; - forEach/* default */.A(node.selfEdges, function (selfEdge) { - addDummyNode( - g, - 'selfedge', - { - width: selfEdge.label.width, - height: selfEdge.label.height, - rank: node.rank, - order: i + ++orderShift, - e: selfEdge.e, - label: selfEdge.label, - }, - '_se' - ); - }); - delete node.selfEdges; - }); - }); -} - -function positionSelfEdges(g) { - forEach/* default */.A(g.nodes(), function (v) { - var node = g.node(v); - if (node.dummy === 'selfedge') { - var selfNode = g.node(node.e.v); - var x = selfNode.x + selfNode.width / 2; - var y = selfNode.y; - var dx = node.x - x; - var dy = selfNode.height / 2; - g.setEdge(node.e, node.label); - g.removeNode(v); - node.label.points = [ - { x: x + (2 * dx) / 3, y: y - dy }, - { x: x + (5 * dx) / 6, y: y - dy }, - { x: x + dx, y: y }, - { x: x + (5 * dx) / 6, y: y + dy }, - { x: x + (2 * dx) / 3, y: y + dy }, - ]; - node.label.x = node.x; - node.label.y = node.y; - } - }); -} - -function selectNumberAttrs(obj, attrs) { - return lodash_es_mapValues(pick/* default */.A(obj, attrs), Number); -} - -function canonicalize(attrs) { - var newAttrs = {}; - forEach/* default */.A(attrs, function (v, k) { - newAttrs[k.toLowerCase()] = v; - }); - return newAttrs; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/index.js - - - - - - - - -/***/ }), - -/***/ 73046: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - T: () => (/* binding */ Graph) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/has.js + 1 modules -var has = __webpack_require__(48585); -// EXTERNAL MODULE: ./node_modules/lodash-es/constant.js -var constant = __webpack_require__(39142); -// EXTERNAL MODULE: ./node_modules/lodash-es/isFunction.js -var isFunction = __webpack_require__(89610); -// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js -var keys = __webpack_require__(27422); -// EXTERNAL MODULE: ./node_modules/lodash-es/filter.js + 1 modules -var filter = __webpack_require__(11662); -// EXTERNAL MODULE: ./node_modules/lodash-es/isEmpty.js -var isEmpty = __webpack_require__(66401); -// EXTERNAL MODULE: ./node_modules/lodash-es/forEach.js -var forEach = __webpack_require__(8058); -// EXTERNAL MODULE: ./node_modules/lodash-es/isUndefined.js -var isUndefined = __webpack_require__(69592); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFlatten.js + 1 modules -var _baseFlatten = __webpack_require__(13588); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseRest.js -var _baseRest = __webpack_require__(24326); -// EXTERNAL MODULE: ./node_modules/lodash-es/_SetCache.js + 2 modules -var _SetCache = __webpack_require__(62062); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFindIndex.js -var _baseFindIndex = __webpack_require__(25707); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsNaN.js -/** - * The base implementation of `_.isNaN` without support for number objects. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. - */ -function baseIsNaN(value) { - return value !== value; -} - -/* harmony default export */ const _baseIsNaN = (baseIsNaN); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_strictIndexOf.js -/** - * A specialized version of `_.indexOf` which performs strict equality - * comparisons of values, i.e. `===`. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} fromIndex The index to search from. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function strictIndexOf(array, value, fromIndex) { - var index = fromIndex - 1, - length = array.length; - - while (++index < length) { - if (array[index] === value) { - return index; - } - } - return -1; -} - -/* harmony default export */ const _strictIndexOf = (strictIndexOf); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIndexOf.js - - - - -/** - * The base implementation of `_.indexOf` without `fromIndex` bounds checks. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} fromIndex The index to search from. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function baseIndexOf(array, value, fromIndex) { - return value === value - ? _strictIndexOf(array, value, fromIndex) - : (0,_baseFindIndex/* default */.A)(array, _baseIsNaN, fromIndex); -} - -/* harmony default export */ const _baseIndexOf = (baseIndexOf); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_arrayIncludes.js - - -/** - * A specialized version of `_.includes` for arrays without support for - * specifying an index to search from. - * - * @private - * @param {Array} [array] The array to inspect. - * @param {*} target The value to search for. - * @returns {boolean} Returns `true` if `target` is found, else `false`. - */ -function arrayIncludes(array, value) { - var length = array == null ? 0 : array.length; - return !!length && _baseIndexOf(array, value, 0) > -1; -} - -/* harmony default export */ const _arrayIncludes = (arrayIncludes); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_arrayIncludesWith.js -/** - * This function is like `arrayIncludes` except that it accepts a comparator. - * - * @private - * @param {Array} [array] The array to inspect. - * @param {*} target The value to search for. - * @param {Function} comparator The comparator invoked per element. - * @returns {boolean} Returns `true` if `target` is found, else `false`. - */ -function arrayIncludesWith(array, value, comparator) { - var index = -1, - length = array == null ? 0 : array.length; - - while (++index < length) { - if (comparator(value, array[index])) { - return true; - } - } - return false; -} - -/* harmony default export */ const _arrayIncludesWith = (arrayIncludesWith); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_cacheHas.js -var _cacheHas = __webpack_require__(64099); -// EXTERNAL MODULE: ./node_modules/lodash-es/_Set.js -var _Set = __webpack_require__(39857); -;// CONCATENATED MODULE: ./node_modules/lodash-es/noop.js -/** - * This method returns `undefined`. - * - * @static - * @memberOf _ - * @since 2.3.0 - * @category Util - * @example - * - * _.times(2, _.noop); - * // => [undefined, undefined] - */ -function noop() { - // No operation performed. -} - -/* harmony default export */ const lodash_es_noop = (noop); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_setToArray.js -var _setToArray = __webpack_require__(29959); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_createSet.js - - - - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0; - -/** - * Creates a set object of `values`. - * - * @private - * @param {Array} values The values to add to the set. - * @returns {Object} Returns the new set. - */ -var createSet = !(_Set/* default */.A && (1 / (0,_setToArray/* default */.A)(new _Set/* default */.A([,-0]))[1]) == INFINITY) ? lodash_es_noop : function(values) { - return new _Set/* default */.A(values); -}; - -/* harmony default export */ const _createSet = (createSet); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseUniq.js - - - - - - - -/** Used as the size to enable large array optimizations. */ -var LARGE_ARRAY_SIZE = 200; - -/** - * The base implementation of `_.uniqBy` without support for iteratee shorthands. - * - * @private - * @param {Array} array The array to inspect. - * @param {Function} [iteratee] The iteratee invoked per element. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new duplicate free array. - */ -function baseUniq(array, iteratee, comparator) { - var index = -1, - includes = _arrayIncludes, - length = array.length, - isCommon = true, - result = [], - seen = result; - - if (comparator) { - isCommon = false; - includes = _arrayIncludesWith; - } - else if (length >= LARGE_ARRAY_SIZE) { - var set = iteratee ? null : _createSet(array); - if (set) { - return (0,_setToArray/* default */.A)(set); - } - isCommon = false; - includes = _cacheHas/* default */.A; - seen = new _SetCache/* default */.A; - } - else { - seen = iteratee ? [] : result; - } - outer: - while (++index < length) { - var value = array[index], - computed = iteratee ? iteratee(value) : value; - - value = (comparator || value !== 0) ? value : 0; - if (isCommon && computed === computed) { - var seenIndex = seen.length; - while (seenIndex--) { - if (seen[seenIndex] === computed) { - continue outer; - } - } - if (iteratee) { - seen.push(computed); - } - result.push(value); - } - else if (!includes(seen, computed, comparator)) { - if (seen !== result) { - seen.push(computed); - } - result.push(value); - } - } - return result; -} - -/* harmony default export */ const _baseUniq = (baseUniq); - -// EXTERNAL MODULE: ./node_modules/lodash-es/isArrayLikeObject.js -var isArrayLikeObject = __webpack_require__(53533); -;// CONCATENATED MODULE: ./node_modules/lodash-es/union.js - - - - - -/** - * Creates an array of unique values, in order, from all given arrays using - * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @returns {Array} Returns the new array of combined values. - * @example - * - * _.union([2], [1, 2]); - * // => [2, 1] - */ -var union = (0,_baseRest/* default */.A)(function(arrays) { - return _baseUniq((0,_baseFlatten/* default */.A)(arrays, 1, isArrayLikeObject/* default */.A, true)); -}); - -/* harmony default export */ const lodash_es_union = (union); - -// EXTERNAL MODULE: ./node_modules/lodash-es/values.js + 1 modules -var values = __webpack_require__(38207); -// EXTERNAL MODULE: ./node_modules/lodash-es/reduce.js + 2 modules -var reduce = __webpack_require__(89463); -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/graph.js - - -var DEFAULT_EDGE_NAME = '\x00'; -var GRAPH_NODE = '\x00'; -var EDGE_KEY_DELIM = '\x01'; - -// Implementation notes: -// -// * Node id query functions should return string ids for the nodes -// * Edge id query functions should return an "edgeObj", edge object, that is -// composed of enough information to uniquely identify an edge: {v, w, name}. -// * Internally we use an "edgeId", a stringified form of the edgeObj, to -// reference edges. This is because we need a performant way to look these -// edges up and, object properties, which have string keys, are the closest -// we're going to get to a performant hashtable in JavaScript. - -// Implementation notes: -// -// * Node id query functions should return string ids for the nodes -// * Edge id query functions should return an "edgeObj", edge object, that is -// composed of enough information to uniquely identify an edge: {v, w, name}. -// * Internally we use an "edgeId", a stringified form of the edgeObj, to -// reference edges. This is because we need a performant way to look these -// edges up and, object properties, which have string keys, are the closest -// we're going to get to a performant hashtable in JavaScript. -class Graph { - constructor(opts = {}) { - this._isDirected = has/* default */.A(opts, 'directed') ? opts.directed : true; - this._isMultigraph = has/* default */.A(opts, 'multigraph') ? opts.multigraph : false; - this._isCompound = has/* default */.A(opts, 'compound') ? opts.compound : false; - - // Label for the graph itself - this._label = undefined; - - // Defaults to be set when creating a new node - this._defaultNodeLabelFn = constant/* default */.A(undefined); - - // Defaults to be set when creating a new edge - this._defaultEdgeLabelFn = constant/* default */.A(undefined); - - // v -> label - this._nodes = {}; - - if (this._isCompound) { - // v -> parent - this._parent = {}; - - // v -> children - this._children = {}; - this._children[GRAPH_NODE] = {}; - } - - // v -> edgeObj - this._in = {}; - - // u -> v -> Number - this._preds = {}; - - // v -> edgeObj - this._out = {}; - - // v -> w -> Number - this._sucs = {}; - - // e -> edgeObj - this._edgeObjs = {}; - - // e -> label - this._edgeLabels = {}; - } - /* === Graph functions ========= */ - isDirected() { - return this._isDirected; - } - isMultigraph() { - return this._isMultigraph; - } - isCompound() { - return this._isCompound; - } - setGraph(label) { - this._label = label; - return this; - } - graph() { - return this._label; - } - /* === Node functions ========== */ - setDefaultNodeLabel(newDefault) { - if (!isFunction/* default */.A(newDefault)) { - newDefault = constant/* default */.A(newDefault); - } - this._defaultNodeLabelFn = newDefault; - return this; - } - nodeCount() { - return this._nodeCount; - } - nodes() { - return keys/* default */.A(this._nodes); - } - sources() { - var self = this; - return filter/* default */.A(this.nodes(), function (v) { - return isEmpty/* default */.A(self._in[v]); - }); - } - sinks() { - var self = this; - return filter/* default */.A(this.nodes(), function (v) { - return isEmpty/* default */.A(self._out[v]); - }); - } - setNodes(vs, value) { - var args = arguments; - var self = this; - forEach/* default */.A(vs, function (v) { - if (args.length > 1) { - self.setNode(v, value); - } else { - self.setNode(v); - } - }); - return this; - } - setNode(v, value) { - if (has/* default */.A(this._nodes, v)) { - if (arguments.length > 1) { - this._nodes[v] = value; - } - return this; - } - - // @ts-expect-error - this._nodes[v] = arguments.length > 1 ? value : this._defaultNodeLabelFn(v); - if (this._isCompound) { - this._parent[v] = GRAPH_NODE; - this._children[v] = {}; - this._children[GRAPH_NODE][v] = true; - } - this._in[v] = {}; - this._preds[v] = {}; - this._out[v] = {}; - this._sucs[v] = {}; - ++this._nodeCount; - return this; - } - node(v) { - return this._nodes[v]; - } - hasNode(v) { - return has/* default */.A(this._nodes, v); - } - removeNode(v) { - var self = this; - if (has/* default */.A(this._nodes, v)) { - var removeEdge = function (e) { - self.removeEdge(self._edgeObjs[e]); - }; - delete this._nodes[v]; - if (this._isCompound) { - this._removeFromParentsChildList(v); - delete this._parent[v]; - forEach/* default */.A(this.children(v), function (child) { - self.setParent(child); - }); - delete this._children[v]; - } - forEach/* default */.A(keys/* default */.A(this._in[v]), removeEdge); - delete this._in[v]; - delete this._preds[v]; - forEach/* default */.A(keys/* default */.A(this._out[v]), removeEdge); - delete this._out[v]; - delete this._sucs[v]; - --this._nodeCount; - } - return this; - } - setParent(v, parent) { - if (!this._isCompound) { - throw new Error('Cannot set parent in a non-compound graph'); - } - - if (isUndefined/* default */.A(parent)) { - parent = GRAPH_NODE; - } else { - // Coerce parent to string - parent += ''; - for (var ancestor = parent; !isUndefined/* default */.A(ancestor); ancestor = this.parent(ancestor)) { - if (ancestor === v) { - throw new Error('Setting ' + parent + ' as parent of ' + v + ' would create a cycle'); - } - } - - this.setNode(parent); - } - - this.setNode(v); - this._removeFromParentsChildList(v); - this._parent[v] = parent; - this._children[parent][v] = true; - return this; - } - _removeFromParentsChildList(v) { - delete this._children[this._parent[v]][v]; - } - parent(v) { - if (this._isCompound) { - var parent = this._parent[v]; - if (parent !== GRAPH_NODE) { - return parent; - } - } - } - children(v) { - if (isUndefined/* default */.A(v)) { - v = GRAPH_NODE; - } - - if (this._isCompound) { - var children = this._children[v]; - if (children) { - return keys/* default */.A(children); - } - } else if (v === GRAPH_NODE) { - return this.nodes(); - } else if (this.hasNode(v)) { - return []; - } - } - predecessors(v) { - var predsV = this._preds[v]; - if (predsV) { - return keys/* default */.A(predsV); - } - } - successors(v) { - var sucsV = this._sucs[v]; - if (sucsV) { - return keys/* default */.A(sucsV); - } - } - neighbors(v) { - var preds = this.predecessors(v); - if (preds) { - return lodash_es_union(preds, this.successors(v)); - } - } - isLeaf(v) { - var neighbors; - if (this.isDirected()) { - neighbors = this.successors(v); - } else { - neighbors = this.neighbors(v); - } - return neighbors.length === 0; - } - filterNodes(filter) { - // @ts-expect-error - var copy = new this.constructor({ - directed: this._isDirected, - multigraph: this._isMultigraph, - compound: this._isCompound, - }); - - copy.setGraph(this.graph()); - - var self = this; - forEach/* default */.A(this._nodes, function (value, v) { - if (filter(v)) { - copy.setNode(v, value); - } - }); - - forEach/* default */.A(this._edgeObjs, function (e) { - // @ts-expect-error - if (copy.hasNode(e.v) && copy.hasNode(e.w)) { - copy.setEdge(e, self.edge(e)); - } - }); - - var parents = {}; - function findParent(v) { - var parent = self.parent(v); - if (parent === undefined || copy.hasNode(parent)) { - parents[v] = parent; - return parent; - } else if (parent in parents) { - return parents[parent]; - } else { - return findParent(parent); - } - } - - if (this._isCompound) { - forEach/* default */.A(copy.nodes(), function (v) { - copy.setParent(v, findParent(v)); - }); - } - - return copy; - } - /* === Edge functions ========== */ - setDefaultEdgeLabel(newDefault) { - if (!isFunction/* default */.A(newDefault)) { - newDefault = constant/* default */.A(newDefault); - } - this._defaultEdgeLabelFn = newDefault; - return this; - } - edgeCount() { - return this._edgeCount; - } - edges() { - return values/* default */.A(this._edgeObjs); - } - setPath(vs, value) { - var self = this; - var args = arguments; - reduce/* default */.A(vs, function (v, w) { - if (args.length > 1) { - self.setEdge(v, w, value); - } else { - self.setEdge(v, w); - } - return w; - }); - return this; - } - /* - * setEdge(v, w, [value, [name]]) - * setEdge({ v, w, [name] }, [value]) - */ - setEdge() { - var v, w, name, value; - var valueSpecified = false; - var arg0 = arguments[0]; - - if (typeof arg0 === 'object' && arg0 !== null && 'v' in arg0) { - v = arg0.v; - w = arg0.w; - name = arg0.name; - if (arguments.length === 2) { - value = arguments[1]; - valueSpecified = true; - } - } else { - v = arg0; - w = arguments[1]; - name = arguments[3]; - if (arguments.length > 2) { - value = arguments[2]; - valueSpecified = true; - } - } - - v = '' + v; - w = '' + w; - if (!isUndefined/* default */.A(name)) { - name = '' + name; - } - - var e = edgeArgsToId(this._isDirected, v, w, name); - if (has/* default */.A(this._edgeLabels, e)) { - if (valueSpecified) { - this._edgeLabels[e] = value; - } - return this; - } - - if (!isUndefined/* default */.A(name) && !this._isMultigraph) { - throw new Error('Cannot set a named edge when isMultigraph = false'); - } - - // It didn't exist, so we need to create it. - // First ensure the nodes exist. - this.setNode(v); - this.setNode(w); - - // @ts-expect-error - this._edgeLabels[e] = valueSpecified ? value : this._defaultEdgeLabelFn(v, w, name); - - var edgeObj = edgeArgsToObj(this._isDirected, v, w, name); - // Ensure we add undirected edges in a consistent way. - v = edgeObj.v; - w = edgeObj.w; - - Object.freeze(edgeObj); - this._edgeObjs[e] = edgeObj; - incrementOrInitEntry(this._preds[w], v); - incrementOrInitEntry(this._sucs[v], w); - this._in[w][e] = edgeObj; - this._out[v][e] = edgeObj; - this._edgeCount++; - return this; - } - edge(v, w, name) { - var e = - arguments.length === 1 - ? edgeObjToId(this._isDirected, arguments[0]) - : edgeArgsToId(this._isDirected, v, w, name); - return this._edgeLabels[e]; - } - hasEdge(v, w, name) { - var e = - arguments.length === 1 - ? edgeObjToId(this._isDirected, arguments[0]) - : edgeArgsToId(this._isDirected, v, w, name); - return has/* default */.A(this._edgeLabels, e); - } - removeEdge(v, w, name) { - var e = - arguments.length === 1 - ? edgeObjToId(this._isDirected, arguments[0]) - : edgeArgsToId(this._isDirected, v, w, name); - var edge = this._edgeObjs[e]; - if (edge) { - v = edge.v; - w = edge.w; - delete this._edgeLabels[e]; - delete this._edgeObjs[e]; - decrementOrRemoveEntry(this._preds[w], v); - decrementOrRemoveEntry(this._sucs[v], w); - delete this._in[w][e]; - delete this._out[v][e]; - this._edgeCount--; - } - return this; - } - inEdges(v, u) { - var inV = this._in[v]; - if (inV) { - var edges = values/* default */.A(inV); - if (!u) { - return edges; - } - return filter/* default */.A(edges, function (edge) { - return edge.v === u; - }); - } - } - outEdges(v, w) { - var outV = this._out[v]; - if (outV) { - var edges = values/* default */.A(outV); - if (!w) { - return edges; - } - return filter/* default */.A(edges, function (edge) { - return edge.w === w; - }); - } - } - nodeEdges(v, w) { - var inEdges = this.inEdges(v, w); - if (inEdges) { - return inEdges.concat(this.outEdges(v, w)); - } - } -} - -/* Number of nodes in the graph. Should only be changed by the implementation. */ -Graph.prototype._nodeCount = 0; - -/* Number of edges in the graph. Should only be changed by the implementation. */ -Graph.prototype._edgeCount = 0; - -function incrementOrInitEntry(map, k) { - if (map[k]) { - map[k]++; - } else { - map[k] = 1; - } -} - -function decrementOrRemoveEntry(map, k) { - if (!--map[k]) { - delete map[k]; - } -} - -function edgeArgsToId(isDirected, v_, w_, name) { - var v = '' + v_; - var w = '' + w_; - if (!isDirected && v > w) { - var tmp = v; - v = w; - w = tmp; - } - return v + EDGE_KEY_DELIM + w + EDGE_KEY_DELIM + (isUndefined/* default */.A(name) ? DEFAULT_EDGE_NAME : name); -} - -function edgeArgsToObj(isDirected, v_, w_, name) { - var v = '' + v_; - var w = '' + w_; - if (!isDirected && v > w) { - var tmp = v; - v = w; - w = tmp; - } - var edgeObj = { v: v, w: w }; - if (name) { - edgeObj.name = name; - } - return edgeObj; -} - -function edgeObjToId(isDirected, edgeObj) { - return edgeArgsToId(isDirected, edgeObj.v, edgeObj.w, edgeObj.name); -} - - -/***/ }), - -/***/ 697: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ T: () => (/* reexport safe */ _graph_js__WEBPACK_IMPORTED_MODULE_0__.T) -/* harmony export */ }); -/* unused harmony export version */ -/* harmony import */ var _graph_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(73046); -// Includes only the "core" of graphlib - - - -const version = '2.1.9-pre'; - - - - -/***/ }), - -/***/ 62062: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ _SetCache) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_MapCache.js + 14 modules -var _MapCache = __webpack_require__(29471); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_setCacheAdd.js -/** Used to stand-in for `undefined` hash values. */ -var HASH_UNDEFINED = '__lodash_hash_undefined__'; - -/** - * Adds `value` to the array cache. - * - * @private - * @name add - * @memberOf SetCache - * @alias push - * @param {*} value The value to cache. - * @returns {Object} Returns the cache instance. - */ -function setCacheAdd(value) { - this.__data__.set(value, HASH_UNDEFINED); - return this; -} - -/* harmony default export */ const _setCacheAdd = (setCacheAdd); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_setCacheHas.js -/** - * Checks if `value` is in the array cache. - * - * @private - * @name has - * @memberOf SetCache - * @param {*} value The value to search for. - * @returns {number} Returns `true` if `value` is found, else `false`. - */ -function setCacheHas(value) { - return this.__data__.has(value); -} - -/* harmony default export */ const _setCacheHas = (setCacheHas); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_SetCache.js - - - - -/** - * - * Creates an array cache object to store unique values. - * - * @private - * @constructor - * @param {Array} [values] The values to cache. - */ -function SetCache(values) { - var index = -1, - length = values == null ? 0 : values.length; - - this.__data__ = new _MapCache/* default */.A; - while (++index < length) { - this.add(values[index]); - } -} - -// Add methods to `SetCache`. -SetCache.prototype.add = SetCache.prototype.push = _setCacheAdd; -SetCache.prototype.has = _setCacheHas; - -/* harmony default export */ const _SetCache = (SetCache); - - -/***/ }), - -/***/ 72641: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * A specialized version of `_.forEach` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns `array`. - */ -function arrayEach(array, iteratee) { - var index = -1, - length = array == null ? 0 : array.length; - - while (++index < length) { - if (iteratee(array[index], index, array) === false) { - break; - } - } - return array; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (arrayEach); - - -/***/ }), - -/***/ 2634: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * A specialized version of `_.filter` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {Array} Returns the new filtered array. - */ -function arrayFilter(array, predicate) { - var index = -1, - length = array == null ? 0 : array.length, - resIndex = 0, - result = []; - - while (++index < length) { - var value = array[index]; - if (predicate(value, index, array)) { - result[resIndex++] = value; - } - } - return result; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (arrayFilter); - - -/***/ }), - -/***/ 45572: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * A specialized version of `_.map` for arrays without support for iteratee - * shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the new mapped array. - */ -function arrayMap(array, iteratee) { - var index = -1, - length = array == null ? 0 : array.length, - result = Array(length); - - while (++index < length) { - result[index] = iteratee(array[index], index, array); - } - return result; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (arrayMap); - - -/***/ }), - -/***/ 76912: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * Appends the elements of `values` to `array`. - * - * @private - * @param {Array} array The array to modify. - * @param {Array} values The values to append. - * @returns {Array} Returns `array`. - */ -function arrayPush(array, values) { - var index = -1, - length = values.length, - offset = array.length; - - while (++index < length) { - array[offset + index] = values[index]; - } - return array; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (arrayPush); - - -/***/ }), - -/***/ 91641: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ _baseClone) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_Stack.js + 5 modules -var _Stack = __webpack_require__(11754); -// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayEach.js -var _arrayEach = __webpack_require__(72641); -// EXTERNAL MODULE: ./node_modules/lodash-es/_assignValue.js -var _assignValue = __webpack_require__(52851); -// EXTERNAL MODULE: ./node_modules/lodash-es/_copyObject.js -var _copyObject = __webpack_require__(22031); -// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js -var keys = __webpack_require__(27422); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseAssign.js - - - -/** - * The base implementation of `_.assign` without support for multiple sources - * or `customizer` functions. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @returns {Object} Returns `object`. - */ -function baseAssign(object, source) { - return object && (0,_copyObject/* default */.A)(source, (0,keys/* default */.A)(source), object); -} - -/* harmony default export */ const _baseAssign = (baseAssign); - -// EXTERNAL MODULE: ./node_modules/lodash-es/keysIn.js + 2 modules -var keysIn = __webpack_require__(55615); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseAssignIn.js - - - -/** - * The base implementation of `_.assignIn` without support for multiple sources - * or `customizer` functions. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @returns {Object} Returns `object`. - */ -function baseAssignIn(object, source) { - return object && (0,_copyObject/* default */.A)(source, (0,keysIn/* default */.A)(source), object); -} - -/* harmony default export */ const _baseAssignIn = (baseAssignIn); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_cloneBuffer.js -var _cloneBuffer = __webpack_require__(80154); -// EXTERNAL MODULE: ./node_modules/lodash-es/_copyArray.js -var _copyArray = __webpack_require__(39759); -// EXTERNAL MODULE: ./node_modules/lodash-es/_getSymbols.js -var _getSymbols = __webpack_require__(14792); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_copySymbols.js - - - -/** - * Copies own symbols of `source` to `object`. - * - * @private - * @param {Object} source The object to copy symbols from. - * @param {Object} [object={}] The object to copy symbols to. - * @returns {Object} Returns `object`. - */ -function copySymbols(source, object) { - return (0,_copyObject/* default */.A)(source, (0,_getSymbols/* default */.A)(source), object); -} - -/* harmony default export */ const _copySymbols = (copySymbols); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayPush.js -var _arrayPush = __webpack_require__(76912); -// EXTERNAL MODULE: ./node_modules/lodash-es/_getPrototype.js -var _getPrototype = __webpack_require__(15647); -// EXTERNAL MODULE: ./node_modules/lodash-es/stubArray.js -var stubArray = __webpack_require__(13153); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_getSymbolsIn.js - - - - - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeGetSymbols = Object.getOwnPropertySymbols; - -/** - * Creates an array of the own and inherited enumerable symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of symbols. - */ -var getSymbolsIn = !nativeGetSymbols ? stubArray/* default */.A : function(object) { - var result = []; - while (object) { - (0,_arrayPush/* default */.A)(result, (0,_getSymbols/* default */.A)(object)); - object = (0,_getPrototype/* default */.A)(object); - } - return result; -}; - -/* harmony default export */ const _getSymbolsIn = (getSymbolsIn); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_copySymbolsIn.js - - - -/** - * Copies own and inherited symbols of `source` to `object`. - * - * @private - * @param {Object} source The object to copy symbols from. - * @param {Object} [object={}] The object to copy symbols to. - * @returns {Object} Returns `object`. - */ -function copySymbolsIn(source, object) { - return (0,_copyObject/* default */.A)(source, _getSymbolsIn(source), object); -} - -/* harmony default export */ const _copySymbolsIn = (copySymbolsIn); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_getAllKeys.js -var _getAllKeys = __webpack_require__(19042); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGetAllKeys.js -var _baseGetAllKeys = __webpack_require__(33831); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_getAllKeysIn.js - - - - -/** - * Creates an array of own and inherited enumerable property names and - * symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names and symbols. - */ -function getAllKeysIn(object) { - return (0,_baseGetAllKeys/* default */.A)(object, keysIn/* default */.A, _getSymbolsIn); -} - -/* harmony default export */ const _getAllKeysIn = (getAllKeysIn); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_getTag.js + 3 modules -var _getTag = __webpack_require__(9779); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_initCloneArray.js -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var _initCloneArray_hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Initializes an array clone. - * - * @private - * @param {Array} array The array to clone. - * @returns {Array} Returns the initialized clone. - */ -function initCloneArray(array) { - var length = array.length, - result = new array.constructor(length); - - // Add properties assigned by `RegExp#exec`. - if (length && typeof array[0] == 'string' && _initCloneArray_hasOwnProperty.call(array, 'index')) { - result.index = array.index; - result.input = array.input; - } - return result; -} - -/* harmony default export */ const _initCloneArray = (initCloneArray); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_cloneArrayBuffer.js -var _cloneArrayBuffer = __webpack_require__(90565); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_cloneDataView.js - - -/** - * Creates a clone of `dataView`. - * - * @private - * @param {Object} dataView The data view to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the cloned data view. - */ -function cloneDataView(dataView, isDeep) { - var buffer = isDeep ? (0,_cloneArrayBuffer/* default */.A)(dataView.buffer) : dataView.buffer; - return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); -} - -/* harmony default export */ const _cloneDataView = (cloneDataView); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_cloneRegExp.js -/** Used to match `RegExp` flags from their coerced string values. */ -var reFlags = /\w*$/; - -/** - * Creates a clone of `regexp`. - * - * @private - * @param {Object} regexp The regexp to clone. - * @returns {Object} Returns the cloned regexp. - */ -function cloneRegExp(regexp) { - var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); - result.lastIndex = regexp.lastIndex; - return result; -} - -/* harmony default export */ const _cloneRegExp = (cloneRegExp); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_Symbol.js -var _Symbol = __webpack_require__(241); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_cloneSymbol.js - - -/** Used to convert symbols to primitives and strings. */ -var symbolProto = _Symbol/* default */.A ? _Symbol/* default */.A.prototype : undefined, - symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; - -/** - * Creates a clone of the `symbol` object. - * - * @private - * @param {Object} symbol The symbol object to clone. - * @returns {Object} Returns the cloned symbol object. - */ -function cloneSymbol(symbol) { - return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; -} - -/* harmony default export */ const _cloneSymbol = (cloneSymbol); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_cloneTypedArray.js -var _cloneTypedArray = __webpack_require__(1801); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_initCloneByTag.js - - - - - - -/** `Object#toString` result references. */ -var boolTag = '[object Boolean]', - dateTag = '[object Date]', - mapTag = '[object Map]', - numberTag = '[object Number]', - regexpTag = '[object RegExp]', - setTag = '[object Set]', - stringTag = '[object String]', - symbolTag = '[object Symbol]'; - -var arrayBufferTag = '[object ArrayBuffer]', - dataViewTag = '[object DataView]', - float32Tag = '[object Float32Array]', - float64Tag = '[object Float64Array]', - int8Tag = '[object Int8Array]', - int16Tag = '[object Int16Array]', - int32Tag = '[object Int32Array]', - uint8Tag = '[object Uint8Array]', - uint8ClampedTag = '[object Uint8ClampedArray]', - uint16Tag = '[object Uint16Array]', - uint32Tag = '[object Uint32Array]'; - -/** - * Initializes an object clone based on its `toStringTag`. - * - * **Note:** This function only supports cloning values with tags of - * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`. - * - * @private - * @param {Object} object The object to clone. - * @param {string} tag The `toStringTag` of the object to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the initialized clone. - */ -function initCloneByTag(object, tag, isDeep) { - var Ctor = object.constructor; - switch (tag) { - case arrayBufferTag: - return (0,_cloneArrayBuffer/* default */.A)(object); - - case boolTag: - case dateTag: - return new Ctor(+object); - - case dataViewTag: - return _cloneDataView(object, isDeep); - - case float32Tag: case float64Tag: - case int8Tag: case int16Tag: case int32Tag: - case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: - return (0,_cloneTypedArray/* default */.A)(object, isDeep); - - case mapTag: - return new Ctor; - - case numberTag: - case stringTag: - return new Ctor(object); - - case regexpTag: - return _cloneRegExp(object); - - case setTag: - return new Ctor; - - case symbolTag: - return _cloneSymbol(object); - } -} - -/* harmony default export */ const _initCloneByTag = (initCloneByTag); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_initCloneObject.js + 1 modules -var _initCloneObject = __webpack_require__(18598); -// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js -var isArray = __webpack_require__(92049); -// EXTERNAL MODULE: ./node_modules/lodash-es/isBuffer.js + 1 modules -var isBuffer = __webpack_require__(99912); -// EXTERNAL MODULE: ./node_modules/lodash-es/isObjectLike.js -var isObjectLike = __webpack_require__(53098); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsMap.js - - - -/** `Object#toString` result references. */ -var _baseIsMap_mapTag = '[object Map]'; - -/** - * The base implementation of `_.isMap` without Node.js optimizations. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a map, else `false`. - */ -function baseIsMap(value) { - return (0,isObjectLike/* default */.A)(value) && (0,_getTag/* default */.A)(value) == _baseIsMap_mapTag; -} - -/* harmony default export */ const _baseIsMap = (baseIsMap); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseUnary.js -var _baseUnary = __webpack_require__(52789); -// EXTERNAL MODULE: ./node_modules/lodash-es/_nodeUtil.js -var _nodeUtil = __webpack_require__(64841); -;// CONCATENATED MODULE: ./node_modules/lodash-es/isMap.js - - - - -/* Node.js helper references. */ -var nodeIsMap = _nodeUtil/* default */.A && _nodeUtil/* default */.A.isMap; - -/** - * Checks if `value` is classified as a `Map` object. - * - * @static - * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a map, else `false`. - * @example - * - * _.isMap(new Map); - * // => true - * - * _.isMap(new WeakMap); - * // => false - */ -var isMap = nodeIsMap ? (0,_baseUnary/* default */.A)(nodeIsMap) : _baseIsMap; - -/* harmony default export */ const lodash_es_isMap = (isMap); - -// EXTERNAL MODULE: ./node_modules/lodash-es/isObject.js -var isObject = __webpack_require__(23149); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsSet.js - - - -/** `Object#toString` result references. */ -var _baseIsSet_setTag = '[object Set]'; - -/** - * The base implementation of `_.isSet` without Node.js optimizations. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a set, else `false`. - */ -function baseIsSet(value) { - return (0,isObjectLike/* default */.A)(value) && (0,_getTag/* default */.A)(value) == _baseIsSet_setTag; -} - -/* harmony default export */ const _baseIsSet = (baseIsSet); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/isSet.js - - - - -/* Node.js helper references. */ -var nodeIsSet = _nodeUtil/* default */.A && _nodeUtil/* default */.A.isSet; - -/** - * Checks if `value` is classified as a `Set` object. - * - * @static - * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a set, else `false`. - * @example - * - * _.isSet(new Set); - * // => true - * - * _.isSet(new WeakSet); - * // => false - */ -var isSet = nodeIsSet ? (0,_baseUnary/* default */.A)(nodeIsSet) : _baseIsSet; - -/* harmony default export */ const lodash_es_isSet = (isSet); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseClone.js - - - - - - - - - - - - - - - - - - - - - - - -/** Used to compose bitmasks for cloning. */ -var CLONE_DEEP_FLAG = 1, - CLONE_FLAT_FLAG = 2, - CLONE_SYMBOLS_FLAG = 4; - -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - _baseClone_boolTag = '[object Boolean]', - _baseClone_dateTag = '[object Date]', - errorTag = '[object Error]', - funcTag = '[object Function]', - genTag = '[object GeneratorFunction]', - _baseClone_mapTag = '[object Map]', - _baseClone_numberTag = '[object Number]', - objectTag = '[object Object]', - _baseClone_regexpTag = '[object RegExp]', - _baseClone_setTag = '[object Set]', - _baseClone_stringTag = '[object String]', - _baseClone_symbolTag = '[object Symbol]', - weakMapTag = '[object WeakMap]'; - -var _baseClone_arrayBufferTag = '[object ArrayBuffer]', - _baseClone_dataViewTag = '[object DataView]', - _baseClone_float32Tag = '[object Float32Array]', - _baseClone_float64Tag = '[object Float64Array]', - _baseClone_int8Tag = '[object Int8Array]', - _baseClone_int16Tag = '[object Int16Array]', - _baseClone_int32Tag = '[object Int32Array]', - _baseClone_uint8Tag = '[object Uint8Array]', - _baseClone_uint8ClampedTag = '[object Uint8ClampedArray]', - _baseClone_uint16Tag = '[object Uint16Array]', - _baseClone_uint32Tag = '[object Uint32Array]'; - -/** Used to identify `toStringTag` values supported by `_.clone`. */ -var cloneableTags = {}; -cloneableTags[argsTag] = cloneableTags[arrayTag] = -cloneableTags[_baseClone_arrayBufferTag] = cloneableTags[_baseClone_dataViewTag] = -cloneableTags[_baseClone_boolTag] = cloneableTags[_baseClone_dateTag] = -cloneableTags[_baseClone_float32Tag] = cloneableTags[_baseClone_float64Tag] = -cloneableTags[_baseClone_int8Tag] = cloneableTags[_baseClone_int16Tag] = -cloneableTags[_baseClone_int32Tag] = cloneableTags[_baseClone_mapTag] = -cloneableTags[_baseClone_numberTag] = cloneableTags[objectTag] = -cloneableTags[_baseClone_regexpTag] = cloneableTags[_baseClone_setTag] = -cloneableTags[_baseClone_stringTag] = cloneableTags[_baseClone_symbolTag] = -cloneableTags[_baseClone_uint8Tag] = cloneableTags[_baseClone_uint8ClampedTag] = -cloneableTags[_baseClone_uint16Tag] = cloneableTags[_baseClone_uint32Tag] = true; -cloneableTags[errorTag] = cloneableTags[funcTag] = -cloneableTags[weakMapTag] = false; - -/** - * The base implementation of `_.clone` and `_.cloneDeep` which tracks - * traversed objects. - * - * @private - * @param {*} value The value to clone. - * @param {boolean} bitmask The bitmask flags. - * 1 - Deep clone - * 2 - Flatten inherited properties - * 4 - Clone symbols - * @param {Function} [customizer] The function to customize cloning. - * @param {string} [key] The key of `value`. - * @param {Object} [object] The parent object of `value`. - * @param {Object} [stack] Tracks traversed objects and their clone counterparts. - * @returns {*} Returns the cloned value. - */ -function baseClone(value, bitmask, customizer, key, object, stack) { - var result, - isDeep = bitmask & CLONE_DEEP_FLAG, - isFlat = bitmask & CLONE_FLAT_FLAG, - isFull = bitmask & CLONE_SYMBOLS_FLAG; - - if (customizer) { - result = object ? customizer(value, key, object, stack) : customizer(value); - } - if (result !== undefined) { - return result; - } - if (!(0,isObject/* default */.A)(value)) { - return value; - } - var isArr = (0,isArray/* default */.A)(value); - if (isArr) { - result = _initCloneArray(value); - if (!isDeep) { - return (0,_copyArray/* default */.A)(value, result); - } - } else { - var tag = (0,_getTag/* default */.A)(value), - isFunc = tag == funcTag || tag == genTag; - - if ((0,isBuffer/* default */.A)(value)) { - return (0,_cloneBuffer/* default */.A)(value, isDeep); - } - if (tag == objectTag || tag == argsTag || (isFunc && !object)) { - result = (isFlat || isFunc) ? {} : (0,_initCloneObject/* default */.A)(value); - if (!isDeep) { - return isFlat - ? _copySymbolsIn(value, _baseAssignIn(result, value)) - : _copySymbols(value, _baseAssign(result, value)); - } - } else { - if (!cloneableTags[tag]) { - return object ? value : {}; - } - result = _initCloneByTag(value, tag, isDeep); - } - } - // Check for circular references and return its corresponding clone. - stack || (stack = new _Stack/* default */.A); - var stacked = stack.get(value); - if (stacked) { - return stacked; - } - stack.set(value, result); - - if (lodash_es_isSet(value)) { - value.forEach(function(subValue) { - result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack)); - }); - } else if (lodash_es_isMap(value)) { - value.forEach(function(subValue, key) { - result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack)); - }); - } - - var keysFunc = isFull - ? (isFlat ? _getAllKeysIn : _getAllKeys/* default */.A) - : (isFlat ? keysIn/* default */.A : keys/* default */.A); - - var props = isArr ? undefined : keysFunc(value); - (0,_arrayEach/* default */.A)(props || value, function(subValue, key) { - if (props) { - key = subValue; - subValue = value[key]; - } - // Recursively populate clone (susceptible to call stack limits). - (0,_assignValue/* default */.A)(result, key, baseClone(subValue, bitmask, customizer, key, value, stack)); - }); - return result; -} - -/* harmony default export */ const _baseClone = (baseClone); - - -/***/ }), - -/***/ 6240: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ _baseEach) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseForOwn.js -var _baseForOwn = __webpack_require__(79841); -// EXTERNAL MODULE: ./node_modules/lodash-es/isArrayLike.js -var isArrayLike = __webpack_require__(38446); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_createBaseEach.js - - -/** - * Creates a `baseEach` or `baseEachRight` function. - * - * @private - * @param {Function} eachFunc The function to iterate over a collection. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new base function. - */ -function createBaseEach(eachFunc, fromRight) { - return function(collection, iteratee) { - if (collection == null) { - return collection; - } - if (!(0,isArrayLike/* default */.A)(collection)) { - return eachFunc(collection, iteratee); - } - var length = collection.length, - index = fromRight ? length : -1, - iterable = Object(collection); - - while ((fromRight ? index-- : ++index < length)) { - if (iteratee(iterable[index], index, iterable) === false) { - break; - } - } - return collection; - }; -} - -/* harmony default export */ const _createBaseEach = (createBaseEach); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseEach.js - - - -/** - * The base implementation of `_.forEach` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array|Object} Returns `collection`. - */ -var baseEach = _createBaseEach(_baseForOwn/* default */.A); - -/* harmony default export */ const _baseEach = (baseEach); - - -/***/ }), - -/***/ 25707: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * The base implementation of `_.findIndex` and `_.findLastIndex` without - * support for iteratee shorthands. - * - * @private - * @param {Array} array The array to inspect. - * @param {Function} predicate The function invoked per iteration. - * @param {number} fromIndex The index to search from. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function baseFindIndex(array, predicate, fromIndex, fromRight) { - var length = array.length, - index = fromIndex + (fromRight ? 1 : -1); - - while ((fromRight ? index-- : ++index < length)) { - if (predicate(array[index], index, array)) { - return index; - } - } - return -1; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseFindIndex); - - -/***/ }), - -/***/ 13588: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ _baseFlatten) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayPush.js -var _arrayPush = __webpack_require__(76912); -// EXTERNAL MODULE: ./node_modules/lodash-es/_Symbol.js -var _Symbol = __webpack_require__(241); -// EXTERNAL MODULE: ./node_modules/lodash-es/isArguments.js + 1 modules -var isArguments = __webpack_require__(52274); -// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js -var isArray = __webpack_require__(92049); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_isFlattenable.js - - - - -/** Built-in value references. */ -var spreadableSymbol = _Symbol/* default */.A ? _Symbol/* default */.A.isConcatSpreadable : undefined; - -/** - * Checks if `value` is a flattenable `arguments` object or array. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. - */ -function isFlattenable(value) { - return (0,isArray/* default */.A)(value) || (0,isArguments/* default */.A)(value) || - !!(spreadableSymbol && value && value[spreadableSymbol]); -} - -/* harmony default export */ const _isFlattenable = (isFlattenable); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseFlatten.js - - - -/** - * The base implementation of `_.flatten` with support for restricting flattening. - * - * @private - * @param {Array} array The array to flatten. - * @param {number} depth The maximum recursion depth. - * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. - * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. - * @param {Array} [result=[]] The initial result value. - * @returns {Array} Returns the new flattened array. - */ -function baseFlatten(array, depth, predicate, isStrict, result) { - var index = -1, - length = array.length; - - predicate || (predicate = _isFlattenable); - result || (result = []); - - while (++index < length) { - var value = array[index]; - if (depth > 0 && predicate(value)) { - if (depth > 1) { - // Recursively flatten arrays (susceptible to call stack limits). - baseFlatten(value, depth - 1, predicate, isStrict, result); - } else { - (0,_arrayPush/* default */.A)(result, value); - } - } else if (!isStrict) { - result[result.length] = value; - } - } - return result; -} - -/* harmony default export */ const _baseFlatten = (baseFlatten); - - -/***/ }), - -/***/ 79841: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _baseFor_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4574); -/* harmony import */ var _keys_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(27422); - - - -/** - * The base implementation of `_.forOwn` without support for iteratee shorthands. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Object} Returns `object`. - */ -function baseForOwn(object, iteratee) { - return object && (0,_baseFor_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(object, iteratee, _keys_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseForOwn); - - -/***/ }), - -/***/ 66318: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _castPath_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7819); -/* harmony import */ var _toKey_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(30901); - - - -/** - * The base implementation of `_.get` without support for default values. - * - * @private - * @param {Object} object The object to query. - * @param {Array|string} path The path of the property to get. - * @returns {*} Returns the resolved value. - */ -function baseGet(object, path) { - path = (0,_castPath_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(path, object); - - var index = 0, - length = path.length; - - while (object != null && index < length) { - object = object[(0,_toKey_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(path[index++])]; - } - return (index && index == length) ? object : undefined; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseGet); - - -/***/ }), - -/***/ 33831: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _arrayPush_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(76912); -/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(92049); - - - -/** - * The base implementation of `getAllKeys` and `getAllKeysIn` which uses - * `keysFunc` and `symbolsFunc` to get the enumerable property names and - * symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @param {Function} keysFunc The function to get the keys of `object`. - * @param {Function} symbolsFunc The function to get the symbols of `object`. - * @returns {Array} Returns the array of property names and symbols. - */ -function baseGetAllKeys(object, keysFunc, symbolsFunc) { - var result = keysFunc(object); - return (0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(object) ? result : (0,_arrayPush_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(result, symbolsFunc(object)); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseGetAllKeys); - - -/***/ }), - -/***/ 49574: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ _baseIteratee) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_Stack.js + 5 modules -var _Stack = __webpack_require__(11754); -// EXTERNAL MODULE: ./node_modules/lodash-es/_SetCache.js + 2 modules -var _SetCache = __webpack_require__(62062); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_arraySome.js -/** - * A specialized version of `_.some` for arrays without support for iteratee - * shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {boolean} Returns `true` if any element passes the predicate check, - * else `false`. - */ -function arraySome(array, predicate) { - var index = -1, - length = array == null ? 0 : array.length; - - while (++index < length) { - if (predicate(array[index], index, array)) { - return true; - } - } - return false; -} - -/* harmony default export */ const _arraySome = (arraySome); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_cacheHas.js -var _cacheHas = __webpack_require__(64099); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_equalArrays.js - - - - -/** Used to compose bitmasks for value comparisons. */ -var COMPARE_PARTIAL_FLAG = 1, - COMPARE_UNORDERED_FLAG = 2; - -/** - * A specialized version of `baseIsEqualDeep` for arrays with support for - * partial deep comparisons. - * - * @private - * @param {Array} array The array to compare. - * @param {Array} other The other array to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} stack Tracks traversed `array` and `other` objects. - * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. - */ -function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { - var isPartial = bitmask & COMPARE_PARTIAL_FLAG, - arrLength = array.length, - othLength = other.length; - - if (arrLength != othLength && !(isPartial && othLength > arrLength)) { - return false; - } - // Check that cyclic values are equal. - var arrStacked = stack.get(array); - var othStacked = stack.get(other); - if (arrStacked && othStacked) { - return arrStacked == other && othStacked == array; - } - var index = -1, - result = true, - seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new _SetCache/* default */.A : undefined; - - stack.set(array, other); - stack.set(other, array); - - // Ignore non-index properties. - while (++index < arrLength) { - var arrValue = array[index], - othValue = other[index]; - - if (customizer) { - var compared = isPartial - ? customizer(othValue, arrValue, index, other, array, stack) - : customizer(arrValue, othValue, index, array, other, stack); - } - if (compared !== undefined) { - if (compared) { - continue; - } - result = false; - break; - } - // Recursively compare arrays (susceptible to call stack limits). - if (seen) { - if (!_arraySome(other, function(othValue, othIndex) { - if (!(0,_cacheHas/* default */.A)(seen, othIndex) && - (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { - return seen.push(othIndex); - } - })) { - result = false; - break; - } - } else if (!( - arrValue === othValue || - equalFunc(arrValue, othValue, bitmask, customizer, stack) - )) { - result = false; - break; - } - } - stack['delete'](array); - stack['delete'](other); - return result; -} - -/* harmony default export */ const _equalArrays = (equalArrays); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_Symbol.js -var _Symbol = __webpack_require__(241); -// EXTERNAL MODULE: ./node_modules/lodash-es/_Uint8Array.js -var _Uint8Array = __webpack_require__(43988); -// EXTERNAL MODULE: ./node_modules/lodash-es/eq.js -var eq = __webpack_require__(66984); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_mapToArray.js -/** - * Converts `map` to its key-value pairs. - * - * @private - * @param {Object} map The map to convert. - * @returns {Array} Returns the key-value pairs. - */ -function mapToArray(map) { - var index = -1, - result = Array(map.size); - - map.forEach(function(value, key) { - result[++index] = [key, value]; - }); - return result; -} - -/* harmony default export */ const _mapToArray = (mapToArray); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_setToArray.js -var _setToArray = __webpack_require__(29959); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_equalByTag.js - - - - - - - -/** Used to compose bitmasks for value comparisons. */ -var _equalByTag_COMPARE_PARTIAL_FLAG = 1, - _equalByTag_COMPARE_UNORDERED_FLAG = 2; - -/** `Object#toString` result references. */ -var boolTag = '[object Boolean]', - dateTag = '[object Date]', - errorTag = '[object Error]', - mapTag = '[object Map]', - numberTag = '[object Number]', - regexpTag = '[object RegExp]', - setTag = '[object Set]', - stringTag = '[object String]', - symbolTag = '[object Symbol]'; - -var arrayBufferTag = '[object ArrayBuffer]', - dataViewTag = '[object DataView]'; - -/** Used to convert symbols to primitives and strings. */ -var symbolProto = _Symbol/* default */.A ? _Symbol/* default */.A.prototype : undefined, - symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; - -/** - * A specialized version of `baseIsEqualDeep` for comparing objects of - * the same `toStringTag`. - * - * **Note:** This function only supports comparing values with tags of - * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {string} tag The `toStringTag` of the objects to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} stack Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ -function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { - switch (tag) { - case dataViewTag: - if ((object.byteLength != other.byteLength) || - (object.byteOffset != other.byteOffset)) { - return false; - } - object = object.buffer; - other = other.buffer; - - case arrayBufferTag: - if ((object.byteLength != other.byteLength) || - !equalFunc(new _Uint8Array/* default */.A(object), new _Uint8Array/* default */.A(other))) { - return false; - } - return true; - - case boolTag: - case dateTag: - case numberTag: - // Coerce booleans to `1` or `0` and dates to milliseconds. - // Invalid dates are coerced to `NaN`. - return (0,eq/* default */.A)(+object, +other); - - case errorTag: - return object.name == other.name && object.message == other.message; - - case regexpTag: - case stringTag: - // Coerce regexes to strings and treat strings, primitives and objects, - // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring - // for more details. - return object == (other + ''); - - case mapTag: - var convert = _mapToArray; - - case setTag: - var isPartial = bitmask & _equalByTag_COMPARE_PARTIAL_FLAG; - convert || (convert = _setToArray/* default */.A); - - if (object.size != other.size && !isPartial) { - return false; - } - // Assume cyclic values are equal. - var stacked = stack.get(object); - if (stacked) { - return stacked == other; - } - bitmask |= _equalByTag_COMPARE_UNORDERED_FLAG; - - // Recursively compare objects (susceptible to call stack limits). - stack.set(object, other); - var result = _equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); - stack['delete'](object); - return result; - - case symbolTag: - if (symbolValueOf) { - return symbolValueOf.call(object) == symbolValueOf.call(other); - } - } - return false; -} - -/* harmony default export */ const _equalByTag = (equalByTag); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_getAllKeys.js -var _getAllKeys = __webpack_require__(19042); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_equalObjects.js - - -/** Used to compose bitmasks for value comparisons. */ -var _equalObjects_COMPARE_PARTIAL_FLAG = 1; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var _equalObjects_hasOwnProperty = objectProto.hasOwnProperty; - -/** - * A specialized version of `baseIsEqualDeep` for objects with support for - * partial deep comparisons. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} stack Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ -function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { - var isPartial = bitmask & _equalObjects_COMPARE_PARTIAL_FLAG, - objProps = (0,_getAllKeys/* default */.A)(object), - objLength = objProps.length, - othProps = (0,_getAllKeys/* default */.A)(other), - othLength = othProps.length; - - if (objLength != othLength && !isPartial) { - return false; - } - var index = objLength; - while (index--) { - var key = objProps[index]; - if (!(isPartial ? key in other : _equalObjects_hasOwnProperty.call(other, key))) { - return false; - } - } - // Check that cyclic values are equal. - var objStacked = stack.get(object); - var othStacked = stack.get(other); - if (objStacked && othStacked) { - return objStacked == other && othStacked == object; - } - var result = true; - stack.set(object, other); - stack.set(other, object); - - var skipCtor = isPartial; - while (++index < objLength) { - key = objProps[index]; - var objValue = object[key], - othValue = other[key]; - - if (customizer) { - var compared = isPartial - ? customizer(othValue, objValue, key, other, object, stack) - : customizer(objValue, othValue, key, object, other, stack); - } - // Recursively compare objects (susceptible to call stack limits). - if (!(compared === undefined - ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) - : compared - )) { - result = false; - break; - } - skipCtor || (skipCtor = key == 'constructor'); - } - if (result && !skipCtor) { - var objCtor = object.constructor, - othCtor = other.constructor; - - // Non `Object` object instances with different constructors are not equal. - if (objCtor != othCtor && - ('constructor' in object && 'constructor' in other) && - !(typeof objCtor == 'function' && objCtor instanceof objCtor && - typeof othCtor == 'function' && othCtor instanceof othCtor)) { - result = false; - } - } - stack['delete'](object); - stack['delete'](other); - return result; -} - -/* harmony default export */ const _equalObjects = (equalObjects); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_getTag.js + 3 modules -var _getTag = __webpack_require__(9779); -// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js -var isArray = __webpack_require__(92049); -// EXTERNAL MODULE: ./node_modules/lodash-es/isBuffer.js + 1 modules -var isBuffer = __webpack_require__(99912); -// EXTERNAL MODULE: ./node_modules/lodash-es/isTypedArray.js + 1 modules -var isTypedArray = __webpack_require__(33858); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsEqualDeep.js - - - - - - - - - -/** Used to compose bitmasks for value comparisons. */ -var _baseIsEqualDeep_COMPARE_PARTIAL_FLAG = 1; - -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - objectTag = '[object Object]'; - -/** Used for built-in method references. */ -var _baseIsEqualDeep_objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var _baseIsEqualDeep_hasOwnProperty = _baseIsEqualDeep_objectProto.hasOwnProperty; - -/** - * A specialized version of `baseIsEqual` for arrays and objects which performs - * deep comparisons and tracks traversed objects enabling objects with circular - * references to be compared. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} [stack] Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ -function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { - var objIsArr = (0,isArray/* default */.A)(object), - othIsArr = (0,isArray/* default */.A)(other), - objTag = objIsArr ? arrayTag : (0,_getTag/* default */.A)(object), - othTag = othIsArr ? arrayTag : (0,_getTag/* default */.A)(other); - - objTag = objTag == argsTag ? objectTag : objTag; - othTag = othTag == argsTag ? objectTag : othTag; - - var objIsObj = objTag == objectTag, - othIsObj = othTag == objectTag, - isSameTag = objTag == othTag; - - if (isSameTag && (0,isBuffer/* default */.A)(object)) { - if (!(0,isBuffer/* default */.A)(other)) { - return false; - } - objIsArr = true; - objIsObj = false; - } - if (isSameTag && !objIsObj) { - stack || (stack = new _Stack/* default */.A); - return (objIsArr || (0,isTypedArray/* default */.A)(object)) - ? _equalArrays(object, other, bitmask, customizer, equalFunc, stack) - : _equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); - } - if (!(bitmask & _baseIsEqualDeep_COMPARE_PARTIAL_FLAG)) { - var objIsWrapped = objIsObj && _baseIsEqualDeep_hasOwnProperty.call(object, '__wrapped__'), - othIsWrapped = othIsObj && _baseIsEqualDeep_hasOwnProperty.call(other, '__wrapped__'); - - if (objIsWrapped || othIsWrapped) { - var objUnwrapped = objIsWrapped ? object.value() : object, - othUnwrapped = othIsWrapped ? other.value() : other; - - stack || (stack = new _Stack/* default */.A); - return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); - } - } - if (!isSameTag) { - return false; - } - stack || (stack = new _Stack/* default */.A); - return _equalObjects(object, other, bitmask, customizer, equalFunc, stack); -} - -/* harmony default export */ const _baseIsEqualDeep = (baseIsEqualDeep); - -// EXTERNAL MODULE: ./node_modules/lodash-es/isObjectLike.js -var isObjectLike = __webpack_require__(53098); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsEqual.js - - - -/** - * The base implementation of `_.isEqual` which supports partial comparisons - * and tracks traversed objects. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @param {boolean} bitmask The bitmask flags. - * 1 - Unordered comparison - * 2 - Partial comparison - * @param {Function} [customizer] The function to customize comparisons. - * @param {Object} [stack] Tracks traversed `value` and `other` objects. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - */ -function baseIsEqual(value, other, bitmask, customizer, stack) { - if (value === other) { - return true; - } - if (value == null || other == null || (!(0,isObjectLike/* default */.A)(value) && !(0,isObjectLike/* default */.A)(other))) { - return value !== value && other !== other; - } - return _baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); -} - -/* harmony default export */ const _baseIsEqual = (baseIsEqual); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsMatch.js - - - -/** Used to compose bitmasks for value comparisons. */ -var _baseIsMatch_COMPARE_PARTIAL_FLAG = 1, - _baseIsMatch_COMPARE_UNORDERED_FLAG = 2; - -/** - * The base implementation of `_.isMatch` without support for iteratee shorthands. - * - * @private - * @param {Object} object The object to inspect. - * @param {Object} source The object of property values to match. - * @param {Array} matchData The property names, values, and compare flags to match. - * @param {Function} [customizer] The function to customize comparisons. - * @returns {boolean} Returns `true` if `object` is a match, else `false`. - */ -function baseIsMatch(object, source, matchData, customizer) { - var index = matchData.length, - length = index, - noCustomizer = !customizer; - - if (object == null) { - return !length; - } - object = Object(object); - while (index--) { - var data = matchData[index]; - if ((noCustomizer && data[2]) - ? data[1] !== object[data[0]] - : !(data[0] in object) - ) { - return false; - } - } - while (++index < length) { - data = matchData[index]; - var key = data[0], - objValue = object[key], - srcValue = data[1]; - - if (noCustomizer && data[2]) { - if (objValue === undefined && !(key in object)) { - return false; - } - } else { - var stack = new _Stack/* default */.A; - if (customizer) { - var result = customizer(objValue, srcValue, key, object, source, stack); - } - if (!(result === undefined - ? _baseIsEqual(srcValue, objValue, _baseIsMatch_COMPARE_PARTIAL_FLAG | _baseIsMatch_COMPARE_UNORDERED_FLAG, customizer, stack) - : result - )) { - return false; - } - } - } - return true; -} - -/* harmony default export */ const _baseIsMatch = (baseIsMatch); - -// EXTERNAL MODULE: ./node_modules/lodash-es/isObject.js -var isObject = __webpack_require__(23149); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_isStrictComparable.js - - -/** - * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` if suitable for strict - * equality comparisons, else `false`. - */ -function isStrictComparable(value) { - return value === value && !(0,isObject/* default */.A)(value); -} - -/* harmony default export */ const _isStrictComparable = (isStrictComparable); - -// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js -var keys = __webpack_require__(27422); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_getMatchData.js - - - -/** - * Gets the property names, values, and compare flags of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the match data of `object`. - */ -function getMatchData(object) { - var result = (0,keys/* default */.A)(object), - length = result.length; - - while (length--) { - var key = result[length], - value = object[key]; - - result[length] = [key, value, _isStrictComparable(value)]; - } - return result; -} - -/* harmony default export */ const _getMatchData = (getMatchData); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_matchesStrictComparable.js -/** - * A specialized version of `matchesProperty` for source values suitable - * for strict equality comparisons, i.e. `===`. - * - * @private - * @param {string} key The key of the property to get. - * @param {*} srcValue The value to match. - * @returns {Function} Returns the new spec function. - */ -function matchesStrictComparable(key, srcValue) { - return function(object) { - if (object == null) { - return false; - } - return object[key] === srcValue && - (srcValue !== undefined || (key in Object(object))); - }; -} - -/* harmony default export */ const _matchesStrictComparable = (matchesStrictComparable); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseMatches.js - - - - -/** - * The base implementation of `_.matches` which doesn't clone `source`. - * - * @private - * @param {Object} source The object of property values to match. - * @returns {Function} Returns the new spec function. - */ -function baseMatches(source) { - var matchData = _getMatchData(source); - if (matchData.length == 1 && matchData[0][2]) { - return _matchesStrictComparable(matchData[0][0], matchData[0][1]); - } - return function(object) { - return object === source || _baseIsMatch(object, source, matchData); - }; -} - -/* harmony default export */ const _baseMatches = (baseMatches); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGet.js -var _baseGet = __webpack_require__(66318); -;// CONCATENATED MODULE: ./node_modules/lodash-es/get.js - - -/** - * Gets the value at `path` of `object`. If the resolved value is - * `undefined`, the `defaultValue` is returned in its place. - * - * @static - * @memberOf _ - * @since 3.7.0 - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path of the property to get. - * @param {*} [defaultValue] The value returned for `undefined` resolved values. - * @returns {*} Returns the resolved value. - * @example - * - * var object = { 'a': [{ 'b': { 'c': 3 } }] }; - * - * _.get(object, 'a[0].b.c'); - * // => 3 - * - * _.get(object, ['a', '0', 'b', 'c']); - * // => 3 - * - * _.get(object, 'a.b.c', 'default'); - * // => 'default' - */ -function get(object, path, defaultValue) { - var result = object == null ? undefined : (0,_baseGet/* default */.A)(object, path); - return result === undefined ? defaultValue : result; -} - -/* harmony default export */ const lodash_es_get = (get); - -// EXTERNAL MODULE: ./node_modules/lodash-es/hasIn.js + 1 modules -var hasIn = __webpack_require__(39188); -// EXTERNAL MODULE: ./node_modules/lodash-es/_isKey.js -var _isKey = __webpack_require__(86586); -// EXTERNAL MODULE: ./node_modules/lodash-es/_toKey.js -var _toKey = __webpack_require__(30901); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseMatchesProperty.js - - - - - - - - -/** Used to compose bitmasks for value comparisons. */ -var _baseMatchesProperty_COMPARE_PARTIAL_FLAG = 1, - _baseMatchesProperty_COMPARE_UNORDERED_FLAG = 2; - -/** - * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. - * - * @private - * @param {string} path The path of the property to get. - * @param {*} srcValue The value to match. - * @returns {Function} Returns the new spec function. - */ -function baseMatchesProperty(path, srcValue) { - if ((0,_isKey/* default */.A)(path) && _isStrictComparable(srcValue)) { - return _matchesStrictComparable((0,_toKey/* default */.A)(path), srcValue); - } - return function(object) { - var objValue = lodash_es_get(object, path); - return (objValue === undefined && objValue === srcValue) - ? (0,hasIn/* default */.A)(object, path) - : _baseIsEqual(srcValue, objValue, _baseMatchesProperty_COMPARE_PARTIAL_FLAG | _baseMatchesProperty_COMPARE_UNORDERED_FLAG); - }; -} - -/* harmony default export */ const _baseMatchesProperty = (baseMatchesProperty); - -// EXTERNAL MODULE: ./node_modules/lodash-es/identity.js -var identity = __webpack_require__(29008); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseProperty.js -var _baseProperty = __webpack_require__(70805); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_basePropertyDeep.js - - -/** - * A specialized version of `baseProperty` which supports deep paths. - * - * @private - * @param {Array|string} path The path of the property to get. - * @returns {Function} Returns the new accessor function. - */ -function basePropertyDeep(path) { - return function(object) { - return (0,_baseGet/* default */.A)(object, path); - }; -} - -/* harmony default export */ const _basePropertyDeep = (basePropertyDeep); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/property.js - - - - - -/** - * Creates a function that returns the value at `path` of a given object. - * - * @static - * @memberOf _ - * @since 2.4.0 - * @category Util - * @param {Array|string} path The path of the property to get. - * @returns {Function} Returns the new accessor function. - * @example - * - * var objects = [ - * { 'a': { 'b': 2 } }, - * { 'a': { 'b': 1 } } - * ]; - * - * _.map(objects, _.property('a.b')); - * // => [2, 1] - * - * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b'); - * // => [1, 2] - */ -function property(path) { - return (0,_isKey/* default */.A)(path) ? (0,_baseProperty/* default */.A)((0,_toKey/* default */.A)(path)) : _basePropertyDeep(path); -} - -/* harmony default export */ const lodash_es_property = (property); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIteratee.js - - - - - - -/** - * The base implementation of `_.iteratee`. - * - * @private - * @param {*} [value=_.identity] The value to convert to an iteratee. - * @returns {Function} Returns the iteratee. - */ -function baseIteratee(value) { - // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. - // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. - if (typeof value == 'function') { - return value; - } - if (value == null) { - return identity/* default */.A; - } - if (typeof value == 'object') { - return (0,isArray/* default */.A)(value) - ? _baseMatchesProperty(value[0], value[1]) - : _baseMatches(value); - } - return lodash_es_property(value); -} - -/* harmony default export */ const _baseIteratee = (baseIteratee); - - -/***/ }), - -/***/ 52568: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _baseEach_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6240); -/* harmony import */ var _isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(38446); - - - -/** - * The base implementation of `_.map` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the new mapped array. - */ -function baseMap(collection, iteratee) { - var index = -1, - result = (0,_isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(collection) ? Array(collection.length) : []; - - (0,_baseEach_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(collection, function(value, key, collection) { - result[++index] = iteratee(value, key, collection); - }); - return result; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseMap); - - -/***/ }), - -/***/ 70805: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * The base implementation of `_.property` without support for deep paths. - * - * @private - * @param {string} key The key of the property to get. - * @returns {Function} Returns the new accessor function. - */ -function baseProperty(key) { - return function(object) { - return object == null ? undefined : object[key]; - }; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseProperty); - - -/***/ }), - -/***/ 64099: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * Checks if a `cache` value for `key` exists. - * - * @private - * @param {Object} cache The cache to query. - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ -function cacheHas(cache, key) { - return cache.has(key); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (cacheHas); - - -/***/ }), - -/***/ 99922: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(29008); - - -/** - * Casts `value` to `identity` if it's not a function. - * - * @private - * @param {*} value The value to inspect. - * @returns {Function} Returns cast function. - */ -function castFunction(value) { - return typeof value == 'function' ? value : _identity_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (castFunction); - - -/***/ }), - -/***/ 7819: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ _castPath) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js -var isArray = __webpack_require__(92049); -// EXTERNAL MODULE: ./node_modules/lodash-es/_isKey.js -var _isKey = __webpack_require__(86586); -// EXTERNAL MODULE: ./node_modules/lodash-es/memoize.js -var memoize = __webpack_require__(46632); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_memoizeCapped.js - - -/** Used as the maximum memoize cache size. */ -var MAX_MEMOIZE_SIZE = 500; - -/** - * A specialized version of `_.memoize` which clears the memoized function's - * cache when it exceeds `MAX_MEMOIZE_SIZE`. - * - * @private - * @param {Function} func The function to have its output memoized. - * @returns {Function} Returns the new memoized function. - */ -function memoizeCapped(func) { - var result = (0,memoize/* default */.A)(func, function(key) { - if (cache.size === MAX_MEMOIZE_SIZE) { - cache.clear(); - } - return key; - }); - - var cache = result.cache; - return result; -} - -/* harmony default export */ const _memoizeCapped = (memoizeCapped); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_stringToPath.js - - -/** Used to match property names within property paths. */ -var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; - -/** Used to match backslashes in property paths. */ -var reEscapeChar = /\\(\\)?/g; - -/** - * Converts `string` to a property path array. - * - * @private - * @param {string} string The string to convert. - * @returns {Array} Returns the property path array. - */ -var stringToPath = _memoizeCapped(function(string) { - var result = []; - if (string.charCodeAt(0) === 46 /* . */) { - result.push(''); - } - string.replace(rePropName, function(match, number, quote, subString) { - result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match)); - }); - return result; -}); - -/* harmony default export */ const _stringToPath = (stringToPath); - -// EXTERNAL MODULE: ./node_modules/lodash-es/toString.js + 1 modules -var lodash_es_toString = __webpack_require__(28894); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_castPath.js - - - - - -/** - * Casts `value` to a path array if it's not one. - * - * @private - * @param {*} value The value to inspect. - * @param {Object} [object] The object to query keys on. - * @returns {Array} Returns the cast property path array. - */ -function castPath(value, object) { - if ((0,isArray/* default */.A)(value)) { - return value; - } - return (0,_isKey/* default */.A)(value, object) ? [value] : _stringToPath((0,lodash_es_toString/* default */.A)(value)); -} - -/* harmony default export */ const _castPath = (castPath); - - -/***/ }), - -/***/ 19042: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _baseGetAllKeys_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(33831); -/* harmony import */ var _getSymbols_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(14792); -/* harmony import */ var _keys_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(27422); - - - - -/** - * Creates an array of own enumerable property names and symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names and symbols. - */ -function getAllKeys(object) { - return (0,_baseGetAllKeys_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(object, _keys_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A, _getSymbols_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (getAllKeys); - - -/***/ }), - -/***/ 14792: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _arrayFilter_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2634); -/* harmony import */ var _stubArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13153); - - - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Built-in value references. */ -var propertyIsEnumerable = objectProto.propertyIsEnumerable; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeGetSymbols = Object.getOwnPropertySymbols; - -/** - * Creates an array of the own enumerable symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of symbols. - */ -var getSymbols = !nativeGetSymbols ? _stubArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A : function(object) { - if (object == null) { - return []; - } - object = Object(object); - return (0,_arrayFilter_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(nativeGetSymbols(object), function(symbol) { - return propertyIsEnumerable.call(object, symbol); - }); -}; - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (getSymbols); - - -/***/ }), - -/***/ 85054: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _castPath_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7819); -/* harmony import */ var _isArguments_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(52274); -/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(92049); -/* harmony import */ var _isIndex_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(25353); -/* harmony import */ var _isLength_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5254); -/* harmony import */ var _toKey_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(30901); - - - - - - - -/** - * Checks if `path` exists on `object`. - * - * @private - * @param {Object} object The object to query. - * @param {Array|string} path The path to check. - * @param {Function} hasFunc The function to check properties. - * @returns {boolean} Returns `true` if `path` exists, else `false`. - */ -function hasPath(object, path, hasFunc) { - path = (0,_castPath_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(path, object); - - var index = -1, - length = path.length, - result = false; - - while (++index < length) { - var key = (0,_toKey_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(path[index]); - if (!(result = object != null && hasFunc(object, key))) { - break; - } - object = object[key]; - } - if (result || ++index != length) { - return result; - } - length = object == null ? 0 : object.length; - return !!length && (0,_isLength_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)(length) && (0,_isIndex_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(key, length) && - ((0,_isArray_js__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .A)(object) || (0,_isArguments_js__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A)(object)); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (hasPath); - - -/***/ }), - -/***/ 86586: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(92049); -/* harmony import */ var _isSymbol_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(61882); - - - -/** Used to match property names within property paths. */ -var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, - reIsPlainProp = /^\w*$/; - -/** - * Checks if `value` is a property name and not a property path. - * - * @private - * @param {*} value The value to check. - * @param {Object} [object] The object to query keys on. - * @returns {boolean} Returns `true` if `value` is a property name, else `false`. - */ -function isKey(value, object) { - if ((0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(value)) { - return false; - } - var type = typeof value; - if (type == 'number' || type == 'symbol' || type == 'boolean' || - value == null || (0,_isSymbol_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(value)) { - return true; - } - return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || - (object != null && value in Object(object)); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isKey); - - -/***/ }), - -/***/ 29959: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * Converts `set` to an array of its values. - * - * @private - * @param {Object} set The set to convert. - * @returns {Array} Returns the values. - */ -function setToArray(set) { - var index = -1, - result = Array(set.size); - - set.forEach(function(value) { - result[++index] = value; - }); - return result; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (setToArray); - - -/***/ }), - -/***/ 30901: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _isSymbol_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(61882); - - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0; - -/** - * Converts `value` to a string key if it's not a string or symbol. - * - * @private - * @param {*} value The value to inspect. - * @returns {string|symbol} Returns the key. - */ -function toKey(value) { - if (typeof value == 'string' || (0,_isSymbol_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(value)) { - return value; - } - var result = (value + ''); - return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (toKey); - - -/***/ }), - -/***/ 23068: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _baseRest_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(24326); -/* harmony import */ var _eq_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(66984); -/* harmony import */ var _isIterateeCall_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6832); -/* harmony import */ var _keysIn_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(55615); - - - - - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Assigns own and inherited enumerable string keyed properties of source - * objects to the destination object for all destination properties that - * resolve to `undefined`. Source objects are applied from left to right. - * Once a property is set, additional values of the same property are ignored. - * - * **Note:** This method mutates `object`. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. - * @see _.defaultsDeep - * @example - * - * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); - * // => { 'a': 1, 'b': 2 } - */ -var defaults = (0,_baseRest_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(function(object, sources) { - object = Object(object); - - var index = -1; - var length = sources.length; - var guard = length > 2 ? sources[2] : undefined; - - if (guard && (0,_isIterateeCall_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(sources[0], sources[1], guard)) { - length = 1; - } - - while (++index < length) { - var source = sources[index]; - var props = (0,_keysIn_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)(source); - var propsIndex = -1; - var propsLength = props.length; - - while (++propsIndex < propsLength) { - var key = props[propsIndex]; - var value = object[key]; - - if (value === undefined || - ((0,_eq_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(value, objectProto[key]) && !hasOwnProperty.call(object, key))) { - object[key] = source[key]; - } - } - } - - return object; -}); - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (defaults); - - -/***/ }), - -/***/ 11662: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ lodash_es_filter) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayFilter.js -var _arrayFilter = __webpack_require__(2634); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseEach.js + 1 modules -var _baseEach = __webpack_require__(6240); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseFilter.js - - -/** - * The base implementation of `_.filter` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {Array} Returns the new filtered array. - */ -function baseFilter(collection, predicate) { - var result = []; - (0,_baseEach/* default */.A)(collection, function(value, index, collection) { - if (predicate(value, index, collection)) { - result.push(value); - } - }); - return result; -} - -/* harmony default export */ const _baseFilter = (baseFilter); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseIteratee.js + 16 modules -var _baseIteratee = __webpack_require__(49574); -// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js -var isArray = __webpack_require__(92049); -;// CONCATENATED MODULE: ./node_modules/lodash-es/filter.js - - - - - -/** - * Iterates over elements of `collection`, returning an array of all elements - * `predicate` returns truthy for. The predicate is invoked with three - * arguments: (value, index|key, collection). - * - * **Note:** Unlike `_.remove`, this method returns a new array. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @returns {Array} Returns the new filtered array. - * @see _.reject - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': true }, - * { 'user': 'fred', 'age': 40, 'active': false } - * ]; - * - * _.filter(users, function(o) { return !o.active; }); - * // => objects for ['fred'] - * - * // The `_.matches` iteratee shorthand. - * _.filter(users, { 'age': 36, 'active': true }); - * // => objects for ['barney'] - * - * // The `_.matchesProperty` iteratee shorthand. - * _.filter(users, ['active', false]); - * // => objects for ['fred'] - * - * // The `_.property` iteratee shorthand. - * _.filter(users, 'active'); - * // => objects for ['barney'] - * - * // Combining several predicates using `_.overEvery` or `_.overSome`. - * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]])); - * // => objects for ['fred', 'barney'] - */ -function filter(collection, predicate) { - var func = (0,isArray/* default */.A)(collection) ? _arrayFilter/* default */.A : _baseFilter; - return func(collection, (0,_baseIteratee/* default */.A)(predicate, 3)); -} - -/* harmony default export */ const lodash_es_filter = (filter); - - -/***/ }), - -/***/ 34098: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _baseFlatten_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13588); - - -/** - * Flattens `array` a single level deep. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to flatten. - * @returns {Array} Returns the new flattened array. - * @example - * - * _.flatten([1, [2, [3, [4]], 5]]); - * // => [1, 2, [3, [4]], 5] - */ -function flatten(array) { - var length = array == null ? 0 : array.length; - return length ? (0,_baseFlatten_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(array, 1) : []; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (flatten); - - -/***/ }), - -/***/ 8058: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _arrayEach_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(72641); -/* harmony import */ var _baseEach_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6240); -/* harmony import */ var _castFunction_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(99922); -/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(92049); - - - - - -/** - * Iterates over elements of `collection` and invokes `iteratee` for each element. - * The iteratee is invoked with three arguments: (value, index|key, collection). - * Iteratee functions may exit iteration early by explicitly returning `false`. - * - * **Note:** As with other "Collections" methods, objects with a "length" - * property are iterated like arrays. To avoid this behavior use `_.forIn` - * or `_.forOwn` for object iteration. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @alias each - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Array|Object} Returns `collection`. - * @see _.forEachRight - * @example - * - * _.forEach([1, 2], function(value) { - * console.log(value); - * }); - * // => Logs `1` then `2`. - * - * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { - * console.log(key); - * }); - * // => Logs 'a' then 'b' (iteration order is not guaranteed). - */ -function forEach(collection, iteratee) { - var func = (0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(collection) ? _arrayEach_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A : _baseEach_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A; - return func(collection, (0,_castFunction_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(iteratee)); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (forEach); - - -/***/ }), - -/***/ 48585: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ lodash_es_has) -}); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseHas.js -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var _baseHas_hasOwnProperty = objectProto.hasOwnProperty; - -/** - * The base implementation of `_.has` without support for deep paths. - * - * @private - * @param {Object} [object] The object to query. - * @param {Array|string} key The key to check. - * @returns {boolean} Returns `true` if `key` exists, else `false`. - */ -function baseHas(object, key) { - return object != null && _baseHas_hasOwnProperty.call(object, key); -} - -/* harmony default export */ const _baseHas = (baseHas); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_hasPath.js -var _hasPath = __webpack_require__(85054); -;// CONCATENATED MODULE: ./node_modules/lodash-es/has.js - - - -/** - * Checks if `path` is a direct property of `object`. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path to check. - * @returns {boolean} Returns `true` if `path` exists, else `false`. - * @example - * - * var object = { 'a': { 'b': 2 } }; - * var other = _.create({ 'a': _.create({ 'b': 2 }) }); - * - * _.has(object, 'a'); - * // => true - * - * _.has(object, 'a.b'); - * // => true - * - * _.has(object, ['a', 'b']); - * // => true - * - * _.has(other, 'a'); - * // => false - */ -function has(object, path) { - return object != null && (0,_hasPath/* default */.A)(object, path, _baseHas); -} - -/* harmony default export */ const lodash_es_has = (has); - - -/***/ }), - -/***/ 39188: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ lodash_es_hasIn) -}); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseHasIn.js -/** - * The base implementation of `_.hasIn` without support for deep paths. - * - * @private - * @param {Object} [object] The object to query. - * @param {Array|string} key The key to check. - * @returns {boolean} Returns `true` if `key` exists, else `false`. - */ -function baseHasIn(object, key) { - return object != null && key in Object(object); -} - -/* harmony default export */ const _baseHasIn = (baseHasIn); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_hasPath.js -var _hasPath = __webpack_require__(85054); -;// CONCATENATED MODULE: ./node_modules/lodash-es/hasIn.js - - - -/** - * Checks if `path` is a direct or inherited property of `object`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path to check. - * @returns {boolean} Returns `true` if `path` exists, else `false`. - * @example - * - * var object = _.create({ 'a': _.create({ 'b': 2 }) }); - * - * _.hasIn(object, 'a'); - * // => true - * - * _.hasIn(object, 'a.b'); - * // => true - * - * _.hasIn(object, ['a', 'b']); - * // => true - * - * _.hasIn(object, 'b'); - * // => false - */ -function hasIn(object, path) { - return object != null && (0,_hasPath/* default */.A)(object, path, _baseHasIn); -} - -/* harmony default export */ const lodash_es_hasIn = (hasIn); - - -/***/ }), - -/***/ 61882: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _baseGetTag_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(88496); -/* harmony import */ var _isObjectLike_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(53098); - - - -/** `Object#toString` result references. */ -var symbolTag = '[object Symbol]'; - -/** - * Checks if `value` is classified as a `Symbol` primitive or object. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. - * @example - * - * _.isSymbol(Symbol.iterator); - * // => true - * - * _.isSymbol('abc'); - * // => false - */ -function isSymbol(value) { - return typeof value == 'symbol' || - ((0,_isObjectLike_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(value) && (0,_baseGetTag_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(value) == symbolTag); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isSymbol); - - -/***/ }), - -/***/ 69592: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * Checks if `value` is `undefined`. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. - * @example - * - * _.isUndefined(void 0); - * // => true - * - * _.isUndefined(null); - * // => false - */ -function isUndefined(value) { - return value === undefined; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isUndefined); - - -/***/ }), - -/***/ 27422: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _arrayLikeKeys_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(83607); -/* harmony import */ var _baseKeys_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(69471); -/* harmony import */ var _isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(38446); - - - - -/** - * Creates an array of the own enumerable property names of `object`. - * - * **Note:** Non-object values are coerced to objects. See the - * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) - * for more details. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.keys(new Foo); - * // => ['a', 'b'] (iteration order is not guaranteed) - * - * _.keys('hi'); - * // => ['0', '1'] - */ -function keys(object) { - return (0,_isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(object) ? (0,_arrayLikeKeys_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(object) : (0,_baseKeys_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)(object); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (keys); - - -/***/ }), - -/***/ 74722: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _arrayMap_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(45572); -/* harmony import */ var _baseIteratee_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(49574); -/* harmony import */ var _baseMap_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(52568); -/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(92049); - - - - - -/** - * Creates an array of values by running each element in `collection` thru - * `iteratee`. The iteratee is invoked with three arguments: - * (value, index|key, collection). - * - * Many lodash methods are guarded to work as iteratees for methods like - * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. - * - * The guarded methods are: - * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, - * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`, - * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`, - * `template`, `trim`, `trimEnd`, `trimStart`, and `words` - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Array} Returns the new mapped array. - * @example - * - * function square(n) { - * return n * n; - * } - * - * _.map([4, 8], square); - * // => [16, 64] - * - * _.map({ 'a': 4, 'b': 8 }, square); - * // => [16, 64] (iteration order is not guaranteed) - * - * var users = [ - * { 'user': 'barney' }, - * { 'user': 'fred' } - * ]; - * - * // The `_.property` iteratee shorthand. - * _.map(users, 'user'); - * // => ['barney', 'fred'] - */ -function map(collection, iteratee) { - var func = (0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(collection) ? _arrayMap_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A : _baseMap_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A; - return func(collection, (0,_baseIteratee_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(iteratee, 3)); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (map); - - -/***/ }), - -/***/ 81942: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ lodash_es_pick) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGet.js -var _baseGet = __webpack_require__(66318); -// EXTERNAL MODULE: ./node_modules/lodash-es/_assignValue.js -var _assignValue = __webpack_require__(52851); -// EXTERNAL MODULE: ./node_modules/lodash-es/_castPath.js + 2 modules -var _castPath = __webpack_require__(7819); -// EXTERNAL MODULE: ./node_modules/lodash-es/_isIndex.js -var _isIndex = __webpack_require__(25353); -// EXTERNAL MODULE: ./node_modules/lodash-es/isObject.js -var isObject = __webpack_require__(23149); -// EXTERNAL MODULE: ./node_modules/lodash-es/_toKey.js -var _toKey = __webpack_require__(30901); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseSet.js - - - - - - -/** - * The base implementation of `_.set`. - * - * @private - * @param {Object} object The object to modify. - * @param {Array|string} path The path of the property to set. - * @param {*} value The value to set. - * @param {Function} [customizer] The function to customize path creation. - * @returns {Object} Returns `object`. - */ -function baseSet(object, path, value, customizer) { - if (!(0,isObject/* default */.A)(object)) { - return object; - } - path = (0,_castPath/* default */.A)(path, object); - - var index = -1, - length = path.length, - lastIndex = length - 1, - nested = object; - - while (nested != null && ++index < length) { - var key = (0,_toKey/* default */.A)(path[index]), - newValue = value; - - if (key === '__proto__' || key === 'constructor' || key === 'prototype') { - return object; - } - - if (index != lastIndex) { - var objValue = nested[key]; - newValue = customizer ? customizer(objValue, key, nested) : undefined; - if (newValue === undefined) { - newValue = (0,isObject/* default */.A)(objValue) - ? objValue - : ((0,_isIndex/* default */.A)(path[index + 1]) ? [] : {}); - } - } - (0,_assignValue/* default */.A)(nested, key, newValue); - nested = nested[key]; - } - return object; -} - -/* harmony default export */ const _baseSet = (baseSet); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_basePickBy.js - - - - -/** - * The base implementation of `_.pickBy` without support for iteratee shorthands. - * - * @private - * @param {Object} object The source object. - * @param {string[]} paths The property paths to pick. - * @param {Function} predicate The function invoked per property. - * @returns {Object} Returns the new object. - */ -function basePickBy(object, paths, predicate) { - var index = -1, - length = paths.length, - result = {}; - - while (++index < length) { - var path = paths[index], - value = (0,_baseGet/* default */.A)(object, path); - - if (predicate(value, path)) { - _baseSet(result, (0,_castPath/* default */.A)(path, object), value); - } - } - return result; -} - -/* harmony default export */ const _basePickBy = (basePickBy); - -// EXTERNAL MODULE: ./node_modules/lodash-es/hasIn.js + 1 modules -var hasIn = __webpack_require__(39188); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_basePick.js - - - -/** - * The base implementation of `_.pick` without support for individual - * property identifiers. - * - * @private - * @param {Object} object The source object. - * @param {string[]} paths The property paths to pick. - * @returns {Object} Returns the new object. - */ -function basePick(object, paths) { - return _basePickBy(object, paths, function(value, path) { - return (0,hasIn/* default */.A)(object, path); - }); -} - -/* harmony default export */ const _basePick = (basePick); - -// EXTERNAL MODULE: ./node_modules/lodash-es/flatten.js -var flatten = __webpack_require__(34098); -// EXTERNAL MODULE: ./node_modules/lodash-es/_overRest.js + 1 modules -var _overRest = __webpack_require__(76875); -// EXTERNAL MODULE: ./node_modules/lodash-es/_setToString.js + 2 modules -var _setToString = __webpack_require__(67525); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_flatRest.js - - - - -/** - * A specialized version of `baseRest` which flattens the rest array. - * - * @private - * @param {Function} func The function to apply a rest parameter to. - * @returns {Function} Returns the new function. - */ -function flatRest(func) { - return (0,_setToString/* default */.A)((0,_overRest/* default */.A)(func, undefined, flatten/* default */.A), func + ''); -} - -/* harmony default export */ const _flatRest = (flatRest); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/pick.js - - - -/** - * Creates an object composed of the picked `object` properties. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The source object. - * @param {...(string|string[])} [paths] The property paths to pick. - * @returns {Object} Returns the new object. - * @example - * - * var object = { 'a': 1, 'b': '2', 'c': 3 }; - * - * _.pick(object, ['a', 'c']); - * // => { 'a': 1, 'c': 3 } - */ -var pick = _flatRest(function(object, paths) { - return object == null ? {} : _basePick(object, paths); -}); - -/* harmony default export */ const lodash_es_pick = (pick); - - -/***/ }), - -/***/ 91395: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ lodash_es_range) -}); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseRange.js -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeCeil = Math.ceil, - nativeMax = Math.max; - -/** - * The base implementation of `_.range` and `_.rangeRight` which doesn't - * coerce arguments. - * - * @private - * @param {number} start The start of the range. - * @param {number} end The end of the range. - * @param {number} step The value to increment or decrement by. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Array} Returns the range of numbers. - */ -function baseRange(start, end, step, fromRight) { - var index = -1, - length = nativeMax(nativeCeil((end - start) / (step || 1)), 0), - result = Array(length); - - while (length--) { - result[fromRight ? length : ++index] = start; - start += step; - } - return result; -} - -/* harmony default export */ const _baseRange = (baseRange); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_isIterateeCall.js -var _isIterateeCall = __webpack_require__(6832); -// EXTERNAL MODULE: ./node_modules/lodash-es/toFinite.js + 3 modules -var toFinite = __webpack_require__(74342); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_createRange.js - - - - -/** - * Creates a `_.range` or `_.rangeRight` function. - * - * @private - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new range function. - */ -function createRange(fromRight) { - return function(start, end, step) { - if (step && typeof step != 'number' && (0,_isIterateeCall/* default */.A)(start, end, step)) { - end = step = undefined; - } - // Ensure the sign of `-0` is preserved. - start = (0,toFinite/* default */.A)(start); - if (end === undefined) { - end = start; - start = 0; - } else { - end = (0,toFinite/* default */.A)(end); - } - step = step === undefined ? (start < end ? 1 : -1) : (0,toFinite/* default */.A)(step); - return _baseRange(start, end, step, fromRight); - }; -} - -/* harmony default export */ const _createRange = (createRange); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/range.js - - -/** - * Creates an array of numbers (positive and/or negative) progressing from - * `start` up to, but not including, `end`. A step of `-1` is used if a negative - * `start` is specified without an `end` or `step`. If `end` is not specified, - * it's set to `start` with `start` then set to `0`. - * - * **Note:** JavaScript follows the IEEE-754 standard for resolving - * floating-point values which can produce unexpected results. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Util - * @param {number} [start=0] The start of the range. - * @param {number} end The end of the range. - * @param {number} [step=1] The value to increment or decrement by. - * @returns {Array} Returns the range of numbers. - * @see _.inRange, _.rangeRight - * @example - * - * _.range(4); - * // => [0, 1, 2, 3] - * - * _.range(-4); - * // => [0, -1, -2, -3] - * - * _.range(1, 5); - * // => [1, 2, 3, 4] - * - * _.range(0, 20, 5); - * // => [0, 5, 10, 15] - * - * _.range(0, -4, -1); - * // => [0, -1, -2, -3] - * - * _.range(1, 4, 0); - * // => [1, 1, 1] - * - * _.range(0); - * // => [] - */ -var range = _createRange(); - -/* harmony default export */ const lodash_es_range = (range); - - -/***/ }), - -/***/ 89463: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ lodash_es_reduce) -}); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_arrayReduce.js -/** - * A specialized version of `_.reduce` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {*} [accumulator] The initial value. - * @param {boolean} [initAccum] Specify using the first element of `array` as - * the initial value. - * @returns {*} Returns the accumulated value. - */ -function arrayReduce(array, iteratee, accumulator, initAccum) { - var index = -1, - length = array == null ? 0 : array.length; - - if (initAccum && length) { - accumulator = array[++index]; - } - while (++index < length) { - accumulator = iteratee(accumulator, array[index], index, array); - } - return accumulator; -} - -/* harmony default export */ const _arrayReduce = (arrayReduce); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseEach.js + 1 modules -var _baseEach = __webpack_require__(6240); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseIteratee.js + 16 modules -var _baseIteratee = __webpack_require__(49574); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseReduce.js -/** - * The base implementation of `_.reduce` and `_.reduceRight`, without support - * for iteratee shorthands, which iterates over `collection` using `eachFunc`. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {*} accumulator The initial value. - * @param {boolean} initAccum Specify using the first or last element of - * `collection` as the initial value. - * @param {Function} eachFunc The function to iterate over `collection`. - * @returns {*} Returns the accumulated value. - */ -function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { - eachFunc(collection, function(value, index, collection) { - accumulator = initAccum - ? (initAccum = false, value) - : iteratee(accumulator, value, index, collection); - }); - return accumulator; -} - -/* harmony default export */ const _baseReduce = (baseReduce); - -// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js -var isArray = __webpack_require__(92049); -;// CONCATENATED MODULE: ./node_modules/lodash-es/reduce.js - - - - - - -/** - * Reduces `collection` to a value which is the accumulated result of running - * each element in `collection` thru `iteratee`, where each successive - * invocation is supplied the return value of the previous. If `accumulator` - * is not given, the first element of `collection` is used as the initial - * value. The iteratee is invoked with four arguments: - * (accumulator, value, index|key, collection). - * - * Many lodash methods are guarded to work as iteratees for methods like - * `_.reduce`, `_.reduceRight`, and `_.transform`. - * - * The guarded methods are: - * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`, - * and `sortBy` - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @param {*} [accumulator] The initial value. - * @returns {*} Returns the accumulated value. - * @see _.reduceRight - * @example - * - * _.reduce([1, 2], function(sum, n) { - * return sum + n; - * }, 0); - * // => 3 - * - * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { - * (result[value] || (result[value] = [])).push(key); - * return result; - * }, {}); - * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed) - */ -function reduce(collection, iteratee, accumulator) { - var func = (0,isArray/* default */.A)(collection) ? _arrayReduce : _baseReduce, - initAccum = arguments.length < 3; - - return func(collection, (0,_baseIteratee/* default */.A)(iteratee, 4), accumulator, initAccum, _baseEach/* default */.A); -} - -/* harmony default export */ const lodash_es_reduce = (reduce); - - -/***/ }), - -/***/ 13153: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * This method returns a new empty array. - * - * @static - * @memberOf _ - * @since 4.13.0 - * @category Util - * @returns {Array} Returns the new empty array. - * @example - * - * var arrays = _.times(2, _.stubArray); - * - * console.log(arrays); - * // => [[], []] - * - * console.log(arrays[0] === arrays[1]); - * // => false - */ -function stubArray() { - return []; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (stubArray); - - -/***/ }), - -/***/ 74342: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ lodash_es_toFinite) -}); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_trimmedEndIndex.js -/** Used to match a single whitespace character. */ -var reWhitespace = /\s/; - -/** - * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace - * character of `string`. - * - * @private - * @param {string} string The string to inspect. - * @returns {number} Returns the index of the last non-whitespace character. - */ -function trimmedEndIndex(string) { - var index = string.length; - - while (index-- && reWhitespace.test(string.charAt(index))) {} - return index; -} - -/* harmony default export */ const _trimmedEndIndex = (trimmedEndIndex); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseTrim.js - - -/** Used to match leading whitespace. */ -var reTrimStart = /^\s+/; - -/** - * The base implementation of `_.trim`. - * - * @private - * @param {string} string The string to trim. - * @returns {string} Returns the trimmed string. - */ -function baseTrim(string) { - return string - ? string.slice(0, _trimmedEndIndex(string) + 1).replace(reTrimStart, '') - : string; -} - -/* harmony default export */ const _baseTrim = (baseTrim); - -// EXTERNAL MODULE: ./node_modules/lodash-es/isObject.js -var isObject = __webpack_require__(23149); -// EXTERNAL MODULE: ./node_modules/lodash-es/isSymbol.js -var isSymbol = __webpack_require__(61882); -;// CONCATENATED MODULE: ./node_modules/lodash-es/toNumber.js - - - - -/** Used as references for various `Number` constants. */ -var NAN = 0 / 0; - -/** Used to detect bad signed hexadecimal string values. */ -var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; - -/** Used to detect binary string values. */ -var reIsBinary = /^0b[01]+$/i; - -/** Used to detect octal string values. */ -var reIsOctal = /^0o[0-7]+$/i; - -/** Built-in method references without a dependency on `root`. */ -var freeParseInt = parseInt; - -/** - * Converts `value` to a number. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to process. - * @returns {number} Returns the number. - * @example - * - * _.toNumber(3.2); - * // => 3.2 - * - * _.toNumber(Number.MIN_VALUE); - * // => 5e-324 - * - * _.toNumber(Infinity); - * // => Infinity - * - * _.toNumber('3.2'); - * // => 3.2 - */ -function toNumber(value) { - if (typeof value == 'number') { - return value; - } - if ((0,isSymbol/* default */.A)(value)) { - return NAN; - } - if ((0,isObject/* default */.A)(value)) { - var other = typeof value.valueOf == 'function' ? value.valueOf() : value; - value = (0,isObject/* default */.A)(other) ? (other + '') : other; - } - if (typeof value != 'string') { - return value === 0 ? value : +value; - } - value = _baseTrim(value); - var isBinary = reIsBinary.test(value); - return (isBinary || reIsOctal.test(value)) - ? freeParseInt(value.slice(2), isBinary ? 2 : 8) - : (reIsBadHex.test(value) ? NAN : +value); -} - -/* harmony default export */ const lodash_es_toNumber = (toNumber); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/toFinite.js - - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0, - MAX_INTEGER = 1.7976931348623157e+308; - -/** - * Converts `value` to a finite number. - * - * @static - * @memberOf _ - * @since 4.12.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {number} Returns the converted number. - * @example - * - * _.toFinite(3.2); - * // => 3.2 - * - * _.toFinite(Number.MIN_VALUE); - * // => 5e-324 - * - * _.toFinite(Infinity); - * // => 1.7976931348623157e+308 - * - * _.toFinite('3.2'); - * // => 3.2 - */ -function toFinite(value) { - if (!value) { - return value === 0 ? value : 0; - } - value = lodash_es_toNumber(value); - if (value === INFINITY || value === -INFINITY) { - var sign = (value < 0 ? -1 : 1); - return sign * MAX_INTEGER; - } - return value === value ? value : 0; -} - -/* harmony default export */ const lodash_es_toFinite = (toFinite); - - -/***/ }), - -/***/ 28894: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ lodash_es_toString) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_Symbol.js -var _Symbol = __webpack_require__(241); -// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayMap.js -var _arrayMap = __webpack_require__(45572); -// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js -var isArray = __webpack_require__(92049); -// EXTERNAL MODULE: ./node_modules/lodash-es/isSymbol.js -var isSymbol = __webpack_require__(61882); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseToString.js - - - - - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0; - -/** Used to convert symbols to primitives and strings. */ -var symbolProto = _Symbol/* default */.A ? _Symbol/* default */.A.prototype : undefined, - symbolToString = symbolProto ? symbolProto.toString : undefined; - -/** - * The base implementation of `_.toString` which doesn't convert nullish - * values to empty strings. - * - * @private - * @param {*} value The value to process. - * @returns {string} Returns the string. - */ -function baseToString(value) { - // Exit early for strings to avoid a performance hit in some environments. - if (typeof value == 'string') { - return value; - } - if ((0,isArray/* default */.A)(value)) { - // Recursively convert values (susceptible to call stack limits). - return (0,_arrayMap/* default */.A)(value, baseToString) + ''; - } - if ((0,isSymbol/* default */.A)(value)) { - return symbolToString ? symbolToString.call(value) : ''; - } - var result = (value + ''); - return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; -} - -/* harmony default export */ const _baseToString = (baseToString); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/toString.js - - -/** - * Converts `value` to a string. An empty string is returned for `null` - * and `undefined` values. The sign of `-0` is preserved. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {string} Returns the converted string. - * @example - * - * _.toString(null); - * // => '' - * - * _.toString(-0); - * // => '-0' - * - * _.toString([1, 2, 3]); - * // => '1,2,3' - */ -function toString_toString(value) { - return value == null ? '' : _baseToString(value); -} - -/* harmony default export */ const lodash_es_toString = (toString_toString); - - -/***/ }), - -/***/ 5664: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _toString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(28894); - - -/** Used to generate unique IDs. */ -var idCounter = 0; - -/** - * Generates a unique ID. If `prefix` is given, the ID is appended to it. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Util - * @param {string} [prefix=''] The value to prefix the ID with. - * @returns {string} Returns the unique ID. - * @example - * - * _.uniqueId('contact_'); - * // => 'contact_104' - * - * _.uniqueId(); - * // => '105' - */ -function uniqueId(prefix) { - var id = ++idCounter; - return (0,_toString_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(prefix) + id; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (uniqueId); - - -/***/ }), - -/***/ 38207: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ lodash_es_values) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayMap.js -var _arrayMap = __webpack_require__(45572); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseValues.js - - -/** - * The base implementation of `_.values` and `_.valuesIn` which creates an - * array of `object` property values corresponding to the property names - * of `props`. - * - * @private - * @param {Object} object The object to query. - * @param {Array} props The property names to get values for. - * @returns {Object} Returns the array of property values. - */ -function baseValues(object, props) { - return (0,_arrayMap/* default */.A)(props, function(key) { - return object[key]; - }); -} - -/* harmony default export */ const _baseValues = (baseValues); - -// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js -var keys = __webpack_require__(27422); -;// CONCATENATED MODULE: ./node_modules/lodash-es/values.js - - - -/** - * Creates an array of the own enumerable string keyed property values of `object`. - * - * **Note:** Non-object values are coerced to objects. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property values. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.values(new Foo); - * // => [1, 2] (iteration order is not guaranteed) - * - * _.values('hi'); - * // => ['h', 'i'] - */ -function values(object) { - return object == null ? [] : _baseValues(object, (0,keys/* default */.A)(object)); -} - -/* harmony default export */ const lodash_es_values = (values); - - -/***/ }), - -/***/ 23417: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ diagram: () => (/* binding */ diagram) -/* harmony export */ }); -/* harmony import */ var _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(86079); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(26312); -/* harmony import */ var dagre_d3_es_src_dagre_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(21176); -/* harmony import */ var dagre_d3_es_src_graphlib_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(697); -/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(74353); -/* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(16750); -/* harmony import */ var dompurify__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(99418); - - - - - - - - - - - - - -var parser = function() { - var o = function(k, v, o2, l) { - for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) - ; - return o2; - }, $V0 = [1, 3], $V1 = [1, 4], $V2 = [1, 5], $V3 = [1, 6], $V4 = [5, 6, 8, 9, 11, 13, 31, 32, 33, 34, 35, 36, 44, 62, 63], $V5 = [1, 18], $V6 = [2, 7], $V7 = [1, 22], $V8 = [1, 23], $V9 = [1, 24], $Va = [1, 25], $Vb = [1, 26], $Vc = [1, 27], $Vd = [1, 20], $Ve = [1, 28], $Vf = [1, 29], $Vg = [62, 63], $Vh = [5, 8, 9, 11, 13, 31, 32, 33, 34, 35, 36, 44, 51, 53, 62, 63], $Vi = [1, 47], $Vj = [1, 48], $Vk = [1, 49], $Vl = [1, 50], $Vm = [1, 51], $Vn = [1, 52], $Vo = [1, 53], $Vp = [53, 54], $Vq = [1, 64], $Vr = [1, 60], $Vs = [1, 61], $Vt = [1, 62], $Vu = [1, 63], $Vv = [1, 65], $Vw = [1, 69], $Vx = [1, 70], $Vy = [1, 67], $Vz = [1, 68], $VA = [5, 8, 9, 11, 13, 31, 32, 33, 34, 35, 36, 44, 62, 63]; - var parser2 = { - trace: function trace() { - }, - yy: {}, - symbols_: { "error": 2, "start": 3, "directive": 4, "NEWLINE": 5, "RD": 6, "diagram": 7, "EOF": 8, "acc_title": 9, "acc_title_value": 10, "acc_descr": 11, "acc_descr_value": 12, "acc_descr_multiline_value": 13, "requirementDef": 14, "elementDef": 15, "relationshipDef": 16, "requirementType": 17, "requirementName": 18, "STRUCT_START": 19, "requirementBody": 20, "ID": 21, "COLONSEP": 22, "id": 23, "TEXT": 24, "text": 25, "RISK": 26, "riskLevel": 27, "VERIFYMTHD": 28, "verifyType": 29, "STRUCT_STOP": 30, "REQUIREMENT": 31, "FUNCTIONAL_REQUIREMENT": 32, "INTERFACE_REQUIREMENT": 33, "PERFORMANCE_REQUIREMENT": 34, "PHYSICAL_REQUIREMENT": 35, "DESIGN_CONSTRAINT": 36, "LOW_RISK": 37, "MED_RISK": 38, "HIGH_RISK": 39, "VERIFY_ANALYSIS": 40, "VERIFY_DEMONSTRATION": 41, "VERIFY_INSPECTION": 42, "VERIFY_TEST": 43, "ELEMENT": 44, "elementName": 45, "elementBody": 46, "TYPE": 47, "type": 48, "DOCREF": 49, "ref": 50, "END_ARROW_L": 51, "relationship": 52, "LINE": 53, "END_ARROW_R": 54, "CONTAINS": 55, "COPIES": 56, "DERIVES": 57, "SATISFIES": 58, "VERIFIES": 59, "REFINES": 60, "TRACES": 61, "unqString": 62, "qString": 63, "$accept": 0, "$end": 1 }, - terminals_: { 2: "error", 5: "NEWLINE", 6: "RD", 8: "EOF", 9: "acc_title", 10: "acc_title_value", 11: "acc_descr", 12: "acc_descr_value", 13: "acc_descr_multiline_value", 19: "STRUCT_START", 21: "ID", 22: "COLONSEP", 24: "TEXT", 26: "RISK", 28: "VERIFYMTHD", 30: "STRUCT_STOP", 31: "REQUIREMENT", 32: "FUNCTIONAL_REQUIREMENT", 33: "INTERFACE_REQUIREMENT", 34: "PERFORMANCE_REQUIREMENT", 35: "PHYSICAL_REQUIREMENT", 36: "DESIGN_CONSTRAINT", 37: "LOW_RISK", 38: "MED_RISK", 39: "HIGH_RISK", 40: "VERIFY_ANALYSIS", 41: "VERIFY_DEMONSTRATION", 42: "VERIFY_INSPECTION", 43: "VERIFY_TEST", 44: "ELEMENT", 47: "TYPE", 49: "DOCREF", 51: "END_ARROW_L", 53: "LINE", 54: "END_ARROW_R", 55: "CONTAINS", 56: "COPIES", 57: "DERIVES", 58: "SATISFIES", 59: "VERIFIES", 60: "REFINES", 61: "TRACES", 62: "unqString", 63: "qString" }, - productions_: [0, [3, 3], [3, 2], [3, 4], [4, 2], [4, 2], [4, 1], [7, 0], [7, 2], [7, 2], [7, 2], [7, 2], [7, 2], [14, 5], [20, 5], [20, 5], [20, 5], [20, 5], [20, 2], [20, 1], [17, 1], [17, 1], [17, 1], [17, 1], [17, 1], [17, 1], [27, 1], [27, 1], [27, 1], [29, 1], [29, 1], [29, 1], [29, 1], [15, 5], [46, 5], [46, 5], [46, 2], [46, 1], [16, 5], [16, 5], [52, 1], [52, 1], [52, 1], [52, 1], [52, 1], [52, 1], [52, 1], [18, 1], [18, 1], [23, 1], [23, 1], [25, 1], [25, 1], [45, 1], [45, 1], [48, 1], [48, 1], [50, 1], [50, 1]], - performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { - var $0 = $$.length - 1; - switch (yystate) { - case 4: - this.$ = $$[$0].trim(); - yy.setAccTitle(this.$); - break; - case 5: - case 6: - this.$ = $$[$0].trim(); - yy.setAccDescription(this.$); - break; - case 7: - this.$ = []; - break; - case 13: - yy.addRequirement($$[$0 - 3], $$[$0 - 4]); - break; - case 14: - yy.setNewReqId($$[$0 - 2]); - break; - case 15: - yy.setNewReqText($$[$0 - 2]); - break; - case 16: - yy.setNewReqRisk($$[$0 - 2]); - break; - case 17: - yy.setNewReqVerifyMethod($$[$0 - 2]); - break; - case 20: - this.$ = yy.RequirementType.REQUIREMENT; - break; - case 21: - this.$ = yy.RequirementType.FUNCTIONAL_REQUIREMENT; - break; - case 22: - this.$ = yy.RequirementType.INTERFACE_REQUIREMENT; - break; - case 23: - this.$ = yy.RequirementType.PERFORMANCE_REQUIREMENT; - break; - case 24: - this.$ = yy.RequirementType.PHYSICAL_REQUIREMENT; - break; - case 25: - this.$ = yy.RequirementType.DESIGN_CONSTRAINT; - break; - case 26: - this.$ = yy.RiskLevel.LOW_RISK; - break; - case 27: - this.$ = yy.RiskLevel.MED_RISK; - break; - case 28: - this.$ = yy.RiskLevel.HIGH_RISK; - break; - case 29: - this.$ = yy.VerifyType.VERIFY_ANALYSIS; - break; - case 30: - this.$ = yy.VerifyType.VERIFY_DEMONSTRATION; - break; - case 31: - this.$ = yy.VerifyType.VERIFY_INSPECTION; - break; - case 32: - this.$ = yy.VerifyType.VERIFY_TEST; - break; - case 33: - yy.addElement($$[$0 - 3]); - break; - case 34: - yy.setNewElementType($$[$0 - 2]); - break; - case 35: - yy.setNewElementDocRef($$[$0 - 2]); - break; - case 38: - yy.addRelationship($$[$0 - 2], $$[$0], $$[$0 - 4]); - break; - case 39: - yy.addRelationship($$[$0 - 2], $$[$0 - 4], $$[$0]); - break; - case 40: - this.$ = yy.Relationships.CONTAINS; - break; - case 41: - this.$ = yy.Relationships.COPIES; - break; - case 42: - this.$ = yy.Relationships.DERIVES; - break; - case 43: - this.$ = yy.Relationships.SATISFIES; - break; - case 44: - this.$ = yy.Relationships.VERIFIES; - break; - case 45: - this.$ = yy.Relationships.REFINES; - break; - case 46: - this.$ = yy.Relationships.TRACES; - break; - } - }, - table: [{ 3: 1, 4: 2, 6: $V0, 9: $V1, 11: $V2, 13: $V3 }, { 1: [3] }, { 3: 8, 4: 2, 5: [1, 7], 6: $V0, 9: $V1, 11: $V2, 13: $V3 }, { 5: [1, 9] }, { 10: [1, 10] }, { 12: [1, 11] }, o($V4, [2, 6]), { 3: 12, 4: 2, 6: $V0, 9: $V1, 11: $V2, 13: $V3 }, { 1: [2, 2] }, { 4: 17, 5: $V5, 7: 13, 8: $V6, 9: $V1, 11: $V2, 13: $V3, 14: 14, 15: 15, 16: 16, 17: 19, 23: 21, 31: $V7, 32: $V8, 33: $V9, 34: $Va, 35: $Vb, 36: $Vc, 44: $Vd, 62: $Ve, 63: $Vf }, o($V4, [2, 4]), o($V4, [2, 5]), { 1: [2, 1] }, { 8: [1, 30] }, { 4: 17, 5: $V5, 7: 31, 8: $V6, 9: $V1, 11: $V2, 13: $V3, 14: 14, 15: 15, 16: 16, 17: 19, 23: 21, 31: $V7, 32: $V8, 33: $V9, 34: $Va, 35: $Vb, 36: $Vc, 44: $Vd, 62: $Ve, 63: $Vf }, { 4: 17, 5: $V5, 7: 32, 8: $V6, 9: $V1, 11: $V2, 13: $V3, 14: 14, 15: 15, 16: 16, 17: 19, 23: 21, 31: $V7, 32: $V8, 33: $V9, 34: $Va, 35: $Vb, 36: $Vc, 44: $Vd, 62: $Ve, 63: $Vf }, { 4: 17, 5: $V5, 7: 33, 8: $V6, 9: $V1, 11: $V2, 13: $V3, 14: 14, 15: 15, 16: 16, 17: 19, 23: 21, 31: $V7, 32: $V8, 33: $V9, 34: $Va, 35: $Vb, 36: $Vc, 44: $Vd, 62: $Ve, 63: $Vf }, { 4: 17, 5: $V5, 7: 34, 8: $V6, 9: $V1, 11: $V2, 13: $V3, 14: 14, 15: 15, 16: 16, 17: 19, 23: 21, 31: $V7, 32: $V8, 33: $V9, 34: $Va, 35: $Vb, 36: $Vc, 44: $Vd, 62: $Ve, 63: $Vf }, { 4: 17, 5: $V5, 7: 35, 8: $V6, 9: $V1, 11: $V2, 13: $V3, 14: 14, 15: 15, 16: 16, 17: 19, 23: 21, 31: $V7, 32: $V8, 33: $V9, 34: $Va, 35: $Vb, 36: $Vc, 44: $Vd, 62: $Ve, 63: $Vf }, { 18: 36, 62: [1, 37], 63: [1, 38] }, { 45: 39, 62: [1, 40], 63: [1, 41] }, { 51: [1, 42], 53: [1, 43] }, o($Vg, [2, 20]), o($Vg, [2, 21]), o($Vg, [2, 22]), o($Vg, [2, 23]), o($Vg, [2, 24]), o($Vg, [2, 25]), o($Vh, [2, 49]), o($Vh, [2, 50]), { 1: [2, 3] }, { 8: [2, 8] }, { 8: [2, 9] }, { 8: [2, 10] }, { 8: [2, 11] }, { 8: [2, 12] }, { 19: [1, 44] }, { 19: [2, 47] }, { 19: [2, 48] }, { 19: [1, 45] }, { 19: [2, 53] }, { 19: [2, 54] }, { 52: 46, 55: $Vi, 56: $Vj, 57: $Vk, 58: $Vl, 59: $Vm, 60: $Vn, 61: $Vo }, { 52: 54, 55: $Vi, 56: $Vj, 57: $Vk, 58: $Vl, 59: $Vm, 60: $Vn, 61: $Vo }, { 5: [1, 55] }, { 5: [1, 56] }, { 53: [1, 57] }, o($Vp, [2, 40]), o($Vp, [2, 41]), o($Vp, [2, 42]), o($Vp, [2, 43]), o($Vp, [2, 44]), o($Vp, [2, 45]), o($Vp, [2, 46]), { 54: [1, 58] }, { 5: $Vq, 20: 59, 21: $Vr, 24: $Vs, 26: $Vt, 28: $Vu, 30: $Vv }, { 5: $Vw, 30: $Vx, 46: 66, 47: $Vy, 49: $Vz }, { 23: 71, 62: $Ve, 63: $Vf }, { 23: 72, 62: $Ve, 63: $Vf }, o($VA, [2, 13]), { 22: [1, 73] }, { 22: [1, 74] }, { 22: [1, 75] }, { 22: [1, 76] }, { 5: $Vq, 20: 77, 21: $Vr, 24: $Vs, 26: $Vt, 28: $Vu, 30: $Vv }, o($VA, [2, 19]), o($VA, [2, 33]), { 22: [1, 78] }, { 22: [1, 79] }, { 5: $Vw, 30: $Vx, 46: 80, 47: $Vy, 49: $Vz }, o($VA, [2, 37]), o($VA, [2, 38]), o($VA, [2, 39]), { 23: 81, 62: $Ve, 63: $Vf }, { 25: 82, 62: [1, 83], 63: [1, 84] }, { 27: 85, 37: [1, 86], 38: [1, 87], 39: [1, 88] }, { 29: 89, 40: [1, 90], 41: [1, 91], 42: [1, 92], 43: [1, 93] }, o($VA, [2, 18]), { 48: 94, 62: [1, 95], 63: [1, 96] }, { 50: 97, 62: [1, 98], 63: [1, 99] }, o($VA, [2, 36]), { 5: [1, 100] }, { 5: [1, 101] }, { 5: [2, 51] }, { 5: [2, 52] }, { 5: [1, 102] }, { 5: [2, 26] }, { 5: [2, 27] }, { 5: [2, 28] }, { 5: [1, 103] }, { 5: [2, 29] }, { 5: [2, 30] }, { 5: [2, 31] }, { 5: [2, 32] }, { 5: [1, 104] }, { 5: [2, 55] }, { 5: [2, 56] }, { 5: [1, 105] }, { 5: [2, 57] }, { 5: [2, 58] }, { 5: $Vq, 20: 106, 21: $Vr, 24: $Vs, 26: $Vt, 28: $Vu, 30: $Vv }, { 5: $Vq, 20: 107, 21: $Vr, 24: $Vs, 26: $Vt, 28: $Vu, 30: $Vv }, { 5: $Vq, 20: 108, 21: $Vr, 24: $Vs, 26: $Vt, 28: $Vu, 30: $Vv }, { 5: $Vq, 20: 109, 21: $Vr, 24: $Vs, 26: $Vt, 28: $Vu, 30: $Vv }, { 5: $Vw, 30: $Vx, 46: 110, 47: $Vy, 49: $Vz }, { 5: $Vw, 30: $Vx, 46: 111, 47: $Vy, 49: $Vz }, o($VA, [2, 14]), o($VA, [2, 15]), o($VA, [2, 16]), o($VA, [2, 17]), o($VA, [2, 34]), o($VA, [2, 35])], - defaultActions: { 8: [2, 2], 12: [2, 1], 30: [2, 3], 31: [2, 8], 32: [2, 9], 33: [2, 10], 34: [2, 11], 35: [2, 12], 37: [2, 47], 38: [2, 48], 40: [2, 53], 41: [2, 54], 83: [2, 51], 84: [2, 52], 86: [2, 26], 87: [2, 27], 88: [2, 28], 90: [2, 29], 91: [2, 30], 92: [2, 31], 93: [2, 32], 95: [2, 55], 96: [2, 56], 98: [2, 57], 99: [2, 58] }, - parseError: function parseError(str, hash) { - if (hash.recoverable) { - this.trace(str); - } else { - var error = new Error(str); - error.hash = hash; - throw error; - } - }, - parse: function parse(input) { - var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; - var args = lstack.slice.call(arguments, 1); - var lexer2 = Object.create(this.lexer); - var sharedState = { yy: {} }; - for (var k in this.yy) { - if (Object.prototype.hasOwnProperty.call(this.yy, k)) { - sharedState.yy[k] = this.yy[k]; - } - } - lexer2.setInput(input, sharedState.yy); - sharedState.yy.lexer = lexer2; - sharedState.yy.parser = this; - if (typeof lexer2.yylloc == "undefined") { - lexer2.yylloc = {}; - } - var yyloc = lexer2.yylloc; - lstack.push(yyloc); - var ranges = lexer2.options && lexer2.options.ranges; - if (typeof sharedState.yy.parseError === "function") { - this.parseError = sharedState.yy.parseError; - } else { - this.parseError = Object.getPrototypeOf(this).parseError; - } - function lex() { - var token; - token = tstack.pop() || lexer2.lex() || EOF; - if (typeof token !== "number") { - if (token instanceof Array) { - tstack = token; - token = tstack.pop(); - } - token = self.symbols_[token] || token; - } - return token; - } - var symbol, state, action, r, yyval = {}, p, len, newState, expected; - while (true) { - state = stack[stack.length - 1]; - if (this.defaultActions[state]) { - action = this.defaultActions[state]; - } else { - if (symbol === null || typeof symbol == "undefined") { - symbol = lex(); - } - action = table[state] && table[state][symbol]; - } - if (typeof action === "undefined" || !action.length || !action[0]) { - var errStr = ""; - expected = []; - for (p in table[state]) { - if (this.terminals_[p] && p > TERROR) { - expected.push("'" + this.terminals_[p] + "'"); - } - } - if (lexer2.showPosition) { - errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; - } else { - errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); - } - this.parseError(errStr, { - text: lexer2.match, - token: this.terminals_[symbol] || symbol, - line: lexer2.yylineno, - loc: yyloc, - expected - }); - } - if (action[0] instanceof Array && action.length > 1) { - throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); - } - switch (action[0]) { - case 1: - stack.push(symbol); - vstack.push(lexer2.yytext); - lstack.push(lexer2.yylloc); - stack.push(action[1]); - symbol = null; - { - yyleng = lexer2.yyleng; - yytext = lexer2.yytext; - yylineno = lexer2.yylineno; - yyloc = lexer2.yylloc; - } - break; - case 2: - len = this.productions_[action[1]][1]; - yyval.$ = vstack[vstack.length - len]; - yyval._$ = { - first_line: lstack[lstack.length - (len || 1)].first_line, - last_line: lstack[lstack.length - 1].last_line, - first_column: lstack[lstack.length - (len || 1)].first_column, - last_column: lstack[lstack.length - 1].last_column - }; - if (ranges) { - yyval._$.range = [ - lstack[lstack.length - (len || 1)].range[0], - lstack[lstack.length - 1].range[1] - ]; - } - r = this.performAction.apply(yyval, [ - yytext, - yyleng, - yylineno, - sharedState.yy, - action[1], - vstack, - lstack - ].concat(args)); - if (typeof r !== "undefined") { - return r; - } - if (len) { - stack = stack.slice(0, -1 * len * 2); - vstack = vstack.slice(0, -1 * len); - lstack = lstack.slice(0, -1 * len); - } - stack.push(this.productions_[action[1]][0]); - vstack.push(yyval.$); - lstack.push(yyval._$); - newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; - stack.push(newState); - break; - case 3: - return true; - } - } - return true; - } - }; - var lexer = function() { - var lexer2 = { - EOF: 1, - parseError: function parseError(str, hash) { - if (this.yy.parser) { - this.yy.parser.parseError(str, hash); - } else { - throw new Error(str); - } - }, - // resets the lexer, sets new input - setInput: function(input, yy) { - this.yy = yy || this.yy || {}; - this._input = input; - this._more = this._backtrack = this.done = false; - this.yylineno = this.yyleng = 0; - this.yytext = this.matched = this.match = ""; - this.conditionStack = ["INITIAL"]; - this.yylloc = { - first_line: 1, - first_column: 0, - last_line: 1, - last_column: 0 - }; - if (this.options.ranges) { - this.yylloc.range = [0, 0]; - } - this.offset = 0; - return this; - }, - // consumes and returns one char from the input - input: function() { - var ch = this._input[0]; - this.yytext += ch; - this.yyleng++; - this.offset++; - this.match += ch; - this.matched += ch; - var lines = ch.match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno++; - this.yylloc.last_line++; - } else { - this.yylloc.last_column++; - } - if (this.options.ranges) { - this.yylloc.range[1]++; - } - this._input = this._input.slice(1); - return ch; - }, - // unshifts one char (or a string) into the input - unput: function(ch) { - var len = ch.length; - var lines = ch.split(/(?:\r\n?|\n)/g); - this._input = ch + this._input; - this.yytext = this.yytext.substr(0, this.yytext.length - len); - this.offset -= len; - var oldLines = this.match.split(/(?:\r\n?|\n)/g); - this.match = this.match.substr(0, this.match.length - 1); - this.matched = this.matched.substr(0, this.matched.length - 1); - if (lines.length - 1) { - this.yylineno -= lines.length - 1; - } - var r = this.yylloc.range; - this.yylloc = { - first_line: this.yylloc.first_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.first_column, - last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len - }; - if (this.options.ranges) { - this.yylloc.range = [r[0], r[0] + this.yyleng - len]; - } - this.yyleng = this.yytext.length; - return this; - }, - // When called from action, caches matched text and appends it on next action - more: function() { - this._more = true; - return this; - }, - // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. - reject: function() { - if (this.options.backtrack_lexer) { - this._backtrack = true; - } else { - return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), { - text: "", - token: null, - line: this.yylineno - }); - } - return this; - }, - // retain first n characters of the match - less: function(n) { - this.unput(this.match.slice(n)); - }, - // displays already matched input, i.e. for error messages - pastInput: function() { - var past = this.matched.substr(0, this.matched.length - this.match.length); - return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); - }, - // displays upcoming input, i.e. for error messages - upcomingInput: function() { - var next = this.match; - if (next.length < 20) { - next += this._input.substr(0, 20 - next.length); - } - return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); - }, - // displays the character position where the lexing error occurred, i.e. for error messages - showPosition: function() { - var pre = this.pastInput(); - var c = new Array(pre.length + 1).join("-"); - return pre + this.upcomingInput() + "\n" + c + "^"; - }, - // test the lexed token: return FALSE when not a match, otherwise return token - test_match: function(match, indexed_rule) { - var token, lines, backup; - if (this.options.backtrack_lexer) { - backup = { - yylineno: this.yylineno, - yylloc: { - first_line: this.yylloc.first_line, - last_line: this.last_line, - first_column: this.yylloc.first_column, - last_column: this.yylloc.last_column - }, - yytext: this.yytext, - match: this.match, - matches: this.matches, - matched: this.matched, - yyleng: this.yyleng, - offset: this.offset, - _more: this._more, - _input: this._input, - yy: this.yy, - conditionStack: this.conditionStack.slice(0), - done: this.done - }; - if (this.options.ranges) { - backup.yylloc.range = this.yylloc.range.slice(0); - } - } - lines = match[0].match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno += lines.length; - } - this.yylloc = { - first_line: this.yylloc.last_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.last_column, - last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length - }; - this.yytext += match[0]; - this.match += match[0]; - this.matches = match; - this.yyleng = this.yytext.length; - if (this.options.ranges) { - this.yylloc.range = [this.offset, this.offset += this.yyleng]; - } - this._more = false; - this._backtrack = false; - this._input = this._input.slice(match[0].length); - this.matched += match[0]; - token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); - if (this.done && this._input) { - this.done = false; - } - if (token) { - return token; - } else if (this._backtrack) { - for (var k in backup) { - this[k] = backup[k]; - } - return false; - } - return false; - }, - // return next match in input - next: function() { - if (this.done) { - return this.EOF; - } - if (!this._input) { - this.done = true; - } - var token, match, tempMatch, index; - if (!this._more) { - this.yytext = ""; - this.match = ""; - } - var rules = this._currentRules(); - for (var i = 0; i < rules.length; i++) { - tempMatch = this._input.match(this.rules[rules[i]]); - if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { - match = tempMatch; - index = i; - if (this.options.backtrack_lexer) { - token = this.test_match(tempMatch, rules[i]); - if (token !== false) { - return token; - } else if (this._backtrack) { - match = false; - continue; - } else { - return false; - } - } else if (!this.options.flex) { - break; - } - } - } - if (match) { - token = this.test_match(match, rules[index]); - if (token !== false) { - return token; - } - return false; - } - if (this._input === "") { - return this.EOF; - } else { - return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { - text: "", - token: null, - line: this.yylineno - }); - } - }, - // return next match that has a token - lex: function lex() { - var r = this.next(); - if (r) { - return r; - } else { - return this.lex(); - } - }, - // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) - begin: function begin(condition) { - this.conditionStack.push(condition); - }, - // pop the previously active lexer condition state off the condition stack - popState: function popState() { - var n = this.conditionStack.length - 1; - if (n > 0) { - return this.conditionStack.pop(); - } else { - return this.conditionStack[0]; - } - }, - // produce the lexer rule set which is active for the currently active lexer condition state - _currentRules: function _currentRules() { - if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { - return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; - } else { - return this.conditions["INITIAL"].rules; - } - }, - // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available - topState: function topState(n) { - n = this.conditionStack.length - 1 - Math.abs(n || 0); - if (n >= 0) { - return this.conditionStack[n]; - } else { - return "INITIAL"; - } - }, - // alias for begin(condition) - pushState: function pushState(condition) { - this.begin(condition); - }, - // return the number of states currently on the stack - stateStackSize: function stateStackSize() { - return this.conditionStack.length; - }, - options: { "case-insensitive": true }, - performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { - switch ($avoiding_name_collisions) { - case 0: - return "title"; - case 1: - this.begin("acc_title"); - return 9; - case 2: - this.popState(); - return "acc_title_value"; - case 3: - this.begin("acc_descr"); - return 11; - case 4: - this.popState(); - return "acc_descr_value"; - case 5: - this.begin("acc_descr_multiline"); - break; - case 6: - this.popState(); - break; - case 7: - return "acc_descr_multiline_value"; - case 8: - return 5; - case 9: - break; - case 10: - break; - case 11: - break; - case 12: - return 8; - case 13: - return 6; - case 14: - return 19; - case 15: - return 30; - case 16: - return 22; - case 17: - return 21; - case 18: - return 24; - case 19: - return 26; - case 20: - return 28; - case 21: - return 31; - case 22: - return 32; - case 23: - return 33; - case 24: - return 34; - case 25: - return 35; - case 26: - return 36; - case 27: - return 37; - case 28: - return 38; - case 29: - return 39; - case 30: - return 40; - case 31: - return 41; - case 32: - return 42; - case 33: - return 43; - case 34: - return 44; - case 35: - return 55; - case 36: - return 56; - case 37: - return 57; - case 38: - return 58; - case 39: - return 59; - case 40: - return 60; - case 41: - return 61; - case 42: - return 47; - case 43: - return 49; - case 44: - return 51; - case 45: - return 54; - case 46: - return 53; - case 47: - this.begin("string"); - break; - case 48: - this.popState(); - break; - case 49: - return "qString"; - case 50: - yy_.yytext = yy_.yytext.trim(); - return 62; - } - }, - rules: [/^(?:title\s[^#\n;]+)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:(\r?\n)+)/i, /^(?:\s+)/i, /^(?:#[^\n]*)/i, /^(?:%[^\n]*)/i, /^(?:$)/i, /^(?:requirementDiagram\b)/i, /^(?:\{)/i, /^(?:\})/i, /^(?::)/i, /^(?:id\b)/i, /^(?:text\b)/i, /^(?:risk\b)/i, /^(?:verifyMethod\b)/i, /^(?:requirement\b)/i, /^(?:functionalRequirement\b)/i, /^(?:interfaceRequirement\b)/i, /^(?:performanceRequirement\b)/i, /^(?:physicalRequirement\b)/i, /^(?:designConstraint\b)/i, /^(?:low\b)/i, /^(?:medium\b)/i, /^(?:high\b)/i, /^(?:analysis\b)/i, /^(?:demonstration\b)/i, /^(?:inspection\b)/i, /^(?:test\b)/i, /^(?:element\b)/i, /^(?:contains\b)/i, /^(?:copies\b)/i, /^(?:derives\b)/i, /^(?:satisfies\b)/i, /^(?:verifies\b)/i, /^(?:refines\b)/i, /^(?:traces\b)/i, /^(?:type\b)/i, /^(?:docref\b)/i, /^(?:<-)/i, /^(?:->)/i, /^(?:-)/i, /^(?:["])/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:[\w][^\r\n\{\<\>\-\=]*)/i], - conditions: { "acc_descr_multiline": { "rules": [6, 7], "inclusive": false }, "acc_descr": { "rules": [4], "inclusive": false }, "acc_title": { "rules": [2], "inclusive": false }, "unqString": { "rules": [], "inclusive": false }, "token": { "rules": [], "inclusive": false }, "string": { "rules": [48, 49], "inclusive": false }, "INITIAL": { "rules": [0, 1, 3, 5, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 50], "inclusive": true } } - }; - return lexer2; - }(); - parser2.lexer = lexer; - function Parser() { - this.yy = {}; - } - Parser.prototype = parser2; - parser2.Parser = Parser; - return new Parser(); -}(); -parser.parser = parser; -const parser$1 = parser; -let relations = []; -let latestRequirement = {}; -let requirements = {}; -let latestElement = {}; -let elements = {}; -const RequirementType = { - REQUIREMENT: "Requirement", - FUNCTIONAL_REQUIREMENT: "Functional Requirement", - INTERFACE_REQUIREMENT: "Interface Requirement", - PERFORMANCE_REQUIREMENT: "Performance Requirement", - PHYSICAL_REQUIREMENT: "Physical Requirement", - DESIGN_CONSTRAINT: "Design Constraint" -}; -const RiskLevel = { - LOW_RISK: "Low", - MED_RISK: "Medium", - HIGH_RISK: "High" -}; -const VerifyType = { - VERIFY_ANALYSIS: "Analysis", - VERIFY_DEMONSTRATION: "Demonstration", - VERIFY_INSPECTION: "Inspection", - VERIFY_TEST: "Test" -}; -const Relationships = { - CONTAINS: "contains", - COPIES: "copies", - DERIVES: "derives", - SATISFIES: "satisfies", - VERIFIES: "verifies", - REFINES: "refines", - TRACES: "traces" -}; -const addRequirement = (name, type) => { - if (requirements[name] === void 0) { - requirements[name] = { - name, - type, - id: latestRequirement.id, - text: latestRequirement.text, - risk: latestRequirement.risk, - verifyMethod: latestRequirement.verifyMethod - }; - } - latestRequirement = {}; - return requirements[name]; -}; -const getRequirements = () => requirements; -const setNewReqId = (id) => { - if (latestRequirement !== void 0) { - latestRequirement.id = id; - } -}; -const setNewReqText = (text) => { - if (latestRequirement !== void 0) { - latestRequirement.text = text; - } -}; -const setNewReqRisk = (risk) => { - if (latestRequirement !== void 0) { - latestRequirement.risk = risk; - } -}; -const setNewReqVerifyMethod = (verifyMethod) => { - if (latestRequirement !== void 0) { - latestRequirement.verifyMethod = verifyMethod; - } -}; -const addElement = (name) => { - if (elements[name] === void 0) { - elements[name] = { - name, - type: latestElement.type, - docRef: latestElement.docRef - }; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.l.info("Added new requirement: ", name); - } - latestElement = {}; - return elements[name]; -}; -const getElements = () => elements; -const setNewElementType = (type) => { - if (latestElement !== void 0) { - latestElement.type = type; - } -}; -const setNewElementDocRef = (docRef) => { - if (latestElement !== void 0) { - latestElement.docRef = docRef; - } -}; -const addRelationship = (type, src, dst) => { - relations.push({ - type, - src, - dst - }); -}; -const getRelationships = () => relations; -const clear = () => { - relations = []; - latestRequirement = {}; - requirements = {}; - latestElement = {}; - elements = {}; - (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.v)(); -}; -const db = { - RequirementType, - RiskLevel, - VerifyType, - Relationships, - getConfig: () => (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().req, - addRequirement, - getRequirements, - setNewReqId, - setNewReqText, - setNewReqRisk, - setNewReqVerifyMethod, - setAccTitle: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.s, - getAccTitle: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.g, - setAccDescription: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.b, - getAccDescription: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.a, - addElement, - getElements, - setNewElementType, - setNewElementDocRef, - addRelationship, - getRelationships, - clear -}; -const getStyles = (options) => ` - - marker { - fill: ${options.relationColor}; - stroke: ${options.relationColor}; - } - - marker.cross { - stroke: ${options.lineColor}; - } - - svg { - font-family: ${options.fontFamily}; - font-size: ${options.fontSize}; - } - - .reqBox { - fill: ${options.requirementBackground}; - fill-opacity: 1.0; - stroke: ${options.requirementBorderColor}; - stroke-width: ${options.requirementBorderSize}; - } - - .reqTitle, .reqLabel{ - fill: ${options.requirementTextColor}; - } - .reqLabelBox { - fill: ${options.relationLabelBackground}; - fill-opacity: 1.0; - } - - .req-title-line { - stroke: ${options.requirementBorderColor}; - stroke-width: ${options.requirementBorderSize}; - } - .relationshipLine { - stroke: ${options.relationColor}; - stroke-width: 1; - } - .relationshipLabel { - fill: ${options.relationLabelColor}; - } - -`; -const styles = getStyles; -const ReqMarkers = { - CONTAINS: "contains", - ARROW: "arrow" -}; -const insertLineEndings = (parentNode, conf2) => { - let containsNode = parentNode.append("defs").append("marker").attr("id", ReqMarkers.CONTAINS + "_line_ending").attr("refX", 0).attr("refY", conf2.line_height / 2).attr("markerWidth", conf2.line_height).attr("markerHeight", conf2.line_height).attr("orient", "auto").append("g"); - containsNode.append("circle").attr("cx", conf2.line_height / 2).attr("cy", conf2.line_height / 2).attr("r", conf2.line_height / 2).attr("fill", "none"); - containsNode.append("line").attr("x1", 0).attr("x2", conf2.line_height).attr("y1", conf2.line_height / 2).attr("y2", conf2.line_height / 2).attr("stroke-width", 1); - containsNode.append("line").attr("y1", 0).attr("y2", conf2.line_height).attr("x1", conf2.line_height / 2).attr("x2", conf2.line_height / 2).attr("stroke-width", 1); - parentNode.append("defs").append("marker").attr("id", ReqMarkers.ARROW + "_line_ending").attr("refX", conf2.line_height).attr("refY", 0.5 * conf2.line_height).attr("markerWidth", conf2.line_height).attr("markerHeight", conf2.line_height).attr("orient", "auto").append("path").attr( - "d", - `M0,0 - L${conf2.line_height},${conf2.line_height / 2} - M${conf2.line_height},${conf2.line_height / 2} - L0,${conf2.line_height}` - ).attr("stroke-width", 1); -}; -const markers = { - ReqMarkers, - insertLineEndings -}; -let conf = {}; -let relCnt = 0; -const newRectNode = (parentNode, id) => { - return parentNode.insert("rect", "#" + id).attr("class", "req reqBox").attr("x", 0).attr("y", 0).attr("width", conf.rect_min_width + "px").attr("height", conf.rect_min_height + "px"); -}; -const newTitleNode = (parentNode, id, txts) => { - let x = conf.rect_min_width / 2; - let title = parentNode.append("text").attr("class", "req reqLabel reqTitle").attr("id", id).attr("x", x).attr("y", conf.rect_padding).attr("dominant-baseline", "hanging"); - let i = 0; - txts.forEach((textStr) => { - if (i == 0) { - title.append("tspan").attr("text-anchor", "middle").attr("x", conf.rect_min_width / 2).attr("dy", 0).text(textStr); - } else { - title.append("tspan").attr("text-anchor", "middle").attr("x", conf.rect_min_width / 2).attr("dy", conf.line_height * 0.75).text(textStr); - } - i++; - }); - let yPadding = 1.5 * conf.rect_padding; - let linePadding = i * conf.line_height * 0.75; - let totalY = yPadding + linePadding; - parentNode.append("line").attr("class", "req-title-line").attr("x1", "0").attr("x2", conf.rect_min_width).attr("y1", totalY).attr("y2", totalY); - return { - titleNode: title, - y: totalY - }; -}; -const newBodyNode = (parentNode, id, txts, yStart) => { - let body = parentNode.append("text").attr("class", "req reqLabel").attr("id", id).attr("x", conf.rect_padding).attr("y", yStart).attr("dominant-baseline", "hanging"); - let currentRow = 0; - const charLimit = 30; - let wrappedTxts = []; - txts.forEach((textStr) => { - let currentTextLen = textStr.length; - while (currentTextLen > charLimit && currentRow < 3) { - let firstPart = textStr.substring(0, charLimit); - textStr = textStr.substring(charLimit, textStr.length); - currentTextLen = textStr.length; - wrappedTxts[wrappedTxts.length] = firstPart; - currentRow++; - } - if (currentRow == 3) { - let lastStr = wrappedTxts[wrappedTxts.length - 1]; - wrappedTxts[wrappedTxts.length - 1] = lastStr.substring(0, lastStr.length - 4) + "..."; - } else { - wrappedTxts[wrappedTxts.length] = textStr; - } - currentRow = 0; - }); - wrappedTxts.forEach((textStr) => { - body.append("tspan").attr("x", conf.rect_padding).attr("dy", conf.line_height).text(textStr); - }); - return body; -}; -const addEdgeLabel = (parentNode, svgPath, conf2, txt) => { - const len = svgPath.node().getTotalLength(); - const labelPoint = svgPath.node().getPointAtLength(len * 0.5); - const labelId = "rel" + relCnt; - relCnt++; - const labelNode = parentNode.append("text").attr("class", "req relationshipLabel").attr("id", labelId).attr("x", labelPoint.x).attr("y", labelPoint.y).attr("text-anchor", "middle").attr("dominant-baseline", "middle").text(txt); - const labelBBox = labelNode.node().getBBox(); - parentNode.insert("rect", "#" + labelId).attr("class", "req reqLabelBox").attr("x", labelPoint.x - labelBBox.width / 2).attr("y", labelPoint.y - labelBBox.height / 2).attr("width", labelBBox.width).attr("height", labelBBox.height).attr("fill", "white").attr("fill-opacity", "85%"); -}; -const drawRelationshipFromLayout = function(svg, rel, g, insert, diagObj) { - const edge = g.edge(elementString(rel.src), elementString(rel.dst)); - const lineFunction = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .line */ .n8j)().x(function(d) { - return d.x; - }).y(function(d) { - return d.y; - }); - const svgPath = svg.insert("path", "#" + insert).attr("class", "er relationshipLine").attr("d", lineFunction(edge.points)).attr("fill", "none"); - if (rel.type == diagObj.db.Relationships.CONTAINS) { - svgPath.attr( - "marker-start", - "url(" + _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.e.getUrl(conf.arrowMarkerAbsolute) + "#" + rel.type + "_line_ending)" - ); - } else { - svgPath.attr("stroke-dasharray", "10,7"); - svgPath.attr( - "marker-end", - "url(" + _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.e.getUrl(conf.arrowMarkerAbsolute) + "#" + markers.ReqMarkers.ARROW + "_line_ending)" - ); - } - addEdgeLabel(svg, svgPath, conf, `<<${rel.type}>>`); - return; -}; -const drawReqs = (reqs, graph, svgNode) => { - Object.keys(reqs).forEach((reqName) => { - let req = reqs[reqName]; - reqName = elementString(reqName); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.l.info("Added new requirement: ", reqName); - const groupNode = svgNode.append("g").attr("id", reqName); - const textId = "req-" + reqName; - const rectNode = newRectNode(groupNode, textId); - let titleNodeInfo = newTitleNode(groupNode, reqName + "_title", [ - `<<${req.type}>>`, - `${req.name}` - ]); - newBodyNode( - groupNode, - reqName + "_body", - [ - `Id: ${req.id}`, - `Text: ${req.text}`, - `Risk: ${req.risk}`, - `Verification: ${req.verifyMethod}` - ], - titleNodeInfo.y - ); - const rectBBox = rectNode.node().getBBox(); - graph.setNode(reqName, { - width: rectBBox.width, - height: rectBBox.height, - shape: "rect", - id: reqName - }); - }); -}; -const drawElements = (els, graph, svgNode) => { - Object.keys(els).forEach((elName) => { - let el = els[elName]; - const id = elementString(elName); - const groupNode = svgNode.append("g").attr("id", id); - const textId = "element-" + id; - const rectNode = newRectNode(groupNode, textId); - let titleNodeInfo = newTitleNode(groupNode, textId + "_title", [`<>`, `${elName}`]); - newBodyNode( - groupNode, - textId + "_body", - [`Type: ${el.type || "Not Specified"}`, `Doc Ref: ${el.docRef || "None"}`], - titleNodeInfo.y - ); - const rectBBox = rectNode.node().getBBox(); - graph.setNode(id, { - width: rectBBox.width, - height: rectBBox.height, - shape: "rect", - id - }); - }); -}; -const addRelationships = (relationships, g) => { - relationships.forEach(function(r) { - let src = elementString(r.src); - let dst = elementString(r.dst); - g.setEdge(src, dst, { relationship: r }); - }); - return relationships; -}; -const adjustEntities = function(svgNode, graph) { - graph.nodes().forEach(function(v) { - if (v !== void 0 && graph.node(v) !== void 0) { - svgNode.select("#" + v); - svgNode.select("#" + v).attr( - "transform", - "translate(" + (graph.node(v).x - graph.node(v).width / 2) + "," + (graph.node(v).y - graph.node(v).height / 2) + " )" - ); - } - }); - return; -}; -const elementString = (str) => { - return str.replace(/\s/g, "").replace(/\./g, "_"); -}; -const draw = (text, id, _version, diagObj) => { - conf = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().requirement; - const securityLevel = conf.securityLevel; - let sandboxElement; - if (securityLevel === "sandbox") { - sandboxElement = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)("#i" + id); - } - const root = securityLevel === "sandbox" ? (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(sandboxElement.nodes()[0].contentDocument.body) : (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)("body"); - const svg = root.select(`[id='${id}']`); - markers.insertLineEndings(svg, conf); - const g = new dagre_d3_es_src_graphlib_index_js__WEBPACK_IMPORTED_MODULE_2__/* .Graph */ .T({ - multigraph: false, - compound: false, - directed: true - }).setGraph({ - rankdir: conf.layoutDirection, - marginx: 20, - marginy: 20, - nodesep: 100, - edgesep: 100, - ranksep: 100 - }).setDefaultEdgeLabel(function() { - return {}; - }); - let requirements2 = diagObj.db.getRequirements(); - let elements2 = diagObj.db.getElements(); - let relationships = diagObj.db.getRelationships(); - drawReqs(requirements2, g, svg); - drawElements(elements2, g, svg); - addRelationships(relationships, g); - (0,dagre_d3_es_src_dagre_index_js__WEBPACK_IMPORTED_MODULE_1__/* .layout */ .Zp)(g); - adjustEntities(svg, g); - relationships.forEach(function(rel) { - drawRelationshipFromLayout(svg, rel, g, id, diagObj); - }); - const padding = conf.rect_padding; - const svgBounds = svg.node().getBBox(); - const width = svgBounds.width + padding * 2; - const height = svgBounds.height + padding * 2; - (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.i)(svg, height, width, conf.useMaxWidth); - svg.attr("viewBox", `${svgBounds.x - padding} ${svgBounds.y - padding} ${width} ${height}`); -}; -const renderer = { - draw -}; -const diagram = { - parser: parser$1, - db, - renderer, - styles -}; - - - -/***/ }) - -}; -; \ No newline at end of file diff --git a/assets/js/41b7b3e8.7d139911.js b/assets/js/41b7b3e8.7d139911.js deleted file mode 100644 index 6ed5da7804e5..000000000000 --- a/assets/js/41b7b3e8.7d139911.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[577],{15993:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>c,frontMatter:()=>s,metadata:()=>r,toc:()=>d});var i=n(74848),a=n(28453);const s={id:"learn-staking-advanced",title:"Advanced Staking Concepts",sidebar_label:"Advanced Staking Concepts",description:"Advanced Concepts about Staking on Polkadot.",keywords:["staking","stake","nominate","nominating","NPoS","proxies","payouts","simple payouts","rewards","staking miner","phragm\xe9n"],slug:"../learn-staking-advanced"},o=void 0,r={id:"learn/learn-staking-advanced",title:"Advanced Staking Concepts",description:"Advanced Concepts about Staking on Polkadot.",source:"@site/../docs/learn/learn-staking-advanced.md",sourceDirName:"learn",slug:"/learn-staking-advanced",permalink:"/docs/learn-staking-advanced",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-staking-advanced.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1727168669e3,frontMatter:{id:"learn-staking-advanced",title:"Advanced Staking Concepts",sidebar_label:"Advanced Staking Concepts",description:"Advanced Concepts about Staking on Polkadot.",keywords:["staking","stake","nominate","nominating","NPoS","proxies","payouts","simple payouts","rewards","staking miner","phragm\xe9n"],slug:"../learn-staking-advanced"},sidebar:"docs",previous:{title:"Accounts",permalink:"/docs/learn-account-advanced"},next:{title:"NFT Pallets",permalink:"/docs/learn-nft-pallets"}},l={},d=[{value:"Staking Proxies",id:"staking-proxies",level:2},{value:"Bags List",id:"bags-list",level:2},{value:"Rewards Distribution",id:"rewards-distribution",level:2},{value:"Commission Fees & Slashes",id:"commission-fees--slashes",level:4},{value:"Simple Payouts",id:"simple-payouts",level:2},{value:"Claiming Rewards",id:"claiming-rewards",level:3},{value:"FAQ and Cautionary Notes",id:"faq-and-cautionary-notes",level:3},{value:"Staking Miner",id:"staking-miner",level:2},{value:"NPoS election optimization",id:"npos-election-optimization",level:3},{value:"Signed Phase of the election pallet",id:"signed-phase-of-the-election-pallet",level:3},{value:"Deposit and reward mechanics",id:"deposit-and-reward-mechanics",level:3},{value:"Further Resources",id:"further-resources",level:3}];function h(e){const t={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",h4:"h4",img:"img",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,a.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.admonition,{title:"New to Staking?",type:"tip",children:(0,i.jsxs)(t.p,{children:["Start your staking journey or explore more information about staking on\n",(0,i.jsx)(t.a,{href:"https://polkadot.network/staking/",children:"Polkadot's Home Page"}),". Discover the new\n",(0,i.jsx)(t.a,{href:"https://staking.polkadot.cloud/#/overview",children:"Staking Dashboard"})," that makes staking much easier and\ncheck this\n",(0,i.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000182104",children:"extensive article list"})," to\nhelp you get started. You can now stake natively with a\n",(0,i.jsx)(t.a,{href:"/docs/chain-state-values#minimum-bond-to-join-a-nomination-pool",children:"small number of tokens"}),"\nand earn staking rewards. For additional information, check out\n",(0,i.jsx)(t.a,{href:"https://polkadot.network/blog/nomination-pools-are-live-stake-natively-with-just-1-dot/",children:"this blog post"}),"."]})}),"\n",(0,i.jsxs)(t.p,{children:["This page is meant to be an advanced guide to staking with the relay chain. For a more general\nintroduction, checkout the ",(0,i.jsx)(t.a,{href:"/docs/learn-staking",children:"Introduction to Staking"})," page."]}),"\n",(0,i.jsx)(t.h2,{id:"staking-proxies",children:"Staking Proxies"}),"\n",(0,i.jsxs)(t.p,{children:["Polkadot makes it possible to create accounts having special permissions also called ",(0,i.jsx)(t.strong,{children:"proxy\naccounts"}),". For more details about proxy accounts visit the ",(0,i.jsx)(t.a,{href:"/docs/learn-proxies",children:"dedicated page"})," on\nthis wiki."]}),"\n",(0,i.jsxs)(t.p,{children:["Proxy accounts are special accounts which can sign\n",(0,i.jsx)(t.a,{href:"/docs/learn-transactions#pallets-and-extrinsics",children:(0,i.jsx)(t.strong,{children:"extrinsic calls"})})," made to specific ",(0,i.jsx)(t.strong,{children:"pallets"}),"\non behalf of the proxied account. There is thus the possibility to create staking proxy accounts\nthat can be used to sign extrinsic calls specific to the staking, session and utility pallets."]}),"\n",(0,i.jsx)(t.p,{children:"Staking is not a set-and-forget action, as a nominator you will need to monitor the performance of\nyour validators and make changes if needed. There will be this transactions such as nominating that\nwill be needed to regularly signed. Each time you sign with an account, in the case of hot accounts,\nyou expose the private key of that account to the internet with consequent risk of attack. A hot\nstash will be exposed all the time a transaction is signed. Even in the case of a cold stash created\nwith a Ledger device, signing with the stash will build a transaction history that might tell\nsomething about your habits and preferences, or even your location."}),"\n",(0,i.jsx)(t.p,{children:"Ideally, accounts with high economic power like the stash must be and remain as isolated as\npossible. With a staking proxy, the stash account is fully isolated when signing for staking-related\ntransactions. The proxy private key will be used to sign staking-related transactions, the stash\nprivate key will stay isolated and the staking transaction history will be built by the proxy."}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"stash-stakingProxy",src:n(60546).A+"",width:"1920",height:"800"})}),"\n",(0,i.jsx)(t.p,{children:"For a practical perspective we need to use only one account and remember one password to sign for\nall staking-related transactions. From a security perspective who controls the staking proxy\ncontrols our staking actions."}),"\n",(0,i.jsx)(t.p,{children:"It is important to remember that actions that can be performed by the proxy accounts are limited,\nand in the case of staking proxy, extrinsic calls to the balances pallet cannot be signed. This\nmeans it is not possible to do balance transfers on the proxied account through a staking proxy."}),"\n",(0,i.jsxs)(t.p,{children:["Note that to change the staking proxy you will need to sign with the stash or an ",(0,i.jsx)(t.em,{children:"any"})," proxy."]}),"\n",(0,i.jsx)(t.h2,{id:"bags-list",children:"Bags List"}),"\n",(0,i.jsxs)(t.admonition,{type:"info",children:[(0,i.jsxs)(t.p,{children:["On Polkadot and Kusama, the instance of the pallet\n",(0,i.jsx)(t.a,{href:"https://paritytech.github.io/substrate/master/pallet_bags_list/",children:"Bags-List"})," is named as\n'voterList'."]}),(0,i.jsxs)(t.p,{children:["For a demo about bags list see ",(0,i.jsx)(t.a,{href:"https://youtu.be/hIIZRJLrBZA",children:"this video tutorial"}),"."]})]}),"\n",(0,i.jsxs)(t.p,{children:["In Polkadot's NPoS nomination intents are placed in a semi-sorted list called\n",(0,i.jsx)(t.a,{href:"https://github.com/paritytech/substrate/pull/9507",children:"bags-list"}),". The Bags-List substrate pallet is\ndesigned to be self-maintaining, with minimal effort from the blockchain, making it extremely\nscalable. The bags list has two primary components, bags and nodes (or nominators' accounts), with\nbags containing the nodes with bonded balance within a specific range. In the figure below the 1st\nempty bag will contain nominators whose bonded balance is in the range of 21 - 30 DOT, the 2nd bag\n11 - 20 DOT, and the 3rd bag 0-10 DOT. The nomination intents are the nominators' accounts with\nbonded tokens (in the example shown below, there are eight nomination intents) that will be put\ninside each of those three bags depending on their stake."]}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"bags list example 0",src:n(65394).A+"",width:"1920",height:"800"})}),"\n",(0,i.jsx)(t.p,{children:"The bags list is semi-sorted, meaning that sorting is only partially done. When the nomination\nintents are submitted to the network, they are automatically put into each bag based on the number\nof bonded tokens, but within each bag, those nodes are arranged based on the time they are inserted\nand not based on their stake (see figure below). When the nomination intent of 19 DOT is submitted,\nit gets placed at the last spot in the 2nd bag (shown in the yellow circle). The same scenario\napplies for the node with 8 DOT (green circle) in the 3rd bag. Placing the node above all nodes with\na lesser stake requires an additional step (more on this later)."}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"bags list example 1",src:n(63259).A+"",width:"1920",height:"800"})}),"\n",(0,i.jsxs)(t.p,{children:["The mentioned two nodes (19 DOT and 8 DOT) have the option to move up in their respective bags,\nwhich can put them in front of the nodes with less stake than them (see figure below). This action\nmust be done manually by submitting the ",(0,i.jsx)(t.code,{children:"putInFrontOf"})," extrinsic within the ",(0,i.jsx)(t.code,{children:"voterList"})," pallet\ninstance. Moreover, if the node with 19 DOT bonds an additional 2 DOT, that node will be put\nautomatically in the 1st bag (i.e. automatic ",(0,i.jsx)(t.code,{children:"rebag"}),') because the total number of bonded tokens will\nnow be within the range of the 1st bag. That node with now 21 DOT will be put at the tail end of the\n1st bag with the possibility to manually put itself in front of "older" nodes with less than 21 DOT\n(if there are any).']}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"bags list example 2",src:n(84928).A+"",width:"1920",height:"800"})}),"\n",(0,i.jsxs)(t.p,{children:["If one decides to send staking rewards to the stash account and automatically bond them (i.e.\ncompounding the staking rewards), the position within a bag does not change automatically. The same\nscenario applies to a slashing event, i.e., when a nominator gets slashed, their position within a\nbag does not change. This might result in a scenario where the node is in the wrong bag and needs to\nbe placed in the right bag. To address this issue, any account on-chain can submit the\npermissionless extrinsic ",(0,i.jsx)(t.code,{children:"rebag"})," within the ",(0,i.jsx)(t.code,{children:"voterList"})," pallet instance to update the positions of\nthe nodes that do not belong to their bag and place them in the correct one. To reiterate, actions\nlike bonding/unbonding tokens automatically rebag the nominator node, but events like staking\nrewards/slashing do not. See the ",(0,i.jsx)(t.a,{href:"/docs/learn-nominator#bags-list",children:"bags-list"})," section for more\ninformation."]}),"\n",(0,i.jsxs)(t.p,{children:["The bags-list is capable of including an unlimited number of nodes, subject to the chain's runtime\nstorage. In the current staking system configuration, at most 22500 nominators in the bags-list\n(12500 on Kusama) come out as the electing nominators. See\n",(0,i.jsx)(t.a,{href:"/docs/learn-nominator#staking-election-stages",children:"Staking Election Stages"})," section for more info."]}),"\n",(0,i.jsxs)(t.p,{children:["This means that only a portion of the nomination intents is kept. Once the nomination period ends,\nthe NPoS election system takes all nomination intents and their associated votes as input, and it\noutputs a set of validators. The bags are iterated from the most staked to the least staked. If the\naccounts are not appropriately sorted, this could leave the last touched bag to only be partially\niterated. Thus, in some edge cases, the order of the members within a bag is important. Continuing\nwith the example used in the previous figures, there are 8 nomination intents of which only 7 will\nbe kept. If the bags list stays semi-sorted (i.e. no accounts call the ",(0,i.jsx)(t.code,{children:"putInFrontOf"})," and ",(0,i.jsx)(t.code,{children:"rebag"}),"\nextrinsics), the nomination of the node with 8 DOT in the 3rd bag will not be considered while that\nof the preceding node with 5 DOT will be. Nomination of the node with 8 DOT will be kept only if it\nputs itself in front of the one with 5 DOT. Note how the nomination of the node with 19 DOT in the\n2nd bag will be considered regardless of changing its position inside the bag. The sorting\nfunctionality of nomination intents using bags is extremely important for the\n",(0,i.jsx)(t.a,{href:"https://gist.github.com/kianenigma/aa835946455b9a3f167821b9d05ba376",children:"long-term improvements"})," of the\nstaking/election system."]}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"bags list example 3",src:n(56105).A+"",width:"1920",height:"800"})}),"\n",(0,i.jsx)(t.admonition,{title:"Minimum active nomination threshold to earn rewards is dynamic",type:"caution",children:(0,i.jsxs)(t.p,{children:["Submitting a nomination intent does not guarantee staking rewards. The stake of the top 22500\nnominators (12500 on Kusama) is applied to the validators in the active set. To avail of staking\nrewards, ensure that the number of tokens bonded is higher than the minimum active bond. For more\ninformation, see the ",(0,i.jsx)(t.a,{href:"/docs/learn-nominator",children:"nominator guide"}),"."]})}),"\n",(0,i.jsxs)(t.p,{children:['The "election solution" which is a connected graph between nominators and validators with the stake\nas edge weights, has to meet certain requirements, such as maximizing the amount of stake to\nnominate validators and distributing the stake backing validators as evenly as possible. The\nobjectives of this election mechanism are to maximize the security of the network, and achieve fair\nrepresentation of the nominators. If you want to know more about how NPoS works (e.g. election,\nrunning time complexity, etc.), please read\n',(0,i.jsx)(t.a,{href:"http://research.web3.foundation/en/latest/polkadot/NPoS.html",children:"here"}),"."]}),"\n",(0,i.jsx)(t.h2,{id:"rewards-distribution",children:"Rewards Distribution"}),"\n",(0,i.jsx)(t.admonition,{type:"info",children:(0,i.jsxs)(t.p,{children:["The general rule for rewards across validators is that two validators get paid essentially the same\namount of tokens for equal work, i.e. they are not paid proportional to their total stakes. There is\na probabilistic component to staking rewards in the form of\n",(0,i.jsx)(t.a,{href:"/docs/maintain-guides-validator-payout##era-points",children:"era points"})," and\n",(0,i.jsx)(t.a,{href:"/docs/learn-guides-transfers#calculating-fees-with-polkadot-js",children:"tips"})," but these should average out\nover time."]})}),"\n",(0,i.jsx)(t.p,{children:"Validators are paid the same regardless of stake backing them. Validators with less stake will\ngenerally pay more to nominators per-token than the ones with more stake. This gives nominators an\neconomic incentive to gradually shift their preferences to lower-staked validators that gain a\nsufficient amount of reputation. A consequence of this is that the stake across validators will be\nas evenly distributed as possible which avoids concentration of power among a few validators. In the\nlong term, validators will have similar levels of stake, with the stake being higher for validators\nwith higher reputation. A nominator who is willing to risk more by backing a validator with a lower\nreputation will get paid more, provided there are no slashing events."}),"\n",(0,i.jsx)(t.p,{children:"Before distributing rewards to nominators, validators can create a cut of the reward (a commission)\nthat is not shared with the nominators. This cut is a percentage of the block reward, not an\nabsolute value. After the commission gets deducted, the remaining portion is distributed pro-rata\nbased on their staked value and split between the validator and all of the nominators whose stake\nhas backed this validator."}),"\n",(0,i.jsxs)(t.p,{children:["For example, assume the block reward for a validator is 10 DOT. A validator may specify\n",(0,i.jsx)(t.code,{children:"validator_commission = 50%"}),", in which case the validator would receive 5 DOT. The remaining 5 DOT\nwould then be split between the validator and their nominators based on the proportion of stake each\nnominator had. Note that for this calculation, validator's self-stake acts just as if they were\nanother nominator."]}),"\n",(0,i.jsx)(t.p,{children:"Thus, a percentage of the reward goes thus to pay the validator's commission fees and the remainder\nis paid pro-rata (i.e. proportional to stake) to the nominators and validator. If a validator's\ncommission is set to 100%, no tokens will be paid out to any of the nominators. Notice in particular\nthat the validator is rewarded twice: once in commission fees for validating (if their commission\nrate is above 0%), and once for nominating itself with own stake."}),"\n",(0,i.jsx)(t.p,{children:"The following example should clarify the above. For simplicity, we have the following assumptions:"}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsx)(t.li,{children:"These validators do not have a stake of their own."}),"\n",(0,i.jsx)(t.li,{children:"They each receive the same number of era points."}),"\n",(0,i.jsx)(t.li,{children:"There are no tips for any transactions processed."}),"\n",(0,i.jsx)(t.li,{children:"They do NOT charge any commission fees."}),"\n",(0,i.jsx)(t.li,{children:"Total reward amount is 100 DOT tokens."}),"\n",(0,i.jsxs)(t.li,{children:["The current minimum amount of DOT to be a validator is 350 (note that this is ",(0,i.jsx)(t.em,{children:"not"})," the actual\nvalue, which fluctuates, but merely an assumption for purposes of this example; to understand how\nthe actual minimal stake is calculated, see\n",(0,i.jsx)(t.a,{href:"/docs/faq#what-is-the-minimum-stake-necessary-to-be-elected-as-an-active-validator",children:"here"}),")."]}),"\n"]}),"\n",(0,i.jsxs)(t.table,{children:[(0,i.jsx)(t.thead,{children:(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.th,{style:{textAlign:"center"}}),(0,i.jsx)(t.th,{style:{textAlign:"center"},children:(0,i.jsx)(t.strong,{children:"Validator A"})}),(0,i.jsx)(t.th,{style:{textAlign:"center"}}),(0,i.jsx)(t.th,{style:{textAlign:"center"}})]})}),(0,i.jsxs)(t.tbody,{children:[(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"Nominator (4)"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"Stake (600)"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"Fraction of the Total Stake"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"Rewards"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"Jin"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"100"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"0.167"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"16.7"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{style:{textAlign:"center"},children:(0,i.jsx)(t.strong,{children:"Sam"})}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"50"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"0.083"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"8.3"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"Anson"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"250"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"0.417"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"41.7"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"Bobby"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"200"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"0.333"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"33.3"})]})]})]}),"\n",(0,i.jsxs)(t.table,{children:[(0,i.jsx)(t.thead,{children:(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.th,{style:{textAlign:"center"}}),(0,i.jsx)(t.th,{style:{textAlign:"center"},children:(0,i.jsx)(t.strong,{children:"Validator B"})}),(0,i.jsx)(t.th,{style:{textAlign:"center"}}),(0,i.jsx)(t.th,{style:{textAlign:"center"}})]})}),(0,i.jsxs)(t.tbody,{children:[(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"Nominator (4)"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"Stake (400)"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"Fraction of the Total Stake"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"Rewards"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"Alice"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"100"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"0.25"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"25"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"Peter"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"100"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"0.25"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"25"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"John"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"150"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"0.375"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"37.5"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{style:{textAlign:"center"},children:(0,i.jsx)(t.strong,{children:"Kitty"})}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"50"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"0.125"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"12.5"})]})]})]}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.em,{children:"Both validators A & B have 4 nominators with a total stake 600 and 400 respectively."})}),"\n",(0,i.jsx)(t.p,{children:"Based on the above rewards distribution, nominators of validator B get more rewards per DOT than\nthose of validator A because A has more overall stake. Sam has staked 50 DOT with validator A, but\nhe only gets 8.3 in return, whereas Kitty gets 12.5 with the same amount of stake."}),"\n",(0,i.jsxs)(t.p,{children:["To estimate how many tokens you can get each month as a nominator or validator, you can use this\n",(0,i.jsx)(t.a,{href:"https://www.stakingrewards.com/earn/polkadot/calculate",children:"tool"})," as a reference and play around with\nit by changing some parameters (e.g. how many days you would like to stake with your DOT, provider\nfees, compound rewards, etc.) to have a better estimate. Even though it may not be entirely accurate\nsince staking participation is changing dynamically, it works well as an indicator."]}),"\n",(0,i.jsx)(t.h4,{id:"commission-fees--slashes",children:"Commission Fees & Slashes"}),"\n",(0,i.jsxs)(t.p,{children:["The network ",(0,i.jsx)(t.a,{href:"/docs/learn-offenses",children:"slashes"})," a validator for a misbehavior. The slashed amount is a\nfixed percentage (and not a fixed amount), which means that validators with more stake get slashed\nmore DOT. Again, this is done to provide nominators with an economic incentive to shift their\npreferences and back less popular validators whom they consider to be trustworthy."]}),"\n",(0,i.jsx)(t.p,{children:"Also, note that each validator candidate is free to name their desired commission fee (as a\npercentage of rewards) to cover operational costs. Since validators are paid the same, validators\nwith lower commission fees pay more to nominators than validators with higher fees. Thus, each\nvalidator can choose between increasing their fees to earn more, or decreasing their fees to attract\nmore nominators and increase their chances of being elected. In the long term, we expect that all\nvalidators will need to be cost-efficient to remain competitive, and that validators with higher\nreputation will be able to charge slightly higher commission fees (which is fair)."}),"\n",(0,i.jsx)(t.h2,{id:"simple-payouts",children:"Simple Payouts"}),"\n",(0,i.jsx)(t.p,{children:"Polkadot makes stakers claim their rewards for past eras by submitting a transaction. This naturally\nleads to spreading out reward distribution, as people make transactions at disparate times, rather\nthan updating the accounts of all stakers in a single block."}),"\n",(0,i.jsx)(t.p,{children:"Even if everyone submitted a reward claim at the same time, the fact that they are individual\ntransactions would allow the block construction algorithm to process only a limited number per block\nand ensure that the network maintains a constant block time. If all rewards were sent out in one\nblock, this could cause serious issues with the stability of the network."}),"\n",(0,i.jsxs)(t.p,{children:["Simple payouts require one transaction per validator, per ",(0,i.jsx)(t.a,{href:"/docs/glossary##era",children:"era"}),", to\nclaim rewards. The reason Polkadot requires this is to avoid an attack where someone has several\nthousand accounts nominating a single validator. The major cost in reward distribution is mutating\nthe accounts in storage, and Polkadot cannot pay out several thousand accounts in a single\ntransaction."]}),"\n",(0,i.jsx)(t.h3,{id:"claiming-rewards",children:"Claiming Rewards"}),"\n",(0,i.jsx)(t.p,{children:"The relay chain stores the last 84 eras of reward information (e.g. maps of era number to validator\npoints, staking rewards, nomination exposure, etc.). Rewards will not be claimable more than 84 eras\nafter they were earned. This means that all rewards must be claimed within a maximum of 84 eras,\nalthough under certain circumstances (described below) this may be as low as 28 eras."}),"\n",(0,i.jsx)(t.p,{children:"If a validator kills their stash, any remaining rewards will no longer be claimable. Before doing\nthis, however, they would need to first stop validating and then unbond the funds in their stash,\nwhich takes 28 eras. If a validator were to immediately chill and start unbonding after rewards are\ncalculated, and nobody issued a payout for that era from that validator in the next 28 eras, the\nreward would no longer be claimable."}),"\n",(0,i.jsx)(t.admonition,{title:"Advanced How-to Guides",type:"info",children:(0,i.jsxs)(t.p,{children:["In order to be absolutely sure that staking rewards can be claimed, users should trigger a payout\nbefore 28 eras have passed. See\n",(0,i.jsx)(t.a,{href:"/docs/learn-guides-nominator#claiming-rewards-with-the-polkadot-js-ui",children:"this page"})," for more\ninformation about how to claim rewards using the Polkadot-JS UI."]})}),"\n",(0,i.jsx)(t.h3,{id:"faq-and-cautionary-notes",children:"FAQ and Cautionary Notes"}),"\n",(0,i.jsxs)(t.ol,{children:["\n",(0,i.jsxs)(t.li,{children:["Rewards expire after 84 eras. On Polkadot, that's about 84 days. On Kusama, it is approximately\n21 days. Validators should claim all pending rewards before killing their stash in the event the\nvalidator decides to ",(0,i.jsx)(t.code,{children:"chill"})," -> ",(0,i.jsx)(t.code,{children:"unbonds all"})," -> ",(0,i.jsx)(t.code,{children:"withdraws unbonded"}),". Nominators will not miss\nout on rewards if they claim the pending rewards for a validator within 28 days. Essentially, the\ndeadline to ensure you get staking rewards is 28 eras. If the validator verifies its intent and\ndoes not unbond and withdraw, the 84 era timeline holds."]}),"\n",(0,i.jsx)(t.li,{children:"Claiming rewards (or neglecting to claim rewards) does not affect nominations in any way.\nNominations will persist after claiming rewards or after the rewards expire."}),"\n",(0,i.jsx)(t.li,{children:'Rewards are not minted until they are claimed. Therefore, if your reward destination is "stash,\nincreasing amount at stake", then your staked amount does not reflect your rewards until you\nclaim them. If you want to maximize compounding, then you will need to claim often or nominate\nvalidators which regularly claim for you.'}),"\n",(0,i.jsxs)(t.li,{children:["Staking operations at the end of an era are closed to allow the off-chain validator election to\ntake place. See ",(0,i.jsx)(t.a,{href:"/docs/learn-phragmen#off-chain-phragmen",children:"Off-chain Phragm\xe9n"})," for more information."]}),"\n"]}),"\n",(0,i.jsx)(t.h2,{id:"staking-miner",children:"Staking Miner"}),"\n",(0,i.jsx)(t.admonition,{type:"caution",children:(0,i.jsx)(t.p,{children:"The staking-miner code is experimental and it is still in the development phase. Use is at your own\ndiscretion, as there is a risk of losing some funds."})}),"\n",(0,i.jsxs)(t.p,{children:["At the end of each era on Polkadot and Kusama, using ",(0,i.jsx)(t.a,{href:"learn-phragmen",children:"NPoS"}),', a new set of validators\nmust be elected based on the nominator preferences. This is a computationally intensive process,\nhence the usage of the term "mining" for computing the solution. The validators use\n',(0,i.jsx)(t.a,{href:"https://docs.substrate.io/reference/how-to-guides/offchain-workers/",children:"off-chain workers"})," to compute\nthe result and submit a transaction to propose the set of winners. This can also be delegated to\nstand-alone programs, whose task is to mine the optimal solution. Staking miners compete with each\nother to produce election solutions which consist of a validator set, stake distribution across that\nset, and a score indicating how optimal the solution is. Staking miners run any given staking\nalgorithms (as of now, sequential Phragm\xe9n or PhragMMS, subject to change if improved algorithms are\nintroduced) to produce results, which are then sent as a transaction to the relay chain via a normal\nsigned extrinsic. The transaction requires a bond and a transaction fee. The best solution is\nrewarded, which the least covers the transaction fee, and the bond is returned to the account.\n",(0,i.jsx)(t.a,{href:"/docs/learn-staking-advanced#deposit-and-reward-mechanics",children:"The bond and the fee"})," are lost if the\nsolution is invalid."]}),"\n",(0,i.jsxs)(t.p,{children:["Staking miner uses a pallet called ",(0,i.jsx)(t.code,{children:"pallet_election_provider_multi_phase"})," and can only produce\nsolutions during the\n",(0,i.jsx)(t.a,{href:"https://crates.parity.io/pallet_election_provider_multi_phase/index.html#signed-phase",children:(0,i.jsx)(t.code,{children:"SignedPhase"})}),"\nof the pallet's life cycle. Once the ",(0,i.jsx)(t.code,{children:"SignedPhase"})," is over and the\n",(0,i.jsx)(t.a,{href:"https://crates.parity.io/pallet_election_provider_multi_phase/index.html#unsigned-phase",children:(0,i.jsx)(t.code,{children:"UnsignedPhase"})}),"\nstarts, only the off-chain workers can provide election results."]}),"\n",(0,i.jsx)(t.p,{children:"Running the staking miner requires passing the seed of a funded account in order to pay the fees for\nthe transactions that will be sent. The same account's balance is used to reserve deposits as well.\nThe best solution in each round is rewarded. All correct solutions will get their deposit back and\nthe ones that submit invalid solutions will lose their deposit."}),"\n",(0,i.jsx)(t.h3,{id:"npos-election-optimization",children:"NPoS election optimization"}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"NPoS election optimization",src:n(22630).A+"",width:"1868",height:"804"})}),"\n",(0,i.jsx)(t.p,{children:"A basic election solution is a simple distribution of stake across validators, but this can be\noptimized for better distribution equaling a higher security score. The staking miner does not act\nas a validator and focuses solely on the election result and optimization of the solution. It\nconnects to a specified chain and keeps listening to new signed phase of the election pallet in\norder to submit solutions to the NPoS election. When the correct time comes, it computes its\nsolution and submits it to the chain. The default miner algorithm is sequential Phragm\xe9n with a\nconfigurable number of balancing iterations that improve the score."}),"\n",(0,i.jsx)(t.h3,{id:"signed-phase-of-the-election-pallet",children:"Signed Phase of the election pallet"}),"\n",(0,i.jsxs)(t.p,{children:["The election provider pallet ",(0,i.jsx)(t.code,{children:"pallet_election_provider_multi_phase"})," is divided into two phases,\n",(0,i.jsx)(t.strong,{children:"signed"})," and ",(0,i.jsx)(t.strong,{children:"unsigned"}),". At the end of the pallet's timeline, the function ",(0,i.jsx)(t.code,{children:"elect()"})," is called."]}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{children:" elect()\n + <--T::SignedPhase--\x3e + <--T::UnsignedPhase--\x3e +\n +-------------------------------------------------------------------+\n Phase::Off + Phase::Signed + Phase::Unsigned +\n"})}),"\n",(0,i.jsxs)(t.p,{children:["Solutions provided by the staking miner can only be submitted during the signed phase. Solutions are\nsubmitted and queued on the chain as a ",(0,i.jsx)(t.code,{children:"RawSolution"}),". Once submitted, a solution cannot be retracted\nby the originating account."]}),"\n",(0,i.jsxs)(t.p,{children:[(0,i.jsx)(t.code,{children:"RawSolution"})," struct definition:"]}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{children:"pub struct RawSolution {\n pub solution: S, // The solution itself\n pub score: ElectionScore, // The claimed score of the solution.\n pub round: u32, // The round at which this solution should be submitted.\n}\n"})}),"\n",(0,i.jsxs)(t.p,{children:["A maximum of\n",(0,i.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/f610ffc05876d4b98a14cee245b4cc27bd3c0c15/runtime/polkadot/src/lib.rs#L390",children:(0,i.jsx)(t.code,{children:"pallet::Config::SignedMaxSubmissions"})}),"\nwill be stored on-chain and they will be sorted based on score. Higher the score the more optimal\nthe election solution is. The\n",(0,i.jsx)(t.a,{href:"/docs/chain-state-values#staking-miner-max-submissions",children:(0,i.jsx)(t.code,{children:"SignedMaxSubmissions"})})," variable\ncan be modified through governance."]}),"\n",(0,i.jsx)(t.p,{children:"Upon arrival of a new solution:"}),"\n",(0,i.jsxs)(t.ol,{children:["\n",(0,i.jsx)(t.li,{children:"If the queue is not full, it is stored in the appropriate sorted index."}),"\n",(0,i.jsx)(t.li,{children:"If the queue is full but the submitted solution is better than one of the queued ones, the worse\nsolution is discarded, the deposit of the outgoing solution is returned, and the new solution is\nstored in the correct index."}),"\n",(0,i.jsx)(t.li,{children:"If the queue is full and the solution is not an improvement compared to any of the queued ones,\nit is instantly rejected and no deposit is reserved."}),"\n"]}),"\n",(0,i.jsxs)(t.p,{children:["Upon the end of the ",(0,i.jsx)(t.code,{children:"SignedPhase"}),", no more solutions can be submitted and the solutions in the queue\nwill be checked using\n",(0,i.jsx)(t.a,{href:"https://paritytech.github.io/substrate/master/pallet_election_provider_multi_phase/pallet/struct.Pallet.html#method.feasibility_check",children:(0,i.jsx)(t.code,{children:"Pallet::feasibility_check"})}),"\nwhich ensures the score is indeed correct, and marks them as valid or invalid. By checking each\nsolution in the queue, the queue will be reorganized by score. The highest valid score will be\nrewarded. Invalid solutions with higher score than the winning solution will be slashed. The rest of\nthe solutions will be discarded and their deposit will be returned. Once the staking miner with a\nwinning solution is ready to be rewarded the runtime will automatically execute\n",(0,i.jsx)(t.a,{href:"https://github.com/paritytech/substrate/blob/f2bc08a3071a91b71fec63cf2b22c707411cec0e/frame/election-provider-multi-phase/src/signed.rs#L453-L474",children:(0,i.jsx)(t.code,{children:"finalize_signed_phase_accept_solution"})}),"\nwhich reward account associated with the winning solution."]}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{children:"Queue\n+-------------------------------+\n|Solution(score=20, valid=false)| +--\x3e Slashed\n+-------------------------------+\n|Solution(score=15, valid=true )| +--\x3e Rewarded, Saved\n+-------------------------------+\n|Solution(score=10, valid=true )| +--\x3e Discarded\n+-------------------------------+\n|Solution(score=05, valid=false)| +--\x3e Discarded\n+-------------------------------+\n| None |\n+-------------------------------+\n"})}),"\n",(0,i.jsx)(t.h3,{id:"deposit-and-reward-mechanics",children:"Deposit and reward mechanics"}),"\n",(0,i.jsxs)(t.p,{children:["The staking miners are required to pay a deposit to post their solutions. Deposit amount is the sum\nof ",(0,i.jsx)(t.code,{children:"SignedDepositBase"})," +",(0,i.jsx)(t.code,{children:"SignedDepositByte"})," + ",(0,i.jsx)(t.code,{children:"SignedDepositWeight"}),". All good solutions are subject\nto receiving a ",(0,i.jsx)(t.code,{children:"SignedRewardBase"}),". For more information about deposit values see the\n",(0,i.jsx)(t.a,{href:"/docs/chain-state-values#staking-miner-deposit",children:"Chain State Values page"}),"."]}),"\n",(0,i.jsx)(t.h3,{id:"further-resources",children:"Further Resources"}),"\n",(0,i.jsx)(t.p,{children:"If you want to run a staking miner on your validator, refer to the repository provided in the\nresources section below."}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsx)(t.li,{children:(0,i.jsx)(t.a,{href:"https://github.com/paritytech/staking-miner-v2",children:"Staking Miner repository"})}),"\n",(0,i.jsx)(t.li,{children:(0,i.jsx)(t.a,{href:"https://crates.parity.io/pallet_election_provider_multi_phase/index.html",children:"Election Pallet definition"})}),"\n",(0,i.jsx)(t.li,{children:(0,i.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/f610ffc05876d4b98a14cee245b4cc27bd3c0c15/runtime/polkadot/src/lib.rs#L389:L397",children:"Signed phase parameter configuration on Polkadot"})}),"\n"]})]})}function c(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(h,{...e})}):h(e)}},65394:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/bags-list-example-0-6836e3658c32484103ffcd06d6372427.png"},63259:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/bags-list-example-1-6aeffdb212b7af723f00e38b40780dcc.png"},84928:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/bags-list-example-2-aec08a8679a23e697f416374cbcdf735.png"},56105:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/bags-list-example-3-08c2b290f95e036e026f667fca527704.png"},22630:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/NPoS-election-optimization-3ef1b7bd0a99f64c4198511b4216989d.png"},60546:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/stash-vs-stash-and-staking-proxy-2104e1a23d5c29821cec15fb9b67eba5.png"},28453:(e,t,n)=>{n.d(t,{R:()=>o,x:()=>r});var i=n(96540);const a={},s=i.createContext(a);function o(e){const t=i.useContext(s);return i.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:o(e.components),i.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/41b7b3e8.e897e7ff.js b/assets/js/41b7b3e8.e897e7ff.js new file mode 100644 index 000000000000..2f00c4082d13 --- /dev/null +++ b/assets/js/41b7b3e8.e897e7ff.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[577],{16044:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>r,default:()=>c,frontMatter:()=>o,metadata:()=>i,toc:()=>d});const i=JSON.parse('{"id":"learn/learn-staking-advanced","title":"Advanced Staking Concepts","description":"Advanced Concepts about Staking on Polkadot.","source":"@site/../docs/learn/learn-staking-advanced.md","sourceDirName":"learn","slug":"/learn-staking-advanced","permalink":"/docs/learn-staking-advanced","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-staking-advanced.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1727168669000,"frontMatter":{"id":"learn-staking-advanced","title":"Advanced Staking Concepts","sidebar_label":"Advanced Staking Concepts","description":"Advanced Concepts about Staking on Polkadot.","keywords":["staking","stake","nominate","nominating","NPoS","proxies","payouts","simple payouts","rewards","staking miner","phragm\xe9n"],"slug":"../learn-staking-advanced"},"sidebar":"docs","previous":{"title":"Accounts","permalink":"/docs/learn-account-advanced"},"next":{"title":"NFT Pallets","permalink":"/docs/learn-nft-pallets"}}');var a=n(74848),s=n(28453);const o={id:"learn-staking-advanced",title:"Advanced Staking Concepts",sidebar_label:"Advanced Staking Concepts",description:"Advanced Concepts about Staking on Polkadot.",keywords:["staking","stake","nominate","nominating","NPoS","proxies","payouts","simple payouts","rewards","staking miner","phragm\xe9n"],slug:"../learn-staking-advanced"},r=void 0,l={},d=[{value:"Staking Proxies",id:"staking-proxies",level:2},{value:"Bags List",id:"bags-list",level:2},{value:"Rewards Distribution",id:"rewards-distribution",level:2},{value:"Commission Fees & Slashes",id:"commission-fees--slashes",level:4},{value:"Simple Payouts",id:"simple-payouts",level:2},{value:"Claiming Rewards",id:"claiming-rewards",level:3},{value:"FAQ and Cautionary Notes",id:"faq-and-cautionary-notes",level:3},{value:"Staking Miner",id:"staking-miner",level:2},{value:"NPoS election optimization",id:"npos-election-optimization",level:3},{value:"Signed Phase of the election pallet",id:"signed-phase-of-the-election-pallet",level:3},{value:"Deposit and reward mechanics",id:"deposit-and-reward-mechanics",level:3},{value:"Further Resources",id:"further-resources",level:3}];function h(e){const t={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",h4:"h4",img:"img",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,s.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(t.admonition,{title:"New to Staking?",type:"tip",children:(0,a.jsxs)(t.p,{children:["Start your staking journey or explore more information about staking on\n",(0,a.jsx)(t.a,{href:"https://polkadot.network/staking/",children:"Polkadot's Home Page"}),". Discover the new\n",(0,a.jsx)(t.a,{href:"https://staking.polkadot.cloud/#/overview",children:"Staking Dashboard"})," that makes staking much easier and\ncheck this\n",(0,a.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000182104",children:"extensive article list"})," to\nhelp you get started. You can now stake natively with a\n",(0,a.jsx)(t.a,{href:"/docs/chain-state-values#minimum-bond-to-join-a-nomination-pool",children:"small number of tokens"}),"\nand earn staking rewards. For additional information, check out\n",(0,a.jsx)(t.a,{href:"https://polkadot.network/blog/nomination-pools-are-live-stake-natively-with-just-1-dot/",children:"this blog post"}),"."]})}),"\n",(0,a.jsxs)(t.p,{children:["This page is meant to be an advanced guide to staking with the relay chain. For a more general\nintroduction, checkout the ",(0,a.jsx)(t.a,{href:"/docs/learn-staking",children:"Introduction to Staking"})," page."]}),"\n",(0,a.jsx)(t.h2,{id:"staking-proxies",children:"Staking Proxies"}),"\n",(0,a.jsxs)(t.p,{children:["Polkadot makes it possible to create accounts having special permissions also called ",(0,a.jsx)(t.strong,{children:"proxy\naccounts"}),". For more details about proxy accounts visit the ",(0,a.jsx)(t.a,{href:"/docs/learn-proxies",children:"dedicated page"})," on\nthis wiki."]}),"\n",(0,a.jsxs)(t.p,{children:["Proxy accounts are special accounts which can sign\n",(0,a.jsx)(t.a,{href:"/docs/learn-transactions#pallets-and-extrinsics",children:(0,a.jsx)(t.strong,{children:"extrinsic calls"})})," made to specific ",(0,a.jsx)(t.strong,{children:"pallets"}),"\non behalf of the proxied account. There is thus the possibility to create staking proxy accounts\nthat can be used to sign extrinsic calls specific to the staking, session and utility pallets."]}),"\n",(0,a.jsx)(t.p,{children:"Staking is not a set-and-forget action, as a nominator you will need to monitor the performance of\nyour validators and make changes if needed. There will be this transactions such as nominating that\nwill be needed to regularly signed. Each time you sign with an account, in the case of hot accounts,\nyou expose the private key of that account to the internet with consequent risk of attack. A hot\nstash will be exposed all the time a transaction is signed. Even in the case of a cold stash created\nwith a Ledger device, signing with the stash will build a transaction history that might tell\nsomething about your habits and preferences, or even your location."}),"\n",(0,a.jsx)(t.p,{children:"Ideally, accounts with high economic power like the stash must be and remain as isolated as\npossible. With a staking proxy, the stash account is fully isolated when signing for staking-related\ntransactions. The proxy private key will be used to sign staking-related transactions, the stash\nprivate key will stay isolated and the staking transaction history will be built by the proxy."}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"stash-stakingProxy",src:n(60546).A+"",width:"1920",height:"800"})}),"\n",(0,a.jsx)(t.p,{children:"For a practical perspective we need to use only one account and remember one password to sign for\nall staking-related transactions. From a security perspective who controls the staking proxy\ncontrols our staking actions."}),"\n",(0,a.jsx)(t.p,{children:"It is important to remember that actions that can be performed by the proxy accounts are limited,\nand in the case of staking proxy, extrinsic calls to the balances pallet cannot be signed. This\nmeans it is not possible to do balance transfers on the proxied account through a staking proxy."}),"\n",(0,a.jsxs)(t.p,{children:["Note that to change the staking proxy you will need to sign with the stash or an ",(0,a.jsx)(t.em,{children:"any"})," proxy."]}),"\n",(0,a.jsx)(t.h2,{id:"bags-list",children:"Bags List"}),"\n",(0,a.jsxs)(t.admonition,{type:"info",children:[(0,a.jsxs)(t.p,{children:["On Polkadot and Kusama, the instance of the pallet\n",(0,a.jsx)(t.a,{href:"https://paritytech.github.io/substrate/master/pallet_bags_list/",children:"Bags-List"})," is named as\n'voterList'."]}),(0,a.jsxs)(t.p,{children:["For a demo about bags list see ",(0,a.jsx)(t.a,{href:"https://youtu.be/hIIZRJLrBZA",children:"this video tutorial"}),"."]})]}),"\n",(0,a.jsxs)(t.p,{children:["In Polkadot's NPoS nomination intents are placed in a semi-sorted list called\n",(0,a.jsx)(t.a,{href:"https://github.com/paritytech/substrate/pull/9507",children:"bags-list"}),". The Bags-List substrate pallet is\ndesigned to be self-maintaining, with minimal effort from the blockchain, making it extremely\nscalable. The bags list has two primary components, bags and nodes (or nominators' accounts), with\nbags containing the nodes with bonded balance within a specific range. In the figure below the 1st\nempty bag will contain nominators whose bonded balance is in the range of 21 - 30 DOT, the 2nd bag\n11 - 20 DOT, and the 3rd bag 0-10 DOT. The nomination intents are the nominators' accounts with\nbonded tokens (in the example shown below, there are eight nomination intents) that will be put\ninside each of those three bags depending on their stake."]}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"bags list example 0",src:n(65394).A+"",width:"1920",height:"800"})}),"\n",(0,a.jsx)(t.p,{children:"The bags list is semi-sorted, meaning that sorting is only partially done. When the nomination\nintents are submitted to the network, they are automatically put into each bag based on the number\nof bonded tokens, but within each bag, those nodes are arranged based on the time they are inserted\nand not based on their stake (see figure below). When the nomination intent of 19 DOT is submitted,\nit gets placed at the last spot in the 2nd bag (shown in the yellow circle). The same scenario\napplies for the node with 8 DOT (green circle) in the 3rd bag. Placing the node above all nodes with\na lesser stake requires an additional step (more on this later)."}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"bags list example 1",src:n(63259).A+"",width:"1920",height:"800"})}),"\n",(0,a.jsxs)(t.p,{children:["The mentioned two nodes (19 DOT and 8 DOT) have the option to move up in their respective bags,\nwhich can put them in front of the nodes with less stake than them (see figure below). This action\nmust be done manually by submitting the ",(0,a.jsx)(t.code,{children:"putInFrontOf"})," extrinsic within the ",(0,a.jsx)(t.code,{children:"voterList"})," pallet\ninstance. Moreover, if the node with 19 DOT bonds an additional 2 DOT, that node will be put\nautomatically in the 1st bag (i.e. automatic ",(0,a.jsx)(t.code,{children:"rebag"}),') because the total number of bonded tokens will\nnow be within the range of the 1st bag. That node with now 21 DOT will be put at the tail end of the\n1st bag with the possibility to manually put itself in front of "older" nodes with less than 21 DOT\n(if there are any).']}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"bags list example 2",src:n(84928).A+"",width:"1920",height:"800"})}),"\n",(0,a.jsxs)(t.p,{children:["If one decides to send staking rewards to the stash account and automatically bond them (i.e.\ncompounding the staking rewards), the position within a bag does not change automatically. The same\nscenario applies to a slashing event, i.e., when a nominator gets slashed, their position within a\nbag does not change. This might result in a scenario where the node is in the wrong bag and needs to\nbe placed in the right bag. To address this issue, any account on-chain can submit the\npermissionless extrinsic ",(0,a.jsx)(t.code,{children:"rebag"})," within the ",(0,a.jsx)(t.code,{children:"voterList"})," pallet instance to update the positions of\nthe nodes that do not belong to their bag and place them in the correct one. To reiterate, actions\nlike bonding/unbonding tokens automatically rebag the nominator node, but events like staking\nrewards/slashing do not. See the ",(0,a.jsx)(t.a,{href:"/docs/learn-nominator#bags-list",children:"bags-list"})," section for more\ninformation."]}),"\n",(0,a.jsxs)(t.p,{children:["The bags-list is capable of including an unlimited number of nodes, subject to the chain's runtime\nstorage. In the current staking system configuration, at most 22500 nominators in the bags-list\n(12500 on Kusama) come out as the electing nominators. See\n",(0,a.jsx)(t.a,{href:"/docs/learn-nominator#staking-election-stages",children:"Staking Election Stages"})," section for more info."]}),"\n",(0,a.jsxs)(t.p,{children:["This means that only a portion of the nomination intents is kept. Once the nomination period ends,\nthe NPoS election system takes all nomination intents and their associated votes as input, and it\noutputs a set of validators. The bags are iterated from the most staked to the least staked. If the\naccounts are not appropriately sorted, this could leave the last touched bag to only be partially\niterated. Thus, in some edge cases, the order of the members within a bag is important. Continuing\nwith the example used in the previous figures, there are 8 nomination intents of which only 7 will\nbe kept. If the bags list stays semi-sorted (i.e. no accounts call the ",(0,a.jsx)(t.code,{children:"putInFrontOf"})," and ",(0,a.jsx)(t.code,{children:"rebag"}),"\nextrinsics), the nomination of the node with 8 DOT in the 3rd bag will not be considered while that\nof the preceding node with 5 DOT will be. Nomination of the node with 8 DOT will be kept only if it\nputs itself in front of the one with 5 DOT. Note how the nomination of the node with 19 DOT in the\n2nd bag will be considered regardless of changing its position inside the bag. The sorting\nfunctionality of nomination intents using bags is extremely important for the\n",(0,a.jsx)(t.a,{href:"https://gist.github.com/kianenigma/aa835946455b9a3f167821b9d05ba376",children:"long-term improvements"})," of the\nstaking/election system."]}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"bags list example 3",src:n(56105).A+"",width:"1920",height:"800"})}),"\n",(0,a.jsx)(t.admonition,{title:"Minimum active nomination threshold to earn rewards is dynamic",type:"caution",children:(0,a.jsxs)(t.p,{children:["Submitting a nomination intent does not guarantee staking rewards. The stake of the top 22500\nnominators (12500 on Kusama) is applied to the validators in the active set. To avail of staking\nrewards, ensure that the number of tokens bonded is higher than the minimum active bond. For more\ninformation, see the ",(0,a.jsx)(t.a,{href:"/docs/learn-nominator",children:"nominator guide"}),"."]})}),"\n",(0,a.jsxs)(t.p,{children:['The "election solution" which is a connected graph between nominators and validators with the stake\nas edge weights, has to meet certain requirements, such as maximizing the amount of stake to\nnominate validators and distributing the stake backing validators as evenly as possible. The\nobjectives of this election mechanism are to maximize the security of the network, and achieve fair\nrepresentation of the nominators. If you want to know more about how NPoS works (e.g. election,\nrunning time complexity, etc.), please read\n',(0,a.jsx)(t.a,{href:"http://research.web3.foundation/en/latest/polkadot/NPoS.html",children:"here"}),"."]}),"\n",(0,a.jsx)(t.h2,{id:"rewards-distribution",children:"Rewards Distribution"}),"\n",(0,a.jsx)(t.admonition,{type:"info",children:(0,a.jsxs)(t.p,{children:["The general rule for rewards across validators is that two validators get paid essentially the same\namount of tokens for equal work, i.e. they are not paid proportional to their total stakes. There is\na probabilistic component to staking rewards in the form of\n",(0,a.jsx)(t.a,{href:"/docs/maintain-guides-validator-payout##era-points",children:"era points"})," and\n",(0,a.jsx)(t.a,{href:"/docs/learn-guides-transfers#calculating-fees-with-polkadot-js",children:"tips"})," but these should average out\nover time."]})}),"\n",(0,a.jsx)(t.p,{children:"Validators are paid the same regardless of stake backing them. Validators with less stake will\ngenerally pay more to nominators per-token than the ones with more stake. This gives nominators an\neconomic incentive to gradually shift their preferences to lower-staked validators that gain a\nsufficient amount of reputation. A consequence of this is that the stake across validators will be\nas evenly distributed as possible which avoids concentration of power among a few validators. In the\nlong term, validators will have similar levels of stake, with the stake being higher for validators\nwith higher reputation. A nominator who is willing to risk more by backing a validator with a lower\nreputation will get paid more, provided there are no slashing events."}),"\n",(0,a.jsx)(t.p,{children:"Before distributing rewards to nominators, validators can create a cut of the reward (a commission)\nthat is not shared with the nominators. This cut is a percentage of the block reward, not an\nabsolute value. After the commission gets deducted, the remaining portion is distributed pro-rata\nbased on their staked value and split between the validator and all of the nominators whose stake\nhas backed this validator."}),"\n",(0,a.jsxs)(t.p,{children:["For example, assume the block reward for a validator is 10 DOT. A validator may specify\n",(0,a.jsx)(t.code,{children:"validator_commission = 50%"}),", in which case the validator would receive 5 DOT. The remaining 5 DOT\nwould then be split between the validator and their nominators based on the proportion of stake each\nnominator had. Note that for this calculation, validator's self-stake acts just as if they were\nanother nominator."]}),"\n",(0,a.jsx)(t.p,{children:"Thus, a percentage of the reward goes thus to pay the validator's commission fees and the remainder\nis paid pro-rata (i.e. proportional to stake) to the nominators and validator. If a validator's\ncommission is set to 100%, no tokens will be paid out to any of the nominators. Notice in particular\nthat the validator is rewarded twice: once in commission fees for validating (if their commission\nrate is above 0%), and once for nominating itself with own stake."}),"\n",(0,a.jsx)(t.p,{children:"The following example should clarify the above. For simplicity, we have the following assumptions:"}),"\n",(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsx)(t.li,{children:"These validators do not have a stake of their own."}),"\n",(0,a.jsx)(t.li,{children:"They each receive the same number of era points."}),"\n",(0,a.jsx)(t.li,{children:"There are no tips for any transactions processed."}),"\n",(0,a.jsx)(t.li,{children:"They do NOT charge any commission fees."}),"\n",(0,a.jsx)(t.li,{children:"Total reward amount is 100 DOT tokens."}),"\n",(0,a.jsxs)(t.li,{children:["The current minimum amount of DOT to be a validator is 350 (note that this is ",(0,a.jsx)(t.em,{children:"not"})," the actual\nvalue, which fluctuates, but merely an assumption for purposes of this example; to understand how\nthe actual minimal stake is calculated, see\n",(0,a.jsx)(t.a,{href:"/docs/faq#what-is-the-minimum-stake-necessary-to-be-elected-as-an-active-validator",children:"here"}),")."]}),"\n"]}),"\n",(0,a.jsxs)(t.table,{children:[(0,a.jsx)(t.thead,{children:(0,a.jsxs)(t.tr,{children:[(0,a.jsx)(t.th,{style:{textAlign:"center"}}),(0,a.jsx)(t.th,{style:{textAlign:"center"},children:(0,a.jsx)(t.strong,{children:"Validator A"})}),(0,a.jsx)(t.th,{style:{textAlign:"center"}}),(0,a.jsx)(t.th,{style:{textAlign:"center"}})]})}),(0,a.jsxs)(t.tbody,{children:[(0,a.jsxs)(t.tr,{children:[(0,a.jsx)(t.td,{style:{textAlign:"center"},children:"Nominator (4)"}),(0,a.jsx)(t.td,{style:{textAlign:"center"},children:"Stake (600)"}),(0,a.jsx)(t.td,{style:{textAlign:"center"},children:"Fraction of the Total Stake"}),(0,a.jsx)(t.td,{style:{textAlign:"center"},children:"Rewards"})]}),(0,a.jsxs)(t.tr,{children:[(0,a.jsx)(t.td,{style:{textAlign:"center"},children:"Jin"}),(0,a.jsx)(t.td,{style:{textAlign:"center"},children:"100"}),(0,a.jsx)(t.td,{style:{textAlign:"center"},children:"0.167"}),(0,a.jsx)(t.td,{style:{textAlign:"center"},children:"16.7"})]}),(0,a.jsxs)(t.tr,{children:[(0,a.jsx)(t.td,{style:{textAlign:"center"},children:(0,a.jsx)(t.strong,{children:"Sam"})}),(0,a.jsx)(t.td,{style:{textAlign:"center"},children:"50"}),(0,a.jsx)(t.td,{style:{textAlign:"center"},children:"0.083"}),(0,a.jsx)(t.td,{style:{textAlign:"center"},children:"8.3"})]}),(0,a.jsxs)(t.tr,{children:[(0,a.jsx)(t.td,{style:{textAlign:"center"},children:"Anson"}),(0,a.jsx)(t.td,{style:{textAlign:"center"},children:"250"}),(0,a.jsx)(t.td,{style:{textAlign:"center"},children:"0.417"}),(0,a.jsx)(t.td,{style:{textAlign:"center"},children:"41.7"})]}),(0,a.jsxs)(t.tr,{children:[(0,a.jsx)(t.td,{style:{textAlign:"center"},children:"Bobby"}),(0,a.jsx)(t.td,{style:{textAlign:"center"},children:"200"}),(0,a.jsx)(t.td,{style:{textAlign:"center"},children:"0.333"}),(0,a.jsx)(t.td,{style:{textAlign:"center"},children:"33.3"})]})]})]}),"\n",(0,a.jsxs)(t.table,{children:[(0,a.jsx)(t.thead,{children:(0,a.jsxs)(t.tr,{children:[(0,a.jsx)(t.th,{style:{textAlign:"center"}}),(0,a.jsx)(t.th,{style:{textAlign:"center"},children:(0,a.jsx)(t.strong,{children:"Validator B"})}),(0,a.jsx)(t.th,{style:{textAlign:"center"}}),(0,a.jsx)(t.th,{style:{textAlign:"center"}})]})}),(0,a.jsxs)(t.tbody,{children:[(0,a.jsxs)(t.tr,{children:[(0,a.jsx)(t.td,{style:{textAlign:"center"},children:"Nominator (4)"}),(0,a.jsx)(t.td,{style:{textAlign:"center"},children:"Stake (400)"}),(0,a.jsx)(t.td,{style:{textAlign:"center"},children:"Fraction of the Total Stake"}),(0,a.jsx)(t.td,{style:{textAlign:"center"},children:"Rewards"})]}),(0,a.jsxs)(t.tr,{children:[(0,a.jsx)(t.td,{style:{textAlign:"center"},children:"Alice"}),(0,a.jsx)(t.td,{style:{textAlign:"center"},children:"100"}),(0,a.jsx)(t.td,{style:{textAlign:"center"},children:"0.25"}),(0,a.jsx)(t.td,{style:{textAlign:"center"},children:"25"})]}),(0,a.jsxs)(t.tr,{children:[(0,a.jsx)(t.td,{style:{textAlign:"center"},children:"Peter"}),(0,a.jsx)(t.td,{style:{textAlign:"center"},children:"100"}),(0,a.jsx)(t.td,{style:{textAlign:"center"},children:"0.25"}),(0,a.jsx)(t.td,{style:{textAlign:"center"},children:"25"})]}),(0,a.jsxs)(t.tr,{children:[(0,a.jsx)(t.td,{style:{textAlign:"center"},children:"John"}),(0,a.jsx)(t.td,{style:{textAlign:"center"},children:"150"}),(0,a.jsx)(t.td,{style:{textAlign:"center"},children:"0.375"}),(0,a.jsx)(t.td,{style:{textAlign:"center"},children:"37.5"})]}),(0,a.jsxs)(t.tr,{children:[(0,a.jsx)(t.td,{style:{textAlign:"center"},children:(0,a.jsx)(t.strong,{children:"Kitty"})}),(0,a.jsx)(t.td,{style:{textAlign:"center"},children:"50"}),(0,a.jsx)(t.td,{style:{textAlign:"center"},children:"0.125"}),(0,a.jsx)(t.td,{style:{textAlign:"center"},children:"12.5"})]})]})]}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.em,{children:"Both validators A & B have 4 nominators with a total stake 600 and 400 respectively."})}),"\n",(0,a.jsx)(t.p,{children:"Based on the above rewards distribution, nominators of validator B get more rewards per DOT than\nthose of validator A because A has more overall stake. Sam has staked 50 DOT with validator A, but\nhe only gets 8.3 in return, whereas Kitty gets 12.5 with the same amount of stake."}),"\n",(0,a.jsxs)(t.p,{children:["To estimate how many tokens you can get each month as a nominator or validator, you can use this\n",(0,a.jsx)(t.a,{href:"https://www.stakingrewards.com/earn/polkadot/calculate",children:"tool"})," as a reference and play around with\nit by changing some parameters (e.g. how many days you would like to stake with your DOT, provider\nfees, compound rewards, etc.) to have a better estimate. Even though it may not be entirely accurate\nsince staking participation is changing dynamically, it works well as an indicator."]}),"\n",(0,a.jsx)(t.h4,{id:"commission-fees--slashes",children:"Commission Fees & Slashes"}),"\n",(0,a.jsxs)(t.p,{children:["The network ",(0,a.jsx)(t.a,{href:"/docs/learn-offenses",children:"slashes"})," a validator for a misbehavior. The slashed amount is a\nfixed percentage (and not a fixed amount), which means that validators with more stake get slashed\nmore DOT. Again, this is done to provide nominators with an economic incentive to shift their\npreferences and back less popular validators whom they consider to be trustworthy."]}),"\n",(0,a.jsx)(t.p,{children:"Also, note that each validator candidate is free to name their desired commission fee (as a\npercentage of rewards) to cover operational costs. Since validators are paid the same, validators\nwith lower commission fees pay more to nominators than validators with higher fees. Thus, each\nvalidator can choose between increasing their fees to earn more, or decreasing their fees to attract\nmore nominators and increase their chances of being elected. In the long term, we expect that all\nvalidators will need to be cost-efficient to remain competitive, and that validators with higher\nreputation will be able to charge slightly higher commission fees (which is fair)."}),"\n",(0,a.jsx)(t.h2,{id:"simple-payouts",children:"Simple Payouts"}),"\n",(0,a.jsx)(t.p,{children:"Polkadot makes stakers claim their rewards for past eras by submitting a transaction. This naturally\nleads to spreading out reward distribution, as people make transactions at disparate times, rather\nthan updating the accounts of all stakers in a single block."}),"\n",(0,a.jsx)(t.p,{children:"Even if everyone submitted a reward claim at the same time, the fact that they are individual\ntransactions would allow the block construction algorithm to process only a limited number per block\nand ensure that the network maintains a constant block time. If all rewards were sent out in one\nblock, this could cause serious issues with the stability of the network."}),"\n",(0,a.jsxs)(t.p,{children:["Simple payouts require one transaction per validator, per ",(0,a.jsx)(t.a,{href:"/docs/glossary##era",children:"era"}),", to\nclaim rewards. The reason Polkadot requires this is to avoid an attack where someone has several\nthousand accounts nominating a single validator. The major cost in reward distribution is mutating\nthe accounts in storage, and Polkadot cannot pay out several thousand accounts in a single\ntransaction."]}),"\n",(0,a.jsx)(t.h3,{id:"claiming-rewards",children:"Claiming Rewards"}),"\n",(0,a.jsx)(t.p,{children:"The relay chain stores the last 84 eras of reward information (e.g. maps of era number to validator\npoints, staking rewards, nomination exposure, etc.). Rewards will not be claimable more than 84 eras\nafter they were earned. This means that all rewards must be claimed within a maximum of 84 eras,\nalthough under certain circumstances (described below) this may be as low as 28 eras."}),"\n",(0,a.jsx)(t.p,{children:"If a validator kills their stash, any remaining rewards will no longer be claimable. Before doing\nthis, however, they would need to first stop validating and then unbond the funds in their stash,\nwhich takes 28 eras. If a validator were to immediately chill and start unbonding after rewards are\ncalculated, and nobody issued a payout for that era from that validator in the next 28 eras, the\nreward would no longer be claimable."}),"\n",(0,a.jsx)(t.admonition,{title:"Advanced How-to Guides",type:"info",children:(0,a.jsxs)(t.p,{children:["In order to be absolutely sure that staking rewards can be claimed, users should trigger a payout\nbefore 28 eras have passed. See\n",(0,a.jsx)(t.a,{href:"/docs/learn-guides-nominator#claiming-rewards-with-the-polkadot-js-ui",children:"this page"})," for more\ninformation about how to claim rewards using the Polkadot-JS UI."]})}),"\n",(0,a.jsx)(t.h3,{id:"faq-and-cautionary-notes",children:"FAQ and Cautionary Notes"}),"\n",(0,a.jsxs)(t.ol,{children:["\n",(0,a.jsxs)(t.li,{children:["Rewards expire after 84 eras. On Polkadot, that's about 84 days. On Kusama, it is approximately\n21 days. Validators should claim all pending rewards before killing their stash in the event the\nvalidator decides to ",(0,a.jsx)(t.code,{children:"chill"})," -> ",(0,a.jsx)(t.code,{children:"unbonds all"})," -> ",(0,a.jsx)(t.code,{children:"withdraws unbonded"}),". Nominators will not miss\nout on rewards if they claim the pending rewards for a validator within 28 days. Essentially, the\ndeadline to ensure you get staking rewards is 28 eras. If the validator verifies its intent and\ndoes not unbond and withdraw, the 84 era timeline holds."]}),"\n",(0,a.jsx)(t.li,{children:"Claiming rewards (or neglecting to claim rewards) does not affect nominations in any way.\nNominations will persist after claiming rewards or after the rewards expire."}),"\n",(0,a.jsx)(t.li,{children:'Rewards are not minted until they are claimed. Therefore, if your reward destination is "stash,\nincreasing amount at stake", then your staked amount does not reflect your rewards until you\nclaim them. If you want to maximize compounding, then you will need to claim often or nominate\nvalidators which regularly claim for you.'}),"\n",(0,a.jsxs)(t.li,{children:["Staking operations at the end of an era are closed to allow the off-chain validator election to\ntake place. See ",(0,a.jsx)(t.a,{href:"/docs/learn-phragmen#off-chain-phragmen",children:"Off-chain Phragm\xe9n"})," for more information."]}),"\n"]}),"\n",(0,a.jsx)(t.h2,{id:"staking-miner",children:"Staking Miner"}),"\n",(0,a.jsx)(t.admonition,{type:"caution",children:(0,a.jsx)(t.p,{children:"The staking-miner code is experimental and it is still in the development phase. Use is at your own\ndiscretion, as there is a risk of losing some funds."})}),"\n",(0,a.jsxs)(t.p,{children:["At the end of each era on Polkadot and Kusama, using ",(0,a.jsx)(t.a,{href:"learn-phragmen",children:"NPoS"}),', a new set of validators\nmust be elected based on the nominator preferences. This is a computationally intensive process,\nhence the usage of the term "mining" for computing the solution. The validators use\n',(0,a.jsx)(t.a,{href:"https://docs.substrate.io/reference/how-to-guides/offchain-workers/",children:"off-chain workers"})," to compute\nthe result and submit a transaction to propose the set of winners. This can also be delegated to\nstand-alone programs, whose task is to mine the optimal solution. Staking miners compete with each\nother to produce election solutions which consist of a validator set, stake distribution across that\nset, and a score indicating how optimal the solution is. Staking miners run any given staking\nalgorithms (as of now, sequential Phragm\xe9n or PhragMMS, subject to change if improved algorithms are\nintroduced) to produce results, which are then sent as a transaction to the relay chain via a normal\nsigned extrinsic. The transaction requires a bond and a transaction fee. The best solution is\nrewarded, which the least covers the transaction fee, and the bond is returned to the account.\n",(0,a.jsx)(t.a,{href:"/docs/learn-staking-advanced#deposit-and-reward-mechanics",children:"The bond and the fee"})," are lost if the\nsolution is invalid."]}),"\n",(0,a.jsxs)(t.p,{children:["Staking miner uses a pallet called ",(0,a.jsx)(t.code,{children:"pallet_election_provider_multi_phase"})," and can only produce\nsolutions during the\n",(0,a.jsx)(t.a,{href:"https://crates.parity.io/pallet_election_provider_multi_phase/index.html#signed-phase",children:(0,a.jsx)(t.code,{children:"SignedPhase"})}),"\nof the pallet's life cycle. Once the ",(0,a.jsx)(t.code,{children:"SignedPhase"})," is over and the\n",(0,a.jsx)(t.a,{href:"https://crates.parity.io/pallet_election_provider_multi_phase/index.html#unsigned-phase",children:(0,a.jsx)(t.code,{children:"UnsignedPhase"})}),"\nstarts, only the off-chain workers can provide election results."]}),"\n",(0,a.jsx)(t.p,{children:"Running the staking miner requires passing the seed of a funded account in order to pay the fees for\nthe transactions that will be sent. The same account's balance is used to reserve deposits as well.\nThe best solution in each round is rewarded. All correct solutions will get their deposit back and\nthe ones that submit invalid solutions will lose their deposit."}),"\n",(0,a.jsx)(t.h3,{id:"npos-election-optimization",children:"NPoS election optimization"}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"NPoS election optimization",src:n(22630).A+"",width:"1868",height:"804"})}),"\n",(0,a.jsx)(t.p,{children:"A basic election solution is a simple distribution of stake across validators, but this can be\noptimized for better distribution equaling a higher security score. The staking miner does not act\nas a validator and focuses solely on the election result and optimization of the solution. It\nconnects to a specified chain and keeps listening to new signed phase of the election pallet in\norder to submit solutions to the NPoS election. When the correct time comes, it computes its\nsolution and submits it to the chain. The default miner algorithm is sequential Phragm\xe9n with a\nconfigurable number of balancing iterations that improve the score."}),"\n",(0,a.jsx)(t.h3,{id:"signed-phase-of-the-election-pallet",children:"Signed Phase of the election pallet"}),"\n",(0,a.jsxs)(t.p,{children:["The election provider pallet ",(0,a.jsx)(t.code,{children:"pallet_election_provider_multi_phase"})," is divided into two phases,\n",(0,a.jsx)(t.strong,{children:"signed"})," and ",(0,a.jsx)(t.strong,{children:"unsigned"}),". At the end of the pallet's timeline, the function ",(0,a.jsx)(t.code,{children:"elect()"})," is called."]}),"\n",(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{children:" elect()\n + <--T::SignedPhase--\x3e + <--T::UnsignedPhase--\x3e +\n +-------------------------------------------------------------------+\n Phase::Off + Phase::Signed + Phase::Unsigned +\n"})}),"\n",(0,a.jsxs)(t.p,{children:["Solutions provided by the staking miner can only be submitted during the signed phase. Solutions are\nsubmitted and queued on the chain as a ",(0,a.jsx)(t.code,{children:"RawSolution"}),". Once submitted, a solution cannot be retracted\nby the originating account."]}),"\n",(0,a.jsxs)(t.p,{children:[(0,a.jsx)(t.code,{children:"RawSolution"})," struct definition:"]}),"\n",(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{children:"pub struct RawSolution {\n pub solution: S, // The solution itself\n pub score: ElectionScore, // The claimed score of the solution.\n pub round: u32, // The round at which this solution should be submitted.\n}\n"})}),"\n",(0,a.jsxs)(t.p,{children:["A maximum of\n",(0,a.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/f610ffc05876d4b98a14cee245b4cc27bd3c0c15/runtime/polkadot/src/lib.rs#L390",children:(0,a.jsx)(t.code,{children:"pallet::Config::SignedMaxSubmissions"})}),"\nwill be stored on-chain and they will be sorted based on score. Higher the score the more optimal\nthe election solution is. The\n",(0,a.jsx)(t.a,{href:"/docs/chain-state-values#staking-miner-max-submissions",children:(0,a.jsx)(t.code,{children:"SignedMaxSubmissions"})})," variable\ncan be modified through governance."]}),"\n",(0,a.jsx)(t.p,{children:"Upon arrival of a new solution:"}),"\n",(0,a.jsxs)(t.ol,{children:["\n",(0,a.jsx)(t.li,{children:"If the queue is not full, it is stored in the appropriate sorted index."}),"\n",(0,a.jsx)(t.li,{children:"If the queue is full but the submitted solution is better than one of the queued ones, the worse\nsolution is discarded, the deposit of the outgoing solution is returned, and the new solution is\nstored in the correct index."}),"\n",(0,a.jsx)(t.li,{children:"If the queue is full and the solution is not an improvement compared to any of the queued ones,\nit is instantly rejected and no deposit is reserved."}),"\n"]}),"\n",(0,a.jsxs)(t.p,{children:["Upon the end of the ",(0,a.jsx)(t.code,{children:"SignedPhase"}),", no more solutions can be submitted and the solutions in the queue\nwill be checked using\n",(0,a.jsx)(t.a,{href:"https://paritytech.github.io/substrate/master/pallet_election_provider_multi_phase/pallet/struct.Pallet.html#method.feasibility_check",children:(0,a.jsx)(t.code,{children:"Pallet::feasibility_check"})}),"\nwhich ensures the score is indeed correct, and marks them as valid or invalid. By checking each\nsolution in the queue, the queue will be reorganized by score. The highest valid score will be\nrewarded. Invalid solutions with higher score than the winning solution will be slashed. The rest of\nthe solutions will be discarded and their deposit will be returned. Once the staking miner with a\nwinning solution is ready to be rewarded the runtime will automatically execute\n",(0,a.jsx)(t.a,{href:"https://github.com/paritytech/substrate/blob/f2bc08a3071a91b71fec63cf2b22c707411cec0e/frame/election-provider-multi-phase/src/signed.rs#L453-L474",children:(0,a.jsx)(t.code,{children:"finalize_signed_phase_accept_solution"})}),"\nwhich reward account associated with the winning solution."]}),"\n",(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{children:"Queue\n+-------------------------------+\n|Solution(score=20, valid=false)| +--\x3e Slashed\n+-------------------------------+\n|Solution(score=15, valid=true )| +--\x3e Rewarded, Saved\n+-------------------------------+\n|Solution(score=10, valid=true )| +--\x3e Discarded\n+-------------------------------+\n|Solution(score=05, valid=false)| +--\x3e Discarded\n+-------------------------------+\n| None |\n+-------------------------------+\n"})}),"\n",(0,a.jsx)(t.h3,{id:"deposit-and-reward-mechanics",children:"Deposit and reward mechanics"}),"\n",(0,a.jsxs)(t.p,{children:["The staking miners are required to pay a deposit to post their solutions. Deposit amount is the sum\nof ",(0,a.jsx)(t.code,{children:"SignedDepositBase"})," +",(0,a.jsx)(t.code,{children:"SignedDepositByte"})," + ",(0,a.jsx)(t.code,{children:"SignedDepositWeight"}),". All good solutions are subject\nto receiving a ",(0,a.jsx)(t.code,{children:"SignedRewardBase"}),". For more information about deposit values see the\n",(0,a.jsx)(t.a,{href:"/docs/chain-state-values#staking-miner-deposit",children:"Chain State Values page"}),"."]}),"\n",(0,a.jsx)(t.h3,{id:"further-resources",children:"Further Resources"}),"\n",(0,a.jsx)(t.p,{children:"If you want to run a staking miner on your validator, refer to the repository provided in the\nresources section below."}),"\n",(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsx)(t.li,{children:(0,a.jsx)(t.a,{href:"https://github.com/paritytech/staking-miner-v2",children:"Staking Miner repository"})}),"\n",(0,a.jsx)(t.li,{children:(0,a.jsx)(t.a,{href:"https://crates.parity.io/pallet_election_provider_multi_phase/index.html",children:"Election Pallet definition"})}),"\n",(0,a.jsx)(t.li,{children:(0,a.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/f610ffc05876d4b98a14cee245b4cc27bd3c0c15/runtime/polkadot/src/lib.rs#L389:L397",children:"Signed phase parameter configuration on Polkadot"})}),"\n"]})]})}function c(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,a.jsx)(t,{...e,children:(0,a.jsx)(h,{...e})}):h(e)}},65394:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/bags-list-example-0-6836e3658c32484103ffcd06d6372427.png"},63259:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/bags-list-example-1-6aeffdb212b7af723f00e38b40780dcc.png"},84928:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/bags-list-example-2-aec08a8679a23e697f416374cbcdf735.png"},56105:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/bags-list-example-3-08c2b290f95e036e026f667fca527704.png"},22630:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/NPoS-election-optimization-3ef1b7bd0a99f64c4198511b4216989d.png"},60546:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/stash-vs-stash-and-staking-proxy-2104e1a23d5c29821cec15fb9b67eba5.png"},28453:(e,t,n)=>{n.d(t,{R:()=>o,x:()=>r});var i=n(96540);const a={},s=i.createContext(a);function o(e){const t=i.useContext(s);return i.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:o(e.components),i.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/41f7224c.2dc759f5.js b/assets/js/41f7224c.2dc759f5.js deleted file mode 100644 index 72a4e92c8927..000000000000 --- a/assets/js/41f7224c.2dc759f5.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7376],{27049:(e,r,n)=>{n.r(r),n.d(r,{assets:()=>u,contentTitle:()=>c,default:()=>m,frontMatter:()=>s,metadata:()=>l,toc:()=>d});var t=n(74848),a=n(28453),i=n(67141),o=n(3514);const s={id:"learn-archive",title:"Archived Learn Resources",sidebar_label:"Archive",description:"Archive for the Learn Section.",keywords:["Gov1","Gov1 Treasury","Launch","Redenomination","Controller"],slug:"../learn-archive"},c=void 0,l={id:"learn/learn-archive",title:"Archived Learn Resources",description:"Archive for the Learn Section.",source:"@site/../docs/learn/learn-archive.md",sourceDirName:"learn",slug:"/learn-archive",permalink:"/docs/learn-archive",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-archive.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1727943421e3,frontMatter:{id:"learn-archive",title:"Archived Learn Resources",sidebar_label:"Archive",description:"Archive for the Learn Section.",keywords:["Gov1","Gov1 Treasury","Launch","Redenomination","Controller"],slug:"../learn-archive"},sidebar:"docs",previous:{title:"JAM FAQ",permalink:"/docs/learn-jam-faq"},next:{title:"Governance V1",permalink:"/docs/learn/learn-governance"}},u={},d=[];function h(e){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i.A,{message:"This section contains archived pages. The content in them no longer applies to Polkadot but can\nstill be relevant for parachains and related projects."}),"\n",(0,t.jsx)(o.A,{})]})}function m(e={}){const{wrapper:r}={...(0,a.R)(),...e.components};return r?(0,t.jsx)(r,{...e,children:(0,t.jsx)(h,{...e})}):h()}},67141:(e,r,n)=>{n.d(r,{A:()=>i});var t=n(96540),a=n(74848);const i=function(e){var r,n=e.message,i=(0,t.useState)(!0),o=i[0],s=i[1];return(0,a.jsx)(a.Fragment,{children:o&&(0,a.jsxs)("div",{className:"message-box",children:[(0,a.jsx)("button",{className:"close-button",onClick:function(){s(!1)},children:"\u2716 "}),(0,a.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(r=n,r.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},3514:(e,r,n)=>{n.d(r,{A:()=>x});n(96540);var t=n(34164),a=n(26972),i=n(28774),o=n(53465),s=n(16654),c=n(21312),l=n(51107);const u={cardContainer:"cardContainer_fWXF",cardTitle:"cardTitle_rnsV",cardDescription:"cardDescription_PWke"};var d=n(74848);function h(e){var r=e.href,n=e.children;return(0,d.jsx)(i.A,{href:r,className:(0,t.A)("card padding--lg",u.cardContainer),children:n})}function m(e){var r=e.href,n=e.icon,a=e.title,i=e.description;return(0,d.jsxs)(h,{href:r,children:[(0,d.jsxs)(l.A,{as:"h2",className:(0,t.A)("text--truncate",u.cardTitle),title:a,children:[n," ",a]}),i&&(0,d.jsx)("p",{className:(0,t.A)("text--truncate",u.cardDescription),title:i,children:i})]})}function f(e){var r,n,t=e.item,i=(0,a.Nr)(t),s=(n=(0,o.W)().selectMessage,function(e){return n(e,(0,c.T)({message:"1 item|{count} items",id:"theme.docs.DocCard.categoryDescription.plurals",description:"The default description for a category card in the generated index about how many items this category includes"},{count:e}))});return i?(0,d.jsx)(m,{href:i,icon:"\ud83d\uddc3\ufe0f",title:t.label,description:null!=(r=t.description)?r:s(t.items.length)}):null}function p(e){var r,n,t=e.item,i=(0,s.A)(t.href)?"\ud83d\udcc4\ufe0f":"\ud83d\udd17",o=(0,a.cC)(null!=(r=t.docId)?r:void 0);return(0,d.jsx)(m,{href:t.href,icon:i,title:t.label,description:null!=(n=t.description)?n:null==o?void 0:o.description})}function v(e){var r=e.item;switch(r.type){case"link":return(0,d.jsx)(p,{item:r});case"category":return(0,d.jsx)(f,{item:r});default:throw new Error("unknown item type "+JSON.stringify(r))}}function g(e){var r=e.className,n=(0,a.$S)();return(0,d.jsx)(x,{items:n.items,className:r})}function x(e){var r=e.items,n=e.className;if(!r)return(0,d.jsx)(g,Object.assign({},e));var i=(0,a.d1)(r);return(0,d.jsx)("section",{className:(0,t.A)("row",n),children:i.map((function(e,r){return(0,d.jsx)("article",{className:"col col--6 margin-bottom--lg",children:(0,d.jsx)(v,{item:e})},r)}))})}},53465:(e,r,n)=>{n.d(r,{W:()=>l});var t=n(96540),a=n(44586),i=["zero","one","two","few","many","other"];function o(e){return i.filter((function(r){return e.includes(r)}))}var s={locale:"en",pluralForms:o(["one","other"]),select:function(e){return 1===e?"one":"other"}};function c(){var e=(0,a.A)().i18n.currentLocale;return(0,t.useMemo)((function(){try{return r=e,n=new Intl.PluralRules(r),{locale:r,pluralForms:o(n.resolvedOptions().pluralCategories),select:function(e){return n.select(e)}}}catch(t){return console.error('Failed to use Intl.PluralRules for locale "'+e+'".\nDocusaurus will fallback to the default (English) implementation.\nError: '+t.message+"\n"),s}var r,n}),[e])}function l(){var e=c();return{selectMessage:function(r,n){return function(e,r,n){var t=e.split("|");if(1===t.length)return t[0];t.length>n.pluralForms.length&&console.error("For locale="+n.locale+", a maximum of "+n.pluralForms.length+" plural forms are expected ("+n.pluralForms.join(",")+"), but the message contains "+t.length+": "+e);var a=n.select(r),i=n.pluralForms.indexOf(a);return t[Math.min(i,t.length-1)]}(n,r,e)}}}},28453:(e,r,n)=>{n.d(r,{R:()=>o,x:()=>s});var t=n(96540);const a={},i=t.createContext(a);function o(e){const r=t.useContext(i);return t.useMemo((function(){return"function"==typeof e?e(r):{...r,...e}}),[r,e])}function s(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:o(e.components),t.createElement(i.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/41f7224c.582d68a2.js b/assets/js/41f7224c.582d68a2.js new file mode 100644 index 000000000000..f716a1a3f0b9 --- /dev/null +++ b/assets/js/41f7224c.582d68a2.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7376],{90853:(e,r,n)=>{n.r(r),n.d(r,{assets:()=>u,contentTitle:()=>l,default:()=>m,frontMatter:()=>c,metadata:()=>t,toc:()=>d});const t=JSON.parse('{"id":"learn/learn-archive","title":"Archived Learn Resources","description":"Archive for the Learn Section.","source":"@site/../docs/learn/learn-archive.md","sourceDirName":"learn","slug":"/learn-archive","permalink":"/docs/learn-archive","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-archive.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1727943421000,"frontMatter":{"id":"learn-archive","title":"Archived Learn Resources","sidebar_label":"Archive","description":"Archive for the Learn Section.","keywords":["Gov1","Gov1 Treasury","Launch","Redenomination","Controller"],"slug":"../learn-archive"},"sidebar":"docs","previous":{"title":"JAM FAQ","permalink":"/docs/learn-jam-faq"},"next":{"title":"Governance V1","permalink":"/docs/learn/learn-governance"}}');var a=n(74848),i=n(28453),s=n(67141),o=n(3514);const c={id:"learn-archive",title:"Archived Learn Resources",sidebar_label:"Archive",description:"Archive for the Learn Section.",keywords:["Gov1","Gov1 Treasury","Launch","Redenomination","Controller"],slug:"../learn-archive"},l=void 0,u={},d=[];function h(e){return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(s.A,{message:"This section contains archived pages. The content in them no longer applies to Polkadot but can\nstill be relevant for parachains and related projects."}),"\n",(0,a.jsx)(o.A,{})]})}function m(e={}){const{wrapper:r}={...(0,i.R)(),...e.components};return r?(0,a.jsx)(r,{...e,children:(0,a.jsx)(h,{...e})}):h()}},67141:(e,r,n)=>{n.d(r,{A:()=>i});var t=n(96540),a=n(74848);const i=function(e){var r,n=e.message,i=(0,t.useState)(!0),s=i[0],o=i[1];return(0,a.jsx)(a.Fragment,{children:s&&(0,a.jsxs)("div",{className:"message-box",children:[(0,a.jsx)("button",{className:"close-button",onClick:function(){o(!1)},children:"\u2716 "}),(0,a.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(r=n,r.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},3514:(e,r,n)=>{n.d(r,{A:()=>x});n(96540);var t=n(34164),a=n(26972),i=n(28774),s=n(53465),o=n(16654),c=n(21312),l=n(51107);const u={cardContainer:"cardContainer_fWXF",cardTitle:"cardTitle_rnsV",cardDescription:"cardDescription_PWke"};var d=n(74848);function h(e){var r=e.href,n=e.children;return(0,d.jsx)(i.A,{href:r,className:(0,t.A)("card padding--lg",u.cardContainer),children:n})}function m(e){var r=e.href,n=e.icon,a=e.title,i=e.description;return(0,d.jsxs)(h,{href:r,children:[(0,d.jsxs)(l.A,{as:"h2",className:(0,t.A)("text--truncate",u.cardTitle),title:a,children:[n," ",a]}),i&&(0,d.jsx)("p",{className:(0,t.A)("text--truncate",u.cardDescription),title:i,children:i})]})}function f(e){var r,n,t=e.item,i=(0,a.Nr)(t),o=(n=(0,s.W)().selectMessage,function(e){return n(e,(0,c.T)({message:"1 item|{count} items",id:"theme.docs.DocCard.categoryDescription.plurals",description:"The default description for a category card in the generated index about how many items this category includes"},{count:e}))});return i?(0,d.jsx)(m,{href:i,icon:"\ud83d\uddc3\ufe0f",title:t.label,description:null!=(r=t.description)?r:o(t.items.length)}):null}function p(e){var r,n,t=e.item,i=(0,o.A)(t.href)?"\ud83d\udcc4\ufe0f":"\ud83d\udd17",s=(0,a.cC)(null!=(r=t.docId)?r:void 0);return(0,d.jsx)(m,{href:t.href,icon:i,title:t.label,description:null!=(n=t.description)?n:null==s?void 0:s.description})}function v(e){var r=e.item;switch(r.type){case"link":return(0,d.jsx)(p,{item:r});case"category":return(0,d.jsx)(f,{item:r});default:throw new Error("unknown item type "+JSON.stringify(r))}}function g(e){var r=e.className,n=(0,a.$S)();return(0,d.jsx)(x,{items:n.items,className:r})}function x(e){var r=e.items,n=e.className;if(!r)return(0,d.jsx)(g,Object.assign({},e));var i=(0,a.d1)(r);return(0,d.jsx)("section",{className:(0,t.A)("row",n),children:i.map((function(e,r){return(0,d.jsx)("article",{className:"col col--6 margin-bottom--lg",children:(0,d.jsx)(v,{item:e})},r)}))})}},53465:(e,r,n)=>{n.d(r,{W:()=>l});var t=n(96540),a=n(44586),i=["zero","one","two","few","many","other"];function s(e){return i.filter((function(r){return e.includes(r)}))}var o={locale:"en",pluralForms:s(["one","other"]),select:function(e){return 1===e?"one":"other"}};function c(){var e=(0,a.A)().i18n.currentLocale;return(0,t.useMemo)((function(){try{return r=e,n=new Intl.PluralRules(r),{locale:r,pluralForms:s(n.resolvedOptions().pluralCategories),select:function(e){return n.select(e)}}}catch(t){return console.error('Failed to use Intl.PluralRules for locale "'+e+'".\nDocusaurus will fallback to the default (English) implementation.\nError: '+t.message+"\n"),o}var r,n}),[e])}function l(){var e=c();return{selectMessage:function(r,n){return function(e,r,n){var t=e.split("|");if(1===t.length)return t[0];t.length>n.pluralForms.length&&console.error("For locale="+n.locale+", a maximum of "+n.pluralForms.length+" plural forms are expected ("+n.pluralForms.join(",")+"), but the message contains "+t.length+": "+e);var a=n.select(r),i=n.pluralForms.indexOf(a);return t[Math.min(i,t.length-1)]}(n,r,e)}}}},28453:(e,r,n)=>{n.d(r,{R:()=>s,x:()=>o});var t=n(96540);const a={},i=t.createContext(a);function s(e){const r=t.useContext(i);return t.useMemo((function(){return"function"==typeof e?e(r):{...r,...e}}),[r,e])}function o(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:s(e.components),t.createElement(i.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/4310.712dd3ad.js b/assets/js/4310.712dd3ad.js new file mode 100644 index 000000000000..a40bc1854ee7 --- /dev/null +++ b/assets/js/4310.712dd3ad.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4310],{94310:(t,e,r)=>{r.d(e,{diagram:()=>W});var a=r(85039),i=r(45567),n=r(697),s=r(20007),o=r(62334);const c=[];for(let U=0;U<256;++U)c.push((U+256).toString(16).slice(1));function l(t,e=0){return c[t[e+0]]+c[t[e+1]]+c[t[e+2]]+c[t[e+3]]+"-"+c[t[e+4]]+c[t[e+5]]+"-"+c[t[e+6]]+c[t[e+7]]+"-"+c[t[e+8]]+c[t[e+9]]+"-"+c[t[e+10]]+c[t[e+11]]+c[t[e+12]]+c[t[e+13]]+c[t[e+14]]+c[t[e+15]]}const h=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;const d=function(t){return"string"==typeof t&&h.test(t)};const u=function(t){if(!d(t))throw TypeError("Invalid UUID");let e;const r=new Uint8Array(16);return r[0]=(e=parseInt(t.slice(0,8),16))>>>24,r[1]=e>>>16&255,r[2]=e>>>8&255,r[3]=255&e,r[4]=(e=parseInt(t.slice(9,13),16))>>>8,r[5]=255&e,r[6]=(e=parseInt(t.slice(14,18),16))>>>8,r[7]=255&e,r[8]=(e=parseInt(t.slice(19,23),16))>>>8,r[9]=255&e,r[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255,r[11]=e/4294967296&255,r[12]=e>>>24&255,r[13]=e>>>16&255,r[14]=e>>>8&255,r[15]=255&e,r};function y(t,e,r,a){switch(t){case 0:return e&r^~e&a;case 1:case 3:return e^r^a;case 2:return e&r^e&a^r&a}}function p(t,e){return t<>>32-e}const _=function(t,e,r){function a(t,a,i,n){var s;if("string"==typeof t&&(t=function(t){t=unescape(encodeURIComponent(t));const e=[];for(let r=0;r>>0;l=c,c=o,o=p(i,30)>>>0,i=a,a=s}r[0]=r[0]+a>>>0,r[1]=r[1]+i>>>0,r[2]=r[2]+o>>>0,r[3]=r[3]+c>>>0,r[4]=r[4]+l>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,255&r[0],r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,255&r[1],r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,255&r[2],r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,255&r[3],r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,255&r[4]]}));var f=function(){var t=(0,i.K2)((function(t,e,r,a){for(r=r||{},a=t.length;a--;r[t[a]]=e);return r}),"o"),e=[6,8,10,20,22,24,26,27,28],r=[1,10],a=[1,11],n=[1,12],s=[1,13],o=[1,14],c=[1,15],l=[1,21],h=[1,22],d=[1,23],u=[1,24],y=[1,25],p=[6,8,10,13,15,18,19,20,22,24,26,27,28,41,42,43,44,45],_=[1,34],f=[27,28,46,47],E=[41,42,43,44,45],g=[17,34],m=[1,54],O=[1,53],k=[17,34,36,38],b={trace:(0,i.K2)((function(){}),"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,":":13,role:14,BLOCK_START:15,attributes:16,BLOCK_STOP:17,SQS:18,SQE:19,title:20,title_value:21,acc_title:22,acc_title_value:23,acc_descr:24,acc_descr_value:25,acc_descr_multiline_value:26,ALPHANUM:27,ENTITY_NAME:28,attribute:29,attributeType:30,attributeName:31,attributeKeyTypeList:32,attributeComment:33,ATTRIBUTE_WORD:34,attributeKeyType:35,COMMA:36,ATTRIBUTE_KEY:37,COMMENT:38,cardinality:39,relType:40,ZERO_OR_ONE:41,ZERO_OR_MORE:42,ONE_OR_MORE:43,ONLY_ONE:44,MD_PARENT:45,NON_IDENTIFYING:46,IDENTIFYING:47,WORD:48,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",8:"SPACE",10:"NEWLINE",13:":",15:"BLOCK_START",17:"BLOCK_STOP",18:"SQS",19:"SQE",20:"title",21:"title_value",22:"acc_title",23:"acc_title_value",24:"acc_descr",25:"acc_descr_value",26:"acc_descr_multiline_value",27:"ALPHANUM",28:"ENTITY_NAME",34:"ATTRIBUTE_WORD",36:"COMMA",37:"ATTRIBUTE_KEY",38:"COMMENT",41:"ZERO_OR_ONE",42:"ZERO_OR_MORE",43:"ONE_OR_MORE",44:"ONLY_ONE",45:"MD_PARENT",46:"NON_IDENTIFYING",47:"IDENTIFYING",48:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,4],[9,3],[9,1],[9,7],[9,6],[9,4],[9,2],[9,2],[9,2],[9,1],[11,1],[11,1],[16,1],[16,2],[29,2],[29,3],[29,3],[29,4],[30,1],[31,1],[32,1],[32,3],[35,1],[33,1],[12,3],[39,1],[39,1],[39,1],[39,1],[39,1],[40,1],[40,1],[14,1],[14,1],[14,1]],performAction:(0,i.K2)((function(t,e,r,a,i,n,s){var o=n.length-1;switch(i){case 1:break;case 2:case 6:case 7:this.$=[];break;case 3:n[o-1].push(n[o]),this.$=n[o-1];break;case 4:case 5:case 19:case 43:case 27:case 28:case 31:this.$=n[o];break;case 8:a.addEntity(n[o-4]),a.addEntity(n[o-2]),a.addRelationship(n[o-4],n[o],n[o-2],n[o-3]);break;case 9:a.addEntity(n[o-3]),a.addAttributes(n[o-3],n[o-1]);break;case 10:a.addEntity(n[o-2]);break;case 11:a.addEntity(n[o]);break;case 12:a.addEntity(n[o-6],n[o-4]),a.addAttributes(n[o-6],n[o-1]);break;case 13:a.addEntity(n[o-5],n[o-3]);break;case 14:a.addEntity(n[o-3],n[o-1]);break;case 15:case 16:this.$=n[o].trim(),a.setAccTitle(this.$);break;case 17:case 18:this.$=n[o].trim(),a.setAccDescription(this.$);break;case 20:case 41:case 42:case 32:this.$=n[o].replace(/"/g,"");break;case 21:case 29:this.$=[n[o]];break;case 22:n[o].push(n[o-1]),this.$=n[o];break;case 23:this.$={attributeType:n[o-1],attributeName:n[o]};break;case 24:this.$={attributeType:n[o-2],attributeName:n[o-1],attributeKeyTypeList:n[o]};break;case 25:this.$={attributeType:n[o-2],attributeName:n[o-1],attributeComment:n[o]};break;case 26:this.$={attributeType:n[o-3],attributeName:n[o-2],attributeKeyTypeList:n[o-1],attributeComment:n[o]};break;case 30:n[o-2].push(n[o]),this.$=n[o-2];break;case 33:this.$={cardA:n[o],relType:n[o-1],cardB:n[o-2]};break;case 34:this.$=a.Cardinality.ZERO_OR_ONE;break;case 35:this.$=a.Cardinality.ZERO_OR_MORE;break;case 36:this.$=a.Cardinality.ONE_OR_MORE;break;case 37:this.$=a.Cardinality.ONLY_ONE;break;case 38:this.$=a.Cardinality.MD_PARENT;break;case 39:this.$=a.Identification.NON_IDENTIFYING;break;case 40:this.$=a.Identification.IDENTIFYING}}),"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,20:r,22:a,24:n,26:s,27:o,28:c},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:16,11:9,20:r,22:a,24:n,26:s,27:o,28:c},t(e,[2,5]),t(e,[2,6]),t(e,[2,11],{12:17,39:20,15:[1,18],18:[1,19],41:l,42:h,43:d,44:u,45:y}),{21:[1,26]},{23:[1,27]},{25:[1,28]},t(e,[2,18]),t(p,[2,19]),t(p,[2,20]),t(e,[2,4]),{11:29,27:o,28:c},{16:30,17:[1,31],29:32,30:33,34:_},{11:35,27:o,28:c},{40:36,46:[1,37],47:[1,38]},t(f,[2,34]),t(f,[2,35]),t(f,[2,36]),t(f,[2,37]),t(f,[2,38]),t(e,[2,15]),t(e,[2,16]),t(e,[2,17]),{13:[1,39]},{17:[1,40]},t(e,[2,10]),{16:41,17:[2,21],29:32,30:33,34:_},{31:42,34:[1,43]},{34:[2,27]},{19:[1,44]},{39:45,41:l,42:h,43:d,44:u,45:y},t(E,[2,39]),t(E,[2,40]),{14:46,27:[1,49],28:[1,48],48:[1,47]},t(e,[2,9]),{17:[2,22]},t(g,[2,23],{32:50,33:51,35:52,37:m,38:O}),t([17,34,37,38],[2,28]),t(e,[2,14],{15:[1,55]}),t([27,28],[2,33]),t(e,[2,8]),t(e,[2,41]),t(e,[2,42]),t(e,[2,43]),t(g,[2,24],{33:56,36:[1,57],38:O}),t(g,[2,25]),t(k,[2,29]),t(g,[2,32]),t(k,[2,31]),{16:58,17:[1,59],29:32,30:33,34:_},t(g,[2,26]),{35:60,37:m},{17:[1,61]},t(e,[2,13]),t(k,[2,30]),t(e,[2,12])],defaultActions:{34:[2,27],41:[2,22]},parseError:(0,i.K2)((function(t,e){if(!e.recoverable){var r=new Error(t);throw r.hash=e,r}this.trace(t)}),"parseError"),parse:(0,i.K2)((function(t){var e=this,r=[0],a=[],n=[null],s=[],o=this.table,c="",l=0,h=0,d=0,u=s.slice.call(arguments,1),y=Object.create(this.lexer),p={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(p.yy[_]=this.yy[_]);y.setInput(t,p.yy),p.yy.lexer=y,p.yy.parser=this,void 0===y.yylloc&&(y.yylloc={});var f=y.yylloc;s.push(f);var E=y.options&&y.options.ranges;function g(){var t;return"number"!=typeof(t=a.pop()||y.lex()||1)&&(t instanceof Array&&(t=(a=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,i.K2)((function(t){r.length=r.length-2*t,n.length=n.length-t,s.length=s.length-t}),"popStack"),(0,i.K2)(g,"lex");for(var m,O,k,b,R,N,x,T,A,M={};;){if(k=r[r.length-1],this.defaultActions[k]?b=this.defaultActions[k]:(null==m&&(m=g()),b=o[k]&&o[k][m]),void 0===b||!b.length||!b[0]){var w="";for(N in A=[],o[k])this.terminals_[N]&&N>2&&A.push("'"+this.terminals_[N]+"'");w=y.showPosition?"Parse error on line "+(l+1)+":\n"+y.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(w,{text:y.match,token:this.terminals_[m]||m,line:y.yylineno,loc:f,expected:A})}if(b[0]instanceof Array&&b.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+m);switch(b[0]){case 1:r.push(m),n.push(y.yytext),s.push(y.yylloc),r.push(b[1]),m=null,O?(m=O,O=null):(h=y.yyleng,c=y.yytext,l=y.yylineno,f=y.yylloc,d>0&&d--);break;case 2:if(x=this.productions_[b[1]][1],M.$=n[n.length-x],M._$={first_line:s[s.length-(x||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(x||1)].first_column,last_column:s[s.length-1].last_column},E&&(M._$.range=[s[s.length-(x||1)].range[0],s[s.length-1].range[1]]),void 0!==(R=this.performAction.apply(M,[c,h,l,p.yy,b[1],n,s].concat(u))))return R;x&&(r=r.slice(0,-1*x*2),n=n.slice(0,-1*x),s=s.slice(0,-1*x)),r.push(this.productions_[b[1]][0]),n.push(M.$),s.push(M._$),T=o[r[r.length-2]][r[r.length-1]],r.push(T);break;case 3:return!0}}return!0}),"parse")},R=function(){return{EOF:1,parseError:(0,i.K2)((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:(0,i.K2)((function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this}),"setInput"),input:(0,i.K2)((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t}),"input"),unput:(0,i.K2)((function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var a=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===a.length?this.yylloc.first_column:0)+a[a.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"unput"),more:(0,i.K2)((function(){return this._more=!0,this}),"more"),reject:(0,i.K2)((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:(0,i.K2)((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:(0,i.K2)((function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:(0,i.K2)((function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:(0,i.K2)((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:(0,i.K2)((function(t,e){var r,a,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(a=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=a.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:a?a[a.length-1].length-a[a.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var n in i)this[n]=i[n];return!1}return!1}),"test_match"),next:(0,i.K2)((function(){if(this.done)return this.EOF;var t,e,r,a;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),n=0;ne[0].length)){if(e=r,a=n,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[n])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[a]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:(0,i.K2)((function(){var t=this.next();return t||this.lex()}),"lex"),begin:(0,i.K2)((function(t){this.conditionStack.push(t)}),"begin"),popState:(0,i.K2)((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:(0,i.K2)((function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules}),"_currentRules"),topState:(0,i.K2)((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:(0,i.K2)((function(t){this.begin(t)}),"pushState"),stateStackSize:(0,i.K2)((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,i.K2)((function(t,e,r,a){switch(r){case 0:return this.begin("acc_title"),22;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),24;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return 10;case 8:case 15:case 20:break;case 9:return 8;case 10:return 28;case 11:return 48;case 12:return 4;case 13:return this.begin("block"),15;case 14:return 36;case 16:return 37;case 17:case 18:return 34;case 19:return 38;case 21:return this.popState(),17;case 22:case 54:return e.yytext[0];case 23:return 18;case 24:return 19;case 25:case 29:case 30:case 43:return 41;case 26:case 27:case 28:case 36:case 38:case 45:return 43;case 31:case 32:case 33:case 34:case 35:case 37:case 44:return 42;case 39:case 40:case 41:case 42:return 44;case 46:return 45;case 47:case 50:case 51:case 52:return 46;case 48:case 49:return 47;case 53:return 27;case 55:return 6}}),"anonymous"),rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:,)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i,/^(?:(.*?)[~](.*?)*[~])/i,/^(?:[\*A-Za-z_][A-Za-z0-9\-_\[\]\(\)]*)/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:one or zero\b)/i,/^(?:one or more\b)/i,/^(?:one or many\b)/i,/^(?:1\+)/i,/^(?:\|o\b)/i,/^(?:zero or one\b)/i,/^(?:zero or more\b)/i,/^(?:zero or many\b)/i,/^(?:0\+)/i,/^(?:\}o\b)/i,/^(?:many\(0\))/i,/^(?:many\(1\))/i,/^(?:many\b)/i,/^(?:\}\|)/i,/^(?:one\b)/i,/^(?:only one\b)/i,/^(?:1\b)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:\s*u\b)/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:[A-Za-z_][A-Za-z0-9\-_]*)/i,/^(?:.)/i,/^(?:$)/i],conditions:{acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},block:{rules:[14,15,16,17,18,19,20,21,22],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55],inclusive:!0}}}}();function N(){this.yy={}}return b.lexer=R,(0,i.K2)(N,"Parser"),N.prototype=b,b.Parser=N,new N}();f.parser=f;var E=f,g=new Map,m=[],O=(0,i.K2)((function(t,e=void 0){return g.has(t)?!g.get(t).alias&&e&&(g.get(t).alias=e,i.Rm.info(`Add alias '${e}' to entity '${t}'`)):(g.set(t,{attributes:[],alias:e}),i.Rm.info("Added new entity :",t)),g.get(t)}),"addEntity"),k=(0,i.K2)((()=>g),"getEntities"),b=(0,i.K2)((function(t,e){let r,a=O(t);for(r=e.length-1;r>=0;r--)a.attributes.push(e[r]),i.Rm.debug("Added attribute ",e[r].attributeName)}),"addAttributes"),R=(0,i.K2)((function(t,e,r,a){let n={entityA:t,roleA:e,entityB:r,relSpec:a};m.push(n),i.Rm.debug("Added new relationship :",n)}),"addRelationship"),N=(0,i.K2)((()=>m),"getRelationships"),x=(0,i.K2)((function(){g=new Map,m=[],(0,i.IU)()}),"clear"),T={Cardinality:{ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE",MD_PARENT:"MD_PARENT"},Identification:{NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},getConfig:(0,i.K2)((()=>(0,i.D7)().er),"getConfig"),addEntity:O,addAttributes:b,getEntities:k,addRelationship:R,getRelationships:N,clear:x,setAccTitle:i.SV,getAccTitle:i.iN,setAccDescription:i.EI,getAccDescription:i.m7,setDiagramTitle:i.ke,getDiagramTitle:i.ab},A={ONLY_ONE_START:"ONLY_ONE_START",ONLY_ONE_END:"ONLY_ONE_END",ZERO_OR_ONE_START:"ZERO_OR_ONE_START",ZERO_OR_ONE_END:"ZERO_OR_ONE_END",ONE_OR_MORE_START:"ONE_OR_MORE_START",ONE_OR_MORE_END:"ONE_OR_MORE_END",ZERO_OR_MORE_START:"ZERO_OR_MORE_START",ZERO_OR_MORE_END:"ZERO_OR_MORE_END",MD_PARENT_END:"MD_PARENT_END",MD_PARENT_START:"MD_PARENT_START"},M={ERMarkers:A,insertMarkers:(0,i.K2)((function(t,e){let r;t.append("defs").append("marker").attr("id",A.MD_PARENT_START).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",A.MD_PARENT_END).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",A.ONLY_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18 M15,0 L15,18"),t.append("defs").append("marker").attr("id",A.ONLY_ONE_END).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,0 L3,18 M9,0 L9,18"),r=t.append("defs").append("marker").attr("id",A.ZERO_OR_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18"),r=t.append("defs").append("marker").attr("id",A.ZERO_OR_ONE_END).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,0 L21,18"),t.append("defs").append("marker").attr("id",A.ONE_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),t.append("defs").append("marker").attr("id",A.ONE_OR_MORE_END).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18"),r=t.append("defs").append("marker").attr("id",A.ZERO_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18"),r=t.append("defs").append("marker").attr("id",A.ZERO_OR_MORE_END).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")}),"insertMarkers")},w=/[^\dA-Za-z](\W)*/g,I={},D=new Map,S=(0,i.K2)((function(t){const e=Object.keys(t);for(const r of e)I[r]=t[r]}),"setConf"),v=(0,i.K2)(((t,e,r)=>{const a=I.entityPadding/3,n=I.entityPadding/3,s=.85*I.fontSize,o=e.node().getBBox(),c=[];let l=!1,h=!1,d=0,u=0,y=0,p=0,_=o.height+2*a,f=1;r.forEach((t=>{void 0!==t.attributeKeyTypeList&&t.attributeKeyTypeList.length>0&&(l=!0),void 0!==t.attributeComment&&(h=!0)})),r.forEach((r=>{const n=`${e.node().id}-attr-${f}`;let o=0;const E=(0,i.QO)(r.attributeType),g=t.append("text").classed("er entityLabel",!0).attr("id",`${n}-type`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",(0,i.D7)().fontFamily).style("font-size",s+"px").text(E),m=t.append("text").classed("er entityLabel",!0).attr("id",`${n}-name`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",(0,i.D7)().fontFamily).style("font-size",s+"px").text(r.attributeName),O={};O.tn=g,O.nn=m;const k=g.node().getBBox(),b=m.node().getBBox();if(d=Math.max(d,k.width),u=Math.max(u,b.width),o=Math.max(k.height,b.height),l){const e=void 0!==r.attributeKeyTypeList?r.attributeKeyTypeList.join(","):"",a=t.append("text").classed("er entityLabel",!0).attr("id",`${n}-key`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",(0,i.D7)().fontFamily).style("font-size",s+"px").text(e);O.kn=a;const c=a.node().getBBox();y=Math.max(y,c.width),o=Math.max(o,c.height)}if(h){const e=t.append("text").classed("er entityLabel",!0).attr("id",`${n}-comment`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",(0,i.D7)().fontFamily).style("font-size",s+"px").text(r.attributeComment||"");O.cn=e;const a=e.node().getBBox();p=Math.max(p,a.width),o=Math.max(o,a.height)}O.height=o,c.push(O),_+=o+2*a,f+=1}));let E=4;l&&(E+=2),h&&(E+=2);const g=d+u+y+p,m={width:Math.max(I.minEntityWidth,Math.max(o.width+2*I.entityPadding,g+n*E)),height:r.length>0?_:Math.max(I.minEntityHeight,o.height+2*I.entityPadding)};if(r.length>0){const r=Math.max(0,(m.width-g-n*E)/(E/2));e.attr("transform","translate("+m.width/2+","+(a+o.height/2)+")");let i=o.height+2*a,s="attributeBoxOdd";c.forEach((e=>{const o=i+a+e.height/2;e.tn.attr("transform","translate("+n+","+o+")");const c=t.insert("rect","#"+e.tn.node().id).classed(`er ${s}`,!0).attr("x",0).attr("y",i).attr("width",d+2*n+r).attr("height",e.height+2*a),_=parseFloat(c.attr("x"))+parseFloat(c.attr("width"));e.nn.attr("transform","translate("+(_+n)+","+o+")");const f=t.insert("rect","#"+e.nn.node().id).classed(`er ${s}`,!0).attr("x",_).attr("y",i).attr("width",u+2*n+r).attr("height",e.height+2*a);let E=parseFloat(f.attr("x"))+parseFloat(f.attr("width"));if(l){e.kn.attr("transform","translate("+(E+n)+","+o+")");const c=t.insert("rect","#"+e.kn.node().id).classed(`er ${s}`,!0).attr("x",E).attr("y",i).attr("width",y+2*n+r).attr("height",e.height+2*a);E=parseFloat(c.attr("x"))+parseFloat(c.attr("width"))}h&&(e.cn.attr("transform","translate("+(E+n)+","+o+")"),t.insert("rect","#"+e.cn.node().id).classed(`er ${s}`,"true").attr("x",E).attr("y",i).attr("width",p+2*n+r).attr("height",e.height+2*a)),i+=e.height+2*a,s="attributeBoxOdd"===s?"attributeBoxEven":"attributeBoxOdd"}))}else m.height=Math.max(I.minEntityHeight,_),e.attr("transform","translate("+m.width/2+","+m.height/2+")");return m}),"drawAttributes"),L=(0,i.K2)((function(t,e,r){let a;return[...e.keys()].forEach((function(n){const s=F(n,"entity");D.set(n,s);const o=t.append("g").attr("id",s);a=void 0===a?s:a;const c="text-"+s,l=o.append("text").classed("er entityLabel",!0).attr("id",c).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","middle").style("font-family",(0,i.D7)().fontFamily).style("font-size",I.fontSize+"px").text(e.get(n).alias??n),{width:h,height:d}=v(o,l,e.get(n).attributes),u=o.insert("rect","#"+c).classed("er entityBox",!0).attr("x",0).attr("y",0).attr("width",h).attr("height",d).node().getBBox();r.setNode(s,{width:u.width,height:u.height,shape:"rect",id:s})})),a}),"drawEntities"),$=(0,i.K2)((function(t,e){e.nodes().forEach((function(r){void 0!==r&&void 0!==e.node(r)&&t.select("#"+r).attr("transform","translate("+(e.node(r).x-e.node(r).width/2)+","+(e.node(r).y-e.node(r).height/2)+" )")}))}),"adjustEntities"),K=(0,i.K2)((function(t){return(t.entityA+t.roleA+t.entityB).replace(/\s/g,"")}),"getEdgeName"),C=(0,i.K2)((function(t,e){return t.forEach((function(t){e.setEdge(D.get(t.entityA),D.get(t.entityB),{relationship:t},K(t))})),t}),"addRelationships"),B=0,P=(0,i.K2)((function(t,e,r,a,n){B++;const o=r.edge(D.get(e.entityA),D.get(e.entityB),K(e)),c=(0,s.n8j)().x((function(t){return t.x})).y((function(t){return t.y})).curve(s.qrM),l=t.insert("path","#"+a).classed("er relationshipLine",!0).attr("d",c(o.points)).style("stroke",I.stroke).style("fill","none");e.relSpec.relType===n.db.Identification.NON_IDENTIFYING&&l.attr("stroke-dasharray","8,8");let h="";switch(I.arrowMarkerAbsolute&&(h=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,h=h.replace(/\(/g,"\\("),h=h.replace(/\)/g,"\\)")),e.relSpec.cardA){case n.db.Cardinality.ZERO_OR_ONE:l.attr("marker-end","url("+h+"#"+M.ERMarkers.ZERO_OR_ONE_END+")");break;case n.db.Cardinality.ZERO_OR_MORE:l.attr("marker-end","url("+h+"#"+M.ERMarkers.ZERO_OR_MORE_END+")");break;case n.db.Cardinality.ONE_OR_MORE:l.attr("marker-end","url("+h+"#"+M.ERMarkers.ONE_OR_MORE_END+")");break;case n.db.Cardinality.ONLY_ONE:l.attr("marker-end","url("+h+"#"+M.ERMarkers.ONLY_ONE_END+")");break;case n.db.Cardinality.MD_PARENT:l.attr("marker-end","url("+h+"#"+M.ERMarkers.MD_PARENT_END+")")}switch(e.relSpec.cardB){case n.db.Cardinality.ZERO_OR_ONE:l.attr("marker-start","url("+h+"#"+M.ERMarkers.ZERO_OR_ONE_START+")");break;case n.db.Cardinality.ZERO_OR_MORE:l.attr("marker-start","url("+h+"#"+M.ERMarkers.ZERO_OR_MORE_START+")");break;case n.db.Cardinality.ONE_OR_MORE:l.attr("marker-start","url("+h+"#"+M.ERMarkers.ONE_OR_MORE_START+")");break;case n.db.Cardinality.ONLY_ONE:l.attr("marker-start","url("+h+"#"+M.ERMarkers.ONLY_ONE_START+")");break;case n.db.Cardinality.MD_PARENT:l.attr("marker-start","url("+h+"#"+M.ERMarkers.MD_PARENT_START+")")}const d=l.node().getTotalLength(),u=l.node().getPointAtLength(.5*d),y="rel"+B,p=e.roleA.split(/
    /g),_=t.append("text").classed("er relationshipLabel",!0).attr("id",y).attr("x",u.x).attr("y",u.y).style("text-anchor","middle").style("dominant-baseline","middle").style("font-family",(0,i.D7)().fontFamily).style("font-size",I.fontSize+"px");if(1==p.length)_.text(e.roleA);else{const t=.5*-(p.length-1);p.forEach(((e,r)=>{_.append("tspan").attr("x",u.x).attr("dy",`${0===r?t:1}em`).text(e)}))}const f=_.node().getBBox();t.insert("rect","#"+y).classed("er relationshipLabelBox",!0).attr("x",u.x-f.width/2).attr("y",u.y-f.height/2).attr("width",f.width).attr("height",f.height)}),"drawRelationshipFromLayout"),Y=(0,i.K2)((function(t,e,r,c){I=(0,i.D7)().er,i.Rm.info("Drawing ER diagram");const l=(0,i.D7)().securityLevel;let h;"sandbox"===l&&(h=(0,s.Ltv)("#i"+e));const d=("sandbox"===l?(0,s.Ltv)(h.nodes()[0].contentDocument.body):(0,s.Ltv)("body")).select(`[id='${e}']`);let u;M.insertMarkers(d,I),u=new n.T({multigraph:!0,directed:!0,compound:!1}).setGraph({rankdir:I.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel((function(){return{}}));const y=L(d,c.db.getEntities(),u),p=C(c.db.getRelationships(),u);(0,o.Zp)(u),$(d,u),p.forEach((function(t){P(d,t,u,y,c)}));const _=I.diagramPadding;a._K.insertTitle(d,"entityTitleText",I.titleTopMargin,c.db.getDiagramTitle());const f=d.node().getBBox(),E=f.width+2*_,g=f.height+2*_;(0,i.a$)(d,g,E,I.useMaxWidth),d.attr("viewBox",`${f.x-_} ${f.y-_} ${E} ${g}`)}),"draw"),Z="28e9f9db-3c8d-5aa5-9faf-44286ae5937c";function F(t="",e=""){const r=t.replace(w,"");return`${z(e)}${z(r)}${_(t,Z)}`}function z(t=""){return t.length>0?`${t}-`:""}(0,i.K2)(F,"generateId"),(0,i.K2)(z,"strWithHyphen");var W={parser:E,db:T,renderer:{setConf:S,draw:Y},styles:(0,i.K2)((t=>`\n .entityBox {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n }\n\n .attributeBoxOdd {\n fill: ${t.attributeBackgroundColorOdd};\n stroke: ${t.nodeBorder};\n }\n\n .attributeBoxEven {\n fill: ${t.attributeBackgroundColorEven};\n stroke: ${t.nodeBorder};\n }\n\n .relationshipLabelBox {\n fill: ${t.tertiaryColor};\n opacity: 0.7;\n background-color: ${t.tertiaryColor};\n rect {\n opacity: 0.5;\n }\n }\n\n .relationshipLine {\n stroke: ${t.lineColor};\n }\n\n .entityTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n } \n #MD_PARENT_START {\n fill: #f5f5f5 !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n }\n #MD_PARENT_END {\n fill: #f5f5f5 !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n }\n \n`),"getStyles")}}}]); \ No newline at end of file diff --git a/assets/js/437b4e16.0ac0d2b6.js b/assets/js/437b4e16.0ac0d2b6.js deleted file mode 100644 index 31fb26326060..000000000000 --- a/assets/js/437b4e16.0ac0d2b6.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8647],{20718:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>o,contentTitle:()=>t,default:()=>c,frontMatter:()=>i,metadata:()=>a,toc:()=>l});var s=r(74848),d=r(28453);const i={id:"snowbridge-dashboards",title:"Snowbridge on BridgeHub",sidebar_label:"Snowbridge",description:"Snowbridge is a general-purpose, trustless, and decentralized bridge that connects Polkadot and Ethereum.",keywords:["polkadot","ethereum","dashboard","dune","snowbridge"],slug:"../snowbridge-dashboards"},t="Snowbridge Dashboards",a={id:"general/dune-analytics/parachain-dashboards/snowbridge-dashboards",title:"Snowbridge on BridgeHub",description:"Snowbridge is a general-purpose, trustless, and decentralized bridge that connects Polkadot and Ethereum.",source:"@site/../docs/general/dune-analytics/parachain-dashboards/snowbridge-dashboards.md",sourceDirName:"general/dune-analytics/parachain-dashboards",slug:"/general/dune-analytics/snowbridge-dashboards",permalink:"/docs/general/dune-analytics/snowbridge-dashboards",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/parachain-dashboards/snowbridge-dashboards.md",tags:[],version:"current",lastUpdatedBy:"MK",lastUpdatedAt:1719215716e3,frontMatter:{id:"snowbridge-dashboards",title:"Snowbridge on BridgeHub",sidebar_label:"Snowbridge",description:"Snowbridge is a general-purpose, trustless, and decentralized bridge that connects Polkadot and Ethereum.",keywords:["polkadot","ethereum","dashboard","dune","snowbridge"],slug:"../snowbridge-dashboards"},sidebar:"docs",previous:{title:"Polimec",permalink:"/docs/general/dune-analytics/polimec-dashboards"},next:{title:"Stellaswap (Moonbeam)",permalink:"/docs/general/dune-analytics/stellaswap-dashboards"}},o={},l=[{value:"Overview",id:"overview",level:2},{value:"Featured Dashboards on Dune",id:"featured-dashboards-on-dune",level:2},{value:"Key Tables",id:"key-tables",level:2},{value:"Useful Queries",id:"useful-queries",level:2},{value:"Getting Started with Queries",id:"getting-started-with-queries",level:2}];function h(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,d.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"snowbridge-dashboards",children:"Snowbridge Dashboards"})}),"\n",(0,s.jsx)(n.h2,{id:"overview",children:"Overview"}),"\n",(0,s.jsx)(n.p,{children:"Snowbridge is a general-purpose, trustless, and decentralized bridge that connects Polkadot and\nEthereum. This bridge facilitates communication between any Polkadot parachain and Ethereum using\nPolkadot's XCMP messaging protocol. Parachains can send XCM instructions to BridgeHub, leveraging\nSnowbridge for cross-chain interactions."}),"\n",(0,s.jsxs)(n.p,{children:["For more details on bridging with Kusama, please refer to our\n",(0,s.jsx)(n.a,{href:"https://dune.com/substrate/bridgehub",children:"BridgeHub Dashboard"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"featured-dashboards-on-dune",children:"Featured Dashboards on Dune"}),"\n",(0,s.jsx)(n.p,{children:"Here you will find a variety of dashboards that help visualize data from the Snowbridge protocol:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"https://dune.com/substrate/snowbridge",children:"Snowbridge"}),": A comprehensive analysis of Snowbridge,\nincluding: Ethereum Related On Chain Data Analysis, Analysis of Messages with Ethereum."]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"key-tables",children:"Key Tables"}),"\n",(0,s.jsx)(n.p,{children:"Data from the Snowbridge protocol is organized into several key tables:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"bridgehub.balances"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"bridgehub.blocks"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"bridgehub.calls"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"bridgehub.events"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"bridgehub.extrinsics"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"bridgehub.transfers"})}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["Start building your own queries using granular data on Dune\n",(0,s.jsx)(n.a,{href:"https://dune.com/queries?category=canonical&namespace=bridgehub",children:"here"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"useful-queries",children:"Useful Queries"}),"\n",(0,s.jsx)(n.p,{children:"Some useful queries for Snowbridge are provided:"}),"\n",(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Title"}),(0,s.jsx)(n.th,{children:"Query"}),(0,s.jsx)(n.th,{children:"Description"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Snowbridge Tokensent"}),(0,s.jsx)(n.td,{children:(0,s.jsx)(n.a,{href:"https://dune.com/queries/3828274",children:"query_3828274"})}),(0,s.jsx)(n.td,{children:"Monitoring Tokensent from Snowbridge's gateway contract on Ethereum to Polkadot BridgeHub"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Polkadot AssetHub ForeignAsset Mint & Burn"}),(0,s.jsx)(n.td,{children:(0,s.jsx)(n.a,{href:"https://dune.com/queries/3828126",children:"query_3828126"})}),(0,s.jsx)(n.td,{children:"Monitoring ForeignAsset Mint & Burn"})]})]})]}),"\n",(0,s.jsx)(n.h2,{id:"getting-started-with-queries",children:"Getting Started with Queries"}),"\n",(0,s.jsx)(n.p,{children:"To get started with querying data from Snowbridge, you are welcome to use the mentioned materialized\nqueries. You can use the following DuneSQL queries as examples:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-sql",metastring:'title="Polkadot BridgeHub Outbound Msg Sent To Ethereum" showLineNumbers',children:"SELECT DISTINCT\n block_time,\n block_number,\n block_hash,\n extrinsic_id,\n extrinsic_hash,\n event_id,\n section,\n method,\n CAST(JSON_VALUE(data, 'strict $[0]') AS VARCHAR) AS message_id,\n CAST(JSON_VALUE(data, 'strict $[1]') AS uint256) AS nonce\nFROM\n bridgehub.events\nWHERE\n section = 'ethereumOutboundQueue'\n AND method = 'MessageAccepted';\n"})}),"\n",(0,s.jsx)(n.p,{children:"Query result:"}),"\n",(0,s.jsx)("iframe",{src:"https://dune.com/embeds/3831797/6444701",height:"350",width:"100%"}),"\n",(0,s.jsx)(n.admonition,{title:"DuneSQL Reference",type:"info",children:(0,s.jsxs)(n.p,{children:["For more information on DuneSQL, please refer to the ",(0,s.jsx)(n.a,{href:"/docs/general/dunesql-cheatsheet",children:"DuneSQL Cheatsheet"}),"\nand\n",(0,s.jsx)(n.a,{href:"https://docs.dune.com/query-engine/Functions-and-operators/index",children:"DuneSQL Official Documentation"}),"."]})})]})}function c(e={}){const{wrapper:n}={...(0,d.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}},28453:(e,n,r)=>{r.d(n,{R:()=>t,x:()=>a});var s=r(96540);const d={},i=s.createContext(d);function t(e){const n=s.useContext(i);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(d):e.components||d:t(e.components),s.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/437b4e16.ab59f5c6.js b/assets/js/437b4e16.ab59f5c6.js new file mode 100644 index 000000000000..fa5c1c74b497 --- /dev/null +++ b/assets/js/437b4e16.ab59f5c6.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8647],{37328:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>o,contentTitle:()=>a,default:()=>h,frontMatter:()=>t,metadata:()=>s,toc:()=>l});const s=JSON.parse('{"id":"general/dune-analytics/parachain-dashboards/snowbridge-dashboards","title":"Snowbridge on BridgeHub","description":"Snowbridge is a general-purpose, trustless, and decentralized bridge that connects Polkadot and Ethereum.","source":"@site/../docs/general/dune-analytics/parachain-dashboards/snowbridge-dashboards.md","sourceDirName":"general/dune-analytics/parachain-dashboards","slug":"/general/dune-analytics/snowbridge-dashboards","permalink":"/docs/general/dune-analytics/snowbridge-dashboards","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/parachain-dashboards/snowbridge-dashboards.md","tags":[],"version":"current","lastUpdatedBy":"MK","lastUpdatedAt":1719215716000,"frontMatter":{"id":"snowbridge-dashboards","title":"Snowbridge on BridgeHub","sidebar_label":"Snowbridge","description":"Snowbridge is a general-purpose, trustless, and decentralized bridge that connects Polkadot and Ethereum.","keywords":["polkadot","ethereum","dashboard","dune","snowbridge"],"slug":"../snowbridge-dashboards"},"sidebar":"docs","previous":{"title":"Polimec","permalink":"/docs/general/dune-analytics/polimec-dashboards"},"next":{"title":"Stellaswap (Moonbeam)","permalink":"/docs/general/dune-analytics/stellaswap-dashboards"}}');var d=r(74848),i=r(28453);const t={id:"snowbridge-dashboards",title:"Snowbridge on BridgeHub",sidebar_label:"Snowbridge",description:"Snowbridge is a general-purpose, trustless, and decentralized bridge that connects Polkadot and Ethereum.",keywords:["polkadot","ethereum","dashboard","dune","snowbridge"],slug:"../snowbridge-dashboards"},a="Snowbridge Dashboards",o={},l=[{value:"Overview",id:"overview",level:2},{value:"Featured Dashboards on Dune",id:"featured-dashboards-on-dune",level:2},{value:"Key Tables",id:"key-tables",level:2},{value:"Useful Queries",id:"useful-queries",level:2},{value:"Getting Started with Queries",id:"getting-started-with-queries",level:2}];function c(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,i.R)(),...e.components};return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(n.header,{children:(0,d.jsx)(n.h1,{id:"snowbridge-dashboards",children:"Snowbridge Dashboards"})}),"\n",(0,d.jsx)(n.h2,{id:"overview",children:"Overview"}),"\n",(0,d.jsx)(n.p,{children:"Snowbridge is a general-purpose, trustless, and decentralized bridge that connects Polkadot and\nEthereum. This bridge facilitates communication between any Polkadot parachain and Ethereum using\nPolkadot's XCMP messaging protocol. Parachains can send XCM instructions to BridgeHub, leveraging\nSnowbridge for cross-chain interactions."}),"\n",(0,d.jsxs)(n.p,{children:["For more details on bridging with Kusama, please refer to our\n",(0,d.jsx)(n.a,{href:"https://dune.com/substrate/bridgehub",children:"BridgeHub Dashboard"}),"."]}),"\n",(0,d.jsx)(n.h2,{id:"featured-dashboards-on-dune",children:"Featured Dashboards on Dune"}),"\n",(0,d.jsx)(n.p,{children:"Here you will find a variety of dashboards that help visualize data from the Snowbridge protocol:"}),"\n",(0,d.jsxs)(n.ul,{children:["\n",(0,d.jsxs)(n.li,{children:[(0,d.jsx)(n.a,{href:"https://dune.com/substrate/snowbridge",children:"Snowbridge"}),": A comprehensive analysis of Snowbridge,\nincluding: Ethereum Related On Chain Data Analysis, Analysis of Messages with Ethereum."]}),"\n"]}),"\n",(0,d.jsx)(n.h2,{id:"key-tables",children:"Key Tables"}),"\n",(0,d.jsx)(n.p,{children:"Data from the Snowbridge protocol is organized into several key tables:"}),"\n",(0,d.jsxs)(n.ul,{children:["\n",(0,d.jsx)(n.li,{children:(0,d.jsx)(n.code,{children:"bridgehub.balances"})}),"\n",(0,d.jsx)(n.li,{children:(0,d.jsx)(n.code,{children:"bridgehub.blocks"})}),"\n",(0,d.jsx)(n.li,{children:(0,d.jsx)(n.code,{children:"bridgehub.calls"})}),"\n",(0,d.jsx)(n.li,{children:(0,d.jsx)(n.code,{children:"bridgehub.events"})}),"\n",(0,d.jsx)(n.li,{children:(0,d.jsx)(n.code,{children:"bridgehub.extrinsics"})}),"\n",(0,d.jsx)(n.li,{children:(0,d.jsx)(n.code,{children:"bridgehub.transfers"})}),"\n"]}),"\n",(0,d.jsxs)(n.p,{children:["Start building your own queries using granular data on Dune\n",(0,d.jsx)(n.a,{href:"https://dune.com/queries?category=canonical&namespace=bridgehub",children:"here"}),"."]}),"\n",(0,d.jsx)(n.h2,{id:"useful-queries",children:"Useful Queries"}),"\n",(0,d.jsx)(n.p,{children:"Some useful queries for Snowbridge are provided:"}),"\n",(0,d.jsxs)(n.table,{children:[(0,d.jsx)(n.thead,{children:(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.th,{children:"Title"}),(0,d.jsx)(n.th,{children:"Query"}),(0,d.jsx)(n.th,{children:"Description"})]})}),(0,d.jsxs)(n.tbody,{children:[(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:"Snowbridge Tokensent"}),(0,d.jsx)(n.td,{children:(0,d.jsx)(n.a,{href:"https://dune.com/queries/3828274",children:"query_3828274"})}),(0,d.jsx)(n.td,{children:"Monitoring Tokensent from Snowbridge's gateway contract on Ethereum to Polkadot BridgeHub"})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:"Polkadot AssetHub ForeignAsset Mint & Burn"}),(0,d.jsx)(n.td,{children:(0,d.jsx)(n.a,{href:"https://dune.com/queries/3828126",children:"query_3828126"})}),(0,d.jsx)(n.td,{children:"Monitoring ForeignAsset Mint & Burn"})]})]})]}),"\n",(0,d.jsx)(n.h2,{id:"getting-started-with-queries",children:"Getting Started with Queries"}),"\n",(0,d.jsx)(n.p,{children:"To get started with querying data from Snowbridge, you are welcome to use the mentioned materialized\nqueries. You can use the following DuneSQL queries as examples:"}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-sql",metastring:'title="Polkadot BridgeHub Outbound Msg Sent To Ethereum" showLineNumbers',children:"SELECT DISTINCT\n block_time,\n block_number,\n block_hash,\n extrinsic_id,\n extrinsic_hash,\n event_id,\n section,\n method,\n CAST(JSON_VALUE(data, 'strict $[0]') AS VARCHAR) AS message_id,\n CAST(JSON_VALUE(data, 'strict $[1]') AS uint256) AS nonce\nFROM\n bridgehub.events\nWHERE\n section = 'ethereumOutboundQueue'\n AND method = 'MessageAccepted';\n"})}),"\n",(0,d.jsx)(n.p,{children:"Query result:"}),"\n",(0,d.jsx)("iframe",{src:"https://dune.com/embeds/3831797/6444701",height:"350",width:"100%"}),"\n",(0,d.jsx)(n.admonition,{title:"DuneSQL Reference",type:"info",children:(0,d.jsxs)(n.p,{children:["For more information on DuneSQL, please refer to the ",(0,d.jsx)(n.a,{href:"/docs/general/dunesql-cheatsheet",children:"DuneSQL Cheatsheet"}),"\nand\n",(0,d.jsx)(n.a,{href:"https://docs.dune.com/query-engine/Functions-and-operators/index",children:"DuneSQL Official Documentation"}),"."]})})]})}function h(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,d.jsx)(n,{...e,children:(0,d.jsx)(c,{...e})}):c(e)}},28453:(e,n,r)=>{r.d(n,{R:()=>t,x:()=>a});var s=r(96540);const d={},i=s.createContext(d);function t(e){const n=s.useContext(i);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(d):e.components||d:t(e.components),s.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/43ee4f22.0d19807b.js b/assets/js/43ee4f22.0d19807b.js deleted file mode 100644 index a0d49afa2891..000000000000 --- a/assets/js/43ee4f22.0d19807b.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[876],{36403:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>h,frontMatter:()=>r,metadata:()=>s,toc:()=>c});var a=n(74848),i=n(28453);n(11470),n(19365);const r={id:"build-guide",title:"Polkadot Developer Portal",sidebar_label:"Polkadot Developer Portal",description:"Start building with Polkadot/Kusama.",keywords:["build","how to build","develop","parachain","smart contract"],slug:"../build-guide"},o=void 0,s={id:"build/build-guide",title:"Polkadot Developer Portal",description:"Start building with Polkadot/Kusama.",source:"@site/../docs/build/build-guide.md",sourceDirName:"build",slug:"/build-guide",permalink:"/docs/build-guide",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/build/build-guide.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1727943421e3,frontMatter:{id:"build-guide",title:"Polkadot Developer Portal",sidebar_label:"Polkadot Developer Portal",description:"Start building with Polkadot/Kusama.",keywords:["build","how to build","develop","parachain","smart contract"],slug:"../build-guide"},sidebar:"docs",previous:{title:"Parachain Crowdloans",permalink:"/docs/learn/learn-crowdloans"},next:{title:"Development Networks",permalink:"/docs/build-network-overview"}},l={},c=[{value:"Development Ecosystem Overview",id:"development-ecosystem-overview",level:2},{value:"Building Parachains",id:"building-parachains",level:2},{value:"Polkadot SDK Overview",id:"polkadot-sdk-overview",level:3},{value:"Building Parachains with Cumulus",id:"building-parachains-with-cumulus",level:4},{value:"Parachains Benefits",id:"parachains-benefits",level:4},{value:"Building a Pallet",id:"building-a-pallet",level:3},{value:"Developing Smart Contracts",id:"developing-smart-contracts",level:2},{value:"ink! and EVM-based Smart Contracts",id:"ink-and-evm-based-smart-contracts",level:3},{value:"Developing a dApp",id:"developing-a-dapp",level:2},{value:"Resources",id:"resources",level:2}];function d(e){const t={a:"a",admonition:"admonition",em:"em",h2:"h2",h3:"h3",h4:"h4",img:"img",li:"li",mermaid:"mermaid",ol:"ol",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,i.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(t.p,{children:["Polkadot is a blockchain network protocol that provides ",(0,a.jsx)(t.strong,{children:"shared security"})," among all connected\nparachains and allowing all connected tasks to ",(0,a.jsx)(t.strong,{children:"interoperate"})," by using\n",(0,a.jsx)(t.a,{href:"/docs/learn-xcm",children:"XCM"}),"."]}),"\n",(0,a.jsxs)(t.p,{children:["With the ",(0,a.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk",children:"Polkadot SDK"})," and\n",(0,a.jsx)(t.a,{href:"/docs/learn-agile-coretime",children:"Agile Coretime"}),", the time it takes to develop and launch a new\nchain has dropped significantly. Depending on your goals, it may only take weeks or even days."]}),"\n",(0,a.jsx)(t.p,{children:"This starters guide will walk you through the steps you can take today to get started building your\nvision with Polkadot. It will also point to resources you can use to start building immediately."}),"\n",(0,a.jsx)(t.admonition,{title:"For Developers!",type:"note",children:(0,a.jsxs)(t.p,{children:["Please note that the following documentation is more geared towards developers. If you are looking\nfor more general knowledge related to Polkadot, be sure to check out the\n",(0,a.jsx)(t.a,{href:"../docs/learn-index",children:"Learn"})," section."]})}),"\n",(0,a.jsxs)(t.p,{children:["This build guide covers three different areas, taking a ",(0,a.jsx)(t.strong,{children:"top-down"})," approach from protocol\ndevelopment to user-facing applications:"]}),"\n",(0,a.jsxs)(t.ol,{children:["\n",(0,a.jsx)(t.li,{children:(0,a.jsx)(t.a,{href:"#building-parachains",children:"Runtime Development - Developing parachains/blockchains"})}),"\n",(0,a.jsx)(t.li,{children:(0,a.jsx)(t.a,{href:"#developing-smart-contracts",children:"Smart Contract Development - How Polkadot handles smart contracts"})}),"\n",(0,a.jsx)(t.li,{children:(0,a.jsx)(t.a,{href:"#developing-a-dapp",children:"dApp Development - The tools available for dApp development on Polkadot"})}),"\n"]}),"\n",(0,a.jsx)(t.admonition,{title:"Keep reading to find out more, or explore each respective area",type:"tip",children:(0,a.jsxs)(t.p,{children:["Keep in mind that these areas are merely suggestive, and there are many ways to utilize Polkadot,\nSubstrate, and their various developmental components. For more inspiration, look at the\n",(0,a.jsx)(t.a,{href:"/docs/build-open-source",children:"open source projects"})," featured here in the wiki!"]})}),"\n",(0,a.jsx)(t.h2,{id:"development-ecosystem-overview",children:"Development Ecosystem Overview"}),"\n",(0,a.jsx)(t.mermaid,{value:"%%{\n init: {\n 'theme': 'base',\n 'themeVariables': {\n 'fontFamily': 'Unbounded',\n 'primaryColor': '#E6007A',\n 'fontSize': '16px',\n 'primaryTextColor': '#fff',\n 'primaryBorderColor': '#7C0000',\n 'lineColor': '#140523',\n 'secondaryColor': '#552BBF',\n 'tertiaryColor': '#fff'\n }\n }\n}%%\nflowchart TB\n subgraph PL [\"Protocol Land (Parachains, Smart Contracts)\"]\n\n subgraph SCD [\"Smart Contract Development\"]\n direction LR\n SC[\"Use Smart Contract Parachain\"]\n SC --\x3e ink!\n SC --\x3e Solidity\n end\n\n subgraph PSL [\"Blockchain Development\"]\n direction LR\n PS[\"Polkadot SDK\"] --\x3e R[WASM Runtime - Substrate & FRAME]\n R --\x3eParachain[\"Parachain/Task\"]--\x3eSSC[\"Shared Security - Cumulus\"]\n R --\x3eSoloChain[Solo Chain]--\x3eNSS[\"No Shared Security\"]\n end\n end\n\n PL--\x3e| Develop apps| CS\n\n subgraph CS [\"Client/User Land (dApps/uApps)\"]\n LC[\"Light Clients (Smoldot)\"]\n UA[uApp]\n ReDot[Reactive DOT]\n UA --\x3e PAPI[Polkadot-API]\n UA --\x3e ReDot\n ReDot --\x3e PAPI[Polkadot API]\n UA --\x3e PJS[Polkadot JS]\n UA --\x3e SubXT\n PAPI --\x3e LC\n PJS --\x3e LC\n SubXT --\x3e LC\n end"}),"\n",(0,a.jsxs)(t.p,{children:["Before diving into the various paths one can take in developing on Polkadot, it's essential to\nrealize and know key terms that make up the following sections. Even before considering what kind of\napplication you want to build, it's prudent to understand what Polkadot ",(0,a.jsx)(t.em,{children:"is"}),", and what each\ndevelopmental component can do for you within the Polkadot ecosystem."]}),"\n",(0,a.jsx)(t.p,{children:"Before diving into any one of these tracks, it is encouraged to read about Polkadot and its networks\nin order to gain context about the application you could make."}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.a,{href:"/docs/build-network-overview",children:"Take a look at the various development network options here."})}),"\n",(0,a.jsx)(t.h2,{id:"building-parachains",children:"Building Parachains"}),"\n",(0,a.jsxs)(t.p,{children:["Polkadot is canonically referred to as the relay chain. It is also considered a ",(0,a.jsx)(t.em,{children:"layer zero"}),"\nprotocol, as it enables the interoperability and shared security of multiple\n",(0,a.jsx)(t.a,{href:"/docs/learn-parachains",children:"parachains"}),", which are ",(0,a.jsx)(t.em,{children:"layer one"})," protocols. Parachains currently\nconnect to a relay chain using the ",(0,a.jsx)(t.a,{href:"/docs/learn-parachains-protocol",children:"Parachains Protocol"}),".\nMore elaborate (or simpler) tasks could be constructed in the future."]}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"build 1",src:n(74112).A+"",width:"1296",height:"907"})}),"\n",(0,a.jsx)(t.admonition,{type:"info",children:(0,a.jsxs)(t.p,{children:["Throughout this document, you may encounter the term ",(0,a.jsx)(t.strong,{children:"runtime"})," or ",(0,a.jsx)(t.strong,{children:"STF (State Transition\nFunction)"}),". Both refer to the same concept, as they define how a particular system, i.e., a\nblockchain, should deal with state changes externally and internally. Both of these terms are used\nextensively in Polkadot and Substrate."]})}),"\n",(0,a.jsxs)(t.p,{children:["Parachains built through the Polkadot SDK, open possibilities to construct complex ",(0,a.jsx)(t.strong,{children:"runtime"}),", or\n",(0,a.jsx)(t.strong,{children:"STF"})," (state transition function) the logic that would be too expensive to execute with smart\ncontracts. However, unlike smart contracts, parachains lack a mandatory gas metering system entirely\nand could potentially be vulnerable to bugs that cause infinite loops (something that is prevented\nby design in smart contracts). This vulnerability is mitigated by the\n",(0,a.jsx)(t.a,{href:"https://docs.substrate.io/build/tx-weights-fees/",children:"weight system"})," that is implemented in Substrate\n-- although it places more of a burden on the developer of the parachain to perform properly\nbenchmarks."]}),"\n",(0,a.jsx)(t.admonition,{title:"What is an on-demand parachain?",type:"info",children:(0,a.jsx)(t.p,{children:'On-demand parachains use a "pay-as-you-go" model enabled by Agile Coretime to interact with the\nrelay chain. On-demand parachains will only produce a block when needed, unlike full parachains,\nwhich have access to bulk coretime to produce a block at every block of the relay chain. When\nbuilding an on-demand parachain, you will use the same tools (like PDKs) and get all the benefits of\nbuilding a parachain without the cost drawback of purchasing bulk coretime.'})}),"\n",(0,a.jsx)(t.h3,{id:"polkadot-sdk-overview",children:"Polkadot SDK Overview"}),"\n",(0,a.jsxs)(t.p,{children:["Polkadot is built using the Polkadot SDK, which,\n",(0,a.jsx)(t.a,{href:"https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/polkadot_sdk/polkadot/index.html",children:"the Polkadot node/host implementation"}),",\nwithin contains the source code for:"]}),"\n",(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.strong,{children:"Substrate"})," - a set of core libraries used for constructing blockchains - mostly un-opinionated"]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.strong,{children:"FRAME"})," - the framework used to build Substrate runtimes - more opinionated"]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.strong,{children:"Cumulus"})," - parachain/task specific functions which allow for solo chains to become compatible\nwith Polkadot"]}),"\n"]}),"\n",(0,a.jsxs)(t.p,{children:[(0,a.jsx)(t.a,{href:"https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/polkadot_sdk/substrate/index.html",children:"Substrate"}),"\nis a highly configurable and dynamic framework for building blockchains. At a lower level, Substrate\nprovides a set of tools and libraries ranging from block production, finality gadgets to\npeer-to-peer networking. Both Polkadot and Kusama, as well as most parachains, are built using\nSubstrate."]}),"\n",(0,a.jsx)(t.p,{children:"In essence, Substrate can break down a blockchain's development process by providing crucial\nbuilding blocks of functionality, removing the need for re-engineering complex mechanisms that\nusually involved when developing a blockchain."}),"\n",(0,a.jsx)(t.p,{children:"Substrate can be used as a basis for a parachain to connect to a relay chain like Polkadot or\nKusama, or even as a basis to form a conventional layer one solo chain."}),"\n",(0,a.jsxs)(t.p,{children:["Currently, the most streamlined way of utilizing Substrate is through\n",(0,a.jsx)(t.a,{href:"https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/polkadot_sdk/frame_runtime/index.html",children:"FRAME"}),",\nwhich conveniently allows for a runtime/STF to be generated from a set of modules (called\n",(0,a.jsx)(t.a,{href:"https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/polkadot_sdk/frame_runtime/index.html#pallets",children:"pallets"}),").\nRuntimes in Substrate are built using ",(0,a.jsx)(t.a,{href:"/docs/learn-wasm",children:"WebAssembly"})," (Wasm), and represent\nthe state transition function for a network. FRAME provides a framework for\n",(0,a.jsx)(t.a,{href:"https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/polkadot_sdk/frame_runtime/index.html#pallets",children:"pallets"}),",\nto construct a runtime/STF and define how your task is supposed to behave. Ranging from\n",(0,a.jsx)(t.a,{href:"https://paritytech.github.io/substrate/master/pallet_identity/index.html",children:"identity"})," to\n",(0,a.jsx)(t.a,{href:"https://paritytech.github.io/substrate/master/pallet_contracts/index.html",children:"smart contracts"}),",\npallets can be quite extensive in providing on-chain functionality."]}),"\n",(0,a.jsxs)(t.p,{children:["Even though FRAME is heavily used, it is not the only way to create a valid runtime/STF using\nSubstrate. Substrate can be used to create new paradigms and abstractions. One such example is the\n",(0,a.jsx)(t.a,{href:"https://github.com/open-web3-stack/open-runtime-module-library",children:"Open Runtime Module Library (ORML)"}),",\nwhich is another way of creating and using runtime modules."]}),"\n",(0,a.jsxs)(t.admonition,{type:"note",children:[(0,a.jsxs)(t.p,{children:["Although most parachains utilize FRAME and Substrate to build runtime/STFs for connecting to the\nrelay chain, it is not contingent. Building a parachain using other tools is possible if they follow\nthe ",(0,a.jsx)(t.a,{href:"/docs/learn-parachains-protocol",children:"Parachains Protocol"}),"."]}),(0,a.jsx)(t.p,{children:"As a general rule of thumb, Substrate provides the means for this to become possible through\ncomparably minimal effort."})]}),"\n",(0,a.jsx)(t.h4,{id:"building-parachains-with-cumulus",children:"Building Parachains with Cumulus"}),"\n",(0,a.jsxs)(t.p,{children:[(0,a.jsx)(t.a,{href:"https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/polkadot_sdk/cumulus/index.html",children:"Cumulus"}),"\nis a set of tools that allows you to convert a blockchain developed using Substrate and FRAME into a\nPolkadot-compatible Parachain. More specifically, it provides libraries for all of the necessary\nparts of the Polkadot protocol necessary for Parachains to work, for example:"]}),"\n",(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsx)(t.li,{children:"Creating new parachain blocks via Collators"}),"\n",(0,a.jsx)(t.li,{children:"Listening to the relay chain for updates"}),"\n",(0,a.jsx)(t.li,{children:"Synchronizing upgrades between the parachain and relay chain"}),"\n"]}),"\n",(0,a.jsx)(t.p,{children:"For most developers, the best place to start is to get familiar with Substrate independently,\nfollowed by FRAME, with Cumulus as the final step to understanding the entire parachain building\nprocess. This way, one can view how various paradigms are applied and decide on integrating or\nutilizing Substrate for their particular use case."}),"\n",(0,a.jsxs)(t.p,{children:["Please see ",(0,a.jsx)(t.a,{href:"/docs/build-guides-coretime-start",children:"our guides on getting started with coretime"})," for how to\nget started on building and deploying a parachain."]}),"\n",(0,a.jsx)(t.h4,{id:"parachains-benefits",children:"Parachains Benefits"}),"\n",(0,a.jsx)(t.p,{children:"Parachains contain their own runtime/STF logic and benefit from the shared security and the\ncross-consensus messaging provided by the relay chain. Parachains permit high flexibility and\ncustomization but require more effort to create and maintain over time. A production-grade parachain\nis typically more involved to create due to the complexity involved in blockchain networks'\ntechnical and economic aspects."}),"\n",(0,a.jsx)(t.p,{children:"Parachains grant the creators more space to build the monetary system and other chain aspects from\nthe ground up. They will allow for a more concise and efficient execution of complex logic than a\nsmart contract platform could offer. Parachains also provide more flexibility in the form of\ngovernance and can perform complete upgrades in a less controversial way than the current process of\nhard forks."}),"\n",(0,a.jsx)(t.p,{children:"Some examples of features you can have on a parachain:"}),"\n",(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsx)(t.li,{children:"Custom fee structure (for example, pay a flat transaction fee or pay per byte)."}),"\n",(0,a.jsx)(t.li,{children:"Shared security and finalization via the relay chain (Polkadot or Kusama)."}),"\n",(0,a.jsx)(t.li,{children:"Custom monetary policy for the native token and local economy."}),"\n",(0,a.jsx)(t.li,{children:"Treasury to be funded through transitions in your state function."}),"\n",(0,a.jsx)(t.li,{children:"A governance mechanism that could manage a DAO that is responsible for allocating your on-chain\ntreasury."}),"\n"]}),"\n",(0,a.jsx)(t.h3,{id:"building-a-pallet",children:"Building a Pallet"}),"\n",(0,a.jsx)(t.p,{children:"While parachains are highly customizable, they are often complex to develop. If you wish to get\nfamiliar with FRAME and Substrate, a good place to start is by building a pallet in a development\nenvironment. A pallet is a fully customizable module that allows you to implement layer one logic\nwith relatively minimal development time on a fundamental level while still allowing the possibility\nof building advanced functionality into your custom chain."}),"\n",(0,a.jsx)(t.h2,{id:"developing-smart-contracts",children:"Developing Smart Contracts"}),"\n",(0,a.jsx)(t.p,{children:"Smart contracts are another option that enables an often simpler developer experience. Below is a\nquick comparison of how building a smart contract compares to building a parachain:"}),"\n",(0,a.jsxs)(t.table,{children:[(0,a.jsx)(t.thead,{children:(0,a.jsxs)(t.tr,{children:[(0,a.jsx)(t.th,{}),(0,a.jsx)(t.th,{children:"Parachains"}),(0,a.jsx)(t.th,{children:"Smart Contracts"})]})}),(0,a.jsxs)(t.tbody,{children:[(0,a.jsxs)(t.tr,{children:[(0,a.jsx)(t.td,{children:"Speed of Development"}),(0,a.jsx)(t.td,{children:"-"}),(0,a.jsx)(t.td,{children:"+"})]}),(0,a.jsxs)(t.tr,{children:[(0,a.jsx)(t.td,{children:"Ease of Deployment"}),(0,a.jsx)(t.td,{children:"-"}),(0,a.jsx)(t.td,{children:"+"})]}),(0,a.jsxs)(t.tr,{children:[(0,a.jsx)(t.td,{children:"Complexity of logic"}),(0,a.jsx)(t.td,{children:"+"}),(0,a.jsx)(t.td,{children:"-"})]}),(0,a.jsxs)(t.tr,{children:[(0,a.jsx)(t.td,{children:"Maintenance overhead"}),(0,a.jsx)(t.td,{children:"-"}),(0,a.jsx)(t.td,{children:"+"})]}),(0,a.jsxs)(t.tr,{children:[(0,a.jsx)(t.td,{children:"Level of customization"}),(0,a.jsx)(t.td,{children:"+"}),(0,a.jsx)(t.td,{children:"-"})]}),(0,a.jsxs)(t.tr,{children:[(0,a.jsx)(t.td,{children:"Strict resource control"}),(0,a.jsx)(t.td,{children:"-"}),(0,a.jsx)(t.td,{children:"+"})]}),(0,a.jsxs)(t.tr,{children:[(0,a.jsx)(t.td,{children:"Native chain features"}),(0,a.jsx)(t.td,{children:"+"}),(0,a.jsx)(t.td,{children:"-"})]}),(0,a.jsxs)(t.tr,{children:[(0,a.jsx)(t.td,{children:"Scalability"}),(0,a.jsx)(t.td,{children:"+"}),(0,a.jsx)(t.td,{children:"-"})]})]})]}),"\n",(0,a.jsxs)(t.admonition,{title:"What's the difference between a smart contract and a pallet?",type:"info",children:[(0,a.jsxs)(t.p,{children:["If you recall, a parachain comprises a runtime/STF usually built on Substrate. These runtime/STFs\noften utilize FRAME, which is subsequently made of pallets. Pallets are part of a Substrate\nruntime/STF, whereas smart contracts are a product of a pallet (see:\n",(0,a.jsx)(t.a,{href:"https://paritytech.github.io/substrate/master/pallet_contracts/index.html",children:"pallet_contracts"}),").\nPallets require more engineering and thought, as they can directly affect the chain's state."]}),(0,a.jsxs)(t.p,{children:["For a more comprehensive (and maintained) comparison, be sure to check out the\n",(0,a.jsx)(t.a,{href:"https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/reference_docs/runtime_vs_smart_contract/index.html",children:"comparison from the Polkadot SDK documentation"}),"."]})]}),"\n",(0,a.jsx)(t.h3,{id:"ink-and-evm-based-smart-contracts",children:"ink! and EVM-based Smart Contracts"}),"\n",(0,a.jsxs)(t.p,{children:["At a high level, a ",(0,a.jsx)(t.em,{children:"smart contract"})," is simply some code that exists at an address on a chain and is\ncallable by external actors. Whether it's ",(0,a.jsx)(t.a,{href:"https://polkadot-evm.github.io/frontier/",children:"EVM-based"})," or\nwritten using ",(0,a.jsx)(t.a,{href:"https://use.ink/",children:"ink!"}),", smart contracts are sandboxed, executable programs that live\non-chain."]}),"\n",(0,a.jsx)(t.admonition,{type:"note",children:(0,a.jsxs)(t.p,{children:[(0,a.jsx)(t.em,{children:"The Polkadot relay chain does not support smart contracts."})," However, several parachains do. See the\n",(0,a.jsx)(t.a,{href:"/docs/build-smart-contracts#parachains",children:"smart contracts guide"})," for the exact chains in which you can\ndeploy contracts on Polkadot."]})}),"\n",(0,a.jsxs)(t.p,{children:["A Polkadot-native choice for smart contracts is ",(0,a.jsx)(t.a,{href:"https://use.ink/",children:"ink!"}),". Other parachains that\noffer EVM-based contracts written in Solidity alongside ink!\n",(0,a.jsx)(t.a,{href:"./build-smart-contracts#parachains",children:"are also available"}),"."]}),"\n",(0,a.jsx)(t.p,{children:"Because smart contracts exist on a single chain at a time, they can have smooth interoperability\nwith other smart contracts on the same chain. However, they will always be constrained and limited\nby the inherent characteristics of their host chain."}),"\n",(0,a.jsxs)(t.p,{children:["As a developer, you will need to consider the storage and complexity of your smart contract to\nensure that gas usage stays within reasonable bounds. Consider using the listed options on the\n",(0,a.jsx)(t.a,{href:"/docs/build-storage",children:"decentralized storage"})," page to keep the data and submit only the content address\non the chain."]}),"\n",(0,a.jsx)(t.admonition,{title:"Building a smart contract",type:"info",children:(0,a.jsxs)(t.p,{children:["Please see the ",(0,a.jsx)(t.a,{href:"/docs/build-smart-contracts",children:"smart contracts guide"})," for how to get started on building\na smart contract."]})}),"\n",(0,a.jsx)(t.h2,{id:"developing-a-dapp",children:"Developing a dApp"}),"\n",(0,a.jsxs)(t.p,{children:["If one aims to develop a ",(0,a.jsx)(t.strong,{children:"dApp"})," (Decentralized App), the Polkadot ecosystem contains various SDKs\nto tap into the relay chain and parachains."]}),"\n",(0,a.jsx)(t.p,{children:"For front-end applications, several options exist for interfacing with Substrate-based chains\n(parachains, relay chains, etc.) and smart contracts. These often will interact with the RPC of a\nSubstrate node."}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.a,{href:"build-dapp",children:"Please visit the documentation for developing dApps and other general client-side development resources."})}),"\n",(0,a.jsxs)(t.p,{children:["For a complete list of tools, please take a look here:\n",(0,a.jsx)(t.a,{href:"/docs/build-open-source",children:"Tools, APIs, and Languages"})]}),"\n",(0,a.jsx)(t.h2,{id:"resources",children:"Resources"}),"\n",(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsx)(t.li,{children:(0,a.jsx)(t.a,{href:"https://polkadot-fellows.github.io/RFCs/approved/0001-agile-coretime.html",children:"Agile Coretime Fellowship RFC"})}),"\n",(0,a.jsx)(t.li,{children:(0,a.jsx)(t.a,{href:"/docs/learn-bridges",children:"Polkadot Bridges"})}),"\n",(0,a.jsx)(t.li,{children:(0,a.jsx)(t.a,{href:"https://polkadot.network/blog/the-path-of-a-parachain-block/",children:"The Path of a Parachain Block"})}),"\n",(0,a.jsx)(t.li,{children:(0,a.jsx)(t.a,{href:"/docs/learn-parachains-protocol",children:"The Path of a Parachain Block (Parachain Protocol page)"})}),"\n",(0,a.jsx)(t.li,{children:(0,a.jsx)(t.a,{href:"https://www.youtube.com/watch?v=fYc1yolanoE",children:"How to become a parachain on Polkadot (Video)"})}),"\n",(0,a.jsx)(t.li,{children:(0,a.jsx)(t.a,{href:"https://polkadot.network/blog/trusted-execution-environments-and-the-polkadot-ecosystem/",children:"Trusted Execution Environments and the Polkadot Ecosystem"})}),"\n"]})]})}function h(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,a.jsx)(t,{...e,children:(0,a.jsx)(d,{...e})}):d(e)}},19365:(e,t,n)=>{n.d(t,{A:()=>o});n(96540);var a=n(34164);const i={tabItem:"tabItem_Ymn6"};var r=n(74848);function o(e){var t=e.children,n=e.hidden,o=e.className;return(0,r.jsx)("div",{role:"tabpanel",className:(0,a.A)(i.tabItem,o),hidden:n,children:t})}},11470:(e,t,n)=>{n.d(t,{A:()=>j});var a=n(96540),i=n(34164),r=n(23104),o=n(56347),s=n(205),l=n(57485),c=n(31682),d=n(75376);function h(e){var t,n;return null!=(t=null==(n=a.Children.toArray(e).filter((function(e){return"\n"!==e})).map((function(e){if(!e||(0,a.isValidElement)(e)&&((t=e.props)&&"object"==typeof t&&"value"in t))return e;var t;throw new Error("Docusaurus error: Bad child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:n.filter(Boolean))?t:[]}function u(e){var t=e.values,n=e.children;return(0,a.useMemo)((function(){var e=null!=t?t:function(e){return h(e).map((function(e){var t=e.props;return{value:t.value,label:t.label,attributes:t.attributes,default:t.default}}))}(n);return function(e){var t=(0,c.XI)(e,(function(e,t){return e.value===t.value}));if(t.length>0)throw new Error('Docusaurus error: Duplicate values "'+t.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[t,n])}function p(e){var t=e.value;return e.tabValues.some((function(e){return e.value===t}))}function m(e){var t=e.queryString,n=void 0!==t&&t,i=e.groupId,r=(0,o.W6)(),s=function(e){var t=e.queryString,n=void 0!==t&&t,a=e.groupId;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=a?a:null}({queryString:n,groupId:i});return[(0,l.aZ)(s),(0,a.useCallback)((function(e){if(s){var t=new URLSearchParams(r.location.search);t.set(s,e),r.replace(Object.assign({},r.location,{search:t.toString()}))}}),[s,r])]}function f(e){var t,n,i,r,o=e.defaultValue,l=e.queryString,c=void 0!==l&&l,h=e.groupId,f=u(e),b=(0,a.useState)((function(){return function(e){var t,n=e.defaultValue,a=e.tabValues;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!p({value:n,tabValues:a}))throw new Error('Docusaurus error: The has a defaultValue "'+n+'" but none of its children has the corresponding value. Available values are: '+a.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return n}var i=null!=(t=a.find((function(e){return e.default})))?t:a[0];if(!i)throw new Error("Unexpected error: 0 tabValues");return i.value}({defaultValue:o,tabValues:f})})),g=b[0],x=b[1],v=m({queryString:c,groupId:h}),y=v[0],k=v[1],j=(t=function(e){return e?"docusaurus.tab."+e:null}({groupId:h}.groupId),n=(0,d.Dv)(t),i=n[0],r=n[1],[i,(0,a.useCallback)((function(e){t&&r.set(e)}),[t,r])]),w=j[0],P=j[1],S=function(){var e=null!=y?y:w;return p({value:e,tabValues:f})?e:null}();return(0,s.A)((function(){S&&x(S)}),[S]),{selectedValue:g,selectValue:(0,a.useCallback)((function(e){if(!p({value:e,tabValues:f}))throw new Error("Can't select invalid tab value="+e);x(e),k(e),P(e)}),[k,P,f]),tabValues:f}}var b=n(92303);const g={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var x=n(74848);function v(e){var t=e.className,n=e.block,a=e.selectedValue,o=e.selectValue,s=e.tabValues,l=[],c=(0,r.a_)().blockElementScrollPositionUntilNextRender,d=function(e){var t=e.currentTarget,n=l.indexOf(t),i=s[n].value;i!==a&&(c(t),o(i))},h=function(e){var t,n=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":var a,i=l.indexOf(e.currentTarget)+1;n=null!=(a=l[i])?a:l[0];break;case"ArrowLeft":var r,o=l.indexOf(e.currentTarget)-1;n=null!=(r=l[o])?r:l[l.length-1]}null==(t=n)||t.focus()};return(0,x.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,i.A)("tabs",{"tabs--block":n},t),children:s.map((function(e){var t=e.value,n=e.label,r=e.attributes;return(0,x.jsx)("li",Object.assign({role:"tab",tabIndex:a===t?0:-1,"aria-selected":a===t,ref:function(e){return l.push(e)},onKeyDown:h,onClick:d},r,{className:(0,i.A)("tabs__item",g.tabItem,null==r?void 0:r.className,{"tabs__item--active":a===t}),children:null!=n?n:t}),t)}))})}function y(e){var t=e.lazy,n=e.children,r=e.selectedValue,o=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){var s=o.find((function(e){return e.props.value===r}));return s?(0,a.cloneElement)(s,{className:(0,i.A)("margin-top--md",s.props.className)}):null}return(0,x.jsx)("div",{className:"margin-top--md",children:o.map((function(e,t){return(0,a.cloneElement)(e,{key:t,hidden:e.props.value!==r})}))})}function k(e){var t=f(e);return(0,x.jsxs)("div",{className:(0,i.A)("tabs-container",g.tabList),children:[(0,x.jsx)(v,Object.assign({},t,e)),(0,x.jsx)(y,Object.assign({},t,e))]})}function j(e){var t=(0,b.A)();return(0,x.jsx)(k,Object.assign({},e,{children:h(e.children)}),String(t))}},74112:(e,t,n)=>{n.d(t,{A:()=>a});const a=n.p+"assets/images/build-1-706b8858ef80594b1c9d2cd9c4ce0421.png"},28453:(e,t,n)=>{n.d(t,{R:()=>o,x:()=>s});var a=n(96540);const i={},r=a.createContext(i);function o(e){const t=a.useContext(r);return a.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function s(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:o(e.components),a.createElement(r.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/43ee4f22.ab095b5a.js b/assets/js/43ee4f22.ab095b5a.js new file mode 100644 index 000000000000..fd6ba536e79b --- /dev/null +++ b/assets/js/43ee4f22.ab095b5a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[876],{95536:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>s,default:()=>h,frontMatter:()=>o,metadata:()=>a,toc:()=>c});const a=JSON.parse('{"id":"build/build-guide","title":"Polkadot Developer Portal","description":"Start building with Polkadot/Kusama.","source":"@site/../docs/build/build-guide.md","sourceDirName":"build","slug":"/build-guide","permalink":"/docs/build-guide","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/build/build-guide.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1727943421000,"frontMatter":{"id":"build-guide","title":"Polkadot Developer Portal","sidebar_label":"Polkadot Developer Portal","description":"Start building with Polkadot/Kusama.","keywords":["build","how to build","develop","parachain","smart contract"],"slug":"../build-guide"},"sidebar":"docs","previous":{"title":"Parachain Crowdloans","permalink":"/docs/learn/learn-crowdloans"},"next":{"title":"Development Networks","permalink":"/docs/build-network-overview"}}');var i=n(74848),r=n(28453);n(11470),n(19365);const o={id:"build-guide",title:"Polkadot Developer Portal",sidebar_label:"Polkadot Developer Portal",description:"Start building with Polkadot/Kusama.",keywords:["build","how to build","develop","parachain","smart contract"],slug:"../build-guide"},s=void 0,l={},c=[{value:"Development Ecosystem Overview",id:"development-ecosystem-overview",level:2},{value:"Building Parachains",id:"building-parachains",level:2},{value:"Polkadot SDK Overview",id:"polkadot-sdk-overview",level:3},{value:"Building Parachains with Cumulus",id:"building-parachains-with-cumulus",level:4},{value:"Parachains Benefits",id:"parachains-benefits",level:4},{value:"Building a Pallet",id:"building-a-pallet",level:3},{value:"Developing Smart Contracts",id:"developing-smart-contracts",level:2},{value:"ink! and EVM-based Smart Contracts",id:"ink-and-evm-based-smart-contracts",level:3},{value:"Developing a dApp",id:"developing-a-dapp",level:2},{value:"Resources",id:"resources",level:2}];function d(e){const t={a:"a",admonition:"admonition",em:"em",h2:"h2",h3:"h3",h4:"h4",img:"img",li:"li",mermaid:"mermaid",ol:"ol",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,r.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(t.p,{children:["Polkadot is a blockchain network protocol that provides ",(0,i.jsx)(t.strong,{children:"shared security"})," among all connected\nparachains and allowing all connected tasks to ",(0,i.jsx)(t.strong,{children:"interoperate"})," by using\n",(0,i.jsx)(t.a,{href:"/docs/learn-xcm",children:"XCM"}),"."]}),"\n",(0,i.jsxs)(t.p,{children:["With the ",(0,i.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk",children:"Polkadot SDK"})," and\n",(0,i.jsx)(t.a,{href:"/docs/learn-agile-coretime",children:"Agile Coretime"}),", the time it takes to develop and launch a new\nchain has dropped significantly. Depending on your goals, it may only take weeks or even days."]}),"\n",(0,i.jsx)(t.p,{children:"This starters guide will walk you through the steps you can take today to get started building your\nvision with Polkadot. It will also point to resources you can use to start building immediately."}),"\n",(0,i.jsx)(t.admonition,{title:"For Developers!",type:"note",children:(0,i.jsxs)(t.p,{children:["Please note that the following documentation is more geared towards developers. If you are looking\nfor more general knowledge related to Polkadot, be sure to check out the\n",(0,i.jsx)(t.a,{href:"../docs/learn-index",children:"Learn"})," section."]})}),"\n",(0,i.jsxs)(t.p,{children:["This build guide covers three different areas, taking a ",(0,i.jsx)(t.strong,{children:"top-down"})," approach from protocol\ndevelopment to user-facing applications:"]}),"\n",(0,i.jsxs)(t.ol,{children:["\n",(0,i.jsx)(t.li,{children:(0,i.jsx)(t.a,{href:"#building-parachains",children:"Runtime Development - Developing parachains/blockchains"})}),"\n",(0,i.jsx)(t.li,{children:(0,i.jsx)(t.a,{href:"#developing-smart-contracts",children:"Smart Contract Development - How Polkadot handles smart contracts"})}),"\n",(0,i.jsx)(t.li,{children:(0,i.jsx)(t.a,{href:"#developing-a-dapp",children:"dApp Development - The tools available for dApp development on Polkadot"})}),"\n"]}),"\n",(0,i.jsx)(t.admonition,{title:"Keep reading to find out more, or explore each respective area",type:"tip",children:(0,i.jsxs)(t.p,{children:["Keep in mind that these areas are merely suggestive, and there are many ways to utilize Polkadot,\nSubstrate, and their various developmental components. For more inspiration, look at the\n",(0,i.jsx)(t.a,{href:"/docs/build-open-source",children:"open source projects"})," featured here in the wiki!"]})}),"\n",(0,i.jsx)(t.h2,{id:"development-ecosystem-overview",children:"Development Ecosystem Overview"}),"\n",(0,i.jsx)(t.mermaid,{value:"%%{\n init: {\n 'theme': 'base',\n 'themeVariables': {\n 'fontFamily': 'Unbounded',\n 'primaryColor': '#E6007A',\n 'fontSize': '16px',\n 'primaryTextColor': '#fff',\n 'primaryBorderColor': '#7C0000',\n 'lineColor': '#140523',\n 'secondaryColor': '#552BBF',\n 'tertiaryColor': '#fff'\n }\n }\n}%%\nflowchart TB\n subgraph PL [\"Protocol Land (Parachains, Smart Contracts)\"]\n\n subgraph SCD [\"Smart Contract Development\"]\n direction LR\n SC[\"Use Smart Contract Parachain\"]\n SC --\x3e ink!\n SC --\x3e Solidity\n end\n\n subgraph PSL [\"Blockchain Development\"]\n direction LR\n PS[\"Polkadot SDK\"] --\x3e R[WASM Runtime - Substrate & FRAME]\n R --\x3eParachain[\"Parachain/Task\"]--\x3eSSC[\"Shared Security - Cumulus\"]\n R --\x3eSoloChain[Solo Chain]--\x3eNSS[\"No Shared Security\"]\n end\n end\n\n PL--\x3e| Develop apps| CS\n\n subgraph CS [\"Client/User Land (dApps/uApps)\"]\n LC[\"Light Clients (Smoldot)\"]\n UA[uApp]\n ReDot[Reactive DOT]\n UA --\x3e PAPI[Polkadot-API]\n UA --\x3e ReDot\n ReDot --\x3e PAPI[Polkadot API]\n UA --\x3e PJS[Polkadot JS]\n UA --\x3e SubXT\n PAPI --\x3e LC\n PJS --\x3e LC\n SubXT --\x3e LC\n end"}),"\n",(0,i.jsxs)(t.p,{children:["Before diving into the various paths one can take in developing on Polkadot, it's essential to\nrealize and know key terms that make up the following sections. Even before considering what kind of\napplication you want to build, it's prudent to understand what Polkadot ",(0,i.jsx)(t.em,{children:"is"}),", and what each\ndevelopmental component can do for you within the Polkadot ecosystem."]}),"\n",(0,i.jsx)(t.p,{children:"Before diving into any one of these tracks, it is encouraged to read about Polkadot and its networks\nin order to gain context about the application you could make."}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.a,{href:"/docs/build-network-overview",children:"Take a look at the various development network options here."})}),"\n",(0,i.jsx)(t.h2,{id:"building-parachains",children:"Building Parachains"}),"\n",(0,i.jsxs)(t.p,{children:["Polkadot is canonically referred to as the relay chain. It is also considered a ",(0,i.jsx)(t.em,{children:"layer zero"}),"\nprotocol, as it enables the interoperability and shared security of multiple\n",(0,i.jsx)(t.a,{href:"/docs/learn-parachains",children:"parachains"}),", which are ",(0,i.jsx)(t.em,{children:"layer one"})," protocols. Parachains currently\nconnect to a relay chain using the ",(0,i.jsx)(t.a,{href:"/docs/learn-parachains-protocol",children:"Parachains Protocol"}),".\nMore elaborate (or simpler) tasks could be constructed in the future."]}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"build 1",src:n(74112).A+"",width:"1296",height:"907"})}),"\n",(0,i.jsx)(t.admonition,{type:"info",children:(0,i.jsxs)(t.p,{children:["Throughout this document, you may encounter the term ",(0,i.jsx)(t.strong,{children:"runtime"})," or ",(0,i.jsx)(t.strong,{children:"STF (State Transition\nFunction)"}),". Both refer to the same concept, as they define how a particular system, i.e., a\nblockchain, should deal with state changes externally and internally. Both of these terms are used\nextensively in Polkadot and Substrate."]})}),"\n",(0,i.jsxs)(t.p,{children:["Parachains built through the Polkadot SDK, open possibilities to construct complex ",(0,i.jsx)(t.strong,{children:"runtime"}),", or\n",(0,i.jsx)(t.strong,{children:"STF"})," (state transition function) the logic that would be too expensive to execute with smart\ncontracts. However, unlike smart contracts, parachains lack a mandatory gas metering system entirely\nand could potentially be vulnerable to bugs that cause infinite loops (something that is prevented\nby design in smart contracts). This vulnerability is mitigated by the\n",(0,i.jsx)(t.a,{href:"https://docs.substrate.io/build/tx-weights-fees/",children:"weight system"})," that is implemented in Substrate\n-- although it places more of a burden on the developer of the parachain to perform properly\nbenchmarks."]}),"\n",(0,i.jsx)(t.admonition,{title:"What is an on-demand parachain?",type:"info",children:(0,i.jsx)(t.p,{children:'On-demand parachains use a "pay-as-you-go" model enabled by Agile Coretime to interact with the\nrelay chain. On-demand parachains will only produce a block when needed, unlike full parachains,\nwhich have access to bulk coretime to produce a block at every block of the relay chain. When\nbuilding an on-demand parachain, you will use the same tools (like PDKs) and get all the benefits of\nbuilding a parachain without the cost drawback of purchasing bulk coretime.'})}),"\n",(0,i.jsx)(t.h3,{id:"polkadot-sdk-overview",children:"Polkadot SDK Overview"}),"\n",(0,i.jsxs)(t.p,{children:["Polkadot is built using the Polkadot SDK, which,\n",(0,i.jsx)(t.a,{href:"https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/polkadot_sdk/polkadot/index.html",children:"the Polkadot node/host implementation"}),",\nwithin contains the source code for:"]}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.strong,{children:"Substrate"})," - a set of core libraries used for constructing blockchains - mostly un-opinionated"]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.strong,{children:"FRAME"})," - the framework used to build Substrate runtimes - more opinionated"]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.strong,{children:"Cumulus"})," - parachain/task specific functions which allow for solo chains to become compatible\nwith Polkadot"]}),"\n"]}),"\n",(0,i.jsxs)(t.p,{children:[(0,i.jsx)(t.a,{href:"https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/polkadot_sdk/substrate/index.html",children:"Substrate"}),"\nis a highly configurable and dynamic framework for building blockchains. At a lower level, Substrate\nprovides a set of tools and libraries ranging from block production, finality gadgets to\npeer-to-peer networking. Both Polkadot and Kusama, as well as most parachains, are built using\nSubstrate."]}),"\n",(0,i.jsx)(t.p,{children:"In essence, Substrate can break down a blockchain's development process by providing crucial\nbuilding blocks of functionality, removing the need for re-engineering complex mechanisms that\nusually involved when developing a blockchain."}),"\n",(0,i.jsx)(t.p,{children:"Substrate can be used as a basis for a parachain to connect to a relay chain like Polkadot or\nKusama, or even as a basis to form a conventional layer one solo chain."}),"\n",(0,i.jsxs)(t.p,{children:["Currently, the most streamlined way of utilizing Substrate is through\n",(0,i.jsx)(t.a,{href:"https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/polkadot_sdk/frame_runtime/index.html",children:"FRAME"}),",\nwhich conveniently allows for a runtime/STF to be generated from a set of modules (called\n",(0,i.jsx)(t.a,{href:"https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/polkadot_sdk/frame_runtime/index.html#pallets",children:"pallets"}),").\nRuntimes in Substrate are built using ",(0,i.jsx)(t.a,{href:"/docs/learn-wasm",children:"WebAssembly"})," (Wasm), and represent\nthe state transition function for a network. FRAME provides a framework for\n",(0,i.jsx)(t.a,{href:"https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/polkadot_sdk/frame_runtime/index.html#pallets",children:"pallets"}),",\nto construct a runtime/STF and define how your task is supposed to behave. Ranging from\n",(0,i.jsx)(t.a,{href:"https://paritytech.github.io/substrate/master/pallet_identity/index.html",children:"identity"})," to\n",(0,i.jsx)(t.a,{href:"https://paritytech.github.io/substrate/master/pallet_contracts/index.html",children:"smart contracts"}),",\npallets can be quite extensive in providing on-chain functionality."]}),"\n",(0,i.jsxs)(t.p,{children:["Even though FRAME is heavily used, it is not the only way to create a valid runtime/STF using\nSubstrate. Substrate can be used to create new paradigms and abstractions. One such example is the\n",(0,i.jsx)(t.a,{href:"https://github.com/open-web3-stack/open-runtime-module-library",children:"Open Runtime Module Library (ORML)"}),",\nwhich is another way of creating and using runtime modules."]}),"\n",(0,i.jsxs)(t.admonition,{type:"note",children:[(0,i.jsxs)(t.p,{children:["Although most parachains utilize FRAME and Substrate to build runtime/STFs for connecting to the\nrelay chain, it is not contingent. Building a parachain using other tools is possible if they follow\nthe ",(0,i.jsx)(t.a,{href:"/docs/learn-parachains-protocol",children:"Parachains Protocol"}),"."]}),(0,i.jsx)(t.p,{children:"As a general rule of thumb, Substrate provides the means for this to become possible through\ncomparably minimal effort."})]}),"\n",(0,i.jsx)(t.h4,{id:"building-parachains-with-cumulus",children:"Building Parachains with Cumulus"}),"\n",(0,i.jsxs)(t.p,{children:[(0,i.jsx)(t.a,{href:"https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/polkadot_sdk/cumulus/index.html",children:"Cumulus"}),"\nis a set of tools that allows you to convert a blockchain developed using Substrate and FRAME into a\nPolkadot-compatible Parachain. More specifically, it provides libraries for all of the necessary\nparts of the Polkadot protocol necessary for Parachains to work, for example:"]}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsx)(t.li,{children:"Creating new parachain blocks via Collators"}),"\n",(0,i.jsx)(t.li,{children:"Listening to the relay chain for updates"}),"\n",(0,i.jsx)(t.li,{children:"Synchronizing upgrades between the parachain and relay chain"}),"\n"]}),"\n",(0,i.jsx)(t.p,{children:"For most developers, the best place to start is to get familiar with Substrate independently,\nfollowed by FRAME, with Cumulus as the final step to understanding the entire parachain building\nprocess. This way, one can view how various paradigms are applied and decide on integrating or\nutilizing Substrate for their particular use case."}),"\n",(0,i.jsxs)(t.p,{children:["Please see ",(0,i.jsx)(t.a,{href:"/docs/build-guides-coretime-start",children:"our guides on getting started with coretime"})," for how to\nget started on building and deploying a parachain."]}),"\n",(0,i.jsx)(t.h4,{id:"parachains-benefits",children:"Parachains Benefits"}),"\n",(0,i.jsx)(t.p,{children:"Parachains contain their own runtime/STF logic and benefit from the shared security and the\ncross-consensus messaging provided by the relay chain. Parachains permit high flexibility and\ncustomization but require more effort to create and maintain over time. A production-grade parachain\nis typically more involved to create due to the complexity involved in blockchain networks'\ntechnical and economic aspects."}),"\n",(0,i.jsx)(t.p,{children:"Parachains grant the creators more space to build the monetary system and other chain aspects from\nthe ground up. They will allow for a more concise and efficient execution of complex logic than a\nsmart contract platform could offer. Parachains also provide more flexibility in the form of\ngovernance and can perform complete upgrades in a less controversial way than the current process of\nhard forks."}),"\n",(0,i.jsx)(t.p,{children:"Some examples of features you can have on a parachain:"}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsx)(t.li,{children:"Custom fee structure (for example, pay a flat transaction fee or pay per byte)."}),"\n",(0,i.jsx)(t.li,{children:"Shared security and finalization via the relay chain (Polkadot or Kusama)."}),"\n",(0,i.jsx)(t.li,{children:"Custom monetary policy for the native token and local economy."}),"\n",(0,i.jsx)(t.li,{children:"Treasury to be funded through transitions in your state function."}),"\n",(0,i.jsx)(t.li,{children:"A governance mechanism that could manage a DAO that is responsible for allocating your on-chain\ntreasury."}),"\n"]}),"\n",(0,i.jsx)(t.h3,{id:"building-a-pallet",children:"Building a Pallet"}),"\n",(0,i.jsx)(t.p,{children:"While parachains are highly customizable, they are often complex to develop. If you wish to get\nfamiliar with FRAME and Substrate, a good place to start is by building a pallet in a development\nenvironment. A pallet is a fully customizable module that allows you to implement layer one logic\nwith relatively minimal development time on a fundamental level while still allowing the possibility\nof building advanced functionality into your custom chain."}),"\n",(0,i.jsx)(t.h2,{id:"developing-smart-contracts",children:"Developing Smart Contracts"}),"\n",(0,i.jsx)(t.p,{children:"Smart contracts are another option that enables an often simpler developer experience. Below is a\nquick comparison of how building a smart contract compares to building a parachain:"}),"\n",(0,i.jsxs)(t.table,{children:[(0,i.jsx)(t.thead,{children:(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.th,{}),(0,i.jsx)(t.th,{children:"Parachains"}),(0,i.jsx)(t.th,{children:"Smart Contracts"})]})}),(0,i.jsxs)(t.tbody,{children:[(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Speed of Development"}),(0,i.jsx)(t.td,{children:"-"}),(0,i.jsx)(t.td,{children:"+"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Ease of Deployment"}),(0,i.jsx)(t.td,{children:"-"}),(0,i.jsx)(t.td,{children:"+"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Complexity of logic"}),(0,i.jsx)(t.td,{children:"+"}),(0,i.jsx)(t.td,{children:"-"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Maintenance overhead"}),(0,i.jsx)(t.td,{children:"-"}),(0,i.jsx)(t.td,{children:"+"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Level of customization"}),(0,i.jsx)(t.td,{children:"+"}),(0,i.jsx)(t.td,{children:"-"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Strict resource control"}),(0,i.jsx)(t.td,{children:"-"}),(0,i.jsx)(t.td,{children:"+"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Native chain features"}),(0,i.jsx)(t.td,{children:"+"}),(0,i.jsx)(t.td,{children:"-"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Scalability"}),(0,i.jsx)(t.td,{children:"+"}),(0,i.jsx)(t.td,{children:"-"})]})]})]}),"\n",(0,i.jsxs)(t.admonition,{title:"What's the difference between a smart contract and a pallet?",type:"info",children:[(0,i.jsxs)(t.p,{children:["If you recall, a parachain comprises a runtime/STF usually built on Substrate. These runtime/STFs\noften utilize FRAME, which is subsequently made of pallets. Pallets are part of a Substrate\nruntime/STF, whereas smart contracts are a product of a pallet (see:\n",(0,i.jsx)(t.a,{href:"https://paritytech.github.io/substrate/master/pallet_contracts/index.html",children:"pallet_contracts"}),").\nPallets require more engineering and thought, as they can directly affect the chain's state."]}),(0,i.jsxs)(t.p,{children:["For a more comprehensive (and maintained) comparison, be sure to check out the\n",(0,i.jsx)(t.a,{href:"https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/reference_docs/runtime_vs_smart_contract/index.html",children:"comparison from the Polkadot SDK documentation"}),"."]})]}),"\n",(0,i.jsx)(t.h3,{id:"ink-and-evm-based-smart-contracts",children:"ink! and EVM-based Smart Contracts"}),"\n",(0,i.jsxs)(t.p,{children:["At a high level, a ",(0,i.jsx)(t.em,{children:"smart contract"})," is simply some code that exists at an address on a chain and is\ncallable by external actors. Whether it's ",(0,i.jsx)(t.a,{href:"https://polkadot-evm.github.io/frontier/",children:"EVM-based"})," or\nwritten using ",(0,i.jsx)(t.a,{href:"https://use.ink/",children:"ink!"}),", smart contracts are sandboxed, executable programs that live\non-chain."]}),"\n",(0,i.jsx)(t.admonition,{type:"note",children:(0,i.jsxs)(t.p,{children:[(0,i.jsx)(t.em,{children:"The Polkadot relay chain does not support smart contracts."})," However, several parachains do. See the\n",(0,i.jsx)(t.a,{href:"/docs/build-smart-contracts#parachains",children:"smart contracts guide"})," for the exact chains in which you can\ndeploy contracts on Polkadot."]})}),"\n",(0,i.jsxs)(t.p,{children:["A Polkadot-native choice for smart contracts is ",(0,i.jsx)(t.a,{href:"https://use.ink/",children:"ink!"}),". Other parachains that\noffer EVM-based contracts written in Solidity alongside ink!\n",(0,i.jsx)(t.a,{href:"./build-smart-contracts#parachains",children:"are also available"}),"."]}),"\n",(0,i.jsx)(t.p,{children:"Because smart contracts exist on a single chain at a time, they can have smooth interoperability\nwith other smart contracts on the same chain. However, they will always be constrained and limited\nby the inherent characteristics of their host chain."}),"\n",(0,i.jsxs)(t.p,{children:["As a developer, you will need to consider the storage and complexity of your smart contract to\nensure that gas usage stays within reasonable bounds. Consider using the listed options on the\n",(0,i.jsx)(t.a,{href:"/docs/build-storage",children:"decentralized storage"})," page to keep the data and submit only the content address\non the chain."]}),"\n",(0,i.jsx)(t.admonition,{title:"Building a smart contract",type:"info",children:(0,i.jsxs)(t.p,{children:["Please see the ",(0,i.jsx)(t.a,{href:"/docs/build-smart-contracts",children:"smart contracts guide"})," for how to get started on building\na smart contract."]})}),"\n",(0,i.jsx)(t.h2,{id:"developing-a-dapp",children:"Developing a dApp"}),"\n",(0,i.jsxs)(t.p,{children:["If one aims to develop a ",(0,i.jsx)(t.strong,{children:"dApp"})," (Decentralized App), the Polkadot ecosystem contains various SDKs\nto tap into the relay chain and parachains."]}),"\n",(0,i.jsx)(t.p,{children:"For front-end applications, several options exist for interfacing with Substrate-based chains\n(parachains, relay chains, etc.) and smart contracts. These often will interact with the RPC of a\nSubstrate node."}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.a,{href:"build-dapp",children:"Please visit the documentation for developing dApps and other general client-side development resources."})}),"\n",(0,i.jsxs)(t.p,{children:["For a complete list of tools, please take a look here:\n",(0,i.jsx)(t.a,{href:"/docs/build-open-source",children:"Tools, APIs, and Languages"})]}),"\n",(0,i.jsx)(t.h2,{id:"resources",children:"Resources"}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsx)(t.li,{children:(0,i.jsx)(t.a,{href:"https://polkadot-fellows.github.io/RFCs/approved/0001-agile-coretime.html",children:"Agile Coretime Fellowship RFC"})}),"\n",(0,i.jsx)(t.li,{children:(0,i.jsx)(t.a,{href:"/docs/learn-bridges",children:"Polkadot Bridges"})}),"\n",(0,i.jsx)(t.li,{children:(0,i.jsx)(t.a,{href:"https://polkadot.network/blog/the-path-of-a-parachain-block/",children:"The Path of a Parachain Block"})}),"\n",(0,i.jsx)(t.li,{children:(0,i.jsx)(t.a,{href:"/docs/learn-parachains-protocol",children:"The Path of a Parachain Block (Parachain Protocol page)"})}),"\n",(0,i.jsx)(t.li,{children:(0,i.jsx)(t.a,{href:"https://www.youtube.com/watch?v=fYc1yolanoE",children:"How to become a parachain on Polkadot (Video)"})}),"\n",(0,i.jsx)(t.li,{children:(0,i.jsx)(t.a,{href:"https://polkadot.network/blog/trusted-execution-environments-and-the-polkadot-ecosystem/",children:"Trusted Execution Environments and the Polkadot Ecosystem"})}),"\n"]})]})}function h(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}},19365:(e,t,n)=>{n.d(t,{A:()=>o});n(96540);var a=n(34164);const i={tabItem:"tabItem_Ymn6"};var r=n(74848);function o(e){var t=e.children,n=e.hidden,o=e.className;return(0,r.jsx)("div",{role:"tabpanel",className:(0,a.A)(i.tabItem,o),hidden:n,children:t})}},11470:(e,t,n)=>{n.d(t,{A:()=>j});var a=n(96540),i=n(34164),r=n(23104),o=n(56347),s=n(205),l=n(57485),c=n(31682),d=n(75376);function h(e){var t,n;return null!=(t=null==(n=a.Children.toArray(e).filter((function(e){return"\n"!==e})).map((function(e){if(!e||(0,a.isValidElement)(e)&&((t=e.props)&&"object"==typeof t&&"value"in t))return e;var t;throw new Error("Docusaurus error: Bad child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:n.filter(Boolean))?t:[]}function u(e){var t=e.values,n=e.children;return(0,a.useMemo)((function(){var e=null!=t?t:function(e){return h(e).map((function(e){var t=e.props;return{value:t.value,label:t.label,attributes:t.attributes,default:t.default}}))}(n);return function(e){var t=(0,c.XI)(e,(function(e,t){return e.value===t.value}));if(t.length>0)throw new Error('Docusaurus error: Duplicate values "'+t.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[t,n])}function p(e){var t=e.value;return e.tabValues.some((function(e){return e.value===t}))}function m(e){var t=e.queryString,n=void 0!==t&&t,i=e.groupId,r=(0,o.W6)(),s=function(e){var t=e.queryString,n=void 0!==t&&t,a=e.groupId;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=a?a:null}({queryString:n,groupId:i});return[(0,l.aZ)(s),(0,a.useCallback)((function(e){if(s){var t=new URLSearchParams(r.location.search);t.set(s,e),r.replace(Object.assign({},r.location,{search:t.toString()}))}}),[s,r])]}function f(e){var t,n,i,r,o=e.defaultValue,l=e.queryString,c=void 0!==l&&l,h=e.groupId,f=u(e),b=(0,a.useState)((function(){return function(e){var t,n=e.defaultValue,a=e.tabValues;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!p({value:n,tabValues:a}))throw new Error('Docusaurus error: The has a defaultValue "'+n+'" but none of its children has the corresponding value. Available values are: '+a.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return n}var i=null!=(t=a.find((function(e){return e.default})))?t:a[0];if(!i)throw new Error("Unexpected error: 0 tabValues");return i.value}({defaultValue:o,tabValues:f})})),g=b[0],x=b[1],v=m({queryString:c,groupId:h}),y=v[0],k=v[1],j=(t=function(e){return e?"docusaurus.tab."+e:null}({groupId:h}.groupId),n=(0,d.Dv)(t),i=n[0],r=n[1],[i,(0,a.useCallback)((function(e){t&&r.set(e)}),[t,r])]),w=j[0],P=j[1],S=function(){var e=null!=y?y:w;return p({value:e,tabValues:f})?e:null}();return(0,s.A)((function(){S&&x(S)}),[S]),{selectedValue:g,selectValue:(0,a.useCallback)((function(e){if(!p({value:e,tabValues:f}))throw new Error("Can't select invalid tab value="+e);x(e),k(e),P(e)}),[k,P,f]),tabValues:f}}var b=n(92303);const g={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var x=n(74848);function v(e){var t=e.className,n=e.block,a=e.selectedValue,o=e.selectValue,s=e.tabValues,l=[],c=(0,r.a_)().blockElementScrollPositionUntilNextRender,d=function(e){var t=e.currentTarget,n=l.indexOf(t),i=s[n].value;i!==a&&(c(t),o(i))},h=function(e){var t,n=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":var a,i=l.indexOf(e.currentTarget)+1;n=null!=(a=l[i])?a:l[0];break;case"ArrowLeft":var r,o=l.indexOf(e.currentTarget)-1;n=null!=(r=l[o])?r:l[l.length-1]}null==(t=n)||t.focus()};return(0,x.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,i.A)("tabs",{"tabs--block":n},t),children:s.map((function(e){var t=e.value,n=e.label,r=e.attributes;return(0,x.jsx)("li",Object.assign({role:"tab",tabIndex:a===t?0:-1,"aria-selected":a===t,ref:function(e){return l.push(e)},onKeyDown:h,onClick:d},r,{className:(0,i.A)("tabs__item",g.tabItem,null==r?void 0:r.className,{"tabs__item--active":a===t}),children:null!=n?n:t}),t)}))})}function y(e){var t=e.lazy,n=e.children,r=e.selectedValue,o=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){var s=o.find((function(e){return e.props.value===r}));return s?(0,a.cloneElement)(s,{className:(0,i.A)("margin-top--md",s.props.className)}):null}return(0,x.jsx)("div",{className:"margin-top--md",children:o.map((function(e,t){return(0,a.cloneElement)(e,{key:t,hidden:e.props.value!==r})}))})}function k(e){var t=f(e);return(0,x.jsxs)("div",{className:(0,i.A)("tabs-container",g.tabList),children:[(0,x.jsx)(v,Object.assign({},t,e)),(0,x.jsx)(y,Object.assign({},t,e))]})}function j(e){var t=(0,b.A)();return(0,x.jsx)(k,Object.assign({},e,{children:h(e.children)}),String(t))}},74112:(e,t,n)=>{n.d(t,{A:()=>a});const a=n.p+"assets/images/build-1-706b8858ef80594b1c9d2cd9c4ce0421.png"},28453:(e,t,n)=>{n.d(t,{R:()=>o,x:()=>s});var a=n(96540);const i={},r=a.createContext(i);function o(e){const t=a.useContext(r);return a.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function s(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:o(e.components),a.createElement(r.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/4403bb94.97235216.js b/assets/js/4403bb94.97235216.js deleted file mode 100644 index ba28b1af3c32..000000000000 --- a/assets/js/4403bb94.97235216.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3735],{39306:(e,d,t)=>{t.r(d),t.d(d,{assets:()=>i,contentTitle:()=>s,default:()=>h,frontMatter:()=>a,metadata:()=>r,toc:()=>l});var o=t(74848),n=t(28453);const a={id:"polkadot-dot-ordinals",title:"DOT Ordinals",sidebar_label:"DOT Ordinals",description:"Polkadot DOT Ordinals descriptions",keywords:["polkadot","governance","dashboard","dune"],slug:"../polkadot-dot-ordinals"},s="DOT Ordinals",r={id:"general/dune-analytics/polkadot-dashboards/legacy/polkadot-dot-ordinals",title:"DOT Ordinals",description:"Polkadot DOT Ordinals descriptions",source:"@site/../docs/general/dune-analytics/polkadot-dashboards/legacy/polkadot-dot-ordinals.md",sourceDirName:"general/dune-analytics/polkadot-dashboards/legacy",slug:"/general/dune-analytics/polkadot-dashboards/polkadot-dot-ordinals",permalink:"/docs/general/dune-analytics/polkadot-dashboards/polkadot-dot-ordinals",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/polkadot-dashboards/legacy/polkadot-dot-ordinals.md",tags:[],version:"current",lastUpdatedBy:"MK",lastUpdatedAt:1717658873e3,frontMatter:{id:"polkadot-dot-ordinals",title:"DOT Ordinals",sidebar_label:"DOT Ordinals",description:"Polkadot DOT Ordinals descriptions",keywords:["polkadot","governance","dashboard","dune"],slug:"../polkadot-dot-ordinals"}},i={},l=[{value:"View On Dune: DOT Ordinals",id:"view-on-dune-dot-ordinals",level:2}];function c(e){const d={a:"a",h1:"h1",h2:"h2",header:"header",...(0,n.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.header,{children:(0,o.jsx)(d.h1,{id:"dot-ordinals",children:"DOT Ordinals"})}),"\n",(0,o.jsxs)(d.h2,{id:"view-on-dune-dot-ordinals",children:["View On Dune: ",(0,o.jsx)(d.a,{href:"https://dune.com/substrate/dot-ordinals",children:"DOT Ordinals"})]}),"\n",(0,o.jsx)("iframe",{src:"https://dune.com/embeds/3481627/5851774/",height:"350",width:"100%"}),"\n",(0,o.jsx)("iframe",{src:"https://dune.com/embeds/3301014/5527899/",height:"350",width:"100%"}),"\n",(0,o.jsx)("iframe",{src:"https://dune.com/embeds/3300998/5527876/",height:"350",width:"100%"}),"\n",(0,o.jsx)("iframe",{src:"https://dune.com/embeds/3301014/5527924/",height:"350",width:"100%"}),"\n",(0,o.jsx)("iframe",{src:"https://dune.com/embeds/3300892/5527659/",height:"350",width:"100%"})]})}function h(e={}){const{wrapper:d}={...(0,n.R)(),...e.components};return d?(0,o.jsx)(d,{...e,children:(0,o.jsx)(c,{...e})}):c(e)}},28453:(e,d,t)=>{t.d(d,{R:()=>s,x:()=>r});var o=t(96540);const n={},a=o.createContext(n);function s(e){const d=o.useContext(a);return o.useMemo((function(){return"function"==typeof e?e(d):{...d,...e}}),[d,e])}function r(e){let d;return d=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:s(e.components),o.createElement(a.Provider,{value:d},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/4403bb94.c59eee28.js b/assets/js/4403bb94.c59eee28.js new file mode 100644 index 000000000000..55fbb7fdec71 --- /dev/null +++ b/assets/js/4403bb94.c59eee28.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3735],{73338:(e,d,t)=>{t.r(d),t.d(d,{assets:()=>i,contentTitle:()=>r,default:()=>h,frontMatter:()=>s,metadata:()=>o,toc:()=>l});const o=JSON.parse('{"id":"general/dune-analytics/polkadot-dashboards/legacy/polkadot-dot-ordinals","title":"DOT Ordinals","description":"Polkadot DOT Ordinals descriptions","source":"@site/../docs/general/dune-analytics/polkadot-dashboards/legacy/polkadot-dot-ordinals.md","sourceDirName":"general/dune-analytics/polkadot-dashboards/legacy","slug":"/general/dune-analytics/polkadot-dashboards/polkadot-dot-ordinals","permalink":"/docs/general/dune-analytics/polkadot-dashboards/polkadot-dot-ordinals","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/polkadot-dashboards/legacy/polkadot-dot-ordinals.md","tags":[],"version":"current","lastUpdatedBy":"MK","lastUpdatedAt":1717658873000,"frontMatter":{"id":"polkadot-dot-ordinals","title":"DOT Ordinals","sidebar_label":"DOT Ordinals","description":"Polkadot DOT Ordinals descriptions","keywords":["polkadot","governance","dashboard","dune"],"slug":"../polkadot-dot-ordinals"}}');var n=t(74848),a=t(28453);const s={id:"polkadot-dot-ordinals",title:"DOT Ordinals",sidebar_label:"DOT Ordinals",description:"Polkadot DOT Ordinals descriptions",keywords:["polkadot","governance","dashboard","dune"],slug:"../polkadot-dot-ordinals"},r="DOT Ordinals",i={},l=[{value:"View On Dune: DOT Ordinals",id:"view-on-dune-dot-ordinals",level:2}];function c(e){const d={a:"a",h1:"h1",h2:"h2",header:"header",...(0,a.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(d.header,{children:(0,n.jsx)(d.h1,{id:"dot-ordinals",children:"DOT Ordinals"})}),"\n",(0,n.jsxs)(d.h2,{id:"view-on-dune-dot-ordinals",children:["View On Dune: ",(0,n.jsx)(d.a,{href:"https://dune.com/substrate/dot-ordinals",children:"DOT Ordinals"})]}),"\n",(0,n.jsx)("iframe",{src:"https://dune.com/embeds/3481627/5851774/",height:"350",width:"100%"}),"\n",(0,n.jsx)("iframe",{src:"https://dune.com/embeds/3301014/5527899/",height:"350",width:"100%"}),"\n",(0,n.jsx)("iframe",{src:"https://dune.com/embeds/3300998/5527876/",height:"350",width:"100%"}),"\n",(0,n.jsx)("iframe",{src:"https://dune.com/embeds/3301014/5527924/",height:"350",width:"100%"}),"\n",(0,n.jsx)("iframe",{src:"https://dune.com/embeds/3300892/5527659/",height:"350",width:"100%"})]})}function h(e={}){const{wrapper:d}={...(0,a.R)(),...e.components};return d?(0,n.jsx)(d,{...e,children:(0,n.jsx)(c,{...e})}):c(e)}},28453:(e,d,t)=>{t.d(d,{R:()=>s,x:()=>r});var o=t(96540);const n={},a=o.createContext(n);function s(e){const d=o.useContext(a);return o.useMemo((function(){return"function"==typeof e?e(d):{...d,...e}}),[d,e])}function r(e){let d;return d=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:s(e.components),o.createElement(a.Provider,{value:d},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/4445.bb3ba29b.js b/assets/js/4445.bb3ba29b.js new file mode 100644 index 000000000000..03a87b3bd260 --- /dev/null +++ b/assets/js/4445.bb3ba29b.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4445],{14445:(t,e,n)=>{n.d(e,{diagram:()=>D});var i=n(79515),s=n(5081),r=(n(34483),n(62392),n(86825),n(85039),n(61021)),o=n(45567),a=n(3219),c=n(78041),l=n(75263),h=function(){var t=(0,o.K2)((function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n}),"o"),e=[1,4],n=[1,13],i=[1,12],s=[1,15],r=[1,16],a=[1,20],c=[1,19],l=[6,7,8],h=[1,26],u=[1,24],g=[1,25],d=[6,7,11],p=[1,31],y=[6,7,11,24],f=[1,6,13,16,17,20,23],m=[1,35],b=[1,36],_=[1,6,7,11,13,16,17,20,23],k=[1,38],E={trace:(0,o.K2)((function(){}),"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:(0,o.K2)((function(t,e,n,i,s,r,o){var a=r.length-1;switch(s){case 6:case 7:return i;case 8:i.getLogger().trace("Stop NL ");break;case 9:i.getLogger().trace("Stop EOF ");break;case 11:i.getLogger().trace("Stop NL2 ");break;case 12:i.getLogger().trace("Stop EOF2 ");break;case 15:i.getLogger().info("Node: ",r[a-1].id),i.addNode(r[a-2].length,r[a-1].id,r[a-1].descr,r[a-1].type,r[a]);break;case 16:i.getLogger().info("Node: ",r[a].id),i.addNode(r[a-1].length,r[a].id,r[a].descr,r[a].type);break;case 17:i.getLogger().trace("Icon: ",r[a]),i.decorateNode({icon:r[a]});break;case 18:case 23:i.decorateNode({class:r[a]});break;case 19:i.getLogger().trace("SPACELIST");break;case 20:i.getLogger().trace("Node: ",r[a-1].id),i.addNode(0,r[a-1].id,r[a-1].descr,r[a-1].type,r[a]);break;case 21:i.getLogger().trace("Node: ",r[a].id),i.addNode(0,r[a].id,r[a].descr,r[a].type);break;case 22:i.decorateNode({icon:r[a]});break;case 27:i.getLogger().trace("node found ..",r[a-2]),this.$={id:r[a-1],descr:r[a-1],type:i.getType(r[a-2],r[a])};break;case 28:this.$={id:r[a],descr:r[a],type:0};break;case 29:i.getLogger().trace("node found ..",r[a-3]),this.$={id:r[a-3],descr:r[a-1],type:i.getType(r[a-2],r[a])};break;case 30:this.$=r[a-1]+r[a];break;case 31:this.$=r[a]}}),"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:e},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:e},{6:n,7:[1,10],9:9,12:11,13:i,14:14,16:s,17:r,18:17,19:18,20:a,23:c},t(l,[2,3]),{1:[2,2]},t(l,[2,4]),t(l,[2,5]),{1:[2,6],6:n,12:21,13:i,14:14,16:s,17:r,18:17,19:18,20:a,23:c},{6:n,9:22,12:11,13:i,14:14,16:s,17:r,18:17,19:18,20:a,23:c},{6:h,7:u,10:23,11:g},t(d,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:a,23:c}),t(d,[2,19]),t(d,[2,21],{15:30,24:p}),t(d,[2,22]),t(d,[2,23]),t(y,[2,25]),t(y,[2,26]),t(y,[2,28],{20:[1,32]}),{21:[1,33]},{6:h,7:u,10:34,11:g},{1:[2,7],6:n,12:21,13:i,14:14,16:s,17:r,18:17,19:18,20:a,23:c},t(f,[2,14],{7:m,11:b}),t(_,[2,8]),t(_,[2,9]),t(_,[2,10]),t(d,[2,16],{15:37,24:p}),t(d,[2,17]),t(d,[2,18]),t(d,[2,20],{24:k}),t(y,[2,31]),{21:[1,39]},{22:[1,40]},t(f,[2,13],{7:m,11:b}),t(_,[2,11]),t(_,[2,12]),t(d,[2,15],{24:k}),t(y,[2,30]),{22:[1,41]},t(y,[2,27]),t(y,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:(0,o.K2)((function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)}),"parseError"),parse:(0,o.K2)((function(t){var e=this,n=[0],i=[],s=[null],r=[],a=this.table,c="",l=0,h=0,u=0,g=r.slice.call(arguments,1),d=Object.create(this.lexer),p={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(p.yy[y]=this.yy[y]);d.setInput(t,p.yy),p.yy.lexer=d,p.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var f=d.yylloc;r.push(f);var m=d.options&&d.options.ranges;function b(){var t;return"number"!=typeof(t=i.pop()||d.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,o.K2)((function(t){n.length=n.length-2*t,s.length=s.length-t,r.length=r.length-t}),"popStack"),(0,o.K2)(b,"lex");for(var _,k,E,S,N,x,D,L,I,C={};;){if(E=n[n.length-1],this.defaultActions[E]?S=this.defaultActions[E]:(null==_&&(_=b()),S=a[E]&&a[E][_]),void 0===S||!S.length||!S[0]){var O="";for(x in I=[],a[E])this.terminals_[x]&&x>2&&I.push("'"+this.terminals_[x]+"'");O=d.showPosition?"Parse error on line "+(l+1)+":\n"+d.showPosition()+"\nExpecting "+I.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==_?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(O,{text:d.match,token:this.terminals_[_]||_,line:d.yylineno,loc:f,expected:I})}if(S[0]instanceof Array&&S.length>1)throw new Error("Parse Error: multiple actions possible at state: "+E+", token: "+_);switch(S[0]){case 1:n.push(_),s.push(d.yytext),r.push(d.yylloc),n.push(S[1]),_=null,k?(_=k,k=null):(h=d.yyleng,c=d.yytext,l=d.yylineno,f=d.yylloc,u>0&&u--);break;case 2:if(D=this.productions_[S[1]][1],C.$=s[s.length-D],C._$={first_line:r[r.length-(D||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(D||1)].first_column,last_column:r[r.length-1].last_column},m&&(C._$.range=[r[r.length-(D||1)].range[0],r[r.length-1].range[1]]),void 0!==(N=this.performAction.apply(C,[c,h,l,p.yy,S[1],s,r].concat(g))))return N;D&&(n=n.slice(0,-1*D*2),s=s.slice(0,-1*D),r=r.slice(0,-1*D)),n.push(this.productions_[S[1]][0]),s.push(C.$),r.push(C._$),L=a[n[n.length-2]][n[n.length-1]],n.push(L);break;case 3:return!0}}return!0}),"parse")},S=function(){return{EOF:1,parseError:(0,o.K2)((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:(0,o.K2)((function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this}),"setInput"),input:(0,o.K2)((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t}),"input"),unput:(0,o.K2)((function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"unput"),more:(0,o.K2)((function(){return this._more=!0,this}),"more"),reject:(0,o.K2)((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:(0,o.K2)((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:(0,o.K2)((function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:(0,o.K2)((function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:(0,o.K2)((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:(0,o.K2)((function(t,e){var n,i,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var r in s)this[r]=s[r];return!1}return!1}),"test_match"),next:(0,o.K2)((function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),r=0;re[0].length)){if(e=n,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,s[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:(0,o.K2)((function(){var t=this.next();return t||this.lex()}),"lex"),begin:(0,o.K2)((function(t){this.conditionStack.push(t)}),"begin"),popState:(0,o.K2)((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:(0,o.K2)((function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules}),"_currentRules"),topState:(0,o.K2)((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:(0,o.K2)((function(t){this.begin(t)}),"pushState"),stateStackSize:(0,o.K2)((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,o.K2)((function(t,e,n,i){switch(n){case 0:return this.pushState("shapeData"),e.yytext="",24;case 1:return this.pushState("shapeDataStr"),24;case 2:return this.popState(),24;case 3:const n=/\n\s*/g;return e.yytext=e.yytext.replace(n,"
    "),24;case 4:return 24;case 5:case 10:case 29:case 32:this.popState();break;case 6:return t.getLogger().trace("Found comment",e.yytext),6;case 7:return 8;case 8:this.begin("CLASS");break;case 9:return this.popState(),17;case 11:t.getLogger().trace("Begin icon"),this.begin("ICON");break;case 12:return t.getLogger().trace("SPACELINE"),6;case 13:return 7;case 14:return 16;case 15:t.getLogger().trace("end icon"),this.popState();break;case 16:return t.getLogger().trace("Exploding node"),this.begin("NODE"),20;case 17:return t.getLogger().trace("Cloud"),this.begin("NODE"),20;case 18:return t.getLogger().trace("Explosion Bang"),this.begin("NODE"),20;case 19:return t.getLogger().trace("Cloud Bang"),this.begin("NODE"),20;case 20:case 21:case 22:case 23:return this.begin("NODE"),20;case 24:return 13;case 25:return 23;case 26:return 11;case 27:this.begin("NSTR2");break;case 28:return"NODE_DESCR";case 30:t.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return t.getLogger().trace("description:",e.yytext),"NODE_DESCR";case 33:return this.popState(),t.getLogger().trace("node end ))"),"NODE_DEND";case 34:return this.popState(),t.getLogger().trace("node end )"),"NODE_DEND";case 35:return this.popState(),t.getLogger().trace("node end ...",e.yytext),"NODE_DEND";case 36:case 39:case 40:return this.popState(),t.getLogger().trace("node end (("),"NODE_DEND";case 37:case 38:return this.popState(),t.getLogger().trace("node end (-"),"NODE_DEND";case 41:case 42:return t.getLogger().trace("Long description:",e.yytext),21}}),"anonymous"),rules:[/^(?:@\{)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^\"]+)/i,/^(?:[^}^"]+)/i,/^(?:\})/i,/^(?:\s*%%.*)/i,/^(?:kanban\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}@]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{shapeDataEndBracket:{rules:[],inclusive:!1},shapeDataStr:{rules:[2,3],inclusive:!1},shapeData:{rules:[1,4,5],inclusive:!1},CLASS:{rules:[9,10],inclusive:!1},ICON:{rules:[14,15],inclusive:!1},NSTR2:{rules:[28,29],inclusive:!1},NSTR:{rules:[31,32],inclusive:!1},NODE:{rules:[27,30,33,34,35,36,37,38,39,40,41,42],inclusive:!1},INITIAL:{rules:[0,6,7,8,11,12,13,16,17,18,19,20,21,22,23,24,25,26],inclusive:!0}}}}();function N(){this.yy={}}return E.lexer=S,(0,o.K2)(N,"Parser"),N.prototype=E,E.Parser=N,new N}();h.parser=h;var u=h,g=[],d=[],p=0,y={},f=(0,o.K2)((()=>{g=[],d=[],p=0,y={}}),"clear"),m=(0,o.K2)((t=>{if(0===g.length)return null;const e=g[0].level;let n=null;for(let i=g.length-1;i>=0;i--)if(g[i].level!==e||n||(n=g[i]),g[i].levelt.parentId===i.id));for(const r of s){const e={id:r.id,parentId:i.id,label:(0,o.jZ)(r.label??"",n),isGroup:!1,ticket:r?.ticket,priority:r?.priority,assigned:r?.assigned,icon:r?.icon,shape:"kanbanItem",level:r.level,rx:5,ry:5,cssStyles:["text-align: left"]};t.push(e)}}return{nodes:t,edges:[],other:{},config:(0,o.D7)()}}),"getData"),k=(0,o.K2)(((t,e,n,s,r)=>{const a=(0,o.D7)();let c=a.mindmap?.padding??o.UI.mindmap.padding;switch(s){case E.ROUNDED_RECT:case E.RECT:case E.HEXAGON:c*=2}const l={id:(0,o.jZ)(e,a)||"kbn"+p++,level:t,label:(0,o.jZ)(n,a),width:a.mindmap?.maxNodeWidth??o.UI.mindmap.maxNodeWidth,padding:c,isGroup:!1};if(void 0!==r){let t;t=r.includes("\n")?r+"\n":"{\n"+r+"\n}";const e=(0,i.H)(t,{schema:i.r});if(e.shape&&(e.shape!==e.shape.toLowerCase()||e.shape.includes("_")))throw new Error(`No such shape: ${e.shape}. Shape names should be lowercase.`);e?.shape&&"kanbanItem"===e.shape&&(l.shape=e?.shape),e?.label&&(l.label=e?.label),e?.icon&&(l.icon=e?.icon),e?.assigned&&(l.assigned=e?.assigned),e?.ticket&&(l.ticket=e?.ticket),e?.priority&&(l.priority=e?.priority)}const h=m(t);h?l.parentId=h.id||"kbn"+p++:d.push(l),g.push(l)}),"addNode"),E={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},S={clear:f,addNode:k,getSections:b,getData:_,nodeType:E,getType:(0,o.K2)(((t,e)=>{switch(o.Rm.debug("In get type",t,e),t){case"[":return E.RECT;case"(":return")"===e?E.ROUNDED_RECT:E.CLOUD;case"((":return E.CIRCLE;case")":return E.CLOUD;case"))":return E.BANG;case"{{":return E.HEXAGON;default:return E.DEFAULT}}),"getType"),setElementForId:(0,o.K2)(((t,e)=>{y[t]=e}),"setElementForId"),decorateNode:(0,o.K2)((t=>{if(!t)return;const e=(0,o.D7)(),n=g[g.length-1];t.icon&&(n.icon=(0,o.jZ)(t.icon,e)),t.class&&(n.cssClasses=(0,o.jZ)(t.class,e))}),"decorateNode"),type2Str:(0,o.K2)((t=>{switch(t){case E.DEFAULT:return"no-border";case E.RECT:return"rect";case E.ROUNDED_RECT:return"rounded-rect";case E.CIRCLE:return"circle";case E.CLOUD:return"cloud";case E.BANG:return"bang";case E.HEXAGON:return"hexgon";default:return"no-border"}}),"type2Str"),getLogger:(0,o.K2)((()=>o.Rm),"getLogger"),getElementById:(0,o.K2)((t=>y[t]),"getElementById")},N={draw:(0,o.K2)((async(t,e,n,i)=>{o.Rm.debug("Rendering kanban diagram\n"+t);const a=i.db.getData(),c=(0,o.D7)();c.htmlLabels=!1;const l=(0,r.D)(e),h=l.append("g");h.attr("class","sections");const u=l.append("g");u.attr("class","items");const g=a.nodes.filter((t=>t.isGroup));let d=0;const p=[];let y=25;for(const r of g){const t=c?.kanban?.sectionWidth||200;d+=1,r.x=t*d+10*(d-1)/2,r.width=t,r.y=0,r.height=3*t,r.rx=5,r.ry=5,r.cssClasses=r.cssClasses+" section-"+d;const e=await(0,s.U)(h,r);y=Math.max(y,e?.labelBBox?.height),p.push(e)}let f=0;for(const r of g){const t=p[f];f+=1;const e=c?.kanban?.sectionWidth||200,n=3*-e/2+y;let i=n;const o=a.nodes.filter((t=>t.parentId===r.id));for(const a of o){if(a.isGroup)throw new Error("Groups within groups are not allowed in Kanban diagrams");a.x=r.x,a.width=e-15;const t=(await(0,s.on)(u,a,{config:c})).node().getBBox();a.y=i+t.height/2,await(0,s.U_)(a),i=a.y+t.height/2+5}const l=t.cluster.select("rect"),h=Math.max(i-n+30,50)+(y-25);l.attr("height",h)}(0,o.ot)(void 0,l,c.mindmap?.padding??o.UI.kanban.padding,c.mindmap?.useMaxWidth??o.UI.kanban.useMaxWidth)}),"draw")},x=(0,o.K2)((t=>{let e="";for(let i=0;it.darkMode?(0,l.A)(e,n):(0,c.A)(e,n)),"adjuster");for(let i=0;i`\n .edge {\n stroke-width: 3;\n }\n ${x(t)}\n .section-root rect, .section-root path, .section-root circle, .section-root polygon {\n fill: ${t.git0};\n }\n .section-root text {\n fill: ${t.gitBranchLabel0};\n }\n .icon-container {\n height:100%;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .edge {\n fill: none;\n }\n .cluster-label, .label {\n color: ${t.textColor};\n fill: ${t.textColor};\n }\n .kanban-label {\n dy: 1em;\n alignment-baseline: middle;\n text-anchor: middle;\n dominant-baseline: middle;\n text-align: center;\n }\n`),"getStyles")}}}]); \ No newline at end of file diff --git a/assets/js/4449.73a3f3ef.js b/assets/js/4449.73a3f3ef.js new file mode 100644 index 000000000000..86910b21d5d1 --- /dev/null +++ b/assets/js/4449.73a3f3ef.js @@ -0,0 +1 @@ +(self.webpackChunk=self.webpackChunk||[]).push([[4449],{87799:function(t,e,i){var n;n=function(t){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=t,i.c=e,i.i=function(t){return t},i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=7)}([function(e,i){e.exports=t},function(t,e,i){"use strict";var n=i(0).FDLayoutConstants;function r(){}for(var o in n)r[o]=n[o];r.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,r.DEFAULT_RADIAL_SEPARATION=n.DEFAULT_EDGE_LENGTH,r.DEFAULT_COMPONENT_SEPERATION=60,r.TILE=!0,r.TILING_PADDING_VERTICAL=10,r.TILING_PADDING_HORIZONTAL=10,r.TREE_REDUCTION_ON_INCREMENTAL=!1,t.exports=r},function(t,e,i){"use strict";var n=i(0).FDLayoutEdge;function r(t,e,i){n.call(this,t,e,i)}for(var o in r.prototype=Object.create(n.prototype),n)r[o]=n[o];t.exports=r},function(t,e,i){"use strict";var n=i(0).LGraph;function r(t,e,i){n.call(this,t,e,i)}for(var o in r.prototype=Object.create(n.prototype),n)r[o]=n[o];t.exports=r},function(t,e,i){"use strict";var n=i(0).LGraphManager;function r(t){n.call(this,t)}for(var o in r.prototype=Object.create(n.prototype),n)r[o]=n[o];t.exports=r},function(t,e,i){"use strict";var n=i(0).FDLayoutNode,r=i(0).IMath;function o(t,e,i,r){n.call(this,t,e,i,r)}for(var s in o.prototype=Object.create(n.prototype),n)o[s]=n[s];o.prototype.move=function(){var t=this.graphManager.getLayout();this.displacementX=t.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=t.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementX=t.coolingFactor*t.maxNodeDisplacement*r.sign(this.displacementX)),Math.abs(this.displacementY)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementY=t.coolingFactor*t.maxNodeDisplacement*r.sign(this.displacementY)),null==this.child||0==this.child.getNodes().length?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),t.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},o.prototype.propogateDisplacementToChildren=function(t,e){for(var i,n=this.getChild().getNodes(),r=0;r0)this.positionNodesRadially(t);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var e=new Set(this.getAllNodes()),i=this.nodesWithGravity.filter((function(t){return e.has(t)}));this.graphManager.setAllNodesToApplyGravitation(i),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},_.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}if(this.totalIterations%l.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged()){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}this.coolingCycle++,0==this.layoutQuality?this.coolingAdjuster=this.coolingCycle:1==this.layoutQuality&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var t=new Set(this.getAllNodes()),e=this.nodesWithGravity.filter((function(e){return t.has(e)}));this.graphManager.setAllNodesToApplyGravitation(e),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var i=!this.isTreeGrowing&&!this.isGrowthFinished,n=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(i,n),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},_.prototype.getPositionsData=function(){for(var t=this.graphManager.getAllNodes(),e={},i=0;i1)for(a=0;an&&(n=Math.floor(s.y)),o=Math.floor(s.x+h.DEFAULT_COMPONENT_SEPERATION)}this.transform(new u(c.WORLD_CENTER_X-s.x/2,c.WORLD_CENTER_Y-s.y/2))},_.radialLayout=function(t,e,i){var n=Math.max(this.maxDiagonalInTree(t),h.DEFAULT_RADIAL_SEPARATION);_.branchRadialLayout(e,null,0,359,0,n);var r=y.calculateBounds(t),o=new E;o.setDeviceOrgX(r.getMinX()),o.setDeviceOrgY(r.getMinY()),o.setWorldOrgX(i.x),o.setWorldOrgY(i.y);for(var s=0;s1;){var E=y[0];y.splice(0,1);var m=c.indexOf(E);m>=0&&c.splice(m,1),p--,g--}u=null!=e?(c.indexOf(y[0])+1)%p:0;for(var v=Math.abs(n-i)/g,N=u;d!=g;N=++N%p){var A=c[N].getOtherEnd(t);if(A!=e){var L=(i+d*v)%360,T=(L+v)%360;_.branchRadialLayout(A,t,L,T,r+o,o),d++}}},_.maxDiagonalInTree=function(t){for(var e=p.MIN_VALUE,i=0;ie&&(e=n)}return e},_.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},_.prototype.groupZeroDegreeMembers=function(){var t=this,e={};this.memberGroups={},this.idToDummyNode={};for(var i=[],n=this.graphManager.getAllNodes(),r=0;r1){var n="DummyCompound_"+i;t.memberGroups[n]=e[i];var r=e[i][0].getParent(),o=new s(t.graphManager);o.id=n,o.paddingLeft=r.paddingLeft||0,o.paddingRight=r.paddingRight||0,o.paddingBottom=r.paddingBottom||0,o.paddingTop=r.paddingTop||0,t.idToDummyNode[n]=o;var a=t.getGraphManager().add(t.newGraph(),o),h=r.getChild();h.add(o);for(var l=0;l=0;t--){var e=this.compoundOrder[t],i=e.id,n=e.paddingLeft,r=e.paddingTop;this.adjustLocations(this.tiledMemberPack[i],e.rect.x,e.rect.y,n,r)}},_.prototype.repopulateZeroDegreeMembers=function(){var t=this,e=this.tiledZeroDegreePack;Object.keys(e).forEach((function(i){var n=t.idToDummyNode[i],r=n.paddingLeft,o=n.paddingTop;t.adjustLocations(e[i],n.rect.x,n.rect.y,r,o)}))},_.prototype.getToBeTiled=function(t){var e=t.id;if(null!=this.toBeTiled[e])return this.toBeTiled[e];var i=t.getChild();if(null==i)return this.toBeTiled[e]=!1,!1;for(var n=i.getNodes(),r=0;r0)return this.toBeTiled[e]=!1,!1;if(null!=o.getChild()){if(!this.getToBeTiled(o))return this.toBeTiled[e]=!1,!1}else this.toBeTiled[o.id]=!1}return this.toBeTiled[e]=!0,!0},_.prototype.getNodeDegree=function(t){t.id;for(var e=t.getEdges(),i=0,n=0;nh&&(h=c.rect.height)}i+=h+t.verticalPadding}},_.prototype.tileCompoundMembers=function(t,e){var i=this;this.tiledMemberPack=[],Object.keys(t).forEach((function(n){var r=e[n];i.tiledMemberPack[n]=i.tileNodes(t[n],r.paddingLeft+r.paddingRight),r.rect.width=i.tiledMemberPack[n].width,r.rect.height=i.tiledMemberPack[n].height}))},_.prototype.tileNodes=function(t,e){var i={rows:[],rowWidth:[],rowHeight:[],width:0,height:e,verticalPadding:h.TILING_PADDING_VERTICAL,horizontalPadding:h.TILING_PADDING_HORIZONTAL};t.sort((function(t,e){return t.rect.width*t.rect.height>e.rect.width*e.rect.height?-1:t.rect.width*t.rect.height0&&(o+=t.horizontalPadding),t.rowWidth[i]=o,t.width0&&(s+=t.verticalPadding);var a=0;s>t.rowHeight[i]&&(a=t.rowHeight[i],t.rowHeight[i]=s,a=t.rowHeight[i]-a),t.height+=a,t.rows[i].push(e)},_.prototype.getShortestRowIndex=function(t){for(var e=-1,i=Number.MAX_VALUE,n=0;ni&&(e=n,i=t.rowWidth[n]);return e},_.prototype.canAddHorizontal=function(t,e,i){var n=this.getShortestRowIndex(t);if(n<0)return!0;var r=t.rowWidth[n];if(r+t.horizontalPadding+e<=t.width)return!0;var o,s,a=0;return t.rowHeight[n]0&&(a=i+t.verticalPadding-t.rowHeight[n]),o=t.width-r>=e+t.horizontalPadding?(t.height+a)/(r+e+t.horizontalPadding):(t.height+a)/t.width,a=i+t.verticalPadding,(s=t.widtho&&e!=i){n.splice(-1,1),t.rows[i].push(r),t.rowWidth[e]=t.rowWidth[e]-o,t.rowWidth[i]=t.rowWidth[i]+o,t.width=t.rowWidth[instance.getLongestRowIndex(t)];for(var s=Number.MIN_VALUE,a=0;as&&(s=n[a].height);e>0&&(s+=t.verticalPadding);var h=t.rowHeight[e]+t.rowHeight[i];t.rowHeight[e]=s,t.rowHeight[i]0)for(var c=r;c<=o;c++)h[0]+=this.grid[c][s-1].length+this.grid[c][s].length-1;if(o0)for(c=s;c<=a;c++)h[3]+=this.grid[r-1][c].length+this.grid[r][c].length-1;for(var g,u,d=p.MAX_VALUE,f=0;f0&&(s=i.getGraphManager().add(i.newGraph(),o),this.processChildrenList(s,g,i))}},g.prototype.stop=function(){return this.stopped=!0,this};var d=function(t){t("layout","cose-bilkent",g)};"undefined"!=typeof cytoscape&&d(cytoscape),t.exports=d}])},t.exports=n(i(87799))},23143:function(t){var e;e=function(){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=t,i.c=e,i.i=function(t){return t},i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=26)}([function(t,e,i){"use strict";function n(){}n.QUALITY=1,n.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,n.DEFAULT_INCREMENTAL=!1,n.DEFAULT_ANIMATION_ON_LAYOUT=!0,n.DEFAULT_ANIMATION_DURING_LAYOUT=!1,n.DEFAULT_ANIMATION_PERIOD=50,n.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,n.DEFAULT_GRAPH_MARGIN=15,n.NODE_DIMENSIONS_INCLUDE_LABELS=!1,n.SIMPLE_NODE_SIZE=40,n.SIMPLE_NODE_HALF_SIZE=n.SIMPLE_NODE_SIZE/2,n.EMPTY_COMPOUND_NODE_SIZE=40,n.MIN_EDGE_LENGTH=1,n.WORLD_BOUNDARY=1e6,n.INITIAL_WORLD_BOUNDARY=n.WORLD_BOUNDARY/1e3,n.WORLD_CENTER_X=1200,n.WORLD_CENTER_Y=900,t.exports=n},function(t,e,i){"use strict";var n=i(2),r=i(8),o=i(9);function s(t,e,i){n.call(this,i),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=i,this.bendpoints=[],this.source=t,this.target=e}for(var a in s.prototype=Object.create(n.prototype),n)s[a]=n[a];s.prototype.getSource=function(){return this.source},s.prototype.getTarget=function(){return this.target},s.prototype.isInterGraph=function(){return this.isInterGraph},s.prototype.getLength=function(){return this.length},s.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},s.prototype.getBendpoints=function(){return this.bendpoints},s.prototype.getLca=function(){return this.lca},s.prototype.getSourceInLca=function(){return this.sourceInLca},s.prototype.getTargetInLca=function(){return this.targetInLca},s.prototype.getOtherEnd=function(t){if(this.source===t)return this.target;if(this.target===t)return this.source;throw"Node is not incident with this edge"},s.prototype.getOtherEndInGraph=function(t,e){for(var i=this.getOtherEnd(t),n=e.getGraphManager().getRoot();;){if(i.getOwner()==e)return i;if(i.getOwner()==n)break;i=i.getOwner().getParent()}return null},s.prototype.updateLength=function(){var t=new Array(4);this.isOverlapingSourceAndTarget=r.getIntersection(this.target.getRect(),this.source.getRect(),t),this.isOverlapingSourceAndTarget||(this.lengthX=t[0]-t[2],this.lengthY=t[1]-t[3],Math.abs(this.lengthX)<1&&(this.lengthX=o.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=o.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},s.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=o.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=o.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},t.exports=s},function(t,e,i){"use strict";t.exports=function(t){this.vGraphObject=t}},function(t,e,i){"use strict";var n=i(2),r=i(10),o=i(13),s=i(0),a=i(16),h=i(4);function l(t,e,i,s){null==i&&null==s&&(s=e),n.call(this,s),null!=t.graphManager&&(t=t.graphManager),this.estimatedSize=r.MIN_VALUE,this.inclusionTreeDepth=r.MAX_VALUE,this.vGraphObject=s,this.edges=[],this.graphManager=t,this.rect=null!=i&&null!=e?new o(e.x,e.y,i.width,i.height):new o}for(var c in l.prototype=Object.create(n.prototype),n)l[c]=n[c];l.prototype.getEdges=function(){return this.edges},l.prototype.getChild=function(){return this.child},l.prototype.getOwner=function(){return this.owner},l.prototype.getWidth=function(){return this.rect.width},l.prototype.setWidth=function(t){this.rect.width=t},l.prototype.getHeight=function(){return this.rect.height},l.prototype.setHeight=function(t){this.rect.height=t},l.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},l.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},l.prototype.getCenter=function(){return new h(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},l.prototype.getLocation=function(){return new h(this.rect.x,this.rect.y)},l.prototype.getRect=function(){return this.rect},l.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},l.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},l.prototype.setRect=function(t,e){this.rect.x=t.x,this.rect.y=t.y,this.rect.width=e.width,this.rect.height=e.height},l.prototype.setCenter=function(t,e){this.rect.x=t-this.rect.width/2,this.rect.y=e-this.rect.height/2},l.prototype.setLocation=function(t,e){this.rect.x=t,this.rect.y=e},l.prototype.moveBy=function(t,e){this.rect.x+=t,this.rect.y+=e},l.prototype.getEdgeListToNode=function(t){var e=[],i=this;return i.edges.forEach((function(n){if(n.target==t){if(n.source!=i)throw"Incorrect edge source!";e.push(n)}})),e},l.prototype.getEdgesBetween=function(t){var e=[],i=this;return i.edges.forEach((function(n){if(n.source!=i&&n.target!=i)throw"Incorrect edge source and/or target";n.target!=t&&n.source!=t||e.push(n)})),e},l.prototype.getNeighborsList=function(){var t=new Set,e=this;return e.edges.forEach((function(i){if(i.source==e)t.add(i.target);else{if(i.target!=e)throw"Incorrect incidency!";t.add(i.source)}})),t},l.prototype.withChildren=function(){var t=new Set;if(t.add(this),null!=this.child)for(var e=this.child.getNodes(),i=0;ie&&(this.rect.x-=(this.labelWidth-e)/2,this.setWidth(this.labelWidth)),this.labelHeight>i&&("center"==this.labelPos?this.rect.y-=(this.labelHeight-i)/2:"top"==this.labelPos&&(this.rect.y-=this.labelHeight-i),this.setHeight(this.labelHeight))}}},l.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==r.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},l.prototype.transform=function(t){var e=this.rect.x;e>s.WORLD_BOUNDARY?e=s.WORLD_BOUNDARY:e<-s.WORLD_BOUNDARY&&(e=-s.WORLD_BOUNDARY);var i=this.rect.y;i>s.WORLD_BOUNDARY?i=s.WORLD_BOUNDARY:i<-s.WORLD_BOUNDARY&&(i=-s.WORLD_BOUNDARY);var n=new h(e,i),r=t.inverseTransformPoint(n);this.setLocation(r.x,r.y)},l.prototype.getLeft=function(){return this.rect.x},l.prototype.getRight=function(){return this.rect.x+this.rect.width},l.prototype.getTop=function(){return this.rect.y},l.prototype.getBottom=function(){return this.rect.y+this.rect.height},l.prototype.getParent=function(){return null==this.owner?null:this.owner.getParent()},t.exports=l},function(t,e,i){"use strict";function n(t,e){null==t&&null==e?(this.x=0,this.y=0):(this.x=t,this.y=e)}n.prototype.getX=function(){return this.x},n.prototype.getY=function(){return this.y},n.prototype.setX=function(t){this.x=t},n.prototype.setY=function(t){this.y=t},n.prototype.getDifference=function(t){return new DimensionD(this.x-t.x,this.y-t.y)},n.prototype.getCopy=function(){return new n(this.x,this.y)},n.prototype.translate=function(t){return this.x+=t.width,this.y+=t.height,this},t.exports=n},function(t,e,i){"use strict";var n=i(2),r=i(10),o=i(0),s=i(6),a=i(3),h=i(1),l=i(13),c=i(12),g=i(11);function u(t,e,i){n.call(this,i),this.estimatedSize=r.MIN_VALUE,this.margin=o.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=t,null!=e&&e instanceof s?this.graphManager=e:null!=e&&e instanceof Layout&&(this.graphManager=e.graphManager)}for(var d in u.prototype=Object.create(n.prototype),n)u[d]=n[d];u.prototype.getNodes=function(){return this.nodes},u.prototype.getEdges=function(){return this.edges},u.prototype.getGraphManager=function(){return this.graphManager},u.prototype.getParent=function(){return this.parent},u.prototype.getLeft=function(){return this.left},u.prototype.getRight=function(){return this.right},u.prototype.getTop=function(){return this.top},u.prototype.getBottom=function(){return this.bottom},u.prototype.isConnected=function(){return this.isConnected},u.prototype.add=function(t,e,i){if(null==e&&null==i){var n=t;if(null==this.graphManager)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(n)>-1)throw"Node already in graph!";return n.owner=this,this.getNodes().push(n),n}var r=t;if(!(this.getNodes().indexOf(e)>-1&&this.getNodes().indexOf(i)>-1))throw"Source or target not in graph!";if(e.owner!=i.owner||e.owner!=this)throw"Both owners must be this graph!";return e.owner!=i.owner?null:(r.source=e,r.target=i,r.isInterGraph=!1,this.getEdges().push(r),e.edges.push(r),i!=e&&i.edges.push(r),r)},u.prototype.remove=function(t){var e=t;if(t instanceof a){if(null==e)throw"Node is null!";if(null==e.owner||e.owner!=this)throw"Owner graph is invalid!";if(null==this.graphManager)throw"Owner graph manager is invalid!";for(var i=e.edges.slice(),n=i.length,r=0;r-1&&c>-1))throw"Source and/or target doesn't know this edge!";if(o.source.edges.splice(l,1),o.target!=o.source&&o.target.edges.splice(c,1),-1==(s=o.source.owner.getEdges().indexOf(o)))throw"Not in owner's edge list!";o.source.owner.getEdges().splice(s,1)}},u.prototype.updateLeftTop=function(){for(var t,e,i,n=r.MAX_VALUE,o=r.MAX_VALUE,s=this.getNodes(),a=s.length,h=0;h(t=l.getTop())&&(n=t),o>(e=l.getLeft())&&(o=e)}return n==r.MAX_VALUE?null:(i=null!=s[0].getParent().paddingLeft?s[0].getParent().paddingLeft:this.margin,this.left=o-i,this.top=n-i,new c(this.left,this.top))},u.prototype.updateBounds=function(t){for(var e,i,n,o,s,a=r.MAX_VALUE,h=-r.MAX_VALUE,c=r.MAX_VALUE,g=-r.MAX_VALUE,u=this.nodes,d=u.length,p=0;p(e=f.getLeft())&&(a=e),h<(i=f.getRight())&&(h=i),c>(n=f.getTop())&&(c=n),g<(o=f.getBottom())&&(g=o)}var y=new l(a,c,h-a,g-c);a==r.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),s=null!=u[0].getParent().paddingLeft?u[0].getParent().paddingLeft:this.margin,this.left=y.x-s,this.right=y.x+y.width+s,this.top=y.y-s,this.bottom=y.y+y.height+s},u.calculateBounds=function(t){for(var e,i,n,o,s=r.MAX_VALUE,a=-r.MAX_VALUE,h=r.MAX_VALUE,c=-r.MAX_VALUE,g=t.length,u=0;u(e=d.getLeft())&&(s=e),a<(i=d.getRight())&&(a=i),h>(n=d.getTop())&&(h=n),c<(o=d.getBottom())&&(c=o)}return new l(s,h,a-s,c-h)},u.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},u.prototype.getEstimatedSize=function(){if(this.estimatedSize==r.MIN_VALUE)throw"assert failed";return this.estimatedSize},u.prototype.calcEstimatedSize=function(){for(var t=0,e=this.nodes,i=e.length,n=0;n=this.nodes.length){var h=0;r.forEach((function(e){e.owner==t&&h++})),h==this.nodes.length&&(this.isConnected=!0)}}else this.isConnected=!0},t.exports=u},function(t,e,i){"use strict";var n,r=i(1);function o(t){n=i(5),this.layout=t,this.graphs=[],this.edges=[]}o.prototype.addRoot=function(){var t=this.layout.newGraph(),e=this.layout.newNode(null),i=this.add(t,e);return this.setRootGraph(i),this.rootGraph},o.prototype.add=function(t,e,i,n,r){if(null==i&&null==n&&null==r){if(null==t)throw"Graph is null!";if(null==e)throw"Parent node is null!";if(this.graphs.indexOf(t)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(t),null!=t.parent)throw"Already has a parent!";if(null!=e.child)throw"Already has a child!";return t.parent=e,e.child=t,t}r=i,i=t;var o=(n=e).getOwner(),s=r.getOwner();if(null==o||o.getGraphManager()!=this)throw"Source not in this graph mgr!";if(null==s||s.getGraphManager()!=this)throw"Target not in this graph mgr!";if(o==s)return i.isInterGraph=!1,o.add(i,n,r);if(i.isInterGraph=!0,i.source=n,i.target=r,this.edges.indexOf(i)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(i),null==i.source||null==i.target)throw"Edge source and/or target is null!";if(-1!=i.source.edges.indexOf(i)||-1!=i.target.edges.indexOf(i))throw"Edge already in source and/or target incidency list!";return i.source.edges.push(i),i.target.edges.push(i),i},o.prototype.remove=function(t){if(t instanceof n){var e=t;if(e.getGraphManager()!=this)throw"Graph not in this graph mgr";if(e!=this.rootGraph&&(null==e.parent||e.parent.graphManager!=this))throw"Invalid parent node!";for(var i,o=[],s=(o=o.concat(e.getEdges())).length,a=0;a=e.getRight()?i[0]+=Math.min(e.getX()-t.getX(),t.getRight()-e.getRight()):e.getX()<=t.getX()&&e.getRight()>=t.getRight()&&(i[0]+=Math.min(t.getX()-e.getX(),e.getRight()-t.getRight())),t.getY()<=e.getY()&&t.getBottom()>=e.getBottom()?i[1]+=Math.min(e.getY()-t.getY(),t.getBottom()-e.getBottom()):e.getY()<=t.getY()&&e.getBottom()>=t.getBottom()&&(i[1]+=Math.min(t.getY()-e.getY(),e.getBottom()-t.getBottom()));var o=Math.abs((e.getCenterY()-t.getCenterY())/(e.getCenterX()-t.getCenterX()));e.getCenterY()===t.getCenterY()&&e.getCenterX()===t.getCenterX()&&(o=1);var s=o*i[0],a=i[1]/o;i[0]s)return i[0]=n,i[1]=h,i[2]=o,i[3]=m,!1;if(ro)return i[0]=a,i[1]=r,i[2]=E,i[3]=s,!1;if(no?(i[0]=c,i[1]=g,L=!0):(i[0]=l,i[1]=h,L=!0):O===I&&(n>o?(i[0]=a,i[1]=h,L=!0):(i[0]=u,i[1]=g,L=!0)),-D===I?o>n?(i[2]=_,i[3]=m,T=!0):(i[2]=E,i[3]=y,T=!0):D===I&&(o>n?(i[2]=f,i[3]=y,T=!0):(i[2]=v,i[3]=m,T=!0)),L&&T)return!1;if(n>o?r>s?(w=this.getCardinalDirection(O,I,4),R=this.getCardinalDirection(D,I,2)):(w=this.getCardinalDirection(-O,I,3),R=this.getCardinalDirection(-D,I,1)):r>s?(w=this.getCardinalDirection(-O,I,1),R=this.getCardinalDirection(-D,I,3)):(w=this.getCardinalDirection(O,I,2),R=this.getCardinalDirection(D,I,4)),!L)switch(w){case 1:M=h,C=n+-p/I,i[0]=C,i[1]=M;break;case 2:C=u,M=r+d*I,i[0]=C,i[1]=M;break;case 3:M=g,C=n+p/I,i[0]=C,i[1]=M;break;case 4:C=c,M=r+-d*I,i[0]=C,i[1]=M}if(!T)switch(R){case 1:G=y,x=o+-A/I,i[2]=x,i[3]=G;break;case 2:x=v,G=s+N*I,i[2]=x,i[3]=G;break;case 3:G=m,x=o+A/I,i[2]=x,i[3]=G;break;case 4:x=_,G=s+-N*I,i[2]=x,i[3]=G}}return!1},r.getCardinalDirection=function(t,e,i){return t>e?i:1+i%4},r.getIntersection=function(t,e,i,r){if(null==r)return this.getIntersection2(t,e,i);var o,s,a,h,l,c,g,u=t.x,d=t.y,p=e.x,f=e.y,y=i.x,E=i.y,_=r.x,m=r.y;return 0==(g=(o=f-d)*(h=y-_)-(s=m-E)*(a=u-p))?null:new n((a*(c=_*E-y*m)-h*(l=p*d-u*f))/g,(s*l-o*c)/g)},r.angleOfVector=function(t,e,i,n){var r=void 0;return t!==i?(r=Math.atan((n-e)/(i-t)),i0?1:t<0?-1:0},n.floor=function(t){return t<0?Math.ceil(t):Math.floor(t)},n.ceil=function(t){return t<0?Math.floor(t):Math.ceil(t)},t.exports=n},function(t,e,i){"use strict";function n(){}n.MAX_VALUE=2147483647,n.MIN_VALUE=-2147483648,t.exports=n},function(t,e,i){"use strict";var n=function(){function t(t,e){for(var i=0;i0&&e;){for(a.push(l[0]);a.length>0&&e;){var c=a[0];a.splice(0,1),s.add(c);var g=c.getEdges();for(o=0;o-1&&l.splice(f,1)}s=new Set,h=new Map}else t=[]}return t},u.prototype.createDummyNodesForBendpoints=function(t){for(var e=[],i=t.source,n=this.graphManager.calcLowestCommonAncestor(t.source,t.target),r=0;r0){for(var r=this.edgeToDummyNodes.get(i),o=0;o=0&&e.splice(g,1),c.getNeighborsList().forEach((function(t){if(i.indexOf(t)<0){var e=n.get(t)-1;1==e&&h.push(t),n.set(t,e)}}))}i=i.concat(h),1!=e.length&&2!=e.length||(r=!0,o=e[0])}return o},u.prototype.setGraphManager=function(t){this.graphManager=t},t.exports=u},function(t,e,i){"use strict";function n(){}n.seed=1,n.x=0,n.nextDouble=function(){return n.x=1e4*Math.sin(n.seed++),n.x-Math.floor(n.x)},t.exports=n},function(t,e,i){"use strict";var n=i(4);function r(t,e){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}r.prototype.getWorldOrgX=function(){return this.lworldOrgX},r.prototype.setWorldOrgX=function(t){this.lworldOrgX=t},r.prototype.getWorldOrgY=function(){return this.lworldOrgY},r.prototype.setWorldOrgY=function(t){this.lworldOrgY=t},r.prototype.getWorldExtX=function(){return this.lworldExtX},r.prototype.setWorldExtX=function(t){this.lworldExtX=t},r.prototype.getWorldExtY=function(){return this.lworldExtY},r.prototype.setWorldExtY=function(t){this.lworldExtY=t},r.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},r.prototype.setDeviceOrgX=function(t){this.ldeviceOrgX=t},r.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},r.prototype.setDeviceOrgY=function(t){this.ldeviceOrgY=t},r.prototype.getDeviceExtX=function(){return this.ldeviceExtX},r.prototype.setDeviceExtX=function(t){this.ldeviceExtX=t},r.prototype.getDeviceExtY=function(){return this.ldeviceExtY},r.prototype.setDeviceExtY=function(t){this.ldeviceExtY=t},r.prototype.transformX=function(t){var e=0,i=this.lworldExtX;return 0!=i&&(e=this.ldeviceOrgX+(t-this.lworldOrgX)*this.ldeviceExtX/i),e},r.prototype.transformY=function(t){var e=0,i=this.lworldExtY;return 0!=i&&(e=this.ldeviceOrgY+(t-this.lworldOrgY)*this.ldeviceExtY/i),e},r.prototype.inverseTransformX=function(t){var e=0,i=this.ldeviceExtX;return 0!=i&&(e=this.lworldOrgX+(t-this.ldeviceOrgX)*this.lworldExtX/i),e},r.prototype.inverseTransformY=function(t){var e=0,i=this.ldeviceExtY;return 0!=i&&(e=this.lworldOrgY+(t-this.ldeviceOrgY)*this.lworldExtY/i),e},r.prototype.inverseTransformPoint=function(t){return new n(this.inverseTransformX(t.x),this.inverseTransformY(t.y))},t.exports=r},function(t,e,i){"use strict";var n=i(15),r=i(7),o=i(0),s=i(8),a=i(9);function h(){n.call(this),this.useSmartIdealEdgeLengthCalculation=r.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.idealEdgeLength=r.DEFAULT_EDGE_LENGTH,this.springConstant=r.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=r.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=r.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=r.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=r.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=r.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*r.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=r.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=r.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=r.MAX_ITERATIONS}for(var l in h.prototype=Object.create(n.prototype),n)h[l]=n[l];h.prototype.initParameters=function(){n.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=r.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},h.prototype.calcIdealEdgeLengths=function(){for(var t,e,i,n,s,a,h=this.getGraphManager().getAllEdges(),l=0;lr.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*r.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-r.ADAPTATION_LOWER_NODE_LIMIT)/(r.ADAPTATION_UPPER_NODE_LIMIT-r.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-r.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=r.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>r.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(r.COOLING_ADAPTATION_FACTOR,1-(t-r.ADAPTATION_LOWER_NODE_LIMIT)/(r.ADAPTATION_UPPER_NODE_LIMIT-r.ADAPTATION_LOWER_NODE_LIMIT)*(1-r.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=r.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(5*this.getAllNodes().length,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},h.prototype.calcSpringForces=function(){for(var t,e=this.getAllEdges(),i=0;i0&&void 0!==arguments[0])||arguments[0],a=arguments.length>1&&void 0!==arguments[1]&&arguments[1],h=this.getAllNodes();if(this.useFRGridVariant)for(this.totalIterations%r.GRID_CALCULATION_CHECK_PERIOD==1&&s&&this.updateGrid(),o=new Set,t=0;t(h=e.getEstimatedSize()*this.gravityRangeFactor)||a>h)&&(t.gravitationForceX=-this.gravityConstant*r,t.gravitationForceY=-this.gravityConstant*o):(s>(h=e.getEstimatedSize()*this.compoundGravityRangeFactor)||a>h)&&(t.gravitationForceX=-this.gravityConstant*r*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*o*this.compoundGravityConstant)},h.prototype.isConverged=function(){var t,e=!1;return this.totalIterations>this.maxIterations/3&&(e=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement=a.length||l>=a[0].length))for(var c=0;ct}}]),t}();t.exports=o},function(t,e,i){"use strict";var n=function(){function t(t,e){for(var i=0;i2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.sequence1=e,this.sequence2=i,this.match_score=n,this.mismatch_penalty=r,this.gap_penalty=o,this.iMax=e.length+1,this.jMax=i.length+1,this.grid=new Array(this.iMax);for(var s=0;s=0;i--){var n=this.listeners[i];n.event===t&&n.callback===e&&this.listeners.splice(i,1)}},r.emit=function(t,e){for(var i=0;i{"use strict";i.d(e,{diagram:()=>X});var n=i(86825),r=i(85039),o=i(61021),s=i(45567),a=i(90165),h=i(43457),l=i(20007),c=i(3219),g=i(78041),u=i(75263),d=function(){var t=(0,s.K2)((function(t,e,i,n){for(i=i||{},n=t.length;n--;i[t[n]]=e);return i}),"o"),e=[1,4],i=[1,13],n=[1,12],r=[1,15],o=[1,16],a=[1,20],h=[1,19],l=[6,7,8],c=[1,26],g=[1,24],u=[1,25],d=[6,7,11],p=[1,6,13,15,16,19,22],f=[1,33],y=[1,34],E=[1,6,7,11,13,15,16,19,22],_={trace:(0,s.K2)((function(){}),"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:(0,s.K2)((function(t,e,i,n,r,o,s){var a=o.length-1;switch(r){case 6:case 7:return n;case 8:n.getLogger().trace("Stop NL ");break;case 9:n.getLogger().trace("Stop EOF ");break;case 11:n.getLogger().trace("Stop NL2 ");break;case 12:n.getLogger().trace("Stop EOF2 ");break;case 15:n.getLogger().info("Node: ",o[a].id),n.addNode(o[a-1].length,o[a].id,o[a].descr,o[a].type);break;case 16:n.getLogger().trace("Icon: ",o[a]),n.decorateNode({icon:o[a]});break;case 17:case 21:n.decorateNode({class:o[a]});break;case 18:n.getLogger().trace("SPACELIST");break;case 19:n.getLogger().trace("Node: ",o[a].id),n.addNode(0,o[a].id,o[a].descr,o[a].type);break;case 20:n.decorateNode({icon:o[a]});break;case 25:n.getLogger().trace("node found ..",o[a-2]),this.$={id:o[a-1],descr:o[a-1],type:n.getType(o[a-2],o[a])};break;case 26:this.$={id:o[a],descr:o[a],type:n.nodeType.DEFAULT};break;case 27:n.getLogger().trace("node found ..",o[a-3]),this.$={id:o[a-3],descr:o[a-1],type:n.getType(o[a-2],o[a])}}}),"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:e},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:e},{6:i,7:[1,10],9:9,12:11,13:n,14:14,15:r,16:o,17:17,18:18,19:a,22:h},t(l,[2,3]),{1:[2,2]},t(l,[2,4]),t(l,[2,5]),{1:[2,6],6:i,12:21,13:n,14:14,15:r,16:o,17:17,18:18,19:a,22:h},{6:i,9:22,12:11,13:n,14:14,15:r,16:o,17:17,18:18,19:a,22:h},{6:c,7:g,10:23,11:u},t(d,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:a,22:h}),t(d,[2,18]),t(d,[2,19]),t(d,[2,20]),t(d,[2,21]),t(d,[2,23]),t(d,[2,24]),t(d,[2,26],{19:[1,30]}),{20:[1,31]},{6:c,7:g,10:32,11:u},{1:[2,7],6:i,12:21,13:n,14:14,15:r,16:o,17:17,18:18,19:a,22:h},t(p,[2,14],{7:f,11:y}),t(E,[2,8]),t(E,[2,9]),t(E,[2,10]),t(d,[2,15]),t(d,[2,16]),t(d,[2,17]),{20:[1,35]},{21:[1,36]},t(p,[2,13],{7:f,11:y}),t(E,[2,11]),t(E,[2,12]),{21:[1,37]},t(d,[2,25]),t(d,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:(0,s.K2)((function(t,e){if(!e.recoverable){var i=new Error(t);throw i.hash=e,i}this.trace(t)}),"parseError"),parse:(0,s.K2)((function(t){var e=this,i=[0],n=[],r=[null],o=[],a=this.table,h="",l=0,c=0,g=0,u=o.slice.call(arguments,1),d=Object.create(this.lexer),p={yy:{}};for(var f in this.yy)Object.prototype.hasOwnProperty.call(this.yy,f)&&(p.yy[f]=this.yy[f]);d.setInput(t,p.yy),p.yy.lexer=d,p.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var y=d.yylloc;o.push(y);var E=d.options&&d.options.ranges;function _(){var t;return"number"!=typeof(t=n.pop()||d.lex()||1)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,s.K2)((function(t){i.length=i.length-2*t,r.length=r.length-t,o.length=o.length-t}),"popStack"),(0,s.K2)(_,"lex");for(var m,v,N,A,L,T,O,D,I,w={};;){if(N=i[i.length-1],this.defaultActions[N]?A=this.defaultActions[N]:(null==m&&(m=_()),A=a[N]&&a[N][m]),void 0===A||!A.length||!A[0]){var R="";for(T in I=[],a[N])this.terminals_[T]&&T>2&&I.push("'"+this.terminals_[T]+"'");R=d.showPosition?"Parse error on line "+(l+1)+":\n"+d.showPosition()+"\nExpecting "+I.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(R,{text:d.match,token:this.terminals_[m]||m,line:d.yylineno,loc:y,expected:I})}if(A[0]instanceof Array&&A.length>1)throw new Error("Parse Error: multiple actions possible at state: "+N+", token: "+m);switch(A[0]){case 1:i.push(m),r.push(d.yytext),o.push(d.yylloc),i.push(A[1]),m=null,v?(m=v,v=null):(c=d.yyleng,h=d.yytext,l=d.yylineno,y=d.yylloc,g>0&&g--);break;case 2:if(O=this.productions_[A[1]][1],w.$=r[r.length-O],w._$={first_line:o[o.length-(O||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(O||1)].first_column,last_column:o[o.length-1].last_column},E&&(w._$.range=[o[o.length-(O||1)].range[0],o[o.length-1].range[1]]),void 0!==(L=this.performAction.apply(w,[h,c,l,p.yy,A[1],r,o].concat(u))))return L;O&&(i=i.slice(0,-1*O*2),r=r.slice(0,-1*O),o=o.slice(0,-1*O)),i.push(this.productions_[A[1]][0]),r.push(w.$),o.push(w._$),D=a[i[i.length-2]][i[i.length-1]],i.push(D);break;case 3:return!0}}return!0}),"parse")},m=function(){return{EOF:1,parseError:(0,s.K2)((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:(0,s.K2)((function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this}),"setInput"),input:(0,s.K2)((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t}),"input"),unput:(0,s.K2)((function(t){var e=t.length,i=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),i.length-1&&(this.yylineno-=i.length-1);var r=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:i?(i.length===n.length?this.yylloc.first_column:0)+n[n.length-i.length].length-i[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"unput"),more:(0,s.K2)((function(){return this._more=!0,this}),"more"),reject:(0,s.K2)((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:(0,s.K2)((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:(0,s.K2)((function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:(0,s.K2)((function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:(0,s.K2)((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:(0,s.K2)((function(t,e){var i,n,r;if(this.options.backtrack_lexer&&(r={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(r.yylloc.range=this.yylloc.range.slice(0))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],i=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack){for(var o in r)this[o]=r[o];return!1}return!1}),"test_match"),next:(0,s.K2)((function(){if(this.done)return this.EOF;var t,e,i,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),o=0;oe[0].length)){if(e=i,n=o,this.options.backtrack_lexer){if(!1!==(t=this.test_match(i,r[o])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,r[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:(0,s.K2)((function(){var t=this.next();return t||this.lex()}),"lex"),begin:(0,s.K2)((function(t){this.conditionStack.push(t)}),"begin"),popState:(0,s.K2)((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:(0,s.K2)((function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules}),"_currentRules"),topState:(0,s.K2)((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:(0,s.K2)((function(t){this.begin(t)}),"pushState"),stateStackSize:(0,s.K2)((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,s.K2)((function(t,e,i,n){switch(i){case 0:return t.getLogger().trace("Found comment",e.yytext),6;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;case 4:case 23:case 26:this.popState();break;case 5:t.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return t.getLogger().trace("SPACELINE"),6;case 7:return 7;case 8:return 15;case 9:t.getLogger().trace("end icon"),this.popState();break;case 10:return t.getLogger().trace("Exploding node"),this.begin("NODE"),19;case 11:return t.getLogger().trace("Cloud"),this.begin("NODE"),19;case 12:return t.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;case 13:return t.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;case 14:case 15:case 16:case 17:return this.begin("NODE"),19;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 24:t.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return t.getLogger().trace("description:",e.yytext),"NODE_DESCR";case 27:return this.popState(),t.getLogger().trace("node end ))"),"NODE_DEND";case 28:return this.popState(),t.getLogger().trace("node end )"),"NODE_DEND";case 29:return this.popState(),t.getLogger().trace("node end ...",e.yytext),"NODE_DEND";case 30:case 33:case 34:return this.popState(),t.getLogger().trace("node end (("),"NODE_DEND";case 31:case 32:return this.popState(),t.getLogger().trace("node end (-"),"NODE_DEND";case 35:case 36:return t.getLogger().trace("Long description:",e.yytext),20}}),"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}}}();function v(){this.yy={}}return _.lexer=m,(0,s.K2)(v,"Parser"),v.prototype=_,_.Parser=v,new v}();d.parser=d;var p=d,f=[],y=0,E={},_=(0,s.K2)((()=>{f=[],y=0,E={}}),"clear"),m=(0,s.K2)((function(t){for(let e=f.length-1;e>=0;e--)if(f[e].levelf.length>0?f[0]:null),"getMindmap"),N=(0,s.K2)(((t,e,i,n)=>{s.Rm.info("addNode",t,e,i,n);const r=(0,s.D7)();let o=r.mindmap?.padding??s.UI.mindmap.padding;switch(n){case A.ROUNDED_RECT:case A.RECT:case A.HEXAGON:o*=2}const a={id:y++,nodeId:(0,s.jZ)(e,r),level:t,descr:(0,s.jZ)(i,r),type:n,children:[],width:r.mindmap?.maxNodeWidth??s.UI.mindmap.maxNodeWidth,padding:o},h=m(t);if(h)h.children.push(a),f.push(a);else{if(0!==f.length)throw new Error('There can be only one root. No parent could be found for ("'+a.descr+'")');f.push(a)}}),"addNode"),A={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},L={clear:_,addNode:N,getMindmap:v,nodeType:A,getType:(0,s.K2)(((t,e)=>{switch(s.Rm.debug("In get type",t,e),t){case"[":return A.RECT;case"(":return")"===e?A.ROUNDED_RECT:A.CLOUD;case"((":return A.CIRCLE;case")":return A.CLOUD;case"))":return A.BANG;case"{{":return A.HEXAGON;default:return A.DEFAULT}}),"getType"),setElementForId:(0,s.K2)(((t,e)=>{E[t]=e}),"setElementForId"),decorateNode:(0,s.K2)((t=>{if(!t)return;const e=(0,s.D7)(),i=f[f.length-1];t.icon&&(i.icon=(0,s.jZ)(t.icon,e)),t.class&&(i.class=(0,s.jZ)(t.class,e))}),"decorateNode"),type2Str:(0,s.K2)((t=>{switch(t){case A.DEFAULT:return"no-border";case A.RECT:return"rect";case A.ROUNDED_RECT:return"rounded-rect";case A.CIRCLE:return"circle";case A.CLOUD:return"cloud";case A.BANG:return"bang";case A.HEXAGON:return"hexgon";default:return"no-border"}}),"type2Str"),getLogger:(0,s.K2)((()=>s.Rm),"getLogger"),getElementById:(0,s.K2)((t=>E[t]),"getElementById")},T=(0,s.K2)((function(t,e,i,n){e.append("path").attr("id","node-"+i.id).attr("class","node-bkg node-"+t.type2Str(i.type)).attr("d",`M0 ${i.height-5} v${10-i.height} q0,-5 5,-5 h${i.width-10} q5,0 5,5 v${i.height-5} H0 Z`),e.append("line").attr("class","node-line-"+n).attr("x1",0).attr("y1",i.height).attr("x2",i.width).attr("y2",i.height)}),"defaultBkg"),O=(0,s.K2)((function(t,e,i){e.append("rect").attr("id","node-"+i.id).attr("class","node-bkg node-"+t.type2Str(i.type)).attr("height",i.height).attr("width",i.width)}),"rectBkg"),D=(0,s.K2)((function(t,e,i){const n=i.width,r=i.height,o=.15*n,s=.25*n,a=.35*n,h=.2*n;e.append("path").attr("id","node-"+i.id).attr("class","node-bkg node-"+t.type2Str(i.type)).attr("d",`M0 0 a${o},${o} 0 0,1 ${.25*n},${-1*n*.1}\n a${a},${a} 1 0,1 ${.4*n},${-1*n*.1}\n a${s},${s} 1 0,1 ${.35*n},${1*n*.2}\n\n a${o},${o} 1 0,1 ${.15*n},${1*r*.35}\n a${h},${h} 1 0,1 ${-1*n*.15},${1*r*.65}\n\n a${s},${o} 1 0,1 ${-1*n*.25},${.15*n}\n a${a},${a} 1 0,1 ${-1*n*.5},0\n a${o},${o} 1 0,1 ${-1*n*.25},${-1*n*.15}\n\n a${o},${o} 1 0,1 ${-1*n*.1},${-1*r*.35}\n a${h},${h} 1 0,1 ${.1*n},${-1*r*.65}\n\n H0 V0 Z`)}),"cloudBkg"),I=(0,s.K2)((function(t,e,i){const n=i.width,r=i.height,o=.15*n;e.append("path").attr("id","node-"+i.id).attr("class","node-bkg node-"+t.type2Str(i.type)).attr("d",`M0 0 a${o},${o} 1 0,0 ${.25*n},${-1*r*.1}\n a${o},${o} 1 0,0 ${.25*n},0\n a${o},${o} 1 0,0 ${.25*n},0\n a${o},${o} 1 0,0 ${.25*n},${1*r*.1}\n\n a${o},${o} 1 0,0 ${.15*n},${1*r*.33}\n a${.8*o},${.8*o} 1 0,0 0,${1*r*.34}\n a${o},${o} 1 0,0 ${-1*n*.15},${1*r*.33}\n\n a${o},${o} 1 0,0 ${-1*n*.25},${.15*r}\n a${o},${o} 1 0,0 ${-1*n*.25},0\n a${o},${o} 1 0,0 ${-1*n*.25},0\n a${o},${o} 1 0,0 ${-1*n*.25},${-1*r*.15}\n\n a${o},${o} 1 0,0 ${-1*n*.1},${-1*r*.33}\n a${.8*o},${.8*o} 1 0,0 0,${-1*r*.34}\n a${o},${o} 1 0,0 ${.1*n},${-1*r*.33}\n\n H0 V0 Z`)}),"bangBkg"),w=(0,s.K2)((function(t,e,i){e.append("circle").attr("id","node-"+i.id).attr("class","node-bkg node-"+t.type2Str(i.type)).attr("r",i.width/2)}),"circleBkg");function R(t,e,i,n,r){return t.insert("polygon",":first-child").attr("points",n.map((function(t){return t.x+","+t.y})).join(" ")).attr("transform","translate("+(r.width-e)/2+", "+i+")")}(0,s.K2)(R,"insertPolygonShape");var C=(0,s.K2)((function(t,e,i){const n=i.height,r=n/4,o=i.width-i.padding+2*r;R(e,o,n,[{x:r,y:0},{x:o-r,y:0},{x:o,y:-n/2},{x:o-r,y:-n},{x:r,y:-n},{x:0,y:-n/2}],i)}),"hexagonBkg"),M=(0,s.K2)((function(t,e,i){e.append("rect").attr("id","node-"+i.id).attr("class","node-bkg node-"+t.type2Str(i.type)).attr("height",i.height).attr("rx",i.padding).attr("ry",i.padding).attr("width",i.width)}),"roundedRectBkg"),x=(0,s.K2)((async function(t,e,i,o,s){const a=s.htmlLabels,h=o%11,l=e.append("g");i.section=h;let c="section-"+h;h<0&&(c+=" section-root"),l.attr("class",(i.class?i.class+" ":"")+"mindmap-node "+c);const g=l.append("g"),u=l.append("g"),d=i.descr.replace(/()/g,"\n");await(0,n.GZ)(u,d,{useHtmlLabels:a,width:i.width,classes:"mindmap-node-label"},s),a||u.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle");const p=u.node().getBBox(),[f]=(0,r.I5)(s.fontSize);if(i.height=p.height+1.1*f*.5+i.padding,i.width=p.width+2*i.padding,i.icon)if(i.type===t.nodeType.CIRCLE){i.height+=50,i.width+=50;l.append("foreignObject").attr("height","50px").attr("width",i.width).attr("style","text-align: center;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+h+" "+i.icon),u.attr("transform","translate("+i.width/2+", "+(i.height/2-1.5*i.padding)+")")}else{i.width+=50;const t=i.height;i.height=Math.max(t,60);const e=Math.abs(i.height-t);l.append("foreignObject").attr("width","60px").attr("height",i.height).attr("style","text-align: center;margin-top:"+e/2+"px;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+h+" "+i.icon),u.attr("transform","translate("+(25+i.width/2)+", "+(e/2+i.padding/2)+")")}else if(a){const t=(i.width-p.width)/2,e=(i.height-p.height)/2;u.attr("transform","translate("+t+", "+e+")")}else{const t=i.width/2,e=i.padding/2;u.attr("transform","translate("+t+", "+e+")")}switch(i.type){case t.nodeType.DEFAULT:T(t,g,i,h);break;case t.nodeType.ROUNDED_RECT:M(t,g,i,h);break;case t.nodeType.RECT:O(t,g,i,h);break;case t.nodeType.CIRCLE:g.attr("transform","translate("+i.width/2+", "+ +i.height/2+")"),w(t,g,i,h);break;case t.nodeType.CLOUD:D(t,g,i,h);break;case t.nodeType.BANG:I(t,g,i,h);break;case t.nodeType.HEXAGON:C(t,g,i,h)}return t.setElementForId(i.id,l),i.height}),"drawNode"),G=(0,s.K2)((function(t,e){const i=t.getElementById(e.id),n=e.x||0,r=e.y||0;i.attr("transform","translate("+n+","+r+")")}),"positionNode");async function S(t,e,i,n,r){await x(t,e,i,n,r),i.children&&await Promise.all(i.children.map(((i,o)=>S(t,e,i,n<0?o:n,r))))}function b(t,e){e.edges().map(((e,i)=>{const n=e.data();if(e[0]._private.bodyBounds){const r=e[0]._private.rscratch;s.Rm.trace("Edge: ",i,n),t.insert("path").attr("d",`M ${r.startX},${r.startY} L ${r.midX},${r.midY} L${r.endX},${r.endY} `).attr("class","edge section-edge-"+n.section+" edge-depth-"+n.depth)}}))}function F(t,e,i,n){e.add({group:"nodes",data:{id:t.id.toString(),labelText:t.descr,height:t.height,width:t.width,level:n,nodeId:t.id,padding:t.padding,type:t.type},position:{x:t.x,y:t.y}}),t.children&&t.children.forEach((r=>{F(r,e,i,n+1),e.add({group:"edges",data:{id:`${t.id}_${r.id}`,source:t.id,target:r.id,depth:n,section:r.section}})}))}function P(t,e){return new Promise((i=>{const n=(0,l.Ltv)("body").append("div").attr("id","cy").attr("style","display:none"),r=(0,a.A)({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});n.remove(),F(t,r,e,0),r.nodes().forEach((function(t){t.layoutDimensions=()=>{const e=t.data();return{w:e.width,h:e.height}}})),r.layout({name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1}).run(),r.ready((t=>{s.Rm.info("Ready",t),i(r)}))}))}function U(t,e){e.nodes().map(((e,i)=>{const n=e.data();n.x=e.position().x,n.y=e.position().y,G(t,n);const r=t.getElementById(n.nodeId);s.Rm.info("Id:",i,"Position: (",e.position().x,", ",e.position().y,")",n),r.attr("transform",`translate(${e.position().x-n.width/2}, ${e.position().y-n.height/2})`),r.attr("attr",`apa-${i})`)}))}a.A.use(h),(0,s.K2)(S,"drawNodes"),(0,s.K2)(b,"drawEdges"),(0,s.K2)(F,"addNodes"),(0,s.K2)(P,"layoutMindmap"),(0,s.K2)(U,"positionNodes");var Y={draw:(0,s.K2)((async(t,e,i,n)=>{s.Rm.debug("Rendering mindmap diagram\n"+t);const r=n.db,a=r.getMindmap();if(!a)return;const h=(0,s.D7)();h.htmlLabels=!1;const l=(0,o.D)(e),c=l.append("g");c.attr("class","mindmap-edges");const g=l.append("g");g.attr("class","mindmap-nodes"),await S(r,g,a,-1,h);const u=await P(a,h);b(c,u),U(r,u),(0,s.ot)(void 0,l,h.mindmap?.padding??s.UI.mindmap.padding,h.mindmap?.useMaxWidth??s.UI.mindmap.useMaxWidth)}),"draw")},k=(0,s.K2)((t=>{let e="";for(let i=0;i`\n .edge {\n stroke-width: 3;\n }\n ${k(t)}\n .section-root rect, .section-root path, .section-root circle, .section-root polygon {\n fill: ${t.git0};\n }\n .section-root text {\n fill: ${t.gitBranchLabel0};\n }\n .icon-container {\n height:100%;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .edge {\n fill: none;\n }\n .mindmap-node-label {\n dy: 1em;\n alignment-baseline: middle;\n text-anchor: middle;\n dominant-baseline: middle;\n text-align: center;\n }\n`),"getStyles")}}}]); \ No newline at end of file diff --git a/assets/js/4529.136c850a.js b/assets/js/4529.136c850a.js deleted file mode 100644 index 15af446888b1..000000000000 --- a/assets/js/4529.136c850a.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4529],{64529:(t,n,e)=>{e.d(n,{diagram:()=>H});var i=e(86079),s=e(26312);function r(t,n){let e;if(void 0===n)for(const i of t)null!=i&&(e>i||void 0===e&&i>=i)&&(e=i);else{let i=-1;for(let s of t)null!=(s=n(s,++i,t))&&(e>s||void 0===e&&s>=s)&&(e=s)}return e}function o(t){return t.target.depth}function l(t,n){return t.sourceLinks.length?t.depth:n-1}function c(t,n){let e=0;if(void 0===n)for(let i of t)(i=+i)&&(e+=i);else{let i=-1;for(let s of t)(s=+n(s,++i,t))&&(e+=s)}return e}function h(t,n){let e;if(void 0===n)for(const i of t)null!=i&&(e=i)&&(e=i);else{let i=-1;for(let s of t)null!=(s=n(s,++i,t))&&(e=s)&&(e=s)}return e}function a(t){return function(){return t}}function u(t,n){return y(t.source,n.source)||t.index-n.index}function f(t,n){return y(t.target,n.target)||t.index-n.index}function y(t,n){return t.y0-n.y0}function d(t){return t.value}function p(t){return t.index}function g(t){return t.nodes}function _(t){return t.links}function x(t,n){const e=t.get(n);if(!e)throw new Error("missing: "+n);return e}function k({nodes:t}){for(const n of t){let t=n.y0,e=t;for(const i of n.sourceLinks)i.y0=t+i.width/2,t+=i.width;for(const i of n.targetLinks)i.y1=e+i.width/2,e+=i.width}}function m(){let t,n,e,i=0,s=0,o=1,m=1,v=24,b=8,w=p,L=l,E=g,A=_,S=6;function M(){const l={nodes:E.apply(null,arguments),links:A.apply(null,arguments)};return function({nodes:t,links:n}){for(const[e,s]of t.entries())s.index=e,s.sourceLinks=[],s.targetLinks=[];const i=new Map(t.map(((n,e)=>[w(n,e,t),n])));for(const[e,s]of n.entries()){s.index=e;let{source:t,target:n}=s;"object"!=typeof t&&(t=s.source=x(i,t)),"object"!=typeof n&&(n=s.target=x(i,n)),t.sourceLinks.push(s),n.targetLinks.push(s)}if(null!=e)for(const{sourceLinks:s,targetLinks:r}of t)s.sort(e),r.sort(e)}(l),function({nodes:t}){for(const n of t)n.value=void 0===n.fixedValue?Math.max(c(n.sourceLinks,d),c(n.targetLinks,d)):n.fixedValue}(l),function({nodes:t}){const n=t.length;let e=new Set(t),i=new Set,s=0;for(;e.size;){for(const t of e){t.depth=s;for(const{target:n}of t.sourceLinks)i.add(n)}if(++s>n)throw new Error("circular link");e=i,i=new Set}}(l),function({nodes:t}){const n=t.length;let e=new Set(t),i=new Set,s=0;for(;e.size;){for(const t of e){t.height=s;for(const{source:n}of t.targetLinks)i.add(n)}if(++s>n)throw new Error("circular link");e=i,i=new Set}}(l),function(e){const l=function({nodes:t}){const e=h(t,(t=>t.depth))+1,s=(o-i-v)/(e-1),r=new Array(e);for(const n of t){const t=Math.max(0,Math.min(e-1,Math.floor(L.call(null,n,e))));n.layer=t,n.x0=i+t*s,n.x1=n.x0+v,r[t]?r[t].push(n):r[t]=[n]}if(n)for(const i of r)i.sort(n);return r}(e);t=Math.min(b,(m-s)/(h(l,(t=>t.length))-1)),function(n){const e=r(n,(n=>(m-s-(n.length-1)*t)/c(n,d)));for(const i of n){let n=s;for(const s of i){s.y0=n,s.y1=n+s.value*e,n=s.y1+t;for(const t of s.sourceLinks)t.width=t.value*e}n=(m-n+t)/(i.length+1);for(let t=0;t0))continue;let s=(n/i-t.y0)*e;t.y0+=s,t.y1+=s,P(t)}void 0===n&&r.sort(y),O(r,i)}}function T(t,e,i){for(let s=t.length-2;s>=0;--s){const r=t[s];for(const t of r){let n=0,i=0;for(const{target:e,value:r}of t.sourceLinks){let s=r*(e.layer-t.layer);n+=j(t,e)*s,i+=s}if(!(i>0))continue;let s=(n/i-t.y0)*e;t.y0+=s,t.y1+=s,P(t)}void 0===n&&r.sort(y),O(r,i)}}function O(n,e){const i=n.length>>1,r=n[i];D(n,r.y0-t,i-1,e),C(n,r.y1+t,i+1,e),D(n,m,n.length-1,e),C(n,s,0,e)}function C(n,e,i,s){for(;i1e-6&&(r.y0+=o,r.y1+=o),e=r.y1+t}}function D(n,e,i,s){for(;i>=0;--i){const r=n[i],o=(r.y1-e)*s;o>1e-6&&(r.y0-=o,r.y1-=o),e=r.y0-t}}function P({sourceLinks:t,targetLinks:n}){if(void 0===e){for(const{source:{sourceLinks:t}}of n)t.sort(f);for(const{target:{targetLinks:n}}of t)n.sort(u)}}function N(t){if(void 0===e)for(const{sourceLinks:n,targetLinks:e}of t)n.sort(f),e.sort(u)}function $(n,e){let i=n.y0-(n.sourceLinks.length-1)*t/2;for(const{target:s,width:r}of n.sourceLinks){if(s===e)break;i+=r+t}for(const{source:t,width:s}of e.targetLinks){if(t===n)break;i-=s}return i}function j(n,e){let i=e.y0-(e.targetLinks.length-1)*t/2;for(const{source:s,width:r}of e.targetLinks){if(s===n)break;i+=r+t}for(const{target:t,width:s}of n.sourceLinks){if(t===e)break;i-=s}return i}return M.update=function(t){return k(t),t},M.nodeId=function(t){return arguments.length?(w="function"==typeof t?t:a(t),M):w},M.nodeAlign=function(t){return arguments.length?(L="function"==typeof t?t:a(t),M):L},M.nodeSort=function(t){return arguments.length?(n=t,M):n},M.nodeWidth=function(t){return arguments.length?(v=+t,M):v},M.nodePadding=function(n){return arguments.length?(b=t=+n,M):b},M.nodes=function(t){return arguments.length?(E="function"==typeof t?t:a(t),M):E},M.links=function(t){return arguments.length?(A="function"==typeof t?t:a(t),M):A},M.linkSort=function(t){return arguments.length?(e=t,M):e},M.size=function(t){return arguments.length?(i=s=0,o=+t[0],m=+t[1],M):[o-i,m-s]},M.extent=function(t){return arguments.length?(i=+t[0][0],o=+t[1][0],s=+t[0][1],m=+t[1][1],M):[[i,s],[o,m]]},M.iterations=function(t){return arguments.length?(S=+t,M):S},M}var v=Math.PI,b=2*v,w=1e-6,L=b-w;function E(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function A(){return new E}E.prototype=A.prototype={constructor:E,moveTo:function(t,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,n){this._+="L"+(this._x1=+t)+","+(this._y1=+n)},quadraticCurveTo:function(t,n,e,i){this._+="Q"+ +t+","+ +n+","+(this._x1=+e)+","+(this._y1=+i)},bezierCurveTo:function(t,n,e,i,s,r){this._+="C"+ +t+","+ +n+","+ +e+","+ +i+","+(this._x1=+s)+","+(this._y1=+r)},arcTo:function(t,n,e,i,s){t=+t,n=+n,e=+e,i=+i,s=+s;var r=this._x1,o=this._y1,l=e-t,c=i-n,h=r-t,a=o-n,u=h*h+a*a;if(s<0)throw new Error("negative radius: "+s);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=n);else if(u>w)if(Math.abs(a*l-c*h)>w&&s){var f=e-r,y=i-o,d=l*l+c*c,p=f*f+y*y,g=Math.sqrt(d),_=Math.sqrt(u),x=s*Math.tan((v-Math.acos((d+u-p)/(2*g*_)))/2),k=x/_,m=x/g;Math.abs(k-1)>w&&(this._+="L"+(t+k*h)+","+(n+k*a)),this._+="A"+s+","+s+",0,0,"+ +(a*f>h*y)+","+(this._x1=t+m*l)+","+(this._y1=n+m*c)}else this._+="L"+(this._x1=t)+","+(this._y1=n);else;},arc:function(t,n,e,i,s,r){t=+t,n=+n,r=!!r;var o=(e=+e)*Math.cos(i),l=e*Math.sin(i),c=t+o,h=n+l,a=1^r,u=r?i-s:s-i;if(e<0)throw new Error("negative radius: "+e);null===this._x1?this._+="M"+c+","+h:(Math.abs(this._x1-c)>w||Math.abs(this._y1-h)>w)&&(this._+="L"+c+","+h),e&&(u<0&&(u=u%b+b),u>L?this._+="A"+e+","+e+",0,1,"+a+","+(t-o)+","+(n-l)+"A"+e+","+e+",0,1,"+a+","+(this._x1=c)+","+(this._y1=h):u>w&&(this._+="A"+e+","+e+",0,"+ +(u>=v)+","+a+","+(this._x1=t+e*Math.cos(s))+","+(this._y1=n+e*Math.sin(s))))},rect:function(t,n,e,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +e+"v"+ +i+"h"+-e+"Z"},toString:function(){return this._}};const S=A;var M=Array.prototype.slice;function I(t){return function(){return t}}function T(t){return t[0]}function O(t){return t[1]}function C(t){return t.source}function D(t){return t.target}function P(t){var n=C,e=D,i=T,s=O,r=null;function o(){var o,l=M.call(arguments),c=n.apply(this,l),h=e.apply(this,l);if(r||(r=o=S()),t(r,+i.apply(this,(l[0]=c,l)),+s.apply(this,l),+i.apply(this,(l[0]=h,l)),+s.apply(this,l)),o)return r=null,o+""||null}return o.source=function(t){return arguments.length?(n=t,o):n},o.target=function(t){return arguments.length?(e=t,o):e},o.x=function(t){return arguments.length?(i="function"==typeof t?t:I(+t),o):i},o.y=function(t){return arguments.length?(s="function"==typeof t?t:I(+t),o):s},o.context=function(t){return arguments.length?(r=null==t?null:t,o):r},o}function N(t,n,e,i,s){t.moveTo(n,e),t.bezierCurveTo(n=(n+i)/2,e,n,s,i,s)}function $(t){return[t.source.x1,t.y0]}function j(t){return[t.target.x0,t.y1]}function z(){return P(N).source($).target(j)}e(74353),e(16750),e(42838);var U=function(){var t=function(t,n,e,i){for(e=e||{},i=t.length;i--;e[t[i]]=n);return e},n=[1,9],e=[1,10],i=[1,5,10,12],s={trace:function(){},yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:function(t,n,e,i,s,r,o){var l=r.length-1;switch(s){case 7:const t=i.findOrCreateNode(r[l-4].trim().replaceAll('""','"')),n=i.findOrCreateNode(r[l-2].trim().replaceAll('""','"')),e=parseFloat(r[l].trim());i.addLink(t,n,e);break;case 8:case 9:case 11:this.$=r[l];break;case 10:this.$=r[l-1]}},table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:n,20:e},{1:[2,6],7:11,10:[1,12]},t(e,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(i,[2,8]),t(i,[2,9]),{19:[1,16]},t(i,[2,11]),{1:[2,1]},{1:[2,5]},t(e,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:n,20:e},{15:18,16:7,17:8,18:n,20:e},{18:[1,19]},t(e,[2,3]),{12:[1,20]},t(i,[2,10]),{15:21,16:7,17:8,18:n,20:e},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:function(t,n){if(!n.recoverable){var e=new Error(t);throw e.hash=n,e}this.trace(t)},parse:function(t){var n=this,e=[0],i=[],s=[null],r=[],o=this.table,l="",c=0,h=0,a=r.slice.call(arguments,1),u=Object.create(this.lexer),f={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(f.yy[y]=this.yy[y]);u.setInput(t,f.yy),f.yy.lexer=u,f.yy.parser=this,void 0===u.yylloc&&(u.yylloc={});var d=u.yylloc;r.push(d);var p=u.options&&u.options.ranges;"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var g,_,x,k,m,v,b,w,L,E={};;){if(_=e[e.length-1],this.defaultActions[_]?x=this.defaultActions[_]:(null==g&&(L=void 0,"number"!=typeof(L=i.pop()||u.lex()||1)&&(L instanceof Array&&(L=(i=L).pop()),L=n.symbols_[L]||L),g=L),x=o[_]&&o[_][g]),void 0===x||!x.length||!x[0]){var A="";for(m in w=[],o[_])this.terminals_[m]&&m>2&&w.push("'"+this.terminals_[m]+"'");A=u.showPosition?"Parse error on line "+(c+1)+":\n"+u.showPosition()+"\nExpecting "+w.join(", ")+", got '"+(this.terminals_[g]||g)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==g?"end of input":"'"+(this.terminals_[g]||g)+"'"),this.parseError(A,{text:u.match,token:this.terminals_[g]||g,line:u.yylineno,loc:d,expected:w})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_+", token: "+g);switch(x[0]){case 1:e.push(g),s.push(u.yytext),r.push(u.yylloc),e.push(x[1]),g=null,h=u.yyleng,l=u.yytext,c=u.yylineno,d=u.yylloc;break;case 2:if(v=this.productions_[x[1]][1],E.$=s[s.length-v],E._$={first_line:r[r.length-(v||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(v||1)].first_column,last_column:r[r.length-1].last_column},p&&(E._$.range=[r[r.length-(v||1)].range[0],r[r.length-1].range[1]]),void 0!==(k=this.performAction.apply(E,[l,h,c,f.yy,x[1],s,r].concat(a))))return k;v&&(e=e.slice(0,-1*v*2),s=s.slice(0,-1*v),r=r.slice(0,-1*v)),e.push(this.productions_[x[1]][0]),s.push(E.$),r.push(E._$),b=o[e[e.length-2]][e[e.length-1]],e.push(b);break;case 3:return!0}}return!0}},r={EOF:1,parseError:function(t,n){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,n)},setInput:function(t,n){return this.yy=n||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var n=t.length,e=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),e.length-1&&(this.yylineno-=e.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:e?(e.length===i.length?this.yylloc.first_column:0)+i[i.length-e.length].length-e[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),n=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+n+"^"},test_match:function(t,n){var e,i,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],e=this.performAction.call(this,this.yy,this,n,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e)return e;if(this._backtrack){for(var r in s)this[r]=s[r];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,n,e,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),r=0;rn[0].length)){if(n=e,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(e,s[r])))return t;if(this._backtrack){n=!1;continue}return!1}if(!this.options.flex)break}return n?!1!==(t=this.test_match(n,s[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,n,e,i){switch(e){case 0:return this.pushState("csv"),4;case 1:return 10;case 2:return 5;case 3:return 12;case 4:return this.pushState("escaped_text"),18;case 5:return 20;case 6:return this.popState("escaped_text"),18;case 7:return 19}},rules:[/^(?:sankey-beta\b)/i,/^(?:$)/i,/^(?:((\u000D\u000A)|(\u000A)))/i,/^(?:(\u002C))/i,/^(?:(\u0022))/i,/^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i,/^(?:(\u0022)(?!(\u0022)))/i,/^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],conditions:{csv:{rules:[1,2,3,4,5,6,7],inclusive:!1},escaped_text:{rules:[6,7],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7],inclusive:!0}}};function o(){this.yy={}}return s.lexer=r,o.prototype=s,s.Parser=o,new o}();U.parser=U;const F=U;let W=[],q=[],G={};class V{constructor(t,n,e=0){this.source=t,this.target=n,this.value=e}}class X{constructor(t){this.ID=t}}const K={nodesMap:G,getConfig:()=>(0,i.c)().sankey,getNodes:()=>q,getLinks:()=>W,getGraph:()=>({nodes:q.map((t=>({id:t.ID}))),links:W.map((t=>({source:t.source.ID,target:t.target.ID,value:t.value})))}),addLink:(t,n,e)=>{W.push(new V(t,n,e))},findOrCreateNode:t=>(t=i.e.sanitizeText(t,(0,i.c)()),G[t]||(G[t]=new X(t),q.push(G[t])),G[t]),getAccTitle:i.g,setAccTitle:i.s,getAccDescription:i.a,setAccDescription:i.b,getDiagramTitle:i.t,setDiagramTitle:i.q,clear:()=>{W=[],q=[],G={},(0,i.v)()}},Q=class t{static next(n){return new t(n+ ++t.count)}constructor(t){this.id=t,this.href=`#${t}`}toString(){return"url("+this.href+")"}};Q.count=0;let Y=Q;const B={left:function(t){return t.depth},right:function(t,n){return n-1-t.height},center:function(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?r(t.sourceLinks,o)-1:0},justify:l},R={draw:function(t,n,e,r){const{securityLevel:o,sankey:l}=(0,i.c)(),c=i.K.sankey;let h;"sandbox"===o&&(h=(0,s.Ltv)("#i"+n));const a="sandbox"===o?(0,s.Ltv)(h.nodes()[0].contentDocument.body):(0,s.Ltv)("body"),u="sandbox"===o?a.select(`[id="${n}"]`):(0,s.Ltv)(`[id="${n}"]`),f=(null==l?void 0:l.width)??c.width,y=(null==l?void 0:l.height)??c.width,d=(null==l?void 0:l.useMaxWidth)??c.useMaxWidth,p=(null==l?void 0:l.nodeAlignment)??c.nodeAlignment,g=(null==l?void 0:l.prefix)??c.prefix,_=(null==l?void 0:l.suffix)??c.suffix,x=(null==l?void 0:l.showValues)??c.showValues,k=r.db.getGraph(),v=B[p];m().nodeId((t=>t.id)).nodeWidth(10).nodePadding(10+(x?15:0)).nodeAlign(v).extent([[0,0],[f,y]])(k);const b=(0,s.UMr)(s.zt);u.append("g").attr("class","nodes").selectAll(".node").data(k.nodes).join("g").attr("class","node").attr("id",(t=>(t.uid=Y.next("node-")).id)).attr("transform",(function(t){return"translate("+t.x0+","+t.y0+")"})).attr("x",(t=>t.x0)).attr("y",(t=>t.y0)).append("rect").attr("height",(t=>t.y1-t.y0)).attr("width",(t=>t.x1-t.x0)).attr("fill",(t=>b(t.id)));u.append("g").attr("class","node-labels").attr("font-family","sans-serif").attr("font-size",14).selectAll("text").data(k.nodes).join("text").attr("x",(t=>t.x0(t.y1+t.y0)/2)).attr("dy",(x?"0":"0.35")+"em").attr("text-anchor",(t=>t.x0x?`${t}\n${g}${Math.round(100*n)/100}${_}`:t));const w=u.append("g").attr("class","links").attr("fill","none").attr("stroke-opacity",.5).selectAll(".link").data(k.links).join("g").attr("class","link").style("mix-blend-mode","multiply"),L=(null==l?void 0:l.linkColor)||"gradient";if("gradient"===L){const t=w.append("linearGradient").attr("id",(t=>(t.uid=Y.next("linearGradient-")).id)).attr("gradientUnits","userSpaceOnUse").attr("x1",(t=>t.source.x1)).attr("x2",(t=>t.target.x0));t.append("stop").attr("offset","0%").attr("stop-color",(t=>b(t.source.id))),t.append("stop").attr("offset","100%").attr("stop-color",(t=>b(t.target.id)))}let E;switch(L){case"gradient":E=t=>t.uid;break;case"source":E=t=>b(t.source.id);break;case"target":E=t=>b(t.target.id);break;default:E=L}w.append("path").attr("d",z()).attr("stroke",E).attr("stroke-width",(t=>Math.max(1,t.width))),(0,i.o)(void 0,u,0,d)}},Z=F.parse.bind(F);F.parse=t=>Z((t=>t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,"\n").trim())(t));const H={parser:F,db:K,renderer:R}}}]); \ No newline at end of file diff --git a/assets/js/452ad91d.61d6cb57.js b/assets/js/452ad91d.61d6cb57.js deleted file mode 100644 index 95c546b18d80..000000000000 --- a/assets/js/452ad91d.61d6cb57.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6195],{24025:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>r,default:()=>h,frontMatter:()=>i,metadata:()=>a,toc:()=>d});var o=t(74848),s=t(28453);const i={id:"learn-xcm-docs-overview-intro",title:"Introduction",sidebar_label:"Introduction",description:"An Introduction to XCM.",keywords:["xcm","cross-consensus messaging"],slug:"../overview-intro"},r="Introduction",a={id:"learn/xcm/overview/learn-xcm-docs-overview-intro",title:"Introduction",description:"An Introduction to XCM.",source:"@site/../docs/learn/xcm/overview/intro.md",sourceDirName:"learn/xcm/overview",slug:"/learn/xcm/overview-intro",permalink:"/docs/learn/xcm/overview-intro",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/xcm/overview/intro.md",tags:[],version:"current",lastUpdatedBy:"Radha",lastUpdatedAt:1694074887e3,frontMatter:{id:"learn-xcm-docs-overview-intro",title:"Introduction",sidebar_label:"Introduction",description:"An Introduction to XCM.",keywords:["xcm","cross-consensus messaging"],slug:"../overview-intro"},sidebar:"docs",previous:{title:"Summary",permalink:"/docs/learn/xcm/overview-summary"},next:{title:"A Format, not a Protocol",permalink:"/docs/learn/xcm/overview-format"}},c={},d=[];function l(e){const n={a:"a",h1:"h1",header:"header",li:"li",ol:"ol",p:"p",strong:"strong",...(0,s.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.header,{children:(0,o.jsx)(n.h1,{id:"introduction",children:"Introduction"})}),"\n",(0,o.jsxs)(n.p,{children:["XCM is a ",(0,o.jsx)(n.strong,{children:"language"})," for communicating ",(0,o.jsx)(n.strong,{children:"intentions"})," between ",(0,o.jsx)(n.strong,{children:"consensus systems"}),". Concretely,\nXCM is a message format, it specifies how to craft messages that communicate intentions to other\nconsensus systems. Some examples of consensus systems are blockchains and smart contracts. XCM comes\nfrom the ",(0,o.jsx)(n.a,{href:"https://polkadot.network/",children:"Polkadot"})," ecosystem, but is designed to be general enough to\nprovide a common format for cross-consensus communication that can be used anywhere."]}),"\n",(0,o.jsx)(n.p,{children:"Its goal is to let blockchain ecosystems thrive via specialization instead of generalization. If\nthere's no interoperability, a chain is forced to host all services and support all functionalities\non its own. With XCM, we are able to achieve an ecosystem-wide division of labour: a chain can\nspecialize and focus on its own business logic, and leverage the benefits of depending on other\nspecialized blockchain for services that it does not provide."}),"\n",(0,o.jsx)(n.p,{children:"XCM makes the following assumptions regarding the underlying environment:"}),"\n",(0,o.jsxs)(n.ol,{children:["\n",(0,o.jsx)(n.li,{children:"Asynchronous: XCMs in no way assume that the sender will be blocking on its completion."}),"\n",(0,o.jsx)(n.li,{children:"Absolute: XCMs are assumed to be delivered and interpreted accurately, in order and in a timely\nfashion. Once a message is sent, one can assume that it will be processed as intended. This\nguarantee has to be provided by the transport layer."}),"\n",(0,o.jsx)(n.li,{children:"Asymmetric: XCMs, by default, do not have results that let the sender know that the message was\nexecuted correctly. If results are needed, a new message must be sent."}),"\n",(0,o.jsx)(n.li,{children:"Agnostic: XCM makes no assumptions about the nature of the consensus systems between which the\nmessages are being passed. XCM should be usable in any system that derives finality through\nconsensus."}),"\n"]}),"\n",(0,o.jsxs)(n.p,{children:["XCM is constantly evolving; the format is expected to change over time. It has an RFC process to\npropose changes, which end up in newer versions, the current one being v3. To keep up with the\ndevelopment of the format, or to propose changes, go to\n",(0,o.jsx)(n.a,{href:"https://github.com/paritytech/xcm-format",children:"the XCM format repository"}),"."]})]})}function h(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(l,{...e})}):l(e)}},28453:(e,n,t)=>{t.d(n,{R:()=>r,x:()=>a});var o=t(96540);const s={},i=o.createContext(s);function r(e){const n=o.useContext(i);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:r(e.components),o.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/452ad91d.a6c4a926.js b/assets/js/452ad91d.a6c4a926.js new file mode 100644 index 000000000000..4423f8fadd27 --- /dev/null +++ b/assets/js/452ad91d.a6c4a926.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6195],{85671:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>a,default:()=>h,frontMatter:()=>i,metadata:()=>s,toc:()=>l});const s=JSON.parse('{"id":"learn/xcm/overview/learn-xcm-docs-overview-intro","title":"Introduction","description":"An Introduction to XCM.","source":"@site/../docs/learn/xcm/overview/intro.md","sourceDirName":"learn/xcm/overview","slug":"/learn/xcm/overview-intro","permalink":"/docs/learn/xcm/overview-intro","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/xcm/overview/intro.md","tags":[],"version":"current","lastUpdatedBy":"Radha","lastUpdatedAt":1694074887000,"frontMatter":{"id":"learn-xcm-docs-overview-intro","title":"Introduction","sidebar_label":"Introduction","description":"An Introduction to XCM.","keywords":["xcm","cross-consensus messaging"],"slug":"../overview-intro"},"sidebar":"docs","previous":{"title":"Summary","permalink":"/docs/learn/xcm/overview-summary"},"next":{"title":"A Format, not a Protocol","permalink":"/docs/learn/xcm/overview-format"}}');var o=t(74848),r=t(28453);const i={id:"learn-xcm-docs-overview-intro",title:"Introduction",sidebar_label:"Introduction",description:"An Introduction to XCM.",keywords:["xcm","cross-consensus messaging"],slug:"../overview-intro"},a="Introduction",c={},l=[];function d(e){const n={a:"a",h1:"h1",header:"header",li:"li",ol:"ol",p:"p",strong:"strong",...(0,r.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.header,{children:(0,o.jsx)(n.h1,{id:"introduction",children:"Introduction"})}),"\n",(0,o.jsxs)(n.p,{children:["XCM is a ",(0,o.jsx)(n.strong,{children:"language"})," for communicating ",(0,o.jsx)(n.strong,{children:"intentions"})," between ",(0,o.jsx)(n.strong,{children:"consensus systems"}),". Concretely,\nXCM is a message format, it specifies how to craft messages that communicate intentions to other\nconsensus systems. Some examples of consensus systems are blockchains and smart contracts. XCM comes\nfrom the ",(0,o.jsx)(n.a,{href:"https://polkadot.network/",children:"Polkadot"})," ecosystem, but is designed to be general enough to\nprovide a common format for cross-consensus communication that can be used anywhere."]}),"\n",(0,o.jsx)(n.p,{children:"Its goal is to let blockchain ecosystems thrive via specialization instead of generalization. If\nthere's no interoperability, a chain is forced to host all services and support all functionalities\non its own. With XCM, we are able to achieve an ecosystem-wide division of labour: a chain can\nspecialize and focus on its own business logic, and leverage the benefits of depending on other\nspecialized blockchain for services that it does not provide."}),"\n",(0,o.jsx)(n.p,{children:"XCM makes the following assumptions regarding the underlying environment:"}),"\n",(0,o.jsxs)(n.ol,{children:["\n",(0,o.jsx)(n.li,{children:"Asynchronous: XCMs in no way assume that the sender will be blocking on its completion."}),"\n",(0,o.jsx)(n.li,{children:"Absolute: XCMs are assumed to be delivered and interpreted accurately, in order and in a timely\nfashion. Once a message is sent, one can assume that it will be processed as intended. This\nguarantee has to be provided by the transport layer."}),"\n",(0,o.jsx)(n.li,{children:"Asymmetric: XCMs, by default, do not have results that let the sender know that the message was\nexecuted correctly. If results are needed, a new message must be sent."}),"\n",(0,o.jsx)(n.li,{children:"Agnostic: XCM makes no assumptions about the nature of the consensus systems between which the\nmessages are being passed. XCM should be usable in any system that derives finality through\nconsensus."}),"\n"]}),"\n",(0,o.jsxs)(n.p,{children:["XCM is constantly evolving; the format is expected to change over time. It has an RFC process to\npropose changes, which end up in newer versions, the current one being v3. To keep up with the\ndevelopment of the format, or to propose changes, go to\n",(0,o.jsx)(n.a,{href:"https://github.com/paritytech/xcm-format",children:"the XCM format repository"}),"."]})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},28453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>a});var s=t(96540);const o={},r=s.createContext(o);function i(e){const n=s.useContext(r);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:i(e.components),s.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/4564.daa90a32.js b/assets/js/4564.daa90a32.js deleted file mode 100644 index 9a964707e1cd..000000000000 --- a/assets/js/4564.daa90a32.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4564],{94564:(t,i,e)=>{e.d(i,{diagram:()=>d});var a=e(86079),n=e(26312),r=(e(74353),e(16750),e(42838),function(){var t=function(t,i,e,a){for(e=e||{},a=t.length;a--;e[t[a]]=i);return e},i=[1,3],e=[1,4],a=[1,5],n=[1,6],r=[1,7],s=[1,5,13,15,17,19,20,25,27,28,29,30,31,32,33,34,37,38,40,41,42,43,44,45,46,47,48,49,50],l=[1,5,6,13,15,17,19,20,25,27,28,29,30,31,32,33,34,37,38,40,41,42,43,44,45,46,47,48,49,50],o=[32,33,34],h=[2,7],c=[1,13],d=[1,17],u=[1,18],x=[1,19],g=[1,20],f=[1,21],y=[1,22],p=[1,23],q=[1,24],T=[1,25],m=[1,26],A=[1,27],_=[1,30],b=[1,31],S=[1,32],k=[1,33],F=[1,34],P=[1,35],v=[1,36],L=[1,37],C=[1,38],z=[1,39],B=[1,40],E=[1,41],D=[1,42],I=[1,57],w=[1,58],R=[5,22,26,32,33,34,40,41,42,43,44,45,46,47,48,49,50,51],W={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,SPACE:5,QUADRANT:6,document:7,line:8,statement:9,axisDetails:10,quadrantDetails:11,points:12,title:13,title_value:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,text:21,point_start:22,point_x:23,point_y:24,"X-AXIS":25,"AXIS-TEXT-DELIMITER":26,"Y-AXIS":27,QUADRANT_1:28,QUADRANT_2:29,QUADRANT_3:30,QUADRANT_4:31,NEWLINE:32,SEMI:33,EOF:34,alphaNumToken:35,textNoTagsToken:36,STR:37,MD_STR:38,alphaNum:39,PUNCTUATION:40,AMP:41,NUM:42,ALPHA:43,COMMA:44,PLUS:45,EQUALS:46,MULT:47,DOT:48,BRKT:49,UNDERSCORE:50,MINUS:51,$accept:0,$end:1},terminals_:{2:"error",5:"SPACE",6:"QUADRANT",13:"title",14:"title_value",15:"acc_title",16:"acc_title_value",17:"acc_descr",18:"acc_descr_value",19:"acc_descr_multiline_value",20:"section",22:"point_start",23:"point_x",24:"point_y",25:"X-AXIS",26:"AXIS-TEXT-DELIMITER",27:"Y-AXIS",28:"QUADRANT_1",29:"QUADRANT_2",30:"QUADRANT_3",31:"QUADRANT_4",32:"NEWLINE",33:"SEMI",34:"EOF",37:"STR",38:"MD_STR",40:"PUNCTUATION",41:"AMP",42:"NUM",43:"ALPHA",44:"COMMA",45:"PLUS",46:"EQUALS",47:"MULT",48:"DOT",49:"BRKT",50:"UNDERSCORE",51:"MINUS"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[9,0],[9,2],[9,1],[9,1],[9,1],[9,2],[9,2],[9,2],[9,1],[9,1],[12,4],[10,4],[10,3],[10,2],[10,4],[10,3],[10,2],[11,2],[11,2],[11,2],[11,2],[4,1],[4,1],[4,1],[21,1],[21,2],[21,1],[21,1],[39,1],[39,2],[35,1],[35,1],[35,1],[35,1],[35,1],[35,1],[35,1],[35,1],[35,1],[35,1],[35,1],[36,1],[36,1],[36,1]],performAction:function(t,i,e,a,n,r,s){var l=r.length-1;switch(n){case 12:this.$=r[l].trim(),a.setDiagramTitle(this.$);break;case 13:this.$=r[l].trim(),a.setAccTitle(this.$);break;case 14:case 15:this.$=r[l].trim(),a.setAccDescription(this.$);break;case 16:a.addSection(r[l].substr(8)),this.$=r[l].substr(8);break;case 17:a.addPoint(r[l-3],r[l-1],r[l]);break;case 18:a.setXAxisLeftText(r[l-2]),a.setXAxisRightText(r[l]);break;case 19:r[l-1].text+=" \u27f6 ",a.setXAxisLeftText(r[l-1]);break;case 20:a.setXAxisLeftText(r[l]);break;case 21:a.setYAxisBottomText(r[l-2]),a.setYAxisTopText(r[l]);break;case 22:r[l-1].text+=" \u27f6 ",a.setYAxisBottomText(r[l-1]);break;case 23:a.setYAxisBottomText(r[l]);break;case 24:a.setQuadrant1Text(r[l]);break;case 25:a.setQuadrant2Text(r[l]);break;case 26:a.setQuadrant3Text(r[l]);break;case 27:a.setQuadrant4Text(r[l]);break;case 31:case 33:this.$={text:r[l],type:"text"};break;case 32:this.$={text:r[l-1].text+""+r[l],type:r[l-1].type};break;case 34:this.$={text:r[l],type:"markdown"};break;case 35:this.$=r[l];break;case 36:this.$=r[l-1]+""+r[l]}},table:[{3:1,4:2,5:i,6:e,32:a,33:n,34:r},{1:[3]},{3:8,4:2,5:i,6:e,32:a,33:n,34:r},{3:9,4:2,5:i,6:e,32:a,33:n,34:r},t(s,[2,4],{7:10}),t(l,[2,28]),t(l,[2,29]),t(l,[2,30]),{1:[2,1]},{1:[2,2]},t(o,h,{8:11,9:12,10:14,11:15,12:16,21:28,35:29,1:[2,3],5:c,13:d,15:u,17:x,19:g,20:f,25:y,27:p,28:q,29:T,30:m,31:A,37:_,38:b,40:S,41:k,42:F,43:P,44:v,45:L,46:C,47:z,48:B,49:E,50:D}),t(s,[2,5]),{4:43,32:a,33:n,34:r},t(o,h,{10:14,11:15,12:16,21:28,35:29,9:44,5:c,13:d,15:u,17:x,19:g,20:f,25:y,27:p,28:q,29:T,30:m,31:A,37:_,38:b,40:S,41:k,42:F,43:P,44:v,45:L,46:C,47:z,48:B,49:E,50:D}),t(o,[2,9]),t(o,[2,10]),t(o,[2,11]),{14:[1,45]},{16:[1,46]},{18:[1,47]},t(o,[2,15]),t(o,[2,16]),{21:48,35:29,37:_,38:b,40:S,41:k,42:F,43:P,44:v,45:L,46:C,47:z,48:B,49:E,50:D},{21:49,35:29,37:_,38:b,40:S,41:k,42:F,43:P,44:v,45:L,46:C,47:z,48:B,49:E,50:D},{21:50,35:29,37:_,38:b,40:S,41:k,42:F,43:P,44:v,45:L,46:C,47:z,48:B,49:E,50:D},{21:51,35:29,37:_,38:b,40:S,41:k,42:F,43:P,44:v,45:L,46:C,47:z,48:B,49:E,50:D},{21:52,35:29,37:_,38:b,40:S,41:k,42:F,43:P,44:v,45:L,46:C,47:z,48:B,49:E,50:D},{21:53,35:29,37:_,38:b,40:S,41:k,42:F,43:P,44:v,45:L,46:C,47:z,48:B,49:E,50:D},{5:I,22:[1,54],35:56,36:55,40:S,41:k,42:F,43:P,44:v,45:L,46:C,47:z,48:B,49:E,50:D,51:w},t(R,[2,31]),t(R,[2,33]),t(R,[2,34]),t(R,[2,37]),t(R,[2,38]),t(R,[2,39]),t(R,[2,40]),t(R,[2,41]),t(R,[2,42]),t(R,[2,43]),t(R,[2,44]),t(R,[2,45]),t(R,[2,46]),t(R,[2,47]),t(s,[2,6]),t(o,[2,8]),t(o,[2,12]),t(o,[2,13]),t(o,[2,14]),t(o,[2,20],{36:55,35:56,5:I,26:[1,59],40:S,41:k,42:F,43:P,44:v,45:L,46:C,47:z,48:B,49:E,50:D,51:w}),t(o,[2,23],{36:55,35:56,5:I,26:[1,60],40:S,41:k,42:F,43:P,44:v,45:L,46:C,47:z,48:B,49:E,50:D,51:w}),t(o,[2,24],{36:55,35:56,5:I,40:S,41:k,42:F,43:P,44:v,45:L,46:C,47:z,48:B,49:E,50:D,51:w}),t(o,[2,25],{36:55,35:56,5:I,40:S,41:k,42:F,43:P,44:v,45:L,46:C,47:z,48:B,49:E,50:D,51:w}),t(o,[2,26],{36:55,35:56,5:I,40:S,41:k,42:F,43:P,44:v,45:L,46:C,47:z,48:B,49:E,50:D,51:w}),t(o,[2,27],{36:55,35:56,5:I,40:S,41:k,42:F,43:P,44:v,45:L,46:C,47:z,48:B,49:E,50:D,51:w}),{23:[1,61]},t(R,[2,32]),t(R,[2,48]),t(R,[2,49]),t(R,[2,50]),t(o,[2,19],{35:29,21:62,37:_,38:b,40:S,41:k,42:F,43:P,44:v,45:L,46:C,47:z,48:B,49:E,50:D}),t(o,[2,22],{35:29,21:63,37:_,38:b,40:S,41:k,42:F,43:P,44:v,45:L,46:C,47:z,48:B,49:E,50:D}),{24:[1,64]},t(o,[2,18],{36:55,35:56,5:I,40:S,41:k,42:F,43:P,44:v,45:L,46:C,47:z,48:B,49:E,50:D,51:w}),t(o,[2,21],{36:55,35:56,5:I,40:S,41:k,42:F,43:P,44:v,45:L,46:C,47:z,48:B,49:E,50:D,51:w}),t(o,[2,17])],defaultActions:{8:[2,1],9:[2,2]},parseError:function(t,i){if(!i.recoverable){var e=new Error(t);throw e.hash=i,e}this.trace(t)},parse:function(t){var i=this,e=[0],a=[],n=[null],r=[],s=this.table,l="",o=0,h=0,c=r.slice.call(arguments,1),d=Object.create(this.lexer),u={yy:{}};for(var x in this.yy)Object.prototype.hasOwnProperty.call(this.yy,x)&&(u.yy[x]=this.yy[x]);d.setInput(t,u.yy),u.yy.lexer=d,u.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var g=d.yylloc;r.push(g);var f=d.options&&d.options.ranges;"function"==typeof u.yy.parseError?this.parseError=u.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var y,p,q,T,m,A,_,b,S,k={};;){if(p=e[e.length-1],this.defaultActions[p]?q=this.defaultActions[p]:(null==y&&(S=void 0,"number"!=typeof(S=a.pop()||d.lex()||1)&&(S instanceof Array&&(S=(a=S).pop()),S=i.symbols_[S]||S),y=S),q=s[p]&&s[p][y]),void 0===q||!q.length||!q[0]){var F="";for(m in b=[],s[p])this.terminals_[m]&&m>2&&b.push("'"+this.terminals_[m]+"'");F=d.showPosition?"Parse error on line "+(o+1)+":\n"+d.showPosition()+"\nExpecting "+b.join(", ")+", got '"+(this.terminals_[y]||y)+"'":"Parse error on line "+(o+1)+": Unexpected "+(1==y?"end of input":"'"+(this.terminals_[y]||y)+"'"),this.parseError(F,{text:d.match,token:this.terminals_[y]||y,line:d.yylineno,loc:g,expected:b})}if(q[0]instanceof Array&&q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+p+", token: "+y);switch(q[0]){case 1:e.push(y),n.push(d.yytext),r.push(d.yylloc),e.push(q[1]),y=null,h=d.yyleng,l=d.yytext,o=d.yylineno,g=d.yylloc;break;case 2:if(A=this.productions_[q[1]][1],k.$=n[n.length-A],k._$={first_line:r[r.length-(A||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(A||1)].first_column,last_column:r[r.length-1].last_column},f&&(k._$.range=[r[r.length-(A||1)].range[0],r[r.length-1].range[1]]),void 0!==(T=this.performAction.apply(k,[l,h,o,u.yy,q[1],n,r].concat(c))))return T;A&&(e=e.slice(0,-1*A*2),n=n.slice(0,-1*A),r=r.slice(0,-1*A)),e.push(this.productions_[q[1]][0]),n.push(k.$),r.push(k._$),_=s[e[e.length-2]][e[e.length-1]],e.push(_);break;case 3:return!0}}return!0}},N={EOF:1,parseError:function(t,i){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,i)},setInput:function(t,i){return this.yy=i||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var i=t.length,e=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-i),this.offset-=i;var a=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),e.length-1&&(this.yylineno-=e.length-1);var n=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:e?(e.length===a.length?this.yylloc.first_column:0)+a[a.length-e.length].length-e[0].length:this.yylloc.first_column-i},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-i]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),i=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+i+"^"},test_match:function(t,i){var e,a,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(n.yylloc.range=this.yylloc.range.slice(0))),(a=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=a.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:a?a[a.length-1].length-a[a.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],e=this.performAction.call(this,this.yy,this,i,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e)return e;if(this._backtrack){for(var r in n)this[r]=n[r];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,i,e,a;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),r=0;ri[0].length)){if(i=e,a=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(e,n[r])))return t;if(this._backtrack){i=!1;continue}return!1}if(!this.options.flex)break}return i?!1!==(t=this.test_match(i,n[a]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,i,e,a){switch(e){case 0:case 1:case 3:break;case 2:return 32;case 4:return this.begin("title"),13;case 5:return this.popState(),"title_value";case 6:return this.begin("acc_title"),15;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),17;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:case 22:case 24:case 28:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 25;case 14:return 27;case 15:return 26;case 16:return 28;case 17:return 29;case 18:return 30;case 19:return 31;case 20:this.begin("md_string");break;case 21:return"MD_STR";case 23:this.begin("string");break;case 25:return"STR";case 26:return this.begin("point_start"),22;case 27:return this.begin("point_x"),23;case 29:this.popState(),this.begin("point_y");break;case 30:return this.popState(),24;case 31:return 6;case 32:return 43;case 33:return"COLON";case 34:return 45;case 35:return 44;case 36:case 37:return 46;case 38:return 47;case 39:return 49;case 40:return 50;case 41:return 48;case 42:return 41;case 43:return 51;case 44:return 42;case 45:return 5;case 46:return 33;case 47:return 40;case 48:return 34}},rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?: *x-axis *)/i,/^(?: *y-axis *)/i,/^(?: *--+> *)/i,/^(?: *quadrant-1 *)/i,/^(?: *quadrant-2 *)/i,/^(?: *quadrant-3 *)/i,/^(?: *quadrant-4 *)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\s*:\s*\[\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?:\s*\] *)/i,/^(?:\s*,\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?: *quadrantChart *)/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s)/i,/^(?:;)/i,/^(?:[!"#$%&'*+,-.`?\\_/])/i,/^(?:$)/i],conditions:{point_y:{rules:[30],inclusive:!1},point_x:{rules:[29],inclusive:!1},point_start:{rules:[27,28],inclusive:!1},acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},title:{rules:[5],inclusive:!1},md_string:{rules:[21,22],inclusive:!1},string:{rules:[24,25],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,6,8,10,13,14,15,16,17,18,19,20,23,26,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48],inclusive:!0}}};function U(){this.yy={}}return W.lexer=N,U.prototype=W,W.Parser=U,new U}());r.parser=r;const s=r,l=(0,a.E)();const o=(0,a.c)();function h(t){return(0,a.d)(t.trim(),o)}const c=new class{constructor(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData()}getDefaultData(){return{titleText:"",quadrant1Text:"",quadrant2Text:"",quadrant3Text:"",quadrant4Text:"",xAxisLeftText:"",xAxisRightText:"",yAxisBottomText:"",yAxisTopText:"",points:[]}}getDefaultConfig(){var t,i,e,n,r,s,l,o,h,c,d,u,x,g,f,y,p,q;return{showXAxis:!0,showYAxis:!0,showTitle:!0,chartHeight:(null==(t=a.B.quadrantChart)?void 0:t.chartWidth)||500,chartWidth:(null==(i=a.B.quadrantChart)?void 0:i.chartHeight)||500,titlePadding:(null==(e=a.B.quadrantChart)?void 0:e.titlePadding)||10,titleFontSize:(null==(n=a.B.quadrantChart)?void 0:n.titleFontSize)||20,quadrantPadding:(null==(r=a.B.quadrantChart)?void 0:r.quadrantPadding)||5,xAxisLabelPadding:(null==(s=a.B.quadrantChart)?void 0:s.xAxisLabelPadding)||5,yAxisLabelPadding:(null==(l=a.B.quadrantChart)?void 0:l.yAxisLabelPadding)||5,xAxisLabelFontSize:(null==(o=a.B.quadrantChart)?void 0:o.xAxisLabelFontSize)||16,yAxisLabelFontSize:(null==(h=a.B.quadrantChart)?void 0:h.yAxisLabelFontSize)||16,quadrantLabelFontSize:(null==(c=a.B.quadrantChart)?void 0:c.quadrantLabelFontSize)||16,quadrantTextTopPadding:(null==(d=a.B.quadrantChart)?void 0:d.quadrantTextTopPadding)||5,pointTextPadding:(null==(u=a.B.quadrantChart)?void 0:u.pointTextPadding)||5,pointLabelFontSize:(null==(x=a.B.quadrantChart)?void 0:x.pointLabelFontSize)||12,pointRadius:(null==(g=a.B.quadrantChart)?void 0:g.pointRadius)||5,xAxisPosition:(null==(f=a.B.quadrantChart)?void 0:f.xAxisPosition)||"top",yAxisPosition:(null==(y=a.B.quadrantChart)?void 0:y.yAxisPosition)||"left",quadrantInternalBorderStrokeWidth:(null==(p=a.B.quadrantChart)?void 0:p.quadrantInternalBorderStrokeWidth)||1,quadrantExternalBorderStrokeWidth:(null==(q=a.B.quadrantChart)?void 0:q.quadrantExternalBorderStrokeWidth)||2}}getDefaultThemeConfig(){return{quadrant1Fill:l.quadrant1Fill,quadrant2Fill:l.quadrant2Fill,quadrant3Fill:l.quadrant3Fill,quadrant4Fill:l.quadrant4Fill,quadrant1TextFill:l.quadrant1TextFill,quadrant2TextFill:l.quadrant2TextFill,quadrant3TextFill:l.quadrant3TextFill,quadrant4TextFill:l.quadrant4TextFill,quadrantPointFill:l.quadrantPointFill,quadrantPointTextFill:l.quadrantPointTextFill,quadrantXAxisTextFill:l.quadrantXAxisTextFill,quadrantYAxisTextFill:l.quadrantYAxisTextFill,quadrantTitleFill:l.quadrantTitleFill,quadrantInternalBorderStrokeFill:l.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:l.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),a.l.info("clear called")}setData(t){this.data={...this.data,...t}}addPoints(t){this.data.points=[...t,...this.data.points]}setConfig(t){a.l.trace("setConfig called with: ",t),this.config={...this.config,...t}}setThemeConfig(t){a.l.trace("setThemeConfig called with: ",t),this.themeConfig={...this.themeConfig,...t}}calculateSpace(t,i,e,a){const n=2*this.config.xAxisLabelPadding+this.config.xAxisLabelFontSize,r={top:"top"===t&&i?n:0,bottom:"bottom"===t&&i?n:0},s=2*this.config.yAxisLabelPadding+this.config.yAxisLabelFontSize,l={left:"left"===this.config.yAxisPosition&&e?s:0,right:"right"===this.config.yAxisPosition&&e?s:0},o=this.config.titleFontSize+2*this.config.titlePadding,h={top:a?o:0},c=this.config.quadrantPadding+l.left,d=this.config.quadrantPadding+r.top+h.top,u=this.config.chartWidth-2*this.config.quadrantPadding-l.left-l.right,x=this.config.chartHeight-2*this.config.quadrantPadding-r.top-r.bottom-h.top;return{xAxisSpace:r,yAxisSpace:l,titleSpace:h,quadrantSpace:{quadrantLeft:c,quadrantTop:d,quadrantWidth:u,quadrantHalfWidth:u/2,quadrantHeight:x,quadrantHalfHeight:x/2}}}getAxisLabels(t,i,e,a){const{quadrantSpace:n,titleSpace:r}=a,{quadrantHalfHeight:s,quadrantHeight:l,quadrantLeft:o,quadrantHalfWidth:h,quadrantTop:c,quadrantWidth:d}=n,u=Boolean(this.data.xAxisRightText),x=Boolean(this.data.yAxisTopText),g=[];return this.data.xAxisLeftText&&i&&g.push({text:this.data.xAxisLeftText,fill:this.themeConfig.quadrantXAxisTextFill,x:o+(u?h/2:0),y:"top"===t?this.config.xAxisLabelPadding+r.top:this.config.xAxisLabelPadding+c+l+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:u?"center":"left",horizontalPos:"top",rotation:0}),this.data.xAxisRightText&&i&&g.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:o+h+(u?h/2:0),y:"top"===t?this.config.xAxisLabelPadding+r.top:this.config.xAxisLabelPadding+c+l+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:u?"center":"left",horizontalPos:"top",rotation:0}),this.data.yAxisBottomText&&e&&g.push({text:this.data.yAxisBottomText,fill:this.themeConfig.quadrantYAxisTextFill,x:"left"===this.config.yAxisPosition?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+o+d+this.config.quadrantPadding,y:c+l-(x?s/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:x?"center":"left",horizontalPos:"top",rotation:-90}),this.data.yAxisTopText&&e&&g.push({text:this.data.yAxisTopText,fill:this.themeConfig.quadrantYAxisTextFill,x:"left"===this.config.yAxisPosition?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+o+d+this.config.quadrantPadding,y:c+s-(x?s/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:x?"center":"left",horizontalPos:"top",rotation:-90}),g}getQuadrants(t){const{quadrantSpace:i}=t,{quadrantHalfHeight:e,quadrantLeft:a,quadrantHalfWidth:n,quadrantTop:r}=i,s=[{text:{text:this.data.quadrant1Text,fill:this.themeConfig.quadrant1TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:a+n,y:r,width:n,height:e,fill:this.themeConfig.quadrant1Fill},{text:{text:this.data.quadrant2Text,fill:this.themeConfig.quadrant2TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:a,y:r,width:n,height:e,fill:this.themeConfig.quadrant2Fill},{text:{text:this.data.quadrant3Text,fill:this.themeConfig.quadrant3TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:a,y:r+e,width:n,height:e,fill:this.themeConfig.quadrant3Fill},{text:{text:this.data.quadrant4Text,fill:this.themeConfig.quadrant4TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:a+n,y:r+e,width:n,height:e,fill:this.themeConfig.quadrant4Fill}];for(const l of s)l.text.x=l.x+l.width/2,0===this.data.points.length?(l.text.y=l.y+l.height/2,l.text.horizontalPos="middle"):(l.text.y=l.y+this.config.quadrantTextTopPadding,l.text.horizontalPos="top");return s}getQuadrantPoints(t){const{quadrantSpace:i}=t,{quadrantHeight:e,quadrantLeft:a,quadrantTop:r,quadrantWidth:s}=i,l=(0,n.m4Y)().domain([0,1]).range([a,s+a]),o=(0,n.m4Y)().domain([0,1]).range([e+r,r]);return this.data.points.map((t=>({x:l(t.x),y:o(t.y),fill:this.themeConfig.quadrantPointFill,radius:this.config.pointRadius,text:{text:t.text,fill:this.themeConfig.quadrantPointTextFill,x:l(t.x),y:o(t.y)+this.config.pointTextPadding,verticalPos:"center",horizontalPos:"top",fontSize:this.config.pointLabelFontSize,rotation:0}})))}getBorders(t){const i=this.config.quadrantExternalBorderStrokeWidth/2,{quadrantSpace:e}=t,{quadrantHalfHeight:a,quadrantHeight:n,quadrantLeft:r,quadrantHalfWidth:s,quadrantTop:l,quadrantWidth:o}=e;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:r-i,y1:l,x2:r+o+i,y2:l},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:r+o,y1:l+i,x2:r+o,y2:l+n-i},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:r-i,y1:l+n,x2:r+o+i,y2:l+n},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:r,y1:l+i,x2:r,y2:l+n-i},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:r+s,y1:l+i,x2:r+s,y2:l+n-i},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:r+i,y1:l+a,x2:r+o-i,y2:l+a}]}getTitle(t){if(t)return{text:this.data.titleText,fill:this.themeConfig.quadrantTitleFill,fontSize:this.config.titleFontSize,horizontalPos:"top",verticalPos:"center",rotation:0,y:this.config.titlePadding,x:this.config.chartWidth/2}}build(){const t=this.config.showXAxis&&!(!this.data.xAxisLeftText&&!this.data.xAxisRightText),i=this.config.showYAxis&&!(!this.data.yAxisTopText&&!this.data.yAxisBottomText),e=this.config.showTitle&&!!this.data.titleText,a=this.data.points.length>0?"bottom":this.config.xAxisPosition,n=this.calculateSpace(a,t,i,e);return{points:this.getQuadrantPoints(n),quadrants:this.getQuadrants(n),axisLabels:this.getAxisLabels(a,t,i,n),borderLines:this.getBorders(n),title:this.getTitle(e)}}};const d={parser:s,db:{setWidth:function(t){c.setConfig({chartWidth:t})},setHeight:function(t){c.setConfig({chartHeight:t})},setQuadrant1Text:function(t){c.setData({quadrant1Text:h(t.text)})},setQuadrant2Text:function(t){c.setData({quadrant2Text:h(t.text)})},setQuadrant3Text:function(t){c.setData({quadrant3Text:h(t.text)})},setQuadrant4Text:function(t){c.setData({quadrant4Text:h(t.text)})},setXAxisLeftText:function(t){c.setData({xAxisLeftText:h(t.text)})},setXAxisRightText:function(t){c.setData({xAxisRightText:h(t.text)})},setYAxisTopText:function(t){c.setData({yAxisTopText:h(t.text)})},setYAxisBottomText:function(t){c.setData({yAxisBottomText:h(t.text)})},addPoint:function(t,i,e){c.addPoints([{x:i,y:e,text:h(t.text)}])},getQuadrantData:function(){const t=(0,a.c)(),{themeVariables:i,quadrantChart:e}=t;return e&&c.setConfig(e),c.setThemeConfig({quadrant1Fill:i.quadrant1Fill,quadrant2Fill:i.quadrant2Fill,quadrant3Fill:i.quadrant3Fill,quadrant4Fill:i.quadrant4Fill,quadrant1TextFill:i.quadrant1TextFill,quadrant2TextFill:i.quadrant2TextFill,quadrant3TextFill:i.quadrant3TextFill,quadrant4TextFill:i.quadrant4TextFill,quadrantPointFill:i.quadrantPointFill,quadrantPointTextFill:i.quadrantPointTextFill,quadrantXAxisTextFill:i.quadrantXAxisTextFill,quadrantYAxisTextFill:i.quadrantYAxisTextFill,quadrantExternalBorderStrokeFill:i.quadrantExternalBorderStrokeFill,quadrantInternalBorderStrokeFill:i.quadrantInternalBorderStrokeFill,quadrantTitleFill:i.quadrantTitleFill}),c.setData({titleText:(0,a.t)()}),c.build()},clear:function(){c.clear(),(0,a.v)()},setAccTitle:a.s,getAccTitle:a.g,setDiagramTitle:a.q,getDiagramTitle:a.t,getAccDescription:a.a,setAccDescription:a.b},renderer:{draw:(t,i,e,r)=>{var s,l,o;function h(t){return"top"===t?"hanging":"middle"}function c(t){return"left"===t?"start":"middle"}function d(t){return`translate(${t.x}, ${t.y}) rotate(${t.rotation||0})`}const u=(0,a.c)();a.l.debug("Rendering quadrant chart\n"+t);const x=u.securityLevel;let g;"sandbox"===x&&(g=(0,n.Ltv)("#i"+i));const f=("sandbox"===x?(0,n.Ltv)(g.nodes()[0].contentDocument.body):(0,n.Ltv)("body")).select(`[id="${i}"]`),y=f.append("g").attr("class","main"),p=(null==(s=u.quadrantChart)?void 0:s.chartWidth)||500,q=(null==(l=u.quadrantChart)?void 0:l.chartHeight)||500;(0,a.i)(f,q,p,(null==(o=u.quadrantChart)?void 0:o.useMaxWidth)||!0),f.attr("viewBox","0 0 "+p+" "+q),r.db.setHeight(q),r.db.setWidth(p);const T=r.db.getQuadrantData(),m=y.append("g").attr("class","quadrants"),A=y.append("g").attr("class","border"),_=y.append("g").attr("class","data-points"),b=y.append("g").attr("class","labels"),S=y.append("g").attr("class","title");T.title&&S.append("text").attr("x",0).attr("y",0).attr("fill",T.title.fill).attr("font-size",T.title.fontSize).attr("dominant-baseline",h(T.title.horizontalPos)).attr("text-anchor",c(T.title.verticalPos)).attr("transform",d(T.title)).text(T.title.text),T.borderLines&&A.selectAll("line").data(T.borderLines).enter().append("line").attr("x1",(t=>t.x1)).attr("y1",(t=>t.y1)).attr("x2",(t=>t.x2)).attr("y2",(t=>t.y2)).style("stroke",(t=>t.strokeFill)).style("stroke-width",(t=>t.strokeWidth));const k=m.selectAll("g.quadrant").data(T.quadrants).enter().append("g").attr("class","quadrant");k.append("rect").attr("x",(t=>t.x)).attr("y",(t=>t.y)).attr("width",(t=>t.width)).attr("height",(t=>t.height)).attr("fill",(t=>t.fill)),k.append("text").attr("x",0).attr("y",0).attr("fill",(t=>t.text.fill)).attr("font-size",(t=>t.text.fontSize)).attr("dominant-baseline",(t=>h(t.text.horizontalPos))).attr("text-anchor",(t=>c(t.text.verticalPos))).attr("transform",(t=>d(t.text))).text((t=>t.text.text));b.selectAll("g.label").data(T.axisLabels).enter().append("g").attr("class","label").append("text").attr("x",0).attr("y",0).text((t=>t.text)).attr("fill",(t=>t.fill)).attr("font-size",(t=>t.fontSize)).attr("dominant-baseline",(t=>h(t.horizontalPos))).attr("text-anchor",(t=>c(t.verticalPos))).attr("transform",(t=>d(t)));const F=_.selectAll("g.data-point").data(T.points).enter().append("g").attr("class","data-point");F.append("circle").attr("cx",(t=>t.x)).attr("cy",(t=>t.y)).attr("r",(t=>t.radius)).attr("fill",(t=>t.fill)),F.append("text").attr("x",0).attr("y",0).text((t=>t.text.text)).attr("fill",(t=>t.text.fill)).attr("font-size",(t=>t.text.fontSize)).attr("dominant-baseline",(t=>h(t.text.horizontalPos))).attr("text-anchor",(t=>c(t.text.verticalPos))).attr("transform",(t=>d(t.text)))}},styles:()=>""}}}]); \ No newline at end of file diff --git a/assets/js/4642ab5c.915a2ef9.js b/assets/js/4642ab5c.915a2ef9.js deleted file mode 100644 index ffbc920b4013..000000000000 --- a/assets/js/4642ab5c.915a2ef9.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4434],{91797:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>h,contentTitle:()=>o,default:()=>c,frontMatter:()=>i,metadata:()=>a,toc:()=>l});var t=s(74848),r=s(28453);const i={id:"learn-cryptography",title:"Cryptography on Polkadot",sidebar_label:"Cryptography",description:"Cryptographic Functions used in Polkadot.",keywords:["cryptography","hashing","keypair","signing","keys","randomness","verifiable random function","VDF"],slug:"../learn-cryptography"},o=void 0,a={id:"learn/learn-cryptography",title:"Cryptography on Polkadot",description:"Cryptographic Functions used in Polkadot.",source:"@site/../docs/learn/learn-cryptography.md",sourceDirName:"learn",slug:"/learn-cryptography",permalink:"/docs/learn-cryptography",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-cryptography.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1726760224e3,frontMatter:{id:"learn-cryptography",title:"Cryptography on Polkadot",sidebar_label:"Cryptography",description:"Cryptographic Functions used in Polkadot.",keywords:["cryptography","hashing","keypair","signing","keys","randomness","verifiable random function","VDF"],slug:"../learn-cryptography"},sidebar:"docs",previous:{title:"NFT Pallets",permalink:"/docs/learn-nft-pallets"},next:{title:"NPoS Election Algorithms",permalink:"/docs/learn-phragmen"}},h={},l=[{value:"Hashing Algorithm",id:"hashing-algorithm",level:2},{value:"Keypairs and Signing",id:"keypairs-and-signing",level:2},{value:"Keys",id:"keys",level:2},{value:"Account Keys",id:"account-keys",level:3},{value:"Stash and Staking Proxy Keys",id:"stash-and-staking-proxy-keys",level:3},{value:"Session Keys",id:"session-keys",level:3},{value:"FAQ about Keys",id:"faq-about-keys",level:3},{value:"Why was ed25519 selected over secp256k1?",id:"why-was-ed25519-selected-over-secp256k1",level:4},{value:"What is sr25519 and where did it come from?",id:"what-is-sr25519-and-where-did-it-come-from",level:4},{value:"Are BLS signatures used in Polkadot?",id:"are-bls-signatures-used-in-polkadot",level:4},{value:"Randomness",id:"randomness",level:2},{value:"VRF",id:"vrf",level:3},{value:"Here's how it works in detail:",id:"heres-how-it-works-in-detail",level:4},{value:"RANDAO",id:"randao",level:3},{value:"VDFs",id:"vdfs",level:3},{value:"Resources",id:"resources",level:2},{value:"Appendix A: On the security of curves",id:"appendix-a-on-the-security-of-curves",level:2}];function d(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",h4:"h4",img:"img",li:"li",p:"p",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.p,{children:"This is a high-level overview of the cryptography used in Polkadot. It assumes that you have some\nknowledge about cryptographic primitives that are generally used in blockchains such as hashes,\nelliptic curve cryptography (ECC), and public-private keypairs."}),"\n",(0,t.jsxs)(n.p,{children:["For detailed descriptions on the cryptography used in Polkadot please see the more advanced\n",(0,t.jsx)(n.a,{href:"https://research.web3.foundation",children:"research wiki"}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"hashing-algorithm",children:"Hashing Algorithm"}),"\n",(0,t.jsxs)(n.p,{children:["The hashing algorithm used in Polkadot is\n",(0,t.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/BLAKE_(hash_function)#BLAKE2",children:"Blake2b"}),". Blake2 is considered to be\na very fast cryptographic hash function that is also used in the cryptocurrency\n",(0,t.jsx)(n.a,{href:"https://z.cash",children:"Zcash"}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"keypairs-and-signing",children:"Keypairs and Signing"}),"\n",(0,t.jsx)(n.p,{children:'Polkadot uses Schnorrkel/Ristretto x25519 ("sr25519") as its key derivation and signing algorithm.'}),"\n",(0,t.jsxs)(n.p,{children:["Sr25519 is based on the same underlying ",(0,t.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/Curve25519",children:"Curve25519"})," as\nits EdDSA counterpart, ",(0,t.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/EdDSA#Ed25519",children:"Ed25519"}),". However, it uses\nSchnorr signatures instead of the EdDSA scheme. Schnorr signatures bring some noticeable benefits\nover the ECDSA/EdDSA schemes. For one, it is more efficient and still retains the same feature set\nand security assumptions. Additionally, it allows for native multisignature through\n",(0,t.jsx)(n.a,{href:"https://bitcoincore.org/en/2017/03/23/schnorr-signature-aggregation/",children:"signature aggregation"}),"."]}),"\n",(0,t.jsxs)(n.p,{children:["The names Schnorrkel and Ristretto come from the two Rust libraries that implement this scheme, the\n",(0,t.jsx)(n.a,{href:"https://github.com/w3f/schnorrkel",children:"Schnorrkel"})," library for Schnorr signatures and the\n",(0,t.jsx)(n.a,{href:"https://ristretto.group/ristretto.html",children:"Ristretto"})," library that makes it possible to use cofactor-8\ncurves like Curve25519."]}),"\n",(0,t.jsx)(n.h2,{id:"keys",children:"Keys"}),"\n",(0,t.jsx)(n.p,{children:"Public and private keys are an important aspect of most crypto-systems and an essential component\nthat enables blockchains like Polkadot to exist."}),"\n",(0,t.jsx)(n.h3,{id:"account-keys",children:"Account Keys"}),"\n",(0,t.jsx)(n.p,{children:"Account keys are keys that are meant to control funds. They can be either:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["The vanilla ",(0,t.jsx)(n.code,{children:"ed25519"})," implementation using Schnorr signatures."]}),"\n",(0,t.jsxs)(n.li,{children:["The Schnorrkel/Ristretto ",(0,t.jsx)(n.code,{children:"sr25519"})," variant using Schnorr signatures."]}),"\n",(0,t.jsx)(n.li,{children:"ECDSA signatures on secp256k1"}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["There are no differences in security between ",(0,t.jsx)(n.code,{children:"ed25519"})," and ",(0,t.jsx)(n.code,{children:"sr25519"})," for simple signatures. We\nexpect ",(0,t.jsx)(n.code,{children:"ed25519"})," to be much better supported by commercial HSMs for the foreseeable future. At the\nsame time, ",(0,t.jsx)(n.code,{children:"sr25519"})," makes implementing more complex protocols safer. In particular, ",(0,t.jsx)(n.code,{children:"sr25519"})," comes\nwith safer version of many protocols like HDKD common in the Bitcoin and Ethereum ecosystem."]}),"\n",(0,t.jsx)(n.h3,{id:"stash-and-staking-proxy-keys",children:"Stash and Staking Proxy Keys"}),"\n",(0,t.jsx)(n.p,{children:"When we talk about stash and staking proxy keys, we usually talk about them in the context of\nrunning a validator or nominating, but they are useful concepts for all users to know. Both keys are\ntypes of account keys. They are distinguished by their intended use, not by an underlying\ncryptographic difference. All the info mentioned in the parent section applies to these keys. When\ncreating new staking proxy or stash keys, all cryptography supported by account keys are an\navailable option."}),"\n",(0,t.jsx)(n.p,{children:"The staking proxy key is a semi-online key that will be in the direct control of a user, and used to\nsubmit manual extrinsics. For validators or nominators, this means that the proxy key will be used\nto start or stop validating or nominating. Proxy keys should hold some native tokens to pay for\nfees, but they should not be used to hold huge amounts or life savings. Since they will be exposed\nto the internet with relative frequency, they should be treated carefully and occasionally replaced\nwith new ones."}),"\n",(0,t.jsx)(n.p,{children:"The stash key is a key that will, in most cases, be a cold wallet, existing on a piece of paper in a\nsafe or protected by layers of hardware security. It should rarely, if ever, be exposed to the\ninternet or used to submit extrinsics. The stash key is intended to hold a large amount of funds. It\nshould be thought of as a saving's account at a bank, which ideally is only ever touched in urgent\nconditions. Or, perhaps a more apt metaphor is to think of it as buried treasure, hidden on some\nrandom island and only known by the pirate who originally hid it."}),"\n",(0,t.jsxs)(n.p,{children:["Since the stash key is kept offline, it must be set to have its funds bonded to a particular staking\nproxy. For non-spending actions, the staking proxy has the funds of the stash behind it. For\nexample, in nominating, staking, or voting, the proxy can indicate its preference with the weight of\nthe stash. It will never be able to actually move or claim the funds in the stash key. However, if\nsomeone does obtain your proxy key, they could use it for ",(0,t.jsx)(n.a,{href:"/docs/learn-offenses",children:"slashable behavior"}),",\nso you should still protect it and change it regularly."]}),"\n",(0,t.jsx)(n.h3,{id:"session-keys",children:"Session Keys"}),"\n",(0,t.jsxs)(n.p,{children:["Session keys are hot keys that must be kept online by a validator to perform network operations.\nSession keys are typically generated in the client, although they don't have to be. They are ",(0,t.jsx)(n.em,{children:"not"}),"\nmeant to control funds and should only be used for their intended purpose. They can be changed\nregularly; your staking proxy only need to create a certificate by signing a session public key and\nbroadcast this certificate via an extrinsic."]}),"\n",(0,t.jsx)(n.p,{children:"Polkadot uses six session keys:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Authority Discovery: sr25519"}),"\n",(0,t.jsx)(n.li,{children:"BABE: sr25519"}),"\n",(0,t.jsx)(n.li,{children:"BEEFY: ecdsa"}),"\n",(0,t.jsx)(n.li,{children:"GRANDPA: ed25519"}),"\n",(0,t.jsx)(n.li,{children:"Parachain Assignment: sr25519"}),"\n",(0,t.jsx)(n.li,{children:"Parachain Validator: ed25519"}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["BABE requires keys suitable for use in a ",(0,t.jsx)(n.a,{href:"#vrf",children:"Verifiable Random Function"})," as well as for digital\nsignatures. Sr25519 keys have both capabilities and so are used for BABE."]}),"\n",(0,t.jsx)(n.p,{children:"In the future, we plan to use a BLS key for GRANDPA because it allows for more efficient signature\naggregation."}),"\n",(0,t.jsx)(n.h3,{id:"faq-about-keys",children:"FAQ about Keys"}),"\n",(0,t.jsxs)(n.h4,{id:"why-was-ed25519-selected-over-secp256k1",children:["Why was ",(0,t.jsx)(n.code,{children:"ed25519"})," selected over ",(0,t.jsx)(n.code,{children:"secp256k1"}),"?"]}),"\n",(0,t.jsxs)(n.p,{children:["The original key derivation cryptography that was implemented for Polkadot and Substrate chains was\n",(0,t.jsx)(n.code,{children:"ed25519"}),", which is a Schnorr signature algorithm implemented over the Edward's Curve 25519 (so\nnamed due to the parameters of the curve equation)."]}),"\n",(0,t.jsxs)(n.p,{children:["Most cryptocurrencies, including Bitcoin and Ethereum, currently use ECDSA signatures on the\nsecp256k1 curve. This curve is considered much more secure than NIST curves, which\n",(0,t.jsx)(n.a,{href:"#appendix-a-on-the-security-of-curves",children:"have possible backdoors from the NSA"}),". The Curve25519 is\nconsidered possibly ",(0,t.jsx)(n.em,{children:"even more"})," secure than this one and allows for easier implementation of Schnorr\nsignatures. A recent patent expiration on it has made it the preferred choice for use in Polkadot."]}),"\n",(0,t.jsxs)(n.p,{children:["The choice of using Schnorr signatures over using ECDSA is not so cut and dried. Jeff Burdges (a\nWeb3 researcher) provides additional details on the decision in this\n",(0,t.jsx)(n.a,{href:"https://research.web3.foundation/Polkadot/security/keys",children:"research post"})," on the topic:"]}),"\n",(0,t.jsx)(n.admonition,{title:"Choosing Schnorr signatures over ECDSA signatures",type:"info",children:(0,t.jsx)(n.p,{children:"There is one sacrifice we make by choosing Schnorr signatures over ECDSA signatures for account\nkeys: Both require 64 bytes, but only ECDSA signatures communicate their public key. There are\nobsolete Schnorr variants that support recovering the public key from a signature, but they break\nimportant functionality like hierarchical deterministic key derivation. In consequence, Schnorr\nsignatures often take an extra 32 bytes for the public key."})}),"\n",(0,t.jsx)(n.p,{children:"But ultimately the benefits of using Schnorr signatures outweigh the tradeoffs, and future\noptimizations may resolve the inefficiencies pointed out in the quote above."}),"\n",(0,t.jsxs)(n.h4,{id:"what-is-sr25519-and-where-did-it-come-from",children:["What is ",(0,t.jsx)(n.code,{children:"sr25519"})," and where did it come from?"]}),"\n",(0,t.jsxs)(n.p,{children:["Some context: The Schnorr signatures over the Twisted Edward's Curve25519 are considered secure,\nhowever Ed25519 has not been completely devoid of its bugs. Most notably,\n",(0,t.jsx)(n.a,{href:"https://www.getmonero.org/2017/05/17/disclosure-of-a-major-bug-in-cryptonote-based-currencies.html",children:"Monero and all other CryptoNote currencies"}),"\nwere vulnerable to a double spend exploit that could have potentially led to undetected, infinite\ninflation."]}),"\n",(0,t.jsx)(n.p,{children:"These exploits were due to one peculiarity in Ed25519, which is known as its cofactor of 8. The\ncofactor of a curve is an esoteric detail that could have dire consequences for the security of\nimplementation of more complex protocols."}),"\n",(0,t.jsxs)(n.p,{children:["Conveniently, ",(0,t.jsx)(n.a,{href:"https://www.shiftleft.org/papers/decaf/index.xhtml",children:"Mike Hamburg's Decaf paper"}),"\nprovides a possible path forward to solving this potential bug. Decaf is basically a way to take\nTwisted Edward's Curves cofactor and mathematically change it with little cost to performance and\ngains to security."]}),"\n",(0,t.jsxs)(n.p,{children:["The Decaf paper approach by the ",(0,t.jsx)(n.a,{href:"https://ristretto.group/",children:"Ristretto Group"})," was extended and\nimplemented in Rust to include cofactor-8 curves like the Curve25519 and makes Schnorr signatures\nover the Edward's curve more secure."]}),"\n",(0,t.jsxs)(n.p,{children:["Web3 Foundation has implemented a Schnorr signature library using the more secure Ristretto\ncompression over the Curve25519 in the ",(0,t.jsx)(n.a,{href:"https://github.com/w3f/schnorrkel",children:"Schnorrkel"})," repository.\nSchnorrkel implements related protocols on top of this curve compression such as HDKD, MuSig, and a\nverifiable random function (VRF). It also includes various minor improvements such as the hashing\nscheme STROBE that can theoretically process huge amounts of data with only one call across the Wasm\nboundary."]}),"\n",(0,t.jsxs)(n.p,{children:["The implementation of Schnorr signatures that is used in Polkadot and implements the Schnorrkel\nprotocols over the Ristretto compression of the Curve25519 is known as ",(0,t.jsx)(n.strong,{children:"sr25519"}),"."]}),"\n",(0,t.jsx)(n.h4,{id:"are-bls-signatures-used-in-polkadot",children:"Are BLS signatures used in Polkadot?"}),"\n",(0,t.jsx)(n.p,{children:"Not yet, but they will be. BLS signatures allow more efficient signature aggregation. Because\nGRANDPA validators are usually signing the same thing (e.g. a block), it makes sense to aggregate\nthem, which can allow for other protocol optimizations."}),"\n",(0,t.jsx)(n.admonition,{title:"From the BLS library's README",type:"info",children:(0,t.jsx)(n.p,{children:"Boneh-Lynn-Shacham (BLS) signatures have slow signing, very slow verification, require slow and much\nless secure pairing friendly curves, and tend towards dangerous malleability. Yet, BLS permits a\ndiverse array of signature aggregation options far beyond any other known signature scheme, which\nmakes BLS a preferred scheme for voting in consensus algorithms and for threshold signatures."})}),"\n",(0,t.jsx)(n.p,{children:"Even though Schnorr signatures allow for signature aggregation, BLS signatures are much more\nefficient in some fashions. For this reason it will be one of the session keys that will be used by\nvalidators on the Polkadot network and critical to the GRANDPA finality gadget."}),"\n",(0,t.jsx)(n.h2,{id:"randomness",children:"Randomness"}),"\n",(0,t.jsxs)(n.p,{children:["Randomness in Proof of Stake blockchains is important for a fair and unpredictable distribution of\nvalidator responsibilities. Computers are bad at random numbers because they are deterministic\ndevices (the same input always produces the same output). What people usually call random numbers on\na computer (such as in a gaming application), are ",(0,t.jsx)(n.em,{children:"pseudo-random"})," - that is, they depend on a\nsufficiently random ",(0,t.jsx)(n.em,{children:"seed"})," provided by the user or another type of ",(0,t.jsx)(n.em,{children:"oracle"}),", like a\n",(0,t.jsx)(n.a,{href:"https://www.random.org/randomness/",children:"weather station for atmospheric noise"}),", your\n",(0,t.jsx)(n.a,{href:"https://mdpi.altmetric.com/details/47574324",children:"heart rate"}),", or even\n",(0,t.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/Lavarand",children:"lava lamps"}),", from which it can generate a series of\nseemingly-random numbers. But given the same seed, the same sequence will always be generated."]}),"\n",(0,t.jsx)(n.p,{children:"Though, these inputs will vary based on time and space, and it would be impossible to get the same\nresult into all the nodes of a particular blockchain around the world. If nodes get different inputs\non which to build blocks, forks happen. Real-world entropy is not suitable for use as a seed for\nblockchain randomness."}),"\n",(0,t.jsxs)(n.p,{children:["There are two main approaches to blockchain randomness in production today: ",(0,t.jsx)(n.code,{children:"RANDAO"})," and ",(0,t.jsx)(n.code,{children:"VRF"}),".\nPolkadot uses VRF."]}),"\n",(0,t.jsx)(n.h3,{id:"vrf",children:"VRF"}),"\n",(0,t.jsx)(n.p,{children:"A verifiable random function (VRF) is a mathematical operation that takes some input and produces a\nrandom number along with a proof of authenticity that this random number was generated by the\nsubmitter. The proof can be verified by any challenger to ensure the random number generation is\nvalid."}),"\n",(0,t.jsxs)(n.p,{children:["The VRF used in Polkadot is roughly the same as the one used in Ouroboros Praos. Ouroboros\nrandomness is secure for block production and works well for ",(0,t.jsx)(n.a,{href:"/docs/learn-consensus#BABE",children:"BABE"}),". Where\nthey differ is that Polkadot's VRF does not depend on a central clock (the problem becomes - whose\ncentral clock?), rather, it depends on its own past results to determine present and future results,\nand it uses slot numbers as a clock emulator, estimating time."]}),"\n",(0,t.jsx)(n.h4,{id:"heres-how-it-works-in-detail",children:"Here's how it works in detail:"}),"\n",(0,t.jsxs)(n.p,{children:["Slots are discrete units of time six seconds in length. Each slot can contain a block, but may not.\nSlots make up ",(0,t.jsx)(n.a,{href:"/docs/glossary##epoch",children:"epochs"})," - on Polkadot, 2400 slots make one epoch,\nwhich makes epochs four hours long."]}),"\n",(0,t.jsx)(n.p,{children:'In every slot, each validator "rolls a die". They execute a function (the VRF) that takes as input\nthe following:'}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:'The "secret key",'})," a key specifically made for these die rolls."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"An epoch randomness value,"})," which is the hash of VRF values from the blocks in the epoch before\nlast (N-2), so past randomness affects the current pending randomness (N)."]}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.strong,{children:"The slot number."})}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"VRF_babe",src:s(64281).A+"",width:"1685",height:"564"})}),"\n",(0,t.jsxs)(n.p,{children:["The output is two values: a ",(0,t.jsx)(n.code,{children:"RESULT"})," (the random value) and a ",(0,t.jsx)(n.code,{children:"PROOF"})," (a proof that the random value\nwas generated correctly)."]}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"RESULT"})," is then compared to a ",(0,t.jsx)(n.em,{children:"threshold"})," defined in the implementation of the protocol\n(specifically, in the Polkadot Host). If the value is less than the threshold, then the validator\nwho rolled this number is a viable block production candidate for that slot. The validator then\nattempts to create a block and submits this block into the network along with the previously\nobtained ",(0,t.jsx)(n.code,{children:"PROOF"})," and ",(0,t.jsx)(n.code,{children:"RESULT"}),". Under VRF, every validator rolls a number for themselves, checks it\nagainst a threshold, and produces a block if the random roll is under that threshold."]}),"\n",(0,t.jsxs)(n.p,{children:["The astute reader will notice that due to the way this works, some slots may have no validators as\nblock producer candidates because all validator candidates rolled too high and missed the threshold.\nWe clarify how we resolve this issue and make sure that Polkadot block times remain near\nconstant-time in the wiki page on ",(0,t.jsx)(n.a,{href:"/docs/learn-consensus",children:"consensus"}),"."]}),"\n",(0,t.jsx)(n.h3,{id:"randao",children:"RANDAO"}),"\n",(0,t.jsxs)(n.p,{children:["An alternative method for getting randomness on-chain is the\n",(0,t.jsx)(n.a,{href:"https://github.com/randao/randao",children:"RANDAO"})," method from Ethereum. RANDAO requires each validator to\nprepare by performing many thousands of hashes on some seed. Validators then publish the final hash\nduring a round and the random number is derived from every participant's entry into the game. As\nlong as one honest validator participates, the randomness is considered secure (non-economically\nviable to attack). RANDAO is optionally augmented with VDF."]}),"\n",(0,t.jsx)(n.h3,{id:"vdfs",children:"VDFs"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.a,{href:"https://vdfresearch.org/",children:"Verifiable Delay Functions"})," are computations that take a prescribed\nduration of time to complete, even on parallel computers. They produce unique output that can be\nindependently and efficiently verified in a public setting. By feeding the result of RANDAO into a\nVDF, a delay is introduced that renders any attacker's attempt at influencing the current randomness\nobsolete."]}),"\n",(0,t.jsx)(n.p,{children:"VDFs will likely be implemented through ASIC devices that need to be run separately from the other\ntypes of nodes. Although only one is enough to keep the system secure, and they will be open source\nand distributed at nearly no charge, running them is neither cheap nor incentivized, producing\nunnecessary friction for users of the blockchains opting for this method."}),"\n",(0,t.jsx)(n.h2,{id:"resources",children:"Resources"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"https://web.archive.org/web/20210513183118/https://forum.w3f.community/t/key-recovery-attack-on-bip32-ed25519/44",children:"Key discovery attack on BIP32-Ed25519"})," -\nArchive of forum post detailing a potential attack on BIP32-Ed25519. A motivation for transition\nto the sr25519 variant."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"https://research.web3.foundation/Polkadot/security/keys",children:"Account signatures and keys in Polkadot"})," -\nResearch post by Web3 researcher Jeff Burdges."]}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://bitcoin.stackexchange.com/questions/57965/are-schnorr-signatures-quantum-computer-resistant/57977#57977",children:"Are Schnorr signatures quantum computer resistant?"})}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"https://research.web3.foundation/Polkadot/protocols/block-production",children:"Polkadot's research on blockchain randomness and sortition"})," -\ncontains reasoning for choices made along with proofs"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"https://github.com/paritytech/ink/issues/57",children:"Discussion on Randomness used in Polkadot"})," - W3F\nresearchers discuss the randomness in Polkadot and when it is usable and under which assumptions."]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"appendix-a-on-the-security-of-curves",children:"Appendix A: On the security of curves"}),"\n",(0,t.jsxs)(n.admonition,{title:"From the",type:"note",children:[(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.a,{href:"https://git.libssh.org/projects/libssh.git/tree/doc/curve25519-sha256@libssh.org.txt#n10",children:"Introduction of Curve25519"}),"\ninto ",(0,t.jsx)(n.code,{children:"libssl"})]}),(0,t.jsx)(n.p,{children:"The reason is the following: During summer of 2013, revelations from ex- consultant at [the] NSA\nEdward Snowden gave proof that [the] NSA willingly inserts backdoors into software, hardware\ncomponents and published standards. While it is still believed that the mathematics behind ECC\n(Elliptic-curve cryptography) are still sound and solid, some people (including Bruce Schneier\n[SCHNEIER]), showed their lack of confidence in NIST-published curves such as nistp256, nistp384,\nnistp521, for which constant parameters (including the generator point) are defined without\nexplanation. It is also believed that [the] NSA had a word to say in their definition. These curves\nare not the most secure or fastest possible for their key sizes [DJB], and researchers think it is\npossible that NSA have ways of cracking NIST curves. It is also interesting to note that SSH belongs\nto the list of protocols the NSA claims to be able to eavesdrop. Having a secure replacement would\nmake passive attacks much harder if such a backdoor exists."}),(0,t.jsx)(n.p,{children:"However an alternative exists in the form of Curve25519. This algorithm has been proposed in 2006 by\nDJB [Curve25519]. Its main strengths are its speed, its constant-time run time (and resistance\nagainst side-channel attacks), and its lack of nebulous hard-coded constants."})]})]})}function c(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(d,{...e})}):d(e)}},64281:(e,n,s)=>{s.d(n,{A:()=>t});const t=s.p+"assets/images/VRF_babe-12768d3392ba939b5f4c4955556d12c2.png"},28453:(e,n,s)=>{s.d(n,{R:()=>o,x:()=>a});var t=s(96540);const r={},i=t.createContext(r);function o(e){const n=t.useContext(i);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:o(e.components),t.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/4642ab5c.dd4d91e1.js b/assets/js/4642ab5c.dd4d91e1.js new file mode 100644 index 000000000000..e6783723e2d7 --- /dev/null +++ b/assets/js/4642ab5c.dd4d91e1.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4434],{23213:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>h,contentTitle:()=>a,default:()=>c,frontMatter:()=>o,metadata:()=>t,toc:()=>l});const t=JSON.parse('{"id":"learn/learn-cryptography","title":"Cryptography on Polkadot","description":"Cryptographic Functions used in Polkadot.","source":"@site/../docs/learn/learn-cryptography.md","sourceDirName":"learn","slug":"/learn-cryptography","permalink":"/docs/learn-cryptography","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-cryptography.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1726760224000,"frontMatter":{"id":"learn-cryptography","title":"Cryptography on Polkadot","sidebar_label":"Cryptography","description":"Cryptographic Functions used in Polkadot.","keywords":["cryptography","hashing","keypair","signing","keys","randomness","verifiable random function","VDF"],"slug":"../learn-cryptography"},"sidebar":"docs","previous":{"title":"NFT Pallets","permalink":"/docs/learn-nft-pallets"},"next":{"title":"NPoS Election Algorithms","permalink":"/docs/learn-phragmen"}}');var r=s(74848),i=s(28453);const o={id:"learn-cryptography",title:"Cryptography on Polkadot",sidebar_label:"Cryptography",description:"Cryptographic Functions used in Polkadot.",keywords:["cryptography","hashing","keypair","signing","keys","randomness","verifiable random function","VDF"],slug:"../learn-cryptography"},a=void 0,h={},l=[{value:"Hashing Algorithm",id:"hashing-algorithm",level:2},{value:"Keypairs and Signing",id:"keypairs-and-signing",level:2},{value:"Keys",id:"keys",level:2},{value:"Account Keys",id:"account-keys",level:3},{value:"Stash and Staking Proxy Keys",id:"stash-and-staking-proxy-keys",level:3},{value:"Session Keys",id:"session-keys",level:3},{value:"FAQ about Keys",id:"faq-about-keys",level:3},{value:"Why was ed25519 selected over secp256k1?",id:"why-was-ed25519-selected-over-secp256k1",level:4},{value:"What is sr25519 and where did it come from?",id:"what-is-sr25519-and-where-did-it-come-from",level:4},{value:"Are BLS signatures used in Polkadot?",id:"are-bls-signatures-used-in-polkadot",level:4},{value:"Randomness",id:"randomness",level:2},{value:"VRF",id:"vrf",level:3},{value:"Here's how it works in detail:",id:"heres-how-it-works-in-detail",level:4},{value:"RANDAO",id:"randao",level:3},{value:"VDFs",id:"vdfs",level:3},{value:"Resources",id:"resources",level:2},{value:"Appendix A: On the security of curves",id:"appendix-a-on-the-security-of-curves",level:2}];function d(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",h4:"h4",img:"img",li:"li",p:"p",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.p,{children:"This is a high-level overview of the cryptography used in Polkadot. It assumes that you have some\nknowledge about cryptographic primitives that are generally used in blockchains such as hashes,\nelliptic curve cryptography (ECC), and public-private keypairs."}),"\n",(0,r.jsxs)(n.p,{children:["For detailed descriptions on the cryptography used in Polkadot please see the more advanced\n",(0,r.jsx)(n.a,{href:"https://research.web3.foundation",children:"research wiki"}),"."]}),"\n",(0,r.jsx)(n.h2,{id:"hashing-algorithm",children:"Hashing Algorithm"}),"\n",(0,r.jsxs)(n.p,{children:["The hashing algorithm used in Polkadot is\n",(0,r.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/BLAKE_(hash_function)#BLAKE2",children:"Blake2b"}),". Blake2 is considered to be\na very fast cryptographic hash function that is also used in the cryptocurrency\n",(0,r.jsx)(n.a,{href:"https://z.cash",children:"Zcash"}),"."]}),"\n",(0,r.jsx)(n.h2,{id:"keypairs-and-signing",children:"Keypairs and Signing"}),"\n",(0,r.jsx)(n.p,{children:'Polkadot uses Schnorrkel/Ristretto x25519 ("sr25519") as its key derivation and signing algorithm.'}),"\n",(0,r.jsxs)(n.p,{children:["Sr25519 is based on the same underlying ",(0,r.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/Curve25519",children:"Curve25519"})," as\nits EdDSA counterpart, ",(0,r.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/EdDSA#Ed25519",children:"Ed25519"}),". However, it uses\nSchnorr signatures instead of the EdDSA scheme. Schnorr signatures bring some noticeable benefits\nover the ECDSA/EdDSA schemes. For one, it is more efficient and still retains the same feature set\nand security assumptions. Additionally, it allows for native multisignature through\n",(0,r.jsx)(n.a,{href:"https://bitcoincore.org/en/2017/03/23/schnorr-signature-aggregation/",children:"signature aggregation"}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["The names Schnorrkel and Ristretto come from the two Rust libraries that implement this scheme, the\n",(0,r.jsx)(n.a,{href:"https://github.com/w3f/schnorrkel",children:"Schnorrkel"})," library for Schnorr signatures and the\n",(0,r.jsx)(n.a,{href:"https://ristretto.group/ristretto.html",children:"Ristretto"})," library that makes it possible to use cofactor-8\ncurves like Curve25519."]}),"\n",(0,r.jsx)(n.h2,{id:"keys",children:"Keys"}),"\n",(0,r.jsx)(n.p,{children:"Public and private keys are an important aspect of most crypto-systems and an essential component\nthat enables blockchains like Polkadot to exist."}),"\n",(0,r.jsx)(n.h3,{id:"account-keys",children:"Account Keys"}),"\n",(0,r.jsx)(n.p,{children:"Account keys are keys that are meant to control funds. They can be either:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["The vanilla ",(0,r.jsx)(n.code,{children:"ed25519"})," implementation using Schnorr signatures."]}),"\n",(0,r.jsxs)(n.li,{children:["The Schnorrkel/Ristretto ",(0,r.jsx)(n.code,{children:"sr25519"})," variant using Schnorr signatures."]}),"\n",(0,r.jsx)(n.li,{children:"ECDSA signatures on secp256k1"}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:["There are no differences in security between ",(0,r.jsx)(n.code,{children:"ed25519"})," and ",(0,r.jsx)(n.code,{children:"sr25519"})," for simple signatures. We\nexpect ",(0,r.jsx)(n.code,{children:"ed25519"})," to be much better supported by commercial HSMs for the foreseeable future. At the\nsame time, ",(0,r.jsx)(n.code,{children:"sr25519"})," makes implementing more complex protocols safer. In particular, ",(0,r.jsx)(n.code,{children:"sr25519"})," comes\nwith safer version of many protocols like HDKD common in the Bitcoin and Ethereum ecosystem."]}),"\n",(0,r.jsx)(n.h3,{id:"stash-and-staking-proxy-keys",children:"Stash and Staking Proxy Keys"}),"\n",(0,r.jsx)(n.p,{children:"When we talk about stash and staking proxy keys, we usually talk about them in the context of\nrunning a validator or nominating, but they are useful concepts for all users to know. Both keys are\ntypes of account keys. They are distinguished by their intended use, not by an underlying\ncryptographic difference. All the info mentioned in the parent section applies to these keys. When\ncreating new staking proxy or stash keys, all cryptography supported by account keys are an\navailable option."}),"\n",(0,r.jsx)(n.p,{children:"The staking proxy key is a semi-online key that will be in the direct control of a user, and used to\nsubmit manual extrinsics. For validators or nominators, this means that the proxy key will be used\nto start or stop validating or nominating. Proxy keys should hold some native tokens to pay for\nfees, but they should not be used to hold huge amounts or life savings. Since they will be exposed\nto the internet with relative frequency, they should be treated carefully and occasionally replaced\nwith new ones."}),"\n",(0,r.jsx)(n.p,{children:"The stash key is a key that will, in most cases, be a cold wallet, existing on a piece of paper in a\nsafe or protected by layers of hardware security. It should rarely, if ever, be exposed to the\ninternet or used to submit extrinsics. The stash key is intended to hold a large amount of funds. It\nshould be thought of as a saving's account at a bank, which ideally is only ever touched in urgent\nconditions. Or, perhaps a more apt metaphor is to think of it as buried treasure, hidden on some\nrandom island and only known by the pirate who originally hid it."}),"\n",(0,r.jsxs)(n.p,{children:["Since the stash key is kept offline, it must be set to have its funds bonded to a particular staking\nproxy. For non-spending actions, the staking proxy has the funds of the stash behind it. For\nexample, in nominating, staking, or voting, the proxy can indicate its preference with the weight of\nthe stash. It will never be able to actually move or claim the funds in the stash key. However, if\nsomeone does obtain your proxy key, they could use it for ",(0,r.jsx)(n.a,{href:"/docs/learn-offenses",children:"slashable behavior"}),",\nso you should still protect it and change it regularly."]}),"\n",(0,r.jsx)(n.h3,{id:"session-keys",children:"Session Keys"}),"\n",(0,r.jsxs)(n.p,{children:["Session keys are hot keys that must be kept online by a validator to perform network operations.\nSession keys are typically generated in the client, although they don't have to be. They are ",(0,r.jsx)(n.em,{children:"not"}),"\nmeant to control funds and should only be used for their intended purpose. They can be changed\nregularly; your staking proxy only need to create a certificate by signing a session public key and\nbroadcast this certificate via an extrinsic."]}),"\n",(0,r.jsx)(n.p,{children:"Polkadot uses six session keys:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Authority Discovery: sr25519"}),"\n",(0,r.jsx)(n.li,{children:"BABE: sr25519"}),"\n",(0,r.jsx)(n.li,{children:"BEEFY: ecdsa"}),"\n",(0,r.jsx)(n.li,{children:"GRANDPA: ed25519"}),"\n",(0,r.jsx)(n.li,{children:"Parachain Assignment: sr25519"}),"\n",(0,r.jsx)(n.li,{children:"Parachain Validator: ed25519"}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:["BABE requires keys suitable for use in a ",(0,r.jsx)(n.a,{href:"#vrf",children:"Verifiable Random Function"})," as well as for digital\nsignatures. Sr25519 keys have both capabilities and so are used for BABE."]}),"\n",(0,r.jsx)(n.p,{children:"In the future, we plan to use a BLS key for GRANDPA because it allows for more efficient signature\naggregation."}),"\n",(0,r.jsx)(n.h3,{id:"faq-about-keys",children:"FAQ about Keys"}),"\n",(0,r.jsxs)(n.h4,{id:"why-was-ed25519-selected-over-secp256k1",children:["Why was ",(0,r.jsx)(n.code,{children:"ed25519"})," selected over ",(0,r.jsx)(n.code,{children:"secp256k1"}),"?"]}),"\n",(0,r.jsxs)(n.p,{children:["The original key derivation cryptography that was implemented for Polkadot and Substrate chains was\n",(0,r.jsx)(n.code,{children:"ed25519"}),", which is a Schnorr signature algorithm implemented over the Edward's Curve 25519 (so\nnamed due to the parameters of the curve equation)."]}),"\n",(0,r.jsxs)(n.p,{children:["Most cryptocurrencies, including Bitcoin and Ethereum, currently use ECDSA signatures on the\nsecp256k1 curve. This curve is considered much more secure than NIST curves, which\n",(0,r.jsx)(n.a,{href:"#appendix-a-on-the-security-of-curves",children:"have possible backdoors from the NSA"}),". The Curve25519 is\nconsidered possibly ",(0,r.jsx)(n.em,{children:"even more"})," secure than this one and allows for easier implementation of Schnorr\nsignatures. A recent patent expiration on it has made it the preferred choice for use in Polkadot."]}),"\n",(0,r.jsxs)(n.p,{children:["The choice of using Schnorr signatures over using ECDSA is not so cut and dried. Jeff Burdges (a\nWeb3 researcher) provides additional details on the decision in this\n",(0,r.jsx)(n.a,{href:"https://research.web3.foundation/Polkadot/security/keys",children:"research post"})," on the topic:"]}),"\n",(0,r.jsx)(n.admonition,{title:"Choosing Schnorr signatures over ECDSA signatures",type:"info",children:(0,r.jsx)(n.p,{children:"There is one sacrifice we make by choosing Schnorr signatures over ECDSA signatures for account\nkeys: Both require 64 bytes, but only ECDSA signatures communicate their public key. There are\nobsolete Schnorr variants that support recovering the public key from a signature, but they break\nimportant functionality like hierarchical deterministic key derivation. In consequence, Schnorr\nsignatures often take an extra 32 bytes for the public key."})}),"\n",(0,r.jsx)(n.p,{children:"But ultimately the benefits of using Schnorr signatures outweigh the tradeoffs, and future\noptimizations may resolve the inefficiencies pointed out in the quote above."}),"\n",(0,r.jsxs)(n.h4,{id:"what-is-sr25519-and-where-did-it-come-from",children:["What is ",(0,r.jsx)(n.code,{children:"sr25519"})," and where did it come from?"]}),"\n",(0,r.jsxs)(n.p,{children:["Some context: The Schnorr signatures over the Twisted Edward's Curve25519 are considered secure,\nhowever Ed25519 has not been completely devoid of its bugs. Most notably,\n",(0,r.jsx)(n.a,{href:"https://www.getmonero.org/2017/05/17/disclosure-of-a-major-bug-in-cryptonote-based-currencies.html",children:"Monero and all other CryptoNote currencies"}),"\nwere vulnerable to a double spend exploit that could have potentially led to undetected, infinite\ninflation."]}),"\n",(0,r.jsx)(n.p,{children:"These exploits were due to one peculiarity in Ed25519, which is known as its cofactor of 8. The\ncofactor of a curve is an esoteric detail that could have dire consequences for the security of\nimplementation of more complex protocols."}),"\n",(0,r.jsxs)(n.p,{children:["Conveniently, ",(0,r.jsx)(n.a,{href:"https://www.shiftleft.org/papers/decaf/index.xhtml",children:"Mike Hamburg's Decaf paper"}),"\nprovides a possible path forward to solving this potential bug. Decaf is basically a way to take\nTwisted Edward's Curves cofactor and mathematically change it with little cost to performance and\ngains to security."]}),"\n",(0,r.jsxs)(n.p,{children:["The Decaf paper approach by the ",(0,r.jsx)(n.a,{href:"https://ristretto.group/",children:"Ristretto Group"})," was extended and\nimplemented in Rust to include cofactor-8 curves like the Curve25519 and makes Schnorr signatures\nover the Edward's curve more secure."]}),"\n",(0,r.jsxs)(n.p,{children:["Web3 Foundation has implemented a Schnorr signature library using the more secure Ristretto\ncompression over the Curve25519 in the ",(0,r.jsx)(n.a,{href:"https://github.com/w3f/schnorrkel",children:"Schnorrkel"})," repository.\nSchnorrkel implements related protocols on top of this curve compression such as HDKD, MuSig, and a\nverifiable random function (VRF). It also includes various minor improvements such as the hashing\nscheme STROBE that can theoretically process huge amounts of data with only one call across the Wasm\nboundary."]}),"\n",(0,r.jsxs)(n.p,{children:["The implementation of Schnorr signatures that is used in Polkadot and implements the Schnorrkel\nprotocols over the Ristretto compression of the Curve25519 is known as ",(0,r.jsx)(n.strong,{children:"sr25519"}),"."]}),"\n",(0,r.jsx)(n.h4,{id:"are-bls-signatures-used-in-polkadot",children:"Are BLS signatures used in Polkadot?"}),"\n",(0,r.jsx)(n.p,{children:"Not yet, but they will be. BLS signatures allow more efficient signature aggregation. Because\nGRANDPA validators are usually signing the same thing (e.g. a block), it makes sense to aggregate\nthem, which can allow for other protocol optimizations."}),"\n",(0,r.jsx)(n.admonition,{title:"From the BLS library's README",type:"info",children:(0,r.jsx)(n.p,{children:"Boneh-Lynn-Shacham (BLS) signatures have slow signing, very slow verification, require slow and much\nless secure pairing friendly curves, and tend towards dangerous malleability. Yet, BLS permits a\ndiverse array of signature aggregation options far beyond any other known signature scheme, which\nmakes BLS a preferred scheme for voting in consensus algorithms and for threshold signatures."})}),"\n",(0,r.jsx)(n.p,{children:"Even though Schnorr signatures allow for signature aggregation, BLS signatures are much more\nefficient in some fashions. For this reason it will be one of the session keys that will be used by\nvalidators on the Polkadot network and critical to the GRANDPA finality gadget."}),"\n",(0,r.jsx)(n.h2,{id:"randomness",children:"Randomness"}),"\n",(0,r.jsxs)(n.p,{children:["Randomness in Proof of Stake blockchains is important for a fair and unpredictable distribution of\nvalidator responsibilities. Computers are bad at random numbers because they are deterministic\ndevices (the same input always produces the same output). What people usually call random numbers on\na computer (such as in a gaming application), are ",(0,r.jsx)(n.em,{children:"pseudo-random"})," - that is, they depend on a\nsufficiently random ",(0,r.jsx)(n.em,{children:"seed"})," provided by the user or another type of ",(0,r.jsx)(n.em,{children:"oracle"}),", like a\n",(0,r.jsx)(n.a,{href:"https://www.random.org/randomness/",children:"weather station for atmospheric noise"}),", your\n",(0,r.jsx)(n.a,{href:"https://mdpi.altmetric.com/details/47574324",children:"heart rate"}),", or even\n",(0,r.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/Lavarand",children:"lava lamps"}),", from which it can generate a series of\nseemingly-random numbers. But given the same seed, the same sequence will always be generated."]}),"\n",(0,r.jsx)(n.p,{children:"Though, these inputs will vary based on time and space, and it would be impossible to get the same\nresult into all the nodes of a particular blockchain around the world. If nodes get different inputs\non which to build blocks, forks happen. Real-world entropy is not suitable for use as a seed for\nblockchain randomness."}),"\n",(0,r.jsxs)(n.p,{children:["There are two main approaches to blockchain randomness in production today: ",(0,r.jsx)(n.code,{children:"RANDAO"})," and ",(0,r.jsx)(n.code,{children:"VRF"}),".\nPolkadot uses VRF."]}),"\n",(0,r.jsx)(n.h3,{id:"vrf",children:"VRF"}),"\n",(0,r.jsx)(n.p,{children:"A verifiable random function (VRF) is a mathematical operation that takes some input and produces a\nrandom number along with a proof of authenticity that this random number was generated by the\nsubmitter. The proof can be verified by any challenger to ensure the random number generation is\nvalid."}),"\n",(0,r.jsxs)(n.p,{children:["The VRF used in Polkadot is roughly the same as the one used in Ouroboros Praos. Ouroboros\nrandomness is secure for block production and works well for ",(0,r.jsx)(n.a,{href:"/docs/learn-consensus#BABE",children:"BABE"}),". Where\nthey differ is that Polkadot's VRF does not depend on a central clock (the problem becomes - whose\ncentral clock?), rather, it depends on its own past results to determine present and future results,\nand it uses slot numbers as a clock emulator, estimating time."]}),"\n",(0,r.jsx)(n.h4,{id:"heres-how-it-works-in-detail",children:"Here's how it works in detail:"}),"\n",(0,r.jsxs)(n.p,{children:["Slots are discrete units of time six seconds in length. Each slot can contain a block, but may not.\nSlots make up ",(0,r.jsx)(n.a,{href:"/docs/glossary##epoch",children:"epochs"})," - on Polkadot, 2400 slots make one epoch,\nwhich makes epochs four hours long."]}),"\n",(0,r.jsx)(n.p,{children:'In every slot, each validator "rolls a die". They execute a function (the VRF) that takes as input\nthe following:'}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:'The "secret key",'})," a key specifically made for these die rolls."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"An epoch randomness value,"})," which is the hash of VRF values from the blocks in the epoch before\nlast (N-2), so past randomness affects the current pending randomness (N)."]}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.strong,{children:"The slot number."})}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.img,{alt:"VRF_babe",src:s(64281).A+"",width:"1685",height:"564"})}),"\n",(0,r.jsxs)(n.p,{children:["The output is two values: a ",(0,r.jsx)(n.code,{children:"RESULT"})," (the random value) and a ",(0,r.jsx)(n.code,{children:"PROOF"})," (a proof that the random value\nwas generated correctly)."]}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.code,{children:"RESULT"})," is then compared to a ",(0,r.jsx)(n.em,{children:"threshold"})," defined in the implementation of the protocol\n(specifically, in the Polkadot Host). If the value is less than the threshold, then the validator\nwho rolled this number is a viable block production candidate for that slot. The validator then\nattempts to create a block and submits this block into the network along with the previously\nobtained ",(0,r.jsx)(n.code,{children:"PROOF"})," and ",(0,r.jsx)(n.code,{children:"RESULT"}),". Under VRF, every validator rolls a number for themselves, checks it\nagainst a threshold, and produces a block if the random roll is under that threshold."]}),"\n",(0,r.jsxs)(n.p,{children:["The astute reader will notice that due to the way this works, some slots may have no validators as\nblock producer candidates because all validator candidates rolled too high and missed the threshold.\nWe clarify how we resolve this issue and make sure that Polkadot block times remain near\nconstant-time in the wiki page on ",(0,r.jsx)(n.a,{href:"/docs/learn-consensus",children:"consensus"}),"."]}),"\n",(0,r.jsx)(n.h3,{id:"randao",children:"RANDAO"}),"\n",(0,r.jsxs)(n.p,{children:["An alternative method for getting randomness on-chain is the\n",(0,r.jsx)(n.a,{href:"https://github.com/randao/randao",children:"RANDAO"})," method from Ethereum. RANDAO requires each validator to\nprepare by performing many thousands of hashes on some seed. Validators then publish the final hash\nduring a round and the random number is derived from every participant's entry into the game. As\nlong as one honest validator participates, the randomness is considered secure (non-economically\nviable to attack). RANDAO is optionally augmented with VDF."]}),"\n",(0,r.jsx)(n.h3,{id:"vdfs",children:"VDFs"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"https://vdfresearch.org/",children:"Verifiable Delay Functions"})," are computations that take a prescribed\nduration of time to complete, even on parallel computers. They produce unique output that can be\nindependently and efficiently verified in a public setting. By feeding the result of RANDAO into a\nVDF, a delay is introduced that renders any attacker's attempt at influencing the current randomness\nobsolete."]}),"\n",(0,r.jsx)(n.p,{children:"VDFs will likely be implemented through ASIC devices that need to be run separately from the other\ntypes of nodes. Although only one is enough to keep the system secure, and they will be open source\nand distributed at nearly no charge, running them is neither cheap nor incentivized, producing\nunnecessary friction for users of the blockchains opting for this method."}),"\n",(0,r.jsx)(n.h2,{id:"resources",children:"Resources"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"https://web.archive.org/web/20210513183118/https://forum.w3f.community/t/key-recovery-attack-on-bip32-ed25519/44",children:"Key discovery attack on BIP32-Ed25519"})," -\nArchive of forum post detailing a potential attack on BIP32-Ed25519. A motivation for transition\nto the sr25519 variant."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"https://research.web3.foundation/Polkadot/security/keys",children:"Account signatures and keys in Polkadot"})," -\nResearch post by Web3 researcher Jeff Burdges."]}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"https://bitcoin.stackexchange.com/questions/57965/are-schnorr-signatures-quantum-computer-resistant/57977#57977",children:"Are Schnorr signatures quantum computer resistant?"})}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"https://research.web3.foundation/Polkadot/protocols/block-production",children:"Polkadot's research on blockchain randomness and sortition"})," -\ncontains reasoning for choices made along with proofs"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"https://github.com/paritytech/ink/issues/57",children:"Discussion on Randomness used in Polkadot"})," - W3F\nresearchers discuss the randomness in Polkadot and when it is usable and under which assumptions."]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"appendix-a-on-the-security-of-curves",children:"Appendix A: On the security of curves"}),"\n",(0,r.jsxs)(n.admonition,{title:"From the",type:"note",children:[(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"https://git.libssh.org/projects/libssh.git/tree/doc/curve25519-sha256@libssh.org.txt#n10",children:"Introduction of Curve25519"}),"\ninto ",(0,r.jsx)(n.code,{children:"libssl"})]}),(0,r.jsx)(n.p,{children:"The reason is the following: During summer of 2013, revelations from ex- consultant at [the] NSA\nEdward Snowden gave proof that [the] NSA willingly inserts backdoors into software, hardware\ncomponents and published standards. While it is still believed that the mathematics behind ECC\n(Elliptic-curve cryptography) are still sound and solid, some people (including Bruce Schneier\n[SCHNEIER]), showed their lack of confidence in NIST-published curves such as nistp256, nistp384,\nnistp521, for which constant parameters (including the generator point) are defined without\nexplanation. It is also believed that [the] NSA had a word to say in their definition. These curves\nare not the most secure or fastest possible for their key sizes [DJB], and researchers think it is\npossible that NSA have ways of cracking NIST curves. It is also interesting to note that SSH belongs\nto the list of protocols the NSA claims to be able to eavesdrop. Having a secure replacement would\nmake passive attacks much harder if such a backdoor exists."}),(0,r.jsx)(n.p,{children:"However an alternative exists in the form of Curve25519. This algorithm has been proposed in 2006 by\nDJB [Curve25519]. Its main strengths are its speed, its constant-time run time (and resistance\nagainst side-channel attacks), and its lack of nebulous hard-coded constants."})]})]})}function c(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(d,{...e})}):d(e)}},64281:(e,n,s)=>{s.d(n,{A:()=>t});const t=s.p+"assets/images/VRF_babe-12768d3392ba939b5f4c4955556d12c2.png"},28453:(e,n,s)=>{s.d(n,{R:()=>o,x:()=>a});var t=s(96540);const r={},i=t.createContext(r);function o(e){const n=t.useContext(i);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:o(e.components),t.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/484.fecb2ee8.js b/assets/js/484.fecb2ee8.js new file mode 100644 index 000000000000..54bec4c6d6c5 --- /dev/null +++ b/assets/js/484.fecb2ee8.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[484],{50484:(t,e,a)=>{a.d(e,{diagram:()=>L});var i,n=a(69664),r=(a(79972),a(79740),a(6396),a(5081),a(34483),a(52294),a(62392),a(86825),a(85039)),d=a(45567),s=a(20007),o=a(62334),g=a(697),p={},c=(0,d.K2)(((t,e)=>{p[t]=e}),"set"),h=(0,d.K2)((t=>p[t]),"get"),l=(0,d.K2)((()=>Object.keys(p)),"keys"),x=(0,d.K2)((()=>l().length),"size"),D={get:h,set:c,keys:l,size:x},u=(0,d.K2)((t=>t.append("circle").attr("class","start-state").attr("r",(0,d.D7)().state.sizeUnit).attr("cx",(0,d.D7)().state.padding+(0,d.D7)().state.sizeUnit).attr("cy",(0,d.D7)().state.padding+(0,d.D7)().state.sizeUnit)),"drawStartState"),f=(0,d.K2)((t=>t.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",(0,d.D7)().state.textHeight).attr("class","divider").attr("x2",2*(0,d.D7)().state.textHeight).attr("y1",0).attr("y2",0)),"drawDivider"),y=(0,d.K2)(((t,e)=>{const a=t.append("text").attr("x",2*(0,d.D7)().state.padding).attr("y",(0,d.D7)().state.textHeight+2*(0,d.D7)().state.padding).attr("font-size",(0,d.D7)().state.fontSize).attr("class","state-title").text(e.id),i=a.node().getBBox();return t.insert("rect",":first-child").attr("x",(0,d.D7)().state.padding).attr("y",(0,d.D7)().state.padding).attr("width",i.width+2*(0,d.D7)().state.padding).attr("height",i.height+2*(0,d.D7)().state.padding).attr("rx",(0,d.D7)().state.radius),a}),"drawSimpleState"),w=(0,d.K2)(((t,e)=>{const a=(0,d.K2)((function(t,e,a){const i=t.append("tspan").attr("x",2*(0,d.D7)().state.padding).text(e);a||i.attr("dy",(0,d.D7)().state.textHeight)}),"addTspan"),i=t.append("text").attr("x",2*(0,d.D7)().state.padding).attr("y",(0,d.D7)().state.textHeight+1.3*(0,d.D7)().state.padding).attr("font-size",(0,d.D7)().state.fontSize).attr("class","state-title").text(e.descriptions[0]).node().getBBox(),n=i.height,r=t.append("text").attr("x",(0,d.D7)().state.padding).attr("y",n+.4*(0,d.D7)().state.padding+(0,d.D7)().state.dividerMargin+(0,d.D7)().state.textHeight).attr("class","state-description");let s=!0,o=!0;e.descriptions.forEach((function(t){s||(a(r,t,o),o=!1),s=!1}));const g=t.append("line").attr("x1",(0,d.D7)().state.padding).attr("y1",(0,d.D7)().state.padding+n+(0,d.D7)().state.dividerMargin/2).attr("y2",(0,d.D7)().state.padding+n+(0,d.D7)().state.dividerMargin/2).attr("class","descr-divider"),p=r.node().getBBox(),c=Math.max(p.width,i.width);return g.attr("x2",c+3*(0,d.D7)().state.padding),t.insert("rect",":first-child").attr("x",(0,d.D7)().state.padding).attr("y",(0,d.D7)().state.padding).attr("width",c+2*(0,d.D7)().state.padding).attr("height",p.height+n+2*(0,d.D7)().state.padding).attr("rx",(0,d.D7)().state.radius),t}),"drawDescrState"),m=(0,d.K2)(((t,e,a)=>{const i=(0,d.D7)().state.padding,n=2*(0,d.D7)().state.padding,r=t.node().getBBox(),s=r.width,o=r.x,g=t.append("text").attr("x",0).attr("y",(0,d.D7)().state.titleShift).attr("font-size",(0,d.D7)().state.fontSize).attr("class","state-title").text(e.id),p=g.node().getBBox().width+n;let c,h=Math.max(p,s);h===s&&(h+=n);const l=t.node().getBBox();e.doc,c=o-i,p>s&&(c=(s-h)/2+i),Math.abs(o-l.x)s&&(c=o-(p-s)/2);const x=1-(0,d.D7)().state.textHeight;return t.insert("rect",":first-child").attr("x",c).attr("y",x).attr("class",a?"alt-composit":"composit").attr("width",h).attr("height",l.height+(0,d.D7)().state.textHeight+(0,d.D7)().state.titleShift+1).attr("rx","0"),g.attr("x",c+i),p<=s&&g.attr("x",o+(h-n)/2-p/2+i),t.insert("rect",":first-child").attr("x",c).attr("y",(0,d.D7)().state.titleShift-(0,d.D7)().state.textHeight-(0,d.D7)().state.padding).attr("width",h).attr("height",3*(0,d.D7)().state.textHeight).attr("rx",(0,d.D7)().state.radius),t.insert("rect",":first-child").attr("x",c).attr("y",(0,d.D7)().state.titleShift-(0,d.D7)().state.textHeight-(0,d.D7)().state.padding).attr("width",h).attr("height",l.height+3+2*(0,d.D7)().state.textHeight).attr("rx",(0,d.D7)().state.radius),t}),"addTitleAndBox"),b=(0,d.K2)((t=>(t.append("circle").attr("class","end-state-outer").attr("r",(0,d.D7)().state.sizeUnit+(0,d.D7)().state.miniPadding).attr("cx",(0,d.D7)().state.padding+(0,d.D7)().state.sizeUnit+(0,d.D7)().state.miniPadding).attr("cy",(0,d.D7)().state.padding+(0,d.D7)().state.sizeUnit+(0,d.D7)().state.miniPadding),t.append("circle").attr("class","end-state-inner").attr("r",(0,d.D7)().state.sizeUnit).attr("cx",(0,d.D7)().state.padding+(0,d.D7)().state.sizeUnit+2).attr("cy",(0,d.D7)().state.padding+(0,d.D7)().state.sizeUnit+2))),"drawEndState"),B=(0,d.K2)(((t,e)=>{let a=(0,d.D7)().state.forkWidth,i=(0,d.D7)().state.forkHeight;if(e.parentId){let t=a;a=i,i=t}return t.append("rect").style("stroke","black").style("fill","black").attr("width",a).attr("height",i).attr("x",(0,d.D7)().state.padding).attr("y",(0,d.D7)().state.padding)}),"drawForkJoinState"),k=(0,d.K2)(((t,e,a,i)=>{let n=0;const r=i.append("text");r.style("text-anchor","start"),r.attr("class","noteText");let s=t.replace(/\r\n/g,"
    ");s=s.replace(/\n/g,"
    ");const o=s.split(d.Y2.lineBreakRegex);let g=1.25*(0,d.D7)().state.noteMargin;for(const p of o){const t=p.trim();if(t.length>0){const i=r.append("tspan");if(i.text(t),0===g){g+=i.node().getBBox().height}n+=g,i.attr("x",e+(0,d.D7)().state.noteMargin),i.attr("y",a+n+1.25*(0,d.D7)().state.noteMargin)}}return{textWidth:r.node().getBBox().width,textHeight:n}}),"_drawLongText"),S=(0,d.K2)(((t,e)=>{e.attr("class","state-note");const a=e.append("rect").attr("x",0).attr("y",(0,d.D7)().state.padding),i=e.append("g"),{textWidth:n,textHeight:r}=k(t,0,0,i);return a.attr("height",r+2*(0,d.D7)().state.noteMargin),a.attr("width",n+2*(0,d.D7)().state.noteMargin),a}),"drawNote"),N=(0,d.K2)((function(t,e){const a=e.id,i={id:a,label:e.id,width:0,height:0},n=t.append("g").attr("id",a).attr("class","stateGroup");"start"===e.type&&u(n),"end"===e.type&&b(n),"fork"!==e.type&&"join"!==e.type||B(n,e),"note"===e.type&&S(e.note.text,n),"divider"===e.type&&f(n),"default"===e.type&&0===e.descriptions.length&&y(n,e),"default"===e.type&&e.descriptions.length>0&&w(n,e);const r=n.node().getBBox();return i.width=r.width+2*(0,d.D7)().state.padding,i.height=r.height+2*(0,d.D7)().state.padding,D.set(a,i),i}),"drawState"),E=0,K=(0,d.K2)((function(t,e,a){const i=(0,d.K2)((function(t){switch(t){case n.iP.relationType.AGGREGATION:return"aggregation";case n.iP.relationType.EXTENSION:return"extension";case n.iP.relationType.COMPOSITION:return"composition";case n.iP.relationType.DEPENDENCY:return"dependency"}}),"getRelationType");e.points=e.points.filter((t=>!Number.isNaN(t.y)));const o=e.points,g=(0,s.n8j)().x((function(t){return t.x})).y((function(t){return t.y})).curve(s.qrM),p=t.append("path").attr("d",g(o)).attr("id","edge"+E).attr("class","transition");let c="";if((0,d.D7)().state.arrowMarkerAbsolute&&(c=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,c=c.replace(/\(/g,"\\("),c=c.replace(/\)/g,"\\)")),p.attr("marker-end","url("+c+"#"+i(n.iP.relationType.DEPENDENCY)+"End)"),void 0!==a.title){const i=t.append("g").attr("class","stateLabel"),{x:n,y:s}=r._K.calcLabelPosition(e.points),o=d.Y2.getRows(a.title);let g=0;const p=[];let c=0,h=0;for(let t=0;t<=o.length;t++){const e=i.append("text").attr("text-anchor","middle").text(o[t]).attr("x",n).attr("y",s+g),a=e.node().getBBox();if(c=Math.max(c,a.width),h=Math.min(h,a.x),d.Rm.info(a.x,n,s+g),0===g){const t=e.node().getBBox();g=t.height,d.Rm.info("Title height",g,s)}p.push(e)}let l=g*o.length;if(o.length>1){const t=(o.length-1)*g*.5;p.forEach(((e,a)=>e.attr("y",s+a*g-t))),l=g*o.length}const x=i.node().getBBox();i.insert("rect",":first-child").attr("class","box").attr("x",n-c/2-(0,d.D7)().state.padding/2).attr("y",s-l/2-(0,d.D7)().state.padding/2-3.5).attr("width",c+(0,d.D7)().state.padding).attr("height",l+(0,d.D7)().state.padding),d.Rm.info(x)}E++}),"drawEdge"),M={},v=(0,d.K2)((function(){}),"setConf"),R=(0,d.K2)((function(t){t.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")}),"insertMarkers"),z=(0,d.K2)((function(t,e,a,n){i=(0,d.D7)().state;const r=(0,d.D7)().securityLevel;let o;"sandbox"===r&&(o=(0,s.Ltv)("#i"+e));const g="sandbox"===r?(0,s.Ltv)(o.nodes()[0].contentDocument.body):(0,s.Ltv)("body"),p="sandbox"===r?o.nodes()[0].contentDocument:document;d.Rm.debug("Rendering diagram "+t);const c=g.select(`[id='${e}']`);R(c);const h=n.db.getRootDoc();T(h,c,void 0,!1,g,p,n);const l=i.padding,x=c.node().getBBox(),D=x.width+2*l,u=x.height+2*l,f=1.75*D;(0,d.a$)(c,u,f,i.useMaxWidth),c.attr("viewBox",`${x.x-i.padding} ${x.y-i.padding} `+D+" "+u)}),"draw"),H=(0,d.K2)((t=>t?t.length*i.fontSizeFactor:1),"getLabelWidth"),T=(0,d.K2)(((t,e,a,n,r,s,p)=>{const c=new g.T({compound:!0,multigraph:!0});let h,l=!0;for(h=0;h{const e=t.parentElement;let a=0,i=0;e&&(e.parentElement&&(a=e.parentElement.getBBox().width),i=parseInt(e.getAttribute("data-x-shift"),10),Number.isNaN(i)&&(i=0)),t.setAttribute("x1",0-i+8),t.setAttribute("x2",a-i-8)}))}else d.Rm.debug("No Node "+t+": "+JSON.stringify(c.node(t)))}));let w=y.getBBox();c.edges().forEach((function(t){void 0!==t&&void 0!==c.edge(t)&&(d.Rm.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(c.edge(t))),K(e,c.edge(t),c.edge(t).relation))})),w=y.getBBox();const b={id:a||"root",label:a||"root",width:0,height:0};return b.width=w.width+2*i.padding,b.height=w.height+2*i.padding,d.Rm.debug("Doc rendered",b,c),b}),"renderDoc"),P={setConf:v,draw:z},L={parser:n.Zk,db:n.iP,renderer:P,styles:n.tM,init:(0,d.K2)((t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute,n.iP.clear()}),"init")}}}]); \ No newline at end of file diff --git a/assets/js/48d75399.6c974781.js b/assets/js/48d75399.6c974781.js deleted file mode 100644 index 946fe0f26abb..000000000000 --- a/assets/js/48d75399.6c974781.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk=self.webpackChunk||[]).push([[230],{16870:(e,a,t)=>{"use strict";t.r(a),t.d(a,{assets:()=>l,contentTitle:()=>s,default:()=>d,frontMatter:()=>i,metadata:()=>r,toc:()=>h});var n=t(74848),o=t(28453);t(47379);const i={id:"faq",title:"Frequently Asked Questions (FAQs)",sidebar_label:"FAQ",description:"FAQs to Help you Navigate on Polkadot.",keywords:["FAQ","questions"],slug:"../faq"},s=void 0,r={id:"general/faq",title:"Frequently Asked Questions (FAQs)",description:"FAQs to Help you Navigate on Polkadot.",source:"@site/../docs/general/faq.md",sourceDirName:"general",slug:"/faq",permalink:"/docs/faq",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/faq.md",tags:[],version:"current",lastUpdatedBy:"github-actions[bot]",lastUpdatedAt:1728284821e3,frontMatter:{id:"faq",title:"Frequently Asked Questions (FAQs)",sidebar_label:"FAQ",description:"FAQs to Help you Navigate on Polkadot.",keywords:["FAQ","questions"],slug:"../faq"},sidebar:"docs",previous:{title:"Build on Polkadot",permalink:"/docs/start-building"},next:{title:"Glossary",permalink:"/docs/glossary"}},l={},h=[{value:"Polkadot Launch",id:"polkadot-launch",level:2},{value:"Polkadot Roadmap",id:"polkadot-roadmap",level:2},{value:"Consensus",id:"consensus",level:2},{value:"Why do we need Consensus?",id:"why-do-we-need-consensus",level:3},{value:"What are PoW and PoS?",id:"what-are-pow-and-pos",level:3},{value:"Why not Proof of Work?",id:"why-not-proof-of-work",level:3},{value:"Validators",id:"validators",level:2},{value:"How do I apply to be a validator?",id:"how-do-i-apply-to-be-a-validator",level:3},{value:"How are validators rewarded?",id:"how-are-validators-rewarded",level:3},{value:"What is the minimum stake necessary to be elected as an active validator?",id:"what-is-the-minimum-stake-necessary-to-be-elected-as-an-active-validator",level:3},{value:"Why Polkadot targets 1000 validators while other projects have hundreds of thousands?",id:"why-polkadot-targets-1000-validators-while-other-projects-have-hundreds-of-thousands",level:3},{value:"Relay Chain",id:"relay-chain",level:2},{value:"What is the block time of the relay chain?",id:"what-is-the-block-time-of-the-relay-chain",level:3},{value:"Does Polkadot have smart contracts?",id:"does-polkadot-have-smart-contracts",level:3},{value:"How does the Polkadot relay chain connect to external chains in the ecosystem?",id:"how-does-the-polkadot-relay-chain-connect-to-external-chains-in-the-ecosystem",level:3},{value:"What is Polkadot's Transactions Per Second (TPS)?",id:"what-is-polkadots-transactions-per-second-tps",level:3},{value:"DOT",id:"dot",level:2},{value:"What is the difference between DOT (old) and new DOT?",id:"what-is-the-difference-between-dot-old-and-new-dot",level:3},{value:"What is the inflation rate of the DOT?",id:"what-is-the-inflation-rate-of-the-dot",level:3},{value:"Why can't crowdloaned DOT be staked?",id:"why-cant-crowdloaned-dot-be-staked",level:3},{value:"Governance",id:"governance",level:2},{value:"What prevents Polkadot governance from failing?",id:"what-prevents-polkadot-governance-from-failing",level:3},{value:"What prevents Polkadot governance from becoming plutocratic?",id:"what-prevents-polkadot-governance-from-becoming-plutocratic",level:3},{value:"Parachains",id:"parachains",level:2},{value:"How do parachain economics work?",id:"how-do-parachain-economics-work",level:3},{value:"Are parachains ephemeral? What happens when a parachain fails to renew its coretime?",id:"are-parachains-ephemeral-what-happens-when-a-parachain-fails-to-renew-its-coretime",level:3},{value:"Networking",id:"networking",level:2},{value:"What is libp2p?",id:"what-is-libp2p",level:3},{value:"Does Polkadot use libp2p?",id:"does-polkadot-use-libp2p",level:3},{value:"How does libp2p differ from IPFS?",id:"how-does-libp2p-differ-from-ipfs",level:3},{value:"Kusama",id:"kusama",level:2},{value:"What is the minimum amount of KSM / DOT I can have in my account?",id:"what-is-the-minimum-amount-of-ksm--dot-i-can-have-in-my-account",level:3},{value:"What are the transfer fees for Kusama?",id:"what-are-the-transfer-fees-for-kusama",level:3},{value:"Answered by Gav series",id:"answered-by-gav-series",level:2}];function c(e){const a={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",ul:"ul",...(0,o.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(a.admonition,{type:"info",children:(0,n.jsxs)(a.p,{children:["This FAQ focuses on technical questions for users interested in developing applications for\nPolkadot. If you have a more general question, you may wish to search for the answer on our support\n",(0,n.jsx)(a.a,{href:"https://support.polkadot.network/support/home",children:"Knowledge Base"})," or the main\n",(0,n.jsx)(a.a,{href:"https://polkadot.network/faq",children:"Polkadot network FAQ"}),". If you have a question that is not answered,\nplease feel free to ask on the Polkadot Watercooler\n",(0,n.jsx)(a.a,{href:"https://app.element.io/#/room/#polkadot-watercooler:web3.foundation",children:"Element channel"})," or contact\n",(0,n.jsx)(a.a,{href:"https://support.polkadot.network",children:"Polkadot Support"}),"."]})}),"\n",(0,n.jsx)(a.h2,{id:"polkadot-launch",children:"Polkadot Launch"}),"\n",(0,n.jsx)(a.p,{children:"The Genesis block of the Polkadot network was launched on May 26, 2020 at 15:36:21 UTC, as a Proof\nof Authority (PoA) network, with governance controlled by the single Sudo (super-user) account.\nDuring this time, validators started joining the network and signaling their intention to\nparticipate in consensus."}),"\n",(0,n.jsx)(a.p,{children:"The network evolved to become a Proof of Stake (PoS) network on June 18, 2020. With the chain\nsecured by the decentralized community of validators, the Sudo module was removed on July 20, 2020,\ntransitioning the governance of the chain into the hands of the token (DOT) holders. This is the\npoint where Polkadot became decentralized."}),"\n",(0,n.jsx)(a.p,{children:"The final step of the transition to full-functioning Polkadot was the enabling of transfer\nfunctionality, which occurred on Polkadot at block number 1_205_128 on August 18, 2020, at 16:39\nUTC."}),"\n",(0,n.jsx)(a.p,{children:"On August 21, 2020, Redenomination of DOT occurred. From this date, one DOT (old) equals 100 new\nDOT."}),"\n",(0,n.jsx)(a.h2,{id:"polkadot-roadmap",children:"Polkadot Roadmap"}),"\n",(0,n.jsxs)(a.p,{children:["For more information on the Polkadot roadmap please visit the\n",(0,n.jsx)(a.a,{href:"https://polkadot.network/technology/#roadmap",children:"official Polkadot website"}),"."]}),"\n",(0,n.jsx)(a.h2,{id:"consensus",children:"Consensus"}),"\n",(0,n.jsx)(a.h3,{id:"why-do-we-need-consensus",children:"Why do we need Consensus?"}),"\n",(0,n.jsxs)(a.p,{children:["Consensus is a method for coming to agreement over a shared state. In order for the state of the\nblockchain to continue to build and move forward, all nodes in the network must agree and come to\nconsensus. It is the way that the nodes in a decentralized network are able to stay synced with each\nother. Without consensus for the decentralized network of nodes in a blockchain, there is no way to\nensure that the state one node believes is true will be shared by the other nodes. Consensus aims to\nprovide the ",(0,n.jsx)(a.em,{children:"objective"})," view of the state amid participants who each have their own ",(0,n.jsx)(a.em,{children:"subjective"}),"\nviews of the network. It is the process by which these nodes communicate and come to agreement, and\nare able to build new blocks."]}),"\n",(0,n.jsx)(a.h3,{id:"what-are-pow-and-pos",children:"What are PoW and PoS?"}),"\n",(0,n.jsxs)(a.p,{children:["Proof of Work (PoW) and Proof of Stake (PoS) have been inaccurately used as short hand to refer to\nconsensus mechanisms of blockchains, but that does not capture the full picture. PoW is the method\nfor agreeing on a block author and part of the fuller\n",(0,n.jsx)(a.a,{href:"/docs/learn-consensus#nakamoto-consensus",children:"Nakamoto consensus"})," that also encompasses a chain\nselection algorithm (longest chain rule in Bitcoin). Similarly, PoS is a set of rules for selecting\nthe validator set and does not specify a chain selection rule or how a chain might reach finality.\nPoS algorithms have traditionally been paired with an algorithm for coming to Byzantine agreement\nbetween nodes. For example, ",(0,n.jsx)(a.a,{href:"/docs/learn-comparisons-cosmos",children:"Tendermint"})," is a practical\nByzantine fault tolerant algorithm that uses PoS as its validator set selection method."]}),"\n",(0,n.jsx)(a.h3,{id:"why-not-proof-of-work",children:"Why not Proof of Work?"}),"\n",(0,n.jsx)(a.p,{children:"Although simple and effective in coming to a decentralized consensus on the next block producer,\nproof of work with Nakamoto consensus consumes an incredible amount of energy, has no economic or\nprovable finality, and has no effective strategy in resisting cartels."}),"\n",(0,n.jsx)(a.h2,{id:"validators",children:"Validators"}),"\n",(0,n.jsx)(a.h3,{id:"how-do-i-apply-to-be-a-validator",children:"How do I apply to be a validator?"}),"\n",(0,n.jsxs)(a.p,{children:["There is no central authority that decides on validators, so there is not per se an ",(0,n.jsx)(a.em,{children:"application"}),"\nthat you can fill out. Registering as a validator is permissionless; in order to become one you must\nonly set up a validator node and mark your intention to validate on chain. For detailed instruction\non how to do validate you can consult the\n",(0,n.jsx)(a.a,{href:"/docs/maintain-guides-how-to-validate-polkadot",children:"validator guide"}),"."]}),"\n",(0,n.jsxs)(a.p,{children:["However, once you've set up a validator and have registered your intention it does not mean that you\nwill be included in the ",(0,n.jsx)(a.em,{children:"active set"})," right away. The validators are elected to the active set based\non the results of an election algorithm known as ",(0,n.jsx)(a.a,{href:"/docs/learn-phragmen",children:"Phragm\xe9n's method"}),".\nPhragm\xe9n's method tries to accomplish two goals: 1) select ",(0,n.jsx)(a.code,{children:"n"})," members from a larger set based on\nstake-weighted votes and 2) equalize the stake backing each validator as much as possible."]}),"\n",(0,n.jsxs)(a.p,{children:["You will likely want to campaign your validator to the community in order to get more backing. You\nare looking for ",(0,n.jsx)(a.em,{children:"nominators"})," that will put up their tokens to increase the stake for your validator.\nFor validators who cannot acquire the minimum stake from the community, Parity and Web3 Foundation\nalso run a joint programme called ",(0,n.jsx)(a.a,{href:"/docs/thousand-validators",children:"Thousand Validators"})," that will nominate\nvalidators if they apply and fit the requirements."]}),"\n",(0,n.jsx)(a.h3,{id:"how-are-validators-rewarded",children:"How are validators rewarded?"}),"\n",(0,n.jsxs)(a.p,{children:["Validators are rewarded from the ",(0,n.jsx)(a.a,{href:"/docs/learn-inflation",children:"inflation of the relay chain"}),",\n",(0,n.jsx)(a.a,{href:"/docs/learn-transactions#transaction-fees",children:"transaction fees"}),", and tips. However, they only\ntake a percentage of the former two. More details can be read on the page for\n",(0,n.jsx)(a.a,{href:"/docs/maintain-guides-validator-payout",children:"validator payouts"}),"."]}),"\n",(0,n.jsx)(a.h3,{id:"what-is-the-minimum-stake-necessary-to-be-elected-as-an-active-validator",children:"What is the minimum stake necessary to be elected as an active validator?"}),"\n",(0,n.jsx)(a.p,{children:"The minimum stake that is necessary to be elected as an active validator is dynamic and can change\nover time. It depends not only on how much stake is being put behind each validator, but also the\nsize of the active set and how many validators are waiting in the pool."}),"\n",(0,n.jsx)(a.p,{children:"There are a few ways to estimate the minimum stake."}),"\n",(0,n.jsxs)(a.p,{children:["One way can be to navigate to the\n",(0,n.jsx)(a.a,{href:"https://cloudflare-ipfs.com/ipns/polkadot.dotapps.io/#/staking/targets",children:"Polkadot Apps Targets tab"}),'.\nThe value at the top of the screen saying "Lowest" is the least staked validator. You need at least\nthis much + 1 to enter the set.']}),"\n",(0,n.jsx)(a.p,{children:"You can also use some tools some to perform estimations."}),"\n",(0,n.jsxs)(a.ul,{children:["\n",(0,n.jsxs)(a.li,{children:["\n",(0,n.jsxs)(a.p,{children:[(0,n.jsx)(a.a,{href:"https://github.com/paritytech/substrate-debug-kit/tree/master/offline-election",children:"Offline Election"}),"\ncan provide exact results of running an election on the current set of validators using the same\nRust code that is ran in Polkadot."]}),"\n"]}),"\n",(0,n.jsxs)(a.li,{children:["\n",(0,n.jsxs)(a.p,{children:[(0,n.jsx)(a.a,{href:"https://github.com/w3f/validator-stats",children:"Validator stats script"})," can give you an estimate that is\nbased on the currently elected set, as well as some statistics about Kusama validators."]}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(a.h3,{id:"why-polkadot-targets-1000-validators-while-other-projects-have-hundreds-of-thousands",children:"Why Polkadot targets 1000 validators while other projects have hundreds of thousands?"}),"\n",(0,n.jsx)(a.p,{children:"Polkadot's goal to have 1000 validators is set to be something that is practically achievable in the\nshort term with high confidence of good performance in a live environment. Furthermore, validators\nin Polkadot are not the only stakers, and if we consider the number of stakers that can be possible\non Polkadot the number can scale up to hundreds of thousands. Since validators are performing\ncritical consensus work to maintain the security of the chain including all of its shards, a more\nmodest number of validators is estimated to start. Upon later improvements, such as implementing\nsignature aggregation for finalization messages, the number of validators could reasonably scale up.\nHowever, increasing validators above one thousand remains a goal for later iterations of Polkadot."}),"\n",(0,n.jsx)(a.p,{children:"It is also worth mentioning that one thousand validators is more than the number of validators of\nsimilar PoS chains with comparable levels of economic security as Polkadot. The closest contenders\nare operating with around 150 validators."}),"\n",(0,n.jsxs)(a.p,{children:["Additionally, other projects sometimes have a different definition of ",(0,n.jsx)(a.em,{children:"validator"}),' that approximates\nmore closely to remote signing keys without the full operation of a validating node. On Polkadot,\neach validator is running their own validating node and performing full verification of the Relay\nChain, voting on finality, producing blocks in their decided slots, and verifying parachain state\ntransitions. Other projects may consider validators and "validating nodes" as separate entities.']}),"\n",(0,n.jsxs)(a.p,{children:["Finally, individuals may participate in the block production process indirectly by\n",(0,n.jsx)(a.a,{href:"/docs/learn-nominator",children:"nominating"})," validators. In this way, individuals who are not running a\nnode can still share in staking rewards."]}),"\n",(0,n.jsx)(a.h2,{id:"relay-chain",children:"Relay Chain"}),"\n",(0,n.jsx)(a.h3,{id:"what-is-the-block-time-of-the-relay-chain",children:"What is the block time of the relay chain?"}),"\n",(0,n.jsx)(a.p,{children:"Both the Kusama and Polkadot networks are currently operating at a rate of one block every six\nseconds."}),"\n",(0,n.jsx)(a.p,{children:"This may be changed in the future. It may go as low as two to three seconds after optimizations, or\npotentially increase in order to handle the capacity of the parachain networking in a live\nenvironment."}),"\n",(0,n.jsx)(a.h3,{id:"does-polkadot-have-smart-contracts",children:"Does Polkadot have smart contracts?"}),"\n",(0,n.jsx)(a.p,{children:"No - and yes. The Polkadot relay chain does not implement smart contracts natively. The reason for\nnot having smart contracts on the relay chain is part of the design philosophy for Polkadot that\ndictates that the relay chain should be the minimal logic required to accomplish its job."}),"\n",(0,n.jsx)(a.p,{children:"While the Polkadot relay chain does not implement smart contracts directly, there are numerous\nparachains that do. It's possible for parachains to enable smart contract functionality and then\nbenefit from the security and interoperability features of Polkadot. Additionally, existing smart\ncontract chains can connect to Polkadot as a parachain, or via a bridge."}),"\n",(0,n.jsxs)(a.p,{children:["So it's better to say that the Polkadot ",(0,n.jsx)(a.em,{children:"ecosystem"}),' has smart contracts versus "Polkadot has smart\ncontracts."']}),"\n",(0,n.jsx)(a.h3,{id:"how-does-the-polkadot-relay-chain-connect-to-external-chains-in-the-ecosystem",children:"How does the Polkadot relay chain connect to external chains in the ecosystem?"}),"\n",(0,n.jsxs)(a.p,{children:["One of the cornerstone interoperability technologies being researched and developed for deployment\non Polkadot is cross-chain ",(0,n.jsx)(a.a,{href:"/docs/learn-bridges",children:"bridges"}),". Bridges come in a variety of\nflavors with varying levels of trust associated with them. Polkadot is predominantly researching the\ntrust-minimized flavor that imposes economic costs on the operators of the bridge, and therefore\nmakes it economically secure. Bridge efforts are being worked on in concert with other projects in\nthe ecosystem."]}),"\n",(0,n.jsx)(a.h3,{id:"what-is-polkadots-transactions-per-second-tps",children:"What is Polkadot's Transactions Per Second (TPS)?"}),"\n",(0,n.jsxs)(a.p,{children:["Polkadot is a heterogeneous sharded network comprising a relay chain and numerous parachains, which\nare all individual blockchains built on ",(0,n.jsx)(a.a,{href:"https://substrate.io/",children:"Substrate"})," executing in parallel.\nHence, the Transactions Per Second (TPS) of Polkadot is a number that encompasses all the\ntransactions on the relay chain as well as parachains. As the transactions on these Substrate-based\nblockchains are ",(0,n.jsx)(a.a,{href:"https://docs.substrate.io/build/tx-weights-fees/",children:"weights based"}),", it makes sense to\nuse TPS as a measure for the network performance if all the transactions carry the same weight.\n",(0,n.jsx)(a.a,{href:"https://twitter.com/gavofyork/status/1270025498580656134",children:"Performance benchmark tests"})," show that\nSubstrate-based blockchains can achieve over 1000 TPS for balance transfer transactions. Assuming\nPolkadot is running over 100 parachains; the projected TPS is well over 100,000. With\n",(0,n.jsx)(a.a,{href:"/docs/learn-async-backing",children:"asynchronous backing upgrade"}),", the TPS is expected to increase\ntenfold to 1,000,000."]}),"\n",(0,n.jsxs)(a.p,{children:["It is essential to realize that TPS is inherently a subjective measurement with numerous factors\nthat can contribute to it. It's hard to gauge the usefulness of TPS in isolation (when compared to\nother chains), as it depends on what a transaction does for a particular network. To view how\nPolkadot measures TPS see the Polkadot sTPS\n(",(0,n.jsx)(a.a,{href:"https://github.com/paritytech/polkadot-stps/blob/main/docs/introduction.md",children:"Standard Transaction Per Second"}),")\nto consider precisely how benchmarking was performed for Polkadot."]}),"\n",(0,n.jsx)(a.h2,{id:"dot",children:"DOT"}),"\n",(0,n.jsx)(a.h3,{id:"what-is-the-difference-between-dot-old-and-new-dot",children:"What is the difference between DOT (old) and new DOT?"}),"\n",(0,n.jsxs)(a.p,{children:["The DOT (old) unit on Polkadot was at twelve decimal places, otherwise known as 1e12 Plancks. On 21\nAugust, 2020, Denomination Day, the DOT (old) value was redenominated to 1e10 (10_000_000_000, or\nten billion) Plancks, meaning that the new DOT was valued at ten decimal places. Following the\n",(0,n.jsx)(a.a,{href:"/docs/learn/learn-redenomination",children:"redenomination"}),", the new DOT is called DOT."]}),"\n",(0,n.jsx)(a.h3,{id:"what-is-the-inflation-rate-of-the-dot",children:"What is the inflation rate of the DOT?"}),"\n",(0,n.jsx)(a.p,{children:"The inflation rate is approximately 10% per year."}),"\n",(0,n.jsxs)(a.p,{children:["A portion of the inflation is rewarded to validators for performing their duties, while another\nportion may go directly to the treasury. The exact percentage that goes into both varies and is\nbased on the amount of DOT that are staked. Please see the article on\n",(0,n.jsx)(a.a,{href:"../learn/learn-staking.md/#inflation",children:"inflation"})," for more information."]}),"\n",(0,n.jsx)(a.h3,{id:"why-cant-crowdloaned-dot-be-staked",children:"Why can't crowdloaned DOT be staked?"}),"\n",(0,n.jsx)(a.p,{children:"DOTs contributed to a successful crowdloan campaign by a parachain are bonded for the entire lease\nperiod, which is two years on Polkadot. The crowdloaned DOT cannot be used for any other DOT utility\nfunctionalities like staking and democracy. In exchange to the lost staking rewards or liquidity of\nDOTs, the parachain team may offer rewards to the contributor."}),"\n",(0,n.jsxs)(a.p,{children:["The utility of crowdloaned DOT is to provide a lease for a parachain. The utility of staked DOT is\nto secure the network through a reward/",(0,n.jsx)(a.a,{href:"/docs/learn-offenses",children:"slash"})," mechanism. Allowing\ncrowdloaned DOT to be staked results in complex consequences like applying a slash on crowdloaned\nDOT that was meant to be bonded for the entire lease period of a parachain. In a way, the\ninaccessibility of crowdloaned DOTs and the lack of staking rewards for the entire lease duration\nencourages the contributors to back projects that are valuable to the ecosystem."]}),"\n",(0,n.jsx)(a.h2,{id:"governance",children:"Governance"}),"\n",(0,n.jsx)(a.h3,{id:"what-prevents-polkadot-governance-from-failing",children:"What prevents Polkadot governance from failing?"}),"\n",(0,n.jsxs)(a.p,{children:["Polkadot's governance has already been shown to work. Examples can be found in the runtime upgrades\nthat have successfully taken place through on the testnets as well as in a real economic environment\non ",(0,n.jsx)(a.a,{href:"https://guide.kusama.network",children:"Kusama"})," and Polkadot itself."]}),"\n",(0,n.jsx)(a.p,{children:"It is fair to say that the field of on-chain blockchain governance is still new, and no one can\nclaim to know exactly what the optimal version of on-chain governance is yet. However, Polkadot\ntakes a brave step forward in pioneering thought-through mechanisms for evolving a blockchain."}),"\n",(0,n.jsx)(a.p,{children:"Blockchains need a method to adapt and evolve. Therefore, an on-chain governance system was\nnecessary for the long-term success of Polkadot. Ultimately, it is the token holders that are\nresponsible for preventing Polkadot's governance from failing by using their economic value and\nconviction to sway the progression of the protocol."}),"\n",(0,n.jsx)(a.h3,{id:"what-prevents-polkadot-governance-from-becoming-plutocratic",children:"What prevents Polkadot governance from becoming plutocratic?"}),"\n",(0,n.jsxs)(a.p,{children:["A savvy reader might have noticed that the answer to the previous question endowed the token holder\nwith the ultimate responsibility to ensure that Polkadot's governance does not fail. By following\nthe train of this assertion, one might assume that Polkadot's governance is susceptible to becoming\nruled by a few large token holders (called ",(0,n.jsx)(a.em,{children:"whales"})," in trading parlance) and therefore become a mere\nplutocracy (rule of the rich)."]}),"\n",(0,n.jsxs)(a.p,{children:["There are several other mechanisms that are built-in to the governance system to resist this\nplutocratic tendency. One of these mechanisms is called conviction voting, and imbues greater voting\npower to token holders who are willing to lock their tokens on the protocol for longer lengths of\ntime. Longer lock-ups display ",(0,n.jsx)(a.em,{children:"conviction"})," in a vote. Conviction voting could allow a highly\ndetermined minority to overrule the vote of an apathetic majority in certain situations. Another\nmechanism is known as Adaptive Quorum Biasing. This makes proposals have a varying threshold for\napproval or rejection based on what part of the governance protocol the proposal originated in. For\ndetails on the subtleties of Polkadot's governance system, please see the\n",(0,n.jsx)(a.a,{href:"/docs/learn-polkadot-opengov",children:"governance page"}),"."]}),"\n",(0,n.jsx)(a.h2,{id:"parachains",children:"Parachains"}),"\n",(0,n.jsx)(a.h3,{id:"how-do-parachain-economics-work",children:"How do parachain economics work?"}),"\n",(0,n.jsx)(a.p,{children:"Parachains have the flexibility to implement their own monetary system or incentive structure for\ncollators. However, this is not strictly necessary. Since the collator's job is to continue to give\nrecent state transitions to the validators on the relay chain who validate each transition, the\nsecurity of the parachain and the Polkadot network is completely separate from parachain economics.\nParachains need collators to continue to progress, so it wouldn't be unreasonable to see them\nincentivize collator nodes in some way, but the specific mechanism is completely up to parachain\nimplementers."}),"\n",(0,n.jsx)(a.h3,{id:"are-parachains-ephemeral-what-happens-when-a-parachain-fails-to-renew-its-coretime",children:"Are parachains ephemeral? What happens when a parachain fails to renew its coretime?"}),"\n",(0,n.jsxs)(a.p,{children:["Parachains are not ephemeral. As long as someone is keeping the data for a parachain, the parachain\ncan move between being a parachain, an\n",(0,n.jsx)(a.a,{href:"/docs/learn-parachains#on-demand-parachains",children:"on-demand parachain"}),", or a separate sovereign\nchain at different points of its lifetime. Especially with on-demand parachains, parachains can\nproduce blocks when their usage and throughput makes it necessary."]}),"\n",(0,n.jsxs)(a.p,{children:["When a parachain could not renew its bulk coretime and needs to keep its chain live, there are a\ncouple of options to consider. One option is to explore secondary coretime marketplaces on\n",(0,n.jsx)(a.a,{href:"https://www.lastic.xyz/",children:"Lastic"})," or ",(0,n.jsx)(a.a,{href:"https://app.regionx.tech/?network=polkadot",children:"RegionX"}),". The\nother option is run as an on-demand parachain, and purchase coretime to produce one block at a time.\nOn-demand parachains are still secured by the relay chain but don't need to hold a core and can\nproduce a block when it's economically feasible for them. For more information, please refer to the\n",(0,n.jsx)(a.a,{href:"/docs/learn-parachains#parachains-vs-on-demand-parachains",children:"parachains page"}),"."]}),"\n",(0,n.jsx)(a.h2,{id:"networking",children:"Networking"}),"\n",(0,n.jsx)(a.h3,{id:"what-is-libp2p",children:"What is libp2p?"}),"\n",(0,n.jsxs)(a.p,{children:[(0,n.jsx)(a.a,{href:"https://libp2p.io",children:"Libp2p"})," is a modular and extensible networking stack that is used by IPFS,\nSubstrate, and many other projects. It is a collection of peer-to-peer protocols for finding peers\nand connecting to them. Its modules have logic for content routing, peer routing, peer discovery,\ndifferent transports, and NAT traversals. It is intended to be used by applications for building\nlarge scale peer-to-peer networks by only selecting the parts of the protocol suite that are needed."]}),"\n",(0,n.jsxs)(a.p,{children:["The Rust implementation of the specification was built and primarily maintained by a team of\ncontributors at Parity Technologies. The Go and JavaScript versions are maintained by Protocol Labs\nas well as community contributors. A ",(0,n.jsx)(a.a,{href:"https://github.com/status-im/nim-libp2p",children:"Nim"})," version of the\nlibrary also exists. Libp2p as a whole is an open source project that is actively developed and\nexpanded on various code repositories hosted on ",(0,n.jsx)(a.a,{href:"https://github.com/libp2p",children:"their GitHub"}),"."]}),"\n",(0,n.jsx)(a.h3,{id:"does-polkadot-use-libp2p",children:"Does Polkadot use libp2p?"}),"\n",(0,n.jsx)(a.p,{children:"Yes, since Polkadot is built with Substrate. Substrate uses a networking protocol that is based on\nlibp2p (specifically the Rust libp2p library). However, Substrate uses a mix of standard libp2p\nprotocols and protocols that are homegrown and not official libp2p standards. Of the standards\nprotocols, those which are shared with other implementations of libp2p such as IPFS, are\nconnection-checking (ping), asking for information on a peer (identity), and Kademlia random walks\n(kad)."}),"\n",(0,n.jsxs)(a.p,{children:["Of the protocols that are custom to Substrate, there are the legacy Substrate stream, a\nrequest-response for getting information on blocks (sync), a light client protocol, a notification\nprotocol for transactions, and block announcement. For detailed information on how Substrate uses\nlibp2p and the standard and custom protocols, please see the\n",(0,n.jsx)(a.a,{href:"https://paritytech.github.io/substrate/master/sc_network/index.html",children:"networking documentation"}),"."]}),"\n",(0,n.jsx)(a.h3,{id:"how-does-libp2p-differ-from-ipfs",children:"How does libp2p differ from IPFS?"}),"\n",(0,n.jsxs)(a.p,{children:["The ",(0,n.jsx)(a.a,{href:"https://ipfs.tech/",children:"Interplanetary File System"}),' (IPFS) is a peer-to-peer hypermedia protocol\nused primarily for storage of files. It allows one to upload a file onto the network and share it\nwith its content addressable URI. IPFS, like Substrate, is an application of libp2p and exists\nhigher on the technology stack. Although both IPFS and Substrate use libp2p, it cannot be said that\nSubstrate "uses" IPFS since besides sharing the underlying library for networking there is no native\nintegration between the two applications.']}),"\n",(0,n.jsx)(a.h2,{id:"kusama",children:"Kusama"}),"\n",(0,n.jsx)(a.h3,{id:"what-is-the-minimum-amount-of-ksm--dot-i-can-have-in-my-account",children:"What is the minimum amount of KSM / DOT I can have in my account?"}),"\n",(0,n.jsxs)(a.p,{children:["Please see information about ",(0,n.jsx)(a.a,{href:"/docs/build-protocol-info",children:"Existential Deposits"}),"."]}),"\n",(0,n.jsx)(a.h3,{id:"what-are-the-transfer-fees-for-kusama",children:"What are the transfer fees for Kusama?"}),"\n",(0,n.jsx)(a.p,{children:"It is important to note that the cost of transferring KSM is dynamic. Currently, the minimum cost of\ntransferring KSM is 0.01 KSM (the base fee), although this can be changed via governance. However,\nactual transaction fees vary based on a variety of factors. Specifically, fee calculation follows\nthe following formula:"}),"\n",(0,n.jsx)(a.pre,{children:(0,n.jsx)(a.code,{children:"base_fee + (tx_length * length_fee) + WeightToFee(weight)\n"})}),"\n",(0,n.jsxs)(a.p,{children:["Please see the\n",(0,n.jsx)(a.a,{href:"https://docs.substrate.io/reference/how-to-guides/weights/calculate-fees/",children:"fee calculation"})," page in\nthe Substrate documentation for more detailed information."]}),"\n",(0,n.jsx)(a.h2,{id:"answered-by-gav-series",children:"Answered by Gav series"}),"\n",(0,n.jsx)(a.p,{children:'The "Answered by Gav" series is a collection of posts uploaded to Reddit of questions that have been\nasked in the Polkadot Watercooler Riot channel and answered by Polkadot founder Gavin Wood.'}),"\n",(0,n.jsxs)(a.ul,{children:["\n",(0,n.jsx)(a.li,{children:(0,n.jsx)(a.a,{href:"https://www.reddit.com/r/dot/comments/b87d96/answered_by_gav_reason_for_using_asynchronous/",children:"Reason for using asynchronous rather than synchronous communication? Difference in terms of TPS?"})}),"\n",(0,n.jsx)(a.li,{children:(0,n.jsx)(a.a,{href:"https://www.reddit.com/r/dot/comments/b87awr/answered_by_gav_how_exactly_do_validators_in_an/",children:"How exactly do validators in an ETH parachain keep moving around and how is communication between zones trustless?"})}),"\n",(0,n.jsx)(a.li,{children:(0,n.jsx)(a.a,{href:"https://www.reddit.com/r/dot/comments/b87bua/answered_by_gav_what_are_the_main_issues_with/",children:"What are the main issues with Bitcoin integration and will it ever be possible? Same problem with other POW chains? Is Polkadot only going to work with POS chains? How is it trust-less in comparison to Cosmos though?"})}),"\n",(0,n.jsx)(a.li,{children:(0,n.jsx)(a.a,{href:"https://www.reddit.com/r/dot/comments/b87cjz/answered_by_gav_what_are_the_current_thoughts/",children:"What are the current thoughts around governance especially since projects have to be voted in to receive the parachains security?"})}),"\n",(0,n.jsx)(a.li,{children:(0,n.jsx)(a.a,{href:"https://www.reddit.com/r/dot/comments/b87ds8/answered_by_gav_also_is_there_any_detailed/",children:"Also is there any detailed overview of how exactly a token transfer from ETH could be exchanged with another chain's currency?"})}),"\n",(0,n.jsx)(a.li,{children:(0,n.jsx)(a.a,{href:"https://www.reddit.com/r/dot/comments/bcqrx9/answered_by_gav_can_i_run_multiple_validators/",children:"Can I run multiple Validators with the same Session Key?"})}),"\n",(0,n.jsx)(a.li,{children:(0,n.jsx)(a.a,{href:"https://www.reddit.com/r/dot/comments/bcqwit/answered_by_gav_how_to_tackle_the_concentration/",children:"How to tackle the concentration risk of Validators in data centers?"})}),"\n"]})]})}function d(e={}){const{wrapper:a}={...(0,o.R)(),...e.components};return a?(0,n.jsx)(a,{...e,children:(0,n.jsx)(c,{...e})}):c(e)}},47379:(e,a,t)=>{"use strict";t.d(a,{A:()=>p});var n=t(90675),o=t(10467),i=t(96540),s=t(19588),r=t(2026),l=t(11135);function h(e,a,t){return c.apply(this,arguments)}function c(){return(c=(0,o.A)((0,n.A)().mark((function e(a,t,o){var i,l,h,c,d;return(0,n.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=void 0,l=void 0,e.t0=a,e.next="polkadot"===e.t0?5:"kusama"===e.t0?7:"statemine"===e.t0?9:"statemint"===e.t0?11:"polkadotpeople"===e.t0?13:"kusamapeople"===e.t0?15:17;break;case 5:return i="wss://rpc.polkadot.io",e.abrupt("break",18);case 7:return i="wss://kusama-rpc.polkadot.io/",e.abrupt("break",18);case 9:return i="wss://statemine-rpc.polkadot.io/",e.abrupt("break",18);case 11:return i="wss://statemint-rpc.polkadot.io/",e.abrupt("break",18);case 13:return i="wss://polkadot-people-rpc.polkadot.io/",e.abrupt("break",18);case 15:return i="wss://kusama-people-rpc.polkadot.io/",e.abrupt("break",18);case 17:console.log("Unknown socket url provided, no connection made.");case 18:if(void 0!==i){e.next=22;break}return e.abrupt("return");case 22:return h=new s.E(i),e.next=25,r.G.create({provider:h});case 25:c=e.sent,(d=t.split(".")).forEach((function(e){e in c&&(c=c[e])})),e.t1=d[0],e.next="consts"===e.t1?31:"query"===e.t1?33:38;break;case 31:return l=c.toString(),e.abrupt("break",39);case 33:return e.next=35,c();case 35:return l=(l=e.sent).toString(),e.abrupt("break",39);case 38:console.log("Unknown path prefix ("+d[0]+") in "+t);case 39:return e.abrupt("return",l);case 40:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function d(e,a,t,n){switch(a){case"humanReadable":(0,l.HumanReadable)(e,t,n);break;case"precise":(0,l.Precise)(e,t,n);break;case"blocksToDays":(0,l.BlocksToDays)(e,n);break;case"erasToDays":(0,l.ErasToDays)(e,n,t);break;case"percentage":(0,l.Percentage)(e,n);break;case"permillToPercent":(0,l.PermillToPercent)(e,n);break;case"arrayLength":(0,l.ArrayLength)(e,n);break;default:return void console.log("Ignoring unknown filter type")}}const p=function(e){var a=e.network,t=e.path,s=e.defaultValue,r=e.filter,l=void 0===r?void 0:r,c=(0,i.useState)(""),p=c[0],u=c[1];return a=a.toLowerCase(),(0,i.useEffect)((function(){void 0!==l?d(s.toString(),l,a,u):u(s.toString());var e=void 0;switch(a){case"polkadot":e="wss://rpc.polkadot.io";break;case"kusama":e="wss://kusama-rpc.polkadot.io/";break;case"statemine":e="wss://kusama-asset-hub-rpc.polkadot.io/";break;case"statemint":e="wss://polkadot-asset-hub-rpc.polkadot.io/";break;case"kusamapeople":e="wss://kusama-people-rpc.polkadot.io";break;case"polkadotpeople":e="wss://polkadot-people-rpc.polkadot.io";break;default:console.log("Unknown network provided, "+a)}if(void 0===e)console.log("Failed to connect to a valid websocket, applying default");else{var i=function(){var e=(0,o.A)((0,n.A)().mark((function e(){var o;return(0,n.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,h(a,t,u);case 2:if(void 0!==(o=e.sent)){e.next=7;break}return e.abrupt("return");case 7:void 0!==l?d(o,l,a,u):u(o);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();try{i()}catch(r){console.log(r)}}}),[]),p}},11135:e=>{var a="polkadot",t="kusama",n="statemine",o="statemint",i="polkadotpeople",s="kusamapeople",r={polkadot:{precision:1e10,symbol:"DOT"},kusama:{precision:1e12,symbol:"KSM"},statemint:{precision:1e10,symbol:"DOT"},statemine:{precision:1e12,symbol:"KSM"},polkadotpeople:{precision:1e10,symbol:"DOT"},kusamapeople:{precision:1e12,symbol:"KSM"}};e.exports={HumanReadable:function(e,l,h){var c=void 0;if(l===a||l===o)c=3;else if(l===t||l===n||l===i)c=6;else{if(l!=s)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");c=8}e=parseFloat(e),h((e=Number.isInteger(e/r[l].precision)?e/r[l].precision+" "+r[l].symbol:(e/r[l].precision).toFixed(c)+" "+r[l].symbol).toString())},Precise:function(e,a,t){t(e=(e=parseFloat(e))/r[a].precision+" "+r[a].symbol)},BlocksToDays:function(e,a){a((e=6*e/86400).toString())},ErasToDays:function(e,r,l){var h=void 0;if(l===a||l===o||l==i)h=1;else{if(l!==t&&l!==n&&l!=s)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");h=4}r((e/=h).toString())},Percentage:function(e,a){a((e/=1e7).toString())},PermillToPercent:function(e,a){a((e/=1e4).toString())},ArrayLength:function(e,a){a((e=e.split(",").length).toString())}}},47790:()=>{}}]); \ No newline at end of file diff --git a/assets/js/48d75399.7e49f950.js b/assets/js/48d75399.7e49f950.js new file mode 100644 index 000000000000..8743dcd857dc --- /dev/null +++ b/assets/js/48d75399.7e49f950.js @@ -0,0 +1 @@ +(self.webpackChunk=self.webpackChunk||[]).push([[230],{76984:(e,a,t)=>{"use strict";t.r(a),t.d(a,{assets:()=>l,contentTitle:()=>r,default:()=>d,frontMatter:()=>s,metadata:()=>n,toc:()=>h});const n=JSON.parse('{"id":"general/faq","title":"Frequently Asked Questions (FAQs)","description":"FAQs to Help you Navigate on Polkadot.","source":"@site/../docs/general/faq.md","sourceDirName":"general","slug":"/faq","permalink":"/docs/faq","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/faq.md","tags":[],"version":"current","lastUpdatedBy":"github-actions[bot]","lastUpdatedAt":1728284821000,"frontMatter":{"id":"faq","title":"Frequently Asked Questions (FAQs)","sidebar_label":"FAQ","description":"FAQs to Help you Navigate on Polkadot.","keywords":["FAQ","questions"],"slug":"../faq"},"sidebar":"docs","previous":{"title":"Build on Polkadot","permalink":"/docs/start-building"},"next":{"title":"Glossary","permalink":"/docs/glossary"}}');var o=t(74848),i=t(28453);t(47379);const s={id:"faq",title:"Frequently Asked Questions (FAQs)",sidebar_label:"FAQ",description:"FAQs to Help you Navigate on Polkadot.",keywords:["FAQ","questions"],slug:"../faq"},r=void 0,l={},h=[{value:"Polkadot Launch",id:"polkadot-launch",level:2},{value:"Polkadot Roadmap",id:"polkadot-roadmap",level:2},{value:"Consensus",id:"consensus",level:2},{value:"Why do we need Consensus?",id:"why-do-we-need-consensus",level:3},{value:"What are PoW and PoS?",id:"what-are-pow-and-pos",level:3},{value:"Why not Proof of Work?",id:"why-not-proof-of-work",level:3},{value:"Validators",id:"validators",level:2},{value:"How do I apply to be a validator?",id:"how-do-i-apply-to-be-a-validator",level:3},{value:"How are validators rewarded?",id:"how-are-validators-rewarded",level:3},{value:"What is the minimum stake necessary to be elected as an active validator?",id:"what-is-the-minimum-stake-necessary-to-be-elected-as-an-active-validator",level:3},{value:"Why Polkadot targets 1000 validators while other projects have hundreds of thousands?",id:"why-polkadot-targets-1000-validators-while-other-projects-have-hundreds-of-thousands",level:3},{value:"Relay Chain",id:"relay-chain",level:2},{value:"What is the block time of the relay chain?",id:"what-is-the-block-time-of-the-relay-chain",level:3},{value:"Does Polkadot have smart contracts?",id:"does-polkadot-have-smart-contracts",level:3},{value:"How does the Polkadot relay chain connect to external chains in the ecosystem?",id:"how-does-the-polkadot-relay-chain-connect-to-external-chains-in-the-ecosystem",level:3},{value:"What is Polkadot's Transactions Per Second (TPS)?",id:"what-is-polkadots-transactions-per-second-tps",level:3},{value:"DOT",id:"dot",level:2},{value:"What is the difference between DOT (old) and new DOT?",id:"what-is-the-difference-between-dot-old-and-new-dot",level:3},{value:"What is the inflation rate of the DOT?",id:"what-is-the-inflation-rate-of-the-dot",level:3},{value:"Why can't crowdloaned DOT be staked?",id:"why-cant-crowdloaned-dot-be-staked",level:3},{value:"Governance",id:"governance",level:2},{value:"What prevents Polkadot governance from failing?",id:"what-prevents-polkadot-governance-from-failing",level:3},{value:"What prevents Polkadot governance from becoming plutocratic?",id:"what-prevents-polkadot-governance-from-becoming-plutocratic",level:3},{value:"Parachains",id:"parachains",level:2},{value:"How do parachain economics work?",id:"how-do-parachain-economics-work",level:3},{value:"Are parachains ephemeral? What happens when a parachain fails to renew its coretime?",id:"are-parachains-ephemeral-what-happens-when-a-parachain-fails-to-renew-its-coretime",level:3},{value:"Networking",id:"networking",level:2},{value:"What is libp2p?",id:"what-is-libp2p",level:3},{value:"Does Polkadot use libp2p?",id:"does-polkadot-use-libp2p",level:3},{value:"How does libp2p differ from IPFS?",id:"how-does-libp2p-differ-from-ipfs",level:3},{value:"Kusama",id:"kusama",level:2},{value:"What is the minimum amount of KSM / DOT I can have in my account?",id:"what-is-the-minimum-amount-of-ksm--dot-i-can-have-in-my-account",level:3},{value:"What are the transfer fees for Kusama?",id:"what-are-the-transfer-fees-for-kusama",level:3},{value:"Answered by Gav series",id:"answered-by-gav-series",level:2}];function c(e){const a={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",ul:"ul",...(0,i.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(a.admonition,{type:"info",children:(0,o.jsxs)(a.p,{children:["This FAQ focuses on technical questions for users interested in developing applications for\nPolkadot. If you have a more general question, you may wish to search for the answer on our support\n",(0,o.jsx)(a.a,{href:"https://support.polkadot.network/support/home",children:"Knowledge Base"})," or the main\n",(0,o.jsx)(a.a,{href:"https://polkadot.network/faq",children:"Polkadot network FAQ"}),". If you have a question that is not answered,\nplease feel free to ask on the Polkadot Watercooler\n",(0,o.jsx)(a.a,{href:"https://app.element.io/#/room/#polkadot-watercooler:web3.foundation",children:"Element channel"})," or contact\n",(0,o.jsx)(a.a,{href:"https://support.polkadot.network",children:"Polkadot Support"}),"."]})}),"\n",(0,o.jsx)(a.h2,{id:"polkadot-launch",children:"Polkadot Launch"}),"\n",(0,o.jsx)(a.p,{children:"The Genesis block of the Polkadot network was launched on May 26, 2020 at 15:36:21 UTC, as a Proof\nof Authority (PoA) network, with governance controlled by the single Sudo (super-user) account.\nDuring this time, validators started joining the network and signaling their intention to\nparticipate in consensus."}),"\n",(0,o.jsx)(a.p,{children:"The network evolved to become a Proof of Stake (PoS) network on June 18, 2020. With the chain\nsecured by the decentralized community of validators, the Sudo module was removed on July 20, 2020,\ntransitioning the governance of the chain into the hands of the token (DOT) holders. This is the\npoint where Polkadot became decentralized."}),"\n",(0,o.jsx)(a.p,{children:"The final step of the transition to full-functioning Polkadot was the enabling of transfer\nfunctionality, which occurred on Polkadot at block number 1_205_128 on August 18, 2020, at 16:39\nUTC."}),"\n",(0,o.jsx)(a.p,{children:"On August 21, 2020, Redenomination of DOT occurred. From this date, one DOT (old) equals 100 new\nDOT."}),"\n",(0,o.jsx)(a.h2,{id:"polkadot-roadmap",children:"Polkadot Roadmap"}),"\n",(0,o.jsxs)(a.p,{children:["For more information on the Polkadot roadmap please visit the\n",(0,o.jsx)(a.a,{href:"https://polkadot.network/technology/#roadmap",children:"official Polkadot website"}),"."]}),"\n",(0,o.jsx)(a.h2,{id:"consensus",children:"Consensus"}),"\n",(0,o.jsx)(a.h3,{id:"why-do-we-need-consensus",children:"Why do we need Consensus?"}),"\n",(0,o.jsxs)(a.p,{children:["Consensus is a method for coming to agreement over a shared state. In order for the state of the\nblockchain to continue to build and move forward, all nodes in the network must agree and come to\nconsensus. It is the way that the nodes in a decentralized network are able to stay synced with each\nother. Without consensus for the decentralized network of nodes in a blockchain, there is no way to\nensure that the state one node believes is true will be shared by the other nodes. Consensus aims to\nprovide the ",(0,o.jsx)(a.em,{children:"objective"})," view of the state amid participants who each have their own ",(0,o.jsx)(a.em,{children:"subjective"}),"\nviews of the network. It is the process by which these nodes communicate and come to agreement, and\nare able to build new blocks."]}),"\n",(0,o.jsx)(a.h3,{id:"what-are-pow-and-pos",children:"What are PoW and PoS?"}),"\n",(0,o.jsxs)(a.p,{children:["Proof of Work (PoW) and Proof of Stake (PoS) have been inaccurately used as short hand to refer to\nconsensus mechanisms of blockchains, but that does not capture the full picture. PoW is the method\nfor agreeing on a block author and part of the fuller\n",(0,o.jsx)(a.a,{href:"/docs/learn-consensus#nakamoto-consensus",children:"Nakamoto consensus"})," that also encompasses a chain\nselection algorithm (longest chain rule in Bitcoin). Similarly, PoS is a set of rules for selecting\nthe validator set and does not specify a chain selection rule or how a chain might reach finality.\nPoS algorithms have traditionally been paired with an algorithm for coming to Byzantine agreement\nbetween nodes. For example, ",(0,o.jsx)(a.a,{href:"/docs/learn-comparisons-cosmos",children:"Tendermint"})," is a practical\nByzantine fault tolerant algorithm that uses PoS as its validator set selection method."]}),"\n",(0,o.jsx)(a.h3,{id:"why-not-proof-of-work",children:"Why not Proof of Work?"}),"\n",(0,o.jsx)(a.p,{children:"Although simple and effective in coming to a decentralized consensus on the next block producer,\nproof of work with Nakamoto consensus consumes an incredible amount of energy, has no economic or\nprovable finality, and has no effective strategy in resisting cartels."}),"\n",(0,o.jsx)(a.h2,{id:"validators",children:"Validators"}),"\n",(0,o.jsx)(a.h3,{id:"how-do-i-apply-to-be-a-validator",children:"How do I apply to be a validator?"}),"\n",(0,o.jsxs)(a.p,{children:["There is no central authority that decides on validators, so there is not per se an ",(0,o.jsx)(a.em,{children:"application"}),"\nthat you can fill out. Registering as a validator is permissionless; in order to become one you must\nonly set up a validator node and mark your intention to validate on chain. For detailed instruction\non how to do validate you can consult the\n",(0,o.jsx)(a.a,{href:"/docs/maintain-guides-how-to-validate-polkadot",children:"validator guide"}),"."]}),"\n",(0,o.jsxs)(a.p,{children:["However, once you've set up a validator and have registered your intention it does not mean that you\nwill be included in the ",(0,o.jsx)(a.em,{children:"active set"})," right away. The validators are elected to the active set based\non the results of an election algorithm known as ",(0,o.jsx)(a.a,{href:"/docs/learn-phragmen",children:"Phragm\xe9n's method"}),".\nPhragm\xe9n's method tries to accomplish two goals: 1) select ",(0,o.jsx)(a.code,{children:"n"})," members from a larger set based on\nstake-weighted votes and 2) equalize the stake backing each validator as much as possible."]}),"\n",(0,o.jsxs)(a.p,{children:["You will likely want to campaign your validator to the community in order to get more backing. You\nare looking for ",(0,o.jsx)(a.em,{children:"nominators"})," that will put up their tokens to increase the stake for your validator.\nFor validators who cannot acquire the minimum stake from the community, Parity and Web3 Foundation\nalso run a joint programme called ",(0,o.jsx)(a.a,{href:"/docs/thousand-validators",children:"Thousand Validators"})," that will nominate\nvalidators if they apply and fit the requirements."]}),"\n",(0,o.jsx)(a.h3,{id:"how-are-validators-rewarded",children:"How are validators rewarded?"}),"\n",(0,o.jsxs)(a.p,{children:["Validators are rewarded from the ",(0,o.jsx)(a.a,{href:"/docs/learn-inflation",children:"inflation of the relay chain"}),",\n",(0,o.jsx)(a.a,{href:"/docs/learn-transactions#transaction-fees",children:"transaction fees"}),", and tips. However, they only\ntake a percentage of the former two. More details can be read on the page for\n",(0,o.jsx)(a.a,{href:"/docs/maintain-guides-validator-payout",children:"validator payouts"}),"."]}),"\n",(0,o.jsx)(a.h3,{id:"what-is-the-minimum-stake-necessary-to-be-elected-as-an-active-validator",children:"What is the minimum stake necessary to be elected as an active validator?"}),"\n",(0,o.jsx)(a.p,{children:"The minimum stake that is necessary to be elected as an active validator is dynamic and can change\nover time. It depends not only on how much stake is being put behind each validator, but also the\nsize of the active set and how many validators are waiting in the pool."}),"\n",(0,o.jsx)(a.p,{children:"There are a few ways to estimate the minimum stake."}),"\n",(0,o.jsxs)(a.p,{children:["One way can be to navigate to the\n",(0,o.jsx)(a.a,{href:"https://cloudflare-ipfs.com/ipns/polkadot.dotapps.io/#/staking/targets",children:"Polkadot Apps Targets tab"}),'.\nThe value at the top of the screen saying "Lowest" is the least staked validator. You need at least\nthis much + 1 to enter the set.']}),"\n",(0,o.jsx)(a.p,{children:"You can also use some tools some to perform estimations."}),"\n",(0,o.jsxs)(a.ul,{children:["\n",(0,o.jsxs)(a.li,{children:["\n",(0,o.jsxs)(a.p,{children:[(0,o.jsx)(a.a,{href:"https://github.com/paritytech/substrate-debug-kit/tree/master/offline-election",children:"Offline Election"}),"\ncan provide exact results of running an election on the current set of validators using the same\nRust code that is ran in Polkadot."]}),"\n"]}),"\n",(0,o.jsxs)(a.li,{children:["\n",(0,o.jsxs)(a.p,{children:[(0,o.jsx)(a.a,{href:"https://github.com/w3f/validator-stats",children:"Validator stats script"})," can give you an estimate that is\nbased on the currently elected set, as well as some statistics about Kusama validators."]}),"\n"]}),"\n"]}),"\n",(0,o.jsx)(a.h3,{id:"why-polkadot-targets-1000-validators-while-other-projects-have-hundreds-of-thousands",children:"Why Polkadot targets 1000 validators while other projects have hundreds of thousands?"}),"\n",(0,o.jsx)(a.p,{children:"Polkadot's goal to have 1000 validators is set to be something that is practically achievable in the\nshort term with high confidence of good performance in a live environment. Furthermore, validators\nin Polkadot are not the only stakers, and if we consider the number of stakers that can be possible\non Polkadot the number can scale up to hundreds of thousands. Since validators are performing\ncritical consensus work to maintain the security of the chain including all of its shards, a more\nmodest number of validators is estimated to start. Upon later improvements, such as implementing\nsignature aggregation for finalization messages, the number of validators could reasonably scale up.\nHowever, increasing validators above one thousand remains a goal for later iterations of Polkadot."}),"\n",(0,o.jsx)(a.p,{children:"It is also worth mentioning that one thousand validators is more than the number of validators of\nsimilar PoS chains with comparable levels of economic security as Polkadot. The closest contenders\nare operating with around 150 validators."}),"\n",(0,o.jsxs)(a.p,{children:["Additionally, other projects sometimes have a different definition of ",(0,o.jsx)(a.em,{children:"validator"}),' that approximates\nmore closely to remote signing keys without the full operation of a validating node. On Polkadot,\neach validator is running their own validating node and performing full verification of the Relay\nChain, voting on finality, producing blocks in their decided slots, and verifying parachain state\ntransitions. Other projects may consider validators and "validating nodes" as separate entities.']}),"\n",(0,o.jsxs)(a.p,{children:["Finally, individuals may participate in the block production process indirectly by\n",(0,o.jsx)(a.a,{href:"/docs/learn-nominator",children:"nominating"})," validators. In this way, individuals who are not running a\nnode can still share in staking rewards."]}),"\n",(0,o.jsx)(a.h2,{id:"relay-chain",children:"Relay Chain"}),"\n",(0,o.jsx)(a.h3,{id:"what-is-the-block-time-of-the-relay-chain",children:"What is the block time of the relay chain?"}),"\n",(0,o.jsx)(a.p,{children:"Both the Kusama and Polkadot networks are currently operating at a rate of one block every six\nseconds."}),"\n",(0,o.jsx)(a.p,{children:"This may be changed in the future. It may go as low as two to three seconds after optimizations, or\npotentially increase in order to handle the capacity of the parachain networking in a live\nenvironment."}),"\n",(0,o.jsx)(a.h3,{id:"does-polkadot-have-smart-contracts",children:"Does Polkadot have smart contracts?"}),"\n",(0,o.jsx)(a.p,{children:"No - and yes. The Polkadot relay chain does not implement smart contracts natively. The reason for\nnot having smart contracts on the relay chain is part of the design philosophy for Polkadot that\ndictates that the relay chain should be the minimal logic required to accomplish its job."}),"\n",(0,o.jsx)(a.p,{children:"While the Polkadot relay chain does not implement smart contracts directly, there are numerous\nparachains that do. It's possible for parachains to enable smart contract functionality and then\nbenefit from the security and interoperability features of Polkadot. Additionally, existing smart\ncontract chains can connect to Polkadot as a parachain, or via a bridge."}),"\n",(0,o.jsxs)(a.p,{children:["So it's better to say that the Polkadot ",(0,o.jsx)(a.em,{children:"ecosystem"}),' has smart contracts versus "Polkadot has smart\ncontracts."']}),"\n",(0,o.jsx)(a.h3,{id:"how-does-the-polkadot-relay-chain-connect-to-external-chains-in-the-ecosystem",children:"How does the Polkadot relay chain connect to external chains in the ecosystem?"}),"\n",(0,o.jsxs)(a.p,{children:["One of the cornerstone interoperability technologies being researched and developed for deployment\non Polkadot is cross-chain ",(0,o.jsx)(a.a,{href:"/docs/learn-bridges",children:"bridges"}),". Bridges come in a variety of\nflavors with varying levels of trust associated with them. Polkadot is predominantly researching the\ntrust-minimized flavor that imposes economic costs on the operators of the bridge, and therefore\nmakes it economically secure. Bridge efforts are being worked on in concert with other projects in\nthe ecosystem."]}),"\n",(0,o.jsx)(a.h3,{id:"what-is-polkadots-transactions-per-second-tps",children:"What is Polkadot's Transactions Per Second (TPS)?"}),"\n",(0,o.jsxs)(a.p,{children:["Polkadot is a heterogeneous sharded network comprising a relay chain and numerous parachains, which\nare all individual blockchains built on ",(0,o.jsx)(a.a,{href:"https://substrate.io/",children:"Substrate"})," executing in parallel.\nHence, the Transactions Per Second (TPS) of Polkadot is a number that encompasses all the\ntransactions on the relay chain as well as parachains. As the transactions on these Substrate-based\nblockchains are ",(0,o.jsx)(a.a,{href:"https://docs.substrate.io/build/tx-weights-fees/",children:"weights based"}),", it makes sense to\nuse TPS as a measure for the network performance if all the transactions carry the same weight.\n",(0,o.jsx)(a.a,{href:"https://twitter.com/gavofyork/status/1270025498580656134",children:"Performance benchmark tests"})," show that\nSubstrate-based blockchains can achieve over 1000 TPS for balance transfer transactions. Assuming\nPolkadot is running over 100 parachains; the projected TPS is well over 100,000. With\n",(0,o.jsx)(a.a,{href:"/docs/learn-async-backing",children:"asynchronous backing upgrade"}),", the TPS is expected to increase\ntenfold to 1,000,000."]}),"\n",(0,o.jsxs)(a.p,{children:["It is essential to realize that TPS is inherently a subjective measurement with numerous factors\nthat can contribute to it. It's hard to gauge the usefulness of TPS in isolation (when compared to\nother chains), as it depends on what a transaction does for a particular network. To view how\nPolkadot measures TPS see the Polkadot sTPS\n(",(0,o.jsx)(a.a,{href:"https://github.com/paritytech/polkadot-stps/blob/main/docs/introduction.md",children:"Standard Transaction Per Second"}),")\nto consider precisely how benchmarking was performed for Polkadot."]}),"\n",(0,o.jsx)(a.h2,{id:"dot",children:"DOT"}),"\n",(0,o.jsx)(a.h3,{id:"what-is-the-difference-between-dot-old-and-new-dot",children:"What is the difference between DOT (old) and new DOT?"}),"\n",(0,o.jsxs)(a.p,{children:["The DOT (old) unit on Polkadot was at twelve decimal places, otherwise known as 1e12 Plancks. On 21\nAugust, 2020, Denomination Day, the DOT (old) value was redenominated to 1e10 (10_000_000_000, or\nten billion) Plancks, meaning that the new DOT was valued at ten decimal places. Following the\n",(0,o.jsx)(a.a,{href:"/docs/learn/learn-redenomination",children:"redenomination"}),", the new DOT is called DOT."]}),"\n",(0,o.jsx)(a.h3,{id:"what-is-the-inflation-rate-of-the-dot",children:"What is the inflation rate of the DOT?"}),"\n",(0,o.jsx)(a.p,{children:"The inflation rate is approximately 10% per year."}),"\n",(0,o.jsxs)(a.p,{children:["A portion of the inflation is rewarded to validators for performing their duties, while another\nportion may go directly to the treasury. The exact percentage that goes into both varies and is\nbased on the amount of DOT that are staked. Please see the article on\n",(0,o.jsx)(a.a,{href:"../learn/learn-staking.md/#inflation",children:"inflation"})," for more information."]}),"\n",(0,o.jsx)(a.h3,{id:"why-cant-crowdloaned-dot-be-staked",children:"Why can't crowdloaned DOT be staked?"}),"\n",(0,o.jsx)(a.p,{children:"DOTs contributed to a successful crowdloan campaign by a parachain are bonded for the entire lease\nperiod, which is two years on Polkadot. The crowdloaned DOT cannot be used for any other DOT utility\nfunctionalities like staking and democracy. In exchange to the lost staking rewards or liquidity of\nDOTs, the parachain team may offer rewards to the contributor."}),"\n",(0,o.jsxs)(a.p,{children:["The utility of crowdloaned DOT is to provide a lease for a parachain. The utility of staked DOT is\nto secure the network through a reward/",(0,o.jsx)(a.a,{href:"/docs/learn-offenses",children:"slash"})," mechanism. Allowing\ncrowdloaned DOT to be staked results in complex consequences like applying a slash on crowdloaned\nDOT that was meant to be bonded for the entire lease period of a parachain. In a way, the\ninaccessibility of crowdloaned DOTs and the lack of staking rewards for the entire lease duration\nencourages the contributors to back projects that are valuable to the ecosystem."]}),"\n",(0,o.jsx)(a.h2,{id:"governance",children:"Governance"}),"\n",(0,o.jsx)(a.h3,{id:"what-prevents-polkadot-governance-from-failing",children:"What prevents Polkadot governance from failing?"}),"\n",(0,o.jsxs)(a.p,{children:["Polkadot's governance has already been shown to work. Examples can be found in the runtime upgrades\nthat have successfully taken place through on the testnets as well as in a real economic environment\non ",(0,o.jsx)(a.a,{href:"https://guide.kusama.network",children:"Kusama"})," and Polkadot itself."]}),"\n",(0,o.jsx)(a.p,{children:"It is fair to say that the field of on-chain blockchain governance is still new, and no one can\nclaim to know exactly what the optimal version of on-chain governance is yet. However, Polkadot\ntakes a brave step forward in pioneering thought-through mechanisms for evolving a blockchain."}),"\n",(0,o.jsx)(a.p,{children:"Blockchains need a method to adapt and evolve. Therefore, an on-chain governance system was\nnecessary for the long-term success of Polkadot. Ultimately, it is the token holders that are\nresponsible for preventing Polkadot's governance from failing by using their economic value and\nconviction to sway the progression of the protocol."}),"\n",(0,o.jsx)(a.h3,{id:"what-prevents-polkadot-governance-from-becoming-plutocratic",children:"What prevents Polkadot governance from becoming plutocratic?"}),"\n",(0,o.jsxs)(a.p,{children:["A savvy reader might have noticed that the answer to the previous question endowed the token holder\nwith the ultimate responsibility to ensure that Polkadot's governance does not fail. By following\nthe train of this assertion, one might assume that Polkadot's governance is susceptible to becoming\nruled by a few large token holders (called ",(0,o.jsx)(a.em,{children:"whales"})," in trading parlance) and therefore become a mere\nplutocracy (rule of the rich)."]}),"\n",(0,o.jsxs)(a.p,{children:["There are several other mechanisms that are built-in to the governance system to resist this\nplutocratic tendency. One of these mechanisms is called conviction voting, and imbues greater voting\npower to token holders who are willing to lock their tokens on the protocol for longer lengths of\ntime. Longer lock-ups display ",(0,o.jsx)(a.em,{children:"conviction"})," in a vote. Conviction voting could allow a highly\ndetermined minority to overrule the vote of an apathetic majority in certain situations. Another\nmechanism is known as Adaptive Quorum Biasing. This makes proposals have a varying threshold for\napproval or rejection based on what part of the governance protocol the proposal originated in. For\ndetails on the subtleties of Polkadot's governance system, please see the\n",(0,o.jsx)(a.a,{href:"/docs/learn-polkadot-opengov",children:"governance page"}),"."]}),"\n",(0,o.jsx)(a.h2,{id:"parachains",children:"Parachains"}),"\n",(0,o.jsx)(a.h3,{id:"how-do-parachain-economics-work",children:"How do parachain economics work?"}),"\n",(0,o.jsx)(a.p,{children:"Parachains have the flexibility to implement their own monetary system or incentive structure for\ncollators. However, this is not strictly necessary. Since the collator's job is to continue to give\nrecent state transitions to the validators on the relay chain who validate each transition, the\nsecurity of the parachain and the Polkadot network is completely separate from parachain economics.\nParachains need collators to continue to progress, so it wouldn't be unreasonable to see them\nincentivize collator nodes in some way, but the specific mechanism is completely up to parachain\nimplementers."}),"\n",(0,o.jsx)(a.h3,{id:"are-parachains-ephemeral-what-happens-when-a-parachain-fails-to-renew-its-coretime",children:"Are parachains ephemeral? What happens when a parachain fails to renew its coretime?"}),"\n",(0,o.jsxs)(a.p,{children:["Parachains are not ephemeral. As long as someone is keeping the data for a parachain, the parachain\ncan move between being a parachain, an\n",(0,o.jsx)(a.a,{href:"/docs/learn-parachains#on-demand-parachains",children:"on-demand parachain"}),", or a separate sovereign\nchain at different points of its lifetime. Especially with on-demand parachains, parachains can\nproduce blocks when their usage and throughput makes it necessary."]}),"\n",(0,o.jsxs)(a.p,{children:["When a parachain could not renew its bulk coretime and needs to keep its chain live, there are a\ncouple of options to consider. One option is to explore secondary coretime marketplaces on\n",(0,o.jsx)(a.a,{href:"https://www.lastic.xyz/",children:"Lastic"})," or ",(0,o.jsx)(a.a,{href:"https://app.regionx.tech/?network=polkadot",children:"RegionX"}),". The\nother option is run as an on-demand parachain, and purchase coretime to produce one block at a time.\nOn-demand parachains are still secured by the relay chain but don't need to hold a core and can\nproduce a block when it's economically feasible for them. For more information, please refer to the\n",(0,o.jsx)(a.a,{href:"/docs/learn-parachains#parachains-vs-on-demand-parachains",children:"parachains page"}),"."]}),"\n",(0,o.jsx)(a.h2,{id:"networking",children:"Networking"}),"\n",(0,o.jsx)(a.h3,{id:"what-is-libp2p",children:"What is libp2p?"}),"\n",(0,o.jsxs)(a.p,{children:[(0,o.jsx)(a.a,{href:"https://libp2p.io",children:"Libp2p"})," is a modular and extensible networking stack that is used by IPFS,\nSubstrate, and many other projects. It is a collection of peer-to-peer protocols for finding peers\nand connecting to them. Its modules have logic for content routing, peer routing, peer discovery,\ndifferent transports, and NAT traversals. It is intended to be used by applications for building\nlarge scale peer-to-peer networks by only selecting the parts of the protocol suite that are needed."]}),"\n",(0,o.jsxs)(a.p,{children:["The Rust implementation of the specification was built and primarily maintained by a team of\ncontributors at Parity Technologies. The Go and JavaScript versions are maintained by Protocol Labs\nas well as community contributors. A ",(0,o.jsx)(a.a,{href:"https://github.com/status-im/nim-libp2p",children:"Nim"})," version of the\nlibrary also exists. Libp2p as a whole is an open source project that is actively developed and\nexpanded on various code repositories hosted on ",(0,o.jsx)(a.a,{href:"https://github.com/libp2p",children:"their GitHub"}),"."]}),"\n",(0,o.jsx)(a.h3,{id:"does-polkadot-use-libp2p",children:"Does Polkadot use libp2p?"}),"\n",(0,o.jsx)(a.p,{children:"Yes, since Polkadot is built with Substrate. Substrate uses a networking protocol that is based on\nlibp2p (specifically the Rust libp2p library). However, Substrate uses a mix of standard libp2p\nprotocols and protocols that are homegrown and not official libp2p standards. Of the standards\nprotocols, those which are shared with other implementations of libp2p such as IPFS, are\nconnection-checking (ping), asking for information on a peer (identity), and Kademlia random walks\n(kad)."}),"\n",(0,o.jsxs)(a.p,{children:["Of the protocols that are custom to Substrate, there are the legacy Substrate stream, a\nrequest-response for getting information on blocks (sync), a light client protocol, a notification\nprotocol for transactions, and block announcement. For detailed information on how Substrate uses\nlibp2p and the standard and custom protocols, please see the\n",(0,o.jsx)(a.a,{href:"https://paritytech.github.io/substrate/master/sc_network/index.html",children:"networking documentation"}),"."]}),"\n",(0,o.jsx)(a.h3,{id:"how-does-libp2p-differ-from-ipfs",children:"How does libp2p differ from IPFS?"}),"\n",(0,o.jsxs)(a.p,{children:["The ",(0,o.jsx)(a.a,{href:"https://ipfs.tech/",children:"Interplanetary File System"}),' (IPFS) is a peer-to-peer hypermedia protocol\nused primarily for storage of files. It allows one to upload a file onto the network and share it\nwith its content addressable URI. IPFS, like Substrate, is an application of libp2p and exists\nhigher on the technology stack. Although both IPFS and Substrate use libp2p, it cannot be said that\nSubstrate "uses" IPFS since besides sharing the underlying library for networking there is no native\nintegration between the two applications.']}),"\n",(0,o.jsx)(a.h2,{id:"kusama",children:"Kusama"}),"\n",(0,o.jsx)(a.h3,{id:"what-is-the-minimum-amount-of-ksm--dot-i-can-have-in-my-account",children:"What is the minimum amount of KSM / DOT I can have in my account?"}),"\n",(0,o.jsxs)(a.p,{children:["Please see information about ",(0,o.jsx)(a.a,{href:"/docs/build-protocol-info",children:"Existential Deposits"}),"."]}),"\n",(0,o.jsx)(a.h3,{id:"what-are-the-transfer-fees-for-kusama",children:"What are the transfer fees for Kusama?"}),"\n",(0,o.jsx)(a.p,{children:"It is important to note that the cost of transferring KSM is dynamic. Currently, the minimum cost of\ntransferring KSM is 0.01 KSM (the base fee), although this can be changed via governance. However,\nactual transaction fees vary based on a variety of factors. Specifically, fee calculation follows\nthe following formula:"}),"\n",(0,o.jsx)(a.pre,{children:(0,o.jsx)(a.code,{children:"base_fee + (tx_length * length_fee) + WeightToFee(weight)\n"})}),"\n",(0,o.jsxs)(a.p,{children:["Please see the\n",(0,o.jsx)(a.a,{href:"https://docs.substrate.io/reference/how-to-guides/weights/calculate-fees/",children:"fee calculation"})," page in\nthe Substrate documentation for more detailed information."]}),"\n",(0,o.jsx)(a.h2,{id:"answered-by-gav-series",children:"Answered by Gav series"}),"\n",(0,o.jsx)(a.p,{children:'The "Answered by Gav" series is a collection of posts uploaded to Reddit of questions that have been\nasked in the Polkadot Watercooler Riot channel and answered by Polkadot founder Gavin Wood.'}),"\n",(0,o.jsxs)(a.ul,{children:["\n",(0,o.jsx)(a.li,{children:(0,o.jsx)(a.a,{href:"https://www.reddit.com/r/dot/comments/b87d96/answered_by_gav_reason_for_using_asynchronous/",children:"Reason for using asynchronous rather than synchronous communication? Difference in terms of TPS?"})}),"\n",(0,o.jsx)(a.li,{children:(0,o.jsx)(a.a,{href:"https://www.reddit.com/r/dot/comments/b87awr/answered_by_gav_how_exactly_do_validators_in_an/",children:"How exactly do validators in an ETH parachain keep moving around and how is communication between zones trustless?"})}),"\n",(0,o.jsx)(a.li,{children:(0,o.jsx)(a.a,{href:"https://www.reddit.com/r/dot/comments/b87bua/answered_by_gav_what_are_the_main_issues_with/",children:"What are the main issues with Bitcoin integration and will it ever be possible? Same problem with other POW chains? Is Polkadot only going to work with POS chains? How is it trust-less in comparison to Cosmos though?"})}),"\n",(0,o.jsx)(a.li,{children:(0,o.jsx)(a.a,{href:"https://www.reddit.com/r/dot/comments/b87cjz/answered_by_gav_what_are_the_current_thoughts/",children:"What are the current thoughts around governance especially since projects have to be voted in to receive the parachains security?"})}),"\n",(0,o.jsx)(a.li,{children:(0,o.jsx)(a.a,{href:"https://www.reddit.com/r/dot/comments/b87ds8/answered_by_gav_also_is_there_any_detailed/",children:"Also is there any detailed overview of how exactly a token transfer from ETH could be exchanged with another chain's currency?"})}),"\n",(0,o.jsx)(a.li,{children:(0,o.jsx)(a.a,{href:"https://www.reddit.com/r/dot/comments/bcqrx9/answered_by_gav_can_i_run_multiple_validators/",children:"Can I run multiple Validators with the same Session Key?"})}),"\n",(0,o.jsx)(a.li,{children:(0,o.jsx)(a.a,{href:"https://www.reddit.com/r/dot/comments/bcqwit/answered_by_gav_how_to_tackle_the_concentration/",children:"How to tackle the concentration risk of Validators in data centers?"})}),"\n"]})]})}function d(e={}){const{wrapper:a}={...(0,i.R)(),...e.components};return a?(0,o.jsx)(a,{...e,children:(0,o.jsx)(c,{...e})}):c(e)}},47379:(e,a,t)=>{"use strict";t.d(a,{A:()=>p});var n=t(90675),o=t(10467),i=t(96540),s=t(19588),r=t(2026),l=t(11135);function h(e,a,t){return c.apply(this,arguments)}function c(){return(c=(0,o.A)((0,n.A)().mark((function e(a,t,o){var i,l,h,c,d;return(0,n.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=void 0,l=void 0,e.t0=a,e.next="polkadot"===e.t0?5:"kusama"===e.t0?7:"statemine"===e.t0?9:"statemint"===e.t0?11:"polkadotpeople"===e.t0?13:"kusamapeople"===e.t0?15:17;break;case 5:return i="wss://rpc.polkadot.io",e.abrupt("break",18);case 7:return i="wss://kusama-rpc.polkadot.io/",e.abrupt("break",18);case 9:return i="wss://statemine-rpc.polkadot.io/",e.abrupt("break",18);case 11:return i="wss://statemint-rpc.polkadot.io/",e.abrupt("break",18);case 13:return i="wss://polkadot-people-rpc.polkadot.io/",e.abrupt("break",18);case 15:return i="wss://kusama-people-rpc.polkadot.io/",e.abrupt("break",18);case 17:console.log("Unknown socket url provided, no connection made.");case 18:if(void 0!==i){e.next=22;break}return e.abrupt("return");case 22:return h=new s.E(i),e.next=25,r.G.create({provider:h});case 25:c=e.sent,(d=t.split(".")).forEach((function(e){e in c&&(c=c[e])})),e.t1=d[0],e.next="consts"===e.t1?31:"query"===e.t1?33:38;break;case 31:return l=c.toString(),e.abrupt("break",39);case 33:return e.next=35,c();case 35:return l=(l=e.sent).toString(),e.abrupt("break",39);case 38:console.log("Unknown path prefix ("+d[0]+") in "+t);case 39:return e.abrupt("return",l);case 40:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function d(e,a,t,n){switch(a){case"humanReadable":(0,l.HumanReadable)(e,t,n);break;case"precise":(0,l.Precise)(e,t,n);break;case"blocksToDays":(0,l.BlocksToDays)(e,n);break;case"erasToDays":(0,l.ErasToDays)(e,n,t);break;case"percentage":(0,l.Percentage)(e,n);break;case"permillToPercent":(0,l.PermillToPercent)(e,n);break;case"arrayLength":(0,l.ArrayLength)(e,n);break;default:return void console.log("Ignoring unknown filter type")}}const p=function(e){var a=e.network,t=e.path,s=e.defaultValue,r=e.filter,l=void 0===r?void 0:r,c=(0,i.useState)(""),p=c[0],u=c[1];return a=a.toLowerCase(),(0,i.useEffect)((function(){void 0!==l?d(s.toString(),l,a,u):u(s.toString());var e=void 0;switch(a){case"polkadot":e="wss://rpc.polkadot.io";break;case"kusama":e="wss://kusama-rpc.polkadot.io/";break;case"statemine":e="wss://kusama-asset-hub-rpc.polkadot.io/";break;case"statemint":e="wss://polkadot-asset-hub-rpc.polkadot.io/";break;case"kusamapeople":e="wss://kusama-people-rpc.polkadot.io";break;case"polkadotpeople":e="wss://polkadot-people-rpc.polkadot.io";break;default:console.log("Unknown network provided, "+a)}if(void 0===e)console.log("Failed to connect to a valid websocket, applying default");else{var i=function(){var e=(0,o.A)((0,n.A)().mark((function e(){var o;return(0,n.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,h(a,t,u);case 2:if(void 0!==(o=e.sent)){e.next=7;break}return e.abrupt("return");case 7:void 0!==l?d(o,l,a,u):u(o);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();try{i()}catch(r){console.log(r)}}}),[]),p}},11135:e=>{var a="polkadot",t="kusama",n="statemine",o="statemint",i="polkadotpeople",s="kusamapeople",r={polkadot:{precision:1e10,symbol:"DOT"},kusama:{precision:1e12,symbol:"KSM"},statemint:{precision:1e10,symbol:"DOT"},statemine:{precision:1e12,symbol:"KSM"},polkadotpeople:{precision:1e10,symbol:"DOT"},kusamapeople:{precision:1e12,symbol:"KSM"}};e.exports={HumanReadable:function(e,l,h){var c=void 0;if(l===a||l===o)c=3;else if(l===t||l===n||l===i)c=6;else{if(l!=s)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");c=8}e=parseFloat(e),h((e=Number.isInteger(e/r[l].precision)?e/r[l].precision+" "+r[l].symbol:(e/r[l].precision).toFixed(c)+" "+r[l].symbol).toString())},Precise:function(e,a,t){t(e=(e=parseFloat(e))/r[a].precision+" "+r[a].symbol)},BlocksToDays:function(e,a){a((e=6*e/86400).toString())},ErasToDays:function(e,r,l){var h=void 0;if(l===a||l===o||l==i)h=1;else{if(l!==t&&l!==n&&l!=s)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");h=4}r((e/=h).toString())},Percentage:function(e,a){a((e/=1e7).toString())},PermillToPercent:function(e,a){a((e/=1e4).toString())},ArrayLength:function(e,a){a((e=e.split(",").length).toString())}}},47790:()=>{}}]); \ No newline at end of file diff --git a/assets/js/493c7fdf.479f13a4.js b/assets/js/493c7fdf.479f13a4.js deleted file mode 100644 index 4b4bfd49a044..000000000000 --- a/assets/js/493c7fdf.479f13a4.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk=self.webpackChunk||[]).push([[5053],{98828:(e,n,a)=>{"use strict";a.r(n),a.d(n,{assets:()=>l,contentTitle:()=>s,default:()=>h,frontMatter:()=>o,metadata:()=>r,toc:()=>c});var t=a(74848),i=a(28453);a(47379);const o={id:"glossary",title:"Glossary",sidebar_label:"Glossary",description:"Common Terms and Concepts in the Polkadot Ecosystem.",keywords:["glossary","questions","definitions"],slug:"../glossary"},s=void 0,r={id:"general/glossary",title:"Glossary",description:"Common Terms and Concepts in the Polkadot Ecosystem.",source:"@site/../docs/general/glossary.md",sourceDirName:"general",slug:"/glossary",permalink:"/docs/glossary",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/glossary.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1729152709e3,frontMatter:{id:"glossary",title:"Glossary",sidebar_label:"Glossary",description:"Common Terms and Concepts in the Polkadot Ecosystem.",keywords:["glossary","questions","definitions"],slug:"../glossary"},sidebar:"docs",previous:{title:"FAQ",permalink:"/docs/faq"},next:{title:"Basics",permalink:"/docs/learn-basics-index"}},l={},c=[{value:"Active Nomination",id:"active-nomination",level:2},{value:"Alexander",id:"alexander",level:2},{value:"Asset Hub",id:"asset-hub",level:2},{value:"Attestation",id:"attestation",level:2},{value:"Auction (Parachain)",id:"auction-parachain",level:2},{value:"Aura",id:"aura",level:2},{value:"Authority",id:"authority",level:2},{value:"Availability Cores",id:"availability-cores",level:2},{value:"BABE",id:"babe",level:2},{value:"Bitfield Array",id:"bitfield-array",level:2},{value:"Block",id:"block",level:2},{value:"Blockspace",id:"blockspace",level:2},{value:"Block Explorer",id:"block-explorer",level:2},{value:"Blocks Nominations",id:"blocks-nominations",level:2},{value:"BLS",id:"bls",level:2},{value:"Bonding",id:"bonding",level:2},{value:"Bounty",id:"bounty",level:2},{value:"Bridge",id:"bridge",level:2},{value:"Byzantine Fault Tolerance",id:"byzantine-fault-tolerance",level:2},{value:"Capacity",id:"capacity",level:2},{value:"Candidate",id:"candidate",level:2},{value:"Collations",id:"collations",level:2},{value:"Collator",id:"collator",level:2},{value:"Collectives",id:"collectives",level:2},{value:"Commission",id:"commission",level:2},{value:"Common Good (Parachain)",id:"common-good-parachain",level:2},{value:"Community Queue",id:"community-queue",level:2},{value:"Consensus",id:"consensus",level:2},{value:"Coretime",id:"coretime",level:2},{value:"Crowdloan",id:"crowdloan",level:2},{value:"Curator",id:"curator",level:2},{value:"Dapps",id:"dapps",level:2},{value:"DOT",id:"dot",level:2},{value:"Duty Roster",id:"duty-roster",level:2},{value:"Epoch",id:"epoch",level:2},{value:"Era",id:"era",level:2},{value:"Equivocation",id:"equivocation",level:2},{value:"External Queue",id:"external-queue",level:2},{value:"Extrinsic",id:"extrinsic",level:2},{value:"Technical Fellowship",id:"technical-fellowship",level:2},{value:"Finality",id:"finality",level:2},{value:"Finality Gadget",id:"finality-gadget",level:2},{value:"Frame",id:"frame",level:2},{value:"Genesis",id:"genesis",level:2},{value:"Governance",id:"governance",level:2},{value:"Governance Council",id:"governance-council",level:2},{value:"GRANDPA Finality Gadget",id:"grandpa-finality-gadget",level:2},{value:"Hard Fork",id:"hard-fork",level:2},{value:"Hard Spoon",id:"hard-spoon",level:2},{value:"Horizontal Relay-routed Message Passing",id:"horizontal-relay-routed-message-passing",level:2},{value:"Inactive Nomination",id:"inactive-nomination",level:2},{value:"Inherent",id:"inherent",level:2},{value:"Injected Account",id:"injected-account",level:2},{value:"Interoperability",id:"interoperability",level:2},{value:"Keep-Alive Check",id:"keep-alive-check",level:2},{value:"KSM",id:"ksm",level:2},{value:"Kusama",id:"kusama",level:2},{value:"Lease Period",id:"lease-period",level:2},{value:"LIBP2P",id:"libp2p",level:2},{value:"Liveness",id:"liveness",level:2},{value:"Mainnet",id:"mainnet",level:2},{value:"Message",id:"message",level:2},{value:"Message Queue",id:"message-queue",level:2},{value:"Metadata",id:"metadata",level:2},{value:"Motion",id:"motion",level:2},{value:"Next Session",id:"next-session",level:2},{value:"Node Explorer",id:"node-explorer",level:2},{value:"Nominated Proof of Stake (NPoS)",id:"nominated-proof-of-stake-npos",level:2},{value:"Nominator",id:"nominator",level:2},{value:"Non-fungible Token (NFT)",id:"non-fungible-token-nft",level:2},{value:"On-chain Governance",id:"on-chain-governance",level:2},{value:"Polkadot OpenGov",id:"polkadot-opengov",level:2},{value:"Origin",id:"origin",level:2},{value:"Pallet",id:"pallet",level:2},{value:"Parachain",id:"parachain",level:2},{value:"Parachain Development Kit (PDK)",id:"parachain-development-kit-pdk",level:2},{value:"ParaID",id:"paraid",level:2},{value:"Parathread",id:"parathread",level:2},{value:"Parachain Registry",id:"parachain-registry",level:2},{value:"Parity Technologies",id:"parity-technologies",level:2},{value:"People Chain",id:"people-chain",level:2},{value:"Polkadot",id:"polkadot",level:2},{value:"Polkadot Alliance",id:"polkadot-alliance",level:2},{value:"Host",id:"host",level:2},{value:"Runtime Environment",id:"runtime-environment",level:2},{value:"Paseo",id:"paseo",level:2},{value:"Preimage",id:"preimage",level:2},{value:"Proof of Stake (PoS)",id:"proof-of-stake-pos",level:2},{value:"Proof of Validity",id:"proof-of-validity",level:2},{value:"Proof of Work (PoW)",id:"proof-of-work-pow",level:2},{value:"Proposal",id:"proposal",level:2},{value:"Protocol",id:"protocol",level:2},{value:"Random Seed",id:"random-seed",level:2},{value:"Referendum",id:"referendum",level:2},{value:"Re-Genesis",id:"re-genesis",level:2},{value:"Relay Chain",id:"relay-chain",level:2},{value:"Remarks",id:"remarks",level:2},{value:"Rococo",id:"rococo",level:2},{value:"Root Origin",id:"root-origin",level:2},{value:"Runtime",id:"runtime",level:2},{value:"Runtime Module",id:"runtime-module",level:2},{value:"Safety",id:"safety",level:2},{value:"Scalability",id:"scalability",level:2},{value:"Sealing",id:"sealing",level:2},{value:"Session",id:"session",level:2},{value:"Session Certificate",id:"session-certificate",level:2},{value:"Session Key",id:"session-key",level:2},{value:"Shared Security",id:"shared-security",level:2},{value:"Slashing",id:"slashing",level:2},{value:"Soft Fork",id:"soft-fork",level:2},{value:"Software Development Kit (SDK)",id:"software-development-kit-sdk",level:2},{value:"Spend Period",id:"spend-period",level:2},{value:"Staking",id:"staking",level:2},{value:"State transition function",id:"state-transition-function",level:2},{value:"Substrate",id:"substrate",level:2},{value:"System Parachains",id:"system-parachains",level:2},{value:"Tabling",id:"tabling",level:2},{value:"Teleport",id:"teleport",level:2},{value:"Testnet",id:"testnet",level:2},{value:"Tokenization",id:"tokenization",level:2},{value:"Tracks",id:"tracks",level:2},{value:"Tranche",id:"tranche",level:2},{value:"Transfer",id:"transfer",level:2},{value:"Transaction",id:"transaction",level:2},{value:"Validator",id:"validator",level:2},{value:"Vertical Message Passing",id:"vertical-message-passing",level:2},{value:"Voting",id:"voting",level:2},{value:"Waiting Nomination",id:"waiting-nomination",level:2},{value:"Wallet",id:"wallet",level:2},{value:"Wasm",id:"wasm",level:2},{value:"Watermark",id:"watermark",level:2},{value:"Web3 Foundation",id:"web3-foundation",level:2},{value:"WebAssembly",id:"webassembly",level:2},{value:"Weights",id:"weights",level:2},{value:"Westend",id:"westend",level:2},{value:"Witness",id:"witness",level:2},{value:"Whitelist Pallet",id:"whitelist-pallet",level:2}];function d(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",p:"p",strong:"strong",...(0,i.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h2,{id:"active-nomination",children:"Active Nomination"}),"\n",(0,t.jsx)(n.p,{children:"A validator (or validators) that a nominator has selected to nominate and is actively validating\nthis era. The nominator is placing their stake behind this validator for this era and will\npotentially receive staking rewards in return for doing so."}),"\n",(0,t.jsx)(n.h2,{id:"alexander",children:"Alexander"}),"\n",(0,t.jsxs)(n.p,{children:["The fourth (now defunct) proof of concept (PoC-4) ",(0,t.jsx)(n.a,{href:"#testnet",children:"testnet"})," for Polkadot."]}),"\n",(0,t.jsx)(n.h2,{id:"asset-hub",children:"Asset Hub"}),"\n",(0,t.jsx)(n.p,{children:"A system parachain used for asset management."}),"\n",(0,t.jsx)(n.h2,{id:"attestation",children:"Attestation"}),"\n",(0,t.jsxs)(n.p,{children:["In the network's validity system, an ",(0,t.jsx)(n.em,{children:"attestation"})," is a type of message that validators broadcast\nthat says whether they think a parachain candidate block is valid or invalid."]}),"\n",(0,t.jsx)(n.h2,{id:"auction-parachain",children:"Auction (Parachain)"}),"\n",(0,t.jsxs)(n.p,{children:["Parachain auctions were used by non-system parachains to access Polkadot. The current method is\nthrough purchase of ",(0,t.jsx)(n.a,{href:"#agile-coretime",children:"coretime"}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"aura",children:"Aura"}),"\n",(0,t.jsx)(n.p,{children:"Authority-based round-robin scheduling (AURA) provides a slot-based block authoring mechanism, where\na known set of authorities take turns producing blocks."}),"\n",(0,t.jsx)(n.h2,{id:"authority",children:"Authority"}),"\n",(0,t.jsxs)(n.p,{children:["An authority is a generic term for the role in a blockchain that can participate in the consensus\nmechanisms. In ",(0,t.jsx)(n.a,{href:"#grandpa-finality-gadget",children:"GRANDPA"}),", the authorities vote on chains they consider\nfinal. In BABE, the authorities are block producers. Authority sets can be chosen to be mechanisms\nsuch as Polkadot's NPoS algorithm."]}),"\n",(0,t.jsx)(n.h2,{id:"availability-cores",children:"Availability Cores"}),"\n",(0,t.jsx)(n.p,{children:"Slots used to process parachains. The runtime assigns each parachain to an availability core and\nvalidators can fetch information about the cores, such as parachain block candidates, by calling the\nappropriate Runtime API."}),"\n",(0,t.jsx)(n.h2,{id:"babe",children:"BABE"}),"\n",(0,t.jsx)(n.p,{children:"Blind Assignment for Blockchain Extension (BABE) is Polkadot's block production mechanism."}),"\n",(0,t.jsx)(n.h2,{id:"bitfield-array",children:"Bitfield Array"}),"\n",(0,t.jsxs)(n.p,{children:["A bitfield array contains single-bit values which indicate whether a ",(0,t.jsx)(n.a,{href:"#candidate",children:"candidate"})," is\navailable. The number of items is equal of to the number of\n",(0,t.jsx)(n.a,{href:"#availability-cores",children:"availability cores"})," and each bit represents a vote on the corresponding core\nin the given order."]}),"\n",(0,t.jsx)(n.h2,{id:"block",children:"Block"}),"\n",(0,t.jsx)(n.p,{children:"A collection of data, such as transactions, that together indicate a state transition of the\nblockchain."}),"\n",(0,t.jsx)(n.h2,{id:"blockspace",children:"Blockspace"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.a,{href:"https://polkadot.network/blog/blockspace-blockspace-ecosystems-how-polkadot-is-unlocking-the-full-potential-of-web3",children:"Blockspace"}),"\nis the capacity of a blockchain to finalize and commit operations. It represents a blockchain's\nsecurity, computing, and storage capability as an end product. Blockspace produced by different\nblockchains can vary in quality, availability, and flexibility. Polkadot has a\n",(0,t.jsx)(n.a,{href:"https://www.rob.tech/blog/polkadot-blockspace-over-blockchains/",children:"blockspace-centric architecture"}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"block-explorer",children:"Block Explorer"}),"\n",(0,t.jsx)(n.p,{children:"An application that allows a user to explore the different blocks on a blockchain."}),"\n",(0,t.jsx)(n.h2,{id:"blocks-nominations",children:"Blocks Nominations"}),"\n",(0,t.jsx)(n.p,{children:"This indicates that a validator does not currently allow any more nominations. This is controlled by\nthe validator."}),"\n",(0,t.jsx)(n.h2,{id:"bls",children:"BLS"}),"\n",(0,t.jsx)(n.p,{children:"Boneh-Lynn-Shacham (BLS) signatures have a slow signing, very slow verification, require slow and\nmuch less secure pairing friendly curves, and tend towards dangerous malleability. Yet, BLS permits\na diverse array of signature aggregation options far beyond any other known signature scheme, which\nmakes BLS a preferred scheme for voting in consensus algorithms and threshold signatures."}),"\n",(0,t.jsx)(n.h2,{id:"bonding",children:"Bonding"}),"\n",(0,t.jsx)(n.p,{children:'A process by which tokens can be "frozen" in exchange for some other benefit. For example, staking\nis a form of bonding for which you receive rewards in exchange for securing the network.'}),"\n",(0,t.jsx)(n.h2,{id:"bounty",children:(0,t.jsx)(n.a,{href:"/docs/learn-polkadot-opengov-treasury#bounties",children:"Bounty"})}),"\n",(0,t.jsx)(n.p,{children:"A mechanism that allows network participants to access treasury funding without going through the\nprocess of submitting an OpenGov referendum. Note that a bounty got funds through OpenGov in the\nfirst place, but the subsequent disbursement of those funds is controlled by curators based on\nachieved milestones by the recipient."}),"\n",(0,t.jsx)(n.h2,{id:"bridge",children:"Bridge"}),"\n",(0,t.jsx)(n.p,{children:"A parachain that acts as an intermediary between the relay chain and an external chain, in such a\nway that it appears to the relay chain that the external chain is a parachain (i.e., meets the\nnetwork Host's requirements of parachains). Bridges allow for interaction between other blockchains,\nsuch as Ethereum and Bitcoin, that are not natively compatible with the relay chain."}),"\n",(0,t.jsx)(n.h2,{id:"byzantine-fault-tolerance",children:"Byzantine Fault Tolerance"}),"\n",(0,t.jsx)(n.p,{children:"The property of a system that is tolerant of Byzantine faults; a system where not only may\nindividual subsystems fail, but it may not be clear if a particular subsystem has failed or not.\nThat is, different observers on the system may not agree on whether or not the system has failed.\nEnsuring Byzantine fault tolerance is an important part of developing any distributed system."}),"\n",(0,t.jsx)(n.h2,{id:"capacity",children:"Capacity"}),"\n",(0,t.jsx)(n.p,{children:"The maximum number of nominators signalling intent to nominate a validator (and thus could\npotentially actively nominate that validator in the next session)."}),"\n",(0,t.jsx)(n.h2,{id:"candidate",children:"Candidate"}),"\n",(0,t.jsx)(n.p,{children:"A candidate is a submitted parachain block to the relay chain validators. A parachain block stops\nbeing referred to as a candidate as soon it has been finalized."}),"\n",(0,t.jsx)(n.h2,{id:"collations",children:"Collations"}),"\n",(0,t.jsxs)(n.p,{children:["Parachain blocks or candidates that are being proposed to the relay chain validators. More\nspecifically, a collation is a ",(0,t.jsx)(n.a,{href:"https://spec.polkadot.network/#defn-collation",children:"data structure"})," which\ncontains the proposed parachain candidate, including an optional validation parachain Runtime update\nand upward messages."]}),"\n",(0,t.jsx)(n.h2,{id:"collator",children:"Collator"}),"\n",(0,t.jsx)(n.p,{children:"A node that maintains a parachain by collecting parachain transactions and producing state\ntransition proofs for the validators."}),"\n",(0,t.jsx)(n.h2,{id:"collectives",children:"Collectives"}),"\n",(0,t.jsxs)(n.p,{children:["The Polkadot Collectives parachain was added in\n",(0,t.jsx)(n.a,{href:"https://polkadot.polkassembly.io/referendum/81",children:"Referendum 81"})," and exists only on Polkadot (i.e.,\nthere is no Kusama equivalent). The Collectives chain hosts on-chain collectives that serve the\nPolkadot network, such as the ",(0,t.jsx)(n.a,{href:"#fellowship",children:"Fellowship"})," and ",(0,t.jsx)(n.a,{href:"#polkadot-alliance",children:"Polkadot Alliance"}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"commission",children:"Commission"}),"\n",(0,t.jsx)(n.p,{children:"Validators and nominators get paid from block production on the network, where validators can set a\nvariable commission rate, which is initially subtracted from the total rewards that validator is\nentitled to (for that period), where the commission determines the rate of distribution for the\nremaining rewards set out for the nominators that are backing that validator."}),"\n",(0,t.jsx)(n.h2,{id:"common-good-parachain",children:"Common Good (Parachain)"}),"\n",(0,t.jsxs)(n.p,{children:["See ",(0,t.jsx)(n.a,{href:"#system-parachains",children:"System Parachains"}),', which is generally preferred over the term "common\ngood".']}),"\n",(0,t.jsx)(n.h2,{id:"community-queue",children:"Community Queue"}),"\n",(0,t.jsx)(n.p,{children:"The queue for proposals originating from individual accounts (i.e. not the Council) which are\nwaiting to become referenda. Compare the External queue."}),"\n",(0,t.jsx)(n.h2,{id:"consensus",children:"Consensus"}),"\n",(0,t.jsxs)(n.p,{children:["The process of a group of entities to agree on a particular data value (such as the ordering and\nmakeup of blocks on a blockchain). There are a variety of algorithms used for determining consensus.\nThe consensus algorithm used by Polkadot is ",(0,t.jsx)(n.a,{href:"#grandpa-finality-gadget",children:"GRANDPA"}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"coretime",children:"Coretime"}),"\n",(0,t.jsx)(n.p,{children:"The time allocated for utilizing a core that can be purchased in bulk or on demand. It is measured\nin relay chain blocks."}),"\n",(0,t.jsx)(n.h2,{id:"crowdloan",children:"Crowdloan"}),"\n",(0,t.jsx)(n.p,{children:"A mechanism used in the past for potential parachains to temporarily source tokens to win an auction\nfor a relay chain core. Tokens gathered in this way were programmatically returned to the lender\nafter the lease period was over or the crowdloan period ended."}),"\n",(0,t.jsx)(n.h2,{id:"curator",children:"Curator"}),"\n",(0,t.jsx)(n.p,{children:"A person, group, or other entity charged with judging and verifying the successful completion of a\nBounty."}),"\n",(0,t.jsx)(n.h2,{id:"dapps",children:"Dapps"}),"\n",(0,t.jsx)(n.p,{children:"A generic term for a decentralized application, that is, one that runs as part of a distributed\nnetwork as opposed to being run on a specific system or set of systems."}),"\n",(0,t.jsx)(n.h2,{id:"dot",children:"DOT"}),"\n",(0,t.jsx)(n.p,{children:'The native token for Polkadot. DOT serves three purposes: network governance (allowing them to vote\non-chain upgrades and other exceptional events), general operation (rewarding good actors and\npunishing bad actors), and bonding (adding new parachains by "freezing" DOT while they are connected\nthe relay chain).'}),"\n",(0,t.jsx)(n.h2,{id:"duty-roster",children:"Duty Roster"}),"\n",(0,t.jsx)(n.p,{children:"A lookup table that specifies the job that a particular validator is required to do (i.e. attest to\nthe validity of a specific parachain). The duty roster routinely shuffles the validator set into\ndifferent subsets per parachain."}),"\n",(0,t.jsx)(n.h2,{id:"epoch",children:"Epoch"}),"\n",(0,t.jsxs)(n.p,{children:["An epoch is a time duration in the BABE protocol that is broken into smaller time slots. Each slot\nhas at least one slot leader who has the right to propose a block. In Kusama, it is the same\nduration as a ",(0,t.jsx)(n.a,{href:"#session",children:"session"}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"era",children:"Era"}),"\n",(0,t.jsx)(n.p,{children:"A (whole) number of sessions, which is the period that the validator set (and each validator's\nactive nominator set) is recalculated and where rewards are paid out."}),"\n",(0,t.jsx)(n.h2,{id:"equivocation",children:"Equivocation"}),"\n",(0,t.jsxs)(n.p,{children:["Providing conflicting information to the network. BABE equivocation entails creating multiple blocks\nin the same slot. ",(0,t.jsx)(n.a,{href:"#grandpa-finality-gadget",children:"GRANDPA"})," equivocation would consist of signing multiple\nconflicting chains."]}),"\n",(0,t.jsx)(n.h2,{id:"external-queue",children:"External Queue"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Not applicable to OpenGov."})," The queue for proposals originating with the Council which are\nwaiting to become referenda. Compare the Community queue."]}),"\n",(0,t.jsx)(n.h2,{id:"extrinsic",children:"Extrinsic"}),"\n",(0,t.jsxs)(n.p,{children:["A ",(0,t.jsx)(n.a,{href:"https://docs.substrate.io/reference/scale-codec/",children:"SCALE encoded"}),' array consisting of a version\nnumber, signature, and varying data types indicating the resulting runtime function to be called,\nincluding the parameters required for that function to be executed. These state changes are invoked\nfrom the outside world, i.e. they are not part of the system itself. Extrinsics can take two forms,\n"',(0,t.jsx)(n.a,{href:"#inherent",children:"inherents"}),'" and "',(0,t.jsx)(n.a,{href:"#transaction",children:"transactions"}),'". For more technical details see the\n',(0,t.jsx)(n.a,{href:"https://spec.polkadot.network/#id-extrinsics",children:"polkadot spec"})]}),"\n",(0,t.jsx)(n.h2,{id:"technical-fellowship",children:"Technical Fellowship"}),"\n",(0,t.jsx)(n.p,{children:"A mostly self-governing expert body with a primary goal of representing humans who embody and\ncontain the technical knowledge base of the Kusama and/or Polkadot networks and protocols."}),"\n",(0,t.jsx)(n.h2,{id:"finality",children:"Finality"}),"\n",(0,t.jsxs)(n.p,{children:['The property of a block that cannot be reverted. Generally, created blocks are not final until some\npoint in the future - perhaps never, in the case of "probabilistic finality". The relay chain uses a\ndeterministic finality gadget known as ',(0,t.jsx)(n.a,{href:"#grandpa-finality-gadget",children:"GRANDPA"}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"finality-gadget",children:"Finality Gadget"}),"\n",(0,t.jsx)(n.p,{children:"A mechanism that determines finality."}),"\n",(0,t.jsx)(n.h2,{id:"frame",children:"Frame"}),"\n",(0,t.jsx)(n.p,{children:"The collection of Substrate-provided pallets (Substrate Runtime Modules)."}),"\n",(0,t.jsx)(n.h2,{id:"genesis",children:"Genesis"}),"\n",(0,t.jsx)(n.p,{children:"The origin of a blockchain, also known as block 0. It can also be used to reference the initial\nstate of the blockchain at origination."}),"\n",(0,t.jsx)(n.admonition,{title:"Example",type:"note",children:(0,t.jsxs)(n.p,{children:["In the ",(0,t.jsx)(n.em,{children:"genesis"})," state Alice, Bob, and Charlie had 30 tokens each."]})}),"\n",(0,t.jsx)(n.h2,{id:"governance",children:"Governance"}),"\n",(0,t.jsx)(n.p,{children:"The process of determining what changes to the network are permissible, such as modifications to\ncode or movement of funds. The governance system is on-chain and revolves around stakeholder voting."}),"\n",(0,t.jsx)(n.h2,{id:"governance-council",children:"Governance Council"}),"\n",(0,t.jsx)(n.p,{children:'An on-chain entity that consists of several on-chain accounts (starting at 6, eventually moving to\nthe final value of 24). The Council can act as a representative for "passive" (non-voting)\nstakeholders. Council members have two main tasks: proposing referenda for the overall stakeholder\ngroup to vote on and cancelling malicious referenda.'}),"\n",(0,t.jsx)(n.h2,{id:"grandpa-finality-gadget",children:"GRANDPA Finality Gadget"}),"\n",(0,t.jsxs)(n.p,{children:["GHOST-based Recursive ANcestor Deriving Prefix Agreement. It is the finality gadget allows\nasynchronous, accountable, and safe finality to the blockchain. For an overview of GRANDPA, see\n",(0,t.jsx)(n.a,{href:"https://medium.com/polkadot-network/polkadot-proof-of-concept-3-a-better-consensus-algorithm-e81c380a2372",children:"this Medium post"}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"hard-fork",children:"Hard Fork"}),"\n",(0,t.jsx)(n.p,{children:"A permanent diversion of a blockchain occurs quickly due to a high priority change in a consensus\nrule. Clients who follow a hard fork always need to upgrade their clients to continue following the\nupgraded chain. Hard forks are considered permanent divergences of a chain for which non-upgraded\nclients are following consensus rules incompatible to the ones followed by upgraded clients."}),"\n",(0,t.jsx)(n.h2,{id:"hard-spoon",children:"Hard Spoon"}),"\n",(0,t.jsxs)(n.p,{children:['Defined by Jae Kwon of Cosmos as "a new chain that takes into account state from an existing chain;\nnot to compete, but to provide broad access." A non-contentious blockchain that inherits the state\nof the underlying blockchain and creates a new branch of ',(0,t.jsx)(n.em,{children:"the same blockchain"}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"horizontal-relay-routed-message-passing",children:"Horizontal Relay-routed Message Passing"}),"\n",(0,t.jsx)(n.p,{children:"Horizontal Relay-routed Message Passing, also known as HRMP, is a precursor to the complete XCMP\nimplementation, that mimics the same interface and semantics of XCMP. It is similar to XCMP except\nfor how it stores all messages in the relay chain storage, therefore making it more expensive and\ndemanding more resources than XCMP. The plan is to retire HRMP once the implementation of XCMP is\ncomplete."}),"\n",(0,t.jsx)(n.h2,{id:"inactive-nomination",children:"Inactive Nomination"}),"\n",(0,t.jsx)(n.p,{children:"A validator (or validators) that a nominator has selected to nominate, but is not actively\nvalidating this era. This type of nomination may become active in a future era."}),"\n",(0,t.jsx)(n.h2,{id:"inherent",children:"Inherent"}),"\n",(0,t.jsxs)(n.p,{children:['Extrinsics that are "inherently true." Inherents are not gossiped on the network and are put into\nblocks by the block author. They are not provably true the way that the desire to send funds is,\ntherefore they do not carry a signature. A blockchain\'s ',(0,t.jsx)(n.a,{href:"#runtime",children:"runtime"})," must have rules for\nvalidating inherents. For example, timestamps are inherents. They are validated by being within some\nmargin that each validator deems reasonable."]}),"\n",(0,t.jsx)(n.h2,{id:"injected-account",children:"Injected Account"}),"\n",(0,t.jsx)(n.p,{children:"An account that is not directly managed by the Polkadot UI but can be accessed through it, such as\naccounts controlled by the Polkadot-JS extension."}),"\n",(0,t.jsx)(n.h2,{id:"interoperability",children:"Interoperability"}),"\n",(0,t.jsx)(n.p,{children:'The ability for some sort of system to exchange and make use of information often compared to\n"cross-chain" technologies.'}),"\n",(0,t.jsx)(n.h2,{id:"keep-alive-check",children:"Keep-Alive Check"}),"\n",(0,t.jsx)(n.p,{children:"The keep-alive check is used to indicate whether or not a transfer can allow the sending account to\nbe reduced to less than the existential deposit, causing it to be reaped."}),"\n",(0,t.jsx)(n.h2,{id:"ksm",children:"KSM"}),"\n",(0,t.jsx)(n.p,{children:"The abbreviation for Kusama network tokens."}),"\n",(0,t.jsx)(n.h2,{id:"kusama",children:"Kusama"}),"\n",(0,t.jsxs)(n.p,{children:['The "canary network" for Polkadot. It consists of an early-release, unaudited version of the\nPolkadot software. It is ',(0,t.jsx)(n.strong,{children:"not"})," a ",(0,t.jsx)(n.a,{href:"#testnet",children:"testnet"})," - after the transition to NPoS, the network\nis entirely in the hands of the community (i.e., Kusama token holders)."]}),"\n",(0,t.jsx)(n.h2,{id:"lease-period",children:"Lease Period"}),"\n",(0,t.jsx)(n.p,{children:"A particular amount of time that a parachain for which the parachain can connect to the relay chain."}),"\n",(0,t.jsx)(n.h2,{id:"libp2p",children:"LIBP2P"}),"\n",(0,t.jsxs)(n.p,{children:["An open-source library for encrypted peer-to-peer communications and other networking functions.\nMore information at: ",(0,t.jsx)(n.a,{href:"https://libp2p.io/",children:"https://libp2p.io/"})]}),"\n",(0,t.jsx)(n.h2,{id:"liveness",children:"Liveness"}),"\n",(0,t.jsx)(n.p,{children:"The property of a distributed system is that it will eventually come to some sort of consensus. A\nsystem stuck in an infinite loop would not be considered live, even if computations are taking\nplace; a system that eventually provides a result, even if incorrect or it takes a long time, is\nconsidered to have liveness."}),"\n",(0,t.jsx)(n.h2,{id:"mainnet",children:"Mainnet"}),"\n",(0,t.jsx)(n.p,{children:'Short for "main network": the fully functional and acting chain that runs its own network.'}),"\n",(0,t.jsx)(n.h2,{id:"message",children:"Message"}),"\n",(0,t.jsxs)(n.p,{children:["In Polkadot's XCMP protocol, a ",(0,t.jsx)(n.em,{children:"message"})," is arbitrary data that is sent from one parachain (the\negress chain) to another (the ingress chain) through a channel and ensured delivery by the validator\nset."]}),"\n",(0,t.jsx)(n.h2,{id:"message-queue",children:"Message Queue"}),"\n",(0,t.jsxs)(n.p,{children:["In Polkadot's XCMP protocol, a ",(0,t.jsx)(n.em,{children:"message queue"})," is the list of messages waiting to be processed by a\nparticular receiving parachain over a channel."]}),"\n",(0,t.jsx)(n.h2,{id:"metadata",children:"Metadata"}),"\n",(0,t.jsx)(n.p,{children:"Data that includes information about other data, such as information about a specific transaction."}),"\n",(0,t.jsx)(n.h2,{id:"motion",children:"Motion"}),"\n",(0,t.jsx)(n.p,{children:'A motion is essentially a "referendum" or "decision" being considered by the Council. The Council\ncan vote on motions like approving Treasury Proposals or making proposals for the community to vote\non.'}),"\n",(0,t.jsx)(n.h2,{id:"next-session",children:"Next Session"}),"\n",(0,t.jsx)(n.p,{children:"This indicates that the validator will be a member of the active set in the next session."}),"\n",(0,t.jsx)(n.h2,{id:"node-explorer",children:"Node Explorer"}),"\n",(0,t.jsx)(n.p,{children:"A tool that gives you information about a node, such as the latest blocks sealed, finalized, and the\ncurrent chain state as known by that node."}),"\n",(0,t.jsx)(n.h2,{id:"nominated-proof-of-stake-npos",children:"Nominated Proof of Stake (NPoS)"}),"\n",(0,t.jsxs)(n.p,{children:["A Proof-of-Stake system where nominators back validators with their own stake as a show of faith in\nthe good behavior of the validator. Nominated Proof-of-Stake differs from the more generic concept\nDelegated Proof-of-Stake in that nominators are subject to loss of stake if they nominate a bad\nvalidator; delegators are not subject to loss of stake based on the behavior of the validator. Note\nthat some other blockchain technologies may use the term Delegated Proof-of-Stake, even if\ndelegators can be ",(0,t.jsx)(n.a,{href:"/docs/learn-offenses",children:"slashed"}),". Polkadot uses the Phragm\xe9n method to\nallocate stake to nominees."]}),"\n",(0,t.jsx)(n.h2,{id:"nominator",children:"Nominator"}),"\n",(0,t.jsx)(n.p,{children:"Accounts that select a set of validators to nominate by bonding their tokens. Nominators receive\nsome of the validators' rewards, but are also liable for slashing if their nominated validators\nmisbehave."}),"\n",(0,t.jsx)(n.h2,{id:"non-fungible-token-nft",children:"Non-fungible Token (NFT)"}),"\n",(0,t.jsx)(n.p,{children:"A non-fungible token is a token that does not hold the property of fungibility, which, in turn,\nmeans that it cannot be interchangeable and indistinguishable from other tokens. NFTs allow the\ntokenization of unique items and provide exclusive ownership for those tokens."}),"\n",(0,t.jsx)(n.h2,{id:"on-chain-governance",children:"On-chain Governance"}),"\n",(0,t.jsx)(n.p,{children:"A governance system of a blockchain that is controlled by mechanisms on the blockchain. On-chain\ngovernance allows decisions to be made transparently. Note that there are a variety of different\nalgorithms for making these decisions, such as simple majority voting, adaptive quorum biasing, or\nidentity-based quadratic voting."}),"\n",(0,t.jsx)(n.h2,{id:"polkadot-opengov",children:"Polkadot OpenGov"}),"\n",(0,t.jsxs)(n.p,{children:["Previously known as Governance v2 (Gov2) during early development,\n",(0,t.jsx)(n.a,{href:"../learn/learn-polkadot-opengov",children:"Polkadot OpenGov"})," serves as the current governance protocol for\nboth Kusama and Polkadot."]}),"\n",(0,t.jsx)(n.h2,{id:"origin",children:"Origin"}),"\n",(0,t.jsxs)(n.p,{children:["The initiator of an extrinsic. A simple origin would be the account that is sending a token to\nanother account. Polkadot also supports more complex origin types, such as the\n",(0,t.jsx)(n.a,{href:"#root-origin",children:"root origin"}),", from which privileged functions can be called."]}),"\n",(0,t.jsx)(n.h2,{id:"pallet",children:"Pallet"}),"\n",(0,t.jsxs)(n.p,{children:["A ",(0,t.jsx)(n.a,{href:"#substrate",children:"Substrate"})," runtime module."]}),"\n",(0,t.jsx)(n.h2,{id:"parachain",children:"Parachain"}),"\n",(0,t.jsx)(n.p,{children:'A blockchain that meets several characteristics that allow it to work within the confines of the\nnetwork Host. Also known as "parallelized chain". All parachains start their life-cycle as a\nparathread.'}),"\n",(0,t.jsx)(n.h2,{id:"parachain-development-kit-pdk",children:"Parachain Development Kit (PDK)"}),"\n",(0,t.jsxs)(n.p,{children:["Similar to an ",(0,t.jsx)(n.a,{href:"#sdk",children:"SDK"}),", parachain development kits (PDK) is a set of tools that make it easy for\ndevelopers to create Polkadot-compatible ",(0,t.jsx)(n.a,{href:"#parachain",children:"parachains"}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"paraid",children:"ParaID"}),"\n",(0,t.jsx)(n.p,{children:"A unique numeric (non-negative integer) identifier for a parachain."}),"\n",(0,t.jsx)(n.h2,{id:"parathread",children:"Parathread"}),"\n",(0,t.jsxs)(n.p,{children:['Historically, the term "parathread" has been used in two contexts: a chain registered with a\n',(0,t.jsx)(n.code,{children:"ParaID"})," on the ",(0,t.jsx)(n.a,{href:"#relay-chain",children:"relay chain"})," that has not yet become a parachain (i.e. not connected\nto a relay chain core), or as an on-demand parachain (i.e. a parachain using on-demand coretime)\nwhich does not produce blocks at regular intervals."]}),"\n",(0,t.jsx)(n.h2,{id:"parachain-registry",children:"Parachain Registry"}),"\n",(0,t.jsx)(n.p,{children:"A relatively simple database-like construct that holds both static and dynamic information on each\nchain."}),"\n",(0,t.jsx)(n.h2,{id:"parity-technologies",children:"Parity Technologies"}),"\n",(0,t.jsx)(n.p,{children:"A company, founded by Dr. Gavin Wood and Dr. Jutta Steiner, that is developing Substrate, Kusama and\nPolkadot. It has also released several other projects including Parity Ethereum and Parity Secret\nStore."}),"\n",(0,t.jsx)(n.h2,{id:"people-chain",children:"People Chain"}),"\n",(0,t.jsxs)(n.p,{children:["A ",(0,t.jsx)(n.a,{href:"#system-parachains",children:"system parachain"})," for identity management."]}),"\n",(0,t.jsx)(n.h2,{id:"polkadot",children:"Polkadot"}),"\n",(0,t.jsx)(n.p,{children:"A heterogeneous, multi-chain network allowing various blockchains of different characteristics to\nperform arbitrary, cross-chain communication under shared security."}),"\n",(0,t.jsx)(n.h2,{id:"polkadot-alliance",children:"Polkadot Alliance"}),"\n",(0,t.jsxs)(n.p,{children:["The Polkadot Alliance is an ",(0,t.jsx)(n.a,{href:"#collectives",children:"on-chain collective"})," founded by Acala, Astar, Interlay,\nKilt, Moonbeam, Phala, and Subscan, to establish standards and ethics for open-source development in\n",(0,t.jsx)(n.a,{href:"https://polkadot.polkassembly.io/referendum/94",children:"referendum #94"}),". It aims to support development\nstandards and expose bad actors within the ecosystems of Polkadot."]}),"\n",(0,t.jsx)(n.h2,{id:"host",children:"Host"}),"\n",(0,t.jsx)(n.p,{children:"The environment in which a runtime module can be executed. Parachains must support the network\nHost - external chains that do not will have to use a bridge. Previously known as the Polkadot\nRuntime Environment."}),"\n",(0,t.jsx)(n.h2,{id:"runtime-environment",children:"Runtime Environment"}),"\n",(0,t.jsxs)(n.p,{children:["The previous name for the Polkadot ",(0,t.jsx)(n.a,{href:"#polkadot-host",children:"Host"}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"paseo",children:"Paseo"}),"\n",(0,t.jsxs)(n.p,{children:["Paseo ",(0,t.jsx)(n.a,{href:"#testnet",children:"testnet"}),' provisions testing on Polkadot\'s "production" runtime, which means less\nchance of feature/code mismatch when developing parachain apps. Specifically, after the\n',(0,t.jsx)(n.a,{href:"#technical-fellowship",children:"Polkadot Technical fellowship"})," proposes a runtime upgrade for Polkadot, this\ntestnet is updated, giving a period where the testnet will be ahead of Polkadot to allow for\ntesting."]}),"\n",(0,t.jsx)(n.h2,{id:"preimage",children:"Preimage"}),"\n",(0,t.jsxs)(n.p,{children:["The on-chain proposals do not require the entire image of extrinsics and data (for instance the WASM\ncode, in case of upgrades) to be submitted, but would rather just need that image's hash. That\n",(0,t.jsx)(n.strong,{children:"preimage"})," can be submitted and stored on-chain against the hash later, upon the proposal's\ndispatch."]}),"\n",(0,t.jsx)(n.h2,{id:"proof-of-stake-pos",children:"Proof of Stake (PoS)"}),"\n",(0,t.jsx)(n.p,{children:"A method of selecting participation in a consensus system, in which participants are chosen based on\nhow many tokens they have at stake (at risk of loss due to misbehavior). Normally, Proof-of-Stake\nsystems limit the number of participants."}),"\n",(0,t.jsx)(n.h2,{id:"proof-of-validity",children:"Proof of Validity"}),"\n",(0,t.jsx)(n.p,{children:"A proof produced by parachain collators. Based on this proof and the parachain registry, a validator\ncan verify that a parachain has properly executed its state transition function. Proofs of Validity\ngo into the relay chain blocks."}),"\n",(0,t.jsx)(n.h2,{id:"proof-of-work-pow",children:"Proof of Work (PoW)"}),"\n",(0,t.jsx)(n.p,{children:"A method of selecting participants in a consensus system, typically the longest chain rule, in which\nparticipants try to solve a puzzle like finding a partial pre-image of a hash. Normally, a\nProof-of-Work system can have any number of participants."}),"\n",(0,t.jsx)(n.h2,{id:"proposal",children:"Proposal"}),"\n",(0,t.jsx)(n.p,{children:"A potential function call to be voted on in a referendum. Proposals can modify the behavior of the\nnetwork, from minor parameter tuning up to replacing the runtime code."}),"\n",(0,t.jsx)(n.h2,{id:"protocol",children:"Protocol"}),"\n",(0,t.jsx)(n.p,{children:"A system of rules that allows two or more entities of a communications system to transmit\ninformation. The protocol defines the rules, syntax, semantics, and synchronization of communication\nand possible recovery methods."}),"\n",(0,t.jsx)(n.h2,{id:"random-seed",children:"Random Seed"}),"\n",(0,t.jsxs)(n.p,{children:["A random seed is a pseudo-random number available on-chain. It is used in various places of the\nprotocol, most prominently in ",(0,t.jsx)(n.a,{href:"#babe",children:"BABE"}),", the block production mechanism."]}),"\n",(0,t.jsx)(n.h2,{id:"referendum",children:"Referendum"}),"\n",(0,t.jsx)(n.p,{children:"A vote on whether or not a proposal should be accepted by the network. Referenda may be initiated by\nthe Governance Council, by a member of the public, or as the result of a previous proposal.\nStakeholders vote on referenda, weighted by both the size of their stake (i.e. number of DOT held)\nand the amount of time they are willing to lock their tokens."}),"\n",(0,t.jsx)(n.h2,{id:"re-genesis",children:"Re-Genesis"}),"\n",(0,t.jsxs)(n.p,{children:["Re-Genesis is the process of exporting the current chain state, and creating a new chain that builds\non it. Re-Genesis will involve stop-the-world migration, which results in a period of time when no\nactual blocks are added to the blockchain. In a way, re-genesis can be viewed as a hard fork\nprocess. A formal design of Re-Genesis on Substrate is still under development -\n",(0,t.jsx)(n.a,{href:"https://github.com/paritytech/substrate/issues/7458",children:"Re-Genesis Rationale and Design"}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"relay-chain",children:"Relay Chain"}),"\n",(0,t.jsx)(n.p,{children:"The chain that coordinates consensus and communication between parachains (and external chains, via\nbridges)."}),"\n",(0,t.jsx)(n.h2,{id:"remarks",children:"Remarks"}),"\n",(0,t.jsxs)(n.p,{children:["Remarks are extrinsics with no effect. They provide additional information to external inputs,\nacting as ",(0,t.jsx)(n.em,{children:"notes"}),". Remarks are stored alongside block records and do not change the chain's storage;\nthe information is not stored in the chain's trie, but along blocks."]}),"\n",(0,t.jsx)(n.h2,{id:"rococo",children:"Rococo"}),"\n",(0,t.jsxs)(n.p,{children:["Rococo was a ",(0,t.jsx)(n.a,{href:"#testnet",children:"testnet"})," set aside for testing parachains, cumulus, and related technology.\nPlease refer to Paseo test network."]}),"\n",(0,t.jsx)(n.h2,{id:"root-origin",children:"Root Origin"}),"\n",(0,t.jsxs)(n.p,{children:["A system-level origin in ",(0,t.jsx)(n.a,{href:"#Substrate",children:"Substrate"}),". This is the highest privilege level and can be\nthought of as the superuser of the runtime origin. To learn about more raw origins in Substrate,\nvisit ",(0,t.jsx)(n.a,{href:"https://docs.substrate.io/main-docs/build/origins/",children:"Substrate Docs"})]}),"\n",(0,t.jsx)(n.h2,{id:"runtime",children:"Runtime"}),"\n",(0,t.jsx)(n.p,{children:"The state transition function of a blockchain. It defines a valid algorithm for determining the\nstate of the next block given the previous state."}),"\n",(0,t.jsx)(n.h2,{id:"runtime-module",children:"Runtime Module"}),"\n",(0,t.jsx)(n.p,{children:'A module that implements specific transition functions and features one might want to have in their\nruntime. Each module should have domain-specific logic. For example, a Balances module has logic to\ndeal with accounts and balances. In Substrate, modules are called "pallets".'}),"\n",(0,t.jsx)(n.h2,{id:"safety",children:"Safety"}),"\n",(0,t.jsxs)(n.p,{children:["The property of a distributed system indicating that a particular state transition will not be\nreverted. ",(0,t.jsx)(n.a,{href:"#grandpa-finality-gadget",children:"GRANDPA"})," provides ",(0,t.jsx)(n.em,{children:"deterministic"}),' safety. That is, for a state\nchanged marked as "safe" or "final", one would require a hard fork to revert that change.']}),"\n",(0,t.jsx)(n.h2,{id:"scalability",children:"Scalability"}),"\n",(0,t.jsx)(n.p,{children:"While an ambiguous concept, [blockchain] scalability can be understood as the ability for the\nnetwork to scale in capabilities (e.g. processing more transactions) when needed."}),"\n",(0,t.jsx)(n.h2,{id:"sealing",children:"Sealing"}),"\n",(0,t.jsx)(n.p,{children:"The process of adding a block to the relay chain. Note that finalization is a separate process -\nblocks are finalized sometime after they are sealed."}),"\n",(0,t.jsx)(n.h2,{id:"session",children:"Session"}),"\n",(0,t.jsx)(n.p,{children:"A session is a Substrate implementation term for a period that has a constant set of validators.\nValidators can only join or exit the validator set at a session change."}),"\n",(0,t.jsx)(n.h2,{id:"session-certificate",children:"Session Certificate"}),"\n",(0,t.jsx)(n.p,{children:"A message containing a signature on the concatenation of all the Session keys."}),"\n",(0,t.jsx)(n.h2,{id:"session-key",children:"Session Key"}),"\n",(0,t.jsxs)(n.p,{children:["Hot keys that are used for performing network operations by validators, for example, signing\n",(0,t.jsx)(n.a,{href:"#grandpa-finality-gadget",children:"GRANDPA"})," commit messages."]}),"\n",(0,t.jsx)(n.h2,{id:"shared-security",children:"Shared Security"}),"\n",(0,t.jsx)(n.p,{children:"The security model used whereby all chains are equally secured. This is achieved by placing proofs\nof the validity of parachain blocks into the relay chain such that, in order to revert finality of a\nsingle parachain, an attacker would need to attack the entire system."}),"\n",(0,t.jsx)(n.h2,{id:"slashing",children:"Slashing"}),"\n",(0,t.jsxs)(n.p,{children:["The removal of a percentage of an account's DOT as a punishment for a validator acting maliciously\nor incompetently. For more information, see the ",(0,t.jsx)(n.a,{href:"/docs/learn-offenses",children:"page about offenses"}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"soft-fork",children:"Soft Fork"}),"\n",(0,t.jsx)(n.p,{children:'A backward compatible change to client code causes upgraded clients to start mining a new chain.\nRequires a "vote-by-hashrate" of a majority of miners to enact successfully. Soft forks are\nconsidered temporary divergences in a chain since non-upgraded clients do not follow the new\nconsensus rules but upgraded clients are still compatible with old consensus rules.'}),"\n",(0,t.jsx)(n.h2,{id:"software-development-kit-sdk",children:"Software Development Kit (SDK)"}),"\n",(0,t.jsx)(n.p,{children:"A collection of software tools (and programs) packaged together that can be used to develop\nsoftware."}),"\n",(0,t.jsx)(n.h2,{id:"spend-period",children:"Spend Period"}),"\n",(0,t.jsxs)(n.p,{children:["Successfully enacted Treasury track referenda will get funded at the end of the\n",(0,t.jsx)(n.a,{href:"/docs/chain-state-values#treasury-spending-period",children:"spending period"}),". Treasury funds are directly\nsent to the beneficiary account at the end of the spend period."]}),"\n",(0,t.jsx)(n.h2,{id:"staking",children:"Staking"}),"\n",(0,t.jsx)(n.p,{children:'The act of bonding tokens by putting them up as "collateral" for a chance to produce a valid block\n(and thus obtain a block reward). Validators and nominators stake their tokens in order to secure\nthe network.'}),"\n",(0,t.jsx)(n.h2,{id:"state-transition-function",children:"State transition function"}),"\n",(0,t.jsx)(n.p,{children:"A function that describes how the state of a blockchain can be transformed. For example, it may\ndescribe how tokens can be transferred from one account to another."}),"\n",(0,t.jsx)(n.h2,{id:"substrate",children:"Substrate"}),"\n",(0,t.jsxs)(n.p,{children:["A modular framework for building blockchains. Polkadot is built using\n",(0,t.jsx)(n.a,{href:"https://substrate.io/",children:"Substrate"}),". Chains built with Substrate will be easy to connect as\nparachains. For developers, see the\n",(0,t.jsx)(n.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/substrate",children:"Substrate GitHub repository"}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"system-parachains",children:"System Parachains"}),"\n",(0,t.jsxs)(n.p,{children:["Parachains that are part of the Polkadot core protocol. These are allocated a parachain execution\ncore by governance rather than by coretime purchase. Examples of system parachains include\n",(0,t.jsx)(n.a,{href:"/docs/learn-assets",children:"Asset Hub"}),", ",(0,t.jsx)(n.a,{href:"/docs/learn-system-chains#bridge-hub",children:"Bridge Hub"}),",\n",(0,t.jsx)(n.a,{href:"/docs/learn-system-chains#collectives",children:"Collectives"})," and\n",(0,t.jsx)(n.a,{href:"/docs/learn-system-chains#people-chain",children:"People Chain"}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"tabling",children:"Tabling"}),"\n",(0,t.jsx)(n.p,{children:'In governance, bringing a proposal to a vote via referendum. Note that this is the British meaning\nof "tabling", which is different from the US version, which means "to postpone" a measure.'}),"\n",(0,t.jsx)(n.h2,{id:"teleport",children:"Teleport"}),"\n",(0,t.jsx)(n.p,{children:"Send an asset from an account on one chain to an account on a different chain. This occurs by\nburning an amount on the sending chain and minting an equivalent amount on the destination chain."}),"\n",(0,t.jsx)(n.h2,{id:"testnet",children:"Testnet"}),"\n",(0,t.jsxs)(n.p,{children:['Short for "test network": an experimental network where testing and development takes place.\nNetworks are often executed on a testnet before they are deployed to a ',(0,t.jsx)(n.a,{href:"#mainnet",children:"mainnet"}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"tokenization",children:"Tokenization"}),"\n",(0,t.jsx)(n.p,{children:"The process of replacing sensitive data with non-sensitive data."}),"\n",(0,t.jsx)(n.h2,{id:"tracks",children:"Tracks"}),"\n",(0,t.jsxs)(n.p,{children:["Each ",(0,t.jsx)(n.a,{href:"#origin",children:"Origin"})," is associated with a single referendum class and each class is associated\nwith a ",(0,t.jsx)(n.a,{href:"../maintain/maintain-guides-polkadot-opengov#origins-and-tracks",children:"Track"}),". The Track outlines\nthe lifecycle for the proposal and is independent from other class's tracks. Having independent\ntracks allows the network to tailor the dynamics of referenda based upon their implied privilege\nlevel."]}),"\n",(0,t.jsx)(n.h2,{id:"tranche",children:"Tranche"}),"\n",(0,t.jsxs)(n.p,{children:["Validators use a subjective, tick-based system to determine when the approval process should start.\nA validator starts the tick-based system when a new availability core candidates have been proposed,\nwhich can be retrieved via the\n",(0,t.jsx)(n.a,{href:"https://spec.polkadot.network/#sect-rt-api-availability-cores",children:"Runtime API"}),", and increments the\ntick every 500 milliseconds. Each tick/increment is referred to as a \u201ctranche\u201d, represented as an\ninteger, starting at 0."]}),"\n",(0,t.jsx)(n.h2,{id:"transfer",children:"Transfer"}),"\n",(0,t.jsx)(n.p,{children:"Send an asset from one account to another. This generally refers to transfers that occur only on the\nsame chain."}),"\n",(0,t.jsx)(n.h2,{id:"transaction",children:"Transaction"}),"\n",(0,t.jsx)(n.p,{children:'An extrinsic that is signed. Transactions are gossiped on the network and incur a transaction fee.\nTransactions are "provably true", unlike inherents. For example, one can prove that Alice wants to\nsend funds to Bob by the fact that she signed a transfer-funds message with her private key.'}),"\n",(0,t.jsx)(n.h2,{id:"validator",children:"Validator"}),"\n",(0,t.jsx)(n.p,{children:"A node that secures the relay chain by staking DOT, validating proofs from collators on parachains\nand voting on consensus along with other validators."}),"\n",(0,t.jsx)(n.h2,{id:"vertical-message-passing",children:"Vertical Message Passing"}),"\n",(0,t.jsxs)(n.p,{children:["Vertical message passing consists of two separate types of message passing, Downward Message Passing\n(DMP) and Upward Message Passing (UMP). Downward messages pass from the relay chain to a parachain,\nalthough they may also originate from another parachain via\n",(0,t.jsx)(n.a,{href:"#Horizontal-Relay-routed-Message-Passing",children:"HRMP"}),". Upward messages originate from parachains and go\nup to the relay chain via runtime entry points."]}),"\n",(0,t.jsx)(n.h2,{id:"voting",children:"Voting"}),"\n",(0,t.jsx)(n.p,{children:"The process of stakeholders determining whether or not a referendum should pass. Votes are weighted\nboth by the number of DOT that the stakeholder account controls and the amount of time they are\nwilling to lock their DOT."}),"\n",(0,t.jsx)(n.h2,{id:"waiting-nomination",children:"Waiting Nomination"}),"\n",(0,t.jsx)(n.p,{children:"The nominator has nominated this validator, but the validator was not elected into the active\nvalidator set this era and thus cannot produce blocks for the canonical chain. If the validator does\nget into the active set in a future era, this may turn into an active or inactive nomination."}),"\n",(0,t.jsx)(n.h2,{id:"wallet",children:"Wallet"}),"\n",(0,t.jsx)(n.p,{children:"A program that allows one to store private keys and sign transactions for Polkadot or other\nblockchain networks."}),"\n",(0,t.jsx)(n.h2,{id:"wasm",children:"Wasm"}),"\n",(0,t.jsxs)(n.p,{children:["The abbreviation for ",(0,t.jsx)(n.a,{href:"#webassembly",children:"WebAssembly"}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"watermark",children:"Watermark"}),"\n",(0,t.jsxs)(n.p,{children:["In Polkadot's parachain messaging scheme, the ",(0,t.jsx)(n.em,{children:"watermark"})," is the minimum processed send-height of\nthe receiving parachain. All messages on all channels that are sending to this parachain at or\nbefore the watermark are guaranteed to be processed."]}),"\n",(0,t.jsx)(n.h2,{id:"web3-foundation",children:"Web3 Foundation"}),"\n",(0,t.jsxs)(n.p,{children:["A Switzerland-based foundation that nurtures and stewards technologies and applications in the\nfields of decentralized web software protocols, particularly those that utilize modern cryptographic\nmethods to safeguard decentralization, to the benefit and for the stability of the\n",(0,t.jsx)(n.a,{href:"/docs/web3-and-polkadot",children:"Web3 ecosystem"}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"webassembly",children:"WebAssembly"}),"\n",(0,t.jsx)(n.p,{children:"An instruction format for a virtual, stack-based machine. Polkadot Runtime Modules are compiled to\nWebAssembly. Also known as Wasm."}),"\n",(0,t.jsx)(n.h2,{id:"weights",children:"Weights"}),"\n",(0,t.jsxs)(n.p,{children:["A permission-less system needs to implement a mechanism to measure and limit usage in order to\nestablish an economic incentive structure, to prevent the network overload, and to mitigate DoS\nvulnerabilities. This mechanism must enforce a limited time-window for block producers to create a\nblock and include limitations on block size, to prevent execution of certain extrinsics which are\ndeemed too expensive and could decelerate the network. This is handled by the weight system, where\nthe cost of the transactions (referred to as ",(0,t.jsx)(n.a,{href:"#extrinsic",children:"extrinsics"}),") are determined before\nexecution. Checkout this section of the Substrate docs covering\n",(0,t.jsx)(n.a,{href:"https://docs.substrate.io/build/tx-weights-fees/",children:"transaction weights and fees"}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"westend",children:"Westend"}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.a,{href:"#testnet",children:"testnet"})," is set aside for testing the Polkadot relay chain. Contrary to the\n",(0,t.jsx)(n.a,{href:"#paseo",children:"Paseo testnet"}),", the Westend testnet is used by the core developers to iterate on\nprotocol-level features like ",(0,t.jsx)(n.a,{href:"/docs/learn-async-backing",children:"asynchronous backing"}),", etc, that are\nnot relevant for parachain developers."]}),"\n",(0,t.jsx)(n.h2,{id:"witness",children:"Witness"}),"\n",(0,t.jsx)(n.p,{children:"Cryptographic proof statements of data validity."}),"\n",(0,t.jsx)(n.h2,{id:"whitelist-pallet",children:"Whitelist Pallet"}),"\n",(0,t.jsxs)(n.p,{children:["Allows one ",(0,t.jsx)(n.a,{href:"#origin",children:"Origin "})," to escalate the privilege level of another Origin for a certain\noperation. In terms of OpenGov, it allows the ",(0,t.jsx)(n.a,{href:"#fellowship",children:"Fellowship"})," to authorise a new origin\n(which we will call Whitelisted-Root) to be executed with Root-level privileges."]})]})}function h(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(d,{...e})}):d(e)}},47379:(e,n,a)=>{"use strict";a.d(n,{A:()=>p});var t=a(90675),i=a(10467),o=a(96540),s=a(19588),r=a(2026),l=a(11135);function c(e,n,a){return d.apply(this,arguments)}function d(){return(d=(0,i.A)((0,t.A)().mark((function e(n,a,i){var o,l,c,d,h;return(0,t.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=void 0,l=void 0,e.t0=n,e.next="polkadot"===e.t0?5:"kusama"===e.t0?7:"statemine"===e.t0?9:"statemint"===e.t0?11:"polkadotpeople"===e.t0?13:"kusamapeople"===e.t0?15:17;break;case 5:return o="wss://rpc.polkadot.io",e.abrupt("break",18);case 7:return o="wss://kusama-rpc.polkadot.io/",e.abrupt("break",18);case 9:return o="wss://statemine-rpc.polkadot.io/",e.abrupt("break",18);case 11:return o="wss://statemint-rpc.polkadot.io/",e.abrupt("break",18);case 13:return o="wss://polkadot-people-rpc.polkadot.io/",e.abrupt("break",18);case 15:return o="wss://kusama-people-rpc.polkadot.io/",e.abrupt("break",18);case 17:console.log("Unknown socket url provided, no connection made.");case 18:if(void 0!==o){e.next=22;break}return e.abrupt("return");case 22:return c=new s.E(o),e.next=25,r.G.create({provider:c});case 25:d=e.sent,(h=a.split(".")).forEach((function(e){e in d&&(d=d[e])})),e.t1=h[0],e.next="consts"===e.t1?31:"query"===e.t1?33:38;break;case 31:return l=d.toString(),e.abrupt("break",39);case 33:return e.next=35,d();case 35:return l=(l=e.sent).toString(),e.abrupt("break",39);case 38:console.log("Unknown path prefix ("+h[0]+") in "+a);case 39:return e.abrupt("return",l);case 40:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function h(e,n,a,t){switch(n){case"humanReadable":(0,l.HumanReadable)(e,a,t);break;case"precise":(0,l.Precise)(e,a,t);break;case"blocksToDays":(0,l.BlocksToDays)(e,t);break;case"erasToDays":(0,l.ErasToDays)(e,t,a);break;case"percentage":(0,l.Percentage)(e,t);break;case"permillToPercent":(0,l.PermillToPercent)(e,t);break;case"arrayLength":(0,l.ArrayLength)(e,t);break;default:return void console.log("Ignoring unknown filter type")}}const p=function(e){var n=e.network,a=e.path,s=e.defaultValue,r=e.filter,l=void 0===r?void 0:r,d=(0,o.useState)(""),p=d[0],u=d[1];return n=n.toLowerCase(),(0,o.useEffect)((function(){void 0!==l?h(s.toString(),l,n,u):u(s.toString());var e=void 0;switch(n){case"polkadot":e="wss://rpc.polkadot.io";break;case"kusama":e="wss://kusama-rpc.polkadot.io/";break;case"statemine":e="wss://kusama-asset-hub-rpc.polkadot.io/";break;case"statemint":e="wss://polkadot-asset-hub-rpc.polkadot.io/";break;case"kusamapeople":e="wss://kusama-people-rpc.polkadot.io";break;case"polkadotpeople":e="wss://polkadot-people-rpc.polkadot.io";break;default:console.log("Unknown network provided, "+n)}if(void 0===e)console.log("Failed to connect to a valid websocket, applying default");else{var o=function(){var e=(0,i.A)((0,t.A)().mark((function e(){var i;return(0,t.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,c(n,a,u);case 2:if(void 0!==(i=e.sent)){e.next=7;break}return e.abrupt("return");case 7:void 0!==l?h(i,l,n,u):u(i);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();try{o()}catch(r){console.log(r)}}}),[]),p}},11135:e=>{var n="polkadot",a="kusama",t="statemine",i="statemint",o="polkadotpeople",s="kusamapeople",r={polkadot:{precision:1e10,symbol:"DOT"},kusama:{precision:1e12,symbol:"KSM"},statemint:{precision:1e10,symbol:"DOT"},statemine:{precision:1e12,symbol:"KSM"},polkadotpeople:{precision:1e10,symbol:"DOT"},kusamapeople:{precision:1e12,symbol:"KSM"}};e.exports={HumanReadable:function(e,l,c){var d=void 0;if(l===n||l===i)d=3;else if(l===a||l===t||l===o)d=6;else{if(l!=s)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");d=8}e=parseFloat(e),c((e=Number.isInteger(e/r[l].precision)?e/r[l].precision+" "+r[l].symbol:(e/r[l].precision).toFixed(d)+" "+r[l].symbol).toString())},Precise:function(e,n,a){a(e=(e=parseFloat(e))/r[n].precision+" "+r[n].symbol)},BlocksToDays:function(e,n){n((e=6*e/86400).toString())},ErasToDays:function(e,r,l){var c=void 0;if(l===n||l===i||l==o)c=1;else{if(l!==a&&l!==t&&l!=s)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");c=4}r((e/=c).toString())},Percentage:function(e,n){n((e/=1e7).toString())},PermillToPercent:function(e,n){n((e/=1e4).toString())},ArrayLength:function(e,n){n((e=e.split(",").length).toString())}}},47790:()=>{}}]); \ No newline at end of file diff --git a/assets/js/493c7fdf.d2e30829.js b/assets/js/493c7fdf.d2e30829.js new file mode 100644 index 000000000000..78d2ea88b3ab --- /dev/null +++ b/assets/js/493c7fdf.d2e30829.js @@ -0,0 +1 @@ +(self.webpackChunk=self.webpackChunk||[]).push([[5053],{22798:(e,n,a)=>{"use strict";a.r(n),a.d(n,{assets:()=>l,contentTitle:()=>r,default:()=>h,frontMatter:()=>s,metadata:()=>t,toc:()=>c});const t=JSON.parse('{"id":"general/glossary","title":"Glossary","description":"Common Terms and Concepts in the Polkadot Ecosystem.","source":"@site/../docs/general/glossary.md","sourceDirName":"general","slug":"/glossary","permalink":"/docs/glossary","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/glossary.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1729152709000,"frontMatter":{"id":"glossary","title":"Glossary","sidebar_label":"Glossary","description":"Common Terms and Concepts in the Polkadot Ecosystem.","keywords":["glossary","questions","definitions"],"slug":"../glossary"},"sidebar":"docs","previous":{"title":"FAQ","permalink":"/docs/faq"},"next":{"title":"Basics","permalink":"/docs/learn-basics-index"}}');var i=a(74848),o=a(28453);a(47379);const s={id:"glossary",title:"Glossary",sidebar_label:"Glossary",description:"Common Terms and Concepts in the Polkadot Ecosystem.",keywords:["glossary","questions","definitions"],slug:"../glossary"},r=void 0,l={},c=[{value:"Active Nomination",id:"active-nomination",level:2},{value:"Alexander",id:"alexander",level:2},{value:"Asset Hub",id:"asset-hub",level:2},{value:"Attestation",id:"attestation",level:2},{value:"Auction (Parachain)",id:"auction-parachain",level:2},{value:"Aura",id:"aura",level:2},{value:"Authority",id:"authority",level:2},{value:"Availability Cores",id:"availability-cores",level:2},{value:"BABE",id:"babe",level:2},{value:"Bitfield Array",id:"bitfield-array",level:2},{value:"Block",id:"block",level:2},{value:"Blockspace",id:"blockspace",level:2},{value:"Block Explorer",id:"block-explorer",level:2},{value:"Blocks Nominations",id:"blocks-nominations",level:2},{value:"BLS",id:"bls",level:2},{value:"Bonding",id:"bonding",level:2},{value:"Bounty",id:"bounty",level:2},{value:"Bridge",id:"bridge",level:2},{value:"Byzantine Fault Tolerance",id:"byzantine-fault-tolerance",level:2},{value:"Capacity",id:"capacity",level:2},{value:"Candidate",id:"candidate",level:2},{value:"Collations",id:"collations",level:2},{value:"Collator",id:"collator",level:2},{value:"Collectives",id:"collectives",level:2},{value:"Commission",id:"commission",level:2},{value:"Common Good (Parachain)",id:"common-good-parachain",level:2},{value:"Community Queue",id:"community-queue",level:2},{value:"Consensus",id:"consensus",level:2},{value:"Coretime",id:"coretime",level:2},{value:"Crowdloan",id:"crowdloan",level:2},{value:"Curator",id:"curator",level:2},{value:"Dapps",id:"dapps",level:2},{value:"DOT",id:"dot",level:2},{value:"Duty Roster",id:"duty-roster",level:2},{value:"Epoch",id:"epoch",level:2},{value:"Era",id:"era",level:2},{value:"Equivocation",id:"equivocation",level:2},{value:"External Queue",id:"external-queue",level:2},{value:"Extrinsic",id:"extrinsic",level:2},{value:"Technical Fellowship",id:"technical-fellowship",level:2},{value:"Finality",id:"finality",level:2},{value:"Finality Gadget",id:"finality-gadget",level:2},{value:"Frame",id:"frame",level:2},{value:"Genesis",id:"genesis",level:2},{value:"Governance",id:"governance",level:2},{value:"Governance Council",id:"governance-council",level:2},{value:"GRANDPA Finality Gadget",id:"grandpa-finality-gadget",level:2},{value:"Hard Fork",id:"hard-fork",level:2},{value:"Hard Spoon",id:"hard-spoon",level:2},{value:"Horizontal Relay-routed Message Passing",id:"horizontal-relay-routed-message-passing",level:2},{value:"Inactive Nomination",id:"inactive-nomination",level:2},{value:"Inherent",id:"inherent",level:2},{value:"Injected Account",id:"injected-account",level:2},{value:"Interoperability",id:"interoperability",level:2},{value:"Keep-Alive Check",id:"keep-alive-check",level:2},{value:"KSM",id:"ksm",level:2},{value:"Kusama",id:"kusama",level:2},{value:"Lease Period",id:"lease-period",level:2},{value:"LIBP2P",id:"libp2p",level:2},{value:"Liveness",id:"liveness",level:2},{value:"Mainnet",id:"mainnet",level:2},{value:"Message",id:"message",level:2},{value:"Message Queue",id:"message-queue",level:2},{value:"Metadata",id:"metadata",level:2},{value:"Motion",id:"motion",level:2},{value:"Next Session",id:"next-session",level:2},{value:"Node Explorer",id:"node-explorer",level:2},{value:"Nominated Proof of Stake (NPoS)",id:"nominated-proof-of-stake-npos",level:2},{value:"Nominator",id:"nominator",level:2},{value:"Non-fungible Token (NFT)",id:"non-fungible-token-nft",level:2},{value:"On-chain Governance",id:"on-chain-governance",level:2},{value:"Polkadot OpenGov",id:"polkadot-opengov",level:2},{value:"Origin",id:"origin",level:2},{value:"Pallet",id:"pallet",level:2},{value:"Parachain",id:"parachain",level:2},{value:"Parachain Development Kit (PDK)",id:"parachain-development-kit-pdk",level:2},{value:"ParaID",id:"paraid",level:2},{value:"Parathread",id:"parathread",level:2},{value:"Parachain Registry",id:"parachain-registry",level:2},{value:"Parity Technologies",id:"parity-technologies",level:2},{value:"People Chain",id:"people-chain",level:2},{value:"Polkadot",id:"polkadot",level:2},{value:"Polkadot Alliance",id:"polkadot-alliance",level:2},{value:"Host",id:"host",level:2},{value:"Runtime Environment",id:"runtime-environment",level:2},{value:"Paseo",id:"paseo",level:2},{value:"Preimage",id:"preimage",level:2},{value:"Proof of Stake (PoS)",id:"proof-of-stake-pos",level:2},{value:"Proof of Validity",id:"proof-of-validity",level:2},{value:"Proof of Work (PoW)",id:"proof-of-work-pow",level:2},{value:"Proposal",id:"proposal",level:2},{value:"Protocol",id:"protocol",level:2},{value:"Random Seed",id:"random-seed",level:2},{value:"Referendum",id:"referendum",level:2},{value:"Re-Genesis",id:"re-genesis",level:2},{value:"Relay Chain",id:"relay-chain",level:2},{value:"Remarks",id:"remarks",level:2},{value:"Rococo",id:"rococo",level:2},{value:"Root Origin",id:"root-origin",level:2},{value:"Runtime",id:"runtime",level:2},{value:"Runtime Module",id:"runtime-module",level:2},{value:"Safety",id:"safety",level:2},{value:"Scalability",id:"scalability",level:2},{value:"Sealing",id:"sealing",level:2},{value:"Session",id:"session",level:2},{value:"Session Certificate",id:"session-certificate",level:2},{value:"Session Key",id:"session-key",level:2},{value:"Shared Security",id:"shared-security",level:2},{value:"Slashing",id:"slashing",level:2},{value:"Soft Fork",id:"soft-fork",level:2},{value:"Software Development Kit (SDK)",id:"software-development-kit-sdk",level:2},{value:"Spend Period",id:"spend-period",level:2},{value:"Staking",id:"staking",level:2},{value:"State transition function",id:"state-transition-function",level:2},{value:"Substrate",id:"substrate",level:2},{value:"System Parachains",id:"system-parachains",level:2},{value:"Tabling",id:"tabling",level:2},{value:"Teleport",id:"teleport",level:2},{value:"Testnet",id:"testnet",level:2},{value:"Tokenization",id:"tokenization",level:2},{value:"Tracks",id:"tracks",level:2},{value:"Tranche",id:"tranche",level:2},{value:"Transfer",id:"transfer",level:2},{value:"Transaction",id:"transaction",level:2},{value:"Validator",id:"validator",level:2},{value:"Vertical Message Passing",id:"vertical-message-passing",level:2},{value:"Voting",id:"voting",level:2},{value:"Waiting Nomination",id:"waiting-nomination",level:2},{value:"Wallet",id:"wallet",level:2},{value:"Wasm",id:"wasm",level:2},{value:"Watermark",id:"watermark",level:2},{value:"Web3 Foundation",id:"web3-foundation",level:2},{value:"WebAssembly",id:"webassembly",level:2},{value:"Weights",id:"weights",level:2},{value:"Westend",id:"westend",level:2},{value:"Witness",id:"witness",level:2},{value:"Whitelist Pallet",id:"whitelist-pallet",level:2}];function d(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",p:"p",strong:"strong",...(0,o.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h2,{id:"active-nomination",children:"Active Nomination"}),"\n",(0,i.jsx)(n.p,{children:"A validator (or validators) that a nominator has selected to nominate and is actively validating\nthis era. The nominator is placing their stake behind this validator for this era and will\npotentially receive staking rewards in return for doing so."}),"\n",(0,i.jsx)(n.h2,{id:"alexander",children:"Alexander"}),"\n",(0,i.jsxs)(n.p,{children:["The fourth (now defunct) proof of concept (PoC-4) ",(0,i.jsx)(n.a,{href:"#testnet",children:"testnet"})," for Polkadot."]}),"\n",(0,i.jsx)(n.h2,{id:"asset-hub",children:"Asset Hub"}),"\n",(0,i.jsx)(n.p,{children:"A system parachain used for asset management."}),"\n",(0,i.jsx)(n.h2,{id:"attestation",children:"Attestation"}),"\n",(0,i.jsxs)(n.p,{children:["In the network's validity system, an ",(0,i.jsx)(n.em,{children:"attestation"})," is a type of message that validators broadcast\nthat says whether they think a parachain candidate block is valid or invalid."]}),"\n",(0,i.jsx)(n.h2,{id:"auction-parachain",children:"Auction (Parachain)"}),"\n",(0,i.jsxs)(n.p,{children:["Parachain auctions were used by non-system parachains to access Polkadot. The current method is\nthrough purchase of ",(0,i.jsx)(n.a,{href:"#agile-coretime",children:"coretime"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"aura",children:"Aura"}),"\n",(0,i.jsx)(n.p,{children:"Authority-based round-robin scheduling (AURA) provides a slot-based block authoring mechanism, where\na known set of authorities take turns producing blocks."}),"\n",(0,i.jsx)(n.h2,{id:"authority",children:"Authority"}),"\n",(0,i.jsxs)(n.p,{children:["An authority is a generic term for the role in a blockchain that can participate in the consensus\nmechanisms. In ",(0,i.jsx)(n.a,{href:"#grandpa-finality-gadget",children:"GRANDPA"}),", the authorities vote on chains they consider\nfinal. In BABE, the authorities are block producers. Authority sets can be chosen to be mechanisms\nsuch as Polkadot's NPoS algorithm."]}),"\n",(0,i.jsx)(n.h2,{id:"availability-cores",children:"Availability Cores"}),"\n",(0,i.jsx)(n.p,{children:"Slots used to process parachains. The runtime assigns each parachain to an availability core and\nvalidators can fetch information about the cores, such as parachain block candidates, by calling the\nappropriate Runtime API."}),"\n",(0,i.jsx)(n.h2,{id:"babe",children:"BABE"}),"\n",(0,i.jsx)(n.p,{children:"Blind Assignment for Blockchain Extension (BABE) is Polkadot's block production mechanism."}),"\n",(0,i.jsx)(n.h2,{id:"bitfield-array",children:"Bitfield Array"}),"\n",(0,i.jsxs)(n.p,{children:["A bitfield array contains single-bit values which indicate whether a ",(0,i.jsx)(n.a,{href:"#candidate",children:"candidate"})," is\navailable. The number of items is equal of to the number of\n",(0,i.jsx)(n.a,{href:"#availability-cores",children:"availability cores"})," and each bit represents a vote on the corresponding core\nin the given order."]}),"\n",(0,i.jsx)(n.h2,{id:"block",children:"Block"}),"\n",(0,i.jsx)(n.p,{children:"A collection of data, such as transactions, that together indicate a state transition of the\nblockchain."}),"\n",(0,i.jsx)(n.h2,{id:"blockspace",children:"Blockspace"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.a,{href:"https://polkadot.network/blog/blockspace-blockspace-ecosystems-how-polkadot-is-unlocking-the-full-potential-of-web3",children:"Blockspace"}),"\nis the capacity of a blockchain to finalize and commit operations. It represents a blockchain's\nsecurity, computing, and storage capability as an end product. Blockspace produced by different\nblockchains can vary in quality, availability, and flexibility. Polkadot has a\n",(0,i.jsx)(n.a,{href:"https://www.rob.tech/blog/polkadot-blockspace-over-blockchains/",children:"blockspace-centric architecture"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"block-explorer",children:"Block Explorer"}),"\n",(0,i.jsx)(n.p,{children:"An application that allows a user to explore the different blocks on a blockchain."}),"\n",(0,i.jsx)(n.h2,{id:"blocks-nominations",children:"Blocks Nominations"}),"\n",(0,i.jsx)(n.p,{children:"This indicates that a validator does not currently allow any more nominations. This is controlled by\nthe validator."}),"\n",(0,i.jsx)(n.h2,{id:"bls",children:"BLS"}),"\n",(0,i.jsx)(n.p,{children:"Boneh-Lynn-Shacham (BLS) signatures have a slow signing, very slow verification, require slow and\nmuch less secure pairing friendly curves, and tend towards dangerous malleability. Yet, BLS permits\na diverse array of signature aggregation options far beyond any other known signature scheme, which\nmakes BLS a preferred scheme for voting in consensus algorithms and threshold signatures."}),"\n",(0,i.jsx)(n.h2,{id:"bonding",children:"Bonding"}),"\n",(0,i.jsx)(n.p,{children:'A process by which tokens can be "frozen" in exchange for some other benefit. For example, staking\nis a form of bonding for which you receive rewards in exchange for securing the network.'}),"\n",(0,i.jsx)(n.h2,{id:"bounty",children:(0,i.jsx)(n.a,{href:"/docs/learn-polkadot-opengov-treasury#bounties",children:"Bounty"})}),"\n",(0,i.jsx)(n.p,{children:"A mechanism that allows network participants to access treasury funding without going through the\nprocess of submitting an OpenGov referendum. Note that a bounty got funds through OpenGov in the\nfirst place, but the subsequent disbursement of those funds is controlled by curators based on\nachieved milestones by the recipient."}),"\n",(0,i.jsx)(n.h2,{id:"bridge",children:"Bridge"}),"\n",(0,i.jsx)(n.p,{children:"A parachain that acts as an intermediary between the relay chain and an external chain, in such a\nway that it appears to the relay chain that the external chain is a parachain (i.e., meets the\nnetwork Host's requirements of parachains). Bridges allow for interaction between other blockchains,\nsuch as Ethereum and Bitcoin, that are not natively compatible with the relay chain."}),"\n",(0,i.jsx)(n.h2,{id:"byzantine-fault-tolerance",children:"Byzantine Fault Tolerance"}),"\n",(0,i.jsx)(n.p,{children:"The property of a system that is tolerant of Byzantine faults; a system where not only may\nindividual subsystems fail, but it may not be clear if a particular subsystem has failed or not.\nThat is, different observers on the system may not agree on whether or not the system has failed.\nEnsuring Byzantine fault tolerance is an important part of developing any distributed system."}),"\n",(0,i.jsx)(n.h2,{id:"capacity",children:"Capacity"}),"\n",(0,i.jsx)(n.p,{children:"The maximum number of nominators signalling intent to nominate a validator (and thus could\npotentially actively nominate that validator in the next session)."}),"\n",(0,i.jsx)(n.h2,{id:"candidate",children:"Candidate"}),"\n",(0,i.jsx)(n.p,{children:"A candidate is a submitted parachain block to the relay chain validators. A parachain block stops\nbeing referred to as a candidate as soon it has been finalized."}),"\n",(0,i.jsx)(n.h2,{id:"collations",children:"Collations"}),"\n",(0,i.jsxs)(n.p,{children:["Parachain blocks or candidates that are being proposed to the relay chain validators. More\nspecifically, a collation is a ",(0,i.jsx)(n.a,{href:"https://spec.polkadot.network/#defn-collation",children:"data structure"})," which\ncontains the proposed parachain candidate, including an optional validation parachain Runtime update\nand upward messages."]}),"\n",(0,i.jsx)(n.h2,{id:"collator",children:"Collator"}),"\n",(0,i.jsx)(n.p,{children:"A node that maintains a parachain by collecting parachain transactions and producing state\ntransition proofs for the validators."}),"\n",(0,i.jsx)(n.h2,{id:"collectives",children:"Collectives"}),"\n",(0,i.jsxs)(n.p,{children:["The Polkadot Collectives parachain was added in\n",(0,i.jsx)(n.a,{href:"https://polkadot.polkassembly.io/referendum/81",children:"Referendum 81"})," and exists only on Polkadot (i.e.,\nthere is no Kusama equivalent). The Collectives chain hosts on-chain collectives that serve the\nPolkadot network, such as the ",(0,i.jsx)(n.a,{href:"#fellowship",children:"Fellowship"})," and ",(0,i.jsx)(n.a,{href:"#polkadot-alliance",children:"Polkadot Alliance"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"commission",children:"Commission"}),"\n",(0,i.jsx)(n.p,{children:"Validators and nominators get paid from block production on the network, where validators can set a\nvariable commission rate, which is initially subtracted from the total rewards that validator is\nentitled to (for that period), where the commission determines the rate of distribution for the\nremaining rewards set out for the nominators that are backing that validator."}),"\n",(0,i.jsx)(n.h2,{id:"common-good-parachain",children:"Common Good (Parachain)"}),"\n",(0,i.jsxs)(n.p,{children:["See ",(0,i.jsx)(n.a,{href:"#system-parachains",children:"System Parachains"}),', which is generally preferred over the term "common\ngood".']}),"\n",(0,i.jsx)(n.h2,{id:"community-queue",children:"Community Queue"}),"\n",(0,i.jsx)(n.p,{children:"The queue for proposals originating from individual accounts (i.e. not the Council) which are\nwaiting to become referenda. Compare the External queue."}),"\n",(0,i.jsx)(n.h2,{id:"consensus",children:"Consensus"}),"\n",(0,i.jsxs)(n.p,{children:["The process of a group of entities to agree on a particular data value (such as the ordering and\nmakeup of blocks on a blockchain). There are a variety of algorithms used for determining consensus.\nThe consensus algorithm used by Polkadot is ",(0,i.jsx)(n.a,{href:"#grandpa-finality-gadget",children:"GRANDPA"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"coretime",children:"Coretime"}),"\n",(0,i.jsx)(n.p,{children:"The time allocated for utilizing a core that can be purchased in bulk or on demand. It is measured\nin relay chain blocks."}),"\n",(0,i.jsx)(n.h2,{id:"crowdloan",children:"Crowdloan"}),"\n",(0,i.jsx)(n.p,{children:"A mechanism used in the past for potential parachains to temporarily source tokens to win an auction\nfor a relay chain core. Tokens gathered in this way were programmatically returned to the lender\nafter the lease period was over or the crowdloan period ended."}),"\n",(0,i.jsx)(n.h2,{id:"curator",children:"Curator"}),"\n",(0,i.jsx)(n.p,{children:"A person, group, or other entity charged with judging and verifying the successful completion of a\nBounty."}),"\n",(0,i.jsx)(n.h2,{id:"dapps",children:"Dapps"}),"\n",(0,i.jsx)(n.p,{children:"A generic term for a decentralized application, that is, one that runs as part of a distributed\nnetwork as opposed to being run on a specific system or set of systems."}),"\n",(0,i.jsx)(n.h2,{id:"dot",children:"DOT"}),"\n",(0,i.jsx)(n.p,{children:'The native token for Polkadot. DOT serves three purposes: network governance (allowing them to vote\non-chain upgrades and other exceptional events), general operation (rewarding good actors and\npunishing bad actors), and bonding (adding new parachains by "freezing" DOT while they are connected\nthe relay chain).'}),"\n",(0,i.jsx)(n.h2,{id:"duty-roster",children:"Duty Roster"}),"\n",(0,i.jsx)(n.p,{children:"A lookup table that specifies the job that a particular validator is required to do (i.e. attest to\nthe validity of a specific parachain). The duty roster routinely shuffles the validator set into\ndifferent subsets per parachain."}),"\n",(0,i.jsx)(n.h2,{id:"epoch",children:"Epoch"}),"\n",(0,i.jsxs)(n.p,{children:["An epoch is a time duration in the BABE protocol that is broken into smaller time slots. Each slot\nhas at least one slot leader who has the right to propose a block. In Kusama, it is the same\nduration as a ",(0,i.jsx)(n.a,{href:"#session",children:"session"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"era",children:"Era"}),"\n",(0,i.jsx)(n.p,{children:"A (whole) number of sessions, which is the period that the validator set (and each validator's\nactive nominator set) is recalculated and where rewards are paid out."}),"\n",(0,i.jsx)(n.h2,{id:"equivocation",children:"Equivocation"}),"\n",(0,i.jsxs)(n.p,{children:["Providing conflicting information to the network. BABE equivocation entails creating multiple blocks\nin the same slot. ",(0,i.jsx)(n.a,{href:"#grandpa-finality-gadget",children:"GRANDPA"})," equivocation would consist of signing multiple\nconflicting chains."]}),"\n",(0,i.jsx)(n.h2,{id:"external-queue",children:"External Queue"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Not applicable to OpenGov."})," The queue for proposals originating with the Council which are\nwaiting to become referenda. Compare the Community queue."]}),"\n",(0,i.jsx)(n.h2,{id:"extrinsic",children:"Extrinsic"}),"\n",(0,i.jsxs)(n.p,{children:["A ",(0,i.jsx)(n.a,{href:"https://docs.substrate.io/reference/scale-codec/",children:"SCALE encoded"}),' array consisting of a version\nnumber, signature, and varying data types indicating the resulting runtime function to be called,\nincluding the parameters required for that function to be executed. These state changes are invoked\nfrom the outside world, i.e. they are not part of the system itself. Extrinsics can take two forms,\n"',(0,i.jsx)(n.a,{href:"#inherent",children:"inherents"}),'" and "',(0,i.jsx)(n.a,{href:"#transaction",children:"transactions"}),'". For more technical details see the\n',(0,i.jsx)(n.a,{href:"https://spec.polkadot.network/#id-extrinsics",children:"polkadot spec"})]}),"\n",(0,i.jsx)(n.h2,{id:"technical-fellowship",children:"Technical Fellowship"}),"\n",(0,i.jsx)(n.p,{children:"A mostly self-governing expert body with a primary goal of representing humans who embody and\ncontain the technical knowledge base of the Kusama and/or Polkadot networks and protocols."}),"\n",(0,i.jsx)(n.h2,{id:"finality",children:"Finality"}),"\n",(0,i.jsxs)(n.p,{children:['The property of a block that cannot be reverted. Generally, created blocks are not final until some\npoint in the future - perhaps never, in the case of "probabilistic finality". The relay chain uses a\ndeterministic finality gadget known as ',(0,i.jsx)(n.a,{href:"#grandpa-finality-gadget",children:"GRANDPA"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"finality-gadget",children:"Finality Gadget"}),"\n",(0,i.jsx)(n.p,{children:"A mechanism that determines finality."}),"\n",(0,i.jsx)(n.h2,{id:"frame",children:"Frame"}),"\n",(0,i.jsx)(n.p,{children:"The collection of Substrate-provided pallets (Substrate Runtime Modules)."}),"\n",(0,i.jsx)(n.h2,{id:"genesis",children:"Genesis"}),"\n",(0,i.jsx)(n.p,{children:"The origin of a blockchain, also known as block 0. It can also be used to reference the initial\nstate of the blockchain at origination."}),"\n",(0,i.jsx)(n.admonition,{title:"Example",type:"note",children:(0,i.jsxs)(n.p,{children:["In the ",(0,i.jsx)(n.em,{children:"genesis"})," state Alice, Bob, and Charlie had 30 tokens each."]})}),"\n",(0,i.jsx)(n.h2,{id:"governance",children:"Governance"}),"\n",(0,i.jsx)(n.p,{children:"The process of determining what changes to the network are permissible, such as modifications to\ncode or movement of funds. The governance system is on-chain and revolves around stakeholder voting."}),"\n",(0,i.jsx)(n.h2,{id:"governance-council",children:"Governance Council"}),"\n",(0,i.jsx)(n.p,{children:'An on-chain entity that consists of several on-chain accounts (starting at 6, eventually moving to\nthe final value of 24). The Council can act as a representative for "passive" (non-voting)\nstakeholders. Council members have two main tasks: proposing referenda for the overall stakeholder\ngroup to vote on and cancelling malicious referenda.'}),"\n",(0,i.jsx)(n.h2,{id:"grandpa-finality-gadget",children:"GRANDPA Finality Gadget"}),"\n",(0,i.jsxs)(n.p,{children:["GHOST-based Recursive ANcestor Deriving Prefix Agreement. It is the finality gadget allows\nasynchronous, accountable, and safe finality to the blockchain. For an overview of GRANDPA, see\n",(0,i.jsx)(n.a,{href:"https://medium.com/polkadot-network/polkadot-proof-of-concept-3-a-better-consensus-algorithm-e81c380a2372",children:"this Medium post"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"hard-fork",children:"Hard Fork"}),"\n",(0,i.jsx)(n.p,{children:"A permanent diversion of a blockchain occurs quickly due to a high priority change in a consensus\nrule. Clients who follow a hard fork always need to upgrade their clients to continue following the\nupgraded chain. Hard forks are considered permanent divergences of a chain for which non-upgraded\nclients are following consensus rules incompatible to the ones followed by upgraded clients."}),"\n",(0,i.jsx)(n.h2,{id:"hard-spoon",children:"Hard Spoon"}),"\n",(0,i.jsxs)(n.p,{children:['Defined by Jae Kwon of Cosmos as "a new chain that takes into account state from an existing chain;\nnot to compete, but to provide broad access." A non-contentious blockchain that inherits the state\nof the underlying blockchain and creates a new branch of ',(0,i.jsx)(n.em,{children:"the same blockchain"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"horizontal-relay-routed-message-passing",children:"Horizontal Relay-routed Message Passing"}),"\n",(0,i.jsx)(n.p,{children:"Horizontal Relay-routed Message Passing, also known as HRMP, is a precursor to the complete XCMP\nimplementation, that mimics the same interface and semantics of XCMP. It is similar to XCMP except\nfor how it stores all messages in the relay chain storage, therefore making it more expensive and\ndemanding more resources than XCMP. The plan is to retire HRMP once the implementation of XCMP is\ncomplete."}),"\n",(0,i.jsx)(n.h2,{id:"inactive-nomination",children:"Inactive Nomination"}),"\n",(0,i.jsx)(n.p,{children:"A validator (or validators) that a nominator has selected to nominate, but is not actively\nvalidating this era. This type of nomination may become active in a future era."}),"\n",(0,i.jsx)(n.h2,{id:"inherent",children:"Inherent"}),"\n",(0,i.jsxs)(n.p,{children:['Extrinsics that are "inherently true." Inherents are not gossiped on the network and are put into\nblocks by the block author. They are not provably true the way that the desire to send funds is,\ntherefore they do not carry a signature. A blockchain\'s ',(0,i.jsx)(n.a,{href:"#runtime",children:"runtime"})," must have rules for\nvalidating inherents. For example, timestamps are inherents. They are validated by being within some\nmargin that each validator deems reasonable."]}),"\n",(0,i.jsx)(n.h2,{id:"injected-account",children:"Injected Account"}),"\n",(0,i.jsx)(n.p,{children:"An account that is not directly managed by the Polkadot UI but can be accessed through it, such as\naccounts controlled by the Polkadot-JS extension."}),"\n",(0,i.jsx)(n.h2,{id:"interoperability",children:"Interoperability"}),"\n",(0,i.jsx)(n.p,{children:'The ability for some sort of system to exchange and make use of information often compared to\n"cross-chain" technologies.'}),"\n",(0,i.jsx)(n.h2,{id:"keep-alive-check",children:"Keep-Alive Check"}),"\n",(0,i.jsx)(n.p,{children:"The keep-alive check is used to indicate whether or not a transfer can allow the sending account to\nbe reduced to less than the existential deposit, causing it to be reaped."}),"\n",(0,i.jsx)(n.h2,{id:"ksm",children:"KSM"}),"\n",(0,i.jsx)(n.p,{children:"The abbreviation for Kusama network tokens."}),"\n",(0,i.jsx)(n.h2,{id:"kusama",children:"Kusama"}),"\n",(0,i.jsxs)(n.p,{children:['The "canary network" for Polkadot. It consists of an early-release, unaudited version of the\nPolkadot software. It is ',(0,i.jsx)(n.strong,{children:"not"})," a ",(0,i.jsx)(n.a,{href:"#testnet",children:"testnet"})," - after the transition to NPoS, the network\nis entirely in the hands of the community (i.e., Kusama token holders)."]}),"\n",(0,i.jsx)(n.h2,{id:"lease-period",children:"Lease Period"}),"\n",(0,i.jsx)(n.p,{children:"A particular amount of time that a parachain for which the parachain can connect to the relay chain."}),"\n",(0,i.jsx)(n.h2,{id:"libp2p",children:"LIBP2P"}),"\n",(0,i.jsxs)(n.p,{children:["An open-source library for encrypted peer-to-peer communications and other networking functions.\nMore information at: ",(0,i.jsx)(n.a,{href:"https://libp2p.io/",children:"https://libp2p.io/"})]}),"\n",(0,i.jsx)(n.h2,{id:"liveness",children:"Liveness"}),"\n",(0,i.jsx)(n.p,{children:"The property of a distributed system is that it will eventually come to some sort of consensus. A\nsystem stuck in an infinite loop would not be considered live, even if computations are taking\nplace; a system that eventually provides a result, even if incorrect or it takes a long time, is\nconsidered to have liveness."}),"\n",(0,i.jsx)(n.h2,{id:"mainnet",children:"Mainnet"}),"\n",(0,i.jsx)(n.p,{children:'Short for "main network": the fully functional and acting chain that runs its own network.'}),"\n",(0,i.jsx)(n.h2,{id:"message",children:"Message"}),"\n",(0,i.jsxs)(n.p,{children:["In Polkadot's XCMP protocol, a ",(0,i.jsx)(n.em,{children:"message"})," is arbitrary data that is sent from one parachain (the\negress chain) to another (the ingress chain) through a channel and ensured delivery by the validator\nset."]}),"\n",(0,i.jsx)(n.h2,{id:"message-queue",children:"Message Queue"}),"\n",(0,i.jsxs)(n.p,{children:["In Polkadot's XCMP protocol, a ",(0,i.jsx)(n.em,{children:"message queue"})," is the list of messages waiting to be processed by a\nparticular receiving parachain over a channel."]}),"\n",(0,i.jsx)(n.h2,{id:"metadata",children:"Metadata"}),"\n",(0,i.jsx)(n.p,{children:"Data that includes information about other data, such as information about a specific transaction."}),"\n",(0,i.jsx)(n.h2,{id:"motion",children:"Motion"}),"\n",(0,i.jsx)(n.p,{children:'A motion is essentially a "referendum" or "decision" being considered by the Council. The Council\ncan vote on motions like approving Treasury Proposals or making proposals for the community to vote\non.'}),"\n",(0,i.jsx)(n.h2,{id:"next-session",children:"Next Session"}),"\n",(0,i.jsx)(n.p,{children:"This indicates that the validator will be a member of the active set in the next session."}),"\n",(0,i.jsx)(n.h2,{id:"node-explorer",children:"Node Explorer"}),"\n",(0,i.jsx)(n.p,{children:"A tool that gives you information about a node, such as the latest blocks sealed, finalized, and the\ncurrent chain state as known by that node."}),"\n",(0,i.jsx)(n.h2,{id:"nominated-proof-of-stake-npos",children:"Nominated Proof of Stake (NPoS)"}),"\n",(0,i.jsxs)(n.p,{children:["A Proof-of-Stake system where nominators back validators with their own stake as a show of faith in\nthe good behavior of the validator. Nominated Proof-of-Stake differs from the more generic concept\nDelegated Proof-of-Stake in that nominators are subject to loss of stake if they nominate a bad\nvalidator; delegators are not subject to loss of stake based on the behavior of the validator. Note\nthat some other blockchain technologies may use the term Delegated Proof-of-Stake, even if\ndelegators can be ",(0,i.jsx)(n.a,{href:"/docs/learn-offenses",children:"slashed"}),". Polkadot uses the Phragm\xe9n method to\nallocate stake to nominees."]}),"\n",(0,i.jsx)(n.h2,{id:"nominator",children:"Nominator"}),"\n",(0,i.jsx)(n.p,{children:"Accounts that select a set of validators to nominate by bonding their tokens. Nominators receive\nsome of the validators' rewards, but are also liable for slashing if their nominated validators\nmisbehave."}),"\n",(0,i.jsx)(n.h2,{id:"non-fungible-token-nft",children:"Non-fungible Token (NFT)"}),"\n",(0,i.jsx)(n.p,{children:"A non-fungible token is a token that does not hold the property of fungibility, which, in turn,\nmeans that it cannot be interchangeable and indistinguishable from other tokens. NFTs allow the\ntokenization of unique items and provide exclusive ownership for those tokens."}),"\n",(0,i.jsx)(n.h2,{id:"on-chain-governance",children:"On-chain Governance"}),"\n",(0,i.jsx)(n.p,{children:"A governance system of a blockchain that is controlled by mechanisms on the blockchain. On-chain\ngovernance allows decisions to be made transparently. Note that there are a variety of different\nalgorithms for making these decisions, such as simple majority voting, adaptive quorum biasing, or\nidentity-based quadratic voting."}),"\n",(0,i.jsx)(n.h2,{id:"polkadot-opengov",children:"Polkadot OpenGov"}),"\n",(0,i.jsxs)(n.p,{children:["Previously known as Governance v2 (Gov2) during early development,\n",(0,i.jsx)(n.a,{href:"../learn/learn-polkadot-opengov",children:"Polkadot OpenGov"})," serves as the current governance protocol for\nboth Kusama and Polkadot."]}),"\n",(0,i.jsx)(n.h2,{id:"origin",children:"Origin"}),"\n",(0,i.jsxs)(n.p,{children:["The initiator of an extrinsic. A simple origin would be the account that is sending a token to\nanother account. Polkadot also supports more complex origin types, such as the\n",(0,i.jsx)(n.a,{href:"#root-origin",children:"root origin"}),", from which privileged functions can be called."]}),"\n",(0,i.jsx)(n.h2,{id:"pallet",children:"Pallet"}),"\n",(0,i.jsxs)(n.p,{children:["A ",(0,i.jsx)(n.a,{href:"#substrate",children:"Substrate"})," runtime module."]}),"\n",(0,i.jsx)(n.h2,{id:"parachain",children:"Parachain"}),"\n",(0,i.jsx)(n.p,{children:'A blockchain that meets several characteristics that allow it to work within the confines of the\nnetwork Host. Also known as "parallelized chain". All parachains start their life-cycle as a\nparathread.'}),"\n",(0,i.jsx)(n.h2,{id:"parachain-development-kit-pdk",children:"Parachain Development Kit (PDK)"}),"\n",(0,i.jsxs)(n.p,{children:["Similar to an ",(0,i.jsx)(n.a,{href:"#sdk",children:"SDK"}),", parachain development kits (PDK) is a set of tools that make it easy for\ndevelopers to create Polkadot-compatible ",(0,i.jsx)(n.a,{href:"#parachain",children:"parachains"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"paraid",children:"ParaID"}),"\n",(0,i.jsx)(n.p,{children:"A unique numeric (non-negative integer) identifier for a parachain."}),"\n",(0,i.jsx)(n.h2,{id:"parathread",children:"Parathread"}),"\n",(0,i.jsxs)(n.p,{children:['Historically, the term "parathread" has been used in two contexts: a chain registered with a\n',(0,i.jsx)(n.code,{children:"ParaID"})," on the ",(0,i.jsx)(n.a,{href:"#relay-chain",children:"relay chain"})," that has not yet become a parachain (i.e. not connected\nto a relay chain core), or as an on-demand parachain (i.e. a parachain using on-demand coretime)\nwhich does not produce blocks at regular intervals."]}),"\n",(0,i.jsx)(n.h2,{id:"parachain-registry",children:"Parachain Registry"}),"\n",(0,i.jsx)(n.p,{children:"A relatively simple database-like construct that holds both static and dynamic information on each\nchain."}),"\n",(0,i.jsx)(n.h2,{id:"parity-technologies",children:"Parity Technologies"}),"\n",(0,i.jsx)(n.p,{children:"A company, founded by Dr. Gavin Wood and Dr. Jutta Steiner, that is developing Substrate, Kusama and\nPolkadot. It has also released several other projects including Parity Ethereum and Parity Secret\nStore."}),"\n",(0,i.jsx)(n.h2,{id:"people-chain",children:"People Chain"}),"\n",(0,i.jsxs)(n.p,{children:["A ",(0,i.jsx)(n.a,{href:"#system-parachains",children:"system parachain"})," for identity management."]}),"\n",(0,i.jsx)(n.h2,{id:"polkadot",children:"Polkadot"}),"\n",(0,i.jsx)(n.p,{children:"A heterogeneous, multi-chain network allowing various blockchains of different characteristics to\nperform arbitrary, cross-chain communication under shared security."}),"\n",(0,i.jsx)(n.h2,{id:"polkadot-alliance",children:"Polkadot Alliance"}),"\n",(0,i.jsxs)(n.p,{children:["The Polkadot Alliance is an ",(0,i.jsx)(n.a,{href:"#collectives",children:"on-chain collective"})," founded by Acala, Astar, Interlay,\nKilt, Moonbeam, Phala, and Subscan, to establish standards and ethics for open-source development in\n",(0,i.jsx)(n.a,{href:"https://polkadot.polkassembly.io/referendum/94",children:"referendum #94"}),". It aims to support development\nstandards and expose bad actors within the ecosystems of Polkadot."]}),"\n",(0,i.jsx)(n.h2,{id:"host",children:"Host"}),"\n",(0,i.jsx)(n.p,{children:"The environment in which a runtime module can be executed. Parachains must support the network\nHost - external chains that do not will have to use a bridge. Previously known as the Polkadot\nRuntime Environment."}),"\n",(0,i.jsx)(n.h2,{id:"runtime-environment",children:"Runtime Environment"}),"\n",(0,i.jsxs)(n.p,{children:["The previous name for the Polkadot ",(0,i.jsx)(n.a,{href:"#polkadot-host",children:"Host"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"paseo",children:"Paseo"}),"\n",(0,i.jsxs)(n.p,{children:["Paseo ",(0,i.jsx)(n.a,{href:"#testnet",children:"testnet"}),' provisions testing on Polkadot\'s "production" runtime, which means less\nchance of feature/code mismatch when developing parachain apps. Specifically, after the\n',(0,i.jsx)(n.a,{href:"#technical-fellowship",children:"Polkadot Technical fellowship"})," proposes a runtime upgrade for Polkadot, this\ntestnet is updated, giving a period where the testnet will be ahead of Polkadot to allow for\ntesting."]}),"\n",(0,i.jsx)(n.h2,{id:"preimage",children:"Preimage"}),"\n",(0,i.jsxs)(n.p,{children:["The on-chain proposals do not require the entire image of extrinsics and data (for instance the WASM\ncode, in case of upgrades) to be submitted, but would rather just need that image's hash. That\n",(0,i.jsx)(n.strong,{children:"preimage"})," can be submitted and stored on-chain against the hash later, upon the proposal's\ndispatch."]}),"\n",(0,i.jsx)(n.h2,{id:"proof-of-stake-pos",children:"Proof of Stake (PoS)"}),"\n",(0,i.jsx)(n.p,{children:"A method of selecting participation in a consensus system, in which participants are chosen based on\nhow many tokens they have at stake (at risk of loss due to misbehavior). Normally, Proof-of-Stake\nsystems limit the number of participants."}),"\n",(0,i.jsx)(n.h2,{id:"proof-of-validity",children:"Proof of Validity"}),"\n",(0,i.jsx)(n.p,{children:"A proof produced by parachain collators. Based on this proof and the parachain registry, a validator\ncan verify that a parachain has properly executed its state transition function. Proofs of Validity\ngo into the relay chain blocks."}),"\n",(0,i.jsx)(n.h2,{id:"proof-of-work-pow",children:"Proof of Work (PoW)"}),"\n",(0,i.jsx)(n.p,{children:"A method of selecting participants in a consensus system, typically the longest chain rule, in which\nparticipants try to solve a puzzle like finding a partial pre-image of a hash. Normally, a\nProof-of-Work system can have any number of participants."}),"\n",(0,i.jsx)(n.h2,{id:"proposal",children:"Proposal"}),"\n",(0,i.jsx)(n.p,{children:"A potential function call to be voted on in a referendum. Proposals can modify the behavior of the\nnetwork, from minor parameter tuning up to replacing the runtime code."}),"\n",(0,i.jsx)(n.h2,{id:"protocol",children:"Protocol"}),"\n",(0,i.jsx)(n.p,{children:"A system of rules that allows two or more entities of a communications system to transmit\ninformation. The protocol defines the rules, syntax, semantics, and synchronization of communication\nand possible recovery methods."}),"\n",(0,i.jsx)(n.h2,{id:"random-seed",children:"Random Seed"}),"\n",(0,i.jsxs)(n.p,{children:["A random seed is a pseudo-random number available on-chain. It is used in various places of the\nprotocol, most prominently in ",(0,i.jsx)(n.a,{href:"#babe",children:"BABE"}),", the block production mechanism."]}),"\n",(0,i.jsx)(n.h2,{id:"referendum",children:"Referendum"}),"\n",(0,i.jsx)(n.p,{children:"A vote on whether or not a proposal should be accepted by the network. Referenda may be initiated by\nthe Governance Council, by a member of the public, or as the result of a previous proposal.\nStakeholders vote on referenda, weighted by both the size of their stake (i.e. number of DOT held)\nand the amount of time they are willing to lock their tokens."}),"\n",(0,i.jsx)(n.h2,{id:"re-genesis",children:"Re-Genesis"}),"\n",(0,i.jsxs)(n.p,{children:["Re-Genesis is the process of exporting the current chain state, and creating a new chain that builds\non it. Re-Genesis will involve stop-the-world migration, which results in a period of time when no\nactual blocks are added to the blockchain. In a way, re-genesis can be viewed as a hard fork\nprocess. A formal design of Re-Genesis on Substrate is still under development -\n",(0,i.jsx)(n.a,{href:"https://github.com/paritytech/substrate/issues/7458",children:"Re-Genesis Rationale and Design"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"relay-chain",children:"Relay Chain"}),"\n",(0,i.jsx)(n.p,{children:"The chain that coordinates consensus and communication between parachains (and external chains, via\nbridges)."}),"\n",(0,i.jsx)(n.h2,{id:"remarks",children:"Remarks"}),"\n",(0,i.jsxs)(n.p,{children:["Remarks are extrinsics with no effect. They provide additional information to external inputs,\nacting as ",(0,i.jsx)(n.em,{children:"notes"}),". Remarks are stored alongside block records and do not change the chain's storage;\nthe information is not stored in the chain's trie, but along blocks."]}),"\n",(0,i.jsx)(n.h2,{id:"rococo",children:"Rococo"}),"\n",(0,i.jsxs)(n.p,{children:["Rococo was a ",(0,i.jsx)(n.a,{href:"#testnet",children:"testnet"})," set aside for testing parachains, cumulus, and related technology.\nPlease refer to Paseo test network."]}),"\n",(0,i.jsx)(n.h2,{id:"root-origin",children:"Root Origin"}),"\n",(0,i.jsxs)(n.p,{children:["A system-level origin in ",(0,i.jsx)(n.a,{href:"#Substrate",children:"Substrate"}),". This is the highest privilege level and can be\nthought of as the superuser of the runtime origin. To learn about more raw origins in Substrate,\nvisit ",(0,i.jsx)(n.a,{href:"https://docs.substrate.io/main-docs/build/origins/",children:"Substrate Docs"})]}),"\n",(0,i.jsx)(n.h2,{id:"runtime",children:"Runtime"}),"\n",(0,i.jsx)(n.p,{children:"The state transition function of a blockchain. It defines a valid algorithm for determining the\nstate of the next block given the previous state."}),"\n",(0,i.jsx)(n.h2,{id:"runtime-module",children:"Runtime Module"}),"\n",(0,i.jsx)(n.p,{children:'A module that implements specific transition functions and features one might want to have in their\nruntime. Each module should have domain-specific logic. For example, a Balances module has logic to\ndeal with accounts and balances. In Substrate, modules are called "pallets".'}),"\n",(0,i.jsx)(n.h2,{id:"safety",children:"Safety"}),"\n",(0,i.jsxs)(n.p,{children:["The property of a distributed system indicating that a particular state transition will not be\nreverted. ",(0,i.jsx)(n.a,{href:"#grandpa-finality-gadget",children:"GRANDPA"})," provides ",(0,i.jsx)(n.em,{children:"deterministic"}),' safety. That is, for a state\nchanged marked as "safe" or "final", one would require a hard fork to revert that change.']}),"\n",(0,i.jsx)(n.h2,{id:"scalability",children:"Scalability"}),"\n",(0,i.jsx)(n.p,{children:"While an ambiguous concept, [blockchain] scalability can be understood as the ability for the\nnetwork to scale in capabilities (e.g. processing more transactions) when needed."}),"\n",(0,i.jsx)(n.h2,{id:"sealing",children:"Sealing"}),"\n",(0,i.jsx)(n.p,{children:"The process of adding a block to the relay chain. Note that finalization is a separate process -\nblocks are finalized sometime after they are sealed."}),"\n",(0,i.jsx)(n.h2,{id:"session",children:"Session"}),"\n",(0,i.jsx)(n.p,{children:"A session is a Substrate implementation term for a period that has a constant set of validators.\nValidators can only join or exit the validator set at a session change."}),"\n",(0,i.jsx)(n.h2,{id:"session-certificate",children:"Session Certificate"}),"\n",(0,i.jsx)(n.p,{children:"A message containing a signature on the concatenation of all the Session keys."}),"\n",(0,i.jsx)(n.h2,{id:"session-key",children:"Session Key"}),"\n",(0,i.jsxs)(n.p,{children:["Hot keys that are used for performing network operations by validators, for example, signing\n",(0,i.jsx)(n.a,{href:"#grandpa-finality-gadget",children:"GRANDPA"})," commit messages."]}),"\n",(0,i.jsx)(n.h2,{id:"shared-security",children:"Shared Security"}),"\n",(0,i.jsx)(n.p,{children:"The security model used whereby all chains are equally secured. This is achieved by placing proofs\nof the validity of parachain blocks into the relay chain such that, in order to revert finality of a\nsingle parachain, an attacker would need to attack the entire system."}),"\n",(0,i.jsx)(n.h2,{id:"slashing",children:"Slashing"}),"\n",(0,i.jsxs)(n.p,{children:["The removal of a percentage of an account's DOT as a punishment for a validator acting maliciously\nor incompetently. For more information, see the ",(0,i.jsx)(n.a,{href:"/docs/learn-offenses",children:"page about offenses"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"soft-fork",children:"Soft Fork"}),"\n",(0,i.jsx)(n.p,{children:'A backward compatible change to client code causes upgraded clients to start mining a new chain.\nRequires a "vote-by-hashrate" of a majority of miners to enact successfully. Soft forks are\nconsidered temporary divergences in a chain since non-upgraded clients do not follow the new\nconsensus rules but upgraded clients are still compatible with old consensus rules.'}),"\n",(0,i.jsx)(n.h2,{id:"software-development-kit-sdk",children:"Software Development Kit (SDK)"}),"\n",(0,i.jsx)(n.p,{children:"A collection of software tools (and programs) packaged together that can be used to develop\nsoftware."}),"\n",(0,i.jsx)(n.h2,{id:"spend-period",children:"Spend Period"}),"\n",(0,i.jsxs)(n.p,{children:["Successfully enacted Treasury track referenda will get funded at the end of the\n",(0,i.jsx)(n.a,{href:"/docs/chain-state-values#treasury-spending-period",children:"spending period"}),". Treasury funds are directly\nsent to the beneficiary account at the end of the spend period."]}),"\n",(0,i.jsx)(n.h2,{id:"staking",children:"Staking"}),"\n",(0,i.jsx)(n.p,{children:'The act of bonding tokens by putting them up as "collateral" for a chance to produce a valid block\n(and thus obtain a block reward). Validators and nominators stake their tokens in order to secure\nthe network.'}),"\n",(0,i.jsx)(n.h2,{id:"state-transition-function",children:"State transition function"}),"\n",(0,i.jsx)(n.p,{children:"A function that describes how the state of a blockchain can be transformed. For example, it may\ndescribe how tokens can be transferred from one account to another."}),"\n",(0,i.jsx)(n.h2,{id:"substrate",children:"Substrate"}),"\n",(0,i.jsxs)(n.p,{children:["A modular framework for building blockchains. Polkadot is built using\n",(0,i.jsx)(n.a,{href:"https://substrate.io/",children:"Substrate"}),". Chains built with Substrate will be easy to connect as\nparachains. For developers, see the\n",(0,i.jsx)(n.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/substrate",children:"Substrate GitHub repository"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"system-parachains",children:"System Parachains"}),"\n",(0,i.jsxs)(n.p,{children:["Parachains that are part of the Polkadot core protocol. These are allocated a parachain execution\ncore by governance rather than by coretime purchase. Examples of system parachains include\n",(0,i.jsx)(n.a,{href:"/docs/learn-assets",children:"Asset Hub"}),", ",(0,i.jsx)(n.a,{href:"/docs/learn-system-chains#bridge-hub",children:"Bridge Hub"}),",\n",(0,i.jsx)(n.a,{href:"/docs/learn-system-chains#collectives",children:"Collectives"})," and\n",(0,i.jsx)(n.a,{href:"/docs/learn-system-chains#people-chain",children:"People Chain"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"tabling",children:"Tabling"}),"\n",(0,i.jsx)(n.p,{children:'In governance, bringing a proposal to a vote via referendum. Note that this is the British meaning\nof "tabling", which is different from the US version, which means "to postpone" a measure.'}),"\n",(0,i.jsx)(n.h2,{id:"teleport",children:"Teleport"}),"\n",(0,i.jsx)(n.p,{children:"Send an asset from an account on one chain to an account on a different chain. This occurs by\nburning an amount on the sending chain and minting an equivalent amount on the destination chain."}),"\n",(0,i.jsx)(n.h2,{id:"testnet",children:"Testnet"}),"\n",(0,i.jsxs)(n.p,{children:['Short for "test network": an experimental network where testing and development takes place.\nNetworks are often executed on a testnet before they are deployed to a ',(0,i.jsx)(n.a,{href:"#mainnet",children:"mainnet"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"tokenization",children:"Tokenization"}),"\n",(0,i.jsx)(n.p,{children:"The process of replacing sensitive data with non-sensitive data."}),"\n",(0,i.jsx)(n.h2,{id:"tracks",children:"Tracks"}),"\n",(0,i.jsxs)(n.p,{children:["Each ",(0,i.jsx)(n.a,{href:"#origin",children:"Origin"})," is associated with a single referendum class and each class is associated\nwith a ",(0,i.jsx)(n.a,{href:"../maintain/maintain-guides-polkadot-opengov#origins-and-tracks",children:"Track"}),". The Track outlines\nthe lifecycle for the proposal and is independent from other class's tracks. Having independent\ntracks allows the network to tailor the dynamics of referenda based upon their implied privilege\nlevel."]}),"\n",(0,i.jsx)(n.h2,{id:"tranche",children:"Tranche"}),"\n",(0,i.jsxs)(n.p,{children:["Validators use a subjective, tick-based system to determine when the approval process should start.\nA validator starts the tick-based system when a new availability core candidates have been proposed,\nwhich can be retrieved via the\n",(0,i.jsx)(n.a,{href:"https://spec.polkadot.network/#sect-rt-api-availability-cores",children:"Runtime API"}),", and increments the\ntick every 500 milliseconds. Each tick/increment is referred to as a \u201ctranche\u201d, represented as an\ninteger, starting at 0."]}),"\n",(0,i.jsx)(n.h2,{id:"transfer",children:"Transfer"}),"\n",(0,i.jsx)(n.p,{children:"Send an asset from one account to another. This generally refers to transfers that occur only on the\nsame chain."}),"\n",(0,i.jsx)(n.h2,{id:"transaction",children:"Transaction"}),"\n",(0,i.jsx)(n.p,{children:'An extrinsic that is signed. Transactions are gossiped on the network and incur a transaction fee.\nTransactions are "provably true", unlike inherents. For example, one can prove that Alice wants to\nsend funds to Bob by the fact that she signed a transfer-funds message with her private key.'}),"\n",(0,i.jsx)(n.h2,{id:"validator",children:"Validator"}),"\n",(0,i.jsx)(n.p,{children:"A node that secures the relay chain by staking DOT, validating proofs from collators on parachains\nand voting on consensus along with other validators."}),"\n",(0,i.jsx)(n.h2,{id:"vertical-message-passing",children:"Vertical Message Passing"}),"\n",(0,i.jsxs)(n.p,{children:["Vertical message passing consists of two separate types of message passing, Downward Message Passing\n(DMP) and Upward Message Passing (UMP). Downward messages pass from the relay chain to a parachain,\nalthough they may also originate from another parachain via\n",(0,i.jsx)(n.a,{href:"#Horizontal-Relay-routed-Message-Passing",children:"HRMP"}),". Upward messages originate from parachains and go\nup to the relay chain via runtime entry points."]}),"\n",(0,i.jsx)(n.h2,{id:"voting",children:"Voting"}),"\n",(0,i.jsx)(n.p,{children:"The process of stakeholders determining whether or not a referendum should pass. Votes are weighted\nboth by the number of DOT that the stakeholder account controls and the amount of time they are\nwilling to lock their DOT."}),"\n",(0,i.jsx)(n.h2,{id:"waiting-nomination",children:"Waiting Nomination"}),"\n",(0,i.jsx)(n.p,{children:"The nominator has nominated this validator, but the validator was not elected into the active\nvalidator set this era and thus cannot produce blocks for the canonical chain. If the validator does\nget into the active set in a future era, this may turn into an active or inactive nomination."}),"\n",(0,i.jsx)(n.h2,{id:"wallet",children:"Wallet"}),"\n",(0,i.jsx)(n.p,{children:"A program that allows one to store private keys and sign transactions for Polkadot or other\nblockchain networks."}),"\n",(0,i.jsx)(n.h2,{id:"wasm",children:"Wasm"}),"\n",(0,i.jsxs)(n.p,{children:["The abbreviation for ",(0,i.jsx)(n.a,{href:"#webassembly",children:"WebAssembly"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"watermark",children:"Watermark"}),"\n",(0,i.jsxs)(n.p,{children:["In Polkadot's parachain messaging scheme, the ",(0,i.jsx)(n.em,{children:"watermark"})," is the minimum processed send-height of\nthe receiving parachain. All messages on all channels that are sending to this parachain at or\nbefore the watermark are guaranteed to be processed."]}),"\n",(0,i.jsx)(n.h2,{id:"web3-foundation",children:"Web3 Foundation"}),"\n",(0,i.jsxs)(n.p,{children:["A Switzerland-based foundation that nurtures and stewards technologies and applications in the\nfields of decentralized web software protocols, particularly those that utilize modern cryptographic\nmethods to safeguard decentralization, to the benefit and for the stability of the\n",(0,i.jsx)(n.a,{href:"/docs/web3-and-polkadot",children:"Web3 ecosystem"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"webassembly",children:"WebAssembly"}),"\n",(0,i.jsx)(n.p,{children:"An instruction format for a virtual, stack-based machine. Polkadot Runtime Modules are compiled to\nWebAssembly. Also known as Wasm."}),"\n",(0,i.jsx)(n.h2,{id:"weights",children:"Weights"}),"\n",(0,i.jsxs)(n.p,{children:["A permission-less system needs to implement a mechanism to measure and limit usage in order to\nestablish an economic incentive structure, to prevent the network overload, and to mitigate DoS\nvulnerabilities. This mechanism must enforce a limited time-window for block producers to create a\nblock and include limitations on block size, to prevent execution of certain extrinsics which are\ndeemed too expensive and could decelerate the network. This is handled by the weight system, where\nthe cost of the transactions (referred to as ",(0,i.jsx)(n.a,{href:"#extrinsic",children:"extrinsics"}),") are determined before\nexecution. Checkout this section of the Substrate docs covering\n",(0,i.jsx)(n.a,{href:"https://docs.substrate.io/build/tx-weights-fees/",children:"transaction weights and fees"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"westend",children:"Westend"}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.a,{href:"#testnet",children:"testnet"})," is set aside for testing the Polkadot relay chain. Contrary to the\n",(0,i.jsx)(n.a,{href:"#paseo",children:"Paseo testnet"}),", the Westend testnet is used by the core developers to iterate on\nprotocol-level features like ",(0,i.jsx)(n.a,{href:"/docs/learn-async-backing",children:"asynchronous backing"}),", etc, that are\nnot relevant for parachain developers."]}),"\n",(0,i.jsx)(n.h2,{id:"witness",children:"Witness"}),"\n",(0,i.jsx)(n.p,{children:"Cryptographic proof statements of data validity."}),"\n",(0,i.jsx)(n.h2,{id:"whitelist-pallet",children:"Whitelist Pallet"}),"\n",(0,i.jsxs)(n.p,{children:["Allows one ",(0,i.jsx)(n.a,{href:"#origin",children:"Origin "})," to escalate the privilege level of another Origin for a certain\noperation. In terms of OpenGov, it allows the ",(0,i.jsx)(n.a,{href:"#fellowship",children:"Fellowship"})," to authorise a new origin\n(which we will call Whitelisted-Root) to be executed with Root-level privileges."]})]})}function h(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}},47379:(e,n,a)=>{"use strict";a.d(n,{A:()=>p});var t=a(90675),i=a(10467),o=a(96540),s=a(19588),r=a(2026),l=a(11135);function c(e,n,a){return d.apply(this,arguments)}function d(){return(d=(0,i.A)((0,t.A)().mark((function e(n,a,i){var o,l,c,d,h;return(0,t.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=void 0,l=void 0,e.t0=n,e.next="polkadot"===e.t0?5:"kusama"===e.t0?7:"statemine"===e.t0?9:"statemint"===e.t0?11:"polkadotpeople"===e.t0?13:"kusamapeople"===e.t0?15:17;break;case 5:return o="wss://rpc.polkadot.io",e.abrupt("break",18);case 7:return o="wss://kusama-rpc.polkadot.io/",e.abrupt("break",18);case 9:return o="wss://statemine-rpc.polkadot.io/",e.abrupt("break",18);case 11:return o="wss://statemint-rpc.polkadot.io/",e.abrupt("break",18);case 13:return o="wss://polkadot-people-rpc.polkadot.io/",e.abrupt("break",18);case 15:return o="wss://kusama-people-rpc.polkadot.io/",e.abrupt("break",18);case 17:console.log("Unknown socket url provided, no connection made.");case 18:if(void 0!==o){e.next=22;break}return e.abrupt("return");case 22:return c=new s.E(o),e.next=25,r.G.create({provider:c});case 25:d=e.sent,(h=a.split(".")).forEach((function(e){e in d&&(d=d[e])})),e.t1=h[0],e.next="consts"===e.t1?31:"query"===e.t1?33:38;break;case 31:return l=d.toString(),e.abrupt("break",39);case 33:return e.next=35,d();case 35:return l=(l=e.sent).toString(),e.abrupt("break",39);case 38:console.log("Unknown path prefix ("+h[0]+") in "+a);case 39:return e.abrupt("return",l);case 40:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function h(e,n,a,t){switch(n){case"humanReadable":(0,l.HumanReadable)(e,a,t);break;case"precise":(0,l.Precise)(e,a,t);break;case"blocksToDays":(0,l.BlocksToDays)(e,t);break;case"erasToDays":(0,l.ErasToDays)(e,t,a);break;case"percentage":(0,l.Percentage)(e,t);break;case"permillToPercent":(0,l.PermillToPercent)(e,t);break;case"arrayLength":(0,l.ArrayLength)(e,t);break;default:return void console.log("Ignoring unknown filter type")}}const p=function(e){var n=e.network,a=e.path,s=e.defaultValue,r=e.filter,l=void 0===r?void 0:r,d=(0,o.useState)(""),p=d[0],u=d[1];return n=n.toLowerCase(),(0,o.useEffect)((function(){void 0!==l?h(s.toString(),l,n,u):u(s.toString());var e=void 0;switch(n){case"polkadot":e="wss://rpc.polkadot.io";break;case"kusama":e="wss://kusama-rpc.polkadot.io/";break;case"statemine":e="wss://kusama-asset-hub-rpc.polkadot.io/";break;case"statemint":e="wss://polkadot-asset-hub-rpc.polkadot.io/";break;case"kusamapeople":e="wss://kusama-people-rpc.polkadot.io";break;case"polkadotpeople":e="wss://polkadot-people-rpc.polkadot.io";break;default:console.log("Unknown network provided, "+n)}if(void 0===e)console.log("Failed to connect to a valid websocket, applying default");else{var o=function(){var e=(0,i.A)((0,t.A)().mark((function e(){var i;return(0,t.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,c(n,a,u);case 2:if(void 0!==(i=e.sent)){e.next=7;break}return e.abrupt("return");case 7:void 0!==l?h(i,l,n,u):u(i);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();try{o()}catch(r){console.log(r)}}}),[]),p}},11135:e=>{var n="polkadot",a="kusama",t="statemine",i="statemint",o="polkadotpeople",s="kusamapeople",r={polkadot:{precision:1e10,symbol:"DOT"},kusama:{precision:1e12,symbol:"KSM"},statemint:{precision:1e10,symbol:"DOT"},statemine:{precision:1e12,symbol:"KSM"},polkadotpeople:{precision:1e10,symbol:"DOT"},kusamapeople:{precision:1e12,symbol:"KSM"}};e.exports={HumanReadable:function(e,l,c){var d=void 0;if(l===n||l===i)d=3;else if(l===a||l===t||l===o)d=6;else{if(l!=s)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");d=8}e=parseFloat(e),c((e=Number.isInteger(e/r[l].precision)?e/r[l].precision+" "+r[l].symbol:(e/r[l].precision).toFixed(d)+" "+r[l].symbol).toString())},Precise:function(e,n,a){a(e=(e=parseFloat(e))/r[n].precision+" "+r[n].symbol)},BlocksToDays:function(e,n){n((e=6*e/86400).toString())},ErasToDays:function(e,r,l){var c=void 0;if(l===n||l===i||l==o)c=1;else{if(l!==a&&l!==t&&l!=s)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");c=4}r((e/=c).toString())},Percentage:function(e,n){n((e/=1e7).toString())},PermillToPercent:function(e,n){n((e/=1e4).toString())},ArrayLength:function(e,n){n((e=e.split(",").length).toString())}}},47790:()=>{}}]); \ No newline at end of file diff --git a/assets/js/495.19aea050.js b/assets/js/495.19aea050.js deleted file mode 100644 index 59748d5ba3a4..000000000000 --- a/assets/js/495.19aea050.js +++ /dev/null @@ -1,51713 +0,0 @@ -exports.id = 495; -exports.ids = [495]; -exports.modules = { - -/***/ 87799: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -(function webpackUniversalModuleDefinition(root, factory) { - if(true) - module.exports = factory(__webpack_require__(23143)); - else {} -})(this, function(__WEBPACK_EXTERNAL_MODULE_0__) { -return /******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // The require function -/******/ function __nested_webpack_require_643__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) { -/******/ return installedModules[moduleId].exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ i: moduleId, -/******/ l: false, -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __nested_webpack_require_643__); -/******/ -/******/ // Flag the module as loaded -/******/ module.l = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __nested_webpack_require_643__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __nested_webpack_require_643__.c = installedModules; -/******/ -/******/ // identity function for calling harmony imports with the correct context -/******/ __nested_webpack_require_643__.i = function(value) { return value; }; -/******/ -/******/ // define getter function for harmony exports -/******/ __nested_webpack_require_643__.d = function(exports, name, getter) { -/******/ if(!__nested_webpack_require_643__.o(exports, name)) { -/******/ Object.defineProperty(exports, name, { -/******/ configurable: false, -/******/ enumerable: true, -/******/ get: getter -/******/ }); -/******/ } -/******/ }; -/******/ -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __nested_webpack_require_643__.n = function(module) { -/******/ var getter = module && module.__esModule ? -/******/ function getDefault() { return module['default']; } : -/******/ function getModuleExports() { return module; }; -/******/ __nested_webpack_require_643__.d(getter, 'a', getter); -/******/ return getter; -/******/ }; -/******/ -/******/ // Object.prototype.hasOwnProperty.call -/******/ __nested_webpack_require_643__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; -/******/ -/******/ // __webpack_public_path__ -/******/ __nested_webpack_require_643__.p = ""; -/******/ -/******/ // Load entry module and return exports -/******/ return __nested_webpack_require_643__(__nested_webpack_require_643__.s = 7); -/******/ }) -/************************************************************************/ -/******/ ([ -/* 0 */ -/***/ (function(module, exports) { - -module.exports = __WEBPACK_EXTERNAL_MODULE_0__; - -/***/ }), -/* 1 */ -/***/ (function(module, exports, __nested_webpack_require_3185__) { - -"use strict"; - - -var FDLayoutConstants = __nested_webpack_require_3185__(0).FDLayoutConstants; - -function CoSEConstants() {} - -//CoSEConstants inherits static props in FDLayoutConstants -for (var prop in FDLayoutConstants) { - CoSEConstants[prop] = FDLayoutConstants[prop]; -} - -CoSEConstants.DEFAULT_USE_MULTI_LEVEL_SCALING = false; -CoSEConstants.DEFAULT_RADIAL_SEPARATION = FDLayoutConstants.DEFAULT_EDGE_LENGTH; -CoSEConstants.DEFAULT_COMPONENT_SEPERATION = 60; -CoSEConstants.TILE = true; -CoSEConstants.TILING_PADDING_VERTICAL = 10; -CoSEConstants.TILING_PADDING_HORIZONTAL = 10; -CoSEConstants.TREE_REDUCTION_ON_INCREMENTAL = false; // make this true when cose is used incrementally as a part of other non-incremental layout - -module.exports = CoSEConstants; - -/***/ }), -/* 2 */ -/***/ (function(module, exports, __nested_webpack_require_4002__) { - -"use strict"; - - -var FDLayoutEdge = __nested_webpack_require_4002__(0).FDLayoutEdge; - -function CoSEEdge(source, target, vEdge) { - FDLayoutEdge.call(this, source, target, vEdge); -} - -CoSEEdge.prototype = Object.create(FDLayoutEdge.prototype); -for (var prop in FDLayoutEdge) { - CoSEEdge[prop] = FDLayoutEdge[prop]; -} - -module.exports = CoSEEdge; - -/***/ }), -/* 3 */ -/***/ (function(module, exports, __nested_webpack_require_4409__) { - -"use strict"; - - -var LGraph = __nested_webpack_require_4409__(0).LGraph; - -function CoSEGraph(parent, graphMgr, vGraph) { - LGraph.call(this, parent, graphMgr, vGraph); -} - -CoSEGraph.prototype = Object.create(LGraph.prototype); -for (var prop in LGraph) { - CoSEGraph[prop] = LGraph[prop]; -} - -module.exports = CoSEGraph; - -/***/ }), -/* 4 */ -/***/ (function(module, exports, __nested_webpack_require_4790__) { - -"use strict"; - - -var LGraphManager = __nested_webpack_require_4790__(0).LGraphManager; - -function CoSEGraphManager(layout) { - LGraphManager.call(this, layout); -} - -CoSEGraphManager.prototype = Object.create(LGraphManager.prototype); -for (var prop in LGraphManager) { - CoSEGraphManager[prop] = LGraphManager[prop]; -} - -module.exports = CoSEGraphManager; - -/***/ }), -/* 5 */ -/***/ (function(module, exports, __nested_webpack_require_5205__) { - -"use strict"; - - -var FDLayoutNode = __nested_webpack_require_5205__(0).FDLayoutNode; -var IMath = __nested_webpack_require_5205__(0).IMath; - -function CoSENode(gm, loc, size, vNode) { - FDLayoutNode.call(this, gm, loc, size, vNode); -} - -CoSENode.prototype = Object.create(FDLayoutNode.prototype); -for (var prop in FDLayoutNode) { - CoSENode[prop] = FDLayoutNode[prop]; -} - -CoSENode.prototype.move = function () { - var layout = this.graphManager.getLayout(); - this.displacementX = layout.coolingFactor * (this.springForceX + this.repulsionForceX + this.gravitationForceX) / this.noOfChildren; - this.displacementY = layout.coolingFactor * (this.springForceY + this.repulsionForceY + this.gravitationForceY) / this.noOfChildren; - - if (Math.abs(this.displacementX) > layout.coolingFactor * layout.maxNodeDisplacement) { - this.displacementX = layout.coolingFactor * layout.maxNodeDisplacement * IMath.sign(this.displacementX); - } - - if (Math.abs(this.displacementY) > layout.coolingFactor * layout.maxNodeDisplacement) { - this.displacementY = layout.coolingFactor * layout.maxNodeDisplacement * IMath.sign(this.displacementY); - } - - // a simple node, just move it - if (this.child == null) { - this.moveBy(this.displacementX, this.displacementY); - } - // an empty compound node, again just move it - else if (this.child.getNodes().length == 0) { - this.moveBy(this.displacementX, this.displacementY); - } - // non-empty compound node, propogate movement to children as well - else { - this.propogateDisplacementToChildren(this.displacementX, this.displacementY); - } - - layout.totalDisplacement += Math.abs(this.displacementX) + Math.abs(this.displacementY); - - this.springForceX = 0; - this.springForceY = 0; - this.repulsionForceX = 0; - this.repulsionForceY = 0; - this.gravitationForceX = 0; - this.gravitationForceY = 0; - this.displacementX = 0; - this.displacementY = 0; -}; - -CoSENode.prototype.propogateDisplacementToChildren = function (dX, dY) { - var nodes = this.getChild().getNodes(); - var node; - for (var i = 0; i < nodes.length; i++) { - node = nodes[i]; - if (node.getChild() == null) { - node.moveBy(dX, dY); - node.displacementX += dX; - node.displacementY += dY; - } else { - node.propogateDisplacementToChildren(dX, dY); - } - } -}; - -CoSENode.prototype.setPred1 = function (pred1) { - this.pred1 = pred1; -}; - -CoSENode.prototype.getPred1 = function () { - return pred1; -}; - -CoSENode.prototype.getPred2 = function () { - return pred2; -}; - -CoSENode.prototype.setNext = function (next) { - this.next = next; -}; - -CoSENode.prototype.getNext = function () { - return next; -}; - -CoSENode.prototype.setProcessed = function (processed) { - this.processed = processed; -}; - -CoSENode.prototype.isProcessed = function () { - return processed; -}; - -module.exports = CoSENode; - -/***/ }), -/* 6 */ -/***/ (function(module, exports, __nested_webpack_require_8085__) { - -"use strict"; - - -var FDLayout = __nested_webpack_require_8085__(0).FDLayout; -var CoSEGraphManager = __nested_webpack_require_8085__(4); -var CoSEGraph = __nested_webpack_require_8085__(3); -var CoSENode = __nested_webpack_require_8085__(5); -var CoSEEdge = __nested_webpack_require_8085__(2); -var CoSEConstants = __nested_webpack_require_8085__(1); -var FDLayoutConstants = __nested_webpack_require_8085__(0).FDLayoutConstants; -var LayoutConstants = __nested_webpack_require_8085__(0).LayoutConstants; -var Point = __nested_webpack_require_8085__(0).Point; -var PointD = __nested_webpack_require_8085__(0).PointD; -var Layout = __nested_webpack_require_8085__(0).Layout; -var Integer = __nested_webpack_require_8085__(0).Integer; -var IGeometry = __nested_webpack_require_8085__(0).IGeometry; -var LGraph = __nested_webpack_require_8085__(0).LGraph; -var Transform = __nested_webpack_require_8085__(0).Transform; - -function CoSELayout() { - FDLayout.call(this); - - this.toBeTiled = {}; // Memorize if a node is to be tiled or is tiled -} - -CoSELayout.prototype = Object.create(FDLayout.prototype); - -for (var prop in FDLayout) { - CoSELayout[prop] = FDLayout[prop]; -} - -CoSELayout.prototype.newGraphManager = function () { - var gm = new CoSEGraphManager(this); - this.graphManager = gm; - return gm; -}; - -CoSELayout.prototype.newGraph = function (vGraph) { - return new CoSEGraph(null, this.graphManager, vGraph); -}; - -CoSELayout.prototype.newNode = function (vNode) { - return new CoSENode(this.graphManager, vNode); -}; - -CoSELayout.prototype.newEdge = function (vEdge) { - return new CoSEEdge(null, null, vEdge); -}; - -CoSELayout.prototype.initParameters = function () { - FDLayout.prototype.initParameters.call(this, arguments); - if (!this.isSubLayout) { - if (CoSEConstants.DEFAULT_EDGE_LENGTH < 10) { - this.idealEdgeLength = 10; - } else { - this.idealEdgeLength = CoSEConstants.DEFAULT_EDGE_LENGTH; - } - - this.useSmartIdealEdgeLengthCalculation = CoSEConstants.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION; - this.springConstant = FDLayoutConstants.DEFAULT_SPRING_STRENGTH; - this.repulsionConstant = FDLayoutConstants.DEFAULT_REPULSION_STRENGTH; - this.gravityConstant = FDLayoutConstants.DEFAULT_GRAVITY_STRENGTH; - this.compoundGravityConstant = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH; - this.gravityRangeFactor = FDLayoutConstants.DEFAULT_GRAVITY_RANGE_FACTOR; - this.compoundGravityRangeFactor = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR; - - // variables for tree reduction support - this.prunedNodesAll = []; - this.growTreeIterations = 0; - this.afterGrowthIterations = 0; - this.isTreeGrowing = false; - this.isGrowthFinished = false; - - // variables for cooling - this.coolingCycle = 0; - this.maxCoolingCycle = this.maxIterations / FDLayoutConstants.CONVERGENCE_CHECK_PERIOD; - this.finalTemperature = FDLayoutConstants.CONVERGENCE_CHECK_PERIOD / this.maxIterations; - this.coolingAdjuster = 1; - } -}; - -CoSELayout.prototype.layout = function () { - var createBendsAsNeeded = LayoutConstants.DEFAULT_CREATE_BENDS_AS_NEEDED; - if (createBendsAsNeeded) { - this.createBendpoints(); - this.graphManager.resetAllEdges(); - } - - this.level = 0; - return this.classicLayout(); -}; - -CoSELayout.prototype.classicLayout = function () { - this.nodesWithGravity = this.calculateNodesToApplyGravitationTo(); - this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity); - this.calcNoOfChildrenForAllNodes(); - this.graphManager.calcLowestCommonAncestors(); - this.graphManager.calcInclusionTreeDepths(); - this.graphManager.getRoot().calcEstimatedSize(); - this.calcIdealEdgeLengths(); - - if (!this.incremental) { - var forest = this.getFlatForest(); - - // The graph associated with this layout is flat and a forest - if (forest.length > 0) { - this.positionNodesRadially(forest); - } - // The graph associated with this layout is not flat or a forest - else { - // Reduce the trees when incremental mode is not enabled and graph is not a forest - this.reduceTrees(); - // Update nodes that gravity will be applied - this.graphManager.resetAllNodesToApplyGravitation(); - var allNodes = new Set(this.getAllNodes()); - var intersection = this.nodesWithGravity.filter(function (x) { - return allNodes.has(x); - }); - this.graphManager.setAllNodesToApplyGravitation(intersection); - - this.positionNodesRandomly(); - } - } else { - if (CoSEConstants.TREE_REDUCTION_ON_INCREMENTAL) { - // Reduce the trees in incremental mode if only this constant is set to true - this.reduceTrees(); - // Update nodes that gravity will be applied - this.graphManager.resetAllNodesToApplyGravitation(); - var allNodes = new Set(this.getAllNodes()); - var intersection = this.nodesWithGravity.filter(function (x) { - return allNodes.has(x); - }); - this.graphManager.setAllNodesToApplyGravitation(intersection); - } - } - - this.initSpringEmbedder(); - this.runSpringEmbedder(); - - return true; -}; - -CoSELayout.prototype.tick = function () { - this.totalIterations++; - - if (this.totalIterations === this.maxIterations && !this.isTreeGrowing && !this.isGrowthFinished) { - if (this.prunedNodesAll.length > 0) { - this.isTreeGrowing = true; - } else { - return true; - } - } - - if (this.totalIterations % FDLayoutConstants.CONVERGENCE_CHECK_PERIOD == 0 && !this.isTreeGrowing && !this.isGrowthFinished) { - if (this.isConverged()) { - if (this.prunedNodesAll.length > 0) { - this.isTreeGrowing = true; - } else { - return true; - } - } - - this.coolingCycle++; - - if (this.layoutQuality == 0) { - // quality - "draft" - this.coolingAdjuster = this.coolingCycle; - } else if (this.layoutQuality == 1) { - // quality - "default" - this.coolingAdjuster = this.coolingCycle / 3; - } - - // cooling schedule is based on http://www.btluke.com/simanf1.html -> cooling schedule 3 - this.coolingFactor = Math.max(this.initialCoolingFactor - Math.pow(this.coolingCycle, Math.log(100 * (this.initialCoolingFactor - this.finalTemperature)) / Math.log(this.maxCoolingCycle)) / 100 * this.coolingAdjuster, this.finalTemperature); - this.animationPeriod = Math.ceil(this.initialAnimationPeriod * Math.sqrt(this.coolingFactor)); - } - // Operations while tree is growing again - if (this.isTreeGrowing) { - if (this.growTreeIterations % 10 == 0) { - if (this.prunedNodesAll.length > 0) { - this.graphManager.updateBounds(); - this.updateGrid(); - this.growTree(this.prunedNodesAll); - // Update nodes that gravity will be applied - this.graphManager.resetAllNodesToApplyGravitation(); - var allNodes = new Set(this.getAllNodes()); - var intersection = this.nodesWithGravity.filter(function (x) { - return allNodes.has(x); - }); - this.graphManager.setAllNodesToApplyGravitation(intersection); - - this.graphManager.updateBounds(); - this.updateGrid(); - this.coolingFactor = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL; - } else { - this.isTreeGrowing = false; - this.isGrowthFinished = true; - } - } - this.growTreeIterations++; - } - // Operations after growth is finished - if (this.isGrowthFinished) { - if (this.isConverged()) { - return true; - } - if (this.afterGrowthIterations % 10 == 0) { - this.graphManager.updateBounds(); - this.updateGrid(); - } - this.coolingFactor = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL * ((100 - this.afterGrowthIterations) / 100); - this.afterGrowthIterations++; - } - - var gridUpdateAllowed = !this.isTreeGrowing && !this.isGrowthFinished; - var forceToNodeSurroundingUpdate = this.growTreeIterations % 10 == 1 && this.isTreeGrowing || this.afterGrowthIterations % 10 == 1 && this.isGrowthFinished; - - this.totalDisplacement = 0; - this.graphManager.updateBounds(); - this.calcSpringForces(); - this.calcRepulsionForces(gridUpdateAllowed, forceToNodeSurroundingUpdate); - this.calcGravitationalForces(); - this.moveNodes(); - this.animate(); - - return false; // Layout is not ended yet return false -}; - -CoSELayout.prototype.getPositionsData = function () { - var allNodes = this.graphManager.getAllNodes(); - var pData = {}; - for (var i = 0; i < allNodes.length; i++) { - var rect = allNodes[i].rect; - var id = allNodes[i].id; - pData[id] = { - id: id, - x: rect.getCenterX(), - y: rect.getCenterY(), - w: rect.width, - h: rect.height - }; - } - - return pData; -}; - -CoSELayout.prototype.runSpringEmbedder = function () { - this.initialAnimationPeriod = 25; - this.animationPeriod = this.initialAnimationPeriod; - var layoutEnded = false; - - // If aminate option is 'during' signal that layout is supposed to start iterating - if (FDLayoutConstants.ANIMATE === 'during') { - this.emit('layoutstarted'); - } else { - // If aminate option is 'during' tick() function will be called on index.js - while (!layoutEnded) { - layoutEnded = this.tick(); - } - - this.graphManager.updateBounds(); - } -}; - -CoSELayout.prototype.calculateNodesToApplyGravitationTo = function () { - var nodeList = []; - var graph; - - var graphs = this.graphManager.getGraphs(); - var size = graphs.length; - var i; - for (i = 0; i < size; i++) { - graph = graphs[i]; - - graph.updateConnected(); - - if (!graph.isConnected) { - nodeList = nodeList.concat(graph.getNodes()); - } - } - - return nodeList; -}; - -CoSELayout.prototype.createBendpoints = function () { - var edges = []; - edges = edges.concat(this.graphManager.getAllEdges()); - var visited = new Set(); - var i; - for (i = 0; i < edges.length; i++) { - var edge = edges[i]; - - if (!visited.has(edge)) { - var source = edge.getSource(); - var target = edge.getTarget(); - - if (source == target) { - edge.getBendpoints().push(new PointD()); - edge.getBendpoints().push(new PointD()); - this.createDummyNodesForBendpoints(edge); - visited.add(edge); - } else { - var edgeList = []; - - edgeList = edgeList.concat(source.getEdgeListToNode(target)); - edgeList = edgeList.concat(target.getEdgeListToNode(source)); - - if (!visited.has(edgeList[0])) { - if (edgeList.length > 1) { - var k; - for (k = 0; k < edgeList.length; k++) { - var multiEdge = edgeList[k]; - multiEdge.getBendpoints().push(new PointD()); - this.createDummyNodesForBendpoints(multiEdge); - } - } - edgeList.forEach(function (edge) { - visited.add(edge); - }); - } - } - } - - if (visited.size == edges.length) { - break; - } - } -}; - -CoSELayout.prototype.positionNodesRadially = function (forest) { - // We tile the trees to a grid row by row; first tree starts at (0,0) - var currentStartingPoint = new Point(0, 0); - var numberOfColumns = Math.ceil(Math.sqrt(forest.length)); - var height = 0; - var currentY = 0; - var currentX = 0; - var point = new PointD(0, 0); - - for (var i = 0; i < forest.length; i++) { - if (i % numberOfColumns == 0) { - // Start of a new row, make the x coordinate 0, increment the - // y coordinate with the max height of the previous row - currentX = 0; - currentY = height; - - if (i != 0) { - currentY += CoSEConstants.DEFAULT_COMPONENT_SEPERATION; - } - - height = 0; - } - - var tree = forest[i]; - - // Find the center of the tree - var centerNode = Layout.findCenterOfTree(tree); - - // Set the staring point of the next tree - currentStartingPoint.x = currentX; - currentStartingPoint.y = currentY; - - // Do a radial layout starting with the center - point = CoSELayout.radialLayout(tree, centerNode, currentStartingPoint); - - if (point.y > height) { - height = Math.floor(point.y); - } - - currentX = Math.floor(point.x + CoSEConstants.DEFAULT_COMPONENT_SEPERATION); - } - - this.transform(new PointD(LayoutConstants.WORLD_CENTER_X - point.x / 2, LayoutConstants.WORLD_CENTER_Y - point.y / 2)); -}; - -CoSELayout.radialLayout = function (tree, centerNode, startingPoint) { - var radialSep = Math.max(this.maxDiagonalInTree(tree), CoSEConstants.DEFAULT_RADIAL_SEPARATION); - CoSELayout.branchRadialLayout(centerNode, null, 0, 359, 0, radialSep); - var bounds = LGraph.calculateBounds(tree); - - var transform = new Transform(); - transform.setDeviceOrgX(bounds.getMinX()); - transform.setDeviceOrgY(bounds.getMinY()); - transform.setWorldOrgX(startingPoint.x); - transform.setWorldOrgY(startingPoint.y); - - for (var i = 0; i < tree.length; i++) { - var node = tree[i]; - node.transform(transform); - } - - var bottomRight = new PointD(bounds.getMaxX(), bounds.getMaxY()); - - return transform.inverseTransformPoint(bottomRight); -}; - -CoSELayout.branchRadialLayout = function (node, parentOfNode, startAngle, endAngle, distance, radialSeparation) { - // First, position this node by finding its angle. - var halfInterval = (endAngle - startAngle + 1) / 2; - - if (halfInterval < 0) { - halfInterval += 180; - } - - var nodeAngle = (halfInterval + startAngle) % 360; - var teta = nodeAngle * IGeometry.TWO_PI / 360; - - // Make polar to java cordinate conversion. - var cos_teta = Math.cos(teta); - var x_ = distance * Math.cos(teta); - var y_ = distance * Math.sin(teta); - - node.setCenter(x_, y_); - - // Traverse all neighbors of this node and recursively call this - // function. - var neighborEdges = []; - neighborEdges = neighborEdges.concat(node.getEdges()); - var childCount = neighborEdges.length; - - if (parentOfNode != null) { - childCount--; - } - - var branchCount = 0; - - var incEdgesCount = neighborEdges.length; - var startIndex; - - var edges = node.getEdgesBetween(parentOfNode); - - // If there are multiple edges, prune them until there remains only one - // edge. - while (edges.length > 1) { - //neighborEdges.remove(edges.remove(0)); - var temp = edges[0]; - edges.splice(0, 1); - var index = neighborEdges.indexOf(temp); - if (index >= 0) { - neighborEdges.splice(index, 1); - } - incEdgesCount--; - childCount--; - } - - if (parentOfNode != null) { - //assert edges.length == 1; - startIndex = (neighborEdges.indexOf(edges[0]) + 1) % incEdgesCount; - } else { - startIndex = 0; - } - - var stepAngle = Math.abs(endAngle - startAngle) / childCount; - - for (var i = startIndex; branchCount != childCount; i = ++i % incEdgesCount) { - var currentNeighbor = neighborEdges[i].getOtherEnd(node); - - // Don't back traverse to root node in current tree. - if (currentNeighbor == parentOfNode) { - continue; - } - - var childStartAngle = (startAngle + branchCount * stepAngle) % 360; - var childEndAngle = (childStartAngle + stepAngle) % 360; - - CoSELayout.branchRadialLayout(currentNeighbor, node, childStartAngle, childEndAngle, distance + radialSeparation, radialSeparation); - - branchCount++; - } -}; - -CoSELayout.maxDiagonalInTree = function (tree) { - var maxDiagonal = Integer.MIN_VALUE; - - for (var i = 0; i < tree.length; i++) { - var node = tree[i]; - var diagonal = node.getDiagonal(); - - if (diagonal > maxDiagonal) { - maxDiagonal = diagonal; - } - } - - return maxDiagonal; -}; - -CoSELayout.prototype.calcRepulsionRange = function () { - // formula is 2 x (level + 1) x idealEdgeLength - return 2 * (this.level + 1) * this.idealEdgeLength; -}; - -// Tiling methods - -// Group zero degree members whose parents are not to be tiled, create dummy parents where needed and fill memberGroups by their dummp parent id's -CoSELayout.prototype.groupZeroDegreeMembers = function () { - var self = this; - // array of [parent_id x oneDegreeNode_id] - var tempMemberGroups = {}; // A temporary map of parent node and its zero degree members - this.memberGroups = {}; // A map of dummy parent node and its zero degree members whose parents are not to be tiled - this.idToDummyNode = {}; // A map of id to dummy node - - var zeroDegree = []; // List of zero degree nodes whose parents are not to be tiled - var allNodes = this.graphManager.getAllNodes(); - - // Fill zero degree list - for (var i = 0; i < allNodes.length; i++) { - var node = allNodes[i]; - var parent = node.getParent(); - // If a node has zero degree and its parent is not to be tiled if exists add that node to zeroDegres list - if (this.getNodeDegreeWithChildren(node) === 0 && (parent.id == undefined || !this.getToBeTiled(parent))) { - zeroDegree.push(node); - } - } - - // Create a map of parent node and its zero degree members - for (var i = 0; i < zeroDegree.length; i++) { - var node = zeroDegree[i]; // Zero degree node itself - var p_id = node.getParent().id; // Parent id - - if (typeof tempMemberGroups[p_id] === "undefined") tempMemberGroups[p_id] = []; - - tempMemberGroups[p_id] = tempMemberGroups[p_id].concat(node); // Push node to the list belongs to its parent in tempMemberGroups - } - - // If there are at least two nodes at a level, create a dummy compound for them - Object.keys(tempMemberGroups).forEach(function (p_id) { - if (tempMemberGroups[p_id].length > 1) { - var dummyCompoundId = "DummyCompound_" + p_id; // The id of dummy compound which will be created soon - self.memberGroups[dummyCompoundId] = tempMemberGroups[p_id]; // Add dummy compound to memberGroups - - var parent = tempMemberGroups[p_id][0].getParent(); // The parent of zero degree nodes will be the parent of new dummy compound - - // Create a dummy compound with calculated id - var dummyCompound = new CoSENode(self.graphManager); - dummyCompound.id = dummyCompoundId; - dummyCompound.paddingLeft = parent.paddingLeft || 0; - dummyCompound.paddingRight = parent.paddingRight || 0; - dummyCompound.paddingBottom = parent.paddingBottom || 0; - dummyCompound.paddingTop = parent.paddingTop || 0; - - self.idToDummyNode[dummyCompoundId] = dummyCompound; - - var dummyParentGraph = self.getGraphManager().add(self.newGraph(), dummyCompound); - var parentGraph = parent.getChild(); - - // Add dummy compound to parent the graph - parentGraph.add(dummyCompound); - - // For each zero degree node in this level remove it from its parent graph and add it to the graph of dummy parent - for (var i = 0; i < tempMemberGroups[p_id].length; i++) { - var node = tempMemberGroups[p_id][i]; - - parentGraph.remove(node); - dummyParentGraph.add(node); - } - } - }); -}; - -CoSELayout.prototype.clearCompounds = function () { - var childGraphMap = {}; - var idToNode = {}; - - // Get compound ordering by finding the inner one first - this.performDFSOnCompounds(); - - for (var i = 0; i < this.compoundOrder.length; i++) { - - idToNode[this.compoundOrder[i].id] = this.compoundOrder[i]; - childGraphMap[this.compoundOrder[i].id] = [].concat(this.compoundOrder[i].getChild().getNodes()); - - // Remove children of compounds - this.graphManager.remove(this.compoundOrder[i].getChild()); - this.compoundOrder[i].child = null; - } - - this.graphManager.resetAllNodes(); - - // Tile the removed children - this.tileCompoundMembers(childGraphMap, idToNode); -}; - -CoSELayout.prototype.clearZeroDegreeMembers = function () { - var self = this; - var tiledZeroDegreePack = this.tiledZeroDegreePack = []; - - Object.keys(this.memberGroups).forEach(function (id) { - var compoundNode = self.idToDummyNode[id]; // Get the dummy compound - - tiledZeroDegreePack[id] = self.tileNodes(self.memberGroups[id], compoundNode.paddingLeft + compoundNode.paddingRight); - - // Set the width and height of the dummy compound as calculated - compoundNode.rect.width = tiledZeroDegreePack[id].width; - compoundNode.rect.height = tiledZeroDegreePack[id].height; - }); -}; - -CoSELayout.prototype.repopulateCompounds = function () { - for (var i = this.compoundOrder.length - 1; i >= 0; i--) { - var lCompoundNode = this.compoundOrder[i]; - var id = lCompoundNode.id; - var horizontalMargin = lCompoundNode.paddingLeft; - var verticalMargin = lCompoundNode.paddingTop; - - this.adjustLocations(this.tiledMemberPack[id], lCompoundNode.rect.x, lCompoundNode.rect.y, horizontalMargin, verticalMargin); - } -}; - -CoSELayout.prototype.repopulateZeroDegreeMembers = function () { - var self = this; - var tiledPack = this.tiledZeroDegreePack; - - Object.keys(tiledPack).forEach(function (id) { - var compoundNode = self.idToDummyNode[id]; // Get the dummy compound by its id - var horizontalMargin = compoundNode.paddingLeft; - var verticalMargin = compoundNode.paddingTop; - - // Adjust the positions of nodes wrt its compound - self.adjustLocations(tiledPack[id], compoundNode.rect.x, compoundNode.rect.y, horizontalMargin, verticalMargin); - }); -}; - -CoSELayout.prototype.getToBeTiled = function (node) { - var id = node.id; - //firstly check the previous results - if (this.toBeTiled[id] != null) { - return this.toBeTiled[id]; - } - - //only compound nodes are to be tiled - var childGraph = node.getChild(); - if (childGraph == null) { - this.toBeTiled[id] = false; - return false; - } - - var children = childGraph.getNodes(); // Get the children nodes - - //a compound node is not to be tiled if all of its compound children are not to be tiled - for (var i = 0; i < children.length; i++) { - var theChild = children[i]; - - if (this.getNodeDegree(theChild) > 0) { - this.toBeTiled[id] = false; - return false; - } - - //pass the children not having the compound structure - if (theChild.getChild() == null) { - this.toBeTiled[theChild.id] = false; - continue; - } - - if (!this.getToBeTiled(theChild)) { - this.toBeTiled[id] = false; - return false; - } - } - this.toBeTiled[id] = true; - return true; -}; - -// Get degree of a node depending of its edges and independent of its children -CoSELayout.prototype.getNodeDegree = function (node) { - var id = node.id; - var edges = node.getEdges(); - var degree = 0; - - // For the edges connected - for (var i = 0; i < edges.length; i++) { - var edge = edges[i]; - if (edge.getSource().id !== edge.getTarget().id) { - degree = degree + 1; - } - } - return degree; -}; - -// Get degree of a node with its children -CoSELayout.prototype.getNodeDegreeWithChildren = function (node) { - var degree = this.getNodeDegree(node); - if (node.getChild() == null) { - return degree; - } - var children = node.getChild().getNodes(); - for (var i = 0; i < children.length; i++) { - var child = children[i]; - degree += this.getNodeDegreeWithChildren(child); - } - return degree; -}; - -CoSELayout.prototype.performDFSOnCompounds = function () { - this.compoundOrder = []; - this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes()); -}; - -CoSELayout.prototype.fillCompexOrderByDFS = function (children) { - for (var i = 0; i < children.length; i++) { - var child = children[i]; - if (child.getChild() != null) { - this.fillCompexOrderByDFS(child.getChild().getNodes()); - } - if (this.getToBeTiled(child)) { - this.compoundOrder.push(child); - } - } -}; - -/** -* This method places each zero degree member wrt given (x,y) coordinates (top left). -*/ -CoSELayout.prototype.adjustLocations = function (organization, x, y, compoundHorizontalMargin, compoundVerticalMargin) { - x += compoundHorizontalMargin; - y += compoundVerticalMargin; - - var left = x; - - for (var i = 0; i < organization.rows.length; i++) { - var row = organization.rows[i]; - x = left; - var maxHeight = 0; - - for (var j = 0; j < row.length; j++) { - var lnode = row[j]; - - lnode.rect.x = x; // + lnode.rect.width / 2; - lnode.rect.y = y; // + lnode.rect.height / 2; - - x += lnode.rect.width + organization.horizontalPadding; - - if (lnode.rect.height > maxHeight) maxHeight = lnode.rect.height; - } - - y += maxHeight + organization.verticalPadding; - } -}; - -CoSELayout.prototype.tileCompoundMembers = function (childGraphMap, idToNode) { - var self = this; - this.tiledMemberPack = []; - - Object.keys(childGraphMap).forEach(function (id) { - // Get the compound node - var compoundNode = idToNode[id]; - - self.tiledMemberPack[id] = self.tileNodes(childGraphMap[id], compoundNode.paddingLeft + compoundNode.paddingRight); - - compoundNode.rect.width = self.tiledMemberPack[id].width; - compoundNode.rect.height = self.tiledMemberPack[id].height; - }); -}; - -CoSELayout.prototype.tileNodes = function (nodes, minWidth) { - var verticalPadding = CoSEConstants.TILING_PADDING_VERTICAL; - var horizontalPadding = CoSEConstants.TILING_PADDING_HORIZONTAL; - var organization = { - rows: [], - rowWidth: [], - rowHeight: [], - width: 0, - height: minWidth, // assume minHeight equals to minWidth - verticalPadding: verticalPadding, - horizontalPadding: horizontalPadding - }; - - // Sort the nodes in ascending order of their areas - nodes.sort(function (n1, n2) { - if (n1.rect.width * n1.rect.height > n2.rect.width * n2.rect.height) return -1; - if (n1.rect.width * n1.rect.height < n2.rect.width * n2.rect.height) return 1; - return 0; - }); - - // Create the organization -> tile members - for (var i = 0; i < nodes.length; i++) { - var lNode = nodes[i]; - - if (organization.rows.length == 0) { - this.insertNodeToRow(organization, lNode, 0, minWidth); - } else if (this.canAddHorizontal(organization, lNode.rect.width, lNode.rect.height)) { - this.insertNodeToRow(organization, lNode, this.getShortestRowIndex(organization), minWidth); - } else { - this.insertNodeToRow(organization, lNode, organization.rows.length, minWidth); - } - - this.shiftToLastRow(organization); - } - - return organization; -}; - -CoSELayout.prototype.insertNodeToRow = function (organization, node, rowIndex, minWidth) { - var minCompoundSize = minWidth; - - // Add new row if needed - if (rowIndex == organization.rows.length) { - var secondDimension = []; - - organization.rows.push(secondDimension); - organization.rowWidth.push(minCompoundSize); - organization.rowHeight.push(0); - } - - // Update row width - var w = organization.rowWidth[rowIndex] + node.rect.width; - - if (organization.rows[rowIndex].length > 0) { - w += organization.horizontalPadding; - } - - organization.rowWidth[rowIndex] = w; - // Update compound width - if (organization.width < w) { - organization.width = w; - } - - // Update height - var h = node.rect.height; - if (rowIndex > 0) h += organization.verticalPadding; - - var extraHeight = 0; - if (h > organization.rowHeight[rowIndex]) { - extraHeight = organization.rowHeight[rowIndex]; - organization.rowHeight[rowIndex] = h; - extraHeight = organization.rowHeight[rowIndex] - extraHeight; - } - - organization.height += extraHeight; - - // Insert node - organization.rows[rowIndex].push(node); -}; - -//Scans the rows of an organization and returns the one with the min width -CoSELayout.prototype.getShortestRowIndex = function (organization) { - var r = -1; - var min = Number.MAX_VALUE; - - for (var i = 0; i < organization.rows.length; i++) { - if (organization.rowWidth[i] < min) { - r = i; - min = organization.rowWidth[i]; - } - } - return r; -}; - -//Scans the rows of an organization and returns the one with the max width -CoSELayout.prototype.getLongestRowIndex = function (organization) { - var r = -1; - var max = Number.MIN_VALUE; - - for (var i = 0; i < organization.rows.length; i++) { - - if (organization.rowWidth[i] > max) { - r = i; - max = organization.rowWidth[i]; - } - } - - return r; -}; - -/** -* This method checks whether adding extra width to the organization violates -* the aspect ratio(1) or not. -*/ -CoSELayout.prototype.canAddHorizontal = function (organization, extraWidth, extraHeight) { - - var sri = this.getShortestRowIndex(organization); - - if (sri < 0) { - return true; - } - - var min = organization.rowWidth[sri]; - - if (min + organization.horizontalPadding + extraWidth <= organization.width) return true; - - var hDiff = 0; - - // Adding to an existing row - if (organization.rowHeight[sri] < extraHeight) { - if (sri > 0) hDiff = extraHeight + organization.verticalPadding - organization.rowHeight[sri]; - } - - var add_to_row_ratio; - if (organization.width - min >= extraWidth + organization.horizontalPadding) { - add_to_row_ratio = (organization.height + hDiff) / (min + extraWidth + organization.horizontalPadding); - } else { - add_to_row_ratio = (organization.height + hDiff) / organization.width; - } - - // Adding a new row for this node - hDiff = extraHeight + organization.verticalPadding; - var add_new_row_ratio; - if (organization.width < extraWidth) { - add_new_row_ratio = (organization.height + hDiff) / extraWidth; - } else { - add_new_row_ratio = (organization.height + hDiff) / organization.width; - } - - if (add_new_row_ratio < 1) add_new_row_ratio = 1 / add_new_row_ratio; - - if (add_to_row_ratio < 1) add_to_row_ratio = 1 / add_to_row_ratio; - - return add_to_row_ratio < add_new_row_ratio; -}; - -//If moving the last node from the longest row and adding it to the last -//row makes the bounding box smaller, do it. -CoSELayout.prototype.shiftToLastRow = function (organization) { - var longest = this.getLongestRowIndex(organization); - var last = organization.rowWidth.length - 1; - var row = organization.rows[longest]; - var node = row[row.length - 1]; - - var diff = node.width + organization.horizontalPadding; - - // Check if there is enough space on the last row - if (organization.width - organization.rowWidth[last] > diff && longest != last) { - // Remove the last element of the longest row - row.splice(-1, 1); - - // Push it to the last row - organization.rows[last].push(node); - - organization.rowWidth[longest] = organization.rowWidth[longest] - diff; - organization.rowWidth[last] = organization.rowWidth[last] + diff; - organization.width = organization.rowWidth[instance.getLongestRowIndex(organization)]; - - // Update heights of the organization - var maxHeight = Number.MIN_VALUE; - for (var i = 0; i < row.length; i++) { - if (row[i].height > maxHeight) maxHeight = row[i].height; - } - if (longest > 0) maxHeight += organization.verticalPadding; - - var prevTotal = organization.rowHeight[longest] + organization.rowHeight[last]; - - organization.rowHeight[longest] = maxHeight; - if (organization.rowHeight[last] < node.height + organization.verticalPadding) organization.rowHeight[last] = node.height + organization.verticalPadding; - - var finalTotal = organization.rowHeight[longest] + organization.rowHeight[last]; - organization.height += finalTotal - prevTotal; - - this.shiftToLastRow(organization); - } -}; - -CoSELayout.prototype.tilingPreLayout = function () { - if (CoSEConstants.TILE) { - // Find zero degree nodes and create a compound for each level - this.groupZeroDegreeMembers(); - // Tile and clear children of each compound - this.clearCompounds(); - // Separately tile and clear zero degree nodes for each level - this.clearZeroDegreeMembers(); - } -}; - -CoSELayout.prototype.tilingPostLayout = function () { - if (CoSEConstants.TILE) { - this.repopulateZeroDegreeMembers(); - this.repopulateCompounds(); - } -}; - -// ----------------------------------------------------------------------------- -// Section: Tree Reduction methods -// ----------------------------------------------------------------------------- -// Reduce trees -CoSELayout.prototype.reduceTrees = function () { - var prunedNodesAll = []; - var containsLeaf = true; - var node; - - while (containsLeaf) { - var allNodes = this.graphManager.getAllNodes(); - var prunedNodesInStepTemp = []; - containsLeaf = false; - - for (var i = 0; i < allNodes.length; i++) { - node = allNodes[i]; - if (node.getEdges().length == 1 && !node.getEdges()[0].isInterGraph && node.getChild() == null) { - prunedNodesInStepTemp.push([node, node.getEdges()[0], node.getOwner()]); - containsLeaf = true; - } - } - if (containsLeaf == true) { - var prunedNodesInStep = []; - for (var j = 0; j < prunedNodesInStepTemp.length; j++) { - if (prunedNodesInStepTemp[j][0].getEdges().length == 1) { - prunedNodesInStep.push(prunedNodesInStepTemp[j]); - prunedNodesInStepTemp[j][0].getOwner().remove(prunedNodesInStepTemp[j][0]); - } - } - prunedNodesAll.push(prunedNodesInStep); - this.graphManager.resetAllNodes(); - this.graphManager.resetAllEdges(); - } - } - this.prunedNodesAll = prunedNodesAll; -}; - -// Grow tree one step -CoSELayout.prototype.growTree = function (prunedNodesAll) { - var lengthOfPrunedNodesInStep = prunedNodesAll.length; - var prunedNodesInStep = prunedNodesAll[lengthOfPrunedNodesInStep - 1]; - - var nodeData; - for (var i = 0; i < prunedNodesInStep.length; i++) { - nodeData = prunedNodesInStep[i]; - - this.findPlaceforPrunedNode(nodeData); - - nodeData[2].add(nodeData[0]); - nodeData[2].add(nodeData[1], nodeData[1].source, nodeData[1].target); - } - - prunedNodesAll.splice(prunedNodesAll.length - 1, 1); - this.graphManager.resetAllNodes(); - this.graphManager.resetAllEdges(); -}; - -// Find an appropriate position to replace pruned node, this method can be improved -CoSELayout.prototype.findPlaceforPrunedNode = function (nodeData) { - - var gridForPrunedNode; - var nodeToConnect; - var prunedNode = nodeData[0]; - if (prunedNode == nodeData[1].source) { - nodeToConnect = nodeData[1].target; - } else { - nodeToConnect = nodeData[1].source; - } - var startGridX = nodeToConnect.startX; - var finishGridX = nodeToConnect.finishX; - var startGridY = nodeToConnect.startY; - var finishGridY = nodeToConnect.finishY; - - var upNodeCount = 0; - var downNodeCount = 0; - var rightNodeCount = 0; - var leftNodeCount = 0; - var controlRegions = [upNodeCount, rightNodeCount, downNodeCount, leftNodeCount]; - - if (startGridY > 0) { - for (var i = startGridX; i <= finishGridX; i++) { - controlRegions[0] += this.grid[i][startGridY - 1].length + this.grid[i][startGridY].length - 1; - } - } - if (finishGridX < this.grid.length - 1) { - for (var i = startGridY; i <= finishGridY; i++) { - controlRegions[1] += this.grid[finishGridX + 1][i].length + this.grid[finishGridX][i].length - 1; - } - } - if (finishGridY < this.grid[0].length - 1) { - for (var i = startGridX; i <= finishGridX; i++) { - controlRegions[2] += this.grid[i][finishGridY + 1].length + this.grid[i][finishGridY].length - 1; - } - } - if (startGridX > 0) { - for (var i = startGridY; i <= finishGridY; i++) { - controlRegions[3] += this.grid[startGridX - 1][i].length + this.grid[startGridX][i].length - 1; - } - } - var min = Integer.MAX_VALUE; - var minCount; - var minIndex; - for (var j = 0; j < controlRegions.length; j++) { - if (controlRegions[j] < min) { - min = controlRegions[j]; - minCount = 1; - minIndex = j; - } else if (controlRegions[j] == min) { - minCount++; - } - } - - if (minCount == 3 && min == 0) { - if (controlRegions[0] == 0 && controlRegions[1] == 0 && controlRegions[2] == 0) { - gridForPrunedNode = 1; - } else if (controlRegions[0] == 0 && controlRegions[1] == 0 && controlRegions[3] == 0) { - gridForPrunedNode = 0; - } else if (controlRegions[0] == 0 && controlRegions[2] == 0 && controlRegions[3] == 0) { - gridForPrunedNode = 3; - } else if (controlRegions[1] == 0 && controlRegions[2] == 0 && controlRegions[3] == 0) { - gridForPrunedNode = 2; - } - } else if (minCount == 2 && min == 0) { - var random = Math.floor(Math.random() * 2); - if (controlRegions[0] == 0 && controlRegions[1] == 0) { - ; - if (random == 0) { - gridForPrunedNode = 0; - } else { - gridForPrunedNode = 1; - } - } else if (controlRegions[0] == 0 && controlRegions[2] == 0) { - if (random == 0) { - gridForPrunedNode = 0; - } else { - gridForPrunedNode = 2; - } - } else if (controlRegions[0] == 0 && controlRegions[3] == 0) { - if (random == 0) { - gridForPrunedNode = 0; - } else { - gridForPrunedNode = 3; - } - } else if (controlRegions[1] == 0 && controlRegions[2] == 0) { - if (random == 0) { - gridForPrunedNode = 1; - } else { - gridForPrunedNode = 2; - } - } else if (controlRegions[1] == 0 && controlRegions[3] == 0) { - if (random == 0) { - gridForPrunedNode = 1; - } else { - gridForPrunedNode = 3; - } - } else { - if (random == 0) { - gridForPrunedNode = 2; - } else { - gridForPrunedNode = 3; - } - } - } else if (minCount == 4 && min == 0) { - var random = Math.floor(Math.random() * 4); - gridForPrunedNode = random; - } else { - gridForPrunedNode = minIndex; - } - - if (gridForPrunedNode == 0) { - prunedNode.setCenter(nodeToConnect.getCenterX(), nodeToConnect.getCenterY() - nodeToConnect.getHeight() / 2 - FDLayoutConstants.DEFAULT_EDGE_LENGTH - prunedNode.getHeight() / 2); - } else if (gridForPrunedNode == 1) { - prunedNode.setCenter(nodeToConnect.getCenterX() + nodeToConnect.getWidth() / 2 + FDLayoutConstants.DEFAULT_EDGE_LENGTH + prunedNode.getWidth() / 2, nodeToConnect.getCenterY()); - } else if (gridForPrunedNode == 2) { - prunedNode.setCenter(nodeToConnect.getCenterX(), nodeToConnect.getCenterY() + nodeToConnect.getHeight() / 2 + FDLayoutConstants.DEFAULT_EDGE_LENGTH + prunedNode.getHeight() / 2); - } else { - prunedNode.setCenter(nodeToConnect.getCenterX() - nodeToConnect.getWidth() / 2 - FDLayoutConstants.DEFAULT_EDGE_LENGTH - prunedNode.getWidth() / 2, nodeToConnect.getCenterY()); - } -}; - -module.exports = CoSELayout; - -/***/ }), -/* 7 */ -/***/ (function(module, exports, __nested_webpack_require_45620__) { - -"use strict"; - - -var coseBase = {}; - -coseBase.layoutBase = __nested_webpack_require_45620__(0); -coseBase.CoSEConstants = __nested_webpack_require_45620__(1); -coseBase.CoSEEdge = __nested_webpack_require_45620__(2); -coseBase.CoSEGraph = __nested_webpack_require_45620__(3); -coseBase.CoSEGraphManager = __nested_webpack_require_45620__(4); -coseBase.CoSELayout = __nested_webpack_require_45620__(6); -coseBase.CoSENode = __nested_webpack_require_45620__(5); - -module.exports = coseBase; - -/***/ }) -/******/ ]); -}); - -/***/ }), - -/***/ 43457: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -(function webpackUniversalModuleDefinition(root, factory) { - if(true) - module.exports = factory(__webpack_require__(87799)); - else {} -})(this, function(__WEBPACK_EXTERNAL_MODULE_0__) { -return /******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // The require function -/******/ function __nested_webpack_require_659__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) { -/******/ return installedModules[moduleId].exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ i: moduleId, -/******/ l: false, -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __nested_webpack_require_659__); -/******/ -/******/ // Flag the module as loaded -/******/ module.l = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __nested_webpack_require_659__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __nested_webpack_require_659__.c = installedModules; -/******/ -/******/ // identity function for calling harmony imports with the correct context -/******/ __nested_webpack_require_659__.i = function(value) { return value; }; -/******/ -/******/ // define getter function for harmony exports -/******/ __nested_webpack_require_659__.d = function(exports, name, getter) { -/******/ if(!__nested_webpack_require_659__.o(exports, name)) { -/******/ Object.defineProperty(exports, name, { -/******/ configurable: false, -/******/ enumerable: true, -/******/ get: getter -/******/ }); -/******/ } -/******/ }; -/******/ -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __nested_webpack_require_659__.n = function(module) { -/******/ var getter = module && module.__esModule ? -/******/ function getDefault() { return module['default']; } : -/******/ function getModuleExports() { return module; }; -/******/ __nested_webpack_require_659__.d(getter, 'a', getter); -/******/ return getter; -/******/ }; -/******/ -/******/ // Object.prototype.hasOwnProperty.call -/******/ __nested_webpack_require_659__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; -/******/ -/******/ // __webpack_public_path__ -/******/ __nested_webpack_require_659__.p = ""; -/******/ -/******/ // Load entry module and return exports -/******/ return __nested_webpack_require_659__(__nested_webpack_require_659__.s = 1); -/******/ }) -/************************************************************************/ -/******/ ([ -/* 0 */ -/***/ (function(module, exports) { - -module.exports = __WEBPACK_EXTERNAL_MODULE_0__; - -/***/ }), -/* 1 */ -/***/ (function(module, exports, __nested_webpack_require_3201__) { - -"use strict"; - - -var LayoutConstants = __nested_webpack_require_3201__(0).layoutBase.LayoutConstants; -var FDLayoutConstants = __nested_webpack_require_3201__(0).layoutBase.FDLayoutConstants; -var CoSEConstants = __nested_webpack_require_3201__(0).CoSEConstants; -var CoSELayout = __nested_webpack_require_3201__(0).CoSELayout; -var CoSENode = __nested_webpack_require_3201__(0).CoSENode; -var PointD = __nested_webpack_require_3201__(0).layoutBase.PointD; -var DimensionD = __nested_webpack_require_3201__(0).layoutBase.DimensionD; - -var defaults = { - // Called on `layoutready` - ready: function ready() {}, - // Called on `layoutstop` - stop: function stop() {}, - // 'draft', 'default' or 'proof" - // - 'draft' fast cooling rate - // - 'default' moderate cooling rate - // - "proof" slow cooling rate - quality: 'default', - // include labels in node dimensions - nodeDimensionsIncludeLabels: false, - // number of ticks per frame; higher is faster but more jerky - refresh: 30, - // Whether to fit the network view after when done - fit: true, - // Padding on fit - padding: 10, - // Whether to enable incremental mode - randomize: true, - // Node repulsion (non overlapping) multiplier - nodeRepulsion: 4500, - // Ideal edge (non nested) length - idealEdgeLength: 50, - // Divisor to compute edge forces - edgeElasticity: 0.45, - // Nesting factor (multiplier) to compute ideal edge length for nested edges - nestingFactor: 0.1, - // Gravity force (constant) - gravity: 0.25, - // Maximum number of iterations to perform - numIter: 2500, - // For enabling tiling - tile: true, - // Type of layout animation. The option set is {'during', 'end', false} - animate: 'end', - // Duration for animate:end - animationDuration: 500, - // Represents the amount of the vertical space to put between the zero degree members during the tiling operation(can also be a function) - tilingPaddingVertical: 10, - // Represents the amount of the horizontal space to put between the zero degree members during the tiling operation(can also be a function) - tilingPaddingHorizontal: 10, - // Gravity range (constant) for compounds - gravityRangeCompound: 1.5, - // Gravity force (constant) for compounds - gravityCompound: 1.0, - // Gravity range (constant) - gravityRange: 3.8, - // Initial cooling factor for incremental layout - initialEnergyOnIncremental: 0.5 -}; - -function extend(defaults, options) { - var obj = {}; - - for (var i in defaults) { - obj[i] = defaults[i]; - } - - for (var i in options) { - obj[i] = options[i]; - } - - return obj; -}; - -function _CoSELayout(_options) { - this.options = extend(defaults, _options); - getUserOptions(this.options); -} - -var getUserOptions = function getUserOptions(options) { - if (options.nodeRepulsion != null) CoSEConstants.DEFAULT_REPULSION_STRENGTH = FDLayoutConstants.DEFAULT_REPULSION_STRENGTH = options.nodeRepulsion; - if (options.idealEdgeLength != null) CoSEConstants.DEFAULT_EDGE_LENGTH = FDLayoutConstants.DEFAULT_EDGE_LENGTH = options.idealEdgeLength; - if (options.edgeElasticity != null) CoSEConstants.DEFAULT_SPRING_STRENGTH = FDLayoutConstants.DEFAULT_SPRING_STRENGTH = options.edgeElasticity; - if (options.nestingFactor != null) CoSEConstants.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = FDLayoutConstants.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = options.nestingFactor; - if (options.gravity != null) CoSEConstants.DEFAULT_GRAVITY_STRENGTH = FDLayoutConstants.DEFAULT_GRAVITY_STRENGTH = options.gravity; - if (options.numIter != null) CoSEConstants.MAX_ITERATIONS = FDLayoutConstants.MAX_ITERATIONS = options.numIter; - if (options.gravityRange != null) CoSEConstants.DEFAULT_GRAVITY_RANGE_FACTOR = FDLayoutConstants.DEFAULT_GRAVITY_RANGE_FACTOR = options.gravityRange; - if (options.gravityCompound != null) CoSEConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH = options.gravityCompound; - if (options.gravityRangeCompound != null) CoSEConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = options.gravityRangeCompound; - if (options.initialEnergyOnIncremental != null) CoSEConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL = options.initialEnergyOnIncremental; - - if (options.quality == 'draft') LayoutConstants.QUALITY = 0;else if (options.quality == 'proof') LayoutConstants.QUALITY = 2;else LayoutConstants.QUALITY = 1; - - CoSEConstants.NODE_DIMENSIONS_INCLUDE_LABELS = FDLayoutConstants.NODE_DIMENSIONS_INCLUDE_LABELS = LayoutConstants.NODE_DIMENSIONS_INCLUDE_LABELS = options.nodeDimensionsIncludeLabels; - CoSEConstants.DEFAULT_INCREMENTAL = FDLayoutConstants.DEFAULT_INCREMENTAL = LayoutConstants.DEFAULT_INCREMENTAL = !options.randomize; - CoSEConstants.ANIMATE = FDLayoutConstants.ANIMATE = LayoutConstants.ANIMATE = options.animate; - CoSEConstants.TILE = options.tile; - CoSEConstants.TILING_PADDING_VERTICAL = typeof options.tilingPaddingVertical === 'function' ? options.tilingPaddingVertical.call() : options.tilingPaddingVertical; - CoSEConstants.TILING_PADDING_HORIZONTAL = typeof options.tilingPaddingHorizontal === 'function' ? options.tilingPaddingHorizontal.call() : options.tilingPaddingHorizontal; -}; - -_CoSELayout.prototype.run = function () { - var ready; - var frameId; - var options = this.options; - var idToLNode = this.idToLNode = {}; - var layout = this.layout = new CoSELayout(); - var self = this; - - self.stopped = false; - - this.cy = this.options.cy; - - this.cy.trigger({ type: 'layoutstart', layout: this }); - - var gm = layout.newGraphManager(); - this.gm = gm; - - var nodes = this.options.eles.nodes(); - var edges = this.options.eles.edges(); - - this.root = gm.addRoot(); - this.processChildrenList(this.root, this.getTopMostNodes(nodes), layout); - - for (var i = 0; i < edges.length; i++) { - var edge = edges[i]; - var sourceNode = this.idToLNode[edge.data("source")]; - var targetNode = this.idToLNode[edge.data("target")]; - if (sourceNode !== targetNode && sourceNode.getEdgesBetween(targetNode).length == 0) { - var e1 = gm.add(layout.newEdge(), sourceNode, targetNode); - e1.id = edge.id(); - } - } - - var getPositions = function getPositions(ele, i) { - if (typeof ele === "number") { - ele = i; - } - var theId = ele.data('id'); - var lNode = self.idToLNode[theId]; - - return { - x: lNode.getRect().getCenterX(), - y: lNode.getRect().getCenterY() - }; - }; - - /* - * Reposition nodes in iterations animatedly - */ - var iterateAnimated = function iterateAnimated() { - // Thigs to perform after nodes are repositioned on screen - var afterReposition = function afterReposition() { - if (options.fit) { - options.cy.fit(options.eles, options.padding); - } - - if (!ready) { - ready = true; - self.cy.one('layoutready', options.ready); - self.cy.trigger({ type: 'layoutready', layout: self }); - } - }; - - var ticksPerFrame = self.options.refresh; - var isDone; - - for (var i = 0; i < ticksPerFrame && !isDone; i++) { - isDone = self.stopped || self.layout.tick(); - } - - // If layout is done - if (isDone) { - // If the layout is not a sublayout and it is successful perform post layout. - if (layout.checkLayoutSuccess() && !layout.isSubLayout) { - layout.doPostLayout(); - } - - // If layout has a tilingPostLayout function property call it. - if (layout.tilingPostLayout) { - layout.tilingPostLayout(); - } - - layout.isLayoutFinished = true; - - self.options.eles.nodes().positions(getPositions); - - afterReposition(); - - // trigger layoutstop when the layout stops (e.g. finishes) - self.cy.one('layoutstop', self.options.stop); - self.cy.trigger({ type: 'layoutstop', layout: self }); - - if (frameId) { - cancelAnimationFrame(frameId); - } - - ready = false; - return; - } - - var animationData = self.layout.getPositionsData(); // Get positions of layout nodes note that all nodes may not be layout nodes because of tiling - - // Position nodes, for the nodes whose id does not included in data (because they are removed from their parents and included in dummy compounds) - // use position of their ancestors or dummy ancestors - options.eles.nodes().positions(function (ele, i) { - if (typeof ele === "number") { - ele = i; - } - // If ele is a compound node, then its position will be defined by its children - if (!ele.isParent()) { - var theId = ele.id(); - var pNode = animationData[theId]; - var temp = ele; - // If pNode is undefined search until finding position data of its first ancestor (It may be dummy as well) - while (pNode == null) { - pNode = animationData[temp.data('parent')] || animationData['DummyCompound_' + temp.data('parent')]; - animationData[theId] = pNode; - temp = temp.parent()[0]; - if (temp == undefined) { - break; - } - } - if (pNode != null) { - return { - x: pNode.x, - y: pNode.y - }; - } else { - return { - x: ele.position('x'), - y: ele.position('y') - }; - } - } - }); - - afterReposition(); - - frameId = requestAnimationFrame(iterateAnimated); - }; - - /* - * Listen 'layoutstarted' event and start animated iteration if animate option is 'during' - */ - layout.addListener('layoutstarted', function () { - if (self.options.animate === 'during') { - frameId = requestAnimationFrame(iterateAnimated); - } - }); - - layout.runLayout(); // Run cose layout - - /* - * If animate option is not 'during' ('end' or false) perform these here (If it is 'during' similar things are already performed) - */ - if (this.options.animate !== "during") { - self.options.eles.nodes().not(":parent").layoutPositions(self, self.options, getPositions); // Use layout positions to reposition the nodes it considers the options parameter - ready = false; - } - - return this; // chaining -}; - -//Get the top most ones of a list of nodes -_CoSELayout.prototype.getTopMostNodes = function (nodes) { - var nodesMap = {}; - for (var i = 0; i < nodes.length; i++) { - nodesMap[nodes[i].id()] = true; - } - var roots = nodes.filter(function (ele, i) { - if (typeof ele === "number") { - ele = i; - } - var parent = ele.parent()[0]; - while (parent != null) { - if (nodesMap[parent.id()]) { - return false; - } - parent = parent.parent()[0]; - } - return true; - }); - - return roots; -}; - -_CoSELayout.prototype.processChildrenList = function (parent, children, layout) { - var size = children.length; - for (var i = 0; i < size; i++) { - var theChild = children[i]; - var children_of_children = theChild.children(); - var theNode; - - var dimensions = theChild.layoutDimensions({ - nodeDimensionsIncludeLabels: this.options.nodeDimensionsIncludeLabels - }); - - if (theChild.outerWidth() != null && theChild.outerHeight() != null) { - theNode = parent.add(new CoSENode(layout.graphManager, new PointD(theChild.position('x') - dimensions.w / 2, theChild.position('y') - dimensions.h / 2), new DimensionD(parseFloat(dimensions.w), parseFloat(dimensions.h)))); - } else { - theNode = parent.add(new CoSENode(this.graphManager)); - } - // Attach id to the layout node - theNode.id = theChild.data("id"); - // Attach the paddings of cy node to layout node - theNode.paddingLeft = parseInt(theChild.css('padding')); - theNode.paddingTop = parseInt(theChild.css('padding')); - theNode.paddingRight = parseInt(theChild.css('padding')); - theNode.paddingBottom = parseInt(theChild.css('padding')); - - //Attach the label properties to compound if labels will be included in node dimensions - if (this.options.nodeDimensionsIncludeLabels) { - if (theChild.isParent()) { - var labelWidth = theChild.boundingBox({ includeLabels: true, includeNodes: false }).w; - var labelHeight = theChild.boundingBox({ includeLabels: true, includeNodes: false }).h; - var labelPos = theChild.css("text-halign"); - theNode.labelWidth = labelWidth; - theNode.labelHeight = labelHeight; - theNode.labelPos = labelPos; - } - } - - // Map the layout node - this.idToLNode[theChild.data("id")] = theNode; - - if (isNaN(theNode.rect.x)) { - theNode.rect.x = 0; - } - - if (isNaN(theNode.rect.y)) { - theNode.rect.y = 0; - } - - if (children_of_children != null && children_of_children.length > 0) { - var theNewGraph; - theNewGraph = layout.getGraphManager().add(layout.newGraph(), theNode); - this.processChildrenList(theNewGraph, children_of_children, layout); - } - } -}; - -/** - * @brief : called on continuous layouts to stop them before they finish - */ -_CoSELayout.prototype.stop = function () { - this.stopped = true; - - return this; // chaining -}; - -var register = function register(cytoscape) { - // var Layout = getLayout( cytoscape ); - - cytoscape('layout', 'cose-bilkent', _CoSELayout); -}; - -// auto reg for globals -if (typeof cytoscape !== 'undefined') { - register(cytoscape); -} - -module.exports = register; - -/***/ }) -/******/ ]); -}); - -/***/ }), - -/***/ 23143: -/***/ (function(module) { - -(function webpackUniversalModuleDefinition(root, factory) { - if(true) - module.exports = factory(); - else {} -})(this, function() { -return /******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // The require function -/******/ function __nested_webpack_require_543__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) { -/******/ return installedModules[moduleId].exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ i: moduleId, -/******/ l: false, -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __nested_webpack_require_543__); -/******/ -/******/ // Flag the module as loaded -/******/ module.l = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __nested_webpack_require_543__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __nested_webpack_require_543__.c = installedModules; -/******/ -/******/ // identity function for calling harmony imports with the correct context -/******/ __nested_webpack_require_543__.i = function(value) { return value; }; -/******/ -/******/ // define getter function for harmony exports -/******/ __nested_webpack_require_543__.d = function(exports, name, getter) { -/******/ if(!__nested_webpack_require_543__.o(exports, name)) { -/******/ Object.defineProperty(exports, name, { -/******/ configurable: false, -/******/ enumerable: true, -/******/ get: getter -/******/ }); -/******/ } -/******/ }; -/******/ -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __nested_webpack_require_543__.n = function(module) { -/******/ var getter = module && module.__esModule ? -/******/ function getDefault() { return module['default']; } : -/******/ function getModuleExports() { return module; }; -/******/ __nested_webpack_require_543__.d(getter, 'a', getter); -/******/ return getter; -/******/ }; -/******/ -/******/ // Object.prototype.hasOwnProperty.call -/******/ __nested_webpack_require_543__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; -/******/ -/******/ // __webpack_public_path__ -/******/ __nested_webpack_require_543__.p = ""; -/******/ -/******/ // Load entry module and return exports -/******/ return __nested_webpack_require_543__(__nested_webpack_require_543__.s = 26); -/******/ }) -/************************************************************************/ -/******/ ([ -/* 0 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -function LayoutConstants() {} - -/** - * Layout Quality: 0:draft, 1:default, 2:proof - */ -LayoutConstants.QUALITY = 1; - -/** - * Default parameters - */ -LayoutConstants.DEFAULT_CREATE_BENDS_AS_NEEDED = false; -LayoutConstants.DEFAULT_INCREMENTAL = false; -LayoutConstants.DEFAULT_ANIMATION_ON_LAYOUT = true; -LayoutConstants.DEFAULT_ANIMATION_DURING_LAYOUT = false; -LayoutConstants.DEFAULT_ANIMATION_PERIOD = 50; -LayoutConstants.DEFAULT_UNIFORM_LEAF_NODE_SIZES = false; - -// ----------------------------------------------------------------------------- -// Section: General other constants -// ----------------------------------------------------------------------------- -/* - * Margins of a graph to be applied on bouding rectangle of its contents. We - * assume margins on all four sides to be uniform. - */ -LayoutConstants.DEFAULT_GRAPH_MARGIN = 15; - -/* - * Whether to consider labels in node dimensions or not - */ -LayoutConstants.NODE_DIMENSIONS_INCLUDE_LABELS = false; - -/* - * Default dimension of a non-compound node. - */ -LayoutConstants.SIMPLE_NODE_SIZE = 40; - -/* - * Default dimension of a non-compound node. - */ -LayoutConstants.SIMPLE_NODE_HALF_SIZE = LayoutConstants.SIMPLE_NODE_SIZE / 2; - -/* - * Empty compound node size. When a compound node is empty, its both - * dimensions should be of this value. - */ -LayoutConstants.EMPTY_COMPOUND_NODE_SIZE = 40; - -/* - * Minimum length that an edge should take during layout - */ -LayoutConstants.MIN_EDGE_LENGTH = 1; - -/* - * World boundaries that layout operates on - */ -LayoutConstants.WORLD_BOUNDARY = 1000000; - -/* - * World boundaries that random positioning can be performed with - */ -LayoutConstants.INITIAL_WORLD_BOUNDARY = LayoutConstants.WORLD_BOUNDARY / 1000; - -/* - * Coordinates of the world center - */ -LayoutConstants.WORLD_CENTER_X = 1200; -LayoutConstants.WORLD_CENTER_Y = 900; - -module.exports = LayoutConstants; - -/***/ }), -/* 1 */ -/***/ (function(module, exports, __nested_webpack_require_4947__) { - -"use strict"; - - -var LGraphObject = __nested_webpack_require_4947__(2); -var IGeometry = __nested_webpack_require_4947__(8); -var IMath = __nested_webpack_require_4947__(9); - -function LEdge(source, target, vEdge) { - LGraphObject.call(this, vEdge); - - this.isOverlapingSourceAndTarget = false; - this.vGraphObject = vEdge; - this.bendpoints = []; - this.source = source; - this.target = target; -} - -LEdge.prototype = Object.create(LGraphObject.prototype); - -for (var prop in LGraphObject) { - LEdge[prop] = LGraphObject[prop]; -} - -LEdge.prototype.getSource = function () { - return this.source; -}; - -LEdge.prototype.getTarget = function () { - return this.target; -}; - -LEdge.prototype.isInterGraph = function () { - return this.isInterGraph; -}; - -LEdge.prototype.getLength = function () { - return this.length; -}; - -LEdge.prototype.isOverlapingSourceAndTarget = function () { - return this.isOverlapingSourceAndTarget; -}; - -LEdge.prototype.getBendpoints = function () { - return this.bendpoints; -}; - -LEdge.prototype.getLca = function () { - return this.lca; -}; - -LEdge.prototype.getSourceInLca = function () { - return this.sourceInLca; -}; - -LEdge.prototype.getTargetInLca = function () { - return this.targetInLca; -}; - -LEdge.prototype.getOtherEnd = function (node) { - if (this.source === node) { - return this.target; - } else if (this.target === node) { - return this.source; - } else { - throw "Node is not incident with this edge"; - } -}; - -LEdge.prototype.getOtherEndInGraph = function (node, graph) { - var otherEnd = this.getOtherEnd(node); - var root = graph.getGraphManager().getRoot(); - - while (true) { - if (otherEnd.getOwner() == graph) { - return otherEnd; - } - - if (otherEnd.getOwner() == root) { - break; - } - - otherEnd = otherEnd.getOwner().getParent(); - } - - return null; -}; - -LEdge.prototype.updateLength = function () { - var clipPointCoordinates = new Array(4); - - this.isOverlapingSourceAndTarget = IGeometry.getIntersection(this.target.getRect(), this.source.getRect(), clipPointCoordinates); - - if (!this.isOverlapingSourceAndTarget) { - this.lengthX = clipPointCoordinates[0] - clipPointCoordinates[2]; - this.lengthY = clipPointCoordinates[1] - clipPointCoordinates[3]; - - if (Math.abs(this.lengthX) < 1.0) { - this.lengthX = IMath.sign(this.lengthX); - } - - if (Math.abs(this.lengthY) < 1.0) { - this.lengthY = IMath.sign(this.lengthY); - } - - this.length = Math.sqrt(this.lengthX * this.lengthX + this.lengthY * this.lengthY); - } -}; - -LEdge.prototype.updateLengthSimple = function () { - this.lengthX = this.target.getCenterX() - this.source.getCenterX(); - this.lengthY = this.target.getCenterY() - this.source.getCenterY(); - - if (Math.abs(this.lengthX) < 1.0) { - this.lengthX = IMath.sign(this.lengthX); - } - - if (Math.abs(this.lengthY) < 1.0) { - this.lengthY = IMath.sign(this.lengthY); - } - - this.length = Math.sqrt(this.lengthX * this.lengthX + this.lengthY * this.lengthY); -}; - -module.exports = LEdge; - -/***/ }), -/* 2 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -function LGraphObject(vGraphObject) { - this.vGraphObject = vGraphObject; -} - -module.exports = LGraphObject; - -/***/ }), -/* 3 */ -/***/ (function(module, exports, __nested_webpack_require_8167__) { - -"use strict"; - - -var LGraphObject = __nested_webpack_require_8167__(2); -var Integer = __nested_webpack_require_8167__(10); -var RectangleD = __nested_webpack_require_8167__(13); -var LayoutConstants = __nested_webpack_require_8167__(0); -var RandomSeed = __nested_webpack_require_8167__(16); -var PointD = __nested_webpack_require_8167__(4); - -function LNode(gm, loc, size, vNode) { - //Alternative constructor 1 : LNode(LGraphManager gm, Point loc, Dimension size, Object vNode) - if (size == null && vNode == null) { - vNode = loc; - } - - LGraphObject.call(this, vNode); - - //Alternative constructor 2 : LNode(Layout layout, Object vNode) - if (gm.graphManager != null) gm = gm.graphManager; - - this.estimatedSize = Integer.MIN_VALUE; - this.inclusionTreeDepth = Integer.MAX_VALUE; - this.vGraphObject = vNode; - this.edges = []; - this.graphManager = gm; - - if (size != null && loc != null) this.rect = new RectangleD(loc.x, loc.y, size.width, size.height);else this.rect = new RectangleD(); -} - -LNode.prototype = Object.create(LGraphObject.prototype); -for (var prop in LGraphObject) { - LNode[prop] = LGraphObject[prop]; -} - -LNode.prototype.getEdges = function () { - return this.edges; -}; - -LNode.prototype.getChild = function () { - return this.child; -}; - -LNode.prototype.getOwner = function () { - // if (this.owner != null) { - // if (!(this.owner == null || this.owner.getNodes().indexOf(this) > -1)) { - // throw "assert failed"; - // } - // } - - return this.owner; -}; - -LNode.prototype.getWidth = function () { - return this.rect.width; -}; - -LNode.prototype.setWidth = function (width) { - this.rect.width = width; -}; - -LNode.prototype.getHeight = function () { - return this.rect.height; -}; - -LNode.prototype.setHeight = function (height) { - this.rect.height = height; -}; - -LNode.prototype.getCenterX = function () { - return this.rect.x + this.rect.width / 2; -}; - -LNode.prototype.getCenterY = function () { - return this.rect.y + this.rect.height / 2; -}; - -LNode.prototype.getCenter = function () { - return new PointD(this.rect.x + this.rect.width / 2, this.rect.y + this.rect.height / 2); -}; - -LNode.prototype.getLocation = function () { - return new PointD(this.rect.x, this.rect.y); -}; - -LNode.prototype.getRect = function () { - return this.rect; -}; - -LNode.prototype.getDiagonal = function () { - return Math.sqrt(this.rect.width * this.rect.width + this.rect.height * this.rect.height); -}; - -/** - * This method returns half the diagonal length of this node. - */ -LNode.prototype.getHalfTheDiagonal = function () { - return Math.sqrt(this.rect.height * this.rect.height + this.rect.width * this.rect.width) / 2; -}; - -LNode.prototype.setRect = function (upperLeft, dimension) { - this.rect.x = upperLeft.x; - this.rect.y = upperLeft.y; - this.rect.width = dimension.width; - this.rect.height = dimension.height; -}; - -LNode.prototype.setCenter = function (cx, cy) { - this.rect.x = cx - this.rect.width / 2; - this.rect.y = cy - this.rect.height / 2; -}; - -LNode.prototype.setLocation = function (x, y) { - this.rect.x = x; - this.rect.y = y; -}; - -LNode.prototype.moveBy = function (dx, dy) { - this.rect.x += dx; - this.rect.y += dy; -}; - -LNode.prototype.getEdgeListToNode = function (to) { - var edgeList = []; - var edge; - var self = this; - - self.edges.forEach(function (edge) { - - if (edge.target == to) { - if (edge.source != self) throw "Incorrect edge source!"; - - edgeList.push(edge); - } - }); - - return edgeList; -}; - -LNode.prototype.getEdgesBetween = function (other) { - var edgeList = []; - var edge; - - var self = this; - self.edges.forEach(function (edge) { - - if (!(edge.source == self || edge.target == self)) throw "Incorrect edge source and/or target"; - - if (edge.target == other || edge.source == other) { - edgeList.push(edge); - } - }); - - return edgeList; -}; - -LNode.prototype.getNeighborsList = function () { - var neighbors = new Set(); - - var self = this; - self.edges.forEach(function (edge) { - - if (edge.source == self) { - neighbors.add(edge.target); - } else { - if (edge.target != self) { - throw "Incorrect incidency!"; - } - - neighbors.add(edge.source); - } - }); - - return neighbors; -}; - -LNode.prototype.withChildren = function () { - var withNeighborsList = new Set(); - var childNode; - var children; - - withNeighborsList.add(this); - - if (this.child != null) { - var nodes = this.child.getNodes(); - for (var i = 0; i < nodes.length; i++) { - childNode = nodes[i]; - children = childNode.withChildren(); - children.forEach(function (node) { - withNeighborsList.add(node); - }); - } - } - - return withNeighborsList; -}; - -LNode.prototype.getNoOfChildren = function () { - var noOfChildren = 0; - var childNode; - - if (this.child == null) { - noOfChildren = 1; - } else { - var nodes = this.child.getNodes(); - for (var i = 0; i < nodes.length; i++) { - childNode = nodes[i]; - - noOfChildren += childNode.getNoOfChildren(); - } - } - - if (noOfChildren == 0) { - noOfChildren = 1; - } - return noOfChildren; -}; - -LNode.prototype.getEstimatedSize = function () { - if (this.estimatedSize == Integer.MIN_VALUE) { - throw "assert failed"; - } - return this.estimatedSize; -}; - -LNode.prototype.calcEstimatedSize = function () { - if (this.child == null) { - return this.estimatedSize = (this.rect.width + this.rect.height) / 2; - } else { - this.estimatedSize = this.child.calcEstimatedSize(); - this.rect.width = this.estimatedSize; - this.rect.height = this.estimatedSize; - - return this.estimatedSize; - } -}; - -LNode.prototype.scatter = function () { - var randomCenterX; - var randomCenterY; - - var minX = -LayoutConstants.INITIAL_WORLD_BOUNDARY; - var maxX = LayoutConstants.INITIAL_WORLD_BOUNDARY; - randomCenterX = LayoutConstants.WORLD_CENTER_X + RandomSeed.nextDouble() * (maxX - minX) + minX; - - var minY = -LayoutConstants.INITIAL_WORLD_BOUNDARY; - var maxY = LayoutConstants.INITIAL_WORLD_BOUNDARY; - randomCenterY = LayoutConstants.WORLD_CENTER_Y + RandomSeed.nextDouble() * (maxY - minY) + minY; - - this.rect.x = randomCenterX; - this.rect.y = randomCenterY; -}; - -LNode.prototype.updateBounds = function () { - if (this.getChild() == null) { - throw "assert failed"; - } - if (this.getChild().getNodes().length != 0) { - // wrap the children nodes by re-arranging the boundaries - var childGraph = this.getChild(); - childGraph.updateBounds(true); - - this.rect.x = childGraph.getLeft(); - this.rect.y = childGraph.getTop(); - - this.setWidth(childGraph.getRight() - childGraph.getLeft()); - this.setHeight(childGraph.getBottom() - childGraph.getTop()); - - // Update compound bounds considering its label properties - if (LayoutConstants.NODE_DIMENSIONS_INCLUDE_LABELS) { - - var width = childGraph.getRight() - childGraph.getLeft(); - var height = childGraph.getBottom() - childGraph.getTop(); - - if (this.labelWidth > width) { - this.rect.x -= (this.labelWidth - width) / 2; - this.setWidth(this.labelWidth); - } - - if (this.labelHeight > height) { - if (this.labelPos == "center") { - this.rect.y -= (this.labelHeight - height) / 2; - } else if (this.labelPos == "top") { - this.rect.y -= this.labelHeight - height; - } - this.setHeight(this.labelHeight); - } - } - } -}; - -LNode.prototype.getInclusionTreeDepth = function () { - if (this.inclusionTreeDepth == Integer.MAX_VALUE) { - throw "assert failed"; - } - return this.inclusionTreeDepth; -}; - -LNode.prototype.transform = function (trans) { - var left = this.rect.x; - - if (left > LayoutConstants.WORLD_BOUNDARY) { - left = LayoutConstants.WORLD_BOUNDARY; - } else if (left < -LayoutConstants.WORLD_BOUNDARY) { - left = -LayoutConstants.WORLD_BOUNDARY; - } - - var top = this.rect.y; - - if (top > LayoutConstants.WORLD_BOUNDARY) { - top = LayoutConstants.WORLD_BOUNDARY; - } else if (top < -LayoutConstants.WORLD_BOUNDARY) { - top = -LayoutConstants.WORLD_BOUNDARY; - } - - var leftTop = new PointD(left, top); - var vLeftTop = trans.inverseTransformPoint(leftTop); - - this.setLocation(vLeftTop.x, vLeftTop.y); -}; - -LNode.prototype.getLeft = function () { - return this.rect.x; -}; - -LNode.prototype.getRight = function () { - return this.rect.x + this.rect.width; -}; - -LNode.prototype.getTop = function () { - return this.rect.y; -}; - -LNode.prototype.getBottom = function () { - return this.rect.y + this.rect.height; -}; - -LNode.prototype.getParent = function () { - if (this.owner == null) { - return null; - } - - return this.owner.getParent(); -}; - -module.exports = LNode; - -/***/ }), -/* 4 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -function PointD(x, y) { - if (x == null && y == null) { - this.x = 0; - this.y = 0; - } else { - this.x = x; - this.y = y; - } -} - -PointD.prototype.getX = function () { - return this.x; -}; - -PointD.prototype.getY = function () { - return this.y; -}; - -PointD.prototype.setX = function (x) { - this.x = x; -}; - -PointD.prototype.setY = function (y) { - this.y = y; -}; - -PointD.prototype.getDifference = function (pt) { - return new DimensionD(this.x - pt.x, this.y - pt.y); -}; - -PointD.prototype.getCopy = function () { - return new PointD(this.x, this.y); -}; - -PointD.prototype.translate = function (dim) { - this.x += dim.width; - this.y += dim.height; - return this; -}; - -module.exports = PointD; - -/***/ }), -/* 5 */ -/***/ (function(module, exports, __nested_webpack_require_17549__) { - -"use strict"; - - -var LGraphObject = __nested_webpack_require_17549__(2); -var Integer = __nested_webpack_require_17549__(10); -var LayoutConstants = __nested_webpack_require_17549__(0); -var LGraphManager = __nested_webpack_require_17549__(6); -var LNode = __nested_webpack_require_17549__(3); -var LEdge = __nested_webpack_require_17549__(1); -var RectangleD = __nested_webpack_require_17549__(13); -var Point = __nested_webpack_require_17549__(12); -var LinkedList = __nested_webpack_require_17549__(11); - -function LGraph(parent, obj2, vGraph) { - LGraphObject.call(this, vGraph); - this.estimatedSize = Integer.MIN_VALUE; - this.margin = LayoutConstants.DEFAULT_GRAPH_MARGIN; - this.edges = []; - this.nodes = []; - this.isConnected = false; - this.parent = parent; - - if (obj2 != null && obj2 instanceof LGraphManager) { - this.graphManager = obj2; - } else if (obj2 != null && obj2 instanceof Layout) { - this.graphManager = obj2.graphManager; - } -} - -LGraph.prototype = Object.create(LGraphObject.prototype); -for (var prop in LGraphObject) { - LGraph[prop] = LGraphObject[prop]; -} - -LGraph.prototype.getNodes = function () { - return this.nodes; -}; - -LGraph.prototype.getEdges = function () { - return this.edges; -}; - -LGraph.prototype.getGraphManager = function () { - return this.graphManager; -}; - -LGraph.prototype.getParent = function () { - return this.parent; -}; - -LGraph.prototype.getLeft = function () { - return this.left; -}; - -LGraph.prototype.getRight = function () { - return this.right; -}; - -LGraph.prototype.getTop = function () { - return this.top; -}; - -LGraph.prototype.getBottom = function () { - return this.bottom; -}; - -LGraph.prototype.isConnected = function () { - return this.isConnected; -}; - -LGraph.prototype.add = function (obj1, sourceNode, targetNode) { - if (sourceNode == null && targetNode == null) { - var newNode = obj1; - if (this.graphManager == null) { - throw "Graph has no graph mgr!"; - } - if (this.getNodes().indexOf(newNode) > -1) { - throw "Node already in graph!"; - } - newNode.owner = this; - this.getNodes().push(newNode); - - return newNode; - } else { - var newEdge = obj1; - if (!(this.getNodes().indexOf(sourceNode) > -1 && this.getNodes().indexOf(targetNode) > -1)) { - throw "Source or target not in graph!"; - } - - if (!(sourceNode.owner == targetNode.owner && sourceNode.owner == this)) { - throw "Both owners must be this graph!"; - } - - if (sourceNode.owner != targetNode.owner) { - return null; - } - - // set source and target - newEdge.source = sourceNode; - newEdge.target = targetNode; - - // set as intra-graph edge - newEdge.isInterGraph = false; - - // add to graph edge list - this.getEdges().push(newEdge); - - // add to incidency lists - sourceNode.edges.push(newEdge); - - if (targetNode != sourceNode) { - targetNode.edges.push(newEdge); - } - - return newEdge; - } -}; - -LGraph.prototype.remove = function (obj) { - var node = obj; - if (obj instanceof LNode) { - if (node == null) { - throw "Node is null!"; - } - if (!(node.owner != null && node.owner == this)) { - throw "Owner graph is invalid!"; - } - if (this.graphManager == null) { - throw "Owner graph manager is invalid!"; - } - // remove incident edges first (make a copy to do it safely) - var edgesToBeRemoved = node.edges.slice(); - var edge; - var s = edgesToBeRemoved.length; - for (var i = 0; i < s; i++) { - edge = edgesToBeRemoved[i]; - - if (edge.isInterGraph) { - this.graphManager.remove(edge); - } else { - edge.source.owner.remove(edge); - } - } - - // now the node itself - var index = this.nodes.indexOf(node); - if (index == -1) { - throw "Node not in owner node list!"; - } - - this.nodes.splice(index, 1); - } else if (obj instanceof LEdge) { - var edge = obj; - if (edge == null) { - throw "Edge is null!"; - } - if (!(edge.source != null && edge.target != null)) { - throw "Source and/or target is null!"; - } - if (!(edge.source.owner != null && edge.target.owner != null && edge.source.owner == this && edge.target.owner == this)) { - throw "Source and/or target owner is invalid!"; - } - - var sourceIndex = edge.source.edges.indexOf(edge); - var targetIndex = edge.target.edges.indexOf(edge); - if (!(sourceIndex > -1 && targetIndex > -1)) { - throw "Source and/or target doesn't know this edge!"; - } - - edge.source.edges.splice(sourceIndex, 1); - - if (edge.target != edge.source) { - edge.target.edges.splice(targetIndex, 1); - } - - var index = edge.source.owner.getEdges().indexOf(edge); - if (index == -1) { - throw "Not in owner's edge list!"; - } - - edge.source.owner.getEdges().splice(index, 1); - } -}; - -LGraph.prototype.updateLeftTop = function () { - var top = Integer.MAX_VALUE; - var left = Integer.MAX_VALUE; - var nodeTop; - var nodeLeft; - var margin; - - var nodes = this.getNodes(); - var s = nodes.length; - - for (var i = 0; i < s; i++) { - var lNode = nodes[i]; - nodeTop = lNode.getTop(); - nodeLeft = lNode.getLeft(); - - if (top > nodeTop) { - top = nodeTop; - } - - if (left > nodeLeft) { - left = nodeLeft; - } - } - - // Do we have any nodes in this graph? - if (top == Integer.MAX_VALUE) { - return null; - } - - if (nodes[0].getParent().paddingLeft != undefined) { - margin = nodes[0].getParent().paddingLeft; - } else { - margin = this.margin; - } - - this.left = left - margin; - this.top = top - margin; - - // Apply the margins and return the result - return new Point(this.left, this.top); -}; - -LGraph.prototype.updateBounds = function (recursive) { - // calculate bounds - var left = Integer.MAX_VALUE; - var right = -Integer.MAX_VALUE; - var top = Integer.MAX_VALUE; - var bottom = -Integer.MAX_VALUE; - var nodeLeft; - var nodeRight; - var nodeTop; - var nodeBottom; - var margin; - - var nodes = this.nodes; - var s = nodes.length; - for (var i = 0; i < s; i++) { - var lNode = nodes[i]; - - if (recursive && lNode.child != null) { - lNode.updateBounds(); - } - nodeLeft = lNode.getLeft(); - nodeRight = lNode.getRight(); - nodeTop = lNode.getTop(); - nodeBottom = lNode.getBottom(); - - if (left > nodeLeft) { - left = nodeLeft; - } - - if (right < nodeRight) { - right = nodeRight; - } - - if (top > nodeTop) { - top = nodeTop; - } - - if (bottom < nodeBottom) { - bottom = nodeBottom; - } - } - - var boundingRect = new RectangleD(left, top, right - left, bottom - top); - if (left == Integer.MAX_VALUE) { - this.left = this.parent.getLeft(); - this.right = this.parent.getRight(); - this.top = this.parent.getTop(); - this.bottom = this.parent.getBottom(); - } - - if (nodes[0].getParent().paddingLeft != undefined) { - margin = nodes[0].getParent().paddingLeft; - } else { - margin = this.margin; - } - - this.left = boundingRect.x - margin; - this.right = boundingRect.x + boundingRect.width + margin; - this.top = boundingRect.y - margin; - this.bottom = boundingRect.y + boundingRect.height + margin; -}; - -LGraph.calculateBounds = function (nodes) { - var left = Integer.MAX_VALUE; - var right = -Integer.MAX_VALUE; - var top = Integer.MAX_VALUE; - var bottom = -Integer.MAX_VALUE; - var nodeLeft; - var nodeRight; - var nodeTop; - var nodeBottom; - - var s = nodes.length; - - for (var i = 0; i < s; i++) { - var lNode = nodes[i]; - nodeLeft = lNode.getLeft(); - nodeRight = lNode.getRight(); - nodeTop = lNode.getTop(); - nodeBottom = lNode.getBottom(); - - if (left > nodeLeft) { - left = nodeLeft; - } - - if (right < nodeRight) { - right = nodeRight; - } - - if (top > nodeTop) { - top = nodeTop; - } - - if (bottom < nodeBottom) { - bottom = nodeBottom; - } - } - - var boundingRect = new RectangleD(left, top, right - left, bottom - top); - - return boundingRect; -}; - -LGraph.prototype.getInclusionTreeDepth = function () { - if (this == this.graphManager.getRoot()) { - return 1; - } else { - return this.parent.getInclusionTreeDepth(); - } -}; - -LGraph.prototype.getEstimatedSize = function () { - if (this.estimatedSize == Integer.MIN_VALUE) { - throw "assert failed"; - } - return this.estimatedSize; -}; - -LGraph.prototype.calcEstimatedSize = function () { - var size = 0; - var nodes = this.nodes; - var s = nodes.length; - - for (var i = 0; i < s; i++) { - var lNode = nodes[i]; - size += lNode.calcEstimatedSize(); - } - - if (size == 0) { - this.estimatedSize = LayoutConstants.EMPTY_COMPOUND_NODE_SIZE; - } else { - this.estimatedSize = size / Math.sqrt(this.nodes.length); - } - - return this.estimatedSize; -}; - -LGraph.prototype.updateConnected = function () { - var self = this; - if (this.nodes.length == 0) { - this.isConnected = true; - return; - } - - var queue = new LinkedList(); - var visited = new Set(); - var currentNode = this.nodes[0]; - var neighborEdges; - var currentNeighbor; - var childrenOfNode = currentNode.withChildren(); - childrenOfNode.forEach(function (node) { - queue.push(node); - visited.add(node); - }); - - while (queue.length !== 0) { - currentNode = queue.shift(); - - // Traverse all neighbors of this node - neighborEdges = currentNode.getEdges(); - var size = neighborEdges.length; - for (var i = 0; i < size; i++) { - var neighborEdge = neighborEdges[i]; - currentNeighbor = neighborEdge.getOtherEndInGraph(currentNode, this); - - // Add unvisited neighbors to the list to visit - if (currentNeighbor != null && !visited.has(currentNeighbor)) { - var childrenOfNeighbor = currentNeighbor.withChildren(); - - childrenOfNeighbor.forEach(function (node) { - queue.push(node); - visited.add(node); - }); - } - } - } - - this.isConnected = false; - - if (visited.size >= this.nodes.length) { - var noOfVisitedInThisGraph = 0; - - visited.forEach(function (visitedNode) { - if (visitedNode.owner == self) { - noOfVisitedInThisGraph++; - } - }); - - if (noOfVisitedInThisGraph == this.nodes.length) { - this.isConnected = true; - } - } -}; - -module.exports = LGraph; - -/***/ }), -/* 6 */ -/***/ (function(module, exports, __nested_webpack_require_27617__) { - -"use strict"; - - -var LGraph; -var LEdge = __nested_webpack_require_27617__(1); - -function LGraphManager(layout) { - LGraph = __nested_webpack_require_27617__(5); // It may be better to initilize this out of this function but it gives an error (Right-hand side of 'instanceof' is not callable) now. - this.layout = layout; - - this.graphs = []; - this.edges = []; -} - -LGraphManager.prototype.addRoot = function () { - var ngraph = this.layout.newGraph(); - var nnode = this.layout.newNode(null); - var root = this.add(ngraph, nnode); - this.setRootGraph(root); - return this.rootGraph; -}; - -LGraphManager.prototype.add = function (newGraph, parentNode, newEdge, sourceNode, targetNode) { - //there are just 2 parameters are passed then it adds an LGraph else it adds an LEdge - if (newEdge == null && sourceNode == null && targetNode == null) { - if (newGraph == null) { - throw "Graph is null!"; - } - if (parentNode == null) { - throw "Parent node is null!"; - } - if (this.graphs.indexOf(newGraph) > -1) { - throw "Graph already in this graph mgr!"; - } - - this.graphs.push(newGraph); - - if (newGraph.parent != null) { - throw "Already has a parent!"; - } - if (parentNode.child != null) { - throw "Already has a child!"; - } - - newGraph.parent = parentNode; - parentNode.child = newGraph; - - return newGraph; - } else { - //change the order of the parameters - targetNode = newEdge; - sourceNode = parentNode; - newEdge = newGraph; - var sourceGraph = sourceNode.getOwner(); - var targetGraph = targetNode.getOwner(); - - if (!(sourceGraph != null && sourceGraph.getGraphManager() == this)) { - throw "Source not in this graph mgr!"; - } - if (!(targetGraph != null && targetGraph.getGraphManager() == this)) { - throw "Target not in this graph mgr!"; - } - - if (sourceGraph == targetGraph) { - newEdge.isInterGraph = false; - return sourceGraph.add(newEdge, sourceNode, targetNode); - } else { - newEdge.isInterGraph = true; - - // set source and target - newEdge.source = sourceNode; - newEdge.target = targetNode; - - // add edge to inter-graph edge list - if (this.edges.indexOf(newEdge) > -1) { - throw "Edge already in inter-graph edge list!"; - } - - this.edges.push(newEdge); - - // add edge to source and target incidency lists - if (!(newEdge.source != null && newEdge.target != null)) { - throw "Edge source and/or target is null!"; - } - - if (!(newEdge.source.edges.indexOf(newEdge) == -1 && newEdge.target.edges.indexOf(newEdge) == -1)) { - throw "Edge already in source and/or target incidency list!"; - } - - newEdge.source.edges.push(newEdge); - newEdge.target.edges.push(newEdge); - - return newEdge; - } - } -}; - -LGraphManager.prototype.remove = function (lObj) { - if (lObj instanceof LGraph) { - var graph = lObj; - if (graph.getGraphManager() != this) { - throw "Graph not in this graph mgr"; - } - if (!(graph == this.rootGraph || graph.parent != null && graph.parent.graphManager == this)) { - throw "Invalid parent node!"; - } - - // first the edges (make a copy to do it safely) - var edgesToBeRemoved = []; - - edgesToBeRemoved = edgesToBeRemoved.concat(graph.getEdges()); - - var edge; - var s = edgesToBeRemoved.length; - for (var i = 0; i < s; i++) { - edge = edgesToBeRemoved[i]; - graph.remove(edge); - } - - // then the nodes (make a copy to do it safely) - var nodesToBeRemoved = []; - - nodesToBeRemoved = nodesToBeRemoved.concat(graph.getNodes()); - - var node; - s = nodesToBeRemoved.length; - for (var i = 0; i < s; i++) { - node = nodesToBeRemoved[i]; - graph.remove(node); - } - - // check if graph is the root - if (graph == this.rootGraph) { - this.setRootGraph(null); - } - - // now remove the graph itself - var index = this.graphs.indexOf(graph); - this.graphs.splice(index, 1); - - // also reset the parent of the graph - graph.parent = null; - } else if (lObj instanceof LEdge) { - edge = lObj; - if (edge == null) { - throw "Edge is null!"; - } - if (!edge.isInterGraph) { - throw "Not an inter-graph edge!"; - } - if (!(edge.source != null && edge.target != null)) { - throw "Source and/or target is null!"; - } - - // remove edge from source and target nodes' incidency lists - - if (!(edge.source.edges.indexOf(edge) != -1 && edge.target.edges.indexOf(edge) != -1)) { - throw "Source and/or target doesn't know this edge!"; - } - - var index = edge.source.edges.indexOf(edge); - edge.source.edges.splice(index, 1); - index = edge.target.edges.indexOf(edge); - edge.target.edges.splice(index, 1); - - // remove edge from owner graph manager's inter-graph edge list - - if (!(edge.source.owner != null && edge.source.owner.getGraphManager() != null)) { - throw "Edge owner graph or owner graph manager is null!"; - } - if (edge.source.owner.getGraphManager().edges.indexOf(edge) == -1) { - throw "Not in owner graph manager's edge list!"; - } - - var index = edge.source.owner.getGraphManager().edges.indexOf(edge); - edge.source.owner.getGraphManager().edges.splice(index, 1); - } -}; - -LGraphManager.prototype.updateBounds = function () { - this.rootGraph.updateBounds(true); -}; - -LGraphManager.prototype.getGraphs = function () { - return this.graphs; -}; - -LGraphManager.prototype.getAllNodes = function () { - if (this.allNodes == null) { - var nodeList = []; - var graphs = this.getGraphs(); - var s = graphs.length; - for (var i = 0; i < s; i++) { - nodeList = nodeList.concat(graphs[i].getNodes()); - } - this.allNodes = nodeList; - } - return this.allNodes; -}; - -LGraphManager.prototype.resetAllNodes = function () { - this.allNodes = null; -}; - -LGraphManager.prototype.resetAllEdges = function () { - this.allEdges = null; -}; - -LGraphManager.prototype.resetAllNodesToApplyGravitation = function () { - this.allNodesToApplyGravitation = null; -}; - -LGraphManager.prototype.getAllEdges = function () { - if (this.allEdges == null) { - var edgeList = []; - var graphs = this.getGraphs(); - var s = graphs.length; - for (var i = 0; i < graphs.length; i++) { - edgeList = edgeList.concat(graphs[i].getEdges()); - } - - edgeList = edgeList.concat(this.edges); - - this.allEdges = edgeList; - } - return this.allEdges; -}; - -LGraphManager.prototype.getAllNodesToApplyGravitation = function () { - return this.allNodesToApplyGravitation; -}; - -LGraphManager.prototype.setAllNodesToApplyGravitation = function (nodeList) { - if (this.allNodesToApplyGravitation != null) { - throw "assert failed"; - } - - this.allNodesToApplyGravitation = nodeList; -}; - -LGraphManager.prototype.getRoot = function () { - return this.rootGraph; -}; - -LGraphManager.prototype.setRootGraph = function (graph) { - if (graph.getGraphManager() != this) { - throw "Root not in this graph mgr!"; - } - - this.rootGraph = graph; - // root graph must have a root node associated with it for convenience - if (graph.parent == null) { - graph.parent = this.layout.newNode("Root node"); - } -}; - -LGraphManager.prototype.getLayout = function () { - return this.layout; -}; - -LGraphManager.prototype.isOneAncestorOfOther = function (firstNode, secondNode) { - if (!(firstNode != null && secondNode != null)) { - throw "assert failed"; - } - - if (firstNode == secondNode) { - return true; - } - // Is second node an ancestor of the first one? - var ownerGraph = firstNode.getOwner(); - var parentNode; - - do { - parentNode = ownerGraph.getParent(); - - if (parentNode == null) { - break; - } - - if (parentNode == secondNode) { - return true; - } - - ownerGraph = parentNode.getOwner(); - if (ownerGraph == null) { - break; - } - } while (true); - // Is first node an ancestor of the second one? - ownerGraph = secondNode.getOwner(); - - do { - parentNode = ownerGraph.getParent(); - - if (parentNode == null) { - break; - } - - if (parentNode == firstNode) { - return true; - } - - ownerGraph = parentNode.getOwner(); - if (ownerGraph == null) { - break; - } - } while (true); - - return false; -}; - -LGraphManager.prototype.calcLowestCommonAncestors = function () { - var edge; - var sourceNode; - var targetNode; - var sourceAncestorGraph; - var targetAncestorGraph; - - var edges = this.getAllEdges(); - var s = edges.length; - for (var i = 0; i < s; i++) { - edge = edges[i]; - - sourceNode = edge.source; - targetNode = edge.target; - edge.lca = null; - edge.sourceInLca = sourceNode; - edge.targetInLca = targetNode; - - if (sourceNode == targetNode) { - edge.lca = sourceNode.getOwner(); - continue; - } - - sourceAncestorGraph = sourceNode.getOwner(); - - while (edge.lca == null) { - edge.targetInLca = targetNode; - targetAncestorGraph = targetNode.getOwner(); - - while (edge.lca == null) { - if (targetAncestorGraph == sourceAncestorGraph) { - edge.lca = targetAncestorGraph; - break; - } - - if (targetAncestorGraph == this.rootGraph) { - break; - } - - if (edge.lca != null) { - throw "assert failed"; - } - edge.targetInLca = targetAncestorGraph.getParent(); - targetAncestorGraph = edge.targetInLca.getOwner(); - } - - if (sourceAncestorGraph == this.rootGraph) { - break; - } - - if (edge.lca == null) { - edge.sourceInLca = sourceAncestorGraph.getParent(); - sourceAncestorGraph = edge.sourceInLca.getOwner(); - } - } - - if (edge.lca == null) { - throw "assert failed"; - } - } -}; - -LGraphManager.prototype.calcLowestCommonAncestor = function (firstNode, secondNode) { - if (firstNode == secondNode) { - return firstNode.getOwner(); - } - var firstOwnerGraph = firstNode.getOwner(); - - do { - if (firstOwnerGraph == null) { - break; - } - var secondOwnerGraph = secondNode.getOwner(); - - do { - if (secondOwnerGraph == null) { - break; - } - - if (secondOwnerGraph == firstOwnerGraph) { - return secondOwnerGraph; - } - secondOwnerGraph = secondOwnerGraph.getParent().getOwner(); - } while (true); - - firstOwnerGraph = firstOwnerGraph.getParent().getOwner(); - } while (true); - - return firstOwnerGraph; -}; - -LGraphManager.prototype.calcInclusionTreeDepths = function (graph, depth) { - if (graph == null && depth == null) { - graph = this.rootGraph; - depth = 1; - } - var node; - - var nodes = graph.getNodes(); - var s = nodes.length; - for (var i = 0; i < s; i++) { - node = nodes[i]; - node.inclusionTreeDepth = depth; - - if (node.child != null) { - this.calcInclusionTreeDepths(node.child, depth + 1); - } - } -}; - -LGraphManager.prototype.includesInvalidEdge = function () { - var edge; - - var s = this.edges.length; - for (var i = 0; i < s; i++) { - edge = this.edges[i]; - - if (this.isOneAncestorOfOther(edge.source, edge.target)) { - return true; - } - } - return false; -}; - -module.exports = LGraphManager; - -/***/ }), -/* 7 */ -/***/ (function(module, exports, __nested_webpack_require_38707__) { - -"use strict"; - - -var LayoutConstants = __nested_webpack_require_38707__(0); - -function FDLayoutConstants() {} - -//FDLayoutConstants inherits static props in LayoutConstants -for (var prop in LayoutConstants) { - FDLayoutConstants[prop] = LayoutConstants[prop]; -} - -FDLayoutConstants.MAX_ITERATIONS = 2500; - -FDLayoutConstants.DEFAULT_EDGE_LENGTH = 50; -FDLayoutConstants.DEFAULT_SPRING_STRENGTH = 0.45; -FDLayoutConstants.DEFAULT_REPULSION_STRENGTH = 4500.0; -FDLayoutConstants.DEFAULT_GRAVITY_STRENGTH = 0.4; -FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH = 1.0; -FDLayoutConstants.DEFAULT_GRAVITY_RANGE_FACTOR = 3.8; -FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = 1.5; -FDLayoutConstants.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION = true; -FDLayoutConstants.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION = true; -FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL = 0.3; -FDLayoutConstants.COOLING_ADAPTATION_FACTOR = 0.33; -FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT = 1000; -FDLayoutConstants.ADAPTATION_UPPER_NODE_LIMIT = 5000; -FDLayoutConstants.MAX_NODE_DISPLACEMENT_INCREMENTAL = 100.0; -FDLayoutConstants.MAX_NODE_DISPLACEMENT = FDLayoutConstants.MAX_NODE_DISPLACEMENT_INCREMENTAL * 3; -FDLayoutConstants.MIN_REPULSION_DIST = FDLayoutConstants.DEFAULT_EDGE_LENGTH / 10.0; -FDLayoutConstants.CONVERGENCE_CHECK_PERIOD = 100; -FDLayoutConstants.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = 0.1; -FDLayoutConstants.MIN_EDGE_LENGTH = 1; -FDLayoutConstants.GRID_CALCULATION_CHECK_PERIOD = 10; - -module.exports = FDLayoutConstants; - -/***/ }), -/* 8 */ -/***/ (function(module, exports, __nested_webpack_require_40298__) { - -"use strict"; - - -/** - * This class maintains a list of static geometry related utility methods. - * - * - * Copyright: i-Vis Research Group, Bilkent University, 2007 - present - */ - -var Point = __nested_webpack_require_40298__(12); - -function IGeometry() {} - -/** - * This method calculates *half* the amount in x and y directions of the two - * input rectangles needed to separate them keeping their respective - * positioning, and returns the result in the input array. An input - * separation buffer added to the amount in both directions. We assume that - * the two rectangles do intersect. - */ -IGeometry.calcSeparationAmount = function (rectA, rectB, overlapAmount, separationBuffer) { - if (!rectA.intersects(rectB)) { - throw "assert failed"; - } - - var directions = new Array(2); - - this.decideDirectionsForOverlappingNodes(rectA, rectB, directions); - - overlapAmount[0] = Math.min(rectA.getRight(), rectB.getRight()) - Math.max(rectA.x, rectB.x); - overlapAmount[1] = Math.min(rectA.getBottom(), rectB.getBottom()) - Math.max(rectA.y, rectB.y); - - // update the overlapping amounts for the following cases: - if (rectA.getX() <= rectB.getX() && rectA.getRight() >= rectB.getRight()) { - /* Case x.1: - * - * rectA - * | | - * | _________ | - * | | | | - * |________|_______|______| - * | | - * | | - * rectB - */ - overlapAmount[0] += Math.min(rectB.getX() - rectA.getX(), rectA.getRight() - rectB.getRight()); - } else if (rectB.getX() <= rectA.getX() && rectB.getRight() >= rectA.getRight()) { - /* Case x.2: - * - * rectB - * | | - * | _________ | - * | | | | - * |________|_______|______| - * | | - * | | - * rectA - */ - overlapAmount[0] += Math.min(rectA.getX() - rectB.getX(), rectB.getRight() - rectA.getRight()); - } - if (rectA.getY() <= rectB.getY() && rectA.getBottom() >= rectB.getBottom()) { - /* Case y.1: - * ________ rectA - * | - * | - * ______|____ rectB - * | | - * | | - * ______|____| - * | - * | - * |________ - * - */ - overlapAmount[1] += Math.min(rectB.getY() - rectA.getY(), rectA.getBottom() - rectB.getBottom()); - } else if (rectB.getY() <= rectA.getY() && rectB.getBottom() >= rectA.getBottom()) { - /* Case y.2: - * ________ rectB - * | - * | - * ______|____ rectA - * | | - * | | - * ______|____| - * | - * | - * |________ - * - */ - overlapAmount[1] += Math.min(rectA.getY() - rectB.getY(), rectB.getBottom() - rectA.getBottom()); - } - - // find slope of the line passes two centers - var slope = Math.abs((rectB.getCenterY() - rectA.getCenterY()) / (rectB.getCenterX() - rectA.getCenterX())); - // if centers are overlapped - if (rectB.getCenterY() === rectA.getCenterY() && rectB.getCenterX() === rectA.getCenterX()) { - // assume the slope is 1 (45 degree) - slope = 1.0; - } - - var moveByY = slope * overlapAmount[0]; - var moveByX = overlapAmount[1] / slope; - if (overlapAmount[0] < moveByX) { - moveByX = overlapAmount[0]; - } else { - moveByY = overlapAmount[1]; - } - // return half the amount so that if each rectangle is moved by these - // amounts in opposite directions, overlap will be resolved - overlapAmount[0] = -1 * directions[0] * (moveByX / 2 + separationBuffer); - overlapAmount[1] = -1 * directions[1] * (moveByY / 2 + separationBuffer); -}; - -/** - * This method decides the separation direction of overlapping nodes - * - * if directions[0] = -1, then rectA goes left - * if directions[0] = 1, then rectA goes right - * if directions[1] = -1, then rectA goes up - * if directions[1] = 1, then rectA goes down - */ -IGeometry.decideDirectionsForOverlappingNodes = function (rectA, rectB, directions) { - if (rectA.getCenterX() < rectB.getCenterX()) { - directions[0] = -1; - } else { - directions[0] = 1; - } - - if (rectA.getCenterY() < rectB.getCenterY()) { - directions[1] = -1; - } else { - directions[1] = 1; - } -}; - -/** - * This method calculates the intersection (clipping) points of the two - * input rectangles with line segment defined by the centers of these two - * rectangles. The clipping points are saved in the input double array and - * whether or not the two rectangles overlap is returned. - */ -IGeometry.getIntersection2 = function (rectA, rectB, result) { - //result[0-1] will contain clipPoint of rectA, result[2-3] will contain clipPoint of rectB - var p1x = rectA.getCenterX(); - var p1y = rectA.getCenterY(); - var p2x = rectB.getCenterX(); - var p2y = rectB.getCenterY(); - - //if two rectangles intersect, then clipping points are centers - if (rectA.intersects(rectB)) { - result[0] = p1x; - result[1] = p1y; - result[2] = p2x; - result[3] = p2y; - return true; - } - //variables for rectA - var topLeftAx = rectA.getX(); - var topLeftAy = rectA.getY(); - var topRightAx = rectA.getRight(); - var bottomLeftAx = rectA.getX(); - var bottomLeftAy = rectA.getBottom(); - var bottomRightAx = rectA.getRight(); - var halfWidthA = rectA.getWidthHalf(); - var halfHeightA = rectA.getHeightHalf(); - //variables for rectB - var topLeftBx = rectB.getX(); - var topLeftBy = rectB.getY(); - var topRightBx = rectB.getRight(); - var bottomLeftBx = rectB.getX(); - var bottomLeftBy = rectB.getBottom(); - var bottomRightBx = rectB.getRight(); - var halfWidthB = rectB.getWidthHalf(); - var halfHeightB = rectB.getHeightHalf(); - - //flag whether clipping points are found - var clipPointAFound = false; - var clipPointBFound = false; - - // line is vertical - if (p1x === p2x) { - if (p1y > p2y) { - result[0] = p1x; - result[1] = topLeftAy; - result[2] = p2x; - result[3] = bottomLeftBy; - return false; - } else if (p1y < p2y) { - result[0] = p1x; - result[1] = bottomLeftAy; - result[2] = p2x; - result[3] = topLeftBy; - return false; - } else { - //not line, return null; - } - } - // line is horizontal - else if (p1y === p2y) { - if (p1x > p2x) { - result[0] = topLeftAx; - result[1] = p1y; - result[2] = topRightBx; - result[3] = p2y; - return false; - } else if (p1x < p2x) { - result[0] = topRightAx; - result[1] = p1y; - result[2] = topLeftBx; - result[3] = p2y; - return false; - } else { - //not valid line, return null; - } - } else { - //slopes of rectA's and rectB's diagonals - var slopeA = rectA.height / rectA.width; - var slopeB = rectB.height / rectB.width; - - //slope of line between center of rectA and center of rectB - var slopePrime = (p2y - p1y) / (p2x - p1x); - var cardinalDirectionA = void 0; - var cardinalDirectionB = void 0; - var tempPointAx = void 0; - var tempPointAy = void 0; - var tempPointBx = void 0; - var tempPointBy = void 0; - - //determine whether clipping point is the corner of nodeA - if (-slopeA === slopePrime) { - if (p1x > p2x) { - result[0] = bottomLeftAx; - result[1] = bottomLeftAy; - clipPointAFound = true; - } else { - result[0] = topRightAx; - result[1] = topLeftAy; - clipPointAFound = true; - } - } else if (slopeA === slopePrime) { - if (p1x > p2x) { - result[0] = topLeftAx; - result[1] = topLeftAy; - clipPointAFound = true; - } else { - result[0] = bottomRightAx; - result[1] = bottomLeftAy; - clipPointAFound = true; - } - } - - //determine whether clipping point is the corner of nodeB - if (-slopeB === slopePrime) { - if (p2x > p1x) { - result[2] = bottomLeftBx; - result[3] = bottomLeftBy; - clipPointBFound = true; - } else { - result[2] = topRightBx; - result[3] = topLeftBy; - clipPointBFound = true; - } - } else if (slopeB === slopePrime) { - if (p2x > p1x) { - result[2] = topLeftBx; - result[3] = topLeftBy; - clipPointBFound = true; - } else { - result[2] = bottomRightBx; - result[3] = bottomLeftBy; - clipPointBFound = true; - } - } - - //if both clipping points are corners - if (clipPointAFound && clipPointBFound) { - return false; - } - - //determine Cardinal Direction of rectangles - if (p1x > p2x) { - if (p1y > p2y) { - cardinalDirectionA = this.getCardinalDirection(slopeA, slopePrime, 4); - cardinalDirectionB = this.getCardinalDirection(slopeB, slopePrime, 2); - } else { - cardinalDirectionA = this.getCardinalDirection(-slopeA, slopePrime, 3); - cardinalDirectionB = this.getCardinalDirection(-slopeB, slopePrime, 1); - } - } else { - if (p1y > p2y) { - cardinalDirectionA = this.getCardinalDirection(-slopeA, slopePrime, 1); - cardinalDirectionB = this.getCardinalDirection(-slopeB, slopePrime, 3); - } else { - cardinalDirectionA = this.getCardinalDirection(slopeA, slopePrime, 2); - cardinalDirectionB = this.getCardinalDirection(slopeB, slopePrime, 4); - } - } - //calculate clipping Point if it is not found before - if (!clipPointAFound) { - switch (cardinalDirectionA) { - case 1: - tempPointAy = topLeftAy; - tempPointAx = p1x + -halfHeightA / slopePrime; - result[0] = tempPointAx; - result[1] = tempPointAy; - break; - case 2: - tempPointAx = bottomRightAx; - tempPointAy = p1y + halfWidthA * slopePrime; - result[0] = tempPointAx; - result[1] = tempPointAy; - break; - case 3: - tempPointAy = bottomLeftAy; - tempPointAx = p1x + halfHeightA / slopePrime; - result[0] = tempPointAx; - result[1] = tempPointAy; - break; - case 4: - tempPointAx = bottomLeftAx; - tempPointAy = p1y + -halfWidthA * slopePrime; - result[0] = tempPointAx; - result[1] = tempPointAy; - break; - } - } - if (!clipPointBFound) { - switch (cardinalDirectionB) { - case 1: - tempPointBy = topLeftBy; - tempPointBx = p2x + -halfHeightB / slopePrime; - result[2] = tempPointBx; - result[3] = tempPointBy; - break; - case 2: - tempPointBx = bottomRightBx; - tempPointBy = p2y + halfWidthB * slopePrime; - result[2] = tempPointBx; - result[3] = tempPointBy; - break; - case 3: - tempPointBy = bottomLeftBy; - tempPointBx = p2x + halfHeightB / slopePrime; - result[2] = tempPointBx; - result[3] = tempPointBy; - break; - case 4: - tempPointBx = bottomLeftBx; - tempPointBy = p2y + -halfWidthB * slopePrime; - result[2] = tempPointBx; - result[3] = tempPointBy; - break; - } - } - } - return false; -}; - -/** - * This method returns in which cardinal direction does input point stays - * 1: North - * 2: East - * 3: South - * 4: West - */ -IGeometry.getCardinalDirection = function (slope, slopePrime, line) { - if (slope > slopePrime) { - return line; - } else { - return 1 + line % 4; - } -}; - -/** - * This method calculates the intersection of the two lines defined by - * point pairs (s1,s2) and (f1,f2). - */ -IGeometry.getIntersection = function (s1, s2, f1, f2) { - if (f2 == null) { - return this.getIntersection2(s1, s2, f1); - } - - var x1 = s1.x; - var y1 = s1.y; - var x2 = s2.x; - var y2 = s2.y; - var x3 = f1.x; - var y3 = f1.y; - var x4 = f2.x; - var y4 = f2.y; - var x = void 0, - y = void 0; // intersection point - var a1 = void 0, - a2 = void 0, - b1 = void 0, - b2 = void 0, - c1 = void 0, - c2 = void 0; // coefficients of line eqns. - var denom = void 0; - - a1 = y2 - y1; - b1 = x1 - x2; - c1 = x2 * y1 - x1 * y2; // { a1*x + b1*y + c1 = 0 is line 1 } - - a2 = y4 - y3; - b2 = x3 - x4; - c2 = x4 * y3 - x3 * y4; // { a2*x + b2*y + c2 = 0 is line 2 } - - denom = a1 * b2 - a2 * b1; - - if (denom === 0) { - return null; - } - - x = (b1 * c2 - b2 * c1) / denom; - y = (a2 * c1 - a1 * c2) / denom; - - return new Point(x, y); -}; - -/** - * This method finds and returns the angle of the vector from the + x-axis - * in clockwise direction (compatible w/ Java coordinate system!). - */ -IGeometry.angleOfVector = function (Cx, Cy, Nx, Ny) { - var C_angle = void 0; - - if (Cx !== Nx) { - C_angle = Math.atan((Ny - Cy) / (Nx - Cx)); - - if (Nx < Cx) { - C_angle += Math.PI; - } else if (Ny < Cy) { - C_angle += this.TWO_PI; - } - } else if (Ny < Cy) { - C_angle = this.ONE_AND_HALF_PI; // 270 degrees - } else { - C_angle = this.HALF_PI; // 90 degrees - } - - return C_angle; -}; - -/** - * This method checks whether the given two line segments (one with point - * p1 and p2, the other with point p3 and p4) intersect at a point other - * than these points. - */ -IGeometry.doIntersect = function (p1, p2, p3, p4) { - var a = p1.x; - var b = p1.y; - var c = p2.x; - var d = p2.y; - var p = p3.x; - var q = p3.y; - var r = p4.x; - var s = p4.y; - var det = (c - a) * (s - q) - (r - p) * (d - b); - - if (det === 0) { - return false; - } else { - var lambda = ((s - q) * (r - a) + (p - r) * (s - b)) / det; - var gamma = ((b - d) * (r - a) + (c - a) * (s - b)) / det; - return 0 < lambda && lambda < 1 && 0 < gamma && gamma < 1; - } -}; - -// ----------------------------------------------------------------------------- -// Section: Class Constants -// ----------------------------------------------------------------------------- -/** - * Some useful pre-calculated constants - */ -IGeometry.HALF_PI = 0.5 * Math.PI; -IGeometry.ONE_AND_HALF_PI = 1.5 * Math.PI; -IGeometry.TWO_PI = 2.0 * Math.PI; -IGeometry.THREE_PI = 3.0 * Math.PI; - -module.exports = IGeometry; - -/***/ }), -/* 9 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -function IMath() {} - -/** - * This method returns the sign of the input value. - */ -IMath.sign = function (value) { - if (value > 0) { - return 1; - } else if (value < 0) { - return -1; - } else { - return 0; - } -}; - -IMath.floor = function (value) { - return value < 0 ? Math.ceil(value) : Math.floor(value); -}; - -IMath.ceil = function (value) { - return value < 0 ? Math.floor(value) : Math.ceil(value); -}; - -module.exports = IMath; - -/***/ }), -/* 10 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -function Integer() {} - -Integer.MAX_VALUE = 2147483647; -Integer.MIN_VALUE = -2147483648; - -module.exports = Integer; - -/***/ }), -/* 11 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -var nodeFrom = function nodeFrom(value) { - return { value: value, next: null, prev: null }; -}; - -var add = function add(prev, node, next, list) { - if (prev !== null) { - prev.next = node; - } else { - list.head = node; - } - - if (next !== null) { - next.prev = node; - } else { - list.tail = node; - } - - node.prev = prev; - node.next = next; - - list.length++; - - return node; -}; - -var _remove = function _remove(node, list) { - var prev = node.prev, - next = node.next; - - - if (prev !== null) { - prev.next = next; - } else { - list.head = next; - } - - if (next !== null) { - next.prev = prev; - } else { - list.tail = prev; - } - - node.prev = node.next = null; - - list.length--; - - return node; -}; - -var LinkedList = function () { - function LinkedList(vals) { - var _this = this; - - _classCallCheck(this, LinkedList); - - this.length = 0; - this.head = null; - this.tail = null; - - if (vals != null) { - vals.forEach(function (v) { - return _this.push(v); - }); - } - } - - _createClass(LinkedList, [{ - key: "size", - value: function size() { - return this.length; - } - }, { - key: "insertBefore", - value: function insertBefore(val, otherNode) { - return add(otherNode.prev, nodeFrom(val), otherNode, this); - } - }, { - key: "insertAfter", - value: function insertAfter(val, otherNode) { - return add(otherNode, nodeFrom(val), otherNode.next, this); - } - }, { - key: "insertNodeBefore", - value: function insertNodeBefore(newNode, otherNode) { - return add(otherNode.prev, newNode, otherNode, this); - } - }, { - key: "insertNodeAfter", - value: function insertNodeAfter(newNode, otherNode) { - return add(otherNode, newNode, otherNode.next, this); - } - }, { - key: "push", - value: function push(val) { - return add(this.tail, nodeFrom(val), null, this); - } - }, { - key: "unshift", - value: function unshift(val) { - return add(null, nodeFrom(val), this.head, this); - } - }, { - key: "remove", - value: function remove(node) { - return _remove(node, this); - } - }, { - key: "pop", - value: function pop() { - return _remove(this.tail, this).value; - } - }, { - key: "popNode", - value: function popNode() { - return _remove(this.tail, this); - } - }, { - key: "shift", - value: function shift() { - return _remove(this.head, this).value; - } - }, { - key: "shiftNode", - value: function shiftNode() { - return _remove(this.head, this); - } - }, { - key: "get_object_at", - value: function get_object_at(index) { - if (index <= this.length()) { - var i = 1; - var current = this.head; - while (i < index) { - current = current.next; - i++; - } - return current.value; - } - } - }, { - key: "set_object_at", - value: function set_object_at(index, value) { - if (index <= this.length()) { - var i = 1; - var current = this.head; - while (i < index) { - current = current.next; - i++; - } - current.value = value; - } - } - }]); - - return LinkedList; -}(); - -module.exports = LinkedList; - -/***/ }), -/* 12 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/* - *This class is the javascript implementation of the Point.java class in jdk - */ -function Point(x, y, p) { - this.x = null; - this.y = null; - if (x == null && y == null && p == null) { - this.x = 0; - this.y = 0; - } else if (typeof x == 'number' && typeof y == 'number' && p == null) { - this.x = x; - this.y = y; - } else if (x.constructor.name == 'Point' && y == null && p == null) { - p = x; - this.x = p.x; - this.y = p.y; - } -} - -Point.prototype.getX = function () { - return this.x; -}; - -Point.prototype.getY = function () { - return this.y; -}; - -Point.prototype.getLocation = function () { - return new Point(this.x, this.y); -}; - -Point.prototype.setLocation = function (x, y, p) { - if (x.constructor.name == 'Point' && y == null && p == null) { - p = x; - this.setLocation(p.x, p.y); - } else if (typeof x == 'number' && typeof y == 'number' && p == null) { - //if both parameters are integer just move (x,y) location - if (parseInt(x) == x && parseInt(y) == y) { - this.move(x, y); - } else { - this.x = Math.floor(x + 0.5); - this.y = Math.floor(y + 0.5); - } - } -}; - -Point.prototype.move = function (x, y) { - this.x = x; - this.y = y; -}; - -Point.prototype.translate = function (dx, dy) { - this.x += dx; - this.y += dy; -}; - -Point.prototype.equals = function (obj) { - if (obj.constructor.name == "Point") { - var pt = obj; - return this.x == pt.x && this.y == pt.y; - } - return this == obj; -}; - -Point.prototype.toString = function () { - return new Point().constructor.name + "[x=" + this.x + ",y=" + this.y + "]"; -}; - -module.exports = Point; - -/***/ }), -/* 13 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -function RectangleD(x, y, width, height) { - this.x = 0; - this.y = 0; - this.width = 0; - this.height = 0; - - if (x != null && y != null && width != null && height != null) { - this.x = x; - this.y = y; - this.width = width; - this.height = height; - } -} - -RectangleD.prototype.getX = function () { - return this.x; -}; - -RectangleD.prototype.setX = function (x) { - this.x = x; -}; - -RectangleD.prototype.getY = function () { - return this.y; -}; - -RectangleD.prototype.setY = function (y) { - this.y = y; -}; - -RectangleD.prototype.getWidth = function () { - return this.width; -}; - -RectangleD.prototype.setWidth = function (width) { - this.width = width; -}; - -RectangleD.prototype.getHeight = function () { - return this.height; -}; - -RectangleD.prototype.setHeight = function (height) { - this.height = height; -}; - -RectangleD.prototype.getRight = function () { - return this.x + this.width; -}; - -RectangleD.prototype.getBottom = function () { - return this.y + this.height; -}; - -RectangleD.prototype.intersects = function (a) { - if (this.getRight() < a.x) { - return false; - } - - if (this.getBottom() < a.y) { - return false; - } - - if (a.getRight() < this.x) { - return false; - } - - if (a.getBottom() < this.y) { - return false; - } - - return true; -}; - -RectangleD.prototype.getCenterX = function () { - return this.x + this.width / 2; -}; - -RectangleD.prototype.getMinX = function () { - return this.getX(); -}; - -RectangleD.prototype.getMaxX = function () { - return this.getX() + this.width; -}; - -RectangleD.prototype.getCenterY = function () { - return this.y + this.height / 2; -}; - -RectangleD.prototype.getMinY = function () { - return this.getY(); -}; - -RectangleD.prototype.getMaxY = function () { - return this.getY() + this.height; -}; - -RectangleD.prototype.getWidthHalf = function () { - return this.width / 2; -}; - -RectangleD.prototype.getHeightHalf = function () { - return this.height / 2; -}; - -module.exports = RectangleD; - -/***/ }), -/* 14 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; - -function UniqueIDGeneretor() {} - -UniqueIDGeneretor.lastID = 0; - -UniqueIDGeneretor.createID = function (obj) { - if (UniqueIDGeneretor.isPrimitive(obj)) { - return obj; - } - if (obj.uniqueID != null) { - return obj.uniqueID; - } - obj.uniqueID = UniqueIDGeneretor.getString(); - UniqueIDGeneretor.lastID++; - return obj.uniqueID; -}; - -UniqueIDGeneretor.getString = function (id) { - if (id == null) id = UniqueIDGeneretor.lastID; - return "Object#" + id + ""; -}; - -UniqueIDGeneretor.isPrimitive = function (arg) { - var type = typeof arg === "undefined" ? "undefined" : _typeof(arg); - return arg == null || type != "object" && type != "function"; -}; - -module.exports = UniqueIDGeneretor; - -/***/ }), -/* 15 */ -/***/ (function(module, exports, __nested_webpack_require_64072__) { - -"use strict"; - - -function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } - -var LayoutConstants = __nested_webpack_require_64072__(0); -var LGraphManager = __nested_webpack_require_64072__(6); -var LNode = __nested_webpack_require_64072__(3); -var LEdge = __nested_webpack_require_64072__(1); -var LGraph = __nested_webpack_require_64072__(5); -var PointD = __nested_webpack_require_64072__(4); -var Transform = __nested_webpack_require_64072__(17); -var Emitter = __nested_webpack_require_64072__(27); - -function Layout(isRemoteUse) { - Emitter.call(this); - - //Layout Quality: 0:draft, 1:default, 2:proof - this.layoutQuality = LayoutConstants.QUALITY; - //Whether layout should create bendpoints as needed or not - this.createBendsAsNeeded = LayoutConstants.DEFAULT_CREATE_BENDS_AS_NEEDED; - //Whether layout should be incremental or not - this.incremental = LayoutConstants.DEFAULT_INCREMENTAL; - //Whether we animate from before to after layout node positions - this.animationOnLayout = LayoutConstants.DEFAULT_ANIMATION_ON_LAYOUT; - //Whether we animate the layout process or not - this.animationDuringLayout = LayoutConstants.DEFAULT_ANIMATION_DURING_LAYOUT; - //Number iterations that should be done between two successive animations - this.animationPeriod = LayoutConstants.DEFAULT_ANIMATION_PERIOD; - /** - * Whether or not leaf nodes (non-compound nodes) are of uniform sizes. When - * they are, both spring and repulsion forces between two leaf nodes can be - * calculated without the expensive clipping point calculations, resulting - * in major speed-up. - */ - this.uniformLeafNodeSizes = LayoutConstants.DEFAULT_UNIFORM_LEAF_NODE_SIZES; - /** - * This is used for creation of bendpoints by using dummy nodes and edges. - * Maps an LEdge to its dummy bendpoint path. - */ - this.edgeToDummyNodes = new Map(); - this.graphManager = new LGraphManager(this); - this.isLayoutFinished = false; - this.isSubLayout = false; - this.isRemoteUse = false; - - if (isRemoteUse != null) { - this.isRemoteUse = isRemoteUse; - } -} - -Layout.RANDOM_SEED = 1; - -Layout.prototype = Object.create(Emitter.prototype); - -Layout.prototype.getGraphManager = function () { - return this.graphManager; -}; - -Layout.prototype.getAllNodes = function () { - return this.graphManager.getAllNodes(); -}; - -Layout.prototype.getAllEdges = function () { - return this.graphManager.getAllEdges(); -}; - -Layout.prototype.getAllNodesToApplyGravitation = function () { - return this.graphManager.getAllNodesToApplyGravitation(); -}; - -Layout.prototype.newGraphManager = function () { - var gm = new LGraphManager(this); - this.graphManager = gm; - return gm; -}; - -Layout.prototype.newGraph = function (vGraph) { - return new LGraph(null, this.graphManager, vGraph); -}; - -Layout.prototype.newNode = function (vNode) { - return new LNode(this.graphManager, vNode); -}; - -Layout.prototype.newEdge = function (vEdge) { - return new LEdge(null, null, vEdge); -}; - -Layout.prototype.checkLayoutSuccess = function () { - return this.graphManager.getRoot() == null || this.graphManager.getRoot().getNodes().length == 0 || this.graphManager.includesInvalidEdge(); -}; - -Layout.prototype.runLayout = function () { - this.isLayoutFinished = false; - - if (this.tilingPreLayout) { - this.tilingPreLayout(); - } - - this.initParameters(); - var isLayoutSuccessfull; - - if (this.checkLayoutSuccess()) { - isLayoutSuccessfull = false; - } else { - isLayoutSuccessfull = this.layout(); - } - - if (LayoutConstants.ANIMATE === 'during') { - // If this is a 'during' layout animation. Layout is not finished yet. - // We need to perform these in index.js when layout is really finished. - return false; - } - - if (isLayoutSuccessfull) { - if (!this.isSubLayout) { - this.doPostLayout(); - } - } - - if (this.tilingPostLayout) { - this.tilingPostLayout(); - } - - this.isLayoutFinished = true; - - return isLayoutSuccessfull; -}; - -/** - * This method performs the operations required after layout. - */ -Layout.prototype.doPostLayout = function () { - //assert !isSubLayout : "Should not be called on sub-layout!"; - // Propagate geometric changes to v-level objects - if (!this.incremental) { - this.transform(); - } - this.update(); -}; - -/** - * This method updates the geometry of the target graph according to - * calculated layout. - */ -Layout.prototype.update2 = function () { - // update bend points - if (this.createBendsAsNeeded) { - this.createBendpointsFromDummyNodes(); - - // reset all edges, since the topology has changed - this.graphManager.resetAllEdges(); - } - - // perform edge, node and root updates if layout is not called - // remotely - if (!this.isRemoteUse) { - // update all edges - var edge; - var allEdges = this.graphManager.getAllEdges(); - for (var i = 0; i < allEdges.length; i++) { - edge = allEdges[i]; - // this.update(edge); - } - - // recursively update nodes - var node; - var nodes = this.graphManager.getRoot().getNodes(); - for (var i = 0; i < nodes.length; i++) { - node = nodes[i]; - // this.update(node); - } - - // update root graph - this.update(this.graphManager.getRoot()); - } -}; - -Layout.prototype.update = function (obj) { - if (obj == null) { - this.update2(); - } else if (obj instanceof LNode) { - var node = obj; - if (node.getChild() != null) { - // since node is compound, recursively update child nodes - var nodes = node.getChild().getNodes(); - for (var i = 0; i < nodes.length; i++) { - update(nodes[i]); - } - } - - // if the l-level node is associated with a v-level graph object, - // then it is assumed that the v-level node implements the - // interface Updatable. - if (node.vGraphObject != null) { - // cast to Updatable without any type check - var vNode = node.vGraphObject; - - // call the update method of the interface - vNode.update(node); - } - } else if (obj instanceof LEdge) { - var edge = obj; - // if the l-level edge is associated with a v-level graph object, - // then it is assumed that the v-level edge implements the - // interface Updatable. - - if (edge.vGraphObject != null) { - // cast to Updatable without any type check - var vEdge = edge.vGraphObject; - - // call the update method of the interface - vEdge.update(edge); - } - } else if (obj instanceof LGraph) { - var graph = obj; - // if the l-level graph is associated with a v-level graph object, - // then it is assumed that the v-level object implements the - // interface Updatable. - - if (graph.vGraphObject != null) { - // cast to Updatable without any type check - var vGraph = graph.vGraphObject; - - // call the update method of the interface - vGraph.update(graph); - } - } -}; - -/** - * This method is used to set all layout parameters to default values - * determined at compile time. - */ -Layout.prototype.initParameters = function () { - if (!this.isSubLayout) { - this.layoutQuality = LayoutConstants.QUALITY; - this.animationDuringLayout = LayoutConstants.DEFAULT_ANIMATION_DURING_LAYOUT; - this.animationPeriod = LayoutConstants.DEFAULT_ANIMATION_PERIOD; - this.animationOnLayout = LayoutConstants.DEFAULT_ANIMATION_ON_LAYOUT; - this.incremental = LayoutConstants.DEFAULT_INCREMENTAL; - this.createBendsAsNeeded = LayoutConstants.DEFAULT_CREATE_BENDS_AS_NEEDED; - this.uniformLeafNodeSizes = LayoutConstants.DEFAULT_UNIFORM_LEAF_NODE_SIZES; - } - - if (this.animationDuringLayout) { - this.animationOnLayout = false; - } -}; - -Layout.prototype.transform = function (newLeftTop) { - if (newLeftTop == undefined) { - this.transform(new PointD(0, 0)); - } else { - // create a transformation object (from Eclipse to layout). When an - // inverse transform is applied, we get upper-left coordinate of the - // drawing or the root graph at given input coordinate (some margins - // already included in calculation of left-top). - - var trans = new Transform(); - var leftTop = this.graphManager.getRoot().updateLeftTop(); - - if (leftTop != null) { - trans.setWorldOrgX(newLeftTop.x); - trans.setWorldOrgY(newLeftTop.y); - - trans.setDeviceOrgX(leftTop.x); - trans.setDeviceOrgY(leftTop.y); - - var nodes = this.getAllNodes(); - var node; - - for (var i = 0; i < nodes.length; i++) { - node = nodes[i]; - node.transform(trans); - } - } - } -}; - -Layout.prototype.positionNodesRandomly = function (graph) { - - if (graph == undefined) { - //assert !this.incremental; - this.positionNodesRandomly(this.getGraphManager().getRoot()); - this.getGraphManager().getRoot().updateBounds(true); - } else { - var lNode; - var childGraph; - - var nodes = graph.getNodes(); - for (var i = 0; i < nodes.length; i++) { - lNode = nodes[i]; - childGraph = lNode.getChild(); - - if (childGraph == null) { - lNode.scatter(); - } else if (childGraph.getNodes().length == 0) { - lNode.scatter(); - } else { - this.positionNodesRandomly(childGraph); - lNode.updateBounds(); - } - } - } -}; - -/** - * This method returns a list of trees where each tree is represented as a - * list of l-nodes. The method returns a list of size 0 when: - * - The graph is not flat or - * - One of the component(s) of the graph is not a tree. - */ -Layout.prototype.getFlatForest = function () { - var flatForest = []; - var isForest = true; - - // Quick reference for all nodes in the graph manager associated with - // this layout. The list should not be changed. - var allNodes = this.graphManager.getRoot().getNodes(); - - // First be sure that the graph is flat - var isFlat = true; - - for (var i = 0; i < allNodes.length; i++) { - if (allNodes[i].getChild() != null) { - isFlat = false; - } - } - - // Return empty forest if the graph is not flat. - if (!isFlat) { - return flatForest; - } - - // Run BFS for each component of the graph. - - var visited = new Set(); - var toBeVisited = []; - var parents = new Map(); - var unProcessedNodes = []; - - unProcessedNodes = unProcessedNodes.concat(allNodes); - - // Each iteration of this loop finds a component of the graph and - // decides whether it is a tree or not. If it is a tree, adds it to the - // forest and continued with the next component. - - while (unProcessedNodes.length > 0 && isForest) { - toBeVisited.push(unProcessedNodes[0]); - - // Start the BFS. Each iteration of this loop visits a node in a - // BFS manner. - while (toBeVisited.length > 0 && isForest) { - //pool operation - var currentNode = toBeVisited[0]; - toBeVisited.splice(0, 1); - visited.add(currentNode); - - // Traverse all neighbors of this node - var neighborEdges = currentNode.getEdges(); - - for (var i = 0; i < neighborEdges.length; i++) { - var currentNeighbor = neighborEdges[i].getOtherEnd(currentNode); - - // If BFS is not growing from this neighbor. - if (parents.get(currentNode) != currentNeighbor) { - // We haven't previously visited this neighbor. - if (!visited.has(currentNeighbor)) { - toBeVisited.push(currentNeighbor); - parents.set(currentNeighbor, currentNode); - } - // Since we have previously visited this neighbor and - // this neighbor is not parent of currentNode, given - // graph contains a component that is not tree, hence - // it is not a forest. - else { - isForest = false; - break; - } - } - } - } - - // The graph contains a component that is not a tree. Empty - // previously found trees. The method will end. - if (!isForest) { - flatForest = []; - } - // Save currently visited nodes as a tree in our forest. Reset - // visited and parents lists. Continue with the next component of - // the graph, if any. - else { - var temp = [].concat(_toConsumableArray(visited)); - flatForest.push(temp); - //flatForest = flatForest.concat(temp); - //unProcessedNodes.removeAll(visited); - for (var i = 0; i < temp.length; i++) { - var value = temp[i]; - var index = unProcessedNodes.indexOf(value); - if (index > -1) { - unProcessedNodes.splice(index, 1); - } - } - visited = new Set(); - parents = new Map(); - } - } - - return flatForest; -}; - -/** - * This method creates dummy nodes (an l-level node with minimal dimensions) - * for the given edge (one per bendpoint). The existing l-level structure - * is updated accordingly. - */ -Layout.prototype.createDummyNodesForBendpoints = function (edge) { - var dummyNodes = []; - var prev = edge.source; - - var graph = this.graphManager.calcLowestCommonAncestor(edge.source, edge.target); - - for (var i = 0; i < edge.bendpoints.length; i++) { - // create new dummy node - var dummyNode = this.newNode(null); - dummyNode.setRect(new Point(0, 0), new Dimension(1, 1)); - - graph.add(dummyNode); - - // create new dummy edge between prev and dummy node - var dummyEdge = this.newEdge(null); - this.graphManager.add(dummyEdge, prev, dummyNode); - - dummyNodes.add(dummyNode); - prev = dummyNode; - } - - var dummyEdge = this.newEdge(null); - this.graphManager.add(dummyEdge, prev, edge.target); - - this.edgeToDummyNodes.set(edge, dummyNodes); - - // remove real edge from graph manager if it is inter-graph - if (edge.isInterGraph()) { - this.graphManager.remove(edge); - } - // else, remove the edge from the current graph - else { - graph.remove(edge); - } - - return dummyNodes; -}; - -/** - * This method creates bendpoints for edges from the dummy nodes - * at l-level. - */ -Layout.prototype.createBendpointsFromDummyNodes = function () { - var edges = []; - edges = edges.concat(this.graphManager.getAllEdges()); - edges = [].concat(_toConsumableArray(this.edgeToDummyNodes.keys())).concat(edges); - - for (var k = 0; k < edges.length; k++) { - var lEdge = edges[k]; - - if (lEdge.bendpoints.length > 0) { - var path = this.edgeToDummyNodes.get(lEdge); - - for (var i = 0; i < path.length; i++) { - var dummyNode = path[i]; - var p = new PointD(dummyNode.getCenterX(), dummyNode.getCenterY()); - - // update bendpoint's location according to dummy node - var ebp = lEdge.bendpoints.get(i); - ebp.x = p.x; - ebp.y = p.y; - - // remove the dummy node, dummy edges incident with this - // dummy node is also removed (within the remove method) - dummyNode.getOwner().remove(dummyNode); - } - - // add the real edge to graph - this.graphManager.add(lEdge, lEdge.source, lEdge.target); - } - } -}; - -Layout.transform = function (sliderValue, defaultValue, minDiv, maxMul) { - if (minDiv != undefined && maxMul != undefined) { - var value = defaultValue; - - if (sliderValue <= 50) { - var minValue = defaultValue / minDiv; - value -= (defaultValue - minValue) / 50 * (50 - sliderValue); - } else { - var maxValue = defaultValue * maxMul; - value += (maxValue - defaultValue) / 50 * (sliderValue - 50); - } - - return value; - } else { - var a, b; - - if (sliderValue <= 50) { - a = 9.0 * defaultValue / 500.0; - b = defaultValue / 10.0; - } else { - a = 9.0 * defaultValue / 50.0; - b = -8 * defaultValue; - } - - return a * sliderValue + b; - } -}; - -/** - * This method finds and returns the center of the given nodes, assuming - * that the given nodes form a tree in themselves. - */ -Layout.findCenterOfTree = function (nodes) { - var list = []; - list = list.concat(nodes); - - var removedNodes = []; - var remainingDegrees = new Map(); - var foundCenter = false; - var centerNode = null; - - if (list.length == 1 || list.length == 2) { - foundCenter = true; - centerNode = list[0]; - } - - for (var i = 0; i < list.length; i++) { - var node = list[i]; - var degree = node.getNeighborsList().size; - remainingDegrees.set(node, node.getNeighborsList().size); - - if (degree == 1) { - removedNodes.push(node); - } - } - - var tempList = []; - tempList = tempList.concat(removedNodes); - - while (!foundCenter) { - var tempList2 = []; - tempList2 = tempList2.concat(tempList); - tempList = []; - - for (var i = 0; i < list.length; i++) { - var node = list[i]; - - var index = list.indexOf(node); - if (index >= 0) { - list.splice(index, 1); - } - - var neighbours = node.getNeighborsList(); - - neighbours.forEach(function (neighbour) { - if (removedNodes.indexOf(neighbour) < 0) { - var otherDegree = remainingDegrees.get(neighbour); - var newDegree = otherDegree - 1; - - if (newDegree == 1) { - tempList.push(neighbour); - } - - remainingDegrees.set(neighbour, newDegree); - } - }); - } - - removedNodes = removedNodes.concat(tempList); - - if (list.length == 1 || list.length == 2) { - foundCenter = true; - centerNode = list[0]; - } - } - - return centerNode; -}; - -/** - * During the coarsening process, this layout may be referenced by two graph managers - * this setter function grants access to change the currently being used graph manager - */ -Layout.prototype.setGraphManager = function (gm) { - this.graphManager = gm; -}; - -module.exports = Layout; - -/***/ }), -/* 16 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -function RandomSeed() {} -// adapted from: https://stackoverflow.com/a/19303725 -RandomSeed.seed = 1; -RandomSeed.x = 0; - -RandomSeed.nextDouble = function () { - RandomSeed.x = Math.sin(RandomSeed.seed++) * 10000; - return RandomSeed.x - Math.floor(RandomSeed.x); -}; - -module.exports = RandomSeed; - -/***/ }), -/* 17 */ -/***/ (function(module, exports, __nested_webpack_require_81860__) { - -"use strict"; - - -var PointD = __nested_webpack_require_81860__(4); - -function Transform(x, y) { - this.lworldOrgX = 0.0; - this.lworldOrgY = 0.0; - this.ldeviceOrgX = 0.0; - this.ldeviceOrgY = 0.0; - this.lworldExtX = 1.0; - this.lworldExtY = 1.0; - this.ldeviceExtX = 1.0; - this.ldeviceExtY = 1.0; -} - -Transform.prototype.getWorldOrgX = function () { - return this.lworldOrgX; -}; - -Transform.prototype.setWorldOrgX = function (wox) { - this.lworldOrgX = wox; -}; - -Transform.prototype.getWorldOrgY = function () { - return this.lworldOrgY; -}; - -Transform.prototype.setWorldOrgY = function (woy) { - this.lworldOrgY = woy; -}; - -Transform.prototype.getWorldExtX = function () { - return this.lworldExtX; -}; - -Transform.prototype.setWorldExtX = function (wex) { - this.lworldExtX = wex; -}; - -Transform.prototype.getWorldExtY = function () { - return this.lworldExtY; -}; - -Transform.prototype.setWorldExtY = function (wey) { - this.lworldExtY = wey; -}; - -/* Device related */ - -Transform.prototype.getDeviceOrgX = function () { - return this.ldeviceOrgX; -}; - -Transform.prototype.setDeviceOrgX = function (dox) { - this.ldeviceOrgX = dox; -}; - -Transform.prototype.getDeviceOrgY = function () { - return this.ldeviceOrgY; -}; - -Transform.prototype.setDeviceOrgY = function (doy) { - this.ldeviceOrgY = doy; -}; - -Transform.prototype.getDeviceExtX = function () { - return this.ldeviceExtX; -}; - -Transform.prototype.setDeviceExtX = function (dex) { - this.ldeviceExtX = dex; -}; - -Transform.prototype.getDeviceExtY = function () { - return this.ldeviceExtY; -}; - -Transform.prototype.setDeviceExtY = function (dey) { - this.ldeviceExtY = dey; -}; - -Transform.prototype.transformX = function (x) { - var xDevice = 0.0; - var worldExtX = this.lworldExtX; - if (worldExtX != 0.0) { - xDevice = this.ldeviceOrgX + (x - this.lworldOrgX) * this.ldeviceExtX / worldExtX; - } - - return xDevice; -}; - -Transform.prototype.transformY = function (y) { - var yDevice = 0.0; - var worldExtY = this.lworldExtY; - if (worldExtY != 0.0) { - yDevice = this.ldeviceOrgY + (y - this.lworldOrgY) * this.ldeviceExtY / worldExtY; - } - - return yDevice; -}; - -Transform.prototype.inverseTransformX = function (x) { - var xWorld = 0.0; - var deviceExtX = this.ldeviceExtX; - if (deviceExtX != 0.0) { - xWorld = this.lworldOrgX + (x - this.ldeviceOrgX) * this.lworldExtX / deviceExtX; - } - - return xWorld; -}; - -Transform.prototype.inverseTransformY = function (y) { - var yWorld = 0.0; - var deviceExtY = this.ldeviceExtY; - if (deviceExtY != 0.0) { - yWorld = this.lworldOrgY + (y - this.ldeviceOrgY) * this.lworldExtY / deviceExtY; - } - return yWorld; -}; - -Transform.prototype.inverseTransformPoint = function (inPoint) { - var outPoint = new PointD(this.inverseTransformX(inPoint.x), this.inverseTransformY(inPoint.y)); - return outPoint; -}; - -module.exports = Transform; - -/***/ }), -/* 18 */ -/***/ (function(module, exports, __nested_webpack_require_84747__) { - -"use strict"; - - -function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } - -var Layout = __nested_webpack_require_84747__(15); -var FDLayoutConstants = __nested_webpack_require_84747__(7); -var LayoutConstants = __nested_webpack_require_84747__(0); -var IGeometry = __nested_webpack_require_84747__(8); -var IMath = __nested_webpack_require_84747__(9); - -function FDLayout() { - Layout.call(this); - - this.useSmartIdealEdgeLengthCalculation = FDLayoutConstants.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION; - this.idealEdgeLength = FDLayoutConstants.DEFAULT_EDGE_LENGTH; - this.springConstant = FDLayoutConstants.DEFAULT_SPRING_STRENGTH; - this.repulsionConstant = FDLayoutConstants.DEFAULT_REPULSION_STRENGTH; - this.gravityConstant = FDLayoutConstants.DEFAULT_GRAVITY_STRENGTH; - this.compoundGravityConstant = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH; - this.gravityRangeFactor = FDLayoutConstants.DEFAULT_GRAVITY_RANGE_FACTOR; - this.compoundGravityRangeFactor = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR; - this.displacementThresholdPerNode = 3.0 * FDLayoutConstants.DEFAULT_EDGE_LENGTH / 100; - this.coolingFactor = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL; - this.initialCoolingFactor = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL; - this.totalDisplacement = 0.0; - this.oldTotalDisplacement = 0.0; - this.maxIterations = FDLayoutConstants.MAX_ITERATIONS; -} - -FDLayout.prototype = Object.create(Layout.prototype); - -for (var prop in Layout) { - FDLayout[prop] = Layout[prop]; -} - -FDLayout.prototype.initParameters = function () { - Layout.prototype.initParameters.call(this, arguments); - - this.totalIterations = 0; - this.notAnimatedIterations = 0; - - this.useFRGridVariant = FDLayoutConstants.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION; - - this.grid = []; -}; - -FDLayout.prototype.calcIdealEdgeLengths = function () { - var edge; - var lcaDepth; - var source; - var target; - var sizeOfSourceInLca; - var sizeOfTargetInLca; - - var allEdges = this.getGraphManager().getAllEdges(); - for (var i = 0; i < allEdges.length; i++) { - edge = allEdges[i]; - - edge.idealLength = this.idealEdgeLength; - - if (edge.isInterGraph) { - source = edge.getSource(); - target = edge.getTarget(); - - sizeOfSourceInLca = edge.getSourceInLca().getEstimatedSize(); - sizeOfTargetInLca = edge.getTargetInLca().getEstimatedSize(); - - if (this.useSmartIdealEdgeLengthCalculation) { - edge.idealLength += sizeOfSourceInLca + sizeOfTargetInLca - 2 * LayoutConstants.SIMPLE_NODE_SIZE; - } - - lcaDepth = edge.getLca().getInclusionTreeDepth(); - - edge.idealLength += FDLayoutConstants.DEFAULT_EDGE_LENGTH * FDLayoutConstants.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR * (source.getInclusionTreeDepth() + target.getInclusionTreeDepth() - 2 * lcaDepth); - } - } -}; - -FDLayout.prototype.initSpringEmbedder = function () { - - var s = this.getAllNodes().length; - if (this.incremental) { - if (s > FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) { - this.coolingFactor = Math.max(this.coolingFactor * FDLayoutConstants.COOLING_ADAPTATION_FACTOR, this.coolingFactor - (s - FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) / (FDLayoutConstants.ADAPTATION_UPPER_NODE_LIMIT - FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) * this.coolingFactor * (1 - FDLayoutConstants.COOLING_ADAPTATION_FACTOR)); - } - this.maxNodeDisplacement = FDLayoutConstants.MAX_NODE_DISPLACEMENT_INCREMENTAL; - } else { - if (s > FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) { - this.coolingFactor = Math.max(FDLayoutConstants.COOLING_ADAPTATION_FACTOR, 1.0 - (s - FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) / (FDLayoutConstants.ADAPTATION_UPPER_NODE_LIMIT - FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) * (1 - FDLayoutConstants.COOLING_ADAPTATION_FACTOR)); - } else { - this.coolingFactor = 1.0; - } - this.initialCoolingFactor = this.coolingFactor; - this.maxNodeDisplacement = FDLayoutConstants.MAX_NODE_DISPLACEMENT; - } - - this.maxIterations = Math.max(this.getAllNodes().length * 5, this.maxIterations); - - this.totalDisplacementThreshold = this.displacementThresholdPerNode * this.getAllNodes().length; - - this.repulsionRange = this.calcRepulsionRange(); -}; - -FDLayout.prototype.calcSpringForces = function () { - var lEdges = this.getAllEdges(); - var edge; - - for (var i = 0; i < lEdges.length; i++) { - edge = lEdges[i]; - - this.calcSpringForce(edge, edge.idealLength); - } -}; - -FDLayout.prototype.calcRepulsionForces = function () { - var gridUpdateAllowed = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; - var forceToNodeSurroundingUpdate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; - - var i, j; - var nodeA, nodeB; - var lNodes = this.getAllNodes(); - var processedNodeSet; - - if (this.useFRGridVariant) { - if (this.totalIterations % FDLayoutConstants.GRID_CALCULATION_CHECK_PERIOD == 1 && gridUpdateAllowed) { - this.updateGrid(); - } - - processedNodeSet = new Set(); - - // calculate repulsion forces between each nodes and its surrounding - for (i = 0; i < lNodes.length; i++) { - nodeA = lNodes[i]; - this.calculateRepulsionForceOfANode(nodeA, processedNodeSet, gridUpdateAllowed, forceToNodeSurroundingUpdate); - processedNodeSet.add(nodeA); - } - } else { - for (i = 0; i < lNodes.length; i++) { - nodeA = lNodes[i]; - - for (j = i + 1; j < lNodes.length; j++) { - nodeB = lNodes[j]; - - // If both nodes are not members of the same graph, skip. - if (nodeA.getOwner() != nodeB.getOwner()) { - continue; - } - - this.calcRepulsionForce(nodeA, nodeB); - } - } - } -}; - -FDLayout.prototype.calcGravitationalForces = function () { - var node; - var lNodes = this.getAllNodesToApplyGravitation(); - - for (var i = 0; i < lNodes.length; i++) { - node = lNodes[i]; - this.calcGravitationalForce(node); - } -}; - -FDLayout.prototype.moveNodes = function () { - var lNodes = this.getAllNodes(); - var node; - - for (var i = 0; i < lNodes.length; i++) { - node = lNodes[i]; - node.move(); - } -}; - -FDLayout.prototype.calcSpringForce = function (edge, idealLength) { - var sourceNode = edge.getSource(); - var targetNode = edge.getTarget(); - - var length; - var springForce; - var springForceX; - var springForceY; - - // Update edge length - if (this.uniformLeafNodeSizes && sourceNode.getChild() == null && targetNode.getChild() == null) { - edge.updateLengthSimple(); - } else { - edge.updateLength(); - - if (edge.isOverlapingSourceAndTarget) { - return; - } - } - - length = edge.getLength(); - - if (length == 0) return; - - // Calculate spring forces - springForce = this.springConstant * (length - idealLength); - - // Project force onto x and y axes - springForceX = springForce * (edge.lengthX / length); - springForceY = springForce * (edge.lengthY / length); - - // Apply forces on the end nodes - sourceNode.springForceX += springForceX; - sourceNode.springForceY += springForceY; - targetNode.springForceX -= springForceX; - targetNode.springForceY -= springForceY; -}; - -FDLayout.prototype.calcRepulsionForce = function (nodeA, nodeB) { - var rectA = nodeA.getRect(); - var rectB = nodeB.getRect(); - var overlapAmount = new Array(2); - var clipPoints = new Array(4); - var distanceX; - var distanceY; - var distanceSquared; - var distance; - var repulsionForce; - var repulsionForceX; - var repulsionForceY; - - if (rectA.intersects(rectB)) // two nodes overlap - { - // calculate separation amount in x and y directions - IGeometry.calcSeparationAmount(rectA, rectB, overlapAmount, FDLayoutConstants.DEFAULT_EDGE_LENGTH / 2.0); - - repulsionForceX = 2 * overlapAmount[0]; - repulsionForceY = 2 * overlapAmount[1]; - - var childrenConstant = nodeA.noOfChildren * nodeB.noOfChildren / (nodeA.noOfChildren + nodeB.noOfChildren); - - // Apply forces on the two nodes - nodeA.repulsionForceX -= childrenConstant * repulsionForceX; - nodeA.repulsionForceY -= childrenConstant * repulsionForceY; - nodeB.repulsionForceX += childrenConstant * repulsionForceX; - nodeB.repulsionForceY += childrenConstant * repulsionForceY; - } else // no overlap - { - // calculate distance - - if (this.uniformLeafNodeSizes && nodeA.getChild() == null && nodeB.getChild() == null) // simply base repulsion on distance of node centers - { - distanceX = rectB.getCenterX() - rectA.getCenterX(); - distanceY = rectB.getCenterY() - rectA.getCenterY(); - } else // use clipping points - { - IGeometry.getIntersection(rectA, rectB, clipPoints); - - distanceX = clipPoints[2] - clipPoints[0]; - distanceY = clipPoints[3] - clipPoints[1]; - } - - // No repulsion range. FR grid variant should take care of this. - if (Math.abs(distanceX) < FDLayoutConstants.MIN_REPULSION_DIST) { - distanceX = IMath.sign(distanceX) * FDLayoutConstants.MIN_REPULSION_DIST; - } - - if (Math.abs(distanceY) < FDLayoutConstants.MIN_REPULSION_DIST) { - distanceY = IMath.sign(distanceY) * FDLayoutConstants.MIN_REPULSION_DIST; - } - - distanceSquared = distanceX * distanceX + distanceY * distanceY; - distance = Math.sqrt(distanceSquared); - - repulsionForce = this.repulsionConstant * nodeA.noOfChildren * nodeB.noOfChildren / distanceSquared; - - // Project force onto x and y axes - repulsionForceX = repulsionForce * distanceX / distance; - repulsionForceY = repulsionForce * distanceY / distance; - - // Apply forces on the two nodes - nodeA.repulsionForceX -= repulsionForceX; - nodeA.repulsionForceY -= repulsionForceY; - nodeB.repulsionForceX += repulsionForceX; - nodeB.repulsionForceY += repulsionForceY; - } -}; - -FDLayout.prototype.calcGravitationalForce = function (node) { - var ownerGraph; - var ownerCenterX; - var ownerCenterY; - var distanceX; - var distanceY; - var absDistanceX; - var absDistanceY; - var estimatedSize; - ownerGraph = node.getOwner(); - - ownerCenterX = (ownerGraph.getRight() + ownerGraph.getLeft()) / 2; - ownerCenterY = (ownerGraph.getTop() + ownerGraph.getBottom()) / 2; - distanceX = node.getCenterX() - ownerCenterX; - distanceY = node.getCenterY() - ownerCenterY; - absDistanceX = Math.abs(distanceX) + node.getWidth() / 2; - absDistanceY = Math.abs(distanceY) + node.getHeight() / 2; - - if (node.getOwner() == this.graphManager.getRoot()) // in the root graph - { - estimatedSize = ownerGraph.getEstimatedSize() * this.gravityRangeFactor; - - if (absDistanceX > estimatedSize || absDistanceY > estimatedSize) { - node.gravitationForceX = -this.gravityConstant * distanceX; - node.gravitationForceY = -this.gravityConstant * distanceY; - } - } else // inside a compound - { - estimatedSize = ownerGraph.getEstimatedSize() * this.compoundGravityRangeFactor; - - if (absDistanceX > estimatedSize || absDistanceY > estimatedSize) { - node.gravitationForceX = -this.gravityConstant * distanceX * this.compoundGravityConstant; - node.gravitationForceY = -this.gravityConstant * distanceY * this.compoundGravityConstant; - } - } -}; - -FDLayout.prototype.isConverged = function () { - var converged; - var oscilating = false; - - if (this.totalIterations > this.maxIterations / 3) { - oscilating = Math.abs(this.totalDisplacement - this.oldTotalDisplacement) < 2; - } - - converged = this.totalDisplacement < this.totalDisplacementThreshold; - - this.oldTotalDisplacement = this.totalDisplacement; - - return converged || oscilating; -}; - -FDLayout.prototype.animate = function () { - if (this.animationDuringLayout && !this.isSubLayout) { - if (this.notAnimatedIterations == this.animationPeriod) { - this.update(); - this.notAnimatedIterations = 0; - } else { - this.notAnimatedIterations++; - } - } -}; - -//This method calculates the number of children (weight) for all nodes -FDLayout.prototype.calcNoOfChildrenForAllNodes = function () { - var node; - var allNodes = this.graphManager.getAllNodes(); - - for (var i = 0; i < allNodes.length; i++) { - node = allNodes[i]; - node.noOfChildren = node.getNoOfChildren(); - } -}; - -// ----------------------------------------------------------------------------- -// Section: FR-Grid Variant Repulsion Force Calculation -// ----------------------------------------------------------------------------- - -FDLayout.prototype.calcGrid = function (graph) { - - var sizeX = 0; - var sizeY = 0; - - sizeX = parseInt(Math.ceil((graph.getRight() - graph.getLeft()) / this.repulsionRange)); - sizeY = parseInt(Math.ceil((graph.getBottom() - graph.getTop()) / this.repulsionRange)); - - var grid = new Array(sizeX); - - for (var i = 0; i < sizeX; i++) { - grid[i] = new Array(sizeY); - } - - for (var i = 0; i < sizeX; i++) { - for (var j = 0; j < sizeY; j++) { - grid[i][j] = new Array(); - } - } - - return grid; -}; - -FDLayout.prototype.addNodeToGrid = function (v, left, top) { - - var startX = 0; - var finishX = 0; - var startY = 0; - var finishY = 0; - - startX = parseInt(Math.floor((v.getRect().x - left) / this.repulsionRange)); - finishX = parseInt(Math.floor((v.getRect().width + v.getRect().x - left) / this.repulsionRange)); - startY = parseInt(Math.floor((v.getRect().y - top) / this.repulsionRange)); - finishY = parseInt(Math.floor((v.getRect().height + v.getRect().y - top) / this.repulsionRange)); - - for (var i = startX; i <= finishX; i++) { - for (var j = startY; j <= finishY; j++) { - this.grid[i][j].push(v); - v.setGridCoordinates(startX, finishX, startY, finishY); - } - } -}; - -FDLayout.prototype.updateGrid = function () { - var i; - var nodeA; - var lNodes = this.getAllNodes(); - - this.grid = this.calcGrid(this.graphManager.getRoot()); - - // put all nodes to proper grid cells - for (i = 0; i < lNodes.length; i++) { - nodeA = lNodes[i]; - this.addNodeToGrid(nodeA, this.graphManager.getRoot().getLeft(), this.graphManager.getRoot().getTop()); - } -}; - -FDLayout.prototype.calculateRepulsionForceOfANode = function (nodeA, processedNodeSet, gridUpdateAllowed, forceToNodeSurroundingUpdate) { - - if (this.totalIterations % FDLayoutConstants.GRID_CALCULATION_CHECK_PERIOD == 1 && gridUpdateAllowed || forceToNodeSurroundingUpdate) { - var surrounding = new Set(); - nodeA.surrounding = new Array(); - var nodeB; - var grid = this.grid; - - for (var i = nodeA.startX - 1; i < nodeA.finishX + 2; i++) { - for (var j = nodeA.startY - 1; j < nodeA.finishY + 2; j++) { - if (!(i < 0 || j < 0 || i >= grid.length || j >= grid[0].length)) { - for (var k = 0; k < grid[i][j].length; k++) { - nodeB = grid[i][j][k]; - - // If both nodes are not members of the same graph, - // or both nodes are the same, skip. - if (nodeA.getOwner() != nodeB.getOwner() || nodeA == nodeB) { - continue; - } - - // check if the repulsion force between - // nodeA and nodeB has already been calculated - if (!processedNodeSet.has(nodeB) && !surrounding.has(nodeB)) { - var distanceX = Math.abs(nodeA.getCenterX() - nodeB.getCenterX()) - (nodeA.getWidth() / 2 + nodeB.getWidth() / 2); - var distanceY = Math.abs(nodeA.getCenterY() - nodeB.getCenterY()) - (nodeA.getHeight() / 2 + nodeB.getHeight() / 2); - - // if the distance between nodeA and nodeB - // is less then calculation range - if (distanceX <= this.repulsionRange && distanceY <= this.repulsionRange) { - //then add nodeB to surrounding of nodeA - surrounding.add(nodeB); - } - } - } - } - } - } - - nodeA.surrounding = [].concat(_toConsumableArray(surrounding)); - } - for (i = 0; i < nodeA.surrounding.length; i++) { - this.calcRepulsionForce(nodeA, nodeA.surrounding[i]); - } -}; - -FDLayout.prototype.calcRepulsionRange = function () { - return 0.0; -}; - -module.exports = FDLayout; - -/***/ }), -/* 19 */ -/***/ (function(module, exports, __nested_webpack_require_100902__) { - -"use strict"; - - -var LEdge = __nested_webpack_require_100902__(1); -var FDLayoutConstants = __nested_webpack_require_100902__(7); - -function FDLayoutEdge(source, target, vEdge) { - LEdge.call(this, source, target, vEdge); - this.idealLength = FDLayoutConstants.DEFAULT_EDGE_LENGTH; -} - -FDLayoutEdge.prototype = Object.create(LEdge.prototype); - -for (var prop in LEdge) { - FDLayoutEdge[prop] = LEdge[prop]; -} - -module.exports = FDLayoutEdge; - -/***/ }), -/* 20 */ -/***/ (function(module, exports, __nested_webpack_require_101387__) { - -"use strict"; - - -var LNode = __nested_webpack_require_101387__(3); - -function FDLayoutNode(gm, loc, size, vNode) { - // alternative constructor is handled inside LNode - LNode.call(this, gm, loc, size, vNode); - //Spring, repulsion and gravitational forces acting on this node - this.springForceX = 0; - this.springForceY = 0; - this.repulsionForceX = 0; - this.repulsionForceY = 0; - this.gravitationForceX = 0; - this.gravitationForceY = 0; - //Amount by which this node is to be moved in this iteration - this.displacementX = 0; - this.displacementY = 0; - - //Start and finish grid coordinates that this node is fallen into - this.startX = 0; - this.finishX = 0; - this.startY = 0; - this.finishY = 0; - - //Geometric neighbors of this node - this.surrounding = []; -} - -FDLayoutNode.prototype = Object.create(LNode.prototype); - -for (var prop in LNode) { - FDLayoutNode[prop] = LNode[prop]; -} - -FDLayoutNode.prototype.setGridCoordinates = function (_startX, _finishX, _startY, _finishY) { - this.startX = _startX; - this.finishX = _finishX; - this.startY = _startY; - this.finishY = _finishY; -}; - -module.exports = FDLayoutNode; - -/***/ }), -/* 21 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -function DimensionD(width, height) { - this.width = 0; - this.height = 0; - if (width !== null && height !== null) { - this.height = height; - this.width = width; - } -} - -DimensionD.prototype.getWidth = function () { - return this.width; -}; - -DimensionD.prototype.setWidth = function (width) { - this.width = width; -}; - -DimensionD.prototype.getHeight = function () { - return this.height; -}; - -DimensionD.prototype.setHeight = function (height) { - this.height = height; -}; - -module.exports = DimensionD; - -/***/ }), -/* 22 */ -/***/ (function(module, exports, __nested_webpack_require_103173__) { - -"use strict"; - - -var UniqueIDGeneretor = __nested_webpack_require_103173__(14); - -function HashMap() { - this.map = {}; - this.keys = []; -} - -HashMap.prototype.put = function (key, value) { - var theId = UniqueIDGeneretor.createID(key); - if (!this.contains(theId)) { - this.map[theId] = value; - this.keys.push(key); - } -}; - -HashMap.prototype.contains = function (key) { - var theId = UniqueIDGeneretor.createID(key); - return this.map[key] != null; -}; - -HashMap.prototype.get = function (key) { - var theId = UniqueIDGeneretor.createID(key); - return this.map[theId]; -}; - -HashMap.prototype.keySet = function () { - return this.keys; -}; - -module.exports = HashMap; - -/***/ }), -/* 23 */ -/***/ (function(module, exports, __nested_webpack_require_103901__) { - -"use strict"; - - -var UniqueIDGeneretor = __nested_webpack_require_103901__(14); - -function HashSet() { - this.set = {}; -} -; - -HashSet.prototype.add = function (obj) { - var theId = UniqueIDGeneretor.createID(obj); - if (!this.contains(theId)) this.set[theId] = obj; -}; - -HashSet.prototype.remove = function (obj) { - delete this.set[UniqueIDGeneretor.createID(obj)]; -}; - -HashSet.prototype.clear = function () { - this.set = {}; -}; - -HashSet.prototype.contains = function (obj) { - return this.set[UniqueIDGeneretor.createID(obj)] == obj; -}; - -HashSet.prototype.isEmpty = function () { - return this.size() === 0; -}; - -HashSet.prototype.size = function () { - return Object.keys(this.set).length; -}; - -//concats this.set to the given list -HashSet.prototype.addAllTo = function (list) { - var keys = Object.keys(this.set); - var length = keys.length; - for (var i = 0; i < length; i++) { - list.push(this.set[keys[i]]); - } -}; - -HashSet.prototype.size = function () { - return Object.keys(this.set).length; -}; - -HashSet.prototype.addAll = function (list) { - var s = list.length; - for (var i = 0; i < s; i++) { - var v = list[i]; - this.add(v); - } -}; - -module.exports = HashSet; - -/***/ }), -/* 24 */ -/***/ (function(module, exports, __nested_webpack_require_105138__) { - -"use strict"; - - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -/** - * A classic Quicksort algorithm with Hoare's partition - * - Works also on LinkedList objects - * - * Copyright: i-Vis Research Group, Bilkent University, 2007 - present - */ - -var LinkedList = __nested_webpack_require_105138__(11); - -var Quicksort = function () { - function Quicksort(A, compareFunction) { - _classCallCheck(this, Quicksort); - - if (compareFunction !== null || compareFunction !== undefined) this.compareFunction = this._defaultCompareFunction; - - var length = void 0; - if (A instanceof LinkedList) length = A.size();else length = A.length; - - this._quicksort(A, 0, length - 1); - } - - _createClass(Quicksort, [{ - key: '_quicksort', - value: function _quicksort(A, p, r) { - if (p < r) { - var q = this._partition(A, p, r); - this._quicksort(A, p, q); - this._quicksort(A, q + 1, r); - } - } - }, { - key: '_partition', - value: function _partition(A, p, r) { - var x = this._get(A, p); - var i = p; - var j = r; - while (true) { - while (this.compareFunction(x, this._get(A, j))) { - j--; - }while (this.compareFunction(this._get(A, i), x)) { - i++; - }if (i < j) { - this._swap(A, i, j); - i++; - j--; - } else return j; - } - } - }, { - key: '_get', - value: function _get(object, index) { - if (object instanceof LinkedList) return object.get_object_at(index);else return object[index]; - } - }, { - key: '_set', - value: function _set(object, index, value) { - if (object instanceof LinkedList) object.set_object_at(index, value);else object[index] = value; - } - }, { - key: '_swap', - value: function _swap(A, i, j) { - var temp = this._get(A, i); - this._set(A, i, this._get(A, j)); - this._set(A, j, temp); - } - }, { - key: '_defaultCompareFunction', - value: function _defaultCompareFunction(a, b) { - return b > a; - } - }]); - - return Quicksort; -}(); - -module.exports = Quicksort; - -/***/ }), -/* 25 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -/** - * Needleman-Wunsch algorithm is an procedure to compute the optimal global alignment of two string - * sequences by S.B.Needleman and C.D.Wunsch (1970). - * - * Aside from the inputs, you can assign the scores for, - * - Match: The two characters at the current index are same. - * - Mismatch: The two characters at the current index are different. - * - Insertion/Deletion(gaps): The best alignment involves one letter aligning to a gap in the other string. - */ - -var NeedlemanWunsch = function () { - function NeedlemanWunsch(sequence1, sequence2) { - var match_score = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1; - var mismatch_penalty = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : -1; - var gap_penalty = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : -1; - - _classCallCheck(this, NeedlemanWunsch); - - this.sequence1 = sequence1; - this.sequence2 = sequence2; - this.match_score = match_score; - this.mismatch_penalty = mismatch_penalty; - this.gap_penalty = gap_penalty; - - // Just the remove redundancy - this.iMax = sequence1.length + 1; - this.jMax = sequence2.length + 1; - - // Grid matrix of scores - this.grid = new Array(this.iMax); - for (var i = 0; i < this.iMax; i++) { - this.grid[i] = new Array(this.jMax); - - for (var j = 0; j < this.jMax; j++) { - this.grid[i][j] = 0; - } - } - - // Traceback matrix (2D array, each cell is an array of boolean values for [`Diag`, `Up`, `Left`] positions) - this.tracebackGrid = new Array(this.iMax); - for (var _i = 0; _i < this.iMax; _i++) { - this.tracebackGrid[_i] = new Array(this.jMax); - - for (var _j = 0; _j < this.jMax; _j++) { - this.tracebackGrid[_i][_j] = [null, null, null]; - } - } - - // The aligned sequences (return multiple possibilities) - this.alignments = []; - - // Final alignment score - this.score = -1; - - // Calculate scores and tracebacks - this.computeGrids(); - } - - _createClass(NeedlemanWunsch, [{ - key: "getScore", - value: function getScore() { - return this.score; - } - }, { - key: "getAlignments", - value: function getAlignments() { - return this.alignments; - } - - // Main dynamic programming procedure - - }, { - key: "computeGrids", - value: function computeGrids() { - // Fill in the first row - for (var j = 1; j < this.jMax; j++) { - this.grid[0][j] = this.grid[0][j - 1] + this.gap_penalty; - this.tracebackGrid[0][j] = [false, false, true]; - } - - // Fill in the first column - for (var i = 1; i < this.iMax; i++) { - this.grid[i][0] = this.grid[i - 1][0] + this.gap_penalty; - this.tracebackGrid[i][0] = [false, true, false]; - } - - // Fill the rest of the grid - for (var _i2 = 1; _i2 < this.iMax; _i2++) { - for (var _j2 = 1; _j2 < this.jMax; _j2++) { - // Find the max score(s) among [`Diag`, `Up`, `Left`] - var diag = void 0; - if (this.sequence1[_i2 - 1] === this.sequence2[_j2 - 1]) diag = this.grid[_i2 - 1][_j2 - 1] + this.match_score;else diag = this.grid[_i2 - 1][_j2 - 1] + this.mismatch_penalty; - - var up = this.grid[_i2 - 1][_j2] + this.gap_penalty; - var left = this.grid[_i2][_j2 - 1] + this.gap_penalty; - - // If there exists multiple max values, capture them for multiple paths - var maxOf = [diag, up, left]; - var indices = this.arrayAllMaxIndexes(maxOf); - - // Update Grids - this.grid[_i2][_j2] = maxOf[indices[0]]; - this.tracebackGrid[_i2][_j2] = [indices.includes(0), indices.includes(1), indices.includes(2)]; - } - } - - // Update alignment score - this.score = this.grid[this.iMax - 1][this.jMax - 1]; - } - - // Gets all possible valid sequence combinations - - }, { - key: "alignmentTraceback", - value: function alignmentTraceback() { - var inProcessAlignments = []; - - inProcessAlignments.push({ pos: [this.sequence1.length, this.sequence2.length], - seq1: "", - seq2: "" - }); - - while (inProcessAlignments[0]) { - var current = inProcessAlignments[0]; - var directions = this.tracebackGrid[current.pos[0]][current.pos[1]]; - - if (directions[0]) { - inProcessAlignments.push({ pos: [current.pos[0] - 1, current.pos[1] - 1], - seq1: this.sequence1[current.pos[0] - 1] + current.seq1, - seq2: this.sequence2[current.pos[1] - 1] + current.seq2 - }); - } - if (directions[1]) { - inProcessAlignments.push({ pos: [current.pos[0] - 1, current.pos[1]], - seq1: this.sequence1[current.pos[0] - 1] + current.seq1, - seq2: '-' + current.seq2 - }); - } - if (directions[2]) { - inProcessAlignments.push({ pos: [current.pos[0], current.pos[1] - 1], - seq1: '-' + current.seq1, - seq2: this.sequence2[current.pos[1] - 1] + current.seq2 - }); - } - - if (current.pos[0] === 0 && current.pos[1] === 0) this.alignments.push({ sequence1: current.seq1, - sequence2: current.seq2 - }); - - inProcessAlignments.shift(); - } - - return this.alignments; - } - - // Helper Functions - - }, { - key: "getAllIndexes", - value: function getAllIndexes(arr, val) { - var indexes = [], - i = -1; - while ((i = arr.indexOf(val, i + 1)) !== -1) { - indexes.push(i); - } - return indexes; - } - }, { - key: "arrayAllMaxIndexes", - value: function arrayAllMaxIndexes(array) { - return this.getAllIndexes(array, Math.max.apply(null, array)); - } - }]); - - return NeedlemanWunsch; -}(); - -module.exports = NeedlemanWunsch; - -/***/ }), -/* 26 */ -/***/ (function(module, exports, __nested_webpack_require_115611__) { - -"use strict"; - - -var layoutBase = function layoutBase() { - return; -}; - -layoutBase.FDLayout = __nested_webpack_require_115611__(18); -layoutBase.FDLayoutConstants = __nested_webpack_require_115611__(7); -layoutBase.FDLayoutEdge = __nested_webpack_require_115611__(19); -layoutBase.FDLayoutNode = __nested_webpack_require_115611__(20); -layoutBase.DimensionD = __nested_webpack_require_115611__(21); -layoutBase.HashMap = __nested_webpack_require_115611__(22); -layoutBase.HashSet = __nested_webpack_require_115611__(23); -layoutBase.IGeometry = __nested_webpack_require_115611__(8); -layoutBase.IMath = __nested_webpack_require_115611__(9); -layoutBase.Integer = __nested_webpack_require_115611__(10); -layoutBase.Point = __nested_webpack_require_115611__(12); -layoutBase.PointD = __nested_webpack_require_115611__(4); -layoutBase.RandomSeed = __nested_webpack_require_115611__(16); -layoutBase.RectangleD = __nested_webpack_require_115611__(13); -layoutBase.Transform = __nested_webpack_require_115611__(17); -layoutBase.UniqueIDGeneretor = __nested_webpack_require_115611__(14); -layoutBase.Quicksort = __nested_webpack_require_115611__(24); -layoutBase.LinkedList = __nested_webpack_require_115611__(11); -layoutBase.LGraphObject = __nested_webpack_require_115611__(2); -layoutBase.LGraph = __nested_webpack_require_115611__(5); -layoutBase.LEdge = __nested_webpack_require_115611__(1); -layoutBase.LGraphManager = __nested_webpack_require_115611__(6); -layoutBase.LNode = __nested_webpack_require_115611__(3); -layoutBase.Layout = __nested_webpack_require_115611__(15); -layoutBase.LayoutConstants = __nested_webpack_require_115611__(0); -layoutBase.NeedlemanWunsch = __nested_webpack_require_115611__(25); - -module.exports = layoutBase; - -/***/ }), -/* 27 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -function Emitter() { - this.listeners = []; -} - -var p = Emitter.prototype; - -p.addListener = function (event, callback) { - this.listeners.push({ - event: event, - callback: callback - }); -}; - -p.removeListener = function (event, callback) { - for (var i = this.listeners.length; i >= 0; i--) { - var l = this.listeners[i]; - - if (l.event === event && l.callback === callback) { - this.listeners.splice(i, 1); - } - } -}; - -p.emit = function (event, data) { - for (var i = 0; i < this.listeners.length; i++) { - var l = this.listeners[i]; - - if (event === l.event) { - l.callback(data); - } - } -}; - -module.exports = Emitter; - -/***/ }) -/******/ ]); -}); - -/***/ }), - -/***/ 73743: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - a: () => (/* binding */ createText), - c: () => (/* binding */ computeDimensionOfText) -}); - -// NAMESPACE OBJECT: ./node_modules/mermaid/node_modules/micromark/lib/constructs.js -var constructs_namespaceObject = {}; -__webpack_require__.r(constructs_namespaceObject); -__webpack_require__.d(constructs_namespaceObject, { - attentionMarkers: () => (attentionMarkers), - contentInitial: () => (contentInitial), - disable: () => (disable), - document: () => (constructs_document), - flow: () => (constructs_flow), - flowInitial: () => (flowInitial), - insideSpan: () => (insideSpan), - string: () => (constructs_string), - text: () => (constructs_text) -}); - -// EXTERNAL MODULE: ./node_modules/mermaid/dist/mermaid-b5860b54.js + 8 modules -var mermaid_b5860b54 = __webpack_require__(86079); -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/mdast-util-to-string/lib/index.js -/** - * @typedef {import('mdast').Root|import('mdast').Content} Node - * - * @typedef Options - * Configuration (optional). - * @property {boolean | null | undefined} [includeImageAlt=true] - * Whether to use `alt` for `image`s. - * @property {boolean | null | undefined} [includeHtml=true] - * Whether to use `value` of HTML. - */ - -/** @type {Options} */ -const emptyOptions = {} - -/** - * Get the text content of a node or list of nodes. - * - * Prefers the node’s plain-text fields, otherwise serializes its children, - * and if the given value is an array, serialize the nodes in it. - * - * @param {unknown} value - * Thing to serialize, typically `Node`. - * @param {Options | null | undefined} [options] - * Configuration (optional). - * @returns {string} - * Serialized `value`. - */ -function lib_toString(value, options) { - const settings = options || emptyOptions - const includeImageAlt = - typeof settings.includeImageAlt === 'boolean' - ? settings.includeImageAlt - : true - const includeHtml = - typeof settings.includeHtml === 'boolean' ? settings.includeHtml : true - - return one(value, includeImageAlt, includeHtml) -} - -/** - * One node or several nodes. - * - * @param {unknown} value - * Thing to serialize. - * @param {boolean} includeImageAlt - * Include image `alt`s. - * @param {boolean} includeHtml - * Include HTML. - * @returns {string} - * Serialized node. - */ -function one(value, includeImageAlt, includeHtml) { - if (node(value)) { - if ('value' in value) { - return value.type === 'html' && !includeHtml ? '' : value.value - } - - if (includeImageAlt && 'alt' in value && value.alt) { - return value.alt - } - - if ('children' in value) { - return lib_all(value.children, includeImageAlt, includeHtml) - } - } - - if (Array.isArray(value)) { - return lib_all(value, includeImageAlt, includeHtml) - } - - return '' -} - -/** - * Serialize a list of nodes. - * - * @param {Array} values - * Thing to serialize. - * @param {boolean} includeImageAlt - * Include image `alt`s. - * @param {boolean} includeHtml - * Include HTML. - * @returns {string} - * Serialized nodes. - */ -function lib_all(values, includeImageAlt, includeHtml) { - /** @type {Array} */ - const result = [] - let index = -1 - - while (++index < values.length) { - result[index] = one(values[index], includeImageAlt, includeHtml) - } - - return result.join('') -} - -/** - * Check if `value` looks like a node. - * - * @param {unknown} value - * Thing. - * @returns {value is Node} - * Whether `value` is a node. - */ -function node(value) { - return Boolean(value && typeof value === 'object') -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-chunked/index.js -/** - * Like `Array#splice`, but smarter for giant arrays. - * - * `Array#splice` takes all items to be inserted as individual argument which - * causes a stack overflow in V8 when trying to insert 100k items for instance. - * - * Otherwise, this does not return the removed items, and takes `items` as an - * array instead of rest parameters. - * - * @template {unknown} T - * Item type. - * @param {Array} list - * List to operate on. - * @param {number} start - * Index to remove/insert at (can be negative). - * @param {number} remove - * Number of items to remove. - * @param {Array} items - * Items to inject into `list`. - * @returns {void} - * Nothing. - */ -function splice(list, start, remove, items) { - const end = list.length - let chunkStart = 0 - /** @type {Array} */ - let parameters - - // Make start between zero and `end` (included). - if (start < 0) { - start = -start > end ? 0 : end + start - } else { - start = start > end ? end : start - } - remove = remove > 0 ? remove : 0 - - // No need to chunk the items if there’s only a couple (10k) items. - if (items.length < 10000) { - parameters = Array.from(items) - parameters.unshift(start, remove) - // @ts-expect-error Hush, it’s fine. - list.splice(...parameters) - } else { - // Delete `remove` items starting from `start` - if (remove) list.splice(start, remove) - - // Insert the items in chunks to not cause stack overflows. - while (chunkStart < items.length) { - parameters = items.slice(chunkStart, chunkStart + 10000) - parameters.unshift(start, 0) - // @ts-expect-error Hush, it’s fine. - list.splice(...parameters) - chunkStart += 10000 - start += 10000 - } - } -} - -/** - * Append `items` (an array) at the end of `list` (another array). - * When `list` was empty, returns `items` instead. - * - * This prevents a potentially expensive operation when `list` is empty, - * and adds items in batches to prevent V8 from hanging. - * - * @template {unknown} T - * Item type. - * @param {Array} list - * List to operate on. - * @param {Array} items - * Items to add to `list`. - * @returns {Array} - * Either `list` or `items`. - */ -function push(list, items) { - if (list.length > 0) { - splice(list, list.length, 0, items) - return list - } - return items -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-combine-extensions/index.js -/** - * @typedef {import('micromark-util-types').Extension} Extension - * @typedef {import('micromark-util-types').Handles} Handles - * @typedef {import('micromark-util-types').HtmlExtension} HtmlExtension - * @typedef {import('micromark-util-types').NormalizedExtension} NormalizedExtension - */ - - - -const micromark_util_combine_extensions_hasOwnProperty = {}.hasOwnProperty - -/** - * Combine multiple syntax extensions into one. - * - * @param {Array} extensions - * List of syntax extensions. - * @returns {NormalizedExtension} - * A single combined extension. - */ -function combineExtensions(extensions) { - /** @type {NormalizedExtension} */ - const all = {} - let index = -1 - - while (++index < extensions.length) { - syntaxExtension(all, extensions[index]) - } - - return all -} - -/** - * Merge `extension` into `all`. - * - * @param {NormalizedExtension} all - * Extension to merge into. - * @param {Extension} extension - * Extension to merge. - * @returns {void} - */ -function syntaxExtension(all, extension) { - /** @type {keyof Extension} */ - let hook - - for (hook in extension) { - const maybe = micromark_util_combine_extensions_hasOwnProperty.call(all, hook) ? all[hook] : undefined - /** @type {Record} */ - const left = maybe || (all[hook] = {}) - /** @type {Record | undefined} */ - const right = extension[hook] - /** @type {string} */ - let code - - if (right) { - for (code in right) { - if (!micromark_util_combine_extensions_hasOwnProperty.call(left, code)) left[code] = [] - const value = right[code] - constructs( - // @ts-expect-error Looks like a list. - left[code], - Array.isArray(value) ? value : value ? [value] : [] - ) - } - } - } -} - -/** - * Merge `list` into `existing` (both lists of constructs). - * Mutates `existing`. - * - * @param {Array} existing - * @param {Array} list - * @returns {void} - */ -function constructs(existing, list) { - let index = -1 - /** @type {Array} */ - const before = [] - - while (++index < list.length) { - // @ts-expect-error Looks like an object. - ;(list[index].add === 'after' ? existing : before).push(list[index]) - } - - splice(existing, 0, 0, before) -} - -/** - * Combine multiple HTML extensions into one. - * - * @param {Array} htmlExtensions - * List of HTML extensions. - * @returns {HtmlExtension} - * A single combined HTML extension. - */ -function combineHtmlExtensions(htmlExtensions) { - /** @type {HtmlExtension} */ - const handlers = {} - let index = -1 - - while (++index < htmlExtensions.length) { - htmlExtension(handlers, htmlExtensions[index]) - } - - return handlers -} - -/** - * Merge `extension` into `all`. - * - * @param {HtmlExtension} all - * Extension to merge into. - * @param {HtmlExtension} extension - * Extension to merge. - * @returns {void} - */ -function htmlExtension(all, extension) { - /** @type {keyof HtmlExtension} */ - let hook - - for (hook in extension) { - const maybe = micromark_util_combine_extensions_hasOwnProperty.call(all, hook) ? all[hook] : undefined - const left = maybe || (all[hook] = {}) - const right = extension[hook] - /** @type {keyof Handles} */ - let type - - if (right) { - for (type in right) { - // @ts-expect-error assume document vs regular handler are managed correctly. - left[type] = right[type] - } - } - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-character/lib/unicode-punctuation-regex.js -// This module is generated by `script/`. -// -// CommonMark handles attention (emphasis, strong) markers based on what comes -// before or after them. -// One such difference is if those characters are Unicode punctuation. -// This script is generated from the Unicode data. - -/** - * Regular expression that matches a unicode punctuation character. - */ -const unicodePunctuationRegex = - /[!-\/:-@\[-`\{-~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/ - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-character/index.js -/** - * @typedef {import('micromark-util-types').Code} Code - */ - - - -/** - * Check whether the character code represents an ASCII alpha (`a` through `z`, - * case insensitive). - * - * An **ASCII alpha** is an ASCII upper alpha or ASCII lower alpha. - * - * An **ASCII upper alpha** is a character in the inclusive range U+0041 (`A`) - * to U+005A (`Z`). - * - * An **ASCII lower alpha** is a character in the inclusive range U+0061 (`a`) - * to U+007A (`z`). - * - * @param code - * Code. - * @returns - * Whether it matches. - */ -const asciiAlpha = regexCheck(/[A-Za-z]/) - -/** - * Check whether the character code represents an ASCII alphanumeric (`a` - * through `z`, case insensitive, or `0` through `9`). - * - * An **ASCII alphanumeric** is an ASCII digit (see `asciiDigit`) or ASCII alpha - * (see `asciiAlpha`). - * - * @param code - * Code. - * @returns - * Whether it matches. - */ -const asciiAlphanumeric = regexCheck(/[\dA-Za-z]/) - -/** - * Check whether the character code represents an ASCII atext. - * - * atext is an ASCII alphanumeric (see `asciiAlphanumeric`), or a character in - * the inclusive ranges U+0023 NUMBER SIGN (`#`) to U+0027 APOSTROPHE (`'`), - * U+002A ASTERISK (`*`), U+002B PLUS SIGN (`+`), U+002D DASH (`-`), U+002F - * SLASH (`/`), U+003D EQUALS TO (`=`), U+003F QUESTION MARK (`?`), U+005E - * CARET (`^`) to U+0060 GRAVE ACCENT (`` ` ``), or U+007B LEFT CURLY BRACE - * (`{`) to U+007E TILDE (`~`). - * - * See: - * **\[RFC5322]**: - * [Internet Message Format](https://tools.ietf.org/html/rfc5322). - * P. Resnick. - * IETF. - * - * @param code - * Code. - * @returns - * Whether it matches. - */ -const asciiAtext = regexCheck(/[#-'*+\--9=?A-Z^-~]/) - -/** - * Check whether a character code is an ASCII control character. - * - * An **ASCII control** is a character in the inclusive range U+0000 NULL (NUL) - * to U+001F (US), or U+007F (DEL). - * - * @param {Code} code - * Code. - * @returns {boolean} - * Whether it matches. - */ -function asciiControl(code) { - return ( - // Special whitespace codes (which have negative values), C0 and Control - // character DEL - code !== null && (code < 32 || code === 127) - ) -} - -/** - * Check whether the character code represents an ASCII digit (`0` through `9`). - * - * An **ASCII digit** is a character in the inclusive range U+0030 (`0`) to - * U+0039 (`9`). - * - * @param code - * Code. - * @returns - * Whether it matches. - */ -const asciiDigit = regexCheck(/\d/) - -/** - * Check whether the character code represents an ASCII hex digit (`a` through - * `f`, case insensitive, or `0` through `9`). - * - * An **ASCII hex digit** is an ASCII digit (see `asciiDigit`), ASCII upper hex - * digit, or an ASCII lower hex digit. - * - * An **ASCII upper hex digit** is a character in the inclusive range U+0041 - * (`A`) to U+0046 (`F`). - * - * An **ASCII lower hex digit** is a character in the inclusive range U+0061 - * (`a`) to U+0066 (`f`). - * - * @param code - * Code. - * @returns - * Whether it matches. - */ -const asciiHexDigit = regexCheck(/[\dA-Fa-f]/) - -/** - * Check whether the character code represents ASCII punctuation. - * - * An **ASCII punctuation** is a character in the inclusive ranges U+0021 - * EXCLAMATION MARK (`!`) to U+002F SLASH (`/`), U+003A COLON (`:`) to U+0040 AT - * SIGN (`@`), U+005B LEFT SQUARE BRACKET (`[`) to U+0060 GRAVE ACCENT - * (`` ` ``), or U+007B LEFT CURLY BRACE (`{`) to U+007E TILDE (`~`). - * - * @param code - * Code. - * @returns - * Whether it matches. - */ -const asciiPunctuation = regexCheck(/[!-/:-@[-`{-~]/) - -/** - * Check whether a character code is a markdown line ending. - * - * A **markdown line ending** is the virtual characters M-0003 CARRIAGE RETURN - * LINE FEED (CRLF), M-0004 LINE FEED (LF) and M-0005 CARRIAGE RETURN (CR). - * - * In micromark, the actual character U+000A LINE FEED (LF) and U+000D CARRIAGE - * RETURN (CR) are replaced by these virtual characters depending on whether - * they occurred together. - * - * @param {Code} code - * Code. - * @returns {boolean} - * Whether it matches. - */ -function markdownLineEnding(code) { - return code !== null && code < -2 -} - -/** - * Check whether a character code is a markdown line ending (see - * `markdownLineEnding`) or markdown space (see `markdownSpace`). - * - * @param {Code} code - * Code. - * @returns {boolean} - * Whether it matches. - */ -function markdownLineEndingOrSpace(code) { - return code !== null && (code < 0 || code === 32) -} - -/** - * Check whether a character code is a markdown space. - * - * A **markdown space** is the concrete character U+0020 SPACE (SP) and the - * virtual characters M-0001 VIRTUAL SPACE (VS) and M-0002 HORIZONTAL TAB (HT). - * - * In micromark, the actual character U+0009 CHARACTER TABULATION (HT) is - * replaced by one M-0002 HORIZONTAL TAB (HT) and between 0 and 3 M-0001 VIRTUAL - * SPACE (VS) characters, depending on the column at which the tab occurred. - * - * @param {Code} code - * Code. - * @returns {boolean} - * Whether it matches. - */ -function markdownSpace(code) { - return code === -2 || code === -1 || code === 32 -} - -// Size note: removing ASCII from the regex and using `asciiPunctuation` here -// In fact adds to the bundle size. -/** - * Check whether the character code represents Unicode punctuation. - * - * A **Unicode punctuation** is a character in the Unicode `Pc` (Punctuation, - * Connector), `Pd` (Punctuation, Dash), `Pe` (Punctuation, Close), `Pf` - * (Punctuation, Final quote), `Pi` (Punctuation, Initial quote), `Po` - * (Punctuation, Other), or `Ps` (Punctuation, Open) categories, or an ASCII - * punctuation (see `asciiPunctuation`). - * - * See: - * **\[UNICODE]**: - * [The Unicode Standard](https://www.unicode.org/versions/). - * Unicode Consortium. - * - * @param code - * Code. - * @returns - * Whether it matches. - */ -const unicodePunctuation = regexCheck(unicodePunctuationRegex) - -/** - * Check whether the character code represents Unicode whitespace. - * - * Note that this does handle micromark specific markdown whitespace characters. - * See `markdownLineEndingOrSpace` to check that. - * - * A **Unicode whitespace** is a character in the Unicode `Zs` (Separator, - * Space) category, or U+0009 CHARACTER TABULATION (HT), U+000A LINE FEED (LF), - * U+000C (FF), or U+000D CARRIAGE RETURN (CR) (**\[UNICODE]**). - * - * See: - * **\[UNICODE]**: - * [The Unicode Standard](https://www.unicode.org/versions/). - * Unicode Consortium. - * - * @param code - * Code. - * @returns - * Whether it matches. - */ -const unicodeWhitespace = regexCheck(/\s/) - -/** - * Create a code check from a regex. - * - * @param {RegExp} regex - * @returns {(code: Code) => boolean} - */ -function regexCheck(regex) { - return check - - /** - * Check whether a code matches the bound regex. - * - * @param {Code} code - * Character code. - * @returns {boolean} - * Whether the character code matches the bound regex. - */ - function check(code) { - return code !== null && regex.test(String.fromCharCode(code)) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-space/index.js -/** - * @typedef {import('micromark-util-types').Effects} Effects - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenType} TokenType - */ - - - -// To do: implement `spaceOrTab`, `spaceOrTabMinMax`, `spaceOrTabWithOptions`. - -/** - * Parse spaces and tabs. - * - * There is no `nok` parameter: - * - * * spaces in markdown are often optional, in which case this factory can be - * used and `ok` will be switched to whether spaces were found or not - * * one line ending or space can be detected with `markdownSpace(code)` right - * before using `factorySpace` - * - * ###### Examples - * - * Where `␉` represents a tab (plus how much it expands) and `␠` represents a - * single space. - * - * ```markdown - * ␉ - * ␠␠␠␠ - * ␉␠ - * ``` - * - * @param {Effects} effects - * Context. - * @param {State} ok - * State switched to when successful. - * @param {TokenType} type - * Type (`' \t'`). - * @param {number | undefined} [max=Infinity] - * Max (exclusive). - * @returns - * Start state. - */ -function factorySpace(effects, ok, type, max) { - const limit = max ? max - 1 : Number.POSITIVE_INFINITY - let size = 0 - return start - - /** @type {State} */ - function start(code) { - if (markdownSpace(code)) { - effects.enter(type) - return prefix(code) - } - return ok(code) - } - - /** @type {State} */ - function prefix(code) { - if (markdownSpace(code) && size++ < limit) { - effects.consume(code) - return prefix - } - effects.exit(type) - return ok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/initialize/content.js -/** - * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct - * @typedef {import('micromark-util-types').Initializer} Initializer - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').Token} Token - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - */ - - - -/** @type {InitialConstruct} */ -const content = { - tokenize: initializeContent -} - -/** - * @this {TokenizeContext} - * @type {Initializer} - */ -function initializeContent(effects) { - const contentStart = effects.attempt( - this.parser.constructs.contentInitial, - afterContentStartConstruct, - paragraphInitial - ) - /** @type {Token} */ - let previous - return contentStart - - /** @type {State} */ - function afterContentStartConstruct(code) { - if (code === null) { - effects.consume(code) - return - } - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return factorySpace(effects, contentStart, 'linePrefix') - } - - /** @type {State} */ - function paragraphInitial(code) { - effects.enter('paragraph') - return lineStart(code) - } - - /** @type {State} */ - function lineStart(code) { - const token = effects.enter('chunkText', { - contentType: 'text', - previous - }) - if (previous) { - previous.next = token - } - previous = token - return data(code) - } - - /** @type {State} */ - function data(code) { - if (code === null) { - effects.exit('chunkText') - effects.exit('paragraph') - effects.consume(code) - return - } - if (markdownLineEnding(code)) { - effects.consume(code) - effects.exit('chunkText') - return lineStart - } - - // Data. - effects.consume(code) - return data - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/initialize/document.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').ContainerState} ContainerState - * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct - * @typedef {import('micromark-util-types').Initializer} Initializer - * @typedef {import('micromark-util-types').Point} Point - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').Token} Token - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - -/** - * @typedef {[Construct, ContainerState]} StackItem - */ - - - - -/** @type {InitialConstruct} */ -const document_document = { - tokenize: initializeDocument -} - -/** @type {Construct} */ -const containerConstruct = { - tokenize: tokenizeContainer -} - -/** - * @this {TokenizeContext} - * @type {Initializer} - */ -function initializeDocument(effects) { - const self = this - /** @type {Array} */ - const stack = [] - let continued = 0 - /** @type {TokenizeContext | undefined} */ - let childFlow - /** @type {Token | undefined} */ - let childToken - /** @type {number} */ - let lineStartOffset - return start - - /** @type {State} */ - function start(code) { - // First we iterate through the open blocks, starting with the root - // document, and descending through last children down to the last open - // block. - // Each block imposes a condition that the line must satisfy if the block is - // to remain open. - // For example, a block quote requires a `>` character. - // A paragraph requires a non-blank line. - // In this phase we may match all or just some of the open blocks. - // But we cannot close unmatched blocks yet, because we may have a lazy - // continuation line. - if (continued < stack.length) { - const item = stack[continued] - self.containerState = item[1] - return effects.attempt( - item[0].continuation, - documentContinue, - checkNewContainers - )(code) - } - - // Done. - return checkNewContainers(code) - } - - /** @type {State} */ - function documentContinue(code) { - continued++ - - // Note: this field is called `_closeFlow` but it also closes containers. - // Perhaps a good idea to rename it but it’s already used in the wild by - // extensions. - if (self.containerState._closeFlow) { - self.containerState._closeFlow = undefined - if (childFlow) { - closeFlow() - } - - // Note: this algorithm for moving events around is similar to the - // algorithm when dealing with lazy lines in `writeToChild`. - const indexBeforeExits = self.events.length - let indexBeforeFlow = indexBeforeExits - /** @type {Point | undefined} */ - let point - - // Find the flow chunk. - while (indexBeforeFlow--) { - if ( - self.events[indexBeforeFlow][0] === 'exit' && - self.events[indexBeforeFlow][1].type === 'chunkFlow' - ) { - point = self.events[indexBeforeFlow][1].end - break - } - } - exitContainers(continued) - - // Fix positions. - let index = indexBeforeExits - while (index < self.events.length) { - self.events[index][1].end = Object.assign({}, point) - index++ - } - - // Inject the exits earlier (they’re still also at the end). - splice( - self.events, - indexBeforeFlow + 1, - 0, - self.events.slice(indexBeforeExits) - ) - - // Discard the duplicate exits. - self.events.length = index - return checkNewContainers(code) - } - return start(code) - } - - /** @type {State} */ - function checkNewContainers(code) { - // Next, after consuming the continuation markers for existing blocks, we - // look for new block starts (e.g. `>` for a block quote). - // If we encounter a new block start, we close any blocks unmatched in - // step 1 before creating the new block as a child of the last matched - // block. - if (continued === stack.length) { - // No need to `check` whether there’s a container, of `exitContainers` - // would be moot. - // We can instead immediately `attempt` to parse one. - if (!childFlow) { - return documentContinued(code) - } - - // If we have concrete content, such as block HTML or fenced code, - // we can’t have containers “pierce” into them, so we can immediately - // start. - if (childFlow.currentConstruct && childFlow.currentConstruct.concrete) { - return flowStart(code) - } - - // If we do have flow, it could still be a blank line, - // but we’d be interrupting it w/ a new container if there’s a current - // construct. - // To do: next major: remove `_gfmTableDynamicInterruptHack` (no longer - // needed in micromark-extension-gfm-table@1.0.6). - self.interrupt = Boolean( - childFlow.currentConstruct && !childFlow._gfmTableDynamicInterruptHack - ) - } - - // Check if there is a new container. - self.containerState = {} - return effects.check( - containerConstruct, - thereIsANewContainer, - thereIsNoNewContainer - )(code) - } - - /** @type {State} */ - function thereIsANewContainer(code) { - if (childFlow) closeFlow() - exitContainers(continued) - return documentContinued(code) - } - - /** @type {State} */ - function thereIsNoNewContainer(code) { - self.parser.lazy[self.now().line] = continued !== stack.length - lineStartOffset = self.now().offset - return flowStart(code) - } - - /** @type {State} */ - function documentContinued(code) { - // Try new containers. - self.containerState = {} - return effects.attempt( - containerConstruct, - containerContinue, - flowStart - )(code) - } - - /** @type {State} */ - function containerContinue(code) { - continued++ - stack.push([self.currentConstruct, self.containerState]) - // Try another. - return documentContinued(code) - } - - /** @type {State} */ - function flowStart(code) { - if (code === null) { - if (childFlow) closeFlow() - exitContainers(0) - effects.consume(code) - return - } - childFlow = childFlow || self.parser.flow(self.now()) - effects.enter('chunkFlow', { - contentType: 'flow', - previous: childToken, - _tokenizer: childFlow - }) - return flowContinue(code) - } - - /** @type {State} */ - function flowContinue(code) { - if (code === null) { - writeToChild(effects.exit('chunkFlow'), true) - exitContainers(0) - effects.consume(code) - return - } - if (markdownLineEnding(code)) { - effects.consume(code) - writeToChild(effects.exit('chunkFlow')) - // Get ready for the next line. - continued = 0 - self.interrupt = undefined - return start - } - effects.consume(code) - return flowContinue - } - - /** - * @param {Token} token - * @param {boolean | undefined} [eof] - * @returns {void} - */ - function writeToChild(token, eof) { - const stream = self.sliceStream(token) - if (eof) stream.push(null) - token.previous = childToken - if (childToken) childToken.next = token - childToken = token - childFlow.defineSkip(token.start) - childFlow.write(stream) - - // Alright, so we just added a lazy line: - // - // ```markdown - // > a - // b. - // - // Or: - // - // > ~~~c - // d - // - // Or: - // - // > | e | - // f - // ``` - // - // The construct in the second example (fenced code) does not accept lazy - // lines, so it marked itself as done at the end of its first line, and - // then the content construct parses `d`. - // Most constructs in markdown match on the first line: if the first line - // forms a construct, a non-lazy line can’t “unmake” it. - // - // The construct in the third example is potentially a GFM table, and - // those are *weird*. - // It *could* be a table, from the first line, if the following line - // matches a condition. - // In this case, that second line is lazy, which “unmakes” the first line - // and turns the whole into one content block. - // - // We’ve now parsed the non-lazy and the lazy line, and can figure out - // whether the lazy line started a new flow block. - // If it did, we exit the current containers between the two flow blocks. - if (self.parser.lazy[token.start.line]) { - let index = childFlow.events.length - while (index--) { - if ( - // The token starts before the line ending… - childFlow.events[index][1].start.offset < lineStartOffset && - // …and either is not ended yet… - (!childFlow.events[index][1].end || - // …or ends after it. - childFlow.events[index][1].end.offset > lineStartOffset) - ) { - // Exit: there’s still something open, which means it’s a lazy line - // part of something. - return - } - } - - // Note: this algorithm for moving events around is similar to the - // algorithm when closing flow in `documentContinue`. - const indexBeforeExits = self.events.length - let indexBeforeFlow = indexBeforeExits - /** @type {boolean | undefined} */ - let seen - /** @type {Point | undefined} */ - let point - - // Find the previous chunk (the one before the lazy line). - while (indexBeforeFlow--) { - if ( - self.events[indexBeforeFlow][0] === 'exit' && - self.events[indexBeforeFlow][1].type === 'chunkFlow' - ) { - if (seen) { - point = self.events[indexBeforeFlow][1].end - break - } - seen = true - } - } - exitContainers(continued) - - // Fix positions. - index = indexBeforeExits - while (index < self.events.length) { - self.events[index][1].end = Object.assign({}, point) - index++ - } - - // Inject the exits earlier (they’re still also at the end). - splice( - self.events, - indexBeforeFlow + 1, - 0, - self.events.slice(indexBeforeExits) - ) - - // Discard the duplicate exits. - self.events.length = index - } - } - - /** - * @param {number} size - * @returns {void} - */ - function exitContainers(size) { - let index = stack.length - - // Exit open containers. - while (index-- > size) { - const entry = stack[index] - self.containerState = entry[1] - entry[0].exit.call(self, effects) - } - stack.length = size - } - function closeFlow() { - childFlow.write([null]) - childToken = undefined - childFlow = undefined - self.containerState._closeFlow = undefined - } -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeContainer(effects, ok, nok) { - // Always populated by defaults. - - return factorySpace( - effects, - effects.attempt(this.parser.constructs.document, ok, nok), - 'linePrefix', - this.parser.constructs.disable.null.includes('codeIndented') ? undefined : 4 - ) -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/blank-line.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const blankLine = { - tokenize: tokenizeBlankLine, - partial: true -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeBlankLine(effects, ok, nok) { - return start - - /** - * Start of blank line. - * - * > 👉 **Note**: `␠` represents a space character. - * - * ```markdown - * > | ␠␠␊ - * ^ - * > | ␊ - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - return markdownSpace(code) - ? factorySpace(effects, after, 'linePrefix')(code) - : after(code) - } - - /** - * At eof/eol, after optional whitespace. - * - * > 👉 **Note**: `␠` represents a space character. - * - * ```markdown - * > | ␠␠␊ - * ^ - * > | ␊ - * ^ - * ``` - * - * @type {State} - */ - function after(code) { - return code === null || markdownLineEnding(code) ? ok(code) : nok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/micromark-util-subtokenize/node_modules/micromark-util-chunked/index.js -/** - * Like `Array#splice`, but smarter for giant arrays. - * - * `Array#splice` takes all items to be inserted as individual argument which - * causes a stack overflow in V8 when trying to insert 100k items for instance. - * - * Otherwise, this does not return the removed items, and takes `items` as an - * array instead of rest parameters. - * - * @template {unknown} T - * Item type. - * @param {Array} list - * List to operate on. - * @param {number} start - * Index to remove/insert at (can be negative). - * @param {number} remove - * Number of items to remove. - * @param {Array} items - * Items to inject into `list`. - * @returns {void} - * Nothing. - */ -function micromark_util_chunked_splice(list, start, remove, items) { - const end = list.length - let chunkStart = 0 - /** @type {Array} */ - let parameters - - // Make start between zero and `end` (included). - if (start < 0) { - start = -start > end ? 0 : end + start - } else { - start = start > end ? end : start - } - remove = remove > 0 ? remove : 0 - - // No need to chunk the items if there’s only a couple (10k) items. - if (items.length < 10000) { - parameters = Array.from(items) - parameters.unshift(start, remove) - // @ts-expect-error Hush, it’s fine. - list.splice(...parameters) - } else { - // Delete `remove` items starting from `start` - if (remove) list.splice(start, remove) - - // Insert the items in chunks to not cause stack overflows. - while (chunkStart < items.length) { - parameters = items.slice(chunkStart, chunkStart + 10000) - parameters.unshift(start, 0) - // @ts-expect-error Hush, it’s fine. - list.splice(...parameters) - chunkStart += 10000 - start += 10000 - } - } -} - -/** - * Append `items` (an array) at the end of `list` (another array). - * When `list` was empty, returns `items` instead. - * - * This prevents a potentially expensive operation when `list` is empty, - * and adds items in batches to prevent V8 from hanging. - * - * @template {unknown} T - * Item type. - * @param {Array} list - * List to operate on. - * @param {Array} items - * Items to add to `list`. - * @returns {Array} - * Either `list` or `items`. - */ -function micromark_util_chunked_push(list, items) { - if (list.length > 0) { - micromark_util_chunked_splice(list, list.length, 0, items) - return list - } - return items -} - -;// CONCATENATED MODULE: ./node_modules/micromark-util-subtokenize/index.js -/** - * @typedef {import('micromark-util-types').Chunk} Chunk - * @typedef {import('micromark-util-types').Event} Event - * @typedef {import('micromark-util-types').Token} Token - */ - - -/** - * Tokenize subcontent. - * - * @param {Array} events - * List of events. - * @returns {boolean} - * Whether subtokens were found. - */ -function subtokenize(events) { - /** @type {Record} */ - const jumps = {} - let index = -1 - /** @type {Event} */ - let event - /** @type {number | undefined} */ - let lineIndex - /** @type {number} */ - let otherIndex - /** @type {Event} */ - let otherEvent - /** @type {Array} */ - let parameters - /** @type {Array} */ - let subevents - /** @type {boolean | undefined} */ - let more - while (++index < events.length) { - while (index in jumps) { - index = jumps[index] - } - event = events[index] - - // Add a hook for the GFM tasklist extension, which needs to know if text - // is in the first content of a list item. - if ( - index && - event[1].type === 'chunkFlow' && - events[index - 1][1].type === 'listItemPrefix' - ) { - subevents = event[1]._tokenizer.events - otherIndex = 0 - if ( - otherIndex < subevents.length && - subevents[otherIndex][1].type === 'lineEndingBlank' - ) { - otherIndex += 2 - } - if ( - otherIndex < subevents.length && - subevents[otherIndex][1].type === 'content' - ) { - while (++otherIndex < subevents.length) { - if (subevents[otherIndex][1].type === 'content') { - break - } - if (subevents[otherIndex][1].type === 'chunkText') { - subevents[otherIndex][1]._isInFirstContentOfListItem = true - otherIndex++ - } - } - } - } - - // Enter. - if (event[0] === 'enter') { - if (event[1].contentType) { - Object.assign(jumps, subcontent(events, index)) - index = jumps[index] - more = true - } - } - // Exit. - else if (event[1]._container) { - otherIndex = index - lineIndex = undefined - while (otherIndex--) { - otherEvent = events[otherIndex] - if ( - otherEvent[1].type === 'lineEnding' || - otherEvent[1].type === 'lineEndingBlank' - ) { - if (otherEvent[0] === 'enter') { - if (lineIndex) { - events[lineIndex][1].type = 'lineEndingBlank' - } - otherEvent[1].type = 'lineEnding' - lineIndex = otherIndex - } - } else { - break - } - } - if (lineIndex) { - // Fix position. - event[1].end = Object.assign({}, events[lineIndex][1].start) - - // Switch container exit w/ line endings. - parameters = events.slice(lineIndex, index) - parameters.unshift(event) - micromark_util_chunked_splice(events, lineIndex, index - lineIndex + 1, parameters) - } - } - } - return !more -} - -/** - * Tokenize embedded tokens. - * - * @param {Array} events - * @param {number} eventIndex - * @returns {Record} - */ -function subcontent(events, eventIndex) { - const token = events[eventIndex][1] - const context = events[eventIndex][2] - let startPosition = eventIndex - 1 - /** @type {Array} */ - const startPositions = [] - const tokenizer = - token._tokenizer || context.parser[token.contentType](token.start) - const childEvents = tokenizer.events - /** @type {Array<[number, number]>} */ - const jumps = [] - /** @type {Record} */ - const gaps = {} - /** @type {Array} */ - let stream - /** @type {Token | undefined} */ - let previous - let index = -1 - /** @type {Token | undefined} */ - let current = token - let adjust = 0 - let start = 0 - const breaks = [start] - - // Loop forward through the linked tokens to pass them in order to the - // subtokenizer. - while (current) { - // Find the position of the event for this token. - while (events[++startPosition][1] !== current) { - // Empty. - } - startPositions.push(startPosition) - if (!current._tokenizer) { - stream = context.sliceStream(current) - if (!current.next) { - stream.push(null) - } - if (previous) { - tokenizer.defineSkip(current.start) - } - if (current._isInFirstContentOfListItem) { - tokenizer._gfmTasklistFirstContentOfListItem = true - } - tokenizer.write(stream) - if (current._isInFirstContentOfListItem) { - tokenizer._gfmTasklistFirstContentOfListItem = undefined - } - } - - // Unravel the next token. - previous = current - current = current.next - } - - // Now, loop back through all events (and linked tokens), to figure out which - // parts belong where. - current = token - while (++index < childEvents.length) { - if ( - // Find a void token that includes a break. - childEvents[index][0] === 'exit' && - childEvents[index - 1][0] === 'enter' && - childEvents[index][1].type === childEvents[index - 1][1].type && - childEvents[index][1].start.line !== childEvents[index][1].end.line - ) { - start = index + 1 - breaks.push(start) - // Help GC. - current._tokenizer = undefined - current.previous = undefined - current = current.next - } - } - - // Help GC. - tokenizer.events = [] - - // If there’s one more token (which is the cases for lines that end in an - // EOF), that’s perfect: the last point we found starts it. - // If there isn’t then make sure any remaining content is added to it. - if (current) { - // Help GC. - current._tokenizer = undefined - current.previous = undefined - } else { - breaks.pop() - } - - // Now splice the events from the subtokenizer into the current events, - // moving back to front so that splice indices aren’t affected. - index = breaks.length - while (index--) { - const slice = childEvents.slice(breaks[index], breaks[index + 1]) - const start = startPositions.pop() - jumps.unshift([start, start + slice.length - 1]) - micromark_util_chunked_splice(events, start, 2, slice) - } - index = -1 - while (++index < jumps.length) { - gaps[adjust + jumps[index][0]] = adjust + jumps[index][1] - adjust += jumps[index][1] - jumps[index][0] - 1 - } - return gaps -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/content.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').Resolver} Resolver - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').Token} Token - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - - -/** - * No name because it must not be turned off. - * @type {Construct} - */ -const content_content = { - tokenize: tokenizeContent, - resolve: resolveContent -} - -/** @type {Construct} */ -const continuationConstruct = { - tokenize: tokenizeContinuation, - partial: true -} - -/** - * Content is transparent: it’s parsed right now. That way, definitions are also - * parsed right now: before text in paragraphs (specifically, media) are parsed. - * - * @type {Resolver} - */ -function resolveContent(events) { - subtokenize(events) - return events -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeContent(effects, ok) { - /** @type {Token | undefined} */ - let previous - return chunkStart - - /** - * Before a content chunk. - * - * ```markdown - * > | abc - * ^ - * ``` - * - * @type {State} - */ - function chunkStart(code) { - effects.enter('content') - previous = effects.enter('chunkContent', { - contentType: 'content' - }) - return chunkInside(code) - } - - /** - * In a content chunk. - * - * ```markdown - * > | abc - * ^^^ - * ``` - * - * @type {State} - */ - function chunkInside(code) { - if (code === null) { - return contentEnd(code) - } - - // To do: in `markdown-rs`, each line is parsed on its own, and everything - // is stitched together resolving. - if (markdownLineEnding(code)) { - return effects.check( - continuationConstruct, - contentContinue, - contentEnd - )(code) - } - - // Data. - effects.consume(code) - return chunkInside - } - - /** - * - * - * @type {State} - */ - function contentEnd(code) { - effects.exit('chunkContent') - effects.exit('content') - return ok(code) - } - - /** - * - * - * @type {State} - */ - function contentContinue(code) { - effects.consume(code) - effects.exit('chunkContent') - previous.next = effects.enter('chunkContent', { - contentType: 'content', - previous - }) - previous = previous.next - return chunkInside - } -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeContinuation(effects, ok, nok) { - const self = this - return startLookahead - - /** - * - * - * @type {State} - */ - function startLookahead(code) { - effects.exit('chunkContent') - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return factorySpace(effects, prefixed, 'linePrefix') - } - - /** - * - * - * @type {State} - */ - function prefixed(code) { - if (code === null || markdownLineEnding(code)) { - return nok(code) - } - - // Always populated by defaults. - - const tail = self.events[self.events.length - 1] - if ( - !self.parser.constructs.disable.null.includes('codeIndented') && - tail && - tail[1].type === 'linePrefix' && - tail[2].sliceSerialize(tail[1], true).length >= 4 - ) { - return ok(code) - } - return effects.interrupt(self.parser.constructs.flow, nok, ok)(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/initialize/flow.js -/** - * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct - * @typedef {import('micromark-util-types').Initializer} Initializer - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - */ - - - - -/** @type {InitialConstruct} */ -const flow = { - tokenize: initializeFlow -} - -/** - * @this {TokenizeContext} - * @type {Initializer} - */ -function initializeFlow(effects) { - const self = this - const initial = effects.attempt( - // Try to parse a blank line. - blankLine, - atBlankEnding, - // Try to parse initial flow (essentially, only code). - effects.attempt( - this.parser.constructs.flowInitial, - afterConstruct, - factorySpace( - effects, - effects.attempt( - this.parser.constructs.flow, - afterConstruct, - effects.attempt(content_content, afterConstruct) - ), - 'linePrefix' - ) - ) - ) - return initial - - /** @type {State} */ - function atBlankEnding(code) { - if (code === null) { - effects.consume(code) - return - } - effects.enter('lineEndingBlank') - effects.consume(code) - effects.exit('lineEndingBlank') - self.currentConstruct = undefined - return initial - } - - /** @type {State} */ - function afterConstruct(code) { - if (code === null) { - effects.consume(code) - return - } - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - self.currentConstruct = undefined - return initial - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/initialize/text.js -/** - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct - * @typedef {import('micromark-util-types').Initializer} Initializer - * @typedef {import('micromark-util-types').Resolver} Resolver - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - */ - -const resolver = { - resolveAll: createResolver() -} -const string = initializeFactory('string') -const text_text = initializeFactory('text') - -/** - * @param {'string' | 'text'} field - * @returns {InitialConstruct} - */ -function initializeFactory(field) { - return { - tokenize: initializeText, - resolveAll: createResolver( - field === 'text' ? resolveAllLineSuffixes : undefined - ) - } - - /** - * @this {TokenizeContext} - * @type {Initializer} - */ - function initializeText(effects) { - const self = this - const constructs = this.parser.constructs[field] - const text = effects.attempt(constructs, start, notText) - return start - - /** @type {State} */ - function start(code) { - return atBreak(code) ? text(code) : notText(code) - } - - /** @type {State} */ - function notText(code) { - if (code === null) { - effects.consume(code) - return - } - effects.enter('data') - effects.consume(code) - return data - } - - /** @type {State} */ - function data(code) { - if (atBreak(code)) { - effects.exit('data') - return text(code) - } - - // Data. - effects.consume(code) - return data - } - - /** - * @param {Code} code - * @returns {boolean} - */ - function atBreak(code) { - if (code === null) { - return true - } - const list = constructs[code] - let index = -1 - if (list) { - // Always populated by defaults. - - while (++index < list.length) { - const item = list[index] - if (!item.previous || item.previous.call(self, self.previous)) { - return true - } - } - } - return false - } - } -} - -/** - * @param {Resolver | undefined} [extraResolver] - * @returns {Resolver} - */ -function createResolver(extraResolver) { - return resolveAllText - - /** @type {Resolver} */ - function resolveAllText(events, context) { - let index = -1 - /** @type {number | undefined} */ - let enter - - // A rather boring computation (to merge adjacent `data` events) which - // improves mm performance by 29%. - while (++index <= events.length) { - if (enter === undefined) { - if (events[index] && events[index][1].type === 'data') { - enter = index - index++ - } - } else if (!events[index] || events[index][1].type !== 'data') { - // Don’t do anything if there is one data token. - if (index !== enter + 2) { - events[enter][1].end = events[index - 1][1].end - events.splice(enter + 2, index - enter - 2) - index = enter + 2 - } - enter = undefined - } - } - return extraResolver ? extraResolver(events, context) : events - } -} - -/** - * A rather ugly set of instructions which again looks at chunks in the input - * stream. - * The reason to do this here is that it is *much* faster to parse in reverse. - * And that we can’t hook into `null` to split the line suffix before an EOF. - * To do: figure out if we can make this into a clean utility, or even in core. - * As it will be useful for GFMs literal autolink extension (and maybe even - * tables?) - * - * @type {Resolver} - */ -function resolveAllLineSuffixes(events, context) { - let eventIndex = 0 // Skip first. - - while (++eventIndex <= events.length) { - if ( - (eventIndex === events.length || - events[eventIndex][1].type === 'lineEnding') && - events[eventIndex - 1][1].type === 'data' - ) { - const data = events[eventIndex - 1][1] - const chunks = context.sliceStream(data) - let index = chunks.length - let bufferIndex = -1 - let size = 0 - /** @type {boolean | undefined} */ - let tabs - while (index--) { - const chunk = chunks[index] - if (typeof chunk === 'string') { - bufferIndex = chunk.length - while (chunk.charCodeAt(bufferIndex - 1) === 32) { - size++ - bufferIndex-- - } - if (bufferIndex) break - bufferIndex = -1 - } - // Number - else if (chunk === -2) { - tabs = true - size++ - } else if (chunk === -1) { - // Empty - } else { - // Replacement character, exit. - index++ - break - } - } - if (size) { - const token = { - type: - eventIndex === events.length || tabs || size < 2 - ? 'lineSuffix' - : 'hardBreakTrailing', - start: { - line: data.end.line, - column: data.end.column - size, - offset: data.end.offset - size, - _index: data.start._index + index, - _bufferIndex: index - ? bufferIndex - : data.start._bufferIndex + bufferIndex - }, - end: Object.assign({}, data.end) - } - data.end = Object.assign({}, token.start) - if (data.start.offset === data.end.offset) { - Object.assign(data, token) - } else { - events.splice( - eventIndex, - 0, - ['enter', token, context], - ['exit', token, context] - ) - eventIndex += 2 - } - } - eventIndex++ - } - } - return events -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-resolve-all/index.js -/** - * @typedef {import('micromark-util-types').Event} Event - * @typedef {import('micromark-util-types').Resolver} Resolver - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - */ - -/** - * Call all `resolveAll`s. - * - * @param {Array<{resolveAll?: Resolver | undefined}>} constructs - * List of constructs, optionally with `resolveAll`s. - * @param {Array} events - * List of events. - * @param {TokenizeContext} context - * Context used by `tokenize`. - * @returns {Array} - * Changed events. - */ -function resolveAll(constructs, events, context) { - /** @type {Array} */ - const called = [] - let index = -1 - - while (++index < constructs.length) { - const resolve = constructs[index].resolveAll - - if (resolve && !called.includes(resolve)) { - events = resolve(events, context) - called.push(resolve) - } - } - - return events -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/create-tokenizer.js -/** - * @typedef {import('micromark-util-types').Chunk} Chunk - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').ConstructRecord} ConstructRecord - * @typedef {import('micromark-util-types').Effects} Effects - * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct - * @typedef {import('micromark-util-types').ParseContext} ParseContext - * @typedef {import('micromark-util-types').Point} Point - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').Token} Token - * @typedef {import('micromark-util-types').TokenType} TokenType - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - */ - -/** - * @callback Restore - * @returns {void} - * - * @typedef Info - * @property {Restore} restore - * @property {number} from - * - * @callback ReturnHandle - * Handle a successful run. - * @param {Construct} construct - * @param {Info} info - * @returns {void} - */ - - - - -/** - * Create a tokenizer. - * Tokenizers deal with one type of data (e.g., containers, flow, text). - * The parser is the object dealing with it all. - * `initialize` works like other constructs, except that only its `tokenize` - * function is used, in which case it doesn’t receive an `ok` or `nok`. - * `from` can be given to set the point before the first character, although - * when further lines are indented, they must be set with `defineSkip`. - * - * @param {ParseContext} parser - * @param {InitialConstruct} initialize - * @param {Omit | undefined} [from] - * @returns {TokenizeContext} - */ -function createTokenizer(parser, initialize, from) { - /** @type {Point} */ - let point = Object.assign( - from - ? Object.assign({}, from) - : { - line: 1, - column: 1, - offset: 0 - }, - { - _index: 0, - _bufferIndex: -1 - } - ) - /** @type {Record} */ - const columnStart = {} - /** @type {Array} */ - const resolveAllConstructs = [] - /** @type {Array} */ - let chunks = [] - /** @type {Array} */ - let stack = [] - /** @type {boolean | undefined} */ - let consumed = true - - /** - * Tools used for tokenizing. - * - * @type {Effects} - */ - const effects = { - consume, - enter, - exit, - attempt: constructFactory(onsuccessfulconstruct), - check: constructFactory(onsuccessfulcheck), - interrupt: constructFactory(onsuccessfulcheck, { - interrupt: true - }) - } - - /** - * State and tools for resolving and serializing. - * - * @type {TokenizeContext} - */ - const context = { - previous: null, - code: null, - containerState: {}, - events: [], - parser, - sliceStream, - sliceSerialize, - now, - defineSkip, - write - } - - /** - * The state function. - * - * @type {State | void} - */ - let state = initialize.tokenize.call(context, effects) - - /** - * Track which character we expect to be consumed, to catch bugs. - * - * @type {Code} - */ - let expectedCode - if (initialize.resolveAll) { - resolveAllConstructs.push(initialize) - } - return context - - /** @type {TokenizeContext['write']} */ - function write(slice) { - chunks = push(chunks, slice) - main() - - // Exit if we’re not done, resolve might change stuff. - if (chunks[chunks.length - 1] !== null) { - return [] - } - addResult(initialize, 0) - - // Otherwise, resolve, and exit. - context.events = resolveAll(resolveAllConstructs, context.events, context) - return context.events - } - - // - // Tools. - // - - /** @type {TokenizeContext['sliceSerialize']} */ - function sliceSerialize(token, expandTabs) { - return serializeChunks(sliceStream(token), expandTabs) - } - - /** @type {TokenizeContext['sliceStream']} */ - function sliceStream(token) { - return sliceChunks(chunks, token) - } - - /** @type {TokenizeContext['now']} */ - function now() { - // This is a hot path, so we clone manually instead of `Object.assign({}, point)` - const {line, column, offset, _index, _bufferIndex} = point - return { - line, - column, - offset, - _index, - _bufferIndex - } - } - - /** @type {TokenizeContext['defineSkip']} */ - function defineSkip(value) { - columnStart[value.line] = value.column - accountForPotentialSkip() - } - - // - // State management. - // - - /** - * Main loop (note that `_index` and `_bufferIndex` in `point` are modified by - * `consume`). - * Here is where we walk through the chunks, which either include strings of - * several characters, or numerical character codes. - * The reason to do this in a loop instead of a call is so the stack can - * drain. - * - * @returns {void} - */ - function main() { - /** @type {number} */ - let chunkIndex - while (point._index < chunks.length) { - const chunk = chunks[point._index] - - // If we’re in a buffer chunk, loop through it. - if (typeof chunk === 'string') { - chunkIndex = point._index - if (point._bufferIndex < 0) { - point._bufferIndex = 0 - } - while ( - point._index === chunkIndex && - point._bufferIndex < chunk.length - ) { - go(chunk.charCodeAt(point._bufferIndex)) - } - } else { - go(chunk) - } - } - } - - /** - * Deal with one code. - * - * @param {Code} code - * @returns {void} - */ - function go(code) { - consumed = undefined - expectedCode = code - state = state(code) - } - - /** @type {Effects['consume']} */ - function consume(code) { - if (markdownLineEnding(code)) { - point.line++ - point.column = 1 - point.offset += code === -3 ? 2 : 1 - accountForPotentialSkip() - } else if (code !== -1) { - point.column++ - point.offset++ - } - - // Not in a string chunk. - if (point._bufferIndex < 0) { - point._index++ - } else { - point._bufferIndex++ - - // At end of string chunk. - // @ts-expect-error Points w/ non-negative `_bufferIndex` reference - // strings. - if (point._bufferIndex === chunks[point._index].length) { - point._bufferIndex = -1 - point._index++ - } - } - - // Expose the previous character. - context.previous = code - - // Mark as consumed. - consumed = true - } - - /** @type {Effects['enter']} */ - function enter(type, fields) { - /** @type {Token} */ - // @ts-expect-error Patch instead of assign required fields to help GC. - const token = fields || {} - token.type = type - token.start = now() - context.events.push(['enter', token, context]) - stack.push(token) - return token - } - - /** @type {Effects['exit']} */ - function exit(type) { - const token = stack.pop() - token.end = now() - context.events.push(['exit', token, context]) - return token - } - - /** - * Use results. - * - * @type {ReturnHandle} - */ - function onsuccessfulconstruct(construct, info) { - addResult(construct, info.from) - } - - /** - * Discard results. - * - * @type {ReturnHandle} - */ - function onsuccessfulcheck(_, info) { - info.restore() - } - - /** - * Factory to attempt/check/interrupt. - * - * @param {ReturnHandle} onreturn - * @param {{interrupt?: boolean | undefined} | undefined} [fields] - */ - function constructFactory(onreturn, fields) { - return hook - - /** - * Handle either an object mapping codes to constructs, a list of - * constructs, or a single construct. - * - * @param {Array | Construct | ConstructRecord} constructs - * @param {State} returnState - * @param {State | undefined} [bogusState] - * @returns {State} - */ - function hook(constructs, returnState, bogusState) { - /** @type {Array} */ - let listOfConstructs - /** @type {number} */ - let constructIndex - /** @type {Construct} */ - let currentConstruct - /** @type {Info} */ - let info - return Array.isArray(constructs) /* c8 ignore next 1 */ - ? handleListOfConstructs(constructs) - : 'tokenize' in constructs - ? // @ts-expect-error Looks like a construct. - handleListOfConstructs([constructs]) - : handleMapOfConstructs(constructs) - - /** - * Handle a list of construct. - * - * @param {ConstructRecord} map - * @returns {State} - */ - function handleMapOfConstructs(map) { - return start - - /** @type {State} */ - function start(code) { - const def = code !== null && map[code] - const all = code !== null && map.null - const list = [ - // To do: add more extension tests. - /* c8 ignore next 2 */ - ...(Array.isArray(def) ? def : def ? [def] : []), - ...(Array.isArray(all) ? all : all ? [all] : []) - ] - return handleListOfConstructs(list)(code) - } - } - - /** - * Handle a list of construct. - * - * @param {Array} list - * @returns {State} - */ - function handleListOfConstructs(list) { - listOfConstructs = list - constructIndex = 0 - if (list.length === 0) { - return bogusState - } - return handleConstruct(list[constructIndex]) - } - - /** - * Handle a single construct. - * - * @param {Construct} construct - * @returns {State} - */ - function handleConstruct(construct) { - return start - - /** @type {State} */ - function start(code) { - // To do: not needed to store if there is no bogus state, probably? - // Currently doesn’t work because `inspect` in document does a check - // w/o a bogus, which doesn’t make sense. But it does seem to help perf - // by not storing. - info = store() - currentConstruct = construct - if (!construct.partial) { - context.currentConstruct = construct - } - - // Always populated by defaults. - - if ( - construct.name && - context.parser.constructs.disable.null.includes(construct.name) - ) { - return nok(code) - } - return construct.tokenize.call( - // If we do have fields, create an object w/ `context` as its - // prototype. - // This allows a “live binding”, which is needed for `interrupt`. - fields ? Object.assign(Object.create(context), fields) : context, - effects, - ok, - nok - )(code) - } - } - - /** @type {State} */ - function ok(code) { - consumed = true - onreturn(currentConstruct, info) - return returnState - } - - /** @type {State} */ - function nok(code) { - consumed = true - info.restore() - if (++constructIndex < listOfConstructs.length) { - return handleConstruct(listOfConstructs[constructIndex]) - } - return bogusState - } - } - } - - /** - * @param {Construct} construct - * @param {number} from - * @returns {void} - */ - function addResult(construct, from) { - if (construct.resolveAll && !resolveAllConstructs.includes(construct)) { - resolveAllConstructs.push(construct) - } - if (construct.resolve) { - splice( - context.events, - from, - context.events.length - from, - construct.resolve(context.events.slice(from), context) - ) - } - if (construct.resolveTo) { - context.events = construct.resolveTo(context.events, context) - } - } - - /** - * Store state. - * - * @returns {Info} - */ - function store() { - const startPoint = now() - const startPrevious = context.previous - const startCurrentConstruct = context.currentConstruct - const startEventsIndex = context.events.length - const startStack = Array.from(stack) - return { - restore, - from: startEventsIndex - } - - /** - * Restore state. - * - * @returns {void} - */ - function restore() { - point = startPoint - context.previous = startPrevious - context.currentConstruct = startCurrentConstruct - context.events.length = startEventsIndex - stack = startStack - accountForPotentialSkip() - } - } - - /** - * Move the current point a bit forward in the line when it’s on a column - * skip. - * - * @returns {void} - */ - function accountForPotentialSkip() { - if (point.line in columnStart && point.column < 2) { - point.column = columnStart[point.line] - point.offset += columnStart[point.line] - 1 - } - } -} - -/** - * Get the chunks from a slice of chunks in the range of a token. - * - * @param {Array} chunks - * @param {Pick} token - * @returns {Array} - */ -function sliceChunks(chunks, token) { - const startIndex = token.start._index - const startBufferIndex = token.start._bufferIndex - const endIndex = token.end._index - const endBufferIndex = token.end._bufferIndex - /** @type {Array} */ - let view - if (startIndex === endIndex) { - // @ts-expect-error `_bufferIndex` is used on string chunks. - view = [chunks[startIndex].slice(startBufferIndex, endBufferIndex)] - } else { - view = chunks.slice(startIndex, endIndex) - if (startBufferIndex > -1) { - const head = view[0] - if (typeof head === 'string') { - view[0] = head.slice(startBufferIndex) - } else { - view.shift() - } - } - if (endBufferIndex > 0) { - // @ts-expect-error `_bufferIndex` is used on string chunks. - view.push(chunks[endIndex].slice(0, endBufferIndex)) - } - } - return view -} - -/** - * Get the string value of a slice of chunks. - * - * @param {Array} chunks - * @param {boolean | undefined} [expandTabs=false] - * @returns {string} - */ -function serializeChunks(chunks, expandTabs) { - let index = -1 - /** @type {Array} */ - const result = [] - /** @type {boolean | undefined} */ - let atTab - while (++index < chunks.length) { - const chunk = chunks[index] - /** @type {string} */ - let value - if (typeof chunk === 'string') { - value = chunk - } else - switch (chunk) { - case -5: { - value = '\r' - break - } - case -4: { - value = '\n' - break - } - case -3: { - value = '\r' + '\n' - break - } - case -2: { - value = expandTabs ? ' ' : '\t' - break - } - case -1: { - if (!expandTabs && atTab) continue - value = ' ' - break - } - default: { - // Currently only replacement character. - value = String.fromCharCode(chunk) - } - } - atTab = chunk === -2 - result.push(value) - } - return result.join('') -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/thematic-break.js -/** - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const thematicBreak = { - name: 'thematicBreak', - tokenize: tokenizeThematicBreak -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeThematicBreak(effects, ok, nok) { - let size = 0 - /** @type {NonNullable} */ - let marker - return start - - /** - * Start of thematic break. - * - * ```markdown - * > | *** - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter('thematicBreak') - // To do: parse indent like `markdown-rs`. - return before(code) - } - - /** - * After optional whitespace, at marker. - * - * ```markdown - * > | *** - * ^ - * ``` - * - * @type {State} - */ - function before(code) { - marker = code - return atBreak(code) - } - - /** - * After something, before something else. - * - * ```markdown - * > | *** - * ^ - * ``` - * - * @type {State} - */ - function atBreak(code) { - if (code === marker) { - effects.enter('thematicBreakSequence') - return sequence(code) - } - if (size >= 3 && (code === null || markdownLineEnding(code))) { - effects.exit('thematicBreak') - return ok(code) - } - return nok(code) - } - - /** - * In sequence. - * - * ```markdown - * > | *** - * ^ - * ``` - * - * @type {State} - */ - function sequence(code) { - if (code === marker) { - effects.consume(code) - size++ - return sequence - } - effects.exit('thematicBreakSequence') - return markdownSpace(code) - ? factorySpace(effects, atBreak, 'whitespace')(code) - : atBreak(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/list.js -/** - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').ContainerState} ContainerState - * @typedef {import('micromark-util-types').Exiter} Exiter - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - - - - -/** @type {Construct} */ -const list = { - name: 'list', - tokenize: tokenizeListStart, - continuation: { - tokenize: tokenizeListContinuation - }, - exit: tokenizeListEnd -} - -/** @type {Construct} */ -const listItemPrefixWhitespaceConstruct = { - tokenize: tokenizeListItemPrefixWhitespace, - partial: true -} - -/** @type {Construct} */ -const indentConstruct = { - tokenize: tokenizeIndent, - partial: true -} - -// To do: `markdown-rs` parses list items on their own and later stitches them -// together. - -/** - * @type {Tokenizer} - * @this {TokenizeContext} - */ -function tokenizeListStart(effects, ok, nok) { - const self = this - const tail = self.events[self.events.length - 1] - let initialSize = - tail && tail[1].type === 'linePrefix' - ? tail[2].sliceSerialize(tail[1], true).length - : 0 - let size = 0 - return start - - /** @type {State} */ - function start(code) { - const kind = - self.containerState.type || - (code === 42 || code === 43 || code === 45 - ? 'listUnordered' - : 'listOrdered') - if ( - kind === 'listUnordered' - ? !self.containerState.marker || code === self.containerState.marker - : asciiDigit(code) - ) { - if (!self.containerState.type) { - self.containerState.type = kind - effects.enter(kind, { - _container: true - }) - } - if (kind === 'listUnordered') { - effects.enter('listItemPrefix') - return code === 42 || code === 45 - ? effects.check(thematicBreak, nok, atMarker)(code) - : atMarker(code) - } - if (!self.interrupt || code === 49) { - effects.enter('listItemPrefix') - effects.enter('listItemValue') - return inside(code) - } - } - return nok(code) - } - - /** @type {State} */ - function inside(code) { - if (asciiDigit(code) && ++size < 10) { - effects.consume(code) - return inside - } - if ( - (!self.interrupt || size < 2) && - (self.containerState.marker - ? code === self.containerState.marker - : code === 41 || code === 46) - ) { - effects.exit('listItemValue') - return atMarker(code) - } - return nok(code) - } - - /** - * @type {State} - **/ - function atMarker(code) { - effects.enter('listItemMarker') - effects.consume(code) - effects.exit('listItemMarker') - self.containerState.marker = self.containerState.marker || code - return effects.check( - blankLine, - // Can’t be empty when interrupting. - self.interrupt ? nok : onBlank, - effects.attempt( - listItemPrefixWhitespaceConstruct, - endOfPrefix, - otherPrefix - ) - ) - } - - /** @type {State} */ - function onBlank(code) { - self.containerState.initialBlankLine = true - initialSize++ - return endOfPrefix(code) - } - - /** @type {State} */ - function otherPrefix(code) { - if (markdownSpace(code)) { - effects.enter('listItemPrefixWhitespace') - effects.consume(code) - effects.exit('listItemPrefixWhitespace') - return endOfPrefix - } - return nok(code) - } - - /** @type {State} */ - function endOfPrefix(code) { - self.containerState.size = - initialSize + - self.sliceSerialize(effects.exit('listItemPrefix'), true).length - return ok(code) - } -} - -/** - * @type {Tokenizer} - * @this {TokenizeContext} - */ -function tokenizeListContinuation(effects, ok, nok) { - const self = this - self.containerState._closeFlow = undefined - return effects.check(blankLine, onBlank, notBlank) - - /** @type {State} */ - function onBlank(code) { - self.containerState.furtherBlankLines = - self.containerState.furtherBlankLines || - self.containerState.initialBlankLine - - // We have a blank line. - // Still, try to consume at most the items size. - return factorySpace( - effects, - ok, - 'listItemIndent', - self.containerState.size + 1 - )(code) - } - - /** @type {State} */ - function notBlank(code) { - if (self.containerState.furtherBlankLines || !markdownSpace(code)) { - self.containerState.furtherBlankLines = undefined - self.containerState.initialBlankLine = undefined - return notInCurrentItem(code) - } - self.containerState.furtherBlankLines = undefined - self.containerState.initialBlankLine = undefined - return effects.attempt(indentConstruct, ok, notInCurrentItem)(code) - } - - /** @type {State} */ - function notInCurrentItem(code) { - // While we do continue, we signal that the flow should be closed. - self.containerState._closeFlow = true - // As we’re closing flow, we’re no longer interrupting. - self.interrupt = undefined - // Always populated by defaults. - - return factorySpace( - effects, - effects.attempt(list, ok, nok), - 'linePrefix', - self.parser.constructs.disable.null.includes('codeIndented') - ? undefined - : 4 - )(code) - } -} - -/** - * @type {Tokenizer} - * @this {TokenizeContext} - */ -function tokenizeIndent(effects, ok, nok) { - const self = this - return factorySpace( - effects, - afterPrefix, - 'listItemIndent', - self.containerState.size + 1 - ) - - /** @type {State} */ - function afterPrefix(code) { - const tail = self.events[self.events.length - 1] - return tail && - tail[1].type === 'listItemIndent' && - tail[2].sliceSerialize(tail[1], true).length === self.containerState.size - ? ok(code) - : nok(code) - } -} - -/** - * @type {Exiter} - * @this {TokenizeContext} - */ -function tokenizeListEnd(effects) { - effects.exit(this.containerState.type) -} - -/** - * @type {Tokenizer} - * @this {TokenizeContext} - */ -function tokenizeListItemPrefixWhitespace(effects, ok, nok) { - const self = this - - // Always populated by defaults. - - return factorySpace( - effects, - afterPrefix, - 'listItemPrefixWhitespace', - self.parser.constructs.disable.null.includes('codeIndented') - ? undefined - : 4 + 1 - ) - - /** @type {State} */ - function afterPrefix(code) { - const tail = self.events[self.events.length - 1] - return !markdownSpace(code) && - tail && - tail[1].type === 'listItemPrefixWhitespace' - ? ok(code) - : nok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/block-quote.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').Exiter} Exiter - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const blockQuote = { - name: 'blockQuote', - tokenize: tokenizeBlockQuoteStart, - continuation: { - tokenize: tokenizeBlockQuoteContinuation - }, - exit -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeBlockQuoteStart(effects, ok, nok) { - const self = this - return start - - /** - * Start of block quote. - * - * ```markdown - * > | > a - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - if (code === 62) { - const state = self.containerState - if (!state.open) { - effects.enter('blockQuote', { - _container: true - }) - state.open = true - } - effects.enter('blockQuotePrefix') - effects.enter('blockQuoteMarker') - effects.consume(code) - effects.exit('blockQuoteMarker') - return after - } - return nok(code) - } - - /** - * After `>`, before optional whitespace. - * - * ```markdown - * > | > a - * ^ - * ``` - * - * @type {State} - */ - function after(code) { - if (markdownSpace(code)) { - effects.enter('blockQuotePrefixWhitespace') - effects.consume(code) - effects.exit('blockQuotePrefixWhitespace') - effects.exit('blockQuotePrefix') - return ok - } - effects.exit('blockQuotePrefix') - return ok(code) - } -} - -/** - * Start of block quote continuation. - * - * ```markdown - * | > a - * > | > b - * ^ - * ``` - * - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeBlockQuoteContinuation(effects, ok, nok) { - const self = this - return contStart - - /** - * Start of block quote continuation. - * - * Also used to parse the first block quote opening. - * - * ```markdown - * | > a - * > | > b - * ^ - * ``` - * - * @type {State} - */ - function contStart(code) { - if (markdownSpace(code)) { - // Always populated by defaults. - - return factorySpace( - effects, - contBefore, - 'linePrefix', - self.parser.constructs.disable.null.includes('codeIndented') - ? undefined - : 4 - )(code) - } - return contBefore(code) - } - - /** - * At `>`, after optional whitespace. - * - * Also used to parse the first block quote opening. - * - * ```markdown - * | > a - * > | > b - * ^ - * ``` - * - * @type {State} - */ - function contBefore(code) { - return effects.attempt(blockQuote, ok, nok)(code) - } -} - -/** @type {Exiter} */ -function exit(effects) { - effects.exit('blockQuote') -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-destination/index.js -/** - * @typedef {import('micromark-util-types').Effects} Effects - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenType} TokenType - */ - - -/** - * Parse destinations. - * - * ###### Examples - * - * ```markdown - * - * b> - * - * - * a - * a\)b - * a(b)c - * a(b) - * ``` - * - * @param {Effects} effects - * Context. - * @param {State} ok - * State switched to when successful. - * @param {State} nok - * State switched to when unsuccessful. - * @param {TokenType} type - * Type for whole (`` or `b`). - * @param {TokenType} literalType - * Type when enclosed (``). - * @param {TokenType} literalMarkerType - * Type for enclosing (`<` and `>`). - * @param {TokenType} rawType - * Type when not enclosed (`b`). - * @param {TokenType} stringType - * Type for the value (`a` or `b`). - * @param {number | undefined} [max=Infinity] - * Depth of nested parens (inclusive). - * @returns {State} - * Start state. - */ // eslint-disable-next-line max-params -function factoryDestination( - effects, - ok, - nok, - type, - literalType, - literalMarkerType, - rawType, - stringType, - max -) { - const limit = max || Number.POSITIVE_INFINITY - let balance = 0 - return start - - /** - * Start of destination. - * - * ```markdown - * > | - * ^ - * > | aa - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - if (code === 60) { - effects.enter(type) - effects.enter(literalType) - effects.enter(literalMarkerType) - effects.consume(code) - effects.exit(literalMarkerType) - return enclosedBefore - } - - // ASCII control, space, closing paren. - if (code === null || code === 32 || code === 41 || asciiControl(code)) { - return nok(code) - } - effects.enter(type) - effects.enter(rawType) - effects.enter(stringType) - effects.enter('chunkString', { - contentType: 'string' - }) - return raw(code) - } - - /** - * After `<`, at an enclosed destination. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function enclosedBefore(code) { - if (code === 62) { - effects.enter(literalMarkerType) - effects.consume(code) - effects.exit(literalMarkerType) - effects.exit(literalType) - effects.exit(type) - return ok - } - effects.enter(stringType) - effects.enter('chunkString', { - contentType: 'string' - }) - return enclosed(code) - } - - /** - * In enclosed destination. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function enclosed(code) { - if (code === 62) { - effects.exit('chunkString') - effects.exit(stringType) - return enclosedBefore(code) - } - if (code === null || code === 60 || markdownLineEnding(code)) { - return nok(code) - } - effects.consume(code) - return code === 92 ? enclosedEscape : enclosed - } - - /** - * After `\`, at a special character. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function enclosedEscape(code) { - if (code === 60 || code === 62 || code === 92) { - effects.consume(code) - return enclosed - } - return enclosed(code) - } - - /** - * In raw destination. - * - * ```markdown - * > | aa - * ^ - * ``` - * - * @type {State} - */ - function raw(code) { - if ( - !balance && - (code === null || code === 41 || markdownLineEndingOrSpace(code)) - ) { - effects.exit('chunkString') - effects.exit(stringType) - effects.exit(rawType) - effects.exit(type) - return ok(code) - } - if (balance < limit && code === 40) { - effects.consume(code) - balance++ - return raw - } - if (code === 41) { - effects.consume(code) - balance-- - return raw - } - - // ASCII control (but *not* `\0`) and space and `(`. - // Note: in `markdown-rs`, `\0` exists in codes, in `micromark-js` it - // doesn’t. - if (code === null || code === 32 || code === 40 || asciiControl(code)) { - return nok(code) - } - effects.consume(code) - return code === 92 ? rawEscape : raw - } - - /** - * After `\`, at special character. - * - * ```markdown - * > | a\*a - * ^ - * ``` - * - * @type {State} - */ - function rawEscape(code) { - if (code === 40 || code === 41 || code === 92) { - effects.consume(code) - return raw - } - return raw(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-label/index.js -/** - * @typedef {import('micromark-util-types').Effects} Effects - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').TokenType} TokenType - */ - - -/** - * Parse labels. - * - * > 👉 **Note**: labels in markdown are capped at 999 characters in the string. - * - * ###### Examples - * - * ```markdown - * [a] - * [a - * b] - * [a\]b] - * ``` - * - * @this {TokenizeContext} - * Tokenize context. - * @param {Effects} effects - * Context. - * @param {State} ok - * State switched to when successful. - * @param {State} nok - * State switched to when unsuccessful. - * @param {TokenType} type - * Type of the whole label (`[a]`). - * @param {TokenType} markerType - * Type for the markers (`[` and `]`). - * @param {TokenType} stringType - * Type for the identifier (`a`). - * @returns {State} - * Start state. - */ // eslint-disable-next-line max-params -function factoryLabel(effects, ok, nok, type, markerType, stringType) { - const self = this - let size = 0 - /** @type {boolean} */ - let seen - return start - - /** - * Start of label. - * - * ```markdown - * > | [a] - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter(type) - effects.enter(markerType) - effects.consume(code) - effects.exit(markerType) - effects.enter(stringType) - return atBreak - } - - /** - * In label, at something, before something else. - * - * ```markdown - * > | [a] - * ^ - * ``` - * - * @type {State} - */ - function atBreak(code) { - if ( - size > 999 || - code === null || - code === 91 || - (code === 93 && !seen) || - // To do: remove in the future once we’ve switched from - // `micromark-extension-footnote` to `micromark-extension-gfm-footnote`, - // which doesn’t need this. - // Hidden footnotes hook. - /* c8 ignore next 3 */ - (code === 94 && - !size && - '_hiddenFootnoteSupport' in self.parser.constructs) - ) { - return nok(code) - } - if (code === 93) { - effects.exit(stringType) - effects.enter(markerType) - effects.consume(code) - effects.exit(markerType) - effects.exit(type) - return ok - } - - // To do: indent? Link chunks and EOLs together? - if (markdownLineEnding(code)) { - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return atBreak - } - effects.enter('chunkString', { - contentType: 'string' - }) - return labelInside(code) - } - - /** - * In label, in text. - * - * ```markdown - * > | [a] - * ^ - * ``` - * - * @type {State} - */ - function labelInside(code) { - if ( - code === null || - code === 91 || - code === 93 || - markdownLineEnding(code) || - size++ > 999 - ) { - effects.exit('chunkString') - return atBreak(code) - } - effects.consume(code) - if (!seen) seen = !markdownSpace(code) - return code === 92 ? labelEscape : labelInside - } - - /** - * After `\`, at a special character. - * - * ```markdown - * > | [a\*a] - * ^ - * ``` - * - * @type {State} - */ - function labelEscape(code) { - if (code === 91 || code === 92 || code === 93) { - effects.consume(code) - size++ - return labelInside - } - return labelInside(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-title/index.js -/** - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Effects} Effects - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenType} TokenType - */ - - - -/** - * Parse titles. - * - * ###### Examples - * - * ```markdown - * "a" - * 'b' - * (c) - * "a - * b" - * 'a - * b' - * (a\)b) - * ``` - * - * @param {Effects} effects - * Context. - * @param {State} ok - * State switched to when successful. - * @param {State} nok - * State switched to when unsuccessful. - * @param {TokenType} type - * Type of the whole title (`"a"`, `'b'`, `(c)`). - * @param {TokenType} markerType - * Type for the markers (`"`, `'`, `(`, and `)`). - * @param {TokenType} stringType - * Type for the value (`a`). - * @returns {State} - * Start state. - */ // eslint-disable-next-line max-params -function factoryTitle(effects, ok, nok, type, markerType, stringType) { - /** @type {NonNullable} */ - let marker - return start - - /** - * Start of title. - * - * ```markdown - * > | "a" - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - if (code === 34 || code === 39 || code === 40) { - effects.enter(type) - effects.enter(markerType) - effects.consume(code) - effects.exit(markerType) - marker = code === 40 ? 41 : code - return begin - } - return nok(code) - } - - /** - * After opening marker. - * - * This is also used at the closing marker. - * - * ```markdown - * > | "a" - * ^ - * ``` - * - * @type {State} - */ - function begin(code) { - if (code === marker) { - effects.enter(markerType) - effects.consume(code) - effects.exit(markerType) - effects.exit(type) - return ok - } - effects.enter(stringType) - return atBreak(code) - } - - /** - * At something, before something else. - * - * ```markdown - * > | "a" - * ^ - * ``` - * - * @type {State} - */ - function atBreak(code) { - if (code === marker) { - effects.exit(stringType) - return begin(marker) - } - if (code === null) { - return nok(code) - } - - // Note: blank lines can’t exist in content. - if (markdownLineEnding(code)) { - // To do: use `space_or_tab_eol_with_options`, connect. - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return factorySpace(effects, atBreak, 'linePrefix') - } - effects.enter('chunkString', { - contentType: 'string' - }) - return inside(code) - } - - /** - * - * - * @type {State} - */ - function inside(code) { - if (code === marker || code === null || markdownLineEnding(code)) { - effects.exit('chunkString') - return atBreak(code) - } - effects.consume(code) - return code === 92 ? escape : inside - } - - /** - * After `\`, at a special character. - * - * ```markdown - * > | "a\*b" - * ^ - * ``` - * - * @type {State} - */ - function escape(code) { - if (code === marker || code === 92) { - effects.consume(code) - return inside - } - return inside(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-whitespace/index.js -/** - * @typedef {import('micromark-util-types').Effects} Effects - * @typedef {import('micromark-util-types').State} State - */ - - - -/** - * Parse spaces and tabs. - * - * There is no `nok` parameter: - * - * * line endings or spaces in markdown are often optional, in which case this - * factory can be used and `ok` will be switched to whether spaces were found - * or not - * * one line ending or space can be detected with - * `markdownLineEndingOrSpace(code)` right before using `factoryWhitespace` - * - * @param {Effects} effects - * Context. - * @param {State} ok - * State switched to when successful. - * @returns - * Start state. - */ -function factoryWhitespace(effects, ok) { - /** @type {boolean} */ - let seen - return start - - /** @type {State} */ - function start(code) { - if (markdownLineEnding(code)) { - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - seen = true - return start - } - if (markdownSpace(code)) { - return factorySpace( - effects, - start, - seen ? 'linePrefix' : 'lineSuffix' - )(code) - } - return ok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-normalize-identifier/index.js -/** - * Normalize an identifier (as found in references, definitions). - * - * Collapses markdown whitespace, trim, and then lower- and uppercase. - * - * Some characters are considered “uppercase”, such as U+03F4 (`ϴ`), but if their - * lowercase counterpart (U+03B8 (`θ`)) is uppercased will result in a different - * uppercase character (U+0398 (`Θ`)). - * So, to get a canonical form, we perform both lower- and uppercase. - * - * Using uppercase last makes sure keys will never interact with default - * prototypal values (such as `constructor`): nothing in the prototype of - * `Object` is uppercase. - * - * @param {string} value - * Identifier to normalize. - * @returns {string} - * Normalized identifier. - */ -function normalizeIdentifier(value) { - return ( - value - // Collapse markdown whitespace. - .replace(/[\t\n\r ]+/g, ' ') - // Trim. - .replace(/^ | $/g, '') - // Some characters are considered “uppercase”, but if their lowercase - // counterpart is uppercased will result in a different uppercase - // character. - // Hence, to get that form, we perform both lower- and uppercase. - // Upper case makes sure keys will not interact with default prototypal - // methods: no method is uppercase. - .toLowerCase() - .toUpperCase() - ) -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/definition.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - - - - - - -/** @type {Construct} */ -const definition = { - name: 'definition', - tokenize: tokenizeDefinition -} - -/** @type {Construct} */ -const titleBefore = { - tokenize: tokenizeTitleBefore, - partial: true -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeDefinition(effects, ok, nok) { - const self = this - /** @type {string} */ - let identifier - return start - - /** - * At start of a definition. - * - * ```markdown - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - // Do not interrupt paragraphs (but do follow definitions). - // To do: do `interrupt` the way `markdown-rs` does. - // To do: parse whitespace the way `markdown-rs` does. - effects.enter('definition') - return before(code) - } - - /** - * After optional whitespace, at `[`. - * - * ```markdown - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function before(code) { - // To do: parse whitespace the way `markdown-rs` does. - - return factoryLabel.call( - self, - effects, - labelAfter, - // Note: we don’t need to reset the way `markdown-rs` does. - nok, - 'definitionLabel', - 'definitionLabelMarker', - 'definitionLabelString' - )(code) - } - - /** - * After label. - * - * ```markdown - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function labelAfter(code) { - identifier = normalizeIdentifier( - self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1) - ) - if (code === 58) { - effects.enter('definitionMarker') - effects.consume(code) - effects.exit('definitionMarker') - return markerAfter - } - return nok(code) - } - - /** - * After marker. - * - * ```markdown - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function markerAfter(code) { - // Note: whitespace is optional. - return markdownLineEndingOrSpace(code) - ? factoryWhitespace(effects, destinationBefore)(code) - : destinationBefore(code) - } - - /** - * Before destination. - * - * ```markdown - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function destinationBefore(code) { - return factoryDestination( - effects, - destinationAfter, - // Note: we don’t need to reset the way `markdown-rs` does. - nok, - 'definitionDestination', - 'definitionDestinationLiteral', - 'definitionDestinationLiteralMarker', - 'definitionDestinationRaw', - 'definitionDestinationString' - )(code) - } - - /** - * After destination. - * - * ```markdown - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function destinationAfter(code) { - return effects.attempt(titleBefore, after, after)(code) - } - - /** - * After definition. - * - * ```markdown - * > | [a]: b - * ^ - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function after(code) { - return markdownSpace(code) - ? factorySpace(effects, afterWhitespace, 'whitespace')(code) - : afterWhitespace(code) - } - - /** - * After definition, after optional whitespace. - * - * ```markdown - * > | [a]: b - * ^ - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function afterWhitespace(code) { - if (code === null || markdownLineEnding(code)) { - effects.exit('definition') - - // Note: we don’t care about uniqueness. - // It’s likely that that doesn’t happen very frequently. - // It is more likely that it wastes precious time. - self.parser.defined.push(identifier) - - // To do: `markdown-rs` interrupt. - // // You’d be interrupting. - // tokenizer.interrupt = true - return ok(code) - } - return nok(code) - } -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeTitleBefore(effects, ok, nok) { - return titleBefore - - /** - * After destination, at whitespace. - * - * ```markdown - * > | [a]: b - * ^ - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function titleBefore(code) { - return markdownLineEndingOrSpace(code) - ? factoryWhitespace(effects, beforeMarker)(code) - : nok(code) - } - - /** - * At title. - * - * ```markdown - * | [a]: b - * > | "c" - * ^ - * ``` - * - * @type {State} - */ - function beforeMarker(code) { - return factoryTitle( - effects, - titleAfter, - nok, - 'definitionTitle', - 'definitionTitleMarker', - 'definitionTitleString' - )(code) - } - - /** - * After title. - * - * ```markdown - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function titleAfter(code) { - return markdownSpace(code) - ? factorySpace(effects, titleAfterOptionalWhitespace, 'whitespace')(code) - : titleAfterOptionalWhitespace(code) - } - - /** - * After title, after optional whitespace. - * - * ```markdown - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function titleAfterOptionalWhitespace(code) { - return code === null || markdownLineEnding(code) ? ok(code) : nok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/code-indented.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const codeIndented = { - name: 'codeIndented', - tokenize: tokenizeCodeIndented -} - -/** @type {Construct} */ -const furtherStart = { - tokenize: tokenizeFurtherStart, - partial: true -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeCodeIndented(effects, ok, nok) { - const self = this - return start - - /** - * Start of code (indented). - * - * > **Parsing note**: it is not needed to check if this first line is a - * > filled line (that it has a non-whitespace character), because blank lines - * > are parsed already, so we never run into that. - * - * ```markdown - * > | aaa - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - // To do: manually check if interrupting like `markdown-rs`. - - effects.enter('codeIndented') - // To do: use an improved `space_or_tab` function like `markdown-rs`, - // so that we can drop the next state. - return factorySpace(effects, afterPrefix, 'linePrefix', 4 + 1)(code) - } - - /** - * At start, after 1 or 4 spaces. - * - * ```markdown - * > | aaa - * ^ - * ``` - * - * @type {State} - */ - function afterPrefix(code) { - const tail = self.events[self.events.length - 1] - return tail && - tail[1].type === 'linePrefix' && - tail[2].sliceSerialize(tail[1], true).length >= 4 - ? atBreak(code) - : nok(code) - } - - /** - * At a break. - * - * ```markdown - * > | aaa - * ^ ^ - * ``` - * - * @type {State} - */ - function atBreak(code) { - if (code === null) { - return after(code) - } - if (markdownLineEnding(code)) { - return effects.attempt(furtherStart, atBreak, after)(code) - } - effects.enter('codeFlowValue') - return inside(code) - } - - /** - * In code content. - * - * ```markdown - * > | aaa - * ^^^^ - * ``` - * - * @type {State} - */ - function inside(code) { - if (code === null || markdownLineEnding(code)) { - effects.exit('codeFlowValue') - return atBreak(code) - } - effects.consume(code) - return inside - } - - /** @type {State} */ - function after(code) { - effects.exit('codeIndented') - // To do: allow interrupting like `markdown-rs`. - // Feel free to interrupt. - // tokenizer.interrupt = false - return ok(code) - } -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeFurtherStart(effects, ok, nok) { - const self = this - return furtherStart - - /** - * At eol, trying to parse another indent. - * - * ```markdown - * > | aaa - * ^ - * | bbb - * ``` - * - * @type {State} - */ - function furtherStart(code) { - // To do: improve `lazy` / `pierce` handling. - // If this is a lazy line, it can’t be code. - if (self.parser.lazy[self.now().line]) { - return nok(code) - } - if (markdownLineEnding(code)) { - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return furtherStart - } - - // To do: the code here in `micromark-js` is a bit different from - // `markdown-rs` because there it can attempt spaces. - // We can’t yet. - // - // To do: use an improved `space_or_tab` function like `markdown-rs`, - // so that we can drop the next state. - return factorySpace(effects, afterPrefix, 'linePrefix', 4 + 1)(code) - } - - /** - * At start, after 1 or 4 spaces. - * - * ```markdown - * > | aaa - * ^ - * ``` - * - * @type {State} - */ - function afterPrefix(code) { - const tail = self.events[self.events.length - 1] - return tail && - tail[1].type === 'linePrefix' && - tail[2].sliceSerialize(tail[1], true).length >= 4 - ? ok(code) - : markdownLineEnding(code) - ? furtherStart(code) - : nok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/heading-atx.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').Resolver} Resolver - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').Token} Token - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - - -/** @type {Construct} */ -const headingAtx = { - name: 'headingAtx', - tokenize: tokenizeHeadingAtx, - resolve: resolveHeadingAtx -} - -/** @type {Resolver} */ -function resolveHeadingAtx(events, context) { - let contentEnd = events.length - 2 - let contentStart = 3 - /** @type {Token} */ - let content - /** @type {Token} */ - let text - - // Prefix whitespace, part of the opening. - if (events[contentStart][1].type === 'whitespace') { - contentStart += 2 - } - - // Suffix whitespace, part of the closing. - if ( - contentEnd - 2 > contentStart && - events[contentEnd][1].type === 'whitespace' - ) { - contentEnd -= 2 - } - if ( - events[contentEnd][1].type === 'atxHeadingSequence' && - (contentStart === contentEnd - 1 || - (contentEnd - 4 > contentStart && - events[contentEnd - 2][1].type === 'whitespace')) - ) { - contentEnd -= contentStart + 1 === contentEnd ? 2 : 4 - } - if (contentEnd > contentStart) { - content = { - type: 'atxHeadingText', - start: events[contentStart][1].start, - end: events[contentEnd][1].end - } - text = { - type: 'chunkText', - start: events[contentStart][1].start, - end: events[contentEnd][1].end, - contentType: 'text' - } - splice(events, contentStart, contentEnd - contentStart + 1, [ - ['enter', content, context], - ['enter', text, context], - ['exit', text, context], - ['exit', content, context] - ]) - } - return events -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeHeadingAtx(effects, ok, nok) { - let size = 0 - return start - - /** - * Start of a heading (atx). - * - * ```markdown - * > | ## aa - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - // To do: parse indent like `markdown-rs`. - effects.enter('atxHeading') - return before(code) - } - - /** - * After optional whitespace, at `#`. - * - * ```markdown - * > | ## aa - * ^ - * ``` - * - * @type {State} - */ - function before(code) { - effects.enter('atxHeadingSequence') - return sequenceOpen(code) - } - - /** - * In opening sequence. - * - * ```markdown - * > | ## aa - * ^ - * ``` - * - * @type {State} - */ - function sequenceOpen(code) { - if (code === 35 && size++ < 6) { - effects.consume(code) - return sequenceOpen - } - - // Always at least one `#`. - if (code === null || markdownLineEndingOrSpace(code)) { - effects.exit('atxHeadingSequence') - return atBreak(code) - } - return nok(code) - } - - /** - * After something, before something else. - * - * ```markdown - * > | ## aa - * ^ - * ``` - * - * @type {State} - */ - function atBreak(code) { - if (code === 35) { - effects.enter('atxHeadingSequence') - return sequenceFurther(code) - } - if (code === null || markdownLineEnding(code)) { - effects.exit('atxHeading') - // To do: interrupt like `markdown-rs`. - // // Feel free to interrupt. - // tokenizer.interrupt = false - return ok(code) - } - if (markdownSpace(code)) { - return factorySpace(effects, atBreak, 'whitespace')(code) - } - - // To do: generate `data` tokens, add the `text` token later. - // Needs edit map, see: `markdown.rs`. - effects.enter('atxHeadingText') - return data(code) - } - - /** - * In further sequence (after whitespace). - * - * Could be normal “visible” hashes in the heading or a final sequence. - * - * ```markdown - * > | ## aa ## - * ^ - * ``` - * - * @type {State} - */ - function sequenceFurther(code) { - if (code === 35) { - effects.consume(code) - return sequenceFurther - } - effects.exit('atxHeadingSequence') - return atBreak(code) - } - - /** - * In text. - * - * ```markdown - * > | ## aa - * ^ - * ``` - * - * @type {State} - */ - function data(code) { - if (code === null || code === 35 || markdownLineEndingOrSpace(code)) { - effects.exit('atxHeadingText') - return atBreak(code) - } - effects.consume(code) - return data - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/setext-underline.js -/** - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').Resolver} Resolver - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const setextUnderline = { - name: 'setextUnderline', - tokenize: tokenizeSetextUnderline, - resolveTo: resolveToSetextUnderline -} - -/** @type {Resolver} */ -function resolveToSetextUnderline(events, context) { - // To do: resolve like `markdown-rs`. - let index = events.length - /** @type {number | undefined} */ - let content - /** @type {number | undefined} */ - let text - /** @type {number | undefined} */ - let definition - - // Find the opening of the content. - // It’ll always exist: we don’t tokenize if it isn’t there. - while (index--) { - if (events[index][0] === 'enter') { - if (events[index][1].type === 'content') { - content = index - break - } - if (events[index][1].type === 'paragraph') { - text = index - } - } - // Exit - else { - if (events[index][1].type === 'content') { - // Remove the content end (if needed we’ll add it later) - events.splice(index, 1) - } - if (!definition && events[index][1].type === 'definition') { - definition = index - } - } - } - const heading = { - type: 'setextHeading', - start: Object.assign({}, events[text][1].start), - end: Object.assign({}, events[events.length - 1][1].end) - } - - // Change the paragraph to setext heading text. - events[text][1].type = 'setextHeadingText' - - // If we have definitions in the content, we’ll keep on having content, - // but we need move it. - if (definition) { - events.splice(text, 0, ['enter', heading, context]) - events.splice(definition + 1, 0, ['exit', events[content][1], context]) - events[content][1].end = Object.assign({}, events[definition][1].end) - } else { - events[content][1] = heading - } - - // Add the heading exit at the end. - events.push(['exit', heading, context]) - return events -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeSetextUnderline(effects, ok, nok) { - const self = this - /** @type {NonNullable} */ - let marker - return start - - /** - * At start of heading (setext) underline. - * - * ```markdown - * | aa - * > | == - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - let index = self.events.length - /** @type {boolean | undefined} */ - let paragraph - // Find an opening. - while (index--) { - // Skip enter/exit of line ending, line prefix, and content. - // We can now either have a definition or a paragraph. - if ( - self.events[index][1].type !== 'lineEnding' && - self.events[index][1].type !== 'linePrefix' && - self.events[index][1].type !== 'content' - ) { - paragraph = self.events[index][1].type === 'paragraph' - break - } - } - - // To do: handle lazy/pierce like `markdown-rs`. - // To do: parse indent like `markdown-rs`. - if (!self.parser.lazy[self.now().line] && (self.interrupt || paragraph)) { - effects.enter('setextHeadingLine') - marker = code - return before(code) - } - return nok(code) - } - - /** - * After optional whitespace, at `-` or `=`. - * - * ```markdown - * | aa - * > | == - * ^ - * ``` - * - * @type {State} - */ - function before(code) { - effects.enter('setextHeadingLineSequence') - return inside(code) - } - - /** - * In sequence. - * - * ```markdown - * | aa - * > | == - * ^ - * ``` - * - * @type {State} - */ - function inside(code) { - if (code === marker) { - effects.consume(code) - return inside - } - effects.exit('setextHeadingLineSequence') - return markdownSpace(code) - ? factorySpace(effects, after, 'lineSuffix')(code) - : after(code) - } - - /** - * After sequence, after optional whitespace. - * - * ```markdown - * | aa - * > | == - * ^ - * ``` - * - * @type {State} - */ - function after(code) { - if (code === null || markdownLineEnding(code)) { - effects.exit('setextHeadingLine') - return ok(code) - } - return nok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-html-tag-name/index.js -/** - * List of lowercase HTML “block” tag names. - * - * The list, when parsing HTML (flow), results in more relaxed rules (condition - * 6). - * Because they are known blocks, the HTML-like syntax doesn’t have to be - * strictly parsed. - * For tag names not in this list, a more strict algorithm (condition 7) is used - * to detect whether the HTML-like syntax is seen as HTML (flow) or not. - * - * This is copied from: - * . - * - * > 👉 **Note**: `search` was added in `CommonMark@0.31`. - */ -const htmlBlockNames = [ - 'address', - 'article', - 'aside', - 'base', - 'basefont', - 'blockquote', - 'body', - 'caption', - 'center', - 'col', - 'colgroup', - 'dd', - 'details', - 'dialog', - 'dir', - 'div', - 'dl', - 'dt', - 'fieldset', - 'figcaption', - 'figure', - 'footer', - 'form', - 'frame', - 'frameset', - 'h1', - 'h2', - 'h3', - 'h4', - 'h5', - 'h6', - 'head', - 'header', - 'hr', - 'html', - 'iframe', - 'legend', - 'li', - 'link', - 'main', - 'menu', - 'menuitem', - 'nav', - 'noframes', - 'ol', - 'optgroup', - 'option', - 'p', - 'param', - 'search', - 'section', - 'summary', - 'table', - 'tbody', - 'td', - 'tfoot', - 'th', - 'thead', - 'title', - 'tr', - 'track', - 'ul' -] - -/** - * List of lowercase HTML “raw” tag names. - * - * The list, when parsing HTML (flow), results in HTML that can include lines - * without exiting, until a closing tag also in this list is found (condition - * 1). - * - * This module is copied from: - * . - * - * > 👉 **Note**: `textarea` was added in `CommonMark@0.30`. - */ -const htmlRawNames = ['pre', 'script', 'style', 'textarea'] - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/html-flow.js -/** - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').Resolver} Resolver - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - - - -/** @type {Construct} */ -const htmlFlow = { - name: 'htmlFlow', - tokenize: tokenizeHtmlFlow, - resolveTo: resolveToHtmlFlow, - concrete: true -} - -/** @type {Construct} */ -const blankLineBefore = { - tokenize: tokenizeBlankLineBefore, - partial: true -} -const nonLazyContinuationStart = { - tokenize: tokenizeNonLazyContinuationStart, - partial: true -} - -/** @type {Resolver} */ -function resolveToHtmlFlow(events) { - let index = events.length - while (index--) { - if (events[index][0] === 'enter' && events[index][1].type === 'htmlFlow') { - break - } - } - if (index > 1 && events[index - 2][1].type === 'linePrefix') { - // Add the prefix start to the HTML token. - events[index][1].start = events[index - 2][1].start - // Add the prefix start to the HTML line token. - events[index + 1][1].start = events[index - 2][1].start - // Remove the line prefix. - events.splice(index - 2, 2) - } - return events -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeHtmlFlow(effects, ok, nok) { - const self = this - /** @type {number} */ - let marker - /** @type {boolean} */ - let closingTag - /** @type {string} */ - let buffer - /** @type {number} */ - let index - /** @type {Code} */ - let markerB - return start - - /** - * Start of HTML (flow). - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - // To do: parse indent like `markdown-rs`. - return before(code) - } - - /** - * At `<`, after optional whitespace. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function before(code) { - effects.enter('htmlFlow') - effects.enter('htmlFlowData') - effects.consume(code) - return open - } - - /** - * After `<`, at tag name or other stuff. - * - * ```markdown - * > | - * ^ - * > | - * ^ - * > | - * ^ - * ``` - * - * @type {State} - */ - function open(code) { - if (code === 33) { - effects.consume(code) - return declarationOpen - } - if (code === 47) { - effects.consume(code) - closingTag = true - return tagCloseStart - } - if (code === 63) { - effects.consume(code) - marker = 3 - // To do: - // tokenizer.concrete = true - // To do: use `markdown-rs` style interrupt. - // While we’re in an instruction instead of a declaration, we’re on a `?` - // right now, so we do need to search for `>`, similar to declarations. - return self.interrupt ? ok : continuationDeclarationInside - } - - // ASCII alphabetical. - if (asciiAlpha(code)) { - effects.consume(code) - // @ts-expect-error: not null. - buffer = String.fromCharCode(code) - return tagName - } - return nok(code) - } - - /** - * After ` | - * ^ - * > | - * ^ - * > | &<]]> - * ^ - * ``` - * - * @type {State} - */ - function declarationOpen(code) { - if (code === 45) { - effects.consume(code) - marker = 2 - return commentOpenInside - } - if (code === 91) { - effects.consume(code) - marker = 5 - index = 0 - return cdataOpenInside - } - - // ASCII alphabetical. - if (asciiAlpha(code)) { - effects.consume(code) - marker = 4 - // // Do not form containers. - // tokenizer.concrete = true - return self.interrupt ? ok : continuationDeclarationInside - } - return nok(code) - } - - /** - * After ` | - * ^ - * ``` - * - * @type {State} - */ - function commentOpenInside(code) { - if (code === 45) { - effects.consume(code) - // // Do not form containers. - // tokenizer.concrete = true - return self.interrupt ? ok : continuationDeclarationInside - } - return nok(code) - } - - /** - * After ` | &<]]> - * ^^^^^^ - * ``` - * - * @type {State} - */ - function cdataOpenInside(code) { - const value = 'CDATA[' - if (code === value.charCodeAt(index++)) { - effects.consume(code) - if (index === value.length) { - // // Do not form containers. - // tokenizer.concrete = true - return self.interrupt ? ok : continuation - } - return cdataOpenInside - } - return nok(code) - } - - /** - * After ` | - * ^ - * ``` - * - * @type {State} - */ - function tagCloseStart(code) { - if (asciiAlpha(code)) { - effects.consume(code) - // @ts-expect-error: not null. - buffer = String.fromCharCode(code) - return tagName - } - return nok(code) - } - - /** - * In tag name. - * - * ```markdown - * > | - * ^^ - * > | - * ^^ - * ``` - * - * @type {State} - */ - function tagName(code) { - if ( - code === null || - code === 47 || - code === 62 || - markdownLineEndingOrSpace(code) - ) { - const slash = code === 47 - const name = buffer.toLowerCase() - if (!slash && !closingTag && htmlRawNames.includes(name)) { - marker = 1 - // // Do not form containers. - // tokenizer.concrete = true - return self.interrupt ? ok(code) : continuation(code) - } - if (htmlBlockNames.includes(buffer.toLowerCase())) { - marker = 6 - if (slash) { - effects.consume(code) - return basicSelfClosing - } - - // // Do not form containers. - // tokenizer.concrete = true - return self.interrupt ? ok(code) : continuation(code) - } - marker = 7 - // Do not support complete HTML when interrupting. - return self.interrupt && !self.parser.lazy[self.now().line] - ? nok(code) - : closingTag - ? completeClosingTagAfter(code) - : completeAttributeNameBefore(code) - } - - // ASCII alphanumerical and `-`. - if (code === 45 || asciiAlphanumeric(code)) { - effects.consume(code) - buffer += String.fromCharCode(code) - return tagName - } - return nok(code) - } - - /** - * After closing slash of a basic tag name. - * - * ```markdown - * > |
    - * ^ - * ``` - * - * @type {State} - */ - function basicSelfClosing(code) { - if (code === 62) { - effects.consume(code) - // // Do not form containers. - // tokenizer.concrete = true - return self.interrupt ? ok : continuation - } - return nok(code) - } - - /** - * After closing slash of a complete tag name. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function completeClosingTagAfter(code) { - if (markdownSpace(code)) { - effects.consume(code) - return completeClosingTagAfter - } - return completeEnd(code) - } - - /** - * At an attribute name. - * - * At first, this state is used after a complete tag name, after whitespace, - * where it expects optional attributes or the end of the tag. - * It is also reused after attributes, when expecting more optional - * attributes. - * - * ```markdown - * > | - * ^ - * > | - * ^ - * > | - * ^ - * > | - * ^ - * > | - * ^ - * ``` - * - * @type {State} - */ - function completeAttributeNameBefore(code) { - if (code === 47) { - effects.consume(code) - return completeEnd - } - - // ASCII alphanumerical and `:` and `_`. - if (code === 58 || code === 95 || asciiAlpha(code)) { - effects.consume(code) - return completeAttributeName - } - if (markdownSpace(code)) { - effects.consume(code) - return completeAttributeNameBefore - } - return completeEnd(code) - } - - /** - * In attribute name. - * - * ```markdown - * > | - * ^ - * > | - * ^ - * > | - * ^ - * ``` - * - * @type {State} - */ - function completeAttributeName(code) { - // ASCII alphanumerical and `-`, `.`, `:`, and `_`. - if ( - code === 45 || - code === 46 || - code === 58 || - code === 95 || - asciiAlphanumeric(code) - ) { - effects.consume(code) - return completeAttributeName - } - return completeAttributeNameAfter(code) - } - - /** - * After attribute name, at an optional initializer, the end of the tag, or - * whitespace. - * - * ```markdown - * > | - * ^ - * > | - * ^ - * ``` - * - * @type {State} - */ - function completeAttributeNameAfter(code) { - if (code === 61) { - effects.consume(code) - return completeAttributeValueBefore - } - if (markdownSpace(code)) { - effects.consume(code) - return completeAttributeNameAfter - } - return completeAttributeNameBefore(code) - } - - /** - * Before unquoted, double quoted, or single quoted attribute value, allowing - * whitespace. - * - * ```markdown - * > | - * ^ - * > | - * ^ - * ``` - * - * @type {State} - */ - function completeAttributeValueBefore(code) { - if ( - code === null || - code === 60 || - code === 61 || - code === 62 || - code === 96 - ) { - return nok(code) - } - if (code === 34 || code === 39) { - effects.consume(code) - markerB = code - return completeAttributeValueQuoted - } - if (markdownSpace(code)) { - effects.consume(code) - return completeAttributeValueBefore - } - return completeAttributeValueUnquoted(code) - } - - /** - * In double or single quoted attribute value. - * - * ```markdown - * > | - * ^ - * > | - * ^ - * ``` - * - * @type {State} - */ - function completeAttributeValueQuoted(code) { - if (code === markerB) { - effects.consume(code) - markerB = null - return completeAttributeValueQuotedAfter - } - if (code === null || markdownLineEnding(code)) { - return nok(code) - } - effects.consume(code) - return completeAttributeValueQuoted - } - - /** - * In unquoted attribute value. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function completeAttributeValueUnquoted(code) { - if ( - code === null || - code === 34 || - code === 39 || - code === 47 || - code === 60 || - code === 61 || - code === 62 || - code === 96 || - markdownLineEndingOrSpace(code) - ) { - return completeAttributeNameAfter(code) - } - effects.consume(code) - return completeAttributeValueUnquoted - } - - /** - * After double or single quoted attribute value, before whitespace or the - * end of the tag. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function completeAttributeValueQuotedAfter(code) { - if (code === 47 || code === 62 || markdownSpace(code)) { - return completeAttributeNameBefore(code) - } - return nok(code) - } - - /** - * In certain circumstances of a complete tag where only an `>` is allowed. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function completeEnd(code) { - if (code === 62) { - effects.consume(code) - return completeAfter - } - return nok(code) - } - - /** - * After `>` in a complete tag. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function completeAfter(code) { - if (code === null || markdownLineEnding(code)) { - // // Do not form containers. - // tokenizer.concrete = true - return continuation(code) - } - if (markdownSpace(code)) { - effects.consume(code) - return completeAfter - } - return nok(code) - } - - /** - * In continuation of any HTML kind. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function continuation(code) { - if (code === 45 && marker === 2) { - effects.consume(code) - return continuationCommentInside - } - if (code === 60 && marker === 1) { - effects.consume(code) - return continuationRawTagOpen - } - if (code === 62 && marker === 4) { - effects.consume(code) - return continuationClose - } - if (code === 63 && marker === 3) { - effects.consume(code) - return continuationDeclarationInside - } - if (code === 93 && marker === 5) { - effects.consume(code) - return continuationCdataInside - } - if (markdownLineEnding(code) && (marker === 6 || marker === 7)) { - effects.exit('htmlFlowData') - return effects.check( - blankLineBefore, - continuationAfter, - continuationStart - )(code) - } - if (code === null || markdownLineEnding(code)) { - effects.exit('htmlFlowData') - return continuationStart(code) - } - effects.consume(code) - return continuation - } - - /** - * In continuation, at eol. - * - * ```markdown - * > | - * ^ - * | asd - * ``` - * - * @type {State} - */ - function continuationStart(code) { - return effects.check( - nonLazyContinuationStart, - continuationStartNonLazy, - continuationAfter - )(code) - } - - /** - * In continuation, at eol, before non-lazy content. - * - * ```markdown - * > | - * ^ - * | asd - * ``` - * - * @type {State} - */ - function continuationStartNonLazy(code) { - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return continuationBefore - } - - /** - * In continuation, before non-lazy content. - * - * ```markdown - * | - * > | asd - * ^ - * ``` - * - * @type {State} - */ - function continuationBefore(code) { - if (code === null || markdownLineEnding(code)) { - return continuationStart(code) - } - effects.enter('htmlFlowData') - return continuation(code) - } - - /** - * In comment continuation, after one `-`, expecting another. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function continuationCommentInside(code) { - if (code === 45) { - effects.consume(code) - return continuationDeclarationInside - } - return continuation(code) - } - - /** - * In raw continuation, after `<`, at `/`. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function continuationRawTagOpen(code) { - if (code === 47) { - effects.consume(code) - buffer = '' - return continuationRawEndTag - } - return continuation(code) - } - - /** - * In raw continuation, after ` | - * ^^^^^^ - * ``` - * - * @type {State} - */ - function continuationRawEndTag(code) { - if (code === 62) { - const name = buffer.toLowerCase() - if (htmlRawNames.includes(name)) { - effects.consume(code) - return continuationClose - } - return continuation(code) - } - if (asciiAlpha(code) && buffer.length < 8) { - effects.consume(code) - // @ts-expect-error: not null. - buffer += String.fromCharCode(code) - return continuationRawEndTag - } - return continuation(code) - } - - /** - * In cdata continuation, after `]`, expecting `]>`. - * - * ```markdown - * > | &<]]> - * ^ - * ``` - * - * @type {State} - */ - function continuationCdataInside(code) { - if (code === 93) { - effects.consume(code) - return continuationDeclarationInside - } - return continuation(code) - } - - /** - * In declaration or instruction continuation, at `>`. - * - * ```markdown - * > | - * ^ - * > | - * ^ - * > | - * ^ - * > | - * ^ - * > | &<]]> - * ^ - * ``` - * - * @type {State} - */ - function continuationDeclarationInside(code) { - if (code === 62) { - effects.consume(code) - return continuationClose - } - - // More dashes. - if (code === 45 && marker === 2) { - effects.consume(code) - return continuationDeclarationInside - } - return continuation(code) - } - - /** - * In closed continuation: everything we get until the eol/eof is part of it. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function continuationClose(code) { - if (code === null || markdownLineEnding(code)) { - effects.exit('htmlFlowData') - return continuationAfter(code) - } - effects.consume(code) - return continuationClose - } - - /** - * Done. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function continuationAfter(code) { - effects.exit('htmlFlow') - // // Feel free to interrupt. - // tokenizer.interrupt = false - // // No longer concrete. - // tokenizer.concrete = false - return ok(code) - } -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeNonLazyContinuationStart(effects, ok, nok) { - const self = this - return start - - /** - * At eol, before continuation. - * - * ```markdown - * > | * ```js - * ^ - * | b - * ``` - * - * @type {State} - */ - function start(code) { - if (markdownLineEnding(code)) { - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return after - } - return nok(code) - } - - /** - * A continuation. - * - * ```markdown - * | * ```js - * > | b - * ^ - * ``` - * - * @type {State} - */ - function after(code) { - return self.parser.lazy[self.now().line] ? nok(code) : ok(code) - } -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeBlankLineBefore(effects, ok, nok) { - return start - - /** - * Before eol, expecting blank line. - * - * ```markdown - * > |
    - * ^ - * | - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return effects.attempt(blankLine, ok, nok) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/code-fenced.js -/** - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const nonLazyContinuation = { - tokenize: tokenizeNonLazyContinuation, - partial: true -} - -/** @type {Construct} */ -const codeFenced = { - name: 'codeFenced', - tokenize: tokenizeCodeFenced, - concrete: true -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeCodeFenced(effects, ok, nok) { - const self = this - /** @type {Construct} */ - const closeStart = { - tokenize: tokenizeCloseStart, - partial: true - } - let initialPrefix = 0 - let sizeOpen = 0 - /** @type {NonNullable} */ - let marker - return start - - /** - * Start of code. - * - * ```markdown - * > | ~~~js - * ^ - * | alert(1) - * | ~~~ - * ``` - * - * @type {State} - */ - function start(code) { - // To do: parse whitespace like `markdown-rs`. - return beforeSequenceOpen(code) - } - - /** - * In opening fence, after prefix, at sequence. - * - * ```markdown - * > | ~~~js - * ^ - * | alert(1) - * | ~~~ - * ``` - * - * @type {State} - */ - function beforeSequenceOpen(code) { - const tail = self.events[self.events.length - 1] - initialPrefix = - tail && tail[1].type === 'linePrefix' - ? tail[2].sliceSerialize(tail[1], true).length - : 0 - marker = code - effects.enter('codeFenced') - effects.enter('codeFencedFence') - effects.enter('codeFencedFenceSequence') - return sequenceOpen(code) - } - - /** - * In opening fence sequence. - * - * ```markdown - * > | ~~~js - * ^ - * | alert(1) - * | ~~~ - * ``` - * - * @type {State} - */ - function sequenceOpen(code) { - if (code === marker) { - sizeOpen++ - effects.consume(code) - return sequenceOpen - } - if (sizeOpen < 3) { - return nok(code) - } - effects.exit('codeFencedFenceSequence') - return markdownSpace(code) - ? factorySpace(effects, infoBefore, 'whitespace')(code) - : infoBefore(code) - } - - /** - * In opening fence, after the sequence (and optional whitespace), before info. - * - * ```markdown - * > | ~~~js - * ^ - * | alert(1) - * | ~~~ - * ``` - * - * @type {State} - */ - function infoBefore(code) { - if (code === null || markdownLineEnding(code)) { - effects.exit('codeFencedFence') - return self.interrupt - ? ok(code) - : effects.check(nonLazyContinuation, atNonLazyBreak, after)(code) - } - effects.enter('codeFencedFenceInfo') - effects.enter('chunkString', { - contentType: 'string' - }) - return info(code) - } - - /** - * In info. - * - * ```markdown - * > | ~~~js - * ^ - * | alert(1) - * | ~~~ - * ``` - * - * @type {State} - */ - function info(code) { - if (code === null || markdownLineEnding(code)) { - effects.exit('chunkString') - effects.exit('codeFencedFenceInfo') - return infoBefore(code) - } - if (markdownSpace(code)) { - effects.exit('chunkString') - effects.exit('codeFencedFenceInfo') - return factorySpace(effects, metaBefore, 'whitespace')(code) - } - if (code === 96 && code === marker) { - return nok(code) - } - effects.consume(code) - return info - } - - /** - * In opening fence, after info and whitespace, before meta. - * - * ```markdown - * > | ~~~js eval - * ^ - * | alert(1) - * | ~~~ - * ``` - * - * @type {State} - */ - function metaBefore(code) { - if (code === null || markdownLineEnding(code)) { - return infoBefore(code) - } - effects.enter('codeFencedFenceMeta') - effects.enter('chunkString', { - contentType: 'string' - }) - return meta(code) - } - - /** - * In meta. - * - * ```markdown - * > | ~~~js eval - * ^ - * | alert(1) - * | ~~~ - * ``` - * - * @type {State} - */ - function meta(code) { - if (code === null || markdownLineEnding(code)) { - effects.exit('chunkString') - effects.exit('codeFencedFenceMeta') - return infoBefore(code) - } - if (code === 96 && code === marker) { - return nok(code) - } - effects.consume(code) - return meta - } - - /** - * At eol/eof in code, before a non-lazy closing fence or content. - * - * ```markdown - * > | ~~~js - * ^ - * > | alert(1) - * ^ - * | ~~~ - * ``` - * - * @type {State} - */ - function atNonLazyBreak(code) { - return effects.attempt(closeStart, after, contentBefore)(code) - } - - /** - * Before code content, not a closing fence, at eol. - * - * ```markdown - * | ~~~js - * > | alert(1) - * ^ - * | ~~~ - * ``` - * - * @type {State} - */ - function contentBefore(code) { - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return contentStart - } - - /** - * Before code content, not a closing fence. - * - * ```markdown - * | ~~~js - * > | alert(1) - * ^ - * | ~~~ - * ``` - * - * @type {State} - */ - function contentStart(code) { - return initialPrefix > 0 && markdownSpace(code) - ? factorySpace( - effects, - beforeContentChunk, - 'linePrefix', - initialPrefix + 1 - )(code) - : beforeContentChunk(code) - } - - /** - * Before code content, after optional prefix. - * - * ```markdown - * | ~~~js - * > | alert(1) - * ^ - * | ~~~ - * ``` - * - * @type {State} - */ - function beforeContentChunk(code) { - if (code === null || markdownLineEnding(code)) { - return effects.check(nonLazyContinuation, atNonLazyBreak, after)(code) - } - effects.enter('codeFlowValue') - return contentChunk(code) - } - - /** - * In code content. - * - * ```markdown - * | ~~~js - * > | alert(1) - * ^^^^^^^^ - * | ~~~ - * ``` - * - * @type {State} - */ - function contentChunk(code) { - if (code === null || markdownLineEnding(code)) { - effects.exit('codeFlowValue') - return beforeContentChunk(code) - } - effects.consume(code) - return contentChunk - } - - /** - * After code. - * - * ```markdown - * | ~~~js - * | alert(1) - * > | ~~~ - * ^ - * ``` - * - * @type {State} - */ - function after(code) { - effects.exit('codeFenced') - return ok(code) - } - - /** - * @this {TokenizeContext} - * @type {Tokenizer} - */ - function tokenizeCloseStart(effects, ok, nok) { - let size = 0 - return startBefore - - /** - * - * - * @type {State} - */ - function startBefore(code) { - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return start - } - - /** - * Before closing fence, at optional whitespace. - * - * ```markdown - * | ~~~js - * | alert(1) - * > | ~~~ - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - // Always populated by defaults. - - // To do: `enter` here or in next state? - effects.enter('codeFencedFence') - return markdownSpace(code) - ? factorySpace( - effects, - beforeSequenceClose, - 'linePrefix', - self.parser.constructs.disable.null.includes('codeIndented') - ? undefined - : 4 - )(code) - : beforeSequenceClose(code) - } - - /** - * In closing fence, after optional whitespace, at sequence. - * - * ```markdown - * | ~~~js - * | alert(1) - * > | ~~~ - * ^ - * ``` - * - * @type {State} - */ - function beforeSequenceClose(code) { - if (code === marker) { - effects.enter('codeFencedFenceSequence') - return sequenceClose(code) - } - return nok(code) - } - - /** - * In closing fence sequence. - * - * ```markdown - * | ~~~js - * | alert(1) - * > | ~~~ - * ^ - * ``` - * - * @type {State} - */ - function sequenceClose(code) { - if (code === marker) { - size++ - effects.consume(code) - return sequenceClose - } - if (size >= sizeOpen) { - effects.exit('codeFencedFenceSequence') - return markdownSpace(code) - ? factorySpace(effects, sequenceCloseAfter, 'whitespace')(code) - : sequenceCloseAfter(code) - } - return nok(code) - } - - /** - * After closing fence sequence, after optional whitespace. - * - * ```markdown - * | ~~~js - * | alert(1) - * > | ~~~ - * ^ - * ``` - * - * @type {State} - */ - function sequenceCloseAfter(code) { - if (code === null || markdownLineEnding(code)) { - effects.exit('codeFencedFence') - return ok(code) - } - return nok(code) - } - } -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeNonLazyContinuation(effects, ok, nok) { - const self = this - return start - - /** - * - * - * @type {State} - */ - function start(code) { - if (code === null) { - return nok(code) - } - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return lineStart - } - - /** - * - * - * @type {State} - */ - function lineStart(code) { - return self.parser.lazy[self.now().line] ? nok(code) : ok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/character-entities/index.js -/** - * Map of named character references. - * - * @type {Record} - */ -const characterEntities = { - AElig: 'Æ', - AMP: '&', - Aacute: 'Á', - Abreve: 'Ă', - Acirc: 'Â', - Acy: 'А', - Afr: '𝔄', - Agrave: 'À', - Alpha: 'Α', - Amacr: 'Ā', - And: '⩓', - Aogon: 'Ą', - Aopf: '𝔸', - ApplyFunction: '⁡', - Aring: 'Å', - Ascr: '𝒜', - Assign: '≔', - Atilde: 'Ã', - Auml: 'Ä', - Backslash: '∖', - Barv: '⫧', - Barwed: '⌆', - Bcy: 'Б', - Because: '∵', - Bernoullis: 'ℬ', - Beta: 'Β', - Bfr: '𝔅', - Bopf: '𝔹', - Breve: '˘', - Bscr: 'ℬ', - Bumpeq: '≎', - CHcy: 'Ч', - COPY: '©', - Cacute: 'Ć', - Cap: '⋒', - CapitalDifferentialD: 'ⅅ', - Cayleys: 'ℭ', - Ccaron: 'Č', - Ccedil: 'Ç', - Ccirc: 'Ĉ', - Cconint: '∰', - Cdot: 'Ċ', - Cedilla: '¸', - CenterDot: '·', - Cfr: 'ℭ', - Chi: 'Χ', - CircleDot: '⊙', - CircleMinus: '⊖', - CirclePlus: '⊕', - CircleTimes: '⊗', - ClockwiseContourIntegral: '∲', - CloseCurlyDoubleQuote: '”', - CloseCurlyQuote: '’', - Colon: '∷', - Colone: '⩴', - Congruent: '≡', - Conint: '∯', - ContourIntegral: '∮', - Copf: 'ℂ', - Coproduct: '∐', - CounterClockwiseContourIntegral: '∳', - Cross: '⨯', - Cscr: '𝒞', - Cup: '⋓', - CupCap: '≍', - DD: 'ⅅ', - DDotrahd: '⤑', - DJcy: 'Ђ', - DScy: 'Ѕ', - DZcy: 'Џ', - Dagger: '‡', - Darr: '↡', - Dashv: '⫤', - Dcaron: 'Ď', - Dcy: 'Д', - Del: '∇', - Delta: 'Δ', - Dfr: '𝔇', - DiacriticalAcute: '´', - DiacriticalDot: '˙', - DiacriticalDoubleAcute: '˝', - DiacriticalGrave: '`', - DiacriticalTilde: '˜', - Diamond: '⋄', - DifferentialD: 'ⅆ', - Dopf: '𝔻', - Dot: '¨', - DotDot: '⃜', - DotEqual: '≐', - DoubleContourIntegral: '∯', - DoubleDot: '¨', - DoubleDownArrow: '⇓', - DoubleLeftArrow: '⇐', - DoubleLeftRightArrow: '⇔', - DoubleLeftTee: '⫤', - DoubleLongLeftArrow: '⟸', - DoubleLongLeftRightArrow: '⟺', - DoubleLongRightArrow: '⟹', - DoubleRightArrow: '⇒', - DoubleRightTee: '⊨', - DoubleUpArrow: '⇑', - DoubleUpDownArrow: '⇕', - DoubleVerticalBar: '∥', - DownArrow: '↓', - DownArrowBar: '⤓', - DownArrowUpArrow: '⇵', - DownBreve: '̑', - DownLeftRightVector: '⥐', - DownLeftTeeVector: '⥞', - DownLeftVector: '↽', - DownLeftVectorBar: '⥖', - DownRightTeeVector: '⥟', - DownRightVector: '⇁', - DownRightVectorBar: '⥗', - DownTee: '⊤', - DownTeeArrow: '↧', - Downarrow: '⇓', - Dscr: '𝒟', - Dstrok: 'Đ', - ENG: 'Ŋ', - ETH: 'Ð', - Eacute: 'É', - Ecaron: 'Ě', - Ecirc: 'Ê', - Ecy: 'Э', - Edot: 'Ė', - Efr: '𝔈', - Egrave: 'È', - Element: '∈', - Emacr: 'Ē', - EmptySmallSquare: '◻', - EmptyVerySmallSquare: '▫', - Eogon: 'Ę', - Eopf: '𝔼', - Epsilon: 'Ε', - Equal: '⩵', - EqualTilde: '≂', - Equilibrium: '⇌', - Escr: 'ℰ', - Esim: '⩳', - Eta: 'Η', - Euml: 'Ë', - Exists: '∃', - ExponentialE: 'ⅇ', - Fcy: 'Ф', - Ffr: '𝔉', - FilledSmallSquare: '◼', - FilledVerySmallSquare: '▪', - Fopf: '𝔽', - ForAll: '∀', - Fouriertrf: 'ℱ', - Fscr: 'ℱ', - GJcy: 'Ѓ', - GT: '>', - Gamma: 'Γ', - Gammad: 'Ϝ', - Gbreve: 'Ğ', - Gcedil: 'Ģ', - Gcirc: 'Ĝ', - Gcy: 'Г', - Gdot: 'Ġ', - Gfr: '𝔊', - Gg: '⋙', - Gopf: '𝔾', - GreaterEqual: '≥', - GreaterEqualLess: '⋛', - GreaterFullEqual: '≧', - GreaterGreater: '⪢', - GreaterLess: '≷', - GreaterSlantEqual: '⩾', - GreaterTilde: '≳', - Gscr: '𝒢', - Gt: '≫', - HARDcy: 'Ъ', - Hacek: 'ˇ', - Hat: '^', - Hcirc: 'Ĥ', - Hfr: 'ℌ', - HilbertSpace: 'ℋ', - Hopf: 'ℍ', - HorizontalLine: '─', - Hscr: 'ℋ', - Hstrok: 'Ħ', - HumpDownHump: '≎', - HumpEqual: '≏', - IEcy: 'Е', - IJlig: 'IJ', - IOcy: 'Ё', - Iacute: 'Í', - Icirc: 'Î', - Icy: 'И', - Idot: 'İ', - Ifr: 'ℑ', - Igrave: 'Ì', - Im: 'ℑ', - Imacr: 'Ī', - ImaginaryI: 'ⅈ', - Implies: '⇒', - Int: '∬', - Integral: '∫', - Intersection: '⋂', - InvisibleComma: '⁣', - InvisibleTimes: '⁢', - Iogon: 'Į', - Iopf: '𝕀', - Iota: 'Ι', - Iscr: 'ℐ', - Itilde: 'Ĩ', - Iukcy: 'І', - Iuml: 'Ï', - Jcirc: 'Ĵ', - Jcy: 'Й', - Jfr: '𝔍', - Jopf: '𝕁', - Jscr: '𝒥', - Jsercy: 'Ј', - Jukcy: 'Є', - KHcy: 'Х', - KJcy: 'Ќ', - Kappa: 'Κ', - Kcedil: 'Ķ', - Kcy: 'К', - Kfr: '𝔎', - Kopf: '𝕂', - Kscr: '𝒦', - LJcy: 'Љ', - LT: '<', - Lacute: 'Ĺ', - Lambda: 'Λ', - Lang: '⟪', - Laplacetrf: 'ℒ', - Larr: '↞', - Lcaron: 'Ľ', - Lcedil: 'Ļ', - Lcy: 'Л', - LeftAngleBracket: '⟨', - LeftArrow: '←', - LeftArrowBar: '⇤', - LeftArrowRightArrow: '⇆', - LeftCeiling: '⌈', - LeftDoubleBracket: '⟦', - LeftDownTeeVector: '⥡', - LeftDownVector: '⇃', - LeftDownVectorBar: '⥙', - LeftFloor: '⌊', - LeftRightArrow: '↔', - LeftRightVector: '⥎', - LeftTee: '⊣', - LeftTeeArrow: '↤', - LeftTeeVector: '⥚', - LeftTriangle: '⊲', - LeftTriangleBar: '⧏', - LeftTriangleEqual: '⊴', - LeftUpDownVector: '⥑', - LeftUpTeeVector: '⥠', - LeftUpVector: '↿', - LeftUpVectorBar: '⥘', - LeftVector: '↼', - LeftVectorBar: '⥒', - Leftarrow: '⇐', - Leftrightarrow: '⇔', - LessEqualGreater: '⋚', - LessFullEqual: '≦', - LessGreater: '≶', - LessLess: '⪡', - LessSlantEqual: '⩽', - LessTilde: '≲', - Lfr: '𝔏', - Ll: '⋘', - Lleftarrow: '⇚', - Lmidot: 'Ŀ', - LongLeftArrow: '⟵', - LongLeftRightArrow: '⟷', - LongRightArrow: '⟶', - Longleftarrow: '⟸', - Longleftrightarrow: '⟺', - Longrightarrow: '⟹', - Lopf: '𝕃', - LowerLeftArrow: '↙', - LowerRightArrow: '↘', - Lscr: 'ℒ', - Lsh: '↰', - Lstrok: 'Ł', - Lt: '≪', - Map: '⤅', - Mcy: 'М', - MediumSpace: ' ', - Mellintrf: 'ℳ', - Mfr: '𝔐', - MinusPlus: '∓', - Mopf: '𝕄', - Mscr: 'ℳ', - Mu: 'Μ', - NJcy: 'Њ', - Nacute: 'Ń', - Ncaron: 'Ň', - Ncedil: 'Ņ', - Ncy: 'Н', - NegativeMediumSpace: '​', - NegativeThickSpace: '​', - NegativeThinSpace: '​', - NegativeVeryThinSpace: '​', - NestedGreaterGreater: '≫', - NestedLessLess: '≪', - NewLine: '\n', - Nfr: '𝔑', - NoBreak: '⁠', - NonBreakingSpace: ' ', - Nopf: 'ℕ', - Not: '⫬', - NotCongruent: '≢', - NotCupCap: '≭', - NotDoubleVerticalBar: '∦', - NotElement: '∉', - NotEqual: '≠', - NotEqualTilde: '≂̸', - NotExists: '∄', - NotGreater: '≯', - NotGreaterEqual: '≱', - NotGreaterFullEqual: '≧̸', - NotGreaterGreater: '≫̸', - NotGreaterLess: '≹', - NotGreaterSlantEqual: '⩾̸', - NotGreaterTilde: '≵', - NotHumpDownHump: '≎̸', - NotHumpEqual: '≏̸', - NotLeftTriangle: '⋪', - NotLeftTriangleBar: '⧏̸', - NotLeftTriangleEqual: '⋬', - NotLess: '≮', - NotLessEqual: '≰', - NotLessGreater: '≸', - NotLessLess: '≪̸', - NotLessSlantEqual: '⩽̸', - NotLessTilde: '≴', - NotNestedGreaterGreater: '⪢̸', - NotNestedLessLess: '⪡̸', - NotPrecedes: '⊀', - NotPrecedesEqual: '⪯̸', - NotPrecedesSlantEqual: '⋠', - NotReverseElement: '∌', - NotRightTriangle: '⋫', - NotRightTriangleBar: '⧐̸', - NotRightTriangleEqual: '⋭', - NotSquareSubset: '⊏̸', - NotSquareSubsetEqual: '⋢', - NotSquareSuperset: '⊐̸', - NotSquareSupersetEqual: '⋣', - NotSubset: '⊂⃒', - NotSubsetEqual: '⊈', - NotSucceeds: '⊁', - NotSucceedsEqual: '⪰̸', - NotSucceedsSlantEqual: '⋡', - NotSucceedsTilde: '≿̸', - NotSuperset: '⊃⃒', - NotSupersetEqual: '⊉', - NotTilde: '≁', - NotTildeEqual: '≄', - NotTildeFullEqual: '≇', - NotTildeTilde: '≉', - NotVerticalBar: '∤', - Nscr: '𝒩', - Ntilde: 'Ñ', - Nu: 'Ν', - OElig: 'Œ', - Oacute: 'Ó', - Ocirc: 'Ô', - Ocy: 'О', - Odblac: 'Ő', - Ofr: '𝔒', - Ograve: 'Ò', - Omacr: 'Ō', - Omega: 'Ω', - Omicron: 'Ο', - Oopf: '𝕆', - OpenCurlyDoubleQuote: '“', - OpenCurlyQuote: '‘', - Or: '⩔', - Oscr: '𝒪', - Oslash: 'Ø', - Otilde: 'Õ', - Otimes: '⨷', - Ouml: 'Ö', - OverBar: '‾', - OverBrace: '⏞', - OverBracket: '⎴', - OverParenthesis: '⏜', - PartialD: '∂', - Pcy: 'П', - Pfr: '𝔓', - Phi: 'Φ', - Pi: 'Π', - PlusMinus: '±', - Poincareplane: 'ℌ', - Popf: 'ℙ', - Pr: '⪻', - Precedes: '≺', - PrecedesEqual: '⪯', - PrecedesSlantEqual: '≼', - PrecedesTilde: '≾', - Prime: '″', - Product: '∏', - Proportion: '∷', - Proportional: '∝', - Pscr: '𝒫', - Psi: 'Ψ', - QUOT: '"', - Qfr: '𝔔', - Qopf: 'ℚ', - Qscr: '𝒬', - RBarr: '⤐', - REG: '®', - Racute: 'Ŕ', - Rang: '⟫', - Rarr: '↠', - Rarrtl: '⤖', - Rcaron: 'Ř', - Rcedil: 'Ŗ', - Rcy: 'Р', - Re: 'ℜ', - ReverseElement: '∋', - ReverseEquilibrium: '⇋', - ReverseUpEquilibrium: '⥯', - Rfr: 'ℜ', - Rho: 'Ρ', - RightAngleBracket: '⟩', - RightArrow: '→', - RightArrowBar: '⇥', - RightArrowLeftArrow: '⇄', - RightCeiling: '⌉', - RightDoubleBracket: '⟧', - RightDownTeeVector: '⥝', - RightDownVector: '⇂', - RightDownVectorBar: '⥕', - RightFloor: '⌋', - RightTee: '⊢', - RightTeeArrow: '↦', - RightTeeVector: '⥛', - RightTriangle: '⊳', - RightTriangleBar: '⧐', - RightTriangleEqual: '⊵', - RightUpDownVector: '⥏', - RightUpTeeVector: '⥜', - RightUpVector: '↾', - RightUpVectorBar: '⥔', - RightVector: '⇀', - RightVectorBar: '⥓', - Rightarrow: '⇒', - Ropf: 'ℝ', - RoundImplies: '⥰', - Rrightarrow: '⇛', - Rscr: 'ℛ', - Rsh: '↱', - RuleDelayed: '⧴', - SHCHcy: 'Щ', - SHcy: 'Ш', - SOFTcy: 'Ь', - Sacute: 'Ś', - Sc: '⪼', - Scaron: 'Š', - Scedil: 'Ş', - Scirc: 'Ŝ', - Scy: 'С', - Sfr: '𝔖', - ShortDownArrow: '↓', - ShortLeftArrow: '←', - ShortRightArrow: '→', - ShortUpArrow: '↑', - Sigma: 'Σ', - SmallCircle: '∘', - Sopf: '𝕊', - Sqrt: '√', - Square: '□', - SquareIntersection: '⊓', - SquareSubset: '⊏', - SquareSubsetEqual: '⊑', - SquareSuperset: '⊐', - SquareSupersetEqual: '⊒', - SquareUnion: '⊔', - Sscr: '𝒮', - Star: '⋆', - Sub: '⋐', - Subset: '⋐', - SubsetEqual: '⊆', - Succeeds: '≻', - SucceedsEqual: '⪰', - SucceedsSlantEqual: '≽', - SucceedsTilde: '≿', - SuchThat: '∋', - Sum: '∑', - Sup: '⋑', - Superset: '⊃', - SupersetEqual: '⊇', - Supset: '⋑', - THORN: 'Þ', - TRADE: '™', - TSHcy: 'Ћ', - TScy: 'Ц', - Tab: '\t', - Tau: 'Τ', - Tcaron: 'Ť', - Tcedil: 'Ţ', - Tcy: 'Т', - Tfr: '𝔗', - Therefore: '∴', - Theta: 'Θ', - ThickSpace: '  ', - ThinSpace: ' ', - Tilde: '∼', - TildeEqual: '≃', - TildeFullEqual: '≅', - TildeTilde: '≈', - Topf: '𝕋', - TripleDot: '⃛', - Tscr: '𝒯', - Tstrok: 'Ŧ', - Uacute: 'Ú', - Uarr: '↟', - Uarrocir: '⥉', - Ubrcy: 'Ў', - Ubreve: 'Ŭ', - Ucirc: 'Û', - Ucy: 'У', - Udblac: 'Ű', - Ufr: '𝔘', - Ugrave: 'Ù', - Umacr: 'Ū', - UnderBar: '_', - UnderBrace: '⏟', - UnderBracket: '⎵', - UnderParenthesis: '⏝', - Union: '⋃', - UnionPlus: '⊎', - Uogon: 'Ų', - Uopf: '𝕌', - UpArrow: '↑', - UpArrowBar: '⤒', - UpArrowDownArrow: '⇅', - UpDownArrow: '↕', - UpEquilibrium: '⥮', - UpTee: '⊥', - UpTeeArrow: '↥', - Uparrow: '⇑', - Updownarrow: '⇕', - UpperLeftArrow: '↖', - UpperRightArrow: '↗', - Upsi: 'ϒ', - Upsilon: 'Υ', - Uring: 'Ů', - Uscr: '𝒰', - Utilde: 'Ũ', - Uuml: 'Ü', - VDash: '⊫', - Vbar: '⫫', - Vcy: 'В', - Vdash: '⊩', - Vdashl: '⫦', - Vee: '⋁', - Verbar: '‖', - Vert: '‖', - VerticalBar: '∣', - VerticalLine: '|', - VerticalSeparator: '❘', - VerticalTilde: '≀', - VeryThinSpace: ' ', - Vfr: '𝔙', - Vopf: '𝕍', - Vscr: '𝒱', - Vvdash: '⊪', - Wcirc: 'Ŵ', - Wedge: '⋀', - Wfr: '𝔚', - Wopf: '𝕎', - Wscr: '𝒲', - Xfr: '𝔛', - Xi: 'Ξ', - Xopf: '𝕏', - Xscr: '𝒳', - YAcy: 'Я', - YIcy: 'Ї', - YUcy: 'Ю', - Yacute: 'Ý', - Ycirc: 'Ŷ', - Ycy: 'Ы', - Yfr: '𝔜', - Yopf: '𝕐', - Yscr: '𝒴', - Yuml: 'Ÿ', - ZHcy: 'Ж', - Zacute: 'Ź', - Zcaron: 'Ž', - Zcy: 'З', - Zdot: 'Ż', - ZeroWidthSpace: '​', - Zeta: 'Ζ', - Zfr: 'ℨ', - Zopf: 'ℤ', - Zscr: '𝒵', - aacute: 'á', - abreve: 'ă', - ac: '∾', - acE: '∾̳', - acd: '∿', - acirc: 'â', - acute: '´', - acy: 'а', - aelig: 'æ', - af: '⁡', - afr: '𝔞', - agrave: 'à', - alefsym: 'ℵ', - aleph: 'ℵ', - alpha: 'α', - amacr: 'ā', - amalg: '⨿', - amp: '&', - and: '∧', - andand: '⩕', - andd: '⩜', - andslope: '⩘', - andv: '⩚', - ang: '∠', - ange: '⦤', - angle: '∠', - angmsd: '∡', - angmsdaa: '⦨', - angmsdab: '⦩', - angmsdac: '⦪', - angmsdad: '⦫', - angmsdae: '⦬', - angmsdaf: '⦭', - angmsdag: '⦮', - angmsdah: '⦯', - angrt: '∟', - angrtvb: '⊾', - angrtvbd: '⦝', - angsph: '∢', - angst: 'Å', - angzarr: '⍼', - aogon: 'ą', - aopf: '𝕒', - ap: '≈', - apE: '⩰', - apacir: '⩯', - ape: '≊', - apid: '≋', - apos: "'", - approx: '≈', - approxeq: '≊', - aring: 'å', - ascr: '𝒶', - ast: '*', - asymp: '≈', - asympeq: '≍', - atilde: 'ã', - auml: 'ä', - awconint: '∳', - awint: '⨑', - bNot: '⫭', - backcong: '≌', - backepsilon: '϶', - backprime: '‵', - backsim: '∽', - backsimeq: '⋍', - barvee: '⊽', - barwed: '⌅', - barwedge: '⌅', - bbrk: '⎵', - bbrktbrk: '⎶', - bcong: '≌', - bcy: 'б', - bdquo: '„', - becaus: '∵', - because: '∵', - bemptyv: '⦰', - bepsi: '϶', - bernou: 'ℬ', - beta: 'β', - beth: 'ℶ', - between: '≬', - bfr: '𝔟', - bigcap: '⋂', - bigcirc: '◯', - bigcup: '⋃', - bigodot: '⨀', - bigoplus: '⨁', - bigotimes: '⨂', - bigsqcup: '⨆', - bigstar: '★', - bigtriangledown: '▽', - bigtriangleup: '△', - biguplus: '⨄', - bigvee: '⋁', - bigwedge: '⋀', - bkarow: '⤍', - blacklozenge: '⧫', - blacksquare: '▪', - blacktriangle: '▴', - blacktriangledown: '▾', - blacktriangleleft: '◂', - blacktriangleright: '▸', - blank: '␣', - blk12: '▒', - blk14: '░', - blk34: '▓', - block: '█', - bne: '=⃥', - bnequiv: '≡⃥', - bnot: '⌐', - bopf: '𝕓', - bot: '⊥', - bottom: '⊥', - bowtie: '⋈', - boxDL: '╗', - boxDR: '╔', - boxDl: '╖', - boxDr: '╓', - boxH: '═', - boxHD: '╦', - boxHU: '╩', - boxHd: '╤', - boxHu: '╧', - boxUL: '╝', - boxUR: '╚', - boxUl: '╜', - boxUr: '╙', - boxV: '║', - boxVH: '╬', - boxVL: '╣', - boxVR: '╠', - boxVh: '╫', - boxVl: '╢', - boxVr: '╟', - boxbox: '⧉', - boxdL: '╕', - boxdR: '╒', - boxdl: '┐', - boxdr: '┌', - boxh: '─', - boxhD: '╥', - boxhU: '╨', - boxhd: '┬', - boxhu: '┴', - boxminus: '⊟', - boxplus: '⊞', - boxtimes: '⊠', - boxuL: '╛', - boxuR: '╘', - boxul: '┘', - boxur: '└', - boxv: '│', - boxvH: '╪', - boxvL: '╡', - boxvR: '╞', - boxvh: '┼', - boxvl: '┤', - boxvr: '├', - bprime: '‵', - breve: '˘', - brvbar: '¦', - bscr: '𝒷', - bsemi: '⁏', - bsim: '∽', - bsime: '⋍', - bsol: '\\', - bsolb: '⧅', - bsolhsub: '⟈', - bull: '•', - bullet: '•', - bump: '≎', - bumpE: '⪮', - bumpe: '≏', - bumpeq: '≏', - cacute: 'ć', - cap: '∩', - capand: '⩄', - capbrcup: '⩉', - capcap: '⩋', - capcup: '⩇', - capdot: '⩀', - caps: '∩︀', - caret: '⁁', - caron: 'ˇ', - ccaps: '⩍', - ccaron: 'č', - ccedil: 'ç', - ccirc: 'ĉ', - ccups: '⩌', - ccupssm: '⩐', - cdot: 'ċ', - cedil: '¸', - cemptyv: '⦲', - cent: '¢', - centerdot: '·', - cfr: '𝔠', - chcy: 'ч', - check: '✓', - checkmark: '✓', - chi: 'χ', - cir: '○', - cirE: '⧃', - circ: 'ˆ', - circeq: '≗', - circlearrowleft: '↺', - circlearrowright: '↻', - circledR: '®', - circledS: 'Ⓢ', - circledast: '⊛', - circledcirc: '⊚', - circleddash: '⊝', - cire: '≗', - cirfnint: '⨐', - cirmid: '⫯', - cirscir: '⧂', - clubs: '♣', - clubsuit: '♣', - colon: ':', - colone: '≔', - coloneq: '≔', - comma: ',', - commat: '@', - comp: '∁', - compfn: '∘', - complement: '∁', - complexes: 'ℂ', - cong: '≅', - congdot: '⩭', - conint: '∮', - copf: '𝕔', - coprod: '∐', - copy: '©', - copysr: '℗', - crarr: '↵', - cross: '✗', - cscr: '𝒸', - csub: '⫏', - csube: '⫑', - csup: '⫐', - csupe: '⫒', - ctdot: '⋯', - cudarrl: '⤸', - cudarrr: '⤵', - cuepr: '⋞', - cuesc: '⋟', - cularr: '↶', - cularrp: '⤽', - cup: '∪', - cupbrcap: '⩈', - cupcap: '⩆', - cupcup: '⩊', - cupdot: '⊍', - cupor: '⩅', - cups: '∪︀', - curarr: '↷', - curarrm: '⤼', - curlyeqprec: '⋞', - curlyeqsucc: '⋟', - curlyvee: '⋎', - curlywedge: '⋏', - curren: '¤', - curvearrowleft: '↶', - curvearrowright: '↷', - cuvee: '⋎', - cuwed: '⋏', - cwconint: '∲', - cwint: '∱', - cylcty: '⌭', - dArr: '⇓', - dHar: '⥥', - dagger: '†', - daleth: 'ℸ', - darr: '↓', - dash: '‐', - dashv: '⊣', - dbkarow: '⤏', - dblac: '˝', - dcaron: 'ď', - dcy: 'д', - dd: 'ⅆ', - ddagger: '‡', - ddarr: '⇊', - ddotseq: '⩷', - deg: '°', - delta: 'δ', - demptyv: '⦱', - dfisht: '⥿', - dfr: '𝔡', - dharl: '⇃', - dharr: '⇂', - diam: '⋄', - diamond: '⋄', - diamondsuit: '♦', - diams: '♦', - die: '¨', - digamma: 'ϝ', - disin: '⋲', - div: '÷', - divide: '÷', - divideontimes: '⋇', - divonx: '⋇', - djcy: 'ђ', - dlcorn: '⌞', - dlcrop: '⌍', - dollar: '$', - dopf: '𝕕', - dot: '˙', - doteq: '≐', - doteqdot: '≑', - dotminus: '∸', - dotplus: '∔', - dotsquare: '⊡', - doublebarwedge: '⌆', - downarrow: '↓', - downdownarrows: '⇊', - downharpoonleft: '⇃', - downharpoonright: '⇂', - drbkarow: '⤐', - drcorn: '⌟', - drcrop: '⌌', - dscr: '𝒹', - dscy: 'ѕ', - dsol: '⧶', - dstrok: 'đ', - dtdot: '⋱', - dtri: '▿', - dtrif: '▾', - duarr: '⇵', - duhar: '⥯', - dwangle: '⦦', - dzcy: 'џ', - dzigrarr: '⟿', - eDDot: '⩷', - eDot: '≑', - eacute: 'é', - easter: '⩮', - ecaron: 'ě', - ecir: '≖', - ecirc: 'ê', - ecolon: '≕', - ecy: 'э', - edot: 'ė', - ee: 'ⅇ', - efDot: '≒', - efr: '𝔢', - eg: '⪚', - egrave: 'è', - egs: '⪖', - egsdot: '⪘', - el: '⪙', - elinters: '⏧', - ell: 'ℓ', - els: '⪕', - elsdot: '⪗', - emacr: 'ē', - empty: '∅', - emptyset: '∅', - emptyv: '∅', - emsp13: ' ', - emsp14: ' ', - emsp: ' ', - eng: 'ŋ', - ensp: ' ', - eogon: 'ę', - eopf: '𝕖', - epar: '⋕', - eparsl: '⧣', - eplus: '⩱', - epsi: 'ε', - epsilon: 'ε', - epsiv: 'ϵ', - eqcirc: '≖', - eqcolon: '≕', - eqsim: '≂', - eqslantgtr: '⪖', - eqslantless: '⪕', - equals: '=', - equest: '≟', - equiv: '≡', - equivDD: '⩸', - eqvparsl: '⧥', - erDot: '≓', - erarr: '⥱', - escr: 'ℯ', - esdot: '≐', - esim: '≂', - eta: 'η', - eth: 'ð', - euml: 'ë', - euro: '€', - excl: '!', - exist: '∃', - expectation: 'ℰ', - exponentiale: 'ⅇ', - fallingdotseq: '≒', - fcy: 'ф', - female: '♀', - ffilig: 'ffi', - fflig: 'ff', - ffllig: 'ffl', - ffr: '𝔣', - filig: 'fi', - fjlig: 'fj', - flat: '♭', - fllig: 'fl', - fltns: '▱', - fnof: 'ƒ', - fopf: '𝕗', - forall: '∀', - fork: '⋔', - forkv: '⫙', - fpartint: '⨍', - frac12: '½', - frac13: '⅓', - frac14: '¼', - frac15: '⅕', - frac16: '⅙', - frac18: '⅛', - frac23: '⅔', - frac25: '⅖', - frac34: '¾', - frac35: '⅗', - frac38: '⅜', - frac45: '⅘', - frac56: '⅚', - frac58: '⅝', - frac78: '⅞', - frasl: '⁄', - frown: '⌢', - fscr: '𝒻', - gE: '≧', - gEl: '⪌', - gacute: 'ǵ', - gamma: 'γ', - gammad: 'ϝ', - gap: '⪆', - gbreve: 'ğ', - gcirc: 'ĝ', - gcy: 'г', - gdot: 'ġ', - ge: '≥', - gel: '⋛', - geq: '≥', - geqq: '≧', - geqslant: '⩾', - ges: '⩾', - gescc: '⪩', - gesdot: '⪀', - gesdoto: '⪂', - gesdotol: '⪄', - gesl: '⋛︀', - gesles: '⪔', - gfr: '𝔤', - gg: '≫', - ggg: '⋙', - gimel: 'ℷ', - gjcy: 'ѓ', - gl: '≷', - glE: '⪒', - gla: '⪥', - glj: '⪤', - gnE: '≩', - gnap: '⪊', - gnapprox: '⪊', - gne: '⪈', - gneq: '⪈', - gneqq: '≩', - gnsim: '⋧', - gopf: '𝕘', - grave: '`', - gscr: 'ℊ', - gsim: '≳', - gsime: '⪎', - gsiml: '⪐', - gt: '>', - gtcc: '⪧', - gtcir: '⩺', - gtdot: '⋗', - gtlPar: '⦕', - gtquest: '⩼', - gtrapprox: '⪆', - gtrarr: '⥸', - gtrdot: '⋗', - gtreqless: '⋛', - gtreqqless: '⪌', - gtrless: '≷', - gtrsim: '≳', - gvertneqq: '≩︀', - gvnE: '≩︀', - hArr: '⇔', - hairsp: ' ', - half: '½', - hamilt: 'ℋ', - hardcy: 'ъ', - harr: '↔', - harrcir: '⥈', - harrw: '↭', - hbar: 'ℏ', - hcirc: 'ĥ', - hearts: '♥', - heartsuit: '♥', - hellip: '…', - hercon: '⊹', - hfr: '𝔥', - hksearow: '⤥', - hkswarow: '⤦', - hoarr: '⇿', - homtht: '∻', - hookleftarrow: '↩', - hookrightarrow: '↪', - hopf: '𝕙', - horbar: '―', - hscr: '𝒽', - hslash: 'ℏ', - hstrok: 'ħ', - hybull: '⁃', - hyphen: '‐', - iacute: 'í', - ic: '⁣', - icirc: 'î', - icy: 'и', - iecy: 'е', - iexcl: '¡', - iff: '⇔', - ifr: '𝔦', - igrave: 'ì', - ii: 'ⅈ', - iiiint: '⨌', - iiint: '∭', - iinfin: '⧜', - iiota: '℩', - ijlig: 'ij', - imacr: 'ī', - image: 'ℑ', - imagline: 'ℐ', - imagpart: 'ℑ', - imath: 'ı', - imof: '⊷', - imped: 'Ƶ', - in: '∈', - incare: '℅', - infin: '∞', - infintie: '⧝', - inodot: 'ı', - int: '∫', - intcal: '⊺', - integers: 'ℤ', - intercal: '⊺', - intlarhk: '⨗', - intprod: '⨼', - iocy: 'ё', - iogon: 'į', - iopf: '𝕚', - iota: 'ι', - iprod: '⨼', - iquest: '¿', - iscr: '𝒾', - isin: '∈', - isinE: '⋹', - isindot: '⋵', - isins: '⋴', - isinsv: '⋳', - isinv: '∈', - it: '⁢', - itilde: 'ĩ', - iukcy: 'і', - iuml: 'ï', - jcirc: 'ĵ', - jcy: 'й', - jfr: '𝔧', - jmath: 'ȷ', - jopf: '𝕛', - jscr: '𝒿', - jsercy: 'ј', - jukcy: 'є', - kappa: 'κ', - kappav: 'ϰ', - kcedil: 'ķ', - kcy: 'к', - kfr: '𝔨', - kgreen: 'ĸ', - khcy: 'х', - kjcy: 'ќ', - kopf: '𝕜', - kscr: '𝓀', - lAarr: '⇚', - lArr: '⇐', - lAtail: '⤛', - lBarr: '⤎', - lE: '≦', - lEg: '⪋', - lHar: '⥢', - lacute: 'ĺ', - laemptyv: '⦴', - lagran: 'ℒ', - lambda: 'λ', - lang: '⟨', - langd: '⦑', - langle: '⟨', - lap: '⪅', - laquo: '«', - larr: '←', - larrb: '⇤', - larrbfs: '⤟', - larrfs: '⤝', - larrhk: '↩', - larrlp: '↫', - larrpl: '⤹', - larrsim: '⥳', - larrtl: '↢', - lat: '⪫', - latail: '⤙', - late: '⪭', - lates: '⪭︀', - lbarr: '⤌', - lbbrk: '❲', - lbrace: '{', - lbrack: '[', - lbrke: '⦋', - lbrksld: '⦏', - lbrkslu: '⦍', - lcaron: 'ľ', - lcedil: 'ļ', - lceil: '⌈', - lcub: '{', - lcy: 'л', - ldca: '⤶', - ldquo: '“', - ldquor: '„', - ldrdhar: '⥧', - ldrushar: '⥋', - ldsh: '↲', - le: '≤', - leftarrow: '←', - leftarrowtail: '↢', - leftharpoondown: '↽', - leftharpoonup: '↼', - leftleftarrows: '⇇', - leftrightarrow: '↔', - leftrightarrows: '⇆', - leftrightharpoons: '⇋', - leftrightsquigarrow: '↭', - leftthreetimes: '⋋', - leg: '⋚', - leq: '≤', - leqq: '≦', - leqslant: '⩽', - les: '⩽', - lescc: '⪨', - lesdot: '⩿', - lesdoto: '⪁', - lesdotor: '⪃', - lesg: '⋚︀', - lesges: '⪓', - lessapprox: '⪅', - lessdot: '⋖', - lesseqgtr: '⋚', - lesseqqgtr: '⪋', - lessgtr: '≶', - lesssim: '≲', - lfisht: '⥼', - lfloor: '⌊', - lfr: '𝔩', - lg: '≶', - lgE: '⪑', - lhard: '↽', - lharu: '↼', - lharul: '⥪', - lhblk: '▄', - ljcy: 'љ', - ll: '≪', - llarr: '⇇', - llcorner: '⌞', - llhard: '⥫', - lltri: '◺', - lmidot: 'ŀ', - lmoust: '⎰', - lmoustache: '⎰', - lnE: '≨', - lnap: '⪉', - lnapprox: '⪉', - lne: '⪇', - lneq: '⪇', - lneqq: '≨', - lnsim: '⋦', - loang: '⟬', - loarr: '⇽', - lobrk: '⟦', - longleftarrow: '⟵', - longleftrightarrow: '⟷', - longmapsto: '⟼', - longrightarrow: '⟶', - looparrowleft: '↫', - looparrowright: '↬', - lopar: '⦅', - lopf: '𝕝', - loplus: '⨭', - lotimes: '⨴', - lowast: '∗', - lowbar: '_', - loz: '◊', - lozenge: '◊', - lozf: '⧫', - lpar: '(', - lparlt: '⦓', - lrarr: '⇆', - lrcorner: '⌟', - lrhar: '⇋', - lrhard: '⥭', - lrm: '‎', - lrtri: '⊿', - lsaquo: '‹', - lscr: '𝓁', - lsh: '↰', - lsim: '≲', - lsime: '⪍', - lsimg: '⪏', - lsqb: '[', - lsquo: '‘', - lsquor: '‚', - lstrok: 'ł', - lt: '<', - ltcc: '⪦', - ltcir: '⩹', - ltdot: '⋖', - lthree: '⋋', - ltimes: '⋉', - ltlarr: '⥶', - ltquest: '⩻', - ltrPar: '⦖', - ltri: '◃', - ltrie: '⊴', - ltrif: '◂', - lurdshar: '⥊', - luruhar: '⥦', - lvertneqq: '≨︀', - lvnE: '≨︀', - mDDot: '∺', - macr: '¯', - male: '♂', - malt: '✠', - maltese: '✠', - map: '↦', - mapsto: '↦', - mapstodown: '↧', - mapstoleft: '↤', - mapstoup: '↥', - marker: '▮', - mcomma: '⨩', - mcy: 'м', - mdash: '—', - measuredangle: '∡', - mfr: '𝔪', - mho: '℧', - micro: 'µ', - mid: '∣', - midast: '*', - midcir: '⫰', - middot: '·', - minus: '−', - minusb: '⊟', - minusd: '∸', - minusdu: '⨪', - mlcp: '⫛', - mldr: '…', - mnplus: '∓', - models: '⊧', - mopf: '𝕞', - mp: '∓', - mscr: '𝓂', - mstpos: '∾', - mu: 'μ', - multimap: '⊸', - mumap: '⊸', - nGg: '⋙̸', - nGt: '≫⃒', - nGtv: '≫̸', - nLeftarrow: '⇍', - nLeftrightarrow: '⇎', - nLl: '⋘̸', - nLt: '≪⃒', - nLtv: '≪̸', - nRightarrow: '⇏', - nVDash: '⊯', - nVdash: '⊮', - nabla: '∇', - nacute: 'ń', - nang: '∠⃒', - nap: '≉', - napE: '⩰̸', - napid: '≋̸', - napos: 'ʼn', - napprox: '≉', - natur: '♮', - natural: '♮', - naturals: 'ℕ', - nbsp: ' ', - nbump: '≎̸', - nbumpe: '≏̸', - ncap: '⩃', - ncaron: 'ň', - ncedil: 'ņ', - ncong: '≇', - ncongdot: '⩭̸', - ncup: '⩂', - ncy: 'н', - ndash: '–', - ne: '≠', - neArr: '⇗', - nearhk: '⤤', - nearr: '↗', - nearrow: '↗', - nedot: '≐̸', - nequiv: '≢', - nesear: '⤨', - nesim: '≂̸', - nexist: '∄', - nexists: '∄', - nfr: '𝔫', - ngE: '≧̸', - nge: '≱', - ngeq: '≱', - ngeqq: '≧̸', - ngeqslant: '⩾̸', - nges: '⩾̸', - ngsim: '≵', - ngt: '≯', - ngtr: '≯', - nhArr: '⇎', - nharr: '↮', - nhpar: '⫲', - ni: '∋', - nis: '⋼', - nisd: '⋺', - niv: '∋', - njcy: 'њ', - nlArr: '⇍', - nlE: '≦̸', - nlarr: '↚', - nldr: '‥', - nle: '≰', - nleftarrow: '↚', - nleftrightarrow: '↮', - nleq: '≰', - nleqq: '≦̸', - nleqslant: '⩽̸', - nles: '⩽̸', - nless: '≮', - nlsim: '≴', - nlt: '≮', - nltri: '⋪', - nltrie: '⋬', - nmid: '∤', - nopf: '𝕟', - not: '¬', - notin: '∉', - notinE: '⋹̸', - notindot: '⋵̸', - notinva: '∉', - notinvb: '⋷', - notinvc: '⋶', - notni: '∌', - notniva: '∌', - notnivb: '⋾', - notnivc: '⋽', - npar: '∦', - nparallel: '∦', - nparsl: '⫽⃥', - npart: '∂̸', - npolint: '⨔', - npr: '⊀', - nprcue: '⋠', - npre: '⪯̸', - nprec: '⊀', - npreceq: '⪯̸', - nrArr: '⇏', - nrarr: '↛', - nrarrc: '⤳̸', - nrarrw: '↝̸', - nrightarrow: '↛', - nrtri: '⋫', - nrtrie: '⋭', - nsc: '⊁', - nsccue: '⋡', - nsce: '⪰̸', - nscr: '𝓃', - nshortmid: '∤', - nshortparallel: '∦', - nsim: '≁', - nsime: '≄', - nsimeq: '≄', - nsmid: '∤', - nspar: '∦', - nsqsube: '⋢', - nsqsupe: '⋣', - nsub: '⊄', - nsubE: '⫅̸', - nsube: '⊈', - nsubset: '⊂⃒', - nsubseteq: '⊈', - nsubseteqq: '⫅̸', - nsucc: '⊁', - nsucceq: '⪰̸', - nsup: '⊅', - nsupE: '⫆̸', - nsupe: '⊉', - nsupset: '⊃⃒', - nsupseteq: '⊉', - nsupseteqq: '⫆̸', - ntgl: '≹', - ntilde: 'ñ', - ntlg: '≸', - ntriangleleft: '⋪', - ntrianglelefteq: '⋬', - ntriangleright: '⋫', - ntrianglerighteq: '⋭', - nu: 'ν', - num: '#', - numero: '№', - numsp: ' ', - nvDash: '⊭', - nvHarr: '⤄', - nvap: '≍⃒', - nvdash: '⊬', - nvge: '≥⃒', - nvgt: '>⃒', - nvinfin: '⧞', - nvlArr: '⤂', - nvle: '≤⃒', - nvlt: '<⃒', - nvltrie: '⊴⃒', - nvrArr: '⤃', - nvrtrie: '⊵⃒', - nvsim: '∼⃒', - nwArr: '⇖', - nwarhk: '⤣', - nwarr: '↖', - nwarrow: '↖', - nwnear: '⤧', - oS: 'Ⓢ', - oacute: 'ó', - oast: '⊛', - ocir: '⊚', - ocirc: 'ô', - ocy: 'о', - odash: '⊝', - odblac: 'ő', - odiv: '⨸', - odot: '⊙', - odsold: '⦼', - oelig: 'œ', - ofcir: '⦿', - ofr: '𝔬', - ogon: '˛', - ograve: 'ò', - ogt: '⧁', - ohbar: '⦵', - ohm: 'Ω', - oint: '∮', - olarr: '↺', - olcir: '⦾', - olcross: '⦻', - oline: '‾', - olt: '⧀', - omacr: 'ō', - omega: 'ω', - omicron: 'ο', - omid: '⦶', - ominus: '⊖', - oopf: '𝕠', - opar: '⦷', - operp: '⦹', - oplus: '⊕', - or: '∨', - orarr: '↻', - ord: '⩝', - order: 'ℴ', - orderof: 'ℴ', - ordf: 'ª', - ordm: 'º', - origof: '⊶', - oror: '⩖', - orslope: '⩗', - orv: '⩛', - oscr: 'ℴ', - oslash: 'ø', - osol: '⊘', - otilde: 'õ', - otimes: '⊗', - otimesas: '⨶', - ouml: 'ö', - ovbar: '⌽', - par: '∥', - para: '¶', - parallel: '∥', - parsim: '⫳', - parsl: '⫽', - part: '∂', - pcy: 'п', - percnt: '%', - period: '.', - permil: '‰', - perp: '⊥', - pertenk: '‱', - pfr: '𝔭', - phi: 'φ', - phiv: 'ϕ', - phmmat: 'ℳ', - phone: '☎', - pi: 'π', - pitchfork: '⋔', - piv: 'ϖ', - planck: 'ℏ', - planckh: 'ℎ', - plankv: 'ℏ', - plus: '+', - plusacir: '⨣', - plusb: '⊞', - pluscir: '⨢', - plusdo: '∔', - plusdu: '⨥', - pluse: '⩲', - plusmn: '±', - plussim: '⨦', - plustwo: '⨧', - pm: '±', - pointint: '⨕', - popf: '𝕡', - pound: '£', - pr: '≺', - prE: '⪳', - prap: '⪷', - prcue: '≼', - pre: '⪯', - prec: '≺', - precapprox: '⪷', - preccurlyeq: '≼', - preceq: '⪯', - precnapprox: '⪹', - precneqq: '⪵', - precnsim: '⋨', - precsim: '≾', - prime: '′', - primes: 'ℙ', - prnE: '⪵', - prnap: '⪹', - prnsim: '⋨', - prod: '∏', - profalar: '⌮', - profline: '⌒', - profsurf: '⌓', - prop: '∝', - propto: '∝', - prsim: '≾', - prurel: '⊰', - pscr: '𝓅', - psi: 'ψ', - puncsp: ' ', - qfr: '𝔮', - qint: '⨌', - qopf: '𝕢', - qprime: '⁗', - qscr: '𝓆', - quaternions: 'ℍ', - quatint: '⨖', - quest: '?', - questeq: '≟', - quot: '"', - rAarr: '⇛', - rArr: '⇒', - rAtail: '⤜', - rBarr: '⤏', - rHar: '⥤', - race: '∽̱', - racute: 'ŕ', - radic: '√', - raemptyv: '⦳', - rang: '⟩', - rangd: '⦒', - range: '⦥', - rangle: '⟩', - raquo: '»', - rarr: '→', - rarrap: '⥵', - rarrb: '⇥', - rarrbfs: '⤠', - rarrc: '⤳', - rarrfs: '⤞', - rarrhk: '↪', - rarrlp: '↬', - rarrpl: '⥅', - rarrsim: '⥴', - rarrtl: '↣', - rarrw: '↝', - ratail: '⤚', - ratio: '∶', - rationals: 'ℚ', - rbarr: '⤍', - rbbrk: '❳', - rbrace: '}', - rbrack: ']', - rbrke: '⦌', - rbrksld: '⦎', - rbrkslu: '⦐', - rcaron: 'ř', - rcedil: 'ŗ', - rceil: '⌉', - rcub: '}', - rcy: 'р', - rdca: '⤷', - rdldhar: '⥩', - rdquo: '”', - rdquor: '”', - rdsh: '↳', - real: 'ℜ', - realine: 'ℛ', - realpart: 'ℜ', - reals: 'ℝ', - rect: '▭', - reg: '®', - rfisht: '⥽', - rfloor: '⌋', - rfr: '𝔯', - rhard: '⇁', - rharu: '⇀', - rharul: '⥬', - rho: 'ρ', - rhov: 'ϱ', - rightarrow: '→', - rightarrowtail: '↣', - rightharpoondown: '⇁', - rightharpoonup: '⇀', - rightleftarrows: '⇄', - rightleftharpoons: '⇌', - rightrightarrows: '⇉', - rightsquigarrow: '↝', - rightthreetimes: '⋌', - ring: '˚', - risingdotseq: '≓', - rlarr: '⇄', - rlhar: '⇌', - rlm: '‏', - rmoust: '⎱', - rmoustache: '⎱', - rnmid: '⫮', - roang: '⟭', - roarr: '⇾', - robrk: '⟧', - ropar: '⦆', - ropf: '𝕣', - roplus: '⨮', - rotimes: '⨵', - rpar: ')', - rpargt: '⦔', - rppolint: '⨒', - rrarr: '⇉', - rsaquo: '›', - rscr: '𝓇', - rsh: '↱', - rsqb: ']', - rsquo: '’', - rsquor: '’', - rthree: '⋌', - rtimes: '⋊', - rtri: '▹', - rtrie: '⊵', - rtrif: '▸', - rtriltri: '⧎', - ruluhar: '⥨', - rx: '℞', - sacute: 'ś', - sbquo: '‚', - sc: '≻', - scE: '⪴', - scap: '⪸', - scaron: 'š', - sccue: '≽', - sce: '⪰', - scedil: 'ş', - scirc: 'ŝ', - scnE: '⪶', - scnap: '⪺', - scnsim: '⋩', - scpolint: '⨓', - scsim: '≿', - scy: 'с', - sdot: '⋅', - sdotb: '⊡', - sdote: '⩦', - seArr: '⇘', - searhk: '⤥', - searr: '↘', - searrow: '↘', - sect: '§', - semi: ';', - seswar: '⤩', - setminus: '∖', - setmn: '∖', - sext: '✶', - sfr: '𝔰', - sfrown: '⌢', - sharp: '♯', - shchcy: 'щ', - shcy: 'ш', - shortmid: '∣', - shortparallel: '∥', - shy: '­', - sigma: 'σ', - sigmaf: 'ς', - sigmav: 'ς', - sim: '∼', - simdot: '⩪', - sime: '≃', - simeq: '≃', - simg: '⪞', - simgE: '⪠', - siml: '⪝', - simlE: '⪟', - simne: '≆', - simplus: '⨤', - simrarr: '⥲', - slarr: '←', - smallsetminus: '∖', - smashp: '⨳', - smeparsl: '⧤', - smid: '∣', - smile: '⌣', - smt: '⪪', - smte: '⪬', - smtes: '⪬︀', - softcy: 'ь', - sol: '/', - solb: '⧄', - solbar: '⌿', - sopf: '𝕤', - spades: '♠', - spadesuit: '♠', - spar: '∥', - sqcap: '⊓', - sqcaps: '⊓︀', - sqcup: '⊔', - sqcups: '⊔︀', - sqsub: '⊏', - sqsube: '⊑', - sqsubset: '⊏', - sqsubseteq: '⊑', - sqsup: '⊐', - sqsupe: '⊒', - sqsupset: '⊐', - sqsupseteq: '⊒', - squ: '□', - square: '□', - squarf: '▪', - squf: '▪', - srarr: '→', - sscr: '𝓈', - ssetmn: '∖', - ssmile: '⌣', - sstarf: '⋆', - star: '☆', - starf: '★', - straightepsilon: 'ϵ', - straightphi: 'ϕ', - strns: '¯', - sub: '⊂', - subE: '⫅', - subdot: '⪽', - sube: '⊆', - subedot: '⫃', - submult: '⫁', - subnE: '⫋', - subne: '⊊', - subplus: '⪿', - subrarr: '⥹', - subset: '⊂', - subseteq: '⊆', - subseteqq: '⫅', - subsetneq: '⊊', - subsetneqq: '⫋', - subsim: '⫇', - subsub: '⫕', - subsup: '⫓', - succ: '≻', - succapprox: '⪸', - succcurlyeq: '≽', - succeq: '⪰', - succnapprox: '⪺', - succneqq: '⪶', - succnsim: '⋩', - succsim: '≿', - sum: '∑', - sung: '♪', - sup1: '¹', - sup2: '²', - sup3: '³', - sup: '⊃', - supE: '⫆', - supdot: '⪾', - supdsub: '⫘', - supe: '⊇', - supedot: '⫄', - suphsol: '⟉', - suphsub: '⫗', - suplarr: '⥻', - supmult: '⫂', - supnE: '⫌', - supne: '⊋', - supplus: '⫀', - supset: '⊃', - supseteq: '⊇', - supseteqq: '⫆', - supsetneq: '⊋', - supsetneqq: '⫌', - supsim: '⫈', - supsub: '⫔', - supsup: '⫖', - swArr: '⇙', - swarhk: '⤦', - swarr: '↙', - swarrow: '↙', - swnwar: '⤪', - szlig: 'ß', - target: '⌖', - tau: 'τ', - tbrk: '⎴', - tcaron: 'ť', - tcedil: 'ţ', - tcy: 'т', - tdot: '⃛', - telrec: '⌕', - tfr: '𝔱', - there4: '∴', - therefore: '∴', - theta: 'θ', - thetasym: 'ϑ', - thetav: 'ϑ', - thickapprox: '≈', - thicksim: '∼', - thinsp: ' ', - thkap: '≈', - thksim: '∼', - thorn: 'þ', - tilde: '˜', - times: '×', - timesb: '⊠', - timesbar: '⨱', - timesd: '⨰', - tint: '∭', - toea: '⤨', - top: '⊤', - topbot: '⌶', - topcir: '⫱', - topf: '𝕥', - topfork: '⫚', - tosa: '⤩', - tprime: '‴', - trade: '™', - triangle: '▵', - triangledown: '▿', - triangleleft: '◃', - trianglelefteq: '⊴', - triangleq: '≜', - triangleright: '▹', - trianglerighteq: '⊵', - tridot: '◬', - trie: '≜', - triminus: '⨺', - triplus: '⨹', - trisb: '⧍', - tritime: '⨻', - trpezium: '⏢', - tscr: '𝓉', - tscy: 'ц', - tshcy: 'ћ', - tstrok: 'ŧ', - twixt: '≬', - twoheadleftarrow: '↞', - twoheadrightarrow: '↠', - uArr: '⇑', - uHar: '⥣', - uacute: 'ú', - uarr: '↑', - ubrcy: 'ў', - ubreve: 'ŭ', - ucirc: 'û', - ucy: 'у', - udarr: '⇅', - udblac: 'ű', - udhar: '⥮', - ufisht: '⥾', - ufr: '𝔲', - ugrave: 'ù', - uharl: '↿', - uharr: '↾', - uhblk: '▀', - ulcorn: '⌜', - ulcorner: '⌜', - ulcrop: '⌏', - ultri: '◸', - umacr: 'ū', - uml: '¨', - uogon: 'ų', - uopf: '𝕦', - uparrow: '↑', - updownarrow: '↕', - upharpoonleft: '↿', - upharpoonright: '↾', - uplus: '⊎', - upsi: 'υ', - upsih: 'ϒ', - upsilon: 'υ', - upuparrows: '⇈', - urcorn: '⌝', - urcorner: '⌝', - urcrop: '⌎', - uring: 'ů', - urtri: '◹', - uscr: '𝓊', - utdot: '⋰', - utilde: 'ũ', - utri: '▵', - utrif: '▴', - uuarr: '⇈', - uuml: 'ü', - uwangle: '⦧', - vArr: '⇕', - vBar: '⫨', - vBarv: '⫩', - vDash: '⊨', - vangrt: '⦜', - varepsilon: 'ϵ', - varkappa: 'ϰ', - varnothing: '∅', - varphi: 'ϕ', - varpi: 'ϖ', - varpropto: '∝', - varr: '↕', - varrho: 'ϱ', - varsigma: 'ς', - varsubsetneq: '⊊︀', - varsubsetneqq: '⫋︀', - varsupsetneq: '⊋︀', - varsupsetneqq: '⫌︀', - vartheta: 'ϑ', - vartriangleleft: '⊲', - vartriangleright: '⊳', - vcy: 'в', - vdash: '⊢', - vee: '∨', - veebar: '⊻', - veeeq: '≚', - vellip: '⋮', - verbar: '|', - vert: '|', - vfr: '𝔳', - vltri: '⊲', - vnsub: '⊂⃒', - vnsup: '⊃⃒', - vopf: '𝕧', - vprop: '∝', - vrtri: '⊳', - vscr: '𝓋', - vsubnE: '⫋︀', - vsubne: '⊊︀', - vsupnE: '⫌︀', - vsupne: '⊋︀', - vzigzag: '⦚', - wcirc: 'ŵ', - wedbar: '⩟', - wedge: '∧', - wedgeq: '≙', - weierp: '℘', - wfr: '𝔴', - wopf: '𝕨', - wp: '℘', - wr: '≀', - wreath: '≀', - wscr: '𝓌', - xcap: '⋂', - xcirc: '◯', - xcup: '⋃', - xdtri: '▽', - xfr: '𝔵', - xhArr: '⟺', - xharr: '⟷', - xi: 'ξ', - xlArr: '⟸', - xlarr: '⟵', - xmap: '⟼', - xnis: '⋻', - xodot: '⨀', - xopf: '𝕩', - xoplus: '⨁', - xotime: '⨂', - xrArr: '⟹', - xrarr: '⟶', - xscr: '𝓍', - xsqcup: '⨆', - xuplus: '⨄', - xutri: '△', - xvee: '⋁', - xwedge: '⋀', - yacute: 'ý', - yacy: 'я', - ycirc: 'ŷ', - ycy: 'ы', - yen: '¥', - yfr: '𝔶', - yicy: 'ї', - yopf: '𝕪', - yscr: '𝓎', - yucy: 'ю', - yuml: 'ÿ', - zacute: 'ź', - zcaron: 'ž', - zcy: 'з', - zdot: 'ż', - zeetrf: 'ℨ', - zeta: 'ζ', - zfr: '𝔷', - zhcy: 'ж', - zigrarr: '⇝', - zopf: '𝕫', - zscr: '𝓏', - zwj: '‍', - zwnj: '‌' -} - -;// CONCATENATED MODULE: ./node_modules/decode-named-character-reference/index.js - - -const own = {}.hasOwnProperty - -/** - * Decode a single character reference (without the `&` or `;`). - * You probably only need this when you’re building parsers yourself that follow - * different rules compared to HTML. - * This is optimized to be tiny in browsers. - * - * @param {string} value - * `notin` (named), `#123` (deci), `#x123` (hexa). - * @returns {string|false} - * Decoded reference. - */ -function decodeNamedCharacterReference(value) { - return own.call(characterEntities, value) ? characterEntities[value] : false -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/character-reference.js -/** - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const characterReference = { - name: 'characterReference', - tokenize: tokenizeCharacterReference -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeCharacterReference(effects, ok, nok) { - const self = this - let size = 0 - /** @type {number} */ - let max - /** @type {(code: Code) => boolean} */ - let test - return start - - /** - * Start of character reference. - * - * ```markdown - * > | a&b - * ^ - * > | a{b - * ^ - * > | a b - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter('characterReference') - effects.enter('characterReferenceMarker') - effects.consume(code) - effects.exit('characterReferenceMarker') - return open - } - - /** - * After `&`, at `#` for numeric references or alphanumeric for named - * references. - * - * ```markdown - * > | a&b - * ^ - * > | a{b - * ^ - * > | a b - * ^ - * ``` - * - * @type {State} - */ - function open(code) { - if (code === 35) { - effects.enter('characterReferenceMarkerNumeric') - effects.consume(code) - effects.exit('characterReferenceMarkerNumeric') - return numeric - } - effects.enter('characterReferenceValue') - max = 31 - test = asciiAlphanumeric - return value(code) - } - - /** - * After `#`, at `x` for hexadecimals or digit for decimals. - * - * ```markdown - * > | a{b - * ^ - * > | a b - * ^ - * ``` - * - * @type {State} - */ - function numeric(code) { - if (code === 88 || code === 120) { - effects.enter('characterReferenceMarkerHexadecimal') - effects.consume(code) - effects.exit('characterReferenceMarkerHexadecimal') - effects.enter('characterReferenceValue') - max = 6 - test = asciiHexDigit - return value - } - effects.enter('characterReferenceValue') - max = 7 - test = asciiDigit - return value(code) - } - - /** - * After markers (`&#x`, `&#`, or `&`), in value, before `;`. - * - * The character reference kind defines what and how many characters are - * allowed. - * - * ```markdown - * > | a&b - * ^^^ - * > | a{b - * ^^^ - * > | a b - * ^ - * ``` - * - * @type {State} - */ - function value(code) { - if (code === 59 && size) { - const token = effects.exit('characterReferenceValue') - if ( - test === asciiAlphanumeric && - !decodeNamedCharacterReference(self.sliceSerialize(token)) - ) { - return nok(code) - } - - // To do: `markdown-rs` uses a different name: - // `CharacterReferenceMarkerSemi`. - effects.enter('characterReferenceMarker') - effects.consume(code) - effects.exit('characterReferenceMarker') - effects.exit('characterReference') - return ok - } - if (test(code) && size++ < max) { - effects.consume(code) - return value - } - return nok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/character-escape.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - -/** @type {Construct} */ -const characterEscape = { - name: 'characterEscape', - tokenize: tokenizeCharacterEscape -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeCharacterEscape(effects, ok, nok) { - return start - - /** - * Start of character escape. - * - * ```markdown - * > | a\*b - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter('characterEscape') - effects.enter('escapeMarker') - effects.consume(code) - effects.exit('escapeMarker') - return inside - } - - /** - * After `\`, at punctuation. - * - * ```markdown - * > | a\*b - * ^ - * ``` - * - * @type {State} - */ - function inside(code) { - // ASCII punctuation. - if (asciiPunctuation(code)) { - effects.enter('characterEscapeValue') - effects.consume(code) - effects.exit('characterEscapeValue') - effects.exit('characterEscape') - return ok - } - return nok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/line-ending.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const lineEnding = { - name: 'lineEnding', - tokenize: tokenizeLineEnding -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeLineEnding(effects, ok) { - return start - - /** @type {State} */ - function start(code) { - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return factorySpace(effects, ok, 'linePrefix') - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/label-end.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').Event} Event - * @typedef {import('micromark-util-types').Resolver} Resolver - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').Token} Token - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - - - - - - - -/** @type {Construct} */ -const labelEnd = { - name: 'labelEnd', - tokenize: tokenizeLabelEnd, - resolveTo: resolveToLabelEnd, - resolveAll: resolveAllLabelEnd -} - -/** @type {Construct} */ -const resourceConstruct = { - tokenize: tokenizeResource -} -/** @type {Construct} */ -const referenceFullConstruct = { - tokenize: tokenizeReferenceFull -} -/** @type {Construct} */ -const referenceCollapsedConstruct = { - tokenize: tokenizeReferenceCollapsed -} - -/** @type {Resolver} */ -function resolveAllLabelEnd(events) { - let index = -1 - while (++index < events.length) { - const token = events[index][1] - if ( - token.type === 'labelImage' || - token.type === 'labelLink' || - token.type === 'labelEnd' - ) { - // Remove the marker. - events.splice(index + 1, token.type === 'labelImage' ? 4 : 2) - token.type = 'data' - index++ - } - } - return events -} - -/** @type {Resolver} */ -function resolveToLabelEnd(events, context) { - let index = events.length - let offset = 0 - /** @type {Token} */ - let token - /** @type {number | undefined} */ - let open - /** @type {number | undefined} */ - let close - /** @type {Array} */ - let media - - // Find an opening. - while (index--) { - token = events[index][1] - if (open) { - // If we see another link, or inactive link label, we’ve been here before. - if ( - token.type === 'link' || - (token.type === 'labelLink' && token._inactive) - ) { - break - } - - // Mark other link openings as inactive, as we can’t have links in - // links. - if (events[index][0] === 'enter' && token.type === 'labelLink') { - token._inactive = true - } - } else if (close) { - if ( - events[index][0] === 'enter' && - (token.type === 'labelImage' || token.type === 'labelLink') && - !token._balanced - ) { - open = index - if (token.type !== 'labelLink') { - offset = 2 - break - } - } - } else if (token.type === 'labelEnd') { - close = index - } - } - const group = { - type: events[open][1].type === 'labelLink' ? 'link' : 'image', - start: Object.assign({}, events[open][1].start), - end: Object.assign({}, events[events.length - 1][1].end) - } - const label = { - type: 'label', - start: Object.assign({}, events[open][1].start), - end: Object.assign({}, events[close][1].end) - } - const text = { - type: 'labelText', - start: Object.assign({}, events[open + offset + 2][1].end), - end: Object.assign({}, events[close - 2][1].start) - } - media = [ - ['enter', group, context], - ['enter', label, context] - ] - - // Opening marker. - media = push(media, events.slice(open + 1, open + offset + 3)) - - // Text open. - media = push(media, [['enter', text, context]]) - - // Always populated by defaults. - - // Between. - media = push( - media, - resolveAll( - context.parser.constructs.insideSpan.null, - events.slice(open + offset + 4, close - 3), - context - ) - ) - - // Text close, marker close, label close. - media = push(media, [ - ['exit', text, context], - events[close - 2], - events[close - 1], - ['exit', label, context] - ]) - - // Reference, resource, or so. - media = push(media, events.slice(close + 1)) - - // Media close. - media = push(media, [['exit', group, context]]) - splice(events, open, events.length, media) - return events -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeLabelEnd(effects, ok, nok) { - const self = this - let index = self.events.length - /** @type {Token} */ - let labelStart - /** @type {boolean} */ - let defined - - // Find an opening. - while (index--) { - if ( - (self.events[index][1].type === 'labelImage' || - self.events[index][1].type === 'labelLink') && - !self.events[index][1]._balanced - ) { - labelStart = self.events[index][1] - break - } - } - return start - - /** - * Start of label end. - * - * ```markdown - * > | [a](b) c - * ^ - * > | [a][b] c - * ^ - * > | [a][] b - * ^ - * > | [a] b - * ``` - * - * @type {State} - */ - function start(code) { - // If there is not an okay opening. - if (!labelStart) { - return nok(code) - } - - // If the corresponding label (link) start is marked as inactive, - // it means we’d be wrapping a link, like this: - // - // ```markdown - // > | a [b [c](d) e](f) g. - // ^ - // ``` - // - // We can’t have that, so it’s just balanced brackets. - if (labelStart._inactive) { - return labelEndNok(code) - } - defined = self.parser.defined.includes( - normalizeIdentifier( - self.sliceSerialize({ - start: labelStart.end, - end: self.now() - }) - ) - ) - effects.enter('labelEnd') - effects.enter('labelMarker') - effects.consume(code) - effects.exit('labelMarker') - effects.exit('labelEnd') - return after - } - - /** - * After `]`. - * - * ```markdown - * > | [a](b) c - * ^ - * > | [a][b] c - * ^ - * > | [a][] b - * ^ - * > | [a] b - * ^ - * ``` - * - * @type {State} - */ - function after(code) { - // Note: `markdown-rs` also parses GFM footnotes here, which for us is in - // an extension. - - // Resource (`[asd](fgh)`)? - if (code === 40) { - return effects.attempt( - resourceConstruct, - labelEndOk, - defined ? labelEndOk : labelEndNok - )(code) - } - - // Full (`[asd][fgh]`) or collapsed (`[asd][]`) reference? - if (code === 91) { - return effects.attempt( - referenceFullConstruct, - labelEndOk, - defined ? referenceNotFull : labelEndNok - )(code) - } - - // Shortcut (`[asd]`) reference? - return defined ? labelEndOk(code) : labelEndNok(code) - } - - /** - * After `]`, at `[`, but not at a full reference. - * - * > 👉 **Note**: we only get here if the label is defined. - * - * ```markdown - * > | [a][] b - * ^ - * > | [a] b - * ^ - * ``` - * - * @type {State} - */ - function referenceNotFull(code) { - return effects.attempt( - referenceCollapsedConstruct, - labelEndOk, - labelEndNok - )(code) - } - - /** - * Done, we found something. - * - * ```markdown - * > | [a](b) c - * ^ - * > | [a][b] c - * ^ - * > | [a][] b - * ^ - * > | [a] b - * ^ - * ``` - * - * @type {State} - */ - function labelEndOk(code) { - // Note: `markdown-rs` does a bunch of stuff here. - return ok(code) - } - - /** - * Done, it’s nothing. - * - * There was an okay opening, but we didn’t match anything. - * - * ```markdown - * > | [a](b c - * ^ - * > | [a][b c - * ^ - * > | [a] b - * ^ - * ``` - * - * @type {State} - */ - function labelEndNok(code) { - labelStart._balanced = true - return nok(code) - } -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeResource(effects, ok, nok) { - return resourceStart - - /** - * At a resource. - * - * ```markdown - * > | [a](b) c - * ^ - * ``` - * - * @type {State} - */ - function resourceStart(code) { - effects.enter('resource') - effects.enter('resourceMarker') - effects.consume(code) - effects.exit('resourceMarker') - return resourceBefore - } - - /** - * In resource, after `(`, at optional whitespace. - * - * ```markdown - * > | [a](b) c - * ^ - * ``` - * - * @type {State} - */ - function resourceBefore(code) { - return markdownLineEndingOrSpace(code) - ? factoryWhitespace(effects, resourceOpen)(code) - : resourceOpen(code) - } - - /** - * In resource, after optional whitespace, at `)` or a destination. - * - * ```markdown - * > | [a](b) c - * ^ - * ``` - * - * @type {State} - */ - function resourceOpen(code) { - if (code === 41) { - return resourceEnd(code) - } - return factoryDestination( - effects, - resourceDestinationAfter, - resourceDestinationMissing, - 'resourceDestination', - 'resourceDestinationLiteral', - 'resourceDestinationLiteralMarker', - 'resourceDestinationRaw', - 'resourceDestinationString', - 32 - )(code) - } - - /** - * In resource, after destination, at optional whitespace. - * - * ```markdown - * > | [a](b) c - * ^ - * ``` - * - * @type {State} - */ - function resourceDestinationAfter(code) { - return markdownLineEndingOrSpace(code) - ? factoryWhitespace(effects, resourceBetween)(code) - : resourceEnd(code) - } - - /** - * At invalid destination. - * - * ```markdown - * > | [a](<<) b - * ^ - * ``` - * - * @type {State} - */ - function resourceDestinationMissing(code) { - return nok(code) - } - - /** - * In resource, after destination and whitespace, at `(` or title. - * - * ```markdown - * > | [a](b ) c - * ^ - * ``` - * - * @type {State} - */ - function resourceBetween(code) { - if (code === 34 || code === 39 || code === 40) { - return factoryTitle( - effects, - resourceTitleAfter, - nok, - 'resourceTitle', - 'resourceTitleMarker', - 'resourceTitleString' - )(code) - } - return resourceEnd(code) - } - - /** - * In resource, after title, at optional whitespace. - * - * ```markdown - * > | [a](b "c") d - * ^ - * ``` - * - * @type {State} - */ - function resourceTitleAfter(code) { - return markdownLineEndingOrSpace(code) - ? factoryWhitespace(effects, resourceEnd)(code) - : resourceEnd(code) - } - - /** - * In resource, at `)`. - * - * ```markdown - * > | [a](b) d - * ^ - * ``` - * - * @type {State} - */ - function resourceEnd(code) { - if (code === 41) { - effects.enter('resourceMarker') - effects.consume(code) - effects.exit('resourceMarker') - effects.exit('resource') - return ok - } - return nok(code) - } -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeReferenceFull(effects, ok, nok) { - const self = this - return referenceFull - - /** - * In a reference (full), at the `[`. - * - * ```markdown - * > | [a][b] d - * ^ - * ``` - * - * @type {State} - */ - function referenceFull(code) { - return factoryLabel.call( - self, - effects, - referenceFullAfter, - referenceFullMissing, - 'reference', - 'referenceMarker', - 'referenceString' - )(code) - } - - /** - * In a reference (full), after `]`. - * - * ```markdown - * > | [a][b] d - * ^ - * ``` - * - * @type {State} - */ - function referenceFullAfter(code) { - return self.parser.defined.includes( - normalizeIdentifier( - self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1) - ) - ) - ? ok(code) - : nok(code) - } - - /** - * In reference (full) that was missing. - * - * ```markdown - * > | [a][b d - * ^ - * ``` - * - * @type {State} - */ - function referenceFullMissing(code) { - return nok(code) - } -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeReferenceCollapsed(effects, ok, nok) { - return referenceCollapsedStart - - /** - * In reference (collapsed), at `[`. - * - * > 👉 **Note**: we only get here if the label is defined. - * - * ```markdown - * > | [a][] d - * ^ - * ``` - * - * @type {State} - */ - function referenceCollapsedStart(code) { - // We only attempt a collapsed label if there’s a `[`. - - effects.enter('reference') - effects.enter('referenceMarker') - effects.consume(code) - effects.exit('referenceMarker') - return referenceCollapsedOpen - } - - /** - * In reference (collapsed), at `]`. - * - * > 👉 **Note**: we only get here if the label is defined. - * - * ```markdown - * > | [a][] d - * ^ - * ``` - * - * @type {State} - */ - function referenceCollapsedOpen(code) { - if (code === 93) { - effects.enter('referenceMarker') - effects.consume(code) - effects.exit('referenceMarker') - effects.exit('reference') - return ok - } - return nok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/label-start-image.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const labelStartImage = { - name: 'labelStartImage', - tokenize: tokenizeLabelStartImage, - resolveAll: labelEnd.resolveAll -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeLabelStartImage(effects, ok, nok) { - const self = this - return start - - /** - * Start of label (image) start. - * - * ```markdown - * > | a ![b] c - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter('labelImage') - effects.enter('labelImageMarker') - effects.consume(code) - effects.exit('labelImageMarker') - return open - } - - /** - * After `!`, at `[`. - * - * ```markdown - * > | a ![b] c - * ^ - * ``` - * - * @type {State} - */ - function open(code) { - if (code === 91) { - effects.enter('labelMarker') - effects.consume(code) - effects.exit('labelMarker') - effects.exit('labelImage') - return after - } - return nok(code) - } - - /** - * After `![`. - * - * ```markdown - * > | a ![b] c - * ^ - * ``` - * - * This is needed in because, when GFM footnotes are enabled, images never - * form when started with a `^`. - * Instead, links form: - * - * ```markdown - * ![^a](b) - * - * ![^a][b] - * - * [b]: c - * ``` - * - * ```html - *

    !^a

    - *

    !^a

    - * ``` - * - * @type {State} - */ - function after(code) { - // To do: use a new field to do this, this is still needed for - // `micromark-extension-gfm-footnote`, but the `label-start-link` - // behavior isn’t. - // Hidden footnotes hook. - /* c8 ignore next 3 */ - return code === 94 && '_hiddenFootnoteSupport' in self.parser.constructs - ? nok(code) - : ok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-classify-character/index.js -/** - * @typedef {import('micromark-util-types').Code} Code - */ - - -/** - * Classify whether a code represents whitespace, punctuation, or something - * else. - * - * Used for attention (emphasis, strong), whose sequences can open or close - * based on the class of surrounding characters. - * - * > 👉 **Note**: eof (`null`) is seen as whitespace. - * - * @param {Code} code - * Code. - * @returns {typeof constants.characterGroupWhitespace | typeof constants.characterGroupPunctuation | undefined} - * Group. - */ -function classifyCharacter(code) { - if ( - code === null || - markdownLineEndingOrSpace(code) || - unicodeWhitespace(code) - ) { - return 1 - } - if (unicodePunctuation(code)) { - return 2 - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/attention.js -/** - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').Event} Event - * @typedef {import('micromark-util-types').Point} Point - * @typedef {import('micromark-util-types').Resolver} Resolver - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').Token} Token - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - - -/** @type {Construct} */ -const attention = { - name: 'attention', - tokenize: tokenizeAttention, - resolveAll: resolveAllAttention -} - -/** - * Take all events and resolve attention to emphasis or strong. - * - * @type {Resolver} - */ -function resolveAllAttention(events, context) { - let index = -1 - /** @type {number} */ - let open - /** @type {Token} */ - let group - /** @type {Token} */ - let text - /** @type {Token} */ - let openingSequence - /** @type {Token} */ - let closingSequence - /** @type {number} */ - let use - /** @type {Array} */ - let nextEvents - /** @type {number} */ - let offset - - // Walk through all events. - // - // Note: performance of this is fine on an mb of normal markdown, but it’s - // a bottleneck for malicious stuff. - while (++index < events.length) { - // Find a token that can close. - if ( - events[index][0] === 'enter' && - events[index][1].type === 'attentionSequence' && - events[index][1]._close - ) { - open = index - - // Now walk back to find an opener. - while (open--) { - // Find a token that can open the closer. - if ( - events[open][0] === 'exit' && - events[open][1].type === 'attentionSequence' && - events[open][1]._open && - // If the markers are the same: - context.sliceSerialize(events[open][1]).charCodeAt(0) === - context.sliceSerialize(events[index][1]).charCodeAt(0) - ) { - // If the opening can close or the closing can open, - // and the close size *is not* a multiple of three, - // but the sum of the opening and closing size *is* multiple of three, - // then don’t match. - if ( - (events[open][1]._close || events[index][1]._open) && - (events[index][1].end.offset - events[index][1].start.offset) % 3 && - !( - (events[open][1].end.offset - - events[open][1].start.offset + - events[index][1].end.offset - - events[index][1].start.offset) % - 3 - ) - ) { - continue - } - - // Number of markers to use from the sequence. - use = - events[open][1].end.offset - events[open][1].start.offset > 1 && - events[index][1].end.offset - events[index][1].start.offset > 1 - ? 2 - : 1 - const start = Object.assign({}, events[open][1].end) - const end = Object.assign({}, events[index][1].start) - movePoint(start, -use) - movePoint(end, use) - openingSequence = { - type: use > 1 ? 'strongSequence' : 'emphasisSequence', - start, - end: Object.assign({}, events[open][1].end) - } - closingSequence = { - type: use > 1 ? 'strongSequence' : 'emphasisSequence', - start: Object.assign({}, events[index][1].start), - end - } - text = { - type: use > 1 ? 'strongText' : 'emphasisText', - start: Object.assign({}, events[open][1].end), - end: Object.assign({}, events[index][1].start) - } - group = { - type: use > 1 ? 'strong' : 'emphasis', - start: Object.assign({}, openingSequence.start), - end: Object.assign({}, closingSequence.end) - } - events[open][1].end = Object.assign({}, openingSequence.start) - events[index][1].start = Object.assign({}, closingSequence.end) - nextEvents = [] - - // If there are more markers in the opening, add them before. - if (events[open][1].end.offset - events[open][1].start.offset) { - nextEvents = push(nextEvents, [ - ['enter', events[open][1], context], - ['exit', events[open][1], context] - ]) - } - - // Opening. - nextEvents = push(nextEvents, [ - ['enter', group, context], - ['enter', openingSequence, context], - ['exit', openingSequence, context], - ['enter', text, context] - ]) - - // Always populated by defaults. - - // Between. - nextEvents = push( - nextEvents, - resolveAll( - context.parser.constructs.insideSpan.null, - events.slice(open + 1, index), - context - ) - ) - - // Closing. - nextEvents = push(nextEvents, [ - ['exit', text, context], - ['enter', closingSequence, context], - ['exit', closingSequence, context], - ['exit', group, context] - ]) - - // If there are more markers in the closing, add them after. - if (events[index][1].end.offset - events[index][1].start.offset) { - offset = 2 - nextEvents = push(nextEvents, [ - ['enter', events[index][1], context], - ['exit', events[index][1], context] - ]) - } else { - offset = 0 - } - splice(events, open - 1, index - open + 3, nextEvents) - index = open + nextEvents.length - offset - 2 - break - } - } - } - } - - // Remove remaining sequences. - index = -1 - while (++index < events.length) { - if (events[index][1].type === 'attentionSequence') { - events[index][1].type = 'data' - } - } - return events -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeAttention(effects, ok) { - const attentionMarkers = this.parser.constructs.attentionMarkers.null - const previous = this.previous - const before = classifyCharacter(previous) - - /** @type {NonNullable} */ - let marker - return start - - /** - * Before a sequence. - * - * ```markdown - * > | ** - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - marker = code - effects.enter('attentionSequence') - return inside(code) - } - - /** - * In a sequence. - * - * ```markdown - * > | ** - * ^^ - * ``` - * - * @type {State} - */ - function inside(code) { - if (code === marker) { - effects.consume(code) - return inside - } - const token = effects.exit('attentionSequence') - - // To do: next major: move this to resolver, just like `markdown-rs`. - const after = classifyCharacter(code) - - // Always populated by defaults. - - const open = - !after || (after === 2 && before) || attentionMarkers.includes(code) - const close = - !before || (before === 2 && after) || attentionMarkers.includes(previous) - token._open = Boolean(marker === 42 ? open : open && (before || !close)) - token._close = Boolean(marker === 42 ? close : close && (after || !open)) - return ok(code) - } -} - -/** - * Move a point a bit. - * - * Note: `move` only works inside lines! It’s not possible to move past other - * chunks (replacement characters, tabs, or line endings). - * - * @param {Point} point - * @param {number} offset - * @returns {void} - */ -function movePoint(point, offset) { - point.column += offset - point.offset += offset - point._bufferIndex += offset -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/autolink.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - -/** @type {Construct} */ -const autolink = { - name: 'autolink', - tokenize: tokenizeAutolink -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeAutolink(effects, ok, nok) { - let size = 0 - return start - - /** - * Start of an autolink. - * - * ```markdown - * > | ab - * ^ - * > | ab - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter('autolink') - effects.enter('autolinkMarker') - effects.consume(code) - effects.exit('autolinkMarker') - effects.enter('autolinkProtocol') - return open - } - - /** - * After `<`, at protocol or atext. - * - * ```markdown - * > | ab - * ^ - * > | ab - * ^ - * ``` - * - * @type {State} - */ - function open(code) { - if (asciiAlpha(code)) { - effects.consume(code) - return schemeOrEmailAtext - } - return emailAtext(code) - } - - /** - * At second byte of protocol or atext. - * - * ```markdown - * > | ab - * ^ - * > | ab - * ^ - * ``` - * - * @type {State} - */ - function schemeOrEmailAtext(code) { - // ASCII alphanumeric and `+`, `-`, and `.`. - if (code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code)) { - // Count the previous alphabetical from `open` too. - size = 1 - return schemeInsideOrEmailAtext(code) - } - return emailAtext(code) - } - - /** - * In ambiguous protocol or atext. - * - * ```markdown - * > | ab - * ^ - * > | ab - * ^ - * ``` - * - * @type {State} - */ - function schemeInsideOrEmailAtext(code) { - if (code === 58) { - effects.consume(code) - size = 0 - return urlInside - } - - // ASCII alphanumeric and `+`, `-`, and `.`. - if ( - (code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code)) && - size++ < 32 - ) { - effects.consume(code) - return schemeInsideOrEmailAtext - } - size = 0 - return emailAtext(code) - } - - /** - * After protocol, in URL. - * - * ```markdown - * > | ab - * ^ - * ``` - * - * @type {State} - */ - function urlInside(code) { - if (code === 62) { - effects.exit('autolinkProtocol') - effects.enter('autolinkMarker') - effects.consume(code) - effects.exit('autolinkMarker') - effects.exit('autolink') - return ok - } - - // ASCII control, space, or `<`. - if (code === null || code === 32 || code === 60 || asciiControl(code)) { - return nok(code) - } - effects.consume(code) - return urlInside - } - - /** - * In email atext. - * - * ```markdown - * > | ab - * ^ - * ``` - * - * @type {State} - */ - function emailAtext(code) { - if (code === 64) { - effects.consume(code) - return emailAtSignOrDot - } - if (asciiAtext(code)) { - effects.consume(code) - return emailAtext - } - return nok(code) - } - - /** - * In label, after at-sign or dot. - * - * ```markdown - * > | ab - * ^ ^ - * ``` - * - * @type {State} - */ - function emailAtSignOrDot(code) { - return asciiAlphanumeric(code) ? emailLabel(code) : nok(code) - } - - /** - * In label, where `.` and `>` are allowed. - * - * ```markdown - * > | ab - * ^ - * ``` - * - * @type {State} - */ - function emailLabel(code) { - if (code === 46) { - effects.consume(code) - size = 0 - return emailAtSignOrDot - } - if (code === 62) { - // Exit, then change the token type. - effects.exit('autolinkProtocol').type = 'autolinkEmail' - effects.enter('autolinkMarker') - effects.consume(code) - effects.exit('autolinkMarker') - effects.exit('autolink') - return ok - } - return emailValue(code) - } - - /** - * In label, where `.` and `>` are *not* allowed. - * - * Though, this is also used in `emailLabel` to parse other values. - * - * ```markdown - * > | ab - * ^ - * ``` - * - * @type {State} - */ - function emailValue(code) { - // ASCII alphanumeric or `-`. - if ((code === 45 || asciiAlphanumeric(code)) && size++ < 63) { - const next = code === 45 ? emailValue : emailLabel - effects.consume(code) - return next - } - return nok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/html-text.js -/** - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const htmlText = { - name: 'htmlText', - tokenize: tokenizeHtmlText -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeHtmlText(effects, ok, nok) { - const self = this - /** @type {NonNullable | undefined} */ - let marker - /** @type {number} */ - let index - /** @type {State} */ - let returnState - return start - - /** - * Start of HTML (text). - * - * ```markdown - * > | a c - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter('htmlText') - effects.enter('htmlTextData') - effects.consume(code) - return open - } - - /** - * After `<`, at tag name or other stuff. - * - * ```markdown - * > | a c - * ^ - * > | a c - * ^ - * > | a c - * ^ - * ``` - * - * @type {State} - */ - function open(code) { - if (code === 33) { - effects.consume(code) - return declarationOpen - } - if (code === 47) { - effects.consume(code) - return tagCloseStart - } - if (code === 63) { - effects.consume(code) - return instruction - } - - // ASCII alphabetical. - if (asciiAlpha(code)) { - effects.consume(code) - return tagOpen - } - return nok(code) - } - - /** - * After ` | a c - * ^ - * > | a c - * ^ - * > | a &<]]> c - * ^ - * ``` - * - * @type {State} - */ - function declarationOpen(code) { - if (code === 45) { - effects.consume(code) - return commentOpenInside - } - if (code === 91) { - effects.consume(code) - index = 0 - return cdataOpenInside - } - if (asciiAlpha(code)) { - effects.consume(code) - return declaration - } - return nok(code) - } - - /** - * In a comment, after ` | a c - * ^ - * ``` - * - * @type {State} - */ - function commentOpenInside(code) { - if (code === 45) { - effects.consume(code) - return commentEnd - } - return nok(code) - } - - /** - * In comment. - * - * ```markdown - * > | a c - * ^ - * ``` - * - * @type {State} - */ - function comment(code) { - if (code === null) { - return nok(code) - } - if (code === 45) { - effects.consume(code) - return commentClose - } - if (markdownLineEnding(code)) { - returnState = comment - return lineEndingBefore(code) - } - effects.consume(code) - return comment - } - - /** - * In comment, after `-`. - * - * ```markdown - * > | a c - * ^ - * ``` - * - * @type {State} - */ - function commentClose(code) { - if (code === 45) { - effects.consume(code) - return commentEnd - } - return comment(code) - } - - /** - * In comment, after `--`. - * - * ```markdown - * > | a c - * ^ - * ``` - * - * @type {State} - */ - function commentEnd(code) { - return code === 62 - ? end(code) - : code === 45 - ? commentClose(code) - : comment(code) - } - - /** - * After ` | a &<]]> b - * ^^^^^^ - * ``` - * - * @type {State} - */ - function cdataOpenInside(code) { - const value = 'CDATA[' - if (code === value.charCodeAt(index++)) { - effects.consume(code) - return index === value.length ? cdata : cdataOpenInside - } - return nok(code) - } - - /** - * In CDATA. - * - * ```markdown - * > | a &<]]> b - * ^^^ - * ``` - * - * @type {State} - */ - function cdata(code) { - if (code === null) { - return nok(code) - } - if (code === 93) { - effects.consume(code) - return cdataClose - } - if (markdownLineEnding(code)) { - returnState = cdata - return lineEndingBefore(code) - } - effects.consume(code) - return cdata - } - - /** - * In CDATA, after `]`, at another `]`. - * - * ```markdown - * > | a &<]]> b - * ^ - * ``` - * - * @type {State} - */ - function cdataClose(code) { - if (code === 93) { - effects.consume(code) - return cdataEnd - } - return cdata(code) - } - - /** - * In CDATA, after `]]`, at `>`. - * - * ```markdown - * > | a &<]]> b - * ^ - * ``` - * - * @type {State} - */ - function cdataEnd(code) { - if (code === 62) { - return end(code) - } - if (code === 93) { - effects.consume(code) - return cdataEnd - } - return cdata(code) - } - - /** - * In declaration. - * - * ```markdown - * > | a c - * ^ - * ``` - * - * @type {State} - */ - function declaration(code) { - if (code === null || code === 62) { - return end(code) - } - if (markdownLineEnding(code)) { - returnState = declaration - return lineEndingBefore(code) - } - effects.consume(code) - return declaration - } - - /** - * In instruction. - * - * ```markdown - * > | a c - * ^ - * ``` - * - * @type {State} - */ - function instruction(code) { - if (code === null) { - return nok(code) - } - if (code === 63) { - effects.consume(code) - return instructionClose - } - if (markdownLineEnding(code)) { - returnState = instruction - return lineEndingBefore(code) - } - effects.consume(code) - return instruction - } - - /** - * In instruction, after `?`, at `>`. - * - * ```markdown - * > | a c - * ^ - * ``` - * - * @type {State} - */ - function instructionClose(code) { - return code === 62 ? end(code) : instruction(code) - } - - /** - * After ` | a c - * ^ - * ``` - * - * @type {State} - */ - function tagCloseStart(code) { - // ASCII alphabetical. - if (asciiAlpha(code)) { - effects.consume(code) - return tagClose - } - return nok(code) - } - - /** - * After ` | a c - * ^ - * ``` - * - * @type {State} - */ - function tagClose(code) { - // ASCII alphanumerical and `-`. - if (code === 45 || asciiAlphanumeric(code)) { - effects.consume(code) - return tagClose - } - return tagCloseBetween(code) - } - - /** - * In closing tag, after tag name. - * - * ```markdown - * > | a
    c - * ^ - * ``` - * - * @type {State} - */ - function tagCloseBetween(code) { - if (markdownLineEnding(code)) { - returnState = tagCloseBetween - return lineEndingBefore(code) - } - if (markdownSpace(code)) { - effects.consume(code) - return tagCloseBetween - } - return end(code) - } - - /** - * After ` | a c - * ^ - * ``` - * - * @type {State} - */ - function tagOpen(code) { - // ASCII alphanumerical and `-`. - if (code === 45 || asciiAlphanumeric(code)) { - effects.consume(code) - return tagOpen - } - if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) { - return tagOpenBetween(code) - } - return nok(code) - } - - /** - * In opening tag, after tag name. - * - * ```markdown - * > | a c - * ^ - * ``` - * - * @type {State} - */ - function tagOpenBetween(code) { - if (code === 47) { - effects.consume(code) - return end - } - - // ASCII alphabetical and `:` and `_`. - if (code === 58 || code === 95 || asciiAlpha(code)) { - effects.consume(code) - return tagOpenAttributeName - } - if (markdownLineEnding(code)) { - returnState = tagOpenBetween - return lineEndingBefore(code) - } - if (markdownSpace(code)) { - effects.consume(code) - return tagOpenBetween - } - return end(code) - } - - /** - * In attribute name. - * - * ```markdown - * > | a d - * ^ - * ``` - * - * @type {State} - */ - function tagOpenAttributeName(code) { - // ASCII alphabetical and `-`, `.`, `:`, and `_`. - if ( - code === 45 || - code === 46 || - code === 58 || - code === 95 || - asciiAlphanumeric(code) - ) { - effects.consume(code) - return tagOpenAttributeName - } - return tagOpenAttributeNameAfter(code) - } - - /** - * After attribute name, before initializer, the end of the tag, or - * whitespace. - * - * ```markdown - * > | a d - * ^ - * ``` - * - * @type {State} - */ - function tagOpenAttributeNameAfter(code) { - if (code === 61) { - effects.consume(code) - return tagOpenAttributeValueBefore - } - if (markdownLineEnding(code)) { - returnState = tagOpenAttributeNameAfter - return lineEndingBefore(code) - } - if (markdownSpace(code)) { - effects.consume(code) - return tagOpenAttributeNameAfter - } - return tagOpenBetween(code) - } - - /** - * Before unquoted, double quoted, or single quoted attribute value, allowing - * whitespace. - * - * ```markdown - * > | a e - * ^ - * ``` - * - * @type {State} - */ - function tagOpenAttributeValueBefore(code) { - if ( - code === null || - code === 60 || - code === 61 || - code === 62 || - code === 96 - ) { - return nok(code) - } - if (code === 34 || code === 39) { - effects.consume(code) - marker = code - return tagOpenAttributeValueQuoted - } - if (markdownLineEnding(code)) { - returnState = tagOpenAttributeValueBefore - return lineEndingBefore(code) - } - if (markdownSpace(code)) { - effects.consume(code) - return tagOpenAttributeValueBefore - } - effects.consume(code) - return tagOpenAttributeValueUnquoted - } - - /** - * In double or single quoted attribute value. - * - * ```markdown - * > | a e - * ^ - * ``` - * - * @type {State} - */ - function tagOpenAttributeValueQuoted(code) { - if (code === marker) { - effects.consume(code) - marker = undefined - return tagOpenAttributeValueQuotedAfter - } - if (code === null) { - return nok(code) - } - if (markdownLineEnding(code)) { - returnState = tagOpenAttributeValueQuoted - return lineEndingBefore(code) - } - effects.consume(code) - return tagOpenAttributeValueQuoted - } - - /** - * In unquoted attribute value. - * - * ```markdown - * > | a e - * ^ - * ``` - * - * @type {State} - */ - function tagOpenAttributeValueUnquoted(code) { - if ( - code === null || - code === 34 || - code === 39 || - code === 60 || - code === 61 || - code === 96 - ) { - return nok(code) - } - if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) { - return tagOpenBetween(code) - } - effects.consume(code) - return tagOpenAttributeValueUnquoted - } - - /** - * After double or single quoted attribute value, before whitespace or the end - * of the tag. - * - * ```markdown - * > | a e - * ^ - * ``` - * - * @type {State} - */ - function tagOpenAttributeValueQuotedAfter(code) { - if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) { - return tagOpenBetween(code) - } - return nok(code) - } - - /** - * In certain circumstances of a tag where only an `>` is allowed. - * - * ```markdown - * > | a e - * ^ - * ``` - * - * @type {State} - */ - function end(code) { - if (code === 62) { - effects.consume(code) - effects.exit('htmlTextData') - effects.exit('htmlText') - return ok - } - return nok(code) - } - - /** - * At eol. - * - * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about - * > empty tokens. - * - * ```markdown - * > | a - * ``` - * - * @type {State} - */ - function lineEndingBefore(code) { - effects.exit('htmlTextData') - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return lineEndingAfter - } - - /** - * After eol, at optional whitespace. - * - * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about - * > empty tokens. - * - * ```markdown - * | a - * ^ - * ``` - * - * @type {State} - */ - function lineEndingAfter(code) { - // Always populated by defaults. - - return markdownSpace(code) - ? factorySpace( - effects, - lineEndingAfterPrefix, - 'linePrefix', - self.parser.constructs.disable.null.includes('codeIndented') - ? undefined - : 4 - )(code) - : lineEndingAfterPrefix(code) - } - - /** - * After eol, after optional whitespace. - * - * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about - * > empty tokens. - * - * ```markdown - * | a - * ^ - * ``` - * - * @type {State} - */ - function lineEndingAfterPrefix(code) { - effects.enter('htmlTextData') - return returnState(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/label-start-link.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const labelStartLink = { - name: 'labelStartLink', - tokenize: tokenizeLabelStartLink, - resolveAll: labelEnd.resolveAll -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeLabelStartLink(effects, ok, nok) { - const self = this - return start - - /** - * Start of label (link) start. - * - * ```markdown - * > | a [b] c - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter('labelLink') - effects.enter('labelMarker') - effects.consume(code) - effects.exit('labelMarker') - effects.exit('labelLink') - return after - } - - /** @type {State} */ - function after(code) { - // To do: this isn’t needed in `micromark-extension-gfm-footnote`, - // remove. - // Hidden footnotes hook. - /* c8 ignore next 3 */ - return code === 94 && '_hiddenFootnoteSupport' in self.parser.constructs - ? nok(code) - : ok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/hard-break-escape.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - -/** @type {Construct} */ -const hardBreakEscape = { - name: 'hardBreakEscape', - tokenize: tokenizeHardBreakEscape -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeHardBreakEscape(effects, ok, nok) { - return start - - /** - * Start of a hard break (escape). - * - * ```markdown - * > | a\ - * ^ - * | b - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter('hardBreakEscape') - effects.consume(code) - return after - } - - /** - * After `\`, at eol. - * - * ```markdown - * > | a\ - * ^ - * | b - * ``` - * - * @type {State} - */ - function after(code) { - if (markdownLineEnding(code)) { - effects.exit('hardBreakEscape') - return ok(code) - } - return nok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/code-text.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').Previous} Previous - * @typedef {import('micromark-util-types').Resolver} Resolver - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').Token} Token - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - -/** @type {Construct} */ -const codeText = { - name: 'codeText', - tokenize: tokenizeCodeText, - resolve: resolveCodeText, - previous -} - -// To do: next major: don’t resolve, like `markdown-rs`. -/** @type {Resolver} */ -function resolveCodeText(events) { - let tailExitIndex = events.length - 4 - let headEnterIndex = 3 - /** @type {number} */ - let index - /** @type {number | undefined} */ - let enter - - // If we start and end with an EOL or a space. - if ( - (events[headEnterIndex][1].type === 'lineEnding' || - events[headEnterIndex][1].type === 'space') && - (events[tailExitIndex][1].type === 'lineEnding' || - events[tailExitIndex][1].type === 'space') - ) { - index = headEnterIndex - - // And we have data. - while (++index < tailExitIndex) { - if (events[index][1].type === 'codeTextData') { - // Then we have padding. - events[headEnterIndex][1].type = 'codeTextPadding' - events[tailExitIndex][1].type = 'codeTextPadding' - headEnterIndex += 2 - tailExitIndex -= 2 - break - } - } - } - - // Merge adjacent spaces and data. - index = headEnterIndex - 1 - tailExitIndex++ - while (++index <= tailExitIndex) { - if (enter === undefined) { - if (index !== tailExitIndex && events[index][1].type !== 'lineEnding') { - enter = index - } - } else if ( - index === tailExitIndex || - events[index][1].type === 'lineEnding' - ) { - events[enter][1].type = 'codeTextData' - if (index !== enter + 2) { - events[enter][1].end = events[index - 1][1].end - events.splice(enter + 2, index - enter - 2) - tailExitIndex -= index - enter - 2 - index = enter + 2 - } - enter = undefined - } - } - return events -} - -/** - * @this {TokenizeContext} - * @type {Previous} - */ -function previous(code) { - // If there is a previous code, there will always be a tail. - return ( - code !== 96 || - this.events[this.events.length - 1][1].type === 'characterEscape' - ) -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeCodeText(effects, ok, nok) { - const self = this - let sizeOpen = 0 - /** @type {number} */ - let size - /** @type {Token} */ - let token - return start - - /** - * Start of code (text). - * - * ```markdown - * > | `a` - * ^ - * > | \`a` - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter('codeText') - effects.enter('codeTextSequence') - return sequenceOpen(code) - } - - /** - * In opening sequence. - * - * ```markdown - * > | `a` - * ^ - * ``` - * - * @type {State} - */ - function sequenceOpen(code) { - if (code === 96) { - effects.consume(code) - sizeOpen++ - return sequenceOpen - } - effects.exit('codeTextSequence') - return between(code) - } - - /** - * Between something and something else. - * - * ```markdown - * > | `a` - * ^^ - * ``` - * - * @type {State} - */ - function between(code) { - // EOF. - if (code === null) { - return nok(code) - } - - // To do: next major: don’t do spaces in resolve, but when compiling, - // like `markdown-rs`. - // Tabs don’t work, and virtual spaces don’t make sense. - if (code === 32) { - effects.enter('space') - effects.consume(code) - effects.exit('space') - return between - } - - // Closing fence? Could also be data. - if (code === 96) { - token = effects.enter('codeTextSequence') - size = 0 - return sequenceClose(code) - } - if (markdownLineEnding(code)) { - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return between - } - - // Data. - effects.enter('codeTextData') - return data(code) - } - - /** - * In data. - * - * ```markdown - * > | `a` - * ^ - * ``` - * - * @type {State} - */ - function data(code) { - if ( - code === null || - code === 32 || - code === 96 || - markdownLineEnding(code) - ) { - effects.exit('codeTextData') - return between(code) - } - effects.consume(code) - return data - } - - /** - * In closing sequence. - * - * ```markdown - * > | `a` - * ^ - * ``` - * - * @type {State} - */ - function sequenceClose(code) { - // More. - if (code === 96) { - effects.consume(code) - size++ - return sequenceClose - } - - // Done! - if (size === sizeOpen) { - effects.exit('codeTextSequence') - effects.exit('codeText') - return ok(code) - } - - // More or less accents: mark as data. - token.type = 'codeTextData' - return data(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/constructs.js -/** - * @typedef {import('micromark-util-types').Extension} Extension - */ - - - - -/** @satisfies {Extension['document']} */ -const constructs_document = { - [42]: list, - [43]: list, - [45]: list, - [48]: list, - [49]: list, - [50]: list, - [51]: list, - [52]: list, - [53]: list, - [54]: list, - [55]: list, - [56]: list, - [57]: list, - [62]: blockQuote -} - -/** @satisfies {Extension['contentInitial']} */ -const contentInitial = { - [91]: definition -} - -/** @satisfies {Extension['flowInitial']} */ -const flowInitial = { - [-2]: codeIndented, - [-1]: codeIndented, - [32]: codeIndented -} - -/** @satisfies {Extension['flow']} */ -const constructs_flow = { - [35]: headingAtx, - [42]: thematicBreak, - [45]: [setextUnderline, thematicBreak], - [60]: htmlFlow, - [61]: setextUnderline, - [95]: thematicBreak, - [96]: codeFenced, - [126]: codeFenced -} - -/** @satisfies {Extension['string']} */ -const constructs_string = { - [38]: characterReference, - [92]: characterEscape -} - -/** @satisfies {Extension['text']} */ -const constructs_text = { - [-5]: lineEnding, - [-4]: lineEnding, - [-3]: lineEnding, - [33]: labelStartImage, - [38]: characterReference, - [42]: attention, - [60]: [autolink, htmlText], - [91]: labelStartLink, - [92]: [hardBreakEscape, characterEscape], - [93]: labelEnd, - [95]: attention, - [96]: codeText -} - -/** @satisfies {Extension['insideSpan']} */ -const insideSpan = { - null: [attention, resolver] -} - -/** @satisfies {Extension['attentionMarkers']} */ -const attentionMarkers = { - null: [42, 95] -} - -/** @satisfies {Extension['disable']} */ -const disable = { - null: [] -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/parse.js -/** - * @typedef {import('micromark-util-types').Create} Create - * @typedef {import('micromark-util-types').FullNormalizedExtension} FullNormalizedExtension - * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct - * @typedef {import('micromark-util-types').ParseContext} ParseContext - * @typedef {import('micromark-util-types').ParseOptions} ParseOptions - */ - - - - - - - - - -/** - * @param {ParseOptions | null | undefined} [options] - * @returns {ParseContext} - */ -function parse(options) { - const settings = options || {} - const constructs = - /** @type {FullNormalizedExtension} */ - combineExtensions([constructs_namespaceObject, ...(settings.extensions || [])]) - - /** @type {ParseContext} */ - const parser = { - defined: [], - lazy: {}, - constructs, - content: create(content), - document: create(document_document), - flow: create(flow), - string: create(string), - text: create(text_text) - } - return parser - - /** - * @param {InitialConstruct} initial - */ - function create(initial) { - return creator - /** @type {Create} */ - function creator(from) { - return createTokenizer(parser, initial, from) - } - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/preprocess.js -/** - * @typedef {import('micromark-util-types').Chunk} Chunk - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Encoding} Encoding - * @typedef {import('micromark-util-types').Value} Value - */ - -/** - * @callback Preprocessor - * @param {Value} value - * @param {Encoding | null | undefined} [encoding] - * @param {boolean | null | undefined} [end=false] - * @returns {Array} - */ - -const search = /[\0\t\n\r]/g - -/** - * @returns {Preprocessor} - */ -function preprocess() { - let column = 1 - let buffer = '' - /** @type {boolean | undefined} */ - let start = true - /** @type {boolean | undefined} */ - let atCarriageReturn - return preprocessor - - /** @type {Preprocessor} */ - function preprocessor(value, encoding, end) { - /** @type {Array} */ - const chunks = [] - /** @type {RegExpMatchArray | null} */ - let match - /** @type {number} */ - let next - /** @type {number} */ - let startPosition - /** @type {number} */ - let endPosition - /** @type {Code} */ - let code - - // @ts-expect-error `Buffer` does allow an encoding. - value = buffer + value.toString(encoding) - startPosition = 0 - buffer = '' - if (start) { - // To do: `markdown-rs` actually parses BOMs (byte order mark). - if (value.charCodeAt(0) === 65279) { - startPosition++ - } - start = undefined - } - while (startPosition < value.length) { - search.lastIndex = startPosition - match = search.exec(value) - endPosition = - match && match.index !== undefined ? match.index : value.length - code = value.charCodeAt(endPosition) - if (!match) { - buffer = value.slice(startPosition) - break - } - if (code === 10 && startPosition === endPosition && atCarriageReturn) { - chunks.push(-3) - atCarriageReturn = undefined - } else { - if (atCarriageReturn) { - chunks.push(-5) - atCarriageReturn = undefined - } - if (startPosition < endPosition) { - chunks.push(value.slice(startPosition, endPosition)) - column += endPosition - startPosition - } - switch (code) { - case 0: { - chunks.push(65533) - column++ - break - } - case 9: { - next = Math.ceil(column / 4) * 4 - chunks.push(-2) - while (column++ < next) chunks.push(-1) - break - } - case 10: { - chunks.push(-4) - column = 1 - break - } - default: { - atCarriageReturn = true - column = 1 - } - } - } - startPosition = endPosition + 1 - } - if (end) { - if (atCarriageReturn) chunks.push(-5) - if (buffer) chunks.push(buffer) - chunks.push(null) - } - return chunks - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/postprocess.js -/** - * @typedef {import('micromark-util-types').Event} Event - */ - - - -/** - * @param {Array} events - * @returns {Array} - */ -function postprocess(events) { - while (!subtokenize(events)) { - // Empty - } - return events -} - -;// CONCATENATED MODULE: ./node_modules/micromark-util-decode-numeric-character-reference/index.js -/** - * Turn the number (in string form as either hexa- or plain decimal) coming from - * a numeric character reference into a character. - * - * Sort of like `String.fromCharCode(Number.parseInt(value, base))`, but makes - * non-characters and control characters safe. - * - * @param {string} value - * Value to decode. - * @param {number} base - * Numeric base. - * @returns {string} - * Character. - */ -function decodeNumericCharacterReference(value, base) { - const code = Number.parseInt(value, base) - if ( - // C0 except for HT, LF, FF, CR, space. - code < 9 || - code === 11 || - (code > 13 && code < 32) || - // Control character (DEL) of C0, and C1 controls. - (code > 126 && code < 160) || - // Lone high surrogates and low surrogates. - (code > 55295 && code < 57344) || - // Noncharacters. - (code > 64975 && code < 65008) /* eslint-disable no-bitwise */ || - (code & 65535) === 65535 || - (code & 65535) === 65534 /* eslint-enable no-bitwise */ || - // Out of range - code > 1114111 - ) { - return '\uFFFD' - } - return String.fromCharCode(code) -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-decode-string/index.js - - -const characterEscapeOrReference = - /\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi - -/** - * Decode markdown strings (which occur in places such as fenced code info - * strings, destinations, labels, and titles). - * - * The “string” content type allows character escapes and -references. - * This decodes those. - * - * @param {string} value - * Value to decode. - * @returns {string} - * Decoded value. - */ -function decodeString(value) { - return value.replace(characterEscapeOrReference, decode) -} - -/** - * @param {string} $0 - * @param {string} $1 - * @param {string} $2 - * @returns {string} - */ -function decode($0, $1, $2) { - if ($1) { - // Escape. - return $1 - } - - // Reference. - const head = $2.charCodeAt(0) - if (head === 35) { - const head = $2.charCodeAt(1) - const hex = head === 120 || head === 88 - return decodeNumericCharacterReference($2.slice(hex ? 2 : 1), hex ? 16 : 10) - } - return decodeNamedCharacterReference($2) || $0 -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/unist-util-stringify-position/lib/index.js -/** - * @typedef {import('unist').Node} Node - * @typedef {import('unist').Point} Point - * @typedef {import('unist').Position} Position - */ - -/** - * @typedef NodeLike - * @property {string} type - * @property {PositionLike | null | undefined} [position] - * - * @typedef PositionLike - * @property {PointLike | null | undefined} [start] - * @property {PointLike | null | undefined} [end] - * - * @typedef PointLike - * @property {number | null | undefined} [line] - * @property {number | null | undefined} [column] - * @property {number | null | undefined} [offset] - */ - -/** - * Serialize the positional info of a point, position (start and end points), - * or node. - * - * @param {Node | NodeLike | Position | PositionLike | Point | PointLike | null | undefined} [value] - * Node, position, or point. - * @returns {string} - * Pretty printed positional info of a node (`string`). - * - * In the format of a range `ls:cs-le:ce` (when given `node` or `position`) - * or a point `l:c` (when given `point`), where `l` stands for line, `c` for - * column, `s` for `start`, and `e` for end. - * An empty string (`''`) is returned if the given value is neither `node`, - * `position`, nor `point`. - */ -function stringifyPosition(value) { - // Nothing. - if (!value || typeof value !== 'object') { - return '' - } - - // Node. - if ('position' in value || 'type' in value) { - return position(value.position) - } - - // Position. - if ('start' in value || 'end' in value) { - return position(value) - } - - // Point. - if ('line' in value || 'column' in value) { - return point(value) - } - - // ? - return '' -} - -/** - * @param {Point | PointLike | null | undefined} point - * @returns {string} - */ -function point(point) { - return index(point && point.line) + ':' + index(point && point.column) -} - -/** - * @param {Position | PositionLike | null | undefined} pos - * @returns {string} - */ -function position(pos) { - return point(pos && pos.start) + '-' + point(pos && pos.end) -} - -/** - * @param {number | null | undefined} value - * @returns {number} - */ -function index(value) { - return value && typeof value === 'number' ? value : 1 -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/mdast-util-from-markdown/lib/index.js -/** - * @typedef {import('micromark-util-types').Encoding} Encoding - * @typedef {import('micromark-util-types').Event} Event - * @typedef {import('micromark-util-types').ParseOptions} ParseOptions - * @typedef {import('micromark-util-types').Token} Token - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Value} Value - * - * @typedef {import('unist').Parent} UnistParent - * @typedef {import('unist').Point} Point - * - * @typedef {import('mdast').PhrasingContent} PhrasingContent - * @typedef {import('mdast').StaticPhrasingContent} StaticPhrasingContent - * @typedef {import('mdast').Content} Content - * @typedef {import('mdast').Break} Break - * @typedef {import('mdast').Blockquote} Blockquote - * @typedef {import('mdast').Code} Code - * @typedef {import('mdast').Definition} Definition - * @typedef {import('mdast').Emphasis} Emphasis - * @typedef {import('mdast').Heading} Heading - * @typedef {import('mdast').HTML} HTML - * @typedef {import('mdast').Image} Image - * @typedef {import('mdast').ImageReference} ImageReference - * @typedef {import('mdast').InlineCode} InlineCode - * @typedef {import('mdast').Link} Link - * @typedef {import('mdast').LinkReference} LinkReference - * @typedef {import('mdast').List} List - * @typedef {import('mdast').ListItem} ListItem - * @typedef {import('mdast').Paragraph} Paragraph - * @typedef {import('mdast').Root} Root - * @typedef {import('mdast').Strong} Strong - * @typedef {import('mdast').Text} Text - * @typedef {import('mdast').ThematicBreak} ThematicBreak - * @typedef {import('mdast').ReferenceType} ReferenceType - * @typedef {import('../index.js').CompileData} CompileData - */ - -/** - * @typedef {Root | Content} Node - * @typedef {Extract} Parent - * - * @typedef {Omit & {type: 'fragment', children: Array}} Fragment - */ - -/** - * @callback Transform - * Extra transform, to change the AST afterwards. - * @param {Root} tree - * Tree to transform. - * @returns {Root | undefined | null | void} - * New tree or nothing (in which case the current tree is used). - * - * @callback Handle - * Handle a token. - * @param {CompileContext} this - * Context. - * @param {Token} token - * Current token. - * @returns {void} - * Nothing. - * - * @typedef {Record} Handles - * Token types mapping to handles - * - * @callback OnEnterError - * Handle the case where the `right` token is open, but it is closed (by the - * `left` token) or because we reached the end of the document. - * @param {Omit} this - * Context. - * @param {Token | undefined} left - * Left token. - * @param {Token} right - * Right token. - * @returns {void} - * Nothing. - * - * @callback OnExitError - * Handle the case where the `right` token is open but it is closed by - * exiting the `left` token. - * @param {Omit} this - * Context. - * @param {Token} left - * Left token. - * @param {Token} right - * Right token. - * @returns {void} - * Nothing. - * - * @typedef {[Token, OnEnterError | undefined]} TokenTuple - * Open token on the stack, with an optional error handler for when - * that token isn’t closed properly. - */ - -/** - * @typedef Config - * Configuration. - * - * We have our defaults, but extensions will add more. - * @property {Array} canContainEols - * Token types where line endings are used. - * @property {Handles} enter - * Opening handles. - * @property {Handles} exit - * Closing handles. - * @property {Array} transforms - * Tree transforms. - * - * @typedef {Partial} Extension - * Change how markdown tokens from micromark are turned into mdast. - * - * @typedef CompileContext - * mdast compiler context. - * @property {Array} stack - * Stack of nodes. - * @property {Array} tokenStack - * Stack of tokens. - * @property {(key: Key) => CompileData[Key]} getData - * Get data from the key/value store. - * @property {(key: Key, value?: CompileData[Key]) => void} setData - * Set data into the key/value store. - * @property {(this: CompileContext) => void} buffer - * Capture some of the output data. - * @property {(this: CompileContext) => string} resume - * Stop capturing and access the output data. - * @property {(this: CompileContext, node: Kind, token: Token, onError?: OnEnterError) => Kind} enter - * Enter a token. - * @property {(this: CompileContext, token: Token, onError?: OnExitError) => Node} exit - * Exit a token. - * @property {TokenizeContext['sliceSerialize']} sliceSerialize - * Get the string value of a token. - * @property {Config} config - * Configuration. - * - * @typedef FromMarkdownOptions - * Configuration for how to build mdast. - * @property {Array> | null | undefined} [mdastExtensions] - * Extensions for this utility to change how tokens are turned into a tree. - * - * @typedef {ParseOptions & FromMarkdownOptions} Options - * Configuration. - */ - -// To do: micromark: create a registry of tokens? -// To do: next major: don’t return given `Node` from `enter`. -// To do: next major: remove setter/getter. - - - - - - - - - - -const lib_own = {}.hasOwnProperty - -/** - * @param value - * Markdown to parse. - * @param encoding - * Character encoding for when `value` is `Buffer`. - * @param options - * Configuration. - * @returns - * mdast tree. - */ -const fromMarkdown = - /** - * @type {( - * ((value: Value, encoding: Encoding, options?: Options | null | undefined) => Root) & - * ((value: Value, options?: Options | null | undefined) => Root) - * )} - */ - - /** - * @param {Value} value - * @param {Encoding | Options | null | undefined} [encoding] - * @param {Options | null | undefined} [options] - * @returns {Root} - */ - function (value, encoding, options) { - if (typeof encoding !== 'string') { - options = encoding - encoding = undefined - } - return compiler(options)( - postprocess( - parse(options).document().write(preprocess()(value, encoding, true)) - ) - ) - } - -/** - * Note this compiler only understand complete buffering, not streaming. - * - * @param {Options | null | undefined} [options] - */ -function compiler(options) { - /** @type {Config} */ - const config = { - transforms: [], - canContainEols: ['emphasis', 'fragment', 'heading', 'paragraph', 'strong'], - enter: { - autolink: opener(link), - autolinkProtocol: onenterdata, - autolinkEmail: onenterdata, - atxHeading: opener(heading), - blockQuote: opener(blockQuote), - characterEscape: onenterdata, - characterReference: onenterdata, - codeFenced: opener(codeFlow), - codeFencedFenceInfo: buffer, - codeFencedFenceMeta: buffer, - codeIndented: opener(codeFlow, buffer), - codeText: opener(codeText, buffer), - codeTextData: onenterdata, - data: onenterdata, - codeFlowValue: onenterdata, - definition: opener(definition), - definitionDestinationString: buffer, - definitionLabelString: buffer, - definitionTitleString: buffer, - emphasis: opener(emphasis), - hardBreakEscape: opener(hardBreak), - hardBreakTrailing: opener(hardBreak), - htmlFlow: opener(html, buffer), - htmlFlowData: onenterdata, - htmlText: opener(html, buffer), - htmlTextData: onenterdata, - image: opener(image), - label: buffer, - link: opener(link), - listItem: opener(listItem), - listItemValue: onenterlistitemvalue, - listOrdered: opener(list, onenterlistordered), - listUnordered: opener(list), - paragraph: opener(paragraph), - reference: onenterreference, - referenceString: buffer, - resourceDestinationString: buffer, - resourceTitleString: buffer, - setextHeading: opener(heading), - strong: opener(strong), - thematicBreak: opener(thematicBreak) - }, - exit: { - atxHeading: closer(), - atxHeadingSequence: onexitatxheadingsequence, - autolink: closer(), - autolinkEmail: onexitautolinkemail, - autolinkProtocol: onexitautolinkprotocol, - blockQuote: closer(), - characterEscapeValue: onexitdata, - characterReferenceMarkerHexadecimal: onexitcharacterreferencemarker, - characterReferenceMarkerNumeric: onexitcharacterreferencemarker, - characterReferenceValue: onexitcharacterreferencevalue, - codeFenced: closer(onexitcodefenced), - codeFencedFence: onexitcodefencedfence, - codeFencedFenceInfo: onexitcodefencedfenceinfo, - codeFencedFenceMeta: onexitcodefencedfencemeta, - codeFlowValue: onexitdata, - codeIndented: closer(onexitcodeindented), - codeText: closer(onexitcodetext), - codeTextData: onexitdata, - data: onexitdata, - definition: closer(), - definitionDestinationString: onexitdefinitiondestinationstring, - definitionLabelString: onexitdefinitionlabelstring, - definitionTitleString: onexitdefinitiontitlestring, - emphasis: closer(), - hardBreakEscape: closer(onexithardbreak), - hardBreakTrailing: closer(onexithardbreak), - htmlFlow: closer(onexithtmlflow), - htmlFlowData: onexitdata, - htmlText: closer(onexithtmltext), - htmlTextData: onexitdata, - image: closer(onexitimage), - label: onexitlabel, - labelText: onexitlabeltext, - lineEnding: onexitlineending, - link: closer(onexitlink), - listItem: closer(), - listOrdered: closer(), - listUnordered: closer(), - paragraph: closer(), - referenceString: onexitreferencestring, - resourceDestinationString: onexitresourcedestinationstring, - resourceTitleString: onexitresourcetitlestring, - resource: onexitresource, - setextHeading: closer(onexitsetextheading), - setextHeadingLineSequence: onexitsetextheadinglinesequence, - setextHeadingText: onexitsetextheadingtext, - strong: closer(), - thematicBreak: closer() - } - } - configure(config, (options || {}).mdastExtensions || []) - - /** @type {CompileData} */ - const data = {} - return compile - - /** - * Turn micromark events into an mdast tree. - * - * @param {Array} events - * Events. - * @returns {Root} - * mdast tree. - */ - function compile(events) { - /** @type {Root} */ - let tree = { - type: 'root', - children: [] - } - /** @type {Omit} */ - const context = { - stack: [tree], - tokenStack: [], - config, - enter, - exit, - buffer, - resume, - setData, - getData - } - /** @type {Array} */ - const listStack = [] - let index = -1 - while (++index < events.length) { - // We preprocess lists to add `listItem` tokens, and to infer whether - // items the list itself are spread out. - if ( - events[index][1].type === 'listOrdered' || - events[index][1].type === 'listUnordered' - ) { - if (events[index][0] === 'enter') { - listStack.push(index) - } else { - const tail = listStack.pop() - index = prepareList(events, tail, index) - } - } - } - index = -1 - while (++index < events.length) { - const handler = config[events[index][0]] - if (lib_own.call(handler, events[index][1].type)) { - handler[events[index][1].type].call( - Object.assign( - { - sliceSerialize: events[index][2].sliceSerialize - }, - context - ), - events[index][1] - ) - } - } - - // Handle tokens still being open. - if (context.tokenStack.length > 0) { - const tail = context.tokenStack[context.tokenStack.length - 1] - const handler = tail[1] || defaultOnError - handler.call(context, undefined, tail[0]) - } - - // Figure out `root` position. - tree.position = { - start: lib_point( - events.length > 0 - ? events[0][1].start - : { - line: 1, - column: 1, - offset: 0 - } - ), - end: lib_point( - events.length > 0 - ? events[events.length - 2][1].end - : { - line: 1, - column: 1, - offset: 0 - } - ) - } - - // Call transforms. - index = -1 - while (++index < config.transforms.length) { - tree = config.transforms[index](tree) || tree - } - return tree - } - - /** - * @param {Array} events - * @param {number} start - * @param {number} length - * @returns {number} - */ - function prepareList(events, start, length) { - let index = start - 1 - let containerBalance = -1 - let listSpread = false - /** @type {Token | undefined} */ - let listItem - /** @type {number | undefined} */ - let lineIndex - /** @type {number | undefined} */ - let firstBlankLineIndex - /** @type {boolean | undefined} */ - let atMarker - while (++index <= length) { - const event = events[index] - if ( - event[1].type === 'listUnordered' || - event[1].type === 'listOrdered' || - event[1].type === 'blockQuote' - ) { - if (event[0] === 'enter') { - containerBalance++ - } else { - containerBalance-- - } - atMarker = undefined - } else if (event[1].type === 'lineEndingBlank') { - if (event[0] === 'enter') { - if ( - listItem && - !atMarker && - !containerBalance && - !firstBlankLineIndex - ) { - firstBlankLineIndex = index - } - atMarker = undefined - } - } else if ( - event[1].type === 'linePrefix' || - event[1].type === 'listItemValue' || - event[1].type === 'listItemMarker' || - event[1].type === 'listItemPrefix' || - event[1].type === 'listItemPrefixWhitespace' - ) { - // Empty. - } else { - atMarker = undefined - } - if ( - (!containerBalance && - event[0] === 'enter' && - event[1].type === 'listItemPrefix') || - (containerBalance === -1 && - event[0] === 'exit' && - (event[1].type === 'listUnordered' || - event[1].type === 'listOrdered')) - ) { - if (listItem) { - let tailIndex = index - lineIndex = undefined - while (tailIndex--) { - const tailEvent = events[tailIndex] - if ( - tailEvent[1].type === 'lineEnding' || - tailEvent[1].type === 'lineEndingBlank' - ) { - if (tailEvent[0] === 'exit') continue - if (lineIndex) { - events[lineIndex][1].type = 'lineEndingBlank' - listSpread = true - } - tailEvent[1].type = 'lineEnding' - lineIndex = tailIndex - } else if ( - tailEvent[1].type === 'linePrefix' || - tailEvent[1].type === 'blockQuotePrefix' || - tailEvent[1].type === 'blockQuotePrefixWhitespace' || - tailEvent[1].type === 'blockQuoteMarker' || - tailEvent[1].type === 'listItemIndent' - ) { - // Empty - } else { - break - } - } - if ( - firstBlankLineIndex && - (!lineIndex || firstBlankLineIndex < lineIndex) - ) { - listItem._spread = true - } - - // Fix position. - listItem.end = Object.assign( - {}, - lineIndex ? events[lineIndex][1].start : event[1].end - ) - events.splice(lineIndex || index, 0, ['exit', listItem, event[2]]) - index++ - length++ - } - - // Create a new list item. - if (event[1].type === 'listItemPrefix') { - listItem = { - type: 'listItem', - _spread: false, - start: Object.assign({}, event[1].start), - // @ts-expect-error: we’ll add `end` in a second. - end: undefined - } - // @ts-expect-error: `listItem` is most definitely defined, TS... - events.splice(index, 0, ['enter', listItem, event[2]]) - index++ - length++ - firstBlankLineIndex = undefined - atMarker = true - } - } - } - events[start][1]._spread = listSpread - return length - } - - /** - * Set data. - * - * @template {keyof CompileData} Key - * Field type. - * @param {Key} key - * Key of field. - * @param {CompileData[Key]} [value] - * New value. - * @returns {void} - * Nothing. - */ - function setData(key, value) { - data[key] = value - } - - /** - * Get data. - * - * @template {keyof CompileData} Key - * Field type. - * @param {Key} key - * Key of field. - * @returns {CompileData[Key]} - * Value. - */ - function getData(key) { - return data[key] - } - - /** - * Create an opener handle. - * - * @param {(token: Token) => Node} create - * Create a node. - * @param {Handle} [and] - * Optional function to also run. - * @returns {Handle} - * Handle. - */ - function opener(create, and) { - return open - - /** - * @this {CompileContext} - * @param {Token} token - * @returns {void} - */ - function open(token) { - enter.call(this, create(token), token) - if (and) and.call(this, token) - } - } - - /** - * @this {CompileContext} - * @returns {void} - */ - function buffer() { - this.stack.push({ - type: 'fragment', - children: [] - }) - } - - /** - * @template {Node} Kind - * Node type. - * @this {CompileContext} - * Context. - * @param {Kind} node - * Node to enter. - * @param {Token} token - * Corresponding token. - * @param {OnEnterError | undefined} [errorHandler] - * Handle the case where this token is open, but it is closed by something else. - * @returns {Kind} - * The given node. - */ - function enter(node, token, errorHandler) { - const parent = this.stack[this.stack.length - 1] - // @ts-expect-error: Assume `Node` can exist as a child of `parent`. - parent.children.push(node) - this.stack.push(node) - this.tokenStack.push([token, errorHandler]) - // @ts-expect-error: `end` will be patched later. - node.position = { - start: lib_point(token.start) - } - return node - } - - /** - * Create a closer handle. - * - * @param {Handle} [and] - * Optional function to also run. - * @returns {Handle} - * Handle. - */ - function closer(and) { - return close - - /** - * @this {CompileContext} - * @param {Token} token - * @returns {void} - */ - function close(token) { - if (and) and.call(this, token) - exit.call(this, token) - } - } - - /** - * @this {CompileContext} - * Context. - * @param {Token} token - * Corresponding token. - * @param {OnExitError | undefined} [onExitError] - * Handle the case where another token is open. - * @returns {Node} - * The closed node. - */ - function exit(token, onExitError) { - const node = this.stack.pop() - const open = this.tokenStack.pop() - if (!open) { - throw new Error( - 'Cannot close `' + - token.type + - '` (' + - stringifyPosition({ - start: token.start, - end: token.end - }) + - '): it’s not open' - ) - } else if (open[0].type !== token.type) { - if (onExitError) { - onExitError.call(this, token, open[0]) - } else { - const handler = open[1] || defaultOnError - handler.call(this, token, open[0]) - } - } - node.position.end = lib_point(token.end) - return node - } - - /** - * @this {CompileContext} - * @returns {string} - */ - function resume() { - return lib_toString(this.stack.pop()) - } - - // - // Handlers. - // - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onenterlistordered() { - setData('expectingFirstListItemValue', true) - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onenterlistitemvalue(token) { - if (getData('expectingFirstListItemValue')) { - const ancestor = this.stack[this.stack.length - 2] - ancestor.start = Number.parseInt(this.sliceSerialize(token), 10) - setData('expectingFirstListItemValue') - } - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitcodefencedfenceinfo() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.lang = data - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitcodefencedfencemeta() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.meta = data - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitcodefencedfence() { - // Exit if this is the closing fence. - if (getData('flowCodeInside')) return - this.buffer() - setData('flowCodeInside', true) - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitcodefenced() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.value = data.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g, '') - setData('flowCodeInside') - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitcodeindented() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.value = data.replace(/(\r?\n|\r)$/g, '') - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitdefinitionlabelstring(token) { - const label = this.resume() - const node = this.stack[this.stack.length - 1] - node.label = label - node.identifier = normalizeIdentifier( - this.sliceSerialize(token) - ).toLowerCase() - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitdefinitiontitlestring() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.title = data - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitdefinitiondestinationstring() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.url = data - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitatxheadingsequence(token) { - const node = this.stack[this.stack.length - 1] - if (!node.depth) { - const depth = this.sliceSerialize(token).length - node.depth = depth - } - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitsetextheadingtext() { - setData('setextHeadingSlurpLineEnding', true) - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitsetextheadinglinesequence(token) { - const node = this.stack[this.stack.length - 1] - node.depth = this.sliceSerialize(token).charCodeAt(0) === 61 ? 1 : 2 - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitsetextheading() { - setData('setextHeadingSlurpLineEnding') - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onenterdata(token) { - const node = this.stack[this.stack.length - 1] - let tail = node.children[node.children.length - 1] - if (!tail || tail.type !== 'text') { - // Add a new text node. - tail = text() - // @ts-expect-error: we’ll add `end` later. - tail.position = { - start: lib_point(token.start) - } - // @ts-expect-error: Assume `parent` accepts `text`. - node.children.push(tail) - } - this.stack.push(tail) - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitdata(token) { - const tail = this.stack.pop() - tail.value += this.sliceSerialize(token) - tail.position.end = lib_point(token.end) - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitlineending(token) { - const context = this.stack[this.stack.length - 1] - // If we’re at a hard break, include the line ending in there. - if (getData('atHardBreak')) { - const tail = context.children[context.children.length - 1] - tail.position.end = lib_point(token.end) - setData('atHardBreak') - return - } - if ( - !getData('setextHeadingSlurpLineEnding') && - config.canContainEols.includes(context.type) - ) { - onenterdata.call(this, token) - onexitdata.call(this, token) - } - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexithardbreak() { - setData('atHardBreak', true) - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexithtmlflow() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.value = data - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexithtmltext() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.value = data - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitcodetext() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.value = data - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitlink() { - const node = this.stack[this.stack.length - 1] - // Note: there are also `identifier` and `label` fields on this link node! - // These are used / cleaned here. - // To do: clean. - if (getData('inReference')) { - /** @type {ReferenceType} */ - const referenceType = getData('referenceType') || 'shortcut' - node.type += 'Reference' - // @ts-expect-error: mutate. - node.referenceType = referenceType - // @ts-expect-error: mutate. - delete node.url - delete node.title - } else { - // @ts-expect-error: mutate. - delete node.identifier - // @ts-expect-error: mutate. - delete node.label - } - setData('referenceType') - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitimage() { - const node = this.stack[this.stack.length - 1] - // Note: there are also `identifier` and `label` fields on this link node! - // These are used / cleaned here. - // To do: clean. - if (getData('inReference')) { - /** @type {ReferenceType} */ - const referenceType = getData('referenceType') || 'shortcut' - node.type += 'Reference' - // @ts-expect-error: mutate. - node.referenceType = referenceType - // @ts-expect-error: mutate. - delete node.url - delete node.title - } else { - // @ts-expect-error: mutate. - delete node.identifier - // @ts-expect-error: mutate. - delete node.label - } - setData('referenceType') - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitlabeltext(token) { - const string = this.sliceSerialize(token) - const ancestor = this.stack[this.stack.length - 2] - // @ts-expect-error: stash this on the node, as it might become a reference - // later. - ancestor.label = decodeString(string) - // @ts-expect-error: same as above. - ancestor.identifier = normalizeIdentifier(string).toLowerCase() - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitlabel() { - const fragment = this.stack[this.stack.length - 1] - const value = this.resume() - const node = this.stack[this.stack.length - 1] - // Assume a reference. - setData('inReference', true) - if (node.type === 'link') { - /** @type {Array} */ - // @ts-expect-error: Assume static phrasing content. - const children = fragment.children - node.children = children - } else { - node.alt = value - } - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitresourcedestinationstring() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.url = data - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitresourcetitlestring() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.title = data - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitresource() { - setData('inReference') - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onenterreference() { - setData('referenceType', 'collapsed') - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitreferencestring(token) { - const label = this.resume() - const node = this.stack[this.stack.length - 1] - // @ts-expect-error: stash this on the node, as it might become a reference - // later. - node.label = label - // @ts-expect-error: same as above. - node.identifier = normalizeIdentifier( - this.sliceSerialize(token) - ).toLowerCase() - setData('referenceType', 'full') - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitcharacterreferencemarker(token) { - setData('characterReferenceType', token.type) - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitcharacterreferencevalue(token) { - const data = this.sliceSerialize(token) - const type = getData('characterReferenceType') - /** @type {string} */ - let value - if (type) { - value = decodeNumericCharacterReference( - data, - type === 'characterReferenceMarkerNumeric' ? 10 : 16 - ) - setData('characterReferenceType') - } else { - const result = decodeNamedCharacterReference(data) - value = result - } - const tail = this.stack.pop() - tail.value += value - tail.position.end = lib_point(token.end) - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitautolinkprotocol(token) { - onexitdata.call(this, token) - const node = this.stack[this.stack.length - 1] - node.url = this.sliceSerialize(token) - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitautolinkemail(token) { - onexitdata.call(this, token) - const node = this.stack[this.stack.length - 1] - node.url = 'mailto:' + this.sliceSerialize(token) - } - - // - // Creaters. - // - - /** @returns {Blockquote} */ - function blockQuote() { - return { - type: 'blockquote', - children: [] - } - } - - /** @returns {Code} */ - function codeFlow() { - return { - type: 'code', - lang: null, - meta: null, - value: '' - } - } - - /** @returns {InlineCode} */ - function codeText() { - return { - type: 'inlineCode', - value: '' - } - } - - /** @returns {Definition} */ - function definition() { - return { - type: 'definition', - identifier: '', - label: null, - title: null, - url: '' - } - } - - /** @returns {Emphasis} */ - function emphasis() { - return { - type: 'emphasis', - children: [] - } - } - - /** @returns {Heading} */ - function heading() { - // @ts-expect-error `depth` will be set later. - return { - type: 'heading', - depth: undefined, - children: [] - } - } - - /** @returns {Break} */ - function hardBreak() { - return { - type: 'break' - } - } - - /** @returns {HTML} */ - function html() { - return { - type: 'html', - value: '' - } - } - - /** @returns {Image} */ - function image() { - return { - type: 'image', - title: null, - url: '', - alt: null - } - } - - /** @returns {Link} */ - function link() { - return { - type: 'link', - title: null, - url: '', - children: [] - } - } - - /** - * @param {Token} token - * @returns {List} - */ - function list(token) { - return { - type: 'list', - ordered: token.type === 'listOrdered', - start: null, - spread: token._spread, - children: [] - } - } - - /** - * @param {Token} token - * @returns {ListItem} - */ - function listItem(token) { - return { - type: 'listItem', - spread: token._spread, - checked: null, - children: [] - } - } - - /** @returns {Paragraph} */ - function paragraph() { - return { - type: 'paragraph', - children: [] - } - } - - /** @returns {Strong} */ - function strong() { - return { - type: 'strong', - children: [] - } - } - - /** @returns {Text} */ - function text() { - return { - type: 'text', - value: '' - } - } - - /** @returns {ThematicBreak} */ - function thematicBreak() { - return { - type: 'thematicBreak' - } - } -} - -/** - * Copy a point-like value. - * - * @param {Point} d - * Point-like value. - * @returns {Point} - * unist point. - */ -function lib_point(d) { - return { - line: d.line, - column: d.column, - offset: d.offset - } -} - -/** - * @param {Config} combined - * @param {Array>} extensions - * @returns {void} - */ -function configure(combined, extensions) { - let index = -1 - while (++index < extensions.length) { - const value = extensions[index] - if (Array.isArray(value)) { - configure(combined, value) - } else { - extension(combined, value) - } - } -} - -/** - * @param {Config} combined - * @param {Extension} extension - * @returns {void} - */ -function extension(combined, extension) { - /** @type {keyof Extension} */ - let key - for (key in extension) { - if (lib_own.call(extension, key)) { - if (key === 'canContainEols') { - const right = extension[key] - if (right) { - combined[key].push(...right) - } - } else if (key === 'transforms') { - const right = extension[key] - if (right) { - combined[key].push(...right) - } - } else if (key === 'enter' || key === 'exit') { - const right = extension[key] - if (right) { - Object.assign(combined[key], right) - } - } - } - } -} - -/** @type {OnEnterError} */ -function defaultOnError(left, right) { - if (left) { - throw new Error( - 'Cannot close `' + - left.type + - '` (' + - stringifyPosition({ - start: left.start, - end: left.end - }) + - '): a different token (`' + - right.type + - '`, ' + - stringifyPosition({ - start: right.start, - end: right.end - }) + - ') is open' - ) - } else { - throw new Error( - 'Cannot close document, a token (`' + - right.type + - '`, ' + - stringifyPosition({ - start: right.start, - end: right.end - }) + - ') is still open' - ) - } -} - -// EXTERNAL MODULE: ./node_modules/ts-dedent/esm/index.js -var esm = __webpack_require__(60513); -;// CONCATENATED MODULE: ./node_modules/mermaid/dist/createText-2e5e7dd3.js - - - -function preprocessMarkdown(markdown) { - const withoutMultipleNewlines = markdown.replace(/\n{2,}/g, "\n"); - const withoutExtraSpaces = (0,esm/* dedent */.T)(withoutMultipleNewlines); - return withoutExtraSpaces; -} -function markdownToLines(markdown) { - const preprocessedMarkdown = preprocessMarkdown(markdown); - const { children } = fromMarkdown(preprocessedMarkdown); - const lines = [[]]; - let currentLine = 0; - function processNode(node, parentType = "normal") { - if (node.type === "text") { - const textLines = node.value.split("\n"); - textLines.forEach((textLine, index) => { - if (index !== 0) { - currentLine++; - lines.push([]); - } - textLine.split(" ").forEach((word) => { - if (word) { - lines[currentLine].push({ content: word, type: parentType }); - } - }); - }); - } else if (node.type === "strong" || node.type === "emphasis") { - node.children.forEach((contentNode) => { - processNode(contentNode, node.type); - }); - } - } - children.forEach((treeNode) => { - if (treeNode.type === "paragraph") { - treeNode.children.forEach((contentNode) => { - processNode(contentNode); - }); - } - }); - return lines; -} -function markdownToHTML(markdown) { - const { children } = fromMarkdown(markdown); - function output(node) { - if (node.type === "text") { - return node.value.replace(/\n/g, "
    "); - } else if (node.type === "strong") { - return `${node.children.map(output).join("")}`; - } else if (node.type === "emphasis") { - return `${node.children.map(output).join("")}`; - } else if (node.type === "paragraph") { - return `

    ${node.children.map(output).join("")}

    `; - } - return `Unsupported markdown: ${node.type}`; - } - return children.map(output).join(""); -} -function splitTextToChars(text) { - if (Intl.Segmenter) { - return [...new Intl.Segmenter().segment(text)].map((s) => s.segment); - } - return [...text]; -} -function splitWordToFitWidth(checkFit, word) { - const characters = splitTextToChars(word.content); - return splitWordToFitWidthRecursion(checkFit, [], characters, word.type); -} -function splitWordToFitWidthRecursion(checkFit, usedChars, remainingChars, type) { - if (remainingChars.length === 0) { - return [ - { content: usedChars.join(""), type }, - { content: "", type } - ]; - } - const [nextChar, ...rest] = remainingChars; - const newWord = [...usedChars, nextChar]; - if (checkFit([{ content: newWord.join(""), type }])) { - return splitWordToFitWidthRecursion(checkFit, newWord, rest, type); - } - if (usedChars.length === 0 && nextChar) { - usedChars.push(nextChar); - remainingChars.shift(); - } - return [ - { content: usedChars.join(""), type }, - { content: remainingChars.join(""), type } - ]; -} -function splitLineToFitWidth(line, checkFit) { - if (line.some(({ content }) => content.includes("\n"))) { - throw new Error("splitLineToFitWidth does not support newlines in the line"); - } - return splitLineToFitWidthRecursion(line, checkFit); -} -function splitLineToFitWidthRecursion(words, checkFit, lines = [], newLine = []) { - if (words.length === 0) { - if (newLine.length > 0) { - lines.push(newLine); - } - return lines.length > 0 ? lines : []; - } - let joiner = ""; - if (words[0].content === " ") { - joiner = " "; - words.shift(); - } - const nextWord = words.shift() ?? { content: " ", type: "normal" }; - const lineWithNextWord = [...newLine]; - if (joiner !== "") { - lineWithNextWord.push({ content: joiner, type: "normal" }); - } - lineWithNextWord.push(nextWord); - if (checkFit(lineWithNextWord)) { - return splitLineToFitWidthRecursion(words, checkFit, lines, lineWithNextWord); - } - if (newLine.length > 0) { - lines.push(newLine); - words.unshift(nextWord); - } else if (nextWord.content) { - const [line, rest] = splitWordToFitWidth(checkFit, nextWord); - lines.push([line]); - if (rest.content) { - words.unshift(rest); - } - } - return splitLineToFitWidthRecursion(words, checkFit, lines); -} -function applyStyle(dom, styleFn) { - if (styleFn) { - dom.attr("style", styleFn); - } -} -function addHtmlSpan(element, node, width, classes, addBackground = false) { - const fo = element.append("foreignObject"); - const div = fo.append("xhtml:div"); - const label = node.label; - const labelClass = node.isNode ? "nodeLabel" : "edgeLabel"; - div.html( - ` - " + label + "" - ); - applyStyle(div, node.labelStyle); - div.style("display", "table-cell"); - div.style("white-space", "nowrap"); - div.style("max-width", width + "px"); - div.attr("xmlns", "http://www.w3.org/1999/xhtml"); - if (addBackground) { - div.attr("class", "labelBkg"); - } - let bbox = div.node().getBoundingClientRect(); - if (bbox.width === width) { - div.style("display", "table"); - div.style("white-space", "break-spaces"); - div.style("width", width + "px"); - bbox = div.node().getBoundingClientRect(); - } - fo.style("width", bbox.width); - fo.style("height", bbox.height); - return fo.node(); -} -function createTspan(textElement, lineIndex, lineHeight) { - return textElement.append("tspan").attr("class", "text-outer-tspan").attr("x", 0).attr("y", lineIndex * lineHeight - 0.1 + "em").attr("dy", lineHeight + "em"); -} -function computeWidthOfText(parentNode, lineHeight, line) { - const testElement = parentNode.append("text"); - const testSpan = createTspan(testElement, 1, lineHeight); - updateTextContentAndStyles(testSpan, line); - const textLength = testSpan.node().getComputedTextLength(); - testElement.remove(); - return textLength; -} -function computeDimensionOfText(parentNode, lineHeight, text) { - var _a; - const testElement = parentNode.append("text"); - const testSpan = createTspan(testElement, 1, lineHeight); - updateTextContentAndStyles(testSpan, [{ content: text, type: "normal" }]); - const textDimension = (_a = testSpan.node()) == null ? void 0 : _a.getBoundingClientRect(); - if (textDimension) { - testElement.remove(); - } - return textDimension; -} -function createFormattedText(width, g, structuredText, addBackground = false) { - const lineHeight = 1.1; - const labelGroup = g.append("g"); - const bkg = labelGroup.insert("rect").attr("class", "background"); - const textElement = labelGroup.append("text").attr("y", "-10.1"); - let lineIndex = 0; - for (const line of structuredText) { - const checkWidth = (line2) => computeWidthOfText(labelGroup, lineHeight, line2) <= width; - const linesUnderWidth = checkWidth(line) ? [line] : splitLineToFitWidth(line, checkWidth); - for (const preparedLine of linesUnderWidth) { - const tspan = createTspan(textElement, lineIndex, lineHeight); - updateTextContentAndStyles(tspan, preparedLine); - lineIndex++; - } - } - if (addBackground) { - const bbox = textElement.node().getBBox(); - const padding = 2; - bkg.attr("x", -padding).attr("y", -padding).attr("width", bbox.width + 2 * padding).attr("height", bbox.height + 2 * padding); - return labelGroup.node(); - } else { - return textElement.node(); - } -} -function updateTextContentAndStyles(tspan, wrappedLine) { - tspan.text(""); - wrappedLine.forEach((word, index) => { - const innerTspan = tspan.append("tspan").attr("font-style", word.type === "emphasis" ? "italic" : "normal").attr("class", "text-inner-tspan").attr("font-weight", word.type === "strong" ? "bold" : "normal"); - if (index === 0) { - innerTspan.text(word.content); - } else { - innerTspan.text(" " + word.content); - } - }); -} -const createText = (el, text = "", { - style = "", - isTitle = false, - classes = "", - useHtmlLabels = true, - isNode = true, - width = 200, - addSvgBackground = false -} = {}) => { - mermaid_b5860b54.l.info("createText", text, style, isTitle, classes, useHtmlLabels, isNode, addSvgBackground); - if (useHtmlLabels) { - const htmlText = markdownToHTML(text); - const node = { - isNode, - label: (0,mermaid_b5860b54.M)(htmlText).replace( - /fa[blrs]?:fa-[\w-]+/g, - // cspell: disable-line - (s) => `` - ), - labelStyle: style.replace("fill:", "color:") - }; - const vertexNode = addHtmlSpan(el, node, width, classes, addSvgBackground); - return vertexNode; - } else { - const structuredText = markdownToLines(text); - const svgLabel = createFormattedText(width, el, structuredText, addSvgBackground); - return svgLabel; - } -}; - - - -/***/ }), - -/***/ 80495: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - diagram: () => (/* binding */ diagram) -}); - -// EXTERNAL MODULE: ./node_modules/mermaid/dist/mermaid-b5860b54.js + 8 modules -var mermaid_b5860b54 = __webpack_require__(86079); -;// CONCATENATED MODULE: ./node_modules/cytoscape/dist/cytoscape.esm.mjs -/** - * Copyright (c) 2016-2024, The Cytoscape Consortium. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the “Software”), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -function _typeof(obj) { - "@babel/helpers - typeof"; - - return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { - return typeof obj; - } : function (obj) { - return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; - }, _typeof(obj); -} -function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } -} -function _defineProperties(target, props) { - for (var i = 0; i < props.length; i++) { - var descriptor = props[i]; - descriptor.enumerable = descriptor.enumerable || false; - descriptor.configurable = true; - if ("value" in descriptor) descriptor.writable = true; - Object.defineProperty(target, descriptor.key, descriptor); - } -} -function _createClass(Constructor, protoProps, staticProps) { - if (protoProps) _defineProperties(Constructor.prototype, protoProps); - if (staticProps) _defineProperties(Constructor, staticProps); - Object.defineProperty(Constructor, "prototype", { - writable: false - }); - return Constructor; -} -function _defineProperty$1(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} -function _slicedToArray(arr, i) { - return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); -} -function _arrayWithHoles(arr) { - if (Array.isArray(arr)) return arr; -} -function _iterableToArrayLimit(arr, i) { - var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; - if (_i == null) return; - var _arr = []; - var _n = true; - var _d = false; - var _s, _e; - try { - for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { - _arr.push(_s.value); - if (i && _arr.length === i) break; - } - } catch (err) { - _d = true; - _e = err; - } finally { - try { - if (!_n && _i["return"] != null) _i["return"](); - } finally { - if (_d) throw _e; - } - } - return _arr; -} -function _unsupportedIterableToArray(o, minLen) { - if (!o) return; - if (typeof o === "string") return _arrayLikeToArray(o, minLen); - var n = Object.prototype.toString.call(o).slice(8, -1); - if (n === "Object" && o.constructor) n = o.constructor.name; - if (n === "Map" || n === "Set") return Array.from(o); - if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); -} -function _arrayLikeToArray(arr, len) { - if (len == null || len > arr.length) len = arr.length; - for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; - return arr2; -} -function _nonIterableRest() { - throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); -} -function _createForOfIteratorHelper(o, allowArrayLike) { - var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; - if (!it) { - if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { - if (it) o = it; - var i = 0; - var F = function () {}; - return { - s: F, - n: function () { - if (i >= o.length) return { - done: true - }; - return { - done: false, - value: o[i++] - }; - }, - e: function (e) { - throw e; - }, - f: F - }; - } - throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); - } - var normalCompletion = true, - didErr = false, - err; - return { - s: function () { - it = it.call(o); - }, - n: function () { - var step = it.next(); - normalCompletion = step.done; - return step; - }, - e: function (e) { - didErr = true; - err = e; - }, - f: function () { - try { - if (!normalCompletion && it.return != null) it.return(); - } finally { - if (didErr) throw err; - } - } - }; -} - -var _window = typeof window === 'undefined' ? null : window; // eslint-disable-line no-undef - -var cytoscape_esm_navigator = _window ? _window.navigator : null; -_window ? _window.document : null; -var typeofstr = _typeof(''); -var typeofobj = _typeof({}); -var typeoffn = _typeof(function () {}); -var typeofhtmlele = typeof HTMLElement === "undefined" ? "undefined" : _typeof(HTMLElement); -var instanceStr = function instanceStr(obj) { - return obj && obj.instanceString && fn$6(obj.instanceString) ? obj.instanceString() : null; -}; - -var string = function string(obj) { - return obj != null && _typeof(obj) == typeofstr; -}; -var fn$6 = function fn(obj) { - return obj != null && _typeof(obj) === typeoffn; -}; -var array = function array(obj) { - return !elementOrCollection(obj) && (Array.isArray ? Array.isArray(obj) : obj != null && obj instanceof Array); -}; -var plainObject = function plainObject(obj) { - return obj != null && _typeof(obj) === typeofobj && !array(obj) && obj.constructor === Object; -}; -var object = function object(obj) { - return obj != null && _typeof(obj) === typeofobj; -}; -var number$1 = function number(obj) { - return obj != null && _typeof(obj) === _typeof(1) && !isNaN(obj); -}; -var integer = function integer(obj) { - return number$1(obj) && Math.floor(obj) === obj; -}; -var htmlElement = function htmlElement(obj) { - if ('undefined' === typeofhtmlele) { - return undefined; - } else { - return null != obj && obj instanceof HTMLElement; - } -}; -var elementOrCollection = function elementOrCollection(obj) { - return cytoscape_esm_element(obj) || collection(obj); -}; -var cytoscape_esm_element = function element(obj) { - return instanceStr(obj) === 'collection' && obj._private.single; -}; -var collection = function collection(obj) { - return instanceStr(obj) === 'collection' && !obj._private.single; -}; -var core = function core(obj) { - return instanceStr(obj) === 'core'; -}; -var stylesheet = function stylesheet(obj) { - return instanceStr(obj) === 'stylesheet'; -}; -var cytoscape_esm_event = function event(obj) { - return instanceStr(obj) === 'event'; -}; -var emptyString = function emptyString(obj) { - if (obj === undefined || obj === null) { - // null is empty - return true; - } else if (obj === '' || obj.match(/^\s+$/)) { - return true; // empty string is empty - } - - return false; // otherwise, we don't know what we've got -}; -var domElement = function domElement(obj) { - if (typeof HTMLElement === 'undefined') { - return false; // we're not in a browser so it doesn't matter - } else { - return obj instanceof HTMLElement; - } -}; -var boundingBox = function boundingBox(obj) { - return plainObject(obj) && number$1(obj.x1) && number$1(obj.x2) && number$1(obj.y1) && number$1(obj.y2); -}; -var promise = function promise(obj) { - return object(obj) && fn$6(obj.then); -}; -var ms = function ms() { - return cytoscape_esm_navigator && cytoscape_esm_navigator.userAgent.match(/msie|trident|edge/i); -}; // probably a better way to detect this... - -var memoize$1 = function memoize(fn, keyFn) { - if (!keyFn) { - keyFn = function keyFn() { - if (arguments.length === 1) { - return arguments[0]; - } else if (arguments.length === 0) { - return 'undefined'; - } - var args = []; - for (var i = 0; i < arguments.length; i++) { - args.push(arguments[i]); - } - return args.join('$'); - }; - } - var memoizedFn = function memoizedFn() { - var self = this; - var args = arguments; - var ret; - var k = keyFn.apply(self, args); - var cache = memoizedFn.cache; - if (!(ret = cache[k])) { - ret = cache[k] = fn.apply(self, args); - } - return ret; - }; - memoizedFn.cache = {}; - return memoizedFn; -}; - -var camel2dash = memoize$1(function (str) { - return str.replace(/([A-Z])/g, function (v) { - return '-' + v.toLowerCase(); - }); -}); -var dash2camel = memoize$1(function (str) { - return str.replace(/(-\w)/g, function (v) { - return v[1].toUpperCase(); - }); -}); -var prependCamel = memoize$1(function (prefix, str) { - return prefix + str[0].toUpperCase() + str.substring(1); -}, function (prefix, str) { - return prefix + '$' + str; -}); -var capitalize = function capitalize(str) { - if (emptyString(str)) { - return str; - } - return str.charAt(0).toUpperCase() + str.substring(1); -}; - -var number = '(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))'; -var rgba = 'rgb[a]?\\((' + number + '[%]?)\\s*,\\s*(' + number + '[%]?)\\s*,\\s*(' + number + '[%]?)(?:\\s*,\\s*(' + number + '))?\\)'; -var rgbaNoBackRefs = 'rgb[a]?\\((?:' + number + '[%]?)\\s*,\\s*(?:' + number + '[%]?)\\s*,\\s*(?:' + number + '[%]?)(?:\\s*,\\s*(?:' + number + '))?\\)'; -var hsla = 'hsl[a]?\\((' + number + ')\\s*,\\s*(' + number + '[%])\\s*,\\s*(' + number + '[%])(?:\\s*,\\s*(' + number + '))?\\)'; -var hslaNoBackRefs = 'hsl[a]?\\((?:' + number + ')\\s*,\\s*(?:' + number + '[%])\\s*,\\s*(?:' + number + '[%])(?:\\s*,\\s*(?:' + number + '))?\\)'; -var hex3 = '\\#[0-9a-fA-F]{3}'; -var hex6 = '\\#[0-9a-fA-F]{6}'; - -var ascending = function ascending(a, b) { - if (a < b) { - return -1; - } else if (a > b) { - return 1; - } else { - return 0; - } -}; -var descending = function descending(a, b) { - return -1 * ascending(a, b); -}; - -var extend = Object.assign != null ? Object.assign.bind(Object) : function (tgt) { - var args = arguments; - for (var i = 1; i < args.length; i++) { - var obj = args[i]; - if (obj == null) { - continue; - } - var keys = Object.keys(obj); - for (var j = 0; j < keys.length; j++) { - var k = keys[j]; - tgt[k] = obj[k]; - } - } - return tgt; -}; - -// get [r, g, b] from #abc or #aabbcc -var hex2tuple = function hex2tuple(hex) { - if (!(hex.length === 4 || hex.length === 7) || hex[0] !== '#') { - return; - } - var shortHex = hex.length === 4; - var r, g, b; - var base = 16; - if (shortHex) { - r = parseInt(hex[1] + hex[1], base); - g = parseInt(hex[2] + hex[2], base); - b = parseInt(hex[3] + hex[3], base); - } else { - r = parseInt(hex[1] + hex[2], base); - g = parseInt(hex[3] + hex[4], base); - b = parseInt(hex[5] + hex[6], base); - } - return [r, g, b]; -}; - -// get [r, g, b, a] from hsl(0, 0, 0) or hsla(0, 0, 0, 0) -var hsl2tuple = function hsl2tuple(hsl) { - var ret; - var h, s, l, a, r, g, b; - function hue2rgb(p, q, t) { - if (t < 0) t += 1; - if (t > 1) t -= 1; - if (t < 1 / 6) return p + (q - p) * 6 * t; - if (t < 1 / 2) return q; - if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6; - return p; - } - var m = new RegExp('^' + hsla + '$').exec(hsl); - if (m) { - // get hue - h = parseInt(m[1]); - if (h < 0) { - h = (360 - -1 * h % 360) % 360; - } else if (h > 360) { - h = h % 360; - } - h /= 360; // normalise on [0, 1] - - s = parseFloat(m[2]); - if (s < 0 || s > 100) { - return; - } // saturation is [0, 100] - s = s / 100; // normalise on [0, 1] - - l = parseFloat(m[3]); - if (l < 0 || l > 100) { - return; - } // lightness is [0, 100] - l = l / 100; // normalise on [0, 1] - - a = m[4]; - if (a !== undefined) { - a = parseFloat(a); - if (a < 0 || a > 1) { - return; - } // alpha is [0, 1] - } - - // now, convert to rgb - // code from http://mjijackson.com/2008/02/rgb-to-hsl-and-rgb-to-hsv-color-model-conversion-algorithms-in-javascript - if (s === 0) { - r = g = b = Math.round(l * 255); // achromatic - } else { - var q = l < 0.5 ? l * (1 + s) : l + s - l * s; - var p = 2 * l - q; - r = Math.round(255 * hue2rgb(p, q, h + 1 / 3)); - g = Math.round(255 * hue2rgb(p, q, h)); - b = Math.round(255 * hue2rgb(p, q, h - 1 / 3)); - } - ret = [r, g, b, a]; - } - return ret; -}; - -// get [r, g, b, a] from rgb(0, 0, 0) or rgba(0, 0, 0, 0) -var rgb2tuple = function rgb2tuple(rgb) { - var ret; - var m = new RegExp('^' + rgba + '$').exec(rgb); - if (m) { - ret = []; - var isPct = []; - for (var i = 1; i <= 3; i++) { - var channel = m[i]; - if (channel[channel.length - 1] === '%') { - isPct[i] = true; - } - channel = parseFloat(channel); - if (isPct[i]) { - channel = channel / 100 * 255; // normalise to [0, 255] - } - - if (channel < 0 || channel > 255) { - return; - } // invalid channel value - - ret.push(Math.floor(channel)); - } - var atLeastOneIsPct = isPct[1] || isPct[2] || isPct[3]; - var allArePct = isPct[1] && isPct[2] && isPct[3]; - if (atLeastOneIsPct && !allArePct) { - return; - } // must all be percent values if one is - - var alpha = m[4]; - if (alpha !== undefined) { - alpha = parseFloat(alpha); - if (alpha < 0 || alpha > 1) { - return; - } // invalid alpha value - - ret.push(alpha); - } - } - return ret; -}; -var colorname2tuple = function colorname2tuple(color) { - return colors[color.toLowerCase()]; -}; -var color2tuple = function color2tuple(color) { - return (array(color) ? color : null) || colorname2tuple(color) || hex2tuple(color) || rgb2tuple(color) || hsl2tuple(color); -}; -var colors = { - // special colour names - transparent: [0, 0, 0, 0], - // NB alpha === 0 - - // regular colours - aliceblue: [240, 248, 255], - antiquewhite: [250, 235, 215], - aqua: [0, 255, 255], - aquamarine: [127, 255, 212], - azure: [240, 255, 255], - beige: [245, 245, 220], - bisque: [255, 228, 196], - black: [0, 0, 0], - blanchedalmond: [255, 235, 205], - blue: [0, 0, 255], - blueviolet: [138, 43, 226], - brown: [165, 42, 42], - burlywood: [222, 184, 135], - cadetblue: [95, 158, 160], - chartreuse: [127, 255, 0], - chocolate: [210, 105, 30], - coral: [255, 127, 80], - cornflowerblue: [100, 149, 237], - cornsilk: [255, 248, 220], - crimson: [220, 20, 60], - cyan: [0, 255, 255], - darkblue: [0, 0, 139], - darkcyan: [0, 139, 139], - darkgoldenrod: [184, 134, 11], - darkgray: [169, 169, 169], - darkgreen: [0, 100, 0], - darkgrey: [169, 169, 169], - darkkhaki: [189, 183, 107], - darkmagenta: [139, 0, 139], - darkolivegreen: [85, 107, 47], - darkorange: [255, 140, 0], - darkorchid: [153, 50, 204], - darkred: [139, 0, 0], - darksalmon: [233, 150, 122], - darkseagreen: [143, 188, 143], - darkslateblue: [72, 61, 139], - darkslategray: [47, 79, 79], - darkslategrey: [47, 79, 79], - darkturquoise: [0, 206, 209], - darkviolet: [148, 0, 211], - deeppink: [255, 20, 147], - deepskyblue: [0, 191, 255], - dimgray: [105, 105, 105], - dimgrey: [105, 105, 105], - dodgerblue: [30, 144, 255], - firebrick: [178, 34, 34], - floralwhite: [255, 250, 240], - forestgreen: [34, 139, 34], - fuchsia: [255, 0, 255], - gainsboro: [220, 220, 220], - ghostwhite: [248, 248, 255], - gold: [255, 215, 0], - goldenrod: [218, 165, 32], - gray: [128, 128, 128], - grey: [128, 128, 128], - green: [0, 128, 0], - greenyellow: [173, 255, 47], - honeydew: [240, 255, 240], - hotpink: [255, 105, 180], - indianred: [205, 92, 92], - indigo: [75, 0, 130], - ivory: [255, 255, 240], - khaki: [240, 230, 140], - lavender: [230, 230, 250], - lavenderblush: [255, 240, 245], - lawngreen: [124, 252, 0], - lemonchiffon: [255, 250, 205], - lightblue: [173, 216, 230], - lightcoral: [240, 128, 128], - lightcyan: [224, 255, 255], - lightgoldenrodyellow: [250, 250, 210], - lightgray: [211, 211, 211], - lightgreen: [144, 238, 144], - lightgrey: [211, 211, 211], - lightpink: [255, 182, 193], - lightsalmon: [255, 160, 122], - lightseagreen: [32, 178, 170], - lightskyblue: [135, 206, 250], - lightslategray: [119, 136, 153], - lightslategrey: [119, 136, 153], - lightsteelblue: [176, 196, 222], - lightyellow: [255, 255, 224], - lime: [0, 255, 0], - limegreen: [50, 205, 50], - linen: [250, 240, 230], - magenta: [255, 0, 255], - maroon: [128, 0, 0], - mediumaquamarine: [102, 205, 170], - mediumblue: [0, 0, 205], - mediumorchid: [186, 85, 211], - mediumpurple: [147, 112, 219], - mediumseagreen: [60, 179, 113], - mediumslateblue: [123, 104, 238], - mediumspringgreen: [0, 250, 154], - mediumturquoise: [72, 209, 204], - mediumvioletred: [199, 21, 133], - midnightblue: [25, 25, 112], - mintcream: [245, 255, 250], - mistyrose: [255, 228, 225], - moccasin: [255, 228, 181], - navajowhite: [255, 222, 173], - navy: [0, 0, 128], - oldlace: [253, 245, 230], - olive: [128, 128, 0], - olivedrab: [107, 142, 35], - orange: [255, 165, 0], - orangered: [255, 69, 0], - orchid: [218, 112, 214], - palegoldenrod: [238, 232, 170], - palegreen: [152, 251, 152], - paleturquoise: [175, 238, 238], - palevioletred: [219, 112, 147], - papayawhip: [255, 239, 213], - peachpuff: [255, 218, 185], - peru: [205, 133, 63], - pink: [255, 192, 203], - plum: [221, 160, 221], - powderblue: [176, 224, 230], - purple: [128, 0, 128], - red: [255, 0, 0], - rosybrown: [188, 143, 143], - royalblue: [65, 105, 225], - saddlebrown: [139, 69, 19], - salmon: [250, 128, 114], - sandybrown: [244, 164, 96], - seagreen: [46, 139, 87], - seashell: [255, 245, 238], - sienna: [160, 82, 45], - silver: [192, 192, 192], - skyblue: [135, 206, 235], - slateblue: [106, 90, 205], - slategray: [112, 128, 144], - slategrey: [112, 128, 144], - snow: [255, 250, 250], - springgreen: [0, 255, 127], - steelblue: [70, 130, 180], - tan: [210, 180, 140], - teal: [0, 128, 128], - thistle: [216, 191, 216], - tomato: [255, 99, 71], - turquoise: [64, 224, 208], - violet: [238, 130, 238], - wheat: [245, 222, 179], - white: [255, 255, 255], - whitesmoke: [245, 245, 245], - yellow: [255, 255, 0], - yellowgreen: [154, 205, 50] -}; - -// sets the value in a map (map may not be built) -var setMap = function setMap(options) { - var obj = options.map; - var keys = options.keys; - var l = keys.length; - for (var i = 0; i < l; i++) { - var key = keys[i]; - if (plainObject(key)) { - throw Error('Tried to set map with object key'); - } - if (i < keys.length - 1) { - // extend the map if necessary - if (obj[key] == null) { - obj[key] = {}; - } - obj = obj[key]; - } else { - // set the value - obj[key] = options.value; - } - } -}; - -// gets the value in a map even if it's not built in places -var getMap = function getMap(options) { - var obj = options.map; - var keys = options.keys; - var l = keys.length; - for (var i = 0; i < l; i++) { - var key = keys[i]; - if (plainObject(key)) { - throw Error('Tried to get map with object key'); - } - obj = obj[key]; - if (obj == null) { - return obj; - } - } - return obj; -}; - -/** - * Checks if `value` is the - * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) - * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(_.noop); - * // => true - * - * _.isObject(null); - * // => false - */ -function isObject(value) { - var type = typeof value; - return value != null && (type == 'object' || type == 'function'); -} - -var isObject_1 = isObject; - -var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; - -function createCommonjsModule(fn, module) { - return module = { exports: {} }, fn(module, module.exports), module.exports; -} - -/** Detect free variable `global` from Node.js. */ -var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal; - -var _freeGlobal = freeGlobal; - -/** Detect free variable `self`. */ -var freeSelf = typeof self == 'object' && self && self.Object === Object && self; - -/** Used as a reference to the global object. */ -var root = _freeGlobal || freeSelf || Function('return this')(); - -var _root = root; - -/** - * Gets the timestamp of the number of milliseconds that have elapsed since - * the Unix epoch (1 January 1970 00:00:00 UTC). - * - * @static - * @memberOf _ - * @since 2.4.0 - * @category Date - * @returns {number} Returns the timestamp. - * @example - * - * _.defer(function(stamp) { - * console.log(_.now() - stamp); - * }, _.now()); - * // => Logs the number of milliseconds it took for the deferred invocation. - */ -var now = function() { - return _root.Date.now(); -}; - -var now_1 = now; - -/** Used to match a single whitespace character. */ -var reWhitespace = /\s/; - -/** - * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace - * character of `string`. - * - * @private - * @param {string} string The string to inspect. - * @returns {number} Returns the index of the last non-whitespace character. - */ -function trimmedEndIndex(string) { - var index = string.length; - - while (index-- && reWhitespace.test(string.charAt(index))) {} - return index; -} - -var _trimmedEndIndex = trimmedEndIndex; - -/** Used to match leading whitespace. */ -var reTrimStart = /^\s+/; - -/** - * The base implementation of `_.trim`. - * - * @private - * @param {string} string The string to trim. - * @returns {string} Returns the trimmed string. - */ -function baseTrim(string) { - return string - ? string.slice(0, _trimmedEndIndex(string) + 1).replace(reTrimStart, '') - : string; -} - -var _baseTrim = baseTrim; - -/** Built-in value references. */ -var Symbol$1 = _root.Symbol; - -var _Symbol = Symbol$1; - -/** Used for built-in method references. */ -var objectProto$5 = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty$4 = objectProto$5.hasOwnProperty; - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) - * of values. - */ -var nativeObjectToString$1 = objectProto$5.toString; - -/** Built-in value references. */ -var symToStringTag$1 = _Symbol ? _Symbol.toStringTag : undefined; - -/** - * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. - * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the raw `toStringTag`. - */ -function getRawTag(value) { - var isOwn = hasOwnProperty$4.call(value, symToStringTag$1), - tag = value[symToStringTag$1]; - - try { - value[symToStringTag$1] = undefined; - var unmasked = true; - } catch (e) {} - - var result = nativeObjectToString$1.call(value); - if (unmasked) { - if (isOwn) { - value[symToStringTag$1] = tag; - } else { - delete value[symToStringTag$1]; - } - } - return result; -} - -var _getRawTag = getRawTag; - -/** Used for built-in method references. */ -var objectProto$4 = Object.prototype; - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) - * of values. - */ -var nativeObjectToString = objectProto$4.toString; - -/** - * Converts `value` to a string using `Object.prototype.toString`. - * - * @private - * @param {*} value The value to convert. - * @returns {string} Returns the converted string. - */ -function objectToString(value) { - return nativeObjectToString.call(value); -} - -var _objectToString = objectToString; - -/** `Object#toString` result references. */ -var nullTag = '[object Null]', - undefinedTag = '[object Undefined]'; - -/** Built-in value references. */ -var symToStringTag = _Symbol ? _Symbol.toStringTag : undefined; - -/** - * The base implementation of `getTag` without fallbacks for buggy environments. - * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the `toStringTag`. - */ -function baseGetTag(value) { - if (value == null) { - return value === undefined ? undefinedTag : nullTag; - } - return (symToStringTag && symToStringTag in Object(value)) - ? _getRawTag(value) - : _objectToString(value); -} - -var _baseGetTag = baseGetTag; - -/** - * Checks if `value` is object-like. A value is object-like if it's not `null` - * and has a `typeof` result of "object". - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - * @example - * - * _.isObjectLike({}); - * // => true - * - * _.isObjectLike([1, 2, 3]); - * // => true - * - * _.isObjectLike(_.noop); - * // => false - * - * _.isObjectLike(null); - * // => false - */ -function isObjectLike(value) { - return value != null && typeof value == 'object'; -} - -var isObjectLike_1 = isObjectLike; - -/** `Object#toString` result references. */ -var symbolTag = '[object Symbol]'; - -/** - * Checks if `value` is classified as a `Symbol` primitive or object. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. - * @example - * - * _.isSymbol(Symbol.iterator); - * // => true - * - * _.isSymbol('abc'); - * // => false - */ -function isSymbol(value) { - return typeof value == 'symbol' || - (isObjectLike_1(value) && _baseGetTag(value) == symbolTag); -} - -var isSymbol_1 = isSymbol; - -/** Used as references for various `Number` constants. */ -var NAN = 0 / 0; - -/** Used to detect bad signed hexadecimal string values. */ -var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; - -/** Used to detect binary string values. */ -var reIsBinary = /^0b[01]+$/i; - -/** Used to detect octal string values. */ -var reIsOctal = /^0o[0-7]+$/i; - -/** Built-in method references without a dependency on `root`. */ -var freeParseInt = parseInt; - -/** - * Converts `value` to a number. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to process. - * @returns {number} Returns the number. - * @example - * - * _.toNumber(3.2); - * // => 3.2 - * - * _.toNumber(Number.MIN_VALUE); - * // => 5e-324 - * - * _.toNumber(Infinity); - * // => Infinity - * - * _.toNumber('3.2'); - * // => 3.2 - */ -function toNumber(value) { - if (typeof value == 'number') { - return value; - } - if (isSymbol_1(value)) { - return NAN; - } - if (isObject_1(value)) { - var other = typeof value.valueOf == 'function' ? value.valueOf() : value; - value = isObject_1(other) ? (other + '') : other; - } - if (typeof value != 'string') { - return value === 0 ? value : +value; - } - value = _baseTrim(value); - var isBinary = reIsBinary.test(value); - return (isBinary || reIsOctal.test(value)) - ? freeParseInt(value.slice(2), isBinary ? 2 : 8) - : (reIsBadHex.test(value) ? NAN : +value); -} - -var toNumber_1 = toNumber; - -/** Error message constants. */ -var FUNC_ERROR_TEXT$1 = 'Expected a function'; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max, - nativeMin = Math.min; - -/** - * Creates a debounced function that delays invoking `func` until after `wait` - * milliseconds have elapsed since the last time the debounced function was - * invoked. The debounced function comes with a `cancel` method to cancel - * delayed `func` invocations and a `flush` method to immediately invoke them. - * Provide `options` to indicate whether `func` should be invoked on the - * leading and/or trailing edge of the `wait` timeout. The `func` is invoked - * with the last arguments provided to the debounced function. Subsequent - * calls to the debounced function return the result of the last `func` - * invocation. - * - * **Note:** If `leading` and `trailing` options are `true`, `func` is - * invoked on the trailing edge of the timeout only if the debounced function - * is invoked more than once during the `wait` timeout. - * - * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred - * until to the next tick, similar to `setTimeout` with a timeout of `0`. - * - * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) - * for details over the differences between `_.debounce` and `_.throttle`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {Function} func The function to debounce. - * @param {number} [wait=0] The number of milliseconds to delay. - * @param {Object} [options={}] The options object. - * @param {boolean} [options.leading=false] - * Specify invoking on the leading edge of the timeout. - * @param {number} [options.maxWait] - * The maximum time `func` is allowed to be delayed before it's invoked. - * @param {boolean} [options.trailing=true] - * Specify invoking on the trailing edge of the timeout. - * @returns {Function} Returns the new debounced function. - * @example - * - * // Avoid costly calculations while the window size is in flux. - * jQuery(window).on('resize', _.debounce(calculateLayout, 150)); - * - * // Invoke `sendMail` when clicked, debouncing subsequent calls. - * jQuery(element).on('click', _.debounce(sendMail, 300, { - * 'leading': true, - * 'trailing': false - * })); - * - * // Ensure `batchLog` is invoked once after 1 second of debounced calls. - * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 }); - * var source = new EventSource('/stream'); - * jQuery(source).on('message', debounced); - * - * // Cancel the trailing debounced invocation. - * jQuery(window).on('popstate', debounced.cancel); - */ -function debounce(func, wait, options) { - var lastArgs, - lastThis, - maxWait, - result, - timerId, - lastCallTime, - lastInvokeTime = 0, - leading = false, - maxing = false, - trailing = true; - - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT$1); - } - wait = toNumber_1(wait) || 0; - if (isObject_1(options)) { - leading = !!options.leading; - maxing = 'maxWait' in options; - maxWait = maxing ? nativeMax(toNumber_1(options.maxWait) || 0, wait) : maxWait; - trailing = 'trailing' in options ? !!options.trailing : trailing; - } - - function invokeFunc(time) { - var args = lastArgs, - thisArg = lastThis; - - lastArgs = lastThis = undefined; - lastInvokeTime = time; - result = func.apply(thisArg, args); - return result; - } - - function leadingEdge(time) { - // Reset any `maxWait` timer. - lastInvokeTime = time; - // Start the timer for the trailing edge. - timerId = setTimeout(timerExpired, wait); - // Invoke the leading edge. - return leading ? invokeFunc(time) : result; - } - - function remainingWait(time) { - var timeSinceLastCall = time - lastCallTime, - timeSinceLastInvoke = time - lastInvokeTime, - timeWaiting = wait - timeSinceLastCall; - - return maxing - ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) - : timeWaiting; - } - - function shouldInvoke(time) { - var timeSinceLastCall = time - lastCallTime, - timeSinceLastInvoke = time - lastInvokeTime; - - // Either this is the first call, activity has stopped and we're at the - // trailing edge, the system time has gone backwards and we're treating - // it as the trailing edge, or we've hit the `maxWait` limit. - return (lastCallTime === undefined || (timeSinceLastCall >= wait) || - (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait)); - } - - function timerExpired() { - var time = now_1(); - if (shouldInvoke(time)) { - return trailingEdge(time); - } - // Restart the timer. - timerId = setTimeout(timerExpired, remainingWait(time)); - } - - function trailingEdge(time) { - timerId = undefined; - - // Only invoke if we have `lastArgs` which means `func` has been - // debounced at least once. - if (trailing && lastArgs) { - return invokeFunc(time); - } - lastArgs = lastThis = undefined; - return result; - } - - function cancel() { - if (timerId !== undefined) { - clearTimeout(timerId); - } - lastInvokeTime = 0; - lastArgs = lastCallTime = lastThis = timerId = undefined; - } - - function flush() { - return timerId === undefined ? result : trailingEdge(now_1()); - } - - function debounced() { - var time = now_1(), - isInvoking = shouldInvoke(time); - - lastArgs = arguments; - lastThis = this; - lastCallTime = time; - - if (isInvoking) { - if (timerId === undefined) { - return leadingEdge(lastCallTime); - } - if (maxing) { - // Handle invocations in a tight loop. - clearTimeout(timerId); - timerId = setTimeout(timerExpired, wait); - return invokeFunc(lastCallTime); - } - } - if (timerId === undefined) { - timerId = setTimeout(timerExpired, wait); - } - return result; - } - debounced.cancel = cancel; - debounced.flush = flush; - return debounced; -} - -var debounce_1 = debounce; - -var performance = _window ? _window.performance : null; -var pnow = performance && performance.now ? function () { - return performance.now(); -} : function () { - return Date.now(); -}; -var raf = function () { - if (_window) { - if (_window.requestAnimationFrame) { - return function (fn) { - _window.requestAnimationFrame(fn); - }; - } else if (_window.mozRequestAnimationFrame) { - return function (fn) { - _window.mozRequestAnimationFrame(fn); - }; - } else if (_window.webkitRequestAnimationFrame) { - return function (fn) { - _window.webkitRequestAnimationFrame(fn); - }; - } else if (_window.msRequestAnimationFrame) { - return function (fn) { - _window.msRequestAnimationFrame(fn); - }; - } - } - return function (fn) { - if (fn) { - setTimeout(function () { - fn(pnow()); - }, 1000 / 60); - } - }; -}(); -var requestAnimationFrame = function requestAnimationFrame(fn) { - return raf(fn); -}; -var performanceNow = pnow; - -var DEFAULT_HASH_SEED = 9261; -var K = 65599; // 37 also works pretty well -var DEFAULT_HASH_SEED_ALT = 5381; -var hashIterableInts = function hashIterableInts(iterator) { - var seed = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_HASH_SEED; - // sdbm/string-hash - var hash = seed; - var entry; - for (;;) { - entry = iterator.next(); - if (entry.done) { - break; - } - hash = hash * K + entry.value | 0; - } - return hash; -}; -var hashInt = function hashInt(num) { - var seed = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_HASH_SEED; - // sdbm/string-hash - return seed * K + num | 0; -}; -var hashIntAlt = function hashIntAlt(num) { - var seed = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_HASH_SEED_ALT; - // djb2/string-hash - return (seed << 5) + seed + num | 0; -}; -var combineHashes = function combineHashes(hash1, hash2) { - return hash1 * 0x200000 + hash2; -}; -var combineHashesArray = function combineHashesArray(hashes) { - return hashes[0] * 0x200000 + hashes[1]; -}; -var hashArrays = function hashArrays(hashes1, hashes2) { - return [hashInt(hashes1[0], hashes2[0]), hashIntAlt(hashes1[1], hashes2[1])]; -}; -var hashIntsArray = function hashIntsArray(ints, seed) { - var entry = { - value: 0, - done: false - }; - var i = 0; - var length = ints.length; - var iterator = { - next: function next() { - if (i < length) { - entry.value = ints[i++]; - } else { - entry.done = true; - } - return entry; - } - }; - return hashIterableInts(iterator, seed); -}; -var hashString = function hashString(str, seed) { - var entry = { - value: 0, - done: false - }; - var i = 0; - var length = str.length; - var iterator = { - next: function next() { - if (i < length) { - entry.value = str.charCodeAt(i++); - } else { - entry.done = true; - } - return entry; - } - }; - return hashIterableInts(iterator, seed); -}; -var hashStrings = function hashStrings() { - return hashStringsArray(arguments); -}; -var hashStringsArray = function hashStringsArray(strs) { - var hash; - for (var i = 0; i < strs.length; i++) { - var str = strs[i]; - if (i === 0) { - hash = hashString(str); - } else { - hash = hashString(str, hash); - } - } - return hash; -}; - -/*global console */ -var warningsEnabled = true; -var warnSupported = console.warn != null; // eslint-disable-line no-console -var traceSupported = console.trace != null; // eslint-disable-line no-console - -var MAX_INT$1 = Number.MAX_SAFE_INTEGER || 9007199254740991; -var trueify = function trueify() { - return true; -}; -var falsify = function falsify() { - return false; -}; -var zeroify = function zeroify() { - return 0; -}; -var noop$1 = function noop() {}; -var error = function error(msg) { - throw new Error(msg); -}; -var warnings = function warnings(enabled) { - if (enabled !== undefined) { - warningsEnabled = !!enabled; - } else { - return warningsEnabled; - } -}; -var warn = function warn(msg) { - /* eslint-disable no-console */ - if (!warnings()) { - return; - } - if (warnSupported) { - console.warn(msg); - } else { - console.log(msg); - if (traceSupported) { - console.trace(); - } - } -}; /* eslint-enable */ - -var clone = function clone(obj) { - return extend({}, obj); -}; - -// gets a shallow copy of the argument -var copy = function copy(obj) { - if (obj == null) { - return obj; - } - if (array(obj)) { - return obj.slice(); - } else if (plainObject(obj)) { - return clone(obj); - } else { - return obj; - } -}; -var copyArray$1 = function copyArray(arr) { - return arr.slice(); -}; -var uuid = function uuid(a, b /* placeholders */) { - for ( - // loop :) - b = a = ''; - // b - result , a - numeric letiable - a++ < 36; - // - b += a * 51 & 52 // if "a" is not 9 or 14 or 19 or 24 - ? - // return a random number or 4 - (a ^ 15 // if "a" is not 15 - ? - // generate a random number from 0 to 15 - 8 ^ Math.random() * (a ^ 20 ? 16 : 4) // unless "a" is 20, in which case a random number from 8 to 11 - : 4 // otherwise 4 - ).toString(16) : '-' // in other cases (if "a" is 9,14,19,24) insert "-" - ) { - } - return b; -}; -var _staticEmptyObject = {}; -var staticEmptyObject = function staticEmptyObject() { - return _staticEmptyObject; -}; -var defaults$g = function defaults(_defaults) { - var keys = Object.keys(_defaults); - return function (opts) { - var filledOpts = {}; - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - var optVal = opts == null ? undefined : opts[key]; - filledOpts[key] = optVal === undefined ? _defaults[key] : optVal; - } - return filledOpts; - }; -}; -var removeFromArray = function removeFromArray(arr, ele, oneCopy) { - for (var i = arr.length - 1; i >= 0; i--) { - if (arr[i] === ele) { - arr.splice(i, 1); - if (oneCopy) { - break; - } - } - } -}; -var clearArray = function clearArray(arr) { - arr.splice(0, arr.length); -}; -var push = function push(arr, otherArr) { - for (var i = 0; i < otherArr.length; i++) { - var el = otherArr[i]; - arr.push(el); - } -}; -var getPrefixedProperty = function getPrefixedProperty(obj, propName, prefix) { - if (prefix) { - propName = prependCamel(prefix, propName); // e.g. (labelWidth, source) => sourceLabelWidth - } - - return obj[propName]; -}; -var setPrefixedProperty = function setPrefixedProperty(obj, propName, prefix, value) { - if (prefix) { - propName = prependCamel(prefix, propName); // e.g. (labelWidth, source) => sourceLabelWidth - } - - obj[propName] = value; -}; - -/* global Map */ -var ObjectMap = /*#__PURE__*/function () { - function ObjectMap() { - _classCallCheck(this, ObjectMap); - this._obj = {}; - } - _createClass(ObjectMap, [{ - key: "set", - value: function set(key, val) { - this._obj[key] = val; - return this; - } - }, { - key: "delete", - value: function _delete(key) { - this._obj[key] = undefined; - return this; - } - }, { - key: "clear", - value: function clear() { - this._obj = {}; - } - }, { - key: "has", - value: function has(key) { - return this._obj[key] !== undefined; - } - }, { - key: "get", - value: function get(key) { - return this._obj[key]; - } - }]); - return ObjectMap; -}(); -var Map$2 = typeof Map !== 'undefined' ? Map : ObjectMap; - -/* global Set */ - -var undef = "undefined" ; -var ObjectSet = /*#__PURE__*/function () { - function ObjectSet(arrayOrObjectSet) { - _classCallCheck(this, ObjectSet); - this._obj = Object.create(null); - this.size = 0; - if (arrayOrObjectSet != null) { - var arr; - if (arrayOrObjectSet.instanceString != null && arrayOrObjectSet.instanceString() === this.instanceString()) { - arr = arrayOrObjectSet.toArray(); - } else { - arr = arrayOrObjectSet; - } - for (var i = 0; i < arr.length; i++) { - this.add(arr[i]); - } - } - } - _createClass(ObjectSet, [{ - key: "instanceString", - value: function instanceString() { - return 'set'; - } - }, { - key: "add", - value: function add(val) { - var o = this._obj; - if (o[val] !== 1) { - o[val] = 1; - this.size++; - } - } - }, { - key: "delete", - value: function _delete(val) { - var o = this._obj; - if (o[val] === 1) { - o[val] = 0; - this.size--; - } - } - }, { - key: "clear", - value: function clear() { - this._obj = Object.create(null); - } - }, { - key: "has", - value: function has(val) { - return this._obj[val] === 1; - } - }, { - key: "toArray", - value: function toArray() { - var _this = this; - return Object.keys(this._obj).filter(function (key) { - return _this.has(key); - }); - } - }, { - key: "forEach", - value: function forEach(callback, thisArg) { - return this.toArray().forEach(callback, thisArg); - } - }]); - return ObjectSet; -}(); -var Set$1 = (typeof Set === "undefined" ? "undefined" : _typeof(Set)) !== undef ? Set : ObjectSet; - -// represents a node or an edge -var Element = function Element(cy, params) { - var restore = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; - if (cy === undefined || params === undefined || !core(cy)) { - error('An element must have a core reference and parameters set'); - return; - } - var group = params.group; - - // try to automatically infer the group if unspecified - if (group == null) { - if (params.data && params.data.source != null && params.data.target != null) { - group = 'edges'; - } else { - group = 'nodes'; - } - } - - // validate group - if (group !== 'nodes' && group !== 'edges') { - error('An element must be of type `nodes` or `edges`; you specified `' + group + '`'); - return; - } - - // make the element array-like, just like a collection - this.length = 1; - this[0] = this; - - // NOTE: when something is added here, add also to ele.json() - var _p = this._private = { - cy: cy, - single: true, - // indicates this is an element - data: params.data || {}, - // data object - position: params.position || { - x: 0, - y: 0 - }, - // (x, y) position pair - autoWidth: undefined, - // width and height of nodes calculated by the renderer when set to special 'auto' value - autoHeight: undefined, - autoPadding: undefined, - compoundBoundsClean: false, - // whether the compound dimensions need to be recalculated the next time dimensions are read - listeners: [], - // array of bound listeners - group: group, - // string; 'nodes' or 'edges' - style: {}, - // properties as set by the style - rstyle: {}, - // properties for style sent from the renderer to the core - styleCxts: [], - // applied style contexts from the styler - styleKeys: {}, - // per-group keys of style property values - removed: true, - // whether it's inside the vis; true if removed (set true here since we call restore) - selected: params.selected ? true : false, - // whether it's selected - selectable: params.selectable === undefined ? true : params.selectable ? true : false, - // whether it's selectable - locked: params.locked ? true : false, - // whether the element is locked (cannot be moved) - grabbed: false, - // whether the element is grabbed by the mouse; renderer sets this privately - grabbable: params.grabbable === undefined ? true : params.grabbable ? true : false, - // whether the element can be grabbed - pannable: params.pannable === undefined ? group === 'edges' ? true : false : params.pannable ? true : false, - // whether the element has passthrough panning enabled - active: false, - // whether the element is active from user interaction - classes: new Set$1(), - // map ( className => true ) - animation: { - // object for currently-running animations - current: [], - queue: [] - }, - rscratch: {}, - // object in which the renderer can store information - scratch: params.scratch || {}, - // scratch objects - edges: [], - // array of connected edges - children: [], - // array of children - parent: params.parent && params.parent.isNode() ? params.parent : null, - // parent ref - traversalCache: {}, - // cache of output of traversal functions - backgrounding: false, - // whether background images are loading - bbCache: null, - // cache of the current bounding box - bbCacheShift: { - x: 0, - y: 0 - }, - // shift applied to cached bb to be applied on next get - bodyBounds: null, - // bounds cache of element body, w/o overlay - overlayBounds: null, - // bounds cache of element body, including overlay - labelBounds: { - // bounds cache of labels - all: null, - source: null, - target: null, - main: null - }, - arrowBounds: { - // bounds cache of edge arrows - source: null, - target: null, - 'mid-source': null, - 'mid-target': null - } - }; - if (_p.position.x == null) { - _p.position.x = 0; - } - if (_p.position.y == null) { - _p.position.y = 0; - } - - // renderedPosition overrides if specified - if (params.renderedPosition) { - var rpos = params.renderedPosition; - var pan = cy.pan(); - var zoom = cy.zoom(); - _p.position = { - x: (rpos.x - pan.x) / zoom, - y: (rpos.y - pan.y) / zoom - }; - } - var classes = []; - if (array(params.classes)) { - classes = params.classes; - } else if (string(params.classes)) { - classes = params.classes.split(/\s+/); - } - for (var i = 0, l = classes.length; i < l; i++) { - var cls = classes[i]; - if (!cls || cls === '') { - continue; - } - _p.classes.add(cls); - } - this.createEmitter(); - var bypass = params.style || params.css; - if (bypass) { - warn('Setting a `style` bypass at element creation should be done only when absolutely necessary. Try to use the stylesheet instead.'); - this.style(bypass); - } - if (restore === undefined || restore) { - this.restore(); - } -}; - -var defineSearch = function defineSearch(params) { - params = { - bfs: params.bfs || !params.dfs, - dfs: params.dfs || !params.bfs - }; - - // from pseudocode on wikipedia - return function searchFn(roots, fn, directed) { - var options; - if (plainObject(roots) && !elementOrCollection(roots)) { - options = roots; - roots = options.roots || options.root; - fn = options.visit; - directed = options.directed; - } - directed = arguments.length === 2 && !fn$6(fn) ? fn : directed; - fn = fn$6(fn) ? fn : function () {}; - var cy = this._private.cy; - var v = roots = string(roots) ? this.filter(roots) : roots; - var Q = []; - var connectedNodes = []; - var connectedBy = {}; - var id2depth = {}; - var V = {}; - var j = 0; - var found; - var _this$byGroup = this.byGroup(), - nodes = _this$byGroup.nodes, - edges = _this$byGroup.edges; - - // enqueue v - for (var i = 0; i < v.length; i++) { - var vi = v[i]; - var viId = vi.id(); - if (vi.isNode()) { - Q.unshift(vi); - if (params.bfs) { - V[viId] = true; - connectedNodes.push(vi); - } - id2depth[viId] = 0; - } - } - var _loop = function _loop() { - var v = params.bfs ? Q.shift() : Q.pop(); - var vId = v.id(); - if (params.dfs) { - if (V[vId]) { - return "continue"; - } - V[vId] = true; - connectedNodes.push(v); - } - var depth = id2depth[vId]; - var prevEdge = connectedBy[vId]; - var src = prevEdge != null ? prevEdge.source() : null; - var tgt = prevEdge != null ? prevEdge.target() : null; - var prevNode = prevEdge == null ? undefined : v.same(src) ? tgt[0] : src[0]; - var ret = void 0; - ret = fn(v, prevEdge, prevNode, j++, depth); - if (ret === true) { - found = v; - return "break"; - } - if (ret === false) { - return "break"; - } - var vwEdges = v.connectedEdges().filter(function (e) { - return (!directed || e.source().same(v)) && edges.has(e); - }); - for (var _i2 = 0; _i2 < vwEdges.length; _i2++) { - var e = vwEdges[_i2]; - var w = e.connectedNodes().filter(function (n) { - return !n.same(v) && nodes.has(n); - }); - var wId = w.id(); - if (w.length !== 0 && !V[wId]) { - w = w[0]; - Q.push(w); - if (params.bfs) { - V[wId] = true; - connectedNodes.push(w); - } - connectedBy[wId] = e; - id2depth[wId] = id2depth[vId] + 1; - } - } - }; - while (Q.length !== 0) { - var _ret = _loop(); - if (_ret === "continue") continue; - if (_ret === "break") break; - } - var connectedEles = cy.collection(); - for (var _i = 0; _i < connectedNodes.length; _i++) { - var node = connectedNodes[_i]; - var edge = connectedBy[node.id()]; - if (edge != null) { - connectedEles.push(edge); - } - connectedEles.push(node); - } - return { - path: cy.collection(connectedEles), - found: cy.collection(found) - }; - }; -}; - -// search, spanning trees, etc -var elesfn$v = { - breadthFirstSearch: defineSearch({ - bfs: true - }), - depthFirstSearch: defineSearch({ - dfs: true - }) -}; - -// nice, short mathematical alias -elesfn$v.bfs = elesfn$v.breadthFirstSearch; -elesfn$v.dfs = elesfn$v.depthFirstSearch; - -var heap$1 = createCommonjsModule(function (module, exports) { -// Generated by CoffeeScript 1.8.0 -(function() { - var Heap, defaultCmp, floor, heapify, heappop, heappush, heappushpop, heapreplace, insort, min, nlargest, nsmallest, updateItem, _siftdown, _siftup; - - floor = Math.floor, min = Math.min; - - - /* - Default comparison function to be used - */ - - defaultCmp = function(x, y) { - if (x < y) { - return -1; - } - if (x > y) { - return 1; - } - return 0; - }; - - - /* - Insert item x in list a, and keep it sorted assuming a is sorted. - - If x is already in a, insert it to the right of the rightmost x. - - Optional args lo (default 0) and hi (default a.length) bound the slice - of a to be searched. - */ - - insort = function(a, x, lo, hi, cmp) { - var mid; - if (lo == null) { - lo = 0; - } - if (cmp == null) { - cmp = defaultCmp; - } - if (lo < 0) { - throw new Error('lo must be non-negative'); - } - if (hi == null) { - hi = a.length; - } - while (lo < hi) { - mid = floor((lo + hi) / 2); - if (cmp(x, a[mid]) < 0) { - hi = mid; - } else { - lo = mid + 1; - } - } - return ([].splice.apply(a, [lo, lo - lo].concat(x)), x); - }; - - - /* - Push item onto heap, maintaining the heap invariant. - */ - - heappush = function(array, item, cmp) { - if (cmp == null) { - cmp = defaultCmp; - } - array.push(item); - return _siftdown(array, 0, array.length - 1, cmp); - }; - - - /* - Pop the smallest item off the heap, maintaining the heap invariant. - */ - - heappop = function(array, cmp) { - var lastelt, returnitem; - if (cmp == null) { - cmp = defaultCmp; - } - lastelt = array.pop(); - if (array.length) { - returnitem = array[0]; - array[0] = lastelt; - _siftup(array, 0, cmp); - } else { - returnitem = lastelt; - } - return returnitem; - }; - - - /* - Pop and return the current smallest value, and add the new item. - - This is more efficient than heappop() followed by heappush(), and can be - more appropriate when using a fixed size heap. Note that the value - returned may be larger than item! That constrains reasonable use of - this routine unless written as part of a conditional replacement: - if item > array[0] - item = heapreplace(array, item) - */ - - heapreplace = function(array, item, cmp) { - var returnitem; - if (cmp == null) { - cmp = defaultCmp; - } - returnitem = array[0]; - array[0] = item; - _siftup(array, 0, cmp); - return returnitem; - }; - - - /* - Fast version of a heappush followed by a heappop. - */ - - heappushpop = function(array, item, cmp) { - var _ref; - if (cmp == null) { - cmp = defaultCmp; - } - if (array.length && cmp(array[0], item) < 0) { - _ref = [array[0], item], item = _ref[0], array[0] = _ref[1]; - _siftup(array, 0, cmp); - } - return item; - }; - - - /* - Transform list into a heap, in-place, in O(array.length) time. - */ - - heapify = function(array, cmp) { - var i, _i, _len, _ref1, _results, _results1; - if (cmp == null) { - cmp = defaultCmp; - } - _ref1 = (function() { - _results1 = []; - for (var _j = 0, _ref = floor(array.length / 2); 0 <= _ref ? _j < _ref : _j > _ref; 0 <= _ref ? _j++ : _j--){ _results1.push(_j); } - return _results1; - }).apply(this).reverse(); - _results = []; - for (_i = 0, _len = _ref1.length; _i < _len; _i++) { - i = _ref1[_i]; - _results.push(_siftup(array, i, cmp)); - } - return _results; - }; - - - /* - Update the position of the given item in the heap. - This function should be called every time the item is being modified. - */ - - updateItem = function(array, item, cmp) { - var pos; - if (cmp == null) { - cmp = defaultCmp; - } - pos = array.indexOf(item); - if (pos === -1) { - return; - } - _siftdown(array, 0, pos, cmp); - return _siftup(array, pos, cmp); - }; - - - /* - Find the n largest elements in a dataset. - */ - - nlargest = function(array, n, cmp) { - var elem, result, _i, _len, _ref; - if (cmp == null) { - cmp = defaultCmp; - } - result = array.slice(0, n); - if (!result.length) { - return result; - } - heapify(result, cmp); - _ref = array.slice(n); - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - elem = _ref[_i]; - heappushpop(result, elem, cmp); - } - return result.sort(cmp).reverse(); - }; - - - /* - Find the n smallest elements in a dataset. - */ - - nsmallest = function(array, n, cmp) { - var elem, los, result, _i, _j, _len, _ref, _ref1, _results; - if (cmp == null) { - cmp = defaultCmp; - } - if (n * 10 <= array.length) { - result = array.slice(0, n).sort(cmp); - if (!result.length) { - return result; - } - los = result[result.length - 1]; - _ref = array.slice(n); - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - elem = _ref[_i]; - if (cmp(elem, los) < 0) { - insort(result, elem, 0, null, cmp); - result.pop(); - los = result[result.length - 1]; - } - } - return result; - } - heapify(array, cmp); - _results = []; - for (_j = 0, _ref1 = min(n, array.length); 0 <= _ref1 ? _j < _ref1 : _j > _ref1; 0 <= _ref1 ? ++_j : --_j) { - _results.push(heappop(array, cmp)); - } - return _results; - }; - - _siftdown = function(array, startpos, pos, cmp) { - var newitem, parent, parentpos; - if (cmp == null) { - cmp = defaultCmp; - } - newitem = array[pos]; - while (pos > startpos) { - parentpos = (pos - 1) >> 1; - parent = array[parentpos]; - if (cmp(newitem, parent) < 0) { - array[pos] = parent; - pos = parentpos; - continue; - } - break; - } - return array[pos] = newitem; - }; - - _siftup = function(array, pos, cmp) { - var childpos, endpos, newitem, rightpos, startpos; - if (cmp == null) { - cmp = defaultCmp; - } - endpos = array.length; - startpos = pos; - newitem = array[pos]; - childpos = 2 * pos + 1; - while (childpos < endpos) { - rightpos = childpos + 1; - if (rightpos < endpos && !(cmp(array[childpos], array[rightpos]) < 0)) { - childpos = rightpos; - } - array[pos] = array[childpos]; - pos = childpos; - childpos = 2 * pos + 1; - } - array[pos] = newitem; - return _siftdown(array, startpos, pos, cmp); - }; - - Heap = (function() { - Heap.push = heappush; - - Heap.pop = heappop; - - Heap.replace = heapreplace; - - Heap.pushpop = heappushpop; - - Heap.heapify = heapify; - - Heap.updateItem = updateItem; - - Heap.nlargest = nlargest; - - Heap.nsmallest = nsmallest; - - function Heap(cmp) { - this.cmp = cmp != null ? cmp : defaultCmp; - this.nodes = []; - } - - Heap.prototype.push = function(x) { - return heappush(this.nodes, x, this.cmp); - }; - - Heap.prototype.pop = function() { - return heappop(this.nodes, this.cmp); - }; - - Heap.prototype.peek = function() { - return this.nodes[0]; - }; - - Heap.prototype.contains = function(x) { - return this.nodes.indexOf(x) !== -1; - }; - - Heap.prototype.replace = function(x) { - return heapreplace(this.nodes, x, this.cmp); - }; - - Heap.prototype.pushpop = function(x) { - return heappushpop(this.nodes, x, this.cmp); - }; - - Heap.prototype.heapify = function() { - return heapify(this.nodes, this.cmp); - }; - - Heap.prototype.updateItem = function(x) { - return updateItem(this.nodes, x, this.cmp); - }; - - Heap.prototype.clear = function() { - return this.nodes = []; - }; - - Heap.prototype.empty = function() { - return this.nodes.length === 0; - }; - - Heap.prototype.size = function() { - return this.nodes.length; - }; - - Heap.prototype.clone = function() { - var heap; - heap = new Heap(); - heap.nodes = this.nodes.slice(0); - return heap; - }; - - Heap.prototype.toArray = function() { - return this.nodes.slice(0); - }; - - Heap.prototype.insert = Heap.prototype.push; - - Heap.prototype.top = Heap.prototype.peek; - - Heap.prototype.front = Heap.prototype.peek; - - Heap.prototype.has = Heap.prototype.contains; - - Heap.prototype.copy = Heap.prototype.clone; - - return Heap; - - })(); - - (function(root, factory) { - { - return module.exports = factory(); - } - })(this, function() { - return Heap; - }); - -}).call(commonjsGlobal); -}); - -var heap = heap$1; - -var dijkstraDefaults = defaults$g({ - root: null, - weight: function weight(edge) { - return 1; - }, - directed: false -}); -var elesfn$u = { - dijkstra: function dijkstra(options) { - if (!plainObject(options)) { - var args = arguments; - options = { - root: args[0], - weight: args[1], - directed: args[2] - }; - } - var _dijkstraDefaults = dijkstraDefaults(options), - root = _dijkstraDefaults.root, - weight = _dijkstraDefaults.weight, - directed = _dijkstraDefaults.directed; - var eles = this; - var weightFn = weight; - var source = string(root) ? this.filter(root)[0] : root[0]; - var dist = {}; - var prev = {}; - var knownDist = {}; - var _this$byGroup = this.byGroup(), - nodes = _this$byGroup.nodes, - edges = _this$byGroup.edges; - edges.unmergeBy(function (ele) { - return ele.isLoop(); - }); - var getDist = function getDist(node) { - return dist[node.id()]; - }; - var setDist = function setDist(node, d) { - dist[node.id()] = d; - Q.updateItem(node); - }; - var Q = new heap(function (a, b) { - return getDist(a) - getDist(b); - }); - for (var i = 0; i < nodes.length; i++) { - var node = nodes[i]; - dist[node.id()] = node.same(source) ? 0 : Infinity; - Q.push(node); - } - var distBetween = function distBetween(u, v) { - var uvs = (directed ? u.edgesTo(v) : u.edgesWith(v)).intersect(edges); - var smallestDistance = Infinity; - var smallestEdge; - for (var _i = 0; _i < uvs.length; _i++) { - var edge = uvs[_i]; - var _weight = weightFn(edge); - if (_weight < smallestDistance || !smallestEdge) { - smallestDistance = _weight; - smallestEdge = edge; - } - } - return { - edge: smallestEdge, - dist: smallestDistance - }; - }; - while (Q.size() > 0) { - var u = Q.pop(); - var smalletsDist = getDist(u); - var uid = u.id(); - knownDist[uid] = smalletsDist; - if (smalletsDist === Infinity) { - continue; - } - var neighbors = u.neighborhood().intersect(nodes); - for (var _i2 = 0; _i2 < neighbors.length; _i2++) { - var v = neighbors[_i2]; - var vid = v.id(); - var vDist = distBetween(u, v); - var alt = smalletsDist + vDist.dist; - if (alt < getDist(v)) { - setDist(v, alt); - prev[vid] = { - node: u, - edge: vDist.edge - }; - } - } // for - } // while - - return { - distanceTo: function distanceTo(node) { - var target = string(node) ? nodes.filter(node)[0] : node[0]; - return knownDist[target.id()]; - }, - pathTo: function pathTo(node) { - var target = string(node) ? nodes.filter(node)[0] : node[0]; - var S = []; - var u = target; - var uid = u.id(); - if (target.length > 0) { - S.unshift(target); - while (prev[uid]) { - var p = prev[uid]; - S.unshift(p.edge); - S.unshift(p.node); - u = p.node; - uid = u.id(); - } - } - return eles.spawn(S); - } - }; - } -}; - -var elesfn$t = { - // kruskal's algorithm (finds min spanning tree, assuming undirected graph) - // implemented from pseudocode from wikipedia - kruskal: function kruskal(weightFn) { - weightFn = weightFn || function (edge) { - return 1; - }; - var _this$byGroup = this.byGroup(), - nodes = _this$byGroup.nodes, - edges = _this$byGroup.edges; - var numNodes = nodes.length; - var forest = new Array(numNodes); - var A = nodes; // assumes byGroup() creates new collections that can be safely mutated - - var findSetIndex = function findSetIndex(ele) { - for (var i = 0; i < forest.length; i++) { - var eles = forest[i]; - if (eles.has(ele)) { - return i; - } - } - }; - - // start with one forest per node - for (var i = 0; i < numNodes; i++) { - forest[i] = this.spawn(nodes[i]); - } - var S = edges.sort(function (a, b) { - return weightFn(a) - weightFn(b); - }); - for (var _i = 0; _i < S.length; _i++) { - var edge = S[_i]; - var u = edge.source()[0]; - var v = edge.target()[0]; - var setUIndex = findSetIndex(u); - var setVIndex = findSetIndex(v); - var setU = forest[setUIndex]; - var setV = forest[setVIndex]; - if (setUIndex !== setVIndex) { - A.merge(edge); - - // combine forests for u and v - setU.merge(setV); - forest.splice(setVIndex, 1); - } - } - return A; - } -}; - -var aStarDefaults = defaults$g({ - root: null, - goal: null, - weight: function weight(edge) { - return 1; - }, - heuristic: function heuristic(edge) { - return 0; - }, - directed: false -}); -var elesfn$s = { - // Implemented from pseudocode from wikipedia - aStar: function aStar(options) { - var cy = this.cy(); - var _aStarDefaults = aStarDefaults(options), - root = _aStarDefaults.root, - goal = _aStarDefaults.goal, - heuristic = _aStarDefaults.heuristic, - directed = _aStarDefaults.directed, - weight = _aStarDefaults.weight; - root = cy.collection(root)[0]; - goal = cy.collection(goal)[0]; - var sid = root.id(); - var tid = goal.id(); - var gScore = {}; - var fScore = {}; - var closedSetIds = {}; - var openSet = new heap(function (a, b) { - return fScore[a.id()] - fScore[b.id()]; - }); - var openSetIds = new Set$1(); - var cameFrom = {}; - var cameFromEdge = {}; - var addToOpenSet = function addToOpenSet(ele, id) { - openSet.push(ele); - openSetIds.add(id); - }; - var cMin, cMinId; - var popFromOpenSet = function popFromOpenSet() { - cMin = openSet.pop(); - cMinId = cMin.id(); - openSetIds["delete"](cMinId); - }; - var isInOpenSet = function isInOpenSet(id) { - return openSetIds.has(id); - }; - addToOpenSet(root, sid); - gScore[sid] = 0; - fScore[sid] = heuristic(root); - - // Counter - var steps = 0; - - // Main loop - while (openSet.size() > 0) { - popFromOpenSet(); - steps++; - - // If we've found our goal, then we are done - if (cMinId === tid) { - var path = []; - var pathNode = goal; - var pathNodeId = tid; - var pathEdge = cameFromEdge[pathNodeId]; - for (;;) { - path.unshift(pathNode); - if (pathEdge != null) { - path.unshift(pathEdge); - } - pathNode = cameFrom[pathNodeId]; - if (pathNode == null) { - break; - } - pathNodeId = pathNode.id(); - pathEdge = cameFromEdge[pathNodeId]; - } - return { - found: true, - distance: gScore[cMinId], - path: this.spawn(path), - steps: steps - }; - } - - // Add cMin to processed nodes - closedSetIds[cMinId] = true; - - // Update scores for neighbors of cMin - // Take into account if graph is directed or not - var vwEdges = cMin._private.edges; - for (var i = 0; i < vwEdges.length; i++) { - var e = vwEdges[i]; - - // edge must be in set of calling eles - if (!this.hasElementWithId(e.id())) { - continue; - } - - // cMin must be the source of edge if directed - if (directed && e.data('source') !== cMinId) { - continue; - } - var wSrc = e.source(); - var wTgt = e.target(); - var w = wSrc.id() !== cMinId ? wSrc : wTgt; - var wid = w.id(); - - // node must be in set of calling eles - if (!this.hasElementWithId(wid)) { - continue; - } - - // if node is in closedSet, ignore it - if (closedSetIds[wid]) { - continue; - } - - // New tentative score for node w - var tempScore = gScore[cMinId] + weight(e); - - // Update gScore for node w if: - // w not present in openSet - // OR - // tentative gScore is less than previous value - - // w not in openSet - if (!isInOpenSet(wid)) { - gScore[wid] = tempScore; - fScore[wid] = tempScore + heuristic(w); - addToOpenSet(w, wid); - cameFrom[wid] = cMin; - cameFromEdge[wid] = e; - continue; - } - - // w already in openSet, but with greater gScore - if (tempScore < gScore[wid]) { - gScore[wid] = tempScore; - fScore[wid] = tempScore + heuristic(w); - cameFrom[wid] = cMin; - cameFromEdge[wid] = e; - } - } // End of neighbors update - } // End of main loop - - // If we've reached here, then we've not reached our goal - return { - found: false, - distance: undefined, - path: undefined, - steps: steps - }; - } -}; // elesfn - -var floydWarshallDefaults = defaults$g({ - weight: function weight(edge) { - return 1; - }, - directed: false -}); -var elesfn$r = { - // Implemented from pseudocode from wikipedia - floydWarshall: function floydWarshall(options) { - var cy = this.cy(); - var _floydWarshallDefault = floydWarshallDefaults(options), - weight = _floydWarshallDefault.weight, - directed = _floydWarshallDefault.directed; - var weightFn = weight; - var _this$byGroup = this.byGroup(), - nodes = _this$byGroup.nodes, - edges = _this$byGroup.edges; - var N = nodes.length; - var Nsq = N * N; - var indexOf = function indexOf(node) { - return nodes.indexOf(node); - }; - var atIndex = function atIndex(i) { - return nodes[i]; - }; - - // Initialize distance matrix - var dist = new Array(Nsq); - for (var n = 0; n < Nsq; n++) { - var j = n % N; - var i = (n - j) / N; - if (i === j) { - dist[n] = 0; - } else { - dist[n] = Infinity; - } - } - - // Initialize matrix used for path reconstruction - // Initialize distance matrix - var next = new Array(Nsq); - var edgeNext = new Array(Nsq); - - // Process edges - for (var _i = 0; _i < edges.length; _i++) { - var edge = edges[_i]; - var src = edge.source()[0]; - var tgt = edge.target()[0]; - if (src === tgt) { - continue; - } // exclude loops - - var s = indexOf(src); - var t = indexOf(tgt); - var st = s * N + t; // source to target index - var _weight = weightFn(edge); - - // Check if already process another edge between same 2 nodes - if (dist[st] > _weight) { - dist[st] = _weight; - next[st] = t; - edgeNext[st] = edge; - } - - // If undirected graph, process 'reversed' edge - if (!directed) { - var ts = t * N + s; // target to source index - - if (!directed && dist[ts] > _weight) { - dist[ts] = _weight; - next[ts] = s; - edgeNext[ts] = edge; - } - } - } - - // Main loop - for (var k = 0; k < N; k++) { - for (var _i2 = 0; _i2 < N; _i2++) { - var ik = _i2 * N + k; - for (var _j = 0; _j < N; _j++) { - var ij = _i2 * N + _j; - var kj = k * N + _j; - if (dist[ik] + dist[kj] < dist[ij]) { - dist[ij] = dist[ik] + dist[kj]; - next[ij] = next[ik]; - } - } - } - } - var getArgEle = function getArgEle(ele) { - return (string(ele) ? cy.filter(ele) : ele)[0]; - }; - var indexOfArgEle = function indexOfArgEle(ele) { - return indexOf(getArgEle(ele)); - }; - var res = { - distance: function distance(from, to) { - var i = indexOfArgEle(from); - var j = indexOfArgEle(to); - return dist[i * N + j]; - }, - path: function path(from, to) { - var i = indexOfArgEle(from); - var j = indexOfArgEle(to); - var fromNode = atIndex(i); - if (i === j) { - return fromNode.collection(); - } - if (next[i * N + j] == null) { - return cy.collection(); - } - var path = cy.collection(); - var prev = i; - var edge; - path.merge(fromNode); - while (i !== j) { - prev = i; - i = next[i * N + j]; - edge = edgeNext[prev * N + i]; - path.merge(edge); - path.merge(atIndex(i)); - } - return path; - } - }; - return res; - } // floydWarshall -}; // elesfn - -var bellmanFordDefaults = defaults$g({ - weight: function weight(edge) { - return 1; - }, - directed: false, - root: null -}); -var elesfn$q = { - // Implemented from pseudocode from wikipedia - bellmanFord: function bellmanFord(options) { - var _this = this; - var _bellmanFordDefaults = bellmanFordDefaults(options), - weight = _bellmanFordDefaults.weight, - directed = _bellmanFordDefaults.directed, - root = _bellmanFordDefaults.root; - var weightFn = weight; - var eles = this; - var cy = this.cy(); - var _this$byGroup = this.byGroup(), - edges = _this$byGroup.edges, - nodes = _this$byGroup.nodes; - var numNodes = nodes.length; - var infoMap = new Map$2(); - var hasNegativeWeightCycle = false; - var negativeWeightCycles = []; - root = cy.collection(root)[0]; // in case selector passed - - edges.unmergeBy(function (edge) { - return edge.isLoop(); - }); - var numEdges = edges.length; - var getInfo = function getInfo(node) { - var obj = infoMap.get(node.id()); - if (!obj) { - obj = {}; - infoMap.set(node.id(), obj); - } - return obj; - }; - var getNodeFromTo = function getNodeFromTo(to) { - return (string(to) ? cy.$(to) : to)[0]; - }; - var distanceTo = function distanceTo(to) { - return getInfo(getNodeFromTo(to)).dist; - }; - var pathTo = function pathTo(to) { - var thisStart = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : root; - var end = getNodeFromTo(to); - var path = []; - var node = end; - for (;;) { - if (node == null) { - return _this.spawn(); - } - var _getInfo = getInfo(node), - edge = _getInfo.edge, - pred = _getInfo.pred; - path.unshift(node[0]); - if (node.same(thisStart) && path.length > 0) { - break; - } - if (edge != null) { - path.unshift(edge); - } - node = pred; - } - return eles.spawn(path); - }; - - // Initializations { dist, pred, edge } - for (var i = 0; i < numNodes; i++) { - var node = nodes[i]; - var info = getInfo(node); - if (node.same(root)) { - info.dist = 0; - } else { - info.dist = Infinity; - } - info.pred = null; - info.edge = null; - } - - // Edges relaxation - var replacedEdge = false; - var checkForEdgeReplacement = function checkForEdgeReplacement(node1, node2, edge, info1, info2, weight) { - var dist = info1.dist + weight; - if (dist < info2.dist && !edge.same(info1.edge)) { - info2.dist = dist; - info2.pred = node1; - info2.edge = edge; - replacedEdge = true; - } - }; - for (var _i = 1; _i < numNodes; _i++) { - replacedEdge = false; - for (var e = 0; e < numEdges; e++) { - var edge = edges[e]; - var src = edge.source(); - var tgt = edge.target(); - var _weight = weightFn(edge); - var srcInfo = getInfo(src); - var tgtInfo = getInfo(tgt); - checkForEdgeReplacement(src, tgt, edge, srcInfo, tgtInfo, _weight); - - // If undirected graph, we need to take into account the 'reverse' edge - if (!directed) { - checkForEdgeReplacement(tgt, src, edge, tgtInfo, srcInfo, _weight); - } - } - if (!replacedEdge) { - break; - } - } - if (replacedEdge) { - // Check for negative weight cycles - var negativeWeightCycleIds = []; - for (var _e = 0; _e < numEdges; _e++) { - var _edge = edges[_e]; - var _src = _edge.source(); - var _tgt = _edge.target(); - var _weight2 = weightFn(_edge); - var srcDist = getInfo(_src).dist; - var tgtDist = getInfo(_tgt).dist; - if (srcDist + _weight2 < tgtDist || !directed && tgtDist + _weight2 < srcDist) { - if (!hasNegativeWeightCycle) { - warn('Graph contains a negative weight cycle for Bellman-Ford'); - hasNegativeWeightCycle = true; - } - if (options.findNegativeWeightCycles !== false) { - var negativeNodes = []; - if (srcDist + _weight2 < tgtDist) { - negativeNodes.push(_src); - } - if (!directed && tgtDist + _weight2 < srcDist) { - negativeNodes.push(_tgt); - } - var numNegativeNodes = negativeNodes.length; - for (var n = 0; n < numNegativeNodes; n++) { - var start = negativeNodes[n]; - var cycle = [start]; - cycle.push(getInfo(start).edge); - var _node = getInfo(start).pred; - while (cycle.indexOf(_node) === -1) { - cycle.push(_node); - cycle.push(getInfo(_node).edge); - _node = getInfo(_node).pred; - } - cycle = cycle.slice(cycle.indexOf(_node)); - var smallestId = cycle[0].id(); - var smallestIndex = 0; - for (var c = 2; c < cycle.length; c += 2) { - if (cycle[c].id() < smallestId) { - smallestId = cycle[c].id(); - smallestIndex = c; - } - } - cycle = cycle.slice(smallestIndex).concat(cycle.slice(0, smallestIndex)); - cycle.push(cycle[0]); - var cycleId = cycle.map(function (el) { - return el.id(); - }).join(","); - if (negativeWeightCycleIds.indexOf(cycleId) === -1) { - negativeWeightCycles.push(eles.spawn(cycle)); - negativeWeightCycleIds.push(cycleId); - } - } - } else { - break; - } - } - } - } - return { - distanceTo: distanceTo, - pathTo: pathTo, - hasNegativeWeightCycle: hasNegativeWeightCycle, - negativeWeightCycles: negativeWeightCycles - }; - } // bellmanFord -}; // elesfn - -var sqrt2 = Math.sqrt(2); - -// Function which colapses 2 (meta) nodes into one -// Updates the remaining edge lists -// Receives as a paramater the edge which causes the collapse -var collapse = function collapse(edgeIndex, nodeMap, remainingEdges) { - if (remainingEdges.length === 0) { - error("Karger-Stein must be run on a connected (sub)graph"); - } - var edgeInfo = remainingEdges[edgeIndex]; - var sourceIn = edgeInfo[1]; - var targetIn = edgeInfo[2]; - var partition1 = nodeMap[sourceIn]; - var partition2 = nodeMap[targetIn]; - var newEdges = remainingEdges; // re-use array - - // Delete all edges between partition1 and partition2 - for (var i = newEdges.length - 1; i >= 0; i--) { - var edge = newEdges[i]; - var src = edge[1]; - var tgt = edge[2]; - if (nodeMap[src] === partition1 && nodeMap[tgt] === partition2 || nodeMap[src] === partition2 && nodeMap[tgt] === partition1) { - newEdges.splice(i, 1); - } - } - - // All edges pointing to partition2 should now point to partition1 - for (var _i = 0; _i < newEdges.length; _i++) { - var _edge = newEdges[_i]; - if (_edge[1] === partition2) { - // Check source - newEdges[_i] = _edge.slice(); // copy - newEdges[_i][1] = partition1; - } else if (_edge[2] === partition2) { - // Check target - newEdges[_i] = _edge.slice(); // copy - newEdges[_i][2] = partition1; - } - } - - // Move all nodes from partition2 to partition1 - for (var _i2 = 0; _i2 < nodeMap.length; _i2++) { - if (nodeMap[_i2] === partition2) { - nodeMap[_i2] = partition1; - } - } - return newEdges; -}; - -// Contracts a graph until we reach a certain number of meta nodes -var contractUntil = function contractUntil(metaNodeMap, remainingEdges, size, sizeLimit) { - while (size > sizeLimit) { - // Choose an edge randomly - var edgeIndex = Math.floor(Math.random() * remainingEdges.length); - - // Collapse graph based on edge - remainingEdges = collapse(edgeIndex, metaNodeMap, remainingEdges); - size--; - } - return remainingEdges; -}; -var elesfn$p = { - // Computes the minimum cut of an undirected graph - // Returns the correct answer with high probability - kargerStein: function kargerStein() { - var _this = this; - var _this$byGroup = this.byGroup(), - nodes = _this$byGroup.nodes, - edges = _this$byGroup.edges; - edges.unmergeBy(function (edge) { - return edge.isLoop(); - }); - var numNodes = nodes.length; - var numEdges = edges.length; - var numIter = Math.ceil(Math.pow(Math.log(numNodes) / Math.LN2, 2)); - var stopSize = Math.floor(numNodes / sqrt2); - if (numNodes < 2) { - error('At least 2 nodes are required for Karger-Stein algorithm'); - return undefined; - } - - // Now store edge destination as indexes - // Format for each edge (edge index, source node index, target node index) - var edgeIndexes = []; - for (var i = 0; i < numEdges; i++) { - var e = edges[i]; - edgeIndexes.push([i, nodes.indexOf(e.source()), nodes.indexOf(e.target())]); - } - - // We will store the best cut found here - var minCutSize = Infinity; - var minCutEdgeIndexes = []; - var minCutNodeMap = new Array(numNodes); - - // Initial meta node partition - var metaNodeMap = new Array(numNodes); - var metaNodeMap2 = new Array(numNodes); - var copyNodesMap = function copyNodesMap(from, to) { - for (var _i3 = 0; _i3 < numNodes; _i3++) { - to[_i3] = from[_i3]; - } - }; - - // Main loop - for (var iter = 0; iter <= numIter; iter++) { - // Reset meta node partition - for (var _i4 = 0; _i4 < numNodes; _i4++) { - metaNodeMap[_i4] = _i4; - } - - // Contract until stop point (stopSize nodes) - var edgesState = contractUntil(metaNodeMap, edgeIndexes.slice(), numNodes, stopSize); - var edgesState2 = edgesState.slice(); // copy - - // Create a copy of the colapsed nodes state - copyNodesMap(metaNodeMap, metaNodeMap2); - - // Run 2 iterations starting in the stop state - var res1 = contractUntil(metaNodeMap, edgesState, stopSize, 2); - var res2 = contractUntil(metaNodeMap2, edgesState2, stopSize, 2); - - // Is any of the 2 results the best cut so far? - if (res1.length <= res2.length && res1.length < minCutSize) { - minCutSize = res1.length; - minCutEdgeIndexes = res1; - copyNodesMap(metaNodeMap, minCutNodeMap); - } else if (res2.length <= res1.length && res2.length < minCutSize) { - minCutSize = res2.length; - minCutEdgeIndexes = res2; - copyNodesMap(metaNodeMap2, minCutNodeMap); - } - } // end of main loop - - // Construct result - var cut = this.spawn(minCutEdgeIndexes.map(function (e) { - return edges[e[0]]; - })); - var partition1 = this.spawn(); - var partition2 = this.spawn(); - - // traverse metaNodeMap for best cut - var witnessNodePartition = minCutNodeMap[0]; - for (var _i5 = 0; _i5 < minCutNodeMap.length; _i5++) { - var partitionId = minCutNodeMap[_i5]; - var node = nodes[_i5]; - if (partitionId === witnessNodePartition) { - partition1.merge(node); - } else { - partition2.merge(node); - } - } - - // construct components corresponding to each disjoint subset of nodes - var constructComponent = function constructComponent(subset) { - var component = _this.spawn(); - subset.forEach(function (node) { - component.merge(node); - node.connectedEdges().forEach(function (edge) { - // ensure edge is within calling collection and edge is not in cut - if (_this.contains(edge) && !cut.contains(edge)) { - component.merge(edge); - } - }); - }); - return component; - }; - var components = [constructComponent(partition1), constructComponent(partition2)]; - var ret = { - cut: cut, - components: components, - // n.b. partitions are included to be compatible with the old api spec - // (could be removed in a future major version) - partition1: partition1, - partition2: partition2 - }; - return ret; - } -}; // elesfn - -var copyPosition = function copyPosition(p) { - return { - x: p.x, - y: p.y - }; -}; -var modelToRenderedPosition = function modelToRenderedPosition(p, zoom, pan) { - return { - x: p.x * zoom + pan.x, - y: p.y * zoom + pan.y - }; -}; -var renderedToModelPosition = function renderedToModelPosition(p, zoom, pan) { - return { - x: (p.x - pan.x) / zoom, - y: (p.y - pan.y) / zoom - }; -}; -var array2point = function array2point(arr) { - return { - x: arr[0], - y: arr[1] - }; -}; -var min = function min(arr) { - var begin = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; - var end = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : arr.length; - var min = Infinity; - for (var i = begin; i < end; i++) { - var val = arr[i]; - if (isFinite(val)) { - min = Math.min(val, min); - } - } - return min; -}; -var max = function max(arr) { - var begin = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; - var end = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : arr.length; - var max = -Infinity; - for (var i = begin; i < end; i++) { - var val = arr[i]; - if (isFinite(val)) { - max = Math.max(val, max); - } - } - return max; -}; -var mean = function mean(arr) { - var begin = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; - var end = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : arr.length; - var total = 0; - var n = 0; - for (var i = begin; i < end; i++) { - var val = arr[i]; - if (isFinite(val)) { - total += val; - n++; - } - } - return total / n; -}; -var median = function median(arr) { - var begin = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; - var end = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : arr.length; - var copy = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true; - var sort = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true; - var includeHoles = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true; - if (copy) { - arr = arr.slice(begin, end); - } else { - if (end < arr.length) { - arr.splice(end, arr.length - end); - } - if (begin > 0) { - arr.splice(0, begin); - } - } - - // all non finite (e.g. Infinity, NaN) elements must be -Infinity so they go to the start - var off = 0; // offset from non-finite values - for (var i = arr.length - 1; i >= 0; i--) { - var v = arr[i]; - if (includeHoles) { - if (!isFinite(v)) { - arr[i] = -Infinity; - off++; - } - } else { - // just remove it if we don't want to consider holes - arr.splice(i, 1); - } - } - if (sort) { - arr.sort(function (a, b) { - return a - b; - }); // requires copy = true if you don't want to change the orig - } - - var len = arr.length; - var mid = Math.floor(len / 2); - if (len % 2 !== 0) { - return arr[mid + 1 + off]; - } else { - return (arr[mid - 1 + off] + arr[mid + off]) / 2; - } -}; -var deg2rad = function deg2rad(deg) { - return Math.PI * deg / 180; -}; -var getAngleFromDisp = function getAngleFromDisp(dispX, dispY) { - return Math.atan2(dispY, dispX) - Math.PI / 2; -}; -var log2 = Math.log2 || function (n) { - return Math.log(n) / Math.log(2); -}; -var signum = function signum(x) { - if (x > 0) { - return 1; - } else if (x < 0) { - return -1; - } else { - return 0; - } -}; -var dist = function dist(p1, p2) { - return Math.sqrt(sqdist(p1, p2)); -}; -var sqdist = function sqdist(p1, p2) { - var dx = p2.x - p1.x; - var dy = p2.y - p1.y; - return dx * dx + dy * dy; -}; -var inPlaceSumNormalize = function inPlaceSumNormalize(v) { - var length = v.length; - - // First, get sum of all elements - var total = 0; - for (var i = 0; i < length; i++) { - total += v[i]; - } - - // Now, divide each by the sum of all elements - for (var _i = 0; _i < length; _i++) { - v[_i] = v[_i] / total; - } - return v; -}; - -// from http://en.wikipedia.org/wiki/Bézier_curve#Quadratic_curves -var qbezierAt = function qbezierAt(p0, p1, p2, t) { - return (1 - t) * (1 - t) * p0 + 2 * (1 - t) * t * p1 + t * t * p2; -}; -var qbezierPtAt = function qbezierPtAt(p0, p1, p2, t) { - return { - x: qbezierAt(p0.x, p1.x, p2.x, t), - y: qbezierAt(p0.y, p1.y, p2.y, t) - }; -}; -var lineAt = function lineAt(p0, p1, t, d) { - var vec = { - x: p1.x - p0.x, - y: p1.y - p0.y - }; - var vecDist = dist(p0, p1); - var normVec = { - x: vec.x / vecDist, - y: vec.y / vecDist - }; - t = t == null ? 0 : t; - d = d != null ? d : t * vecDist; - return { - x: p0.x + normVec.x * d, - y: p0.y + normVec.y * d - }; -}; -var bound = function bound(min, val, max) { - return Math.max(min, Math.min(max, val)); -}; - -// makes a full bb (x1, y1, x2, y2, w, h) from implicit params -var makeBoundingBox = function makeBoundingBox(bb) { - if (bb == null) { - return { - x1: Infinity, - y1: Infinity, - x2: -Infinity, - y2: -Infinity, - w: 0, - h: 0 - }; - } else if (bb.x1 != null && bb.y1 != null) { - if (bb.x2 != null && bb.y2 != null && bb.x2 >= bb.x1 && bb.y2 >= bb.y1) { - return { - x1: bb.x1, - y1: bb.y1, - x2: bb.x2, - y2: bb.y2, - w: bb.x2 - bb.x1, - h: bb.y2 - bb.y1 - }; - } else if (bb.w != null && bb.h != null && bb.w >= 0 && bb.h >= 0) { - return { - x1: bb.x1, - y1: bb.y1, - x2: bb.x1 + bb.w, - y2: bb.y1 + bb.h, - w: bb.w, - h: bb.h - }; - } - } -}; -var copyBoundingBox = function copyBoundingBox(bb) { - return { - x1: bb.x1, - x2: bb.x2, - w: bb.w, - y1: bb.y1, - y2: bb.y2, - h: bb.h - }; -}; -var clearBoundingBox = function clearBoundingBox(bb) { - bb.x1 = Infinity; - bb.y1 = Infinity; - bb.x2 = -Infinity; - bb.y2 = -Infinity; - bb.w = 0; - bb.h = 0; -}; -var shiftBoundingBox = function shiftBoundingBox(bb, dx, dy) { - return { - x1: bb.x1 + dx, - x2: bb.x2 + dx, - y1: bb.y1 + dy, - y2: bb.y2 + dy, - w: bb.w, - h: bb.h - }; -}; -var updateBoundingBox = function updateBoundingBox(bb1, bb2) { - // update bb1 with bb2 bounds - - bb1.x1 = Math.min(bb1.x1, bb2.x1); - bb1.x2 = Math.max(bb1.x2, bb2.x2); - bb1.w = bb1.x2 - bb1.x1; - bb1.y1 = Math.min(bb1.y1, bb2.y1); - bb1.y2 = Math.max(bb1.y2, bb2.y2); - bb1.h = bb1.y2 - bb1.y1; -}; -var expandBoundingBoxByPoint = function expandBoundingBoxByPoint(bb, x, y) { - bb.x1 = Math.min(bb.x1, x); - bb.x2 = Math.max(bb.x2, x); - bb.w = bb.x2 - bb.x1; - bb.y1 = Math.min(bb.y1, y); - bb.y2 = Math.max(bb.y2, y); - bb.h = bb.y2 - bb.y1; -}; -var expandBoundingBox = function expandBoundingBox(bb) { - var padding = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; - bb.x1 -= padding; - bb.x2 += padding; - bb.y1 -= padding; - bb.y2 += padding; - bb.w = bb.x2 - bb.x1; - bb.h = bb.y2 - bb.y1; - return bb; -}; -var expandBoundingBoxSides = function expandBoundingBoxSides(bb) { - var padding = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [0]; - var top, right, bottom, left; - if (padding.length === 1) { - top = right = bottom = left = padding[0]; - } else if (padding.length === 2) { - top = bottom = padding[0]; - left = right = padding[1]; - } else if (padding.length === 4) { - var _padding = _slicedToArray(padding, 4); - top = _padding[0]; - right = _padding[1]; - bottom = _padding[2]; - left = _padding[3]; - } - bb.x1 -= left; - bb.x2 += right; - bb.y1 -= top; - bb.y2 += bottom; - bb.w = bb.x2 - bb.x1; - bb.h = bb.y2 - bb.y1; - return bb; -}; - -// assign the values of bb2 into bb1 -var assignBoundingBox = function assignBoundingBox(bb1, bb2) { - bb1.x1 = bb2.x1; - bb1.y1 = bb2.y1; - bb1.x2 = bb2.x2; - bb1.y2 = bb2.y2; - bb1.w = bb1.x2 - bb1.x1; - bb1.h = bb1.y2 - bb1.y1; -}; -var boundingBoxesIntersect = function boundingBoxesIntersect(bb1, bb2) { - // case: one bb to right of other - if (bb1.x1 > bb2.x2) { - return false; - } - if (bb2.x1 > bb1.x2) { - return false; - } - - // case: one bb to left of other - if (bb1.x2 < bb2.x1) { - return false; - } - if (bb2.x2 < bb1.x1) { - return false; - } - - // case: one bb above other - if (bb1.y2 < bb2.y1) { - return false; - } - if (bb2.y2 < bb1.y1) { - return false; - } - - // case: one bb below other - if (bb1.y1 > bb2.y2) { - return false; - } - if (bb2.y1 > bb1.y2) { - return false; - } - - // otherwise, must have some overlap - return true; -}; -var inBoundingBox = function inBoundingBox(bb, x, y) { - return bb.x1 <= x && x <= bb.x2 && bb.y1 <= y && y <= bb.y2; -}; -var pointInBoundingBox = function pointInBoundingBox(bb, pt) { - return inBoundingBox(bb, pt.x, pt.y); -}; -var boundingBoxInBoundingBox = function boundingBoxInBoundingBox(bb1, bb2) { - return inBoundingBox(bb1, bb2.x1, bb2.y1) && inBoundingBox(bb1, bb2.x2, bb2.y2); -}; -var roundRectangleIntersectLine = function roundRectangleIntersectLine(x, y, nodeX, nodeY, width, height, padding) { - var radius = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 'auto'; - var cornerRadius = radius === 'auto' ? getRoundRectangleRadius(width, height) : radius; - var halfWidth = width / 2; - var halfHeight = height / 2; - cornerRadius = Math.min(cornerRadius, halfWidth, halfHeight); - var doWidth = cornerRadius !== halfWidth, - doHeight = cornerRadius !== halfHeight; - - // Check intersections with straight line segments - var straightLineIntersections; - - // Top segment, left to right - if (doWidth) { - var topStartX = nodeX - halfWidth + cornerRadius - padding; - var topStartY = nodeY - halfHeight - padding; - var topEndX = nodeX + halfWidth - cornerRadius + padding; - var topEndY = topStartY; - straightLineIntersections = finiteLinesIntersect(x, y, nodeX, nodeY, topStartX, topStartY, topEndX, topEndY, false); - if (straightLineIntersections.length > 0) { - return straightLineIntersections; - } - } - - // Right segment, top to bottom - if (doHeight) { - var rightStartX = nodeX + halfWidth + padding; - var rightStartY = nodeY - halfHeight + cornerRadius - padding; - var rightEndX = rightStartX; - var rightEndY = nodeY + halfHeight - cornerRadius + padding; - straightLineIntersections = finiteLinesIntersect(x, y, nodeX, nodeY, rightStartX, rightStartY, rightEndX, rightEndY, false); - if (straightLineIntersections.length > 0) { - return straightLineIntersections; - } - } - - // Bottom segment, left to right - if (doWidth) { - var bottomStartX = nodeX - halfWidth + cornerRadius - padding; - var bottomStartY = nodeY + halfHeight + padding; - var bottomEndX = nodeX + halfWidth - cornerRadius + padding; - var bottomEndY = bottomStartY; - straightLineIntersections = finiteLinesIntersect(x, y, nodeX, nodeY, bottomStartX, bottomStartY, bottomEndX, bottomEndY, false); - if (straightLineIntersections.length > 0) { - return straightLineIntersections; - } - } - - // Left segment, top to bottom - if (doHeight) { - var leftStartX = nodeX - halfWidth - padding; - var leftStartY = nodeY - halfHeight + cornerRadius - padding; - var leftEndX = leftStartX; - var leftEndY = nodeY + halfHeight - cornerRadius + padding; - straightLineIntersections = finiteLinesIntersect(x, y, nodeX, nodeY, leftStartX, leftStartY, leftEndX, leftEndY, false); - if (straightLineIntersections.length > 0) { - return straightLineIntersections; - } - } - - // Check intersections with arc segments - var arcIntersections; - - // Top Left - { - var topLeftCenterX = nodeX - halfWidth + cornerRadius; - var topLeftCenterY = nodeY - halfHeight + cornerRadius; - arcIntersections = intersectLineCircle(x, y, nodeX, nodeY, topLeftCenterX, topLeftCenterY, cornerRadius + padding); - - // Ensure the intersection is on the desired quarter of the circle - if (arcIntersections.length > 0 && arcIntersections[0] <= topLeftCenterX && arcIntersections[1] <= topLeftCenterY) { - return [arcIntersections[0], arcIntersections[1]]; - } - } - - // Top Right - { - var topRightCenterX = nodeX + halfWidth - cornerRadius; - var topRightCenterY = nodeY - halfHeight + cornerRadius; - arcIntersections = intersectLineCircle(x, y, nodeX, nodeY, topRightCenterX, topRightCenterY, cornerRadius + padding); - - // Ensure the intersection is on the desired quarter of the circle - if (arcIntersections.length > 0 && arcIntersections[0] >= topRightCenterX && arcIntersections[1] <= topRightCenterY) { - return [arcIntersections[0], arcIntersections[1]]; - } - } - - // Bottom Right - { - var bottomRightCenterX = nodeX + halfWidth - cornerRadius; - var bottomRightCenterY = nodeY + halfHeight - cornerRadius; - arcIntersections = intersectLineCircle(x, y, nodeX, nodeY, bottomRightCenterX, bottomRightCenterY, cornerRadius + padding); - - // Ensure the intersection is on the desired quarter of the circle - if (arcIntersections.length > 0 && arcIntersections[0] >= bottomRightCenterX && arcIntersections[1] >= bottomRightCenterY) { - return [arcIntersections[0], arcIntersections[1]]; - } - } - - // Bottom Left - { - var bottomLeftCenterX = nodeX - halfWidth + cornerRadius; - var bottomLeftCenterY = nodeY + halfHeight - cornerRadius; - arcIntersections = intersectLineCircle(x, y, nodeX, nodeY, bottomLeftCenterX, bottomLeftCenterY, cornerRadius + padding); - - // Ensure the intersection is on the desired quarter of the circle - if (arcIntersections.length > 0 && arcIntersections[0] <= bottomLeftCenterX && arcIntersections[1] >= bottomLeftCenterY) { - return [arcIntersections[0], arcIntersections[1]]; - } - } - return []; // if nothing -}; - -var inLineVicinity = function inLineVicinity(x, y, lx1, ly1, lx2, ly2, tolerance) { - var t = tolerance; - var x1 = Math.min(lx1, lx2); - var x2 = Math.max(lx1, lx2); - var y1 = Math.min(ly1, ly2); - var y2 = Math.max(ly1, ly2); - return x1 - t <= x && x <= x2 + t && y1 - t <= y && y <= y2 + t; -}; -var inBezierVicinity = function inBezierVicinity(x, y, x1, y1, x2, y2, x3, y3, tolerance) { - var bb = { - x1: Math.min(x1, x3, x2) - tolerance, - x2: Math.max(x1, x3, x2) + tolerance, - y1: Math.min(y1, y3, y2) - tolerance, - y2: Math.max(y1, y3, y2) + tolerance - }; - - // if outside the rough bounding box for the bezier, then it can't be a hit - if (x < bb.x1 || x > bb.x2 || y < bb.y1 || y > bb.y2) { - // console.log('bezier out of rough bb') - return false; - } else { - // console.log('do more expensive check'); - return true; - } -}; -var solveQuadratic = function solveQuadratic(a, b, c, val) { - c -= val; - var r = b * b - 4 * a * c; - if (r < 0) { - return []; - } - var sqrtR = Math.sqrt(r); - var denom = 2 * a; - var root1 = (-b + sqrtR) / denom; - var root2 = (-b - sqrtR) / denom; - return [root1, root2]; -}; -var solveCubic = function solveCubic(a, b, c, d, result) { - // Solves a cubic function, returns root in form [r1, i1, r2, i2, r3, i3], where - // r is the real component, i is the imaginary component - - // An implementation of the Cardano method from the year 1545 - // http://en.wikipedia.org/wiki/Cubic_function#The_nature_of_the_roots - - var epsilon = 0.00001; - - // avoid division by zero while keeping the overall expression close in value - if (a === 0) { - a = epsilon; - } - b /= a; - c /= a; - d /= a; - var discriminant, q, r, dum1, s, t, term1, r13; - q = (3.0 * c - b * b) / 9.0; - r = -(27.0 * d) + b * (9.0 * c - 2.0 * (b * b)); - r /= 54.0; - discriminant = q * q * q + r * r; - result[1] = 0; - term1 = b / 3.0; - if (discriminant > 0) { - s = r + Math.sqrt(discriminant); - s = s < 0 ? -Math.pow(-s, 1.0 / 3.0) : Math.pow(s, 1.0 / 3.0); - t = r - Math.sqrt(discriminant); - t = t < 0 ? -Math.pow(-t, 1.0 / 3.0) : Math.pow(t, 1.0 / 3.0); - result[0] = -term1 + s + t; - term1 += (s + t) / 2.0; - result[4] = result[2] = -term1; - term1 = Math.sqrt(3.0) * (-t + s) / 2; - result[3] = term1; - result[5] = -term1; - return; - } - result[5] = result[3] = 0; - if (discriminant === 0) { - r13 = r < 0 ? -Math.pow(-r, 1.0 / 3.0) : Math.pow(r, 1.0 / 3.0); - result[0] = -term1 + 2.0 * r13; - result[4] = result[2] = -(r13 + term1); - return; - } - q = -q; - dum1 = q * q * q; - dum1 = Math.acos(r / Math.sqrt(dum1)); - r13 = 2.0 * Math.sqrt(q); - result[0] = -term1 + r13 * Math.cos(dum1 / 3.0); - result[2] = -term1 + r13 * Math.cos((dum1 + 2.0 * Math.PI) / 3.0); - result[4] = -term1 + r13 * Math.cos((dum1 + 4.0 * Math.PI) / 3.0); - return; -}; -var sqdistToQuadraticBezier = function sqdistToQuadraticBezier(x, y, x1, y1, x2, y2, x3, y3) { - // Find minimum distance by using the minimum of the distance - // function between the given point and the curve - - // This gives the coefficients of the resulting cubic equation - // whose roots tell us where a possible minimum is - // (Coefficients are divided by 4) - - var a = 1.0 * x1 * x1 - 4 * x1 * x2 + 2 * x1 * x3 + 4 * x2 * x2 - 4 * x2 * x3 + x3 * x3 + y1 * y1 - 4 * y1 * y2 + 2 * y1 * y3 + 4 * y2 * y2 - 4 * y2 * y3 + y3 * y3; - var b = 1.0 * 9 * x1 * x2 - 3 * x1 * x1 - 3 * x1 * x3 - 6 * x2 * x2 + 3 * x2 * x3 + 9 * y1 * y2 - 3 * y1 * y1 - 3 * y1 * y3 - 6 * y2 * y2 + 3 * y2 * y3; - var c = 1.0 * 3 * x1 * x1 - 6 * x1 * x2 + x1 * x3 - x1 * x + 2 * x2 * x2 + 2 * x2 * x - x3 * x + 3 * y1 * y1 - 6 * y1 * y2 + y1 * y3 - y1 * y + 2 * y2 * y2 + 2 * y2 * y - y3 * y; - var d = 1.0 * x1 * x2 - x1 * x1 + x1 * x - x2 * x + y1 * y2 - y1 * y1 + y1 * y - y2 * y; - - // debug("coefficients: " + a / a + ", " + b / a + ", " + c / a + ", " + d / a); - - var roots = []; - - // Use the cubic solving algorithm - solveCubic(a, b, c, d, roots); - var zeroThreshold = 0.0000001; - var params = []; - for (var index = 0; index < 6; index += 2) { - if (Math.abs(roots[index + 1]) < zeroThreshold && roots[index] >= 0 && roots[index] <= 1.0) { - params.push(roots[index]); - } - } - params.push(1.0); - params.push(0.0); - var minDistanceSquared = -1; - var curX, curY, distSquared; - for (var i = 0; i < params.length; i++) { - curX = Math.pow(1.0 - params[i], 2.0) * x1 + 2.0 * (1 - params[i]) * params[i] * x2 + params[i] * params[i] * x3; - curY = Math.pow(1 - params[i], 2.0) * y1 + 2 * (1.0 - params[i]) * params[i] * y2 + params[i] * params[i] * y3; - distSquared = Math.pow(curX - x, 2) + Math.pow(curY - y, 2); - // debug('distance for param ' + params[i] + ": " + Math.sqrt(distSquared)); - if (minDistanceSquared >= 0) { - if (distSquared < minDistanceSquared) { - minDistanceSquared = distSquared; - } - } else { - minDistanceSquared = distSquared; - } - } - return minDistanceSquared; -}; -var sqdistToFiniteLine = function sqdistToFiniteLine(x, y, x1, y1, x2, y2) { - var offset = [x - x1, y - y1]; - var line = [x2 - x1, y2 - y1]; - var lineSq = line[0] * line[0] + line[1] * line[1]; - var hypSq = offset[0] * offset[0] + offset[1] * offset[1]; - var dotProduct = offset[0] * line[0] + offset[1] * line[1]; - var adjSq = dotProduct * dotProduct / lineSq; - if (dotProduct < 0) { - return hypSq; - } - if (adjSq > lineSq) { - return (x - x2) * (x - x2) + (y - y2) * (y - y2); - } - return hypSq - adjSq; -}; -var pointInsidePolygonPoints = function pointInsidePolygonPoints(x, y, points) { - var x1, y1, x2, y2; - var y3; - - // Intersect with vertical line through (x, y) - var up = 0; - // let down = 0; - for (var i = 0; i < points.length / 2; i++) { - x1 = points[i * 2]; - y1 = points[i * 2 + 1]; - if (i + 1 < points.length / 2) { - x2 = points[(i + 1) * 2]; - y2 = points[(i + 1) * 2 + 1]; - } else { - x2 = points[(i + 1 - points.length / 2) * 2]; - y2 = points[(i + 1 - points.length / 2) * 2 + 1]; - } - if (x1 == x && x2 == x) ; else if (x1 >= x && x >= x2 || x1 <= x && x <= x2) { - y3 = (x - x1) / (x2 - x1) * (y2 - y1) + y1; - if (y3 > y) { - up++; - } - - // if( y3 < y ){ - // down++; - // } - } else { - continue; - } - } - if (up % 2 === 0) { - return false; - } else { - return true; - } -}; -var pointInsidePolygon = function pointInsidePolygon(x, y, basePoints, centerX, centerY, width, height, direction, padding) { - var transformedPoints = new Array(basePoints.length); - - // Gives negative angle - var angle; - if (direction[0] != null) { - angle = Math.atan(direction[1] / direction[0]); - if (direction[0] < 0) { - angle = angle + Math.PI / 2; - } else { - angle = -angle - Math.PI / 2; - } - } else { - angle = direction; - } - var cos = Math.cos(-angle); - var sin = Math.sin(-angle); - - // console.log("base: " + basePoints); - for (var i = 0; i < transformedPoints.length / 2; i++) { - transformedPoints[i * 2] = width / 2 * (basePoints[i * 2] * cos - basePoints[i * 2 + 1] * sin); - transformedPoints[i * 2 + 1] = height / 2 * (basePoints[i * 2 + 1] * cos + basePoints[i * 2] * sin); - transformedPoints[i * 2] += centerX; - transformedPoints[i * 2 + 1] += centerY; - } - var points; - if (padding > 0) { - var expandedLineSet = expandPolygon(transformedPoints, -padding); - points = joinLines(expandedLineSet); - } else { - points = transformedPoints; - } - return pointInsidePolygonPoints(x, y, points); -}; -var pointInsideRoundPolygon = function pointInsideRoundPolygon(x, y, basePoints, centerX, centerY, width, height, corners) { - var cutPolygonPoints = new Array(basePoints.length * 2); - for (var i = 0; i < corners.length; i++) { - var corner = corners[i]; - cutPolygonPoints[i * 4 + 0] = corner.startX; - cutPolygonPoints[i * 4 + 1] = corner.startY; - cutPolygonPoints[i * 4 + 2] = corner.stopX; - cutPolygonPoints[i * 4 + 3] = corner.stopY; - var squaredDistance = Math.pow(corner.cx - x, 2) + Math.pow(corner.cy - y, 2); - if (squaredDistance <= Math.pow(corner.radius, 2)) { - return true; - } - } - return pointInsidePolygonPoints(x, y, cutPolygonPoints); -}; -var joinLines = function joinLines(lineSet) { - var vertices = new Array(lineSet.length / 2); - var currentLineStartX, currentLineStartY, currentLineEndX, currentLineEndY; - var nextLineStartX, nextLineStartY, nextLineEndX, nextLineEndY; - for (var i = 0; i < lineSet.length / 4; i++) { - currentLineStartX = lineSet[i * 4]; - currentLineStartY = lineSet[i * 4 + 1]; - currentLineEndX = lineSet[i * 4 + 2]; - currentLineEndY = lineSet[i * 4 + 3]; - if (i < lineSet.length / 4 - 1) { - nextLineStartX = lineSet[(i + 1) * 4]; - nextLineStartY = lineSet[(i + 1) * 4 + 1]; - nextLineEndX = lineSet[(i + 1) * 4 + 2]; - nextLineEndY = lineSet[(i + 1) * 4 + 3]; - } else { - nextLineStartX = lineSet[0]; - nextLineStartY = lineSet[1]; - nextLineEndX = lineSet[2]; - nextLineEndY = lineSet[3]; - } - var intersection = finiteLinesIntersect(currentLineStartX, currentLineStartY, currentLineEndX, currentLineEndY, nextLineStartX, nextLineStartY, nextLineEndX, nextLineEndY, true); - vertices[i * 2] = intersection[0]; - vertices[i * 2 + 1] = intersection[1]; - } - return vertices; -}; -var expandPolygon = function expandPolygon(points, pad) { - var expandedLineSet = new Array(points.length * 2); - var currentPointX, currentPointY, nextPointX, nextPointY; - for (var i = 0; i < points.length / 2; i++) { - currentPointX = points[i * 2]; - currentPointY = points[i * 2 + 1]; - if (i < points.length / 2 - 1) { - nextPointX = points[(i + 1) * 2]; - nextPointY = points[(i + 1) * 2 + 1]; - } else { - nextPointX = points[0]; - nextPointY = points[1]; - } - - // Current line: [currentPointX, currentPointY] to [nextPointX, nextPointY] - - // Assume CCW polygon winding - - var offsetX = nextPointY - currentPointY; - var offsetY = -(nextPointX - currentPointX); - - // Normalize - var offsetLength = Math.sqrt(offsetX * offsetX + offsetY * offsetY); - var normalizedOffsetX = offsetX / offsetLength; - var normalizedOffsetY = offsetY / offsetLength; - expandedLineSet[i * 4] = currentPointX + normalizedOffsetX * pad; - expandedLineSet[i * 4 + 1] = currentPointY + normalizedOffsetY * pad; - expandedLineSet[i * 4 + 2] = nextPointX + normalizedOffsetX * pad; - expandedLineSet[i * 4 + 3] = nextPointY + normalizedOffsetY * pad; - } - return expandedLineSet; -}; -var intersectLineEllipse = function intersectLineEllipse(x, y, centerX, centerY, ellipseWradius, ellipseHradius) { - var dispX = centerX - x; - var dispY = centerY - y; - dispX /= ellipseWradius; - dispY /= ellipseHradius; - var len = Math.sqrt(dispX * dispX + dispY * dispY); - var newLength = len - 1; - if (newLength < 0) { - return []; - } - var lenProportion = newLength / len; - return [(centerX - x) * lenProportion + x, (centerY - y) * lenProportion + y]; -}; -var checkInEllipse = function checkInEllipse(x, y, width, height, centerX, centerY, padding) { - x -= centerX; - y -= centerY; - x /= width / 2 + padding; - y /= height / 2 + padding; - return x * x + y * y <= 1; -}; - -// Returns intersections of increasing distance from line's start point -var intersectLineCircle = function intersectLineCircle(x1, y1, x2, y2, centerX, centerY, radius) { - // Calculate d, direction vector of line - var d = [x2 - x1, y2 - y1]; // Direction vector of line - var f = [x1 - centerX, y1 - centerY]; - var a = d[0] * d[0] + d[1] * d[1]; - var b = 2 * (f[0] * d[0] + f[1] * d[1]); - var c = f[0] * f[0] + f[1] * f[1] - radius * radius; - var discriminant = b * b - 4 * a * c; - if (discriminant < 0) { - return []; - } - var t1 = (-b + Math.sqrt(discriminant)) / (2 * a); - var t2 = (-b - Math.sqrt(discriminant)) / (2 * a); - var tMin = Math.min(t1, t2); - var tMax = Math.max(t1, t2); - var inRangeParams = []; - if (tMin >= 0 && tMin <= 1) { - inRangeParams.push(tMin); - } - if (tMax >= 0 && tMax <= 1) { - inRangeParams.push(tMax); - } - if (inRangeParams.length === 0) { - return []; - } - var nearIntersectionX = inRangeParams[0] * d[0] + x1; - var nearIntersectionY = inRangeParams[0] * d[1] + y1; - if (inRangeParams.length > 1) { - if (inRangeParams[0] == inRangeParams[1]) { - return [nearIntersectionX, nearIntersectionY]; - } else { - var farIntersectionX = inRangeParams[1] * d[0] + x1; - var farIntersectionY = inRangeParams[1] * d[1] + y1; - return [nearIntersectionX, nearIntersectionY, farIntersectionX, farIntersectionY]; - } - } else { - return [nearIntersectionX, nearIntersectionY]; - } -}; -var midOfThree = function midOfThree(a, b, c) { - if (b <= a && a <= c || c <= a && a <= b) { - return a; - } else if (a <= b && b <= c || c <= b && b <= a) { - return b; - } else { - return c; - } -}; - -// (x1,y1)=>(x2,y2) intersect with (x3,y3)=>(x4,y4) -var finiteLinesIntersect = function finiteLinesIntersect(x1, y1, x2, y2, x3, y3, x4, y4, infiniteLines) { - var dx13 = x1 - x3; - var dx21 = x2 - x1; - var dx43 = x4 - x3; - var dy13 = y1 - y3; - var dy21 = y2 - y1; - var dy43 = y4 - y3; - var ua_t = dx43 * dy13 - dy43 * dx13; - var ub_t = dx21 * dy13 - dy21 * dx13; - var u_b = dy43 * dx21 - dx43 * dy21; - if (u_b !== 0) { - var ua = ua_t / u_b; - var ub = ub_t / u_b; - var flptThreshold = 0.001; - var _min = 0 - flptThreshold; - var _max = 1 + flptThreshold; - if (_min <= ua && ua <= _max && _min <= ub && ub <= _max) { - return [x1 + ua * dx21, y1 + ua * dy21]; - } else { - if (!infiniteLines) { - return []; - } else { - return [x1 + ua * dx21, y1 + ua * dy21]; - } - } - } else { - if (ua_t === 0 || ub_t === 0) { - // Parallel, coincident lines. Check if overlap - - // Check endpoint of second line - if (midOfThree(x1, x2, x4) === x4) { - return [x4, y4]; - } - - // Check start point of second line - if (midOfThree(x1, x2, x3) === x3) { - return [x3, y3]; - } - - // Endpoint of first line - if (midOfThree(x3, x4, x2) === x2) { - return [x2, y2]; - } - return []; - } else { - // Parallel, non-coincident - return []; - } - } -}; - -// math.polygonIntersectLine( x, y, basePoints, centerX, centerY, width, height, padding ) -// intersect a node polygon (pts transformed) -// -// math.polygonIntersectLine( x, y, basePoints, centerX, centerY ) -// intersect the points (no transform) -var polygonIntersectLine = function polygonIntersectLine(x, y, basePoints, centerX, centerY, width, height, padding) { - var intersections = []; - var intersection; - var transformedPoints = new Array(basePoints.length); - var doTransform = true; - if (width == null) { - doTransform = false; - } - var points; - if (doTransform) { - for (var i = 0; i < transformedPoints.length / 2; i++) { - transformedPoints[i * 2] = basePoints[i * 2] * width + centerX; - transformedPoints[i * 2 + 1] = basePoints[i * 2 + 1] * height + centerY; - } - if (padding > 0) { - var expandedLineSet = expandPolygon(transformedPoints, -padding); - points = joinLines(expandedLineSet); - } else { - points = transformedPoints; - } - } else { - points = basePoints; - } - var currentX, currentY, nextX, nextY; - for (var _i2 = 0; _i2 < points.length / 2; _i2++) { - currentX = points[_i2 * 2]; - currentY = points[_i2 * 2 + 1]; - if (_i2 < points.length / 2 - 1) { - nextX = points[(_i2 + 1) * 2]; - nextY = points[(_i2 + 1) * 2 + 1]; - } else { - nextX = points[0]; - nextY = points[1]; - } - intersection = finiteLinesIntersect(x, y, centerX, centerY, currentX, currentY, nextX, nextY); - if (intersection.length !== 0) { - intersections.push(intersection[0], intersection[1]); - } - } - return intersections; -}; -var roundPolygonIntersectLine = function roundPolygonIntersectLine(x, y, basePoints, centerX, centerY, width, height, padding, corners) { - var intersections = []; - var intersection; - var lines = new Array(basePoints.length * 2); - corners.forEach(function (corner, i) { - if (i === 0) { - lines[lines.length - 2] = corner.startX; - lines[lines.length - 1] = corner.startY; - } else { - lines[i * 4 - 2] = corner.startX; - lines[i * 4 - 1] = corner.startY; - } - lines[i * 4] = corner.stopX; - lines[i * 4 + 1] = corner.stopY; - intersection = intersectLineCircle(x, y, centerX, centerY, corner.cx, corner.cy, corner.radius); - if (intersection.length !== 0) { - intersections.push(intersection[0], intersection[1]); - } - }); - for (var i = 0; i < lines.length / 4; i++) { - intersection = finiteLinesIntersect(x, y, centerX, centerY, lines[i * 4], lines[i * 4 + 1], lines[i * 4 + 2], lines[i * 4 + 3], false); - if (intersection.length !== 0) { - intersections.push(intersection[0], intersection[1]); - } - } - if (intersections.length > 2) { - var lowestIntersection = [intersections[0], intersections[1]]; - var lowestSquaredDistance = Math.pow(lowestIntersection[0] - x, 2) + Math.pow(lowestIntersection[1] - y, 2); - for (var _i3 = 1; _i3 < intersections.length / 2; _i3++) { - var squaredDistance = Math.pow(intersections[_i3 * 2] - x, 2) + Math.pow(intersections[_i3 * 2 + 1] - y, 2); - if (squaredDistance <= lowestSquaredDistance) { - lowestIntersection[0] = intersections[_i3 * 2]; - lowestIntersection[1] = intersections[_i3 * 2 + 1]; - lowestSquaredDistance = squaredDistance; - } - } - return lowestIntersection; - } - return intersections; -}; -var shortenIntersection = function shortenIntersection(intersection, offset, amount) { - var disp = [intersection[0] - offset[0], intersection[1] - offset[1]]; - var length = Math.sqrt(disp[0] * disp[0] + disp[1] * disp[1]); - var lenRatio = (length - amount) / length; - if (lenRatio < 0) { - lenRatio = 0.00001; - } - return [offset[0] + lenRatio * disp[0], offset[1] + lenRatio * disp[1]]; -}; -var generateUnitNgonPointsFitToSquare = function generateUnitNgonPointsFitToSquare(sides, rotationRadians) { - var points = generateUnitNgonPoints(sides, rotationRadians); - points = fitPolygonToSquare(points); - return points; -}; -var fitPolygonToSquare = function fitPolygonToSquare(points) { - var x, y; - var sides = points.length / 2; - var minX = Infinity, - minY = Infinity, - maxX = -Infinity, - maxY = -Infinity; - for (var i = 0; i < sides; i++) { - x = points[2 * i]; - y = points[2 * i + 1]; - minX = Math.min(minX, x); - maxX = Math.max(maxX, x); - minY = Math.min(minY, y); - maxY = Math.max(maxY, y); - } - - // stretch factors - var sx = 2 / (maxX - minX); - var sy = 2 / (maxY - minY); - for (var _i4 = 0; _i4 < sides; _i4++) { - x = points[2 * _i4] = points[2 * _i4] * sx; - y = points[2 * _i4 + 1] = points[2 * _i4 + 1] * sy; - minX = Math.min(minX, x); - maxX = Math.max(maxX, x); - minY = Math.min(minY, y); - maxY = Math.max(maxY, y); - } - if (minY < -1) { - for (var _i5 = 0; _i5 < sides; _i5++) { - y = points[2 * _i5 + 1] = points[2 * _i5 + 1] + (-1 - minY); - } - } - return points; -}; -var generateUnitNgonPoints = function generateUnitNgonPoints(sides, rotationRadians) { - var increment = 1.0 / sides * 2 * Math.PI; - var startAngle = sides % 2 === 0 ? Math.PI / 2.0 + increment / 2.0 : Math.PI / 2.0; - startAngle += rotationRadians; - var points = new Array(sides * 2); - var currentAngle; - for (var i = 0; i < sides; i++) { - currentAngle = i * increment + startAngle; - points[2 * i] = Math.cos(currentAngle); // x - points[2 * i + 1] = Math.sin(-currentAngle); // y - } - - return points; -}; - -// Set the default radius, unless half of width or height is smaller than default -var getRoundRectangleRadius = function getRoundRectangleRadius(width, height) { - return Math.min(width / 4, height / 4, 8); -}; - -// Set the default radius -var getRoundPolygonRadius = function getRoundPolygonRadius(width, height) { - return Math.min(width / 10, height / 10, 8); -}; -var getCutRectangleCornerLength = function getCutRectangleCornerLength() { - return 8; -}; -var bezierPtsToQuadCoeff = function bezierPtsToQuadCoeff(p0, p1, p2) { - return [p0 - 2 * p1 + p2, 2 * (p1 - p0), p0]; -}; - -// get curve width, height, and control point position offsets as a percentage of node height / width -var getBarrelCurveConstants = function getBarrelCurveConstants(width, height) { - return { - heightOffset: Math.min(15, 0.05 * height), - widthOffset: Math.min(100, 0.25 * width), - ctrlPtOffsetPct: 0.05 - }; -}; - -var pageRankDefaults = defaults$g({ - dampingFactor: 0.8, - precision: 0.000001, - iterations: 200, - weight: function weight(edge) { - return 1; - } -}); -var elesfn$o = { - pageRank: function pageRank(options) { - var _pageRankDefaults = pageRankDefaults(options), - dampingFactor = _pageRankDefaults.dampingFactor, - precision = _pageRankDefaults.precision, - iterations = _pageRankDefaults.iterations, - weight = _pageRankDefaults.weight; - var cy = this._private.cy; - var _this$byGroup = this.byGroup(), - nodes = _this$byGroup.nodes, - edges = _this$byGroup.edges; - var numNodes = nodes.length; - var numNodesSqd = numNodes * numNodes; - var numEdges = edges.length; - - // Construct transposed adjacency matrix - // First lets have a zeroed matrix of the right size - // We'll also keep track of the sum of each column - var matrix = new Array(numNodesSqd); - var columnSum = new Array(numNodes); - var additionalProb = (1 - dampingFactor) / numNodes; - - // Create null matrix - for (var i = 0; i < numNodes; i++) { - for (var j = 0; j < numNodes; j++) { - var n = i * numNodes + j; - matrix[n] = 0; - } - columnSum[i] = 0; - } - - // Now, process edges - for (var _i = 0; _i < numEdges; _i++) { - var edge = edges[_i]; - var srcId = edge.data('source'); - var tgtId = edge.data('target'); - - // Don't include loops in the matrix - if (srcId === tgtId) { - continue; - } - var s = nodes.indexOfId(srcId); - var t = nodes.indexOfId(tgtId); - var w = weight(edge); - var _n = t * numNodes + s; - - // Update matrix - matrix[_n] += w; - - // Update column sum - columnSum[s] += w; - } - - // Add additional probability based on damping factor - // Also, take into account columns that have sum = 0 - var p = 1.0 / numNodes + additionalProb; // Shorthand - - // Traverse matrix, column by column - for (var _j = 0; _j < numNodes; _j++) { - if (columnSum[_j] === 0) { - // No 'links' out from node jth, assume equal probability for each possible node - for (var _i2 = 0; _i2 < numNodes; _i2++) { - var _n2 = _i2 * numNodes + _j; - matrix[_n2] = p; - } - } else { - // Node jth has outgoing link, compute normalized probabilities - for (var _i3 = 0; _i3 < numNodes; _i3++) { - var _n3 = _i3 * numNodes + _j; - matrix[_n3] = matrix[_n3] / columnSum[_j] + additionalProb; - } - } - } - - // Compute dominant eigenvector using power method - var eigenvector = new Array(numNodes); - var temp = new Array(numNodes); - var previous; - - // Start with a vector of all 1's - // Also, initialize a null vector which will be used as shorthand - for (var _i4 = 0; _i4 < numNodes; _i4++) { - eigenvector[_i4] = 1; - } - for (var iter = 0; iter < iterations; iter++) { - // Temp array with all 0's - for (var _i5 = 0; _i5 < numNodes; _i5++) { - temp[_i5] = 0; - } - - // Multiply matrix with previous result - for (var _i6 = 0; _i6 < numNodes; _i6++) { - for (var _j2 = 0; _j2 < numNodes; _j2++) { - var _n4 = _i6 * numNodes + _j2; - temp[_i6] += matrix[_n4] * eigenvector[_j2]; - } - } - inPlaceSumNormalize(temp); - previous = eigenvector; - eigenvector = temp; - temp = previous; - var diff = 0; - // Compute difference (squared module) of both vectors - for (var _i7 = 0; _i7 < numNodes; _i7++) { - var delta = previous[_i7] - eigenvector[_i7]; - diff += delta * delta; - } - - // If difference is less than the desired threshold, stop iterating - if (diff < precision) { - break; - } - } - - // Construct result - var res = { - rank: function rank(node) { - node = cy.collection(node)[0]; - return eigenvector[nodes.indexOf(node)]; - } - }; - return res; - } // pageRank -}; // elesfn - -var defaults$f = defaults$g({ - root: null, - weight: function weight(edge) { - return 1; - }, - directed: false, - alpha: 0 -}); -var elesfn$n = { - degreeCentralityNormalized: function degreeCentralityNormalized(options) { - options = defaults$f(options); - var cy = this.cy(); - var nodes = this.nodes(); - var numNodes = nodes.length; - if (!options.directed) { - var degrees = {}; - var maxDegree = 0; - for (var i = 0; i < numNodes; i++) { - var node = nodes[i]; - - // add current node to the current options object and call degreeCentrality - options.root = node; - var currDegree = this.degreeCentrality(options); - if (maxDegree < currDegree.degree) { - maxDegree = currDegree.degree; - } - degrees[node.id()] = currDegree.degree; - } - return { - degree: function degree(node) { - if (maxDegree === 0) { - return 0; - } - if (string(node)) { - // from is a selector string - node = cy.filter(node); - } - return degrees[node.id()] / maxDegree; - } - }; - } else { - var indegrees = {}; - var outdegrees = {}; - var maxIndegree = 0; - var maxOutdegree = 0; - for (var _i = 0; _i < numNodes; _i++) { - var _node = nodes[_i]; - var id = _node.id(); - - // add current node to the current options object and call degreeCentrality - options.root = _node; - var _currDegree = this.degreeCentrality(options); - if (maxIndegree < _currDegree.indegree) maxIndegree = _currDegree.indegree; - if (maxOutdegree < _currDegree.outdegree) maxOutdegree = _currDegree.outdegree; - indegrees[id] = _currDegree.indegree; - outdegrees[id] = _currDegree.outdegree; - } - return { - indegree: function indegree(node) { - if (maxIndegree == 0) { - return 0; - } - if (string(node)) { - // from is a selector string - node = cy.filter(node); - } - return indegrees[node.id()] / maxIndegree; - }, - outdegree: function outdegree(node) { - if (maxOutdegree === 0) { - return 0; - } - if (string(node)) { - // from is a selector string - node = cy.filter(node); - } - return outdegrees[node.id()] / maxOutdegree; - } - }; - } - }, - // degreeCentralityNormalized - - // Implemented from the algorithm in Opsahl's paper - // "Node centrality in weighted networks: Generalizing degree and shortest paths" - // check the heading 2 "Degree" - degreeCentrality: function degreeCentrality(options) { - options = defaults$f(options); - var cy = this.cy(); - var callingEles = this; - var _options = options, - root = _options.root, - weight = _options.weight, - directed = _options.directed, - alpha = _options.alpha; - root = cy.collection(root)[0]; - if (!directed) { - var connEdges = root.connectedEdges().intersection(callingEles); - var k = connEdges.length; - var s = 0; - - // Now, sum edge weights - for (var i = 0; i < connEdges.length; i++) { - s += weight(connEdges[i]); - } - return { - degree: Math.pow(k, 1 - alpha) * Math.pow(s, alpha) - }; - } else { - var edges = root.connectedEdges(); - var incoming = edges.filter(function (edge) { - return edge.target().same(root) && callingEles.has(edge); - }); - var outgoing = edges.filter(function (edge) { - return edge.source().same(root) && callingEles.has(edge); - }); - var k_in = incoming.length; - var k_out = outgoing.length; - var s_in = 0; - var s_out = 0; - - // Now, sum incoming edge weights - for (var _i2 = 0; _i2 < incoming.length; _i2++) { - s_in += weight(incoming[_i2]); - } - - // Now, sum outgoing edge weights - for (var _i3 = 0; _i3 < outgoing.length; _i3++) { - s_out += weight(outgoing[_i3]); - } - return { - indegree: Math.pow(k_in, 1 - alpha) * Math.pow(s_in, alpha), - outdegree: Math.pow(k_out, 1 - alpha) * Math.pow(s_out, alpha) - }; - } - } // degreeCentrality -}; // elesfn - -// nice, short mathematical alias -elesfn$n.dc = elesfn$n.degreeCentrality; -elesfn$n.dcn = elesfn$n.degreeCentralityNormalised = elesfn$n.degreeCentralityNormalized; - -var defaults$e = defaults$g({ - harmonic: true, - weight: function weight() { - return 1; - }, - directed: false, - root: null -}); -var elesfn$m = { - closenessCentralityNormalized: function closenessCentralityNormalized(options) { - var _defaults = defaults$e(options), - harmonic = _defaults.harmonic, - weight = _defaults.weight, - directed = _defaults.directed; - var cy = this.cy(); - var closenesses = {}; - var maxCloseness = 0; - var nodes = this.nodes(); - var fw = this.floydWarshall({ - weight: weight, - directed: directed - }); - - // Compute closeness for every node and find the maximum closeness - for (var i = 0; i < nodes.length; i++) { - var currCloseness = 0; - var node_i = nodes[i]; - for (var j = 0; j < nodes.length; j++) { - if (i !== j) { - var d = fw.distance(node_i, nodes[j]); - if (harmonic) { - currCloseness += 1 / d; - } else { - currCloseness += d; - } - } - } - if (!harmonic) { - currCloseness = 1 / currCloseness; - } - if (maxCloseness < currCloseness) { - maxCloseness = currCloseness; - } - closenesses[node_i.id()] = currCloseness; - } - return { - closeness: function closeness(node) { - if (maxCloseness == 0) { - return 0; - } - if (string(node)) { - // from is a selector string - node = cy.filter(node)[0].id(); - } else { - // from is a node - node = node.id(); - } - return closenesses[node] / maxCloseness; - } - }; - }, - // Implemented from pseudocode from wikipedia - closenessCentrality: function closenessCentrality(options) { - var _defaults2 = defaults$e(options), - root = _defaults2.root, - weight = _defaults2.weight, - directed = _defaults2.directed, - harmonic = _defaults2.harmonic; - root = this.filter(root)[0]; - - // we need distance from this node to every other node - var dijkstra = this.dijkstra({ - root: root, - weight: weight, - directed: directed - }); - var totalDistance = 0; - var nodes = this.nodes(); - for (var i = 0; i < nodes.length; i++) { - var n = nodes[i]; - if (!n.same(root)) { - var d = dijkstra.distanceTo(n); - if (harmonic) { - totalDistance += 1 / d; - } else { - totalDistance += d; - } - } - } - return harmonic ? totalDistance : 1 / totalDistance; - } // closenessCentrality -}; // elesfn - -// nice, short mathematical alias -elesfn$m.cc = elesfn$m.closenessCentrality; -elesfn$m.ccn = elesfn$m.closenessCentralityNormalised = elesfn$m.closenessCentralityNormalized; - -var defaults$d = defaults$g({ - weight: null, - directed: false -}); -var elesfn$l = { - // Implemented from the algorithm in the paper "On Variants of Shortest-Path Betweenness Centrality and their Generic Computation" by Ulrik Brandes - betweennessCentrality: function betweennessCentrality(options) { - var _defaults = defaults$d(options), - directed = _defaults.directed, - weight = _defaults.weight; - var weighted = weight != null; - var cy = this.cy(); - - // starting - var V = this.nodes(); - var A = {}; - var _C = {}; - var max = 0; - var C = { - set: function set(key, val) { - _C[key] = val; - if (val > max) { - max = val; - } - }, - get: function get(key) { - return _C[key]; - } - }; - - // A contains the neighborhoods of every node - for (var i = 0; i < V.length; i++) { - var v = V[i]; - var vid = v.id(); - if (directed) { - A[vid] = v.outgoers().nodes(); // get outgoers of every node - } else { - A[vid] = v.openNeighborhood().nodes(); // get neighbors of every node - } - - C.set(vid, 0); - } - var _loop = function _loop(s) { - var sid = V[s].id(); - var S = []; // stack - var P = {}; - var g = {}; - var d = {}; - var Q = new heap(function (a, b) { - return d[a] - d[b]; - }); // queue - - // init dictionaries - for (var _i = 0; _i < V.length; _i++) { - var _vid = V[_i].id(); - P[_vid] = []; - g[_vid] = 0; - d[_vid] = Infinity; - } - g[sid] = 1; // sigma - d[sid] = 0; // distance to s - - Q.push(sid); - while (!Q.empty()) { - var _v = Q.pop(); - S.push(_v); - if (weighted) { - for (var j = 0; j < A[_v].length; j++) { - var w = A[_v][j]; - var vEle = cy.getElementById(_v); - var edge = void 0; - if (vEle.edgesTo(w).length > 0) { - edge = vEle.edgesTo(w)[0]; - } else { - edge = w.edgesTo(vEle)[0]; - } - var edgeWeight = weight(edge); - w = w.id(); - if (d[w] > d[_v] + edgeWeight) { - d[w] = d[_v] + edgeWeight; - if (Q.nodes.indexOf(w) < 0) { - //if w is not in Q - Q.push(w); - } else { - // update position if w is in Q - Q.updateItem(w); - } - g[w] = 0; - P[w] = []; - } - if (d[w] == d[_v] + edgeWeight) { - g[w] = g[w] + g[_v]; - P[w].push(_v); - } - } - } else { - for (var _j = 0; _j < A[_v].length; _j++) { - var _w = A[_v][_j].id(); - if (d[_w] == Infinity) { - Q.push(_w); - d[_w] = d[_v] + 1; - } - if (d[_w] == d[_v] + 1) { - g[_w] = g[_w] + g[_v]; - P[_w].push(_v); - } - } - } - } - var e = {}; - for (var _i2 = 0; _i2 < V.length; _i2++) { - e[V[_i2].id()] = 0; - } - while (S.length > 0) { - var _w2 = S.pop(); - for (var _j2 = 0; _j2 < P[_w2].length; _j2++) { - var _v2 = P[_w2][_j2]; - e[_v2] = e[_v2] + g[_v2] / g[_w2] * (1 + e[_w2]); - } - if (_w2 != V[s].id()) { - C.set(_w2, C.get(_w2) + e[_w2]); - } - } - }; - for (var s = 0; s < V.length; s++) { - _loop(s); - } - var ret = { - betweenness: function betweenness(node) { - var id = cy.collection(node).id(); - return C.get(id); - }, - betweennessNormalized: function betweennessNormalized(node) { - if (max == 0) { - return 0; - } - var id = cy.collection(node).id(); - return C.get(id) / max; - } - }; - - // alias - ret.betweennessNormalised = ret.betweennessNormalized; - return ret; - } // betweennessCentrality -}; // elesfn - -// nice, short mathematical alias -elesfn$l.bc = elesfn$l.betweennessCentrality; - -// Implemented by Zoe Xi @zoexi for GSOC 2016 - -/* eslint-disable no-unused-vars */ -var defaults$c = defaults$g({ - expandFactor: 2, - // affects time of computation and cluster granularity to some extent: M * M - inflateFactor: 2, - // affects cluster granularity (the greater the value, the more clusters): M(i,j) / E(j) - multFactor: 1, - // optional self loops for each node. Use a neutral value to improve cluster computations. - maxIterations: 20, - // maximum number of iterations of the MCL algorithm in a single run - attributes: [ - // attributes/features used to group nodes, ie. similarity values between nodes - function (edge) { - return 1; - }] -}); -/* eslint-enable */ - -var setOptions$3 = function setOptions(options) { - return defaults$c(options); -}; -/* eslint-enable */ - -var getSimilarity$1 = function getSimilarity(edge, attributes) { - var total = 0; - for (var i = 0; i < attributes.length; i++) { - total += attributes[i](edge); - } - return total; -}; -var addLoops = function addLoops(M, n, val) { - for (var i = 0; i < n; i++) { - M[i * n + i] = val; - } -}; -var normalize = function normalize(M, n) { - var sum; - for (var col = 0; col < n; col++) { - sum = 0; - for (var row = 0; row < n; row++) { - sum += M[row * n + col]; - } - for (var _row = 0; _row < n; _row++) { - M[_row * n + col] = M[_row * n + col] / sum; - } - } -}; - -// TODO: blocked matrix multiplication? -var mmult = function mmult(A, B, n) { - var C = new Array(n * n); - for (var i = 0; i < n; i++) { - for (var j = 0; j < n; j++) { - C[i * n + j] = 0; - } - for (var k = 0; k < n; k++) { - for (var _j = 0; _j < n; _j++) { - C[i * n + _j] += A[i * n + k] * B[k * n + _j]; - } - } - } - return C; -}; -var expand = function expand(M, n, expandFactor /** power **/) { - var _M = M.slice(0); - for (var p = 1; p < expandFactor; p++) { - M = mmult(M, _M, n); - } - return M; -}; -var inflate = function inflate(M, n, inflateFactor /** r **/) { - var _M = new Array(n * n); - - // M(i,j) ^ inflatePower - for (var i = 0; i < n * n; i++) { - _M[i] = Math.pow(M[i], inflateFactor); - } - normalize(_M, n); - return _M; -}; -var hasConverged = function hasConverged(M, _M, n2, roundFactor) { - // Check that both matrices have the same elements (i,j) - for (var i = 0; i < n2; i++) { - var v1 = Math.round(M[i] * Math.pow(10, roundFactor)) / Math.pow(10, roundFactor); // truncate to 'roundFactor' decimal places - var v2 = Math.round(_M[i] * Math.pow(10, roundFactor)) / Math.pow(10, roundFactor); - if (v1 !== v2) { - return false; - } - } - return true; -}; -var assign$2 = function assign(M, n, nodes, cy) { - var clusters = []; - for (var i = 0; i < n; i++) { - var cluster = []; - for (var j = 0; j < n; j++) { - // Row-wise attractors and elements that they attract belong in same cluster - if (Math.round(M[i * n + j] * 1000) / 1000 > 0) { - cluster.push(nodes[j]); - } - } - if (cluster.length !== 0) { - clusters.push(cy.collection(cluster)); - } - } - return clusters; -}; -var isDuplicate = function isDuplicate(c1, c2) { - for (var i = 0; i < c1.length; i++) { - if (!c2[i] || c1[i].id() !== c2[i].id()) { - return false; - } - } - return true; -}; -var removeDuplicates = function removeDuplicates(clusters) { - for (var i = 0; i < clusters.length; i++) { - for (var j = 0; j < clusters.length; j++) { - if (i != j && isDuplicate(clusters[i], clusters[j])) { - clusters.splice(j, 1); - } - } - } - return clusters; -}; -var markovClustering = function markovClustering(options) { - var nodes = this.nodes(); - var edges = this.edges(); - var cy = this.cy(); - - // Set parameters of algorithm: - var opts = setOptions$3(options); - - // Map each node to its position in node array - var id2position = {}; - for (var i = 0; i < nodes.length; i++) { - id2position[nodes[i].id()] = i; - } - - // Generate stochastic matrix M from input graph G (should be symmetric/undirected) - var n = nodes.length, - n2 = n * n; - var M = new Array(n2), - _M; - for (var _i = 0; _i < n2; _i++) { - M[_i] = 0; - } - for (var e = 0; e < edges.length; e++) { - var edge = edges[e]; - var _i2 = id2position[edge.source().id()]; - var j = id2position[edge.target().id()]; - var sim = getSimilarity$1(edge, opts.attributes); - M[_i2 * n + j] += sim; // G should be symmetric and undirected - M[j * n + _i2] += sim; - } - - // Begin Markov cluster algorithm - - // Step 1: Add self loops to each node, ie. add multFactor to matrix diagonal - addLoops(M, n, opts.multFactor); - - // Step 2: M = normalize( M ); - normalize(M, n); - var isStillMoving = true; - var iterations = 0; - while (isStillMoving && iterations < opts.maxIterations) { - isStillMoving = false; - - // Step 3: - _M = expand(M, n, opts.expandFactor); - - // Step 4: - M = inflate(_M, n, opts.inflateFactor); - - // Step 5: check to see if ~steady state has been reached - if (!hasConverged(M, _M, n2, 4)) { - isStillMoving = true; - } - iterations++; - } - - // Build clusters from matrix - var clusters = assign$2(M, n, nodes, cy); - - // Remove duplicate clusters due to symmetry of graph and M matrix - clusters = removeDuplicates(clusters); - return clusters; -}; -var markovClustering$1 = { - markovClustering: markovClustering, - mcl: markovClustering -}; - -// Common distance metrics for clustering algorithms -var identity = function identity(x) { - return x; -}; -var absDiff = function absDiff(p, q) { - return Math.abs(q - p); -}; -var addAbsDiff = function addAbsDiff(total, p, q) { - return total + absDiff(p, q); -}; -var addSquaredDiff = function addSquaredDiff(total, p, q) { - return total + Math.pow(q - p, 2); -}; -var sqrt = function sqrt(x) { - return Math.sqrt(x); -}; -var maxAbsDiff = function maxAbsDiff(currentMax, p, q) { - return Math.max(currentMax, absDiff(p, q)); -}; -var getDistance = function getDistance(length, getP, getQ, init, visit) { - var post = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : identity; - var ret = init; - var p, q; - for (var dim = 0; dim < length; dim++) { - p = getP(dim); - q = getQ(dim); - ret = visit(ret, p, q); - } - return post(ret); -}; -var distances = { - euclidean: function euclidean(length, getP, getQ) { - if (length >= 2) { - return getDistance(length, getP, getQ, 0, addSquaredDiff, sqrt); - } else { - // for single attr case, more efficient to avoid sqrt - return getDistance(length, getP, getQ, 0, addAbsDiff); - } - }, - squaredEuclidean: function squaredEuclidean(length, getP, getQ) { - return getDistance(length, getP, getQ, 0, addSquaredDiff); - }, - manhattan: function manhattan(length, getP, getQ) { - return getDistance(length, getP, getQ, 0, addAbsDiff); - }, - max: function max(length, getP, getQ) { - return getDistance(length, getP, getQ, -Infinity, maxAbsDiff); - } -}; - -// in case the user accidentally doesn't use camel case -distances['squared-euclidean'] = distances['squaredEuclidean']; -distances['squaredeuclidean'] = distances['squaredEuclidean']; -function clusteringDistance (method, length, getP, getQ, nodeP, nodeQ) { - var impl; - if (fn$6(method)) { - impl = method; - } else { - impl = distances[method] || distances.euclidean; - } - if (length === 0 && fn$6(method)) { - return impl(nodeP, nodeQ); - } else { - return impl(length, getP, getQ, nodeP, nodeQ); - } -} - -var defaults$b = defaults$g({ - k: 2, - m: 2, - sensitivityThreshold: 0.0001, - distance: 'euclidean', - maxIterations: 10, - attributes: [], - testMode: false, - testCentroids: null -}); -var setOptions$2 = function setOptions(options) { - return defaults$b(options); -}; - -var getDist = function getDist(type, node, centroid, attributes, mode) { - var noNodeP = mode !== 'kMedoids'; - var getP = noNodeP ? function (i) { - return centroid[i]; - } : function (i) { - return attributes[i](centroid); - }; - var getQ = function getQ(i) { - return attributes[i](node); - }; - var nodeP = centroid; - var nodeQ = node; - return clusteringDistance(type, attributes.length, getP, getQ, nodeP, nodeQ); -}; -var randomCentroids = function randomCentroids(nodes, k, attributes) { - var ndim = attributes.length; - var min = new Array(ndim); - var max = new Array(ndim); - var centroids = new Array(k); - var centroid = null; - - // Find min, max values for each attribute dimension - for (var i = 0; i < ndim; i++) { - min[i] = nodes.min(attributes[i]).value; - max[i] = nodes.max(attributes[i]).value; - } - - // Build k centroids, each represented as an n-dim feature vector - for (var c = 0; c < k; c++) { - centroid = []; - for (var _i = 0; _i < ndim; _i++) { - centroid[_i] = Math.random() * (max[_i] - min[_i]) + min[_i]; // random initial value - } - - centroids[c] = centroid; - } - return centroids; -}; -var classify = function classify(node, centroids, distance, attributes, type) { - var min = Infinity; - var index = 0; - for (var i = 0; i < centroids.length; i++) { - var dist = getDist(distance, node, centroids[i], attributes, type); - if (dist < min) { - min = dist; - index = i; - } - } - return index; -}; -var buildCluster = function buildCluster(centroid, nodes, assignment) { - var cluster = []; - var node = null; - for (var n = 0; n < nodes.length; n++) { - node = nodes[n]; - if (assignment[node.id()] === centroid) { - //console.log("Node " + node.id() + " is associated with medoid #: " + m); - cluster.push(node); - } - } - return cluster; -}; -var haveValuesConverged = function haveValuesConverged(v1, v2, sensitivityThreshold) { - return Math.abs(v2 - v1) <= sensitivityThreshold; -}; -var haveMatricesConverged = function haveMatricesConverged(v1, v2, sensitivityThreshold) { - for (var i = 0; i < v1.length; i++) { - for (var j = 0; j < v1[i].length; j++) { - var diff = Math.abs(v1[i][j] - v2[i][j]); - if (diff > sensitivityThreshold) { - return false; - } - } - } - return true; -}; -var seenBefore = function seenBefore(node, medoids, n) { - for (var i = 0; i < n; i++) { - if (node === medoids[i]) return true; - } - return false; -}; -var randomMedoids = function randomMedoids(nodes, k) { - var medoids = new Array(k); - - // For small data sets, the probability of medoid conflict is greater, - // so we need to check to see if we've already seen or chose this node before. - if (nodes.length < 50) { - // Randomly select k medoids from the n nodes - for (var i = 0; i < k; i++) { - var node = nodes[Math.floor(Math.random() * nodes.length)]; - - // If we've already chosen this node to be a medoid, don't choose it again (for small data sets). - // Instead choose a different random node. - while (seenBefore(node, medoids, i)) { - node = nodes[Math.floor(Math.random() * nodes.length)]; - } - medoids[i] = node; - } - } else { - // Relatively large data set, so pretty safe to not check and just select random nodes - for (var _i2 = 0; _i2 < k; _i2++) { - medoids[_i2] = nodes[Math.floor(Math.random() * nodes.length)]; - } - } - return medoids; -}; -var findCost = function findCost(potentialNewMedoid, cluster, attributes) { - var cost = 0; - for (var n = 0; n < cluster.length; n++) { - cost += getDist('manhattan', cluster[n], potentialNewMedoid, attributes, 'kMedoids'); - } - return cost; -}; -var kMeans = function kMeans(options) { - var cy = this.cy(); - var nodes = this.nodes(); - var node = null; - - // Set parameters of algorithm: # of clusters, distance metric, etc. - var opts = setOptions$2(options); - - // Begin k-means algorithm - var clusters = new Array(opts.k); - var assignment = {}; - var centroids; - - // Step 1: Initialize centroid positions - if (opts.testMode) { - if (typeof opts.testCentroids === 'number') { - // TODO: implement a seeded random number generator. - opts.testCentroids; - centroids = randomCentroids(nodes, opts.k, opts.attributes); - } else if (_typeof(opts.testCentroids) === 'object') { - centroids = opts.testCentroids; - } else { - centroids = randomCentroids(nodes, opts.k, opts.attributes); - } - } else { - centroids = randomCentroids(nodes, opts.k, opts.attributes); - } - var isStillMoving = true; - var iterations = 0; - while (isStillMoving && iterations < opts.maxIterations) { - // Step 2: Assign nodes to the nearest centroid - for (var n = 0; n < nodes.length; n++) { - node = nodes[n]; - // Determine which cluster this node belongs to: node id => cluster # - assignment[node.id()] = classify(node, centroids, opts.distance, opts.attributes, 'kMeans'); - } - - // Step 3: For each of the k clusters, update its centroid - isStillMoving = false; - for (var c = 0; c < opts.k; c++) { - // Get all nodes that belong to this cluster - var cluster = buildCluster(c, nodes, assignment); - if (cluster.length === 0) { - // If cluster is empty, break out early & move to next cluster - continue; - } - - // Update centroids by calculating avg of all nodes within the cluster. - var ndim = opts.attributes.length; - var centroid = centroids[c]; // [ dim_1, dim_2, dim_3, ... , dim_n ] - var newCentroid = new Array(ndim); - var sum = new Array(ndim); - for (var d = 0; d < ndim; d++) { - sum[d] = 0.0; - for (var i = 0; i < cluster.length; i++) { - node = cluster[i]; - sum[d] += opts.attributes[d](node); - } - newCentroid[d] = sum[d] / cluster.length; - - // Check to see if algorithm has converged, i.e. when centroids no longer change - if (!haveValuesConverged(newCentroid[d], centroid[d], opts.sensitivityThreshold)) { - isStillMoving = true; - } - } - centroids[c] = newCentroid; - clusters[c] = cy.collection(cluster); - } - iterations++; - } - return clusters; -}; -var kMedoids = function kMedoids(options) { - var cy = this.cy(); - var nodes = this.nodes(); - var node = null; - var opts = setOptions$2(options); - - // Begin k-medoids algorithm - var clusters = new Array(opts.k); - var medoids; - var assignment = {}; - var curCost; - var minCosts = new Array(opts.k); // minimum cost configuration for each cluster - - // Step 1: Initialize k medoids - if (opts.testMode) { - if (typeof opts.testCentroids === 'number') ; else if (_typeof(opts.testCentroids) === 'object') { - medoids = opts.testCentroids; - } else { - medoids = randomMedoids(nodes, opts.k); - } - } else { - medoids = randomMedoids(nodes, opts.k); - } - var isStillMoving = true; - var iterations = 0; - while (isStillMoving && iterations < opts.maxIterations) { - // Step 2: Assign nodes to the nearest medoid - for (var n = 0; n < nodes.length; n++) { - node = nodes[n]; - // Determine which cluster this node belongs to: node id => cluster # - assignment[node.id()] = classify(node, medoids, opts.distance, opts.attributes, 'kMedoids'); - } - isStillMoving = false; - // Step 3: For each medoid m, and for each node associated with mediod m, - // select the node with the lowest configuration cost as new medoid. - for (var m = 0; m < medoids.length; m++) { - // Get all nodes that belong to this medoid - var cluster = buildCluster(m, nodes, assignment); - if (cluster.length === 0) { - // If cluster is empty, break out early & move to next cluster - continue; - } - minCosts[m] = findCost(medoids[m], cluster, opts.attributes); // original cost - - // Select different medoid if its configuration has the lowest cost - for (var _n = 0; _n < cluster.length; _n++) { - curCost = findCost(cluster[_n], cluster, opts.attributes); - if (curCost < minCosts[m]) { - minCosts[m] = curCost; - medoids[m] = cluster[_n]; - isStillMoving = true; - } - } - clusters[m] = cy.collection(cluster); - } - iterations++; - } - return clusters; -}; -var updateCentroids = function updateCentroids(centroids, nodes, U, weight, opts) { - var numerator, denominator; - for (var n = 0; n < nodes.length; n++) { - for (var c = 0; c < centroids.length; c++) { - weight[n][c] = Math.pow(U[n][c], opts.m); - } - } - for (var _c = 0; _c < centroids.length; _c++) { - for (var dim = 0; dim < opts.attributes.length; dim++) { - numerator = 0; - denominator = 0; - for (var _n2 = 0; _n2 < nodes.length; _n2++) { - numerator += weight[_n2][_c] * opts.attributes[dim](nodes[_n2]); - denominator += weight[_n2][_c]; - } - centroids[_c][dim] = numerator / denominator; - } - } -}; -var updateMembership = function updateMembership(U, _U, centroids, nodes, opts) { - // Save previous step - for (var i = 0; i < U.length; i++) { - _U[i] = U[i].slice(); - } - var sum, numerator, denominator; - var pow = 2 / (opts.m - 1); - for (var c = 0; c < centroids.length; c++) { - for (var n = 0; n < nodes.length; n++) { - sum = 0; - for (var k = 0; k < centroids.length; k++) { - // against all other centroids - numerator = getDist(opts.distance, nodes[n], centroids[c], opts.attributes, 'cmeans'); - denominator = getDist(opts.distance, nodes[n], centroids[k], opts.attributes, 'cmeans'); - sum += Math.pow(numerator / denominator, pow); - } - U[n][c] = 1 / sum; - } - } -}; -var assign$1 = function assign(nodes, U, opts, cy) { - var clusters = new Array(opts.k); - for (var c = 0; c < clusters.length; c++) { - clusters[c] = []; - } - var max; - var index; - for (var n = 0; n < U.length; n++) { - // for each node (U is N x C matrix) - max = -Infinity; - index = -1; - // Determine which cluster the node is most likely to belong in - for (var _c2 = 0; _c2 < U[0].length; _c2++) { - if (U[n][_c2] > max) { - max = U[n][_c2]; - index = _c2; - } - } - clusters[index].push(nodes[n]); - } - - // Turn every array into a collection of nodes - for (var _c3 = 0; _c3 < clusters.length; _c3++) { - clusters[_c3] = cy.collection(clusters[_c3]); - } - return clusters; -}; -var fuzzyCMeans = function fuzzyCMeans(options) { - var cy = this.cy(); - var nodes = this.nodes(); - var opts = setOptions$2(options); - - // Begin fuzzy c-means algorithm - var clusters; - var centroids; - var U; - var _U; - var weight; - - // Step 1: Initialize letiables. - _U = new Array(nodes.length); - for (var i = 0; i < nodes.length; i++) { - // N x C matrix - _U[i] = new Array(opts.k); - } - U = new Array(nodes.length); - for (var _i3 = 0; _i3 < nodes.length; _i3++) { - // N x C matrix - U[_i3] = new Array(opts.k); - } - for (var _i4 = 0; _i4 < nodes.length; _i4++) { - var total = 0; - for (var j = 0; j < opts.k; j++) { - U[_i4][j] = Math.random(); - total += U[_i4][j]; - } - for (var _j = 0; _j < opts.k; _j++) { - U[_i4][_j] = U[_i4][_j] / total; - } - } - centroids = new Array(opts.k); - for (var _i5 = 0; _i5 < opts.k; _i5++) { - centroids[_i5] = new Array(opts.attributes.length); - } - weight = new Array(nodes.length); - for (var _i6 = 0; _i6 < nodes.length; _i6++) { - // N x C matrix - weight[_i6] = new Array(opts.k); - } - // end init FCM - - var isStillMoving = true; - var iterations = 0; - while (isStillMoving && iterations < opts.maxIterations) { - isStillMoving = false; - - // Step 2: Calculate the centroids for each step. - updateCentroids(centroids, nodes, U, weight, opts); - - // Step 3: Update the partition matrix U. - updateMembership(U, _U, centroids, nodes, opts); - - // Step 4: Check for convergence. - if (!haveMatricesConverged(U, _U, opts.sensitivityThreshold)) { - isStillMoving = true; - } - iterations++; - } - - // Assign nodes to clusters with highest probability. - clusters = assign$1(nodes, U, opts, cy); - return { - clusters: clusters, - degreeOfMembership: U - }; -}; -var kClustering = { - kMeans: kMeans, - kMedoids: kMedoids, - fuzzyCMeans: fuzzyCMeans, - fcm: fuzzyCMeans -}; - -// Implemented by Zoe Xi @zoexi for GSOC 2016 -var defaults$a = defaults$g({ - distance: 'euclidean', - // distance metric to compare nodes - linkage: 'min', - // linkage criterion : how to determine the distance between clusters of nodes - mode: 'threshold', - // mode:'threshold' => clusters must be threshold distance apart - threshold: Infinity, - // the distance threshold - // mode:'dendrogram' => the nodes are organised as leaves in a tree (siblings are close), merging makes clusters - addDendrogram: false, - // whether to add the dendrogram to the graph for viz - dendrogramDepth: 0, - // depth at which dendrogram branches are merged into the returned clusters - attributes: [] // array of attr functions -}); - -var linkageAliases = { - 'single': 'min', - 'complete': 'max' -}; -var setOptions$1 = function setOptions(options) { - var opts = defaults$a(options); - var preferredAlias = linkageAliases[opts.linkage]; - if (preferredAlias != null) { - opts.linkage = preferredAlias; - } - return opts; -}; -var mergeClosest = function mergeClosest(clusters, index, dists, mins, opts) { - // Find two closest clusters from cached mins - var minKey = 0; - var min = Infinity; - var dist; - var attrs = opts.attributes; - var getDist = function getDist(n1, n2) { - return clusteringDistance(opts.distance, attrs.length, function (i) { - return attrs[i](n1); - }, function (i) { - return attrs[i](n2); - }, n1, n2); - }; - for (var i = 0; i < clusters.length; i++) { - var key = clusters[i].key; - var _dist = dists[key][mins[key]]; - if (_dist < min) { - minKey = key; - min = _dist; - } - } - if (opts.mode === 'threshold' && min >= opts.threshold || opts.mode === 'dendrogram' && clusters.length === 1) { - return false; - } - var c1 = index[minKey]; - var c2 = index[mins[minKey]]; - var merged; - - // Merge two closest clusters - if (opts.mode === 'dendrogram') { - merged = { - left: c1, - right: c2, - key: c1.key - }; - } else { - merged = { - value: c1.value.concat(c2.value), - key: c1.key - }; - } - clusters[c1.index] = merged; - clusters.splice(c2.index, 1); - index[c1.key] = merged; - - // Update distances with new merged cluster - for (var _i = 0; _i < clusters.length; _i++) { - var cur = clusters[_i]; - if (c1.key === cur.key) { - dist = Infinity; - } else if (opts.linkage === 'min') { - dist = dists[c1.key][cur.key]; - if (dists[c1.key][cur.key] > dists[c2.key][cur.key]) { - dist = dists[c2.key][cur.key]; - } - } else if (opts.linkage === 'max') { - dist = dists[c1.key][cur.key]; - if (dists[c1.key][cur.key] < dists[c2.key][cur.key]) { - dist = dists[c2.key][cur.key]; - } - } else if (opts.linkage === 'mean') { - dist = (dists[c1.key][cur.key] * c1.size + dists[c2.key][cur.key] * c2.size) / (c1.size + c2.size); - } else { - if (opts.mode === 'dendrogram') dist = getDist(cur.value, c1.value);else dist = getDist(cur.value[0], c1.value[0]); - } - dists[c1.key][cur.key] = dists[cur.key][c1.key] = dist; // distance matrix is symmetric - } - - // Update cached mins - for (var _i2 = 0; _i2 < clusters.length; _i2++) { - var key1 = clusters[_i2].key; - if (mins[key1] === c1.key || mins[key1] === c2.key) { - var _min = key1; - for (var j = 0; j < clusters.length; j++) { - var key2 = clusters[j].key; - if (dists[key1][key2] < dists[key1][_min]) { - _min = key2; - } - } - mins[key1] = _min; - } - clusters[_i2].index = _i2; - } - - // Clean up meta data used for clustering - c1.key = c2.key = c1.index = c2.index = null; - return true; -}; -var getAllChildren = function getAllChildren(root, arr, cy) { - if (!root) return; - if (root.value) { - arr.push(root.value); - } else { - if (root.left) getAllChildren(root.left, arr); - if (root.right) getAllChildren(root.right, arr); - } -}; -var buildDendrogram = function buildDendrogram(root, cy) { - if (!root) return ''; - if (root.left && root.right) { - var leftStr = buildDendrogram(root.left, cy); - var rightStr = buildDendrogram(root.right, cy); - var node = cy.add({ - group: 'nodes', - data: { - id: leftStr + ',' + rightStr - } - }); - cy.add({ - group: 'edges', - data: { - source: leftStr, - target: node.id() - } - }); - cy.add({ - group: 'edges', - data: { - source: rightStr, - target: node.id() - } - }); - return node.id(); - } else if (root.value) { - return root.value.id(); - } -}; -var buildClustersFromTree = function buildClustersFromTree(root, k, cy) { - if (!root) return []; - var left = [], - right = [], - leaves = []; - if (k === 0) { - // don't cut tree, simply return all nodes as 1 single cluster - if (root.left) getAllChildren(root.left, left); - if (root.right) getAllChildren(root.right, right); - leaves = left.concat(right); - return [cy.collection(leaves)]; - } else if (k === 1) { - // cut at root - - if (root.value) { - // leaf node - return [cy.collection(root.value)]; - } else { - if (root.left) getAllChildren(root.left, left); - if (root.right) getAllChildren(root.right, right); - return [cy.collection(left), cy.collection(right)]; - } - } else { - if (root.value) { - return [cy.collection(root.value)]; - } else { - if (root.left) left = buildClustersFromTree(root.left, k - 1, cy); - if (root.right) right = buildClustersFromTree(root.right, k - 1, cy); - return left.concat(right); - } - } -}; - -var hierarchicalClustering = function hierarchicalClustering(options) { - var cy = this.cy(); - var nodes = this.nodes(); - - // Set parameters of algorithm: linkage type, distance metric, etc. - var opts = setOptions$1(options); - var attrs = opts.attributes; - var getDist = function getDist(n1, n2) { - return clusteringDistance(opts.distance, attrs.length, function (i) { - return attrs[i](n1); - }, function (i) { - return attrs[i](n2); - }, n1, n2); - }; - - // Begin hierarchical algorithm - var clusters = []; - var dists = []; // distances between each pair of clusters - var mins = []; // closest cluster for each cluster - var index = []; // hash of all clusters by key - - // In agglomerative (bottom-up) clustering, each node starts as its own cluster - for (var n = 0; n < nodes.length; n++) { - var cluster = { - value: opts.mode === 'dendrogram' ? nodes[n] : [nodes[n]], - key: n, - index: n - }; - clusters[n] = cluster; - index[n] = cluster; - dists[n] = []; - mins[n] = 0; - } - - // Calculate the distance between each pair of clusters - for (var i = 0; i < clusters.length; i++) { - for (var j = 0; j <= i; j++) { - var dist = void 0; - if (opts.mode === 'dendrogram') { - // modes store cluster values differently - dist = i === j ? Infinity : getDist(clusters[i].value, clusters[j].value); - } else { - dist = i === j ? Infinity : getDist(clusters[i].value[0], clusters[j].value[0]); - } - dists[i][j] = dist; - dists[j][i] = dist; - if (dist < dists[i][mins[i]]) { - mins[i] = j; // Cache mins: closest cluster to cluster i is cluster j - } - } - } - - // Find the closest pair of clusters and merge them into a single cluster. - // Update distances between new cluster and each of the old clusters, and loop until threshold reached. - var merged = mergeClosest(clusters, index, dists, mins, opts); - while (merged) { - merged = mergeClosest(clusters, index, dists, mins, opts); - } - var retClusters; - - // Dendrogram mode builds the hierarchy and adds intermediary nodes + edges - // in addition to returning the clusters. - if (opts.mode === 'dendrogram') { - retClusters = buildClustersFromTree(clusters[0], opts.dendrogramDepth, cy); - if (opts.addDendrogram) buildDendrogram(clusters[0], cy); - } else { - // Regular mode simply returns the clusters - - retClusters = new Array(clusters.length); - clusters.forEach(function (cluster, i) { - // Clean up meta data used for clustering - cluster.key = cluster.index = null; - retClusters[i] = cy.collection(cluster.value); - }); - } - return retClusters; -}; -var hierarchicalClustering$1 = { - hierarchicalClustering: hierarchicalClustering, - hca: hierarchicalClustering -}; - -// Implemented by Zoe Xi @zoexi for GSOC 2016 -var defaults$9 = defaults$g({ - distance: 'euclidean', - // distance metric to compare attributes between two nodes - preference: 'median', - // suitability of a data point to serve as an exemplar - damping: 0.8, - // damping factor between [0.5, 1) - maxIterations: 1000, - // max number of iterations to run - minIterations: 100, - // min number of iterations to run in order for clustering to stop - attributes: [// functions to quantify the similarity between any two points - // e.g. node => node.data('weight') - ] -}); -var setOptions = function setOptions(options) { - var dmp = options.damping; - var pref = options.preference; - if (!(0.5 <= dmp && dmp < 1)) { - error("Damping must range on [0.5, 1). Got: ".concat(dmp)); - } - var validPrefs = ['median', 'mean', 'min', 'max']; - if (!(validPrefs.some(function (v) { - return v === pref; - }) || number$1(pref))) { - error("Preference must be one of [".concat(validPrefs.map(function (p) { - return "'".concat(p, "'"); - }).join(', '), "] or a number. Got: ").concat(pref)); - } - return defaults$9(options); -}; - -var getSimilarity = function getSimilarity(type, n1, n2, attributes) { - var attr = function attr(n, i) { - return attributes[i](n); - }; - - // nb negative because similarity should have an inverse relationship to distance - return -clusteringDistance(type, attributes.length, function (i) { - return attr(n1, i); - }, function (i) { - return attr(n2, i); - }, n1, n2); -}; -var getPreference = function getPreference(S, preference) { - // larger preference = greater # of clusters - var p = null; - if (preference === 'median') { - p = median(S); - } else if (preference === 'mean') { - p = mean(S); - } else if (preference === 'min') { - p = min(S); - } else if (preference === 'max') { - p = max(S); - } else { - // Custom preference number, as set by user - p = preference; - } - return p; -}; -var findExemplars = function findExemplars(n, R, A) { - var indices = []; - for (var i = 0; i < n; i++) { - if (R[i * n + i] + A[i * n + i] > 0) { - indices.push(i); - } - } - return indices; -}; -var assignClusters = function assignClusters(n, S, exemplars) { - var clusters = []; - for (var i = 0; i < n; i++) { - var index = -1; - var max = -Infinity; - for (var ei = 0; ei < exemplars.length; ei++) { - var e = exemplars[ei]; - if (S[i * n + e] > max) { - index = e; - max = S[i * n + e]; - } - } - if (index > 0) { - clusters.push(index); - } - } - for (var _ei = 0; _ei < exemplars.length; _ei++) { - clusters[exemplars[_ei]] = exemplars[_ei]; - } - return clusters; -}; -var cytoscape_esm_assign = function assign(n, S, exemplars) { - var clusters = assignClusters(n, S, exemplars); - for (var ei = 0; ei < exemplars.length; ei++) { - var ii = []; - for (var c = 0; c < clusters.length; c++) { - if (clusters[c] === exemplars[ei]) { - ii.push(c); - } - } - var maxI = -1; - var maxSum = -Infinity; - for (var i = 0; i < ii.length; i++) { - var sum = 0; - for (var j = 0; j < ii.length; j++) { - sum += S[ii[j] * n + ii[i]]; - } - if (sum > maxSum) { - maxI = i; - maxSum = sum; - } - } - exemplars[ei] = ii[maxI]; - } - clusters = assignClusters(n, S, exemplars); - return clusters; -}; -var affinityPropagation = function affinityPropagation(options) { - var cy = this.cy(); - var nodes = this.nodes(); - var opts = setOptions(options); - - // Map each node to its position in node array - var id2position = {}; - for (var i = 0; i < nodes.length; i++) { - id2position[nodes[i].id()] = i; - } - - // Begin affinity propagation algorithm - - var n; // number of data points - var n2; // size of matrices - var S; // similarity matrix (1D array) - var p; // preference/suitability of a data point to serve as an exemplar - var R; // responsibility matrix (1D array) - var A; // availability matrix (1D array) - - n = nodes.length; - n2 = n * n; - - // Initialize and build S similarity matrix - S = new Array(n2); - for (var _i = 0; _i < n2; _i++) { - S[_i] = -Infinity; // for cases where two data points shouldn't be linked together - } - - for (var _i2 = 0; _i2 < n; _i2++) { - for (var j = 0; j < n; j++) { - if (_i2 !== j) { - S[_i2 * n + j] = getSimilarity(opts.distance, nodes[_i2], nodes[j], opts.attributes); - } - } - } - - // Place preferences on the diagonal of S - p = getPreference(S, opts.preference); - for (var _i3 = 0; _i3 < n; _i3++) { - S[_i3 * n + _i3] = p; - } - - // Initialize R responsibility matrix - R = new Array(n2); - for (var _i4 = 0; _i4 < n2; _i4++) { - R[_i4] = 0.0; - } - - // Initialize A availability matrix - A = new Array(n2); - for (var _i5 = 0; _i5 < n2; _i5++) { - A[_i5] = 0.0; - } - var old = new Array(n); - var Rp = new Array(n); - var se = new Array(n); - for (var _i6 = 0; _i6 < n; _i6++) { - old[_i6] = 0.0; - Rp[_i6] = 0.0; - se[_i6] = 0; - } - var e = new Array(n * opts.minIterations); - for (var _i7 = 0; _i7 < e.length; _i7++) { - e[_i7] = 0; - } - var iter; - for (iter = 0; iter < opts.maxIterations; iter++) { - // main algorithmic loop - - // Update R responsibility matrix - for (var _i8 = 0; _i8 < n; _i8++) { - var max = -Infinity, - max2 = -Infinity, - maxI = -1, - AS = 0.0; - for (var _j = 0; _j < n; _j++) { - old[_j] = R[_i8 * n + _j]; - AS = A[_i8 * n + _j] + S[_i8 * n + _j]; - if (AS >= max) { - max2 = max; - max = AS; - maxI = _j; - } else if (AS > max2) { - max2 = AS; - } - } - for (var _j2 = 0; _j2 < n; _j2++) { - R[_i8 * n + _j2] = (1 - opts.damping) * (S[_i8 * n + _j2] - max) + opts.damping * old[_j2]; - } - R[_i8 * n + maxI] = (1 - opts.damping) * (S[_i8 * n + maxI] - max2) + opts.damping * old[maxI]; - } - - // Update A availability matrix - for (var _i9 = 0; _i9 < n; _i9++) { - var sum = 0; - for (var _j3 = 0; _j3 < n; _j3++) { - old[_j3] = A[_j3 * n + _i9]; - Rp[_j3] = Math.max(0, R[_j3 * n + _i9]); - sum += Rp[_j3]; - } - sum -= Rp[_i9]; - Rp[_i9] = R[_i9 * n + _i9]; - sum += Rp[_i9]; - for (var _j4 = 0; _j4 < n; _j4++) { - A[_j4 * n + _i9] = (1 - opts.damping) * Math.min(0, sum - Rp[_j4]) + opts.damping * old[_j4]; - } - A[_i9 * n + _i9] = (1 - opts.damping) * (sum - Rp[_i9]) + opts.damping * old[_i9]; - } - - // Check for convergence - var K = 0; - for (var _i10 = 0; _i10 < n; _i10++) { - var E = A[_i10 * n + _i10] + R[_i10 * n + _i10] > 0 ? 1 : 0; - e[iter % opts.minIterations * n + _i10] = E; - K += E; - } - if (K > 0 && (iter >= opts.minIterations - 1 || iter == opts.maxIterations - 1)) { - var _sum = 0; - for (var _i11 = 0; _i11 < n; _i11++) { - se[_i11] = 0; - for (var _j5 = 0; _j5 < opts.minIterations; _j5++) { - se[_i11] += e[_j5 * n + _i11]; - } - if (se[_i11] === 0 || se[_i11] === opts.minIterations) { - _sum++; - } - } - if (_sum === n) { - // then we have convergence - break; - } - } - } - - // Identify exemplars (cluster centers) - var exemplarsIndices = findExemplars(n, R, A); - - // Assign nodes to clusters - var clusterIndices = cytoscape_esm_assign(n, S, exemplarsIndices); - var clusters = {}; - for (var c = 0; c < exemplarsIndices.length; c++) { - clusters[exemplarsIndices[c]] = []; - } - for (var _i12 = 0; _i12 < nodes.length; _i12++) { - var pos = id2position[nodes[_i12].id()]; - var clusterIndex = clusterIndices[pos]; - if (clusterIndex != null) { - // the node may have not been assigned a cluster if no valid attributes were specified - clusters[clusterIndex].push(nodes[_i12]); - } - } - var retClusters = new Array(exemplarsIndices.length); - for (var _c = 0; _c < exemplarsIndices.length; _c++) { - retClusters[_c] = cy.collection(clusters[exemplarsIndices[_c]]); - } - return retClusters; -}; -var affinityPropagation$1 = { - affinityPropagation: affinityPropagation, - ap: affinityPropagation -}; - -var hierholzerDefaults = defaults$g({ - root: undefined, - directed: false -}); -var elesfn$k = { - hierholzer: function hierholzer(options) { - if (!plainObject(options)) { - var args = arguments; - options = { - root: args[0], - directed: args[1] - }; - } - var _hierholzerDefaults = hierholzerDefaults(options), - root = _hierholzerDefaults.root, - directed = _hierholzerDefaults.directed; - var eles = this; - var dflag = false; - var oddIn; - var oddOut; - var startVertex; - if (root) startVertex = string(root) ? this.filter(root)[0].id() : root[0].id(); - var nodes = {}; - var edges = {}; - if (directed) { - eles.forEach(function (ele) { - var id = ele.id(); - if (ele.isNode()) { - var ind = ele.indegree(true); - var outd = ele.outdegree(true); - var d1 = ind - outd; - var d2 = outd - ind; - if (d1 == 1) { - if (oddIn) dflag = true;else oddIn = id; - } else if (d2 == 1) { - if (oddOut) dflag = true;else oddOut = id; - } else if (d2 > 1 || d1 > 1) { - dflag = true; - } - nodes[id] = []; - ele.outgoers().forEach(function (e) { - if (e.isEdge()) nodes[id].push(e.id()); - }); - } else { - edges[id] = [undefined, ele.target().id()]; - } - }); - } else { - eles.forEach(function (ele) { - var id = ele.id(); - if (ele.isNode()) { - var d = ele.degree(true); - if (d % 2) { - if (!oddIn) oddIn = id;else if (!oddOut) oddOut = id;else dflag = true; - } - nodes[id] = []; - ele.connectedEdges().forEach(function (e) { - return nodes[id].push(e.id()); - }); - } else { - edges[id] = [ele.source().id(), ele.target().id()]; - } - }); - } - var result = { - found: false, - trail: undefined - }; - if (dflag) return result;else if (oddOut && oddIn) { - if (directed) { - if (startVertex && oddOut != startVertex) { - return result; - } - startVertex = oddOut; - } else { - if (startVertex && oddOut != startVertex && oddIn != startVertex) { - return result; - } else if (!startVertex) { - startVertex = oddOut; - } - } - } else { - if (!startVertex) startVertex = eles[0].id(); - } - var walk = function walk(v) { - var currentNode = v; - var subtour = [v]; - var adj, adjTail, adjHead; - while (nodes[currentNode].length) { - adj = nodes[currentNode].shift(); - adjTail = edges[adj][0]; - adjHead = edges[adj][1]; - if (currentNode != adjHead) { - nodes[adjHead] = nodes[adjHead].filter(function (e) { - return e != adj; - }); - currentNode = adjHead; - } else if (!directed && currentNode != adjTail) { - nodes[adjTail] = nodes[adjTail].filter(function (e) { - return e != adj; - }); - currentNode = adjTail; - } - subtour.unshift(adj); - subtour.unshift(currentNode); - } - return subtour; - }; - var trail = []; - var subtour = []; - subtour = walk(startVertex); - while (subtour.length != 1) { - if (nodes[subtour[0]].length == 0) { - trail.unshift(eles.getElementById(subtour.shift())); - trail.unshift(eles.getElementById(subtour.shift())); - } else { - subtour = walk(subtour.shift()).concat(subtour); - } - } - trail.unshift(eles.getElementById(subtour.shift())); // final node - - for (var d in nodes) { - if (nodes[d].length) { - return result; - } - } - result.found = true; - result.trail = this.spawn(trail, true); - return result; - } -}; - -var hopcroftTarjanBiconnected = function hopcroftTarjanBiconnected() { - var eles = this; - var nodes = {}; - var id = 0; - var edgeCount = 0; - var components = []; - var stack = []; - var visitedEdges = {}; - var buildComponent = function buildComponent(x, y) { - var i = stack.length - 1; - var cutset = []; - var component = eles.spawn(); - while (stack[i].x != x || stack[i].y != y) { - cutset.push(stack.pop().edge); - i--; - } - cutset.push(stack.pop().edge); - cutset.forEach(function (edge) { - var connectedNodes = edge.connectedNodes().intersection(eles); - component.merge(edge); - connectedNodes.forEach(function (node) { - var nodeId = node.id(); - var connectedEdges = node.connectedEdges().intersection(eles); - component.merge(node); - if (!nodes[nodeId].cutVertex) { - component.merge(connectedEdges); - } else { - component.merge(connectedEdges.filter(function (edge) { - return edge.isLoop(); - })); - } - }); - }); - components.push(component); - }; - var biconnectedSearch = function biconnectedSearch(root, currentNode, parent) { - if (root === parent) edgeCount += 1; - nodes[currentNode] = { - id: id, - low: id++, - cutVertex: false - }; - var edges = eles.getElementById(currentNode).connectedEdges().intersection(eles); - if (edges.size() === 0) { - components.push(eles.spawn(eles.getElementById(currentNode))); - } else { - var sourceId, targetId, otherNodeId, edgeId; - edges.forEach(function (edge) { - sourceId = edge.source().id(); - targetId = edge.target().id(); - otherNodeId = sourceId === currentNode ? targetId : sourceId; - if (otherNodeId !== parent) { - edgeId = edge.id(); - if (!visitedEdges[edgeId]) { - visitedEdges[edgeId] = true; - stack.push({ - x: currentNode, - y: otherNodeId, - edge: edge - }); - } - if (!(otherNodeId in nodes)) { - biconnectedSearch(root, otherNodeId, currentNode); - nodes[currentNode].low = Math.min(nodes[currentNode].low, nodes[otherNodeId].low); - if (nodes[currentNode].id <= nodes[otherNodeId].low) { - nodes[currentNode].cutVertex = true; - buildComponent(currentNode, otherNodeId); - } - } else { - nodes[currentNode].low = Math.min(nodes[currentNode].low, nodes[otherNodeId].id); - } - } - }); - } - }; - eles.forEach(function (ele) { - if (ele.isNode()) { - var nodeId = ele.id(); - if (!(nodeId in nodes)) { - edgeCount = 0; - biconnectedSearch(nodeId, nodeId); - nodes[nodeId].cutVertex = edgeCount > 1; - } - } - }); - var cutVertices = Object.keys(nodes).filter(function (id) { - return nodes[id].cutVertex; - }).map(function (id) { - return eles.getElementById(id); - }); - return { - cut: eles.spawn(cutVertices), - components: components - }; -}; -var hopcroftTarjanBiconnected$1 = { - hopcroftTarjanBiconnected: hopcroftTarjanBiconnected, - htbc: hopcroftTarjanBiconnected, - htb: hopcroftTarjanBiconnected, - hopcroftTarjanBiconnectedComponents: hopcroftTarjanBiconnected -}; - -var tarjanStronglyConnected = function tarjanStronglyConnected() { - var eles = this; - var nodes = {}; - var index = 0; - var components = []; - var stack = []; - var cut = eles.spawn(eles); - var stronglyConnectedSearch = function stronglyConnectedSearch(sourceNodeId) { - stack.push(sourceNodeId); - nodes[sourceNodeId] = { - index: index, - low: index++, - explored: false - }; - var connectedEdges = eles.getElementById(sourceNodeId).connectedEdges().intersection(eles); - connectedEdges.forEach(function (edge) { - var targetNodeId = edge.target().id(); - if (targetNodeId !== sourceNodeId) { - if (!(targetNodeId in nodes)) { - stronglyConnectedSearch(targetNodeId); - } - if (!nodes[targetNodeId].explored) { - nodes[sourceNodeId].low = Math.min(nodes[sourceNodeId].low, nodes[targetNodeId].low); - } - } - }); - if (nodes[sourceNodeId].index === nodes[sourceNodeId].low) { - var componentNodes = eles.spawn(); - for (;;) { - var nodeId = stack.pop(); - componentNodes.merge(eles.getElementById(nodeId)); - nodes[nodeId].low = nodes[sourceNodeId].index; - nodes[nodeId].explored = true; - if (nodeId === sourceNodeId) { - break; - } - } - var componentEdges = componentNodes.edgesWith(componentNodes); - var component = componentNodes.merge(componentEdges); - components.push(component); - cut = cut.difference(component); - } - }; - eles.forEach(function (ele) { - if (ele.isNode()) { - var nodeId = ele.id(); - if (!(nodeId in nodes)) { - stronglyConnectedSearch(nodeId); - } - } - }); - return { - cut: cut, - components: components - }; -}; -var tarjanStronglyConnected$1 = { - tarjanStronglyConnected: tarjanStronglyConnected, - tsc: tarjanStronglyConnected, - tscc: tarjanStronglyConnected, - tarjanStronglyConnectedComponents: tarjanStronglyConnected -}; - -var elesfn$j = {}; -[elesfn$v, elesfn$u, elesfn$t, elesfn$s, elesfn$r, elesfn$q, elesfn$p, elesfn$o, elesfn$n, elesfn$m, elesfn$l, markovClustering$1, kClustering, hierarchicalClustering$1, affinityPropagation$1, elesfn$k, hopcroftTarjanBiconnected$1, tarjanStronglyConnected$1].forEach(function (props) { - extend(elesfn$j, props); -}); - -/*! -Embeddable Minimum Strictly-Compliant Promises/A+ 1.1.1 Thenable -Copyright (c) 2013-2014 Ralf S. Engelschall (http://engelschall.com) -Licensed under The MIT License (http://opensource.org/licenses/MIT) -*/ - -/* promise states [Promises/A+ 2.1] */ -var STATE_PENDING = 0; /* [Promises/A+ 2.1.1] */ -var STATE_FULFILLED = 1; /* [Promises/A+ 2.1.2] */ -var STATE_REJECTED = 2; /* [Promises/A+ 2.1.3] */ - -/* promise object constructor */ -var api = function api(executor) { - /* optionally support non-constructor/plain-function call */ - if (!(this instanceof api)) return new api(executor); - - /* initialize object */ - this.id = 'Thenable/1.0.7'; - this.state = STATE_PENDING; /* initial state */ - this.fulfillValue = undefined; /* initial value */ /* [Promises/A+ 1.3, 2.1.2.2] */ - this.rejectReason = undefined; /* initial reason */ /* [Promises/A+ 1.5, 2.1.3.2] */ - this.onFulfilled = []; /* initial handlers */ - this.onRejected = []; /* initial handlers */ - - /* provide optional information-hiding proxy */ - this.proxy = { - then: this.then.bind(this) - }; - - /* support optional executor function */ - if (typeof executor === 'function') executor.call(this, this.fulfill.bind(this), this.reject.bind(this)); -}; - -/* promise API methods */ -api.prototype = { - /* promise resolving methods */ - fulfill: function fulfill(value) { - return deliver(this, STATE_FULFILLED, 'fulfillValue', value); - }, - reject: function reject(value) { - return deliver(this, STATE_REJECTED, 'rejectReason', value); - }, - /* "The then Method" [Promises/A+ 1.1, 1.2, 2.2] */ - then: function then(onFulfilled, onRejected) { - var curr = this; - var next = new api(); /* [Promises/A+ 2.2.7] */ - curr.onFulfilled.push(resolver(onFulfilled, next, 'fulfill')); /* [Promises/A+ 2.2.2/2.2.6] */ - curr.onRejected.push(resolver(onRejected, next, 'reject')); /* [Promises/A+ 2.2.3/2.2.6] */ - execute(curr); - return next.proxy; /* [Promises/A+ 2.2.7, 3.3] */ - } -}; - -/* deliver an action */ -var deliver = function deliver(curr, state, name, value) { - if (curr.state === STATE_PENDING) { - curr.state = state; /* [Promises/A+ 2.1.2.1, 2.1.3.1] */ - curr[name] = value; /* [Promises/A+ 2.1.2.2, 2.1.3.2] */ - execute(curr); - } - return curr; -}; - -/* execute all handlers */ -var execute = function execute(curr) { - if (curr.state === STATE_FULFILLED) execute_handlers(curr, 'onFulfilled', curr.fulfillValue);else if (curr.state === STATE_REJECTED) execute_handlers(curr, 'onRejected', curr.rejectReason); -}; - -/* execute particular set of handlers */ -var execute_handlers = function execute_handlers(curr, name, value) { - /* global setImmediate: true */ - /* global setTimeout: true */ - - /* short-circuit processing */ - if (curr[name].length === 0) return; - - /* iterate over all handlers, exactly once */ - var handlers = curr[name]; - curr[name] = []; /* [Promises/A+ 2.2.2.3, 2.2.3.3] */ - var func = function func() { - for (var i = 0; i < handlers.length; i++) { - handlers[i](value); - } /* [Promises/A+ 2.2.5] */ - }; - - /* execute procedure asynchronously */ /* [Promises/A+ 2.2.4, 3.1] */ - if (typeof setImmediate === 'function') setImmediate(func);else setTimeout(func, 0); -}; - -/* generate a resolver function */ -var resolver = function resolver(cb, next, method) { - return function (value) { - if (typeof cb !== 'function') /* [Promises/A+ 2.2.1, 2.2.7.3, 2.2.7.4] */ - next[method].call(next, value); /* [Promises/A+ 2.2.7.3, 2.2.7.4] */else { - var result; - try { - result = cb(value); - } /* [Promises/A+ 2.2.2.1, 2.2.3.1, 2.2.5, 3.2] */ catch (e) { - next.reject(e); /* [Promises/A+ 2.2.7.2] */ - return; - } - resolve(next, result); /* [Promises/A+ 2.2.7.1] */ - } - }; -}; - -/* "Promise Resolution Procedure" */ /* [Promises/A+ 2.3] */ -var resolve = function resolve(promise, x) { - /* sanity check arguments */ /* [Promises/A+ 2.3.1] */ - if (promise === x || promise.proxy === x) { - promise.reject(new TypeError('cannot resolve promise with itself')); - return; - } - - /* surgically check for a "then" method - (mainly to just call the "getter" of "then" only once) */ - var then; - if (_typeof(x) === 'object' && x !== null || typeof x === 'function') { - try { - then = x.then; - } /* [Promises/A+ 2.3.3.1, 3.5] */ catch (e) { - promise.reject(e); /* [Promises/A+ 2.3.3.2] */ - return; - } - } - - /* handle own Thenables [Promises/A+ 2.3.2] - and similar "thenables" [Promises/A+ 2.3.3] */ - if (typeof then === 'function') { - var resolved = false; - try { - /* call retrieved "then" method */ /* [Promises/A+ 2.3.3.3] */ - then.call(x, /* resolvePromise */ /* [Promises/A+ 2.3.3.3.1] */ - function (y) { - if (resolved) return; - resolved = true; /* [Promises/A+ 2.3.3.3.3] */ - if (y === x) /* [Promises/A+ 3.6] */ - promise.reject(new TypeError('circular thenable chain'));else resolve(promise, y); - }, /* rejectPromise */ /* [Promises/A+ 2.3.3.3.2] */ - function (r) { - if (resolved) return; - resolved = true; /* [Promises/A+ 2.3.3.3.3] */ - promise.reject(r); - }); - } catch (e) { - if (!resolved) /* [Promises/A+ 2.3.3.3.3] */ - promise.reject(e); /* [Promises/A+ 2.3.3.3.4] */ - } - - return; - } - - /* handle other values */ - promise.fulfill(x); /* [Promises/A+ 2.3.4, 2.3.3.4] */ -}; - -// so we always have Promise.all() -api.all = function (ps) { - return new api(function (resolveAll, rejectAll) { - var vals = new Array(ps.length); - var doneCount = 0; - var fulfill = function fulfill(i, val) { - vals[i] = val; - doneCount++; - if (doneCount === ps.length) { - resolveAll(vals); - } - }; - for (var i = 0; i < ps.length; i++) { - (function (i) { - var p = ps[i]; - var isPromise = p != null && p.then != null; - if (isPromise) { - p.then(function (val) { - fulfill(i, val); - }, function (err) { - rejectAll(err); - }); - } else { - var val = p; - fulfill(i, val); - } - })(i); - } - }); -}; -api.resolve = function (val) { - return new api(function (resolve, reject) { - resolve(val); - }); -}; -api.reject = function (val) { - return new api(function (resolve, reject) { - reject(val); - }); -}; -var Promise$1 = typeof Promise !== 'undefined' ? Promise : api; // eslint-disable-line no-undef - -var Animation = function Animation(target, opts, opts2) { - var isCore = core(target); - var isEle = !isCore; - var _p = this._private = extend({ - duration: 1000 - }, opts, opts2); - _p.target = target; - _p.style = _p.style || _p.css; - _p.started = false; - _p.playing = false; - _p.hooked = false; - _p.applying = false; - _p.progress = 0; - _p.completes = []; - _p.frames = []; - if (_p.complete && fn$6(_p.complete)) { - _p.completes.push(_p.complete); - } - if (isEle) { - var pos = target.position(); - _p.startPosition = _p.startPosition || { - x: pos.x, - y: pos.y - }; - _p.startStyle = _p.startStyle || target.cy().style().getAnimationStartStyle(target, _p.style); - } - if (isCore) { - var pan = target.pan(); - _p.startPan = { - x: pan.x, - y: pan.y - }; - _p.startZoom = target.zoom(); - } - - // for future timeline/animations impl - this.length = 1; - this[0] = this; -}; -var anifn = Animation.prototype; -extend(anifn, { - instanceString: function instanceString() { - return 'animation'; - }, - hook: function hook() { - var _p = this._private; - if (!_p.hooked) { - // add to target's animation queue - var q; - var tAni = _p.target._private.animation; - if (_p.queue) { - q = tAni.queue; - } else { - q = tAni.current; - } - q.push(this); - - // add to the animation loop pool - if (elementOrCollection(_p.target)) { - _p.target.cy().addToAnimationPool(_p.target); - } - _p.hooked = true; - } - return this; - }, - play: function play() { - var _p = this._private; - - // autorewind - if (_p.progress === 1) { - _p.progress = 0; - } - _p.playing = true; - _p.started = false; // needs to be started by animation loop - _p.stopped = false; - this.hook(); - - // the animation loop will start the animation... - - return this; - }, - playing: function playing() { - return this._private.playing; - }, - apply: function apply() { - var _p = this._private; - _p.applying = true; - _p.started = false; // needs to be started by animation loop - _p.stopped = false; - this.hook(); - - // the animation loop will apply the animation at this progress - - return this; - }, - applying: function applying() { - return this._private.applying; - }, - pause: function pause() { - var _p = this._private; - _p.playing = false; - _p.started = false; - return this; - }, - stop: function stop() { - var _p = this._private; - _p.playing = false; - _p.started = false; - _p.stopped = true; // to be removed from animation queues - - return this; - }, - rewind: function rewind() { - return this.progress(0); - }, - fastforward: function fastforward() { - return this.progress(1); - }, - time: function time(t) { - var _p = this._private; - if (t === undefined) { - return _p.progress * _p.duration; - } else { - return this.progress(t / _p.duration); - } - }, - progress: function progress(p) { - var _p = this._private; - var wasPlaying = _p.playing; - if (p === undefined) { - return _p.progress; - } else { - if (wasPlaying) { - this.pause(); - } - _p.progress = p; - _p.started = false; - if (wasPlaying) { - this.play(); - } - } - return this; - }, - completed: function completed() { - return this._private.progress === 1; - }, - reverse: function reverse() { - var _p = this._private; - var wasPlaying = _p.playing; - if (wasPlaying) { - this.pause(); - } - _p.progress = 1 - _p.progress; - _p.started = false; - var swap = function swap(a, b) { - var _pa = _p[a]; - if (_pa == null) { - return; - } - _p[a] = _p[b]; - _p[b] = _pa; - }; - swap('zoom', 'startZoom'); - swap('pan', 'startPan'); - swap('position', 'startPosition'); - - // swap styles - if (_p.style) { - for (var i = 0; i < _p.style.length; i++) { - var prop = _p.style[i]; - var name = prop.name; - var startStyleProp = _p.startStyle[name]; - _p.startStyle[name] = prop; - _p.style[i] = startStyleProp; - } - } - if (wasPlaying) { - this.play(); - } - return this; - }, - promise: function promise(type) { - var _p = this._private; - var arr; - switch (type) { - case 'frame': - arr = _p.frames; - break; - default: - case 'complete': - case 'completed': - arr = _p.completes; - } - return new Promise$1(function (resolve, reject) { - arr.push(function () { - resolve(); - }); - }); - } -}); -anifn.complete = anifn.completed; -anifn.run = anifn.play; -anifn.running = anifn.playing; - -var define$3 = { - animated: function animated() { - return function animatedImpl() { - var self = this; - var selfIsArrayLike = self.length !== undefined; - var all = selfIsArrayLike ? self : [self]; // put in array if not array-like - var cy = this._private.cy || this; - if (!cy.styleEnabled()) { - return false; - } - var ele = all[0]; - if (ele) { - return ele._private.animation.current.length > 0; - } - }; - }, - // animated - - clearQueue: function clearQueue() { - return function clearQueueImpl() { - var self = this; - var selfIsArrayLike = self.length !== undefined; - var all = selfIsArrayLike ? self : [self]; // put in array if not array-like - var cy = this._private.cy || this; - if (!cy.styleEnabled()) { - return this; - } - for (var i = 0; i < all.length; i++) { - var ele = all[i]; - ele._private.animation.queue = []; - } - return this; - }; - }, - // clearQueue - - delay: function delay() { - return function delayImpl(time, complete) { - var cy = this._private.cy || this; - if (!cy.styleEnabled()) { - return this; - } - return this.animate({ - delay: time, - duration: time, - complete: complete - }); - }; - }, - // delay - - delayAnimation: function delayAnimation() { - return function delayAnimationImpl(time, complete) { - var cy = this._private.cy || this; - if (!cy.styleEnabled()) { - return this; - } - return this.animation({ - delay: time, - duration: time, - complete: complete - }); - }; - }, - // delay - - animation: function animation() { - return function animationImpl(properties, params) { - var self = this; - var selfIsArrayLike = self.length !== undefined; - var all = selfIsArrayLike ? self : [self]; // put in array if not array-like - var cy = this._private.cy || this; - var isCore = !selfIsArrayLike; - var isEles = !isCore; - if (!cy.styleEnabled()) { - return this; - } - var style = cy.style(); - properties = extend({}, properties, params); - var propertiesEmpty = Object.keys(properties).length === 0; - if (propertiesEmpty) { - return new Animation(all[0], properties); // nothing to animate - } - - if (properties.duration === undefined) { - properties.duration = 400; - } - switch (properties.duration) { - case 'slow': - properties.duration = 600; - break; - case 'fast': - properties.duration = 200; - break; - } - if (isEles) { - properties.style = style.getPropsList(properties.style || properties.css); - properties.css = undefined; - } - if (isEles && properties.renderedPosition != null) { - var rpos = properties.renderedPosition; - var pan = cy.pan(); - var zoom = cy.zoom(); - properties.position = renderedToModelPosition(rpos, zoom, pan); - } - - // override pan w/ panBy if set - if (isCore && properties.panBy != null) { - var panBy = properties.panBy; - var cyPan = cy.pan(); - properties.pan = { - x: cyPan.x + panBy.x, - y: cyPan.y + panBy.y - }; - } - - // override pan w/ center if set - var center = properties.center || properties.centre; - if (isCore && center != null) { - var centerPan = cy.getCenterPan(center.eles, properties.zoom); - if (centerPan != null) { - properties.pan = centerPan; - } - } - - // override pan & zoom w/ fit if set - if (isCore && properties.fit != null) { - var fit = properties.fit; - var fitVp = cy.getFitViewport(fit.eles || fit.boundingBox, fit.padding); - if (fitVp != null) { - properties.pan = fitVp.pan; - properties.zoom = fitVp.zoom; - } - } - - // override zoom (& potentially pan) w/ zoom obj if set - if (isCore && plainObject(properties.zoom)) { - var vp = cy.getZoomedViewport(properties.zoom); - if (vp != null) { - if (vp.zoomed) { - properties.zoom = vp.zoom; - } - if (vp.panned) { - properties.pan = vp.pan; - } - } else { - properties.zoom = null; // an inavalid zoom (e.g. no delta) gets automatically destroyed - } - } - - return new Animation(all[0], properties); - }; - }, - // animate - - animate: function animate() { - return function animateImpl(properties, params) { - var self = this; - var selfIsArrayLike = self.length !== undefined; - var all = selfIsArrayLike ? self : [self]; // put in array if not array-like - var cy = this._private.cy || this; - if (!cy.styleEnabled()) { - return this; - } - if (params) { - properties = extend({}, properties, params); - } - - // manually hook and run the animation - for (var i = 0; i < all.length; i++) { - var ele = all[i]; - var queue = ele.animated() && (properties.queue === undefined || properties.queue); - var ani = ele.animation(properties, queue ? { - queue: true - } : undefined); - ani.play(); - } - return this; // chaining - }; - }, - - // animate - - stop: function stop() { - return function stopImpl(clearQueue, jumpToEnd) { - var self = this; - var selfIsArrayLike = self.length !== undefined; - var all = selfIsArrayLike ? self : [self]; // put in array if not array-like - var cy = this._private.cy || this; - if (!cy.styleEnabled()) { - return this; - } - for (var i = 0; i < all.length; i++) { - var ele = all[i]; - var _p = ele._private; - var anis = _p.animation.current; - for (var j = 0; j < anis.length; j++) { - var ani = anis[j]; - var ani_p = ani._private; - if (jumpToEnd) { - // next iteration of the animation loop, the animation - // will go straight to the end and be removed - ani_p.duration = 0; - } - } - - // clear the queue of future animations - if (clearQueue) { - _p.animation.queue = []; - } - if (!jumpToEnd) { - _p.animation.current = []; - } - } - - // we have to notify (the animation loop doesn't do it for us on `stop`) - cy.notify('draw'); - return this; - }; - } // stop -}; // define - -/** - * Checks if `value` is classified as an `Array` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array, else `false`. - * @example - * - * _.isArray([1, 2, 3]); - * // => true - * - * _.isArray(document.body.children); - * // => false - * - * _.isArray('abc'); - * // => false - * - * _.isArray(_.noop); - * // => false - */ -var isArray = Array.isArray; - -var isArray_1 = isArray; - -/** Used to match property names within property paths. */ -var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, - reIsPlainProp = /^\w*$/; - -/** - * Checks if `value` is a property name and not a property path. - * - * @private - * @param {*} value The value to check. - * @param {Object} [object] The object to query keys on. - * @returns {boolean} Returns `true` if `value` is a property name, else `false`. - */ -function isKey(value, object) { - if (isArray_1(value)) { - return false; - } - var type = typeof value; - if (type == 'number' || type == 'symbol' || type == 'boolean' || - value == null || isSymbol_1(value)) { - return true; - } - return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || - (object != null && value in Object(object)); -} - -var _isKey = isKey; - -/** `Object#toString` result references. */ -var asyncTag = '[object AsyncFunction]', - funcTag = '[object Function]', - genTag = '[object GeneratorFunction]', - proxyTag = '[object Proxy]'; - -/** - * Checks if `value` is classified as a `Function` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a function, else `false`. - * @example - * - * _.isFunction(_); - * // => true - * - * _.isFunction(/abc/); - * // => false - */ -function isFunction(value) { - if (!isObject_1(value)) { - return false; - } - // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 9 which returns 'object' for typed arrays and other constructors. - var tag = _baseGetTag(value); - return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; -} - -var isFunction_1 = isFunction; - -/** Used to detect overreaching core-js shims. */ -var coreJsData = _root['__core-js_shared__']; - -var _coreJsData = coreJsData; - -/** Used to detect methods masquerading as native. */ -var maskSrcKey = (function() { - var uid = /[^.]+$/.exec(_coreJsData && _coreJsData.keys && _coreJsData.keys.IE_PROTO || ''); - return uid ? ('Symbol(src)_1.' + uid) : ''; -}()); - -/** - * Checks if `func` has its source masked. - * - * @private - * @param {Function} func The function to check. - * @returns {boolean} Returns `true` if `func` is masked, else `false`. - */ -function isMasked(func) { - return !!maskSrcKey && (maskSrcKey in func); -} - -var _isMasked = isMasked; - -/** Used for built-in method references. */ -var funcProto$1 = Function.prototype; - -/** Used to resolve the decompiled source of functions. */ -var funcToString$1 = funcProto$1.toString; - -/** - * Converts `func` to its source code. - * - * @private - * @param {Function} func The function to convert. - * @returns {string} Returns the source code. - */ -function toSource(func) { - if (func != null) { - try { - return funcToString$1.call(func); - } catch (e) {} - try { - return (func + ''); - } catch (e) {} - } - return ''; -} - -var _toSource = toSource; - -/** - * Used to match `RegExp` - * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). - */ -var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; - -/** Used to detect host constructors (Safari). */ -var reIsHostCtor = /^\[object .+?Constructor\]$/; - -/** Used for built-in method references. */ -var funcProto = Function.prototype, - objectProto$3 = Object.prototype; - -/** Used to resolve the decompiled source of functions. */ -var funcToString = funcProto.toString; - -/** Used to check objects for own properties. */ -var hasOwnProperty$3 = objectProto$3.hasOwnProperty; - -/** Used to detect if a method is native. */ -var reIsNative = RegExp('^' + - funcToString.call(hasOwnProperty$3).replace(reRegExpChar, '\\$&') - .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' -); - -/** - * The base implementation of `_.isNative` without bad shim checks. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a native function, - * else `false`. - */ -function baseIsNative(value) { - if (!isObject_1(value) || _isMasked(value)) { - return false; - } - var pattern = isFunction_1(value) ? reIsNative : reIsHostCtor; - return pattern.test(_toSource(value)); -} - -var _baseIsNative = baseIsNative; - -/** - * Gets the value at `key` of `object`. - * - * @private - * @param {Object} [object] The object to query. - * @param {string} key The key of the property to get. - * @returns {*} Returns the property value. - */ -function getValue$1(object, key) { - return object == null ? undefined : object[key]; -} - -var _getValue = getValue$1; - -/** - * Gets the native function at `key` of `object`. - * - * @private - * @param {Object} object The object to query. - * @param {string} key The key of the method to get. - * @returns {*} Returns the function if it's native, else `undefined`. - */ -function getNative(object, key) { - var value = _getValue(object, key); - return _baseIsNative(value) ? value : undefined; -} - -var _getNative = getNative; - -/* Built-in method references that are verified to be native. */ -var nativeCreate = _getNative(Object, 'create'); - -var _nativeCreate = nativeCreate; - -/** - * Removes all key-value entries from the hash. - * - * @private - * @name clear - * @memberOf Hash - */ -function hashClear() { - this.__data__ = _nativeCreate ? _nativeCreate(null) : {}; - this.size = 0; -} - -var _hashClear = hashClear; - -/** - * Removes `key` and its value from the hash. - * - * @private - * @name delete - * @memberOf Hash - * @param {Object} hash The hash to modify. - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ -function hashDelete(key) { - var result = this.has(key) && delete this.__data__[key]; - this.size -= result ? 1 : 0; - return result; -} - -var _hashDelete = hashDelete; - -/** Used to stand-in for `undefined` hash values. */ -var HASH_UNDEFINED$1 = '__lodash_hash_undefined__'; - -/** Used for built-in method references. */ -var objectProto$2 = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty$2 = objectProto$2.hasOwnProperty; - -/** - * Gets the hash value for `key`. - * - * @private - * @name get - * @memberOf Hash - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ -function hashGet(key) { - var data = this.__data__; - if (_nativeCreate) { - var result = data[key]; - return result === HASH_UNDEFINED$1 ? undefined : result; - } - return hasOwnProperty$2.call(data, key) ? data[key] : undefined; -} - -var _hashGet = hashGet; - -/** Used for built-in method references. */ -var objectProto$1 = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty$1 = objectProto$1.hasOwnProperty; - -/** - * Checks if a hash value for `key` exists. - * - * @private - * @name has - * @memberOf Hash - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ -function hashHas(key) { - var data = this.__data__; - return _nativeCreate ? (data[key] !== undefined) : hasOwnProperty$1.call(data, key); -} - -var _hashHas = hashHas; - -/** Used to stand-in for `undefined` hash values. */ -var HASH_UNDEFINED = '__lodash_hash_undefined__'; - -/** - * Sets the hash `key` to `value`. - * - * @private - * @name set - * @memberOf Hash - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the hash instance. - */ -function hashSet(key, value) { - var data = this.__data__; - this.size += this.has(key) ? 0 : 1; - data[key] = (_nativeCreate && value === undefined) ? HASH_UNDEFINED : value; - return this; -} - -var _hashSet = hashSet; - -/** - * Creates a hash object. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ -function Hash(entries) { - var index = -1, - length = entries == null ? 0 : entries.length; - - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } -} - -// Add methods to `Hash`. -Hash.prototype.clear = _hashClear; -Hash.prototype['delete'] = _hashDelete; -Hash.prototype.get = _hashGet; -Hash.prototype.has = _hashHas; -Hash.prototype.set = _hashSet; - -var _Hash = Hash; - -/** - * Removes all key-value entries from the list cache. - * - * @private - * @name clear - * @memberOf ListCache - */ -function listCacheClear() { - this.__data__ = []; - this.size = 0; -} - -var _listCacheClear = listCacheClear; - -/** - * Performs a - * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * comparison between two values to determine if they are equivalent. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - * @example - * - * var object = { 'a': 1 }; - * var other = { 'a': 1 }; - * - * _.eq(object, object); - * // => true - * - * _.eq(object, other); - * // => false - * - * _.eq('a', 'a'); - * // => true - * - * _.eq('a', Object('a')); - * // => false - * - * _.eq(NaN, NaN); - * // => true - */ -function eq(value, other) { - return value === other || (value !== value && other !== other); -} - -var eq_1 = eq; - -/** - * Gets the index at which the `key` is found in `array` of key-value pairs. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} key The key to search for. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function assocIndexOf(array, key) { - var length = array.length; - while (length--) { - if (eq_1(array[length][0], key)) { - return length; - } - } - return -1; -} - -var _assocIndexOf = assocIndexOf; - -/** Used for built-in method references. */ -var arrayProto = Array.prototype; - -/** Built-in value references. */ -var splice = arrayProto.splice; - -/** - * Removes `key` and its value from the list cache. - * - * @private - * @name delete - * @memberOf ListCache - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ -function listCacheDelete(key) { - var data = this.__data__, - index = _assocIndexOf(data, key); - - if (index < 0) { - return false; - } - var lastIndex = data.length - 1; - if (index == lastIndex) { - data.pop(); - } else { - splice.call(data, index, 1); - } - --this.size; - return true; -} - -var _listCacheDelete = listCacheDelete; - -/** - * Gets the list cache value for `key`. - * - * @private - * @name get - * @memberOf ListCache - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ -function listCacheGet(key) { - var data = this.__data__, - index = _assocIndexOf(data, key); - - return index < 0 ? undefined : data[index][1]; -} - -var _listCacheGet = listCacheGet; - -/** - * Checks if a list cache value for `key` exists. - * - * @private - * @name has - * @memberOf ListCache - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ -function listCacheHas(key) { - return _assocIndexOf(this.__data__, key) > -1; -} - -var _listCacheHas = listCacheHas; - -/** - * Sets the list cache `key` to `value`. - * - * @private - * @name set - * @memberOf ListCache - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the list cache instance. - */ -function listCacheSet(key, value) { - var data = this.__data__, - index = _assocIndexOf(data, key); - - if (index < 0) { - ++this.size; - data.push([key, value]); - } else { - data[index][1] = value; - } - return this; -} - -var _listCacheSet = listCacheSet; - -/** - * Creates an list cache object. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ -function ListCache(entries) { - var index = -1, - length = entries == null ? 0 : entries.length; - - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } -} - -// Add methods to `ListCache`. -ListCache.prototype.clear = _listCacheClear; -ListCache.prototype['delete'] = _listCacheDelete; -ListCache.prototype.get = _listCacheGet; -ListCache.prototype.has = _listCacheHas; -ListCache.prototype.set = _listCacheSet; - -var _ListCache = ListCache; - -/* Built-in method references that are verified to be native. */ -var Map$1 = _getNative(_root, 'Map'); - -var _Map = Map$1; - -/** - * Removes all key-value entries from the map. - * - * @private - * @name clear - * @memberOf MapCache - */ -function mapCacheClear() { - this.size = 0; - this.__data__ = { - 'hash': new _Hash, - 'map': new (_Map || _ListCache), - 'string': new _Hash - }; -} - -var _mapCacheClear = mapCacheClear; - -/** - * Checks if `value` is suitable for use as unique object key. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is suitable, else `false`. - */ -function isKeyable(value) { - var type = typeof value; - return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') - ? (value !== '__proto__') - : (value === null); -} - -var _isKeyable = isKeyable; - -/** - * Gets the data for `map`. - * - * @private - * @param {Object} map The map to query. - * @param {string} key The reference key. - * @returns {*} Returns the map data. - */ -function getMapData(map, key) { - var data = map.__data__; - return _isKeyable(key) - ? data[typeof key == 'string' ? 'string' : 'hash'] - : data.map; -} - -var _getMapData = getMapData; - -/** - * Removes `key` and its value from the map. - * - * @private - * @name delete - * @memberOf MapCache - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ -function mapCacheDelete(key) { - var result = _getMapData(this, key)['delete'](key); - this.size -= result ? 1 : 0; - return result; -} - -var _mapCacheDelete = mapCacheDelete; - -/** - * Gets the map value for `key`. - * - * @private - * @name get - * @memberOf MapCache - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ -function mapCacheGet(key) { - return _getMapData(this, key).get(key); -} - -var _mapCacheGet = mapCacheGet; - -/** - * Checks if a map value for `key` exists. - * - * @private - * @name has - * @memberOf MapCache - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ -function mapCacheHas(key) { - return _getMapData(this, key).has(key); -} - -var _mapCacheHas = mapCacheHas; - -/** - * Sets the map `key` to `value`. - * - * @private - * @name set - * @memberOf MapCache - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the map cache instance. - */ -function mapCacheSet(key, value) { - var data = _getMapData(this, key), - size = data.size; - - data.set(key, value); - this.size += data.size == size ? 0 : 1; - return this; -} - -var _mapCacheSet = mapCacheSet; - -/** - * Creates a map cache object to store key-value pairs. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ -function MapCache(entries) { - var index = -1, - length = entries == null ? 0 : entries.length; - - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } -} - -// Add methods to `MapCache`. -MapCache.prototype.clear = _mapCacheClear; -MapCache.prototype['delete'] = _mapCacheDelete; -MapCache.prototype.get = _mapCacheGet; -MapCache.prototype.has = _mapCacheHas; -MapCache.prototype.set = _mapCacheSet; - -var _MapCache = MapCache; - -/** Error message constants. */ -var FUNC_ERROR_TEXT = 'Expected a function'; - -/** - * Creates a function that memoizes the result of `func`. If `resolver` is - * provided, it determines the cache key for storing the result based on the - * arguments provided to the memoized function. By default, the first argument - * provided to the memoized function is used as the map cache key. The `func` - * is invoked with the `this` binding of the memoized function. - * - * **Note:** The cache is exposed as the `cache` property on the memoized - * function. Its creation may be customized by replacing the `_.memoize.Cache` - * constructor with one whose instances implement the - * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) - * method interface of `clear`, `delete`, `get`, `has`, and `set`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {Function} func The function to have its output memoized. - * @param {Function} [resolver] The function to resolve the cache key. - * @returns {Function} Returns the new memoized function. - * @example - * - * var object = { 'a': 1, 'b': 2 }; - * var other = { 'c': 3, 'd': 4 }; - * - * var values = _.memoize(_.values); - * values(object); - * // => [1, 2] - * - * values(other); - * // => [3, 4] - * - * object.a = 2; - * values(object); - * // => [1, 2] - * - * // Modify the result cache. - * values.cache.set(object, ['a', 'b']); - * values(object); - * // => ['a', 'b'] - * - * // Replace `_.memoize.Cache`. - * _.memoize.Cache = WeakMap; - */ -function memoize(func, resolver) { - if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) { - throw new TypeError(FUNC_ERROR_TEXT); - } - var memoized = function() { - var args = arguments, - key = resolver ? resolver.apply(this, args) : args[0], - cache = memoized.cache; - - if (cache.has(key)) { - return cache.get(key); - } - var result = func.apply(this, args); - memoized.cache = cache.set(key, result) || cache; - return result; - }; - memoized.cache = new (memoize.Cache || _MapCache); - return memoized; -} - -// Expose `MapCache`. -memoize.Cache = _MapCache; - -var memoize_1 = memoize; - -/** Used as the maximum memoize cache size. */ -var MAX_MEMOIZE_SIZE = 500; - -/** - * A specialized version of `_.memoize` which clears the memoized function's - * cache when it exceeds `MAX_MEMOIZE_SIZE`. - * - * @private - * @param {Function} func The function to have its output memoized. - * @returns {Function} Returns the new memoized function. - */ -function memoizeCapped(func) { - var result = memoize_1(func, function(key) { - if (cache.size === MAX_MEMOIZE_SIZE) { - cache.clear(); - } - return key; - }); - - var cache = result.cache; - return result; -} - -var _memoizeCapped = memoizeCapped; - -/** Used to match property names within property paths. */ -var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; - -/** Used to match backslashes in property paths. */ -var reEscapeChar = /\\(\\)?/g; - -/** - * Converts `string` to a property path array. - * - * @private - * @param {string} string The string to convert. - * @returns {Array} Returns the property path array. - */ -var stringToPath = _memoizeCapped(function(string) { - var result = []; - if (string.charCodeAt(0) === 46 /* . */) { - result.push(''); - } - string.replace(rePropName, function(match, number, quote, subString) { - result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match)); - }); - return result; -}); - -var _stringToPath = stringToPath; - -/** - * A specialized version of `_.map` for arrays without support for iteratee - * shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the new mapped array. - */ -function arrayMap(array, iteratee) { - var index = -1, - length = array == null ? 0 : array.length, - result = Array(length); - - while (++index < length) { - result[index] = iteratee(array[index], index, array); - } - return result; -} - -var _arrayMap = arrayMap; - -/** Used as references for various `Number` constants. */ -var INFINITY$1 = 1 / 0; - -/** Used to convert symbols to primitives and strings. */ -var symbolProto = _Symbol ? _Symbol.prototype : undefined, - symbolToString = symbolProto ? symbolProto.toString : undefined; - -/** - * The base implementation of `_.toString` which doesn't convert nullish - * values to empty strings. - * - * @private - * @param {*} value The value to process. - * @returns {string} Returns the string. - */ -function baseToString(value) { - // Exit early for strings to avoid a performance hit in some environments. - if (typeof value == 'string') { - return value; - } - if (isArray_1(value)) { - // Recursively convert values (susceptible to call stack limits). - return _arrayMap(value, baseToString) + ''; - } - if (isSymbol_1(value)) { - return symbolToString ? symbolToString.call(value) : ''; - } - var result = (value + ''); - return (result == '0' && (1 / value) == -INFINITY$1) ? '-0' : result; -} - -var _baseToString = baseToString; - -/** - * Converts `value` to a string. An empty string is returned for `null` - * and `undefined` values. The sign of `-0` is preserved. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {string} Returns the converted string. - * @example - * - * _.toString(null); - * // => '' - * - * _.toString(-0); - * // => '-0' - * - * _.toString([1, 2, 3]); - * // => '1,2,3' - */ -function toString$1(value) { - return value == null ? '' : _baseToString(value); -} - -var toString_1 = toString$1; - -/** - * Casts `value` to a path array if it's not one. - * - * @private - * @param {*} value The value to inspect. - * @param {Object} [object] The object to query keys on. - * @returns {Array} Returns the cast property path array. - */ -function castPath(value, object) { - if (isArray_1(value)) { - return value; - } - return _isKey(value, object) ? [value] : _stringToPath(toString_1(value)); -} - -var _castPath = castPath; - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0; - -/** - * Converts `value` to a string key if it's not a string or symbol. - * - * @private - * @param {*} value The value to inspect. - * @returns {string|symbol} Returns the key. - */ -function toKey(value) { - if (typeof value == 'string' || isSymbol_1(value)) { - return value; - } - var result = (value + ''); - return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; -} - -var _toKey = toKey; - -/** - * The base implementation of `_.get` without support for default values. - * - * @private - * @param {Object} object The object to query. - * @param {Array|string} path The path of the property to get. - * @returns {*} Returns the resolved value. - */ -function baseGet(object, path) { - path = _castPath(path, object); - - var index = 0, - length = path.length; - - while (object != null && index < length) { - object = object[_toKey(path[index++])]; - } - return (index && index == length) ? object : undefined; -} - -var _baseGet = baseGet; - -/** - * Gets the value at `path` of `object`. If the resolved value is - * `undefined`, the `defaultValue` is returned in its place. - * - * @static - * @memberOf _ - * @since 3.7.0 - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path of the property to get. - * @param {*} [defaultValue] The value returned for `undefined` resolved values. - * @returns {*} Returns the resolved value. - * @example - * - * var object = { 'a': [{ 'b': { 'c': 3 } }] }; - * - * _.get(object, 'a[0].b.c'); - * // => 3 - * - * _.get(object, ['a', '0', 'b', 'c']); - * // => 3 - * - * _.get(object, 'a.b.c', 'default'); - * // => 'default' - */ -function get(object, path, defaultValue) { - var result = object == null ? undefined : _baseGet(object, path); - return result === undefined ? defaultValue : result; -} - -var get_1 = get; - -var defineProperty = (function() { - try { - var func = _getNative(Object, 'defineProperty'); - func({}, '', {}); - return func; - } catch (e) {} -}()); - -var _defineProperty = defineProperty; - -/** - * The base implementation of `assignValue` and `assignMergeValue` without - * value checks. - * - * @private - * @param {Object} object The object to modify. - * @param {string} key The key of the property to assign. - * @param {*} value The value to assign. - */ -function baseAssignValue(object, key, value) { - if (key == '__proto__' && _defineProperty) { - _defineProperty(object, key, { - 'configurable': true, - 'enumerable': true, - 'value': value, - 'writable': true - }); - } else { - object[key] = value; - } -} - -var _baseAssignValue = baseAssignValue; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var cytoscape_esm_hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Assigns `value` to `key` of `object` if the existing value is not equivalent - * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons. - * - * @private - * @param {Object} object The object to modify. - * @param {string} key The key of the property to assign. - * @param {*} value The value to assign. - */ -function assignValue(object, key, value) { - var objValue = object[key]; - if (!(cytoscape_esm_hasOwnProperty.call(object, key) && eq_1(objValue, value)) || - (value === undefined && !(key in object))) { - _baseAssignValue(object, key, value); - } -} - -var _assignValue = assignValue; - -/** Used as references for various `Number` constants. */ -var MAX_SAFE_INTEGER = 9007199254740991; - -/** Used to detect unsigned integer values. */ -var reIsUint = /^(?:0|[1-9]\d*)$/; - -/** - * Checks if `value` is a valid array-like index. - * - * @private - * @param {*} value The value to check. - * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. - * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. - */ -function isIndex(value, length) { - var type = typeof value; - length = length == null ? MAX_SAFE_INTEGER : length; - - return !!length && - (type == 'number' || - (type != 'symbol' && reIsUint.test(value))) && - (value > -1 && value % 1 == 0 && value < length); -} - -var _isIndex = isIndex; - -/** - * The base implementation of `_.set`. - * - * @private - * @param {Object} object The object to modify. - * @param {Array|string} path The path of the property to set. - * @param {*} value The value to set. - * @param {Function} [customizer] The function to customize path creation. - * @returns {Object} Returns `object`. - */ -function baseSet(object, path, value, customizer) { - if (!isObject_1(object)) { - return object; - } - path = _castPath(path, object); - - var index = -1, - length = path.length, - lastIndex = length - 1, - nested = object; - - while (nested != null && ++index < length) { - var key = _toKey(path[index]), - newValue = value; - - if (key === '__proto__' || key === 'constructor' || key === 'prototype') { - return object; - } - - if (index != lastIndex) { - var objValue = nested[key]; - newValue = customizer ? customizer(objValue, key, nested) : undefined; - if (newValue === undefined) { - newValue = isObject_1(objValue) - ? objValue - : (_isIndex(path[index + 1]) ? [] : {}); - } - } - _assignValue(nested, key, newValue); - nested = nested[key]; - } - return object; -} - -var _baseSet = baseSet; - -/** - * Sets the value at `path` of `object`. If a portion of `path` doesn't exist, - * it's created. Arrays are created for missing index properties while objects - * are created for all other missing properties. Use `_.setWith` to customize - * `path` creation. - * - * **Note:** This method mutates `object`. - * - * @static - * @memberOf _ - * @since 3.7.0 - * @category Object - * @param {Object} object The object to modify. - * @param {Array|string} path The path of the property to set. - * @param {*} value The value to set. - * @returns {Object} Returns `object`. - * @example - * - * var object = { 'a': [{ 'b': { 'c': 3 } }] }; - * - * _.set(object, 'a[0].b.c', 4); - * console.log(object.a[0].b.c); - * // => 4 - * - * _.set(object, ['x', '0', 'y', 'z'], 5); - * console.log(object.x[0].y.z); - * // => 5 - */ -function set(object, path, value) { - return object == null ? object : _baseSet(object, path, value); -} - -var set_1 = set; - -/** - * Copies the values of `source` to `array`. - * - * @private - * @param {Array} source The array to copy values from. - * @param {Array} [array=[]] The array to copy values to. - * @returns {Array} Returns `array`. - */ -function copyArray(source, array) { - var index = -1, - length = source.length; - - array || (array = Array(length)); - while (++index < length) { - array[index] = source[index]; - } - return array; -} - -var _copyArray = copyArray; - -/** - * Converts `value` to a property path array. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Util - * @param {*} value The value to convert. - * @returns {Array} Returns the new property path array. - * @example - * - * _.toPath('a.b.c'); - * // => ['a', 'b', 'c'] - * - * _.toPath('a[0].b.c'); - * // => ['a', '0', 'b', 'c'] - */ -function toPath(value) { - if (isArray_1(value)) { - return _arrayMap(value, _toKey); - } - return isSymbol_1(value) ? [value] : _copyArray(_stringToPath(toString_1(value))); -} - -var toPath_1 = toPath; - -var define$2 = { - // access data field - data: function data(params) { - var defaults = { - field: 'data', - bindingEvent: 'data', - allowBinding: false, - allowSetting: false, - allowGetting: false, - settingEvent: 'data', - settingTriggersEvent: false, - triggerFnName: 'trigger', - immutableKeys: {}, - // key => true if immutable - updateStyle: false, - beforeGet: function beforeGet(self) {}, - beforeSet: function beforeSet(self, obj) {}, - onSet: function onSet(self) {}, - canSet: function canSet(self) { - return true; - } - }; - params = extend({}, defaults, params); - return function dataImpl(name, value) { - var p = params; - var self = this; - var selfIsArrayLike = self.length !== undefined; - var all = selfIsArrayLike ? self : [self]; // put in array if not array-like - var single = selfIsArrayLike ? self[0] : self; - - // .data('foo', ...) - if (string(name)) { - // set or get property - var isPathLike = name.indexOf('.') !== -1; // there might be a normal field with a dot - var path = isPathLike && toPath_1(name); - - // .data('foo') - if (p.allowGetting && value === undefined) { - // get - - var ret; - if (single) { - p.beforeGet(single); - - // check if it's path and a field with the same name doesn't exist - if (path && single._private[p.field][name] === undefined) { - ret = get_1(single._private[p.field], path); - } else { - ret = single._private[p.field][name]; - } - } - return ret; - - // .data('foo', 'bar') - } else if (p.allowSetting && value !== undefined) { - // set - var valid = !p.immutableKeys[name]; - if (valid) { - var change = _defineProperty$1({}, name, value); - p.beforeSet(self, change); - for (var i = 0, l = all.length; i < l; i++) { - var ele = all[i]; - if (p.canSet(ele)) { - if (path && single._private[p.field][name] === undefined) { - set_1(ele._private[p.field], path, value); - } else { - ele._private[p.field][name] = value; - } - } - } - - // update mappers if asked - if (p.updateStyle) { - self.updateStyle(); - } - - // call onSet callback - p.onSet(self); - if (p.settingTriggersEvent) { - self[p.triggerFnName](p.settingEvent); - } - } - } - - // .data({ 'foo': 'bar' }) - } else if (p.allowSetting && plainObject(name)) { - // extend - var obj = name; - var k, v; - var keys = Object.keys(obj); - p.beforeSet(self, obj); - for (var _i = 0; _i < keys.length; _i++) { - k = keys[_i]; - v = obj[k]; - var _valid = !p.immutableKeys[k]; - if (_valid) { - for (var j = 0; j < all.length; j++) { - var _ele = all[j]; - if (p.canSet(_ele)) { - _ele._private[p.field][k] = v; - } - } - } - } - - // update mappers if asked - if (p.updateStyle) { - self.updateStyle(); - } - - // call onSet callback - p.onSet(self); - if (p.settingTriggersEvent) { - self[p.triggerFnName](p.settingEvent); - } - - // .data(function(){ ... }) - } else if (p.allowBinding && fn$6(name)) { - // bind to event - var fn = name; - self.on(p.bindingEvent, fn); - - // .data() - } else if (p.allowGetting && name === undefined) { - // get whole object - var _ret; - if (single) { - p.beforeGet(single); - _ret = single._private[p.field]; - } - return _ret; - } - return self; // maintain chainability - }; // function - }, - - // data - - // remove data field - removeData: function removeData(params) { - var defaults = { - field: 'data', - event: 'data', - triggerFnName: 'trigger', - triggerEvent: false, - immutableKeys: {} // key => true if immutable - }; - - params = extend({}, defaults, params); - return function removeDataImpl(names) { - var p = params; - var self = this; - var selfIsArrayLike = self.length !== undefined; - var all = selfIsArrayLike ? self : [self]; // put in array if not array-like - - // .removeData('foo bar') - if (string(names)) { - // then get the list of keys, and delete them - var keys = names.split(/\s+/); - var l = keys.length; - for (var i = 0; i < l; i++) { - // delete each non-empty key - var key = keys[i]; - if (emptyString(key)) { - continue; - } - var valid = !p.immutableKeys[key]; // not valid if immutable - if (valid) { - for (var i_a = 0, l_a = all.length; i_a < l_a; i_a++) { - all[i_a]._private[p.field][key] = undefined; - } - } - } - if (p.triggerEvent) { - self[p.triggerFnName](p.event); - } - - // .removeData() - } else if (names === undefined) { - // then delete all keys - - for (var _i_a = 0, _l_a = all.length; _i_a < _l_a; _i_a++) { - var _privateFields = all[_i_a]._private[p.field]; - var _keys = Object.keys(_privateFields); - for (var _i2 = 0; _i2 < _keys.length; _i2++) { - var _key = _keys[_i2]; - var validKeyToDelete = !p.immutableKeys[_key]; - if (validKeyToDelete) { - _privateFields[_key] = undefined; - } - } - } - if (p.triggerEvent) { - self[p.triggerFnName](p.event); - } - } - return self; // maintain chaining - }; // function - } // removeData -}; // define - -var define$1 = { - eventAliasesOn: function eventAliasesOn(proto) { - var p = proto; - p.addListener = p.listen = p.bind = p.on; - p.unlisten = p.unbind = p.off = p.removeListener; - p.trigger = p.emit; - - // this is just a wrapper alias of .on() - p.pon = p.promiseOn = function (events, selector) { - var self = this; - var args = Array.prototype.slice.call(arguments, 0); - return new Promise$1(function (resolve, reject) { - var callback = function callback(e) { - self.off.apply(self, offArgs); - resolve(e); - }; - var onArgs = args.concat([callback]); - var offArgs = onArgs.concat([]); - self.on.apply(self, onArgs); - }); - }; - } -}; // define - -// use this module to cherry pick functions into your prototype -var cytoscape_esm_define = {}; -[define$3, define$2, define$1].forEach(function (m) { - extend(cytoscape_esm_define, m); -}); - -var elesfn$i = { - animate: cytoscape_esm_define.animate(), - animation: cytoscape_esm_define.animation(), - animated: cytoscape_esm_define.animated(), - clearQueue: cytoscape_esm_define.clearQueue(), - delay: cytoscape_esm_define.delay(), - delayAnimation: cytoscape_esm_define.delayAnimation(), - stop: cytoscape_esm_define.stop() -}; - -var elesfn$h = { - classes: function classes(_classes) { - var self = this; - if (_classes === undefined) { - var ret = []; - self[0]._private.classes.forEach(function (cls) { - return ret.push(cls); - }); - return ret; - } else if (!array(_classes)) { - // extract classes from string - _classes = (_classes || '').match(/\S+/g) || []; - } - var changed = []; - var classesSet = new Set$1(_classes); - - // check and update each ele - for (var j = 0; j < self.length; j++) { - var ele = self[j]; - var _p = ele._private; - var eleClasses = _p.classes; - var changedEle = false; - - // check if ele has all of the passed classes - for (var i = 0; i < _classes.length; i++) { - var cls = _classes[i]; - var eleHasClass = eleClasses.has(cls); - if (!eleHasClass) { - changedEle = true; - break; - } - } - - // check if ele has classes outside of those passed - if (!changedEle) { - changedEle = eleClasses.size !== _classes.length; - } - if (changedEle) { - _p.classes = classesSet; - changed.push(ele); - } - } - - // trigger update style on those eles that had class changes - if (changed.length > 0) { - this.spawn(changed).updateStyle().emit('class'); - } - return self; - }, - addClass: function addClass(classes) { - return this.toggleClass(classes, true); - }, - hasClass: function hasClass(className) { - var ele = this[0]; - return ele != null && ele._private.classes.has(className); - }, - toggleClass: function toggleClass(classes, toggle) { - if (!array(classes)) { - // extract classes from string - classes = classes.match(/\S+/g) || []; - } - var self = this; - var toggleUndefd = toggle === undefined; - var changed = []; // eles who had classes changed - - for (var i = 0, il = self.length; i < il; i++) { - var ele = self[i]; - var eleClasses = ele._private.classes; - var changedEle = false; - for (var j = 0; j < classes.length; j++) { - var cls = classes[j]; - var hasClass = eleClasses.has(cls); - var changedNow = false; - if (toggle || toggleUndefd && !hasClass) { - eleClasses.add(cls); - changedNow = true; - } else if (!toggle || toggleUndefd && hasClass) { - eleClasses["delete"](cls); - changedNow = true; - } - if (!changedEle && changedNow) { - changed.push(ele); - changedEle = true; - } - } // for j classes - } // for i eles - - // trigger update style on those eles that had class changes - if (changed.length > 0) { - this.spawn(changed).updateStyle().emit('class'); - } - return self; - }, - removeClass: function removeClass(classes) { - return this.toggleClass(classes, false); - }, - flashClass: function flashClass(classes, duration) { - var self = this; - if (duration == null) { - duration = 250; - } else if (duration === 0) { - return self; // nothing to do really - } - - self.addClass(classes); - setTimeout(function () { - self.removeClass(classes); - }, duration); - return self; - } -}; -elesfn$h.className = elesfn$h.classNames = elesfn$h.classes; - -// tokens in the query language -var tokens = { - metaChar: '[\\!\\"\\#\\$\\%\\&\\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]', - // chars we need to escape in let names, etc - comparatorOp: '=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=', - // binary comparison op (used in data selectors) - boolOp: '\\?|\\!|\\^', - // boolean (unary) operators (used in data selectors) - string: '"(?:\\\\"|[^"])*"' + '|' + "'(?:\\\\'|[^'])*'", - // string literals (used in data selectors) -- doublequotes | singlequotes - number: number, - // number literal (used in data selectors) --- e.g. 0.1234, 1234, 12e123 - meta: 'degree|indegree|outdegree', - // allowed metadata fields (i.e. allowed functions to use from Collection) - separator: '\\s*,\\s*', - // queries are separated by commas, e.g. edge[foo = 'bar'], node.someClass - descendant: '\\s+', - child: '\\s+>\\s+', - subject: '\\$', - group: 'node|edge|\\*', - directedEdge: '\\s+->\\s+', - undirectedEdge: '\\s+<->\\s+' -}; -tokens.variable = '(?:[\\w-.]|(?:\\\\' + tokens.metaChar + '))+'; // a variable name can have letters, numbers, dashes, and periods -tokens.className = '(?:[\\w-]|(?:\\\\' + tokens.metaChar + '))+'; // a class name has the same rules as a variable except it can't have a '.' in the name -tokens.value = tokens.string + '|' + tokens.number; // a value literal, either a string or number -tokens.id = tokens.variable; // an element id (follows variable conventions) - -(function () { - var ops, op, i; - - // add @ variants to comparatorOp - ops = tokens.comparatorOp.split('|'); - for (i = 0; i < ops.length; i++) { - op = ops[i]; - tokens.comparatorOp += '|@' + op; - } - - // add ! variants to comparatorOp - ops = tokens.comparatorOp.split('|'); - for (i = 0; i < ops.length; i++) { - op = ops[i]; - if (op.indexOf('!') >= 0) { - continue; - } // skip ops that explicitly contain ! - if (op === '=') { - continue; - } // skip = b/c != is explicitly defined - - tokens.comparatorOp += '|\\!' + op; - } -})(); - -/** - * Make a new query object - * - * @prop type {Type} The type enum (int) of the query - * @prop checks List of checks to make against an ele to test for a match - */ -var newQuery = function newQuery() { - return { - checks: [] - }; -}; - -/** - * A check type enum-like object. Uses integer values for fast match() lookup. - * The ordering does not matter as long as the ints are unique. - */ -var Type = { - /** E.g. node */ - GROUP: 0, - /** A collection of elements */ - COLLECTION: 1, - /** A filter(ele) function */ - FILTER: 2, - /** E.g. [foo > 1] */ - DATA_COMPARE: 3, - /** E.g. [foo] */ - DATA_EXIST: 4, - /** E.g. [?foo] */ - DATA_BOOL: 5, - /** E.g. [[degree > 2]] */ - META_COMPARE: 6, - /** E.g. :selected */ - STATE: 7, - /** E.g. #foo */ - ID: 8, - /** E.g. .foo */ - CLASS: 9, - /** E.g. #foo <-> #bar */ - UNDIRECTED_EDGE: 10, - /** E.g. #foo -> #bar */ - DIRECTED_EDGE: 11, - /** E.g. $#foo -> #bar */ - NODE_SOURCE: 12, - /** E.g. #foo -> $#bar */ - NODE_TARGET: 13, - /** E.g. $#foo <-> #bar */ - NODE_NEIGHBOR: 14, - /** E.g. #foo > #bar */ - CHILD: 15, - /** E.g. #foo #bar */ - DESCENDANT: 16, - /** E.g. $#foo > #bar */ - PARENT: 17, - /** E.g. $#foo #bar */ - ANCESTOR: 18, - /** E.g. #foo > $bar > #baz */ - COMPOUND_SPLIT: 19, - /** Always matches, useful placeholder for subject in `COMPOUND_SPLIT` */ - TRUE: 20 -}; - -var stateSelectors = [{ - selector: ':selected', - matches: function matches(ele) { - return ele.selected(); - } -}, { - selector: ':unselected', - matches: function matches(ele) { - return !ele.selected(); - } -}, { - selector: ':selectable', - matches: function matches(ele) { - return ele.selectable(); - } -}, { - selector: ':unselectable', - matches: function matches(ele) { - return !ele.selectable(); - } -}, { - selector: ':locked', - matches: function matches(ele) { - return ele.locked(); - } -}, { - selector: ':unlocked', - matches: function matches(ele) { - return !ele.locked(); - } -}, { - selector: ':visible', - matches: function matches(ele) { - return ele.visible(); - } -}, { - selector: ':hidden', - matches: function matches(ele) { - return !ele.visible(); - } -}, { - selector: ':transparent', - matches: function matches(ele) { - return ele.transparent(); - } -}, { - selector: ':grabbed', - matches: function matches(ele) { - return ele.grabbed(); - } -}, { - selector: ':free', - matches: function matches(ele) { - return !ele.grabbed(); - } -}, { - selector: ':removed', - matches: function matches(ele) { - return ele.removed(); - } -}, { - selector: ':inside', - matches: function matches(ele) { - return !ele.removed(); - } -}, { - selector: ':grabbable', - matches: function matches(ele) { - return ele.grabbable(); - } -}, { - selector: ':ungrabbable', - matches: function matches(ele) { - return !ele.grabbable(); - } -}, { - selector: ':animated', - matches: function matches(ele) { - return ele.animated(); - } -}, { - selector: ':unanimated', - matches: function matches(ele) { - return !ele.animated(); - } -}, { - selector: ':parent', - matches: function matches(ele) { - return ele.isParent(); - } -}, { - selector: ':childless', - matches: function matches(ele) { - return ele.isChildless(); - } -}, { - selector: ':child', - matches: function matches(ele) { - return ele.isChild(); - } -}, { - selector: ':orphan', - matches: function matches(ele) { - return ele.isOrphan(); - } -}, { - selector: ':nonorphan', - matches: function matches(ele) { - return ele.isChild(); - } -}, { - selector: ':compound', - matches: function matches(ele) { - if (ele.isNode()) { - return ele.isParent(); - } else { - return ele.source().isParent() || ele.target().isParent(); - } - } -}, { - selector: ':loop', - matches: function matches(ele) { - return ele.isLoop(); - } -}, { - selector: ':simple', - matches: function matches(ele) { - return ele.isSimple(); - } -}, { - selector: ':active', - matches: function matches(ele) { - return ele.active(); - } -}, { - selector: ':inactive', - matches: function matches(ele) { - return !ele.active(); - } -}, { - selector: ':backgrounding', - matches: function matches(ele) { - return ele.backgrounding(); - } -}, { - selector: ':nonbackgrounding', - matches: function matches(ele) { - return !ele.backgrounding(); - } -}].sort(function (a, b) { - // n.b. selectors that are starting substrings of others must have the longer ones first - return descending(a.selector, b.selector); -}); -var lookup = function () { - var selToFn = {}; - var s; - for (var i = 0; i < stateSelectors.length; i++) { - s = stateSelectors[i]; - selToFn[s.selector] = s.matches; - } - return selToFn; -}(); -var stateSelectorMatches = function stateSelectorMatches(sel, ele) { - return lookup[sel](ele); -}; -var stateSelectorRegex = '(' + stateSelectors.map(function (s) { - return s.selector; -}).join('|') + ')'; - -// when a token like a variable has escaped meta characters, we need to clean the backslashes out -// so that values get compared properly in Selector.filter() -var cleanMetaChars = function cleanMetaChars(str) { - return str.replace(new RegExp('\\\\(' + tokens.metaChar + ')', 'g'), function (match, $1) { - return $1; - }); -}; -var replaceLastQuery = function replaceLastQuery(selector, examiningQuery, replacementQuery) { - selector[selector.length - 1] = replacementQuery; -}; - -// NOTE: add new expression syntax here to have it recognised by the parser; -// - a query contains all adjacent (i.e. no separator in between) expressions; -// - the current query is stored in selector[i] -// - you need to check the query objects in match() for it actually filter properly, but that's pretty straight forward -var exprs = [{ - name: 'group', - // just used for identifying when debugging - query: true, - regex: '(' + tokens.group + ')', - populate: function populate(selector, query, _ref) { - var _ref2 = _slicedToArray(_ref, 1), - group = _ref2[0]; - query.checks.push({ - type: Type.GROUP, - value: group === '*' ? group : group + 's' - }); - } -}, { - name: 'state', - query: true, - regex: stateSelectorRegex, - populate: function populate(selector, query, _ref3) { - var _ref4 = _slicedToArray(_ref3, 1), - state = _ref4[0]; - query.checks.push({ - type: Type.STATE, - value: state - }); - } -}, { - name: 'id', - query: true, - regex: '\\#(' + tokens.id + ')', - populate: function populate(selector, query, _ref5) { - var _ref6 = _slicedToArray(_ref5, 1), - id = _ref6[0]; - query.checks.push({ - type: Type.ID, - value: cleanMetaChars(id) - }); - } -}, { - name: 'className', - query: true, - regex: '\\.(' + tokens.className + ')', - populate: function populate(selector, query, _ref7) { - var _ref8 = _slicedToArray(_ref7, 1), - className = _ref8[0]; - query.checks.push({ - type: Type.CLASS, - value: cleanMetaChars(className) - }); - } -}, { - name: 'dataExists', - query: true, - regex: '\\[\\s*(' + tokens.variable + ')\\s*\\]', - populate: function populate(selector, query, _ref9) { - var _ref10 = _slicedToArray(_ref9, 1), - variable = _ref10[0]; - query.checks.push({ - type: Type.DATA_EXIST, - field: cleanMetaChars(variable) - }); - } -}, { - name: 'dataCompare', - query: true, - regex: '\\[\\s*(' + tokens.variable + ')\\s*(' + tokens.comparatorOp + ')\\s*(' + tokens.value + ')\\s*\\]', - populate: function populate(selector, query, _ref11) { - var _ref12 = _slicedToArray(_ref11, 3), - variable = _ref12[0], - comparatorOp = _ref12[1], - value = _ref12[2]; - var valueIsString = new RegExp('^' + tokens.string + '$').exec(value) != null; - if (valueIsString) { - value = value.substring(1, value.length - 1); - } else { - value = parseFloat(value); - } - query.checks.push({ - type: Type.DATA_COMPARE, - field: cleanMetaChars(variable), - operator: comparatorOp, - value: value - }); - } -}, { - name: 'dataBool', - query: true, - regex: '\\[\\s*(' + tokens.boolOp + ')\\s*(' + tokens.variable + ')\\s*\\]', - populate: function populate(selector, query, _ref13) { - var _ref14 = _slicedToArray(_ref13, 2), - boolOp = _ref14[0], - variable = _ref14[1]; - query.checks.push({ - type: Type.DATA_BOOL, - field: cleanMetaChars(variable), - operator: boolOp - }); - } -}, { - name: 'metaCompare', - query: true, - regex: '\\[\\[\\s*(' + tokens.meta + ')\\s*(' + tokens.comparatorOp + ')\\s*(' + tokens.number + ')\\s*\\]\\]', - populate: function populate(selector, query, _ref15) { - var _ref16 = _slicedToArray(_ref15, 3), - meta = _ref16[0], - comparatorOp = _ref16[1], - number = _ref16[2]; - query.checks.push({ - type: Type.META_COMPARE, - field: cleanMetaChars(meta), - operator: comparatorOp, - value: parseFloat(number) - }); - } -}, { - name: 'nextQuery', - separator: true, - regex: tokens.separator, - populate: function populate(selector, query) { - var currentSubject = selector.currentSubject; - var edgeCount = selector.edgeCount; - var compoundCount = selector.compoundCount; - var lastQ = selector[selector.length - 1]; - if (currentSubject != null) { - lastQ.subject = currentSubject; - selector.currentSubject = null; - } - lastQ.edgeCount = edgeCount; - lastQ.compoundCount = compoundCount; - selector.edgeCount = 0; - selector.compoundCount = 0; - - // go on to next query - var nextQuery = selector[selector.length++] = newQuery(); - return nextQuery; // this is the new query to be filled by the following exprs - } -}, { - name: 'directedEdge', - separator: true, - regex: tokens.directedEdge, - populate: function populate(selector, query) { - if (selector.currentSubject == null) { - // undirected edge - var edgeQuery = newQuery(); - var source = query; - var target = newQuery(); - edgeQuery.checks.push({ - type: Type.DIRECTED_EDGE, - source: source, - target: target - }); - - // the query in the selector should be the edge rather than the source - replaceLastQuery(selector, query, edgeQuery); - selector.edgeCount++; - - // we're now populating the target query with expressions that follow - return target; - } else { - // source/target - var srcTgtQ = newQuery(); - var _source = query; - var _target = newQuery(); - srcTgtQ.checks.push({ - type: Type.NODE_SOURCE, - source: _source, - target: _target - }); - - // the query in the selector should be the neighbourhood rather than the node - replaceLastQuery(selector, query, srcTgtQ); - selector.edgeCount++; - return _target; // now populating the target with the following expressions - } - } -}, { - name: 'undirectedEdge', - separator: true, - regex: tokens.undirectedEdge, - populate: function populate(selector, query) { - if (selector.currentSubject == null) { - // undirected edge - var edgeQuery = newQuery(); - var source = query; - var target = newQuery(); - edgeQuery.checks.push({ - type: Type.UNDIRECTED_EDGE, - nodes: [source, target] - }); - - // the query in the selector should be the edge rather than the source - replaceLastQuery(selector, query, edgeQuery); - selector.edgeCount++; - - // we're now populating the target query with expressions that follow - return target; - } else { - // neighbourhood - var nhoodQ = newQuery(); - var node = query; - var neighbor = newQuery(); - nhoodQ.checks.push({ - type: Type.NODE_NEIGHBOR, - node: node, - neighbor: neighbor - }); - - // the query in the selector should be the neighbourhood rather than the node - replaceLastQuery(selector, query, nhoodQ); - return neighbor; // now populating the neighbor with following expressions - } - } -}, { - name: 'child', - separator: true, - regex: tokens.child, - populate: function populate(selector, query) { - if (selector.currentSubject == null) { - // default: child query - var parentChildQuery = newQuery(); - var child = newQuery(); - var parent = selector[selector.length - 1]; - parentChildQuery.checks.push({ - type: Type.CHILD, - parent: parent, - child: child - }); - - // the query in the selector should be the '>' itself - replaceLastQuery(selector, query, parentChildQuery); - selector.compoundCount++; - - // we're now populating the child query with expressions that follow - return child; - } else if (selector.currentSubject === query) { - // compound split query - var compound = newQuery(); - var left = selector[selector.length - 1]; - var right = newQuery(); - var subject = newQuery(); - var _child = newQuery(); - var _parent = newQuery(); - - // set up the root compound q - compound.checks.push({ - type: Type.COMPOUND_SPLIT, - left: left, - right: right, - subject: subject - }); - - // populate the subject and replace the q at the old spot (within left) with TRUE - subject.checks = query.checks; // take the checks from the left - query.checks = [{ - type: Type.TRUE - }]; // checks under left refs the subject implicitly - - // set up the right q - _parent.checks.push({ - type: Type.TRUE - }); // parent implicitly refs the subject - right.checks.push({ - type: Type.PARENT, - // type is swapped on right side queries - parent: _parent, - child: _child // empty for now - }); - - replaceLastQuery(selector, left, compound); - - // update the ref since we moved things around for `query` - selector.currentSubject = subject; - selector.compoundCount++; - return _child; // now populating the right side's child - } else { - // parent query - // info for parent query - var _parent2 = newQuery(); - var _child2 = newQuery(); - var pcQChecks = [{ - type: Type.PARENT, - parent: _parent2, - child: _child2 - }]; - - // the parent-child query takes the place of the query previously being populated - _parent2.checks = query.checks; // the previous query contains the checks for the parent - query.checks = pcQChecks; // pc query takes over - - selector.compoundCount++; - return _child2; // we're now populating the child - } - } -}, { - name: 'descendant', - separator: true, - regex: tokens.descendant, - populate: function populate(selector, query) { - if (selector.currentSubject == null) { - // default: descendant query - var ancChQuery = newQuery(); - var descendant = newQuery(); - var ancestor = selector[selector.length - 1]; - ancChQuery.checks.push({ - type: Type.DESCENDANT, - ancestor: ancestor, - descendant: descendant - }); - - // the query in the selector should be the '>' itself - replaceLastQuery(selector, query, ancChQuery); - selector.compoundCount++; - - // we're now populating the descendant query with expressions that follow - return descendant; - } else if (selector.currentSubject === query) { - // compound split query - var compound = newQuery(); - var left = selector[selector.length - 1]; - var right = newQuery(); - var subject = newQuery(); - var _descendant = newQuery(); - var _ancestor = newQuery(); - - // set up the root compound q - compound.checks.push({ - type: Type.COMPOUND_SPLIT, - left: left, - right: right, - subject: subject - }); - - // populate the subject and replace the q at the old spot (within left) with TRUE - subject.checks = query.checks; // take the checks from the left - query.checks = [{ - type: Type.TRUE - }]; // checks under left refs the subject implicitly - - // set up the right q - _ancestor.checks.push({ - type: Type.TRUE - }); // ancestor implicitly refs the subject - right.checks.push({ - type: Type.ANCESTOR, - // type is swapped on right side queries - ancestor: _ancestor, - descendant: _descendant // empty for now - }); - - replaceLastQuery(selector, left, compound); - - // update the ref since we moved things around for `query` - selector.currentSubject = subject; - selector.compoundCount++; - return _descendant; // now populating the right side's descendant - } else { - // ancestor query - // info for parent query - var _ancestor2 = newQuery(); - var _descendant2 = newQuery(); - var adQChecks = [{ - type: Type.ANCESTOR, - ancestor: _ancestor2, - descendant: _descendant2 - }]; - - // the parent-child query takes the place of the query previously being populated - _ancestor2.checks = query.checks; // the previous query contains the checks for the parent - query.checks = adQChecks; // pc query takes over - - selector.compoundCount++; - return _descendant2; // we're now populating the child - } - } -}, { - name: 'subject', - modifier: true, - regex: tokens.subject, - populate: function populate(selector, query) { - if (selector.currentSubject != null && selector.currentSubject !== query) { - warn('Redefinition of subject in selector `' + selector.toString() + '`'); - return false; - } - selector.currentSubject = query; - var topQ = selector[selector.length - 1]; - var topChk = topQ.checks[0]; - var topType = topChk == null ? null : topChk.type; - if (topType === Type.DIRECTED_EDGE) { - // directed edge with subject on the target - - // change to target node check - topChk.type = Type.NODE_TARGET; - } else if (topType === Type.UNDIRECTED_EDGE) { - // undirected edge with subject on the second node - - // change to neighbor check - topChk.type = Type.NODE_NEIGHBOR; - topChk.node = topChk.nodes[1]; // second node is subject - topChk.neighbor = topChk.nodes[0]; - - // clean up unused fields for new type - topChk.nodes = null; - } - } -}]; -exprs.forEach(function (e) { - return e.regexObj = new RegExp('^' + e.regex); -}); - -/** - * Of all the expressions, find the first match in the remaining text. - * @param {string} remaining The remaining text to parse - * @returns The matched expression and the newly remaining text `{ expr, match, name, remaining }` - */ -var consumeExpr = function consumeExpr(remaining) { - var expr; - var match; - var name; - for (var j = 0; j < exprs.length; j++) { - var e = exprs[j]; - var n = e.name; - var m = remaining.match(e.regexObj); - if (m != null) { - match = m; - expr = e; - name = n; - var consumed = m[0]; - remaining = remaining.substring(consumed.length); - break; // we've consumed one expr, so we can return now - } - } - - return { - expr: expr, - match: match, - name: name, - remaining: remaining - }; -}; - -/** - * Consume all the leading whitespace - * @param {string} remaining The text to consume - * @returns The text with the leading whitespace removed - */ -var consumeWhitespace = function consumeWhitespace(remaining) { - var match = remaining.match(/^\s+/); - if (match) { - var consumed = match[0]; - remaining = remaining.substring(consumed.length); - } - return remaining; -}; - -/** - * Parse the string and store the parsed representation in the Selector. - * @param {string} selector The selector string - * @returns `true` if the selector was successfully parsed, `false` otherwise - */ -var parse = function parse(selector) { - var self = this; - var remaining = self.inputText = selector; - var currentQuery = self[0] = newQuery(); - self.length = 1; - remaining = consumeWhitespace(remaining); // get rid of leading whitespace - - for (;;) { - var exprInfo = consumeExpr(remaining); - if (exprInfo.expr == null) { - warn('The selector `' + selector + '`is invalid'); - return false; - } else { - var args = exprInfo.match.slice(1); - - // let the token populate the selector object in currentQuery - var ret = exprInfo.expr.populate(self, currentQuery, args); - if (ret === false) { - return false; // exit if population failed - } else if (ret != null) { - currentQuery = ret; // change the current query to be filled if the expr specifies - } - } - - remaining = exprInfo.remaining; - - // we're done when there's nothing left to parse - if (remaining.match(/^\s*$/)) { - break; - } - } - var lastQ = self[self.length - 1]; - if (self.currentSubject != null) { - lastQ.subject = self.currentSubject; - } - lastQ.edgeCount = self.edgeCount; - lastQ.compoundCount = self.compoundCount; - for (var i = 0; i < self.length; i++) { - var q = self[i]; - - // in future, this could potentially be allowed if there were operator precedence and detection of invalid combinations - if (q.compoundCount > 0 && q.edgeCount > 0) { - warn('The selector `' + selector + '` is invalid because it uses both a compound selector and an edge selector'); - return false; - } - if (q.edgeCount > 1) { - warn('The selector `' + selector + '` is invalid because it uses multiple edge selectors'); - return false; - } else if (q.edgeCount === 1) { - warn('The selector `' + selector + '` is deprecated. Edge selectors do not take effect on changes to source and target nodes after an edge is added, for performance reasons. Use a class or data selector on edges instead, updating the class or data of an edge when your app detects a change in source or target nodes.'); - } - } - return true; // success -}; - -/** - * Get the selector represented as a string. This value uses default formatting, - * so things like spacing may differ from the input text passed to the constructor. - * @returns {string} The selector string - */ -var cytoscape_esm_toString = function toString() { - if (this.toStringCache != null) { - return this.toStringCache; - } - var clean = function clean(obj) { - if (obj == null) { - return ''; - } else { - return obj; - } - }; - var cleanVal = function cleanVal(val) { - if (string(val)) { - return '"' + val + '"'; - } else { - return clean(val); - } - }; - var space = function space(val) { - return ' ' + val + ' '; - }; - var checkToString = function checkToString(check, subject) { - var type = check.type, - value = check.value; - switch (type) { - case Type.GROUP: - { - var group = clean(value); - return group.substring(0, group.length - 1); - } - case Type.DATA_COMPARE: - { - var field = check.field, - operator = check.operator; - return '[' + field + space(clean(operator)) + cleanVal(value) + ']'; - } - case Type.DATA_BOOL: - { - var _operator = check.operator, - _field = check.field; - return '[' + clean(_operator) + _field + ']'; - } - case Type.DATA_EXIST: - { - var _field2 = check.field; - return '[' + _field2 + ']'; - } - case Type.META_COMPARE: - { - var _operator2 = check.operator, - _field3 = check.field; - return '[[' + _field3 + space(clean(_operator2)) + cleanVal(value) + ']]'; - } - case Type.STATE: - { - return value; - } - case Type.ID: - { - return '#' + value; - } - case Type.CLASS: - { - return '.' + value; - } - case Type.PARENT: - case Type.CHILD: - { - return queryToString(check.parent, subject) + space('>') + queryToString(check.child, subject); - } - case Type.ANCESTOR: - case Type.DESCENDANT: - { - return queryToString(check.ancestor, subject) + ' ' + queryToString(check.descendant, subject); - } - case Type.COMPOUND_SPLIT: - { - var lhs = queryToString(check.left, subject); - var sub = queryToString(check.subject, subject); - var rhs = queryToString(check.right, subject); - return lhs + (lhs.length > 0 ? ' ' : '') + sub + rhs; - } - case Type.TRUE: - { - return ''; - } - } - }; - var queryToString = function queryToString(query, subject) { - return query.checks.reduce(function (str, chk, i) { - return str + (subject === query && i === 0 ? '$' : '') + checkToString(chk, subject); - }, ''); - }; - var str = ''; - for (var i = 0; i < this.length; i++) { - var query = this[i]; - str += queryToString(query, query.subject); - if (this.length > 1 && i < this.length - 1) { - str += ', '; - } - } - this.toStringCache = str; - return str; -}; -var parse$1 = { - parse: parse, - toString: cytoscape_esm_toString -}; - -var valCmp = function valCmp(fieldVal, operator, value) { - var matches; - var isFieldStr = string(fieldVal); - var isFieldNum = number$1(fieldVal); - var isValStr = string(value); - var fieldStr, valStr; - var caseInsensitive = false; - var notExpr = false; - var isIneqCmp = false; - if (operator.indexOf('!') >= 0) { - operator = operator.replace('!', ''); - notExpr = true; - } - if (operator.indexOf('@') >= 0) { - operator = operator.replace('@', ''); - caseInsensitive = true; - } - if (isFieldStr || isValStr || caseInsensitive) { - fieldStr = !isFieldStr && !isFieldNum ? '' : '' + fieldVal; - valStr = '' + value; - } - - // if we're doing a case insensitive comparison, then we're using a STRING comparison - // even if we're comparing numbers - if (caseInsensitive) { - fieldVal = fieldStr = fieldStr.toLowerCase(); - value = valStr = valStr.toLowerCase(); - } - switch (operator) { - case '*=': - matches = fieldStr.indexOf(valStr) >= 0; - break; - case '$=': - matches = fieldStr.indexOf(valStr, fieldStr.length - valStr.length) >= 0; - break; - case '^=': - matches = fieldStr.indexOf(valStr) === 0; - break; - case '=': - matches = fieldVal === value; - break; - case '>': - isIneqCmp = true; - matches = fieldVal > value; - break; - case '>=': - isIneqCmp = true; - matches = fieldVal >= value; - break; - case '<': - isIneqCmp = true; - matches = fieldVal < value; - break; - case '<=': - isIneqCmp = true; - matches = fieldVal <= value; - break; - default: - matches = false; - break; - } - - // apply the not op, but null vals for inequalities should always stay non-matching - if (notExpr && (fieldVal != null || !isIneqCmp)) { - matches = !matches; - } - return matches; -}; -var boolCmp = function boolCmp(fieldVal, operator) { - switch (operator) { - case '?': - return fieldVal ? true : false; - case '!': - return fieldVal ? false : true; - case '^': - return fieldVal === undefined; - } -}; -var existCmp = function existCmp(fieldVal) { - return fieldVal !== undefined; -}; -var data$1 = function data(ele, field) { - return ele.data(field); -}; -var meta = function meta(ele, field) { - return ele[field](); -}; - -/** A lookup of `match(check, ele)` functions by `Type` int */ -var match = []; - -/** - * Returns whether the query matches for the element - * @param query The `{ type, value, ... }` query object - * @param ele The element to compare against -*/ -var matches$1 = function matches(query, ele) { - return query.checks.every(function (chk) { - return match[chk.type](chk, ele); - }); -}; -match[Type.GROUP] = function (check, ele) { - var group = check.value; - return group === '*' || group === ele.group(); -}; -match[Type.STATE] = function (check, ele) { - var stateSelector = check.value; - return stateSelectorMatches(stateSelector, ele); -}; -match[Type.ID] = function (check, ele) { - var id = check.value; - return ele.id() === id; -}; -match[Type.CLASS] = function (check, ele) { - var cls = check.value; - return ele.hasClass(cls); -}; -match[Type.META_COMPARE] = function (check, ele) { - var field = check.field, - operator = check.operator, - value = check.value; - return valCmp(meta(ele, field), operator, value); -}; -match[Type.DATA_COMPARE] = function (check, ele) { - var field = check.field, - operator = check.operator, - value = check.value; - return valCmp(data$1(ele, field), operator, value); -}; -match[Type.DATA_BOOL] = function (check, ele) { - var field = check.field, - operator = check.operator; - return boolCmp(data$1(ele, field), operator); -}; -match[Type.DATA_EXIST] = function (check, ele) { - var field = check.field; - check.operator; - return existCmp(data$1(ele, field)); -}; -match[Type.UNDIRECTED_EDGE] = function (check, ele) { - var qA = check.nodes[0]; - var qB = check.nodes[1]; - var src = ele.source(); - var tgt = ele.target(); - return matches$1(qA, src) && matches$1(qB, tgt) || matches$1(qB, src) && matches$1(qA, tgt); -}; -match[Type.NODE_NEIGHBOR] = function (check, ele) { - return matches$1(check.node, ele) && ele.neighborhood().some(function (n) { - return n.isNode() && matches$1(check.neighbor, n); - }); -}; -match[Type.DIRECTED_EDGE] = function (check, ele) { - return matches$1(check.source, ele.source()) && matches$1(check.target, ele.target()); -}; -match[Type.NODE_SOURCE] = function (check, ele) { - return matches$1(check.source, ele) && ele.outgoers().some(function (n) { - return n.isNode() && matches$1(check.target, n); - }); -}; -match[Type.NODE_TARGET] = function (check, ele) { - return matches$1(check.target, ele) && ele.incomers().some(function (n) { - return n.isNode() && matches$1(check.source, n); - }); -}; -match[Type.CHILD] = function (check, ele) { - return matches$1(check.child, ele) && matches$1(check.parent, ele.parent()); -}; -match[Type.PARENT] = function (check, ele) { - return matches$1(check.parent, ele) && ele.children().some(function (c) { - return matches$1(check.child, c); - }); -}; -match[Type.DESCENDANT] = function (check, ele) { - return matches$1(check.descendant, ele) && ele.ancestors().some(function (a) { - return matches$1(check.ancestor, a); - }); -}; -match[Type.ANCESTOR] = function (check, ele) { - return matches$1(check.ancestor, ele) && ele.descendants().some(function (d) { - return matches$1(check.descendant, d); - }); -}; -match[Type.COMPOUND_SPLIT] = function (check, ele) { - return matches$1(check.subject, ele) && matches$1(check.left, ele) && matches$1(check.right, ele); -}; -match[Type.TRUE] = function () { - return true; -}; -match[Type.COLLECTION] = function (check, ele) { - var collection = check.value; - return collection.has(ele); -}; -match[Type.FILTER] = function (check, ele) { - var filter = check.value; - return filter(ele); -}; - -// filter an existing collection -var filter = function filter(collection) { - var self = this; - - // for 1 id #foo queries, just get the element - if (self.length === 1 && self[0].checks.length === 1 && self[0].checks[0].type === Type.ID) { - return collection.getElementById(self[0].checks[0].value).collection(); - } - var selectorFunction = function selectorFunction(element) { - for (var j = 0; j < self.length; j++) { - var query = self[j]; - if (matches$1(query, element)) { - return true; - } - } - return false; - }; - if (self.text() == null) { - selectorFunction = function selectorFunction() { - return true; - }; - } - return collection.filter(selectorFunction); -}; // filter - -// does selector match a single element? -var matches = function matches(ele) { - var self = this; - for (var j = 0; j < self.length; j++) { - var query = self[j]; - if (matches$1(query, ele)) { - return true; - } - } - return false; -}; // matches - -var matching = { - matches: matches, - filter: filter -}; - -var Selector = function Selector(selector) { - this.inputText = selector; - this.currentSubject = null; - this.compoundCount = 0; - this.edgeCount = 0; - this.length = 0; - if (selector == null || string(selector) && selector.match(/^\s*$/)) ; else if (elementOrCollection(selector)) { - this.addQuery({ - checks: [{ - type: Type.COLLECTION, - value: selector.collection() - }] - }); - } else if (fn$6(selector)) { - this.addQuery({ - checks: [{ - type: Type.FILTER, - value: selector - }] - }); - } else if (string(selector)) { - if (!this.parse(selector)) { - this.invalid = true; - } - } else { - error('A selector must be created from a string; found '); - } -}; -var selfn = Selector.prototype; -[parse$1, matching].forEach(function (p) { - return extend(selfn, p); -}); -selfn.text = function () { - return this.inputText; -}; -selfn.size = function () { - return this.length; -}; -selfn.eq = function (i) { - return this[i]; -}; -selfn.sameText = function (otherSel) { - return !this.invalid && !otherSel.invalid && this.text() === otherSel.text(); -}; -selfn.addQuery = function (q) { - this[this.length++] = q; -}; -selfn.selector = selfn.toString; - -var elesfn$g = { - allAre: function allAre(selector) { - var selObj = new Selector(selector); - return this.every(function (ele) { - return selObj.matches(ele); - }); - }, - is: function is(selector) { - var selObj = new Selector(selector); - return this.some(function (ele) { - return selObj.matches(ele); - }); - }, - some: function some(fn, thisArg) { - for (var i = 0; i < this.length; i++) { - var ret = !thisArg ? fn(this[i], i, this) : fn.apply(thisArg, [this[i], i, this]); - if (ret) { - return true; - } - } - return false; - }, - every: function every(fn, thisArg) { - for (var i = 0; i < this.length; i++) { - var ret = !thisArg ? fn(this[i], i, this) : fn.apply(thisArg, [this[i], i, this]); - if (!ret) { - return false; - } - } - return true; - }, - same: function same(collection) { - // cheap collection ref check - if (this === collection) { - return true; - } - collection = this.cy().collection(collection); - var thisLength = this.length; - var collectionLength = collection.length; - - // cheap length check - if (thisLength !== collectionLength) { - return false; - } - - // cheap element ref check - if (thisLength === 1) { - return this[0] === collection[0]; - } - return this.every(function (ele) { - return collection.hasElementWithId(ele.id()); - }); - }, - anySame: function anySame(collection) { - collection = this.cy().collection(collection); - return this.some(function (ele) { - return collection.hasElementWithId(ele.id()); - }); - }, - allAreNeighbors: function allAreNeighbors(collection) { - collection = this.cy().collection(collection); - var nhood = this.neighborhood(); - return collection.every(function (ele) { - return nhood.hasElementWithId(ele.id()); - }); - }, - contains: function contains(collection) { - collection = this.cy().collection(collection); - var self = this; - return collection.every(function (ele) { - return self.hasElementWithId(ele.id()); - }); - } -}; -elesfn$g.allAreNeighbours = elesfn$g.allAreNeighbors; -elesfn$g.has = elesfn$g.contains; -elesfn$g.equal = elesfn$g.equals = elesfn$g.same; - -var cache = function cache(fn, name) { - return function traversalCache(arg1, arg2, arg3, arg4) { - var selectorOrEles = arg1; - var eles = this; - var key; - if (selectorOrEles == null) { - key = ''; - } else if (elementOrCollection(selectorOrEles) && selectorOrEles.length === 1) { - key = selectorOrEles.id(); - } - if (eles.length === 1 && key) { - var _p = eles[0]._private; - var tch = _p.traversalCache = _p.traversalCache || {}; - var ch = tch[name] = tch[name] || []; - var hash = hashString(key); - var cacheHit = ch[hash]; - if (cacheHit) { - return cacheHit; - } else { - return ch[hash] = fn.call(eles, arg1, arg2, arg3, arg4); - } - } else { - return fn.call(eles, arg1, arg2, arg3, arg4); - } - }; -}; - -var elesfn$f = { - parent: function parent(selector) { - var parents = []; - - // optimisation for single ele call - if (this.length === 1) { - var parent = this[0]._private.parent; - if (parent) { - return parent; - } - } - for (var i = 0; i < this.length; i++) { - var ele = this[i]; - var _parent = ele._private.parent; - if (_parent) { - parents.push(_parent); - } - } - return this.spawn(parents, true).filter(selector); - }, - parents: function parents(selector) { - var parents = []; - var eles = this.parent(); - while (eles.nonempty()) { - for (var i = 0; i < eles.length; i++) { - var ele = eles[i]; - parents.push(ele); - } - eles = eles.parent(); - } - return this.spawn(parents, true).filter(selector); - }, - commonAncestors: function commonAncestors(selector) { - var ancestors; - for (var i = 0; i < this.length; i++) { - var ele = this[i]; - var parents = ele.parents(); - ancestors = ancestors || parents; - ancestors = ancestors.intersect(parents); // current list must be common with current ele parents set - } - - return ancestors.filter(selector); - }, - orphans: function orphans(selector) { - return this.stdFilter(function (ele) { - return ele.isOrphan(); - }).filter(selector); - }, - nonorphans: function nonorphans(selector) { - return this.stdFilter(function (ele) { - return ele.isChild(); - }).filter(selector); - }, - children: cache(function (selector) { - var children = []; - for (var i = 0; i < this.length; i++) { - var ele = this[i]; - var eleChildren = ele._private.children; - for (var j = 0; j < eleChildren.length; j++) { - children.push(eleChildren[j]); - } - } - return this.spawn(children, true).filter(selector); - }, 'children'), - siblings: function siblings(selector) { - return this.parent().children().not(this).filter(selector); - }, - isParent: function isParent() { - var ele = this[0]; - if (ele) { - return ele.isNode() && ele._private.children.length !== 0; - } - }, - isChildless: function isChildless() { - var ele = this[0]; - if (ele) { - return ele.isNode() && ele._private.children.length === 0; - } - }, - isChild: function isChild() { - var ele = this[0]; - if (ele) { - return ele.isNode() && ele._private.parent != null; - } - }, - isOrphan: function isOrphan() { - var ele = this[0]; - if (ele) { - return ele.isNode() && ele._private.parent == null; - } - }, - descendants: function descendants(selector) { - var elements = []; - function add(eles) { - for (var i = 0; i < eles.length; i++) { - var ele = eles[i]; - elements.push(ele); - if (ele.children().nonempty()) { - add(ele.children()); - } - } - } - add(this.children()); - return this.spawn(elements, true).filter(selector); - } -}; -function forEachCompound(eles, fn, includeSelf, recursiveStep) { - var q = []; - var did = new Set$1(); - var cy = eles.cy(); - var hasCompounds = cy.hasCompoundNodes(); - for (var i = 0; i < eles.length; i++) { - var ele = eles[i]; - if (includeSelf) { - q.push(ele); - } else if (hasCompounds) { - recursiveStep(q, did, ele); - } - } - while (q.length > 0) { - var _ele = q.shift(); - fn(_ele); - did.add(_ele.id()); - if (hasCompounds) { - recursiveStep(q, did, _ele); - } - } - return eles; -} -function addChildren(q, did, ele) { - if (ele.isParent()) { - var children = ele._private.children; - for (var i = 0; i < children.length; i++) { - var child = children[i]; - if (!did.has(child.id())) { - q.push(child); - } - } - } -} - -// very efficient version of eles.add( eles.descendants() ).forEach() -// for internal use -elesfn$f.forEachDown = function (fn) { - var includeSelf = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; - return forEachCompound(this, fn, includeSelf, addChildren); -}; -function addParent(q, did, ele) { - if (ele.isChild()) { - var parent = ele._private.parent; - if (!did.has(parent.id())) { - q.push(parent); - } - } -} -elesfn$f.forEachUp = function (fn) { - var includeSelf = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; - return forEachCompound(this, fn, includeSelf, addParent); -}; -function addParentAndChildren(q, did, ele) { - addParent(q, did, ele); - addChildren(q, did, ele); -} -elesfn$f.forEachUpAndDown = function (fn) { - var includeSelf = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; - return forEachCompound(this, fn, includeSelf, addParentAndChildren); -}; - -// aliases -elesfn$f.ancestors = elesfn$f.parents; - -var fn$5, elesfn$e; -fn$5 = elesfn$e = { - data: cytoscape_esm_define.data({ - field: 'data', - bindingEvent: 'data', - allowBinding: true, - allowSetting: true, - settingEvent: 'data', - settingTriggersEvent: true, - triggerFnName: 'trigger', - allowGetting: true, - immutableKeys: { - 'id': true, - 'source': true, - 'target': true, - 'parent': true - }, - updateStyle: true - }), - removeData: cytoscape_esm_define.removeData({ - field: 'data', - event: 'data', - triggerFnName: 'trigger', - triggerEvent: true, - immutableKeys: { - 'id': true, - 'source': true, - 'target': true, - 'parent': true - }, - updateStyle: true - }), - scratch: cytoscape_esm_define.data({ - field: 'scratch', - bindingEvent: 'scratch', - allowBinding: true, - allowSetting: true, - settingEvent: 'scratch', - settingTriggersEvent: true, - triggerFnName: 'trigger', - allowGetting: true, - updateStyle: true - }), - removeScratch: cytoscape_esm_define.removeData({ - field: 'scratch', - event: 'scratch', - triggerFnName: 'trigger', - triggerEvent: true, - updateStyle: true - }), - rscratch: cytoscape_esm_define.data({ - field: 'rscratch', - allowBinding: false, - allowSetting: true, - settingTriggersEvent: false, - allowGetting: true - }), - removeRscratch: cytoscape_esm_define.removeData({ - field: 'rscratch', - triggerEvent: false - }), - id: function id() { - var ele = this[0]; - if (ele) { - return ele._private.data.id; - } - } -}; - -// aliases -fn$5.attr = fn$5.data; -fn$5.removeAttr = fn$5.removeData; -var data = elesfn$e; - -var elesfn$d = {}; -function defineDegreeFunction(callback) { - return function (includeLoops) { - var self = this; - if (includeLoops === undefined) { - includeLoops = true; - } - if (self.length === 0) { - return; - } - if (self.isNode() && !self.removed()) { - var degree = 0; - var node = self[0]; - var connectedEdges = node._private.edges; - for (var i = 0; i < connectedEdges.length; i++) { - var edge = connectedEdges[i]; - if (!includeLoops && edge.isLoop()) { - continue; - } - degree += callback(node, edge); - } - return degree; - } else { - return; - } - }; -} -extend(elesfn$d, { - degree: defineDegreeFunction(function (node, edge) { - if (edge.source().same(edge.target())) { - return 2; - } else { - return 1; - } - }), - indegree: defineDegreeFunction(function (node, edge) { - if (edge.target().same(node)) { - return 1; - } else { - return 0; - } - }), - outdegree: defineDegreeFunction(function (node, edge) { - if (edge.source().same(node)) { - return 1; - } else { - return 0; - } - }) -}); -function defineDegreeBoundsFunction(degreeFn, callback) { - return function (includeLoops) { - var ret; - var nodes = this.nodes(); - for (var i = 0; i < nodes.length; i++) { - var ele = nodes[i]; - var degree = ele[degreeFn](includeLoops); - if (degree !== undefined && (ret === undefined || callback(degree, ret))) { - ret = degree; - } - } - return ret; - }; -} -extend(elesfn$d, { - minDegree: defineDegreeBoundsFunction('degree', function (degree, min) { - return degree < min; - }), - maxDegree: defineDegreeBoundsFunction('degree', function (degree, max) { - return degree > max; - }), - minIndegree: defineDegreeBoundsFunction('indegree', function (degree, min) { - return degree < min; - }), - maxIndegree: defineDegreeBoundsFunction('indegree', function (degree, max) { - return degree > max; - }), - minOutdegree: defineDegreeBoundsFunction('outdegree', function (degree, min) { - return degree < min; - }), - maxOutdegree: defineDegreeBoundsFunction('outdegree', function (degree, max) { - return degree > max; - }) -}); -extend(elesfn$d, { - totalDegree: function totalDegree(includeLoops) { - var total = 0; - var nodes = this.nodes(); - for (var i = 0; i < nodes.length; i++) { - total += nodes[i].degree(includeLoops); - } - return total; - } -}); - -var fn$4, elesfn$c; -var beforePositionSet = function beforePositionSet(eles, newPos, silent) { - for (var i = 0; i < eles.length; i++) { - var ele = eles[i]; - if (!ele.locked()) { - var oldPos = ele._private.position; - var delta = { - x: newPos.x != null ? newPos.x - oldPos.x : 0, - y: newPos.y != null ? newPos.y - oldPos.y : 0 - }; - if (ele.isParent() && !(delta.x === 0 && delta.y === 0)) { - ele.children().shift(delta, silent); - } - ele.dirtyBoundingBoxCache(); - } - } -}; -var positionDef = { - field: 'position', - bindingEvent: 'position', - allowBinding: true, - allowSetting: true, - settingEvent: 'position', - settingTriggersEvent: true, - triggerFnName: 'emitAndNotify', - allowGetting: true, - validKeys: ['x', 'y'], - beforeGet: function beforeGet(ele) { - ele.updateCompoundBounds(); - }, - beforeSet: function beforeSet(eles, newPos) { - beforePositionSet(eles, newPos, false); - }, - onSet: function onSet(eles) { - eles.dirtyCompoundBoundsCache(); - }, - canSet: function canSet(ele) { - return !ele.locked(); - } -}; -fn$4 = elesfn$c = { - position: cytoscape_esm_define.data(positionDef), - // position but no notification to renderer - silentPosition: cytoscape_esm_define.data(extend({}, positionDef, { - allowBinding: false, - allowSetting: true, - settingTriggersEvent: false, - allowGetting: false, - beforeSet: function beforeSet(eles, newPos) { - beforePositionSet(eles, newPos, true); - }, - onSet: function onSet(eles) { - eles.dirtyCompoundBoundsCache(); - } - })), - positions: function positions(pos, silent) { - if (plainObject(pos)) { - if (silent) { - this.silentPosition(pos); - } else { - this.position(pos); - } - } else if (fn$6(pos)) { - var _fn = pos; - var cy = this.cy(); - cy.startBatch(); - for (var i = 0; i < this.length; i++) { - var ele = this[i]; - var _pos = void 0; - if (_pos = _fn(ele, i)) { - if (silent) { - ele.silentPosition(_pos); - } else { - ele.position(_pos); - } - } - } - cy.endBatch(); - } - return this; // chaining - }, - - silentPositions: function silentPositions(pos) { - return this.positions(pos, true); - }, - shift: function shift(dim, val, silent) { - var delta; - if (plainObject(dim)) { - delta = { - x: number$1(dim.x) ? dim.x : 0, - y: number$1(dim.y) ? dim.y : 0 - }; - silent = val; - } else if (string(dim) && number$1(val)) { - delta = { - x: 0, - y: 0 - }; - delta[dim] = val; - } - if (delta != null) { - var cy = this.cy(); - cy.startBatch(); - for (var i = 0; i < this.length; i++) { - var ele = this[i]; - - // exclude any node that is a descendant of the calling collection - if (cy.hasCompoundNodes() && ele.isChild() && ele.ancestors().anySame(this)) { - continue; - } - var pos = ele.position(); - var newPos = { - x: pos.x + delta.x, - y: pos.y + delta.y - }; - if (silent) { - ele.silentPosition(newPos); - } else { - ele.position(newPos); - } - } - cy.endBatch(); - } - return this; - }, - silentShift: function silentShift(dim, val) { - if (plainObject(dim)) { - this.shift(dim, true); - } else if (string(dim) && number$1(val)) { - this.shift(dim, val, true); - } - return this; - }, - // get/set the rendered (i.e. on screen) positon of the element - renderedPosition: function renderedPosition(dim, val) { - var ele = this[0]; - var cy = this.cy(); - var zoom = cy.zoom(); - var pan = cy.pan(); - var rpos = plainObject(dim) ? dim : undefined; - var setting = rpos !== undefined || val !== undefined && string(dim); - if (ele && ele.isNode()) { - // must have an element and must be a node to return position - if (setting) { - for (var i = 0; i < this.length; i++) { - var _ele = this[i]; - if (val !== undefined) { - // set one dimension - _ele.position(dim, (val - pan[dim]) / zoom); - } else if (rpos !== undefined) { - // set whole position - _ele.position(renderedToModelPosition(rpos, zoom, pan)); - } - } - } else { - // getting - var pos = ele.position(); - rpos = modelToRenderedPosition(pos, zoom, pan); - if (dim === undefined) { - // then return the whole rendered position - return rpos; - } else { - // then return the specified dimension - return rpos[dim]; - } - } - } else if (!setting) { - return undefined; // for empty collection case - } - - return this; // chaining - }, - - // get/set the position relative to the parent - relativePosition: function relativePosition(dim, val) { - var ele = this[0]; - var cy = this.cy(); - var ppos = plainObject(dim) ? dim : undefined; - var setting = ppos !== undefined || val !== undefined && string(dim); - var hasCompoundNodes = cy.hasCompoundNodes(); - if (ele && ele.isNode()) { - // must have an element and must be a node to return position - if (setting) { - for (var i = 0; i < this.length; i++) { - var _ele2 = this[i]; - var parent = hasCompoundNodes ? _ele2.parent() : null; - var hasParent = parent && parent.length > 0; - var relativeToParent = hasParent; - if (hasParent) { - parent = parent[0]; - } - var origin = relativeToParent ? parent.position() : { - x: 0, - y: 0 - }; - if (val !== undefined) { - // set one dimension - _ele2.position(dim, val + origin[dim]); - } else if (ppos !== undefined) { - // set whole position - _ele2.position({ - x: ppos.x + origin.x, - y: ppos.y + origin.y - }); - } - } - } else { - // getting - var pos = ele.position(); - var _parent = hasCompoundNodes ? ele.parent() : null; - var _hasParent = _parent && _parent.length > 0; - var _relativeToParent = _hasParent; - if (_hasParent) { - _parent = _parent[0]; - } - var _origin = _relativeToParent ? _parent.position() : { - x: 0, - y: 0 - }; - ppos = { - x: pos.x - _origin.x, - y: pos.y - _origin.y - }; - if (dim === undefined) { - // then return the whole rendered position - return ppos; - } else { - // then return the specified dimension - return ppos[dim]; - } - } - } else if (!setting) { - return undefined; // for empty collection case - } - - return this; // chaining - } -}; - -// aliases -fn$4.modelPosition = fn$4.point = fn$4.position; -fn$4.modelPositions = fn$4.points = fn$4.positions; -fn$4.renderedPoint = fn$4.renderedPosition; -fn$4.relativePoint = fn$4.relativePosition; -var position = elesfn$c; - -var fn$3, elesfn$b; -fn$3 = elesfn$b = {}; -elesfn$b.renderedBoundingBox = function (options) { - var bb = this.boundingBox(options); - var cy = this.cy(); - var zoom = cy.zoom(); - var pan = cy.pan(); - var x1 = bb.x1 * zoom + pan.x; - var x2 = bb.x2 * zoom + pan.x; - var y1 = bb.y1 * zoom + pan.y; - var y2 = bb.y2 * zoom + pan.y; - return { - x1: x1, - x2: x2, - y1: y1, - y2: y2, - w: x2 - x1, - h: y2 - y1 - }; -}; -elesfn$b.dirtyCompoundBoundsCache = function () { - var silent = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; - var cy = this.cy(); - if (!cy.styleEnabled() || !cy.hasCompoundNodes()) { - return this; - } - this.forEachUp(function (ele) { - if (ele.isParent()) { - var _p = ele._private; - _p.compoundBoundsClean = false; - _p.bbCache = null; - if (!silent) { - ele.emitAndNotify('bounds'); - } - } - }); - return this; -}; -elesfn$b.updateCompoundBounds = function () { - var force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; - var cy = this.cy(); - - // not possible to do on non-compound graphs or with the style disabled - if (!cy.styleEnabled() || !cy.hasCompoundNodes()) { - return this; - } - - // save cycles when batching -- but bounds will be stale (or not exist yet) - if (!force && cy.batching()) { - return this; - } - function update(parent) { - if (!parent.isParent()) { - return; - } - var _p = parent._private; - var children = parent.children(); - var includeLabels = parent.pstyle('compound-sizing-wrt-labels').value === 'include'; - var min = { - width: { - val: parent.pstyle('min-width').pfValue, - left: parent.pstyle('min-width-bias-left'), - right: parent.pstyle('min-width-bias-right') - }, - height: { - val: parent.pstyle('min-height').pfValue, - top: parent.pstyle('min-height-bias-top'), - bottom: parent.pstyle('min-height-bias-bottom') - } - }; - var bb = children.boundingBox({ - includeLabels: includeLabels, - includeOverlays: false, - // updating the compound bounds happens outside of the regular - // cache cycle (i.e. before fired events) - useCache: false - }); - var pos = _p.position; - - // if children take up zero area then keep position and fall back on stylesheet w/h - if (bb.w === 0 || bb.h === 0) { - bb = { - w: parent.pstyle('width').pfValue, - h: parent.pstyle('height').pfValue - }; - bb.x1 = pos.x - bb.w / 2; - bb.x2 = pos.x + bb.w / 2; - bb.y1 = pos.y - bb.h / 2; - bb.y2 = pos.y + bb.h / 2; - } - function computeBiasValues(propDiff, propBias, propBiasComplement) { - var biasDiff = 0; - var biasComplementDiff = 0; - var biasTotal = propBias + propBiasComplement; - if (propDiff > 0 && biasTotal > 0) { - biasDiff = propBias / biasTotal * propDiff; - biasComplementDiff = propBiasComplement / biasTotal * propDiff; - } - return { - biasDiff: biasDiff, - biasComplementDiff: biasComplementDiff - }; - } - function computePaddingValues(width, height, paddingObject, relativeTo) { - // Assuming percentage is number from 0 to 1 - if (paddingObject.units === '%') { - switch (relativeTo) { - case 'width': - return width > 0 ? paddingObject.pfValue * width : 0; - case 'height': - return height > 0 ? paddingObject.pfValue * height : 0; - case 'average': - return width > 0 && height > 0 ? paddingObject.pfValue * (width + height) / 2 : 0; - case 'min': - return width > 0 && height > 0 ? width > height ? paddingObject.pfValue * height : paddingObject.pfValue * width : 0; - case 'max': - return width > 0 && height > 0 ? width > height ? paddingObject.pfValue * width : paddingObject.pfValue * height : 0; - default: - return 0; - } - } else if (paddingObject.units === 'px') { - return paddingObject.pfValue; - } else { - return 0; - } - } - var leftVal = min.width.left.value; - if (min.width.left.units === 'px' && min.width.val > 0) { - leftVal = leftVal * 100 / min.width.val; - } - var rightVal = min.width.right.value; - if (min.width.right.units === 'px' && min.width.val > 0) { - rightVal = rightVal * 100 / min.width.val; - } - var topVal = min.height.top.value; - if (min.height.top.units === 'px' && min.height.val > 0) { - topVal = topVal * 100 / min.height.val; - } - var bottomVal = min.height.bottom.value; - if (min.height.bottom.units === 'px' && min.height.val > 0) { - bottomVal = bottomVal * 100 / min.height.val; - } - var widthBiasDiffs = computeBiasValues(min.width.val - bb.w, leftVal, rightVal); - var diffLeft = widthBiasDiffs.biasDiff; - var diffRight = widthBiasDiffs.biasComplementDiff; - var heightBiasDiffs = computeBiasValues(min.height.val - bb.h, topVal, bottomVal); - var diffTop = heightBiasDiffs.biasDiff; - var diffBottom = heightBiasDiffs.biasComplementDiff; - _p.autoPadding = computePaddingValues(bb.w, bb.h, parent.pstyle('padding'), parent.pstyle('padding-relative-to').value); - _p.autoWidth = Math.max(bb.w, min.width.val); - pos.x = (-diffLeft + bb.x1 + bb.x2 + diffRight) / 2; - _p.autoHeight = Math.max(bb.h, min.height.val); - pos.y = (-diffTop + bb.y1 + bb.y2 + diffBottom) / 2; - } - for (var i = 0; i < this.length; i++) { - var ele = this[i]; - var _p = ele._private; - if (!_p.compoundBoundsClean || force) { - update(ele); - if (!cy.batching()) { - _p.compoundBoundsClean = true; - } - } - } - return this; -}; -var noninf = function noninf(x) { - if (x === Infinity || x === -Infinity) { - return 0; - } - return x; -}; -var updateBounds = function updateBounds(b, x1, y1, x2, y2) { - // don't update with zero area boxes - if (x2 - x1 === 0 || y2 - y1 === 0) { - return; - } - - // don't update with null dim - if (x1 == null || y1 == null || x2 == null || y2 == null) { - return; - } - b.x1 = x1 < b.x1 ? x1 : b.x1; - b.x2 = x2 > b.x2 ? x2 : b.x2; - b.y1 = y1 < b.y1 ? y1 : b.y1; - b.y2 = y2 > b.y2 ? y2 : b.y2; - b.w = b.x2 - b.x1; - b.h = b.y2 - b.y1; -}; -var updateBoundsFromBox = function updateBoundsFromBox(b, b2) { - if (b2 == null) { - return b; - } - return updateBounds(b, b2.x1, b2.y1, b2.x2, b2.y2); -}; -var prefixedProperty = function prefixedProperty(obj, field, prefix) { - return getPrefixedProperty(obj, field, prefix); -}; -var updateBoundsFromArrow = function updateBoundsFromArrow(bounds, ele, prefix) { - if (ele.cy().headless()) { - return; - } - var _p = ele._private; - var rstyle = _p.rstyle; - var halfArW = rstyle.arrowWidth / 2; - var arrowType = ele.pstyle(prefix + '-arrow-shape').value; - var x; - var y; - if (arrowType !== 'none') { - if (prefix === 'source') { - x = rstyle.srcX; - y = rstyle.srcY; - } else if (prefix === 'target') { - x = rstyle.tgtX; - y = rstyle.tgtY; - } else { - x = rstyle.midX; - y = rstyle.midY; - } - - // always store the individual arrow bounds - var bbs = _p.arrowBounds = _p.arrowBounds || {}; - var bb = bbs[prefix] = bbs[prefix] || {}; - bb.x1 = x - halfArW; - bb.y1 = y - halfArW; - bb.x2 = x + halfArW; - bb.y2 = y + halfArW; - bb.w = bb.x2 - bb.x1; - bb.h = bb.y2 - bb.y1; - expandBoundingBox(bb, 1); - updateBounds(bounds, bb.x1, bb.y1, bb.x2, bb.y2); - } -}; -var updateBoundsFromLabel = function updateBoundsFromLabel(bounds, ele, prefix) { - if (ele.cy().headless()) { - return; - } - var prefixDash; - if (prefix) { - prefixDash = prefix + '-'; - } else { - prefixDash = ''; - } - var _p = ele._private; - var rstyle = _p.rstyle; - var label = ele.pstyle(prefixDash + 'label').strValue; - if (label) { - var halign = ele.pstyle('text-halign'); - var valign = ele.pstyle('text-valign'); - var labelWidth = prefixedProperty(rstyle, 'labelWidth', prefix); - var labelHeight = prefixedProperty(rstyle, 'labelHeight', prefix); - var labelX = prefixedProperty(rstyle, 'labelX', prefix); - var labelY = prefixedProperty(rstyle, 'labelY', prefix); - var marginX = ele.pstyle(prefixDash + 'text-margin-x').pfValue; - var marginY = ele.pstyle(prefixDash + 'text-margin-y').pfValue; - var isEdge = ele.isEdge(); - var rotation = ele.pstyle(prefixDash + 'text-rotation'); - var outlineWidth = ele.pstyle('text-outline-width').pfValue; - var borderWidth = ele.pstyle('text-border-width').pfValue; - var halfBorderWidth = borderWidth / 2; - var padding = ele.pstyle('text-background-padding').pfValue; - var marginOfError = 2; // expand to work around browser dimension inaccuracies - - var lh = labelHeight; - var lw = labelWidth; - var lw_2 = lw / 2; - var lh_2 = lh / 2; - var lx1, lx2, ly1, ly2; - if (isEdge) { - lx1 = labelX - lw_2; - lx2 = labelX + lw_2; - ly1 = labelY - lh_2; - ly2 = labelY + lh_2; - } else { - switch (halign.value) { - case 'left': - lx1 = labelX - lw; - lx2 = labelX; - break; - case 'center': - lx1 = labelX - lw_2; - lx2 = labelX + lw_2; - break; - case 'right': - lx1 = labelX; - lx2 = labelX + lw; - break; - } - switch (valign.value) { - case 'top': - ly1 = labelY - lh; - ly2 = labelY; - break; - case 'center': - ly1 = labelY - lh_2; - ly2 = labelY + lh_2; - break; - case 'bottom': - ly1 = labelY; - ly2 = labelY + lh; - break; - } - } - - // shift by margin and expand by outline and border - lx1 += marginX - Math.max(outlineWidth, halfBorderWidth) - padding - marginOfError; - lx2 += marginX + Math.max(outlineWidth, halfBorderWidth) + padding + marginOfError; - ly1 += marginY - Math.max(outlineWidth, halfBorderWidth) - padding - marginOfError; - ly2 += marginY + Math.max(outlineWidth, halfBorderWidth) + padding + marginOfError; - - // always store the unrotated label bounds separately - var bbPrefix = prefix || 'main'; - var bbs = _p.labelBounds; - var bb = bbs[bbPrefix] = bbs[bbPrefix] || {}; - bb.x1 = lx1; - bb.y1 = ly1; - bb.x2 = lx2; - bb.y2 = ly2; - bb.w = lx2 - lx1; - bb.h = ly2 - ly1; - var isAutorotate = isEdge && rotation.strValue === 'autorotate'; - var isPfValue = rotation.pfValue != null && rotation.pfValue !== 0; - if (isAutorotate || isPfValue) { - var theta = isAutorotate ? prefixedProperty(_p.rstyle, 'labelAngle', prefix) : rotation.pfValue; - var cos = Math.cos(theta); - var sin = Math.sin(theta); - - // rotation point (default value for center-center) - var xo = (lx1 + lx2) / 2; - var yo = (ly1 + ly2) / 2; - if (!isEdge) { - switch (halign.value) { - case 'left': - xo = lx2; - break; - case 'right': - xo = lx1; - break; - } - switch (valign.value) { - case 'top': - yo = ly2; - break; - case 'bottom': - yo = ly1; - break; - } - } - var rotate = function rotate(x, y) { - x = x - xo; - y = y - yo; - return { - x: x * cos - y * sin + xo, - y: x * sin + y * cos + yo - }; - }; - var px1y1 = rotate(lx1, ly1); - var px1y2 = rotate(lx1, ly2); - var px2y1 = rotate(lx2, ly1); - var px2y2 = rotate(lx2, ly2); - lx1 = Math.min(px1y1.x, px1y2.x, px2y1.x, px2y2.x); - lx2 = Math.max(px1y1.x, px1y2.x, px2y1.x, px2y2.x); - ly1 = Math.min(px1y1.y, px1y2.y, px2y1.y, px2y2.y); - ly2 = Math.max(px1y1.y, px1y2.y, px2y1.y, px2y2.y); - } - var bbPrefixRot = bbPrefix + 'Rot'; - var bbRot = bbs[bbPrefixRot] = bbs[bbPrefixRot] || {}; - bbRot.x1 = lx1; - bbRot.y1 = ly1; - bbRot.x2 = lx2; - bbRot.y2 = ly2; - bbRot.w = lx2 - lx1; - bbRot.h = ly2 - ly1; - updateBounds(bounds, lx1, ly1, lx2, ly2); - updateBounds(_p.labelBounds.all, lx1, ly1, lx2, ly2); - } - return bounds; -}; -var updateBoundsFromOutline = function updateBoundsFromOutline(bounds, ele) { - if (ele.cy().headless()) { - return; - } - var outlineOpacity = ele.pstyle('outline-opacity').value; - var outlineWidth = ele.pstyle('outline-width').value; - if (outlineOpacity > 0 && outlineWidth > 0) { - var outlineOffset = ele.pstyle('outline-offset').value; - var nodeShape = ele.pstyle('shape').value; - var outlineSize = outlineWidth + outlineOffset; - var scaleX = (bounds.w + outlineSize * 2) / bounds.w; - var scaleY = (bounds.h + outlineSize * 2) / bounds.h; - var xOffset = 0; - var yOffset = 0; - if (["diamond", "pentagon", "round-triangle"].includes(nodeShape)) { - scaleX = (bounds.w + outlineSize * 2.4) / bounds.w; - yOffset = -outlineSize / 3.6; - } else if (["concave-hexagon", "rhomboid", "right-rhomboid"].includes(nodeShape)) { - scaleX = (bounds.w + outlineSize * 2.4) / bounds.w; - } else if (nodeShape === "star") { - scaleX = (bounds.w + outlineSize * 2.8) / bounds.w; - scaleY = (bounds.h + outlineSize * 2.6) / bounds.h; - yOffset = -outlineSize / 3.8; - } else if (nodeShape === "triangle") { - scaleX = (bounds.w + outlineSize * 2.8) / bounds.w; - scaleY = (bounds.h + outlineSize * 2.4) / bounds.h; - yOffset = -outlineSize / 1.4; - } else if (nodeShape === "vee") { - scaleX = (bounds.w + outlineSize * 4.4) / bounds.w; - scaleY = (bounds.h + outlineSize * 3.8) / bounds.h; - yOffset = -outlineSize * .5; - } - var hDelta = bounds.h * scaleY - bounds.h; - var wDelta = bounds.w * scaleX - bounds.w; - expandBoundingBoxSides(bounds, [Math.ceil(hDelta / 2), Math.ceil(wDelta / 2)]); - if (xOffset != 0 || yOffset !== 0) { - var oBounds = shiftBoundingBox(bounds, xOffset, yOffset); - updateBoundingBox(bounds, oBounds); - } - } -}; - -// get the bounding box of the elements (in raw model position) -var boundingBoxImpl = function boundingBoxImpl(ele, options) { - var cy = ele._private.cy; - var styleEnabled = cy.styleEnabled(); - var headless = cy.headless(); - var bounds = makeBoundingBox(); - var _p = ele._private; - var isNode = ele.isNode(); - var isEdge = ele.isEdge(); - var ex1, ex2, ey1, ey2; // extrema of body / lines - var x, y; // node pos - var rstyle = _p.rstyle; - var manualExpansion = isNode && styleEnabled ? ele.pstyle('bounds-expansion').pfValue : [0]; - - // must use `display` prop only, as reading `compound.width()` causes recursion - // (other factors like width values will be considered later in this function anyway) - var isDisplayed = function isDisplayed(ele) { - return ele.pstyle('display').value !== 'none'; - }; - var displayed = !styleEnabled || isDisplayed(ele) - - // must take into account connected nodes b/c of implicit edge hiding on display:none node - && (!isEdge || isDisplayed(ele.source()) && isDisplayed(ele.target())); - if (displayed) { - // displayed suffices, since we will find zero area eles anyway - var overlayOpacity = 0; - var overlayPadding = 0; - if (styleEnabled && options.includeOverlays) { - overlayOpacity = ele.pstyle('overlay-opacity').value; - if (overlayOpacity !== 0) { - overlayPadding = ele.pstyle('overlay-padding').value; - } - } - var underlayOpacity = 0; - var underlayPadding = 0; - if (styleEnabled && options.includeUnderlays) { - underlayOpacity = ele.pstyle('underlay-opacity').value; - if (underlayOpacity !== 0) { - underlayPadding = ele.pstyle('underlay-padding').value; - } - } - var padding = Math.max(overlayPadding, underlayPadding); - var w = 0; - var wHalf = 0; - if (styleEnabled) { - w = ele.pstyle('width').pfValue; - wHalf = w / 2; - } - if (isNode && options.includeNodes) { - var pos = ele.position(); - x = pos.x; - y = pos.y; - var _w = ele.outerWidth(); - var halfW = _w / 2; - var h = ele.outerHeight(); - var halfH = h / 2; - - // handle node dimensions - ///////////////////////// - - ex1 = x - halfW; - ex2 = x + halfW; - ey1 = y - halfH; - ey2 = y + halfH; - updateBounds(bounds, ex1, ey1, ex2, ey2); - if (styleEnabled && options.includeOutlines) { - updateBoundsFromOutline(bounds, ele); - } - } else if (isEdge && options.includeEdges) { - if (styleEnabled && !headless) { - var curveStyle = ele.pstyle('curve-style').strValue; - - // handle edge dimensions (rough box estimate) - ////////////////////////////////////////////// - - ex1 = Math.min(rstyle.srcX, rstyle.midX, rstyle.tgtX); - ex2 = Math.max(rstyle.srcX, rstyle.midX, rstyle.tgtX); - ey1 = Math.min(rstyle.srcY, rstyle.midY, rstyle.tgtY); - ey2 = Math.max(rstyle.srcY, rstyle.midY, rstyle.tgtY); - - // take into account edge width - ex1 -= wHalf; - ex2 += wHalf; - ey1 -= wHalf; - ey2 += wHalf; - updateBounds(bounds, ex1, ey1, ex2, ey2); - - // precise edges - //////////////// - - if (curveStyle === 'haystack') { - var hpts = rstyle.haystackPts; - if (hpts && hpts.length === 2) { - ex1 = hpts[0].x; - ey1 = hpts[0].y; - ex2 = hpts[1].x; - ey2 = hpts[1].y; - if (ex1 > ex2) { - var temp = ex1; - ex1 = ex2; - ex2 = temp; - } - if (ey1 > ey2) { - var _temp = ey1; - ey1 = ey2; - ey2 = _temp; - } - updateBounds(bounds, ex1 - wHalf, ey1 - wHalf, ex2 + wHalf, ey2 + wHalf); - } - } else if (curveStyle === 'bezier' || curveStyle === 'unbundled-bezier' || curveStyle.endsWith('segments') || curveStyle.endsWith('taxi')) { - var pts; - switch (curveStyle) { - case 'bezier': - case 'unbundled-bezier': - pts = rstyle.bezierPts; - break; - case 'segments': - case 'taxi': - case 'round-segments': - case 'round-taxi': - pts = rstyle.linePts; - break; - } - if (pts != null) { - for (var j = 0; j < pts.length; j++) { - var pt = pts[j]; - ex1 = pt.x - wHalf; - ex2 = pt.x + wHalf; - ey1 = pt.y - wHalf; - ey2 = pt.y + wHalf; - updateBounds(bounds, ex1, ey1, ex2, ey2); - } - } - } // bezier-like or segment-like edge - } else { - // headless or style disabled - - // fallback on source and target positions - ////////////////////////////////////////// - - var n1 = ele.source(); - var n1pos = n1.position(); - var n2 = ele.target(); - var n2pos = n2.position(); - ex1 = n1pos.x; - ex2 = n2pos.x; - ey1 = n1pos.y; - ey2 = n2pos.y; - if (ex1 > ex2) { - var _temp2 = ex1; - ex1 = ex2; - ex2 = _temp2; - } - if (ey1 > ey2) { - var _temp3 = ey1; - ey1 = ey2; - ey2 = _temp3; - } - - // take into account edge width - ex1 -= wHalf; - ex2 += wHalf; - ey1 -= wHalf; - ey2 += wHalf; - updateBounds(bounds, ex1, ey1, ex2, ey2); - } // headless or style disabled - } // edges - - // handle edge arrow size - ///////////////////////// - - if (styleEnabled && options.includeEdges && isEdge) { - updateBoundsFromArrow(bounds, ele, 'mid-source'); - updateBoundsFromArrow(bounds, ele, 'mid-target'); - updateBoundsFromArrow(bounds, ele, 'source'); - updateBoundsFromArrow(bounds, ele, 'target'); - } - - // ghost - //////// - - if (styleEnabled) { - var ghost = ele.pstyle('ghost').value === 'yes'; - if (ghost) { - var gx = ele.pstyle('ghost-offset-x').pfValue; - var gy = ele.pstyle('ghost-offset-y').pfValue; - updateBounds(bounds, bounds.x1 + gx, bounds.y1 + gy, bounds.x2 + gx, bounds.y2 + gy); - } - } - - // always store the body bounds separately from the labels - var bbBody = _p.bodyBounds = _p.bodyBounds || {}; - assignBoundingBox(bbBody, bounds); - expandBoundingBoxSides(bbBody, manualExpansion); - expandBoundingBox(bbBody, 1); // expand to work around browser dimension inaccuracies - - // overlay - ////////// - - if (styleEnabled) { - ex1 = bounds.x1; - ex2 = bounds.x2; - ey1 = bounds.y1; - ey2 = bounds.y2; - updateBounds(bounds, ex1 - padding, ey1 - padding, ex2 + padding, ey2 + padding); - } - - // always store the body bounds separately from the labels - var bbOverlay = _p.overlayBounds = _p.overlayBounds || {}; - assignBoundingBox(bbOverlay, bounds); - expandBoundingBoxSides(bbOverlay, manualExpansion); - expandBoundingBox(bbOverlay, 1); // expand to work around browser dimension inaccuracies - - // handle label dimensions - ////////////////////////// - - var bbLabels = _p.labelBounds = _p.labelBounds || {}; - if (bbLabels.all != null) { - clearBoundingBox(bbLabels.all); - } else { - bbLabels.all = makeBoundingBox(); - } - if (styleEnabled && options.includeLabels) { - if (options.includeMainLabels) { - updateBoundsFromLabel(bounds, ele, null); - } - if (isEdge) { - if (options.includeSourceLabels) { - updateBoundsFromLabel(bounds, ele, 'source'); - } - if (options.includeTargetLabels) { - updateBoundsFromLabel(bounds, ele, 'target'); - } - } - } // style enabled for labels - } // if displayed - - bounds.x1 = noninf(bounds.x1); - bounds.y1 = noninf(bounds.y1); - bounds.x2 = noninf(bounds.x2); - bounds.y2 = noninf(bounds.y2); - bounds.w = noninf(bounds.x2 - bounds.x1); - bounds.h = noninf(bounds.y2 - bounds.y1); - if (bounds.w > 0 && bounds.h > 0 && displayed) { - expandBoundingBoxSides(bounds, manualExpansion); - - // expand bounds by 1 because antialiasing can increase the visual/effective size by 1 on all sides - expandBoundingBox(bounds, 1); - } - return bounds; -}; -var getKey = function getKey(opts) { - var i = 0; - var tf = function tf(val) { - return (val ? 1 : 0) << i++; - }; - var key = 0; - key += tf(opts.incudeNodes); - key += tf(opts.includeEdges); - key += tf(opts.includeLabels); - key += tf(opts.includeMainLabels); - key += tf(opts.includeSourceLabels); - key += tf(opts.includeTargetLabels); - key += tf(opts.includeOverlays); - key += tf(opts.includeOutlines); - return key; -}; -var getBoundingBoxPosKey = function getBoundingBoxPosKey(ele) { - if (ele.isEdge()) { - var p1 = ele.source().position(); - var p2 = ele.target().position(); - var r = function r(x) { - return Math.round(x); - }; - return hashIntsArray([r(p1.x), r(p1.y), r(p2.x), r(p2.y)]); - } else { - return 0; - } -}; -var cachedBoundingBoxImpl = function cachedBoundingBoxImpl(ele, opts) { - var _p = ele._private; - var bb; - var isEdge = ele.isEdge(); - var key = opts == null ? defBbOptsKey : getKey(opts); - var usingDefOpts = key === defBbOptsKey; - var currPosKey = getBoundingBoxPosKey(ele); - var isPosKeySame = _p.bbCachePosKey === currPosKey; - var useCache = opts.useCache && isPosKeySame; - var isDirty = function isDirty(ele) { - return ele._private.bbCache == null || ele._private.styleDirty; - }; - var needRecalc = !useCache || isDirty(ele) || isEdge && isDirty(ele.source()) || isDirty(ele.target()); - if (needRecalc) { - if (!isPosKeySame) { - ele.recalculateRenderedStyle(useCache); - } - bb = boundingBoxImpl(ele, defBbOpts); - _p.bbCache = bb; - _p.bbCachePosKey = currPosKey; - } else { - bb = _p.bbCache; - } - - // not using def opts => need to build up bb from combination of sub bbs - if (!usingDefOpts) { - var isNode = ele.isNode(); - bb = makeBoundingBox(); - if (opts.includeNodes && isNode || opts.includeEdges && !isNode) { - if (opts.includeOverlays) { - updateBoundsFromBox(bb, _p.overlayBounds); - } else { - updateBoundsFromBox(bb, _p.bodyBounds); - } - } - if (opts.includeLabels) { - if (opts.includeMainLabels && (!isEdge || opts.includeSourceLabels && opts.includeTargetLabels)) { - updateBoundsFromBox(bb, _p.labelBounds.all); - } else { - if (opts.includeMainLabels) { - updateBoundsFromBox(bb, _p.labelBounds.mainRot); - } - if (opts.includeSourceLabels) { - updateBoundsFromBox(bb, _p.labelBounds.sourceRot); - } - if (opts.includeTargetLabels) { - updateBoundsFromBox(bb, _p.labelBounds.targetRot); - } - } - } - bb.w = bb.x2 - bb.x1; - bb.h = bb.y2 - bb.y1; - } - return bb; -}; -var defBbOpts = { - includeNodes: true, - includeEdges: true, - includeLabels: true, - includeMainLabels: true, - includeSourceLabels: true, - includeTargetLabels: true, - includeOverlays: true, - includeUnderlays: true, - includeOutlines: true, - useCache: true -}; -var defBbOptsKey = getKey(defBbOpts); -var filledBbOpts = defaults$g(defBbOpts); -elesfn$b.boundingBox = function (options) { - var bounds; - - // the main usecase is ele.boundingBox() for a single element with no/def options - // specified s.t. the cache is used, so check for this case to make it faster by - // avoiding the overhead of the rest of the function - if (this.length === 1 && this[0]._private.bbCache != null && !this[0]._private.styleDirty && (options === undefined || options.useCache === undefined || options.useCache === true)) { - if (options === undefined) { - options = defBbOpts; - } else { - options = filledBbOpts(options); - } - bounds = cachedBoundingBoxImpl(this[0], options); - } else { - bounds = makeBoundingBox(); - options = options || defBbOpts; - var opts = filledBbOpts(options); - var eles = this; - var cy = eles.cy(); - var styleEnabled = cy.styleEnabled(); - if (styleEnabled) { - for (var i = 0; i < eles.length; i++) { - var ele = eles[i]; - var _p = ele._private; - var currPosKey = getBoundingBoxPosKey(ele); - var isPosKeySame = _p.bbCachePosKey === currPosKey; - var useCache = opts.useCache && isPosKeySame && !_p.styleDirty; - ele.recalculateRenderedStyle(useCache); - } - } - this.updateCompoundBounds(!options.useCache); - for (var _i = 0; _i < eles.length; _i++) { - var _ele = eles[_i]; - updateBoundsFromBox(bounds, cachedBoundingBoxImpl(_ele, opts)); - } - } - bounds.x1 = noninf(bounds.x1); - bounds.y1 = noninf(bounds.y1); - bounds.x2 = noninf(bounds.x2); - bounds.y2 = noninf(bounds.y2); - bounds.w = noninf(bounds.x2 - bounds.x1); - bounds.h = noninf(bounds.y2 - bounds.y1); - return bounds; -}; -elesfn$b.dirtyBoundingBoxCache = function () { - for (var i = 0; i < this.length; i++) { - var _p = this[i]._private; - _p.bbCache = null; - _p.bbCachePosKey = null; - _p.bodyBounds = null; - _p.overlayBounds = null; - _p.labelBounds.all = null; - _p.labelBounds.source = null; - _p.labelBounds.target = null; - _p.labelBounds.main = null; - _p.labelBounds.sourceRot = null; - _p.labelBounds.targetRot = null; - _p.labelBounds.mainRot = null; - _p.arrowBounds.source = null; - _p.arrowBounds.target = null; - _p.arrowBounds['mid-source'] = null; - _p.arrowBounds['mid-target'] = null; - } - this.emitAndNotify('bounds'); - return this; -}; - -// private helper to get bounding box for custom node positions -// - good for perf in certain cases but currently requires dirtying the rendered style -// - would be better to not modify the nodes but the nodes are read directly everywhere in the renderer... -// - try to use for only things like discrete layouts where the node position would change anyway -elesfn$b.boundingBoxAt = function (fn) { - var nodes = this.nodes(); - var cy = this.cy(); - var hasCompoundNodes = cy.hasCompoundNodes(); - var parents = cy.collection(); - if (hasCompoundNodes) { - parents = nodes.filter(function (node) { - return node.isParent(); - }); - nodes = nodes.not(parents); - } - if (plainObject(fn)) { - var obj = fn; - fn = function fn() { - return obj; - }; - } - var storeOldPos = function storeOldPos(node, i) { - return node._private.bbAtOldPos = fn(node, i); - }; - var getOldPos = function getOldPos(node) { - return node._private.bbAtOldPos; - }; - cy.startBatch(); - nodes.forEach(storeOldPos).silentPositions(fn); - if (hasCompoundNodes) { - parents.dirtyCompoundBoundsCache(); - parents.dirtyBoundingBoxCache(); - parents.updateCompoundBounds(true); // force update b/c we're inside a batch cycle - } - - var bb = copyBoundingBox(this.boundingBox({ - useCache: false - })); - nodes.silentPositions(getOldPos); - if (hasCompoundNodes) { - parents.dirtyCompoundBoundsCache(); - parents.dirtyBoundingBoxCache(); - parents.updateCompoundBounds(true); // force update b/c we're inside a batch cycle - } - - cy.endBatch(); - return bb; -}; -fn$3.boundingbox = fn$3.bb = fn$3.boundingBox; -fn$3.renderedBoundingbox = fn$3.renderedBoundingBox; -var bounds = elesfn$b; - -var fn$2, elesfn$a; -fn$2 = elesfn$a = {}; -var defineDimFns = function defineDimFns(opts) { - opts.uppercaseName = capitalize(opts.name); - opts.autoName = 'auto' + opts.uppercaseName; - opts.labelName = 'label' + opts.uppercaseName; - opts.outerName = 'outer' + opts.uppercaseName; - opts.uppercaseOuterName = capitalize(opts.outerName); - fn$2[opts.name] = function dimImpl() { - var ele = this[0]; - var _p = ele._private; - var cy = _p.cy; - var styleEnabled = cy._private.styleEnabled; - if (ele) { - if (styleEnabled) { - if (ele.isParent()) { - ele.updateCompoundBounds(); - return _p[opts.autoName] || 0; - } - var d = ele.pstyle(opts.name); - switch (d.strValue) { - case 'label': - ele.recalculateRenderedStyle(); - return _p.rstyle[opts.labelName] || 0; - default: - return d.pfValue; - } - } else { - return 1; - } - } - }; - fn$2['outer' + opts.uppercaseName] = function outerDimImpl() { - var ele = this[0]; - var _p = ele._private; - var cy = _p.cy; - var styleEnabled = cy._private.styleEnabled; - if (ele) { - if (styleEnabled) { - var dim = ele[opts.name](); - var border = ele.pstyle('border-width').pfValue; // n.b. 1/2 each side - var padding = 2 * ele.padding(); - return dim + border + padding; - } else { - return 1; - } - } - }; - fn$2['rendered' + opts.uppercaseName] = function renderedDimImpl() { - var ele = this[0]; - if (ele) { - var d = ele[opts.name](); - return d * this.cy().zoom(); - } - }; - fn$2['rendered' + opts.uppercaseOuterName] = function renderedOuterDimImpl() { - var ele = this[0]; - if (ele) { - var od = ele[opts.outerName](); - return od * this.cy().zoom(); - } - }; -}; -defineDimFns({ - name: 'width' -}); -defineDimFns({ - name: 'height' -}); -elesfn$a.padding = function () { - var ele = this[0]; - var _p = ele._private; - if (ele.isParent()) { - ele.updateCompoundBounds(); - if (_p.autoPadding !== undefined) { - return _p.autoPadding; - } else { - return ele.pstyle('padding').pfValue; - } - } else { - return ele.pstyle('padding').pfValue; - } -}; -elesfn$a.paddedHeight = function () { - var ele = this[0]; - return ele.height() + 2 * ele.padding(); -}; -elesfn$a.paddedWidth = function () { - var ele = this[0]; - return ele.width() + 2 * ele.padding(); -}; -var widthHeight = elesfn$a; - -var ifEdge = function ifEdge(ele, getValue) { - if (ele.isEdge()) { - return getValue(ele); - } -}; -var ifEdgeRenderedPosition = function ifEdgeRenderedPosition(ele, getPoint) { - if (ele.isEdge()) { - var cy = ele.cy(); - return modelToRenderedPosition(getPoint(ele), cy.zoom(), cy.pan()); - } -}; -var ifEdgeRenderedPositions = function ifEdgeRenderedPositions(ele, getPoints) { - if (ele.isEdge()) { - var cy = ele.cy(); - var pan = cy.pan(); - var zoom = cy.zoom(); - return getPoints(ele).map(function (p) { - return modelToRenderedPosition(p, zoom, pan); - }); - } -}; -var controlPoints = function controlPoints(ele) { - return ele.renderer().getControlPoints(ele); -}; -var segmentPoints = function segmentPoints(ele) { - return ele.renderer().getSegmentPoints(ele); -}; -var sourceEndpoint = function sourceEndpoint(ele) { - return ele.renderer().getSourceEndpoint(ele); -}; -var targetEndpoint = function targetEndpoint(ele) { - return ele.renderer().getTargetEndpoint(ele); -}; -var midpoint = function midpoint(ele) { - return ele.renderer().getEdgeMidpoint(ele); -}; -var pts = { - controlPoints: { - get: controlPoints, - mult: true - }, - segmentPoints: { - get: segmentPoints, - mult: true - }, - sourceEndpoint: { - get: sourceEndpoint - }, - targetEndpoint: { - get: targetEndpoint - }, - midpoint: { - get: midpoint - } -}; -var renderedName = function renderedName(name) { - return 'rendered' + name[0].toUpperCase() + name.substr(1); -}; -var edgePoints = Object.keys(pts).reduce(function (obj, name) { - var spec = pts[name]; - var rName = renderedName(name); - obj[name] = function () { - return ifEdge(this, spec.get); - }; - if (spec.mult) { - obj[rName] = function () { - return ifEdgeRenderedPositions(this, spec.get); - }; - } else { - obj[rName] = function () { - return ifEdgeRenderedPosition(this, spec.get); - }; - } - return obj; -}, {}); - -var dimensions = extend({}, position, bounds, widthHeight, edgePoints); - -/*! -Event object based on jQuery events, MIT license - -https://jquery.org/license/ -https://tldrlegal.com/license/mit-license -https://github.com/jquery/jquery/blob/master/src/event.js -*/ - -var Event = function Event(src, props) { - this.recycle(src, props); -}; -function returnFalse() { - return false; -} -function returnTrue() { - return true; -} - -// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html -Event.prototype = { - instanceString: function instanceString() { - return 'event'; - }, - recycle: function recycle(src, props) { - this.isImmediatePropagationStopped = this.isPropagationStopped = this.isDefaultPrevented = returnFalse; - if (src != null && src.preventDefault) { - // Browser Event object - this.type = src.type; - - // Events bubbling up the document may have been marked as prevented - // by a handler lower down the tree; reflect the correct value. - this.isDefaultPrevented = src.defaultPrevented ? returnTrue : returnFalse; - } else if (src != null && src.type) { - // Plain object containing all event details - props = src; - } else { - // Event string - this.type = src; - } - - // Put explicitly provided properties onto the event object - if (props != null) { - // more efficient to manually copy fields we use - this.originalEvent = props.originalEvent; - this.type = props.type != null ? props.type : this.type; - this.cy = props.cy; - this.target = props.target; - this.position = props.position; - this.renderedPosition = props.renderedPosition; - this.namespace = props.namespace; - this.layout = props.layout; - } - if (this.cy != null && this.position != null && this.renderedPosition == null) { - // create a rendered position based on the passed position - var pos = this.position; - var zoom = this.cy.zoom(); - var pan = this.cy.pan(); - this.renderedPosition = { - x: pos.x * zoom + pan.x, - y: pos.y * zoom + pan.y - }; - } - - // Create a timestamp if incoming event doesn't have one - this.timeStamp = src && src.timeStamp || Date.now(); - }, - preventDefault: function preventDefault() { - this.isDefaultPrevented = returnTrue; - var e = this.originalEvent; - if (!e) { - return; - } - - // if preventDefault exists run it on the original event - if (e.preventDefault) { - e.preventDefault(); - } - }, - stopPropagation: function stopPropagation() { - this.isPropagationStopped = returnTrue; - var e = this.originalEvent; - if (!e) { - return; - } - - // if stopPropagation exists run it on the original event - if (e.stopPropagation) { - e.stopPropagation(); - } - }, - stopImmediatePropagation: function stopImmediatePropagation() { - this.isImmediatePropagationStopped = returnTrue; - this.stopPropagation(); - }, - isDefaultPrevented: returnFalse, - isPropagationStopped: returnFalse, - isImmediatePropagationStopped: returnFalse -}; - -var eventRegex = /^([^.]+)(\.(?:[^.]+))?$/; // regex for matching event strings (e.g. "click.namespace") -var universalNamespace = '.*'; // matches as if no namespace specified and prevents users from unbinding accidentally - -var defaults$8 = { - qualifierCompare: function qualifierCompare(q1, q2) { - return q1 === q2; - }, - eventMatches: function eventMatches( /*context, listener, eventObj*/ - ) { - return true; - }, - addEventFields: function addEventFields( /*context, evt*/ - ) {}, - callbackContext: function callbackContext(context /*, listener, eventObj*/) { - return context; - }, - beforeEmit: function beforeEmit( /* context, listener, eventObj */ - ) {}, - afterEmit: function afterEmit( /* context, listener, eventObj */ - ) {}, - bubble: function bubble( /*context*/ - ) { - return false; - }, - parent: function parent( /*context*/ - ) { - return null; - }, - context: null -}; -var defaultsKeys = Object.keys(defaults$8); -var emptyOpts = {}; -function Emitter() { - var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : emptyOpts; - var context = arguments.length > 1 ? arguments[1] : undefined; - // micro-optimisation vs Object.assign() -- reduces Element instantiation time - for (var i = 0; i < defaultsKeys.length; i++) { - var key = defaultsKeys[i]; - this[key] = opts[key] || defaults$8[key]; - } - this.context = context || this.context; - this.listeners = []; - this.emitting = 0; -} -var p = Emitter.prototype; -var forEachEvent = function forEachEvent(self, handler, events, qualifier, callback, conf, confOverrides) { - if (fn$6(qualifier)) { - callback = qualifier; - qualifier = null; - } - if (confOverrides) { - if (conf == null) { - conf = confOverrides; - } else { - conf = extend({}, conf, confOverrides); - } - } - var eventList = array(events) ? events : events.split(/\s+/); - for (var i = 0; i < eventList.length; i++) { - var evt = eventList[i]; - if (emptyString(evt)) { - continue; - } - var match = evt.match(eventRegex); // type[.namespace] - - if (match) { - var type = match[1]; - var namespace = match[2] ? match[2] : null; - var ret = handler(self, evt, type, namespace, qualifier, callback, conf); - if (ret === false) { - break; - } // allow exiting early - } - } -}; - -var makeEventObj = function makeEventObj(self, obj) { - self.addEventFields(self.context, obj); - return new Event(obj.type, obj); -}; -var forEachEventObj = function forEachEventObj(self, handler, events) { - if (cytoscape_esm_event(events)) { - handler(self, events); - return; - } else if (plainObject(events)) { - handler(self, makeEventObj(self, events)); - return; - } - var eventList = array(events) ? events : events.split(/\s+/); - for (var i = 0; i < eventList.length; i++) { - var evt = eventList[i]; - if (emptyString(evt)) { - continue; - } - var match = evt.match(eventRegex); // type[.namespace] - - if (match) { - var type = match[1]; - var namespace = match[2] ? match[2] : null; - var eventObj = makeEventObj(self, { - type: type, - namespace: namespace, - target: self.context - }); - handler(self, eventObj); - } - } -}; -p.on = p.addListener = function (events, qualifier, callback, conf, confOverrides) { - forEachEvent(this, function (self, event, type, namespace, qualifier, callback, conf) { - if (fn$6(callback)) { - self.listeners.push({ - event: event, - // full event string - callback: callback, - // callback to run - type: type, - // the event type (e.g. 'click') - namespace: namespace, - // the event namespace (e.g. ".foo") - qualifier: qualifier, - // a restriction on whether to match this emitter - conf: conf // additional configuration - }); - } - }, events, qualifier, callback, conf, confOverrides); - return this; -}; -p.one = function (events, qualifier, callback, conf) { - return this.on(events, qualifier, callback, conf, { - one: true - }); -}; -p.removeListener = p.off = function (events, qualifier, callback, conf) { - var _this = this; - if (this.emitting !== 0) { - this.listeners = copyArray$1(this.listeners); - } - var listeners = this.listeners; - var _loop = function _loop(i) { - var listener = listeners[i]; - forEachEvent(_this, function (self, event, type, namespace, qualifier, callback /*, conf*/) { - if ((listener.type === type || events === '*') && (!namespace && listener.namespace !== '.*' || listener.namespace === namespace) && (!qualifier || self.qualifierCompare(listener.qualifier, qualifier)) && (!callback || listener.callback === callback)) { - listeners.splice(i, 1); - return false; - } - }, events, qualifier, callback, conf); - }; - for (var i = listeners.length - 1; i >= 0; i--) { - _loop(i); - } - return this; -}; -p.removeAllListeners = function () { - return this.removeListener('*'); -}; -p.emit = p.trigger = function (events, extraParams, manualCallback) { - var listeners = this.listeners; - var numListenersBeforeEmit = listeners.length; - this.emitting++; - if (!array(extraParams)) { - extraParams = [extraParams]; - } - forEachEventObj(this, function (self, eventObj) { - if (manualCallback != null) { - listeners = [{ - event: eventObj.event, - type: eventObj.type, - namespace: eventObj.namespace, - callback: manualCallback - }]; - numListenersBeforeEmit = listeners.length; - } - var _loop2 = function _loop2(i) { - var listener = listeners[i]; - if (listener.type === eventObj.type && (!listener.namespace || listener.namespace === eventObj.namespace || listener.namespace === universalNamespace) && self.eventMatches(self.context, listener, eventObj)) { - var args = [eventObj]; - if (extraParams != null) { - push(args, extraParams); - } - self.beforeEmit(self.context, listener, eventObj); - if (listener.conf && listener.conf.one) { - self.listeners = self.listeners.filter(function (l) { - return l !== listener; - }); - } - var context = self.callbackContext(self.context, listener, eventObj); - var ret = listener.callback.apply(context, args); - self.afterEmit(self.context, listener, eventObj); - if (ret === false) { - eventObj.stopPropagation(); - eventObj.preventDefault(); - } - } // if listener matches - }; - for (var i = 0; i < numListenersBeforeEmit; i++) { - _loop2(i); - } // for listener - - if (self.bubble(self.context) && !eventObj.isPropagationStopped()) { - self.parent(self.context).emit(eventObj, extraParams); - } - }, events); - this.emitting--; - return this; -}; - -var emitterOptions$1 = { - qualifierCompare: function qualifierCompare(selector1, selector2) { - if (selector1 == null || selector2 == null) { - return selector1 == null && selector2 == null; - } else { - return selector1.sameText(selector2); - } - }, - eventMatches: function eventMatches(ele, listener, eventObj) { - var selector = listener.qualifier; - if (selector != null) { - return ele !== eventObj.target && cytoscape_esm_element(eventObj.target) && selector.matches(eventObj.target); - } - return true; - }, - addEventFields: function addEventFields(ele, evt) { - evt.cy = ele.cy(); - evt.target = ele; - }, - callbackContext: function callbackContext(ele, listener, eventObj) { - return listener.qualifier != null ? eventObj.target : ele; - }, - beforeEmit: function beforeEmit(context, listener /*, eventObj*/) { - if (listener.conf && listener.conf.once) { - listener.conf.onceCollection.removeListener(listener.event, listener.qualifier, listener.callback); - } - }, - bubble: function bubble() { - return true; - }, - parent: function parent(ele) { - return ele.isChild() ? ele.parent() : ele.cy(); - } -}; -var argSelector$1 = function argSelector(arg) { - if (string(arg)) { - return new Selector(arg); - } else { - return arg; - } -}; -var elesfn$9 = { - createEmitter: function createEmitter() { - for (var i = 0; i < this.length; i++) { - var ele = this[i]; - var _p = ele._private; - if (!_p.emitter) { - _p.emitter = new Emitter(emitterOptions$1, ele); - } - } - return this; - }, - emitter: function emitter() { - return this._private.emitter; - }, - on: function on(events, selector, callback) { - var argSel = argSelector$1(selector); - for (var i = 0; i < this.length; i++) { - var ele = this[i]; - ele.emitter().on(events, argSel, callback); - } - return this; - }, - removeListener: function removeListener(events, selector, callback) { - var argSel = argSelector$1(selector); - for (var i = 0; i < this.length; i++) { - var ele = this[i]; - ele.emitter().removeListener(events, argSel, callback); - } - return this; - }, - removeAllListeners: function removeAllListeners() { - for (var i = 0; i < this.length; i++) { - var ele = this[i]; - ele.emitter().removeAllListeners(); - } - return this; - }, - one: function one(events, selector, callback) { - var argSel = argSelector$1(selector); - for (var i = 0; i < this.length; i++) { - var ele = this[i]; - ele.emitter().one(events, argSel, callback); - } - return this; - }, - once: function once(events, selector, callback) { - var argSel = argSelector$1(selector); - for (var i = 0; i < this.length; i++) { - var ele = this[i]; - ele.emitter().on(events, argSel, callback, { - once: true, - onceCollection: this - }); - } - }, - emit: function emit(events, extraParams) { - for (var i = 0; i < this.length; i++) { - var ele = this[i]; - ele.emitter().emit(events, extraParams); - } - return this; - }, - emitAndNotify: function emitAndNotify(event, extraParams) { - // for internal use only - if (this.length === 0) { - return; - } // empty collections don't need to notify anything - - // notify renderer - this.cy().notify(event, this); - this.emit(event, extraParams); - return this; - } -}; -cytoscape_esm_define.eventAliasesOn(elesfn$9); - -var elesfn$8 = { - nodes: function nodes(selector) { - return this.filter(function (ele) { - return ele.isNode(); - }).filter(selector); - }, - edges: function edges(selector) { - return this.filter(function (ele) { - return ele.isEdge(); - }).filter(selector); - }, - // internal helper to get nodes and edges as separate collections with single iteration over elements - byGroup: function byGroup() { - var nodes = this.spawn(); - var edges = this.spawn(); - for (var i = 0; i < this.length; i++) { - var ele = this[i]; - if (ele.isNode()) { - nodes.push(ele); - } else { - edges.push(ele); - } - } - return { - nodes: nodes, - edges: edges - }; - }, - filter: function filter(_filter, thisArg) { - if (_filter === undefined) { - // check this first b/c it's the most common/performant case - return this; - } else if (string(_filter) || elementOrCollection(_filter)) { - return new Selector(_filter).filter(this); - } else if (fn$6(_filter)) { - var filterEles = this.spawn(); - var eles = this; - for (var i = 0; i < eles.length; i++) { - var ele = eles[i]; - var include = thisArg ? _filter.apply(thisArg, [ele, i, eles]) : _filter(ele, i, eles); - if (include) { - filterEles.push(ele); - } - } - return filterEles; - } - return this.spawn(); // if not handled by above, give 'em an empty collection - }, - - not: function not(toRemove) { - if (!toRemove) { - return this; - } else { - if (string(toRemove)) { - toRemove = this.filter(toRemove); - } - var elements = this.spawn(); - for (var i = 0; i < this.length; i++) { - var element = this[i]; - var remove = toRemove.has(element); - if (!remove) { - elements.push(element); - } - } - return elements; - } - }, - absoluteComplement: function absoluteComplement() { - var cy = this.cy(); - return cy.mutableElements().not(this); - }, - intersect: function intersect(other) { - // if a selector is specified, then filter by it instead - if (string(other)) { - var selector = other; - return this.filter(selector); - } - var elements = this.spawn(); - var col1 = this; - var col2 = other; - var col1Smaller = this.length < other.length; - var colS = col1Smaller ? col1 : col2; - var colL = col1Smaller ? col2 : col1; - for (var i = 0; i < colS.length; i++) { - var ele = colS[i]; - if (colL.has(ele)) { - elements.push(ele); - } - } - return elements; - }, - xor: function xor(other) { - var cy = this._private.cy; - if (string(other)) { - other = cy.$(other); - } - var elements = this.spawn(); - var col1 = this; - var col2 = other; - var add = function add(col, other) { - for (var i = 0; i < col.length; i++) { - var ele = col[i]; - var id = ele._private.data.id; - var inOther = other.hasElementWithId(id); - if (!inOther) { - elements.push(ele); - } - } - }; - add(col1, col2); - add(col2, col1); - return elements; - }, - diff: function diff(other) { - var cy = this._private.cy; - if (string(other)) { - other = cy.$(other); - } - var left = this.spawn(); - var right = this.spawn(); - var both = this.spawn(); - var col1 = this; - var col2 = other; - var add = function add(col, other, retEles) { - for (var i = 0; i < col.length; i++) { - var ele = col[i]; - var id = ele._private.data.id; - var inOther = other.hasElementWithId(id); - if (inOther) { - both.merge(ele); - } else { - retEles.push(ele); - } - } - }; - add(col1, col2, left); - add(col2, col1, right); - return { - left: left, - right: right, - both: both - }; - }, - add: function add(toAdd) { - var cy = this._private.cy; - if (!toAdd) { - return this; - } - if (string(toAdd)) { - var selector = toAdd; - toAdd = cy.mutableElements().filter(selector); - } - var elements = this.spawnSelf(); - for (var i = 0; i < toAdd.length; i++) { - var ele = toAdd[i]; - var add = !this.has(ele); - if (add) { - elements.push(ele); - } - } - return elements; - }, - // in place merge on calling collection - merge: function merge(toAdd) { - var _p = this._private; - var cy = _p.cy; - if (!toAdd) { - return this; - } - if (toAdd && string(toAdd)) { - var selector = toAdd; - toAdd = cy.mutableElements().filter(selector); - } - var map = _p.map; - for (var i = 0; i < toAdd.length; i++) { - var toAddEle = toAdd[i]; - var id = toAddEle._private.data.id; - var add = !map.has(id); - if (add) { - var index = this.length++; - this[index] = toAddEle; - map.set(id, { - ele: toAddEle, - index: index - }); - } - } - return this; // chaining - }, - - unmergeAt: function unmergeAt(i) { - var ele = this[i]; - var id = ele.id(); - var _p = this._private; - var map = _p.map; - - // remove ele - this[i] = undefined; - map["delete"](id); - var unmergedLastEle = i === this.length - 1; - - // replace empty spot with last ele in collection - if (this.length > 1 && !unmergedLastEle) { - var lastEleI = this.length - 1; - var lastEle = this[lastEleI]; - var lastEleId = lastEle._private.data.id; - this[lastEleI] = undefined; - this[i] = lastEle; - map.set(lastEleId, { - ele: lastEle, - index: i - }); - } - - // the collection is now 1 ele smaller - this.length--; - return this; - }, - // remove single ele in place in calling collection - unmergeOne: function unmergeOne(ele) { - ele = ele[0]; - var _p = this._private; - var id = ele._private.data.id; - var map = _p.map; - var entry = map.get(id); - if (!entry) { - return this; // no need to remove - } - - var i = entry.index; - this.unmergeAt(i); - return this; - }, - // remove eles in place on calling collection - unmerge: function unmerge(toRemove) { - var cy = this._private.cy; - if (!toRemove) { - return this; - } - if (toRemove && string(toRemove)) { - var selector = toRemove; - toRemove = cy.mutableElements().filter(selector); - } - for (var i = 0; i < toRemove.length; i++) { - this.unmergeOne(toRemove[i]); - } - return this; // chaining - }, - - unmergeBy: function unmergeBy(toRmFn) { - for (var i = this.length - 1; i >= 0; i--) { - var ele = this[i]; - if (toRmFn(ele)) { - this.unmergeAt(i); - } - } - return this; - }, - map: function map(mapFn, thisArg) { - var arr = []; - var eles = this; - for (var i = 0; i < eles.length; i++) { - var ele = eles[i]; - var ret = thisArg ? mapFn.apply(thisArg, [ele, i, eles]) : mapFn(ele, i, eles); - arr.push(ret); - } - return arr; - }, - reduce: function reduce(fn, initialValue) { - var val = initialValue; - var eles = this; - for (var i = 0; i < eles.length; i++) { - val = fn(val, eles[i], i, eles); - } - return val; - }, - max: function max(valFn, thisArg) { - var max = -Infinity; - var maxEle; - var eles = this; - for (var i = 0; i < eles.length; i++) { - var ele = eles[i]; - var val = thisArg ? valFn.apply(thisArg, [ele, i, eles]) : valFn(ele, i, eles); - if (val > max) { - max = val; - maxEle = ele; - } - } - return { - value: max, - ele: maxEle - }; - }, - min: function min(valFn, thisArg) { - var min = Infinity; - var minEle; - var eles = this; - for (var i = 0; i < eles.length; i++) { - var ele = eles[i]; - var val = thisArg ? valFn.apply(thisArg, [ele, i, eles]) : valFn(ele, i, eles); - if (val < min) { - min = val; - minEle = ele; - } - } - return { - value: min, - ele: minEle - }; - } -}; - -// aliases -var fn$1 = elesfn$8; -fn$1['u'] = fn$1['|'] = fn$1['+'] = fn$1.union = fn$1.or = fn$1.add; -fn$1['\\'] = fn$1['!'] = fn$1['-'] = fn$1.difference = fn$1.relativeComplement = fn$1.subtract = fn$1.not; -fn$1['n'] = fn$1['&'] = fn$1['.'] = fn$1.and = fn$1.intersection = fn$1.intersect; -fn$1['^'] = fn$1['(+)'] = fn$1['(-)'] = fn$1.symmetricDifference = fn$1.symdiff = fn$1.xor; -fn$1.fnFilter = fn$1.filterFn = fn$1.stdFilter = fn$1.filter; -fn$1.complement = fn$1.abscomp = fn$1.absoluteComplement; - -var elesfn$7 = { - isNode: function isNode() { - return this.group() === 'nodes'; - }, - isEdge: function isEdge() { - return this.group() === 'edges'; - }, - isLoop: function isLoop() { - return this.isEdge() && this.source()[0] === this.target()[0]; - }, - isSimple: function isSimple() { - return this.isEdge() && this.source()[0] !== this.target()[0]; - }, - group: function group() { - var ele = this[0]; - if (ele) { - return ele._private.group; - } - } -}; - -/** - * Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), - * and z-index (low to high). These styles affect how this applies: - * - * z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the - * same depth as the root of the compound graph, followed by the default value `auto` which draws in order from - * root to leaves of the compound graph. The last drawn is `top`. - * z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. - * `manual` ignores this convention and draws based on the `z-index` value setting. - * z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher - * `z-index` will be drawn on top of an element with a lower `z-index`. - */ -var zIndexSort = function zIndexSort(a, b) { - var cy = a.cy(); - var hasCompoundNodes = cy.hasCompoundNodes(); - function getDepth(ele) { - var style = ele.pstyle('z-compound-depth'); - if (style.value === 'auto') { - return hasCompoundNodes ? ele.zDepth() : 0; - } else if (style.value === 'bottom') { - return -1; - } else if (style.value === 'top') { - return MAX_INT$1; - } - // 'orphan' - return 0; - } - var depthDiff = getDepth(a) - getDepth(b); - if (depthDiff !== 0) { - return depthDiff; - } - function getEleDepth(ele) { - var style = ele.pstyle('z-index-compare'); - if (style.value === 'auto') { - return ele.isNode() ? 1 : 0; - } - // 'manual' - return 0; - } - var eleDiff = getEleDepth(a) - getEleDepth(b); - if (eleDiff !== 0) { - return eleDiff; - } - var zDiff = a.pstyle('z-index').value - b.pstyle('z-index').value; - if (zDiff !== 0) { - return zDiff; - } - // compare indices in the core (order added to graph w/ last on top) - return a.poolIndex() - b.poolIndex(); -}; - -var elesfn$6 = { - forEach: function forEach(fn, thisArg) { - if (fn$6(fn)) { - var N = this.length; - for (var i = 0; i < N; i++) { - var ele = this[i]; - var ret = thisArg ? fn.apply(thisArg, [ele, i, this]) : fn(ele, i, this); - if (ret === false) { - break; - } // exit each early on return false - } - } - - return this; - }, - toArray: function toArray() { - var array = []; - for (var i = 0; i < this.length; i++) { - array.push(this[i]); - } - return array; - }, - slice: function slice(start, end) { - var array = []; - var thisSize = this.length; - if (end == null) { - end = thisSize; - } - if (start == null) { - start = 0; - } - if (start < 0) { - start = thisSize + start; - } - if (end < 0) { - end = thisSize + end; - } - for (var i = start; i >= 0 && i < end && i < thisSize; i++) { - array.push(this[i]); - } - return this.spawn(array); - }, - size: function size() { - return this.length; - }, - eq: function eq(i) { - return this[i] || this.spawn(); - }, - first: function first() { - return this[0] || this.spawn(); - }, - last: function last() { - return this[this.length - 1] || this.spawn(); - }, - empty: function empty() { - return this.length === 0; - }, - nonempty: function nonempty() { - return !this.empty(); - }, - sort: function sort(sortFn) { - if (!fn$6(sortFn)) { - return this; - } - var sorted = this.toArray().sort(sortFn); - return this.spawn(sorted); - }, - sortByZIndex: function sortByZIndex() { - return this.sort(zIndexSort); - }, - zDepth: function zDepth() { - var ele = this[0]; - if (!ele) { - return undefined; - } - - // let cy = ele.cy(); - var _p = ele._private; - var group = _p.group; - if (group === 'nodes') { - var depth = _p.data.parent ? ele.parents().size() : 0; - if (!ele.isParent()) { - return MAX_INT$1 - 1; // childless nodes always on top - } - - return depth; - } else { - var src = _p.source; - var tgt = _p.target; - var srcDepth = src.zDepth(); - var tgtDepth = tgt.zDepth(); - return Math.max(srcDepth, tgtDepth, 0); // depth of deepest parent - } - } -}; - -elesfn$6.each = elesfn$6.forEach; -var defineSymbolIterator = function defineSymbolIterator() { - var typeofUndef = "undefined" ; - var isIteratorSupported = (typeof Symbol === "undefined" ? "undefined" : _typeof(Symbol)) != typeofUndef && _typeof(Symbol.iterator) != typeofUndef; // eslint-disable-line no-undef - - if (isIteratorSupported) { - elesfn$6[Symbol.iterator] = function () { - var _this = this; - // eslint-disable-line no-undef - var entry = { - value: undefined, - done: false - }; - var i = 0; - var length = this.length; - return _defineProperty$1({ - next: function next() { - if (i < length) { - entry.value = _this[i++]; - } else { - entry.value = undefined; - entry.done = true; - } - return entry; - } - }, Symbol.iterator, function () { - // eslint-disable-line no-undef - return this; - }); - }; - } -}; -defineSymbolIterator(); - -var getLayoutDimensionOptions = defaults$g({ - nodeDimensionsIncludeLabels: false -}); -var elesfn$5 = { - // Calculates and returns node dimensions { x, y } based on options given - layoutDimensions: function layoutDimensions(options) { - options = getLayoutDimensionOptions(options); - var dims; - if (!this.takesUpSpace()) { - dims = { - w: 0, - h: 0 - }; - } else if (options.nodeDimensionsIncludeLabels) { - var bbDim = this.boundingBox(); - dims = { - w: bbDim.w, - h: bbDim.h - }; - } else { - dims = { - w: this.outerWidth(), - h: this.outerHeight() - }; - } - - // sanitise the dimensions for external layouts (avoid division by zero) - if (dims.w === 0 || dims.h === 0) { - dims.w = dims.h = 1; - } - return dims; - }, - // using standard layout options, apply position function (w/ or w/o animation) - layoutPositions: function layoutPositions(layout, options, fn) { - var nodes = this.nodes().filter(function (n) { - return !n.isParent(); - }); - var cy = this.cy(); - var layoutEles = options.eles; // nodes & edges - var getMemoizeKey = function getMemoizeKey(node) { - return node.id(); - }; - var fnMem = memoize$1(fn, getMemoizeKey); // memoized version of position function - - layout.emit({ - type: 'layoutstart', - layout: layout - }); - layout.animations = []; - var calculateSpacing = function calculateSpacing(spacing, nodesBb, pos) { - var center = { - x: nodesBb.x1 + nodesBb.w / 2, - y: nodesBb.y1 + nodesBb.h / 2 - }; - var spacingVector = { - // scale from center of bounding box (not necessarily 0,0) - x: (pos.x - center.x) * spacing, - y: (pos.y - center.y) * spacing - }; - return { - x: center.x + spacingVector.x, - y: center.y + spacingVector.y - }; - }; - var useSpacingFactor = options.spacingFactor && options.spacingFactor !== 1; - var spacingBb = function spacingBb() { - if (!useSpacingFactor) { - return null; - } - var bb = makeBoundingBox(); - for (var i = 0; i < nodes.length; i++) { - var node = nodes[i]; - var pos = fnMem(node, i); - expandBoundingBoxByPoint(bb, pos.x, pos.y); - } - return bb; - }; - var bb = spacingBb(); - var getFinalPos = memoize$1(function (node, i) { - var newPos = fnMem(node, i); - if (useSpacingFactor) { - var spacing = Math.abs(options.spacingFactor); - newPos = calculateSpacing(spacing, bb, newPos); - } - if (options.transform != null) { - newPos = options.transform(node, newPos); - } - return newPos; - }, getMemoizeKey); - if (options.animate) { - for (var i = 0; i < nodes.length; i++) { - var node = nodes[i]; - var newPos = getFinalPos(node, i); - var animateNode = options.animateFilter == null || options.animateFilter(node, i); - if (animateNode) { - var ani = node.animation({ - position: newPos, - duration: options.animationDuration, - easing: options.animationEasing - }); - layout.animations.push(ani); - } else { - node.position(newPos); - } - } - if (options.fit) { - var fitAni = cy.animation({ - fit: { - boundingBox: layoutEles.boundingBoxAt(getFinalPos), - padding: options.padding - }, - duration: options.animationDuration, - easing: options.animationEasing - }); - layout.animations.push(fitAni); - } else if (options.zoom !== undefined && options.pan !== undefined) { - var zoomPanAni = cy.animation({ - zoom: options.zoom, - pan: options.pan, - duration: options.animationDuration, - easing: options.animationEasing - }); - layout.animations.push(zoomPanAni); - } - layout.animations.forEach(function (ani) { - return ani.play(); - }); - layout.one('layoutready', options.ready); - layout.emit({ - type: 'layoutready', - layout: layout - }); - Promise$1.all(layout.animations.map(function (ani) { - return ani.promise(); - })).then(function () { - layout.one('layoutstop', options.stop); - layout.emit({ - type: 'layoutstop', - layout: layout - }); - }); - } else { - nodes.positions(getFinalPos); - if (options.fit) { - cy.fit(options.eles, options.padding); - } - if (options.zoom != null) { - cy.zoom(options.zoom); - } - if (options.pan) { - cy.pan(options.pan); - } - layout.one('layoutready', options.ready); - layout.emit({ - type: 'layoutready', - layout: layout - }); - layout.one('layoutstop', options.stop); - layout.emit({ - type: 'layoutstop', - layout: layout - }); - } - return this; // chaining - }, - - layout: function layout(options) { - var cy = this.cy(); - return cy.makeLayout(extend({}, options, { - eles: this - })); - } -}; - -// aliases: -elesfn$5.createLayout = elesfn$5.makeLayout = elesfn$5.layout; - -function styleCache(key, fn, ele) { - var _p = ele._private; - var cache = _p.styleCache = _p.styleCache || []; - var val; - if ((val = cache[key]) != null) { - return val; - } else { - val = cache[key] = fn(ele); - return val; - } -} -function cacheStyleFunction(key, fn) { - key = hashString(key); - return function cachedStyleFunction(ele) { - return styleCache(key, fn, ele); - }; -} -function cachePrototypeStyleFunction(key, fn) { - key = hashString(key); - var selfFn = function selfFn(ele) { - return fn.call(ele); - }; - return function cachedPrototypeStyleFunction() { - var ele = this[0]; - if (ele) { - return styleCache(key, selfFn, ele); - } - }; -} -var elesfn$4 = { - recalculateRenderedStyle: function recalculateRenderedStyle(useCache) { - var cy = this.cy(); - var renderer = cy.renderer(); - var styleEnabled = cy.styleEnabled(); - if (renderer && styleEnabled) { - renderer.recalculateRenderedStyle(this, useCache); - } - return this; - }, - dirtyStyleCache: function dirtyStyleCache() { - var cy = this.cy(); - var dirty = function dirty(ele) { - return ele._private.styleCache = null; - }; - if (cy.hasCompoundNodes()) { - var eles; - eles = this.spawnSelf().merge(this.descendants()).merge(this.parents()); - eles.merge(eles.connectedEdges()); - eles.forEach(dirty); - } else { - this.forEach(function (ele) { - dirty(ele); - ele.connectedEdges().forEach(dirty); - }); - } - return this; - }, - // fully updates (recalculates) the style for the elements - updateStyle: function updateStyle(notifyRenderer) { - var cy = this._private.cy; - if (!cy.styleEnabled()) { - return this; - } - if (cy.batching()) { - var bEles = cy._private.batchStyleEles; - bEles.merge(this); - return this; // chaining and exit early when batching - } - - var hasCompounds = cy.hasCompoundNodes(); - var updatedEles = this; - notifyRenderer = notifyRenderer || notifyRenderer === undefined ? true : false; - if (hasCompounds) { - // then add everything up and down for compound selector checks - updatedEles = this.spawnSelf().merge(this.descendants()).merge(this.parents()); - } - - // let changedEles = style.apply( updatedEles ); - var changedEles = updatedEles; - if (notifyRenderer) { - changedEles.emitAndNotify('style'); // let renderer know we changed style - } else { - changedEles.emit('style'); // just fire the event - } - - updatedEles.forEach(function (ele) { - return ele._private.styleDirty = true; - }); - return this; // chaining - }, - - // private: clears dirty flag and recalculates style - cleanStyle: function cleanStyle() { - var cy = this.cy(); - if (!cy.styleEnabled()) { - return; - } - for (var i = 0; i < this.length; i++) { - var ele = this[i]; - if (ele._private.styleDirty) { - // n.b. this flag should be set before apply() to avoid potential infinite recursion - ele._private.styleDirty = false; - cy.style().apply(ele); - } - } - }, - // get the internal parsed style object for the specified property - parsedStyle: function parsedStyle(property) { - var includeNonDefault = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; - var ele = this[0]; - var cy = ele.cy(); - if (!cy.styleEnabled()) { - return; - } - if (ele) { - this.cleanStyle(); - var overriddenStyle = ele._private.style[property]; - if (overriddenStyle != null) { - return overriddenStyle; - } else if (includeNonDefault) { - return cy.style().getDefaultProperty(property); - } else { - return null; - } - } - }, - numericStyle: function numericStyle(property) { - var ele = this[0]; - if (!ele.cy().styleEnabled()) { - return; - } - if (ele) { - var pstyle = ele.pstyle(property); - return pstyle.pfValue !== undefined ? pstyle.pfValue : pstyle.value; - } - }, - numericStyleUnits: function numericStyleUnits(property) { - var ele = this[0]; - if (!ele.cy().styleEnabled()) { - return; - } - if (ele) { - return ele.pstyle(property).units; - } - }, - // get the specified css property as a rendered value (i.e. on-screen value) - // or get the whole rendered style if no property specified (NB doesn't allow setting) - renderedStyle: function renderedStyle(property) { - var cy = this.cy(); - if (!cy.styleEnabled()) { - return this; - } - var ele = this[0]; - if (ele) { - return cy.style().getRenderedStyle(ele, property); - } - }, - // read the calculated css style of the element or override the style (via a bypass) - style: function style(name, value) { - var cy = this.cy(); - if (!cy.styleEnabled()) { - return this; - } - var updateTransitions = false; - var style = cy.style(); - if (plainObject(name)) { - // then extend the bypass - var props = name; - style.applyBypass(this, props, updateTransitions); - this.emitAndNotify('style'); // let the renderer know we've updated style - } else if (string(name)) { - if (value === undefined) { - // then get the property from the style - var ele = this[0]; - if (ele) { - return style.getStylePropertyValue(ele, name); - } else { - // empty collection => can't get any value - return; - } - } else { - // then set the bypass with the property value - style.applyBypass(this, name, value, updateTransitions); - this.emitAndNotify('style'); // let the renderer know we've updated style - } - } else if (name === undefined) { - var _ele = this[0]; - if (_ele) { - return style.getRawStyle(_ele); - } else { - // empty collection => can't get any value - return; - } - } - return this; // chaining - }, - - removeStyle: function removeStyle(names) { - var cy = this.cy(); - if (!cy.styleEnabled()) { - return this; - } - var updateTransitions = false; - var style = cy.style(); - var eles = this; - if (names === undefined) { - for (var i = 0; i < eles.length; i++) { - var ele = eles[i]; - style.removeAllBypasses(ele, updateTransitions); - } - } else { - names = names.split(/\s+/); - for (var _i = 0; _i < eles.length; _i++) { - var _ele2 = eles[_i]; - style.removeBypasses(_ele2, names, updateTransitions); - } - } - this.emitAndNotify('style'); // let the renderer know we've updated style - - return this; // chaining - }, - - show: function show() { - this.css('display', 'element'); - return this; // chaining - }, - - hide: function hide() { - this.css('display', 'none'); - return this; // chaining - }, - - effectiveOpacity: function effectiveOpacity() { - var cy = this.cy(); - if (!cy.styleEnabled()) { - return 1; - } - var hasCompoundNodes = cy.hasCompoundNodes(); - var ele = this[0]; - if (ele) { - var _p = ele._private; - var parentOpacity = ele.pstyle('opacity').value; - if (!hasCompoundNodes) { - return parentOpacity; - } - var parents = !_p.data.parent ? null : ele.parents(); - if (parents) { - for (var i = 0; i < parents.length; i++) { - var parent = parents[i]; - var opacity = parent.pstyle('opacity').value; - parentOpacity = opacity * parentOpacity; - } - } - return parentOpacity; - } - }, - transparent: function transparent() { - var cy = this.cy(); - if (!cy.styleEnabled()) { - return false; - } - var ele = this[0]; - var hasCompoundNodes = ele.cy().hasCompoundNodes(); - if (ele) { - if (!hasCompoundNodes) { - return ele.pstyle('opacity').value === 0; - } else { - return ele.effectiveOpacity() === 0; - } - } - }, - backgrounding: function backgrounding() { - var cy = this.cy(); - if (!cy.styleEnabled()) { - return false; - } - var ele = this[0]; - return ele._private.backgrounding ? true : false; - } -}; -function checkCompound(ele, parentOk) { - var _p = ele._private; - var parents = _p.data.parent ? ele.parents() : null; - if (parents) { - for (var i = 0; i < parents.length; i++) { - var parent = parents[i]; - if (!parentOk(parent)) { - return false; - } - } - } - return true; -} -function defineDerivedStateFunction(specs) { - var ok = specs.ok; - var edgeOkViaNode = specs.edgeOkViaNode || specs.ok; - var parentOk = specs.parentOk || specs.ok; - return function () { - var cy = this.cy(); - if (!cy.styleEnabled()) { - return true; - } - var ele = this[0]; - var hasCompoundNodes = cy.hasCompoundNodes(); - if (ele) { - var _p = ele._private; - if (!ok(ele)) { - return false; - } - if (ele.isNode()) { - return !hasCompoundNodes || checkCompound(ele, parentOk); - } else { - var src = _p.source; - var tgt = _p.target; - return edgeOkViaNode(src) && (!hasCompoundNodes || checkCompound(src, edgeOkViaNode)) && (src === tgt || edgeOkViaNode(tgt) && (!hasCompoundNodes || checkCompound(tgt, edgeOkViaNode))); - } - } - }; -} -var eleTakesUpSpace = cacheStyleFunction('eleTakesUpSpace', function (ele) { - return ele.pstyle('display').value === 'element' && ele.width() !== 0 && (ele.isNode() ? ele.height() !== 0 : true); -}); -elesfn$4.takesUpSpace = cachePrototypeStyleFunction('takesUpSpace', defineDerivedStateFunction({ - ok: eleTakesUpSpace -})); -var eleInteractive = cacheStyleFunction('eleInteractive', function (ele) { - return ele.pstyle('events').value === 'yes' && ele.pstyle('visibility').value === 'visible' && eleTakesUpSpace(ele); -}); -var parentInteractive = cacheStyleFunction('parentInteractive', function (parent) { - return parent.pstyle('visibility').value === 'visible' && eleTakesUpSpace(parent); -}); -elesfn$4.interactive = cachePrototypeStyleFunction('interactive', defineDerivedStateFunction({ - ok: eleInteractive, - parentOk: parentInteractive, - edgeOkViaNode: eleTakesUpSpace -})); -elesfn$4.noninteractive = function () { - var ele = this[0]; - if (ele) { - return !ele.interactive(); - } -}; -var eleVisible = cacheStyleFunction('eleVisible', function (ele) { - return ele.pstyle('visibility').value === 'visible' && ele.pstyle('opacity').pfValue !== 0 && eleTakesUpSpace(ele); -}); -var edgeVisibleViaNode = eleTakesUpSpace; -elesfn$4.visible = cachePrototypeStyleFunction('visible', defineDerivedStateFunction({ - ok: eleVisible, - edgeOkViaNode: edgeVisibleViaNode -})); -elesfn$4.hidden = function () { - var ele = this[0]; - if (ele) { - return !ele.visible(); - } -}; -elesfn$4.isBundledBezier = cachePrototypeStyleFunction('isBundledBezier', function () { - if (!this.cy().styleEnabled()) { - return false; - } - return !this.removed() && this.pstyle('curve-style').value === 'bezier' && this.takesUpSpace(); -}); -elesfn$4.bypass = elesfn$4.css = elesfn$4.style; -elesfn$4.renderedCss = elesfn$4.renderedStyle; -elesfn$4.removeBypass = elesfn$4.removeCss = elesfn$4.removeStyle; -elesfn$4.pstyle = elesfn$4.parsedStyle; - -var elesfn$3 = {}; -function defineSwitchFunction(params) { - return function () { - var args = arguments; - var changedEles = []; - - // e.g. cy.nodes().select( data, handler ) - if (args.length === 2) { - var data = args[0]; - var handler = args[1]; - this.on(params.event, data, handler); - } - - // e.g. cy.nodes().select( handler ) - else if (args.length === 1 && fn$6(args[0])) { - var _handler = args[0]; - this.on(params.event, _handler); - } - - // e.g. cy.nodes().select() - // e.g. (private) cy.nodes().select(['tapselect']) - else if (args.length === 0 || args.length === 1 && array(args[0])) { - var addlEvents = args.length === 1 ? args[0] : null; - for (var i = 0; i < this.length; i++) { - var ele = this[i]; - var able = !params.ableField || ele._private[params.ableField]; - var changed = ele._private[params.field] != params.value; - if (params.overrideAble) { - var overrideAble = params.overrideAble(ele); - if (overrideAble !== undefined) { - able = overrideAble; - if (!overrideAble) { - return this; - } // to save cycles assume not able for all on override - } - } - - if (able) { - ele._private[params.field] = params.value; - if (changed) { - changedEles.push(ele); - } - } - } - var changedColl = this.spawn(changedEles); - changedColl.updateStyle(); // change of state => possible change of style - changedColl.emit(params.event); - if (addlEvents) { - changedColl.emit(addlEvents); - } - } - return this; - }; -} -function defineSwitchSet(params) { - elesfn$3[params.field] = function () { - var ele = this[0]; - if (ele) { - if (params.overrideField) { - var val = params.overrideField(ele); - if (val !== undefined) { - return val; - } - } - return ele._private[params.field]; - } - }; - elesfn$3[params.on] = defineSwitchFunction({ - event: params.on, - field: params.field, - ableField: params.ableField, - overrideAble: params.overrideAble, - value: true - }); - elesfn$3[params.off] = defineSwitchFunction({ - event: params.off, - field: params.field, - ableField: params.ableField, - overrideAble: params.overrideAble, - value: false - }); -} -defineSwitchSet({ - field: 'locked', - overrideField: function overrideField(ele) { - return ele.cy().autolock() ? true : undefined; - }, - on: 'lock', - off: 'unlock' -}); -defineSwitchSet({ - field: 'grabbable', - overrideField: function overrideField(ele) { - return ele.cy().autoungrabify() || ele.pannable() ? false : undefined; - }, - on: 'grabify', - off: 'ungrabify' -}); -defineSwitchSet({ - field: 'selected', - ableField: 'selectable', - overrideAble: function overrideAble(ele) { - return ele.cy().autounselectify() ? false : undefined; - }, - on: 'select', - off: 'unselect' -}); -defineSwitchSet({ - field: 'selectable', - overrideField: function overrideField(ele) { - return ele.cy().autounselectify() ? false : undefined; - }, - on: 'selectify', - off: 'unselectify' -}); -elesfn$3.deselect = elesfn$3.unselect; -elesfn$3.grabbed = function () { - var ele = this[0]; - if (ele) { - return ele._private.grabbed; - } -}; -defineSwitchSet({ - field: 'active', - on: 'activate', - off: 'unactivate' -}); -defineSwitchSet({ - field: 'pannable', - on: 'panify', - off: 'unpanify' -}); -elesfn$3.inactive = function () { - var ele = this[0]; - if (ele) { - return !ele._private.active; - } -}; - -var elesfn$2 = {}; - -// DAG functions -//////////////// - -var defineDagExtremity = function defineDagExtremity(params) { - return function dagExtremityImpl(selector) { - var eles = this; - var ret = []; - for (var i = 0; i < eles.length; i++) { - var ele = eles[i]; - if (!ele.isNode()) { - continue; - } - var disqualified = false; - var edges = ele.connectedEdges(); - for (var j = 0; j < edges.length; j++) { - var edge = edges[j]; - var src = edge.source(); - var tgt = edge.target(); - if (params.noIncomingEdges && tgt === ele && src !== ele || params.noOutgoingEdges && src === ele && tgt !== ele) { - disqualified = true; - break; - } - } - if (!disqualified) { - ret.push(ele); - } - } - return this.spawn(ret, true).filter(selector); - }; -}; -var defineDagOneHop = function defineDagOneHop(params) { - return function (selector) { - var eles = this; - var oEles = []; - for (var i = 0; i < eles.length; i++) { - var ele = eles[i]; - if (!ele.isNode()) { - continue; - } - var edges = ele.connectedEdges(); - for (var j = 0; j < edges.length; j++) { - var edge = edges[j]; - var src = edge.source(); - var tgt = edge.target(); - if (params.outgoing && src === ele) { - oEles.push(edge); - oEles.push(tgt); - } else if (params.incoming && tgt === ele) { - oEles.push(edge); - oEles.push(src); - } - } - } - return this.spawn(oEles, true).filter(selector); - }; -}; -var defineDagAllHops = function defineDagAllHops(params) { - return function (selector) { - var eles = this; - var sEles = []; - var sElesIds = {}; - for (;;) { - var next = params.outgoing ? eles.outgoers() : eles.incomers(); - if (next.length === 0) { - break; - } // done if none left - - var newNext = false; - for (var i = 0; i < next.length; i++) { - var n = next[i]; - var nid = n.id(); - if (!sElesIds[nid]) { - sElesIds[nid] = true; - sEles.push(n); - newNext = true; - } - } - if (!newNext) { - break; - } // done if touched all outgoers already - - eles = next; - } - return this.spawn(sEles, true).filter(selector); - }; -}; -elesfn$2.clearTraversalCache = function () { - for (var i = 0; i < this.length; i++) { - this[i]._private.traversalCache = null; - } -}; -extend(elesfn$2, { - // get the root nodes in the DAG - roots: defineDagExtremity({ - noIncomingEdges: true - }), - // get the leaf nodes in the DAG - leaves: defineDagExtremity({ - noOutgoingEdges: true - }), - // normally called children in graph theory - // these nodes =edges=> outgoing nodes - outgoers: cache(defineDagOneHop({ - outgoing: true - }), 'outgoers'), - // aka DAG descendants - successors: defineDagAllHops({ - outgoing: true - }), - // normally called parents in graph theory - // these nodes <=edges= incoming nodes - incomers: cache(defineDagOneHop({ - incoming: true - }), 'incomers'), - // aka DAG ancestors - predecessors: defineDagAllHops({ - incoming: true - }) -}); - -// Neighbourhood functions -////////////////////////// - -extend(elesfn$2, { - neighborhood: cache(function (selector) { - var elements = []; - var nodes = this.nodes(); - for (var i = 0; i < nodes.length; i++) { - // for all nodes - var node = nodes[i]; - var connectedEdges = node.connectedEdges(); - - // for each connected edge, add the edge and the other node - for (var j = 0; j < connectedEdges.length; j++) { - var edge = connectedEdges[j]; - var src = edge.source(); - var tgt = edge.target(); - var otherNode = node === src ? tgt : src; - - // need check in case of loop - if (otherNode.length > 0) { - elements.push(otherNode[0]); // add node 1 hop away - } - - // add connected edge - elements.push(edge[0]); - } - } - return this.spawn(elements, true).filter(selector); - }, 'neighborhood'), - closedNeighborhood: function closedNeighborhood(selector) { - return this.neighborhood().add(this).filter(selector); - }, - openNeighborhood: function openNeighborhood(selector) { - return this.neighborhood(selector); - } -}); - -// aliases -elesfn$2.neighbourhood = elesfn$2.neighborhood; -elesfn$2.closedNeighbourhood = elesfn$2.closedNeighborhood; -elesfn$2.openNeighbourhood = elesfn$2.openNeighborhood; - -// Edge functions -///////////////// - -extend(elesfn$2, { - source: cache(function sourceImpl(selector) { - var ele = this[0]; - var src; - if (ele) { - src = ele._private.source || ele.cy().collection(); - } - return src && selector ? src.filter(selector) : src; - }, 'source'), - target: cache(function targetImpl(selector) { - var ele = this[0]; - var tgt; - if (ele) { - tgt = ele._private.target || ele.cy().collection(); - } - return tgt && selector ? tgt.filter(selector) : tgt; - }, 'target'), - sources: defineSourceFunction({ - attr: 'source' - }), - targets: defineSourceFunction({ - attr: 'target' - }) -}); -function defineSourceFunction(params) { - return function sourceImpl(selector) { - var sources = []; - for (var i = 0; i < this.length; i++) { - var ele = this[i]; - var src = ele._private[params.attr]; - if (src) { - sources.push(src); - } - } - return this.spawn(sources, true).filter(selector); - }; -} -extend(elesfn$2, { - edgesWith: cache(defineEdgesWithFunction(), 'edgesWith'), - edgesTo: cache(defineEdgesWithFunction({ - thisIsSrc: true - }), 'edgesTo') -}); -function defineEdgesWithFunction(params) { - return function edgesWithImpl(otherNodes) { - var elements = []; - var cy = this._private.cy; - var p = params || {}; - - // get elements if a selector is specified - if (string(otherNodes)) { - otherNodes = cy.$(otherNodes); - } - for (var h = 0; h < otherNodes.length; h++) { - var edges = otherNodes[h]._private.edges; - for (var i = 0; i < edges.length; i++) { - var edge = edges[i]; - var edgeData = edge._private.data; - var thisToOther = this.hasElementWithId(edgeData.source) && otherNodes.hasElementWithId(edgeData.target); - var otherToThis = otherNodes.hasElementWithId(edgeData.source) && this.hasElementWithId(edgeData.target); - var edgeConnectsThisAndOther = thisToOther || otherToThis; - if (!edgeConnectsThisAndOther) { - continue; - } - if (p.thisIsSrc || p.thisIsTgt) { - if (p.thisIsSrc && !thisToOther) { - continue; - } - if (p.thisIsTgt && !otherToThis) { - continue; - } - } - elements.push(edge); - } - } - return this.spawn(elements, true); - }; -} -extend(elesfn$2, { - connectedEdges: cache(function (selector) { - var retEles = []; - var eles = this; - for (var i = 0; i < eles.length; i++) { - var node = eles[i]; - if (!node.isNode()) { - continue; - } - var edges = node._private.edges; - for (var j = 0; j < edges.length; j++) { - var edge = edges[j]; - retEles.push(edge); - } - } - return this.spawn(retEles, true).filter(selector); - }, 'connectedEdges'), - connectedNodes: cache(function (selector) { - var retEles = []; - var eles = this; - for (var i = 0; i < eles.length; i++) { - var edge = eles[i]; - if (!edge.isEdge()) { - continue; - } - retEles.push(edge.source()[0]); - retEles.push(edge.target()[0]); - } - return this.spawn(retEles, true).filter(selector); - }, 'connectedNodes'), - parallelEdges: cache(defineParallelEdgesFunction(), 'parallelEdges'), - codirectedEdges: cache(defineParallelEdgesFunction({ - codirected: true - }), 'codirectedEdges') -}); -function defineParallelEdgesFunction(params) { - var defaults = { - codirected: false - }; - params = extend({}, defaults, params); - return function parallelEdgesImpl(selector) { - // micro-optimised for renderer - var elements = []; - var edges = this.edges(); - var p = params; - - // look at all the edges in the collection - for (var i = 0; i < edges.length; i++) { - var edge1 = edges[i]; - var edge1_p = edge1._private; - var src1 = edge1_p.source; - var srcid1 = src1._private.data.id; - var tgtid1 = edge1_p.data.target; - var srcEdges1 = src1._private.edges; - - // look at edges connected to the src node of this edge - for (var j = 0; j < srcEdges1.length; j++) { - var edge2 = srcEdges1[j]; - var edge2data = edge2._private.data; - var tgtid2 = edge2data.target; - var srcid2 = edge2data.source; - var codirected = tgtid2 === tgtid1 && srcid2 === srcid1; - var oppdirected = srcid1 === tgtid2 && tgtid1 === srcid2; - if (p.codirected && codirected || !p.codirected && (codirected || oppdirected)) { - elements.push(edge2); - } - } - } - return this.spawn(elements, true).filter(selector); - }; -} - -// Misc functions -///////////////// - -extend(elesfn$2, { - components: function components(root) { - var self = this; - var cy = self.cy(); - var visited = cy.collection(); - var unvisited = root == null ? self.nodes() : root.nodes(); - var components = []; - if (root != null && unvisited.empty()) { - // root may contain only edges - unvisited = root.sources(); // doesn't matter which node to use (undirected), so just use the source sides - } - - var visitInComponent = function visitInComponent(node, component) { - visited.merge(node); - unvisited.unmerge(node); - component.merge(node); - }; - if (unvisited.empty()) { - return self.spawn(); - } - var _loop = function _loop() { - // each iteration yields a component - var cmpt = cy.collection(); - components.push(cmpt); - var root = unvisited[0]; - visitInComponent(root, cmpt); - self.bfs({ - directed: false, - roots: root, - visit: function visit(v) { - return visitInComponent(v, cmpt); - } - }); - cmpt.forEach(function (node) { - node.connectedEdges().forEach(function (e) { - // connectedEdges() usually cached - if (self.has(e) && cmpt.has(e.source()) && cmpt.has(e.target())) { - // has() is cheap - cmpt.merge(e); // forEach() only considers nodes -- sets N at call time - } - }); - }); - }; - do { - _loop(); - } while (unvisited.length > 0); - return components; - }, - component: function component() { - var ele = this[0]; - return ele.cy().mutableElements().components(ele)[0]; - } -}); -elesfn$2.componentsOf = elesfn$2.components; - -// represents a set of nodes, edges, or both together -var Collection = function Collection(cy, elements) { - var unique = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; - var removed = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; - if (cy === undefined) { - error('A collection must have a reference to the core'); - return; - } - var map = new Map$2(); - var createdElements = false; - if (!elements) { - elements = []; - } else if (elements.length > 0 && plainObject(elements[0]) && !cytoscape_esm_element(elements[0])) { - createdElements = true; - - // make elements from json and restore all at once later - var eles = []; - var elesIds = new Set$1(); - for (var i = 0, l = elements.length; i < l; i++) { - var json = elements[i]; - if (json.data == null) { - json.data = {}; - } - var _data = json.data; - - // make sure newly created elements have valid ids - if (_data.id == null) { - _data.id = uuid(); - } else if (cy.hasElementWithId(_data.id) || elesIds.has(_data.id)) { - continue; // can't create element if prior id already exists - } - - var ele = new Element(cy, json, false); - eles.push(ele); - elesIds.add(_data.id); - } - elements = eles; - } - this.length = 0; - for (var _i = 0, _l = elements.length; _i < _l; _i++) { - var element$1 = elements[_i][0]; // [0] in case elements is an array of collections, rather than array of elements - if (element$1 == null) { - continue; - } - var id = element$1._private.data.id; - if (!unique || !map.has(id)) { - if (unique) { - map.set(id, { - index: this.length, - ele: element$1 - }); - } - this[this.length] = element$1; - this.length++; - } - } - this._private = { - eles: this, - cy: cy, - get map() { - if (this.lazyMap == null) { - this.rebuildMap(); - } - return this.lazyMap; - }, - set map(m) { - this.lazyMap = m; - }, - rebuildMap: function rebuildMap() { - var m = this.lazyMap = new Map$2(); - var eles = this.eles; - for (var _i2 = 0; _i2 < eles.length; _i2++) { - var _ele = eles[_i2]; - m.set(_ele.id(), { - index: _i2, - ele: _ele - }); - } - } - }; - if (unique) { - this._private.map = map; - } - - // restore the elements if we created them from json - if (createdElements && !removed) { - this.restore(); - } -}; - -// Functions -//////////////////////////////////////////////////////////////////////////////////////////////////// - -// keep the prototypes in sync (an element has the same functions as a collection) -// and use elefn and elesfn as shorthands to the prototypes -var elesfn$1 = Element.prototype = Collection.prototype = Object.create(Array.prototype); -elesfn$1.instanceString = function () { - return 'collection'; -}; -elesfn$1.spawn = function (eles, unique) { - return new Collection(this.cy(), eles, unique); -}; -elesfn$1.spawnSelf = function () { - return this.spawn(this); -}; -elesfn$1.cy = function () { - return this._private.cy; -}; -elesfn$1.renderer = function () { - return this._private.cy.renderer(); -}; -elesfn$1.element = function () { - return this[0]; -}; -elesfn$1.collection = function () { - if (collection(this)) { - return this; - } else { - // an element - return new Collection(this._private.cy, [this]); - } -}; -elesfn$1.unique = function () { - return new Collection(this._private.cy, this, true); -}; -elesfn$1.hasElementWithId = function (id) { - id = '' + id; // id must be string - - return this._private.map.has(id); -}; -elesfn$1.getElementById = function (id) { - id = '' + id; // id must be string - - var cy = this._private.cy; - var entry = this._private.map.get(id); - return entry ? entry.ele : new Collection(cy); // get ele or empty collection -}; - -elesfn$1.$id = elesfn$1.getElementById; -elesfn$1.poolIndex = function () { - var cy = this._private.cy; - var eles = cy._private.elements; - var id = this[0]._private.data.id; - return eles._private.map.get(id).index; -}; -elesfn$1.indexOf = function (ele) { - var id = ele[0]._private.data.id; - return this._private.map.get(id).index; -}; -elesfn$1.indexOfId = function (id) { - id = '' + id; // id must be string - - return this._private.map.get(id).index; -}; -elesfn$1.json = function (obj) { - var ele = this.element(); - var cy = this.cy(); - if (ele == null && obj) { - return this; - } // can't set to no eles - - if (ele == null) { - return undefined; - } // can't get from no eles - - var p = ele._private; - if (plainObject(obj)) { - // set - - cy.startBatch(); - if (obj.data) { - ele.data(obj.data); - var _data2 = p.data; - if (ele.isEdge()) { - // source and target are immutable via data() - var move = false; - var spec = {}; - var src = obj.data.source; - var tgt = obj.data.target; - if (src != null && src != _data2.source) { - spec.source = '' + src; // id must be string - move = true; - } - if (tgt != null && tgt != _data2.target) { - spec.target = '' + tgt; // id must be string - move = true; - } - if (move) { - ele = ele.move(spec); - } - } else { - // parent is immutable via data() - var newParentValSpecd = ('parent' in obj.data); - var parent = obj.data.parent; - if (newParentValSpecd && (parent != null || _data2.parent != null) && parent != _data2.parent) { - if (parent === undefined) { - // can't set undefined imperatively, so use null - parent = null; - } - if (parent != null) { - parent = '' + parent; // id must be string - } - - ele = ele.move({ - parent: parent - }); - } - } - } - if (obj.position) { - ele.position(obj.position); - } - - // ignore group -- immutable - - var checkSwitch = function checkSwitch(k, trueFnName, falseFnName) { - var obj_k = obj[k]; - if (obj_k != null && obj_k !== p[k]) { - if (obj_k) { - ele[trueFnName](); - } else { - ele[falseFnName](); - } - } - }; - checkSwitch('removed', 'remove', 'restore'); - checkSwitch('selected', 'select', 'unselect'); - checkSwitch('selectable', 'selectify', 'unselectify'); - checkSwitch('locked', 'lock', 'unlock'); - checkSwitch('grabbable', 'grabify', 'ungrabify'); - checkSwitch('pannable', 'panify', 'unpanify'); - if (obj.classes != null) { - ele.classes(obj.classes); - } - cy.endBatch(); - return this; - } else if (obj === undefined) { - // get - - var json = { - data: copy(p.data), - position: copy(p.position), - group: p.group, - removed: p.removed, - selected: p.selected, - selectable: p.selectable, - locked: p.locked, - grabbable: p.grabbable, - pannable: p.pannable, - classes: null - }; - json.classes = ''; - var i = 0; - p.classes.forEach(function (cls) { - return json.classes += i++ === 0 ? cls : ' ' + cls; - }); - return json; - } -}; -elesfn$1.jsons = function () { - var jsons = []; - for (var i = 0; i < this.length; i++) { - var ele = this[i]; - var json = ele.json(); - jsons.push(json); - } - return jsons; -}; -elesfn$1.clone = function () { - var cy = this.cy(); - var elesArr = []; - for (var i = 0; i < this.length; i++) { - var ele = this[i]; - var json = ele.json(); - var clone = new Element(cy, json, false); // NB no restore - - elesArr.push(clone); - } - return new Collection(cy, elesArr); -}; -elesfn$1.copy = elesfn$1.clone; -elesfn$1.restore = function () { - var notifyRenderer = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; - var addToPool = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; - var self = this; - var cy = self.cy(); - var cy_p = cy._private; - - // create arrays of nodes and edges, since we need to - // restore the nodes first - var nodes = []; - var edges = []; - var elements; - for (var _i3 = 0, l = self.length; _i3 < l; _i3++) { - var ele = self[_i3]; - if (addToPool && !ele.removed()) { - // don't need to handle this ele - continue; - } - - // keep nodes first in the array and edges after - if (ele.isNode()) { - // put to front of array if node - nodes.push(ele); - } else { - // put to end of array if edge - edges.push(ele); - } - } - elements = nodes.concat(edges); - var i; - var removeFromElements = function removeFromElements() { - elements.splice(i, 1); - i--; - }; - - // now, restore each element - for (i = 0; i < elements.length; i++) { - var _ele2 = elements[i]; - var _private = _ele2._private; - var _data3 = _private.data; - - // the traversal cache should start fresh when ele is added - _ele2.clearTraversalCache(); - - // set id and validate - if (!addToPool && !_private.removed) ; else if (_data3.id === undefined) { - _data3.id = uuid(); - } else if (number$1(_data3.id)) { - _data3.id = '' + _data3.id; // now it's a string - } else if (emptyString(_data3.id) || !string(_data3.id)) { - error('Can not create element with invalid string ID `' + _data3.id + '`'); - - // can't create element if it has empty string as id or non-string id - removeFromElements(); - continue; - } else if (cy.hasElementWithId(_data3.id)) { - error('Can not create second element with ID `' + _data3.id + '`'); - - // can't create element if one already has that id - removeFromElements(); - continue; - } - var id = _data3.id; // id is finalised, now let's keep a ref - - if (_ele2.isNode()) { - // extra checks for nodes - var pos = _private.position; - - // make sure the nodes have a defined position - - if (pos.x == null) { - pos.x = 0; - } - if (pos.y == null) { - pos.y = 0; - } - } - if (_ele2.isEdge()) { - // extra checks for edges - - var edge = _ele2; - var fields = ['source', 'target']; - var fieldsLength = fields.length; - var badSourceOrTarget = false; - for (var j = 0; j < fieldsLength; j++) { - var field = fields[j]; - var val = _data3[field]; - if (number$1(val)) { - val = _data3[field] = '' + _data3[field]; // now string - } - - if (val == null || val === '') { - // can't create if source or target is not defined properly - error('Can not create edge `' + id + '` with unspecified ' + field); - badSourceOrTarget = true; - } else if (!cy.hasElementWithId(val)) { - // can't create edge if one of its nodes doesn't exist - error('Can not create edge `' + id + '` with nonexistant ' + field + ' `' + val + '`'); - badSourceOrTarget = true; - } - } - if (badSourceOrTarget) { - removeFromElements(); - continue; - } // can't create this - - var src = cy.getElementById(_data3.source); - var tgt = cy.getElementById(_data3.target); - - // only one edge in node if loop - if (src.same(tgt)) { - src._private.edges.push(edge); - } else { - src._private.edges.push(edge); - tgt._private.edges.push(edge); - } - edge._private.source = src; - edge._private.target = tgt; - } // if is edge - - // create mock ids / indexes maps for element so it can be used like collections - _private.map = new Map$2(); - _private.map.set(id, { - ele: _ele2, - index: 0 - }); - _private.removed = false; - if (addToPool) { - cy.addToPool(_ele2); - } - } // for each element - - // do compound node sanity checks - for (var _i4 = 0; _i4 < nodes.length; _i4++) { - // each node - var node = nodes[_i4]; - var _data4 = node._private.data; - if (number$1(_data4.parent)) { - // then automake string - _data4.parent = '' + _data4.parent; - } - var parentId = _data4.parent; - var specifiedParent = parentId != null; - if (specifiedParent || node._private.parent) { - var parent = node._private.parent ? cy.collection().merge(node._private.parent) : cy.getElementById(parentId); - if (parent.empty()) { - // non-existant parent; just remove it - _data4.parent = undefined; - } else if (parent[0].removed()) { - warn('Node added with missing parent, reference to parent removed'); - _data4.parent = undefined; - node._private.parent = null; - } else { - var selfAsParent = false; - var ancestor = parent; - while (!ancestor.empty()) { - if (node.same(ancestor)) { - // mark self as parent and remove from data - selfAsParent = true; - _data4.parent = undefined; // remove parent reference - - // exit or we loop forever - break; - } - ancestor = ancestor.parent(); - } - if (!selfAsParent) { - // connect with children - parent[0]._private.children.push(node); - node._private.parent = parent[0]; - - // let the core know we have a compound graph - cy_p.hasCompoundNodes = true; - } - } // else - } // if specified parent - } // for each node - - if (elements.length > 0) { - var restored = elements.length === self.length ? self : new Collection(cy, elements); - for (var _i5 = 0; _i5 < restored.length; _i5++) { - var _ele3 = restored[_i5]; - if (_ele3.isNode()) { - continue; - } - - // adding an edge invalidates the traversal caches for the parallel edges - _ele3.parallelEdges().clearTraversalCache(); - - // adding an edge invalidates the traversal cache for the connected nodes - _ele3.source().clearTraversalCache(); - _ele3.target().clearTraversalCache(); - } - var toUpdateStyle; - if (cy_p.hasCompoundNodes) { - toUpdateStyle = cy.collection().merge(restored).merge(restored.connectedNodes()).merge(restored.parent()); - } else { - toUpdateStyle = restored; - } - toUpdateStyle.dirtyCompoundBoundsCache().dirtyBoundingBoxCache().updateStyle(notifyRenderer); - if (notifyRenderer) { - restored.emitAndNotify('add'); - } else if (addToPool) { - restored.emit('add'); - } - } - return self; // chainability -}; - -elesfn$1.removed = function () { - var ele = this[0]; - return ele && ele._private.removed; -}; -elesfn$1.inside = function () { - var ele = this[0]; - return ele && !ele._private.removed; -}; -elesfn$1.remove = function () { - var notifyRenderer = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; - var removeFromPool = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; - var self = this; - var elesToRemove = []; - var elesToRemoveIds = {}; - var cy = self._private.cy; - - // add connected edges - function addConnectedEdges(node) { - var edges = node._private.edges; - for (var i = 0; i < edges.length; i++) { - add(edges[i]); - } - } - - // add descendant nodes - function addChildren(node) { - var children = node._private.children; - for (var i = 0; i < children.length; i++) { - add(children[i]); - } - } - function add(ele) { - var alreadyAdded = elesToRemoveIds[ele.id()]; - if (removeFromPool && ele.removed() || alreadyAdded) { - return; - } else { - elesToRemoveIds[ele.id()] = true; - } - if (ele.isNode()) { - elesToRemove.push(ele); // nodes are removed last - - addConnectedEdges(ele); - addChildren(ele); - } else { - elesToRemove.unshift(ele); // edges are removed first - } - } - - // make the list of elements to remove - // (may be removing more than specified due to connected edges etc) - - for (var i = 0, l = self.length; i < l; i++) { - var ele = self[i]; - add(ele); - } - function removeEdgeRef(node, edge) { - var connectedEdges = node._private.edges; - removeFromArray(connectedEdges, edge); - - // removing an edges invalidates the traversal cache for its nodes - node.clearTraversalCache(); - } - function removeParallelRef(pllEdge) { - // removing an edge invalidates the traversal caches for the parallel edges - pllEdge.clearTraversalCache(); - } - var alteredParents = []; - alteredParents.ids = {}; - function removeChildRef(parent, ele) { - ele = ele[0]; - parent = parent[0]; - var children = parent._private.children; - var pid = parent.id(); - removeFromArray(children, ele); // remove parent => child ref - - ele._private.parent = null; // remove child => parent ref - - if (!alteredParents.ids[pid]) { - alteredParents.ids[pid] = true; - alteredParents.push(parent); - } - } - self.dirtyCompoundBoundsCache(); - if (removeFromPool) { - cy.removeFromPool(elesToRemove); // remove from core pool - } - - for (var _i6 = 0; _i6 < elesToRemove.length; _i6++) { - var _ele4 = elesToRemove[_i6]; - if (_ele4.isEdge()) { - // remove references to this edge in its connected nodes - var src = _ele4.source()[0]; - var tgt = _ele4.target()[0]; - removeEdgeRef(src, _ele4); - removeEdgeRef(tgt, _ele4); - var pllEdges = _ele4.parallelEdges(); - for (var j = 0; j < pllEdges.length; j++) { - var pllEdge = pllEdges[j]; - removeParallelRef(pllEdge); - if (pllEdge.isBundledBezier()) { - pllEdge.dirtyBoundingBoxCache(); - } - } - } else { - // remove reference to parent - var parent = _ele4.parent(); - if (parent.length !== 0) { - removeChildRef(parent, _ele4); - } - } - if (removeFromPool) { - // mark as removed - _ele4._private.removed = true; - } - } - - // check to see if we have a compound graph or not - var elesStillInside = cy._private.elements; - cy._private.hasCompoundNodes = false; - for (var _i7 = 0; _i7 < elesStillInside.length; _i7++) { - var _ele5 = elesStillInside[_i7]; - if (_ele5.isParent()) { - cy._private.hasCompoundNodes = true; - break; - } - } - var removedElements = new Collection(this.cy(), elesToRemove); - if (removedElements.size() > 0) { - // must manually notify since trigger won't do this automatically once removed - - if (notifyRenderer) { - removedElements.emitAndNotify('remove'); - } else if (removeFromPool) { - removedElements.emit('remove'); - } - } - - // the parents who were modified by the removal need their style updated - for (var _i8 = 0; _i8 < alteredParents.length; _i8++) { - var _ele6 = alteredParents[_i8]; - if (!removeFromPool || !_ele6.removed()) { - _ele6.updateStyle(); - } - } - return removedElements; -}; -elesfn$1.move = function (struct) { - var cy = this._private.cy; - var eles = this; - - // just clean up refs, caches, etc. in the same way as when removing and then restoring - // (our calls to remove/restore do not remove from the graph or make events) - var notifyRenderer = false; - var modifyPool = false; - var toString = function toString(id) { - return id == null ? id : '' + id; - }; // id must be string - - if (struct.source !== undefined || struct.target !== undefined) { - var srcId = toString(struct.source); - var tgtId = toString(struct.target); - var srcExists = srcId != null && cy.hasElementWithId(srcId); - var tgtExists = tgtId != null && cy.hasElementWithId(tgtId); - if (srcExists || tgtExists) { - cy.batch(function () { - // avoid duplicate style updates - eles.remove(notifyRenderer, modifyPool); // clean up refs etc. - eles.emitAndNotify('moveout'); - for (var i = 0; i < eles.length; i++) { - var ele = eles[i]; - var _data5 = ele._private.data; - if (ele.isEdge()) { - if (srcExists) { - _data5.source = srcId; - } - if (tgtExists) { - _data5.target = tgtId; - } - } - } - eles.restore(notifyRenderer, modifyPool); // make new refs, style, etc. - }); - - eles.emitAndNotify('move'); - } - } else if (struct.parent !== undefined) { - // move node to new parent - var parentId = toString(struct.parent); - var parentExists = parentId === null || cy.hasElementWithId(parentId); - if (parentExists) { - var pidToAssign = parentId === null ? undefined : parentId; - cy.batch(function () { - // avoid duplicate style updates - var updated = eles.remove(notifyRenderer, modifyPool); // clean up refs etc. - updated.emitAndNotify('moveout'); - for (var i = 0; i < eles.length; i++) { - var ele = eles[i]; - var _data6 = ele._private.data; - if (ele.isNode()) { - _data6.parent = pidToAssign; - } - } - updated.restore(notifyRenderer, modifyPool); // make new refs, style, etc. - }); - - eles.emitAndNotify('move'); - } - } - return this; -}; -[elesfn$j, elesfn$i, elesfn$h, elesfn$g, elesfn$f, data, elesfn$d, dimensions, elesfn$9, elesfn$8, elesfn$7, elesfn$6, elesfn$5, elesfn$4, elesfn$3, elesfn$2].forEach(function (props) { - extend(elesfn$1, props); -}); - -var corefn$9 = { - add: function add(opts) { - var elements; - var cy = this; - - // add the elements - if (elementOrCollection(opts)) { - var eles = opts; - if (eles._private.cy === cy) { - // same instance => just restore - elements = eles.restore(); - } else { - // otherwise, copy from json - var jsons = []; - for (var i = 0; i < eles.length; i++) { - var ele = eles[i]; - jsons.push(ele.json()); - } - elements = new Collection(cy, jsons); - } - } - - // specify an array of options - else if (array(opts)) { - var _jsons = opts; - elements = new Collection(cy, _jsons); - } - - // specify via opts.nodes and opts.edges - else if (plainObject(opts) && (array(opts.nodes) || array(opts.edges))) { - var elesByGroup = opts; - var _jsons2 = []; - var grs = ['nodes', 'edges']; - for (var _i = 0, il = grs.length; _i < il; _i++) { - var group = grs[_i]; - var elesArray = elesByGroup[group]; - if (array(elesArray)) { - for (var j = 0, jl = elesArray.length; j < jl; j++) { - var json = extend({ - group: group - }, elesArray[j]); - _jsons2.push(json); - } - } - } - elements = new Collection(cy, _jsons2); - } - - // specify options for one element - else { - var _json = opts; - elements = new Element(cy, _json).collection(); - } - return elements; - }, - remove: function remove(collection) { - if (elementOrCollection(collection)) ; else if (string(collection)) { - var selector = collection; - collection = this.$(selector); - } - return collection.remove(); - } -}; - -/* global Float32Array */ - -/*! Bezier curve function generator. Copyright Gaetan Renaudeau. MIT License: http://en.wikipedia.org/wiki/MIT_License */ -function generateCubicBezier(mX1, mY1, mX2, mY2) { - var NEWTON_ITERATIONS = 4, - NEWTON_MIN_SLOPE = 0.001, - SUBDIVISION_PRECISION = 0.0000001, - SUBDIVISION_MAX_ITERATIONS = 10, - kSplineTableSize = 11, - kSampleStepSize = 1.0 / (kSplineTableSize - 1.0), - float32ArraySupported = typeof Float32Array !== 'undefined'; - - /* Must contain four arguments. */ - if (arguments.length !== 4) { - return false; - } - - /* Arguments must be numbers. */ - for (var i = 0; i < 4; ++i) { - if (typeof arguments[i] !== "number" || isNaN(arguments[i]) || !isFinite(arguments[i])) { - return false; - } - } - - /* X values must be in the [0, 1] range. */ - mX1 = Math.min(mX1, 1); - mX2 = Math.min(mX2, 1); - mX1 = Math.max(mX1, 0); - mX2 = Math.max(mX2, 0); - var mSampleValues = float32ArraySupported ? new Float32Array(kSplineTableSize) : new Array(kSplineTableSize); - function A(aA1, aA2) { - return 1.0 - 3.0 * aA2 + 3.0 * aA1; - } - function B(aA1, aA2) { - return 3.0 * aA2 - 6.0 * aA1; - } - function C(aA1) { - return 3.0 * aA1; - } - function calcBezier(aT, aA1, aA2) { - return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT; - } - function getSlope(aT, aA1, aA2) { - return 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1); - } - function newtonRaphsonIterate(aX, aGuessT) { - for (var _i = 0; _i < NEWTON_ITERATIONS; ++_i) { - var currentSlope = getSlope(aGuessT, mX1, mX2); - if (currentSlope === 0.0) { - return aGuessT; - } - var currentX = calcBezier(aGuessT, mX1, mX2) - aX; - aGuessT -= currentX / currentSlope; - } - return aGuessT; - } - function calcSampleValues() { - for (var _i2 = 0; _i2 < kSplineTableSize; ++_i2) { - mSampleValues[_i2] = calcBezier(_i2 * kSampleStepSize, mX1, mX2); - } - } - function binarySubdivide(aX, aA, aB) { - var currentX, - currentT, - i = 0; - do { - currentT = aA + (aB - aA) / 2.0; - currentX = calcBezier(currentT, mX1, mX2) - aX; - if (currentX > 0.0) { - aB = currentT; - } else { - aA = currentT; - } - } while (Math.abs(currentX) > SUBDIVISION_PRECISION && ++i < SUBDIVISION_MAX_ITERATIONS); - return currentT; - } - function getTForX(aX) { - var intervalStart = 0.0, - currentSample = 1, - lastSample = kSplineTableSize - 1; - for (; currentSample !== lastSample && mSampleValues[currentSample] <= aX; ++currentSample) { - intervalStart += kSampleStepSize; - } - --currentSample; - var dist = (aX - mSampleValues[currentSample]) / (mSampleValues[currentSample + 1] - mSampleValues[currentSample]), - guessForT = intervalStart + dist * kSampleStepSize, - initialSlope = getSlope(guessForT, mX1, mX2); - if (initialSlope >= NEWTON_MIN_SLOPE) { - return newtonRaphsonIterate(aX, guessForT); - } else if (initialSlope === 0.0) { - return guessForT; - } else { - return binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize); - } - } - var _precomputed = false; - function precompute() { - _precomputed = true; - if (mX1 !== mY1 || mX2 !== mY2) { - calcSampleValues(); - } - } - var f = function f(aX) { - if (!_precomputed) { - precompute(); - } - if (mX1 === mY1 && mX2 === mY2) { - return aX; - } - if (aX === 0) { - return 0; - } - if (aX === 1) { - return 1; - } - return calcBezier(getTForX(aX), mY1, mY2); - }; - f.getControlPoints = function () { - return [{ - x: mX1, - y: mY1 - }, { - x: mX2, - y: mY2 - }]; - }; - var str = "generateBezier(" + [mX1, mY1, mX2, mY2] + ")"; - f.toString = function () { - return str; - }; - return f; -} - -/*! Runge-Kutta spring physics function generator. Adapted from Framer.js, copyright Koen Bok. MIT License: http://en.wikipedia.org/wiki/MIT_License */ -/* Given a tension, friction, and duration, a simulation at 60FPS will first run without a defined duration in order to calculate the full path. A second pass - then adjusts the time delta -- using the relation between actual time and duration -- to calculate the path for the duration-constrained animation. */ -var generateSpringRK4 = function () { - function springAccelerationForState(state) { - return -state.tension * state.x - state.friction * state.v; - } - function springEvaluateStateWithDerivative(initialState, dt, derivative) { - var state = { - x: initialState.x + derivative.dx * dt, - v: initialState.v + derivative.dv * dt, - tension: initialState.tension, - friction: initialState.friction - }; - return { - dx: state.v, - dv: springAccelerationForState(state) - }; - } - function springIntegrateState(state, dt) { - var a = { - dx: state.v, - dv: springAccelerationForState(state) - }, - b = springEvaluateStateWithDerivative(state, dt * 0.5, a), - c = springEvaluateStateWithDerivative(state, dt * 0.5, b), - d = springEvaluateStateWithDerivative(state, dt, c), - dxdt = 1.0 / 6.0 * (a.dx + 2.0 * (b.dx + c.dx) + d.dx), - dvdt = 1.0 / 6.0 * (a.dv + 2.0 * (b.dv + c.dv) + d.dv); - state.x = state.x + dxdt * dt; - state.v = state.v + dvdt * dt; - return state; - } - return function springRK4Factory(tension, friction, duration) { - var initState = { - x: -1, - v: 0, - tension: null, - friction: null - }, - path = [0], - time_lapsed = 0, - tolerance = 1 / 10000, - DT = 16 / 1000, - have_duration, - dt, - last_state; - tension = parseFloat(tension) || 500; - friction = parseFloat(friction) || 20; - duration = duration || null; - initState.tension = tension; - initState.friction = friction; - have_duration = duration !== null; - - /* Calculate the actual time it takes for this animation to complete with the provided conditions. */ - if (have_duration) { - /* Run the simulation without a duration. */ - time_lapsed = springRK4Factory(tension, friction); - /* Compute the adjusted time delta. */ - dt = time_lapsed / duration * DT; - } else { - dt = DT; - } - for (;;) { - /* Next/step function .*/ - last_state = springIntegrateState(last_state || initState, dt); - /* Store the position. */ - path.push(1 + last_state.x); - time_lapsed += 16; - /* If the change threshold is reached, break. */ - if (!(Math.abs(last_state.x) > tolerance && Math.abs(last_state.v) > tolerance)) { - break; - } - } - - /* If duration is not defined, return the actual time required for completing this animation. Otherwise, return a closure that holds the - computed path and returns a snapshot of the position according to a given percentComplete. */ - return !have_duration ? time_lapsed : function (percentComplete) { - return path[percentComplete * (path.length - 1) | 0]; - }; - }; -}(); - -var cubicBezier = function cubicBezier(t1, p1, t2, p2) { - var bezier = generateCubicBezier(t1, p1, t2, p2); - return function (start, end, percent) { - return start + (end - start) * bezier(percent); - }; -}; -var easings = { - 'linear': function linear(start, end, percent) { - return start + (end - start) * percent; - }, - // default easings - 'ease': cubicBezier(0.25, 0.1, 0.25, 1), - 'ease-in': cubicBezier(0.42, 0, 1, 1), - 'ease-out': cubicBezier(0, 0, 0.58, 1), - 'ease-in-out': cubicBezier(0.42, 0, 0.58, 1), - // sine - 'ease-in-sine': cubicBezier(0.47, 0, 0.745, 0.715), - 'ease-out-sine': cubicBezier(0.39, 0.575, 0.565, 1), - 'ease-in-out-sine': cubicBezier(0.445, 0.05, 0.55, 0.95), - // quad - 'ease-in-quad': cubicBezier(0.55, 0.085, 0.68, 0.53), - 'ease-out-quad': cubicBezier(0.25, 0.46, 0.45, 0.94), - 'ease-in-out-quad': cubicBezier(0.455, 0.03, 0.515, 0.955), - // cubic - 'ease-in-cubic': cubicBezier(0.55, 0.055, 0.675, 0.19), - 'ease-out-cubic': cubicBezier(0.215, 0.61, 0.355, 1), - 'ease-in-out-cubic': cubicBezier(0.645, 0.045, 0.355, 1), - // quart - 'ease-in-quart': cubicBezier(0.895, 0.03, 0.685, 0.22), - 'ease-out-quart': cubicBezier(0.165, 0.84, 0.44, 1), - 'ease-in-out-quart': cubicBezier(0.77, 0, 0.175, 1), - // quint - 'ease-in-quint': cubicBezier(0.755, 0.05, 0.855, 0.06), - 'ease-out-quint': cubicBezier(0.23, 1, 0.32, 1), - 'ease-in-out-quint': cubicBezier(0.86, 0, 0.07, 1), - // expo - 'ease-in-expo': cubicBezier(0.95, 0.05, 0.795, 0.035), - 'ease-out-expo': cubicBezier(0.19, 1, 0.22, 1), - 'ease-in-out-expo': cubicBezier(1, 0, 0, 1), - // circ - 'ease-in-circ': cubicBezier(0.6, 0.04, 0.98, 0.335), - 'ease-out-circ': cubicBezier(0.075, 0.82, 0.165, 1), - 'ease-in-out-circ': cubicBezier(0.785, 0.135, 0.15, 0.86), - // user param easings... - - 'spring': function spring(tension, friction, duration) { - if (duration === 0) { - // can't get a spring w/ duration 0 - return easings.linear; // duration 0 => jump to end so impl doesn't matter - } - - var spring = generateSpringRK4(tension, friction, duration); - return function (start, end, percent) { - return start + (end - start) * spring(percent); - }; - }, - 'cubic-bezier': cubicBezier -}; - -function getEasedValue(type, start, end, percent, easingFn) { - if (percent === 1) { - return end; - } - if (start === end) { - return end; - } - var val = easingFn(start, end, percent); - if (type == null) { - return val; - } - if (type.roundValue || type.color) { - val = Math.round(val); - } - if (type.min !== undefined) { - val = Math.max(val, type.min); - } - if (type.max !== undefined) { - val = Math.min(val, type.max); - } - return val; -} -function getValue(prop, spec) { - if (prop.pfValue != null || prop.value != null) { - if (prop.pfValue != null && (spec == null || spec.type.units !== '%')) { - return prop.pfValue; - } else { - return prop.value; - } - } else { - return prop; - } -} -function ease(startProp, endProp, percent, easingFn, propSpec) { - var type = propSpec != null ? propSpec.type : null; - if (percent < 0) { - percent = 0; - } else if (percent > 1) { - percent = 1; - } - var start = getValue(startProp, propSpec); - var end = getValue(endProp, propSpec); - if (number$1(start) && number$1(end)) { - return getEasedValue(type, start, end, percent, easingFn); - } else if (array(start) && array(end)) { - var easedArr = []; - for (var i = 0; i < end.length; i++) { - var si = start[i]; - var ei = end[i]; - if (si != null && ei != null) { - var val = getEasedValue(type, si, ei, percent, easingFn); - easedArr.push(val); - } else { - easedArr.push(ei); - } - } - return easedArr; - } - return undefined; -} - -function step$1(self, ani, now, isCore) { - var isEles = !isCore; - var _p = self._private; - var ani_p = ani._private; - var pEasing = ani_p.easing; - var startTime = ani_p.startTime; - var cy = isCore ? self : self.cy(); - var style = cy.style(); - if (!ani_p.easingImpl) { - if (pEasing == null) { - // use default - ani_p.easingImpl = easings['linear']; - } else { - // then define w/ name - var easingVals; - if (string(pEasing)) { - var easingProp = style.parse('transition-timing-function', pEasing); - easingVals = easingProp.value; - } else { - // then assume preparsed array - easingVals = pEasing; - } - var name, args; - if (string(easingVals)) { - name = easingVals; - args = []; - } else { - name = easingVals[1]; - args = easingVals.slice(2).map(function (n) { - return +n; - }); - } - if (args.length > 0) { - // create with args - if (name === 'spring') { - args.push(ani_p.duration); // need duration to generate spring - } - - ani_p.easingImpl = easings[name].apply(null, args); - } else { - // static impl by name - ani_p.easingImpl = easings[name]; - } - } - } - var easing = ani_p.easingImpl; - var percent; - if (ani_p.duration === 0) { - percent = 1; - } else { - percent = (now - startTime) / ani_p.duration; - } - if (ani_p.applying) { - percent = ani_p.progress; - } - if (percent < 0) { - percent = 0; - } else if (percent > 1) { - percent = 1; - } - if (ani_p.delay == null) { - // then update - - var startPos = ani_p.startPosition; - var endPos = ani_p.position; - if (endPos && isEles && !self.locked()) { - var newPos = {}; - if (valid(startPos.x, endPos.x)) { - newPos.x = ease(startPos.x, endPos.x, percent, easing); - } - if (valid(startPos.y, endPos.y)) { - newPos.y = ease(startPos.y, endPos.y, percent, easing); - } - self.position(newPos); - } - var startPan = ani_p.startPan; - var endPan = ani_p.pan; - var pan = _p.pan; - var animatingPan = endPan != null && isCore; - if (animatingPan) { - if (valid(startPan.x, endPan.x)) { - pan.x = ease(startPan.x, endPan.x, percent, easing); - } - if (valid(startPan.y, endPan.y)) { - pan.y = ease(startPan.y, endPan.y, percent, easing); - } - self.emit('pan'); - } - var startZoom = ani_p.startZoom; - var endZoom = ani_p.zoom; - var animatingZoom = endZoom != null && isCore; - if (animatingZoom) { - if (valid(startZoom, endZoom)) { - _p.zoom = bound(_p.minZoom, ease(startZoom, endZoom, percent, easing), _p.maxZoom); - } - self.emit('zoom'); - } - if (animatingPan || animatingZoom) { - self.emit('viewport'); - } - var props = ani_p.style; - if (props && props.length > 0 && isEles) { - for (var i = 0; i < props.length; i++) { - var prop = props[i]; - var _name = prop.name; - var end = prop; - var start = ani_p.startStyle[_name]; - var propSpec = style.properties[start.name]; - var easedVal = ease(start, end, percent, easing, propSpec); - style.overrideBypass(self, _name, easedVal); - } // for props - - self.emit('style'); - } // if - } - - ani_p.progress = percent; - return percent; -} -function valid(start, end) { - if (start == null || end == null) { - return false; - } - if (number$1(start) && number$1(end)) { - return true; - } else if (start && end) { - return true; - } - return false; -} - -function startAnimation(self, ani, now, isCore) { - var ani_p = ani._private; - ani_p.started = true; - ani_p.startTime = now - ani_p.progress * ani_p.duration; -} - -function stepAll(now, cy) { - var eles = cy._private.aniEles; - var doneEles = []; - function stepOne(ele, isCore) { - var _p = ele._private; - var current = _p.animation.current; - var queue = _p.animation.queue; - var ranAnis = false; - - // if nothing currently animating, get something from the queue - if (current.length === 0) { - var next = queue.shift(); - if (next) { - current.push(next); - } - } - var callbacks = function callbacks(_callbacks) { - for (var j = _callbacks.length - 1; j >= 0; j--) { - var cb = _callbacks[j]; - cb(); - } - _callbacks.splice(0, _callbacks.length); - }; - - // step and remove if done - for (var i = current.length - 1; i >= 0; i--) { - var ani = current[i]; - var ani_p = ani._private; - if (ani_p.stopped) { - current.splice(i, 1); - ani_p.hooked = false; - ani_p.playing = false; - ani_p.started = false; - callbacks(ani_p.frames); - continue; - } - if (!ani_p.playing && !ani_p.applying) { - continue; - } - - // an apply() while playing shouldn't do anything - if (ani_p.playing && ani_p.applying) { - ani_p.applying = false; - } - if (!ani_p.started) { - startAnimation(ele, ani, now); - } - step$1(ele, ani, now, isCore); - if (ani_p.applying) { - ani_p.applying = false; - } - callbacks(ani_p.frames); - if (ani_p.step != null) { - ani_p.step(now); - } - if (ani.completed()) { - current.splice(i, 1); - ani_p.hooked = false; - ani_p.playing = false; - ani_p.started = false; - callbacks(ani_p.completes); - } - ranAnis = true; - } - if (!isCore && current.length === 0 && queue.length === 0) { - doneEles.push(ele); - } - return ranAnis; - } // stepElement - - // handle all eles - var ranEleAni = false; - for (var e = 0; e < eles.length; e++) { - var ele = eles[e]; - var handledThisEle = stepOne(ele); - ranEleAni = ranEleAni || handledThisEle; - } // each element - - var ranCoreAni = stepOne(cy, true); - - // notify renderer - if (ranEleAni || ranCoreAni) { - if (eles.length > 0) { - cy.notify('draw', eles); - } else { - cy.notify('draw'); - } - } - - // remove elements from list of currently animating if its queues are empty - eles.unmerge(doneEles); - cy.emit('step'); -} // stepAll - -var corefn$8 = { - // pull in animation functions - animate: cytoscape_esm_define.animate(), - animation: cytoscape_esm_define.animation(), - animated: cytoscape_esm_define.animated(), - clearQueue: cytoscape_esm_define.clearQueue(), - delay: cytoscape_esm_define.delay(), - delayAnimation: cytoscape_esm_define.delayAnimation(), - stop: cytoscape_esm_define.stop(), - addToAnimationPool: function addToAnimationPool(eles) { - var cy = this; - if (!cy.styleEnabled()) { - return; - } // save cycles when no style used - - cy._private.aniEles.merge(eles); - }, - stopAnimationLoop: function stopAnimationLoop() { - this._private.animationsRunning = false; - }, - startAnimationLoop: function startAnimationLoop() { - var cy = this; - cy._private.animationsRunning = true; - if (!cy.styleEnabled()) { - return; - } // save cycles when no style used - - // NB the animation loop will exec in headless environments if style enabled - // and explicit cy.destroy() is necessary to stop the loop - - function headlessStep() { - if (!cy._private.animationsRunning) { - return; - } - requestAnimationFrame(function animationStep(now) { - stepAll(now, cy); - headlessStep(); - }); - } - var renderer = cy.renderer(); - if (renderer && renderer.beforeRender) { - // let the renderer schedule animations - renderer.beforeRender(function rendererAnimationStep(willDraw, now) { - stepAll(now, cy); - }, renderer.beforeRenderPriorities.animations); - } else { - // manage the animation loop ourselves - headlessStep(); // first call - } - } -}; - -var emitterOptions = { - qualifierCompare: function qualifierCompare(selector1, selector2) { - if (selector1 == null || selector2 == null) { - return selector1 == null && selector2 == null; - } else { - return selector1.sameText(selector2); - } - }, - eventMatches: function eventMatches(cy, listener, eventObj) { - var selector = listener.qualifier; - if (selector != null) { - return cy !== eventObj.target && cytoscape_esm_element(eventObj.target) && selector.matches(eventObj.target); - } - return true; - }, - addEventFields: function addEventFields(cy, evt) { - evt.cy = cy; - evt.target = cy; - }, - callbackContext: function callbackContext(cy, listener, eventObj) { - return listener.qualifier != null ? eventObj.target : cy; - } -}; -var argSelector = function argSelector(arg) { - if (string(arg)) { - return new Selector(arg); - } else { - return arg; - } -}; -var elesfn = { - createEmitter: function createEmitter() { - var _p = this._private; - if (!_p.emitter) { - _p.emitter = new Emitter(emitterOptions, this); - } - return this; - }, - emitter: function emitter() { - return this._private.emitter; - }, - on: function on(events, selector, callback) { - this.emitter().on(events, argSelector(selector), callback); - return this; - }, - removeListener: function removeListener(events, selector, callback) { - this.emitter().removeListener(events, argSelector(selector), callback); - return this; - }, - removeAllListeners: function removeAllListeners() { - this.emitter().removeAllListeners(); - return this; - }, - one: function one(events, selector, callback) { - this.emitter().one(events, argSelector(selector), callback); - return this; - }, - once: function once(events, selector, callback) { - this.emitter().one(events, argSelector(selector), callback); - return this; - }, - emit: function emit(events, extraParams) { - this.emitter().emit(events, extraParams); - return this; - }, - emitAndNotify: function emitAndNotify(event, eles) { - this.emit(event); - this.notify(event, eles); - return this; - } -}; -cytoscape_esm_define.eventAliasesOn(elesfn); - -var corefn$7 = { - png: function png(options) { - var renderer = this._private.renderer; - options = options || {}; - return renderer.png(options); - }, - jpg: function jpg(options) { - var renderer = this._private.renderer; - options = options || {}; - options.bg = options.bg || '#fff'; - return renderer.jpg(options); - } -}; -corefn$7.jpeg = corefn$7.jpg; - -var corefn$6 = { - layout: function layout(options) { - var cy = this; - if (options == null) { - error('Layout options must be specified to make a layout'); - return; - } - if (options.name == null) { - error('A `name` must be specified to make a layout'); - return; - } - var name = options.name; - var Layout = cy.extension('layout', name); - if (Layout == null) { - error('No such layout `' + name + '` found. Did you forget to import it and `cytoscape.use()` it?'); - return; - } - var eles; - if (string(options.eles)) { - eles = cy.$(options.eles); - } else { - eles = options.eles != null ? options.eles : cy.$(); - } - var layout = new Layout(extend({}, options, { - cy: cy, - eles: eles - })); - return layout; - } -}; -corefn$6.createLayout = corefn$6.makeLayout = corefn$6.layout; - -var corefn$5 = { - notify: function notify(eventName, eventEles) { - var _p = this._private; - if (this.batching()) { - _p.batchNotifications = _p.batchNotifications || {}; - var eles = _p.batchNotifications[eventName] = _p.batchNotifications[eventName] || this.collection(); - if (eventEles != null) { - eles.merge(eventEles); - } - return; // notifications are disabled during batching - } - - if (!_p.notificationsEnabled) { - return; - } // exit on disabled - - var renderer = this.renderer(); - - // exit if destroy() called on core or renderer in between frames #1499 #1528 - if (this.destroyed() || !renderer) { - return; - } - renderer.notify(eventName, eventEles); - }, - notifications: function notifications(bool) { - var p = this._private; - if (bool === undefined) { - return p.notificationsEnabled; - } else { - p.notificationsEnabled = bool ? true : false; - } - return this; - }, - noNotifications: function noNotifications(callback) { - this.notifications(false); - callback(); - this.notifications(true); - }, - batching: function batching() { - return this._private.batchCount > 0; - }, - startBatch: function startBatch() { - var _p = this._private; - if (_p.batchCount == null) { - _p.batchCount = 0; - } - if (_p.batchCount === 0) { - _p.batchStyleEles = this.collection(); - _p.batchNotifications = {}; - } - _p.batchCount++; - return this; - }, - endBatch: function endBatch() { - var _p = this._private; - if (_p.batchCount === 0) { - return this; - } - _p.batchCount--; - if (_p.batchCount === 0) { - // update style for dirty eles - _p.batchStyleEles.updateStyle(); - var renderer = this.renderer(); - - // notify the renderer of queued eles and event types - Object.keys(_p.batchNotifications).forEach(function (eventName) { - var eles = _p.batchNotifications[eventName]; - if (eles.empty()) { - renderer.notify(eventName); - } else { - renderer.notify(eventName, eles); - } - }); - } - return this; - }, - batch: function batch(callback) { - this.startBatch(); - callback(); - this.endBatch(); - return this; - }, - // for backwards compatibility - batchData: function batchData(map) { - var cy = this; - return this.batch(function () { - var ids = Object.keys(map); - for (var i = 0; i < ids.length; i++) { - var id = ids[i]; - var data = map[id]; - var ele = cy.getElementById(id); - ele.data(data); - } - }); - } -}; - -var rendererDefaults = defaults$g({ - hideEdgesOnViewport: false, - textureOnViewport: false, - motionBlur: false, - motionBlurOpacity: 0.05, - pixelRatio: undefined, - desktopTapThreshold: 4, - touchTapThreshold: 8, - wheelSensitivity: 1, - debug: false, - showFps: false -}); -var corefn$4 = { - renderTo: function renderTo(context, zoom, pan, pxRatio) { - var r = this._private.renderer; - r.renderTo(context, zoom, pan, pxRatio); - return this; - }, - renderer: function renderer() { - return this._private.renderer; - }, - forceRender: function forceRender() { - this.notify('draw'); - return this; - }, - resize: function resize() { - this.invalidateSize(); - this.emitAndNotify('resize'); - return this; - }, - initRenderer: function initRenderer(options) { - var cy = this; - var RendererProto = cy.extension('renderer', options.name); - if (RendererProto == null) { - error("Can not initialise: No such renderer `".concat(options.name, "` found. Did you forget to import it and `cytoscape.use()` it?")); - return; - } - if (options.wheelSensitivity !== undefined) { - warn("You have set a custom wheel sensitivity. This will make your app zoom unnaturally when using mainstream mice. You should change this value from the default only if you can guarantee that all your users will use the same hardware and OS configuration as your current machine."); - } - var rOpts = rendererDefaults(options); - rOpts.cy = cy; - cy._private.renderer = new RendererProto(rOpts); - this.notify('init'); - }, - destroyRenderer: function destroyRenderer() { - var cy = this; - cy.notify('destroy'); // destroy the renderer - - var domEle = cy.container(); - if (domEle) { - domEle._cyreg = null; - while (domEle.childNodes.length > 0) { - domEle.removeChild(domEle.childNodes[0]); - } - } - cy._private.renderer = null; // to be extra safe, remove the ref - cy.mutableElements().forEach(function (ele) { - var _p = ele._private; - _p.rscratch = {}; - _p.rstyle = {}; - _p.animation.current = []; - _p.animation.queue = []; - }); - }, - onRender: function onRender(fn) { - return this.on('render', fn); - }, - offRender: function offRender(fn) { - return this.off('render', fn); - } -}; -corefn$4.invalidateDimensions = corefn$4.resize; - -var corefn$3 = { - // get a collection - // - empty collection on no args - // - collection of elements in the graph on selector arg - // - guarantee a returned collection when elements or collection specified - collection: function collection(eles, opts) { - if (string(eles)) { - return this.$(eles); - } else if (elementOrCollection(eles)) { - return eles.collection(); - } else if (array(eles)) { - if (!opts) { - opts = {}; - } - return new Collection(this, eles, opts.unique, opts.removed); - } - return new Collection(this); - }, - nodes: function nodes(selector) { - var nodes = this.$(function (ele) { - return ele.isNode(); - }); - if (selector) { - return nodes.filter(selector); - } - return nodes; - }, - edges: function edges(selector) { - var edges = this.$(function (ele) { - return ele.isEdge(); - }); - if (selector) { - return edges.filter(selector); - } - return edges; - }, - // search the graph like jQuery - $: function $(selector) { - var eles = this._private.elements; - if (selector) { - return eles.filter(selector); - } else { - return eles.spawnSelf(); - } - }, - mutableElements: function mutableElements() { - return this._private.elements; - } -}; - -// aliases -corefn$3.elements = corefn$3.filter = corefn$3.$; - -var styfn$8 = {}; - -// keys for style blocks, e.g. ttfftt -var TRUE = 't'; -var FALSE = 'f'; - -// (potentially expensive calculation) -// apply the style to the element based on -// - its bypass -// - what selectors match it -styfn$8.apply = function (eles) { - var self = this; - var _p = self._private; - var cy = _p.cy; - var updatedEles = cy.collection(); - for (var ie = 0; ie < eles.length; ie++) { - var ele = eles[ie]; - var cxtMeta = self.getContextMeta(ele); - if (cxtMeta.empty) { - continue; - } - var cxtStyle = self.getContextStyle(cxtMeta); - var app = self.applyContextStyle(cxtMeta, cxtStyle, ele); - if (ele._private.appliedInitStyle) { - self.updateTransitions(ele, app.diffProps); - } else { - ele._private.appliedInitStyle = true; - } - var hintsDiff = self.updateStyleHints(ele); - if (hintsDiff) { - updatedEles.push(ele); - } - } // for elements - - return updatedEles; -}; -styfn$8.getPropertiesDiff = function (oldCxtKey, newCxtKey) { - var self = this; - var cache = self._private.propDiffs = self._private.propDiffs || {}; - var dualCxtKey = oldCxtKey + '-' + newCxtKey; - var cachedVal = cache[dualCxtKey]; - if (cachedVal) { - return cachedVal; - } - var diffProps = []; - var addedProp = {}; - for (var i = 0; i < self.length; i++) { - var cxt = self[i]; - var oldHasCxt = oldCxtKey[i] === TRUE; - var newHasCxt = newCxtKey[i] === TRUE; - var cxtHasDiffed = oldHasCxt !== newHasCxt; - var cxtHasMappedProps = cxt.mappedProperties.length > 0; - if (cxtHasDiffed || newHasCxt && cxtHasMappedProps) { - var props = void 0; - if (cxtHasDiffed && cxtHasMappedProps) { - props = cxt.properties; // suffices b/c mappedProperties is a subset of properties - } else if (cxtHasDiffed) { - props = cxt.properties; // need to check them all - } else if (cxtHasMappedProps) { - props = cxt.mappedProperties; // only need to check mapped - } - - for (var j = 0; j < props.length; j++) { - var prop = props[j]; - var name = prop.name; - - // if a later context overrides this property, then the fact that this context has switched/diffed doesn't matter - // (semi expensive check since it makes this function O(n^2) on context length, but worth it since overall result - // is cached) - var laterCxtOverrides = false; - for (var k = i + 1; k < self.length; k++) { - var laterCxt = self[k]; - var hasLaterCxt = newCxtKey[k] === TRUE; - if (!hasLaterCxt) { - continue; - } // can't override unless the context is active - - laterCxtOverrides = laterCxt.properties[prop.name] != null; - if (laterCxtOverrides) { - break; - } // exit early as long as one later context overrides - } - - if (!addedProp[name] && !laterCxtOverrides) { - addedProp[name] = true; - diffProps.push(name); - } - } // for props - } // if - } // for contexts - - cache[dualCxtKey] = diffProps; - return diffProps; -}; -styfn$8.getContextMeta = function (ele) { - var self = this; - var cxtKey = ''; - var diffProps; - var prevKey = ele._private.styleCxtKey || ''; - - // get the cxt key - for (var i = 0; i < self.length; i++) { - var context = self[i]; - var contextSelectorMatches = context.selector && context.selector.matches(ele); // NB: context.selector may be null for 'core' - - if (contextSelectorMatches) { - cxtKey += TRUE; - } else { - cxtKey += FALSE; - } - } // for context - - diffProps = self.getPropertiesDiff(prevKey, cxtKey); - ele._private.styleCxtKey = cxtKey; - return { - key: cxtKey, - diffPropNames: diffProps, - empty: diffProps.length === 0 - }; -}; - -// gets a computed ele style object based on matched contexts -styfn$8.getContextStyle = function (cxtMeta) { - var cxtKey = cxtMeta.key; - var self = this; - var cxtStyles = this._private.contextStyles = this._private.contextStyles || {}; - - // if already computed style, returned cached copy - if (cxtStyles[cxtKey]) { - return cxtStyles[cxtKey]; - } - var style = { - _private: { - key: cxtKey - } - }; - for (var i = 0; i < self.length; i++) { - var cxt = self[i]; - var hasCxt = cxtKey[i] === TRUE; - if (!hasCxt) { - continue; - } - for (var j = 0; j < cxt.properties.length; j++) { - var prop = cxt.properties[j]; - style[prop.name] = prop; - } - } - cxtStyles[cxtKey] = style; - return style; -}; -styfn$8.applyContextStyle = function (cxtMeta, cxtStyle, ele) { - var self = this; - var diffProps = cxtMeta.diffPropNames; - var retDiffProps = {}; - var types = self.types; - for (var i = 0; i < diffProps.length; i++) { - var diffPropName = diffProps[i]; - var cxtProp = cxtStyle[diffPropName]; - var eleProp = ele.pstyle(diffPropName); - if (!cxtProp) { - // no context prop means delete - if (!eleProp) { - continue; // no existing prop means nothing needs to be removed - // nb affects initial application on mapped values like control-point-distances - } else if (eleProp.bypass) { - cxtProp = { - name: diffPropName, - deleteBypassed: true - }; - } else { - cxtProp = { - name: diffPropName, - "delete": true - }; - } - } - - // save cycles when the context prop doesn't need to be applied - if (eleProp === cxtProp) { - continue; - } - - // save cycles when a mapped context prop doesn't need to be applied - if (cxtProp.mapped === types.fn // context prop is function mapper - && eleProp != null // some props can be null even by default (e.g. a prop that overrides another one) - && eleProp.mapping != null // ele prop is a concrete value from from a mapper - && eleProp.mapping.value === cxtProp.value // the current prop on the ele is a flat prop value for the function mapper - ) { - // NB don't write to cxtProp, as it's shared among eles (stored in stylesheet) - var mapping = eleProp.mapping; // can write to mapping, as it's a per-ele copy - var fnValue = mapping.fnValue = cxtProp.value(ele); // temporarily cache the value in case of a miss - - if (fnValue === mapping.prevFnValue) { - continue; - } - } - var retDiffProp = retDiffProps[diffPropName] = { - prev: eleProp - }; - self.applyParsedProperty(ele, cxtProp); - retDiffProp.next = ele.pstyle(diffPropName); - if (retDiffProp.next && retDiffProp.next.bypass) { - retDiffProp.next = retDiffProp.next.bypassed; - } - } - return { - diffProps: retDiffProps - }; -}; -styfn$8.updateStyleHints = function (ele) { - var _p = ele._private; - var self = this; - var propNames = self.propertyGroupNames; - var propGrKeys = self.propertyGroupKeys; - var propHash = function propHash(ele, propNames, seedKey) { - return self.getPropertiesHash(ele, propNames, seedKey); - }; - var oldStyleKey = _p.styleKey; - if (ele.removed()) { - return false; - } - var isNode = _p.group === 'nodes'; - - // get the style key hashes per prop group - // but lazily -- only use non-default prop values to reduce the number of hashes - // - - var overriddenStyles = ele._private.style; - propNames = Object.keys(overriddenStyles); - for (var i = 0; i < propGrKeys.length; i++) { - var grKey = propGrKeys[i]; - _p.styleKeys[grKey] = [DEFAULT_HASH_SEED, DEFAULT_HASH_SEED_ALT]; - } - var updateGrKey1 = function updateGrKey1(val, grKey) { - return _p.styleKeys[grKey][0] = hashInt(val, _p.styleKeys[grKey][0]); - }; - var updateGrKey2 = function updateGrKey2(val, grKey) { - return _p.styleKeys[grKey][1] = hashIntAlt(val, _p.styleKeys[grKey][1]); - }; - var updateGrKey = function updateGrKey(val, grKey) { - updateGrKey1(val, grKey); - updateGrKey2(val, grKey); - }; - var updateGrKeyWStr = function updateGrKeyWStr(strVal, grKey) { - for (var j = 0; j < strVal.length; j++) { - var ch = strVal.charCodeAt(j); - updateGrKey1(ch, grKey); - updateGrKey2(ch, grKey); - } - }; - - // - hashing works on 32 bit ints b/c we use bitwise ops - // - small numbers get cut off (e.g. 0.123 is seen as 0 by the hashing function) - // - raise up small numbers so more significant digits are seen by hashing - // - make small numbers larger than a normal value to avoid collisions - // - works in practice and it's relatively cheap - var N = 2000000000; - var cleanNum = function cleanNum(val) { - return -128 < val && val < 128 && Math.floor(val) !== val ? N - (val * 1024 | 0) : val; - }; - for (var _i = 0; _i < propNames.length; _i++) { - var name = propNames[_i]; - var parsedProp = overriddenStyles[name]; - if (parsedProp == null) { - continue; - } - var propInfo = this.properties[name]; - var type = propInfo.type; - var _grKey = propInfo.groupKey; - var normalizedNumberVal = void 0; - if (propInfo.hashOverride != null) { - normalizedNumberVal = propInfo.hashOverride(ele, parsedProp); - } else if (parsedProp.pfValue != null) { - normalizedNumberVal = parsedProp.pfValue; - } - - // might not be a number if it allows enums - var numberVal = propInfo.enums == null ? parsedProp.value : null; - var haveNormNum = normalizedNumberVal != null; - var haveUnitedNum = numberVal != null; - var haveNum = haveNormNum || haveUnitedNum; - var units = parsedProp.units; - - // numbers are cheaper to hash than strings - // 1 hash op vs n hash ops (for length n string) - if (type.number && haveNum && !type.multiple) { - var v = haveNormNum ? normalizedNumberVal : numberVal; - updateGrKey(cleanNum(v), _grKey); - if (!haveNormNum && units != null) { - updateGrKeyWStr(units, _grKey); - } - } else { - updateGrKeyWStr(parsedProp.strValue, _grKey); - } - } - - // overall style key - // - - var hash = [DEFAULT_HASH_SEED, DEFAULT_HASH_SEED_ALT]; - for (var _i2 = 0; _i2 < propGrKeys.length; _i2++) { - var _grKey2 = propGrKeys[_i2]; - var grHash = _p.styleKeys[_grKey2]; - hash[0] = hashInt(grHash[0], hash[0]); - hash[1] = hashIntAlt(grHash[1], hash[1]); - } - _p.styleKey = combineHashes(hash[0], hash[1]); - - // label dims - // - - var sk = _p.styleKeys; - _p.labelDimsKey = combineHashesArray(sk.labelDimensions); - var labelKeys = propHash(ele, ['label'], sk.labelDimensions); - _p.labelKey = combineHashesArray(labelKeys); - _p.labelStyleKey = combineHashesArray(hashArrays(sk.commonLabel, labelKeys)); - if (!isNode) { - var sourceLabelKeys = propHash(ele, ['source-label'], sk.labelDimensions); - _p.sourceLabelKey = combineHashesArray(sourceLabelKeys); - _p.sourceLabelStyleKey = combineHashesArray(hashArrays(sk.commonLabel, sourceLabelKeys)); - var targetLabelKeys = propHash(ele, ['target-label'], sk.labelDimensions); - _p.targetLabelKey = combineHashesArray(targetLabelKeys); - _p.targetLabelStyleKey = combineHashesArray(hashArrays(sk.commonLabel, targetLabelKeys)); - } - - // node - // - - if (isNode) { - var _p$styleKeys = _p.styleKeys, - nodeBody = _p$styleKeys.nodeBody, - nodeBorder = _p$styleKeys.nodeBorder, - nodeOutline = _p$styleKeys.nodeOutline, - backgroundImage = _p$styleKeys.backgroundImage, - compound = _p$styleKeys.compound, - pie = _p$styleKeys.pie; - var nodeKeys = [nodeBody, nodeBorder, nodeOutline, backgroundImage, compound, pie].filter(function (k) { - return k != null; - }).reduce(hashArrays, [DEFAULT_HASH_SEED, DEFAULT_HASH_SEED_ALT]); - _p.nodeKey = combineHashesArray(nodeKeys); - _p.hasPie = pie != null && pie[0] !== DEFAULT_HASH_SEED && pie[1] !== DEFAULT_HASH_SEED_ALT; - } - return oldStyleKey !== _p.styleKey; -}; -styfn$8.clearStyleHints = function (ele) { - var _p = ele._private; - _p.styleCxtKey = ''; - _p.styleKeys = {}; - _p.styleKey = null; - _p.labelKey = null; - _p.labelStyleKey = null; - _p.sourceLabelKey = null; - _p.sourceLabelStyleKey = null; - _p.targetLabelKey = null; - _p.targetLabelStyleKey = null; - _p.nodeKey = null; - _p.hasPie = null; -}; - -// apply a property to the style (for internal use) -// returns whether application was successful -// -// now, this function flattens the property, and here's how: -// -// for parsedProp:{ bypass: true, deleteBypass: true } -// no property is generated, instead the bypass property in the -// element's style is replaced by what's pointed to by the `bypassed` -// field in the bypass property (i.e. restoring the property the -// bypass was overriding) -// -// for parsedProp:{ mapped: truthy } -// the generated flattenedProp:{ mapping: prop } -// -// for parsedProp:{ bypass: true } -// the generated flattenedProp:{ bypassed: parsedProp } -styfn$8.applyParsedProperty = function (ele, parsedProp) { - var self = this; - var prop = parsedProp; - var style = ele._private.style; - var flatProp; - var types = self.types; - var type = self.properties[prop.name].type; - var propIsBypass = prop.bypass; - var origProp = style[prop.name]; - var origPropIsBypass = origProp && origProp.bypass; - var _p = ele._private; - var flatPropMapping = 'mapping'; - var getVal = function getVal(p) { - if (p == null) { - return null; - } else if (p.pfValue != null) { - return p.pfValue; - } else { - return p.value; - } - }; - var checkTriggers = function checkTriggers() { - var fromVal = getVal(origProp); - var toVal = getVal(prop); - self.checkTriggers(ele, prop.name, fromVal, toVal); - }; - - // edge sanity checks to prevent the client from making serious mistakes - if (parsedProp.name === 'curve-style' && ele.isEdge() && ( - // loops must be bundled beziers - parsedProp.value !== 'bezier' && ele.isLoop() || - // edges connected to compound nodes can not be haystacks - parsedProp.value === 'haystack' && (ele.source().isParent() || ele.target().isParent()))) { - prop = parsedProp = this.parse(parsedProp.name, 'bezier', propIsBypass); - } - if (prop["delete"]) { - // delete the property and use the default value on falsey value - style[prop.name] = undefined; - checkTriggers(); - return true; - } - if (prop.deleteBypassed) { - // delete the property that the - if (!origProp) { - checkTriggers(); - return true; // can't delete if no prop - } else if (origProp.bypass) { - // delete bypassed - origProp.bypassed = undefined; - checkTriggers(); - return true; - } else { - return false; // we're unsuccessful deleting the bypassed - } - } - - // check if we need to delete the current bypass - if (prop.deleteBypass) { - // then this property is just here to indicate we need to delete - if (!origProp) { - checkTriggers(); - return true; // property is already not defined - } else if (origProp.bypass) { - // then replace the bypass property with the original - // because the bypassed property was already applied (and therefore parsed), we can just replace it (no reapplying necessary) - style[prop.name] = origProp.bypassed; - checkTriggers(); - return true; - } else { - return false; // we're unsuccessful deleting the bypass - } - } - - var printMappingErr = function printMappingErr() { - warn('Do not assign mappings to elements without corresponding data (i.e. ele `' + ele.id() + '` has no mapping for property `' + prop.name + '` with data field `' + prop.field + '`); try a `[' + prop.field + ']` selector to limit scope to elements with `' + prop.field + '` defined'); - }; - - // put the property in the style objects - switch (prop.mapped) { - // flatten the property if mapped - case types.mapData: - { - // flatten the field (e.g. data.foo.bar) - var fields = prop.field.split('.'); - var fieldVal = _p.data; - for (var i = 0; i < fields.length && fieldVal; i++) { - var field = fields[i]; - fieldVal = fieldVal[field]; - } - if (fieldVal == null) { - printMappingErr(); - return false; - } - var percent; - if (!number$1(fieldVal)) { - // then don't apply and fall back on the existing style - warn('Do not use continuous mappers without specifying numeric data (i.e. `' + prop.field + ': ' + fieldVal + '` for `' + ele.id() + '` is non-numeric)'); - return false; - } else { - var fieldWidth = prop.fieldMax - prop.fieldMin; - if (fieldWidth === 0) { - // safety check -- not strictly necessary as no props of zero range should be passed here - percent = 0; - } else { - percent = (fieldVal - prop.fieldMin) / fieldWidth; - } - } - - // make sure to bound percent value - if (percent < 0) { - percent = 0; - } else if (percent > 1) { - percent = 1; - } - if (type.color) { - var r1 = prop.valueMin[0]; - var r2 = prop.valueMax[0]; - var g1 = prop.valueMin[1]; - var g2 = prop.valueMax[1]; - var b1 = prop.valueMin[2]; - var b2 = prop.valueMax[2]; - var a1 = prop.valueMin[3] == null ? 1 : prop.valueMin[3]; - var a2 = prop.valueMax[3] == null ? 1 : prop.valueMax[3]; - var clr = [Math.round(r1 + (r2 - r1) * percent), Math.round(g1 + (g2 - g1) * percent), Math.round(b1 + (b2 - b1) * percent), Math.round(a1 + (a2 - a1) * percent)]; - flatProp = { - // colours are simple, so just create the flat property instead of expensive string parsing - bypass: prop.bypass, - // we're a bypass if the mapping property is a bypass - name: prop.name, - value: clr, - strValue: 'rgb(' + clr[0] + ', ' + clr[1] + ', ' + clr[2] + ')' - }; - } else if (type.number) { - var calcValue = prop.valueMin + (prop.valueMax - prop.valueMin) * percent; - flatProp = this.parse(prop.name, calcValue, prop.bypass, flatPropMapping); - } else { - return false; // can only map to colours and numbers - } - - if (!flatProp) { - // if we can't flatten the property, then don't apply the property and fall back on the existing style - printMappingErr(); - return false; - } - flatProp.mapping = prop; // keep a reference to the mapping - prop = flatProp; // the flattened (mapped) property is the one we want - - break; - } - - // direct mapping - case types.data: - { - // flatten the field (e.g. data.foo.bar) - var _fields = prop.field.split('.'); - var _fieldVal = _p.data; - for (var _i3 = 0; _i3 < _fields.length && _fieldVal; _i3++) { - var _field = _fields[_i3]; - _fieldVal = _fieldVal[_field]; - } - if (_fieldVal != null) { - flatProp = this.parse(prop.name, _fieldVal, prop.bypass, flatPropMapping); - } - if (!flatProp) { - // if we can't flatten the property, then don't apply and fall back on the existing style - printMappingErr(); - return false; - } - flatProp.mapping = prop; // keep a reference to the mapping - prop = flatProp; // the flattened (mapped) property is the one we want - - break; - } - case types.fn: - { - var fn = prop.value; - var fnRetVal = prop.fnValue != null ? prop.fnValue : fn(ele); // check for cached value before calling function - - prop.prevFnValue = fnRetVal; - if (fnRetVal == null) { - warn('Custom function mappers may not return null (i.e. `' + prop.name + '` for ele `' + ele.id() + '` is null)'); - return false; - } - flatProp = this.parse(prop.name, fnRetVal, prop.bypass, flatPropMapping); - if (!flatProp) { - warn('Custom function mappers may not return invalid values for the property type (i.e. `' + prop.name + '` for ele `' + ele.id() + '` is invalid)'); - return false; - } - flatProp.mapping = copy(prop); // keep a reference to the mapping - prop = flatProp; // the flattened (mapped) property is the one we want - - break; - } - case undefined: - break; - // just set the property - - default: - return false; - // not a valid mapping - } - - // if the property is a bypass property, then link the resultant property to the original one - if (propIsBypass) { - if (origPropIsBypass) { - // then this bypass overrides the existing one - prop.bypassed = origProp.bypassed; // steal bypassed prop from old bypass - } else { - // then link the orig prop to the new bypass - prop.bypassed = origProp; - } - style[prop.name] = prop; // and set - } else { - // prop is not bypass - if (origPropIsBypass) { - // then keep the orig prop (since it's a bypass) and link to the new prop - origProp.bypassed = prop; - } else { - // then just replace the old prop with the new one - style[prop.name] = prop; - } - } - checkTriggers(); - return true; -}; -styfn$8.cleanElements = function (eles, keepBypasses) { - for (var i = 0; i < eles.length; i++) { - var ele = eles[i]; - this.clearStyleHints(ele); - ele.dirtyCompoundBoundsCache(); - ele.dirtyBoundingBoxCache(); - if (!keepBypasses) { - ele._private.style = {}; - } else { - var style = ele._private.style; - var propNames = Object.keys(style); - for (var j = 0; j < propNames.length; j++) { - var propName = propNames[j]; - var eleProp = style[propName]; - if (eleProp != null) { - if (eleProp.bypass) { - eleProp.bypassed = null; - } else { - style[propName] = null; - } - } - } - } - } -}; - -// updates the visual style for all elements (useful for manual style modification after init) -styfn$8.update = function () { - var cy = this._private.cy; - var eles = cy.mutableElements(); - eles.updateStyle(); -}; - -// diffProps : { name => { prev, next } } -styfn$8.updateTransitions = function (ele, diffProps) { - var self = this; - var _p = ele._private; - var props = ele.pstyle('transition-property').value; - var duration = ele.pstyle('transition-duration').pfValue; - var delay = ele.pstyle('transition-delay').pfValue; - if (props.length > 0 && duration > 0) { - var style = {}; - - // build up the style to animate towards - var anyPrev = false; - for (var i = 0; i < props.length; i++) { - var prop = props[i]; - var styProp = ele.pstyle(prop); - var diffProp = diffProps[prop]; - if (!diffProp) { - continue; - } - var prevProp = diffProp.prev; - var fromProp = prevProp; - var toProp = diffProp.next != null ? diffProp.next : styProp; - var diff = false; - var initVal = void 0; - var initDt = 0.000001; // delta time % value for initVal (allows animating out of init zero opacity) - - if (!fromProp) { - continue; - } - - // consider px values - if (number$1(fromProp.pfValue) && number$1(toProp.pfValue)) { - diff = toProp.pfValue - fromProp.pfValue; // nonzero is truthy - initVal = fromProp.pfValue + initDt * diff; - - // consider numerical values - } else if (number$1(fromProp.value) && number$1(toProp.value)) { - diff = toProp.value - fromProp.value; // nonzero is truthy - initVal = fromProp.value + initDt * diff; - - // consider colour values - } else if (array(fromProp.value) && array(toProp.value)) { - diff = fromProp.value[0] !== toProp.value[0] || fromProp.value[1] !== toProp.value[1] || fromProp.value[2] !== toProp.value[2]; - initVal = fromProp.strValue; - } - - // the previous value is good for an animation only if it's different - if (diff) { - style[prop] = toProp.strValue; // to val - this.applyBypass(ele, prop, initVal); // from val - anyPrev = true; - } - } // end if props allow ani - - // can't transition if there's nothing previous to transition from - if (!anyPrev) { - return; - } - _p.transitioning = true; - new Promise$1(function (resolve) { - if (delay > 0) { - ele.delayAnimation(delay).play().promise().then(resolve); - } else { - resolve(); - } - }).then(function () { - return ele.animation({ - style: style, - duration: duration, - easing: ele.pstyle('transition-timing-function').value, - queue: false - }).play().promise(); - }).then(function () { - // if( !isBypass ){ - self.removeBypasses(ele, props); - ele.emitAndNotify('style'); - // } - - _p.transitioning = false; - }); - } else if (_p.transitioning) { - this.removeBypasses(ele, props); - ele.emitAndNotify('style'); - _p.transitioning = false; - } -}; -styfn$8.checkTrigger = function (ele, name, fromValue, toValue, getTrigger, onTrigger) { - var prop = this.properties[name]; - var triggerCheck = getTrigger(prop); - if (triggerCheck != null && triggerCheck(fromValue, toValue)) { - onTrigger(prop); - } -}; -styfn$8.checkZOrderTrigger = function (ele, name, fromValue, toValue) { - var _this = this; - this.checkTrigger(ele, name, fromValue, toValue, function (prop) { - return prop.triggersZOrder; - }, function () { - _this._private.cy.notify('zorder', ele); - }); -}; -styfn$8.checkBoundsTrigger = function (ele, name, fromValue, toValue) { - this.checkTrigger(ele, name, fromValue, toValue, function (prop) { - return prop.triggersBounds; - }, function (prop) { - ele.dirtyCompoundBoundsCache(); - ele.dirtyBoundingBoxCache(); - - // if the prop change makes the bb of pll bezier edges invalid, - // then dirty the pll edge bb cache as well - if ( - // only for beziers -- so performance of other edges isn't affected - prop.triggersBoundsOfParallelBeziers && name === 'curve-style' && (fromValue === 'bezier' || toValue === 'bezier')) { - ele.parallelEdges().forEach(function (pllEdge) { - if (pllEdge.isBundledBezier()) { - pllEdge.dirtyBoundingBoxCache(); - } - }); - } - if (prop.triggersBoundsOfConnectedEdges && name === 'display' && (fromValue === 'none' || toValue === 'none')) { - ele.connectedEdges().forEach(function (edge) { - edge.dirtyBoundingBoxCache(); - }); - } - }); -}; -styfn$8.checkTriggers = function (ele, name, fromValue, toValue) { - ele.dirtyStyleCache(); - this.checkZOrderTrigger(ele, name, fromValue, toValue); - this.checkBoundsTrigger(ele, name, fromValue, toValue); -}; - -var styfn$7 = {}; - -// bypasses are applied to an existing style on an element, and just tacked on temporarily -// returns true iff application was successful for at least 1 specified property -styfn$7.applyBypass = function (eles, name, value, updateTransitions) { - var self = this; - var props = []; - var isBypass = true; - - // put all the properties (can specify one or many) in an array after parsing them - if (name === '*' || name === '**') { - // apply to all property names - - if (value !== undefined) { - for (var i = 0; i < self.properties.length; i++) { - var prop = self.properties[i]; - var _name = prop.name; - var parsedProp = this.parse(_name, value, true); - if (parsedProp) { - props.push(parsedProp); - } - } - } - } else if (string(name)) { - // then parse the single property - var _parsedProp = this.parse(name, value, true); - if (_parsedProp) { - props.push(_parsedProp); - } - } else if (plainObject(name)) { - // then parse each property - var specifiedProps = name; - updateTransitions = value; - var names = Object.keys(specifiedProps); - for (var _i = 0; _i < names.length; _i++) { - var _name2 = names[_i]; - var _value = specifiedProps[_name2]; - if (_value === undefined) { - // try camel case name too - _value = specifiedProps[dash2camel(_name2)]; - } - if (_value !== undefined) { - var _parsedProp2 = this.parse(_name2, _value, true); - if (_parsedProp2) { - props.push(_parsedProp2); - } - } - } - } else { - // can't do anything without well defined properties - return false; - } - - // we've failed if there are no valid properties - if (props.length === 0) { - return false; - } - - // now, apply the bypass properties on the elements - var ret = false; // return true if at least one succesful bypass applied - for (var _i2 = 0; _i2 < eles.length; _i2++) { - // for each ele - var ele = eles[_i2]; - var diffProps = {}; - var diffProp = void 0; - for (var j = 0; j < props.length; j++) { - // for each prop - var _prop = props[j]; - if (updateTransitions) { - var prevProp = ele.pstyle(_prop.name); - diffProp = diffProps[_prop.name] = { - prev: prevProp - }; - } - ret = this.applyParsedProperty(ele, copy(_prop)) || ret; - if (updateTransitions) { - diffProp.next = ele.pstyle(_prop.name); - } - } // for props - - if (ret) { - this.updateStyleHints(ele); - } - if (updateTransitions) { - this.updateTransitions(ele, diffProps, isBypass); - } - } // for eles - - return ret; -}; - -// only useful in specific cases like animation -styfn$7.overrideBypass = function (eles, name, value) { - name = camel2dash(name); - for (var i = 0; i < eles.length; i++) { - var ele = eles[i]; - var prop = ele._private.style[name]; - var type = this.properties[name].type; - var isColor = type.color; - var isMulti = type.mutiple; - var oldValue = !prop ? null : prop.pfValue != null ? prop.pfValue : prop.value; - if (!prop || !prop.bypass) { - // need a bypass if one doesn't exist - this.applyBypass(ele, name, value); - } else { - prop.value = value; - if (prop.pfValue != null) { - prop.pfValue = value; - } - if (isColor) { - prop.strValue = 'rgb(' + value.join(',') + ')'; - } else if (isMulti) { - prop.strValue = value.join(' '); - } else { - prop.strValue = '' + value; - } - this.updateStyleHints(ele); - } - this.checkTriggers(ele, name, oldValue, value); - } -}; -styfn$7.removeAllBypasses = function (eles, updateTransitions) { - return this.removeBypasses(eles, this.propertyNames, updateTransitions); -}; -styfn$7.removeBypasses = function (eles, props, updateTransitions) { - var isBypass = true; - for (var j = 0; j < eles.length; j++) { - var ele = eles[j]; - var diffProps = {}; - for (var i = 0; i < props.length; i++) { - var name = props[i]; - var prop = this.properties[name]; - var prevProp = ele.pstyle(prop.name); - if (!prevProp || !prevProp.bypass) { - // if a bypass doesn't exist for the prop, nothing needs to be removed - continue; - } - var value = ''; // empty => remove bypass - var parsedProp = this.parse(name, value, true); - var diffProp = diffProps[prop.name] = { - prev: prevProp - }; - this.applyParsedProperty(ele, parsedProp); - diffProp.next = ele.pstyle(prop.name); - } // for props - - this.updateStyleHints(ele); - if (updateTransitions) { - this.updateTransitions(ele, diffProps, isBypass); - } - } // for eles -}; - -var styfn$6 = {}; - -// gets what an em size corresponds to in pixels relative to a dom element -styfn$6.getEmSizeInPixels = function () { - var px = this.containerCss('font-size'); - if (px != null) { - return parseFloat(px); - } else { - return 1; // for headless - } -}; - -// gets css property from the core container -styfn$6.containerCss = function (propName) { - var cy = this._private.cy; - var domElement = cy.container(); - var containerWindow = cy.window(); - if (containerWindow && domElement && containerWindow.getComputedStyle) { - return containerWindow.getComputedStyle(domElement).getPropertyValue(propName); - } -}; - -var styfn$5 = {}; - -// gets the rendered style for an element -styfn$5.getRenderedStyle = function (ele, prop) { - if (prop) { - return this.getStylePropertyValue(ele, prop, true); - } else { - return this.getRawStyle(ele, true); - } -}; - -// gets the raw style for an element -styfn$5.getRawStyle = function (ele, isRenderedVal) { - var self = this; - ele = ele[0]; // insure it's an element - - if (ele) { - var rstyle = {}; - for (var i = 0; i < self.properties.length; i++) { - var prop = self.properties[i]; - var val = self.getStylePropertyValue(ele, prop.name, isRenderedVal); - if (val != null) { - rstyle[prop.name] = val; - rstyle[dash2camel(prop.name)] = val; - } - } - return rstyle; - } -}; -styfn$5.getIndexedStyle = function (ele, property, subproperty, index) { - var pstyle = ele.pstyle(property)[subproperty][index]; - return pstyle != null ? pstyle : ele.cy().style().getDefaultProperty(property)[subproperty][0]; -}; -styfn$5.getStylePropertyValue = function (ele, propName, isRenderedVal) { - var self = this; - ele = ele[0]; // insure it's an element - - if (ele) { - var prop = self.properties[propName]; - if (prop.alias) { - prop = prop.pointsTo; - } - var type = prop.type; - var styleProp = ele.pstyle(prop.name); - if (styleProp) { - var value = styleProp.value, - units = styleProp.units, - strValue = styleProp.strValue; - if (isRenderedVal && type.number && value != null && number$1(value)) { - var zoom = ele.cy().zoom(); - var getRenderedValue = function getRenderedValue(val) { - return val * zoom; - }; - var getValueStringWithUnits = function getValueStringWithUnits(val, units) { - return getRenderedValue(val) + units; - }; - var isArrayValue = array(value); - var haveUnits = isArrayValue ? units.every(function (u) { - return u != null; - }) : units != null; - if (haveUnits) { - if (isArrayValue) { - return value.map(function (v, i) { - return getValueStringWithUnits(v, units[i]); - }).join(' '); - } else { - return getValueStringWithUnits(value, units); - } - } else { - if (isArrayValue) { - return value.map(function (v) { - return string(v) ? v : '' + getRenderedValue(v); - }).join(' '); - } else { - return '' + getRenderedValue(value); - } - } - } else if (strValue != null) { - return strValue; - } - } - return null; - } -}; -styfn$5.getAnimationStartStyle = function (ele, aniProps) { - var rstyle = {}; - for (var i = 0; i < aniProps.length; i++) { - var aniProp = aniProps[i]; - var name = aniProp.name; - var styleProp = ele.pstyle(name); - if (styleProp !== undefined) { - // then make a prop of it - if (plainObject(styleProp)) { - styleProp = this.parse(name, styleProp.strValue); - } else { - styleProp = this.parse(name, styleProp); - } - } - if (styleProp) { - rstyle[name] = styleProp; - } - } - return rstyle; -}; -styfn$5.getPropsList = function (propsObj) { - var self = this; - var rstyle = []; - var style = propsObj; - var props = self.properties; - if (style) { - var names = Object.keys(style); - for (var i = 0; i < names.length; i++) { - var name = names[i]; - var val = style[name]; - var prop = props[name] || props[camel2dash(name)]; - var styleProp = this.parse(prop.name, val); - if (styleProp) { - rstyle.push(styleProp); - } - } - } - return rstyle; -}; -styfn$5.getNonDefaultPropertiesHash = function (ele, propNames, seed) { - var hash = seed.slice(); - var name, val, strVal, chVal; - var i, j; - for (i = 0; i < propNames.length; i++) { - name = propNames[i]; - val = ele.pstyle(name, false); - if (val == null) { - continue; - } else if (val.pfValue != null) { - hash[0] = hashInt(chVal, hash[0]); - hash[1] = hashIntAlt(chVal, hash[1]); - } else { - strVal = val.strValue; - for (j = 0; j < strVal.length; j++) { - chVal = strVal.charCodeAt(j); - hash[0] = hashInt(chVal, hash[0]); - hash[1] = hashIntAlt(chVal, hash[1]); - } - } - } - return hash; -}; -styfn$5.getPropertiesHash = styfn$5.getNonDefaultPropertiesHash; - -var styfn$4 = {}; -styfn$4.appendFromJson = function (json) { - var style = this; - for (var i = 0; i < json.length; i++) { - var context = json[i]; - var selector = context.selector; - var props = context.style || context.css; - var names = Object.keys(props); - style.selector(selector); // apply selector - - for (var j = 0; j < names.length; j++) { - var name = names[j]; - var value = props[name]; - style.css(name, value); // apply property - } - } - - return style; -}; - -// accessible cy.style() function -styfn$4.fromJson = function (json) { - var style = this; - style.resetToDefault(); - style.appendFromJson(json); - return style; -}; - -// get json from cy.style() api -styfn$4.json = function () { - var json = []; - for (var i = this.defaultLength; i < this.length; i++) { - var cxt = this[i]; - var selector = cxt.selector; - var props = cxt.properties; - var css = {}; - for (var j = 0; j < props.length; j++) { - var prop = props[j]; - css[prop.name] = prop.strValue; - } - json.push({ - selector: !selector ? 'core' : selector.toString(), - style: css - }); - } - return json; -}; - -var styfn$3 = {}; -styfn$3.appendFromString = function (string) { - var self = this; - var style = this; - var remaining = '' + string; - var selAndBlockStr; - var blockRem; - var propAndValStr; - - // remove comments from the style string - remaining = remaining.replace(/[/][*](\s|.)+?[*][/]/g, ''); - function removeSelAndBlockFromRemaining() { - // remove the parsed selector and block from the remaining text to parse - if (remaining.length > selAndBlockStr.length) { - remaining = remaining.substr(selAndBlockStr.length); - } else { - remaining = ''; - } - } - function removePropAndValFromRem() { - // remove the parsed property and value from the remaining block text to parse - if (blockRem.length > propAndValStr.length) { - blockRem = blockRem.substr(propAndValStr.length); - } else { - blockRem = ''; - } - } - for (;;) { - var nothingLeftToParse = remaining.match(/^\s*$/); - if (nothingLeftToParse) { - break; - } - var selAndBlock = remaining.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/); - if (!selAndBlock) { - warn('Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: ' + remaining); - break; - } - selAndBlockStr = selAndBlock[0]; - - // parse the selector - var selectorStr = selAndBlock[1]; - if (selectorStr !== 'core') { - var selector = new Selector(selectorStr); - if (selector.invalid) { - warn('Skipping parsing of block: Invalid selector found in string stylesheet: ' + selectorStr); - - // skip this selector and block - removeSelAndBlockFromRemaining(); - continue; - } - } - - // parse the block of properties and values - var blockStr = selAndBlock[2]; - var invalidBlock = false; - blockRem = blockStr; - var props = []; - for (;;) { - var _nothingLeftToParse = blockRem.match(/^\s*$/); - if (_nothingLeftToParse) { - break; - } - var propAndVal = blockRem.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/); - if (!propAndVal) { - warn('Skipping parsing of block: Invalid formatting of style property and value definitions found in:' + blockStr); - invalidBlock = true; - break; - } - propAndValStr = propAndVal[0]; - var propStr = propAndVal[1]; - var valStr = propAndVal[2]; - var prop = self.properties[propStr]; - if (!prop) { - warn('Skipping property: Invalid property name in: ' + propAndValStr); - - // skip this property in the block - removePropAndValFromRem(); - continue; - } - var parsedProp = style.parse(propStr, valStr); - if (!parsedProp) { - warn('Skipping property: Invalid property definition in: ' + propAndValStr); - - // skip this property in the block - removePropAndValFromRem(); - continue; - } - props.push({ - name: propStr, - val: valStr - }); - removePropAndValFromRem(); - } - if (invalidBlock) { - removeSelAndBlockFromRemaining(); - break; - } - - // put the parsed block in the style - style.selector(selectorStr); - for (var i = 0; i < props.length; i++) { - var _prop = props[i]; - style.css(_prop.name, _prop.val); - } - removeSelAndBlockFromRemaining(); - } - return style; -}; -styfn$3.fromString = function (string) { - var style = this; - style.resetToDefault(); - style.appendFromString(string); - return style; -}; - -var styfn$2 = {}; -(function () { - var number$1 = number; - var rgba = rgbaNoBackRefs; - var hsla = hslaNoBackRefs; - var hex3$1 = hex3; - var hex6$1 = hex6; - var data = function data(prefix) { - return '^' + prefix + '\\s*\\(\\s*([\\w\\.]+)\\s*\\)$'; - }; - var mapData = function mapData(prefix) { - var mapArg = number$1 + '|\\w+|' + rgba + '|' + hsla + '|' + hex3$1 + '|' + hex6$1; - return '^' + prefix + '\\s*\\(([\\w\\.]+)\\s*\\,\\s*(' + number$1 + ')\\s*\\,\\s*(' + number$1 + ')\\s*,\\s*(' + mapArg + ')\\s*\\,\\s*(' + mapArg + ')\\)$'; - }; - var urlRegexes = ['^url\\s*\\(\\s*[\'"]?(.+?)[\'"]?\\s*\\)$', '^(none)$', '^(.+)$']; - - // each visual style property has a type and needs to be validated according to it - styfn$2.types = { - time: { - number: true, - min: 0, - units: 's|ms', - implicitUnits: 'ms' - }, - percent: { - number: true, - min: 0, - max: 100, - units: '%', - implicitUnits: '%' - }, - percentages: { - number: true, - min: 0, - max: 100, - units: '%', - implicitUnits: '%', - multiple: true - }, - zeroOneNumber: { - number: true, - min: 0, - max: 1, - unitless: true - }, - zeroOneNumbers: { - number: true, - min: 0, - max: 1, - unitless: true, - multiple: true - }, - nOneOneNumber: { - number: true, - min: -1, - max: 1, - unitless: true - }, - nonNegativeInt: { - number: true, - min: 0, - integer: true, - unitless: true - }, - nonNegativeNumber: { - number: true, - min: 0, - unitless: true - }, - position: { - enums: ['parent', 'origin'] - }, - nodeSize: { - number: true, - min: 0, - enums: ['label'] - }, - number: { - number: true, - unitless: true - }, - numbers: { - number: true, - unitless: true, - multiple: true - }, - positiveNumber: { - number: true, - unitless: true, - min: 0, - strictMin: true - }, - size: { - number: true, - min: 0 - }, - bidirectionalSize: { - number: true - }, - // allows negative - bidirectionalSizeMaybePercent: { - number: true, - allowPercent: true - }, - // allows negative - bidirectionalSizes: { - number: true, - multiple: true - }, - // allows negative - sizeMaybePercent: { - number: true, - min: 0, - allowPercent: true - }, - axisDirection: { - enums: ['horizontal', 'leftward', 'rightward', 'vertical', 'upward', 'downward', 'auto'] - }, - paddingRelativeTo: { - enums: ['width', 'height', 'average', 'min', 'max'] - }, - bgWH: { - number: true, - min: 0, - allowPercent: true, - enums: ['auto'], - multiple: true - }, - bgPos: { - number: true, - allowPercent: true, - multiple: true - }, - bgRelativeTo: { - enums: ['inner', 'include-padding'], - multiple: true - }, - bgRepeat: { - enums: ['repeat', 'repeat-x', 'repeat-y', 'no-repeat'], - multiple: true - }, - bgFit: { - enums: ['none', 'contain', 'cover'], - multiple: true - }, - bgCrossOrigin: { - enums: ['anonymous', 'use-credentials', 'null'], - multiple: true - }, - bgClip: { - enums: ['none', 'node'], - multiple: true - }, - bgContainment: { - enums: ['inside', 'over'], - multiple: true - }, - color: { - color: true - }, - colors: { - color: true, - multiple: true - }, - fill: { - enums: ['solid', 'linear-gradient', 'radial-gradient'] - }, - bool: { - enums: ['yes', 'no'] - }, - bools: { - enums: ['yes', 'no'], - multiple: true - }, - lineStyle: { - enums: ['solid', 'dotted', 'dashed'] - }, - lineCap: { - enums: ['butt', 'round', 'square'] - }, - linePosition: { - enums: ['center', 'inside', 'outside'] - }, - lineJoin: { - enums: ['round', 'bevel', 'miter'] - }, - borderStyle: { - enums: ['solid', 'dotted', 'dashed', 'double'] - }, - curveStyle: { - enums: ['bezier', 'unbundled-bezier', 'haystack', 'segments', 'straight', 'straight-triangle', 'taxi', 'round-segments', 'round-taxi'] - }, - radiusType: { - enums: ['arc-radius', 'influence-radius'], - multiple: true - }, - fontFamily: { - regex: '^([\\w- \\"]+(?:\\s*,\\s*[\\w- \\"]+)*)$' - }, - fontStyle: { - enums: ['italic', 'normal', 'oblique'] - }, - fontWeight: { - enums: ['normal', 'bold', 'bolder', 'lighter', '100', '200', '300', '400', '500', '600', '800', '900', 100, 200, 300, 400, 500, 600, 700, 800, 900] - }, - textDecoration: { - enums: ['none', 'underline', 'overline', 'line-through'] - }, - textTransform: { - enums: ['none', 'uppercase', 'lowercase'] - }, - textWrap: { - enums: ['none', 'wrap', 'ellipsis'] - }, - textOverflowWrap: { - enums: ['whitespace', 'anywhere'] - }, - textBackgroundShape: { - enums: ['rectangle', 'roundrectangle', 'round-rectangle'] - }, - nodeShape: { - enums: ['rectangle', 'roundrectangle', 'round-rectangle', 'cutrectangle', 'cut-rectangle', 'bottomroundrectangle', 'bottom-round-rectangle', 'barrel', 'ellipse', 'triangle', 'round-triangle', 'square', 'pentagon', 'round-pentagon', 'hexagon', 'round-hexagon', 'concavehexagon', 'concave-hexagon', 'heptagon', 'round-heptagon', 'octagon', 'round-octagon', 'tag', 'round-tag', 'star', 'diamond', 'round-diamond', 'vee', 'rhomboid', 'right-rhomboid', 'polygon'] - }, - overlayShape: { - enums: ['roundrectangle', 'round-rectangle', 'ellipse'] - }, - cornerRadius: { - number: true, - min: 0, - units: 'px|em', - implicitUnits: 'px', - enums: ['auto'] - }, - compoundIncludeLabels: { - enums: ['include', 'exclude'] - }, - arrowShape: { - enums: ['tee', 'triangle', 'triangle-tee', 'circle-triangle', 'triangle-cross', 'triangle-backcurve', 'vee', 'square', 'circle', 'diamond', 'chevron', 'none'] - }, - arrowFill: { - enums: ['filled', 'hollow'] - }, - arrowWidth: { - number: true, - units: '%|px|em', - implicitUnits: 'px', - enums: ['match-line'] - }, - display: { - enums: ['element', 'none'] - }, - visibility: { - enums: ['hidden', 'visible'] - }, - zCompoundDepth: { - enums: ['bottom', 'orphan', 'auto', 'top'] - }, - zIndexCompare: { - enums: ['auto', 'manual'] - }, - valign: { - enums: ['top', 'center', 'bottom'] - }, - halign: { - enums: ['left', 'center', 'right'] - }, - justification: { - enums: ['left', 'center', 'right', 'auto'] - }, - text: { - string: true - }, - data: { - mapping: true, - regex: data('data') - }, - layoutData: { - mapping: true, - regex: data('layoutData') - }, - scratch: { - mapping: true, - regex: data('scratch') - }, - mapData: { - mapping: true, - regex: mapData('mapData') - }, - mapLayoutData: { - mapping: true, - regex: mapData('mapLayoutData') - }, - mapScratch: { - mapping: true, - regex: mapData('mapScratch') - }, - fn: { - mapping: true, - fn: true - }, - url: { - regexes: urlRegexes, - singleRegexMatchValue: true - }, - urls: { - regexes: urlRegexes, - singleRegexMatchValue: true, - multiple: true - }, - propList: { - propList: true - }, - angle: { - number: true, - units: 'deg|rad', - implicitUnits: 'rad' - }, - textRotation: { - number: true, - units: 'deg|rad', - implicitUnits: 'rad', - enums: ['none', 'autorotate'] - }, - polygonPointList: { - number: true, - multiple: true, - evenMultiple: true, - min: -1, - max: 1, - unitless: true - }, - edgeDistances: { - enums: ['intersection', 'node-position', 'endpoints'] - }, - edgeEndpoint: { - number: true, - multiple: true, - units: '%|px|em|deg|rad', - implicitUnits: 'px', - enums: ['inside-to-node', 'outside-to-node', 'outside-to-node-or-label', 'outside-to-line', 'outside-to-line-or-label'], - singleEnum: true, - validate: function validate(valArr, unitsArr) { - switch (valArr.length) { - case 2: - // can be % or px only - return unitsArr[0] !== 'deg' && unitsArr[0] !== 'rad' && unitsArr[1] !== 'deg' && unitsArr[1] !== 'rad'; - case 1: - // can be enum, deg, or rad only - return string(valArr[0]) || unitsArr[0] === 'deg' || unitsArr[0] === 'rad'; - default: - return false; - } - } - }, - easing: { - regexes: ['^(spring)\\s*\\(\\s*(' + number$1 + ')\\s*,\\s*(' + number$1 + ')\\s*\\)$', '^(cubic-bezier)\\s*\\(\\s*(' + number$1 + ')\\s*,\\s*(' + number$1 + ')\\s*,\\s*(' + number$1 + ')\\s*,\\s*(' + number$1 + ')\\s*\\)$'], - enums: ['linear', 'ease', 'ease-in', 'ease-out', 'ease-in-out', 'ease-in-sine', 'ease-out-sine', 'ease-in-out-sine', 'ease-in-quad', 'ease-out-quad', 'ease-in-out-quad', 'ease-in-cubic', 'ease-out-cubic', 'ease-in-out-cubic', 'ease-in-quart', 'ease-out-quart', 'ease-in-out-quart', 'ease-in-quint', 'ease-out-quint', 'ease-in-out-quint', 'ease-in-expo', 'ease-out-expo', 'ease-in-out-expo', 'ease-in-circ', 'ease-out-circ', 'ease-in-out-circ'] - }, - gradientDirection: { - enums: ['to-bottom', 'to-top', 'to-left', 'to-right', 'to-bottom-right', 'to-bottom-left', 'to-top-right', 'to-top-left', 'to-right-bottom', 'to-left-bottom', 'to-right-top', 'to-left-top' // different order - ] - }, - - boundsExpansion: { - number: true, - multiple: true, - min: 0, - validate: function validate(valArr) { - var length = valArr.length; - return length === 1 || length === 2 || length === 4; - } - } - }; - var diff = { - zeroNonZero: function zeroNonZero(val1, val2) { - if ((val1 == null || val2 == null) && val1 !== val2) { - return true; // null cases could represent any value - } - if (val1 == 0 && val2 != 0) { - return true; - } else if (val1 != 0 && val2 == 0) { - return true; - } else { - return false; - } - }, - any: function any(val1, val2) { - return val1 != val2; - }, - emptyNonEmpty: function emptyNonEmpty(str1, str2) { - var empty1 = emptyString(str1); - var empty2 = emptyString(str2); - return empty1 && !empty2 || !empty1 && empty2; - } - }; - - // define visual style properties - // - // - n.b. adding a new group of props may require updates to updateStyleHints() - // - adding new props to an existing group gets handled automatically - - var t = styfn$2.types; - var mainLabel = [{ - name: 'label', - type: t.text, - triggersBounds: diff.any, - triggersZOrder: diff.emptyNonEmpty - }, { - name: 'text-rotation', - type: t.textRotation, - triggersBounds: diff.any - }, { - name: 'text-margin-x', - type: t.bidirectionalSize, - triggersBounds: diff.any - }, { - name: 'text-margin-y', - type: t.bidirectionalSize, - triggersBounds: diff.any - }]; - var sourceLabel = [{ - name: 'source-label', - type: t.text, - triggersBounds: diff.any - }, { - name: 'source-text-rotation', - type: t.textRotation, - triggersBounds: diff.any - }, { - name: 'source-text-margin-x', - type: t.bidirectionalSize, - triggersBounds: diff.any - }, { - name: 'source-text-margin-y', - type: t.bidirectionalSize, - triggersBounds: diff.any - }, { - name: 'source-text-offset', - type: t.size, - triggersBounds: diff.any - }]; - var targetLabel = [{ - name: 'target-label', - type: t.text, - triggersBounds: diff.any - }, { - name: 'target-text-rotation', - type: t.textRotation, - triggersBounds: diff.any - }, { - name: 'target-text-margin-x', - type: t.bidirectionalSize, - triggersBounds: diff.any - }, { - name: 'target-text-margin-y', - type: t.bidirectionalSize, - triggersBounds: diff.any - }, { - name: 'target-text-offset', - type: t.size, - triggersBounds: diff.any - }]; - var labelDimensions = [{ - name: 'font-family', - type: t.fontFamily, - triggersBounds: diff.any - }, { - name: 'font-style', - type: t.fontStyle, - triggersBounds: diff.any - }, { - name: 'font-weight', - type: t.fontWeight, - triggersBounds: diff.any - }, { - name: 'font-size', - type: t.size, - triggersBounds: diff.any - }, { - name: 'text-transform', - type: t.textTransform, - triggersBounds: diff.any - }, { - name: 'text-wrap', - type: t.textWrap, - triggersBounds: diff.any - }, { - name: 'text-overflow-wrap', - type: t.textOverflowWrap, - triggersBounds: diff.any - }, { - name: 'text-max-width', - type: t.size, - triggersBounds: diff.any - }, { - name: 'text-outline-width', - type: t.size, - triggersBounds: diff.any - }, { - name: 'line-height', - type: t.positiveNumber, - triggersBounds: diff.any - }]; - var commonLabel = [{ - name: 'text-valign', - type: t.valign, - triggersBounds: diff.any - }, { - name: 'text-halign', - type: t.halign, - triggersBounds: diff.any - }, { - name: 'color', - type: t.color - }, { - name: 'text-outline-color', - type: t.color - }, { - name: 'text-outline-opacity', - type: t.zeroOneNumber - }, { - name: 'text-background-color', - type: t.color - }, { - name: 'text-background-opacity', - type: t.zeroOneNumber - }, { - name: 'text-background-padding', - type: t.size, - triggersBounds: diff.any - }, { - name: 'text-border-opacity', - type: t.zeroOneNumber - }, { - name: 'text-border-color', - type: t.color - }, { - name: 'text-border-width', - type: t.size, - triggersBounds: diff.any - }, { - name: 'text-border-style', - type: t.borderStyle, - triggersBounds: diff.any - }, { - name: 'text-background-shape', - type: t.textBackgroundShape, - triggersBounds: diff.any - }, { - name: 'text-justification', - type: t.justification - }]; - var behavior = [{ - name: 'events', - type: t.bool, - triggersZOrder: diff.any - }, { - name: 'text-events', - type: t.bool, - triggersZOrder: diff.any - }]; - var visibility = [{ - name: 'display', - type: t.display, - triggersZOrder: diff.any, - triggersBounds: diff.any, - triggersBoundsOfConnectedEdges: true - }, { - name: 'visibility', - type: t.visibility, - triggersZOrder: diff.any - }, { - name: 'opacity', - type: t.zeroOneNumber, - triggersZOrder: diff.zeroNonZero - }, { - name: 'text-opacity', - type: t.zeroOneNumber - }, { - name: 'min-zoomed-font-size', - type: t.size - }, { - name: 'z-compound-depth', - type: t.zCompoundDepth, - triggersZOrder: diff.any - }, { - name: 'z-index-compare', - type: t.zIndexCompare, - triggersZOrder: diff.any - }, { - name: 'z-index', - type: t.number, - triggersZOrder: diff.any - }]; - var overlay = [{ - name: 'overlay-padding', - type: t.size, - triggersBounds: diff.any - }, { - name: 'overlay-color', - type: t.color - }, { - name: 'overlay-opacity', - type: t.zeroOneNumber, - triggersBounds: diff.zeroNonZero - }, { - name: 'overlay-shape', - type: t.overlayShape, - triggersBounds: diff.any - }, { - name: 'overlay-corner-radius', - type: t.cornerRadius - }]; - var underlay = [{ - name: 'underlay-padding', - type: t.size, - triggersBounds: diff.any - }, { - name: 'underlay-color', - type: t.color - }, { - name: 'underlay-opacity', - type: t.zeroOneNumber, - triggersBounds: diff.zeroNonZero - }, { - name: 'underlay-shape', - type: t.overlayShape, - triggersBounds: diff.any - }, { - name: 'underlay-corner-radius', - type: t.cornerRadius - }]; - var transition = [{ - name: 'transition-property', - type: t.propList - }, { - name: 'transition-duration', - type: t.time - }, { - name: 'transition-delay', - type: t.time - }, { - name: 'transition-timing-function', - type: t.easing - }]; - var nodeSizeHashOverride = function nodeSizeHashOverride(ele, parsedProp) { - if (parsedProp.value === 'label') { - return -ele.poolIndex(); // no hash key hits is using label size (hitrate for perf probably low anyway) - } else { - return parsedProp.pfValue; - } - }; - var nodeBody = [{ - name: 'height', - type: t.nodeSize, - triggersBounds: diff.any, - hashOverride: nodeSizeHashOverride - }, { - name: 'width', - type: t.nodeSize, - triggersBounds: diff.any, - hashOverride: nodeSizeHashOverride - }, { - name: 'shape', - type: t.nodeShape, - triggersBounds: diff.any - }, { - name: 'shape-polygon-points', - type: t.polygonPointList, - triggersBounds: diff.any - }, { - name: 'corner-radius', - type: t.cornerRadius - }, { - name: 'background-color', - type: t.color - }, { - name: 'background-fill', - type: t.fill - }, { - name: 'background-opacity', - type: t.zeroOneNumber - }, { - name: 'background-blacken', - type: t.nOneOneNumber - }, { - name: 'background-gradient-stop-colors', - type: t.colors - }, { - name: 'background-gradient-stop-positions', - type: t.percentages - }, { - name: 'background-gradient-direction', - type: t.gradientDirection - }, { - name: 'padding', - type: t.sizeMaybePercent, - triggersBounds: diff.any - }, { - name: 'padding-relative-to', - type: t.paddingRelativeTo, - triggersBounds: diff.any - }, { - name: 'bounds-expansion', - type: t.boundsExpansion, - triggersBounds: diff.any - }]; - var nodeBorder = [{ - name: 'border-color', - type: t.color - }, { - name: 'border-opacity', - type: t.zeroOneNumber - }, { - name: 'border-width', - type: t.size, - triggersBounds: diff.any - }, { - name: 'border-style', - type: t.borderStyle - }, { - name: 'border-cap', - type: t.lineCap - }, { - name: 'border-join', - type: t.lineJoin - }, { - name: 'border-dash-pattern', - type: t.numbers - }, { - name: 'border-dash-offset', - type: t.number - }, { - name: 'border-position', - type: t.linePosition - }]; - var nodeOutline = [{ - name: 'outline-color', - type: t.color - }, { - name: 'outline-opacity', - type: t.zeroOneNumber - }, { - name: 'outline-width', - type: t.size, - triggersBounds: diff.any - }, { - name: 'outline-style', - type: t.borderStyle - }, { - name: 'outline-offset', - type: t.size, - triggersBounds: diff.any - }]; - var backgroundImage = [{ - name: 'background-image', - type: t.urls - }, { - name: 'background-image-crossorigin', - type: t.bgCrossOrigin - }, { - name: 'background-image-opacity', - type: t.zeroOneNumbers - }, { - name: 'background-image-containment', - type: t.bgContainment - }, { - name: 'background-image-smoothing', - type: t.bools - }, { - name: 'background-position-x', - type: t.bgPos - }, { - name: 'background-position-y', - type: t.bgPos - }, { - name: 'background-width-relative-to', - type: t.bgRelativeTo - }, { - name: 'background-height-relative-to', - type: t.bgRelativeTo - }, { - name: 'background-repeat', - type: t.bgRepeat - }, { - name: 'background-fit', - type: t.bgFit - }, { - name: 'background-clip', - type: t.bgClip - }, { - name: 'background-width', - type: t.bgWH - }, { - name: 'background-height', - type: t.bgWH - }, { - name: 'background-offset-x', - type: t.bgPos - }, { - name: 'background-offset-y', - type: t.bgPos - }]; - var compound = [{ - name: 'position', - type: t.position, - triggersBounds: diff.any - }, { - name: 'compound-sizing-wrt-labels', - type: t.compoundIncludeLabels, - triggersBounds: diff.any - }, { - name: 'min-width', - type: t.size, - triggersBounds: diff.any - }, { - name: 'min-width-bias-left', - type: t.sizeMaybePercent, - triggersBounds: diff.any - }, { - name: 'min-width-bias-right', - type: t.sizeMaybePercent, - triggersBounds: diff.any - }, { - name: 'min-height', - type: t.size, - triggersBounds: diff.any - }, { - name: 'min-height-bias-top', - type: t.sizeMaybePercent, - triggersBounds: diff.any - }, { - name: 'min-height-bias-bottom', - type: t.sizeMaybePercent, - triggersBounds: diff.any - }]; - var edgeLine = [{ - name: 'line-style', - type: t.lineStyle - }, { - name: 'line-color', - type: t.color - }, { - name: 'line-fill', - type: t.fill - }, { - name: 'line-cap', - type: t.lineCap - }, { - name: 'line-opacity', - type: t.zeroOneNumber - }, { - name: 'line-dash-pattern', - type: t.numbers - }, { - name: 'line-dash-offset', - type: t.number - }, { - name: 'line-outline-width', - type: t.size - }, { - name: 'line-outline-color', - type: t.color - }, { - name: 'line-gradient-stop-colors', - type: t.colors - }, { - name: 'line-gradient-stop-positions', - type: t.percentages - }, { - name: 'curve-style', - type: t.curveStyle, - triggersBounds: diff.any, - triggersBoundsOfParallelBeziers: true - }, { - name: 'haystack-radius', - type: t.zeroOneNumber, - triggersBounds: diff.any - }, { - name: 'source-endpoint', - type: t.edgeEndpoint, - triggersBounds: diff.any - }, { - name: 'target-endpoint', - type: t.edgeEndpoint, - triggersBounds: diff.any - }, { - name: 'control-point-step-size', - type: t.size, - triggersBounds: diff.any - }, { - name: 'control-point-distances', - type: t.bidirectionalSizes, - triggersBounds: diff.any - }, { - name: 'control-point-weights', - type: t.numbers, - triggersBounds: diff.any - }, { - name: 'segment-distances', - type: t.bidirectionalSizes, - triggersBounds: diff.any - }, { - name: 'segment-weights', - type: t.numbers, - triggersBounds: diff.any - }, { - name: 'segment-radii', - type: t.numbers, - triggersBounds: diff.any - }, { - name: 'radius-type', - type: t.radiusType, - triggersBounds: diff.any - }, { - name: 'taxi-turn', - type: t.bidirectionalSizeMaybePercent, - triggersBounds: diff.any - }, { - name: 'taxi-turn-min-distance', - type: t.size, - triggersBounds: diff.any - }, { - name: 'taxi-direction', - type: t.axisDirection, - triggersBounds: diff.any - }, { - name: 'taxi-radius', - type: t.number, - triggersBounds: diff.any - }, { - name: 'edge-distances', - type: t.edgeDistances, - triggersBounds: diff.any - }, { - name: 'arrow-scale', - type: t.positiveNumber, - triggersBounds: diff.any - }, { - name: 'loop-direction', - type: t.angle, - triggersBounds: diff.any - }, { - name: 'loop-sweep', - type: t.angle, - triggersBounds: diff.any - }, { - name: 'source-distance-from-node', - type: t.size, - triggersBounds: diff.any - }, { - name: 'target-distance-from-node', - type: t.size, - triggersBounds: diff.any - }]; - var ghost = [{ - name: 'ghost', - type: t.bool, - triggersBounds: diff.any - }, { - name: 'ghost-offset-x', - type: t.bidirectionalSize, - triggersBounds: diff.any - }, { - name: 'ghost-offset-y', - type: t.bidirectionalSize, - triggersBounds: diff.any - }, { - name: 'ghost-opacity', - type: t.zeroOneNumber - }]; - var core = [{ - name: 'selection-box-color', - type: t.color - }, { - name: 'selection-box-opacity', - type: t.zeroOneNumber - }, { - name: 'selection-box-border-color', - type: t.color - }, { - name: 'selection-box-border-width', - type: t.size - }, { - name: 'active-bg-color', - type: t.color - }, { - name: 'active-bg-opacity', - type: t.zeroOneNumber - }, { - name: 'active-bg-size', - type: t.size - }, { - name: 'outside-texture-bg-color', - type: t.color - }, { - name: 'outside-texture-bg-opacity', - type: t.zeroOneNumber - }]; - - // pie backgrounds for nodes - var pie = []; - styfn$2.pieBackgroundN = 16; // because the pie properties are numbered, give access to a constant N (for renderer use) - pie.push({ - name: 'pie-size', - type: t.sizeMaybePercent - }); - for (var i = 1; i <= styfn$2.pieBackgroundN; i++) { - pie.push({ - name: 'pie-' + i + '-background-color', - type: t.color - }); - pie.push({ - name: 'pie-' + i + '-background-size', - type: t.percent - }); - pie.push({ - name: 'pie-' + i + '-background-opacity', - type: t.zeroOneNumber - }); - } - - // edge arrows - var edgeArrow = []; - var arrowPrefixes = styfn$2.arrowPrefixes = ['source', 'mid-source', 'target', 'mid-target']; - [{ - name: 'arrow-shape', - type: t.arrowShape, - triggersBounds: diff.any - }, { - name: 'arrow-color', - type: t.color - }, { - name: 'arrow-fill', - type: t.arrowFill - }, { - name: 'arrow-width', - type: t.arrowWidth - }].forEach(function (prop) { - arrowPrefixes.forEach(function (prefix) { - var name = prefix + '-' + prop.name; - var type = prop.type, - triggersBounds = prop.triggersBounds; - edgeArrow.push({ - name: name, - type: type, - triggersBounds: triggersBounds - }); - }); - }, {}); - var props = styfn$2.properties = [].concat(behavior, transition, visibility, overlay, underlay, ghost, commonLabel, labelDimensions, mainLabel, sourceLabel, targetLabel, nodeBody, nodeBorder, nodeOutline, backgroundImage, pie, compound, edgeLine, edgeArrow, core); - var propGroups = styfn$2.propertyGroups = { - // common to all eles - behavior: behavior, - transition: transition, - visibility: visibility, - overlay: overlay, - underlay: underlay, - ghost: ghost, - // labels - commonLabel: commonLabel, - labelDimensions: labelDimensions, - mainLabel: mainLabel, - sourceLabel: sourceLabel, - targetLabel: targetLabel, - // node props - nodeBody: nodeBody, - nodeBorder: nodeBorder, - nodeOutline: nodeOutline, - backgroundImage: backgroundImage, - pie: pie, - compound: compound, - // edge props - edgeLine: edgeLine, - edgeArrow: edgeArrow, - core: core - }; - var propGroupNames = styfn$2.propertyGroupNames = {}; - var propGroupKeys = styfn$2.propertyGroupKeys = Object.keys(propGroups); - propGroupKeys.forEach(function (key) { - propGroupNames[key] = propGroups[key].map(function (prop) { - return prop.name; - }); - propGroups[key].forEach(function (prop) { - return prop.groupKey = key; - }); - }); - - // define aliases - var aliases = styfn$2.aliases = [{ - name: 'content', - pointsTo: 'label' - }, { - name: 'control-point-distance', - pointsTo: 'control-point-distances' - }, { - name: 'control-point-weight', - pointsTo: 'control-point-weights' - }, { - name: 'segment-distance', - pointsTo: 'segment-distances' - }, { - name: 'segment-weight', - pointsTo: 'segment-weights' - }, { - name: 'segment-radius', - pointsTo: 'segment-radii' - }, { - name: 'edge-text-rotation', - pointsTo: 'text-rotation' - }, { - name: 'padding-left', - pointsTo: 'padding' - }, { - name: 'padding-right', - pointsTo: 'padding' - }, { - name: 'padding-top', - pointsTo: 'padding' - }, { - name: 'padding-bottom', - pointsTo: 'padding' - }]; - - // list of property names - styfn$2.propertyNames = props.map(function (p) { - return p.name; - }); - - // allow access of properties by name ( e.g. style.properties.height ) - for (var _i = 0; _i < props.length; _i++) { - var prop = props[_i]; - props[prop.name] = prop; // allow lookup by name - } - - // map aliases - for (var _i2 = 0; _i2 < aliases.length; _i2++) { - var alias = aliases[_i2]; - var pointsToProp = props[alias.pointsTo]; - var aliasProp = { - name: alias.name, - alias: true, - pointsTo: pointsToProp - }; - - // add alias prop for parsing - props.push(aliasProp); - props[alias.name] = aliasProp; // allow lookup by name - } -})(); - -styfn$2.getDefaultProperty = function (name) { - return this.getDefaultProperties()[name]; -}; -styfn$2.getDefaultProperties = function () { - var _p = this._private; - if (_p.defaultProperties != null) { - return _p.defaultProperties; - } - var rawProps = extend({ - // core props - 'selection-box-color': '#ddd', - 'selection-box-opacity': 0.65, - 'selection-box-border-color': '#aaa', - 'selection-box-border-width': 1, - 'active-bg-color': 'black', - 'active-bg-opacity': 0.15, - 'active-bg-size': 30, - 'outside-texture-bg-color': '#000', - 'outside-texture-bg-opacity': 0.125, - // common node/edge props - 'events': 'yes', - 'text-events': 'no', - 'text-valign': 'top', - 'text-halign': 'center', - 'text-justification': 'auto', - 'line-height': 1, - 'color': '#000', - 'text-outline-color': '#000', - 'text-outline-width': 0, - 'text-outline-opacity': 1, - 'text-opacity': 1, - 'text-decoration': 'none', - 'text-transform': 'none', - 'text-wrap': 'none', - 'text-overflow-wrap': 'whitespace', - 'text-max-width': 9999, - 'text-background-color': '#000', - 'text-background-opacity': 0, - 'text-background-shape': 'rectangle', - 'text-background-padding': 0, - 'text-border-opacity': 0, - 'text-border-width': 0, - 'text-border-style': 'solid', - 'text-border-color': '#000', - 'font-family': 'Helvetica Neue, Helvetica, sans-serif', - 'font-style': 'normal', - 'font-weight': 'normal', - 'font-size': 16, - 'min-zoomed-font-size': 0, - 'text-rotation': 'none', - 'source-text-rotation': 'none', - 'target-text-rotation': 'none', - 'visibility': 'visible', - 'display': 'element', - 'opacity': 1, - 'z-compound-depth': 'auto', - 'z-index-compare': 'auto', - 'z-index': 0, - 'label': '', - 'text-margin-x': 0, - 'text-margin-y': 0, - 'source-label': '', - 'source-text-offset': 0, - 'source-text-margin-x': 0, - 'source-text-margin-y': 0, - 'target-label': '', - 'target-text-offset': 0, - 'target-text-margin-x': 0, - 'target-text-margin-y': 0, - 'overlay-opacity': 0, - 'overlay-color': '#000', - 'overlay-padding': 10, - 'overlay-shape': 'round-rectangle', - 'overlay-corner-radius': 'auto', - 'underlay-opacity': 0, - 'underlay-color': '#000', - 'underlay-padding': 10, - 'underlay-shape': 'round-rectangle', - 'underlay-corner-radius': 'auto', - 'transition-property': 'none', - 'transition-duration': 0, - 'transition-delay': 0, - 'transition-timing-function': 'linear', - // node props - 'background-blacken': 0, - 'background-color': '#999', - 'background-fill': 'solid', - 'background-opacity': 1, - 'background-image': 'none', - 'background-image-crossorigin': 'anonymous', - 'background-image-opacity': 1, - 'background-image-containment': 'inside', - 'background-image-smoothing': 'yes', - 'background-position-x': '50%', - 'background-position-y': '50%', - 'background-offset-x': 0, - 'background-offset-y': 0, - 'background-width-relative-to': 'include-padding', - 'background-height-relative-to': 'include-padding', - 'background-repeat': 'no-repeat', - 'background-fit': 'none', - 'background-clip': 'node', - 'background-width': 'auto', - 'background-height': 'auto', - 'border-color': '#000', - 'border-opacity': 1, - 'border-width': 0, - 'border-style': 'solid', - 'border-dash-pattern': [4, 2], - 'border-dash-offset': 0, - 'border-cap': 'butt', - 'border-join': 'miter', - 'border-position': 'center', - 'outline-color': '#999', - 'outline-opacity': 1, - 'outline-width': 0, - 'outline-offset': 0, - 'outline-style': 'solid', - 'height': 30, - 'width': 30, - 'shape': 'ellipse', - 'shape-polygon-points': '-1, -1, 1, -1, 1, 1, -1, 1', - 'corner-radius': 'auto', - 'bounds-expansion': 0, - // node gradient - 'background-gradient-direction': 'to-bottom', - 'background-gradient-stop-colors': '#999', - 'background-gradient-stop-positions': '0%', - // ghost props - 'ghost': 'no', - 'ghost-offset-y': 0, - 'ghost-offset-x': 0, - 'ghost-opacity': 0, - // compound props - 'padding': 0, - 'padding-relative-to': 'width', - 'position': 'origin', - 'compound-sizing-wrt-labels': 'include', - 'min-width': 0, - 'min-width-bias-left': 0, - 'min-width-bias-right': 0, - 'min-height': 0, - 'min-height-bias-top': 0, - 'min-height-bias-bottom': 0 - }, { - // node pie bg - 'pie-size': '100%' - }, [{ - name: 'pie-{{i}}-background-color', - value: 'black' - }, { - name: 'pie-{{i}}-background-size', - value: '0%' - }, { - name: 'pie-{{i}}-background-opacity', - value: 1 - }].reduce(function (css, prop) { - for (var i = 1; i <= styfn$2.pieBackgroundN; i++) { - var name = prop.name.replace('{{i}}', i); - var val = prop.value; - css[name] = val; - } - return css; - }, {}), { - // edge props - 'line-style': 'solid', - 'line-color': '#999', - 'line-fill': 'solid', - 'line-cap': 'butt', - 'line-opacity': 1, - 'line-outline-width': 0, - 'line-outline-color': '#000', - 'line-gradient-stop-colors': '#999', - 'line-gradient-stop-positions': '0%', - 'control-point-step-size': 40, - 'control-point-weights': 0.5, - 'segment-weights': 0.5, - 'segment-distances': 20, - 'segment-radii': 15, - 'radius-type': 'arc-radius', - 'taxi-turn': '50%', - 'taxi-radius': 15, - 'taxi-turn-min-distance': 10, - 'taxi-direction': 'auto', - 'edge-distances': 'intersection', - 'curve-style': 'haystack', - 'haystack-radius': 0, - 'arrow-scale': 1, - 'loop-direction': '-45deg', - 'loop-sweep': '-90deg', - 'source-distance-from-node': 0, - 'target-distance-from-node': 0, - 'source-endpoint': 'outside-to-node', - 'target-endpoint': 'outside-to-node', - 'line-dash-pattern': [6, 3], - 'line-dash-offset': 0 - }, [{ - name: 'arrow-shape', - value: 'none' - }, { - name: 'arrow-color', - value: '#999' - }, { - name: 'arrow-fill', - value: 'filled' - }, { - name: 'arrow-width', - value: 1 - }].reduce(function (css, prop) { - styfn$2.arrowPrefixes.forEach(function (prefix) { - var name = prefix + '-' + prop.name; - var val = prop.value; - css[name] = val; - }); - return css; - }, {})); - var parsedProps = {}; - for (var i = 0; i < this.properties.length; i++) { - var prop = this.properties[i]; - if (prop.pointsTo) { - continue; - } - var name = prop.name; - var val = rawProps[name]; - var parsedProp = this.parse(name, val); - parsedProps[name] = parsedProp; - } - _p.defaultProperties = parsedProps; - return _p.defaultProperties; -}; -styfn$2.addDefaultStylesheet = function () { - this.selector(':parent').css({ - 'shape': 'rectangle', - 'padding': 10, - 'background-color': '#eee', - 'border-color': '#ccc', - 'border-width': 1 - }).selector('edge').css({ - 'width': 3 - }).selector(':loop').css({ - 'curve-style': 'bezier' - }).selector('edge:compound').css({ - 'curve-style': 'bezier', - 'source-endpoint': 'outside-to-line', - 'target-endpoint': 'outside-to-line' - }).selector(':selected').css({ - 'background-color': '#0169D9', - 'line-color': '#0169D9', - 'source-arrow-color': '#0169D9', - 'target-arrow-color': '#0169D9', - 'mid-source-arrow-color': '#0169D9', - 'mid-target-arrow-color': '#0169D9' - }).selector(':parent:selected').css({ - 'background-color': '#CCE1F9', - 'border-color': '#aec8e5' - }).selector(':active').css({ - 'overlay-color': 'black', - 'overlay-padding': 10, - 'overlay-opacity': 0.25 - }); - this.defaultLength = this.length; -}; - -var styfn$1 = {}; - -// a caching layer for property parsing -styfn$1.parse = function (name, value, propIsBypass, propIsFlat) { - var self = this; - - // function values can't be cached in all cases, and there isn't much benefit of caching them anyway - if (fn$6(value)) { - return self.parseImplWarn(name, value, propIsBypass, propIsFlat); - } - var flatKey = propIsFlat === 'mapping' || propIsFlat === true || propIsFlat === false || propIsFlat == null ? 'dontcare' : propIsFlat; - var bypassKey = propIsBypass ? 't' : 'f'; - var valueKey = '' + value; - var argHash = hashStrings(name, valueKey, bypassKey, flatKey); - var propCache = self.propCache = self.propCache || []; - var ret; - if (!(ret = propCache[argHash])) { - ret = propCache[argHash] = self.parseImplWarn(name, value, propIsBypass, propIsFlat); - } - - // - bypasses can't be shared b/c the value can be changed by animations or otherwise overridden - // - mappings can't be shared b/c mappings are per-element - if (propIsBypass || propIsFlat === 'mapping') { - // need a copy since props are mutated later in their lifecycles - ret = copy(ret); - if (ret) { - ret.value = copy(ret.value); // because it could be an array, e.g. colour - } - } - - return ret; -}; -styfn$1.parseImplWarn = function (name, value, propIsBypass, propIsFlat) { - var prop = this.parseImpl(name, value, propIsBypass, propIsFlat); - if (!prop && value != null) { - warn("The style property `".concat(name, ": ").concat(value, "` is invalid")); - } - if (prop && (prop.name === 'width' || prop.name === 'height') && value === 'label') { - warn('The style value of `label` is deprecated for `' + prop.name + '`'); - } - return prop; -}; - -// parse a property; return null on invalid; return parsed property otherwise -// fields : -// - name : the name of the property -// - value : the parsed, native-typed value of the property -// - strValue : a string value that represents the property value in valid css -// - bypass : true iff the property is a bypass property -styfn$1.parseImpl = function (name, value, propIsBypass, propIsFlat) { - var self = this; - name = camel2dash(name); // make sure the property name is in dash form (e.g. 'property-name' not 'propertyName') - - var property = self.properties[name]; - var passedValue = value; - var types = self.types; - if (!property) { - return null; - } // return null on property of unknown name - if (value === undefined) { - return null; - } // can't assign undefined - - // the property may be an alias - if (property.alias) { - property = property.pointsTo; - name = property.name; - } - var valueIsString = string(value); - if (valueIsString) { - // trim the value to make parsing easier - value = value.trim(); - } - var type = property.type; - if (!type) { - return null; - } // no type, no luck - - // check if bypass is null or empty string (i.e. indication to delete bypass property) - if (propIsBypass && (value === '' || value === null)) { - return { - name: name, - value: value, - bypass: true, - deleteBypass: true - }; - } - - // check if value is a function used as a mapper - if (fn$6(value)) { - return { - name: name, - value: value, - strValue: 'fn', - mapped: types.fn, - bypass: propIsBypass - }; - } - - // check if value is mapped - var data, mapData; - if (!valueIsString || propIsFlat || value.length < 7 || value[1] !== 'a') ; else if (value.length >= 7 && value[0] === 'd' && (data = new RegExp(types.data.regex).exec(value))) { - if (propIsBypass) { - return false; - } // mappers not allowed in bypass - - var mapped = types.data; - return { - name: name, - value: data, - strValue: '' + value, - mapped: mapped, - field: data[1], - bypass: propIsBypass - }; - } else if (value.length >= 10 && value[0] === 'm' && (mapData = new RegExp(types.mapData.regex).exec(value))) { - if (propIsBypass) { - return false; - } // mappers not allowed in bypass - if (type.multiple) { - return false; - } // impossible to map to num - - var _mapped = types.mapData; - - // we can map only if the type is a colour or a number - if (!(type.color || type.number)) { - return false; - } - var valueMin = this.parse(name, mapData[4]); // parse to validate - if (!valueMin || valueMin.mapped) { - return false; - } // can't be invalid or mapped - - var valueMax = this.parse(name, mapData[5]); // parse to validate - if (!valueMax || valueMax.mapped) { - return false; - } // can't be invalid or mapped - - // check if valueMin and valueMax are the same - if (valueMin.pfValue === valueMax.pfValue || valueMin.strValue === valueMax.strValue) { - warn('`' + name + ': ' + value + '` is not a valid mapper because the output range is zero; converting to `' + name + ': ' + valueMin.strValue + '`'); - return this.parse(name, valueMin.strValue); // can't make much of a mapper without a range - } else if (type.color) { - var c1 = valueMin.value; - var c2 = valueMax.value; - var same = c1[0] === c2[0] // red - && c1[1] === c2[1] // green - && c1[2] === c2[2] // blue - && ( - // optional alpha - c1[3] === c2[3] // same alpha outright - || (c1[3] == null || c1[3] === 1 // full opacity for colour 1? - ) && (c2[3] == null || c2[3] === 1) // full opacity for colour 2? - ); - - if (same) { - return false; - } // can't make a mapper without a range - } - - return { - name: name, - value: mapData, - strValue: '' + value, - mapped: _mapped, - field: mapData[1], - fieldMin: parseFloat(mapData[2]), - // min & max are numeric - fieldMax: parseFloat(mapData[3]), - valueMin: valueMin.value, - valueMax: valueMax.value, - bypass: propIsBypass - }; - } - if (type.multiple && propIsFlat !== 'multiple') { - var vals; - if (valueIsString) { - vals = value.split(/\s+/); - } else if (array(value)) { - vals = value; - } else { - vals = [value]; - } - if (type.evenMultiple && vals.length % 2 !== 0) { - return null; - } - var valArr = []; - var unitsArr = []; - var pfValArr = []; - var strVal = ''; - var hasEnum = false; - for (var i = 0; i < vals.length; i++) { - var p = self.parse(name, vals[i], propIsBypass, 'multiple'); - hasEnum = hasEnum || string(p.value); - valArr.push(p.value); - pfValArr.push(p.pfValue != null ? p.pfValue : p.value); - unitsArr.push(p.units); - strVal += (i > 0 ? ' ' : '') + p.strValue; - } - if (type.validate && !type.validate(valArr, unitsArr)) { - return null; - } - if (type.singleEnum && hasEnum) { - if (valArr.length === 1 && string(valArr[0])) { - return { - name: name, - value: valArr[0], - strValue: valArr[0], - bypass: propIsBypass - }; - } else { - return null; - } - } - return { - name: name, - value: valArr, - pfValue: pfValArr, - strValue: strVal, - bypass: propIsBypass, - units: unitsArr - }; - } - - // several types also allow enums - var checkEnums = function checkEnums() { - for (var _i = 0; _i < type.enums.length; _i++) { - var en = type.enums[_i]; - if (en === value) { - return { - name: name, - value: value, - strValue: '' + value, - bypass: propIsBypass - }; - } - } - return null; - }; - - // check the type and return the appropriate object - if (type.number) { - var units; - var implicitUnits = 'px'; // not set => px - - if (type.units) { - // use specified units if set - units = type.units; - } - if (type.implicitUnits) { - implicitUnits = type.implicitUnits; - } - if (!type.unitless) { - if (valueIsString) { - var unitsRegex = 'px|em' + (type.allowPercent ? '|\\%' : ''); - if (units) { - unitsRegex = units; - } // only allow explicit units if so set - var match = value.match('^(' + number + ')(' + unitsRegex + ')?' + '$'); - if (match) { - value = match[1]; - units = match[2] || implicitUnits; - } - } else if (!units || type.implicitUnits) { - units = implicitUnits; // implicitly px if unspecified - } - } - - value = parseFloat(value); - - // if not a number and enums not allowed, then the value is invalid - if (isNaN(value) && type.enums === undefined) { - return null; - } - - // check if this number type also accepts special keywords in place of numbers - // (i.e. `left`, `auto`, etc) - if (isNaN(value) && type.enums !== undefined) { - value = passedValue; - return checkEnums(); - } - - // check if value must be an integer - if (type.integer && !integer(value)) { - return null; - } - - // check value is within range - if (type.min !== undefined && (value < type.min || type.strictMin && value === type.min) || type.max !== undefined && (value > type.max || type.strictMax && value === type.max)) { - return null; - } - var ret = { - name: name, - value: value, - strValue: '' + value + (units ? units : ''), - units: units, - bypass: propIsBypass - }; - - // normalise value in pixels - if (type.unitless || units !== 'px' && units !== 'em') { - ret.pfValue = value; - } else { - ret.pfValue = units === 'px' || !units ? value : this.getEmSizeInPixels() * value; - } - - // normalise value in ms - if (units === 'ms' || units === 's') { - ret.pfValue = units === 'ms' ? value : 1000 * value; - } - - // normalise value in rad - if (units === 'deg' || units === 'rad') { - ret.pfValue = units === 'rad' ? value : deg2rad(value); - } - - // normalize value in % - if (units === '%') { - ret.pfValue = value / 100; - } - return ret; - } else if (type.propList) { - var props = []; - var propsStr = '' + value; - if (propsStr === 'none') ; else { - // go over each prop - - var propsSplit = propsStr.split(/\s*,\s*|\s+/); - for (var _i2 = 0; _i2 < propsSplit.length; _i2++) { - var propName = propsSplit[_i2].trim(); - if (self.properties[propName]) { - props.push(propName); - } else { - warn('`' + propName + '` is not a valid property name'); - } - } - if (props.length === 0) { - return null; - } - } - return { - name: name, - value: props, - strValue: props.length === 0 ? 'none' : props.join(' '), - bypass: propIsBypass - }; - } else if (type.color) { - var tuple = color2tuple(value); - if (!tuple) { - return null; - } - return { - name: name, - value: tuple, - pfValue: tuple, - strValue: 'rgb(' + tuple[0] + ',' + tuple[1] + ',' + tuple[2] + ')', - // n.b. no spaces b/c of multiple support - bypass: propIsBypass - }; - } else if (type.regex || type.regexes) { - // first check enums - if (type.enums) { - var enumProp = checkEnums(); - if (enumProp) { - return enumProp; - } - } - var regexes = type.regexes ? type.regexes : [type.regex]; - for (var _i3 = 0; _i3 < regexes.length; _i3++) { - var regex = new RegExp(regexes[_i3]); // make a regex from the type string - var m = regex.exec(value); - if (m) { - // regex matches - return { - name: name, - value: type.singleRegexMatchValue ? m[1] : m, - strValue: '' + value, - bypass: propIsBypass - }; - } - } - return null; // didn't match any - } else if (type.string) { - // just return - return { - name: name, - value: '' + value, - strValue: '' + value, - bypass: propIsBypass - }; - } else if (type.enums) { - // check enums last because it's a combo type in others - return checkEnums(); - } else { - return null; // not a type we can handle - } -}; - -var Style = function Style(cy) { - if (!(this instanceof Style)) { - return new Style(cy); - } - if (!core(cy)) { - error('A style must have a core reference'); - return; - } - this._private = { - cy: cy, - coreStyle: {} - }; - this.length = 0; - this.resetToDefault(); -}; -var styfn = Style.prototype; -styfn.instanceString = function () { - return 'style'; -}; - -// remove all contexts -styfn.clear = function () { - var _p = this._private; - var cy = _p.cy; - var eles = cy.elements(); - for (var i = 0; i < this.length; i++) { - this[i] = undefined; - } - this.length = 0; - _p.contextStyles = {}; - _p.propDiffs = {}; - this.cleanElements(eles, true); - eles.forEach(function (ele) { - var ele_p = ele[0]._private; - ele_p.styleDirty = true; - ele_p.appliedInitStyle = false; - }); - return this; // chaining -}; - -styfn.resetToDefault = function () { - this.clear(); - this.addDefaultStylesheet(); - return this; -}; - -// builds a style object for the 'core' selector -styfn.core = function (propName) { - return this._private.coreStyle[propName] || this.getDefaultProperty(propName); -}; - -// create a new context from the specified selector string and switch to that context -styfn.selector = function (selectorStr) { - // 'core' is a special case and does not need a selector - var selector = selectorStr === 'core' ? null : new Selector(selectorStr); - var i = this.length++; // new context means new index - this[i] = { - selector: selector, - properties: [], - mappedProperties: [], - index: i - }; - return this; // chaining -}; - -// add one or many css rules to the current context -styfn.css = function () { - var self = this; - var args = arguments; - if (args.length === 1) { - var map = args[0]; - for (var i = 0; i < self.properties.length; i++) { - var prop = self.properties[i]; - var mapVal = map[prop.name]; - if (mapVal === undefined) { - mapVal = map[dash2camel(prop.name)]; - } - if (mapVal !== undefined) { - this.cssRule(prop.name, mapVal); - } - } - } else if (args.length === 2) { - this.cssRule(args[0], args[1]); - } - - // do nothing if args are invalid - - return this; // chaining -}; - -styfn.style = styfn.css; - -// add a single css rule to the current context -styfn.cssRule = function (name, value) { - // name-value pair - var property = this.parse(name, value); - - // add property to current context if valid - if (property) { - var i = this.length - 1; - this[i].properties.push(property); - this[i].properties[property.name] = property; // allow access by name as well - - if (property.name.match(/pie-(\d+)-background-size/) && property.value) { - this._private.hasPie = true; - } - if (property.mapped) { - this[i].mappedProperties.push(property); - } - - // add to core style if necessary - var currentSelectorIsCore = !this[i].selector; - if (currentSelectorIsCore) { - this._private.coreStyle[property.name] = property; - } - } - return this; // chaining -}; - -styfn.append = function (style) { - if (stylesheet(style)) { - style.appendToStyle(this); - } else if (array(style)) { - this.appendFromJson(style); - } else if (string(style)) { - this.appendFromString(style); - } // you probably wouldn't want to append a Style, since you'd duplicate the default parts - - return this; -}; - -// static function -Style.fromJson = function (cy, json) { - var style = new Style(cy); - style.fromJson(json); - return style; -}; -Style.fromString = function (cy, string) { - return new Style(cy).fromString(string); -}; -[styfn$8, styfn$7, styfn$6, styfn$5, styfn$4, styfn$3, styfn$2, styfn$1].forEach(function (props) { - extend(styfn, props); -}); -Style.types = styfn.types; -Style.properties = styfn.properties; -Style.propertyGroups = styfn.propertyGroups; -Style.propertyGroupNames = styfn.propertyGroupNames; -Style.propertyGroupKeys = styfn.propertyGroupKeys; - -var corefn$2 = { - style: function style(newStyle) { - if (newStyle) { - var s = this.setStyle(newStyle); - s.update(); - } - return this._private.style; - }, - setStyle: function setStyle(style) { - var _p = this._private; - if (stylesheet(style)) { - _p.style = style.generateStyle(this); - } else if (array(style)) { - _p.style = Style.fromJson(this, style); - } else if (string(style)) { - _p.style = Style.fromString(this, style); - } else { - _p.style = Style(this); - } - return _p.style; - }, - // e.g. cy.data() changed => recalc ele mappers - updateStyle: function updateStyle() { - this.mutableElements().updateStyle(); // just send to all eles - } -}; - -var defaultSelectionType = 'single'; -var corefn$1 = { - autolock: function autolock(bool) { - if (bool !== undefined) { - this._private.autolock = bool ? true : false; - } else { - return this._private.autolock; - } - return this; // chaining - }, - - autoungrabify: function autoungrabify(bool) { - if (bool !== undefined) { - this._private.autoungrabify = bool ? true : false; - } else { - return this._private.autoungrabify; - } - return this; // chaining - }, - - autounselectify: function autounselectify(bool) { - if (bool !== undefined) { - this._private.autounselectify = bool ? true : false; - } else { - return this._private.autounselectify; - } - return this; // chaining - }, - - selectionType: function selectionType(selType) { - var _p = this._private; - if (_p.selectionType == null) { - _p.selectionType = defaultSelectionType; - } - if (selType !== undefined) { - if (selType === 'additive' || selType === 'single') { - _p.selectionType = selType; - } - } else { - return _p.selectionType; - } - return this; - }, - panningEnabled: function panningEnabled(bool) { - if (bool !== undefined) { - this._private.panningEnabled = bool ? true : false; - } else { - return this._private.panningEnabled; - } - return this; // chaining - }, - - userPanningEnabled: function userPanningEnabled(bool) { - if (bool !== undefined) { - this._private.userPanningEnabled = bool ? true : false; - } else { - return this._private.userPanningEnabled; - } - return this; // chaining - }, - - zoomingEnabled: function zoomingEnabled(bool) { - if (bool !== undefined) { - this._private.zoomingEnabled = bool ? true : false; - } else { - return this._private.zoomingEnabled; - } - return this; // chaining - }, - - userZoomingEnabled: function userZoomingEnabled(bool) { - if (bool !== undefined) { - this._private.userZoomingEnabled = bool ? true : false; - } else { - return this._private.userZoomingEnabled; - } - return this; // chaining - }, - - boxSelectionEnabled: function boxSelectionEnabled(bool) { - if (bool !== undefined) { - this._private.boxSelectionEnabled = bool ? true : false; - } else { - return this._private.boxSelectionEnabled; - } - return this; // chaining - }, - - pan: function pan() { - var args = arguments; - var pan = this._private.pan; - var dim, val, dims, x, y; - switch (args.length) { - case 0: - // .pan() - return pan; - case 1: - if (string(args[0])) { - // .pan('x') - dim = args[0]; - return pan[dim]; - } else if (plainObject(args[0])) { - // .pan({ x: 0, y: 100 }) - if (!this._private.panningEnabled) { - return this; - } - dims = args[0]; - x = dims.x; - y = dims.y; - if (number$1(x)) { - pan.x = x; - } - if (number$1(y)) { - pan.y = y; - } - this.emit('pan viewport'); - } - break; - case 2: - // .pan('x', 100) - if (!this._private.panningEnabled) { - return this; - } - dim = args[0]; - val = args[1]; - if ((dim === 'x' || dim === 'y') && number$1(val)) { - pan[dim] = val; - } - this.emit('pan viewport'); - break; - // invalid - } - - this.notify('viewport'); - return this; // chaining - }, - - panBy: function panBy(arg0, arg1) { - var args = arguments; - var pan = this._private.pan; - var dim, val, dims, x, y; - if (!this._private.panningEnabled) { - return this; - } - switch (args.length) { - case 1: - if (plainObject(arg0)) { - // .panBy({ x: 0, y: 100 }) - dims = args[0]; - x = dims.x; - y = dims.y; - if (number$1(x)) { - pan.x += x; - } - if (number$1(y)) { - pan.y += y; - } - this.emit('pan viewport'); - } - break; - case 2: - // .panBy('x', 100) - dim = arg0; - val = arg1; - if ((dim === 'x' || dim === 'y') && number$1(val)) { - pan[dim] += val; - } - this.emit('pan viewport'); - break; - // invalid - } - - this.notify('viewport'); - return this; // chaining - }, - - fit: function fit(elements, padding) { - var viewportState = this.getFitViewport(elements, padding); - if (viewportState) { - var _p = this._private; - _p.zoom = viewportState.zoom; - _p.pan = viewportState.pan; - this.emit('pan zoom viewport'); - this.notify('viewport'); - } - return this; // chaining - }, - - getFitViewport: function getFitViewport(elements, padding) { - if (number$1(elements) && padding === undefined) { - // elements is optional - padding = elements; - elements = undefined; - } - if (!this._private.panningEnabled || !this._private.zoomingEnabled) { - return; - } - var bb; - if (string(elements)) { - var sel = elements; - elements = this.$(sel); - } else if (boundingBox(elements)) { - // assume bb - var bbe = elements; - bb = { - x1: bbe.x1, - y1: bbe.y1, - x2: bbe.x2, - y2: bbe.y2 - }; - bb.w = bb.x2 - bb.x1; - bb.h = bb.y2 - bb.y1; - } else if (!elementOrCollection(elements)) { - elements = this.mutableElements(); - } - if (elementOrCollection(elements) && elements.empty()) { - return; - } // can't fit to nothing - - bb = bb || elements.boundingBox(); - var w = this.width(); - var h = this.height(); - var zoom; - padding = number$1(padding) ? padding : 0; - if (!isNaN(w) && !isNaN(h) && w > 0 && h > 0 && !isNaN(bb.w) && !isNaN(bb.h) && bb.w > 0 && bb.h > 0) { - zoom = Math.min((w - 2 * padding) / bb.w, (h - 2 * padding) / bb.h); - - // crop zoom - zoom = zoom > this._private.maxZoom ? this._private.maxZoom : zoom; - zoom = zoom < this._private.minZoom ? this._private.minZoom : zoom; - var pan = { - // now pan to middle - x: (w - zoom * (bb.x1 + bb.x2)) / 2, - y: (h - zoom * (bb.y1 + bb.y2)) / 2 - }; - return { - zoom: zoom, - pan: pan - }; - } - return; - }, - zoomRange: function zoomRange(min, max) { - var _p = this._private; - if (max == null) { - var opts = min; - min = opts.min; - max = opts.max; - } - if (number$1(min) && number$1(max) && min <= max) { - _p.minZoom = min; - _p.maxZoom = max; - } else if (number$1(min) && max === undefined && min <= _p.maxZoom) { - _p.minZoom = min; - } else if (number$1(max) && min === undefined && max >= _p.minZoom) { - _p.maxZoom = max; - } - return this; - }, - minZoom: function minZoom(zoom) { - if (zoom === undefined) { - return this._private.minZoom; - } else { - return this.zoomRange({ - min: zoom - }); - } - }, - maxZoom: function maxZoom(zoom) { - if (zoom === undefined) { - return this._private.maxZoom; - } else { - return this.zoomRange({ - max: zoom - }); - } - }, - getZoomedViewport: function getZoomedViewport(params) { - var _p = this._private; - var currentPan = _p.pan; - var currentZoom = _p.zoom; - var pos; // in rendered px - var zoom; - var bail = false; - if (!_p.zoomingEnabled) { - // zooming disabled - bail = true; - } - if (number$1(params)) { - // then set the zoom - zoom = params; - } else if (plainObject(params)) { - // then zoom about a point - zoom = params.level; - if (params.position != null) { - pos = modelToRenderedPosition(params.position, currentZoom, currentPan); - } else if (params.renderedPosition != null) { - pos = params.renderedPosition; - } - if (pos != null && !_p.panningEnabled) { - // panning disabled - bail = true; - } - } - - // crop zoom - zoom = zoom > _p.maxZoom ? _p.maxZoom : zoom; - zoom = zoom < _p.minZoom ? _p.minZoom : zoom; - - // can't zoom with invalid params - if (bail || !number$1(zoom) || zoom === currentZoom || pos != null && (!number$1(pos.x) || !number$1(pos.y))) { - return null; - } - if (pos != null) { - // set zoom about position - var pan1 = currentPan; - var zoom1 = currentZoom; - var zoom2 = zoom; - var pan2 = { - x: -zoom2 / zoom1 * (pos.x - pan1.x) + pos.x, - y: -zoom2 / zoom1 * (pos.y - pan1.y) + pos.y - }; - return { - zoomed: true, - panned: true, - zoom: zoom2, - pan: pan2 - }; - } else { - // just set the zoom - return { - zoomed: true, - panned: false, - zoom: zoom, - pan: currentPan - }; - } - }, - zoom: function zoom(params) { - if (params === undefined) { - // get - return this._private.zoom; - } else { - // set - var vp = this.getZoomedViewport(params); - var _p = this._private; - if (vp == null || !vp.zoomed) { - return this; - } - _p.zoom = vp.zoom; - if (vp.panned) { - _p.pan.x = vp.pan.x; - _p.pan.y = vp.pan.y; - } - this.emit('zoom' + (vp.panned ? ' pan' : '') + ' viewport'); - this.notify('viewport'); - return this; // chaining - } - }, - - viewport: function viewport(opts) { - var _p = this._private; - var zoomDefd = true; - var panDefd = true; - var events = []; // to trigger - var zoomFailed = false; - var panFailed = false; - if (!opts) { - return this; - } - if (!number$1(opts.zoom)) { - zoomDefd = false; - } - if (!plainObject(opts.pan)) { - panDefd = false; - } - if (!zoomDefd && !panDefd) { - return this; - } - if (zoomDefd) { - var z = opts.zoom; - if (z < _p.minZoom || z > _p.maxZoom || !_p.zoomingEnabled) { - zoomFailed = true; - } else { - _p.zoom = z; - events.push('zoom'); - } - } - if (panDefd && (!zoomFailed || !opts.cancelOnFailedZoom) && _p.panningEnabled) { - var p = opts.pan; - if (number$1(p.x)) { - _p.pan.x = p.x; - panFailed = false; - } - if (number$1(p.y)) { - _p.pan.y = p.y; - panFailed = false; - } - if (!panFailed) { - events.push('pan'); - } - } - if (events.length > 0) { - events.push('viewport'); - this.emit(events.join(' ')); - this.notify('viewport'); - } - return this; // chaining - }, - - center: function center(elements) { - var pan = this.getCenterPan(elements); - if (pan) { - this._private.pan = pan; - this.emit('pan viewport'); - this.notify('viewport'); - } - return this; // chaining - }, - - getCenterPan: function getCenterPan(elements, zoom) { - if (!this._private.panningEnabled) { - return; - } - if (string(elements)) { - var selector = elements; - elements = this.mutableElements().filter(selector); - } else if (!elementOrCollection(elements)) { - elements = this.mutableElements(); - } - if (elements.length === 0) { - return; - } // can't centre pan to nothing - - var bb = elements.boundingBox(); - var w = this.width(); - var h = this.height(); - zoom = zoom === undefined ? this._private.zoom : zoom; - var pan = { - // middle - x: (w - zoom * (bb.x1 + bb.x2)) / 2, - y: (h - zoom * (bb.y1 + bb.y2)) / 2 - }; - return pan; - }, - reset: function reset() { - if (!this._private.panningEnabled || !this._private.zoomingEnabled) { - return this; - } - this.viewport({ - pan: { - x: 0, - y: 0 - }, - zoom: 1 - }); - return this; // chaining - }, - - invalidateSize: function invalidateSize() { - this._private.sizeCache = null; - }, - size: function size() { - var _p = this._private; - var container = _p.container; - var cy = this; - return _p.sizeCache = _p.sizeCache || (container ? function () { - var style = cy.window().getComputedStyle(container); - var val = function val(name) { - return parseFloat(style.getPropertyValue(name)); - }; - return { - width: container.clientWidth - val('padding-left') - val('padding-right'), - height: container.clientHeight - val('padding-top') - val('padding-bottom') - }; - }() : { - // fallback if no container (not 0 b/c can be used for dividing etc) - width: 1, - height: 1 - }); - }, - width: function width() { - return this.size().width; - }, - height: function height() { - return this.size().height; - }, - extent: function extent() { - var pan = this._private.pan; - var zoom = this._private.zoom; - var rb = this.renderedExtent(); - var b = { - x1: (rb.x1 - pan.x) / zoom, - x2: (rb.x2 - pan.x) / zoom, - y1: (rb.y1 - pan.y) / zoom, - y2: (rb.y2 - pan.y) / zoom - }; - b.w = b.x2 - b.x1; - b.h = b.y2 - b.y1; - return b; - }, - renderedExtent: function renderedExtent() { - var width = this.width(); - var height = this.height(); - return { - x1: 0, - y1: 0, - x2: width, - y2: height, - w: width, - h: height - }; - }, - multiClickDebounceTime: function multiClickDebounceTime(_int) { - if (_int) this._private.multiClickDebounceTime = _int;else return this._private.multiClickDebounceTime; - return this; // chaining - } -}; - -// aliases -corefn$1.centre = corefn$1.center; - -// backwards compatibility -corefn$1.autolockNodes = corefn$1.autolock; -corefn$1.autoungrabifyNodes = corefn$1.autoungrabify; - -var fn = { - data: cytoscape_esm_define.data({ - field: 'data', - bindingEvent: 'data', - allowBinding: true, - allowSetting: true, - settingEvent: 'data', - settingTriggersEvent: true, - triggerFnName: 'trigger', - allowGetting: true, - updateStyle: true - }), - removeData: cytoscape_esm_define.removeData({ - field: 'data', - event: 'data', - triggerFnName: 'trigger', - triggerEvent: true, - updateStyle: true - }), - scratch: cytoscape_esm_define.data({ - field: 'scratch', - bindingEvent: 'scratch', - allowBinding: true, - allowSetting: true, - settingEvent: 'scratch', - settingTriggersEvent: true, - triggerFnName: 'trigger', - allowGetting: true, - updateStyle: true - }), - removeScratch: cytoscape_esm_define.removeData({ - field: 'scratch', - event: 'scratch', - triggerFnName: 'trigger', - triggerEvent: true, - updateStyle: true - }) -}; - -// aliases -fn.attr = fn.data; -fn.removeAttr = fn.removeData; - -var Core = function Core(opts) { - var cy = this; - opts = extend({}, opts); - var container = opts.container; - - // allow for passing a wrapped jquery object - // e.g. cytoscape({ container: $('#cy') }) - if (container && !htmlElement(container) && htmlElement(container[0])) { - container = container[0]; - } - var reg = container ? container._cyreg : null; // e.g. already registered some info (e.g. readies) via jquery - reg = reg || {}; - if (reg && reg.cy) { - reg.cy.destroy(); - reg = {}; // old instance => replace reg completely - } - - var readies = reg.readies = reg.readies || []; - if (container) { - container._cyreg = reg; - } // make sure container assoc'd reg points to this cy - reg.cy = cy; - var head = _window !== undefined && container !== undefined && !opts.headless; - var options = opts; - options.layout = extend({ - name: head ? 'grid' : 'null' - }, options.layout); - options.renderer = extend({ - name: head ? 'canvas' : 'null' - }, options.renderer); - var defVal = function defVal(def, val, altVal) { - if (val !== undefined) { - return val; - } else if (altVal !== undefined) { - return altVal; - } else { - return def; - } - }; - var _p = this._private = { - container: container, - // html dom ele container - ready: false, - // whether ready has been triggered - options: options, - // cached options - elements: new Collection(this), - // elements in the graph - listeners: [], - // list of listeners - aniEles: new Collection(this), - // elements being animated - data: options.data || {}, - // data for the core - scratch: {}, - // scratch object for core - layout: null, - renderer: null, - destroyed: false, - // whether destroy was called - notificationsEnabled: true, - // whether notifications are sent to the renderer - minZoom: 1e-50, - maxZoom: 1e50, - zoomingEnabled: defVal(true, options.zoomingEnabled), - userZoomingEnabled: defVal(true, options.userZoomingEnabled), - panningEnabled: defVal(true, options.panningEnabled), - userPanningEnabled: defVal(true, options.userPanningEnabled), - boxSelectionEnabled: defVal(true, options.boxSelectionEnabled), - autolock: defVal(false, options.autolock, options.autolockNodes), - autoungrabify: defVal(false, options.autoungrabify, options.autoungrabifyNodes), - autounselectify: defVal(false, options.autounselectify), - styleEnabled: options.styleEnabled === undefined ? head : options.styleEnabled, - zoom: number$1(options.zoom) ? options.zoom : 1, - pan: { - x: plainObject(options.pan) && number$1(options.pan.x) ? options.pan.x : 0, - y: plainObject(options.pan) && number$1(options.pan.y) ? options.pan.y : 0 - }, - animation: { - // object for currently-running animations - current: [], - queue: [] - }, - hasCompoundNodes: false, - multiClickDebounceTime: defVal(250, options.multiClickDebounceTime) - }; - this.createEmitter(); - - // set selection type - this.selectionType(options.selectionType); - - // init zoom bounds - this.zoomRange({ - min: options.minZoom, - max: options.maxZoom - }); - var loadExtData = function loadExtData(extData, next) { - var anyIsPromise = extData.some(promise); - if (anyIsPromise) { - return Promise$1.all(extData).then(next); // load all data asynchronously, then exec rest of init - } else { - next(extData); // exec synchronously for convenience - } - }; - - // start with the default stylesheet so we have something before loading an external stylesheet - if (_p.styleEnabled) { - cy.setStyle([]); - } - - // create the renderer - var rendererOptions = extend({}, options, options.renderer); // allow rendering hints in top level options - cy.initRenderer(rendererOptions); - var setElesAndLayout = function setElesAndLayout(elements, onload, ondone) { - cy.notifications(false); - - // remove old elements - var oldEles = cy.mutableElements(); - if (oldEles.length > 0) { - oldEles.remove(); - } - if (elements != null) { - if (plainObject(elements) || array(elements)) { - cy.add(elements); - } - } - cy.one('layoutready', function (e) { - cy.notifications(true); - cy.emit(e); // we missed this event by turning notifications off, so pass it on - - cy.one('load', onload); - cy.emitAndNotify('load'); - }).one('layoutstop', function () { - cy.one('done', ondone); - cy.emit('done'); - }); - var layoutOpts = extend({}, cy._private.options.layout); - layoutOpts.eles = cy.elements(); - cy.layout(layoutOpts).run(); - }; - loadExtData([options.style, options.elements], function (thens) { - var initStyle = thens[0]; - var initEles = thens[1]; - - // init style - if (_p.styleEnabled) { - cy.style().append(initStyle); - } - - // initial load - setElesAndLayout(initEles, function () { - // onready - cy.startAnimationLoop(); - _p.ready = true; - - // if a ready callback is specified as an option, the bind it - if (fn$6(options.ready)) { - cy.on('ready', options.ready); - } - - // bind all the ready handlers registered before creating this instance - for (var i = 0; i < readies.length; i++) { - var fn = readies[i]; - cy.on('ready', fn); - } - if (reg) { - reg.readies = []; - } // clear b/c we've bound them all and don't want to keep it around in case a new core uses the same div etc - - cy.emit('ready'); - }, options.done); - }); -}; -var corefn = Core.prototype; // short alias - -extend(corefn, { - instanceString: function instanceString() { - return 'core'; - }, - isReady: function isReady() { - return this._private.ready; - }, - destroyed: function destroyed() { - return this._private.destroyed; - }, - ready: function ready(fn) { - if (this.isReady()) { - this.emitter().emit('ready', [], fn); // just calls fn as though triggered via ready event - } else { - this.on('ready', fn); - } - return this; - }, - destroy: function destroy() { - var cy = this; - if (cy.destroyed()) return; - cy.stopAnimationLoop(); - cy.destroyRenderer(); - this.emit('destroy'); - cy._private.destroyed = true; - return cy; - }, - hasElementWithId: function hasElementWithId(id) { - return this._private.elements.hasElementWithId(id); - }, - getElementById: function getElementById(id) { - return this._private.elements.getElementById(id); - }, - hasCompoundNodes: function hasCompoundNodes() { - return this._private.hasCompoundNodes; - }, - headless: function headless() { - return this._private.renderer.isHeadless(); - }, - styleEnabled: function styleEnabled() { - return this._private.styleEnabled; - }, - addToPool: function addToPool(eles) { - this._private.elements.merge(eles); - return this; // chaining - }, - - removeFromPool: function removeFromPool(eles) { - this._private.elements.unmerge(eles); - return this; - }, - container: function container() { - return this._private.container || null; - }, - window: function window() { - var container = this._private.container; - if (container == null) return _window; - var ownerDocument = this._private.container.ownerDocument; - if (ownerDocument === undefined || ownerDocument == null) { - return _window; - } - return ownerDocument.defaultView || _window; - }, - mount: function mount(container) { - if (container == null) { - return; - } - var cy = this; - var _p = cy._private; - var options = _p.options; - if (!htmlElement(container) && htmlElement(container[0])) { - container = container[0]; - } - cy.stopAnimationLoop(); - cy.destroyRenderer(); - _p.container = container; - _p.styleEnabled = true; - cy.invalidateSize(); - cy.initRenderer(extend({}, options, options.renderer, { - // allow custom renderer name to be re-used, otherwise use canvas - name: options.renderer.name === 'null' ? 'canvas' : options.renderer.name - })); - cy.startAnimationLoop(); - cy.style(options.style); - cy.emit('mount'); - return cy; - }, - unmount: function unmount() { - var cy = this; - cy.stopAnimationLoop(); - cy.destroyRenderer(); - cy.initRenderer({ - name: 'null' - }); - cy.emit('unmount'); - return cy; - }, - options: function options() { - return copy(this._private.options); - }, - json: function json(obj) { - var cy = this; - var _p = cy._private; - var eles = cy.mutableElements(); - var getFreshRef = function getFreshRef(ele) { - return cy.getElementById(ele.id()); - }; - if (plainObject(obj)) { - // set - - cy.startBatch(); - if (obj.elements) { - var idInJson = {}; - var updateEles = function updateEles(jsons, gr) { - var toAdd = []; - var toMod = []; - for (var i = 0; i < jsons.length; i++) { - var json = jsons[i]; - if (!json.data.id) { - warn('cy.json() cannot handle elements without an ID attribute'); - continue; - } - var id = '' + json.data.id; // id must be string - var ele = cy.getElementById(id); - idInJson[id] = true; - if (ele.length !== 0) { - // existing element should be updated - toMod.push({ - ele: ele, - json: json - }); - } else { - // otherwise should be added - if (gr) { - json.group = gr; - toAdd.push(json); - } else { - toAdd.push(json); - } - } - } - cy.add(toAdd); - for (var _i = 0; _i < toMod.length; _i++) { - var _toMod$_i = toMod[_i], - _ele = _toMod$_i.ele, - _json = _toMod$_i.json; - _ele.json(_json); - } - }; - if (array(obj.elements)) { - // elements: [] - updateEles(obj.elements); - } else { - // elements: { nodes: [], edges: [] } - var grs = ['nodes', 'edges']; - for (var i = 0; i < grs.length; i++) { - var gr = grs[i]; - var elements = obj.elements[gr]; - if (array(elements)) { - updateEles(elements, gr); - } - } - } - var parentsToRemove = cy.collection(); - eles.filter(function (ele) { - return !idInJson[ele.id()]; - }).forEach(function (ele) { - if (ele.isParent()) { - parentsToRemove.merge(ele); - } else { - ele.remove(); - } - }); - - // so that children are not removed w/parent - parentsToRemove.forEach(function (ele) { - return ele.children().move({ - parent: null - }); - }); - - // intermediate parents may be moved by prior line, so make sure we remove by fresh refs - parentsToRemove.forEach(function (ele) { - return getFreshRef(ele).remove(); - }); - } - if (obj.style) { - cy.style(obj.style); - } - if (obj.zoom != null && obj.zoom !== _p.zoom) { - cy.zoom(obj.zoom); - } - if (obj.pan) { - if (obj.pan.x !== _p.pan.x || obj.pan.y !== _p.pan.y) { - cy.pan(obj.pan); - } - } - if (obj.data) { - cy.data(obj.data); - } - var fields = ['minZoom', 'maxZoom', 'zoomingEnabled', 'userZoomingEnabled', 'panningEnabled', 'userPanningEnabled', 'boxSelectionEnabled', 'autolock', 'autoungrabify', 'autounselectify', 'multiClickDebounceTime']; - for (var _i2 = 0; _i2 < fields.length; _i2++) { - var f = fields[_i2]; - if (obj[f] != null) { - cy[f](obj[f]); - } - } - cy.endBatch(); - return this; // chaining - } else { - // get - var flat = !!obj; - var json = {}; - if (flat) { - json.elements = this.elements().map(function (ele) { - return ele.json(); - }); - } else { - json.elements = {}; - eles.forEach(function (ele) { - var group = ele.group(); - if (!json.elements[group]) { - json.elements[group] = []; - } - json.elements[group].push(ele.json()); - }); - } - if (this._private.styleEnabled) { - json.style = cy.style().json(); - } - json.data = copy(cy.data()); - var options = _p.options; - json.zoomingEnabled = _p.zoomingEnabled; - json.userZoomingEnabled = _p.userZoomingEnabled; - json.zoom = _p.zoom; - json.minZoom = _p.minZoom; - json.maxZoom = _p.maxZoom; - json.panningEnabled = _p.panningEnabled; - json.userPanningEnabled = _p.userPanningEnabled; - json.pan = copy(_p.pan); - json.boxSelectionEnabled = _p.boxSelectionEnabled; - json.renderer = copy(options.renderer); - json.hideEdgesOnViewport = options.hideEdgesOnViewport; - json.textureOnViewport = options.textureOnViewport; - json.wheelSensitivity = options.wheelSensitivity; - json.motionBlur = options.motionBlur; - json.multiClickDebounceTime = options.multiClickDebounceTime; - return json; - } - } -}); -corefn.$id = corefn.getElementById; -[corefn$9, corefn$8, elesfn, corefn$7, corefn$6, corefn$5, corefn$4, corefn$3, corefn$2, corefn$1, fn].forEach(function (props) { - extend(corefn, props); -}); - -/* eslint-disable no-unused-vars */ -var defaults$7 = { - fit: true, - // whether to fit the viewport to the graph - directed: false, - // whether the tree is directed downwards (or edges can point in any direction if false) - padding: 30, - // padding on fit - circle: false, - // put depths in concentric circles if true, put depths top down if false - grid: false, - // whether to create an even grid into which the DAG is placed (circle:false only) - spacingFactor: 1.75, - // positive spacing factor, larger => more space between nodes (N.B. n/a if causes overlap) - boundingBox: undefined, - // constrain layout bounds; { x1, y1, x2, y2 } or { x1, y1, w, h } - avoidOverlap: true, - // prevents node overlap, may overflow boundingBox if not enough space - nodeDimensionsIncludeLabels: false, - // Excludes the label when calculating node bounding boxes for the layout algorithm - roots: undefined, - // the roots of the trees - depthSort: undefined, - // a sorting function to order nodes at equal depth. e.g. function(a, b){ return a.data('weight') - b.data('weight') } - animate: false, - // whether to transition the node positions - animationDuration: 500, - // duration of animation in ms if enabled - animationEasing: undefined, - // easing of animation if enabled, - animateFilter: function animateFilter(node, i) { - return true; - }, - // a function that determines whether the node should be animated. All nodes animated by default on animate enabled. Non-animated nodes are positioned immediately when the layout starts - ready: undefined, - // callback on layoutready - stop: undefined, - // callback on layoutstop - transform: function transform(node, position) { - return position; - } // transform a given node position. Useful for changing flow direction in discrete layouts -}; - -var deprecatedOptionDefaults = { - maximal: false, - // whether to shift nodes down their natural BFS depths in order to avoid upwards edges (DAGS only); setting acyclic to true sets maximal to true also - acyclic: false // whether the tree is acyclic and thus a node could be shifted (due to the maximal option) multiple times without causing an infinite loop; setting to true sets maximal to true also; if you are uncertain whether a tree is acyclic, set to false to avoid potential infinite loops -}; - -/* eslint-enable */ - -var getInfo = function getInfo(ele) { - return ele.scratch('breadthfirst'); -}; -var setInfo = function setInfo(ele, obj) { - return ele.scratch('breadthfirst', obj); -}; -function BreadthFirstLayout(options) { - this.options = extend({}, defaults$7, deprecatedOptionDefaults, options); -} -BreadthFirstLayout.prototype.run = function () { - var params = this.options; - var options = params; - var cy = params.cy; - var eles = options.eles; - var nodes = eles.nodes().filter(function (n) { - return !n.isParent(); - }); - var graph = eles; - var directed = options.directed; - var maximal = options.acyclic || options.maximal || options.maximalAdjustments > 0; // maximalAdjustments for compat. w/ old code; also, setting acyclic to true sets maximal to true - - var bb = makeBoundingBox(options.boundingBox ? options.boundingBox : { - x1: 0, - y1: 0, - w: cy.width(), - h: cy.height() - }); - var roots; - if (elementOrCollection(options.roots)) { - roots = options.roots; - } else if (array(options.roots)) { - var rootsArray = []; - for (var i = 0; i < options.roots.length; i++) { - var id = options.roots[i]; - var ele = cy.getElementById(id); - rootsArray.push(ele); - } - roots = cy.collection(rootsArray); - } else if (string(options.roots)) { - roots = cy.$(options.roots); - } else { - if (directed) { - roots = nodes.roots(); - } else { - var components = eles.components(); - roots = cy.collection(); - var _loop = function _loop(_i) { - var comp = components[_i]; - var maxDegree = comp.maxDegree(false); - var compRoots = comp.filter(function (ele) { - return ele.degree(false) === maxDegree; - }); - roots = roots.add(compRoots); - }; - for (var _i = 0; _i < components.length; _i++) { - _loop(_i); - } - } - } - var depths = []; - var foundByBfs = {}; - var addToDepth = function addToDepth(ele, d) { - if (depths[d] == null) { - depths[d] = []; - } - var i = depths[d].length; - depths[d].push(ele); - setInfo(ele, { - index: i, - depth: d - }); - }; - var changeDepth = function changeDepth(ele, newDepth) { - var _getInfo = getInfo(ele), - depth = _getInfo.depth, - index = _getInfo.index; - depths[depth][index] = null; - addToDepth(ele, newDepth); - }; - - // find the depths of the nodes - graph.bfs({ - roots: roots, - directed: options.directed, - visit: function visit(node, edge, pNode, i, depth) { - var ele = node[0]; - var id = ele.id(); - addToDepth(ele, depth); - foundByBfs[id] = true; - } - }); - - // check for nodes not found by bfs - var orphanNodes = []; - for (var _i2 = 0; _i2 < nodes.length; _i2++) { - var _ele = nodes[_i2]; - if (foundByBfs[_ele.id()]) { - continue; - } else { - orphanNodes.push(_ele); - } - } - - // assign the nodes a depth and index - - var assignDepthsAt = function assignDepthsAt(i) { - var eles = depths[i]; - for (var j = 0; j < eles.length; j++) { - var _ele2 = eles[j]; - if (_ele2 == null) { - eles.splice(j, 1); - j--; - continue; - } - setInfo(_ele2, { - depth: i, - index: j - }); - } - }; - var assignDepths = function assignDepths() { - for (var _i3 = 0; _i3 < depths.length; _i3++) { - assignDepthsAt(_i3); - } - }; - var adjustMaximally = function adjustMaximally(ele, shifted) { - var eInfo = getInfo(ele); - var incomers = ele.incomers().filter(function (el) { - return el.isNode() && eles.has(el); - }); - var maxDepth = -1; - var id = ele.id(); - for (var k = 0; k < incomers.length; k++) { - var incmr = incomers[k]; - var iInfo = getInfo(incmr); - maxDepth = Math.max(maxDepth, iInfo.depth); - } - if (eInfo.depth <= maxDepth) { - if (!options.acyclic && shifted[id]) { - return null; - } - var newDepth = maxDepth + 1; - changeDepth(ele, newDepth); - shifted[id] = newDepth; - return true; - } - return false; - }; - - // for the directed case, try to make the edges all go down (i.e. depth i => depth i + 1) - if (directed && maximal) { - var Q = []; - var shifted = {}; - var enqueue = function enqueue(n) { - return Q.push(n); - }; - var dequeue = function dequeue() { - return Q.shift(); - }; - nodes.forEach(function (n) { - return Q.push(n); - }); - while (Q.length > 0) { - var _ele3 = dequeue(); - var didShift = adjustMaximally(_ele3, shifted); - if (didShift) { - _ele3.outgoers().filter(function (el) { - return el.isNode() && eles.has(el); - }).forEach(enqueue); - } else if (didShift === null) { - warn('Detected double maximal shift for node `' + _ele3.id() + '`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs.'); - break; // exit on failure - } - } - } - - assignDepths(); // clear holes - - // find min distance we need to leave between nodes - var minDistance = 0; - if (options.avoidOverlap) { - for (var _i4 = 0; _i4 < nodes.length; _i4++) { - var n = nodes[_i4]; - var nbb = n.layoutDimensions(options); - var w = nbb.w; - var h = nbb.h; - minDistance = Math.max(minDistance, w, h); - } - } - - // get the weighted percent for an element based on its connectivity to other levels - var cachedWeightedPercent = {}; - var getWeightedPercent = function getWeightedPercent(ele) { - if (cachedWeightedPercent[ele.id()]) { - return cachedWeightedPercent[ele.id()]; - } - var eleDepth = getInfo(ele).depth; - var neighbors = ele.neighborhood(); - var percent = 0; - var samples = 0; - for (var _i5 = 0; _i5 < neighbors.length; _i5++) { - var neighbor = neighbors[_i5]; - if (neighbor.isEdge() || neighbor.isParent() || !nodes.has(neighbor)) { - continue; - } - var bf = getInfo(neighbor); - if (bf == null) { - continue; - } - var index = bf.index; - var depth = bf.depth; - - // unassigned neighbours shouldn't affect the ordering - if (index == null || depth == null) { - continue; - } - var nDepth = depths[depth].length; - if (depth < eleDepth) { - // only get influenced by elements above - percent += index / nDepth; - samples++; - } - } - samples = Math.max(1, samples); - percent = percent / samples; - if (samples === 0) { - // put lone nodes at the start - percent = 0; - } - cachedWeightedPercent[ele.id()] = percent; - return percent; - }; - - // rearrange the indices in each depth level based on connectivity - - var sortFn = function sortFn(a, b) { - var apct = getWeightedPercent(a); - var bpct = getWeightedPercent(b); - var diff = apct - bpct; - if (diff === 0) { - return ascending(a.id(), b.id()); // make sure sort doesn't have don't-care comparisons - } else { - return diff; - } - }; - if (options.depthSort !== undefined) { - sortFn = options.depthSort; - } - - // sort each level to make connected nodes closer - for (var _i6 = 0; _i6 < depths.length; _i6++) { - depths[_i6].sort(sortFn); - assignDepthsAt(_i6); - } - - // assign orphan nodes to a new top-level depth - var orphanDepth = []; - for (var _i7 = 0; _i7 < orphanNodes.length; _i7++) { - orphanDepth.push(orphanNodes[_i7]); - } - depths.unshift(orphanDepth); - assignDepths(); - var biggestDepthSize = 0; - for (var _i8 = 0; _i8 < depths.length; _i8++) { - biggestDepthSize = Math.max(depths[_i8].length, biggestDepthSize); - } - var center = { - x: bb.x1 + bb.w / 2, - y: bb.x1 + bb.h / 2 - }; - var maxDepthSize = depths.reduce(function (max, eles) { - return Math.max(max, eles.length); - }, 0); - var getPosition = function getPosition(ele) { - var _getInfo2 = getInfo(ele), - depth = _getInfo2.depth, - index = _getInfo2.index; - var depthSize = depths[depth].length; - var distanceX = Math.max(bb.w / ((options.grid ? maxDepthSize : depthSize) + 1), minDistance); - var distanceY = Math.max(bb.h / (depths.length + 1), minDistance); - var radiusStepSize = Math.min(bb.w / 2 / depths.length, bb.h / 2 / depths.length); - radiusStepSize = Math.max(radiusStepSize, minDistance); - if (!options.circle) { - var epos = { - x: center.x + (index + 1 - (depthSize + 1) / 2) * distanceX, - y: (depth + 1) * distanceY - }; - return epos; - } else { - var radius = radiusStepSize * depth + radiusStepSize - (depths.length > 0 && depths[0].length <= 3 ? radiusStepSize / 2 : 0); - var theta = 2 * Math.PI / depths[depth].length * index; - if (depth === 0 && depths[0].length === 1) { - radius = 1; - } - return { - x: center.x + radius * Math.cos(theta), - y: center.y + radius * Math.sin(theta) - }; - } - }; - eles.nodes().layoutPositions(this, options, getPosition); - return this; // chaining -}; - -var defaults$6 = { - fit: true, - // whether to fit the viewport to the graph - padding: 30, - // the padding on fit - boundingBox: undefined, - // constrain layout bounds; { x1, y1, x2, y2 } or { x1, y1, w, h } - avoidOverlap: true, - // prevents node overlap, may overflow boundingBox and radius if not enough space - nodeDimensionsIncludeLabels: false, - // Excludes the label when calculating node bounding boxes for the layout algorithm - spacingFactor: undefined, - // Applies a multiplicative factor (>0) to expand or compress the overall area that the nodes take up - radius: undefined, - // the radius of the circle - startAngle: 3 / 2 * Math.PI, - // where nodes start in radians - sweep: undefined, - // how many radians should be between the first and last node (defaults to full circle) - clockwise: true, - // whether the layout should go clockwise (true) or counterclockwise/anticlockwise (false) - sort: undefined, - // a sorting function to order the nodes; e.g. function(a, b){ return a.data('weight') - b.data('weight') } - animate: false, - // whether to transition the node positions - animationDuration: 500, - // duration of animation in ms if enabled - animationEasing: undefined, - // easing of animation if enabled - animateFilter: function animateFilter(node, i) { - return true; - }, - // a function that determines whether the node should be animated. All nodes animated by default on animate enabled. Non-animated nodes are positioned immediately when the layout starts - ready: undefined, - // callback on layoutready - stop: undefined, - // callback on layoutstop - transform: function transform(node, position) { - return position; - } // transform a given node position. Useful for changing flow direction in discrete layouts -}; - -function CircleLayout(options) { - this.options = extend({}, defaults$6, options); -} -CircleLayout.prototype.run = function () { - var params = this.options; - var options = params; - var cy = params.cy; - var eles = options.eles; - var clockwise = options.counterclockwise !== undefined ? !options.counterclockwise : options.clockwise; - var nodes = eles.nodes().not(':parent'); - if (options.sort) { - nodes = nodes.sort(options.sort); - } - var bb = makeBoundingBox(options.boundingBox ? options.boundingBox : { - x1: 0, - y1: 0, - w: cy.width(), - h: cy.height() - }); - var center = { - x: bb.x1 + bb.w / 2, - y: bb.y1 + bb.h / 2 - }; - var sweep = options.sweep === undefined ? 2 * Math.PI - 2 * Math.PI / nodes.length : options.sweep; - var dTheta = sweep / Math.max(1, nodes.length - 1); - var r; - var minDistance = 0; - for (var i = 0; i < nodes.length; i++) { - var n = nodes[i]; - var nbb = n.layoutDimensions(options); - var w = nbb.w; - var h = nbb.h; - minDistance = Math.max(minDistance, w, h); - } - if (number$1(options.radius)) { - r = options.radius; - } else if (nodes.length <= 1) { - r = 0; - } else { - r = Math.min(bb.h, bb.w) / 2 - minDistance; - } - - // calculate the radius - if (nodes.length > 1 && options.avoidOverlap) { - // but only if more than one node (can't overlap) - minDistance *= 1.75; // just to have some nice spacing - - var dcos = Math.cos(dTheta) - Math.cos(0); - var dsin = Math.sin(dTheta) - Math.sin(0); - var rMin = Math.sqrt(minDistance * minDistance / (dcos * dcos + dsin * dsin)); // s.t. no nodes overlapping - r = Math.max(rMin, r); - } - var getPos = function getPos(ele, i) { - var theta = options.startAngle + i * dTheta * (clockwise ? 1 : -1); - var rx = r * Math.cos(theta); - var ry = r * Math.sin(theta); - var pos = { - x: center.x + rx, - y: center.y + ry - }; - return pos; - }; - eles.nodes().layoutPositions(this, options, getPos); - return this; // chaining -}; - -var defaults$5 = { - fit: true, - // whether to fit the viewport to the graph - padding: 30, - // the padding on fit - startAngle: 3 / 2 * Math.PI, - // where nodes start in radians - sweep: undefined, - // how many radians should be between the first and last node (defaults to full circle) - clockwise: true, - // whether the layout should go clockwise (true) or counterclockwise/anticlockwise (false) - equidistant: false, - // whether levels have an equal radial distance betwen them, may cause bounding box overflow - minNodeSpacing: 10, - // min spacing between outside of nodes (used for radius adjustment) - boundingBox: undefined, - // constrain layout bounds; { x1, y1, x2, y2 } or { x1, y1, w, h } - avoidOverlap: true, - // prevents node overlap, may overflow boundingBox if not enough space - nodeDimensionsIncludeLabels: false, - // Excludes the label when calculating node bounding boxes for the layout algorithm - height: undefined, - // height of layout area (overrides container height) - width: undefined, - // width of layout area (overrides container width) - spacingFactor: undefined, - // Applies a multiplicative factor (>0) to expand or compress the overall area that the nodes take up - concentric: function concentric(node) { - // returns numeric value for each node, placing higher nodes in levels towards the centre - return node.degree(); - }, - levelWidth: function levelWidth(nodes) { - // the variation of concentric values in each level - return nodes.maxDegree() / 4; - }, - animate: false, - // whether to transition the node positions - animationDuration: 500, - // duration of animation in ms if enabled - animationEasing: undefined, - // easing of animation if enabled - animateFilter: function animateFilter(node, i) { - return true; - }, - // a function that determines whether the node should be animated. All nodes animated by default on animate enabled. Non-animated nodes are positioned immediately when the layout starts - ready: undefined, - // callback on layoutready - stop: undefined, - // callback on layoutstop - transform: function transform(node, position) { - return position; - } // transform a given node position. Useful for changing flow direction in discrete layouts -}; - -function ConcentricLayout(options) { - this.options = extend({}, defaults$5, options); -} -ConcentricLayout.prototype.run = function () { - var params = this.options; - var options = params; - var clockwise = options.counterclockwise !== undefined ? !options.counterclockwise : options.clockwise; - var cy = params.cy; - var eles = options.eles; - var nodes = eles.nodes().not(':parent'); - var bb = makeBoundingBox(options.boundingBox ? options.boundingBox : { - x1: 0, - y1: 0, - w: cy.width(), - h: cy.height() - }); - var center = { - x: bb.x1 + bb.w / 2, - y: bb.y1 + bb.h / 2 - }; - var nodeValues = []; // { node, value } - var maxNodeSize = 0; - for (var i = 0; i < nodes.length; i++) { - var node = nodes[i]; - var value = void 0; - - // calculate the node value - value = options.concentric(node); - nodeValues.push({ - value: value, - node: node - }); - - // for style mapping - node._private.scratch.concentric = value; - } - - // in case we used the `concentric` in style - nodes.updateStyle(); - - // calculate max size now based on potentially updated mappers - for (var _i = 0; _i < nodes.length; _i++) { - var _node = nodes[_i]; - var nbb = _node.layoutDimensions(options); - maxNodeSize = Math.max(maxNodeSize, nbb.w, nbb.h); - } - - // sort node values in descreasing order - nodeValues.sort(function (a, b) { - return b.value - a.value; - }); - var levelWidth = options.levelWidth(nodes); - - // put the values into levels - var levels = [[]]; - var currentLevel = levels[0]; - for (var _i2 = 0; _i2 < nodeValues.length; _i2++) { - var val = nodeValues[_i2]; - if (currentLevel.length > 0) { - var diff = Math.abs(currentLevel[0].value - val.value); - if (diff >= levelWidth) { - currentLevel = []; - levels.push(currentLevel); - } - } - currentLevel.push(val); - } - - // create positions from levels - - var minDist = maxNodeSize + options.minNodeSpacing; // min dist between nodes - - if (!options.avoidOverlap) { - // then strictly constrain to bb - var firstLvlHasMulti = levels.length > 0 && levels[0].length > 1; - var maxR = Math.min(bb.w, bb.h) / 2 - minDist; - var rStep = maxR / (levels.length + firstLvlHasMulti ? 1 : 0); - minDist = Math.min(minDist, rStep); - } - - // find the metrics for each level - var r = 0; - for (var _i3 = 0; _i3 < levels.length; _i3++) { - var level = levels[_i3]; - var sweep = options.sweep === undefined ? 2 * Math.PI - 2 * Math.PI / level.length : options.sweep; - var dTheta = level.dTheta = sweep / Math.max(1, level.length - 1); - - // calculate the radius - if (level.length > 1 && options.avoidOverlap) { - // but only if more than one node (can't overlap) - var dcos = Math.cos(dTheta) - Math.cos(0); - var dsin = Math.sin(dTheta) - Math.sin(0); - var rMin = Math.sqrt(minDist * minDist / (dcos * dcos + dsin * dsin)); // s.t. no nodes overlapping - - r = Math.max(rMin, r); - } - level.r = r; - r += minDist; - } - if (options.equidistant) { - var rDeltaMax = 0; - var _r = 0; - for (var _i4 = 0; _i4 < levels.length; _i4++) { - var _level = levels[_i4]; - var rDelta = _level.r - _r; - rDeltaMax = Math.max(rDeltaMax, rDelta); - } - _r = 0; - for (var _i5 = 0; _i5 < levels.length; _i5++) { - var _level2 = levels[_i5]; - if (_i5 === 0) { - _r = _level2.r; - } - _level2.r = _r; - _r += rDeltaMax; - } - } - - // calculate the node positions - var pos = {}; // id => position - for (var _i6 = 0; _i6 < levels.length; _i6++) { - var _level3 = levels[_i6]; - var _dTheta = _level3.dTheta; - var _r2 = _level3.r; - for (var j = 0; j < _level3.length; j++) { - var _val = _level3[j]; - var theta = options.startAngle + (clockwise ? 1 : -1) * _dTheta * j; - var p = { - x: center.x + _r2 * Math.cos(theta), - y: center.y + _r2 * Math.sin(theta) - }; - pos[_val.node.id()] = p; - } - } - - // position the nodes - eles.nodes().layoutPositions(this, options, function (ele) { - var id = ele.id(); - return pos[id]; - }); - return this; // chaining -}; - -/* -The CoSE layout was written by Gerardo Huck. -https://www.linkedin.com/in/gerardohuck/ - -Based on the following article: -http://dl.acm.org/citation.cfm?id=1498047 - -Modifications tracked on Github. -*/ -var DEBUG; - -/** - * @brief : default layout options - */ -var defaults$4 = { - // Called on `layoutready` - ready: function ready() {}, - // Called on `layoutstop` - stop: function stop() {}, - // Whether to animate while running the layout - // true : Animate continuously as the layout is running - // false : Just show the end result - // 'end' : Animate with the end result, from the initial positions to the end positions - animate: true, - // Easing of the animation for animate:'end' - animationEasing: undefined, - // The duration of the animation for animate:'end' - animationDuration: undefined, - // A function that determines whether the node should be animated - // All nodes animated by default on animate enabled - // Non-animated nodes are positioned immediately when the layout starts - animateFilter: function animateFilter(node, i) { - return true; - }, - // The layout animates only after this many milliseconds for animate:true - // (prevents flashing on fast runs) - animationThreshold: 250, - // Number of iterations between consecutive screen positions update - refresh: 20, - // Whether to fit the network view after when done - fit: true, - // Padding on fit - padding: 30, - // Constrain layout bounds; { x1, y1, x2, y2 } or { x1, y1, w, h } - boundingBox: undefined, - // Excludes the label when calculating node bounding boxes for the layout algorithm - nodeDimensionsIncludeLabels: false, - // Randomize the initial positions of the nodes (true) or use existing positions (false) - randomize: false, - // Extra spacing between components in non-compound graphs - componentSpacing: 40, - // Node repulsion (non overlapping) multiplier - nodeRepulsion: function nodeRepulsion(node) { - return 2048; - }, - // Node repulsion (overlapping) multiplier - nodeOverlap: 4, - // Ideal edge (non nested) length - idealEdgeLength: function idealEdgeLength(edge) { - return 32; - }, - // Divisor to compute edge forces - edgeElasticity: function edgeElasticity(edge) { - return 32; - }, - // Nesting factor (multiplier) to compute ideal edge length for nested edges - nestingFactor: 1.2, - // Gravity force (constant) - gravity: 1, - // Maximum number of iterations to perform - numIter: 1000, - // Initial temperature (maximum node displacement) - initialTemp: 1000, - // Cooling factor (how the temperature is reduced between consecutive iterations - coolingFactor: 0.99, - // Lower temperature threshold (below this point the layout will end) - minTemp: 1.0 -}; - -/** - * @brief : constructor - * @arg options : object containing layout options - */ -function CoseLayout(options) { - this.options = extend({}, defaults$4, options); - this.options.layout = this; - - // Exclude any edge that has a source or target node that is not in the set of passed-in nodes - var nodes = this.options.eles.nodes(); - var edges = this.options.eles.edges(); - var notEdges = edges.filter(function (e) { - var sourceId = e.source().data('id'); - var targetId = e.target().data('id'); - var hasSource = nodes.some(function (n) { - return n.data('id') === sourceId; - }); - var hasTarget = nodes.some(function (n) { - return n.data('id') === targetId; - }); - return !hasSource || !hasTarget; - }); - this.options.eles = this.options.eles.not(notEdges); -} - -/** - * @brief : runs the layout - */ -CoseLayout.prototype.run = function () { - var options = this.options; - var cy = options.cy; - var layout = this; - layout.stopped = false; - if (options.animate === true || options.animate === false) { - layout.emit({ - type: 'layoutstart', - layout: layout - }); - } - - // Set DEBUG - Global variable - if (true === options.debug) { - DEBUG = true; - } else { - DEBUG = false; - } - - // Initialize layout info - var layoutInfo = createLayoutInfo(cy, layout, options); - - // Show LayoutInfo contents if debugging - if (DEBUG) { - printLayoutInfo(layoutInfo); - } - - // If required, randomize node positions - if (options.randomize) { - randomizePositions(layoutInfo); - } - var startTime = performanceNow(); - var refresh = function refresh() { - refreshPositions(layoutInfo, cy, options); - - // Fit the graph if necessary - if (true === options.fit) { - cy.fit(options.padding); - } - }; - var mainLoop = function mainLoop(i) { - if (layout.stopped || i >= options.numIter) { - // logDebug("Layout manually stopped. Stopping computation in step " + i); - return false; - } - - // Do one step in the phisical simulation - step(layoutInfo, options); - - // Update temperature - layoutInfo.temperature = layoutInfo.temperature * options.coolingFactor; - // logDebug("New temperature: " + layoutInfo.temperature); - - if (layoutInfo.temperature < options.minTemp) { - // logDebug("Temperature drop below minimum threshold. Stopping computation in step " + i); - return false; - } - return true; - }; - var done = function done() { - if (options.animate === true || options.animate === false) { - refresh(); - - // Layout has finished - layout.one('layoutstop', options.stop); - layout.emit({ - type: 'layoutstop', - layout: layout - }); - } else { - var nodes = options.eles.nodes(); - var getScaledPos = getScaleInBoundsFn(layoutInfo, options, nodes); - nodes.layoutPositions(layout, options, getScaledPos); - } - }; - var i = 0; - var loopRet = true; - if (options.animate === true) { - var frame = function frame() { - var f = 0; - while (loopRet && f < options.refresh) { - loopRet = mainLoop(i); - i++; - f++; - } - if (!loopRet) { - // it's done - separateComponents(layoutInfo, options); - done(); - } else { - var now = performanceNow(); - if (now - startTime >= options.animationThreshold) { - refresh(); - } - requestAnimationFrame(frame); - } - }; - frame(); - } else { - while (loopRet) { - loopRet = mainLoop(i); - i++; - } - separateComponents(layoutInfo, options); - done(); - } - return this; // chaining -}; - -/** - * @brief : called on continuous layouts to stop them before they finish - */ -CoseLayout.prototype.stop = function () { - this.stopped = true; - if (this.thread) { - this.thread.stop(); - } - this.emit('layoutstop'); - return this; // chaining -}; - -CoseLayout.prototype.destroy = function () { - if (this.thread) { - this.thread.stop(); - } - return this; // chaining -}; - -/** - * @brief : Creates an object which is contains all the data - * used in the layout process - * @arg cy : cytoscape.js object - * @return : layoutInfo object initialized - */ -var createLayoutInfo = function createLayoutInfo(cy, layout, options) { - // Shortcut - var edges = options.eles.edges(); - var nodes = options.eles.nodes(); - var bb = makeBoundingBox(options.boundingBox ? options.boundingBox : { - x1: 0, - y1: 0, - w: cy.width(), - h: cy.height() - }); - var layoutInfo = { - isCompound: cy.hasCompoundNodes(), - layoutNodes: [], - idToIndex: {}, - nodeSize: nodes.size(), - graphSet: [], - indexToGraph: [], - layoutEdges: [], - edgeSize: edges.size(), - temperature: options.initialTemp, - clientWidth: bb.w, - clientHeight: bb.h, - boundingBox: bb - }; - var components = options.eles.components(); - var id2cmptId = {}; - for (var i = 0; i < components.length; i++) { - var component = components[i]; - for (var j = 0; j < component.length; j++) { - var node = component[j]; - id2cmptId[node.id()] = i; - } - } - - // Iterate over all nodes, creating layout nodes - for (var i = 0; i < layoutInfo.nodeSize; i++) { - var n = nodes[i]; - var nbb = n.layoutDimensions(options); - var tempNode = {}; - tempNode.isLocked = n.locked(); - tempNode.id = n.data('id'); - tempNode.parentId = n.data('parent'); - tempNode.cmptId = id2cmptId[n.id()]; - tempNode.children = []; - tempNode.positionX = n.position('x'); - tempNode.positionY = n.position('y'); - tempNode.offsetX = 0; - tempNode.offsetY = 0; - tempNode.height = nbb.w; - tempNode.width = nbb.h; - tempNode.maxX = tempNode.positionX + tempNode.width / 2; - tempNode.minX = tempNode.positionX - tempNode.width / 2; - tempNode.maxY = tempNode.positionY + tempNode.height / 2; - tempNode.minY = tempNode.positionY - tempNode.height / 2; - tempNode.padLeft = parseFloat(n.style('padding')); - tempNode.padRight = parseFloat(n.style('padding')); - tempNode.padTop = parseFloat(n.style('padding')); - tempNode.padBottom = parseFloat(n.style('padding')); - - // forces - tempNode.nodeRepulsion = fn$6(options.nodeRepulsion) ? options.nodeRepulsion(n) : options.nodeRepulsion; - - // Add new node - layoutInfo.layoutNodes.push(tempNode); - // Add entry to id-index map - layoutInfo.idToIndex[tempNode.id] = i; - } - - // Inline implementation of a queue, used for traversing the graph in BFS order - var queue = []; - var start = 0; // Points to the start the queue - var end = -1; // Points to the end of the queue - - var tempGraph = []; - - // Second pass to add child information and - // initialize queue for hierarchical traversal - for (var i = 0; i < layoutInfo.nodeSize; i++) { - var n = layoutInfo.layoutNodes[i]; - var p_id = n.parentId; - // Check if node n has a parent node - if (null != p_id) { - // Add node Id to parent's list of children - layoutInfo.layoutNodes[layoutInfo.idToIndex[p_id]].children.push(n.id); - } else { - // If a node doesn't have a parent, then it's in the root graph - queue[++end] = n.id; - tempGraph.push(n.id); - } - } - - // Add root graph to graphSet - layoutInfo.graphSet.push(tempGraph); - - // Traverse the graph, level by level, - while (start <= end) { - // Get the node to visit and remove it from queue - var node_id = queue[start++]; - var node_ix = layoutInfo.idToIndex[node_id]; - var node = layoutInfo.layoutNodes[node_ix]; - var children = node.children; - if (children.length > 0) { - // Add children nodes as a new graph to graph set - layoutInfo.graphSet.push(children); - // Add children to que queue to be visited - for (var i = 0; i < children.length; i++) { - queue[++end] = children[i]; - } - } - } - - // Create indexToGraph map - for (var i = 0; i < layoutInfo.graphSet.length; i++) { - var graph = layoutInfo.graphSet[i]; - for (var j = 0; j < graph.length; j++) { - var index = layoutInfo.idToIndex[graph[j]]; - layoutInfo.indexToGraph[index] = i; - } - } - - // Iterate over all edges, creating Layout Edges - for (var i = 0; i < layoutInfo.edgeSize; i++) { - var e = edges[i]; - var tempEdge = {}; - tempEdge.id = e.data('id'); - tempEdge.sourceId = e.data('source'); - tempEdge.targetId = e.data('target'); - - // Compute ideal length - var idealLength = fn$6(options.idealEdgeLength) ? options.idealEdgeLength(e) : options.idealEdgeLength; - var elasticity = fn$6(options.edgeElasticity) ? options.edgeElasticity(e) : options.edgeElasticity; - - // Check if it's an inter graph edge - var sourceIx = layoutInfo.idToIndex[tempEdge.sourceId]; - var targetIx = layoutInfo.idToIndex[tempEdge.targetId]; - var sourceGraph = layoutInfo.indexToGraph[sourceIx]; - var targetGraph = layoutInfo.indexToGraph[targetIx]; - if (sourceGraph != targetGraph) { - // Find lowest common graph ancestor - var lca = findLCA(tempEdge.sourceId, tempEdge.targetId, layoutInfo); - - // Compute sum of node depths, relative to lca graph - var lcaGraph = layoutInfo.graphSet[lca]; - var depth = 0; - - // Source depth - var tempNode = layoutInfo.layoutNodes[sourceIx]; - while (-1 === lcaGraph.indexOf(tempNode.id)) { - tempNode = layoutInfo.layoutNodes[layoutInfo.idToIndex[tempNode.parentId]]; - depth++; - } - - // Target depth - tempNode = layoutInfo.layoutNodes[targetIx]; - while (-1 === lcaGraph.indexOf(tempNode.id)) { - tempNode = layoutInfo.layoutNodes[layoutInfo.idToIndex[tempNode.parentId]]; - depth++; - } - - // logDebug('LCA of nodes ' + tempEdge.sourceId + ' and ' + tempEdge.targetId + - // ". Index: " + lca + " Contents: " + lcaGraph.toString() + - // ". Depth: " + depth); - - // Update idealLength - idealLength *= depth * options.nestingFactor; - } - tempEdge.idealLength = idealLength; - tempEdge.elasticity = elasticity; - layoutInfo.layoutEdges.push(tempEdge); - } - - // Finally, return layoutInfo object - return layoutInfo; -}; - -/** - * @brief : This function finds the index of the lowest common - * graph ancestor between 2 nodes in the subtree - * (from the graph hierarchy induced tree) whose - * root is graphIx - * - * @arg node1: node1's ID - * @arg node2: node2's ID - * @arg layoutInfo: layoutInfo object - * - */ -var findLCA = function findLCA(node1, node2, layoutInfo) { - // Find their common ancester, starting from the root graph - var res = findLCA_aux(node1, node2, 0, layoutInfo); - if (2 > res.count) { - // If aux function couldn't find the common ancester, - // then it is the root graph - return 0; - } else { - return res.graph; - } -}; - -/** - * @brief : Auxiliary function used for LCA computation - * - * @arg node1 : node1's ID - * @arg node2 : node2's ID - * @arg graphIx : subgraph index - * @arg layoutInfo : layoutInfo object - * - * @return : object of the form {count: X, graph: Y}, where: - * X is the number of ancestors (max: 2) found in - * graphIx (and it's subgraphs), - * Y is the graph index of the lowest graph containing - * all X nodes - */ -var findLCA_aux = function findLCA_aux(node1, node2, graphIx, layoutInfo) { - var graph = layoutInfo.graphSet[graphIx]; - // If both nodes belongs to graphIx - if (-1 < graph.indexOf(node1) && -1 < graph.indexOf(node2)) { - return { - count: 2, - graph: graphIx - }; - } - - // Make recursive calls for all subgraphs - var c = 0; - for (var i = 0; i < graph.length; i++) { - var nodeId = graph[i]; - var nodeIx = layoutInfo.idToIndex[nodeId]; - var children = layoutInfo.layoutNodes[nodeIx].children; - - // If the node has no child, skip it - if (0 === children.length) { - continue; - } - var childGraphIx = layoutInfo.indexToGraph[layoutInfo.idToIndex[children[0]]]; - var result = findLCA_aux(node1, node2, childGraphIx, layoutInfo); - if (0 === result.count) { - // Neither node1 nor node2 are present in this subgraph - continue; - } else if (1 === result.count) { - // One of (node1, node2) is present in this subgraph - c++; - if (2 === c) { - // We've already found both nodes, no need to keep searching - break; - } - } else { - // Both nodes are present in this subgraph - return result; - } - } - return { - count: c, - graph: graphIx - }; -}; - -/** - * @brief: printsLayoutInfo into js console - * Only used for debbuging - */ -var printLayoutInfo; - -/** - * @brief : Randomizes the position of all nodes - */ -var randomizePositions = function randomizePositions(layoutInfo, cy) { - var width = layoutInfo.clientWidth; - var height = layoutInfo.clientHeight; - for (var i = 0; i < layoutInfo.nodeSize; i++) { - var n = layoutInfo.layoutNodes[i]; - - // No need to randomize compound nodes or locked nodes - if (0 === n.children.length && !n.isLocked) { - n.positionX = Math.random() * width; - n.positionY = Math.random() * height; - } - } -}; -var getScaleInBoundsFn = function getScaleInBoundsFn(layoutInfo, options, nodes) { - var bb = layoutInfo.boundingBox; - var coseBB = { - x1: Infinity, - x2: -Infinity, - y1: Infinity, - y2: -Infinity - }; - if (options.boundingBox) { - nodes.forEach(function (node) { - var lnode = layoutInfo.layoutNodes[layoutInfo.idToIndex[node.data('id')]]; - coseBB.x1 = Math.min(coseBB.x1, lnode.positionX); - coseBB.x2 = Math.max(coseBB.x2, lnode.positionX); - coseBB.y1 = Math.min(coseBB.y1, lnode.positionY); - coseBB.y2 = Math.max(coseBB.y2, lnode.positionY); - }); - coseBB.w = coseBB.x2 - coseBB.x1; - coseBB.h = coseBB.y2 - coseBB.y1; - } - return function (ele, i) { - var lnode = layoutInfo.layoutNodes[layoutInfo.idToIndex[ele.data('id')]]; - if (options.boundingBox) { - // then add extra bounding box constraint - var pctX = (lnode.positionX - coseBB.x1) / coseBB.w; - var pctY = (lnode.positionY - coseBB.y1) / coseBB.h; - return { - x: bb.x1 + pctX * bb.w, - y: bb.y1 + pctY * bb.h - }; - } else { - return { - x: lnode.positionX, - y: lnode.positionY - }; - } - }; -}; - -/** - * @brief : Updates the positions of nodes in the network - * @arg layoutInfo : LayoutInfo object - * @arg cy : Cytoscape object - * @arg options : Layout options - */ -var refreshPositions = function refreshPositions(layoutInfo, cy, options) { - // var s = 'Refreshing positions'; - // logDebug(s); - - var layout = options.layout; - var nodes = options.eles.nodes(); - var getScaledPos = getScaleInBoundsFn(layoutInfo, options, nodes); - nodes.positions(getScaledPos); - - // Trigger layoutReady only on first call - if (true !== layoutInfo.ready) { - // s = 'Triggering layoutready'; - // logDebug(s); - layoutInfo.ready = true; - layout.one('layoutready', options.ready); - layout.emit({ - type: 'layoutready', - layout: this - }); - } -}; - -/** - * @brief : Logs a debug message in JS console, if DEBUG is ON - */ -// var logDebug = function(text) { -// if (DEBUG) { -// console.debug(text); -// } -// }; - -/** - * @brief : Performs one iteration of the physical simulation - * @arg layoutInfo : LayoutInfo object already initialized - * @arg cy : Cytoscape object - * @arg options : Layout options - */ -var step = function step(layoutInfo, options, _step) { - // var s = "\n\n###############################"; - // s += "\nSTEP: " + step; - // s += "\n###############################\n"; - // logDebug(s); - - // Calculate node repulsions - calculateNodeForces(layoutInfo, options); - // Calculate edge forces - calculateEdgeForces(layoutInfo); - // Calculate gravity forces - calculateGravityForces(layoutInfo, options); - // Propagate forces from parent to child - propagateForces(layoutInfo); - // Update positions based on calculated forces - updatePositions(layoutInfo); -}; - -/** - * @brief : Computes the node repulsion forces - */ -var calculateNodeForces = function calculateNodeForces(layoutInfo, options) { - // Go through each of the graphs in graphSet - // Nodes only repel each other if they belong to the same graph - // var s = 'calculateNodeForces'; - // logDebug(s); - for (var i = 0; i < layoutInfo.graphSet.length; i++) { - var graph = layoutInfo.graphSet[i]; - var numNodes = graph.length; - - // s = "Set: " + graph.toString(); - // logDebug(s); - - // Now get all the pairs of nodes - // Only get each pair once, (A, B) = (B, A) - for (var j = 0; j < numNodes; j++) { - var node1 = layoutInfo.layoutNodes[layoutInfo.idToIndex[graph[j]]]; - for (var k = j + 1; k < numNodes; k++) { - var node2 = layoutInfo.layoutNodes[layoutInfo.idToIndex[graph[k]]]; - nodeRepulsion(node1, node2, layoutInfo, options); - } - } - } -}; -var randomDistance = function randomDistance(max) { - return -max + 2 * max * Math.random(); -}; - -/** - * @brief : Compute the node repulsion forces between a pair of nodes - */ -var nodeRepulsion = function nodeRepulsion(node1, node2, layoutInfo, options) { - // var s = "Node repulsion. Node1: " + node1.id + " Node2: " + node2.id; - - var cmptId1 = node1.cmptId; - var cmptId2 = node2.cmptId; - if (cmptId1 !== cmptId2 && !layoutInfo.isCompound) { - return; - } - - // Get direction of line connecting both node centers - var directionX = node2.positionX - node1.positionX; - var directionY = node2.positionY - node1.positionY; - var maxRandDist = 1; - // s += "\ndirectionX: " + directionX + ", directionY: " + directionY; - - // If both centers are the same, apply a random force - if (0 === directionX && 0 === directionY) { - directionX = randomDistance(maxRandDist); - directionY = randomDistance(maxRandDist); - } - var overlap = nodesOverlap(node1, node2, directionX, directionY); - if (overlap > 0) { - // s += "\nNodes DO overlap."; - // s += "\nOverlap: " + overlap; - // If nodes overlap, repulsion force is proportional - // to the overlap - var force = options.nodeOverlap * overlap; - - // Compute the module and components of the force vector - var distance = Math.sqrt(directionX * directionX + directionY * directionY); - // s += "\nDistance: " + distance; - var forceX = force * directionX / distance; - var forceY = force * directionY / distance; - } else { - // s += "\nNodes do NOT overlap."; - // If there's no overlap, force is inversely proportional - // to squared distance - - // Get clipping points for both nodes - var point1 = findClippingPoint(node1, directionX, directionY); - var point2 = findClippingPoint(node2, -1 * directionX, -1 * directionY); - - // Use clipping points to compute distance - var distanceX = point2.x - point1.x; - var distanceY = point2.y - point1.y; - var distanceSqr = distanceX * distanceX + distanceY * distanceY; - var distance = Math.sqrt(distanceSqr); - // s += "\nDistance: " + distance; - - // Compute the module and components of the force vector - var force = (node1.nodeRepulsion + node2.nodeRepulsion) / distanceSqr; - var forceX = force * distanceX / distance; - var forceY = force * distanceY / distance; - } - - // Apply force - if (!node1.isLocked) { - node1.offsetX -= forceX; - node1.offsetY -= forceY; - } - if (!node2.isLocked) { - node2.offsetX += forceX; - node2.offsetY += forceY; - } - - // s += "\nForceX: " + forceX + " ForceY: " + forceY; - // logDebug(s); - - return; -}; - -/** - * @brief : Determines whether two nodes overlap or not - * @return : Amount of overlapping (0 => no overlap) - */ -var nodesOverlap = function nodesOverlap(node1, node2, dX, dY) { - if (dX > 0) { - var overlapX = node1.maxX - node2.minX; - } else { - var overlapX = node2.maxX - node1.minX; - } - if (dY > 0) { - var overlapY = node1.maxY - node2.minY; - } else { - var overlapY = node2.maxY - node1.minY; - } - if (overlapX >= 0 && overlapY >= 0) { - return Math.sqrt(overlapX * overlapX + overlapY * overlapY); - } else { - return 0; - } -}; - -/** - * @brief : Finds the point in which an edge (direction dX, dY) intersects - * the rectangular bounding box of it's source/target node - */ -var findClippingPoint = function findClippingPoint(node, dX, dY) { - // Shorcuts - var X = node.positionX; - var Y = node.positionY; - var H = node.height || 1; - var W = node.width || 1; - var dirSlope = dY / dX; - var nodeSlope = H / W; - - // var s = 'Computing clipping point of node ' + node.id + - // " . Height: " + H + ", Width: " + W + - // "\nDirection " + dX + ", " + dY; - // - // Compute intersection - var res = {}; - - // Case: Vertical direction (up) - if (0 === dX && 0 < dY) { - res.x = X; - // s += "\nUp direction"; - res.y = Y + H / 2; - return res; - } - - // Case: Vertical direction (down) - if (0 === dX && 0 > dY) { - res.x = X; - res.y = Y + H / 2; - // s += "\nDown direction"; - - return res; - } - - // Case: Intersects the right border - if (0 < dX && -1 * nodeSlope <= dirSlope && dirSlope <= nodeSlope) { - res.x = X + W / 2; - res.y = Y + W * dY / 2 / dX; - // s += "\nRightborder"; - - return res; - } - - // Case: Intersects the left border - if (0 > dX && -1 * nodeSlope <= dirSlope && dirSlope <= nodeSlope) { - res.x = X - W / 2; - res.y = Y - W * dY / 2 / dX; - // s += "\nLeftborder"; - - return res; - } - - // Case: Intersects the top border - if (0 < dY && (dirSlope <= -1 * nodeSlope || dirSlope >= nodeSlope)) { - res.x = X + H * dX / 2 / dY; - res.y = Y + H / 2; - // s += "\nTop border"; - - return res; - } - - // Case: Intersects the bottom border - if (0 > dY && (dirSlope <= -1 * nodeSlope || dirSlope >= nodeSlope)) { - res.x = X - H * dX / 2 / dY; - res.y = Y - H / 2; - // s += "\nBottom border"; - - return res; - } - - // s += "\nClipping point found at " + res.x + ", " + res.y; - // logDebug(s); - return res; -}; - -/** - * @brief : Calculates all edge forces - */ -var calculateEdgeForces = function calculateEdgeForces(layoutInfo, options) { - // Iterate over all edges - for (var i = 0; i < layoutInfo.edgeSize; i++) { - // Get edge, source & target nodes - var edge = layoutInfo.layoutEdges[i]; - var sourceIx = layoutInfo.idToIndex[edge.sourceId]; - var source = layoutInfo.layoutNodes[sourceIx]; - var targetIx = layoutInfo.idToIndex[edge.targetId]; - var target = layoutInfo.layoutNodes[targetIx]; - - // Get direction of line connecting both node centers - var directionX = target.positionX - source.positionX; - var directionY = target.positionY - source.positionY; - - // If both centers are the same, do nothing. - // A random force has already been applied as node repulsion - if (0 === directionX && 0 === directionY) { - continue; - } - - // Get clipping points for both nodes - var point1 = findClippingPoint(source, directionX, directionY); - var point2 = findClippingPoint(target, -1 * directionX, -1 * directionY); - var lx = point2.x - point1.x; - var ly = point2.y - point1.y; - var l = Math.sqrt(lx * lx + ly * ly); - var force = Math.pow(edge.idealLength - l, 2) / edge.elasticity; - if (0 !== l) { - var forceX = force * lx / l; - var forceY = force * ly / l; - } else { - var forceX = 0; - var forceY = 0; - } - - // Add this force to target and source nodes - if (!source.isLocked) { - source.offsetX += forceX; - source.offsetY += forceY; - } - if (!target.isLocked) { - target.offsetX -= forceX; - target.offsetY -= forceY; - } - - // var s = 'Edge force between nodes ' + source.id + ' and ' + target.id; - // s += "\nDistance: " + l + " Force: (" + forceX + ", " + forceY + ")"; - // logDebug(s); - } -}; - -/** - * @brief : Computes gravity forces for all nodes - */ -var calculateGravityForces = function calculateGravityForces(layoutInfo, options) { - if (options.gravity === 0) { - return; - } - var distThreshold = 1; - - // var s = 'calculateGravityForces'; - // logDebug(s); - for (var i = 0; i < layoutInfo.graphSet.length; i++) { - var graph = layoutInfo.graphSet[i]; - var numNodes = graph.length; - - // s = "Set: " + graph.toString(); - // logDebug(s); - - // Compute graph center - if (0 === i) { - var centerX = layoutInfo.clientHeight / 2; - var centerY = layoutInfo.clientWidth / 2; - } else { - // Get Parent node for this graph, and use its position as center - var temp = layoutInfo.layoutNodes[layoutInfo.idToIndex[graph[0]]]; - var parent = layoutInfo.layoutNodes[layoutInfo.idToIndex[temp.parentId]]; - var centerX = parent.positionX; - var centerY = parent.positionY; - } - // s = "Center found at: " + centerX + ", " + centerY; - // logDebug(s); - - // Apply force to all nodes in graph - for (var j = 0; j < numNodes; j++) { - var node = layoutInfo.layoutNodes[layoutInfo.idToIndex[graph[j]]]; - // s = "Node: " + node.id; - - if (node.isLocked) { - continue; - } - var dx = centerX - node.positionX; - var dy = centerY - node.positionY; - var d = Math.sqrt(dx * dx + dy * dy); - if (d > distThreshold) { - var fx = options.gravity * dx / d; - var fy = options.gravity * dy / d; - node.offsetX += fx; - node.offsetY += fy; - // s += ": Applied force: " + fx + ", " + fy; - } - // logDebug(s); - } - } -}; - -/** - * @brief : This function propagates the existing offsets from - * parent nodes to its descendents. - * @arg layoutInfo : layoutInfo Object - * @arg cy : cytoscape Object - * @arg options : Layout options - */ -var propagateForces = function propagateForces(layoutInfo, options) { - // Inline implementation of a queue, used for traversing the graph in BFS order - var queue = []; - var start = 0; // Points to the start the queue - var end = -1; // Points to the end of the queue - - // logDebug('propagateForces'); - - // Start by visiting the nodes in the root graph - queue.push.apply(queue, layoutInfo.graphSet[0]); - end += layoutInfo.graphSet[0].length; - - // Traverse the graph, level by level, - while (start <= end) { - // Get the node to visit and remove it from queue - var nodeId = queue[start++]; - var nodeIndex = layoutInfo.idToIndex[nodeId]; - var node = layoutInfo.layoutNodes[nodeIndex]; - var children = node.children; - - // We only need to process the node if it's compound - if (0 < children.length && !node.isLocked) { - var offX = node.offsetX; - var offY = node.offsetY; - - // var s = "Propagating offset from parent node : " + node.id + - // ". OffsetX: " + offX + ". OffsetY: " + offY; - // s += "\n Children: " + children.toString(); - // logDebug(s); - - for (var i = 0; i < children.length; i++) { - var childNode = layoutInfo.layoutNodes[layoutInfo.idToIndex[children[i]]]; - // Propagate offset - childNode.offsetX += offX; - childNode.offsetY += offY; - // Add children to queue to be visited - queue[++end] = children[i]; - } - - // Reset parent offsets - node.offsetX = 0; - node.offsetY = 0; - } - } -}; - -/** - * @brief : Updates the layout model positions, based on - * the accumulated forces - */ -var updatePositions = function updatePositions(layoutInfo, options) { - // var s = 'Updating positions'; - // logDebug(s); - - // Reset boundaries for compound nodes - for (var i = 0; i < layoutInfo.nodeSize; i++) { - var n = layoutInfo.layoutNodes[i]; - if (0 < n.children.length) { - // logDebug("Resetting boundaries of compound node: " + n.id); - n.maxX = undefined; - n.minX = undefined; - n.maxY = undefined; - n.minY = undefined; - } - } - for (var i = 0; i < layoutInfo.nodeSize; i++) { - var n = layoutInfo.layoutNodes[i]; - if (0 < n.children.length || n.isLocked) { - // No need to set compound or locked node position - // logDebug("Skipping position update of node: " + n.id); - continue; - } - // s = "Node: " + n.id + " Previous position: (" + - // n.positionX + ", " + n.positionY + ")."; - - // Limit displacement in order to improve stability - var tempForce = limitForce(n.offsetX, n.offsetY, layoutInfo.temperature); - n.positionX += tempForce.x; - n.positionY += tempForce.y; - n.offsetX = 0; - n.offsetY = 0; - n.minX = n.positionX - n.width; - n.maxX = n.positionX + n.width; - n.minY = n.positionY - n.height; - n.maxY = n.positionY + n.height; - // s += " New Position: (" + n.positionX + ", " + n.positionY + ")."; - // logDebug(s); - - // Update ancestry boudaries - updateAncestryBoundaries(n, layoutInfo); - } - - // Update size, position of compund nodes - for (var i = 0; i < layoutInfo.nodeSize; i++) { - var n = layoutInfo.layoutNodes[i]; - if (0 < n.children.length && !n.isLocked) { - n.positionX = (n.maxX + n.minX) / 2; - n.positionY = (n.maxY + n.minY) / 2; - n.width = n.maxX - n.minX; - n.height = n.maxY - n.minY; - // s = "Updating position, size of compound node " + n.id; - // s += "\nPositionX: " + n.positionX + ", PositionY: " + n.positionY; - // s += "\nWidth: " + n.width + ", Height: " + n.height; - // logDebug(s); - } - } -}; - -/** - * @brief : Limits a force (forceX, forceY) to be not - * greater (in modulo) than max. - 8 Preserves force direction. - */ -var limitForce = function limitForce(forceX, forceY, max) { - // var s = "Limiting force: (" + forceX + ", " + forceY + "). Max: " + max; - var force = Math.sqrt(forceX * forceX + forceY * forceY); - if (force > max) { - var res = { - x: max * forceX / force, - y: max * forceY / force - }; - } else { - var res = { - x: forceX, - y: forceY - }; - } - - // s += ".\nResult: (" + res.x + ", " + res.y + ")"; - // logDebug(s); - - return res; -}; - -/** - * @brief : Function used for keeping track of compound node - * sizes, since they should bound all their subnodes. - */ -var updateAncestryBoundaries = function updateAncestryBoundaries(node, layoutInfo) { - // var s = "Propagating new position/size of node " + node.id; - var parentId = node.parentId; - if (null == parentId) { - // If there's no parent, we are done - // s += ". No parent node."; - // logDebug(s); - return; - } - - // Get Parent Node - var p = layoutInfo.layoutNodes[layoutInfo.idToIndex[parentId]]; - var flag = false; - - // MaxX - if (null == p.maxX || node.maxX + p.padRight > p.maxX) { - p.maxX = node.maxX + p.padRight; - flag = true; - // s += "\nNew maxX for parent node " + p.id + ": " + p.maxX; - } - - // MinX - if (null == p.minX || node.minX - p.padLeft < p.minX) { - p.minX = node.minX - p.padLeft; - flag = true; - // s += "\nNew minX for parent node " + p.id + ": " + p.minX; - } - - // MaxY - if (null == p.maxY || node.maxY + p.padBottom > p.maxY) { - p.maxY = node.maxY + p.padBottom; - flag = true; - // s += "\nNew maxY for parent node " + p.id + ": " + p.maxY; - } - - // MinY - if (null == p.minY || node.minY - p.padTop < p.minY) { - p.minY = node.minY - p.padTop; - flag = true; - // s += "\nNew minY for parent node " + p.id + ": " + p.minY; - } - - // If updated boundaries, propagate changes upward - if (flag) { - // logDebug(s); - return updateAncestryBoundaries(p, layoutInfo); - } - - // s += ". No changes in boundaries/position of parent node " + p.id; - // logDebug(s); - return; -}; -var separateComponents = function separateComponents(layoutInfo, options) { - var nodes = layoutInfo.layoutNodes; - var components = []; - for (var i = 0; i < nodes.length; i++) { - var node = nodes[i]; - var cid = node.cmptId; - var component = components[cid] = components[cid] || []; - component.push(node); - } - var totalA = 0; - for (var i = 0; i < components.length; i++) { - var c = components[i]; - if (!c) { - continue; - } - c.x1 = Infinity; - c.x2 = -Infinity; - c.y1 = Infinity; - c.y2 = -Infinity; - for (var j = 0; j < c.length; j++) { - var n = c[j]; - c.x1 = Math.min(c.x1, n.positionX - n.width / 2); - c.x2 = Math.max(c.x2, n.positionX + n.width / 2); - c.y1 = Math.min(c.y1, n.positionY - n.height / 2); - c.y2 = Math.max(c.y2, n.positionY + n.height / 2); - } - c.w = c.x2 - c.x1; - c.h = c.y2 - c.y1; - totalA += c.w * c.h; - } - components.sort(function (c1, c2) { - return c2.w * c2.h - c1.w * c1.h; - }); - var x = 0; - var y = 0; - var usedW = 0; - var rowH = 0; - var maxRowW = Math.sqrt(totalA) * layoutInfo.clientWidth / layoutInfo.clientHeight; - for (var i = 0; i < components.length; i++) { - var c = components[i]; - if (!c) { - continue; - } - for (var j = 0; j < c.length; j++) { - var n = c[j]; - if (!n.isLocked) { - n.positionX += x - c.x1; - n.positionY += y - c.y1; - } - } - x += c.w + options.componentSpacing; - usedW += c.w + options.componentSpacing; - rowH = Math.max(rowH, c.h); - if (usedW > maxRowW) { - y += rowH + options.componentSpacing; - x = 0; - usedW = 0; - rowH = 0; - } - } -}; - -var defaults$3 = { - fit: true, - // whether to fit the viewport to the graph - padding: 30, - // padding used on fit - boundingBox: undefined, - // constrain layout bounds; { x1, y1, x2, y2 } or { x1, y1, w, h } - avoidOverlap: true, - // prevents node overlap, may overflow boundingBox if not enough space - avoidOverlapPadding: 10, - // extra spacing around nodes when avoidOverlap: true - nodeDimensionsIncludeLabels: false, - // Excludes the label when calculating node bounding boxes for the layout algorithm - spacingFactor: undefined, - // Applies a multiplicative factor (>0) to expand or compress the overall area that the nodes take up - condense: false, - // uses all available space on false, uses minimal space on true - rows: undefined, - // force num of rows in the grid - cols: undefined, - // force num of columns in the grid - position: function position(node) {}, - // returns { row, col } for element - sort: undefined, - // a sorting function to order the nodes; e.g. function(a, b){ return a.data('weight') - b.data('weight') } - animate: false, - // whether to transition the node positions - animationDuration: 500, - // duration of animation in ms if enabled - animationEasing: undefined, - // easing of animation if enabled - animateFilter: function animateFilter(node, i) { - return true; - }, - // a function that determines whether the node should be animated. All nodes animated by default on animate enabled. Non-animated nodes are positioned immediately when the layout starts - ready: undefined, - // callback on layoutready - stop: undefined, - // callback on layoutstop - transform: function transform(node, position) { - return position; - } // transform a given node position. Useful for changing flow direction in discrete layouts -}; - -function GridLayout(options) { - this.options = extend({}, defaults$3, options); -} -GridLayout.prototype.run = function () { - var params = this.options; - var options = params; - var cy = params.cy; - var eles = options.eles; - var nodes = eles.nodes().not(':parent'); - if (options.sort) { - nodes = nodes.sort(options.sort); - } - var bb = makeBoundingBox(options.boundingBox ? options.boundingBox : { - x1: 0, - y1: 0, - w: cy.width(), - h: cy.height() - }); - if (bb.h === 0 || bb.w === 0) { - eles.nodes().layoutPositions(this, options, function (ele) { - return { - x: bb.x1, - y: bb.y1 - }; - }); - } else { - // width/height * splits^2 = cells where splits is number of times to split width - var cells = nodes.size(); - var splits = Math.sqrt(cells * bb.h / bb.w); - var rows = Math.round(splits); - var cols = Math.round(bb.w / bb.h * splits); - var small = function small(val) { - if (val == null) { - return Math.min(rows, cols); - } else { - var min = Math.min(rows, cols); - if (min == rows) { - rows = val; - } else { - cols = val; - } - } - }; - var large = function large(val) { - if (val == null) { - return Math.max(rows, cols); - } else { - var max = Math.max(rows, cols); - if (max == rows) { - rows = val; - } else { - cols = val; - } - } - }; - var oRows = options.rows; - var oCols = options.cols != null ? options.cols : options.columns; - - // if rows or columns were set in options, use those values - if (oRows != null && oCols != null) { - rows = oRows; - cols = oCols; - } else if (oRows != null && oCols == null) { - rows = oRows; - cols = Math.ceil(cells / rows); - } else if (oRows == null && oCols != null) { - cols = oCols; - rows = Math.ceil(cells / cols); - } - - // otherwise use the automatic values and adjust accordingly - - // if rounding was up, see if we can reduce rows or columns - else if (cols * rows > cells) { - var sm = small(); - var lg = large(); - - // reducing the small side takes away the most cells, so try it first - if ((sm - 1) * lg >= cells) { - small(sm - 1); - } else if ((lg - 1) * sm >= cells) { - large(lg - 1); - } - } else { - // if rounding was too low, add rows or columns - while (cols * rows < cells) { - var _sm = small(); - var _lg = large(); - - // try to add to larger side first (adds less in multiplication) - if ((_lg + 1) * _sm >= cells) { - large(_lg + 1); - } else { - small(_sm + 1); - } - } - } - var cellWidth = bb.w / cols; - var cellHeight = bb.h / rows; - if (options.condense) { - cellWidth = 0; - cellHeight = 0; - } - if (options.avoidOverlap) { - for (var i = 0; i < nodes.length; i++) { - var node = nodes[i]; - var pos = node._private.position; - if (pos.x == null || pos.y == null) { - // for bb - pos.x = 0; - pos.y = 0; - } - var nbb = node.layoutDimensions(options); - var p = options.avoidOverlapPadding; - var w = nbb.w + p; - var h = nbb.h + p; - cellWidth = Math.max(cellWidth, w); - cellHeight = Math.max(cellHeight, h); - } - } - var cellUsed = {}; // e.g. 'c-0-2' => true - - var used = function used(row, col) { - return cellUsed['c-' + row + '-' + col] ? true : false; - }; - var use = function use(row, col) { - cellUsed['c-' + row + '-' + col] = true; - }; - - // to keep track of current cell position - var row = 0; - var col = 0; - var moveToNextCell = function moveToNextCell() { - col++; - if (col >= cols) { - col = 0; - row++; - } - }; - - // get a cache of all the manual positions - var id2manPos = {}; - for (var _i = 0; _i < nodes.length; _i++) { - var _node = nodes[_i]; - var rcPos = options.position(_node); - if (rcPos && (rcPos.row !== undefined || rcPos.col !== undefined)) { - // must have at least row or col def'd - var _pos = { - row: rcPos.row, - col: rcPos.col - }; - if (_pos.col === undefined) { - // find unused col - _pos.col = 0; - while (used(_pos.row, _pos.col)) { - _pos.col++; - } - } else if (_pos.row === undefined) { - // find unused row - _pos.row = 0; - while (used(_pos.row, _pos.col)) { - _pos.row++; - } - } - id2manPos[_node.id()] = _pos; - use(_pos.row, _pos.col); - } - } - var getPos = function getPos(element, i) { - var x, y; - if (element.locked() || element.isParent()) { - return false; - } - - // see if we have a manual position set - var rcPos = id2manPos[element.id()]; - if (rcPos) { - x = rcPos.col * cellWidth + cellWidth / 2 + bb.x1; - y = rcPos.row * cellHeight + cellHeight / 2 + bb.y1; - } else { - // otherwise set automatically - - while (used(row, col)) { - moveToNextCell(); - } - x = col * cellWidth + cellWidth / 2 + bb.x1; - y = row * cellHeight + cellHeight / 2 + bb.y1; - use(row, col); - moveToNextCell(); - } - return { - x: x, - y: y - }; - }; - nodes.layoutPositions(this, options, getPos); - } - return this; // chaining -}; - -// default layout options -var defaults$2 = { - ready: function ready() {}, - // on layoutready - stop: function stop() {} // on layoutstop -}; - -// constructor -// options : object containing layout options -function NullLayout(options) { - this.options = extend({}, defaults$2, options); -} - -// runs the layout -NullLayout.prototype.run = function () { - var options = this.options; - var eles = options.eles; // elements to consider in the layout - var layout = this; - - // cy is automatically populated for us in the constructor - // (disable eslint for next line as this serves as example layout code to external developers) - // eslint-disable-next-line no-unused-vars - options.cy; - layout.emit('layoutstart'); - - // puts all nodes at (0, 0) - // n.b. most layouts would use layoutPositions(), instead of positions() and manual events - eles.nodes().positions(function () { - return { - x: 0, - y: 0 - }; - }); - - // trigger layoutready when each node has had its position set at least once - layout.one('layoutready', options.ready); - layout.emit('layoutready'); - - // trigger layoutstop when the layout stops (e.g. finishes) - layout.one('layoutstop', options.stop); - layout.emit('layoutstop'); - return this; // chaining -}; - -// called on continuous layouts to stop them before they finish -NullLayout.prototype.stop = function () { - return this; // chaining -}; - -var defaults$1 = { - positions: undefined, - // map of (node id) => (position obj); or function(node){ return somPos; } - zoom: undefined, - // the zoom level to set (prob want fit = false if set) - pan: undefined, - // the pan level to set (prob want fit = false if set) - fit: true, - // whether to fit to viewport - padding: 30, - // padding on fit - spacingFactor: undefined, - // Applies a multiplicative factor (>0) to expand or compress the overall area that the nodes take up - animate: false, - // whether to transition the node positions - animationDuration: 500, - // duration of animation in ms if enabled - animationEasing: undefined, - // easing of animation if enabled - animateFilter: function animateFilter(node, i) { - return true; - }, - // a function that determines whether the node should be animated. All nodes animated by default on animate enabled. Non-animated nodes are positioned immediately when the layout starts - ready: undefined, - // callback on layoutready - stop: undefined, - // callback on layoutstop - transform: function transform(node, position) { - return position; - } // transform a given node position. Useful for changing flow direction in discrete layouts -}; - -function PresetLayout(options) { - this.options = extend({}, defaults$1, options); -} -PresetLayout.prototype.run = function () { - var options = this.options; - var eles = options.eles; - var nodes = eles.nodes(); - var posIsFn = fn$6(options.positions); - function getPosition(node) { - if (options.positions == null) { - return copyPosition(node.position()); - } - if (posIsFn) { - return options.positions(node); - } - var pos = options.positions[node._private.data.id]; - if (pos == null) { - return null; - } - return pos; - } - nodes.layoutPositions(this, options, function (node, i) { - var position = getPosition(node); - if (node.locked() || position == null) { - return false; - } - return position; - }); - return this; // chaining -}; - -var defaults = { - fit: true, - // whether to fit to viewport - padding: 30, - // fit padding - boundingBox: undefined, - // constrain layout bounds; { x1, y1, x2, y2 } or { x1, y1, w, h } - animate: false, - // whether to transition the node positions - animationDuration: 500, - // duration of animation in ms if enabled - animationEasing: undefined, - // easing of animation if enabled - animateFilter: function animateFilter(node, i) { - return true; - }, - // a function that determines whether the node should be animated. All nodes animated by default on animate enabled. Non-animated nodes are positioned immediately when the layout starts - ready: undefined, - // callback on layoutready - stop: undefined, - // callback on layoutstop - transform: function transform(node, position) { - return position; - } // transform a given node position. Useful for changing flow direction in discrete layouts -}; - -function RandomLayout(options) { - this.options = extend({}, defaults, options); -} -RandomLayout.prototype.run = function () { - var options = this.options; - var cy = options.cy; - var eles = options.eles; - var bb = makeBoundingBox(options.boundingBox ? options.boundingBox : { - x1: 0, - y1: 0, - w: cy.width(), - h: cy.height() - }); - var getPos = function getPos(node, i) { - return { - x: bb.x1 + Math.round(Math.random() * bb.w), - y: bb.y1 + Math.round(Math.random() * bb.h) - }; - }; - eles.nodes().layoutPositions(this, options, getPos); - return this; // chaining -}; - -var layout = [{ - name: 'breadthfirst', - impl: BreadthFirstLayout -}, { - name: 'circle', - impl: CircleLayout -}, { - name: 'concentric', - impl: ConcentricLayout -}, { - name: 'cose', - impl: CoseLayout -}, { - name: 'grid', - impl: GridLayout -}, { - name: 'null', - impl: NullLayout -}, { - name: 'preset', - impl: PresetLayout -}, { - name: 'random', - impl: RandomLayout -}]; - -function NullRenderer(options) { - this.options = options; - this.notifications = 0; // for testing -} - -var noop = function noop() {}; -var throwImgErr = function throwImgErr() { - throw new Error('A headless instance can not render images'); -}; -NullRenderer.prototype = { - recalculateRenderedStyle: noop, - notify: function notify() { - this.notifications++; - }, - init: noop, - isHeadless: function isHeadless() { - return true; - }, - png: throwImgErr, - jpg: throwImgErr -}; - -var BRp$f = {}; -BRp$f.arrowShapeWidth = 0.3; -BRp$f.registerArrowShapes = function () { - var arrowShapes = this.arrowShapes = {}; - var renderer = this; - - // Contract for arrow shapes: - // 0, 0 is arrow tip - // (0, 1) is direction towards node - // (1, 0) is right - // - // functional api: - // collide: check x, y in shape - // roughCollide: called before collide, no false negatives - // draw: draw - // spacing: dist(arrowTip, nodeBoundary) - // gap: dist(edgeTip, nodeBoundary), edgeTip may != arrowTip - - var bbCollide = function bbCollide(x, y, size, angle, translation, edgeWidth, padding) { - var x1 = translation.x - size / 2 - padding; - var x2 = translation.x + size / 2 + padding; - var y1 = translation.y - size / 2 - padding; - var y2 = translation.y + size / 2 + padding; - var inside = x1 <= x && x <= x2 && y1 <= y && y <= y2; - return inside; - }; - var transform = function transform(x, y, size, angle, translation) { - var xRotated = x * Math.cos(angle) - y * Math.sin(angle); - var yRotated = x * Math.sin(angle) + y * Math.cos(angle); - var xScaled = xRotated * size; - var yScaled = yRotated * size; - var xTranslated = xScaled + translation.x; - var yTranslated = yScaled + translation.y; - return { - x: xTranslated, - y: yTranslated - }; - }; - var transformPoints = function transformPoints(pts, size, angle, translation) { - var retPts = []; - for (var i = 0; i < pts.length; i += 2) { - var x = pts[i]; - var y = pts[i + 1]; - retPts.push(transform(x, y, size, angle, translation)); - } - return retPts; - }; - var pointsToArr = function pointsToArr(pts) { - var ret = []; - for (var i = 0; i < pts.length; i++) { - var p = pts[i]; - ret.push(p.x, p.y); - } - return ret; - }; - var standardGap = function standardGap(edge) { - return edge.pstyle('width').pfValue * edge.pstyle('arrow-scale').pfValue * 2; - }; - var defineArrowShape = function defineArrowShape(name, defn) { - if (string(defn)) { - defn = arrowShapes[defn]; - } - arrowShapes[name] = extend({ - name: name, - points: [-0.15, -0.3, 0.15, -0.3, 0.15, 0.3, -0.15, 0.3], - collide: function collide(x, y, size, angle, translation, padding) { - var points = pointsToArr(transformPoints(this.points, size + 2 * padding, angle, translation)); - var inside = pointInsidePolygonPoints(x, y, points); - return inside; - }, - roughCollide: bbCollide, - draw: function draw(context, size, angle, translation) { - var points = transformPoints(this.points, size, angle, translation); - renderer.arrowShapeImpl('polygon')(context, points); - }, - spacing: function spacing(edge) { - return 0; - }, - gap: standardGap - }, defn); - }; - defineArrowShape('none', { - collide: falsify, - roughCollide: falsify, - draw: noop$1, - spacing: zeroify, - gap: zeroify - }); - defineArrowShape('triangle', { - points: [-0.15, -0.3, 0, 0, 0.15, -0.3] - }); - defineArrowShape('arrow', 'triangle'); - defineArrowShape('triangle-backcurve', { - points: arrowShapes['triangle'].points, - controlPoint: [0, -0.15], - roughCollide: bbCollide, - draw: function draw(context, size, angle, translation, edgeWidth) { - var ptsTrans = transformPoints(this.points, size, angle, translation); - var ctrlPt = this.controlPoint; - var ctrlPtTrans = transform(ctrlPt[0], ctrlPt[1], size, angle, translation); - renderer.arrowShapeImpl(this.name)(context, ptsTrans, ctrlPtTrans); - }, - gap: function gap(edge) { - return standardGap(edge) * 0.8; - } - }); - defineArrowShape('triangle-tee', { - points: [0, 0, 0.15, -0.3, -0.15, -0.3, 0, 0], - pointsTee: [-0.15, -0.4, -0.15, -0.5, 0.15, -0.5, 0.15, -0.4], - collide: function collide(x, y, size, angle, translation, edgeWidth, padding) { - var triPts = pointsToArr(transformPoints(this.points, size + 2 * padding, angle, translation)); - var teePts = pointsToArr(transformPoints(this.pointsTee, size + 2 * padding, angle, translation)); - var inside = pointInsidePolygonPoints(x, y, triPts) || pointInsidePolygonPoints(x, y, teePts); - return inside; - }, - draw: function draw(context, size, angle, translation, edgeWidth) { - var triPts = transformPoints(this.points, size, angle, translation); - var teePts = transformPoints(this.pointsTee, size, angle, translation); - renderer.arrowShapeImpl(this.name)(context, triPts, teePts); - } - }); - defineArrowShape('circle-triangle', { - radius: 0.15, - pointsTr: [0, -0.15, 0.15, -0.45, -0.15, -0.45, 0, -0.15], - collide: function collide(x, y, size, angle, translation, edgeWidth, padding) { - var t = translation; - var circleInside = Math.pow(t.x - x, 2) + Math.pow(t.y - y, 2) <= Math.pow((size + 2 * padding) * this.radius, 2); - var triPts = pointsToArr(transformPoints(this.points, size + 2 * padding, angle, translation)); - return pointInsidePolygonPoints(x, y, triPts) || circleInside; - }, - draw: function draw(context, size, angle, translation, edgeWidth) { - var triPts = transformPoints(this.pointsTr, size, angle, translation); - renderer.arrowShapeImpl(this.name)(context, triPts, translation.x, translation.y, this.radius * size); - }, - spacing: function spacing(edge) { - return renderer.getArrowWidth(edge.pstyle('width').pfValue, edge.pstyle('arrow-scale').value) * this.radius; - } - }); - defineArrowShape('triangle-cross', { - points: [0, 0, 0.15, -0.3, -0.15, -0.3, 0, 0], - baseCrossLinePts: [-0.15, -0.4, - // first half of the rectangle - -0.15, -0.4, 0.15, -0.4, - // second half of the rectangle - 0.15, -0.4], - crossLinePts: function crossLinePts(size, edgeWidth) { - // shift points so that the distance between the cross points matches edge width - var p = this.baseCrossLinePts.slice(); - var shiftFactor = edgeWidth / size; - var y0 = 3; - var y1 = 5; - p[y0] = p[y0] - shiftFactor; - p[y1] = p[y1] - shiftFactor; - return p; - }, - collide: function collide(x, y, size, angle, translation, edgeWidth, padding) { - var triPts = pointsToArr(transformPoints(this.points, size + 2 * padding, angle, translation)); - var teePts = pointsToArr(transformPoints(this.crossLinePts(size, edgeWidth), size + 2 * padding, angle, translation)); - var inside = pointInsidePolygonPoints(x, y, triPts) || pointInsidePolygonPoints(x, y, teePts); - return inside; - }, - draw: function draw(context, size, angle, translation, edgeWidth) { - var triPts = transformPoints(this.points, size, angle, translation); - var crossLinePts = transformPoints(this.crossLinePts(size, edgeWidth), size, angle, translation); - renderer.arrowShapeImpl(this.name)(context, triPts, crossLinePts); - } - }); - defineArrowShape('vee', { - points: [-0.15, -0.3, 0, 0, 0.15, -0.3, 0, -0.15], - gap: function gap(edge) { - return standardGap(edge) * 0.525; - } - }); - defineArrowShape('circle', { - radius: 0.15, - collide: function collide(x, y, size, angle, translation, edgeWidth, padding) { - var t = translation; - var inside = Math.pow(t.x - x, 2) + Math.pow(t.y - y, 2) <= Math.pow((size + 2 * padding) * this.radius, 2); - return inside; - }, - draw: function draw(context, size, angle, translation, edgeWidth) { - renderer.arrowShapeImpl(this.name)(context, translation.x, translation.y, this.radius * size); - }, - spacing: function spacing(edge) { - return renderer.getArrowWidth(edge.pstyle('width').pfValue, edge.pstyle('arrow-scale').value) * this.radius; - } - }); - defineArrowShape('tee', { - points: [-0.15, 0, -0.15, -0.1, 0.15, -0.1, 0.15, 0], - spacing: function spacing(edge) { - return 1; - }, - gap: function gap(edge) { - return 1; - } - }); - defineArrowShape('square', { - points: [-0.15, 0.00, 0.15, 0.00, 0.15, -0.3, -0.15, -0.3] - }); - defineArrowShape('diamond', { - points: [-0.15, -0.15, 0, -0.3, 0.15, -0.15, 0, 0], - gap: function gap(edge) { - return edge.pstyle('width').pfValue * edge.pstyle('arrow-scale').value; - } - }); - defineArrowShape('chevron', { - points: [0, 0, -0.15, -0.15, -0.1, -0.2, 0, -0.1, 0.1, -0.2, 0.15, -0.15], - gap: function gap(edge) { - return 0.95 * edge.pstyle('width').pfValue * edge.pstyle('arrow-scale').value; - } - }); -}; - -var BRp$e = {}; - -// Project mouse -BRp$e.projectIntoViewport = function (clientX, clientY) { - var cy = this.cy; - var offsets = this.findContainerClientCoords(); - var offsetLeft = offsets[0]; - var offsetTop = offsets[1]; - var scale = offsets[4]; - var pan = cy.pan(); - var zoom = cy.zoom(); - var x = ((clientX - offsetLeft) / scale - pan.x) / zoom; - var y = ((clientY - offsetTop) / scale - pan.y) / zoom; - return [x, y]; -}; -BRp$e.findContainerClientCoords = function () { - if (this.containerBB) { - return this.containerBB; - } - var container = this.container; - var rect = container.getBoundingClientRect(); - var style = this.cy.window().getComputedStyle(container); - var styleValue = function styleValue(name) { - return parseFloat(style.getPropertyValue(name)); - }; - var padding = { - left: styleValue('padding-left'), - right: styleValue('padding-right'), - top: styleValue('padding-top'), - bottom: styleValue('padding-bottom') - }; - var border = { - left: styleValue('border-left-width'), - right: styleValue('border-right-width'), - top: styleValue('border-top-width'), - bottom: styleValue('border-bottom-width') - }; - var clientWidth = container.clientWidth; - var clientHeight = container.clientHeight; - var paddingHor = padding.left + padding.right; - var paddingVer = padding.top + padding.bottom; - var borderHor = border.left + border.right; - var scale = rect.width / (clientWidth + borderHor); - var unscaledW = clientWidth - paddingHor; - var unscaledH = clientHeight - paddingVer; - var left = rect.left + padding.left + border.left; - var top = rect.top + padding.top + border.top; - return this.containerBB = [left, top, unscaledW, unscaledH, scale]; -}; -BRp$e.invalidateContainerClientCoordsCache = function () { - this.containerBB = null; -}; -BRp$e.findNearestElement = function (x, y, interactiveElementsOnly, isTouch) { - return this.findNearestElements(x, y, interactiveElementsOnly, isTouch)[0]; -}; -BRp$e.findNearestElements = function (x, y, interactiveElementsOnly, isTouch) { - var self = this; - var r = this; - var eles = r.getCachedZSortedEles(); - var near = []; // 1 node max, 1 edge max - var zoom = r.cy.zoom(); - var hasCompounds = r.cy.hasCompoundNodes(); - var edgeThreshold = (isTouch ? 24 : 8) / zoom; - var nodeThreshold = (isTouch ? 8 : 2) / zoom; - var labelThreshold = (isTouch ? 8 : 2) / zoom; - var minSqDist = Infinity; - var nearEdge; - var nearNode; - if (interactiveElementsOnly) { - eles = eles.interactive; - } - function addEle(ele, sqDist) { - if (ele.isNode()) { - if (nearNode) { - return; // can't replace node - } else { - nearNode = ele; - near.push(ele); - } - } - if (ele.isEdge() && (sqDist == null || sqDist < minSqDist)) { - if (nearEdge) { - // then replace existing edge - // can replace only if same z-index - if (nearEdge.pstyle('z-compound-depth').value === ele.pstyle('z-compound-depth').value && nearEdge.pstyle('z-compound-depth').value === ele.pstyle('z-compound-depth').value) { - for (var i = 0; i < near.length; i++) { - if (near[i].isEdge()) { - near[i] = ele; - nearEdge = ele; - minSqDist = sqDist != null ? sqDist : minSqDist; - break; - } - } - } - } else { - near.push(ele); - nearEdge = ele; - minSqDist = sqDist != null ? sqDist : minSqDist; - } - } - } - function checkNode(node) { - var width = node.outerWidth() + 2 * nodeThreshold; - var height = node.outerHeight() + 2 * nodeThreshold; - var hw = width / 2; - var hh = height / 2; - var pos = node.position(); - var cornerRadius = node.pstyle('corner-radius').value === 'auto' ? 'auto' : node.pstyle('corner-radius').pfValue; - var rs = node._private.rscratch; - if (pos.x - hw <= x && x <= pos.x + hw // bb check x - && pos.y - hh <= y && y <= pos.y + hh // bb check y - ) { - var shape = r.nodeShapes[self.getNodeShape(node)]; - if (shape.checkPoint(x, y, 0, width, height, pos.x, pos.y, cornerRadius, rs)) { - addEle(node, 0); - return true; - } - } - } - function checkEdge(edge) { - var _p = edge._private; - var rs = _p.rscratch; - var styleWidth = edge.pstyle('width').pfValue; - var scale = edge.pstyle('arrow-scale').value; - var width = styleWidth / 2 + edgeThreshold; // more like a distance radius from centre - var widthSq = width * width; - var width2 = width * 2; - var src = _p.source; - var tgt = _p.target; - var sqDist; - if (rs.edgeType === 'segments' || rs.edgeType === 'straight' || rs.edgeType === 'haystack') { - var pts = rs.allpts; - for (var i = 0; i + 3 < pts.length; i += 2) { - if (inLineVicinity(x, y, pts[i], pts[i + 1], pts[i + 2], pts[i + 3], width2) && widthSq > (sqDist = sqdistToFiniteLine(x, y, pts[i], pts[i + 1], pts[i + 2], pts[i + 3]))) { - addEle(edge, sqDist); - return true; - } - } - } else if (rs.edgeType === 'bezier' || rs.edgeType === 'multibezier' || rs.edgeType === 'self' || rs.edgeType === 'compound') { - var pts = rs.allpts; - for (var i = 0; i + 5 < rs.allpts.length; i += 4) { - if (inBezierVicinity(x, y, pts[i], pts[i + 1], pts[i + 2], pts[i + 3], pts[i + 4], pts[i + 5], width2) && widthSq > (sqDist = sqdistToQuadraticBezier(x, y, pts[i], pts[i + 1], pts[i + 2], pts[i + 3], pts[i + 4], pts[i + 5]))) { - addEle(edge, sqDist); - return true; - } - } - } - - // if we're close to the edge but didn't hit it, maybe we hit its arrows - - var src = src || _p.source; - var tgt = tgt || _p.target; - var arSize = self.getArrowWidth(styleWidth, scale); - var arrows = [{ - name: 'source', - x: rs.arrowStartX, - y: rs.arrowStartY, - angle: rs.srcArrowAngle - }, { - name: 'target', - x: rs.arrowEndX, - y: rs.arrowEndY, - angle: rs.tgtArrowAngle - }, { - name: 'mid-source', - x: rs.midX, - y: rs.midY, - angle: rs.midsrcArrowAngle - }, { - name: 'mid-target', - x: rs.midX, - y: rs.midY, - angle: rs.midtgtArrowAngle - }]; - for (var i = 0; i < arrows.length; i++) { - var ar = arrows[i]; - var shape = r.arrowShapes[edge.pstyle(ar.name + '-arrow-shape').value]; - var edgeWidth = edge.pstyle('width').pfValue; - if (shape.roughCollide(x, y, arSize, ar.angle, { - x: ar.x, - y: ar.y - }, edgeWidth, edgeThreshold) && shape.collide(x, y, arSize, ar.angle, { - x: ar.x, - y: ar.y - }, edgeWidth, edgeThreshold)) { - addEle(edge); - return true; - } - } - - // for compound graphs, hitting edge may actually want a connected node instead (b/c edge may have greater z-index precedence) - if (hasCompounds && near.length > 0) { - checkNode(src); - checkNode(tgt); - } - } - function preprop(obj, name, pre) { - return getPrefixedProperty(obj, name, pre); - } - function checkLabel(ele, prefix) { - var _p = ele._private; - var th = labelThreshold; - var prefixDash; - if (prefix) { - prefixDash = prefix + '-'; - } else { - prefixDash = ''; - } - ele.boundingBox(); - var bb = _p.labelBounds[prefix || 'main']; - var text = ele.pstyle(prefixDash + 'label').value; - var eventsEnabled = ele.pstyle('text-events').strValue === 'yes'; - if (!eventsEnabled || !text) { - return; - } - var lx = preprop(_p.rscratch, 'labelX', prefix); - var ly = preprop(_p.rscratch, 'labelY', prefix); - var theta = preprop(_p.rscratch, 'labelAngle', prefix); - var ox = ele.pstyle(prefixDash + 'text-margin-x').pfValue; - var oy = ele.pstyle(prefixDash + 'text-margin-y').pfValue; - var lx1 = bb.x1 - th - ox; // (-ox, -oy) as bb already includes margin - var lx2 = bb.x2 + th - ox; // and rotation is about (lx, ly) - var ly1 = bb.y1 - th - oy; - var ly2 = bb.y2 + th - oy; - if (theta) { - var cos = Math.cos(theta); - var sin = Math.sin(theta); - var rotate = function rotate(x, y) { - x = x - lx; - y = y - ly; - return { - x: x * cos - y * sin + lx, - y: x * sin + y * cos + ly - }; - }; - var px1y1 = rotate(lx1, ly1); - var px1y2 = rotate(lx1, ly2); - var px2y1 = rotate(lx2, ly1); - var px2y2 = rotate(lx2, ly2); - var points = [ - // with the margin added after the rotation is applied - px1y1.x + ox, px1y1.y + oy, px2y1.x + ox, px2y1.y + oy, px2y2.x + ox, px2y2.y + oy, px1y2.x + ox, px1y2.y + oy]; - if (pointInsidePolygonPoints(x, y, points)) { - addEle(ele); - return true; - } - } else { - // do a cheaper bb check - if (inBoundingBox(bb, x, y)) { - addEle(ele); - return true; - } - } - } - for (var i = eles.length - 1; i >= 0; i--) { - // reverse order for precedence - var ele = eles[i]; - if (ele.isNode()) { - checkNode(ele) || checkLabel(ele); - } else { - // then edge - checkEdge(ele) || checkLabel(ele) || checkLabel(ele, 'source') || checkLabel(ele, 'target'); - } - } - return near; -}; - -// 'Give me everything from this box' -BRp$e.getAllInBox = function (x1, y1, x2, y2) { - var eles = this.getCachedZSortedEles().interactive; - var box = []; - var x1c = Math.min(x1, x2); - var x2c = Math.max(x1, x2); - var y1c = Math.min(y1, y2); - var y2c = Math.max(y1, y2); - x1 = x1c; - x2 = x2c; - y1 = y1c; - y2 = y2c; - var boxBb = makeBoundingBox({ - x1: x1, - y1: y1, - x2: x2, - y2: y2 - }); - for (var e = 0; e < eles.length; e++) { - var ele = eles[e]; - if (ele.isNode()) { - var node = ele; - var nodeBb = node.boundingBox({ - includeNodes: true, - includeEdges: false, - includeLabels: false - }); - if (boundingBoxesIntersect(boxBb, nodeBb) && !boundingBoxInBoundingBox(nodeBb, boxBb)) { - box.push(node); - } - } else { - var edge = ele; - var _p = edge._private; - var rs = _p.rscratch; - if (rs.startX != null && rs.startY != null && !inBoundingBox(boxBb, rs.startX, rs.startY)) { - continue; - } - if (rs.endX != null && rs.endY != null && !inBoundingBox(boxBb, rs.endX, rs.endY)) { - continue; - } - if (rs.edgeType === 'bezier' || rs.edgeType === 'multibezier' || rs.edgeType === 'self' || rs.edgeType === 'compound' || rs.edgeType === 'segments' || rs.edgeType === 'haystack') { - var pts = _p.rstyle.bezierPts || _p.rstyle.linePts || _p.rstyle.haystackPts; - var allInside = true; - for (var i = 0; i < pts.length; i++) { - if (!pointInBoundingBox(boxBb, pts[i])) { - allInside = false; - break; - } - } - if (allInside) { - box.push(edge); - } - } else if (rs.edgeType === 'haystack' || rs.edgeType === 'straight') { - box.push(edge); - } - } - } - return box; -}; - -var BRp$d = {}; -BRp$d.calculateArrowAngles = function (edge) { - var rs = edge._private.rscratch; - var isHaystack = rs.edgeType === 'haystack'; - var isBezier = rs.edgeType === 'bezier'; - var isMultibezier = rs.edgeType === 'multibezier'; - var isSegments = rs.edgeType === 'segments'; - var isCompound = rs.edgeType === 'compound'; - var isSelf = rs.edgeType === 'self'; - - // Displacement gives direction for arrowhead orientation - var dispX, dispY; - var startX, startY, endX, endY, midX, midY; - if (isHaystack) { - startX = rs.haystackPts[0]; - startY = rs.haystackPts[1]; - endX = rs.haystackPts[2]; - endY = rs.haystackPts[3]; - } else { - startX = rs.arrowStartX; - startY = rs.arrowStartY; - endX = rs.arrowEndX; - endY = rs.arrowEndY; - } - midX = rs.midX; - midY = rs.midY; - - // source - // - - if (isSegments) { - dispX = startX - rs.segpts[0]; - dispY = startY - rs.segpts[1]; - } else if (isMultibezier || isCompound || isSelf || isBezier) { - var pts = rs.allpts; - var bX = qbezierAt(pts[0], pts[2], pts[4], 0.1); - var bY = qbezierAt(pts[1], pts[3], pts[5], 0.1); - dispX = startX - bX; - dispY = startY - bY; - } else { - dispX = startX - midX; - dispY = startY - midY; - } - rs.srcArrowAngle = getAngleFromDisp(dispX, dispY); - - // mid target - // - - var midX = rs.midX; - var midY = rs.midY; - if (isHaystack) { - midX = (startX + endX) / 2; - midY = (startY + endY) / 2; - } - dispX = endX - startX; - dispY = endY - startY; - if (isSegments) { - var pts = rs.allpts; - if (pts.length / 2 % 2 === 0) { - var i2 = pts.length / 2; - var i1 = i2 - 2; - dispX = pts[i2] - pts[i1]; - dispY = pts[i2 + 1] - pts[i1 + 1]; - } else if (rs.isRound) { - dispX = rs.midVector[1]; - dispY = -rs.midVector[0]; - } else { - var i2 = pts.length / 2 - 1; - var i1 = i2 - 2; - dispX = pts[i2] - pts[i1]; - dispY = pts[i2 + 1] - pts[i1 + 1]; - } - } else if (isMultibezier || isCompound || isSelf) { - var pts = rs.allpts; - var cpts = rs.ctrlpts; - var bp0x, bp0y; - var bp1x, bp1y; - if (cpts.length / 2 % 2 === 0) { - var p0 = pts.length / 2 - 1; // startpt - var ic = p0 + 2; - var p1 = ic + 2; - bp0x = qbezierAt(pts[p0], pts[ic], pts[p1], 0.0); - bp0y = qbezierAt(pts[p0 + 1], pts[ic + 1], pts[p1 + 1], 0.0); - bp1x = qbezierAt(pts[p0], pts[ic], pts[p1], 0.0001); - bp1y = qbezierAt(pts[p0 + 1], pts[ic + 1], pts[p1 + 1], 0.0001); - } else { - var ic = pts.length / 2 - 1; // ctrpt - var p0 = ic - 2; // startpt - var p1 = ic + 2; // endpt - - bp0x = qbezierAt(pts[p0], pts[ic], pts[p1], 0.4999); - bp0y = qbezierAt(pts[p0 + 1], pts[ic + 1], pts[p1 + 1], 0.4999); - bp1x = qbezierAt(pts[p0], pts[ic], pts[p1], 0.5); - bp1y = qbezierAt(pts[p0 + 1], pts[ic + 1], pts[p1 + 1], 0.5); - } - dispX = bp1x - bp0x; - dispY = bp1y - bp0y; - } - rs.midtgtArrowAngle = getAngleFromDisp(dispX, dispY); - rs.midDispX = dispX; - rs.midDispY = dispY; - - // mid source - // - - dispX *= -1; - dispY *= -1; - if (isSegments) { - var pts = rs.allpts; - if (pts.length / 2 % 2 === 0) ; else if (!rs.isRound) { - var i2 = pts.length / 2 - 1; - var i3 = i2 + 2; - dispX = -(pts[i3] - pts[i2]); - dispY = -(pts[i3 + 1] - pts[i2 + 1]); - } - } - rs.midsrcArrowAngle = getAngleFromDisp(dispX, dispY); - - // target - // - - if (isSegments) { - dispX = endX - rs.segpts[rs.segpts.length - 2]; - dispY = endY - rs.segpts[rs.segpts.length - 1]; - } else if (isMultibezier || isCompound || isSelf || isBezier) { - var pts = rs.allpts; - var l = pts.length; - var bX = qbezierAt(pts[l - 6], pts[l - 4], pts[l - 2], 0.9); - var bY = qbezierAt(pts[l - 5], pts[l - 3], pts[l - 1], 0.9); - dispX = endX - bX; - dispY = endY - bY; - } else { - dispX = endX - midX; - dispY = endY - midY; - } - rs.tgtArrowAngle = getAngleFromDisp(dispX, dispY); -}; -BRp$d.getArrowWidth = BRp$d.getArrowHeight = function (edgeWidth, scale) { - var cache = this.arrowWidthCache = this.arrowWidthCache || {}; - var cachedVal = cache[edgeWidth + ', ' + scale]; - if (cachedVal) { - return cachedVal; - } - cachedVal = Math.max(Math.pow(edgeWidth * 13.37, 0.9), 29) * scale; - cache[edgeWidth + ', ' + scale] = cachedVal; - return cachedVal; -}; - -/** - * Explained by Blindman67 at https://stackoverflow.com/a/44856925/11028828 - */ - -// Declare reused variable to avoid reallocating variables every time the function is called -var x, - y, - v1 = {}, - v2 = {}, - sinA, - sinA90, - radDirection, - drawDirection, - angle, - halfAngle, - cRadius, - lenOut, - radius, - limit; -var startX, startY, stopX, stopY; -var lastPoint; - -// convert 2 points into vector form, polar form, and normalised -var asVec = function asVec(p, pp, v) { - v.x = pp.x - p.x; - v.y = pp.y - p.y; - v.len = Math.sqrt(v.x * v.x + v.y * v.y); - v.nx = v.x / v.len; - v.ny = v.y / v.len; - v.ang = Math.atan2(v.ny, v.nx); -}; -var invertVec = function invertVec(originalV, invertedV) { - invertedV.x = originalV.x * -1; - invertedV.y = originalV.y * -1; - invertedV.nx = originalV.nx * -1; - invertedV.ny = originalV.ny * -1; - invertedV.ang = originalV.ang > 0 ? -(Math.PI - originalV.ang) : Math.PI + originalV.ang; -}; -var calcCornerArc = function calcCornerArc(previousPoint, currentPoint, nextPoint, radiusMax, isArcRadius) { - //----------------------------------------- - // Part 1 - previousPoint !== lastPoint ? asVec(currentPoint, previousPoint, v1) : invertVec(v2, v1); // Avoid recalculating vec if it is the invert of the last one calculated - asVec(currentPoint, nextPoint, v2); - sinA = v1.nx * v2.ny - v1.ny * v2.nx; - sinA90 = v1.nx * v2.nx - v1.ny * -v2.ny; - angle = Math.asin(Math.max(-1, Math.min(1, sinA))); - if (Math.abs(angle) < 1e-6) { - x = currentPoint.x; - y = currentPoint.y; - cRadius = radius = 0; - return; - } - //----------------------------------------- - radDirection = 1; - drawDirection = false; - if (sinA90 < 0) { - if (angle < 0) { - angle = Math.PI + angle; - } else { - angle = Math.PI - angle; - radDirection = -1; - drawDirection = true; - } - } else { - if (angle > 0) { - radDirection = -1; - drawDirection = true; - } - } - if (currentPoint.radius !== undefined) { - radius = currentPoint.radius; - } else { - radius = radiusMax; - } - //----------------------------------------- - // Part 2 - halfAngle = angle / 2; - //----------------------------------------- - - limit = Math.min(v1.len / 2, v2.len / 2); - if (isArcRadius) { - //----------------------------------------- - // Part 3 - lenOut = Math.abs(Math.cos(halfAngle) * radius / Math.sin(halfAngle)); - - //----------------------------------------- - // Special part A - if (lenOut > limit) { - lenOut = limit; - cRadius = Math.abs(lenOut * Math.sin(halfAngle) / Math.cos(halfAngle)); - } else { - cRadius = radius; - } - } else { - lenOut = Math.min(limit, radius); - cRadius = Math.abs(lenOut * Math.sin(halfAngle) / Math.cos(halfAngle)); - } - //----------------------------------------- - - //----------------------------------------- - // Part 4 - stopX = currentPoint.x + v2.nx * lenOut; - stopY = currentPoint.y + v2.ny * lenOut; - //----------------------------------------- - // Part 5 - x = stopX - v2.ny * cRadius * radDirection; - y = stopY + v2.nx * cRadius * radDirection; - //----------------------------------------- - // Additional Part : calculate start point E - startX = currentPoint.x + v1.nx * lenOut; - startY = currentPoint.y + v1.ny * lenOut; - - // Save last point to avoid recalculating vector when not needed - lastPoint = currentPoint; -}; - -/** - * Draw corner provided by {@link getRoundCorner} - * - * @param ctx :CanvasRenderingContext2D - * @param roundCorner {{cx:number, cy:number, radius:number, endAngle: number, startAngle: number, counterClockwise: boolean}} - */ -function drawPreparedRoundCorner(ctx, roundCorner) { - if (roundCorner.radius === 0) ctx.lineTo(roundCorner.cx, roundCorner.cy);else ctx.arc(roundCorner.cx, roundCorner.cy, roundCorner.radius, roundCorner.startAngle, roundCorner.endAngle, roundCorner.counterClockwise); -} - -/** - * Get round corner from a point and its previous and next neighbours in a path - * - * @param previousPoint {{x: number, y:number, radius: number?}} - * @param currentPoint {{x: number, y:number, radius: number?}} - * @param nextPoint {{x: number, y:number, radius: number?}} - * @param radiusMax :number - * @param isArcRadius :boolean - * @return {{ - * cx:number, cy:number, radius:number, - * startX:number, startY:number, - * stopX:number, stopY: number, - * endAngle: number, startAngle: number, counterClockwise: boolean - * }} - */ -function getRoundCorner(previousPoint, currentPoint, nextPoint, radiusMax) { - var isArcRadius = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true; - if (radiusMax === 0 || currentPoint.radius === 0) return { - cx: currentPoint.x, - cy: currentPoint.y, - radius: 0, - startX: currentPoint.x, - startY: currentPoint.y, - stopX: currentPoint.x, - stopY: currentPoint.y, - startAngle: undefined, - endAngle: undefined, - counterClockwise: undefined - }; - calcCornerArc(previousPoint, currentPoint, nextPoint, radiusMax, isArcRadius); - return { - cx: x, - cy: y, - radius: cRadius, - startX: startX, - startY: startY, - stopX: stopX, - stopY: stopY, - startAngle: v1.ang + Math.PI / 2 * radDirection, - endAngle: v2.ang - Math.PI / 2 * radDirection, - counterClockwise: drawDirection - }; -} - -var BRp$c = {}; -BRp$c.findMidptPtsEtc = function (edge, pairInfo) { - var posPts = pairInfo.posPts, - intersectionPts = pairInfo.intersectionPts, - vectorNormInverse = pairInfo.vectorNormInverse; - var midptPts; - - // n.b. assumes all edges in bezier bundle have same endpoints specified - var srcManEndpt = edge.pstyle('source-endpoint'); - var tgtManEndpt = edge.pstyle('target-endpoint'); - var haveManualEndPts = srcManEndpt.units != null && tgtManEndpt.units != null; - var recalcVectorNormInverse = function recalcVectorNormInverse(x1, y1, x2, y2) { - var dy = y2 - y1; - var dx = x2 - x1; - var l = Math.sqrt(dx * dx + dy * dy); - return { - x: -dy / l, - y: dx / l - }; - }; - var edgeDistances = edge.pstyle('edge-distances').value; - switch (edgeDistances) { - case 'node-position': - midptPts = posPts; - break; - case 'intersection': - midptPts = intersectionPts; - break; - case 'endpoints': - { - if (haveManualEndPts) { - var _this$manualEndptToPx = this.manualEndptToPx(edge.source()[0], srcManEndpt), - _this$manualEndptToPx2 = _slicedToArray(_this$manualEndptToPx, 2), - x1 = _this$manualEndptToPx2[0], - y1 = _this$manualEndptToPx2[1]; - var _this$manualEndptToPx3 = this.manualEndptToPx(edge.target()[0], tgtManEndpt), - _this$manualEndptToPx4 = _slicedToArray(_this$manualEndptToPx3, 2), - x2 = _this$manualEndptToPx4[0], - y2 = _this$manualEndptToPx4[1]; - var endPts = { - x1: x1, - y1: y1, - x2: x2, - y2: y2 - }; - vectorNormInverse = recalcVectorNormInverse(x1, y1, x2, y2); - midptPts = endPts; - } else { - warn("Edge ".concat(edge.id(), " has edge-distances:endpoints specified without manual endpoints specified via source-endpoint and target-endpoint. Falling back on edge-distances:intersection (default).")); - midptPts = intersectionPts; // back to default - } - - break; - } - } - return { - midptPts: midptPts, - vectorNormInverse: vectorNormInverse - }; -}; -BRp$c.findHaystackPoints = function (edges) { - for (var i = 0; i < edges.length; i++) { - var edge = edges[i]; - var _p = edge._private; - var rs = _p.rscratch; - if (!rs.haystack) { - var angle = Math.random() * 2 * Math.PI; - rs.source = { - x: Math.cos(angle), - y: Math.sin(angle) - }; - angle = Math.random() * 2 * Math.PI; - rs.target = { - x: Math.cos(angle), - y: Math.sin(angle) - }; - } - var src = _p.source; - var tgt = _p.target; - var srcPos = src.position(); - var tgtPos = tgt.position(); - var srcW = src.width(); - var tgtW = tgt.width(); - var srcH = src.height(); - var tgtH = tgt.height(); - var radius = edge.pstyle('haystack-radius').value; - var halfRadius = radius / 2; // b/c have to half width/height - - rs.haystackPts = rs.allpts = [rs.source.x * srcW * halfRadius + srcPos.x, rs.source.y * srcH * halfRadius + srcPos.y, rs.target.x * tgtW * halfRadius + tgtPos.x, rs.target.y * tgtH * halfRadius + tgtPos.y]; - rs.midX = (rs.allpts[0] + rs.allpts[2]) / 2; - rs.midY = (rs.allpts[1] + rs.allpts[3]) / 2; - - // always override as haystack in case set to different type previously - rs.edgeType = 'haystack'; - rs.haystack = true; - this.storeEdgeProjections(edge); - this.calculateArrowAngles(edge); - this.recalculateEdgeLabelProjections(edge); - this.calculateLabelAngles(edge); - } -}; -BRp$c.findSegmentsPoints = function (edge, pairInfo) { - // Segments (multiple straight lines) - - var rs = edge._private.rscratch; - var segmentWs = edge.pstyle('segment-weights'); - var segmentDs = edge.pstyle('segment-distances'); - var segmentRs = edge.pstyle('segment-radii'); - var segmentTs = edge.pstyle('radius-type'); - var segmentsN = Math.min(segmentWs.pfValue.length, segmentDs.pfValue.length); - var lastRadius = segmentRs.pfValue[segmentRs.pfValue.length - 1]; - var lastRadiusType = segmentTs.pfValue[segmentTs.pfValue.length - 1]; - rs.edgeType = 'segments'; - rs.segpts = []; - rs.radii = []; - rs.isArcRadius = []; - for (var s = 0; s < segmentsN; s++) { - var w = segmentWs.pfValue[s]; - var d = segmentDs.pfValue[s]; - var w1 = 1 - w; - var w2 = w; - var _this$findMidptPtsEtc = this.findMidptPtsEtc(edge, pairInfo), - midptPts = _this$findMidptPtsEtc.midptPts, - vectorNormInverse = _this$findMidptPtsEtc.vectorNormInverse; - var adjustedMidpt = { - x: midptPts.x1 * w1 + midptPts.x2 * w2, - y: midptPts.y1 * w1 + midptPts.y2 * w2 - }; - rs.segpts.push(adjustedMidpt.x + vectorNormInverse.x * d, adjustedMidpt.y + vectorNormInverse.y * d); - rs.radii.push(segmentRs.pfValue[s] !== undefined ? segmentRs.pfValue[s] : lastRadius); - rs.isArcRadius.push((segmentTs.pfValue[s] !== undefined ? segmentTs.pfValue[s] : lastRadiusType) === 'arc-radius'); - } -}; -BRp$c.findLoopPoints = function (edge, pairInfo, i, edgeIsUnbundled) { - // Self-edge - - var rs = edge._private.rscratch; - var dirCounts = pairInfo.dirCounts, - srcPos = pairInfo.srcPos; - var ctrlptDists = edge.pstyle('control-point-distances'); - var ctrlptDist = ctrlptDists ? ctrlptDists.pfValue[0] : undefined; - var loopDir = edge.pstyle('loop-direction').pfValue; - var loopSwp = edge.pstyle('loop-sweep').pfValue; - var stepSize = edge.pstyle('control-point-step-size').pfValue; - rs.edgeType = 'self'; - var j = i; - var loopDist = stepSize; - if (edgeIsUnbundled) { - j = 0; - loopDist = ctrlptDist; - } - var loopAngle = loopDir - Math.PI / 2; - var outAngle = loopAngle - loopSwp / 2; - var inAngle = loopAngle + loopSwp / 2; - - // increase by step size for overlapping loops, keyed on direction and sweep values - var dc = String(loopDir + '_' + loopSwp); - j = dirCounts[dc] === undefined ? dirCounts[dc] = 0 : ++dirCounts[dc]; - rs.ctrlpts = [srcPos.x + Math.cos(outAngle) * 1.4 * loopDist * (j / 3 + 1), srcPos.y + Math.sin(outAngle) * 1.4 * loopDist * (j / 3 + 1), srcPos.x + Math.cos(inAngle) * 1.4 * loopDist * (j / 3 + 1), srcPos.y + Math.sin(inAngle) * 1.4 * loopDist * (j / 3 + 1)]; -}; -BRp$c.findCompoundLoopPoints = function (edge, pairInfo, i, edgeIsUnbundled) { - // Compound edge - - var rs = edge._private.rscratch; - rs.edgeType = 'compound'; - var srcPos = pairInfo.srcPos, - tgtPos = pairInfo.tgtPos, - srcW = pairInfo.srcW, - srcH = pairInfo.srcH, - tgtW = pairInfo.tgtW, - tgtH = pairInfo.tgtH; - var stepSize = edge.pstyle('control-point-step-size').pfValue; - var ctrlptDists = edge.pstyle('control-point-distances'); - var ctrlptDist = ctrlptDists ? ctrlptDists.pfValue[0] : undefined; - var j = i; - var loopDist = stepSize; - if (edgeIsUnbundled) { - j = 0; - loopDist = ctrlptDist; - } - var loopW = 50; - var loopaPos = { - x: srcPos.x - srcW / 2, - y: srcPos.y - srcH / 2 - }; - var loopbPos = { - x: tgtPos.x - tgtW / 2, - y: tgtPos.y - tgtH / 2 - }; - var loopPos = { - x: Math.min(loopaPos.x, loopbPos.x), - y: Math.min(loopaPos.y, loopbPos.y) - }; - - // avoids cases with impossible beziers - var minCompoundStretch = 0.5; - var compoundStretchA = Math.max(minCompoundStretch, Math.log(srcW * 0.01)); - var compoundStretchB = Math.max(minCompoundStretch, Math.log(tgtW * 0.01)); - rs.ctrlpts = [loopPos.x, loopPos.y - (1 + Math.pow(loopW, 1.12) / 100) * loopDist * (j / 3 + 1) * compoundStretchA, loopPos.x - (1 + Math.pow(loopW, 1.12) / 100) * loopDist * (j / 3 + 1) * compoundStretchB, loopPos.y]; -}; -BRp$c.findStraightEdgePoints = function (edge) { - // Straight edge within bundle - - edge._private.rscratch.edgeType = 'straight'; -}; -BRp$c.findBezierPoints = function (edge, pairInfo, i, edgeIsUnbundled, edgeIsSwapped) { - var rs = edge._private.rscratch; - var stepSize = edge.pstyle('control-point-step-size').pfValue; - var ctrlptDists = edge.pstyle('control-point-distances'); - var ctrlptWs = edge.pstyle('control-point-weights'); - var bezierN = ctrlptDists && ctrlptWs ? Math.min(ctrlptDists.value.length, ctrlptWs.value.length) : 1; - var ctrlptDist = ctrlptDists ? ctrlptDists.pfValue[0] : undefined; - var ctrlptWeight = ctrlptWs.value[0]; - - // (Multi)bezier - - var multi = edgeIsUnbundled; - rs.edgeType = multi ? 'multibezier' : 'bezier'; - rs.ctrlpts = []; - for (var b = 0; b < bezierN; b++) { - var normctrlptDist = (0.5 - pairInfo.eles.length / 2 + i) * stepSize * (edgeIsSwapped ? -1 : 1); - var manctrlptDist = void 0; - var sign = signum(normctrlptDist); - if (multi) { - ctrlptDist = ctrlptDists ? ctrlptDists.pfValue[b] : stepSize; // fall back on step size - ctrlptWeight = ctrlptWs.value[b]; - } - if (edgeIsUnbundled) { - // multi or single unbundled - manctrlptDist = ctrlptDist; - } else { - manctrlptDist = ctrlptDist !== undefined ? sign * ctrlptDist : undefined; - } - var distanceFromMidpoint = manctrlptDist !== undefined ? manctrlptDist : normctrlptDist; - var w1 = 1 - ctrlptWeight; - var w2 = ctrlptWeight; - var _this$findMidptPtsEtc2 = this.findMidptPtsEtc(edge, pairInfo), - midptPts = _this$findMidptPtsEtc2.midptPts, - vectorNormInverse = _this$findMidptPtsEtc2.vectorNormInverse; - var adjustedMidpt = { - x: midptPts.x1 * w1 + midptPts.x2 * w2, - y: midptPts.y1 * w1 + midptPts.y2 * w2 - }; - rs.ctrlpts.push(adjustedMidpt.x + vectorNormInverse.x * distanceFromMidpoint, adjustedMidpt.y + vectorNormInverse.y * distanceFromMidpoint); - } -}; -BRp$c.findTaxiPoints = function (edge, pairInfo) { - // Taxicab geometry with two turns maximum - - var rs = edge._private.rscratch; - rs.edgeType = 'segments'; - var VERTICAL = 'vertical'; - var HORIZONTAL = 'horizontal'; - var LEFTWARD = 'leftward'; - var RIGHTWARD = 'rightward'; - var DOWNWARD = 'downward'; - var UPWARD = 'upward'; - var AUTO = 'auto'; - var posPts = pairInfo.posPts, - srcW = pairInfo.srcW, - srcH = pairInfo.srcH, - tgtW = pairInfo.tgtW, - tgtH = pairInfo.tgtH; - var edgeDistances = edge.pstyle('edge-distances').value; - var dIncludesNodeBody = edgeDistances !== 'node-position'; - var taxiDir = edge.pstyle('taxi-direction').value; - var rawTaxiDir = taxiDir; // unprocessed value - var taxiTurn = edge.pstyle('taxi-turn'); - var turnIsPercent = taxiTurn.units === '%'; - var taxiTurnPfVal = taxiTurn.pfValue; - var turnIsNegative = taxiTurnPfVal < 0; // i.e. from target side - var minD = edge.pstyle('taxi-turn-min-distance').pfValue; - var dw = dIncludesNodeBody ? (srcW + tgtW) / 2 : 0; - var dh = dIncludesNodeBody ? (srcH + tgtH) / 2 : 0; - var pdx = posPts.x2 - posPts.x1; - var pdy = posPts.y2 - posPts.y1; - - // take away the effective w/h from the magnitude of the delta value - var subDWH = function subDWH(dxy, dwh) { - if (dxy > 0) { - return Math.max(dxy - dwh, 0); - } else { - return Math.min(dxy + dwh, 0); - } - }; - var dx = subDWH(pdx, dw); - var dy = subDWH(pdy, dh); - var isExplicitDir = false; - if (rawTaxiDir === AUTO) { - taxiDir = Math.abs(dx) > Math.abs(dy) ? HORIZONTAL : VERTICAL; - } else if (rawTaxiDir === UPWARD || rawTaxiDir === DOWNWARD) { - taxiDir = VERTICAL; - isExplicitDir = true; - } else if (rawTaxiDir === LEFTWARD || rawTaxiDir === RIGHTWARD) { - taxiDir = HORIZONTAL; - isExplicitDir = true; - } - var isVert = taxiDir === VERTICAL; - var l = isVert ? dy : dx; - var pl = isVert ? pdy : pdx; - var sgnL = signum(pl); - var forcedDir = false; - if (!(isExplicitDir && (turnIsPercent || turnIsNegative)) // forcing in this case would cause weird growing in the opposite direction - && (rawTaxiDir === DOWNWARD && pl < 0 || rawTaxiDir === UPWARD && pl > 0 || rawTaxiDir === LEFTWARD && pl > 0 || rawTaxiDir === RIGHTWARD && pl < 0)) { - sgnL *= -1; - l = sgnL * Math.abs(l); - forcedDir = true; - } - var d; - if (turnIsPercent) { - var p = taxiTurnPfVal < 0 ? 1 + taxiTurnPfVal : taxiTurnPfVal; - d = p * l; - } else { - var k = taxiTurnPfVal < 0 ? l : 0; - d = k + taxiTurnPfVal * sgnL; - } - var getIsTooClose = function getIsTooClose(d) { - return Math.abs(d) < minD || Math.abs(d) >= Math.abs(l); - }; - var isTooCloseSrc = getIsTooClose(d); - var isTooCloseTgt = getIsTooClose(Math.abs(l) - Math.abs(d)); - var isTooClose = isTooCloseSrc || isTooCloseTgt; - if (isTooClose && !forcedDir) { - // non-ideal routing - if (isVert) { - // vertical fallbacks - var lShapeInsideSrc = Math.abs(pl) <= srcH / 2; - var lShapeInsideTgt = Math.abs(pdx) <= tgtW / 2; - if (lShapeInsideSrc) { - // horizontal Z-shape (direction not respected) - var x = (posPts.x1 + posPts.x2) / 2; - var y1 = posPts.y1, - y2 = posPts.y2; - rs.segpts = [x, y1, x, y2]; - } else if (lShapeInsideTgt) { - // vertical Z-shape (distance not respected) - var y = (posPts.y1 + posPts.y2) / 2; - var x1 = posPts.x1, - x2 = posPts.x2; - rs.segpts = [x1, y, x2, y]; - } else { - // L-shape fallback (turn distance not respected, but works well with tree siblings) - rs.segpts = [posPts.x1, posPts.y2]; - } - } else { - // horizontal fallbacks - var _lShapeInsideSrc = Math.abs(pl) <= srcW / 2; - var _lShapeInsideTgt = Math.abs(pdy) <= tgtH / 2; - if (_lShapeInsideSrc) { - // vertical Z-shape (direction not respected) - var _y = (posPts.y1 + posPts.y2) / 2; - var _x = posPts.x1, - _x2 = posPts.x2; - rs.segpts = [_x, _y, _x2, _y]; - } else if (_lShapeInsideTgt) { - // horizontal Z-shape (turn distance not respected) - var _x3 = (posPts.x1 + posPts.x2) / 2; - var _y2 = posPts.y1, - _y3 = posPts.y2; - rs.segpts = [_x3, _y2, _x3, _y3]; - } else { - // L-shape (turn distance not respected, but works well for tree siblings) - rs.segpts = [posPts.x2, posPts.y1]; - } - } - } else { - // ideal routing - if (isVert) { - var _y4 = posPts.y1 + d + (dIncludesNodeBody ? srcH / 2 * sgnL : 0); - var _x4 = posPts.x1, - _x5 = posPts.x2; - rs.segpts = [_x4, _y4, _x5, _y4]; - } else { - // horizontal - var _x6 = posPts.x1 + d + (dIncludesNodeBody ? srcW / 2 * sgnL : 0); - var _y5 = posPts.y1, - _y6 = posPts.y2; - rs.segpts = [_x6, _y5, _x6, _y6]; - } - } - if (rs.isRound) { - var radius = edge.pstyle('taxi-radius').value; - var isArcRadius = edge.pstyle('radius-type').value[0] === 'arc-radius'; - rs.radii = new Array(rs.segpts.length / 2).fill(radius); - rs.isArcRadius = new Array(rs.segpts.length / 2).fill(isArcRadius); - } -}; -BRp$c.tryToCorrectInvalidPoints = function (edge, pairInfo) { - var rs = edge._private.rscratch; - - // can only correct beziers for now... - if (rs.edgeType === 'bezier') { - var srcPos = pairInfo.srcPos, - tgtPos = pairInfo.tgtPos, - srcW = pairInfo.srcW, - srcH = pairInfo.srcH, - tgtW = pairInfo.tgtW, - tgtH = pairInfo.tgtH, - srcShape = pairInfo.srcShape, - tgtShape = pairInfo.tgtShape, - srcCornerRadius = pairInfo.srcCornerRadius, - tgtCornerRadius = pairInfo.tgtCornerRadius, - srcRs = pairInfo.srcRs, - tgtRs = pairInfo.tgtRs; - var badStart = !number$1(rs.startX) || !number$1(rs.startY); - var badAStart = !number$1(rs.arrowStartX) || !number$1(rs.arrowStartY); - var badEnd = !number$1(rs.endX) || !number$1(rs.endY); - var badAEnd = !number$1(rs.arrowEndX) || !number$1(rs.arrowEndY); - var minCpADistFactor = 3; - var arrowW = this.getArrowWidth(edge.pstyle('width').pfValue, edge.pstyle('arrow-scale').value) * this.arrowShapeWidth; - var minCpADist = minCpADistFactor * arrowW; - var startACpDist = dist({ - x: rs.ctrlpts[0], - y: rs.ctrlpts[1] - }, { - x: rs.startX, - y: rs.startY - }); - var closeStartACp = startACpDist < minCpADist; - var endACpDist = dist({ - x: rs.ctrlpts[0], - y: rs.ctrlpts[1] - }, { - x: rs.endX, - y: rs.endY - }); - var closeEndACp = endACpDist < minCpADist; - var overlapping = false; - if (badStart || badAStart || closeStartACp) { - overlapping = true; - - // project control point along line from src centre to outside the src shape - // (otherwise intersection will yield nothing) - var cpD = { - // delta - x: rs.ctrlpts[0] - srcPos.x, - y: rs.ctrlpts[1] - srcPos.y - }; - var cpL = Math.sqrt(cpD.x * cpD.x + cpD.y * cpD.y); // length of line - var cpM = { - // normalised delta - x: cpD.x / cpL, - y: cpD.y / cpL - }; - var radius = Math.max(srcW, srcH); - var cpProj = { - // *2 radius guarantees outside shape - x: rs.ctrlpts[0] + cpM.x * 2 * radius, - y: rs.ctrlpts[1] + cpM.y * 2 * radius - }; - var srcCtrlPtIntn = srcShape.intersectLine(srcPos.x, srcPos.y, srcW, srcH, cpProj.x, cpProj.y, 0, srcCornerRadius, srcRs); - if (closeStartACp) { - rs.ctrlpts[0] = rs.ctrlpts[0] + cpM.x * (minCpADist - startACpDist); - rs.ctrlpts[1] = rs.ctrlpts[1] + cpM.y * (minCpADist - startACpDist); - } else { - rs.ctrlpts[0] = srcCtrlPtIntn[0] + cpM.x * minCpADist; - rs.ctrlpts[1] = srcCtrlPtIntn[1] + cpM.y * minCpADist; - } - } - if (badEnd || badAEnd || closeEndACp) { - overlapping = true; - - // project control point along line from tgt centre to outside the tgt shape - // (otherwise intersection will yield nothing) - var _cpD = { - // delta - x: rs.ctrlpts[0] - tgtPos.x, - y: rs.ctrlpts[1] - tgtPos.y - }; - var _cpL = Math.sqrt(_cpD.x * _cpD.x + _cpD.y * _cpD.y); // length of line - var _cpM = { - // normalised delta - x: _cpD.x / _cpL, - y: _cpD.y / _cpL - }; - var _radius = Math.max(srcW, srcH); - var _cpProj = { - // *2 radius guarantees outside shape - x: rs.ctrlpts[0] + _cpM.x * 2 * _radius, - y: rs.ctrlpts[1] + _cpM.y * 2 * _radius - }; - var tgtCtrlPtIntn = tgtShape.intersectLine(tgtPos.x, tgtPos.y, tgtW, tgtH, _cpProj.x, _cpProj.y, 0, tgtCornerRadius, tgtRs); - if (closeEndACp) { - rs.ctrlpts[0] = rs.ctrlpts[0] + _cpM.x * (minCpADist - endACpDist); - rs.ctrlpts[1] = rs.ctrlpts[1] + _cpM.y * (minCpADist - endACpDist); - } else { - rs.ctrlpts[0] = tgtCtrlPtIntn[0] + _cpM.x * minCpADist; - rs.ctrlpts[1] = tgtCtrlPtIntn[1] + _cpM.y * minCpADist; - } - } - if (overlapping) { - // recalc endpts - this.findEndpoints(edge); - } - } -}; -BRp$c.storeAllpts = function (edge) { - var rs = edge._private.rscratch; - if (rs.edgeType === 'multibezier' || rs.edgeType === 'bezier' || rs.edgeType === 'self' || rs.edgeType === 'compound') { - rs.allpts = []; - rs.allpts.push(rs.startX, rs.startY); - for (var b = 0; b + 1 < rs.ctrlpts.length; b += 2) { - // ctrl pt itself - rs.allpts.push(rs.ctrlpts[b], rs.ctrlpts[b + 1]); - - // the midpt between ctrlpts as intermediate destination pts - if (b + 3 < rs.ctrlpts.length) { - rs.allpts.push((rs.ctrlpts[b] + rs.ctrlpts[b + 2]) / 2, (rs.ctrlpts[b + 1] + rs.ctrlpts[b + 3]) / 2); - } - } - rs.allpts.push(rs.endX, rs.endY); - var m, mt; - if (rs.ctrlpts.length / 2 % 2 === 0) { - m = rs.allpts.length / 2 - 1; - rs.midX = rs.allpts[m]; - rs.midY = rs.allpts[m + 1]; - } else { - m = rs.allpts.length / 2 - 3; - mt = 0.5; - rs.midX = qbezierAt(rs.allpts[m], rs.allpts[m + 2], rs.allpts[m + 4], mt); - rs.midY = qbezierAt(rs.allpts[m + 1], rs.allpts[m + 3], rs.allpts[m + 5], mt); - } - } else if (rs.edgeType === 'straight') { - // need to calc these after endpts - rs.allpts = [rs.startX, rs.startY, rs.endX, rs.endY]; - - // default midpt for labels etc - rs.midX = (rs.startX + rs.endX + rs.arrowStartX + rs.arrowEndX) / 4; - rs.midY = (rs.startY + rs.endY + rs.arrowStartY + rs.arrowEndY) / 4; - } else if (rs.edgeType === 'segments') { - rs.allpts = []; - rs.allpts.push(rs.startX, rs.startY); - rs.allpts.push.apply(rs.allpts, rs.segpts); - rs.allpts.push(rs.endX, rs.endY); - if (rs.isRound) { - rs.roundCorners = []; - for (var i = 2; i + 3 < rs.allpts.length; i += 2) { - var radius = rs.radii[i / 2 - 1]; - var isArcRadius = rs.isArcRadius[i / 2 - 1]; - rs.roundCorners.push(getRoundCorner({ - x: rs.allpts[i - 2], - y: rs.allpts[i - 1] - }, { - x: rs.allpts[i], - y: rs.allpts[i + 1], - radius: radius - }, { - x: rs.allpts[i + 2], - y: rs.allpts[i + 3] - }, radius, isArcRadius)); - } - } - if (rs.segpts.length % 4 === 0) { - var i2 = rs.segpts.length / 2; - var i1 = i2 - 2; - rs.midX = (rs.segpts[i1] + rs.segpts[i2]) / 2; - rs.midY = (rs.segpts[i1 + 1] + rs.segpts[i2 + 1]) / 2; - } else { - var _i = rs.segpts.length / 2 - 1; - if (!rs.isRound) { - rs.midX = rs.segpts[_i]; - rs.midY = rs.segpts[_i + 1]; - } else { - var point = { - x: rs.segpts[_i], - y: rs.segpts[_i + 1] - }; - var corner = rs.roundCorners[_i / 2]; - var v = [point.x - corner.cx, point.y - corner.cy]; - var factor = corner.radius / Math.sqrt(Math.pow(v[0], 2) + Math.pow(v[1], 2)); - v = v.map(function (c) { - return c * factor; - }); - rs.midX = corner.cx + v[0]; - rs.midY = corner.cy + v[1]; - rs.midVector = v; - } - } - } -}; -BRp$c.checkForInvalidEdgeWarning = function (edge) { - var rs = edge[0]._private.rscratch; - if (rs.nodesOverlap || number$1(rs.startX) && number$1(rs.startY) && number$1(rs.endX) && number$1(rs.endY)) { - rs.loggedErr = false; - } else { - if (!rs.loggedErr) { - rs.loggedErr = true; - warn('Edge `' + edge.id() + '` has invalid endpoints and so it is impossible to draw. Adjust your edge style (e.g. control points) accordingly or use an alternative edge type. This is expected behaviour when the source node and the target node overlap.'); - } - } -}; -BRp$c.findEdgeControlPoints = function (edges) { - var _this = this; - if (!edges || edges.length === 0) { - return; - } - var r = this; - var cy = r.cy; - var hasCompounds = cy.hasCompoundNodes(); - var hashTable = { - map: new Map$2(), - get: function get(pairId) { - var map2 = this.map.get(pairId[0]); - if (map2 != null) { - return map2.get(pairId[1]); - } else { - return null; - } - }, - set: function set(pairId, val) { - var map2 = this.map.get(pairId[0]); - if (map2 == null) { - map2 = new Map$2(); - this.map.set(pairId[0], map2); - } - map2.set(pairId[1], val); - } - }; - var pairIds = []; - var haystackEdges = []; - - // create a table of edge (src, tgt) => list of edges between them - for (var i = 0; i < edges.length; i++) { - var edge = edges[i]; - var _p = edge._private; - var curveStyle = edge.pstyle('curve-style').value; - - // ignore edges who are not to be displayed - // they shouldn't take up space - if (edge.removed() || !edge.takesUpSpace()) { - continue; - } - if (curveStyle === 'haystack') { - haystackEdges.push(edge); - continue; - } - var edgeIsUnbundled = curveStyle === 'unbundled-bezier' || curveStyle.endsWith('segments') || curveStyle === 'straight' || curveStyle === 'straight-triangle' || curveStyle.endsWith('taxi'); - var edgeIsBezier = curveStyle === 'unbundled-bezier' || curveStyle === 'bezier'; - var src = _p.source; - var tgt = _p.target; - var srcIndex = src.poolIndex(); - var tgtIndex = tgt.poolIndex(); - var pairId = [srcIndex, tgtIndex].sort(); - var tableEntry = hashTable.get(pairId); - if (tableEntry == null) { - tableEntry = { - eles: [] - }; - hashTable.set(pairId, tableEntry); - pairIds.push(pairId); - } - tableEntry.eles.push(edge); - if (edgeIsUnbundled) { - tableEntry.hasUnbundled = true; - } - if (edgeIsBezier) { - tableEntry.hasBezier = true; - } - } - - // for each pair (src, tgt), create the ctrl pts - // Nested for loop is OK; total number of iterations for both loops = edgeCount - var _loop = function _loop(p) { - var pairId = pairIds[p]; - var pairInfo = hashTable.get(pairId); - var swappedpairInfo = void 0; - if (!pairInfo.hasUnbundled) { - var pllEdges = pairInfo.eles[0].parallelEdges().filter(function (e) { - return e.isBundledBezier(); - }); - clearArray(pairInfo.eles); - pllEdges.forEach(function (edge) { - return pairInfo.eles.push(edge); - }); - - // for each pair id, the edges should be sorted by index - pairInfo.eles.sort(function (edge1, edge2) { - return edge1.poolIndex() - edge2.poolIndex(); - }); - } - var firstEdge = pairInfo.eles[0]; - var src = firstEdge.source(); - var tgt = firstEdge.target(); - - // make sure src/tgt distinction is consistent w.r.t. pairId - if (src.poolIndex() > tgt.poolIndex()) { - var temp = src; - src = tgt; - tgt = temp; - } - var srcPos = pairInfo.srcPos = src.position(); - var tgtPos = pairInfo.tgtPos = tgt.position(); - var srcW = pairInfo.srcW = src.outerWidth(); - var srcH = pairInfo.srcH = src.outerHeight(); - var tgtW = pairInfo.tgtW = tgt.outerWidth(); - var tgtH = pairInfo.tgtH = tgt.outerHeight(); - var srcShape = pairInfo.srcShape = r.nodeShapes[_this.getNodeShape(src)]; - var tgtShape = pairInfo.tgtShape = r.nodeShapes[_this.getNodeShape(tgt)]; - var srcCornerRadius = pairInfo.srcCornerRadius = src.pstyle('corner-radius').value === 'auto' ? 'auto' : src.pstyle('corner-radius').pfValue; - var tgtCornerRadius = pairInfo.tgtCornerRadius = tgt.pstyle('corner-radius').value === 'auto' ? 'auto' : tgt.pstyle('corner-radius').pfValue; - var tgtRs = pairInfo.tgtRs = tgt._private.rscratch; - var srcRs = pairInfo.srcRs = src._private.rscratch; - pairInfo.dirCounts = { - 'north': 0, - 'west': 0, - 'south': 0, - 'east': 0, - 'northwest': 0, - 'southwest': 0, - 'northeast': 0, - 'southeast': 0 - }; - for (var _i2 = 0; _i2 < pairInfo.eles.length; _i2++) { - var _edge = pairInfo.eles[_i2]; - var rs = _edge[0]._private.rscratch; - var _curveStyle = _edge.pstyle('curve-style').value; - var _edgeIsUnbundled = _curveStyle === 'unbundled-bezier' || _curveStyle.endsWith('segments') || _curveStyle.endsWith('taxi'); - - // whether the normalised pair order is the reverse of the edge's src-tgt order - var edgeIsSwapped = !src.same(_edge.source()); - if (!pairInfo.calculatedIntersection && src !== tgt && (pairInfo.hasBezier || pairInfo.hasUnbundled)) { - pairInfo.calculatedIntersection = true; - - // pt outside src shape to calc distance/displacement from src to tgt - var srcOutside = srcShape.intersectLine(srcPos.x, srcPos.y, srcW, srcH, tgtPos.x, tgtPos.y, 0, srcCornerRadius, srcRs); - var srcIntn = pairInfo.srcIntn = srcOutside; - - // pt outside tgt shape to calc distance/displacement from src to tgt - var tgtOutside = tgtShape.intersectLine(tgtPos.x, tgtPos.y, tgtW, tgtH, srcPos.x, srcPos.y, 0, tgtCornerRadius, tgtRs); - var tgtIntn = pairInfo.tgtIntn = tgtOutside; - var intersectionPts = pairInfo.intersectionPts = { - x1: srcOutside[0], - x2: tgtOutside[0], - y1: srcOutside[1], - y2: tgtOutside[1] - }; - var posPts = pairInfo.posPts = { - x1: srcPos.x, - x2: tgtPos.x, - y1: srcPos.y, - y2: tgtPos.y - }; - var dy = tgtOutside[1] - srcOutside[1]; - var dx = tgtOutside[0] - srcOutside[0]; - var l = Math.sqrt(dx * dx + dy * dy); - var vector = pairInfo.vector = { - x: dx, - y: dy - }; - var vectorNorm = pairInfo.vectorNorm = { - x: vector.x / l, - y: vector.y / l - }; - var vectorNormInverse = { - x: -vectorNorm.y, - y: vectorNorm.x - }; - - // if node shapes overlap, then no ctrl pts to draw - pairInfo.nodesOverlap = !number$1(l) || tgtShape.checkPoint(srcOutside[0], srcOutside[1], 0, tgtW, tgtH, tgtPos.x, tgtPos.y, tgtCornerRadius, tgtRs) || srcShape.checkPoint(tgtOutside[0], tgtOutside[1], 0, srcW, srcH, srcPos.x, srcPos.y, srcCornerRadius, srcRs); - pairInfo.vectorNormInverse = vectorNormInverse; - swappedpairInfo = { - nodesOverlap: pairInfo.nodesOverlap, - dirCounts: pairInfo.dirCounts, - calculatedIntersection: true, - hasBezier: pairInfo.hasBezier, - hasUnbundled: pairInfo.hasUnbundled, - eles: pairInfo.eles, - srcPos: tgtPos, - tgtPos: srcPos, - srcW: tgtW, - srcH: tgtH, - tgtW: srcW, - tgtH: srcH, - srcIntn: tgtIntn, - tgtIntn: srcIntn, - srcShape: tgtShape, - tgtShape: srcShape, - posPts: { - x1: posPts.x2, - y1: posPts.y2, - x2: posPts.x1, - y2: posPts.y1 - }, - intersectionPts: { - x1: intersectionPts.x2, - y1: intersectionPts.y2, - x2: intersectionPts.x1, - y2: intersectionPts.y1 - }, - vector: { - x: -vector.x, - y: -vector.y - }, - vectorNorm: { - x: -vectorNorm.x, - y: -vectorNorm.y - }, - vectorNormInverse: { - x: -vectorNormInverse.x, - y: -vectorNormInverse.y - } - }; - } - var passedPairInfo = edgeIsSwapped ? swappedpairInfo : pairInfo; - rs.nodesOverlap = passedPairInfo.nodesOverlap; - rs.srcIntn = passedPairInfo.srcIntn; - rs.tgtIntn = passedPairInfo.tgtIntn; - rs.isRound = _curveStyle.startsWith('round'); - if (hasCompounds && (src.isParent() || src.isChild() || tgt.isParent() || tgt.isChild()) && (src.parents().anySame(tgt) || tgt.parents().anySame(src) || src.same(tgt) && src.isParent())) { - _this.findCompoundLoopPoints(_edge, passedPairInfo, _i2, _edgeIsUnbundled); - } else if (src === tgt) { - _this.findLoopPoints(_edge, passedPairInfo, _i2, _edgeIsUnbundled); - } else if (_curveStyle.endsWith('segments')) { - _this.findSegmentsPoints(_edge, passedPairInfo); - } else if (_curveStyle.endsWith('taxi')) { - _this.findTaxiPoints(_edge, passedPairInfo); - } else if (_curveStyle === 'straight' || !_edgeIsUnbundled && pairInfo.eles.length % 2 === 1 && _i2 === Math.floor(pairInfo.eles.length / 2)) { - _this.findStraightEdgePoints(_edge); - } else { - _this.findBezierPoints(_edge, passedPairInfo, _i2, _edgeIsUnbundled, edgeIsSwapped); - } - _this.findEndpoints(_edge); - _this.tryToCorrectInvalidPoints(_edge, passedPairInfo); - _this.checkForInvalidEdgeWarning(_edge); - _this.storeAllpts(_edge); - _this.storeEdgeProjections(_edge); - _this.calculateArrowAngles(_edge); - _this.recalculateEdgeLabelProjections(_edge); - _this.calculateLabelAngles(_edge); - } // for pair edges - }; - for (var p = 0; p < pairIds.length; p++) { - _loop(p); - } // for pair ids - - // haystacks avoid the expense of pairInfo stuff (intersections etc.) - this.findHaystackPoints(haystackEdges); -}; -function getPts(pts) { - var retPts = []; - if (pts == null) { - return; - } - for (var i = 0; i < pts.length; i += 2) { - var x = pts[i]; - var y = pts[i + 1]; - retPts.push({ - x: x, - y: y - }); - } - return retPts; -} -BRp$c.getSegmentPoints = function (edge) { - var rs = edge[0]._private.rscratch; - var type = rs.edgeType; - if (type === 'segments') { - this.recalculateRenderedStyle(edge); - return getPts(rs.segpts); - } -}; -BRp$c.getControlPoints = function (edge) { - var rs = edge[0]._private.rscratch; - var type = rs.edgeType; - if (type === 'bezier' || type === 'multibezier' || type === 'self' || type === 'compound') { - this.recalculateRenderedStyle(edge); - return getPts(rs.ctrlpts); - } -}; -BRp$c.getEdgeMidpoint = function (edge) { - var rs = edge[0]._private.rscratch; - this.recalculateRenderedStyle(edge); - return { - x: rs.midX, - y: rs.midY - }; -}; - -var BRp$b = {}; -BRp$b.manualEndptToPx = function (node, prop) { - var r = this; - var npos = node.position(); - var w = node.outerWidth(); - var h = node.outerHeight(); - var rs = node._private.rscratch; - if (prop.value.length === 2) { - var p = [prop.pfValue[0], prop.pfValue[1]]; - if (prop.units[0] === '%') { - p[0] = p[0] * w; - } - if (prop.units[1] === '%') { - p[1] = p[1] * h; - } - p[0] += npos.x; - p[1] += npos.y; - return p; - } else { - var angle = prop.pfValue[0]; - angle = -Math.PI / 2 + angle; // start at 12 o'clock - - var l = 2 * Math.max(w, h); - var _p = [npos.x + Math.cos(angle) * l, npos.y + Math.sin(angle) * l]; - return r.nodeShapes[this.getNodeShape(node)].intersectLine(npos.x, npos.y, w, h, _p[0], _p[1], 0, node.pstyle('corner-radius').value === 'auto' ? 'auto' : node.pstyle('corner-radius').pfValue, rs); - } -}; -BRp$b.findEndpoints = function (edge) { - var r = this; - var intersect; - var source = edge.source()[0]; - var target = edge.target()[0]; - var srcPos = source.position(); - var tgtPos = target.position(); - var tgtArShape = edge.pstyle('target-arrow-shape').value; - var srcArShape = edge.pstyle('source-arrow-shape').value; - var tgtDist = edge.pstyle('target-distance-from-node').pfValue; - var srcDist = edge.pstyle('source-distance-from-node').pfValue; - var srcRs = source._private.rscratch; - var tgtRs = target._private.rscratch; - var curveStyle = edge.pstyle('curve-style').value; - var rs = edge._private.rscratch; - var et = rs.edgeType; - var taxi = curveStyle === 'taxi'; - var self = et === 'self' || et === 'compound'; - var bezier = et === 'bezier' || et === 'multibezier' || self; - var multi = et !== 'bezier'; - var lines = et === 'straight' || et === 'segments'; - var segments = et === 'segments'; - var hasEndpts = bezier || multi || lines; - var overrideEndpts = self || taxi; - var srcManEndpt = edge.pstyle('source-endpoint'); - var srcManEndptVal = overrideEndpts ? 'outside-to-node' : srcManEndpt.value; - var srcCornerRadius = source.pstyle('corner-radius').value === 'auto' ? 'auto' : source.pstyle('corner-radius').pfValue; - var tgtManEndpt = edge.pstyle('target-endpoint'); - var tgtManEndptVal = overrideEndpts ? 'outside-to-node' : tgtManEndpt.value; - var tgtCornerRadius = target.pstyle('corner-radius').value === 'auto' ? 'auto' : target.pstyle('corner-radius').pfValue; - rs.srcManEndpt = srcManEndpt; - rs.tgtManEndpt = tgtManEndpt; - var p1; // last known point of edge on target side - var p2; // last known point of edge on source side - - var p1_i; // point to intersect with target shape - var p2_i; // point to intersect with source shape - - if (bezier) { - var cpStart = [rs.ctrlpts[0], rs.ctrlpts[1]]; - var cpEnd = multi ? [rs.ctrlpts[rs.ctrlpts.length - 2], rs.ctrlpts[rs.ctrlpts.length - 1]] : cpStart; - p1 = cpEnd; - p2 = cpStart; - } else if (lines) { - var srcArrowFromPt = !segments ? [tgtPos.x, tgtPos.y] : rs.segpts.slice(0, 2); - var tgtArrowFromPt = !segments ? [srcPos.x, srcPos.y] : rs.segpts.slice(rs.segpts.length - 2); - p1 = tgtArrowFromPt; - p2 = srcArrowFromPt; - } - if (tgtManEndptVal === 'inside-to-node') { - intersect = [tgtPos.x, tgtPos.y]; - } else if (tgtManEndpt.units) { - intersect = this.manualEndptToPx(target, tgtManEndpt); - } else if (tgtManEndptVal === 'outside-to-line') { - intersect = rs.tgtIntn; // use cached value from ctrlpt calc - } else { - if (tgtManEndptVal === 'outside-to-node' || tgtManEndptVal === 'outside-to-node-or-label') { - p1_i = p1; - } else if (tgtManEndptVal === 'outside-to-line' || tgtManEndptVal === 'outside-to-line-or-label') { - p1_i = [srcPos.x, srcPos.y]; - } - intersect = r.nodeShapes[this.getNodeShape(target)].intersectLine(tgtPos.x, tgtPos.y, target.outerWidth(), target.outerHeight(), p1_i[0], p1_i[1], 0, tgtCornerRadius, tgtRs); - if (tgtManEndptVal === 'outside-to-node-or-label' || tgtManEndptVal === 'outside-to-line-or-label') { - var trs = target._private.rscratch; - var lw = trs.labelWidth; - var lh = trs.labelHeight; - var lx = trs.labelX; - var ly = trs.labelY; - var lw2 = lw / 2; - var lh2 = lh / 2; - var va = target.pstyle('text-valign').value; - if (va === 'top') { - ly -= lh2; - } else if (va === 'bottom') { - ly += lh2; - } - var ha = target.pstyle('text-halign').value; - if (ha === 'left') { - lx -= lw2; - } else if (ha === 'right') { - lx += lw2; - } - var labelIntersect = polygonIntersectLine(p1_i[0], p1_i[1], [lx - lw2, ly - lh2, lx + lw2, ly - lh2, lx + lw2, ly + lh2, lx - lw2, ly + lh2], tgtPos.x, tgtPos.y); - if (labelIntersect.length > 0) { - var refPt = srcPos; - var intSqdist = sqdist(refPt, array2point(intersect)); - var labIntSqdist = sqdist(refPt, array2point(labelIntersect)); - var minSqDist = intSqdist; - if (labIntSqdist < intSqdist) { - intersect = labelIntersect; - minSqDist = labIntSqdist; - } - if (labelIntersect.length > 2) { - var labInt2SqDist = sqdist(refPt, { - x: labelIntersect[2], - y: labelIntersect[3] - }); - if (labInt2SqDist < minSqDist) { - intersect = [labelIntersect[2], labelIntersect[3]]; - } - } - } - } - } - var arrowEnd = shortenIntersection(intersect, p1, r.arrowShapes[tgtArShape].spacing(edge) + tgtDist); - var edgeEnd = shortenIntersection(intersect, p1, r.arrowShapes[tgtArShape].gap(edge) + tgtDist); - rs.endX = edgeEnd[0]; - rs.endY = edgeEnd[1]; - rs.arrowEndX = arrowEnd[0]; - rs.arrowEndY = arrowEnd[1]; - if (srcManEndptVal === 'inside-to-node') { - intersect = [srcPos.x, srcPos.y]; - } else if (srcManEndpt.units) { - intersect = this.manualEndptToPx(source, srcManEndpt); - } else if (srcManEndptVal === 'outside-to-line') { - intersect = rs.srcIntn; // use cached value from ctrlpt calc - } else { - if (srcManEndptVal === 'outside-to-node' || srcManEndptVal === 'outside-to-node-or-label') { - p2_i = p2; - } else if (srcManEndptVal === 'outside-to-line' || srcManEndptVal === 'outside-to-line-or-label') { - p2_i = [tgtPos.x, tgtPos.y]; - } - intersect = r.nodeShapes[this.getNodeShape(source)].intersectLine(srcPos.x, srcPos.y, source.outerWidth(), source.outerHeight(), p2_i[0], p2_i[1], 0, srcCornerRadius, srcRs); - if (srcManEndptVal === 'outside-to-node-or-label' || srcManEndptVal === 'outside-to-line-or-label') { - var srs = source._private.rscratch; - var _lw = srs.labelWidth; - var _lh = srs.labelHeight; - var _lx = srs.labelX; - var _ly = srs.labelY; - var _lw2 = _lw / 2; - var _lh2 = _lh / 2; - var _va = source.pstyle('text-valign').value; - if (_va === 'top') { - _ly -= _lh2; - } else if (_va === 'bottom') { - _ly += _lh2; - } - var _ha = source.pstyle('text-halign').value; - if (_ha === 'left') { - _lx -= _lw2; - } else if (_ha === 'right') { - _lx += _lw2; - } - var _labelIntersect = polygonIntersectLine(p2_i[0], p2_i[1], [_lx - _lw2, _ly - _lh2, _lx + _lw2, _ly - _lh2, _lx + _lw2, _ly + _lh2, _lx - _lw2, _ly + _lh2], srcPos.x, srcPos.y); - if (_labelIntersect.length > 0) { - var _refPt = tgtPos; - var _intSqdist = sqdist(_refPt, array2point(intersect)); - var _labIntSqdist = sqdist(_refPt, array2point(_labelIntersect)); - var _minSqDist = _intSqdist; - if (_labIntSqdist < _intSqdist) { - intersect = [_labelIntersect[0], _labelIntersect[1]]; - _minSqDist = _labIntSqdist; - } - if (_labelIntersect.length > 2) { - var _labInt2SqDist = sqdist(_refPt, { - x: _labelIntersect[2], - y: _labelIntersect[3] - }); - if (_labInt2SqDist < _minSqDist) { - intersect = [_labelIntersect[2], _labelIntersect[3]]; - } - } - } - } - } - var arrowStart = shortenIntersection(intersect, p2, r.arrowShapes[srcArShape].spacing(edge) + srcDist); - var edgeStart = shortenIntersection(intersect, p2, r.arrowShapes[srcArShape].gap(edge) + srcDist); - rs.startX = edgeStart[0]; - rs.startY = edgeStart[1]; - rs.arrowStartX = arrowStart[0]; - rs.arrowStartY = arrowStart[1]; - if (hasEndpts) { - if (!number$1(rs.startX) || !number$1(rs.startY) || !number$1(rs.endX) || !number$1(rs.endY)) { - rs.badLine = true; - } else { - rs.badLine = false; - } - } -}; -BRp$b.getSourceEndpoint = function (edge) { - var rs = edge[0]._private.rscratch; - this.recalculateRenderedStyle(edge); - switch (rs.edgeType) { - case 'haystack': - return { - x: rs.haystackPts[0], - y: rs.haystackPts[1] - }; - default: - return { - x: rs.arrowStartX, - y: rs.arrowStartY - }; - } -}; -BRp$b.getTargetEndpoint = function (edge) { - var rs = edge[0]._private.rscratch; - this.recalculateRenderedStyle(edge); - switch (rs.edgeType) { - case 'haystack': - return { - x: rs.haystackPts[2], - y: rs.haystackPts[3] - }; - default: - return { - x: rs.arrowEndX, - y: rs.arrowEndY - }; - } -}; - -var BRp$a = {}; -function pushBezierPts(r, edge, pts) { - var qbezierAt$1 = function qbezierAt$1(p1, p2, p3, t) { - return qbezierAt(p1, p2, p3, t); - }; - var _p = edge._private; - var bpts = _p.rstyle.bezierPts; - for (var i = 0; i < r.bezierProjPcts.length; i++) { - var p = r.bezierProjPcts[i]; - bpts.push({ - x: qbezierAt$1(pts[0], pts[2], pts[4], p), - y: qbezierAt$1(pts[1], pts[3], pts[5], p) - }); - } -} -BRp$a.storeEdgeProjections = function (edge) { - var _p = edge._private; - var rs = _p.rscratch; - var et = rs.edgeType; - - // clear the cached points state - _p.rstyle.bezierPts = null; - _p.rstyle.linePts = null; - _p.rstyle.haystackPts = null; - if (et === 'multibezier' || et === 'bezier' || et === 'self' || et === 'compound') { - _p.rstyle.bezierPts = []; - for (var i = 0; i + 5 < rs.allpts.length; i += 4) { - pushBezierPts(this, edge, rs.allpts.slice(i, i + 6)); - } - } else if (et === 'segments') { - var lpts = _p.rstyle.linePts = []; - for (var i = 0; i + 1 < rs.allpts.length; i += 2) { - lpts.push({ - x: rs.allpts[i], - y: rs.allpts[i + 1] - }); - } - } else if (et === 'haystack') { - var hpts = rs.haystackPts; - _p.rstyle.haystackPts = [{ - x: hpts[0], - y: hpts[1] - }, { - x: hpts[2], - y: hpts[3] - }]; - } - _p.rstyle.arrowWidth = this.getArrowWidth(edge.pstyle('width').pfValue, edge.pstyle('arrow-scale').value) * this.arrowShapeWidth; -}; -BRp$a.recalculateEdgeProjections = function (edges) { - this.findEdgeControlPoints(edges); -}; - -var BRp$9 = {}; -BRp$9.recalculateNodeLabelProjection = function (node) { - var content = node.pstyle('label').strValue; - if (emptyString(content)) { - return; - } - var textX, textY; - var _p = node._private; - var nodeWidth = node.width(); - var nodeHeight = node.height(); - var padding = node.padding(); - var nodePos = node.position(); - var textHalign = node.pstyle('text-halign').strValue; - var textValign = node.pstyle('text-valign').strValue; - var rs = _p.rscratch; - var rstyle = _p.rstyle; - switch (textHalign) { - case 'left': - textX = nodePos.x - nodeWidth / 2 - padding; - break; - case 'right': - textX = nodePos.x + nodeWidth / 2 + padding; - break; - default: - // e.g. center - textX = nodePos.x; - } - switch (textValign) { - case 'top': - textY = nodePos.y - nodeHeight / 2 - padding; - break; - case 'bottom': - textY = nodePos.y + nodeHeight / 2 + padding; - break; - default: - // e.g. middle - textY = nodePos.y; - } - rs.labelX = textX; - rs.labelY = textY; - rstyle.labelX = textX; - rstyle.labelY = textY; - this.calculateLabelAngles(node); - this.applyLabelDimensions(node); -}; -var lineAngleFromDelta = function lineAngleFromDelta(dx, dy) { - var angle = Math.atan(dy / dx); - if (dx === 0 && angle < 0) { - angle = angle * -1; - } - return angle; -}; -var lineAngle = function lineAngle(p0, p1) { - var dx = p1.x - p0.x; - var dy = p1.y - p0.y; - return lineAngleFromDelta(dx, dy); -}; -var bezierAngle = function bezierAngle(p0, p1, p2, t) { - var t0 = bound(0, t - 0.001, 1); - var t1 = bound(0, t + 0.001, 1); - var lp0 = qbezierPtAt(p0, p1, p2, t0); - var lp1 = qbezierPtAt(p0, p1, p2, t1); - return lineAngle(lp0, lp1); -}; -BRp$9.recalculateEdgeLabelProjections = function (edge) { - var p; - var _p = edge._private; - var rs = _p.rscratch; - var r = this; - var content = { - mid: edge.pstyle('label').strValue, - source: edge.pstyle('source-label').strValue, - target: edge.pstyle('target-label').strValue - }; - if (content.mid || content.source || content.target) ; else { - return; // no labels => no calcs - } - - // add center point to style so bounding box calculations can use it - // - p = { - x: rs.midX, - y: rs.midY - }; - var setRs = function setRs(propName, prefix, value) { - setPrefixedProperty(_p.rscratch, propName, prefix, value); - setPrefixedProperty(_p.rstyle, propName, prefix, value); - }; - setRs('labelX', null, p.x); - setRs('labelY', null, p.y); - var midAngle = lineAngleFromDelta(rs.midDispX, rs.midDispY); - setRs('labelAutoAngle', null, midAngle); - var createControlPointInfo = function createControlPointInfo() { - if (createControlPointInfo.cache) { - return createControlPointInfo.cache; - } // use cache so only 1x per edge - - var ctrlpts = []; - - // store each ctrlpt info init - for (var i = 0; i + 5 < rs.allpts.length; i += 4) { - var p0 = { - x: rs.allpts[i], - y: rs.allpts[i + 1] - }; - var p1 = { - x: rs.allpts[i + 2], - y: rs.allpts[i + 3] - }; // ctrlpt - var p2 = { - x: rs.allpts[i + 4], - y: rs.allpts[i + 5] - }; - ctrlpts.push({ - p0: p0, - p1: p1, - p2: p2, - startDist: 0, - length: 0, - segments: [] - }); - } - var bpts = _p.rstyle.bezierPts; - var nProjs = r.bezierProjPcts.length; - function addSegment(cp, p0, p1, t0, t1) { - var length = dist(p0, p1); - var prevSegment = cp.segments[cp.segments.length - 1]; - var segment = { - p0: p0, - p1: p1, - t0: t0, - t1: t1, - startDist: prevSegment ? prevSegment.startDist + prevSegment.length : 0, - length: length - }; - cp.segments.push(segment); - cp.length += length; - } - - // update each ctrlpt with segment info - for (var _i = 0; _i < ctrlpts.length; _i++) { - var cp = ctrlpts[_i]; - var prevCp = ctrlpts[_i - 1]; - if (prevCp) { - cp.startDist = prevCp.startDist + prevCp.length; - } - addSegment(cp, cp.p0, bpts[_i * nProjs], 0, r.bezierProjPcts[0]); // first - - for (var j = 0; j < nProjs - 1; j++) { - addSegment(cp, bpts[_i * nProjs + j], bpts[_i * nProjs + j + 1], r.bezierProjPcts[j], r.bezierProjPcts[j + 1]); - } - addSegment(cp, bpts[_i * nProjs + nProjs - 1], cp.p2, r.bezierProjPcts[nProjs - 1], 1); // last - } - - return createControlPointInfo.cache = ctrlpts; - }; - var calculateEndProjection = function calculateEndProjection(prefix) { - var angle; - var isSrc = prefix === 'source'; - if (!content[prefix]) { - return; - } - var offset = edge.pstyle(prefix + '-text-offset').pfValue; - switch (rs.edgeType) { - case 'self': - case 'compound': - case 'bezier': - case 'multibezier': - { - var cps = createControlPointInfo(); - var selected; - var startDist = 0; - var totalDist = 0; - - // find the segment we're on - for (var i = 0; i < cps.length; i++) { - var _cp = cps[isSrc ? i : cps.length - 1 - i]; - for (var j = 0; j < _cp.segments.length; j++) { - var _seg = _cp.segments[isSrc ? j : _cp.segments.length - 1 - j]; - var lastSeg = i === cps.length - 1 && j === _cp.segments.length - 1; - startDist = totalDist; - totalDist += _seg.length; - if (totalDist >= offset || lastSeg) { - selected = { - cp: _cp, - segment: _seg - }; - break; - } - } - if (selected) { - break; - } - } - var cp = selected.cp; - var seg = selected.segment; - var tSegment = (offset - startDist) / seg.length; - var segDt = seg.t1 - seg.t0; - var t = isSrc ? seg.t0 + segDt * tSegment : seg.t1 - segDt * tSegment; - t = bound(0, t, 1); - p = qbezierPtAt(cp.p0, cp.p1, cp.p2, t); - angle = bezierAngle(cp.p0, cp.p1, cp.p2, t); - break; - } - case 'straight': - case 'segments': - case 'haystack': - { - var d = 0, - di, - d0; - var p0, p1; - var l = rs.allpts.length; - for (var _i2 = 0; _i2 + 3 < l; _i2 += 2) { - if (isSrc) { - p0 = { - x: rs.allpts[_i2], - y: rs.allpts[_i2 + 1] - }; - p1 = { - x: rs.allpts[_i2 + 2], - y: rs.allpts[_i2 + 3] - }; - } else { - p0 = { - x: rs.allpts[l - 2 - _i2], - y: rs.allpts[l - 1 - _i2] - }; - p1 = { - x: rs.allpts[l - 4 - _i2], - y: rs.allpts[l - 3 - _i2] - }; - } - di = dist(p0, p1); - d0 = d; - d += di; - if (d >= offset) { - break; - } - } - var pD = offset - d0; - var _t = pD / di; - _t = bound(0, _t, 1); - p = lineAt(p0, p1, _t); - angle = lineAngle(p0, p1); - break; - } - } - setRs('labelX', prefix, p.x); - setRs('labelY', prefix, p.y); - setRs('labelAutoAngle', prefix, angle); - }; - calculateEndProjection('source'); - calculateEndProjection('target'); - this.applyLabelDimensions(edge); -}; -BRp$9.applyLabelDimensions = function (ele) { - this.applyPrefixedLabelDimensions(ele); - if (ele.isEdge()) { - this.applyPrefixedLabelDimensions(ele, 'source'); - this.applyPrefixedLabelDimensions(ele, 'target'); - } -}; -BRp$9.applyPrefixedLabelDimensions = function (ele, prefix) { - var _p = ele._private; - var text = this.getLabelText(ele, prefix); - var labelDims = this.calculateLabelDimensions(ele, text); - var lineHeight = ele.pstyle('line-height').pfValue; - var textWrap = ele.pstyle('text-wrap').strValue; - var lines = getPrefixedProperty(_p.rscratch, 'labelWrapCachedLines', prefix) || []; - var numLines = textWrap !== 'wrap' ? 1 : Math.max(lines.length, 1); - var normPerLineHeight = labelDims.height / numLines; - var labelLineHeight = normPerLineHeight * lineHeight; - var width = labelDims.width; - var height = labelDims.height + (numLines - 1) * (lineHeight - 1) * normPerLineHeight; - setPrefixedProperty(_p.rstyle, 'labelWidth', prefix, width); - setPrefixedProperty(_p.rscratch, 'labelWidth', prefix, width); - setPrefixedProperty(_p.rstyle, 'labelHeight', prefix, height); - setPrefixedProperty(_p.rscratch, 'labelHeight', prefix, height); - setPrefixedProperty(_p.rscratch, 'labelLineHeight', prefix, labelLineHeight); -}; -BRp$9.getLabelText = function (ele, prefix) { - var _p = ele._private; - var pfd = prefix ? prefix + '-' : ''; - var text = ele.pstyle(pfd + 'label').strValue; - var textTransform = ele.pstyle('text-transform').value; - var rscratch = function rscratch(propName, value) { - if (value) { - setPrefixedProperty(_p.rscratch, propName, prefix, value); - return value; - } else { - return getPrefixedProperty(_p.rscratch, propName, prefix); - } - }; - - // for empty text, skip all processing - if (!text) { - return ''; - } - if (textTransform == 'none') ; else if (textTransform == 'uppercase') { - text = text.toUpperCase(); - } else if (textTransform == 'lowercase') { - text = text.toLowerCase(); - } - var wrapStyle = ele.pstyle('text-wrap').value; - if (wrapStyle === 'wrap') { - var labelKey = rscratch('labelKey'); - - // save recalc if the label is the same as before - if (labelKey != null && rscratch('labelWrapKey') === labelKey) { - return rscratch('labelWrapCachedText'); - } - var zwsp = "\u200B"; - var lines = text.split('\n'); - var maxW = ele.pstyle('text-max-width').pfValue; - var overflow = ele.pstyle('text-overflow-wrap').value; - var overflowAny = overflow === 'anywhere'; - var wrappedLines = []; - var separatorRegex = /[\s\u200b]+|$/g; // Include end of string to add last word - - for (var l = 0; l < lines.length; l++) { - var line = lines[l]; - var lineDims = this.calculateLabelDimensions(ele, line); - var lineW = lineDims.width; - if (overflowAny) { - var processedLine = line.split('').join(zwsp); - line = processedLine; - } - if (lineW > maxW) { - // line is too long - var separatorMatches = line.matchAll(separatorRegex); - var subline = ''; - var previousIndex = 0; - // Add fake match - var _iterator = _createForOfIteratorHelper(separatorMatches), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var separatorMatch = _step.value; - var wordSeparator = separatorMatch[0]; - var word = line.substring(previousIndex, separatorMatch.index); - previousIndex = separatorMatch.index + wordSeparator.length; - var testLine = subline.length === 0 ? word : subline + word + wordSeparator; - var testDims = this.calculateLabelDimensions(ele, testLine); - var testW = testDims.width; - if (testW <= maxW) { - // word fits on current line - subline += word + wordSeparator; - } else { - // word starts new line - if (subline) { - wrappedLines.push(subline); - } - subline = word + wordSeparator; - } - } - - // if there's remaining text, put it in a wrapped line - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - if (!subline.match(/^[\s\u200b]+$/)) { - wrappedLines.push(subline); - } - } else { - // line is already short enough - wrappedLines.push(line); - } - } // for - - rscratch('labelWrapCachedLines', wrappedLines); - text = rscratch('labelWrapCachedText', wrappedLines.join('\n')); - rscratch('labelWrapKey', labelKey); - } else if (wrapStyle === 'ellipsis') { - var _maxW = ele.pstyle('text-max-width').pfValue; - var ellipsized = ''; - var ellipsis = "\u2026"; - var incLastCh = false; - if (this.calculateLabelDimensions(ele, text).width < _maxW) { - // the label already fits - return text; - } - for (var i = 0; i < text.length; i++) { - var widthWithNextCh = this.calculateLabelDimensions(ele, ellipsized + text[i] + ellipsis).width; - if (widthWithNextCh > _maxW) { - break; - } - ellipsized += text[i]; - if (i === text.length - 1) { - incLastCh = true; - } - } - if (!incLastCh) { - ellipsized += ellipsis; - } - return ellipsized; - } // if ellipsize - - return text; -}; -BRp$9.getLabelJustification = function (ele) { - var justification = ele.pstyle('text-justification').strValue; - var textHalign = ele.pstyle('text-halign').strValue; - if (justification === 'auto') { - if (ele.isNode()) { - switch (textHalign) { - case 'left': - return 'right'; - case 'right': - return 'left'; - default: - return 'center'; - } - } else { - return 'center'; - } - } else { - return justification; - } -}; -BRp$9.calculateLabelDimensions = function (ele, text) { - var r = this; - var containerWindow = r.cy.window(); - var document = containerWindow.document; - var cacheKey = hashString(text, ele._private.labelDimsKey); - var cache = r.labelDimCache || (r.labelDimCache = []); - var existingVal = cache[cacheKey]; - if (existingVal != null) { - return existingVal; - } - var padding = 0; // add padding around text dims, as the measurement isn't that accurate - var fStyle = ele.pstyle('font-style').strValue; - var size = ele.pstyle('font-size').pfValue; - var family = ele.pstyle('font-family').strValue; - var weight = ele.pstyle('font-weight').strValue; - var canvas = this.labelCalcCanvas; - var c2d = this.labelCalcCanvasContext; - if (!canvas) { - canvas = this.labelCalcCanvas = document.createElement('canvas'); - c2d = this.labelCalcCanvasContext = canvas.getContext('2d'); - var ds = canvas.style; - ds.position = 'absolute'; - ds.left = '-9999px'; - ds.top = '-9999px'; - ds.zIndex = '-1'; - ds.visibility = 'hidden'; - ds.pointerEvents = 'none'; - } - c2d.font = "".concat(fStyle, " ").concat(weight, " ").concat(size, "px ").concat(family); - var width = 0; - var height = 0; - var lines = text.split('\n'); - for (var i = 0; i < lines.length; i++) { - var line = lines[i]; - var metrics = c2d.measureText(line); - var w = Math.ceil(metrics.width); - var h = size; - width = Math.max(w, width); - height += h; - } - width += padding; - height += padding; - return cache[cacheKey] = { - width: width, - height: height - }; -}; -BRp$9.calculateLabelAngle = function (ele, prefix) { - var _p = ele._private; - var rs = _p.rscratch; - var isEdge = ele.isEdge(); - var prefixDash = prefix ? prefix + '-' : ''; - var rot = ele.pstyle(prefixDash + 'text-rotation'); - var rotStr = rot.strValue; - if (rotStr === 'none') { - return 0; - } else if (isEdge && rotStr === 'autorotate') { - return rs.labelAutoAngle; - } else if (rotStr === 'autorotate') { - return 0; - } else { - return rot.pfValue; - } -}; -BRp$9.calculateLabelAngles = function (ele) { - var r = this; - var isEdge = ele.isEdge(); - var _p = ele._private; - var rs = _p.rscratch; - rs.labelAngle = r.calculateLabelAngle(ele); - if (isEdge) { - rs.sourceLabelAngle = r.calculateLabelAngle(ele, 'source'); - rs.targetLabelAngle = r.calculateLabelAngle(ele, 'target'); - } -}; - -var BRp$8 = {}; -var TOO_SMALL_CUT_RECT = 28; -var warnedCutRect = false; -BRp$8.getNodeShape = function (node) { - var r = this; - var shape = node.pstyle('shape').value; - if (shape === 'cutrectangle' && (node.width() < TOO_SMALL_CUT_RECT || node.height() < TOO_SMALL_CUT_RECT)) { - if (!warnedCutRect) { - warn('The `cutrectangle` node shape can not be used at small sizes so `rectangle` is used instead'); - warnedCutRect = true; - } - return 'rectangle'; - } - if (node.isParent()) { - if (shape === 'rectangle' || shape === 'roundrectangle' || shape === 'round-rectangle' || shape === 'cutrectangle' || shape === 'cut-rectangle' || shape === 'barrel') { - return shape; - } else { - return 'rectangle'; - } - } - if (shape === 'polygon') { - var points = node.pstyle('shape-polygon-points').value; - return r.nodeShapes.makePolygon(points).name; - } - return shape; -}; - -var BRp$7 = {}; -BRp$7.registerCalculationListeners = function () { - var cy = this.cy; - var elesToUpdate = cy.collection(); - var r = this; - var enqueue = function enqueue(eles) { - var dirtyStyleCaches = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; - elesToUpdate.merge(eles); - if (dirtyStyleCaches) { - for (var i = 0; i < eles.length; i++) { - var ele = eles[i]; - var _p = ele._private; - var rstyle = _p.rstyle; - rstyle.clean = false; - rstyle.cleanConnected = false; - } - } - }; - r.binder(cy).on('bounds.* dirty.*', function onDirtyBounds(e) { - var ele = e.target; - enqueue(ele); - }).on('style.* background.*', function onDirtyStyle(e) { - var ele = e.target; - enqueue(ele, false); - }); - var updateEleCalcs = function updateEleCalcs(willDraw) { - if (willDraw) { - var fns = r.onUpdateEleCalcsFns; - - // because we need to have up-to-date style (e.g. stylesheet mappers) - // before calculating rendered style (and pstyle might not be called yet) - elesToUpdate.cleanStyle(); - for (var i = 0; i < elesToUpdate.length; i++) { - var ele = elesToUpdate[i]; - var rstyle = ele._private.rstyle; - if (ele.isNode() && !rstyle.cleanConnected) { - enqueue(ele.connectedEdges()); - rstyle.cleanConnected = true; - } - } - if (fns) { - for (var _i = 0; _i < fns.length; _i++) { - var fn = fns[_i]; - fn(willDraw, elesToUpdate); - } - } - r.recalculateRenderedStyle(elesToUpdate); - elesToUpdate = cy.collection(); - } - }; - r.flushRenderedStyleQueue = function () { - updateEleCalcs(true); - }; - r.beforeRender(updateEleCalcs, r.beforeRenderPriorities.eleCalcs); -}; -BRp$7.onUpdateEleCalcs = function (fn) { - var fns = this.onUpdateEleCalcsFns = this.onUpdateEleCalcsFns || []; - fns.push(fn); -}; -BRp$7.recalculateRenderedStyle = function (eles, useCache) { - var isCleanConnected = function isCleanConnected(ele) { - return ele._private.rstyle.cleanConnected; - }; - var edges = []; - var nodes = []; - - // the renderer can't be used for calcs when destroyed, e.g. ele.boundingBox() - if (this.destroyed) { - return; - } - - // use cache by default for perf - if (useCache === undefined) { - useCache = true; - } - for (var i = 0; i < eles.length; i++) { - var ele = eles[i]; - var _p = ele._private; - var rstyle = _p.rstyle; - - // an edge may be implicitly dirty b/c of one of its connected nodes - // (and a request for recalc may come in between frames) - if (ele.isEdge() && (!isCleanConnected(ele.source()) || !isCleanConnected(ele.target()))) { - rstyle.clean = false; - } - - // only update if dirty and in graph - if (useCache && rstyle.clean || ele.removed()) { - continue; - } - - // only update if not display: none - if (ele.pstyle('display').value === 'none') { - continue; - } - if (_p.group === 'nodes') { - nodes.push(ele); - } else { - // edges - edges.push(ele); - } - rstyle.clean = true; - } - - // update node data from projections - for (var _i2 = 0; _i2 < nodes.length; _i2++) { - var _ele = nodes[_i2]; - var _p2 = _ele._private; - var _rstyle = _p2.rstyle; - var pos = _ele.position(); - this.recalculateNodeLabelProjection(_ele); - _rstyle.nodeX = pos.x; - _rstyle.nodeY = pos.y; - _rstyle.nodeW = _ele.pstyle('width').pfValue; - _rstyle.nodeH = _ele.pstyle('height').pfValue; - } - this.recalculateEdgeProjections(edges); - - // update edge data from projections - for (var _i3 = 0; _i3 < edges.length; _i3++) { - var _ele2 = edges[_i3]; - var _p3 = _ele2._private; - var _rstyle2 = _p3.rstyle; - var rs = _p3.rscratch; - - // update rstyle positions - _rstyle2.srcX = rs.arrowStartX; - _rstyle2.srcY = rs.arrowStartY; - _rstyle2.tgtX = rs.arrowEndX; - _rstyle2.tgtY = rs.arrowEndY; - _rstyle2.midX = rs.midX; - _rstyle2.midY = rs.midY; - _rstyle2.labelAngle = rs.labelAngle; - _rstyle2.sourceLabelAngle = rs.sourceLabelAngle; - _rstyle2.targetLabelAngle = rs.targetLabelAngle; - } -}; - -var BRp$6 = {}; -BRp$6.updateCachedGrabbedEles = function () { - var eles = this.cachedZSortedEles; - if (!eles) { - // just let this be recalculated on the next z sort tick - return; - } - eles.drag = []; - eles.nondrag = []; - var grabTargets = []; - for (var i = 0; i < eles.length; i++) { - var ele = eles[i]; - var rs = ele._private.rscratch; - if (ele.grabbed() && !ele.isParent()) { - grabTargets.push(ele); - } else if (rs.inDragLayer) { - eles.drag.push(ele); - } else { - eles.nondrag.push(ele); - } - } - - // put the grab target nodes last so it's on top of its neighbourhood - for (var i = 0; i < grabTargets.length; i++) { - var ele = grabTargets[i]; - eles.drag.push(ele); - } -}; -BRp$6.invalidateCachedZSortedEles = function () { - this.cachedZSortedEles = null; -}; -BRp$6.getCachedZSortedEles = function (forceRecalc) { - if (forceRecalc || !this.cachedZSortedEles) { - var eles = this.cy.mutableElements().toArray(); - eles.sort(zIndexSort); - eles.interactive = eles.filter(function (ele) { - return ele.interactive(); - }); - this.cachedZSortedEles = eles; - this.updateCachedGrabbedEles(); - } else { - eles = this.cachedZSortedEles; - } - return eles; -}; - -var BRp$5 = {}; -[BRp$e, BRp$d, BRp$c, BRp$b, BRp$a, BRp$9, BRp$8, BRp$7, BRp$6].forEach(function (props) { - extend(BRp$5, props); -}); - -var BRp$4 = {}; -BRp$4.getCachedImage = function (url, crossOrigin, onLoad) { - var r = this; - var imageCache = r.imageCache = r.imageCache || {}; - var cache = imageCache[url]; - if (cache) { - if (!cache.image.complete) { - cache.image.addEventListener('load', onLoad); - } - return cache.image; - } else { - cache = imageCache[url] = imageCache[url] || {}; - var image = cache.image = new Image(); // eslint-disable-line no-undef - - image.addEventListener('load', onLoad); - image.addEventListener('error', function () { - image.error = true; - }); - - // #1582 safari doesn't load data uris with crossOrigin properly - // https://bugs.webkit.org/show_bug.cgi?id=123978 - var dataUriPrefix = 'data:'; - var isDataUri = url.substring(0, dataUriPrefix.length).toLowerCase() === dataUriPrefix; - if (!isDataUri) { - // if crossorigin is 'null'(stringified), then manually set it to null - crossOrigin = crossOrigin === 'null' ? null : crossOrigin; - image.crossOrigin = crossOrigin; // prevent tainted canvas - } - - image.src = url; - return image; - } -}; - -var BRp$3 = {}; - -/* global document, ResizeObserver, MutationObserver */ - -BRp$3.registerBinding = function (target, event, handler, useCapture) { - // eslint-disable-line no-unused-vars - var args = Array.prototype.slice.apply(arguments, [1]); // copy - var b = this.binder(target); - return b.on.apply(b, args); -}; -BRp$3.binder = function (tgt) { - var r = this; - var containerWindow = r.cy.window(); - var tgtIsDom = tgt === containerWindow || tgt === containerWindow.document || tgt === containerWindow.document.body || domElement(tgt); - if (r.supportsPassiveEvents == null) { - // from https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md#feature-detection - var supportsPassive = false; - try { - var opts = Object.defineProperty({}, 'passive', { - get: function get() { - supportsPassive = true; - return true; - } - }); - containerWindow.addEventListener('test', null, opts); - } catch (err) { - // not supported - } - r.supportsPassiveEvents = supportsPassive; - } - var on = function on(event, handler, useCapture) { - var args = Array.prototype.slice.call(arguments); - if (tgtIsDom && r.supportsPassiveEvents) { - // replace useCapture w/ opts obj - args[2] = { - capture: useCapture != null ? useCapture : false, - passive: false, - once: false - }; - } - r.bindings.push({ - target: tgt, - args: args - }); - (tgt.addEventListener || tgt.on).apply(tgt, args); - return this; - }; - return { - on: on, - addEventListener: on, - addListener: on, - bind: on - }; -}; -BRp$3.nodeIsDraggable = function (node) { - return node && node.isNode() && !node.locked() && node.grabbable(); -}; -BRp$3.nodeIsGrabbable = function (node) { - return this.nodeIsDraggable(node) && node.interactive(); -}; -BRp$3.load = function () { - var r = this; - var containerWindow = r.cy.window(); - var isSelected = function isSelected(ele) { - return ele.selected(); - }; - var triggerEvents = function triggerEvents(target, names, e, position) { - if (target == null) { - target = r.cy; - } - for (var i = 0; i < names.length; i++) { - var name = names[i]; - target.emit({ - originalEvent: e, - type: name, - position: position - }); - } - }; - var isMultSelKeyDown = function isMultSelKeyDown(e) { - return e.shiftKey || e.metaKey || e.ctrlKey; // maybe e.altKey - }; - - var allowPanningPassthrough = function allowPanningPassthrough(down, downs) { - var allowPassthrough = true; - if (r.cy.hasCompoundNodes() && down && down.pannable()) { - // a grabbable compound node below the ele => no passthrough panning - for (var i = 0; downs && i < downs.length; i++) { - var down = downs[i]; - - //if any parent node in event hierarchy isn't pannable, reject passthrough - if (down.isNode() && down.isParent() && !down.pannable()) { - allowPassthrough = false; - break; - } - } - } else { - allowPassthrough = true; - } - return allowPassthrough; - }; - var setGrabbed = function setGrabbed(ele) { - ele[0]._private.grabbed = true; - }; - var setFreed = function setFreed(ele) { - ele[0]._private.grabbed = false; - }; - var setInDragLayer = function setInDragLayer(ele) { - ele[0]._private.rscratch.inDragLayer = true; - }; - var setOutDragLayer = function setOutDragLayer(ele) { - ele[0]._private.rscratch.inDragLayer = false; - }; - var setGrabTarget = function setGrabTarget(ele) { - ele[0]._private.rscratch.isGrabTarget = true; - }; - var removeGrabTarget = function removeGrabTarget(ele) { - ele[0]._private.rscratch.isGrabTarget = false; - }; - var addToDragList = function addToDragList(ele, opts) { - var list = opts.addToList; - var listHasEle = list.has(ele); - if (!listHasEle && ele.grabbable() && !ele.locked()) { - list.merge(ele); - setGrabbed(ele); - } - }; - - // helper function to determine which child nodes and inner edges - // of a compound node to be dragged as well as the grabbed and selected nodes - var addDescendantsToDrag = function addDescendantsToDrag(node, opts) { - if (!node.cy().hasCompoundNodes()) { - return; - } - if (opts.inDragLayer == null && opts.addToList == null) { - return; - } // nothing to do - - var innerNodes = node.descendants(); - if (opts.inDragLayer) { - innerNodes.forEach(setInDragLayer); - innerNodes.connectedEdges().forEach(setInDragLayer); - } - if (opts.addToList) { - addToDragList(innerNodes, opts); - } - }; - - // adds the given nodes and its neighbourhood to the drag layer - var addNodesToDrag = function addNodesToDrag(nodes, opts) { - opts = opts || {}; - var hasCompoundNodes = nodes.cy().hasCompoundNodes(); - if (opts.inDragLayer) { - nodes.forEach(setInDragLayer); - nodes.neighborhood().stdFilter(function (ele) { - return !hasCompoundNodes || ele.isEdge(); - }).forEach(setInDragLayer); - } - if (opts.addToList) { - nodes.forEach(function (ele) { - addToDragList(ele, opts); - }); - } - addDescendantsToDrag(nodes, opts); // always add to drag - - // also add nodes and edges related to the topmost ancestor - updateAncestorsInDragLayer(nodes, { - inDragLayer: opts.inDragLayer - }); - r.updateCachedGrabbedEles(); - }; - var addNodeToDrag = addNodesToDrag; - var freeDraggedElements = function freeDraggedElements(grabbedEles) { - if (!grabbedEles) { - return; - } - - // just go over all elements rather than doing a bunch of (possibly expensive) traversals - r.getCachedZSortedEles().forEach(function (ele) { - setFreed(ele); - setOutDragLayer(ele); - removeGrabTarget(ele); - }); - r.updateCachedGrabbedEles(); - }; - - // helper function to determine which ancestor nodes and edges should go - // to the drag layer (or should be removed from drag layer). - var updateAncestorsInDragLayer = function updateAncestorsInDragLayer(node, opts) { - if (opts.inDragLayer == null && opts.addToList == null) { - return; - } // nothing to do - - if (!node.cy().hasCompoundNodes()) { - return; - } - - // find top-level parent - var parent = node.ancestors().orphans(); - - // no parent node: no nodes to add to the drag layer - if (parent.same(node)) { - return; - } - var nodes = parent.descendants().spawnSelf().merge(parent).unmerge(node).unmerge(node.descendants()); - var edges = nodes.connectedEdges(); - if (opts.inDragLayer) { - edges.forEach(setInDragLayer); - nodes.forEach(setInDragLayer); - } - if (opts.addToList) { - nodes.forEach(function (ele) { - addToDragList(ele, opts); - }); - } - }; - var blurActiveDomElement = function blurActiveDomElement() { - if (document.activeElement != null && document.activeElement.blur != null) { - document.activeElement.blur(); - } - }; - var haveMutationsApi = typeof MutationObserver !== 'undefined'; - var haveResizeObserverApi = typeof ResizeObserver !== 'undefined'; - - // watch for when the cy container is removed from the dom - if (haveMutationsApi) { - r.removeObserver = new MutationObserver(function (mutns) { - // eslint-disable-line no-undef - for (var i = 0; i < mutns.length; i++) { - var mutn = mutns[i]; - var rNodes = mutn.removedNodes; - if (rNodes) { - for (var j = 0; j < rNodes.length; j++) { - var rNode = rNodes[j]; - if (rNode === r.container) { - r.destroy(); - break; - } - } - } - } - }); - if (r.container.parentNode) { - r.removeObserver.observe(r.container.parentNode, { - childList: true - }); - } - } else { - r.registerBinding(r.container, 'DOMNodeRemoved', function (e) { - // eslint-disable-line no-unused-vars - r.destroy(); - }); - } - var onResize = debounce_1(function () { - r.cy.resize(); - }, 100); - if (haveMutationsApi) { - r.styleObserver = new MutationObserver(onResize); // eslint-disable-line no-undef - - r.styleObserver.observe(r.container, { - attributes: true - }); - } - - // auto resize - r.registerBinding(containerWindow, 'resize', onResize); // eslint-disable-line no-undef - - if (haveResizeObserverApi) { - r.resizeObserver = new ResizeObserver(onResize); // eslint-disable-line no-undef - - r.resizeObserver.observe(r.container); - } - var forEachUp = function forEachUp(domEle, fn) { - while (domEle != null) { - fn(domEle); - domEle = domEle.parentNode; - } - }; - var invalidateCoords = function invalidateCoords() { - r.invalidateContainerClientCoordsCache(); - }; - forEachUp(r.container, function (domEle) { - r.registerBinding(domEle, 'transitionend', invalidateCoords); - r.registerBinding(domEle, 'animationend', invalidateCoords); - r.registerBinding(domEle, 'scroll', invalidateCoords); - }); - - // stop right click menu from appearing on cy - r.registerBinding(r.container, 'contextmenu', function (e) { - e.preventDefault(); - }); - var inBoxSelection = function inBoxSelection() { - return r.selection[4] !== 0; - }; - var eventInContainer = function eventInContainer(e) { - // save cycles if mouse events aren't to be captured - var containerPageCoords = r.findContainerClientCoords(); - var x = containerPageCoords[0]; - var y = containerPageCoords[1]; - var width = containerPageCoords[2]; - var height = containerPageCoords[3]; - var positions = e.touches ? e.touches : [e]; - var atLeastOnePosInside = false; - for (var i = 0; i < positions.length; i++) { - var p = positions[i]; - if (x <= p.clientX && p.clientX <= x + width && y <= p.clientY && p.clientY <= y + height) { - atLeastOnePosInside = true; - break; - } - } - if (!atLeastOnePosInside) { - return false; - } - var container = r.container; - var target = e.target; - var tParent = target.parentNode; - var containerIsTarget = false; - while (tParent) { - if (tParent === container) { - containerIsTarget = true; - break; - } - tParent = tParent.parentNode; - } - if (!containerIsTarget) { - return false; - } // if target is outisde cy container, then this event is not for us - - return true; - }; - - // Primary key - r.registerBinding(r.container, 'mousedown', function mousedownHandler(e) { - if (!eventInContainer(e)) { - return; - } - - // during left mouse button gestures, ignore other buttons - if (r.hoverData.which === 1 && e.which !== 1) { - return; - } - e.preventDefault(); - blurActiveDomElement(); - r.hoverData.capture = true; - r.hoverData.which = e.which; - var cy = r.cy; - var gpos = [e.clientX, e.clientY]; - var pos = r.projectIntoViewport(gpos[0], gpos[1]); - var select = r.selection; - var nears = r.findNearestElements(pos[0], pos[1], true, false); - var near = nears[0]; - var draggedElements = r.dragData.possibleDragElements; - r.hoverData.mdownPos = pos; - r.hoverData.mdownGPos = gpos; - var checkForTaphold = function checkForTaphold() { - r.hoverData.tapholdCancelled = false; - clearTimeout(r.hoverData.tapholdTimeout); - r.hoverData.tapholdTimeout = setTimeout(function () { - if (r.hoverData.tapholdCancelled) { - return; - } else { - var ele = r.hoverData.down; - if (ele) { - ele.emit({ - originalEvent: e, - type: 'taphold', - position: { - x: pos[0], - y: pos[1] - } - }); - } else { - cy.emit({ - originalEvent: e, - type: 'taphold', - position: { - x: pos[0], - y: pos[1] - } - }); - } - } - }, r.tapholdDuration); - }; - - // Right click button - if (e.which == 3) { - r.hoverData.cxtStarted = true; - var cxtEvt = { - originalEvent: e, - type: 'cxttapstart', - position: { - x: pos[0], - y: pos[1] - } - }; - if (near) { - near.activate(); - near.emit(cxtEvt); - r.hoverData.down = near; - } else { - cy.emit(cxtEvt); - } - r.hoverData.downTime = new Date().getTime(); - r.hoverData.cxtDragged = false; - - // Primary button - } else if (e.which == 1) { - if (near) { - near.activate(); - } - - // Element dragging - { - // If something is under the cursor and it is draggable, prepare to grab it - if (near != null) { - if (r.nodeIsGrabbable(near)) { - var makeEvent = function makeEvent(type) { - return { - originalEvent: e, - type: type, - position: { - x: pos[0], - y: pos[1] - } - }; - }; - var triggerGrab = function triggerGrab(ele) { - ele.emit(makeEvent('grab')); - }; - setGrabTarget(near); - if (!near.selected()) { - draggedElements = r.dragData.possibleDragElements = cy.collection(); - addNodeToDrag(near, { - addToList: draggedElements - }); - near.emit(makeEvent('grabon')).emit(makeEvent('grab')); - } else { - draggedElements = r.dragData.possibleDragElements = cy.collection(); - var selectedNodes = cy.$(function (ele) { - return ele.isNode() && ele.selected() && r.nodeIsGrabbable(ele); - }); - addNodesToDrag(selectedNodes, { - addToList: draggedElements - }); - near.emit(makeEvent('grabon')); - selectedNodes.forEach(triggerGrab); - } - r.redrawHint('eles', true); - r.redrawHint('drag', true); - } - } - r.hoverData.down = near; - r.hoverData.downs = nears; - r.hoverData.downTime = new Date().getTime(); - } - triggerEvents(near, ['mousedown', 'tapstart', 'vmousedown'], e, { - x: pos[0], - y: pos[1] - }); - if (near == null) { - select[4] = 1; - r.data.bgActivePosistion = { - x: pos[0], - y: pos[1] - }; - r.redrawHint('select', true); - r.redraw(); - } else if (near.pannable()) { - select[4] = 1; // for future pan - } - - checkForTaphold(); - } - - // Initialize selection box coordinates - select[0] = select[2] = pos[0]; - select[1] = select[3] = pos[1]; - }, false); - r.registerBinding(containerWindow, 'mousemove', function mousemoveHandler(e) { - // eslint-disable-line no-undef - var capture = r.hoverData.capture; - if (!capture && !eventInContainer(e)) { - return; - } - var preventDefault = false; - var cy = r.cy; - var zoom = cy.zoom(); - var gpos = [e.clientX, e.clientY]; - var pos = r.projectIntoViewport(gpos[0], gpos[1]); - var mdownPos = r.hoverData.mdownPos; - var mdownGPos = r.hoverData.mdownGPos; - var select = r.selection; - var near = null; - if (!r.hoverData.draggingEles && !r.hoverData.dragging && !r.hoverData.selecting) { - near = r.findNearestElement(pos[0], pos[1], true, false); - } - var last = r.hoverData.last; - var down = r.hoverData.down; - var disp = [pos[0] - select[2], pos[1] - select[3]]; - var draggedElements = r.dragData.possibleDragElements; - var isOverThresholdDrag; - if (mdownGPos) { - var dx = gpos[0] - mdownGPos[0]; - var dx2 = dx * dx; - var dy = gpos[1] - mdownGPos[1]; - var dy2 = dy * dy; - var dist2 = dx2 + dy2; - r.hoverData.isOverThresholdDrag = isOverThresholdDrag = dist2 >= r.desktopTapThreshold2; - } - var multSelKeyDown = isMultSelKeyDown(e); - if (isOverThresholdDrag) { - r.hoverData.tapholdCancelled = true; - } - var updateDragDelta = function updateDragDelta() { - var dragDelta = r.hoverData.dragDelta = r.hoverData.dragDelta || []; - if (dragDelta.length === 0) { - dragDelta.push(disp[0]); - dragDelta.push(disp[1]); - } else { - dragDelta[0] += disp[0]; - dragDelta[1] += disp[1]; - } - }; - preventDefault = true; - triggerEvents(near, ['mousemove', 'vmousemove', 'tapdrag'], e, { - x: pos[0], - y: pos[1] - }); - var goIntoBoxMode = function goIntoBoxMode() { - r.data.bgActivePosistion = undefined; - if (!r.hoverData.selecting) { - cy.emit({ - originalEvent: e, - type: 'boxstart', - position: { - x: pos[0], - y: pos[1] - } - }); - } - select[4] = 1; - r.hoverData.selecting = true; - r.redrawHint('select', true); - r.redraw(); - }; - - // trigger context drag if rmouse down - if (r.hoverData.which === 3) { - // but only if over threshold - if (isOverThresholdDrag) { - var cxtEvt = { - originalEvent: e, - type: 'cxtdrag', - position: { - x: pos[0], - y: pos[1] - } - }; - if (down) { - down.emit(cxtEvt); - } else { - cy.emit(cxtEvt); - } - r.hoverData.cxtDragged = true; - if (!r.hoverData.cxtOver || near !== r.hoverData.cxtOver) { - if (r.hoverData.cxtOver) { - r.hoverData.cxtOver.emit({ - originalEvent: e, - type: 'cxtdragout', - position: { - x: pos[0], - y: pos[1] - } - }); - } - r.hoverData.cxtOver = near; - if (near) { - near.emit({ - originalEvent: e, - type: 'cxtdragover', - position: { - x: pos[0], - y: pos[1] - } - }); - } - } - } - - // Check if we are drag panning the entire graph - } else if (r.hoverData.dragging) { - preventDefault = true; - if (cy.panningEnabled() && cy.userPanningEnabled()) { - var deltaP; - if (r.hoverData.justStartedPan) { - var mdPos = r.hoverData.mdownPos; - deltaP = { - x: (pos[0] - mdPos[0]) * zoom, - y: (pos[1] - mdPos[1]) * zoom - }; - r.hoverData.justStartedPan = false; - } else { - deltaP = { - x: disp[0] * zoom, - y: disp[1] * zoom - }; - } - cy.panBy(deltaP); - cy.emit('dragpan'); - r.hoverData.dragged = true; - } - - // Needs reproject due to pan changing viewport - pos = r.projectIntoViewport(e.clientX, e.clientY); - - // Checks primary button down & out of time & mouse not moved much - } else if (select[4] == 1 && (down == null || down.pannable())) { - if (isOverThresholdDrag) { - if (!r.hoverData.dragging && cy.boxSelectionEnabled() && (multSelKeyDown || !cy.panningEnabled() || !cy.userPanningEnabled())) { - goIntoBoxMode(); - } else if (!r.hoverData.selecting && cy.panningEnabled() && cy.userPanningEnabled()) { - var allowPassthrough = allowPanningPassthrough(down, r.hoverData.downs); - if (allowPassthrough) { - r.hoverData.dragging = true; - r.hoverData.justStartedPan = true; - select[4] = 0; - r.data.bgActivePosistion = array2point(mdownPos); - r.redrawHint('select', true); - r.redraw(); - } - } - if (down && down.pannable() && down.active()) { - down.unactivate(); - } - } - } else { - if (down && down.pannable() && down.active()) { - down.unactivate(); - } - if ((!down || !down.grabbed()) && near != last) { - if (last) { - triggerEvents(last, ['mouseout', 'tapdragout'], e, { - x: pos[0], - y: pos[1] - }); - } - if (near) { - triggerEvents(near, ['mouseover', 'tapdragover'], e, { - x: pos[0], - y: pos[1] - }); - } - r.hoverData.last = near; - } - if (down) { - if (isOverThresholdDrag) { - // then we can take action - - if (cy.boxSelectionEnabled() && multSelKeyDown) { - // then selection overrides - if (down && down.grabbed()) { - freeDraggedElements(draggedElements); - down.emit('freeon'); - draggedElements.emit('free'); - if (r.dragData.didDrag) { - down.emit('dragfreeon'); - draggedElements.emit('dragfree'); - } - } - goIntoBoxMode(); - } else if (down && down.grabbed() && r.nodeIsDraggable(down)) { - // drag node - var justStartedDrag = !r.dragData.didDrag; - if (justStartedDrag) { - r.redrawHint('eles', true); - } - r.dragData.didDrag = true; // indicate that we actually did drag the node - - // now, add the elements to the drag layer if not done already - if (!r.hoverData.draggingEles) { - addNodesToDrag(draggedElements, { - inDragLayer: true - }); - } - var totalShift = { - x: 0, - y: 0 - }; - if (number$1(disp[0]) && number$1(disp[1])) { - totalShift.x += disp[0]; - totalShift.y += disp[1]; - if (justStartedDrag) { - var dragDelta = r.hoverData.dragDelta; - if (dragDelta && number$1(dragDelta[0]) && number$1(dragDelta[1])) { - totalShift.x += dragDelta[0]; - totalShift.y += dragDelta[1]; - } - } - } - r.hoverData.draggingEles = true; - draggedElements.silentShift(totalShift).emit('position drag'); - r.redrawHint('drag', true); - r.redraw(); - } - } else { - // otherwise save drag delta for when we actually start dragging so the relative grab pos is constant - updateDragDelta(); - } - } - - // prevent the dragging from triggering text selection on the page - preventDefault = true; - } - select[2] = pos[0]; - select[3] = pos[1]; - if (preventDefault) { - if (e.stopPropagation) e.stopPropagation(); - if (e.preventDefault) e.preventDefault(); - return false; - } - }, false); - var clickTimeout, didDoubleClick, prevClickTimeStamp; - r.registerBinding(containerWindow, 'mouseup', function mouseupHandler(e) { - // eslint-disable-line no-undef - // during left mouse button gestures, ignore other buttons - if (r.hoverData.which === 1 && e.which !== 1 && r.hoverData.capture) { - return; - } - var capture = r.hoverData.capture; - if (!capture) { - return; - } - r.hoverData.capture = false; - var cy = r.cy; - var pos = r.projectIntoViewport(e.clientX, e.clientY); - var select = r.selection; - var near = r.findNearestElement(pos[0], pos[1], true, false); - var draggedElements = r.dragData.possibleDragElements; - var down = r.hoverData.down; - var multSelKeyDown = isMultSelKeyDown(e); - if (r.data.bgActivePosistion) { - r.redrawHint('select', true); - r.redraw(); - } - r.hoverData.tapholdCancelled = true; - r.data.bgActivePosistion = undefined; // not active bg now - - if (down) { - down.unactivate(); - } - if (r.hoverData.which === 3) { - var cxtEvt = { - originalEvent: e, - type: 'cxttapend', - position: { - x: pos[0], - y: pos[1] - } - }; - if (down) { - down.emit(cxtEvt); - } else { - cy.emit(cxtEvt); - } - if (!r.hoverData.cxtDragged) { - var cxtTap = { - originalEvent: e, - type: 'cxttap', - position: { - x: pos[0], - y: pos[1] - } - }; - if (down) { - down.emit(cxtTap); - } else { - cy.emit(cxtTap); - } - } - r.hoverData.cxtDragged = false; - r.hoverData.which = null; - } else if (r.hoverData.which === 1) { - triggerEvents(near, ['mouseup', 'tapend', 'vmouseup'], e, { - x: pos[0], - y: pos[1] - }); - if (!r.dragData.didDrag && - // didn't move a node around - !r.hoverData.dragged && - // didn't pan - !r.hoverData.selecting && - // not box selection - !r.hoverData.isOverThresholdDrag // didn't move too much - ) { - triggerEvents(down, ["click", "tap", "vclick"], e, { - x: pos[0], - y: pos[1] - }); - didDoubleClick = false; - if (e.timeStamp - prevClickTimeStamp <= cy.multiClickDebounceTime()) { - clickTimeout && clearTimeout(clickTimeout); - didDoubleClick = true; - prevClickTimeStamp = null; - triggerEvents(down, ["dblclick", "dbltap", "vdblclick"], e, { - x: pos[0], - y: pos[1] - }); - } else { - clickTimeout = setTimeout(function () { - if (didDoubleClick) return; - triggerEvents(down, ["oneclick", "onetap", "voneclick"], e, { - x: pos[0], - y: pos[1] - }); - }, cy.multiClickDebounceTime()); - prevClickTimeStamp = e.timeStamp; - } - } - - // Deselect all elements if nothing is currently under the mouse cursor and we aren't dragging something - if (down == null // not mousedown on node - && !r.dragData.didDrag // didn't move the node around - && !r.hoverData.selecting // not box selection - && !r.hoverData.dragged // didn't pan - && !isMultSelKeyDown(e)) { - cy.$(isSelected).unselect(['tapunselect']); - if (draggedElements.length > 0) { - r.redrawHint('eles', true); - } - r.dragData.possibleDragElements = draggedElements = cy.collection(); - } - - // Single selection - if (near == down && !r.dragData.didDrag && !r.hoverData.selecting) { - if (near != null && near._private.selectable) { - if (r.hoverData.dragging) ; else if (cy.selectionType() === 'additive' || multSelKeyDown) { - if (near.selected()) { - near.unselect(['tapunselect']); - } else { - near.select(['tapselect']); - } - } else { - if (!multSelKeyDown) { - cy.$(isSelected).unmerge(near).unselect(['tapunselect']); - near.select(['tapselect']); - } - } - r.redrawHint('eles', true); - } - } - if (r.hoverData.selecting) { - var box = cy.collection(r.getAllInBox(select[0], select[1], select[2], select[3])); - r.redrawHint('select', true); - if (box.length > 0) { - r.redrawHint('eles', true); - } - cy.emit({ - type: 'boxend', - originalEvent: e, - position: { - x: pos[0], - y: pos[1] - } - }); - var eleWouldBeSelected = function eleWouldBeSelected(ele) { - return ele.selectable() && !ele.selected(); - }; - if (cy.selectionType() === 'additive') { - box.emit('box').stdFilter(eleWouldBeSelected).select().emit('boxselect'); - } else { - if (!multSelKeyDown) { - cy.$(isSelected).unmerge(box).unselect(); - } - box.emit('box').stdFilter(eleWouldBeSelected).select().emit('boxselect'); - } - - // always need redraw in case eles unselectable - r.redraw(); - } - - // Cancel drag pan - if (r.hoverData.dragging) { - r.hoverData.dragging = false; - r.redrawHint('select', true); - r.redrawHint('eles', true); - r.redraw(); - } - if (!select[4]) { - r.redrawHint('drag', true); - r.redrawHint('eles', true); - var downWasGrabbed = down && down.grabbed(); - freeDraggedElements(draggedElements); - if (downWasGrabbed) { - down.emit('freeon'); - draggedElements.emit('free'); - if (r.dragData.didDrag) { - down.emit('dragfreeon'); - draggedElements.emit('dragfree'); - } - } - } - } // else not right mouse - - select[4] = 0; - r.hoverData.down = null; - r.hoverData.cxtStarted = false; - r.hoverData.draggingEles = false; - r.hoverData.selecting = false; - r.hoverData.isOverThresholdDrag = false; - r.dragData.didDrag = false; - r.hoverData.dragged = false; - r.hoverData.dragDelta = []; - r.hoverData.mdownPos = null; - r.hoverData.mdownGPos = null; - r.hoverData.which = null; - }, false); - var wheelHandler = function wheelHandler(e) { - if (r.scrollingPage) { - return; - } // while scrolling, ignore wheel-to-zoom - - var cy = r.cy; - var zoom = cy.zoom(); - var pan = cy.pan(); - var pos = r.projectIntoViewport(e.clientX, e.clientY); - var rpos = [pos[0] * zoom + pan.x, pos[1] * zoom + pan.y]; - if (r.hoverData.draggingEles || r.hoverData.dragging || r.hoverData.cxtStarted || inBoxSelection()) { - // if pan dragging or cxt dragging, wheel movements make no zoom - e.preventDefault(); - return; - } - if (cy.panningEnabled() && cy.userPanningEnabled() && cy.zoomingEnabled() && cy.userZoomingEnabled()) { - e.preventDefault(); - r.data.wheelZooming = true; - clearTimeout(r.data.wheelTimeout); - r.data.wheelTimeout = setTimeout(function () { - r.data.wheelZooming = false; - r.redrawHint('eles', true); - r.redraw(); - }, 150); - var diff; - if (e.deltaY != null) { - diff = e.deltaY / -250; - } else if (e.wheelDeltaY != null) { - diff = e.wheelDeltaY / 1000; - } else { - diff = e.wheelDelta / 1000; - } - diff = diff * r.wheelSensitivity; - var needsWheelFix = e.deltaMode === 1; - if (needsWheelFix) { - // fixes slow wheel events on ff/linux and ff/windows - diff *= 33; - } - var newZoom = cy.zoom() * Math.pow(10, diff); - if (e.type === 'gesturechange') { - newZoom = r.gestureStartZoom * e.scale; - } - cy.zoom({ - level: newZoom, - renderedPosition: { - x: rpos[0], - y: rpos[1] - } - }); - cy.emit(e.type === 'gesturechange' ? 'pinchzoom' : 'scrollzoom'); - } - }; - - // Functions to help with whether mouse wheel should trigger zooming - // -- - r.registerBinding(r.container, 'wheel', wheelHandler, true); - - // disable nonstandard wheel events - // r.registerBinding(r.container, 'mousewheel', wheelHandler, true); - // r.registerBinding(r.container, 'DOMMouseScroll', wheelHandler, true); - // r.registerBinding(r.container, 'MozMousePixelScroll', wheelHandler, true); // older firefox - - r.registerBinding(containerWindow, 'scroll', function scrollHandler(e) { - // eslint-disable-line no-unused-vars - r.scrollingPage = true; - clearTimeout(r.scrollingPageTimeout); - r.scrollingPageTimeout = setTimeout(function () { - r.scrollingPage = false; - }, 250); - }, true); - - // desktop safari pinch to zoom start - r.registerBinding(r.container, 'gesturestart', function gestureStartHandler(e) { - r.gestureStartZoom = r.cy.zoom(); - if (!r.hasTouchStarted) { - // don't affect touch devices like iphone - e.preventDefault(); - } - }, true); - r.registerBinding(r.container, 'gesturechange', function (e) { - if (!r.hasTouchStarted) { - // don't affect touch devices like iphone - wheelHandler(e); - } - }, true); - - // Functions to help with handling mouseout/mouseover on the Cytoscape container - // Handle mouseout on Cytoscape container - r.registerBinding(r.container, 'mouseout', function mouseOutHandler(e) { - var pos = r.projectIntoViewport(e.clientX, e.clientY); - r.cy.emit({ - originalEvent: e, - type: 'mouseout', - position: { - x: pos[0], - y: pos[1] - } - }); - }, false); - r.registerBinding(r.container, 'mouseover', function mouseOverHandler(e) { - var pos = r.projectIntoViewport(e.clientX, e.clientY); - r.cy.emit({ - originalEvent: e, - type: 'mouseover', - position: { - x: pos[0], - y: pos[1] - } - }); - }, false); - var f1x1, f1y1, f2x1, f2y1; // starting points for pinch-to-zoom - var distance1, distance1Sq; // initial distance between finger 1 and finger 2 for pinch-to-zoom - var center1, modelCenter1; // center point on start pinch to zoom - var offsetLeft, offsetTop; - var containerWidth, containerHeight; - var twoFingersStartInside; - var distance = function distance(x1, y1, x2, y2) { - return Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1)); - }; - var distanceSq = function distanceSq(x1, y1, x2, y2) { - return (x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1); - }; - var touchstartHandler; - r.registerBinding(r.container, 'touchstart', touchstartHandler = function touchstartHandler(e) { - r.hasTouchStarted = true; - if (!eventInContainer(e)) { - return; - } - blurActiveDomElement(); - r.touchData.capture = true; - r.data.bgActivePosistion = undefined; - var cy = r.cy; - var now = r.touchData.now; - var earlier = r.touchData.earlier; - if (e.touches[0]) { - var pos = r.projectIntoViewport(e.touches[0].clientX, e.touches[0].clientY); - now[0] = pos[0]; - now[1] = pos[1]; - } - if (e.touches[1]) { - var pos = r.projectIntoViewport(e.touches[1].clientX, e.touches[1].clientY); - now[2] = pos[0]; - now[3] = pos[1]; - } - if (e.touches[2]) { - var pos = r.projectIntoViewport(e.touches[2].clientX, e.touches[2].clientY); - now[4] = pos[0]; - now[5] = pos[1]; - } - - // record starting points for pinch-to-zoom - if (e.touches[1]) { - r.touchData.singleTouchMoved = true; - freeDraggedElements(r.dragData.touchDragEles); - var offsets = r.findContainerClientCoords(); - offsetLeft = offsets[0]; - offsetTop = offsets[1]; - containerWidth = offsets[2]; - containerHeight = offsets[3]; - f1x1 = e.touches[0].clientX - offsetLeft; - f1y1 = e.touches[0].clientY - offsetTop; - f2x1 = e.touches[1].clientX - offsetLeft; - f2y1 = e.touches[1].clientY - offsetTop; - twoFingersStartInside = 0 <= f1x1 && f1x1 <= containerWidth && 0 <= f2x1 && f2x1 <= containerWidth && 0 <= f1y1 && f1y1 <= containerHeight && 0 <= f2y1 && f2y1 <= containerHeight; - var pan = cy.pan(); - var zoom = cy.zoom(); - distance1 = distance(f1x1, f1y1, f2x1, f2y1); - distance1Sq = distanceSq(f1x1, f1y1, f2x1, f2y1); - center1 = [(f1x1 + f2x1) / 2, (f1y1 + f2y1) / 2]; - modelCenter1 = [(center1[0] - pan.x) / zoom, (center1[1] - pan.y) / zoom]; - - // consider context tap - var cxtDistThreshold = 200; - var cxtDistThresholdSq = cxtDistThreshold * cxtDistThreshold; - if (distance1Sq < cxtDistThresholdSq && !e.touches[2]) { - var near1 = r.findNearestElement(now[0], now[1], true, true); - var near2 = r.findNearestElement(now[2], now[3], true, true); - if (near1 && near1.isNode()) { - near1.activate().emit({ - originalEvent: e, - type: 'cxttapstart', - position: { - x: now[0], - y: now[1] - } - }); - r.touchData.start = near1; - } else if (near2 && near2.isNode()) { - near2.activate().emit({ - originalEvent: e, - type: 'cxttapstart', - position: { - x: now[0], - y: now[1] - } - }); - r.touchData.start = near2; - } else { - cy.emit({ - originalEvent: e, - type: 'cxttapstart', - position: { - x: now[0], - y: now[1] - } - }); - } - if (r.touchData.start) { - r.touchData.start._private.grabbed = false; - } - r.touchData.cxt = true; - r.touchData.cxtDragged = false; - r.data.bgActivePosistion = undefined; - r.redraw(); - return; - } - } - if (e.touches[2]) { - // ignore - - // safari on ios pans the page otherwise (normally you should be able to preventdefault on touchmove...) - if (cy.boxSelectionEnabled()) { - e.preventDefault(); - } - } else if (e.touches[1]) ; else if (e.touches[0]) { - var nears = r.findNearestElements(now[0], now[1], true, true); - var near = nears[0]; - if (near != null) { - near.activate(); - r.touchData.start = near; - r.touchData.starts = nears; - if (r.nodeIsGrabbable(near)) { - var draggedEles = r.dragData.touchDragEles = cy.collection(); - var selectedNodes = null; - r.redrawHint('eles', true); - r.redrawHint('drag', true); - if (near.selected()) { - // reset drag elements, since near will be added again - - selectedNodes = cy.$(function (ele) { - return ele.selected() && r.nodeIsGrabbable(ele); - }); - addNodesToDrag(selectedNodes, { - addToList: draggedEles - }); - } else { - addNodeToDrag(near, { - addToList: draggedEles - }); - } - setGrabTarget(near); - var makeEvent = function makeEvent(type) { - return { - originalEvent: e, - type: type, - position: { - x: now[0], - y: now[1] - } - }; - }; - near.emit(makeEvent('grabon')); - if (selectedNodes) { - selectedNodes.forEach(function (n) { - n.emit(makeEvent('grab')); - }); - } else { - near.emit(makeEvent('grab')); - } - } - } - triggerEvents(near, ['touchstart', 'tapstart', 'vmousedown'], e, { - x: now[0], - y: now[1] - }); - if (near == null) { - r.data.bgActivePosistion = { - x: pos[0], - y: pos[1] - }; - r.redrawHint('select', true); - r.redraw(); - } - - // Tap, taphold - // ----- - - r.touchData.singleTouchMoved = false; - r.touchData.singleTouchStartTime = +new Date(); - clearTimeout(r.touchData.tapholdTimeout); - r.touchData.tapholdTimeout = setTimeout(function () { - if (r.touchData.singleTouchMoved === false && !r.pinching // if pinching, then taphold unselect shouldn't take effect - && !r.touchData.selecting // box selection shouldn't allow taphold through - ) { - triggerEvents(r.touchData.start, ['taphold'], e, { - x: now[0], - y: now[1] - }); - } - }, r.tapholdDuration); - } - if (e.touches.length >= 1) { - var sPos = r.touchData.startPosition = [null, null, null, null, null, null]; - for (var i = 0; i < now.length; i++) { - sPos[i] = earlier[i] = now[i]; - } - var touch0 = e.touches[0]; - r.touchData.startGPosition = [touch0.clientX, touch0.clientY]; - } - }, false); - var touchmoveHandler; - r.registerBinding(containerWindow, 'touchmove', touchmoveHandler = function touchmoveHandler(e) { - // eslint-disable-line no-undef - var capture = r.touchData.capture; - if (!capture && !eventInContainer(e)) { - return; - } - var select = r.selection; - var cy = r.cy; - var now = r.touchData.now; - var earlier = r.touchData.earlier; - var zoom = cy.zoom(); - if (e.touches[0]) { - var pos = r.projectIntoViewport(e.touches[0].clientX, e.touches[0].clientY); - now[0] = pos[0]; - now[1] = pos[1]; - } - if (e.touches[1]) { - var pos = r.projectIntoViewport(e.touches[1].clientX, e.touches[1].clientY); - now[2] = pos[0]; - now[3] = pos[1]; - } - if (e.touches[2]) { - var pos = r.projectIntoViewport(e.touches[2].clientX, e.touches[2].clientY); - now[4] = pos[0]; - now[5] = pos[1]; - } - var startGPos = r.touchData.startGPosition; - var isOverThresholdDrag; - if (capture && e.touches[0] && startGPos) { - var disp = []; - for (var j = 0; j < now.length; j++) { - disp[j] = now[j] - earlier[j]; - } - var dx = e.touches[0].clientX - startGPos[0]; - var dx2 = dx * dx; - var dy = e.touches[0].clientY - startGPos[1]; - var dy2 = dy * dy; - var dist2 = dx2 + dy2; - isOverThresholdDrag = dist2 >= r.touchTapThreshold2; - } - - // context swipe cancelling - if (capture && r.touchData.cxt) { - e.preventDefault(); - var f1x2 = e.touches[0].clientX - offsetLeft, - f1y2 = e.touches[0].clientY - offsetTop; - var f2x2 = e.touches[1].clientX - offsetLeft, - f2y2 = e.touches[1].clientY - offsetTop; - // var distance2 = distance( f1x2, f1y2, f2x2, f2y2 ); - var distance2Sq = distanceSq(f1x2, f1y2, f2x2, f2y2); - var factorSq = distance2Sq / distance1Sq; - var distThreshold = 150; - var distThresholdSq = distThreshold * distThreshold; - var factorThreshold = 1.5; - var factorThresholdSq = factorThreshold * factorThreshold; - - // cancel ctx gestures if the distance b/t the fingers increases - if (factorSq >= factorThresholdSq || distance2Sq >= distThresholdSq) { - r.touchData.cxt = false; - r.data.bgActivePosistion = undefined; - r.redrawHint('select', true); - var cxtEvt = { - originalEvent: e, - type: 'cxttapend', - position: { - x: now[0], - y: now[1] - } - }; - if (r.touchData.start) { - r.touchData.start.unactivate().emit(cxtEvt); - r.touchData.start = null; - } else { - cy.emit(cxtEvt); - } - } - } - - // context swipe - if (capture && r.touchData.cxt) { - var cxtEvt = { - originalEvent: e, - type: 'cxtdrag', - position: { - x: now[0], - y: now[1] - } - }; - r.data.bgActivePosistion = undefined; - r.redrawHint('select', true); - if (r.touchData.start) { - r.touchData.start.emit(cxtEvt); - } else { - cy.emit(cxtEvt); - } - if (r.touchData.start) { - r.touchData.start._private.grabbed = false; - } - r.touchData.cxtDragged = true; - var near = r.findNearestElement(now[0], now[1], true, true); - if (!r.touchData.cxtOver || near !== r.touchData.cxtOver) { - if (r.touchData.cxtOver) { - r.touchData.cxtOver.emit({ - originalEvent: e, - type: 'cxtdragout', - position: { - x: now[0], - y: now[1] - } - }); - } - r.touchData.cxtOver = near; - if (near) { - near.emit({ - originalEvent: e, - type: 'cxtdragover', - position: { - x: now[0], - y: now[1] - } - }); - } - } - - // box selection - } else if (capture && e.touches[2] && cy.boxSelectionEnabled()) { - e.preventDefault(); - r.data.bgActivePosistion = undefined; - this.lastThreeTouch = +new Date(); - if (!r.touchData.selecting) { - cy.emit({ - originalEvent: e, - type: 'boxstart', - position: { - x: now[0], - y: now[1] - } - }); - } - r.touchData.selecting = true; - r.touchData.didSelect = true; - select[4] = 1; - if (!select || select.length === 0 || select[0] === undefined) { - select[0] = (now[0] + now[2] + now[4]) / 3; - select[1] = (now[1] + now[3] + now[5]) / 3; - select[2] = (now[0] + now[2] + now[4]) / 3 + 1; - select[3] = (now[1] + now[3] + now[5]) / 3 + 1; - } else { - select[2] = (now[0] + now[2] + now[4]) / 3; - select[3] = (now[1] + now[3] + now[5]) / 3; - } - r.redrawHint('select', true); - r.redraw(); - - // pinch to zoom - } else if (capture && e.touches[1] && !r.touchData.didSelect // don't allow box selection to degrade to pinch-to-zoom - && cy.zoomingEnabled() && cy.panningEnabled() && cy.userZoomingEnabled() && cy.userPanningEnabled()) { - // two fingers => pinch to zoom - e.preventDefault(); - r.data.bgActivePosistion = undefined; - r.redrawHint('select', true); - var draggedEles = r.dragData.touchDragEles; - if (draggedEles) { - r.redrawHint('drag', true); - for (var i = 0; i < draggedEles.length; i++) { - var de_p = draggedEles[i]._private; - de_p.grabbed = false; - de_p.rscratch.inDragLayer = false; - } - } - var _start = r.touchData.start; - - // (x2, y2) for fingers 1 and 2 - var f1x2 = e.touches[0].clientX - offsetLeft, - f1y2 = e.touches[0].clientY - offsetTop; - var f2x2 = e.touches[1].clientX - offsetLeft, - f2y2 = e.touches[1].clientY - offsetTop; - var distance2 = distance(f1x2, f1y2, f2x2, f2y2); - // var distance2Sq = distanceSq( f1x2, f1y2, f2x2, f2y2 ); - // var factor = Math.sqrt( distance2Sq ) / Math.sqrt( distance1Sq ); - var factor = distance2 / distance1; - if (twoFingersStartInside) { - // delta finger1 - var df1x = f1x2 - f1x1; - var df1y = f1y2 - f1y1; - - // delta finger 2 - var df2x = f2x2 - f2x1; - var df2y = f2y2 - f2y1; - - // translation is the normalised vector of the two fingers movement - // i.e. so pinching cancels out and moving together pans - var tx = (df1x + df2x) / 2; - var ty = (df1y + df2y) / 2; - - // now calculate the zoom - var zoom1 = cy.zoom(); - var zoom2 = zoom1 * factor; - var pan1 = cy.pan(); - - // the model center point converted to the current rendered pos - var ctrx = modelCenter1[0] * zoom1 + pan1.x; - var ctry = modelCenter1[1] * zoom1 + pan1.y; - var pan2 = { - x: -zoom2 / zoom1 * (ctrx - pan1.x - tx) + ctrx, - y: -zoom2 / zoom1 * (ctry - pan1.y - ty) + ctry - }; - - // remove dragged eles - if (_start && _start.active()) { - var draggedEles = r.dragData.touchDragEles; - freeDraggedElements(draggedEles); - r.redrawHint('drag', true); - r.redrawHint('eles', true); - _start.unactivate().emit('freeon'); - draggedEles.emit('free'); - if (r.dragData.didDrag) { - _start.emit('dragfreeon'); - draggedEles.emit('dragfree'); - } - } - cy.viewport({ - zoom: zoom2, - pan: pan2, - cancelOnFailedZoom: true - }); - cy.emit('pinchzoom'); - distance1 = distance2; - f1x1 = f1x2; - f1y1 = f1y2; - f2x1 = f2x2; - f2y1 = f2y2; - r.pinching = true; - } - - // Re-project - if (e.touches[0]) { - var pos = r.projectIntoViewport(e.touches[0].clientX, e.touches[0].clientY); - now[0] = pos[0]; - now[1] = pos[1]; - } - if (e.touches[1]) { - var pos = r.projectIntoViewport(e.touches[1].clientX, e.touches[1].clientY); - now[2] = pos[0]; - now[3] = pos[1]; - } - if (e.touches[2]) { - var pos = r.projectIntoViewport(e.touches[2].clientX, e.touches[2].clientY); - now[4] = pos[0]; - now[5] = pos[1]; - } - } else if (e.touches[0] && !r.touchData.didSelect // don't allow box selection to degrade to single finger events like panning - ) { - var start = r.touchData.start; - var last = r.touchData.last; - var near; - if (!r.hoverData.draggingEles && !r.swipePanning) { - near = r.findNearestElement(now[0], now[1], true, true); - } - if (capture && start != null) { - e.preventDefault(); - } - - // dragging nodes - if (capture && start != null && r.nodeIsDraggable(start)) { - if (isOverThresholdDrag) { - // then dragging can happen - var draggedEles = r.dragData.touchDragEles; - var justStartedDrag = !r.dragData.didDrag; - if (justStartedDrag) { - addNodesToDrag(draggedEles, { - inDragLayer: true - }); - } - r.dragData.didDrag = true; - var totalShift = { - x: 0, - y: 0 - }; - if (number$1(disp[0]) && number$1(disp[1])) { - totalShift.x += disp[0]; - totalShift.y += disp[1]; - if (justStartedDrag) { - r.redrawHint('eles', true); - var dragDelta = r.touchData.dragDelta; - if (dragDelta && number$1(dragDelta[0]) && number$1(dragDelta[1])) { - totalShift.x += dragDelta[0]; - totalShift.y += dragDelta[1]; - } - } - } - r.hoverData.draggingEles = true; - draggedEles.silentShift(totalShift).emit('position drag'); - r.redrawHint('drag', true); - if (r.touchData.startPosition[0] == earlier[0] && r.touchData.startPosition[1] == earlier[1]) { - r.redrawHint('eles', true); - } - r.redraw(); - } else { - // otherwise keep track of drag delta for later - var dragDelta = r.touchData.dragDelta = r.touchData.dragDelta || []; - if (dragDelta.length === 0) { - dragDelta.push(disp[0]); - dragDelta.push(disp[1]); - } else { - dragDelta[0] += disp[0]; - dragDelta[1] += disp[1]; - } - } - } - - // touchmove - { - triggerEvents(start || near, ['touchmove', 'tapdrag', 'vmousemove'], e, { - x: now[0], - y: now[1] - }); - if ((!start || !start.grabbed()) && near != last) { - if (last) { - last.emit({ - originalEvent: e, - type: 'tapdragout', - position: { - x: now[0], - y: now[1] - } - }); - } - if (near) { - near.emit({ - originalEvent: e, - type: 'tapdragover', - position: { - x: now[0], - y: now[1] - } - }); - } - } - r.touchData.last = near; - } - - // check to cancel taphold - if (capture) { - for (var i = 0; i < now.length; i++) { - if (now[i] && r.touchData.startPosition[i] && isOverThresholdDrag) { - r.touchData.singleTouchMoved = true; - } - } - } - - // panning - if (capture && (start == null || start.pannable()) && cy.panningEnabled() && cy.userPanningEnabled()) { - var allowPassthrough = allowPanningPassthrough(start, r.touchData.starts); - if (allowPassthrough) { - e.preventDefault(); - if (!r.data.bgActivePosistion) { - r.data.bgActivePosistion = array2point(r.touchData.startPosition); - } - if (r.swipePanning) { - cy.panBy({ - x: disp[0] * zoom, - y: disp[1] * zoom - }); - cy.emit('dragpan'); - } else if (isOverThresholdDrag) { - r.swipePanning = true; - cy.panBy({ - x: dx * zoom, - y: dy * zoom - }); - cy.emit('dragpan'); - if (start) { - start.unactivate(); - r.redrawHint('select', true); - r.touchData.start = null; - } - } - } - - // Re-project - var pos = r.projectIntoViewport(e.touches[0].clientX, e.touches[0].clientY); - now[0] = pos[0]; - now[1] = pos[1]; - } - } - for (var j = 0; j < now.length; j++) { - earlier[j] = now[j]; - } - - // the active bg indicator should be removed when making a swipe that is neither for dragging nodes or panning - if (capture && e.touches.length > 0 && !r.hoverData.draggingEles && !r.swipePanning && r.data.bgActivePosistion != null) { - r.data.bgActivePosistion = undefined; - r.redrawHint('select', true); - r.redraw(); - } - }, false); - var touchcancelHandler; - r.registerBinding(containerWindow, 'touchcancel', touchcancelHandler = function touchcancelHandler(e) { - // eslint-disable-line no-unused-vars - var start = r.touchData.start; - r.touchData.capture = false; - if (start) { - start.unactivate(); - } - }); - var touchendHandler, didDoubleTouch, touchTimeout, prevTouchTimeStamp; - r.registerBinding(containerWindow, 'touchend', touchendHandler = function touchendHandler(e) { - // eslint-disable-line no-unused-vars - var start = r.touchData.start; - var capture = r.touchData.capture; - if (capture) { - if (e.touches.length === 0) { - r.touchData.capture = false; - } - e.preventDefault(); - } else { - return; - } - var select = r.selection; - r.swipePanning = false; - r.hoverData.draggingEles = false; - var cy = r.cy; - var zoom = cy.zoom(); - var now = r.touchData.now; - var earlier = r.touchData.earlier; - if (e.touches[0]) { - var pos = r.projectIntoViewport(e.touches[0].clientX, e.touches[0].clientY); - now[0] = pos[0]; - now[1] = pos[1]; - } - if (e.touches[1]) { - var pos = r.projectIntoViewport(e.touches[1].clientX, e.touches[1].clientY); - now[2] = pos[0]; - now[3] = pos[1]; - } - if (e.touches[2]) { - var pos = r.projectIntoViewport(e.touches[2].clientX, e.touches[2].clientY); - now[4] = pos[0]; - now[5] = pos[1]; - } - if (start) { - start.unactivate(); - } - var ctxTapend; - if (r.touchData.cxt) { - ctxTapend = { - originalEvent: e, - type: 'cxttapend', - position: { - x: now[0], - y: now[1] - } - }; - if (start) { - start.emit(ctxTapend); - } else { - cy.emit(ctxTapend); - } - if (!r.touchData.cxtDragged) { - var ctxTap = { - originalEvent: e, - type: 'cxttap', - position: { - x: now[0], - y: now[1] - } - }; - if (start) { - start.emit(ctxTap); - } else { - cy.emit(ctxTap); - } - } - if (r.touchData.start) { - r.touchData.start._private.grabbed = false; - } - r.touchData.cxt = false; - r.touchData.start = null; - r.redraw(); - return; - } - - // no more box selection if we don't have three fingers - if (!e.touches[2] && cy.boxSelectionEnabled() && r.touchData.selecting) { - r.touchData.selecting = false; - var box = cy.collection(r.getAllInBox(select[0], select[1], select[2], select[3])); - select[0] = undefined; - select[1] = undefined; - select[2] = undefined; - select[3] = undefined; - select[4] = 0; - r.redrawHint('select', true); - cy.emit({ - type: 'boxend', - originalEvent: e, - position: { - x: now[0], - y: now[1] - } - }); - var eleWouldBeSelected = function eleWouldBeSelected(ele) { - return ele.selectable() && !ele.selected(); - }; - box.emit('box').stdFilter(eleWouldBeSelected).select().emit('boxselect'); - if (box.nonempty()) { - r.redrawHint('eles', true); - } - r.redraw(); - } - if (start != null) { - start.unactivate(); - } - if (e.touches[2]) { - r.data.bgActivePosistion = undefined; - r.redrawHint('select', true); - } else if (e.touches[1]) ; else if (e.touches[0]) ; else if (!e.touches[0]) { - r.data.bgActivePosistion = undefined; - r.redrawHint('select', true); - var draggedEles = r.dragData.touchDragEles; - if (start != null) { - var startWasGrabbed = start._private.grabbed; - freeDraggedElements(draggedEles); - r.redrawHint('drag', true); - r.redrawHint('eles', true); - if (startWasGrabbed) { - start.emit('freeon'); - draggedEles.emit('free'); - if (r.dragData.didDrag) { - start.emit('dragfreeon'); - draggedEles.emit('dragfree'); - } - } - triggerEvents(start, ['touchend', 'tapend', 'vmouseup', 'tapdragout'], e, { - x: now[0], - y: now[1] - }); - start.unactivate(); - r.touchData.start = null; - } else { - var near = r.findNearestElement(now[0], now[1], true, true); - triggerEvents(near, ['touchend', 'tapend', 'vmouseup', 'tapdragout'], e, { - x: now[0], - y: now[1] - }); - } - var dx = r.touchData.startPosition[0] - now[0]; - var dx2 = dx * dx; - var dy = r.touchData.startPosition[1] - now[1]; - var dy2 = dy * dy; - var dist2 = dx2 + dy2; - var rdist2 = dist2 * zoom * zoom; - - // Tap event, roughly same as mouse click event for touch - if (!r.touchData.singleTouchMoved) { - if (!start) { - cy.$(':selected').unselect(['tapunselect']); - } - triggerEvents(start, ['tap', 'vclick'], e, { - x: now[0], - y: now[1] - }); - didDoubleTouch = false; - if (e.timeStamp - prevTouchTimeStamp <= cy.multiClickDebounceTime()) { - touchTimeout && clearTimeout(touchTimeout); - didDoubleTouch = true; - prevTouchTimeStamp = null; - triggerEvents(start, ['dbltap', 'vdblclick'], e, { - x: now[0], - y: now[1] - }); - } else { - touchTimeout = setTimeout(function () { - if (didDoubleTouch) return; - triggerEvents(start, ['onetap', 'voneclick'], e, { - x: now[0], - y: now[1] - }); - }, cy.multiClickDebounceTime()); - prevTouchTimeStamp = e.timeStamp; - } - } - - // Prepare to select the currently touched node, only if it hasn't been dragged past a certain distance - if (start != null && !r.dragData.didDrag // didn't drag nodes around - && start._private.selectable && rdist2 < r.touchTapThreshold2 && !r.pinching // pinch to zoom should not affect selection - ) { - if (cy.selectionType() === 'single') { - cy.$(isSelected).unmerge(start).unselect(['tapunselect']); - start.select(['tapselect']); - } else { - if (start.selected()) { - start.unselect(['tapunselect']); - } else { - start.select(['tapselect']); - } - } - r.redrawHint('eles', true); - } - r.touchData.singleTouchMoved = true; - } - for (var j = 0; j < now.length; j++) { - earlier[j] = now[j]; - } - r.dragData.didDrag = false; // reset for next touchstart - - if (e.touches.length === 0) { - r.touchData.dragDelta = []; - r.touchData.startPosition = [null, null, null, null, null, null]; - r.touchData.startGPosition = null; - r.touchData.didSelect = false; - } - if (e.touches.length < 2) { - if (e.touches.length === 1) { - // the old start global pos'n may not be the same finger that remains - r.touchData.startGPosition = [e.touches[0].clientX, e.touches[0].clientY]; - } - r.pinching = false; - r.redrawHint('eles', true); - r.redraw(); - } - - //r.redraw(); - }, false); - - // fallback compatibility layer for ms pointer events - if (typeof TouchEvent === 'undefined') { - var pointers = []; - var makeTouch = function makeTouch(e) { - return { - clientX: e.clientX, - clientY: e.clientY, - force: 1, - identifier: e.pointerId, - pageX: e.pageX, - pageY: e.pageY, - radiusX: e.width / 2, - radiusY: e.height / 2, - screenX: e.screenX, - screenY: e.screenY, - target: e.target - }; - }; - var makePointer = function makePointer(e) { - return { - event: e, - touch: makeTouch(e) - }; - }; - var addPointer = function addPointer(e) { - pointers.push(makePointer(e)); - }; - var removePointer = function removePointer(e) { - for (var i = 0; i < pointers.length; i++) { - var p = pointers[i]; - if (p.event.pointerId === e.pointerId) { - pointers.splice(i, 1); - return; - } - } - }; - var updatePointer = function updatePointer(e) { - var p = pointers.filter(function (p) { - return p.event.pointerId === e.pointerId; - })[0]; - p.event = e; - p.touch = makeTouch(e); - }; - var addTouchesToEvent = function addTouchesToEvent(e) { - e.touches = pointers.map(function (p) { - return p.touch; - }); - }; - var pointerIsMouse = function pointerIsMouse(e) { - return e.pointerType === 'mouse' || e.pointerType === 4; - }; - r.registerBinding(r.container, 'pointerdown', function (e) { - if (pointerIsMouse(e)) { - return; - } // mouse already handled - - e.preventDefault(); - addPointer(e); - addTouchesToEvent(e); - touchstartHandler(e); - }); - r.registerBinding(r.container, 'pointerup', function (e) { - if (pointerIsMouse(e)) { - return; - } // mouse already handled - - removePointer(e); - addTouchesToEvent(e); - touchendHandler(e); - }); - r.registerBinding(r.container, 'pointercancel', function (e) { - if (pointerIsMouse(e)) { - return; - } // mouse already handled - - removePointer(e); - addTouchesToEvent(e); - touchcancelHandler(e); - }); - r.registerBinding(r.container, 'pointermove', function (e) { - if (pointerIsMouse(e)) { - return; - } // mouse already handled - - e.preventDefault(); - updatePointer(e); - addTouchesToEvent(e); - touchmoveHandler(e); - }); - } -}; - -var BRp$2 = {}; -BRp$2.generatePolygon = function (name, points) { - return this.nodeShapes[name] = { - renderer: this, - name: name, - points: points, - draw: function draw(context, centerX, centerY, width, height, cornerRadius) { - this.renderer.nodeShapeImpl('polygon', context, centerX, centerY, width, height, this.points); - }, - intersectLine: function intersectLine(nodeX, nodeY, width, height, x, y, padding, cornerRadius) { - return polygonIntersectLine(x, y, this.points, nodeX, nodeY, width / 2, height / 2, padding); - }, - checkPoint: function checkPoint(x, y, padding, width, height, centerX, centerY, cornerRadius) { - return pointInsidePolygon(x, y, this.points, centerX, centerY, width, height, [0, -1], padding); - } - }; -}; -BRp$2.generateEllipse = function () { - return this.nodeShapes['ellipse'] = { - renderer: this, - name: 'ellipse', - draw: function draw(context, centerX, centerY, width, height, cornerRadius) { - this.renderer.nodeShapeImpl(this.name, context, centerX, centerY, width, height); - }, - intersectLine: function intersectLine(nodeX, nodeY, width, height, x, y, padding, cornerRadius) { - return intersectLineEllipse(x, y, nodeX, nodeY, width / 2 + padding, height / 2 + padding); - }, - checkPoint: function checkPoint(x, y, padding, width, height, centerX, centerY, cornerRadius) { - return checkInEllipse(x, y, width, height, centerX, centerY, padding); - } - }; -}; -BRp$2.generateRoundPolygon = function (name, points) { - return this.nodeShapes[name] = { - renderer: this, - name: name, - points: points, - getOrCreateCorners: function getOrCreateCorners(centerX, centerY, width, height, cornerRadius, rs, field) { - if (rs[field] !== undefined && rs[field + '-cx'] === centerX && rs[field + '-cy'] === centerY) { - return rs[field]; - } - rs[field] = new Array(points.length / 2); - rs[field + '-cx'] = centerX; - rs[field + '-cy'] = centerY; - var halfW = width / 2; - var halfH = height / 2; - cornerRadius = cornerRadius === 'auto' ? getRoundPolygonRadius(width, height) : cornerRadius; - var p = new Array(points.length / 2); - for (var _i = 0; _i < points.length / 2; _i++) { - p[_i] = { - x: centerX + halfW * points[_i * 2], - y: centerY + halfH * points[_i * 2 + 1] - }; - } - var i, - p1, - p2, - p3, - len = p.length; - p1 = p[len - 1]; - // for each point - for (i = 0; i < len; i++) { - p2 = p[i % len]; - p3 = p[(i + 1) % len]; - rs[field][i] = getRoundCorner(p1, p2, p3, cornerRadius); - p1 = p2; - p2 = p3; - } - return rs[field]; - }, - draw: function draw(context, centerX, centerY, width, height, cornerRadius, rs) { - this.renderer.nodeShapeImpl('round-polygon', context, centerX, centerY, width, height, this.points, this.getOrCreateCorners(centerX, centerY, width, height, cornerRadius, rs, 'drawCorners')); - }, - intersectLine: function intersectLine(nodeX, nodeY, width, height, x, y, padding, cornerRadius, rs) { - return roundPolygonIntersectLine(x, y, this.points, nodeX, nodeY, width, height, padding, this.getOrCreateCorners(nodeX, nodeY, width, height, cornerRadius, rs, 'corners')); - }, - checkPoint: function checkPoint(x, y, padding, width, height, centerX, centerY, cornerRadius, rs) { - return pointInsideRoundPolygon(x, y, this.points, centerX, centerY, width, height, this.getOrCreateCorners(centerX, centerY, width, height, cornerRadius, rs, 'corners')); - } - }; -}; -BRp$2.generateRoundRectangle = function () { - return this.nodeShapes['round-rectangle'] = this.nodeShapes['roundrectangle'] = { - renderer: this, - name: 'round-rectangle', - points: generateUnitNgonPointsFitToSquare(4, 0), - draw: function draw(context, centerX, centerY, width, height, cornerRadius) { - this.renderer.nodeShapeImpl(this.name, context, centerX, centerY, width, height, this.points, cornerRadius); - }, - intersectLine: function intersectLine(nodeX, nodeY, width, height, x, y, padding, cornerRadius) { - return roundRectangleIntersectLine(x, y, nodeX, nodeY, width, height, padding, cornerRadius); - }, - checkPoint: function checkPoint(x, y, padding, width, height, centerX, centerY, cornerRadius) { - var halfWidth = width / 2; - var halfHeight = height / 2; - cornerRadius = cornerRadius === 'auto' ? getRoundRectangleRadius(width, height) : cornerRadius; - cornerRadius = Math.min(halfWidth, halfHeight, cornerRadius); - var diam = cornerRadius * 2; - - // Check hBox - if (pointInsidePolygon(x, y, this.points, centerX, centerY, width, height - diam, [0, -1], padding)) { - return true; - } - - // Check vBox - if (pointInsidePolygon(x, y, this.points, centerX, centerY, width - diam, height, [0, -1], padding)) { - return true; - } - - // Check top left quarter circle - if (checkInEllipse(x, y, diam, diam, centerX - halfWidth + cornerRadius, centerY - halfHeight + cornerRadius, padding)) { - return true; - } - - // Check top right quarter circle - if (checkInEllipse(x, y, diam, diam, centerX + halfWidth - cornerRadius, centerY - halfHeight + cornerRadius, padding)) { - return true; - } - - // Check bottom right quarter circle - if (checkInEllipse(x, y, diam, diam, centerX + halfWidth - cornerRadius, centerY + halfHeight - cornerRadius, padding)) { - return true; - } - - // Check bottom left quarter circle - if (checkInEllipse(x, y, diam, diam, centerX - halfWidth + cornerRadius, centerY + halfHeight - cornerRadius, padding)) { - return true; - } - return false; - } - }; -}; -BRp$2.generateCutRectangle = function () { - return this.nodeShapes['cut-rectangle'] = this.nodeShapes['cutrectangle'] = { - renderer: this, - name: 'cut-rectangle', - cornerLength: getCutRectangleCornerLength(), - points: generateUnitNgonPointsFitToSquare(4, 0), - draw: function draw(context, centerX, centerY, width, height, cornerRadius) { - this.renderer.nodeShapeImpl(this.name, context, centerX, centerY, width, height, null, cornerRadius); - }, - generateCutTrianglePts: function generateCutTrianglePts(width, height, centerX, centerY, cornerRadius) { - var cl = cornerRadius === 'auto' ? this.cornerLength : cornerRadius; - var hh = height / 2; - var hw = width / 2; - var xBegin = centerX - hw; - var xEnd = centerX + hw; - var yBegin = centerY - hh; - var yEnd = centerY + hh; - - // points are in clockwise order, inner (imaginary) triangle pt on [4, 5] - return { - topLeft: [xBegin, yBegin + cl, xBegin + cl, yBegin, xBegin + cl, yBegin + cl], - topRight: [xEnd - cl, yBegin, xEnd, yBegin + cl, xEnd - cl, yBegin + cl], - bottomRight: [xEnd, yEnd - cl, xEnd - cl, yEnd, xEnd - cl, yEnd - cl], - bottomLeft: [xBegin + cl, yEnd, xBegin, yEnd - cl, xBegin + cl, yEnd - cl] - }; - }, - intersectLine: function intersectLine(nodeX, nodeY, width, height, x, y, padding, cornerRadius) { - var cPts = this.generateCutTrianglePts(width + 2 * padding, height + 2 * padding, nodeX, nodeY, cornerRadius); - var pts = [].concat.apply([], [cPts.topLeft.splice(0, 4), cPts.topRight.splice(0, 4), cPts.bottomRight.splice(0, 4), cPts.bottomLeft.splice(0, 4)]); - return polygonIntersectLine(x, y, pts, nodeX, nodeY); - }, - checkPoint: function checkPoint(x, y, padding, width, height, centerX, centerY, cornerRadius) { - var cl = cornerRadius === 'auto' ? this.cornerLength : cornerRadius; - // Check hBox - if (pointInsidePolygon(x, y, this.points, centerX, centerY, width, height - 2 * cl, [0, -1], padding)) { - return true; - } - - // Check vBox - if (pointInsidePolygon(x, y, this.points, centerX, centerY, width - 2 * cl, height, [0, -1], padding)) { - return true; - } - var cutTrianglePts = this.generateCutTrianglePts(width, height, centerX, centerY); - return pointInsidePolygonPoints(x, y, cutTrianglePts.topLeft) || pointInsidePolygonPoints(x, y, cutTrianglePts.topRight) || pointInsidePolygonPoints(x, y, cutTrianglePts.bottomRight) || pointInsidePolygonPoints(x, y, cutTrianglePts.bottomLeft); - } - }; -}; -BRp$2.generateBarrel = function () { - return this.nodeShapes['barrel'] = { - renderer: this, - name: 'barrel', - points: generateUnitNgonPointsFitToSquare(4, 0), - draw: function draw(context, centerX, centerY, width, height, cornerRadius) { - this.renderer.nodeShapeImpl(this.name, context, centerX, centerY, width, height); - }, - intersectLine: function intersectLine(nodeX, nodeY, width, height, x, y, padding, cornerRadius) { - // use two fixed t values for the bezier curve approximation - - var t0 = 0.15; - var t1 = 0.5; - var t2 = 0.85; - var bPts = this.generateBarrelBezierPts(width + 2 * padding, height + 2 * padding, nodeX, nodeY); - var approximateBarrelCurvePts = function approximateBarrelCurvePts(pts) { - // approximate curve pts based on the two t values - var m0 = qbezierPtAt({ - x: pts[0], - y: pts[1] - }, { - x: pts[2], - y: pts[3] - }, { - x: pts[4], - y: pts[5] - }, t0); - var m1 = qbezierPtAt({ - x: pts[0], - y: pts[1] - }, { - x: pts[2], - y: pts[3] - }, { - x: pts[4], - y: pts[5] - }, t1); - var m2 = qbezierPtAt({ - x: pts[0], - y: pts[1] - }, { - x: pts[2], - y: pts[3] - }, { - x: pts[4], - y: pts[5] - }, t2); - return [pts[0], pts[1], m0.x, m0.y, m1.x, m1.y, m2.x, m2.y, pts[4], pts[5]]; - }; - var pts = [].concat(approximateBarrelCurvePts(bPts.topLeft), approximateBarrelCurvePts(bPts.topRight), approximateBarrelCurvePts(bPts.bottomRight), approximateBarrelCurvePts(bPts.bottomLeft)); - return polygonIntersectLine(x, y, pts, nodeX, nodeY); - }, - generateBarrelBezierPts: function generateBarrelBezierPts(width, height, centerX, centerY) { - var hh = height / 2; - var hw = width / 2; - var xBegin = centerX - hw; - var xEnd = centerX + hw; - var yBegin = centerY - hh; - var yEnd = centerY + hh; - var curveConstants = getBarrelCurveConstants(width, height); - var hOffset = curveConstants.heightOffset; - var wOffset = curveConstants.widthOffset; - var ctrlPtXOffset = curveConstants.ctrlPtOffsetPct * width; - - // points are in clockwise order, inner (imaginary) control pt on [4, 5] - var pts = { - topLeft: [xBegin, yBegin + hOffset, xBegin + ctrlPtXOffset, yBegin, xBegin + wOffset, yBegin], - topRight: [xEnd - wOffset, yBegin, xEnd - ctrlPtXOffset, yBegin, xEnd, yBegin + hOffset], - bottomRight: [xEnd, yEnd - hOffset, xEnd - ctrlPtXOffset, yEnd, xEnd - wOffset, yEnd], - bottomLeft: [xBegin + wOffset, yEnd, xBegin + ctrlPtXOffset, yEnd, xBegin, yEnd - hOffset] - }; - pts.topLeft.isTop = true; - pts.topRight.isTop = true; - pts.bottomLeft.isBottom = true; - pts.bottomRight.isBottom = true; - return pts; - }, - checkPoint: function checkPoint(x, y, padding, width, height, centerX, centerY, cornerRadius) { - var curveConstants = getBarrelCurveConstants(width, height); - var hOffset = curveConstants.heightOffset; - var wOffset = curveConstants.widthOffset; - - // Check hBox - if (pointInsidePolygon(x, y, this.points, centerX, centerY, width, height - 2 * hOffset, [0, -1], padding)) { - return true; - } - - // Check vBox - if (pointInsidePolygon(x, y, this.points, centerX, centerY, width - 2 * wOffset, height, [0, -1], padding)) { - return true; - } - var barrelCurvePts = this.generateBarrelBezierPts(width, height, centerX, centerY); - var getCurveT = function getCurveT(x, y, curvePts) { - var x0 = curvePts[4]; - var x1 = curvePts[2]; - var x2 = curvePts[0]; - var y0 = curvePts[5]; - // var y1 = curvePts[ 3 ]; - var y2 = curvePts[1]; - var xMin = Math.min(x0, x2); - var xMax = Math.max(x0, x2); - var yMin = Math.min(y0, y2); - var yMax = Math.max(y0, y2); - if (xMin <= x && x <= xMax && yMin <= y && y <= yMax) { - var coeff = bezierPtsToQuadCoeff(x0, x1, x2); - var roots = solveQuadratic(coeff[0], coeff[1], coeff[2], x); - var validRoots = roots.filter(function (r) { - return 0 <= r && r <= 1; - }); - if (validRoots.length > 0) { - return validRoots[0]; - } - } - return null; - }; - var curveRegions = Object.keys(barrelCurvePts); - for (var i = 0; i < curveRegions.length; i++) { - var corner = curveRegions[i]; - var cornerPts = barrelCurvePts[corner]; - var t = getCurveT(x, y, cornerPts); - if (t == null) { - continue; - } - var y0 = cornerPts[5]; - var y1 = cornerPts[3]; - var y2 = cornerPts[1]; - var bezY = qbezierAt(y0, y1, y2, t); - if (cornerPts.isTop && bezY <= y) { - return true; - } - if (cornerPts.isBottom && y <= bezY) { - return true; - } - } - return false; - } - }; -}; -BRp$2.generateBottomRoundrectangle = function () { - return this.nodeShapes['bottom-round-rectangle'] = this.nodeShapes['bottomroundrectangle'] = { - renderer: this, - name: 'bottom-round-rectangle', - points: generateUnitNgonPointsFitToSquare(4, 0), - draw: function draw(context, centerX, centerY, width, height, cornerRadius) { - this.renderer.nodeShapeImpl(this.name, context, centerX, centerY, width, height, this.points, cornerRadius); - }, - intersectLine: function intersectLine(nodeX, nodeY, width, height, x, y, padding, cornerRadius) { - var topStartX = nodeX - (width / 2 + padding); - var topStartY = nodeY - (height / 2 + padding); - var topEndY = topStartY; - var topEndX = nodeX + (width / 2 + padding); - var topIntersections = finiteLinesIntersect(x, y, nodeX, nodeY, topStartX, topStartY, topEndX, topEndY, false); - if (topIntersections.length > 0) { - return topIntersections; - } - return roundRectangleIntersectLine(x, y, nodeX, nodeY, width, height, padding, cornerRadius); - }, - checkPoint: function checkPoint(x, y, padding, width, height, centerX, centerY, cornerRadius) { - cornerRadius = cornerRadius === 'auto' ? getRoundRectangleRadius(width, height) : cornerRadius; - var diam = 2 * cornerRadius; - - // Check hBox - if (pointInsidePolygon(x, y, this.points, centerX, centerY, width, height - diam, [0, -1], padding)) { - return true; - } - - // Check vBox - if (pointInsidePolygon(x, y, this.points, centerX, centerY, width - diam, height, [0, -1], padding)) { - return true; - } - - // check non-rounded top side - var outerWidth = width / 2 + 2 * padding; - var outerHeight = height / 2 + 2 * padding; - var points = [centerX - outerWidth, centerY - outerHeight, centerX - outerWidth, centerY, centerX + outerWidth, centerY, centerX + outerWidth, centerY - outerHeight]; - if (pointInsidePolygonPoints(x, y, points)) { - return true; - } - - // Check bottom right quarter circle - if (checkInEllipse(x, y, diam, diam, centerX + width / 2 - cornerRadius, centerY + height / 2 - cornerRadius, padding)) { - return true; - } - - // Check bottom left quarter circle - if (checkInEllipse(x, y, diam, diam, centerX - width / 2 + cornerRadius, centerY + height / 2 - cornerRadius, padding)) { - return true; - } - return false; - } - }; -}; -BRp$2.registerNodeShapes = function () { - var nodeShapes = this.nodeShapes = {}; - var renderer = this; - this.generateEllipse(); - this.generatePolygon('triangle', generateUnitNgonPointsFitToSquare(3, 0)); - this.generateRoundPolygon('round-triangle', generateUnitNgonPointsFitToSquare(3, 0)); - this.generatePolygon('rectangle', generateUnitNgonPointsFitToSquare(4, 0)); - nodeShapes['square'] = nodeShapes['rectangle']; - this.generateRoundRectangle(); - this.generateCutRectangle(); - this.generateBarrel(); - this.generateBottomRoundrectangle(); - { - var diamondPoints = [0, 1, 1, 0, 0, -1, -1, 0]; - this.generatePolygon('diamond', diamondPoints); - this.generateRoundPolygon('round-diamond', diamondPoints); - } - this.generatePolygon('pentagon', generateUnitNgonPointsFitToSquare(5, 0)); - this.generateRoundPolygon('round-pentagon', generateUnitNgonPointsFitToSquare(5, 0)); - this.generatePolygon('hexagon', generateUnitNgonPointsFitToSquare(6, 0)); - this.generateRoundPolygon('round-hexagon', generateUnitNgonPointsFitToSquare(6, 0)); - this.generatePolygon('heptagon', generateUnitNgonPointsFitToSquare(7, 0)); - this.generateRoundPolygon('round-heptagon', generateUnitNgonPointsFitToSquare(7, 0)); - this.generatePolygon('octagon', generateUnitNgonPointsFitToSquare(8, 0)); - this.generateRoundPolygon('round-octagon', generateUnitNgonPointsFitToSquare(8, 0)); - var star5Points = new Array(20); - { - var outerPoints = generateUnitNgonPoints(5, 0); - var innerPoints = generateUnitNgonPoints(5, Math.PI / 5); - - // Outer radius is 1; inner radius of star is smaller - var innerRadius = 0.5 * (3 - Math.sqrt(5)); - innerRadius *= 1.57; - for (var i = 0; i < innerPoints.length / 2; i++) { - innerPoints[i * 2] *= innerRadius; - innerPoints[i * 2 + 1] *= innerRadius; - } - for (var i = 0; i < 20 / 4; i++) { - star5Points[i * 4] = outerPoints[i * 2]; - star5Points[i * 4 + 1] = outerPoints[i * 2 + 1]; - star5Points[i * 4 + 2] = innerPoints[i * 2]; - star5Points[i * 4 + 3] = innerPoints[i * 2 + 1]; - } - } - star5Points = fitPolygonToSquare(star5Points); - this.generatePolygon('star', star5Points); - this.generatePolygon('vee', [-1, -1, 0, -0.333, 1, -1, 0, 1]); - this.generatePolygon('rhomboid', [-1, -1, 0.333, -1, 1, 1, -0.333, 1]); - this.generatePolygon('right-rhomboid', [-0.333, -1, 1, -1, 0.333, 1, -1, 1]); - this.nodeShapes['concavehexagon'] = this.generatePolygon('concave-hexagon', [-1, -0.95, -0.75, 0, -1, 0.95, 1, 0.95, 0.75, 0, 1, -0.95]); - { - var tagPoints = [-1, -1, 0.25, -1, 1, 0, 0.25, 1, -1, 1]; - this.generatePolygon('tag', tagPoints); - this.generateRoundPolygon('round-tag', tagPoints); - } - nodeShapes.makePolygon = function (points) { - // use caching on user-specified polygons so they are as fast as native shapes - - var key = points.join('$'); - var name = 'polygon-' + key; - var shape; - if (shape = this[name]) { - // got cached shape - return shape; - } - - // create and cache new shape - return renderer.generatePolygon(name, points); - }; -}; - -var BRp$1 = {}; -BRp$1.timeToRender = function () { - return this.redrawTotalTime / this.redrawCount; -}; -BRp$1.redraw = function (options) { - options = options || staticEmptyObject(); - var r = this; - if (r.averageRedrawTime === undefined) { - r.averageRedrawTime = 0; - } - if (r.lastRedrawTime === undefined) { - r.lastRedrawTime = 0; - } - if (r.lastDrawTime === undefined) { - r.lastDrawTime = 0; - } - r.requestedFrame = true; - r.renderOptions = options; -}; -BRp$1.beforeRender = function (fn, priority) { - // the renderer can't add tick callbacks when destroyed - if (this.destroyed) { - return; - } - if (priority == null) { - error('Priority is not optional for beforeRender'); - } - var cbs = this.beforeRenderCallbacks; - cbs.push({ - fn: fn, - priority: priority - }); - - // higher priority callbacks executed first - cbs.sort(function (a, b) { - return b.priority - a.priority; - }); -}; -var beforeRenderCallbacks = function beforeRenderCallbacks(r, willDraw, startTime) { - var cbs = r.beforeRenderCallbacks; - for (var i = 0; i < cbs.length; i++) { - cbs[i].fn(willDraw, startTime); - } -}; -BRp$1.startRenderLoop = function () { - var r = this; - var cy = r.cy; - if (r.renderLoopStarted) { - return; - } else { - r.renderLoopStarted = true; - } - var renderFn = function renderFn(requestTime) { - if (r.destroyed) { - return; - } - if (cy.batching()) ; else if (r.requestedFrame && !r.skipFrame) { - beforeRenderCallbacks(r, true, requestTime); - var startTime = performanceNow(); - r.render(r.renderOptions); - var endTime = r.lastDrawTime = performanceNow(); - if (r.averageRedrawTime === undefined) { - r.averageRedrawTime = endTime - startTime; - } - if (r.redrawCount === undefined) { - r.redrawCount = 0; - } - r.redrawCount++; - if (r.redrawTotalTime === undefined) { - r.redrawTotalTime = 0; - } - var duration = endTime - startTime; - r.redrawTotalTime += duration; - r.lastRedrawTime = duration; - - // use a weighted average with a bias from the previous average so we don't spike so easily - r.averageRedrawTime = r.averageRedrawTime / 2 + duration / 2; - r.requestedFrame = false; - } else { - beforeRenderCallbacks(r, false, requestTime); - } - r.skipFrame = false; - requestAnimationFrame(renderFn); - }; - requestAnimationFrame(renderFn); -}; - -var BaseRenderer = function BaseRenderer(options) { - this.init(options); -}; -var BR = BaseRenderer; -var BRp = BR.prototype; -BRp.clientFunctions = ['redrawHint', 'render', 'renderTo', 'matchCanvasSize', 'nodeShapeImpl', 'arrowShapeImpl']; -BRp.init = function (options) { - var r = this; - r.options = options; - r.cy = options.cy; - var ctr = r.container = options.cy.container(); - var containerWindow = r.cy.window(); - - // prepend a stylesheet in the head such that - if (containerWindow) { - var document = containerWindow.document; - var head = document.head; - var stylesheetId = '__________cytoscape_stylesheet'; - var className = '__________cytoscape_container'; - var stylesheetAlreadyExists = document.getElementById(stylesheetId) != null; - if (ctr.className.indexOf(className) < 0) { - ctr.className = (ctr.className || '') + ' ' + className; - } - if (!stylesheetAlreadyExists) { - var stylesheet = document.createElement('style'); - stylesheet.id = stylesheetId; - stylesheet.textContent = '.' + className + ' { position: relative; }'; - head.insertBefore(stylesheet, head.children[0]); // first so lowest priority - } - - var computedStyle = containerWindow.getComputedStyle(ctr); - var position = computedStyle.getPropertyValue('position'); - if (position === 'static') { - warn('A Cytoscape container has style position:static and so can not use UI extensions properly'); - } - } - r.selection = [undefined, undefined, undefined, undefined, 0]; // Coordinates for selection box, plus enabled flag - - r.bezierProjPcts = [0.05, 0.225, 0.4, 0.5, 0.6, 0.775, 0.95]; - - //--Pointer-related data - r.hoverData = { - down: null, - last: null, - downTime: null, - triggerMode: null, - dragging: false, - initialPan: [null, null], - capture: false - }; - r.dragData = { - possibleDragElements: [] - }; - r.touchData = { - start: null, - capture: false, - // These 3 fields related to tap, taphold events - startPosition: [null, null, null, null, null, null], - singleTouchStartTime: null, - singleTouchMoved: true, - now: [null, null, null, null, null, null], - earlier: [null, null, null, null, null, null] - }; - r.redraws = 0; - r.showFps = options.showFps; - r.debug = options.debug; - r.hideEdgesOnViewport = options.hideEdgesOnViewport; - r.textureOnViewport = options.textureOnViewport; - r.wheelSensitivity = options.wheelSensitivity; - r.motionBlurEnabled = options.motionBlur; // on by default - r.forcedPixelRatio = number$1(options.pixelRatio) ? options.pixelRatio : null; - r.motionBlur = options.motionBlur; // for initial kick off - r.motionBlurOpacity = options.motionBlurOpacity; - r.motionBlurTransparency = 1 - r.motionBlurOpacity; - r.motionBlurPxRatio = 1; - r.mbPxRBlurry = 1; //0.8; - r.minMbLowQualFrames = 4; - r.fullQualityMb = false; - r.clearedForMotionBlur = []; - r.desktopTapThreshold = options.desktopTapThreshold; - r.desktopTapThreshold2 = options.desktopTapThreshold * options.desktopTapThreshold; - r.touchTapThreshold = options.touchTapThreshold; - r.touchTapThreshold2 = options.touchTapThreshold * options.touchTapThreshold; - r.tapholdDuration = 500; - r.bindings = []; - r.beforeRenderCallbacks = []; - r.beforeRenderPriorities = { - // higher priority execs before lower one - animations: 400, - eleCalcs: 300, - eleTxrDeq: 200, - lyrTxrDeq: 150, - lyrTxrSkip: 100 - }; - r.registerNodeShapes(); - r.registerArrowShapes(); - r.registerCalculationListeners(); -}; -BRp.notify = function (eventName, eles) { - var r = this; - var cy = r.cy; - - // the renderer can't be notified after it's destroyed - if (this.destroyed) { - return; - } - if (eventName === 'init') { - r.load(); - return; - } - if (eventName === 'destroy') { - r.destroy(); - return; - } - if (eventName === 'add' || eventName === 'remove' || eventName === 'move' && cy.hasCompoundNodes() || eventName === 'load' || eventName === 'zorder' || eventName === 'mount') { - r.invalidateCachedZSortedEles(); - } - if (eventName === 'viewport') { - r.redrawHint('select', true); - } - if (eventName === 'load' || eventName === 'resize' || eventName === 'mount') { - r.invalidateContainerClientCoordsCache(); - r.matchCanvasSize(r.container); - } - r.redrawHint('eles', true); - r.redrawHint('drag', true); - this.startRenderLoop(); - this.redraw(); -}; -BRp.destroy = function () { - var r = this; - r.destroyed = true; - r.cy.stopAnimationLoop(); - for (var i = 0; i < r.bindings.length; i++) { - var binding = r.bindings[i]; - var b = binding; - var tgt = b.target; - (tgt.off || tgt.removeEventListener).apply(tgt, b.args); - } - r.bindings = []; - r.beforeRenderCallbacks = []; - r.onUpdateEleCalcsFns = []; - if (r.removeObserver) { - r.removeObserver.disconnect(); - } - if (r.styleObserver) { - r.styleObserver.disconnect(); - } - if (r.resizeObserver) { - r.resizeObserver.disconnect(); - } - if (r.labelCalcDiv) { - try { - document.body.removeChild(r.labelCalcDiv); // eslint-disable-line no-undef - } catch (e) { - // ie10 issue #1014 - } - } -}; -BRp.isHeadless = function () { - return false; -}; -[BRp$f, BRp$5, BRp$4, BRp$3, BRp$2, BRp$1].forEach(function (props) { - extend(BRp, props); -}); - -var fullFpsTime = 1000 / 60; // assume 60 frames per second - -var defs = { - setupDequeueing: function setupDequeueing(opts) { - return function setupDequeueingImpl() { - var self = this; - var r = this.renderer; - if (self.dequeueingSetup) { - return; - } else { - self.dequeueingSetup = true; - } - var queueRedraw = debounce_1(function () { - r.redrawHint('eles', true); - r.redrawHint('drag', true); - r.redraw(); - }, opts.deqRedrawThreshold); - var dequeue = function dequeue(willDraw, frameStartTime) { - var startTime = performanceNow(); - var avgRenderTime = r.averageRedrawTime; - var renderTime = r.lastRedrawTime; - var deqd = []; - var extent = r.cy.extent(); - var pixelRatio = r.getPixelRatio(); - - // if we aren't in a tick that causes a draw, then the rendered style - // queue won't automatically be flushed before dequeueing starts - if (!willDraw) { - r.flushRenderedStyleQueue(); - } - while (true) { - // eslint-disable-line no-constant-condition - var now = performanceNow(); - var duration = now - startTime; - var frameDuration = now - frameStartTime; - if (renderTime < fullFpsTime) { - // if we're rendering faster than the ideal fps, then do dequeueing - // during all of the remaining frame time - - var timeAvailable = fullFpsTime - (willDraw ? avgRenderTime : 0); - if (frameDuration >= opts.deqFastCost * timeAvailable) { - break; - } - } else { - if (willDraw) { - if (duration >= opts.deqCost * renderTime || duration >= opts.deqAvgCost * avgRenderTime) { - break; - } - } else if (frameDuration >= opts.deqNoDrawCost * fullFpsTime) { - break; - } - } - var thisDeqd = opts.deq(self, pixelRatio, extent); - if (thisDeqd.length > 0) { - for (var i = 0; i < thisDeqd.length; i++) { - deqd.push(thisDeqd[i]); - } - } else { - break; - } - } - - // callbacks on dequeue - if (deqd.length > 0) { - opts.onDeqd(self, deqd); - if (!willDraw && opts.shouldRedraw(self, deqd, pixelRatio, extent)) { - queueRedraw(); - } - } - }; - var priority = opts.priority || noop$1; - r.beforeRender(dequeue, priority(self)); - }; - } -}; - -// Allows lookups for (ele, lvl) => cache. -// Uses keys so elements may share the same cache. -var ElementTextureCacheLookup = /*#__PURE__*/function () { - function ElementTextureCacheLookup(getKey) { - var doesEleInvalidateKey = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : falsify; - _classCallCheck(this, ElementTextureCacheLookup); - this.idsByKey = new Map$2(); - this.keyForId = new Map$2(); - this.cachesByLvl = new Map$2(); - this.lvls = []; - this.getKey = getKey; - this.doesEleInvalidateKey = doesEleInvalidateKey; - } - _createClass(ElementTextureCacheLookup, [{ - key: "getIdsFor", - value: function getIdsFor(key) { - if (key == null) { - error("Can not get id list for null key"); - } - var idsByKey = this.idsByKey; - var ids = this.idsByKey.get(key); - if (!ids) { - ids = new Set$1(); - idsByKey.set(key, ids); - } - return ids; - } - }, { - key: "addIdForKey", - value: function addIdForKey(key, id) { - if (key != null) { - this.getIdsFor(key).add(id); - } - } - }, { - key: "deleteIdForKey", - value: function deleteIdForKey(key, id) { - if (key != null) { - this.getIdsFor(key)["delete"](id); - } - } - }, { - key: "getNumberOfIdsForKey", - value: function getNumberOfIdsForKey(key) { - if (key == null) { - return 0; - } else { - return this.getIdsFor(key).size; - } - } - }, { - key: "updateKeyMappingFor", - value: function updateKeyMappingFor(ele) { - var id = ele.id(); - var prevKey = this.keyForId.get(id); - var currKey = this.getKey(ele); - this.deleteIdForKey(prevKey, id); - this.addIdForKey(currKey, id); - this.keyForId.set(id, currKey); - } - }, { - key: "deleteKeyMappingFor", - value: function deleteKeyMappingFor(ele) { - var id = ele.id(); - var prevKey = this.keyForId.get(id); - this.deleteIdForKey(prevKey, id); - this.keyForId["delete"](id); - } - }, { - key: "keyHasChangedFor", - value: function keyHasChangedFor(ele) { - var id = ele.id(); - var prevKey = this.keyForId.get(id); - var newKey = this.getKey(ele); - return prevKey !== newKey; - } - }, { - key: "isInvalid", - value: function isInvalid(ele) { - return this.keyHasChangedFor(ele) || this.doesEleInvalidateKey(ele); - } - }, { - key: "getCachesAt", - value: function getCachesAt(lvl) { - var cachesByLvl = this.cachesByLvl, - lvls = this.lvls; - var caches = cachesByLvl.get(lvl); - if (!caches) { - caches = new Map$2(); - cachesByLvl.set(lvl, caches); - lvls.push(lvl); - } - return caches; - } - }, { - key: "getCache", - value: function getCache(key, lvl) { - return this.getCachesAt(lvl).get(key); - } - }, { - key: "get", - value: function get(ele, lvl) { - var key = this.getKey(ele); - var cache = this.getCache(key, lvl); - - // getting for an element may need to add to the id list b/c eles can share keys - if (cache != null) { - this.updateKeyMappingFor(ele); - } - return cache; - } - }, { - key: "getForCachedKey", - value: function getForCachedKey(ele, lvl) { - var key = this.keyForId.get(ele.id()); // n.b. use cached key, not newly computed key - var cache = this.getCache(key, lvl); - return cache; - } - }, { - key: "hasCache", - value: function hasCache(key, lvl) { - return this.getCachesAt(lvl).has(key); - } - }, { - key: "has", - value: function has(ele, lvl) { - var key = this.getKey(ele); - return this.hasCache(key, lvl); - } - }, { - key: "setCache", - value: function setCache(key, lvl, cache) { - cache.key = key; - this.getCachesAt(lvl).set(key, cache); - } - }, { - key: "set", - value: function set(ele, lvl, cache) { - var key = this.getKey(ele); - this.setCache(key, lvl, cache); - this.updateKeyMappingFor(ele); - } - }, { - key: "deleteCache", - value: function deleteCache(key, lvl) { - this.getCachesAt(lvl)["delete"](key); - } - }, { - key: "delete", - value: function _delete(ele, lvl) { - var key = this.getKey(ele); - this.deleteCache(key, lvl); - } - }, { - key: "invalidateKey", - value: function invalidateKey(key) { - var _this = this; - this.lvls.forEach(function (lvl) { - return _this.deleteCache(key, lvl); - }); - } - - // returns true if no other eles reference the invalidated cache (n.b. other eles may need the cache with the same key) - }, { - key: "invalidate", - value: function invalidate(ele) { - var id = ele.id(); - var key = this.keyForId.get(id); // n.b. use stored key rather than current (potential key) - - this.deleteKeyMappingFor(ele); - var entireKeyInvalidated = this.doesEleInvalidateKey(ele); - if (entireKeyInvalidated) { - // clear mapping for current key - this.invalidateKey(key); - } - return entireKeyInvalidated || this.getNumberOfIdsForKey(key) === 0; - } - }]); - return ElementTextureCacheLookup; -}(); - -var minTxrH = 25; // the size of the texture cache for small height eles (special case) -var txrStepH = 50; // the min size of the regular cache, and the size it increases with each step up -var minLvl$1 = -4; // when scaling smaller than that we don't need to re-render -var maxLvl$1 = 3; // when larger than this scale just render directly (caching is not helpful) -var maxZoom$1 = 7.99; // beyond this zoom level, layered textures are not used -var eleTxrSpacing = 8; // spacing between elements on textures to avoid blitting overlaps -var defTxrWidth = 1024; // default/minimum texture width -var maxTxrW = 1024; // the maximum width of a texture -var maxTxrH = 1024; // the maximum height of a texture -var minUtility = 0.2; // if usage of texture is less than this, it is retired -var maxFullness = 0.8; // fullness of texture after which queue removal is checked -var maxFullnessChecks = 10; // dequeued after this many checks -var deqCost$1 = 0.15; // % of add'l rendering cost allowed for dequeuing ele caches each frame -var deqAvgCost$1 = 0.1; // % of add'l rendering cost compared to average overall redraw time -var deqNoDrawCost$1 = 0.9; // % of avg frame time that can be used for dequeueing when not drawing -var deqFastCost$1 = 0.9; // % of frame time to be used when >60fps -var deqRedrawThreshold$1 = 100; // time to batch redraws together from dequeueing to allow more dequeueing calcs to happen in the meanwhile -var maxDeqSize$1 = 1; // number of eles to dequeue and render at higher texture in each batch - -var getTxrReasons = { - dequeue: 'dequeue', - downscale: 'downscale', - highQuality: 'highQuality' -}; -var initDefaults = defaults$g({ - getKey: null, - doesEleInvalidateKey: falsify, - drawElement: null, - getBoundingBox: null, - getRotationPoint: null, - getRotationOffset: null, - isVisible: trueify, - allowEdgeTxrCaching: true, - allowParentTxrCaching: true -}); -var ElementTextureCache = function ElementTextureCache(renderer, initOptions) { - var self = this; - self.renderer = renderer; - self.onDequeues = []; - var opts = initDefaults(initOptions); - extend(self, opts); - self.lookup = new ElementTextureCacheLookup(opts.getKey, opts.doesEleInvalidateKey); - self.setupDequeueing(); -}; -var ETCp = ElementTextureCache.prototype; -ETCp.reasons = getTxrReasons; - -// the list of textures in which new subtextures for elements can be placed -ETCp.getTextureQueue = function (txrH) { - var self = this; - self.eleImgCaches = self.eleImgCaches || {}; - return self.eleImgCaches[txrH] = self.eleImgCaches[txrH] || []; -}; - -// the list of usused textures which can be recycled (in use in texture queue) -ETCp.getRetiredTextureQueue = function (txrH) { - var self = this; - var rtxtrQs = self.eleImgCaches.retired = self.eleImgCaches.retired || {}; - var rtxtrQ = rtxtrQs[txrH] = rtxtrQs[txrH] || []; - return rtxtrQ; -}; - -// queue of element draw requests at different scale levels -ETCp.getElementQueue = function () { - var self = this; - var q = self.eleCacheQueue = self.eleCacheQueue || new heap(function (a, b) { - return b.reqs - a.reqs; - }); - return q; -}; - -// queue of element draw requests at different scale levels (element id lookup) -ETCp.getElementKeyToQueue = function () { - var self = this; - var k2q = self.eleKeyToCacheQueue = self.eleKeyToCacheQueue || {}; - return k2q; -}; -ETCp.getElement = function (ele, bb, pxRatio, lvl, reason) { - var self = this; - var r = this.renderer; - var zoom = r.cy.zoom(); - var lookup = this.lookup; - if (!bb || bb.w === 0 || bb.h === 0 || isNaN(bb.w) || isNaN(bb.h) || !ele.visible() || ele.removed()) { - return null; - } - if (!self.allowEdgeTxrCaching && ele.isEdge() || !self.allowParentTxrCaching && ele.isParent()) { - return null; - } - if (lvl == null) { - lvl = Math.ceil(log2(zoom * pxRatio)); - } - if (lvl < minLvl$1) { - lvl = minLvl$1; - } else if (zoom >= maxZoom$1 || lvl > maxLvl$1) { - return null; - } - var scale = Math.pow(2, lvl); - var eleScaledH = bb.h * scale; - var eleScaledW = bb.w * scale; - var scaledLabelShown = r.eleTextBiggerThanMin(ele, scale); - if (!this.isVisible(ele, scaledLabelShown)) { - return null; - } - var eleCache = lookup.get(ele, lvl); - - // if this get was on an unused/invalidated cache, then restore the texture usage metric - if (eleCache && eleCache.invalidated) { - eleCache.invalidated = false; - eleCache.texture.invalidatedWidth -= eleCache.width; - } - if (eleCache) { - return eleCache; - } - var txrH; // which texture height this ele belongs to - - if (eleScaledH <= minTxrH) { - txrH = minTxrH; - } else if (eleScaledH <= txrStepH) { - txrH = txrStepH; - } else { - txrH = Math.ceil(eleScaledH / txrStepH) * txrStepH; - } - if (eleScaledH > maxTxrH || eleScaledW > maxTxrW) { - return null; // caching large elements is not efficient - } - - var txrQ = self.getTextureQueue(txrH); - - // first try the second last one in case it has space at the end - var txr = txrQ[txrQ.length - 2]; - var addNewTxr = function addNewTxr() { - return self.recycleTexture(txrH, eleScaledW) || self.addTexture(txrH, eleScaledW); - }; - - // try the last one if there is no second last one - if (!txr) { - txr = txrQ[txrQ.length - 1]; - } - - // if the last one doesn't exist, we need a first one - if (!txr) { - txr = addNewTxr(); - } - - // if there's no room in the current texture, we need a new one - if (txr.width - txr.usedWidth < eleScaledW) { - txr = addNewTxr(); - } - var scalableFrom = function scalableFrom(otherCache) { - return otherCache && otherCache.scaledLabelShown === scaledLabelShown; - }; - var deqing = reason && reason === getTxrReasons.dequeue; - var highQualityReq = reason && reason === getTxrReasons.highQuality; - var downscaleReq = reason && reason === getTxrReasons.downscale; - var higherCache; // the nearest cache with a higher level - for (var l = lvl + 1; l <= maxLvl$1; l++) { - var c = lookup.get(ele, l); - if (c) { - higherCache = c; - break; - } - } - var oneUpCache = higherCache && higherCache.level === lvl + 1 ? higherCache : null; - var downscale = function downscale() { - txr.context.drawImage(oneUpCache.texture.canvas, oneUpCache.x, 0, oneUpCache.width, oneUpCache.height, txr.usedWidth, 0, eleScaledW, eleScaledH); - }; - - // reset ele area in texture - txr.context.setTransform(1, 0, 0, 1, 0, 0); - txr.context.clearRect(txr.usedWidth, 0, eleScaledW, txrH); - if (scalableFrom(oneUpCache)) { - // then we can relatively cheaply rescale the existing image w/o rerendering - downscale(); - } else if (scalableFrom(higherCache)) { - // then use the higher cache for now and queue the next level down - // to cheaply scale towards the smaller level - - if (highQualityReq) { - for (var _l = higherCache.level; _l > lvl; _l--) { - oneUpCache = self.getElement(ele, bb, pxRatio, _l, getTxrReasons.downscale); - } - downscale(); - } else { - self.queueElement(ele, higherCache.level - 1); - return higherCache; - } - } else { - var lowerCache; // the nearest cache with a lower level - if (!deqing && !highQualityReq && !downscaleReq) { - for (var _l2 = lvl - 1; _l2 >= minLvl$1; _l2--) { - var _c = lookup.get(ele, _l2); - if (_c) { - lowerCache = _c; - break; - } - } - } - if (scalableFrom(lowerCache)) { - // then use the lower quality cache for now and queue the better one for later - - self.queueElement(ele, lvl); - return lowerCache; - } - txr.context.translate(txr.usedWidth, 0); - txr.context.scale(scale, scale); - this.drawElement(txr.context, ele, bb, scaledLabelShown, false); - txr.context.scale(1 / scale, 1 / scale); - txr.context.translate(-txr.usedWidth, 0); - } - eleCache = { - x: txr.usedWidth, - texture: txr, - level: lvl, - scale: scale, - width: eleScaledW, - height: eleScaledH, - scaledLabelShown: scaledLabelShown - }; - txr.usedWidth += Math.ceil(eleScaledW + eleTxrSpacing); - txr.eleCaches.push(eleCache); - lookup.set(ele, lvl, eleCache); - self.checkTextureFullness(txr); - return eleCache; -}; -ETCp.invalidateElements = function (eles) { - for (var i = 0; i < eles.length; i++) { - this.invalidateElement(eles[i]); - } -}; -ETCp.invalidateElement = function (ele) { - var self = this; - var lookup = self.lookup; - var caches = []; - var invalid = lookup.isInvalid(ele); - if (!invalid) { - return; // override the invalidation request if the element key has not changed - } - - for (var lvl = minLvl$1; lvl <= maxLvl$1; lvl++) { - var cache = lookup.getForCachedKey(ele, lvl); - if (cache) { - caches.push(cache); - } - } - var noOtherElesUseCache = lookup.invalidate(ele); - if (noOtherElesUseCache) { - for (var i = 0; i < caches.length; i++) { - var _cache = caches[i]; - var txr = _cache.texture; - - // remove space from the texture it belongs to - txr.invalidatedWidth += _cache.width; - - // mark the cache as invalidated - _cache.invalidated = true; - - // retire the texture if its utility is low - self.checkTextureUtility(txr); - } - } - - // remove from queue since the old req was for the old state - self.removeFromQueue(ele); -}; -ETCp.checkTextureUtility = function (txr) { - // invalidate all entries in the cache if the cache size is small - if (txr.invalidatedWidth >= minUtility * txr.width) { - this.retireTexture(txr); - } -}; -ETCp.checkTextureFullness = function (txr) { - // if texture has been mostly filled and passed over several times, remove - // it from the queue so we don't need to waste time looking at it to put new things - - var self = this; - var txrQ = self.getTextureQueue(txr.height); - if (txr.usedWidth / txr.width > maxFullness && txr.fullnessChecks >= maxFullnessChecks) { - removeFromArray(txrQ, txr); - } else { - txr.fullnessChecks++; - } -}; -ETCp.retireTexture = function (txr) { - var self = this; - var txrH = txr.height; - var txrQ = self.getTextureQueue(txrH); - var lookup = this.lookup; - - // retire the texture from the active / searchable queue: - - removeFromArray(txrQ, txr); - txr.retired = true; - - // remove the refs from the eles to the caches: - - var eleCaches = txr.eleCaches; - for (var i = 0; i < eleCaches.length; i++) { - var eleCache = eleCaches[i]; - lookup.deleteCache(eleCache.key, eleCache.level); - } - clearArray(eleCaches); - - // add the texture to a retired queue so it can be recycled in future: - - var rtxtrQ = self.getRetiredTextureQueue(txrH); - rtxtrQ.push(txr); -}; -ETCp.addTexture = function (txrH, minW) { - var self = this; - var txrQ = self.getTextureQueue(txrH); - var txr = {}; - txrQ.push(txr); - txr.eleCaches = []; - txr.height = txrH; - txr.width = Math.max(defTxrWidth, minW); - txr.usedWidth = 0; - txr.invalidatedWidth = 0; - txr.fullnessChecks = 0; - txr.canvas = self.renderer.makeOffscreenCanvas(txr.width, txr.height); - txr.context = txr.canvas.getContext('2d'); - return txr; -}; -ETCp.recycleTexture = function (txrH, minW) { - var self = this; - var txrQ = self.getTextureQueue(txrH); - var rtxtrQ = self.getRetiredTextureQueue(txrH); - for (var i = 0; i < rtxtrQ.length; i++) { - var txr = rtxtrQ[i]; - if (txr.width >= minW) { - txr.retired = false; - txr.usedWidth = 0; - txr.invalidatedWidth = 0; - txr.fullnessChecks = 0; - clearArray(txr.eleCaches); - txr.context.setTransform(1, 0, 0, 1, 0, 0); - txr.context.clearRect(0, 0, txr.width, txr.height); - removeFromArray(rtxtrQ, txr); - txrQ.push(txr); - return txr; - } - } -}; -ETCp.queueElement = function (ele, lvl) { - var self = this; - var q = self.getElementQueue(); - var k2q = self.getElementKeyToQueue(); - var key = this.getKey(ele); - var existingReq = k2q[key]; - if (existingReq) { - // use the max lvl b/c in between lvls are cheap to make - existingReq.level = Math.max(existingReq.level, lvl); - existingReq.eles.merge(ele); - existingReq.reqs++; - q.updateItem(existingReq); - } else { - var req = { - eles: ele.spawn().merge(ele), - level: lvl, - reqs: 1, - key: key - }; - q.push(req); - k2q[key] = req; - } -}; -ETCp.dequeue = function (pxRatio /*, extent*/) { - var self = this; - var q = self.getElementQueue(); - var k2q = self.getElementKeyToQueue(); - var dequeued = []; - var lookup = self.lookup; - for (var i = 0; i < maxDeqSize$1; i++) { - if (q.size() > 0) { - var req = q.pop(); - var key = req.key; - var ele = req.eles[0]; // all eles have the same key - var cacheExists = lookup.hasCache(ele, req.level); - - // clear out the key to req lookup - k2q[key] = null; - - // dequeueing isn't necessary with an existing cache - if (cacheExists) { - continue; - } - dequeued.push(req); - var bb = self.getBoundingBox(ele); - self.getElement(ele, bb, pxRatio, req.level, getTxrReasons.dequeue); - } else { - break; - } - } - return dequeued; -}; -ETCp.removeFromQueue = function (ele) { - var self = this; - var q = self.getElementQueue(); - var k2q = self.getElementKeyToQueue(); - var key = this.getKey(ele); - var req = k2q[key]; - if (req != null) { - if (req.eles.length === 1) { - // remove if last ele in the req - // bring to front of queue - req.reqs = MAX_INT$1; - q.updateItem(req); - q.pop(); // remove from queue - - k2q[key] = null; // remove from lookup map - } else { - // otherwise just remove ele from req - req.eles.unmerge(ele); - } - } -}; -ETCp.onDequeue = function (fn) { - this.onDequeues.push(fn); -}; -ETCp.offDequeue = function (fn) { - removeFromArray(this.onDequeues, fn); -}; -ETCp.setupDequeueing = defs.setupDequeueing({ - deqRedrawThreshold: deqRedrawThreshold$1, - deqCost: deqCost$1, - deqAvgCost: deqAvgCost$1, - deqNoDrawCost: deqNoDrawCost$1, - deqFastCost: deqFastCost$1, - deq: function deq(self, pxRatio, extent) { - return self.dequeue(pxRatio, extent); - }, - onDeqd: function onDeqd(self, deqd) { - for (var i = 0; i < self.onDequeues.length; i++) { - var fn = self.onDequeues[i]; - fn(deqd); - } - }, - shouldRedraw: function shouldRedraw(self, deqd, pxRatio, extent) { - for (var i = 0; i < deqd.length; i++) { - var eles = deqd[i].eles; - for (var j = 0; j < eles.length; j++) { - var bb = eles[j].boundingBox(); - if (boundingBoxesIntersect(bb, extent)) { - return true; - } - } - } - return false; - }, - priority: function priority(self) { - return self.renderer.beforeRenderPriorities.eleTxrDeq; - } -}); - -var defNumLayers = 1; // default number of layers to use -var minLvl = -4; // when scaling smaller than that we don't need to re-render -var maxLvl = 2; // when larger than this scale just render directly (caching is not helpful) -var maxZoom = 3.99; // beyond this zoom level, layered textures are not used -var deqRedrawThreshold = 50; // time to batch redraws together from dequeueing to allow more dequeueing calcs to happen in the meanwhile -var refineEleDebounceTime = 50; // time to debounce sharper ele texture updates -var deqCost = 0.15; // % of add'l rendering cost allowed for dequeuing ele caches each frame -var deqAvgCost = 0.1; // % of add'l rendering cost compared to average overall redraw time -var deqNoDrawCost = 0.9; // % of avg frame time that can be used for dequeueing when not drawing -var deqFastCost = 0.9; // % of frame time to be used when >60fps -var maxDeqSize = 1; // number of eles to dequeue and render at higher texture in each batch -var invalidThreshold = 250; // time threshold for disabling b/c of invalidations -var maxLayerArea = 4000 * 4000; // layers can't be bigger than this -var useHighQualityEleTxrReqs = true; // whether to use high quality ele txr requests (generally faster and cheaper in the longterm) - -// var log = function(){ console.log.apply( console, arguments ); }; - -var LayeredTextureCache = function LayeredTextureCache(renderer) { - var self = this; - var r = self.renderer = renderer; - var cy = r.cy; - self.layersByLevel = {}; // e.g. 2 => [ layer1, layer2, ..., layerN ] - - self.firstGet = true; - self.lastInvalidationTime = performanceNow() - 2 * invalidThreshold; - self.skipping = false; - self.eleTxrDeqs = cy.collection(); - self.scheduleElementRefinement = debounce_1(function () { - self.refineElementTextures(self.eleTxrDeqs); - self.eleTxrDeqs.unmerge(self.eleTxrDeqs); - }, refineEleDebounceTime); - r.beforeRender(function (willDraw, now) { - if (now - self.lastInvalidationTime <= invalidThreshold) { - self.skipping = true; - } else { - self.skipping = false; - } - }, r.beforeRenderPriorities.lyrTxrSkip); - var qSort = function qSort(a, b) { - return b.reqs - a.reqs; - }; - self.layersQueue = new heap(qSort); - self.setupDequeueing(); -}; -var LTCp = LayeredTextureCache.prototype; -var layerIdPool = 0; -var MAX_INT = Math.pow(2, 53) - 1; -LTCp.makeLayer = function (bb, lvl) { - var scale = Math.pow(2, lvl); - var w = Math.ceil(bb.w * scale); - var h = Math.ceil(bb.h * scale); - var canvas = this.renderer.makeOffscreenCanvas(w, h); - var layer = { - id: layerIdPool = ++layerIdPool % MAX_INT, - bb: bb, - level: lvl, - width: w, - height: h, - canvas: canvas, - context: canvas.getContext('2d'), - eles: [], - elesQueue: [], - reqs: 0 - }; - - // log('make layer %s with w %s and h %s and lvl %s', layer.id, layer.width, layer.height, layer.level); - - var cxt = layer.context; - var dx = -layer.bb.x1; - var dy = -layer.bb.y1; - - // do the transform on creation to save cycles (it's the same for all eles) - cxt.scale(scale, scale); - cxt.translate(dx, dy); - return layer; -}; -LTCp.getLayers = function (eles, pxRatio, lvl) { - var self = this; - var r = self.renderer; - var cy = r.cy; - var zoom = cy.zoom(); - var firstGet = self.firstGet; - self.firstGet = false; - - // log('--\nget layers with %s eles', eles.length); - //log eles.map(function(ele){ return ele.id() }) ); - - if (lvl == null) { - lvl = Math.ceil(log2(zoom * pxRatio)); - if (lvl < minLvl) { - lvl = minLvl; - } else if (zoom >= maxZoom || lvl > maxLvl) { - return null; - } - } - self.validateLayersElesOrdering(lvl, eles); - var layersByLvl = self.layersByLevel; - var scale = Math.pow(2, lvl); - var layers = layersByLvl[lvl] = layersByLvl[lvl] || []; - var bb; - var lvlComplete = self.levelIsComplete(lvl, eles); - var tmpLayers; - var checkTempLevels = function checkTempLevels() { - var canUseAsTmpLvl = function canUseAsTmpLvl(l) { - self.validateLayersElesOrdering(l, eles); - if (self.levelIsComplete(l, eles)) { - tmpLayers = layersByLvl[l]; - return true; - } - }; - var checkLvls = function checkLvls(dir) { - if (tmpLayers) { - return; - } - for (var l = lvl + dir; minLvl <= l && l <= maxLvl; l += dir) { - if (canUseAsTmpLvl(l)) { - break; - } - } - }; - checkLvls(+1); - checkLvls(-1); - - // remove the invalid layers; they will be replaced as needed later in this function - for (var i = layers.length - 1; i >= 0; i--) { - var layer = layers[i]; - if (layer.invalid) { - removeFromArray(layers, layer); - } - } - }; - if (!lvlComplete) { - // if the current level is incomplete, then use the closest, best quality layerset temporarily - // and later queue the current layerset so we can get the proper quality level soon - - checkTempLevels(); - } else { - // log('level complete, using existing layers\n--'); - return layers; - } - var getBb = function getBb() { - if (!bb) { - bb = makeBoundingBox(); - for (var i = 0; i < eles.length; i++) { - updateBoundingBox(bb, eles[i].boundingBox()); - } - } - return bb; - }; - var makeLayer = function makeLayer(opts) { - opts = opts || {}; - var after = opts.after; - getBb(); - var area = bb.w * scale * (bb.h * scale); - if (area > maxLayerArea) { - return null; - } - var layer = self.makeLayer(bb, lvl); - if (after != null) { - var index = layers.indexOf(after) + 1; - layers.splice(index, 0, layer); - } else if (opts.insert === undefined || opts.insert) { - // no after specified => first layer made so put at start - layers.unshift(layer); - } - - // if( tmpLayers ){ - //self.queueLayer( layer ); - // } - - return layer; - }; - if (self.skipping && !firstGet) { - // log('skip layers'); - return null; - } - - // log('do layers'); - - var layer = null; - var maxElesPerLayer = eles.length / defNumLayers; - var allowLazyQueueing = !firstGet; - for (var i = 0; i < eles.length; i++) { - var ele = eles[i]; - var rs = ele._private.rscratch; - var caches = rs.imgLayerCaches = rs.imgLayerCaches || {}; - - // log('look at ele', ele.id()); - - var existingLayer = caches[lvl]; - if (existingLayer) { - // reuse layer for later eles - // log('reuse layer for', ele.id()); - layer = existingLayer; - continue; - } - if (!layer || layer.eles.length >= maxElesPerLayer || !boundingBoxInBoundingBox(layer.bb, ele.boundingBox())) { - // log('make new layer for ele %s', ele.id()); - - layer = makeLayer({ - insert: true, - after: layer - }); - - // if now layer can be built then we can't use layers at this level - if (!layer) { - return null; - } - - // log('new layer with id %s', layer.id); - } - - if (tmpLayers || allowLazyQueueing) { - // log('queue ele %s in layer %s', ele.id(), layer.id); - self.queueLayer(layer, ele); - } else { - // log('draw ele %s in layer %s', ele.id(), layer.id); - self.drawEleInLayer(layer, ele, lvl, pxRatio); - } - layer.eles.push(ele); - caches[lvl] = layer; - } - - // log('--'); - - if (tmpLayers) { - // then we only queued the current layerset and can't draw it yet - return tmpLayers; - } - if (allowLazyQueueing) { - // log('lazy queue level', lvl); - return null; - } - return layers; -}; - -// a layer may want to use an ele cache of a higher level to avoid blurriness -// so the layer level might not equal the ele level -LTCp.getEleLevelForLayerLevel = function (lvl, pxRatio) { - return lvl; -}; -LTCp.drawEleInLayer = function (layer, ele, lvl, pxRatio) { - var self = this; - var r = this.renderer; - var context = layer.context; - var bb = ele.boundingBox(); - if (bb.w === 0 || bb.h === 0 || !ele.visible()) { - return; - } - lvl = self.getEleLevelForLayerLevel(lvl, pxRatio); - { - r.setImgSmoothing(context, false); - } - { - r.drawCachedElement(context, ele, null, null, lvl, useHighQualityEleTxrReqs); - } - { - r.setImgSmoothing(context, true); - } -}; -LTCp.levelIsComplete = function (lvl, eles) { - var self = this; - var layers = self.layersByLevel[lvl]; - if (!layers || layers.length === 0) { - return false; - } - var numElesInLayers = 0; - for (var i = 0; i < layers.length; i++) { - var layer = layers[i]; - - // if there are any eles needed to be drawn yet, the level is not complete - if (layer.reqs > 0) { - return false; - } - - // if the layer is invalid, the level is not complete - if (layer.invalid) { - return false; - } - numElesInLayers += layer.eles.length; - } - - // we should have exactly the number of eles passed in to be complete - if (numElesInLayers !== eles.length) { - return false; - } - return true; -}; -LTCp.validateLayersElesOrdering = function (lvl, eles) { - var layers = this.layersByLevel[lvl]; - if (!layers) { - return; - } - - // if in a layer the eles are not in the same order, then the layer is invalid - // (i.e. there is an ele in between the eles in the layer) - - for (var i = 0; i < layers.length; i++) { - var layer = layers[i]; - var offset = -1; - - // find the offset - for (var j = 0; j < eles.length; j++) { - if (layer.eles[0] === eles[j]) { - offset = j; - break; - } - } - if (offset < 0) { - // then the layer has nonexistent elements and is invalid - this.invalidateLayer(layer); - continue; - } - - // the eles in the layer must be in the same continuous order, else the layer is invalid - - var o = offset; - for (var j = 0; j < layer.eles.length; j++) { - if (layer.eles[j] !== eles[o + j]) { - // log('invalidate based on ordering', layer.id); - - this.invalidateLayer(layer); - break; - } - } - } -}; -LTCp.updateElementsInLayers = function (eles, update) { - var self = this; - var isEles = cytoscape_esm_element(eles[0]); - - // collect udpated elements (cascaded from the layers) and update each - // layer itself along the way - for (var i = 0; i < eles.length; i++) { - var req = isEles ? null : eles[i]; - var ele = isEles ? eles[i] : eles[i].ele; - var rs = ele._private.rscratch; - var caches = rs.imgLayerCaches = rs.imgLayerCaches || {}; - for (var l = minLvl; l <= maxLvl; l++) { - var layer = caches[l]; - if (!layer) { - continue; - } - - // if update is a request from the ele cache, then it affects only - // the matching level - if (req && self.getEleLevelForLayerLevel(layer.level) !== req.level) { - continue; - } - update(layer, ele, req); - } - } -}; -LTCp.haveLayers = function () { - var self = this; - var haveLayers = false; - for (var l = minLvl; l <= maxLvl; l++) { - var layers = self.layersByLevel[l]; - if (layers && layers.length > 0) { - haveLayers = true; - break; - } - } - return haveLayers; -}; -LTCp.invalidateElements = function (eles) { - var self = this; - if (eles.length === 0) { - return; - } - self.lastInvalidationTime = performanceNow(); - - // log('update invalidate layer time from eles'); - - if (eles.length === 0 || !self.haveLayers()) { - return; - } - self.updateElementsInLayers(eles, function invalAssocLayers(layer, ele, req) { - self.invalidateLayer(layer); - }); -}; -LTCp.invalidateLayer = function (layer) { - // log('update invalidate layer time'); - - this.lastInvalidationTime = performanceNow(); - if (layer.invalid) { - return; - } // save cycles - - var lvl = layer.level; - var eles = layer.eles; - var layers = this.layersByLevel[lvl]; - - // log('invalidate layer', layer.id ); - - removeFromArray(layers, layer); - // layer.eles = []; - - layer.elesQueue = []; - layer.invalid = true; - if (layer.replacement) { - layer.replacement.invalid = true; - } - for (var i = 0; i < eles.length; i++) { - var caches = eles[i]._private.rscratch.imgLayerCaches; - if (caches) { - caches[lvl] = null; - } - } -}; -LTCp.refineElementTextures = function (eles) { - var self = this; - - // log('refine', eles.length); - - self.updateElementsInLayers(eles, function refineEachEle(layer, ele, req) { - var rLyr = layer.replacement; - if (!rLyr) { - rLyr = layer.replacement = self.makeLayer(layer.bb, layer.level); - rLyr.replaces = layer; - rLyr.eles = layer.eles; - - // log('make replacement layer %s for %s with level %s', rLyr.id, layer.id, rLyr.level); - } - - if (!rLyr.reqs) { - for (var i = 0; i < rLyr.eles.length; i++) { - self.queueLayer(rLyr, rLyr.eles[i]); - } - - // log('queue replacement layer refinement', rLyr.id); - } - }); -}; - -LTCp.enqueueElementRefinement = function (ele) { - this.eleTxrDeqs.merge(ele); - this.scheduleElementRefinement(); -}; -LTCp.queueLayer = function (layer, ele) { - var self = this; - var q = self.layersQueue; - var elesQ = layer.elesQueue; - var hasId = elesQ.hasId = elesQ.hasId || {}; - - // if a layer is going to be replaced, queuing is a waste of time - if (layer.replacement) { - return; - } - if (ele) { - if (hasId[ele.id()]) { - return; - } - elesQ.push(ele); - hasId[ele.id()] = true; - } - if (layer.reqs) { - layer.reqs++; - q.updateItem(layer); - } else { - layer.reqs = 1; - q.push(layer); - } -}; -LTCp.dequeue = function (pxRatio) { - var self = this; - var q = self.layersQueue; - var deqd = []; - var eleDeqs = 0; - while (eleDeqs < maxDeqSize) { - if (q.size() === 0) { - break; - } - var layer = q.peek(); - - // if a layer has been or will be replaced, then don't waste time with it - if (layer.replacement) { - // log('layer %s in queue skipped b/c it already has a replacement', layer.id); - q.pop(); - continue; - } - - // if this is a replacement layer that has been superceded, then forget it - if (layer.replaces && layer !== layer.replaces.replacement) { - // log('layer is no longer the most uptodate replacement; dequeued', layer.id) - q.pop(); - continue; - } - if (layer.invalid) { - // log('replacement layer %s is invalid; dequeued', layer.id); - q.pop(); - continue; - } - var ele = layer.elesQueue.shift(); - if (ele) { - // log('dequeue layer %s', layer.id); - - self.drawEleInLayer(layer, ele, layer.level, pxRatio); - eleDeqs++; - } - if (deqd.length === 0) { - // we need only one entry in deqd to queue redrawing etc - deqd.push(true); - } - - // if the layer has all its eles done, then remove from the queue - if (layer.elesQueue.length === 0) { - q.pop(); - layer.reqs = 0; - - // log('dequeue of layer %s complete', layer.id); - - // when a replacement layer is dequeued, it replaces the old layer in the level - if (layer.replaces) { - self.applyLayerReplacement(layer); - } - self.requestRedraw(); - } - } - return deqd; -}; -LTCp.applyLayerReplacement = function (layer) { - var self = this; - var layersInLevel = self.layersByLevel[layer.level]; - var replaced = layer.replaces; - var index = layersInLevel.indexOf(replaced); - - // if the replaced layer is not in the active list for the level, then replacing - // refs would be a mistake (i.e. overwriting the true active layer) - if (index < 0 || replaced.invalid) { - // log('replacement layer would have no effect', layer.id); - return; - } - layersInLevel[index] = layer; // replace level ref - - // replace refs in eles - for (var i = 0; i < layer.eles.length; i++) { - var _p = layer.eles[i]._private; - var cache = _p.imgLayerCaches = _p.imgLayerCaches || {}; - if (cache) { - cache[layer.level] = layer; - } - } - - // log('apply replacement layer %s over %s', layer.id, replaced.id); - - self.requestRedraw(); -}; -LTCp.requestRedraw = debounce_1(function () { - var r = this.renderer; - r.redrawHint('eles', true); - r.redrawHint('drag', true); - r.redraw(); -}, 100); -LTCp.setupDequeueing = defs.setupDequeueing({ - deqRedrawThreshold: deqRedrawThreshold, - deqCost: deqCost, - deqAvgCost: deqAvgCost, - deqNoDrawCost: deqNoDrawCost, - deqFastCost: deqFastCost, - deq: function deq(self, pxRatio) { - return self.dequeue(pxRatio); - }, - onDeqd: noop$1, - shouldRedraw: trueify, - priority: function priority(self) { - return self.renderer.beforeRenderPriorities.lyrTxrDeq; - } -}); - -var CRp$a = {}; -var impl; -function polygon(context, points) { - for (var i = 0; i < points.length; i++) { - var pt = points[i]; - context.lineTo(pt.x, pt.y); - } -} -function triangleBackcurve(context, points, controlPoint) { - var firstPt; - for (var i = 0; i < points.length; i++) { - var pt = points[i]; - if (i === 0) { - firstPt = pt; - } - context.lineTo(pt.x, pt.y); - } - context.quadraticCurveTo(controlPoint.x, controlPoint.y, firstPt.x, firstPt.y); -} -function triangleTee(context, trianglePoints, teePoints) { - if (context.beginPath) { - context.beginPath(); - } - var triPts = trianglePoints; - for (var i = 0; i < triPts.length; i++) { - var pt = triPts[i]; - context.lineTo(pt.x, pt.y); - } - var teePts = teePoints; - var firstTeePt = teePoints[0]; - context.moveTo(firstTeePt.x, firstTeePt.y); - for (var i = 1; i < teePts.length; i++) { - var pt = teePts[i]; - context.lineTo(pt.x, pt.y); - } - if (context.closePath) { - context.closePath(); - } -} -function circleTriangle(context, trianglePoints, rx, ry, r) { - if (context.beginPath) { - context.beginPath(); - } - context.arc(rx, ry, r, 0, Math.PI * 2, false); - var triPts = trianglePoints; - var firstTrPt = triPts[0]; - context.moveTo(firstTrPt.x, firstTrPt.y); - for (var i = 0; i < triPts.length; i++) { - var pt = triPts[i]; - context.lineTo(pt.x, pt.y); - } - if (context.closePath) { - context.closePath(); - } -} -function circle(context, rx, ry, r) { - context.arc(rx, ry, r, 0, Math.PI * 2, false); -} -CRp$a.arrowShapeImpl = function (name) { - return (impl || (impl = { - 'polygon': polygon, - 'triangle-backcurve': triangleBackcurve, - 'triangle-tee': triangleTee, - 'circle-triangle': circleTriangle, - 'triangle-cross': triangleTee, - 'circle': circle - }))[name]; -}; - -var CRp$9 = {}; -CRp$9.drawElement = function (context, ele, shiftToOriginWithBb, showLabel, showOverlay, showOpacity) { - var r = this; - if (ele.isNode()) { - r.drawNode(context, ele, shiftToOriginWithBb, showLabel, showOverlay, showOpacity); - } else { - r.drawEdge(context, ele, shiftToOriginWithBb, showLabel, showOverlay, showOpacity); - } -}; -CRp$9.drawElementOverlay = function (context, ele) { - var r = this; - if (ele.isNode()) { - r.drawNodeOverlay(context, ele); - } else { - r.drawEdgeOverlay(context, ele); - } -}; -CRp$9.drawElementUnderlay = function (context, ele) { - var r = this; - if (ele.isNode()) { - r.drawNodeUnderlay(context, ele); - } else { - r.drawEdgeUnderlay(context, ele); - } -}; -CRp$9.drawCachedElementPortion = function (context, ele, eleTxrCache, pxRatio, lvl, reason, getRotation, getOpacity) { - var r = this; - var bb = eleTxrCache.getBoundingBox(ele); - if (bb.w === 0 || bb.h === 0) { - return; - } // ignore zero size case - - var eleCache = eleTxrCache.getElement(ele, bb, pxRatio, lvl, reason); - if (eleCache != null) { - var opacity = getOpacity(r, ele); - if (opacity === 0) { - return; - } - var theta = getRotation(r, ele); - var x1 = bb.x1, - y1 = bb.y1, - w = bb.w, - h = bb.h; - var x, y, sx, sy, smooth; - if (theta !== 0) { - var rotPt = eleTxrCache.getRotationPoint(ele); - sx = rotPt.x; - sy = rotPt.y; - context.translate(sx, sy); - context.rotate(theta); - smooth = r.getImgSmoothing(context); - if (!smooth) { - r.setImgSmoothing(context, true); - } - var off = eleTxrCache.getRotationOffset(ele); - x = off.x; - y = off.y; - } else { - x = x1; - y = y1; - } - var oldGlobalAlpha; - if (opacity !== 1) { - oldGlobalAlpha = context.globalAlpha; - context.globalAlpha = oldGlobalAlpha * opacity; - } - context.drawImage(eleCache.texture.canvas, eleCache.x, 0, eleCache.width, eleCache.height, x, y, w, h); - if (opacity !== 1) { - context.globalAlpha = oldGlobalAlpha; - } - if (theta !== 0) { - context.rotate(-theta); - context.translate(-sx, -sy); - if (!smooth) { - r.setImgSmoothing(context, false); - } - } - } else { - eleTxrCache.drawElement(context, ele); // direct draw fallback - } -}; - -var getZeroRotation = function getZeroRotation() { - return 0; -}; -var getLabelRotation = function getLabelRotation(r, ele) { - return r.getTextAngle(ele, null); -}; -var getSourceLabelRotation = function getSourceLabelRotation(r, ele) { - return r.getTextAngle(ele, 'source'); -}; -var getTargetLabelRotation = function getTargetLabelRotation(r, ele) { - return r.getTextAngle(ele, 'target'); -}; -var getOpacity = function getOpacity(r, ele) { - return ele.effectiveOpacity(); -}; -var getTextOpacity = function getTextOpacity(e, ele) { - return ele.pstyle('text-opacity').pfValue * ele.effectiveOpacity(); -}; -CRp$9.drawCachedElement = function (context, ele, pxRatio, extent, lvl, requestHighQuality) { - var r = this; - var _r$data = r.data, - eleTxrCache = _r$data.eleTxrCache, - lblTxrCache = _r$data.lblTxrCache, - slbTxrCache = _r$data.slbTxrCache, - tlbTxrCache = _r$data.tlbTxrCache; - var bb = ele.boundingBox(); - var reason = requestHighQuality === true ? eleTxrCache.reasons.highQuality : null; - if (bb.w === 0 || bb.h === 0 || !ele.visible()) { - return; - } - if (!extent || boundingBoxesIntersect(bb, extent)) { - var isEdge = ele.isEdge(); - var badLine = ele.element()._private.rscratch.badLine; - r.drawElementUnderlay(context, ele); - r.drawCachedElementPortion(context, ele, eleTxrCache, pxRatio, lvl, reason, getZeroRotation, getOpacity); - if (!isEdge || !badLine) { - r.drawCachedElementPortion(context, ele, lblTxrCache, pxRatio, lvl, reason, getLabelRotation, getTextOpacity); - } - if (isEdge && !badLine) { - r.drawCachedElementPortion(context, ele, slbTxrCache, pxRatio, lvl, reason, getSourceLabelRotation, getTextOpacity); - r.drawCachedElementPortion(context, ele, tlbTxrCache, pxRatio, lvl, reason, getTargetLabelRotation, getTextOpacity); - } - r.drawElementOverlay(context, ele); - } -}; -CRp$9.drawElements = function (context, eles) { - var r = this; - for (var i = 0; i < eles.length; i++) { - var ele = eles[i]; - r.drawElement(context, ele); - } -}; -CRp$9.drawCachedElements = function (context, eles, pxRatio, extent) { - var r = this; - for (var i = 0; i < eles.length; i++) { - var ele = eles[i]; - r.drawCachedElement(context, ele, pxRatio, extent); - } -}; -CRp$9.drawCachedNodes = function (context, eles, pxRatio, extent) { - var r = this; - for (var i = 0; i < eles.length; i++) { - var ele = eles[i]; - if (!ele.isNode()) { - continue; - } - r.drawCachedElement(context, ele, pxRatio, extent); - } -}; -CRp$9.drawLayeredElements = function (context, eles, pxRatio, extent) { - var r = this; - var layers = r.data.lyrTxrCache.getLayers(eles, pxRatio); - if (layers) { - for (var i = 0; i < layers.length; i++) { - var layer = layers[i]; - var bb = layer.bb; - if (bb.w === 0 || bb.h === 0) { - continue; - } - context.drawImage(layer.canvas, bb.x1, bb.y1, bb.w, bb.h); - } - } else { - // fall back on plain caching if no layers - r.drawCachedElements(context, eles, pxRatio, extent); - } -}; - -var CRp$8 = {}; -CRp$8.drawEdge = function (context, edge, shiftToOriginWithBb) { - var drawLabel = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true; - var shouldDrawOverlay = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true; - var shouldDrawOpacity = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true; - var r = this; - var rs = edge._private.rscratch; - if (shouldDrawOpacity && !edge.visible()) { - return; - } - - // if bezier ctrl pts can not be calculated, then die - if (rs.badLine || rs.allpts == null || isNaN(rs.allpts[0])) { - // isNaN in case edge is impossible and browser bugs (e.g. safari) - return; - } - var bb; - if (shiftToOriginWithBb) { - bb = shiftToOriginWithBb; - context.translate(-bb.x1, -bb.y1); - } - var opacity = shouldDrawOpacity ? edge.pstyle('opacity').value : 1; - var lineOpacity = shouldDrawOpacity ? edge.pstyle('line-opacity').value : 1; - var curveStyle = edge.pstyle('curve-style').value; - var lineStyle = edge.pstyle('line-style').value; - var edgeWidth = edge.pstyle('width').pfValue; - var lineCap = edge.pstyle('line-cap').value; - var lineOutlineWidth = edge.pstyle('line-outline-width').value; - var lineOutlineColor = edge.pstyle('line-outline-color').value; - var effectiveLineOpacity = opacity * lineOpacity; - // separate arrow opacity would require arrow-opacity property - var effectiveArrowOpacity = opacity * lineOpacity; - var drawLine = function drawLine() { - var strokeOpacity = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : effectiveLineOpacity; - if (curveStyle === 'straight-triangle') { - r.eleStrokeStyle(context, edge, strokeOpacity); - r.drawEdgeTrianglePath(edge, context, rs.allpts); - } else { - context.lineWidth = edgeWidth; - context.lineCap = lineCap; - r.eleStrokeStyle(context, edge, strokeOpacity); - r.drawEdgePath(edge, context, rs.allpts, lineStyle); - context.lineCap = 'butt'; // reset for other drawing functions - } - }; - - var drawLineOutline = function drawLineOutline() { - var strokeOpacity = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : effectiveLineOpacity; - context.lineWidth = edgeWidth + lineOutlineWidth; - context.lineCap = lineCap; - if (lineOutlineWidth > 0) { - r.colorStrokeStyle(context, lineOutlineColor[0], lineOutlineColor[1], lineOutlineColor[2], strokeOpacity); - } else { - // do not draw any lineOutline - context.lineCap = 'butt'; // reset for other drawing functions - return; - } - if (curveStyle === 'straight-triangle') { - r.drawEdgeTrianglePath(edge, context, rs.allpts); - } else { - r.drawEdgePath(edge, context, rs.allpts, lineStyle); - context.lineCap = 'butt'; // reset for other drawing functions - } - }; - - var drawOverlay = function drawOverlay() { - if (!shouldDrawOverlay) { - return; - } - r.drawEdgeOverlay(context, edge); - }; - var drawUnderlay = function drawUnderlay() { - if (!shouldDrawOverlay) { - return; - } - r.drawEdgeUnderlay(context, edge); - }; - var drawArrows = function drawArrows() { - var arrowOpacity = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : effectiveArrowOpacity; - r.drawArrowheads(context, edge, arrowOpacity); - }; - var drawText = function drawText() { - r.drawElementText(context, edge, null, drawLabel); - }; - context.lineJoin = 'round'; - var ghost = edge.pstyle('ghost').value === 'yes'; - if (ghost) { - var gx = edge.pstyle('ghost-offset-x').pfValue; - var gy = edge.pstyle('ghost-offset-y').pfValue; - var ghostOpacity = edge.pstyle('ghost-opacity').value; - var effectiveGhostOpacity = effectiveLineOpacity * ghostOpacity; - context.translate(gx, gy); - drawLine(effectiveGhostOpacity); - drawArrows(effectiveGhostOpacity); - context.translate(-gx, -gy); - } else { - drawLineOutline(); - } - drawUnderlay(); - drawLine(); - drawArrows(); - drawOverlay(); - drawText(); - if (shiftToOriginWithBb) { - context.translate(bb.x1, bb.y1); - } -}; -var drawEdgeOverlayUnderlay = function drawEdgeOverlayUnderlay(overlayOrUnderlay) { - if (!['overlay', 'underlay'].includes(overlayOrUnderlay)) { - throw new Error('Invalid state'); - } - return function (context, edge) { - if (!edge.visible()) { - return; - } - var opacity = edge.pstyle("".concat(overlayOrUnderlay, "-opacity")).value; - if (opacity === 0) { - return; - } - var r = this; - var usePaths = r.usePaths(); - var rs = edge._private.rscratch; - var padding = edge.pstyle("".concat(overlayOrUnderlay, "-padding")).pfValue; - var width = 2 * padding; - var color = edge.pstyle("".concat(overlayOrUnderlay, "-color")).value; - context.lineWidth = width; - if (rs.edgeType === 'self' && !usePaths) { - context.lineCap = 'butt'; - } else { - context.lineCap = 'round'; - } - r.colorStrokeStyle(context, color[0], color[1], color[2], opacity); - r.drawEdgePath(edge, context, rs.allpts, 'solid'); - }; -}; -CRp$8.drawEdgeOverlay = drawEdgeOverlayUnderlay('overlay'); -CRp$8.drawEdgeUnderlay = drawEdgeOverlayUnderlay('underlay'); -CRp$8.drawEdgePath = function (edge, context, pts, type) { - var rs = edge._private.rscratch; - var canvasCxt = context; - var path; - var pathCacheHit = false; - var usePaths = this.usePaths(); - var lineDashPattern = edge.pstyle('line-dash-pattern').pfValue; - var lineDashOffset = edge.pstyle('line-dash-offset').pfValue; - if (usePaths) { - var pathCacheKey = pts.join('$'); - var keyMatches = rs.pathCacheKey && rs.pathCacheKey === pathCacheKey; - if (keyMatches) { - path = context = rs.pathCache; - pathCacheHit = true; - } else { - path = context = new Path2D(); - rs.pathCacheKey = pathCacheKey; - rs.pathCache = path; - } - } - if (canvasCxt.setLineDash) { - // for very outofdate browsers - switch (type) { - case 'dotted': - canvasCxt.setLineDash([1, 1]); - break; - case 'dashed': - canvasCxt.setLineDash(lineDashPattern); - canvasCxt.lineDashOffset = lineDashOffset; - break; - case 'solid': - canvasCxt.setLineDash([]); - break; - } - } - if (!pathCacheHit && !rs.badLine) { - if (context.beginPath) { - context.beginPath(); - } - context.moveTo(pts[0], pts[1]); - switch (rs.edgeType) { - case 'bezier': - case 'self': - case 'compound': - case 'multibezier': - for (var i = 2; i + 3 < pts.length; i += 4) { - context.quadraticCurveTo(pts[i], pts[i + 1], pts[i + 2], pts[i + 3]); - } - break; - case 'straight': - case 'haystack': - for (var _i = 2; _i + 1 < pts.length; _i += 2) { - context.lineTo(pts[_i], pts[_i + 1]); - } - break; - case 'segments': - if (rs.isRound) { - var _iterator = _createForOfIteratorHelper(rs.roundCorners), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var corner = _step.value; - drawPreparedRoundCorner(context, corner); - } - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - context.lineTo(pts[pts.length - 2], pts[pts.length - 1]); - } else { - for (var _i2 = 2; _i2 + 1 < pts.length; _i2 += 2) { - context.lineTo(pts[_i2], pts[_i2 + 1]); - } - } - break; - } - } - context = canvasCxt; - if (usePaths) { - context.stroke(path); - } else { - context.stroke(); - } - - // reset any line dashes - if (context.setLineDash) { - // for very outofdate browsers - context.setLineDash([]); - } -}; -CRp$8.drawEdgeTrianglePath = function (edge, context, pts) { - // use line stroke style for triangle fill style - context.fillStyle = context.strokeStyle; - var edgeWidth = edge.pstyle('width').pfValue; - for (var i = 0; i + 1 < pts.length; i += 2) { - var vector = [pts[i + 2] - pts[i], pts[i + 3] - pts[i + 1]]; - var length = Math.sqrt(vector[0] * vector[0] + vector[1] * vector[1]); - var normal = [vector[1] / length, -vector[0] / length]; - var triangleHead = [normal[0] * edgeWidth / 2, normal[1] * edgeWidth / 2]; - context.beginPath(); - context.moveTo(pts[i] - triangleHead[0], pts[i + 1] - triangleHead[1]); - context.lineTo(pts[i] + triangleHead[0], pts[i + 1] + triangleHead[1]); - context.lineTo(pts[i + 2], pts[i + 3]); - context.closePath(); - context.fill(); - } -}; -CRp$8.drawArrowheads = function (context, edge, opacity) { - var rs = edge._private.rscratch; - var isHaystack = rs.edgeType === 'haystack'; - if (!isHaystack) { - this.drawArrowhead(context, edge, 'source', rs.arrowStartX, rs.arrowStartY, rs.srcArrowAngle, opacity); - } - this.drawArrowhead(context, edge, 'mid-target', rs.midX, rs.midY, rs.midtgtArrowAngle, opacity); - this.drawArrowhead(context, edge, 'mid-source', rs.midX, rs.midY, rs.midsrcArrowAngle, opacity); - if (!isHaystack) { - this.drawArrowhead(context, edge, 'target', rs.arrowEndX, rs.arrowEndY, rs.tgtArrowAngle, opacity); - } -}; -CRp$8.drawArrowhead = function (context, edge, prefix, x, y, angle, opacity) { - if (isNaN(x) || x == null || isNaN(y) || y == null || isNaN(angle) || angle == null) { - return; - } - var self = this; - var arrowShape = edge.pstyle(prefix + '-arrow-shape').value; - if (arrowShape === 'none') { - return; - } - var arrowClearFill = edge.pstyle(prefix + '-arrow-fill').value === 'hollow' ? 'both' : 'filled'; - var arrowFill = edge.pstyle(prefix + '-arrow-fill').value; - var edgeWidth = edge.pstyle('width').pfValue; - var pArrowWidth = edge.pstyle(prefix + '-arrow-width'); - var arrowWidth = pArrowWidth.value === 'match-line' ? edgeWidth : pArrowWidth.pfValue; - if (pArrowWidth.units === '%') arrowWidth *= edgeWidth; - var edgeOpacity = edge.pstyle('opacity').value; - if (opacity === undefined) { - opacity = edgeOpacity; - } - var gco = context.globalCompositeOperation; - if (opacity !== 1 || arrowFill === 'hollow') { - // then extra clear is needed - context.globalCompositeOperation = 'destination-out'; - self.colorFillStyle(context, 255, 255, 255, 1); - self.colorStrokeStyle(context, 255, 255, 255, 1); - self.drawArrowShape(edge, context, arrowClearFill, edgeWidth, arrowShape, arrowWidth, x, y, angle); - context.globalCompositeOperation = gco; - } // otherwise, the opaque arrow clears it for free :) - - var color = edge.pstyle(prefix + '-arrow-color').value; - self.colorFillStyle(context, color[0], color[1], color[2], opacity); - self.colorStrokeStyle(context, color[0], color[1], color[2], opacity); - self.drawArrowShape(edge, context, arrowFill, edgeWidth, arrowShape, arrowWidth, x, y, angle); -}; -CRp$8.drawArrowShape = function (edge, context, fill, edgeWidth, shape, shapeWidth, x, y, angle) { - var r = this; - var usePaths = this.usePaths() && shape !== 'triangle-cross'; - var pathCacheHit = false; - var path; - var canvasContext = context; - var translation = { - x: x, - y: y - }; - var scale = edge.pstyle('arrow-scale').value; - var size = this.getArrowWidth(edgeWidth, scale); - var shapeImpl = r.arrowShapes[shape]; - if (usePaths) { - var cache = r.arrowPathCache = r.arrowPathCache || []; - var key = hashString(shape); - var cachedPath = cache[key]; - if (cachedPath != null) { - path = context = cachedPath; - pathCacheHit = true; - } else { - path = context = new Path2D(); - cache[key] = path; - } - } - if (!pathCacheHit) { - if (context.beginPath) { - context.beginPath(); - } - if (usePaths) { - // store in the path cache with values easily manipulated later - shapeImpl.draw(context, 1, 0, { - x: 0, - y: 0 - }, 1); - } else { - shapeImpl.draw(context, size, angle, translation, edgeWidth); - } - if (context.closePath) { - context.closePath(); - } - } - context = canvasContext; - if (usePaths) { - // set transform to arrow position/orientation - context.translate(x, y); - context.rotate(angle); - context.scale(size, size); - } - if (fill === 'filled' || fill === 'both') { - if (usePaths) { - context.fill(path); - } else { - context.fill(); - } - } - if (fill === 'hollow' || fill === 'both') { - context.lineWidth = shapeWidth / (usePaths ? size : 1); - context.lineJoin = 'miter'; - if (usePaths) { - context.stroke(path); - } else { - context.stroke(); - } - } - if (usePaths) { - // reset transform by applying inverse - context.scale(1 / size, 1 / size); - context.rotate(-angle); - context.translate(-x, -y); - } -}; - -var CRp$7 = {}; -CRp$7.safeDrawImage = function (context, img, ix, iy, iw, ih, x, y, w, h) { - // detect problematic cases for old browsers with bad images (cheaper than try-catch) - if (iw <= 0 || ih <= 0 || w <= 0 || h <= 0) { - return; - } - try { - context.drawImage(img, ix, iy, iw, ih, x, y, w, h); - } catch (e) { - warn(e); - } -}; -CRp$7.drawInscribedImage = function (context, img, node, index, nodeOpacity) { - var r = this; - var pos = node.position(); - var nodeX = pos.x; - var nodeY = pos.y; - var styleObj = node.cy().style(); - var getIndexedStyle = styleObj.getIndexedStyle.bind(styleObj); - var fit = getIndexedStyle(node, 'background-fit', 'value', index); - var repeat = getIndexedStyle(node, 'background-repeat', 'value', index); - var nodeW = node.width(); - var nodeH = node.height(); - var paddingX2 = node.padding() * 2; - var nodeTW = nodeW + (getIndexedStyle(node, 'background-width-relative-to', 'value', index) === 'inner' ? 0 : paddingX2); - var nodeTH = nodeH + (getIndexedStyle(node, 'background-height-relative-to', 'value', index) === 'inner' ? 0 : paddingX2); - var rs = node._private.rscratch; - var clip = getIndexedStyle(node, 'background-clip', 'value', index); - var shouldClip = clip === 'node'; - var imgOpacity = getIndexedStyle(node, 'background-image-opacity', 'value', index) * nodeOpacity; - var smooth = getIndexedStyle(node, 'background-image-smoothing', 'value', index); - var cornerRadius = node.pstyle('corner-radius').value; - if (cornerRadius !== 'auto') cornerRadius = node.pstyle('corner-radius').pfValue; - var imgW = img.width || img.cachedW; - var imgH = img.height || img.cachedH; - - // workaround for broken browsers like ie - if (null == imgW || null == imgH) { - document.body.appendChild(img); // eslint-disable-line no-undef - - imgW = img.cachedW = img.width || img.offsetWidth; - imgH = img.cachedH = img.height || img.offsetHeight; - document.body.removeChild(img); // eslint-disable-line no-undef - } - - var w = imgW; - var h = imgH; - if (getIndexedStyle(node, 'background-width', 'value', index) !== 'auto') { - if (getIndexedStyle(node, 'background-width', 'units', index) === '%') { - w = getIndexedStyle(node, 'background-width', 'pfValue', index) * nodeTW; - } else { - w = getIndexedStyle(node, 'background-width', 'pfValue', index); - } - } - if (getIndexedStyle(node, 'background-height', 'value', index) !== 'auto') { - if (getIndexedStyle(node, 'background-height', 'units', index) === '%') { - h = getIndexedStyle(node, 'background-height', 'pfValue', index) * nodeTH; - } else { - h = getIndexedStyle(node, 'background-height', 'pfValue', index); - } - } - if (w === 0 || h === 0) { - return; // no point in drawing empty image (and chrome is broken in this case) - } - - if (fit === 'contain') { - var scale = Math.min(nodeTW / w, nodeTH / h); - w *= scale; - h *= scale; - } else if (fit === 'cover') { - var scale = Math.max(nodeTW / w, nodeTH / h); - w *= scale; - h *= scale; - } - var x = nodeX - nodeTW / 2; // left - var posXUnits = getIndexedStyle(node, 'background-position-x', 'units', index); - var posXPfVal = getIndexedStyle(node, 'background-position-x', 'pfValue', index); - if (posXUnits === '%') { - x += (nodeTW - w) * posXPfVal; - } else { - x += posXPfVal; - } - var offXUnits = getIndexedStyle(node, 'background-offset-x', 'units', index); - var offXPfVal = getIndexedStyle(node, 'background-offset-x', 'pfValue', index); - if (offXUnits === '%') { - x += (nodeTW - w) * offXPfVal; - } else { - x += offXPfVal; - } - var y = nodeY - nodeTH / 2; // top - var posYUnits = getIndexedStyle(node, 'background-position-y', 'units', index); - var posYPfVal = getIndexedStyle(node, 'background-position-y', 'pfValue', index); - if (posYUnits === '%') { - y += (nodeTH - h) * posYPfVal; - } else { - y += posYPfVal; - } - var offYUnits = getIndexedStyle(node, 'background-offset-y', 'units', index); - var offYPfVal = getIndexedStyle(node, 'background-offset-y', 'pfValue', index); - if (offYUnits === '%') { - y += (nodeTH - h) * offYPfVal; - } else { - y += offYPfVal; - } - if (rs.pathCache) { - x -= nodeX; - y -= nodeY; - nodeX = 0; - nodeY = 0; - } - var gAlpha = context.globalAlpha; - context.globalAlpha = imgOpacity; - var smoothingEnabled = r.getImgSmoothing(context); - var isSmoothingSwitched = false; - if (smooth === 'no' && smoothingEnabled) { - r.setImgSmoothing(context, false); - isSmoothingSwitched = true; - } else if (smooth === 'yes' && !smoothingEnabled) { - r.setImgSmoothing(context, true); - isSmoothingSwitched = true; - } - if (repeat === 'no-repeat') { - if (shouldClip) { - context.save(); - if (rs.pathCache) { - context.clip(rs.pathCache); - } else { - r.nodeShapes[r.getNodeShape(node)].draw(context, nodeX, nodeY, nodeTW, nodeTH, cornerRadius, rs); - context.clip(); - } - } - r.safeDrawImage(context, img, 0, 0, imgW, imgH, x, y, w, h); - if (shouldClip) { - context.restore(); - } - } else { - var pattern = context.createPattern(img, repeat); - context.fillStyle = pattern; - r.nodeShapes[r.getNodeShape(node)].draw(context, nodeX, nodeY, nodeTW, nodeTH, cornerRadius, rs); - context.translate(x, y); - context.fill(); - context.translate(-x, -y); - } - context.globalAlpha = gAlpha; - if (isSmoothingSwitched) { - r.setImgSmoothing(context, smoothingEnabled); - } -}; - -var CRp$6 = {}; -CRp$6.eleTextBiggerThanMin = function (ele, scale) { - if (!scale) { - var zoom = ele.cy().zoom(); - var pxRatio = this.getPixelRatio(); - var lvl = Math.ceil(log2(zoom * pxRatio)); // the effective texture level - - scale = Math.pow(2, lvl); - } - var computedSize = ele.pstyle('font-size').pfValue * scale; - var minSize = ele.pstyle('min-zoomed-font-size').pfValue; - if (computedSize < minSize) { - return false; - } - return true; -}; -CRp$6.drawElementText = function (context, ele, shiftToOriginWithBb, force, prefix) { - var useEleOpacity = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true; - var r = this; - if (force == null) { - if (useEleOpacity && !r.eleTextBiggerThanMin(ele)) { - return; - } - } else if (force === false) { - return; - } - if (ele.isNode()) { - var label = ele.pstyle('label'); - if (!label || !label.value) { - return; - } - var justification = r.getLabelJustification(ele); - context.textAlign = justification; - context.textBaseline = 'bottom'; - } else { - var badLine = ele.element()._private.rscratch.badLine; - var _label = ele.pstyle('label'); - var srcLabel = ele.pstyle('source-label'); - var tgtLabel = ele.pstyle('target-label'); - if (badLine || (!_label || !_label.value) && (!srcLabel || !srcLabel.value) && (!tgtLabel || !tgtLabel.value)) { - return; - } - context.textAlign = 'center'; - context.textBaseline = 'bottom'; - } - var applyRotation = !shiftToOriginWithBb; - var bb; - if (shiftToOriginWithBb) { - bb = shiftToOriginWithBb; - context.translate(-bb.x1, -bb.y1); - } - if (prefix == null) { - r.drawText(context, ele, null, applyRotation, useEleOpacity); - if (ele.isEdge()) { - r.drawText(context, ele, 'source', applyRotation, useEleOpacity); - r.drawText(context, ele, 'target', applyRotation, useEleOpacity); - } - } else { - r.drawText(context, ele, prefix, applyRotation, useEleOpacity); - } - if (shiftToOriginWithBb) { - context.translate(bb.x1, bb.y1); - } -}; -CRp$6.getFontCache = function (context) { - var cache; - this.fontCaches = this.fontCaches || []; - for (var i = 0; i < this.fontCaches.length; i++) { - cache = this.fontCaches[i]; - if (cache.context === context) { - return cache; - } - } - cache = { - context: context - }; - this.fontCaches.push(cache); - return cache; -}; - -// set up canvas context with font -// returns transformed text string -CRp$6.setupTextStyle = function (context, ele) { - var useEleOpacity = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; - // Font style - var labelStyle = ele.pstyle('font-style').strValue; - var labelSize = ele.pstyle('font-size').pfValue + 'px'; - var labelFamily = ele.pstyle('font-family').strValue; - var labelWeight = ele.pstyle('font-weight').strValue; - var opacity = useEleOpacity ? ele.effectiveOpacity() * ele.pstyle('text-opacity').value : 1; - var outlineOpacity = ele.pstyle('text-outline-opacity').value * opacity; - var color = ele.pstyle('color').value; - var outlineColor = ele.pstyle('text-outline-color').value; - context.font = labelStyle + ' ' + labelWeight + ' ' + labelSize + ' ' + labelFamily; - context.lineJoin = 'round'; // so text outlines aren't jagged - - this.colorFillStyle(context, color[0], color[1], color[2], opacity); - this.colorStrokeStyle(context, outlineColor[0], outlineColor[1], outlineColor[2], outlineOpacity); -}; - -// TODO ensure re-used -function roundRect(ctx, x, y, width, height) { - var radius = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 5; - var stroke = arguments.length > 6 ? arguments[6] : undefined; - ctx.beginPath(); - ctx.moveTo(x + radius, y); - ctx.lineTo(x + width - radius, y); - ctx.quadraticCurveTo(x + width, y, x + width, y + radius); - ctx.lineTo(x + width, y + height - radius); - ctx.quadraticCurveTo(x + width, y + height, x + width - radius, y + height); - ctx.lineTo(x + radius, y + height); - ctx.quadraticCurveTo(x, y + height, x, y + height - radius); - ctx.lineTo(x, y + radius); - ctx.quadraticCurveTo(x, y, x + radius, y); - ctx.closePath(); - if (stroke) ctx.stroke();else ctx.fill(); -} -CRp$6.getTextAngle = function (ele, prefix) { - var theta; - var _p = ele._private; - var rscratch = _p.rscratch; - var pdash = prefix ? prefix + '-' : ''; - var rotation = ele.pstyle(pdash + 'text-rotation'); - var textAngle = getPrefixedProperty(rscratch, 'labelAngle', prefix); - if (rotation.strValue === 'autorotate') { - theta = ele.isEdge() ? textAngle : 0; - } else if (rotation.strValue === 'none') { - theta = 0; - } else { - theta = rotation.pfValue; - } - return theta; -}; -CRp$6.drawText = function (context, ele, prefix) { - var applyRotation = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true; - var useEleOpacity = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true; - var _p = ele._private; - var rscratch = _p.rscratch; - var parentOpacity = useEleOpacity ? ele.effectiveOpacity() : 1; - if (useEleOpacity && (parentOpacity === 0 || ele.pstyle('text-opacity').value === 0)) { - return; - } - - // use 'main' as an alias for the main label (i.e. null prefix) - if (prefix === 'main') { - prefix = null; - } - var textX = getPrefixedProperty(rscratch, 'labelX', prefix); - var textY = getPrefixedProperty(rscratch, 'labelY', prefix); - var orgTextX, orgTextY; // used for rotation - var text = this.getLabelText(ele, prefix); - if (text != null && text !== '' && !isNaN(textX) && !isNaN(textY)) { - this.setupTextStyle(context, ele, useEleOpacity); - var pdash = prefix ? prefix + '-' : ''; - var textW = getPrefixedProperty(rscratch, 'labelWidth', prefix); - var textH = getPrefixedProperty(rscratch, 'labelHeight', prefix); - var marginX = ele.pstyle(pdash + 'text-margin-x').pfValue; - var marginY = ele.pstyle(pdash + 'text-margin-y').pfValue; - var isEdge = ele.isEdge(); - var halign = ele.pstyle('text-halign').value; - var valign = ele.pstyle('text-valign').value; - if (isEdge) { - halign = 'center'; - valign = 'center'; - } - textX += marginX; - textY += marginY; - var theta; - if (!applyRotation) { - theta = 0; - } else { - theta = this.getTextAngle(ele, prefix); - } - if (theta !== 0) { - orgTextX = textX; - orgTextY = textY; - context.translate(orgTextX, orgTextY); - context.rotate(theta); - textX = 0; - textY = 0; - } - switch (valign) { - case 'top': - break; - case 'center': - textY += textH / 2; - break; - case 'bottom': - textY += textH; - break; - } - var backgroundOpacity = ele.pstyle('text-background-opacity').value; - var borderOpacity = ele.pstyle('text-border-opacity').value; - var textBorderWidth = ele.pstyle('text-border-width').pfValue; - var backgroundPadding = ele.pstyle('text-background-padding').pfValue; - var styleShape = ele.pstyle('text-background-shape').strValue; - var rounded = styleShape.indexOf('round') === 0; - var roundRadius = 2; - if (backgroundOpacity > 0 || textBorderWidth > 0 && borderOpacity > 0) { - var bgX = textX - backgroundPadding; - switch (halign) { - case 'left': - bgX -= textW; - break; - case 'center': - bgX -= textW / 2; - break; - } - var bgY = textY - textH - backgroundPadding; - var bgW = textW + 2 * backgroundPadding; - var bgH = textH + 2 * backgroundPadding; - if (backgroundOpacity > 0) { - var textFill = context.fillStyle; - var textBackgroundColor = ele.pstyle('text-background-color').value; - context.fillStyle = 'rgba(' + textBackgroundColor[0] + ',' + textBackgroundColor[1] + ',' + textBackgroundColor[2] + ',' + backgroundOpacity * parentOpacity + ')'; - if (rounded) { - roundRect(context, bgX, bgY, bgW, bgH, roundRadius); - } else { - context.fillRect(bgX, bgY, bgW, bgH); - } - context.fillStyle = textFill; - } - if (textBorderWidth > 0 && borderOpacity > 0) { - var textStroke = context.strokeStyle; - var textLineWidth = context.lineWidth; - var textBorderColor = ele.pstyle('text-border-color').value; - var textBorderStyle = ele.pstyle('text-border-style').value; - context.strokeStyle = 'rgba(' + textBorderColor[0] + ',' + textBorderColor[1] + ',' + textBorderColor[2] + ',' + borderOpacity * parentOpacity + ')'; - context.lineWidth = textBorderWidth; - if (context.setLineDash) { - // for very outofdate browsers - switch (textBorderStyle) { - case 'dotted': - context.setLineDash([1, 1]); - break; - case 'dashed': - context.setLineDash([4, 2]); - break; - case 'double': - context.lineWidth = textBorderWidth / 4; // 50% reserved for white between the two borders - context.setLineDash([]); - break; - case 'solid': - context.setLineDash([]); - break; - } - } - if (rounded) { - roundRect(context, bgX, bgY, bgW, bgH, roundRadius, 'stroke'); - } else { - context.strokeRect(bgX, bgY, bgW, bgH); - } - if (textBorderStyle === 'double') { - var whiteWidth = textBorderWidth / 2; - if (rounded) { - roundRect(context, bgX + whiteWidth, bgY + whiteWidth, bgW - whiteWidth * 2, bgH - whiteWidth * 2, roundRadius, 'stroke'); - } else { - context.strokeRect(bgX + whiteWidth, bgY + whiteWidth, bgW - whiteWidth * 2, bgH - whiteWidth * 2); - } - } - if (context.setLineDash) { - // for very outofdate browsers - context.setLineDash([]); - } - context.lineWidth = textLineWidth; - context.strokeStyle = textStroke; - } - } - var lineWidth = 2 * ele.pstyle('text-outline-width').pfValue; // *2 b/c the stroke is drawn centred on the middle - - if (lineWidth > 0) { - context.lineWidth = lineWidth; - } - if (ele.pstyle('text-wrap').value === 'wrap') { - var lines = getPrefixedProperty(rscratch, 'labelWrapCachedLines', prefix); - var lineHeight = getPrefixedProperty(rscratch, 'labelLineHeight', prefix); - var halfTextW = textW / 2; - var justification = this.getLabelJustification(ele); - if (justification === 'auto') ; else if (halign === 'left') { - // auto justification : right - if (justification === 'left') { - textX += -textW; - } else if (justification === 'center') { - textX += -halfTextW; - } // else same as auto - } else if (halign === 'center') { - // auto justfication : center - if (justification === 'left') { - textX += -halfTextW; - } else if (justification === 'right') { - textX += halfTextW; - } // else same as auto - } else if (halign === 'right') { - // auto justification : left - if (justification === 'center') { - textX += halfTextW; - } else if (justification === 'right') { - textX += textW; - } // else same as auto - } - - switch (valign) { - case 'top': - textY -= (lines.length - 1) * lineHeight; - break; - case 'center': - case 'bottom': - textY -= (lines.length - 1) * lineHeight; - break; - } - for (var l = 0; l < lines.length; l++) { - if (lineWidth > 0) { - context.strokeText(lines[l], textX, textY); - } - context.fillText(lines[l], textX, textY); - textY += lineHeight; - } - } else { - if (lineWidth > 0) { - context.strokeText(text, textX, textY); - } - context.fillText(text, textX, textY); - } - if (theta !== 0) { - context.rotate(-theta); - context.translate(-orgTextX, -orgTextY); - } - } -}; - -/* global Path2D */ -var CRp$5 = {}; -CRp$5.drawNode = function (context, node, shiftToOriginWithBb) { - var drawLabel = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true; - var shouldDrawOverlay = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true; - var shouldDrawOpacity = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true; - var r = this; - var nodeWidth, nodeHeight; - var _p = node._private; - var rs = _p.rscratch; - var pos = node.position(); - if (!number$1(pos.x) || !number$1(pos.y)) { - return; // can't draw node with undefined position - } - - if (shouldDrawOpacity && !node.visible()) { - return; - } - var eleOpacity = shouldDrawOpacity ? node.effectiveOpacity() : 1; - var usePaths = r.usePaths(); - var path; - var pathCacheHit = false; - var padding = node.padding(); - nodeWidth = node.width() + 2 * padding; - nodeHeight = node.height() + 2 * padding; - - // - // setup shift - - var bb; - if (shiftToOriginWithBb) { - bb = shiftToOriginWithBb; - context.translate(-bb.x1, -bb.y1); - } - - // - // load bg image - - var bgImgProp = node.pstyle('background-image'); - var urls = bgImgProp.value; - var urlDefined = new Array(urls.length); - var image = new Array(urls.length); - var numImages = 0; - for (var i = 0; i < urls.length; i++) { - var url = urls[i]; - var defd = urlDefined[i] = url != null && url !== 'none'; - if (defd) { - var bgImgCrossOrigin = node.cy().style().getIndexedStyle(node, 'background-image-crossorigin', 'value', i); - numImages++; - - // get image, and if not loaded then ask to redraw when later loaded - image[i] = r.getCachedImage(url, bgImgCrossOrigin, function () { - _p.backgroundTimestamp = Date.now(); - node.emitAndNotify('background'); - }); - } - } - - // - // setup styles - - var darkness = node.pstyle('background-blacken').value; - var borderWidth = node.pstyle('border-width').pfValue; - var bgOpacity = node.pstyle('background-opacity').value * eleOpacity; - var borderColor = node.pstyle('border-color').value; - var borderStyle = node.pstyle('border-style').value; - var borderJoin = node.pstyle('border-join').value; - var borderCap = node.pstyle('border-cap').value; - var borderPosition = node.pstyle('border-position').value; - var borderPattern = node.pstyle('border-dash-pattern').pfValue; - var borderOffset = node.pstyle('border-dash-offset').pfValue; - var borderOpacity = node.pstyle('border-opacity').value * eleOpacity; - var outlineWidth = node.pstyle('outline-width').pfValue; - var outlineColor = node.pstyle('outline-color').value; - var outlineStyle = node.pstyle('outline-style').value; - var outlineOpacity = node.pstyle('outline-opacity').value * eleOpacity; - var outlineOffset = node.pstyle('outline-offset').value; - var cornerRadius = node.pstyle('corner-radius').value; - if (cornerRadius !== 'auto') cornerRadius = node.pstyle('corner-radius').pfValue; - var setupShapeColor = function setupShapeColor() { - var bgOpy = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : bgOpacity; - r.eleFillStyle(context, node, bgOpy); - }; - var setupBorderColor = function setupBorderColor() { - var bdrOpy = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : borderOpacity; - r.colorStrokeStyle(context, borderColor[0], borderColor[1], borderColor[2], bdrOpy); - }; - var setupOutlineColor = function setupOutlineColor() { - var otlnOpy = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : outlineOpacity; - r.colorStrokeStyle(context, outlineColor[0], outlineColor[1], outlineColor[2], otlnOpy); - }; - - // - // setup shape - - var getPath = function getPath(width, height, shape, points) { - var pathCache = r.nodePathCache = r.nodePathCache || []; - var key = hashStrings(shape === 'polygon' ? shape + ',' + points.join(',') : shape, '' + height, '' + width, '' + cornerRadius); - var cachedPath = pathCache[key]; - var path; - var cacheHit = false; - if (cachedPath != null) { - path = cachedPath; - cacheHit = true; - rs.pathCache = path; - } else { - path = new Path2D(); - pathCache[key] = rs.pathCache = path; - } - return { - path: path, - cacheHit: cacheHit - }; - }; - var styleShape = node.pstyle('shape').strValue; - var shapePts = node.pstyle('shape-polygon-points').pfValue; - if (usePaths) { - context.translate(pos.x, pos.y); - var shapePath = getPath(nodeWidth, nodeHeight, styleShape, shapePts); - path = shapePath.path; - pathCacheHit = shapePath.cacheHit; - } - var drawShape = function drawShape() { - if (!pathCacheHit) { - var npos = pos; - if (usePaths) { - npos = { - x: 0, - y: 0 - }; - } - r.nodeShapes[r.getNodeShape(node)].draw(path || context, npos.x, npos.y, nodeWidth, nodeHeight, cornerRadius, rs); - } - if (usePaths) { - context.fill(path); - } else { - context.fill(); - } - }; - var drawImages = function drawImages() { - var nodeOpacity = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : eleOpacity; - var inside = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; - var prevBging = _p.backgrounding; - var totalCompleted = 0; - for (var _i = 0; _i < image.length; _i++) { - var bgContainment = node.cy().style().getIndexedStyle(node, 'background-image-containment', 'value', _i); - if (inside && bgContainment === 'over' || !inside && bgContainment === 'inside') { - totalCompleted++; - continue; - } - if (urlDefined[_i] && image[_i].complete && !image[_i].error) { - totalCompleted++; - r.drawInscribedImage(context, image[_i], node, _i, nodeOpacity); - } - } - _p.backgrounding = !(totalCompleted === numImages); - if (prevBging !== _p.backgrounding) { - // update style b/c :backgrounding state changed - node.updateStyle(false); - } - }; - var drawPie = function drawPie() { - var redrawShape = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; - var pieOpacity = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : eleOpacity; - if (r.hasPie(node)) { - r.drawPie(context, node, pieOpacity); - - // redraw/restore path if steps after pie need it - if (redrawShape) { - if (!usePaths) { - r.nodeShapes[r.getNodeShape(node)].draw(context, pos.x, pos.y, nodeWidth, nodeHeight, cornerRadius, rs); - } - } - } - }; - var darken = function darken() { - var darkenOpacity = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : eleOpacity; - var opacity = (darkness > 0 ? darkness : -darkness) * darkenOpacity; - var c = darkness > 0 ? 0 : 255; - if (darkness !== 0) { - r.colorFillStyle(context, c, c, c, opacity); - if (usePaths) { - context.fill(path); - } else { - context.fill(); - } - } - }; - var drawBorder = function drawBorder() { - if (borderWidth > 0) { - context.lineWidth = borderWidth; - context.lineCap = borderCap; - context.lineJoin = borderJoin; - if (context.setLineDash) { - // for very outofdate browsers - switch (borderStyle) { - case 'dotted': - context.setLineDash([1, 1]); - break; - case 'dashed': - context.setLineDash(borderPattern); - context.lineDashOffset = borderOffset; - break; - case 'solid': - case 'double': - context.setLineDash([]); - break; - } - } - if (borderPosition !== 'center') { - context.save(); - context.lineWidth *= 2; - if (borderPosition === 'inside') { - usePaths ? context.clip(path) : context.clip(); - } else { - var region = new Path2D(); - region.rect(-nodeWidth / 2 - borderWidth, -nodeHeight / 2 - borderWidth, nodeWidth + 2 * borderWidth, nodeHeight + 2 * borderWidth); - region.addPath(path); - context.clip(region, 'evenodd'); - } - usePaths ? context.stroke(path) : context.stroke(); - context.restore(); - } else { - usePaths ? context.stroke(path) : context.stroke(); - } - if (borderStyle === 'double') { - context.lineWidth = borderWidth / 3; - var gco = context.globalCompositeOperation; - context.globalCompositeOperation = 'destination-out'; - if (usePaths) { - context.stroke(path); - } else { - context.stroke(); - } - context.globalCompositeOperation = gco; - } - - // reset in case we changed the border style - if (context.setLineDash) { - // for very outofdate browsers - context.setLineDash([]); - } - } - }; - var drawOutline = function drawOutline() { - if (outlineWidth > 0) { - context.lineWidth = outlineWidth; - context.lineCap = 'butt'; - if (context.setLineDash) { - // for very outofdate browsers - switch (outlineStyle) { - case 'dotted': - context.setLineDash([1, 1]); - break; - case 'dashed': - context.setLineDash([4, 2]); - break; - case 'solid': - case 'double': - context.setLineDash([]); - break; - } - } - var npos = pos; - if (usePaths) { - npos = { - x: 0, - y: 0 - }; - } - var shape = r.getNodeShape(node); - var bWidth = borderWidth; - if (borderPosition === 'inside') bWidth = 0; - if (borderPosition === 'outside') bWidth *= 2; - var scaleX = (nodeWidth + bWidth + (outlineWidth + outlineOffset)) / nodeWidth; - var scaleY = (nodeHeight + bWidth + (outlineWidth + outlineOffset)) / nodeHeight; - var sWidth = nodeWidth * scaleX; - var sHeight = nodeHeight * scaleY; - var points = r.nodeShapes[shape].points; - var _path; - if (usePaths) { - var outlinePath = getPath(sWidth, sHeight, shape, points); - _path = outlinePath.path; - } - - // draw the outline path, either by using expanded points or by scaling - // the dimensions, depending on shape - if (shape === "ellipse") { - r.drawEllipsePath(_path || context, npos.x, npos.y, sWidth, sHeight); - } else if (['round-diamond', 'round-heptagon', 'round-hexagon', 'round-octagon', 'round-pentagon', 'round-polygon', 'round-triangle', 'round-tag'].includes(shape)) { - var sMult = 0; - var offsetX = 0; - var offsetY = 0; - if (shape === 'round-diamond') { - sMult = (bWidth + outlineOffset + outlineWidth) * 1.4; - } else if (shape === 'round-heptagon') { - sMult = (bWidth + outlineOffset + outlineWidth) * 1.075; - offsetY = -(bWidth / 2 + outlineOffset + outlineWidth) / 35; - } else if (shape === 'round-hexagon') { - sMult = (bWidth + outlineOffset + outlineWidth) * 1.12; - } else if (shape === 'round-pentagon') { - sMult = (bWidth + outlineOffset + outlineWidth) * 1.13; - offsetY = -(bWidth / 2 + outlineOffset + outlineWidth) / 15; - } else if (shape === 'round-tag') { - sMult = (bWidth + outlineOffset + outlineWidth) * 1.12; - offsetX = (bWidth / 2 + outlineWidth + outlineOffset) * .07; - } else if (shape === 'round-triangle') { - sMult = (bWidth + outlineOffset + outlineWidth) * (Math.PI / 2); - offsetY = -(bWidth + outlineOffset / 2 + outlineWidth) / Math.PI; - } - if (sMult !== 0) { - scaleX = (nodeWidth + sMult) / nodeWidth; - sWidth = nodeWidth * scaleX; - if (!['round-hexagon', 'round-tag'].includes(shape)) { - scaleY = (nodeHeight + sMult) / nodeHeight; - sHeight = nodeHeight * scaleY; - } - } - cornerRadius = cornerRadius === 'auto' ? getRoundPolygonRadius(sWidth, sHeight) : cornerRadius; - var halfW = sWidth / 2; - var halfH = sHeight / 2; - var radius = cornerRadius + (bWidth + outlineWidth + outlineOffset) / 2; - var p = new Array(points.length / 2); - var corners = new Array(points.length / 2); - for (var _i3 = 0; _i3 < points.length / 2; _i3++) { - p[_i3] = { - x: npos.x + offsetX + halfW * points[_i3 * 2], - y: npos.y + offsetY + halfH * points[_i3 * 2 + 1] - }; - } - var _i2, - p1, - p2, - p3, - len = p.length; - p1 = p[len - 1]; - // for each point - for (_i2 = 0; _i2 < len; _i2++) { - p2 = p[_i2 % len]; - p3 = p[(_i2 + 1) % len]; - corners[_i2] = getRoundCorner(p1, p2, p3, radius); - p1 = p2; - p2 = p3; - } - r.drawRoundPolygonPath(_path || context, npos.x + offsetX, npos.y + offsetY, nodeWidth * scaleX, nodeHeight * scaleY, points, corners); - } else if (['roundrectangle', 'round-rectangle'].includes(shape)) { - cornerRadius = cornerRadius === 'auto' ? getRoundRectangleRadius(sWidth, sHeight) : cornerRadius; - r.drawRoundRectanglePath(_path || context, npos.x, npos.y, sWidth, sHeight, cornerRadius + (bWidth + outlineWidth + outlineOffset) / 2); - } else if (['cutrectangle', 'cut-rectangle'].includes(shape)) { - cornerRadius = cornerRadius === 'auto' ? getCutRectangleCornerLength() : cornerRadius; - r.drawCutRectanglePath(_path || context, npos.x, npos.y, sWidth, sHeight, null, cornerRadius + (bWidth + outlineWidth + outlineOffset) / 4); - } else if (['bottomroundrectangle', 'bottom-round-rectangle'].includes(shape)) { - cornerRadius = cornerRadius === 'auto' ? getRoundRectangleRadius(sWidth, sHeight) : cornerRadius; - r.drawBottomRoundRectanglePath(_path || context, npos.x, npos.y, sWidth, sHeight, cornerRadius + (bWidth + outlineWidth + outlineOffset) / 2); - } else if (shape === "barrel") { - r.drawBarrelPath(_path || context, npos.x, npos.y, sWidth, sHeight); - } else if (shape.startsWith("polygon") || ['rhomboid', 'right-rhomboid', 'round-tag', 'tag', 'vee'].includes(shape)) { - var pad = (bWidth + outlineWidth + outlineOffset) / nodeWidth; - points = joinLines(expandPolygon(points, pad)); - r.drawPolygonPath(_path || context, npos.x, npos.y, nodeWidth, nodeHeight, points); - } else { - var _pad = (bWidth + outlineWidth + outlineOffset) / nodeWidth; - points = joinLines(expandPolygon(points, -_pad)); - r.drawPolygonPath(_path || context, npos.x, npos.y, nodeWidth, nodeHeight, points); - } - if (usePaths) { - context.stroke(_path); - } else { - context.stroke(); - } - if (outlineStyle === 'double') { - context.lineWidth = bWidth / 3; - var gco = context.globalCompositeOperation; - context.globalCompositeOperation = 'destination-out'; - if (usePaths) { - context.stroke(_path); - } else { - context.stroke(); - } - context.globalCompositeOperation = gco; - } - - // reset in case we changed the border style - if (context.setLineDash) { - // for very outofdate browsers - context.setLineDash([]); - } - } - }; - var drawOverlay = function drawOverlay() { - if (shouldDrawOverlay) { - r.drawNodeOverlay(context, node, pos, nodeWidth, nodeHeight); - } - }; - var drawUnderlay = function drawUnderlay() { - if (shouldDrawOverlay) { - r.drawNodeUnderlay(context, node, pos, nodeWidth, nodeHeight); - } - }; - var drawText = function drawText() { - r.drawElementText(context, node, null, drawLabel); - }; - var ghost = node.pstyle('ghost').value === 'yes'; - if (ghost) { - var gx = node.pstyle('ghost-offset-x').pfValue; - var gy = node.pstyle('ghost-offset-y').pfValue; - var ghostOpacity = node.pstyle('ghost-opacity').value; - var effGhostOpacity = ghostOpacity * eleOpacity; - context.translate(gx, gy); - setupOutlineColor(); - drawOutline(); - setupShapeColor(ghostOpacity * bgOpacity); - drawShape(); - drawImages(effGhostOpacity, true); - setupBorderColor(ghostOpacity * borderOpacity); - drawBorder(); - drawPie(darkness !== 0 || borderWidth !== 0); - drawImages(effGhostOpacity, false); - darken(effGhostOpacity); - context.translate(-gx, -gy); - } - if (usePaths) { - context.translate(-pos.x, -pos.y); - } - drawUnderlay(); - if (usePaths) { - context.translate(pos.x, pos.y); - } - setupOutlineColor(); - drawOutline(); - setupShapeColor(); - drawShape(); - drawImages(eleOpacity, true); - setupBorderColor(); - drawBorder(); - drawPie(darkness !== 0 || borderWidth !== 0); - drawImages(eleOpacity, false); - darken(); - if (usePaths) { - context.translate(-pos.x, -pos.y); - } - drawText(); - drawOverlay(); - - // - // clean up shift - - if (shiftToOriginWithBb) { - context.translate(bb.x1, bb.y1); - } -}; -var drawNodeOverlayUnderlay = function drawNodeOverlayUnderlay(overlayOrUnderlay) { - if (!['overlay', 'underlay'].includes(overlayOrUnderlay)) { - throw new Error('Invalid state'); - } - return function (context, node, pos, nodeWidth, nodeHeight) { - var r = this; - if (!node.visible()) { - return; - } - var padding = node.pstyle("".concat(overlayOrUnderlay, "-padding")).pfValue; - var opacity = node.pstyle("".concat(overlayOrUnderlay, "-opacity")).value; - var color = node.pstyle("".concat(overlayOrUnderlay, "-color")).value; - var shape = node.pstyle("".concat(overlayOrUnderlay, "-shape")).value; - var radius = node.pstyle("".concat(overlayOrUnderlay, "-corner-radius")).value; - if (opacity > 0) { - pos = pos || node.position(); - if (nodeWidth == null || nodeHeight == null) { - var _padding = node.padding(); - nodeWidth = node.width() + 2 * _padding; - nodeHeight = node.height() + 2 * _padding; - } - r.colorFillStyle(context, color[0], color[1], color[2], opacity); - r.nodeShapes[shape].draw(context, pos.x, pos.y, nodeWidth + padding * 2, nodeHeight + padding * 2, radius); - context.fill(); - } - }; -}; -CRp$5.drawNodeOverlay = drawNodeOverlayUnderlay('overlay'); -CRp$5.drawNodeUnderlay = drawNodeOverlayUnderlay('underlay'); - -// does the node have at least one pie piece? -CRp$5.hasPie = function (node) { - node = node[0]; // ensure ele ref - - return node._private.hasPie; -}; -CRp$5.drawPie = function (context, node, nodeOpacity, pos) { - node = node[0]; // ensure ele ref - pos = pos || node.position(); - var cyStyle = node.cy().style(); - var pieSize = node.pstyle('pie-size'); - var x = pos.x; - var y = pos.y; - var nodeW = node.width(); - var nodeH = node.height(); - var radius = Math.min(nodeW, nodeH) / 2; // must fit in node - var lastPercent = 0; // what % to continue drawing pie slices from on [0, 1] - var usePaths = this.usePaths(); - if (usePaths) { - x = 0; - y = 0; - } - if (pieSize.units === '%') { - radius = radius * pieSize.pfValue; - } else if (pieSize.pfValue !== undefined) { - radius = pieSize.pfValue / 2; - } - for (var i = 1; i <= cyStyle.pieBackgroundN; i++) { - // 1..N - var size = node.pstyle('pie-' + i + '-background-size').value; - var color = node.pstyle('pie-' + i + '-background-color').value; - var opacity = node.pstyle('pie-' + i + '-background-opacity').value * nodeOpacity; - var percent = size / 100; // map integer range [0, 100] to [0, 1] - - // percent can't push beyond 1 - if (percent + lastPercent > 1) { - percent = 1 - lastPercent; - } - var angleStart = 1.5 * Math.PI + 2 * Math.PI * lastPercent; // start at 12 o'clock and go clockwise - var angleDelta = 2 * Math.PI * percent; - var angleEnd = angleStart + angleDelta; - - // ignore if - // - zero size - // - we're already beyond the full circle - // - adding the current slice would go beyond the full circle - if (size === 0 || lastPercent >= 1 || lastPercent + percent > 1) { - continue; - } - context.beginPath(); - context.moveTo(x, y); - context.arc(x, y, radius, angleStart, angleEnd); - context.closePath(); - this.colorFillStyle(context, color[0], color[1], color[2], opacity); - context.fill(); - lastPercent += percent; - } -}; - -var CRp$4 = {}; -var motionBlurDelay = 100; - -// var isFirefox = typeof InstallTrigger !== 'undefined'; - -CRp$4.getPixelRatio = function () { - var context = this.data.contexts[0]; - if (this.forcedPixelRatio != null) { - return this.forcedPixelRatio; - } - var containerWindow = this.cy.window(); - var backingStore = context.backingStorePixelRatio || context.webkitBackingStorePixelRatio || context.mozBackingStorePixelRatio || context.msBackingStorePixelRatio || context.oBackingStorePixelRatio || context.backingStorePixelRatio || 1; - return (containerWindow.devicePixelRatio || 1) / backingStore; // eslint-disable-line no-undef -}; - -CRp$4.paintCache = function (context) { - var caches = this.paintCaches = this.paintCaches || []; - var needToCreateCache = true; - var cache; - for (var i = 0; i < caches.length; i++) { - cache = caches[i]; - if (cache.context === context) { - needToCreateCache = false; - break; - } - } - if (needToCreateCache) { - cache = { - context: context - }; - caches.push(cache); - } - return cache; -}; -CRp$4.createGradientStyleFor = function (context, shapeStyleName, ele, fill, opacity) { - var gradientStyle; - var usePaths = this.usePaths(); - var colors = ele.pstyle(shapeStyleName + '-gradient-stop-colors').value, - positions = ele.pstyle(shapeStyleName + '-gradient-stop-positions').pfValue; - if (fill === 'radial-gradient') { - if (ele.isEdge()) { - var start = ele.sourceEndpoint(), - end = ele.targetEndpoint(), - mid = ele.midpoint(); - var d1 = dist(start, mid); - var d2 = dist(end, mid); - gradientStyle = context.createRadialGradient(mid.x, mid.y, 0, mid.x, mid.y, Math.max(d1, d2)); - } else { - var pos = usePaths ? { - x: 0, - y: 0 - } : ele.position(), - width = ele.paddedWidth(), - height = ele.paddedHeight(); - gradientStyle = context.createRadialGradient(pos.x, pos.y, 0, pos.x, pos.y, Math.max(width, height)); - } - } else { - if (ele.isEdge()) { - var _start = ele.sourceEndpoint(), - _end = ele.targetEndpoint(); - gradientStyle = context.createLinearGradient(_start.x, _start.y, _end.x, _end.y); - } else { - var _pos = usePaths ? { - x: 0, - y: 0 - } : ele.position(), - _width = ele.paddedWidth(), - _height = ele.paddedHeight(), - halfWidth = _width / 2, - halfHeight = _height / 2; - var direction = ele.pstyle('background-gradient-direction').value; - switch (direction) { - case 'to-bottom': - gradientStyle = context.createLinearGradient(_pos.x, _pos.y - halfHeight, _pos.x, _pos.y + halfHeight); - break; - case 'to-top': - gradientStyle = context.createLinearGradient(_pos.x, _pos.y + halfHeight, _pos.x, _pos.y - halfHeight); - break; - case 'to-left': - gradientStyle = context.createLinearGradient(_pos.x + halfWidth, _pos.y, _pos.x - halfWidth, _pos.y); - break; - case 'to-right': - gradientStyle = context.createLinearGradient(_pos.x - halfWidth, _pos.y, _pos.x + halfWidth, _pos.y); - break; - case 'to-bottom-right': - case 'to-right-bottom': - gradientStyle = context.createLinearGradient(_pos.x - halfWidth, _pos.y - halfHeight, _pos.x + halfWidth, _pos.y + halfHeight); - break; - case 'to-top-right': - case 'to-right-top': - gradientStyle = context.createLinearGradient(_pos.x - halfWidth, _pos.y + halfHeight, _pos.x + halfWidth, _pos.y - halfHeight); - break; - case 'to-bottom-left': - case 'to-left-bottom': - gradientStyle = context.createLinearGradient(_pos.x + halfWidth, _pos.y - halfHeight, _pos.x - halfWidth, _pos.y + halfHeight); - break; - case 'to-top-left': - case 'to-left-top': - gradientStyle = context.createLinearGradient(_pos.x + halfWidth, _pos.y + halfHeight, _pos.x - halfWidth, _pos.y - halfHeight); - break; - } - } - } - if (!gradientStyle) return null; // invalid gradient style - - var hasPositions = positions.length === colors.length; - var length = colors.length; - for (var i = 0; i < length; i++) { - gradientStyle.addColorStop(hasPositions ? positions[i] : i / (length - 1), 'rgba(' + colors[i][0] + ',' + colors[i][1] + ',' + colors[i][2] + ',' + opacity + ')'); - } - return gradientStyle; -}; -CRp$4.gradientFillStyle = function (context, ele, fill, opacity) { - var gradientStyle = this.createGradientStyleFor(context, 'background', ele, fill, opacity); - if (!gradientStyle) return null; // error - context.fillStyle = gradientStyle; -}; -CRp$4.colorFillStyle = function (context, r, g, b, a) { - context.fillStyle = 'rgba(' + r + ',' + g + ',' + b + ',' + a + ')'; - // turn off for now, seems context does its own caching - - // var cache = this.paintCache(context); - - // var fillStyle = 'rgba(' + r + ',' + g + ',' + b + ',' + a + ')'; - - // if( cache.fillStyle !== fillStyle ){ - // context.fillStyle = cache.fillStyle = fillStyle; - // } -}; - -CRp$4.eleFillStyle = function (context, ele, opacity) { - var backgroundFill = ele.pstyle('background-fill').value; - if (backgroundFill === 'linear-gradient' || backgroundFill === 'radial-gradient') { - this.gradientFillStyle(context, ele, backgroundFill, opacity); - } else { - var backgroundColor = ele.pstyle('background-color').value; - this.colorFillStyle(context, backgroundColor[0], backgroundColor[1], backgroundColor[2], opacity); - } -}; -CRp$4.gradientStrokeStyle = function (context, ele, fill, opacity) { - var gradientStyle = this.createGradientStyleFor(context, 'line', ele, fill, opacity); - if (!gradientStyle) return null; // error - context.strokeStyle = gradientStyle; -}; -CRp$4.colorStrokeStyle = function (context, r, g, b, a) { - context.strokeStyle = 'rgba(' + r + ',' + g + ',' + b + ',' + a + ')'; - // turn off for now, seems context does its own caching - - // var cache = this.paintCache(context); - - // var strokeStyle = 'rgba(' + r + ',' + g + ',' + b + ',' + a + ')'; - - // if( cache.strokeStyle !== strokeStyle ){ - // context.strokeStyle = cache.strokeStyle = strokeStyle; - // } -}; - -CRp$4.eleStrokeStyle = function (context, ele, opacity) { - var lineFill = ele.pstyle('line-fill').value; - if (lineFill === 'linear-gradient' || lineFill === 'radial-gradient') { - this.gradientStrokeStyle(context, ele, lineFill, opacity); - } else { - var lineColor = ele.pstyle('line-color').value; - this.colorStrokeStyle(context, lineColor[0], lineColor[1], lineColor[2], opacity); - } -}; - -// Resize canvas -CRp$4.matchCanvasSize = function (container) { - var r = this; - var data = r.data; - var bb = r.findContainerClientCoords(); - var width = bb[2]; - var height = bb[3]; - var pixelRatio = r.getPixelRatio(); - var mbPxRatio = r.motionBlurPxRatio; - if (container === r.data.bufferCanvases[r.MOTIONBLUR_BUFFER_NODE] || container === r.data.bufferCanvases[r.MOTIONBLUR_BUFFER_DRAG]) { - pixelRatio = mbPxRatio; - } - var canvasWidth = width * pixelRatio; - var canvasHeight = height * pixelRatio; - var canvas; - if (canvasWidth === r.canvasWidth && canvasHeight === r.canvasHeight) { - return; // save cycles if same - } - - r.fontCaches = null; // resizing resets the style - - var canvasContainer = data.canvasContainer; - canvasContainer.style.width = width + 'px'; - canvasContainer.style.height = height + 'px'; - for (var i = 0; i < r.CANVAS_LAYERS; i++) { - canvas = data.canvases[i]; - canvas.width = canvasWidth; - canvas.height = canvasHeight; - canvas.style.width = width + 'px'; - canvas.style.height = height + 'px'; - } - for (var i = 0; i < r.BUFFER_COUNT; i++) { - canvas = data.bufferCanvases[i]; - canvas.width = canvasWidth; - canvas.height = canvasHeight; - canvas.style.width = width + 'px'; - canvas.style.height = height + 'px'; - } - r.textureMult = 1; - if (pixelRatio <= 1) { - canvas = data.bufferCanvases[r.TEXTURE_BUFFER]; - r.textureMult = 2; - canvas.width = canvasWidth * r.textureMult; - canvas.height = canvasHeight * r.textureMult; - } - r.canvasWidth = canvasWidth; - r.canvasHeight = canvasHeight; -}; -CRp$4.renderTo = function (cxt, zoom, pan, pxRatio) { - this.render({ - forcedContext: cxt, - forcedZoom: zoom, - forcedPan: pan, - drawAllLayers: true, - forcedPxRatio: pxRatio - }); -}; -CRp$4.render = function (options) { - options = options || staticEmptyObject(); - var forcedContext = options.forcedContext; - var drawAllLayers = options.drawAllLayers; - var drawOnlyNodeLayer = options.drawOnlyNodeLayer; - var forcedZoom = options.forcedZoom; - var forcedPan = options.forcedPan; - var r = this; - var pixelRatio = options.forcedPxRatio === undefined ? this.getPixelRatio() : options.forcedPxRatio; - var cy = r.cy; - var data = r.data; - var needDraw = data.canvasNeedsRedraw; - var textureDraw = r.textureOnViewport && !forcedContext && (r.pinching || r.hoverData.dragging || r.swipePanning || r.data.wheelZooming); - var motionBlur = options.motionBlur !== undefined ? options.motionBlur : r.motionBlur; - var mbPxRatio = r.motionBlurPxRatio; - var hasCompoundNodes = cy.hasCompoundNodes(); - var inNodeDragGesture = r.hoverData.draggingEles; - var inBoxSelection = r.hoverData.selecting || r.touchData.selecting ? true : false; - motionBlur = motionBlur && !forcedContext && r.motionBlurEnabled && !inBoxSelection; - var motionBlurFadeEffect = motionBlur; - if (!forcedContext) { - if (r.prevPxRatio !== pixelRatio) { - r.invalidateContainerClientCoordsCache(); - r.matchCanvasSize(r.container); - r.redrawHint('eles', true); - r.redrawHint('drag', true); - } - r.prevPxRatio = pixelRatio; - } - if (!forcedContext && r.motionBlurTimeout) { - clearTimeout(r.motionBlurTimeout); - } - if (motionBlur) { - if (r.mbFrames == null) { - r.mbFrames = 0; - } - r.mbFrames++; - if (r.mbFrames < 3) { - // need several frames before even high quality motionblur - motionBlurFadeEffect = false; - } - - // go to lower quality blurry frames when several m/b frames have been rendered (avoids flashing) - if (r.mbFrames > r.minMbLowQualFrames) { - //r.fullQualityMb = false; - r.motionBlurPxRatio = r.mbPxRBlurry; - } - } - if (r.clearingMotionBlur) { - r.motionBlurPxRatio = 1; - } - - // b/c drawToContext() may be async w.r.t. redraw(), keep track of last texture frame - // because a rogue async texture frame would clear needDraw - if (r.textureDrawLastFrame && !textureDraw) { - needDraw[r.NODE] = true; - needDraw[r.SELECT_BOX] = true; - } - var style = cy.style(); - var zoom = cy.zoom(); - var effectiveZoom = forcedZoom !== undefined ? forcedZoom : zoom; - var pan = cy.pan(); - var effectivePan = { - x: pan.x, - y: pan.y - }; - var vp = { - zoom: zoom, - pan: { - x: pan.x, - y: pan.y - } - }; - var prevVp = r.prevViewport; - var viewportIsDiff = prevVp === undefined || vp.zoom !== prevVp.zoom || vp.pan.x !== prevVp.pan.x || vp.pan.y !== prevVp.pan.y; - - // we want the low quality motionblur only when the viewport is being manipulated etc (where it's not noticed) - if (!viewportIsDiff && !(inNodeDragGesture && !hasCompoundNodes)) { - r.motionBlurPxRatio = 1; - } - if (forcedPan) { - effectivePan = forcedPan; - } - - // apply pixel ratio - - effectiveZoom *= pixelRatio; - effectivePan.x *= pixelRatio; - effectivePan.y *= pixelRatio; - var eles = r.getCachedZSortedEles(); - function mbclear(context, x, y, w, h) { - var gco = context.globalCompositeOperation; - context.globalCompositeOperation = 'destination-out'; - r.colorFillStyle(context, 255, 255, 255, r.motionBlurTransparency); - context.fillRect(x, y, w, h); - context.globalCompositeOperation = gco; - } - function setContextTransform(context, clear) { - var ePan, eZoom, w, h; - if (!r.clearingMotionBlur && (context === data.bufferContexts[r.MOTIONBLUR_BUFFER_NODE] || context === data.bufferContexts[r.MOTIONBLUR_BUFFER_DRAG])) { - ePan = { - x: pan.x * mbPxRatio, - y: pan.y * mbPxRatio - }; - eZoom = zoom * mbPxRatio; - w = r.canvasWidth * mbPxRatio; - h = r.canvasHeight * mbPxRatio; - } else { - ePan = effectivePan; - eZoom = effectiveZoom; - w = r.canvasWidth; - h = r.canvasHeight; - } - context.setTransform(1, 0, 0, 1, 0, 0); - if (clear === 'motionBlur') { - mbclear(context, 0, 0, w, h); - } else if (!forcedContext && (clear === undefined || clear)) { - context.clearRect(0, 0, w, h); - } - if (!drawAllLayers) { - context.translate(ePan.x, ePan.y); - context.scale(eZoom, eZoom); - } - if (forcedPan) { - context.translate(forcedPan.x, forcedPan.y); - } - if (forcedZoom) { - context.scale(forcedZoom, forcedZoom); - } - } - if (!textureDraw) { - r.textureDrawLastFrame = false; - } - if (textureDraw) { - r.textureDrawLastFrame = true; - if (!r.textureCache) { - r.textureCache = {}; - r.textureCache.bb = cy.mutableElements().boundingBox(); - r.textureCache.texture = r.data.bufferCanvases[r.TEXTURE_BUFFER]; - var cxt = r.data.bufferContexts[r.TEXTURE_BUFFER]; - cxt.setTransform(1, 0, 0, 1, 0, 0); - cxt.clearRect(0, 0, r.canvasWidth * r.textureMult, r.canvasHeight * r.textureMult); - r.render({ - forcedContext: cxt, - drawOnlyNodeLayer: true, - forcedPxRatio: pixelRatio * r.textureMult - }); - var vp = r.textureCache.viewport = { - zoom: cy.zoom(), - pan: cy.pan(), - width: r.canvasWidth, - height: r.canvasHeight - }; - vp.mpan = { - x: (0 - vp.pan.x) / vp.zoom, - y: (0 - vp.pan.y) / vp.zoom - }; - } - needDraw[r.DRAG] = false; - needDraw[r.NODE] = false; - var context = data.contexts[r.NODE]; - var texture = r.textureCache.texture; - var vp = r.textureCache.viewport; - context.setTransform(1, 0, 0, 1, 0, 0); - if (motionBlur) { - mbclear(context, 0, 0, vp.width, vp.height); - } else { - context.clearRect(0, 0, vp.width, vp.height); - } - var outsideBgColor = style.core('outside-texture-bg-color').value; - var outsideBgOpacity = style.core('outside-texture-bg-opacity').value; - r.colorFillStyle(context, outsideBgColor[0], outsideBgColor[1], outsideBgColor[2], outsideBgOpacity); - context.fillRect(0, 0, vp.width, vp.height); - var zoom = cy.zoom(); - setContextTransform(context, false); - context.clearRect(vp.mpan.x, vp.mpan.y, vp.width / vp.zoom / pixelRatio, vp.height / vp.zoom / pixelRatio); - context.drawImage(texture, vp.mpan.x, vp.mpan.y, vp.width / vp.zoom / pixelRatio, vp.height / vp.zoom / pixelRatio); - } else if (r.textureOnViewport && !forcedContext) { - // clear the cache since we don't need it - r.textureCache = null; - } - var extent = cy.extent(); - var vpManip = r.pinching || r.hoverData.dragging || r.swipePanning || r.data.wheelZooming || r.hoverData.draggingEles || r.cy.animated(); - var hideEdges = r.hideEdgesOnViewport && vpManip; - var needMbClear = []; - needMbClear[r.NODE] = !needDraw[r.NODE] && motionBlur && !r.clearedForMotionBlur[r.NODE] || r.clearingMotionBlur; - if (needMbClear[r.NODE]) { - r.clearedForMotionBlur[r.NODE] = true; - } - needMbClear[r.DRAG] = !needDraw[r.DRAG] && motionBlur && !r.clearedForMotionBlur[r.DRAG] || r.clearingMotionBlur; - if (needMbClear[r.DRAG]) { - r.clearedForMotionBlur[r.DRAG] = true; - } - if (needDraw[r.NODE] || drawAllLayers || drawOnlyNodeLayer || needMbClear[r.NODE]) { - var useBuffer = motionBlur && !needMbClear[r.NODE] && mbPxRatio !== 1; - var context = forcedContext || (useBuffer ? r.data.bufferContexts[r.MOTIONBLUR_BUFFER_NODE] : data.contexts[r.NODE]); - var clear = motionBlur && !useBuffer ? 'motionBlur' : undefined; - setContextTransform(context, clear); - if (hideEdges) { - r.drawCachedNodes(context, eles.nondrag, pixelRatio, extent); - } else { - r.drawLayeredElements(context, eles.nondrag, pixelRatio, extent); - } - if (r.debug) { - r.drawDebugPoints(context, eles.nondrag); - } - if (!drawAllLayers && !motionBlur) { - needDraw[r.NODE] = false; - } - } - if (!drawOnlyNodeLayer && (needDraw[r.DRAG] || drawAllLayers || needMbClear[r.DRAG])) { - var useBuffer = motionBlur && !needMbClear[r.DRAG] && mbPxRatio !== 1; - var context = forcedContext || (useBuffer ? r.data.bufferContexts[r.MOTIONBLUR_BUFFER_DRAG] : data.contexts[r.DRAG]); - setContextTransform(context, motionBlur && !useBuffer ? 'motionBlur' : undefined); - if (hideEdges) { - r.drawCachedNodes(context, eles.drag, pixelRatio, extent); - } else { - r.drawCachedElements(context, eles.drag, pixelRatio, extent); - } - if (r.debug) { - r.drawDebugPoints(context, eles.drag); - } - if (!drawAllLayers && !motionBlur) { - needDraw[r.DRAG] = false; - } - } - if (r.showFps || !drawOnlyNodeLayer && needDraw[r.SELECT_BOX] && !drawAllLayers) { - var context = forcedContext || data.contexts[r.SELECT_BOX]; - setContextTransform(context); - if (r.selection[4] == 1 && (r.hoverData.selecting || r.touchData.selecting)) { - var zoom = r.cy.zoom(); - var borderWidth = style.core('selection-box-border-width').value / zoom; - context.lineWidth = borderWidth; - context.fillStyle = 'rgba(' + style.core('selection-box-color').value[0] + ',' + style.core('selection-box-color').value[1] + ',' + style.core('selection-box-color').value[2] + ',' + style.core('selection-box-opacity').value + ')'; - context.fillRect(r.selection[0], r.selection[1], r.selection[2] - r.selection[0], r.selection[3] - r.selection[1]); - if (borderWidth > 0) { - context.strokeStyle = 'rgba(' + style.core('selection-box-border-color').value[0] + ',' + style.core('selection-box-border-color').value[1] + ',' + style.core('selection-box-border-color').value[2] + ',' + style.core('selection-box-opacity').value + ')'; - context.strokeRect(r.selection[0], r.selection[1], r.selection[2] - r.selection[0], r.selection[3] - r.selection[1]); - } - } - if (data.bgActivePosistion && !r.hoverData.selecting) { - var zoom = r.cy.zoom(); - var pos = data.bgActivePosistion; - context.fillStyle = 'rgba(' + style.core('active-bg-color').value[0] + ',' + style.core('active-bg-color').value[1] + ',' + style.core('active-bg-color').value[2] + ',' + style.core('active-bg-opacity').value + ')'; - context.beginPath(); - context.arc(pos.x, pos.y, style.core('active-bg-size').pfValue / zoom, 0, 2 * Math.PI); - context.fill(); - } - var timeToRender = r.lastRedrawTime; - if (r.showFps && timeToRender) { - timeToRender = Math.round(timeToRender); - var fps = Math.round(1000 / timeToRender); - context.setTransform(1, 0, 0, 1, 0, 0); - context.fillStyle = 'rgba(255, 0, 0, 0.75)'; - context.strokeStyle = 'rgba(255, 0, 0, 0.75)'; - context.lineWidth = 1; - context.fillText('1 frame = ' + timeToRender + ' ms = ' + fps + ' fps', 0, 20); - var maxFps = 60; - context.strokeRect(0, 30, 250, 20); - context.fillRect(0, 30, 250 * Math.min(fps / maxFps, 1), 20); - } - if (!drawAllLayers) { - needDraw[r.SELECT_BOX] = false; - } - } - - // motionblur: blit rendered blurry frames - if (motionBlur && mbPxRatio !== 1) { - var cxtNode = data.contexts[r.NODE]; - var txtNode = r.data.bufferCanvases[r.MOTIONBLUR_BUFFER_NODE]; - var cxtDrag = data.contexts[r.DRAG]; - var txtDrag = r.data.bufferCanvases[r.MOTIONBLUR_BUFFER_DRAG]; - var drawMotionBlur = function drawMotionBlur(cxt, txt, needClear) { - cxt.setTransform(1, 0, 0, 1, 0, 0); - if (needClear || !motionBlurFadeEffect) { - cxt.clearRect(0, 0, r.canvasWidth, r.canvasHeight); - } else { - mbclear(cxt, 0, 0, r.canvasWidth, r.canvasHeight); - } - var pxr = mbPxRatio; - cxt.drawImage(txt, - // img - 0, 0, - // sx, sy - r.canvasWidth * pxr, r.canvasHeight * pxr, - // sw, sh - 0, 0, - // x, y - r.canvasWidth, r.canvasHeight // w, h - ); - }; - - if (needDraw[r.NODE] || needMbClear[r.NODE]) { - drawMotionBlur(cxtNode, txtNode, needMbClear[r.NODE]); - needDraw[r.NODE] = false; - } - if (needDraw[r.DRAG] || needMbClear[r.DRAG]) { - drawMotionBlur(cxtDrag, txtDrag, needMbClear[r.DRAG]); - needDraw[r.DRAG] = false; - } - } - r.prevViewport = vp; - if (r.clearingMotionBlur) { - r.clearingMotionBlur = false; - r.motionBlurCleared = true; - r.motionBlur = true; - } - if (motionBlur) { - r.motionBlurTimeout = setTimeout(function () { - r.motionBlurTimeout = null; - r.clearedForMotionBlur[r.NODE] = false; - r.clearedForMotionBlur[r.DRAG] = false; - r.motionBlur = false; - r.clearingMotionBlur = !textureDraw; - r.mbFrames = 0; - needDraw[r.NODE] = true; - needDraw[r.DRAG] = true; - r.redraw(); - }, motionBlurDelay); - } - if (!forcedContext) { - cy.emit('render'); - } -}; - -var CRp$3 = {}; - -// @O Polygon drawing -CRp$3.drawPolygonPath = function (context, x, y, width, height, points) { - var halfW = width / 2; - var halfH = height / 2; - if (context.beginPath) { - context.beginPath(); - } - context.moveTo(x + halfW * points[0], y + halfH * points[1]); - for (var i = 1; i < points.length / 2; i++) { - context.lineTo(x + halfW * points[i * 2], y + halfH * points[i * 2 + 1]); - } - context.closePath(); -}; -CRp$3.drawRoundPolygonPath = function (context, x, y, width, height, points, corners) { - corners.forEach(function (corner) { - return drawPreparedRoundCorner(context, corner); - }); - context.closePath(); -}; - -// Round rectangle drawing -CRp$3.drawRoundRectanglePath = function (context, x, y, width, height, radius) { - var halfWidth = width / 2; - var halfHeight = height / 2; - var cornerRadius = radius === 'auto' ? getRoundRectangleRadius(width, height) : Math.min(radius, halfHeight, halfWidth); - if (context.beginPath) { - context.beginPath(); - } - - // Start at top middle - context.moveTo(x, y - halfHeight); - // Arc from middle top to right side - context.arcTo(x + halfWidth, y - halfHeight, x + halfWidth, y, cornerRadius); - // Arc from right side to bottom - context.arcTo(x + halfWidth, y + halfHeight, x, y + halfHeight, cornerRadius); - // Arc from bottom to left side - context.arcTo(x - halfWidth, y + halfHeight, x - halfWidth, y, cornerRadius); - // Arc from left side to topBorder - context.arcTo(x - halfWidth, y - halfHeight, x, y - halfHeight, cornerRadius); - // Join line - context.lineTo(x, y - halfHeight); - context.closePath(); -}; -CRp$3.drawBottomRoundRectanglePath = function (context, x, y, width, height, radius) { - var halfWidth = width / 2; - var halfHeight = height / 2; - var cornerRadius = radius === 'auto' ? getRoundRectangleRadius(width, height) : radius; - if (context.beginPath) { - context.beginPath(); - } - - // Start at top middle - context.moveTo(x, y - halfHeight); - context.lineTo(x + halfWidth, y - halfHeight); - context.lineTo(x + halfWidth, y); - context.arcTo(x + halfWidth, y + halfHeight, x, y + halfHeight, cornerRadius); - context.arcTo(x - halfWidth, y + halfHeight, x - halfWidth, y, cornerRadius); - context.lineTo(x - halfWidth, y - halfHeight); - context.lineTo(x, y - halfHeight); - context.closePath(); -}; -CRp$3.drawCutRectanglePath = function (context, x, y, width, height, points, corners) { - var halfWidth = width / 2; - var halfHeight = height / 2; - var cornerLength = corners === 'auto' ? getCutRectangleCornerLength() : corners; - if (context.beginPath) { - context.beginPath(); - } - context.moveTo(x - halfWidth + cornerLength, y - halfHeight); - context.lineTo(x + halfWidth - cornerLength, y - halfHeight); - context.lineTo(x + halfWidth, y - halfHeight + cornerLength); - context.lineTo(x + halfWidth, y + halfHeight - cornerLength); - context.lineTo(x + halfWidth - cornerLength, y + halfHeight); - context.lineTo(x - halfWidth + cornerLength, y + halfHeight); - context.lineTo(x - halfWidth, y + halfHeight - cornerLength); - context.lineTo(x - halfWidth, y - halfHeight + cornerLength); - context.closePath(); -}; -CRp$3.drawBarrelPath = function (context, x, y, width, height) { - var halfWidth = width / 2; - var halfHeight = height / 2; - var xBegin = x - halfWidth; - var xEnd = x + halfWidth; - var yBegin = y - halfHeight; - var yEnd = y + halfHeight; - var barrelCurveConstants = getBarrelCurveConstants(width, height); - var wOffset = barrelCurveConstants.widthOffset; - var hOffset = barrelCurveConstants.heightOffset; - var ctrlPtXOffset = barrelCurveConstants.ctrlPtOffsetPct * wOffset; - if (context.beginPath) { - context.beginPath(); - } - context.moveTo(xBegin, yBegin + hOffset); - context.lineTo(xBegin, yEnd - hOffset); - context.quadraticCurveTo(xBegin + ctrlPtXOffset, yEnd, xBegin + wOffset, yEnd); - context.lineTo(xEnd - wOffset, yEnd); - context.quadraticCurveTo(xEnd - ctrlPtXOffset, yEnd, xEnd, yEnd - hOffset); - context.lineTo(xEnd, yBegin + hOffset); - context.quadraticCurveTo(xEnd - ctrlPtXOffset, yBegin, xEnd - wOffset, yBegin); - context.lineTo(xBegin + wOffset, yBegin); - context.quadraticCurveTo(xBegin + ctrlPtXOffset, yBegin, xBegin, yBegin + hOffset); - context.closePath(); -}; -var sin0 = Math.sin(0); -var cos0 = Math.cos(0); -var sin = {}; -var cos = {}; -var ellipseStepSize = Math.PI / 40; -for (var i = 0 * Math.PI; i < 2 * Math.PI; i += ellipseStepSize) { - sin[i] = Math.sin(i); - cos[i] = Math.cos(i); -} -CRp$3.drawEllipsePath = function (context, centerX, centerY, width, height) { - if (context.beginPath) { - context.beginPath(); - } - if (context.ellipse) { - context.ellipse(centerX, centerY, width / 2, height / 2, 0, 0, 2 * Math.PI); - } else { - var xPos, yPos; - var rw = width / 2; - var rh = height / 2; - for (var i = 0 * Math.PI; i < 2 * Math.PI; i += ellipseStepSize) { - xPos = centerX - rw * sin[i] * sin0 + rw * cos[i] * cos0; - yPos = centerY + rh * cos[i] * sin0 + rh * sin[i] * cos0; - if (i === 0) { - context.moveTo(xPos, yPos); - } else { - context.lineTo(xPos, yPos); - } - } - } - context.closePath(); -}; - -/* global atob, ArrayBuffer, Uint8Array, Blob */ -var CRp$2 = {}; -CRp$2.createBuffer = function (w, h) { - var buffer = document.createElement('canvas'); // eslint-disable-line no-undef - buffer.width = w; - buffer.height = h; - return [buffer, buffer.getContext('2d')]; -}; -CRp$2.bufferCanvasImage = function (options) { - var cy = this.cy; - var eles = cy.mutableElements(); - var bb = eles.boundingBox(); - var ctrRect = this.findContainerClientCoords(); - var width = options.full ? Math.ceil(bb.w) : ctrRect[2]; - var height = options.full ? Math.ceil(bb.h) : ctrRect[3]; - var specdMaxDims = number$1(options.maxWidth) || number$1(options.maxHeight); - var pxRatio = this.getPixelRatio(); - var scale = 1; - if (options.scale !== undefined) { - width *= options.scale; - height *= options.scale; - scale = options.scale; - } else if (specdMaxDims) { - var maxScaleW = Infinity; - var maxScaleH = Infinity; - if (number$1(options.maxWidth)) { - maxScaleW = scale * options.maxWidth / width; - } - if (number$1(options.maxHeight)) { - maxScaleH = scale * options.maxHeight / height; - } - scale = Math.min(maxScaleW, maxScaleH); - width *= scale; - height *= scale; - } - if (!specdMaxDims) { - width *= pxRatio; - height *= pxRatio; - scale *= pxRatio; - } - var buffCanvas = document.createElement('canvas'); // eslint-disable-line no-undef - - buffCanvas.width = width; - buffCanvas.height = height; - buffCanvas.style.width = width + 'px'; - buffCanvas.style.height = height + 'px'; - var buffCxt = buffCanvas.getContext('2d'); - - // Rasterize the layers, but only if container has nonzero size - if (width > 0 && height > 0) { - buffCxt.clearRect(0, 0, width, height); - buffCxt.globalCompositeOperation = 'source-over'; - var zsortedEles = this.getCachedZSortedEles(); - if (options.full) { - // draw the full bounds of the graph - buffCxt.translate(-bb.x1 * scale, -bb.y1 * scale); - buffCxt.scale(scale, scale); - this.drawElements(buffCxt, zsortedEles); - buffCxt.scale(1 / scale, 1 / scale); - buffCxt.translate(bb.x1 * scale, bb.y1 * scale); - } else { - // draw the current view - var pan = cy.pan(); - var translation = { - x: pan.x * scale, - y: pan.y * scale - }; - scale *= cy.zoom(); - buffCxt.translate(translation.x, translation.y); - buffCxt.scale(scale, scale); - this.drawElements(buffCxt, zsortedEles); - buffCxt.scale(1 / scale, 1 / scale); - buffCxt.translate(-translation.x, -translation.y); - } - - // need to fill bg at end like this in order to fill cleared transparent pixels in jpgs - if (options.bg) { - buffCxt.globalCompositeOperation = 'destination-over'; - buffCxt.fillStyle = options.bg; - buffCxt.rect(0, 0, width, height); - buffCxt.fill(); - } - } - return buffCanvas; -}; -function b64ToBlob(b64, mimeType) { - var bytes = atob(b64); - var buff = new ArrayBuffer(bytes.length); - var buffUint8 = new Uint8Array(buff); - for (var i = 0; i < bytes.length; i++) { - buffUint8[i] = bytes.charCodeAt(i); - } - return new Blob([buff], { - type: mimeType - }); -} -function b64UriToB64(b64uri) { - var i = b64uri.indexOf(','); - return b64uri.substr(i + 1); -} -function output(options, canvas, mimeType) { - var getB64Uri = function getB64Uri() { - return canvas.toDataURL(mimeType, options.quality); - }; - switch (options.output) { - case 'blob-promise': - return new Promise$1(function (resolve, reject) { - try { - canvas.toBlob(function (blob) { - if (blob != null) { - resolve(blob); - } else { - reject(new Error('`canvas.toBlob()` sent a null value in its callback')); - } - }, mimeType, options.quality); - } catch (err) { - reject(err); - } - }); - case 'blob': - return b64ToBlob(b64UriToB64(getB64Uri()), mimeType); - case 'base64': - return b64UriToB64(getB64Uri()); - case 'base64uri': - default: - return getB64Uri(); - } -} -CRp$2.png = function (options) { - return output(options, this.bufferCanvasImage(options), 'image/png'); -}; -CRp$2.jpg = function (options) { - return output(options, this.bufferCanvasImage(options), 'image/jpeg'); -}; - -var CRp$1 = {}; -CRp$1.nodeShapeImpl = function (name, context, centerX, centerY, width, height, points, corners) { - switch (name) { - case 'ellipse': - return this.drawEllipsePath(context, centerX, centerY, width, height); - case 'polygon': - return this.drawPolygonPath(context, centerX, centerY, width, height, points); - case 'round-polygon': - return this.drawRoundPolygonPath(context, centerX, centerY, width, height, points, corners); - case 'roundrectangle': - case 'round-rectangle': - return this.drawRoundRectanglePath(context, centerX, centerY, width, height, corners); - case 'cutrectangle': - case 'cut-rectangle': - return this.drawCutRectanglePath(context, centerX, centerY, width, height, points, corners); - case 'bottomroundrectangle': - case 'bottom-round-rectangle': - return this.drawBottomRoundRectanglePath(context, centerX, centerY, width, height, corners); - case 'barrel': - return this.drawBarrelPath(context, centerX, centerY, width, height); - } -}; - -var CR = CanvasRenderer; -var CRp = CanvasRenderer.prototype; -CRp.CANVAS_LAYERS = 3; -// -CRp.SELECT_BOX = 0; -CRp.DRAG = 1; -CRp.NODE = 2; -CRp.BUFFER_COUNT = 3; -// -CRp.TEXTURE_BUFFER = 0; -CRp.MOTIONBLUR_BUFFER_NODE = 1; -CRp.MOTIONBLUR_BUFFER_DRAG = 2; -function CanvasRenderer(options) { - var r = this; - var containerWindow = r.cy.window(); - var document = containerWindow.document; - r.data = { - canvases: new Array(CRp.CANVAS_LAYERS), - contexts: new Array(CRp.CANVAS_LAYERS), - canvasNeedsRedraw: new Array(CRp.CANVAS_LAYERS), - bufferCanvases: new Array(CRp.BUFFER_COUNT), - bufferContexts: new Array(CRp.CANVAS_LAYERS) - }; - var tapHlOffAttr = '-webkit-tap-highlight-color'; - var tapHlOffStyle = 'rgba(0,0,0,0)'; - r.data.canvasContainer = document.createElement('div'); // eslint-disable-line no-undef - var containerStyle = r.data.canvasContainer.style; - r.data.canvasContainer.style[tapHlOffAttr] = tapHlOffStyle; - containerStyle.position = 'relative'; - containerStyle.zIndex = '0'; - containerStyle.overflow = 'hidden'; - var container = options.cy.container(); - container.appendChild(r.data.canvasContainer); - container.style[tapHlOffAttr] = tapHlOffStyle; - var styleMap = { - '-webkit-user-select': 'none', - '-moz-user-select': '-moz-none', - 'user-select': 'none', - '-webkit-tap-highlight-color': 'rgba(0,0,0,0)', - 'outline-style': 'none' - }; - if (ms()) { - styleMap['-ms-touch-action'] = 'none'; - styleMap['touch-action'] = 'none'; - } - for (var i = 0; i < CRp.CANVAS_LAYERS; i++) { - var canvas = r.data.canvases[i] = document.createElement('canvas'); // eslint-disable-line no-undef - r.data.contexts[i] = canvas.getContext('2d'); - Object.keys(styleMap).forEach(function (k) { - canvas.style[k] = styleMap[k]; - }); - canvas.style.position = 'absolute'; - canvas.setAttribute('data-id', 'layer' + i); - canvas.style.zIndex = String(CRp.CANVAS_LAYERS - i); - r.data.canvasContainer.appendChild(canvas); - r.data.canvasNeedsRedraw[i] = false; - } - r.data.topCanvas = r.data.canvases[0]; - r.data.canvases[CRp.NODE].setAttribute('data-id', 'layer' + CRp.NODE + '-node'); - r.data.canvases[CRp.SELECT_BOX].setAttribute('data-id', 'layer' + CRp.SELECT_BOX + '-selectbox'); - r.data.canvases[CRp.DRAG].setAttribute('data-id', 'layer' + CRp.DRAG + '-drag'); - for (var i = 0; i < CRp.BUFFER_COUNT; i++) { - r.data.bufferCanvases[i] = document.createElement('canvas'); // eslint-disable-line no-undef - r.data.bufferContexts[i] = r.data.bufferCanvases[i].getContext('2d'); - r.data.bufferCanvases[i].style.position = 'absolute'; - r.data.bufferCanvases[i].setAttribute('data-id', 'buffer' + i); - r.data.bufferCanvases[i].style.zIndex = String(-i - 1); - r.data.bufferCanvases[i].style.visibility = 'hidden'; - //r.data.canvasContainer.appendChild(r.data.bufferCanvases[i]); - } - - r.pathsEnabled = true; - var emptyBb = makeBoundingBox(); - var getBoxCenter = function getBoxCenter(bb) { - return { - x: (bb.x1 + bb.x2) / 2, - y: (bb.y1 + bb.y2) / 2 - }; - }; - var getCenterOffset = function getCenterOffset(bb) { - return { - x: -bb.w / 2, - y: -bb.h / 2 - }; - }; - var backgroundTimestampHasChanged = function backgroundTimestampHasChanged(ele) { - var _p = ele[0]._private; - var same = _p.oldBackgroundTimestamp === _p.backgroundTimestamp; - return !same; - }; - var getStyleKey = function getStyleKey(ele) { - return ele[0]._private.nodeKey; - }; - var getLabelKey = function getLabelKey(ele) { - return ele[0]._private.labelStyleKey; - }; - var getSourceLabelKey = function getSourceLabelKey(ele) { - return ele[0]._private.sourceLabelStyleKey; - }; - var getTargetLabelKey = function getTargetLabelKey(ele) { - return ele[0]._private.targetLabelStyleKey; - }; - var drawElement = function drawElement(context, ele, bb, scaledLabelShown, useEleOpacity) { - return r.drawElement(context, ele, bb, false, false, useEleOpacity); - }; - var drawLabel = function drawLabel(context, ele, bb, scaledLabelShown, useEleOpacity) { - return r.drawElementText(context, ele, bb, scaledLabelShown, 'main', useEleOpacity); - }; - var drawSourceLabel = function drawSourceLabel(context, ele, bb, scaledLabelShown, useEleOpacity) { - return r.drawElementText(context, ele, bb, scaledLabelShown, 'source', useEleOpacity); - }; - var drawTargetLabel = function drawTargetLabel(context, ele, bb, scaledLabelShown, useEleOpacity) { - return r.drawElementText(context, ele, bb, scaledLabelShown, 'target', useEleOpacity); - }; - var getElementBox = function getElementBox(ele) { - ele.boundingBox(); - return ele[0]._private.bodyBounds; - }; - var getLabelBox = function getLabelBox(ele) { - ele.boundingBox(); - return ele[0]._private.labelBounds.main || emptyBb; - }; - var getSourceLabelBox = function getSourceLabelBox(ele) { - ele.boundingBox(); - return ele[0]._private.labelBounds.source || emptyBb; - }; - var getTargetLabelBox = function getTargetLabelBox(ele) { - ele.boundingBox(); - return ele[0]._private.labelBounds.target || emptyBb; - }; - var isLabelVisibleAtScale = function isLabelVisibleAtScale(ele, scaledLabelShown) { - return scaledLabelShown; - }; - var getElementRotationPoint = function getElementRotationPoint(ele) { - return getBoxCenter(getElementBox(ele)); - }; - var addTextMargin = function addTextMargin(prefix, pt, ele) { - var pre = prefix ? prefix + '-' : ''; - return { - x: pt.x + ele.pstyle(pre + 'text-margin-x').pfValue, - y: pt.y + ele.pstyle(pre + 'text-margin-y').pfValue - }; - }; - var getRsPt = function getRsPt(ele, x, y) { - var rs = ele[0]._private.rscratch; - return { - x: rs[x], - y: rs[y] - }; - }; - var getLabelRotationPoint = function getLabelRotationPoint(ele) { - return addTextMargin('', getRsPt(ele, 'labelX', 'labelY'), ele); - }; - var getSourceLabelRotationPoint = function getSourceLabelRotationPoint(ele) { - return addTextMargin('source', getRsPt(ele, 'sourceLabelX', 'sourceLabelY'), ele); - }; - var getTargetLabelRotationPoint = function getTargetLabelRotationPoint(ele) { - return addTextMargin('target', getRsPt(ele, 'targetLabelX', 'targetLabelY'), ele); - }; - var getElementRotationOffset = function getElementRotationOffset(ele) { - return getCenterOffset(getElementBox(ele)); - }; - var getSourceLabelRotationOffset = function getSourceLabelRotationOffset(ele) { - return getCenterOffset(getSourceLabelBox(ele)); - }; - var getTargetLabelRotationOffset = function getTargetLabelRotationOffset(ele) { - return getCenterOffset(getTargetLabelBox(ele)); - }; - var getLabelRotationOffset = function getLabelRotationOffset(ele) { - var bb = getLabelBox(ele); - var p = getCenterOffset(getLabelBox(ele)); - if (ele.isNode()) { - switch (ele.pstyle('text-halign').value) { - case 'left': - p.x = -bb.w; - break; - case 'right': - p.x = 0; - break; - } - switch (ele.pstyle('text-valign').value) { - case 'top': - p.y = -bb.h; - break; - case 'bottom': - p.y = 0; - break; - } - } - return p; - }; - var eleTxrCache = r.data.eleTxrCache = new ElementTextureCache(r, { - getKey: getStyleKey, - doesEleInvalidateKey: backgroundTimestampHasChanged, - drawElement: drawElement, - getBoundingBox: getElementBox, - getRotationPoint: getElementRotationPoint, - getRotationOffset: getElementRotationOffset, - allowEdgeTxrCaching: false, - allowParentTxrCaching: false - }); - var lblTxrCache = r.data.lblTxrCache = new ElementTextureCache(r, { - getKey: getLabelKey, - drawElement: drawLabel, - getBoundingBox: getLabelBox, - getRotationPoint: getLabelRotationPoint, - getRotationOffset: getLabelRotationOffset, - isVisible: isLabelVisibleAtScale - }); - var slbTxrCache = r.data.slbTxrCache = new ElementTextureCache(r, { - getKey: getSourceLabelKey, - drawElement: drawSourceLabel, - getBoundingBox: getSourceLabelBox, - getRotationPoint: getSourceLabelRotationPoint, - getRotationOffset: getSourceLabelRotationOffset, - isVisible: isLabelVisibleAtScale - }); - var tlbTxrCache = r.data.tlbTxrCache = new ElementTextureCache(r, { - getKey: getTargetLabelKey, - drawElement: drawTargetLabel, - getBoundingBox: getTargetLabelBox, - getRotationPoint: getTargetLabelRotationPoint, - getRotationOffset: getTargetLabelRotationOffset, - isVisible: isLabelVisibleAtScale - }); - var lyrTxrCache = r.data.lyrTxrCache = new LayeredTextureCache(r); - r.onUpdateEleCalcs(function invalidateTextureCaches(willDraw, eles) { - // each cache should check for sub-key diff to see that the update affects that cache particularly - eleTxrCache.invalidateElements(eles); - lblTxrCache.invalidateElements(eles); - slbTxrCache.invalidateElements(eles); - tlbTxrCache.invalidateElements(eles); - - // any change invalidates the layers - lyrTxrCache.invalidateElements(eles); - - // update the old bg timestamp so diffs can be done in the ele txr caches - for (var _i = 0; _i < eles.length; _i++) { - var _p = eles[_i]._private; - _p.oldBackgroundTimestamp = _p.backgroundTimestamp; - } - }); - var refineInLayers = function refineInLayers(reqs) { - for (var i = 0; i < reqs.length; i++) { - lyrTxrCache.enqueueElementRefinement(reqs[i].ele); - } - }; - eleTxrCache.onDequeue(refineInLayers); - lblTxrCache.onDequeue(refineInLayers); - slbTxrCache.onDequeue(refineInLayers); - tlbTxrCache.onDequeue(refineInLayers); -} -CRp.redrawHint = function (group, bool) { - var r = this; - switch (group) { - case 'eles': - r.data.canvasNeedsRedraw[CRp.NODE] = bool; - break; - case 'drag': - r.data.canvasNeedsRedraw[CRp.DRAG] = bool; - break; - case 'select': - r.data.canvasNeedsRedraw[CRp.SELECT_BOX] = bool; - break; - } -}; - -// whether to use Path2D caching for drawing -var pathsImpld = typeof Path2D !== 'undefined'; -CRp.path2dEnabled = function (on) { - if (on === undefined) { - return this.pathsEnabled; - } - this.pathsEnabled = on ? true : false; -}; -CRp.usePaths = function () { - return pathsImpld && this.pathsEnabled; -}; -CRp.setImgSmoothing = function (context, bool) { - if (context.imageSmoothingEnabled != null) { - context.imageSmoothingEnabled = bool; - } else { - context.webkitImageSmoothingEnabled = bool; - context.mozImageSmoothingEnabled = bool; - context.msImageSmoothingEnabled = bool; - } -}; -CRp.getImgSmoothing = function (context) { - if (context.imageSmoothingEnabled != null) { - return context.imageSmoothingEnabled; - } else { - return context.webkitImageSmoothingEnabled || context.mozImageSmoothingEnabled || context.msImageSmoothingEnabled; - } -}; -CRp.makeOffscreenCanvas = function (width, height) { - var canvas; - if ((typeof OffscreenCanvas === "undefined" ? "undefined" : _typeof(OffscreenCanvas)) !== ("undefined" )) { - canvas = new OffscreenCanvas(width, height); - } else { - var containerWindow = this.cy.window(); - var document = containerWindow.document; - canvas = document.createElement('canvas'); // eslint-disable-line no-undef - canvas.width = width; - canvas.height = height; - } - return canvas; -}; -[CRp$a, CRp$9, CRp$8, CRp$7, CRp$6, CRp$5, CRp$4, CRp$3, CRp$2, CRp$1].forEach(function (props) { - extend(CRp, props); -}); - -var renderer = [{ - name: 'null', - impl: NullRenderer -}, { - name: 'base', - impl: BR -}, { - name: 'canvas', - impl: CR -}]; - -var incExts = [{ - type: 'layout', - extensions: layout -}, { - type: 'renderer', - extensions: renderer -}]; - -// registered extensions to cytoscape, indexed by name -var extensions = {}; - -// registered modules for extensions, indexed by name -var modules = {}; -function setExtension(type, name, registrant) { - var ext = registrant; - var overrideErr = function overrideErr(field) { - warn('Can not register `' + name + '` for `' + type + '` since `' + field + '` already exists in the prototype and can not be overridden'); - }; - if (type === 'core') { - if (Core.prototype[name]) { - return overrideErr(name); - } else { - Core.prototype[name] = registrant; - } - } else if (type === 'collection') { - if (Collection.prototype[name]) { - return overrideErr(name); - } else { - Collection.prototype[name] = registrant; - } - } else if (type === 'layout') { - // fill in missing layout functions in the prototype - - var Layout = function Layout(options) { - this.options = options; - registrant.call(this, options); - - // make sure layout has _private for use w/ std apis like .on() - if (!plainObject(this._private)) { - this._private = {}; - } - this._private.cy = options.cy; - this._private.listeners = []; - this.createEmitter(); - }; - var layoutProto = Layout.prototype = Object.create(registrant.prototype); - var optLayoutFns = []; - for (var i = 0; i < optLayoutFns.length; i++) { - var fnName = optLayoutFns[i]; - layoutProto[fnName] = layoutProto[fnName] || function () { - return this; - }; - } - - // either .start() or .run() is defined, so autogen the other - if (layoutProto.start && !layoutProto.run) { - layoutProto.run = function () { - this.start(); - return this; - }; - } else if (!layoutProto.start && layoutProto.run) { - layoutProto.start = function () { - this.run(); - return this; - }; - } - var regStop = registrant.prototype.stop; - layoutProto.stop = function () { - var opts = this.options; - if (opts && opts.animate) { - var anis = this.animations; - if (anis) { - for (var _i = 0; _i < anis.length; _i++) { - anis[_i].stop(); - } - } - } - if (regStop) { - regStop.call(this); - } else { - this.emit('layoutstop'); - } - return this; - }; - if (!layoutProto.destroy) { - layoutProto.destroy = function () { - return this; - }; - } - layoutProto.cy = function () { - return this._private.cy; - }; - var getCy = function getCy(layout) { - return layout._private.cy; - }; - var emitterOpts = { - addEventFields: function addEventFields(layout, evt) { - evt.layout = layout; - evt.cy = getCy(layout); - evt.target = layout; - }, - bubble: function bubble() { - return true; - }, - parent: function parent(layout) { - return getCy(layout); - } - }; - extend(layoutProto, { - createEmitter: function createEmitter() { - this._private.emitter = new Emitter(emitterOpts, this); - return this; - }, - emitter: function emitter() { - return this._private.emitter; - }, - on: function on(evt, cb) { - this.emitter().on(evt, cb); - return this; - }, - one: function one(evt, cb) { - this.emitter().one(evt, cb); - return this; - }, - once: function once(evt, cb) { - this.emitter().one(evt, cb); - return this; - }, - removeListener: function removeListener(evt, cb) { - this.emitter().removeListener(evt, cb); - return this; - }, - removeAllListeners: function removeAllListeners() { - this.emitter().removeAllListeners(); - return this; - }, - emit: function emit(evt, params) { - this.emitter().emit(evt, params); - return this; - } - }); - cytoscape_esm_define.eventAliasesOn(layoutProto); - ext = Layout; // replace with our wrapped layout - } else if (type === 'renderer' && name !== 'null' && name !== 'base') { - // user registered renderers inherit from base - - var BaseRenderer = getExtension('renderer', 'base'); - var bProto = BaseRenderer.prototype; - var RegistrantRenderer = registrant; - var rProto = registrant.prototype; - var Renderer = function Renderer() { - BaseRenderer.apply(this, arguments); - RegistrantRenderer.apply(this, arguments); - }; - var proto = Renderer.prototype; - for (var pName in bProto) { - var pVal = bProto[pName]; - var existsInR = rProto[pName] != null; - if (existsInR) { - return overrideErr(pName); - } - proto[pName] = pVal; // take impl from base - } - - for (var _pName in rProto) { - proto[_pName] = rProto[_pName]; // take impl from registrant - } - - bProto.clientFunctions.forEach(function (name) { - proto[name] = proto[name] || function () { - error('Renderer does not implement `renderer.' + name + '()` on its prototype'); - }; - }); - ext = Renderer; - } else if (type === '__proto__' || type === 'constructor' || type === 'prototype') { - // to avoid potential prototype pollution - return error(type + ' is an illegal type to be registered, possibly lead to prototype pollutions'); - } - return setMap({ - map: extensions, - keys: [type, name], - value: ext - }); -} -function getExtension(type, name) { - return getMap({ - map: extensions, - keys: [type, name] - }); -} -function setModule(type, name, moduleType, moduleName, registrant) { - return setMap({ - map: modules, - keys: [type, name, moduleType, moduleName], - value: registrant - }); -} -function getModule(type, name, moduleType, moduleName) { - return getMap({ - map: modules, - keys: [type, name, moduleType, moduleName] - }); -} -var extension = function extension() { - // e.g. extension('renderer', 'svg') - if (arguments.length === 2) { - return getExtension.apply(null, arguments); - } - - // e.g. extension('renderer', 'svg', { ... }) - else if (arguments.length === 3) { - return setExtension.apply(null, arguments); - } - - // e.g. extension('renderer', 'svg', 'nodeShape', 'ellipse') - else if (arguments.length === 4) { - return getModule.apply(null, arguments); - } - - // e.g. extension('renderer', 'svg', 'nodeShape', 'ellipse', { ... }) - else if (arguments.length === 5) { - return setModule.apply(null, arguments); - } else { - error('Invalid extension access syntax'); - } -}; - -// allows a core instance to access extensions internally -Core.prototype.extension = extension; - -// included extensions -incExts.forEach(function (group) { - group.extensions.forEach(function (ext) { - setExtension(group.type, ext.name, ext.impl); - }); -}); - -// a dummy stylesheet object that doesn't need a reference to the core -// (useful for init) -var Stylesheet = function Stylesheet() { - if (!(this instanceof Stylesheet)) { - return new Stylesheet(); - } - this.length = 0; -}; -var sheetfn = Stylesheet.prototype; -sheetfn.instanceString = function () { - return 'stylesheet'; -}; - -// just store the selector to be parsed later -sheetfn.selector = function (selector) { - var i = this.length++; - this[i] = { - selector: selector, - properties: [] - }; - return this; // chaining -}; - -// just store the property to be parsed later -sheetfn.css = function (name, value) { - var i = this.length - 1; - if (string(name)) { - this[i].properties.push({ - name: name, - value: value - }); - } else if (plainObject(name)) { - var map = name; - var propNames = Object.keys(map); - for (var j = 0; j < propNames.length; j++) { - var key = propNames[j]; - var mapVal = map[key]; - if (mapVal == null) { - continue; - } - var prop = Style.properties[key] || Style.properties[dash2camel(key)]; - if (prop == null) { - continue; - } - var _name = prop.name; - var _value = mapVal; - this[i].properties.push({ - name: _name, - value: _value - }); - } - } - return this; // chaining -}; - -sheetfn.style = sheetfn.css; - -// generate a real style object from the dummy stylesheet -sheetfn.generateStyle = function (cy) { - var style = new Style(cy); - return this.appendToStyle(style); -}; - -// append a dummy stylesheet object on a real style object -sheetfn.appendToStyle = function (style) { - for (var i = 0; i < this.length; i++) { - var context = this[i]; - var selector = context.selector; - var props = context.properties; - style.selector(selector); // apply selector - - for (var j = 0; j < props.length; j++) { - var prop = props[j]; - style.css(prop.name, prop.value); // apply property - } - } - - return style; -}; - -var version = "3.30.2"; - -var cytoscape = function cytoscape(options) { - // if no options specified, use default - if (options === undefined) { - options = {}; - } - - // create instance - if (plainObject(options)) { - return new Core(options); - } - - // allow for registration of extensions - else if (string(options)) { - return extension.apply(extension, arguments); - } -}; - -// e.g. cytoscape.use( require('cytoscape-foo'), bar ) -cytoscape.use = function (ext) { - var args = Array.prototype.slice.call(arguments, 1); // args to pass to ext - - args.unshift(cytoscape); // cytoscape is first arg to ext - - ext.apply(null, args); - return this; -}; -cytoscape.warnings = function (bool) { - return warnings(bool); -}; - -// replaced by build system -cytoscape.version = version; - -// expose public apis (mostly for extensions) -cytoscape.stylesheet = cytoscape.Stylesheet = Stylesheet; - - - -// EXTERNAL MODULE: ./node_modules/cytoscape-cose-bilkent/cytoscape-cose-bilkent.js -var cytoscape_cose_bilkent = __webpack_require__(43457); -// EXTERNAL MODULE: ./node_modules/d3/src/index.js + 197 modules -var src = __webpack_require__(26312); -// EXTERNAL MODULE: ./node_modules/mermaid/dist/createText-2e5e7dd3.js + 53 modules -var createText_2e5e7dd3 = __webpack_require__(73743); -// EXTERNAL MODULE: ./node_modules/khroma/dist/methods/is_dark.js + 2 modules -var is_dark = __webpack_require__(3219); -// EXTERNAL MODULE: ./node_modules/khroma/dist/methods/lighten.js -var lighten = __webpack_require__(78041); -// EXTERNAL MODULE: ./node_modules/khroma/dist/methods/darken.js -var darken = __webpack_require__(75263); -// EXTERNAL MODULE: ./node_modules/dayjs/dayjs.min.js -var dayjs_min = __webpack_require__(74353); -// EXTERNAL MODULE: ./node_modules/@braintree/sanitize-url/dist/index.js -var sanitize_url_dist = __webpack_require__(16750); -// EXTERNAL MODULE: ./node_modules/dompurify/dist/purify.es.mjs -var purify_es = __webpack_require__(99418); -;// CONCATENATED MODULE: ./node_modules/mermaid/dist/mindmap-definition-fc14e90a.js - - - - - - - - - - - - - - - -var parser = function() { - var o = function(k, v, o2, l) { - for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) - ; - return o2; - }, $V0 = [1, 4], $V1 = [1, 13], $V2 = [1, 12], $V3 = [1, 15], $V4 = [1, 16], $V5 = [1, 20], $V6 = [1, 19], $V7 = [6, 7, 8], $V8 = [1, 26], $V9 = [1, 24], $Va = [1, 25], $Vb = [6, 7, 11], $Vc = [1, 6, 13, 15, 16, 19, 22], $Vd = [1, 33], $Ve = [1, 34], $Vf = [1, 6, 7, 11, 13, 15, 16, 19, 22]; - var parser2 = { - trace: function trace() { - }, - yy: {}, - symbols_: { "error": 2, "start": 3, "mindMap": 4, "spaceLines": 5, "SPACELINE": 6, "NL": 7, "MINDMAP": 8, "document": 9, "stop": 10, "EOF": 11, "statement": 12, "SPACELIST": 13, "node": 14, "ICON": 15, "CLASS": 16, "nodeWithId": 17, "nodeWithoutId": 18, "NODE_DSTART": 19, "NODE_DESCR": 20, "NODE_DEND": 21, "NODE_ID": 22, "$accept": 0, "$end": 1 }, - terminals_: { 2: "error", 6: "SPACELINE", 7: "NL", 8: "MINDMAP", 11: "EOF", 13: "SPACELIST", 15: "ICON", 16: "CLASS", 19: "NODE_DSTART", 20: "NODE_DESCR", 21: "NODE_DEND", 22: "NODE_ID" }, - productions_: [0, [3, 1], [3, 2], [5, 1], [5, 2], [5, 2], [4, 2], [4, 3], [10, 1], [10, 1], [10, 1], [10, 2], [10, 2], [9, 3], [9, 2], [12, 2], [12, 2], [12, 2], [12, 1], [12, 1], [12, 1], [12, 1], [12, 1], [14, 1], [14, 1], [18, 3], [17, 1], [17, 4]], - performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { - var $0 = $$.length - 1; - switch (yystate) { - case 6: - case 7: - return yy; - case 8: - yy.getLogger().trace("Stop NL "); - break; - case 9: - yy.getLogger().trace("Stop EOF "); - break; - case 11: - yy.getLogger().trace("Stop NL2 "); - break; - case 12: - yy.getLogger().trace("Stop EOF2 "); - break; - case 15: - yy.getLogger().info("Node: ", $$[$0].id); - yy.addNode($$[$0 - 1].length, $$[$0].id, $$[$0].descr, $$[$0].type); - break; - case 16: - yy.getLogger().trace("Icon: ", $$[$0]); - yy.decorateNode({ icon: $$[$0] }); - break; - case 17: - case 21: - yy.decorateNode({ class: $$[$0] }); - break; - case 18: - yy.getLogger().trace("SPACELIST"); - break; - case 19: - yy.getLogger().trace("Node: ", $$[$0].id); - yy.addNode(0, $$[$0].id, $$[$0].descr, $$[$0].type); - break; - case 20: - yy.decorateNode({ icon: $$[$0] }); - break; - case 25: - yy.getLogger().trace("node found ..", $$[$0 - 2]); - this.$ = { id: $$[$0 - 1], descr: $$[$0 - 1], type: yy.getType($$[$0 - 2], $$[$0]) }; - break; - case 26: - this.$ = { id: $$[$0], descr: $$[$0], type: yy.nodeType.DEFAULT }; - break; - case 27: - yy.getLogger().trace("node found ..", $$[$0 - 3]); - this.$ = { id: $$[$0 - 3], descr: $$[$0 - 1], type: yy.getType($$[$0 - 2], $$[$0]) }; - break; - } - }, - table: [{ 3: 1, 4: 2, 5: 3, 6: [1, 5], 8: $V0 }, { 1: [3] }, { 1: [2, 1] }, { 4: 6, 6: [1, 7], 7: [1, 8], 8: $V0 }, { 6: $V1, 7: [1, 10], 9: 9, 12: 11, 13: $V2, 14: 14, 15: $V3, 16: $V4, 17: 17, 18: 18, 19: $V5, 22: $V6 }, o($V7, [2, 3]), { 1: [2, 2] }, o($V7, [2, 4]), o($V7, [2, 5]), { 1: [2, 6], 6: $V1, 12: 21, 13: $V2, 14: 14, 15: $V3, 16: $V4, 17: 17, 18: 18, 19: $V5, 22: $V6 }, { 6: $V1, 9: 22, 12: 11, 13: $V2, 14: 14, 15: $V3, 16: $V4, 17: 17, 18: 18, 19: $V5, 22: $V6 }, { 6: $V8, 7: $V9, 10: 23, 11: $Va }, o($Vb, [2, 22], { 17: 17, 18: 18, 14: 27, 15: [1, 28], 16: [1, 29], 19: $V5, 22: $V6 }), o($Vb, [2, 18]), o($Vb, [2, 19]), o($Vb, [2, 20]), o($Vb, [2, 21]), o($Vb, [2, 23]), o($Vb, [2, 24]), o($Vb, [2, 26], { 19: [1, 30] }), { 20: [1, 31] }, { 6: $V8, 7: $V9, 10: 32, 11: $Va }, { 1: [2, 7], 6: $V1, 12: 21, 13: $V2, 14: 14, 15: $V3, 16: $V4, 17: 17, 18: 18, 19: $V5, 22: $V6 }, o($Vc, [2, 14], { 7: $Vd, 11: $Ve }), o($Vf, [2, 8]), o($Vf, [2, 9]), o($Vf, [2, 10]), o($Vb, [2, 15]), o($Vb, [2, 16]), o($Vb, [2, 17]), { 20: [1, 35] }, { 21: [1, 36] }, o($Vc, [2, 13], { 7: $Vd, 11: $Ve }), o($Vf, [2, 11]), o($Vf, [2, 12]), { 21: [1, 37] }, o($Vb, [2, 25]), o($Vb, [2, 27])], - defaultActions: { 2: [2, 1], 6: [2, 2] }, - parseError: function parseError(str, hash) { - if (hash.recoverable) { - this.trace(str); - } else { - var error = new Error(str); - error.hash = hash; - throw error; - } - }, - parse: function parse(input) { - var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; - var args = lstack.slice.call(arguments, 1); - var lexer2 = Object.create(this.lexer); - var sharedState = { yy: {} }; - for (var k in this.yy) { - if (Object.prototype.hasOwnProperty.call(this.yy, k)) { - sharedState.yy[k] = this.yy[k]; - } - } - lexer2.setInput(input, sharedState.yy); - sharedState.yy.lexer = lexer2; - sharedState.yy.parser = this; - if (typeof lexer2.yylloc == "undefined") { - lexer2.yylloc = {}; - } - var yyloc = lexer2.yylloc; - lstack.push(yyloc); - var ranges = lexer2.options && lexer2.options.ranges; - if (typeof sharedState.yy.parseError === "function") { - this.parseError = sharedState.yy.parseError; - } else { - this.parseError = Object.getPrototypeOf(this).parseError; - } - function lex() { - var token; - token = tstack.pop() || lexer2.lex() || EOF; - if (typeof token !== "number") { - if (token instanceof Array) { - tstack = token; - token = tstack.pop(); - } - token = self.symbols_[token] || token; - } - return token; - } - var symbol, state, action, r, yyval = {}, p, len, newState, expected; - while (true) { - state = stack[stack.length - 1]; - if (this.defaultActions[state]) { - action = this.defaultActions[state]; - } else { - if (symbol === null || typeof symbol == "undefined") { - symbol = lex(); - } - action = table[state] && table[state][symbol]; - } - if (typeof action === "undefined" || !action.length || !action[0]) { - var errStr = ""; - expected = []; - for (p in table[state]) { - if (this.terminals_[p] && p > TERROR) { - expected.push("'" + this.terminals_[p] + "'"); - } - } - if (lexer2.showPosition) { - errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; - } else { - errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); - } - this.parseError(errStr, { - text: lexer2.match, - token: this.terminals_[symbol] || symbol, - line: lexer2.yylineno, - loc: yyloc, - expected - }); - } - if (action[0] instanceof Array && action.length > 1) { - throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); - } - switch (action[0]) { - case 1: - stack.push(symbol); - vstack.push(lexer2.yytext); - lstack.push(lexer2.yylloc); - stack.push(action[1]); - symbol = null; - { - yyleng = lexer2.yyleng; - yytext = lexer2.yytext; - yylineno = lexer2.yylineno; - yyloc = lexer2.yylloc; - } - break; - case 2: - len = this.productions_[action[1]][1]; - yyval.$ = vstack[vstack.length - len]; - yyval._$ = { - first_line: lstack[lstack.length - (len || 1)].first_line, - last_line: lstack[lstack.length - 1].last_line, - first_column: lstack[lstack.length - (len || 1)].first_column, - last_column: lstack[lstack.length - 1].last_column - }; - if (ranges) { - yyval._$.range = [ - lstack[lstack.length - (len || 1)].range[0], - lstack[lstack.length - 1].range[1] - ]; - } - r = this.performAction.apply(yyval, [ - yytext, - yyleng, - yylineno, - sharedState.yy, - action[1], - vstack, - lstack - ].concat(args)); - if (typeof r !== "undefined") { - return r; - } - if (len) { - stack = stack.slice(0, -1 * len * 2); - vstack = vstack.slice(0, -1 * len); - lstack = lstack.slice(0, -1 * len); - } - stack.push(this.productions_[action[1]][0]); - vstack.push(yyval.$); - lstack.push(yyval._$); - newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; - stack.push(newState); - break; - case 3: - return true; - } - } - return true; - } - }; - var lexer = function() { - var lexer2 = { - EOF: 1, - parseError: function parseError(str, hash) { - if (this.yy.parser) { - this.yy.parser.parseError(str, hash); - } else { - throw new Error(str); - } - }, - // resets the lexer, sets new input - setInput: function(input, yy) { - this.yy = yy || this.yy || {}; - this._input = input; - this._more = this._backtrack = this.done = false; - this.yylineno = this.yyleng = 0; - this.yytext = this.matched = this.match = ""; - this.conditionStack = ["INITIAL"]; - this.yylloc = { - first_line: 1, - first_column: 0, - last_line: 1, - last_column: 0 - }; - if (this.options.ranges) { - this.yylloc.range = [0, 0]; - } - this.offset = 0; - return this; - }, - // consumes and returns one char from the input - input: function() { - var ch = this._input[0]; - this.yytext += ch; - this.yyleng++; - this.offset++; - this.match += ch; - this.matched += ch; - var lines = ch.match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno++; - this.yylloc.last_line++; - } else { - this.yylloc.last_column++; - } - if (this.options.ranges) { - this.yylloc.range[1]++; - } - this._input = this._input.slice(1); - return ch; - }, - // unshifts one char (or a string) into the input - unput: function(ch) { - var len = ch.length; - var lines = ch.split(/(?:\r\n?|\n)/g); - this._input = ch + this._input; - this.yytext = this.yytext.substr(0, this.yytext.length - len); - this.offset -= len; - var oldLines = this.match.split(/(?:\r\n?|\n)/g); - this.match = this.match.substr(0, this.match.length - 1); - this.matched = this.matched.substr(0, this.matched.length - 1); - if (lines.length - 1) { - this.yylineno -= lines.length - 1; - } - var r = this.yylloc.range; - this.yylloc = { - first_line: this.yylloc.first_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.first_column, - last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len - }; - if (this.options.ranges) { - this.yylloc.range = [r[0], r[0] + this.yyleng - len]; - } - this.yyleng = this.yytext.length; - return this; - }, - // When called from action, caches matched text and appends it on next action - more: function() { - this._more = true; - return this; - }, - // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. - reject: function() { - if (this.options.backtrack_lexer) { - this._backtrack = true; - } else { - return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), { - text: "", - token: null, - line: this.yylineno - }); - } - return this; - }, - // retain first n characters of the match - less: function(n) { - this.unput(this.match.slice(n)); - }, - // displays already matched input, i.e. for error messages - pastInput: function() { - var past = this.matched.substr(0, this.matched.length - this.match.length); - return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); - }, - // displays upcoming input, i.e. for error messages - upcomingInput: function() { - var next = this.match; - if (next.length < 20) { - next += this._input.substr(0, 20 - next.length); - } - return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); - }, - // displays the character position where the lexing error occurred, i.e. for error messages - showPosition: function() { - var pre = this.pastInput(); - var c = new Array(pre.length + 1).join("-"); - return pre + this.upcomingInput() + "\n" + c + "^"; - }, - // test the lexed token: return FALSE when not a match, otherwise return token - test_match: function(match, indexed_rule) { - var token, lines, backup; - if (this.options.backtrack_lexer) { - backup = { - yylineno: this.yylineno, - yylloc: { - first_line: this.yylloc.first_line, - last_line: this.last_line, - first_column: this.yylloc.first_column, - last_column: this.yylloc.last_column - }, - yytext: this.yytext, - match: this.match, - matches: this.matches, - matched: this.matched, - yyleng: this.yyleng, - offset: this.offset, - _more: this._more, - _input: this._input, - yy: this.yy, - conditionStack: this.conditionStack.slice(0), - done: this.done - }; - if (this.options.ranges) { - backup.yylloc.range = this.yylloc.range.slice(0); - } - } - lines = match[0].match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno += lines.length; - } - this.yylloc = { - first_line: this.yylloc.last_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.last_column, - last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length - }; - this.yytext += match[0]; - this.match += match[0]; - this.matches = match; - this.yyleng = this.yytext.length; - if (this.options.ranges) { - this.yylloc.range = [this.offset, this.offset += this.yyleng]; - } - this._more = false; - this._backtrack = false; - this._input = this._input.slice(match[0].length); - this.matched += match[0]; - token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); - if (this.done && this._input) { - this.done = false; - } - if (token) { - return token; - } else if (this._backtrack) { - for (var k in backup) { - this[k] = backup[k]; - } - return false; - } - return false; - }, - // return next match in input - next: function() { - if (this.done) { - return this.EOF; - } - if (!this._input) { - this.done = true; - } - var token, match, tempMatch, index; - if (!this._more) { - this.yytext = ""; - this.match = ""; - } - var rules = this._currentRules(); - for (var i = 0; i < rules.length; i++) { - tempMatch = this._input.match(this.rules[rules[i]]); - if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { - match = tempMatch; - index = i; - if (this.options.backtrack_lexer) { - token = this.test_match(tempMatch, rules[i]); - if (token !== false) { - return token; - } else if (this._backtrack) { - match = false; - continue; - } else { - return false; - } - } else if (!this.options.flex) { - break; - } - } - } - if (match) { - token = this.test_match(match, rules[index]); - if (token !== false) { - return token; - } - return false; - } - if (this._input === "") { - return this.EOF; - } else { - return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { - text: "", - token: null, - line: this.yylineno - }); - } - }, - // return next match that has a token - lex: function lex() { - var r = this.next(); - if (r) { - return r; - } else { - return this.lex(); - } - }, - // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) - begin: function begin(condition) { - this.conditionStack.push(condition); - }, - // pop the previously active lexer condition state off the condition stack - popState: function popState() { - var n = this.conditionStack.length - 1; - if (n > 0) { - return this.conditionStack.pop(); - } else { - return this.conditionStack[0]; - } - }, - // produce the lexer rule set which is active for the currently active lexer condition state - _currentRules: function _currentRules() { - if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { - return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; - } else { - return this.conditions["INITIAL"].rules; - } - }, - // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available - topState: function topState(n) { - n = this.conditionStack.length - 1 - Math.abs(n || 0); - if (n >= 0) { - return this.conditionStack[n]; - } else { - return "INITIAL"; - } - }, - // alias for begin(condition) - pushState: function pushState(condition) { - this.begin(condition); - }, - // return the number of states currently on the stack - stateStackSize: function stateStackSize() { - return this.conditionStack.length; - }, - options: { "case-insensitive": true }, - performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { - switch ($avoiding_name_collisions) { - case 0: - yy.getLogger().trace("Found comment", yy_.yytext); - return 6; - case 1: - return 8; - case 2: - this.begin("CLASS"); - break; - case 3: - this.popState(); - return 16; - case 4: - this.popState(); - break; - case 5: - yy.getLogger().trace("Begin icon"); - this.begin("ICON"); - break; - case 6: - yy.getLogger().trace("SPACELINE"); - return 6; - case 7: - return 7; - case 8: - return 15; - case 9: - yy.getLogger().trace("end icon"); - this.popState(); - break; - case 10: - yy.getLogger().trace("Exploding node"); - this.begin("NODE"); - return 19; - case 11: - yy.getLogger().trace("Cloud"); - this.begin("NODE"); - return 19; - case 12: - yy.getLogger().trace("Explosion Bang"); - this.begin("NODE"); - return 19; - case 13: - yy.getLogger().trace("Cloud Bang"); - this.begin("NODE"); - return 19; - case 14: - this.begin("NODE"); - return 19; - case 15: - this.begin("NODE"); - return 19; - case 16: - this.begin("NODE"); - return 19; - case 17: - this.begin("NODE"); - return 19; - case 18: - return 13; - case 19: - return 22; - case 20: - return 11; - case 21: - this.begin("NSTR2"); - break; - case 22: - return "NODE_DESCR"; - case 23: - this.popState(); - break; - case 24: - yy.getLogger().trace("Starting NSTR"); - this.begin("NSTR"); - break; - case 25: - yy.getLogger().trace("description:", yy_.yytext); - return "NODE_DESCR"; - case 26: - this.popState(); - break; - case 27: - this.popState(); - yy.getLogger().trace("node end ))"); - return "NODE_DEND"; - case 28: - this.popState(); - yy.getLogger().trace("node end )"); - return "NODE_DEND"; - case 29: - this.popState(); - yy.getLogger().trace("node end ...", yy_.yytext); - return "NODE_DEND"; - case 30: - this.popState(); - yy.getLogger().trace("node end (("); - return "NODE_DEND"; - case 31: - this.popState(); - yy.getLogger().trace("node end (-"); - return "NODE_DEND"; - case 32: - this.popState(); - yy.getLogger().trace("node end (-"); - return "NODE_DEND"; - case 33: - this.popState(); - yy.getLogger().trace("node end (("); - return "NODE_DEND"; - case 34: - this.popState(); - yy.getLogger().trace("node end (("); - return "NODE_DEND"; - case 35: - yy.getLogger().trace("Long description:", yy_.yytext); - return 20; - case 36: - yy.getLogger().trace("Long description:", yy_.yytext); - return 20; - } - }, - rules: [/^(?:\s*%%.*)/i, /^(?:mindmap\b)/i, /^(?::::)/i, /^(?:.+)/i, /^(?:\n)/i, /^(?:::icon\()/i, /^(?:[\s]+[\n])/i, /^(?:[\n]+)/i, /^(?:[^\)]+)/i, /^(?:\))/i, /^(?:-\))/i, /^(?:\(-)/i, /^(?:\)\))/i, /^(?:\))/i, /^(?:\(\()/i, /^(?:\{\{)/i, /^(?:\()/i, /^(?:\[)/i, /^(?:[\s]+)/i, /^(?:[^\(\[\n\)\{\}]+)/i, /^(?:$)/i, /^(?:["][`])/i, /^(?:[^`"]+)/i, /^(?:[`]["])/i, /^(?:["])/i, /^(?:[^"]+)/i, /^(?:["])/i, /^(?:[\)]\))/i, /^(?:[\)])/i, /^(?:[\]])/i, /^(?:\}\})/i, /^(?:\(-)/i, /^(?:-\))/i, /^(?:\(\()/i, /^(?:\()/i, /^(?:[^\)\]\(\}]+)/i, /^(?:.+(?!\(\())/i], - conditions: { "CLASS": { "rules": [3, 4], "inclusive": false }, "ICON": { "rules": [8, 9], "inclusive": false }, "NSTR2": { "rules": [22, 23], "inclusive": false }, "NSTR": { "rules": [25, 26], "inclusive": false }, "NODE": { "rules": [21, 24, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 5, 6, 7, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], "inclusive": true } } - }; - return lexer2; - }(); - parser2.lexer = lexer; - function Parser() { - this.yy = {}; - } - Parser.prototype = parser2; - parser2.Parser = Parser; - return new Parser(); -}(); -parser.parser = parser; -const parser$1 = parser; -let nodes = []; -let cnt = 0; -let mindmap_definition_fc14e90a_elements = {}; -const clear = () => { - nodes = []; - cnt = 0; - mindmap_definition_fc14e90a_elements = {}; -}; -const getParent = function(level) { - for (let i = nodes.length - 1; i >= 0; i--) { - if (nodes[i].level < level) { - return nodes[i]; - } - } - return null; -}; -const getMindmap = () => { - return nodes.length > 0 ? nodes[0] : null; -}; -const addNode = (level, id, descr, type) => { - var _a, _b; - mermaid_b5860b54.l.info("addNode", level, id, descr, type); - const conf = (0,mermaid_b5860b54.c)(); - let padding = ((_a = conf.mindmap) == null ? void 0 : _a.padding) ?? mermaid_b5860b54.B.mindmap.padding; - switch (type) { - case nodeType.ROUNDED_RECT: - case nodeType.RECT: - case nodeType.HEXAGON: - padding *= 2; - } - const node = { - id: cnt++, - nodeId: (0,mermaid_b5860b54.d)(id, conf), - level, - descr: (0,mermaid_b5860b54.d)(descr, conf), - type, - children: [], - width: ((_b = conf.mindmap) == null ? void 0 : _b.maxNodeWidth) ?? mermaid_b5860b54.B.mindmap.maxNodeWidth, - padding - }; - const parent = getParent(level); - if (parent) { - parent.children.push(node); - nodes.push(node); - } else { - if (nodes.length === 0) { - nodes.push(node); - } else { - throw new Error( - 'There can be only one root. No parent could be found for ("' + node.descr + '")' - ); - } - } -}; -const nodeType = { - DEFAULT: 0, - NO_BORDER: 0, - ROUNDED_RECT: 1, - RECT: 2, - CIRCLE: 3, - CLOUD: 4, - BANG: 5, - HEXAGON: 6 -}; -const getType = (startStr, endStr) => { - mermaid_b5860b54.l.debug("In get type", startStr, endStr); - switch (startStr) { - case "[": - return nodeType.RECT; - case "(": - return endStr === ")" ? nodeType.ROUNDED_RECT : nodeType.CLOUD; - case "((": - return nodeType.CIRCLE; - case ")": - return nodeType.CLOUD; - case "))": - return nodeType.BANG; - case "{{": - return nodeType.HEXAGON; - default: - return nodeType.DEFAULT; - } -}; -const setElementForId = (id, element) => { - mindmap_definition_fc14e90a_elements[id] = element; -}; -const decorateNode = (decoration) => { - if (!decoration) { - return; - } - const config = (0,mermaid_b5860b54.c)(); - const node = nodes[nodes.length - 1]; - if (decoration.icon) { - node.icon = (0,mermaid_b5860b54.d)(decoration.icon, config); - } - if (decoration.class) { - node.class = (0,mermaid_b5860b54.d)(decoration.class, config); - } -}; -const type2Str = (type) => { - switch (type) { - case nodeType.DEFAULT: - return "no-border"; - case nodeType.RECT: - return "rect"; - case nodeType.ROUNDED_RECT: - return "rounded-rect"; - case nodeType.CIRCLE: - return "circle"; - case nodeType.CLOUD: - return "cloud"; - case nodeType.BANG: - return "bang"; - case nodeType.HEXAGON: - return "hexgon"; - default: - return "no-border"; - } -}; -const getLogger = () => mermaid_b5860b54.l; -const getElementById = (id) => mindmap_definition_fc14e90a_elements[id]; -const db = { - clear, - addNode, - getMindmap, - nodeType, - getType, - setElementForId, - decorateNode, - type2Str, - getLogger, - getElementById -}; -const db$1 = db; -const MAX_SECTIONS = 12; -const defaultBkg = function(db2, elem, node, section) { - const rd = 5; - elem.append("path").attr("id", "node-" + node.id).attr("class", "node-bkg node-" + db2.type2Str(node.type)).attr( - "d", - `M0 ${node.height - rd} v${-node.height + 2 * rd} q0,-5 5,-5 h${node.width - 2 * rd} q5,0 5,5 v${node.height - rd} H0 Z` - ); - elem.append("line").attr("class", "node-line-" + section).attr("x1", 0).attr("y1", node.height).attr("x2", node.width).attr("y2", node.height); -}; -const rectBkg = function(db2, elem, node) { - elem.append("rect").attr("id", "node-" + node.id).attr("class", "node-bkg node-" + db2.type2Str(node.type)).attr("height", node.height).attr("width", node.width); -}; -const cloudBkg = function(db2, elem, node) { - const w = node.width; - const h = node.height; - const r1 = 0.15 * w; - const r2 = 0.25 * w; - const r3 = 0.35 * w; - const r4 = 0.2 * w; - elem.append("path").attr("id", "node-" + node.id).attr("class", "node-bkg node-" + db2.type2Str(node.type)).attr( - "d", - `M0 0 a${r1},${r1} 0 0,1 ${w * 0.25},${-1 * w * 0.1} - a${r3},${r3} 1 0,1 ${w * 0.4},${-1 * w * 0.1} - a${r2},${r2} 1 0,1 ${w * 0.35},${1 * w * 0.2} - - a${r1},${r1} 1 0,1 ${w * 0.15},${1 * h * 0.35} - a${r4},${r4} 1 0,1 ${-1 * w * 0.15},${1 * h * 0.65} - - a${r2},${r1} 1 0,1 ${-1 * w * 0.25},${w * 0.15} - a${r3},${r3} 1 0,1 ${-1 * w * 0.5},${0} - a${r1},${r1} 1 0,1 ${-1 * w * 0.25},${-1 * w * 0.15} - - a${r1},${r1} 1 0,1 ${-1 * w * 0.1},${-1 * h * 0.35} - a${r4},${r4} 1 0,1 ${w * 0.1},${-1 * h * 0.65} - - H0 V0 Z` - ); -}; -const bangBkg = function(db2, elem, node) { - const w = node.width; - const h = node.height; - const r = 0.15 * w; - elem.append("path").attr("id", "node-" + node.id).attr("class", "node-bkg node-" + db2.type2Str(node.type)).attr( - "d", - `M0 0 a${r},${r} 1 0,0 ${w * 0.25},${-1 * h * 0.1} - a${r},${r} 1 0,0 ${w * 0.25},${0} - a${r},${r} 1 0,0 ${w * 0.25},${0} - a${r},${r} 1 0,0 ${w * 0.25},${1 * h * 0.1} - - a${r},${r} 1 0,0 ${w * 0.15},${1 * h * 0.33} - a${r * 0.8},${r * 0.8} 1 0,0 ${0},${1 * h * 0.34} - a${r},${r} 1 0,0 ${-1 * w * 0.15},${1 * h * 0.33} - - a${r},${r} 1 0,0 ${-1 * w * 0.25},${h * 0.15} - a${r},${r} 1 0,0 ${-1 * w * 0.25},${0} - a${r},${r} 1 0,0 ${-1 * w * 0.25},${0} - a${r},${r} 1 0,0 ${-1 * w * 0.25},${-1 * h * 0.15} - - a${r},${r} 1 0,0 ${-1 * w * 0.1},${-1 * h * 0.33} - a${r * 0.8},${r * 0.8} 1 0,0 ${0},${-1 * h * 0.34} - a${r},${r} 1 0,0 ${w * 0.1},${-1 * h * 0.33} - - H0 V0 Z` - ); -}; -const circleBkg = function(db2, elem, node) { - elem.append("circle").attr("id", "node-" + node.id).attr("class", "node-bkg node-" + db2.type2Str(node.type)).attr("r", node.width / 2); -}; -function insertPolygonShape(parent, w, h, points, node) { - return parent.insert("polygon", ":first-child").attr( - "points", - points.map(function(d) { - return d.x + "," + d.y; - }).join(" ") - ).attr("transform", "translate(" + (node.width - w) / 2 + ", " + h + ")"); -} -const hexagonBkg = function(_db, elem, node) { - const h = node.height; - const f = 4; - const m = h / f; - const w = node.width - node.padding + 2 * m; - const points = [ - { x: m, y: 0 }, - { x: w - m, y: 0 }, - { x: w, y: -h / 2 }, - { x: w - m, y: -h }, - { x: m, y: -h }, - { x: 0, y: -h / 2 } - ]; - insertPolygonShape(elem, w, h, points, node); -}; -const roundedRectBkg = function(db2, elem, node) { - elem.append("rect").attr("id", "node-" + node.id).attr("class", "node-bkg node-" + db2.type2Str(node.type)).attr("height", node.height).attr("rx", node.padding).attr("ry", node.padding).attr("width", node.width); -}; -const drawNode = function(db2, elem, node, fullSection, conf) { - const htmlLabels = conf.htmlLabels; - const section = fullSection % (MAX_SECTIONS - 1); - const nodeElem = elem.append("g"); - node.section = section; - let sectionClass = "section-" + section; - if (section < 0) { - sectionClass += " section-root"; - } - nodeElem.attr("class", (node.class ? node.class + " " : "") + "mindmap-node " + sectionClass); - const bkgElem = nodeElem.append("g"); - const textElem = nodeElem.append("g"); - const description = node.descr.replace(/()/g, "\n"); - (0,createText_2e5e7dd3.a)(textElem, description, { - useHtmlLabels: htmlLabels, - width: node.width, - classes: "mindmap-node-label" - }); - if (!htmlLabels) { - textElem.attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle"); - } - const bbox = textElem.node().getBBox(); - const [fontSize] = (0,mermaid_b5860b54.D)(conf.fontSize); - node.height = bbox.height + fontSize * 1.1 * 0.5 + node.padding; - node.width = bbox.width + 2 * node.padding; - if (node.icon) { - if (node.type === db2.nodeType.CIRCLE) { - node.height += 50; - node.width += 50; - const icon = nodeElem.append("foreignObject").attr("height", "50px").attr("width", node.width).attr("style", "text-align: center;"); - icon.append("div").attr("class", "icon-container").append("i").attr("class", "node-icon-" + section + " " + node.icon); - textElem.attr( - "transform", - "translate(" + node.width / 2 + ", " + (node.height / 2 - 1.5 * node.padding) + ")" - ); - } else { - node.width += 50; - const orgHeight = node.height; - node.height = Math.max(orgHeight, 60); - const heightDiff = Math.abs(node.height - orgHeight); - const icon = nodeElem.append("foreignObject").attr("width", "60px").attr("height", node.height).attr("style", "text-align: center;margin-top:" + heightDiff / 2 + "px;"); - icon.append("div").attr("class", "icon-container").append("i").attr("class", "node-icon-" + section + " " + node.icon); - textElem.attr( - "transform", - "translate(" + (25 + node.width / 2) + ", " + (heightDiff / 2 + node.padding / 2) + ")" - ); - } - } else { - if (!htmlLabels) { - const dx = node.width / 2; - const dy = node.padding / 2; - textElem.attr("transform", "translate(" + dx + ", " + dy + ")"); - } else { - const dx = (node.width - bbox.width) / 2; - const dy = (node.height - bbox.height) / 2; - textElem.attr("transform", "translate(" + dx + ", " + dy + ")"); - } - } - switch (node.type) { - case db2.nodeType.DEFAULT: - defaultBkg(db2, bkgElem, node, section); - break; - case db2.nodeType.ROUNDED_RECT: - roundedRectBkg(db2, bkgElem, node); - break; - case db2.nodeType.RECT: - rectBkg(db2, bkgElem, node); - break; - case db2.nodeType.CIRCLE: - bkgElem.attr("transform", "translate(" + node.width / 2 + ", " + +node.height / 2 + ")"); - circleBkg(db2, bkgElem, node); - break; - case db2.nodeType.CLOUD: - cloudBkg(db2, bkgElem, node); - break; - case db2.nodeType.BANG: - bangBkg(db2, bkgElem, node); - break; - case db2.nodeType.HEXAGON: - hexagonBkg(db2, bkgElem, node); - break; - } - db2.setElementForId(node.id, nodeElem); - return node.height; -}; -const positionNode = function(db2, node) { - const nodeElem = db2.getElementById(node.id); - const x = node.x || 0; - const y = node.y || 0; - nodeElem.attr("transform", "translate(" + x + "," + y + ")"); -}; -cytoscape.use(cytoscape_cose_bilkent); -function drawNodes(db2, svg, mindmap, section, conf) { - drawNode(db2, svg, mindmap, section, conf); - if (mindmap.children) { - mindmap.children.forEach((child, index) => { - drawNodes(db2, svg, child, section < 0 ? index : section, conf); - }); - } -} -function drawEdges(edgesEl, cy) { - cy.edges().map((edge, id) => { - const data = edge.data(); - if (edge[0]._private.bodyBounds) { - const bounds = edge[0]._private.rscratch; - mermaid_b5860b54.l.trace("Edge: ", id, data); - edgesEl.insert("path").attr( - "d", - `M ${bounds.startX},${bounds.startY} L ${bounds.midX},${bounds.midY} L${bounds.endX},${bounds.endY} ` - ).attr("class", "edge section-edge-" + data.section + " edge-depth-" + data.depth); - } - }); -} -function addNodes(mindmap, cy, conf, level) { - cy.add({ - group: "nodes", - data: { - id: mindmap.id.toString(), - labelText: mindmap.descr, - height: mindmap.height, - width: mindmap.width, - level, - nodeId: mindmap.id, - padding: mindmap.padding, - type: mindmap.type - }, - position: { - x: mindmap.x, - y: mindmap.y - } - }); - if (mindmap.children) { - mindmap.children.forEach((child) => { - addNodes(child, cy, conf, level + 1); - cy.add({ - group: "edges", - data: { - id: `${mindmap.id}_${child.id}`, - source: mindmap.id, - target: child.id, - depth: level, - section: child.section - } - }); - }); - } -} -function layoutMindmap(node, conf) { - return new Promise((resolve) => { - const renderEl = (0,src/* select */.Ltv)("body").append("div").attr("id", "cy").attr("style", "display:none"); - const cy = cytoscape({ - container: document.getElementById("cy"), - // container to render in - style: [ - { - selector: "edge", - style: { - "curve-style": "bezier" - } - } - ] - }); - renderEl.remove(); - addNodes(node, cy, conf, 0); - cy.nodes().forEach(function(n) { - n.layoutDimensions = () => { - const data = n.data(); - return { w: data.width, h: data.height }; - }; - }); - cy.layout({ - name: "cose-bilkent", - // @ts-ignore Types for cose-bilkent are not correct? - quality: "proof", - styleEnabled: false, - animate: false - }).run(); - cy.ready((e) => { - mermaid_b5860b54.l.info("Ready", e); - resolve(cy); - }); - }); -} -function positionNodes(db2, cy) { - cy.nodes().map((node, id) => { - const data = node.data(); - data.x = node.position().x; - data.y = node.position().y; - positionNode(db2, data); - const el = db2.getElementById(data.nodeId); - mermaid_b5860b54.l.info("Id:", id, "Position: (", node.position().x, ", ", node.position().y, ")", data); - el.attr( - "transform", - `translate(${node.position().x - data.width / 2}, ${node.position().y - data.height / 2})` - ); - el.attr("attr", `apa-${id})`); - }); -} -const draw = async (text, id, _version, diagObj) => { - var _a, _b; - mermaid_b5860b54.l.debug("Rendering mindmap diagram\n" + text); - const db2 = diagObj.db; - const mm = db2.getMindmap(); - if (!mm) { - return; - } - const conf = (0,mermaid_b5860b54.c)(); - conf.htmlLabels = false; - const svg = (0,mermaid_b5860b54.A)(id); - const edgesElem = svg.append("g"); - edgesElem.attr("class", "mindmap-edges"); - const nodesElem = svg.append("g"); - nodesElem.attr("class", "mindmap-nodes"); - drawNodes(db2, nodesElem, mm, -1, conf); - const cy = await layoutMindmap(mm, conf); - drawEdges(edgesElem, cy); - positionNodes(db2, cy); - (0,mermaid_b5860b54.o)( - void 0, - svg, - ((_a = conf.mindmap) == null ? void 0 : _a.padding) ?? mermaid_b5860b54.B.mindmap.padding, - ((_b = conf.mindmap) == null ? void 0 : _b.useMaxWidth) ?? mermaid_b5860b54.B.mindmap.useMaxWidth - ); -}; -const mindmap_definition_fc14e90a_renderer = { - draw -}; -const genSections = (options) => { - let sections = ""; - for (let i = 0; i < options.THEME_COLOR_LIMIT; i++) { - options["lineColor" + i] = options["lineColor" + i] || options["cScaleInv" + i]; - if ((0,is_dark/* default */.A)(options["lineColor" + i])) { - options["lineColor" + i] = (0,lighten/* default */.A)(options["lineColor" + i], 20); - } else { - options["lineColor" + i] = (0,darken/* default */.A)(options["lineColor" + i], 20); - } - } - for (let i = 0; i < options.THEME_COLOR_LIMIT; i++) { - const sw = "" + (17 - 3 * i); - sections += ` - .section-${i - 1} rect, .section-${i - 1} path, .section-${i - 1} circle, .section-${i - 1} polygon, .section-${i - 1} path { - fill: ${options["cScale" + i]}; - } - .section-${i - 1} text { - fill: ${options["cScaleLabel" + i]}; - } - .node-icon-${i - 1} { - font-size: 40px; - color: ${options["cScaleLabel" + i]}; - } - .section-edge-${i - 1}{ - stroke: ${options["cScale" + i]}; - } - .edge-depth-${i - 1}{ - stroke-width: ${sw}; - } - .section-${i - 1} line { - stroke: ${options["cScaleInv" + i]} ; - stroke-width: 3; - } - - .disabled, .disabled circle, .disabled text { - fill: lightgray; - } - .disabled text { - fill: #efefef; - } - `; - } - return sections; -}; -const getStyles = (options) => ` - .edge { - stroke-width: 3; - } - ${genSections(options)} - .section-root rect, .section-root path, .section-root circle, .section-root polygon { - fill: ${options.git0}; - } - .section-root text { - fill: ${options.gitBranchLabel0}; - } - .icon-container { - height:100%; - display: flex; - justify-content: center; - align-items: center; - } - .edge { - fill: none; - } - .mindmap-node-label { - dy: 1em; - alignment-baseline: middle; - text-anchor: middle; - dominant-baseline: middle; - text-align: center; - } -`; -const styles = getStyles; -const diagram = { - db: db$1, - renderer: mindmap_definition_fc14e90a_renderer, - parser: parser$1, - styles -}; - - - -/***/ }) - -}; -; \ No newline at end of file diff --git a/assets/js/495.be13a301.js b/assets/js/495.be13a301.js deleted file mode 100644 index afa53d1b7def..000000000000 --- a/assets/js/495.be13a301.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! For license information please see 495.be13a301.js.LICENSE.txt */ -(self.webpackChunk=self.webpackChunk||[]).push([[495],{87799:function(e,t,n){var r;r=function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=7)}([function(t,n){t.exports=e},function(e,t,n){"use strict";var r=n(0).FDLayoutConstants;function i(){}for(var a in r)i[a]=r[a];i.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,i.DEFAULT_RADIAL_SEPARATION=r.DEFAULT_EDGE_LENGTH,i.DEFAULT_COMPONENT_SEPERATION=60,i.TILE=!0,i.TILING_PADDING_VERTICAL=10,i.TILING_PADDING_HORIZONTAL=10,i.TREE_REDUCTION_ON_INCREMENTAL=!1,e.exports=i},function(e,t,n){"use strict";var r=n(0).FDLayoutEdge;function i(e,t,n){r.call(this,e,t,n)}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];e.exports=i},function(e,t,n){"use strict";var r=n(0).LGraph;function i(e,t,n){r.call(this,e,t,n)}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];e.exports=i},function(e,t,n){"use strict";var r=n(0).LGraphManager;function i(e){r.call(this,e)}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];e.exports=i},function(e,t,n){"use strict";var r=n(0).FDLayoutNode,i=n(0).IMath;function a(e,t,n,i){r.call(this,e,t,n,i)}for(var o in a.prototype=Object.create(r.prototype),r)a[o]=r[o];a.prototype.move=function(){var e=this.graphManager.getLayout();this.displacementX=e.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=e.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>e.coolingFactor*e.maxNodeDisplacement&&(this.displacementX=e.coolingFactor*e.maxNodeDisplacement*i.sign(this.displacementX)),Math.abs(this.displacementY)>e.coolingFactor*e.maxNodeDisplacement&&(this.displacementY=e.coolingFactor*e.maxNodeDisplacement*i.sign(this.displacementY)),null==this.child||0==this.child.getNodes().length?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),e.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},a.prototype.propogateDisplacementToChildren=function(e,t){for(var n,r=this.getChild().getNodes(),i=0;i0)this.positionNodesRadially(e);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var t=new Set(this.getAllNodes()),n=this.nodesWithGravity.filter((function(e){return t.has(e)}));this.graphManager.setAllNodesToApplyGravitation(n),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},m.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}if(this.totalIterations%u.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged()){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}this.coolingCycle++,0==this.layoutQuality?this.coolingAdjuster=this.coolingCycle:1==this.layoutQuality&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var e=new Set(this.getAllNodes()),t=this.nodesWithGravity.filter((function(t){return e.has(t)}));this.graphManager.setAllNodesToApplyGravitation(t),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=u.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=u.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var n=!this.isTreeGrowing&&!this.isGrowthFinished,r=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(n,r),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},m.prototype.getPositionsData=function(){for(var e=this.graphManager.getAllNodes(),t={},n=0;n1)for(s=0;sr&&(r=Math.floor(o.y)),a=Math.floor(o.x+l.DEFAULT_COMPONENT_SEPERATION)}this.transform(new d(c.WORLD_CENTER_X-o.x/2,c.WORLD_CENTER_Y-o.y/2))},m.radialLayout=function(e,t,n){var r=Math.max(this.maxDiagonalInTree(e),l.DEFAULT_RADIAL_SEPARATION);m.branchRadialLayout(t,null,0,359,0,r);var i=v.calculateBounds(e),a=new y;a.setDeviceOrgX(i.getMinX()),a.setDeviceOrgY(i.getMinY()),a.setWorldOrgX(n.x),a.setWorldOrgY(n.y);for(var o=0;o1;){var y=v[0];v.splice(0,1);var b=c.indexOf(y);b>=0&&c.splice(b,1),g--,h--}d=null!=t?(c.indexOf(v[0])+1)%g:0;for(var x=Math.abs(r-n)/h,w=d;p!=h;w=++w%g){var E=c[w].getOtherEnd(e);if(E!=t){var _=(n+p*x)%360,T=(_+x)%360;m.branchRadialLayout(E,e,_,T,i+a,a),p++}}},m.maxDiagonalInTree=function(e){for(var t=g.MIN_VALUE,n=0;nt&&(t=r)}return t},m.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},m.prototype.groupZeroDegreeMembers=function(){var e=this,t={};this.memberGroups={},this.idToDummyNode={};for(var n=[],r=this.graphManager.getAllNodes(),i=0;i1){var r="DummyCompound_"+n;e.memberGroups[r]=t[n];var i=t[n][0].getParent(),a=new o(e.graphManager);a.id=r,a.paddingLeft=i.paddingLeft||0,a.paddingRight=i.paddingRight||0,a.paddingBottom=i.paddingBottom||0,a.paddingTop=i.paddingTop||0,e.idToDummyNode[r]=a;var s=e.getGraphManager().add(e.newGraph(),a),l=i.getChild();l.add(a);for(var u=0;u=0;e--){var t=this.compoundOrder[e],n=t.id,r=t.paddingLeft,i=t.paddingTop;this.adjustLocations(this.tiledMemberPack[n],t.rect.x,t.rect.y,r,i)}},m.prototype.repopulateZeroDegreeMembers=function(){var e=this,t=this.tiledZeroDegreePack;Object.keys(t).forEach((function(n){var r=e.idToDummyNode[n],i=r.paddingLeft,a=r.paddingTop;e.adjustLocations(t[n],r.rect.x,r.rect.y,i,a)}))},m.prototype.getToBeTiled=function(e){var t=e.id;if(null!=this.toBeTiled[t])return this.toBeTiled[t];var n=e.getChild();if(null==n)return this.toBeTiled[t]=!1,!1;for(var r=n.getNodes(),i=0;i0)return this.toBeTiled[t]=!1,!1;if(null!=a.getChild()){if(!this.getToBeTiled(a))return this.toBeTiled[t]=!1,!1}else this.toBeTiled[a.id]=!1}return this.toBeTiled[t]=!0,!0},m.prototype.getNodeDegree=function(e){e.id;for(var t=e.getEdges(),n=0,r=0;rl&&(l=c.rect.height)}n+=l+e.verticalPadding}},m.prototype.tileCompoundMembers=function(e,t){var n=this;this.tiledMemberPack=[],Object.keys(e).forEach((function(r){var i=t[r];n.tiledMemberPack[r]=n.tileNodes(e[r],i.paddingLeft+i.paddingRight),i.rect.width=n.tiledMemberPack[r].width,i.rect.height=n.tiledMemberPack[r].height}))},m.prototype.tileNodes=function(e,t){var n={rows:[],rowWidth:[],rowHeight:[],width:0,height:t,verticalPadding:l.TILING_PADDING_VERTICAL,horizontalPadding:l.TILING_PADDING_HORIZONTAL};e.sort((function(e,t){return e.rect.width*e.rect.height>t.rect.width*t.rect.height?-1:e.rect.width*e.rect.height0&&(a+=e.horizontalPadding),e.rowWidth[n]=a,e.width0&&(o+=e.verticalPadding);var s=0;o>e.rowHeight[n]&&(s=e.rowHeight[n],e.rowHeight[n]=o,s=e.rowHeight[n]-s),e.height+=s,e.rows[n].push(t)},m.prototype.getShortestRowIndex=function(e){for(var t=-1,n=Number.MAX_VALUE,r=0;rn&&(t=r,n=e.rowWidth[r]);return t},m.prototype.canAddHorizontal=function(e,t,n){var r=this.getShortestRowIndex(e);if(r<0)return!0;var i=e.rowWidth[r];if(i+e.horizontalPadding+t<=e.width)return!0;var a,o,s=0;return e.rowHeight[r]0&&(s=n+e.verticalPadding-e.rowHeight[r]),a=e.width-i>=t+e.horizontalPadding?(e.height+s)/(i+t+e.horizontalPadding):(e.height+s)/e.width,s=n+e.verticalPadding,(o=e.widtha&&t!=n){r.splice(-1,1),e.rows[n].push(i),e.rowWidth[t]=e.rowWidth[t]-a,e.rowWidth[n]=e.rowWidth[n]+a,e.width=e.rowWidth[instance.getLongestRowIndex(e)];for(var o=Number.MIN_VALUE,s=0;so&&(o=r[s].height);t>0&&(o+=e.verticalPadding);var l=e.rowHeight[t]+e.rowHeight[n];e.rowHeight[t]=o,e.rowHeight[n]0)for(var c=i;c<=a;c++)l[0]+=this.grid[c][o-1].length+this.grid[c][o].length-1;if(a0)for(c=o;c<=s;c++)l[3]+=this.grid[i-1][c].length+this.grid[i][c].length-1;for(var h,d,p=g.MAX_VALUE,f=0;f0&&(o=n.getGraphManager().add(n.newGraph(),a),this.processChildrenList(o,h,n))}},h.prototype.stop=function(){return this.stopped=!0,this};var p=function(e){e("layout","cose-bilkent",h)};"undefined"!=typeof cytoscape&&p(cytoscape),e.exports=p}])},e.exports=r(n(87799))},23143:function(e){var t;t=function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=26)}([function(e,t,n){"use strict";function r(){}r.QUALITY=1,r.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,r.DEFAULT_INCREMENTAL=!1,r.DEFAULT_ANIMATION_ON_LAYOUT=!0,r.DEFAULT_ANIMATION_DURING_LAYOUT=!1,r.DEFAULT_ANIMATION_PERIOD=50,r.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,r.DEFAULT_GRAPH_MARGIN=15,r.NODE_DIMENSIONS_INCLUDE_LABELS=!1,r.SIMPLE_NODE_SIZE=40,r.SIMPLE_NODE_HALF_SIZE=r.SIMPLE_NODE_SIZE/2,r.EMPTY_COMPOUND_NODE_SIZE=40,r.MIN_EDGE_LENGTH=1,r.WORLD_BOUNDARY=1e6,r.INITIAL_WORLD_BOUNDARY=r.WORLD_BOUNDARY/1e3,r.WORLD_CENTER_X=1200,r.WORLD_CENTER_Y=900,e.exports=r},function(e,t,n){"use strict";var r=n(2),i=n(8),a=n(9);function o(e,t,n){r.call(this,n),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=n,this.bendpoints=[],this.source=e,this.target=t}for(var s in o.prototype=Object.create(r.prototype),r)o[s]=r[s];o.prototype.getSource=function(){return this.source},o.prototype.getTarget=function(){return this.target},o.prototype.isInterGraph=function(){return this.isInterGraph},o.prototype.getLength=function(){return this.length},o.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},o.prototype.getBendpoints=function(){return this.bendpoints},o.prototype.getLca=function(){return this.lca},o.prototype.getSourceInLca=function(){return this.sourceInLca},o.prototype.getTargetInLca=function(){return this.targetInLca},o.prototype.getOtherEnd=function(e){if(this.source===e)return this.target;if(this.target===e)return this.source;throw"Node is not incident with this edge"},o.prototype.getOtherEndInGraph=function(e,t){for(var n=this.getOtherEnd(e),r=t.getGraphManager().getRoot();;){if(n.getOwner()==t)return n;if(n.getOwner()==r)break;n=n.getOwner().getParent()}return null},o.prototype.updateLength=function(){var e=new Array(4);this.isOverlapingSourceAndTarget=i.getIntersection(this.target.getRect(),this.source.getRect(),e),this.isOverlapingSourceAndTarget||(this.lengthX=e[0]-e[2],this.lengthY=e[1]-e[3],Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},o.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},e.exports=o},function(e,t,n){"use strict";e.exports=function(e){this.vGraphObject=e}},function(e,t,n){"use strict";var r=n(2),i=n(10),a=n(13),o=n(0),s=n(16),l=n(4);function u(e,t,n,o){null==n&&null==o&&(o=t),r.call(this,o),null!=e.graphManager&&(e=e.graphManager),this.estimatedSize=i.MIN_VALUE,this.inclusionTreeDepth=i.MAX_VALUE,this.vGraphObject=o,this.edges=[],this.graphManager=e,this.rect=null!=n&&null!=t?new a(t.x,t.y,n.width,n.height):new a}for(var c in u.prototype=Object.create(r.prototype),r)u[c]=r[c];u.prototype.getEdges=function(){return this.edges},u.prototype.getChild=function(){return this.child},u.prototype.getOwner=function(){return this.owner},u.prototype.getWidth=function(){return this.rect.width},u.prototype.setWidth=function(e){this.rect.width=e},u.prototype.getHeight=function(){return this.rect.height},u.prototype.setHeight=function(e){this.rect.height=e},u.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},u.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},u.prototype.getCenter=function(){return new l(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},u.prototype.getLocation=function(){return new l(this.rect.x,this.rect.y)},u.prototype.getRect=function(){return this.rect},u.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},u.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},u.prototype.setRect=function(e,t){this.rect.x=e.x,this.rect.y=e.y,this.rect.width=t.width,this.rect.height=t.height},u.prototype.setCenter=function(e,t){this.rect.x=e-this.rect.width/2,this.rect.y=t-this.rect.height/2},u.prototype.setLocation=function(e,t){this.rect.x=e,this.rect.y=t},u.prototype.moveBy=function(e,t){this.rect.x+=e,this.rect.y+=t},u.prototype.getEdgeListToNode=function(e){var t=[],n=this;return n.edges.forEach((function(r){if(r.target==e){if(r.source!=n)throw"Incorrect edge source!";t.push(r)}})),t},u.prototype.getEdgesBetween=function(e){var t=[],n=this;return n.edges.forEach((function(r){if(r.source!=n&&r.target!=n)throw"Incorrect edge source and/or target";r.target!=e&&r.source!=e||t.push(r)})),t},u.prototype.getNeighborsList=function(){var e=new Set,t=this;return t.edges.forEach((function(n){if(n.source==t)e.add(n.target);else{if(n.target!=t)throw"Incorrect incidency!";e.add(n.source)}})),e},u.prototype.withChildren=function(){var e=new Set;if(e.add(this),null!=this.child)for(var t=this.child.getNodes(),n=0;nt&&(this.rect.x-=(this.labelWidth-t)/2,this.setWidth(this.labelWidth)),this.labelHeight>n&&("center"==this.labelPos?this.rect.y-=(this.labelHeight-n)/2:"top"==this.labelPos&&(this.rect.y-=this.labelHeight-n),this.setHeight(this.labelHeight))}}},u.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==i.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},u.prototype.transform=function(e){var t=this.rect.x;t>o.WORLD_BOUNDARY?t=o.WORLD_BOUNDARY:t<-o.WORLD_BOUNDARY&&(t=-o.WORLD_BOUNDARY);var n=this.rect.y;n>o.WORLD_BOUNDARY?n=o.WORLD_BOUNDARY:n<-o.WORLD_BOUNDARY&&(n=-o.WORLD_BOUNDARY);var r=new l(t,n),i=e.inverseTransformPoint(r);this.setLocation(i.x,i.y)},u.prototype.getLeft=function(){return this.rect.x},u.prototype.getRight=function(){return this.rect.x+this.rect.width},u.prototype.getTop=function(){return this.rect.y},u.prototype.getBottom=function(){return this.rect.y+this.rect.height},u.prototype.getParent=function(){return null==this.owner?null:this.owner.getParent()},e.exports=u},function(e,t,n){"use strict";function r(e,t){null==e&&null==t?(this.x=0,this.y=0):(this.x=e,this.y=t)}r.prototype.getX=function(){return this.x},r.prototype.getY=function(){return this.y},r.prototype.setX=function(e){this.x=e},r.prototype.setY=function(e){this.y=e},r.prototype.getDifference=function(e){return new DimensionD(this.x-e.x,this.y-e.y)},r.prototype.getCopy=function(){return new r(this.x,this.y)},r.prototype.translate=function(e){return this.x+=e.width,this.y+=e.height,this},e.exports=r},function(e,t,n){"use strict";var r=n(2),i=n(10),a=n(0),o=n(6),s=n(3),l=n(1),u=n(13),c=n(12),h=n(11);function d(e,t,n){r.call(this,n),this.estimatedSize=i.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=e,null!=t&&t instanceof o?this.graphManager=t:null!=t&&t instanceof Layout&&(this.graphManager=t.graphManager)}for(var p in d.prototype=Object.create(r.prototype),r)d[p]=r[p];d.prototype.getNodes=function(){return this.nodes},d.prototype.getEdges=function(){return this.edges},d.prototype.getGraphManager=function(){return this.graphManager},d.prototype.getParent=function(){return this.parent},d.prototype.getLeft=function(){return this.left},d.prototype.getRight=function(){return this.right},d.prototype.getTop=function(){return this.top},d.prototype.getBottom=function(){return this.bottom},d.prototype.isConnected=function(){return this.isConnected},d.prototype.add=function(e,t,n){if(null==t&&null==n){var r=e;if(null==this.graphManager)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(r)>-1)throw"Node already in graph!";return r.owner=this,this.getNodes().push(r),r}var i=e;if(!(this.getNodes().indexOf(t)>-1&&this.getNodes().indexOf(n)>-1))throw"Source or target not in graph!";if(t.owner!=n.owner||t.owner!=this)throw"Both owners must be this graph!";return t.owner!=n.owner?null:(i.source=t,i.target=n,i.isInterGraph=!1,this.getEdges().push(i),t.edges.push(i),n!=t&&n.edges.push(i),i)},d.prototype.remove=function(e){var t=e;if(e instanceof s){if(null==t)throw"Node is null!";if(null==t.owner||t.owner!=this)throw"Owner graph is invalid!";if(null==this.graphManager)throw"Owner graph manager is invalid!";for(var n=t.edges.slice(),r=n.length,i=0;i-1&&c>-1))throw"Source and/or target doesn't know this edge!";if(a.source.edges.splice(u,1),a.target!=a.source&&a.target.edges.splice(c,1),-1==(o=a.source.owner.getEdges().indexOf(a)))throw"Not in owner's edge list!";a.source.owner.getEdges().splice(o,1)}},d.prototype.updateLeftTop=function(){for(var e,t,n,r=i.MAX_VALUE,a=i.MAX_VALUE,o=this.getNodes(),s=o.length,l=0;l(e=u.getTop())&&(r=e),a>(t=u.getLeft())&&(a=t)}return r==i.MAX_VALUE?null:(n=null!=o[0].getParent().paddingLeft?o[0].getParent().paddingLeft:this.margin,this.left=a-n,this.top=r-n,new c(this.left,this.top))},d.prototype.updateBounds=function(e){for(var t,n,r,a,o,s=i.MAX_VALUE,l=-i.MAX_VALUE,c=i.MAX_VALUE,h=-i.MAX_VALUE,d=this.nodes,p=d.length,g=0;g(t=f.getLeft())&&(s=t),l<(n=f.getRight())&&(l=n),c>(r=f.getTop())&&(c=r),h<(a=f.getBottom())&&(h=a)}var v=new u(s,c,l-s,h-c);s==i.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),o=null!=d[0].getParent().paddingLeft?d[0].getParent().paddingLeft:this.margin,this.left=v.x-o,this.right=v.x+v.width+o,this.top=v.y-o,this.bottom=v.y+v.height+o},d.calculateBounds=function(e){for(var t,n,r,a,o=i.MAX_VALUE,s=-i.MAX_VALUE,l=i.MAX_VALUE,c=-i.MAX_VALUE,h=e.length,d=0;d(t=p.getLeft())&&(o=t),s<(n=p.getRight())&&(s=n),l>(r=p.getTop())&&(l=r),c<(a=p.getBottom())&&(c=a)}return new u(o,l,s-o,c-l)},d.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},d.prototype.getEstimatedSize=function(){if(this.estimatedSize==i.MIN_VALUE)throw"assert failed";return this.estimatedSize},d.prototype.calcEstimatedSize=function(){for(var e=0,t=this.nodes,n=t.length,r=0;r=this.nodes.length){var l=0;i.forEach((function(t){t.owner==e&&l++})),l==this.nodes.length&&(this.isConnected=!0)}}else this.isConnected=!0},e.exports=d},function(e,t,n){"use strict";var r,i=n(1);function a(e){r=n(5),this.layout=e,this.graphs=[],this.edges=[]}a.prototype.addRoot=function(){var e=this.layout.newGraph(),t=this.layout.newNode(null),n=this.add(e,t);return this.setRootGraph(n),this.rootGraph},a.prototype.add=function(e,t,n,r,i){if(null==n&&null==r&&null==i){if(null==e)throw"Graph is null!";if(null==t)throw"Parent node is null!";if(this.graphs.indexOf(e)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(e),null!=e.parent)throw"Already has a parent!";if(null!=t.child)throw"Already has a child!";return e.parent=t,t.child=e,e}i=n,n=e;var a=(r=t).getOwner(),o=i.getOwner();if(null==a||a.getGraphManager()!=this)throw"Source not in this graph mgr!";if(null==o||o.getGraphManager()!=this)throw"Target not in this graph mgr!";if(a==o)return n.isInterGraph=!1,a.add(n,r,i);if(n.isInterGraph=!0,n.source=r,n.target=i,this.edges.indexOf(n)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(n),null==n.source||null==n.target)throw"Edge source and/or target is null!";if(-1!=n.source.edges.indexOf(n)||-1!=n.target.edges.indexOf(n))throw"Edge already in source and/or target incidency list!";return n.source.edges.push(n),n.target.edges.push(n),n},a.prototype.remove=function(e){if(e instanceof r){var t=e;if(t.getGraphManager()!=this)throw"Graph not in this graph mgr";if(t!=this.rootGraph&&(null==t.parent||t.parent.graphManager!=this))throw"Invalid parent node!";for(var n,a=[],o=(a=a.concat(t.getEdges())).length,s=0;s=t.getRight()?n[0]+=Math.min(t.getX()-e.getX(),e.getRight()-t.getRight()):t.getX()<=e.getX()&&t.getRight()>=e.getRight()&&(n[0]+=Math.min(e.getX()-t.getX(),t.getRight()-e.getRight())),e.getY()<=t.getY()&&e.getBottom()>=t.getBottom()?n[1]+=Math.min(t.getY()-e.getY(),e.getBottom()-t.getBottom()):t.getY()<=e.getY()&&t.getBottom()>=e.getBottom()&&(n[1]+=Math.min(e.getY()-t.getY(),t.getBottom()-e.getBottom()));var a=Math.abs((t.getCenterY()-e.getCenterY())/(t.getCenterX()-e.getCenterX()));t.getCenterY()===e.getCenterY()&&t.getCenterX()===e.getCenterX()&&(a=1);var o=a*n[0],s=n[1]/a;n[0]o)return n[0]=r,n[1]=l,n[2]=a,n[3]=b,!1;if(ia)return n[0]=s,n[1]=i,n[2]=y,n[3]=o,!1;if(ra?(n[0]=c,n[1]=h,_=!0):(n[0]=u,n[1]=l,_=!0):D===N&&(r>a?(n[0]=s,n[1]=l,_=!0):(n[0]=d,n[1]=h,_=!0)),-C===N?a>r?(n[2]=m,n[3]=b,T=!0):(n[2]=y,n[3]=v,T=!0):C===N&&(a>r?(n[2]=f,n[3]=v,T=!0):(n[2]=x,n[3]=b,T=!0)),_&&T)return!1;if(r>a?i>o?(A=this.getCardinalDirection(D,N,4),L=this.getCardinalDirection(C,N,2)):(A=this.getCardinalDirection(-D,N,3),L=this.getCardinalDirection(-C,N,1)):i>o?(A=this.getCardinalDirection(-D,N,1),L=this.getCardinalDirection(-C,N,3)):(A=this.getCardinalDirection(D,N,2),L=this.getCardinalDirection(C,N,4)),!_)switch(A){case 1:S=l,k=r+-g/N,n[0]=k,n[1]=S;break;case 2:k=d,S=i+p*N,n[0]=k,n[1]=S;break;case 3:S=h,k=r+g/N,n[0]=k,n[1]=S;break;case 4:k=c,S=i+-p*N,n[0]=k,n[1]=S}if(!T)switch(L){case 1:I=v,M=a+-E/N,n[2]=M,n[3]=I;break;case 2:M=x,I=o+w*N,n[2]=M,n[3]=I;break;case 3:I=b,M=a+E/N,n[2]=M,n[3]=I;break;case 4:M=m,I=o+-w*N,n[2]=M,n[3]=I}}return!1},i.getCardinalDirection=function(e,t,n){return e>t?n:1+n%4},i.getIntersection=function(e,t,n,i){if(null==i)return this.getIntersection2(e,t,n);var a,o,s,l,u,c,h,d=e.x,p=e.y,g=t.x,f=t.y,v=n.x,y=n.y,m=i.x,b=i.y;return 0==(h=(a=f-p)*(l=v-m)-(o=b-y)*(s=d-g))?null:new r((s*(c=m*y-v*b)-l*(u=g*p-d*f))/h,(o*u-a*c)/h)},i.angleOfVector=function(e,t,n,r){var i=void 0;return e!==n?(i=Math.atan((r-t)/(n-e)),n0?1:e<0?-1:0},r.floor=function(e){return e<0?Math.ceil(e):Math.floor(e)},r.ceil=function(e){return e<0?Math.floor(e):Math.ceil(e)},e.exports=r},function(e,t,n){"use strict";function r(){}r.MAX_VALUE=2147483647,r.MIN_VALUE=-2147483648,e.exports=r},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n0&&t;){for(s.push(u[0]);s.length>0&&t;){var c=s[0];s.splice(0,1),o.add(c);var h=c.getEdges();for(a=0;a-1&&u.splice(f,1)}o=new Set,l=new Map}else e=[]}return e},d.prototype.createDummyNodesForBendpoints=function(e){for(var t=[],n=e.source,r=this.graphManager.calcLowestCommonAncestor(e.source,e.target),i=0;i0){for(var i=this.edgeToDummyNodes.get(n),a=0;a=0&&t.splice(h,1),c.getNeighborsList().forEach((function(e){if(n.indexOf(e)<0){var t=r.get(e)-1;1==t&&l.push(e),r.set(e,t)}}))}n=n.concat(l),1!=t.length&&2!=t.length||(i=!0,a=t[0])}return a},d.prototype.setGraphManager=function(e){this.graphManager=e},e.exports=d},function(e,t,n){"use strict";function r(){}r.seed=1,r.x=0,r.nextDouble=function(){return r.x=1e4*Math.sin(r.seed++),r.x-Math.floor(r.x)},e.exports=r},function(e,t,n){"use strict";var r=n(4);function i(e,t){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}i.prototype.getWorldOrgX=function(){return this.lworldOrgX},i.prototype.setWorldOrgX=function(e){this.lworldOrgX=e},i.prototype.getWorldOrgY=function(){return this.lworldOrgY},i.prototype.setWorldOrgY=function(e){this.lworldOrgY=e},i.prototype.getWorldExtX=function(){return this.lworldExtX},i.prototype.setWorldExtX=function(e){this.lworldExtX=e},i.prototype.getWorldExtY=function(){return this.lworldExtY},i.prototype.setWorldExtY=function(e){this.lworldExtY=e},i.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},i.prototype.setDeviceOrgX=function(e){this.ldeviceOrgX=e},i.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},i.prototype.setDeviceOrgY=function(e){this.ldeviceOrgY=e},i.prototype.getDeviceExtX=function(){return this.ldeviceExtX},i.prototype.setDeviceExtX=function(e){this.ldeviceExtX=e},i.prototype.getDeviceExtY=function(){return this.ldeviceExtY},i.prototype.setDeviceExtY=function(e){this.ldeviceExtY=e},i.prototype.transformX=function(e){var t=0,n=this.lworldExtX;return 0!=n&&(t=this.ldeviceOrgX+(e-this.lworldOrgX)*this.ldeviceExtX/n),t},i.prototype.transformY=function(e){var t=0,n=this.lworldExtY;return 0!=n&&(t=this.ldeviceOrgY+(e-this.lworldOrgY)*this.ldeviceExtY/n),t},i.prototype.inverseTransformX=function(e){var t=0,n=this.ldeviceExtX;return 0!=n&&(t=this.lworldOrgX+(e-this.ldeviceOrgX)*this.lworldExtX/n),t},i.prototype.inverseTransformY=function(e){var t=0,n=this.ldeviceExtY;return 0!=n&&(t=this.lworldOrgY+(e-this.ldeviceOrgY)*this.lworldExtY/n),t},i.prototype.inverseTransformPoint=function(e){return new r(this.inverseTransformX(e.x),this.inverseTransformY(e.y))},e.exports=i},function(e,t,n){"use strict";var r=n(15),i=n(7),a=n(0),o=n(8),s=n(9);function l(){r.call(this),this.useSmartIdealEdgeLengthCalculation=i.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.idealEdgeLength=i.DEFAULT_EDGE_LENGTH,this.springConstant=i.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=i.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=i.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=i.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=i.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*i.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=i.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=i.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=i.MAX_ITERATIONS}for(var u in l.prototype=Object.create(r.prototype),r)l[u]=r[u];l.prototype.initParameters=function(){r.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=i.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},l.prototype.calcIdealEdgeLengths=function(){for(var e,t,n,r,o,s,l=this.getGraphManager().getAllEdges(),u=0;ui.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*i.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(e-i.ADAPTATION_LOWER_NODE_LIMIT)/(i.ADAPTATION_UPPER_NODE_LIMIT-i.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-i.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=i.MAX_NODE_DISPLACEMENT_INCREMENTAL):(e>i.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(i.COOLING_ADAPTATION_FACTOR,1-(e-i.ADAPTATION_LOWER_NODE_LIMIT)/(i.ADAPTATION_UPPER_NODE_LIMIT-i.ADAPTATION_LOWER_NODE_LIMIT)*(1-i.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=i.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(5*this.getAllNodes().length,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},l.prototype.calcSpringForces=function(){for(var e,t=this.getAllEdges(),n=0;n0&&void 0!==arguments[0])||arguments[0],s=arguments.length>1&&void 0!==arguments[1]&&arguments[1],l=this.getAllNodes();if(this.useFRGridVariant)for(this.totalIterations%i.GRID_CALCULATION_CHECK_PERIOD==1&&o&&this.updateGrid(),a=new Set,e=0;e(l=t.getEstimatedSize()*this.gravityRangeFactor)||s>l)&&(e.gravitationForceX=-this.gravityConstant*i,e.gravitationForceY=-this.gravityConstant*a):(o>(l=t.getEstimatedSize()*this.compoundGravityRangeFactor)||s>l)&&(e.gravitationForceX=-this.gravityConstant*i*this.compoundGravityConstant,e.gravitationForceY=-this.gravityConstant*a*this.compoundGravityConstant)},l.prototype.isConverged=function(){var e,t=!1;return this.totalIterations>this.maxIterations/3&&(t=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),e=this.totalDisplacement=s.length||u>=s[0].length))for(var c=0;ce}}]),e}();e.exports=a},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:1,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.sequence1=t,this.sequence2=n,this.match_score=r,this.mismatch_penalty=i,this.gap_penalty=a,this.iMax=t.length+1,this.jMax=n.length+1,this.grid=new Array(this.iMax);for(var o=0;o=0;n--){var r=this.listeners[n];r.event===e&&r.callback===t&&this.listeners.splice(n,1)}},i.emit=function(e,t){for(var n=0;n{"use strict";n.d(t,{diagram:()=>hh});var r=n(86079);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}var p="undefined"==typeof window?null:window,g=p?p.navigator:null;p&&p.document;var f=i(""),v=i({}),y=i((function(){})),m="undefined"==typeof HTMLElement?"undefined":i(HTMLElement),b=function(e){return e&&e.instanceString&&w(e.instanceString)?e.instanceString():null},x=function(e){return null!=e&&i(e)==f},w=function(e){return null!=e&&i(e)===y},E=function(e){return!C(e)&&(Array.isArray?Array.isArray(e):null!=e&&e instanceof Array)},_=function(e){return null!=e&&i(e)===v&&!E(e)&&e.constructor===Object},T=function(e){return null!=e&&i(e)===i(1)&&!isNaN(e)},D=function(e){return"undefined"===m?void 0:null!=e&&e instanceof HTMLElement},C=function(e){return N(e)||A(e)},N=function(e){return"collection"===b(e)&&e._private.single},A=function(e){return"collection"===b(e)&&!e._private.single},L=function(e){return"core"===b(e)},k=function(e){return"stylesheet"===b(e)},S=function(e){return null==e||!(""!==e&&!e.match(/^\s+$/))},M=function(e){return function(e){return null!=e&&i(e)===v}(e)&&w(e.then)},I=function(e,t){t||(t=function(){if(1===arguments.length)return arguments[0];if(0===arguments.length)return"undefined";for(var e=[],t=0;tt?1:0},U=null!=Object.assign?Object.assign.bind(Object):function(e){for(var t=arguments,n=1;n255)return;t.push(Math.floor(a))}var o=r[1]||r[2]||r[3],s=r[1]&&r[2]&&r[3];if(o&&!s)return;var l=n[4];if(void 0!==l){if((l=parseFloat(l))<0||l>1)return;t.push(l)}}return t}(e)||function(e){var t,n,r,i,a,o,s,l;function u(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}var c=new RegExp("^"+Y+"$").exec(e);if(c){if((n=parseInt(c[1]))<0?n=(360- -1*n%360)%360:n>360&&(n%=360),n/=360,(r=parseFloat(c[2]))<0||r>100)return;if(r/=100,(i=parseFloat(c[3]))<0||i>100)return;if(i/=100,void 0!==(a=c[4])&&((a=parseFloat(a))<0||a>1))return;if(0===r)o=s=l=Math.round(255*i);else{var h=i<.5?i*(1+r):i+r-i*r,d=2*i-h;o=Math.round(255*u(d,h,n+1/3)),s=Math.round(255*u(d,h,n)),l=Math.round(255*u(d,h,n-1/3))}t=[o,s,l,a]}return t}(e)},q={transparent:[0,0,0,0],aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],grey:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},H=function(e){for(var t=e.map,n=e.keys,r=n.length,i=0;i=t||n<0||h&&e-u>=a}function f(){var e=ee();if(g(e))return v(e);s=setTimeout(f,function(e){var n=t-(e-l);return h?_e(n,a-(e-u)):n}(e))}function v(e){return s=void 0,d&&r?p(e):(r=i=void 0,o)}function y(){var e=ee(),n=g(e);if(r=arguments,i=this,l=e,n){if(void 0===s)return function(e){return u=e,s=setTimeout(f,t),c?p(e):o}(l);if(h)return clearTimeout(s),s=setTimeout(f,t),p(l)}return void 0===s&&(s=setTimeout(f,t)),o}return t=we(t)||0,$(n)&&(c=!!n.leading,a=(h="maxWait"in n)?Ee(we(n.maxWait)||0,t):a,d="trailing"in n?!!n.trailing:d),y.cancel=function(){void 0!==s&&clearTimeout(s),u=0,r=l=i=s=void 0},y.flush=function(){return void 0===s?o:v(ee())},y},De=p?p.performance:null,Ce=De&&De.now?function(){return De.now()}:function(){return Date.now()},Ne=function(){if(p){if(p.requestAnimationFrame)return function(e){p.requestAnimationFrame(e)};if(p.mozRequestAnimationFrame)return function(e){p.mozRequestAnimationFrame(e)};if(p.webkitRequestAnimationFrame)return function(e){p.webkitRequestAnimationFrame(e)};if(p.msRequestAnimationFrame)return function(e){p.msRequestAnimationFrame(e)}}return function(e){e&&setTimeout((function(){e(Ce())}),1e3/60)}}(),Ae=function(e){return Ne(e)},Le=Ce,ke=9261,Se=5381,Me=function(e){for(var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ke;!(t=e.next()).done;)n=65599*n+t.value|0;return n},Ie=function(e){return 65599*(arguments.length>1&&void 0!==arguments[1]?arguments[1]:ke)+e|0},Oe=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Se;return(t<<5)+t+e|0},Pe=function(e){return 2097152*e[0]+e[1]},Re=function(e,t){return[Ie(e[0],t[0]),Oe(e[1],t[1])]},Be=function(e,t){var n={value:0,done:!1},r=0,i=e.length;return Me({next:function(){return r=0&&(e[r]!==t||(e.splice(r,1),!n));r--);},rt=function(e){e.splice(0,e.length)},it=function(e,t,n){return n&&(t=R(n,t)),e[t]},at=function(e,t,n,r){n&&(t=R(n,t)),e[t]=r},ot="undefined"!=typeof Map?Map:function(){function e(){a(this,e),this._obj={}}return s(e,[{key:"set",value:function(e,t){return this._obj[e]=t,this}},{key:"delete",value:function(e){return this._obj[e]=void 0,this}},{key:"clear",value:function(){this._obj={}}},{key:"has",value:function(e){return void 0!==this._obj[e]}},{key:"get",value:function(e){return this._obj[e]}}]),e}(),st=function(){function e(t){if(a(this,e),this._obj=Object.create(null),this.size=0,null!=t){var n;n=null!=t.instanceString&&t.instanceString()===this.instanceString()?t.toArray():t;for(var r=0;r2&&void 0!==arguments[2])||arguments[2];if(void 0!==e&&void 0!==t&&L(e)){var r=t.group;if(null==r&&(r=t.data&&null!=t.data.source&&null!=t.data.target?"edges":"nodes"),"nodes"===r||"edges"===r){this.length=1,this[0]=this;var i=this._private={cy:e,single:!0,data:t.data||{},position:t.position||{x:0,y:0},autoWidth:void 0,autoHeight:void 0,autoPadding:void 0,compoundBoundsClean:!1,listeners:[],group:r,style:{},rstyle:{},styleCxts:[],styleKeys:{},removed:!0,selected:!!t.selected,selectable:void 0===t.selectable||!!t.selectable,locked:!!t.locked,grabbed:!1,grabbable:void 0===t.grabbable||!!t.grabbable,pannable:void 0===t.pannable?"edges"===r:!!t.pannable,active:!1,classes:new lt,animation:{current:[],queue:[]},rscratch:{},scratch:t.scratch||{},edges:[],children:[],parent:t.parent&&t.parent.isNode()?t.parent:null,traversalCache:{},backgrounding:!1,bbCache:null,bbCacheShift:{x:0,y:0},bodyBounds:null,overlayBounds:null,labelBounds:{all:null,source:null,target:null,main:null},arrowBounds:{source:null,target:null,"mid-source":null,"mid-target":null}};if(null==i.position.x&&(i.position.x=0),null==i.position.y&&(i.position.y=0),t.renderedPosition){var a=t.renderedPosition,o=e.pan(),s=e.zoom();i.position={x:(a.x-o.x)/s,y:(a.y-o.y)/s}}var l=[];E(t.classes)?l=t.classes:x(t.classes)&&(l=t.classes.split(/\s+/));for(var u=0,c=l.length;ut?1:0},u=function(e,t,i,a,o){var s;if(null==i&&(i=0),null==o&&(o=n),i<0)throw new Error("lo must be non-negative");for(null==a&&(a=e.length);in;0<=n?t++:t--)u.push(t);return u}.apply(this).reverse()).length;af;0<=f?++d:--d)v.push(a(e,r));return v},g=function(e,t,r,i){var a,o,s;for(null==i&&(i=n),a=e[r];r>t&&i(a,o=e[s=r-1>>1])<0;)e[r]=o,r=s;return e[r]=a},f=function(e,t,r){var i,a,o,s,l;for(null==r&&(r=n),a=e.length,l=t,o=e[t],i=2*t+1;i0;){var E=y.pop(),T=f(E),D=E.id();if(h[D]=T,T!==1/0)for(var C=E.neighborhood().intersect(p),N=0;N0)for(n.unshift(t);c[i];){var a=c[i];n.unshift(a.edge),n.unshift(a.node),i=(r=a.node).id()}return o.spawn(n)}}}},vt={kruskal:function(e){e=e||function(e){return 1};for(var t=this.byGroup(),n=t.nodes,r=t.edges,i=n.length,a=new Array(i),o=n,s=function(e){for(var t=0;t0;){if(l=f.pop(),u=l.id(),v.delete(u),w++,u===h){for(var E=[],_=i,T=h,D=m[T];E.unshift(_),null!=D&&E.unshift(D),null!=(_=y[T]);)D=m[T=_.id()];return{found:!0,distance:d[u],path:this.spawn(E),steps:w}}g[u]=!0;for(var C=l._private.edges,N=0;NN&&(p[C]=N,y[C]=D,m[C]=w),!i){var A=D*u+T;!i&&p[A]>N&&(p[A]=N,y[A]=T,m[A]=w)}}}for(var L=0;L1&&void 0!==arguments[1]?arguments[1]:a,r=[],i=m(e);;){if(null==i)return t.spawn();var o=y(i),l=o.edge,u=o.pred;if(r.unshift(i[0]),i.same(n)&&r.length>0)break;null!=l&&r.unshift(l),i=u}return s.spawn(r)},hasNegativeWeightCycle:g,negativeWeightCycles:f}}},_t=Math.sqrt(2),Tt=function(e,t,n){0===n.length&&We("Karger-Stein must be run on a connected (sub)graph");for(var r=n[e],i=r[1],a=r[2],o=t[i],s=t[a],l=n,u=l.length-1;u>=0;u--){var c=l[u],h=c[1],d=c[2];(t[h]===o&&t[d]===s||t[h]===s&&t[d]===o)&&l.splice(u,1)}for(var p=0;pr;){var i=Math.floor(Math.random()*t.length);t=Tt(i,e,t),n--}return t},Ct={kargerStein:function(){var e=this,t=this.byGroup(),n=t.nodes,r=t.edges;r.unmergeBy((function(e){return e.isLoop()}));var i=n.length,a=r.length,o=Math.ceil(Math.pow(Math.log(i)/Math.LN2,2)),s=Math.floor(i/_t);if(!(i<2)){for(var l=[],u=0;u0?1:e<0?-1:0},It=function(e,t){return Math.sqrt(Ot(e,t))},Ot=function(e,t){var n=t.x-e.x,r=t.y-e.y;return n*n+r*r},Pt=function(e){for(var t=e.length,n=0,r=0;r=e.x1&&e.y2>=e.y1)return{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,w:e.x2-e.x1,h:e.y2-e.y1};if(null!=e.w&&null!=e.h&&e.w>=0&&e.h>=0)return{x1:e.x1,y1:e.y1,x2:e.x1+e.w,y2:e.y1+e.h,w:e.w,h:e.h}}},Gt=function(e,t){e.x1=Math.min(e.x1,t.x1),e.x2=Math.max(e.x2,t.x2),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,t.y1),e.y2=Math.max(e.y2,t.y2),e.h=e.y2-e.y1},Yt=function(e,t,n){e.x1=Math.min(e.x1,t),e.x2=Math.max(e.x2,t),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,n),e.y2=Math.max(e.y2,n),e.h=e.y2-e.y1},Vt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.x1-=t,e.x2+=t,e.y1-=t,e.y2+=t,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},Xt=function(e){var t,n,r,i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0];if(1===a.length)t=n=r=i=a[0];else if(2===a.length)t=r=a[0],i=n=a[1];else if(4===a.length){var o=u(a,4);t=o[0],n=o[1],r=o[2],i=o[3]}return e.x1-=i,e.x2+=n,e.y1-=t,e.y2+=r,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},Ut=function(e,t){e.x1=t.x1,e.y1=t.y1,e.x2=t.x2,e.y2=t.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1},jt=function(e,t){return!(e.x1>t.x2)&&(!(t.x1>e.x2)&&(!(e.x2t.y2)&&!(t.y1>e.y2)))))))},qt=function(e,t,n){return e.x1<=t&&t<=e.x2&&e.y1<=n&&n<=e.y2},Ht=function(e,t){return qt(e,t.x1,t.y1)&&qt(e,t.x2,t.y2)},Wt=function(e,t,n,r,i,a,o){var s,l,u=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"auto",c="auto"===u?pn(i,a):u,h=i/2,d=a/2,p=(c=Math.min(c,h,d))!==h,g=c!==d;if(p){var f=r-d-o;if((s=sn(e,t,n,r,n-h+c-o,f,n+h-c+o,f,!1)).length>0)return s}if(g){var v=n+h+o;if((s=sn(e,t,n,r,v,r-d+c-o,v,r+d-c+o,!1)).length>0)return s}if(p){var y=r+d+o;if((s=sn(e,t,n,r,n-h+c-o,y,n+h-c+o,y,!1)).length>0)return s}if(g){var m=n-h-o;if((s=sn(e,t,n,r,m,r-d+c-o,m,r+d-c+o,!1)).length>0)return s}var b=n-h+c,x=r-d+c;if((l=an(e,t,n,r,b,x,c+o)).length>0&&l[0]<=b&&l[1]<=x)return[l[0],l[1]];var w=n+h-c,E=r-d+c;if((l=an(e,t,n,r,w,E,c+o)).length>0&&l[0]>=w&&l[1]<=E)return[l[0],l[1]];var _=n+h-c,T=r+d-c;if((l=an(e,t,n,r,_,T,c+o)).length>0&&l[0]>=_&&l[1]>=T)return[l[0],l[1]];var D=n-h+c,C=r+d-c;return(l=an(e,t,n,r,D,C,c+o)).length>0&&l[0]<=D&&l[1]>=C?[l[0],l[1]]:[]},$t=function(e,t,n,r,i,a,o){var s=o,l=Math.min(n,i),u=Math.max(n,i),c=Math.min(r,a),h=Math.max(r,a);return l-s<=e&&e<=u+s&&c-s<=t&&t<=h+s},Kt=function(e,t,n,r,i,a,o,s,l){var u=Math.min(n,o,i)-l,c=Math.max(n,o,i)+l,h=Math.min(r,s,a)-l,d=Math.max(r,s,a)+l;return!(ec||td)},Zt=function(e,t,n,r,i,a,o,s){var l=[];!function(e,t,n,r,i){var a,o,s,l,u,c,h,d;0===e&&(e=1e-5),s=-27*(r/=e)+(t/=e)*(9*(n/=e)-t*t*2),a=(o=(3*n-t*t)/9)*o*o+(s/=54)*s,i[1]=0,h=t/3,a>0?(u=(u=s+Math.sqrt(a))<0?-Math.pow(-u,1/3):Math.pow(u,1/3),c=(c=s-Math.sqrt(a))<0?-Math.pow(-c,1/3):Math.pow(c,1/3),i[0]=-h+u+c,h+=(u+c)/2,i[4]=i[2]=-h,h=Math.sqrt(3)*(-c+u)/2,i[3]=h,i[5]=-h):(i[5]=i[3]=0,0===a?(d=s<0?-Math.pow(-s,1/3):Math.pow(s,1/3),i[0]=2*d-h,i[4]=i[2]=-(d+h)):(l=(o=-o)*o*o,l=Math.acos(s/Math.sqrt(l)),d=2*Math.sqrt(o),i[0]=-h+d*Math.cos(l/3),i[2]=-h+d*Math.cos((l+2*Math.PI)/3),i[4]=-h+d*Math.cos((l+4*Math.PI)/3)))}(1*n*n-4*n*i+2*n*o+4*i*i-4*i*o+o*o+r*r-4*r*a+2*r*s+4*a*a-4*a*s+s*s,9*n*i-3*n*n-3*n*o-6*i*i+3*i*o+9*r*a-3*r*r-3*r*s-6*a*a+3*a*s,3*n*n-6*n*i+n*o-n*e+2*i*i+2*i*e-o*e+3*r*r-6*r*a+r*s-r*t+2*a*a+2*a*t-s*t,1*n*i-n*n+n*e-i*e+r*a-r*r+r*t-a*t,l);for(var u=[],c=0;c<6;c+=2)Math.abs(l[c+1])<1e-7&&l[c]>=0&&l[c]<=1&&u.push(l[c]);u.push(1),u.push(0);for(var h,d,p,g=-1,f=0;f=0?pl?(e-i)*(e-i)+(t-a)*(t-a):u-h},Jt=function(e,t,n){for(var r,i,a,o,s=0,l=0;l=e&&e>=a||r<=e&&e<=a))continue;(e-r)/(a-r)*(o-i)+i>t&&s++}return s%2!=0},en=function(e,t,n,r,i,a,o,s,l){var u,c=new Array(n.length);null!=s[0]?(u=Math.atan(s[1]/s[0]),s[0]<0?u+=Math.PI/2:u=-u-Math.PI/2):u=s;for(var h,d=Math.cos(-u),p=Math.sin(-u),g=0;g0){var f=nn(c,-l);h=tn(f)}else h=c;return Jt(e,t,h)},tn=function(e){for(var t,n,r,i,a,o,s,l,u=new Array(e.length/2),c=0;c=0&&g<=1&&v.push(g),f>=0&&f<=1&&v.push(f),0===v.length)return[];var y=v[0]*s[0]+e,m=v[0]*s[1]+t;return v.length>1?v[0]==v[1]?[y,m]:[y,m,v[1]*s[0]+e,v[1]*s[1]+t]:[y,m]},on=function(e,t,n){return t<=e&&e<=n||n<=e&&e<=t?e:e<=t&&t<=n||n<=t&&t<=e?t:n},sn=function(e,t,n,r,i,a,o,s,l){var u=e-i,c=n-e,h=o-i,d=t-a,p=r-t,g=s-a,f=h*d-g*u,v=c*d-p*u,y=g*c-h*p;if(0!==y){var m=f/y,b=v/y,x=-.001;return x<=m&&m<=1.001&&x<=b&&b<=1.001||l?[e+m*c,t+m*p]:[]}return 0===f||0===v?on(e,n,o)===o?[o,s]:on(e,n,i)===i?[i,a]:on(i,o,n)===n?[n,r]:[]:[]},ln=function(e,t,n,r,i,a,o,s){var l,u,c,h,d,p,g=[],f=new Array(n.length),v=!0;if(null==a&&(v=!1),v){for(var y=0;y0){var m=nn(f,-s);u=tn(m)}else u=f}else u=n;for(var b=0;bu&&(u=t)},h=function(e){return l[e]},d=0;d0?b.edgesTo(m)[0]:m.edgesTo(b)[0];var w=r(x);m=m.id(),d[m]>d[v]+w&&(d[m]=d[v]+w,p.nodes.indexOf(m)<0?p.push(m):p.updateItem(m),u[m]=0,l[m]=[]),d[m]==d[v]+w&&(u[m]=u[m]+u[v],l[m].push(v))}else for(var E=0;E0;){for(var C=n.pop(),N=0;N0&&o.push(n[s]);0!==o.length&&i.push(r.collection(o))}return i}(c,l,t,r);return b=function(e){for(var t=0;t5&&void 0!==arguments[5]?arguments[5]:On,o=r,s=0;s=2?Gn(e,t,n,0,Bn,Fn):Gn(e,t,n,0,Rn)},squaredEuclidean:function(e,t,n){return Gn(e,t,n,0,Bn)},manhattan:function(e,t,n){return Gn(e,t,n,0,Rn)},max:function(e,t,n){return Gn(e,t,n,-1/0,zn)}};function Vn(e,t,n,r,i,a){var o;return o=w(e)?e:Yn[e]||Yn.euclidean,0===t&&w(e)?o(i,a):o(t,n,r,i,a)}Yn["squared-euclidean"]=Yn.squaredEuclidean,Yn.squaredeuclidean=Yn.squaredEuclidean;var Xn=tt({k:2,m:2,sensitivityThreshold:1e-4,distance:"euclidean",maxIterations:10,attributes:[],testMode:!1,testCentroids:null}),Un=function(e){return Xn(e)},jn=function(e,t,n,r,i){var a="kMedoids"!==i?function(e){return n[e]}:function(e){return r[e](n)},o=n,s=t;return Vn(e,r.length,a,(function(e){return r[e](t)}),o,s)},qn=function(e,t,n){for(var r=n.length,i=new Array(r),a=new Array(r),o=new Array(t),s=null,l=0;ln)return!1}return!0},Zn=function(e,t,n){for(var r=0;ri&&(i=t[l][u],a=u);o[a].push(e[l])}for(var c=0;c=i.threshold||"dendrogram"===i.mode&&1===e.length)return!1;var p,g=t[o],f=t[r[o]];p="dendrogram"===i.mode?{left:g,right:f,key:g.key}:{value:g.value.concat(f.value),key:g.key},e[g.index]=p,e.splice(f.index,1),t[g.key]=p;for(var v=0;vn[f.key][y.key]&&(a=n[f.key][y.key])):"max"===i.linkage?(a=n[g.key][y.key],n[g.key][y.key]1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];arguments.length>3&&void 0!==arguments[3]&&!arguments[3]?(n0&&e.splice(0,t)):e=e.slice(t,n);for(var a=0,o=e.length-1;o>=0;o--){var s=e[o];i?isFinite(s)||(e[o]=-1/0,a++):e.splice(o,1)}r&&e.sort((function(e,t){return e-t}));var l=e.length,u=Math.floor(l/2);return l%2!=0?e[u+1+a]:(e[u-1+a]+e[u+a])/2}(e):"mean"===t?function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=0,i=0,a=t;a1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=1/0,i=t;i1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=-1/0,i=t;io&&(a=l,o=t[i*e+l])}a>0&&r.push(a)}for(var u=0;u=N?(A=N,N=k,L=S):k>A&&(A=k);for(var M=0;M0?1:0;_[E%u.minIterations*t+F]=z,B+=z}if(B>0&&(E>=u.minIterations-1||E==u.maxIterations-1)){for(var G=0,Y=0;Y0&&r.push(i);return r}(t,a,o),U=function(e,t,n){for(var r=fr(e,t,n),i=0;il&&(s=u,l=c)}n[i]=a[s]}return fr(e,t,n)}(t,r,X),j={},q=0;q1||o>1)&&(u=!0),c[t]=[],e.outgoers().forEach((function(e){e.isEdge()&&c[t].push(e.id())}))}else h[t]=[void 0,e.target().id()]})):l.forEach((function(e){var t=e.id();e.isNode()?(e.degree(!0)%2&&(n?r?u=!0:r=t:n=t),c[t]=[],e.connectedEdges().forEach((function(e){return c[t].push(e.id())}))):h[t]=[e.source().id(),e.target().id()]}));var d={found:!1,trail:void 0};if(u)return d;if(r&&n)if(s){if(i&&r!=i)return d;i=r}else{if(i&&r!=i&&n!=i)return d;i||(i=r)}else i||(i=l[0].id());var p=function(e){for(var t,n,r,i=e,a=[e];c[i].length;)t=c[i].shift(),n=h[t][0],i!=(r=h[t][1])?(c[r]=c[r].filter((function(e){return e!=t})),i=r):s||i==n||(c[n]=c[n].filter((function(e){return e!=t})),i=n),a.unshift(t),a.unshift(i);return a},g=[],f=[];for(f=p(i);1!=f.length;)0==c[f[0]].length?(g.unshift(l.getElementById(f.shift())),g.unshift(l.getElementById(f.shift()))):f=p(f.shift()).concat(f);for(var v in g.unshift(l.getElementById(f.shift())),c)if(c[v].length)return d;return d.found=!0,d.trail=this.spawn(g,!0),d}},xr=function(){var e=this,t={},n=0,r=0,i=[],a=[],o={},s=function s(l,u,c){l===c&&(r+=1),t[u]={id:n,low:n++,cutVertex:!1};var h,d,p,g,f=e.getElementById(u).connectedEdges().intersection(e);0===f.size()?i.push(e.spawn(e.getElementById(u))):f.forEach((function(n){h=n.source().id(),d=n.target().id(),(p=h===u?d:h)!==c&&(g=n.id(),o[g]||(o[g]=!0,a.push({x:u,y:p,edge:n})),p in t?t[u].low=Math.min(t[u].low,t[p].id):(s(l,p,u),t[u].low=Math.min(t[u].low,t[p].low),t[u].id<=t[p].low&&(t[u].cutVertex=!0,function(n,r){for(var o=a.length-1,s=[],l=e.spawn();a[o].x!=n||a[o].y!=r;)s.push(a.pop().edge),o--;s.push(a.pop().edge),s.forEach((function(n){var r=n.connectedNodes().intersection(e);l.merge(n),r.forEach((function(n){var r=n.id(),i=n.connectedEdges().intersection(e);l.merge(n),t[r].cutVertex?l.merge(i.filter((function(e){return e.isLoop()}))):l.merge(i)}))})),i.push(l)}(u,p))))}))};e.forEach((function(e){if(e.isNode()){var n=e.id();n in t||(r=0,s(n,n),t[n].cutVertex=r>1)}}));var l=Object.keys(t).filter((function(e){return t[e].cutVertex})).map((function(t){return e.getElementById(t)}));return{cut:e.spawn(l),components:i}},wr=function(){var e=this,t={},n=0,r=[],i=[],a=e.spawn(e),o=function o(s){if(i.push(s),t[s]={index:n,low:n++,explored:!1},e.getElementById(s).connectedEdges().intersection(e).forEach((function(e){var n=e.target().id();n!==s&&(n in t||o(n),t[n].explored||(t[s].low=Math.min(t[s].low,t[n].low)))})),t[s].index===t[s].low){for(var l=e.spawn();;){var u=i.pop();if(l.merge(e.getElementById(u)),t[u].low=t[s].index,t[u].explored=!0,u===s)break}var c=l.edgesWith(l),h=l.merge(c);r.push(h),a=a.difference(h)}};return e.forEach((function(e){if(e.isNode()){var n=e.id();n in t||o(n)}})),{cut:a,components:r}},Er={};[ht,ft,vt,mt,xt,Et,Ct,yn,bn,wn,_n,In,rr,hr,yr,br,{hopcroftTarjanBiconnected:xr,htbc:xr,htb:xr,hopcroftTarjanBiconnectedComponents:xr},{tarjanStronglyConnected:wr,tsc:wr,tscc:wr,tarjanStronglyConnectedComponents:wr}].forEach((function(e){U(Er,e)}));var _r=function e(t){if(!(this instanceof e))return new e(t);this.id="Thenable/1.0.7",this.state=0,this.fulfillValue=void 0,this.rejectReason=void 0,this.onFulfilled=[],this.onRejected=[],this.proxy={then:this.then.bind(this)},"function"==typeof t&&t.call(this,this.fulfill.bind(this),this.reject.bind(this))};_r.prototype={fulfill:function(e){return Tr(this,1,"fulfillValue",e)},reject:function(e){return Tr(this,2,"rejectReason",e)},then:function(e,t){var n=this,r=new _r;return n.onFulfilled.push(Nr(e,r,"fulfill")),n.onRejected.push(Nr(t,r,"reject")),Dr(n),r.proxy}};var Tr=function(e,t,n,r){return 0===e.state&&(e.state=t,e[n]=r,Dr(e)),e},Dr=function(e){1===e.state?Cr(e,"onFulfilled",e.fulfillValue):2===e.state&&Cr(e,"onRejected",e.rejectReason)},Cr=function(e,t,n){if(0!==e[t].length){var r=e[t];e[t]=[];var i=function(){for(var e=0;e0:void 0}},clearQueue:function(){return function(){var e=this,t=void 0!==e.length?e:[e];if(!(this._private.cy||this).styleEnabled())return this;for(var n=0;n-1};var vi=function(e,t){var n=this.__data__,r=hi(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function yi(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e0&&this.spawn(r).updateStyle().emit("class"),t},addClass:function(e){return this.toggleClass(e,!0)},hasClass:function(e){var t=this[0];return null!=t&&t._private.classes.has(e)},toggleClass:function(e,t){E(e)||(e=e.match(/\S+/g)||[]);for(var n=this,r=void 0===t,i=[],a=0,o=n.length;a0&&this.spawn(i).updateStyle().emit("class"),n},removeClass:function(e){return this.toggleClass(e,!1)},flashClass:function(e,t){var n=this;if(null==t)t=250;else if(0===t)return n;return n.addClass(e),setTimeout((function(){n.removeClass(e)}),t),n}};aa.className=aa.classNames=aa.classes;var oa={metaChar:"[\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:"\"(?:\\\\\"|[^\"])*\"|'(?:\\\\'|[^'])*'",number:F,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$",group:"node|edge|\\*",directedEdge:"\\s+->\\s+",undirectedEdge:"\\s+<->\\s+"};oa.variable="(?:[\\w-.]|(?:\\\\"+oa.metaChar+"))+",oa.className="(?:[\\w-]|(?:\\\\"+oa.metaChar+"))+",oa.value=oa.string+"|"+oa.number,oa.id=oa.variable,function(){var e,t,n;for(e=oa.comparatorOp.split("|"),n=0;n=0||"="!==t&&(oa.comparatorOp+="|\\!"+t)}();var sa=0,la=1,ua=2,ca=3,ha=4,da=5,pa=6,ga=7,fa=8,va=9,ya=10,ma=11,ba=12,xa=13,wa=14,Ea=15,_a=16,Ta=17,Da=18,Ca=19,Na=20,Aa=[{selector:":selected",matches:function(e){return e.selected()}},{selector:":unselected",matches:function(e){return!e.selected()}},{selector:":selectable",matches:function(e){return e.selectable()}},{selector:":unselectable",matches:function(e){return!e.selectable()}},{selector:":locked",matches:function(e){return e.locked()}},{selector:":unlocked",matches:function(e){return!e.locked()}},{selector:":visible",matches:function(e){return e.visible()}},{selector:":hidden",matches:function(e){return!e.visible()}},{selector:":transparent",matches:function(e){return e.transparent()}},{selector:":grabbed",matches:function(e){return e.grabbed()}},{selector:":free",matches:function(e){return!e.grabbed()}},{selector:":removed",matches:function(e){return e.removed()}},{selector:":inside",matches:function(e){return!e.removed()}},{selector:":grabbable",matches:function(e){return e.grabbable()}},{selector:":ungrabbable",matches:function(e){return!e.grabbable()}},{selector:":animated",matches:function(e){return e.animated()}},{selector:":unanimated",matches:function(e){return!e.animated()}},{selector:":parent",matches:function(e){return e.isParent()}},{selector:":childless",matches:function(e){return e.isChildless()}},{selector:":child",matches:function(e){return e.isChild()}},{selector:":orphan",matches:function(e){return e.isOrphan()}},{selector:":nonorphan",matches:function(e){return e.isChild()}},{selector:":compound",matches:function(e){return e.isNode()?e.isParent():e.source().isParent()||e.target().isParent()}},{selector:":loop",matches:function(e){return e.isLoop()}},{selector:":simple",matches:function(e){return e.isSimple()}},{selector:":active",matches:function(e){return e.active()}},{selector:":inactive",matches:function(e){return!e.active()}},{selector:":backgrounding",matches:function(e){return e.backgrounding()}},{selector:":nonbackgrounding",matches:function(e){return!e.backgrounding()}}].sort((function(e,t){return function(e,t){return-1*X(e,t)}(e.selector,t.selector)})),La=function(){for(var e,t={},n=0;n0&&u.edgeCount>0)return Ke("The selector `"+e+"` is invalid because it uses both a compound selector and an edge selector"),!1;if(u.edgeCount>1)return Ke("The selector `"+e+"` is invalid because it uses multiple edge selectors"),!1;1===u.edgeCount&&Ke("The selector `"+e+"` is deprecated. Edge selectors do not take effect on changes to source and target nodes after an edge is added, for performance reasons. Use a class or data selector on edges instead, updating the class or data of an edge when your app detects a change in source or target nodes.")}return!0},toString:function(){if(null!=this.toStringCache)return this.toStringCache;for(var e=function(e){return null==e?"":e},t=function(t){return x(t)?'"'+t+'"':e(t)},n=function(e){return" "+e+" "},r=function(r,a){var o=r.type,s=r.value;switch(o){case sa:var l=e(s);return l.substring(0,l.length-1);case ca:var u=r.field,c=r.operator;return"["+u+n(e(c))+t(s)+"]";case da:var h=r.operator,d=r.field;return"["+e(h)+d+"]";case ha:return"["+r.field+"]";case pa:var p=r.operator;return"[["+r.field+n(e(p))+t(s)+"]]";case ga:return s;case fa:return"#"+s;case va:return"."+s;case Ta:case Ea:return i(r.parent,a)+n(">")+i(r.child,a);case Da:case _a:return i(r.ancestor,a)+" "+i(r.descendant,a);case Ca:var g=i(r.left,a),f=i(r.subject,a),v=i(r.right,a);return g+(g.length>0?" ":"")+f+v;case Na:return""}},i=function(e,t){return e.checks.reduce((function(n,i,a){return n+(t===e&&0===a?"$":"")+r(i,t)}),"")},a="",o=0;o1&&o=0&&(t=t.replace("!",""),c=!0),t.indexOf("@")>=0&&(t=t.replace("@",""),u=!0),(o||l||u)&&(i=o||s?""+e:"",a=""+n),u&&(e=i=i.toLowerCase(),n=a=a.toLowerCase()),t){case"*=":r=i.indexOf(a)>=0;break;case"$=":r=i.indexOf(a,i.length-a.length)>=0;break;case"^=":r=0===i.indexOf(a);break;case"=":r=e===n;break;case">":h=!0,r=e>n;break;case">=":h=!0,r=e>=n;break;case"<":h=!0,r=e0;){var u=i.shift();t(u),a.add(u.id()),o&&r(i,a,u)}return e}function $a(e,t,n){if(n.isParent())for(var r=n._private.children,i=0;i1&&void 0!==arguments[1])||arguments[1],$a)},Ha.forEachUp=function(e){return Wa(this,e,!(arguments.length>1&&void 0!==arguments[1])||arguments[1],Ka)},Ha.forEachUpAndDown=function(e){return Wa(this,e,!(arguments.length>1&&void 0!==arguments[1])||arguments[1],Za)},Ha.ancestors=Ha.parents,(Ua=ja={data:ra.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),removeData:ra.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),scratch:ra.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:ra.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),rscratch:ra.data({field:"rscratch",allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}),removeRscratch:ra.removeData({field:"rscratch",triggerEvent:!1}),id:function(){var e=this[0];if(e)return e._private.data.id}}).attr=Ua.data,Ua.removeAttr=Ua.removeData;var Qa,Ja,eo=ja,to={};function no(e){return function(t){var n=this;if(void 0===t&&(t=!0),0!==n.length&&n.isNode()&&!n.removed()){for(var r=0,i=n[0],a=i._private.edges,o=0;ot})),minIndegree:ro("indegree",(function(e,t){return et})),minOutdegree:ro("outdegree",(function(e,t){return et}))}),U(to,{totalDegree:function(e){for(var t=0,n=this.nodes(),r=0;r0,c=u;u&&(l=l[0]);var h=c?l.position():{x:0,y:0};return i={x:s.x-h.x,y:s.y-h.y},void 0===e?i:i[e]}for(var d=0;d0,v=f;f&&(g=g[0]);var y=v?g.position():{x:0,y:0};void 0!==t?p.position(e,t+y[e]):void 0!==i&&p.position({x:i.x+y.x,y:i.y+y.y})}}else if(!a)return;return this}},Qa.modelPosition=Qa.point=Qa.position,Qa.modelPositions=Qa.points=Qa.positions,Qa.renderedPoint=Qa.renderedPosition,Qa.relativePoint=Qa.relativePosition;var oo,so,lo=Ja;oo=so={},so.renderedBoundingBox=function(e){var t=this.boundingBox(e),n=this.cy(),r=n.zoom(),i=n.pan(),a=t.x1*r+i.x,o=t.x2*r+i.x,s=t.y1*r+i.y,l=t.y2*r+i.y;return{x1:a,x2:o,y1:s,y2:l,w:o-a,h:l-s}},so.dirtyCompoundBoundsCache=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.cy();return t.styleEnabled()&&t.hasCompoundNodes()?(this.forEachUp((function(t){if(t.isParent()){var n=t._private;n.compoundBoundsClean=!1,n.bbCache=null,e||t.emitAndNotify("bounds")}})),this):this},so.updateCompoundBounds=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.cy();if(!t.styleEnabled()||!t.hasCompoundNodes())return this;if(!e&&t.batching())return this;function n(e){if(e.isParent()){var t=e._private,n=e.children(),r="include"===e.pstyle("compound-sizing-wrt-labels").value,i={width:{val:e.pstyle("min-width").pfValue,left:e.pstyle("min-width-bias-left"),right:e.pstyle("min-width-bias-right")},height:{val:e.pstyle("min-height").pfValue,top:e.pstyle("min-height-bias-top"),bottom:e.pstyle("min-height-bias-bottom")}},a=n.boundingBox({includeLabels:r,includeOverlays:!1,useCache:!1}),o=t.position;0!==a.w&&0!==a.h||((a={w:e.pstyle("width").pfValue,h:e.pstyle("height").pfValue}).x1=o.x-a.w/2,a.x2=o.x+a.w/2,a.y1=o.y-a.h/2,a.y2=o.y+a.h/2);var s=i.width.left.value;"px"===i.width.left.units&&i.width.val>0&&(s=100*s/i.width.val);var l=i.width.right.value;"px"===i.width.right.units&&i.width.val>0&&(l=100*l/i.width.val);var u=i.height.top.value;"px"===i.height.top.units&&i.height.val>0&&(u=100*u/i.height.val);var c=i.height.bottom.value;"px"===i.height.bottom.units&&i.height.val>0&&(c=100*c/i.height.val);var h=y(i.width.val-a.w,s,l),d=h.biasDiff,p=h.biasComplementDiff,g=y(i.height.val-a.h,u,c),f=g.biasDiff,v=g.biasComplementDiff;t.autoPadding=function(e,t,n,r){if("%"!==n.units)return"px"===n.units?n.pfValue:0;switch(r){case"width":return e>0?n.pfValue*e:0;case"height":return t>0?n.pfValue*t:0;case"average":return e>0&&t>0?n.pfValue*(e+t)/2:0;case"min":return e>0&&t>0?e>t?n.pfValue*t:n.pfValue*e:0;case"max":return e>0&&t>0?e>t?n.pfValue*e:n.pfValue*t:0;default:return 0}}(a.w,a.h,e.pstyle("padding"),e.pstyle("padding-relative-to").value),t.autoWidth=Math.max(a.w,i.width.val),o.x=(-d+a.x1+a.x2+p)/2,t.autoHeight=Math.max(a.h,i.height.val),o.y=(-f+a.y1+a.y2+v)/2}function y(e,t,n){var r=0,i=0,a=t+n;return e>0&&a>0&&(r=t/a*e,i=n/a*e),{biasDiff:r,biasComplementDiff:i}}}for(var r=0;re.x2?r:e.x2,e.y1=ne.y2?i:e.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1)},ho=function(e,t){return null==t?e:co(e,t.x1,t.y1,t.x2,t.y2)},po=function(e,t,n){return it(e,t,n)},go=function(e,t,n){if(!t.cy().headless()){var r,i,a=t._private,o=a.rstyle,s=o.arrowWidth/2;if("none"!==t.pstyle(n+"-arrow-shape").value){"source"===n?(r=o.srcX,i=o.srcY):"target"===n?(r=o.tgtX,i=o.tgtY):(r=o.midX,i=o.midY);var l=a.arrowBounds=a.arrowBounds||{},u=l[n]=l[n]||{};u.x1=r-s,u.y1=i-s,u.x2=r+s,u.y2=i+s,u.w=u.x2-u.x1,u.h=u.y2-u.y1,Vt(u,1),co(e,u.x1,u.y1,u.x2,u.y2)}}},fo=function(e,t,n){if(!t.cy().headless()){var r;r=n?n+"-":"";var i=t._private,a=i.rstyle;if(t.pstyle(r+"label").strValue){var o,s,l,u,c=t.pstyle("text-halign"),h=t.pstyle("text-valign"),d=po(a,"labelWidth",n),p=po(a,"labelHeight",n),g=po(a,"labelX",n),f=po(a,"labelY",n),v=t.pstyle(r+"text-margin-x").pfValue,y=t.pstyle(r+"text-margin-y").pfValue,m=t.isEdge(),b=t.pstyle(r+"text-rotation"),x=t.pstyle("text-outline-width").pfValue,w=t.pstyle("text-border-width").pfValue/2,E=t.pstyle("text-background-padding").pfValue,_=p,T=d,D=T/2,C=_/2;if(m)o=g-D,s=g+D,l=f-C,u=f+C;else{switch(c.value){case"left":o=g-T,s=g;break;case"center":o=g-D,s=g+D;break;case"right":o=g,s=g+T}switch(h.value){case"top":l=f-_,u=f;break;case"center":l=f-C,u=f+C;break;case"bottom":l=f,u=f+_}}o+=v-Math.max(x,w)-E-2,s+=v+Math.max(x,w)+E+2,l+=y-Math.max(x,w)-E-2,u+=y+Math.max(x,w)+E+2;var N=n||"main",A=i.labelBounds,L=A[N]=A[N]||{};L.x1=o,L.y1=l,L.x2=s,L.y2=u,L.w=s-o,L.h=u-l;var k=m&&"autorotate"===b.strValue,S=null!=b.pfValue&&0!==b.pfValue;if(k||S){var M=k?po(i.rstyle,"labelAngle",n):b.pfValue,I=Math.cos(M),O=Math.sin(M),P=(o+s)/2,R=(l+u)/2;if(!m){switch(c.value){case"left":P=s;break;case"right":P=o}switch(h.value){case"top":R=u;break;case"bottom":R=l}}var B=function(e,t){return{x:(e-=P)*I-(t-=R)*O+P,y:e*O+t*I+R}},F=B(o,l),z=B(o,u),G=B(s,l),Y=B(s,u);o=Math.min(F.x,z.x,G.x,Y.x),s=Math.max(F.x,z.x,G.x,Y.x),l=Math.min(F.y,z.y,G.y,Y.y),u=Math.max(F.y,z.y,G.y,Y.y)}var V=N+"Rot",X=A[V]=A[V]||{};X.x1=o,X.y1=l,X.x2=s,X.y2=u,X.w=s-o,X.h=u-l,co(e,o,l,s,u),co(i.labelBounds.all,o,l,s,u)}return e}},vo=function(e,t){var n,r,i,a,o,s,l,u=e._private.cy,c=u.styleEnabled(),h=u.headless(),d=zt(),p=e._private,g=e.isNode(),f=e.isEdge(),v=p.rstyle,y=g&&c?e.pstyle("bounds-expansion").pfValue:[0],m=function(e){return"none"!==e.pstyle("display").value},b=!c||m(e)&&(!f||m(e.source())&&m(e.target()));if(b){var x=0;c&&t.includeOverlays&&0!==e.pstyle("overlay-opacity").value&&(x=e.pstyle("overlay-padding").value);var w=0;c&&t.includeUnderlays&&0!==e.pstyle("underlay-opacity").value&&(w=e.pstyle("underlay-padding").value);var E=Math.max(x,w),_=0;if(c&&(_=e.pstyle("width").pfValue/2),g&&t.includeNodes){var T=e.position();o=T.x,s=T.y;var D=e.outerWidth()/2,C=e.outerHeight()/2;co(d,n=o-D,i=s-C,r=o+D,a=s+C),c&&t.includeOutlines&&function(e,t){if(!t.cy().headless()){var n,r,i,a=t.pstyle("outline-opacity").value,o=t.pstyle("outline-width").value;if(a>0&&o>0){var s=t.pstyle("outline-offset").value,l=t.pstyle("shape").value,u=o+s,c=(e.w+2*u)/e.w,h=(e.h+2*u)/e.h,d=0;["diamond","pentagon","round-triangle"].includes(l)?(c=(e.w+2.4*u)/e.w,d=-u/3.6):["concave-hexagon","rhomboid","right-rhomboid"].includes(l)?c=(e.w+2.4*u)/e.w:"star"===l?(c=(e.w+2.8*u)/e.w,h=(e.h+2.6*u)/e.h,d=-u/3.8):"triangle"===l?(c=(e.w+2.8*u)/e.w,h=(e.h+2.4*u)/e.h,d=-u/1.4):"vee"===l&&(c=(e.w+4.4*u)/e.w,h=(e.h+3.8*u)/e.h,d=.5*-u);var p=e.h*h-e.h,g=e.w*c-e.w;if(Xt(e,[Math.ceil(p/2),Math.ceil(g/2)]),0!==d){var f=(r=0,i=d,{x1:(n=e).x1+r,x2:n.x2+r,y1:n.y1+i,y2:n.y2+i,w:n.w,h:n.h});Gt(e,f)}}}}(d,e)}else if(f&&t.includeEdges)if(c&&!h){var N=e.pstyle("curve-style").strValue;if(n=Math.min(v.srcX,v.midX,v.tgtX),r=Math.max(v.srcX,v.midX,v.tgtX),i=Math.min(v.srcY,v.midY,v.tgtY),a=Math.max(v.srcY,v.midY,v.tgtY),co(d,n-=_,i-=_,r+=_,a+=_),"haystack"===N){var A=v.haystackPts;if(A&&2===A.length){if(n=A[0].x,i=A[0].y,n>(r=A[1].x)){var L=n;n=r,r=L}if(i>(a=A[1].y)){var k=i;i=a,a=k}co(d,n-_,i-_,r+_,a+_)}}else if("bezier"===N||"unbundled-bezier"===N||N.endsWith("segments")||N.endsWith("taxi")){var S;switch(N){case"bezier":case"unbundled-bezier":S=v.bezierPts;break;case"segments":case"taxi":case"round-segments":case"round-taxi":S=v.linePts}if(null!=S)for(var M=0;M(r=P.x)){var R=n;n=r,r=R}if((i=O.y)>(a=P.y)){var B=i;i=a,a=B}co(d,n-=_,i-=_,r+=_,a+=_)}if(c&&t.includeEdges&&f&&(go(d,e,"mid-source"),go(d,e,"mid-target"),go(d,e,"source"),go(d,e,"target")),c)if("yes"===e.pstyle("ghost").value){var F=e.pstyle("ghost-offset-x").pfValue,z=e.pstyle("ghost-offset-y").pfValue;co(d,d.x1+F,d.y1+z,d.x2+F,d.y2+z)}var G=p.bodyBounds=p.bodyBounds||{};Ut(G,d),Xt(G,y),Vt(G,1),c&&(n=d.x1,r=d.x2,i=d.y1,a=d.y2,co(d,n-E,i-E,r+E,a+E));var Y=p.overlayBounds=p.overlayBounds||{};Ut(Y,d),Xt(Y,y),Vt(Y,1);var V=p.labelBounds=p.labelBounds||{};null!=V.all?((l=V.all).x1=1/0,l.y1=1/0,l.x2=-1/0,l.y2=-1/0,l.w=0,l.h=0):V.all=zt(),c&&t.includeLabels&&(t.includeMainLabels&&fo(d,e,null),f&&(t.includeSourceLabels&&fo(d,e,"source"),t.includeTargetLabels&&fo(d,e,"target")))}return d.x1=uo(d.x1),d.y1=uo(d.y1),d.x2=uo(d.x2),d.y2=uo(d.y2),d.w=uo(d.x2-d.x1),d.h=uo(d.y2-d.y1),d.w>0&&d.h>0&&b&&(Xt(d,y),Vt(d,1)),d},yo=function(e){var t=0,n=function(e){return(e?1:0)<0&&void 0!==arguments[0]?arguments[0]:Bo,t=arguments.length>1?arguments[1]:void 0,n=0;n=0;s--)o(s);return this},zo.removeAllListeners=function(){return this.removeListener("*")},zo.emit=zo.trigger=function(e,t,n){var r=this.listeners,i=r.length;return this.emitting++,E(t)||(t=[t]),Vo(this,(function(e,a){null!=n&&(r=[{event:a.event,type:a.type,namespace:a.namespace,callback:n}],i=r.length);for(var o=function(n){var i=r[n];if(i.type===a.type&&(!i.namespace||i.namespace===a.namespace||".*"===i.namespace)&&e.eventMatches(e.context,i,a)){var o=[a];null!=t&&function(e,t){for(var n=0;n1&&!r){var i=this.length-1,a=this[i],o=a._private.data.id;this[i]=void 0,this[e]=a,n.set(o,{ele:a,index:e})}return this.length--,this},unmergeOne:function(e){e=e[0];var t=this._private,n=e._private.data.id,r=t.map.get(n);if(!r)return this;var i=r.index;return this.unmergeAt(i),this},unmerge:function(e){var t=this._private.cy;if(!e)return this;if(e&&x(e)){var n=e;e=t.mutableElements().filter(n)}for(var r=0;r=0;t--){e(this[t])&&this.unmergeAt(t)}return this},map:function(e,t){for(var n=[],r=this,i=0;ir&&(r=s,n=o)}return{value:r,ele:n}},min:function(e,t){for(var n,r=1/0,i=this,a=0;a=0&&i1&&void 0!==arguments[1])||arguments[1],n=this[0],r=n.cy();if(r.styleEnabled()&&n){this.cleanStyle();var i=n._private.style[e];return null!=i?i:t?r.style().getDefaultProperty(e):null}},numericStyle:function(e){var t=this[0];if(t.cy().styleEnabled()&&t){var n=t.pstyle(e);return void 0!==n.pfValue?n.pfValue:n.value}},numericStyleUnits:function(e){var t=this[0];if(t.cy().styleEnabled())return t?t.pstyle(e).units:void 0},renderedStyle:function(e){var t=this.cy();if(!t.styleEnabled())return this;var n=this[0];return n?t.style().getRenderedStyle(n,e):void 0},style:function(e,t){var n=this.cy();if(!n.styleEnabled())return this;var r=!1,i=n.style();if(_(e)){var a=e;i.applyBypass(this,a,r),this.emitAndNotify("style")}else if(x(e)){if(void 0===t){var o=this[0];return o?i.getStylePropertyValue(o,e):void 0}i.applyBypass(this,e,t,r),this.emitAndNotify("style")}else if(void 0===e){var s=this[0];return s?i.getRawStyle(s):void 0}return this},removeStyle:function(e){var t=this.cy();if(!t.styleEnabled())return this;var n=!1,r=t.style(),i=this;if(void 0===e)for(var a=0;a0&&t.push(c[0]),t.push(s[0])}return this.spawn(t,!0).filter(e)}),"neighborhood"),closedNeighborhood:function(e){return this.neighborhood().add(this).filter(e)},openNeighborhood:function(e){return this.neighborhood(e)}}),ps.neighbourhood=ps.neighborhood,ps.closedNeighbourhood=ps.closedNeighborhood,ps.openNeighbourhood=ps.openNeighborhood,U(ps,{source:qa((function(e){var t,n=this[0];return n&&(t=n._private.source||n.cy().collection()),t&&e?t.filter(e):t}),"source"),target:qa((function(e){var t,n=this[0];return n&&(t=n._private.target||n.cy().collection()),t&&e?t.filter(e):t}),"target"),sources:ys({attr:"source"}),targets:ys({attr:"target"})}),U(ps,{edgesWith:qa(ms(),"edgesWith"),edgesTo:qa(ms({thisIsSrc:!0}),"edgesTo")}),U(ps,{connectedEdges:qa((function(e){for(var t=[],n=0;n0);return a},component:function(){var e=this[0];return e.cy().mutableElements().components(e)[0]}}),ps.componentsOf=ps.components;var xs=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(void 0!==e){var i=new ot,a=!1;if(t){if(t.length>0&&_(t[0])&&!N(t[0])){a=!0;for(var o=[],s=new lt,l=0,u=t.length;l0&&void 0!==arguments[0])||arguments[0],r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=this,a=i.cy(),o=a._private,s=[],l=[],u=0,c=i.length;u0){for(var B=e.length===i.length?i:new xs(a,e),F=0;F0&&void 0!==arguments[0])||arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this,r=[],i={},a=n._private.cy;function o(e){var n=i[e.id()];t&&e.removed()||n||(i[e.id()]=!0,e.isNode()?(r.push(e),function(e){for(var t=e._private.edges,n=0;n0&&(e?_.emitAndNotify("remove"):t&&_.emit("remove"));for(var T=0;T=.001?function(t,r){for(var i=0;i<4;++i){var a=d(r,e,n);if(0===a)return r;r-=(h(r,e,n)-t)/a}return r}(t,o):0===l?o:function(t,r,i){var a,o,s=0;do{(a=h(o=r+(i-r)/2,e,n)-t)>0?i=o:r=o}while(Math.abs(a)>1e-7&&++s<10);return o}(t,r,r+i)}var g=!1;function f(){g=!0,e===t&&n===r||function(){for(var t=0;t<11;++t)s[t]=h(t*i,e,n)}()}var v=function(i){return g||f(),e===t&&n===r?i:0===i?0:1===i?1:h(p(i),t,r)};v.getControlPoints=function(){return[{x:e,y:t},{x:n,y:r}]};var y="generateBezier("+[e,t,n,r]+")";return v.toString=function(){return y},v}var Ts=function(){function e(e){return-e.tension*e.x-e.friction*e.v}function t(t,n,r){var i={x:t.x+r.dx*n,v:t.v+r.dv*n,tension:t.tension,friction:t.friction};return{dx:i.v,dv:e(i)}}function n(n,r){var i={dx:n.v,dv:e(n)},a=t(n,.5*r,i),o=t(n,.5*r,a),s=t(n,r,o),l=1/6*(i.dx+2*(a.dx+o.dx)+s.dx),u=1/6*(i.dv+2*(a.dv+o.dv)+s.dv);return n.x=n.x+l*r,n.v=n.v+u*r,n}return function e(t,r,i){var a,o,s,l={x:-1,v:0,tension:null,friction:null},u=[0],c=0,h=1e-4;for(t=parseFloat(t)||500,r=parseFloat(r)||20,i=i||null,l.tension=t,l.friction=r,o=(a=null!==i)?(c=e(t,r))/i*.016:.016;s=n(s||l,o),u.push(1+s.x),c+=16,Math.abs(s.x)>h&&Math.abs(s.v)>h;);return a?function(e){return u[e*(u.length-1)|0]}:c}}(),Ds=function(e,t,n,r){var i=_s(e,t,n,r);return function(e,t,n){return e+(t-e)*i(n)}},Cs={linear:function(e,t,n){return e+(t-e)*n},ease:Ds(.25,.1,.25,1),"ease-in":Ds(.42,0,1,1),"ease-out":Ds(0,0,.58,1),"ease-in-out":Ds(.42,0,.58,1),"ease-in-sine":Ds(.47,0,.745,.715),"ease-out-sine":Ds(.39,.575,.565,1),"ease-in-out-sine":Ds(.445,.05,.55,.95),"ease-in-quad":Ds(.55,.085,.68,.53),"ease-out-quad":Ds(.25,.46,.45,.94),"ease-in-out-quad":Ds(.455,.03,.515,.955),"ease-in-cubic":Ds(.55,.055,.675,.19),"ease-out-cubic":Ds(.215,.61,.355,1),"ease-in-out-cubic":Ds(.645,.045,.355,1),"ease-in-quart":Ds(.895,.03,.685,.22),"ease-out-quart":Ds(.165,.84,.44,1),"ease-in-out-quart":Ds(.77,0,.175,1),"ease-in-quint":Ds(.755,.05,.855,.06),"ease-out-quint":Ds(.23,1,.32,1),"ease-in-out-quint":Ds(.86,0,.07,1),"ease-in-expo":Ds(.95,.05,.795,.035),"ease-out-expo":Ds(.19,1,.22,1),"ease-in-out-expo":Ds(1,0,0,1),"ease-in-circ":Ds(.6,.04,.98,.335),"ease-out-circ":Ds(.075,.82,.165,1),"ease-in-out-circ":Ds(.785,.135,.15,.86),spring:function(e,t,n){if(0===n)return Cs.linear;var r=Ts(e,t,n);return function(e,t,n){return e+(t-e)*r(n)}},"cubic-bezier":Ds};function Ns(e,t,n,r,i){if(1===r)return n;if(t===n)return n;var a=i(t,n,r);return null==e||((e.roundValue||e.color)&&(a=Math.round(a)),void 0!==e.min&&(a=Math.max(a,e.min)),void 0!==e.max&&(a=Math.min(a,e.max))),a}function As(e,t){return null!=e.pfValue||null!=e.value?null==e.pfValue||null!=t&&"%"===t.type.units?e.value:e.pfValue:e}function Ls(e,t,n,r,i){var a=null!=i?i.type:null;n<0?n=0:n>1&&(n=1);var o=As(e,i),s=As(t,i);if(T(o)&&T(s))return Ns(a,o,s,n,r);if(E(o)&&E(s)){for(var l=[],u=0;u0?("spring"===h&&d.push(o.duration),o.easingImpl=Cs[h].apply(null,d)):o.easingImpl=Cs[h]}var p,g=o.easingImpl;if(p=0===o.duration?1:(n-l)/o.duration,o.applying&&(p=o.progress),p<0?p=0:p>1&&(p=1),null==o.delay){var f=o.startPosition,v=o.position;if(v&&i&&!e.locked()){var y={};Ss(f.x,v.x)&&(y.x=Ls(f.x,v.x,p,g)),Ss(f.y,v.y)&&(y.y=Ls(f.y,v.y,p,g)),e.position(y)}var m=o.startPan,b=o.pan,w=a.pan,E=null!=b&&r;E&&(Ss(m.x,b.x)&&(w.x=Ls(m.x,b.x,p,g)),Ss(m.y,b.y)&&(w.y=Ls(m.y,b.y,p,g)),e.emit("pan"));var _=o.startZoom,T=o.zoom,D=null!=T&&r;D&&(Ss(_,T)&&(a.zoom=Ft(a.minZoom,Ls(_,T,p,g),a.maxZoom)),e.emit("zoom")),(E||D)&&e.emit("viewport");var C=o.style;if(C&&C.length>0&&i){for(var N=0;N=0;t--){(0,e[t])()}e.splice(0,e.length)},c=a.length-1;c>=0;c--){var h=a[c],d=h._private;d.stopped?(a.splice(c,1),d.hooked=!1,d.playing=!1,d.started=!1,u(d.frames)):(d.playing||d.applying)&&(d.playing&&d.applying&&(d.applying=!1),d.started||Ms(0,h,e),ks(t,h,e,n),d.applying&&(d.applying=!1),u(d.frames),null!=d.step&&d.step(e),h.completed()&&(a.splice(c,1),d.hooked=!1,d.playing=!1,d.started=!1,u(d.completes)),s=!0)}return n||0!==a.length||0!==o.length||r.push(t),s}for(var a=!1,o=0;o0?t.notify("draw",n):t.notify("draw")),n.unmerge(r),t.emit("step")}var Os={animate:ra.animate(),animation:ra.animation(),animated:ra.animated(),clearQueue:ra.clearQueue(),delay:ra.delay(),delayAnimation:ra.delayAnimation(),stop:ra.stop(),addToAnimationPool:function(e){this.styleEnabled()&&this._private.aniEles.merge(e)},stopAnimationLoop:function(){this._private.animationsRunning=!1},startAnimationLoop:function(){var e=this;if(e._private.animationsRunning=!0,e.styleEnabled()){var t=e.renderer();t&&t.beforeRender?t.beforeRender((function(t,n){Is(n,e)}),t.beforeRenderPriorities.animations):function t(){e._private.animationsRunning&&Ae((function(n){Is(n,e),t()}))}()}}},Ps={qualifierCompare:function(e,t){return null==e||null==t?null==e&&null==t:e.sameText(t)},eventMatches:function(e,t,n){var r=t.qualifier;return null==r||e!==n.target&&N(n.target)&&r.matches(n.target)},addEventFields:function(e,t){t.cy=e,t.target=e},callbackContext:function(e,t,n){return null!=t.qualifier?n.target:e}},Rs=function(e){return x(e)?new Ya(e):e},Bs={createEmitter:function(){var e=this._private;return e.emitter||(e.emitter=new Fo(Ps,this)),this},emitter:function(){return this._private.emitter},on:function(e,t,n){return this.emitter().on(e,Rs(t),n),this},removeListener:function(e,t,n){return this.emitter().removeListener(e,Rs(t),n),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},one:function(e,t,n){return this.emitter().one(e,Rs(t),n),this},once:function(e,t,n){return this.emitter().one(e,Rs(t),n),this},emit:function(e,t){return this.emitter().emit(e,t),this},emitAndNotify:function(e,t){return this.emit(e),this.notify(e,t),this}};ra.eventAliasesOn(Bs);var Fs={png:function(e){return e=e||{},this._private.renderer.png(e)},jpg:function(e){var t=this._private.renderer;return(e=e||{}).bg=e.bg||"#fff",t.jpg(e)}};Fs.jpeg=Fs.jpg;var zs={layout:function(e){var t=this;if(null!=e)if(null!=e.name){var n=e.name,r=t.extension("layout",n);if(null!=r){var i;i=x(e.eles)?t.$(e.eles):null!=e.eles?e.eles:t.$();var a=new r(U({},e,{cy:t,eles:i}));return a}We("No such layout `"+n+"` found. Did you forget to import it and `cytoscape.use()` it?")}else We("A `name` must be specified to make a layout");else We("Layout options must be specified to make a layout")}};zs.createLayout=zs.makeLayout=zs.layout;var Gs={notify:function(e,t){var n=this._private;if(this.batching()){n.batchNotifications=n.batchNotifications||{};var r=n.batchNotifications[e]=n.batchNotifications[e]||this.collection();null!=t&&r.merge(t)}else if(n.notificationsEnabled){var i=this.renderer();!this.destroyed()&&i&&i.notify(e,t)}},notifications:function(e){var t=this._private;return void 0===e?t.notificationsEnabled:(t.notificationsEnabled=!!e,this)},noNotifications:function(e){this.notifications(!1),e(),this.notifications(!0)},batching:function(){return this._private.batchCount>0},startBatch:function(){var e=this._private;return null==e.batchCount&&(e.batchCount=0),0===e.batchCount&&(e.batchStyleEles=this.collection(),e.batchNotifications={}),e.batchCount++,this},endBatch:function(){var e=this._private;if(0===e.batchCount)return this;if(e.batchCount--,0===e.batchCount){e.batchStyleEles.updateStyle();var t=this.renderer();Object.keys(e.batchNotifications).forEach((function(n){var r=e.batchNotifications[n];r.empty()?t.notify(n):t.notify(n,r)}))}return this},batch:function(e){return this.startBatch(),e(),this.endBatch(),this},batchData:function(e){var t=this;return this.batch((function(){for(var n=Object.keys(e),r=0;r0;)t.removeChild(t.childNodes[0]);e._private.renderer=null,e.mutableElements().forEach((function(e){var t=e._private;t.rscratch={},t.rstyle={},t.animation.current=[],t.animation.queue=[]}))},onRender:function(e){return this.on("render",e)},offRender:function(e){return this.off("render",e)}};Vs.invalidateDimensions=Vs.resize;var Xs={collection:function(e,t){return x(e)?this.$(e):C(e)?e.collection():E(e)?(t||(t={}),new xs(this,e,t.unique,t.removed)):new xs(this)},nodes:function(e){var t=this.$((function(e){return e.isNode()}));return e?t.filter(e):t},edges:function(e){var t=this.$((function(e){return e.isEdge()}));return e?t.filter(e):t},$:function(e){var t=this._private.elements;return e?t.filter(e):t.spawnSelf()},mutableElements:function(){return this._private.elements}};Xs.elements=Xs.filter=Xs.$;var Us={},js="t";Us.apply=function(e){for(var t=this,n=t._private.cy.collection(),r=0;r0;if(d||h&&p){var g=void 0;d&&p||d?g=u.properties:p&&(g=u.mappedProperties);for(var f=0;f1&&(v=1),s.color){var w=i.valueMin[0],E=i.valueMax[0],_=i.valueMin[1],D=i.valueMax[1],C=i.valueMin[2],N=i.valueMax[2],A=null==i.valueMin[3]?1:i.valueMin[3],L=null==i.valueMax[3]?1:i.valueMax[3],k=[Math.round(w+(E-w)*v),Math.round(_+(D-_)*v),Math.round(C+(N-C)*v),Math.round(A+(L-A)*v)];n={bypass:i.bypass,name:i.name,value:k,strValue:"rgb("+k[0]+", "+k[1]+", "+k[2]+")"}}else{if(!s.number)return!1;var S=i.valueMin+(i.valueMax-i.valueMin)*v;n=this.parse(i.name,S,i.bypass,d)}if(!n)return f(),!1;n.mapping=i,i=n;break;case o.data:for(var M=i.field.split("."),I=h.data,O=0;O0&&a>0){for(var s={},l=!1,u=0;u0?e.delayAnimation(o).play().promise().then(t):t()})).then((function(){return e.animation({style:s,duration:a,easing:e.pstyle("transition-timing-function").value,queue:!1}).play().promise()})).then((function(){n.removeBypasses(e,i),e.emitAndNotify("style"),r.transitioning=!1}))}else r.transitioning&&(this.removeBypasses(e,i),e.emitAndNotify("style"),r.transitioning=!1)},Us.checkTrigger=function(e,t,n,r,i,a){var o=this.properties[t],s=i(o);null!=s&&s(n,r)&&a(o)},Us.checkZOrderTrigger=function(e,t,n,r){var i=this;this.checkTrigger(e,t,n,r,(function(e){return e.triggersZOrder}),(function(){i._private.cy.notify("zorder",e)}))},Us.checkBoundsTrigger=function(e,t,n,r){this.checkTrigger(e,t,n,r,(function(e){return e.triggersBounds}),(function(i){e.dirtyCompoundBoundsCache(),e.dirtyBoundingBoxCache(),!i.triggersBoundsOfParallelBeziers||"curve-style"!==t||"bezier"!==n&&"bezier"!==r||e.parallelEdges().forEach((function(e){e.isBundledBezier()&&e.dirtyBoundingBoxCache()})),!i.triggersBoundsOfConnectedEdges||"display"!==t||"none"!==n&&"none"!==r||e.connectedEdges().forEach((function(e){e.dirtyBoundingBoxCache()}))}))},Us.checkTriggers=function(e,t,n,r){e.dirtyStyleCache(),this.checkZOrderTrigger(e,t,n,r),this.checkBoundsTrigger(e,t,n,r)};var qs={applyBypass:function(e,t,n,r){var i=[];if("*"===t||"**"===t){if(void 0!==n)for(var a=0;at.length?a.substr(t.length):""}function s(){n=n.length>r.length?n.substr(r.length):""}for(a=a.replace(/[/][*](\s|.)+?[*][/]/g,"");;){if(a.match(/^\s*$/))break;var l=a.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!l){Ke("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: "+a);break}t=l[0];var u=l[1];if("core"!==u)if(new Ya(u).invalid){Ke("Skipping parsing of block: Invalid selector found in string stylesheet: "+u),o();continue}var c=l[2],h=!1;n=c;for(var d=[];;){if(n.match(/^\s*$/))break;var p=n.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/);if(!p){Ke("Skipping parsing of block: Invalid formatting of style property and value definitions found in:"+c),h=!0;break}r=p[0];var g=p[1],f=p[2];if(this.properties[g])i.parse(g,f)?(d.push({name:g,val:f}),s()):(Ke("Skipping property: Invalid property definition in: "+r),s());else Ke("Skipping property: Invalid property name in: "+r),s()}if(h){o();break}i.selector(u);for(var v=0;v=7&&"d"===t[0]&&(u=new RegExp(s.data.regex).exec(t))){if(n)return!1;var d=s.data;return{name:e,value:u,strValue:""+t,mapped:d,field:u[1],bypass:n}}if(t.length>=10&&"m"===t[0]&&(c=new RegExp(s.mapData.regex).exec(t))){if(n)return!1;if(h.multiple)return!1;var p=s.mapData;if(!h.color&&!h.number)return!1;var g=this.parse(e,c[4]);if(!g||g.mapped)return!1;var f=this.parse(e,c[5]);if(!f||f.mapped)return!1;if(g.pfValue===f.pfValue||g.strValue===f.strValue)return Ke("`"+e+": "+t+"` is not a valid mapper because the output range is zero; converting to `"+e+": "+g.strValue+"`"),this.parse(e,g.strValue);if(h.color){var v=g.value,y=f.value;if(!(v[0]!==y[0]||v[1]!==y[1]||v[2]!==y[2]||v[3]!==y[3]&&(null!=v[3]&&1!==v[3]||null!=y[3]&&1!==y[3])))return!1}return{name:e,value:c,strValue:""+t,mapped:p,field:c[1],fieldMin:parseFloat(c[2]),fieldMax:parseFloat(c[3]),valueMin:g.value,valueMax:f.value,bypass:n}}}if(h.multiple&&"multiple"!==r){var m;if(m=l?t.split(/\s+/):E(t)?t:[t],h.evenMultiple&&m.length%2!=0)return null;for(var b=[],_=[],D=[],C="",N=!1,A=0;A0?" ":"")+L.strValue}return h.validate&&!h.validate(b,_)?null:h.singleEnum&&N?1===b.length&&x(b[0])?{name:e,value:b[0],strValue:b[0],bypass:n}:null:{name:e,value:b,pfValue:D,strValue:C,bypass:n,units:_}}var k,S,M=function(){for(var r=0;rh.max||h.strictMax&&t===h.max))return null;var z={name:e,value:t,strValue:""+t+(I||""),units:I,bypass:n};return h.unitless||"px"!==I&&"em"!==I?z.pfValue=t:z.pfValue="px"!==I&&I?this.getEmSizeInPixels()*t:t,"ms"!==I&&"s"!==I||(z.pfValue="ms"===I?t:1e3*t),"deg"!==I&&"rad"!==I||(z.pfValue="rad"===I?t:(k=t,Math.PI*k/180)),"%"===I&&(z.pfValue=t/100),z}if(h.propList){var G=[],Y=""+t;if("none"===Y);else{for(var V=Y.split(/\s*,\s*|\s+/),X=0;X0&&l>0&&!isNaN(n.w)&&!isNaN(n.h)&&n.w>0&&n.h>0)return{zoom:o=(o=(o=Math.min((s-2*t)/n.w,(l-2*t)/n.h))>this._private.maxZoom?this._private.maxZoom:o)=n.minZoom&&(n.maxZoom=t),this},minZoom:function(e){return void 0===e?this._private.minZoom:this.zoomRange({min:e})},maxZoom:function(e){return void 0===e?this._private.maxZoom:this.zoomRange({max:e})},getZoomedViewport:function(e){var t,n,r=this._private,i=r.pan,a=r.zoom,o=!1;if(r.zoomingEnabled||(o=!0),T(e)?n=e:_(e)&&(n=e.level,null!=e.position?t=Nt(e.position,a,i):null!=e.renderedPosition&&(t=e.renderedPosition),null==t||r.panningEnabled||(o=!0)),n=(n=n>r.maxZoom?r.maxZoom:n)t.maxZoom||!t.zoomingEnabled?a=!0:(t.zoom=s,i.push("zoom"))}if(r&&(!a||!e.cancelOnFailedZoom)&&t.panningEnabled){var l=e.pan;T(l.x)&&(t.pan.x=l.x,o=!1),T(l.y)&&(t.pan.y=l.y,o=!1),o||i.push("pan")}return i.length>0&&(i.push("viewport"),this.emit(i.join(" ")),this.notify("viewport")),this},center:function(e){var t=this.getCenterPan(e);return t&&(this._private.pan=t,this.emit("pan viewport"),this.notify("viewport")),this},getCenterPan:function(e,t){if(this._private.panningEnabled){if(x(e)){var n=e;e=this.mutableElements().filter(n)}else C(e)||(e=this.mutableElements());if(0!==e.length){var r=e.boundingBox(),i=this.width(),a=this.height();return{x:(i-(t=void 0===t?this._private.zoom:t)*(r.x1+r.x2))/2,y:(a-t*(r.y1+r.y2))/2}}}},reset:function(){return this._private.panningEnabled&&this._private.zoomingEnabled?(this.viewport({pan:{x:0,y:0},zoom:1}),this):this},invalidateSize:function(){this._private.sizeCache=null},size:function(){var e,t,n=this._private,r=n.container,i=this;return n.sizeCache=n.sizeCache||(r?(e=i.window().getComputedStyle(r),t=function(t){return parseFloat(e.getPropertyValue(t))},{width:r.clientWidth-t("padding-left")-t("padding-right"),height:r.clientHeight-t("padding-top")-t("padding-bottom")}):{width:1,height:1})},width:function(){return this.size().width},height:function(){return this.size().height},extent:function(){var e=this._private.pan,t=this._private.zoom,n=this.renderedExtent(),r={x1:(n.x1-e.x)/t,x2:(n.x2-e.x)/t,y1:(n.y1-e.y)/t,y2:(n.y2-e.y)/t};return r.w=r.x2-r.x1,r.h=r.y2-r.y1,r},renderedExtent:function(){var e=this.width(),t=this.height();return{x1:0,y1:0,x2:e,y2:t,w:e,h:t}},multiClickDebounceTime:function(e){return e?(this._private.multiClickDebounceTime=e,this):this._private.multiClickDebounceTime}};nl.centre=nl.center,nl.autolockNodes=nl.autolock,nl.autoungrabifyNodes=nl.autoungrabify;var rl={data:ra.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeData:ra.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),scratch:ra.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:ra.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0})};rl.attr=rl.data,rl.removeAttr=rl.removeData;var il=function(e){var t=this,n=(e=U({},e)).container;n&&!D(n)&&D(n[0])&&(n=n[0]);var r=n?n._cyreg:null;(r=r||{})&&r.cy&&(r.cy.destroy(),r={});var i=r.readies=r.readies||[];n&&(n._cyreg=r),r.cy=t;var a=void 0!==p&&void 0!==n&&!e.headless,o=e;o.layout=U({name:a?"grid":"null"},o.layout),o.renderer=U({name:a?"canvas":"null"},o.renderer);var s=function(e,t,n){return void 0!==t?t:void 0!==n?n:e},l=this._private={container:n,ready:!1,options:o,elements:new xs(this),listeners:[],aniEles:new xs(this),data:o.data||{},scratch:{},layout:null,renderer:null,destroyed:!1,notificationsEnabled:!0,minZoom:1e-50,maxZoom:1e50,zoomingEnabled:s(!0,o.zoomingEnabled),userZoomingEnabled:s(!0,o.userZoomingEnabled),panningEnabled:s(!0,o.panningEnabled),userPanningEnabled:s(!0,o.userPanningEnabled),boxSelectionEnabled:s(!0,o.boxSelectionEnabled),autolock:s(!1,o.autolock,o.autolockNodes),autoungrabify:s(!1,o.autoungrabify,o.autoungrabifyNodes),autounselectify:s(!1,o.autounselectify),styleEnabled:void 0===o.styleEnabled?a:o.styleEnabled,zoom:T(o.zoom)?o.zoom:1,pan:{x:_(o.pan)&&T(o.pan.x)?o.pan.x:0,y:_(o.pan)&&T(o.pan.y)?o.pan.y:0},animation:{current:[],queue:[]},hasCompoundNodes:!1,multiClickDebounceTime:s(250,o.multiClickDebounceTime)};this.createEmitter(),this.selectionType(o.selectionType),this.zoomRange({min:o.minZoom,max:o.maxZoom});l.styleEnabled&&t.setStyle([]);var u=U({},o,o.renderer);t.initRenderer(u);!function(e,t){if(e.some(M))return Lr.all(e).then(t);t(e)}([o.style,o.elements],(function(e){var n=e[0],a=e[1];l.styleEnabled&&t.style().append(n),function(e,n,r){t.notifications(!1);var i=t.mutableElements();i.length>0&&i.remove(),null!=e&&(_(e)||E(e))&&t.add(e),t.one("layoutready",(function(e){t.notifications(!0),t.emit(e),t.one("load",n),t.emitAndNotify("load")})).one("layoutstop",(function(){t.one("done",r),t.emit("done")}));var a=U({},t._private.options.layout);a.eles=t.elements(),t.layout(a).run()}(a,(function(){t.startAnimationLoop(),l.ready=!0,w(o.ready)&&t.on("ready",o.ready);for(var e=0;e0,u=zt(n.boundingBox?n.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()});if(C(n.roots))e=n.roots;else if(E(n.roots)){for(var c=[],h=0;h0;){var M=L.shift(),I=A(M,k);if(I)M.outgoers().filter((function(e){return e.isNode()&&i.has(e)})).forEach(S);else if(null===I){Ke("Detected double maximal shift for node `"+M.id()+"`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs.");break}}}N();var O=0;if(n.avoidOverlap)for(var P=0;P0&&y[0].length<=3?l/2:0),h=2*Math.PI/y[r].length*i;return 0===r&&1===y[0].length&&(c=1),{x:W+c*Math.cos(h),y:$+c*Math.sin(h)}}return{x:W+(i+1-(a+1)/2)*o,y:(r+1)*s}})),this};var hl={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,radius:void 0,startAngle:1.5*Math.PI,sweep:void 0,clockwise:!0,sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function dl(e){this.options=U({},hl,e)}dl.prototype.run=function(){var e=this.options,t=e,n=e.cy,r=t.eles,i=void 0!==t.counterclockwise?!t.counterclockwise:t.clockwise,a=r.nodes().not(":parent");t.sort&&(a=a.sort(t.sort));for(var o,s=zt(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:n.width(),h:n.height()}),l=s.x1+s.w/2,u=s.y1+s.h/2,c=(void 0===t.sweep?2*Math.PI-2*Math.PI/a.length:t.sweep)/Math.max(1,a.length-1),h=0,d=0;d1&&t.avoidOverlap){h*=1.75;var v=Math.cos(c)-Math.cos(0),y=Math.sin(c)-Math.sin(0),m=Math.sqrt(h*h/(v*v+y*y));o=Math.max(m,o)}return r.nodes().layoutPositions(this,t,(function(e,n){var r=t.startAngle+n*c*(i?1:-1),a=o*Math.cos(r),s=o*Math.sin(r);return{x:l+a,y:u+s}})),this};var pl,gl={fit:!0,padding:30,startAngle:1.5*Math.PI,sweep:void 0,clockwise:!0,equidistant:!1,minNodeSpacing:10,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,height:void 0,width:void 0,spacingFactor:void 0,concentric:function(e){return e.degree()},levelWidth:function(e){return e.maxDegree()/4},animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function fl(e){this.options=U({},gl,e)}fl.prototype.run=function(){for(var e=this.options,t=e,n=void 0!==t.counterclockwise?!t.counterclockwise:t.clockwise,r=e.cy,i=t.eles,a=i.nodes().not(":parent"),o=zt(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()}),s=o.x1+o.w/2,l=o.y1+o.h/2,u=[],c=0,h=0;h0)Math.abs(m[0].value-x.value)>=v&&(m=[],y.push(m));m.push(x)}var w=c+t.minNodeSpacing;if(!t.avoidOverlap){var E=y.length>0&&y[0].length>1,_=(Math.min(o.w,o.h)/2-w)/(y.length+E?1:0);w=Math.min(w,_)}for(var T=0,D=0;D1&&t.avoidOverlap){var L=Math.cos(A)-Math.cos(0),k=Math.sin(A)-Math.sin(0),S=Math.sqrt(w*w/(L*L+k*k));T=Math.max(S,T)}C.r=T,T+=w}if(t.equidistant){for(var M=0,I=0,O=0;O=e.numIter)&&(Tl(r,e),r.temperature=r.temperature*e.coolingFactor,!(r.temperature=e.animationThreshold&&a(),Ae(t)):(Rl(r,e),s())}()}else{for(;u;)u=o(l),l++;Rl(r,e),s()}return this},yl.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this},yl.prototype.destroy=function(){return this.thread&&this.thread.stop(),this};var ml=function(e,t,n){for(var r=n.eles.edges(),i=n.eles.nodes(),a=zt(n.boundingBox?n.boundingBox:{x1:0,y1:0,w:e.width(),h:e.height()}),o={isCompound:e.hasCompoundNodes(),layoutNodes:[],idToIndex:{},nodeSize:i.size(),graphSet:[],indexToGraph:[],layoutEdges:[],edgeSize:r.size(),temperature:n.initialTemp,clientWidth:a.w,clientHeight:a.h,boundingBox:a},s=n.eles.components(),l={},u=0;u0){o.graphSet.push(E);for(u=0;ur.count?0:r.graph},xl=function e(t,n,r,i){var a=i.graphSet[r];if(-10)var s=(u=r.nodeOverlap*o)*i/(f=Math.sqrt(i*i+a*a)),l=u*a/f;else{var u,c=Ll(e,i,a),h=Ll(t,-1*i,-1*a),d=h.x-c.x,p=h.y-c.y,g=d*d+p*p,f=Math.sqrt(g);s=(u=(e.nodeRepulsion+t.nodeRepulsion)/g)*d/f,l=u*p/f}e.isLocked||(e.offsetX-=s,e.offsetY-=l),t.isLocked||(t.offsetX+=s,t.offsetY+=l)}},Al=function(e,t,n,r){if(n>0)var i=e.maxX-t.minX;else i=t.maxX-e.minX;if(r>0)var a=e.maxY-t.minY;else a=t.maxY-e.minY;return i>=0&&a>=0?Math.sqrt(i*i+a*a):0},Ll=function(e,t,n){var r=e.positionX,i=e.positionY,a=e.height||1,o=e.width||1,s=n/t,l=a/o,u={};return 0===t&&0n?(u.x=r,u.y=i+a/2,u):0t&&-1*l<=s&&s<=l?(u.x=r-o/2,u.y=i-o*n/2/t,u):0=l)?(u.x=r+a*t/2/n,u.y=i+a/2,u):0>n&&(s<=-1*l||s>=l)?(u.x=r-a*t/2/n,u.y=i-a/2,u):u},kl=function(e,t){for(var n=0;n1){var g=t.gravity*h/p,f=t.gravity*d/p;c.offsetX+=g,c.offsetY+=f}}}}},Ml=function(e,t){var n=[],r=0,i=-1;for(n.push.apply(n,e.graphSet[0]),i+=e.graphSet[0].length;r<=i;){var a=n[r++],o=e.idToIndex[a],s=e.layoutNodes[o],l=s.children;if(0n)var i={x:n*e/r,y:n*t/r};else i={x:e,y:t};return i},Pl=function e(t,n){var r=t.parentId;if(null!=r){var i=n.layoutNodes[n.idToIndex[r]],a=!1;return(null==i.maxX||t.maxX+i.padRight>i.maxX)&&(i.maxX=t.maxX+i.padRight,a=!0),(null==i.minX||t.minX-i.padLefti.maxY)&&(i.maxY=t.maxY+i.padBottom,a=!0),(null==i.minY||t.minY-i.padTopg&&(h+=p+t.componentSpacing,c=0,d=0,p=0)}}},Bl={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,avoidOverlapPadding:10,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,condense:!1,rows:void 0,cols:void 0,position:function(e){},sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function Fl(e){this.options=U({},Bl,e)}Fl.prototype.run=function(){var e=this.options,t=e,n=e.cy,r=t.eles,i=r.nodes().not(":parent");t.sort&&(i=i.sort(t.sort));var a=zt(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:n.width(),h:n.height()});if(0===a.h||0===a.w)r.nodes().layoutPositions(this,t,(function(e){return{x:a.x1,y:a.y1}}));else{var o=i.size(),s=Math.sqrt(o*a.h/a.w),l=Math.round(s),u=Math.round(a.w/a.h*s),c=function(e){if(null==e)return Math.min(l,u);Math.min(l,u)==l?l=e:u=e},h=function(e){if(null==e)return Math.max(l,u);Math.max(l,u)==l?l=e:u=e},d=t.rows,p=null!=t.cols?t.cols:t.columns;if(null!=d&&null!=p)l=d,u=p;else if(null!=d&&null==p)l=d,u=Math.ceil(o/l);else if(null==d&&null!=p)u=p,l=Math.ceil(o/u);else if(u*l>o){var g=c(),f=h();(g-1)*f>=o?c(g-1):(f-1)*g>=o&&h(f-1)}else for(;u*l=o?h(y+1):c(v+1)}var m=a.w/u,b=a.h/l;if(t.condense&&(m=0,b=0),t.avoidOverlap)for(var x=0;x=u&&(S=0,k++)},I={},O=0;O(r=Qt(e,t,x[w],x[w+1],x[w+2],x[w+3])))return v(n,r),!0}else if("bezier"===a.edgeType||"multibezier"===a.edgeType||"self"===a.edgeType||"compound"===a.edgeType)for(x=a.allpts,w=0;w+5(r=Zt(e,t,x[w],x[w+1],x[w+2],x[w+3],x[w+4],x[w+5])))return v(n,r),!0;m=m||i.source,b=b||i.target;var E=o.getArrowWidth(l,c),_=[{name:"source",x:a.arrowStartX,y:a.arrowStartY,angle:a.srcArrowAngle},{name:"target",x:a.arrowEndX,y:a.arrowEndY,angle:a.tgtArrowAngle},{name:"mid-source",x:a.midX,y:a.midY,angle:a.midsrcArrowAngle},{name:"mid-target",x:a.midX,y:a.midY,angle:a.midtgtArrowAngle}];for(w=0;w<_.length;w++){var T=_[w],D=s.arrowShapes[n.pstyle(T.name+"-arrow-shape").value],C=n.pstyle("width").pfValue;if(D.roughCollide(e,t,E,T.angle,{x:T.x,y:T.y},C,d)&&D.collide(e,t,E,T.angle,{x:T.x,y:T.y},C,d))return v(n),!0}h&&u.length>0&&(y(m),y(b))}function b(e,t,n){return it(e,t,n)}function x(n,r){var i,a=n._private,o=g;i=r?r+"-":"",n.boundingBox();var s=a.labelBounds[r||"main"],l=n.pstyle(i+"label").value;if("yes"===n.pstyle("text-events").strValue&&l){var u=b(a.rscratch,"labelX",r),c=b(a.rscratch,"labelY",r),h=b(a.rscratch,"labelAngle",r),d=n.pstyle(i+"text-margin-x").pfValue,p=n.pstyle(i+"text-margin-y").pfValue,f=s.x1-o-d,y=s.x2+o-d,m=s.y1-o-p,x=s.y2+o-p;if(h){var w=Math.cos(h),E=Math.sin(h),_=function(e,t){return{x:(e-=u)*w-(t-=c)*E+u,y:e*E+t*w+c}},T=_(f,m),D=_(f,x),C=_(y,m),N=_(y,x),A=[T.x+d,T.y+p,C.x+d,C.y+p,N.x+d,N.y+p,D.x+d,D.y+p];if(Jt(e,t,A))return v(n),!0}else if(qt(s,e,t))return v(n),!0}}n&&(l=l.interactive);for(var w=l.length-1;w>=0;w--){var E=l[w];E.isNode()?y(E)||x(E):m(E)||x(E)||x(E,"source")||x(E,"target")}return u},getAllInBox:function(e,t,n,r){for(var i,a,o=this.getCachedZSortedEles().interactive,s=[],l=Math.min(e,n),u=Math.max(e,n),c=Math.min(t,r),h=Math.max(t,r),d=zt({x1:e=l,y1:t=c,x2:n=u,y2:r=h}),p=0;p0?-(Math.PI-a.ang):Math.PI+a.ang),yu(t,n,vu),eu=fu.nx*vu.ny-fu.ny*vu.nx,tu=fu.nx*vu.nx-fu.ny*-vu.ny,iu=Math.asin(Math.max(-1,Math.min(1,eu))),Math.abs(iu)<1e-6)return Ql=t.x,Jl=t.y,void(ou=lu=0);nu=1,ru=!1,tu<0?iu<0?iu=Math.PI+iu:(iu=Math.PI-iu,nu=-1,ru=!0):iu>0&&(nu=-1,ru=!0),lu=void 0!==t.radius?t.radius:r,au=iu/2,uu=Math.min(fu.len/2,vu.len/2),i?(su=Math.abs(Math.cos(au)*lu/Math.sin(au)))>uu?(su=uu,ou=Math.abs(su*Math.sin(au)/Math.cos(au))):ou=lu:(su=Math.min(uu,lu),ou=Math.abs(su*Math.sin(au)/Math.cos(au))),du=t.x+vu.nx*su,pu=t.y+vu.ny*su,Ql=du-vu.ny*ou*nu,Jl=pu+vu.nx*ou*nu,cu=t.x+fu.nx*su,hu=t.y+fu.ny*su,gu=t};function bu(e,t){0===t.radius?e.lineTo(t.cx,t.cy):e.arc(t.cx,t.cy,t.radius,t.startAngle,t.endAngle,t.counterClockwise)}function xu(e,t,n,r){var i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];return 0===r||0===t.radius?{cx:t.x,cy:t.y,radius:0,startX:t.x,startY:t.y,stopX:t.x,stopY:t.y,startAngle:void 0,endAngle:void 0,counterClockwise:void 0}:(mu(e,t,n,r,i),{cx:Ql,cy:Jl,radius:ou,startX:cu,startY:hu,stopX:du,stopY:pu,startAngle:fu.ang+Math.PI/2*nu,endAngle:vu.ang-Math.PI/2*nu,counterClockwise:ru})}var wu={};function Eu(e){var t=[];if(null!=e){for(var n=0;n0?Math.max(e-t,0):Math.min(e+t,0)},N=C(T,E),A=C(D,_),L=!1;"auto"===v?f=Math.abs(N)>Math.abs(A)?i:r:v===l||v===s?(f=r,L=!0):v!==a&&v!==o||(f=i,L=!0);var k,S=f===r,M=S?A:N,I=S?D:T,O=Mt(I),P=!1;(L&&(m||x)||!(v===s&&I<0||v===l&&I>0||v===a&&I>0||v===o&&I<0)||(M=(O*=-1)*Math.abs(M),P=!0),m)?k=(b<0?1+b:b)*M:k=(b<0?M:0)+b*O;var R=function(e){return Math.abs(e)=Math.abs(M)},B=R(k),F=R(Math.abs(M)-Math.abs(k));if((B||F)&&!P)if(S){var z=Math.abs(I)<=h/2,G=Math.abs(T)<=d/2;if(z){var Y=(u.x1+u.x2)/2,V=u.y1,X=u.y2;n.segpts=[Y,V,Y,X]}else if(G){var U=(u.y1+u.y2)/2,j=u.x1,q=u.x2;n.segpts=[j,U,q,U]}else n.segpts=[u.x1,u.y2]}else{var H=Math.abs(I)<=c/2,W=Math.abs(D)<=p/2;if(H){var $=(u.y1+u.y2)/2,K=u.x1,Z=u.x2;n.segpts=[K,$,Z,$]}else if(W){var Q=(u.x1+u.x2)/2,J=u.y1,ee=u.y2;n.segpts=[Q,J,Q,ee]}else n.segpts=[u.x2,u.y1]}else if(S){var te=u.y1+k+(g?h/2*O:0),ne=u.x1,re=u.x2;n.segpts=[ne,te,re,te]}else{var ie=u.x1+k+(g?c/2*O:0),ae=u.y1,oe=u.y2;n.segpts=[ie,ae,ie,oe]}if(n.isRound){var se=e.pstyle("taxi-radius").value,le="arc-radius"===e.pstyle("radius-type").value[0];n.radii=new Array(n.segpts.length/2).fill(se),n.isArcRadius=new Array(n.segpts.length/2).fill(le)}},wu.tryToCorrectInvalidPoints=function(e,t){var n=e._private.rscratch;if("bezier"===n.edgeType){var r=t.srcPos,i=t.tgtPos,a=t.srcW,o=t.srcH,s=t.tgtW,l=t.tgtH,u=t.srcShape,c=t.tgtShape,h=t.srcCornerRadius,d=t.tgtCornerRadius,p=t.srcRs,g=t.tgtRs,f=!T(n.startX)||!T(n.startY),v=!T(n.arrowStartX)||!T(n.arrowStartY),y=!T(n.endX)||!T(n.endY),m=!T(n.arrowEndX)||!T(n.arrowEndY),b=3*(this.getArrowWidth(e.pstyle("width").pfValue,e.pstyle("arrow-scale").value)*this.arrowShapeWidth),x=It({x:n.ctrlpts[0],y:n.ctrlpts[1]},{x:n.startX,y:n.startY}),w=xd.poolIndex()){var p=h;h=d,d=p}var g=s.srcPos=h.position(),f=s.tgtPos=d.position(),v=s.srcW=h.outerWidth(),y=s.srcH=h.outerHeight(),m=s.tgtW=d.outerWidth(),b=s.tgtH=d.outerHeight(),x=s.srcShape=n.nodeShapes[t.getNodeShape(h)],w=s.tgtShape=n.nodeShapes[t.getNodeShape(d)],E=s.srcCornerRadius="auto"===h.pstyle("corner-radius").value?"auto":h.pstyle("corner-radius").pfValue,_=s.tgtCornerRadius="auto"===d.pstyle("corner-radius").value?"auto":d.pstyle("corner-radius").pfValue,D=s.tgtRs=d._private.rscratch,C=s.srcRs=h._private.rscratch;s.dirCounts={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0};for(var N=0;N0){var q=u,H=Ot(q,Lt(t)),W=Ot(q,Lt(j)),$=H;if(W2)Ot(q,{x:j[2],y:j[3]})<$&&(t=[j[2],j[3]])}}var K=un(t,n,o.arrowShapes[h].spacing(e)+p),Z=un(t,n,o.arrowShapes[h].gap(e)+p);if(m.endX=Z[0],m.endY=Z[1],m.arrowEndX=K[0],m.arrowEndY=K[1],"inside-to-node"===L)t=[u.x,u.y];else if(A.units)t=this.manualEndptToPx(s,A);else if("outside-to-line"===L)t=m.srcIntn;else if("outside-to-node"===L||"outside-to-node-or-label"===L?a=r:"outside-to-line"!==L&&"outside-to-line-or-label"!==L||(a=[c.x,c.y]),t=o.nodeShapes[this.getNodeShape(s)].intersectLine(u.x,u.y,s.outerWidth(),s.outerHeight(),a[0],a[1],0,k,f),"outside-to-node-or-label"===L||"outside-to-line-or-label"===L){var Q=s._private.rscratch,J=Q.labelWidth,ee=Q.labelHeight,te=Q.labelX,ne=Q.labelY,re=J/2,ie=ee/2,ae=s.pstyle("text-valign").value;"top"===ae?ne-=ie:"bottom"===ae&&(ne+=ie);var oe=s.pstyle("text-halign").value;"left"===oe?te-=re:"right"===oe&&(te+=re);var se=ln(a[0],a[1],[te-re,ne-ie,te+re,ne-ie,te+re,ne+ie,te-re,ne+ie],u.x,u.y);if(se.length>0){var le=c,ue=Ot(le,Lt(t)),ce=Ot(le,Lt(se)),he=ue;if(ce2)Ot(le,{x:se[2],y:se[3]})=u||m){c={cp:f,segment:y};break}}if(c)break}var b=c.cp,x=c.segment,w=(u-d)/x.length,E=x.t1-x.t0,_=s?x.t0+E*w:x.t1-E*w;_=Ft(0,_,1),t=Bt(b.p0,b.p1,b.p2,_),i=function(e,t,n,r){var i=Ft(0,r-.001,1),a=Ft(0,r+.001,1),o=Bt(e,t,n,i),s=Bt(e,t,n,a);return Au(o,s)}(b.p0,b.p1,b.p2,_);break;case"straight":case"segments":case"haystack":for(var T,D,C,N,A=0,L=r.allpts.length,k=0;k+3=u));k+=2);var S=(u-D)/T;S=Ft(0,S,1),t=function(e,t,n,r){var i=t.x-e.x,a=t.y-e.y,o=It(e,t),s=i/o,l=a/o;return n=null==n?0:n,r=null!=r?r:n*o,{x:e.x+s*r,y:e.y+l*r}}(C,N,S),i=Au(C,N)}o("labelX",n,t.x),o("labelY",n,t.y),o("labelAutoAngle",n,i)}};u("source"),u("target"),this.applyLabelDimensions(e)}},Cu.applyLabelDimensions=function(e){this.applyPrefixedLabelDimensions(e),e.isEdge()&&(this.applyPrefixedLabelDimensions(e,"source"),this.applyPrefixedLabelDimensions(e,"target"))},Cu.applyPrefixedLabelDimensions=function(e,t){var n=e._private,r=this.getLabelText(e,t),i=this.calculateLabelDimensions(e,r),a=e.pstyle("line-height").pfValue,o=e.pstyle("text-wrap").strValue,s=it(n.rscratch,"labelWrapCachedLines",t)||[],l="wrap"!==o?1:Math.max(s.length,1),u=i.height/l,c=u*a,h=i.width,d=i.height+(l-1)*(a-1)*u;at(n.rstyle,"labelWidth",t,h),at(n.rscratch,"labelWidth",t,h),at(n.rstyle,"labelHeight",t,d),at(n.rscratch,"labelHeight",t,d),at(n.rscratch,"labelLineHeight",t,c)},Cu.getLabelText=function(e,t){var n=e._private,r=t?t+"-":"",i=e.pstyle(r+"label").strValue,a=e.pstyle("text-transform").value,o=function(e,r){return r?(at(n.rscratch,e,t,r),r):it(n.rscratch,e,t)};if(!i)return"";"none"==a||("uppercase"==a?i=i.toUpperCase():"lowercase"==a&&(i=i.toLowerCase()));var s=e.pstyle("text-wrap").value;if("wrap"===s){var l=o("labelKey");if(null!=l&&o("labelWrapKey")===l)return o("labelWrapCachedText");for(var u=i.split("\n"),c=e.pstyle("text-max-width").pfValue,h="anywhere"===e.pstyle("text-overflow-wrap").value,p=[],g=/[\s\u200b]+|$/g,f=0;fc){var b,x="",w=0,E=d(v.matchAll(g));try{for(E.s();!(b=E.n()).done;){var _=b.value,T=_[0],D=v.substring(w,_.index);w=_.index+T.length;var C=0===x.length?D:x+D+T;this.calculateLabelDimensions(e,C).width<=c?x+=D+T:(x&&p.push(x),x=D+T)}}catch(S){E.e(S)}finally{E.f()}x.match(/^[\s\u200b]+$/)||p.push(x)}else p.push(v)}o("labelWrapCachedLines",p),i=o("labelWrapCachedText",p.join("\n")),o("labelWrapKey",l)}else if("ellipsis"===s){var N=e.pstyle("text-max-width").pfValue,A="",L=!1;if(this.calculateLabelDimensions(e,i).widthN)break;A+=i[k],k===i.length-1&&(L=!0)}return L||(A+="\u2026"),A}return i},Cu.getLabelJustification=function(e){var t=e.pstyle("text-justification").strValue,n=e.pstyle("text-halign").strValue;if("auto"!==t)return t;if(!e.isNode())return"center";switch(n){case"left":return"right";case"right":return"left";default:return"center"}},Cu.calculateLabelDimensions=function(e,t){var n=this,r=n.cy.window().document,i=Be(t,e._private.labelDimsKey),a=n.labelDimCache||(n.labelDimCache=[]),o=a[i];if(null!=o)return o;var s=e.pstyle("font-style").strValue,l=e.pstyle("font-size").pfValue,u=e.pstyle("font-family").strValue,c=e.pstyle("font-weight").strValue,h=this.labelCalcCanvas,d=this.labelCalcCanvasContext;if(!h){h=this.labelCalcCanvas=r.createElement("canvas"),d=this.labelCalcCanvasContext=h.getContext("2d");var p=h.style;p.position="absolute",p.left="-9999px",p.top="-9999px",p.zIndex="-1",p.visibility="hidden",p.pointerEvents="none"}d.font="".concat(s," ").concat(c," ").concat(l,"px ").concat(u);for(var g=0,f=0,v=t.split("\n"),y=0;y1&&void 0!==arguments[1])||arguments[1];if(t.merge(e),n)for(var r=0;r=e.desktopTapThreshold2}var N=i(t);v&&(e.hoverData.tapholdCancelled=!0);n=!0,r(f,["mousemove","vmousemove","tapdrag"],t,{x:c[0],y:c[1]});var A=function(){e.data.bgActivePosistion=void 0,e.hoverData.selecting||o.emit({originalEvent:t,type:"boxstart",position:{x:c[0],y:c[1]}}),g[4]=1,e.hoverData.selecting=!0,e.redrawHint("select",!0),e.redraw()};if(3===e.hoverData.which){if(v){var L={originalEvent:t,type:"cxtdrag",position:{x:c[0],y:c[1]}};m?m.emit(L):o.emit(L),e.hoverData.cxtDragged=!0,e.hoverData.cxtOver&&f===e.hoverData.cxtOver||(e.hoverData.cxtOver&&e.hoverData.cxtOver.emit({originalEvent:t,type:"cxtdragout",position:{x:c[0],y:c[1]}}),e.hoverData.cxtOver=f,f&&f.emit({originalEvent:t,type:"cxtdragover",position:{x:c[0],y:c[1]}}))}}else if(e.hoverData.dragging){if(n=!0,o.panningEnabled()&&o.userPanningEnabled()){var k;if(e.hoverData.justStartedPan){var S=e.hoverData.mdownPos;k={x:(c[0]-S[0])*s,y:(c[1]-S[1])*s},e.hoverData.justStartedPan=!1}else k={x:b[0]*s,y:b[1]*s};o.panBy(k),o.emit("dragpan"),e.hoverData.dragged=!0}c=e.projectIntoViewport(t.clientX,t.clientY)}else if(1!=g[4]||null!=m&&!m.pannable()){if(m&&m.pannable()&&m.active()&&m.unactivate(),m&&m.grabbed()||f==y||(y&&r(y,["mouseout","tapdragout"],t,{x:c[0],y:c[1]}),f&&r(f,["mouseover","tapdragover"],t,{x:c[0],y:c[1]}),e.hoverData.last=f),m)if(v){if(o.boxSelectionEnabled()&&N)m&&m.grabbed()&&(h(x),m.emit("freeon"),x.emit("free"),e.dragData.didDrag&&(m.emit("dragfreeon"),x.emit("dragfree"))),A();else if(m&&m.grabbed()&&e.nodeIsDraggable(m)){var M=!e.dragData.didDrag;M&&e.redrawHint("eles",!0),e.dragData.didDrag=!0,e.hoverData.draggingEles||u(x,{inDragLayer:!0});var I={x:0,y:0};if(T(b[0])&&T(b[1])&&(I.x+=b[0],I.y+=b[1],M)){var O=e.hoverData.dragDelta;O&&T(O[0])&&T(O[1])&&(I.x+=O[0],I.y+=O[1])}e.hoverData.draggingEles=!0,x.silentShift(I).emit("position drag"),e.redrawHint("drag",!0),e.redraw()}}else!function(){var t=e.hoverData.dragDelta=e.hoverData.dragDelta||[];0===t.length?(t.push(b[0]),t.push(b[1])):(t[0]+=b[0],t[1]+=b[1])}();n=!0}else if(v){if(e.hoverData.dragging||!o.boxSelectionEnabled()||!N&&o.panningEnabled()&&o.userPanningEnabled()){if(!e.hoverData.selecting&&o.panningEnabled()&&o.userPanningEnabled()){a(m,e.hoverData.downs)&&(e.hoverData.dragging=!0,e.hoverData.justStartedPan=!0,g[4]=0,e.data.bgActivePosistion=Lt(d),e.redrawHint("select",!0),e.redraw())}}else A();m&&m.pannable()&&m.active()&&m.unactivate()}return g[2]=c[0],g[3]=c[1],n?(t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),!1):void 0}}),!1),e.registerBinding(t,"mouseup",(function(t){if((1!==e.hoverData.which||1===t.which||!e.hoverData.capture)&&e.hoverData.capture){e.hoverData.capture=!1;var a=e.cy,o=e.projectIntoViewport(t.clientX,t.clientY),s=e.selection,l=e.findNearestElement(o[0],o[1],!0,!1),u=e.dragData.possibleDragElements,c=e.hoverData.down,d=i(t);if(e.data.bgActivePosistion&&(e.redrawHint("select",!0),e.redraw()),e.hoverData.tapholdCancelled=!0,e.data.bgActivePosistion=void 0,c&&c.unactivate(),3===e.hoverData.which){var p={originalEvent:t,type:"cxttapend",position:{x:o[0],y:o[1]}};if(c?c.emit(p):a.emit(p),!e.hoverData.cxtDragged){var g={originalEvent:t,type:"cxttap",position:{x:o[0],y:o[1]}};c?c.emit(g):a.emit(g)}e.hoverData.cxtDragged=!1,e.hoverData.which=null}else if(1===e.hoverData.which){if(r(l,["mouseup","tapend","vmouseup"],t,{x:o[0],y:o[1]}),e.dragData.didDrag||e.hoverData.dragged||e.hoverData.selecting||e.hoverData.isOverThresholdDrag||(r(c,["click","tap","vclick"],t,{x:o[0],y:o[1]}),b=!1,t.timeStamp-x<=a.multiClickDebounceTime()?(m&&clearTimeout(m),b=!0,x=null,r(c,["dblclick","dbltap","vdblclick"],t,{x:o[0],y:o[1]})):(m=setTimeout((function(){b||r(c,["oneclick","onetap","voneclick"],t,{x:o[0],y:o[1]})}),a.multiClickDebounceTime()),x=t.timeStamp)),null!=c||e.dragData.didDrag||e.hoverData.selecting||e.hoverData.dragged||i(t)||(a.$(n).unselect(["tapunselect"]),u.length>0&&e.redrawHint("eles",!0),e.dragData.possibleDragElements=u=a.collection()),l!=c||e.dragData.didDrag||e.hoverData.selecting||null!=l&&l._private.selectable&&(e.hoverData.dragging||("additive"===a.selectionType()||d?l.selected()?l.unselect(["tapunselect"]):l.select(["tapselect"]):d||(a.$(n).unmerge(l).unselect(["tapunselect"]),l.select(["tapselect"]))),e.redrawHint("eles",!0)),e.hoverData.selecting){var f=a.collection(e.getAllInBox(s[0],s[1],s[2],s[3]));e.redrawHint("select",!0),f.length>0&&e.redrawHint("eles",!0),a.emit({type:"boxend",originalEvent:t,position:{x:o[0],y:o[1]}});var v=function(e){return e.selectable()&&!e.selected()};"additive"===a.selectionType()||d||a.$(n).unmerge(f).unselect(),f.emit("box").stdFilter(v).select().emit("boxselect"),e.redraw()}if(e.hoverData.dragging&&(e.hoverData.dragging=!1,e.redrawHint("select",!0),e.redrawHint("eles",!0),e.redraw()),!s[4]){e.redrawHint("drag",!0),e.redrawHint("eles",!0);var y=c&&c.grabbed();h(u),y&&(c.emit("freeon"),u.emit("free"),e.dragData.didDrag&&(c.emit("dragfreeon"),u.emit("dragfree")))}}s[4]=0,e.hoverData.down=null,e.hoverData.cxtStarted=!1,e.hoverData.draggingEles=!1,e.hoverData.selecting=!1,e.hoverData.isOverThresholdDrag=!1,e.dragData.didDrag=!1,e.hoverData.dragged=!1,e.hoverData.dragDelta=[],e.hoverData.mdownPos=null,e.hoverData.mdownGPos=null,e.hoverData.which=null}}),!1);var E,_,D,C,N,A,L,k,S,M,I,O,P,R=function(t){if(!e.scrollingPage){var n=e.cy,r=n.zoom(),i=n.pan(),a=e.projectIntoViewport(t.clientX,t.clientY),o=[a[0]*r+i.x,a[1]*r+i.y];if(e.hoverData.draggingEles||e.hoverData.dragging||e.hoverData.cxtStarted||0!==e.selection[4])t.preventDefault();else if(n.panningEnabled()&&n.userPanningEnabled()&&n.zoomingEnabled()&&n.userZoomingEnabled()){var s;t.preventDefault(),e.data.wheelZooming=!0,clearTimeout(e.data.wheelTimeout),e.data.wheelTimeout=setTimeout((function(){e.data.wheelZooming=!1,e.redrawHint("eles",!0),e.redraw()}),150),s=null!=t.deltaY?t.deltaY/-250:null!=t.wheelDeltaY?t.wheelDeltaY/1e3:t.wheelDelta/1e3,s*=e.wheelSensitivity,1===t.deltaMode&&(s*=33);var l=n.zoom()*Math.pow(10,s);"gesturechange"===t.type&&(l=e.gestureStartZoom*t.scale),n.zoom({level:l,renderedPosition:{x:o[0],y:o[1]}}),n.emit("gesturechange"===t.type?"pinchzoom":"scrollzoom")}}};e.registerBinding(e.container,"wheel",R,!0),e.registerBinding(t,"scroll",(function(t){e.scrollingPage=!0,clearTimeout(e.scrollingPageTimeout),e.scrollingPageTimeout=setTimeout((function(){e.scrollingPage=!1}),250)}),!0),e.registerBinding(e.container,"gesturestart",(function(t){e.gestureStartZoom=e.cy.zoom(),e.hasTouchStarted||t.preventDefault()}),!0),e.registerBinding(e.container,"gesturechange",(function(t){e.hasTouchStarted||R(t)}),!0),e.registerBinding(e.container,"mouseout",(function(t){var n=e.projectIntoViewport(t.clientX,t.clientY);e.cy.emit({originalEvent:t,type:"mouseout",position:{x:n[0],y:n[1]}})}),!1),e.registerBinding(e.container,"mouseover",(function(t){var n=e.projectIntoViewport(t.clientX,t.clientY);e.cy.emit({originalEvent:t,type:"mouseover",position:{x:n[0],y:n[1]}})}),!1);var B,F,z,G,Y,V,X,U=function(e,t,n,r){return Math.sqrt((n-e)*(n-e)+(r-t)*(r-t))},j=function(e,t,n,r){return(n-e)*(n-e)+(r-t)*(r-t)};if(e.registerBinding(e.container,"touchstart",B=function(t){if(e.hasTouchStarted=!0,w(t)){p(),e.touchData.capture=!0,e.data.bgActivePosistion=void 0;var n=e.cy,i=e.touchData.now,a=e.touchData.earlier;if(t.touches[0]){var o=e.projectIntoViewport(t.touches[0].clientX,t.touches[0].clientY);i[0]=o[0],i[1]=o[1]}if(t.touches[1]){o=e.projectIntoViewport(t.touches[1].clientX,t.touches[1].clientY);i[2]=o[0],i[3]=o[1]}if(t.touches[2]){o=e.projectIntoViewport(t.touches[2].clientX,t.touches[2].clientY);i[4]=o[0],i[5]=o[1]}if(t.touches[1]){e.touchData.singleTouchMoved=!0,h(e.dragData.touchDragEles);var l=e.findContainerClientCoords();S=l[0],M=l[1],I=l[2],O=l[3],E=t.touches[0].clientX-S,_=t.touches[0].clientY-M,D=t.touches[1].clientX-S,C=t.touches[1].clientY-M,P=0<=E&&E<=I&&0<=D&&D<=I&&0<=_&&_<=O&&0<=C&&C<=O;var d=n.pan(),g=n.zoom();N=U(E,_,D,C),A=j(E,_,D,C),k=[((L=[(E+D)/2,(_+C)/2])[0]-d.x)/g,(L[1]-d.y)/g];if(A<4e4&&!t.touches[2]){var f=e.findNearestElement(i[0],i[1],!0,!0),v=e.findNearestElement(i[2],i[3],!0,!0);return f&&f.isNode()?(f.activate().emit({originalEvent:t,type:"cxttapstart",position:{x:i[0],y:i[1]}}),e.touchData.start=f):v&&v.isNode()?(v.activate().emit({originalEvent:t,type:"cxttapstart",position:{x:i[0],y:i[1]}}),e.touchData.start=v):n.emit({originalEvent:t,type:"cxttapstart",position:{x:i[0],y:i[1]}}),e.touchData.start&&(e.touchData.start._private.grabbed=!1),e.touchData.cxt=!0,e.touchData.cxtDragged=!1,e.data.bgActivePosistion=void 0,void e.redraw()}}if(t.touches[2])n.boxSelectionEnabled()&&t.preventDefault();else if(t.touches[1]);else if(t.touches[0]){var y=e.findNearestElements(i[0],i[1],!0,!0),m=y[0];if(null!=m&&(m.activate(),e.touchData.start=m,e.touchData.starts=y,e.nodeIsGrabbable(m))){var b=e.dragData.touchDragEles=n.collection(),x=null;e.redrawHint("eles",!0),e.redrawHint("drag",!0),m.selected()?(x=n.$((function(t){return t.selected()&&e.nodeIsGrabbable(t)})),u(x,{addToList:b})):c(m,{addToList:b}),s(m);var T=function(e){return{originalEvent:t,type:e,position:{x:i[0],y:i[1]}}};m.emit(T("grabon")),x?x.forEach((function(e){e.emit(T("grab"))})):m.emit(T("grab"))}r(m,["touchstart","tapstart","vmousedown"],t,{x:i[0],y:i[1]}),null==m&&(e.data.bgActivePosistion={x:o[0],y:o[1]},e.redrawHint("select",!0),e.redraw()),e.touchData.singleTouchMoved=!1,e.touchData.singleTouchStartTime=+new Date,clearTimeout(e.touchData.tapholdTimeout),e.touchData.tapholdTimeout=setTimeout((function(){!1!==e.touchData.singleTouchMoved||e.pinching||e.touchData.selecting||r(e.touchData.start,["taphold"],t,{x:i[0],y:i[1]})}),e.tapholdDuration)}if(t.touches.length>=1){for(var R=e.touchData.startPosition=[null,null,null,null,null,null],B=0;B=e.touchTapThreshold2}if(n&&e.touchData.cxt){t.preventDefault();var x=t.touches[0].clientX-S,L=t.touches[0].clientY-M,I=t.touches[1].clientX-S,O=t.touches[1].clientY-M,R=j(x,L,I,O);if(R/A>=2.25||R>=22500){e.touchData.cxt=!1,e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);var B={originalEvent:t,type:"cxttapend",position:{x:s[0],y:s[1]}};e.touchData.start?(e.touchData.start.unactivate().emit(B),e.touchData.start=null):o.emit(B)}}if(n&&e.touchData.cxt){B={originalEvent:t,type:"cxtdrag",position:{x:s[0],y:s[1]}};e.data.bgActivePosistion=void 0,e.redrawHint("select",!0),e.touchData.start?e.touchData.start.emit(B):o.emit(B),e.touchData.start&&(e.touchData.start._private.grabbed=!1),e.touchData.cxtDragged=!0;var F=e.findNearestElement(s[0],s[1],!0,!0);e.touchData.cxtOver&&F===e.touchData.cxtOver||(e.touchData.cxtOver&&e.touchData.cxtOver.emit({originalEvent:t,type:"cxtdragout",position:{x:s[0],y:s[1]}}),e.touchData.cxtOver=F,F&&F.emit({originalEvent:t,type:"cxtdragover",position:{x:s[0],y:s[1]}}))}else if(n&&t.touches[2]&&o.boxSelectionEnabled())t.preventDefault(),e.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,e.touchData.selecting||o.emit({originalEvent:t,type:"boxstart",position:{x:s[0],y:s[1]}}),e.touchData.selecting=!0,e.touchData.didSelect=!0,i[4]=1,i&&0!==i.length&&void 0!==i[0]?(i[2]=(s[0]+s[2]+s[4])/3,i[3]=(s[1]+s[3]+s[5])/3):(i[0]=(s[0]+s[2]+s[4])/3,i[1]=(s[1]+s[3]+s[5])/3,i[2]=(s[0]+s[2]+s[4])/3+1,i[3]=(s[1]+s[3]+s[5])/3+1),e.redrawHint("select",!0),e.redraw();else if(n&&t.touches[1]&&!e.touchData.didSelect&&o.zoomingEnabled()&&o.panningEnabled()&&o.userZoomingEnabled()&&o.userPanningEnabled()){if(t.preventDefault(),e.data.bgActivePosistion=void 0,e.redrawHint("select",!0),ee=e.dragData.touchDragEles){e.redrawHint("drag",!0);for(var z=0;z0&&!e.hoverData.draggingEles&&!e.swipePanning&&null!=e.data.bgActivePosistion&&(e.data.bgActivePosistion=void 0,e.redrawHint("select",!0),e.redraw())}},!1),e.registerBinding(t,"touchcancel",z=function(t){var n=e.touchData.start;e.touchData.capture=!1,n&&n.unactivate()}),e.registerBinding(t,"touchend",G=function(t){var i=e.touchData.start;if(e.touchData.capture){0===t.touches.length&&(e.touchData.capture=!1),t.preventDefault();var a=e.selection;e.swipePanning=!1,e.hoverData.draggingEles=!1;var o,s=e.cy,l=s.zoom(),u=e.touchData.now,c=e.touchData.earlier;if(t.touches[0]){var d=e.projectIntoViewport(t.touches[0].clientX,t.touches[0].clientY);u[0]=d[0],u[1]=d[1]}if(t.touches[1]){d=e.projectIntoViewport(t.touches[1].clientX,t.touches[1].clientY);u[2]=d[0],u[3]=d[1]}if(t.touches[2]){d=e.projectIntoViewport(t.touches[2].clientX,t.touches[2].clientY);u[4]=d[0],u[5]=d[1]}if(i&&i.unactivate(),e.touchData.cxt){if(o={originalEvent:t,type:"cxttapend",position:{x:u[0],y:u[1]}},i?i.emit(o):s.emit(o),!e.touchData.cxtDragged){var p={originalEvent:t,type:"cxttap",position:{x:u[0],y:u[1]}};i?i.emit(p):s.emit(p)}return e.touchData.start&&(e.touchData.start._private.grabbed=!1),e.touchData.cxt=!1,e.touchData.start=null,void e.redraw()}if(!t.touches[2]&&s.boxSelectionEnabled()&&e.touchData.selecting){e.touchData.selecting=!1;var g=s.collection(e.getAllInBox(a[0],a[1],a[2],a[3]));a[0]=void 0,a[1]=void 0,a[2]=void 0,a[3]=void 0,a[4]=0,e.redrawHint("select",!0),s.emit({type:"boxend",originalEvent:t,position:{x:u[0],y:u[1]}});g.emit("box").stdFilter((function(e){return e.selectable()&&!e.selected()})).select().emit("boxselect"),g.nonempty()&&e.redrawHint("eles",!0),e.redraw()}if(null!=i&&i.unactivate(),t.touches[2])e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);else if(t.touches[1]);else if(t.touches[0]);else if(!t.touches[0]){e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);var f=e.dragData.touchDragEles;if(null!=i){var v=i._private.grabbed;h(f),e.redrawHint("drag",!0),e.redrawHint("eles",!0),v&&(i.emit("freeon"),f.emit("free"),e.dragData.didDrag&&(i.emit("dragfreeon"),f.emit("dragfree"))),r(i,["touchend","tapend","vmouseup","tapdragout"],t,{x:u[0],y:u[1]}),i.unactivate(),e.touchData.start=null}else{var y=e.findNearestElement(u[0],u[1],!0,!0);r(y,["touchend","tapend","vmouseup","tapdragout"],t,{x:u[0],y:u[1]})}var m=e.touchData.startPosition[0]-u[0],b=m*m,x=e.touchData.startPosition[1]-u[1],w=(b+x*x)*l*l;e.touchData.singleTouchMoved||(i||s.$(":selected").unselect(["tapunselect"]),r(i,["tap","vclick"],t,{x:u[0],y:u[1]}),Y=!1,t.timeStamp-X<=s.multiClickDebounceTime()?(V&&clearTimeout(V),Y=!0,X=null,r(i,["dbltap","vdblclick"],t,{x:u[0],y:u[1]})):(V=setTimeout((function(){Y||r(i,["onetap","voneclick"],t,{x:u[0],y:u[1]})}),s.multiClickDebounceTime()),X=t.timeStamp)),null!=i&&!e.dragData.didDrag&&i._private.selectable&&w2){for(var p=[c[0],c[1]],g=Math.pow(p[0]-e,2)+Math.pow(p[1]-t,2),f=1;f0)return f[0]}return null},p=Object.keys(h),g=0;g0?u:Wt(i,a,e,t,n,r,o,s)},checkPoint:function(e,t,n,r,i,a,o,s){var l=2*(s="auto"===s?pn(r,i):s);if(en(e,t,this.points,a,o,r,i-l,[0,-1],n))return!0;if(en(e,t,this.points,a,o,r-l,i,[0,-1],n))return!0;var u=r/2+2*n,c=i/2+2*n;return!!Jt(e,t,[a-u,o-c,a-u,o,a+u,o,a+u,o-c])||(!!rn(e,t,l,l,a+r/2-s,o+i/2-s,n)||!!rn(e,t,l,l,a-r/2+s,o+i/2-s,n))}}},Ru.registerNodeShapes=function(){var e=this.nodeShapes={},t=this;this.generateEllipse(),this.generatePolygon("triangle",cn(3,0)),this.generateRoundPolygon("round-triangle",cn(3,0)),this.generatePolygon("rectangle",cn(4,0)),e.square=e.rectangle,this.generateRoundRectangle(),this.generateCutRectangle(),this.generateBarrel(),this.generateBottomRoundrectangle();var n=[0,1,1,0,0,-1,-1,0];this.generatePolygon("diamond",n),this.generateRoundPolygon("round-diamond",n),this.generatePolygon("pentagon",cn(5,0)),this.generateRoundPolygon("round-pentagon",cn(5,0)),this.generatePolygon("hexagon",cn(6,0)),this.generateRoundPolygon("round-hexagon",cn(6,0)),this.generatePolygon("heptagon",cn(7,0)),this.generateRoundPolygon("round-heptagon",cn(7,0)),this.generatePolygon("octagon",cn(8,0)),this.generateRoundPolygon("round-octagon",cn(8,0));var r=new Array(20),i=dn(5,0),a=dn(5,Math.PI/5),o=.5*(3-Math.sqrt(5));o*=1.57;for(var s=0;s=e.deqFastCost*f)break}else if(i){if(p>=e.deqCost*l||p>=e.deqAvgCost*s)break}else if(g>=e.deqNoDrawCost*Yu)break;var v=e.deq(t,h,c);if(!(v.length>0))break;for(var y=0;y0&&(e.onDeqd(t,u),!i&&e.shouldRedraw(t,u,h,c)&&r())}),i(t))}}},Xu=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:je;a(this,e),this.idsByKey=new ot,this.keyForId=new ot,this.cachesByLvl=new ot,this.lvls=[],this.getKey=t,this.doesEleInvalidateKey=n}return s(e,[{key:"getIdsFor",value:function(e){null==e&&We("Can not get id list for null key");var t=this.idsByKey,n=this.idsByKey.get(e);return n||(n=new lt,t.set(e,n)),n}},{key:"addIdForKey",value:function(e,t){null!=e&&this.getIdsFor(e).add(t)}},{key:"deleteIdForKey",value:function(e,t){null!=e&&this.getIdsFor(e).delete(t)}},{key:"getNumberOfIdsForKey",value:function(e){return null==e?0:this.getIdsFor(e).size}},{key:"updateKeyMappingFor",value:function(e){var t=e.id(),n=this.keyForId.get(t),r=this.getKey(e);this.deleteIdForKey(n,t),this.addIdForKey(r,t),this.keyForId.set(t,r)}},{key:"deleteKeyMappingFor",value:function(e){var t=e.id(),n=this.keyForId.get(t);this.deleteIdForKey(n,t),this.keyForId.delete(t)}},{key:"keyHasChangedFor",value:function(e){var t=e.id();return this.keyForId.get(t)!==this.getKey(e)}},{key:"isInvalid",value:function(e){return this.keyHasChangedFor(e)||this.doesEleInvalidateKey(e)}},{key:"getCachesAt",value:function(e){var t=this.cachesByLvl,n=this.lvls,r=t.get(e);return r||(r=new ot,t.set(e,r),n.push(e)),r}},{key:"getCache",value:function(e,t){return this.getCachesAt(t).get(e)}},{key:"get",value:function(e,t){var n=this.getKey(e),r=this.getCache(n,t);return null!=r&&this.updateKeyMappingFor(e),r}},{key:"getForCachedKey",value:function(e,t){var n=this.keyForId.get(e.id());return this.getCache(n,t)}},{key:"hasCache",value:function(e,t){return this.getCachesAt(t).has(e)}},{key:"has",value:function(e,t){var n=this.getKey(e);return this.hasCache(n,t)}},{key:"setCache",value:function(e,t,n){n.key=e,this.getCachesAt(t).set(e,n)}},{key:"set",value:function(e,t,n){var r=this.getKey(e);this.setCache(r,t,n),this.updateKeyMappingFor(e)}},{key:"deleteCache",value:function(e,t){this.getCachesAt(t).delete(e)}},{key:"delete",value:function(e,t){var n=this.getKey(e);this.deleteCache(n,t)}},{key:"invalidateKey",value:function(e){var t=this;this.lvls.forEach((function(n){return t.deleteCache(e,n)}))}},{key:"invalidate",value:function(e){var t=e.id(),n=this.keyForId.get(t);this.deleteKeyMappingFor(e);var r=this.doesEleInvalidateKey(e);return r&&this.invalidateKey(n),r||0===this.getNumberOfIdsForKey(n)}}]),e}(),Uu={dequeue:"dequeue",downscale:"downscale",highQuality:"highQuality"},ju=tt({getKey:null,doesEleInvalidateKey:je,drawElement:null,getBoundingBox:null,getRotationPoint:null,getRotationOffset:null,isVisible:Ue,allowEdgeTxrCaching:!0,allowParentTxrCaching:!0}),qu=function(e,t){var n=this;n.renderer=e,n.onDequeues=[];var r=ju(t);U(n,r),n.lookup=new Xu(r.getKey,r.doesEleInvalidateKey),n.setupDequeueing()},Hu=qu.prototype;Hu.reasons=Uu,Hu.getTextureQueue=function(e){var t=this;return t.eleImgCaches=t.eleImgCaches||{},t.eleImgCaches[e]=t.eleImgCaches[e]||[]},Hu.getRetiredTextureQueue=function(e){var t=this.eleImgCaches.retired=this.eleImgCaches.retired||{};return t[e]=t[e]||[]},Hu.getElementQueue=function(){return this.eleCacheQueue=this.eleCacheQueue||new pt((function(e,t){return t.reqs-e.reqs}))},Hu.getElementKeyToQueue=function(){return this.eleKeyToCacheQueue=this.eleKeyToCacheQueue||{}},Hu.getElement=function(e,t,n,r,i){var a=this,o=this.renderer,s=o.cy.zoom(),l=this.lookup;if(!t||0===t.w||0===t.h||isNaN(t.w)||isNaN(t.h)||!e.visible()||e.removed())return null;if(!a.allowEdgeTxrCaching&&e.isEdge()||!a.allowParentTxrCaching&&e.isParent())return null;if(null==r&&(r=Math.ceil(St(s*n))),r<-4)r=-4;else if(s>=7.99||r>3)return null;var u=Math.pow(2,r),c=t.h*u,h=t.w*u,d=o.eleTextBiggerThanMin(e,u);if(!this.isVisible(e,d))return null;var p,g=l.get(e,r);if(g&&g.invalidated&&(g.invalidated=!1,g.texture.invalidatedWidth-=g.width),g)return g;if(p=c<=25?25:c<=50?50:50*Math.ceil(c/50),c>1024||h>1024)return null;var f=a.getTextureQueue(p),v=f[f.length-2],y=function(){return a.recycleTexture(p,h)||a.addTexture(p,h)};v||(v=f[f.length-1]),v||(v=y()),v.width-v.usedWidthr;N--)D=a.getElement(e,t,n,N,Uu.downscale);C()}else{var A;if(!x&&!w&&!E)for(var L=r-1;L>=-4;L--){var k=l.get(e,L);if(k){A=k;break}}if(b(A))return a.queueElement(e,r),A;v.context.translate(v.usedWidth,0),v.context.scale(u,u),this.drawElement(v.context,e,t,d,!1),v.context.scale(1/u,1/u),v.context.translate(-v.usedWidth,0)}return g={x:v.usedWidth,texture:v,level:r,scale:u,width:h,height:c,scaledLabelShown:d},v.usedWidth+=Math.ceil(h+8),v.eleCaches.push(g),l.set(e,r,g),a.checkTextureFullness(v),g},Hu.invalidateElements=function(e){for(var t=0;t=.2*e.width&&this.retireTexture(e)},Hu.checkTextureFullness=function(e){var t=this.getTextureQueue(e.height);e.usedWidth/e.width>.8&&e.fullnessChecks>=10?nt(t,e):e.fullnessChecks++},Hu.retireTexture=function(e){var t=e.height,n=this.getTextureQueue(t),r=this.lookup;nt(n,e),e.retired=!0;for(var i=e.eleCaches,a=0;a=t)return a.retired=!1,a.usedWidth=0,a.invalidatedWidth=0,a.fullnessChecks=0,rt(a.eleCaches),a.context.setTransform(1,0,0,1,0,0),a.context.clearRect(0,0,a.width,a.height),nt(r,a),n.push(a),a}},Hu.queueElement=function(e,t){var n=this.getElementQueue(),r=this.getElementKeyToQueue(),i=this.getKey(e),a=r[i];if(a)a.level=Math.max(a.level,t),a.eles.merge(e),a.reqs++,n.updateItem(a);else{var o={eles:e.spawn().merge(e),level:t,reqs:1,key:i};n.push(o),r[i]=o}},Hu.dequeue=function(e){for(var t=this,n=t.getElementQueue(),r=t.getElementKeyToQueue(),i=[],a=t.lookup,o=0;o<1&&n.size()>0;o++){var s=n.pop(),l=s.key,u=s.eles[0],c=a.hasCache(u,s.level);if(r[l]=null,!c){i.push(s);var h=t.getBoundingBox(u);t.getElement(u,h,e,s.level,Uu.dequeue)}}return i},Hu.removeFromQueue=function(e){var t=this.getElementQueue(),n=this.getElementKeyToQueue(),r=this.getKey(e),i=n[r];null!=i&&(1===i.eles.length?(i.reqs=Xe,t.updateItem(i),t.pop(),n[r]=null):i.eles.unmerge(e))},Hu.onDequeue=function(e){this.onDequeues.push(e)},Hu.offDequeue=function(e){nt(this.onDequeues,e)},Hu.setupDequeueing=Vu({deqRedrawThreshold:100,deqCost:.15,deqAvgCost:.1,deqNoDrawCost:.9,deqFastCost:.9,deq:function(e,t,n){return e.dequeue(t,n)},onDeqd:function(e,t){for(var n=0;n=3.99||n>2)return null;r.validateLayersElesOrdering(n,e);var o,s,l=r.layersByLevel,u=Math.pow(2,n),c=l[n]=l[n]||[];if(r.levelIsComplete(n,e))return c;!function(){var t=function(t){if(r.validateLayersElesOrdering(t,e),r.levelIsComplete(t,e))return s=l[t],!0},i=function(e){if(!s)for(var r=n+e;-4<=r&&r<=2&&!t(r);r+=e);};i(1),i(-1);for(var a=c.length-1;a>=0;a--){var o=c[a];o.invalid&&nt(c,o)}}();var h=function(t){var i=(t=t||{}).after;if(function(){if(!o){o=zt();for(var t=0;t16e6)return null;var a=r.makeLayer(o,n);if(null!=i){var s=c.indexOf(i)+1;c.splice(s,0,a)}else(void 0===t.insert||t.insert)&&c.unshift(a);return a};if(r.skipping&&!a)return null;for(var d=null,p=e.length/1,g=!a,f=0;f=p||!Ht(d.bb,v.boundingBox()))&&!(d=h({insert:!0,after:d})))return null;s||g?r.queueLayer(d,v):r.drawEleInLayer(d,v,n,t),d.eles.push(v),m[n]=d}}return s||(g?null:c)},$u.getEleLevelForLayerLevel=function(e,t){return e},$u.drawEleInLayer=function(e,t,n,r){var i=this.renderer,a=e.context,o=t.boundingBox();0!==o.w&&0!==o.h&&t.visible()&&(n=this.getEleLevelForLayerLevel(n,r),i.setImgSmoothing(a,!1),i.drawCachedElement(a,t,null,null,n,true),i.setImgSmoothing(a,!0))},$u.levelIsComplete=function(e,t){var n=this.layersByLevel[e];if(!n||0===n.length)return!1;for(var r=0,i=0;i0)return!1;if(a.invalid)return!1;r+=a.eles.length}return r===t.length},$u.validateLayersElesOrdering=function(e,t){var n=this.layersByLevel[e];if(n)for(var r=0;r0){e=!0;break}}return e},$u.invalidateElements=function(e){var t=this;0!==e.length&&(t.lastInvalidationTime=Le(),0!==e.length&&t.haveLayers()&&t.updateElementsInLayers(e,(function(e,n,r){t.invalidateLayer(e)})))},$u.invalidateLayer=function(e){if(this.lastInvalidationTime=Le(),!e.invalid){var t=e.level,n=e.eles,r=this.layersByLevel[t];nt(r,e),e.elesQueue=[],e.invalid=!0,e.replacement&&(e.replacement.invalid=!0);for(var i=0;i3&&void 0!==arguments[3])||arguments[3],i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],o=this,s=t._private.rscratch;if((!a||t.visible())&&!s.badLine&&null!=s.allpts&&!isNaN(s.allpts[0])){var l;n&&(l=n,e.translate(-l.x1,-l.y1));var u=a?t.pstyle("opacity").value:1,c=a?t.pstyle("line-opacity").value:1,h=t.pstyle("curve-style").value,d=t.pstyle("line-style").value,p=t.pstyle("width").pfValue,g=t.pstyle("line-cap").value,f=t.pstyle("line-outline-width").value,v=t.pstyle("line-outline-color").value,y=u*c,m=u*c,b=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:y;"straight-triangle"===h?(o.eleStrokeStyle(e,t,n),o.drawEdgeTrianglePath(t,e,s.allpts)):(e.lineWidth=p,e.lineCap=g,o.eleStrokeStyle(e,t,n),o.drawEdgePath(t,e,s.allpts,d),e.lineCap="butt")},x=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:m;o.drawArrowheads(e,t,n)};if(e.lineJoin="round","yes"===t.pstyle("ghost").value){var w=t.pstyle("ghost-offset-x").pfValue,E=t.pstyle("ghost-offset-y").pfValue,_=t.pstyle("ghost-opacity").value,T=y*_;e.translate(w,E),b(T),x(T),e.translate(-w,-E)}else!function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:y;e.lineWidth=p+f,e.lineCap=g,f>0?(o.colorStrokeStyle(e,v[0],v[1],v[2],n),"straight-triangle"===h?o.drawEdgeTrianglePath(t,e,s.allpts):(o.drawEdgePath(t,e,s.allpts,d),e.lineCap="butt")):e.lineCap="butt"}();i&&o.drawEdgeUnderlay(e,t),b(),x(),i&&o.drawEdgeOverlay(e,t),o.drawElementText(e,t,null,r),n&&e.translate(l.x1,l.y1)}}},pc=function(e){if(!["overlay","underlay"].includes(e))throw new Error("Invalid state");return function(t,n){if(n.visible()){var r=n.pstyle("".concat(e,"-opacity")).value;if(0!==r){var i=this,a=i.usePaths(),o=n._private.rscratch,s=2*n.pstyle("".concat(e,"-padding")).pfValue,l=n.pstyle("".concat(e,"-color")).value;t.lineWidth=s,"self"!==o.edgeType||a?t.lineCap="round":t.lineCap="butt",i.colorStrokeStyle(t,l[0],l[1],l[2],r),i.drawEdgePath(n,t,o.allpts,"solid")}}}};dc.drawEdgeOverlay=pc("overlay"),dc.drawEdgeUnderlay=pc("underlay"),dc.drawEdgePath=function(e,t,n,r){var i,a=e._private.rscratch,o=t,s=!1,l=this.usePaths(),u=e.pstyle("line-dash-pattern").pfValue,c=e.pstyle("line-dash-offset").pfValue;if(l){var h=n.join("$");a.pathCacheKey&&a.pathCacheKey===h?(i=t=a.pathCache,s=!0):(i=t=new Path2D,a.pathCacheKey=h,a.pathCache=i)}if(o.setLineDash)switch(r){case"dotted":o.setLineDash([1,1]);break;case"dashed":o.setLineDash(u),o.lineDashOffset=c;break;case"solid":o.setLineDash([])}if(!s&&!a.badLine)switch(t.beginPath&&t.beginPath(),t.moveTo(n[0],n[1]),a.edgeType){case"bezier":case"self":case"compound":case"multibezier":for(var p=2;p+35&&void 0!==arguments[5]?arguments[5]:5,o=arguments.length>6?arguments[6]:void 0;e.beginPath(),e.moveTo(t+a,n),e.lineTo(t+r-a,n),e.quadraticCurveTo(t+r,n,t+r,n+a),e.lineTo(t+r,n+i-a),e.quadraticCurveTo(t+r,n+i,t+r-a,n+i),e.lineTo(t+a,n+i),e.quadraticCurveTo(t,n+i,t,n+i-a),e.lineTo(t,n+a),e.quadraticCurveTo(t,n,t+a,n),e.closePath(),o?e.stroke():e.fill()}fc.eleTextBiggerThanMin=function(e,t){if(!t){var n=e.cy().zoom(),r=this.getPixelRatio(),i=Math.ceil(St(n*r));t=Math.pow(2,i)}return!(e.pstyle("font-size").pfValue*t5&&void 0!==arguments[5])||arguments[5],o=this;if(null==r){if(a&&!o.eleTextBiggerThanMin(t))return}else if(!1===r)return;if(t.isNode()){var s=t.pstyle("label");if(!s||!s.value)return;var l=o.getLabelJustification(t);e.textAlign=l,e.textBaseline="bottom"}else{var u=t.element()._private.rscratch.badLine,c=t.pstyle("label"),h=t.pstyle("source-label"),d=t.pstyle("target-label");if(u||(!c||!c.value)&&(!h||!h.value)&&(!d||!d.value))return;e.textAlign="center",e.textBaseline="bottom"}var p,g=!n;n&&(p=n,e.translate(-p.x1,-p.y1)),null==i?(o.drawText(e,t,null,g,a),t.isEdge()&&(o.drawText(e,t,"source",g,a),o.drawText(e,t,"target",g,a))):o.drawText(e,t,i,g,a),n&&e.translate(p.x1,p.y1)},fc.getFontCache=function(e){var t;this.fontCaches=this.fontCaches||[];for(var n=0;n2&&void 0!==arguments[2])||arguments[2],r=t.pstyle("font-style").strValue,i=t.pstyle("font-size").pfValue+"px",a=t.pstyle("font-family").strValue,o=t.pstyle("font-weight").strValue,s=n?t.effectiveOpacity()*t.pstyle("text-opacity").value:1,l=t.pstyle("text-outline-opacity").value*s,u=t.pstyle("color").value,c=t.pstyle("text-outline-color").value;e.font=r+" "+o+" "+i+" "+a,e.lineJoin="round",this.colorFillStyle(e,u[0],u[1],u[2],s),this.colorStrokeStyle(e,c[0],c[1],c[2],l)},fc.getTextAngle=function(e,t){var n=e._private.rscratch,r=t?t+"-":"",i=e.pstyle(r+"text-rotation"),a=it(n,"labelAngle",t);return"autorotate"===i.strValue?e.isEdge()?a:0:"none"===i.strValue?0:i.pfValue},fc.drawText=function(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=t._private.rscratch,o=i?t.effectiveOpacity():1;if(!i||0!==o&&0!==t.pstyle("text-opacity").value){"main"===n&&(n=null);var s,l,u=it(a,"labelX",n),c=it(a,"labelY",n),h=this.getLabelText(t,n);if(null!=h&&""!==h&&!isNaN(u)&&!isNaN(c)){this.setupTextStyle(e,t,i);var d,p=n?n+"-":"",g=it(a,"labelWidth",n),f=it(a,"labelHeight",n),v=t.pstyle(p+"text-margin-x").pfValue,y=t.pstyle(p+"text-margin-y").pfValue,m=t.isEdge(),b=t.pstyle("text-halign").value,x=t.pstyle("text-valign").value;switch(m&&(b="center",x="center"),u+=v,c+=y,0!==(d=r?this.getTextAngle(t,n):0)&&(s=u,l=c,e.translate(s,l),e.rotate(d),u=0,c=0),x){case"top":break;case"center":c+=f/2;break;case"bottom":c+=f}var w=t.pstyle("text-background-opacity").value,E=t.pstyle("text-border-opacity").value,_=t.pstyle("text-border-width").pfValue,T=t.pstyle("text-background-padding").pfValue,D=0===t.pstyle("text-background-shape").strValue.indexOf("round");if(w>0||_>0&&E>0){var C=u-T;switch(b){case"left":C-=g;break;case"center":C-=g/2}var N=c-f-T,A=g+2*T,L=f+2*T;if(w>0){var k=e.fillStyle,S=t.pstyle("text-background-color").value;e.fillStyle="rgba("+S[0]+","+S[1]+","+S[2]+","+w*o+")",D?vc(e,C,N,A,L,2):e.fillRect(C,N,A,L),e.fillStyle=k}if(_>0&&E>0){var M=e.strokeStyle,I=e.lineWidth,O=t.pstyle("text-border-color").value,P=t.pstyle("text-border-style").value;if(e.strokeStyle="rgba("+O[0]+","+O[1]+","+O[2]+","+E*o+")",e.lineWidth=_,e.setLineDash)switch(P){case"dotted":e.setLineDash([1,1]);break;case"dashed":e.setLineDash([4,2]);break;case"double":e.lineWidth=_/4,e.setLineDash([]);break;case"solid":e.setLineDash([])}if(D?vc(e,C,N,A,L,2,"stroke"):e.strokeRect(C,N,A,L),"double"===P){var R=_/2;D?vc(e,C+R,N+R,A-2*R,L-2*R,2,"stroke"):e.strokeRect(C+R,N+R,A-2*R,L-2*R)}e.setLineDash&&e.setLineDash([]),e.lineWidth=I,e.strokeStyle=M}}var B=2*t.pstyle("text-outline-width").pfValue;if(B>0&&(e.lineWidth=B),"wrap"===t.pstyle("text-wrap").value){var F=it(a,"labelWrapCachedLines",n),z=it(a,"labelLineHeight",n),G=g/2,Y=this.getLabelJustification(t);switch("auto"===Y||("left"===b?"left"===Y?u+=-g:"center"===Y&&(u+=-G):"center"===b?"left"===Y?u+=-G:"right"===Y&&(u+=G):"right"===b&&("center"===Y?u+=G:"right"===Y&&(u+=g))),x){case"top":case"center":case"bottom":c-=(F.length-1)*z}for(var V=0;V0&&e.strokeText(F[V],u,c),e.fillText(F[V],u,c),c+=z}else B>0&&e.strokeText(h,u,c),e.fillText(h,u,c);0!==d&&(e.rotate(-d),e.translate(-s,-l))}}};var yc={drawNode:function(e,t,n){var r,i,a=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],s=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],l=this,u=t._private,c=u.rscratch,h=t.position();if(T(h.x)&&T(h.y)&&(!s||t.visible())){var d,p,g=s?t.effectiveOpacity():1,f=l.usePaths(),v=!1,y=t.padding();r=t.width()+2*y,i=t.height()+2*y,n&&(p=n,e.translate(-p.x1,-p.y1));for(var m=t.pstyle("background-image").value,b=new Array(m.length),x=new Array(m.length),w=0,E=0;E0&&void 0!==arguments[0]?arguments[0]:A;l.eleFillStyle(e,t,n)},U=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:R;l.colorStrokeStyle(e,L[0],L[1],L[2],t)},j=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:G;l.colorStrokeStyle(e,F[0],F[1],F[2],t)},q=function(e,t,n,r){var i,a=l.nodePathCache=l.nodePathCache||[],o=Fe("polygon"===n?n+","+r.join(","):n,""+t,""+e,""+V),s=a[o],u=!1;return null!=s?(i=s,u=!0,c.pathCache=i):(i=new Path2D,a[o]=c.pathCache=i),{path:i,cacheHit:u}},H=t.pstyle("shape").strValue,W=t.pstyle("shape-polygon-points").pfValue;if(f){e.translate(h.x,h.y);var $=q(r,i,H,W);d=$.path,v=$.cacheHit}var K=function(){if(!v){var n=h;f&&(n={x:0,y:0}),l.nodeShapes[l.getNodeShape(t)].draw(d||e,n.x,n.y,r,i,V,c)}f?e.fill(d):e.fill()},Z=function(){for(var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=u.backgrounding,a=0,o=0;o0&&void 0!==arguments[0]&&arguments[0],a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:g;l.hasPie(t)&&(l.drawPie(e,t,a),n&&(f||l.nodeShapes[l.getNodeShape(t)].draw(e,h.x,h.y,r,i,V,c)))},J=function(){var t=(C>0?C:-C)*(arguments.length>0&&void 0!==arguments[0]?arguments[0]:g),n=C>0?0:255;0!==C&&(l.colorFillStyle(e,n,n,n,t),f?e.fill(d):e.fill())},ee=function(){if(N>0){if(e.lineWidth=N,e.lineCap=M,e.lineJoin=S,e.setLineDash)switch(k){case"dotted":e.setLineDash([1,1]);break;case"dashed":e.setLineDash(O),e.lineDashOffset=P;break;case"solid":case"double":e.setLineDash([])}if("center"!==I){if(e.save(),e.lineWidth*=2,"inside"===I)f?e.clip(d):e.clip();else{var t=new Path2D;t.rect(-r/2-N,-i/2-N,r+2*N,i+2*N),t.addPath(d),e.clip(t,"evenodd")}f?e.stroke(d):e.stroke(),e.restore()}else f?e.stroke(d):e.stroke();if("double"===k){e.lineWidth=N/3;var n=e.globalCompositeOperation;e.globalCompositeOperation="destination-out",f?e.stroke(d):e.stroke(),e.globalCompositeOperation=n}e.setLineDash&&e.setLineDash([])}},te=function(){if(B>0){if(e.lineWidth=B,e.lineCap="butt",e.setLineDash)switch(z){case"dotted":e.setLineDash([1,1]);break;case"dashed":e.setLineDash([4,2]);break;case"solid":case"double":e.setLineDash([])}var n=h;f&&(n={x:0,y:0});var a=l.getNodeShape(t),o=N;"inside"===I&&(o=0),"outside"===I&&(o*=2);var s,u=(r+o+(B+Y))/r,c=(i+o+(B+Y))/i,d=r*u,p=i*c,g=l.nodeShapes[a].points;if(f)s=q(d,p,a,g).path;if("ellipse"===a)l.drawEllipsePath(s||e,n.x,n.y,d,p);else if(["round-diamond","round-heptagon","round-hexagon","round-octagon","round-pentagon","round-polygon","round-triangle","round-tag"].includes(a)){var v=0,y=0,m=0;"round-diamond"===a?v=1.4*(o+Y+B):"round-heptagon"===a?(v=1.075*(o+Y+B),m=-(o/2+Y+B)/35):"round-hexagon"===a?v=1.12*(o+Y+B):"round-pentagon"===a?(v=1.13*(o+Y+B),m=-(o/2+Y+B)/15):"round-tag"===a?(v=1.12*(o+Y+B),y=.07*(o/2+B+Y)):"round-triangle"===a&&(v=(o+Y+B)*(Math.PI/2),m=-(o+Y/2+B)/Math.PI),0!==v&&(d=r*(u=(r+v)/r),["round-hexagon","round-tag"].includes(a)||(p=i*(c=(i+v)/i)));for(var b=d/2,x=p/2,w=(V="auto"===V?gn(d,p):V)+(o+B+Y)/2,E=new Array(g.length/2),_=new Array(g.length/2),T=0;T0){if(r=r||n.position(),null==i||null==a){var h=n.padding();i=n.width()+2*h,a=n.height()+2*h}this.colorFillStyle(t,l[0],l[1],l[2],s),this.nodeShapes[u].draw(t,r.x,r.y,i+2*o,a+2*o,c),t.fill()}}}};yc.drawNodeOverlay=mc("overlay"),yc.drawNodeUnderlay=mc("underlay"),yc.hasPie=function(e){return(e=e[0])._private.hasPie},yc.drawPie=function(e,t,n,r){t=t[0],r=r||t.position();var i=t.cy().style(),a=t.pstyle("pie-size"),o=r.x,s=r.y,l=t.width(),u=t.height(),c=Math.min(l,u)/2,h=0;this.usePaths()&&(o=0,s=0),"%"===a.units?c*=a.pfValue:void 0!==a.pfValue&&(c=a.pfValue/2);for(var d=1;d<=i.pieBackgroundN;d++){var p=t.pstyle("pie-"+d+"-background-size").value,g=t.pstyle("pie-"+d+"-background-color").value,f=t.pstyle("pie-"+d+"-background-opacity").value*n,v=p/100;v+h>1&&(v=1-h);var y=1.5*Math.PI+2*Math.PI*h,m=y+2*Math.PI*v;0===p||h>=1||h+v>1||(e.beginPath(),e.moveTo(o,s),e.arc(o,s,c,y,m),e.closePath(),this.colorFillStyle(e,g[0],g[1],g[2],f),e.fill(),h+=v)}};var bc={};bc.getPixelRatio=function(){var e=this.data.contexts[0];if(null!=this.forcedPixelRatio)return this.forcedPixelRatio;var t=this.cy.window(),n=e.backingStorePixelRatio||e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return(t.devicePixelRatio||1)/n},bc.paintCache=function(e){for(var t,n=this.paintCaches=this.paintCaches||[],r=!0,i=0;io.minMbLowQualFrames&&(o.motionBlurPxRatio=o.mbPxRBlurry)),o.clearingMotionBlur&&(o.motionBlurPxRatio=1),o.textureDrawLastFrame&&!h&&(c[o.NODE]=!0,c[o.SELECT_BOX]=!0);var m=l.style(),b=l.zoom(),x=void 0!==i?i:b,w=l.pan(),E={x:w.x,y:w.y},_={zoom:b,pan:{x:w.x,y:w.y}},T=o.prevViewport;void 0===T||_.zoom!==T.zoom||_.pan.x!==T.pan.x||_.pan.y!==T.pan.y||f&&!g||(o.motionBlurPxRatio=1),a&&(E=a),x*=s,E.x*=s,E.y*=s;var D=o.getCachedZSortedEles();function C(e,t,n,r,i){var a=e.globalCompositeOperation;e.globalCompositeOperation="destination-out",o.colorFillStyle(e,255,255,255,o.motionBlurTransparency),e.fillRect(t,n,r,i),e.globalCompositeOperation=a}function N(e,r){var s,l,c,h;o.clearingMotionBlur||e!==u.bufferContexts[o.MOTIONBLUR_BUFFER_NODE]&&e!==u.bufferContexts[o.MOTIONBLUR_BUFFER_DRAG]?(s=E,l=x,c=o.canvasWidth,h=o.canvasHeight):(s={x:w.x*p,y:w.y*p},l=b*p,c=o.canvasWidth*p,h=o.canvasHeight*p),e.setTransform(1,0,0,1,0,0),"motionBlur"===r?C(e,0,0,c,h):t||void 0!==r&&!r||e.clearRect(0,0,c,h),n||(e.translate(s.x,s.y),e.scale(l,l)),a&&e.translate(a.x,a.y),i&&e.scale(i,i)}if(h||(o.textureDrawLastFrame=!1),h){if(o.textureDrawLastFrame=!0,!o.textureCache){o.textureCache={},o.textureCache.bb=l.mutableElements().boundingBox(),o.textureCache.texture=o.data.bufferCanvases[o.TEXTURE_BUFFER];var A=o.data.bufferContexts[o.TEXTURE_BUFFER];A.setTransform(1,0,0,1,0,0),A.clearRect(0,0,o.canvasWidth*o.textureMult,o.canvasHeight*o.textureMult),o.render({forcedContext:A,drawOnlyNodeLayer:!0,forcedPxRatio:s*o.textureMult}),(_=o.textureCache.viewport={zoom:l.zoom(),pan:l.pan(),width:o.canvasWidth,height:o.canvasHeight}).mpan={x:(0-_.pan.x)/_.zoom,y:(0-_.pan.y)/_.zoom}}c[o.DRAG]=!1,c[o.NODE]=!1;var L=u.contexts[o.NODE],k=o.textureCache.texture;_=o.textureCache.viewport;L.setTransform(1,0,0,1,0,0),d?C(L,0,0,_.width,_.height):L.clearRect(0,0,_.width,_.height);var S=m.core("outside-texture-bg-color").value,M=m.core("outside-texture-bg-opacity").value;o.colorFillStyle(L,S[0],S[1],S[2],M),L.fillRect(0,0,_.width,_.height);b=l.zoom();N(L,!1),L.clearRect(_.mpan.x,_.mpan.y,_.width/_.zoom/s,_.height/_.zoom/s),L.drawImage(k,_.mpan.x,_.mpan.y,_.width/_.zoom/s,_.height/_.zoom/s)}else o.textureOnViewport&&!t&&(o.textureCache=null);var I=l.extent(),O=o.pinching||o.hoverData.dragging||o.swipePanning||o.data.wheelZooming||o.hoverData.draggingEles||o.cy.animated(),P=o.hideEdgesOnViewport&&O,R=[];if(R[o.NODE]=!c[o.NODE]&&d&&!o.clearedForMotionBlur[o.NODE]||o.clearingMotionBlur,R[o.NODE]&&(o.clearedForMotionBlur[o.NODE]=!0),R[o.DRAG]=!c[o.DRAG]&&d&&!o.clearedForMotionBlur[o.DRAG]||o.clearingMotionBlur,R[o.DRAG]&&(o.clearedForMotionBlur[o.DRAG]=!0),c[o.NODE]||n||r||R[o.NODE]){var B=d&&!R[o.NODE]&&1!==p;N(L=t||(B?o.data.bufferContexts[o.MOTIONBLUR_BUFFER_NODE]:u.contexts[o.NODE]),d&&!B?"motionBlur":void 0),P?o.drawCachedNodes(L,D.nondrag,s,I):o.drawLayeredElements(L,D.nondrag,s,I),o.debug&&o.drawDebugPoints(L,D.nondrag),n||d||(c[o.NODE]=!1)}if(!r&&(c[o.DRAG]||n||R[o.DRAG])){B=d&&!R[o.DRAG]&&1!==p;N(L=t||(B?o.data.bufferContexts[o.MOTIONBLUR_BUFFER_DRAG]:u.contexts[o.DRAG]),d&&!B?"motionBlur":void 0),P?o.drawCachedNodes(L,D.drag,s,I):o.drawCachedElements(L,D.drag,s,I),o.debug&&o.drawDebugPoints(L,D.drag),n||d||(c[o.DRAG]=!1)}if(o.showFps||!r&&c[o.SELECT_BOX]&&!n){if(N(L=t||u.contexts[o.SELECT_BOX]),1==o.selection[4]&&(o.hoverData.selecting||o.touchData.selecting)){b=o.cy.zoom();var F=m.core("selection-box-border-width").value/b;L.lineWidth=F,L.fillStyle="rgba("+m.core("selection-box-color").value[0]+","+m.core("selection-box-color").value[1]+","+m.core("selection-box-color").value[2]+","+m.core("selection-box-opacity").value+")",L.fillRect(o.selection[0],o.selection[1],o.selection[2]-o.selection[0],o.selection[3]-o.selection[1]),F>0&&(L.strokeStyle="rgba("+m.core("selection-box-border-color").value[0]+","+m.core("selection-box-border-color").value[1]+","+m.core("selection-box-border-color").value[2]+","+m.core("selection-box-opacity").value+")",L.strokeRect(o.selection[0],o.selection[1],o.selection[2]-o.selection[0],o.selection[3]-o.selection[1]))}if(u.bgActivePosistion&&!o.hoverData.selecting){b=o.cy.zoom();var z=u.bgActivePosistion;L.fillStyle="rgba("+m.core("active-bg-color").value[0]+","+m.core("active-bg-color").value[1]+","+m.core("active-bg-color").value[2]+","+m.core("active-bg-opacity").value+")",L.beginPath(),L.arc(z.x,z.y,m.core("active-bg-size").pfValue/b,0,2*Math.PI),L.fill()}var G=o.lastRedrawTime;if(o.showFps&&G){G=Math.round(G);var Y=Math.round(1e3/G);L.setTransform(1,0,0,1,0,0),L.fillStyle="rgba(255, 0, 0, 0.75)",L.strokeStyle="rgba(255, 0, 0, 0.75)",L.lineWidth=1,L.fillText("1 frame = "+G+" ms = "+Y+" fps",0,20);L.strokeRect(0,30,250,20),L.fillRect(0,30,250*Math.min(Y/60,1),20)}n||(c[o.SELECT_BOX]=!1)}if(d&&1!==p){var V=u.contexts[o.NODE],X=o.data.bufferCanvases[o.MOTIONBLUR_BUFFER_NODE],U=u.contexts[o.DRAG],j=o.data.bufferCanvases[o.MOTIONBLUR_BUFFER_DRAG],q=function(e,t,n){e.setTransform(1,0,0,1,0,0),n||!y?e.clearRect(0,0,o.canvasWidth,o.canvasHeight):C(e,0,0,o.canvasWidth,o.canvasHeight);var r=p;e.drawImage(t,0,0,o.canvasWidth*r,o.canvasHeight*r,0,0,o.canvasWidth,o.canvasHeight)};(c[o.NODE]||R[o.NODE])&&(q(V,X,R[o.NODE]),c[o.NODE]=!1),(c[o.DRAG]||R[o.DRAG])&&(q(U,j,R[o.DRAG]),c[o.DRAG]=!1)}o.prevViewport=_,o.clearingMotionBlur&&(o.clearingMotionBlur=!1,o.motionBlurCleared=!0,o.motionBlur=!0),d&&(o.motionBlurTimeout=setTimeout((function(){o.motionBlurTimeout=null,o.clearedForMotionBlur[o.NODE]=!1,o.clearedForMotionBlur[o.DRAG]=!1,o.motionBlur=!1,o.clearingMotionBlur=!h,o.mbFrames=0,c[o.NODE]=!0,c[o.DRAG]=!0,o.redraw()}),100)),t||l.emit("render")};for(var xc={drawPolygonPath:function(e,t,n,r,i,a){var o=r/2,s=i/2;e.beginPath&&e.beginPath(),e.moveTo(t+o*a[0],n+s*a[1]);for(var l=1;l0&&a>0){d.clearRect(0,0,i,a),d.globalCompositeOperation="source-over";var p=this.getCachedZSortedEles();if(e.full)d.translate(-n.x1*l,-n.y1*l),d.scale(l,l),this.drawElements(d,p),d.scale(1/l,1/l),d.translate(n.x1*l,n.y1*l);else{var g=t.pan(),f={x:g.x*l,y:g.y*l};l*=t.zoom(),d.translate(f.x,f.y),d.scale(l,l),this.drawElements(d,p),d.scale(1/l,1/l),d.translate(-f.x,-f.y)}e.bg&&(d.globalCompositeOperation="destination-over",d.fillStyle=e.bg,d.rect(0,0,i,a),d.fill())}return h},Nc.png=function(e){return Lc(e,this.bufferCanvasImage(e),"image/png")},Nc.jpg=function(e){return Lc(e,this.bufferCanvasImage(e),"image/jpeg")};var kc={nodeShapeImpl:function(e,t,n,r,i,a,o,s){switch(e){case"ellipse":return this.drawEllipsePath(t,n,r,i,a);case"polygon":return this.drawPolygonPath(t,n,r,i,a,o);case"round-polygon":return this.drawRoundPolygonPath(t,n,r,i,a,o,s);case"roundrectangle":case"round-rectangle":return this.drawRoundRectanglePath(t,n,r,i,a,s);case"cutrectangle":case"cut-rectangle":return this.drawCutRectanglePath(t,n,r,i,a,o,s);case"bottomroundrectangle":case"bottom-round-rectangle":return this.drawBottomRoundRectanglePath(t,n,r,i,a,s);case"barrel":return this.drawBarrelPath(t,n,r,i,a)}}},Sc=Ic,Mc=Ic.prototype;function Ic(e){var t=this,n=t.cy.window().document;t.data={canvases:new Array(Mc.CANVAS_LAYERS),contexts:new Array(Mc.CANVAS_LAYERS),canvasNeedsRedraw:new Array(Mc.CANVAS_LAYERS),bufferCanvases:new Array(Mc.BUFFER_COUNT),bufferContexts:new Array(Mc.CANVAS_LAYERS)};var r="-webkit-tap-highlight-color",i="rgba(0,0,0,0)";t.data.canvasContainer=n.createElement("div");var a=t.data.canvasContainer.style;t.data.canvasContainer.style[r]=i,a.position="relative",a.zIndex="0",a.overflow="hidden";var o=e.cy.container();o.appendChild(t.data.canvasContainer),o.style[r]=i;var s={"-webkit-user-select":"none","-moz-user-select":"-moz-none","user-select":"none","-webkit-tap-highlight-color":"rgba(0,0,0,0)","outline-style":"none"};g&&g.userAgent.match(/msie|trident|edge/i)&&(s["-ms-touch-action"]="none",s["touch-action"]="none");for(var l=0;l2&&_.push("'"+this.terminals_[x]+"'");C=h.showPosition?"Parse error on line "+(l+1)+":\n"+h.showPosition()+"\nExpecting "+_.join(", ")+", got '"+(this.terminals_[v]||v)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==v?"end of input":"'"+(this.terminals_[v]||v)+"'"),this.parseError(C,{text:h.match,token:this.terminals_[v]||v,line:h.yylineno,loc:g,expected:_})}if(m[0]instanceof Array&&m.length>1)throw new Error("Parse Error: multiple actions possible at state: "+y+", token: "+v);switch(m[0]){case 1:n.push(v),i.push(h.yytext),a.push(h.yylloc),n.push(m[1]),v=null,u=h.yyleng,s=h.yytext,l=h.yylineno,g=h.yylloc;break;case 2:if(w=this.productions_[m[1]][1],D.$=i[i.length-w],D._$={first_line:a[a.length-(w||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(w||1)].first_column,last_column:a[a.length-1].last_column},f&&(D._$.range=[a[a.length-(w||1)].range[0],a[a.length-1].range[1]]),void 0!==(b=this.performAction.apply(D,[s,u,l,d.yy,m[1],i,a].concat(c))))return b;w&&(n=n.slice(0,-1*w*2),i=i.slice(0,-1*w),a=a.slice(0,-1*w)),n.push(this.productions_[m[1]][0]),i.push(D.$),a.push(D._$),E=o[n[n.length-2]][n[n.length-1]],n.push(E);break;case 3:return!0}}return!0}},b=(e={EOF:1,parseError:function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},setInput:function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},unput:function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(e){this.unput(this.match.slice(e))},pastInput:function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},test_match:function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var e,t,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;at[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(n,i[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,i[r]))&&e:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var e=this.next();return e||this.lex()},begin:function(e){this.conditionStack.push(e)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(e){return(e=this.conditionStack.length-1-Math.abs(e||0))>=0?this.conditionStack[e]:"INITIAL"},pushState:function(e){this.begin(e)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(e,t,n,r){switch(n){case 0:return e.getLogger().trace("Found comment",t.yytext),6;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;case 4:case 23:case 26:this.popState();break;case 5:e.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return e.getLogger().trace("SPACELINE"),6;case 7:return 7;case 8:return 15;case 9:e.getLogger().trace("end icon"),this.popState();break;case 10:return e.getLogger().trace("Exploding node"),this.begin("NODE"),19;case 11:return e.getLogger().trace("Cloud"),this.begin("NODE"),19;case 12:return e.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;case 13:return e.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;case 14:case 15:case 16:case 17:return this.begin("NODE"),19;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 24:e.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return e.getLogger().trace("description:",t.yytext),"NODE_DESCR";case 27:return this.popState(),e.getLogger().trace("node end ))"),"NODE_DEND";case 28:return this.popState(),e.getLogger().trace("node end )"),"NODE_DEND";case 29:return this.popState(),e.getLogger().trace("node end ...",t.yytext),"NODE_DEND";case 30:case 33:case 34:return this.popState(),e.getLogger().trace("node end (("),"NODE_DEND";case 31:case 32:return this.popState(),e.getLogger().trace("node end (-"),"NODE_DEND";case 35:case 36:return e.getLogger().trace("Long description:",t.yytext),20}},rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}},e);function x(){this.yy={}}return m.lexer=b,x.prototype=m,m.Parser=x,new x}());Qc.parser=Qc;const Jc=Qc;let eh=[],th=0,nh={};const rh={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},ih={clear:()=>{eh=[],th=0,nh={}},addNode:(e,t,n,i)=>{var a,o;r.l.info("addNode",e,t,n,i);const s=(0,r.c)();let l=(null==(a=s.mindmap)?void 0:a.padding)??r.B.mindmap.padding;switch(i){case rh.ROUNDED_RECT:case rh.RECT:case rh.HEXAGON:l*=2}const u={id:th++,nodeId:(0,r.d)(t,s),level:e,descr:(0,r.d)(n,s),type:i,children:[],width:(null==(o=s.mindmap)?void 0:o.maxNodeWidth)??r.B.mindmap.maxNodeWidth,padding:l},c=function(e){for(let t=eh.length-1;t>=0;t--)if(eh[t].leveleh.length>0?eh[0]:null,nodeType:rh,getType:(e,t)=>{switch(r.l.debug("In get type",e,t),e){case"[":return rh.RECT;case"(":return")"===t?rh.ROUNDED_RECT:rh.CLOUD;case"((":return rh.CIRCLE;case")":return rh.CLOUD;case"))":return rh.BANG;case"{{":return rh.HEXAGON;default:return rh.DEFAULT}},setElementForId:(e,t)=>{nh[e]=t},decorateNode:e=>{if(!e)return;const t=(0,r.c)(),n=eh[eh.length-1];e.icon&&(n.icon=(0,r.d)(e.icon,t)),e.class&&(n.class=(0,r.d)(e.class,t))},type2Str:e=>{switch(e){case rh.DEFAULT:return"no-border";case rh.RECT:return"rect";case rh.ROUNDED_RECT:return"rounded-rect";case rh.CIRCLE:return"circle";case rh.CLOUD:return"cloud";case rh.BANG:return"bang";case rh.HEXAGON:return"hexgon";default:return"no-border"}},getLogger:()=>r.l,getElementById:e=>nh[e]},ah=ih;function oh(e,t,n,i,a){!function(e,t,n,i,a){const o=a.htmlLabels,s=i%11,l=t.append("g");n.section=s;let u="section-"+s;s<0&&(u+=" section-root"),l.attr("class",(n.class?n.class+" ":"")+"mindmap-node "+u);const c=l.append("g"),h=l.append("g"),d=n.descr.replace(/()/g,"\n");(0,Wc.a)(h,d,{useHtmlLabels:o,width:n.width,classes:"mindmap-node-label"}),o||h.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle");const p=h.node().getBBox(),[g]=(0,r.D)(a.fontSize);if(n.height=p.height+1.1*g*.5+n.padding,n.width=p.width+2*n.padding,n.icon)if(n.type===e.nodeType.CIRCLE)n.height+=50,n.width+=50,l.append("foreignObject").attr("height","50px").attr("width",n.width).attr("style","text-align: center;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+s+" "+n.icon),h.attr("transform","translate("+n.width/2+", "+(n.height/2-1.5*n.padding)+")");else{n.width+=50;const e=n.height;n.height=Math.max(e,60);const t=Math.abs(n.height-e);l.append("foreignObject").attr("width","60px").attr("height",n.height).attr("style","text-align: center;margin-top:"+t/2+"px;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+s+" "+n.icon),h.attr("transform","translate("+(25+n.width/2)+", "+(t/2+n.padding/2)+")")}else if(o){const e=(n.width-p.width)/2,t=(n.height-p.height)/2;h.attr("transform","translate("+e+", "+t+")")}else{const e=n.width/2,t=n.padding/2;h.attr("transform","translate("+e+", "+t+")")}switch(n.type){case e.nodeType.DEFAULT:!function(e,t,n,r){t.append("path").attr("id","node-"+n.id).attr("class","node-bkg node-"+e.type2Str(n.type)).attr("d",`M0 ${n.height-5} v${10-n.height} q0,-5 5,-5 h${n.width-10} q5,0 5,5 v${n.height-5} H0 Z`),t.append("line").attr("class","node-line-"+r).attr("x1",0).attr("y1",n.height).attr("x2",n.width).attr("y2",n.height)}(e,c,n,s);break;case e.nodeType.ROUNDED_RECT:!function(e,t,n){t.append("rect").attr("id","node-"+n.id).attr("class","node-bkg node-"+e.type2Str(n.type)).attr("height",n.height).attr("rx",n.padding).attr("ry",n.padding).attr("width",n.width)}(e,c,n);break;case e.nodeType.RECT:!function(e,t,n){t.append("rect").attr("id","node-"+n.id).attr("class","node-bkg node-"+e.type2Str(n.type)).attr("height",n.height).attr("width",n.width)}(e,c,n);break;case e.nodeType.CIRCLE:c.attr("transform","translate("+n.width/2+", "+ +n.height/2+")"),function(e,t,n){t.append("circle").attr("id","node-"+n.id).attr("class","node-bkg node-"+e.type2Str(n.type)).attr("r",n.width/2)}(e,c,n);break;case e.nodeType.CLOUD:!function(e,t,n){const r=n.width,i=n.height,a=.15*r,o=.25*r,s=.35*r,l=.2*r;t.append("path").attr("id","node-"+n.id).attr("class","node-bkg node-"+e.type2Str(n.type)).attr("d",`M0 0 a${a},${a} 0 0,1 ${.25*r},${-1*r*.1}\n a${s},${s} 1 0,1 ${.4*r},${-1*r*.1}\n a${o},${o} 1 0,1 ${.35*r},${1*r*.2}\n\n a${a},${a} 1 0,1 ${.15*r},${1*i*.35}\n a${l},${l} 1 0,1 ${-1*r*.15},${1*i*.65}\n\n a${o},${a} 1 0,1 ${-1*r*.25},${.15*r}\n a${s},${s} 1 0,1 ${-1*r*.5},0\n a${a},${a} 1 0,1 ${-1*r*.25},${-1*r*.15}\n\n a${a},${a} 1 0,1 ${-1*r*.1},${-1*i*.35}\n a${l},${l} 1 0,1 ${.1*r},${-1*i*.65}\n\n H0 V0 Z`)}(e,c,n);break;case e.nodeType.BANG:!function(e,t,n){const r=n.width,i=n.height,a=.15*r;t.append("path").attr("id","node-"+n.id).attr("class","node-bkg node-"+e.type2Str(n.type)).attr("d",`M0 0 a${a},${a} 1 0,0 ${.25*r},${-1*i*.1}\n a${a},${a} 1 0,0 ${.25*r},0\n a${a},${a} 1 0,0 ${.25*r},0\n a${a},${a} 1 0,0 ${.25*r},${1*i*.1}\n\n a${a},${a} 1 0,0 ${.15*r},${1*i*.33}\n a${.8*a},${.8*a} 1 0,0 0,${1*i*.34}\n a${a},${a} 1 0,0 ${-1*r*.15},${1*i*.33}\n\n a${a},${a} 1 0,0 ${-1*r*.25},${.15*i}\n a${a},${a} 1 0,0 ${-1*r*.25},0\n a${a},${a} 1 0,0 ${-1*r*.25},0\n a${a},${a} 1 0,0 ${-1*r*.25},${-1*i*.15}\n\n a${a},${a} 1 0,0 ${-1*r*.1},${-1*i*.33}\n a${.8*a},${.8*a} 1 0,0 0,${-1*i*.34}\n a${a},${a} 1 0,0 ${.1*r},${-1*i*.33}\n\n H0 V0 Z`)}(e,c,n);break;case e.nodeType.HEXAGON:!function(e,t,n){const r=n.height,i=r/4,a=n.width-n.padding+2*i;!function(e,t,n,r,i){e.insert("polygon",":first-child").attr("points",r.map((function(e){return e.x+","+e.y})).join(" ")).attr("transform","translate("+(i.width-t)/2+", "+n+")")}(t,a,r,[{x:i,y:0},{x:a-i,y:0},{x:a,y:-r/2},{x:a-i,y:-r},{x:i,y:-r},{x:0,y:-r/2}],n)}(0,c,n)}e.setElementForId(n.id,l),n.height}(e,t,n,i,a),n.children&&n.children.forEach(((n,r)=>{oh(e,t,n,i<0?r:i,a)}))}function sh(e,t,n,r){t.add({group:"nodes",data:{id:e.id.toString(),labelText:e.descr,height:e.height,width:e.width,level:r,nodeId:e.id,padding:e.padding,type:e.type},position:{x:e.x,y:e.y}}),e.children&&e.children.forEach((i=>{sh(i,t,n,r+1),t.add({group:"edges",data:{id:`${e.id}_${i.id}`,source:e.id,target:i.id,depth:r,section:i.section}})}))}function lh(e,t){return new Promise((n=>{const i=(0,Hc.Ltv)("body").append("div").attr("id","cy").attr("style","display:none"),a=jc({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});i.remove(),sh(e,a,t,0),a.nodes().forEach((function(e){e.layoutDimensions=()=>{const t=e.data();return{w:t.width,h:t.height}}})),a.layout({name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1}).run(),a.ready((e=>{r.l.info("Ready",e),n(a)}))}))}jc.use(qc);const uh={draw:async(e,t,n,i)=>{var a,o;r.l.debug("Rendering mindmap diagram\n"+e);const s=i.db,l=s.getMindmap();if(!l)return;const u=(0,r.c)();u.htmlLabels=!1;const c=(0,r.A)(t),h=c.append("g");h.attr("class","mindmap-edges");const d=c.append("g");d.attr("class","mindmap-nodes"),oh(s,d,l,-1,u);const p=await lh(l,u);!function(e,t){t.edges().map(((t,n)=>{const i=t.data();if(t[0]._private.bodyBounds){const a=t[0]._private.rscratch;r.l.trace("Edge: ",n,i),e.insert("path").attr("d",`M ${a.startX},${a.startY} L ${a.midX},${a.midY} L${a.endX},${a.endY} `).attr("class","edge section-edge-"+i.section+" edge-depth-"+i.depth)}}))}(h,p),function(e,t){t.nodes().map(((t,n)=>{const i=t.data();i.x=t.position().x,i.y=t.position().y,function(e,t){const n=e.getElementById(t.id),r=t.x||0,i=t.y||0;n.attr("transform","translate("+r+","+i+")")}(e,i);const a=e.getElementById(i.nodeId);r.l.info("Id:",n,"Position: (",t.position().x,", ",t.position().y,")",i),a.attr("transform",`translate(${t.position().x-i.width/2}, ${t.position().y-i.height/2})`),a.attr("attr",`apa-${n})`)}))}(s,p),(0,r.o)(void 0,c,(null==(a=u.mindmap)?void 0:a.padding)??r.B.mindmap.padding,(null==(o=u.mindmap)?void 0:o.useMaxWidth)??r.B.mindmap.useMaxWidth)}},ch=e=>`\n .edge {\n stroke-width: 3;\n }\n ${(e=>{let t="";for(let n=0;n{s.r(t),s.d(t,{assets:()=>i,contentTitle:()=>r,default:()=>h,frontMatter:()=>n,metadata:()=>d,toc:()=>c});var o=s(74848),a=s(28453);const n={id:"project-dashboards",title:"Project Dashboards",sidebar_label:"Project Dashboards",description:"A list of dashboards about some of the interesting projects in the Polkadot ecosystem.",keywords:["polkadot","dashboard","dune","sql","dunesql"],slug:"../project-dashboards"},r="Project Dashboards",d={id:"general/dune-analytics/project-dashboards",title:"Project Dashboards",description:"A list of dashboards about some of the interesting projects in the Polkadot ecosystem.",source:"@site/../docs/general/dune-analytics/project-dashboards.md",sourceDirName:"general/dune-analytics",slug:"/general/project-dashboards",permalink:"/docs/general/project-dashboards",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/project-dashboards.md",tags:[],version:"current",lastUpdatedBy:"github-actions[bot]",lastUpdatedAt:1719817498e3,frontMatter:{id:"project-dashboards",title:"Project Dashboards",sidebar_label:"Project Dashboards",description:"A list of dashboards about some of the interesting projects in the Polkadot ecosystem.",keywords:["polkadot","dashboard","dune","sql","dunesql"],slug:"../project-dashboards"},sidebar:"docs",previous:{title:"Unique",permalink:"/docs/general/dune-analytics/unique-dashboards"},next:{title:"DuneSQL Cheatsheet",permalink:"/docs/general/dunesql-cheatsheet"}},i={},c=[];function l(e){const t={a:"a",h1:"h1",header:"header",li:"li",p:"p",ul:"ul",...(0,a.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.header,{children:(0,o.jsx)(t.h1,{id:"project-dashboards",children:"Project Dashboards"})}),"\n",(0,o.jsx)(t.p,{children:"This page contains a list of dashboards about some of the interesting projects in the Polkadot\necosystem. The dashboards are created using Dune Analytics and DuneSQL."}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.a,{href:"https://dune.com/substrate/polkadot-and-kusama-decentralized-voices",children:"Polkadot and Kusama Decentralized Voices"}),":\nThe Web3 Foundation has introduced the Decentralized Voices program for Polkadot and Kusama to\nenhance involvement in OpenGov. By delegating 180,000 KSM and 42 million DOT in voting power, the\nprogram aims to empower active voters in these ecosystems."]}),"\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.a,{href:"https://dune.com/substrate/jam-duna",children:"JAM DUNA"}),": The JAM DUNA aims to be decentralized\nunincorporated non-profit association with a community originating in Kusama+Polkadot. The initial\ngoal is set up the JAM DUNA as a Wyoming DUNA in July 2024. Wyoming DUNAs provide significant\nlegal advantages over DAOs, requiring a minimum 100 members."]}),"\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.a,{href:"https://dune.com/substrate/dotisded",children:"DED"}),": DED is a memecoin project originated in the DOT\ncommunity and developed by the DED Foundation"]}),"\n"]})]})}function h(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(l,{...e})}):l(e)}},28453:(e,t,s)=>{s.d(t,{R:()=>r,x:()=>d});var o=s(96540);const a={},n=o.createContext(a);function r(e){const t=o.useContext(n);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function d(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:r(e.components),o.createElement(n.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/497334c4.e3da6080.js b/assets/js/497334c4.e3da6080.js new file mode 100644 index 000000000000..37ce40575b48 --- /dev/null +++ b/assets/js/497334c4.e3da6080.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6736],{39084:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>i,contentTitle:()=>d,default:()=>h,frontMatter:()=>r,metadata:()=>a,toc:()=>c});const a=JSON.parse('{"id":"general/dune-analytics/project-dashboards","title":"Project Dashboards","description":"A list of dashboards about some of the interesting projects in the Polkadot ecosystem.","source":"@site/../docs/general/dune-analytics/project-dashboards.md","sourceDirName":"general/dune-analytics","slug":"/general/project-dashboards","permalink":"/docs/general/project-dashboards","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/project-dashboards.md","tags":[],"version":"current","lastUpdatedBy":"github-actions[bot]","lastUpdatedAt":1719817498000,"frontMatter":{"id":"project-dashboards","title":"Project Dashboards","sidebar_label":"Project Dashboards","description":"A list of dashboards about some of the interesting projects in the Polkadot ecosystem.","keywords":["polkadot","dashboard","dune","sql","dunesql"],"slug":"../project-dashboards"},"sidebar":"docs","previous":{"title":"Unique","permalink":"/docs/general/dune-analytics/unique-dashboards"},"next":{"title":"DuneSQL Cheatsheet","permalink":"/docs/general/dunesql-cheatsheet"}}');var o=s(74848),n=s(28453);const r={id:"project-dashboards",title:"Project Dashboards",sidebar_label:"Project Dashboards",description:"A list of dashboards about some of the interesting projects in the Polkadot ecosystem.",keywords:["polkadot","dashboard","dune","sql","dunesql"],slug:"../project-dashboards"},d="Project Dashboards",i={},c=[];function l(e){const t={a:"a",h1:"h1",header:"header",li:"li",p:"p",ul:"ul",...(0,n.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.header,{children:(0,o.jsx)(t.h1,{id:"project-dashboards",children:"Project Dashboards"})}),"\n",(0,o.jsx)(t.p,{children:"This page contains a list of dashboards about some of the interesting projects in the Polkadot\necosystem. The dashboards are created using Dune Analytics and DuneSQL."}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.a,{href:"https://dune.com/substrate/polkadot-and-kusama-decentralized-voices",children:"Polkadot and Kusama Decentralized Voices"}),":\nThe Web3 Foundation has introduced the Decentralized Voices program for Polkadot and Kusama to\nenhance involvement in OpenGov. By delegating 180,000 KSM and 42 million DOT in voting power, the\nprogram aims to empower active voters in these ecosystems."]}),"\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.a,{href:"https://dune.com/substrate/jam-duna",children:"JAM DUNA"}),": The JAM DUNA aims to be decentralized\nunincorporated non-profit association with a community originating in Kusama+Polkadot. The initial\ngoal is set up the JAM DUNA as a Wyoming DUNA in July 2024. Wyoming DUNAs provide significant\nlegal advantages over DAOs, requiring a minimum 100 members."]}),"\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.a,{href:"https://dune.com/substrate/dotisded",children:"DED"}),": DED is a memecoin project originated in the DOT\ncommunity and developed by the DED Foundation"]}),"\n"]})]})}function h(e={}){const{wrapper:t}={...(0,n.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(l,{...e})}):l(e)}},28453:(e,t,s)=>{s.d(t,{R:()=>r,x:()=>d});var a=s(96540);const o={},n=a.createContext(o);function r(e){const t=a.useContext(n);return a.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function d(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:r(e.components),a.createElement(n.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/49ea81bb.c63231aa.js b/assets/js/49ea81bb.c63231aa.js deleted file mode 100644 index 957a40971ed3..000000000000 --- a/assets/js/49ea81bb.c63231aa.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9233],{50803:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>d,contentTitle:()=>i,default:()=>c,frontMatter:()=>o,metadata:()=>r,toc:()=>h});var a=s(74848),n=s(28453);const o={id:"polkadot-dashboards-staking",title:"Polkadot Dashboards: Staking",sidebar_label:"Staking",description:"Dashboards offering insights into staking rewards, validator and nominator metrics, nomination pools, and pool member activities within the Polkadot network.",keywords:["polkadot","governance","staking","dashboard","dune"],slug:"../polkadot-dashboards-staking"},i="Polkadot Dashboards Staking",r={id:"general/dune-analytics/polkadot-dashboards/polkadot-dashboards-staking",title:"Polkadot Dashboards: Staking",description:"Dashboards offering insights into staking rewards, validator and nominator metrics, nomination pools, and pool member activities within the Polkadot network.",source:"@site/../docs/general/dune-analytics/polkadot-dashboards/polkadot-dashboards-staking.md",sourceDirName:"general/dune-analytics/polkadot-dashboards",slug:"/general/dune-analytics/polkadot-dashboards-staking",permalink:"/docs/general/dune-analytics/polkadot-dashboards-staking",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/polkadot-dashboards/polkadot-dashboards-staking.md",tags:[],version:"current",lastUpdatedBy:"MK",lastUpdatedAt:1719215716e3,frontMatter:{id:"polkadot-dashboards-staking",title:"Polkadot Dashboards: Staking",sidebar_label:"Staking",description:"Dashboards offering insights into staking rewards, validator and nominator metrics, nomination pools, and pool member activities within the Polkadot network.",keywords:["polkadot","governance","staking","dashboard","dune"],slug:"../polkadot-dashboards-staking"},sidebar:"docs",previous:{title:"Governance",permalink:"/docs/general/dune-analytics/polkadot-dashboards-governance"},next:{title:"Network",permalink:"/docs/general/dune-analytics/polkadot-dashboards-network"}},d={},h=[{value:"Overview",id:"overview",level:2},{value:"Polkadot Staking Dashboard",id:"polkadot-staking-dashboard",level:2},{value:"Completed Era",id:"completed-era",level:3},{value:"Reward Rate Math",id:"reward-rate-math",level:3},{value:"Staking Analytics",id:"staking-analytics",level:3},{value:"Polkadot Staking Dashboard (Validators)",id:"polkadot-staking-dashboard-validators",level:2},{value:"Polkadot Staking Rewards",id:"polkadot-staking-rewards",level:3},{value:"Polkadot Staking Dashboard (Nominators)",id:"polkadot-staking-dashboard-nominators",level:2},{value:"Polkadot Staking Dashboard (Nomination Pool)",id:"polkadot-staking-dashboard-nomination-pool",level:2},{value:"Polkadot Staking Dashboard (Pool Member)",id:"polkadot-staking-dashboard-pool-member",level:2}];function l(e){const t={a:"a",admonition:"admonition",code:"code",em:"em",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",strong:"strong",ul:"ul",...(0,n.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(t.header,{children:(0,a.jsx)(t.h1,{id:"polkadot-dashboards-staking",children:"Polkadot Dashboards Staking"})}),"\n",(0,a.jsx)(t.h2,{id:"overview",children:"Overview"}),"\n",(0,a.jsx)(t.p,{children:"This document demonstrated various Polkadot staking dashboards, offering insights into staking\nrewards, validator and nominator metrics, nomination pools, and pool member activities. These\ndashboards aim to provide a comprehensive view of staking dynamics within the Polkadot network."}),"\n",(0,a.jsxs)(t.p,{children:["Authored by ",(0,a.jsx)(t.a,{href:"https://x.com/colorfulnotion",children:(0,a.jsx)(t.strong,{children:"@ colorfulnotion"})})]}),"\n",(0,a.jsx)(t.h2,{id:"polkadot-staking-dashboard",children:"Polkadot Staking Dashboard"}),"\n",(0,a.jsxs)(t.p,{children:[(0,a.jsx)(t.strong,{children:"View On Dune:"})," ",(0,a.jsx)(t.a,{href:"https://dune.com/substrate/polkadot-staking",children:"Polkadot Staking Dashboard"})]}),"\n",(0,a.jsx)(t.h3,{id:"completed-era",children:"Completed Era"}),"\n",(0,a.jsx)(t.p,{children:"Completed eras can have at most a 2-day delay before the staking rewards & APY computation becomes\navailable. The Staking Home Page shows the most recently completed era."}),"\n",(0,a.jsx)(t.h3,{id:"reward-rate-math",children:"Reward Rate Math"}),"\n",(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.strong,{children:"Reward Rate"}),": (validator_erasRewardPoints / erasRewardPoints_total) * ErasValidatorReward /\nvalidator_total_stake."]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.strong,{children:"Effective Reward Rate"}),": (1 - validator_commission) * Reward Rate."]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.strong,{children:"Normalized Reward Rate"}),": total_era_rewards / number_of_validators * (1 - commission) /\nvalidator_total_stake."]}),"\n"]}),"\n",(0,a.jsxs)(t.p,{children:["Source Table: ",(0,a.jsx)(t.strong,{children:"polkadot.stakings"}),", MaterializedView:\n",(0,a.jsx)(t.a,{href:"https://dune.com/queries/3302709",children:(0,a.jsx)(t.strong,{children:"dune.substrate.result_polkadot_validators"})}),",\n",(0,a.jsx)(t.a,{href:"https://dune.com/queries/3326829",children:(0,a.jsx)(t.strong,{children:"dune.substrate.result_polkadot_nominators"})}),",\n",(0,a.jsx)(t.a,{href:"https://dune.com/queries/3327350",children:(0,a.jsx)(t.strong,{children:"dune.substrate.result_polkadot_nominationpools"})}),",\n",(0,a.jsx)(t.a,{href:"https://dune.com/queries/3327479",children:(0,a.jsx)(t.strong,{children:"dune.substrate.result_polkadot_poolmembers"})}),",\n",(0,a.jsx)(t.a,{href:"https://dune.com/queries/3420617",children:(0,a.jsx)(t.strong,{children:"dune.substrate.result_polkadot_identity"})})]}),"\n",(0,a.jsxs)(t.p,{children:[(0,a.jsx)(t.em,{children:"Github repo"}),": ",(0,a.jsx)(t.a,{href:"https://github.com/colorfulnotion/substrate-etl",children:(0,a.jsx)(t.em,{children:(0,a.jsx)(t.strong,{children:"substrate-etl"})})})]}),"\n",(0,a.jsx)(t.h3,{id:"staking-analytics",children:"Staking Analytics"}),"\n",(0,a.jsx)("iframe",{src:"https://dune.com/embeds/3335920/5589273/",height:"350",width:"100%"}),"\n",(0,a.jsx)("iframe",{src:"https://dune.com/embeds/3338274/5593554/",height:"350",width:"100%"}),"\n",(0,a.jsx)("iframe",{src:"https://dune.com/embeds/3345583/5606404/",height:"350",width:"100%"}),"\n",(0,a.jsx)("iframe",{src:"https://dune.com/embeds/3338274/5817115/",height:"350",width:"100%"}),"\n",(0,a.jsx)("iframe",{src:"https://dune.com/embeds/3334573/5586661/",height:"350",width:"100%"}),"\n",(0,a.jsx)("iframe",{src:"https://dune.com/embeds/3459220/5813496/",height:"350",width:"100%"}),"\n",(0,a.jsx)("iframe",{src:"https://dune.com/embeds/3302959/5531365/",height:"350",width:"100%"}),"\n",(0,a.jsx)("iframe",{src:"https://dune.com/embeds/3303032/5531577/",height:"350",width:"100%"}),"\n",(0,a.jsx)("iframe",{src:"https://dune.com/embeds/3459195/5813464/",height:"350",width:"100%"}),"\n",(0,a.jsx)("iframe",{src:"https://dune.com/embeds/3414552/5732594/",height:"350",width:"100%"}),"\n",(0,a.jsx)("iframe",{src:"https://dune.com/embeds/3334817/5603258/",height:"350",width:"100%"}),"\n",(0,a.jsx)("iframe",{src:"https://dune.com/embeds/3334817/5587364/",height:"350",width:"100%"}),"\n",(0,a.jsx)(t.h2,{id:"polkadot-staking-dashboard-validators",children:"Polkadot Staking Dashboard (Validators)"}),"\n",(0,a.jsxs)(t.p,{children:[(0,a.jsx)(t.strong,{children:"View On Dune:"}),"\n",(0,a.jsx)(t.a,{href:"https://dune.com/substrate/polkadot-staking-validators",children:"Polkadot Staking Dashboard (Validators)"})]}),"\n",(0,a.jsx)(t.h3,{id:"polkadot-staking-rewards",children:"Polkadot Staking Rewards"}),"\n",(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.strong,{children:"Reward Rate"}),": (validator_erasRewardPoints / erasRewardPoints_total) * ErasValidatorReward /\nvalidator_total_stake."]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.strong,{children:"Effective Reward Rate"}),": (1 - validator_commission) * Reward Rate."]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.strong,{children:"Normalized Reward Rate"}),": total_era_rewards / number_of_validators * (1 - commission) /\nvalidator_total_stake."]}),"\n"]}),"\n",(0,a.jsxs)(t.p,{children:["Source Table: ",(0,a.jsx)(t.strong,{children:"polkadot.stakings"}),", MaterializedView:\n",(0,a.jsx)(t.a,{href:"https://dune.com/queries/3302709",children:(0,a.jsx)(t.strong,{children:"dune.substrate.result_polkadot_validators"})})]}),"\n",(0,a.jsx)("iframe",{src:"https://dune.com/embeds/3459458/5813993/",height:"350",width:"100%"}),"\n",(0,a.jsx)("iframe",{src:"https://dune.com/embeds/3459458/5814228/",height:"350",width:"100%"}),"\n",(0,a.jsx)("iframe",{src:"https://dune.com/embeds/3459458/5814232/",height:"350",width:"100%"}),"\n",(0,a.jsx)("iframe",{src:"https://dune.com/embeds/3459458/5814240/",height:"350",width:"100%"}),"\n",(0,a.jsx)("iframe",{src:"https://dune.com/embeds/3459458/5814241/",height:"350",width:"100%"}),"\n",(0,a.jsx)("iframe",{src:"https://dune.com/embeds/3459458/5814242/",height:"350",width:"100%"}),"\n",(0,a.jsx)("iframe",{src:"https://dune.com/embeds/3459458/5814243/",height:"350",width:"100%"}),"\n",(0,a.jsx)("iframe",{src:"https://dune.com/embeds/3459458/5814244/",height:"350",width:"100%"}),"\n",(0,a.jsx)("iframe",{src:"https://dune.com/embeds/3459613/5814194/",height:"350",width:"100%"}),"\n",(0,a.jsx)(t.h2,{id:"polkadot-staking-dashboard-nominators",children:"Polkadot Staking Dashboard (Nominators)"}),"\n",(0,a.jsxs)(t.p,{children:[(0,a.jsx)(t.strong,{children:"View On Dune:"}),"\n",(0,a.jsx)(t.a,{href:"https://dune.com/substrate/polkadot-staking-nominators",children:"Polkadot Staking Dashboard (Nominators)"})]}),"\n",(0,a.jsx)(t.p,{children:"For a specific nominator, this dashboard shows:"}),"\n",(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsx)(t.li,{children:"Nominator Staking Rewards"}),"\n",(0,a.jsx)(t.li,{children:"Nominator Shares"}),"\n",(0,a.jsx)(t.li,{children:"Delegated Amount"}),"\n",(0,a.jsx)(t.li,{children:"Nominator Staking Rewards Raw Data"}),"\n"]}),"\n",(0,a.jsxs)(t.p,{children:["Source Table: ",(0,a.jsx)(t.strong,{children:"polkadot.stakings"}),", MaterializedView:\n",(0,a.jsx)(t.a,{href:"https://dune.com/queries/3326829",children:(0,a.jsx)(t.strong,{children:"dune.substrate.result_polkadot_nominators"})})]}),"\n",(0,a.jsx)(t.admonition,{type:"tip",children:(0,a.jsxs)(t.p,{children:[(0,a.jsx)(t.strong,{children:"Default parameters"})," are applied to all parameterized charts on this Wiki page as a demonstration.\nVisit our dashboard on Dune to use the ",(0,a.jsx)(t.code,{children:"nominator_ss58"})," parameter for more in-depth analysis. For\nmore information, please visit the\n",(0,a.jsx)(t.a,{href:"https://docs.dune.com/web-app/query-editor/parameters",children:"Dune documentation on parameters"}),"."]})}),"\n",(0,a.jsx)("iframe",{src:"https://dune.com/embeds/3343697/5602826/",height:"350",width:"100%"}),"\n",(0,a.jsx)("iframe",{src:"https://dune.com/embeds/3343697/5817852/",height:"350",width:"100%"}),"\n",(0,a.jsx)("iframe",{src:"https://dune.com/embeds/3459410/5813864/",height:"350",width:"100%"}),"\n",(0,a.jsx)("iframe",{src:"https://dune.com/embeds/3343697/5817857/",height:"350",width:"100%"}),"\n",(0,a.jsx)(t.h2,{id:"polkadot-staking-dashboard-nomination-pool",children:"Polkadot Staking Dashboard (Nomination Pool)"}),"\n",(0,a.jsxs)(t.p,{children:[(0,a.jsx)(t.strong,{children:"View On Dune:"}),"\n",(0,a.jsx)(t.a,{href:"https://dune.com/substrate/polkadot-staking-nomination-pool",children:"Polkadot Staking Dashboard (Nomination Pool)"})]}),"\n",(0,a.jsx)(t.p,{children:"For a specific nomination pool ID, this dashboard shows:"}),"\n",(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsx)(t.li,{children:"Pool Members"}),"\n",(0,a.jsx)(t.li,{children:"Historical APY, Daily Pool Rewards & Fees"}),"\n"]}),"\n",(0,a.jsx)(t.p,{children:"Raw data is presented at the bottom."}),"\n",(0,a.jsxs)(t.p,{children:["Source Table: ",(0,a.jsx)(t.strong,{children:"polkadot.stakings"}),", MaterializedView:\n",(0,a.jsx)(t.a,{href:"https://dune.com/queries/3327350",children:(0,a.jsx)(t.strong,{children:"dune.substrate.result_polkadot_nominationpools"})})]}),"\n",(0,a.jsx)(t.admonition,{type:"tip",children:(0,a.jsxs)(t.p,{children:[(0,a.jsx)(t.strong,{children:"Default parameters"})," are applied to all parameterized charts on this Wiki page as a demonstration.\nVisit our dashboard on Dune to use the ",(0,a.jsx)(t.code,{children:"pool_id"})," parameter for more in-depth analysis. For more\ninformation, please visit the\n",(0,a.jsx)(t.a,{href:"https://docs.dune.com/web-app/query-editor/parameters",children:"Dune documentation on parameters"}),"."]})}),"\n",(0,a.jsx)("iframe",{src:"https://dune.com/embeds/3343291/5817752/",height:"350",width:"100%"}),"\n",(0,a.jsx)("iframe",{src:"https://dune.com/embeds/3341534/5599076/",height:"350",width:"100%"}),"\n",(0,a.jsx)("iframe",{src:"https://dune.com/embeds/3343291/5817681/",height:"350",width:"100%"}),"\n",(0,a.jsx)("iframe",{src:"https://dune.com/embeds/3343291/5817723/",height:"350",width:"100%"}),"\n",(0,a.jsx)("iframe",{src:"https://dune.com/embeds/3343291/5602160/",height:"350",width:"100%"}),"\n",(0,a.jsx)("iframe",{src:"https://dune.com/embeds/3343291/5817736/",height:"350",width:"100%"}),"\n",(0,a.jsx)("iframe",{src:"https://dune.com/embeds/3343291/5817692/",height:"350",width:"100%"}),"\n",(0,a.jsx)("iframe",{src:"https://dune.com/embeds/3343291/5817706/",height:"350",width:"100%"}),"\n",(0,a.jsx)("iframe",{src:"https://dune.com/embeds/3341597/5599169/",height:"350",width:"100%"}),"\n",(0,a.jsx)(t.h2,{id:"polkadot-staking-dashboard-pool-member",children:"Polkadot Staking Dashboard (Pool Member)"}),"\n",(0,a.jsxs)(t.p,{children:[(0,a.jsx)(t.strong,{children:"View On Dune:"}),"\n",(0,a.jsx)(t.a,{href:"https://dune.com/substrate/polkadot-staking-pool-member",children:"Polkadot Staking Dashboard (Pool Member)"})]}),"\n",(0,a.jsx)(t.p,{children:"For a specific nomination pool member, this dashboard shows raw data of member activity within the\npool."}),"\n",(0,a.jsx)(t.p,{children:"Member Pool Fee: 365 * member_staking_rewards / member_bonded"}),"\n",(0,a.jsxs)(t.p,{children:["Source Table: ",(0,a.jsx)(t.strong,{children:"polkadot.stakings"}),", MaterializedView:\n",(0,a.jsx)(t.a,{href:"https://dune.com/queries/3327479",children:(0,a.jsx)(t.strong,{children:"dune.substrate.result_polkadot_poolmembers"})})]}),"\n",(0,a.jsx)(t.admonition,{type:"tip",children:(0,a.jsxs)(t.p,{children:[(0,a.jsx)(t.strong,{children:"Default parameters"})," are applied to all parameterized charts on this Wiki page as a demonstration.\nVisit our dashboard on Dune to use the ",(0,a.jsx)(t.code,{children:"user_ss58"})," parameter for more in-depth analysis. For more\ninformation, please visit the\n",(0,a.jsx)(t.a,{href:"https://docs.dune.com/web-app/query-editor/parameters",children:"Dune documentation on parameters"}),"."]})}),"\n",(0,a.jsx)("iframe",{src:"https://dune.com/embeds/3341609/5599266/",height:"350",width:"100%"}),"\n",(0,a.jsx)("iframe",{src:"https://dune.com/embeds/3341609/5599280/",height:"350",width:"100%"}),"\n",(0,a.jsx)("iframe",{src:"https://dune.com/embeds/3341609/5599290/",height:"350",width:"100%"}),"\n",(0,a.jsx)("iframe",{src:"https://dune.com/embeds/3341609/5599317/",height:"350",width:"100%"}),"\n",(0,a.jsx)("iframe",{src:"https://dune.com/embeds/3343369/5602279/",height:"350",width:"100%"}),"\n",(0,a.jsx)("iframe",{src:"https://dune.com/embeds/3343707/5602761/",height:"350",width:"100%"})]})}function c(e={}){const{wrapper:t}={...(0,n.R)(),...e.components};return t?(0,a.jsx)(t,{...e,children:(0,a.jsx)(l,{...e})}):l(e)}},28453:(e,t,s)=>{s.d(t,{R:()=>i,x:()=>r});var a=s(96540);const n={},o=a.createContext(n);function i(e){const t=a.useContext(o);return a.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:i(e.components),a.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/49ea81bb.df5cc6f3.js b/assets/js/49ea81bb.df5cc6f3.js new file mode 100644 index 000000000000..bcd217f9f81e --- /dev/null +++ b/assets/js/49ea81bb.df5cc6f3.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9233],{91758:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>d,contentTitle:()=>r,default:()=>c,frontMatter:()=>i,metadata:()=>a,toc:()=>h});const a=JSON.parse('{"id":"general/dune-analytics/polkadot-dashboards/polkadot-dashboards-staking","title":"Polkadot Dashboards: Staking","description":"Dashboards offering insights into staking rewards, validator and nominator metrics, nomination pools, and pool member activities within the Polkadot network.","source":"@site/../docs/general/dune-analytics/polkadot-dashboards/polkadot-dashboards-staking.md","sourceDirName":"general/dune-analytics/polkadot-dashboards","slug":"/general/dune-analytics/polkadot-dashboards-staking","permalink":"/docs/general/dune-analytics/polkadot-dashboards-staking","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/polkadot-dashboards/polkadot-dashboards-staking.md","tags":[],"version":"current","lastUpdatedBy":"MK","lastUpdatedAt":1719215716000,"frontMatter":{"id":"polkadot-dashboards-staking","title":"Polkadot Dashboards: Staking","sidebar_label":"Staking","description":"Dashboards offering insights into staking rewards, validator and nominator metrics, nomination pools, and pool member activities within the Polkadot network.","keywords":["polkadot","governance","staking","dashboard","dune"],"slug":"../polkadot-dashboards-staking"},"sidebar":"docs","previous":{"title":"Governance","permalink":"/docs/general/dune-analytics/polkadot-dashboards-governance"},"next":{"title":"Network","permalink":"/docs/general/dune-analytics/polkadot-dashboards-network"}}');var n=s(74848),o=s(28453);const i={id:"polkadot-dashboards-staking",title:"Polkadot Dashboards: Staking",sidebar_label:"Staking",description:"Dashboards offering insights into staking rewards, validator and nominator metrics, nomination pools, and pool member activities within the Polkadot network.",keywords:["polkadot","governance","staking","dashboard","dune"],slug:"../polkadot-dashboards-staking"},r="Polkadot Dashboards Staking",d={},h=[{value:"Overview",id:"overview",level:2},{value:"Polkadot Staking Dashboard",id:"polkadot-staking-dashboard",level:2},{value:"Completed Era",id:"completed-era",level:3},{value:"Reward Rate Math",id:"reward-rate-math",level:3},{value:"Staking Analytics",id:"staking-analytics",level:3},{value:"Polkadot Staking Dashboard (Validators)",id:"polkadot-staking-dashboard-validators",level:2},{value:"Polkadot Staking Rewards",id:"polkadot-staking-rewards",level:3},{value:"Polkadot Staking Dashboard (Nominators)",id:"polkadot-staking-dashboard-nominators",level:2},{value:"Polkadot Staking Dashboard (Nomination Pool)",id:"polkadot-staking-dashboard-nomination-pool",level:2},{value:"Polkadot Staking Dashboard (Pool Member)",id:"polkadot-staking-dashboard-pool-member",level:2}];function l(e){const t={a:"a",admonition:"admonition",code:"code",em:"em",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",strong:"strong",ul:"ul",...(0,o.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.header,{children:(0,n.jsx)(t.h1,{id:"polkadot-dashboards-staking",children:"Polkadot Dashboards Staking"})}),"\n",(0,n.jsx)(t.h2,{id:"overview",children:"Overview"}),"\n",(0,n.jsx)(t.p,{children:"This document demonstrated various Polkadot staking dashboards, offering insights into staking\nrewards, validator and nominator metrics, nomination pools, and pool member activities. These\ndashboards aim to provide a comprehensive view of staking dynamics within the Polkadot network."}),"\n",(0,n.jsxs)(t.p,{children:["Authored by ",(0,n.jsx)(t.a,{href:"https://x.com/colorfulnotion",children:(0,n.jsx)(t.strong,{children:"@ colorfulnotion"})})]}),"\n",(0,n.jsx)(t.h2,{id:"polkadot-staking-dashboard",children:"Polkadot Staking Dashboard"}),"\n",(0,n.jsxs)(t.p,{children:[(0,n.jsx)(t.strong,{children:"View On Dune:"})," ",(0,n.jsx)(t.a,{href:"https://dune.com/substrate/polkadot-staking",children:"Polkadot Staking Dashboard"})]}),"\n",(0,n.jsx)(t.h3,{id:"completed-era",children:"Completed Era"}),"\n",(0,n.jsx)(t.p,{children:"Completed eras can have at most a 2-day delay before the staking rewards & APY computation becomes\navailable. The Staking Home Page shows the most recently completed era."}),"\n",(0,n.jsx)(t.h3,{id:"reward-rate-math",children:"Reward Rate Math"}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.strong,{children:"Reward Rate"}),": (validator_erasRewardPoints / erasRewardPoints_total) * ErasValidatorReward /\nvalidator_total_stake."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.strong,{children:"Effective Reward Rate"}),": (1 - validator_commission) * Reward Rate."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.strong,{children:"Normalized Reward Rate"}),": total_era_rewards / number_of_validators * (1 - commission) /\nvalidator_total_stake."]}),"\n"]}),"\n",(0,n.jsxs)(t.p,{children:["Source Table: ",(0,n.jsx)(t.strong,{children:"polkadot.stakings"}),", MaterializedView:\n",(0,n.jsx)(t.a,{href:"https://dune.com/queries/3302709",children:(0,n.jsx)(t.strong,{children:"dune.substrate.result_polkadot_validators"})}),",\n",(0,n.jsx)(t.a,{href:"https://dune.com/queries/3326829",children:(0,n.jsx)(t.strong,{children:"dune.substrate.result_polkadot_nominators"})}),",\n",(0,n.jsx)(t.a,{href:"https://dune.com/queries/3327350",children:(0,n.jsx)(t.strong,{children:"dune.substrate.result_polkadot_nominationpools"})}),",\n",(0,n.jsx)(t.a,{href:"https://dune.com/queries/3327479",children:(0,n.jsx)(t.strong,{children:"dune.substrate.result_polkadot_poolmembers"})}),",\n",(0,n.jsx)(t.a,{href:"https://dune.com/queries/3420617",children:(0,n.jsx)(t.strong,{children:"dune.substrate.result_polkadot_identity"})})]}),"\n",(0,n.jsxs)(t.p,{children:[(0,n.jsx)(t.em,{children:"Github repo"}),": ",(0,n.jsx)(t.a,{href:"https://github.com/colorfulnotion/substrate-etl",children:(0,n.jsx)(t.em,{children:(0,n.jsx)(t.strong,{children:"substrate-etl"})})})]}),"\n",(0,n.jsx)(t.h3,{id:"staking-analytics",children:"Staking Analytics"}),"\n",(0,n.jsx)("iframe",{src:"https://dune.com/embeds/3335920/5589273/",height:"350",width:"100%"}),"\n",(0,n.jsx)("iframe",{src:"https://dune.com/embeds/3338274/5593554/",height:"350",width:"100%"}),"\n",(0,n.jsx)("iframe",{src:"https://dune.com/embeds/3345583/5606404/",height:"350",width:"100%"}),"\n",(0,n.jsx)("iframe",{src:"https://dune.com/embeds/3338274/5817115/",height:"350",width:"100%"}),"\n",(0,n.jsx)("iframe",{src:"https://dune.com/embeds/3334573/5586661/",height:"350",width:"100%"}),"\n",(0,n.jsx)("iframe",{src:"https://dune.com/embeds/3459220/5813496/",height:"350",width:"100%"}),"\n",(0,n.jsx)("iframe",{src:"https://dune.com/embeds/3302959/5531365/",height:"350",width:"100%"}),"\n",(0,n.jsx)("iframe",{src:"https://dune.com/embeds/3303032/5531577/",height:"350",width:"100%"}),"\n",(0,n.jsx)("iframe",{src:"https://dune.com/embeds/3459195/5813464/",height:"350",width:"100%"}),"\n",(0,n.jsx)("iframe",{src:"https://dune.com/embeds/3414552/5732594/",height:"350",width:"100%"}),"\n",(0,n.jsx)("iframe",{src:"https://dune.com/embeds/3334817/5603258/",height:"350",width:"100%"}),"\n",(0,n.jsx)("iframe",{src:"https://dune.com/embeds/3334817/5587364/",height:"350",width:"100%"}),"\n",(0,n.jsx)(t.h2,{id:"polkadot-staking-dashboard-validators",children:"Polkadot Staking Dashboard (Validators)"}),"\n",(0,n.jsxs)(t.p,{children:[(0,n.jsx)(t.strong,{children:"View On Dune:"}),"\n",(0,n.jsx)(t.a,{href:"https://dune.com/substrate/polkadot-staking-validators",children:"Polkadot Staking Dashboard (Validators)"})]}),"\n",(0,n.jsx)(t.h3,{id:"polkadot-staking-rewards",children:"Polkadot Staking Rewards"}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.strong,{children:"Reward Rate"}),": (validator_erasRewardPoints / erasRewardPoints_total) * ErasValidatorReward /\nvalidator_total_stake."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.strong,{children:"Effective Reward Rate"}),": (1 - validator_commission) * Reward Rate."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.strong,{children:"Normalized Reward Rate"}),": total_era_rewards / number_of_validators * (1 - commission) /\nvalidator_total_stake."]}),"\n"]}),"\n",(0,n.jsxs)(t.p,{children:["Source Table: ",(0,n.jsx)(t.strong,{children:"polkadot.stakings"}),", MaterializedView:\n",(0,n.jsx)(t.a,{href:"https://dune.com/queries/3302709",children:(0,n.jsx)(t.strong,{children:"dune.substrate.result_polkadot_validators"})})]}),"\n",(0,n.jsx)("iframe",{src:"https://dune.com/embeds/3459458/5813993/",height:"350",width:"100%"}),"\n",(0,n.jsx)("iframe",{src:"https://dune.com/embeds/3459458/5814228/",height:"350",width:"100%"}),"\n",(0,n.jsx)("iframe",{src:"https://dune.com/embeds/3459458/5814232/",height:"350",width:"100%"}),"\n",(0,n.jsx)("iframe",{src:"https://dune.com/embeds/3459458/5814240/",height:"350",width:"100%"}),"\n",(0,n.jsx)("iframe",{src:"https://dune.com/embeds/3459458/5814241/",height:"350",width:"100%"}),"\n",(0,n.jsx)("iframe",{src:"https://dune.com/embeds/3459458/5814242/",height:"350",width:"100%"}),"\n",(0,n.jsx)("iframe",{src:"https://dune.com/embeds/3459458/5814243/",height:"350",width:"100%"}),"\n",(0,n.jsx)("iframe",{src:"https://dune.com/embeds/3459458/5814244/",height:"350",width:"100%"}),"\n",(0,n.jsx)("iframe",{src:"https://dune.com/embeds/3459613/5814194/",height:"350",width:"100%"}),"\n",(0,n.jsx)(t.h2,{id:"polkadot-staking-dashboard-nominators",children:"Polkadot Staking Dashboard (Nominators)"}),"\n",(0,n.jsxs)(t.p,{children:[(0,n.jsx)(t.strong,{children:"View On Dune:"}),"\n",(0,n.jsx)(t.a,{href:"https://dune.com/substrate/polkadot-staking-nominators",children:"Polkadot Staking Dashboard (Nominators)"})]}),"\n",(0,n.jsx)(t.p,{children:"For a specific nominator, this dashboard shows:"}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsx)(t.li,{children:"Nominator Staking Rewards"}),"\n",(0,n.jsx)(t.li,{children:"Nominator Shares"}),"\n",(0,n.jsx)(t.li,{children:"Delegated Amount"}),"\n",(0,n.jsx)(t.li,{children:"Nominator Staking Rewards Raw Data"}),"\n"]}),"\n",(0,n.jsxs)(t.p,{children:["Source Table: ",(0,n.jsx)(t.strong,{children:"polkadot.stakings"}),", MaterializedView:\n",(0,n.jsx)(t.a,{href:"https://dune.com/queries/3326829",children:(0,n.jsx)(t.strong,{children:"dune.substrate.result_polkadot_nominators"})})]}),"\n",(0,n.jsx)(t.admonition,{type:"tip",children:(0,n.jsxs)(t.p,{children:[(0,n.jsx)(t.strong,{children:"Default parameters"})," are applied to all parameterized charts on this Wiki page as a demonstration.\nVisit our dashboard on Dune to use the ",(0,n.jsx)(t.code,{children:"nominator_ss58"})," parameter for more in-depth analysis. For\nmore information, please visit the\n",(0,n.jsx)(t.a,{href:"https://docs.dune.com/web-app/query-editor/parameters",children:"Dune documentation on parameters"}),"."]})}),"\n",(0,n.jsx)("iframe",{src:"https://dune.com/embeds/3343697/5602826/",height:"350",width:"100%"}),"\n",(0,n.jsx)("iframe",{src:"https://dune.com/embeds/3343697/5817852/",height:"350",width:"100%"}),"\n",(0,n.jsx)("iframe",{src:"https://dune.com/embeds/3459410/5813864/",height:"350",width:"100%"}),"\n",(0,n.jsx)("iframe",{src:"https://dune.com/embeds/3343697/5817857/",height:"350",width:"100%"}),"\n",(0,n.jsx)(t.h2,{id:"polkadot-staking-dashboard-nomination-pool",children:"Polkadot Staking Dashboard (Nomination Pool)"}),"\n",(0,n.jsxs)(t.p,{children:[(0,n.jsx)(t.strong,{children:"View On Dune:"}),"\n",(0,n.jsx)(t.a,{href:"https://dune.com/substrate/polkadot-staking-nomination-pool",children:"Polkadot Staking Dashboard (Nomination Pool)"})]}),"\n",(0,n.jsx)(t.p,{children:"For a specific nomination pool ID, this dashboard shows:"}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsx)(t.li,{children:"Pool Members"}),"\n",(0,n.jsx)(t.li,{children:"Historical APY, Daily Pool Rewards & Fees"}),"\n"]}),"\n",(0,n.jsx)(t.p,{children:"Raw data is presented at the bottom."}),"\n",(0,n.jsxs)(t.p,{children:["Source Table: ",(0,n.jsx)(t.strong,{children:"polkadot.stakings"}),", MaterializedView:\n",(0,n.jsx)(t.a,{href:"https://dune.com/queries/3327350",children:(0,n.jsx)(t.strong,{children:"dune.substrate.result_polkadot_nominationpools"})})]}),"\n",(0,n.jsx)(t.admonition,{type:"tip",children:(0,n.jsxs)(t.p,{children:[(0,n.jsx)(t.strong,{children:"Default parameters"})," are applied to all parameterized charts on this Wiki page as a demonstration.\nVisit our dashboard on Dune to use the ",(0,n.jsx)(t.code,{children:"pool_id"})," parameter for more in-depth analysis. For more\ninformation, please visit the\n",(0,n.jsx)(t.a,{href:"https://docs.dune.com/web-app/query-editor/parameters",children:"Dune documentation on parameters"}),"."]})}),"\n",(0,n.jsx)("iframe",{src:"https://dune.com/embeds/3343291/5817752/",height:"350",width:"100%"}),"\n",(0,n.jsx)("iframe",{src:"https://dune.com/embeds/3341534/5599076/",height:"350",width:"100%"}),"\n",(0,n.jsx)("iframe",{src:"https://dune.com/embeds/3343291/5817681/",height:"350",width:"100%"}),"\n",(0,n.jsx)("iframe",{src:"https://dune.com/embeds/3343291/5817723/",height:"350",width:"100%"}),"\n",(0,n.jsx)("iframe",{src:"https://dune.com/embeds/3343291/5602160/",height:"350",width:"100%"}),"\n",(0,n.jsx)("iframe",{src:"https://dune.com/embeds/3343291/5817736/",height:"350",width:"100%"}),"\n",(0,n.jsx)("iframe",{src:"https://dune.com/embeds/3343291/5817692/",height:"350",width:"100%"}),"\n",(0,n.jsx)("iframe",{src:"https://dune.com/embeds/3343291/5817706/",height:"350",width:"100%"}),"\n",(0,n.jsx)("iframe",{src:"https://dune.com/embeds/3341597/5599169/",height:"350",width:"100%"}),"\n",(0,n.jsx)(t.h2,{id:"polkadot-staking-dashboard-pool-member",children:"Polkadot Staking Dashboard (Pool Member)"}),"\n",(0,n.jsxs)(t.p,{children:[(0,n.jsx)(t.strong,{children:"View On Dune:"}),"\n",(0,n.jsx)(t.a,{href:"https://dune.com/substrate/polkadot-staking-pool-member",children:"Polkadot Staking Dashboard (Pool Member)"})]}),"\n",(0,n.jsx)(t.p,{children:"For a specific nomination pool member, this dashboard shows raw data of member activity within the\npool."}),"\n",(0,n.jsx)(t.p,{children:"Member Pool Fee: 365 * member_staking_rewards / member_bonded"}),"\n",(0,n.jsxs)(t.p,{children:["Source Table: ",(0,n.jsx)(t.strong,{children:"polkadot.stakings"}),", MaterializedView:\n",(0,n.jsx)(t.a,{href:"https://dune.com/queries/3327479",children:(0,n.jsx)(t.strong,{children:"dune.substrate.result_polkadot_poolmembers"})})]}),"\n",(0,n.jsx)(t.admonition,{type:"tip",children:(0,n.jsxs)(t.p,{children:[(0,n.jsx)(t.strong,{children:"Default parameters"})," are applied to all parameterized charts on this Wiki page as a demonstration.\nVisit our dashboard on Dune to use the ",(0,n.jsx)(t.code,{children:"user_ss58"})," parameter for more in-depth analysis. For more\ninformation, please visit the\n",(0,n.jsx)(t.a,{href:"https://docs.dune.com/web-app/query-editor/parameters",children:"Dune documentation on parameters"}),"."]})}),"\n",(0,n.jsx)("iframe",{src:"https://dune.com/embeds/3341609/5599266/",height:"350",width:"100%"}),"\n",(0,n.jsx)("iframe",{src:"https://dune.com/embeds/3341609/5599280/",height:"350",width:"100%"}),"\n",(0,n.jsx)("iframe",{src:"https://dune.com/embeds/3341609/5599290/",height:"350",width:"100%"}),"\n",(0,n.jsx)("iframe",{src:"https://dune.com/embeds/3341609/5599317/",height:"350",width:"100%"}),"\n",(0,n.jsx)("iframe",{src:"https://dune.com/embeds/3343369/5602279/",height:"350",width:"100%"}),"\n",(0,n.jsx)("iframe",{src:"https://dune.com/embeds/3343707/5602761/",height:"350",width:"100%"})]})}function c(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(l,{...e})}):l(e)}},28453:(e,t,s)=>{s.d(t,{R:()=>i,x:()=>r});var a=s(96540);const n={},o=a.createContext(n);function i(e){const t=a.useContext(o);return a.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:i(e.components),a.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/4a8eb552.325fec02.js b/assets/js/4a8eb552.325fec02.js new file mode 100644 index 000000000000..ecc51b3610d8 --- /dev/null +++ b/assets/js/4a8eb552.325fec02.js @@ -0,0 +1 @@ +(self.webpackChunk=self.webpackChunk||[]).push([[1949],{67589:(e,a,t)=>{"use strict";t.r(a),t.d(a,{assets:()=>l,contentTitle:()=>i,default:()=>p,frontMatter:()=>r,metadata:()=>n,toc:()=>d});const n=JSON.parse('{"id":"learn/learn-comparisons-kusama","title":"Polkadot vs. Kusama","description":"Comparing the cousins.","source":"@site/../docs/learn/learn-comparisons-kusama.md","sourceDirName":"learn","slug":"/learn-comparisons-kusama","permalink":"/docs/learn-comparisons-kusama","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-comparisons-kusama.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1725286484000,"frontMatter":{"id":"learn-comparisons-kusama","title":"Polkadot vs. Kusama","sidebar_label":"Kusama","description":"Comparing the cousins.","keywords":["polkadot","kusama","polkadot vs kusama","canary"],"slug":"../learn-comparisons-kusama"},"sidebar":"docs","previous":{"title":"Polkadot Comparisons","permalink":"/docs/learn-comparisons-index"},"next":{"title":"Ethereum","permalink":"/docs/learn-comparisons-ethereum-2"}}');var o=t(74848),s=t(28453);t(47379);const r={id:"learn-comparisons-kusama",title:"Polkadot vs. Kusama",sidebar_label:"Kusama",description:"Comparing the cousins.",keywords:["polkadot","kusama","polkadot vs kusama","canary"],slug:"../learn-comparisons-kusama"},i=void 0,l={},d=[{value:"Cost and Speed",id:"cost-and-speed",level:2},{value:"Canary network",id:"canary-network",level:2},{value:"Going forward",id:"going-forward",level:2},{value:"Explore more",id:"explore-more",level:2}];function c(e){const a={a:"a",admonition:"admonition",h2:"h2",li:"li",p:"p",ul:"ul",...(0,s.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(a.p,{children:"Although they are like cousins and share many parts of their code, Polkadot and Kusama are\nindependent, standalone networks with different priorities. Kusama is wild and fast, and great for\nbold experimentation and early-stage deployment. Polkadot is more conservative, prioritizing\nstability and dependability. Cousins have their differences after all."}),"\n",(0,o.jsx)(a.admonition,{type:"info",children:(0,o.jsxs)(a.p,{children:["To get a better understanding of the key similarities and difference between Polkadot and Kusama,\ncheckout\n",(0,o.jsx)(a.a,{href:"https://support.polkadot.network/support/solutions/articles/65000182146-kusama-and-polkadot-what-s-the-difference-",children:"this support article"}),"."]})}),"\n",(0,o.jsx)(a.h2,{id:"cost-and-speed",children:"Cost and Speed"}),"\n",(0,o.jsx)(a.p,{children:"Teams wishing to run a parachain are required to bond tokens as security. The bonding requirement on\nKusama is lower than on Polkadot, making it the more affordable development environment."}),"\n",(0,o.jsx)(a.p,{children:"Another key technical difference between Polkadot and Kusama is that Kusama has modified governance\nparameters that allow for faster upgrades. Kusama is up to four times faster than Polkadot. This\ndoes not mean that the Kusama blockchain itself is faster, in the sense of faster block times or\ntransaction throughput (these are the same on both networks), but that there's a shorter amount of\ntime between governance events such as proposing new referenda, voting, and enacting approved\nupgrades. This allows Kusama to adapt and evolve faster than Polkadot."}),"\n",(0,o.jsx)(a.h2,{id:"canary-network",children:"Canary network"}),"\n",(0,o.jsx)(a.p,{children:"The initial use case for Kusama was as a pre-production environment, a \u201ccanary network\u201d."}),"\n",(0,o.jsx)(a.p,{children:"Canary is a type of bird: back in the day, coal miners would put canaries into coal mines as a way\nto measure the amount of toxic gases in the tunnels. Similarly, canary testing is a way to validate\nsoftware by releasing software to a limited number of users, or perhaps, an isolated environment -\nwithout hurting a wide range of users."}),"\n",(0,o.jsxs)(a.p,{children:["Releases made onto Kusama can be thought of as\n",(0,o.jsx)(a.a,{href:"https://martinfowler.com/bliki/CanaryRelease.html",children:"Canary Releases"}),". These releases are usually\nstaged. In Kusama's early days, the network won't just be used for parachain candidates to innovate\nand test changes, but a proof of concept for Polkadot's sharded model."]}),"\n",(0,o.jsx)(a.p,{children:'Kusama is not simply a testnet, the blockchain is fully functional with attached economic value, and\nown governance. The future of Kusama is in the hands of its participants. In a typical blockchain\ndevelopment pipeline, Kusama would sit in between a "testnet" and a "mainnet":'}),"\n",(0,o.jsx)(a.admonition,{title:"Testnet --\x3e Kusama --\x3e Polkadot",type:"info"}),"\n",(0,o.jsx)(a.p,{children:"As you can imagine, building on Kusama first allows teams to test things out in a live, fully\ndecentralized, and community-controlled network with real-world conditions and lower stakes in the\nevent of problems or bugs than on Polkadot."}),"\n",(0,o.jsx)(a.p,{children:"Many projects will maintain parachains on both networks, experimenting and testing new technologies\nand features on Kusama before deploying them to Polkadot. Some teams will decide just to stay on\nKusama, which is likely to be a place where we see some exciting experimentation with new\ntechnologies going forward. Projects that require high-throughput but don\u2019t necessarily require\nbank-like security, such as some gaming, social networking, and content distribution applications,\nare particularly good candidates for this use case."}),"\n",(0,o.jsx)(a.p,{children:"Kusama may also prove to be the perfect environment for ambitious experiments with new ideas and\ninnovations in areas like governance, incentives, monetary policy, and DAOs (decentralized\nautonomous organizations). Future upgrades to the Polkadot runtime will also likely be deployed to\nKusama before Polkadot mainnet. This way, not only will we be able to see how these new technologies\nand features will perform under real-world conditions before bringing them to Polkadot, but teams\nwho have deployed to both networks will also get an advanced look at how their own technology will\nperform under those upgrades."}),"\n",(0,o.jsx)(a.h2,{id:"going-forward",children:"Going forward"}),"\n",(0,o.jsx)(a.p,{children:"Ultimately, Kusama and Polkadot will live on as independent, standalone networks with their own\ncommunities, their own governance, and their own complementary use cases, though they will continue\nto maintain a close relationship, with many teams likely deploying applications to both networks. In\nthe future, we\u2019re also likely to see Kusama bridged to Polkadot for cross-network interoperability.\nWeb3 Foundation remains committed to both networks going forward, providing crucial support and\nguidance to teams building for the ecosystem."}),"\n",(0,o.jsx)(a.h2,{id:"explore-more",children:"Explore more"}),"\n",(0,o.jsxs)(a.ul,{children:["\n",(0,o.jsx)(a.li,{children:(0,o.jsx)(a.a,{href:"https://kusama.network",children:"About Kusama"})}),"\n",(0,o.jsx)(a.li,{children:(0,o.jsx)(a.a,{href:"https://guide.kusama.network",children:"The Kusama Wiki"})}),"\n",(0,o.jsx)(a.li,{children:(0,o.jsx)(a.a,{href:"https://kusama.dotapps.io",children:"Kusama on Polkadot-JS Apps"})}),"\n",(0,o.jsx)(a.li,{children:(0,o.jsx)(a.a,{href:"https://support.polkadot.network/support/solutions/articles/65000182146-kusama-and-polkadot-what-s-the-difference-",children:"Polkadot and Kusama: What's the difference?"})}),"\n"]})]})}function p(e={}){const{wrapper:a}={...(0,s.R)(),...e.components};return a?(0,o.jsx)(a,{...e,children:(0,o.jsx)(c,{...e})}):c(e)}},47379:(e,a,t)=>{"use strict";t.d(a,{A:()=>u});var n=t(90675),o=t(10467),s=t(96540),r=t(19588),i=t(2026),l=t(11135);function d(e,a,t){return c.apply(this,arguments)}function c(){return(c=(0,o.A)((0,n.A)().mark((function e(a,t,o){var s,l,d,c,p;return(0,n.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s=void 0,l=void 0,e.t0=a,e.next="polkadot"===e.t0?5:"kusama"===e.t0?7:"statemine"===e.t0?9:"statemint"===e.t0?11:"polkadotpeople"===e.t0?13:"kusamapeople"===e.t0?15:17;break;case 5:return s="wss://rpc.polkadot.io",e.abrupt("break",18);case 7:return s="wss://kusama-rpc.polkadot.io/",e.abrupt("break",18);case 9:return s="wss://statemine-rpc.polkadot.io/",e.abrupt("break",18);case 11:return s="wss://statemint-rpc.polkadot.io/",e.abrupt("break",18);case 13:return s="wss://polkadot-people-rpc.polkadot.io/",e.abrupt("break",18);case 15:return s="wss://kusama-people-rpc.polkadot.io/",e.abrupt("break",18);case 17:console.log("Unknown socket url provided, no connection made.");case 18:if(void 0!==s){e.next=22;break}return e.abrupt("return");case 22:return d=new r.E(s),e.next=25,i.G.create({provider:d});case 25:c=e.sent,(p=t.split(".")).forEach((function(e){e in c&&(c=c[e])})),e.t1=p[0],e.next="consts"===e.t1?31:"query"===e.t1?33:38;break;case 31:return l=c.toString(),e.abrupt("break",39);case 33:return e.next=35,c();case 35:return l=(l=e.sent).toString(),e.abrupt("break",39);case 38:console.log("Unknown path prefix ("+p[0]+") in "+t);case 39:return e.abrupt("return",l);case 40:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function p(e,a,t,n){switch(a){case"humanReadable":(0,l.HumanReadable)(e,t,n);break;case"precise":(0,l.Precise)(e,t,n);break;case"blocksToDays":(0,l.BlocksToDays)(e,n);break;case"erasToDays":(0,l.ErasToDays)(e,n,t);break;case"percentage":(0,l.Percentage)(e,n);break;case"permillToPercent":(0,l.PermillToPercent)(e,n);break;case"arrayLength":(0,l.ArrayLength)(e,n);break;default:return void console.log("Ignoring unknown filter type")}}const u=function(e){var a=e.network,t=e.path,r=e.defaultValue,i=e.filter,l=void 0===i?void 0:i,c=(0,s.useState)(""),u=c[0],m=c[1];return a=a.toLowerCase(),(0,s.useEffect)((function(){void 0!==l?p(r.toString(),l,a,m):m(r.toString());var e=void 0;switch(a){case"polkadot":e="wss://rpc.polkadot.io";break;case"kusama":e="wss://kusama-rpc.polkadot.io/";break;case"statemine":e="wss://kusama-asset-hub-rpc.polkadot.io/";break;case"statemint":e="wss://polkadot-asset-hub-rpc.polkadot.io/";break;case"kusamapeople":e="wss://kusama-people-rpc.polkadot.io";break;case"polkadotpeople":e="wss://polkadot-people-rpc.polkadot.io";break;default:console.log("Unknown network provided, "+a)}if(void 0===e)console.log("Failed to connect to a valid websocket, applying default");else{var s=function(){var e=(0,o.A)((0,n.A)().mark((function e(){var o;return(0,n.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,d(a,t,m);case 2:if(void 0!==(o=e.sent)){e.next=7;break}return e.abrupt("return");case 7:void 0!==l?p(o,l,a,m):m(o);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();try{s()}catch(i){console.log(i)}}}),[]),u}},11135:e=>{var a="polkadot",t="kusama",n="statemine",o="statemint",s="polkadotpeople",r="kusamapeople",i={polkadot:{precision:1e10,symbol:"DOT"},kusama:{precision:1e12,symbol:"KSM"},statemint:{precision:1e10,symbol:"DOT"},statemine:{precision:1e12,symbol:"KSM"},polkadotpeople:{precision:1e10,symbol:"DOT"},kusamapeople:{precision:1e12,symbol:"KSM"}};e.exports={HumanReadable:function(e,l,d){var c=void 0;if(l===a||l===o)c=3;else if(l===t||l===n||l===s)c=6;else{if(l!=r)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");c=8}e=parseFloat(e),d((e=Number.isInteger(e/i[l].precision)?e/i[l].precision+" "+i[l].symbol:(e/i[l].precision).toFixed(c)+" "+i[l].symbol).toString())},Precise:function(e,a,t){t(e=(e=parseFloat(e))/i[a].precision+" "+i[a].symbol)},BlocksToDays:function(e,a){a((e=6*e/86400).toString())},ErasToDays:function(e,i,l){var d=void 0;if(l===a||l===o||l==s)d=1;else{if(l!==t&&l!==n&&l!=r)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");d=4}i((e/=d).toString())},Percentage:function(e,a){a((e/=1e7).toString())},PermillToPercent:function(e,a){a((e/=1e4).toString())},ArrayLength:function(e,a){a((e=e.split(",").length).toString())}}},47790:()=>{}}]); \ No newline at end of file diff --git a/assets/js/4a8eb552.7e6d8d61.js b/assets/js/4a8eb552.7e6d8d61.js deleted file mode 100644 index 3945d47c896b..000000000000 --- a/assets/js/4a8eb552.7e6d8d61.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk=self.webpackChunk||[]).push([[1949],{4668:(e,a,t)=>{"use strict";t.r(a),t.d(a,{assets:()=>l,contentTitle:()=>r,default:()=>p,frontMatter:()=>s,metadata:()=>i,toc:()=>d});var n=t(74848),o=t(28453);t(47379);const s={id:"learn-comparisons-kusama",title:"Polkadot vs. Kusama",sidebar_label:"Kusama",description:"Comparing the cousins.",keywords:["polkadot","kusama","polkadot vs kusama","canary"],slug:"../learn-comparisons-kusama"},r=void 0,i={id:"learn/learn-comparisons-kusama",title:"Polkadot vs. Kusama",description:"Comparing the cousins.",source:"@site/../docs/learn/learn-comparisons-kusama.md",sourceDirName:"learn",slug:"/learn-comparisons-kusama",permalink:"/docs/learn-comparisons-kusama",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-comparisons-kusama.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1725286484e3,frontMatter:{id:"learn-comparisons-kusama",title:"Polkadot vs. Kusama",sidebar_label:"Kusama",description:"Comparing the cousins.",keywords:["polkadot","kusama","polkadot vs kusama","canary"],slug:"../learn-comparisons-kusama"},sidebar:"docs",previous:{title:"Polkadot Comparisons",permalink:"/docs/learn-comparisons-index"},next:{title:"Ethereum",permalink:"/docs/learn-comparisons-ethereum-2"}},l={},d=[{value:"Cost and Speed",id:"cost-and-speed",level:2},{value:"Canary network",id:"canary-network",level:2},{value:"Going forward",id:"going-forward",level:2},{value:"Explore more",id:"explore-more",level:2}];function c(e){const a={a:"a",admonition:"admonition",h2:"h2",li:"li",p:"p",ul:"ul",...(0,o.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(a.p,{children:"Although they are like cousins and share many parts of their code, Polkadot and Kusama are\nindependent, standalone networks with different priorities. Kusama is wild and fast, and great for\nbold experimentation and early-stage deployment. Polkadot is more conservative, prioritizing\nstability and dependability. Cousins have their differences after all."}),"\n",(0,n.jsx)(a.admonition,{type:"info",children:(0,n.jsxs)(a.p,{children:["To get a better understanding of the key similarities and difference between Polkadot and Kusama,\ncheckout\n",(0,n.jsx)(a.a,{href:"https://support.polkadot.network/support/solutions/articles/65000182146-kusama-and-polkadot-what-s-the-difference-",children:"this support article"}),"."]})}),"\n",(0,n.jsx)(a.h2,{id:"cost-and-speed",children:"Cost and Speed"}),"\n",(0,n.jsx)(a.p,{children:"Teams wishing to run a parachain are required to bond tokens as security. The bonding requirement on\nKusama is lower than on Polkadot, making it the more affordable development environment."}),"\n",(0,n.jsx)(a.p,{children:"Another key technical difference between Polkadot and Kusama is that Kusama has modified governance\nparameters that allow for faster upgrades. Kusama is up to four times faster than Polkadot. This\ndoes not mean that the Kusama blockchain itself is faster, in the sense of faster block times or\ntransaction throughput (these are the same on both networks), but that there's a shorter amount of\ntime between governance events such as proposing new referenda, voting, and enacting approved\nupgrades. This allows Kusama to adapt and evolve faster than Polkadot."}),"\n",(0,n.jsx)(a.h2,{id:"canary-network",children:"Canary network"}),"\n",(0,n.jsx)(a.p,{children:"The initial use case for Kusama was as a pre-production environment, a \u201ccanary network\u201d."}),"\n",(0,n.jsx)(a.p,{children:"Canary is a type of bird: back in the day, coal miners would put canaries into coal mines as a way\nto measure the amount of toxic gases in the tunnels. Similarly, canary testing is a way to validate\nsoftware by releasing software to a limited number of users, or perhaps, an isolated environment -\nwithout hurting a wide range of users."}),"\n",(0,n.jsxs)(a.p,{children:["Releases made onto Kusama can be thought of as\n",(0,n.jsx)(a.a,{href:"https://martinfowler.com/bliki/CanaryRelease.html",children:"Canary Releases"}),". These releases are usually\nstaged. In Kusama's early days, the network won't just be used for parachain candidates to innovate\nand test changes, but a proof of concept for Polkadot's sharded model."]}),"\n",(0,n.jsx)(a.p,{children:'Kusama is not simply a testnet, the blockchain is fully functional with attached economic value, and\nown governance. The future of Kusama is in the hands of its participants. In a typical blockchain\ndevelopment pipeline, Kusama would sit in between a "testnet" and a "mainnet":'}),"\n",(0,n.jsx)(a.admonition,{title:"Testnet --\x3e Kusama --\x3e Polkadot",type:"info"}),"\n",(0,n.jsx)(a.p,{children:"As you can imagine, building on Kusama first allows teams to test things out in a live, fully\ndecentralized, and community-controlled network with real-world conditions and lower stakes in the\nevent of problems or bugs than on Polkadot."}),"\n",(0,n.jsx)(a.p,{children:"Many projects will maintain parachains on both networks, experimenting and testing new technologies\nand features on Kusama before deploying them to Polkadot. Some teams will decide just to stay on\nKusama, which is likely to be a place where we see some exciting experimentation with new\ntechnologies going forward. Projects that require high-throughput but don\u2019t necessarily require\nbank-like security, such as some gaming, social networking, and content distribution applications,\nare particularly good candidates for this use case."}),"\n",(0,n.jsx)(a.p,{children:"Kusama may also prove to be the perfect environment for ambitious experiments with new ideas and\ninnovations in areas like governance, incentives, monetary policy, and DAOs (decentralized\nautonomous organizations). Future upgrades to the Polkadot runtime will also likely be deployed to\nKusama before Polkadot mainnet. This way, not only will we be able to see how these new technologies\nand features will perform under real-world conditions before bringing them to Polkadot, but teams\nwho have deployed to both networks will also get an advanced look at how their own technology will\nperform under those upgrades."}),"\n",(0,n.jsx)(a.h2,{id:"going-forward",children:"Going forward"}),"\n",(0,n.jsx)(a.p,{children:"Ultimately, Kusama and Polkadot will live on as independent, standalone networks with their own\ncommunities, their own governance, and their own complementary use cases, though they will continue\nto maintain a close relationship, with many teams likely deploying applications to both networks. In\nthe future, we\u2019re also likely to see Kusama bridged to Polkadot for cross-network interoperability.\nWeb3 Foundation remains committed to both networks going forward, providing crucial support and\nguidance to teams building for the ecosystem."}),"\n",(0,n.jsx)(a.h2,{id:"explore-more",children:"Explore more"}),"\n",(0,n.jsxs)(a.ul,{children:["\n",(0,n.jsx)(a.li,{children:(0,n.jsx)(a.a,{href:"https://kusama.network",children:"About Kusama"})}),"\n",(0,n.jsx)(a.li,{children:(0,n.jsx)(a.a,{href:"https://guide.kusama.network",children:"The Kusama Wiki"})}),"\n",(0,n.jsx)(a.li,{children:(0,n.jsx)(a.a,{href:"https://kusama.dotapps.io",children:"Kusama on Polkadot-JS Apps"})}),"\n",(0,n.jsx)(a.li,{children:(0,n.jsx)(a.a,{href:"https://support.polkadot.network/support/solutions/articles/65000182146-kusama-and-polkadot-what-s-the-difference-",children:"Polkadot and Kusama: What's the difference?"})}),"\n"]})]})}function p(e={}){const{wrapper:a}={...(0,o.R)(),...e.components};return a?(0,n.jsx)(a,{...e,children:(0,n.jsx)(c,{...e})}):c(e)}},47379:(e,a,t)=>{"use strict";t.d(a,{A:()=>u});var n=t(90675),o=t(10467),s=t(96540),r=t(19588),i=t(2026),l=t(11135);function d(e,a,t){return c.apply(this,arguments)}function c(){return(c=(0,o.A)((0,n.A)().mark((function e(a,t,o){var s,l,d,c,p;return(0,n.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s=void 0,l=void 0,e.t0=a,e.next="polkadot"===e.t0?5:"kusama"===e.t0?7:"statemine"===e.t0?9:"statemint"===e.t0?11:"polkadotpeople"===e.t0?13:"kusamapeople"===e.t0?15:17;break;case 5:return s="wss://rpc.polkadot.io",e.abrupt("break",18);case 7:return s="wss://kusama-rpc.polkadot.io/",e.abrupt("break",18);case 9:return s="wss://statemine-rpc.polkadot.io/",e.abrupt("break",18);case 11:return s="wss://statemint-rpc.polkadot.io/",e.abrupt("break",18);case 13:return s="wss://polkadot-people-rpc.polkadot.io/",e.abrupt("break",18);case 15:return s="wss://kusama-people-rpc.polkadot.io/",e.abrupt("break",18);case 17:console.log("Unknown socket url provided, no connection made.");case 18:if(void 0!==s){e.next=22;break}return e.abrupt("return");case 22:return d=new r.E(s),e.next=25,i.G.create({provider:d});case 25:c=e.sent,(p=t.split(".")).forEach((function(e){e in c&&(c=c[e])})),e.t1=p[0],e.next="consts"===e.t1?31:"query"===e.t1?33:38;break;case 31:return l=c.toString(),e.abrupt("break",39);case 33:return e.next=35,c();case 35:return l=(l=e.sent).toString(),e.abrupt("break",39);case 38:console.log("Unknown path prefix ("+p[0]+") in "+t);case 39:return e.abrupt("return",l);case 40:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function p(e,a,t,n){switch(a){case"humanReadable":(0,l.HumanReadable)(e,t,n);break;case"precise":(0,l.Precise)(e,t,n);break;case"blocksToDays":(0,l.BlocksToDays)(e,n);break;case"erasToDays":(0,l.ErasToDays)(e,n,t);break;case"percentage":(0,l.Percentage)(e,n);break;case"permillToPercent":(0,l.PermillToPercent)(e,n);break;case"arrayLength":(0,l.ArrayLength)(e,n);break;default:return void console.log("Ignoring unknown filter type")}}const u=function(e){var a=e.network,t=e.path,r=e.defaultValue,i=e.filter,l=void 0===i?void 0:i,c=(0,s.useState)(""),u=c[0],m=c[1];return a=a.toLowerCase(),(0,s.useEffect)((function(){void 0!==l?p(r.toString(),l,a,m):m(r.toString());var e=void 0;switch(a){case"polkadot":e="wss://rpc.polkadot.io";break;case"kusama":e="wss://kusama-rpc.polkadot.io/";break;case"statemine":e="wss://kusama-asset-hub-rpc.polkadot.io/";break;case"statemint":e="wss://polkadot-asset-hub-rpc.polkadot.io/";break;case"kusamapeople":e="wss://kusama-people-rpc.polkadot.io";break;case"polkadotpeople":e="wss://polkadot-people-rpc.polkadot.io";break;default:console.log("Unknown network provided, "+a)}if(void 0===e)console.log("Failed to connect to a valid websocket, applying default");else{var s=function(){var e=(0,o.A)((0,n.A)().mark((function e(){var o;return(0,n.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,d(a,t,m);case 2:if(void 0!==(o=e.sent)){e.next=7;break}return e.abrupt("return");case 7:void 0!==l?p(o,l,a,m):m(o);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();try{s()}catch(i){console.log(i)}}}),[]),u}},11135:e=>{var a="polkadot",t="kusama",n="statemine",o="statemint",s="polkadotpeople",r="kusamapeople",i={polkadot:{precision:1e10,symbol:"DOT"},kusama:{precision:1e12,symbol:"KSM"},statemint:{precision:1e10,symbol:"DOT"},statemine:{precision:1e12,symbol:"KSM"},polkadotpeople:{precision:1e10,symbol:"DOT"},kusamapeople:{precision:1e12,symbol:"KSM"}};e.exports={HumanReadable:function(e,l,d){var c=void 0;if(l===a||l===o)c=3;else if(l===t||l===n||l===s)c=6;else{if(l!=r)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");c=8}e=parseFloat(e),d((e=Number.isInteger(e/i[l].precision)?e/i[l].precision+" "+i[l].symbol:(e/i[l].precision).toFixed(c)+" "+i[l].symbol).toString())},Precise:function(e,a,t){t(e=(e=parseFloat(e))/i[a].precision+" "+i[a].symbol)},BlocksToDays:function(e,a){a((e=6*e/86400).toString())},ErasToDays:function(e,i,l){var d=void 0;if(l===a||l===o||l==s)d=1;else{if(l!==t&&l!==n&&l!=r)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");d=4}i((e/=d).toString())},Percentage:function(e,a){a((e/=1e7).toString())},PermillToPercent:function(e,a){a((e/=1e4).toString())},ArrayLength:function(e,a){a((e=e.split(",").length).toString())}}},47790:()=>{}}]); \ No newline at end of file diff --git a/assets/js/4d76887f.5d8b8521.js b/assets/js/4d76887f.5d8b8521.js deleted file mode 100644 index 72e3c8865d47..000000000000 --- a/assets/js/4d76887f.5d8b8521.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6235],{60494:(e,n,o)=>{o.r(n),o.d(n,{assets:()=>h,contentTitle:()=>s,default:()=>d,frontMatter:()=>i,metadata:()=>r,toc:()=>l});var a=o(74848),t=o(28453);const i={id:"build-hackathon",title:"Hackathons",sidebar_label:"Hackathons",description:"Join or host a Hackathon.",keywords:["hackathon","build","event","host","resources"],slug:"../build-hackathon"},s=void 0,r={id:"build/build-hackathon",title:"Hackathons",description:"Join or host a Hackathon.",source:"@site/../docs/build/build-hackathon.md",sourceDirName:"build",slug:"/build-hackathon",permalink:"/docs/build-hackathon",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/build/build-hackathon.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1726729589e3,frontMatter:{id:"build-hackathon",title:"Hackathons",sidebar_label:"Hackathons",description:"Join or host a Hackathon.",keywords:["hackathon","build","event","host","resources"],slug:"../build-hackathon"},sidebar:"docs",previous:{title:"Open Source Stack",permalink:"/docs/build-open-source"},next:{title:"Archive",permalink:"/docs/build-archive-index"}},h={},l=[{value:"Join a Hackathon",id:"join-a-hackathon",level:2},{value:"Host a Hackathon",id:"host-a-hackathon",level:2},{value:"Why you should host a hackathon?",id:"why-you-should-host-a-hackathon",level:3},{value:"How do hackathons differ from workshops?",id:"how-do-hackathons-differ-from-workshops",level:2},{value:"How can you run a hackathon in your city?",id:"how-can-you-run-a-hackathon-in-your-city",level:2},{value:"How we can help",id:"how-we-can-help",level:2},{value:"Project & Event Theme Ideas",id:"project--event-theme-ideas",level:2},{value:"Previous Hackathons",id:"previous-hackathons",level:3},{value:"Resources",id:"resources",level:2},{value:"Support / Contact",id:"support--contact",level:2}];function c(e){const n={a:"a",h2:"h2",h3:"h3",li:"li",p:"p",ul:"ul",...(0,t.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.h2,{id:"join-a-hackathon",children:"Join a Hackathon"}),"\n",(0,a.jsxs)(n.p,{children:["Web3 Foundation regularly supports developer focused events! Be the first to know by signing up for\nthe ",(0,a.jsx)(n.a,{href:"https://polkadot.com/community/newsroom",children:"Polkadot newsletter"})," and the\n",(0,a.jsx)(n.a,{href:"https://kusama.network/newsletter/",children:"Kusama newsletter"}),"."]}),"\n",(0,a.jsx)(n.h2,{id:"host-a-hackathon",children:"Host a Hackathon"}),"\n",(0,a.jsxs)(n.p,{children:["As one of our objectives in the Web3 Foundation is promoting the\n",(0,a.jsx)(n.a,{href:"https://wiki.polkadot.network/docs/build-open-source",children:"Web3 technology stack"}),", we would like to\nsupport any individual or team who wants to organize a hackathon that gets more developers to\nunderstand Polkadot and Substrate in your city or online."]}),"\n",(0,a.jsx)(n.p,{children:"We are not only providing technical resources for you, but we can have someone from our team give a\nhands-on workshop/presentation about the technology to help participants get started hacking on it\nmore quickly."}),"\n",(0,a.jsx)(n.h3,{id:"why-you-should-host-a-hackathon",children:"Why you should host a hackathon?"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:"Connect with the Web3 Foundation team and larger community"}),"\n",(0,a.jsx)(n.li,{children:"Support Web 3.0 education, opportunities, and more"}),"\n",(0,a.jsx)(n.li,{children:"Learn the bleeding-edge technology"}),"\n",(0,a.jsx)(n.li,{children:"Make lasting impact and gain connections in the community"}),"\n"]}),"\n",(0,a.jsx)(n.h2,{id:"how-do-hackathons-differ-from-workshops",children:"How do hackathons differ from workshops?"}),"\n",(0,a.jsx)(n.p,{children:"Hackathons (AKA Buildathons) are aimed at participants who want to deliver their prototype and\ndemonstrate their ideas to reality in a short period (few hours - one day), or online in a few\nweeks. Workshops are more for getting developers familiar with the tooling and understanding more\nabout what are the resources currently available and how they can make use of it."}),"\n",(0,a.jsx)(n.h2,{id:"how-can-you-run-a-hackathon-in-your-city",children:"How can you run a hackathon in your city?"}),"\n",(0,a.jsxs)(n.p,{children:["Get in touch with the W3F team by ",(0,a.jsx)(n.a,{href:"mailto:community@web3.foundation",children:"email"})," or ask us via our\n",(0,a.jsx)(n.a,{href:"https://matrix.to/#/#w3f:matrix.org",children:"Matrix"})," chat."]}),"\n",(0,a.jsx)(n.h2,{id:"how-we-can-help",children:"How we can help"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:"Provide technical resources/materials"}),"\n",(0,a.jsx)(n.li,{children:"Help sourcing funding for facilitation and prizes."}),"\n",(0,a.jsx)(n.li,{children:"Finding a venue"}),"\n",(0,a.jsx)(n.li,{children:"Marketing the event"}),"\n",(0,a.jsx)(n.li,{children:"Ensure the hackathon runs smoothly"}),"\n"]}),"\n",(0,a.jsx)(n.h2,{id:"project--event-theme-ideas",children:"Project & Event Theme Ideas"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:"NFTs"}),"\n",(0,a.jsx)(n.li,{children:"Bonded tokens"}),"\n",(0,a.jsx)(n.li,{children:"New governance pallets with different styles of voting & democracy"}),"\n",(0,a.jsx)(n.li,{children:"Upgrade the TCR pallet"}),"\n",(0,a.jsx)(n.li,{children:"IPFS integrations"}),"\n",(0,a.jsx)(n.li,{children:"Decentralized identity solutions"}),"\n",(0,a.jsx)(n.li,{children:"Oracle pallets"}),"\n",(0,a.jsx)(n.li,{children:"Implement Generalized State Channel/Plasma Chain"}),"\n",(0,a.jsx)(n.li,{children:"Decentralized Exchanges"}),"\n",(0,a.jsx)(n.li,{children:"Tools for monitoring validator performance"}),"\n",(0,a.jsx)(n.li,{children:"dApps across different parachains"}),"\n"]}),"\n",(0,a.jsx)(n.h3,{id:"previous-hackathons",children:"Previous Hackathons"}),"\n",(0,a.jsx)(n.p,{children:"Here are a few examples of hackathons W3F has facilitated and supported:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.a,{href:"https://polkadot-buildathon.devfolio.co/",children:"Polkadot Buildathon: India"})," - This India-focused\nhackathon was a 9-week online event."]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.a,{href:"https://medium.com/encode-club/encode-hack-club-announcing-polkadot-c7cc6cc12920",children:"Encode Hackathon"})," -\nan externally facilitated event with a mix of learning challenges and prize pools for dApps as\nwell as stand-alone blockchain project submissions."]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.a,{href:"https://gitcoin.co/hackathon/polkadot/onboard",children:"Hello World! by Polkadot"})," - A collaborative\nhackathon celebrating the integration of Polkadot and Kusama into the Gitcoin platform. Has many\nsets of smaller challenges that will reward in either DOT or KSM."]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.a,{href:"https://hackusama.devpost.com/",children:"Hackusama"}),' - A 7-week online hackathon for developers to "Build a\nBlockchain" and submit your wildest tools, visualizations, and ideas to the "Open Hack" category.']}),"\n"]}),"\n"]}),"\n",(0,a.jsx)(n.h2,{id:"resources",children:"Resources"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.a,{href:"https://docs.substrate.io/",children:"Substrate Docs"})," - many introductory learning material lives here,\nthat can be a feature of you hackathon or suggested prerequisite for those joining to use."]}),"\n"]}),"\n",(0,a.jsx)(n.h2,{id:"support--contact",children:"Support / Contact"}),"\n",(0,a.jsxs)(n.p,{children:["If you have any questions regarding organizing a hackathon, please free feel to contact us by\n",(0,a.jsx)(n.a,{href:"mailto:events@web3.foundation",children:"email"})," or ask us via\n",(0,a.jsx)(n.a,{href:"https://riot.im/app/#/room/#polkadot-watercooler:matrix.org",children:"Element"})," chat."]})]})}function d(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(c,{...e})}):c(e)}},28453:(e,n,o)=>{o.d(n,{R:()=>s,x:()=>r});var a=o(96540);const t={},i=a.createContext(t);function s(e){const n=a.useContext(i);return a.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:s(e.components),a.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/4d76887f.cbb08f7f.js b/assets/js/4d76887f.cbb08f7f.js new file mode 100644 index 000000000000..dbe7cc45ab68 --- /dev/null +++ b/assets/js/4d76887f.cbb08f7f.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6235],{97441:(e,n,o)=>{o.r(n),o.d(n,{assets:()=>h,contentTitle:()=>r,default:()=>d,frontMatter:()=>s,metadata:()=>a,toc:()=>l});const a=JSON.parse('{"id":"build/build-hackathon","title":"Hackathons","description":"Join or host a Hackathon.","source":"@site/../docs/build/build-hackathon.md","sourceDirName":"build","slug":"/build-hackathon","permalink":"/docs/build-hackathon","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/build/build-hackathon.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1726729589000,"frontMatter":{"id":"build-hackathon","title":"Hackathons","sidebar_label":"Hackathons","description":"Join or host a Hackathon.","keywords":["hackathon","build","event","host","resources"],"slug":"../build-hackathon"},"sidebar":"docs","previous":{"title":"Open Source Stack","permalink":"/docs/build-open-source"},"next":{"title":"Archive","permalink":"/docs/build-archive-index"}}');var t=o(74848),i=o(28453);const s={id:"build-hackathon",title:"Hackathons",sidebar_label:"Hackathons",description:"Join or host a Hackathon.",keywords:["hackathon","build","event","host","resources"],slug:"../build-hackathon"},r=void 0,h={},l=[{value:"Join a Hackathon",id:"join-a-hackathon",level:2},{value:"Host a Hackathon",id:"host-a-hackathon",level:2},{value:"Why you should host a hackathon?",id:"why-you-should-host-a-hackathon",level:3},{value:"How do hackathons differ from workshops?",id:"how-do-hackathons-differ-from-workshops",level:2},{value:"How can you run a hackathon in your city?",id:"how-can-you-run-a-hackathon-in-your-city",level:2},{value:"How we can help",id:"how-we-can-help",level:2},{value:"Project & Event Theme Ideas",id:"project--event-theme-ideas",level:2},{value:"Previous Hackathons",id:"previous-hackathons",level:3},{value:"Resources",id:"resources",level:2},{value:"Support / Contact",id:"support--contact",level:2}];function c(e){const n={a:"a",h2:"h2",h3:"h3",li:"li",p:"p",ul:"ul",...(0,i.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h2,{id:"join-a-hackathon",children:"Join a Hackathon"}),"\n",(0,t.jsxs)(n.p,{children:["Web3 Foundation regularly supports developer focused events! Be the first to know by signing up for\nthe ",(0,t.jsx)(n.a,{href:"https://polkadot.com/community/newsroom",children:"Polkadot newsletter"})," and the\n",(0,t.jsx)(n.a,{href:"https://kusama.network/newsletter/",children:"Kusama newsletter"}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"host-a-hackathon",children:"Host a Hackathon"}),"\n",(0,t.jsxs)(n.p,{children:["As one of our objectives in the Web3 Foundation is promoting the\n",(0,t.jsx)(n.a,{href:"https://wiki.polkadot.network/docs/build-open-source",children:"Web3 technology stack"}),", we would like to\nsupport any individual or team who wants to organize a hackathon that gets more developers to\nunderstand Polkadot and Substrate in your city or online."]}),"\n",(0,t.jsx)(n.p,{children:"We are not only providing technical resources for you, but we can have someone from our team give a\nhands-on workshop/presentation about the technology to help participants get started hacking on it\nmore quickly."}),"\n",(0,t.jsx)(n.h3,{id:"why-you-should-host-a-hackathon",children:"Why you should host a hackathon?"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Connect with the Web3 Foundation team and larger community"}),"\n",(0,t.jsx)(n.li,{children:"Support Web 3.0 education, opportunities, and more"}),"\n",(0,t.jsx)(n.li,{children:"Learn the bleeding-edge technology"}),"\n",(0,t.jsx)(n.li,{children:"Make lasting impact and gain connections in the community"}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"how-do-hackathons-differ-from-workshops",children:"How do hackathons differ from workshops?"}),"\n",(0,t.jsx)(n.p,{children:"Hackathons (AKA Buildathons) are aimed at participants who want to deliver their prototype and\ndemonstrate their ideas to reality in a short period (few hours - one day), or online in a few\nweeks. Workshops are more for getting developers familiar with the tooling and understanding more\nabout what are the resources currently available and how they can make use of it."}),"\n",(0,t.jsx)(n.h2,{id:"how-can-you-run-a-hackathon-in-your-city",children:"How can you run a hackathon in your city?"}),"\n",(0,t.jsxs)(n.p,{children:["Get in touch with the W3F team by ",(0,t.jsx)(n.a,{href:"mailto:community@web3.foundation",children:"email"})," or ask us via our\n",(0,t.jsx)(n.a,{href:"https://matrix.to/#/#w3f:matrix.org",children:"Matrix"})," chat."]}),"\n",(0,t.jsx)(n.h2,{id:"how-we-can-help",children:"How we can help"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Provide technical resources/materials"}),"\n",(0,t.jsx)(n.li,{children:"Help sourcing funding for facilitation and prizes."}),"\n",(0,t.jsx)(n.li,{children:"Finding a venue"}),"\n",(0,t.jsx)(n.li,{children:"Marketing the event"}),"\n",(0,t.jsx)(n.li,{children:"Ensure the hackathon runs smoothly"}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"project--event-theme-ideas",children:"Project & Event Theme Ideas"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"NFTs"}),"\n",(0,t.jsx)(n.li,{children:"Bonded tokens"}),"\n",(0,t.jsx)(n.li,{children:"New governance pallets with different styles of voting & democracy"}),"\n",(0,t.jsx)(n.li,{children:"Upgrade the TCR pallet"}),"\n",(0,t.jsx)(n.li,{children:"IPFS integrations"}),"\n",(0,t.jsx)(n.li,{children:"Decentralized identity solutions"}),"\n",(0,t.jsx)(n.li,{children:"Oracle pallets"}),"\n",(0,t.jsx)(n.li,{children:"Implement Generalized State Channel/Plasma Chain"}),"\n",(0,t.jsx)(n.li,{children:"Decentralized Exchanges"}),"\n",(0,t.jsx)(n.li,{children:"Tools for monitoring validator performance"}),"\n",(0,t.jsx)(n.li,{children:"dApps across different parachains"}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"previous-hackathons",children:"Previous Hackathons"}),"\n",(0,t.jsx)(n.p,{children:"Here are a few examples of hackathons W3F has facilitated and supported:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.a,{href:"https://polkadot-buildathon.devfolio.co/",children:"Polkadot Buildathon: India"})," - This India-focused\nhackathon was a 9-week online event."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.a,{href:"https://medium.com/encode-club/encode-hack-club-announcing-polkadot-c7cc6cc12920",children:"Encode Hackathon"})," -\nan externally facilitated event with a mix of learning challenges and prize pools for dApps as\nwell as stand-alone blockchain project submissions."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.a,{href:"https://gitcoin.co/hackathon/polkadot/onboard",children:"Hello World! by Polkadot"})," - A collaborative\nhackathon celebrating the integration of Polkadot and Kusama into the Gitcoin platform. Has many\nsets of smaller challenges that will reward in either DOT or KSM."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.a,{href:"https://hackusama.devpost.com/",children:"Hackusama"}),' - A 7-week online hackathon for developers to "Build a\nBlockchain" and submit your wildest tools, visualizations, and ideas to the "Open Hack" category.']}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"resources",children:"Resources"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"https://docs.substrate.io/",children:"Substrate Docs"})," - many introductory learning material lives here,\nthat can be a feature of you hackathon or suggested prerequisite for those joining to use."]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"support--contact",children:"Support / Contact"}),"\n",(0,t.jsxs)(n.p,{children:["If you have any questions regarding organizing a hackathon, please free feel to contact us by\n",(0,t.jsx)(n.a,{href:"mailto:events@web3.foundation",children:"email"})," or ask us via\n",(0,t.jsx)(n.a,{href:"https://riot.im/app/#/room/#polkadot-watercooler:matrix.org",children:"Element"})," chat."]})]})}function d(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(c,{...e})}):c(e)}},28453:(e,n,o)=>{o.d(n,{R:()=>s,x:()=>r});var a=o(96540);const t={},i=a.createContext(t);function s(e){const n=a.useContext(i);return a.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:s(e.components),a.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/4d9b9869.405402c4.js b/assets/js/4d9b9869.405402c4.js new file mode 100644 index 000000000000..b7f514c7e401 --- /dev/null +++ b/assets/js/4d9b9869.405402c4.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9550],{90986:(e,a,i)=>{i.r(a),i.d(a,{assets:()=>l,contentTitle:()=>r,default:()=>d,frontMatter:()=>s,metadata:()=>n,toc:()=>h});const n=JSON.parse('{"id":"learn/learn-parachains-protocol","title":"Parachains\' Protocol Overview","description":"Actors and Protocols involved in Polkadot and its Parachains\' Block Finality.","source":"@site/../docs/learn/learn-parachains-protocol.md","sourceDirName":"learn","slug":"/learn-parachains-protocol","permalink":"/docs/learn-parachains-protocol","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-parachains-protocol.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1727991122000,"frontMatter":{"id":"learn-parachains-protocol","title":"Parachains\' Protocol Overview","sidebar_label":"Protocol Overview","description":"Actors and Protocols involved in Polkadot and its Parachains\' Block Finality.","keywords":["parachains","application-specific","sharding","protocol","validator","collator","nominator","AnV","availability","validity"],"slug":"../learn-parachains-protocol"},"sidebar":"docs","previous":{"title":"Introduction to Parachains","permalink":"/docs/learn-parachains"},"next":{"title":"System Parachains","permalink":"/docs/learn-system-chains"}}');var t=i(74848),o=i(28453);const s={id:"learn-parachains-protocol",title:"Parachains' Protocol Overview",sidebar_label:"Protocol Overview",description:"Actors and Protocols involved in Polkadot and its Parachains' Block Finality.",keywords:["parachains","application-specific","sharding","protocol","validator","collator","nominator","AnV","availability","validity"],slug:"../learn-parachains-protocol"},r=void 0,l={},h=[{value:"Main Actors",id:"main-actors",level:2},{value:"Validators",id:"validators",level:3},{value:"Collators",id:"collators",level:3},{value:"Fishermen: Deprecated",id:"fishermen-deprecated",level:3},{value:"Protocols' Summary",id:"protocols-summary",level:2},{value:"Parachain Protocol",id:"parachain-protocol",level:3},{value:"Availability and Validity (AnV) Protocol",id:"availability-and-validity-anv-protocol",level:3},{value:"Inclusion Pipeline",id:"inclusion-pipeline",level:2},{value:"Overview",id:"overview",level:3},{value:"Parachain Phase",id:"parachain-phase",level:3},{value:"Relay Chain Submission Phase",id:"relay-chain-submission-phase",level:3},{value:"Availability and Unavailability Phase",id:"availability-and-unavailability-phase",level:3},{value:"Failure to Inclusion",id:"failure-to-inclusion",level:3},{value:"Approval Process",id:"approval-process",level:2},{value:"Overview",id:"overview-1",level:3},{value:"Assignments & Secondary Checks",id:"assignments--secondary-checks",level:3},{value:"Chain Selection",id:"chain-selection",level:3},{value:"Candidate Receipts",id:"candidate-receipts",level:2},{value:"Erasure Codes",id:"erasure-codes",level:2},{value:"Disputes",id:"disputes",level:2},{value:"Network Asynchrony",id:"network-asynchrony",level:2},{value:"Further Resources",id:"further-resources",level:2}];function c(e){const a={a:"a",admonition:"admonition",em:"em",h2:"h2",h3:"h3",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,o.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(a.admonition,{type:"info",children:(0,t.jsxs)(a.p,{children:["This page is a summary of the\n",(0,t.jsxs)(a.a,{href:"https://paritytech.github.io/polkadot/book/protocol-overview.html",children:["Protocol Overview chapter in ",(0,t.jsx)(a.strong,{children:"The Polkadot Parachain Host Implementer's Guide"})]}),"\nand the\n",(0,t.jsxs)(a.a,{href:"https://spec.polkadot.network/chapter-anv",children:["Availability and Validity (AnV) chapter in ",(0,t.jsx)(a.strong,{children:"The Polkadot Protocol Specification"})]}),"."]})}),"\n",(0,t.jsx)(a.p,{children:"The Parachains' Protocol aims to carry a parachain's block from authoring to inclusion through a\nprocess that can be carried out repeatedly and in parallel for each parachain connected to the Relay\nChain. The protocol allows the network to be efficiently sharded among parachains while maintaining\nstrong security guarantees. The Availability and Validity (AnV) Protocol describes the Parachain\nProtocol from the perspective of availability and validity. on)."}),"\n",(0,t.jsx)(a.h2,{id:"main-actors",children:"Main Actors"}),"\n",(0,t.jsx)(a.h3,{id:"validators",children:(0,t.jsx)(a.a,{href:"/docs/learn-validator",children:"Validators"})}),"\n",(0,t.jsxs)(a.p,{children:["They are responsible for validating the proposed parachain's blocks by checking the\n",(0,t.jsx)(a.strong,{children:"Proof-of-Validity"}),' (PoV) of the blocks and ensuring the PoV remains available for a designated\nperiod. They have "skin in the game", meaning they have funds bonded on-chain that can be partially\nor fully confiscated by the network in case of misbehavior.']}),"\n",(0,t.jsx)(a.h3,{id:"collators",children:(0,t.jsx)(a.a,{href:"/docs/learn-collator",children:"Collators"})}),"\n",(0,t.jsx)(a.p,{children:"They create the PoV that validators know how to check. Creating PoV requires familiarity with\ntransaction format and block authoring rules of a specific parachain, as well as having access to\nits full state."}),"\n",(0,t.jsx)(a.h3,{id:"fishermen-deprecated",children:"Fishermen: Deprecated"}),"\n",(0,t.jsxs)(a.p,{children:["Fishermen are not planned for formal implementation, despite previous proposals in the\n",(0,t.jsx)(a.a,{href:"/docs/learn-parachains-protocol#availability-and-validity-anv-protocol",children:"AnV protocol"}),"."]}),"\n",(0,t.jsx)(a.p,{children:"The idea behind Fishermen is that they are full nodes of parachains, like collators, but perform a\ndifferent role in relation to the network. Instead of packaging the state transitions and producing\nthe next parachain blocks as collators do, fishermen will watch this process and ensure no invalid\nstate transitions are included."}),"\n",(0,t.jsxs)(a.p,{children:["To address the motivation behind the Fishermen design consideration, the current\n",(0,t.jsx)(a.a,{href:"#assignments--secondary-checks",children:"secondary backing checkers"})," perform a similar role in relation to\nthe network. From a security standpoint, security is based on having at least one honest validator\neither among parachain validators or secondary checker (more about this later on)."]}),"\n",(0,t.jsx)(a.h2,{id:"protocols-summary",children:"Protocols' Summary"}),"\n",(0,t.jsx)(a.h3,{id:"parachain-protocol",children:"Parachain Protocol"}),"\n",(0,t.jsx)(a.p,{children:"The parachain protocol is divided into two main phases:"}),"\n",(0,t.jsxs)(a.ul,{children:["\n",(0,t.jsxs)(a.li,{children:[(0,t.jsx)(a.a,{href:"#inclusion-pipeline",children:(0,t.jsx)(a.strong,{children:"Inclusion Pipeline"})}),": Collators send parachain blocks (parablocks) with\nPoV to Validators. Validators verify if the parablocks follow the state transition rules of the\nparachain and sign statements that can have a positive or negative outcome. With enough positive\nstatements, the block is ",(0,t.jsx)(a.strong,{children:"backed"})," and ",(0,t.jsx)(a.strong,{children:"included"})," in the relay chain, but is still pending\napproval."]}),"\n",(0,t.jsxs)(a.li,{children:[(0,t.jsx)(a.a,{href:"#approval-process",children:(0,t.jsx)(a.strong,{children:"Approval Process"})}),": Validators perform additional checks that, if positive,\nallow the parablock to be ",(0,t.jsx)(a.strong,{children:"approved"}),"."]}),"\n"]}),"\n",(0,t.jsx)(a.p,{children:"The figure below shows a representation of a parachain with collators and validators. The figure\nalso shows the journey of a parachain block (white square) through the Inclusion Pipeline and the\nApproval Process."}),"\n",(0,t.jsx)(a.p,{children:(0,t.jsx)(a.img,{alt:"parachain-protocol-summary",src:i(67937).A+"",width:"1920",height:"800"})}),"\n",(0,t.jsx)(a.h3,{id:"availability-and-validity-anv-protocol",children:"Availability and Validity (AnV) Protocol"}),"\n",(0,t.jsxs)(a.p,{children:["The Availability and Validity (AnV) Protocol is a way of looking at the Parachain Protocol from\nanother perspective, emphasizing the importance of a parablock being available and valid before\nbeing included in the finalized relay chain. It is divided into five different phases, three within\nthe ",(0,t.jsx)(a.a,{href:"#inclusion-pipeline",children:"Inclusion Pipeline"})," and two within the\n",(0,t.jsx)(a.a,{href:"#approval-process",children:"Approval Process"}),":"]}),"\n",(0,t.jsxs)(a.ul,{children:["\n",(0,t.jsxs)(a.li,{children:[(0,t.jsx)(a.strong,{children:"Inclusion Pipeline"}),"\n",(0,t.jsxs)(a.ol,{children:["\n",(0,t.jsx)(a.li,{children:(0,t.jsx)(a.a,{href:"#parachain-phase",children:"Parachain phase"})}),"\n",(0,t.jsx)(a.li,{children:(0,t.jsx)(a.a,{href:"#relay-chain-submission-phase",children:"Relay chain submission phase"})}),"\n",(0,t.jsx)(a.li,{children:(0,t.jsx)(a.a,{href:"#availability-and-unavailability-phase",children:"Availability and unavailability phase"})}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(a.li,{children:[(0,t.jsx)(a.strong,{children:"Approval Process"}),"\n",(0,t.jsxs)(a.ol,{children:["\n",(0,t.jsx)(a.li,{children:(0,t.jsx)(a.a,{href:"#assignments--secondary-checks",children:"Assignments and secondary (validity) checks"})}),"\n",(0,t.jsx)(a.li,{children:(0,t.jsx)(a.a,{href:"#chain-selection",children:"Chain Selection"})}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(a.p,{children:"In the Inclusion Pipeline, a parablock is made available (or unavailable), while in the Approval\nProcess a parablock is checked if it is valid or not."}),"\n",(0,t.jsx)(a.h2,{id:"inclusion-pipeline",children:"Inclusion Pipeline"}),"\n",(0,t.jsx)(a.h3,{id:"overview",children:"Overview"}),"\n",(0,t.jsx)(a.p,{children:"The inclusion pipeline is the path of a parachain block (or parablock) from its creation to its\ninclusion into the non-finalized relay chain (i.e. in a fork of the relay chain)."}),"\n",(0,t.jsx)(a.p,{children:(0,t.jsx)(a.img,{alt:"parachain-inclusion-pipeline",src:i(45379).A+"",width:"1920",height:"800"})}),"\n",(0,t.jsx)(a.p,{children:"The figure above shows the path of a candidate block through the Inclusion pipeline. The block\nchanges its status through this path as follows:"}),"\n",(0,t.jsxs)(a.ul,{children:["\n",(0,t.jsx)(a.li,{children:"Candidate: A block with its PoV is put forward by a collator to a para-validator (in this case\nV1). The candidate block is shown as a white square with one white tick mark at the side (PoV from\nthe collator). Note the candidate is not valid yet and can still fail to be included in the Relay\nChain."}),"\n",(0,t.jsx)(a.li,{children:"Seconded: The block is put forward by the para-validator V1 to other para-validators (in this case\nV2 and V3). The seconded block is shown as a white square with a white tick mark and a yellow tick\nmark on top of it. The yellow mark show the PoV from para-validator V1."}),"\n",(0,t.jsx)(a.li,{children:"Backable: The block validity is attested by a majority of the para-validators. The backable block\nis shown as white square with a white tick mark and three yellow tick marks on top of it. The\nyellow marks show the PoV from the para-validators, while the white mark the PoV from the\ncollator."}),"\n",(0,t.jsx)(a.li,{children:'Backed: The block is backed and noted in a fork on the relay chain by a relay chain block author\n(in this case V4). The backed block is shown as a square with white background and yellow border\nenclosing a "B". The backed block can still fail to be included in the relay chain. Note that for\nsimplicity here the backed parachain block is represented within the relay chain block, but in\nreality a relay chain block does not contain the parablocks themselves (more about this later).'}),"\n",(0,t.jsx)(a.li,{children:"Pending availability: The block is backed but not considered available yet."}),"\n",(0,t.jsx)(a.li,{children:'Included: The block is backed and considered available (we have a parablock). Included parablocks\nare shown as square with white background and yellow border enclosing an "I".'}),"\n"]}),"\n",(0,t.jsx)(a.admonition,{title:"Asynchronous Backing",type:"info",children:(0,t.jsxs)(a.p,{children:["Parablocks' backing and inclusion take 12 seconds to be recorded on the relay chain, i.e. backing\nhappens in one relay chain block (6 seconds) and inclusion in another relay chain block (additional\n6 seconds, see Figure above). With ",(0,t.jsx)(a.a,{href:"/docs/learn-async-backing",children:(0,t.jsx)(a.strong,{children:"asynchronous backing"})}),", backing and\ninclusion can be recorded in just one relay chain block."]})}),"\n",(0,t.jsx)(a.h3,{id:"parachain-phase",children:"Parachain Phase"}),"\n",(0,t.jsxs)(a.p,{children:["In the parachain phase, some validators are assigned to parachains by the ",(0,t.jsx)(a.strong,{children:"Validator Assignment\nRoutine"})," (these validators are called para-validators). Para-validators establish a connection with\ncollators, which propose candidate blocks together with Proof-of-Validity (PoV) to para-validators\nvia the ",(0,t.jsx)(a.strong,{children:"Collator Distribution Subsystem"}),"."]}),"\n",(0,t.jsxs)(a.p,{children:["Para-validators participate in the ",(0,t.jsx)(a.strong,{children:"Candidate Backing Subsystem"}),". A para-validator needs to check\nif the candidate block follows the\n",(0,t.jsx)(a.a,{href:"/docs/learn-parachains#state-transitions",children:"state transition"})," rules of the parachain. Because\nstates are stored within Merkle trees, a para-validator can verify state transitions without having\naccess to the entire state, but it needs:"]}),"\n",(0,t.jsxs)(a.ul,{children:["\n",(0,t.jsx)(a.li,{children:"The block candidate (list of state transitions)"}),"\n",(0,t.jsx)(a.li,{children:"The values in the parachain's database that the block modifies"}),"\n",(0,t.jsx)(a.li,{children:"The hashes of the unaffected points in the Merkle tree"}),"\n"]}),"\n",(0,t.jsx)(a.p,{children:"This set of information is the proof-of-validity (PoV)."}),"\n",(0,t.jsxs)(a.p,{children:["Once a para-validator has the PoV, it gossips this information to the other para-validators, who\ncheck the candidate block against the PoV. Candidates that gather more than half of signed validity\nstatements are considered ",(0,t.jsx)(a.strong,{children:"backable"})," (i.e. they ",(0,t.jsx)(a.em,{children:"seem"})," to represent a valid state transition), and\ntheir backing is the set of signed statements. The para-validators can then start to construct the\n",(0,t.jsx)(a.a,{href:"#candidate-receipts",children:(0,t.jsx)(a.strong,{children:"candidate receipt"})})," (this is what goes into the relay chain block) and an\n",(0,t.jsx)(a.a,{href:"#erasure-codes",children:(0,t.jsx)(a.strong,{children:"erasure coding"})})," (this is what will make the parablock available, more on this\nlater on) that will be sent to all validators in the network."]}),"\n",(0,t.jsx)(a.admonition,{title:"Polkadot guarantees valid state transitions, not valid states",type:"info",children:(0,t.jsx)(a.p,{children:"Validators do not inspect every value in a parachain's state, only those that are modified. This\ninsures that the modification is valid."})}),"\n",(0,t.jsxs)(a.p,{children:["Previously, we said that backable blocks ",(0,t.jsx)(a.em,{children:"seem"})," to represent valid state transitions because\npara-validators are a small subset of all validators. Thus, it is possible to have the majority of\nthem dishonest. Later on, we will see that more validators with come in to help to make sure the\nparablock is fully valid."]}),"\n",(0,t.jsx)(a.h3,{id:"relay-chain-submission-phase",children:"Relay Chain Submission Phase"}),"\n",(0,t.jsxs)(a.p,{children:["The ",(0,t.jsx)(a.a,{href:"#candidate-receipts",children:"receipt"})," of the backable parablock is added to the relay chain transaction\nqueue together with other receipts from other parachains. Receipts are gossiped around, and when a\nrelay chain block author wins ",(0,t.jsx)(a.a,{href:"/docs/learn-consensus#block-production-babe",children:"BABE"})," slot leadership, it\nwill select a candidate receipt to include in a block on a fork of the relay chain."]}),"\n",(0,t.jsxs)(a.p,{children:["A block author can note up to 1 backable candidate for each parachain to be included in the Relay\nChain block alongside its backing. Once included in a fork of the relay chain the candidate is\nconsidered ",(0,t.jsx)(a.strong,{children:"backed"})," in that fork. The candidate is considered to be in ",(0,t.jsx)(a.strong,{children:'"pending availability"'}),"\nstatus, and it can only be considered a part of the parachain once proven available. Remember, at\nthis stage validators of the relay chain already received the\n",(0,t.jsx)(a.a,{href:"#erasure-codes",children:"erasure coding information"})," of that specific parablock."]}),"\n",(0,t.jsx)(a.h3,{id:"availability-and-unavailability-phase",children:"Availability and Unavailability Phase"}),"\n",(0,t.jsxs)(a.p,{children:["During the availability and unavailability phases, the validators will participate to ",(0,t.jsx)(a.strong,{children:"Availability\nDistribution Subsystem"})," to ensure availability of the candidate. They gossip the\n",(0,t.jsx)(a.a,{href:"#erasure-codes",children:"erasure coded"})," pieces among the network. At least 1/3 + 1 validators must report\nthat they possess their piece of the code word. Once this threshold of validators has been reached,\nthe network can consider the candidate block available. The block is graduated to being a full\nparachain block, and its header will be included in that fork of the relay chain. The information\nabout the candidate availability is noted in the subsequent relay chain blocks of that fork."]}),"\n",(0,t.jsxs)(a.p,{children:["The availability check by the block author ensures that the relay chain will only include blocks for\nwhich the validators distributed their erasure-coded chunks, but it does not guarantee their\nvalidity. Because the number of para-validators on each parachain is so low, collusion is a\nreasonable concern. By separating block production\n(",(0,t.jsx)(a.a,{href:"/docs/learn-consensus#block-production-babe",children:"BABE"}),") from finality\n(",(0,t.jsx)(a.a,{href:"./learn-consensus.md/#finality-gadget-grandpa",children:"GRANDPA"}),"), validators can perform extra validity\nchecks after a block is produced but before it is finalized."]}),"\n",(0,t.jsxs)(a.p,{children:['Thus, once the parablock is considered available and part of the parachain, it is still "pending\napproval". The Inclusion Pipeline must conclude for a specific parachain before a new block can be\naccepted on that parachain. After inclusion, the ',(0,t.jsx)(a.a,{href:"#approval-process",children:"Approval Process"})," starts and it\nmakes sure the block is valid, and it can run for many parachain blocks at once."]}),"\n",(0,t.jsx)(a.admonition,{title:"Data Availability - Erasure Codes of Parachain Blocks and PoVs",type:"info",children:(0,t.jsxs)(a.p,{children:["The erasure code chunks necessary for reconstructing parachain blocks and their respective\nProofs-of-Validity (PoV) are stored on the relay chain validator\u2019s hardware (disk) and made\navailable to the relay chain network for up to 24 hours. It is important to note that this data is\nneither stored within the relay chain blocks nor in the chain state. Only the root of those chunks\nis embedded within the ",(0,t.jsx)(a.a,{href:"#candidate-receipts",children:"candidate receipt"})," and is stored in the relay chain\nblocks."]})}),"\n",(0,t.jsx)(a.h3,{id:"failure-to-inclusion",children:"Failure to Inclusion"}),"\n",(0,t.jsx)(a.p,{children:"The candidate can fail to be included in the parachain in any of the following ways:"}),"\n",(0,t.jsxs)(a.ul,{children:["\n",(0,t.jsx)(a.li,{children:"The collator cannot propagate the block to any of the assigned validators."}),"\n",(0,t.jsx)(a.li,{children:"The candidate is not backed by validators participating in the Candidate Backing subsystem."}),"\n",(0,t.jsx)(a.li,{children:"A relay chain block author does not select the candidate."}),"\n",(0,t.jsx)(a.li,{children:"The candidate's PoV is not considered available within a timeout, and the block is discarded from\nthe relay chain."}),"\n"]}),"\n",(0,t.jsx)(a.h2,{id:"approval-process",children:"Approval Process"}),"\n",(0,t.jsx)(a.h3,{id:"overview-1",children:"Overview"}),"\n",(0,t.jsxs)(a.p,{children:['Once the parablock is considered available and part of the parachain, it is still "pending\napproval". At this stage, the parablock is tentatively included in the parachain, although more\nconfirmation is necessary. The validators assigned to the parachain (i.e. the parachain validators)\nare sampled from a validator set assumed to be 1/3 dishonest in the worst-case scenario. In this\ncase, it is likely that the majority of the random para-validators sampled for a specific parachain\nare dishonest and can back a candidate wrongly. To address this, the ',(0,t.jsx)(a.strong,{children:"Approval Process"})," allows\ndetecting misbehavior after the fact without allocating more para-validators, which would ultimately\nreduce the system's throughput. As a parablock can accept children blocks after being considered\navailable, failure to pass the approval process will invalidate the parablock and its descendants\n(children blocks). Only the validators who backed the block in question will be\n",(0,t.jsx)(a.a,{href:"/docs/learn-offenses",children:"slashed"}),", not those who backed the descendants."]}),"\n",(0,t.jsx)(a.p,{children:"The approval pipeline can be divided into the following steps:"}),"\n",(0,t.jsxs)(a.ol,{children:["\n",(0,t.jsxs)(a.li,{children:["Parablocks included by the Inclusion Pipeline are pending approval for a time window known as the\n",(0,t.jsx)(a.strong,{children:"secondary checking window"}),"."]}),"\n",(0,t.jsxs)(a.li,{children:["During the secondary checking window, validators (secondary checkers) randomly self-select based\non a ",(0,t.jsx)(a.a,{href:"./learn-cryptography#vrf",children:"VRF"})," lottery to perform secondary checks on each of the\nparablock."]}),"\n",(0,t.jsx)(a.li,{children:"Secondary checkers acquire the parablock with PoV (erasure codings are necessary to reconstruct\nPoV) and re-run the validation function."}),"\n",(0,t.jsx)(a.li,{children:"Secondary checkers gossip about the results of their checks. Contradictory results lead to an\nescalation in which all validators must check the block. The validators on the losing side will\nbe slashed."}),"\n",(0,t.jsx)(a.li,{children:"At the end of the process the parablock is either approved or rejected."}),"\n"]}),"\n",(0,t.jsxs)(a.p,{children:["The figure below shows the path of a parachain block when it exits the Inclusion Pipeline, and\nenters the Approval Process. The parablock becomes accepted when it is backed, available and\n",(0,t.jsx)(a.strong,{children:"undisputed"}),'. The parablock is checked a second time by a subset of validators (V5, V6 and V7),\nand if there are no contradictory results the block is approved and gossiped to other relay chain\nvalidators. Note the parablock after secondary checks is shown as a square with a white background a\nyellow border enclosing an "I" (stands for ',(0,t.jsx)(a.em,{children:"included"}),"), and three white ticks (one for each\nsecondary check). Approved para-blocks are shown as yellow squares."]}),"\n",(0,t.jsx)(a.p,{children:(0,t.jsx)(a.img,{alt:"parachain-approval-process",src:i(60187).A+"",width:"1920",height:"800"})}),"\n",(0,t.jsx)(a.h3,{id:"assignments--secondary-checks",children:"Assignments & Secondary Checks"}),"\n",(0,t.jsxs)(a.p,{children:["Having a bad parablock on a fork of the relay chain is not catastrophic as long as the block is not\napproved and finalized by the finality gadget\n",(0,t.jsx)(a.a,{href:"./learn-consensus.md/#finality-gadget-grandpa",children:"GRANDPA"}),". If the block is not finalized, the fork on\nthe chain containing that block can be ignored in favor of another fork containing good blocks.\nDealing with a bad parablock includes the following stages:"]}),"\n",(0,t.jsxs)(a.ul,{children:["\n",(0,t.jsx)(a.li,{children:"Detection: the bad block must be detected by honest validators."}),"\n",(0,t.jsxs)(a.li,{children:["Escalation: the honest validators must start a ",(0,t.jsx)(a.a,{href:"#disputes",children:"dispute"}),"."]}),"\n",(0,t.jsxs)(a.li,{children:["Consequences: the backer for that parablock is ",(0,t.jsx)(a.a,{href:"/docs/learn-offenses",children:"slashed"}),"."]}),"\n"]}),"\n",(0,t.jsx)(a.p,{children:"The result of the dispute must be transplantable to all other forks so that malicious validators are\nslashed in all possible histories and so that honest validators will ignore any forks containing\nthat parablock."}),"\n",(0,t.jsx)(a.admonition,{title:"Parablocks vs. relay chain Blocks",type:"info",children:(0,t.jsx)(a.p,{children:"It is important to understand that a relay chain block does not contain parablocks, but\npara-headers. Parachain blocks are within the parachain. Thus, it makes more sense to think of relay\nchain blocks as having been approved instead of parablocks that have been approved. A relay chain\nblock containing information about approved parablocks can be considered approved as long as its\nparent relay chain block is also approved. Thus, the validity of a relay chain block depends on the\nvalidity of its ancestry."})}),"\n",(0,t.jsx)(a.p,{children:"Validators perform two main actions in the Approval Process:"}),"\n",(0,t.jsxs)(a.ul,{children:["\n",(0,t.jsxs)(a.li,{children:[(0,t.jsx)(a.strong,{children:(0,t.jsx)(a.a,{href:"https://paritytech.github.io/polkadot/book/protocol-approval.html#assignments",children:"Assignments"})}),"\ndetermine which validators perform approval checks on which candidates, ensuring each candidate\nreceives enough random checkers. This stage tracks approval votes to identify when\n",(0,t.jsx)(a.a,{href:"https://paritytech.github.io/polkadot/book/protocol-approval.html#no-shows",children:"no-show"})," approval\nchecks take suspiciously long. It also tracks relay chain\n",(0,t.jsx)(a.a,{href:"/docs/learn-offenses#slash-for-equivocation",children:"equivocations"})," to determine when adversaries\npossibly gained foreknowledge about assignments and add more checks in those cases. Assignees\ndetermine their own assignments to check specific candidates using two or three\n",(0,t.jsx)(a.a,{href:"https://paritytech.github.io/polkadot/book/protocol-approval.html#assignment-criteria",children:"assignment criteria"}),",\nwhich are based on two possible\n",(0,t.jsx)(a.a,{href:"https://paritytech.github.io/polkadot/book/protocol-approval.html#stories",children:"stories"})," about the\nrelay chain block that included the candidate (i.e. declared the candidate available).\n",(0,t.jsx)(a.a,{href:"https://paritytech.github.io/polkadot/book/protocol-approval.html#announcements--notices",children:"Assignment notices"}),"\nare gossiped among nodes so that all validators know which validators should check which\ncandidates, and if any candidate requires more checkers."]}),"\n",(0,t.jsxs)(a.li,{children:[(0,t.jsx)(a.strong,{children:"Approval checks"})," perform the checks by obtaining the candidate, verifying its validity, sending\nout the approval vote, or initiating a dispute. Approval checks have a no-show timeout window\n(i.e. longer than one relay chain slot) to succeed in reconstructing the candidate block, redo its\nerasure coding to check the candidate receipt, and recheck the candidate block itself. A validator\nbecomes tagged as a no-show if it does not approve or dispute within the no-show timeout window.\nBecause validators can be overloaded with assignments, they can intentionally delay sending their\nassignment notice to avoid creating no-shows (see more in\n",(0,t.jsx)(a.a,{href:"https://paritytech.github.io/polkadot/book/protocol-approval.html#assignment-postponement",children:"Assignment postponement"}),")."]}),"\n"]}),"\n",(0,t.jsxs)(a.p,{children:["These two steps first run as off-chain consensus protocols using messages gossiped among all\nvalidators, and then as on-chain record of those protocols' progress. The on-chain protocol is\nneeded to provide rewards for the off-chain protocol. The\n",(0,t.jsx)(a.a,{href:"https://paritytech.github.io/polkadot/book/protocol-approval.html#on-chain-verification",children:"on-chain verification"}),"\nhas two phases: a) assignments notices and approval votes are recorded in a relay chain block, and\nb) in another relay chain block notes are fed into the approval code."]}),"\n",(0,t.jsxs)(a.p,{children:["The gossiped messages are of two types, assignment notices, and approval votes, and are signed with\n",(0,t.jsx)(a.a,{href:"https://paritytech.github.io/polkadot/book/protocol-approval.html#approval-keys",children:"approval keys"}),".\nSuch keys are part of the ",(0,t.jsx)(a.a,{href:"./learn-cryptography.md/#session-keys",children:"session keys"})," used by validators.\nBriefly, approval keys are:"]}),"\n",(0,t.jsxs)(a.ul,{children:["\n",(0,t.jsxs)(a.li,{children:[(0,t.jsx)(a.strong,{children:"Approval assignment keys"})," that are sr25519 keys used only for assignment criteria\n",(0,t.jsx)(a.a,{href:"/docs/learn-cryptography#vrf",children:"VRF"}),"."]}),"\n",(0,t.jsxs)(a.li,{children:[(0,t.jsx)(a.strong,{children:"Approval vote keys"})," that are ed25519 and would only sign off on a candidate parablock validity."]}),"\n"]}),"\n",(0,t.jsx)(a.admonition,{type:"info",children:(0,t.jsxs)(a.p,{children:["For detailed information about the approval process, see dedicated section in\n",(0,t.jsx)(a.a,{href:"https://paritytech.github.io/polkadot/book/protocol-approval.html",children:"The Polkadot Parachain Host Implementers' Guide"}),"."]})}),"\n",(0,t.jsx)(a.p,{children:"Accepting a parablock is the result of having passed through the detection stage without dispute, or\nhaving passed through and escalation/dispute stage with a positive outcome."}),"\n",(0,t.jsx)(a.h3,{id:"chain-selection",children:"Chain Selection"}),"\n",(0,t.jsx)(a.p,{children:"After enough secondary checks have been performed on all candidate receipts within a block,\nvalidators can vote for that block (and all previous blocks) in GRANDPA. Once the block has more\nthan 2/3 of positive votes, the block is finalized on chain."}),"\n",(0,t.jsxs)(a.p,{children:["Chain selection is used to select blocks to build on and finalize. These processes need to\nconsistent among nodes and resilient to a maximum proportion of malicious nodes. The parachain host\nuses a block authoring system and a finality gadget. The chain selection strategy involves a\n",(0,t.jsx)(a.em,{children:(0,t.jsx)(a.a,{href:"https://paritytech.github.io/polkadot/book/protocol-chain-selection.html",children:"leaf-selection rule"})}),"\nand a set of\n",(0,t.jsx)(a.em,{children:(0,t.jsx)(a.a,{href:"https://paritytech.github.io/polkadot/book/protocol-chain-selection.html#the-best-chain-containing-rule",children:"finality constraints"})}),"."]}),"\n",(0,t.jsx)(a.admonition,{type:"info",children:(0,t.jsxs)(a.p,{children:["For detailed information about chain selection, see dedicated section in\n",(0,t.jsx)(a.a,{href:"https://paritytech.github.io/polkadot/book/protocol-chain-selection.html",children:"The Polkadot Parachain Host Implementers' Guide"}),"."]})}),"\n",(0,t.jsx)(a.h2,{id:"candidate-receipts",children:"Candidate Receipts"}),"\n",(0,t.jsx)(a.p,{children:"PoV are typically between 1 MB and 10 MB in size and are not included in the relay chain blocks. For\nPolkadot to scale to hundreds of parachains, PoV need to be represented by something smaller on the\nrelay chain: candidate receipts. A para-validator constructs a candidate receipt for a parachain\nblock by signing:"}),"\n",(0,t.jsxs)(a.ul,{children:["\n",(0,t.jsx)(a.li,{children:"The parachain ID."}),"\n",(0,t.jsx)(a.li,{children:"The collator's ID and signature."}),"\n",(0,t.jsx)(a.li,{children:"A hash of the parent block's candidate receipt."}),"\n",(0,t.jsx)(a.li,{children:"A Merkle root of the block's erasure-coded pieces."}),"\n",(0,t.jsx)(a.li,{children:"A Merkle root of any outgoing messages."}),"\n",(0,t.jsx)(a.li,{children:"A hash of the block."}),"\n",(0,t.jsx)(a.li,{children:"The state root of the parachain before block execution."}),"\n",(0,t.jsx)(a.li,{children:"The state root of the parachain after block execution."}),"\n"]}),"\n",(0,t.jsx)(a.p,{children:"This information is of constant size, while the actual PoV block of the parachain can be variable\nlength. It is enough information for anyone that obtains the full PoV block to verify the state\ntransition contained inside of it."}),"\n",(0,t.jsx)(a.h2,{id:"erasure-codes",children:"Erasure Codes"}),"\n",(0,t.jsx)(a.p,{children:"Before sending the candidate receipt to the relay chain transaction queue, the para-validator who\nconstructs the receipt must also construct an erasure coding of the parachain block."}),"\n",(0,t.jsx)(a.p,{children:"An erasure coding takes a message (in this case, the parachain block and PoV) and creates a set of\nsmaller messages such that you can reconstruct the original message by obtaining a fraction of the\nsmaller messages. In the case of Polkadot, the total number of smaller messages is equal to the\ntotal number of validators and the fraction is 1/3."}),"\n",(0,t.jsx)(a.p,{children:"The para-validator creates the erasure coding chunks, puts them into their Merkle tree, and sends\nout each chunk (together with the candidate receipt) to a corresponding validator on the Relay\nChain. Validators who receive the receipts with an erasure coding chunk will include the receipt in\nthe relay chain queue, where an author can include it in a block."}),"\n",(0,t.jsxs)(a.p,{children:["The type of erasure codes used by Polkadot's availability scheme are\n",(0,t.jsx)(a.a,{href:"https://en.wikipedia.org/wiki/Reed%E2%80%93Solomon_error_correction",children:"Reed-Solomon"})," codes, which\nalready enjoy a battle-tested application in technology outside the blockchain industry. One example\nis found in the compact disk industry. CDs use Reed-Solomon codes to correct any missing data due to\ninconsistencies on the disk face such as dust particles or scratches."]}),"\n",(0,t.jsx)(a.p,{children:"In Polkadot, the erasure codes are used to keep parachain state available to the system without\nrequiring all validators to keep tabs on all the parachains. Instead, validators share smaller\npieces of the data and can later reconstruct the entire data under the assumption that 1/3+1 of the\nvalidators can provide their pieces of the data."}),"\n",(0,t.jsx)(a.admonition,{type:"note",children:(0,t.jsx)(a.p,{children:"The 1/3+1 threshold of validators that must be responsive to construct the full parachain state data\ncorresponds to Polkadot's security assumption about Byzantine nodes."})}),"\n",(0,t.jsx)(a.h2,{id:"disputes",children:"Disputes"}),"\n",(0,t.jsx)(a.p,{children:"All parachain blocks that are in the finalized relay chain should be valid. This does not apply to\nbacked blocks that are not included. To ensure nothing invalid ends up in the finalized relay chain,\nthere are approval checks (described above) and disputes. The latter ensures that each attempt to\ninclude something invalid is caught and the offending validators are punished."}),"\n",(0,t.jsxs)(a.p,{children:["False positives can happen; those actors responsible for it will be ",(0,t.jsx)(a.a,{href:"/docs/learn-offenses",children:"slashed"}),".\nTo detect false positives, PoV information must be available after the block has been included to\nthe relay chain via the ",(0,t.jsx)(a.a,{href:"#availability-and-unavailability-phase",children:"availability scheme"}),"."]}),"\n",(0,t.jsxs)(a.p,{children:["Disputes are ",(0,t.jsx)(a.em,{children:"independent from a particular fork"}),", while backing and approval operate on particular\nforks. The approval voting stops if an alternative fork (which might not contain the\ncurrently-approved candidate) is finalized. The sole purpose of the approval process is to make sure\ninvalid blocks are not finalized. However, even though the danger is past and the offending\nvalidators did not manage to get the invalid block approved, those validators need to get slashed\nfor the attempt."]}),"\n",(0,t.jsx)(a.p,{children:"A dispute stems from a disagreement between two or more validators. For this to happen, a bad actor\nneeds to distribute an invalid block to honest validators. Scenarios leading to a dispute can be one\nof the followings (ordered from most to least important):"}),"\n",(0,t.jsxs)(a.ul,{children:["\n",(0,t.jsx)(a.li,{children:"A parablock included on a branch of the relay chain is bad"}),"\n",(0,t.jsx)(a.li,{children:"A parablock backed on a branch of the relay chain is bad"}),"\n",(0,t.jsx)(a.li,{children:"A parablock seconded, but not backed on any branch of the relay chain, is bad"}),"\n"]}),"\n",(0,t.jsx)(a.p,{children:"Checking a parachain block requires three pieces of data: the parachain validator code, the\navailability of data, and the candidate receipt. The validator code is available on-chain and\npublished ahead of time. Thus, a dispute process begins with the availability to ensure the\navailability of the data. Such a process will conclude quickly if the data is already available,\notherwise, the initiator of the dispute must make it available."}),"\n",(0,t.jsxs)(a.p,{children:["Disputes have both off- and on-chain components. Slashing is handled on-chain, so votes by\nvalidators on either side of the dispute must be placed on-chain. Moreover, a dispute on one branch\nof the chain must be transposed to all active branches so that misbehavior can be punished in all\npossible histories. There is, thus, a distinction between ",(0,t.jsx)(a.em,{children:"local"})," (the one we are looking at) and\n",(0,t.jsx)(a.em,{children:"remote"})," disputes relative to a particular branch of the relay chain."]}),"\n",(0,t.jsx)(a.p,{children:"Disputes can be divided into three different phases:"}),"\n",(0,t.jsxs)(a.ul,{children:["\n",(0,t.jsxs)(a.li,{children:[(0,t.jsx)(a.a,{href:"https://paritytech.github.io/polkadot/book/protocol-disputes.html#initiation",children:"Dispute initiation"}),":\nDisputes are initiated by any validator who finds their opinion on the validity of a parablock in\nopposition to another issued statement. The initiation begins off-chain by only nodes perceiving\nthat a parablock is bad. The validator can be one of the para-validators (i.e. one of the backers)\nor one of the approval checkers. Note that if the dispute occurs during the backing phase, the\ninitiator must make the data available while if the dispute occurs during the approval process the\ndata is already available."]}),"\n",(0,t.jsxs)(a.li,{children:[(0,t.jsx)(a.a,{href:"https://paritytech.github.io/polkadot/book/protocol-disputes.html#dispute-participation",children:"Dispute participation"}),":\nOnce becoming aware of the dispute, all validators must participate."]}),"\n",(0,t.jsxs)(a.li,{children:[(0,t.jsx)(a.a,{href:"https://paritytech.github.io/polkadot/book/protocol-disputes.html#dispute-conclusion",children:"Dispute conclusion"}),":\nDisputes conclude after a 2/3 supermajority is reached on either side. Disputes may also conclude\nafter a timeout. This will only happen if the majority of validators are unable to vote for some\nreason."]}),"\n"]}),"\n",(0,t.jsx)(a.p,{children:"The on-chain component of the dispute can be initiated by providing any two conflicting votes and it\nalso waits for a 2/3 supermajority on either side. The component also tracks which parablocks have\nalready been disputed so that the same parablock can be disputed only once on any branch of the\nrelay chain. Inclusion is halted for the parachain until the dispute resolves."}),"\n",(0,t.jsx)(a.admonition,{type:"info",children:(0,t.jsxs)(a.p,{children:["For detailed information about disputes, see dedicated section in\n",(0,t.jsx)(a.a,{href:"https://paritytech.github.io/polkadot/book/protocol-disputes.html",children:"The Polkadot Parachain Host Implementers' Guide"}),".\nIn the Guide, there are also more details about\n",(0,t.jsx)(a.a,{href:"https://paritytech.github.io/polkadot/book/disputes-flow.html",children:"disputes' flows"}),"."]})}),"\n",(0,t.jsx)(a.h2,{id:"network-asynchrony",children:"Network Asynchrony"}),"\n",(0,t.jsxs)(a.p,{children:["We have mentioned how a relay chain block author must select the candidate and note it on the Relay\nChain (we say the block is backed). The relay chain block author is selected by\n",(0,t.jsx)(a.a,{href:"/docs/learn-consensus#block-production-babe",children:"BABE"}),", which is a forkful algorithm. This means that\ndifferent block authors are chosen at the same time, and they may not work on the same block parent\n(i.e. the representations in the previous figures are simplistic). Also, the sets of validators and\nparachains are not fixed, and the validators' assignments to parachains is also flexible."]}),"\n",(0,t.jsxs)(a.p,{children:["We say that the network is ",(0,t.jsx)(a.strong,{children:"asynchronous"})," since there will be validators who have received a block\nand other validators who did not. Thus, the network is variable, and it exists in multiple states.\nIn the figure below (",(0,t.jsx)(a.em,{children:"left"}),"), Group 1 received block C while Group 2 did not due to network\nasynchrony. Validators in Group 2 can build another block on top of B, called C'. Assume that\nafterward, some validators become aware of both C and C' while others remain aware of one of them\n(",(0,t.jsx)(a.em,{children:"right"}),"). Validators in Group 3 must be aware of the network state in each head (C and C\u2019), and\nthey may contribute to some or full extent on both. It is possible that due to network asynchrony,\ntwo forks may grow in parallel for some time, but eventually, one fork will be chosen by the\nfinality gadget. In the absence of an adversarial network, it is unlikely that two forks will\ncoexist for some time as there will be validators aware of both chain heads."]}),"\n",(0,t.jsx)(a.p,{children:(0,t.jsx)(a.img,{alt:"parachain-forks",src:i(76091).A+"",width:"1920",height:"800"})}),"\n",(0,t.jsx)(a.h2,{id:"further-resources",children:"Further Resources"}),"\n",(0,t.jsxs)(a.ul,{children:["\n",(0,t.jsxs)(a.li,{children:[(0,t.jsx)(a.a,{href:"https://polkadot.network/the-path-of-a-parachain-block/",children:"Path of a Parachain Block"})," - Article by\nParity analyst Joe Petrowski expounds on the validity checks that a parachain block must pass in\norder to progress the parachain."]}),"\n",(0,t.jsxs)(a.li,{children:[(0,t.jsx)(a.a,{href:"https://github.com/w3f/research/tree/85cd4adfccb7d435f21cd9fd249cd1b7f5167537/docs/papers/AnV",children:"Availability and Validity"})," -\nPaper by the W3F Research Team that specifies the availability and validity protocol in detail."]}),"\n"]})]})}function d(e={}){const{wrapper:a}={...(0,o.R)(),...e.components};return a?(0,t.jsx)(a,{...e,children:(0,t.jsx)(c,{...e})}):c(e)}},60187:(e,a,i)=>{i.d(a,{A:()=>n});const n=i.p+"assets/images/parachain-approval-process-a025570e14282288fee420715c4e3030.png"},76091:(e,a,i)=>{i.d(a,{A:()=>n});const n=i.p+"assets/images/parachain-forks-b3d4a4e9161292fb63e1b86888a18579.png"},45379:(e,a,i)=>{i.d(a,{A:()=>n});const n=i.p+"assets/images/parachain-inclusion-pipeline-134e3949a7f607efc561d4992b52767c.png"},67937:(e,a,i)=>{i.d(a,{A:()=>n});const n=i.p+"assets/images/parachain-protocol-summary-7c052aadda3eee685f56bcc65d59fc71.png"},28453:(e,a,i)=>{i.d(a,{R:()=>s,x:()=>r});var n=i(96540);const t={},o=n.createContext(t);function s(e){const a=n.useContext(o);return n.useMemo((function(){return"function"==typeof e?e(a):{...a,...e}}),[a,e])}function r(e){let a;return a=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:s(e.components),n.createElement(o.Provider,{value:a},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/4d9b9869.f9cdb173.js b/assets/js/4d9b9869.f9cdb173.js deleted file mode 100644 index 5b6f4102c72c..000000000000 --- a/assets/js/4d9b9869.f9cdb173.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9550],{75024:(e,a,i)=>{i.r(a),i.d(a,{assets:()=>l,contentTitle:()=>s,default:()=>d,frontMatter:()=>o,metadata:()=>r,toc:()=>h});var n=i(74848),t=i(28453);const o={id:"learn-parachains-protocol",title:"Parachains' Protocol Overview",sidebar_label:"Protocol Overview",description:"Actors and Protocols involved in Polkadot and its Parachains' Block Finality.",keywords:["parachains","application-specific","sharding","protocol","validator","collator","nominator","AnV","availability","validity"],slug:"../learn-parachains-protocol"},s=void 0,r={id:"learn/learn-parachains-protocol",title:"Parachains' Protocol Overview",description:"Actors and Protocols involved in Polkadot and its Parachains' Block Finality.",source:"@site/../docs/learn/learn-parachains-protocol.md",sourceDirName:"learn",slug:"/learn-parachains-protocol",permalink:"/docs/learn-parachains-protocol",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-parachains-protocol.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1727991122e3,frontMatter:{id:"learn-parachains-protocol",title:"Parachains' Protocol Overview",sidebar_label:"Protocol Overview",description:"Actors and Protocols involved in Polkadot and its Parachains' Block Finality.",keywords:["parachains","application-specific","sharding","protocol","validator","collator","nominator","AnV","availability","validity"],slug:"../learn-parachains-protocol"},sidebar:"docs",previous:{title:"Introduction to Parachains",permalink:"/docs/learn-parachains"},next:{title:"System Parachains",permalink:"/docs/learn-system-chains"}},l={},h=[{value:"Main Actors",id:"main-actors",level:2},{value:"Validators",id:"validators",level:3},{value:"Collators",id:"collators",level:3},{value:"Fishermen: Deprecated",id:"fishermen-deprecated",level:3},{value:"Protocols' Summary",id:"protocols-summary",level:2},{value:"Parachain Protocol",id:"parachain-protocol",level:3},{value:"Availability and Validity (AnV) Protocol",id:"availability-and-validity-anv-protocol",level:3},{value:"Inclusion Pipeline",id:"inclusion-pipeline",level:2},{value:"Overview",id:"overview",level:3},{value:"Parachain Phase",id:"parachain-phase",level:3},{value:"Relay Chain Submission Phase",id:"relay-chain-submission-phase",level:3},{value:"Availability and Unavailability Phase",id:"availability-and-unavailability-phase",level:3},{value:"Failure to Inclusion",id:"failure-to-inclusion",level:3},{value:"Approval Process",id:"approval-process",level:2},{value:"Overview",id:"overview-1",level:3},{value:"Assignments & Secondary Checks",id:"assignments--secondary-checks",level:3},{value:"Chain Selection",id:"chain-selection",level:3},{value:"Candidate Receipts",id:"candidate-receipts",level:2},{value:"Erasure Codes",id:"erasure-codes",level:2},{value:"Disputes",id:"disputes",level:2},{value:"Network Asynchrony",id:"network-asynchrony",level:2},{value:"Further Resources",id:"further-resources",level:2}];function c(e){const a={a:"a",admonition:"admonition",em:"em",h2:"h2",h3:"h3",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,t.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(a.admonition,{type:"info",children:(0,n.jsxs)(a.p,{children:["This page is a summary of the\n",(0,n.jsxs)(a.a,{href:"https://paritytech.github.io/polkadot/book/protocol-overview.html",children:["Protocol Overview chapter in ",(0,n.jsx)(a.strong,{children:"The Polkadot Parachain Host Implementer's Guide"})]}),"\nand the\n",(0,n.jsxs)(a.a,{href:"https://spec.polkadot.network/chapter-anv",children:["Availability and Validity (AnV) chapter in ",(0,n.jsx)(a.strong,{children:"The Polkadot Protocol Specification"})]}),"."]})}),"\n",(0,n.jsx)(a.p,{children:"The Parachains' Protocol aims to carry a parachain's block from authoring to inclusion through a\nprocess that can be carried out repeatedly and in parallel for each parachain connected to the Relay\nChain. The protocol allows the network to be efficiently sharded among parachains while maintaining\nstrong security guarantees. The Availability and Validity (AnV) Protocol describes the Parachain\nProtocol from the perspective of availability and validity. on)."}),"\n",(0,n.jsx)(a.h2,{id:"main-actors",children:"Main Actors"}),"\n",(0,n.jsx)(a.h3,{id:"validators",children:(0,n.jsx)(a.a,{href:"/docs/learn-validator",children:"Validators"})}),"\n",(0,n.jsxs)(a.p,{children:["They are responsible for validating the proposed parachain's blocks by checking the\n",(0,n.jsx)(a.strong,{children:"Proof-of-Validity"}),' (PoV) of the blocks and ensuring the PoV remains available for a designated\nperiod. They have "skin in the game", meaning they have funds bonded on-chain that can be partially\nor fully confiscated by the network in case of misbehavior.']}),"\n",(0,n.jsx)(a.h3,{id:"collators",children:(0,n.jsx)(a.a,{href:"/docs/learn-collator",children:"Collators"})}),"\n",(0,n.jsx)(a.p,{children:"They create the PoV that validators know how to check. Creating PoV requires familiarity with\ntransaction format and block authoring rules of a specific parachain, as well as having access to\nits full state."}),"\n",(0,n.jsx)(a.h3,{id:"fishermen-deprecated",children:"Fishermen: Deprecated"}),"\n",(0,n.jsxs)(a.p,{children:["Fishermen are not planned for formal implementation, despite previous proposals in the\n",(0,n.jsx)(a.a,{href:"/docs/learn-parachains-protocol#availability-and-validity-anv-protocol",children:"AnV protocol"}),"."]}),"\n",(0,n.jsx)(a.p,{children:"The idea behind Fishermen is that they are full nodes of parachains, like collators, but perform a\ndifferent role in relation to the network. Instead of packaging the state transitions and producing\nthe next parachain blocks as collators do, fishermen will watch this process and ensure no invalid\nstate transitions are included."}),"\n",(0,n.jsxs)(a.p,{children:["To address the motivation behind the Fishermen design consideration, the current\n",(0,n.jsx)(a.a,{href:"#assignments--secondary-checks",children:"secondary backing checkers"})," perform a similar role in relation to\nthe network. From a security standpoint, security is based on having at least one honest validator\neither among parachain validators or secondary checker (more about this later on)."]}),"\n",(0,n.jsx)(a.h2,{id:"protocols-summary",children:"Protocols' Summary"}),"\n",(0,n.jsx)(a.h3,{id:"parachain-protocol",children:"Parachain Protocol"}),"\n",(0,n.jsx)(a.p,{children:"The parachain protocol is divided into two main phases:"}),"\n",(0,n.jsxs)(a.ul,{children:["\n",(0,n.jsxs)(a.li,{children:[(0,n.jsx)(a.a,{href:"#inclusion-pipeline",children:(0,n.jsx)(a.strong,{children:"Inclusion Pipeline"})}),": Collators send parachain blocks (parablocks) with\nPoV to Validators. Validators verify if the parablocks follow the state transition rules of the\nparachain and sign statements that can have a positive or negative outcome. With enough positive\nstatements, the block is ",(0,n.jsx)(a.strong,{children:"backed"})," and ",(0,n.jsx)(a.strong,{children:"included"})," in the relay chain, but is still pending\napproval."]}),"\n",(0,n.jsxs)(a.li,{children:[(0,n.jsx)(a.a,{href:"#approval-process",children:(0,n.jsx)(a.strong,{children:"Approval Process"})}),": Validators perform additional checks that, if positive,\nallow the parablock to be ",(0,n.jsx)(a.strong,{children:"approved"}),"."]}),"\n"]}),"\n",(0,n.jsx)(a.p,{children:"The figure below shows a representation of a parachain with collators and validators. The figure\nalso shows the journey of a parachain block (white square) through the Inclusion Pipeline and the\nApproval Process."}),"\n",(0,n.jsx)(a.p,{children:(0,n.jsx)(a.img,{alt:"parachain-protocol-summary",src:i(67937).A+"",width:"1920",height:"800"})}),"\n",(0,n.jsx)(a.h3,{id:"availability-and-validity-anv-protocol",children:"Availability and Validity (AnV) Protocol"}),"\n",(0,n.jsxs)(a.p,{children:["The Availability and Validity (AnV) Protocol is a way of looking at the Parachain Protocol from\nanother perspective, emphasizing the importance of a parablock being available and valid before\nbeing included in the finalized relay chain. It is divided into five different phases, three within\nthe ",(0,n.jsx)(a.a,{href:"#inclusion-pipeline",children:"Inclusion Pipeline"})," and two within the\n",(0,n.jsx)(a.a,{href:"#approval-process",children:"Approval Process"}),":"]}),"\n",(0,n.jsxs)(a.ul,{children:["\n",(0,n.jsxs)(a.li,{children:[(0,n.jsx)(a.strong,{children:"Inclusion Pipeline"}),"\n",(0,n.jsxs)(a.ol,{children:["\n",(0,n.jsx)(a.li,{children:(0,n.jsx)(a.a,{href:"#parachain-phase",children:"Parachain phase"})}),"\n",(0,n.jsx)(a.li,{children:(0,n.jsx)(a.a,{href:"#relay-chain-submission-phase",children:"Relay chain submission phase"})}),"\n",(0,n.jsx)(a.li,{children:(0,n.jsx)(a.a,{href:"#availability-and-unavailability-phase",children:"Availability and unavailability phase"})}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(a.li,{children:[(0,n.jsx)(a.strong,{children:"Approval Process"}),"\n",(0,n.jsxs)(a.ol,{children:["\n",(0,n.jsx)(a.li,{children:(0,n.jsx)(a.a,{href:"#assignments--secondary-checks",children:"Assignments and secondary (validity) checks"})}),"\n",(0,n.jsx)(a.li,{children:(0,n.jsx)(a.a,{href:"#chain-selection",children:"Chain Selection"})}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(a.p,{children:"In the Inclusion Pipeline, a parablock is made available (or unavailable), while in the Approval\nProcess a parablock is checked if it is valid or not."}),"\n",(0,n.jsx)(a.h2,{id:"inclusion-pipeline",children:"Inclusion Pipeline"}),"\n",(0,n.jsx)(a.h3,{id:"overview",children:"Overview"}),"\n",(0,n.jsx)(a.p,{children:"The inclusion pipeline is the path of a parachain block (or parablock) from its creation to its\ninclusion into the non-finalized relay chain (i.e. in a fork of the relay chain)."}),"\n",(0,n.jsx)(a.p,{children:(0,n.jsx)(a.img,{alt:"parachain-inclusion-pipeline",src:i(45379).A+"",width:"1920",height:"800"})}),"\n",(0,n.jsx)(a.p,{children:"The figure above shows the path of a candidate block through the Inclusion pipeline. The block\nchanges its status through this path as follows:"}),"\n",(0,n.jsxs)(a.ul,{children:["\n",(0,n.jsx)(a.li,{children:"Candidate: A block with its PoV is put forward by a collator to a para-validator (in this case\nV1). The candidate block is shown as a white square with one white tick mark at the side (PoV from\nthe collator). Note the candidate is not valid yet and can still fail to be included in the Relay\nChain."}),"\n",(0,n.jsx)(a.li,{children:"Seconded: The block is put forward by the para-validator V1 to other para-validators (in this case\nV2 and V3). The seconded block is shown as a white square with a white tick mark and a yellow tick\nmark on top of it. The yellow mark show the PoV from para-validator V1."}),"\n",(0,n.jsx)(a.li,{children:"Backable: The block validity is attested by a majority of the para-validators. The backable block\nis shown as white square with a white tick mark and three yellow tick marks on top of it. The\nyellow marks show the PoV from the para-validators, while the white mark the PoV from the\ncollator."}),"\n",(0,n.jsx)(a.li,{children:'Backed: The block is backed and noted in a fork on the relay chain by a relay chain block author\n(in this case V4). The backed block is shown as a square with white background and yellow border\nenclosing a "B". The backed block can still fail to be included in the relay chain. Note that for\nsimplicity here the backed parachain block is represented within the relay chain block, but in\nreality a relay chain block does not contain the parablocks themselves (more about this later).'}),"\n",(0,n.jsx)(a.li,{children:"Pending availability: The block is backed but not considered available yet."}),"\n",(0,n.jsx)(a.li,{children:'Included: The block is backed and considered available (we have a parablock). Included parablocks\nare shown as square with white background and yellow border enclosing an "I".'}),"\n"]}),"\n",(0,n.jsx)(a.admonition,{title:"Asynchronous Backing",type:"info",children:(0,n.jsxs)(a.p,{children:["Parablocks' backing and inclusion take 12 seconds to be recorded on the relay chain, i.e. backing\nhappens in one relay chain block (6 seconds) and inclusion in another relay chain block (additional\n6 seconds, see Figure above). With ",(0,n.jsx)(a.a,{href:"/docs/learn-async-backing",children:(0,n.jsx)(a.strong,{children:"asynchronous backing"})}),", backing and\ninclusion can be recorded in just one relay chain block."]})}),"\n",(0,n.jsx)(a.h3,{id:"parachain-phase",children:"Parachain Phase"}),"\n",(0,n.jsxs)(a.p,{children:["In the parachain phase, some validators are assigned to parachains by the ",(0,n.jsx)(a.strong,{children:"Validator Assignment\nRoutine"})," (these validators are called para-validators). Para-validators establish a connection with\ncollators, which propose candidate blocks together with Proof-of-Validity (PoV) to para-validators\nvia the ",(0,n.jsx)(a.strong,{children:"Collator Distribution Subsystem"}),"."]}),"\n",(0,n.jsxs)(a.p,{children:["Para-validators participate in the ",(0,n.jsx)(a.strong,{children:"Candidate Backing Subsystem"}),". A para-validator needs to check\nif the candidate block follows the\n",(0,n.jsx)(a.a,{href:"/docs/learn-parachains#state-transitions",children:"state transition"})," rules of the parachain. Because\nstates are stored within Merkle trees, a para-validator can verify state transitions without having\naccess to the entire state, but it needs:"]}),"\n",(0,n.jsxs)(a.ul,{children:["\n",(0,n.jsx)(a.li,{children:"The block candidate (list of state transitions)"}),"\n",(0,n.jsx)(a.li,{children:"The values in the parachain's database that the block modifies"}),"\n",(0,n.jsx)(a.li,{children:"The hashes of the unaffected points in the Merkle tree"}),"\n"]}),"\n",(0,n.jsx)(a.p,{children:"This set of information is the proof-of-validity (PoV)."}),"\n",(0,n.jsxs)(a.p,{children:["Once a para-validator has the PoV, it gossips this information to the other para-validators, who\ncheck the candidate block against the PoV. Candidates that gather more than half of signed validity\nstatements are considered ",(0,n.jsx)(a.strong,{children:"backable"})," (i.e. they ",(0,n.jsx)(a.em,{children:"seem"})," to represent a valid state transition), and\ntheir backing is the set of signed statements. The para-validators can then start to construct the\n",(0,n.jsx)(a.a,{href:"#candidate-receipts",children:(0,n.jsx)(a.strong,{children:"candidate receipt"})})," (this is what goes into the relay chain block) and an\n",(0,n.jsx)(a.a,{href:"#erasure-codes",children:(0,n.jsx)(a.strong,{children:"erasure coding"})})," (this is what will make the parablock available, more on this\nlater on) that will be sent to all validators in the network."]}),"\n",(0,n.jsx)(a.admonition,{title:"Polkadot guarantees valid state transitions, not valid states",type:"info",children:(0,n.jsx)(a.p,{children:"Validators do not inspect every value in a parachain's state, only those that are modified. This\ninsures that the modification is valid."})}),"\n",(0,n.jsxs)(a.p,{children:["Previously, we said that backable blocks ",(0,n.jsx)(a.em,{children:"seem"})," to represent valid state transitions because\npara-validators are a small subset of all validators. Thus, it is possible to have the majority of\nthem dishonest. Later on, we will see that more validators with come in to help to make sure the\nparablock is fully valid."]}),"\n",(0,n.jsx)(a.h3,{id:"relay-chain-submission-phase",children:"Relay Chain Submission Phase"}),"\n",(0,n.jsxs)(a.p,{children:["The ",(0,n.jsx)(a.a,{href:"#candidate-receipts",children:"receipt"})," of the backable parablock is added to the relay chain transaction\nqueue together with other receipts from other parachains. Receipts are gossiped around, and when a\nrelay chain block author wins ",(0,n.jsx)(a.a,{href:"/docs/learn-consensus#block-production-babe",children:"BABE"})," slot leadership, it\nwill select a candidate receipt to include in a block on a fork of the relay chain."]}),"\n",(0,n.jsxs)(a.p,{children:["A block author can note up to 1 backable candidate for each parachain to be included in the Relay\nChain block alongside its backing. Once included in a fork of the relay chain the candidate is\nconsidered ",(0,n.jsx)(a.strong,{children:"backed"})," in that fork. The candidate is considered to be in ",(0,n.jsx)(a.strong,{children:'"pending availability"'}),"\nstatus, and it can only be considered a part of the parachain once proven available. Remember, at\nthis stage validators of the relay chain already received the\n",(0,n.jsx)(a.a,{href:"#erasure-codes",children:"erasure coding information"})," of that specific parablock."]}),"\n",(0,n.jsx)(a.h3,{id:"availability-and-unavailability-phase",children:"Availability and Unavailability Phase"}),"\n",(0,n.jsxs)(a.p,{children:["During the availability and unavailability phases, the validators will participate to ",(0,n.jsx)(a.strong,{children:"Availability\nDistribution Subsystem"})," to ensure availability of the candidate. They gossip the\n",(0,n.jsx)(a.a,{href:"#erasure-codes",children:"erasure coded"})," pieces among the network. At least 1/3 + 1 validators must report\nthat they possess their piece of the code word. Once this threshold of validators has been reached,\nthe network can consider the candidate block available. The block is graduated to being a full\nparachain block, and its header will be included in that fork of the relay chain. The information\nabout the candidate availability is noted in the subsequent relay chain blocks of that fork."]}),"\n",(0,n.jsxs)(a.p,{children:["The availability check by the block author ensures that the relay chain will only include blocks for\nwhich the validators distributed their erasure-coded chunks, but it does not guarantee their\nvalidity. Because the number of para-validators on each parachain is so low, collusion is a\nreasonable concern. By separating block production\n(",(0,n.jsx)(a.a,{href:"/docs/learn-consensus#block-production-babe",children:"BABE"}),") from finality\n(",(0,n.jsx)(a.a,{href:"./learn-consensus.md/#finality-gadget-grandpa",children:"GRANDPA"}),"), validators can perform extra validity\nchecks after a block is produced but before it is finalized."]}),"\n",(0,n.jsxs)(a.p,{children:['Thus, once the parablock is considered available and part of the parachain, it is still "pending\napproval". The Inclusion Pipeline must conclude for a specific parachain before a new block can be\naccepted on that parachain. After inclusion, the ',(0,n.jsx)(a.a,{href:"#approval-process",children:"Approval Process"})," starts and it\nmakes sure the block is valid, and it can run for many parachain blocks at once."]}),"\n",(0,n.jsx)(a.admonition,{title:"Data Availability - Erasure Codes of Parachain Blocks and PoVs",type:"info",children:(0,n.jsxs)(a.p,{children:["The erasure code chunks necessary for reconstructing parachain blocks and their respective\nProofs-of-Validity (PoV) are stored on the relay chain validator\u2019s hardware (disk) and made\navailable to the relay chain network for up to 24 hours. It is important to note that this data is\nneither stored within the relay chain blocks nor in the chain state. Only the root of those chunks\nis embedded within the ",(0,n.jsx)(a.a,{href:"#candidate-receipts",children:"candidate receipt"})," and is stored in the relay chain\nblocks."]})}),"\n",(0,n.jsx)(a.h3,{id:"failure-to-inclusion",children:"Failure to Inclusion"}),"\n",(0,n.jsx)(a.p,{children:"The candidate can fail to be included in the parachain in any of the following ways:"}),"\n",(0,n.jsxs)(a.ul,{children:["\n",(0,n.jsx)(a.li,{children:"The collator cannot propagate the block to any of the assigned validators."}),"\n",(0,n.jsx)(a.li,{children:"The candidate is not backed by validators participating in the Candidate Backing subsystem."}),"\n",(0,n.jsx)(a.li,{children:"A relay chain block author does not select the candidate."}),"\n",(0,n.jsx)(a.li,{children:"The candidate's PoV is not considered available within a timeout, and the block is discarded from\nthe relay chain."}),"\n"]}),"\n",(0,n.jsx)(a.h2,{id:"approval-process",children:"Approval Process"}),"\n",(0,n.jsx)(a.h3,{id:"overview-1",children:"Overview"}),"\n",(0,n.jsxs)(a.p,{children:['Once the parablock is considered available and part of the parachain, it is still "pending\napproval". At this stage, the parablock is tentatively included in the parachain, although more\nconfirmation is necessary. The validators assigned to the parachain (i.e. the parachain validators)\nare sampled from a validator set assumed to be 1/3 dishonest in the worst-case scenario. In this\ncase, it is likely that the majority of the random para-validators sampled for a specific parachain\nare dishonest and can back a candidate wrongly. To address this, the ',(0,n.jsx)(a.strong,{children:"Approval Process"})," allows\ndetecting misbehavior after the fact without allocating more para-validators, which would ultimately\nreduce the system's throughput. As a parablock can accept children blocks after being considered\navailable, failure to pass the approval process will invalidate the parablock and its descendants\n(children blocks). Only the validators who backed the block in question will be\n",(0,n.jsx)(a.a,{href:"/docs/learn-offenses",children:"slashed"}),", not those who backed the descendants."]}),"\n",(0,n.jsx)(a.p,{children:"The approval pipeline can be divided into the following steps:"}),"\n",(0,n.jsxs)(a.ol,{children:["\n",(0,n.jsxs)(a.li,{children:["Parablocks included by the Inclusion Pipeline are pending approval for a time window known as the\n",(0,n.jsx)(a.strong,{children:"secondary checking window"}),"."]}),"\n",(0,n.jsxs)(a.li,{children:["During the secondary checking window, validators (secondary checkers) randomly self-select based\non a ",(0,n.jsx)(a.a,{href:"./learn-cryptography#vrf",children:"VRF"})," lottery to perform secondary checks on each of the\nparablock."]}),"\n",(0,n.jsx)(a.li,{children:"Secondary checkers acquire the parablock with PoV (erasure codings are necessary to reconstruct\nPoV) and re-run the validation function."}),"\n",(0,n.jsx)(a.li,{children:"Secondary checkers gossip about the results of their checks. Contradictory results lead to an\nescalation in which all validators must check the block. The validators on the losing side will\nbe slashed."}),"\n",(0,n.jsx)(a.li,{children:"At the end of the process the parablock is either approved or rejected."}),"\n"]}),"\n",(0,n.jsxs)(a.p,{children:["The figure below shows the path of a parachain block when it exits the Inclusion Pipeline, and\nenters the Approval Process. The parablock becomes accepted when it is backed, available and\n",(0,n.jsx)(a.strong,{children:"undisputed"}),'. The parablock is checked a second time by a subset of validators (V5, V6 and V7),\nand if there are no contradictory results the block is approved and gossiped to other relay chain\nvalidators. Note the parablock after secondary checks is shown as a square with a white background a\nyellow border enclosing an "I" (stands for ',(0,n.jsx)(a.em,{children:"included"}),"), and three white ticks (one for each\nsecondary check). Approved para-blocks are shown as yellow squares."]}),"\n",(0,n.jsx)(a.p,{children:(0,n.jsx)(a.img,{alt:"parachain-approval-process",src:i(60187).A+"",width:"1920",height:"800"})}),"\n",(0,n.jsx)(a.h3,{id:"assignments--secondary-checks",children:"Assignments & Secondary Checks"}),"\n",(0,n.jsxs)(a.p,{children:["Having a bad parablock on a fork of the relay chain is not catastrophic as long as the block is not\napproved and finalized by the finality gadget\n",(0,n.jsx)(a.a,{href:"./learn-consensus.md/#finality-gadget-grandpa",children:"GRANDPA"}),". If the block is not finalized, the fork on\nthe chain containing that block can be ignored in favor of another fork containing good blocks.\nDealing with a bad parablock includes the following stages:"]}),"\n",(0,n.jsxs)(a.ul,{children:["\n",(0,n.jsx)(a.li,{children:"Detection: the bad block must be detected by honest validators."}),"\n",(0,n.jsxs)(a.li,{children:["Escalation: the honest validators must start a ",(0,n.jsx)(a.a,{href:"#disputes",children:"dispute"}),"."]}),"\n",(0,n.jsxs)(a.li,{children:["Consequences: the backer for that parablock is ",(0,n.jsx)(a.a,{href:"/docs/learn-offenses",children:"slashed"}),"."]}),"\n"]}),"\n",(0,n.jsx)(a.p,{children:"The result of the dispute must be transplantable to all other forks so that malicious validators are\nslashed in all possible histories and so that honest validators will ignore any forks containing\nthat parablock."}),"\n",(0,n.jsx)(a.admonition,{title:"Parablocks vs. relay chain Blocks",type:"info",children:(0,n.jsx)(a.p,{children:"It is important to understand that a relay chain block does not contain parablocks, but\npara-headers. Parachain blocks are within the parachain. Thus, it makes more sense to think of relay\nchain blocks as having been approved instead of parablocks that have been approved. A relay chain\nblock containing information about approved parablocks can be considered approved as long as its\nparent relay chain block is also approved. Thus, the validity of a relay chain block depends on the\nvalidity of its ancestry."})}),"\n",(0,n.jsx)(a.p,{children:"Validators perform two main actions in the Approval Process:"}),"\n",(0,n.jsxs)(a.ul,{children:["\n",(0,n.jsxs)(a.li,{children:[(0,n.jsx)(a.strong,{children:(0,n.jsx)(a.a,{href:"https://paritytech.github.io/polkadot/book/protocol-approval.html#assignments",children:"Assignments"})}),"\ndetermine which validators perform approval checks on which candidates, ensuring each candidate\nreceives enough random checkers. This stage tracks approval votes to identify when\n",(0,n.jsx)(a.a,{href:"https://paritytech.github.io/polkadot/book/protocol-approval.html#no-shows",children:"no-show"})," approval\nchecks take suspiciously long. It also tracks relay chain\n",(0,n.jsx)(a.a,{href:"/docs/learn-offenses#slash-for-equivocation",children:"equivocations"})," to determine when adversaries\npossibly gained foreknowledge about assignments and add more checks in those cases. Assignees\ndetermine their own assignments to check specific candidates using two or three\n",(0,n.jsx)(a.a,{href:"https://paritytech.github.io/polkadot/book/protocol-approval.html#assignment-criteria",children:"assignment criteria"}),",\nwhich are based on two possible\n",(0,n.jsx)(a.a,{href:"https://paritytech.github.io/polkadot/book/protocol-approval.html#stories",children:"stories"})," about the\nrelay chain block that included the candidate (i.e. declared the candidate available).\n",(0,n.jsx)(a.a,{href:"https://paritytech.github.io/polkadot/book/protocol-approval.html#announcements--notices",children:"Assignment notices"}),"\nare gossiped among nodes so that all validators know which validators should check which\ncandidates, and if any candidate requires more checkers."]}),"\n",(0,n.jsxs)(a.li,{children:[(0,n.jsx)(a.strong,{children:"Approval checks"})," perform the checks by obtaining the candidate, verifying its validity, sending\nout the approval vote, or initiating a dispute. Approval checks have a no-show timeout window\n(i.e. longer than one relay chain slot) to succeed in reconstructing the candidate block, redo its\nerasure coding to check the candidate receipt, and recheck the candidate block itself. A validator\nbecomes tagged as a no-show if it does not approve or dispute within the no-show timeout window.\nBecause validators can be overloaded with assignments, they can intentionally delay sending their\nassignment notice to avoid creating no-shows (see more in\n",(0,n.jsx)(a.a,{href:"https://paritytech.github.io/polkadot/book/protocol-approval.html#assignment-postponement",children:"Assignment postponement"}),")."]}),"\n"]}),"\n",(0,n.jsxs)(a.p,{children:["These two steps first run as off-chain consensus protocols using messages gossiped among all\nvalidators, and then as on-chain record of those protocols' progress. The on-chain protocol is\nneeded to provide rewards for the off-chain protocol. The\n",(0,n.jsx)(a.a,{href:"https://paritytech.github.io/polkadot/book/protocol-approval.html#on-chain-verification",children:"on-chain verification"}),"\nhas two phases: a) assignments notices and approval votes are recorded in a relay chain block, and\nb) in another relay chain block notes are fed into the approval code."]}),"\n",(0,n.jsxs)(a.p,{children:["The gossiped messages are of two types, assignment notices, and approval votes, and are signed with\n",(0,n.jsx)(a.a,{href:"https://paritytech.github.io/polkadot/book/protocol-approval.html#approval-keys",children:"approval keys"}),".\nSuch keys are part of the ",(0,n.jsx)(a.a,{href:"./learn-cryptography.md/#session-keys",children:"session keys"})," used by validators.\nBriefly, approval keys are:"]}),"\n",(0,n.jsxs)(a.ul,{children:["\n",(0,n.jsxs)(a.li,{children:[(0,n.jsx)(a.strong,{children:"Approval assignment keys"})," that are sr25519 keys used only for assignment criteria\n",(0,n.jsx)(a.a,{href:"/docs/learn-cryptography#vrf",children:"VRF"}),"."]}),"\n",(0,n.jsxs)(a.li,{children:[(0,n.jsx)(a.strong,{children:"Approval vote keys"})," that are ed25519 and would only sign off on a candidate parablock validity."]}),"\n"]}),"\n",(0,n.jsx)(a.admonition,{type:"info",children:(0,n.jsxs)(a.p,{children:["For detailed information about the approval process, see dedicated section in\n",(0,n.jsx)(a.a,{href:"https://paritytech.github.io/polkadot/book/protocol-approval.html",children:"The Polkadot Parachain Host Implementers' Guide"}),"."]})}),"\n",(0,n.jsx)(a.p,{children:"Accepting a parablock is the result of having passed through the detection stage without dispute, or\nhaving passed through and escalation/dispute stage with a positive outcome."}),"\n",(0,n.jsx)(a.h3,{id:"chain-selection",children:"Chain Selection"}),"\n",(0,n.jsx)(a.p,{children:"After enough secondary checks have been performed on all candidate receipts within a block,\nvalidators can vote for that block (and all previous blocks) in GRANDPA. Once the block has more\nthan 2/3 of positive votes, the block is finalized on chain."}),"\n",(0,n.jsxs)(a.p,{children:["Chain selection is used to select blocks to build on and finalize. These processes need to\nconsistent among nodes and resilient to a maximum proportion of malicious nodes. The parachain host\nuses a block authoring system and a finality gadget. The chain selection strategy involves a\n",(0,n.jsx)(a.em,{children:(0,n.jsx)(a.a,{href:"https://paritytech.github.io/polkadot/book/protocol-chain-selection.html",children:"leaf-selection rule"})}),"\nand a set of\n",(0,n.jsx)(a.em,{children:(0,n.jsx)(a.a,{href:"https://paritytech.github.io/polkadot/book/protocol-chain-selection.html#the-best-chain-containing-rule",children:"finality constraints"})}),"."]}),"\n",(0,n.jsx)(a.admonition,{type:"info",children:(0,n.jsxs)(a.p,{children:["For detailed information about chain selection, see dedicated section in\n",(0,n.jsx)(a.a,{href:"https://paritytech.github.io/polkadot/book/protocol-chain-selection.html",children:"The Polkadot Parachain Host Implementers' Guide"}),"."]})}),"\n",(0,n.jsx)(a.h2,{id:"candidate-receipts",children:"Candidate Receipts"}),"\n",(0,n.jsx)(a.p,{children:"PoV are typically between 1 MB and 10 MB in size and are not included in the relay chain blocks. For\nPolkadot to scale to hundreds of parachains, PoV need to be represented by something smaller on the\nrelay chain: candidate receipts. A para-validator constructs a candidate receipt for a parachain\nblock by signing:"}),"\n",(0,n.jsxs)(a.ul,{children:["\n",(0,n.jsx)(a.li,{children:"The parachain ID."}),"\n",(0,n.jsx)(a.li,{children:"The collator's ID and signature."}),"\n",(0,n.jsx)(a.li,{children:"A hash of the parent block's candidate receipt."}),"\n",(0,n.jsx)(a.li,{children:"A Merkle root of the block's erasure-coded pieces."}),"\n",(0,n.jsx)(a.li,{children:"A Merkle root of any outgoing messages."}),"\n",(0,n.jsx)(a.li,{children:"A hash of the block."}),"\n",(0,n.jsx)(a.li,{children:"The state root of the parachain before block execution."}),"\n",(0,n.jsx)(a.li,{children:"The state root of the parachain after block execution."}),"\n"]}),"\n",(0,n.jsx)(a.p,{children:"This information is of constant size, while the actual PoV block of the parachain can be variable\nlength. It is enough information for anyone that obtains the full PoV block to verify the state\ntransition contained inside of it."}),"\n",(0,n.jsx)(a.h2,{id:"erasure-codes",children:"Erasure Codes"}),"\n",(0,n.jsx)(a.p,{children:"Before sending the candidate receipt to the relay chain transaction queue, the para-validator who\nconstructs the receipt must also construct an erasure coding of the parachain block."}),"\n",(0,n.jsx)(a.p,{children:"An erasure coding takes a message (in this case, the parachain block and PoV) and creates a set of\nsmaller messages such that you can reconstruct the original message by obtaining a fraction of the\nsmaller messages. In the case of Polkadot, the total number of smaller messages is equal to the\ntotal number of validators and the fraction is 1/3."}),"\n",(0,n.jsx)(a.p,{children:"The para-validator creates the erasure coding chunks, puts them into their Merkle tree, and sends\nout each chunk (together with the candidate receipt) to a corresponding validator on the Relay\nChain. Validators who receive the receipts with an erasure coding chunk will include the receipt in\nthe relay chain queue, where an author can include it in a block."}),"\n",(0,n.jsxs)(a.p,{children:["The type of erasure codes used by Polkadot's availability scheme are\n",(0,n.jsx)(a.a,{href:"https://en.wikipedia.org/wiki/Reed%E2%80%93Solomon_error_correction",children:"Reed-Solomon"})," codes, which\nalready enjoy a battle-tested application in technology outside the blockchain industry. One example\nis found in the compact disk industry. CDs use Reed-Solomon codes to correct any missing data due to\ninconsistencies on the disk face such as dust particles or scratches."]}),"\n",(0,n.jsx)(a.p,{children:"In Polkadot, the erasure codes are used to keep parachain state available to the system without\nrequiring all validators to keep tabs on all the parachains. Instead, validators share smaller\npieces of the data and can later reconstruct the entire data under the assumption that 1/3+1 of the\nvalidators can provide their pieces of the data."}),"\n",(0,n.jsx)(a.admonition,{type:"note",children:(0,n.jsx)(a.p,{children:"The 1/3+1 threshold of validators that must be responsive to construct the full parachain state data\ncorresponds to Polkadot's security assumption about Byzantine nodes."})}),"\n",(0,n.jsx)(a.h2,{id:"disputes",children:"Disputes"}),"\n",(0,n.jsx)(a.p,{children:"All parachain blocks that are in the finalized relay chain should be valid. This does not apply to\nbacked blocks that are not included. To ensure nothing invalid ends up in the finalized relay chain,\nthere are approval checks (described above) and disputes. The latter ensures that each attempt to\ninclude something invalid is caught and the offending validators are punished."}),"\n",(0,n.jsxs)(a.p,{children:["False positives can happen; those actors responsible for it will be ",(0,n.jsx)(a.a,{href:"/docs/learn-offenses",children:"slashed"}),".\nTo detect false positives, PoV information must be available after the block has been included to\nthe relay chain via the ",(0,n.jsx)(a.a,{href:"#availability-and-unavailability-phase",children:"availability scheme"}),"."]}),"\n",(0,n.jsxs)(a.p,{children:["Disputes are ",(0,n.jsx)(a.em,{children:"independent from a particular fork"}),", while backing and approval operate on particular\nforks. The approval voting stops if an alternative fork (which might not contain the\ncurrently-approved candidate) is finalized. The sole purpose of the approval process is to make sure\ninvalid blocks are not finalized. However, even though the danger is past and the offending\nvalidators did not manage to get the invalid block approved, those validators need to get slashed\nfor the attempt."]}),"\n",(0,n.jsx)(a.p,{children:"A dispute stems from a disagreement between two or more validators. For this to happen, a bad actor\nneeds to distribute an invalid block to honest validators. Scenarios leading to a dispute can be one\nof the followings (ordered from most to least important):"}),"\n",(0,n.jsxs)(a.ul,{children:["\n",(0,n.jsx)(a.li,{children:"A parablock included on a branch of the relay chain is bad"}),"\n",(0,n.jsx)(a.li,{children:"A parablock backed on a branch of the relay chain is bad"}),"\n",(0,n.jsx)(a.li,{children:"A parablock seconded, but not backed on any branch of the relay chain, is bad"}),"\n"]}),"\n",(0,n.jsx)(a.p,{children:"Checking a parachain block requires three pieces of data: the parachain validator code, the\navailability of data, and the candidate receipt. The validator code is available on-chain and\npublished ahead of time. Thus, a dispute process begins with the availability to ensure the\navailability of the data. Such a process will conclude quickly if the data is already available,\notherwise, the initiator of the dispute must make it available."}),"\n",(0,n.jsxs)(a.p,{children:["Disputes have both off- and on-chain components. Slashing is handled on-chain, so votes by\nvalidators on either side of the dispute must be placed on-chain. Moreover, a dispute on one branch\nof the chain must be transposed to all active branches so that misbehavior can be punished in all\npossible histories. There is, thus, a distinction between ",(0,n.jsx)(a.em,{children:"local"})," (the one we are looking at) and\n",(0,n.jsx)(a.em,{children:"remote"})," disputes relative to a particular branch of the relay chain."]}),"\n",(0,n.jsx)(a.p,{children:"Disputes can be divided into three different phases:"}),"\n",(0,n.jsxs)(a.ul,{children:["\n",(0,n.jsxs)(a.li,{children:[(0,n.jsx)(a.a,{href:"https://paritytech.github.io/polkadot/book/protocol-disputes.html#initiation",children:"Dispute initiation"}),":\nDisputes are initiated by any validator who finds their opinion on the validity of a parablock in\nopposition to another issued statement. The initiation begins off-chain by only nodes perceiving\nthat a parablock is bad. The validator can be one of the para-validators (i.e. one of the backers)\nor one of the approval checkers. Note that if the dispute occurs during the backing phase, the\ninitiator must make the data available while if the dispute occurs during the approval process the\ndata is already available."]}),"\n",(0,n.jsxs)(a.li,{children:[(0,n.jsx)(a.a,{href:"https://paritytech.github.io/polkadot/book/protocol-disputes.html#dispute-participation",children:"Dispute participation"}),":\nOnce becoming aware of the dispute, all validators must participate."]}),"\n",(0,n.jsxs)(a.li,{children:[(0,n.jsx)(a.a,{href:"https://paritytech.github.io/polkadot/book/protocol-disputes.html#dispute-conclusion",children:"Dispute conclusion"}),":\nDisputes conclude after a 2/3 supermajority is reached on either side. Disputes may also conclude\nafter a timeout. This will only happen if the majority of validators are unable to vote for some\nreason."]}),"\n"]}),"\n",(0,n.jsx)(a.p,{children:"The on-chain component of the dispute can be initiated by providing any two conflicting votes and it\nalso waits for a 2/3 supermajority on either side. The component also tracks which parablocks have\nalready been disputed so that the same parablock can be disputed only once on any branch of the\nrelay chain. Inclusion is halted for the parachain until the dispute resolves."}),"\n",(0,n.jsx)(a.admonition,{type:"info",children:(0,n.jsxs)(a.p,{children:["For detailed information about disputes, see dedicated section in\n",(0,n.jsx)(a.a,{href:"https://paritytech.github.io/polkadot/book/protocol-disputes.html",children:"The Polkadot Parachain Host Implementers' Guide"}),".\nIn the Guide, there are also more details about\n",(0,n.jsx)(a.a,{href:"https://paritytech.github.io/polkadot/book/disputes-flow.html",children:"disputes' flows"}),"."]})}),"\n",(0,n.jsx)(a.h2,{id:"network-asynchrony",children:"Network Asynchrony"}),"\n",(0,n.jsxs)(a.p,{children:["We have mentioned how a relay chain block author must select the candidate and note it on the Relay\nChain (we say the block is backed). The relay chain block author is selected by\n",(0,n.jsx)(a.a,{href:"/docs/learn-consensus#block-production-babe",children:"BABE"}),", which is a forkful algorithm. This means that\ndifferent block authors are chosen at the same time, and they may not work on the same block parent\n(i.e. the representations in the previous figures are simplistic). Also, the sets of validators and\nparachains are not fixed, and the validators' assignments to parachains is also flexible."]}),"\n",(0,n.jsxs)(a.p,{children:["We say that the network is ",(0,n.jsx)(a.strong,{children:"asynchronous"})," since there will be validators who have received a block\nand other validators who did not. Thus, the network is variable, and it exists in multiple states.\nIn the figure below (",(0,n.jsx)(a.em,{children:"left"}),"), Group 1 received block C while Group 2 did not due to network\nasynchrony. Validators in Group 2 can build another block on top of B, called C'. Assume that\nafterward, some validators become aware of both C and C' while others remain aware of one of them\n(",(0,n.jsx)(a.em,{children:"right"}),"). Validators in Group 3 must be aware of the network state in each head (C and C\u2019), and\nthey may contribute to some or full extent on both. It is possible that due to network asynchrony,\ntwo forks may grow in parallel for some time, but eventually, one fork will be chosen by the\nfinality gadget. In the absence of an adversarial network, it is unlikely that two forks will\ncoexist for some time as there will be validators aware of both chain heads."]}),"\n",(0,n.jsx)(a.p,{children:(0,n.jsx)(a.img,{alt:"parachain-forks",src:i(76091).A+"",width:"1920",height:"800"})}),"\n",(0,n.jsx)(a.h2,{id:"further-resources",children:"Further Resources"}),"\n",(0,n.jsxs)(a.ul,{children:["\n",(0,n.jsxs)(a.li,{children:[(0,n.jsx)(a.a,{href:"https://polkadot.network/the-path-of-a-parachain-block/",children:"Path of a Parachain Block"})," - Article by\nParity analyst Joe Petrowski expounds on the validity checks that a parachain block must pass in\norder to progress the parachain."]}),"\n",(0,n.jsxs)(a.li,{children:[(0,n.jsx)(a.a,{href:"https://github.com/w3f/research/tree/85cd4adfccb7d435f21cd9fd249cd1b7f5167537/docs/papers/AnV",children:"Availability and Validity"})," -\nPaper by the W3F Research Team that specifies the availability and validity protocol in detail."]}),"\n"]})]})}function d(e={}){const{wrapper:a}={...(0,t.R)(),...e.components};return a?(0,n.jsx)(a,{...e,children:(0,n.jsx)(c,{...e})}):c(e)}},60187:(e,a,i)=>{i.d(a,{A:()=>n});const n=i.p+"assets/images/parachain-approval-process-a025570e14282288fee420715c4e3030.png"},76091:(e,a,i)=>{i.d(a,{A:()=>n});const n=i.p+"assets/images/parachain-forks-b3d4a4e9161292fb63e1b86888a18579.png"},45379:(e,a,i)=>{i.d(a,{A:()=>n});const n=i.p+"assets/images/parachain-inclusion-pipeline-134e3949a7f607efc561d4992b52767c.png"},67937:(e,a,i)=>{i.d(a,{A:()=>n});const n=i.p+"assets/images/parachain-protocol-summary-7c052aadda3eee685f56bcc65d59fc71.png"},28453:(e,a,i)=>{i.d(a,{R:()=>s,x:()=>r});var n=i(96540);const t={},o=n.createContext(t);function s(e){const a=n.useContext(o);return n.useMemo((function(){return"function"==typeof e?e(a):{...a,...e}}),[a,e])}function r(e){let a;return a=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:s(e.components),n.createElement(o.Provider,{value:a},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/4f031749.60896b95.js b/assets/js/4f031749.60896b95.js new file mode 100644 index 000000000000..f41047fd1e14 --- /dev/null +++ b/assets/js/4f031749.60896b95.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1699],{50762:(o,e,s)=>{s.r(e),s.d(e,{assets:()=>d,contentTitle:()=>r,default:()=>p,frontMatter:()=>l,metadata:()=>t,toc:()=>c});const t=JSON.parse('{"id":"learn/learn-guides-staking-pools","title":"Polkadot-JS Guides for Pool Creators","description":"Polkadot-JS Guides about Nomination Pools.","source":"@site/../docs/learn/learn-guides-staking-pools.md","sourceDirName":"learn","slug":"/learn-guides-staking-pools","permalink":"/docs/learn-guides-staking-pools","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-staking-pools.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1729847256000,"frontMatter":{"id":"learn-guides-staking-pools","title":"Polkadot-JS Guides for Pool Creators","sidebar_label":"Nomination Pool Guides","description":"Polkadot-JS Guides about Nomination Pools.","keyword":["stake","staking","pools","create","destroy","claim","rewards","polkadot-js"],"slug":"../learn-guides-staking-pools"},"sidebar":"docs","previous":{"title":"Nominator Guides","permalink":"/docs/learn-guides-nominator"},"next":{"title":"OpenGov Guides","permalink":"/docs/learn-guides-polkadot-opengov"}}');var n=s(74848),a=s(28453),i=s(67141);const l={id:"learn-guides-staking-pools",title:"Polkadot-JS Guides for Pool Creators",sidebar_label:"Nomination Pool Guides",description:"Polkadot-JS Guides about Nomination Pools.",keyword:["stake","staking","pools","create","destroy","claim","rewards","polkadot-js"],slug:"../learn-guides-staking-pools"},r=void 0,d={},c=[{value:"Pool Creation with Polkadot-JS",id:"pool-creation-with-polkadot-js",level:2},{value:"Pool Upkeep with Polkadot-JS",id:"pool-upkeep-with-polkadot-js",level:2},{value:"Pool Destruction with Polkadot-JS",id:"pool-destruction-with-polkadot-js",level:2},{value:"Claim Rewards for Other Pool Members with Polkadot-JS",id:"claim-rewards-for-other-pool-members-with-polkadot-js",level:2}];function h(o){const e={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",img:"img",li:"li",p:"p",ul:"ul",...(0,a.R)(),...o.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(i.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the Polkadot-JS UI, you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,n.jsxs)(e.p,{children:["See ",(0,n.jsx)(e.a,{href:"/docs/learn-nomination-pools",children:"this page"})," to learn about nomination pools."]}),"\n",(0,n.jsx)(e.h2,{id:"pool-creation-with-polkadot-js",children:"Pool Creation with Polkadot-JS"}),"\n",(0,n.jsx)(e.admonition,{type:"info",children:(0,n.jsxs)(e.p,{children:["You easily create a pool using the\n",(0,n.jsx)(e.a,{href:"/docs/staking-dashboard#pools",children:"Polkadot Staking Dashboard"}),". See\n",(0,n.jsx)(e.a,{href:"https://support.polkadot.network/support/solutions/articles/65000182388-staking-dashboard-how-to-create-a-nomination-pool#How-to-create-a-pool",children:"this support article"}),"\nfor more information."]})}),"\n",(0,n.jsxs)(e.p,{children:["The depositor calls the ",(0,n.jsx)(e.code,{children:"create"})," extrinsic, setting the administrative roles and transferring some\nfunds to the pool to add themselves as the first member. As stated above, the depositor must always\nbe a member as long as the pool exists; they will be the last member to leave, ensuring they always\nhave some skin in the game. A significant stake from the depositor is always a good indicator of the\npool's credibility."]}),"\n",(0,n.jsxs)(e.p,{children:["The current minimum bond to create a pool can be found\n",(0,n.jsx)(e.a,{href:"/docs/chain-state-values#minimum-bond-to-create-a-nomination-pool",children:"here"}),"."]}),"\n",(0,n.jsx)(e.p,{children:"The pool\u2019s \u2018nominator role\u2019 selects validators with the nominate extrinsic. On Polkadot JS Apps UI,\nnavigate to Network > Staking > Pools and click on Add Pool button."}),"\n",(0,n.jsx)(e.p,{children:(0,n.jsx)(e.img,{alt:"Create Nomination Pools",src:s(8876).A+"",width:"1412",height:"638"})}),"\n",(0,n.jsx)(e.p,{children:"The UI automatically assigns an ID to the pool and allows for entering the name of the pools and the\ndeposit to be bonded."}),"\n",(0,n.jsx)(e.p,{children:(0,n.jsx)(e.img,{alt:"Create Nomination Pools - deposit",src:s(75911).A+"",width:"1164",height:"458"})}),"\n",(0,n.jsxs)(e.p,{children:["When creating a pool using Polkadot JS Apps UI, all the roles are mapped to the Depositor account by\ndefault. If any of these roles need to be assigned to a different account, create the pool using\n",(0,n.jsx)(e.code,{children:"create"})," extrinsic available in\n",(0,n.jsx)(e.a,{href:"https://polkadot.js.org/apps/#/extrinsics",children:"Developer > Extrinsics > nominationPools"})," on Polkadot JS\nApps UI."]}),"\n",(0,n.jsx)(e.p,{children:(0,n.jsx)(e.img,{alt:"Nomination Pool Roles",src:s(68442).A+"",width:"1426",height:"558"})}),"\n",(0,n.jsx)(e.h2,{id:"pool-upkeep-with-polkadot-js",children:"Pool Upkeep with Polkadot-JS"}),"\n",(0,n.jsxs)(e.p,{children:["The nominator can update the pool\u2019s validator selection. On Polkadot JS Apps UI, navigate to\n",(0,n.jsx)(e.a,{href:"https://polkadot.js.org/apps/#/staking/actions",children:"Network > Staking > Accounts page"})," and click on\nPooled button. If you have any pooled accounts with the role of nominator, you will notice the\noption to set nominees. Select the validators to nominate like you would normally using a nominator\naccount."]}),"\n",(0,n.jsx)(e.p,{children:(0,n.jsx)(e.img,{alt:"Nominate validators",src:s(96296).A+"",width:"1810",height:"786"})}),"\n",(0,n.jsxs)(e.p,{children:["The root and bouncer can update the pool\u2019s state to blocked through ",(0,n.jsx)(e.code,{children:"setState"})," extrinsic and kick\nmembers by calling ",(0,n.jsx)(e.code,{children:"unbond"})," and ",(0,n.jsx)(e.code,{children:"withdrawUnbonded"}),". (The state can also be toggled back to open)."]}),"\n",(0,n.jsx)(e.h2,{id:"pool-destruction-with-polkadot-js",children:"Pool Destruction with Polkadot-JS"}),"\n",(0,n.jsx)(e.admonition,{type:"info",children:(0,n.jsxs)(e.p,{children:["As a pool admin, you can easily destroy a pool and permissionlessly remove all members using the\n",(0,n.jsx)(e.a,{href:"/docs/staking-dashboard#pools",children:"Polkadot Staking Dashboard"}),". See\n",(0,n.jsx)(e.a,{href:"https://support.polkadot.network/support/solutions/articles/65000182388-staking-dashboard-how-to-create-a-nomination-pool#How-to-destroy-a-pool",children:"this support article"}),"\nfor more information."]})}),"\n",(0,n.jsx)(e.p,{children:"A pool can be pushed into the \u201cdestroying\u201d state via one of:"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["The root and bouncer set the pool to \u201cdestroying\u201d. This can be done by submitting the\n",(0,n.jsx)(e.code,{children:"nominationPools.setState(poolId, state)"})," extrinsic using the\n",(0,n.jsx)(e.a,{href:"https://polkadot.js.org/apps/#/extrinsics",children:"Polkadot-JS UI extrinsic tab"}),". Where ",(0,n.jsx)(e.code,{children:"poolId"})," is the\nspecific ID of the pool and ",(0,n.jsx)(e.code,{children:"state"}),' is the pool\'s state that must be set to "destroying". Other\npossible states are "open" and "blocked".']}),"\n",(0,n.jsxs)(e.li,{children:["Any account can set the pool to destroying if over 90% of the pool's active bonded balance has\nbeen ",(0,n.jsx)(e.a,{href:"/docs/learn-offenses",children:"slashed"}),"."]}),"\n"]}),"\n",(0,n.jsxs)(e.p,{children:["When a pool is in \u2018destroying\u2019 state, ",(0,n.jsx)(e.code,{children:"unbond"})," and ",(0,n.jsx)(e.code,{children:"withdrawUnbonded"})," become permissionless, so\nanyone can help all the members exit."]}),"\n",(0,n.jsx)(e.p,{children:"The pool is destroyed once the depositor withdraws, no members belong to the pool, and all the\npool\u2019s resources are wiped from the state."}),"\n",(0,n.jsx)(e.h2,{id:"claim-rewards-for-other-pool-members-with-polkadot-js",children:"Claim Rewards for Other Pool Members with Polkadot-JS"}),"\n",(0,n.jsxs)(e.p,{children:["As a pool member you can claim rewards for any other members who set their\n",(0,n.jsx)(e.a,{href:"/docs/learn-nomination-pools#claim-permissions",children:"claim permissions"})," to one of the ",(0,n.jsx)(e.em,{children:"permissionless"}),"\noptions."]}),"\n",(0,n.jsxs)(e.p,{children:["Let's take the example of ALICE setting the claim permissions to ",(0,n.jsx)(e.code,{children:"PermissionlessAll"}),". Another\naccount STASH can now claim ALICE's rewards (as a free balance or compound them to the existing\nbonded balance). To do so, STASH can go to the\n",(0,n.jsx)(e.a,{href:"https://polkadot.js.org/apps/#/extrinsics",children:"Polkadot-JS UI Extrinsic Tab"})," and issue the following\nextrisics:"]}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:[(0,n.jsx)(e.code,{children:"nominationPools.claimPayoutOthers"})," extrinsic specifying ALICE's account. This will claim the\nrewards as a free balance on ALICE's account."]}),"\n"]}),"\n",(0,n.jsx)(e.p,{children:(0,n.jsx)(e.img,{alt:"pools-payoutOthers",src:s(65288).A+"",width:"1499",height:"458"})}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:[(0,n.jsx)(e.code,{children:"nominationPools.bondExtraOthers"})," extrinsic specifying ALICE's account and the option to bond:","\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["the free balance currently available in ALICE's account (",(0,n.jsx)(e.code,{children:"FreeBalance"}),") or"]}),"\n",(0,n.jsxs)(e.li,{children:["the pool rewards (",(0,n.jsx)(e.code,{children:"Rewards"}),") unclaimed by ALICE."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(e.p,{children:(0,n.jsx)(e.img,{alt:"pools-bondExtraOthers",src:s(6829).A+"",width:"1496",height:"643"})})]})}function p(o={}){const{wrapper:e}={...(0,a.R)(),...o.components};return e?(0,n.jsx)(e,{...o,children:(0,n.jsx)(h,{...o})}):h(o)}},67141:(o,e,s)=>{s.d(e,{A:()=>a});var t=s(96540),n=s(74848);const a=function(o){var e,s=o.message,a=(0,t.useState)(!0),i=a[0],l=a[1];return(0,n.jsx)(n.Fragment,{children:i&&(0,n.jsxs)("div",{className:"message-box",children:[(0,n.jsx)("button",{className:"close-button",onClick:function(){l(!1)},children:"\u2716 "}),(0,n.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(e=s,e.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},6829:(o,e,s)=>{s.d(e,{A:()=>t});const t=s.p+"assets/images/nomination-pools-bondExtraOthers-d4492df464bbc1cd2c04be211a78eb46.png"},65288:(o,e,s)=>{s.d(e,{A:()=>t});const t=s.p+"assets/images/nomination-pools-payoutOthers-bfe1ad190e494f39c2c74d65e7edd12c.png"},8876:(o,e,s)=>{s.d(e,{A:()=>t});const t=s.p+"assets/images/Nomination-Pools-1-98ee6b5592f6851aa57c9d427d70598f.png"},75911:(o,e,s)=>{s.d(e,{A:()=>t});const t=s.p+"assets/images/Nomination-Pools-2-84da587a4d7591f2e2f79a4054214984.png"},96296:(o,e,s)=>{s.d(e,{A:()=>t});const t=s.p+"assets/images/Nomination-Pools-5-9b16b01bde4e095d3c8fa71aa9a9a6ca.png"},68442:(o,e,s)=>{s.d(e,{A:()=>t});const t=s.p+"assets/images/Nomination-Pools-7-74928d7825f19208592498e7b12dee5c.png"},28453:(o,e,s)=>{s.d(e,{R:()=>i,x:()=>l});var t=s(96540);const n={},a=t.createContext(n);function i(o){const e=t.useContext(a);return t.useMemo((function(){return"function"==typeof o?o(e):{...e,...o}}),[e,o])}function l(o){let e;return e=o.disableParentContext?"function"==typeof o.components?o.components(n):o.components||n:i(o.components),t.createElement(a.Provider,{value:e},o.children)}}}]); \ No newline at end of file diff --git a/assets/js/4f031749.6b2ff26e.js b/assets/js/4f031749.6b2ff26e.js deleted file mode 100644 index f4fa3e6e1163..000000000000 --- a/assets/js/4f031749.6b2ff26e.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1699],{35292:(o,e,t)=>{t.r(e),t.d(e,{assets:()=>d,contentTitle:()=>l,default:()=>p,frontMatter:()=>i,metadata:()=>r,toc:()=>c});var s=t(74848),n=t(28453),a=t(67141);const i={id:"learn-guides-staking-pools",title:"Polkadot-JS Guides for Pool Creators",sidebar_label:"Nomination Pool Guides",description:"Polkadot-JS Guides about Nomination Pools.",keyword:["stake","staking","pools","create","destroy","claim","rewards","polkadot-js"],slug:"../learn-guides-staking-pools"},l=void 0,r={id:"learn/learn-guides-staking-pools",title:"Polkadot-JS Guides for Pool Creators",description:"Polkadot-JS Guides about Nomination Pools.",source:"@site/../docs/learn/learn-guides-staking-pools.md",sourceDirName:"learn",slug:"/learn-guides-staking-pools",permalink:"/docs/learn-guides-staking-pools",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-staking-pools.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1729847256e3,frontMatter:{id:"learn-guides-staking-pools",title:"Polkadot-JS Guides for Pool Creators",sidebar_label:"Nomination Pool Guides",description:"Polkadot-JS Guides about Nomination Pools.",keyword:["stake","staking","pools","create","destroy","claim","rewards","polkadot-js"],slug:"../learn-guides-staking-pools"},sidebar:"docs",previous:{title:"Nominator Guides",permalink:"/docs/learn-guides-nominator"},next:{title:"OpenGov Guides",permalink:"/docs/learn-guides-polkadot-opengov"}},d={},c=[{value:"Pool Creation with Polkadot-JS",id:"pool-creation-with-polkadot-js",level:2},{value:"Pool Upkeep with Polkadot-JS",id:"pool-upkeep-with-polkadot-js",level:2},{value:"Pool Destruction with Polkadot-JS",id:"pool-destruction-with-polkadot-js",level:2},{value:"Claim Rewards for Other Pool Members with Polkadot-JS",id:"claim-rewards-for-other-pool-members-with-polkadot-js",level:2}];function h(o){const e={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",img:"img",li:"li",p:"p",ul:"ul",...(0,n.R)(),...o.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the Polkadot-JS UI, you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,s.jsxs)(e.p,{children:["See ",(0,s.jsx)(e.a,{href:"/docs/learn-nomination-pools",children:"this page"})," to learn about nomination pools."]}),"\n",(0,s.jsx)(e.h2,{id:"pool-creation-with-polkadot-js",children:"Pool Creation with Polkadot-JS"}),"\n",(0,s.jsx)(e.admonition,{type:"info",children:(0,s.jsxs)(e.p,{children:["You easily create a pool using the\n",(0,s.jsx)(e.a,{href:"/docs/staking-dashboard#pools",children:"Polkadot Staking Dashboard"}),". See\n",(0,s.jsx)(e.a,{href:"https://support.polkadot.network/support/solutions/articles/65000182388-staking-dashboard-how-to-create-a-nomination-pool#How-to-create-a-pool",children:"this support article"}),"\nfor more information."]})}),"\n",(0,s.jsxs)(e.p,{children:["The depositor calls the ",(0,s.jsx)(e.code,{children:"create"})," extrinsic, setting the administrative roles and transferring some\nfunds to the pool to add themselves as the first member. As stated above, the depositor must always\nbe a member as long as the pool exists; they will be the last member to leave, ensuring they always\nhave some skin in the game. A significant stake from the depositor is always a good indicator of the\npool's credibility."]}),"\n",(0,s.jsxs)(e.p,{children:["The current minimum bond to create a pool can be found\n",(0,s.jsx)(e.a,{href:"/docs/chain-state-values#minimum-bond-to-create-a-nomination-pool",children:"here"}),"."]}),"\n",(0,s.jsx)(e.p,{children:"The pool\u2019s \u2018nominator role\u2019 selects validators with the nominate extrinsic. On Polkadot JS Apps UI,\nnavigate to Network > Staking > Pools and click on Add Pool button."}),"\n",(0,s.jsx)(e.p,{children:(0,s.jsx)(e.img,{alt:"Create Nomination Pools",src:t(8876).A+"",width:"1412",height:"638"})}),"\n",(0,s.jsx)(e.p,{children:"The UI automatically assigns an ID to the pool and allows for entering the name of the pools and the\ndeposit to be bonded."}),"\n",(0,s.jsx)(e.p,{children:(0,s.jsx)(e.img,{alt:"Create Nomination Pools - deposit",src:t(75911).A+"",width:"1164",height:"458"})}),"\n",(0,s.jsxs)(e.p,{children:["When creating a pool using Polkadot JS Apps UI, all the roles are mapped to the Depositor account by\ndefault. If any of these roles need to be assigned to a different account, create the pool using\n",(0,s.jsx)(e.code,{children:"create"})," extrinsic available in\n",(0,s.jsx)(e.a,{href:"https://polkadot.js.org/apps/#/extrinsics",children:"Developer > Extrinsics > nominationPools"})," on Polkadot JS\nApps UI."]}),"\n",(0,s.jsx)(e.p,{children:(0,s.jsx)(e.img,{alt:"Nomination Pool Roles",src:t(68442).A+"",width:"1426",height:"558"})}),"\n",(0,s.jsx)(e.h2,{id:"pool-upkeep-with-polkadot-js",children:"Pool Upkeep with Polkadot-JS"}),"\n",(0,s.jsxs)(e.p,{children:["The nominator can update the pool\u2019s validator selection. On Polkadot JS Apps UI, navigate to\n",(0,s.jsx)(e.a,{href:"https://polkadot.js.org/apps/#/staking/actions",children:"Network > Staking > Accounts page"})," and click on\nPooled button. If you have any pooled accounts with the role of nominator, you will notice the\noption to set nominees. Select the validators to nominate like you would normally using a nominator\naccount."]}),"\n",(0,s.jsx)(e.p,{children:(0,s.jsx)(e.img,{alt:"Nominate validators",src:t(96296).A+"",width:"1810",height:"786"})}),"\n",(0,s.jsxs)(e.p,{children:["The root and bouncer can update the pool\u2019s state to blocked through ",(0,s.jsx)(e.code,{children:"setState"})," extrinsic and kick\nmembers by calling ",(0,s.jsx)(e.code,{children:"unbond"})," and ",(0,s.jsx)(e.code,{children:"withdrawUnbonded"}),". (The state can also be toggled back to open)."]}),"\n",(0,s.jsx)(e.h2,{id:"pool-destruction-with-polkadot-js",children:"Pool Destruction with Polkadot-JS"}),"\n",(0,s.jsx)(e.admonition,{type:"info",children:(0,s.jsxs)(e.p,{children:["As a pool admin, you can easily destroy a pool and permissionlessly remove all members using the\n",(0,s.jsx)(e.a,{href:"/docs/staking-dashboard#pools",children:"Polkadot Staking Dashboard"}),". See\n",(0,s.jsx)(e.a,{href:"https://support.polkadot.network/support/solutions/articles/65000182388-staking-dashboard-how-to-create-a-nomination-pool#How-to-destroy-a-pool",children:"this support article"}),"\nfor more information."]})}),"\n",(0,s.jsx)(e.p,{children:"A pool can be pushed into the \u201cdestroying\u201d state via one of:"}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:["The root and bouncer set the pool to \u201cdestroying\u201d. This can be done by submitting the\n",(0,s.jsx)(e.code,{children:"nominationPools.setState(poolId, state)"})," extrinsic using the\n",(0,s.jsx)(e.a,{href:"https://polkadot.js.org/apps/#/extrinsics",children:"Polkadot-JS UI extrinsic tab"}),". Where ",(0,s.jsx)(e.code,{children:"poolId"})," is the\nspecific ID of the pool and ",(0,s.jsx)(e.code,{children:"state"}),' is the pool\'s state that must be set to "destroying". Other\npossible states are "open" and "blocked".']}),"\n",(0,s.jsxs)(e.li,{children:["Any account can set the pool to destroying if over 90% of the pool's active bonded balance has\nbeen ",(0,s.jsx)(e.a,{href:"/docs/learn-offenses",children:"slashed"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(e.p,{children:["When a pool is in \u2018destroying\u2019 state, ",(0,s.jsx)(e.code,{children:"unbond"})," and ",(0,s.jsx)(e.code,{children:"withdrawUnbonded"})," become permissionless, so\nanyone can help all the members exit."]}),"\n",(0,s.jsx)(e.p,{children:"The pool is destroyed once the depositor withdraws, no members belong to the pool, and all the\npool\u2019s resources are wiped from the state."}),"\n",(0,s.jsx)(e.h2,{id:"claim-rewards-for-other-pool-members-with-polkadot-js",children:"Claim Rewards for Other Pool Members with Polkadot-JS"}),"\n",(0,s.jsxs)(e.p,{children:["As a pool member you can claim rewards for any other members who set their\n",(0,s.jsx)(e.a,{href:"/docs/learn-nomination-pools#claim-permissions",children:"claim permissions"})," to one of the ",(0,s.jsx)(e.em,{children:"permissionless"}),"\noptions."]}),"\n",(0,s.jsxs)(e.p,{children:["Let's take the example of ALICE setting the claim permissions to ",(0,s.jsx)(e.code,{children:"PermissionlessAll"}),". Another\naccount STASH can now claim ALICE's rewards (as a free balance or compound them to the existing\nbonded balance). To do so, STASH can go to the\n",(0,s.jsx)(e.a,{href:"https://polkadot.js.org/apps/#/extrinsics",children:"Polkadot-JS UI Extrinsic Tab"})," and issue the following\nextrisics:"]}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.code,{children:"nominationPools.claimPayoutOthers"})," extrinsic specifying ALICE's account. This will claim the\nrewards as a free balance on ALICE's account."]}),"\n"]}),"\n",(0,s.jsx)(e.p,{children:(0,s.jsx)(e.img,{alt:"pools-payoutOthers",src:t(65288).A+"",width:"1499",height:"458"})}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.code,{children:"nominationPools.bondExtraOthers"})," extrinsic specifying ALICE's account and the option to bond:","\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:["the free balance currently available in ALICE's account (",(0,s.jsx)(e.code,{children:"FreeBalance"}),") or"]}),"\n",(0,s.jsxs)(e.li,{children:["the pool rewards (",(0,s.jsx)(e.code,{children:"Rewards"}),") unclaimed by ALICE."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(e.p,{children:(0,s.jsx)(e.img,{alt:"pools-bondExtraOthers",src:t(6829).A+"",width:"1496",height:"643"})})]})}function p(o={}){const{wrapper:e}={...(0,n.R)(),...o.components};return e?(0,s.jsx)(e,{...o,children:(0,s.jsx)(h,{...o})}):h(o)}},67141:(o,e,t)=>{t.d(e,{A:()=>a});var s=t(96540),n=t(74848);const a=function(o){var e,t=o.message,a=(0,s.useState)(!0),i=a[0],l=a[1];return(0,n.jsx)(n.Fragment,{children:i&&(0,n.jsxs)("div",{className:"message-box",children:[(0,n.jsx)("button",{className:"close-button",onClick:function(){l(!1)},children:"\u2716 "}),(0,n.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(e=t,e.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},6829:(o,e,t)=>{t.d(e,{A:()=>s});const s=t.p+"assets/images/nomination-pools-bondExtraOthers-d4492df464bbc1cd2c04be211a78eb46.png"},65288:(o,e,t)=>{t.d(e,{A:()=>s});const s=t.p+"assets/images/nomination-pools-payoutOthers-bfe1ad190e494f39c2c74d65e7edd12c.png"},8876:(o,e,t)=>{t.d(e,{A:()=>s});const s=t.p+"assets/images/Nomination-Pools-1-98ee6b5592f6851aa57c9d427d70598f.png"},75911:(o,e,t)=>{t.d(e,{A:()=>s});const s=t.p+"assets/images/Nomination-Pools-2-84da587a4d7591f2e2f79a4054214984.png"},96296:(o,e,t)=>{t.d(e,{A:()=>s});const s=t.p+"assets/images/Nomination-Pools-5-9b16b01bde4e095d3c8fa71aa9a9a6ca.png"},68442:(o,e,t)=>{t.d(e,{A:()=>s});const s=t.p+"assets/images/Nomination-Pools-7-74928d7825f19208592498e7b12dee5c.png"},28453:(o,e,t)=>{t.d(e,{R:()=>i,x:()=>l});var s=t(96540);const n={},a=s.createContext(n);function i(o){const e=s.useContext(a);return s.useMemo((function(){return"function"==typeof o?o(e):{...e,...o}}),[e,o])}function l(o){let e;return e=o.disableParentContext?"function"==typeof o.components?o.components(n):o.components||n:i(o.components),s.createElement(a.Provider,{value:e},o.children)}}}]); \ No newline at end of file diff --git a/assets/js/5136ee31.40a810cb.js b/assets/js/5136ee31.40a810cb.js new file mode 100644 index 000000000000..547b50bf40c8 --- /dev/null +++ b/assets/js/5136ee31.40a810cb.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4632],{56710:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>o,contentTitle:()=>a,default:()=>h,frontMatter:()=>c,metadata:()=>r,toc:()=>l});const r=JSON.parse('{"id":"learn/xcm/journey/learn-xcm-docs-journey-expectations","title":"Expectations","description":"Expect Instructions to Check if a Condition is Valid.","source":"@site/../docs/learn/xcm/journey/expects.md","sourceDirName":"learn/xcm/journey","slug":"/learn/xcm/journey-expectations","permalink":"/docs/learn/xcm/journey-expectations","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/xcm/journey/expects.md","tags":[],"version":"current","lastUpdatedBy":"bader y","lastUpdatedAt":1694099593000,"frontMatter":{"id":"learn-xcm-docs-journey-expectations","title":"Expectations","sidebar_label":"Expectations","description":"Expect Instructions to Check if a Condition is Valid.","keywords":["xcm","cross-consensus messaging","expectations"],"slug":"../journey-expectations"},"sidebar":"docs","previous":{"title":"Trap and Claim Assets","permalink":"/docs/learn/xcm/journey-assets"},"next":{"title":"Queries","permalink":"/docs/learn/xcm/journey-queries"}}');var s=t(74848),i=t(28453);const c={id:"learn-xcm-docs-journey-expectations",title:"Expectations",sidebar_label:"Expectations",description:"Expect Instructions to Check if a Condition is Valid.",keywords:["xcm","cross-consensus messaging","expectations"],slug:"../journey-expectations"},a="Expects",o={},l=[{value:"ExpectAsset",id:"expectasset",level:2},{value:"Example",id:"example",level:3},{value:"ExpectOrigin",id:"expectorigin",level:2},{value:"Example",id:"example-1",level:3},{value:"ExpectPallet",id:"expectpallet",level:2},{value:"Example",id:"example-2",level:3},{value:"ExpectError",id:"expecterror",level:2},{value:"Example",id:"example-3",level:3},{value:"ExpectTransactStatus",id:"expecttransactstatus",level:2},{value:"Example",id:"example-4",level:3}];function d(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"expects",children:"Expects"})}),"\n",(0,s.jsx)(n.p,{children:"XCM contains instructions to check for specific conditions during the execution of the message.\nThese 'expect' instructions check for a specific condition and if it's not fulfilled, an error is\nthen thrown. These instructions are used for things like checking the state of the registers before\nexecuting specific instructions. XCM contains the following expect instructions:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"ExpectAsset"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"ExpectOrigin"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"ExpectPallet"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"ExpectError"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"ExpectTransactStatus"})}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"expectasset",children:"ExpectAsset"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"ExpectAsset"})," instruction throws an ",(0,s.jsx)(n.code,{children:"ExpectationFalse"})," error if the holding register does not\ncontain at least the given assets."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-rust",children:"ExpectAsset(MultiAssets)\n"})}),"\n",(0,s.jsx)(n.h3,{id:"example",children:"Example"}),"\n",(0,s.jsxs)(n.p,{children:["For the full example, check ",(0,s.jsx)(n.a,{href:"https://github.com/paritytech/xcm-docs/tree/main/examples",children:"here"}),"."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-rust,",metastring:"noplayground",children:"WithdrawAsset((Here, AMOUNT).into()),\nBuyExecution { fees: (Here, AMOUNT).into(), weight_limit: WeightLimit::Unlimited },\n// Set the instructions that are executed when ExpectAsset does not pass.\n// In this case, reporting back an error to the Parachain.\nSetErrorHandler(Xcm(vec![\n ReportError(QueryResponseInfo {\n destination: Parachain(1).into(),\n query_id: QUERY_ID,\n max_weight: Weight::from_all(0),\n })\n])),\nExpectAsset((Here, AMOUNT + 10).into()),\n// Add Instructions that do something with assets in holding when ExpectAsset passes.\n\n"})}),"\n",(0,s.jsx)(n.h2,{id:"expectorigin",children:"ExpectOrigin"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"ExpectOrigin"})," instruction throws an ",(0,s.jsx)(n.code,{children:"ExpectationFalse"})," error if the origin register does not\nequal the expected origin."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-rust",children:"ExpectOrigin(Option)\n"})}),"\n",(0,s.jsx)(n.h3,{id:"example-1",children:"Example"}),"\n",(0,s.jsxs)(n.p,{children:["For the full example, check ",(0,s.jsx)(n.a,{href:"https://github.com/paritytech/xcm-docs/tree/main/examples",children:"here"}),". The\n",(0,s.jsx)(n.code,{children:"ExpectOrigin"})," instruction errors because the ",(0,s.jsx)(n.code,{children:"ClearOrigin"})," clears the origin register and we expect\nit to be equal to ",(0,s.jsx)(n.code,{children:"Parachain(1)"}),"."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-rust",children:"// Set the instructions that are executed when ExpectOrigin does not pass.\n// In this case, reporting back an error to the Parachain.\nSetErrorHandler(Xcm(vec![ReportError(QueryResponseInfo {\n destination: Parachain(1).into(),\n query_id: QUERY_ID,\n max_weight: Weight::from_all(0),\n})])),\nClearOrigin,\n// Checks if the XcmContext origin is equal to `Parachain(1)`.\nExpectOrigin(Some(Parachain(1).into())),\n"})}),"\n",(0,s.jsx)(n.h2,{id:"expectpallet",children:"ExpectPallet"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"ExpectPallet"})," instruction ensures that a particular pallet with a particular version exists in\nthe destination's runtime. It throws a ",(0,s.jsx)(n.code,{children:"PalletNotFound"})," error if there is no pallet at the given\nindex. It throws a ",(0,s.jsx)(n.code,{children:"NameMismatch"})," error is the ",(0,s.jsx)(n.code,{children:"name"})," or ",(0,s.jsx)(n.code,{children:"module_name"})," mismatch and a\n",(0,s.jsx)(n.code,{children:"VersionIncompatible"})," error if the ",(0,s.jsx)(n.code,{children:"crate_major"})," or ",(0,s.jsx)(n.code,{children:"crate_minor"})," mismatch. The ",(0,s.jsx)(n.code,{children:"name"})," and\n",(0,s.jsx)(n.code,{children:"module_name"})," represent a byte representation of the pallet's name and module name (e.g. 'Balances'\nand 'pallet_balances'). Consensus systems that are not substrate-based may throw an ",(0,s.jsx)(n.code,{children:"Unimplemented"}),"\nerror for this instruction."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-rust",children:"ExpectPallet {\n #[codec(compact)]\n index: u32,\n name: Vec,\n module_name: Vec,\n #[codec(compact)]\n crate_major: u32,\n #[codec(compact)]\n min_crate_minor: u32,\n},\n"})}),"\n",(0,s.jsx)(n.h3,{id:"example-2",children:"Example"}),"\n",(0,s.jsxs)(n.p,{children:["For the full example, check ",(0,s.jsx)(n.a,{href:"https://github.com/paritytech/xcm-docs/tree/main/examples",children:"here"}),"."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-rust,",metastring:"noplayground",children:'// Set the instructions that are executed when ExpectPallet does not pass.\n// In this case, reporting back an error to the Parachain.\nSetErrorHandler(Xcm(vec![\n ReportError(QueryResponseInfo {\n destination: Parachain(1).into(),\n query_id: QUERY_ID,\n max_weight: Weight::from_all(0),\n })\n])),\n// Configured pallet has different `crate_major` so `VersionIncompatible` error is thrown.\nExpectPallet {\n index: 1,\n name: "Balances".into(),\n module_name: "pallet_balances".into(),\n crate_major: 3,\n min_crate_minor: 0,\n}\n'})}),"\n",(0,s.jsx)(n.h2,{id:"expecterror",children:"ExpectError"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"ExpectError"})," instruction throws an ",(0,s.jsx)(n.code,{children:"ExpectationFalse"})," error if the error register does not\nequal the expected error at that point in the execution. This instruction is useful during the error\nhandler execution to halt the error handler if the error that started the execution of the error\nhandler is not as expected. The ",(0,s.jsx)(n.code,{children:"ExpectError"})," instruction allows to only execute the instructions in\nthe error handler, when a specific error is thrown."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-rust",children:"\tExpectError(Option<(u32, Error)>)\n"})}),"\n",(0,s.jsx)(n.h3,{id:"example-3",children:"Example"}),"\n",(0,s.jsxs)(n.p,{children:["For the full example, check ",(0,s.jsx)(n.a,{href:"https://github.com/paritytech/xcm-docs/tree/main/examples",children:"here"}),"."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-rust",children:'SetErrorHandler(Xcm(vec![\n ExpectError(Some((1, XcmError::VersionIncompatible))),\n ReportError(QueryResponseInfo {\n destination: Parachain(1).into(),\n query_id: QUERY_ID,\n max_weight: Weight::from_all(0),\n }),\n])),\n// Pallet index is wrong, so throws `PalletNotFound` error.\nExpectPallet {\n index: 100,\n name: "Balances".into(),\n module_name: "pallet_balances".into(),\n crate_major: 4,\n min_crate_minor: 0,\n},\n'})}),"\n",(0,s.jsx)(n.h2,{id:"expecttransactstatus",children:"ExpectTransactStatus"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"ExpectTransactStatus"})," instruction throws an ",(0,s.jsx)(n.code,{children:"ExpectationFalse"})," error if the transact status\nregister does not equal the expected transact status."]}),"\n",(0,s.jsx)(n.h3,{id:"example-4",children:"Example"}),"\n",(0,s.jsxs)(n.p,{children:["For the full example, check ",(0,s.jsx)(n.a,{href:"https://github.com/paritytech/xcm-docs/tree/main/examples",children:"here"}),". The\ntransact status is reported to ",(0,s.jsx)(n.code,{children:"Parachain(1)"})," if the call in the ",(0,s.jsx)(n.code,{children:"Transact"})," errors."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-rust",children:"SetErrorHandler(Xcm(vec![ReportTransactStatus(QueryResponseInfo {\n destination: Parachain(1).into(),\n query_id: QUERY_ID,\n max_weight: Weight::from_all(0),\n})])),\nTransact {\n origin_kind: OriginKind::SovereignAccount,\n require_weight_at_most: Weight::from_parts(INITIAL_BALANCE as u64, 1024 * 1024),\n call: call.encode().into(),\n},\nExpectTransactStatus(MaybeErrorCode::Success),\n"})})]})}function h(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},28453:(e,n,t)=>{t.d(n,{R:()=>c,x:()=>a});var r=t(96540);const s={},i=r.createContext(s);function c(e){const n=r.useContext(i);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:c(e.components),r.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/5136ee31.bcdd82e8.js b/assets/js/5136ee31.bcdd82e8.js deleted file mode 100644 index 51726f9f6ded..000000000000 --- a/assets/js/5136ee31.bcdd82e8.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4632],{23554:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>o,contentTitle:()=>c,default:()=>h,frontMatter:()=>i,metadata:()=>a,toc:()=>l});var r=t(74848),s=t(28453);const i={id:"learn-xcm-docs-journey-expectations",title:"Expectations",sidebar_label:"Expectations",description:"Expect Instructions to Check if a Condition is Valid.",keywords:["xcm","cross-consensus messaging","expectations"],slug:"../journey-expectations"},c="Expects",a={id:"learn/xcm/journey/learn-xcm-docs-journey-expectations",title:"Expectations",description:"Expect Instructions to Check if a Condition is Valid.",source:"@site/../docs/learn/xcm/journey/expects.md",sourceDirName:"learn/xcm/journey",slug:"/learn/xcm/journey-expectations",permalink:"/docs/learn/xcm/journey-expectations",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/xcm/journey/expects.md",tags:[],version:"current",lastUpdatedBy:"bader y",lastUpdatedAt:1694099593e3,frontMatter:{id:"learn-xcm-docs-journey-expectations",title:"Expectations",sidebar_label:"Expectations",description:"Expect Instructions to Check if a Condition is Valid.",keywords:["xcm","cross-consensus messaging","expectations"],slug:"../journey-expectations"},sidebar:"docs",previous:{title:"Trap and Claim Assets",permalink:"/docs/learn/xcm/journey-assets"},next:{title:"Queries",permalink:"/docs/learn/xcm/journey-queries"}},o={},l=[{value:"ExpectAsset",id:"expectasset",level:2},{value:"Example",id:"example",level:3},{value:"ExpectOrigin",id:"expectorigin",level:2},{value:"Example",id:"example-1",level:3},{value:"ExpectPallet",id:"expectpallet",level:2},{value:"Example",id:"example-2",level:3},{value:"ExpectError",id:"expecterror",level:2},{value:"Example",id:"example-3",level:3},{value:"ExpectTransactStatus",id:"expecttransactstatus",level:2},{value:"Example",id:"example-4",level:3}];function d(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,s.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.header,{children:(0,r.jsx)(n.h1,{id:"expects",children:"Expects"})}),"\n",(0,r.jsx)(n.p,{children:"XCM contains instructions to check for specific conditions during the execution of the message.\nThese 'expect' instructions check for a specific condition and if it's not fulfilled, an error is\nthen thrown. These instructions are used for things like checking the state of the registers before\nexecuting specific instructions. XCM contains the following expect instructions:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"ExpectAsset"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"ExpectOrigin"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"ExpectPallet"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"ExpectError"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"ExpectTransactStatus"})}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"expectasset",children:"ExpectAsset"}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.code,{children:"ExpectAsset"})," instruction throws an ",(0,r.jsx)(n.code,{children:"ExpectationFalse"})," error if the holding register does not\ncontain at least the given assets."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-rust",children:"ExpectAsset(MultiAssets)\n"})}),"\n",(0,r.jsx)(n.h3,{id:"example",children:"Example"}),"\n",(0,r.jsxs)(n.p,{children:["For the full example, check ",(0,r.jsx)(n.a,{href:"https://github.com/paritytech/xcm-docs/tree/main/examples",children:"here"}),"."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-rust,",metastring:"noplayground",children:"WithdrawAsset((Here, AMOUNT).into()),\nBuyExecution { fees: (Here, AMOUNT).into(), weight_limit: WeightLimit::Unlimited },\n// Set the instructions that are executed when ExpectAsset does not pass.\n// In this case, reporting back an error to the Parachain.\nSetErrorHandler(Xcm(vec![\n ReportError(QueryResponseInfo {\n destination: Parachain(1).into(),\n query_id: QUERY_ID,\n max_weight: Weight::from_all(0),\n })\n])),\nExpectAsset((Here, AMOUNT + 10).into()),\n// Add Instructions that do something with assets in holding when ExpectAsset passes.\n\n"})}),"\n",(0,r.jsx)(n.h2,{id:"expectorigin",children:"ExpectOrigin"}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.code,{children:"ExpectOrigin"})," instruction throws an ",(0,r.jsx)(n.code,{children:"ExpectationFalse"})," error if the origin register does not\nequal the expected origin."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-rust",children:"ExpectOrigin(Option)\n"})}),"\n",(0,r.jsx)(n.h3,{id:"example-1",children:"Example"}),"\n",(0,r.jsxs)(n.p,{children:["For the full example, check ",(0,r.jsx)(n.a,{href:"https://github.com/paritytech/xcm-docs/tree/main/examples",children:"here"}),". The\n",(0,r.jsx)(n.code,{children:"ExpectOrigin"})," instruction errors because the ",(0,r.jsx)(n.code,{children:"ClearOrigin"})," clears the origin register and we expect\nit to be equal to ",(0,r.jsx)(n.code,{children:"Parachain(1)"}),"."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-rust",children:"// Set the instructions that are executed when ExpectOrigin does not pass.\n// In this case, reporting back an error to the Parachain.\nSetErrorHandler(Xcm(vec![ReportError(QueryResponseInfo {\n destination: Parachain(1).into(),\n query_id: QUERY_ID,\n max_weight: Weight::from_all(0),\n})])),\nClearOrigin,\n// Checks if the XcmContext origin is equal to `Parachain(1)`.\nExpectOrigin(Some(Parachain(1).into())),\n"})}),"\n",(0,r.jsx)(n.h2,{id:"expectpallet",children:"ExpectPallet"}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.code,{children:"ExpectPallet"})," instruction ensures that a particular pallet with a particular version exists in\nthe destination's runtime. It throws a ",(0,r.jsx)(n.code,{children:"PalletNotFound"})," error if there is no pallet at the given\nindex. It throws a ",(0,r.jsx)(n.code,{children:"NameMismatch"})," error is the ",(0,r.jsx)(n.code,{children:"name"})," or ",(0,r.jsx)(n.code,{children:"module_name"})," mismatch and a\n",(0,r.jsx)(n.code,{children:"VersionIncompatible"})," error if the ",(0,r.jsx)(n.code,{children:"crate_major"})," or ",(0,r.jsx)(n.code,{children:"crate_minor"})," mismatch. The ",(0,r.jsx)(n.code,{children:"name"})," and\n",(0,r.jsx)(n.code,{children:"module_name"})," represent a byte representation of the pallet's name and module name (e.g. 'Balances'\nand 'pallet_balances'). Consensus systems that are not substrate-based may throw an ",(0,r.jsx)(n.code,{children:"Unimplemented"}),"\nerror for this instruction."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-rust",children:"ExpectPallet {\n #[codec(compact)]\n index: u32,\n name: Vec,\n module_name: Vec,\n #[codec(compact)]\n crate_major: u32,\n #[codec(compact)]\n min_crate_minor: u32,\n},\n"})}),"\n",(0,r.jsx)(n.h3,{id:"example-2",children:"Example"}),"\n",(0,r.jsxs)(n.p,{children:["For the full example, check ",(0,r.jsx)(n.a,{href:"https://github.com/paritytech/xcm-docs/tree/main/examples",children:"here"}),"."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-rust,",metastring:"noplayground",children:'// Set the instructions that are executed when ExpectPallet does not pass.\n// In this case, reporting back an error to the Parachain.\nSetErrorHandler(Xcm(vec![\n ReportError(QueryResponseInfo {\n destination: Parachain(1).into(),\n query_id: QUERY_ID,\n max_weight: Weight::from_all(0),\n })\n])),\n// Configured pallet has different `crate_major` so `VersionIncompatible` error is thrown.\nExpectPallet {\n index: 1,\n name: "Balances".into(),\n module_name: "pallet_balances".into(),\n crate_major: 3,\n min_crate_minor: 0,\n}\n'})}),"\n",(0,r.jsx)(n.h2,{id:"expecterror",children:"ExpectError"}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.code,{children:"ExpectError"})," instruction throws an ",(0,r.jsx)(n.code,{children:"ExpectationFalse"})," error if the error register does not\nequal the expected error at that point in the execution. This instruction is useful during the error\nhandler execution to halt the error handler if the error that started the execution of the error\nhandler is not as expected. The ",(0,r.jsx)(n.code,{children:"ExpectError"})," instruction allows to only execute the instructions in\nthe error handler, when a specific error is thrown."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-rust",children:"\tExpectError(Option<(u32, Error)>)\n"})}),"\n",(0,r.jsx)(n.h3,{id:"example-3",children:"Example"}),"\n",(0,r.jsxs)(n.p,{children:["For the full example, check ",(0,r.jsx)(n.a,{href:"https://github.com/paritytech/xcm-docs/tree/main/examples",children:"here"}),"."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-rust",children:'SetErrorHandler(Xcm(vec![\n ExpectError(Some((1, XcmError::VersionIncompatible))),\n ReportError(QueryResponseInfo {\n destination: Parachain(1).into(),\n query_id: QUERY_ID,\n max_weight: Weight::from_all(0),\n }),\n])),\n// Pallet index is wrong, so throws `PalletNotFound` error.\nExpectPallet {\n index: 100,\n name: "Balances".into(),\n module_name: "pallet_balances".into(),\n crate_major: 4,\n min_crate_minor: 0,\n},\n'})}),"\n",(0,r.jsx)(n.h2,{id:"expecttransactstatus",children:"ExpectTransactStatus"}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.code,{children:"ExpectTransactStatus"})," instruction throws an ",(0,r.jsx)(n.code,{children:"ExpectationFalse"})," error if the transact status\nregister does not equal the expected transact status."]}),"\n",(0,r.jsx)(n.h3,{id:"example-4",children:"Example"}),"\n",(0,r.jsxs)(n.p,{children:["For the full example, check ",(0,r.jsx)(n.a,{href:"https://github.com/paritytech/xcm-docs/tree/main/examples",children:"here"}),". The\ntransact status is reported to ",(0,r.jsx)(n.code,{children:"Parachain(1)"})," if the call in the ",(0,r.jsx)(n.code,{children:"Transact"})," errors."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-rust",children:"SetErrorHandler(Xcm(vec![ReportTransactStatus(QueryResponseInfo {\n destination: Parachain(1).into(),\n query_id: QUERY_ID,\n max_weight: Weight::from_all(0),\n})])),\nTransact {\n origin_kind: OriginKind::SovereignAccount,\n require_weight_at_most: Weight::from_parts(INITIAL_BALANCE as u64, 1024 * 1024),\n call: call.encode().into(),\n},\nExpectTransactStatus(MaybeErrorCode::Success),\n"})})]})}function h(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(d,{...e})}):d(e)}},28453:(e,n,t)=>{t.d(n,{R:()=>c,x:()=>a});var r=t(96540);const s={},i=r.createContext(s);function c(e){const n=r.useContext(i);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:c(e.components),r.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/5163.1f802a3e.js b/assets/js/5163.1f802a3e.js deleted file mode 100644 index 9c9379266ed9..000000000000 --- a/assets/js/5163.1f802a3e.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5163],{95163:(t,e,a)=>{a.d(e,{diagram:()=>b});var i=a(27899),n=a(26312),d=a(21176),r=a(697),s=a(86079);a(74353),a(16750),a(42838);const o={},c=(t,e)=>{o[t]=e},g=(t,e)=>{const a=t.append("text").attr("x",2*(0,s.c)().state.padding).attr("y",(0,s.c)().state.textHeight+1.3*(0,s.c)().state.padding).attr("font-size",(0,s.c)().state.fontSize).attr("class","state-title").text(e.descriptions[0]).node().getBBox(),i=a.height,n=t.append("text").attr("x",(0,s.c)().state.padding).attr("y",i+.4*(0,s.c)().state.padding+(0,s.c)().state.dividerMargin+(0,s.c)().state.textHeight).attr("class","state-description");let d=!0,r=!0;e.descriptions.forEach((function(t){d||(!function(t,e,a){const i=t.append("tspan").attr("x",2*(0,s.c)().state.padding).text(e);a||i.attr("dy",(0,s.c)().state.textHeight)}(n,t,r),r=!1),d=!1}));const o=t.append("line").attr("x1",(0,s.c)().state.padding).attr("y1",(0,s.c)().state.padding+i+(0,s.c)().state.dividerMargin/2).attr("y2",(0,s.c)().state.padding+i+(0,s.c)().state.dividerMargin/2).attr("class","descr-divider"),c=n.node().getBBox(),g=Math.max(c.width,a.width);return o.attr("x2",g+3*(0,s.c)().state.padding),t.insert("rect",":first-child").attr("x",(0,s.c)().state.padding).attr("y",(0,s.c)().state.padding).attr("width",g+2*(0,s.c)().state.padding).attr("height",c.height+i+2*(0,s.c)().state.padding).attr("rx",(0,s.c)().state.radius),t},p=(t,e,a)=>{const i=(0,s.c)().state.padding,n=2*(0,s.c)().state.padding,d=t.node().getBBox(),r=d.width,o=d.x,c=t.append("text").attr("x",0).attr("y",(0,s.c)().state.titleShift).attr("font-size",(0,s.c)().state.fontSize).attr("class","state-title").text(e.id),g=c.node().getBBox().width+n;let p,h=Math.max(g,r);h===r&&(h+=n);const l=t.node().getBBox();e.doc,p=o-i,g>r&&(p=(r-h)/2+i),Math.abs(o-l.x)r&&(p=o-(g-r)/2);const x=1-(0,s.c)().state.textHeight;return t.insert("rect",":first-child").attr("x",p).attr("y",x).attr("class",a?"alt-composit":"composit").attr("width",h).attr("height",l.height+(0,s.c)().state.textHeight+(0,s.c)().state.titleShift+1).attr("rx","0"),c.attr("x",p+i),g<=r&&c.attr("x",o+(h-n)/2-g/2+i),t.insert("rect",":first-child").attr("x",p).attr("y",(0,s.c)().state.titleShift-(0,s.c)().state.textHeight-(0,s.c)().state.padding).attr("width",h).attr("height",3*(0,s.c)().state.textHeight).attr("rx",(0,s.c)().state.radius),t.insert("rect",":first-child").attr("x",p).attr("y",(0,s.c)().state.titleShift-(0,s.c)().state.textHeight-(0,s.c)().state.padding).attr("width",h).attr("height",l.height+3+2*(0,s.c)().state.textHeight).attr("rx",(0,s.c)().state.radius),t},h=(t,e)=>{e.attr("class","state-note");const a=e.append("rect").attr("x",0).attr("y",(0,s.c)().state.padding),i=e.append("g"),{textWidth:n,textHeight:d}=((t,e,a,i)=>{let n=0;const d=i.append("text");d.style("text-anchor","start"),d.attr("class","noteText");let r=t.replace(/\r\n/g,"
    ");r=r.replace(/\n/g,"
    ");const o=r.split(s.e.lineBreakRegex);let c=1.25*(0,s.c)().state.noteMargin;for(const g of o){const t=g.trim();if(t.length>0){const i=d.append("tspan");i.text(t),0===c&&(c+=i.node().getBBox().height),n+=c,i.attr("x",e+(0,s.c)().state.noteMargin),i.attr("y",a+n+1.25*(0,s.c)().state.noteMargin)}}return{textWidth:d.node().getBBox().width,textHeight:n}})(t,0,0,i);return a.attr("height",d+2*(0,s.c)().state.noteMargin),a.attr("width",n+2*(0,s.c)().state.noteMargin),a},l=function(t,e){const a=e.id,i={id:a,label:e.id,width:0,height:0},n=t.append("g").attr("id",a).attr("class","stateGroup");"start"===e.type&&(t=>{t.append("circle").attr("class","start-state").attr("r",(0,s.c)().state.sizeUnit).attr("cx",(0,s.c)().state.padding+(0,s.c)().state.sizeUnit).attr("cy",(0,s.c)().state.padding+(0,s.c)().state.sizeUnit)})(n),"end"===e.type&&(t=>{t.append("circle").attr("class","end-state-outer").attr("r",(0,s.c)().state.sizeUnit+(0,s.c)().state.miniPadding).attr("cx",(0,s.c)().state.padding+(0,s.c)().state.sizeUnit+(0,s.c)().state.miniPadding).attr("cy",(0,s.c)().state.padding+(0,s.c)().state.sizeUnit+(0,s.c)().state.miniPadding),t.append("circle").attr("class","end-state-inner").attr("r",(0,s.c)().state.sizeUnit).attr("cx",(0,s.c)().state.padding+(0,s.c)().state.sizeUnit+2).attr("cy",(0,s.c)().state.padding+(0,s.c)().state.sizeUnit+2)})(n),"fork"!==e.type&&"join"!==e.type||((t,e)=>{let a=(0,s.c)().state.forkWidth,i=(0,s.c)().state.forkHeight;if(e.parentId){let t=a;a=i,i=t}t.append("rect").style("stroke","black").style("fill","black").attr("width",a).attr("height",i).attr("x",(0,s.c)().state.padding).attr("y",(0,s.c)().state.padding)})(n,e),"note"===e.type&&h(e.note.text,n),"divider"===e.type&&(t=>{t.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",(0,s.c)().state.textHeight).attr("class","divider").attr("x2",2*(0,s.c)().state.textHeight).attr("y1",0).attr("y2",0)})(n),"default"===e.type&&0===e.descriptions.length&&((t,e)=>{const a=t.append("text").attr("x",2*(0,s.c)().state.padding).attr("y",(0,s.c)().state.textHeight+2*(0,s.c)().state.padding).attr("font-size",(0,s.c)().state.fontSize).attr("class","state-title").text(e.id),i=a.node().getBBox();t.insert("rect",":first-child").attr("x",(0,s.c)().state.padding).attr("y",(0,s.c)().state.padding).attr("width",i.width+2*(0,s.c)().state.padding).attr("height",i.height+2*(0,s.c)().state.padding).attr("rx",(0,s.c)().state.radius)})(n,e),"default"===e.type&&e.descriptions.length>0&&g(n,e);const d=n.node().getBBox();return i.width=d.width+2*(0,s.c)().state.padding,i.height=d.height+2*(0,s.c)().state.padding,c(a,i),i};let x=0;let u;const f={},y=(t,e,a,o,c,g,h)=>{const w=new r.T({compound:!0,multigraph:!0});let b,B=!0;for(b=0;b{const e=t.parentElement;let a=0,i=0;e&&(e.parentElement&&(a=e.parentElement.getBBox().width),i=parseInt(e.getAttribute("data-x-shift"),10),Number.isNaN(i)&&(i=0)),t.setAttribute("x1",0-i+8),t.setAttribute("x2",a-i-8)}))}else s.l.debug("No Node "+t+": "+JSON.stringify(w.node(t)))}));let M=v.getBBox();w.edges().forEach((function(t){void 0!==t&&void 0!==w.edge(t)&&(s.l.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(w.edge(t))),function(t,e,a){e.points=e.points.filter((t=>!Number.isNaN(t.y)));const d=e.points,r=(0,n.n8j)().x((function(t){return t.x})).y((function(t){return t.y})).curve(n.qrM),o=t.append("path").attr("d",r(d)).attr("id","edge"+x).attr("class","transition");let c="";if((0,s.c)().state.arrowMarkerAbsolute&&(c=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,c=c.replace(/\(/g,"\\("),c=c.replace(/\)/g,"\\)")),o.attr("marker-end","url("+c+"#"+function(t){switch(t){case i.d.relationType.AGGREGATION:return"aggregation";case i.d.relationType.EXTENSION:return"extension";case i.d.relationType.COMPOSITION:return"composition";case i.d.relationType.DEPENDENCY:return"dependency"}}(i.d.relationType.DEPENDENCY)+"End)"),void 0!==a.title){const i=t.append("g").attr("class","stateLabel"),{x:n,y:d}=s.u.calcLabelPosition(e.points),r=s.e.getRows(a.title);let o=0;const c=[];let g=0,p=0;for(let t=0;t<=r.length;t++){const e=i.append("text").attr("text-anchor","middle").text(r[t]).attr("x",n).attr("y",d+o),a=e.node().getBBox();if(g=Math.max(g,a.width),p=Math.min(p,a.x),s.l.info(a.x,n,d+o),0===o){const t=e.node().getBBox();o=t.height,s.l.info("Title height",o,d)}c.push(e)}let h=o*r.length;if(r.length>1){const t=(r.length-1)*o*.5;c.forEach(((e,a)=>e.attr("y",d+a*o-t))),h=o*r.length}const l=i.node().getBBox();i.insert("rect",":first-child").attr("class","box").attr("x",n-g/2-(0,s.c)().state.padding/2).attr("y",d-h/2-(0,s.c)().state.padding/2-3.5).attr("width",g+(0,s.c)().state.padding).attr("height",h+(0,s.c)().state.padding),s.l.info(l)}x++}(e,w.edge(t),w.edge(t).relation))})),M=v.getBBox();const S={id:a||"root",label:a||"root",width:0,height:0};return S.width=M.width+2*u.padding,S.height=M.height+2*u.padding,s.l.debug("Doc rendered",S,w),S},w={setConf:function(){},draw:function(t,e,a,i){u=(0,s.c)().state;const d=(0,s.c)().securityLevel;let r;"sandbox"===d&&(r=(0,n.Ltv)("#i"+e));const o="sandbox"===d?(0,n.Ltv)(r.nodes()[0].contentDocument.body):(0,n.Ltv)("body"),c="sandbox"===d?r.nodes()[0].contentDocument:document;s.l.debug("Rendering diagram "+t);const g=o.select(`[id='${e}']`);g.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z");const p=i.db.getRootDoc();y(p,g,void 0,!1,o,c,i);const h=u.padding,l=g.node().getBBox(),x=l.width+2*h,f=l.height+2*h,w=1.75*x;(0,s.i)(g,f,w,u.useMaxWidth),g.attr("viewBox",`${l.x-u.padding} ${l.y-u.padding} `+x+" "+f)}},b={parser:i.p,db:i.d,renderer:w,styles:i.s,init:t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute,i.d.clear()}}}}]); \ No newline at end of file diff --git a/assets/js/5193d8a9.57817f97.js b/assets/js/5193d8a9.57817f97.js deleted file mode 100644 index 827b8ff7777c..000000000000 --- a/assets/js/5193d8a9.57817f97.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1511],{33199:(e,o,n)=>{n.r(o),n.d(o,{assets:()=>l,contentTitle:()=>t,default:()=>c,frontMatter:()=>d,metadata:()=>s,toc:()=>i});var a=n(74848),r=n(28453);const d={id:"polkadot-opengov-referenda-home",title:"Polkadot OpenGov Referenda - Home",sidebar_label:"OpenGov Referenda - Home",description:"Polkadot OpenGov Referenda - Home descriptions",keywords:["polkadot","governance","dashboard","dune"],slug:"../polkadot-opengov-referenda-home"},t="Polkadot OpenGov Referenda - Home",s={id:"general/dune-analytics/polkadot-dashboards/legacy/polkadot-opengov-referenda-home",title:"Polkadot OpenGov Referenda - Home",description:"Polkadot OpenGov Referenda - Home descriptions",source:"@site/../docs/general/dune-analytics/polkadot-dashboards/legacy/polkadot-opengov-referenda-home.md",sourceDirName:"general/dune-analytics/polkadot-dashboards/legacy",slug:"/general/dune-analytics/polkadot-dashboards/polkadot-opengov-referenda-home",permalink:"/docs/general/dune-analytics/polkadot-dashboards/polkadot-opengov-referenda-home",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/polkadot-dashboards/legacy/polkadot-opengov-referenda-home.md",tags:[],version:"current",lastUpdatedBy:"MK",lastUpdatedAt:1717658873e3,frontMatter:{id:"polkadot-opengov-referenda-home",title:"Polkadot OpenGov Referenda - Home",sidebar_label:"OpenGov Referenda - Home",description:"Polkadot OpenGov Referenda - Home descriptions",keywords:["polkadot","governance","dashboard","dune"],slug:"../polkadot-opengov-referenda-home"}},l={},i=[{value:"View On Dune: Polkadot OpenGov Referenda - Home",id:"view-on-dune-polkadot-opengov-referenda---home",level:2},{value:"Polkadot OpenGov Referenda Home",id:"polkadot-opengov-referenda-home",level:2},{value:"Controversial Referenda",id:"controversial-referenda",level:2}];function p(e){const o={a:"a",h1:"h1",h2:"h2",header:"header",p:"p",strong:"strong",...(0,r.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(o.header,{children:(0,a.jsx)(o.h1,{id:"polkadot-opengov-referenda---home",children:"Polkadot OpenGov Referenda - Home"})}),"\n",(0,a.jsxs)(o.h2,{id:"view-on-dune-polkadot-opengov-referenda---home",children:["View On Dune: ",(0,a.jsx)(o.a,{href:"https://dune.com/substrate/polkadot-opengov-active-referenda",children:"Polkadot OpenGov Referenda - Home"})]}),"\n",(0,a.jsx)(o.h2,{id:"polkadot-opengov-referenda-home",children:"Polkadot OpenGov Referenda Home"}),"\n",(0,a.jsxs)(o.p,{children:["This dashboard is designed for those who wish to vote, allowing them to quickly understand the\ncurrent trend in Polkadot OpenGov and proceed to vote on\n",(0,a.jsx)(o.a,{href:"https://polkadot.polkassembly.io/opengov",children:(0,a.jsx)(o.strong,{children:"Polkassembly"})}),"."]}),"\n",(0,a.jsxs)(o.p,{children:["If you want to see more details of each referendum, please check\n",(0,a.jsx)(o.a,{href:"https://dune.com/substrate/polkadot-referendum",children:(0,a.jsx)(o.strong,{children:"Polkadot Opengov - Referendum Voting Analysis"})}),"."]}),"\n",(0,a.jsxs)(o.p,{children:["Authored by ",(0,a.jsx)(o.a,{href:"https://x.com/colorfulnotion",children:(0,a.jsx)(o.strong,{children:"@ colorfulnotion"})})]}),"\n",(0,a.jsx)(o.h2,{id:"controversial-referenda",children:"Controversial Referenda"}),"\n",(0,a.jsxs)(o.p,{children:["Select those referenda with approval ratings ranging from ",(0,a.jsx)(o.strong,{children:"0.2"})," to ",(0,a.jsx)(o.strong,{children:"0.8"}),", and consider them as\ncontroversial referenda."]})]})}function c(e={}){const{wrapper:o}={...(0,r.R)(),...e.components};return o?(0,a.jsx)(o,{...e,children:(0,a.jsx)(p,{...e})}):p(e)}},28453:(e,o,n)=>{n.d(o,{R:()=>t,x:()=>s});var a=n(96540);const r={},d=a.createContext(r);function t(e){const o=a.useContext(d);return a.useMemo((function(){return"function"==typeof e?e(o):{...o,...e}}),[o,e])}function s(e){let o;return o=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:t(e.components),a.createElement(d.Provider,{value:o},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/5193d8a9.c088f047.js b/assets/js/5193d8a9.c088f047.js new file mode 100644 index 000000000000..d1e02fbbf81c --- /dev/null +++ b/assets/js/5193d8a9.c088f047.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1511],{6513:(e,o,n)=>{n.r(o),n.d(o,{assets:()=>l,contentTitle:()=>s,default:()=>c,frontMatter:()=>t,metadata:()=>a,toc:()=>i});const a=JSON.parse('{"id":"general/dune-analytics/polkadot-dashboards/legacy/polkadot-opengov-referenda-home","title":"Polkadot OpenGov Referenda - Home","description":"Polkadot OpenGov Referenda - Home descriptions","source":"@site/../docs/general/dune-analytics/polkadot-dashboards/legacy/polkadot-opengov-referenda-home.md","sourceDirName":"general/dune-analytics/polkadot-dashboards/legacy","slug":"/general/dune-analytics/polkadot-dashboards/polkadot-opengov-referenda-home","permalink":"/docs/general/dune-analytics/polkadot-dashboards/polkadot-opengov-referenda-home","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/polkadot-dashboards/legacy/polkadot-opengov-referenda-home.md","tags":[],"version":"current","lastUpdatedBy":"MK","lastUpdatedAt":1717658873000,"frontMatter":{"id":"polkadot-opengov-referenda-home","title":"Polkadot OpenGov Referenda - Home","sidebar_label":"OpenGov Referenda - Home","description":"Polkadot OpenGov Referenda - Home descriptions","keywords":["polkadot","governance","dashboard","dune"],"slug":"../polkadot-opengov-referenda-home"}}');var r=n(74848),d=n(28453);const t={id:"polkadot-opengov-referenda-home",title:"Polkadot OpenGov Referenda - Home",sidebar_label:"OpenGov Referenda - Home",description:"Polkadot OpenGov Referenda - Home descriptions",keywords:["polkadot","governance","dashboard","dune"],slug:"../polkadot-opengov-referenda-home"},s="Polkadot OpenGov Referenda - Home",l={},i=[{value:"View On Dune: Polkadot OpenGov Referenda - Home",id:"view-on-dune-polkadot-opengov-referenda---home",level:2},{value:"Polkadot OpenGov Referenda Home",id:"polkadot-opengov-referenda-home",level:2},{value:"Controversial Referenda",id:"controversial-referenda",level:2}];function p(e){const o={a:"a",h1:"h1",h2:"h2",header:"header",p:"p",strong:"strong",...(0,d.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.header,{children:(0,r.jsx)(o.h1,{id:"polkadot-opengov-referenda---home",children:"Polkadot OpenGov Referenda - Home"})}),"\n",(0,r.jsxs)(o.h2,{id:"view-on-dune-polkadot-opengov-referenda---home",children:["View On Dune: ",(0,r.jsx)(o.a,{href:"https://dune.com/substrate/polkadot-opengov-active-referenda",children:"Polkadot OpenGov Referenda - Home"})]}),"\n",(0,r.jsx)(o.h2,{id:"polkadot-opengov-referenda-home",children:"Polkadot OpenGov Referenda Home"}),"\n",(0,r.jsxs)(o.p,{children:["This dashboard is designed for those who wish to vote, allowing them to quickly understand the\ncurrent trend in Polkadot OpenGov and proceed to vote on\n",(0,r.jsx)(o.a,{href:"https://polkadot.polkassembly.io/opengov",children:(0,r.jsx)(o.strong,{children:"Polkassembly"})}),"."]}),"\n",(0,r.jsxs)(o.p,{children:["If you want to see more details of each referendum, please check\n",(0,r.jsx)(o.a,{href:"https://dune.com/substrate/polkadot-referendum",children:(0,r.jsx)(o.strong,{children:"Polkadot Opengov - Referendum Voting Analysis"})}),"."]}),"\n",(0,r.jsxs)(o.p,{children:["Authored by ",(0,r.jsx)(o.a,{href:"https://x.com/colorfulnotion",children:(0,r.jsx)(o.strong,{children:"@ colorfulnotion"})})]}),"\n",(0,r.jsx)(o.h2,{id:"controversial-referenda",children:"Controversial Referenda"}),"\n",(0,r.jsxs)(o.p,{children:["Select those referenda with approval ratings ranging from ",(0,r.jsx)(o.strong,{children:"0.2"})," to ",(0,r.jsx)(o.strong,{children:"0.8"}),", and consider them as\ncontroversial referenda."]})]})}function c(e={}){const{wrapper:o}={...(0,d.R)(),...e.components};return o?(0,r.jsx)(o,{...e,children:(0,r.jsx)(p,{...e})}):p(e)}},28453:(e,o,n)=>{n.d(o,{R:()=>t,x:()=>s});var a=n(96540);const r={},d=a.createContext(r);function t(e){const o=a.useContext(d);return a.useMemo((function(){return"function"==typeof e?e(o):{...o,...e}}),[o,e])}function s(e){let o;return o=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:t(e.components),a.createElement(d.Provider,{value:o},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/51fbc2c9.46eee2de.js b/assets/js/51fbc2c9.46eee2de.js new file mode 100644 index 000000000000..be7db614e5cb --- /dev/null +++ b/assets/js/51fbc2c9.46eee2de.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2706],{15727:(e,n,a)=>{a.r(n),a.d(n,{assets:()=>c,contentTitle:()=>s,default:()=>d,frontMatter:()=>r,metadata:()=>t,toc:()=>l});const t=JSON.parse('{"id":"learn/learn-comparisons","title":"Polkadot Comparisons","description":"Comparison between Polkadot and ETH 1.0 and BSC.","source":"@site/../docs/learn/learn-comparisons.md","sourceDirName":"learn","slug":"/learn-comparisons","permalink":"/docs/learn-comparisons","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-comparisons.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1727991122000,"frontMatter":{"id":"learn-comparisons","title":"Polkadot Comparisons","sidebar_label":"Other Comparisons","description":"Comparison between Polkadot and ETH 1.0 and BSC.","keywords":["comparisons","polkadot","blockchain"],"slug":"../learn-comparisons"},"sidebar":"docs","previous":{"title":"Avalanche","permalink":"/docs/learn-comparisons-avalanche"},"next":{"title":"Layer Two and Rollups","permalink":"/docs/learn-comparisons-rollups"}}');var o=a(74848),i=a(28453);const r={id:"learn-comparisons",title:"Polkadot Comparisons",sidebar_label:"Other Comparisons",description:"Comparison between Polkadot and ETH 1.0 and BSC.",keywords:["comparisons","polkadot","blockchain"],slug:"../learn-comparisons"},s=void 0,c={},l=[{value:"Ethereum 1.x",id:"ethereum-1x",level:2},{value:"Binance Smart Chain",id:"binance-smart-chain",level:2}];function h(e){const n={a:"a",admonition:"admonition",h2:"h2",p:"p",...(0,i.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.p,{children:"Polkadot is a blockchain protocol that is innovating in the web3 space."}),"\n",(0,o.jsx)(n.admonition,{title:"In-depth Comparisons for multi-chain ecosystems",type:"info",children:(0,o.jsxs)(n.p,{children:["See the in-depth comparisons for ",(0,o.jsx)(n.a,{href:"/docs/learn-comparisons-ethereum-2",children:"Ethereum 2.0"}),",\n",(0,o.jsx)(n.a,{href:"/docs/learn-comparisons-cosmos",children:"Cosmos"})," and ",(0,o.jsx)(n.a,{href:"/docs/learn-comparisons-avalanche",children:"Avalanche"}),"."]})}),"\n",(0,o.jsx)(n.h2,{id:"ethereum-1x",children:"Ethereum 1.x"}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.a,{href:"https://ethereum.org",children:"Ethereum"})," is a smart contract blockchain that allows for general computation\nto be deployed on-chain and operated across the p2p network. Ethereum 1.x refers to the current\nEthereum release and the immediately planned future upgrades."]}),"\n",(0,o.jsx)(n.p,{children:"The difference between Ethereum 1.x and Polkadot is quite large. Ethereum is a single chain that\nallows developers to extend its functionality through the deployment of blobs of code onto the chain\n(called smart contracts). Polkadot, as described in the whitepaper, is a fully extensible and\nscalable blockchain network that provides security and interoperability through shared state."}),"\n",(0,o.jsx)(n.p,{children:"In practical terms, this means that the layer of abstraction between these two projects is\nremarkably different for developers. In Ethereum, developers write smart contracts that all execute\non a single virtual machine, called the Ethereum Virtual Machine (EVM). In Polkadot, however,\ndevelopers write their logic into individual blockchains, where the interface is part of the state\ntransition function of the blockchain itself. Polkadot will also support smart contract blockchains\nfor Wasm and EVM to provide compatibility with existing contracts, but will not have smart contract\nfunctionality on its core chain, the relay chain."}),"\n",(0,o.jsx)(n.p,{children:"As such, Polkadot is a possible augmentation and scaling method for Ethereum 1.x, rather than\ncompetition."}),"\n",(0,o.jsx)(n.h2,{id:"binance-smart-chain",children:"Binance Smart Chain"}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.a,{href:"https://www.binance.com",children:"Binance Chain"})," is a Proof of Stake Authority (PoSA) blockchain used to\nexchange digital assets on Binance DEX. Binance Smart Chain is an EVM-compatible smart contract\nchain bridged to Binance Chain. Together, they form the Binance Dual Chain System. Binance Smart\nChain is also a Proof of Stake Authority chain and allows users to create smart contracts and dapps."]}),"\n",(0,o.jsxs)(n.p,{children:["Both chains are built with Cosmos SDK and therefore are a part of the\n",(0,o.jsx)(n.a,{href:"/docs/learn-comparisons-cosmos",children:"Cosmos"})," ecosystem. Due to specifics of the Cosmos architecture,\ninteroperability of Binance Smart Chain is based on bridges. This means all validators of both\nchains are also bridge operators, therefore the security of the system relies on trusting\nvalidators. At the moment, there are 21 Binance Smart Chain validator nodes."]}),"\n",(0,o.jsx)(n.p,{children:"Polkadot has an entirely different purpose, as it was built to connect and secure unique\nblockchains. It is a protocol on which single blockchains (such as Binance Smart Chain) could be\nbuilt and benefit from shared security, interoperability and scalability. Interoperability within\nPolkadot is based on pooled security on Polkadot, and the security of the entire Polkadot network,\nand has much stronger economic security."}),"\n",(0,o.jsx)(n.p,{children:"Scalability based on bridges relies on each bridged chain finding its own set of validators,\ntherefore duplicate resources are required. Scalability on Polkadot is based on the security of the\nrelay chain, and as the number of validators in the active set on Polkadot are increased, more\nparachains can be supported."})]})}function d(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(h,{...e})}):h(e)}},28453:(e,n,a)=>{a.d(n,{R:()=>r,x:()=>s});var t=a(96540);const o={},i=t.createContext(o);function r(e){const n=t.useContext(i);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function s(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:r(e.components),t.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/51fbc2c9.832596c8.js b/assets/js/51fbc2c9.832596c8.js deleted file mode 100644 index 5b9f74f45288..000000000000 --- a/assets/js/51fbc2c9.832596c8.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2706],{43953:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>r,default:()=>d,frontMatter:()=>i,metadata:()=>s,toc:()=>l});var a=t(74848),o=t(28453);const i={id:"learn-comparisons",title:"Polkadot Comparisons",sidebar_label:"Other Comparisons",description:"Comparison between Polkadot and ETH 1.0 and BSC.",keywords:["comparisons","polkadot","blockchain"],slug:"../learn-comparisons"},r=void 0,s={id:"learn/learn-comparisons",title:"Polkadot Comparisons",description:"Comparison between Polkadot and ETH 1.0 and BSC.",source:"@site/../docs/learn/learn-comparisons.md",sourceDirName:"learn",slug:"/learn-comparisons",permalink:"/docs/learn-comparisons",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-comparisons.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1727991122e3,frontMatter:{id:"learn-comparisons",title:"Polkadot Comparisons",sidebar_label:"Other Comparisons",description:"Comparison between Polkadot and ETH 1.0 and BSC.",keywords:["comparisons","polkadot","blockchain"],slug:"../learn-comparisons"},sidebar:"docs",previous:{title:"Avalanche",permalink:"/docs/learn-comparisons-avalanche"},next:{title:"Layer Two and Rollups",permalink:"/docs/learn-comparisons-rollups"}},c={},l=[{value:"Ethereum 1.x",id:"ethereum-1x",level:2},{value:"Binance Smart Chain",id:"binance-smart-chain",level:2}];function h(e){const n={a:"a",admonition:"admonition",h2:"h2",p:"p",...(0,o.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.p,{children:"Polkadot is a blockchain protocol that is innovating in the web3 space."}),"\n",(0,a.jsx)(n.admonition,{title:"In-depth Comparisons for multi-chain ecosystems",type:"info",children:(0,a.jsxs)(n.p,{children:["See the in-depth comparisons for ",(0,a.jsx)(n.a,{href:"/docs/learn-comparisons-ethereum-2",children:"Ethereum 2.0"}),",\n",(0,a.jsx)(n.a,{href:"/docs/learn-comparisons-cosmos",children:"Cosmos"})," and ",(0,a.jsx)(n.a,{href:"/docs/learn-comparisons-avalanche",children:"Avalanche"}),"."]})}),"\n",(0,a.jsx)(n.h2,{id:"ethereum-1x",children:"Ethereum 1.x"}),"\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.a,{href:"https://ethereum.org",children:"Ethereum"})," is a smart contract blockchain that allows for general computation\nto be deployed on-chain and operated across the p2p network. Ethereum 1.x refers to the current\nEthereum release and the immediately planned future upgrades."]}),"\n",(0,a.jsx)(n.p,{children:"The difference between Ethereum 1.x and Polkadot is quite large. Ethereum is a single chain that\nallows developers to extend its functionality through the deployment of blobs of code onto the chain\n(called smart contracts). Polkadot, as described in the whitepaper, is a fully extensible and\nscalable blockchain network that provides security and interoperability through shared state."}),"\n",(0,a.jsx)(n.p,{children:"In practical terms, this means that the layer of abstraction between these two projects is\nremarkably different for developers. In Ethereum, developers write smart contracts that all execute\non a single virtual machine, called the Ethereum Virtual Machine (EVM). In Polkadot, however,\ndevelopers write their logic into individual blockchains, where the interface is part of the state\ntransition function of the blockchain itself. Polkadot will also support smart contract blockchains\nfor Wasm and EVM to provide compatibility with existing contracts, but will not have smart contract\nfunctionality on its core chain, the relay chain."}),"\n",(0,a.jsx)(n.p,{children:"As such, Polkadot is a possible augmentation and scaling method for Ethereum 1.x, rather than\ncompetition."}),"\n",(0,a.jsx)(n.h2,{id:"binance-smart-chain",children:"Binance Smart Chain"}),"\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.a,{href:"https://www.binance.com",children:"Binance Chain"})," is a Proof of Stake Authority (PoSA) blockchain used to\nexchange digital assets on Binance DEX. Binance Smart Chain is an EVM-compatible smart contract\nchain bridged to Binance Chain. Together, they form the Binance Dual Chain System. Binance Smart\nChain is also a Proof of Stake Authority chain and allows users to create smart contracts and dapps."]}),"\n",(0,a.jsxs)(n.p,{children:["Both chains are built with Cosmos SDK and therefore are a part of the\n",(0,a.jsx)(n.a,{href:"/docs/learn-comparisons-cosmos",children:"Cosmos"})," ecosystem. Due to specifics of the Cosmos architecture,\ninteroperability of Binance Smart Chain is based on bridges. This means all validators of both\nchains are also bridge operators, therefore the security of the system relies on trusting\nvalidators. At the moment, there are 21 Binance Smart Chain validator nodes."]}),"\n",(0,a.jsx)(n.p,{children:"Polkadot has an entirely different purpose, as it was built to connect and secure unique\nblockchains. It is a protocol on which single blockchains (such as Binance Smart Chain) could be\nbuilt and benefit from shared security, interoperability and scalability. Interoperability within\nPolkadot is based on pooled security on Polkadot, and the security of the entire Polkadot network,\nand has much stronger economic security."}),"\n",(0,a.jsx)(n.p,{children:"Scalability based on bridges relies on each bridged chain finding its own set of validators,\ntherefore duplicate resources are required. Scalability on Polkadot is based on the security of the\nrelay chain, and as the number of validators in the active set on Polkadot are increased, more\nparachains can be supported."})]})}function d(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(h,{...e})}):h(e)}},28453:(e,n,t)=>{t.d(n,{R:()=>r,x:()=>s});var a=t(96540);const o={},i=a.createContext(o);function r(e){const n=a.useContext(i);return a.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function s(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:r(e.components),a.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/529.3a841e64.js b/assets/js/529.3a841e64.js deleted file mode 100644 index e8e1e3831301..000000000000 --- a/assets/js/529.3a841e64.js +++ /dev/null @@ -1,1410 +0,0 @@ -"use strict"; -exports.id = 529; -exports.ids = [529]; -exports.modules = { - -/***/ 64529: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - diagram: () => (/* binding */ diagram) -}); - -// EXTERNAL MODULE: ./node_modules/mermaid/dist/mermaid-b5860b54.js + 8 modules -var mermaid_b5860b54 = __webpack_require__(86079); -// EXTERNAL MODULE: ./node_modules/d3/src/index.js + 197 modules -var src = __webpack_require__(26312); -;// CONCATENATED MODULE: ./node_modules/d3-sankey/node_modules/d3-array/src/min.js -function min(values, valueof) { - let min; - if (valueof === undefined) { - for (const value of values) { - if (value != null - && (min > value || (min === undefined && value >= value))) { - min = value; - } - } - } else { - let index = -1; - for (let value of values) { - if ((value = valueof(value, ++index, values)) != null - && (min > value || (min === undefined && value >= value))) { - min = value; - } - } - } - return min; -} - -;// CONCATENATED MODULE: ./node_modules/d3-sankey/src/align.js - - -function targetDepth(d) { - return d.target.depth; -} - -function left(node) { - return node.depth; -} - -function right(node, n) { - return n - 1 - node.height; -} - -function justify(node, n) { - return node.sourceLinks.length ? node.depth : n - 1; -} - -function center(node) { - return node.targetLinks.length ? node.depth - : node.sourceLinks.length ? min(node.sourceLinks, targetDepth) - 1 - : 0; -} - -;// CONCATENATED MODULE: ./node_modules/d3-sankey/node_modules/d3-array/src/sum.js -function sum(values, valueof) { - let sum = 0; - if (valueof === undefined) { - for (let value of values) { - if (value = +value) { - sum += value; - } - } - } else { - let index = -1; - for (let value of values) { - if (value = +valueof(value, ++index, values)) { - sum += value; - } - } - } - return sum; -} - -;// CONCATENATED MODULE: ./node_modules/d3-sankey/node_modules/d3-array/src/max.js -function max(values, valueof) { - let max; - if (valueof === undefined) { - for (const value of values) { - if (value != null - && (max < value || (max === undefined && value >= value))) { - max = value; - } - } - } else { - let index = -1; - for (let value of values) { - if ((value = valueof(value, ++index, values)) != null - && (max < value || (max === undefined && value >= value))) { - max = value; - } - } - } - return max; -} - -;// CONCATENATED MODULE: ./node_modules/d3-sankey/src/constant.js -function constant(x) { - return function() { - return x; - }; -} - -;// CONCATENATED MODULE: ./node_modules/d3-sankey/src/sankey.js - - - - -function ascendingSourceBreadth(a, b) { - return ascendingBreadth(a.source, b.source) || a.index - b.index; -} - -function ascendingTargetBreadth(a, b) { - return ascendingBreadth(a.target, b.target) || a.index - b.index; -} - -function ascendingBreadth(a, b) { - return a.y0 - b.y0; -} - -function value(d) { - return d.value; -} - -function defaultId(d) { - return d.index; -} - -function defaultNodes(graph) { - return graph.nodes; -} - -function defaultLinks(graph) { - return graph.links; -} - -function find(nodeById, id) { - const node = nodeById.get(id); - if (!node) throw new Error("missing: " + id); - return node; -} - -function computeLinkBreadths({nodes}) { - for (const node of nodes) { - let y0 = node.y0; - let y1 = y0; - for (const link of node.sourceLinks) { - link.y0 = y0 + link.width / 2; - y0 += link.width; - } - for (const link of node.targetLinks) { - link.y1 = y1 + link.width / 2; - y1 += link.width; - } - } -} - -function Sankey() { - let x0 = 0, y0 = 0, x1 = 1, y1 = 1; // extent - let dx = 24; // nodeWidth - let dy = 8, py; // nodePadding - let id = defaultId; - let align = justify; - let sort; - let linkSort; - let nodes = defaultNodes; - let links = defaultLinks; - let iterations = 6; - - function sankey() { - const graph = {nodes: nodes.apply(null, arguments), links: links.apply(null, arguments)}; - computeNodeLinks(graph); - computeNodeValues(graph); - computeNodeDepths(graph); - computeNodeHeights(graph); - computeNodeBreadths(graph); - computeLinkBreadths(graph); - return graph; - } - - sankey.update = function(graph) { - computeLinkBreadths(graph); - return graph; - }; - - sankey.nodeId = function(_) { - return arguments.length ? (id = typeof _ === "function" ? _ : constant(_), sankey) : id; - }; - - sankey.nodeAlign = function(_) { - return arguments.length ? (align = typeof _ === "function" ? _ : constant(_), sankey) : align; - }; - - sankey.nodeSort = function(_) { - return arguments.length ? (sort = _, sankey) : sort; - }; - - sankey.nodeWidth = function(_) { - return arguments.length ? (dx = +_, sankey) : dx; - }; - - sankey.nodePadding = function(_) { - return arguments.length ? (dy = py = +_, sankey) : dy; - }; - - sankey.nodes = function(_) { - return arguments.length ? (nodes = typeof _ === "function" ? _ : constant(_), sankey) : nodes; - }; - - sankey.links = function(_) { - return arguments.length ? (links = typeof _ === "function" ? _ : constant(_), sankey) : links; - }; - - sankey.linkSort = function(_) { - return arguments.length ? (linkSort = _, sankey) : linkSort; - }; - - sankey.size = function(_) { - return arguments.length ? (x0 = y0 = 0, x1 = +_[0], y1 = +_[1], sankey) : [x1 - x0, y1 - y0]; - }; - - sankey.extent = function(_) { - return arguments.length ? (x0 = +_[0][0], x1 = +_[1][0], y0 = +_[0][1], y1 = +_[1][1], sankey) : [[x0, y0], [x1, y1]]; - }; - - sankey.iterations = function(_) { - return arguments.length ? (iterations = +_, sankey) : iterations; - }; - - function computeNodeLinks({nodes, links}) { - for (const [i, node] of nodes.entries()) { - node.index = i; - node.sourceLinks = []; - node.targetLinks = []; - } - const nodeById = new Map(nodes.map((d, i) => [id(d, i, nodes), d])); - for (const [i, link] of links.entries()) { - link.index = i; - let {source, target} = link; - if (typeof source !== "object") source = link.source = find(nodeById, source); - if (typeof target !== "object") target = link.target = find(nodeById, target); - source.sourceLinks.push(link); - target.targetLinks.push(link); - } - if (linkSort != null) { - for (const {sourceLinks, targetLinks} of nodes) { - sourceLinks.sort(linkSort); - targetLinks.sort(linkSort); - } - } - } - - function computeNodeValues({nodes}) { - for (const node of nodes) { - node.value = node.fixedValue === undefined - ? Math.max(sum(node.sourceLinks, value), sum(node.targetLinks, value)) - : node.fixedValue; - } - } - - function computeNodeDepths({nodes}) { - const n = nodes.length; - let current = new Set(nodes); - let next = new Set; - let x = 0; - while (current.size) { - for (const node of current) { - node.depth = x; - for (const {target} of node.sourceLinks) { - next.add(target); - } - } - if (++x > n) throw new Error("circular link"); - current = next; - next = new Set; - } - } - - function computeNodeHeights({nodes}) { - const n = nodes.length; - let current = new Set(nodes); - let next = new Set; - let x = 0; - while (current.size) { - for (const node of current) { - node.height = x; - for (const {source} of node.targetLinks) { - next.add(source); - } - } - if (++x > n) throw new Error("circular link"); - current = next; - next = new Set; - } - } - - function computeNodeLayers({nodes}) { - const x = max(nodes, d => d.depth) + 1; - const kx = (x1 - x0 - dx) / (x - 1); - const columns = new Array(x); - for (const node of nodes) { - const i = Math.max(0, Math.min(x - 1, Math.floor(align.call(null, node, x)))); - node.layer = i; - node.x0 = x0 + i * kx; - node.x1 = node.x0 + dx; - if (columns[i]) columns[i].push(node); - else columns[i] = [node]; - } - if (sort) for (const column of columns) { - column.sort(sort); - } - return columns; - } - - function initializeNodeBreadths(columns) { - const ky = min(columns, c => (y1 - y0 - (c.length - 1) * py) / sum(c, value)); - for (const nodes of columns) { - let y = y0; - for (const node of nodes) { - node.y0 = y; - node.y1 = y + node.value * ky; - y = node.y1 + py; - for (const link of node.sourceLinks) { - link.width = link.value * ky; - } - } - y = (y1 - y + py) / (nodes.length + 1); - for (let i = 0; i < nodes.length; ++i) { - const node = nodes[i]; - node.y0 += y * (i + 1); - node.y1 += y * (i + 1); - } - reorderLinks(nodes); - } - } - - function computeNodeBreadths(graph) { - const columns = computeNodeLayers(graph); - py = Math.min(dy, (y1 - y0) / (max(columns, c => c.length) - 1)); - initializeNodeBreadths(columns); - for (let i = 0; i < iterations; ++i) { - const alpha = Math.pow(0.99, i); - const beta = Math.max(1 - alpha, (i + 1) / iterations); - relaxRightToLeft(columns, alpha, beta); - relaxLeftToRight(columns, alpha, beta); - } - } - - // Reposition each node based on its incoming (target) links. - function relaxLeftToRight(columns, alpha, beta) { - for (let i = 1, n = columns.length; i < n; ++i) { - const column = columns[i]; - for (const target of column) { - let y = 0; - let w = 0; - for (const {source, value} of target.targetLinks) { - let v = value * (target.layer - source.layer); - y += targetTop(source, target) * v; - w += v; - } - if (!(w > 0)) continue; - let dy = (y / w - target.y0) * alpha; - target.y0 += dy; - target.y1 += dy; - reorderNodeLinks(target); - } - if (sort === undefined) column.sort(ascendingBreadth); - resolveCollisions(column, beta); - } - } - - // Reposition each node based on its outgoing (source) links. - function relaxRightToLeft(columns, alpha, beta) { - for (let n = columns.length, i = n - 2; i >= 0; --i) { - const column = columns[i]; - for (const source of column) { - let y = 0; - let w = 0; - for (const {target, value} of source.sourceLinks) { - let v = value * (target.layer - source.layer); - y += sourceTop(source, target) * v; - w += v; - } - if (!(w > 0)) continue; - let dy = (y / w - source.y0) * alpha; - source.y0 += dy; - source.y1 += dy; - reorderNodeLinks(source); - } - if (sort === undefined) column.sort(ascendingBreadth); - resolveCollisions(column, beta); - } - } - - function resolveCollisions(nodes, alpha) { - const i = nodes.length >> 1; - const subject = nodes[i]; - resolveCollisionsBottomToTop(nodes, subject.y0 - py, i - 1, alpha); - resolveCollisionsTopToBottom(nodes, subject.y1 + py, i + 1, alpha); - resolveCollisionsBottomToTop(nodes, y1, nodes.length - 1, alpha); - resolveCollisionsTopToBottom(nodes, y0, 0, alpha); - } - - // Push any overlapping nodes down. - function resolveCollisionsTopToBottom(nodes, y, i, alpha) { - for (; i < nodes.length; ++i) { - const node = nodes[i]; - const dy = (y - node.y0) * alpha; - if (dy > 1e-6) node.y0 += dy, node.y1 += dy; - y = node.y1 + py; - } - } - - // Push any overlapping nodes up. - function resolveCollisionsBottomToTop(nodes, y, i, alpha) { - for (; i >= 0; --i) { - const node = nodes[i]; - const dy = (node.y1 - y) * alpha; - if (dy > 1e-6) node.y0 -= dy, node.y1 -= dy; - y = node.y0 - py; - } - } - - function reorderNodeLinks({sourceLinks, targetLinks}) { - if (linkSort === undefined) { - for (const {source: {sourceLinks}} of targetLinks) { - sourceLinks.sort(ascendingTargetBreadth); - } - for (const {target: {targetLinks}} of sourceLinks) { - targetLinks.sort(ascendingSourceBreadth); - } - } - } - - function reorderLinks(nodes) { - if (linkSort === undefined) { - for (const {sourceLinks, targetLinks} of nodes) { - sourceLinks.sort(ascendingTargetBreadth); - targetLinks.sort(ascendingSourceBreadth); - } - } - } - - // Returns the target.y0 that would produce an ideal link from source to target. - function targetTop(source, target) { - let y = source.y0 - (source.sourceLinks.length - 1) * py / 2; - for (const {target: node, width} of source.sourceLinks) { - if (node === target) break; - y += width + py; - } - for (const {source: node, width} of target.targetLinks) { - if (node === source) break; - y -= width; - } - return y; - } - - // Returns the source.y0 that would produce an ideal link from source to target. - function sourceTop(source, target) { - let y = target.y0 - (target.targetLinks.length - 1) * py / 2; - for (const {source: node, width} of target.targetLinks) { - if (node === source) break; - y += width + py; - } - for (const {target: node, width} of source.sourceLinks) { - if (node === target) break; - y -= width; - } - return y; - } - - return sankey; -} - -;// CONCATENATED MODULE: ./node_modules/d3-sankey/node_modules/d3-path/src/path.js -var pi = Math.PI, - tau = 2 * pi, - epsilon = 1e-6, - tauEpsilon = tau - epsilon; - -function Path() { - this._x0 = this._y0 = // start of current subpath - this._x1 = this._y1 = null; // end of current subpath - this._ = ""; -} - -function path() { - return new Path; -} - -Path.prototype = path.prototype = { - constructor: Path, - moveTo: function(x, y) { - this._ += "M" + (this._x0 = this._x1 = +x) + "," + (this._y0 = this._y1 = +y); - }, - closePath: function() { - if (this._x1 !== null) { - this._x1 = this._x0, this._y1 = this._y0; - this._ += "Z"; - } - }, - lineTo: function(x, y) { - this._ += "L" + (this._x1 = +x) + "," + (this._y1 = +y); - }, - quadraticCurveTo: function(x1, y1, x, y) { - this._ += "Q" + (+x1) + "," + (+y1) + "," + (this._x1 = +x) + "," + (this._y1 = +y); - }, - bezierCurveTo: function(x1, y1, x2, y2, x, y) { - this._ += "C" + (+x1) + "," + (+y1) + "," + (+x2) + "," + (+y2) + "," + (this._x1 = +x) + "," + (this._y1 = +y); - }, - arcTo: function(x1, y1, x2, y2, r) { - x1 = +x1, y1 = +y1, x2 = +x2, y2 = +y2, r = +r; - var x0 = this._x1, - y0 = this._y1, - x21 = x2 - x1, - y21 = y2 - y1, - x01 = x0 - x1, - y01 = y0 - y1, - l01_2 = x01 * x01 + y01 * y01; - - // Is the radius negative? Error. - if (r < 0) throw new Error("negative radius: " + r); - - // Is this path empty? Move to (x1,y1). - if (this._x1 === null) { - this._ += "M" + (this._x1 = x1) + "," + (this._y1 = y1); - } - - // Or, is (x1,y1) coincident with (x0,y0)? Do nothing. - else if (!(l01_2 > epsilon)); - - // Or, are (x0,y0), (x1,y1) and (x2,y2) collinear? - // Equivalently, is (x1,y1) coincident with (x2,y2)? - // Or, is the radius zero? Line to (x1,y1). - else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon) || !r) { - this._ += "L" + (this._x1 = x1) + "," + (this._y1 = y1); - } - - // Otherwise, draw an arc! - else { - var x20 = x2 - x0, - y20 = y2 - y0, - l21_2 = x21 * x21 + y21 * y21, - l20_2 = x20 * x20 + y20 * y20, - l21 = Math.sqrt(l21_2), - l01 = Math.sqrt(l01_2), - l = r * Math.tan((pi - Math.acos((l21_2 + l01_2 - l20_2) / (2 * l21 * l01))) / 2), - t01 = l / l01, - t21 = l / l21; - - // If the start tangent is not coincident with (x0,y0), line to. - if (Math.abs(t01 - 1) > epsilon) { - this._ += "L" + (x1 + t01 * x01) + "," + (y1 + t01 * y01); - } - - this._ += "A" + r + "," + r + ",0,0," + (+(y01 * x20 > x01 * y20)) + "," + (this._x1 = x1 + t21 * x21) + "," + (this._y1 = y1 + t21 * y21); - } - }, - arc: function(x, y, r, a0, a1, ccw) { - x = +x, y = +y, r = +r, ccw = !!ccw; - var dx = r * Math.cos(a0), - dy = r * Math.sin(a0), - x0 = x + dx, - y0 = y + dy, - cw = 1 ^ ccw, - da = ccw ? a0 - a1 : a1 - a0; - - // Is the radius negative? Error. - if (r < 0) throw new Error("negative radius: " + r); - - // Is this path empty? Move to (x0,y0). - if (this._x1 === null) { - this._ += "M" + x0 + "," + y0; - } - - // Or, is (x0,y0) not coincident with the previous point? Line to (x0,y0). - else if (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) { - this._ += "L" + x0 + "," + y0; - } - - // Is this arc empty? We’re done. - if (!r) return; - - // Does the angle go the wrong way? Flip the direction. - if (da < 0) da = da % tau + tau; - - // Is this a complete circle? Draw two arcs to complete the circle. - if (da > tauEpsilon) { - this._ += "A" + r + "," + r + ",0,1," + cw + "," + (x - dx) + "," + (y - dy) + "A" + r + "," + r + ",0,1," + cw + "," + (this._x1 = x0) + "," + (this._y1 = y0); - } - - // Is this arc non-empty? Draw an arc! - else if (da > epsilon) { - this._ += "A" + r + "," + r + ",0," + (+(da >= pi)) + "," + cw + "," + (this._x1 = x + r * Math.cos(a1)) + "," + (this._y1 = y + r * Math.sin(a1)); - } - }, - rect: function(x, y, w, h) { - this._ += "M" + (this._x0 = this._x1 = +x) + "," + (this._y0 = this._y1 = +y) + "h" + (+w) + "v" + (+h) + "h" + (-w) + "Z"; - }, - toString: function() { - return this._; - } -}; - -/* harmony default export */ const src_path = (path); - -;// CONCATENATED MODULE: ./node_modules/d3-sankey/node_modules/d3-shape/src/array.js -var slice = Array.prototype.slice; - -;// CONCATENATED MODULE: ./node_modules/d3-sankey/node_modules/d3-shape/src/constant.js -/* harmony default export */ function src_constant(x) { - return function constant() { - return x; - }; -} - -;// CONCATENATED MODULE: ./node_modules/d3-sankey/node_modules/d3-shape/src/point.js -function point_x(p) { - return p[0]; -} - -function point_y(p) { - return p[1]; -} - -;// CONCATENATED MODULE: ./node_modules/d3-sankey/node_modules/d3-shape/src/link/index.js - - - - - - -function linkSource(d) { - return d.source; -} - -function linkTarget(d) { - return d.target; -} - -function link_link(curve) { - var source = linkSource, - target = linkTarget, - x = point_x, - y = point_y, - context = null; - - function link() { - var buffer, argv = slice.call(arguments), s = source.apply(this, argv), t = target.apply(this, argv); - if (!context) context = buffer = src_path(); - curve(context, +x.apply(this, (argv[0] = s, argv)), +y.apply(this, argv), +x.apply(this, (argv[0] = t, argv)), +y.apply(this, argv)); - if (buffer) return context = null, buffer + "" || null; - } - - link.source = function(_) { - return arguments.length ? (source = _, link) : source; - }; - - link.target = function(_) { - return arguments.length ? (target = _, link) : target; - }; - - link.x = function(_) { - return arguments.length ? (x = typeof _ === "function" ? _ : src_constant(+_), link) : x; - }; - - link.y = function(_) { - return arguments.length ? (y = typeof _ === "function" ? _ : src_constant(+_), link) : y; - }; - - link.context = function(_) { - return arguments.length ? ((context = _ == null ? null : _), link) : context; - }; - - return link; -} - -function curveHorizontal(context, x0, y0, x1, y1) { - context.moveTo(x0, y0); - context.bezierCurveTo(x0 = (x0 + x1) / 2, y0, x0, y1, x1, y1); -} - -function curveVertical(context, x0, y0, x1, y1) { - context.moveTo(x0, y0); - context.bezierCurveTo(x0, y0 = (y0 + y1) / 2, x1, y0, x1, y1); -} - -function curveRadial(context, x0, y0, x1, y1) { - var p0 = pointRadial(x0, y0), - p1 = pointRadial(x0, y0 = (y0 + y1) / 2), - p2 = pointRadial(x1, y0), - p3 = pointRadial(x1, y1); - context.moveTo(p0[0], p0[1]); - context.bezierCurveTo(p1[0], p1[1], p2[0], p2[1], p3[0], p3[1]); -} - -function linkHorizontal() { - return link_link(curveHorizontal); -} - -function linkVertical() { - return link_link(curveVertical); -} - -function linkRadial() { - var l = link_link(curveRadial); - l.angle = l.x, delete l.x; - l.radius = l.y, delete l.y; - return l; -} - -;// CONCATENATED MODULE: ./node_modules/d3-sankey/src/sankeyLinkHorizontal.js - - -function horizontalSource(d) { - return [d.source.x1, d.y0]; -} - -function horizontalTarget(d) { - return [d.target.x0, d.y1]; -} - -/* harmony default export */ function sankeyLinkHorizontal() { - return linkHorizontal() - .source(horizontalSource) - .target(horizontalTarget); -} - -// EXTERNAL MODULE: ./node_modules/dayjs/dayjs.min.js -var dayjs_min = __webpack_require__(74353); -// EXTERNAL MODULE: ./node_modules/@braintree/sanitize-url/dist/index.js -var dist = __webpack_require__(16750); -// EXTERNAL MODULE: ./node_modules/dompurify/dist/purify.es.mjs -var purify_es = __webpack_require__(99418); -;// CONCATENATED MODULE: ./node_modules/mermaid/dist/sankeyDiagram-04a897e0.js - - - - - - - - - - - - -var parser = function() { - var o = function(k, v, o2, l) { - for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) - ; - return o2; - }, $V0 = [1, 9], $V1 = [1, 10], $V2 = [1, 5, 10, 12]; - var parser2 = { - trace: function trace() { - }, - yy: {}, - symbols_: { "error": 2, "start": 3, "SANKEY": 4, "NEWLINE": 5, "csv": 6, "opt_eof": 7, "record": 8, "csv_tail": 9, "EOF": 10, "field[source]": 11, "COMMA": 12, "field[target]": 13, "field[value]": 14, "field": 15, "escaped": 16, "non_escaped": 17, "DQUOTE": 18, "ESCAPED_TEXT": 19, "NON_ESCAPED_TEXT": 20, "$accept": 0, "$end": 1 }, - terminals_: { 2: "error", 4: "SANKEY", 5: "NEWLINE", 10: "EOF", 11: "field[source]", 12: "COMMA", 13: "field[target]", 14: "field[value]", 18: "DQUOTE", 19: "ESCAPED_TEXT", 20: "NON_ESCAPED_TEXT" }, - productions_: [0, [3, 4], [6, 2], [9, 2], [9, 0], [7, 1], [7, 0], [8, 5], [15, 1], [15, 1], [16, 3], [17, 1]], - performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { - var $0 = $$.length - 1; - switch (yystate) { - case 7: - const source = yy.findOrCreateNode($$[$0 - 4].trim().replaceAll('""', '"')); - const target = yy.findOrCreateNode($$[$0 - 2].trim().replaceAll('""', '"')); - const value = parseFloat($$[$0].trim()); - yy.addLink(source, target, value); - break; - case 8: - case 9: - case 11: - this.$ = $$[$0]; - break; - case 10: - this.$ = $$[$0 - 1]; - break; - } - }, - table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, { 5: [1, 3] }, { 6: 4, 8: 5, 15: 6, 16: 7, 17: 8, 18: $V0, 20: $V1 }, { 1: [2, 6], 7: 11, 10: [1, 12] }, o($V1, [2, 4], { 9: 13, 5: [1, 14] }), { 12: [1, 15] }, o($V2, [2, 8]), o($V2, [2, 9]), { 19: [1, 16] }, o($V2, [2, 11]), { 1: [2, 1] }, { 1: [2, 5] }, o($V1, [2, 2]), { 6: 17, 8: 5, 15: 6, 16: 7, 17: 8, 18: $V0, 20: $V1 }, { 15: 18, 16: 7, 17: 8, 18: $V0, 20: $V1 }, { 18: [1, 19] }, o($V1, [2, 3]), { 12: [1, 20] }, o($V2, [2, 10]), { 15: 21, 16: 7, 17: 8, 18: $V0, 20: $V1 }, o([1, 5, 10], [2, 7])], - defaultActions: { 11: [2, 1], 12: [2, 5] }, - parseError: function parseError(str, hash) { - if (hash.recoverable) { - this.trace(str); - } else { - var error = new Error(str); - error.hash = hash; - throw error; - } - }, - parse: function parse(input) { - var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; - var args = lstack.slice.call(arguments, 1); - var lexer2 = Object.create(this.lexer); - var sharedState = { yy: {} }; - for (var k in this.yy) { - if (Object.prototype.hasOwnProperty.call(this.yy, k)) { - sharedState.yy[k] = this.yy[k]; - } - } - lexer2.setInput(input, sharedState.yy); - sharedState.yy.lexer = lexer2; - sharedState.yy.parser = this; - if (typeof lexer2.yylloc == "undefined") { - lexer2.yylloc = {}; - } - var yyloc = lexer2.yylloc; - lstack.push(yyloc); - var ranges = lexer2.options && lexer2.options.ranges; - if (typeof sharedState.yy.parseError === "function") { - this.parseError = sharedState.yy.parseError; - } else { - this.parseError = Object.getPrototypeOf(this).parseError; - } - function lex() { - var token; - token = tstack.pop() || lexer2.lex() || EOF; - if (typeof token !== "number") { - if (token instanceof Array) { - tstack = token; - token = tstack.pop(); - } - token = self.symbols_[token] || token; - } - return token; - } - var symbol, state, action, r, yyval = {}, p, len, newState, expected; - while (true) { - state = stack[stack.length - 1]; - if (this.defaultActions[state]) { - action = this.defaultActions[state]; - } else { - if (symbol === null || typeof symbol == "undefined") { - symbol = lex(); - } - action = table[state] && table[state][symbol]; - } - if (typeof action === "undefined" || !action.length || !action[0]) { - var errStr = ""; - expected = []; - for (p in table[state]) { - if (this.terminals_[p] && p > TERROR) { - expected.push("'" + this.terminals_[p] + "'"); - } - } - if (lexer2.showPosition) { - errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; - } else { - errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); - } - this.parseError(errStr, { - text: lexer2.match, - token: this.terminals_[symbol] || symbol, - line: lexer2.yylineno, - loc: yyloc, - expected - }); - } - if (action[0] instanceof Array && action.length > 1) { - throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); - } - switch (action[0]) { - case 1: - stack.push(symbol); - vstack.push(lexer2.yytext); - lstack.push(lexer2.yylloc); - stack.push(action[1]); - symbol = null; - { - yyleng = lexer2.yyleng; - yytext = lexer2.yytext; - yylineno = lexer2.yylineno; - yyloc = lexer2.yylloc; - } - break; - case 2: - len = this.productions_[action[1]][1]; - yyval.$ = vstack[vstack.length - len]; - yyval._$ = { - first_line: lstack[lstack.length - (len || 1)].first_line, - last_line: lstack[lstack.length - 1].last_line, - first_column: lstack[lstack.length - (len || 1)].first_column, - last_column: lstack[lstack.length - 1].last_column - }; - if (ranges) { - yyval._$.range = [ - lstack[lstack.length - (len || 1)].range[0], - lstack[lstack.length - 1].range[1] - ]; - } - r = this.performAction.apply(yyval, [ - yytext, - yyleng, - yylineno, - sharedState.yy, - action[1], - vstack, - lstack - ].concat(args)); - if (typeof r !== "undefined") { - return r; - } - if (len) { - stack = stack.slice(0, -1 * len * 2); - vstack = vstack.slice(0, -1 * len); - lstack = lstack.slice(0, -1 * len); - } - stack.push(this.productions_[action[1]][0]); - vstack.push(yyval.$); - lstack.push(yyval._$); - newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; - stack.push(newState); - break; - case 3: - return true; - } - } - return true; - } - }; - var lexer = function() { - var lexer2 = { - EOF: 1, - parseError: function parseError(str, hash) { - if (this.yy.parser) { - this.yy.parser.parseError(str, hash); - } else { - throw new Error(str); - } - }, - // resets the lexer, sets new input - setInput: function(input, yy) { - this.yy = yy || this.yy || {}; - this._input = input; - this._more = this._backtrack = this.done = false; - this.yylineno = this.yyleng = 0; - this.yytext = this.matched = this.match = ""; - this.conditionStack = ["INITIAL"]; - this.yylloc = { - first_line: 1, - first_column: 0, - last_line: 1, - last_column: 0 - }; - if (this.options.ranges) { - this.yylloc.range = [0, 0]; - } - this.offset = 0; - return this; - }, - // consumes and returns one char from the input - input: function() { - var ch = this._input[0]; - this.yytext += ch; - this.yyleng++; - this.offset++; - this.match += ch; - this.matched += ch; - var lines = ch.match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno++; - this.yylloc.last_line++; - } else { - this.yylloc.last_column++; - } - if (this.options.ranges) { - this.yylloc.range[1]++; - } - this._input = this._input.slice(1); - return ch; - }, - // unshifts one char (or a string) into the input - unput: function(ch) { - var len = ch.length; - var lines = ch.split(/(?:\r\n?|\n)/g); - this._input = ch + this._input; - this.yytext = this.yytext.substr(0, this.yytext.length - len); - this.offset -= len; - var oldLines = this.match.split(/(?:\r\n?|\n)/g); - this.match = this.match.substr(0, this.match.length - 1); - this.matched = this.matched.substr(0, this.matched.length - 1); - if (lines.length - 1) { - this.yylineno -= lines.length - 1; - } - var r = this.yylloc.range; - this.yylloc = { - first_line: this.yylloc.first_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.first_column, - last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len - }; - if (this.options.ranges) { - this.yylloc.range = [r[0], r[0] + this.yyleng - len]; - } - this.yyleng = this.yytext.length; - return this; - }, - // When called from action, caches matched text and appends it on next action - more: function() { - this._more = true; - return this; - }, - // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. - reject: function() { - if (this.options.backtrack_lexer) { - this._backtrack = true; - } else { - return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), { - text: "", - token: null, - line: this.yylineno - }); - } - return this; - }, - // retain first n characters of the match - less: function(n) { - this.unput(this.match.slice(n)); - }, - // displays already matched input, i.e. for error messages - pastInput: function() { - var past = this.matched.substr(0, this.matched.length - this.match.length); - return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); - }, - // displays upcoming input, i.e. for error messages - upcomingInput: function() { - var next = this.match; - if (next.length < 20) { - next += this._input.substr(0, 20 - next.length); - } - return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); - }, - // displays the character position where the lexing error occurred, i.e. for error messages - showPosition: function() { - var pre = this.pastInput(); - var c = new Array(pre.length + 1).join("-"); - return pre + this.upcomingInput() + "\n" + c + "^"; - }, - // test the lexed token: return FALSE when not a match, otherwise return token - test_match: function(match, indexed_rule) { - var token, lines, backup; - if (this.options.backtrack_lexer) { - backup = { - yylineno: this.yylineno, - yylloc: { - first_line: this.yylloc.first_line, - last_line: this.last_line, - first_column: this.yylloc.first_column, - last_column: this.yylloc.last_column - }, - yytext: this.yytext, - match: this.match, - matches: this.matches, - matched: this.matched, - yyleng: this.yyleng, - offset: this.offset, - _more: this._more, - _input: this._input, - yy: this.yy, - conditionStack: this.conditionStack.slice(0), - done: this.done - }; - if (this.options.ranges) { - backup.yylloc.range = this.yylloc.range.slice(0); - } - } - lines = match[0].match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno += lines.length; - } - this.yylloc = { - first_line: this.yylloc.last_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.last_column, - last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length - }; - this.yytext += match[0]; - this.match += match[0]; - this.matches = match; - this.yyleng = this.yytext.length; - if (this.options.ranges) { - this.yylloc.range = [this.offset, this.offset += this.yyleng]; - } - this._more = false; - this._backtrack = false; - this._input = this._input.slice(match[0].length); - this.matched += match[0]; - token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); - if (this.done && this._input) { - this.done = false; - } - if (token) { - return token; - } else if (this._backtrack) { - for (var k in backup) { - this[k] = backup[k]; - } - return false; - } - return false; - }, - // return next match in input - next: function() { - if (this.done) { - return this.EOF; - } - if (!this._input) { - this.done = true; - } - var token, match, tempMatch, index; - if (!this._more) { - this.yytext = ""; - this.match = ""; - } - var rules = this._currentRules(); - for (var i = 0; i < rules.length; i++) { - tempMatch = this._input.match(this.rules[rules[i]]); - if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { - match = tempMatch; - index = i; - if (this.options.backtrack_lexer) { - token = this.test_match(tempMatch, rules[i]); - if (token !== false) { - return token; - } else if (this._backtrack) { - match = false; - continue; - } else { - return false; - } - } else if (!this.options.flex) { - break; - } - } - } - if (match) { - token = this.test_match(match, rules[index]); - if (token !== false) { - return token; - } - return false; - } - if (this._input === "") { - return this.EOF; - } else { - return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { - text: "", - token: null, - line: this.yylineno - }); - } - }, - // return next match that has a token - lex: function lex() { - var r = this.next(); - if (r) { - return r; - } else { - return this.lex(); - } - }, - // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) - begin: function begin(condition) { - this.conditionStack.push(condition); - }, - // pop the previously active lexer condition state off the condition stack - popState: function popState() { - var n = this.conditionStack.length - 1; - if (n > 0) { - return this.conditionStack.pop(); - } else { - return this.conditionStack[0]; - } - }, - // produce the lexer rule set which is active for the currently active lexer condition state - _currentRules: function _currentRules() { - if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { - return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; - } else { - return this.conditions["INITIAL"].rules; - } - }, - // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available - topState: function topState(n) { - n = this.conditionStack.length - 1 - Math.abs(n || 0); - if (n >= 0) { - return this.conditionStack[n]; - } else { - return "INITIAL"; - } - }, - // alias for begin(condition) - pushState: function pushState(condition) { - this.begin(condition); - }, - // return the number of states currently on the stack - stateStackSize: function stateStackSize() { - return this.conditionStack.length; - }, - options: { "case-insensitive": true }, - performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { - switch ($avoiding_name_collisions) { - case 0: - this.pushState("csv"); - return 4; - case 1: - return 10; - case 2: - return 5; - case 3: - return 12; - case 4: - this.pushState("escaped_text"); - return 18; - case 5: - return 20; - case 6: - this.popState("escaped_text"); - return 18; - case 7: - return 19; - } - }, - rules: [/^(?:sankey-beta\b)/i, /^(?:$)/i, /^(?:((\u000D\u000A)|(\u000A)))/i, /^(?:(\u002C))/i, /^(?:(\u0022))/i, /^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i, /^(?:(\u0022)(?!(\u0022)))/i, /^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i], - conditions: { "csv": { "rules": [1, 2, 3, 4, 5, 6, 7], "inclusive": false }, "escaped_text": { "rules": [6, 7], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 3, 4, 5, 6, 7], "inclusive": true } } - }; - return lexer2; - }(); - parser2.lexer = lexer; - function Parser() { - this.yy = {}; - } - Parser.prototype = parser2; - parser2.Parser = Parser; - return new Parser(); -}(); -parser.parser = parser; -const parser$1 = parser; -let links = []; -let nodes = []; -let nodesMap = {}; -const clear = () => { - links = []; - nodes = []; - nodesMap = {}; - (0,mermaid_b5860b54.v)(); -}; -class SankeyLink { - constructor(source, target, value = 0) { - this.source = source; - this.target = target; - this.value = value; - } -} -const addLink = (source, target, value) => { - links.push(new SankeyLink(source, target, value)); -}; -class SankeyNode { - constructor(ID) { - this.ID = ID; - } -} -const findOrCreateNode = (ID) => { - ID = mermaid_b5860b54.e.sanitizeText(ID, (0,mermaid_b5860b54.c)()); - if (!nodesMap[ID]) { - nodesMap[ID] = new SankeyNode(ID); - nodes.push(nodesMap[ID]); - } - return nodesMap[ID]; -}; -const getNodes = () => nodes; -const getLinks = () => links; -const getGraph = () => ({ - nodes: nodes.map((node) => ({ id: node.ID })), - links: links.map((link) => ({ - source: link.source.ID, - target: link.target.ID, - value: link.value - })) -}); -const db = { - nodesMap, - getConfig: () => (0,mermaid_b5860b54.c)().sankey, - getNodes, - getLinks, - getGraph, - addLink, - findOrCreateNode, - getAccTitle: mermaid_b5860b54.g, - setAccTitle: mermaid_b5860b54.s, - getAccDescription: mermaid_b5860b54.a, - setAccDescription: mermaid_b5860b54.b, - getDiagramTitle: mermaid_b5860b54.t, - setDiagramTitle: mermaid_b5860b54.q, - clear -}; -const _Uid = class _Uid2 { - static next(name) { - return new _Uid2(name + ++_Uid2.count); - } - constructor(id) { - this.id = id; - this.href = `#${id}`; - } - toString() { - return "url(" + this.href + ")"; - } -}; -_Uid.count = 0; -let Uid = _Uid; -const alignmentsMap = { - left: left, - right: right, - center: center, - justify: justify -}; -const draw = function(text, id, _version, diagObj) { - const { securityLevel, sankey: conf } = (0,mermaid_b5860b54.c)(); - const defaultSankeyConfig = mermaid_b5860b54.K.sankey; - let sandboxElement; - if (securityLevel === "sandbox") { - sandboxElement = (0,src/* select */.Ltv)("#i" + id); - } - const root = securityLevel === "sandbox" ? (0,src/* select */.Ltv)(sandboxElement.nodes()[0].contentDocument.body) : (0,src/* select */.Ltv)("body"); - const svg = securityLevel === "sandbox" ? root.select(`[id="${id}"]`) : (0,src/* select */.Ltv)(`[id="${id}"]`); - const width = (conf == null ? void 0 : conf.width) ?? defaultSankeyConfig.width; - const height = (conf == null ? void 0 : conf.height) ?? defaultSankeyConfig.width; - const useMaxWidth = (conf == null ? void 0 : conf.useMaxWidth) ?? defaultSankeyConfig.useMaxWidth; - const nodeAlignment = (conf == null ? void 0 : conf.nodeAlignment) ?? defaultSankeyConfig.nodeAlignment; - const prefix = (conf == null ? void 0 : conf.prefix) ?? defaultSankeyConfig.prefix; - const suffix = (conf == null ? void 0 : conf.suffix) ?? defaultSankeyConfig.suffix; - const showValues = (conf == null ? void 0 : conf.showValues) ?? defaultSankeyConfig.showValues; - const graph = diagObj.db.getGraph(); - const nodeAlign = alignmentsMap[nodeAlignment]; - const nodeWidth = 10; - const sankey$1 = Sankey().nodeId((d) => d.id).nodeWidth(nodeWidth).nodePadding(10 + (showValues ? 15 : 0)).nodeAlign(nodeAlign).extent([ - [0, 0], - [width, height] - ]); - sankey$1(graph); - const colorScheme = (0,src/* scaleOrdinal */.UMr)(src/* schemeTableau10 */.zt); - svg.append("g").attr("class", "nodes").selectAll(".node").data(graph.nodes).join("g").attr("class", "node").attr("id", (d) => (d.uid = Uid.next("node-")).id).attr("transform", function(d) { - return "translate(" + d.x0 + "," + d.y0 + ")"; - }).attr("x", (d) => d.x0).attr("y", (d) => d.y0).append("rect").attr("height", (d) => { - return d.y1 - d.y0; - }).attr("width", (d) => d.x1 - d.x0).attr("fill", (d) => colorScheme(d.id)); - const getText = ({ id: id2, value }) => { - if (!showValues) { - return id2; - } - return `${id2} -${prefix}${Math.round(value * 100) / 100}${suffix}`; - }; - svg.append("g").attr("class", "node-labels").attr("font-family", "sans-serif").attr("font-size", 14).selectAll("text").data(graph.nodes).join("text").attr("x", (d) => d.x0 < width / 2 ? d.x1 + 6 : d.x0 - 6).attr("y", (d) => (d.y1 + d.y0) / 2).attr("dy", `${showValues ? "0" : "0.35"}em`).attr("text-anchor", (d) => d.x0 < width / 2 ? "start" : "end").text(getText); - const link = svg.append("g").attr("class", "links").attr("fill", "none").attr("stroke-opacity", 0.5).selectAll(".link").data(graph.links).join("g").attr("class", "link").style("mix-blend-mode", "multiply"); - const linkColor = (conf == null ? void 0 : conf.linkColor) || "gradient"; - if (linkColor === "gradient") { - const gradient = link.append("linearGradient").attr("id", (d) => (d.uid = Uid.next("linearGradient-")).id).attr("gradientUnits", "userSpaceOnUse").attr("x1", (d) => d.source.x1).attr("x2", (d) => d.target.x0); - gradient.append("stop").attr("offset", "0%").attr("stop-color", (d) => colorScheme(d.source.id)); - gradient.append("stop").attr("offset", "100%").attr("stop-color", (d) => colorScheme(d.target.id)); - } - let coloring; - switch (linkColor) { - case "gradient": - coloring = (d) => d.uid; - break; - case "source": - coloring = (d) => colorScheme(d.source.id); - break; - case "target": - coloring = (d) => colorScheme(d.target.id); - break; - default: - coloring = linkColor; - } - link.append("path").attr("d", sankeyLinkHorizontal()).attr("stroke", coloring).attr("stroke-width", (d) => Math.max(1, d.width)); - (0,mermaid_b5860b54.o)(void 0, svg, 0, useMaxWidth); -}; -const renderer = { - draw -}; -const prepareTextForParsing = (text) => { - const textToParse = text.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g, "").replaceAll(/([\n\r])+/g, "\n").trim(); - return textToParse; -}; -const originalParse = parser$1.parse.bind(parser$1); -parser$1.parse = (text) => originalParse(prepareTextForParsing(text)); -const diagram = { - parser: parser$1, - db, - renderer -}; - - - -/***/ }) - -}; -; \ No newline at end of file diff --git a/assets/js/5355b952.ccd75cbc.js b/assets/js/5355b952.ccd75cbc.js deleted file mode 100644 index ff546d3b6e43..000000000000 --- a/assets/js/5355b952.ccd75cbc.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk=self.webpackChunk||[]).push([[1003],{48427:(p,r,l)=>{"use strict";l.r(r),l.d(r,{assets:()=>j,contentTitle:()=>g,default:()=>O,frontMatter:()=>k,metadata:()=>f,toc:()=>w});var o=l(74848),a=l(28453),e=l(90675),t=l(10467),s=l(96540),i=l(19588),u=l(2026);function _(p,r,l){return v.apply(this,arguments)}function v(){return(v=(0,t.A)((0,e.A)().mark((function p(r,l,a){var t,s,_,v;return(0,e.A)().wrap((function(p){for(;;)switch(p.prev=p.next){case 0:return t=new i.E(l),p.next=3,u.G.create({provider:t});case 3:if(s=p.sent,"polkadot"===r||"kusama"===r){p.next=7;break}return a((0,o.jsx)("div",{})),p.abrupt("return");case 7:return _=[],v={color:"#e6007a",cursor:"pointer",textDecoration:"underline"},s.consts.referenda.tracks.forEach((function(p){var l=p.toHuman(),a=l[1].name.replace(/_/g," ");a=a.split(" ").map((function(p){return p.charAt(0).toUpperCase()+p.substring(1)})).join(" ");var e=b(l[1].minApproval),t=b(l[1].minSupport);_.push((0,o.jsxs)("tr",{children:[(0,o.jsx)("td",{children:(0,o.jsx)("b",{children:l[0]})}),(0,o.jsx)("td",{children:(0,o.jsx)("a",{href:"#"+a.toLowerCase().replace(" ","-"),children:(0,o.jsx)("b",{children:a})})}),(0,o.jsx)("td",{children:l[1].maxDeciding}),(0,o.jsx)("td",{children:h(l[1].decisionDeposit,r)}),(0,o.jsx)("td",{style:v,title:l[1].preparePeriod+" Blocks",children:m(l[1].preparePeriod)}),(0,o.jsx)("td",{style:v,title:l[1].decisionPeriod+" Blocks",children:m(l[1].decisionPeriod)}),(0,o.jsx)("td",{style:v,title:l[1].confirmPeriod+" Blocks",children:m(l[1].confirmPeriod)}),(0,o.jsx)("td",{style:v,title:l[1].minEnactmentPeriod+" Blocks",children:m(l[1].minEnactmentPeriod)}),(0,o.jsx)("td",{style:v,children:e}),(0,o.jsx)("td",{style:v,children:t})]},l[0]))})),a((0,o.jsxs)("div",{style:{textAlign:"center"},children:[(0,o.jsxs)("b",{children:[r.charAt(0).toUpperCase()+r.slice(1)," Tracks (",_.length,"):"]}),(0,o.jsx)("br",{}),(0,o.jsx)("div",{style:{border:"1px solid #dadde1"},children:(0,o.jsxs)("table",{style:{margin:0,maxHeight:"600px",borderCollapse:"separate",borderSpacing:0,whiteSpace:"nowrap"},children:[(0,o.jsx)("thead",{style:{width:"100%",textAlign:"center",position:"sticky",top:0,background:"#c1c1c1"},children:(0,o.jsxs)("tr",{children:[(0,o.jsx)("th",{children:"ID"}),(0,o.jsx)("th",{children:"Origin"}),(0,o.jsx)("th",{children:"Max Deciding"}),(0,o.jsx)("th",{children:"Decision Deposit"}),(0,o.jsx)("th",{children:"Prepare Period"}),(0,o.jsx)("th",{children:"Decision Period"}),(0,o.jsx)("th",{children:"Confirm Period"}),(0,o.jsx)("th",{children:"Min Enactment Period"}),(0,o.jsx)("th",{children:"Min Approval"}),(0,o.jsx)("th",{children:"Min Support"})]})}),(0,o.jsx)("tbody",{style:{width:"100%",textAlign:"center"},children:_})]})}),(0,o.jsxs)("b",{style:{fontSize:"12px"},children:["**Hover\xa0",(0,o.jsx)("span",{style:{color:"#e6007a",textDecoration:"underline"},children:"underlined cell values"}),"\xa0for additional info**"]})]})),p.abrupt("return",s);case 13:case"end":return p.stop()}}),p)})))).apply(this,arguments)}function b(p){if(p.hasOwnProperty("Reciprocal")){var r=p.Reciprocal;return(0,o.jsx)("div",{title:"Factor: "+r.factor+", X-Offset: "+r.xOffset+", Y-Offset: "+r.yOffset,children:"Reciprocal"})}if(p.hasOwnProperty("LinearDecreasing")){var l=p.LinearDecreasing;return(0,o.jsx)("div",{title:"Length: "+l.length+", Floor: "+l.floor+", Ceiling: "+l.ceil,children:"Linear Decreasing"})}return""}function m(p){var r=p.replace(/\,/g,"");return r=parseInt(r),(r*=6)>=86400?(r/=86400)>1?r+" Days":r+" Day":r%3600==0?(r/=3600)+" Hours":(r/=60)+" Minutes"}function h(p,r){var l={polkadot:{precision:1e10,symbol:"DOT"},kusama:{precision:1e12,symbol:"KSM"}},o=void 0;if("polkadot"===r)o=3;else{if("kusama"!==r)return;o=6}return p=p.replace(/\,/g,""),p=parseFloat(p),(p=Number.isInteger(p/l[r].precision)?p/l[r].precision+" "+l[r].symbol:(p/l[r].precision).toFixed(o)+" "+l[r].symbol).toString()}const d=function(p){var r=p.network,l=p.defaultValue,a=(0,s.useState)(""),i=a[0],u=a[1];return(0,s.useEffect)((function(){var p=void 0,a=null;if("polkadot"===r)p="wss://rpc.polkadot.io";else{if("kusama"!==r)return;p="wss://kusama-rpc.polkadot.io/"}u((0,o.jsx)("div",{style:{color:"#e6007a",textAlign:"center"},children:(0,o.jsx)("b",{children:l})}));var s=function(){var l=(0,t.A)((0,e.A)().mark((function l(){return(0,e.A)().wrap((function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,_(r,p,u);case 2:a=l.sent;case 3:case"end":return l.stop()}}),l)})));return function(){return l.apply(this,arguments)}}();return s(),function(){a&&a.disconnect&&a.disconnect()}}),[r,l]),i};var n=l(44731),y=l(22022),A=l(7935),S=l.n(A);function c(p,r,l,a,e){y.t1.register(y.PP,y.kc,y.FN,y.No,y.hE,y.m_,y.s$);var t=function(p,r,l,o){console.log(""+r+p);var a=S()[""+r+p],e=a.map((function(p){return{x:p.time_hours,y:p.approval}})),t=a.map((function(p){return{x:p.time_hours,y:p.support}})),s={data:{labels:["Approval","Support"],datasets:[{label:"Approval",data:e,backgroundColor:"#00B2FF"},{label:"Support",data:t,backgroundColor:"#56F39A"}]},options:{animation:!1,normalized:!0,parsing:!1,scales:{y:{type:"linear",min:0,max:l,ticks:{callback:function(p){return p+"%"}}},x:{type:"linear",min:0,max:o,title:{display:!0,text:"Hours"},ticks:{callback:function(p){return""+p}}}},plugins:{tooltip:{callbacks:{title:function(p){return"Hour: "+p[0].label},label:function(p){return p.dataset.label+": "+p.parsed.y+"%"}}}}}};return s}(r,l,a,e);switch(y.t1.defaults.font.size=18,p){case"line":return(0,o.jsx)(n.N1,{datasetIdKey:t.datasetIdKey,data:t.data,options:t.options});case"scatter":return(0,o.jsx)(n.Xl,{datasetIdKey:t.datasetIdKey,data:t.data,options:t.options})}}const T=function(p){var r=p.title,l=c(p.type,p.dataId,p.network,p.maxY,p.maxX);return(0,o.jsxs)("div",{className:"App",children:[(0,o.jsx)("header",{className:"App-header",children:(0,o.jsx)("h3",{children:r})}),l]})};var H=l(11470),x=l(19365);const k={id:"learn-polkadot-opengov-origins",title:"Polkadot OpenGov Origins",sidebar_label:"OpenGov Origins",description:"All Origins for Polkadot's OpenGov.",keywords:["proposal","referenda","OpenGov","origins"],slug:"../learn-polkadot-opengov-origins"},g=void 0,f={id:"learn/learn-polkadot-opengov-origins",title:"Polkadot OpenGov Origins",description:"All Origins for Polkadot's OpenGov.",source:"@site/../docs/learn/learn-polkadot-opengov-origins.md",sourceDirName:"learn",slug:"/learn-polkadot-opengov-origins",permalink:"/docs/learn-polkadot-opengov-origins",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-polkadot-opengov-origins.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1727943421e3,frontMatter:{id:"learn-polkadot-opengov-origins",title:"Polkadot OpenGov Origins",sidebar_label:"OpenGov Origins",description:"All Origins for Polkadot's OpenGov.",keywords:["proposal","referenda","OpenGov","origins"],slug:"../learn-polkadot-opengov-origins"},sidebar:"docs",previous:{title:"Polkadot OpenGov",permalink:"/docs/learn-polkadot-opengov"},next:{title:"Technical Fellowship",permalink:"/docs/learn-polkadot-technical-fellowship"}},j={},w=[{value:"Polkadot OpenGov Terminology and Parameters",id:"polkadot-opengov-terminology-and-parameters",level:2},{value:"Origins and Tracks Info",id:"origins-and-tracks-info",level:2},{value:"Root",id:"root",level:3},{value:"Whitelisted Caller",id:"whitelisted-caller",level:3},{value:"Wish For Change",id:"wish-for-change",level:3},{value:"Staking Admin",id:"staking-admin",level:3},{value:"Treasurer",id:"treasurer",level:3},{value:"Lease Admin",id:"lease-admin",level:3},{value:"Fellowship Admin",id:"fellowship-admin",level:3},{value:"General Admin",id:"general-admin",level:3},{value:"Referendum Canceller",id:"referendum-canceller",level:3},{value:"Referendum Killer",id:"referendum-killer",level:3},{value:"Small Tipper",id:"small-tipper",level:3},{value:"Big Tipper",id:"big-tipper",level:3},{value:"Small Spender",id:"small-spender",level:3},{value:"Medium Spender",id:"medium-spender",level:3},{value:"Big Spender",id:"big-spender",level:3}];function P(p){const r={a:"a",admonition:"admonition",h2:"h2",h3:"h3",img:"img",p:"p",strong:"strong",...(0,a.R)(),...p.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(r.admonition,{title:"Learn more about Polkadot OpenGov",type:"info",children:(0,o.jsxs)(r.p,{children:["For background information about Polkadot OpenGov, please refer to this\n",(0,o.jsx)(r.a,{href:"/docs/learn-polkadot-opengov",children:"dedicated Wiki document"}),"."]})}),"\n",(0,o.jsx)(r.h2,{id:"polkadot-opengov-terminology-and-parameters",children:"Polkadot OpenGov Terminology and Parameters"}),"\n",(0,o.jsx)(r.p,{children:"The important parameters to be aware of when voting using the Referenda module are as follows:"}),"\n",(0,o.jsxs)(r.p,{children:[(0,o.jsx)(r.strong,{children:"Origin"})," - Each origin has a fixed set of privileges. When making a proposal, it is important to\nchoose the origin that has the privilege to execute the referenda."]}),"\n",(0,o.jsxs)(r.p,{children:[(0,o.jsx)(r.strong,{children:"Track"})," - Each track has its own dispatch origin and a preset configuration that governs the\nvoting process and parameters."]}),"\n",(0,o.jsxs)(r.p,{children:[(0,o.jsx)(r.strong,{children:"Submission Deposit"})," - The minimum amount to be used as a (refundable) deposit to submit a public\nreferendum proposal."]}),"\n",(0,o.jsxs)(r.p,{children:[(0,o.jsx)(r.strong,{children:"Prepare Period"})," - The minimum time the referendum needs to wait before it can progress to the\nnext phase after submission. Voting is enabled, but the votes do not count toward the outcome of the\nreferendum yet."]}),"\n",(0,o.jsxs)(r.p,{children:[(0,o.jsx)(r.strong,{children:"Decision Deposit"})," - This deposit is required for a referendum to progress to the decision phase\nafter the end of prepare period."]}),"\n",(0,o.jsxs)(r.p,{children:[(0,o.jsx)(r.strong,{children:"Decision Period"})," - Amount of time a decision may take to be approved to move to the confirming\nperiod. If the proposal is not approved by the end of the decision period, it gets rejected."]}),"\n",(0,o.jsxs)(r.p,{children:[(0,o.jsx)(r.strong,{children:"Max Deciding"})," - The maximum number of referenda that can be in the decision period of a track all\nat once."]}),"\n",(0,o.jsxs)(r.p,{children:[(0,o.jsx)(r.strong,{children:"Conviction"}),": A multiplier to increase voting power."]}),"\n",(0,o.jsxs)(r.p,{children:[(0,o.jsx)(r.strong,{children:"Approval"}),": the share of the approval vote-weight after adjustments for conviction against the\ntotal number of vote-weight for both approval and rejection"]}),"\n",(0,o.jsxs)(r.p,{children:[(0,o.jsx)(r.strong,{children:"Support"}),": The total number of votes in approval (ignoring adjustments for conviction) compared to\nthe total possible amount of votes that could be made in the system. Support also takes into account\nabstained votes."]}),"\n",(0,o.jsxs)(r.p,{children:[(0,o.jsx)(r.strong,{children:"Min Approval"})," - The threshold of approval (along with the min support) needed for a proposal to\nmeet the requirements of the confirm period."]}),"\n",(0,o.jsxs)(r.p,{children:[(0,o.jsx)(r.strong,{children:"Min Support"})," - The threshold of support (along with the min approval) needed for a proposal to\nmeet the requirements of the confirm period."]}),"\n",(0,o.jsxs)(r.p,{children:[(0,o.jsx)(r.strong,{children:"Confirmation Period"})," - The total time the referenda must meet both the min approval and support\ncriteria during the decision period in order to pass and enter the enactment period."]}),"\n",(0,o.jsxs)(r.p,{children:[(0,o.jsx)(r.strong,{children:"Min Enactment Period"})," - Minimum time that an approved proposal must be in the dispatch queue\nafter approval. The proposer has the option to set the enactment period to be of any value greater\nthan the min enactment period."]}),"\n",(0,o.jsx)(r.h2,{id:"origins-and-tracks-info",children:"Origins and Tracks Info"}),"\n",(0,o.jsxs)(H.A,{groupId:"tracks",values:[{label:"Polkadot",value:"polkadot"},{label:"Kusama",value:"kusama"}],children:[(0,o.jsx)(x.A,{value:"polkadot",children:(0,o.jsx)(d,{network:"polkadot",defaultValue:"Loading Polkadot Tracks..."})}),(0,o.jsx)(x.A,{value:"kusama",children:(0,o.jsx)(d,{network:"kusama",defaultValue:"Loading Kusama Tracks..."})})]}),"\n",(0,o.jsxs)(r.admonition,{type:"info",children:[(0,o.jsx)(r.p,{children:"For every referendum in each of these tracks, the Polkadot-JS UI displays interactive graphs of the\nsupport and approval."}),(0,o.jsx)(r.p,{children:(0,o.jsx)(r.img,{alt:"UI Support and Approval",src:l(24816).A+"",width:"2719",height:"1116"})})]}),"\n",(0,o.jsx)(r.h3,{id:"root",children:"Root"}),"\n",(0,o.jsxs)(H.A,{groupId:"chart",values:[{label:"Polkadot",value:"polkadot"},{label:"Kusama",value:"kusama"}],children:[(0,o.jsxs)(x.A,{value:"polkadot",children:[(0,o.jsx)(r.p,{children:"The origin with the highest level of privileges. This track requires extremely high levels of\napproval and support for early passing. The prepare and enactment periods are also large. For\ninstance, a referendum proposed in this track needs to amass 48.2% support (total network issuance)\nby the end of the first day with over 93.5% approval to be considered to be part of the confirm\nperiod. The support curve drops linearly to 25% by the end of day 14 and almost to 0% by the end of\nday 28. This ensures that the token holders receive ample time to vote on the proposal during the\ndecision period."}),(0,o.jsx)(T,{title:"",type:"line",dataId:"Root",network:"Polkadot",maxX:"672",maxY:"100"})]}),(0,o.jsxs)(x.A,{value:"kusama",children:[(0,o.jsx)(r.p,{children:"The origin with the highest level of privileges. This track requires extremely high levels of\napproval and support for early passing. The prepare and enactment periods are also large. For\ninstance, a referendum proposed in this track needs to amass 46.8% support (total network issuance)\nby the end of the first day with over 88% approval to be considered to be part of the confirm\nperiod. The support curve drops linearly to 25% by the end of day 7 and almost to 0% by the end of\nday 14. This ensures that the token holders receive ample time to vote on the proposal during the\ndecision period."}),(0,o.jsx)(T,{title:"",type:"line",dataId:"Root",network:"Kusama",maxX:"336",maxY:"100"})]})]}),"\n",(0,o.jsx)(r.h3,{id:"whitelisted-caller",children:"Whitelisted Caller"}),"\n",(0,o.jsxs)(H.A,{groupId:"chart",values:[{label:"Polkadot",value:"polkadot"},{label:"Kusama",value:"kusama"}],children:[(0,o.jsxs)(x.A,{value:"polkadot",children:[(0,o.jsxs)(r.p,{children:["Origin commanded by the ",(0,o.jsx)(r.a,{href:"/docs/learn-polkadot-technical-fellowship",children:"Fellowship"})," whitelist some\nhash of a call and allow the call to be dispatched with the root origin (after the referendum\npasses). This track allows for a shorter voting turnaround, safe in the knowledge through an open\nand transparent process for time-critical proposals. For instance, a referendum proposed in this\ntrack needs to amass 20% ",":polkadot"," support (much lesser than the root) by the end of the first day\nwith over 93.5% approval to be considered to be part of the confirm period. ",(0,o.jsx)(r.strong,{children:"Note how no referendum\non the Whitelisted track can ever pass with less than 5% support."})]}),(0,o.jsx)(T,{title:"",type:"line",dataId:"Whitelist",network:"Polkadot",maxX:"672",maxY:"100"})]}),(0,o.jsxs)(x.A,{value:"kusama",children:[(0,o.jsxs)(r.p,{children:["Origin commanded by the ",(0,o.jsx)(r.a,{href:"/docs/learn-polkadot-technical-fellowship",children:"Fellowship"})," whitelist some\nhash of a call and allow the call to be dispatched with the root origin (after the referendum\npasses). This track allows for a shorter voting turnaround, safe in the knowledge through an open\nand transparent process for time-critical proposals. For instance, a referendum proposed in this\ntrack needs to amass 14% support (much lesser than the root) by the end of the first day with over\n88% approval to be considered to be part of the confirm period. ",(0,o.jsx)(r.strong,{children:"Note how no referendum on the\nWhitelisted track can ever pass with less than 5% support."})]}),(0,o.jsx)(T,{title:"",type:"line",dataId:"Whitelist",network:"Kusama",maxX:"336",maxY:"100"})]})]}),"\n",(0,o.jsx)(r.h3,{id:"wish-for-change",children:"Wish For Change"}),"\n",(0,o.jsxs)(r.p,{children:["The Wish For Change track serves as a medium for gathering consensus through OpenGov on a proposed\nchange to the network through an ",(0,o.jsx)(r.a,{href:"/docs/glossary#remarks",children:"on-chain remark"}),". This track was\nadded to ensure the Root track, which is typically utilized for handling one referendum at a time\ndue to the sensitive nature of Root calls, is not employed to convey network desires to various\nbodies within the network. These remark statements could be voted on simultaneously because they\nlack stateful logic impacting the network. They should not delay voting on proposals requiring Root\nor be obligated to its queue. The approval/support criteria resemble Root, and passing items on this\ntrack serves as a signal for a change without conferring privileges."]}),"\n",(0,o.jsxs)(H.A,{groupId:"chart",values:[{label:"Polkadot",value:"polkadot"},{label:"Kusama",value:"kusama"}],children:[(0,o.jsx)(x.A,{value:"polkadot",children:(0,o.jsx)(T,{title:"",type:"line",dataId:"Root",network:"Polkadot",maxX:"672",maxY:"100"})}),(0,o.jsx)(x.A,{value:"kusama",children:(0,o.jsx)(T,{title:"",type:"line",dataId:"Root",network:"Kusama",maxX:"336",maxY:"100"})})]}),"\n",(0,o.jsx)(r.h3,{id:"staking-admin",children:"Staking Admin"}),"\n",(0,o.jsxs)(r.p,{children:["The origin for canceling ",(0,o.jsx)(r.a,{href:"/docs/learn-offenses",children:"slashes"}),". This origin has the privilege to execute\ncalls from the staking pallet and the Election Provider Multiphase Pallet."]}),"\n",(0,o.jsxs)(H.A,{groupId:"chart",values:[{label:"Polkadot",value:"polkadot"},{label:"Kusama",value:"kusama"}],children:[(0,o.jsx)(x.A,{value:"polkadot",children:(0,o.jsx)(T,{title:"",type:"line",dataId:"AdminStaking",network:"Polkadot",maxX:"672",maxY:"100"})}),(0,o.jsx)(x.A,{value:"kusama",children:(0,o.jsx)(T,{title:"",type:"line",dataId:"AdminStaking",network:"Kusama",maxX:"336",maxY:"100"})})]}),"\n",(0,o.jsx)(r.h3,{id:"treasurer",children:"Treasurer"}),"\n",(0,o.jsxs)(H.A,{groupId:"chart",values:[{label:"Polkadot",value:"polkadot"},{label:"Kusama",value:"kusama"}],children:[(0,o.jsxs)(x.A,{value:"polkadot",children:[(0,o.jsx)(r.p,{children:"The origin for spending funds from the treasury (up to 10M DOT). This origin has the privilege to\nexecute calls from the Treasury pallet."}),(0,o.jsxs)(r.p,{children:[(0,o.jsx)(T,{title:"",type:"line",dataId:"Treasurer",network:"Polkadot",maxX:"672",maxY:"100"})," ",":polkadot"]})]}),(0,o.jsxs)(x.A,{value:"kusama",children:[(0,o.jsx)(r.p,{children:"The origin for spending funds from the treasury (up to 333333.33 KSM). This origin has the privilege\nto execute calls from the Treasury pallet."}),(0,o.jsx)(T,{title:"",type:"line",dataId:"Treasurer",network:"Kusama",maxX:"336",maxY:"100"})]})]}),"\n",(0,o.jsx)(r.h3,{id:"lease-admin",children:"Lease Admin"}),"\n",(0,o.jsx)(r.p,{children:"Origin can force slot leases. This origin has the privilege to execute calls from the Slots pallet."}),"\n",(0,o.jsxs)(H.A,{groupId:"chart",values:[{label:"Polkadot",value:"polkadot"},{label:"Kusama",value:"kusama"}],children:[(0,o.jsx)(x.A,{value:"polkadot",children:(0,o.jsx)(T,{title:"",type:"line",dataId:"AdminLease",network:"Polkadot",maxX:"672",maxY:"100"})}),(0,o.jsx)(x.A,{value:"kusama",children:(0,o.jsx)(T,{title:"",type:"line",dataId:"AdminLease",network:"Kusama",maxX:"336",maxY:"100"})})]}),"\n",(0,o.jsx)(r.h3,{id:"fellowship-admin",children:"Fellowship Admin"}),"\n",(0,o.jsx)(r.p,{children:"The origin for managing the composition of the fellowship."}),"\n",(0,o.jsxs)(H.A,{groupId:"chart",values:[{label:"Polkadot",value:"polkadot"},{label:"Kusama",value:"kusama"}],children:[(0,o.jsx)(x.A,{value:"polkadot",children:(0,o.jsx)(T,{title:"",type:"line",dataId:"AdminFellowship",network:"Polkadot",maxX:"672",maxY:"100"})}),(0,o.jsx)(x.A,{value:"kusama",children:(0,o.jsx)(T,{title:"",type:"line",dataId:"AdminFellowship",network:"Kusama",maxX:"336",maxY:"100"})})]}),"\n",(0,o.jsx)(r.h3,{id:"general-admin",children:"General Admin"}),"\n",(0,o.jsx)(r.p,{children:"The origin managing the registrar and permissioned HRMP channel operations."}),"\n",(0,o.jsxs)(H.A,{groupId:"chart",values:[{label:"Polkadot",value:"polkadot"},{label:"Kusama",value:"kusama"}],children:[(0,o.jsx)(x.A,{value:"polkadot",children:(0,o.jsx)(T,{title:"",type:"line",dataId:"AdminGeneral",network:"Polkadot",maxX:"672",maxY:"100"})}),(0,o.jsx)(x.A,{value:"kusama",children:(0,o.jsx)(T,{title:"",type:"line",dataId:"AdminGeneral",network:"Kusama",maxX:"336",maxY:"100"})})]}),"\n",(0,o.jsx)(r.h3,{id:"referendum-canceller",children:"Referendum Canceller"}),"\n",(0,o.jsx)(r.p,{children:"The origin can cancel referenda. This track has a low lead time and approval/support curves with\nslightly sharper reductions in their thresholds for passing."}),"\n",(0,o.jsxs)(H.A,{groupId:"chart",values:[{label:"Polkadot",value:"polkadot"},{label:"Kusama",value:"kusama"}],children:[(0,o.jsx)(x.A,{value:"polkadot",children:(0,o.jsx)(T,{title:"",type:"line",dataId:"RefCanceller",network:"Polkadot",maxX:"672",maxY:"100"})}),(0,o.jsx)(x.A,{value:"kusama",children:(0,o.jsx)(T,{title:"",type:"line",dataId:"RefCanceller",network:"Kusama",maxX:"336",maxY:"100"})})]}),"\n",(0,o.jsx)(r.h3,{id:"referendum-killer",children:"Referendum Killer"}),"\n",(0,o.jsx)(r.p,{children:"The origin can cancel an ongoing referendum and slash the deposits. This track also has a low\nlead-time and approval/support curves with slightly sharper reductions in their thresholds for\npassing."}),"\n",(0,o.jsxs)(H.A,{groupId:"chart",values:[{label:"Polkadot",value:"polkadot"},{label:"Kusama",value:"kusama"}],children:[(0,o.jsx)(x.A,{value:"polkadot",children:(0,o.jsx)(T,{title:"",type:"line",dataId:"RefKiller",network:"Polkadot",maxX:"672",maxY:"100"})}),(0,o.jsx)(x.A,{value:"kusama",children:(0,o.jsx)(T,{title:"",type:"line",dataId:"RefKiller",network:"Kusama",maxX:"336",maxY:"100"})})]}),"\n",(0,o.jsx)(r.h3,{id:"small-tipper",children:"Small Tipper"}),"\n",(0,o.jsxs)(H.A,{groupId:"chart",values:[{label:"Polkadot",value:"polkadot"},{label:"Kusama",value:"kusama"}],children:[(0,o.jsxs)(x.A,{value:"polkadot",children:[(0,o.jsx)(r.p,{children:"Origin able to spend up to 250 DOT from the treasury at once."}),(0,o.jsx)(T,{title:"",type:"line",dataId:"SmallTipper",network:"Polkadot",maxX:"672",maxY:"100"})]}),(0,o.jsxs)(x.A,{value:"kusama",children:[(0,o.jsx)(r.p,{children:"Origin able to spend up to 8.25 KSM from the treasury at once."}),(0,o.jsx)(T,{title:"",type:"line",dataId:"SmallTipper",network:"Kusama",maxX:"336",maxY:"100"})]})]}),"\n",(0,o.jsx)(r.h3,{id:"big-tipper",children:"Big Tipper"}),"\n",(0,o.jsxs)(H.A,{groupId:"chart",values:[{label:"Polkadot",value:"polkadot"},{label:"Kusama",value:"kusama"}],children:[(0,o.jsxs)(x.A,{value:"polkadot",children:[(0,o.jsx)(r.p,{children:"Origin able to spend up to 1000 DOT from the treasury at once."}),(0,o.jsx)(T,{title:"",type:"line",dataId:"BigTipper",network:"Polkadot",maxX:"672",maxY:"100"})]}),(0,o.jsxs)(x.A,{value:"kusama",children:[(0,o.jsx)(r.p,{children:"Origin able to spend up to 33.33 KSM from the treasury at once."}),(0,o.jsx)(T,{title:"",type:"line",dataId:"BigTipper",network:"Kusama",maxX:"336",maxY:"100"})]})]}),"\n",(0,o.jsx)(r.h3,{id:"small-spender",children:"Small Spender"}),"\n",(0,o.jsxs)(H.A,{groupId:"chart",values:[{label:"Polkadot",value:"polkadot"},{label:"Kusama",value:"kusama"}],children:[(0,o.jsxs)(x.A,{value:"polkadot",children:[(0,o.jsx)(r.p,{children:"Origin able to spend up to 10000 DOT from the treasury at once."}),(0,o.jsx)(T,{title:"",type:"line",dataId:"SmallSpender",network:"Polkadot",maxX:"672",maxY:"100"})]}),(0,o.jsxs)(x.A,{value:"kusama",children:[(0,o.jsx)(r.p,{children:"Origin able to spend up to 333.33 KSM from the treasury at once."}),(0,o.jsx)(T,{title:"",type:"line",dataId:"SmallSpender",network:"Kusama",maxX:"336",maxY:"100"})]})]}),"\n",(0,o.jsx)(r.h3,{id:"medium-spender",children:"Medium Spender"}),"\n",(0,o.jsxs)(H.A,{groupId:"chart",values:[{label:"Polkadot",value:"polkadot"},{label:"Kusama",value:"kusama"}],children:[(0,o.jsxs)(x.A,{value:"polkadot",children:[(0,o.jsx)(r.p,{children:"Origin able to spend up to 100000 DOT from the treasury at once."}),(0,o.jsx)(T,{title:"",type:"line",dataId:"MediumSpender",network:"Polkadot",maxX:"672",maxY:"100"})]}),(0,o.jsxs)(x.A,{value:"kusama",children:[(0,o.jsx)(r.p,{children:"Origin able to spend up to 3333.33 KSM from the treasury at once."}),(0,o.jsx)(T,{title:"",type:"line",dataId:"MediumSpender",network:"Kusama",maxX:"336",maxY:"100"})]})]}),"\n",(0,o.jsx)(r.h3,{id:"big-spender",children:"Big Spender"}),"\n",(0,o.jsxs)(H.A,{groupId:"chart",values:[{label:"Polkadot",value:"polkadot"},{label:"Kusama",value:"kusama"}],children:[(0,o.jsxs)(x.A,{value:"polkadot",children:[(0,o.jsx)(r.p,{children:"Origin able to spend up to 1000000 DOT from the treasury at once."}),(0,o.jsx)(T,{title:"",type:"line",dataId:"BigSpender",network:"Polkadot",maxX:"672",maxY:"100"})]}),(0,o.jsxs)(x.A,{value:"kusama",children:[(0,o.jsx)(r.p,{children:"Origin able to spend up to 33333.33 KSM from the treasury at once."}),(0,o.jsx)(T,{title:"",type:"line",dataId:"BigSpender",network:"Kusama",maxX:"336",maxY:"100"})]})]})]})}function O(p={}){const{wrapper:r}={...(0,a.R)(),...p.components};return r?(0,o.jsx)(r,{...p,children:(0,o.jsx)(P,{...p})}):P(p)}},7935:(p,r,l)=>{var o=l(92085),a=l(77256),e=l(39379),t=l(75029),s=l(77062),i=l(37329),u=l(54638),_=l(19752),v=l(76682),b=l(84301),m=l(24616),h=l(78760),d=l(16234),n=l(23738),y=l(27289),A=l(83620),S=l(6303),c=l(51953),T=l(16066),H=l(40149),x=l(17802),k=l(54924),g=l(50902),f=l(56041),j=l(95036),w=l(54836),P=l(90398),O=l(39046);p.exports={KusamaRoot:y,KusamaWhitelist:O,KusamaTreasurer:P,KusamaBigTipper:g,KusamaSmallTipper:f,KusamaRefKiller:w,KusamaRefCanceller:j,KusamaBigSpender:H,KusamaMediumSpender:x,KusamaSmallSpender:k,KusamaAdminFellowship:A,KusamaAdminGeneral:S,KusamaAdminLease:c,KusamaAdminStaking:T,PolkadotRoot:o,PolkadotWhitelist:n,PolkadotTreasurer:d,PolkadotBigTipper:v,PolkadotSmallTipper:b,PolkadotRefKiller:h,PolkadotRefCanceller:m,PolkadotBigSpender:i,PolkadotMediumSpender:u,PolkadotSmallSpender:_,PolkadotAdminFellowship:a,PolkadotAdminGeneral:e,PolkadotAdminLease:t,PolkadotAdminStaking:s}},24816:(p,r,l)=>{"use strict";l.d(r,{A:()=>o});const o=l.p+"assets/images/support-approval-polkadot-js-ui-166ce95f9cf31c1e65b1b57d38dbec73.png"},47790:()=>{},83620:p=>{"use strict";p.exports=JSON.parse('[{"time_hours":0,"approval_perbill":1000000000,"support_perbill":500000026,"approval":100,"support":50.0000026},{"time_hours":1,"approval_perbill":997549020,"support_perbill":418401359,"approval":99.754902,"support":41.8401359},{"time_hours":2,"approval_perbill":995098040,"support_perbill":359397443,"approval":99.509804,"support":35.9397443},{"time_hours":3,"approval_perbill":992647060,"support_perbill":314744813,"approval":99.264706,"support":31.4744813},{"time_hours":4,"approval_perbill":990196080,"support_perbill":279775293,"approval":99.019608,"support":27.9775293},{"time_hours":5,"approval_perbill":987745099,"support_perbill":251647242,"approval":98.7745099,"support":25.1647242},{"time_hours":6,"approval_perbill":985294119,"support_perbill":228531862,"approval":98.5294119,"support":22.8531862},{"time_hours":7,"approval_perbill":982843138,"support_perbill":209198815,"approval":98.2843138,"support":20.9198815},{"time_hours":8,"approval_perbill":980392158,"support_perbill":192789972,"approval":98.0392158,"support":19.2789972},{"time_hours":9,"approval_perbill":977941177,"support_perbill":178688524,"approval":97.7941177,"support":17.8688524},{"time_hours":10,"approval_perbill":975490197,"support_perbill":166439756,"approval":97.5490197,"support":16.6439756},{"time_hours":11,"approval_perbill":973039216,"support_perbill":155701053,"approval":97.3039216,"support":15.5701053},{"time_hours":12,"approval_perbill":970588236,"support_perbill":146209386,"approval":97.0588236,"support":14.6209386},{"time_hours":13,"approval_perbill":968137256,"support_perbill":137759452,"approval":96.8137256,"support":13.7759452},{"time_hours":14,"approval_perbill":965686276,"support_perbill":130188679,"approval":96.5686276,"support":13.0188679},{"time_hours":15,"approval_perbill":963235295,"support_perbill":123366639,"approval":96.3235295,"support":12.3366639},{"time_hours":16,"approval_perbill":960784315,"support_perbill":117187499,"approval":96.0784315,"support":11.7187499},{"time_hours":17,"approval_perbill":958333334,"support_perbill":111564465,"approval":95.8333334,"support":11.1564465},{"time_hours":18,"approval_perbill":955882354,"support_perbill":106425701,"approval":95.5882354,"support":10.6425701},{"time_hours":19,"approval_perbill":953431373,"support_perbill":101711228,"approval":95.3431373,"support":10.1711228},{"time_hours":20,"approval_perbill":950980393,"support_perbill":97370582,"approval":95.0980393,"support":9.7370582},{"time_hours":21,"approval_perbill":948529412,"support_perbill":93360994,"approval":94.8529412,"support":9.3360994},{"time_hours":22,"approval_perbill":946078432,"support_perbill":89645982,"approval":94.6078432,"support":8.9645982},{"time_hours":23,"approval_perbill":943627452,"support_perbill":86194234,"approval":94.3627452,"support":8.6194234},{"time_hours":24,"approval_perbill":941176471,"support_perbill":82978722,"approval":94.1176471,"support":8.2978722},{"time_hours":25,"approval_perbill":938725491,"support_perbill":79975997,"approval":93.8725491,"support":7.9975997},{"time_hours":26,"approval_perbill":936274511,"support_perbill":77165614,"approval":93.6274511,"support":7.7165614},{"time_hours":27,"approval_perbill":933823531,"support_perbill":74529666,"approval":93.3823531,"support":7.4529666},{"time_hours":28,"approval_perbill":931372550,"support_perbill":72052400,"approval":93.137255,"support":7.20524},{"time_hours":29,"approval_perbill":928921570,"support_perbill":69719908,"approval":92.892157,"support":6.9719908},{"time_hours":30,"approval_perbill":926470589,"support_perbill":67519857,"approval":92.6470589,"support":6.7519857},{"time_hours":31,"approval_perbill":924019609,"support_perbill":65441280,"approval":92.4019609,"support":6.544128},{"time_hours":32,"approval_perbill":921568628,"support_perbill":63474386,"approval":92.1568628,"support":6.3474386},{"time_hours":33,"approval_perbill":919117648,"support_perbill":61610409,"approval":91.9117648,"support":6.1610409},{"time_hours":34,"approval_perbill":916666667,"support_perbill":59841478,"approval":91.6666667,"support":5.9841478},{"time_hours":35,"approval_perbill":914215687,"support_perbill":58160504,"approval":91.4215687,"support":5.8160504},{"time_hours":36,"approval_perbill":911764706,"support_perbill":56561084,"approval":91.1764706,"support":5.6561084},{"time_hours":37,"approval_perbill":909313726,"support_perbill":55037426,"approval":90.9313726,"support":5.5037426},{"time_hours":38,"approval_perbill":906862746,"support_perbill":53584271,"approval":90.6862746,"support":5.3584271},{"time_hours":39,"approval_perbill":904411766,"support_perbill":52196835,"approval":90.4411766,"support":5.2196835},{"time_hours":40,"approval_perbill":901960785,"support_perbill":50870759,"approval":90.1960785,"support":5.0870759},{"time_hours":41,"approval_perbill":899509805,"support_perbill":49602061,"approval":89.9509805,"support":4.9602061},{"time_hours":42,"approval_perbill":897058824,"support_perbill":48387095,"approval":89.7058824,"support":4.8387095},{"time_hours":43,"approval_perbill":894607844,"support_perbill":47222519,"approval":89.4607844,"support":4.7222519},{"time_hours":44,"approval_perbill":892156864,"support_perbill":46105262,"approval":89.2156864,"support":4.6105262},{"time_hours":45,"approval_perbill":889705883,"support_perbill":45032496,"approval":88.9705883,"support":4.5032496},{"time_hours":46,"approval_perbill":887254903,"support_perbill":44001617,"approval":88.7254903,"support":4.4001617},{"time_hours":47,"approval_perbill":884803922,"support_perbill":43010218,"approval":88.4803922,"support":4.3010218},{"time_hours":48,"approval_perbill":882352942,"support_perbill":42056074,"approval":88.2352942,"support":4.2056074},{"time_hours":49,"approval_perbill":879901962,"support_perbill":41137122,"approval":87.9901962,"support":4.1137122},{"time_hours":50,"approval_perbill":877450982,"support_perbill":40251453,"approval":87.7450982,"support":4.0251453},{"time_hours":51,"approval_perbill":875000001,"support_perbill":39397289,"approval":87.5000001,"support":3.9397289},{"time_hours":52,"approval_perbill":872549021,"support_perbill":38572980,"approval":87.2549021,"support":3.857298},{"time_hours":53,"approval_perbill":870098040,"support_perbill":37776985,"approval":87.009804,"support":3.7776985},{"time_hours":54,"approval_perbill":867647060,"support_perbill":37007873,"approval":86.764706,"support":3.7007873},{"time_hours":55,"approval_perbill":865196079,"support_perbill":36264302,"approval":86.5196079,"support":3.6264302},{"time_hours":56,"approval_perbill":862745099,"support_perbill":35545023,"approval":86.2745099,"support":3.5545023},{"time_hours":57,"approval_perbill":860294118,"support_perbill":34848862,"approval":86.0294118,"support":3.4848862},{"time_hours":58,"approval_perbill":857843138,"support_perbill":34174724,"approval":85.7843138,"support":3.4174724},{"time_hours":59,"approval_perbill":855392157,"support_perbill":33521580,"approval":85.5392157,"support":3.352158},{"time_hours":60,"approval_perbill":852941177,"support_perbill":32888464,"approval":85.2941177,"support":3.2888464},{"time_hours":61,"approval_perbill":850490197,"support_perbill":32274469,"approval":85.0490197,"support":3.2274469},{"time_hours":62,"approval_perbill":848039217,"support_perbill":31678741,"approval":84.8039217,"support":3.1678741},{"time_hours":63,"approval_perbill":845588236,"support_perbill":31100477,"approval":84.5588236,"support":3.1100477},{"time_hours":64,"approval_perbill":843137256,"support_perbill":30538921,"approval":84.3137256,"support":3.0538921},{"time_hours":65,"approval_perbill":840686276,"support_perbill":29993358,"approval":84.0686276,"support":2.9993358},{"time_hours":66,"approval_perbill":838235295,"support_perbill":29463116,"approval":83.8235295,"support":2.9463116},{"time_hours":67,"approval_perbill":835784315,"support_perbill":28947556,"approval":83.5784315,"support":2.8947556},{"time_hours":68,"approval_perbill":833333334,"support_perbill":28446079,"approval":83.3333334,"support":2.8446079},{"time_hours":69,"approval_perbill":830882354,"support_perbill":27958114,"approval":83.0882354,"support":2.7958114},{"time_hours":70,"approval_perbill":828431373,"support_perbill":27483123,"approval":82.8431373,"support":2.7483123},{"time_hours":71,"approval_perbill":825980393,"support_perbill":27020596,"approval":82.5980393,"support":2.7020596},{"time_hours":72,"approval_perbill":823529412,"support_perbill":26570047,"approval":82.3529412,"support":2.6570047},{"time_hours":73,"approval_perbill":821078432,"support_perbill":26131019,"approval":82.1078432,"support":2.6131019},{"time_hours":74,"approval_perbill":818627452,"support_perbill":25703073,"approval":81.8627452,"support":2.5703073},{"time_hours":75,"approval_perbill":816176472,"support_perbill":25285796,"approval":81.6176472,"support":2.5285796},{"time_hours":76,"approval_perbill":813725491,"support_perbill":24878795,"approval":81.3725491,"support":2.4878795},{"time_hours":77,"approval_perbill":811274511,"support_perbill":24481693,"approval":81.1274511,"support":2.4481693},{"time_hours":78,"approval_perbill":808823530,"support_perbill":24094134,"approval":80.882353,"support":2.4094134},{"time_hours":79,"approval_perbill":806372550,"support_perbill":23715779,"approval":80.637255,"support":2.3715779},{"time_hours":80,"approval_perbill":803921569,"support_perbill":23346303,"approval":80.3921569,"support":2.3346303},{"time_hours":81,"approval_perbill":801470589,"support_perbill":22985397,"approval":80.1470589,"support":2.2985397},{"time_hours":82,"approval_perbill":799019608,"support_perbill":22632766,"approval":79.9019608,"support":2.2632766},{"time_hours":83,"approval_perbill":796568628,"support_perbill":22288130,"approval":79.6568628,"support":2.228813},{"time_hours":84,"approval_perbill":794117648,"support_perbill":21951219,"approval":79.4117648,"support":2.1951219},{"time_hours":85,"approval_perbill":791666668,"support_perbill":21621776,"approval":79.1666668,"support":2.1621776},{"time_hours":86,"approval_perbill":789215688,"support_perbill":21299556,"approval":78.9215688,"support":2.1299556},{"time_hours":87,"approval_perbill":786764707,"support_perbill":20984324,"approval":78.6764707,"support":2.0984324},{"time_hours":88,"approval_perbill":784313727,"support_perbill":20675855,"approval":78.4313727,"support":2.0675855},{"time_hours":89,"approval_perbill":781862746,"support_perbill":20373934,"approval":78.1862746,"support":2.0373934},{"time_hours":90,"approval_perbill":779411766,"support_perbill":20078354,"approval":77.9411766,"support":2.0078354},{"time_hours":91,"approval_perbill":776960785,"support_perbill":19788917,"approval":77.6960785,"support":1.9788917},{"time_hours":92,"approval_perbill":774509805,"support_perbill":19505435,"approval":77.4509805,"support":1.9505435},{"time_hours":93,"approval_perbill":772058824,"support_perbill":19227725,"approval":77.2058824,"support":1.9227725},{"time_hours":94,"approval_perbill":769607844,"support_perbill":18955613,"approval":76.9607844,"support":1.8955613},{"time_hours":95,"approval_perbill":767156863,"support_perbill":18688931,"approval":76.7156863,"support":1.8688931},{"time_hours":96,"approval_perbill":764705883,"support_perbill":18427518,"approval":76.4705883,"support":1.8427518},{"time_hours":97,"approval_perbill":762254903,"support_perbill":18171219,"approval":76.2254903,"support":1.8171219},{"time_hours":98,"approval_perbill":759803923,"support_perbill":17919887,"approval":75.9803923,"support":1.7919887},{"time_hours":99,"approval_perbill":757352942,"support_perbill":17673377,"approval":75.7352942,"support":1.7673377},{"time_hours":100,"approval_perbill":754901962,"support_perbill":17431553,"approval":75.4901962,"support":1.7431553},{"time_hours":101,"approval_perbill":752450981,"support_perbill":17194282,"approval":75.2450981,"support":1.7194282},{"time_hours":102,"approval_perbill":750000001,"support_perbill":16961437,"approval":75.0000001,"support":1.6961437},{"time_hours":103,"approval_perbill":747549020,"support_perbill":16732895,"approval":74.754902,"support":1.6732895},{"time_hours":104,"approval_perbill":745098040,"support_perbill":16508538,"approval":74.509804,"support":1.6508538},{"time_hours":105,"approval_perbill":742647059,"support_perbill":16288252,"approval":74.2647059,"support":1.6288252},{"time_hours":106,"approval_perbill":740196079,"support_perbill":16071927,"approval":74.0196079,"support":1.6071927},{"time_hours":107,"approval_perbill":737745099,"support_perbill":15859457,"approval":73.7745099,"support":1.5859457},{"time_hours":108,"approval_perbill":735294118,"support_perbill":15650741,"approval":73.5294118,"support":1.5650741},{"time_hours":109,"approval_perbill":732843138,"support_perbill":15445679,"approval":73.2843138,"support":1.5445679},{"time_hours":110,"approval_perbill":730392158,"support_perbill":15244176,"approval":73.0392158,"support":1.5244176},{"time_hours":111,"approval_perbill":727941178,"support_perbill":15046141,"approval":72.7941178,"support":1.5046141},{"time_hours":112,"approval_perbill":725490197,"support_perbill":14851485,"approval":72.5490197,"support":1.4851485},{"time_hours":113,"approval_perbill":723039217,"support_perbill":14660121,"approval":72.3039217,"support":1.4660121},{"time_hours":114,"approval_perbill":720588236,"support_perbill":14471968,"approval":72.0588236,"support":1.4471968},{"time_hours":115,"approval_perbill":718137256,"support_perbill":14286945,"approval":71.8137256,"support":1.4286945},{"time_hours":116,"approval_perbill":715686275,"support_perbill":14104975,"approval":71.5686275,"support":1.4104975},{"time_hours":117,"approval_perbill":713235295,"support_perbill":13925982,"approval":71.3235295,"support":1.3925982},{"time_hours":118,"approval_perbill":710784314,"support_perbill":13749894,"approval":71.0784314,"support":1.3749894},{"time_hours":119,"approval_perbill":708333334,"support_perbill":13576642,"approval":70.8333334,"support":1.3576642},{"time_hours":120,"approval_perbill":705882353,"support_perbill":13406156,"approval":70.5882353,"support":1.3406156},{"time_hours":121,"approval_perbill":703431373,"support_perbill":13238372,"approval":70.3431373,"support":1.3238372},{"time_hours":122,"approval_perbill":700980393,"support_perbill":13073226,"approval":70.0980393,"support":1.3073226},{"time_hours":123,"approval_perbill":698529413,"support_perbill":12910655,"approval":69.8529413,"support":1.2910655},{"time_hours":124,"approval_perbill":696078432,"support_perbill":12750601,"approval":69.6078432,"support":1.2750601},{"time_hours":125,"approval_perbill":693627452,"support_perbill":12593005,"approval":69.3627452,"support":1.2593005},{"time_hours":126,"approval_perbill":691176471,"support_perbill":12437810,"approval":69.1176471,"support":1.243781},{"time_hours":127,"approval_perbill":688725491,"support_perbill":12284964,"approval":68.8725491,"support":1.2284964},{"time_hours":128,"approval_perbill":686274511,"support_perbill":12134411,"approval":68.6274511,"support":1.2134411},{"time_hours":129,"approval_perbill":683823530,"support_perbill":11986103,"approval":68.382353,"support":1.1986103},{"time_hours":130,"approval_perbill":681372550,"support_perbill":11839987,"approval":68.137255,"support":1.1839987},{"time_hours":131,"approval_perbill":678921569,"support_perbill":11696017,"approval":67.8921569,"support":1.1696017},{"time_hours":132,"approval_perbill":676470589,"support_perbill":11554145,"approval":67.6470589,"support":1.1554145},{"time_hours":133,"approval_perbill":674019609,"support_perbill":11414326,"approval":67.4019609,"support":1.1414326},{"time_hours":134,"approval_perbill":671568629,"support_perbill":11276516,"approval":67.1568629,"support":1.1276516},{"time_hours":135,"approval_perbill":669117648,"support_perbill":11140671,"approval":66.9117648,"support":1.1140671},{"time_hours":136,"approval_perbill":666666668,"support_perbill":11006750,"approval":66.6666668,"support":1.100675},{"time_hours":137,"approval_perbill":664215687,"support_perbill":10874713,"approval":66.4215687,"support":1.0874713},{"time_hours":138,"approval_perbill":661764707,"support_perbill":10744519,"approval":66.1764707,"support":1.0744519},{"time_hours":139,"approval_perbill":659313726,"support_perbill":10616130,"approval":65.9313726,"support":1.061613},{"time_hours":140,"approval_perbill":656862746,"support_perbill":10489510,"approval":65.6862746,"support":1.048951},{"time_hours":141,"approval_perbill":654411765,"support_perbill":10364622,"approval":65.4411765,"support":1.0364622},{"time_hours":142,"approval_perbill":651960785,"support_perbill":10241430,"approval":65.1960785,"support":1.024143},{"time_hours":143,"approval_perbill":649509804,"support_perbill":10119900,"approval":64.9509804,"support":1.01199},{"time_hours":144,"approval_perbill":647058824,"support_perbill":10000000,"approval":64.7058824,"support":1},{"time_hours":145,"approval_perbill":644607844,"support_perbill":9881695,"approval":64.4607844,"support":0.9881695},{"time_hours":146,"approval_perbill":642156864,"support_perbill":9764955,"approval":64.2156864,"support":0.9764955},{"time_hours":147,"approval_perbill":639705883,"support_perbill":9649749,"approval":63.9705883,"support":0.9649749},{"time_hours":148,"approval_perbill":637254903,"support_perbill":9536047,"approval":63.7254903,"support":0.9536047},{"time_hours":149,"approval_perbill":634803923,"support_perbill":9423820,"approval":63.4803923,"support":0.942382},{"time_hours":150,"approval_perbill":632352942,"support_perbill":9313038,"approval":63.2352942,"support":0.9313038},{"time_hours":151,"approval_perbill":629901962,"support_perbill":9203674,"approval":62.9901962,"support":0.9203674},{"time_hours":152,"approval_perbill":627450981,"support_perbill":9095702,"approval":62.7450981,"support":0.9095702},{"time_hours":153,"approval_perbill":625000001,"support_perbill":8989095,"approval":62.5000001,"support":0.8989095},{"time_hours":154,"approval_perbill":622549020,"support_perbill":8883826,"approval":62.254902,"support":0.8883826},{"time_hours":155,"approval_perbill":620098040,"support_perbill":8779872,"approval":62.009804,"support":0.8779872},{"time_hours":156,"approval_perbill":617647059,"support_perbill":8677207,"approval":61.7647059,"support":0.8677207},{"time_hours":157,"approval_perbill":615196079,"support_perbill":8575808,"approval":61.5196079,"support":0.8575808},{"time_hours":158,"approval_perbill":612745099,"support_perbill":8475652,"approval":61.2745099,"support":0.8475652},{"time_hours":159,"approval_perbill":610294119,"support_perbill":8376715,"approval":61.0294119,"support":0.8376715},{"time_hours":160,"approval_perbill":607843138,"support_perbill":8278976,"approval":60.7843138,"support":0.8278976},{"time_hours":161,"approval_perbill":605392158,"support_perbill":8182413,"approval":60.5392158,"support":0.8182413},{"time_hours":162,"approval_perbill":602941177,"support_perbill":8087005,"approval":60.2941177,"support":0.8087005},{"time_hours":163,"approval_perbill":600490197,"support_perbill":7992731,"approval":60.0490197,"support":0.7992731},{"time_hours":164,"approval_perbill":598039216,"support_perbill":7899571,"approval":59.8039216,"support":0.7899571},{"time_hours":165,"approval_perbill":595588236,"support_perbill":7807506,"approval":59.5588236,"support":0.7807506},{"time_hours":166,"approval_perbill":593137255,"support_perbill":7716516,"approval":59.3137255,"support":0.7716516},{"time_hours":167,"approval_perbill":590686275,"support_perbill":7626583,"approval":59.0686275,"support":0.7626583},{"time_hours":168,"approval_perbill":588235295,"support_perbill":7537688,"approval":58.8235295,"support":0.7537688},{"time_hours":169,"approval_perbill":585784315,"support_perbill":7449814,"approval":58.5784315,"support":0.7449814},{"time_hours":170,"approval_perbill":583333335,"support_perbill":7362942,"approval":58.3333335,"support":0.7362942},{"time_hours":171,"approval_perbill":580882354,"support_perbill":7277057,"approval":58.0882354,"support":0.7277057},{"time_hours":172,"approval_perbill":578431374,"support_perbill":7192141,"approval":57.8431374,"support":0.7192141},{"time_hours":173,"approval_perbill":575980393,"support_perbill":7108178,"approval":57.5980393,"support":0.7108178},{"time_hours":174,"approval_perbill":573529413,"support_perbill":7025151,"approval":57.3529413,"support":0.7025151},{"time_hours":175,"approval_perbill":571078432,"support_perbill":6943047,"approval":57.1078432,"support":0.6943047},{"time_hours":176,"approval_perbill":568627452,"support_perbill":6861848,"approval":56.8627452,"support":0.6861848},{"time_hours":177,"approval_perbill":566176471,"support_perbill":6781540,"approval":56.6176471,"support":0.678154},{"time_hours":178,"approval_perbill":563725491,"support_perbill":6702109,"approval":56.3725491,"support":0.6702109},{"time_hours":179,"approval_perbill":561274510,"support_perbill":6623541,"approval":56.127451,"support":0.6623541},{"time_hours":180,"approval_perbill":558823530,"support_perbill":6545820,"approval":55.882353,"support":0.654582},{"time_hours":181,"approval_perbill":556372550,"support_perbill":6468935,"approval":55.637255,"support":0.6468935},{"time_hours":182,"approval_perbill":553921570,"support_perbill":6392871,"approval":55.392157,"support":0.6392871},{"time_hours":183,"approval_perbill":551470589,"support_perbill":6317615,"approval":55.1470589,"support":0.6317615},{"time_hours":184,"approval_perbill":549019609,"support_perbill":6243154,"approval":54.9019609,"support":0.6243154},{"time_hours":185,"approval_perbill":546568628,"support_perbill":6169476,"approval":54.6568628,"support":0.6169476},{"time_hours":186,"approval_perbill":544117648,"support_perbill":6096569,"approval":54.4117648,"support":0.6096569},{"time_hours":187,"approval_perbill":541666667,"support_perbill":6024421,"approval":54.1666667,"support":0.6024421},{"time_hours":188,"approval_perbill":539215687,"support_perbill":5953019,"approval":53.9215687,"support":0.5953019},{"time_hours":189,"approval_perbill":536764706,"support_perbill":5882353,"approval":53.6764706,"support":0.5882353},{"time_hours":190,"approval_perbill":534313726,"support_perbill":5812410,"approval":53.4313726,"support":0.581241},{"time_hours":191,"approval_perbill":531862746,"support_perbill":5743181,"approval":53.1862746,"support":0.5743181},{"time_hours":192,"approval_perbill":529411765,"support_perbill":5674653,"approval":52.9411765,"support":0.5674653},{"time_hours":193,"approval_perbill":526960785,"support_perbill":5606817,"approval":52.6960785,"support":0.5606817},{"time_hours":194,"approval_perbill":524509805,"support_perbill":5539662,"approval":52.4509805,"support":0.5539662},{"time_hours":195,"approval_perbill":522058825,"support_perbill":5473177,"approval":52.2058825,"support":0.5473177},{"time_hours":196,"approval_perbill":519607844,"support_perbill":5407354,"approval":51.9607844,"support":0.5407354},{"time_hours":197,"approval_perbill":517156864,"support_perbill":5342181,"approval":51.7156864,"support":0.5342181},{"time_hours":198,"approval_perbill":514705883,"support_perbill":5277650,"approval":51.4705883,"support":0.527765},{"time_hours":199,"approval_perbill":512254903,"support_perbill":5213751,"approval":51.2254903,"support":0.5213751},{"time_hours":200,"approval_perbill":509803922,"support_perbill":5150474,"approval":50.9803922,"support":0.5150474},{"time_hours":201,"approval_perbill":507352942,"support_perbill":5087812,"approval":50.7352942,"support":0.5087812},{"time_hours":202,"approval_perbill":504901961,"support_perbill":5025754,"approval":50.4901961,"support":0.5025754},{"time_hours":203,"approval_perbill":502450981,"support_perbill":4964292,"approval":50.2450981,"support":0.4964292},{"time_hours":204,"approval_perbill":500000000,"support_perbill":4903417,"approval":50,"support":0.4903417},{"time_hours":205,"approval_perbill":500000000,"support_perbill":4843122,"approval":50,"support":0.4843122},{"time_hours":206,"approval_perbill":500000000,"support_perbill":4783398,"approval":50,"support":0.4783398},{"time_hours":207,"approval_perbill":500000000,"support_perbill":4724236,"approval":50,"support":0.4724236},{"time_hours":208,"approval_perbill":500000000,"support_perbill":4665630,"approval":50,"support":0.466563},{"time_hours":209,"approval_perbill":500000000,"support_perbill":4607570,"approval":50,"support":0.460757},{"time_hours":210,"approval_perbill":500000000,"support_perbill":4550050,"approval":50,"support":0.455005},{"time_hours":211,"approval_perbill":500000000,"support_perbill":4493062,"approval":50,"support":0.4493062},{"time_hours":212,"approval_perbill":500000000,"support_perbill":4436599,"approval":50,"support":0.4436599},{"time_hours":213,"approval_perbill":500000000,"support_perbill":4380654,"approval":50,"support":0.4380654},{"time_hours":214,"approval_perbill":500000000,"support_perbill":4325218,"approval":50,"support":0.4325218},{"time_hours":215,"approval_perbill":500000000,"support_perbill":4270287,"approval":50,"support":0.4270287},{"time_hours":216,"approval_perbill":500000000,"support_perbill":4215851,"approval":50,"support":0.4215851},{"time_hours":217,"approval_perbill":500000000,"support_perbill":4161906,"approval":50,"support":0.4161906},{"time_hours":218,"approval_perbill":500000000,"support_perbill":4108444,"approval":50,"support":0.4108444},{"time_hours":219,"approval_perbill":500000000,"support_perbill":4055459,"approval":50,"support":0.4055459},{"time_hours":220,"approval_perbill":500000000,"support_perbill":4002944,"approval":50,"support":0.4002944},{"time_hours":221,"approval_perbill":500000000,"support_perbill":3950894,"approval":50,"support":0.3950894},{"time_hours":222,"approval_perbill":500000000,"support_perbill":3899302,"approval":50,"support":0.3899302},{"time_hours":223,"approval_perbill":500000000,"support_perbill":3848162,"approval":50,"support":0.3848162},{"time_hours":224,"approval_perbill":500000000,"support_perbill":3797468,"approval":50,"support":0.3797468},{"time_hours":225,"approval_perbill":500000000,"support_perbill":3747215,"approval":50,"support":0.3747215},{"time_hours":226,"approval_perbill":500000000,"support_perbill":3697396,"approval":50,"support":0.3697396},{"time_hours":227,"approval_perbill":500000000,"support_perbill":3648006,"approval":50,"support":0.3648006},{"time_hours":228,"approval_perbill":500000000,"support_perbill":3599040,"approval":50,"support":0.359904},{"time_hours":229,"approval_perbill":500000000,"support_perbill":3550492,"approval":50,"support":0.3550492},{"time_hours":230,"approval_perbill":500000000,"support_perbill":3502357,"approval":50,"support":0.3502357},{"time_hours":231,"approval_perbill":500000000,"support_perbill":3454629,"approval":50,"support":0.3454629},{"time_hours":232,"approval_perbill":500000000,"support_perbill":3407304,"approval":50,"support":0.3407304},{"time_hours":233,"approval_perbill":500000000,"support_perbill":3360376,"approval":50,"support":0.3360376},{"time_hours":234,"approval_perbill":500000000,"support_perbill":3313840,"approval":50,"support":0.331384},{"time_hours":235,"approval_perbill":500000000,"support_perbill":3267692,"approval":50,"support":0.3267692},{"time_hours":236,"approval_perbill":500000000,"support_perbill":3221926,"approval":50,"support":0.3221926},{"time_hours":237,"approval_perbill":500000000,"support_perbill":3176538,"approval":50,"support":0.3176538},{"time_hours":238,"approval_perbill":500000000,"support_perbill":3131524,"approval":50,"support":0.3131524},{"time_hours":239,"approval_perbill":500000000,"support_perbill":3086878,"approval":50,"support":0.3086878},{"time_hours":240,"approval_perbill":500000000,"support_perbill":3042596,"approval":50,"support":0.3042596},{"time_hours":241,"approval_perbill":500000000,"support_perbill":2998674,"approval":50,"support":0.2998674},{"time_hours":242,"approval_perbill":500000000,"support_perbill":2955107,"approval":50,"support":0.2955107},{"time_hours":243,"approval_perbill":500000000,"support_perbill":2911892,"approval":50,"support":0.2911892},{"time_hours":244,"approval_perbill":500000000,"support_perbill":2869023,"approval":50,"support":0.2869023},{"time_hours":245,"approval_perbill":500000000,"support_perbill":2826496,"approval":50,"support":0.2826496},{"time_hours":246,"approval_perbill":500000000,"support_perbill":2784309,"approval":50,"support":0.2784309},{"time_hours":247,"approval_perbill":500000000,"support_perbill":2742455,"approval":50,"support":0.2742455},{"time_hours":248,"approval_perbill":500000000,"support_perbill":2700933,"approval":50,"support":0.2700933},{"time_hours":249,"approval_perbill":500000000,"support_perbill":2659737,"approval":50,"support":0.2659737},{"time_hours":250,"approval_perbill":500000000,"support_perbill":2618864,"approval":50,"support":0.2618864},{"time_hours":251,"approval_perbill":500000000,"support_perbill":2578310,"approval":50,"support":0.257831},{"time_hours":252,"approval_perbill":500000000,"support_perbill":2538071,"approval":50,"support":0.2538071},{"time_hours":253,"approval_perbill":500000000,"support_perbill":2498144,"approval":50,"support":0.2498144},{"time_hours":254,"approval_perbill":500000000,"support_perbill":2458525,"approval":50,"support":0.2458525},{"time_hours":255,"approval_perbill":500000000,"support_perbill":2419210,"approval":50,"support":0.241921},{"time_hours":256,"approval_perbill":500000000,"support_perbill":2380197,"approval":50,"support":0.2380197},{"time_hours":257,"approval_perbill":500000000,"support_perbill":2341481,"approval":50,"support":0.2341481},{"time_hours":258,"approval_perbill":500000000,"support_perbill":2303059,"approval":50,"support":0.2303059},{"time_hours":259,"approval_perbill":500000000,"support_perbill":2264928,"approval":50,"support":0.2264928},{"time_hours":260,"approval_perbill":500000000,"support_perbill":2227084,"approval":50,"support":0.2227084},{"time_hours":261,"approval_perbill":500000000,"support_perbill":2189525,"approval":50,"support":0.2189525},{"time_hours":262,"approval_perbill":500000000,"support_perbill":2152247,"approval":50,"support":0.2152247},{"time_hours":263,"approval_perbill":500000000,"support_perbill":2115247,"approval":50,"support":0.2115247},{"time_hours":264,"approval_perbill":500000000,"support_perbill":2078522,"approval":50,"support":0.2078522},{"time_hours":265,"approval_perbill":500000000,"support_perbill":2042068,"approval":50,"support":0.2042068},{"time_hours":266,"approval_perbill":500000000,"support_perbill":2005884,"approval":50,"support":0.2005884},{"time_hours":267,"approval_perbill":500000000,"support_perbill":1969965,"approval":50,"support":0.1969965},{"time_hours":268,"approval_perbill":500000000,"support_perbill":1934309,"approval":50,"support":0.1934309},{"time_hours":269,"approval_perbill":500000000,"support_perbill":1898913,"approval":50,"support":0.1898913},{"time_hours":270,"approval_perbill":500000000,"support_perbill":1863775,"approval":50,"support":0.1863775},{"time_hours":271,"approval_perbill":500000000,"support_perbill":1828891,"approval":50,"support":0.1828891},{"time_hours":272,"approval_perbill":500000000,"support_perbill":1794258,"approval":50,"support":0.1794258},{"time_hours":273,"approval_perbill":500000000,"support_perbill":1759875,"approval":50,"support":0.1759875},{"time_hours":274,"approval_perbill":500000000,"support_perbill":1725737,"approval":50,"support":0.1725737},{"time_hours":275,"approval_perbill":500000000,"support_perbill":1691844,"approval":50,"support":0.1691844},{"time_hours":276,"approval_perbill":500000000,"support_perbill":1658191,"approval":50,"support":0.1658191},{"time_hours":277,"approval_perbill":500000000,"support_perbill":1624777,"approval":50,"support":0.1624777},{"time_hours":278,"approval_perbill":500000000,"support_perbill":1591599,"approval":50,"support":0.1591599},{"time_hours":279,"approval_perbill":500000000,"support_perbill":1558654,"approval":50,"support":0.1558654},{"time_hours":280,"approval_perbill":500000000,"support_perbill":1525941,"approval":50,"support":0.1525941},{"time_hours":281,"approval_perbill":500000000,"support_perbill":1493456,"approval":50,"support":0.1493456},{"time_hours":282,"approval_perbill":500000000,"support_perbill":1461197,"approval":50,"support":0.1461197},{"time_hours":283,"approval_perbill":500000000,"support_perbill":1429162,"approval":50,"support":0.1429162},{"time_hours":284,"approval_perbill":500000000,"support_perbill":1397348,"approval":50,"support":0.1397348},{"time_hours":285,"approval_perbill":500000000,"support_perbill":1365754,"approval":50,"support":0.1365754},{"time_hours":286,"approval_perbill":500000000,"support_perbill":1334377,"approval":50,"support":0.1334377},{"time_hours":287,"approval_perbill":500000000,"support_perbill":1303214,"approval":50,"support":0.1303214},{"time_hours":288,"approval_perbill":500000000,"support_perbill":1272264,"approval":50,"support":0.1272264},{"time_hours":289,"approval_perbill":500000000,"support_perbill":1241525,"approval":50,"support":0.1241525},{"time_hours":290,"approval_perbill":500000000,"support_perbill":1210994,"approval":50,"support":0.1210994},{"time_hours":291,"approval_perbill":500000000,"support_perbill":1180668,"approval":50,"support":0.1180668},{"time_hours":292,"approval_perbill":500000000,"support_perbill":1150547,"approval":50,"support":0.1150547},{"time_hours":293,"approval_perbill":500000000,"support_perbill":1120628,"approval":50,"support":0.1120628},{"time_hours":294,"approval_perbill":500000000,"support_perbill":1090909,"approval":50,"support":0.1090909},{"time_hours":295,"approval_perbill":500000000,"support_perbill":1061388,"approval":50,"support":0.1061388},{"time_hours":296,"approval_perbill":500000000,"support_perbill":1032063,"approval":50,"support":0.1032063},{"time_hours":297,"approval_perbill":500000000,"support_perbill":1002932,"approval":50,"support":0.1002932},{"time_hours":298,"approval_perbill":500000000,"support_perbill":973993,"approval":50,"support":0.0973993},{"time_hours":299,"approval_perbill":500000000,"support_perbill":945244,"approval":50,"support":0.0945244},{"time_hours":300,"approval_perbill":500000000,"support_perbill":916684,"approval":50,"support":0.0916684},{"time_hours":301,"approval_perbill":500000000,"support_perbill":888310,"approval":50,"support":0.088831},{"time_hours":302,"approval_perbill":500000000,"support_perbill":860121,"approval":50,"support":0.0860121},{"time_hours":303,"approval_perbill":500000000,"support_perbill":832114,"approval":50,"support":0.0832114},{"time_hours":304,"approval_perbill":500000000,"support_perbill":804289,"approval":50,"support":0.0804289},{"time_hours":305,"approval_perbill":500000000,"support_perbill":776644,"approval":50,"support":0.0776644},{"time_hours":306,"approval_perbill":500000000,"support_perbill":749176,"approval":50,"support":0.0749176},{"time_hours":307,"approval_perbill":500000000,"support_perbill":721884,"approval":50,"support":0.0721884},{"time_hours":308,"approval_perbill":500000000,"support_perbill":694766,"approval":50,"support":0.0694766},{"time_hours":309,"approval_perbill":500000000,"support_perbill":667821,"approval":50,"support":0.0667821},{"time_hours":310,"approval_perbill":500000000,"support_perbill":641047,"approval":50,"support":0.0641047},{"time_hours":311,"approval_perbill":500000000,"support_perbill":614442,"approval":50,"support":0.0614442},{"time_hours":312,"approval_perbill":500000000,"support_perbill":588005,"approval":50,"support":0.0588005},{"time_hours":313,"approval_perbill":500000000,"support_perbill":561734,"approval":50,"support":0.0561734},{"time_hours":314,"approval_perbill":500000000,"support_perbill":535627,"approval":50,"support":0.0535627},{"time_hours":315,"approval_perbill":500000000,"support_perbill":509684,"approval":50,"support":0.0509684},{"time_hours":316,"approval_perbill":500000000,"support_perbill":483902,"approval":50,"support":0.0483902},{"time_hours":317,"approval_perbill":500000000,"support_perbill":458280,"approval":50,"support":0.045828},{"time_hours":318,"approval_perbill":500000000,"support_perbill":432817,"approval":50,"support":0.0432817},{"time_hours":319,"approval_perbill":500000000,"support_perbill":407511,"approval":50,"support":0.0407511},{"time_hours":320,"approval_perbill":500000000,"support_perbill":382360,"approval":50,"support":0.038236},{"time_hours":321,"approval_perbill":500000000,"support_perbill":357364,"approval":50,"support":0.0357364},{"time_hours":322,"approval_perbill":500000000,"support_perbill":332520,"approval":50,"support":0.033252},{"time_hours":323,"approval_perbill":500000000,"support_perbill":307828,"approval":50,"support":0.0307828},{"time_hours":324,"approval_perbill":500000000,"support_perbill":283286,"approval":50,"support":0.0283286},{"time_hours":325,"approval_perbill":500000000,"support_perbill":258892,"approval":50,"support":0.0258892},{"time_hours":326,"approval_perbill":500000000,"support_perbill":234646,"approval":50,"support":0.0234646},{"time_hours":327,"approval_perbill":500000000,"support_perbill":210546,"approval":50,"support":0.0210546},{"time_hours":328,"approval_perbill":500000000,"support_perbill":186590,"approval":50,"support":0.018659},{"time_hours":329,"approval_perbill":500000000,"support_perbill":162778,"approval":50,"support":0.0162778},{"time_hours":330,"approval_perbill":500000000,"support_perbill":139108,"approval":50,"support":0.0139108},{"time_hours":331,"approval_perbill":500000000,"support_perbill":115578,"approval":50,"support":0.0115578},{"time_hours":332,"approval_perbill":500000000,"support_perbill":92188,"approval":50,"support":0.0092188},{"time_hours":333,"approval_perbill":500000000,"support_perbill":68937,"approval":50,"support":0.0068937},{"time_hours":334,"approval_perbill":500000000,"support_perbill":45822,"approval":50,"support":0.0045822},{"time_hours":335,"approval_perbill":500000000,"support_perbill":22844,"approval":50,"support":0.0022844},{"time_hours":336,"approval_perbill":500000000,"support_perbill":0,"approval":50,"support":0}]')},6303:p=>{"use strict";p.exports=JSON.parse('[{"time_hours":0,"approval_perbill":1000000000,"support_perbill":500000000,"approval":100,"support":50},{"time_hours":1,"approval_perbill":994100296,"support_perbill":482708936,"approval":99.4100296,"support":48.2708936},{"time_hours":2,"approval_perbill":988304096,"support_perbill":466480452,"approval":98.8304096,"support":46.6480452},{"time_hours":3,"approval_perbill":982608697,"support_perbill":451219514,"approval":98.2608697,"support":45.1219514},{"time_hours":4,"approval_perbill":977011496,"support_perbill":436842109,"approval":97.7011496,"support":43.6842109},{"time_hours":5,"approval_perbill":971509972,"support_perbill":423273659,"approval":97.1509972,"support":42.3273659},{"time_hours":6,"approval_perbill":966101697,"support_perbill":410447765,"approval":96.6101697,"support":41.0447765},{"time_hours":7,"approval_perbill":960784315,"support_perbill":398305086,"approval":96.0784315,"support":39.8305086},{"time_hours":8,"approval_perbill":955555557,"support_perbill":386792456,"approval":95.5555557,"support":38.6792456},{"time_hours":9,"approval_perbill":950413224,"support_perbill":375862070,"approval":95.0413224,"support":37.586207},{"time_hours":10,"approval_perbill":945355193,"support_perbill":365470854,"approval":94.5355193,"support":36.5470854},{"time_hours":11,"approval_perbill":940379404,"support_perbill":355579869,"approval":94.0379404,"support":35.5579869},{"time_hours":12,"approval_perbill":935483872,"support_perbill":346153848,"approval":93.5483872,"support":34.6153848},{"time_hours":13,"approval_perbill":930666667,"support_perbill":337160752,"approval":93.0666667,"support":33.7160752},{"time_hours":14,"approval_perbill":925925927,"support_perbill":328571430,"approval":92.5925927,"support":32.857143},{"time_hours":15,"approval_perbill":921259843,"support_perbill":320359282,"approval":92.1259843,"support":32.0359282},{"time_hours":16,"approval_perbill":916666668,"support_perbill":312500001,"approval":91.6666668,"support":31.2500001},{"time_hours":17,"approval_perbill":912144703,"support_perbill":304971319,"approval":91.2144703,"support":30.4971319},{"time_hours":18,"approval_perbill":907692309,"support_perbill":297752810,"approval":90.7692309,"support":29.775281},{"time_hours":19,"approval_perbill":903307888,"support_perbill":290825688,"approval":90.3307888,"support":29.0825688},{"time_hours":20,"approval_perbill":898989900,"support_perbill":284172663,"approval":89.89899,"support":28.4172663},{"time_hours":21,"approval_perbill":894736842,"support_perbill":277777777,"approval":89.4736842,"support":27.7777777},{"time_hours":22,"approval_perbill":890547265,"support_perbill":271626298,"approval":89.0547265,"support":27.1626298},{"time_hours":23,"approval_perbill":886419755,"support_perbill":265704586,"approval":88.6419755,"support":26.5704586},{"time_hours":24,"approval_perbill":882352942,"support_perbill":260000000,"approval":88.2352942,"support":26},{"time_hours":25,"approval_perbill":878345500,"support_perbill":254500820,"approval":87.83455,"support":25.450082},{"time_hours":26,"approval_perbill":874396136,"support_perbill":249196142,"approval":87.4396136,"support":24.9196142},{"time_hours":27,"approval_perbill":870503599,"support_perbill":244075830,"approval":87.0503599,"support":24.407583},{"time_hours":28,"approval_perbill":866666667,"support_perbill":239130435,"approval":86.6666667,"support":23.9130435},{"time_hours":29,"approval_perbill":862884162,"support_perbill":234351146,"approval":86.2884162,"support":23.4351146},{"time_hours":30,"approval_perbill":859154930,"support_perbill":229729730,"approval":85.915493,"support":22.972973},{"time_hours":31,"approval_perbill":855477857,"support_perbill":225258494,"approval":85.5477857,"support":22.5258494},{"time_hours":32,"approval_perbill":851851852,"support_perbill":220930232,"approval":85.1851852,"support":22.0930232},{"time_hours":33,"approval_perbill":848275863,"support_perbill":216738198,"approval":84.8275863,"support":21.6738198},{"time_hours":34,"approval_perbill":844748859,"support_perbill":212676056,"approval":84.4748859,"support":21.2676056},{"time_hours":35,"approval_perbill":841269842,"support_perbill":208737865,"approval":84.1269842,"support":20.8737865},{"time_hours":36,"approval_perbill":837837838,"support_perbill":204918033,"approval":83.7837838,"support":20.4918033},{"time_hours":37,"approval_perbill":834451903,"support_perbill":201211306,"approval":83.4451903,"support":20.1211306},{"time_hours":38,"approval_perbill":831111112,"support_perbill":197612732,"approval":83.1111112,"support":19.7612732},{"time_hours":39,"approval_perbill":827814570,"support_perbill":194117647,"approval":82.781457,"support":19.4117647},{"time_hours":40,"approval_perbill":824561404,"support_perbill":190721649,"approval":82.4561404,"support":19.0721649},{"time_hours":41,"approval_perbill":821350763,"support_perbill":187420585,"approval":82.1350763,"support":18.7420585},{"time_hours":42,"approval_perbill":818181818,"support_perbill":184210526,"approval":81.8181818,"support":18.4210526},{"time_hours":43,"approval_perbill":815053764,"support_perbill":181087763,"approval":81.5053764,"support":18.1087763},{"time_hours":44,"approval_perbill":811965813,"support_perbill":178048781,"approval":81.1965813,"support":17.8048781},{"time_hours":45,"approval_perbill":808917198,"support_perbill":175090253,"approval":80.8917198,"support":17.5090253},{"time_hours":46,"approval_perbill":805907174,"support_perbill":172209026,"approval":80.5907174,"support":17.2209026},{"time_hours":47,"approval_perbill":802935011,"support_perbill":169402110,"approval":80.2935011,"support":16.940211},{"time_hours":48,"approval_perbill":800000001,"support_perbill":166666667,"approval":80.0000001,"support":16.6666667},{"time_hours":49,"approval_perbill":797101450,"support_perbill":164000000,"approval":79.710145,"support":16.4},{"time_hours":50,"approval_perbill":794238684,"support_perbill":161399549,"approval":79.4238684,"support":16.1399549},{"time_hours":51,"approval_perbill":791411043,"support_perbill":158862876,"approval":79.1411043,"support":15.8862876},{"time_hours":52,"approval_perbill":788617887,"support_perbill":156387665,"approval":78.8617887,"support":15.6387665},{"time_hours":53,"approval_perbill":785858586,"support_perbill":153971708,"approval":78.5858586,"support":15.3971708},{"time_hours":54,"approval_perbill":783132531,"support_perbill":151612903,"approval":78.3132531,"support":15.1612903},{"time_hours":55,"approval_perbill":780439122,"support_perbill":149309245,"approval":78.0439122,"support":14.9309245},{"time_hours":56,"approval_perbill":777777779,"support_perbill":147058823,"approval":77.7777779,"support":14.7058823},{"time_hours":57,"approval_perbill":775147929,"support_perbill":144859813,"approval":77.5147929,"support":14.4859813},{"time_hours":58,"approval_perbill":772549020,"support_perbill":142710472,"approval":77.254902,"support":14.2710472},{"time_hours":59,"approval_perbill":769980507,"support_perbill":140609137,"approval":76.9980507,"support":14.0609137},{"time_hours":60,"approval_perbill":767441861,"support_perbill":138554217,"approval":76.7441861,"support":13.8554217},{"time_hours":61,"approval_perbill":764932563,"support_perbill":136544190,"approval":76.4932563,"support":13.654419},{"time_hours":62,"approval_perbill":762452108,"support_perbill":134577603,"approval":76.2452108,"support":13.4577603},{"time_hours":63,"approval_perbill":760000000,"support_perbill":132653061,"approval":76,"support":13.2653061},{"time_hours":64,"approval_perbill":757575758,"support_perbill":130769230,"approval":75.7575758,"support":13.076923},{"time_hours":65,"approval_perbill":755178909,"support_perbill":128924833,"approval":75.5178909,"support":12.8924833},{"time_hours":66,"approval_perbill":752808989,"support_perbill":127118644,"approval":75.2808989,"support":12.7118644},{"time_hours":67,"approval_perbill":750465550,"support_perbill":125349487,"approval":75.046555,"support":12.5349487},{"time_hours":68,"approval_perbill":748148149,"support_perbill":123616236,"approval":74.8148149,"support":12.3616236},{"time_hours":69,"approval_perbill":745856354,"support_perbill":121917808,"approval":74.5856354,"support":12.1917808},{"time_hours":70,"approval_perbill":743589744,"support_perbill":120253164,"approval":74.3589744,"support":12.0253164},{"time_hours":71,"approval_perbill":741347906,"support_perbill":118621307,"approval":74.1347906,"support":11.8621307},{"time_hours":72,"approval_perbill":739130435,"support_perbill":117021276,"approval":73.9130435,"support":11.7021276},{"time_hours":73,"approval_perbill":736936938,"support_perbill":115452151,"approval":73.6936938,"support":11.5452151},{"time_hours":74,"approval_perbill":734767025,"support_perbill":113913043,"approval":73.4767025,"support":11.3913043},{"time_hours":75,"approval_perbill":732620322,"support_perbill":112403100,"approval":73.2620322,"support":11.24031},{"time_hours":76,"approval_perbill":730496454,"support_perbill":110921501,"approval":73.0496454,"support":11.0921501},{"time_hours":77,"approval_perbill":728395062,"support_perbill":109467455,"approval":72.8395062,"support":10.9467455},{"time_hours":78,"approval_perbill":726315790,"support_perbill":108040200,"approval":72.631579,"support":10.80402},{"time_hours":79,"approval_perbill":724258290,"support_perbill":106639004,"approval":72.425829,"support":10.6639004},{"time_hours":80,"approval_perbill":722222222,"support_perbill":105263157,"approval":72.2222222,"support":10.5263157},{"time_hours":81,"approval_perbill":720207254,"support_perbill":103911980,"approval":72.0207254,"support":10.391198},{"time_hours":82,"approval_perbill":718213059,"support_perbill":102584814,"approval":71.8213059,"support":10.2584814},{"time_hours":83,"approval_perbill":716239317,"support_perbill":101281024,"approval":71.6239317,"support":10.1281024},{"time_hours":84,"approval_perbill":714285714,"support_perbill":99999999,"approval":71.4285714,"support":9.9999999},{"time_hours":85,"approval_perbill":712351946,"support_perbill":98741148,"approval":71.2351946,"support":9.8741148},{"time_hours":86,"approval_perbill":710437711,"support_perbill":97503900,"approval":71.0437711,"support":9.75039},{"time_hours":87,"approval_perbill":708542714,"support_perbill":96287703,"approval":70.8542714,"support":9.6287703},{"time_hours":88,"approval_perbill":706666667,"support_perbill":95092024,"approval":70.6666667,"support":9.5092024},{"time_hours":89,"approval_perbill":704809287,"support_perbill":93916349,"approval":70.4809287,"support":9.3916349},{"time_hours":90,"approval_perbill":702970298,"support_perbill":92760181,"approval":70.2970298,"support":9.2760181},{"time_hours":91,"approval_perbill":701149426,"support_perbill":91623036,"approval":70.1149426,"support":9.1623036},{"time_hours":92,"approval_perbill":699346406,"support_perbill":90504451,"approval":69.9346406,"support":9.0504451},{"time_hours":93,"approval_perbill":697560976,"support_perbill":89403973,"approval":69.7560976,"support":8.9403973},{"time_hours":94,"approval_perbill":695792881,"support_perbill":88321167,"approval":69.5792881,"support":8.8321167},{"time_hours":95,"approval_perbill":694041868,"support_perbill":87255611,"approval":69.4041868,"support":8.7255611},{"time_hours":96,"approval_perbill":692307693,"support_perbill":86206896,"approval":69.2307693,"support":8.6206896},{"time_hours":97,"approval_perbill":690590112,"support_perbill":85174625,"approval":69.0590112,"support":8.5174625},{"time_hours":98,"approval_perbill":688888889,"support_perbill":84158415,"approval":68.8888889,"support":8.4158415},{"time_hours":99,"approval_perbill":687203792,"support_perbill":83157894,"approval":68.7203792,"support":8.3157894},{"time_hours":100,"approval_perbill":685534592,"support_perbill":82172701,"approval":68.5534592,"support":8.2172701},{"time_hours":101,"approval_perbill":683881064,"support_perbill":81202487,"approval":68.3881064,"support":8.1202487},{"time_hours":102,"approval_perbill":682242991,"support_perbill":80246913,"approval":68.2242991,"support":8.0246913},{"time_hours":103,"approval_perbill":680620155,"support_perbill":79305649,"approval":68.0620155,"support":7.9305649},{"time_hours":104,"approval_perbill":679012346,"support_perbill":78378378,"approval":67.9012346,"support":7.8378378},{"time_hours":105,"approval_perbill":677419355,"support_perbill":77464788,"approval":67.7419355,"support":7.7464788},{"time_hours":106,"approval_perbill":675840979,"support_perbill":76564580,"approval":67.5840979,"support":7.656458},{"time_hours":107,"approval_perbill":674277017,"support_perbill":75677462,"approval":67.4277017,"support":7.5677462},{"time_hours":108,"approval_perbill":672727273,"support_perbill":74803149,"approval":67.2727273,"support":7.4803149},{"time_hours":109,"approval_perbill":671191554,"support_perbill":73941368,"approval":67.1191554,"support":7.3941368},{"time_hours":110,"approval_perbill":669669670,"support_perbill":73091849,"approval":66.966967,"support":7.3091849},{"time_hours":111,"approval_perbill":668161435,"support_perbill":72254335,"approval":66.8161435,"support":7.2254335},{"time_hours":112,"approval_perbill":666666667,"support_perbill":71428571,"approval":66.6666667,"support":7.1428571},{"time_hours":113,"approval_perbill":665185186,"support_perbill":70614312,"approval":66.5185186,"support":7.0614312},{"time_hours":114,"approval_perbill":663716814,"support_perbill":69811320,"approval":66.3716814,"support":6.981132},{"time_hours":115,"approval_perbill":662261381,"support_perbill":69019362,"approval":66.2261381,"support":6.9019362},{"time_hours":116,"approval_perbill":660818714,"support_perbill":68238213,"approval":66.0818714,"support":6.8238213},{"time_hours":117,"approval_perbill":659388647,"support_perbill":67467652,"approval":65.9388647,"support":6.7467652},{"time_hours":118,"approval_perbill":657971015,"support_perbill":66707466,"approval":65.7971015,"support":6.6707466},{"time_hours":119,"approval_perbill":656565657,"support_perbill":65957446,"approval":65.6565657,"support":6.5957446},{"time_hours":120,"approval_perbill":655172414,"support_perbill":65217391,"approval":65.5172414,"support":6.5217391},{"time_hours":121,"approval_perbill":653791130,"support_perbill":64487102,"approval":65.379113,"support":6.4487102},{"time_hours":122,"approval_perbill":652421652,"support_perbill":63766388,"approval":65.2421652,"support":6.3766388},{"time_hours":123,"approval_perbill":651063830,"support_perbill":63055062,"approval":65.106383,"support":6.3055062},{"time_hours":124,"approval_perbill":649717514,"support_perbill":62352940,"approval":64.9717514,"support":6.235294},{"time_hours":125,"approval_perbill":648382560,"support_perbill":61659847,"approval":64.838256,"support":6.1659847},{"time_hours":126,"approval_perbill":647058823,"support_perbill":60975609,"approval":64.7058823,"support":6.0975609},{"time_hours":127,"approval_perbill":645746165,"support_perbill":60300057,"approval":64.5746165,"support":6.0300057},{"time_hours":128,"approval_perbill":644444445,"support_perbill":59633027,"approval":64.4444445,"support":5.9633027},{"time_hours":129,"approval_perbill":643153527,"support_perbill":58974358,"approval":64.3153527,"support":5.8974358},{"time_hours":130,"approval_perbill":641873279,"support_perbill":58323895,"approval":64.1873279,"support":5.8323895},{"time_hours":131,"approval_perbill":640603567,"support_perbill":57681485,"approval":64.0603567,"support":5.7681485},{"time_hours":132,"approval_perbill":639344263,"support_perbill":57046979,"approval":63.9344263,"support":5.7046979},{"time_hours":133,"approval_perbill":638095238,"support_perbill":56420233,"approval":63.8095238,"support":5.6420233},{"time_hours":134,"approval_perbill":636856369,"support_perbill":55801104,"approval":63.6856369,"support":5.5801104},{"time_hours":135,"approval_perbill":635627530,"support_perbill":55189456,"approval":63.562753,"support":5.5189456},{"time_hours":136,"approval_perbill":634408602,"support_perbill":54585152,"approval":63.4408602,"support":5.4585152},{"time_hours":137,"approval_perbill":633199465,"support_perbill":53988062,"approval":63.3199465,"support":5.3988062},{"time_hours":138,"approval_perbill":632000000,"support_perbill":53398058,"approval":63.2,"support":5.3398058},{"time_hours":139,"approval_perbill":630810093,"support_perbill":52815013,"approval":63.0810093,"support":5.2815013},{"time_hours":140,"approval_perbill":629629630,"support_perbill":52238805,"approval":62.962963,"support":5.2238805},{"time_hours":141,"approval_perbill":628458498,"support_perbill":51669316,"approval":62.8458498,"support":5.1669316},{"time_hours":142,"approval_perbill":627296588,"support_perbill":51106427,"approval":62.7296588,"support":5.1106427},{"time_hours":143,"approval_perbill":626143791,"support_perbill":50550025,"approval":62.6143791,"support":5.0550025},{"time_hours":144,"approval_perbill":625000000,"support_perbill":49999999,"approval":62.5,"support":4.9999999},{"time_hours":145,"approval_perbill":623865110,"support_perbill":49456240,"approval":62.386511,"support":4.945624},{"time_hours":146,"approval_perbill":622739018,"support_perbill":48918640,"approval":62.2739018,"support":4.891864},{"time_hours":147,"approval_perbill":621621621,"support_perbill":48387096,"approval":62.1621621,"support":4.8387096},{"time_hours":148,"approval_perbill":620512821,"support_perbill":47861506,"approval":62.0512821,"support":4.7861506},{"time_hours":149,"approval_perbill":619412516,"support_perbill":47341772,"approval":61.9412516,"support":4.7341772},{"time_hours":150,"approval_perbill":618320611,"support_perbill":46827794,"approval":61.8320611,"support":4.6827794},{"time_hours":151,"approval_perbill":617237009,"support_perbill":46319479,"approval":61.7237009,"support":4.6319479},{"time_hours":152,"approval_perbill":616161616,"support_perbill":45816732,"approval":61.6161616,"support":4.5816732},{"time_hours":153,"approval_perbill":615094340,"support_perbill":45319464,"approval":61.509434,"support":4.5319464},{"time_hours":154,"approval_perbill":614035088,"support_perbill":44827585,"approval":61.4035088,"support":4.4827585},{"time_hours":155,"approval_perbill":612983770,"support_perbill":44341009,"approval":61.298377,"support":4.4341009},{"time_hours":156,"approval_perbill":611940298,"support_perbill":43859648,"approval":61.1940298,"support":4.3859648},{"time_hours":157,"approval_perbill":610904585,"support_perbill":43383422,"approval":61.0904585,"support":4.3383422},{"time_hours":158,"approval_perbill":609876543,"support_perbill":42912246,"approval":60.9876543,"support":4.2912246},{"time_hours":159,"approval_perbill":608856089,"support_perbill":42446042,"approval":60.8856089,"support":4.2446042},{"time_hours":160,"approval_perbill":607843137,"support_perbill":41984732,"approval":60.7843137,"support":4.1984732},{"time_hours":161,"approval_perbill":606837607,"support_perbill":41528238,"approval":60.6837607,"support":4.1528238},{"time_hours":162,"approval_perbill":605839416,"support_perbill":41076486,"approval":60.5839416,"support":4.1076486},{"time_hours":163,"approval_perbill":604848485,"support_perbill":40629403,"approval":60.4848485,"support":4.0629403},{"time_hours":164,"approval_perbill":603864734,"support_perbill":40186915,"approval":60.3864734,"support":4.0186915},{"time_hours":165,"approval_perbill":602888087,"support_perbill":39748953,"approval":60.2888087,"support":3.9748953},{"time_hours":166,"approval_perbill":601918465,"support_perbill":39315448,"approval":60.1918465,"support":3.9315448},{"time_hours":167,"approval_perbill":600955794,"support_perbill":38886332,"approval":60.0955794,"support":3.8886332},{"time_hours":168,"approval_perbill":600000000,"support_perbill":38461538,"approval":60,"support":3.8461538},{"time_hours":169,"approval_perbill":599051008,"support_perbill":38041002,"approval":59.9051008,"support":3.8041002},{"time_hours":170,"approval_perbill":598108747,"support_perbill":37624659,"approval":59.8108747,"support":3.7624659},{"time_hours":171,"approval_perbill":597173145,"support_perbill":37212448,"approval":59.7173145,"support":3.7212448},{"time_hours":172,"approval_perbill":596244131,"support_perbill":36804308,"approval":59.6244131,"support":3.6804308},{"time_hours":173,"approval_perbill":595321637,"support_perbill":36400178,"approval":59.5321637,"support":3.6400178},{"time_hours":174,"approval_perbill":594405594,"support_perbill":35999999,"approval":59.4405594,"support":3.5999999},{"time_hours":175,"approval_perbill":593495935,"support_perbill":35603714,"approval":59.3495935,"support":3.5603714},{"time_hours":176,"approval_perbill":592592593,"support_perbill":35211267,"approval":59.2592593,"support":3.5211267},{"time_hours":177,"approval_perbill":591695502,"support_perbill":34822601,"approval":59.1695502,"support":3.4822601},{"time_hours":178,"approval_perbill":590804598,"support_perbill":34437663,"approval":59.0804598,"support":3.4437663},{"time_hours":179,"approval_perbill":589919817,"support_perbill":34056398,"approval":58.9919817,"support":3.4056398},{"time_hours":180,"approval_perbill":589041096,"support_perbill":33678756,"approval":58.9041096,"support":3.3678756},{"time_hours":181,"approval_perbill":588168373,"support_perbill":33304683,"approval":58.8168373,"support":3.3304683},{"time_hours":182,"approval_perbill":587301587,"support_perbill":32934131,"approval":58.7301587,"support":3.2934131},{"time_hours":183,"approval_perbill":586440678,"support_perbill":32567049,"approval":58.6440678,"support":3.2567049},{"time_hours":184,"approval_perbill":585585585,"support_perbill":32203389,"approval":58.5585585,"support":3.2203389},{"time_hours":185,"approval_perbill":584736251,"support_perbill":31843103,"approval":58.4736251,"support":3.1843103},{"time_hours":186,"approval_perbill":583892617,"support_perbill":31486145,"approval":58.3892617,"support":3.1486145},{"time_hours":187,"approval_perbill":583054626,"support_perbill":31132469,"approval":58.3054626,"support":3.1132469},{"time_hours":188,"approval_perbill":582222222,"support_perbill":30782029,"approval":58.2222222,"support":3.0782029},{"time_hours":189,"approval_perbill":581395349,"support_perbill":30434782,"approval":58.1395349,"support":3.0434782},{"time_hours":190,"approval_perbill":580573951,"support_perbill":30090683,"approval":58.0573951,"support":3.0090683},{"time_hours":191,"approval_perbill":579757976,"support_perbill":29749692,"approval":57.9757976,"support":2.9749692},{"time_hours":192,"approval_perbill":578947368,"support_perbill":29411764,"approval":57.8947368,"support":2.9411764},{"time_hours":193,"approval_perbill":578142076,"support_perbill":29076860,"approval":57.8142076,"support":2.907686},{"time_hours":194,"approval_perbill":577342048,"support_perbill":28744938,"approval":57.7342048,"support":2.8744938},{"time_hours":195,"approval_perbill":576547231,"support_perbill":28415961,"approval":57.6547231,"support":2.8415961},{"time_hours":196,"approval_perbill":575757576,"support_perbill":28089887,"approval":57.5757576,"support":2.8089887},{"time_hours":197,"approval_perbill":574973031,"support_perbill":27766679,"approval":57.4973031,"support":2.7766679},{"time_hours":198,"approval_perbill":574193548,"support_perbill":27446300,"approval":57.4193548,"support":2.74463},{"time_hours":199,"approval_perbill":573419078,"support_perbill":27128712,"approval":57.3419078,"support":2.7128712},{"time_hours":200,"approval_perbill":572649572,"support_perbill":26813879,"approval":57.2649572,"support":2.6813879},{"time_hours":201,"approval_perbill":571884984,"support_perbill":26501766,"approval":57.1884984,"support":2.6501766},{"time_hours":202,"approval_perbill":571125265,"support_perbill":26192337,"approval":57.1125265,"support":2.6192337},{"time_hours":203,"approval_perbill":570370370,"support_perbill":25885558,"approval":57.037037,"support":2.5885558},{"time_hours":204,"approval_perbill":569620253,"support_perbill":25581395,"approval":56.9620253,"support":2.5581395},{"time_hours":205,"approval_perbill":568874868,"support_perbill":25279814,"approval":56.8874868,"support":2.5279814},{"time_hours":206,"approval_perbill":568134172,"support_perbill":24980783,"approval":56.8134172,"support":2.4980783},{"time_hours":207,"approval_perbill":567398119,"support_perbill":24684270,"approval":56.7398119,"support":2.468427},{"time_hours":208,"approval_perbill":566666666,"support_perbill":24390243,"approval":56.6666666,"support":2.4390243},{"time_hours":209,"approval_perbill":565939771,"support_perbill":24098671,"approval":56.5939771,"support":2.4098671},{"time_hours":210,"approval_perbill":565217391,"support_perbill":23809523,"approval":56.5217391,"support":2.3809523},{"time_hours":211,"approval_perbill":564499484,"support_perbill":23522769,"approval":56.4499484,"support":2.3522769},{"time_hours":212,"approval_perbill":563786008,"support_perbill":23238380,"approval":56.3786008,"support":2.323838},{"time_hours":213,"approval_perbill":563076923,"support_perbill":22956326,"approval":56.3076923,"support":2.2956326},{"time_hours":214,"approval_perbill":562372188,"support_perbill":22676579,"approval":56.2372188,"support":2.2676579},{"time_hours":215,"approval_perbill":561671763,"support_perbill":22399111,"approval":56.1671763,"support":2.2399111},{"time_hours":216,"approval_perbill":560975610,"support_perbill":22123893,"approval":56.097561,"support":2.2123893},{"time_hours":217,"approval_perbill":560283688,"support_perbill":21850899,"approval":56.0283688,"support":2.1850899},{"time_hours":218,"approval_perbill":559595959,"support_perbill":21580102,"approval":55.9595959,"support":2.1580102},{"time_hours":219,"approval_perbill":558912386,"support_perbill":21311475,"approval":55.8912386,"support":2.1311475},{"time_hours":220,"approval_perbill":558232931,"support_perbill":21044992,"approval":55.8232931,"support":2.1044992},{"time_hours":221,"approval_perbill":557557557,"support_perbill":20780628,"approval":55.7557557,"support":2.0780628},{"time_hours":222,"approval_perbill":556886227,"support_perbill":20518358,"approval":55.6886227,"support":2.0518358},{"time_hours":223,"approval_perbill":556218905,"support_perbill":20258156,"approval":55.6218905,"support":2.0258156},{"time_hours":224,"approval_perbill":555555555,"support_perbill":19999999,"approval":55.5555555,"support":1.9999999},{"time_hours":225,"approval_perbill":554896142,"support_perbill":19743863,"approval":55.4896142,"support":1.9743863},{"time_hours":226,"approval_perbill":554240631,"support_perbill":19489723,"approval":55.4240631,"support":1.9489723},{"time_hours":227,"approval_perbill":553588987,"support_perbill":19237556,"approval":55.3588987,"support":1.9237556},{"time_hours":228,"approval_perbill":552941176,"support_perbill":18987341,"approval":55.2941176,"support":1.8987341},{"time_hours":229,"approval_perbill":552297165,"support_perbill":18739053,"approval":55.2297165,"support":1.8739053},{"time_hours":230,"approval_perbill":551656920,"support_perbill":18492672,"approval":55.165692,"support":1.8492672},{"time_hours":231,"approval_perbill":551020408,"support_perbill":18248174,"approval":55.1020408,"support":1.8248174},{"time_hours":232,"approval_perbill":550387597,"support_perbill":18005539,"approval":55.0387597,"support":1.8005539},{"time_hours":233,"approval_perbill":549758454,"support_perbill":17764746,"approval":54.9758454,"support":1.7764746},{"time_hours":234,"approval_perbill":549132948,"support_perbill":17525772,"approval":54.9132948,"support":1.7525772},{"time_hours":235,"approval_perbill":548511047,"support_perbill":17288599,"approval":54.8511047,"support":1.7288599},{"time_hours":236,"approval_perbill":547892720,"support_perbill":17053205,"approval":54.789272,"support":1.7053205},{"time_hours":237,"approval_perbill":547277937,"support_perbill":16819571,"approval":54.7277937,"support":1.6819571},{"time_hours":238,"approval_perbill":546666666,"support_perbill":16587677,"approval":54.6666666,"support":1.6587677},{"time_hours":239,"approval_perbill":546058879,"support_perbill":16357503,"approval":54.6058879,"support":1.6357503},{"time_hours":240,"approval_perbill":545454545,"support_perbill":16129031,"approval":54.5454545,"support":1.6129031},{"time_hours":241,"approval_perbill":544853635,"support_perbill":15902242,"approval":54.4853635,"support":1.5902242},{"time_hours":242,"approval_perbill":544256120,"support_perbill":15677117,"approval":54.425612,"support":1.5677117},{"time_hours":243,"approval_perbill":543661971,"support_perbill":15453638,"approval":54.3661971,"support":1.5453638},{"time_hours":244,"approval_perbill":543071161,"support_perbill":15231787,"approval":54.3071161,"support":1.5231787},{"time_hours":245,"approval_perbill":542483660,"support_perbill":15011547,"approval":54.248366,"support":1.5011547},{"time_hours":246,"approval_perbill":541899441,"support_perbill":14792899,"approval":54.1899441,"support":1.4792899},{"time_hours":247,"approval_perbill":541318477,"support_perbill":14575826,"approval":54.1318477,"support":1.4575826},{"time_hours":248,"approval_perbill":540740740,"support_perbill":14360312,"approval":54.074074,"support":1.4360312},{"time_hours":249,"approval_perbill":540166205,"support_perbill":14146341,"approval":54.0166205,"support":1.4146341},{"time_hours":250,"approval_perbill":539594843,"support_perbill":13933894,"approval":53.9594843,"support":1.3933894},{"time_hours":251,"approval_perbill":539026630,"support_perbill":13722957,"approval":53.902663,"support":1.3722957},{"time_hours":252,"approval_perbill":538461538,"support_perbill":13513513,"approval":53.8461538,"support":1.3513513},{"time_hours":253,"approval_perbill":537899543,"support_perbill":13305546,"approval":53.7899543,"support":1.3305546},{"time_hours":254,"approval_perbill":537340619,"support_perbill":13099041,"approval":53.7340619,"support":1.3099041},{"time_hours":255,"approval_perbill":536784741,"support_perbill":12893982,"approval":53.6784741,"support":1.2893982},{"time_hours":256,"approval_perbill":536231884,"support_perbill":12690355,"approval":53.6231884,"support":1.2690355},{"time_hours":257,"approval_perbill":535682023,"support_perbill":12488143,"approval":53.5682023,"support":1.2488143},{"time_hours":258,"approval_perbill":535135135,"support_perbill":12287334,"approval":53.5135135,"support":1.2287334},{"time_hours":259,"approval_perbill":534591195,"support_perbill":12087911,"approval":53.4591195,"support":1.2087911},{"time_hours":260,"approval_perbill":534050179,"support_perbill":11889861,"approval":53.4050179,"support":1.1889861},{"time_hours":261,"approval_perbill":533512064,"support_perbill":11693170,"approval":53.3512064,"support":1.169317},{"time_hours":262,"approval_perbill":532976827,"support_perbill":11497824,"approval":53.2976827,"support":1.1497824},{"time_hours":263,"approval_perbill":532444444,"support_perbill":11303808,"approval":53.2444444,"support":1.1303808},{"time_hours":264,"approval_perbill":531914893,"support_perbill":11111110,"approval":53.1914893,"support":1.111111},{"time_hours":265,"approval_perbill":531388152,"support_perbill":10919716,"approval":53.1388152,"support":1.0919716},{"time_hours":266,"approval_perbill":530864197,"support_perbill":10729613,"approval":53.0864197,"support":1.0729613},{"time_hours":267,"approval_perbill":530343007,"support_perbill":10540787,"approval":53.0343007,"support":1.0540787},{"time_hours":268,"approval_perbill":529824561,"support_perbill":10353227,"approval":52.9824561,"support":1.0353227},{"time_hours":269,"approval_perbill":529308836,"support_perbill":10166919,"approval":52.9308836,"support":1.0166919},{"time_hours":270,"approval_perbill":528795811,"support_perbill":9981850,"approval":52.8795811,"support":0.998185},{"time_hours":271,"approval_perbill":528285465,"support_perbill":9798009,"approval":52.8285465,"support":0.9798009},{"time_hours":272,"approval_perbill":527777777,"support_perbill":9615384,"approval":52.7777777,"support":0.9615384},{"time_hours":273,"approval_perbill":527272727,"support_perbill":9433961,"approval":52.7272727,"support":0.9433961},{"time_hours":274,"approval_perbill":526770293,"support_perbill":9253730,"approval":52.6770293,"support":0.925373},{"time_hours":275,"approval_perbill":526270456,"support_perbill":9074679,"approval":52.6270456,"support":0.9074679},{"time_hours":276,"approval_perbill":525773195,"support_perbill":8896796,"approval":52.5773195,"support":0.8896796},{"time_hours":277,"approval_perbill":525278491,"support_perbill":8720070,"approval":52.5278491,"support":0.872007},{"time_hours":278,"approval_perbill":524786324,"support_perbill":8544489,"approval":52.4786324,"support":0.8544489},{"time_hours":279,"approval_perbill":524296675,"support_perbill":8370043,"approval":52.4296675,"support":0.8370043},{"time_hours":280,"approval_perbill":523809523,"support_perbill":8196720,"approval":52.3809523,"support":0.819672},{"time_hours":281,"approval_perbill":523324851,"support_perbill":8024510,"approval":52.3324851,"support":0.802451},{"time_hours":282,"approval_perbill":522842639,"support_perbill":7853402,"approval":52.2842639,"support":0.7853402},{"time_hours":283,"approval_perbill":522362869,"support_perbill":7683386,"approval":52.2362869,"support":0.7683386},{"time_hours":284,"approval_perbill":521885521,"support_perbill":7514450,"approval":52.1885521,"support":0.751445},{"time_hours":285,"approval_perbill":521410579,"support_perbill":7346585,"approval":52.1410579,"support":0.7346585},{"time_hours":286,"approval_perbill":520938023,"support_perbill":7179781,"approval":52.0938023,"support":0.7179781},{"time_hours":287,"approval_perbill":520467836,"support_perbill":7014027,"approval":52.0467836,"support":0.7014027},{"time_hours":288,"approval_perbill":519999999,"support_perbill":6849314,"approval":51.9999999,"support":0.6849314},{"time_hours":289,"approval_perbill":519534497,"support_perbill":6685632,"approval":51.9534497,"support":0.6685632},{"time_hours":290,"approval_perbill":519071310,"support_perbill":6522971,"approval":51.907131,"support":0.6522971},{"time_hours":291,"approval_perbill":518610421,"support_perbill":6361322,"approval":51.8610421,"support":0.6361322},{"time_hours":292,"approval_perbill":518151815,"support_perbill":6200676,"approval":51.8151815,"support":0.6200676},{"time_hours":293,"approval_perbill":517695473,"support_perbill":6041022,"approval":51.7695473,"support":0.6041022},{"time_hours":294,"approval_perbill":517241379,"support_perbill":5882352,"approval":51.7241379,"support":0.5882352},{"time_hours":295,"approval_perbill":516789516,"support_perbill":5724657,"approval":51.6789516,"support":0.5724657},{"time_hours":296,"approval_perbill":516339869,"support_perbill":5567928,"approval":51.6339869,"support":0.5567928},{"time_hours":297,"approval_perbill":515892420,"support_perbill":5412156,"approval":51.589242,"support":0.5412156},{"time_hours":298,"approval_perbill":515447154,"support_perbill":5257332,"approval":51.5447154,"support":0.5257332},{"time_hours":299,"approval_perbill":515004055,"support_perbill":5103447,"approval":51.5004055,"support":0.5103447},{"time_hours":300,"approval_perbill":514563106,"support_perbill":4950494,"approval":51.4563106,"support":0.4950494},{"time_hours":301,"approval_perbill":514124293,"support_perbill":4798464,"approval":51.4124293,"support":0.4798464},{"time_hours":302,"approval_perbill":513687600,"support_perbill":4647347,"approval":51.36876,"support":0.4647347},{"time_hours":303,"approval_perbill":513253011,"support_perbill":4497137,"approval":51.3253011,"support":0.4497137},{"time_hours":304,"approval_perbill":512820512,"support_perbill":4347825,"approval":51.2820512,"support":0.4347825},{"time_hours":305,"approval_perbill":512390087,"support_perbill":4199403,"approval":51.2390087,"support":0.4199403},{"time_hours":306,"approval_perbill":511961722,"support_perbill":4051863,"approval":51.1961722,"support":0.4051863},{"time_hours":307,"approval_perbill":511535401,"support_perbill":3905197,"approval":51.1535401,"support":0.3905197},{"time_hours":308,"approval_perbill":511111111,"support_perbill":3759398,"approval":51.1111111,"support":0.3759398},{"time_hours":309,"approval_perbill":510688835,"support_perbill":3614457,"approval":51.0688835,"support":0.3614457},{"time_hours":310,"approval_perbill":510268562,"support_perbill":3470368,"approval":51.0268562,"support":0.3470368},{"time_hours":311,"approval_perbill":509850275,"support_perbill":3327122,"approval":50.9850275,"support":0.3327122},{"time_hours":312,"approval_perbill":509433962,"support_perbill":3184712,"approval":50.9433962,"support":0.3184712},{"time_hours":313,"approval_perbill":509019607,"support_perbill":3043132,"approval":50.9019607,"support":0.3043132},{"time_hours":314,"approval_perbill":508607198,"support_perbill":2902374,"approval":50.8607198,"support":0.2902374},{"time_hours":315,"approval_perbill":508196721,"support_perbill":2762430,"approval":50.8196721,"support":0.276243},{"time_hours":316,"approval_perbill":507788161,"support_perbill":2623294,"approval":50.7788161,"support":0.2623294},{"time_hours":317,"approval_perbill":507381507,"support_perbill":2484959,"approval":50.7381507,"support":0.2484959},{"time_hours":318,"approval_perbill":506976744,"support_perbill":2347417,"approval":50.6976744,"support":0.2347417},{"time_hours":319,"approval_perbill":506573859,"support_perbill":2210662,"approval":50.6573859,"support":0.2210662},{"time_hours":320,"approval_perbill":506172839,"support_perbill":2074688,"approval":50.6172839,"support":0.2074688},{"time_hours":321,"approval_perbill":505773671,"support_perbill":1939487,"approval":50.5773671,"support":0.1939487},{"time_hours":322,"approval_perbill":505376343,"support_perbill":1805053,"approval":50.5376343,"support":0.1805053},{"time_hours":323,"approval_perbill":504980842,"support_perbill":1671380,"approval":50.4980842,"support":0.167138},{"time_hours":324,"approval_perbill":504587155,"support_perbill":1538461,"approval":50.4587155,"support":0.1538461},{"time_hours":325,"approval_perbill":504195270,"support_perbill":1406289,"approval":50.419527,"support":0.1406289},{"time_hours":326,"approval_perbill":503805174,"support_perbill":1274859,"approval":50.3805174,"support":0.1274859},{"time_hours":327,"approval_perbill":503416856,"support_perbill":1144164,"approval":50.3416856,"support":0.1144164},{"time_hours":328,"approval_perbill":503030302,"support_perbill":1014198,"approval":50.3030302,"support":0.1014198},{"time_hours":329,"approval_perbill":502645502,"support_perbill":884955,"approval":50.2645502,"support":0.0884955},{"time_hours":330,"approval_perbill":502262443,"support_perbill":756429,"approval":50.2262443,"support":0.0756429},{"time_hours":331,"approval_perbill":501881113,"support_perbill":628614,"approval":50.1881113,"support":0.0628614},{"time_hours":332,"approval_perbill":501501501,"support_perbill":501504,"approval":50.1501501,"support":0.0501504},{"time_hours":333,"approval_perbill":501123595,"support_perbill":375093,"approval":50.1123595,"support":0.0375093},{"time_hours":334,"approval_perbill":500747383,"support_perbill":249376,"approval":50.0747383,"support":0.0249376},{"time_hours":335,"approval_perbill":500372855,"support_perbill":124346,"approval":50.0372855,"support":0.0124346},{"time_hours":336,"approval_perbill":499999999,"support_perbill":0,"approval":49.9999999,"support":0}]')},51953:p=>{"use strict";p.exports=JSON.parse('[{"Time (Hours)":0,"Approval (perbill)":1000000000,"Support (perbill)":500000026,"Approval":100,"Support":50.0000026},{"Time (Hours)":1,"Approval (perbill)":997549020,"Support (perbill)":418401359,"Approval":99.754902,"Support":41.8401359},{"Time (Hours)":2,"Approval (perbill)":995098040,"Support (perbill)":359397443,"Approval":99.509804,"Support":35.9397443},{"Time (Hours)":3,"Approval (perbill)":992647060,"Support (perbill)":314744813,"Approval":99.264706,"Support":31.4744813},{"Time (Hours)":4,"Approval (perbill)":990196080,"Support (perbill)":279775293,"Approval":99.019608,"Support":27.9775293},{"Time (Hours)":5,"Approval (perbill)":987745099,"Support (perbill)":251647242,"Approval":98.7745099,"Support":25.1647242},{"Time (Hours)":6,"Approval (perbill)":985294119,"Support (perbill)":228531862,"Approval":98.5294119,"Support":22.8531862},{"Time (Hours)":7,"Approval (perbill)":982843138,"Support (perbill)":209198815,"Approval":98.2843138,"Support":20.9198815},{"Time (Hours)":8,"Approval (perbill)":980392158,"Support (perbill)":192789972,"Approval":98.0392158,"Support":19.2789972},{"Time (Hours)":9,"Approval (perbill)":977941177,"Support (perbill)":178688524,"Approval":97.7941177,"Support":17.8688524},{"Time (Hours)":10,"Approval (perbill)":975490197,"Support (perbill)":166439756,"Approval":97.5490197,"Support":16.6439756},{"Time (Hours)":11,"Approval (perbill)":973039216,"Support (perbill)":155701053,"Approval":97.3039216,"Support":15.5701053},{"Time (Hours)":12,"Approval (perbill)":970588236,"Support (perbill)":146209386,"Approval":97.0588236,"Support":14.6209386},{"Time (Hours)":13,"Approval (perbill)":968137256,"Support (perbill)":137759452,"Approval":96.8137256,"Support":13.7759452},{"Time (Hours)":14,"Approval (perbill)":965686276,"Support (perbill)":130188679,"Approval":96.5686276,"Support":13.0188679},{"Time (Hours)":15,"Approval (perbill)":963235295,"Support (perbill)":123366639,"Approval":96.3235295,"Support":12.3366639},{"Time (Hours)":16,"Approval (perbill)":960784315,"Support (perbill)":117187499,"Approval":96.0784315,"Support":11.7187499},{"Time (Hours)":17,"Approval (perbill)":958333334,"Support (perbill)":111564465,"Approval":95.8333334,"Support":11.1564465},{"Time (Hours)":18,"Approval (perbill)":955882354,"Support (perbill)":106425701,"Approval":95.5882354,"Support":10.6425701},{"Time (Hours)":19,"Approval (perbill)":953431373,"Support (perbill)":101711228,"Approval":95.3431373,"Support":10.1711228},{"Time (Hours)":20,"Approval (perbill)":950980393,"Support (perbill)":97370582,"Approval":95.0980393,"Support":9.7370582},{"Time (Hours)":21,"Approval (perbill)":948529412,"Support (perbill)":93360994,"Approval":94.8529412,"Support":9.3360994},{"Time (Hours)":22,"Approval (perbill)":946078432,"Support (perbill)":89645982,"Approval":94.6078432,"Support":8.9645982},{"Time (Hours)":23,"Approval (perbill)":943627452,"Support (perbill)":86194234,"Approval":94.3627452,"Support":8.6194234},{"Time (Hours)":24,"Approval (perbill)":941176471,"Support (perbill)":82978722,"Approval":94.1176471,"Support":8.2978722},{"Time (Hours)":25,"Approval (perbill)":938725491,"Support (perbill)":79975997,"Approval":93.8725491,"Support":7.9975997},{"Time (Hours)":26,"Approval (perbill)":936274511,"Support (perbill)":77165614,"Approval":93.6274511,"Support":7.7165614},{"Time (Hours)":27,"Approval (perbill)":933823531,"Support (perbill)":74529666,"Approval":93.3823531,"Support":7.4529666},{"Time (Hours)":28,"Approval (perbill)":931372550,"Support (perbill)":72052400,"Approval":93.137255,"Support":7.20524},{"Time (Hours)":29,"Approval (perbill)":928921570,"Support (perbill)":69719908,"Approval":92.892157,"Support":6.9719908},{"Time (Hours)":30,"Approval (perbill)":926470589,"Support (perbill)":67519857,"Approval":92.6470589,"Support":6.7519857},{"Time (Hours)":31,"Approval (perbill)":924019609,"Support (perbill)":65441280,"Approval":92.4019609,"Support":6.544128},{"Time (Hours)":32,"Approval (perbill)":921568628,"Support (perbill)":63474386,"Approval":92.1568628,"Support":6.3474386},{"Time (Hours)":33,"Approval (perbill)":919117648,"Support (perbill)":61610409,"Approval":91.9117648,"Support":6.1610409},{"Time (Hours)":34,"Approval (perbill)":916666667,"Support (perbill)":59841478,"Approval":91.6666667,"Support":5.9841478},{"Time (Hours)":35,"Approval (perbill)":914215687,"Support (perbill)":58160504,"Approval":91.4215687,"Support":5.8160504},{"Time (Hours)":36,"Approval (perbill)":911764706,"Support (perbill)":56561084,"Approval":91.1764706,"Support":5.6561084},{"Time (Hours)":37,"Approval (perbill)":909313726,"Support (perbill)":55037426,"Approval":90.9313726,"Support":5.5037426},{"Time (Hours)":38,"Approval (perbill)":906862746,"Support (perbill)":53584271,"Approval":90.6862746,"Support":5.3584271},{"Time (Hours)":39,"Approval (perbill)":904411766,"Support (perbill)":52196835,"Approval":90.4411766,"Support":5.2196835},{"Time (Hours)":40,"Approval (perbill)":901960785,"Support (perbill)":50870759,"Approval":90.1960785,"Support":5.0870759},{"Time (Hours)":41,"Approval (perbill)":899509805,"Support (perbill)":49602061,"Approval":89.9509805,"Support":4.9602061},{"Time (Hours)":42,"Approval (perbill)":897058824,"Support (perbill)":48387095,"Approval":89.7058824,"Support":4.8387095},{"Time (Hours)":43,"Approval (perbill)":894607844,"Support (perbill)":47222519,"Approval":89.4607844,"Support":4.7222519},{"Time (Hours)":44,"Approval (perbill)":892156864,"Support (perbill)":46105262,"Approval":89.2156864,"Support":4.6105262},{"Time (Hours)":45,"Approval (perbill)":889705883,"Support (perbill)":45032496,"Approval":88.9705883,"Support":4.5032496},{"Time (Hours)":46,"Approval (perbill)":887254903,"Support (perbill)":44001617,"Approval":88.7254903,"Support":4.4001617},{"Time (Hours)":47,"Approval (perbill)":884803922,"Support (perbill)":43010218,"Approval":88.4803922,"Support":4.3010218},{"Time (Hours)":48,"Approval (perbill)":882352942,"Support (perbill)":42056074,"Approval":88.2352942,"Support":4.2056074},{"Time (Hours)":49,"Approval (perbill)":879901962,"Support (perbill)":41137122,"Approval":87.9901962,"Support":4.1137122},{"Time (Hours)":50,"Approval (perbill)":877450982,"Support (perbill)":40251453,"Approval":87.7450982,"Support":4.0251453},{"Time (Hours)":51,"Approval (perbill)":875000001,"Support (perbill)":39397289,"Approval":87.5000001,"Support":3.9397289},{"Time (Hours)":52,"Approval (perbill)":872549021,"Support (perbill)":38572980,"Approval":87.2549021,"Support":3.857298},{"Time (Hours)":53,"Approval (perbill)":870098040,"Support (perbill)":37776985,"Approval":87.009804,"Support":3.7776985},{"Time (Hours)":54,"Approval (perbill)":867647060,"Support (perbill)":37007873,"Approval":86.764706,"Support":3.7007873},{"Time (Hours)":55,"Approval (perbill)":865196079,"Support (perbill)":36264302,"Approval":86.5196079,"Support":3.6264302},{"Time (Hours)":56,"Approval (perbill)":862745099,"Support (perbill)":35545023,"Approval":86.2745099,"Support":3.5545023},{"Time (Hours)":57,"Approval (perbill)":860294118,"Support (perbill)":34848862,"Approval":86.0294118,"Support":3.4848862},{"Time (Hours)":58,"Approval (perbill)":857843138,"Support (perbill)":34174724,"Approval":85.7843138,"Support":3.4174724},{"Time (Hours)":59,"Approval (perbill)":855392157,"Support (perbill)":33521580,"Approval":85.5392157,"Support":3.352158},{"Time (Hours)":60,"Approval (perbill)":852941177,"Support (perbill)":32888464,"Approval":85.2941177,"Support":3.2888464},{"Time (Hours)":61,"Approval (perbill)":850490197,"Support (perbill)":32274469,"Approval":85.0490197,"Support":3.2274469},{"Time (Hours)":62,"Approval (perbill)":848039217,"Support (perbill)":31678741,"Approval":84.8039217,"Support":3.1678741},{"Time (Hours)":63,"Approval (perbill)":845588236,"Support (perbill)":31100477,"Approval":84.5588236,"Support":3.1100477},{"Time (Hours)":64,"Approval (perbill)":843137256,"Support (perbill)":30538921,"Approval":84.3137256,"Support":3.0538921},{"Time (Hours)":65,"Approval (perbill)":840686276,"Support (perbill)":29993358,"Approval":84.0686276,"Support":2.9993358},{"Time (Hours)":66,"Approval (perbill)":838235295,"Support (perbill)":29463116,"Approval":83.8235295,"Support":2.9463116},{"Time (Hours)":67,"Approval (perbill)":835784315,"Support (perbill)":28947556,"Approval":83.5784315,"Support":2.8947556},{"Time (Hours)":68,"Approval (perbill)":833333334,"Support (perbill)":28446079,"Approval":83.3333334,"Support":2.8446079},{"Time (Hours)":69,"Approval (perbill)":830882354,"Support (perbill)":27958114,"Approval":83.0882354,"Support":2.7958114},{"Time (Hours)":70,"Approval (perbill)":828431373,"Support (perbill)":27483123,"Approval":82.8431373,"Support":2.7483123},{"Time (Hours)":71,"Approval (perbill)":825980393,"Support (perbill)":27020596,"Approval":82.5980393,"Support":2.7020596},{"Time (Hours)":72,"Approval (perbill)":823529412,"Support (perbill)":26570047,"Approval":82.3529412,"Support":2.6570047},{"Time (Hours)":73,"Approval (perbill)":821078432,"Support (perbill)":26131019,"Approval":82.1078432,"Support":2.6131019},{"Time (Hours)":74,"Approval (perbill)":818627452,"Support (perbill)":25703073,"Approval":81.8627452,"Support":2.5703073},{"Time (Hours)":75,"Approval (perbill)":816176472,"Support (perbill)":25285796,"Approval":81.6176472,"Support":2.5285796},{"Time (Hours)":76,"Approval (perbill)":813725491,"Support (perbill)":24878795,"Approval":81.3725491,"Support":2.4878795},{"Time (Hours)":77,"Approval (perbill)":811274511,"Support (perbill)":24481693,"Approval":81.1274511,"Support":2.4481693},{"Time (Hours)":78,"Approval (perbill)":808823530,"Support (perbill)":24094134,"Approval":80.882353,"Support":2.4094134},{"Time (Hours)":79,"Approval (perbill)":806372550,"Support (perbill)":23715779,"Approval":80.637255,"Support":2.3715779},{"Time (Hours)":80,"Approval (perbill)":803921569,"Support (perbill)":23346303,"Approval":80.3921569,"Support":2.3346303},{"Time (Hours)":81,"Approval (perbill)":801470589,"Support (perbill)":22985397,"Approval":80.1470589,"Support":2.2985397},{"Time (Hours)":82,"Approval (perbill)":799019608,"Support (perbill)":22632766,"Approval":79.9019608,"Support":2.2632766},{"Time (Hours)":83,"Approval (perbill)":796568628,"Support (perbill)":22288130,"Approval":79.6568628,"Support":2.228813},{"Time (Hours)":84,"Approval (perbill)":794117648,"Support (perbill)":21951219,"Approval":79.4117648,"Support":2.1951219},{"Time (Hours)":85,"Approval (perbill)":791666668,"Support (perbill)":21621776,"Approval":79.1666668,"Support":2.1621776},{"Time (Hours)":86,"Approval (perbill)":789215688,"Support (perbill)":21299556,"Approval":78.9215688,"Support":2.1299556},{"Time (Hours)":87,"Approval (perbill)":786764707,"Support (perbill)":20984324,"Approval":78.6764707,"Support":2.0984324},{"Time (Hours)":88,"Approval (perbill)":784313727,"Support (perbill)":20675855,"Approval":78.4313727,"Support":2.0675855},{"Time (Hours)":89,"Approval (perbill)":781862746,"Support (perbill)":20373934,"Approval":78.1862746,"Support":2.0373934},{"Time (Hours)":90,"Approval (perbill)":779411766,"Support (perbill)":20078354,"Approval":77.9411766,"Support":2.0078354},{"Time (Hours)":91,"Approval (perbill)":776960785,"Support (perbill)":19788917,"Approval":77.6960785,"Support":1.9788917},{"Time (Hours)":92,"Approval (perbill)":774509805,"Support (perbill)":19505435,"Approval":77.4509805,"Support":1.9505435},{"Time (Hours)":93,"Approval (perbill)":772058824,"Support (perbill)":19227725,"Approval":77.2058824,"Support":1.9227725},{"Time (Hours)":94,"Approval (perbill)":769607844,"Support (perbill)":18955613,"Approval":76.9607844,"Support":1.8955613},{"Time (Hours)":95,"Approval (perbill)":767156863,"Support (perbill)":18688931,"Approval":76.7156863,"Support":1.8688931},{"Time (Hours)":96,"Approval (perbill)":764705883,"Support (perbill)":18427518,"Approval":76.4705883,"Support":1.8427518},{"Time (Hours)":97,"Approval (perbill)":762254903,"Support (perbill)":18171219,"Approval":76.2254903,"Support":1.8171219},{"Time (Hours)":98,"Approval (perbill)":759803923,"Support (perbill)":17919887,"Approval":75.9803923,"Support":1.7919887},{"Time (Hours)":99,"Approval (perbill)":757352942,"Support (perbill)":17673377,"Approval":75.7352942,"Support":1.7673377},{"Time (Hours)":100,"Approval (perbill)":754901962,"Support (perbill)":17431553,"Approval":75.4901962,"Support":1.7431553},{"Time (Hours)":101,"Approval (perbill)":752450981,"Support (perbill)":17194282,"Approval":75.2450981,"Support":1.7194282},{"Time (Hours)":102,"Approval (perbill)":750000001,"Support (perbill)":16961437,"Approval":75.0000001,"Support":1.6961437},{"Time (Hours)":103,"Approval (perbill)":747549020,"Support (perbill)":16732895,"Approval":74.754902,"Support":1.6732895},{"Time (Hours)":104,"Approval (perbill)":745098040,"Support (perbill)":16508538,"Approval":74.509804,"Support":1.6508538},{"Time (Hours)":105,"Approval (perbill)":742647059,"Support (perbill)":16288252,"Approval":74.2647059,"Support":1.6288252},{"Time (Hours)":106,"Approval (perbill)":740196079,"Support (perbill)":16071927,"Approval":74.0196079,"Support":1.6071927},{"Time (Hours)":107,"Approval (perbill)":737745099,"Support (perbill)":15859457,"Approval":73.7745099,"Support":1.5859457},{"Time (Hours)":108,"Approval (perbill)":735294118,"Support (perbill)":15650741,"Approval":73.5294118,"Support":1.5650741},{"Time (Hours)":109,"Approval (perbill)":732843138,"Support (perbill)":15445679,"Approval":73.2843138,"Support":1.5445679},{"Time (Hours)":110,"Approval (perbill)":730392158,"Support (perbill)":15244176,"Approval":73.0392158,"Support":1.5244176},{"Time (Hours)":111,"Approval (perbill)":727941178,"Support (perbill)":15046141,"Approval":72.7941178,"Support":1.5046141},{"Time (Hours)":112,"Approval (perbill)":725490197,"Support (perbill)":14851485,"Approval":72.5490197,"Support":1.4851485},{"Time (Hours)":113,"Approval (perbill)":723039217,"Support (perbill)":14660121,"Approval":72.3039217,"Support":1.4660121},{"Time (Hours)":114,"Approval (perbill)":720588236,"Support (perbill)":14471968,"Approval":72.0588236,"Support":1.4471968},{"Time (Hours)":115,"Approval (perbill)":718137256,"Support (perbill)":14286945,"Approval":71.8137256,"Support":1.4286945},{"Time (Hours)":116,"Approval (perbill)":715686275,"Support (perbill)":14104975,"Approval":71.5686275,"Support":1.4104975},{"Time (Hours)":117,"Approval (perbill)":713235295,"Support (perbill)":13925982,"Approval":71.3235295,"Support":1.3925982},{"Time (Hours)":118,"Approval (perbill)":710784314,"Support (perbill)":13749894,"Approval":71.0784314,"Support":1.3749894},{"Time (Hours)":119,"Approval (perbill)":708333334,"Support (perbill)":13576642,"Approval":70.8333334,"Support":1.3576642},{"Time (Hours)":120,"Approval (perbill)":705882353,"Support (perbill)":13406156,"Approval":70.5882353,"Support":1.3406156},{"Time (Hours)":121,"Approval (perbill)":703431373,"Support (perbill)":13238372,"Approval":70.3431373,"Support":1.3238372},{"Time (Hours)":122,"Approval (perbill)":700980393,"Support (perbill)":13073226,"Approval":70.0980393,"Support":1.3073226},{"Time (Hours)":123,"Approval (perbill)":698529413,"Support (perbill)":12910655,"Approval":69.8529413,"Support":1.2910655},{"Time (Hours)":124,"Approval (perbill)":696078432,"Support (perbill)":12750601,"Approval":69.6078432,"Support":1.2750601},{"Time (Hours)":125,"Approval (perbill)":693627452,"Support (perbill)":12593005,"Approval":69.3627452,"Support":1.2593005},{"Time (Hours)":126,"Approval (perbill)":691176471,"Support (perbill)":12437810,"Approval":69.1176471,"Support":1.243781},{"Time (Hours)":127,"Approval (perbill)":688725491,"Support (perbill)":12284964,"Approval":68.8725491,"Support":1.2284964},{"Time (Hours)":128,"Approval (perbill)":686274511,"Support (perbill)":12134411,"Approval":68.6274511,"Support":1.2134411},{"Time (Hours)":129,"Approval (perbill)":683823530,"Support (perbill)":11986103,"Approval":68.382353,"Support":1.1986103},{"Time (Hours)":130,"Approval (perbill)":681372550,"Support (perbill)":11839987,"Approval":68.137255,"Support":1.1839987},{"Time (Hours)":131,"Approval (perbill)":678921569,"Support (perbill)":11696017,"Approval":67.8921569,"Support":1.1696017},{"Time (Hours)":132,"Approval (perbill)":676470589,"Support (perbill)":11554145,"Approval":67.6470589,"Support":1.1554145},{"Time (Hours)":133,"Approval (perbill)":674019609,"Support (perbill)":11414326,"Approval":67.4019609,"Support":1.1414326},{"Time (Hours)":134,"Approval (perbill)":671568629,"Support (perbill)":11276516,"Approval":67.1568629,"Support":1.1276516},{"Time (Hours)":135,"Approval (perbill)":669117648,"Support (perbill)":11140671,"Approval":66.9117648,"Support":1.1140671},{"Time (Hours)":136,"Approval (perbill)":666666668,"Support (perbill)":11006750,"Approval":66.6666668,"Support":1.100675},{"Time (Hours)":137,"Approval (perbill)":664215687,"Support (perbill)":10874713,"Approval":66.4215687,"Support":1.0874713},{"Time (Hours)":138,"Approval (perbill)":661764707,"Support (perbill)":10744519,"Approval":66.1764707,"Support":1.0744519},{"Time (Hours)":139,"Approval (perbill)":659313726,"Support (perbill)":10616130,"Approval":65.9313726,"Support":1.061613},{"Time (Hours)":140,"Approval (perbill)":656862746,"Support (perbill)":10489510,"Approval":65.6862746,"Support":1.048951},{"Time (Hours)":141,"Approval (perbill)":654411765,"Support (perbill)":10364622,"Approval":65.4411765,"Support":1.0364622},{"Time (Hours)":142,"Approval (perbill)":651960785,"Support (perbill)":10241430,"Approval":65.1960785,"Support":1.024143},{"Time (Hours)":143,"Approval (perbill)":649509804,"Support (perbill)":10119900,"Approval":64.9509804,"Support":1.01199},{"Time (Hours)":144,"Approval (perbill)":647058824,"Support (perbill)":10000000,"Approval":64.7058824,"Support":1},{"Time (Hours)":145,"Approval (perbill)":644607844,"Support (perbill)":9881695,"Approval":64.4607844,"Support":0.9881695},{"Time (Hours)":146,"Approval (perbill)":642156864,"Support (perbill)":9764955,"Approval":64.2156864,"Support":0.9764955},{"Time (Hours)":147,"Approval (perbill)":639705883,"Support (perbill)":9649749,"Approval":63.9705883,"Support":0.9649749},{"Time (Hours)":148,"Approval (perbill)":637254903,"Support (perbill)":9536047,"Approval":63.7254903,"Support":0.9536047},{"Time (Hours)":149,"Approval (perbill)":634803923,"Support (perbill)":9423820,"Approval":63.4803923,"Support":0.942382},{"Time (Hours)":150,"Approval (perbill)":632352942,"Support (perbill)":9313038,"Approval":63.2352942,"Support":0.9313038},{"Time (Hours)":151,"Approval (perbill)":629901962,"Support (perbill)":9203674,"Approval":62.9901962,"Support":0.9203674},{"Time (Hours)":152,"Approval (perbill)":627450981,"Support (perbill)":9095702,"Approval":62.7450981,"Support":0.9095702},{"Time (Hours)":153,"Approval (perbill)":625000001,"Support (perbill)":8989095,"Approval":62.5000001,"Support":0.8989095},{"Time (Hours)":154,"Approval (perbill)":622549020,"Support (perbill)":8883826,"Approval":62.254902,"Support":0.8883826},{"Time (Hours)":155,"Approval (perbill)":620098040,"Support (perbill)":8779872,"Approval":62.009804,"Support":0.8779872},{"Time (Hours)":156,"Approval (perbill)":617647059,"Support (perbill)":8677207,"Approval":61.7647059,"Support":0.8677207},{"Time (Hours)":157,"Approval (perbill)":615196079,"Support (perbill)":8575808,"Approval":61.5196079,"Support":0.8575808},{"Time (Hours)":158,"Approval (perbill)":612745099,"Support (perbill)":8475652,"Approval":61.2745099,"Support":0.8475652},{"Time (Hours)":159,"Approval (perbill)":610294119,"Support (perbill)":8376715,"Approval":61.0294119,"Support":0.8376715},{"Time (Hours)":160,"Approval (perbill)":607843138,"Support (perbill)":8278976,"Approval":60.7843138,"Support":0.8278976},{"Time (Hours)":161,"Approval (perbill)":605392158,"Support (perbill)":8182413,"Approval":60.5392158,"Support":0.8182413},{"Time (Hours)":162,"Approval (perbill)":602941177,"Support (perbill)":8087005,"Approval":60.2941177,"Support":0.8087005},{"Time (Hours)":163,"Approval (perbill)":600490197,"Support (perbill)":7992731,"Approval":60.0490197,"Support":0.7992731},{"Time (Hours)":164,"Approval (perbill)":598039216,"Support (perbill)":7899571,"Approval":59.8039216,"Support":0.7899571},{"Time (Hours)":165,"Approval (perbill)":595588236,"Support (perbill)":7807506,"Approval":59.5588236,"Support":0.7807506},{"Time (Hours)":166,"Approval (perbill)":593137255,"Support (perbill)":7716516,"Approval":59.3137255,"Support":0.7716516},{"Time (Hours)":167,"Approval (perbill)":590686275,"Support (perbill)":7626583,"Approval":59.0686275,"Support":0.7626583},{"Time (Hours)":168,"Approval (perbill)":588235295,"Support (perbill)":7537688,"Approval":58.8235295,"Support":0.7537688},{"Time (Hours)":169,"Approval (perbill)":585784315,"Support (perbill)":7449814,"Approval":58.5784315,"Support":0.7449814},{"Time (Hours)":170,"Approval (perbill)":583333335,"Support (perbill)":7362942,"Approval":58.3333335,"Support":0.7362942},{"Time (Hours)":171,"Approval (perbill)":580882354,"Support (perbill)":7277057,"Approval":58.0882354,"Support":0.7277057},{"Time (Hours)":172,"Approval (perbill)":578431374,"Support (perbill)":7192141,"Approval":57.8431374,"Support":0.7192141},{"Time (Hours)":173,"Approval (perbill)":575980393,"Support (perbill)":7108178,"Approval":57.5980393,"Support":0.7108178},{"Time (Hours)":174,"Approval (perbill)":573529413,"Support (perbill)":7025151,"Approval":57.3529413,"Support":0.7025151},{"Time (Hours)":175,"Approval (perbill)":571078432,"Support (perbill)":6943047,"Approval":57.1078432,"Support":0.6943047},{"Time (Hours)":176,"Approval (perbill)":568627452,"Support (perbill)":6861848,"Approval":56.8627452,"Support":0.6861848},{"Time (Hours)":177,"Approval (perbill)":566176471,"Support (perbill)":6781540,"Approval":56.6176471,"Support":0.678154},{"Time (Hours)":178,"Approval (perbill)":563725491,"Support (perbill)":6702109,"Approval":56.3725491,"Support":0.6702109},{"Time (Hours)":179,"Approval (perbill)":561274510,"Support (perbill)":6623541,"Approval":56.127451,"Support":0.6623541},{"Time (Hours)":180,"Approval (perbill)":558823530,"Support (perbill)":6545820,"Approval":55.882353,"Support":0.654582},{"Time (Hours)":181,"Approval (perbill)":556372550,"Support (perbill)":6468935,"Approval":55.637255,"Support":0.6468935},{"Time (Hours)":182,"Approval (perbill)":553921570,"Support (perbill)":6392871,"Approval":55.392157,"Support":0.6392871},{"Time (Hours)":183,"Approval (perbill)":551470589,"Support (perbill)":6317615,"Approval":55.1470589,"Support":0.6317615},{"Time (Hours)":184,"Approval (perbill)":549019609,"Support (perbill)":6243154,"Approval":54.9019609,"Support":0.6243154},{"Time (Hours)":185,"Approval (perbill)":546568628,"Support (perbill)":6169476,"Approval":54.6568628,"Support":0.6169476},{"Time (Hours)":186,"Approval (perbill)":544117648,"Support (perbill)":6096569,"Approval":54.4117648,"Support":0.6096569},{"Time (Hours)":187,"Approval (perbill)":541666667,"Support (perbill)":6024421,"Approval":54.1666667,"Support":0.6024421},{"Time (Hours)":188,"Approval (perbill)":539215687,"Support (perbill)":5953019,"Approval":53.9215687,"Support":0.5953019},{"Time (Hours)":189,"Approval (perbill)":536764706,"Support (perbill)":5882353,"Approval":53.6764706,"Support":0.5882353},{"Time (Hours)":190,"Approval (perbill)":534313726,"Support (perbill)":5812410,"Approval":53.4313726,"Support":0.581241},{"Time (Hours)":191,"Approval (perbill)":531862746,"Support (perbill)":5743181,"Approval":53.1862746,"Support":0.5743181},{"Time (Hours)":192,"Approval (perbill)":529411765,"Support (perbill)":5674653,"Approval":52.9411765,"Support":0.5674653},{"Time (Hours)":193,"Approval (perbill)":526960785,"Support (perbill)":5606817,"Approval":52.6960785,"Support":0.5606817},{"Time (Hours)":194,"Approval (perbill)":524509805,"Support (perbill)":5539662,"Approval":52.4509805,"Support":0.5539662},{"Time (Hours)":195,"Approval (perbill)":522058825,"Support (perbill)":5473177,"Approval":52.2058825,"Support":0.5473177},{"Time (Hours)":196,"Approval (perbill)":519607844,"Support (perbill)":5407354,"Approval":51.9607844,"Support":0.5407354},{"Time (Hours)":197,"Approval (perbill)":517156864,"Support (perbill)":5342181,"Approval":51.7156864,"Support":0.5342181},{"Time (Hours)":198,"Approval (perbill)":514705883,"Support (perbill)":5277650,"Approval":51.4705883,"Support":0.527765},{"Time (Hours)":199,"Approval (perbill)":512254903,"Support (perbill)":5213751,"Approval":51.2254903,"Support":0.5213751},{"Time (Hours)":200,"Approval (perbill)":509803922,"Support (perbill)":5150474,"Approval":50.9803922,"Support":0.5150474},{"Time (Hours)":201,"Approval (perbill)":507352942,"Support (perbill)":5087812,"Approval":50.7352942,"Support":0.5087812},{"Time (Hours)":202,"Approval (perbill)":504901961,"Support (perbill)":5025754,"Approval":50.4901961,"Support":0.5025754},{"Time (Hours)":203,"Approval (perbill)":502450981,"Support (perbill)":4964292,"Approval":50.2450981,"Support":0.4964292},{"Time (Hours)":204,"Approval (perbill)":500000000,"Support (perbill)":4903417,"Approval":50,"Support":0.4903417},{"Time (Hours)":205,"Approval (perbill)":500000000,"Support (perbill)":4843122,"Approval":50,"Support":0.4843122},{"Time (Hours)":206,"Approval (perbill)":500000000,"Support (perbill)":4783398,"Approval":50,"Support":0.4783398},{"Time (Hours)":207,"Approval (perbill)":500000000,"Support (perbill)":4724236,"Approval":50,"Support":0.4724236},{"Time (Hours)":208,"Approval (perbill)":500000000,"Support (perbill)":4665630,"Approval":50,"Support":0.466563},{"Time (Hours)":209,"Approval (perbill)":500000000,"Support (perbill)":4607570,"Approval":50,"Support":0.460757},{"Time (Hours)":210,"Approval (perbill)":500000000,"Support (perbill)":4550050,"Approval":50,"Support":0.455005},{"Time (Hours)":211,"Approval (perbill)":500000000,"Support (perbill)":4493062,"Approval":50,"Support":0.4493062},{"Time (Hours)":212,"Approval (perbill)":500000000,"Support (perbill)":4436599,"Approval":50,"Support":0.4436599},{"Time (Hours)":213,"Approval (perbill)":500000000,"Support (perbill)":4380654,"Approval":50,"Support":0.4380654},{"Time (Hours)":214,"Approval (perbill)":500000000,"Support (perbill)":4325218,"Approval":50,"Support":0.4325218},{"Time (Hours)":215,"Approval (perbill)":500000000,"Support (perbill)":4270287,"Approval":50,"Support":0.4270287},{"Time (Hours)":216,"Approval (perbill)":500000000,"Support (perbill)":4215851,"Approval":50,"Support":0.4215851},{"Time (Hours)":217,"Approval (perbill)":500000000,"Support (perbill)":4161906,"Approval":50,"Support":0.4161906},{"Time (Hours)":218,"Approval (perbill)":500000000,"Support (perbill)":4108444,"Approval":50,"Support":0.4108444},{"Time (Hours)":219,"Approval (perbill)":500000000,"Support (perbill)":4055459,"Approval":50,"Support":0.4055459},{"Time (Hours)":220,"Approval (perbill)":500000000,"Support (perbill)":4002944,"Approval":50,"Support":0.4002944},{"Time (Hours)":221,"Approval (perbill)":500000000,"Support (perbill)":3950894,"Approval":50,"Support":0.3950894},{"Time (Hours)":222,"Approval (perbill)":500000000,"Support (perbill)":3899302,"Approval":50,"Support":0.3899302},{"Time (Hours)":223,"Approval (perbill)":500000000,"Support (perbill)":3848162,"Approval":50,"Support":0.3848162},{"Time (Hours)":224,"Approval (perbill)":500000000,"Support (perbill)":3797468,"Approval":50,"Support":0.3797468},{"Time (Hours)":225,"Approval (perbill)":500000000,"Support (perbill)":3747215,"Approval":50,"Support":0.3747215},{"Time (Hours)":226,"Approval (perbill)":500000000,"Support (perbill)":3697396,"Approval":50,"Support":0.3697396},{"Time (Hours)":227,"Approval (perbill)":500000000,"Support (perbill)":3648006,"Approval":50,"Support":0.3648006},{"Time (Hours)":228,"Approval (perbill)":500000000,"Support (perbill)":3599040,"Approval":50,"Support":0.359904},{"Time (Hours)":229,"Approval (perbill)":500000000,"Support (perbill)":3550492,"Approval":50,"Support":0.3550492},{"Time (Hours)":230,"Approval (perbill)":500000000,"Support (perbill)":3502357,"Approval":50,"Support":0.3502357},{"Time (Hours)":231,"Approval (perbill)":500000000,"Support (perbill)":3454629,"Approval":50,"Support":0.3454629},{"Time (Hours)":232,"Approval (perbill)":500000000,"Support (perbill)":3407304,"Approval":50,"Support":0.3407304},{"Time (Hours)":233,"Approval (perbill)":500000000,"Support (perbill)":3360376,"Approval":50,"Support":0.3360376},{"Time (Hours)":234,"Approval (perbill)":500000000,"Support (perbill)":3313840,"Approval":50,"Support":0.331384},{"Time (Hours)":235,"Approval (perbill)":500000000,"Support (perbill)":3267692,"Approval":50,"Support":0.3267692},{"Time (Hours)":236,"Approval (perbill)":500000000,"Support (perbill)":3221926,"Approval":50,"Support":0.3221926},{"Time (Hours)":237,"Approval (perbill)":500000000,"Support (perbill)":3176538,"Approval":50,"Support":0.3176538},{"Time (Hours)":238,"Approval (perbill)":500000000,"Support (perbill)":3131524,"Approval":50,"Support":0.3131524},{"Time (Hours)":239,"Approval (perbill)":500000000,"Support (perbill)":3086878,"Approval":50,"Support":0.3086878},{"Time (Hours)":240,"Approval (perbill)":500000000,"Support (perbill)":3042596,"Approval":50,"Support":0.3042596},{"Time (Hours)":241,"Approval (perbill)":500000000,"Support (perbill)":2998674,"Approval":50,"Support":0.2998674},{"Time (Hours)":242,"Approval (perbill)":500000000,"Support (perbill)":2955107,"Approval":50,"Support":0.2955107},{"Time (Hours)":243,"Approval (perbill)":500000000,"Support (perbill)":2911892,"Approval":50,"Support":0.2911892},{"Time (Hours)":244,"Approval (perbill)":500000000,"Support (perbill)":2869023,"Approval":50,"Support":0.2869023},{"Time (Hours)":245,"Approval (perbill)":500000000,"Support (perbill)":2826496,"Approval":50,"Support":0.2826496},{"Time (Hours)":246,"Approval (perbill)":500000000,"Support (perbill)":2784309,"Approval":50,"Support":0.2784309},{"Time (Hours)":247,"Approval (perbill)":500000000,"Support (perbill)":2742455,"Approval":50,"Support":0.2742455},{"Time (Hours)":248,"Approval (perbill)":500000000,"Support (perbill)":2700933,"Approval":50,"Support":0.2700933},{"Time (Hours)":249,"Approval (perbill)":500000000,"Support (perbill)":2659737,"Approval":50,"Support":0.2659737},{"Time (Hours)":250,"Approval (perbill)":500000000,"Support (perbill)":2618864,"Approval":50,"Support":0.2618864},{"Time (Hours)":251,"Approval (perbill)":500000000,"Support (perbill)":2578310,"Approval":50,"Support":0.257831},{"Time (Hours)":252,"Approval (perbill)":500000000,"Support (perbill)":2538071,"Approval":50,"Support":0.2538071},{"Time (Hours)":253,"Approval (perbill)":500000000,"Support (perbill)":2498144,"Approval":50,"Support":0.2498144},{"Time (Hours)":254,"Approval (perbill)":500000000,"Support (perbill)":2458525,"Approval":50,"Support":0.2458525},{"Time (Hours)":255,"Approval (perbill)":500000000,"Support (perbill)":2419210,"Approval":50,"Support":0.241921},{"Time (Hours)":256,"Approval (perbill)":500000000,"Support (perbill)":2380197,"Approval":50,"Support":0.2380197},{"Time (Hours)":257,"Approval (perbill)":500000000,"Support (perbill)":2341481,"Approval":50,"Support":0.2341481},{"Time (Hours)":258,"Approval (perbill)":500000000,"Support (perbill)":2303059,"Approval":50,"Support":0.2303059},{"Time (Hours)":259,"Approval (perbill)":500000000,"Support (perbill)":2264928,"Approval":50,"Support":0.2264928},{"Time (Hours)":260,"Approval (perbill)":500000000,"Support (perbill)":2227084,"Approval":50,"Support":0.2227084},{"Time (Hours)":261,"Approval (perbill)":500000000,"Support (perbill)":2189525,"Approval":50,"Support":0.2189525},{"Time (Hours)":262,"Approval (perbill)":500000000,"Support (perbill)":2152247,"Approval":50,"Support":0.2152247},{"Time (Hours)":263,"Approval (perbill)":500000000,"Support (perbill)":2115247,"Approval":50,"Support":0.2115247},{"Time (Hours)":264,"Approval (perbill)":500000000,"Support (perbill)":2078522,"Approval":50,"Support":0.2078522},{"Time (Hours)":265,"Approval (perbill)":500000000,"Support (perbill)":2042068,"Approval":50,"Support":0.2042068},{"Time (Hours)":266,"Approval (perbill)":500000000,"Support (perbill)":2005884,"Approval":50,"Support":0.2005884},{"Time (Hours)":267,"Approval (perbill)":500000000,"Support (perbill)":1969965,"Approval":50,"Support":0.1969965},{"Time (Hours)":268,"Approval (perbill)":500000000,"Support (perbill)":1934309,"Approval":50,"Support":0.1934309},{"Time (Hours)":269,"Approval (perbill)":500000000,"Support (perbill)":1898913,"Approval":50,"Support":0.1898913},{"Time (Hours)":270,"Approval (perbill)":500000000,"Support (perbill)":1863775,"Approval":50,"Support":0.1863775},{"Time (Hours)":271,"Approval (perbill)":500000000,"Support (perbill)":1828891,"Approval":50,"Support":0.1828891},{"Time (Hours)":272,"Approval (perbill)":500000000,"Support (perbill)":1794258,"Approval":50,"Support":0.1794258},{"Time (Hours)":273,"Approval (perbill)":500000000,"Support (perbill)":1759875,"Approval":50,"Support":0.1759875},{"Time (Hours)":274,"Approval (perbill)":500000000,"Support (perbill)":1725737,"Approval":50,"Support":0.1725737},{"Time (Hours)":275,"Approval (perbill)":500000000,"Support (perbill)":1691844,"Approval":50,"Support":0.1691844},{"Time (Hours)":276,"Approval (perbill)":500000000,"Support (perbill)":1658191,"Approval":50,"Support":0.1658191},{"Time (Hours)":277,"Approval (perbill)":500000000,"Support (perbill)":1624777,"Approval":50,"Support":0.1624777},{"Time (Hours)":278,"Approval (perbill)":500000000,"Support (perbill)":1591599,"Approval":50,"Support":0.1591599},{"Time (Hours)":279,"Approval (perbill)":500000000,"Support (perbill)":1558654,"Approval":50,"Support":0.1558654},{"Time (Hours)":280,"Approval (perbill)":500000000,"Support (perbill)":1525941,"Approval":50,"Support":0.1525941},{"Time (Hours)":281,"Approval (perbill)":500000000,"Support (perbill)":1493456,"Approval":50,"Support":0.1493456},{"Time (Hours)":282,"Approval (perbill)":500000000,"Support (perbill)":1461197,"Approval":50,"Support":0.1461197},{"Time (Hours)":283,"Approval (perbill)":500000000,"Support (perbill)":1429162,"Approval":50,"Support":0.1429162},{"Time (Hours)":284,"Approval (perbill)":500000000,"Support (perbill)":1397348,"Approval":50,"Support":0.1397348},{"Time (Hours)":285,"Approval (perbill)":500000000,"Support (perbill)":1365754,"Approval":50,"Support":0.1365754},{"Time (Hours)":286,"Approval (perbill)":500000000,"Support (perbill)":1334377,"Approval":50,"Support":0.1334377},{"Time (Hours)":287,"Approval (perbill)":500000000,"Support (perbill)":1303214,"Approval":50,"Support":0.1303214},{"Time (Hours)":288,"Approval (perbill)":500000000,"Support (perbill)":1272264,"Approval":50,"Support":0.1272264},{"Time (Hours)":289,"Approval (perbill)":500000000,"Support (perbill)":1241525,"Approval":50,"Support":0.1241525},{"Time (Hours)":290,"Approval (perbill)":500000000,"Support (perbill)":1210994,"Approval":50,"Support":0.1210994},{"Time (Hours)":291,"Approval (perbill)":500000000,"Support (perbill)":1180668,"Approval":50,"Support":0.1180668},{"Time (Hours)":292,"Approval (perbill)":500000000,"Support (perbill)":1150547,"Approval":50,"Support":0.1150547},{"Time (Hours)":293,"Approval (perbill)":500000000,"Support (perbill)":1120628,"Approval":50,"Support":0.1120628},{"Time (Hours)":294,"Approval (perbill)":500000000,"Support (perbill)":1090909,"Approval":50,"Support":0.1090909},{"Time (Hours)":295,"Approval (perbill)":500000000,"Support (perbill)":1061388,"Approval":50,"Support":0.1061388},{"Time (Hours)":296,"Approval (perbill)":500000000,"Support (perbill)":1032063,"Approval":50,"Support":0.1032063},{"Time (Hours)":297,"Approval (perbill)":500000000,"Support (perbill)":1002932,"Approval":50,"Support":0.1002932},{"Time (Hours)":298,"Approval (perbill)":500000000,"Support (perbill)":973993,"Approval":50,"Support":0.0973993},{"Time (Hours)":299,"Approval (perbill)":500000000,"Support (perbill)":945244,"Approval":50,"Support":0.0945244},{"Time (Hours)":300,"Approval (perbill)":500000000,"Support (perbill)":916684,"Approval":50,"Support":0.0916684},{"Time (Hours)":301,"Approval (perbill)":500000000,"Support (perbill)":888310,"Approval":50,"Support":0.088831},{"Time (Hours)":302,"Approval (perbill)":500000000,"Support (perbill)":860121,"Approval":50,"Support":0.0860121},{"Time (Hours)":303,"Approval (perbill)":500000000,"Support (perbill)":832114,"Approval":50,"Support":0.0832114},{"Time (Hours)":304,"Approval (perbill)":500000000,"Support (perbill)":804289,"Approval":50,"Support":0.0804289},{"Time (Hours)":305,"Approval (perbill)":500000000,"Support (perbill)":776644,"Approval":50,"Support":0.0776644},{"Time (Hours)":306,"Approval (perbill)":500000000,"Support (perbill)":749176,"Approval":50,"Support":0.0749176},{"Time (Hours)":307,"Approval (perbill)":500000000,"Support (perbill)":721884,"Approval":50,"Support":0.0721884},{"Time (Hours)":308,"Approval (perbill)":500000000,"Support (perbill)":694766,"Approval":50,"Support":0.0694766},{"Time (Hours)":309,"Approval (perbill)":500000000,"Support (perbill)":667821,"Approval":50,"Support":0.0667821},{"Time (Hours)":310,"Approval (perbill)":500000000,"Support (perbill)":641047,"Approval":50,"Support":0.0641047},{"Time (Hours)":311,"Approval (perbill)":500000000,"Support (perbill)":614442,"Approval":50,"Support":0.0614442},{"Time (Hours)":312,"Approval (perbill)":500000000,"Support (perbill)":588005,"Approval":50,"Support":0.0588005},{"Time (Hours)":313,"Approval (perbill)":500000000,"Support (perbill)":561734,"Approval":50,"Support":0.0561734},{"Time (Hours)":314,"Approval (perbill)":500000000,"Support (perbill)":535627,"Approval":50,"Support":0.0535627},{"Time (Hours)":315,"Approval (perbill)":500000000,"Support (perbill)":509684,"Approval":50,"Support":0.0509684},{"Time (Hours)":316,"Approval (perbill)":500000000,"Support (perbill)":483902,"Approval":50,"Support":0.0483902},{"Time (Hours)":317,"Approval (perbill)":500000000,"Support (perbill)":458280,"Approval":50,"Support":0.045828},{"Time (Hours)":318,"Approval (perbill)":500000000,"Support (perbill)":432817,"Approval":50,"Support":0.0432817},{"Time (Hours)":319,"Approval (perbill)":500000000,"Support (perbill)":407511,"Approval":50,"Support":0.0407511},{"Time (Hours)":320,"Approval (perbill)":500000000,"Support (perbill)":382360,"Approval":50,"Support":0.038236},{"Time (Hours)":321,"Approval (perbill)":500000000,"Support (perbill)":357364,"Approval":50,"Support":0.0357364},{"Time (Hours)":322,"Approval (perbill)":500000000,"Support (perbill)":332520,"Approval":50,"Support":0.033252},{"Time (Hours)":323,"Approval (perbill)":500000000,"Support (perbill)":307828,"Approval":50,"Support":0.0307828},{"Time (Hours)":324,"Approval (perbill)":500000000,"Support (perbill)":283286,"Approval":50,"Support":0.0283286},{"Time (Hours)":325,"Approval (perbill)":500000000,"Support (perbill)":258892,"Approval":50,"Support":0.0258892},{"Time (Hours)":326,"Approval (perbill)":500000000,"Support (perbill)":234646,"Approval":50,"Support":0.0234646},{"Time (Hours)":327,"Approval (perbill)":500000000,"Support (perbill)":210546,"Approval":50,"Support":0.0210546},{"Time (Hours)":328,"Approval (perbill)":500000000,"Support (perbill)":186590,"Approval":50,"Support":0.018659},{"Time (Hours)":329,"Approval (perbill)":500000000,"Support (perbill)":162778,"Approval":50,"Support":0.0162778},{"Time (Hours)":330,"Approval (perbill)":500000000,"Support (perbill)":139108,"Approval":50,"Support":0.0139108},{"Time (Hours)":331,"Approval (perbill)":500000000,"Support (perbill)":115578,"Approval":50,"Support":0.0115578},{"Time (Hours)":332,"Approval (perbill)":500000000,"Support (perbill)":92188,"Approval":50,"Support":0.0092188},{"Time (Hours)":333,"Approval (perbill)":500000000,"Support (perbill)":68937,"Approval":50,"Support":0.0068937},{"Time (Hours)":334,"Approval (perbill)":500000000,"Support (perbill)":45822,"Approval":50,"Support":0.0045822},{"Time (Hours)":335,"Approval (perbill)":500000000,"Support (perbill)":22844,"Approval":50,"Support":0.0022844},{"Time (Hours)":336,"Approval (perbill)":500000000,"Support (perbill)":0,"Approval":50,"Support":0}]')},16066:p=>{"use strict";p.exports=JSON.parse('[{"time_hours":0,"approval_perbill":1000000000,"support_perbill":500000026,"approval":100,"support":50.0000026},{"time_hours":1,"approval_perbill":997549020,"support_perbill":418401359,"approval":99.754902,"support":41.8401359},{"time_hours":2,"approval_perbill":995098040,"support_perbill":359397443,"approval":99.509804,"support":35.9397443},{"time_hours":3,"approval_perbill":992647060,"support_perbill":314744813,"approval":99.264706,"support":31.4744813},{"time_hours":4,"approval_perbill":990196080,"support_perbill":279775293,"approval":99.019608,"support":27.9775293},{"time_hours":5,"approval_perbill":987745099,"support_perbill":251647242,"approval":98.7745099,"support":25.1647242},{"time_hours":6,"approval_perbill":985294119,"support_perbill":228531862,"approval":98.5294119,"support":22.8531862},{"time_hours":7,"approval_perbill":982843138,"support_perbill":209198815,"approval":98.2843138,"support":20.9198815},{"time_hours":8,"approval_perbill":980392158,"support_perbill":192789972,"approval":98.0392158,"support":19.2789972},{"time_hours":9,"approval_perbill":977941177,"support_perbill":178688524,"approval":97.7941177,"support":17.8688524},{"time_hours":10,"approval_perbill":975490197,"support_perbill":166439756,"approval":97.5490197,"support":16.6439756},{"time_hours":11,"approval_perbill":973039216,"support_perbill":155701053,"approval":97.3039216,"support":15.5701053},{"time_hours":12,"approval_perbill":970588236,"support_perbill":146209386,"approval":97.0588236,"support":14.6209386},{"time_hours":13,"approval_perbill":968137256,"support_perbill":137759452,"approval":96.8137256,"support":13.7759452},{"time_hours":14,"approval_perbill":965686276,"support_perbill":130188679,"approval":96.5686276,"support":13.0188679},{"time_hours":15,"approval_perbill":963235295,"support_perbill":123366639,"approval":96.3235295,"support":12.3366639},{"time_hours":16,"approval_perbill":960784315,"support_perbill":117187499,"approval":96.0784315,"support":11.7187499},{"time_hours":17,"approval_perbill":958333334,"support_perbill":111564465,"approval":95.8333334,"support":11.1564465},{"time_hours":18,"approval_perbill":955882354,"support_perbill":106425701,"approval":95.5882354,"support":10.6425701},{"time_hours":19,"approval_perbill":953431373,"support_perbill":101711228,"approval":95.3431373,"support":10.1711228},{"time_hours":20,"approval_perbill":950980393,"support_perbill":97370582,"approval":95.0980393,"support":9.7370582},{"time_hours":21,"approval_perbill":948529412,"support_perbill":93360994,"approval":94.8529412,"support":9.3360994},{"time_hours":22,"approval_perbill":946078432,"support_perbill":89645982,"approval":94.6078432,"support":8.9645982},{"time_hours":23,"approval_perbill":943627452,"support_perbill":86194234,"approval":94.3627452,"support":8.6194234},{"time_hours":24,"approval_perbill":941176471,"support_perbill":82978722,"approval":94.1176471,"support":8.2978722},{"time_hours":25,"approval_perbill":938725491,"support_perbill":79975997,"approval":93.8725491,"support":7.9975997},{"time_hours":26,"approval_perbill":936274511,"support_perbill":77165614,"approval":93.6274511,"support":7.7165614},{"time_hours":27,"approval_perbill":933823531,"support_perbill":74529666,"approval":93.3823531,"support":7.4529666},{"time_hours":28,"approval_perbill":931372550,"support_perbill":72052400,"approval":93.137255,"support":7.20524},{"time_hours":29,"approval_perbill":928921570,"support_perbill":69719908,"approval":92.892157,"support":6.9719908},{"time_hours":30,"approval_perbill":926470589,"support_perbill":67519857,"approval":92.6470589,"support":6.7519857},{"time_hours":31,"approval_perbill":924019609,"support_perbill":65441280,"approval":92.4019609,"support":6.544128},{"time_hours":32,"approval_perbill":921568628,"support_perbill":63474386,"approval":92.1568628,"support":6.3474386},{"time_hours":33,"approval_perbill":919117648,"support_perbill":61610409,"approval":91.9117648,"support":6.1610409},{"time_hours":34,"approval_perbill":916666667,"support_perbill":59841478,"approval":91.6666667,"support":5.9841478},{"time_hours":35,"approval_perbill":914215687,"support_perbill":58160504,"approval":91.4215687,"support":5.8160504},{"time_hours":36,"approval_perbill":911764706,"support_perbill":56561084,"approval":91.1764706,"support":5.6561084},{"time_hours":37,"approval_perbill":909313726,"support_perbill":55037426,"approval":90.9313726,"support":5.5037426},{"time_hours":38,"approval_perbill":906862746,"support_perbill":53584271,"approval":90.6862746,"support":5.3584271},{"time_hours":39,"approval_perbill":904411766,"support_perbill":52196835,"approval":90.4411766,"support":5.2196835},{"time_hours":40,"approval_perbill":901960785,"support_perbill":50870759,"approval":90.1960785,"support":5.0870759},{"time_hours":41,"approval_perbill":899509805,"support_perbill":49602061,"approval":89.9509805,"support":4.9602061},{"time_hours":42,"approval_perbill":897058824,"support_perbill":48387095,"approval":89.7058824,"support":4.8387095},{"time_hours":43,"approval_perbill":894607844,"support_perbill":47222519,"approval":89.4607844,"support":4.7222519},{"time_hours":44,"approval_perbill":892156864,"support_perbill":46105262,"approval":89.2156864,"support":4.6105262},{"time_hours":45,"approval_perbill":889705883,"support_perbill":45032496,"approval":88.9705883,"support":4.5032496},{"time_hours":46,"approval_perbill":887254903,"support_perbill":44001617,"approval":88.7254903,"support":4.4001617},{"time_hours":47,"approval_perbill":884803922,"support_perbill":43010218,"approval":88.4803922,"support":4.3010218},{"time_hours":48,"approval_perbill":882352942,"support_perbill":42056074,"approval":88.2352942,"support":4.2056074},{"time_hours":49,"approval_perbill":879901962,"support_perbill":41137122,"approval":87.9901962,"support":4.1137122},{"time_hours":50,"approval_perbill":877450982,"support_perbill":40251453,"approval":87.7450982,"support":4.0251453},{"time_hours":51,"approval_perbill":875000001,"support_perbill":39397289,"approval":87.5000001,"support":3.9397289},{"time_hours":52,"approval_perbill":872549021,"support_perbill":38572980,"approval":87.2549021,"support":3.857298},{"time_hours":53,"approval_perbill":870098040,"support_perbill":37776985,"approval":87.009804,"support":3.7776985},{"time_hours":54,"approval_perbill":867647060,"support_perbill":37007873,"approval":86.764706,"support":3.7007873},{"time_hours":55,"approval_perbill":865196079,"support_perbill":36264302,"approval":86.5196079,"support":3.6264302},{"time_hours":56,"approval_perbill":862745099,"support_perbill":35545023,"approval":86.2745099,"support":3.5545023},{"time_hours":57,"approval_perbill":860294118,"support_perbill":34848862,"approval":86.0294118,"support":3.4848862},{"time_hours":58,"approval_perbill":857843138,"support_perbill":34174724,"approval":85.7843138,"support":3.4174724},{"time_hours":59,"approval_perbill":855392157,"support_perbill":33521580,"approval":85.5392157,"support":3.352158},{"time_hours":60,"approval_perbill":852941177,"support_perbill":32888464,"approval":85.2941177,"support":3.2888464},{"time_hours":61,"approval_perbill":850490197,"support_perbill":32274469,"approval":85.0490197,"support":3.2274469},{"time_hours":62,"approval_perbill":848039217,"support_perbill":31678741,"approval":84.8039217,"support":3.1678741},{"time_hours":63,"approval_perbill":845588236,"support_perbill":31100477,"approval":84.5588236,"support":3.1100477},{"time_hours":64,"approval_perbill":843137256,"support_perbill":30538921,"approval":84.3137256,"support":3.0538921},{"time_hours":65,"approval_perbill":840686276,"support_perbill":29993358,"approval":84.0686276,"support":2.9993358},{"time_hours":66,"approval_perbill":838235295,"support_perbill":29463116,"approval":83.8235295,"support":2.9463116},{"time_hours":67,"approval_perbill":835784315,"support_perbill":28947556,"approval":83.5784315,"support":2.8947556},{"time_hours":68,"approval_perbill":833333334,"support_perbill":28446079,"approval":83.3333334,"support":2.8446079},{"time_hours":69,"approval_perbill":830882354,"support_perbill":27958114,"approval":83.0882354,"support":2.7958114},{"time_hours":70,"approval_perbill":828431373,"support_perbill":27483123,"approval":82.8431373,"support":2.7483123},{"time_hours":71,"approval_perbill":825980393,"support_perbill":27020596,"approval":82.5980393,"support":2.7020596},{"time_hours":72,"approval_perbill":823529412,"support_perbill":26570047,"approval":82.3529412,"support":2.6570047},{"time_hours":73,"approval_perbill":821078432,"support_perbill":26131019,"approval":82.1078432,"support":2.6131019},{"time_hours":74,"approval_perbill":818627452,"support_perbill":25703073,"approval":81.8627452,"support":2.5703073},{"time_hours":75,"approval_perbill":816176472,"support_perbill":25285796,"approval":81.6176472,"support":2.5285796},{"time_hours":76,"approval_perbill":813725491,"support_perbill":24878795,"approval":81.3725491,"support":2.4878795},{"time_hours":77,"approval_perbill":811274511,"support_perbill":24481693,"approval":81.1274511,"support":2.4481693},{"time_hours":78,"approval_perbill":808823530,"support_perbill":24094134,"approval":80.882353,"support":2.4094134},{"time_hours":79,"approval_perbill":806372550,"support_perbill":23715779,"approval":80.637255,"support":2.3715779},{"time_hours":80,"approval_perbill":803921569,"support_perbill":23346303,"approval":80.3921569,"support":2.3346303},{"time_hours":81,"approval_perbill":801470589,"support_perbill":22985397,"approval":80.1470589,"support":2.2985397},{"time_hours":82,"approval_perbill":799019608,"support_perbill":22632766,"approval":79.9019608,"support":2.2632766},{"time_hours":83,"approval_perbill":796568628,"support_perbill":22288130,"approval":79.6568628,"support":2.228813},{"time_hours":84,"approval_perbill":794117648,"support_perbill":21951219,"approval":79.4117648,"support":2.1951219},{"time_hours":85,"approval_perbill":791666668,"support_perbill":21621776,"approval":79.1666668,"support":2.1621776},{"time_hours":86,"approval_perbill":789215688,"support_perbill":21299556,"approval":78.9215688,"support":2.1299556},{"time_hours":87,"approval_perbill":786764707,"support_perbill":20984324,"approval":78.6764707,"support":2.0984324},{"time_hours":88,"approval_perbill":784313727,"support_perbill":20675855,"approval":78.4313727,"support":2.0675855},{"time_hours":89,"approval_perbill":781862746,"support_perbill":20373934,"approval":78.1862746,"support":2.0373934},{"time_hours":90,"approval_perbill":779411766,"support_perbill":20078354,"approval":77.9411766,"support":2.0078354},{"time_hours":91,"approval_perbill":776960785,"support_perbill":19788917,"approval":77.6960785,"support":1.9788917},{"time_hours":92,"approval_perbill":774509805,"support_perbill":19505435,"approval":77.4509805,"support":1.9505435},{"time_hours":93,"approval_perbill":772058824,"support_perbill":19227725,"approval":77.2058824,"support":1.9227725},{"time_hours":94,"approval_perbill":769607844,"support_perbill":18955613,"approval":76.9607844,"support":1.8955613},{"time_hours":95,"approval_perbill":767156863,"support_perbill":18688931,"approval":76.7156863,"support":1.8688931},{"time_hours":96,"approval_perbill":764705883,"support_perbill":18427518,"approval":76.4705883,"support":1.8427518},{"time_hours":97,"approval_perbill":762254903,"support_perbill":18171219,"approval":76.2254903,"support":1.8171219},{"time_hours":98,"approval_perbill":759803923,"support_perbill":17919887,"approval":75.9803923,"support":1.7919887},{"time_hours":99,"approval_perbill":757352942,"support_perbill":17673377,"approval":75.7352942,"support":1.7673377},{"time_hours":100,"approval_perbill":754901962,"support_perbill":17431553,"approval":75.4901962,"support":1.7431553},{"time_hours":101,"approval_perbill":752450981,"support_perbill":17194282,"approval":75.2450981,"support":1.7194282},{"time_hours":102,"approval_perbill":750000001,"support_perbill":16961437,"approval":75.0000001,"support":1.6961437},{"time_hours":103,"approval_perbill":747549020,"support_perbill":16732895,"approval":74.754902,"support":1.6732895},{"time_hours":104,"approval_perbill":745098040,"support_perbill":16508538,"approval":74.509804,"support":1.6508538},{"time_hours":105,"approval_perbill":742647059,"support_perbill":16288252,"approval":74.2647059,"support":1.6288252},{"time_hours":106,"approval_perbill":740196079,"support_perbill":16071927,"approval":74.0196079,"support":1.6071927},{"time_hours":107,"approval_perbill":737745099,"support_perbill":15859457,"approval":73.7745099,"support":1.5859457},{"time_hours":108,"approval_perbill":735294118,"support_perbill":15650741,"approval":73.5294118,"support":1.5650741},{"time_hours":109,"approval_perbill":732843138,"support_perbill":15445679,"approval":73.2843138,"support":1.5445679},{"time_hours":110,"approval_perbill":730392158,"support_perbill":15244176,"approval":73.0392158,"support":1.5244176},{"time_hours":111,"approval_perbill":727941178,"support_perbill":15046141,"approval":72.7941178,"support":1.5046141},{"time_hours":112,"approval_perbill":725490197,"support_perbill":14851485,"approval":72.5490197,"support":1.4851485},{"time_hours":113,"approval_perbill":723039217,"support_perbill":14660121,"approval":72.3039217,"support":1.4660121},{"time_hours":114,"approval_perbill":720588236,"support_perbill":14471968,"approval":72.0588236,"support":1.4471968},{"time_hours":115,"approval_perbill":718137256,"support_perbill":14286945,"approval":71.8137256,"support":1.4286945},{"time_hours":116,"approval_perbill":715686275,"support_perbill":14104975,"approval":71.5686275,"support":1.4104975},{"time_hours":117,"approval_perbill":713235295,"support_perbill":13925982,"approval":71.3235295,"support":1.3925982},{"time_hours":118,"approval_perbill":710784314,"support_perbill":13749894,"approval":71.0784314,"support":1.3749894},{"time_hours":119,"approval_perbill":708333334,"support_perbill":13576642,"approval":70.8333334,"support":1.3576642},{"time_hours":120,"approval_perbill":705882353,"support_perbill":13406156,"approval":70.5882353,"support":1.3406156},{"time_hours":121,"approval_perbill":703431373,"support_perbill":13238372,"approval":70.3431373,"support":1.3238372},{"time_hours":122,"approval_perbill":700980393,"support_perbill":13073226,"approval":70.0980393,"support":1.3073226},{"time_hours":123,"approval_perbill":698529413,"support_perbill":12910655,"approval":69.8529413,"support":1.2910655},{"time_hours":124,"approval_perbill":696078432,"support_perbill":12750601,"approval":69.6078432,"support":1.2750601},{"time_hours":125,"approval_perbill":693627452,"support_perbill":12593005,"approval":69.3627452,"support":1.2593005},{"time_hours":126,"approval_perbill":691176471,"support_perbill":12437810,"approval":69.1176471,"support":1.243781},{"time_hours":127,"approval_perbill":688725491,"support_perbill":12284964,"approval":68.8725491,"support":1.2284964},{"time_hours":128,"approval_perbill":686274511,"support_perbill":12134411,"approval":68.6274511,"support":1.2134411},{"time_hours":129,"approval_perbill":683823530,"support_perbill":11986103,"approval":68.382353,"support":1.1986103},{"time_hours":130,"approval_perbill":681372550,"support_perbill":11839987,"approval":68.137255,"support":1.1839987},{"time_hours":131,"approval_perbill":678921569,"support_perbill":11696017,"approval":67.8921569,"support":1.1696017},{"time_hours":132,"approval_perbill":676470589,"support_perbill":11554145,"approval":67.6470589,"support":1.1554145},{"time_hours":133,"approval_perbill":674019609,"support_perbill":11414326,"approval":67.4019609,"support":1.1414326},{"time_hours":134,"approval_perbill":671568629,"support_perbill":11276516,"approval":67.1568629,"support":1.1276516},{"time_hours":135,"approval_perbill":669117648,"support_perbill":11140671,"approval":66.9117648,"support":1.1140671},{"time_hours":136,"approval_perbill":666666668,"support_perbill":11006750,"approval":66.6666668,"support":1.100675},{"time_hours":137,"approval_perbill":664215687,"support_perbill":10874713,"approval":66.4215687,"support":1.0874713},{"time_hours":138,"approval_perbill":661764707,"support_perbill":10744519,"approval":66.1764707,"support":1.0744519},{"time_hours":139,"approval_perbill":659313726,"support_perbill":10616130,"approval":65.9313726,"support":1.061613},{"time_hours":140,"approval_perbill":656862746,"support_perbill":10489510,"approval":65.6862746,"support":1.048951},{"time_hours":141,"approval_perbill":654411765,"support_perbill":10364622,"approval":65.4411765,"support":1.0364622},{"time_hours":142,"approval_perbill":651960785,"support_perbill":10241430,"approval":65.1960785,"support":1.024143},{"time_hours":143,"approval_perbill":649509804,"support_perbill":10119900,"approval":64.9509804,"support":1.01199},{"time_hours":144,"approval_perbill":647058824,"support_perbill":10000000,"approval":64.7058824,"support":1},{"time_hours":145,"approval_perbill":644607844,"support_perbill":9881695,"approval":64.4607844,"support":0.9881695},{"time_hours":146,"approval_perbill":642156864,"support_perbill":9764955,"approval":64.2156864,"support":0.9764955},{"time_hours":147,"approval_perbill":639705883,"support_perbill":9649749,"approval":63.9705883,"support":0.9649749},{"time_hours":148,"approval_perbill":637254903,"support_perbill":9536047,"approval":63.7254903,"support":0.9536047},{"time_hours":149,"approval_perbill":634803923,"support_perbill":9423820,"approval":63.4803923,"support":0.942382},{"time_hours":150,"approval_perbill":632352942,"support_perbill":9313038,"approval":63.2352942,"support":0.9313038},{"time_hours":151,"approval_perbill":629901962,"support_perbill":9203674,"approval":62.9901962,"support":0.9203674},{"time_hours":152,"approval_perbill":627450981,"support_perbill":9095702,"approval":62.7450981,"support":0.9095702},{"time_hours":153,"approval_perbill":625000001,"support_perbill":8989095,"approval":62.5000001,"support":0.8989095},{"time_hours":154,"approval_perbill":622549020,"support_perbill":8883826,"approval":62.254902,"support":0.8883826},{"time_hours":155,"approval_perbill":620098040,"support_perbill":8779872,"approval":62.009804,"support":0.8779872},{"time_hours":156,"approval_perbill":617647059,"support_perbill":8677207,"approval":61.7647059,"support":0.8677207},{"time_hours":157,"approval_perbill":615196079,"support_perbill":8575808,"approval":61.5196079,"support":0.8575808},{"time_hours":158,"approval_perbill":612745099,"support_perbill":8475652,"approval":61.2745099,"support":0.8475652},{"time_hours":159,"approval_perbill":610294119,"support_perbill":8376715,"approval":61.0294119,"support":0.8376715},{"time_hours":160,"approval_perbill":607843138,"support_perbill":8278976,"approval":60.7843138,"support":0.8278976},{"time_hours":161,"approval_perbill":605392158,"support_perbill":8182413,"approval":60.5392158,"support":0.8182413},{"time_hours":162,"approval_perbill":602941177,"support_perbill":8087005,"approval":60.2941177,"support":0.8087005},{"time_hours":163,"approval_perbill":600490197,"support_perbill":7992731,"approval":60.0490197,"support":0.7992731},{"time_hours":164,"approval_perbill":598039216,"support_perbill":7899571,"approval":59.8039216,"support":0.7899571},{"time_hours":165,"approval_perbill":595588236,"support_perbill":7807506,"approval":59.5588236,"support":0.7807506},{"time_hours":166,"approval_perbill":593137255,"support_perbill":7716516,"approval":59.3137255,"support":0.7716516},{"time_hours":167,"approval_perbill":590686275,"support_perbill":7626583,"approval":59.0686275,"support":0.7626583},{"time_hours":168,"approval_perbill":588235295,"support_perbill":7537688,"approval":58.8235295,"support":0.7537688},{"time_hours":169,"approval_perbill":585784315,"support_perbill":7449814,"approval":58.5784315,"support":0.7449814},{"time_hours":170,"approval_perbill":583333335,"support_perbill":7362942,"approval":58.3333335,"support":0.7362942},{"time_hours":171,"approval_perbill":580882354,"support_perbill":7277057,"approval":58.0882354,"support":0.7277057},{"time_hours":172,"approval_perbill":578431374,"support_perbill":7192141,"approval":57.8431374,"support":0.7192141},{"time_hours":173,"approval_perbill":575980393,"support_perbill":7108178,"approval":57.5980393,"support":0.7108178},{"time_hours":174,"approval_perbill":573529413,"support_perbill":7025151,"approval":57.3529413,"support":0.7025151},{"time_hours":175,"approval_perbill":571078432,"support_perbill":6943047,"approval":57.1078432,"support":0.6943047},{"time_hours":176,"approval_perbill":568627452,"support_perbill":6861848,"approval":56.8627452,"support":0.6861848},{"time_hours":177,"approval_perbill":566176471,"support_perbill":6781540,"approval":56.6176471,"support":0.678154},{"time_hours":178,"approval_perbill":563725491,"support_perbill":6702109,"approval":56.3725491,"support":0.6702109},{"time_hours":179,"approval_perbill":561274510,"support_perbill":6623541,"approval":56.127451,"support":0.6623541},{"time_hours":180,"approval_perbill":558823530,"support_perbill":6545820,"approval":55.882353,"support":0.654582},{"time_hours":181,"approval_perbill":556372550,"support_perbill":6468935,"approval":55.637255,"support":0.6468935},{"time_hours":182,"approval_perbill":553921570,"support_perbill":6392871,"approval":55.392157,"support":0.6392871},{"time_hours":183,"approval_perbill":551470589,"support_perbill":6317615,"approval":55.1470589,"support":0.6317615},{"time_hours":184,"approval_perbill":549019609,"support_perbill":6243154,"approval":54.9019609,"support":0.6243154},{"time_hours":185,"approval_perbill":546568628,"support_perbill":6169476,"approval":54.6568628,"support":0.6169476},{"time_hours":186,"approval_perbill":544117648,"support_perbill":6096569,"approval":54.4117648,"support":0.6096569},{"time_hours":187,"approval_perbill":541666667,"support_perbill":6024421,"approval":54.1666667,"support":0.6024421},{"time_hours":188,"approval_perbill":539215687,"support_perbill":5953019,"approval":53.9215687,"support":0.5953019},{"time_hours":189,"approval_perbill":536764706,"support_perbill":5882353,"approval":53.6764706,"support":0.5882353},{"time_hours":190,"approval_perbill":534313726,"support_perbill":5812410,"approval":53.4313726,"support":0.581241},{"time_hours":191,"approval_perbill":531862746,"support_perbill":5743181,"approval":53.1862746,"support":0.5743181},{"time_hours":192,"approval_perbill":529411765,"support_perbill":5674653,"approval":52.9411765,"support":0.5674653},{"time_hours":193,"approval_perbill":526960785,"support_perbill":5606817,"approval":52.6960785,"support":0.5606817},{"time_hours":194,"approval_perbill":524509805,"support_perbill":5539662,"approval":52.4509805,"support":0.5539662},{"time_hours":195,"approval_perbill":522058825,"support_perbill":5473177,"approval":52.2058825,"support":0.5473177},{"time_hours":196,"approval_perbill":519607844,"support_perbill":5407354,"approval":51.9607844,"support":0.5407354},{"time_hours":197,"approval_perbill":517156864,"support_perbill":5342181,"approval":51.7156864,"support":0.5342181},{"time_hours":198,"approval_perbill":514705883,"support_perbill":5277650,"approval":51.4705883,"support":0.527765},{"time_hours":199,"approval_perbill":512254903,"support_perbill":5213751,"approval":51.2254903,"support":0.5213751},{"time_hours":200,"approval_perbill":509803922,"support_perbill":5150474,"approval":50.9803922,"support":0.5150474},{"time_hours":201,"approval_perbill":507352942,"support_perbill":5087812,"approval":50.7352942,"support":0.5087812},{"time_hours":202,"approval_perbill":504901961,"support_perbill":5025754,"approval":50.4901961,"support":0.5025754},{"time_hours":203,"approval_perbill":502450981,"support_perbill":4964292,"approval":50.2450981,"support":0.4964292},{"time_hours":204,"approval_perbill":500000000,"support_perbill":4903417,"approval":50,"support":0.4903417},{"time_hours":205,"approval_perbill":500000000,"support_perbill":4843122,"approval":50,"support":0.4843122},{"time_hours":206,"approval_perbill":500000000,"support_perbill":4783398,"approval":50,"support":0.4783398},{"time_hours":207,"approval_perbill":500000000,"support_perbill":4724236,"approval":50,"support":0.4724236},{"time_hours":208,"approval_perbill":500000000,"support_perbill":4665630,"approval":50,"support":0.466563},{"time_hours":209,"approval_perbill":500000000,"support_perbill":4607570,"approval":50,"support":0.460757},{"time_hours":210,"approval_perbill":500000000,"support_perbill":4550050,"approval":50,"support":0.455005},{"time_hours":211,"approval_perbill":500000000,"support_perbill":4493062,"approval":50,"support":0.4493062},{"time_hours":212,"approval_perbill":500000000,"support_perbill":4436599,"approval":50,"support":0.4436599},{"time_hours":213,"approval_perbill":500000000,"support_perbill":4380654,"approval":50,"support":0.4380654},{"time_hours":214,"approval_perbill":500000000,"support_perbill":4325218,"approval":50,"support":0.4325218},{"time_hours":215,"approval_perbill":500000000,"support_perbill":4270287,"approval":50,"support":0.4270287},{"time_hours":216,"approval_perbill":500000000,"support_perbill":4215851,"approval":50,"support":0.4215851},{"time_hours":217,"approval_perbill":500000000,"support_perbill":4161906,"approval":50,"support":0.4161906},{"time_hours":218,"approval_perbill":500000000,"support_perbill":4108444,"approval":50,"support":0.4108444},{"time_hours":219,"approval_perbill":500000000,"support_perbill":4055459,"approval":50,"support":0.4055459},{"time_hours":220,"approval_perbill":500000000,"support_perbill":4002944,"approval":50,"support":0.4002944},{"time_hours":221,"approval_perbill":500000000,"support_perbill":3950894,"approval":50,"support":0.3950894},{"time_hours":222,"approval_perbill":500000000,"support_perbill":3899302,"approval":50,"support":0.3899302},{"time_hours":223,"approval_perbill":500000000,"support_perbill":3848162,"approval":50,"support":0.3848162},{"time_hours":224,"approval_perbill":500000000,"support_perbill":3797468,"approval":50,"support":0.3797468},{"time_hours":225,"approval_perbill":500000000,"support_perbill":3747215,"approval":50,"support":0.3747215},{"time_hours":226,"approval_perbill":500000000,"support_perbill":3697396,"approval":50,"support":0.3697396},{"time_hours":227,"approval_perbill":500000000,"support_perbill":3648006,"approval":50,"support":0.3648006},{"time_hours":228,"approval_perbill":500000000,"support_perbill":3599040,"approval":50,"support":0.359904},{"time_hours":229,"approval_perbill":500000000,"support_perbill":3550492,"approval":50,"support":0.3550492},{"time_hours":230,"approval_perbill":500000000,"support_perbill":3502357,"approval":50,"support":0.3502357},{"time_hours":231,"approval_perbill":500000000,"support_perbill":3454629,"approval":50,"support":0.3454629},{"time_hours":232,"approval_perbill":500000000,"support_perbill":3407304,"approval":50,"support":0.3407304},{"time_hours":233,"approval_perbill":500000000,"support_perbill":3360376,"approval":50,"support":0.3360376},{"time_hours":234,"approval_perbill":500000000,"support_perbill":3313840,"approval":50,"support":0.331384},{"time_hours":235,"approval_perbill":500000000,"support_perbill":3267692,"approval":50,"support":0.3267692},{"time_hours":236,"approval_perbill":500000000,"support_perbill":3221926,"approval":50,"support":0.3221926},{"time_hours":237,"approval_perbill":500000000,"support_perbill":3176538,"approval":50,"support":0.3176538},{"time_hours":238,"approval_perbill":500000000,"support_perbill":3131524,"approval":50,"support":0.3131524},{"time_hours":239,"approval_perbill":500000000,"support_perbill":3086878,"approval":50,"support":0.3086878},{"time_hours":240,"approval_perbill":500000000,"support_perbill":3042596,"approval":50,"support":0.3042596},{"time_hours":241,"approval_perbill":500000000,"support_perbill":2998674,"approval":50,"support":0.2998674},{"time_hours":242,"approval_perbill":500000000,"support_perbill":2955107,"approval":50,"support":0.2955107},{"time_hours":243,"approval_perbill":500000000,"support_perbill":2911892,"approval":50,"support":0.2911892},{"time_hours":244,"approval_perbill":500000000,"support_perbill":2869023,"approval":50,"support":0.2869023},{"time_hours":245,"approval_perbill":500000000,"support_perbill":2826496,"approval":50,"support":0.2826496},{"time_hours":246,"approval_perbill":500000000,"support_perbill":2784309,"approval":50,"support":0.2784309},{"time_hours":247,"approval_perbill":500000000,"support_perbill":2742455,"approval":50,"support":0.2742455},{"time_hours":248,"approval_perbill":500000000,"support_perbill":2700933,"approval":50,"support":0.2700933},{"time_hours":249,"approval_perbill":500000000,"support_perbill":2659737,"approval":50,"support":0.2659737},{"time_hours":250,"approval_perbill":500000000,"support_perbill":2618864,"approval":50,"support":0.2618864},{"time_hours":251,"approval_perbill":500000000,"support_perbill":2578310,"approval":50,"support":0.257831},{"time_hours":252,"approval_perbill":500000000,"support_perbill":2538071,"approval":50,"support":0.2538071},{"time_hours":253,"approval_perbill":500000000,"support_perbill":2498144,"approval":50,"support":0.2498144},{"time_hours":254,"approval_perbill":500000000,"support_perbill":2458525,"approval":50,"support":0.2458525},{"time_hours":255,"approval_perbill":500000000,"support_perbill":2419210,"approval":50,"support":0.241921},{"time_hours":256,"approval_perbill":500000000,"support_perbill":2380197,"approval":50,"support":0.2380197},{"time_hours":257,"approval_perbill":500000000,"support_perbill":2341481,"approval":50,"support":0.2341481},{"time_hours":258,"approval_perbill":500000000,"support_perbill":2303059,"approval":50,"support":0.2303059},{"time_hours":259,"approval_perbill":500000000,"support_perbill":2264928,"approval":50,"support":0.2264928},{"time_hours":260,"approval_perbill":500000000,"support_perbill":2227084,"approval":50,"support":0.2227084},{"time_hours":261,"approval_perbill":500000000,"support_perbill":2189525,"approval":50,"support":0.2189525},{"time_hours":262,"approval_perbill":500000000,"support_perbill":2152247,"approval":50,"support":0.2152247},{"time_hours":263,"approval_perbill":500000000,"support_perbill":2115247,"approval":50,"support":0.2115247},{"time_hours":264,"approval_perbill":500000000,"support_perbill":2078522,"approval":50,"support":0.2078522},{"time_hours":265,"approval_perbill":500000000,"support_perbill":2042068,"approval":50,"support":0.2042068},{"time_hours":266,"approval_perbill":500000000,"support_perbill":2005884,"approval":50,"support":0.2005884},{"time_hours":267,"approval_perbill":500000000,"support_perbill":1969965,"approval":50,"support":0.1969965},{"time_hours":268,"approval_perbill":500000000,"support_perbill":1934309,"approval":50,"support":0.1934309},{"time_hours":269,"approval_perbill":500000000,"support_perbill":1898913,"approval":50,"support":0.1898913},{"time_hours":270,"approval_perbill":500000000,"support_perbill":1863775,"approval":50,"support":0.1863775},{"time_hours":271,"approval_perbill":500000000,"support_perbill":1828891,"approval":50,"support":0.1828891},{"time_hours":272,"approval_perbill":500000000,"support_perbill":1794258,"approval":50,"support":0.1794258},{"time_hours":273,"approval_perbill":500000000,"support_perbill":1759875,"approval":50,"support":0.1759875},{"time_hours":274,"approval_perbill":500000000,"support_perbill":1725737,"approval":50,"support":0.1725737},{"time_hours":275,"approval_perbill":500000000,"support_perbill":1691844,"approval":50,"support":0.1691844},{"time_hours":276,"approval_perbill":500000000,"support_perbill":1658191,"approval":50,"support":0.1658191},{"time_hours":277,"approval_perbill":500000000,"support_perbill":1624777,"approval":50,"support":0.1624777},{"time_hours":278,"approval_perbill":500000000,"support_perbill":1591599,"approval":50,"support":0.1591599},{"time_hours":279,"approval_perbill":500000000,"support_perbill":1558654,"approval":50,"support":0.1558654},{"time_hours":280,"approval_perbill":500000000,"support_perbill":1525941,"approval":50,"support":0.1525941},{"time_hours":281,"approval_perbill":500000000,"support_perbill":1493456,"approval":50,"support":0.1493456},{"time_hours":282,"approval_perbill":500000000,"support_perbill":1461197,"approval":50,"support":0.1461197},{"time_hours":283,"approval_perbill":500000000,"support_perbill":1429162,"approval":50,"support":0.1429162},{"time_hours":284,"approval_perbill":500000000,"support_perbill":1397348,"approval":50,"support":0.1397348},{"time_hours":285,"approval_perbill":500000000,"support_perbill":1365754,"approval":50,"support":0.1365754},{"time_hours":286,"approval_perbill":500000000,"support_perbill":1334377,"approval":50,"support":0.1334377},{"time_hours":287,"approval_perbill":500000000,"support_perbill":1303214,"approval":50,"support":0.1303214},{"time_hours":288,"approval_perbill":500000000,"support_perbill":1272264,"approval":50,"support":0.1272264},{"time_hours":289,"approval_perbill":500000000,"support_perbill":1241525,"approval":50,"support":0.1241525},{"time_hours":290,"approval_perbill":500000000,"support_perbill":1210994,"approval":50,"support":0.1210994},{"time_hours":291,"approval_perbill":500000000,"support_perbill":1180668,"approval":50,"support":0.1180668},{"time_hours":292,"approval_perbill":500000000,"support_perbill":1150547,"approval":50,"support":0.1150547},{"time_hours":293,"approval_perbill":500000000,"support_perbill":1120628,"approval":50,"support":0.1120628},{"time_hours":294,"approval_perbill":500000000,"support_perbill":1090909,"approval":50,"support":0.1090909},{"time_hours":295,"approval_perbill":500000000,"support_perbill":1061388,"approval":50,"support":0.1061388},{"time_hours":296,"approval_perbill":500000000,"support_perbill":1032063,"approval":50,"support":0.1032063},{"time_hours":297,"approval_perbill":500000000,"support_perbill":1002932,"approval":50,"support":0.1002932},{"time_hours":298,"approval_perbill":500000000,"support_perbill":973993,"approval":50,"support":0.0973993},{"time_hours":299,"approval_perbill":500000000,"support_perbill":945244,"approval":50,"support":0.0945244},{"time_hours":300,"approval_perbill":500000000,"support_perbill":916684,"approval":50,"support":0.0916684},{"time_hours":301,"approval_perbill":500000000,"support_perbill":888310,"approval":50,"support":0.088831},{"time_hours":302,"approval_perbill":500000000,"support_perbill":860121,"approval":50,"support":0.0860121},{"time_hours":303,"approval_perbill":500000000,"support_perbill":832114,"approval":50,"support":0.0832114},{"time_hours":304,"approval_perbill":500000000,"support_perbill":804289,"approval":50,"support":0.0804289},{"time_hours":305,"approval_perbill":500000000,"support_perbill":776644,"approval":50,"support":0.0776644},{"time_hours":306,"approval_perbill":500000000,"support_perbill":749176,"approval":50,"support":0.0749176},{"time_hours":307,"approval_perbill":500000000,"support_perbill":721884,"approval":50,"support":0.0721884},{"time_hours":308,"approval_perbill":500000000,"support_perbill":694766,"approval":50,"support":0.0694766},{"time_hours":309,"approval_perbill":500000000,"support_perbill":667821,"approval":50,"support":0.0667821},{"time_hours":310,"approval_perbill":500000000,"support_perbill":641047,"approval":50,"support":0.0641047},{"time_hours":311,"approval_perbill":500000000,"support_perbill":614442,"approval":50,"support":0.0614442},{"time_hours":312,"approval_perbill":500000000,"support_perbill":588005,"approval":50,"support":0.0588005},{"time_hours":313,"approval_perbill":500000000,"support_perbill":561734,"approval":50,"support":0.0561734},{"time_hours":314,"approval_perbill":500000000,"support_perbill":535627,"approval":50,"support":0.0535627},{"time_hours":315,"approval_perbill":500000000,"support_perbill":509684,"approval":50,"support":0.0509684},{"time_hours":316,"approval_perbill":500000000,"support_perbill":483902,"approval":50,"support":0.0483902},{"time_hours":317,"approval_perbill":500000000,"support_perbill":458280,"approval":50,"support":0.045828},{"time_hours":318,"approval_perbill":500000000,"support_perbill":432817,"approval":50,"support":0.0432817},{"time_hours":319,"approval_perbill":500000000,"support_perbill":407511,"approval":50,"support":0.0407511},{"time_hours":320,"approval_perbill":500000000,"support_perbill":382360,"approval":50,"support":0.038236},{"time_hours":321,"approval_perbill":500000000,"support_perbill":357364,"approval":50,"support":0.0357364},{"time_hours":322,"approval_perbill":500000000,"support_perbill":332520,"approval":50,"support":0.033252},{"time_hours":323,"approval_perbill":500000000,"support_perbill":307828,"approval":50,"support":0.0307828},{"time_hours":324,"approval_perbill":500000000,"support_perbill":283286,"approval":50,"support":0.0283286},{"time_hours":325,"approval_perbill":500000000,"support_perbill":258892,"approval":50,"support":0.0258892},{"time_hours":326,"approval_perbill":500000000,"support_perbill":234646,"approval":50,"support":0.0234646},{"time_hours":327,"approval_perbill":500000000,"support_perbill":210546,"approval":50,"support":0.0210546},{"time_hours":328,"approval_perbill":500000000,"support_perbill":186590,"approval":50,"support":0.018659},{"time_hours":329,"approval_perbill":500000000,"support_perbill":162778,"approval":50,"support":0.0162778},{"time_hours":330,"approval_perbill":500000000,"support_perbill":139108,"approval":50,"support":0.0139108},{"time_hours":331,"approval_perbill":500000000,"support_perbill":115578,"approval":50,"support":0.0115578},{"time_hours":332,"approval_perbill":500000000,"support_perbill":92188,"approval":50,"support":0.0092188},{"time_hours":333,"approval_perbill":500000000,"support_perbill":68937,"approval":50,"support":0.0068937},{"time_hours":334,"approval_perbill":500000000,"support_perbill":45822,"approval":50,"support":0.0045822},{"time_hours":335,"approval_perbill":500000000,"support_perbill":22844,"approval":50,"support":0.0022844},{"time_hours":336,"approval_perbill":500000000,"support_perbill":0,"approval":50,"support":0}]')},40149:p=>{"use strict";p.exports=JSON.parse('[{"time_hours":0,"approval_perbill":1000000000,"support_perbill":500000008,"approval":100,"support":50.0000008},{"time_hours":1,"approval_perbill":998511905,"support_perbill":472363240,"approval":99.8511905,"support":47.236324},{"time_hours":2,"approval_perbill":997023810,"support_perbill":447481262,"approval":99.702381,"support":44.7481262},{"time_hours":3,"approval_perbill":995535715,"support_perbill":424961730,"approval":99.5535715,"support":42.496173},{"time_hours":4,"approval_perbill":994047620,"support_perbill":404483449,"approval":99.404762,"support":40.4483449},{"time_hours":5,"approval_perbill":992559524,"support_perbill":385780901,"approval":99.2559524,"support":38.5780901},{"time_hours":6,"approval_perbill":991071429,"support_perbill":368632725,"approval":99.1071429,"support":36.8632725},{"time_hours":7,"approval_perbill":989583334,"support_perbill":352852868,"approval":98.9583334,"support":35.2852868},{"time_hours":8,"approval_perbill":988095239,"support_perbill":338283846,"approval":98.8095239,"support":33.8283846},{"time_hours":9,"approval_perbill":986607143,"support_perbill":324791433,"approval":98.6607143,"support":32.4791433},{"time_hours":10,"approval_perbill":985119048,"support_perbill":312260553,"approval":98.5119048,"support":31.2260553},{"time_hours":11,"approval_perbill":983630953,"support_perbill":300591949,"approval":98.3630953,"support":30.0591949},{"time_hours":12,"approval_perbill":982142858,"support_perbill":289699587,"approval":98.2142858,"support":28.9699587},{"time_hours":13,"approval_perbill":980654762,"support_perbill":279508494,"approval":98.0654762,"support":27.9508494},{"time_hours":14,"approval_perbill":979166667,"support_perbill":269953067,"approval":97.9166667,"support":26.9953067},{"time_hours":15,"approval_perbill":977678572,"support_perbill":260975623,"approval":97.7678572,"support":26.0975623},{"time_hours":16,"approval_perbill":976190477,"support_perbill":252525267,"approval":97.6190477,"support":25.2525267},{"time_hours":17,"approval_perbill":974702381,"support_perbill":244556897,"approval":97.4702381,"support":24.4556897},{"time_hours":18,"approval_perbill":973214286,"support_perbill":237030426,"approval":97.3214286,"support":23.7030426},{"time_hours":19,"approval_perbill":971726191,"support_perbill":229910079,"approval":97.1726191,"support":22.9910079},{"time_hours":20,"approval_perbill":970238096,"support_perbill":223163855,"approval":97.0238096,"support":22.3163855},{"time_hours":21,"approval_perbill":968750000,"support_perbill":216763018,"approval":96.875,"support":21.6763018},{"time_hours":22,"approval_perbill":967261905,"support_perbill":210681709,"approval":96.7261905,"support":21.0681709},{"time_hours":23,"approval_perbill":965773810,"support_perbill":204896583,"approval":96.577381,"support":20.4896583},{"time_hours":24,"approval_perbill":964285715,"support_perbill":199386516,"approval":96.4285715,"support":19.9386516},{"time_hours":25,"approval_perbill":962797620,"support_perbill":194132348,"approval":96.279762,"support":19.4132348},{"time_hours":26,"approval_perbill":961309524,"support_perbill":189116654,"approval":96.1309524,"support":18.9116654},{"time_hours":27,"approval_perbill":959821429,"support_perbill":184323563,"approval":95.9821429,"support":18.4323563},{"time_hours":28,"approval_perbill":958333334,"support_perbill":179738574,"approval":95.8333334,"support":17.9738574},{"time_hours":29,"approval_perbill":956845239,"support_perbill":175348424,"approval":95.6845239,"support":17.5348424},{"time_hours":30,"approval_perbill":955357143,"support_perbill":171140951,"approval":95.5357143,"support":17.1140951},{"time_hours":31,"approval_perbill":953869048,"support_perbill":167104986,"approval":95.3869048,"support":16.7104986},{"time_hours":32,"approval_perbill":952380953,"support_perbill":163230251,"approval":95.2380953,"support":16.3230251},{"time_hours":33,"approval_perbill":950892858,"support_perbill":159507276,"approval":95.0892858,"support":15.9507276},{"time_hours":34,"approval_perbill":949404762,"support_perbill":155927313,"approval":94.9404762,"support":15.5927313},{"time_hours":35,"approval_perbill":947916667,"support_perbill":152482280,"approval":94.7916667,"support":15.248228},{"time_hours":36,"approval_perbill":946428572,"support_perbill":149164688,"approval":94.6428572,"support":14.9164688},{"time_hours":37,"approval_perbill":944940477,"support_perbill":145967595,"approval":94.4940477,"support":14.5967595},{"time_hours":38,"approval_perbill":943452381,"support_perbill":142884551,"approval":94.3452381,"support":14.2884551},{"time_hours":39,"approval_perbill":941964286,"support_perbill":139909563,"approval":94.1964286,"support":13.9909563},{"time_hours":40,"approval_perbill":940476191,"support_perbill":137037046,"approval":94.0476191,"support":13.7037046},{"time_hours":41,"approval_perbill":938988096,"support_perbill":134261797,"approval":93.8988096,"support":13.4261797},{"time_hours":42,"approval_perbill":937500000,"support_perbill":131578956,"approval":93.75,"support":13.1578956},{"time_hours":43,"approval_perbill":936011905,"support_perbill":128983985,"approval":93.6011905,"support":12.8983985},{"time_hours":44,"approval_perbill":934523810,"support_perbill":126472636,"approval":93.452381,"support":12.6472636},{"time_hours":45,"approval_perbill":933035715,"support_perbill":124040929,"approval":93.3035715,"support":12.4040929},{"time_hours":46,"approval_perbill":931547620,"support_perbill":121685138,"approval":93.154762,"support":12.1685138},{"time_hours":47,"approval_perbill":930059524,"support_perbill":119401760,"approval":93.0059524,"support":11.940176},{"time_hours":48,"approval_perbill":928571429,"support_perbill":117187509,"approval":92.8571429,"support":11.7187509},{"time_hours":49,"approval_perbill":927083334,"support_perbill":115039290,"approval":92.7083334,"support":11.503929},{"time_hours":50,"approval_perbill":925595239,"support_perbill":112954195,"approval":92.5595239,"support":11.2954195},{"time_hours":51,"approval_perbill":924107143,"support_perbill":110929480,"approval":92.4107143,"support":11.092948},{"time_hours":52,"approval_perbill":922619048,"support_perbill":108962562,"approval":92.2619048,"support":10.8962562},{"time_hours":53,"approval_perbill":921130953,"support_perbill":107050999,"approval":92.1130953,"support":10.7050999},{"time_hours":54,"approval_perbill":919642858,"support_perbill":105192488,"approval":91.9642858,"support":10.5192488},{"time_hours":55,"approval_perbill":918154762,"support_perbill":103384849,"approval":91.8154762,"support":10.3384849},{"time_hours":56,"approval_perbill":916666667,"support_perbill":101626024,"approval":91.6666667,"support":10.1626024},{"time_hours":57,"approval_perbill":915178572,"support_perbill":99914060,"approval":91.5178572,"support":9.991406},{"time_hours":58,"approval_perbill":913690477,"support_perbill":98247109,"approval":91.3690477,"support":9.8247109},{"time_hours":59,"approval_perbill":912202381,"support_perbill":96623420,"approval":91.2202381,"support":9.662342},{"time_hours":60,"approval_perbill":910714286,"support_perbill":95041329,"approval":91.0714286,"support":9.5041329},{"time_hours":61,"approval_perbill":909226191,"support_perbill":93499259,"approval":90.9226191,"support":9.3499259},{"time_hours":62,"approval_perbill":907738096,"support_perbill":91995709,"approval":90.7738096,"support":9.1995709},{"time_hours":63,"approval_perbill":906250000,"support_perbill":90529254,"approval":90.625,"support":9.0529254},{"time_hours":64,"approval_perbill":904761905,"support_perbill":89098539,"approval":90.4761905,"support":8.9098539},{"time_hours":65,"approval_perbill":903273810,"support_perbill":87702272,"approval":90.327381,"support":8.7702272},{"time_hours":66,"approval_perbill":901785715,"support_perbill":86339224,"approval":90.1785715,"support":8.6339224},{"time_hours":67,"approval_perbill":900297620,"support_perbill":85008223,"approval":90.029762,"support":8.5008223},{"time_hours":68,"approval_perbill":898809524,"support_perbill":83708152,"approval":89.8809524,"support":8.3708152},{"time_hours":69,"approval_perbill":897321429,"support_perbill":82437946,"approval":89.7321429,"support":8.2437946},{"time_hours":70,"approval_perbill":895833334,"support_perbill":81196587,"approval":89.5833334,"support":8.1196587},{"time_hours":71,"approval_perbill":894345239,"support_perbill":79983104,"approval":89.4345239,"support":7.9983104},{"time_hours":72,"approval_perbill":892857143,"support_perbill":78796567,"approval":89.2857143,"support":7.8796567},{"time_hours":73,"approval_perbill":891369048,"support_perbill":77636090,"approval":89.1369048,"support":7.763609},{"time_hours":74,"approval_perbill":889880953,"support_perbill":76500823,"approval":88.9880953,"support":7.6500823},{"time_hours":75,"approval_perbill":888392858,"support_perbill":75389954,"approval":88.8392858,"support":7.5389954},{"time_hours":76,"approval_perbill":886904762,"support_perbill":74302703,"approval":88.6904762,"support":7.4302703},{"time_hours":77,"approval_perbill":885416667,"support_perbill":73238327,"approval":88.5416667,"support":7.3238327},{"time_hours":78,"approval_perbill":883928572,"support_perbill":72196110,"approval":88.3928572,"support":7.219611},{"time_hours":79,"approval_perbill":882440477,"support_perbill":71175368,"approval":88.2440477,"support":7.1175368},{"time_hours":80,"approval_perbill":880952381,"support_perbill":70175444,"approval":88.0952381,"support":7.0175444},{"time_hours":81,"approval_perbill":879464286,"support_perbill":69195707,"approval":87.9464286,"support":6.9195707},{"time_hours":82,"approval_perbill":877976191,"support_perbill":68235552,"approval":87.7976191,"support":6.8235552},{"time_hours":83,"approval_perbill":876488096,"support_perbill":67294398,"approval":87.6488096,"support":6.7294398},{"time_hours":84,"approval_perbill":875000000,"support_perbill":66371686,"approval":87.5,"support":6.6371686},{"time_hours":85,"approval_perbill":873511905,"support_perbill":65466880,"approval":87.3511905,"support":6.546688},{"time_hours":86,"approval_perbill":872023810,"support_perbill":64579464,"approval":87.202381,"support":6.4579464},{"time_hours":87,"approval_perbill":870535715,"support_perbill":63708939,"approval":87.0535715,"support":6.3708939},{"time_hours":88,"approval_perbill":869047620,"support_perbill":62854830,"approval":86.904762,"support":6.285483},{"time_hours":89,"approval_perbill":867559524,"support_perbill":62016676,"approval":86.7559524,"support":6.2016676},{"time_hours":90,"approval_perbill":866071429,"support_perbill":61194035,"approval":86.6071429,"support":6.1194035},{"time_hours":91,"approval_perbill":864583334,"support_perbill":60386478,"approval":86.4583334,"support":6.0386478},{"time_hours":92,"approval_perbill":863095239,"support_perbill":59593596,"approval":86.3095239,"support":5.9593596},{"time_hours":93,"approval_perbill":861607143,"support_perbill":58814991,"approval":86.1607143,"support":5.8814991},{"time_hours":94,"approval_perbill":860119048,"support_perbill":58050283,"approval":86.0119048,"support":5.8050283},{"time_hours":95,"approval_perbill":858630953,"support_perbill":57299101,"approval":85.8630953,"support":5.7299101},{"time_hours":96,"approval_perbill":857142858,"support_perbill":56561090,"approval":85.7142858,"support":5.656109},{"time_hours":97,"approval_perbill":855654762,"support_perbill":55835907,"approval":85.5654762,"support":5.5835907},{"time_hours":98,"approval_perbill":854166667,"support_perbill":55123221,"approval":85.4166667,"support":5.5123221},{"time_hours":99,"approval_perbill":852678572,"support_perbill":54422710,"approval":85.2678572,"support":5.442271},{"time_hours":100,"approval_perbill":851190477,"support_perbill":53734066,"approval":85.1190477,"support":5.3734066},{"time_hours":101,"approval_perbill":849702381,"support_perbill":53056989,"approval":84.9702381,"support":5.3056989},{"time_hours":102,"approval_perbill":848214286,"support_perbill":52391191,"approval":84.8214286,"support":5.2391191},{"time_hours":103,"approval_perbill":846726191,"support_perbill":51736392,"approval":84.6726191,"support":5.1736392},{"time_hours":104,"approval_perbill":845238096,"support_perbill":51092322,"approval":84.5238096,"support":5.1092322},{"time_hours":105,"approval_perbill":843750000,"support_perbill":50458719,"approval":84.375,"support":5.0458719},{"time_hours":106,"approval_perbill":842261905,"support_perbill":49835330,"approval":84.2261905,"support":4.983533},{"time_hours":107,"approval_perbill":840773810,"support_perbill":49221911,"approval":84.077381,"support":4.9221911},{"time_hours":108,"approval_perbill":839285715,"support_perbill":48618223,"approval":83.9285715,"support":4.8618223},{"time_hours":109,"approval_perbill":837797620,"support_perbill":48024037,"approval":83.779762,"support":4.8024037},{"time_hours":110,"approval_perbill":836309524,"support_perbill":47439130,"approval":83.6309524,"support":4.743913},{"time_hours":111,"approval_perbill":834821429,"support_perbill":46863288,"approval":83.4821429,"support":4.6863288},{"time_hours":112,"approval_perbill":833333334,"support_perbill":46296300,"approval":83.3333334,"support":4.62963},{"time_hours":113,"approval_perbill":831845239,"support_perbill":45737964,"approval":83.1845239,"support":4.5737964},{"time_hours":114,"approval_perbill":830357143,"support_perbill":45188083,"approval":83.0357143,"support":4.5188083},{"time_hours":115,"approval_perbill":828869048,"support_perbill":44646468,"approval":82.8869048,"support":4.4646468},{"time_hours":116,"approval_perbill":827380953,"support_perbill":44112932,"approval":82.7380953,"support":4.4112932},{"time_hours":117,"approval_perbill":825892858,"support_perbill":43587297,"approval":82.5892858,"support":4.3587297},{"time_hours":118,"approval_perbill":824404762,"support_perbill":43069388,"approval":82.4404762,"support":4.3069388},{"time_hours":119,"approval_perbill":822916667,"support_perbill":42559037,"approval":82.2916667,"support":4.2559037},{"time_hours":120,"approval_perbill":821428572,"support_perbill":42056078,"approval":82.1428572,"support":4.2056078},{"time_hours":121,"approval_perbill":819940477,"support_perbill":41560353,"approval":81.9940477,"support":4.1560353},{"time_hours":122,"approval_perbill":818452381,"support_perbill":41071706,"approval":81.8452381,"support":4.1071706},{"time_hours":123,"approval_perbill":816964286,"support_perbill":40589987,"approval":81.6964286,"support":4.0589987},{"time_hours":124,"approval_perbill":815476191,"support_perbill":40115050,"approval":81.5476191,"support":4.011505},{"time_hours":125,"approval_perbill":813988096,"support_perbill":39646752,"approval":81.3988096,"support":3.9646752},{"time_hours":126,"approval_perbill":812500000,"support_perbill":39184956,"approval":81.25,"support":3.9184956},{"time_hours":127,"approval_perbill":811011905,"support_perbill":38729526,"approval":81.1011905,"support":3.8729526},{"time_hours":128,"approval_perbill":809523810,"support_perbill":38280333,"approval":80.952381,"support":3.8280333},{"time_hours":129,"approval_perbill":808035715,"support_perbill":37837248,"approval":80.8035715,"support":3.7837248},{"time_hours":130,"approval_perbill":806547620,"support_perbill":37400148,"approval":80.654762,"support":3.7400148},{"time_hours":131,"approval_perbill":805059524,"support_perbill":36968913,"approval":80.5059524,"support":3.6968913},{"time_hours":132,"approval_perbill":803571429,"support_perbill":36543425,"approval":80.3571429,"support":3.6543425},{"time_hours":133,"approval_perbill":802083334,"support_perbill":36123570,"approval":80.2083334,"support":3.612357},{"time_hours":134,"approval_perbill":800595239,"support_perbill":35709238,"approval":80.0595239,"support":3.5709238},{"time_hours":135,"approval_perbill":799107143,"support_perbill":35300319,"approval":79.9107143,"support":3.5300319},{"time_hours":136,"approval_perbill":797619048,"support_perbill":34896708,"approval":79.7619048,"support":3.4896708},{"time_hours":137,"approval_perbill":796130953,"support_perbill":34498304,"approval":79.6130953,"support":3.4498304},{"time_hours":138,"approval_perbill":794642858,"support_perbill":34105005,"approval":79.4642858,"support":3.4105005},{"time_hours":139,"approval_perbill":793154762,"support_perbill":33716714,"approval":79.3154762,"support":3.3716714},{"time_hours":140,"approval_perbill":791666667,"support_perbill":33333336,"approval":79.1666667,"support":3.3333336},{"time_hours":141,"approval_perbill":790178572,"support_perbill":32954778,"approval":79.0178572,"support":3.2954778},{"time_hours":142,"approval_perbill":788690477,"support_perbill":32580951,"approval":78.8690477,"support":3.2580951},{"time_hours":143,"approval_perbill":787202381,"support_perbill":32211765,"approval":78.7202381,"support":3.2211765},{"time_hours":144,"approval_perbill":785714286,"support_perbill":31847136,"approval":78.5714286,"support":3.1847136},{"time_hours":145,"approval_perbill":784226191,"support_perbill":31486979,"approval":78.4226191,"support":3.1486979},{"time_hours":146,"approval_perbill":782738096,"support_perbill":31131212,"approval":78.2738096,"support":3.1131212},{"time_hours":147,"approval_perbill":781250000,"support_perbill":30779756,"approval":78.125,"support":3.0779756},{"time_hours":148,"approval_perbill":779761905,"support_perbill":30432533,"approval":77.9761905,"support":3.0432533},{"time_hours":149,"approval_perbill":778273810,"support_perbill":30089466,"approval":77.827381,"support":3.0089466},{"time_hours":150,"approval_perbill":776785715,"support_perbill":29750482,"approval":77.6785715,"support":2.9750482},{"time_hours":151,"approval_perbill":775297620,"support_perbill":29415508,"approval":77.529762,"support":2.9415508},{"time_hours":152,"approval_perbill":773809524,"support_perbill":29084473,"approval":77.3809524,"support":2.9084473},{"time_hours":153,"approval_perbill":772321429,"support_perbill":28757309,"approval":77.2321429,"support":2.8757309},{"time_hours":154,"approval_perbill":770833334,"support_perbill":28433948,"approval":77.0833334,"support":2.8433948},{"time_hours":155,"approval_perbill":769345239,"support_perbill":28114323,"approval":76.9345239,"support":2.8114323},{"time_hours":156,"approval_perbill":767857143,"support_perbill":27798371,"approval":76.7857143,"support":2.7798371},{"time_hours":157,"approval_perbill":766369048,"support_perbill":27486029,"approval":76.6369048,"support":2.7486029},{"time_hours":158,"approval_perbill":764880953,"support_perbill":27177234,"approval":76.4880953,"support":2.7177234},{"time_hours":159,"approval_perbill":763392858,"support_perbill":26871928,"approval":76.3392858,"support":2.6871928},{"time_hours":160,"approval_perbill":761904762,"support_perbill":26570050,"approval":76.1904762,"support":2.657005},{"time_hours":161,"approval_perbill":760416667,"support_perbill":26271544,"approval":76.0416667,"support":2.6271544},{"time_hours":162,"approval_perbill":758928572,"support_perbill":25976354,"approval":75.8928572,"support":2.5976354},{"time_hours":163,"approval_perbill":757440477,"support_perbill":25684425,"approval":75.7440477,"support":2.5684425},{"time_hours":164,"approval_perbill":755952381,"support_perbill":25395702,"approval":75.5952381,"support":2.5395702},{"time_hours":165,"approval_perbill":754464286,"support_perbill":25110134,"approval":75.4464286,"support":2.5110134},{"time_hours":166,"approval_perbill":752976191,"support_perbill":24827668,"approval":75.2976191,"support":2.4827668},{"time_hours":167,"approval_perbill":751488096,"support_perbill":24548256,"approval":75.1488096,"support":2.4548256},{"time_hours":168,"approval_perbill":750000000,"support_perbill":24271846,"approval":75,"support":2.4271846},{"time_hours":169,"approval_perbill":748511905,"support_perbill":23998392,"approval":74.8511905,"support":2.3998392},{"time_hours":170,"approval_perbill":747023810,"support_perbill":23727846,"approval":74.702381,"support":2.3727846},{"time_hours":171,"approval_perbill":745535715,"support_perbill":23460162,"approval":74.5535715,"support":2.3460162},{"time_hours":172,"approval_perbill":744047620,"support_perbill":23195295,"approval":74.404762,"support":2.3195295},{"time_hours":173,"approval_perbill":742559524,"support_perbill":22933200,"approval":74.2559524,"support":2.29332},{"time_hours":174,"approval_perbill":741071429,"support_perbill":22673834,"approval":74.1071429,"support":2.2673834},{"time_hours":175,"approval_perbill":739583334,"support_perbill":22417155,"approval":73.9583334,"support":2.2417155},{"time_hours":176,"approval_perbill":738095239,"support_perbill":22163122,"approval":73.8095239,"support":2.2163122},{"time_hours":177,"approval_perbill":736607143,"support_perbill":21911693,"approval":73.6607143,"support":2.1911693},{"time_hours":178,"approval_perbill":735119048,"support_perbill":21662829,"approval":73.5119048,"support":2.1662829},{"time_hours":179,"approval_perbill":733630953,"support_perbill":21416491,"approval":73.3630953,"support":2.1416491},{"time_hours":180,"approval_perbill":732142858,"support_perbill":21172640,"approval":73.2142858,"support":2.117264},{"time_hours":181,"approval_perbill":730654762,"support_perbill":20931239,"approval":73.0654762,"support":2.0931239},{"time_hours":182,"approval_perbill":729166667,"support_perbill":20692251,"approval":72.9166667,"support":2.0692251},{"time_hours":183,"approval_perbill":727678572,"support_perbill":20455641,"approval":72.7678572,"support":2.0455641},{"time_hours":184,"approval_perbill":726190477,"support_perbill":20221372,"approval":72.6190477,"support":2.0221372},{"time_hours":185,"approval_perbill":724702381,"support_perbill":19989411,"approval":72.4702381,"support":1.9989411},{"time_hours":186,"approval_perbill":723214286,"support_perbill":19759723,"approval":72.3214286,"support":1.9759723},{"time_hours":187,"approval_perbill":721726191,"support_perbill":19532275,"approval":72.1726191,"support":1.9532275},{"time_hours":188,"approval_perbill":720238096,"support_perbill":19307035,"approval":72.0238096,"support":1.9307035},{"time_hours":189,"approval_perbill":718750000,"support_perbill":19083971,"approval":71.875,"support":1.9083971},{"time_hours":190,"approval_perbill":717261905,"support_perbill":18863050,"approval":71.7261905,"support":1.886305},{"time_hours":191,"approval_perbill":715773810,"support_perbill":18644243,"approval":71.577381,"support":1.8644243},{"time_hours":192,"approval_perbill":714285715,"support_perbill":18427520,"approval":71.4285715,"support":1.842752},{"time_hours":193,"approval_perbill":712797620,"support_perbill":18212849,"approval":71.279762,"support":1.8212849},{"time_hours":194,"approval_perbill":711309524,"support_perbill":18000204,"approval":71.1309524,"support":1.8000204},{"time_hours":195,"approval_perbill":709821429,"support_perbill":17789554,"approval":70.9821429,"support":1.7789554},{"time_hours":196,"approval_perbill":708333334,"support_perbill":17580873,"approval":70.8333334,"support":1.7580873},{"time_hours":197,"approval_perbill":706845239,"support_perbill":17374132,"approval":70.6845239,"support":1.7374132},{"time_hours":198,"approval_perbill":705357143,"support_perbill":17169305,"approval":70.5357143,"support":1.7169305},{"time_hours":199,"approval_perbill":703869048,"support_perbill":16966366,"approval":70.3869048,"support":1.6966366},{"time_hours":200,"approval_perbill":702380953,"support_perbill":16765287,"approval":70.2380953,"support":1.6765287},{"time_hours":201,"approval_perbill":700892858,"support_perbill":16566044,"approval":70.0892858,"support":1.6566044},{"time_hours":202,"approval_perbill":699404762,"support_perbill":16368612,"approval":69.9404762,"support":1.6368612},{"time_hours":203,"approval_perbill":697916667,"support_perbill":16172967,"approval":69.7916667,"support":1.6172967},{"time_hours":204,"approval_perbill":696428572,"support_perbill":15979083,"approval":69.6428572,"support":1.5979083},{"time_hours":205,"approval_perbill":694940477,"support_perbill":15786938,"approval":69.4940477,"support":1.5786938},{"time_hours":206,"approval_perbill":693452381,"support_perbill":15596507,"approval":69.3452381,"support":1.5596507},{"time_hours":207,"approval_perbill":691964286,"support_perbill":15407769,"approval":69.1964286,"support":1.5407769},{"time_hours":208,"approval_perbill":690476191,"support_perbill":15220701,"approval":69.0476191,"support":1.5220701},{"time_hours":209,"approval_perbill":688988096,"support_perbill":15035280,"approval":68.8988096,"support":1.503528},{"time_hours":210,"approval_perbill":687500000,"support_perbill":14851486,"approval":68.75,"support":1.4851486},{"time_hours":211,"approval_perbill":686011905,"support_perbill":14669296,"approval":68.6011905,"support":1.4669296},{"time_hours":212,"approval_perbill":684523810,"support_perbill":14488690,"approval":68.452381,"support":1.448869},{"time_hours":213,"approval_perbill":683035715,"support_perbill":14309648,"approval":68.3035715,"support":1.4309648},{"time_hours":214,"approval_perbill":681547620,"support_perbill":14132148,"approval":68.154762,"support":1.4132148},{"time_hours":215,"approval_perbill":680059524,"support_perbill":13956171,"approval":68.0059524,"support":1.3956171},{"time_hours":216,"approval_perbill":678571429,"support_perbill":13781699,"approval":67.8571429,"support":1.3781699},{"time_hours":217,"approval_perbill":677083334,"support_perbill":13608710,"approval":67.7083334,"support":1.360871},{"time_hours":218,"approval_perbill":675595239,"support_perbill":13437188,"approval":67.5595239,"support":1.3437188},{"time_hours":219,"approval_perbill":674107143,"support_perbill":13267112,"approval":67.4107143,"support":1.3267112},{"time_hours":220,"approval_perbill":672619048,"support_perbill":13098465,"approval":67.2619048,"support":1.3098465},{"time_hours":221,"approval_perbill":671130953,"support_perbill":12931229,"approval":67.1130953,"support":1.2931229},{"time_hours":222,"approval_perbill":669642858,"support_perbill":12765386,"approval":66.9642858,"support":1.2765386},{"time_hours":223,"approval_perbill":668154762,"support_perbill":12600919,"approval":66.8154762,"support":1.2600919},{"time_hours":224,"approval_perbill":666666667,"support_perbill":12437812,"approval":66.6666667,"support":1.2437812},{"time_hours":225,"approval_perbill":665178572,"support_perbill":12276046,"approval":66.5178572,"support":1.2276046},{"time_hours":226,"approval_perbill":663690477,"support_perbill":12115605,"approval":66.3690477,"support":1.2115605},{"time_hours":227,"approval_perbill":662202381,"support_perbill":11956475,"approval":66.2202381,"support":1.1956475},{"time_hours":228,"approval_perbill":660714286,"support_perbill":11798637,"approval":66.0714286,"support":1.1798637},{"time_hours":229,"approval_perbill":659226191,"support_perbill":11642077,"approval":65.9226191,"support":1.1642077},{"time_hours":230,"approval_perbill":657738096,"support_perbill":11486780,"approval":65.7738096,"support":1.148678},{"time_hours":231,"approval_perbill":656250000,"support_perbill":11332729,"approval":65.625,"support":1.1332729},{"time_hours":232,"approval_perbill":654761905,"support_perbill":11179911,"approval":65.4761905,"support":1.1179911},{"time_hours":233,"approval_perbill":653273810,"support_perbill":11028310,"approval":65.327381,"support":1.102831},{"time_hours":234,"approval_perbill":651785715,"support_perbill":10877912,"approval":65.1785715,"support":1.0877912},{"time_hours":235,"approval_perbill":650297620,"support_perbill":10728702,"approval":65.029762,"support":1.0728702},{"time_hours":236,"approval_perbill":648809524,"support_perbill":10580667,"approval":64.8809524,"support":1.0580667},{"time_hours":237,"approval_perbill":647321429,"support_perbill":10433793,"approval":64.7321429,"support":1.0433793},{"time_hours":238,"approval_perbill":645833334,"support_perbill":10288066,"approval":64.5833334,"support":1.0288066},{"time_hours":239,"approval_perbill":644345239,"support_perbill":10143473,"approval":64.4345239,"support":1.0143473},{"time_hours":240,"approval_perbill":642857143,"support_perbill":10000000,"approval":64.2857143,"support":1},{"time_hours":241,"approval_perbill":641369048,"support_perbill":9857635,"approval":64.1369048,"support":0.9857635},{"time_hours":242,"approval_perbill":639880953,"support_perbill":9716365,"approval":63.9880953,"support":0.9716365},{"time_hours":243,"approval_perbill":638392858,"support_perbill":9576177,"approval":63.8392858,"support":0.9576177},{"time_hours":244,"approval_perbill":636904762,"support_perbill":9437059,"approval":63.6904762,"support":0.9437059},{"time_hours":245,"approval_perbill":635416667,"support_perbill":9298999,"approval":63.5416667,"support":0.9298999},{"time_hours":246,"approval_perbill":633928572,"support_perbill":9161984,"approval":63.3928572,"support":0.9161984},{"time_hours":247,"approval_perbill":632440477,"support_perbill":9026003,"approval":63.2440477,"support":0.9026003},{"time_hours":248,"approval_perbill":630952381,"support_perbill":8891045,"approval":63.0952381,"support":0.8891045},{"time_hours":249,"approval_perbill":629464286,"support_perbill":8757097,"approval":62.9464286,"support":0.8757097},{"time_hours":250,"approval_perbill":627976191,"support_perbill":8624148,"approval":62.7976191,"support":0.8624148},{"time_hours":251,"approval_perbill":626488096,"support_perbill":8492187,"approval":62.6488096,"support":0.8492187},{"time_hours":252,"approval_perbill":625000000,"support_perbill":8361204,"approval":62.5,"support":0.8361204},{"time_hours":253,"approval_perbill":623511905,"support_perbill":8231187,"approval":62.3511905,"support":0.8231187},{"time_hours":254,"approval_perbill":622023810,"support_perbill":8102127,"approval":62.202381,"support":0.8102127},{"time_hours":255,"approval_perbill":620535715,"support_perbill":7974011,"approval":62.0535715,"support":0.7974011},{"time_hours":256,"approval_perbill":619047620,"support_perbill":7846830,"approval":61.904762,"support":0.784683},{"time_hours":257,"approval_perbill":617559524,"support_perbill":7720574,"approval":61.7559524,"support":0.7720574},{"time_hours":258,"approval_perbill":616071429,"support_perbill":7595233,"approval":61.6071429,"support":0.7595233},{"time_hours":259,"approval_perbill":614583334,"support_perbill":7470796,"approval":61.4583334,"support":0.7470796},{"time_hours":260,"approval_perbill":613095239,"support_perbill":7347255,"approval":61.3095239,"support":0.7347255},{"time_hours":261,"approval_perbill":611607143,"support_perbill":7224598,"approval":61.1607143,"support":0.7224598},{"time_hours":262,"approval_perbill":610119048,"support_perbill":7102818,"approval":61.0119048,"support":0.7102818},{"time_hours":263,"approval_perbill":608630953,"support_perbill":6981905,"approval":60.8630953,"support":0.6981905},{"time_hours":264,"approval_perbill":607142858,"support_perbill":6861848,"approval":60.7142858,"support":0.6861848},{"time_hours":265,"approval_perbill":605654762,"support_perbill":6742640,"approval":60.5654762,"support":0.674264},{"time_hours":266,"approval_perbill":604166667,"support_perbill":6624271,"approval":60.4166667,"support":0.6624271},{"time_hours":267,"approval_perbill":602678572,"support_perbill":6506733,"approval":60.2678572,"support":0.6506733},{"time_hours":268,"approval_perbill":601190477,"support_perbill":6390017,"approval":60.1190477,"support":0.6390017},{"time_hours":269,"approval_perbill":599702381,"support_perbill":6274113,"approval":59.9702381,"support":0.6274113},{"time_hours":270,"approval_perbill":598214286,"support_perbill":6159015,"approval":59.8214286,"support":0.6159015},{"time_hours":271,"approval_perbill":596726191,"support_perbill":6044712,"approval":59.6726191,"support":0.6044712},{"time_hours":272,"approval_perbill":595238096,"support_perbill":5931198,"approval":59.5238096,"support":0.5931198},{"time_hours":273,"approval_perbill":593750000,"support_perbill":5818464,"approval":59.375,"support":0.5818464},{"time_hours":274,"approval_perbill":592261905,"support_perbill":5706502,"approval":59.2261905,"support":0.5706502},{"time_hours":275,"approval_perbill":590773810,"support_perbill":5595304,"approval":59.077381,"support":0.5595304},{"time_hours":276,"approval_perbill":589285715,"support_perbill":5484862,"approval":58.9285715,"support":0.5484862},{"time_hours":277,"approval_perbill":587797620,"support_perbill":5375169,"approval":58.779762,"support":0.5375169},{"time_hours":278,"approval_perbill":586309524,"support_perbill":5266216,"approval":58.6309524,"support":0.5266216},{"time_hours":279,"approval_perbill":584821429,"support_perbill":5157998,"approval":58.4821429,"support":0.5157998},{"time_hours":280,"approval_perbill":583333334,"support_perbill":5050505,"approval":58.3333334,"support":0.5050505},{"time_hours":281,"approval_perbill":581845239,"support_perbill":4943731,"approval":58.1845239,"support":0.4943731},{"time_hours":282,"approval_perbill":580357143,"support_perbill":4837669,"approval":58.0357143,"support":0.4837669},{"time_hours":283,"approval_perbill":578869048,"support_perbill":4732312,"approval":57.8869048,"support":0.4732312},{"time_hours":284,"approval_perbill":577380953,"support_perbill":4627652,"approval":57.7380953,"support":0.4627652},{"time_hours":285,"approval_perbill":575892858,"support_perbill":4523683,"approval":57.5892858,"support":0.4523683},{"time_hours":286,"approval_perbill":574404762,"support_perbill":4420397,"approval":57.4404762,"support":0.4420397},{"time_hours":287,"approval_perbill":572916667,"support_perbill":4317789,"approval":57.2916667,"support":0.4317789},{"time_hours":288,"approval_perbill":571428572,"support_perbill":4215851,"approval":57.1428572,"support":0.4215851},{"time_hours":289,"approval_perbill":569940477,"support_perbill":4114578,"approval":56.9940477,"support":0.4114578},{"time_hours":290,"approval_perbill":568452381,"support_perbill":4013961,"approval":56.8452381,"support":0.4013961},{"time_hours":291,"approval_perbill":566964286,"support_perbill":3913996,"approval":56.6964286,"support":0.3913996},{"time_hours":292,"approval_perbill":565476191,"support_perbill":3814676,"approval":56.5476191,"support":0.3814676},{"time_hours":293,"approval_perbill":563988096,"support_perbill":3715994,"approval":56.3988096,"support":0.3715994},{"time_hours":294,"approval_perbill":562500000,"support_perbill":3617945,"approval":56.25,"support":0.3617945},{"time_hours":295,"approval_perbill":561011905,"support_perbill":3520522,"approval":56.1011905,"support":0.3520522},{"time_hours":296,"approval_perbill":559523810,"support_perbill":3423719,"approval":55.952381,"support":0.3423719},{"time_hours":297,"approval_perbill":558035715,"support_perbill":3327531,"approval":55.8035715,"support":0.3327531},{"time_hours":298,"approval_perbill":556547620,"support_perbill":3231952,"approval":55.654762,"support":0.3231952},{"time_hours":299,"approval_perbill":555059524,"support_perbill":3136975,"approval":55.5059524,"support":0.3136975},{"time_hours":300,"approval_perbill":553571429,"support_perbill":3042596,"approval":55.3571429,"support":0.3042596},{"time_hours":301,"approval_perbill":552083334,"support_perbill":2948808,"approval":55.2083334,"support":0.2948808},{"time_hours":302,"approval_perbill":550595239,"support_perbill":2855607,"approval":55.0595239,"support":0.2855607},{"time_hours":303,"approval_perbill":549107143,"support_perbill":2762986,"approval":54.9107143,"support":0.2762986},{"time_hours":304,"approval_perbill":547619048,"support_perbill":2670940,"approval":54.7619048,"support":0.267094},{"time_hours":305,"approval_perbill":546130953,"support_perbill":2579464,"approval":54.6130953,"support":0.2579464},{"time_hours":306,"approval_perbill":544642858,"support_perbill":2488552,"approval":54.4642858,"support":0.2488552},{"time_hours":307,"approval_perbill":543154762,"support_perbill":2398200,"approval":54.3154762,"support":0.23982},{"time_hours":308,"approval_perbill":541666667,"support_perbill":2308402,"approval":54.1666667,"support":0.2308402},{"time_hours":309,"approval_perbill":540178572,"support_perbill":2219153,"approval":54.0178572,"support":0.2219153},{"time_hours":310,"approval_perbill":538690477,"support_perbill":2130449,"approval":53.8690477,"support":0.2130449},{"time_hours":311,"approval_perbill":537202381,"support_perbill":2042283,"approval":53.7202381,"support":0.2042283},{"time_hours":312,"approval_perbill":535714286,"support_perbill":1954652,"approval":53.5714286,"support":0.1954652},{"time_hours":313,"approval_perbill":534226191,"support_perbill":1867550,"approval":53.4226191,"support":0.186755},{"time_hours":314,"approval_perbill":532738096,"support_perbill":1780972,"approval":53.2738096,"support":0.1780972},{"time_hours":315,"approval_perbill":531250000,"support_perbill":1694915,"approval":53.125,"support":0.1694915},{"time_hours":316,"approval_perbill":529761905,"support_perbill":1609373,"approval":52.9761905,"support":0.1609373},{"time_hours":317,"approval_perbill":528273810,"support_perbill":1524341,"approval":52.827381,"support":0.1524341},{"time_hours":318,"approval_perbill":526785715,"support_perbill":1439815,"approval":52.6785715,"support":0.1439815},{"time_hours":319,"approval_perbill":525297620,"support_perbill":1355791,"approval":52.529762,"support":0.1355791},{"time_hours":320,"approval_perbill":523809524,"support_perbill":1272264,"approval":52.3809524,"support":0.1272264},{"time_hours":321,"approval_perbill":522321429,"support_perbill":1189230,"approval":52.2321429,"support":0.118923},{"time_hours":322,"approval_perbill":520833334,"support_perbill":1106684,"approval":52.0833334,"support":0.1106684},{"time_hours":323,"approval_perbill":519345239,"support_perbill":1024622,"approval":51.9345239,"support":0.1024622},{"time_hours":324,"approval_perbill":517857143,"support_perbill":943040,"approval":51.7857143,"support":0.094304},{"time_hours":325,"approval_perbill":516369048,"support_perbill":861933,"approval":51.6369048,"support":0.0861933},{"time_hours":326,"approval_perbill":514880953,"support_perbill":781298,"approval":51.4880953,"support":0.0781298},{"time_hours":327,"approval_perbill":513392858,"support_perbill":701131,"approval":51.3392858,"support":0.0701131},{"time_hours":328,"approval_perbill":511904762,"support_perbill":621426,"approval":51.1904762,"support":0.0621426},{"time_hours":329,"approval_perbill":510416667,"support_perbill":542181,"approval":51.0416667,"support":0.0542181},{"time_hours":330,"approval_perbill":508928572,"support_perbill":463392,"approval":50.8928572,"support":0.0463392},{"time_hours":331,"approval_perbill":507440477,"support_perbill":385053,"approval":50.7440477,"support":0.0385053},{"time_hours":332,"approval_perbill":505952381,"support_perbill":307163,"approval":50.5952381,"support":0.0307163},{"time_hours":333,"approval_perbill":504464286,"support_perbill":229716,"approval":50.4464286,"support":0.0229716},{"time_hours":334,"approval_perbill":502976191,"support_perbill":152709,"approval":50.2976191,"support":0.0152709},{"time_hours":335,"approval_perbill":501488096,"support_perbill":76138,"approval":50.1488096,"support":0.0076138},{"time_hours":336,"approval_perbill":500000000,"support_perbill":0,"approval":50,"support":0}]')},50902:p=>{"use strict";p.exports=JSON.parse('[{"time_hours":0,"approval_perbill":1000000000,"support_perbill":500000038,"approval":100,"support":50.0000038},{"time_hours":1,"approval_perbill":995833334,"support_perbill":366120266,"approval":99.5833334,"support":36.6120266},{"time_hours":2,"approval_perbill":991666668,"support_perbill":288428371,"approval":99.1666668,"support":28.8428371},{"time_hours":3,"approval_perbill":987500001,"support_perbill":237687395,"approval":98.7500001,"support":23.7687395},{"time_hours":4,"approval_perbill":983333335,"support_perbill":201946501,"approval":98.3333335,"support":20.1946501},{"time_hours":5,"approval_perbill":979166668,"support_perbill":175410725,"approval":97.9166668,"support":17.5410725},{"time_hours":6,"approval_perbill":975000002,"support_perbill":154929598,"approval":97.5000002,"support":15.4929598},{"time_hours":7,"approval_perbill":970833334,"support_perbill":138643083,"approval":97.0833334,"support":13.8643083},{"time_hours":8,"approval_perbill":966666668,"support_perbill":125382279,"approval":96.6666668,"support":12.5382279},{"time_hours":9,"approval_perbill":962500001,"support_perbill":114375668,"approval":96.2500001,"support":11.4375668},{"time_hours":10,"approval_perbill":958333335,"support_perbill":105093501,"approval":95.8333335,"support":10.5093501},{"time_hours":11,"approval_perbill":954166667,"support_perbill":97159951,"approval":95.4166667,"support":9.7159951},{"time_hours":12,"approval_perbill":950000001,"support_perbill":90301014,"approval":95.0000001,"support":9.0301014},{"time_hours":13,"approval_perbill":945833334,"support_perbill":84312199,"approval":94.5833334,"support":8.4312199},{"time_hours":14,"approval_perbill":941666668,"support_perbill":79037810,"approval":94.1666668,"support":7.903781},{"time_hours":15,"approval_perbill":937500001,"support_perbill":74357200,"approval":93.7500001,"support":7.43572},{"time_hours":16,"approval_perbill":933333335,"support_perbill":70175447,"approval":93.3333335,"support":7.0175447},{"time_hours":17,"approval_perbill":929166667,"support_perbill":66416830,"approval":92.9166667,"support":6.641683},{"time_hours":18,"approval_perbill":925000001,"support_perbill":63020221,"approval":92.5000001,"support":6.3020221},{"time_hours":19,"approval_perbill":920833334,"support_perbill":59935722,"approval":92.0833334,"support":5.9935722},{"time_hours":20,"approval_perbill":916666668,"support_perbill":57122204,"approval":91.6666668,"support":5.7122204},{"time_hours":21,"approval_perbill":912500000,"support_perbill":54545460,"approval":91.25,"support":5.454546},{"time_hours":22,"approval_perbill":908333334,"support_perbill":52176808,"approval":90.8333334,"support":5.2176808},{"time_hours":23,"approval_perbill":904166668,"support_perbill":49992020,"approval":90.4166668,"support":4.999202},{"time_hours":24,"approval_perbill":900000001,"support_perbill":47970485,"approval":90.0000001,"support":4.7970485},{"time_hours":25,"approval_perbill":895833335,"support_perbill":46094566,"approval":89.5833335,"support":4.6094566},{"time_hours":26,"approval_perbill":891666668,"support_perbill":44349075,"approval":89.1666668,"support":4.4349075},{"time_hours":27,"approval_perbill":887500002,"support_perbill":42720867,"approval":88.7500002,"support":4.2720867},{"time_hours":28,"approval_perbill":883333334,"support_perbill":41198506,"approval":88.3333334,"support":4.1198506},{"time_hours":29,"approval_perbill":879166668,"support_perbill":39771995,"approval":87.9166668,"support":3.9771995},{"time_hours":30,"approval_perbill":875000001,"support_perbill":38432558,"approval":87.5000001,"support":3.8432558},{"time_hours":31,"approval_perbill":870833335,"support_perbill":37172460,"approval":87.0833335,"support":3.717246},{"time_hours":32,"approval_perbill":866666667,"support_perbill":35984852,"approval":86.6666667,"support":3.5984852},{"time_hours":33,"approval_perbill":862500001,"support_perbill":34863656,"approval":86.2500001,"support":3.4863656},{"time_hours":34,"approval_perbill":858333334,"support_perbill":33803451,"approval":85.8333334,"support":3.3803451},{"time_hours":35,"approval_perbill":854166668,"support_perbill":32799393,"approval":85.4166668,"support":3.2799393},{"time_hours":36,"approval_perbill":850000001,"support_perbill":31847137,"approval":85.0000001,"support":3.1847137},{"time_hours":37,"approval_perbill":845833335,"support_perbill":30942774,"approval":84.5833335,"support":3.0942774},{"time_hours":38,"approval_perbill":841666667,"support_perbill":30082781,"approval":84.1666667,"support":3.0082781},{"time_hours":39,"approval_perbill":837500001,"support_perbill":29263970,"approval":83.7500001,"support":2.926397},{"time_hours":40,"approval_perbill":833333334,"support_perbill":28483451,"approval":83.3333334,"support":2.8483451},{"time_hours":41,"approval_perbill":829166668,"support_perbill":27738602,"approval":82.9166668,"support":2.7738602},{"time_hours":42,"approval_perbill":825000000,"support_perbill":27027029,"approval":82.5,"support":2.7027029},{"time_hours":43,"approval_perbill":820833334,"support_perbill":26346554,"approval":82.0833334,"support":2.6346554},{"time_hours":44,"approval_perbill":816666668,"support_perbill":25695180,"approval":81.6666668,"support":2.569518},{"time_hours":45,"approval_perbill":812500001,"support_perbill":25071080,"approval":81.2500001,"support":2.507108},{"time_hours":46,"approval_perbill":808333335,"support_perbill":24472576,"approval":80.8333335,"support":2.4472576},{"time_hours":47,"approval_perbill":804166668,"support_perbill":23898125,"approval":80.4166668,"support":2.3898125},{"time_hours":48,"approval_perbill":800000002,"support_perbill":23346306,"approval":80.0000002,"support":2.3346306},{"time_hours":49,"approval_perbill":795833334,"support_perbill":22815806,"approval":79.5833334,"support":2.2815806},{"time_hours":50,"approval_perbill":791666668,"support_perbill":22305415,"approval":79.1666668,"support":2.2305415},{"time_hours":51,"approval_perbill":787500001,"support_perbill":21814009,"approval":78.7500001,"support":2.1814009},{"time_hours":52,"approval_perbill":783333335,"support_perbill":21340549,"approval":78.3333335,"support":2.1340549},{"time_hours":53,"approval_perbill":779166667,"support_perbill":20884069,"approval":77.9166667,"support":2.0884069},{"time_hours":54,"approval_perbill":775000001,"support_perbill":20443673,"approval":77.5000001,"support":2.0443673},{"time_hours":55,"approval_perbill":770833334,"support_perbill":20018524,"approval":77.0833334,"support":2.0018524},{"time_hours":56,"approval_perbill":766666668,"support_perbill":19607845,"approval":76.6666668,"support":1.9607845},{"time_hours":57,"approval_perbill":762500001,"support_perbill":19210908,"approval":76.2500001,"support":1.9210908},{"time_hours":58,"approval_perbill":758333335,"support_perbill":18827037,"approval":75.8333335,"support":1.8827037},{"time_hours":59,"approval_perbill":754166667,"support_perbill":18455595,"approval":75.4166667,"support":1.8455595},{"time_hours":60,"approval_perbill":750000001,"support_perbill":18095989,"approval":75.0000001,"support":1.8095989},{"time_hours":61,"approval_perbill":745833334,"support_perbill":17747662,"approval":74.5833334,"support":1.7747662},{"time_hours":62,"approval_perbill":741666668,"support_perbill":17410092,"approval":74.1666668,"support":1.7410092},{"time_hours":63,"approval_perbill":737500000,"support_perbill":17082787,"approval":73.75,"support":1.7082787},{"time_hours":64,"approval_perbill":733333334,"support_perbill":16765287,"approval":73.3333334,"support":1.6765287},{"time_hours":65,"approval_perbill":729166668,"support_perbill":16457158,"approval":72.9166668,"support":1.6457158},{"time_hours":66,"approval_perbill":725000001,"support_perbill":16157990,"approval":72.5000001,"support":1.615799},{"time_hours":67,"approval_perbill":720833335,"support_perbill":15867399,"approval":72.0833335,"support":1.5867399},{"time_hours":68,"approval_perbill":716666668,"support_perbill":15585021,"approval":71.6666668,"support":1.5585021},{"time_hours":69,"approval_perbill":712500002,"support_perbill":15310512,"approval":71.2500002,"support":1.5310512},{"time_hours":70,"approval_perbill":708333334,"support_perbill":15043548,"approval":70.8333334,"support":1.5043548},{"time_hours":71,"approval_perbill":704166668,"support_perbill":14783823,"approval":70.4166668,"support":1.4783823},{"time_hours":72,"approval_perbill":700000001,"support_perbill":14531045,"approval":70.0000001,"support":1.4531045},{"time_hours":73,"approval_perbill":695833335,"support_perbill":14284939,"approval":69.5833335,"support":1.4284939},{"time_hours":74,"approval_perbill":691666667,"support_perbill":14045246,"approval":69.1666667,"support":1.4045246},{"time_hours":75,"approval_perbill":687500001,"support_perbill":13811717,"approval":68.7500001,"support":1.3811717},{"time_hours":76,"approval_perbill":683333334,"support_perbill":13584118,"approval":68.3333334,"support":1.3584118},{"time_hours":77,"approval_perbill":679166668,"support_perbill":13362226,"approval":67.9166668,"support":1.3362226},{"time_hours":78,"approval_perbill":675000001,"support_perbill":13145828,"approval":67.5000001,"support":1.3145828},{"time_hours":79,"approval_perbill":670833335,"support_perbill":12934723,"approval":67.0833335,"support":1.2934723},{"time_hours":80,"approval_perbill":666666667,"support_perbill":12728720,"approval":66.6666667,"support":1.272872},{"time_hours":81,"approval_perbill":662500001,"support_perbill":12527635,"approval":66.2500001,"support":1.2527635},{"time_hours":82,"approval_perbill":658333334,"support_perbill":12331295,"approval":65.8333334,"support":1.2331295},{"time_hours":83,"approval_perbill":654166668,"support_perbill":12139533,"approval":65.4166668,"support":1.2139533},{"time_hours":84,"approval_perbill":650000000,"support_perbill":11952192,"approval":65,"support":1.1952192},{"time_hours":85,"approval_perbill":645833334,"support_perbill":11769120,"approval":64.5833334,"support":1.176912},{"time_hours":86,"approval_perbill":641666668,"support_perbill":11590172,"approval":64.1666668,"support":1.1590172},{"time_hours":87,"approval_perbill":637500001,"support_perbill":11415212,"approval":63.7500001,"support":1.1415212},{"time_hours":88,"approval_perbill":633333335,"support_perbill":11244107,"approval":63.3333335,"support":1.1244107},{"time_hours":89,"approval_perbill":629166668,"support_perbill":11076731,"approval":62.9166668,"support":1.1076731},{"time_hours":90,"approval_perbill":625000002,"support_perbill":10912963,"approval":62.5000002,"support":1.0912963},{"time_hours":91,"approval_perbill":620833334,"support_perbill":10752689,"approval":62.0833334,"support":1.0752689},{"time_hours":92,"approval_perbill":616666668,"support_perbill":10595797,"approval":61.6666668,"support":1.0595797},{"time_hours":93,"approval_perbill":612500001,"support_perbill":10442182,"approval":61.2500001,"support":1.0442182},{"time_hours":94,"approval_perbill":608333335,"support_perbill":10291742,"approval":60.8333335,"support":1.0291742},{"time_hours":95,"approval_perbill":604166667,"support_perbill":10144379,"approval":60.4166667,"support":1.0144379},{"time_hours":96,"approval_perbill":600000001,"support_perbill":10000001,"approval":60.0000001,"support":1.0000001},{"time_hours":97,"approval_perbill":595833334,"support_perbill":9858516,"approval":59.5833334,"support":0.9858516},{"time_hours":98,"approval_perbill":591666668,"support_perbill":9719840,"approval":59.1666668,"support":0.971984},{"time_hours":99,"approval_perbill":587500001,"support_perbill":9583890,"approval":58.7500001,"support":0.958389},{"time_hours":100,"approval_perbill":583333335,"support_perbill":9450585,"approval":58.3333335,"support":0.9450585},{"time_hours":101,"approval_perbill":579166667,"support_perbill":9319850,"approval":57.9166667,"support":0.931985},{"time_hours":102,"approval_perbill":575000001,"support_perbill":9191610,"approval":57.5000001,"support":0.919161},{"time_hours":103,"approval_perbill":570833334,"support_perbill":9065795,"approval":57.0833334,"support":0.9065795},{"time_hours":104,"approval_perbill":566666668,"support_perbill":8942338,"approval":56.6666668,"support":0.8942338},{"time_hours":105,"approval_perbill":562500000,"support_perbill":8821171,"approval":56.25,"support":0.8821171},{"time_hours":106,"approval_perbill":558333334,"support_perbill":8702233,"approval":55.8333334,"support":0.8702233},{"time_hours":107,"approval_perbill":554166668,"support_perbill":8585461,"approval":55.4166668,"support":0.8585461},{"time_hours":108,"approval_perbill":550000001,"support_perbill":8470798,"approval":55.0000001,"support":0.8470798},{"time_hours":109,"approval_perbill":545833335,"support_perbill":8358187,"approval":54.5833335,"support":0.8358187},{"time_hours":110,"approval_perbill":541666668,"support_perbill":8247573,"approval":54.1666668,"support":0.8247573},{"time_hours":111,"approval_perbill":537500002,"support_perbill":8138904,"approval":53.7500002,"support":0.8138904},{"time_hours":112,"approval_perbill":533333334,"support_perbill":8032129,"approval":53.3333334,"support":0.8032129},{"time_hours":113,"approval_perbill":529166668,"support_perbill":7927198,"approval":52.9166668,"support":0.7927198},{"time_hours":114,"approval_perbill":525000001,"support_perbill":7824065,"approval":52.5000001,"support":0.7824065},{"time_hours":115,"approval_perbill":520833335,"support_perbill":7722683,"approval":52.0833335,"support":0.7722683},{"time_hours":116,"approval_perbill":516666667,"support_perbill":7623008,"approval":51.6666667,"support":0.7623008},{"time_hours":117,"approval_perbill":512500001,"support_perbill":7524998,"approval":51.2500001,"support":0.7524998},{"time_hours":118,"approval_perbill":508333334,"support_perbill":7428611,"approval":50.8333334,"support":0.7428611},{"time_hours":119,"approval_perbill":504166668,"support_perbill":7333807,"approval":50.4166668,"support":0.7333807},{"time_hours":120,"approval_perbill":500000000,"support_perbill":7240547,"approval":50,"support":0.7240547},{"time_hours":121,"approval_perbill":500000000,"support_perbill":7148795,"approval":50,"support":0.7148795},{"time_hours":122,"approval_perbill":500000000,"support_perbill":7058513,"approval":50,"support":0.7058513},{"time_hours":123,"approval_perbill":500000000,"support_perbill":6969667,"approval":50,"support":0.6969667},{"time_hours":124,"approval_perbill":500000000,"support_perbill":6882223,"approval":50,"support":0.6882223},{"time_hours":125,"approval_perbill":500000000,"support_perbill":6796148,"approval":50,"support":0.6796148},{"time_hours":126,"approval_perbill":500000000,"support_perbill":6711409,"approval":50,"support":0.6711409},{"time_hours":127,"approval_perbill":500000000,"support_perbill":6627977,"approval":50,"support":0.6627977},{"time_hours":128,"approval_perbill":500000000,"support_perbill":6545821,"approval":50,"support":0.6545821},{"time_hours":129,"approval_perbill":500000000,"support_perbill":6464912,"approval":50,"support":0.6464912},{"time_hours":130,"approval_perbill":500000000,"support_perbill":6385221,"approval":50,"support":0.6385221},{"time_hours":131,"approval_perbill":500000000,"support_perbill":6306722,"approval":50,"support":0.6306722},{"time_hours":132,"approval_perbill":500000000,"support_perbill":6229388,"approval":50,"support":0.6229388},{"time_hours":133,"approval_perbill":500000000,"support_perbill":6153193,"approval":50,"support":0.6153193},{"time_hours":134,"approval_perbill":500000000,"support_perbill":6078113,"approval":50,"support":0.6078113},{"time_hours":135,"approval_perbill":500000000,"support_perbill":6004122,"approval":50,"support":0.6004122},{"time_hours":136,"approval_perbill":500000000,"support_perbill":5931198,"approval":50,"support":0.5931198},{"time_hours":137,"approval_perbill":500000000,"support_perbill":5859317,"approval":50,"support":0.5859317},{"time_hours":138,"approval_perbill":500000000,"support_perbill":5788458,"approval":50,"support":0.5788458},{"time_hours":139,"approval_perbill":500000000,"support_perbill":5718598,"approval":50,"support":0.5718598},{"time_hours":140,"approval_perbill":500000000,"support_perbill":5649718,"approval":50,"support":0.5649718},{"time_hours":141,"approval_perbill":500000000,"support_perbill":5581795,"approval":50,"support":0.5581795},{"time_hours":142,"approval_perbill":500000000,"support_perbill":5514810,"approval":50,"support":0.551481},{"time_hours":143,"approval_perbill":500000000,"support_perbill":5448745,"approval":50,"support":0.5448745},{"time_hours":144,"approval_perbill":500000000,"support_perbill":5383580,"approval":50,"support":0.538358},{"time_hours":145,"approval_perbill":500000000,"support_perbill":5319297,"approval":50,"support":0.5319297},{"time_hours":146,"approval_perbill":500000000,"support_perbill":5255878,"approval":50,"support":0.5255878},{"time_hours":147,"approval_perbill":500000000,"support_perbill":5193306,"approval":50,"support":0.5193306},{"time_hours":148,"approval_perbill":500000000,"support_perbill":5131565,"approval":50,"support":0.5131565},{"time_hours":149,"approval_perbill":500000000,"support_perbill":5070636,"approval":50,"support":0.5070636},{"time_hours":150,"approval_perbill":500000000,"support_perbill":5010506,"approval":50,"support":0.5010506},{"time_hours":151,"approval_perbill":500000000,"support_perbill":4951157,"approval":50,"support":0.4951157},{"time_hours":152,"approval_perbill":500000000,"support_perbill":4892576,"approval":50,"support":0.4892576},{"time_hours":153,"approval_perbill":500000000,"support_perbill":4834747,"approval":50,"support":0.4834747},{"time_hours":154,"approval_perbill":500000000,"support_perbill":4777655,"approval":50,"support":0.4777655},{"time_hours":155,"approval_perbill":500000000,"support_perbill":4721287,"approval":50,"support":0.4721287},{"time_hours":156,"approval_perbill":500000000,"support_perbill":4665630,"approval":50,"support":0.466563},{"time_hours":157,"approval_perbill":500000000,"support_perbill":4610669,"approval":50,"support":0.4610669},{"time_hours":158,"approval_perbill":500000000,"support_perbill":4556392,"approval":50,"support":0.4556392},{"time_hours":159,"approval_perbill":500000000,"support_perbill":4502785,"approval":50,"support":0.4502785},{"time_hours":160,"approval_perbill":500000000,"support_perbill":4449838,"approval":50,"support":0.4449838},{"time_hours":161,"approval_perbill":500000000,"support_perbill":4397537,"approval":50,"support":0.4397537},{"time_hours":162,"approval_perbill":500000000,"support_perbill":4345871,"approval":50,"support":0.4345871},{"time_hours":163,"approval_perbill":500000000,"support_perbill":4294829,"approval":50,"support":0.4294829},{"time_hours":164,"approval_perbill":500000000,"support_perbill":4244398,"approval":50,"support":0.4244398},{"time_hours":165,"approval_perbill":500000000,"support_perbill":4194569,"approval":50,"support":0.4194569},{"time_hours":166,"approval_perbill":500000000,"support_perbill":4145330,"approval":50,"support":0.414533},{"time_hours":167,"approval_perbill":500000000,"support_perbill":4096672,"approval":50,"support":0.4096672},{"time_hours":168,"approval_perbill":500000000,"support_perbill":4048583,"approval":50,"support":0.4048583},{"time_hours":169,"approval_perbill":500000000,"support_perbill":4001054,"approval":50,"support":0.4001054},{"time_hours":170,"approval_perbill":500000000,"support_perbill":3954075,"approval":50,"support":0.3954075},{"time_hours":171,"approval_perbill":500000000,"support_perbill":3907637,"approval":50,"support":0.3907637},{"time_hours":172,"approval_perbill":500000000,"support_perbill":3861731,"approval":50,"support":0.3861731},{"time_hours":173,"approval_perbill":500000000,"support_perbill":3816347,"approval":50,"support":0.3816347},{"time_hours":174,"approval_perbill":500000000,"support_perbill":3771476,"approval":50,"support":0.3771476},{"time_hours":175,"approval_perbill":500000000,"support_perbill":3727110,"approval":50,"support":0.372711},{"time_hours":176,"approval_perbill":500000000,"support_perbill":3683241,"approval":50,"support":0.3683241},{"time_hours":177,"approval_perbill":500000000,"support_perbill":3639860,"approval":50,"support":0.363986},{"time_hours":178,"approval_perbill":500000000,"support_perbill":3596958,"approval":50,"support":0.3596958},{"time_hours":179,"approval_perbill":500000000,"support_perbill":3554529,"approval":50,"support":0.3554529},{"time_hours":180,"approval_perbill":500000000,"support_perbill":3512564,"approval":50,"support":0.3512564},{"time_hours":181,"approval_perbill":500000000,"support_perbill":3471056,"approval":50,"support":0.3471056},{"time_hours":182,"approval_perbill":500000000,"support_perbill":3429997,"approval":50,"support":0.3429997},{"time_hours":183,"approval_perbill":500000000,"support_perbill":3389380,"approval":50,"support":0.338938},{"time_hours":184,"approval_perbill":500000000,"support_perbill":3349198,"approval":50,"support":0.3349198},{"time_hours":185,"approval_perbill":500000000,"support_perbill":3309444,"approval":50,"support":0.3309444},{"time_hours":186,"approval_perbill":500000000,"support_perbill":3270111,"approval":50,"support":0.3270111},{"time_hours":187,"approval_perbill":500000000,"support_perbill":3231193,"approval":50,"support":0.3231193},{"time_hours":188,"approval_perbill":500000000,"support_perbill":3192682,"approval":50,"support":0.3192682},{"time_hours":189,"approval_perbill":500000000,"support_perbill":3154574,"approval":50,"support":0.3154574},{"time_hours":190,"approval_perbill":500000000,"support_perbill":3116861,"approval":50,"support":0.3116861},{"time_hours":191,"approval_perbill":500000000,"support_perbill":3079537,"approval":50,"support":0.3079537},{"time_hours":192,"approval_perbill":500000000,"support_perbill":3042596,"approval":50,"support":0.3042596},{"time_hours":193,"approval_perbill":500000000,"support_perbill":3006033,"approval":50,"support":0.3006033},{"time_hours":194,"approval_perbill":500000000,"support_perbill":2969841,"approval":50,"support":0.2969841},{"time_hours":195,"approval_perbill":500000000,"support_perbill":2934016,"approval":50,"support":0.2934016},{"time_hours":196,"approval_perbill":500000000,"support_perbill":2898550,"approval":50,"support":0.289855},{"time_hours":197,"approval_perbill":500000000,"support_perbill":2863440,"approval":50,"support":0.286344},{"time_hours":198,"approval_perbill":500000000,"support_perbill":2828680,"approval":50,"support":0.282868},{"time_hours":199,"approval_perbill":500000000,"support_perbill":2794264,"approval":50,"support":0.2794264},{"time_hours":200,"approval_perbill":500000000,"support_perbill":2760188,"approval":50,"support":0.2760188},{"time_hours":201,"approval_perbill":500000000,"support_perbill":2726446,"approval":50,"support":0.2726446},{"time_hours":202,"approval_perbill":500000000,"support_perbill":2693034,"approval":50,"support":0.2693034},{"time_hours":203,"approval_perbill":500000000,"support_perbill":2659946,"approval":50,"support":0.2659946},{"time_hours":204,"approval_perbill":500000000,"support_perbill":2627179,"approval":50,"support":0.2627179},{"time_hours":205,"approval_perbill":500000000,"support_perbill":2594727,"approval":50,"support":0.2594727},{"time_hours":206,"approval_perbill":500000000,"support_perbill":2562586,"approval":50,"support":0.2562586},{"time_hours":207,"approval_perbill":500000000,"support_perbill":2530751,"approval":50,"support":0.2530751},{"time_hours":208,"approval_perbill":500000000,"support_perbill":2499219,"approval":50,"support":0.2499219},{"time_hours":209,"approval_perbill":500000000,"support_perbill":2467984,"approval":50,"support":0.2467984},{"time_hours":210,"approval_perbill":500000000,"support_perbill":2437043,"approval":50,"support":0.2437043},{"time_hours":211,"approval_perbill":500000000,"support_perbill":2406391,"approval":50,"support":0.2406391},{"time_hours":212,"approval_perbill":500000000,"support_perbill":2376025,"approval":50,"support":0.2376025},{"time_hours":213,"approval_perbill":500000000,"support_perbill":2345940,"approval":50,"support":0.234594},{"time_hours":214,"approval_perbill":500000000,"support_perbill":2316133,"approval":50,"support":0.2316133},{"time_hours":215,"approval_perbill":500000000,"support_perbill":2286599,"approval":50,"support":0.2286599},{"time_hours":216,"approval_perbill":500000000,"support_perbill":2257336,"approval":50,"support":0.2257336},{"time_hours":217,"approval_perbill":500000000,"support_perbill":2228339,"approval":50,"support":0.2228339},{"time_hours":218,"approval_perbill":500000000,"support_perbill":2199604,"approval":50,"support":0.2199604},{"time_hours":219,"approval_perbill":500000000,"support_perbill":2171129,"approval":50,"support":0.2171129},{"time_hours":220,"approval_perbill":500000000,"support_perbill":2142909,"approval":50,"support":0.2142909},{"time_hours":221,"approval_perbill":500000000,"support_perbill":2114942,"approval":50,"support":0.2114942},{"time_hours":222,"approval_perbill":500000000,"support_perbill":2087224,"approval":50,"support":0.2087224},{"time_hours":223,"approval_perbill":500000000,"support_perbill":2059751,"approval":50,"support":0.2059751},{"time_hours":224,"approval_perbill":500000000,"support_perbill":2032520,"approval":50,"support":0.203252},{"time_hours":225,"approval_perbill":500000000,"support_perbill":2005528,"approval":50,"support":0.2005528},{"time_hours":226,"approval_perbill":500000000,"support_perbill":1978773,"approval":50,"support":0.1978773},{"time_hours":227,"approval_perbill":500000000,"support_perbill":1952250,"approval":50,"support":0.195225},{"time_hours":228,"approval_perbill":500000000,"support_perbill":1925957,"approval":50,"support":0.1925957},{"time_hours":229,"approval_perbill":500000000,"support_perbill":1899891,"approval":50,"support":0.1899891},{"time_hours":230,"approval_perbill":500000000,"support_perbill":1874049,"approval":50,"support":0.1874049},{"time_hours":231,"approval_perbill":500000000,"support_perbill":1848428,"approval":50,"support":0.1848428},{"time_hours":232,"approval_perbill":500000000,"support_perbill":1823026,"approval":50,"support":0.1823026},{"time_hours":233,"approval_perbill":500000000,"support_perbill":1797839,"approval":50,"support":0.1797839},{"time_hours":234,"approval_perbill":500000000,"support_perbill":1772864,"approval":50,"support":0.1772864},{"time_hours":235,"approval_perbill":500000000,"support_perbill":1748100,"approval":50,"support":0.17481},{"time_hours":236,"approval_perbill":500000000,"support_perbill":1723543,"approval":50,"support":0.1723543},{"time_hours":237,"approval_perbill":500000000,"support_perbill":1699191,"approval":50,"support":0.1699191},{"time_hours":238,"approval_perbill":500000000,"support_perbill":1675041,"approval":50,"support":0.1675041},{"time_hours":239,"approval_perbill":500000000,"support_perbill":1651091,"approval":50,"support":0.1651091},{"time_hours":240,"approval_perbill":500000000,"support_perbill":1627339,"approval":50,"support":0.1627339},{"time_hours":241,"approval_perbill":500000000,"support_perbill":1603781,"approval":50,"support":0.1603781},{"time_hours":242,"approval_perbill":500000000,"support_perbill":1580416,"approval":50,"support":0.1580416},{"time_hours":243,"approval_perbill":500000000,"support_perbill":1557241,"approval":50,"support":0.1557241},{"time_hours":244,"approval_perbill":500000000,"support_perbill":1534253,"approval":50,"support":0.1534253},{"time_hours":245,"approval_perbill":500000000,"support_perbill":1511452,"approval":50,"support":0.1511452},{"time_hours":246,"approval_perbill":500000000,"support_perbill":1488833,"approval":50,"support":0.1488833},{"time_hours":247,"approval_perbill":500000000,"support_perbill":1466396,"approval":50,"support":0.1466396},{"time_hours":248,"approval_perbill":500000000,"support_perbill":1444138,"approval":50,"support":0.1444138},{"time_hours":249,"approval_perbill":500000000,"support_perbill":1422056,"approval":50,"support":0.1422056},{"time_hours":250,"approval_perbill":500000000,"support_perbill":1400149,"approval":50,"support":0.1400149},{"time_hours":251,"approval_perbill":500000000,"support_perbill":1378415,"approval":50,"support":0.1378415},{"time_hours":252,"approval_perbill":500000000,"support_perbill":1356852,"approval":50,"support":0.1356852},{"time_hours":253,"approval_perbill":500000000,"support_perbill":1335457,"approval":50,"support":0.1335457},{"time_hours":254,"approval_perbill":500000000,"support_perbill":1314228,"approval":50,"support":0.1314228},{"time_hours":255,"approval_perbill":500000000,"support_perbill":1293165,"approval":50,"support":0.1293165},{"time_hours":256,"approval_perbill":500000000,"support_perbill":1272264,"approval":50,"support":0.1272264},{"time_hours":257,"approval_perbill":500000000,"support_perbill":1251524,"approval":50,"support":0.1251524},{"time_hours":258,"approval_perbill":500000000,"support_perbill":1230944,"approval":50,"support":0.1230944},{"time_hours":259,"approval_perbill":500000000,"support_perbill":1210520,"approval":50,"support":0.121052},{"time_hours":260,"approval_perbill":500000000,"support_perbill":1190252,"approval":50,"support":0.1190252},{"time_hours":261,"approval_perbill":500000000,"support_perbill":1170138,"approval":50,"support":0.1170138},{"time_hours":262,"approval_perbill":500000000,"support_perbill":1150175,"approval":50,"support":0.1150175},{"time_hours":263,"approval_perbill":500000000,"support_perbill":1130363,"approval":50,"support":0.1130363},{"time_hours":264,"approval_perbill":500000000,"support_perbill":1110699,"approval":50,"support":0.1110699},{"time_hours":265,"approval_perbill":500000000,"support_perbill":1091182,"approval":50,"support":0.1091182},{"time_hours":266,"approval_perbill":500000000,"support_perbill":1071811,"approval":50,"support":0.1071811},{"time_hours":267,"approval_perbill":500000000,"support_perbill":1052583,"approval":50,"support":0.1052583},{"time_hours":268,"approval_perbill":500000000,"support_perbill":1033497,"approval":50,"support":0.1033497},{"time_hours":269,"approval_perbill":500000000,"support_perbill":1014551,"approval":50,"support":0.1014551},{"time_hours":270,"approval_perbill":500000000,"support_perbill":995745,"approval":50,"support":0.0995745},{"time_hours":271,"approval_perbill":500000000,"support_perbill":977076,"approval":50,"support":0.0977076},{"time_hours":272,"approval_perbill":500000000,"support_perbill":958542,"approval":50,"support":0.0958542},{"time_hours":273,"approval_perbill":500000000,"support_perbill":940144,"approval":50,"support":0.0940144},{"time_hours":274,"approval_perbill":500000000,"support_perbill":921878,"approval":50,"support":0.0921878},{"time_hours":275,"approval_perbill":500000000,"support_perbill":903743,"approval":50,"support":0.0903743},{"time_hours":276,"approval_perbill":500000000,"support_perbill":885739,"approval":50,"support":0.0885739},{"time_hours":277,"approval_perbill":500000000,"support_perbill":867863,"approval":50,"support":0.0867863},{"time_hours":278,"approval_perbill":500000000,"support_perbill":850115,"approval":50,"support":0.0850115},{"time_hours":279,"approval_perbill":500000000,"support_perbill":832493,"approval":50,"support":0.0832493},{"time_hours":280,"approval_perbill":500000000,"support_perbill":814995,"approval":50,"support":0.0814995},{"time_hours":281,"approval_perbill":500000000,"support_perbill":797621,"approval":50,"support":0.0797621},{"time_hours":282,"approval_perbill":500000000,"support_perbill":780369,"approval":50,"support":0.0780369},{"time_hours":283,"approval_perbill":500000000,"support_perbill":763237,"approval":50,"support":0.0763237},{"time_hours":284,"approval_perbill":500000000,"support_perbill":746225,"approval":50,"support":0.0746225},{"time_hours":285,"approval_perbill":500000000,"support_perbill":729331,"approval":50,"support":0.0729331},{"time_hours":286,"approval_perbill":500000000,"support_perbill":712555,"approval":50,"support":0.0712555},{"time_hours":287,"approval_perbill":500000000,"support_perbill":695894,"approval":50,"support":0.0695894},{"time_hours":288,"approval_perbill":500000000,"support_perbill":679347,"approval":50,"support":0.0679347},{"time_hours":289,"approval_perbill":500000000,"support_perbill":662914,"approval":50,"support":0.0662914},{"time_hours":290,"approval_perbill":500000000,"support_perbill":646594,"approval":50,"support":0.0646594},{"time_hours":291,"approval_perbill":500000000,"support_perbill":630384,"approval":50,"support":0.0630384},{"time_hours":292,"approval_perbill":500000000,"support_perbill":614284,"approval":50,"support":0.0614284},{"time_hours":293,"approval_perbill":500000000,"support_perbill":598294,"approval":50,"support":0.0598294},{"time_hours":294,"approval_perbill":500000000,"support_perbill":582411,"approval":50,"support":0.0582411},{"time_hours":295,"approval_perbill":500000000,"support_perbill":566634,"approval":50,"support":0.0566634},{"time_hours":296,"approval_perbill":500000000,"support_perbill":550964,"approval":50,"support":0.0550964},{"time_hours":297,"approval_perbill":500000000,"support_perbill":535397,"approval":50,"support":0.0535397},{"time_hours":298,"approval_perbill":500000000,"support_perbill":519935,"approval":50,"support":0.0519935},{"time_hours":299,"approval_perbill":500000000,"support_perbill":504575,"approval":50,"support":0.0504575},{"time_hours":300,"approval_perbill":500000000,"support_perbill":489316,"approval":50,"support":0.0489316},{"time_hours":301,"approval_perbill":500000000,"support_perbill":474158,"approval":50,"support":0.0474158},{"time_hours":302,"approval_perbill":500000000,"support_perbill":459099,"approval":50,"support":0.0459099},{"time_hours":303,"approval_perbill":500000000,"support_perbill":444139,"approval":50,"support":0.0444139},{"time_hours":304,"approval_perbill":500000000,"support_perbill":429276,"approval":50,"support":0.0429276},{"time_hours":305,"approval_perbill":500000000,"support_perbill":414510,"approval":50,"support":0.041451},{"time_hours":306,"approval_perbill":500000000,"support_perbill":399839,"approval":50,"support":0.0399839},{"time_hours":307,"approval_perbill":500000000,"support_perbill":385264,"approval":50,"support":0.0385264},{"time_hours":308,"approval_perbill":500000000,"support_perbill":370782,"approval":50,"support":0.0370782},{"time_hours":309,"approval_perbill":500000000,"support_perbill":356393,"approval":50,"support":0.0356393},{"time_hours":310,"approval_perbill":500000000,"support_perbill":342096,"approval":50,"support":0.0342096},{"time_hours":311,"approval_perbill":500000000,"support_perbill":327890,"approval":50,"support":0.032789},{"time_hours":312,"approval_perbill":500000000,"support_perbill":313774,"approval":50,"support":0.0313774},{"time_hours":313,"approval_perbill":500000000,"support_perbill":299748,"approval":50,"support":0.0299748},{"time_hours":314,"approval_perbill":500000000,"support_perbill":285810,"approval":50,"support":0.028581},{"time_hours":315,"approval_perbill":500000000,"support_perbill":271960,"approval":50,"support":0.027196},{"time_hours":316,"approval_perbill":500000000,"support_perbill":258197,"approval":50,"support":0.0258197},{"time_hours":317,"approval_perbill":500000000,"support_perbill":244520,"approval":50,"support":0.024452},{"time_hours":318,"approval_perbill":500000000,"support_perbill":230928,"approval":50,"support":0.0230928},{"time_hours":319,"approval_perbill":500000000,"support_perbill":217421,"approval":50,"support":0.0217421},{"time_hours":320,"approval_perbill":500000000,"support_perbill":203998,"approval":50,"support":0.0203998},{"time_hours":321,"approval_perbill":500000000,"support_perbill":190657,"approval":50,"support":0.0190657},{"time_hours":322,"approval_perbill":500000000,"support_perbill":177399,"approval":50,"support":0.0177399},{"time_hours":323,"approval_perbill":500000000,"support_perbill":164222,"approval":50,"support":0.0164222},{"time_hours":324,"approval_perbill":500000000,"support_perbill":151125,"approval":50,"support":0.0151125},{"time_hours":325,"approval_perbill":500000000,"support_perbill":138109,"approval":50,"support":0.0138109},{"time_hours":326,"approval_perbill":500000000,"support_perbill":125171,"approval":50,"support":0.0125171},{"time_hours":327,"approval_perbill":500000000,"support_perbill":112313,"approval":50,"support":0.0112313},{"time_hours":328,"approval_perbill":500000000,"support_perbill":99532,"approval":50,"support":0.0099532},{"time_hours":329,"approval_perbill":500000000,"support_perbill":86827,"approval":50,"support":0.0086827},{"time_hours":330,"approval_perbill":500000000,"support_perbill":74200,"approval":50,"support":0.00742},{"time_hours":331,"approval_perbill":500000000,"support_perbill":61648,"approval":50,"support":0.0061648},{"time_hours":332,"approval_perbill":500000000,"support_perbill":49171,"approval":50,"support":0.0049171},{"time_hours":333,"approval_perbill":500000000,"support_perbill":36768,"approval":50,"support":0.0036768},{"time_hours":334,"approval_perbill":500000000,"support_perbill":24439,"approval":50,"support":0.0024439},{"time_hours":335,"approval_perbill":500000000,"support_perbill":12183,"approval":50,"support":0.0012183},{"time_hours":336,"approval_perbill":500000000,"support_perbill":0,"approval":50,"support":0}]')},17802:p=>{"use strict";p.exports=JSON.parse('[{"time_hours":0,"approval_perbill":1000000000,"support_perbill":500000008,"approval":100,"support":50.0000008},{"time_hours":1,"approval_perbill":998188407,"support_perbill":450571639,"approval":99.8188407,"support":45.0571639},{"time_hours":2,"approval_perbill":996376813,"support_perbill":409815977,"approval":99.6376813,"support":40.9815977},{"time_hours":3,"approval_perbill":994565218,"support_perbill":375634538,"approval":99.4565218,"support":37.5634538},{"time_hours":4,"approval_perbill":992753624,"support_perbill":346555348,"approval":99.2753624,"support":34.6555348},{"time_hours":5,"approval_perbill":990942030,"support_perbill":321515318,"approval":99.094203,"support":32.1515318},{"time_hours":6,"approval_perbill":989130436,"support_perbill":299727543,"approval":98.9130436,"support":29.9727543},{"time_hours":7,"approval_perbill":987318841,"support_perbill":280597034,"approval":98.7318841,"support":28.0597034},{"time_hours":8,"approval_perbill":985507247,"support_perbill":263665616,"approval":98.5507247,"support":26.3665616},{"time_hours":9,"approval_perbill":983695653,"support_perbill":248574704,"approval":98.3695653,"support":24.8574704},{"time_hours":10,"approval_perbill":981884059,"support_perbill":235039674,"approval":98.1884059,"support":23.5039674},{"time_hours":11,"approval_perbill":980072464,"support_perbill":222831693,"approval":98.0072464,"support":22.2831693},{"time_hours":12,"approval_perbill":978260870,"support_perbill":211764724,"approval":97.826087,"support":21.1764724},{"time_hours":13,"approval_perbill":976449276,"support_perbill":201685935,"approval":97.6449276,"support":20.1685935},{"time_hours":14,"approval_perbill":974637682,"support_perbill":192468636,"approval":97.4637682,"support":19.2468636},{"time_hours":15,"approval_perbill":972826088,"support_perbill":184006894,"approval":97.2826088,"support":18.4006894},{"time_hours":16,"approval_perbill":971014494,"support_perbill":176211470,"approval":97.1014494,"support":17.621147},{"time_hours":17,"approval_perbill":969202899,"support_perbill":169006637,"approval":96.9202899,"support":16.9006637},{"time_hours":18,"approval_perbill":967391305,"support_perbill":162327733,"approval":96.7391305,"support":16.2327733},{"time_hours":19,"approval_perbill":965579711,"support_perbill":156119196,"approval":96.5579711,"support":15.6119196},{"time_hours":20,"approval_perbill":963768117,"support_perbill":150333030,"approval":96.3768117,"support":15.033303},{"time_hours":21,"approval_perbill":961956522,"support_perbill":144927549,"approval":96.1956522,"support":14.4927549},{"time_hours":22,"approval_perbill":960144928,"support_perbill":139866383,"approval":96.0144928,"support":13.9866383},{"time_hours":23,"approval_perbill":958333334,"support_perbill":135117648,"approval":95.8333334,"support":13.5117648},{"time_hours":24,"approval_perbill":956521740,"support_perbill":130653279,"approval":95.652174,"support":13.0653279},{"time_hours":25,"approval_perbill":954710146,"support_perbill":126448478,"approval":95.4710146,"support":12.6448478},{"time_hours":26,"approval_perbill":952898551,"support_perbill":122481244,"approval":95.2898551,"support":12.2481244},{"time_hours":27,"approval_perbill":951086958,"support_perbill":118732000,"approval":95.1086958,"support":11.8732},{"time_hours":28,"approval_perbill":949275363,"support_perbill":115183257,"approval":94.9275363,"support":11.5183257},{"time_hours":29,"approval_perbill":947463769,"support_perbill":111819352,"approval":94.7463769,"support":11.1819352},{"time_hours":30,"approval_perbill":945652175,"support_perbill":108626208,"approval":94.5652175,"support":10.8626208},{"time_hours":31,"approval_perbill":943840581,"support_perbill":105591148,"approval":94.3840581,"support":10.5591148},{"time_hours":32,"approval_perbill":942028986,"support_perbill":102702712,"approval":94.2028986,"support":10.2702712},{"time_hours":33,"approval_perbill":940217392,"support_perbill":99950530,"approval":94.0217392,"support":9.995053},{"time_hours":34,"approval_perbill":938405798,"support_perbill":97325178,"approval":93.8405798,"support":9.7325178},{"time_hours":35,"approval_perbill":936594204,"support_perbill":94818091,"approval":93.6594204,"support":9.4818091},{"time_hours":36,"approval_perbill":934782609,"support_perbill":92421451,"approval":93.4782609,"support":9.2421451},{"time_hours":37,"approval_perbill":932971015,"support_perbill":90128118,"approval":93.2971015,"support":9.0128118},{"time_hours":38,"approval_perbill":931159421,"support_perbill":87931552,"approval":93.1159421,"support":8.7931552},{"time_hours":39,"approval_perbill":929347827,"support_perbill":85825756,"approval":92.9347827,"support":8.5825756},{"time_hours":40,"approval_perbill":927536232,"support_perbill":83805218,"approval":92.7536232,"support":8.3805218},{"time_hours":41,"approval_perbill":925724638,"support_perbill":81864862,"approval":92.5724638,"support":8.1864862},{"time_hours":42,"approval_perbill":923913044,"support_perbill":80000008,"approval":92.3913044,"support":8.0000008},{"time_hours":43,"approval_perbill":922101450,"support_perbill":78206334,"approval":92.210145,"support":7.8206334},{"time_hours":44,"approval_perbill":920289856,"support_perbill":76479840,"approval":92.0289856,"support":7.647984},{"time_hours":45,"approval_perbill":918478262,"support_perbill":74816822,"approval":91.8478262,"support":7.4816822},{"time_hours":46,"approval_perbill":916666668,"support_perbill":73213842,"approval":91.6666668,"support":7.3213842},{"time_hours":47,"approval_perbill":914855073,"support_perbill":71667707,"approval":91.4855073,"support":7.1667707},{"time_hours":48,"approval_perbill":913043479,"support_perbill":70175446,"approval":91.3043479,"support":7.0175446},{"time_hours":49,"approval_perbill":911231885,"support_perbill":68734290,"approval":91.1231885,"support":6.873429},{"time_hours":50,"approval_perbill":909420291,"support_perbill":67341660,"approval":90.9420291,"support":6.734166},{"time_hours":51,"approval_perbill":907608696,"support_perbill":65995144,"approval":90.7608696,"support":6.5995144},{"time_hours":52,"approval_perbill":905797102,"support_perbill":64692489,"approval":90.5797102,"support":6.4692489},{"time_hours":53,"approval_perbill":903985508,"support_perbill":63431588,"approval":90.3985508,"support":6.3431588},{"time_hours":54,"approval_perbill":902173914,"support_perbill":62210463,"approval":90.2173914,"support":6.2210463},{"time_hours":55,"approval_perbill":900362319,"support_perbill":61027262,"approval":90.0362319,"support":6.1027262},{"time_hours":56,"approval_perbill":898550725,"support_perbill":59880246,"approval":89.8550725,"support":5.9880246},{"time_hours":57,"approval_perbill":896739131,"support_perbill":58767778,"approval":89.6739131,"support":5.8767778},{"time_hours":58,"approval_perbill":894927537,"support_perbill":57688323,"approval":89.4927537,"support":5.7688323},{"time_hours":59,"approval_perbill":893115943,"support_perbill":56640431,"approval":89.3115943,"support":5.6640431},{"time_hours":60,"approval_perbill":891304349,"support_perbill":55622738,"approval":89.1304349,"support":5.5622738},{"time_hours":61,"approval_perbill":889492754,"support_perbill":54633958,"approval":88.9492754,"support":5.4633958},{"time_hours":62,"approval_perbill":887681160,"support_perbill":53672875,"approval":88.768116,"support":5.3672875},{"time_hours":63,"approval_perbill":885869566,"support_perbill":52738342,"approval":88.5869566,"support":5.2738342},{"time_hours":64,"approval_perbill":884057972,"support_perbill":51829273,"approval":88.4057972,"support":5.1829273},{"time_hours":65,"approval_perbill":882246378,"support_perbill":50944643,"approval":88.2246378,"support":5.0944643},{"time_hours":66,"approval_perbill":880434783,"support_perbill":50083477,"approval":88.0434783,"support":5.0083477},{"time_hours":67,"approval_perbill":878623189,"support_perbill":49244856,"approval":87.8623189,"support":4.9244856},{"time_hours":68,"approval_perbill":876811595,"support_perbill":48427905,"approval":87.6811595,"support":4.8427905},{"time_hours":69,"approval_perbill":875000001,"support_perbill":47631795,"approval":87.5000001,"support":4.7631795},{"time_hours":70,"approval_perbill":873188406,"support_perbill":46855738,"approval":87.3188406,"support":4.6855738},{"time_hours":71,"approval_perbill":871376813,"support_perbill":46098987,"approval":87.1376813,"support":4.6098987},{"time_hours":72,"approval_perbill":869565218,"support_perbill":45360829,"approval":86.9565218,"support":4.5360829},{"time_hours":73,"approval_perbill":867753624,"support_perbill":44640588,"approval":86.7753624,"support":4.4640588},{"time_hours":74,"approval_perbill":865942030,"support_perbill":43937620,"approval":86.594203,"support":4.393762},{"time_hours":75,"approval_perbill":864130436,"support_perbill":43251309,"approval":86.4130436,"support":4.3251309},{"time_hours":76,"approval_perbill":862318841,"support_perbill":42581072,"approval":86.2318841,"support":4.2581072},{"time_hours":77,"approval_perbill":860507247,"support_perbill":41926350,"approval":86.0507247,"support":4.192635},{"time_hours":78,"approval_perbill":858695653,"support_perbill":41286610,"approval":85.8695653,"support":4.128661},{"time_hours":79,"approval_perbill":856884059,"support_perbill":40661344,"approval":85.6884059,"support":4.0661344},{"time_hours":80,"approval_perbill":855072464,"support_perbill":40050066,"approval":85.5072464,"support":4.0050066},{"time_hours":81,"approval_perbill":853260870,"support_perbill":39452313,"approval":85.326087,"support":3.9452313},{"time_hours":82,"approval_perbill":851449276,"support_perbill":38867639,"approval":85.1449276,"support":3.8867639},{"time_hours":83,"approval_perbill":849637682,"support_perbill":38295622,"approval":84.9637682,"support":3.8295622},{"time_hours":84,"approval_perbill":847826087,"support_perbill":37735853,"approval":84.7826087,"support":3.7735853},{"time_hours":85,"approval_perbill":846014493,"support_perbill":37187943,"approval":84.6014493,"support":3.7187943},{"time_hours":86,"approval_perbill":844202900,"support_perbill":36651521,"approval":84.42029,"support":3.6651521},{"time_hours":87,"approval_perbill":842391305,"support_perbill":36126228,"approval":84.2391305,"support":3.6126228},{"time_hours":88,"approval_perbill":840579711,"support_perbill":35611721,"approval":84.0579711,"support":3.5611721},{"time_hours":89,"approval_perbill":838768117,"support_perbill":35107672,"approval":83.8768117,"support":3.5107672},{"time_hours":90,"approval_perbill":836956523,"support_perbill":34613764,"approval":83.6956523,"support":3.4613764},{"time_hours":91,"approval_perbill":835144928,"support_perbill":34129696,"approval":83.5144928,"support":3.4129696},{"time_hours":92,"approval_perbill":833333334,"support_perbill":33655176,"approval":83.3333334,"support":3.3655176},{"time_hours":93,"approval_perbill":831521740,"support_perbill":33189923,"approval":83.152174,"support":3.3189923},{"time_hours":94,"approval_perbill":829710146,"support_perbill":32733670,"approval":82.9710146,"support":3.273367},{"time_hours":95,"approval_perbill":827898551,"support_perbill":32286157,"approval":82.7898551,"support":3.2286157},{"time_hours":96,"approval_perbill":826086957,"support_perbill":31847137,"approval":82.6086957,"support":3.1847137},{"time_hours":97,"approval_perbill":824275363,"support_perbill":31416368,"approval":82.4275363,"support":3.1416368},{"time_hours":98,"approval_perbill":822463769,"support_perbill":30993622,"approval":82.2463769,"support":3.0993622},{"time_hours":99,"approval_perbill":820652174,"support_perbill":30578675,"approval":82.0652174,"support":3.0578675},{"time_hours":100,"approval_perbill":818840580,"support_perbill":30171314,"approval":81.884058,"support":3.0171314},{"time_hours":101,"approval_perbill":817028986,"support_perbill":29771334,"approval":81.7028986,"support":2.9771334},{"time_hours":102,"approval_perbill":815217392,"support_perbill":29378534,"approval":81.5217392,"support":2.9378534},{"time_hours":103,"approval_perbill":813405798,"support_perbill":28992723,"approval":81.3405798,"support":2.8992723},{"time_hours":104,"approval_perbill":811594204,"support_perbill":28613717,"approval":81.1594204,"support":2.8613717},{"time_hours":105,"approval_perbill":809782609,"support_perbill":28241338,"approval":80.9782609,"support":2.8241338},{"time_hours":106,"approval_perbill":807971015,"support_perbill":27875412,"approval":80.7971015,"support":2.7875412},{"time_hours":107,"approval_perbill":806159421,"support_perbill":27515773,"approval":80.6159421,"support":2.7515773},{"time_hours":108,"approval_perbill":804347827,"support_perbill":27162261,"approval":80.4347827,"support":2.7162261},{"time_hours":109,"approval_perbill":802536233,"support_perbill":26814721,"approval":80.2536233,"support":2.6814721},{"time_hours":110,"approval_perbill":800724638,"support_perbill":26473002,"approval":80.0724638,"support":2.6473002},{"time_hours":111,"approval_perbill":798913044,"support_perbill":26136960,"approval":79.8913044,"support":2.613696},{"time_hours":112,"approval_perbill":797101450,"support_perbill":25806454,"approval":79.710145,"support":2.5806454},{"time_hours":113,"approval_perbill":795289856,"support_perbill":25481348,"approval":79.5289856,"support":2.5481348},{"time_hours":114,"approval_perbill":793478261,"support_perbill":25161512,"approval":79.3478261,"support":2.5161512},{"time_hours":115,"approval_perbill":791666668,"support_perbill":24846818,"approval":79.1666668,"support":2.4846818},{"time_hours":116,"approval_perbill":789855073,"support_perbill":24537142,"approval":78.9855073,"support":2.4537142},{"time_hours":117,"approval_perbill":788043479,"support_perbill":24232367,"approval":78.8043479,"support":2.4232367},{"time_hours":118,"approval_perbill":786231885,"support_perbill":23932377,"approval":78.6231885,"support":2.3932377},{"time_hours":119,"approval_perbill":784420291,"support_perbill":23637059,"approval":78.4420291,"support":2.3637059},{"time_hours":120,"approval_perbill":782608696,"support_perbill":23346305,"approval":78.2608696,"support":2.3346305},{"time_hours":121,"approval_perbill":780797102,"support_perbill":23060012,"approval":78.0797102,"support":2.3060012},{"time_hours":122,"approval_perbill":778985508,"support_perbill":22778075,"approval":77.8985508,"support":2.2778075},{"time_hours":123,"approval_perbill":777173914,"support_perbill":22500398,"approval":77.7173914,"support":2.2500398},{"time_hours":124,"approval_perbill":775362319,"support_perbill":22226884,"approval":77.5362319,"support":2.2226884},{"time_hours":125,"approval_perbill":773550725,"support_perbill":21957440,"approval":77.3550725,"support":2.195744},{"time_hours":126,"approval_perbill":771739131,"support_perbill":21691976,"approval":77.1739131,"support":2.1691976},{"time_hours":127,"approval_perbill":769927537,"support_perbill":21430404,"approval":76.9927537,"support":2.1430404},{"time_hours":128,"approval_perbill":768115943,"support_perbill":21172640,"approval":76.8115943,"support":2.117264},{"time_hours":129,"approval_perbill":766304348,"support_perbill":20918601,"approval":76.6304348,"support":2.0918601},{"time_hours":130,"approval_perbill":764492755,"support_perbill":20668207,"approval":76.4492755,"support":2.0668207},{"time_hours":131,"approval_perbill":762681160,"support_perbill":20421379,"approval":76.268116,"support":2.0421379},{"time_hours":132,"approval_perbill":760869566,"support_perbill":20178043,"approval":76.0869566,"support":2.0178043},{"time_hours":133,"approval_perbill":759057972,"support_perbill":19938125,"approval":75.9057972,"support":1.9938125},{"time_hours":134,"approval_perbill":757246378,"support_perbill":19701552,"approval":75.7246378,"support":1.9701552},{"time_hours":135,"approval_perbill":755434783,"support_perbill":19468257,"approval":75.5434783,"support":1.9468257},{"time_hours":136,"approval_perbill":753623189,"support_perbill":19238170,"approval":75.3623189,"support":1.923817},{"time_hours":137,"approval_perbill":751811595,"support_perbill":19011227,"approval":75.1811595,"support":1.9011227},{"time_hours":138,"approval_perbill":750000001,"support_perbill":18787363,"approval":75.0000001,"support":1.8787363},{"time_hours":139,"approval_perbill":748188406,"support_perbill":18566516,"approval":74.8188406,"support":1.8566516},{"time_hours":140,"approval_perbill":746376812,"support_perbill":18348625,"approval":74.6376812,"support":1.8348625},{"time_hours":141,"approval_perbill":744565218,"support_perbill":18133632,"approval":74.4565218,"support":1.8133632},{"time_hours":142,"approval_perbill":742753624,"support_perbill":17921479,"approval":74.2753624,"support":1.7921479},{"time_hours":143,"approval_perbill":740942029,"support_perbill":17712111,"approval":74.0942029,"support":1.7712111},{"time_hours":144,"approval_perbill":739130435,"support_perbill":17505472,"approval":73.9130435,"support":1.7505472},{"time_hours":145,"approval_perbill":737318841,"support_perbill":17301510,"approval":73.7318841,"support":1.730151},{"time_hours":146,"approval_perbill":735507247,"support_perbill":17100172,"approval":73.5507247,"support":1.7100172},{"time_hours":147,"approval_perbill":733695653,"support_perbill":16901410,"approval":73.3695653,"support":1.690141},{"time_hours":148,"approval_perbill":731884059,"support_perbill":16705173,"approval":73.1884059,"support":1.6705173},{"time_hours":149,"approval_perbill":730072465,"support_perbill":16511414,"approval":73.0072465,"support":1.6511414},{"time_hours":150,"approval_perbill":728260870,"support_perbill":16320085,"approval":72.826087,"support":1.6320085},{"time_hours":151,"approval_perbill":726449276,"support_perbill":16131143,"approval":72.6449276,"support":1.6131143},{"time_hours":152,"approval_perbill":724637682,"support_perbill":15944542,"approval":72.4637682,"support":1.5944542},{"time_hours":153,"approval_perbill":722826088,"support_perbill":15760239,"approval":72.2826088,"support":1.5760239},{"time_hours":154,"approval_perbill":721014493,"support_perbill":15578192,"approval":72.1014493,"support":1.5578192},{"time_hours":155,"approval_perbill":719202899,"support_perbill":15398359,"approval":71.9202899,"support":1.5398359},{"time_hours":156,"approval_perbill":717391305,"support_perbill":15220701,"approval":71.7391305,"support":1.5220701},{"time_hours":157,"approval_perbill":715579711,"support_perbill":15045179,"approval":71.5579711,"support":1.5045179},{"time_hours":158,"approval_perbill":713768116,"support_perbill":14871753,"approval":71.3768116,"support":1.4871753},{"time_hours":159,"approval_perbill":711956523,"support_perbill":14700387,"approval":71.1956523,"support":1.4700387},{"time_hours":160,"approval_perbill":710144928,"support_perbill":14531045,"approval":71.0144928,"support":1.4531045},{"time_hours":161,"approval_perbill":708333334,"support_perbill":14363690,"approval":70.8333334,"support":1.436369},{"time_hours":162,"approval_perbill":706521740,"support_perbill":14198287,"approval":70.652174,"support":1.4198287},{"time_hours":163,"approval_perbill":704710146,"support_perbill":14034804,"approval":70.4710146,"support":1.4034804},{"time_hours":164,"approval_perbill":702898551,"support_perbill":13873206,"approval":70.2898551,"support":1.3873206},{"time_hours":165,"approval_perbill":701086957,"support_perbill":13713462,"approval":70.1086957,"support":1.3713462},{"time_hours":166,"approval_perbill":699275363,"support_perbill":13555539,"approval":69.9275363,"support":1.3555539},{"time_hours":167,"approval_perbill":697463769,"support_perbill":13399406,"approval":69.7463769,"support":1.3399406},{"time_hours":168,"approval_perbill":695652174,"support_perbill":13245034,"approval":69.5652174,"support":1.3245034},{"time_hours":169,"approval_perbill":693840580,"support_perbill":13092392,"approval":69.384058,"support":1.3092392},{"time_hours":170,"approval_perbill":692028986,"support_perbill":12941452,"approval":69.2028986,"support":1.2941452},{"time_hours":171,"approval_perbill":690217392,"support_perbill":12792186,"approval":69.0217392,"support":1.2792186},{"time_hours":172,"approval_perbill":688405798,"support_perbill":12644565,"approval":68.8405798,"support":1.2644565},{"time_hours":173,"approval_perbill":686594203,"support_perbill":12498563,"approval":68.6594203,"support":1.2498563},{"time_hours":174,"approval_perbill":684782610,"support_perbill":12354153,"approval":68.478261,"support":1.2354153},{"time_hours":175,"approval_perbill":682971015,"support_perbill":12211309,"approval":68.2971015,"support":1.2211309},{"time_hours":176,"approval_perbill":681159421,"support_perbill":12070007,"approval":68.1159421,"support":1.2070007},{"time_hours":177,"approval_perbill":679347827,"support_perbill":11930220,"approval":67.9347827,"support":1.193022},{"time_hours":178,"approval_perbill":677536233,"support_perbill":11791925,"approval":67.7536233,"support":1.1791925},{"time_hours":179,"approval_perbill":675724638,"support_perbill":11655099,"approval":67.5724638,"support":1.1655099},{"time_hours":180,"approval_perbill":673913044,"support_perbill":11519717,"approval":67.3913044,"support":1.1519717},{"time_hours":181,"approval_perbill":672101450,"support_perbill":11385757,"approval":67.210145,"support":1.1385757},{"time_hours":182,"approval_perbill":670289856,"support_perbill":11253198,"approval":67.0289856,"support":1.1253198},{"time_hours":183,"approval_perbill":668478261,"support_perbill":11122016,"approval":66.8478261,"support":1.1122016},{"time_hours":184,"approval_perbill":666666667,"support_perbill":10992190,"approval":66.6666667,"support":1.099219},{"time_hours":185,"approval_perbill":664855073,"support_perbill":10863701,"approval":66.4855073,"support":1.0863701},{"time_hours":186,"approval_perbill":663043479,"support_perbill":10736526,"approval":66.3043479,"support":1.0736526},{"time_hours":187,"approval_perbill":661231884,"support_perbill":10610647,"approval":66.1231884,"support":1.0610647},{"time_hours":188,"approval_perbill":659420290,"support_perbill":10486043,"approval":65.942029,"support":1.0486043},{"time_hours":189,"approval_perbill":657608696,"support_perbill":10362695,"approval":65.7608696,"support":1.0362695},{"time_hours":190,"approval_perbill":655797102,"support_perbill":10240584,"approval":65.5797102,"support":1.0240584},{"time_hours":191,"approval_perbill":653985508,"support_perbill":10119692,"approval":65.3985508,"support":1.0119692},{"time_hours":192,"approval_perbill":652173914,"support_perbill":10000000,"approval":65.2173914,"support":1},{"time_hours":193,"approval_perbill":650362320,"support_perbill":9881492,"approval":65.036232,"support":0.9881492},{"time_hours":194,"approval_perbill":648550725,"support_perbill":9764148,"approval":64.8550725,"support":0.9764148},{"time_hours":195,"approval_perbill":646739131,"support_perbill":9647953,"approval":64.6739131,"support":0.9647953},{"time_hours":196,"approval_perbill":644927537,"support_perbill":9532889,"approval":64.4927537,"support":0.9532889},{"time_hours":197,"approval_perbill":643115943,"support_perbill":9418940,"approval":64.3115943,"support":0.941894},{"time_hours":198,"approval_perbill":641304348,"support_perbill":9306090,"approval":64.1304348,"support":0.930609},{"time_hours":199,"approval_perbill":639492754,"support_perbill":9194323,"approval":63.9492754,"support":0.9194323},{"time_hours":200,"approval_perbill":637681160,"support_perbill":9083623,"approval":63.768116,"support":0.9083623},{"time_hours":201,"approval_perbill":635869566,"support_perbill":8973976,"approval":63.5869566,"support":0.8973976},{"time_hours":202,"approval_perbill":634057971,"support_perbill":8865366,"approval":63.4057971,"support":0.8865366},{"time_hours":203,"approval_perbill":632246378,"support_perbill":8757779,"approval":63.2246378,"support":0.8757779},{"time_hours":204,"approval_perbill":630434783,"support_perbill":8651200,"approval":63.0434783,"support":0.86512},{"time_hours":205,"approval_perbill":628623189,"support_perbill":8545615,"approval":62.8623189,"support":0.8545615},{"time_hours":206,"approval_perbill":626811595,"support_perbill":8441011,"approval":62.6811595,"support":0.8441011},{"time_hours":207,"approval_perbill":625000001,"support_perbill":8337373,"approval":62.5000001,"support":0.8337373},{"time_hours":208,"approval_perbill":623188406,"support_perbill":8234689,"approval":62.3188406,"support":0.8234689},{"time_hours":209,"approval_perbill":621376812,"support_perbill":8132945,"approval":62.1376812,"support":0.8132945},{"time_hours":210,"approval_perbill":619565218,"support_perbill":8032129,"approval":61.9565218,"support":0.8032129},{"time_hours":211,"approval_perbill":617753624,"support_perbill":7932227,"approval":61.7753624,"support":0.7932227},{"time_hours":212,"approval_perbill":615942030,"support_perbill":7833228,"approval":61.594203,"support":0.7833228},{"time_hours":213,"approval_perbill":614130435,"support_perbill":7735120,"approval":61.4130435,"support":0.773512},{"time_hours":214,"approval_perbill":612318841,"support_perbill":7637889,"approval":61.2318841,"support":0.7637889},{"time_hours":215,"approval_perbill":610507247,"support_perbill":7541525,"approval":61.0507247,"support":0.7541525},{"time_hours":216,"approval_perbill":608695653,"support_perbill":7446017,"approval":60.8695653,"support":0.7446017},{"time_hours":217,"approval_perbill":606884058,"support_perbill":7351351,"approval":60.6884058,"support":0.7351351},{"time_hours":218,"approval_perbill":605072465,"support_perbill":7257519,"approval":60.5072465,"support":0.7257519},{"time_hours":219,"approval_perbill":603260870,"support_perbill":7164508,"approval":60.326087,"support":0.7164508},{"time_hours":220,"approval_perbill":601449276,"support_perbill":7072308,"approval":60.1449276,"support":0.7072308},{"time_hours":221,"approval_perbill":599637682,"support_perbill":6980909,"approval":59.9637682,"support":0.6980909},{"time_hours":222,"approval_perbill":597826088,"support_perbill":6890299,"approval":59.7826088,"support":0.6890299},{"time_hours":223,"approval_perbill":596014493,"support_perbill":6800469,"approval":59.6014493,"support":0.6800469},{"time_hours":224,"approval_perbill":594202899,"support_perbill":6711409,"approval":59.4202899,"support":0.6711409},{"time_hours":225,"approval_perbill":592391305,"support_perbill":6623109,"approval":59.2391305,"support":0.6623109},{"time_hours":226,"approval_perbill":590579711,"support_perbill":6535559,"approval":59.0579711,"support":0.6535559},{"time_hours":227,"approval_perbill":588768116,"support_perbill":6448750,"approval":58.8768116,"support":0.644875},{"time_hours":228,"approval_perbill":586956522,"support_perbill":6362672,"approval":58.6956522,"support":0.6362672},{"time_hours":229,"approval_perbill":585144928,"support_perbill":6277317,"approval":58.5144928,"support":0.6277317},{"time_hours":230,"approval_perbill":583333334,"support_perbill":6192674,"approval":58.3333334,"support":0.6192674},{"time_hours":231,"approval_perbill":581521739,"support_perbill":6108735,"approval":58.1521739,"support":0.6108735},{"time_hours":232,"approval_perbill":579710145,"support_perbill":6025492,"approval":57.9710145,"support":0.6025492},{"time_hours":233,"approval_perbill":577898552,"support_perbill":5942936,"approval":57.7898552,"support":0.5942936},{"time_hours":234,"approval_perbill":576086957,"support_perbill":5861058,"approval":57.6086957,"support":0.5861058},{"time_hours":235,"approval_perbill":574275363,"support_perbill":5779851,"approval":57.4275363,"support":0.5779851},{"time_hours":236,"approval_perbill":572463769,"support_perbill":5699305,"approval":57.2463769,"support":0.5699305},{"time_hours":237,"approval_perbill":570652175,"support_perbill":5619412,"approval":57.0652175,"support":0.5619412},{"time_hours":238,"approval_perbill":568840580,"support_perbill":5540166,"approval":56.884058,"support":0.5540166},{"time_hours":239,"approval_perbill":567028986,"support_perbill":5461558,"approval":56.7028986,"support":0.5461558},{"time_hours":240,"approval_perbill":565217392,"support_perbill":5383580,"approval":56.5217392,"support":0.538358},{"time_hours":241,"approval_perbill":563405798,"support_perbill":5306225,"approval":56.3405798,"support":0.5306225},{"time_hours":242,"approval_perbill":561594203,"support_perbill":5229485,"approval":56.1594203,"support":0.5229485},{"time_hours":243,"approval_perbill":559782609,"support_perbill":5153354,"approval":55.9782609,"support":0.5153354},{"time_hours":244,"approval_perbill":557971015,"support_perbill":5077823,"approval":55.7971015,"support":0.5077823},{"time_hours":245,"approval_perbill":556159421,"support_perbill":5002886,"approval":55.6159421,"support":0.5002886},{"time_hours":246,"approval_perbill":554347826,"support_perbill":4928536,"approval":55.4347826,"support":0.4928536},{"time_hours":247,"approval_perbill":552536233,"support_perbill":4854766,"approval":55.2536233,"support":0.4854766},{"time_hours":248,"approval_perbill":550724638,"support_perbill":4781569,"approval":55.0724638,"support":0.4781569},{"time_hours":249,"approval_perbill":548913044,"support_perbill":4708939,"approval":54.8913044,"support":0.4708939},{"time_hours":250,"approval_perbill":547101450,"support_perbill":4636868,"approval":54.710145,"support":0.4636868},{"time_hours":251,"approval_perbill":545289856,"support_perbill":4565351,"approval":54.5289856,"support":0.4565351},{"time_hours":252,"approval_perbill":543478261,"support_perbill":4494382,"approval":54.3478261,"support":0.4494382},{"time_hours":253,"approval_perbill":541666667,"support_perbill":4423953,"approval":54.1666667,"support":0.4423953},{"time_hours":254,"approval_perbill":539855073,"support_perbill":4354059,"approval":53.9855073,"support":0.4354059},{"time_hours":255,"approval_perbill":538043479,"support_perbill":4284694,"approval":53.8043479,"support":0.4284694},{"time_hours":256,"approval_perbill":536231885,"support_perbill":4215851,"approval":53.6231885,"support":0.4215851},{"time_hours":257,"approval_perbill":534420290,"support_perbill":4147526,"approval":53.442029,"support":0.4147526},{"time_hours":258,"approval_perbill":532608696,"support_perbill":4079711,"approval":53.2608696,"support":0.4079711},{"time_hours":259,"approval_perbill":530797102,"support_perbill":4012402,"approval":53.0797102,"support":0.4012402},{"time_hours":260,"approval_perbill":528985508,"support_perbill":3945592,"approval":52.8985508,"support":0.3945592},{"time_hours":261,"approval_perbill":527173913,"support_perbill":3879277,"approval":52.7173913,"support":0.3879277},{"time_hours":262,"approval_perbill":525362320,"support_perbill":3813450,"approval":52.536232,"support":0.381345},{"time_hours":263,"approval_perbill":523550725,"support_perbill":3748106,"approval":52.3550725,"support":0.3748106},{"time_hours":264,"approval_perbill":521739131,"support_perbill":3683241,"approval":52.1739131,"support":0.3683241},{"time_hours":265,"approval_perbill":519927537,"support_perbill":3618848,"approval":51.9927537,"support":0.3618848},{"time_hours":266,"approval_perbill":518115943,"support_perbill":3554923,"approval":51.8115943,"support":0.3554923},{"time_hours":267,"approval_perbill":516304348,"support_perbill":3491461,"approval":51.6304348,"support":0.3491461},{"time_hours":268,"approval_perbill":514492754,"support_perbill":3428456,"approval":51.4492754,"support":0.3428456},{"time_hours":269,"approval_perbill":512681160,"support_perbill":3365904,"approval":51.268116,"support":0.3365904},{"time_hours":270,"approval_perbill":510869566,"support_perbill":3303799,"approval":51.0869566,"support":0.3303799},{"time_hours":271,"approval_perbill":509057971,"support_perbill":3242137,"approval":50.9057971,"support":0.3242137},{"time_hours":272,"approval_perbill":507246377,"support_perbill":3180914,"approval":50.7246377,"support":0.3180914},{"time_hours":273,"approval_perbill":505434783,"support_perbill":3120124,"approval":50.5434783,"support":0.3120124},{"time_hours":274,"approval_perbill":503623189,"support_perbill":3059764,"approval":50.3623189,"support":0.3059764},{"time_hours":275,"approval_perbill":501811595,"support_perbill":2999827,"approval":50.1811595,"support":0.2999827},{"time_hours":276,"approval_perbill":500000000,"support_perbill":2940311,"approval":50,"support":0.2940311},{"time_hours":277,"approval_perbill":500000000,"support_perbill":2881211,"approval":50,"support":0.2881211},{"time_hours":278,"approval_perbill":500000000,"support_perbill":2822521,"approval":50,"support":0.2822521},{"time_hours":279,"approval_perbill":500000000,"support_perbill":2764239,"approval":50,"support":0.2764239},{"time_hours":280,"approval_perbill":500000000,"support_perbill":2706360,"approval":50,"support":0.270636},{"time_hours":281,"approval_perbill":500000000,"support_perbill":2648879,"approval":50,"support":0.2648879},{"time_hours":282,"approval_perbill":500000000,"support_perbill":2591792,"approval":50,"support":0.2591792},{"time_hours":283,"approval_perbill":500000000,"support_perbill":2535096,"approval":50,"support":0.2535096},{"time_hours":284,"approval_perbill":500000000,"support_perbill":2478787,"approval":50,"support":0.2478787},{"time_hours":285,"approval_perbill":500000000,"support_perbill":2422860,"approval":50,"support":0.242286},{"time_hours":286,"approval_perbill":500000000,"support_perbill":2367312,"approval":50,"support":0.2367312},{"time_hours":287,"approval_perbill":500000000,"support_perbill":2312138,"approval":50,"support":0.2312138},{"time_hours":288,"approval_perbill":500000000,"support_perbill":2257336,"approval":50,"support":0.2257336},{"time_hours":289,"approval_perbill":500000000,"support_perbill":2202901,"approval":50,"support":0.2202901},{"time_hours":290,"approval_perbill":500000000,"support_perbill":2148829,"approval":50,"support":0.2148829},{"time_hours":291,"approval_perbill":500000000,"support_perbill":2095118,"approval":50,"support":0.2095118},{"time_hours":292,"approval_perbill":500000000,"support_perbill":2041763,"approval":50,"support":0.2041763},{"time_hours":293,"approval_perbill":500000000,"support_perbill":1988761,"approval":50,"support":0.1988761},{"time_hours":294,"approval_perbill":500000000,"support_perbill":1936108,"approval":50,"support":0.1936108},{"time_hours":295,"approval_perbill":500000000,"support_perbill":1883801,"approval":50,"support":0.1883801},{"time_hours":296,"approval_perbill":500000000,"support_perbill":1831837,"approval":50,"support":0.1831837},{"time_hours":297,"approval_perbill":500000000,"support_perbill":1780212,"approval":50,"support":0.1780212},{"time_hours":298,"approval_perbill":500000000,"support_perbill":1728923,"approval":50,"support":0.1728923},{"time_hours":299,"approval_perbill":500000000,"support_perbill":1677966,"approval":50,"support":0.1677966},{"time_hours":300,"approval_perbill":500000000,"support_perbill":1627339,"approval":50,"support":0.1627339},{"time_hours":301,"approval_perbill":500000000,"support_perbill":1577038,"approval":50,"support":0.1577038},{"time_hours":302,"approval_perbill":500000000,"support_perbill":1527060,"approval":50,"support":0.152706},{"time_hours":303,"approval_perbill":500000000,"support_perbill":1477402,"approval":50,"support":0.1477402},{"time_hours":304,"approval_perbill":500000000,"support_perbill":1428061,"approval":50,"support":0.1428061},{"time_hours":305,"approval_perbill":500000000,"support_perbill":1379034,"approval":50,"support":0.1379034},{"time_hours":306,"approval_perbill":500000000,"support_perbill":1330317,"approval":50,"support":0.1330317},{"time_hours":307,"approval_perbill":500000000,"support_perbill":1281909,"approval":50,"support":0.1281909},{"time_hours":308,"approval_perbill":500000000,"support_perbill":1233806,"approval":50,"support":0.1233806},{"time_hours":309,"approval_perbill":500000000,"support_perbill":1186005,"approval":50,"support":0.1186005},{"time_hours":310,"approval_perbill":500000000,"support_perbill":1138503,"approval":50,"support":0.1138503},{"time_hours":311,"approval_perbill":500000000,"support_perbill":1091297,"approval":50,"support":0.1091297},{"time_hours":312,"approval_perbill":500000000,"support_perbill":1044386,"approval":50,"support":0.1044386},{"time_hours":313,"approval_perbill":500000000,"support_perbill":997765,"approval":50,"support":0.0997765},{"time_hours":314,"approval_perbill":500000000,"support_perbill":951433,"approval":50,"support":0.0951433},{"time_hours":315,"approval_perbill":500000000,"support_perbill":905386,"approval":50,"support":0.0905386},{"time_hours":316,"approval_perbill":500000000,"support_perbill":859623,"approval":50,"support":0.0859623},{"time_hours":317,"approval_perbill":500000000,"support_perbill":814140,"approval":50,"support":0.081414},{"time_hours":318,"approval_perbill":500000000,"support_perbill":768934,"approval":50,"support":0.0768934},{"time_hours":319,"approval_perbill":500000000,"support_perbill":724004,"approval":50,"support":0.0724004},{"time_hours":320,"approval_perbill":500000000,"support_perbill":679347,"approval":50,"support":0.0679347},{"time_hours":321,"approval_perbill":500000000,"support_perbill":634960,"approval":50,"support":0.063496},{"time_hours":322,"approval_perbill":500000000,"support_perbill":590841,"approval":50,"support":0.0590841},{"time_hours":323,"approval_perbill":500000000,"support_perbill":546988,"approval":50,"support":0.0546988},{"time_hours":324,"approval_perbill":500000000,"support_perbill":503397,"approval":50,"support":0.0503397},{"time_hours":325,"approval_perbill":500000000,"support_perbill":460067,"approval":50,"support":0.0460067},{"time_hours":326,"approval_perbill":500000000,"support_perbill":416996,"approval":50,"support":0.0416996},{"time_hours":327,"approval_perbill":500000000,"support_perbill":374181,"approval":50,"support":0.0374181},{"time_hours":328,"approval_perbill":500000000,"support_perbill":331619,"approval":50,"support":0.0331619},{"time_hours":329,"approval_perbill":500000000,"support_perbill":289309,"approval":50,"support":0.0289309},{"time_hours":330,"approval_perbill":500000000,"support_perbill":247249,"approval":50,"support":0.0247249},{"time_hours":331,"approval_perbill":500000000,"support_perbill":205435,"approval":50,"support":0.0205435},{"time_hours":332,"approval_perbill":500000000,"support_perbill":163867,"approval":50,"support":0.0163867},{"time_hours":333,"approval_perbill":500000000,"support_perbill":122541,"approval":50,"support":0.0122541},{"time_hours":334,"approval_perbill":500000000,"support_perbill":81456,"approval":50,"support":0.0081456},{"time_hours":335,"approval_perbill":500000000,"support_perbill":40609,"approval":50,"support":0.0040609},{"time_hours":336,"approval_perbill":500000000,"support_perbill":0,"approval":50,"support":0}]')},95036:p=>{"use strict";p.exports=JSON.parse('[{"time_hours":0,"approval_perbill":1000000000,"support_perbill":500000026,"approval":100,"support":50.0000026},{"time_hours":1,"approval_perbill":997549020,"support_perbill":418401359,"approval":99.754902,"support":41.8401359},{"time_hours":2,"approval_perbill":995098040,"support_perbill":359397443,"approval":99.509804,"support":35.9397443},{"time_hours":3,"approval_perbill":992647060,"support_perbill":314744813,"approval":99.264706,"support":31.4744813},{"time_hours":4,"approval_perbill":990196080,"support_perbill":279775293,"approval":99.019608,"support":27.9775293},{"time_hours":5,"approval_perbill":987745099,"support_perbill":251647242,"approval":98.7745099,"support":25.1647242},{"time_hours":6,"approval_perbill":985294119,"support_perbill":228531862,"approval":98.5294119,"support":22.8531862},{"time_hours":7,"approval_perbill":982843138,"support_perbill":209198815,"approval":98.2843138,"support":20.9198815},{"time_hours":8,"approval_perbill":980392158,"support_perbill":192789972,"approval":98.0392158,"support":19.2789972},{"time_hours":9,"approval_perbill":977941177,"support_perbill":178688524,"approval":97.7941177,"support":17.8688524},{"time_hours":10,"approval_perbill":975490197,"support_perbill":166439756,"approval":97.5490197,"support":16.6439756},{"time_hours":11,"approval_perbill":973039216,"support_perbill":155701053,"approval":97.3039216,"support":15.5701053},{"time_hours":12,"approval_perbill":970588236,"support_perbill":146209386,"approval":97.0588236,"support":14.6209386},{"time_hours":13,"approval_perbill":968137256,"support_perbill":137759452,"approval":96.8137256,"support":13.7759452},{"time_hours":14,"approval_perbill":965686276,"support_perbill":130188679,"approval":96.5686276,"support":13.0188679},{"time_hours":15,"approval_perbill":963235295,"support_perbill":123366639,"approval":96.3235295,"support":12.3366639},{"time_hours":16,"approval_perbill":960784315,"support_perbill":117187499,"approval":96.0784315,"support":11.7187499},{"time_hours":17,"approval_perbill":958333334,"support_perbill":111564465,"approval":95.8333334,"support":11.1564465},{"time_hours":18,"approval_perbill":955882354,"support_perbill":106425701,"approval":95.5882354,"support":10.6425701},{"time_hours":19,"approval_perbill":953431373,"support_perbill":101711228,"approval":95.3431373,"support":10.1711228},{"time_hours":20,"approval_perbill":950980393,"support_perbill":97370582,"approval":95.0980393,"support":9.7370582},{"time_hours":21,"approval_perbill":948529412,"support_perbill":93360994,"approval":94.8529412,"support":9.3360994},{"time_hours":22,"approval_perbill":946078432,"support_perbill":89645982,"approval":94.6078432,"support":8.9645982},{"time_hours":23,"approval_perbill":943627452,"support_perbill":86194234,"approval":94.3627452,"support":8.6194234},{"time_hours":24,"approval_perbill":941176471,"support_perbill":82978722,"approval":94.1176471,"support":8.2978722},{"time_hours":25,"approval_perbill":938725491,"support_perbill":79975997,"approval":93.8725491,"support":7.9975997},{"time_hours":26,"approval_perbill":936274511,"support_perbill":77165614,"approval":93.6274511,"support":7.7165614},{"time_hours":27,"approval_perbill":933823531,"support_perbill":74529666,"approval":93.3823531,"support":7.4529666},{"time_hours":28,"approval_perbill":931372550,"support_perbill":72052400,"approval":93.137255,"support":7.20524},{"time_hours":29,"approval_perbill":928921570,"support_perbill":69719908,"approval":92.892157,"support":6.9719908},{"time_hours":30,"approval_perbill":926470589,"support_perbill":67519857,"approval":92.6470589,"support":6.7519857},{"time_hours":31,"approval_perbill":924019609,"support_perbill":65441280,"approval":92.4019609,"support":6.544128},{"time_hours":32,"approval_perbill":921568628,"support_perbill":63474386,"approval":92.1568628,"support":6.3474386},{"time_hours":33,"approval_perbill":919117648,"support_perbill":61610409,"approval":91.9117648,"support":6.1610409},{"time_hours":34,"approval_perbill":916666667,"support_perbill":59841478,"approval":91.6666667,"support":5.9841478},{"time_hours":35,"approval_perbill":914215687,"support_perbill":58160504,"approval":91.4215687,"support":5.8160504},{"time_hours":36,"approval_perbill":911764706,"support_perbill":56561084,"approval":91.1764706,"support":5.6561084},{"time_hours":37,"approval_perbill":909313726,"support_perbill":55037426,"approval":90.9313726,"support":5.5037426},{"time_hours":38,"approval_perbill":906862746,"support_perbill":53584271,"approval":90.6862746,"support":5.3584271},{"time_hours":39,"approval_perbill":904411766,"support_perbill":52196835,"approval":90.4411766,"support":5.2196835},{"time_hours":40,"approval_perbill":901960785,"support_perbill":50870759,"approval":90.1960785,"support":5.0870759},{"time_hours":41,"approval_perbill":899509805,"support_perbill":49602061,"approval":89.9509805,"support":4.9602061},{"time_hours":42,"approval_perbill":897058824,"support_perbill":48387095,"approval":89.7058824,"support":4.8387095},{"time_hours":43,"approval_perbill":894607844,"support_perbill":47222519,"approval":89.4607844,"support":4.7222519},{"time_hours":44,"approval_perbill":892156864,"support_perbill":46105262,"approval":89.2156864,"support":4.6105262},{"time_hours":45,"approval_perbill":889705883,"support_perbill":45032496,"approval":88.9705883,"support":4.5032496},{"time_hours":46,"approval_perbill":887254903,"support_perbill":44001617,"approval":88.7254903,"support":4.4001617},{"time_hours":47,"approval_perbill":884803922,"support_perbill":43010218,"approval":88.4803922,"support":4.3010218},{"time_hours":48,"approval_perbill":882352942,"support_perbill":42056074,"approval":88.2352942,"support":4.2056074},{"time_hours":49,"approval_perbill":879901962,"support_perbill":41137122,"approval":87.9901962,"support":4.1137122},{"time_hours":50,"approval_perbill":877450982,"support_perbill":40251453,"approval":87.7450982,"support":4.0251453},{"time_hours":51,"approval_perbill":875000001,"support_perbill":39397289,"approval":87.5000001,"support":3.9397289},{"time_hours":52,"approval_perbill":872549021,"support_perbill":38572980,"approval":87.2549021,"support":3.857298},{"time_hours":53,"approval_perbill":870098040,"support_perbill":37776985,"approval":87.009804,"support":3.7776985},{"time_hours":54,"approval_perbill":867647060,"support_perbill":37007873,"approval":86.764706,"support":3.7007873},{"time_hours":55,"approval_perbill":865196079,"support_perbill":36264302,"approval":86.5196079,"support":3.6264302},{"time_hours":56,"approval_perbill":862745099,"support_perbill":35545023,"approval":86.2745099,"support":3.5545023},{"time_hours":57,"approval_perbill":860294118,"support_perbill":34848862,"approval":86.0294118,"support":3.4848862},{"time_hours":58,"approval_perbill":857843138,"support_perbill":34174724,"approval":85.7843138,"support":3.4174724},{"time_hours":59,"approval_perbill":855392157,"support_perbill":33521580,"approval":85.5392157,"support":3.352158},{"time_hours":60,"approval_perbill":852941177,"support_perbill":32888464,"approval":85.2941177,"support":3.2888464},{"time_hours":61,"approval_perbill":850490197,"support_perbill":32274469,"approval":85.0490197,"support":3.2274469},{"time_hours":62,"approval_perbill":848039217,"support_perbill":31678741,"approval":84.8039217,"support":3.1678741},{"time_hours":63,"approval_perbill":845588236,"support_perbill":31100477,"approval":84.5588236,"support":3.1100477},{"time_hours":64,"approval_perbill":843137256,"support_perbill":30538921,"approval":84.3137256,"support":3.0538921},{"time_hours":65,"approval_perbill":840686276,"support_perbill":29993358,"approval":84.0686276,"support":2.9993358},{"time_hours":66,"approval_perbill":838235295,"support_perbill":29463116,"approval":83.8235295,"support":2.9463116},{"time_hours":67,"approval_perbill":835784315,"support_perbill":28947556,"approval":83.5784315,"support":2.8947556},{"time_hours":68,"approval_perbill":833333334,"support_perbill":28446079,"approval":83.3333334,"support":2.8446079},{"time_hours":69,"approval_perbill":830882354,"support_perbill":27958114,"approval":83.0882354,"support":2.7958114},{"time_hours":70,"approval_perbill":828431373,"support_perbill":27483123,"approval":82.8431373,"support":2.7483123},{"time_hours":71,"approval_perbill":825980393,"support_perbill":27020596,"approval":82.5980393,"support":2.7020596},{"time_hours":72,"approval_perbill":823529412,"support_perbill":26570047,"approval":82.3529412,"support":2.6570047},{"time_hours":73,"approval_perbill":821078432,"support_perbill":26131019,"approval":82.1078432,"support":2.6131019},{"time_hours":74,"approval_perbill":818627452,"support_perbill":25703073,"approval":81.8627452,"support":2.5703073},{"time_hours":75,"approval_perbill":816176472,"support_perbill":25285796,"approval":81.6176472,"support":2.5285796},{"time_hours":76,"approval_perbill":813725491,"support_perbill":24878795,"approval":81.3725491,"support":2.4878795},{"time_hours":77,"approval_perbill":811274511,"support_perbill":24481693,"approval":81.1274511,"support":2.4481693},{"time_hours":78,"approval_perbill":808823530,"support_perbill":24094134,"approval":80.882353,"support":2.4094134},{"time_hours":79,"approval_perbill":806372550,"support_perbill":23715779,"approval":80.637255,"support":2.3715779},{"time_hours":80,"approval_perbill":803921569,"support_perbill":23346303,"approval":80.3921569,"support":2.3346303},{"time_hours":81,"approval_perbill":801470589,"support_perbill":22985397,"approval":80.1470589,"support":2.2985397},{"time_hours":82,"approval_perbill":799019608,"support_perbill":22632766,"approval":79.9019608,"support":2.2632766},{"time_hours":83,"approval_perbill":796568628,"support_perbill":22288130,"approval":79.6568628,"support":2.228813},{"time_hours":84,"approval_perbill":794117648,"support_perbill":21951219,"approval":79.4117648,"support":2.1951219},{"time_hours":85,"approval_perbill":791666668,"support_perbill":21621776,"approval":79.1666668,"support":2.1621776},{"time_hours":86,"approval_perbill":789215688,"support_perbill":21299556,"approval":78.9215688,"support":2.1299556},{"time_hours":87,"approval_perbill":786764707,"support_perbill":20984324,"approval":78.6764707,"support":2.0984324},{"time_hours":88,"approval_perbill":784313727,"support_perbill":20675855,"approval":78.4313727,"support":2.0675855},{"time_hours":89,"approval_perbill":781862746,"support_perbill":20373934,"approval":78.1862746,"support":2.0373934},{"time_hours":90,"approval_perbill":779411766,"support_perbill":20078354,"approval":77.9411766,"support":2.0078354},{"time_hours":91,"approval_perbill":776960785,"support_perbill":19788917,"approval":77.6960785,"support":1.9788917},{"time_hours":92,"approval_perbill":774509805,"support_perbill":19505435,"approval":77.4509805,"support":1.9505435},{"time_hours":93,"approval_perbill":772058824,"support_perbill":19227725,"approval":77.2058824,"support":1.9227725},{"time_hours":94,"approval_perbill":769607844,"support_perbill":18955613,"approval":76.9607844,"support":1.8955613},{"time_hours":95,"approval_perbill":767156863,"support_perbill":18688931,"approval":76.7156863,"support":1.8688931},{"time_hours":96,"approval_perbill":764705883,"support_perbill":18427518,"approval":76.4705883,"support":1.8427518},{"time_hours":97,"approval_perbill":762254903,"support_perbill":18171219,"approval":76.2254903,"support":1.8171219},{"time_hours":98,"approval_perbill":759803923,"support_perbill":17919887,"approval":75.9803923,"support":1.7919887},{"time_hours":99,"approval_perbill":757352942,"support_perbill":17673377,"approval":75.7352942,"support":1.7673377},{"time_hours":100,"approval_perbill":754901962,"support_perbill":17431553,"approval":75.4901962,"support":1.7431553},{"time_hours":101,"approval_perbill":752450981,"support_perbill":17194282,"approval":75.2450981,"support":1.7194282},{"time_hours":102,"approval_perbill":750000001,"support_perbill":16961437,"approval":75.0000001,"support":1.6961437},{"time_hours":103,"approval_perbill":747549020,"support_perbill":16732895,"approval":74.754902,"support":1.6732895},{"time_hours":104,"approval_perbill":745098040,"support_perbill":16508538,"approval":74.509804,"support":1.6508538},{"time_hours":105,"approval_perbill":742647059,"support_perbill":16288252,"approval":74.2647059,"support":1.6288252},{"time_hours":106,"approval_perbill":740196079,"support_perbill":16071927,"approval":74.0196079,"support":1.6071927},{"time_hours":107,"approval_perbill":737745099,"support_perbill":15859457,"approval":73.7745099,"support":1.5859457},{"time_hours":108,"approval_perbill":735294118,"support_perbill":15650741,"approval":73.5294118,"support":1.5650741},{"time_hours":109,"approval_perbill":732843138,"support_perbill":15445679,"approval":73.2843138,"support":1.5445679},{"time_hours":110,"approval_perbill":730392158,"support_perbill":15244176,"approval":73.0392158,"support":1.5244176},{"time_hours":111,"approval_perbill":727941178,"support_perbill":15046141,"approval":72.7941178,"support":1.5046141},{"time_hours":112,"approval_perbill":725490197,"support_perbill":14851485,"approval":72.5490197,"support":1.4851485},{"time_hours":113,"approval_perbill":723039217,"support_perbill":14660121,"approval":72.3039217,"support":1.4660121},{"time_hours":114,"approval_perbill":720588236,"support_perbill":14471968,"approval":72.0588236,"support":1.4471968},{"time_hours":115,"approval_perbill":718137256,"support_perbill":14286945,"approval":71.8137256,"support":1.4286945},{"time_hours":116,"approval_perbill":715686275,"support_perbill":14104975,"approval":71.5686275,"support":1.4104975},{"time_hours":117,"approval_perbill":713235295,"support_perbill":13925982,"approval":71.3235295,"support":1.3925982},{"time_hours":118,"approval_perbill":710784314,"support_perbill":13749894,"approval":71.0784314,"support":1.3749894},{"time_hours":119,"approval_perbill":708333334,"support_perbill":13576642,"approval":70.8333334,"support":1.3576642},{"time_hours":120,"approval_perbill":705882353,"support_perbill":13406156,"approval":70.5882353,"support":1.3406156},{"time_hours":121,"approval_perbill":703431373,"support_perbill":13238372,"approval":70.3431373,"support":1.3238372},{"time_hours":122,"approval_perbill":700980393,"support_perbill":13073226,"approval":70.0980393,"support":1.3073226},{"time_hours":123,"approval_perbill":698529413,"support_perbill":12910655,"approval":69.8529413,"support":1.2910655},{"time_hours":124,"approval_perbill":696078432,"support_perbill":12750601,"approval":69.6078432,"support":1.2750601},{"time_hours":125,"approval_perbill":693627452,"support_perbill":12593005,"approval":69.3627452,"support":1.2593005},{"time_hours":126,"approval_perbill":691176471,"support_perbill":12437810,"approval":69.1176471,"support":1.243781},{"time_hours":127,"approval_perbill":688725491,"support_perbill":12284964,"approval":68.8725491,"support":1.2284964},{"time_hours":128,"approval_perbill":686274511,"support_perbill":12134411,"approval":68.6274511,"support":1.2134411},{"time_hours":129,"approval_perbill":683823530,"support_perbill":11986103,"approval":68.382353,"support":1.1986103},{"time_hours":130,"approval_perbill":681372550,"support_perbill":11839987,"approval":68.137255,"support":1.1839987},{"time_hours":131,"approval_perbill":678921569,"support_perbill":11696017,"approval":67.8921569,"support":1.1696017},{"time_hours":132,"approval_perbill":676470589,"support_perbill":11554145,"approval":67.6470589,"support":1.1554145},{"time_hours":133,"approval_perbill":674019609,"support_perbill":11414326,"approval":67.4019609,"support":1.1414326},{"time_hours":134,"approval_perbill":671568629,"support_perbill":11276516,"approval":67.1568629,"support":1.1276516},{"time_hours":135,"approval_perbill":669117648,"support_perbill":11140671,"approval":66.9117648,"support":1.1140671},{"time_hours":136,"approval_perbill":666666668,"support_perbill":11006750,"approval":66.6666668,"support":1.100675},{"time_hours":137,"approval_perbill":664215687,"support_perbill":10874713,"approval":66.4215687,"support":1.0874713},{"time_hours":138,"approval_perbill":661764707,"support_perbill":10744519,"approval":66.1764707,"support":1.0744519},{"time_hours":139,"approval_perbill":659313726,"support_perbill":10616130,"approval":65.9313726,"support":1.061613},{"time_hours":140,"approval_perbill":656862746,"support_perbill":10489510,"approval":65.6862746,"support":1.048951},{"time_hours":141,"approval_perbill":654411765,"support_perbill":10364622,"approval":65.4411765,"support":1.0364622},{"time_hours":142,"approval_perbill":651960785,"support_perbill":10241430,"approval":65.1960785,"support":1.024143},{"time_hours":143,"approval_perbill":649509804,"support_perbill":10119900,"approval":64.9509804,"support":1.01199},{"time_hours":144,"approval_perbill":647058824,"support_perbill":10000000,"approval":64.7058824,"support":1},{"time_hours":145,"approval_perbill":644607844,"support_perbill":9881695,"approval":64.4607844,"support":0.9881695},{"time_hours":146,"approval_perbill":642156864,"support_perbill":9764955,"approval":64.2156864,"support":0.9764955},{"time_hours":147,"approval_perbill":639705883,"support_perbill":9649749,"approval":63.9705883,"support":0.9649749},{"time_hours":148,"approval_perbill":637254903,"support_perbill":9536047,"approval":63.7254903,"support":0.9536047},{"time_hours":149,"approval_perbill":634803923,"support_perbill":9423820,"approval":63.4803923,"support":0.942382},{"time_hours":150,"approval_perbill":632352942,"support_perbill":9313038,"approval":63.2352942,"support":0.9313038},{"time_hours":151,"approval_perbill":629901962,"support_perbill":9203674,"approval":62.9901962,"support":0.9203674},{"time_hours":152,"approval_perbill":627450981,"support_perbill":9095702,"approval":62.7450981,"support":0.9095702},{"time_hours":153,"approval_perbill":625000001,"support_perbill":8989095,"approval":62.5000001,"support":0.8989095},{"time_hours":154,"approval_perbill":622549020,"support_perbill":8883826,"approval":62.254902,"support":0.8883826},{"time_hours":155,"approval_perbill":620098040,"support_perbill":8779872,"approval":62.009804,"support":0.8779872},{"time_hours":156,"approval_perbill":617647059,"support_perbill":8677207,"approval":61.7647059,"support":0.8677207},{"time_hours":157,"approval_perbill":615196079,"support_perbill":8575808,"approval":61.5196079,"support":0.8575808},{"time_hours":158,"approval_perbill":612745099,"support_perbill":8475652,"approval":61.2745099,"support":0.8475652},{"time_hours":159,"approval_perbill":610294119,"support_perbill":8376715,"approval":61.0294119,"support":0.8376715},{"time_hours":160,"approval_perbill":607843138,"support_perbill":8278976,"approval":60.7843138,"support":0.8278976},{"time_hours":161,"approval_perbill":605392158,"support_perbill":8182413,"approval":60.5392158,"support":0.8182413},{"time_hours":162,"approval_perbill":602941177,"support_perbill":8087005,"approval":60.2941177,"support":0.8087005},{"time_hours":163,"approval_perbill":600490197,"support_perbill":7992731,"approval":60.0490197,"support":0.7992731},{"time_hours":164,"approval_perbill":598039216,"support_perbill":7899571,"approval":59.8039216,"support":0.7899571},{"time_hours":165,"approval_perbill":595588236,"support_perbill":7807506,"approval":59.5588236,"support":0.7807506},{"time_hours":166,"approval_perbill":593137255,"support_perbill":7716516,"approval":59.3137255,"support":0.7716516},{"time_hours":167,"approval_perbill":590686275,"support_perbill":7626583,"approval":59.0686275,"support":0.7626583},{"time_hours":168,"approval_perbill":588235295,"support_perbill":7537688,"approval":58.8235295,"support":0.7537688},{"time_hours":169,"approval_perbill":585784315,"support_perbill":7449814,"approval":58.5784315,"support":0.7449814},{"time_hours":170,"approval_perbill":583333335,"support_perbill":7362942,"approval":58.3333335,"support":0.7362942},{"time_hours":171,"approval_perbill":580882354,"support_perbill":7277057,"approval":58.0882354,"support":0.7277057},{"time_hours":172,"approval_perbill":578431374,"support_perbill":7192141,"approval":57.8431374,"support":0.7192141},{"time_hours":173,"approval_perbill":575980393,"support_perbill":7108178,"approval":57.5980393,"support":0.7108178},{"time_hours":174,"approval_perbill":573529413,"support_perbill":7025151,"approval":57.3529413,"support":0.7025151},{"time_hours":175,"approval_perbill":571078432,"support_perbill":6943047,"approval":57.1078432,"support":0.6943047},{"time_hours":176,"approval_perbill":568627452,"support_perbill":6861848,"approval":56.8627452,"support":0.6861848},{"time_hours":177,"approval_perbill":566176471,"support_perbill":6781540,"approval":56.6176471,"support":0.678154},{"time_hours":178,"approval_perbill":563725491,"support_perbill":6702109,"approval":56.3725491,"support":0.6702109},{"time_hours":179,"approval_perbill":561274510,"support_perbill":6623541,"approval":56.127451,"support":0.6623541},{"time_hours":180,"approval_perbill":558823530,"support_perbill":6545820,"approval":55.882353,"support":0.654582},{"time_hours":181,"approval_perbill":556372550,"support_perbill":6468935,"approval":55.637255,"support":0.6468935},{"time_hours":182,"approval_perbill":553921570,"support_perbill":6392871,"approval":55.392157,"support":0.6392871},{"time_hours":183,"approval_perbill":551470589,"support_perbill":6317615,"approval":55.1470589,"support":0.6317615},{"time_hours":184,"approval_perbill":549019609,"support_perbill":6243154,"approval":54.9019609,"support":0.6243154},{"time_hours":185,"approval_perbill":546568628,"support_perbill":6169476,"approval":54.6568628,"support":0.6169476},{"time_hours":186,"approval_perbill":544117648,"support_perbill":6096569,"approval":54.4117648,"support":0.6096569},{"time_hours":187,"approval_perbill":541666667,"support_perbill":6024421,"approval":54.1666667,"support":0.6024421},{"time_hours":188,"approval_perbill":539215687,"support_perbill":5953019,"approval":53.9215687,"support":0.5953019},{"time_hours":189,"approval_perbill":536764706,"support_perbill":5882353,"approval":53.6764706,"support":0.5882353},{"time_hours":190,"approval_perbill":534313726,"support_perbill":5812410,"approval":53.4313726,"support":0.581241},{"time_hours":191,"approval_perbill":531862746,"support_perbill":5743181,"approval":53.1862746,"support":0.5743181},{"time_hours":192,"approval_perbill":529411765,"support_perbill":5674653,"approval":52.9411765,"support":0.5674653},{"time_hours":193,"approval_perbill":526960785,"support_perbill":5606817,"approval":52.6960785,"support":0.5606817},{"time_hours":194,"approval_perbill":524509805,"support_perbill":5539662,"approval":52.4509805,"support":0.5539662},{"time_hours":195,"approval_perbill":522058825,"support_perbill":5473177,"approval":52.2058825,"support":0.5473177},{"time_hours":196,"approval_perbill":519607844,"support_perbill":5407354,"approval":51.9607844,"support":0.5407354},{"time_hours":197,"approval_perbill":517156864,"support_perbill":5342181,"approval":51.7156864,"support":0.5342181},{"time_hours":198,"approval_perbill":514705883,"support_perbill":5277650,"approval":51.4705883,"support":0.527765},{"time_hours":199,"approval_perbill":512254903,"support_perbill":5213751,"approval":51.2254903,"support":0.5213751},{"time_hours":200,"approval_perbill":509803922,"support_perbill":5150474,"approval":50.9803922,"support":0.5150474},{"time_hours":201,"approval_perbill":507352942,"support_perbill":5087812,"approval":50.7352942,"support":0.5087812},{"time_hours":202,"approval_perbill":504901961,"support_perbill":5025754,"approval":50.4901961,"support":0.5025754},{"time_hours":203,"approval_perbill":502450981,"support_perbill":4964292,"approval":50.2450981,"support":0.4964292},{"time_hours":204,"approval_perbill":500000000,"support_perbill":4903417,"approval":50,"support":0.4903417},{"time_hours":205,"approval_perbill":500000000,"support_perbill":4843122,"approval":50,"support":0.4843122},{"time_hours":206,"approval_perbill":500000000,"support_perbill":4783398,"approval":50,"support":0.4783398},{"time_hours":207,"approval_perbill":500000000,"support_perbill":4724236,"approval":50,"support":0.4724236},{"time_hours":208,"approval_perbill":500000000,"support_perbill":4665630,"approval":50,"support":0.466563},{"time_hours":209,"approval_perbill":500000000,"support_perbill":4607570,"approval":50,"support":0.460757},{"time_hours":210,"approval_perbill":500000000,"support_perbill":4550050,"approval":50,"support":0.455005},{"time_hours":211,"approval_perbill":500000000,"support_perbill":4493062,"approval":50,"support":0.4493062},{"time_hours":212,"approval_perbill":500000000,"support_perbill":4436599,"approval":50,"support":0.4436599},{"time_hours":213,"approval_perbill":500000000,"support_perbill":4380654,"approval":50,"support":0.4380654},{"time_hours":214,"approval_perbill":500000000,"support_perbill":4325218,"approval":50,"support":0.4325218},{"time_hours":215,"approval_perbill":500000000,"support_perbill":4270287,"approval":50,"support":0.4270287},{"time_hours":216,"approval_perbill":500000000,"support_perbill":4215851,"approval":50,"support":0.4215851},{"time_hours":217,"approval_perbill":500000000,"support_perbill":4161906,"approval":50,"support":0.4161906},{"time_hours":218,"approval_perbill":500000000,"support_perbill":4108444,"approval":50,"support":0.4108444},{"time_hours":219,"approval_perbill":500000000,"support_perbill":4055459,"approval":50,"support":0.4055459},{"time_hours":220,"approval_perbill":500000000,"support_perbill":4002944,"approval":50,"support":0.4002944},{"time_hours":221,"approval_perbill":500000000,"support_perbill":3950894,"approval":50,"support":0.3950894},{"time_hours":222,"approval_perbill":500000000,"support_perbill":3899302,"approval":50,"support":0.3899302},{"time_hours":223,"approval_perbill":500000000,"support_perbill":3848162,"approval":50,"support":0.3848162},{"time_hours":224,"approval_perbill":500000000,"support_perbill":3797468,"approval":50,"support":0.3797468},{"time_hours":225,"approval_perbill":500000000,"support_perbill":3747215,"approval":50,"support":0.3747215},{"time_hours":226,"approval_perbill":500000000,"support_perbill":3697396,"approval":50,"support":0.3697396},{"time_hours":227,"approval_perbill":500000000,"support_perbill":3648006,"approval":50,"support":0.3648006},{"time_hours":228,"approval_perbill":500000000,"support_perbill":3599040,"approval":50,"support":0.359904},{"time_hours":229,"approval_perbill":500000000,"support_perbill":3550492,"approval":50,"support":0.3550492},{"time_hours":230,"approval_perbill":500000000,"support_perbill":3502357,"approval":50,"support":0.3502357},{"time_hours":231,"approval_perbill":500000000,"support_perbill":3454629,"approval":50,"support":0.3454629},{"time_hours":232,"approval_perbill":500000000,"support_perbill":3407304,"approval":50,"support":0.3407304},{"time_hours":233,"approval_perbill":500000000,"support_perbill":3360376,"approval":50,"support":0.3360376},{"time_hours":234,"approval_perbill":500000000,"support_perbill":3313840,"approval":50,"support":0.331384},{"time_hours":235,"approval_perbill":500000000,"support_perbill":3267692,"approval":50,"support":0.3267692},{"time_hours":236,"approval_perbill":500000000,"support_perbill":3221926,"approval":50,"support":0.3221926},{"time_hours":237,"approval_perbill":500000000,"support_perbill":3176538,"approval":50,"support":0.3176538},{"time_hours":238,"approval_perbill":500000000,"support_perbill":3131524,"approval":50,"support":0.3131524},{"time_hours":239,"approval_perbill":500000000,"support_perbill":3086878,"approval":50,"support":0.3086878},{"time_hours":240,"approval_perbill":500000000,"support_perbill":3042596,"approval":50,"support":0.3042596},{"time_hours":241,"approval_perbill":500000000,"support_perbill":2998674,"approval":50,"support":0.2998674},{"time_hours":242,"approval_perbill":500000000,"support_perbill":2955107,"approval":50,"support":0.2955107},{"time_hours":243,"approval_perbill":500000000,"support_perbill":2911892,"approval":50,"support":0.2911892},{"time_hours":244,"approval_perbill":500000000,"support_perbill":2869023,"approval":50,"support":0.2869023},{"time_hours":245,"approval_perbill":500000000,"support_perbill":2826496,"approval":50,"support":0.2826496},{"time_hours":246,"approval_perbill":500000000,"support_perbill":2784309,"approval":50,"support":0.2784309},{"time_hours":247,"approval_perbill":500000000,"support_perbill":2742455,"approval":50,"support":0.2742455},{"time_hours":248,"approval_perbill":500000000,"support_perbill":2700933,"approval":50,"support":0.2700933},{"time_hours":249,"approval_perbill":500000000,"support_perbill":2659737,"approval":50,"support":0.2659737},{"time_hours":250,"approval_perbill":500000000,"support_perbill":2618864,"approval":50,"support":0.2618864},{"time_hours":251,"approval_perbill":500000000,"support_perbill":2578310,"approval":50,"support":0.257831},{"time_hours":252,"approval_perbill":500000000,"support_perbill":2538071,"approval":50,"support":0.2538071},{"time_hours":253,"approval_perbill":500000000,"support_perbill":2498144,"approval":50,"support":0.2498144},{"time_hours":254,"approval_perbill":500000000,"support_perbill":2458525,"approval":50,"support":0.2458525},{"time_hours":255,"approval_perbill":500000000,"support_perbill":2419210,"approval":50,"support":0.241921},{"time_hours":256,"approval_perbill":500000000,"support_perbill":2380197,"approval":50,"support":0.2380197},{"time_hours":257,"approval_perbill":500000000,"support_perbill":2341481,"approval":50,"support":0.2341481},{"time_hours":258,"approval_perbill":500000000,"support_perbill":2303059,"approval":50,"support":0.2303059},{"time_hours":259,"approval_perbill":500000000,"support_perbill":2264928,"approval":50,"support":0.2264928},{"time_hours":260,"approval_perbill":500000000,"support_perbill":2227084,"approval":50,"support":0.2227084},{"time_hours":261,"approval_perbill":500000000,"support_perbill":2189525,"approval":50,"support":0.2189525},{"time_hours":262,"approval_perbill":500000000,"support_perbill":2152247,"approval":50,"support":0.2152247},{"time_hours":263,"approval_perbill":500000000,"support_perbill":2115247,"approval":50,"support":0.2115247},{"time_hours":264,"approval_perbill":500000000,"support_perbill":2078522,"approval":50,"support":0.2078522},{"time_hours":265,"approval_perbill":500000000,"support_perbill":2042068,"approval":50,"support":0.2042068},{"time_hours":266,"approval_perbill":500000000,"support_perbill":2005884,"approval":50,"support":0.2005884},{"time_hours":267,"approval_perbill":500000000,"support_perbill":1969965,"approval":50,"support":0.1969965},{"time_hours":268,"approval_perbill":500000000,"support_perbill":1934309,"approval":50,"support":0.1934309},{"time_hours":269,"approval_perbill":500000000,"support_perbill":1898913,"approval":50,"support":0.1898913},{"time_hours":270,"approval_perbill":500000000,"support_perbill":1863775,"approval":50,"support":0.1863775},{"time_hours":271,"approval_perbill":500000000,"support_perbill":1828891,"approval":50,"support":0.1828891},{"time_hours":272,"approval_perbill":500000000,"support_perbill":1794258,"approval":50,"support":0.1794258},{"time_hours":273,"approval_perbill":500000000,"support_perbill":1759875,"approval":50,"support":0.1759875},{"time_hours":274,"approval_perbill":500000000,"support_perbill":1725737,"approval":50,"support":0.1725737},{"time_hours":275,"approval_perbill":500000000,"support_perbill":1691844,"approval":50,"support":0.1691844},{"time_hours":276,"approval_perbill":500000000,"support_perbill":1658191,"approval":50,"support":0.1658191},{"time_hours":277,"approval_perbill":500000000,"support_perbill":1624777,"approval":50,"support":0.1624777},{"time_hours":278,"approval_perbill":500000000,"support_perbill":1591599,"approval":50,"support":0.1591599},{"time_hours":279,"approval_perbill":500000000,"support_perbill":1558654,"approval":50,"support":0.1558654},{"time_hours":280,"approval_perbill":500000000,"support_perbill":1525941,"approval":50,"support":0.1525941},{"time_hours":281,"approval_perbill":500000000,"support_perbill":1493456,"approval":50,"support":0.1493456},{"time_hours":282,"approval_perbill":500000000,"support_perbill":1461197,"approval":50,"support":0.1461197},{"time_hours":283,"approval_perbill":500000000,"support_perbill":1429162,"approval":50,"support":0.1429162},{"time_hours":284,"approval_perbill":500000000,"support_perbill":1397348,"approval":50,"support":0.1397348},{"time_hours":285,"approval_perbill":500000000,"support_perbill":1365754,"approval":50,"support":0.1365754},{"time_hours":286,"approval_perbill":500000000,"support_perbill":1334377,"approval":50,"support":0.1334377},{"time_hours":287,"approval_perbill":500000000,"support_perbill":1303214,"approval":50,"support":0.1303214},{"time_hours":288,"approval_perbill":500000000,"support_perbill":1272264,"approval":50,"support":0.1272264},{"time_hours":289,"approval_perbill":500000000,"support_perbill":1241525,"approval":50,"support":0.1241525},{"time_hours":290,"approval_perbill":500000000,"support_perbill":1210994,"approval":50,"support":0.1210994},{"time_hours":291,"approval_perbill":500000000,"support_perbill":1180668,"approval":50,"support":0.1180668},{"time_hours":292,"approval_perbill":500000000,"support_perbill":1150547,"approval":50,"support":0.1150547},{"time_hours":293,"approval_perbill":500000000,"support_perbill":1120628,"approval":50,"support":0.1120628},{"time_hours":294,"approval_perbill":500000000,"support_perbill":1090909,"approval":50,"support":0.1090909},{"time_hours":295,"approval_perbill":500000000,"support_perbill":1061388,"approval":50,"support":0.1061388},{"time_hours":296,"approval_perbill":500000000,"support_perbill":1032063,"approval":50,"support":0.1032063},{"time_hours":297,"approval_perbill":500000000,"support_perbill":1002932,"approval":50,"support":0.1002932},{"time_hours":298,"approval_perbill":500000000,"support_perbill":973993,"approval":50,"support":0.0973993},{"time_hours":299,"approval_perbill":500000000,"support_perbill":945244,"approval":50,"support":0.0945244},{"time_hours":300,"approval_perbill":500000000,"support_perbill":916684,"approval":50,"support":0.0916684},{"time_hours":301,"approval_perbill":500000000,"support_perbill":888310,"approval":50,"support":0.088831},{"time_hours":302,"approval_perbill":500000000,"support_perbill":860121,"approval":50,"support":0.0860121},{"time_hours":303,"approval_perbill":500000000,"support_perbill":832114,"approval":50,"support":0.0832114},{"time_hours":304,"approval_perbill":500000000,"support_perbill":804289,"approval":50,"support":0.0804289},{"time_hours":305,"approval_perbill":500000000,"support_perbill":776644,"approval":50,"support":0.0776644},{"time_hours":306,"approval_perbill":500000000,"support_perbill":749176,"approval":50,"support":0.0749176},{"time_hours":307,"approval_perbill":500000000,"support_perbill":721884,"approval":50,"support":0.0721884},{"time_hours":308,"approval_perbill":500000000,"support_perbill":694766,"approval":50,"support":0.0694766},{"time_hours":309,"approval_perbill":500000000,"support_perbill":667821,"approval":50,"support":0.0667821},{"time_hours":310,"approval_perbill":500000000,"support_perbill":641047,"approval":50,"support":0.0641047},{"time_hours":311,"approval_perbill":500000000,"support_perbill":614442,"approval":50,"support":0.0614442},{"time_hours":312,"approval_perbill":500000000,"support_perbill":588005,"approval":50,"support":0.0588005},{"time_hours":313,"approval_perbill":500000000,"support_perbill":561734,"approval":50,"support":0.0561734},{"time_hours":314,"approval_perbill":500000000,"support_perbill":535627,"approval":50,"support":0.0535627},{"time_hours":315,"approval_perbill":500000000,"support_perbill":509684,"approval":50,"support":0.0509684},{"time_hours":316,"approval_perbill":500000000,"support_perbill":483902,"approval":50,"support":0.0483902},{"time_hours":317,"approval_perbill":500000000,"support_perbill":458280,"approval":50,"support":0.045828},{"time_hours":318,"approval_perbill":500000000,"support_perbill":432817,"approval":50,"support":0.0432817},{"time_hours":319,"approval_perbill":500000000,"support_perbill":407511,"approval":50,"support":0.0407511},{"time_hours":320,"approval_perbill":500000000,"support_perbill":382360,"approval":50,"support":0.038236},{"time_hours":321,"approval_perbill":500000000,"support_perbill":357364,"approval":50,"support":0.0357364},{"time_hours":322,"approval_perbill":500000000,"support_perbill":332520,"approval":50,"support":0.033252},{"time_hours":323,"approval_perbill":500000000,"support_perbill":307828,"approval":50,"support":0.0307828},{"time_hours":324,"approval_perbill":500000000,"support_perbill":283286,"approval":50,"support":0.0283286},{"time_hours":325,"approval_perbill":500000000,"support_perbill":258892,"approval":50,"support":0.0258892},{"time_hours":326,"approval_perbill":500000000,"support_perbill":234646,"approval":50,"support":0.0234646},{"time_hours":327,"approval_perbill":500000000,"support_perbill":210546,"approval":50,"support":0.0210546},{"time_hours":328,"approval_perbill":500000000,"support_perbill":186590,"approval":50,"support":0.018659},{"time_hours":329,"approval_perbill":500000000,"support_perbill":162778,"approval":50,"support":0.0162778},{"time_hours":330,"approval_perbill":500000000,"support_perbill":139108,"approval":50,"support":0.0139108},{"time_hours":331,"approval_perbill":500000000,"support_perbill":115578,"approval":50,"support":0.0115578},{"time_hours":332,"approval_perbill":500000000,"support_perbill":92188,"approval":50,"support":0.0092188},{"time_hours":333,"approval_perbill":500000000,"support_perbill":68937,"approval":50,"support":0.0068937},{"time_hours":334,"approval_perbill":500000000,"support_perbill":45822,"approval":50,"support":0.0045822},{"time_hours":335,"approval_perbill":500000000,"support_perbill":22844,"approval":50,"support":0.0022844},{"time_hours":336,"approval_perbill":500000000,"support_perbill":0,"approval":50,"support":0}]')},54836:p=>{"use strict";p.exports=JSON.parse('[{"time_hours":0,"approval_perbill":1000000000,"support_perbill":500000026,"approval":100,"support":50.0000026},{"time_hours":1,"approval_perbill":997549020,"support_perbill":418401359,"approval":99.754902,"support":41.8401359},{"time_hours":2,"approval_perbill":995098040,"support_perbill":359397443,"approval":99.509804,"support":35.9397443},{"time_hours":3,"approval_perbill":992647060,"support_perbill":314744813,"approval":99.264706,"support":31.4744813},{"time_hours":4,"approval_perbill":990196080,"support_perbill":279775293,"approval":99.019608,"support":27.9775293},{"time_hours":5,"approval_perbill":987745099,"support_perbill":251647242,"approval":98.7745099,"support":25.1647242},{"time_hours":6,"approval_perbill":985294119,"support_perbill":228531862,"approval":98.5294119,"support":22.8531862},{"time_hours":7,"approval_perbill":982843138,"support_perbill":209198815,"approval":98.2843138,"support":20.9198815},{"time_hours":8,"approval_perbill":980392158,"support_perbill":192789972,"approval":98.0392158,"support":19.2789972},{"time_hours":9,"approval_perbill":977941177,"support_perbill":178688524,"approval":97.7941177,"support":17.8688524},{"time_hours":10,"approval_perbill":975490197,"support_perbill":166439756,"approval":97.5490197,"support":16.6439756},{"time_hours":11,"approval_perbill":973039216,"support_perbill":155701053,"approval":97.3039216,"support":15.5701053},{"time_hours":12,"approval_perbill":970588236,"support_perbill":146209386,"approval":97.0588236,"support":14.6209386},{"time_hours":13,"approval_perbill":968137256,"support_perbill":137759452,"approval":96.8137256,"support":13.7759452},{"time_hours":14,"approval_perbill":965686276,"support_perbill":130188679,"approval":96.5686276,"support":13.0188679},{"time_hours":15,"approval_perbill":963235295,"support_perbill":123366639,"approval":96.3235295,"support":12.3366639},{"time_hours":16,"approval_perbill":960784315,"support_perbill":117187499,"approval":96.0784315,"support":11.7187499},{"time_hours":17,"approval_perbill":958333334,"support_perbill":111564465,"approval":95.8333334,"support":11.1564465},{"time_hours":18,"approval_perbill":955882354,"support_perbill":106425701,"approval":95.5882354,"support":10.6425701},{"time_hours":19,"approval_perbill":953431373,"support_perbill":101711228,"approval":95.3431373,"support":10.1711228},{"time_hours":20,"approval_perbill":950980393,"support_perbill":97370582,"approval":95.0980393,"support":9.7370582},{"time_hours":21,"approval_perbill":948529412,"support_perbill":93360994,"approval":94.8529412,"support":9.3360994},{"time_hours":22,"approval_perbill":946078432,"support_perbill":89645982,"approval":94.6078432,"support":8.9645982},{"time_hours":23,"approval_perbill":943627452,"support_perbill":86194234,"approval":94.3627452,"support":8.6194234},{"time_hours":24,"approval_perbill":941176471,"support_perbill":82978722,"approval":94.1176471,"support":8.2978722},{"time_hours":25,"approval_perbill":938725491,"support_perbill":79975997,"approval":93.8725491,"support":7.9975997},{"time_hours":26,"approval_perbill":936274511,"support_perbill":77165614,"approval":93.6274511,"support":7.7165614},{"time_hours":27,"approval_perbill":933823531,"support_perbill":74529666,"approval":93.3823531,"support":7.4529666},{"time_hours":28,"approval_perbill":931372550,"support_perbill":72052400,"approval":93.137255,"support":7.20524},{"time_hours":29,"approval_perbill":928921570,"support_perbill":69719908,"approval":92.892157,"support":6.9719908},{"time_hours":30,"approval_perbill":926470589,"support_perbill":67519857,"approval":92.6470589,"support":6.7519857},{"time_hours":31,"approval_perbill":924019609,"support_perbill":65441280,"approval":92.4019609,"support":6.544128},{"time_hours":32,"approval_perbill":921568628,"support_perbill":63474386,"approval":92.1568628,"support":6.3474386},{"time_hours":33,"approval_perbill":919117648,"support_perbill":61610409,"approval":91.9117648,"support":6.1610409},{"time_hours":34,"approval_perbill":916666667,"support_perbill":59841478,"approval":91.6666667,"support":5.9841478},{"time_hours":35,"approval_perbill":914215687,"support_perbill":58160504,"approval":91.4215687,"support":5.8160504},{"time_hours":36,"approval_perbill":911764706,"support_perbill":56561084,"approval":91.1764706,"support":5.6561084},{"time_hours":37,"approval_perbill":909313726,"support_perbill":55037426,"approval":90.9313726,"support":5.5037426},{"time_hours":38,"approval_perbill":906862746,"support_perbill":53584271,"approval":90.6862746,"support":5.3584271},{"time_hours":39,"approval_perbill":904411766,"support_perbill":52196835,"approval":90.4411766,"support":5.2196835},{"time_hours":40,"approval_perbill":901960785,"support_perbill":50870759,"approval":90.1960785,"support":5.0870759},{"time_hours":41,"approval_perbill":899509805,"support_perbill":49602061,"approval":89.9509805,"support":4.9602061},{"time_hours":42,"approval_perbill":897058824,"support_perbill":48387095,"approval":89.7058824,"support":4.8387095},{"time_hours":43,"approval_perbill":894607844,"support_perbill":47222519,"approval":89.4607844,"support":4.7222519},{"time_hours":44,"approval_perbill":892156864,"support_perbill":46105262,"approval":89.2156864,"support":4.6105262},{"time_hours":45,"approval_perbill":889705883,"support_perbill":45032496,"approval":88.9705883,"support":4.5032496},{"time_hours":46,"approval_perbill":887254903,"support_perbill":44001617,"approval":88.7254903,"support":4.4001617},{"time_hours":47,"approval_perbill":884803922,"support_perbill":43010218,"approval":88.4803922,"support":4.3010218},{"time_hours":48,"approval_perbill":882352942,"support_perbill":42056074,"approval":88.2352942,"support":4.2056074},{"time_hours":49,"approval_perbill":879901962,"support_perbill":41137122,"approval":87.9901962,"support":4.1137122},{"time_hours":50,"approval_perbill":877450982,"support_perbill":40251453,"approval":87.7450982,"support":4.0251453},{"time_hours":51,"approval_perbill":875000001,"support_perbill":39397289,"approval":87.5000001,"support":3.9397289},{"time_hours":52,"approval_perbill":872549021,"support_perbill":38572980,"approval":87.2549021,"support":3.857298},{"time_hours":53,"approval_perbill":870098040,"support_perbill":37776985,"approval":87.009804,"support":3.7776985},{"time_hours":54,"approval_perbill":867647060,"support_perbill":37007873,"approval":86.764706,"support":3.7007873},{"time_hours":55,"approval_perbill":865196079,"support_perbill":36264302,"approval":86.5196079,"support":3.6264302},{"time_hours":56,"approval_perbill":862745099,"support_perbill":35545023,"approval":86.2745099,"support":3.5545023},{"time_hours":57,"approval_perbill":860294118,"support_perbill":34848862,"approval":86.0294118,"support":3.4848862},{"time_hours":58,"approval_perbill":857843138,"support_perbill":34174724,"approval":85.7843138,"support":3.4174724},{"time_hours":59,"approval_perbill":855392157,"support_perbill":33521580,"approval":85.5392157,"support":3.352158},{"time_hours":60,"approval_perbill":852941177,"support_perbill":32888464,"approval":85.2941177,"support":3.2888464},{"time_hours":61,"approval_perbill":850490197,"support_perbill":32274469,"approval":85.0490197,"support":3.2274469},{"time_hours":62,"approval_perbill":848039217,"support_perbill":31678741,"approval":84.8039217,"support":3.1678741},{"time_hours":63,"approval_perbill":845588236,"support_perbill":31100477,"approval":84.5588236,"support":3.1100477},{"time_hours":64,"approval_perbill":843137256,"support_perbill":30538921,"approval":84.3137256,"support":3.0538921},{"time_hours":65,"approval_perbill":840686276,"support_perbill":29993358,"approval":84.0686276,"support":2.9993358},{"time_hours":66,"approval_perbill":838235295,"support_perbill":29463116,"approval":83.8235295,"support":2.9463116},{"time_hours":67,"approval_perbill":835784315,"support_perbill":28947556,"approval":83.5784315,"support":2.8947556},{"time_hours":68,"approval_perbill":833333334,"support_perbill":28446079,"approval":83.3333334,"support":2.8446079},{"time_hours":69,"approval_perbill":830882354,"support_perbill":27958114,"approval":83.0882354,"support":2.7958114},{"time_hours":70,"approval_perbill":828431373,"support_perbill":27483123,"approval":82.8431373,"support":2.7483123},{"time_hours":71,"approval_perbill":825980393,"support_perbill":27020596,"approval":82.5980393,"support":2.7020596},{"time_hours":72,"approval_perbill":823529412,"support_perbill":26570047,"approval":82.3529412,"support":2.6570047},{"time_hours":73,"approval_perbill":821078432,"support_perbill":26131019,"approval":82.1078432,"support":2.6131019},{"time_hours":74,"approval_perbill":818627452,"support_perbill":25703073,"approval":81.8627452,"support":2.5703073},{"time_hours":75,"approval_perbill":816176472,"support_perbill":25285796,"approval":81.6176472,"support":2.5285796},{"time_hours":76,"approval_perbill":813725491,"support_perbill":24878795,"approval":81.3725491,"support":2.4878795},{"time_hours":77,"approval_perbill":811274511,"support_perbill":24481693,"approval":81.1274511,"support":2.4481693},{"time_hours":78,"approval_perbill":808823530,"support_perbill":24094134,"approval":80.882353,"support":2.4094134},{"time_hours":79,"approval_perbill":806372550,"support_perbill":23715779,"approval":80.637255,"support":2.3715779},{"time_hours":80,"approval_perbill":803921569,"support_perbill":23346303,"approval":80.3921569,"support":2.3346303},{"time_hours":81,"approval_perbill":801470589,"support_perbill":22985397,"approval":80.1470589,"support":2.2985397},{"time_hours":82,"approval_perbill":799019608,"support_perbill":22632766,"approval":79.9019608,"support":2.2632766},{"time_hours":83,"approval_perbill":796568628,"support_perbill":22288130,"approval":79.6568628,"support":2.228813},{"time_hours":84,"approval_perbill":794117648,"support_perbill":21951219,"approval":79.4117648,"support":2.1951219},{"time_hours":85,"approval_perbill":791666668,"support_perbill":21621776,"approval":79.1666668,"support":2.1621776},{"time_hours":86,"approval_perbill":789215688,"support_perbill":21299556,"approval":78.9215688,"support":2.1299556},{"time_hours":87,"approval_perbill":786764707,"support_perbill":20984324,"approval":78.6764707,"support":2.0984324},{"time_hours":88,"approval_perbill":784313727,"support_perbill":20675855,"approval":78.4313727,"support":2.0675855},{"time_hours":89,"approval_perbill":781862746,"support_perbill":20373934,"approval":78.1862746,"support":2.0373934},{"time_hours":90,"approval_perbill":779411766,"support_perbill":20078354,"approval":77.9411766,"support":2.0078354},{"time_hours":91,"approval_perbill":776960785,"support_perbill":19788917,"approval":77.6960785,"support":1.9788917},{"time_hours":92,"approval_perbill":774509805,"support_perbill":19505435,"approval":77.4509805,"support":1.9505435},{"time_hours":93,"approval_perbill":772058824,"support_perbill":19227725,"approval":77.2058824,"support":1.9227725},{"time_hours":94,"approval_perbill":769607844,"support_perbill":18955613,"approval":76.9607844,"support":1.8955613},{"time_hours":95,"approval_perbill":767156863,"support_perbill":18688931,"approval":76.7156863,"support":1.8688931},{"time_hours":96,"approval_perbill":764705883,"support_perbill":18427518,"approval":76.4705883,"support":1.8427518},{"time_hours":97,"approval_perbill":762254903,"support_perbill":18171219,"approval":76.2254903,"support":1.8171219},{"time_hours":98,"approval_perbill":759803923,"support_perbill":17919887,"approval":75.9803923,"support":1.7919887},{"time_hours":99,"approval_perbill":757352942,"support_perbill":17673377,"approval":75.7352942,"support":1.7673377},{"time_hours":100,"approval_perbill":754901962,"support_perbill":17431553,"approval":75.4901962,"support":1.7431553},{"time_hours":101,"approval_perbill":752450981,"support_perbill":17194282,"approval":75.2450981,"support":1.7194282},{"time_hours":102,"approval_perbill":750000001,"support_perbill":16961437,"approval":75.0000001,"support":1.6961437},{"time_hours":103,"approval_perbill":747549020,"support_perbill":16732895,"approval":74.754902,"support":1.6732895},{"time_hours":104,"approval_perbill":745098040,"support_perbill":16508538,"approval":74.509804,"support":1.6508538},{"time_hours":105,"approval_perbill":742647059,"support_perbill":16288252,"approval":74.2647059,"support":1.6288252},{"time_hours":106,"approval_perbill":740196079,"support_perbill":16071927,"approval":74.0196079,"support":1.6071927},{"time_hours":107,"approval_perbill":737745099,"support_perbill":15859457,"approval":73.7745099,"support":1.5859457},{"time_hours":108,"approval_perbill":735294118,"support_perbill":15650741,"approval":73.5294118,"support":1.5650741},{"time_hours":109,"approval_perbill":732843138,"support_perbill":15445679,"approval":73.2843138,"support":1.5445679},{"time_hours":110,"approval_perbill":730392158,"support_perbill":15244176,"approval":73.0392158,"support":1.5244176},{"time_hours":111,"approval_perbill":727941178,"support_perbill":15046141,"approval":72.7941178,"support":1.5046141},{"time_hours":112,"approval_perbill":725490197,"support_perbill":14851485,"approval":72.5490197,"support":1.4851485},{"time_hours":113,"approval_perbill":723039217,"support_perbill":14660121,"approval":72.3039217,"support":1.4660121},{"time_hours":114,"approval_perbill":720588236,"support_perbill":14471968,"approval":72.0588236,"support":1.4471968},{"time_hours":115,"approval_perbill":718137256,"support_perbill":14286945,"approval":71.8137256,"support":1.4286945},{"time_hours":116,"approval_perbill":715686275,"support_perbill":14104975,"approval":71.5686275,"support":1.4104975},{"time_hours":117,"approval_perbill":713235295,"support_perbill":13925982,"approval":71.3235295,"support":1.3925982},{"time_hours":118,"approval_perbill":710784314,"support_perbill":13749894,"approval":71.0784314,"support":1.3749894},{"time_hours":119,"approval_perbill":708333334,"support_perbill":13576642,"approval":70.8333334,"support":1.3576642},{"time_hours":120,"approval_perbill":705882353,"support_perbill":13406156,"approval":70.5882353,"support":1.3406156},{"time_hours":121,"approval_perbill":703431373,"support_perbill":13238372,"approval":70.3431373,"support":1.3238372},{"time_hours":122,"approval_perbill":700980393,"support_perbill":13073226,"approval":70.0980393,"support":1.3073226},{"time_hours":123,"approval_perbill":698529413,"support_perbill":12910655,"approval":69.8529413,"support":1.2910655},{"time_hours":124,"approval_perbill":696078432,"support_perbill":12750601,"approval":69.6078432,"support":1.2750601},{"time_hours":125,"approval_perbill":693627452,"support_perbill":12593005,"approval":69.3627452,"support":1.2593005},{"time_hours":126,"approval_perbill":691176471,"support_perbill":12437810,"approval":69.1176471,"support":1.243781},{"time_hours":127,"approval_perbill":688725491,"support_perbill":12284964,"approval":68.8725491,"support":1.2284964},{"time_hours":128,"approval_perbill":686274511,"support_perbill":12134411,"approval":68.6274511,"support":1.2134411},{"time_hours":129,"approval_perbill":683823530,"support_perbill":11986103,"approval":68.382353,"support":1.1986103},{"time_hours":130,"approval_perbill":681372550,"support_perbill":11839987,"approval":68.137255,"support":1.1839987},{"time_hours":131,"approval_perbill":678921569,"support_perbill":11696017,"approval":67.8921569,"support":1.1696017},{"time_hours":132,"approval_perbill":676470589,"support_perbill":11554145,"approval":67.6470589,"support":1.1554145},{"time_hours":133,"approval_perbill":674019609,"support_perbill":11414326,"approval":67.4019609,"support":1.1414326},{"time_hours":134,"approval_perbill":671568629,"support_perbill":11276516,"approval":67.1568629,"support":1.1276516},{"time_hours":135,"approval_perbill":669117648,"support_perbill":11140671,"approval":66.9117648,"support":1.1140671},{"time_hours":136,"approval_perbill":666666668,"support_perbill":11006750,"approval":66.6666668,"support":1.100675},{"time_hours":137,"approval_perbill":664215687,"support_perbill":10874713,"approval":66.4215687,"support":1.0874713},{"time_hours":138,"approval_perbill":661764707,"support_perbill":10744519,"approval":66.1764707,"support":1.0744519},{"time_hours":139,"approval_perbill":659313726,"support_perbill":10616130,"approval":65.9313726,"support":1.061613},{"time_hours":140,"approval_perbill":656862746,"support_perbill":10489510,"approval":65.6862746,"support":1.048951},{"time_hours":141,"approval_perbill":654411765,"support_perbill":10364622,"approval":65.4411765,"support":1.0364622},{"time_hours":142,"approval_perbill":651960785,"support_perbill":10241430,"approval":65.1960785,"support":1.024143},{"time_hours":143,"approval_perbill":649509804,"support_perbill":10119900,"approval":64.9509804,"support":1.01199},{"time_hours":144,"approval_perbill":647058824,"support_perbill":10000000,"approval":64.7058824,"support":1},{"time_hours":145,"approval_perbill":644607844,"support_perbill":9881695,"approval":64.4607844,"support":0.9881695},{"time_hours":146,"approval_perbill":642156864,"support_perbill":9764955,"approval":64.2156864,"support":0.9764955},{"time_hours":147,"approval_perbill":639705883,"support_perbill":9649749,"approval":63.9705883,"support":0.9649749},{"time_hours":148,"approval_perbill":637254903,"support_perbill":9536047,"approval":63.7254903,"support":0.9536047},{"time_hours":149,"approval_perbill":634803923,"support_perbill":9423820,"approval":63.4803923,"support":0.942382},{"time_hours":150,"approval_perbill":632352942,"support_perbill":9313038,"approval":63.2352942,"support":0.9313038},{"time_hours":151,"approval_perbill":629901962,"support_perbill":9203674,"approval":62.9901962,"support":0.9203674},{"time_hours":152,"approval_perbill":627450981,"support_perbill":9095702,"approval":62.7450981,"support":0.9095702},{"time_hours":153,"approval_perbill":625000001,"support_perbill":8989095,"approval":62.5000001,"support":0.8989095},{"time_hours":154,"approval_perbill":622549020,"support_perbill":8883826,"approval":62.254902,"support":0.8883826},{"time_hours":155,"approval_perbill":620098040,"support_perbill":8779872,"approval":62.009804,"support":0.8779872},{"time_hours":156,"approval_perbill":617647059,"support_perbill":8677207,"approval":61.7647059,"support":0.8677207},{"time_hours":157,"approval_perbill":615196079,"support_perbill":8575808,"approval":61.5196079,"support":0.8575808},{"time_hours":158,"approval_perbill":612745099,"support_perbill":8475652,"approval":61.2745099,"support":0.8475652},{"time_hours":159,"approval_perbill":610294119,"support_perbill":8376715,"approval":61.0294119,"support":0.8376715},{"time_hours":160,"approval_perbill":607843138,"support_perbill":8278976,"approval":60.7843138,"support":0.8278976},{"time_hours":161,"approval_perbill":605392158,"support_perbill":8182413,"approval":60.5392158,"support":0.8182413},{"time_hours":162,"approval_perbill":602941177,"support_perbill":8087005,"approval":60.2941177,"support":0.8087005},{"time_hours":163,"approval_perbill":600490197,"support_perbill":7992731,"approval":60.0490197,"support":0.7992731},{"time_hours":164,"approval_perbill":598039216,"support_perbill":7899571,"approval":59.8039216,"support":0.7899571},{"time_hours":165,"approval_perbill":595588236,"support_perbill":7807506,"approval":59.5588236,"support":0.7807506},{"time_hours":166,"approval_perbill":593137255,"support_perbill":7716516,"approval":59.3137255,"support":0.7716516},{"time_hours":167,"approval_perbill":590686275,"support_perbill":7626583,"approval":59.0686275,"support":0.7626583},{"time_hours":168,"approval_perbill":588235295,"support_perbill":7537688,"approval":58.8235295,"support":0.7537688},{"time_hours":169,"approval_perbill":585784315,"support_perbill":7449814,"approval":58.5784315,"support":0.7449814},{"time_hours":170,"approval_perbill":583333335,"support_perbill":7362942,"approval":58.3333335,"support":0.7362942},{"time_hours":171,"approval_perbill":580882354,"support_perbill":7277057,"approval":58.0882354,"support":0.7277057},{"time_hours":172,"approval_perbill":578431374,"support_perbill":7192141,"approval":57.8431374,"support":0.7192141},{"time_hours":173,"approval_perbill":575980393,"support_perbill":7108178,"approval":57.5980393,"support":0.7108178},{"time_hours":174,"approval_perbill":573529413,"support_perbill":7025151,"approval":57.3529413,"support":0.7025151},{"time_hours":175,"approval_perbill":571078432,"support_perbill":6943047,"approval":57.1078432,"support":0.6943047},{"time_hours":176,"approval_perbill":568627452,"support_perbill":6861848,"approval":56.8627452,"support":0.6861848},{"time_hours":177,"approval_perbill":566176471,"support_perbill":6781540,"approval":56.6176471,"support":0.678154},{"time_hours":178,"approval_perbill":563725491,"support_perbill":6702109,"approval":56.3725491,"support":0.6702109},{"time_hours":179,"approval_perbill":561274510,"support_perbill":6623541,"approval":56.127451,"support":0.6623541},{"time_hours":180,"approval_perbill":558823530,"support_perbill":6545820,"approval":55.882353,"support":0.654582},{"time_hours":181,"approval_perbill":556372550,"support_perbill":6468935,"approval":55.637255,"support":0.6468935},{"time_hours":182,"approval_perbill":553921570,"support_perbill":6392871,"approval":55.392157,"support":0.6392871},{"time_hours":183,"approval_perbill":551470589,"support_perbill":6317615,"approval":55.1470589,"support":0.6317615},{"time_hours":184,"approval_perbill":549019609,"support_perbill":6243154,"approval":54.9019609,"support":0.6243154},{"time_hours":185,"approval_perbill":546568628,"support_perbill":6169476,"approval":54.6568628,"support":0.6169476},{"time_hours":186,"approval_perbill":544117648,"support_perbill":6096569,"approval":54.4117648,"support":0.6096569},{"time_hours":187,"approval_perbill":541666667,"support_perbill":6024421,"approval":54.1666667,"support":0.6024421},{"time_hours":188,"approval_perbill":539215687,"support_perbill":5953019,"approval":53.9215687,"support":0.5953019},{"time_hours":189,"approval_perbill":536764706,"support_perbill":5882353,"approval":53.6764706,"support":0.5882353},{"time_hours":190,"approval_perbill":534313726,"support_perbill":5812410,"approval":53.4313726,"support":0.581241},{"time_hours":191,"approval_perbill":531862746,"support_perbill":5743181,"approval":53.1862746,"support":0.5743181},{"time_hours":192,"approval_perbill":529411765,"support_perbill":5674653,"approval":52.9411765,"support":0.5674653},{"time_hours":193,"approval_perbill":526960785,"support_perbill":5606817,"approval":52.6960785,"support":0.5606817},{"time_hours":194,"approval_perbill":524509805,"support_perbill":5539662,"approval":52.4509805,"support":0.5539662},{"time_hours":195,"approval_perbill":522058825,"support_perbill":5473177,"approval":52.2058825,"support":0.5473177},{"time_hours":196,"approval_perbill":519607844,"support_perbill":5407354,"approval":51.9607844,"support":0.5407354},{"time_hours":197,"approval_perbill":517156864,"support_perbill":5342181,"approval":51.7156864,"support":0.5342181},{"time_hours":198,"approval_perbill":514705883,"support_perbill":5277650,"approval":51.4705883,"support":0.527765},{"time_hours":199,"approval_perbill":512254903,"support_perbill":5213751,"approval":51.2254903,"support":0.5213751},{"time_hours":200,"approval_perbill":509803922,"support_perbill":5150474,"approval":50.9803922,"support":0.5150474},{"time_hours":201,"approval_perbill":507352942,"support_perbill":5087812,"approval":50.7352942,"support":0.5087812},{"time_hours":202,"approval_perbill":504901961,"support_perbill":5025754,"approval":50.4901961,"support":0.5025754},{"time_hours":203,"approval_perbill":502450981,"support_perbill":4964292,"approval":50.2450981,"support":0.4964292},{"time_hours":204,"approval_perbill":500000000,"support_perbill":4903417,"approval":50,"support":0.4903417},{"time_hours":205,"approval_perbill":500000000,"support_perbill":4843122,"approval":50,"support":0.4843122},{"time_hours":206,"approval_perbill":500000000,"support_perbill":4783398,"approval":50,"support":0.4783398},{"time_hours":207,"approval_perbill":500000000,"support_perbill":4724236,"approval":50,"support":0.4724236},{"time_hours":208,"approval_perbill":500000000,"support_perbill":4665630,"approval":50,"support":0.466563},{"time_hours":209,"approval_perbill":500000000,"support_perbill":4607570,"approval":50,"support":0.460757},{"time_hours":210,"approval_perbill":500000000,"support_perbill":4550050,"approval":50,"support":0.455005},{"time_hours":211,"approval_perbill":500000000,"support_perbill":4493062,"approval":50,"support":0.4493062},{"time_hours":212,"approval_perbill":500000000,"support_perbill":4436599,"approval":50,"support":0.4436599},{"time_hours":213,"approval_perbill":500000000,"support_perbill":4380654,"approval":50,"support":0.4380654},{"time_hours":214,"approval_perbill":500000000,"support_perbill":4325218,"approval":50,"support":0.4325218},{"time_hours":215,"approval_perbill":500000000,"support_perbill":4270287,"approval":50,"support":0.4270287},{"time_hours":216,"approval_perbill":500000000,"support_perbill":4215851,"approval":50,"support":0.4215851},{"time_hours":217,"approval_perbill":500000000,"support_perbill":4161906,"approval":50,"support":0.4161906},{"time_hours":218,"approval_perbill":500000000,"support_perbill":4108444,"approval":50,"support":0.4108444},{"time_hours":219,"approval_perbill":500000000,"support_perbill":4055459,"approval":50,"support":0.4055459},{"time_hours":220,"approval_perbill":500000000,"support_perbill":4002944,"approval":50,"support":0.4002944},{"time_hours":221,"approval_perbill":500000000,"support_perbill":3950894,"approval":50,"support":0.3950894},{"time_hours":222,"approval_perbill":500000000,"support_perbill":3899302,"approval":50,"support":0.3899302},{"time_hours":223,"approval_perbill":500000000,"support_perbill":3848162,"approval":50,"support":0.3848162},{"time_hours":224,"approval_perbill":500000000,"support_perbill":3797468,"approval":50,"support":0.3797468},{"time_hours":225,"approval_perbill":500000000,"support_perbill":3747215,"approval":50,"support":0.3747215},{"time_hours":226,"approval_perbill":500000000,"support_perbill":3697396,"approval":50,"support":0.3697396},{"time_hours":227,"approval_perbill":500000000,"support_perbill":3648006,"approval":50,"support":0.3648006},{"time_hours":228,"approval_perbill":500000000,"support_perbill":3599040,"approval":50,"support":0.359904},{"time_hours":229,"approval_perbill":500000000,"support_perbill":3550492,"approval":50,"support":0.3550492},{"time_hours":230,"approval_perbill":500000000,"support_perbill":3502357,"approval":50,"support":0.3502357},{"time_hours":231,"approval_perbill":500000000,"support_perbill":3454629,"approval":50,"support":0.3454629},{"time_hours":232,"approval_perbill":500000000,"support_perbill":3407304,"approval":50,"support":0.3407304},{"time_hours":233,"approval_perbill":500000000,"support_perbill":3360376,"approval":50,"support":0.3360376},{"time_hours":234,"approval_perbill":500000000,"support_perbill":3313840,"approval":50,"support":0.331384},{"time_hours":235,"approval_perbill":500000000,"support_perbill":3267692,"approval":50,"support":0.3267692},{"time_hours":236,"approval_perbill":500000000,"support_perbill":3221926,"approval":50,"support":0.3221926},{"time_hours":237,"approval_perbill":500000000,"support_perbill":3176538,"approval":50,"support":0.3176538},{"time_hours":238,"approval_perbill":500000000,"support_perbill":3131524,"approval":50,"support":0.3131524},{"time_hours":239,"approval_perbill":500000000,"support_perbill":3086878,"approval":50,"support":0.3086878},{"time_hours":240,"approval_perbill":500000000,"support_perbill":3042596,"approval":50,"support":0.3042596},{"time_hours":241,"approval_perbill":500000000,"support_perbill":2998674,"approval":50,"support":0.2998674},{"time_hours":242,"approval_perbill":500000000,"support_perbill":2955107,"approval":50,"support":0.2955107},{"time_hours":243,"approval_perbill":500000000,"support_perbill":2911892,"approval":50,"support":0.2911892},{"time_hours":244,"approval_perbill":500000000,"support_perbill":2869023,"approval":50,"support":0.2869023},{"time_hours":245,"approval_perbill":500000000,"support_perbill":2826496,"approval":50,"support":0.2826496},{"time_hours":246,"approval_perbill":500000000,"support_perbill":2784309,"approval":50,"support":0.2784309},{"time_hours":247,"approval_perbill":500000000,"support_perbill":2742455,"approval":50,"support":0.2742455},{"time_hours":248,"approval_perbill":500000000,"support_perbill":2700933,"approval":50,"support":0.2700933},{"time_hours":249,"approval_perbill":500000000,"support_perbill":2659737,"approval":50,"support":0.2659737},{"time_hours":250,"approval_perbill":500000000,"support_perbill":2618864,"approval":50,"support":0.2618864},{"time_hours":251,"approval_perbill":500000000,"support_perbill":2578310,"approval":50,"support":0.257831},{"time_hours":252,"approval_perbill":500000000,"support_perbill":2538071,"approval":50,"support":0.2538071},{"time_hours":253,"approval_perbill":500000000,"support_perbill":2498144,"approval":50,"support":0.2498144},{"time_hours":254,"approval_perbill":500000000,"support_perbill":2458525,"approval":50,"support":0.2458525},{"time_hours":255,"approval_perbill":500000000,"support_perbill":2419210,"approval":50,"support":0.241921},{"time_hours":256,"approval_perbill":500000000,"support_perbill":2380197,"approval":50,"support":0.2380197},{"time_hours":257,"approval_perbill":500000000,"support_perbill":2341481,"approval":50,"support":0.2341481},{"time_hours":258,"approval_perbill":500000000,"support_perbill":2303059,"approval":50,"support":0.2303059},{"time_hours":259,"approval_perbill":500000000,"support_perbill":2264928,"approval":50,"support":0.2264928},{"time_hours":260,"approval_perbill":500000000,"support_perbill":2227084,"approval":50,"support":0.2227084},{"time_hours":261,"approval_perbill":500000000,"support_perbill":2189525,"approval":50,"support":0.2189525},{"time_hours":262,"approval_perbill":500000000,"support_perbill":2152247,"approval":50,"support":0.2152247},{"time_hours":263,"approval_perbill":500000000,"support_perbill":2115247,"approval":50,"support":0.2115247},{"time_hours":264,"approval_perbill":500000000,"support_perbill":2078522,"approval":50,"support":0.2078522},{"time_hours":265,"approval_perbill":500000000,"support_perbill":2042068,"approval":50,"support":0.2042068},{"time_hours":266,"approval_perbill":500000000,"support_perbill":2005884,"approval":50,"support":0.2005884},{"time_hours":267,"approval_perbill":500000000,"support_perbill":1969965,"approval":50,"support":0.1969965},{"time_hours":268,"approval_perbill":500000000,"support_perbill":1934309,"approval":50,"support":0.1934309},{"time_hours":269,"approval_perbill":500000000,"support_perbill":1898913,"approval":50,"support":0.1898913},{"time_hours":270,"approval_perbill":500000000,"support_perbill":1863775,"approval":50,"support":0.1863775},{"time_hours":271,"approval_perbill":500000000,"support_perbill":1828891,"approval":50,"support":0.1828891},{"time_hours":272,"approval_perbill":500000000,"support_perbill":1794258,"approval":50,"support":0.1794258},{"time_hours":273,"approval_perbill":500000000,"support_perbill":1759875,"approval":50,"support":0.1759875},{"time_hours":274,"approval_perbill":500000000,"support_perbill":1725737,"approval":50,"support":0.1725737},{"time_hours":275,"approval_perbill":500000000,"support_perbill":1691844,"approval":50,"support":0.1691844},{"time_hours":276,"approval_perbill":500000000,"support_perbill":1658191,"approval":50,"support":0.1658191},{"time_hours":277,"approval_perbill":500000000,"support_perbill":1624777,"approval":50,"support":0.1624777},{"time_hours":278,"approval_perbill":500000000,"support_perbill":1591599,"approval":50,"support":0.1591599},{"time_hours":279,"approval_perbill":500000000,"support_perbill":1558654,"approval":50,"support":0.1558654},{"time_hours":280,"approval_perbill":500000000,"support_perbill":1525941,"approval":50,"support":0.1525941},{"time_hours":281,"approval_perbill":500000000,"support_perbill":1493456,"approval":50,"support":0.1493456},{"time_hours":282,"approval_perbill":500000000,"support_perbill":1461197,"approval":50,"support":0.1461197},{"time_hours":283,"approval_perbill":500000000,"support_perbill":1429162,"approval":50,"support":0.1429162},{"time_hours":284,"approval_perbill":500000000,"support_perbill":1397348,"approval":50,"support":0.1397348},{"time_hours":285,"approval_perbill":500000000,"support_perbill":1365754,"approval":50,"support":0.1365754},{"time_hours":286,"approval_perbill":500000000,"support_perbill":1334377,"approval":50,"support":0.1334377},{"time_hours":287,"approval_perbill":500000000,"support_perbill":1303214,"approval":50,"support":0.1303214},{"time_hours":288,"approval_perbill":500000000,"support_perbill":1272264,"approval":50,"support":0.1272264},{"time_hours":289,"approval_perbill":500000000,"support_perbill":1241525,"approval":50,"support":0.1241525},{"time_hours":290,"approval_perbill":500000000,"support_perbill":1210994,"approval":50,"support":0.1210994},{"time_hours":291,"approval_perbill":500000000,"support_perbill":1180668,"approval":50,"support":0.1180668},{"time_hours":292,"approval_perbill":500000000,"support_perbill":1150547,"approval":50,"support":0.1150547},{"time_hours":293,"approval_perbill":500000000,"support_perbill":1120628,"approval":50,"support":0.1120628},{"time_hours":294,"approval_perbill":500000000,"support_perbill":1090909,"approval":50,"support":0.1090909},{"time_hours":295,"approval_perbill":500000000,"support_perbill":1061388,"approval":50,"support":0.1061388},{"time_hours":296,"approval_perbill":500000000,"support_perbill":1032063,"approval":50,"support":0.1032063},{"time_hours":297,"approval_perbill":500000000,"support_perbill":1002932,"approval":50,"support":0.1002932},{"time_hours":298,"approval_perbill":500000000,"support_perbill":973993,"approval":50,"support":0.0973993},{"time_hours":299,"approval_perbill":500000000,"support_perbill":945244,"approval":50,"support":0.0945244},{"time_hours":300,"approval_perbill":500000000,"support_perbill":916684,"approval":50,"support":0.0916684},{"time_hours":301,"approval_perbill":500000000,"support_perbill":888310,"approval":50,"support":0.088831},{"time_hours":302,"approval_perbill":500000000,"support_perbill":860121,"approval":50,"support":0.0860121},{"time_hours":303,"approval_perbill":500000000,"support_perbill":832114,"approval":50,"support":0.0832114},{"time_hours":304,"approval_perbill":500000000,"support_perbill":804289,"approval":50,"support":0.0804289},{"time_hours":305,"approval_perbill":500000000,"support_perbill":776644,"approval":50,"support":0.0776644},{"time_hours":306,"approval_perbill":500000000,"support_perbill":749176,"approval":50,"support":0.0749176},{"time_hours":307,"approval_perbill":500000000,"support_perbill":721884,"approval":50,"support":0.0721884},{"time_hours":308,"approval_perbill":500000000,"support_perbill":694766,"approval":50,"support":0.0694766},{"time_hours":309,"approval_perbill":500000000,"support_perbill":667821,"approval":50,"support":0.0667821},{"time_hours":310,"approval_perbill":500000000,"support_perbill":641047,"approval":50,"support":0.0641047},{"time_hours":311,"approval_perbill":500000000,"support_perbill":614442,"approval":50,"support":0.0614442},{"time_hours":312,"approval_perbill":500000000,"support_perbill":588005,"approval":50,"support":0.0588005},{"time_hours":313,"approval_perbill":500000000,"support_perbill":561734,"approval":50,"support":0.0561734},{"time_hours":314,"approval_perbill":500000000,"support_perbill":535627,"approval":50,"support":0.0535627},{"time_hours":315,"approval_perbill":500000000,"support_perbill":509684,"approval":50,"support":0.0509684},{"time_hours":316,"approval_perbill":500000000,"support_perbill":483902,"approval":50,"support":0.0483902},{"time_hours":317,"approval_perbill":500000000,"support_perbill":458280,"approval":50,"support":0.045828},{"time_hours":318,"approval_perbill":500000000,"support_perbill":432817,"approval":50,"support":0.0432817},{"time_hours":319,"approval_perbill":500000000,"support_perbill":407511,"approval":50,"support":0.0407511},{"time_hours":320,"approval_perbill":500000000,"support_perbill":382360,"approval":50,"support":0.038236},{"time_hours":321,"approval_perbill":500000000,"support_perbill":357364,"approval":50,"support":0.0357364},{"time_hours":322,"approval_perbill":500000000,"support_perbill":332520,"approval":50,"support":0.033252},{"time_hours":323,"approval_perbill":500000000,"support_perbill":307828,"approval":50,"support":0.0307828},{"time_hours":324,"approval_perbill":500000000,"support_perbill":283286,"approval":50,"support":0.0283286},{"time_hours":325,"approval_perbill":500000000,"support_perbill":258892,"approval":50,"support":0.0258892},{"time_hours":326,"approval_perbill":500000000,"support_perbill":234646,"approval":50,"support":0.0234646},{"time_hours":327,"approval_perbill":500000000,"support_perbill":210546,"approval":50,"support":0.0210546},{"time_hours":328,"approval_perbill":500000000,"support_perbill":186590,"approval":50,"support":0.018659},{"time_hours":329,"approval_perbill":500000000,"support_perbill":162778,"approval":50,"support":0.0162778},{"time_hours":330,"approval_perbill":500000000,"support_perbill":139108,"approval":50,"support":0.0139108},{"time_hours":331,"approval_perbill":500000000,"support_perbill":115578,"approval":50,"support":0.0115578},{"time_hours":332,"approval_perbill":500000000,"support_perbill":92188,"approval":50,"support":0.0092188},{"time_hours":333,"approval_perbill":500000000,"support_perbill":68937,"approval":50,"support":0.0068937},{"time_hours":334,"approval_perbill":500000000,"support_perbill":45822,"approval":50,"support":0.0045822},{"time_hours":335,"approval_perbill":500000000,"support_perbill":22844,"approval":50,"support":0.0022844},{"time_hours":336,"approval_perbill":500000000,"support_perbill":0,"approval":50,"support":0}]')},27289:p=>{"use strict";p.exports=JSON.parse('[{"time_hours":0,"approval_perbill":1000000000,"support_perbill":500000000,"approval":100,"support":50},{"time_hours":1,"approval_perbill":994100296,"support_perbill":498511905,"approval":99.4100296,"support":49.8511905},{"time_hours":2,"approval_perbill":988304096,"support_perbill":497023810,"approval":98.8304096,"support":49.702381},{"time_hours":3,"approval_perbill":982608697,"support_perbill":495535715,"approval":98.2608697,"support":49.5535715},{"time_hours":4,"approval_perbill":977011496,"support_perbill":494047620,"approval":97.7011496,"support":49.404762},{"time_hours":5,"approval_perbill":971509972,"support_perbill":492559524,"approval":97.1509972,"support":49.2559524},{"time_hours":6,"approval_perbill":966101697,"support_perbill":491071429,"approval":96.6101697,"support":49.1071429},{"time_hours":7,"approval_perbill":960784315,"support_perbill":489583334,"approval":96.0784315,"support":48.9583334},{"time_hours":8,"approval_perbill":955555557,"support_perbill":488095239,"approval":95.5555557,"support":48.8095239},{"time_hours":9,"approval_perbill":950413224,"support_perbill":486607143,"approval":95.0413224,"support":48.6607143},{"time_hours":10,"approval_perbill":945355193,"support_perbill":485119048,"approval":94.5355193,"support":48.5119048},{"time_hours":11,"approval_perbill":940379404,"support_perbill":483630953,"approval":94.0379404,"support":48.3630953},{"time_hours":12,"approval_perbill":935483872,"support_perbill":482142858,"approval":93.5483872,"support":48.2142858},{"time_hours":13,"approval_perbill":930666667,"support_perbill":480654762,"approval":93.0666667,"support":48.0654762},{"time_hours":14,"approval_perbill":925925927,"support_perbill":479166667,"approval":92.5925927,"support":47.9166667},{"time_hours":15,"approval_perbill":921259843,"support_perbill":477678572,"approval":92.1259843,"support":47.7678572},{"time_hours":16,"approval_perbill":916666668,"support_perbill":476190477,"approval":91.6666668,"support":47.6190477},{"time_hours":17,"approval_perbill":912144703,"support_perbill":474702381,"approval":91.2144703,"support":47.4702381},{"time_hours":18,"approval_perbill":907692309,"support_perbill":473214286,"approval":90.7692309,"support":47.3214286},{"time_hours":19,"approval_perbill":903307888,"support_perbill":471726191,"approval":90.3307888,"support":47.1726191},{"time_hours":20,"approval_perbill":898989900,"support_perbill":470238096,"approval":89.89899,"support":47.0238096},{"time_hours":21,"approval_perbill":894736842,"support_perbill":468750000,"approval":89.4736842,"support":46.875},{"time_hours":22,"approval_perbill":890547265,"support_perbill":467261905,"approval":89.0547265,"support":46.7261905},{"time_hours":23,"approval_perbill":886419755,"support_perbill":465773810,"approval":88.6419755,"support":46.577381},{"time_hours":24,"approval_perbill":882352942,"support_perbill":464285715,"approval":88.2352942,"support":46.4285715},{"time_hours":25,"approval_perbill":878345500,"support_perbill":462797620,"approval":87.83455,"support":46.279762},{"time_hours":26,"approval_perbill":874396136,"support_perbill":461309524,"approval":87.4396136,"support":46.1309524},{"time_hours":27,"approval_perbill":870503599,"support_perbill":459821429,"approval":87.0503599,"support":45.9821429},{"time_hours":28,"approval_perbill":866666667,"support_perbill":458333334,"approval":86.6666667,"support":45.8333334},{"time_hours":29,"approval_perbill":862884162,"support_perbill":456845239,"approval":86.2884162,"support":45.6845239},{"time_hours":30,"approval_perbill":859154930,"support_perbill":455357143,"approval":85.915493,"support":45.5357143},{"time_hours":31,"approval_perbill":855477857,"support_perbill":453869048,"approval":85.5477857,"support":45.3869048},{"time_hours":32,"approval_perbill":851851852,"support_perbill":452380953,"approval":85.1851852,"support":45.2380953},{"time_hours":33,"approval_perbill":848275863,"support_perbill":450892858,"approval":84.8275863,"support":45.0892858},{"time_hours":34,"approval_perbill":844748859,"support_perbill":449404762,"approval":84.4748859,"support":44.9404762},{"time_hours":35,"approval_perbill":841269842,"support_perbill":447916667,"approval":84.1269842,"support":44.7916667},{"time_hours":36,"approval_perbill":837837838,"support_perbill":446428572,"approval":83.7837838,"support":44.6428572},{"time_hours":37,"approval_perbill":834451903,"support_perbill":444940477,"approval":83.4451903,"support":44.4940477},{"time_hours":38,"approval_perbill":831111112,"support_perbill":443452381,"approval":83.1111112,"support":44.3452381},{"time_hours":39,"approval_perbill":827814570,"support_perbill":441964286,"approval":82.781457,"support":44.1964286},{"time_hours":40,"approval_perbill":824561404,"support_perbill":440476191,"approval":82.4561404,"support":44.0476191},{"time_hours":41,"approval_perbill":821350763,"support_perbill":438988096,"approval":82.1350763,"support":43.8988096},{"time_hours":42,"approval_perbill":818181818,"support_perbill":437500000,"approval":81.8181818,"support":43.75},{"time_hours":43,"approval_perbill":815053764,"support_perbill":436011905,"approval":81.5053764,"support":43.6011905},{"time_hours":44,"approval_perbill":811965813,"support_perbill":434523810,"approval":81.1965813,"support":43.452381},{"time_hours":45,"approval_perbill":808917198,"support_perbill":433035715,"approval":80.8917198,"support":43.3035715},{"time_hours":46,"approval_perbill":805907174,"support_perbill":431547620,"approval":80.5907174,"support":43.154762},{"time_hours":47,"approval_perbill":802935011,"support_perbill":430059524,"approval":80.2935011,"support":43.0059524},{"time_hours":48,"approval_perbill":800000001,"support_perbill":428571429,"approval":80.0000001,"support":42.8571429},{"time_hours":49,"approval_perbill":797101450,"support_perbill":427083334,"approval":79.710145,"support":42.7083334},{"time_hours":50,"approval_perbill":794238684,"support_perbill":425595239,"approval":79.4238684,"support":42.5595239},{"time_hours":51,"approval_perbill":791411043,"support_perbill":424107143,"approval":79.1411043,"support":42.4107143},{"time_hours":52,"approval_perbill":788617887,"support_perbill":422619048,"approval":78.8617887,"support":42.2619048},{"time_hours":53,"approval_perbill":785858586,"support_perbill":421130953,"approval":78.5858586,"support":42.1130953},{"time_hours":54,"approval_perbill":783132531,"support_perbill":419642858,"approval":78.3132531,"support":41.9642858},{"time_hours":55,"approval_perbill":780439122,"support_perbill":418154762,"approval":78.0439122,"support":41.8154762},{"time_hours":56,"approval_perbill":777777779,"support_perbill":416666667,"approval":77.7777779,"support":41.6666667},{"time_hours":57,"approval_perbill":775147929,"support_perbill":415178572,"approval":77.5147929,"support":41.5178572},{"time_hours":58,"approval_perbill":772549020,"support_perbill":413690477,"approval":77.254902,"support":41.3690477},{"time_hours":59,"approval_perbill":769980507,"support_perbill":412202381,"approval":76.9980507,"support":41.2202381},{"time_hours":60,"approval_perbill":767441861,"support_perbill":410714286,"approval":76.7441861,"support":41.0714286},{"time_hours":61,"approval_perbill":764932563,"support_perbill":409226191,"approval":76.4932563,"support":40.9226191},{"time_hours":62,"approval_perbill":762452108,"support_perbill":407738096,"approval":76.2452108,"support":40.7738096},{"time_hours":63,"approval_perbill":760000000,"support_perbill":406250000,"approval":76,"support":40.625},{"time_hours":64,"approval_perbill":757575758,"support_perbill":404761905,"approval":75.7575758,"support":40.4761905},{"time_hours":65,"approval_perbill":755178909,"support_perbill":403273810,"approval":75.5178909,"support":40.327381},{"time_hours":66,"approval_perbill":752808989,"support_perbill":401785715,"approval":75.2808989,"support":40.1785715},{"time_hours":67,"approval_perbill":750465550,"support_perbill":400297620,"approval":75.046555,"support":40.029762},{"time_hours":68,"approval_perbill":748148149,"support_perbill":398809524,"approval":74.8148149,"support":39.8809524},{"time_hours":69,"approval_perbill":745856354,"support_perbill":397321429,"approval":74.5856354,"support":39.7321429},{"time_hours":70,"approval_perbill":743589744,"support_perbill":395833334,"approval":74.3589744,"support":39.5833334},{"time_hours":71,"approval_perbill":741347906,"support_perbill":394345239,"approval":74.1347906,"support":39.4345239},{"time_hours":72,"approval_perbill":739130435,"support_perbill":392857143,"approval":73.9130435,"support":39.2857143},{"time_hours":73,"approval_perbill":736936938,"support_perbill":391369048,"approval":73.6936938,"support":39.1369048},{"time_hours":74,"approval_perbill":734767025,"support_perbill":389880953,"approval":73.4767025,"support":38.9880953},{"time_hours":75,"approval_perbill":732620322,"support_perbill":388392858,"approval":73.2620322,"support":38.8392858},{"time_hours":76,"approval_perbill":730496454,"support_perbill":386904762,"approval":73.0496454,"support":38.6904762},{"time_hours":77,"approval_perbill":728395062,"support_perbill":385416667,"approval":72.8395062,"support":38.5416667},{"time_hours":78,"approval_perbill":726315790,"support_perbill":383928572,"approval":72.631579,"support":38.3928572},{"time_hours":79,"approval_perbill":724258290,"support_perbill":382440477,"approval":72.425829,"support":38.2440477},{"time_hours":80,"approval_perbill":722222222,"support_perbill":380952381,"approval":72.2222222,"support":38.0952381},{"time_hours":81,"approval_perbill":720207254,"support_perbill":379464286,"approval":72.0207254,"support":37.9464286},{"time_hours":82,"approval_perbill":718213059,"support_perbill":377976191,"approval":71.8213059,"support":37.7976191},{"time_hours":83,"approval_perbill":716239317,"support_perbill":376488096,"approval":71.6239317,"support":37.6488096},{"time_hours":84,"approval_perbill":714285714,"support_perbill":375000000,"approval":71.4285714,"support":37.5},{"time_hours":85,"approval_perbill":712351946,"support_perbill":373511905,"approval":71.2351946,"support":37.3511905},{"time_hours":86,"approval_perbill":710437711,"support_perbill":372023810,"approval":71.0437711,"support":37.202381},{"time_hours":87,"approval_perbill":708542714,"support_perbill":370535715,"approval":70.8542714,"support":37.0535715},{"time_hours":88,"approval_perbill":706666667,"support_perbill":369047620,"approval":70.6666667,"support":36.904762},{"time_hours":89,"approval_perbill":704809287,"support_perbill":367559524,"approval":70.4809287,"support":36.7559524},{"time_hours":90,"approval_perbill":702970298,"support_perbill":366071429,"approval":70.2970298,"support":36.6071429},{"time_hours":91,"approval_perbill":701149426,"support_perbill":364583334,"approval":70.1149426,"support":36.4583334},{"time_hours":92,"approval_perbill":699346406,"support_perbill":363095239,"approval":69.9346406,"support":36.3095239},{"time_hours":93,"approval_perbill":697560976,"support_perbill":361607143,"approval":69.7560976,"support":36.1607143},{"time_hours":94,"approval_perbill":695792881,"support_perbill":360119048,"approval":69.5792881,"support":36.0119048},{"time_hours":95,"approval_perbill":694041868,"support_perbill":358630953,"approval":69.4041868,"support":35.8630953},{"time_hours":96,"approval_perbill":692307693,"support_perbill":357142858,"approval":69.2307693,"support":35.7142858},{"time_hours":97,"approval_perbill":690590112,"support_perbill":355654762,"approval":69.0590112,"support":35.5654762},{"time_hours":98,"approval_perbill":688888889,"support_perbill":354166667,"approval":68.8888889,"support":35.4166667},{"time_hours":99,"approval_perbill":687203792,"support_perbill":352678572,"approval":68.7203792,"support":35.2678572},{"time_hours":100,"approval_perbill":685534592,"support_perbill":351190477,"approval":68.5534592,"support":35.1190477},{"time_hours":101,"approval_perbill":683881064,"support_perbill":349702381,"approval":68.3881064,"support":34.9702381},{"time_hours":102,"approval_perbill":682242991,"support_perbill":348214286,"approval":68.2242991,"support":34.8214286},{"time_hours":103,"approval_perbill":680620155,"support_perbill":346726191,"approval":68.0620155,"support":34.6726191},{"time_hours":104,"approval_perbill":679012346,"support_perbill":345238096,"approval":67.9012346,"support":34.5238096},{"time_hours":105,"approval_perbill":677419355,"support_perbill":343750000,"approval":67.7419355,"support":34.375},{"time_hours":106,"approval_perbill":675840979,"support_perbill":342261905,"approval":67.5840979,"support":34.2261905},{"time_hours":107,"approval_perbill":674277017,"support_perbill":340773810,"approval":67.4277017,"support":34.077381},{"time_hours":108,"approval_perbill":672727273,"support_perbill":339285715,"approval":67.2727273,"support":33.9285715},{"time_hours":109,"approval_perbill":671191554,"support_perbill":337797620,"approval":67.1191554,"support":33.779762},{"time_hours":110,"approval_perbill":669669670,"support_perbill":336309524,"approval":66.966967,"support":33.6309524},{"time_hours":111,"approval_perbill":668161435,"support_perbill":334821429,"approval":66.8161435,"support":33.4821429},{"time_hours":112,"approval_perbill":666666667,"support_perbill":333333334,"approval":66.6666667,"support":33.3333334},{"time_hours":113,"approval_perbill":665185186,"support_perbill":331845239,"approval":66.5185186,"support":33.1845239},{"time_hours":114,"approval_perbill":663716814,"support_perbill":330357143,"approval":66.3716814,"support":33.0357143},{"time_hours":115,"approval_perbill":662261381,"support_perbill":328869048,"approval":66.2261381,"support":32.8869048},{"time_hours":116,"approval_perbill":660818714,"support_perbill":327380953,"approval":66.0818714,"support":32.7380953},{"time_hours":117,"approval_perbill":659388647,"support_perbill":325892858,"approval":65.9388647,"support":32.5892858},{"time_hours":118,"approval_perbill":657971015,"support_perbill":324404762,"approval":65.7971015,"support":32.4404762},{"time_hours":119,"approval_perbill":656565657,"support_perbill":322916667,"approval":65.6565657,"support":32.2916667},{"time_hours":120,"approval_perbill":655172414,"support_perbill":321428572,"approval":65.5172414,"support":32.1428572},{"time_hours":121,"approval_perbill":653791130,"support_perbill":319940477,"approval":65.379113,"support":31.9940477},{"time_hours":122,"approval_perbill":652421652,"support_perbill":318452381,"approval":65.2421652,"support":31.8452381},{"time_hours":123,"approval_perbill":651063830,"support_perbill":316964286,"approval":65.106383,"support":31.6964286},{"time_hours":124,"approval_perbill":649717514,"support_perbill":315476191,"approval":64.9717514,"support":31.5476191},{"time_hours":125,"approval_perbill":648382560,"support_perbill":313988096,"approval":64.838256,"support":31.3988096},{"time_hours":126,"approval_perbill":647058823,"support_perbill":312500000,"approval":64.7058823,"support":31.25},{"time_hours":127,"approval_perbill":645746165,"support_perbill":311011905,"approval":64.5746165,"support":31.1011905},{"time_hours":128,"approval_perbill":644444445,"support_perbill":309523810,"approval":64.4444445,"support":30.952381},{"time_hours":129,"approval_perbill":643153527,"support_perbill":308035715,"approval":64.3153527,"support":30.8035715},{"time_hours":130,"approval_perbill":641873279,"support_perbill":306547620,"approval":64.1873279,"support":30.654762},{"time_hours":131,"approval_perbill":640603567,"support_perbill":305059524,"approval":64.0603567,"support":30.5059524},{"time_hours":132,"approval_perbill":639344263,"support_perbill":303571429,"approval":63.9344263,"support":30.3571429},{"time_hours":133,"approval_perbill":638095238,"support_perbill":302083334,"approval":63.8095238,"support":30.2083334},{"time_hours":134,"approval_perbill":636856369,"support_perbill":300595239,"approval":63.6856369,"support":30.0595239},{"time_hours":135,"approval_perbill":635627530,"support_perbill":299107143,"approval":63.562753,"support":29.9107143},{"time_hours":136,"approval_perbill":634408602,"support_perbill":297619048,"approval":63.4408602,"support":29.7619048},{"time_hours":137,"approval_perbill":633199465,"support_perbill":296130953,"approval":63.3199465,"support":29.6130953},{"time_hours":138,"approval_perbill":632000000,"support_perbill":294642858,"approval":63.2,"support":29.4642858},{"time_hours":139,"approval_perbill":630810093,"support_perbill":293154762,"approval":63.0810093,"support":29.3154762},{"time_hours":140,"approval_perbill":629629630,"support_perbill":291666667,"approval":62.962963,"support":29.1666667},{"time_hours":141,"approval_perbill":628458498,"support_perbill":290178572,"approval":62.8458498,"support":29.0178572},{"time_hours":142,"approval_perbill":627296588,"support_perbill":288690477,"approval":62.7296588,"support":28.8690477},{"time_hours":143,"approval_perbill":626143791,"support_perbill":287202381,"approval":62.6143791,"support":28.7202381},{"time_hours":144,"approval_perbill":625000000,"support_perbill":285714286,"approval":62.5,"support":28.5714286},{"time_hours":145,"approval_perbill":623865110,"support_perbill":284226191,"approval":62.386511,"support":28.4226191},{"time_hours":146,"approval_perbill":622739018,"support_perbill":282738096,"approval":62.2739018,"support":28.2738096},{"time_hours":147,"approval_perbill":621621621,"support_perbill":281250000,"approval":62.1621621,"support":28.125},{"time_hours":148,"approval_perbill":620512821,"support_perbill":279761905,"approval":62.0512821,"support":27.9761905},{"time_hours":149,"approval_perbill":619412516,"support_perbill":278273810,"approval":61.9412516,"support":27.827381},{"time_hours":150,"approval_perbill":618320611,"support_perbill":276785715,"approval":61.8320611,"support":27.6785715},{"time_hours":151,"approval_perbill":617237009,"support_perbill":275297620,"approval":61.7237009,"support":27.529762},{"time_hours":152,"approval_perbill":616161616,"support_perbill":273809524,"approval":61.6161616,"support":27.3809524},{"time_hours":153,"approval_perbill":615094340,"support_perbill":272321429,"approval":61.509434,"support":27.2321429},{"time_hours":154,"approval_perbill":614035088,"support_perbill":270833334,"approval":61.4035088,"support":27.0833334},{"time_hours":155,"approval_perbill":612983770,"support_perbill":269345239,"approval":61.298377,"support":26.9345239},{"time_hours":156,"approval_perbill":611940298,"support_perbill":267857143,"approval":61.1940298,"support":26.7857143},{"time_hours":157,"approval_perbill":610904585,"support_perbill":266369048,"approval":61.0904585,"support":26.6369048},{"time_hours":158,"approval_perbill":609876543,"support_perbill":264880953,"approval":60.9876543,"support":26.4880953},{"time_hours":159,"approval_perbill":608856089,"support_perbill":263392858,"approval":60.8856089,"support":26.3392858},{"time_hours":160,"approval_perbill":607843137,"support_perbill":261904762,"approval":60.7843137,"support":26.1904762},{"time_hours":161,"approval_perbill":606837607,"support_perbill":260416667,"approval":60.6837607,"support":26.0416667},{"time_hours":162,"approval_perbill":605839416,"support_perbill":258928572,"approval":60.5839416,"support":25.8928572},{"time_hours":163,"approval_perbill":604848485,"support_perbill":257440477,"approval":60.4848485,"support":25.7440477},{"time_hours":164,"approval_perbill":603864734,"support_perbill":255952381,"approval":60.3864734,"support":25.5952381},{"time_hours":165,"approval_perbill":602888087,"support_perbill":254464286,"approval":60.2888087,"support":25.4464286},{"time_hours":166,"approval_perbill":601918465,"support_perbill":252976191,"approval":60.1918465,"support":25.2976191},{"time_hours":167,"approval_perbill":600955794,"support_perbill":251488096,"approval":60.0955794,"support":25.1488096},{"time_hours":168,"approval_perbill":600000000,"support_perbill":250000000,"approval":60,"support":25},{"time_hours":169,"approval_perbill":599051008,"support_perbill":248511905,"approval":59.9051008,"support":24.8511905},{"time_hours":170,"approval_perbill":598108747,"support_perbill":247023810,"approval":59.8108747,"support":24.702381},{"time_hours":171,"approval_perbill":597173145,"support_perbill":245535715,"approval":59.7173145,"support":24.5535715},{"time_hours":172,"approval_perbill":596244131,"support_perbill":244047620,"approval":59.6244131,"support":24.404762},{"time_hours":173,"approval_perbill":595321637,"support_perbill":242559524,"approval":59.5321637,"support":24.2559524},{"time_hours":174,"approval_perbill":594405594,"support_perbill":241071429,"approval":59.4405594,"support":24.1071429},{"time_hours":175,"approval_perbill":593495935,"support_perbill":239583334,"approval":59.3495935,"support":23.9583334},{"time_hours":176,"approval_perbill":592592593,"support_perbill":238095239,"approval":59.2592593,"support":23.8095239},{"time_hours":177,"approval_perbill":591695502,"support_perbill":236607143,"approval":59.1695502,"support":23.6607143},{"time_hours":178,"approval_perbill":590804598,"support_perbill":235119048,"approval":59.0804598,"support":23.5119048},{"time_hours":179,"approval_perbill":589919817,"support_perbill":233630953,"approval":58.9919817,"support":23.3630953},{"time_hours":180,"approval_perbill":589041096,"support_perbill":232142858,"approval":58.9041096,"support":23.2142858},{"time_hours":181,"approval_perbill":588168373,"support_perbill":230654762,"approval":58.8168373,"support":23.0654762},{"time_hours":182,"approval_perbill":587301587,"support_perbill":229166667,"approval":58.7301587,"support":22.9166667},{"time_hours":183,"approval_perbill":586440678,"support_perbill":227678572,"approval":58.6440678,"support":22.7678572},{"time_hours":184,"approval_perbill":585585585,"support_perbill":226190477,"approval":58.5585585,"support":22.6190477},{"time_hours":185,"approval_perbill":584736251,"support_perbill":224702381,"approval":58.4736251,"support":22.4702381},{"time_hours":186,"approval_perbill":583892617,"support_perbill":223214286,"approval":58.3892617,"support":22.3214286},{"time_hours":187,"approval_perbill":583054626,"support_perbill":221726191,"approval":58.3054626,"support":22.1726191},{"time_hours":188,"approval_perbill":582222222,"support_perbill":220238096,"approval":58.2222222,"support":22.0238096},{"time_hours":189,"approval_perbill":581395349,"support_perbill":218750000,"approval":58.1395349,"support":21.875},{"time_hours":190,"approval_perbill":580573951,"support_perbill":217261905,"approval":58.0573951,"support":21.7261905},{"time_hours":191,"approval_perbill":579757976,"support_perbill":215773810,"approval":57.9757976,"support":21.577381},{"time_hours":192,"approval_perbill":578947368,"support_perbill":214285715,"approval":57.8947368,"support":21.4285715},{"time_hours":193,"approval_perbill":578142076,"support_perbill":212797620,"approval":57.8142076,"support":21.279762},{"time_hours":194,"approval_perbill":577342048,"support_perbill":211309524,"approval":57.7342048,"support":21.1309524},{"time_hours":195,"approval_perbill":576547231,"support_perbill":209821429,"approval":57.6547231,"support":20.9821429},{"time_hours":196,"approval_perbill":575757576,"support_perbill":208333334,"approval":57.5757576,"support":20.8333334},{"time_hours":197,"approval_perbill":574973031,"support_perbill":206845239,"approval":57.4973031,"support":20.6845239},{"time_hours":198,"approval_perbill":574193548,"support_perbill":205357143,"approval":57.4193548,"support":20.5357143},{"time_hours":199,"approval_perbill":573419078,"support_perbill":203869048,"approval":57.3419078,"support":20.3869048},{"time_hours":200,"approval_perbill":572649572,"support_perbill":202380953,"approval":57.2649572,"support":20.2380953},{"time_hours":201,"approval_perbill":571884984,"support_perbill":200892858,"approval":57.1884984,"support":20.0892858},{"time_hours":202,"approval_perbill":571125265,"support_perbill":199404762,"approval":57.1125265,"support":19.9404762},{"time_hours":203,"approval_perbill":570370370,"support_perbill":197916667,"approval":57.037037,"support":19.7916667},{"time_hours":204,"approval_perbill":569620253,"support_perbill":196428572,"approval":56.9620253,"support":19.6428572},{"time_hours":205,"approval_perbill":568874868,"support_perbill":194940477,"approval":56.8874868,"support":19.4940477},{"time_hours":206,"approval_perbill":568134172,"support_perbill":193452381,"approval":56.8134172,"support":19.3452381},{"time_hours":207,"approval_perbill":567398119,"support_perbill":191964286,"approval":56.7398119,"support":19.1964286},{"time_hours":208,"approval_perbill":566666666,"support_perbill":190476191,"approval":56.6666666,"support":19.0476191},{"time_hours":209,"approval_perbill":565939771,"support_perbill":188988096,"approval":56.5939771,"support":18.8988096},{"time_hours":210,"approval_perbill":565217391,"support_perbill":187500000,"approval":56.5217391,"support":18.75},{"time_hours":211,"approval_perbill":564499484,"support_perbill":186011905,"approval":56.4499484,"support":18.6011905},{"time_hours":212,"approval_perbill":563786008,"support_perbill":184523810,"approval":56.3786008,"support":18.452381},{"time_hours":213,"approval_perbill":563076923,"support_perbill":183035715,"approval":56.3076923,"support":18.3035715},{"time_hours":214,"approval_perbill":562372188,"support_perbill":181547620,"approval":56.2372188,"support":18.154762},{"time_hours":215,"approval_perbill":561671763,"support_perbill":180059524,"approval":56.1671763,"support":18.0059524},{"time_hours":216,"approval_perbill":560975610,"support_perbill":178571429,"approval":56.097561,"support":17.8571429},{"time_hours":217,"approval_perbill":560283688,"support_perbill":177083334,"approval":56.0283688,"support":17.7083334},{"time_hours":218,"approval_perbill":559595959,"support_perbill":175595239,"approval":55.9595959,"support":17.5595239},{"time_hours":219,"approval_perbill":558912386,"support_perbill":174107143,"approval":55.8912386,"support":17.4107143},{"time_hours":220,"approval_perbill":558232931,"support_perbill":172619048,"approval":55.8232931,"support":17.2619048},{"time_hours":221,"approval_perbill":557557557,"support_perbill":171130953,"approval":55.7557557,"support":17.1130953},{"time_hours":222,"approval_perbill":556886227,"support_perbill":169642858,"approval":55.6886227,"support":16.9642858},{"time_hours":223,"approval_perbill":556218905,"support_perbill":168154762,"approval":55.6218905,"support":16.8154762},{"time_hours":224,"approval_perbill":555555555,"support_perbill":166666667,"approval":55.5555555,"support":16.6666667},{"time_hours":225,"approval_perbill":554896142,"support_perbill":165178572,"approval":55.4896142,"support":16.5178572},{"time_hours":226,"approval_perbill":554240631,"support_perbill":163690477,"approval":55.4240631,"support":16.3690477},{"time_hours":227,"approval_perbill":553588987,"support_perbill":162202381,"approval":55.3588987,"support":16.2202381},{"time_hours":228,"approval_perbill":552941176,"support_perbill":160714286,"approval":55.2941176,"support":16.0714286},{"time_hours":229,"approval_perbill":552297165,"support_perbill":159226191,"approval":55.2297165,"support":15.9226191},{"time_hours":230,"approval_perbill":551656920,"support_perbill":157738096,"approval":55.165692,"support":15.7738096},{"time_hours":231,"approval_perbill":551020408,"support_perbill":156250000,"approval":55.1020408,"support":15.625},{"time_hours":232,"approval_perbill":550387597,"support_perbill":154761905,"approval":55.0387597,"support":15.4761905},{"time_hours":233,"approval_perbill":549758454,"support_perbill":153273810,"approval":54.9758454,"support":15.327381},{"time_hours":234,"approval_perbill":549132948,"support_perbill":151785715,"approval":54.9132948,"support":15.1785715},{"time_hours":235,"approval_perbill":548511047,"support_perbill":150297620,"approval":54.8511047,"support":15.029762},{"time_hours":236,"approval_perbill":547892720,"support_perbill":148809524,"approval":54.789272,"support":14.8809524},{"time_hours":237,"approval_perbill":547277937,"support_perbill":147321429,"approval":54.7277937,"support":14.7321429},{"time_hours":238,"approval_perbill":546666666,"support_perbill":145833334,"approval":54.6666666,"support":14.5833334},{"time_hours":239,"approval_perbill":546058879,"support_perbill":144345239,"approval":54.6058879,"support":14.4345239},{"time_hours":240,"approval_perbill":545454545,"support_perbill":142857143,"approval":54.5454545,"support":14.2857143},{"time_hours":241,"approval_perbill":544853635,"support_perbill":141369048,"approval":54.4853635,"support":14.1369048},{"time_hours":242,"approval_perbill":544256120,"support_perbill":139880953,"approval":54.425612,"support":13.9880953},{"time_hours":243,"approval_perbill":543661971,"support_perbill":138392858,"approval":54.3661971,"support":13.8392858},{"time_hours":244,"approval_perbill":543071161,"support_perbill":136904762,"approval":54.3071161,"support":13.6904762},{"time_hours":245,"approval_perbill":542483660,"support_perbill":135416667,"approval":54.248366,"support":13.5416667},{"time_hours":246,"approval_perbill":541899441,"support_perbill":133928572,"approval":54.1899441,"support":13.3928572},{"time_hours":247,"approval_perbill":541318477,"support_perbill":132440477,"approval":54.1318477,"support":13.2440477},{"time_hours":248,"approval_perbill":540740740,"support_perbill":130952381,"approval":54.074074,"support":13.0952381},{"time_hours":249,"approval_perbill":540166205,"support_perbill":129464286,"approval":54.0166205,"support":12.9464286},{"time_hours":250,"approval_perbill":539594843,"support_perbill":127976191,"approval":53.9594843,"support":12.7976191},{"time_hours":251,"approval_perbill":539026630,"support_perbill":126488096,"approval":53.902663,"support":12.6488096},{"time_hours":252,"approval_perbill":538461538,"support_perbill":125000000,"approval":53.8461538,"support":12.5},{"time_hours":253,"approval_perbill":537899543,"support_perbill":123511905,"approval":53.7899543,"support":12.3511905},{"time_hours":254,"approval_perbill":537340619,"support_perbill":122023810,"approval":53.7340619,"support":12.202381},{"time_hours":255,"approval_perbill":536784741,"support_perbill":120535715,"approval":53.6784741,"support":12.0535715},{"time_hours":256,"approval_perbill":536231884,"support_perbill":119047620,"approval":53.6231884,"support":11.904762},{"time_hours":257,"approval_perbill":535682023,"support_perbill":117559524,"approval":53.5682023,"support":11.7559524},{"time_hours":258,"approval_perbill":535135135,"support_perbill":116071429,"approval":53.5135135,"support":11.6071429},{"time_hours":259,"approval_perbill":534591195,"support_perbill":114583334,"approval":53.4591195,"support":11.4583334},{"time_hours":260,"approval_perbill":534050179,"support_perbill":113095239,"approval":53.4050179,"support":11.3095239},{"time_hours":261,"approval_perbill":533512064,"support_perbill":111607143,"approval":53.3512064,"support":11.1607143},{"time_hours":262,"approval_perbill":532976827,"support_perbill":110119048,"approval":53.2976827,"support":11.0119048},{"time_hours":263,"approval_perbill":532444444,"support_perbill":108630953,"approval":53.2444444,"support":10.8630953},{"time_hours":264,"approval_perbill":531914893,"support_perbill":107142858,"approval":53.1914893,"support":10.7142858},{"time_hours":265,"approval_perbill":531388152,"support_perbill":105654762,"approval":53.1388152,"support":10.5654762},{"time_hours":266,"approval_perbill":530864197,"support_perbill":104166667,"approval":53.0864197,"support":10.4166667},{"time_hours":267,"approval_perbill":530343007,"support_perbill":102678572,"approval":53.0343007,"support":10.2678572},{"time_hours":268,"approval_perbill":529824561,"support_perbill":101190477,"approval":52.9824561,"support":10.1190477},{"time_hours":269,"approval_perbill":529308836,"support_perbill":99702381,"approval":52.9308836,"support":9.9702381},{"time_hours":270,"approval_perbill":528795811,"support_perbill":98214286,"approval":52.8795811,"support":9.8214286},{"time_hours":271,"approval_perbill":528285465,"support_perbill":96726191,"approval":52.8285465,"support":9.6726191},{"time_hours":272,"approval_perbill":527777777,"support_perbill":95238096,"approval":52.7777777,"support":9.5238096},{"time_hours":273,"approval_perbill":527272727,"support_perbill":93750000,"approval":52.7272727,"support":9.375},{"time_hours":274,"approval_perbill":526770293,"support_perbill":92261905,"approval":52.6770293,"support":9.2261905},{"time_hours":275,"approval_perbill":526270456,"support_perbill":90773810,"approval":52.6270456,"support":9.077381},{"time_hours":276,"approval_perbill":525773195,"support_perbill":89285715,"approval":52.5773195,"support":8.9285715},{"time_hours":277,"approval_perbill":525278491,"support_perbill":87797620,"approval":52.5278491,"support":8.779762},{"time_hours":278,"approval_perbill":524786324,"support_perbill":86309524,"approval":52.4786324,"support":8.6309524},{"time_hours":279,"approval_perbill":524296675,"support_perbill":84821429,"approval":52.4296675,"support":8.4821429},{"time_hours":280,"approval_perbill":523809523,"support_perbill":83333334,"approval":52.3809523,"support":8.3333334},{"time_hours":281,"approval_perbill":523324851,"support_perbill":81845239,"approval":52.3324851,"support":8.1845239},{"time_hours":282,"approval_perbill":522842639,"support_perbill":80357143,"approval":52.2842639,"support":8.0357143},{"time_hours":283,"approval_perbill":522362869,"support_perbill":78869048,"approval":52.2362869,"support":7.8869048},{"time_hours":284,"approval_perbill":521885521,"support_perbill":77380953,"approval":52.1885521,"support":7.7380953},{"time_hours":285,"approval_perbill":521410579,"support_perbill":75892858,"approval":52.1410579,"support":7.5892858},{"time_hours":286,"approval_perbill":520938023,"support_perbill":74404762,"approval":52.0938023,"support":7.4404762},{"time_hours":287,"approval_perbill":520467836,"support_perbill":72916667,"approval":52.0467836,"support":7.2916667},{"time_hours":288,"approval_perbill":519999999,"support_perbill":71428572,"approval":51.9999999,"support":7.1428572},{"time_hours":289,"approval_perbill":519534497,"support_perbill":69940477,"approval":51.9534497,"support":6.9940477},{"time_hours":290,"approval_perbill":519071310,"support_perbill":68452381,"approval":51.907131,"support":6.8452381},{"time_hours":291,"approval_perbill":518610421,"support_perbill":66964286,"approval":51.8610421,"support":6.6964286},{"time_hours":292,"approval_perbill":518151815,"support_perbill":65476191,"approval":51.8151815,"support":6.5476191},{"time_hours":293,"approval_perbill":517695473,"support_perbill":63988096,"approval":51.7695473,"support":6.3988096},{"time_hours":294,"approval_perbill":517241379,"support_perbill":62500000,"approval":51.7241379,"support":6.25},{"time_hours":295,"approval_perbill":516789516,"support_perbill":61011905,"approval":51.6789516,"support":6.1011905},{"time_hours":296,"approval_perbill":516339869,"support_perbill":59523810,"approval":51.6339869,"support":5.952381},{"time_hours":297,"approval_perbill":515892420,"support_perbill":58035715,"approval":51.589242,"support":5.8035715},{"time_hours":298,"approval_perbill":515447154,"support_perbill":56547620,"approval":51.5447154,"support":5.654762},{"time_hours":299,"approval_perbill":515004055,"support_perbill":55059524,"approval":51.5004055,"support":5.5059524},{"time_hours":300,"approval_perbill":514563106,"support_perbill":53571429,"approval":51.4563106,"support":5.3571429},{"time_hours":301,"approval_perbill":514124293,"support_perbill":52083334,"approval":51.4124293,"support":5.2083334},{"time_hours":302,"approval_perbill":513687600,"support_perbill":50595239,"approval":51.36876,"support":5.0595239},{"time_hours":303,"approval_perbill":513253011,"support_perbill":49107143,"approval":51.3253011,"support":4.9107143},{"time_hours":304,"approval_perbill":512820512,"support_perbill":47619048,"approval":51.2820512,"support":4.7619048},{"time_hours":305,"approval_perbill":512390087,"support_perbill":46130953,"approval":51.2390087,"support":4.6130953},{"time_hours":306,"approval_perbill":511961722,"support_perbill":44642858,"approval":51.1961722,"support":4.4642858},{"time_hours":307,"approval_perbill":511535401,"support_perbill":43154762,"approval":51.1535401,"support":4.3154762},{"time_hours":308,"approval_perbill":511111111,"support_perbill":41666667,"approval":51.1111111,"support":4.1666667},{"time_hours":309,"approval_perbill":510688835,"support_perbill":40178572,"approval":51.0688835,"support":4.0178572},{"time_hours":310,"approval_perbill":510268562,"support_perbill":38690477,"approval":51.0268562,"support":3.8690477},{"time_hours":311,"approval_perbill":509850275,"support_perbill":37202381,"approval":50.9850275,"support":3.7202381},{"time_hours":312,"approval_perbill":509433962,"support_perbill":35714286,"approval":50.9433962,"support":3.5714286},{"time_hours":313,"approval_perbill":509019607,"support_perbill":34226191,"approval":50.9019607,"support":3.4226191},{"time_hours":314,"approval_perbill":508607198,"support_perbill":32738096,"approval":50.8607198,"support":3.2738096},{"time_hours":315,"approval_perbill":508196721,"support_perbill":31250000,"approval":50.8196721,"support":3.125},{"time_hours":316,"approval_perbill":507788161,"support_perbill":29761905,"approval":50.7788161,"support":2.9761905},{"time_hours":317,"approval_perbill":507381507,"support_perbill":28273810,"approval":50.7381507,"support":2.827381},{"time_hours":318,"approval_perbill":506976744,"support_perbill":26785715,"approval":50.6976744,"support":2.6785715},{"time_hours":319,"approval_perbill":506573859,"support_perbill":25297620,"approval":50.6573859,"support":2.529762},{"time_hours":320,"approval_perbill":506172839,"support_perbill":23809524,"approval":50.6172839,"support":2.3809524},{"time_hours":321,"approval_perbill":505773671,"support_perbill":22321429,"approval":50.5773671,"support":2.2321429},{"time_hours":322,"approval_perbill":505376343,"support_perbill":20833334,"approval":50.5376343,"support":2.0833334},{"time_hours":323,"approval_perbill":504980842,"support_perbill":19345239,"approval":50.4980842,"support":1.9345239},{"time_hours":324,"approval_perbill":504587155,"support_perbill":17857143,"approval":50.4587155,"support":1.7857143},{"time_hours":325,"approval_perbill":504195270,"support_perbill":16369048,"approval":50.419527,"support":1.6369048},{"time_hours":326,"approval_perbill":503805174,"support_perbill":14880953,"approval":50.3805174,"support":1.4880953},{"time_hours":327,"approval_perbill":503416856,"support_perbill":13392858,"approval":50.3416856,"support":1.3392858},{"time_hours":328,"approval_perbill":503030302,"support_perbill":11904762,"approval":50.3030302,"support":1.1904762},{"time_hours":329,"approval_perbill":502645502,"support_perbill":10416667,"approval":50.2645502,"support":1.0416667},{"time_hours":330,"approval_perbill":502262443,"support_perbill":8928572,"approval":50.2262443,"support":0.8928572},{"time_hours":331,"approval_perbill":501881113,"support_perbill":7440477,"approval":50.1881113,"support":0.7440477},{"time_hours":332,"approval_perbill":501501501,"support_perbill":5952381,"approval":50.1501501,"support":0.5952381},{"time_hours":333,"approval_perbill":501123595,"support_perbill":4464286,"approval":50.1123595,"support":0.4464286},{"time_hours":334,"approval_perbill":500747383,"support_perbill":2976191,"approval":50.0747383,"support":0.2976191},{"time_hours":335,"approval_perbill":500372855,"support_perbill":1488096,"approval":50.0372855,"support":0.1488096},{"time_hours":336,"approval_perbill":499999999,"support_perbill":0,"approval":49.9999999,"support":0}]')},54924:p=>{"use strict";p.exports=JSON.parse('[{"time_hours":0,"approval_perbill":1000000000,"support_perbill":500000026,"approval":100,"support":50.0000026},{"time_hours":1,"approval_perbill":997549020,"support_perbill":418401359,"approval":99.754902,"support":41.8401359},{"time_hours":2,"approval_perbill":995098040,"support_perbill":359397443,"approval":99.509804,"support":35.9397443},{"time_hours":3,"approval_perbill":992647060,"support_perbill":314744813,"approval":99.264706,"support":31.4744813},{"time_hours":4,"approval_perbill":990196080,"support_perbill":279775293,"approval":99.019608,"support":27.9775293},{"time_hours":5,"approval_perbill":987745099,"support_perbill":251647242,"approval":98.7745099,"support":25.1647242},{"time_hours":6,"approval_perbill":985294119,"support_perbill":228531862,"approval":98.5294119,"support":22.8531862},{"time_hours":7,"approval_perbill":982843138,"support_perbill":209198815,"approval":98.2843138,"support":20.9198815},{"time_hours":8,"approval_perbill":980392158,"support_perbill":192789972,"approval":98.0392158,"support":19.2789972},{"time_hours":9,"approval_perbill":977941177,"support_perbill":178688524,"approval":97.7941177,"support":17.8688524},{"time_hours":10,"approval_perbill":975490197,"support_perbill":166439756,"approval":97.5490197,"support":16.6439756},{"time_hours":11,"approval_perbill":973039216,"support_perbill":155701053,"approval":97.3039216,"support":15.5701053},{"time_hours":12,"approval_perbill":970588236,"support_perbill":146209386,"approval":97.0588236,"support":14.6209386},{"time_hours":13,"approval_perbill":968137256,"support_perbill":137759452,"approval":96.8137256,"support":13.7759452},{"time_hours":14,"approval_perbill":965686276,"support_perbill":130188679,"approval":96.5686276,"support":13.0188679},{"time_hours":15,"approval_perbill":963235295,"support_perbill":123366639,"approval":96.3235295,"support":12.3366639},{"time_hours":16,"approval_perbill":960784315,"support_perbill":117187499,"approval":96.0784315,"support":11.7187499},{"time_hours":17,"approval_perbill":958333334,"support_perbill":111564465,"approval":95.8333334,"support":11.1564465},{"time_hours":18,"approval_perbill":955882354,"support_perbill":106425701,"approval":95.5882354,"support":10.6425701},{"time_hours":19,"approval_perbill":953431373,"support_perbill":101711228,"approval":95.3431373,"support":10.1711228},{"time_hours":20,"approval_perbill":950980393,"support_perbill":97370582,"approval":95.0980393,"support":9.7370582},{"time_hours":21,"approval_perbill":948529412,"support_perbill":93360994,"approval":94.8529412,"support":9.3360994},{"time_hours":22,"approval_perbill":946078432,"support_perbill":89645982,"approval":94.6078432,"support":8.9645982},{"time_hours":23,"approval_perbill":943627452,"support_perbill":86194234,"approval":94.3627452,"support":8.6194234},{"time_hours":24,"approval_perbill":941176471,"support_perbill":82978722,"approval":94.1176471,"support":8.2978722},{"time_hours":25,"approval_perbill":938725491,"support_perbill":79975997,"approval":93.8725491,"support":7.9975997},{"time_hours":26,"approval_perbill":936274511,"support_perbill":77165614,"approval":93.6274511,"support":7.7165614},{"time_hours":27,"approval_perbill":933823531,"support_perbill":74529666,"approval":93.3823531,"support":7.4529666},{"time_hours":28,"approval_perbill":931372550,"support_perbill":72052400,"approval":93.137255,"support":7.20524},{"time_hours":29,"approval_perbill":928921570,"support_perbill":69719908,"approval":92.892157,"support":6.9719908},{"time_hours":30,"approval_perbill":926470589,"support_perbill":67519857,"approval":92.6470589,"support":6.7519857},{"time_hours":31,"approval_perbill":924019609,"support_perbill":65441280,"approval":92.4019609,"support":6.544128},{"time_hours":32,"approval_perbill":921568628,"support_perbill":63474386,"approval":92.1568628,"support":6.3474386},{"time_hours":33,"approval_perbill":919117648,"support_perbill":61610409,"approval":91.9117648,"support":6.1610409},{"time_hours":34,"approval_perbill":916666667,"support_perbill":59841478,"approval":91.6666667,"support":5.9841478},{"time_hours":35,"approval_perbill":914215687,"support_perbill":58160504,"approval":91.4215687,"support":5.8160504},{"time_hours":36,"approval_perbill":911764706,"support_perbill":56561084,"approval":91.1764706,"support":5.6561084},{"time_hours":37,"approval_perbill":909313726,"support_perbill":55037426,"approval":90.9313726,"support":5.5037426},{"time_hours":38,"approval_perbill":906862746,"support_perbill":53584271,"approval":90.6862746,"support":5.3584271},{"time_hours":39,"approval_perbill":904411766,"support_perbill":52196835,"approval":90.4411766,"support":5.2196835},{"time_hours":40,"approval_perbill":901960785,"support_perbill":50870759,"approval":90.1960785,"support":5.0870759},{"time_hours":41,"approval_perbill":899509805,"support_perbill":49602061,"approval":89.9509805,"support":4.9602061},{"time_hours":42,"approval_perbill":897058824,"support_perbill":48387095,"approval":89.7058824,"support":4.8387095},{"time_hours":43,"approval_perbill":894607844,"support_perbill":47222519,"approval":89.4607844,"support":4.7222519},{"time_hours":44,"approval_perbill":892156864,"support_perbill":46105262,"approval":89.2156864,"support":4.6105262},{"time_hours":45,"approval_perbill":889705883,"support_perbill":45032496,"approval":88.9705883,"support":4.5032496},{"time_hours":46,"approval_perbill":887254903,"support_perbill":44001617,"approval":88.7254903,"support":4.4001617},{"time_hours":47,"approval_perbill":884803922,"support_perbill":43010218,"approval":88.4803922,"support":4.3010218},{"time_hours":48,"approval_perbill":882352942,"support_perbill":42056074,"approval":88.2352942,"support":4.2056074},{"time_hours":49,"approval_perbill":879901962,"support_perbill":41137122,"approval":87.9901962,"support":4.1137122},{"time_hours":50,"approval_perbill":877450982,"support_perbill":40251453,"approval":87.7450982,"support":4.0251453},{"time_hours":51,"approval_perbill":875000001,"support_perbill":39397289,"approval":87.5000001,"support":3.9397289},{"time_hours":52,"approval_perbill":872549021,"support_perbill":38572980,"approval":87.2549021,"support":3.857298},{"time_hours":53,"approval_perbill":870098040,"support_perbill":37776985,"approval":87.009804,"support":3.7776985},{"time_hours":54,"approval_perbill":867647060,"support_perbill":37007873,"approval":86.764706,"support":3.7007873},{"time_hours":55,"approval_perbill":865196079,"support_perbill":36264302,"approval":86.5196079,"support":3.6264302},{"time_hours":56,"approval_perbill":862745099,"support_perbill":35545023,"approval":86.2745099,"support":3.5545023},{"time_hours":57,"approval_perbill":860294118,"support_perbill":34848862,"approval":86.0294118,"support":3.4848862},{"time_hours":58,"approval_perbill":857843138,"support_perbill":34174724,"approval":85.7843138,"support":3.4174724},{"time_hours":59,"approval_perbill":855392157,"support_perbill":33521580,"approval":85.5392157,"support":3.352158},{"time_hours":60,"approval_perbill":852941177,"support_perbill":32888464,"approval":85.2941177,"support":3.2888464},{"time_hours":61,"approval_perbill":850490197,"support_perbill":32274469,"approval":85.0490197,"support":3.2274469},{"time_hours":62,"approval_perbill":848039217,"support_perbill":31678741,"approval":84.8039217,"support":3.1678741},{"time_hours":63,"approval_perbill":845588236,"support_perbill":31100477,"approval":84.5588236,"support":3.1100477},{"time_hours":64,"approval_perbill":843137256,"support_perbill":30538921,"approval":84.3137256,"support":3.0538921},{"time_hours":65,"approval_perbill":840686276,"support_perbill":29993358,"approval":84.0686276,"support":2.9993358},{"time_hours":66,"approval_perbill":838235295,"support_perbill":29463116,"approval":83.8235295,"support":2.9463116},{"time_hours":67,"approval_perbill":835784315,"support_perbill":28947556,"approval":83.5784315,"support":2.8947556},{"time_hours":68,"approval_perbill":833333334,"support_perbill":28446079,"approval":83.3333334,"support":2.8446079},{"time_hours":69,"approval_perbill":830882354,"support_perbill":27958114,"approval":83.0882354,"support":2.7958114},{"time_hours":70,"approval_perbill":828431373,"support_perbill":27483123,"approval":82.8431373,"support":2.7483123},{"time_hours":71,"approval_perbill":825980393,"support_perbill":27020596,"approval":82.5980393,"support":2.7020596},{"time_hours":72,"approval_perbill":823529412,"support_perbill":26570047,"approval":82.3529412,"support":2.6570047},{"time_hours":73,"approval_perbill":821078432,"support_perbill":26131019,"approval":82.1078432,"support":2.6131019},{"time_hours":74,"approval_perbill":818627452,"support_perbill":25703073,"approval":81.8627452,"support":2.5703073},{"time_hours":75,"approval_perbill":816176472,"support_perbill":25285796,"approval":81.6176472,"support":2.5285796},{"time_hours":76,"approval_perbill":813725491,"support_perbill":24878795,"approval":81.3725491,"support":2.4878795},{"time_hours":77,"approval_perbill":811274511,"support_perbill":24481693,"approval":81.1274511,"support":2.4481693},{"time_hours":78,"approval_perbill":808823530,"support_perbill":24094134,"approval":80.882353,"support":2.4094134},{"time_hours":79,"approval_perbill":806372550,"support_perbill":23715779,"approval":80.637255,"support":2.3715779},{"time_hours":80,"approval_perbill":803921569,"support_perbill":23346303,"approval":80.3921569,"support":2.3346303},{"time_hours":81,"approval_perbill":801470589,"support_perbill":22985397,"approval":80.1470589,"support":2.2985397},{"time_hours":82,"approval_perbill":799019608,"support_perbill":22632766,"approval":79.9019608,"support":2.2632766},{"time_hours":83,"approval_perbill":796568628,"support_perbill":22288130,"approval":79.6568628,"support":2.228813},{"time_hours":84,"approval_perbill":794117648,"support_perbill":21951219,"approval":79.4117648,"support":2.1951219},{"time_hours":85,"approval_perbill":791666668,"support_perbill":21621776,"approval":79.1666668,"support":2.1621776},{"time_hours":86,"approval_perbill":789215688,"support_perbill":21299556,"approval":78.9215688,"support":2.1299556},{"time_hours":87,"approval_perbill":786764707,"support_perbill":20984324,"approval":78.6764707,"support":2.0984324},{"time_hours":88,"approval_perbill":784313727,"support_perbill":20675855,"approval":78.4313727,"support":2.0675855},{"time_hours":89,"approval_perbill":781862746,"support_perbill":20373934,"approval":78.1862746,"support":2.0373934},{"time_hours":90,"approval_perbill":779411766,"support_perbill":20078354,"approval":77.9411766,"support":2.0078354},{"time_hours":91,"approval_perbill":776960785,"support_perbill":19788917,"approval":77.6960785,"support":1.9788917},{"time_hours":92,"approval_perbill":774509805,"support_perbill":19505435,"approval":77.4509805,"support":1.9505435},{"time_hours":93,"approval_perbill":772058824,"support_perbill":19227725,"approval":77.2058824,"support":1.9227725},{"time_hours":94,"approval_perbill":769607844,"support_perbill":18955613,"approval":76.9607844,"support":1.8955613},{"time_hours":95,"approval_perbill":767156863,"support_perbill":18688931,"approval":76.7156863,"support":1.8688931},{"time_hours":96,"approval_perbill":764705883,"support_perbill":18427518,"approval":76.4705883,"support":1.8427518},{"time_hours":97,"approval_perbill":762254903,"support_perbill":18171219,"approval":76.2254903,"support":1.8171219},{"time_hours":98,"approval_perbill":759803923,"support_perbill":17919887,"approval":75.9803923,"support":1.7919887},{"time_hours":99,"approval_perbill":757352942,"support_perbill":17673377,"approval":75.7352942,"support":1.7673377},{"time_hours":100,"approval_perbill":754901962,"support_perbill":17431553,"approval":75.4901962,"support":1.7431553},{"time_hours":101,"approval_perbill":752450981,"support_perbill":17194282,"approval":75.2450981,"support":1.7194282},{"time_hours":102,"approval_perbill":750000001,"support_perbill":16961437,"approval":75.0000001,"support":1.6961437},{"time_hours":103,"approval_perbill":747549020,"support_perbill":16732895,"approval":74.754902,"support":1.6732895},{"time_hours":104,"approval_perbill":745098040,"support_perbill":16508538,"approval":74.509804,"support":1.6508538},{"time_hours":105,"approval_perbill":742647059,"support_perbill":16288252,"approval":74.2647059,"support":1.6288252},{"time_hours":106,"approval_perbill":740196079,"support_perbill":16071927,"approval":74.0196079,"support":1.6071927},{"time_hours":107,"approval_perbill":737745099,"support_perbill":15859457,"approval":73.7745099,"support":1.5859457},{"time_hours":108,"approval_perbill":735294118,"support_perbill":15650741,"approval":73.5294118,"support":1.5650741},{"time_hours":109,"approval_perbill":732843138,"support_perbill":15445679,"approval":73.2843138,"support":1.5445679},{"time_hours":110,"approval_perbill":730392158,"support_perbill":15244176,"approval":73.0392158,"support":1.5244176},{"time_hours":111,"approval_perbill":727941178,"support_perbill":15046141,"approval":72.7941178,"support":1.5046141},{"time_hours":112,"approval_perbill":725490197,"support_perbill":14851485,"approval":72.5490197,"support":1.4851485},{"time_hours":113,"approval_perbill":723039217,"support_perbill":14660121,"approval":72.3039217,"support":1.4660121},{"time_hours":114,"approval_perbill":720588236,"support_perbill":14471968,"approval":72.0588236,"support":1.4471968},{"time_hours":115,"approval_perbill":718137256,"support_perbill":14286945,"approval":71.8137256,"support":1.4286945},{"time_hours":116,"approval_perbill":715686275,"support_perbill":14104975,"approval":71.5686275,"support":1.4104975},{"time_hours":117,"approval_perbill":713235295,"support_perbill":13925982,"approval":71.3235295,"support":1.3925982},{"time_hours":118,"approval_perbill":710784314,"support_perbill":13749894,"approval":71.0784314,"support":1.3749894},{"time_hours":119,"approval_perbill":708333334,"support_perbill":13576642,"approval":70.8333334,"support":1.3576642},{"time_hours":120,"approval_perbill":705882353,"support_perbill":13406156,"approval":70.5882353,"support":1.3406156},{"time_hours":121,"approval_perbill":703431373,"support_perbill":13238372,"approval":70.3431373,"support":1.3238372},{"time_hours":122,"approval_perbill":700980393,"support_perbill":13073226,"approval":70.0980393,"support":1.3073226},{"time_hours":123,"approval_perbill":698529413,"support_perbill":12910655,"approval":69.8529413,"support":1.2910655},{"time_hours":124,"approval_perbill":696078432,"support_perbill":12750601,"approval":69.6078432,"support":1.2750601},{"time_hours":125,"approval_perbill":693627452,"support_perbill":12593005,"approval":69.3627452,"support":1.2593005},{"time_hours":126,"approval_perbill":691176471,"support_perbill":12437810,"approval":69.1176471,"support":1.243781},{"time_hours":127,"approval_perbill":688725491,"support_perbill":12284964,"approval":68.8725491,"support":1.2284964},{"time_hours":128,"approval_perbill":686274511,"support_perbill":12134411,"approval":68.6274511,"support":1.2134411},{"time_hours":129,"approval_perbill":683823530,"support_perbill":11986103,"approval":68.382353,"support":1.1986103},{"time_hours":130,"approval_perbill":681372550,"support_perbill":11839987,"approval":68.137255,"support":1.1839987},{"time_hours":131,"approval_perbill":678921569,"support_perbill":11696017,"approval":67.8921569,"support":1.1696017},{"time_hours":132,"approval_perbill":676470589,"support_perbill":11554145,"approval":67.6470589,"support":1.1554145},{"time_hours":133,"approval_perbill":674019609,"support_perbill":11414326,"approval":67.4019609,"support":1.1414326},{"time_hours":134,"approval_perbill":671568629,"support_perbill":11276516,"approval":67.1568629,"support":1.1276516},{"time_hours":135,"approval_perbill":669117648,"support_perbill":11140671,"approval":66.9117648,"support":1.1140671},{"time_hours":136,"approval_perbill":666666668,"support_perbill":11006750,"approval":66.6666668,"support":1.100675},{"time_hours":137,"approval_perbill":664215687,"support_perbill":10874713,"approval":66.4215687,"support":1.0874713},{"time_hours":138,"approval_perbill":661764707,"support_perbill":10744519,"approval":66.1764707,"support":1.0744519},{"time_hours":139,"approval_perbill":659313726,"support_perbill":10616130,"approval":65.9313726,"support":1.061613},{"time_hours":140,"approval_perbill":656862746,"support_perbill":10489510,"approval":65.6862746,"support":1.048951},{"time_hours":141,"approval_perbill":654411765,"support_perbill":10364622,"approval":65.4411765,"support":1.0364622},{"time_hours":142,"approval_perbill":651960785,"support_perbill":10241430,"approval":65.1960785,"support":1.024143},{"time_hours":143,"approval_perbill":649509804,"support_perbill":10119900,"approval":64.9509804,"support":1.01199},{"time_hours":144,"approval_perbill":647058824,"support_perbill":10000000,"approval":64.7058824,"support":1},{"time_hours":145,"approval_perbill":644607844,"support_perbill":9881695,"approval":64.4607844,"support":0.9881695},{"time_hours":146,"approval_perbill":642156864,"support_perbill":9764955,"approval":64.2156864,"support":0.9764955},{"time_hours":147,"approval_perbill":639705883,"support_perbill":9649749,"approval":63.9705883,"support":0.9649749},{"time_hours":148,"approval_perbill":637254903,"support_perbill":9536047,"approval":63.7254903,"support":0.9536047},{"time_hours":149,"approval_perbill":634803923,"support_perbill":9423820,"approval":63.4803923,"support":0.942382},{"time_hours":150,"approval_perbill":632352942,"support_perbill":9313038,"approval":63.2352942,"support":0.9313038},{"time_hours":151,"approval_perbill":629901962,"support_perbill":9203674,"approval":62.9901962,"support":0.9203674},{"time_hours":152,"approval_perbill":627450981,"support_perbill":9095702,"approval":62.7450981,"support":0.9095702},{"time_hours":153,"approval_perbill":625000001,"support_perbill":8989095,"approval":62.5000001,"support":0.8989095},{"time_hours":154,"approval_perbill":622549020,"support_perbill":8883826,"approval":62.254902,"support":0.8883826},{"time_hours":155,"approval_perbill":620098040,"support_perbill":8779872,"approval":62.009804,"support":0.8779872},{"time_hours":156,"approval_perbill":617647059,"support_perbill":8677207,"approval":61.7647059,"support":0.8677207},{"time_hours":157,"approval_perbill":615196079,"support_perbill":8575808,"approval":61.5196079,"support":0.8575808},{"time_hours":158,"approval_perbill":612745099,"support_perbill":8475652,"approval":61.2745099,"support":0.8475652},{"time_hours":159,"approval_perbill":610294119,"support_perbill":8376715,"approval":61.0294119,"support":0.8376715},{"time_hours":160,"approval_perbill":607843138,"support_perbill":8278976,"approval":60.7843138,"support":0.8278976},{"time_hours":161,"approval_perbill":605392158,"support_perbill":8182413,"approval":60.5392158,"support":0.8182413},{"time_hours":162,"approval_perbill":602941177,"support_perbill":8087005,"approval":60.2941177,"support":0.8087005},{"time_hours":163,"approval_perbill":600490197,"support_perbill":7992731,"approval":60.0490197,"support":0.7992731},{"time_hours":164,"approval_perbill":598039216,"support_perbill":7899571,"approval":59.8039216,"support":0.7899571},{"time_hours":165,"approval_perbill":595588236,"support_perbill":7807506,"approval":59.5588236,"support":0.7807506},{"time_hours":166,"approval_perbill":593137255,"support_perbill":7716516,"approval":59.3137255,"support":0.7716516},{"time_hours":167,"approval_perbill":590686275,"support_perbill":7626583,"approval":59.0686275,"support":0.7626583},{"time_hours":168,"approval_perbill":588235295,"support_perbill":7537688,"approval":58.8235295,"support":0.7537688},{"time_hours":169,"approval_perbill":585784315,"support_perbill":7449814,"approval":58.5784315,"support":0.7449814},{"time_hours":170,"approval_perbill":583333335,"support_perbill":7362942,"approval":58.3333335,"support":0.7362942},{"time_hours":171,"approval_perbill":580882354,"support_perbill":7277057,"approval":58.0882354,"support":0.7277057},{"time_hours":172,"approval_perbill":578431374,"support_perbill":7192141,"approval":57.8431374,"support":0.7192141},{"time_hours":173,"approval_perbill":575980393,"support_perbill":7108178,"approval":57.5980393,"support":0.7108178},{"time_hours":174,"approval_perbill":573529413,"support_perbill":7025151,"approval":57.3529413,"support":0.7025151},{"time_hours":175,"approval_perbill":571078432,"support_perbill":6943047,"approval":57.1078432,"support":0.6943047},{"time_hours":176,"approval_perbill":568627452,"support_perbill":6861848,"approval":56.8627452,"support":0.6861848},{"time_hours":177,"approval_perbill":566176471,"support_perbill":6781540,"approval":56.6176471,"support":0.678154},{"time_hours":178,"approval_perbill":563725491,"support_perbill":6702109,"approval":56.3725491,"support":0.6702109},{"time_hours":179,"approval_perbill":561274510,"support_perbill":6623541,"approval":56.127451,"support":0.6623541},{"time_hours":180,"approval_perbill":558823530,"support_perbill":6545820,"approval":55.882353,"support":0.654582},{"time_hours":181,"approval_perbill":556372550,"support_perbill":6468935,"approval":55.637255,"support":0.6468935},{"time_hours":182,"approval_perbill":553921570,"support_perbill":6392871,"approval":55.392157,"support":0.6392871},{"time_hours":183,"approval_perbill":551470589,"support_perbill":6317615,"approval":55.1470589,"support":0.6317615},{"time_hours":184,"approval_perbill":549019609,"support_perbill":6243154,"approval":54.9019609,"support":0.6243154},{"time_hours":185,"approval_perbill":546568628,"support_perbill":6169476,"approval":54.6568628,"support":0.6169476},{"time_hours":186,"approval_perbill":544117648,"support_perbill":6096569,"approval":54.4117648,"support":0.6096569},{"time_hours":187,"approval_perbill":541666667,"support_perbill":6024421,"approval":54.1666667,"support":0.6024421},{"time_hours":188,"approval_perbill":539215687,"support_perbill":5953019,"approval":53.9215687,"support":0.5953019},{"time_hours":189,"approval_perbill":536764706,"support_perbill":5882353,"approval":53.6764706,"support":0.5882353},{"time_hours":190,"approval_perbill":534313726,"support_perbill":5812410,"approval":53.4313726,"support":0.581241},{"time_hours":191,"approval_perbill":531862746,"support_perbill":5743181,"approval":53.1862746,"support":0.5743181},{"time_hours":192,"approval_perbill":529411765,"support_perbill":5674653,"approval":52.9411765,"support":0.5674653},{"time_hours":193,"approval_perbill":526960785,"support_perbill":5606817,"approval":52.6960785,"support":0.5606817},{"time_hours":194,"approval_perbill":524509805,"support_perbill":5539662,"approval":52.4509805,"support":0.5539662},{"time_hours":195,"approval_perbill":522058825,"support_perbill":5473177,"approval":52.2058825,"support":0.5473177},{"time_hours":196,"approval_perbill":519607844,"support_perbill":5407354,"approval":51.9607844,"support":0.5407354},{"time_hours":197,"approval_perbill":517156864,"support_perbill":5342181,"approval":51.7156864,"support":0.5342181},{"time_hours":198,"approval_perbill":514705883,"support_perbill":5277650,"approval":51.4705883,"support":0.527765},{"time_hours":199,"approval_perbill":512254903,"support_perbill":5213751,"approval":51.2254903,"support":0.5213751},{"time_hours":200,"approval_perbill":509803922,"support_perbill":5150474,"approval":50.9803922,"support":0.5150474},{"time_hours":201,"approval_perbill":507352942,"support_perbill":5087812,"approval":50.7352942,"support":0.5087812},{"time_hours":202,"approval_perbill":504901961,"support_perbill":5025754,"approval":50.4901961,"support":0.5025754},{"time_hours":203,"approval_perbill":502450981,"support_perbill":4964292,"approval":50.2450981,"support":0.4964292},{"time_hours":204,"approval_perbill":500000000,"support_perbill":4903417,"approval":50,"support":0.4903417},{"time_hours":205,"approval_perbill":500000000,"support_perbill":4843122,"approval":50,"support":0.4843122},{"time_hours":206,"approval_perbill":500000000,"support_perbill":4783398,"approval":50,"support":0.4783398},{"time_hours":207,"approval_perbill":500000000,"support_perbill":4724236,"approval":50,"support":0.4724236},{"time_hours":208,"approval_perbill":500000000,"support_perbill":4665630,"approval":50,"support":0.466563},{"time_hours":209,"approval_perbill":500000000,"support_perbill":4607570,"approval":50,"support":0.460757},{"time_hours":210,"approval_perbill":500000000,"support_perbill":4550050,"approval":50,"support":0.455005},{"time_hours":211,"approval_perbill":500000000,"support_perbill":4493062,"approval":50,"support":0.4493062},{"time_hours":212,"approval_perbill":500000000,"support_perbill":4436599,"approval":50,"support":0.4436599},{"time_hours":213,"approval_perbill":500000000,"support_perbill":4380654,"approval":50,"support":0.4380654},{"time_hours":214,"approval_perbill":500000000,"support_perbill":4325218,"approval":50,"support":0.4325218},{"time_hours":215,"approval_perbill":500000000,"support_perbill":4270287,"approval":50,"support":0.4270287},{"time_hours":216,"approval_perbill":500000000,"support_perbill":4215851,"approval":50,"support":0.4215851},{"time_hours":217,"approval_perbill":500000000,"support_perbill":4161906,"approval":50,"support":0.4161906},{"time_hours":218,"approval_perbill":500000000,"support_perbill":4108444,"approval":50,"support":0.4108444},{"time_hours":219,"approval_perbill":500000000,"support_perbill":4055459,"approval":50,"support":0.4055459},{"time_hours":220,"approval_perbill":500000000,"support_perbill":4002944,"approval":50,"support":0.4002944},{"time_hours":221,"approval_perbill":500000000,"support_perbill":3950894,"approval":50,"support":0.3950894},{"time_hours":222,"approval_perbill":500000000,"support_perbill":3899302,"approval":50,"support":0.3899302},{"time_hours":223,"approval_perbill":500000000,"support_perbill":3848162,"approval":50,"support":0.3848162},{"time_hours":224,"approval_perbill":500000000,"support_perbill":3797468,"approval":50,"support":0.3797468},{"time_hours":225,"approval_perbill":500000000,"support_perbill":3747215,"approval":50,"support":0.3747215},{"time_hours":226,"approval_perbill":500000000,"support_perbill":3697396,"approval":50,"support":0.3697396},{"time_hours":227,"approval_perbill":500000000,"support_perbill":3648006,"approval":50,"support":0.3648006},{"time_hours":228,"approval_perbill":500000000,"support_perbill":3599040,"approval":50,"support":0.359904},{"time_hours":229,"approval_perbill":500000000,"support_perbill":3550492,"approval":50,"support":0.3550492},{"time_hours":230,"approval_perbill":500000000,"support_perbill":3502357,"approval":50,"support":0.3502357},{"time_hours":231,"approval_perbill":500000000,"support_perbill":3454629,"approval":50,"support":0.3454629},{"time_hours":232,"approval_perbill":500000000,"support_perbill":3407304,"approval":50,"support":0.3407304},{"time_hours":233,"approval_perbill":500000000,"support_perbill":3360376,"approval":50,"support":0.3360376},{"time_hours":234,"approval_perbill":500000000,"support_perbill":3313840,"approval":50,"support":0.331384},{"time_hours":235,"approval_perbill":500000000,"support_perbill":3267692,"approval":50,"support":0.3267692},{"time_hours":236,"approval_perbill":500000000,"support_perbill":3221926,"approval":50,"support":0.3221926},{"time_hours":237,"approval_perbill":500000000,"support_perbill":3176538,"approval":50,"support":0.3176538},{"time_hours":238,"approval_perbill":500000000,"support_perbill":3131524,"approval":50,"support":0.3131524},{"time_hours":239,"approval_perbill":500000000,"support_perbill":3086878,"approval":50,"support":0.3086878},{"time_hours":240,"approval_perbill":500000000,"support_perbill":3042596,"approval":50,"support":0.3042596},{"time_hours":241,"approval_perbill":500000000,"support_perbill":2998674,"approval":50,"support":0.2998674},{"time_hours":242,"approval_perbill":500000000,"support_perbill":2955107,"approval":50,"support":0.2955107},{"time_hours":243,"approval_perbill":500000000,"support_perbill":2911892,"approval":50,"support":0.2911892},{"time_hours":244,"approval_perbill":500000000,"support_perbill":2869023,"approval":50,"support":0.2869023},{"time_hours":245,"approval_perbill":500000000,"support_perbill":2826496,"approval":50,"support":0.2826496},{"time_hours":246,"approval_perbill":500000000,"support_perbill":2784309,"approval":50,"support":0.2784309},{"time_hours":247,"approval_perbill":500000000,"support_perbill":2742455,"approval":50,"support":0.2742455},{"time_hours":248,"approval_perbill":500000000,"support_perbill":2700933,"approval":50,"support":0.2700933},{"time_hours":249,"approval_perbill":500000000,"support_perbill":2659737,"approval":50,"support":0.2659737},{"time_hours":250,"approval_perbill":500000000,"support_perbill":2618864,"approval":50,"support":0.2618864},{"time_hours":251,"approval_perbill":500000000,"support_perbill":2578310,"approval":50,"support":0.257831},{"time_hours":252,"approval_perbill":500000000,"support_perbill":2538071,"approval":50,"support":0.2538071},{"time_hours":253,"approval_perbill":500000000,"support_perbill":2498144,"approval":50,"support":0.2498144},{"time_hours":254,"approval_perbill":500000000,"support_perbill":2458525,"approval":50,"support":0.2458525},{"time_hours":255,"approval_perbill":500000000,"support_perbill":2419210,"approval":50,"support":0.241921},{"time_hours":256,"approval_perbill":500000000,"support_perbill":2380197,"approval":50,"support":0.2380197},{"time_hours":257,"approval_perbill":500000000,"support_perbill":2341481,"approval":50,"support":0.2341481},{"time_hours":258,"approval_perbill":500000000,"support_perbill":2303059,"approval":50,"support":0.2303059},{"time_hours":259,"approval_perbill":500000000,"support_perbill":2264928,"approval":50,"support":0.2264928},{"time_hours":260,"approval_perbill":500000000,"support_perbill":2227084,"approval":50,"support":0.2227084},{"time_hours":261,"approval_perbill":500000000,"support_perbill":2189525,"approval":50,"support":0.2189525},{"time_hours":262,"approval_perbill":500000000,"support_perbill":2152247,"approval":50,"support":0.2152247},{"time_hours":263,"approval_perbill":500000000,"support_perbill":2115247,"approval":50,"support":0.2115247},{"time_hours":264,"approval_perbill":500000000,"support_perbill":2078522,"approval":50,"support":0.2078522},{"time_hours":265,"approval_perbill":500000000,"support_perbill":2042068,"approval":50,"support":0.2042068},{"time_hours":266,"approval_perbill":500000000,"support_perbill":2005884,"approval":50,"support":0.2005884},{"time_hours":267,"approval_perbill":500000000,"support_perbill":1969965,"approval":50,"support":0.1969965},{"time_hours":268,"approval_perbill":500000000,"support_perbill":1934309,"approval":50,"support":0.1934309},{"time_hours":269,"approval_perbill":500000000,"support_perbill":1898913,"approval":50,"support":0.1898913},{"time_hours":270,"approval_perbill":500000000,"support_perbill":1863775,"approval":50,"support":0.1863775},{"time_hours":271,"approval_perbill":500000000,"support_perbill":1828891,"approval":50,"support":0.1828891},{"time_hours":272,"approval_perbill":500000000,"support_perbill":1794258,"approval":50,"support":0.1794258},{"time_hours":273,"approval_perbill":500000000,"support_perbill":1759875,"approval":50,"support":0.1759875},{"time_hours":274,"approval_perbill":500000000,"support_perbill":1725737,"approval":50,"support":0.1725737},{"time_hours":275,"approval_perbill":500000000,"support_perbill":1691844,"approval":50,"support":0.1691844},{"time_hours":276,"approval_perbill":500000000,"support_perbill":1658191,"approval":50,"support":0.1658191},{"time_hours":277,"approval_perbill":500000000,"support_perbill":1624777,"approval":50,"support":0.1624777},{"time_hours":278,"approval_perbill":500000000,"support_perbill":1591599,"approval":50,"support":0.1591599},{"time_hours":279,"approval_perbill":500000000,"support_perbill":1558654,"approval":50,"support":0.1558654},{"time_hours":280,"approval_perbill":500000000,"support_perbill":1525941,"approval":50,"support":0.1525941},{"time_hours":281,"approval_perbill":500000000,"support_perbill":1493456,"approval":50,"support":0.1493456},{"time_hours":282,"approval_perbill":500000000,"support_perbill":1461197,"approval":50,"support":0.1461197},{"time_hours":283,"approval_perbill":500000000,"support_perbill":1429162,"approval":50,"support":0.1429162},{"time_hours":284,"approval_perbill":500000000,"support_perbill":1397348,"approval":50,"support":0.1397348},{"time_hours":285,"approval_perbill":500000000,"support_perbill":1365754,"approval":50,"support":0.1365754},{"time_hours":286,"approval_perbill":500000000,"support_perbill":1334377,"approval":50,"support":0.1334377},{"time_hours":287,"approval_perbill":500000000,"support_perbill":1303214,"approval":50,"support":0.1303214},{"time_hours":288,"approval_perbill":500000000,"support_perbill":1272264,"approval":50,"support":0.1272264},{"time_hours":289,"approval_perbill":500000000,"support_perbill":1241525,"approval":50,"support":0.1241525},{"time_hours":290,"approval_perbill":500000000,"support_perbill":1210994,"approval":50,"support":0.1210994},{"time_hours":291,"approval_perbill":500000000,"support_perbill":1180668,"approval":50,"support":0.1180668},{"time_hours":292,"approval_perbill":500000000,"support_perbill":1150547,"approval":50,"support":0.1150547},{"time_hours":293,"approval_perbill":500000000,"support_perbill":1120628,"approval":50,"support":0.1120628},{"time_hours":294,"approval_perbill":500000000,"support_perbill":1090909,"approval":50,"support":0.1090909},{"time_hours":295,"approval_perbill":500000000,"support_perbill":1061388,"approval":50,"support":0.1061388},{"time_hours":296,"approval_perbill":500000000,"support_perbill":1032063,"approval":50,"support":0.1032063},{"time_hours":297,"approval_perbill":500000000,"support_perbill":1002932,"approval":50,"support":0.1002932},{"time_hours":298,"approval_perbill":500000000,"support_perbill":973993,"approval":50,"support":0.0973993},{"time_hours":299,"approval_perbill":500000000,"support_perbill":945244,"approval":50,"support":0.0945244},{"time_hours":300,"approval_perbill":500000000,"support_perbill":916684,"approval":50,"support":0.0916684},{"time_hours":301,"approval_perbill":500000000,"support_perbill":888310,"approval":50,"support":0.088831},{"time_hours":302,"approval_perbill":500000000,"support_perbill":860121,"approval":50,"support":0.0860121},{"time_hours":303,"approval_perbill":500000000,"support_perbill":832114,"approval":50,"support":0.0832114},{"time_hours":304,"approval_perbill":500000000,"support_perbill":804289,"approval":50,"support":0.0804289},{"time_hours":305,"approval_perbill":500000000,"support_perbill":776644,"approval":50,"support":0.0776644},{"time_hours":306,"approval_perbill":500000000,"support_perbill":749176,"approval":50,"support":0.0749176},{"time_hours":307,"approval_perbill":500000000,"support_perbill":721884,"approval":50,"support":0.0721884},{"time_hours":308,"approval_perbill":500000000,"support_perbill":694766,"approval":50,"support":0.0694766},{"time_hours":309,"approval_perbill":500000000,"support_perbill":667821,"approval":50,"support":0.0667821},{"time_hours":310,"approval_perbill":500000000,"support_perbill":641047,"approval":50,"support":0.0641047},{"time_hours":311,"approval_perbill":500000000,"support_perbill":614442,"approval":50,"support":0.0614442},{"time_hours":312,"approval_perbill":500000000,"support_perbill":588005,"approval":50,"support":0.0588005},{"time_hours":313,"approval_perbill":500000000,"support_perbill":561734,"approval":50,"support":0.0561734},{"time_hours":314,"approval_perbill":500000000,"support_perbill":535627,"approval":50,"support":0.0535627},{"time_hours":315,"approval_perbill":500000000,"support_perbill":509684,"approval":50,"support":0.0509684},{"time_hours":316,"approval_perbill":500000000,"support_perbill":483902,"approval":50,"support":0.0483902},{"time_hours":317,"approval_perbill":500000000,"support_perbill":458280,"approval":50,"support":0.045828},{"time_hours":318,"approval_perbill":500000000,"support_perbill":432817,"approval":50,"support":0.0432817},{"time_hours":319,"approval_perbill":500000000,"support_perbill":407511,"approval":50,"support":0.0407511},{"time_hours":320,"approval_perbill":500000000,"support_perbill":382360,"approval":50,"support":0.038236},{"time_hours":321,"approval_perbill":500000000,"support_perbill":357364,"approval":50,"support":0.0357364},{"time_hours":322,"approval_perbill":500000000,"support_perbill":332520,"approval":50,"support":0.033252},{"time_hours":323,"approval_perbill":500000000,"support_perbill":307828,"approval":50,"support":0.0307828},{"time_hours":324,"approval_perbill":500000000,"support_perbill":283286,"approval":50,"support":0.0283286},{"time_hours":325,"approval_perbill":500000000,"support_perbill":258892,"approval":50,"support":0.0258892},{"time_hours":326,"approval_perbill":500000000,"support_perbill":234646,"approval":50,"support":0.0234646},{"time_hours":327,"approval_perbill":500000000,"support_perbill":210546,"approval":50,"support":0.0210546},{"time_hours":328,"approval_perbill":500000000,"support_perbill":186590,"approval":50,"support":0.018659},{"time_hours":329,"approval_perbill":500000000,"support_perbill":162778,"approval":50,"support":0.0162778},{"time_hours":330,"approval_perbill":500000000,"support_perbill":139108,"approval":50,"support":0.0139108},{"time_hours":331,"approval_perbill":500000000,"support_perbill":115578,"approval":50,"support":0.0115578},{"time_hours":332,"approval_perbill":500000000,"support_perbill":92188,"approval":50,"support":0.0092188},{"time_hours":333,"approval_perbill":500000000,"support_perbill":68937,"approval":50,"support":0.0068937},{"time_hours":334,"approval_perbill":500000000,"support_perbill":45822,"approval":50,"support":0.0045822},{"time_hours":335,"approval_perbill":500000000,"support_perbill":22844,"approval":50,"support":0.0022844},{"time_hours":336,"approval_perbill":500000000,"support_perbill":0,"approval":50,"support":0}]')},56041:p=>{"use strict";p.exports=JSON.parse('[{"time_hours":0,"approval_perbill":1000000000,"support_perbill":500000080,"approval":100,"support":50.000008},{"time_hours":1,"approval_perbill":995833334,"support_perbill":259488839,"approval":99.5833334,"support":25.9488839},{"time_hours":2,"approval_perbill":991666668,"support_perbill":174869164,"approval":99.1666668,"support":17.4869164},{"time_hours":3,"approval_perbill":987500001,"support_perbill":131672630,"approval":98.7500001,"support":13.167263},{"time_hours":4,"approval_perbill":983333335,"support_perbill":105463816,"approval":98.3333335,"support":10.5463816},{"time_hours":5,"approval_perbill":979166668,"support_perbill":87868351,"approval":97.9166668,"support":8.7868351},{"time_hours":6,"approval_perbill":975000002,"support_perbill":75239418,"approval":97.5000002,"support":7.5239418},{"time_hours":7,"approval_perbill":970833334,"support_perbill":65734281,"approval":97.0833334,"support":6.5734281},{"time_hours":8,"approval_perbill":966666668,"support_perbill":58321494,"approval":96.6666668,"support":5.8321494},{"time_hours":9,"approval_perbill":962500001,"support_perbill":52378676,"approval":96.2500001,"support":5.2378676},{"time_hours":10,"approval_perbill":958333335,"support_perbill":47508027,"approval":95.8333335,"support":4.7508027},{"time_hours":11,"approval_perbill":954166667,"support_perbill":43443400,"approval":95.4166667,"support":4.34434},{"time_hours":12,"approval_perbill":950000001,"support_perbill":40000010,"approval":95.0000001,"support":4.000001},{"time_hours":13,"approval_perbill":945833334,"support_perbill":37045541,"approval":94.5833334,"support":3.7045541},{"time_hours":14,"approval_perbill":941666668,"support_perbill":34482767,"approval":94.1666668,"support":3.4482767},{"time_hours":15,"approval_perbill":937500001,"support_perbill":32238633,"approval":93.7500001,"support":3.2238633},{"time_hours":16,"approval_perbill":933333335,"support_perbill":30257193,"approval":93.3333335,"support":3.0257193},{"time_hours":17,"approval_perbill":929166667,"support_perbill":28494870,"approval":92.9166667,"support":2.849487},{"time_hours":18,"approval_perbill":925000001,"support_perbill":26917223,"approval":92.5000001,"support":2.6917223},{"time_hours":19,"approval_perbill":920833334,"support_perbill":25496668,"approval":92.0833334,"support":2.5496668},{"time_hours":20,"approval_perbill":916666668,"support_perbill":24210854,"approval":91.6666668,"support":2.4210854},{"time_hours":21,"approval_perbill":912500000,"support_perbill":23041480,"approval":91.25,"support":2.304148},{"time_hours":22,"approval_perbill":908333334,"support_perbill":21973413,"approval":90.8333334,"support":2.1973413},{"time_hours":23,"approval_perbill":904166668,"support_perbill":20994035,"approval":90.4166668,"support":2.0994035},{"time_hours":24,"approval_perbill":900000001,"support_perbill":20092740,"approval":90.0000001,"support":2.009274},{"time_hours":25,"approval_perbill":895833335,"support_perbill":19260548,"approval":89.5833335,"support":1.9260548},{"time_hours":26,"approval_perbill":891666668,"support_perbill":18489805,"approval":89.1666668,"support":1.8489805},{"time_hours":27,"approval_perbill":887500002,"support_perbill":17773947,"approval":88.7500002,"support":1.7773947},{"time_hours":28,"approval_perbill":883333334,"support_perbill":17107313,"approval":88.3333334,"support":1.7107313},{"time_hours":29,"approval_perbill":879166668,"support_perbill":16484995,"approval":87.9166668,"support":1.6484995},{"time_hours":30,"approval_perbill":875000001,"support_perbill":15902716,"approval":87.5000001,"support":1.5902716},{"time_hours":31,"approval_perbill":870833335,"support_perbill":15356733,"approval":87.0833335,"support":1.5356733},{"time_hours":32,"approval_perbill":866666667,"support_perbill":14843753,"approval":86.6666667,"support":1.4843753},{"time_hours":33,"approval_perbill":862500001,"support_perbill":14360873,"approval":86.2500001,"support":1.4360873},{"time_hours":34,"approval_perbill":858333334,"support_perbill":13905519,"approval":85.8333334,"support":1.3905519},{"time_hours":35,"approval_perbill":854166668,"support_perbill":13475403,"approval":85.4166668,"support":1.3475403},{"time_hours":36,"approval_perbill":850000001,"support_perbill":13068482,"approval":85.0000001,"support":1.3068482},{"time_hours":37,"approval_perbill":845833335,"support_perbill":12682930,"approval":84.5833335,"support":1.268293},{"time_hours":38,"approval_perbill":841666667,"support_perbill":12317106,"approval":84.1666667,"support":1.2317106},{"time_hours":39,"approval_perbill":837500001,"support_perbill":11969535,"approval":83.7500001,"support":1.1969535},{"time_hours":40,"approval_perbill":833333334,"support_perbill":11638883,"approval":83.3333334,"support":1.1638883},{"time_hours":41,"approval_perbill":829166668,"support_perbill":11323944,"approval":82.9166668,"support":1.1323944},{"time_hours":42,"approval_perbill":825000000,"support_perbill":11023624,"approval":82.5,"support":1.1023624},{"time_hours":43,"approval_perbill":820833334,"support_perbill":10736929,"approval":82.0833334,"support":1.0736929},{"time_hours":44,"approval_perbill":816666668,"support_perbill":10462952,"approval":81.6666668,"support":1.0462952},{"time_hours":45,"approval_perbill":812500001,"support_perbill":10200864,"approval":81.2500001,"support":1.0200864},{"time_hours":46,"approval_perbill":808333335,"support_perbill":9949909,"approval":80.8333335,"support":0.9949909},{"time_hours":47,"approval_perbill":804166668,"support_perbill":9709392,"approval":80.4166668,"support":0.9709392},{"time_hours":48,"approval_perbill":800000002,"support_perbill":9478675,"approval":80.0000002,"support":0.9478675},{"time_hours":49,"approval_perbill":795833334,"support_perbill":9257171,"approval":79.5833334,"support":0.9257171},{"time_hours":50,"approval_perbill":791666668,"support_perbill":9044338,"approval":79.1666668,"support":0.9044338},{"time_hours":51,"approval_perbill":787500001,"support_perbill":8839678,"approval":78.7500001,"support":0.8839678},{"time_hours":52,"approval_perbill":783333335,"support_perbill":8642729,"approval":78.3333335,"support":0.8642729},{"time_hours":53,"approval_perbill":779166667,"support_perbill":8453062,"approval":77.9166667,"support":0.8453062},{"time_hours":54,"approval_perbill":775000001,"support_perbill":8270281,"approval":77.5000001,"support":0.8270281},{"time_hours":55,"approval_perbill":770833334,"support_perbill":8094019,"approval":77.0833334,"support":0.8094019},{"time_hours":56,"approval_perbill":766666668,"support_perbill":7923932,"approval":76.6666668,"support":0.7923932},{"time_hours":57,"approval_perbill":762500001,"support_perbill":7759701,"approval":76.2500001,"support":0.7759701},{"time_hours":58,"approval_perbill":758333335,"support_perbill":7601030,"approval":75.8333335,"support":0.760103},{"time_hours":59,"approval_perbill":754166667,"support_perbill":7447639,"approval":75.4166667,"support":0.7447639},{"time_hours":60,"approval_perbill":750000001,"support_perbill":7299272,"approval":75.0000001,"support":0.7299272},{"time_hours":61,"approval_perbill":745833334,"support_perbill":7155683,"approval":74.5833334,"support":0.7155683},{"time_hours":62,"approval_perbill":741666668,"support_perbill":7016647,"approval":74.1666668,"support":0.7016647},{"time_hours":63,"approval_perbill":737500000,"support_perbill":6881949,"approval":73.75,"support":0.6881949},{"time_hours":64,"approval_perbill":733333334,"support_perbill":6751391,"approval":73.3333334,"support":0.6751391},{"time_hours":65,"approval_perbill":729166668,"support_perbill":6624784,"approval":72.9166668,"support":0.6624784},{"time_hours":66,"approval_perbill":725000001,"support_perbill":6501952,"approval":72.5000001,"support":0.6501952},{"time_hours":67,"approval_perbill":720833335,"support_perbill":6382728,"approval":72.0833335,"support":0.6382728},{"time_hours":68,"approval_perbill":716666668,"support_perbill":6266955,"approval":71.6666668,"support":0.6266955},{"time_hours":69,"approval_perbill":712500002,"support_perbill":6154486,"approval":71.2500002,"support":0.6154486},{"time_hours":70,"approval_perbill":708333334,"support_perbill":6045181,"approval":70.8333334,"support":0.6045181},{"time_hours":71,"approval_perbill":704166668,"support_perbill":5938909,"approval":70.4166668,"support":0.5938909},{"time_hours":72,"approval_perbill":700000001,"support_perbill":5835545,"approval":70.0000001,"support":0.5835545},{"time_hours":73,"approval_perbill":695833335,"support_perbill":5734971,"approval":69.5833335,"support":0.5734971},{"time_hours":74,"approval_perbill":691666667,"support_perbill":5637077,"approval":69.1666667,"support":0.5637077},{"time_hours":75,"approval_perbill":687500001,"support_perbill":5541755,"approval":68.7500001,"support":0.5541755},{"time_hours":76,"approval_perbill":683333334,"support_perbill":5448907,"approval":68.3333334,"support":0.5448907},{"time_hours":77,"approval_perbill":679166668,"support_perbill":5358437,"approval":67.9166668,"support":0.5358437},{"time_hours":78,"approval_perbill":675000001,"support_perbill":5270255,"approval":67.5000001,"support":0.5270255},{"time_hours":79,"approval_perbill":670833335,"support_perbill":5184275,"approval":67.0833335,"support":0.5184275},{"time_hours":80,"approval_perbill":666666667,"support_perbill":5100415,"approval":66.6666667,"support":0.5100415},{"time_hours":81,"approval_perbill":662500001,"support_perbill":5018599,"approval":66.2500001,"support":0.5018599},{"time_hours":82,"approval_perbill":658333334,"support_perbill":4938753,"approval":65.8333334,"support":0.4938753},{"time_hours":83,"approval_perbill":654166668,"support_perbill":4860805,"approval":65.4166668,"support":0.4860805},{"time_hours":84,"approval_perbill":650000000,"support_perbill":4784690,"approval":65,"support":0.478469},{"time_hours":85,"approval_perbill":645833334,"support_perbill":4710343,"approval":64.5833334,"support":0.4710343},{"time_hours":86,"approval_perbill":641666668,"support_perbill":4637704,"approval":64.1666668,"support":0.4637704},{"time_hours":87,"approval_perbill":637500001,"support_perbill":4566713,"approval":63.7500001,"support":0.4566713},{"time_hours":88,"approval_perbill":633333335,"support_perbill":4497317,"approval":63.3333335,"support":0.4497317},{"time_hours":89,"approval_perbill":629166668,"support_perbill":4429461,"approval":62.9166668,"support":0.4429461},{"time_hours":90,"approval_perbill":625000002,"support_perbill":4363095,"approval":62.5000002,"support":0.4363095},{"time_hours":91,"approval_perbill":620833334,"support_perbill":4298171,"approval":62.0833334,"support":0.4298171},{"time_hours":92,"approval_perbill":616666668,"support_perbill":4234642,"approval":61.6666668,"support":0.4234642},{"time_hours":93,"approval_perbill":612500001,"support_perbill":4172462,"approval":61.2500001,"support":0.4172462},{"time_hours":94,"approval_perbill":608333335,"support_perbill":4111591,"approval":60.8333335,"support":0.4111591},{"time_hours":95,"approval_perbill":604166667,"support_perbill":4051987,"approval":60.4166667,"support":0.4051987},{"time_hours":96,"approval_perbill":600000001,"support_perbill":3993611,"approval":60.0000001,"support":0.3993611},{"time_hours":97,"approval_perbill":595833334,"support_perbill":3936425,"approval":59.5833334,"support":0.3936425},{"time_hours":98,"approval_perbill":591666668,"support_perbill":3880393,"approval":59.1666668,"support":0.3880393},{"time_hours":99,"approval_perbill":587500001,"support_perbill":3825481,"approval":58.7500001,"support":0.3825481},{"time_hours":100,"approval_perbill":583333335,"support_perbill":3771656,"approval":58.3333335,"support":0.3771656},{"time_hours":101,"approval_perbill":579166667,"support_perbill":3718885,"approval":57.9166667,"support":0.3718885},{"time_hours":102,"approval_perbill":575000001,"support_perbill":3667137,"approval":57.5000001,"support":0.3667137},{"time_hours":103,"approval_perbill":570833334,"support_perbill":3616385,"approval":57.0833334,"support":0.3616385},{"time_hours":104,"approval_perbill":566666668,"support_perbill":3566598,"approval":56.6666668,"support":0.3566598},{"time_hours":105,"approval_perbill":562500000,"support_perbill":3517749,"approval":56.25,"support":0.3517749},{"time_hours":106,"approval_perbill":558333334,"support_perbill":3469813,"approval":55.8333334,"support":0.3469813},{"time_hours":107,"approval_perbill":554166668,"support_perbill":3422764,"approval":55.4166668,"support":0.3422764},{"time_hours":108,"approval_perbill":550000001,"support_perbill":3376578,"approval":55.0000001,"support":0.3376578},{"time_hours":109,"approval_perbill":545833335,"support_perbill":3331230,"approval":54.5833335,"support":0.333123},{"time_hours":110,"approval_perbill":541666668,"support_perbill":3286700,"approval":54.1666668,"support":0.32867},{"time_hours":111,"approval_perbill":537500002,"support_perbill":3242963,"approval":53.7500002,"support":0.3242963},{"time_hours":112,"approval_perbill":533333334,"support_perbill":3200001,"approval":53.3333334,"support":0.3200001},{"time_hours":113,"approval_perbill":529166668,"support_perbill":3157791,"approval":52.9166668,"support":0.3157791},{"time_hours":114,"approval_perbill":525000001,"support_perbill":3116315,"approval":52.5000001,"support":0.3116315},{"time_hours":115,"approval_perbill":520833335,"support_perbill":3075553,"approval":52.0833335,"support":0.3075553},{"time_hours":116,"approval_perbill":516666667,"support_perbill":3035488,"approval":51.6666667,"support":0.3035488},{"time_hours":117,"approval_perbill":512500001,"support_perbill":2996101,"approval":51.2500001,"support":0.2996101},{"time_hours":118,"approval_perbill":508333334,"support_perbill":2957376,"approval":50.8333334,"support":0.2957376},{"time_hours":119,"approval_perbill":504166668,"support_perbill":2919296,"approval":50.4166668,"support":0.2919296},{"time_hours":120,"approval_perbill":500000000,"support_perbill":2881845,"approval":50,"support":0.2881845},{"time_hours":121,"approval_perbill":500000000,"support_perbill":2845007,"approval":50,"support":0.2845007},{"time_hours":122,"approval_perbill":500000000,"support_perbill":2808768,"approval":50,"support":0.2808768},{"time_hours":123,"approval_perbill":500000000,"support_perbill":2773113,"approval":50,"support":0.2773113},{"time_hours":124,"approval_perbill":500000000,"support_perbill":2738028,"approval":50,"support":0.2738028},{"time_hours":125,"approval_perbill":500000000,"support_perbill":2703500,"approval":50,"support":0.27035},{"time_hours":126,"approval_perbill":500000000,"support_perbill":2669515,"approval":50,"support":0.2669515},{"time_hours":127,"approval_perbill":500000000,"support_perbill":2636060,"approval":50,"support":0.263606},{"time_hours":128,"approval_perbill":500000000,"support_perbill":2603124,"approval":50,"support":0.2603124},{"time_hours":129,"approval_perbill":500000000,"support_perbill":2570694,"approval":50,"support":0.2570694},{"time_hours":130,"approval_perbill":500000000,"support_perbill":2538760,"approval":50,"support":0.253876},{"time_hours":131,"approval_perbill":500000000,"support_perbill":2507308,"approval":50,"support":0.2507308},{"time_hours":132,"approval_perbill":500000000,"support_perbill":2476330,"approval":50,"support":0.247633},{"time_hours":133,"approval_perbill":500000000,"support_perbill":2445813,"approval":50,"support":0.2445813},{"time_hours":134,"approval_perbill":500000000,"support_perbill":2415748,"approval":50,"support":0.2415748},{"time_hours":135,"approval_perbill":500000000,"support_perbill":2386125,"approval":50,"support":0.2386125},{"time_hours":136,"approval_perbill":500000000,"support_perbill":2356934,"approval":50,"support":0.2356934},{"time_hours":137,"approval_perbill":500000000,"support_perbill":2328166,"approval":50,"support":0.2328166},{"time_hours":138,"approval_perbill":500000000,"support_perbill":2299812,"approval":50,"support":0.2299812},{"time_hours":139,"approval_perbill":500000000,"support_perbill":2271863,"approval":50,"support":0.2271863},{"time_hours":140,"approval_perbill":500000000,"support_perbill":2244309,"approval":50,"support":0.2244309},{"time_hours":141,"approval_perbill":500000000,"support_perbill":2217144,"approval":50,"support":0.2217144},{"time_hours":142,"approval_perbill":500000000,"support_perbill":2190358,"approval":50,"support":0.2190358},{"time_hours":143,"approval_perbill":500000000,"support_perbill":2163944,"approval":50,"support":0.2163944},{"time_hours":144,"approval_perbill":500000000,"support_perbill":2137894,"approval":50,"support":0.2137894},{"time_hours":145,"approval_perbill":500000000,"support_perbill":2112201,"approval":50,"support":0.2112201},{"time_hours":146,"approval_perbill":500000000,"support_perbill":2086857,"approval":50,"support":0.2086857},{"time_hours":147,"approval_perbill":500000000,"support_perbill":2061856,"approval":50,"support":0.2061856},{"time_hours":148,"approval_perbill":500000000,"support_perbill":2037190,"approval":50,"support":0.203719},{"time_hours":149,"approval_perbill":500000000,"support_perbill":2012852,"approval":50,"support":0.2012852},{"time_hours":150,"approval_perbill":500000000,"support_perbill":1988837,"approval":50,"support":0.1988837},{"time_hours":151,"approval_perbill":500000000,"support_perbill":1965138,"approval":50,"support":0.1965138},{"time_hours":152,"approval_perbill":500000000,"support_perbill":1941748,"approval":50,"support":0.1941748},{"time_hours":153,"approval_perbill":500000000,"support_perbill":1918662,"approval":50,"support":0.1918662},{"time_hours":154,"approval_perbill":500000000,"support_perbill":1895873,"approval":50,"support":0.1895873},{"time_hours":155,"approval_perbill":500000000,"support_perbill":1873377,"approval":50,"support":0.1873377},{"time_hours":156,"approval_perbill":500000000,"support_perbill":1851166,"approval":50,"support":0.1851166},{"time_hours":157,"approval_perbill":500000000,"support_perbill":1829237,"approval":50,"support":0.1829237},{"time_hours":158,"approval_perbill":500000000,"support_perbill":1807584,"approval":50,"support":0.1807584},{"time_hours":159,"approval_perbill":500000000,"support_perbill":1786201,"approval":50,"support":0.1786201},{"time_hours":160,"approval_perbill":500000000,"support_perbill":1765084,"approval":50,"support":0.1765084},{"time_hours":161,"approval_perbill":500000000,"support_perbill":1744227,"approval":50,"support":0.1744227},{"time_hours":162,"approval_perbill":500000000,"support_perbill":1723626,"approval":50,"support":0.1723626},{"time_hours":163,"approval_perbill":500000000,"support_perbill":1703276,"approval":50,"support":0.1703276},{"time_hours":164,"approval_perbill":500000000,"support_perbill":1683172,"approval":50,"support":0.1683172},{"time_hours":165,"approval_perbill":500000000,"support_perbill":1663311,"approval":50,"support":0.1663311},{"time_hours":166,"approval_perbill":500000000,"support_perbill":1643687,"approval":50,"support":0.1643687},{"time_hours":167,"approval_perbill":500000000,"support_perbill":1624297,"approval":50,"support":0.1624297},{"time_hours":168,"approval_perbill":500000000,"support_perbill":1605137,"approval":50,"support":0.1605137},{"time_hours":169,"approval_perbill":500000000,"support_perbill":1586201,"approval":50,"support":0.1586201},{"time_hours":170,"approval_perbill":500000000,"support_perbill":1567487,"approval":50,"support":0.1567487},{"time_hours":171,"approval_perbill":500000000,"support_perbill":1548990,"approval":50,"support":0.154899},{"time_hours":172,"approval_perbill":500000000,"support_perbill":1530708,"approval":50,"support":0.1530708},{"time_hours":173,"approval_perbill":500000000,"support_perbill":1512635,"approval":50,"support":0.1512635},{"time_hours":174,"approval_perbill":500000000,"support_perbill":1494768,"approval":50,"support":0.1494768},{"time_hours":175,"approval_perbill":500000000,"support_perbill":1477105,"approval":50,"support":0.1477105},{"time_hours":176,"approval_perbill":500000000,"support_perbill":1459641,"approval":50,"support":0.1459641},{"time_hours":177,"approval_perbill":500000000,"support_perbill":1442373,"approval":50,"support":0.1442373},{"time_hours":178,"approval_perbill":500000000,"support_perbill":1425298,"approval":50,"support":0.1425298},{"time_hours":179,"approval_perbill":500000000,"support_perbill":1408413,"approval":50,"support":0.1408413},{"time_hours":180,"approval_perbill":500000000,"support_perbill":1391714,"approval":50,"support":0.1391714},{"time_hours":181,"approval_perbill":500000000,"support_perbill":1375199,"approval":50,"support":0.1375199},{"time_hours":182,"approval_perbill":500000000,"support_perbill":1358864,"approval":50,"support":0.1358864},{"time_hours":183,"approval_perbill":500000000,"support_perbill":1342706,"approval":50,"support":0.1342706},{"time_hours":184,"approval_perbill":500000000,"support_perbill":1326723,"approval":50,"support":0.1326723},{"time_hours":185,"approval_perbill":500000000,"support_perbill":1310912,"approval":50,"support":0.1310912},{"time_hours":186,"approval_perbill":500000000,"support_perbill":1295270,"approval":50,"support":0.129527},{"time_hours":187,"approval_perbill":500000000,"support_perbill":1279794,"approval":50,"support":0.1279794},{"time_hours":188,"approval_perbill":500000000,"support_perbill":1264482,"approval":50,"support":0.1264482},{"time_hours":189,"approval_perbill":500000000,"support_perbill":1249331,"approval":50,"support":0.1249331},{"time_hours":190,"approval_perbill":500000000,"support_perbill":1234338,"approval":50,"support":0.1234338},{"time_hours":191,"approval_perbill":500000000,"support_perbill":1219502,"approval":50,"support":0.1219502},{"time_hours":192,"approval_perbill":500000000,"support_perbill":1204819,"approval":50,"support":0.1204819},{"time_hours":193,"approval_perbill":500000000,"support_perbill":1190288,"approval":50,"support":0.1190288},{"time_hours":194,"approval_perbill":500000000,"support_perbill":1175906,"approval":50,"support":0.1175906},{"time_hours":195,"approval_perbill":500000000,"support_perbill":1161670,"approval":50,"support":0.116167},{"time_hours":196,"approval_perbill":500000000,"support_perbill":1147579,"approval":50,"support":0.1147579},{"time_hours":197,"approval_perbill":500000000,"support_perbill":1133630,"approval":50,"support":0.113363},{"time_hours":198,"approval_perbill":500000000,"support_perbill":1119821,"approval":50,"support":0.1119821},{"time_hours":199,"approval_perbill":500000000,"support_perbill":1106150,"approval":50,"support":0.110615},{"time_hours":200,"approval_perbill":500000000,"support_perbill":1092615,"approval":50,"support":0.1092615},{"time_hours":201,"approval_perbill":500000000,"support_perbill":1079214,"approval":50,"support":0.1079214},{"time_hours":202,"approval_perbill":500000000,"support_perbill":1065945,"approval":50,"support":0.1065945},{"time_hours":203,"approval_perbill":500000000,"support_perbill":1052807,"approval":50,"support":0.1052807},{"time_hours":204,"approval_perbill":500000000,"support_perbill":1039796,"approval":50,"support":0.1039796},{"time_hours":205,"approval_perbill":500000000,"support_perbill":1026911,"approval":50,"support":0.1026911},{"time_hours":206,"approval_perbill":500000000,"support_perbill":1014151,"approval":50,"support":0.1014151},{"time_hours":207,"approval_perbill":500000000,"support_perbill":1001514,"approval":50,"support":0.1001514},{"time_hours":208,"approval_perbill":500000000,"support_perbill":988997,"approval":50,"support":0.0988997},{"time_hours":209,"approval_perbill":500000000,"support_perbill":976600,"approval":50,"support":0.09766},{"time_hours":210,"approval_perbill":500000000,"support_perbill":964320,"approval":50,"support":0.096432},{"time_hours":211,"approval_perbill":500000000,"support_perbill":952156,"approval":50,"support":0.0952156},{"time_hours":212,"approval_perbill":500000000,"support_perbill":940106,"approval":50,"support":0.0940106},{"time_hours":213,"approval_perbill":500000000,"support_perbill":928169,"approval":50,"support":0.0928169},{"time_hours":214,"approval_perbill":500000000,"support_perbill":916342,"approval":50,"support":0.0916342},{"time_hours":215,"approval_perbill":500000000,"support_perbill":904626,"approval":50,"support":0.0904626},{"time_hours":216,"approval_perbill":500000000,"support_perbill":893017,"approval":50,"support":0.0893017},{"time_hours":217,"approval_perbill":500000000,"support_perbill":881514,"approval":50,"support":0.0881514},{"time_hours":218,"approval_perbill":500000000,"support_perbill":870117,"approval":50,"support":0.0870117},{"time_hours":219,"approval_perbill":500000000,"support_perbill":858823,"approval":50,"support":0.0858823},{"time_hours":220,"approval_perbill":500000000,"support_perbill":847631,"approval":50,"support":0.0847631},{"time_hours":221,"approval_perbill":500000000,"support_perbill":836540,"approval":50,"support":0.083654},{"time_hours":222,"approval_perbill":500000000,"support_perbill":825549,"approval":50,"support":0.0825549},{"time_hours":223,"approval_perbill":500000000,"support_perbill":814655,"approval":50,"support":0.0814655},{"time_hours":224,"approval_perbill":500000000,"support_perbill":803858,"approval":50,"support":0.0803858},{"time_hours":225,"approval_perbill":500000000,"support_perbill":793157,"approval":50,"support":0.0793157},{"time_hours":226,"approval_perbill":500000000,"support_perbill":782550,"approval":50,"support":0.078255},{"time_hours":227,"approval_perbill":500000000,"support_perbill":772037,"approval":50,"support":0.0772037},{"time_hours":228,"approval_perbill":500000000,"support_perbill":761615,"approval":50,"support":0.0761615},{"time_hours":229,"approval_perbill":500000000,"support_perbill":751283,"approval":50,"support":0.0751283},{"time_hours":230,"approval_perbill":500000000,"support_perbill":741041,"approval":50,"support":0.0741041},{"time_hours":231,"approval_perbill":500000000,"support_perbill":730887,"approval":50,"support":0.0730887},{"time_hours":232,"approval_perbill":500000000,"support_perbill":720821,"approval":50,"support":0.0720821},{"time_hours":233,"approval_perbill":500000000,"support_perbill":710840,"approval":50,"support":0.071084},{"time_hours":234,"approval_perbill":500000000,"support_perbill":700944,"approval":50,"support":0.0700944},{"time_hours":235,"approval_perbill":500000000,"support_perbill":691132,"approval":50,"support":0.0691132},{"time_hours":236,"approval_perbill":500000000,"support_perbill":681403,"approval":50,"support":0.0681403},{"time_hours":237,"approval_perbill":500000000,"support_perbill":671756,"approval":50,"support":0.0671756},{"time_hours":238,"approval_perbill":500000000,"support_perbill":662189,"approval":50,"support":0.0662189},{"time_hours":239,"approval_perbill":500000000,"support_perbill":652702,"approval":50,"support":0.0652702},{"time_hours":240,"approval_perbill":500000000,"support_perbill":643294,"approval":50,"support":0.0643294},{"time_hours":241,"approval_perbill":500000000,"support_perbill":633963,"approval":50,"support":0.0633963},{"time_hours":242,"approval_perbill":500000000,"support_perbill":624709,"approval":50,"support":0.0624709},{"time_hours":243,"approval_perbill":500000000,"support_perbill":615531,"approval":50,"support":0.0615531},{"time_hours":244,"approval_perbill":500000000,"support_perbill":606428,"approval":50,"support":0.0606428},{"time_hours":245,"approval_perbill":500000000,"support_perbill":597399,"approval":50,"support":0.0597399},{"time_hours":246,"approval_perbill":500000000,"support_perbill":588443,"approval":50,"support":0.0588443},{"time_hours":247,"approval_perbill":500000000,"support_perbill":579559,"approval":50,"support":0.0579559},{"time_hours":248,"approval_perbill":500000000,"support_perbill":570747,"approval":50,"support":0.0570747},{"time_hours":249,"approval_perbill":500000000,"support_perbill":562005,"approval":50,"support":0.0562005},{"time_hours":250,"approval_perbill":500000000,"support_perbill":553332,"approval":50,"support":0.0553332},{"time_hours":251,"approval_perbill":500000000,"support_perbill":544729,"approval":50,"support":0.0544729},{"time_hours":252,"approval_perbill":500000000,"support_perbill":536193,"approval":50,"support":0.0536193},{"time_hours":253,"approval_perbill":500000000,"support_perbill":527725,"approval":50,"support":0.0527725},{"time_hours":254,"approval_perbill":500000000,"support_perbill":519322,"approval":50,"support":0.0519322},{"time_hours":255,"approval_perbill":500000000,"support_perbill":510986,"approval":50,"support":0.0510986},{"time_hours":256,"approval_perbill":500000000,"support_perbill":502715,"approval":50,"support":0.0502715},{"time_hours":257,"approval_perbill":500000000,"support_perbill":494507,"approval":50,"support":0.0494507},{"time_hours":258,"approval_perbill":500000000,"support_perbill":486363,"approval":50,"support":0.0486363},{"time_hours":259,"approval_perbill":500000000,"support_perbill":478282,"approval":50,"support":0.0478282},{"time_hours":260,"approval_perbill":500000000,"support_perbill":470262,"approval":50,"support":0.0470262},{"time_hours":261,"approval_perbill":500000000,"support_perbill":462304,"approval":50,"support":0.0462304},{"time_hours":262,"approval_perbill":500000000,"support_perbill":454406,"approval":50,"support":0.0454406},{"time_hours":263,"approval_perbill":500000000,"support_perbill":446568,"approval":50,"support":0.0446568},{"time_hours":264,"approval_perbill":500000000,"support_perbill":438789,"approval":50,"support":0.0438789},{"time_hours":265,"approval_perbill":500000000,"support_perbill":431068,"approval":50,"support":0.0431068},{"time_hours":266,"approval_perbill":500000000,"support_perbill":423406,"approval":50,"support":0.0423406},{"time_hours":267,"approval_perbill":500000000,"support_perbill":415800,"approval":50,"support":0.04158},{"time_hours":268,"approval_perbill":500000000,"support_perbill":408251,"approval":50,"support":0.0408251},{"time_hours":269,"approval_perbill":500000000,"support_perbill":400758,"approval":50,"support":0.0400758},{"time_hours":270,"approval_perbill":500000000,"support_perbill":393321,"approval":50,"support":0.0393321},{"time_hours":271,"approval_perbill":500000000,"support_perbill":385937,"approval":50,"support":0.0385937},{"time_hours":272,"approval_perbill":500000000,"support_perbill":378608,"approval":50,"support":0.0378608},{"time_hours":273,"approval_perbill":500000000,"support_perbill":371333,"approval":50,"support":0.0371333},{"time_hours":274,"approval_perbill":500000000,"support_perbill":364110,"approval":50,"support":0.036411},{"time_hours":275,"approval_perbill":500000000,"support_perbill":356940,"approval":50,"support":0.035694},{"time_hours":276,"approval_perbill":500000000,"support_perbill":349821,"approval":50,"support":0.0349821},{"time_hours":277,"approval_perbill":500000000,"support_perbill":342754,"approval":50,"support":0.0342754},{"time_hours":278,"approval_perbill":500000000,"support_perbill":335737,"approval":50,"support":0.0335737},{"time_hours":279,"approval_perbill":500000000,"support_perbill":328771,"approval":50,"support":0.0328771},{"time_hours":280,"approval_perbill":500000000,"support_perbill":321854,"approval":50,"support":0.0321854},{"time_hours":281,"approval_perbill":500000000,"support_perbill":314986,"approval":50,"support":0.0314986},{"time_hours":282,"approval_perbill":500000000,"support_perbill":308166,"approval":50,"support":0.0308166},{"time_hours":283,"approval_perbill":500000000,"support_perbill":301395,"approval":50,"support":0.0301395},{"time_hours":284,"approval_perbill":500000000,"support_perbill":294671,"approval":50,"support":0.0294671},{"time_hours":285,"approval_perbill":500000000,"support_perbill":287994,"approval":50,"support":0.0287994},{"time_hours":286,"approval_perbill":500000000,"support_perbill":281363,"approval":50,"support":0.0281363},{"time_hours":287,"approval_perbill":500000000,"support_perbill":274779,"approval":50,"support":0.0274779},{"time_hours":288,"approval_perbill":500000000,"support_perbill":268240,"approval":50,"support":0.026824},{"time_hours":289,"approval_perbill":500000000,"support_perbill":261746,"approval":50,"support":0.0261746},{"time_hours":290,"approval_perbill":500000000,"support_perbill":255297,"approval":50,"support":0.0255297},{"time_hours":291,"approval_perbill":500000000,"support_perbill":248892,"approval":50,"support":0.0248892},{"time_hours":292,"approval_perbill":500000000,"support_perbill":242531,"approval":50,"support":0.0242531},{"time_hours":293,"approval_perbill":500000000,"support_perbill":236213,"approval":50,"support":0.0236213},{"time_hours":294,"approval_perbill":500000000,"support_perbill":229938,"approval":50,"support":0.0229938},{"time_hours":295,"approval_perbill":500000000,"support_perbill":223705,"approval":50,"support":0.0223705},{"time_hours":296,"approval_perbill":500000000,"support_perbill":217514,"approval":50,"support":0.0217514},{"time_hours":297,"approval_perbill":500000000,"support_perbill":211365,"approval":50,"support":0.0211365},{"time_hours":298,"approval_perbill":500000000,"support_perbill":205257,"approval":50,"support":0.0205257},{"time_hours":299,"approval_perbill":500000000,"support_perbill":199189,"approval":50,"support":0.0199189},{"time_hours":300,"approval_perbill":500000000,"support_perbill":193162,"approval":50,"support":0.0193162},{"time_hours":301,"approval_perbill":500000000,"support_perbill":187175,"approval":50,"support":0.0187175},{"time_hours":302,"approval_perbill":500000000,"support_perbill":181227,"approval":50,"support":0.0181227},{"time_hours":303,"approval_perbill":500000000,"support_perbill":175318,"approval":50,"support":0.0175318},{"time_hours":304,"approval_perbill":500000000,"support_perbill":169448,"approval":50,"support":0.0169448},{"time_hours":305,"approval_perbill":500000000,"support_perbill":163617,"approval":50,"support":0.0163617},{"time_hours":306,"approval_perbill":500000000,"support_perbill":157823,"approval":50,"support":0.0157823},{"time_hours":307,"approval_perbill":500000000,"support_perbill":152067,"approval":50,"support":0.0152067},{"time_hours":308,"approval_perbill":500000000,"support_perbill":146348,"approval":50,"support":0.0146348},{"time_hours":309,"approval_perbill":500000000,"support_perbill":140667,"approval":50,"support":0.0140667},{"time_hours":310,"approval_perbill":500000000,"support_perbill":135021,"approval":50,"support":0.0135021},{"time_hours":311,"approval_perbill":500000000,"support_perbill":129412,"approval":50,"support":0.0129412},{"time_hours":312,"approval_perbill":500000000,"support_perbill":123839,"approval":50,"support":0.0123839},{"time_hours":313,"approval_perbill":500000000,"support_perbill":118301,"approval":50,"support":0.0118301},{"time_hours":314,"approval_perbill":500000000,"support_perbill":112798,"approval":50,"support":0.0112798},{"time_hours":315,"approval_perbill":500000000,"support_perbill":107330,"approval":50,"support":0.010733},{"time_hours":316,"approval_perbill":500000000,"support_perbill":101897,"approval":50,"support":0.0101897},{"time_hours":317,"approval_perbill":500000000,"support_perbill":96498,"approval":50,"support":0.0096498},{"time_hours":318,"approval_perbill":500000000,"support_perbill":91133,"approval":50,"support":0.0091133},{"time_hours":319,"approval_perbill":500000000,"support_perbill":85801,"approval":50,"support":0.0085801},{"time_hours":320,"approval_perbill":500000000,"support_perbill":80502,"approval":50,"support":0.0080502},{"time_hours":321,"approval_perbill":500000000,"support_perbill":75236,"approval":50,"support":0.0075236},{"time_hours":322,"approval_perbill":500000000,"support_perbill":70003,"approval":50,"support":0.0070003},{"time_hours":323,"approval_perbill":500000000,"support_perbill":64802,"approval":50,"support":0.0064802},{"time_hours":324,"approval_perbill":500000000,"support_perbill":59634,"approval":50,"support":0.0059634},{"time_hours":325,"approval_perbill":500000000,"support_perbill":54496,"approval":50,"support":0.0054496},{"time_hours":326,"approval_perbill":500000000,"support_perbill":49391,"approval":50,"support":0.0049391},{"time_hours":327,"approval_perbill":500000000,"support_perbill":44316,"approval":50,"support":0.0044316},{"time_hours":328,"approval_perbill":500000000,"support_perbill":39272,"approval":50,"support":0.0039272},{"time_hours":329,"approval_perbill":500000000,"support_perbill":34259,"approval":50,"support":0.0034259},{"time_hours":330,"approval_perbill":500000000,"support_perbill":29276,"approval":50,"support":0.0029276},{"time_hours":331,"approval_perbill":500000000,"support_perbill":24323,"approval":50,"support":0.0024323},{"time_hours":332,"approval_perbill":500000000,"support_perbill":19400,"approval":50,"support":0.00194},{"time_hours":333,"approval_perbill":500000000,"support_perbill":14507,"approval":50,"support":0.0014507},{"time_hours":334,"approval_perbill":500000000,"support_perbill":9642,"approval":50,"support":0.0009642},{"time_hours":335,"approval_perbill":500000000,"support_perbill":4807,"approval":50,"support":0.0004807},{"time_hours":336,"approval_perbill":500000000,"support_perbill":0,"approval":50,"support":0}]')},90398:p=>{"use strict";p.exports=JSON.parse('[{"time_hours":0,"approval_perbill":1000000000,"support_perbill":500000000,"approval":100,"support":50},{"time_hours":1,"approval_perbill":994100296,"support_perbill":498511905,"approval":99.4100296,"support":49.8511905},{"time_hours":2,"approval_perbill":988304096,"support_perbill":497023810,"approval":98.8304096,"support":49.702381},{"time_hours":3,"approval_perbill":982608697,"support_perbill":495535715,"approval":98.2608697,"support":49.5535715},{"time_hours":4,"approval_perbill":977011496,"support_perbill":494047620,"approval":97.7011496,"support":49.404762},{"time_hours":5,"approval_perbill":971509972,"support_perbill":492559524,"approval":97.1509972,"support":49.2559524},{"time_hours":6,"approval_perbill":966101697,"support_perbill":491071429,"approval":96.6101697,"support":49.1071429},{"time_hours":7,"approval_perbill":960784315,"support_perbill":489583334,"approval":96.0784315,"support":48.9583334},{"time_hours":8,"approval_perbill":955555557,"support_perbill":488095239,"approval":95.5555557,"support":48.8095239},{"time_hours":9,"approval_perbill":950413224,"support_perbill":486607143,"approval":95.0413224,"support":48.6607143},{"time_hours":10,"approval_perbill":945355193,"support_perbill":485119048,"approval":94.5355193,"support":48.5119048},{"time_hours":11,"approval_perbill":940379404,"support_perbill":483630953,"approval":94.0379404,"support":48.3630953},{"time_hours":12,"approval_perbill":935483872,"support_perbill":482142858,"approval":93.5483872,"support":48.2142858},{"time_hours":13,"approval_perbill":930666667,"support_perbill":480654762,"approval":93.0666667,"support":48.0654762},{"time_hours":14,"approval_perbill":925925927,"support_perbill":479166667,"approval":92.5925927,"support":47.9166667},{"time_hours":15,"approval_perbill":921259843,"support_perbill":477678572,"approval":92.1259843,"support":47.7678572},{"time_hours":16,"approval_perbill":916666668,"support_perbill":476190477,"approval":91.6666668,"support":47.6190477},{"time_hours":17,"approval_perbill":912144703,"support_perbill":474702381,"approval":91.2144703,"support":47.4702381},{"time_hours":18,"approval_perbill":907692309,"support_perbill":473214286,"approval":90.7692309,"support":47.3214286},{"time_hours":19,"approval_perbill":903307888,"support_perbill":471726191,"approval":90.3307888,"support":47.1726191},{"time_hours":20,"approval_perbill":898989900,"support_perbill":470238096,"approval":89.89899,"support":47.0238096},{"time_hours":21,"approval_perbill":894736842,"support_perbill":468750000,"approval":89.4736842,"support":46.875},{"time_hours":22,"approval_perbill":890547265,"support_perbill":467261905,"approval":89.0547265,"support":46.7261905},{"time_hours":23,"approval_perbill":886419755,"support_perbill":465773810,"approval":88.6419755,"support":46.577381},{"time_hours":24,"approval_perbill":882352942,"support_perbill":464285715,"approval":88.2352942,"support":46.4285715},{"time_hours":25,"approval_perbill":878345500,"support_perbill":462797620,"approval":87.83455,"support":46.279762},{"time_hours":26,"approval_perbill":874396136,"support_perbill":461309524,"approval":87.4396136,"support":46.1309524},{"time_hours":27,"approval_perbill":870503599,"support_perbill":459821429,"approval":87.0503599,"support":45.9821429},{"time_hours":28,"approval_perbill":866666667,"support_perbill":458333334,"approval":86.6666667,"support":45.8333334},{"time_hours":29,"approval_perbill":862884162,"support_perbill":456845239,"approval":86.2884162,"support":45.6845239},{"time_hours":30,"approval_perbill":859154930,"support_perbill":455357143,"approval":85.915493,"support":45.5357143},{"time_hours":31,"approval_perbill":855477857,"support_perbill":453869048,"approval":85.5477857,"support":45.3869048},{"time_hours":32,"approval_perbill":851851852,"support_perbill":452380953,"approval":85.1851852,"support":45.2380953},{"time_hours":33,"approval_perbill":848275863,"support_perbill":450892858,"approval":84.8275863,"support":45.0892858},{"time_hours":34,"approval_perbill":844748859,"support_perbill":449404762,"approval":84.4748859,"support":44.9404762},{"time_hours":35,"approval_perbill":841269842,"support_perbill":447916667,"approval":84.1269842,"support":44.7916667},{"time_hours":36,"approval_perbill":837837838,"support_perbill":446428572,"approval":83.7837838,"support":44.6428572},{"time_hours":37,"approval_perbill":834451903,"support_perbill":444940477,"approval":83.4451903,"support":44.4940477},{"time_hours":38,"approval_perbill":831111112,"support_perbill":443452381,"approval":83.1111112,"support":44.3452381},{"time_hours":39,"approval_perbill":827814570,"support_perbill":441964286,"approval":82.781457,"support":44.1964286},{"time_hours":40,"approval_perbill":824561404,"support_perbill":440476191,"approval":82.4561404,"support":44.0476191},{"time_hours":41,"approval_perbill":821350763,"support_perbill":438988096,"approval":82.1350763,"support":43.8988096},{"time_hours":42,"approval_perbill":818181818,"support_perbill":437500000,"approval":81.8181818,"support":43.75},{"time_hours":43,"approval_perbill":815053764,"support_perbill":436011905,"approval":81.5053764,"support":43.6011905},{"time_hours":44,"approval_perbill":811965813,"support_perbill":434523810,"approval":81.1965813,"support":43.452381},{"time_hours":45,"approval_perbill":808917198,"support_perbill":433035715,"approval":80.8917198,"support":43.3035715},{"time_hours":46,"approval_perbill":805907174,"support_perbill":431547620,"approval":80.5907174,"support":43.154762},{"time_hours":47,"approval_perbill":802935011,"support_perbill":430059524,"approval":80.2935011,"support":43.0059524},{"time_hours":48,"approval_perbill":800000001,"support_perbill":428571429,"approval":80.0000001,"support":42.8571429},{"time_hours":49,"approval_perbill":797101450,"support_perbill":427083334,"approval":79.710145,"support":42.7083334},{"time_hours":50,"approval_perbill":794238684,"support_perbill":425595239,"approval":79.4238684,"support":42.5595239},{"time_hours":51,"approval_perbill":791411043,"support_perbill":424107143,"approval":79.1411043,"support":42.4107143},{"time_hours":52,"approval_perbill":788617887,"support_perbill":422619048,"approval":78.8617887,"support":42.2619048},{"time_hours":53,"approval_perbill":785858586,"support_perbill":421130953,"approval":78.5858586,"support":42.1130953},{"time_hours":54,"approval_perbill":783132531,"support_perbill":419642858,"approval":78.3132531,"support":41.9642858},{"time_hours":55,"approval_perbill":780439122,"support_perbill":418154762,"approval":78.0439122,"support":41.8154762},{"time_hours":56,"approval_perbill":777777779,"support_perbill":416666667,"approval":77.7777779,"support":41.6666667},{"time_hours":57,"approval_perbill":775147929,"support_perbill":415178572,"approval":77.5147929,"support":41.5178572},{"time_hours":58,"approval_perbill":772549020,"support_perbill":413690477,"approval":77.254902,"support":41.3690477},{"time_hours":59,"approval_perbill":769980507,"support_perbill":412202381,"approval":76.9980507,"support":41.2202381},{"time_hours":60,"approval_perbill":767441861,"support_perbill":410714286,"approval":76.7441861,"support":41.0714286},{"time_hours":61,"approval_perbill":764932563,"support_perbill":409226191,"approval":76.4932563,"support":40.9226191},{"time_hours":62,"approval_perbill":762452108,"support_perbill":407738096,"approval":76.2452108,"support":40.7738096},{"time_hours":63,"approval_perbill":760000000,"support_perbill":406250000,"approval":76,"support":40.625},{"time_hours":64,"approval_perbill":757575758,"support_perbill":404761905,"approval":75.7575758,"support":40.4761905},{"time_hours":65,"approval_perbill":755178909,"support_perbill":403273810,"approval":75.5178909,"support":40.327381},{"time_hours":66,"approval_perbill":752808989,"support_perbill":401785715,"approval":75.2808989,"support":40.1785715},{"time_hours":67,"approval_perbill":750465550,"support_perbill":400297620,"approval":75.046555,"support":40.029762},{"time_hours":68,"approval_perbill":748148149,"support_perbill":398809524,"approval":74.8148149,"support":39.8809524},{"time_hours":69,"approval_perbill":745856354,"support_perbill":397321429,"approval":74.5856354,"support":39.7321429},{"time_hours":70,"approval_perbill":743589744,"support_perbill":395833334,"approval":74.3589744,"support":39.5833334},{"time_hours":71,"approval_perbill":741347906,"support_perbill":394345239,"approval":74.1347906,"support":39.4345239},{"time_hours":72,"approval_perbill":739130435,"support_perbill":392857143,"approval":73.9130435,"support":39.2857143},{"time_hours":73,"approval_perbill":736936938,"support_perbill":391369048,"approval":73.6936938,"support":39.1369048},{"time_hours":74,"approval_perbill":734767025,"support_perbill":389880953,"approval":73.4767025,"support":38.9880953},{"time_hours":75,"approval_perbill":732620322,"support_perbill":388392858,"approval":73.2620322,"support":38.8392858},{"time_hours":76,"approval_perbill":730496454,"support_perbill":386904762,"approval":73.0496454,"support":38.6904762},{"time_hours":77,"approval_perbill":728395062,"support_perbill":385416667,"approval":72.8395062,"support":38.5416667},{"time_hours":78,"approval_perbill":726315790,"support_perbill":383928572,"approval":72.631579,"support":38.3928572},{"time_hours":79,"approval_perbill":724258290,"support_perbill":382440477,"approval":72.425829,"support":38.2440477},{"time_hours":80,"approval_perbill":722222222,"support_perbill":380952381,"approval":72.2222222,"support":38.0952381},{"time_hours":81,"approval_perbill":720207254,"support_perbill":379464286,"approval":72.0207254,"support":37.9464286},{"time_hours":82,"approval_perbill":718213059,"support_perbill":377976191,"approval":71.8213059,"support":37.7976191},{"time_hours":83,"approval_perbill":716239317,"support_perbill":376488096,"approval":71.6239317,"support":37.6488096},{"time_hours":84,"approval_perbill":714285714,"support_perbill":375000000,"approval":71.4285714,"support":37.5},{"time_hours":85,"approval_perbill":712351946,"support_perbill":373511905,"approval":71.2351946,"support":37.3511905},{"time_hours":86,"approval_perbill":710437711,"support_perbill":372023810,"approval":71.0437711,"support":37.202381},{"time_hours":87,"approval_perbill":708542714,"support_perbill":370535715,"approval":70.8542714,"support":37.0535715},{"time_hours":88,"approval_perbill":706666667,"support_perbill":369047620,"approval":70.6666667,"support":36.904762},{"time_hours":89,"approval_perbill":704809287,"support_perbill":367559524,"approval":70.4809287,"support":36.7559524},{"time_hours":90,"approval_perbill":702970298,"support_perbill":366071429,"approval":70.2970298,"support":36.6071429},{"time_hours":91,"approval_perbill":701149426,"support_perbill":364583334,"approval":70.1149426,"support":36.4583334},{"time_hours":92,"approval_perbill":699346406,"support_perbill":363095239,"approval":69.9346406,"support":36.3095239},{"time_hours":93,"approval_perbill":697560976,"support_perbill":361607143,"approval":69.7560976,"support":36.1607143},{"time_hours":94,"approval_perbill":695792881,"support_perbill":360119048,"approval":69.5792881,"support":36.0119048},{"time_hours":95,"approval_perbill":694041868,"support_perbill":358630953,"approval":69.4041868,"support":35.8630953},{"time_hours":96,"approval_perbill":692307693,"support_perbill":357142858,"approval":69.2307693,"support":35.7142858},{"time_hours":97,"approval_perbill":690590112,"support_perbill":355654762,"approval":69.0590112,"support":35.5654762},{"time_hours":98,"approval_perbill":688888889,"support_perbill":354166667,"approval":68.8888889,"support":35.4166667},{"time_hours":99,"approval_perbill":687203792,"support_perbill":352678572,"approval":68.7203792,"support":35.2678572},{"time_hours":100,"approval_perbill":685534592,"support_perbill":351190477,"approval":68.5534592,"support":35.1190477},{"time_hours":101,"approval_perbill":683881064,"support_perbill":349702381,"approval":68.3881064,"support":34.9702381},{"time_hours":102,"approval_perbill":682242991,"support_perbill":348214286,"approval":68.2242991,"support":34.8214286},{"time_hours":103,"approval_perbill":680620155,"support_perbill":346726191,"approval":68.0620155,"support":34.6726191},{"time_hours":104,"approval_perbill":679012346,"support_perbill":345238096,"approval":67.9012346,"support":34.5238096},{"time_hours":105,"approval_perbill":677419355,"support_perbill":343750000,"approval":67.7419355,"support":34.375},{"time_hours":106,"approval_perbill":675840979,"support_perbill":342261905,"approval":67.5840979,"support":34.2261905},{"time_hours":107,"approval_perbill":674277017,"support_perbill":340773810,"approval":67.4277017,"support":34.077381},{"time_hours":108,"approval_perbill":672727273,"support_perbill":339285715,"approval":67.2727273,"support":33.9285715},{"time_hours":109,"approval_perbill":671191554,"support_perbill":337797620,"approval":67.1191554,"support":33.779762},{"time_hours":110,"approval_perbill":669669670,"support_perbill":336309524,"approval":66.966967,"support":33.6309524},{"time_hours":111,"approval_perbill":668161435,"support_perbill":334821429,"approval":66.8161435,"support":33.4821429},{"time_hours":112,"approval_perbill":666666667,"support_perbill":333333334,"approval":66.6666667,"support":33.3333334},{"time_hours":113,"approval_perbill":665185186,"support_perbill":331845239,"approval":66.5185186,"support":33.1845239},{"time_hours":114,"approval_perbill":663716814,"support_perbill":330357143,"approval":66.3716814,"support":33.0357143},{"time_hours":115,"approval_perbill":662261381,"support_perbill":328869048,"approval":66.2261381,"support":32.8869048},{"time_hours":116,"approval_perbill":660818714,"support_perbill":327380953,"approval":66.0818714,"support":32.7380953},{"time_hours":117,"approval_perbill":659388647,"support_perbill":325892858,"approval":65.9388647,"support":32.5892858},{"time_hours":118,"approval_perbill":657971015,"support_perbill":324404762,"approval":65.7971015,"support":32.4404762},{"time_hours":119,"approval_perbill":656565657,"support_perbill":322916667,"approval":65.6565657,"support":32.2916667},{"time_hours":120,"approval_perbill":655172414,"support_perbill":321428572,"approval":65.5172414,"support":32.1428572},{"time_hours":121,"approval_perbill":653791130,"support_perbill":319940477,"approval":65.379113,"support":31.9940477},{"time_hours":122,"approval_perbill":652421652,"support_perbill":318452381,"approval":65.2421652,"support":31.8452381},{"time_hours":123,"approval_perbill":651063830,"support_perbill":316964286,"approval":65.106383,"support":31.6964286},{"time_hours":124,"approval_perbill":649717514,"support_perbill":315476191,"approval":64.9717514,"support":31.5476191},{"time_hours":125,"approval_perbill":648382560,"support_perbill":313988096,"approval":64.838256,"support":31.3988096},{"time_hours":126,"approval_perbill":647058823,"support_perbill":312500000,"approval":64.7058823,"support":31.25},{"time_hours":127,"approval_perbill":645746165,"support_perbill":311011905,"approval":64.5746165,"support":31.1011905},{"time_hours":128,"approval_perbill":644444445,"support_perbill":309523810,"approval":64.4444445,"support":30.952381},{"time_hours":129,"approval_perbill":643153527,"support_perbill":308035715,"approval":64.3153527,"support":30.8035715},{"time_hours":130,"approval_perbill":641873279,"support_perbill":306547620,"approval":64.1873279,"support":30.654762},{"time_hours":131,"approval_perbill":640603567,"support_perbill":305059524,"approval":64.0603567,"support":30.5059524},{"time_hours":132,"approval_perbill":639344263,"support_perbill":303571429,"approval":63.9344263,"support":30.3571429},{"time_hours":133,"approval_perbill":638095238,"support_perbill":302083334,"approval":63.8095238,"support":30.2083334},{"time_hours":134,"approval_perbill":636856369,"support_perbill":300595239,"approval":63.6856369,"support":30.0595239},{"time_hours":135,"approval_perbill":635627530,"support_perbill":299107143,"approval":63.562753,"support":29.9107143},{"time_hours":136,"approval_perbill":634408602,"support_perbill":297619048,"approval":63.4408602,"support":29.7619048},{"time_hours":137,"approval_perbill":633199465,"support_perbill":296130953,"approval":63.3199465,"support":29.6130953},{"time_hours":138,"approval_perbill":632000000,"support_perbill":294642858,"approval":63.2,"support":29.4642858},{"time_hours":139,"approval_perbill":630810093,"support_perbill":293154762,"approval":63.0810093,"support":29.3154762},{"time_hours":140,"approval_perbill":629629630,"support_perbill":291666667,"approval":62.962963,"support":29.1666667},{"time_hours":141,"approval_perbill":628458498,"support_perbill":290178572,"approval":62.8458498,"support":29.0178572},{"time_hours":142,"approval_perbill":627296588,"support_perbill":288690477,"approval":62.7296588,"support":28.8690477},{"time_hours":143,"approval_perbill":626143791,"support_perbill":287202381,"approval":62.6143791,"support":28.7202381},{"time_hours":144,"approval_perbill":625000000,"support_perbill":285714286,"approval":62.5,"support":28.5714286},{"time_hours":145,"approval_perbill":623865110,"support_perbill":284226191,"approval":62.386511,"support":28.4226191},{"time_hours":146,"approval_perbill":622739018,"support_perbill":282738096,"approval":62.2739018,"support":28.2738096},{"time_hours":147,"approval_perbill":621621621,"support_perbill":281250000,"approval":62.1621621,"support":28.125},{"time_hours":148,"approval_perbill":620512821,"support_perbill":279761905,"approval":62.0512821,"support":27.9761905},{"time_hours":149,"approval_perbill":619412516,"support_perbill":278273810,"approval":61.9412516,"support":27.827381},{"time_hours":150,"approval_perbill":618320611,"support_perbill":276785715,"approval":61.8320611,"support":27.6785715},{"time_hours":151,"approval_perbill":617237009,"support_perbill":275297620,"approval":61.7237009,"support":27.529762},{"time_hours":152,"approval_perbill":616161616,"support_perbill":273809524,"approval":61.6161616,"support":27.3809524},{"time_hours":153,"approval_perbill":615094340,"support_perbill":272321429,"approval":61.509434,"support":27.2321429},{"time_hours":154,"approval_perbill":614035088,"support_perbill":270833334,"approval":61.4035088,"support":27.0833334},{"time_hours":155,"approval_perbill":612983770,"support_perbill":269345239,"approval":61.298377,"support":26.9345239},{"time_hours":156,"approval_perbill":611940298,"support_perbill":267857143,"approval":61.1940298,"support":26.7857143},{"time_hours":157,"approval_perbill":610904585,"support_perbill":266369048,"approval":61.0904585,"support":26.6369048},{"time_hours":158,"approval_perbill":609876543,"support_perbill":264880953,"approval":60.9876543,"support":26.4880953},{"time_hours":159,"approval_perbill":608856089,"support_perbill":263392858,"approval":60.8856089,"support":26.3392858},{"time_hours":160,"approval_perbill":607843137,"support_perbill":261904762,"approval":60.7843137,"support":26.1904762},{"time_hours":161,"approval_perbill":606837607,"support_perbill":260416667,"approval":60.6837607,"support":26.0416667},{"time_hours":162,"approval_perbill":605839416,"support_perbill":258928572,"approval":60.5839416,"support":25.8928572},{"time_hours":163,"approval_perbill":604848485,"support_perbill":257440477,"approval":60.4848485,"support":25.7440477},{"time_hours":164,"approval_perbill":603864734,"support_perbill":255952381,"approval":60.3864734,"support":25.5952381},{"time_hours":165,"approval_perbill":602888087,"support_perbill":254464286,"approval":60.2888087,"support":25.4464286},{"time_hours":166,"approval_perbill":601918465,"support_perbill":252976191,"approval":60.1918465,"support":25.2976191},{"time_hours":167,"approval_perbill":600955794,"support_perbill":251488096,"approval":60.0955794,"support":25.1488096},{"time_hours":168,"approval_perbill":600000000,"support_perbill":250000000,"approval":60,"support":25},{"time_hours":169,"approval_perbill":599051008,"support_perbill":248511905,"approval":59.9051008,"support":24.8511905},{"time_hours":170,"approval_perbill":598108747,"support_perbill":247023810,"approval":59.8108747,"support":24.702381},{"time_hours":171,"approval_perbill":597173145,"support_perbill":245535715,"approval":59.7173145,"support":24.5535715},{"time_hours":172,"approval_perbill":596244131,"support_perbill":244047620,"approval":59.6244131,"support":24.404762},{"time_hours":173,"approval_perbill":595321637,"support_perbill":242559524,"approval":59.5321637,"support":24.2559524},{"time_hours":174,"approval_perbill":594405594,"support_perbill":241071429,"approval":59.4405594,"support":24.1071429},{"time_hours":175,"approval_perbill":593495935,"support_perbill":239583334,"approval":59.3495935,"support":23.9583334},{"time_hours":176,"approval_perbill":592592593,"support_perbill":238095239,"approval":59.2592593,"support":23.8095239},{"time_hours":177,"approval_perbill":591695502,"support_perbill":236607143,"approval":59.1695502,"support":23.6607143},{"time_hours":178,"approval_perbill":590804598,"support_perbill":235119048,"approval":59.0804598,"support":23.5119048},{"time_hours":179,"approval_perbill":589919817,"support_perbill":233630953,"approval":58.9919817,"support":23.3630953},{"time_hours":180,"approval_perbill":589041096,"support_perbill":232142858,"approval":58.9041096,"support":23.2142858},{"time_hours":181,"approval_perbill":588168373,"support_perbill":230654762,"approval":58.8168373,"support":23.0654762},{"time_hours":182,"approval_perbill":587301587,"support_perbill":229166667,"approval":58.7301587,"support":22.9166667},{"time_hours":183,"approval_perbill":586440678,"support_perbill":227678572,"approval":58.6440678,"support":22.7678572},{"time_hours":184,"approval_perbill":585585585,"support_perbill":226190477,"approval":58.5585585,"support":22.6190477},{"time_hours":185,"approval_perbill":584736251,"support_perbill":224702381,"approval":58.4736251,"support":22.4702381},{"time_hours":186,"approval_perbill":583892617,"support_perbill":223214286,"approval":58.3892617,"support":22.3214286},{"time_hours":187,"approval_perbill":583054626,"support_perbill":221726191,"approval":58.3054626,"support":22.1726191},{"time_hours":188,"approval_perbill":582222222,"support_perbill":220238096,"approval":58.2222222,"support":22.0238096},{"time_hours":189,"approval_perbill":581395349,"support_perbill":218750000,"approval":58.1395349,"support":21.875},{"time_hours":190,"approval_perbill":580573951,"support_perbill":217261905,"approval":58.0573951,"support":21.7261905},{"time_hours":191,"approval_perbill":579757976,"support_perbill":215773810,"approval":57.9757976,"support":21.577381},{"time_hours":192,"approval_perbill":578947368,"support_perbill":214285715,"approval":57.8947368,"support":21.4285715},{"time_hours":193,"approval_perbill":578142076,"support_perbill":212797620,"approval":57.8142076,"support":21.279762},{"time_hours":194,"approval_perbill":577342048,"support_perbill":211309524,"approval":57.7342048,"support":21.1309524},{"time_hours":195,"approval_perbill":576547231,"support_perbill":209821429,"approval":57.6547231,"support":20.9821429},{"time_hours":196,"approval_perbill":575757576,"support_perbill":208333334,"approval":57.5757576,"support":20.8333334},{"time_hours":197,"approval_perbill":574973031,"support_perbill":206845239,"approval":57.4973031,"support":20.6845239},{"time_hours":198,"approval_perbill":574193548,"support_perbill":205357143,"approval":57.4193548,"support":20.5357143},{"time_hours":199,"approval_perbill":573419078,"support_perbill":203869048,"approval":57.3419078,"support":20.3869048},{"time_hours":200,"approval_perbill":572649572,"support_perbill":202380953,"approval":57.2649572,"support":20.2380953},{"time_hours":201,"approval_perbill":571884984,"support_perbill":200892858,"approval":57.1884984,"support":20.0892858},{"time_hours":202,"approval_perbill":571125265,"support_perbill":199404762,"approval":57.1125265,"support":19.9404762},{"time_hours":203,"approval_perbill":570370370,"support_perbill":197916667,"approval":57.037037,"support":19.7916667},{"time_hours":204,"approval_perbill":569620253,"support_perbill":196428572,"approval":56.9620253,"support":19.6428572},{"time_hours":205,"approval_perbill":568874868,"support_perbill":194940477,"approval":56.8874868,"support":19.4940477},{"time_hours":206,"approval_perbill":568134172,"support_perbill":193452381,"approval":56.8134172,"support":19.3452381},{"time_hours":207,"approval_perbill":567398119,"support_perbill":191964286,"approval":56.7398119,"support":19.1964286},{"time_hours":208,"approval_perbill":566666666,"support_perbill":190476191,"approval":56.6666666,"support":19.0476191},{"time_hours":209,"approval_perbill":565939771,"support_perbill":188988096,"approval":56.5939771,"support":18.8988096},{"time_hours":210,"approval_perbill":565217391,"support_perbill":187500000,"approval":56.5217391,"support":18.75},{"time_hours":211,"approval_perbill":564499484,"support_perbill":186011905,"approval":56.4499484,"support":18.6011905},{"time_hours":212,"approval_perbill":563786008,"support_perbill":184523810,"approval":56.3786008,"support":18.452381},{"time_hours":213,"approval_perbill":563076923,"support_perbill":183035715,"approval":56.3076923,"support":18.3035715},{"time_hours":214,"approval_perbill":562372188,"support_perbill":181547620,"approval":56.2372188,"support":18.154762},{"time_hours":215,"approval_perbill":561671763,"support_perbill":180059524,"approval":56.1671763,"support":18.0059524},{"time_hours":216,"approval_perbill":560975610,"support_perbill":178571429,"approval":56.097561,"support":17.8571429},{"time_hours":217,"approval_perbill":560283688,"support_perbill":177083334,"approval":56.0283688,"support":17.7083334},{"time_hours":218,"approval_perbill":559595959,"support_perbill":175595239,"approval":55.9595959,"support":17.5595239},{"time_hours":219,"approval_perbill":558912386,"support_perbill":174107143,"approval":55.8912386,"support":17.4107143},{"time_hours":220,"approval_perbill":558232931,"support_perbill":172619048,"approval":55.8232931,"support":17.2619048},{"time_hours":221,"approval_perbill":557557557,"support_perbill":171130953,"approval":55.7557557,"support":17.1130953},{"time_hours":222,"approval_perbill":556886227,"support_perbill":169642858,"approval":55.6886227,"support":16.9642858},{"time_hours":223,"approval_perbill":556218905,"support_perbill":168154762,"approval":55.6218905,"support":16.8154762},{"time_hours":224,"approval_perbill":555555555,"support_perbill":166666667,"approval":55.5555555,"support":16.6666667},{"time_hours":225,"approval_perbill":554896142,"support_perbill":165178572,"approval":55.4896142,"support":16.5178572},{"time_hours":226,"approval_perbill":554240631,"support_perbill":163690477,"approval":55.4240631,"support":16.3690477},{"time_hours":227,"approval_perbill":553588987,"support_perbill":162202381,"approval":55.3588987,"support":16.2202381},{"time_hours":228,"approval_perbill":552941176,"support_perbill":160714286,"approval":55.2941176,"support":16.0714286},{"time_hours":229,"approval_perbill":552297165,"support_perbill":159226191,"approval":55.2297165,"support":15.9226191},{"time_hours":230,"approval_perbill":551656920,"support_perbill":157738096,"approval":55.165692,"support":15.7738096},{"time_hours":231,"approval_perbill":551020408,"support_perbill":156250000,"approval":55.1020408,"support":15.625},{"time_hours":232,"approval_perbill":550387597,"support_perbill":154761905,"approval":55.0387597,"support":15.4761905},{"time_hours":233,"approval_perbill":549758454,"support_perbill":153273810,"approval":54.9758454,"support":15.327381},{"time_hours":234,"approval_perbill":549132948,"support_perbill":151785715,"approval":54.9132948,"support":15.1785715},{"time_hours":235,"approval_perbill":548511047,"support_perbill":150297620,"approval":54.8511047,"support":15.029762},{"time_hours":236,"approval_perbill":547892720,"support_perbill":148809524,"approval":54.789272,"support":14.8809524},{"time_hours":237,"approval_perbill":547277937,"support_perbill":147321429,"approval":54.7277937,"support":14.7321429},{"time_hours":238,"approval_perbill":546666666,"support_perbill":145833334,"approval":54.6666666,"support":14.5833334},{"time_hours":239,"approval_perbill":546058879,"support_perbill":144345239,"approval":54.6058879,"support":14.4345239},{"time_hours":240,"approval_perbill":545454545,"support_perbill":142857143,"approval":54.5454545,"support":14.2857143},{"time_hours":241,"approval_perbill":544853635,"support_perbill":141369048,"approval":54.4853635,"support":14.1369048},{"time_hours":242,"approval_perbill":544256120,"support_perbill":139880953,"approval":54.425612,"support":13.9880953},{"time_hours":243,"approval_perbill":543661971,"support_perbill":138392858,"approval":54.3661971,"support":13.8392858},{"time_hours":244,"approval_perbill":543071161,"support_perbill":136904762,"approval":54.3071161,"support":13.6904762},{"time_hours":245,"approval_perbill":542483660,"support_perbill":135416667,"approval":54.248366,"support":13.5416667},{"time_hours":246,"approval_perbill":541899441,"support_perbill":133928572,"approval":54.1899441,"support":13.3928572},{"time_hours":247,"approval_perbill":541318477,"support_perbill":132440477,"approval":54.1318477,"support":13.2440477},{"time_hours":248,"approval_perbill":540740740,"support_perbill":130952381,"approval":54.074074,"support":13.0952381},{"time_hours":249,"approval_perbill":540166205,"support_perbill":129464286,"approval":54.0166205,"support":12.9464286},{"time_hours":250,"approval_perbill":539594843,"support_perbill":127976191,"approval":53.9594843,"support":12.7976191},{"time_hours":251,"approval_perbill":539026630,"support_perbill":126488096,"approval":53.902663,"support":12.6488096},{"time_hours":252,"approval_perbill":538461538,"support_perbill":125000000,"approval":53.8461538,"support":12.5},{"time_hours":253,"approval_perbill":537899543,"support_perbill":123511905,"approval":53.7899543,"support":12.3511905},{"time_hours":254,"approval_perbill":537340619,"support_perbill":122023810,"approval":53.7340619,"support":12.202381},{"time_hours":255,"approval_perbill":536784741,"support_perbill":120535715,"approval":53.6784741,"support":12.0535715},{"time_hours":256,"approval_perbill":536231884,"support_perbill":119047620,"approval":53.6231884,"support":11.904762},{"time_hours":257,"approval_perbill":535682023,"support_perbill":117559524,"approval":53.5682023,"support":11.7559524},{"time_hours":258,"approval_perbill":535135135,"support_perbill":116071429,"approval":53.5135135,"support":11.6071429},{"time_hours":259,"approval_perbill":534591195,"support_perbill":114583334,"approval":53.4591195,"support":11.4583334},{"time_hours":260,"approval_perbill":534050179,"support_perbill":113095239,"approval":53.4050179,"support":11.3095239},{"time_hours":261,"approval_perbill":533512064,"support_perbill":111607143,"approval":53.3512064,"support":11.1607143},{"time_hours":262,"approval_perbill":532976827,"support_perbill":110119048,"approval":53.2976827,"support":11.0119048},{"time_hours":263,"approval_perbill":532444444,"support_perbill":108630953,"approval":53.2444444,"support":10.8630953},{"time_hours":264,"approval_perbill":531914893,"support_perbill":107142858,"approval":53.1914893,"support":10.7142858},{"time_hours":265,"approval_perbill":531388152,"support_perbill":105654762,"approval":53.1388152,"support":10.5654762},{"time_hours":266,"approval_perbill":530864197,"support_perbill":104166667,"approval":53.0864197,"support":10.4166667},{"time_hours":267,"approval_perbill":530343007,"support_perbill":102678572,"approval":53.0343007,"support":10.2678572},{"time_hours":268,"approval_perbill":529824561,"support_perbill":101190477,"approval":52.9824561,"support":10.1190477},{"time_hours":269,"approval_perbill":529308836,"support_perbill":99702381,"approval":52.9308836,"support":9.9702381},{"time_hours":270,"approval_perbill":528795811,"support_perbill":98214286,"approval":52.8795811,"support":9.8214286},{"time_hours":271,"approval_perbill":528285465,"support_perbill":96726191,"approval":52.8285465,"support":9.6726191},{"time_hours":272,"approval_perbill":527777777,"support_perbill":95238096,"approval":52.7777777,"support":9.5238096},{"time_hours":273,"approval_perbill":527272727,"support_perbill":93750000,"approval":52.7272727,"support":9.375},{"time_hours":274,"approval_perbill":526770293,"support_perbill":92261905,"approval":52.6770293,"support":9.2261905},{"time_hours":275,"approval_perbill":526270456,"support_perbill":90773810,"approval":52.6270456,"support":9.077381},{"time_hours":276,"approval_perbill":525773195,"support_perbill":89285715,"approval":52.5773195,"support":8.9285715},{"time_hours":277,"approval_perbill":525278491,"support_perbill":87797620,"approval":52.5278491,"support":8.779762},{"time_hours":278,"approval_perbill":524786324,"support_perbill":86309524,"approval":52.4786324,"support":8.6309524},{"time_hours":279,"approval_perbill":524296675,"support_perbill":84821429,"approval":52.4296675,"support":8.4821429},{"time_hours":280,"approval_perbill":523809523,"support_perbill":83333334,"approval":52.3809523,"support":8.3333334},{"time_hours":281,"approval_perbill":523324851,"support_perbill":81845239,"approval":52.3324851,"support":8.1845239},{"time_hours":282,"approval_perbill":522842639,"support_perbill":80357143,"approval":52.2842639,"support":8.0357143},{"time_hours":283,"approval_perbill":522362869,"support_perbill":78869048,"approval":52.2362869,"support":7.8869048},{"time_hours":284,"approval_perbill":521885521,"support_perbill":77380953,"approval":52.1885521,"support":7.7380953},{"time_hours":285,"approval_perbill":521410579,"support_perbill":75892858,"approval":52.1410579,"support":7.5892858},{"time_hours":286,"approval_perbill":520938023,"support_perbill":74404762,"approval":52.0938023,"support":7.4404762},{"time_hours":287,"approval_perbill":520467836,"support_perbill":72916667,"approval":52.0467836,"support":7.2916667},{"time_hours":288,"approval_perbill":519999999,"support_perbill":71428572,"approval":51.9999999,"support":7.1428572},{"time_hours":289,"approval_perbill":519534497,"support_perbill":69940477,"approval":51.9534497,"support":6.9940477},{"time_hours":290,"approval_perbill":519071310,"support_perbill":68452381,"approval":51.907131,"support":6.8452381},{"time_hours":291,"approval_perbill":518610421,"support_perbill":66964286,"approval":51.8610421,"support":6.6964286},{"time_hours":292,"approval_perbill":518151815,"support_perbill":65476191,"approval":51.8151815,"support":6.5476191},{"time_hours":293,"approval_perbill":517695473,"support_perbill":63988096,"approval":51.7695473,"support":6.3988096},{"time_hours":294,"approval_perbill":517241379,"support_perbill":62500000,"approval":51.7241379,"support":6.25},{"time_hours":295,"approval_perbill":516789516,"support_perbill":61011905,"approval":51.6789516,"support":6.1011905},{"time_hours":296,"approval_perbill":516339869,"support_perbill":59523810,"approval":51.6339869,"support":5.952381},{"time_hours":297,"approval_perbill":515892420,"support_perbill":58035715,"approval":51.589242,"support":5.8035715},{"time_hours":298,"approval_perbill":515447154,"support_perbill":56547620,"approval":51.5447154,"support":5.654762},{"time_hours":299,"approval_perbill":515004055,"support_perbill":55059524,"approval":51.5004055,"support":5.5059524},{"time_hours":300,"approval_perbill":514563106,"support_perbill":53571429,"approval":51.4563106,"support":5.3571429},{"time_hours":301,"approval_perbill":514124293,"support_perbill":52083334,"approval":51.4124293,"support":5.2083334},{"time_hours":302,"approval_perbill":513687600,"support_perbill":50595239,"approval":51.36876,"support":5.0595239},{"time_hours":303,"approval_perbill":513253011,"support_perbill":49107143,"approval":51.3253011,"support":4.9107143},{"time_hours":304,"approval_perbill":512820512,"support_perbill":47619048,"approval":51.2820512,"support":4.7619048},{"time_hours":305,"approval_perbill":512390087,"support_perbill":46130953,"approval":51.2390087,"support":4.6130953},{"time_hours":306,"approval_perbill":511961722,"support_perbill":44642858,"approval":51.1961722,"support":4.4642858},{"time_hours":307,"approval_perbill":511535401,"support_perbill":43154762,"approval":51.1535401,"support":4.3154762},{"time_hours":308,"approval_perbill":511111111,"support_perbill":41666667,"approval":51.1111111,"support":4.1666667},{"time_hours":309,"approval_perbill":510688835,"support_perbill":40178572,"approval":51.0688835,"support":4.0178572},{"time_hours":310,"approval_perbill":510268562,"support_perbill":38690477,"approval":51.0268562,"support":3.8690477},{"time_hours":311,"approval_perbill":509850275,"support_perbill":37202381,"approval":50.9850275,"support":3.7202381},{"time_hours":312,"approval_perbill":509433962,"support_perbill":35714286,"approval":50.9433962,"support":3.5714286},{"time_hours":313,"approval_perbill":509019607,"support_perbill":34226191,"approval":50.9019607,"support":3.4226191},{"time_hours":314,"approval_perbill":508607198,"support_perbill":32738096,"approval":50.8607198,"support":3.2738096},{"time_hours":315,"approval_perbill":508196721,"support_perbill":31250000,"approval":50.8196721,"support":3.125},{"time_hours":316,"approval_perbill":507788161,"support_perbill":29761905,"approval":50.7788161,"support":2.9761905},{"time_hours":317,"approval_perbill":507381507,"support_perbill":28273810,"approval":50.7381507,"support":2.827381},{"time_hours":318,"approval_perbill":506976744,"support_perbill":26785715,"approval":50.6976744,"support":2.6785715},{"time_hours":319,"approval_perbill":506573859,"support_perbill":25297620,"approval":50.6573859,"support":2.529762},{"time_hours":320,"approval_perbill":506172839,"support_perbill":23809524,"approval":50.6172839,"support":2.3809524},{"time_hours":321,"approval_perbill":505773671,"support_perbill":22321429,"approval":50.5773671,"support":2.2321429},{"time_hours":322,"approval_perbill":505376343,"support_perbill":20833334,"approval":50.5376343,"support":2.0833334},{"time_hours":323,"approval_perbill":504980842,"support_perbill":19345239,"approval":50.4980842,"support":1.9345239},{"time_hours":324,"approval_perbill":504587155,"support_perbill":17857143,"approval":50.4587155,"support":1.7857143},{"time_hours":325,"approval_perbill":504195270,"support_perbill":16369048,"approval":50.419527,"support":1.6369048},{"time_hours":326,"approval_perbill":503805174,"support_perbill":14880953,"approval":50.3805174,"support":1.4880953},{"time_hours":327,"approval_perbill":503416856,"support_perbill":13392858,"approval":50.3416856,"support":1.3392858},{"time_hours":328,"approval_perbill":503030302,"support_perbill":11904762,"approval":50.3030302,"support":1.1904762},{"time_hours":329,"approval_perbill":502645502,"support_perbill":10416667,"approval":50.2645502,"support":1.0416667},{"time_hours":330,"approval_perbill":502262443,"support_perbill":8928572,"approval":50.2262443,"support":0.8928572},{"time_hours":331,"approval_perbill":501881113,"support_perbill":7440477,"approval":50.1881113,"support":0.7440477},{"time_hours":332,"approval_perbill":501501501,"support_perbill":5952381,"approval":50.1501501,"support":0.5952381},{"time_hours":333,"approval_perbill":501123595,"support_perbill":4464286,"approval":50.1123595,"support":0.4464286},{"time_hours":334,"approval_perbill":500747383,"support_perbill":2976191,"approval":50.0747383,"support":0.2976191},{"time_hours":335,"approval_perbill":500372855,"support_perbill":1488096,"approval":50.0372855,"support":0.1488096},{"time_hours":336,"approval_perbill":499999999,"support_perbill":0,"approval":49.9999999,"support":0}]')},39046:p=>{"use strict";p.exports=JSON.parse('[{"time_hours":0,"approval_perbill":999999999,"support_perbill":499999995,"approval":99.9999999,"support":49.9999995},{"time_hours":1,"approval_perbill":994734815,"support_perbill":437532142,"approval":99.4734815,"support":43.7532142},{"time_hours":2,"approval_perbill":989548816,"support_perbill":390045264,"approval":98.9548816,"support":39.0045264},{"time_hours":3,"approval_perbill":984440228,"support_perbill":352727281,"approval":98.4440228,"support":35.2727281},{"time_hours":4,"approval_perbill":979407334,"support_perbill":322627750,"approval":97.9407334,"support":32.262775},{"time_hours":5,"approval_perbill":974448461,"support_perbill":297836947,"approval":97.4448461,"support":29.7836947},{"time_hours":6,"approval_perbill":969561991,"support_perbill":277064231,"approval":96.9561991,"support":27.7064231},{"time_hours":7,"approval_perbill":964746346,"support_perbill":259405948,"approval":96.4746346,"support":25.9405948},{"time_hours":8,"approval_perbill":960000002,"support_perbill":244210536,"approval":96.0000002,"support":24.4210536},{"time_hours":9,"approval_perbill":955321468,"support_perbill":230996317,"approval":95.5321468,"support":23.0996317},{"time_hours":10,"approval_perbill":950709307,"support_perbill":219399546,"approval":95.0709307,"support":21.9399546},{"time_hours":11,"approval_perbill":946162112,"support_perbill":209140376,"approval":94.6162112,"support":20.9140376},{"time_hours":12,"approval_perbill":941678522,"support_perbill":200000007,"approval":94.1678522,"support":20.0000007},{"time_hours":13,"approval_perbill":937257211,"support_perbill":191804884,"approval":93.7257211,"support":19.1804884},{"time_hours":14,"approval_perbill":932896892,"support_perbill":184415591,"approval":93.2896892,"support":18.4415591},{"time_hours":15,"approval_perbill":928596309,"support_perbill":177718838,"approval":92.8596309,"support":17.7718838},{"time_hours":16,"approval_perbill":924354246,"support_perbill":171621628,"approval":92.4354246,"support":17.1621628},{"time_hours":17,"approval_perbill":920169512,"support_perbill":166046892,"approval":92.0169512,"support":16.6046892},{"time_hours":18,"approval_perbill":916040958,"support_perbill":160930238,"approval":91.6040958,"support":16.0930238},{"time_hours":19,"approval_perbill":911967455,"support_perbill":156217428,"approval":91.1967455,"support":15.6217428},{"time_hours":20,"approval_perbill":907947914,"support_perbill":151862469,"approval":90.7947914,"support":15.1862469},{"time_hours":21,"approval_perbill":903981266,"support_perbill":147826091,"approval":90.3981266,"support":14.7826091},{"time_hours":22,"approval_perbill":900066477,"support_perbill":144074572,"approval":90.0066477,"support":14.4074572},{"time_hours":23,"approval_perbill":896202534,"support_perbill":140578783,"approval":89.6202534,"support":14.0578783},{"time_hours":24,"approval_perbill":892388454,"support_perbill":137313437,"approval":89.2388454,"support":13.7313437},{"time_hours":25,"approval_perbill":888623278,"support_perbill":134256476,"approval":88.8623278,"support":13.4256476},{"time_hours":26,"approval_perbill":884906070,"support_perbill":131388569,"approval":88.490607,"support":13.1388569},{"time_hours":27,"approval_perbill":881235922,"support_perbill":128692704,"approval":88.1235922,"support":12.8692704},{"time_hours":28,"approval_perbill":877611943,"support_perbill":126153850,"approval":87.7611943,"support":12.615385},{"time_hours":29,"approval_perbill":874033269,"support_perbill":123758680,"approval":87.4033269,"support":12.375868},{"time_hours":30,"approval_perbill":870499055,"support_perbill":121495330,"approval":87.0499055,"support":12.149533},{"time_hours":31,"approval_perbill":867008478,"support_perbill":119353212,"approval":86.7008478,"support":11.9353212},{"time_hours":32,"approval_perbill":863560734,"support_perbill":117322838,"approval":86.3560734,"support":11.7322838},{"time_hours":33,"approval_perbill":860155042,"support_perbill":115395687,"approval":86.0155042,"support":11.5395687},{"time_hours":34,"approval_perbill":856790633,"support_perbill":113564081,"approval":85.6790633,"support":11.3564081},{"time_hours":35,"approval_perbill":853466765,"support_perbill":111821089,"approval":85.3466765,"support":11.1821089},{"time_hours":36,"approval_perbill":850182706,"support_perbill":110160430,"approval":85.0182706,"support":11.016043},{"time_hours":37,"approval_perbill":846937749,"support_perbill":108576407,"approval":84.6937749,"support":10.8576407},{"time_hours":38,"approval_perbill":843731196,"support_perbill":107063832,"approval":84.3731196,"support":10.7063832},{"time_hours":39,"approval_perbill":840562372,"support_perbill":105617980,"approval":84.0562372,"support":10.561798},{"time_hours":40,"approval_perbill":837430613,"support_perbill":104234530,"approval":83.7430613,"support":10.423453},{"time_hours":41,"approval_perbill":834335274,"support_perbill":102909528,"approval":83.4335274,"support":10.2909528},{"time_hours":42,"approval_perbill":831275722,"support_perbill":101639346,"approval":83.1275722,"support":10.1639346},{"time_hours":43,"approval_perbill":828251342,"support_perbill":100420652,"approval":82.8251342,"support":10.0420652},{"time_hours":44,"approval_perbill":825261530,"support_perbill":99250377,"approval":82.526153,"support":9.9250377},{"time_hours":45,"approval_perbill":822305695,"support_perbill":98125691,"approval":82.2305695,"support":9.8125691},{"time_hours":46,"approval_perbill":819383263,"support_perbill":97043982,"approval":81.9383263,"support":9.7043982},{"time_hours":47,"approval_perbill":816493670,"support_perbill":96002832,"approval":81.649367,"support":9.6002832},{"time_hours":48,"approval_perbill":813636367,"support_perbill":95000002,"approval":81.3636367,"support":9.5000002},{"time_hours":49,"approval_perbill":810810814,"support_perbill":94033415,"approval":81.0810814,"support":9.4033415},{"time_hours":50,"approval_perbill":808016486,"support_perbill":93101141,"approval":80.8016486,"support":9.3101141},{"time_hours":51,"approval_perbill":805252867,"support_perbill":92201384,"approval":80.5252867,"support":9.2201384},{"time_hours":52,"approval_perbill":802519455,"support_perbill":91332473,"approval":80.2519455,"support":9.1332473},{"time_hours":53,"approval_perbill":799815756,"support_perbill":90492847,"approval":79.9815756,"support":9.0492847},{"time_hours":54,"approval_perbill":797141290,"support_perbill":89681052,"approval":79.714129,"support":8.9681052},{"time_hours":55,"approval_perbill":794495583,"support_perbill":88895726,"approval":79.4495583,"support":8.8895726},{"time_hours":56,"approval_perbill":791878176,"support_perbill":88135595,"approval":79.1878176,"support":8.8135595},{"time_hours":57,"approval_perbill":789288615,"support_perbill":87399465,"approval":78.9288615,"support":8.7399465},{"time_hours":58,"approval_perbill":786726461,"support_perbill":86686218,"approval":78.6726461,"support":8.6686218},{"time_hours":59,"approval_perbill":784191278,"support_perbill":85994804,"approval":78.4191278,"support":8.5994804},{"time_hours":60,"approval_perbill":781682644,"support_perbill":85324233,"approval":78.1682644,"support":8.5324233},{"time_hours":61,"approval_perbill":779200144,"support_perbill":84673579,"approval":77.9200144,"support":8.4673579},{"time_hours":62,"approval_perbill":776743372,"support_perbill":84041967,"approval":77.6743372,"support":8.4041967},{"time_hours":63,"approval_perbill":774311929,"support_perbill":83428573,"approval":77.4311929,"support":8.3428573},{"time_hours":64,"approval_perbill":771905427,"support_perbill":82832619,"approval":77.1905427,"support":8.2832619},{"time_hours":65,"approval_perbill":769523483,"support_perbill":82253373,"approval":76.9523483,"support":8.2253373},{"time_hours":66,"approval_perbill":767165723,"support_perbill":81690142,"approval":76.7165723,"support":8.1690142},{"time_hours":67,"approval_perbill":764831781,"support_perbill":81142270,"approval":76.4831781,"support":8.114227},{"time_hours":68,"approval_perbill":762521298,"support_perbill":80609138,"approval":76.2521298,"support":8.0609138},{"time_hours":69,"approval_perbill":760233921,"support_perbill":80090159,"approval":76.0233921,"support":8.0090159},{"time_hours":70,"approval_perbill":757969306,"support_perbill":79584776,"approval":75.7969306,"support":7.9584776},{"time_hours":71,"approval_perbill":755727116,"support_perbill":79092463,"approval":75.5727116,"support":7.9092463},{"time_hours":72,"approval_perbill":753507017,"support_perbill":78612718,"approval":75.3507017,"support":7.8612718},{"time_hours":73,"approval_perbill":751308686,"support_perbill":78145066,"approval":75.1308686,"support":7.8145066},{"time_hours":74,"approval_perbill":749131804,"support_perbill":77689057,"approval":74.9131804,"support":7.7689057},{"time_hours":75,"approval_perbill":746976058,"support_perbill":77244260,"approval":74.6976058,"support":7.724426},{"time_hours":76,"approval_perbill":744841143,"support_perbill":76810267,"approval":74.4841143,"support":7.6810267},{"time_hours":77,"approval_perbill":742726757,"support_perbill":76386689,"approval":74.2726757,"support":7.6386689},{"time_hours":78,"approval_perbill":740632606,"support_perbill":75973155,"approval":74.0632606,"support":7.5973155},{"time_hours":79,"approval_perbill":738558402,"support_perbill":75569313,"approval":73.8558402,"support":7.5569313},{"time_hours":80,"approval_perbill":736503859,"support_perbill":75174826,"approval":73.6503859,"support":7.5174826},{"time_hours":81,"approval_perbill":734468701,"support_perbill":74789372,"approval":73.4468701,"support":7.4789372},{"time_hours":82,"approval_perbill":732452653,"support_perbill":74412645,"approval":73.2452653,"support":7.4412645},{"time_hours":83,"approval_perbill":730455448,"support_perbill":74044351,"approval":73.0455448,"support":7.4044351},{"time_hours":84,"approval_perbill":728476824,"support_perbill":73684211,"approval":72.8476824,"support":7.3684211},{"time_hours":85,"approval_perbill":726516522,"support_perbill":73331957,"approval":72.6516522,"support":7.3331957},{"time_hours":86,"approval_perbill":724574288,"support_perbill":72987332,"approval":72.4574288,"support":7.2987332},{"time_hours":87,"approval_perbill":722649875,"support_perbill":72650092,"approval":72.2649875,"support":7.2650092},{"time_hours":88,"approval_perbill":720743037,"support_perbill":72320001,"approval":72.0743037,"support":7.2320001},{"time_hours":89,"approval_perbill":718853535,"support_perbill":71996834,"approval":71.8853535,"support":7.1996834},{"time_hours":90,"approval_perbill":716981135,"support_perbill":71680377,"approval":71.6981135,"support":7.1680377},{"time_hours":91,"approval_perbill":715125604,"support_perbill":71370421,"approval":71.5125604,"support":7.1370421},{"time_hours":92,"approval_perbill":713286716,"support_perbill":71066770,"approval":71.3286716,"support":7.106677},{"time_hours":93,"approval_perbill":711464248,"support_perbill":70769231,"approval":71.1464248,"support":7.0769231},{"time_hours":94,"approval_perbill":709657981,"support_perbill":70477624,"approval":70.9657981,"support":7.0477624},{"time_hours":95,"approval_perbill":707867699,"support_perbill":70191771,"approval":70.7867699,"support":7.0191771},{"time_hours":96,"approval_perbill":706093193,"support_perbill":69911505,"approval":70.6093193,"support":6.9911505},{"time_hours":97,"approval_perbill":704334253,"support_perbill":69636663,"approval":70.4334253,"support":6.9636663},{"time_hours":98,"approval_perbill":702590676,"support_perbill":69367089,"approval":70.2590676,"support":6.9367089},{"time_hours":99,"approval_perbill":700862262,"support_perbill":69102633,"approval":70.0862262,"support":6.9102633},{"time_hours":100,"approval_perbill":699148814,"support_perbill":68843152,"approval":69.9148814,"support":6.8843152},{"time_hours":101,"approval_perbill":697450138,"support_perbill":68588504,"approval":69.7450138,"support":6.8588504},{"time_hours":102,"approval_perbill":695766044,"support_perbill":68338558,"approval":69.5766044,"support":6.8338558},{"time_hours":103,"approval_perbill":694096344,"support_perbill":68093184,"approval":69.4096344,"support":6.8093184},{"time_hours":104,"approval_perbill":692440857,"support_perbill":67852257,"approval":69.2440857,"support":6.7852257},{"time_hours":105,"approval_perbill":690799399,"support_perbill":67615659,"approval":69.0799399,"support":6.7615659},{"time_hours":106,"approval_perbill":689171795,"support_perbill":67383272,"approval":68.9171795,"support":6.7383272},{"time_hours":107,"approval_perbill":687557869,"support_perbill":67154986,"approval":68.7557869,"support":6.7154986},{"time_hours":108,"approval_perbill":685957449,"support_perbill":66930693,"approval":68.5957449,"support":6.6930693},{"time_hours":109,"approval_perbill":684370368,"support_perbill":66710290,"approval":68.4370368,"support":6.671029},{"time_hours":110,"approval_perbill":682796458,"support_perbill":66493675,"approval":68.2796458,"support":6.6493675},{"time_hours":111,"approval_perbill":681235556,"support_perbill":66280753,"approval":68.1235556,"support":6.6280753},{"time_hours":112,"approval_perbill":679687502,"support_perbill":66071429,"approval":67.9687502,"support":6.6071429},{"time_hours":113,"approval_perbill":678152139,"support_perbill":65865613,"approval":67.8152139,"support":6.5865613},{"time_hours":114,"approval_perbill":676629309,"support_perbill":65663217,"approval":67.6629309,"support":6.5663217},{"time_hours":115,"approval_perbill":675118862,"support_perbill":65464158,"approval":67.5118862,"support":6.5464158},{"time_hours":116,"approval_perbill":673620645,"support_perbill":65268353,"approval":67.3620645,"support":6.5268353},{"time_hours":117,"approval_perbill":672134512,"support_perbill":65075723,"approval":67.2134512,"support":6.5075723},{"time_hours":118,"approval_perbill":670660315,"support_perbill":64886191,"approval":67.0660315,"support":6.4886191},{"time_hours":119,"approval_perbill":669197914,"support_perbill":64699684,"approval":66.9197914,"support":6.4699684},{"time_hours":120,"approval_perbill":667747166,"support_perbill":64516129,"approval":66.7747166,"support":6.4516129},{"time_hours":121,"approval_perbill":666307933,"support_perbill":64335457,"approval":66.6307933,"support":6.4335457},{"time_hours":122,"approval_perbill":664880077,"support_perbill":64157601,"approval":66.4880077,"support":6.4157601},{"time_hours":123,"approval_perbill":663463466,"support_perbill":63982495,"approval":66.3463466,"support":6.3982495},{"time_hours":124,"approval_perbill":662057965,"support_perbill":63810075,"approval":66.2057965,"support":6.3810075},{"time_hours":125,"approval_perbill":660663447,"support_perbill":63640282,"approval":66.0663447,"support":6.3640282},{"time_hours":126,"approval_perbill":659279781,"support_perbill":63473054,"approval":65.9279781,"support":6.3473054},{"time_hours":127,"approval_perbill":657906842,"support_perbill":63308335,"approval":65.7906842,"support":6.3308335},{"time_hours":128,"approval_perbill":656544505,"support_perbill":63146067,"approval":65.6544505,"support":6.3146067},{"time_hours":129,"approval_perbill":655192648,"support_perbill":62986198,"approval":65.5192648,"support":6.2986198},{"time_hours":130,"approval_perbill":653851152,"support_perbill":62828674,"approval":65.3851152,"support":6.2828674},{"time_hours":131,"approval_perbill":652519896,"support_perbill":62673444,"approval":65.2519896,"support":6.2673444},{"time_hours":132,"approval_perbill":651198765,"support_perbill":62520458,"approval":65.1198765,"support":6.2520458},{"time_hours":133,"approval_perbill":649887643,"support_perbill":62369668,"approval":64.9887643,"support":6.2369668},{"time_hours":134,"approval_perbill":648586417,"support_perbill":62221027,"approval":64.8586417,"support":6.2221027},{"time_hours":135,"approval_perbill":647294974,"support_perbill":62074489,"approval":64.7294974,"support":6.2074489},{"time_hours":136,"approval_perbill":646013207,"support_perbill":61930011,"approval":64.6013207,"support":6.1930011},{"time_hours":137,"approval_perbill":644741005,"support_perbill":61787548,"approval":64.4741005,"support":6.1787548},{"time_hours":138,"approval_perbill":643478263,"support_perbill":61647059,"approval":64.3478263,"support":6.1647059},{"time_hours":139,"approval_perbill":642224875,"support_perbill":61508503,"approval":64.2224875,"support":6.1508503},{"time_hours":140,"approval_perbill":640980738,"support_perbill":61371841,"approval":64.0980738,"support":6.1371841},{"time_hours":141,"approval_perbill":639745749,"support_perbill":61237034,"approval":63.9745749,"support":6.1237034},{"time_hours":142,"approval_perbill":638519808,"support_perbill":61104045,"approval":63.8519808,"support":6.1104045},{"time_hours":143,"approval_perbill":637302817,"support_perbill":60972836,"approval":63.7302817,"support":6.0972836},{"time_hours":144,"approval_perbill":636094677,"support_perbill":60843373,"approval":63.6094677,"support":6.0843373},{"time_hours":145,"approval_perbill":634895291,"support_perbill":60715621,"approval":63.4895291,"support":6.0715621},{"time_hours":146,"approval_perbill":633704567,"support_perbill":60589547,"approval":63.3704567,"support":6.0589547},{"time_hours":147,"approval_perbill":632522409,"support_perbill":60465116,"approval":63.2522409,"support":6.0465116},{"time_hours":148,"approval_perbill":631348726,"support_perbill":60342298,"approval":63.1348726,"support":6.0342298},{"time_hours":149,"approval_perbill":630183427,"support_perbill":60221061,"approval":63.0183427,"support":6.0221061},{"time_hours":150,"approval_perbill":629026422,"support_perbill":60101376,"approval":62.9026422,"support":6.0101376},{"time_hours":151,"approval_perbill":627877624,"support_perbill":59983211,"approval":62.7877624,"support":5.9983211},{"time_hours":152,"approval_perbill":626736945,"support_perbill":59866539,"approval":62.6736945,"support":5.9866539},{"time_hours":153,"approval_perbill":625604299,"support_perbill":59751332,"approval":62.5604299,"support":5.9751332},{"time_hours":154,"approval_perbill":624479602,"support_perbill":59637562,"approval":62.4479602,"support":5.9637562},{"time_hours":155,"approval_perbill":623362771,"support_perbill":59525201,"approval":62.3362771,"support":5.9525201},{"time_hours":156,"approval_perbill":622253723,"support_perbill":59414226,"approval":62.2253723,"support":5.9414226},{"time_hours":157,"approval_perbill":621152377,"support_perbill":59304609,"approval":62.1152377,"support":5.9304609},{"time_hours":158,"approval_perbill":620058653,"support_perbill":59196326,"approval":62.0058653,"support":5.9196326},{"time_hours":159,"approval_perbill":618972473,"support_perbill":59089353,"approval":61.8972473,"support":5.9089353},{"time_hours":160,"approval_perbill":617893758,"support_perbill":58983666,"approval":61.7893758,"support":5.8983666},{"time_hours":161,"approval_perbill":616822432,"support_perbill":58879242,"approval":61.6822432,"support":5.8879242},{"time_hours":162,"approval_perbill":615758419,"support_perbill":58776059,"approval":61.5758419,"support":5.8776059},{"time_hours":163,"approval_perbill":614701645,"support_perbill":58674094,"approval":61.4701645,"support":5.8674094},{"time_hours":164,"approval_perbill":613652036,"support_perbill":58573327,"approval":61.3652036,"support":5.8573327},{"time_hours":165,"approval_perbill":612609519,"support_perbill":58473736,"approval":61.2609519,"support":5.8473736},{"time_hours":166,"approval_perbill":611574023,"support_perbill":58375301,"approval":61.1574023,"support":5.8375301},{"time_hours":167,"approval_perbill":610545477,"support_perbill":58278001,"approval":61.0545477,"support":5.8278001},{"time_hours":168,"approval_perbill":609523811,"support_perbill":58181818,"approval":60.9523811,"support":5.8181818},{"time_hours":169,"approval_perbill":608508957,"support_perbill":58086732,"approval":60.8508957,"support":5.8086732},{"time_hours":170,"approval_perbill":607500846,"support_perbill":57992724,"approval":60.7500846,"support":5.7992724},{"time_hours":171,"approval_perbill":606499412,"support_perbill":57899776,"approval":60.6499412,"support":5.7899776},{"time_hours":172,"approval_perbill":605504589,"support_perbill":57807871,"approval":60.5504589,"support":5.7807871},{"time_hours":173,"approval_perbill":604516310,"support_perbill":57716991,"approval":60.451631,"support":5.7716991},{"time_hours":174,"approval_perbill":603534513,"support_perbill":57627118,"approval":60.3534513,"support":5.7627118},{"time_hours":175,"approval_perbill":602559133,"support_perbill":57538237,"approval":60.2559133,"support":5.7538237},{"time_hours":176,"approval_perbill":601590108,"support_perbill":57450331,"approval":60.1590108,"support":5.7450331},{"time_hours":177,"approval_perbill":600627375,"support_perbill":57363383,"approval":60.0627375,"support":5.7363383},{"time_hours":178,"approval_perbill":599670874,"support_perbill":57277379,"approval":59.9670874,"support":5.7277379},{"time_hours":179,"approval_perbill":598720544,"support_perbill":57192303,"approval":59.8720544,"support":5.7192303},{"time_hours":180,"approval_perbill":597776326,"support_perbill":57108141,"approval":59.7776326,"support":5.7108141},{"time_hours":181,"approval_perbill":596838161,"support_perbill":57024876,"approval":59.6838161,"support":5.7024876},{"time_hours":182,"approval_perbill":595905991,"support_perbill":56942496,"approval":59.5905991,"support":5.6942496},{"time_hours":183,"approval_perbill":594979758,"support_perbill":56860986,"approval":59.4979758,"support":5.6860986},{"time_hours":184,"approval_perbill":594059407,"support_perbill":56780333,"approval":59.4059407,"support":5.6780333},{"time_hours":185,"approval_perbill":593144881,"support_perbill":56700522,"approval":59.3144881,"support":5.6700522},{"time_hours":186,"approval_perbill":592236126,"support_perbill":56621542,"approval":59.2236126,"support":5.6621542},{"time_hours":187,"approval_perbill":591333086,"support_perbill":56543378,"approval":59.1333086,"support":5.6543378},{"time_hours":188,"approval_perbill":590435708,"support_perbill":56466019,"approval":59.0435708,"support":5.6466019},{"time_hours":189,"approval_perbill":589543939,"support_perbill":56389452,"approval":58.9543939,"support":5.6389452},{"time_hours":190,"approval_perbill":588657726,"support_perbill":56313665,"approval":58.8657726,"support":5.6313665},{"time_hours":191,"approval_perbill":587777019,"support_perbill":56238646,"approval":58.7777019,"support":5.6238646},{"time_hours":192,"approval_perbill":586901764,"support_perbill":56164383,"approval":58.6901764,"support":5.6164383},{"time_hours":193,"approval_perbill":586031913,"support_perbill":56090866,"approval":58.6031913,"support":5.6090866},{"time_hours":194,"approval_perbill":585167415,"support_perbill":56018082,"approval":58.5167415,"support":5.6018082},{"time_hours":195,"approval_perbill":584308222,"support_perbill":55946021,"approval":58.4308222,"support":5.5946021},{"time_hours":196,"approval_perbill":583454283,"support_perbill":55874673,"approval":58.3454283,"support":5.5874673},{"time_hours":197,"approval_perbill":582605551,"support_perbill":55804027,"approval":58.2605551,"support":5.5804027},{"time_hours":198,"approval_perbill":581761979,"support_perbill":55734072,"approval":58.1761979,"support":5.5734072},{"time_hours":199,"approval_perbill":580923521,"support_perbill":55664798,"approval":58.0923521,"support":5.5664798},{"time_hours":200,"approval_perbill":580090128,"support_perbill":55596196,"approval":58.0090128,"support":5.5596196},{"time_hours":201,"approval_perbill":579261756,"support_perbill":55528255,"approval":57.9261756,"support":5.5528255},{"time_hours":202,"approval_perbill":578438360,"support_perbill":55460967,"approval":57.843836,"support":5.5460967},{"time_hours":203,"approval_perbill":577619895,"support_perbill":55394321,"approval":57.7619895,"support":5.5394321},{"time_hours":204,"approval_perbill":576806315,"support_perbill":55328309,"approval":57.6806315,"support":5.5328309},{"time_hours":205,"approval_perbill":575997580,"support_perbill":55262922,"approval":57.599758,"support":5.5262922},{"time_hours":206,"approval_perbill":575193643,"support_perbill":55198151,"approval":57.5193643,"support":5.5198151},{"time_hours":207,"approval_perbill":574394465,"support_perbill":55133987,"approval":57.4394465,"support":5.5133987},{"time_hours":208,"approval_perbill":573600001,"support_perbill":55070422,"approval":57.3600001,"support":5.5070422},{"time_hours":209,"approval_perbill":572810211,"support_perbill":55007447,"approval":57.2810211,"support":5.5007447},{"time_hours":210,"approval_perbill":572025053,"support_perbill":54945054,"approval":57.2025053,"support":5.4945054},{"time_hours":211,"approval_perbill":571244487,"support_perbill":54883236,"approval":57.1244487,"support":5.4883236},{"time_hours":212,"approval_perbill":570468473,"support_perbill":54821984,"approval":57.0468473,"support":5.4821984},{"time_hours":213,"approval_perbill":569696971,"support_perbill":54761290,"approval":56.9696971,"support":5.476129},{"time_hours":214,"approval_perbill":568929941,"support_perbill":54701147,"approval":56.8929941,"support":5.4701147},{"time_hours":215,"approval_perbill":568167345,"support_perbill":54641547,"approval":56.8167345,"support":5.4641547},{"time_hours":216,"approval_perbill":567409145,"support_perbill":54582484,"approval":56.7409145,"support":5.4582484},{"time_hours":217,"approval_perbill":566655303,"support_perbill":54523950,"approval":56.6655303,"support":5.452395},{"time_hours":218,"approval_perbill":565905780,"support_perbill":54465937,"approval":56.590578,"support":5.4465937},{"time_hours":219,"approval_perbill":565160541,"support_perbill":54408440,"approval":56.5160541,"support":5.440844},{"time_hours":220,"approval_perbill":564419549,"support_perbill":54351450,"approval":56.4419549,"support":5.435145},{"time_hours":221,"approval_perbill":563682767,"support_perbill":54294962,"approval":56.3682767,"support":5.4294962},{"time_hours":222,"approval_perbill":562950159,"support_perbill":54238968,"approval":56.2950159,"support":5.4238968},{"time_hours":223,"approval_perbill":562221691,"support_perbill":54183463,"approval":56.2221691,"support":5.4183463},{"time_hours":224,"approval_perbill":561497327,"support_perbill":54128440,"approval":56.1497327,"support":5.412844},{"time_hours":225,"approval_perbill":560777032,"support_perbill":54073892,"approval":56.0777032,"support":5.4073892},{"time_hours":226,"approval_perbill":560060774,"support_perbill":54019814,"approval":56.0060774,"support":5.4019814},{"time_hours":227,"approval_perbill":559348516,"support_perbill":53966200,"approval":55.9348516,"support":5.39662},{"time_hours":228,"approval_perbill":558640227,"support_perbill":53913043,"approval":55.8640227,"support":5.3913043},{"time_hours":229,"approval_perbill":557935873,"support_perbill":53860338,"approval":55.7935873,"support":5.3860338},{"time_hours":230,"approval_perbill":557235422,"support_perbill":53808079,"approval":55.7235422,"support":5.3808079},{"time_hours":231,"approval_perbill":556538840,"support_perbill":53756260,"approval":55.653884,"support":5.375626},{"time_hours":232,"approval_perbill":555846097,"support_perbill":53704876,"approval":55.5846097,"support":5.3704876},{"time_hours":233,"approval_perbill":555157160,"support_perbill":53653921,"approval":55.515716,"support":5.3653921},{"time_hours":234,"approval_perbill":554471998,"support_perbill":53603391,"approval":55.4471998,"support":5.3603391},{"time_hours":235,"approval_perbill":553790581,"support_perbill":53553279,"approval":55.3790581,"support":5.3553279},{"time_hours":236,"approval_perbill":553112877,"support_perbill":53503581,"approval":55.3112877,"support":5.3503581},{"time_hours":237,"approval_perbill":552438856,"support_perbill":53454291,"approval":55.2438856,"support":5.3454291},{"time_hours":238,"approval_perbill":551768489,"support_perbill":53405405,"approval":55.1768489,"support":5.3405405},{"time_hours":239,"approval_perbill":551101746,"support_perbill":53356917,"approval":55.1101746,"support":5.3356917},{"time_hours":240,"approval_perbill":550438597,"support_perbill":53308823,"approval":55.0438597,"support":5.3308823},{"time_hours":241,"approval_perbill":549779014,"support_perbill":53261118,"approval":54.9779014,"support":5.3261118},{"time_hours":242,"approval_perbill":549122967,"support_perbill":53213797,"approval":54.9122967,"support":5.3213797},{"time_hours":243,"approval_perbill":548470429,"support_perbill":53166855,"approval":54.8470429,"support":5.3166855},{"time_hours":244,"approval_perbill":547821371,"support_perbill":53120289,"approval":54.7821371,"support":5.3120289},{"time_hours":245,"approval_perbill":547175766,"support_perbill":53074093,"approval":54.7175766,"support":5.3074093},{"time_hours":246,"approval_perbill":546533585,"support_perbill":53028263,"approval":54.6533585,"support":5.3028263},{"time_hours":247,"approval_perbill":545894803,"support_perbill":52982795,"approval":54.5894803,"support":5.2982795},{"time_hours":248,"approval_perbill":545259392,"support_perbill":52937685,"approval":54.5259392,"support":5.2937685},{"time_hours":249,"approval_perbill":544627325,"support_perbill":52892928,"approval":54.4627325,"support":5.2892928},{"time_hours":250,"approval_perbill":543998577,"support_perbill":52848520,"approval":54.3998577,"support":5.284852},{"time_hours":251,"approval_perbill":543373120,"support_perbill":52804457,"approval":54.337312,"support":5.2804457},{"time_hours":252,"approval_perbill":542750930,"support_perbill":52760735,"approval":54.275093,"support":5.2760735},{"time_hours":253,"approval_perbill":542131980,"support_perbill":52717351,"approval":54.213198,"support":5.2717351},{"time_hours":254,"approval_perbill":541516246,"support_perbill":52674300,"approval":54.1516246,"support":5.26743},{"time_hours":255,"approval_perbill":540903702,"support_perbill":52631578,"approval":54.0903702,"support":5.2631578},{"time_hours":256,"approval_perbill":540294324,"support_perbill":52589182,"approval":54.0294324,"support":5.2589182},{"time_hours":257,"approval_perbill":539688087,"support_perbill":52547108,"approval":53.9688087,"support":5.2547108},{"time_hours":258,"approval_perbill":539084968,"support_perbill":52505353,"approval":53.9084968,"support":5.2505353},{"time_hours":259,"approval_perbill":538484941,"support_perbill":52463912,"approval":53.8484941,"support":5.2463912},{"time_hours":260,"approval_perbill":537887984,"support_perbill":52422782,"approval":53.7887984,"support":5.2422782},{"time_hours":261,"approval_perbill":537294072,"support_perbill":52381960,"approval":53.7294072,"support":5.238196},{"time_hours":262,"approval_perbill":536703183,"support_perbill":52341442,"approval":53.6703183,"support":5.2341442},{"time_hours":263,"approval_perbill":536115294,"support_perbill":52301225,"approval":53.6115294,"support":5.2301225},{"time_hours":264,"approval_perbill":535530381,"support_perbill":52261306,"approval":53.5530381,"support":5.2261306},{"time_hours":265,"approval_perbill":534948423,"support_perbill":52221681,"approval":53.4948423,"support":5.2221681},{"time_hours":266,"approval_perbill":534369396,"support_perbill":52182347,"approval":53.4369396,"support":5.2182347},{"time_hours":267,"approval_perbill":533793280,"support_perbill":52143300,"approval":53.379328,"support":5.21433},{"time_hours":268,"approval_perbill":533220051,"support_perbill":52104538,"approval":53.3220051,"support":5.2104538},{"time_hours":269,"approval_perbill":532649689,"support_perbill":52066058,"approval":53.2649689,"support":5.2066058},{"time_hours":270,"approval_perbill":532082171,"support_perbill":52027857,"approval":53.2082171,"support":5.2027857},{"time_hours":271,"approval_perbill":531517477,"support_perbill":51989931,"approval":53.1517477,"support":5.1989931},{"time_hours":272,"approval_perbill":530955585,"support_perbill":51952277,"approval":53.0955585,"support":5.1952277},{"time_hours":273,"approval_perbill":530396476,"support_perbill":51914893,"approval":53.0396476,"support":5.1914893},{"time_hours":274,"approval_perbill":529840127,"support_perbill":51877776,"approval":52.9840127,"support":5.1877776},{"time_hours":275,"approval_perbill":529286519,"support_perbill":51840922,"approval":52.9286519,"support":5.1840922},{"time_hours":276,"approval_perbill":528735632,"support_perbill":51804330,"approval":52.8735632,"support":5.180433},{"time_hours":277,"approval_perbill":528187445,"support_perbill":51767996,"approval":52.8187445,"support":5.1767996},{"time_hours":278,"approval_perbill":527641939,"support_perbill":51731917,"approval":52.7641939,"support":5.1731917},{"time_hours":279,"approval_perbill":527099095,"support_perbill":51696091,"approval":52.7099095,"support":5.1696091},{"time_hours":280,"approval_perbill":526558891,"support_perbill":51660516,"approval":52.6558891,"support":5.1660516},{"time_hours":281,"approval_perbill":526021311,"support_perbill":51625188,"approval":52.6021311,"support":5.1625188},{"time_hours":282,"approval_perbill":525486333,"support_perbill":51590105,"approval":52.5486333,"support":5.1590105},{"time_hours":283,"approval_perbill":524953941,"support_perbill":51555265,"approval":52.4953941,"support":5.1555265},{"time_hours":284,"approval_perbill":524424114,"support_perbill":51520665,"approval":52.4424114,"support":5.1520665},{"time_hours":285,"approval_perbill":523896834,"support_perbill":51486302,"approval":52.3896834,"support":5.1486302},{"time_hours":286,"approval_perbill":523372083,"support_perbill":51452174,"approval":52.3372083,"support":5.1452174},{"time_hours":287,"approval_perbill":522849844,"support_perbill":51418279,"approval":52.2849844,"support":5.1418279},{"time_hours":288,"approval_perbill":522330097,"support_perbill":51384615,"approval":52.2330097,"support":5.1384615},{"time_hours":289,"approval_perbill":521812825,"support_perbill":51351178,"approval":52.1812825,"support":5.1351178},{"time_hours":290,"approval_perbill":521298011,"support_perbill":51317967,"approval":52.1298011,"support":5.1317967},{"time_hours":291,"approval_perbill":520785637,"support_perbill":51284979,"approval":52.0785637,"support":5.1284979},{"time_hours":292,"approval_perbill":520275685,"support_perbill":51252213,"approval":52.0275685,"support":5.1252213},{"time_hours":293,"approval_perbill":519768139,"support_perbill":51219665,"approval":51.9768139,"support":5.1219665},{"time_hours":294,"approval_perbill":519262981,"support_perbill":51187334,"approval":51.9262981,"support":5.1187334},{"time_hours":295,"approval_perbill":518760195,"support_perbill":51155218,"approval":51.8760195,"support":5.1155218},{"time_hours":296,"approval_perbill":518259765,"support_perbill":51123314,"approval":51.8259765,"support":5.1123314},{"time_hours":297,"approval_perbill":517761672,"support_perbill":51091621,"approval":51.7761672,"support":5.1091621},{"time_hours":298,"approval_perbill":517265903,"support_perbill":51060136,"approval":51.7265903,"support":5.1060136},{"time_hours":299,"approval_perbill":516772438,"support_perbill":51028857,"approval":51.6772438,"support":5.1028857},{"time_hours":300,"approval_perbill":516281264,"support_perbill":50997782,"approval":51.6281264,"support":5.0997782},{"time_hours":301,"approval_perbill":515792364,"support_perbill":50966909,"approval":51.5792364,"support":5.0966909},{"time_hours":302,"approval_perbill":515305723,"support_perbill":50936237,"approval":51.5305723,"support":5.0936237},{"time_hours":303,"approval_perbill":514821324,"support_perbill":50905763,"approval":51.4821324,"support":5.0905763},{"time_hours":304,"approval_perbill":514339152,"support_perbill":50875486,"approval":51.4339152,"support":5.0875486},{"time_hours":305,"approval_perbill":513859192,"support_perbill":50845402,"approval":51.3859192,"support":5.0845402},{"time_hours":306,"approval_perbill":513381428,"support_perbill":50815512,"approval":51.3381428,"support":5.0815512},{"time_hours":307,"approval_perbill":512905847,"support_perbill":50785812,"approval":51.2905847,"support":5.0785812},{"time_hours":308,"approval_perbill":512432432,"support_perbill":50756302,"approval":51.2432432,"support":5.0756302},{"time_hours":309,"approval_perbill":511961169,"support_perbill":50726978,"approval":51.1961169,"support":5.0726978},{"time_hours":310,"approval_perbill":511492043,"support_perbill":50697840,"approval":51.1492043,"support":5.069784},{"time_hours":311,"approval_perbill":511025041,"support_perbill":50668886,"approval":51.1025041,"support":5.0668886},{"time_hours":312,"approval_perbill":510560146,"support_perbill":50640113,"approval":51.0560146,"support":5.0640113},{"time_hours":313,"approval_perbill":510097346,"support_perbill":50611521,"approval":51.0097346,"support":5.0611521},{"time_hours":314,"approval_perbill":509636626,"support_perbill":50583107,"approval":50.9636626,"support":5.0583107},{"time_hours":315,"approval_perbill":509177972,"support_perbill":50554870,"approval":50.9177972,"support":5.055487},{"time_hours":316,"approval_perbill":508721371,"support_perbill":50526808,"approval":50.8721371,"support":5.0526808},{"time_hours":317,"approval_perbill":508266807,"support_perbill":50498920,"approval":50.8266807,"support":5.049892},{"time_hours":318,"approval_perbill":507814269,"support_perbill":50471203,"approval":50.7814269,"support":5.0471203},{"time_hours":319,"approval_perbill":507363742,"support_perbill":50443657,"approval":50.7363742,"support":5.0443657},{"time_hours":320,"approval_perbill":506915213,"support_perbill":50416280,"approval":50.6915213,"support":5.041628},{"time_hours":321,"approval_perbill":506468669,"support_perbill":50389071,"approval":50.6468669,"support":5.0389071},{"time_hours":322,"approval_perbill":506024096,"support_perbill":50362026,"approval":50.6024096,"support":5.0362026},{"time_hours":323,"approval_perbill":505581482,"support_perbill":50335147,"approval":50.5581482,"support":5.0335147},{"time_hours":324,"approval_perbill":505140813,"support_perbill":50308430,"approval":50.5140813,"support":5.030843},{"time_hours":325,"approval_perbill":504702077,"support_perbill":50281874,"approval":50.4702077,"support":5.0281874},{"time_hours":326,"approval_perbill":504265261,"support_perbill":50255478,"approval":50.4265261,"support":5.0255478},{"time_hours":327,"approval_perbill":503830353,"support_perbill":50229240,"approval":50.3830353,"support":5.022924},{"time_hours":328,"approval_perbill":503397340,"support_perbill":50203159,"approval":50.339734,"support":5.0203159},{"time_hours":329,"approval_perbill":502966210,"support_perbill":50177234,"approval":50.296621,"support":5.0177234},{"time_hours":330,"approval_perbill":502536950,"support_perbill":50151463,"approval":50.253695,"support":5.0151463},{"time_hours":331,"approval_perbill":502109549,"support_perbill":50125845,"approval":50.2109549,"support":5.0125845},{"time_hours":332,"approval_perbill":501683994,"support_perbill":50100378,"approval":50.1683994,"support":5.0100378},{"time_hours":333,"approval_perbill":501260273,"support_perbill":50075062,"approval":50.1260273,"support":5.0075062},{"time_hours":334,"approval_perbill":500838375,"support_perbill":50049894,"approval":50.0838375,"support":5.0049894},{"time_hours":335,"approval_perbill":500418287,"support_perbill":50024873,"approval":50.0418287,"support":5.0024873},{"time_hours":336,"approval_perbill":499999999,"support_perbill":49999999,"approval":49.9999999,"support":4.9999999}]')},77256:p=>{"use strict";p.exports=JSON.parse('[{"time_hours":0,"approval_perbill":1000000000,"support_perbill":500000026,"approval":100,"support":50.0000026},{"time_hours":1,"approval_perbill":998774510,"support_perbill":455636061,"approval":99.877451,"support":45.5636061},{"time_hours":2,"approval_perbill":997549020,"support_perbill":418401359,"approval":99.754902,"support":41.8401359},{"time_hours":3,"approval_perbill":996323530,"support_perbill":386705228,"approval":99.632353,"support":38.6705228},{"time_hours":4,"approval_perbill":995098040,"support_perbill":359397443,"approval":99.509804,"support":35.9397443},{"time_hours":5,"approval_perbill":993872550,"support_perbill":335625639,"approval":99.387255,"support":33.5625639},{"time_hours":6,"approval_perbill":992647060,"support_perbill":314744813,"approval":99.264706,"support":31.4744813},{"time_hours":7,"approval_perbill":991421570,"support_perbill":296257808,"approval":99.142157,"support":29.6257808},{"time_hours":8,"approval_perbill":990196080,"support_perbill":279775293,"approval":99.019608,"support":27.9775293},{"time_hours":9,"approval_perbill":988970589,"support_perbill":264988013,"approval":98.8970589,"support":26.4988013},{"time_hours":10,"approval_perbill":987745099,"support_perbill":251647242,"approval":98.7745099,"support":25.1647242},{"time_hours":11,"approval_perbill":986519609,"support_perbill":239550622,"approval":98.6519609,"support":23.9550622},{"time_hours":12,"approval_perbill":985294119,"support_perbill":228531862,"approval":98.5294119,"support":22.8531862},{"time_hours":13,"approval_perbill":984068628,"support_perbill":218453039,"approval":98.4068628,"support":21.8453039},{"time_hours":14,"approval_perbill":982843138,"support_perbill":209198815,"approval":98.2843138,"support":20.9198815},{"time_hours":15,"approval_perbill":981617648,"support_perbill":200671963,"approval":98.1617648,"support":20.0671963},{"time_hours":16,"approval_perbill":980392158,"support_perbill":192789972,"approval":98.0392158,"support":19.2789972},{"time_hours":17,"approval_perbill":979166667,"support_perbill":185482348,"approval":97.9166667,"support":18.5482348},{"time_hours":18,"approval_perbill":977941177,"support_perbill":178688524,"approval":97.7941177,"support":17.8688524},{"time_hours":19,"approval_perbill":976715687,"support_perbill":172356151,"approval":97.6715687,"support":17.2356151},{"time_hours":20,"approval_perbill":975490197,"support_perbill":166439756,"approval":97.5490197,"support":16.6439756},{"time_hours":21,"approval_perbill":974264706,"support_perbill":160899652,"approval":97.4264706,"support":16.0899652},{"time_hours":22,"approval_perbill":973039216,"support_perbill":155701053,"approval":97.3039216,"support":15.5701053},{"time_hours":23,"approval_perbill":971813726,"support_perbill":150813323,"approval":97.1813726,"support":15.0813323},{"time_hours":24,"approval_perbill":970588236,"support_perbill":146209386,"approval":97.0588236,"support":14.6209386},{"time_hours":25,"approval_perbill":969362746,"support_perbill":141865225,"approval":96.9362746,"support":14.1865225},{"time_hours":26,"approval_perbill":968137256,"support_perbill":137759452,"approval":96.8137256,"support":13.7759452},{"time_hours":27,"approval_perbill":966911766,"support_perbill":133872975,"approval":96.6911766,"support":13.3872975},{"time_hours":28,"approval_perbill":965686276,"support_perbill":130188679,"approval":96.5686276,"support":13.0188679},{"time_hours":29,"approval_perbill":964460786,"support_perbill":126691186,"approval":96.4460786,"support":12.6691186},{"time_hours":30,"approval_perbill":963235295,"support_perbill":123366639,"approval":96.3235295,"support":12.3366639},{"time_hours":31,"approval_perbill":962009805,"support_perbill":120202524,"approval":96.2009805,"support":12.0202524},{"time_hours":32,"approval_perbill":960784315,"support_perbill":117187499,"approval":96.0784315,"support":11.7187499},{"time_hours":33,"approval_perbill":959558825,"support_perbill":114311269,"approval":95.9558825,"support":11.4311269},{"time_hours":34,"approval_perbill":958333334,"support_perbill":111564465,"approval":95.8333334,"support":11.1564465},{"time_hours":35,"approval_perbill":957107844,"support_perbill":108938546,"approval":95.7107844,"support":10.8938546},{"time_hours":36,"approval_perbill":955882354,"support_perbill":106425701,"approval":95.5882354,"support":10.6425701},{"time_hours":37,"approval_perbill":954656864,"support_perbill":104018782,"approval":95.4656864,"support":10.4018782},{"time_hours":38,"approval_perbill":953431373,"support_perbill":101711228,"approval":95.3431373,"support":10.1711228},{"time_hours":39,"approval_perbill":952205883,"support_perbill":99497012,"approval":95.2205883,"support":9.9497012},{"time_hours":40,"approval_perbill":950980393,"support_perbill":97370582,"approval":95.0980393,"support":9.7370582},{"time_hours":41,"approval_perbill":949754903,"support_perbill":95326819,"approval":94.9754903,"support":9.5326819},{"time_hours":42,"approval_perbill":948529412,"support_perbill":93360994,"approval":94.8529412,"support":9.3360994},{"time_hours":43,"approval_perbill":947303922,"support_perbill":91468733,"approval":94.7303922,"support":9.1468733},{"time_hours":44,"approval_perbill":946078432,"support_perbill":89645982,"approval":94.6078432,"support":8.9645982},{"time_hours":45,"approval_perbill":944852942,"support_perbill":87888981,"approval":94.4852942,"support":8.7888981},{"time_hours":46,"approval_perbill":943627452,"support_perbill":86194234,"approval":94.3627452,"support":8.6194234},{"time_hours":47,"approval_perbill":942401961,"support_perbill":84558490,"approval":94.2401961,"support":8.455849},{"time_hours":48,"approval_perbill":941176471,"support_perbill":82978722,"approval":94.1176471,"support":8.2978722},{"time_hours":49,"approval_perbill":939950981,"support_perbill":81452103,"approval":93.9950981,"support":8.1452103},{"time_hours":50,"approval_perbill":938725491,"support_perbill":79975997,"approval":93.8725491,"support":7.9975997},{"time_hours":51,"approval_perbill":937500001,"support_perbill":78547936,"approval":93.7500001,"support":7.8547936},{"time_hours":52,"approval_perbill":936274511,"support_perbill":77165614,"approval":93.6274511,"support":7.7165614},{"time_hours":53,"approval_perbill":935049021,"support_perbill":75826867,"approval":93.5049021,"support":7.5826867},{"time_hours":54,"approval_perbill":933823531,"support_perbill":74529666,"approval":93.3823531,"support":7.4529666},{"time_hours":55,"approval_perbill":932598040,"support_perbill":73272106,"approval":93.259804,"support":7.3272106},{"time_hours":56,"approval_perbill":931372550,"support_perbill":72052400,"approval":93.137255,"support":7.20524},{"time_hours":57,"approval_perbill":930147060,"support_perbill":70868862,"approval":93.014706,"support":7.0868862},{"time_hours":58,"approval_perbill":928921570,"support_perbill":69719908,"approval":92.892157,"support":6.9719908},{"time_hours":59,"approval_perbill":927696079,"support_perbill":68604042,"approval":92.7696079,"support":6.8604042},{"time_hours":60,"approval_perbill":926470589,"support_perbill":67519857,"approval":92.6470589,"support":6.7519857},{"time_hours":61,"approval_perbill":925245099,"support_perbill":66466022,"approval":92.5245099,"support":6.6466022},{"time_hours":62,"approval_perbill":924019609,"support_perbill":65441280,"approval":92.4019609,"support":6.544128},{"time_hours":63,"approval_perbill":922794118,"support_perbill":64444443,"approval":92.2794118,"support":6.4444443},{"time_hours":64,"approval_perbill":921568628,"support_perbill":63474386,"approval":92.1568628,"support":6.3474386},{"time_hours":65,"approval_perbill":920343138,"support_perbill":62530044,"approval":92.0343138,"support":6.2530044},{"time_hours":66,"approval_perbill":919117648,"support_perbill":61610409,"approval":91.9117648,"support":6.1610409},{"time_hours":67,"approval_perbill":917892158,"support_perbill":60714523,"approval":91.7892158,"support":6.0714523},{"time_hours":68,"approval_perbill":916666667,"support_perbill":59841478,"approval":91.6666667,"support":5.9841478},{"time_hours":69,"approval_perbill":915441177,"support_perbill":58990411,"approval":91.5441177,"support":5.8990411},{"time_hours":70,"approval_perbill":914215687,"support_perbill":58160504,"approval":91.4215687,"support":5.8160504},{"time_hours":71,"approval_perbill":912990197,"support_perbill":57350975,"approval":91.2990197,"support":5.7350975},{"time_hours":72,"approval_perbill":911764706,"support_perbill":56561084,"approval":91.1764706,"support":5.6561084},{"time_hours":73,"approval_perbill":910539216,"support_perbill":55790126,"approval":91.0539216,"support":5.5790126},{"time_hours":74,"approval_perbill":909313726,"support_perbill":55037426,"approval":90.9313726,"support":5.5037426},{"time_hours":75,"approval_perbill":908088236,"support_perbill":54302345,"approval":90.8088236,"support":5.4302345},{"time_hours":76,"approval_perbill":906862746,"support_perbill":53584271,"approval":90.6862746,"support":5.3584271},{"time_hours":77,"approval_perbill":905637256,"support_perbill":52882620,"approval":90.5637256,"support":5.288262},{"time_hours":78,"approval_perbill":904411766,"support_perbill":52196835,"approval":90.4411766,"support":5.2196835},{"time_hours":79,"approval_perbill":903186276,"support_perbill":51526385,"approval":90.3186276,"support":5.1526385},{"time_hours":80,"approval_perbill":901960785,"support_perbill":50870759,"approval":90.1960785,"support":5.0870759},{"time_hours":81,"approval_perbill":900735295,"support_perbill":50229473,"approval":90.0735295,"support":5.0229473},{"time_hours":82,"approval_perbill":899509805,"support_perbill":49602061,"approval":89.9509805,"support":4.9602061},{"time_hours":83,"approval_perbill":898284315,"support_perbill":48988077,"approval":89.8284315,"support":4.8988077},{"time_hours":84,"approval_perbill":897058824,"support_perbill":48387095,"approval":89.7058824,"support":4.8387095},{"time_hours":85,"approval_perbill":895833334,"support_perbill":47798707,"approval":89.5833334,"support":4.7798707},{"time_hours":86,"approval_perbill":894607844,"support_perbill":47222519,"approval":89.4607844,"support":4.7222519},{"time_hours":87,"approval_perbill":893382354,"support_perbill":46658158,"approval":89.3382354,"support":4.6658158},{"time_hours":88,"approval_perbill":892156864,"support_perbill":46105262,"approval":89.2156864,"support":4.6105262},{"time_hours":89,"approval_perbill":890931373,"support_perbill":45563485,"approval":89.0931373,"support":4.5563485},{"time_hours":90,"approval_perbill":889705883,"support_perbill":45032496,"approval":88.9705883,"support":4.5032496},{"time_hours":91,"approval_perbill":888480393,"support_perbill":44511976,"approval":88.8480393,"support":4.4511976},{"time_hours":92,"approval_perbill":887254903,"support_perbill":44001617,"approval":88.7254903,"support":4.4001617},{"time_hours":93,"approval_perbill":886029412,"support_perbill":43501126,"approval":88.6029412,"support":4.3501126},{"time_hours":94,"approval_perbill":884803922,"support_perbill":43010218,"approval":88.4803922,"support":4.3010218},{"time_hours":95,"approval_perbill":883578432,"support_perbill":42528621,"approval":88.3578432,"support":4.2528621},{"time_hours":96,"approval_perbill":882352942,"support_perbill":42056074,"approval":88.2352942,"support":4.2056074},{"time_hours":97,"approval_perbill":881127452,"support_perbill":41592321,"approval":88.1127452,"support":4.1592321},{"time_hours":98,"approval_perbill":879901962,"support_perbill":41137122,"approval":87.9901962,"support":4.1137122},{"time_hours":99,"approval_perbill":878676472,"support_perbill":40690242,"approval":87.8676472,"support":4.0690242},{"time_hours":100,"approval_perbill":877450982,"support_perbill":40251453,"approval":87.7450982,"support":4.0251453},{"time_hours":101,"approval_perbill":876225491,"support_perbill":39820539,"approval":87.6225491,"support":3.9820539},{"time_hours":102,"approval_perbill":875000001,"support_perbill":39397289,"approval":87.5000001,"support":3.9397289},{"time_hours":103,"approval_perbill":873774511,"support_perbill":38981501,"approval":87.3774511,"support":3.8981501},{"time_hours":104,"approval_perbill":872549021,"support_perbill":38572980,"approval":87.2549021,"support":3.857298},{"time_hours":105,"approval_perbill":871323530,"support_perbill":38171535,"approval":87.132353,"support":3.8171535},{"time_hours":106,"approval_perbill":870098040,"support_perbill":37776985,"approval":87.009804,"support":3.7776985},{"time_hours":107,"approval_perbill":868872550,"support_perbill":37389155,"approval":86.887255,"support":3.7389155},{"time_hours":108,"approval_perbill":867647060,"support_perbill":37007873,"approval":86.764706,"support":3.7007873},{"time_hours":109,"approval_perbill":866421570,"support_perbill":36632975,"approval":86.642157,"support":3.6632975},{"time_hours":110,"approval_perbill":865196079,"support_perbill":36264302,"approval":86.5196079,"support":3.6264302},{"time_hours":111,"approval_perbill":863970589,"support_perbill":35901701,"approval":86.3970589,"support":3.5901701},{"time_hours":112,"approval_perbill":862745099,"support_perbill":35545023,"approval":86.2745099,"support":3.5545023},{"time_hours":113,"approval_perbill":861519609,"support_perbill":35194123,"approval":86.1519609,"support":3.5194123},{"time_hours":114,"approval_perbill":860294118,"support_perbill":34848862,"approval":86.0294118,"support":3.4848862},{"time_hours":115,"approval_perbill":859068628,"support_perbill":34509106,"approval":85.9068628,"support":3.4509106},{"time_hours":116,"approval_perbill":857843138,"support_perbill":34174724,"approval":85.7843138,"support":3.4174724},{"time_hours":117,"approval_perbill":856617648,"support_perbill":33845590,"approval":85.6617648,"support":3.384559},{"time_hours":118,"approval_perbill":855392157,"support_perbill":33521580,"approval":85.5392157,"support":3.352158},{"time_hours":119,"approval_perbill":854166667,"support_perbill":33202577,"approval":85.4166667,"support":3.3202577},{"time_hours":120,"approval_perbill":852941177,"support_perbill":32888464,"approval":85.2941177,"support":3.2888464},{"time_hours":121,"approval_perbill":851715687,"support_perbill":32579131,"approval":85.1715687,"support":3.2579131},{"time_hours":122,"approval_perbill":850490197,"support_perbill":32274469,"approval":85.0490197,"support":3.2274469},{"time_hours":123,"approval_perbill":849264707,"support_perbill":31974373,"approval":84.9264707,"support":3.1974373},{"time_hours":124,"approval_perbill":848039217,"support_perbill":31678741,"approval":84.8039217,"support":3.1678741},{"time_hours":125,"approval_perbill":846813727,"support_perbill":31387475,"approval":84.6813727,"support":3.1387475},{"time_hours":126,"approval_perbill":845588236,"support_perbill":31100477,"approval":84.5588236,"support":3.1100477},{"time_hours":127,"approval_perbill":844362746,"support_perbill":30817656,"approval":84.4362746,"support":3.0817656},{"time_hours":128,"approval_perbill":843137256,"support_perbill":30538921,"approval":84.3137256,"support":3.0538921},{"time_hours":129,"approval_perbill":841911766,"support_perbill":30264184,"approval":84.1911766,"support":3.0264184},{"time_hours":130,"approval_perbill":840686276,"support_perbill":29993358,"approval":84.0686276,"support":2.9993358},{"time_hours":131,"approval_perbill":839460785,"support_perbill":29726363,"approval":83.9460785,"support":2.9726363},{"time_hours":132,"approval_perbill":838235295,"support_perbill":29463116,"approval":83.8235295,"support":2.9463116},{"time_hours":133,"approval_perbill":837009805,"support_perbill":29203539,"approval":83.7009805,"support":2.9203539},{"time_hours":134,"approval_perbill":835784315,"support_perbill":28947556,"approval":83.5784315,"support":2.8947556},{"time_hours":135,"approval_perbill":834558824,"support_perbill":28695094,"approval":83.4558824,"support":2.8695094},{"time_hours":136,"approval_perbill":833333334,"support_perbill":28446079,"approval":83.3333334,"support":2.8446079},{"time_hours":137,"approval_perbill":832107844,"support_perbill":28200442,"approval":83.2107844,"support":2.8200442},{"time_hours":138,"approval_perbill":830882354,"support_perbill":27958114,"approval":83.0882354,"support":2.7958114},{"time_hours":139,"approval_perbill":829656863,"support_perbill":27719030,"approval":82.9656863,"support":2.771903},{"time_hours":140,"approval_perbill":828431373,"support_perbill":27483123,"approval":82.8431373,"support":2.7483123},{"time_hours":141,"approval_perbill":827205883,"support_perbill":27250333,"approval":82.7205883,"support":2.7250333},{"time_hours":142,"approval_perbill":825980393,"support_perbill":27020596,"approval":82.5980393,"support":2.7020596},{"time_hours":143,"approval_perbill":824754902,"support_perbill":26793853,"approval":82.4754902,"support":2.6793853},{"time_hours":144,"approval_perbill":823529412,"support_perbill":26570047,"approval":82.3529412,"support":2.6570047},{"time_hours":145,"approval_perbill":822303922,"support_perbill":26349121,"approval":82.2303922,"support":2.6349121},{"time_hours":146,"approval_perbill":821078432,"support_perbill":26131019,"approval":82.1078432,"support":2.6131019},{"time_hours":147,"approval_perbill":819852942,"support_perbill":25915687,"approval":81.9852942,"support":2.5915687},{"time_hours":148,"approval_perbill":818627452,"support_perbill":25703073,"approval":81.8627452,"support":2.5703073},{"time_hours":149,"approval_perbill":817401962,"support_perbill":25493126,"approval":81.7401962,"support":2.5493126},{"time_hours":150,"approval_perbill":816176472,"support_perbill":25285796,"approval":81.6176472,"support":2.5285796},{"time_hours":151,"approval_perbill":814950982,"support_perbill":25081035,"approval":81.4950982,"support":2.5081035},{"time_hours":152,"approval_perbill":813725491,"support_perbill":24878795,"approval":81.3725491,"support":2.4878795},{"time_hours":153,"approval_perbill":812500001,"support_perbill":24679029,"approval":81.2500001,"support":2.4679029},{"time_hours":154,"approval_perbill":811274511,"support_perbill":24481693,"approval":81.1274511,"support":2.4481693},{"time_hours":155,"approval_perbill":810049021,"support_perbill":24286742,"approval":81.0049021,"support":2.4286742},{"time_hours":156,"approval_perbill":808823530,"support_perbill":24094134,"approval":80.882353,"support":2.4094134},{"time_hours":157,"approval_perbill":807598040,"support_perbill":23903827,"approval":80.759804,"support":2.3903827},{"time_hours":158,"approval_perbill":806372550,"support_perbill":23715779,"approval":80.637255,"support":2.3715779},{"time_hours":159,"approval_perbill":805147060,"support_perbill":23529951,"approval":80.514706,"support":2.3529951},{"time_hours":160,"approval_perbill":803921569,"support_perbill":23346303,"approval":80.3921569,"support":2.3346303},{"time_hours":161,"approval_perbill":802696079,"support_perbill":23164797,"approval":80.2696079,"support":2.3164797},{"time_hours":162,"approval_perbill":801470589,"support_perbill":22985397,"approval":80.1470589,"support":2.2985397},{"time_hours":163,"approval_perbill":800245099,"support_perbill":22808065,"approval":80.0245099,"support":2.2808065},{"time_hours":164,"approval_perbill":799019608,"support_perbill":22632766,"approval":79.9019608,"support":2.2632766},{"time_hours":165,"approval_perbill":797794118,"support_perbill":22459466,"approval":79.7794118,"support":2.2459466},{"time_hours":166,"approval_perbill":796568628,"support_perbill":22288130,"approval":79.6568628,"support":2.228813},{"time_hours":167,"approval_perbill":795343138,"support_perbill":22118725,"approval":79.5343138,"support":2.2118725},{"time_hours":168,"approval_perbill":794117648,"support_perbill":21951219,"approval":79.4117648,"support":2.1951219},{"time_hours":169,"approval_perbill":792892158,"support_perbill":21785579,"approval":79.2892158,"support":2.1785579},{"time_hours":170,"approval_perbill":791666668,"support_perbill":21621776,"approval":79.1666668,"support":2.1621776},{"time_hours":171,"approval_perbill":790441178,"support_perbill":21459778,"approval":79.0441178,"support":2.1459778},{"time_hours":172,"approval_perbill":789215688,"support_perbill":21299556,"approval":78.9215688,"support":2.1299556},{"time_hours":173,"approval_perbill":787990197,"support_perbill":21141081,"approval":78.7990197,"support":2.1141081},{"time_hours":174,"approval_perbill":786764707,"support_perbill":20984324,"approval":78.6764707,"support":2.0984324},{"time_hours":175,"approval_perbill":785539217,"support_perbill":20829258,"approval":78.5539217,"support":2.0829258},{"time_hours":176,"approval_perbill":784313727,"support_perbill":20675855,"approval":78.4313727,"support":2.0675855},{"time_hours":177,"approval_perbill":783088236,"support_perbill":20524089,"approval":78.3088236,"support":2.0524089},{"time_hours":178,"approval_perbill":781862746,"support_perbill":20373934,"approval":78.1862746,"support":2.0373934},{"time_hours":179,"approval_perbill":780637256,"support_perbill":20225364,"approval":78.0637256,"support":2.0225364},{"time_hours":180,"approval_perbill":779411766,"support_perbill":20078354,"approval":77.9411766,"support":2.0078354},{"time_hours":181,"approval_perbill":778186275,"support_perbill":19932880,"approval":77.8186275,"support":1.993288},{"time_hours":182,"approval_perbill":776960785,"support_perbill":19788917,"approval":77.6960785,"support":1.9788917},{"time_hours":183,"approval_perbill":775735295,"support_perbill":19646444,"approval":77.5735295,"support":1.9646444},{"time_hours":184,"approval_perbill":774509805,"support_perbill":19505435,"approval":77.4509805,"support":1.9505435},{"time_hours":185,"approval_perbill":773284314,"support_perbill":19365870,"approval":77.3284314,"support":1.936587},{"time_hours":186,"approval_perbill":772058824,"support_perbill":19227725,"approval":77.2058824,"support":1.9227725},{"time_hours":187,"approval_perbill":770833334,"support_perbill":19090980,"approval":77.0833334,"support":1.909098},{"time_hours":188,"approval_perbill":769607844,"support_perbill":18955613,"approval":76.9607844,"support":1.8955613},{"time_hours":189,"approval_perbill":768382353,"support_perbill":18821603,"approval":76.8382353,"support":1.8821603},{"time_hours":190,"approval_perbill":767156863,"support_perbill":18688931,"approval":76.7156863,"support":1.8688931},{"time_hours":191,"approval_perbill":765931373,"support_perbill":18557575,"approval":76.5931373,"support":1.8557575},{"time_hours":192,"approval_perbill":764705883,"support_perbill":18427518,"approval":76.4705883,"support":1.8427518},{"time_hours":193,"approval_perbill":763480393,"support_perbill":18298739,"approval":76.3480393,"support":1.8298739},{"time_hours":194,"approval_perbill":762254903,"support_perbill":18171219,"approval":76.2254903,"support":1.8171219},{"time_hours":195,"approval_perbill":761029413,"support_perbill":18044941,"approval":76.1029413,"support":1.8044941},{"time_hours":196,"approval_perbill":759803923,"support_perbill":17919887,"approval":75.9803923,"support":1.7919887},{"time_hours":197,"approval_perbill":758578433,"support_perbill":17796038,"approval":75.8578433,"support":1.7796038},{"time_hours":198,"approval_perbill":757352942,"support_perbill":17673377,"approval":75.7352942,"support":1.7673377},{"time_hours":199,"approval_perbill":756127452,"support_perbill":17551888,"approval":75.6127452,"support":1.7551888},{"time_hours":200,"approval_perbill":754901962,"support_perbill":17431553,"approval":75.4901962,"support":1.7431553},{"time_hours":201,"approval_perbill":753676472,"support_perbill":17312357,"approval":75.3676472,"support":1.7312357},{"time_hours":202,"approval_perbill":752450981,"support_perbill":17194282,"approval":75.2450981,"support":1.7194282},{"time_hours":203,"approval_perbill":751225491,"support_perbill":17077315,"approval":75.1225491,"support":1.7077315},{"time_hours":204,"approval_perbill":750000001,"support_perbill":16961437,"approval":75.0000001,"support":1.6961437},{"time_hours":205,"approval_perbill":748774511,"support_perbill":16846636,"approval":74.8774511,"support":1.6846636},{"time_hours":206,"approval_perbill":747549020,"support_perbill":16732895,"approval":74.754902,"support":1.6732895},{"time_hours":207,"approval_perbill":746323530,"support_perbill":16620201,"approval":74.632353,"support":1.6620201},{"time_hours":208,"approval_perbill":745098040,"support_perbill":16508538,"approval":74.509804,"support":1.6508538},{"time_hours":209,"approval_perbill":743872550,"support_perbill":16397893,"approval":74.387255,"support":1.6397893},{"time_hours":210,"approval_perbill":742647059,"support_perbill":16288252,"approval":74.2647059,"support":1.6288252},{"time_hours":211,"approval_perbill":741421569,"support_perbill":16179601,"approval":74.1421569,"support":1.6179601},{"time_hours":212,"approval_perbill":740196079,"support_perbill":16071927,"approval":74.0196079,"support":1.6071927},{"time_hours":213,"approval_perbill":738970589,"support_perbill":15965217,"approval":73.8970589,"support":1.5965217},{"time_hours":214,"approval_perbill":737745099,"support_perbill":15859457,"approval":73.7745099,"support":1.5859457},{"time_hours":215,"approval_perbill":736519608,"support_perbill":15754636,"approval":73.6519608,"support":1.5754636},{"time_hours":216,"approval_perbill":735294118,"support_perbill":15650741,"approval":73.5294118,"support":1.5650741},{"time_hours":217,"approval_perbill":734068628,"support_perbill":15547759,"approval":73.4068628,"support":1.5547759},{"time_hours":218,"approval_perbill":732843138,"support_perbill":15445679,"approval":73.2843138,"support":1.5445679},{"time_hours":219,"approval_perbill":731617648,"support_perbill":15344488,"approval":73.1617648,"support":1.5344488},{"time_hours":220,"approval_perbill":730392158,"support_perbill":15244176,"approval":73.0392158,"support":1.5244176},{"time_hours":221,"approval_perbill":729166668,"support_perbill":15144731,"approval":72.9166668,"support":1.5144731},{"time_hours":222,"approval_perbill":727941178,"support_perbill":15046141,"approval":72.7941178,"support":1.5046141},{"time_hours":223,"approval_perbill":726715687,"support_perbill":14948396,"approval":72.6715687,"support":1.4948396},{"time_hours":224,"approval_perbill":725490197,"support_perbill":14851485,"approval":72.5490197,"support":1.4851485},{"time_hours":225,"approval_perbill":724264707,"support_perbill":14755396,"approval":72.4264707,"support":1.4755396},{"time_hours":226,"approval_perbill":723039217,"support_perbill":14660121,"approval":72.3039217,"support":1.4660121},{"time_hours":227,"approval_perbill":721813726,"support_perbill":14565648,"approval":72.1813726,"support":1.4565648},{"time_hours":228,"approval_perbill":720588236,"support_perbill":14471968,"approval":72.0588236,"support":1.4471968},{"time_hours":229,"approval_perbill":719362746,"support_perbill":14379070,"approval":71.9362746,"support":1.437907},{"time_hours":230,"approval_perbill":718137256,"support_perbill":14286945,"approval":71.8137256,"support":1.4286945},{"time_hours":231,"approval_perbill":716911765,"support_perbill":14195583,"approval":71.6911765,"support":1.4195583},{"time_hours":232,"approval_perbill":715686275,"support_perbill":14104975,"approval":71.5686275,"support":1.4104975},{"time_hours":233,"approval_perbill":714460785,"support_perbill":14015111,"approval":71.4460785,"support":1.4015111},{"time_hours":234,"approval_perbill":713235295,"support_perbill":13925982,"approval":71.3235295,"support":1.3925982},{"time_hours":235,"approval_perbill":712009805,"support_perbill":13837579,"approval":71.2009805,"support":1.3837579},{"time_hours":236,"approval_perbill":710784314,"support_perbill":13749894,"approval":71.0784314,"support":1.3749894},{"time_hours":237,"approval_perbill":709558824,"support_perbill":13662918,"approval":70.9558824,"support":1.3662918},{"time_hours":238,"approval_perbill":708333334,"support_perbill":13576642,"approval":70.8333334,"support":1.3576642},{"time_hours":239,"approval_perbill":707107844,"support_perbill":13491057,"approval":70.7107844,"support":1.3491057},{"time_hours":240,"approval_perbill":705882353,"support_perbill":13406156,"approval":70.5882353,"support":1.3406156},{"time_hours":241,"approval_perbill":704656863,"support_perbill":13321931,"approval":70.4656863,"support":1.3321931},{"time_hours":242,"approval_perbill":703431373,"support_perbill":13238372,"approval":70.3431373,"support":1.3238372},{"time_hours":243,"approval_perbill":702205883,"support_perbill":13155473,"approval":70.2205883,"support":1.3155473},{"time_hours":244,"approval_perbill":700980393,"support_perbill":13073226,"approval":70.0980393,"support":1.3073226},{"time_hours":245,"approval_perbill":699754903,"support_perbill":12991622,"approval":69.9754903,"support":1.2991622},{"time_hours":246,"approval_perbill":698529413,"support_perbill":12910655,"approval":69.8529413,"support":1.2910655},{"time_hours":247,"approval_perbill":697303923,"support_perbill":12830317,"approval":69.7303923,"support":1.2830317},{"time_hours":248,"approval_perbill":696078432,"support_perbill":12750601,"approval":69.6078432,"support":1.2750601},{"time_hours":249,"approval_perbill":694852942,"support_perbill":12671499,"approval":69.4852942,"support":1.2671499},{"time_hours":250,"approval_perbill":693627452,"support_perbill":12593005,"approval":69.3627452,"support":1.2593005},{"time_hours":251,"approval_perbill":692401962,"support_perbill":12515111,"approval":69.2401962,"support":1.2515111},{"time_hours":252,"approval_perbill":691176471,"support_perbill":12437810,"approval":69.1176471,"support":1.243781},{"time_hours":253,"approval_perbill":689950981,"support_perbill":12361097,"approval":68.9950981,"support":1.2361097},{"time_hours":254,"approval_perbill":688725491,"support_perbill":12284964,"approval":68.8725491,"support":1.2284964},{"time_hours":255,"approval_perbill":687500001,"support_perbill":12209404,"approval":68.7500001,"support":1.2209404},{"time_hours":256,"approval_perbill":686274511,"support_perbill":12134411,"approval":68.6274511,"support":1.2134411},{"time_hours":257,"approval_perbill":685049020,"support_perbill":12059980,"approval":68.504902,"support":1.205998},{"time_hours":258,"approval_perbill":683823530,"support_perbill":11986103,"approval":68.382353,"support":1.1986103},{"time_hours":259,"approval_perbill":682598040,"support_perbill":11912774,"approval":68.259804,"support":1.1912774},{"time_hours":260,"approval_perbill":681372550,"support_perbill":11839987,"approval":68.137255,"support":1.1839987},{"time_hours":261,"approval_perbill":680147059,"support_perbill":11767737,"approval":68.0147059,"support":1.1767737},{"time_hours":262,"approval_perbill":678921569,"support_perbill":11696017,"approval":67.8921569,"support":1.1696017},{"time_hours":263,"approval_perbill":677696079,"support_perbill":11624822,"approval":67.7696079,"support":1.1624822},{"time_hours":264,"approval_perbill":676470589,"support_perbill":11554145,"approval":67.6470589,"support":1.1554145},{"time_hours":265,"approval_perbill":675245099,"support_perbill":11483982,"approval":67.5245099,"support":1.1483982},{"time_hours":266,"approval_perbill":674019609,"support_perbill":11414326,"approval":67.4019609,"support":1.1414326},{"time_hours":267,"approval_perbill":672794119,"support_perbill":11345173,"approval":67.2794119,"support":1.1345173},{"time_hours":268,"approval_perbill":671568629,"support_perbill":11276516,"approval":67.1568629,"support":1.1276516},{"time_hours":269,"approval_perbill":670343138,"support_perbill":11208351,"approval":67.0343138,"support":1.1208351},{"time_hours":270,"approval_perbill":669117648,"support_perbill":11140671,"approval":66.9117648,"support":1.1140671},{"time_hours":271,"approval_perbill":667892158,"support_perbill":11073473,"approval":66.7892158,"support":1.1073473},{"time_hours":272,"approval_perbill":666666668,"support_perbill":11006750,"approval":66.6666668,"support":1.100675},{"time_hours":273,"approval_perbill":665441177,"support_perbill":10940499,"approval":66.5441177,"support":1.0940499},{"time_hours":274,"approval_perbill":664215687,"support_perbill":10874713,"approval":66.4215687,"support":1.0874713},{"time_hours":275,"approval_perbill":662990197,"support_perbill":10809388,"approval":66.2990197,"support":1.0809388},{"time_hours":276,"approval_perbill":661764707,"support_perbill":10744519,"approval":66.1764707,"support":1.0744519},{"time_hours":277,"approval_perbill":660539217,"support_perbill":10680101,"approval":66.0539217,"support":1.0680101},{"time_hours":278,"approval_perbill":659313726,"support_perbill":10616130,"approval":65.9313726,"support":1.061613},{"time_hours":279,"approval_perbill":658088236,"support_perbill":10552601,"approval":65.8088236,"support":1.0552601},{"time_hours":280,"approval_perbill":656862746,"support_perbill":10489510,"approval":65.6862746,"support":1.048951},{"time_hours":281,"approval_perbill":655637256,"support_perbill":10426852,"approval":65.5637256,"support":1.0426852},{"time_hours":282,"approval_perbill":654411765,"support_perbill":10364622,"approval":65.4411765,"support":1.0364622},{"time_hours":283,"approval_perbill":653186275,"support_perbill":10302816,"approval":65.3186275,"support":1.0302816},{"time_hours":284,"approval_perbill":651960785,"support_perbill":10241430,"approval":65.1960785,"support":1.024143},{"time_hours":285,"approval_perbill":650735295,"support_perbill":10180459,"approval":65.0735295,"support":1.0180459},{"time_hours":286,"approval_perbill":649509804,"support_perbill":10119900,"approval":64.9509804,"support":1.01199},{"time_hours":287,"approval_perbill":648284314,"support_perbill":10059748,"approval":64.8284314,"support":1.0059748},{"time_hours":288,"approval_perbill":647058824,"support_perbill":10000000,"approval":64.7058824,"support":1},{"time_hours":289,"approval_perbill":645833334,"support_perbill":9940650,"approval":64.5833334,"support":0.994065},{"time_hours":290,"approval_perbill":644607844,"support_perbill":9881695,"approval":64.4607844,"support":0.9881695},{"time_hours":291,"approval_perbill":643382354,"support_perbill":9823132,"approval":64.3382354,"support":0.9823132},{"time_hours":292,"approval_perbill":642156864,"support_perbill":9764955,"approval":64.2156864,"support":0.9764955},{"time_hours":293,"approval_perbill":640931374,"support_perbill":9707163,"approval":64.0931374,"support":0.9707163},{"time_hours":294,"approval_perbill":639705883,"support_perbill":9649749,"approval":63.9705883,"support":0.9649749},{"time_hours":295,"approval_perbill":638480393,"support_perbill":9592712,"approval":63.8480393,"support":0.9592712},{"time_hours":296,"approval_perbill":637254903,"support_perbill":9536047,"approval":63.7254903,"support":0.9536047},{"time_hours":297,"approval_perbill":636029413,"support_perbill":9479751,"approval":63.6029413,"support":0.9479751},{"time_hours":298,"approval_perbill":634803923,"support_perbill":9423820,"approval":63.4803923,"support":0.942382},{"time_hours":299,"approval_perbill":633578432,"support_perbill":9368250,"approval":63.3578432,"support":0.936825},{"time_hours":300,"approval_perbill":632352942,"support_perbill":9313038,"approval":63.2352942,"support":0.9313038},{"time_hours":301,"approval_perbill":631127452,"support_perbill":9258181,"approval":63.1127452,"support":0.9258181},{"time_hours":302,"approval_perbill":629901962,"support_perbill":9203674,"approval":62.9901962,"support":0.9203674},{"time_hours":303,"approval_perbill":628676471,"support_perbill":9149516,"approval":62.8676471,"support":0.9149516},{"time_hours":304,"approval_perbill":627450981,"support_perbill":9095702,"approval":62.7450981,"support":0.9095702},{"time_hours":305,"approval_perbill":626225491,"support_perbill":9042230,"approval":62.6225491,"support":0.904223},{"time_hours":306,"approval_perbill":625000001,"support_perbill":8989095,"approval":62.5000001,"support":0.8989095},{"time_hours":307,"approval_perbill":623774510,"support_perbill":8936295,"approval":62.377451,"support":0.8936295},{"time_hours":308,"approval_perbill":622549020,"support_perbill":8883826,"approval":62.254902,"support":0.8883826},{"time_hours":309,"approval_perbill":621323530,"support_perbill":8831687,"approval":62.132353,"support":0.8831687},{"time_hours":310,"approval_perbill":620098040,"support_perbill":8779872,"approval":62.009804,"support":0.8779872},{"time_hours":311,"approval_perbill":618872549,"support_perbill":8728380,"approval":61.8872549,"support":0.872838},{"time_hours":312,"approval_perbill":617647059,"support_perbill":8677207,"approval":61.7647059,"support":0.8677207},{"time_hours":313,"approval_perbill":616421569,"support_perbill":8626351,"approval":61.6421569,"support":0.8626351},{"time_hours":314,"approval_perbill":615196079,"support_perbill":8575808,"approval":61.5196079,"support":0.8575808},{"time_hours":315,"approval_perbill":613970589,"support_perbill":8525576,"approval":61.3970589,"support":0.8525576},{"time_hours":316,"approval_perbill":612745099,"support_perbill":8475652,"approval":61.2745099,"support":0.8475652},{"time_hours":317,"approval_perbill":611519609,"support_perbill":8426032,"approval":61.1519609,"support":0.8426032},{"time_hours":318,"approval_perbill":610294119,"support_perbill":8376715,"approval":61.0294119,"support":0.8376715},{"time_hours":319,"approval_perbill":609068629,"support_perbill":8327697,"approval":60.9068629,"support":0.8327697},{"time_hours":320,"approval_perbill":607843138,"support_perbill":8278976,"approval":60.7843138,"support":0.8278976},{"time_hours":321,"approval_perbill":606617648,"support_perbill":8230549,"approval":60.6617648,"support":0.8230549},{"time_hours":322,"approval_perbill":605392158,"support_perbill":8182413,"approval":60.5392158,"support":0.8182413},{"time_hours":323,"approval_perbill":604166668,"support_perbill":8134566,"approval":60.4166668,"support":0.8134566},{"time_hours":324,"approval_perbill":602941177,"support_perbill":8087005,"approval":60.2941177,"support":0.8087005},{"time_hours":325,"approval_perbill":601715687,"support_perbill":8039727,"approval":60.1715687,"support":0.8039727},{"time_hours":326,"approval_perbill":600490197,"support_perbill":7992731,"approval":60.0490197,"support":0.7992731},{"time_hours":327,"approval_perbill":599264707,"support_perbill":7946013,"approval":59.9264707,"support":0.7946013},{"time_hours":328,"approval_perbill":598039216,"support_perbill":7899571,"approval":59.8039216,"support":0.7899571},{"time_hours":329,"approval_perbill":596813726,"support_perbill":7853403,"approval":59.6813726,"support":0.7853403},{"time_hours":330,"approval_perbill":595588236,"support_perbill":7807506,"approval":59.5588236,"support":0.7807506},{"time_hours":331,"approval_perbill":594362746,"support_perbill":7761878,"approval":59.4362746,"support":0.7761878},{"time_hours":332,"approval_perbill":593137255,"support_perbill":7716516,"approval":59.3137255,"support":0.7716516},{"time_hours":333,"approval_perbill":591911765,"support_perbill":7671418,"approval":59.1911765,"support":0.7671418},{"time_hours":334,"approval_perbill":590686275,"support_perbill":7626583,"approval":59.0686275,"support":0.7626583},{"time_hours":335,"approval_perbill":589460785,"support_perbill":7582007,"approval":58.9460785,"support":0.7582007},{"time_hours":336,"approval_perbill":588235295,"support_perbill":7537688,"approval":58.8235295,"support":0.7537688},{"time_hours":337,"approval_perbill":587009805,"support_perbill":7493624,"approval":58.7009805,"support":0.7493624},{"time_hours":338,"approval_perbill":585784315,"support_perbill":7449814,"approval":58.5784315,"support":0.7449814},{"time_hours":339,"approval_perbill":584558825,"support_perbill":7406254,"approval":58.4558825,"support":0.7406254},{"time_hours":340,"approval_perbill":583333335,"support_perbill":7362942,"approval":58.3333335,"support":0.7362942},{"time_hours":341,"approval_perbill":582107844,"support_perbill":7319878,"approval":58.2107844,"support":0.7319878},{"time_hours":342,"approval_perbill":580882354,"support_perbill":7277057,"approval":58.0882354,"support":0.7277057},{"time_hours":343,"approval_perbill":579656864,"support_perbill":7234479,"approval":57.9656864,"support":0.7234479},{"time_hours":344,"approval_perbill":578431374,"support_perbill":7192141,"approval":57.8431374,"support":0.7192141},{"time_hours":345,"approval_perbill":577205883,"support_perbill":7150041,"approval":57.7205883,"support":0.7150041},{"time_hours":346,"approval_perbill":575980393,"support_perbill":7108178,"approval":57.5980393,"support":0.7108178},{"time_hours":347,"approval_perbill":574754903,"support_perbill":7066548,"approval":57.4754903,"support":0.7066548},{"time_hours":348,"approval_perbill":573529413,"support_perbill":7025151,"approval":57.3529413,"support":0.7025151},{"time_hours":349,"approval_perbill":572303922,"support_perbill":6983985,"approval":57.2303922,"support":0.6983985},{"time_hours":350,"approval_perbill":571078432,"support_perbill":6943047,"approval":57.1078432,"support":0.6943047},{"time_hours":351,"approval_perbill":569852942,"support_perbill":6902335,"approval":56.9852942,"support":0.6902335},{"time_hours":352,"approval_perbill":568627452,"support_perbill":6861848,"approval":56.8627452,"support":0.6861848},{"time_hours":353,"approval_perbill":567401961,"support_perbill":6821584,"approval":56.7401961,"support":0.6821584},{"time_hours":354,"approval_perbill":566176471,"support_perbill":6781540,"approval":56.6176471,"support":0.678154},{"time_hours":355,"approval_perbill":564950981,"support_perbill":6741716,"approval":56.4950981,"support":0.6741716},{"time_hours":356,"approval_perbill":563725491,"support_perbill":6702109,"approval":56.3725491,"support":0.6702109},{"time_hours":357,"approval_perbill":562500000,"support_perbill":6662718,"approval":56.25,"support":0.6662718},{"time_hours":358,"approval_perbill":561274510,"support_perbill":6623541,"approval":56.127451,"support":0.6623541},{"time_hours":359,"approval_perbill":560049020,"support_perbill":6584575,"approval":56.004902,"support":0.6584575},{"time_hours":360,"approval_perbill":558823530,"support_perbill":6545820,"approval":55.882353,"support":0.654582},{"time_hours":361,"approval_perbill":557598040,"support_perbill":6507274,"approval":55.759804,"support":0.6507274},{"time_hours":362,"approval_perbill":556372550,"support_perbill":6468935,"approval":55.637255,"support":0.6468935},{"time_hours":363,"approval_perbill":555147060,"support_perbill":6430801,"approval":55.514706,"support":0.6430801},{"time_hours":364,"approval_perbill":553921570,"support_perbill":6392871,"approval":55.392157,"support":0.6392871},{"time_hours":365,"approval_perbill":552696080,"support_perbill":6355142,"approval":55.269608,"support":0.6355142},{"time_hours":366,"approval_perbill":551470589,"support_perbill":6317615,"approval":55.1470589,"support":0.6317615},{"time_hours":367,"approval_perbill":550245099,"support_perbill":6280286,"approval":55.0245099,"support":0.6280286},{"time_hours":368,"approval_perbill":549019609,"support_perbill":6243154,"approval":54.9019609,"support":0.6243154},{"time_hours":369,"approval_perbill":547794119,"support_perbill":6206218,"approval":54.7794119,"support":0.6206218},{"time_hours":370,"approval_perbill":546568628,"support_perbill":6169476,"approval":54.6568628,"support":0.6169476},{"time_hours":371,"approval_perbill":545343138,"support_perbill":6132927,"approval":54.5343138,"support":0.6132927},{"time_hours":372,"approval_perbill":544117648,"support_perbill":6096569,"approval":54.4117648,"support":0.6096569},{"time_hours":373,"approval_perbill":542892158,"support_perbill":6060401,"approval":54.2892158,"support":0.6060401},{"time_hours":374,"approval_perbill":541666667,"support_perbill":6024421,"approval":54.1666667,"support":0.6024421},{"time_hours":375,"approval_perbill":540441177,"support_perbill":5988627,"approval":54.0441177,"support":0.5988627},{"time_hours":376,"approval_perbill":539215687,"support_perbill":5953019,"approval":53.9215687,"support":0.5953019},{"time_hours":377,"approval_perbill":537990197,"support_perbill":5917595,"approval":53.7990197,"support":0.5917595},{"time_hours":378,"approval_perbill":536764706,"support_perbill":5882353,"approval":53.6764706,"support":0.5882353},{"time_hours":379,"approval_perbill":535539216,"support_perbill":5847292,"approval":53.5539216,"support":0.5847292},{"time_hours":380,"approval_perbill":534313726,"support_perbill":5812410,"approval":53.4313726,"support":0.581241},{"time_hours":381,"approval_perbill":533088236,"support_perbill":5777707,"approval":53.3088236,"support":0.5777707},{"time_hours":382,"approval_perbill":531862746,"support_perbill":5743181,"approval":53.1862746,"support":0.5743181},{"time_hours":383,"approval_perbill":530637255,"support_perbill":5708830,"approval":53.0637255,"support":0.570883},{"time_hours":384,"approval_perbill":529411765,"support_perbill":5674653,"approval":52.9411765,"support":0.5674653},{"time_hours":385,"approval_perbill":528186275,"support_perbill":5640649,"approval":52.8186275,"support":0.5640649},{"time_hours":386,"approval_perbill":526960785,"support_perbill":5606817,"approval":52.6960785,"support":0.5606817},{"time_hours":387,"approval_perbill":525735295,"support_perbill":5573155,"approval":52.5735295,"support":0.5573155},{"time_hours":388,"approval_perbill":524509805,"support_perbill":5539662,"approval":52.4509805,"support":0.5539662},{"time_hours":389,"approval_perbill":523284315,"support_perbill":5506336,"approval":52.3284315,"support":0.5506336},{"time_hours":390,"approval_perbill":522058825,"support_perbill":5473177,"approval":52.2058825,"support":0.5473177},{"time_hours":391,"approval_perbill":520833334,"support_perbill":5440183,"approval":52.0833334,"support":0.5440183},{"time_hours":392,"approval_perbill":519607844,"support_perbill":5407354,"approval":51.9607844,"support":0.5407354},{"time_hours":393,"approval_perbill":518382354,"support_perbill":5374687,"approval":51.8382354,"support":0.5374687},{"time_hours":394,"approval_perbill":517156864,"support_perbill":5342181,"approval":51.7156864,"support":0.5342181},{"time_hours":395,"approval_perbill":515931373,"support_perbill":5309836,"approval":51.5931373,"support":0.5309836},{"time_hours":396,"approval_perbill":514705883,"support_perbill":5277650,"approval":51.4705883,"support":0.527765},{"time_hours":397,"approval_perbill":513480393,"support_perbill":5245622,"approval":51.3480393,"support":0.5245622},{"time_hours":398,"approval_perbill":512254903,"support_perbill":5213751,"approval":51.2254903,"support":0.5213751},{"time_hours":399,"approval_perbill":511029412,"support_perbill":5182035,"approval":51.1029412,"support":0.5182035},{"time_hours":400,"approval_perbill":509803922,"support_perbill":5150474,"approval":50.9803922,"support":0.5150474},{"time_hours":401,"approval_perbill":508578432,"support_perbill":5119067,"approval":50.8578432,"support":0.5119067},{"time_hours":402,"approval_perbill":507352942,"support_perbill":5087812,"approval":50.7352942,"support":0.5087812},{"time_hours":403,"approval_perbill":506127452,"support_perbill":5056708,"approval":50.6127452,"support":0.5056708},{"time_hours":404,"approval_perbill":504901961,"support_perbill":5025754,"approval":50.4901961,"support":0.5025754},{"time_hours":405,"approval_perbill":503676471,"support_perbill":4994949,"approval":50.3676471,"support":0.4994949},{"time_hours":406,"approval_perbill":502450981,"support_perbill":4964292,"approval":50.2450981,"support":0.4964292},{"time_hours":407,"approval_perbill":501225491,"support_perbill":4933782,"approval":50.1225491,"support":0.4933782},{"time_hours":408,"approval_perbill":500000000,"support_perbill":4903417,"approval":50,"support":0.4903417},{"time_hours":409,"approval_perbill":500000000,"support_perbill":4873198,"approval":50,"support":0.4873198},{"time_hours":410,"approval_perbill":500000000,"support_perbill":4843122,"approval":50,"support":0.4843122},{"time_hours":411,"approval_perbill":500000000,"support_perbill":4813189,"approval":50,"support":0.4813189},{"time_hours":412,"approval_perbill":500000000,"support_perbill":4783398,"approval":50,"support":0.4783398},{"time_hours":413,"approval_perbill":500000000,"support_perbill":4753747,"approval":50,"support":0.4753747},{"time_hours":414,"approval_perbill":500000000,"support_perbill":4724236,"approval":50,"support":0.4724236},{"time_hours":415,"approval_perbill":500000000,"support_perbill":4694864,"approval":50,"support":0.4694864},{"time_hours":416,"approval_perbill":500000000,"support_perbill":4665630,"approval":50,"support":0.466563},{"time_hours":417,"approval_perbill":500000000,"support_perbill":4636532,"approval":50,"support":0.4636532},{"time_hours":418,"approval_perbill":500000000,"support_perbill":4607570,"approval":50,"support":0.460757},{"time_hours":419,"approval_perbill":500000000,"support_perbill":4578743,"approval":50,"support":0.4578743},{"time_hours":420,"approval_perbill":500000000,"support_perbill":4550050,"approval":50,"support":0.455005},{"time_hours":421,"approval_perbill":500000000,"support_perbill":4521490,"approval":50,"support":0.452149},{"time_hours":422,"approval_perbill":500000000,"support_perbill":4493062,"approval":50,"support":0.4493062},{"time_hours":423,"approval_perbill":500000000,"support_perbill":4464766,"approval":50,"support":0.4464766},{"time_hours":424,"approval_perbill":500000000,"support_perbill":4436599,"approval":50,"support":0.4436599},{"time_hours":425,"approval_perbill":500000000,"support_perbill":4408562,"approval":50,"support":0.4408562},{"time_hours":426,"approval_perbill":500000000,"support_perbill":4380654,"approval":50,"support":0.4380654},{"time_hours":427,"approval_perbill":500000000,"support_perbill":4352873,"approval":50,"support":0.4352873},{"time_hours":428,"approval_perbill":500000000,"support_perbill":4325218,"approval":50,"support":0.4325218},{"time_hours":429,"approval_perbill":500000000,"support_perbill":4297690,"approval":50,"support":0.429769},{"time_hours":430,"approval_perbill":500000000,"support_perbill":4270287,"approval":50,"support":0.4270287},{"time_hours":431,"approval_perbill":500000000,"support_perbill":4243007,"approval":50,"support":0.4243007},{"time_hours":432,"approval_perbill":500000000,"support_perbill":4215851,"approval":50,"support":0.4215851},{"time_hours":433,"approval_perbill":500000000,"support_perbill":4188818,"approval":50,"support":0.4188818},{"time_hours":434,"approval_perbill":500000000,"support_perbill":4161906,"approval":50,"support":0.4161906},{"time_hours":435,"approval_perbill":500000000,"support_perbill":4135115,"approval":50,"support":0.4135115},{"time_hours":436,"approval_perbill":500000000,"support_perbill":4108444,"approval":50,"support":0.4108444},{"time_hours":437,"approval_perbill":500000000,"support_perbill":4081892,"approval":50,"support":0.4081892},{"time_hours":438,"approval_perbill":500000000,"support_perbill":4055459,"approval":50,"support":0.4055459},{"time_hours":439,"approval_perbill":500000000,"support_perbill":4029143,"approval":50,"support":0.4029143},{"time_hours":440,"approval_perbill":500000000,"support_perbill":4002944,"approval":50,"support":0.4002944},{"time_hours":441,"approval_perbill":500000000,"support_perbill":3976862,"approval":50,"support":0.3976862},{"time_hours":442,"approval_perbill":500000000,"support_perbill":3950894,"approval":50,"support":0.3950894},{"time_hours":443,"approval_perbill":500000000,"support_perbill":3925041,"approval":50,"support":0.3925041},{"time_hours":444,"approval_perbill":500000000,"support_perbill":3899302,"approval":50,"support":0.3899302},{"time_hours":445,"approval_perbill":500000000,"support_perbill":3873676,"approval":50,"support":0.3873676},{"time_hours":446,"approval_perbill":500000000,"support_perbill":3848162,"approval":50,"support":0.3848162},{"time_hours":447,"approval_perbill":500000000,"support_perbill":3822760,"approval":50,"support":0.382276},{"time_hours":448,"approval_perbill":500000000,"support_perbill":3797468,"approval":50,"support":0.3797468},{"time_hours":449,"approval_perbill":500000000,"support_perbill":3772287,"approval":50,"support":0.3772287},{"time_hours":450,"approval_perbill":500000000,"support_perbill":3747215,"approval":50,"support":0.3747215},{"time_hours":451,"approval_perbill":500000000,"support_perbill":3722251,"approval":50,"support":0.3722251},{"time_hours":452,"approval_perbill":500000000,"support_perbill":3697396,"approval":50,"support":0.3697396},{"time_hours":453,"approval_perbill":500000000,"support_perbill":3672648,"approval":50,"support":0.3672648},{"time_hours":454,"approval_perbill":500000000,"support_perbill":3648006,"approval":50,"support":0.3648006},{"time_hours":455,"approval_perbill":500000000,"support_perbill":3623471,"approval":50,"support":0.3623471},{"time_hours":456,"approval_perbill":500000000,"support_perbill":3599040,"approval":50,"support":0.359904},{"time_hours":457,"approval_perbill":500000000,"support_perbill":3574714,"approval":50,"support":0.3574714},{"time_hours":458,"approval_perbill":500000000,"support_perbill":3550492,"approval":50,"support":0.3550492},{"time_hours":459,"approval_perbill":500000000,"support_perbill":3526373,"approval":50,"support":0.3526373},{"time_hours":460,"approval_perbill":500000000,"support_perbill":3502357,"approval":50,"support":0.3502357},{"time_hours":461,"approval_perbill":500000000,"support_perbill":3478442,"approval":50,"support":0.3478442},{"time_hours":462,"approval_perbill":500000000,"support_perbill":3454629,"approval":50,"support":0.3454629},{"time_hours":463,"approval_perbill":500000000,"support_perbill":3430916,"approval":50,"support":0.3430916},{"time_hours":464,"approval_perbill":500000000,"support_perbill":3407304,"approval":50,"support":0.3407304},{"time_hours":465,"approval_perbill":500000000,"support_perbill":3383790,"approval":50,"support":0.338379},{"time_hours":466,"approval_perbill":500000000,"support_perbill":3360376,"approval":50,"support":0.3360376},{"time_hours":467,"approval_perbill":500000000,"support_perbill":3337059,"approval":50,"support":0.3337059},{"time_hours":468,"approval_perbill":500000000,"support_perbill":3313840,"approval":50,"support":0.331384},{"time_hours":469,"approval_perbill":500000000,"support_perbill":3290718,"approval":50,"support":0.3290718},{"time_hours":470,"approval_perbill":500000000,"support_perbill":3267692,"approval":50,"support":0.3267692},{"time_hours":471,"approval_perbill":500000000,"support_perbill":3244761,"approval":50,"support":0.3244761},{"time_hours":472,"approval_perbill":500000000,"support_perbill":3221926,"approval":50,"support":0.3221926},{"time_hours":473,"approval_perbill":500000000,"support_perbill":3199185,"approval":50,"support":0.3199185},{"time_hours":474,"approval_perbill":500000000,"support_perbill":3176538,"approval":50,"support":0.3176538},{"time_hours":475,"approval_perbill":500000000,"support_perbill":3153985,"approval":50,"support":0.3153985},{"time_hours":476,"approval_perbill":500000000,"support_perbill":3131524,"approval":50,"support":0.3131524},{"time_hours":477,"approval_perbill":500000000,"support_perbill":3109155,"approval":50,"support":0.3109155},{"time_hours":478,"approval_perbill":500000000,"support_perbill":3086878,"approval":50,"support":0.3086878},{"time_hours":479,"approval_perbill":500000000,"support_perbill":3064692,"approval":50,"support":0.3064692},{"time_hours":480,"approval_perbill":500000000,"support_perbill":3042596,"approval":50,"support":0.3042596},{"time_hours":481,"approval_perbill":500000000,"support_perbill":3020590,"approval":50,"support":0.302059},{"time_hours":482,"approval_perbill":500000000,"support_perbill":2998674,"approval":50,"support":0.2998674},{"time_hours":483,"approval_perbill":500000000,"support_perbill":2976847,"approval":50,"support":0.2976847},{"time_hours":484,"approval_perbill":500000000,"support_perbill":2955107,"approval":50,"support":0.2955107},{"time_hours":485,"approval_perbill":500000000,"support_perbill":2933456,"approval":50,"support":0.2933456},{"time_hours":486,"approval_perbill":500000000,"support_perbill":2911892,"approval":50,"support":0.2911892},{"time_hours":487,"approval_perbill":500000000,"support_perbill":2890414,"approval":50,"support":0.2890414},{"time_hours":488,"approval_perbill":500000000,"support_perbill":2869023,"approval":50,"support":0.2869023},{"time_hours":489,"approval_perbill":500000000,"support_perbill":2847717,"approval":50,"support":0.2847717},{"time_hours":490,"approval_perbill":500000000,"support_perbill":2826496,"approval":50,"support":0.2826496},{"time_hours":491,"approval_perbill":500000000,"support_perbill":2805360,"approval":50,"support":0.280536},{"time_hours":492,"approval_perbill":500000000,"support_perbill":2784309,"approval":50,"support":0.2784309},{"time_hours":493,"approval_perbill":500000000,"support_perbill":2763341,"approval":50,"support":0.2763341},{"time_hours":494,"approval_perbill":500000000,"support_perbill":2742455,"approval":50,"support":0.2742455},{"time_hours":495,"approval_perbill":500000000,"support_perbill":2721653,"approval":50,"support":0.2721653},{"time_hours":496,"approval_perbill":500000000,"support_perbill":2700933,"approval":50,"support":0.2700933},{"time_hours":497,"approval_perbill":500000000,"support_perbill":2680294,"approval":50,"support":0.2680294},{"time_hours":498,"approval_perbill":500000000,"support_perbill":2659737,"approval":50,"support":0.2659737},{"time_hours":499,"approval_perbill":500000000,"support_perbill":2639260,"approval":50,"support":0.263926},{"time_hours":500,"approval_perbill":500000000,"support_perbill":2618864,"approval":50,"support":0.2618864},{"time_hours":501,"approval_perbill":500000000,"support_perbill":2598547,"approval":50,"support":0.2598547},{"time_hours":502,"approval_perbill":500000000,"support_perbill":2578310,"approval":50,"support":0.257831},{"time_hours":503,"approval_perbill":500000000,"support_perbill":2558151,"approval":50,"support":0.2558151},{"time_hours":504,"approval_perbill":500000000,"support_perbill":2538071,"approval":50,"support":0.2538071},{"time_hours":505,"approval_perbill":500000000,"support_perbill":2518069,"approval":50,"support":0.2518069},{"time_hours":506,"approval_perbill":500000000,"support_perbill":2498144,"approval":50,"support":0.2498144},{"time_hours":507,"approval_perbill":500000000,"support_perbill":2478296,"approval":50,"support":0.2478296},{"time_hours":508,"approval_perbill":500000000,"support_perbill":2458525,"approval":50,"support":0.2458525},{"time_hours":509,"approval_perbill":500000000,"support_perbill":2438830,"approval":50,"support":0.243883},{"time_hours":510,"approval_perbill":500000000,"support_perbill":2419210,"approval":50,"support":0.241921},{"time_hours":511,"approval_perbill":500000000,"support_perbill":2399666,"approval":50,"support":0.2399666},{"time_hours":512,"approval_perbill":500000000,"support_perbill":2380197,"approval":50,"support":0.2380197},{"time_hours":513,"approval_perbill":500000000,"support_perbill":2360802,"approval":50,"support":0.2360802},{"time_hours":514,"approval_perbill":500000000,"support_perbill":2341481,"approval":50,"support":0.2341481},{"time_hours":515,"approval_perbill":500000000,"support_perbill":2322233,"approval":50,"support":0.2322233},{"time_hours":516,"approval_perbill":500000000,"support_perbill":2303059,"approval":50,"support":0.2303059},{"time_hours":517,"approval_perbill":500000000,"support_perbill":2283957,"approval":50,"support":0.2283957},{"time_hours":518,"approval_perbill":500000000,"support_perbill":2264928,"approval":50,"support":0.2264928},{"time_hours":519,"approval_perbill":500000000,"support_perbill":2245970,"approval":50,"support":0.224597},{"time_hours":520,"approval_perbill":500000000,"support_perbill":2227084,"approval":50,"support":0.2227084},{"time_hours":521,"approval_perbill":500000000,"support_perbill":2208269,"approval":50,"support":0.2208269},{"time_hours":522,"approval_perbill":500000000,"support_perbill":2189525,"approval":50,"support":0.2189525},{"time_hours":523,"approval_perbill":500000000,"support_perbill":2170851,"approval":50,"support":0.2170851},{"time_hours":524,"approval_perbill":500000000,"support_perbill":2152247,"approval":50,"support":0.2152247},{"time_hours":525,"approval_perbill":500000000,"support_perbill":2133712,"approval":50,"support":0.2133712},{"time_hours":526,"approval_perbill":500000000,"support_perbill":2115247,"approval":50,"support":0.2115247},{"time_hours":527,"approval_perbill":500000000,"support_perbill":2096850,"approval":50,"support":0.209685},{"time_hours":528,"approval_perbill":500000000,"support_perbill":2078522,"approval":50,"support":0.2078522},{"time_hours":529,"approval_perbill":500000000,"support_perbill":2060261,"approval":50,"support":0.2060261},{"time_hours":530,"approval_perbill":500000000,"support_perbill":2042068,"approval":50,"support":0.2042068},{"time_hours":531,"approval_perbill":500000000,"support_perbill":2023943,"approval":50,"support":0.2023943},{"time_hours":532,"approval_perbill":500000000,"support_perbill":2005884,"approval":50,"support":0.2005884},{"time_hours":533,"approval_perbill":500000000,"support_perbill":1987891,"approval":50,"support":0.1987891},{"time_hours":534,"approval_perbill":500000000,"support_perbill":1969965,"approval":50,"support":0.1969965},{"time_hours":535,"approval_perbill":500000000,"support_perbill":1952104,"approval":50,"support":0.1952104},{"time_hours":536,"approval_perbill":500000000,"support_perbill":1934309,"approval":50,"support":0.1934309},{"time_hours":537,"approval_perbill":500000000,"support_perbill":1916579,"approval":50,"support":0.1916579},{"time_hours":538,"approval_perbill":500000000,"support_perbill":1898913,"approval":50,"support":0.1898913},{"time_hours":539,"approval_perbill":500000000,"support_perbill":1881312,"approval":50,"support":0.1881312},{"time_hours":540,"approval_perbill":500000000,"support_perbill":1863775,"approval":50,"support":0.1863775},{"time_hours":541,"approval_perbill":500000000,"support_perbill":1846301,"approval":50,"support":0.1846301},{"time_hours":542,"approval_perbill":500000000,"support_perbill":1828891,"approval":50,"support":0.1828891},{"time_hours":543,"approval_perbill":500000000,"support_perbill":1811543,"approval":50,"support":0.1811543},{"time_hours":544,"approval_perbill":500000000,"support_perbill":1794258,"approval":50,"support":0.1794258},{"time_hours":545,"approval_perbill":500000000,"support_perbill":1777036,"approval":50,"support":0.1777036},{"time_hours":546,"approval_perbill":500000000,"support_perbill":1759875,"approval":50,"support":0.1759875},{"time_hours":547,"approval_perbill":500000000,"support_perbill":1742775,"approval":50,"support":0.1742775},{"time_hours":548,"approval_perbill":500000000,"support_perbill":1725737,"approval":50,"support":0.1725737},{"time_hours":549,"approval_perbill":500000000,"support_perbill":1708760,"approval":50,"support":0.170876},{"time_hours":550,"approval_perbill":500000000,"support_perbill":1691844,"approval":50,"support":0.1691844},{"time_hours":551,"approval_perbill":500000000,"support_perbill":1674988,"approval":50,"support":0.1674988},{"time_hours":552,"approval_perbill":500000000,"support_perbill":1658191,"approval":50,"support":0.1658191},{"time_hours":553,"approval_perbill":500000000,"support_perbill":1641455,"approval":50,"support":0.1641455},{"time_hours":554,"approval_perbill":500000000,"support_perbill":1624777,"approval":50,"support":0.1624777},{"time_hours":555,"approval_perbill":500000000,"support_perbill":1608159,"approval":50,"support":0.1608159},{"time_hours":556,"approval_perbill":500000000,"support_perbill":1591599,"approval":50,"support":0.1591599},{"time_hours":557,"approval_perbill":500000000,"support_perbill":1575098,"approval":50,"support":0.1575098},{"time_hours":558,"approval_perbill":500000000,"support_perbill":1558654,"approval":50,"support":0.1558654},{"time_hours":559,"approval_perbill":500000000,"support_perbill":1542269,"approval":50,"support":0.1542269},{"time_hours":560,"approval_perbill":500000000,"support_perbill":1525941,"approval":50,"support":0.1525941},{"time_hours":561,"approval_perbill":500000000,"support_perbill":1509670,"approval":50,"support":0.150967},{"time_hours":562,"approval_perbill":500000000,"support_perbill":1493456,"approval":50,"support":0.1493456},{"time_hours":563,"approval_perbill":500000000,"support_perbill":1477298,"approval":50,"support":0.1477298},{"time_hours":564,"approval_perbill":500000000,"support_perbill":1461197,"approval":50,"support":0.1461197},{"time_hours":565,"approval_perbill":500000000,"support_perbill":1445152,"approval":50,"support":0.1445152},{"time_hours":566,"approval_perbill":500000000,"support_perbill":1429162,"approval":50,"support":0.1429162},{"time_hours":567,"approval_perbill":500000000,"support_perbill":1413228,"approval":50,"support":0.1413228},{"time_hours":568,"approval_perbill":500000000,"support_perbill":1397348,"approval":50,"support":0.1397348},{"time_hours":569,"approval_perbill":500000000,"support_perbill":1381524,"approval":50,"support":0.1381524},{"time_hours":570,"approval_perbill":500000000,"support_perbill":1365754,"approval":50,"support":0.1365754},{"time_hours":571,"approval_perbill":500000000,"support_perbill":1350039,"approval":50,"support":0.1350039},{"time_hours":572,"approval_perbill":500000000,"support_perbill":1334377,"approval":50,"support":0.1334377},{"time_hours":573,"approval_perbill":500000000,"support_perbill":1318769,"approval":50,"support":0.1318769},{"time_hours":574,"approval_perbill":500000000,"support_perbill":1303214,"approval":50,"support":0.1303214},{"time_hours":575,"approval_perbill":500000000,"support_perbill":1287713,"approval":50,"support":0.1287713},{"time_hours":576,"approval_perbill":500000000,"support_perbill":1272264,"approval":50,"support":0.1272264},{"time_hours":577,"approval_perbill":500000000,"support_perbill":1256869,"approval":50,"support":0.1256869},{"time_hours":578,"approval_perbill":500000000,"support_perbill":1241525,"approval":50,"support":0.1241525},{"time_hours":579,"approval_perbill":500000000,"support_perbill":1226233,"approval":50,"support":0.1226233},{"time_hours":580,"approval_perbill":500000000,"support_perbill":1210994,"approval":50,"support":0.1210994},{"time_hours":581,"approval_perbill":500000000,"support_perbill":1195805,"approval":50,"support":0.1195805},{"time_hours":582,"approval_perbill":500000000,"support_perbill":1180668,"approval":50,"support":0.1180668},{"time_hours":583,"approval_perbill":500000000,"support_perbill":1165582,"approval":50,"support":0.1165582},{"time_hours":584,"approval_perbill":500000000,"support_perbill":1150547,"approval":50,"support":0.1150547},{"time_hours":585,"approval_perbill":500000000,"support_perbill":1135563,"approval":50,"support":0.1135563},{"time_hours":586,"approval_perbill":500000000,"support_perbill":1120628,"approval":50,"support":0.1120628},{"time_hours":587,"approval_perbill":500000000,"support_perbill":1105744,"approval":50,"support":0.1105744},{"time_hours":588,"approval_perbill":500000000,"support_perbill":1090909,"approval":50,"support":0.1090909},{"time_hours":589,"approval_perbill":500000000,"support_perbill":1076124,"approval":50,"support":0.1076124},{"time_hours":590,"approval_perbill":500000000,"support_perbill":1061388,"approval":50,"support":0.1061388},{"time_hours":591,"approval_perbill":500000000,"support_perbill":1046701,"approval":50,"support":0.1046701},{"time_hours":592,"approval_perbill":500000000,"support_perbill":1032063,"approval":50,"support":0.1032063},{"time_hours":593,"approval_perbill":500000000,"support_perbill":1017473,"approval":50,"support":0.1017473},{"time_hours":594,"approval_perbill":500000000,"support_perbill":1002932,"approval":50,"support":0.1002932},{"time_hours":595,"approval_perbill":500000000,"support_perbill":988438,"approval":50,"support":0.0988438},{"time_hours":596,"approval_perbill":500000000,"support_perbill":973993,"approval":50,"support":0.0973993},{"time_hours":597,"approval_perbill":500000000,"support_perbill":959595,"approval":50,"support":0.0959595},{"time_hours":598,"approval_perbill":500000000,"support_perbill":945244,"approval":50,"support":0.0945244},{"time_hours":599,"approval_perbill":500000000,"support_perbill":930940,"approval":50,"support":0.093094},{"time_hours":600,"approval_perbill":500000000,"support_perbill":916684,"approval":50,"support":0.0916684},{"time_hours":601,"approval_perbill":500000000,"support_perbill":902473,"approval":50,"support":0.0902473},{"time_hours":602,"approval_perbill":500000000,"support_perbill":888310,"approval":50,"support":0.088831},{"time_hours":603,"approval_perbill":500000000,"support_perbill":874192,"approval":50,"support":0.0874192},{"time_hours":604,"approval_perbill":500000000,"support_perbill":860121,"approval":50,"support":0.0860121},{"time_hours":605,"approval_perbill":500000000,"support_perbill":846095,"approval":50,"support":0.0846095},{"time_hours":606,"approval_perbill":500000000,"support_perbill":832114,"approval":50,"support":0.0832114},{"time_hours":607,"approval_perbill":500000000,"support_perbill":818179,"approval":50,"support":0.0818179},{"time_hours":608,"approval_perbill":500000000,"support_perbill":804289,"approval":50,"support":0.0804289},{"time_hours":609,"approval_perbill":500000000,"support_perbill":790444,"approval":50,"support":0.0790444},{"time_hours":610,"approval_perbill":500000000,"support_perbill":776644,"approval":50,"support":0.0776644},{"time_hours":611,"approval_perbill":500000000,"support_perbill":762888,"approval":50,"support":0.0762888},{"time_hours":612,"approval_perbill":500000000,"support_perbill":749176,"approval":50,"support":0.0749176},{"time_hours":613,"approval_perbill":500000000,"support_perbill":735508,"approval":50,"support":0.0735508},{"time_hours":614,"approval_perbill":500000000,"support_perbill":721884,"approval":50,"support":0.0721884},{"time_hours":615,"approval_perbill":500000000,"support_perbill":708303,"approval":50,"support":0.0708303},{"time_hours":616,"approval_perbill":500000000,"support_perbill":694766,"approval":50,"support":0.0694766},{"time_hours":617,"approval_perbill":500000000,"support_perbill":681272,"approval":50,"support":0.0681272},{"time_hours":618,"approval_perbill":500000000,"support_perbill":667821,"approval":50,"support":0.0667821},{"time_hours":619,"approval_perbill":500000000,"support_perbill":654412,"approval":50,"support":0.0654412},{"time_hours":620,"approval_perbill":500000000,"support_perbill":641047,"approval":50,"support":0.0641047},{"time_hours":621,"approval_perbill":500000000,"support_perbill":627723,"approval":50,"support":0.0627723},{"time_hours":622,"approval_perbill":500000000,"support_perbill":614442,"approval":50,"support":0.0614442},{"time_hours":623,"approval_perbill":500000000,"support_perbill":601202,"approval":50,"support":0.0601202},{"time_hours":624,"approval_perbill":500000000,"support_perbill":588005,"approval":50,"support":0.0588005},{"time_hours":625,"approval_perbill":500000000,"support_perbill":574848,"approval":50,"support":0.0574848},{"time_hours":626,"approval_perbill":500000000,"support_perbill":561734,"approval":50,"support":0.0561734},{"time_hours":627,"approval_perbill":500000000,"support_perbill":548660,"approval":50,"support":0.054866},{"time_hours":628,"approval_perbill":500000000,"support_perbill":535627,"approval":50,"support":0.0535627},{"time_hours":629,"approval_perbill":500000000,"support_perbill":522635,"approval":50,"support":0.0522635},{"time_hours":630,"approval_perbill":500000000,"support_perbill":509684,"approval":50,"support":0.0509684},{"time_hours":631,"approval_perbill":500000000,"support_perbill":496773,"approval":50,"support":0.0496773},{"time_hours":632,"approval_perbill":500000000,"support_perbill":483902,"approval":50,"support":0.0483902},{"time_hours":633,"approval_perbill":500000000,"support_perbill":471071,"approval":50,"support":0.0471071},{"time_hours":634,"approval_perbill":500000000,"support_perbill":458280,"approval":50,"support":0.045828},{"time_hours":635,"approval_perbill":500000000,"support_perbill":445529,"approval":50,"support":0.0445529},{"time_hours":636,"approval_perbill":500000000,"support_perbill":432817,"approval":50,"support":0.0432817},{"time_hours":637,"approval_perbill":500000000,"support_perbill":420144,"approval":50,"support":0.0420144},{"time_hours":638,"approval_perbill":500000000,"support_perbill":407511,"approval":50,"support":0.0407511},{"time_hours":639,"approval_perbill":500000000,"support_perbill":394916,"approval":50,"support":0.0394916},{"time_hours":640,"approval_perbill":500000000,"support_perbill":382360,"approval":50,"support":0.038236},{"time_hours":641,"approval_perbill":500000000,"support_perbill":369843,"approval":50,"support":0.0369843},{"time_hours":642,"approval_perbill":500000000,"support_perbill":357364,"approval":50,"support":0.0357364},{"time_hours":643,"approval_perbill":500000000,"support_perbill":344923,"approval":50,"support":0.0344923},{"time_hours":644,"approval_perbill":500000000,"support_perbill":332520,"approval":50,"support":0.033252},{"time_hours":645,"approval_perbill":500000000,"support_perbill":320155,"approval":50,"support":0.0320155},{"time_hours":646,"approval_perbill":500000000,"support_perbill":307828,"approval":50,"support":0.0307828},{"time_hours":647,"approval_perbill":500000000,"support_perbill":295538,"approval":50,"support":0.0295538},{"time_hours":648,"approval_perbill":500000000,"support_perbill":283286,"approval":50,"support":0.0283286},{"time_hours":649,"approval_perbill":500000000,"support_perbill":271071,"approval":50,"support":0.0271071},{"time_hours":650,"approval_perbill":500000000,"support_perbill":258892,"approval":50,"support":0.0258892},{"time_hours":651,"approval_perbill":500000000,"support_perbill":246751,"approval":50,"support":0.0246751},{"time_hours":652,"approval_perbill":500000000,"support_perbill":234646,"approval":50,"support":0.0234646},{"time_hours":653,"approval_perbill":500000000,"support_perbill":222578,"approval":50,"support":0.0222578},{"time_hours":654,"approval_perbill":500000000,"support_perbill":210546,"approval":50,"support":0.0210546},{"time_hours":655,"approval_perbill":500000000,"support_perbill":198550,"approval":50,"support":0.019855},{"time_hours":656,"approval_perbill":500000000,"support_perbill":186590,"approval":50,"support":0.018659},{"time_hours":657,"approval_perbill":500000000,"support_perbill":174666,"approval":50,"support":0.0174666},{"time_hours":658,"approval_perbill":500000000,"support_perbill":162778,"approval":50,"support":0.0162778},{"time_hours":659,"approval_perbill":500000000,"support_perbill":150925,"approval":50,"support":0.0150925},{"time_hours":660,"approval_perbill":500000000,"support_perbill":139108,"approval":50,"support":0.0139108},{"time_hours":661,"approval_perbill":500000000,"support_perbill":127326,"approval":50,"support":0.0127326},{"time_hours":662,"approval_perbill":500000000,"support_perbill":115578,"approval":50,"support":0.0115578},{"time_hours":663,"approval_perbill":500000000,"support_perbill":103866,"approval":50,"support":0.0103866},{"time_hours":664,"approval_perbill":500000000,"support_perbill":92188,"approval":50,"support":0.0092188},{"time_hours":665,"approval_perbill":500000000,"support_perbill":80545,"approval":50,"support":0.0080545},{"time_hours":666,"approval_perbill":500000000,"support_perbill":68937,"approval":50,"support":0.0068937},{"time_hours":667,"approval_perbill":500000000,"support_perbill":57363,"approval":50,"support":0.0057363},{"time_hours":668,"approval_perbill":500000000,"support_perbill":45822,"approval":50,"support":0.0045822},{"time_hours":669,"approval_perbill":500000000,"support_perbill":34316,"approval":50,"support":0.0034316},{"time_hours":670,"approval_perbill":500000000,"support_perbill":22844,"approval":50,"support":0.0022844},{"time_hours":671,"approval_perbill":500000000,"support_perbill":11405,"approval":50,"support":0.0011405},{"time_hours":672,"approval_perbill":500000000,"support_perbill":0,"approval":50,"support":0}]')},39379:p=>{"use strict";p.exports=JSON.parse('[{"time_hours":0,"approval_perbill":1000000000,"support_perbill":500000000,"approval":100,"support":50},{"time_hours":1,"approval_perbill":997037038,"support_perbill":491215228,"approval":99.7037038,"support":49.1215228},{"time_hours":2,"approval_perbill":994100296,"support_perbill":482708936,"approval":99.4100296,"support":48.2708936},{"time_hours":3,"approval_perbill":991189429,"support_perbill":474468089,"approval":99.1189429,"support":47.4468089},{"time_hours":4,"approval_perbill":988304096,"support_perbill":466480452,"approval":98.8304096,"support":46.6480452},{"time_hours":5,"approval_perbill":985443960,"support_perbill":458734526,"approval":98.544396,"support":45.8734526},{"time_hours":6,"approval_perbill":982608697,"support_perbill":451219514,"approval":98.2608697,"support":45.1219514},{"time_hours":7,"approval_perbill":979797981,"support_perbill":443925237,"approval":97.9797981,"support":44.3925237},{"time_hours":8,"approval_perbill":977011496,"support_perbill":436842109,"approval":97.7011496,"support":43.6842109},{"time_hours":9,"approval_perbill":974248928,"support_perbill":429961090,"approval":97.4248928,"support":42.996109},{"time_hours":10,"approval_perbill":971509972,"support_perbill":423273659,"approval":97.1509972,"support":42.3273659},{"time_hours":11,"approval_perbill":968794328,"support_perbill":416771755,"approval":96.8794328,"support":41.6771755},{"time_hours":12,"approval_perbill":966101697,"support_perbill":410447765,"approval":96.6101697,"support":41.0447765},{"time_hours":13,"approval_perbill":963431787,"support_perbill":404294479,"approval":96.3431787,"support":40.4294479},{"time_hours":14,"approval_perbill":960784315,"support_perbill":398305086,"approval":96.0784315,"support":39.8305086},{"time_hours":15,"approval_perbill":958158997,"support_perbill":392473120,"approval":95.8158997,"support":39.247312},{"time_hours":16,"approval_perbill":955555557,"support_perbill":386792456,"approval":95.5555557,"support":38.6792456},{"time_hours":17,"approval_perbill":952973721,"support_perbill":381257276,"approval":95.2973721,"support":38.1257276},{"time_hours":18,"approval_perbill":950413224,"support_perbill":375862070,"approval":95.0413224,"support":37.586207},{"time_hours":19,"approval_perbill":947873801,"support_perbill":370601591,"approval":94.7873801,"support":37.0601591},{"time_hours":20,"approval_perbill":945355193,"support_perbill":365470854,"approval":94.5355193,"support":36.5470854},{"time_hours":21,"approval_perbill":942857143,"support_perbill":360465116,"approval":94.2857143,"support":36.0465116},{"time_hours":22,"approval_perbill":940379404,"support_perbill":355579869,"approval":94.0379404,"support":35.5579869},{"time_hours":23,"approval_perbill":937921728,"support_perbill":350810812,"approval":93.7921728,"support":35.0810812},{"time_hours":24,"approval_perbill":935483872,"support_perbill":346153848,"approval":93.5483872,"support":34.6153848},{"time_hours":25,"approval_perbill":933065598,"support_perbill":341605071,"approval":93.3065598,"support":34.1605071},{"time_hours":26,"approval_perbill":930666667,"support_perbill":337160752,"approval":93.0666667,"support":33.7160752},{"time_hours":27,"approval_perbill":928286854,"support_perbill":332817338,"approval":92.8286854,"support":33.2817338},{"time_hours":28,"approval_perbill":925925927,"support_perbill":328571430,"approval":92.5925927,"support":32.857143},{"time_hours":29,"approval_perbill":923583664,"support_perbill":324419780,"approval":92.3583664,"support":32.441978},{"time_hours":30,"approval_perbill":921259843,"support_perbill":320359282,"approval":92.1259843,"support":32.0359282},{"time_hours":31,"approval_perbill":918954249,"support_perbill":316386970,"approval":91.8954249,"support":31.638697},{"time_hours":32,"approval_perbill":916666668,"support_perbill":312500001,"approval":91.6666668,"support":31.2500001},{"time_hours":33,"approval_perbill":914396889,"support_perbill":308695654,"approval":91.4396889,"support":30.8695654},{"time_hours":34,"approval_perbill":912144703,"support_perbill":304971319,"approval":91.2144703,"support":30.4971319},{"time_hours":35,"approval_perbill":909909911,"support_perbill":301324504,"approval":90.9909911,"support":30.1324504},{"time_hours":36,"approval_perbill":907692309,"support_perbill":297752810,"approval":90.7692309,"support":29.775281},{"time_hours":37,"approval_perbill":905491700,"support_perbill":294253940,"approval":90.54917,"support":29.425394},{"time_hours":38,"approval_perbill":903307888,"support_perbill":290825688,"approval":90.3307888,"support":29.0825688},{"time_hours":39,"approval_perbill":901140685,"support_perbill":287465940,"approval":90.1140685,"support":28.746594},{"time_hours":40,"approval_perbill":898989900,"support_perbill":284172663,"approval":89.89899,"support":28.4172663},{"time_hours":41,"approval_perbill":896855347,"support_perbill":280943902,"approval":89.6855347,"support":28.0943902},{"time_hours":42,"approval_perbill":894736842,"support_perbill":277777777,"approval":89.4736842,"support":27.7777777},{"time_hours":43,"approval_perbill":892634208,"support_perbill":274672489,"approval":89.2634208,"support":27.4672489},{"time_hours":44,"approval_perbill":890547265,"support_perbill":271626298,"approval":89.0547265,"support":27.1626298},{"time_hours":45,"approval_perbill":888475838,"support_perbill":268637533,"approval":88.8475838,"support":26.8637533},{"time_hours":46,"approval_perbill":886419755,"support_perbill":265704586,"approval":88.6419755,"support":26.5704586},{"time_hours":47,"approval_perbill":884378844,"support_perbill":262825904,"approval":88.4378844,"support":26.2825904},{"time_hours":48,"approval_perbill":882352942,"support_perbill":260000000,"approval":88.2352942,"support":26},{"time_hours":49,"approval_perbill":880341882,"support_perbill":257225434,"approval":88.0341882,"support":25.7225434},{"time_hours":50,"approval_perbill":878345500,"support_perbill":254500820,"approval":87.83455,"support":25.450082},{"time_hours":51,"approval_perbill":876363637,"support_perbill":251824817,"approval":87.6363637,"support":25.1824817},{"time_hours":52,"approval_perbill":874396136,"support_perbill":249196142,"approval":87.4396136,"support":24.9196142},{"time_hours":53,"approval_perbill":872442841,"support_perbill":246613547,"approval":87.2442841,"support":24.6613547},{"time_hours":54,"approval_perbill":870503599,"support_perbill":244075830,"approval":87.0503599,"support":24.407583},{"time_hours":55,"approval_perbill":868578256,"support_perbill":241581832,"approval":86.8578256,"support":24.1581832},{"time_hours":56,"approval_perbill":866666667,"support_perbill":239130435,"approval":86.6666667,"support":23.9130435},{"time_hours":57,"approval_perbill":864768684,"support_perbill":236720555,"approval":86.4768684,"support":23.6720555},{"time_hours":58,"approval_perbill":862884162,"support_perbill":234351146,"approval":86.2884162,"support":23.4351146},{"time_hours":59,"approval_perbill":861012957,"support_perbill":232021196,"approval":86.1012957,"support":23.2021196},{"time_hours":60,"approval_perbill":859154930,"support_perbill":229729730,"approval":85.915493,"support":22.972973},{"time_hours":61,"approval_perbill":857309942,"support_perbill":227475801,"approval":85.7309942,"support":22.7475801},{"time_hours":62,"approval_perbill":855477857,"support_perbill":225258494,"approval":85.5477857,"support":22.5258494},{"time_hours":63,"approval_perbill":853658537,"support_perbill":223076923,"approval":85.3658537,"support":22.3076923},{"time_hours":64,"approval_perbill":851851852,"support_perbill":220930232,"approval":85.1851852,"support":22.0930232},{"time_hours":65,"approval_perbill":850057671,"support_perbill":218817592,"approval":85.0057671,"support":21.8817592},{"time_hours":66,"approval_perbill":848275863,"support_perbill":216738198,"approval":84.8275863,"support":21.6738198},{"time_hours":67,"approval_perbill":846506302,"support_perbill":214691271,"approval":84.6506302,"support":21.4691271},{"time_hours":68,"approval_perbill":844748859,"support_perbill":212676056,"approval":84.4748859,"support":21.2676056},{"time_hours":69,"approval_perbill":843003414,"support_perbill":210691824,"approval":84.3003414,"support":21.0691824},{"time_hours":70,"approval_perbill":841269842,"support_perbill":208737865,"approval":84.1269842,"support":20.8737865},{"time_hours":71,"approval_perbill":839548024,"support_perbill":206813490,"approval":83.9548024,"support":20.681349},{"time_hours":72,"approval_perbill":837837838,"support_perbill":204918033,"approval":83.7837838,"support":20.4918033},{"time_hours":73,"approval_perbill":836139170,"support_perbill":203050847,"approval":83.613917,"support":20.3050847},{"time_hours":74,"approval_perbill":834451903,"support_perbill":201211306,"approval":83.4451903,"support":20.1211306},{"time_hours":75,"approval_perbill":832775921,"support_perbill":199398798,"approval":83.2775921,"support":19.9398798},{"time_hours":76,"approval_perbill":831111112,"support_perbill":197612732,"approval":83.1111112,"support":19.7612732},{"time_hours":77,"approval_perbill":829457365,"support_perbill":195852534,"approval":82.9457365,"support":19.5852534},{"time_hours":78,"approval_perbill":827814570,"support_perbill":194117647,"approval":82.781457,"support":19.4117647},{"time_hours":79,"approval_perbill":826182619,"support_perbill":192407528,"approval":82.6182619,"support":19.2407528},{"time_hours":80,"approval_perbill":824561404,"support_perbill":190721649,"approval":82.4561404,"support":19.0721649},{"time_hours":81,"approval_perbill":822950820,"support_perbill":189059501,"approval":82.295082,"support":18.9059501},{"time_hours":82,"approval_perbill":821350763,"support_perbill":187420585,"approval":82.1350763,"support":18.7420585},{"time_hours":83,"approval_perbill":819761130,"support_perbill":185804417,"approval":81.976113,"support":18.5804417},{"time_hours":84,"approval_perbill":818181818,"support_perbill":184210526,"approval":81.8181818,"support":18.4210526},{"time_hours":85,"approval_perbill":816612730,"support_perbill":182638457,"approval":81.661273,"support":18.2638457},{"time_hours":86,"approval_perbill":815053764,"support_perbill":181087763,"approval":81.5053764,"support":18.1087763},{"time_hours":87,"approval_perbill":813504824,"support_perbill":179558011,"approval":81.3504824,"support":17.9558011},{"time_hours":88,"approval_perbill":811965813,"support_perbill":178048781,"approval":81.1965813,"support":17.8048781},{"time_hours":89,"approval_perbill":810436635,"support_perbill":176559660,"approval":81.0436635,"support":17.655966},{"time_hours":90,"approval_perbill":808917198,"support_perbill":175090253,"approval":80.8917198,"support":17.5090253},{"time_hours":91,"approval_perbill":807407408,"support_perbill":173640167,"approval":80.7407408,"support":17.3640167},{"time_hours":92,"approval_perbill":805907174,"support_perbill":172209026,"approval":80.5907174,"support":17.2209026},{"time_hours":93,"approval_perbill":804416404,"support_perbill":170796460,"approval":80.4416404,"support":17.079646},{"time_hours":94,"approval_perbill":802935011,"support_perbill":169402110,"approval":80.2935011,"support":16.940211},{"time_hours":95,"approval_perbill":801462906,"support_perbill":168025626,"approval":80.1462906,"support":16.8025626},{"time_hours":96,"approval_perbill":800000001,"support_perbill":166666667,"approval":80.0000001,"support":16.6666667},{"time_hours":97,"approval_perbill":798546210,"support_perbill":165324899,"approval":79.854621,"support":16.5324899},{"time_hours":98,"approval_perbill":797101450,"support_perbill":164000000,"approval":79.710145,"support":16.4},{"time_hours":99,"approval_perbill":795665635,"support_perbill":162691652,"approval":79.5665635,"support":16.2691652},{"time_hours":100,"approval_perbill":794238684,"support_perbill":161399549,"approval":79.4238684,"support":16.1399549},{"time_hours":101,"approval_perbill":792820513,"support_perbill":160123387,"approval":79.2820513,"support":16.0123387},{"time_hours":102,"approval_perbill":791411043,"support_perbill":158862876,"approval":79.1411043,"support":15.8862876},{"time_hours":103,"approval_perbill":790010194,"support_perbill":157617728,"approval":79.0010194,"support":15.7617728},{"time_hours":104,"approval_perbill":788617887,"support_perbill":156387665,"approval":78.8617887,"support":15.6387665},{"time_hours":105,"approval_perbill":787234043,"support_perbill":155172413,"approval":78.7234043,"support":15.5172413},{"time_hours":106,"approval_perbill":785858586,"support_perbill":153971708,"approval":78.5858586,"support":15.3971708},{"time_hours":107,"approval_perbill":784491441,"support_perbill":152785289,"approval":78.4491441,"support":15.2785289},{"time_hours":108,"approval_perbill":783132531,"support_perbill":151612903,"approval":78.3132531,"support":15.1612903},{"time_hours":109,"approval_perbill":781781783,"support_perbill":150454303,"approval":78.1781783,"support":15.0454303},{"time_hours":110,"approval_perbill":780439122,"support_perbill":149309245,"approval":78.0439122,"support":14.9309245},{"time_hours":111,"approval_perbill":779104478,"support_perbill":148177496,"approval":77.9104478,"support":14.8177496},{"time_hours":112,"approval_perbill":777777779,"support_perbill":147058823,"approval":77.7777779,"support":14.7058823},{"time_hours":113,"approval_perbill":776458953,"support_perbill":145953003,"approval":77.6458953,"support":14.5953003},{"time_hours":114,"approval_perbill":775147929,"support_perbill":144859813,"approval":77.5147929,"support":14.4859813},{"time_hours":115,"approval_perbill":773844642,"support_perbill":143779039,"approval":77.3844642,"support":14.3779039},{"time_hours":116,"approval_perbill":772549020,"support_perbill":142710472,"approval":77.254902,"support":14.2710472},{"time_hours":117,"approval_perbill":771260998,"support_perbill":141653905,"approval":77.1260998,"support":14.1653905},{"time_hours":118,"approval_perbill":769980507,"support_perbill":140609137,"approval":76.9980507,"support":14.0609137},{"time_hours":119,"approval_perbill":768707484,"support_perbill":139575971,"approval":76.8707484,"support":13.9575971},{"time_hours":120,"approval_perbill":767441861,"support_perbill":138554217,"approval":76.7441861,"support":13.8554217},{"time_hours":121,"approval_perbill":766183576,"support_perbill":137543684,"approval":76.6183576,"support":13.7543684},{"time_hours":122,"approval_perbill":764932563,"support_perbill":136544190,"approval":76.4932563,"support":13.654419},{"time_hours":123,"approval_perbill":763688761,"support_perbill":135555555,"approval":76.3688761,"support":13.5555555},{"time_hours":124,"approval_perbill":762452108,"support_perbill":134577603,"approval":76.2452108,"support":13.4577603},{"time_hours":125,"approval_perbill":761222541,"support_perbill":133610161,"approval":76.1222541,"support":13.3610161},{"time_hours":126,"approval_perbill":760000000,"support_perbill":132653061,"approval":76,"support":13.2653061},{"time_hours":127,"approval_perbill":758784426,"support_perbill":131706138,"approval":75.8784426,"support":13.1706138},{"time_hours":128,"approval_perbill":757575758,"support_perbill":130769230,"approval":75.7575758,"support":13.076923},{"time_hours":129,"approval_perbill":756373938,"support_perbill":129842181,"approval":75.6373938,"support":12.9842181},{"time_hours":130,"approval_perbill":755178909,"support_perbill":128924833,"approval":75.5178909,"support":12.8924833},{"time_hours":131,"approval_perbill":753990611,"support_perbill":128017037,"approval":75.3990611,"support":12.8017037},{"time_hours":132,"approval_perbill":752808989,"support_perbill":127118644,"approval":75.2808989,"support":12.7118644},{"time_hours":133,"approval_perbill":751633988,"support_perbill":126229508,"approval":75.1633988,"support":12.6229508},{"time_hours":134,"approval_perbill":750465550,"support_perbill":125349487,"approval":75.046555,"support":12.5349487},{"time_hours":135,"approval_perbill":749303621,"support_perbill":124478442,"approval":74.9303621,"support":12.4478442},{"time_hours":136,"approval_perbill":748148149,"support_perbill":123616236,"approval":74.8148149,"support":12.3616236},{"time_hours":137,"approval_perbill":746999077,"support_perbill":122762735,"approval":74.6999077,"support":12.2762735},{"time_hours":138,"approval_perbill":745856354,"support_perbill":121917808,"approval":74.5856354,"support":12.1917808},{"time_hours":139,"approval_perbill":744719927,"support_perbill":121081326,"approval":74.4719927,"support":12.1081326},{"time_hours":140,"approval_perbill":743589744,"support_perbill":120253164,"approval":74.3589744,"support":12.0253164},{"time_hours":141,"approval_perbill":742465754,"support_perbill":119433198,"approval":74.2465754,"support":11.9433198},{"time_hours":142,"approval_perbill":741347906,"support_perbill":118621307,"approval":74.1347906,"support":11.8621307},{"time_hours":143,"approval_perbill":740236149,"support_perbill":117817371,"approval":74.0236149,"support":11.7817371},{"time_hours":144,"approval_perbill":739130435,"support_perbill":117021276,"approval":73.9130435,"support":11.7021276},{"time_hours":145,"approval_perbill":738030714,"support_perbill":116232907,"approval":73.8030714,"support":11.6232907},{"time_hours":146,"approval_perbill":736936938,"support_perbill":115452151,"approval":73.6936938,"support":11.5452151},{"time_hours":147,"approval_perbill":735849057,"support_perbill":114678898,"approval":73.5849057,"support":11.4678898},{"time_hours":148,"approval_perbill":734767025,"support_perbill":113913043,"approval":73.4767025,"support":11.3913043},{"time_hours":149,"approval_perbill":733690796,"support_perbill":113154478,"approval":73.3690796,"support":11.3154478},{"time_hours":150,"approval_perbill":732620322,"support_perbill":112403100,"approval":73.2620322,"support":11.24031},{"time_hours":151,"approval_perbill":731555556,"support_perbill":111658808,"approval":73.1555556,"support":11.1658808},{"time_hours":152,"approval_perbill":730496454,"support_perbill":110921501,"approval":73.0496454,"support":11.0921501},{"time_hours":153,"approval_perbill":729442971,"support_perbill":110191082,"approval":72.9442971,"support":11.0191082},{"time_hours":154,"approval_perbill":728395062,"support_perbill":109467455,"approval":72.8395062,"support":10.9467455},{"time_hours":155,"approval_perbill":727352683,"support_perbill":108750526,"approval":72.7352683,"support":10.8750526},{"time_hours":156,"approval_perbill":726315790,"support_perbill":108040200,"approval":72.631579,"support":10.80402},{"time_hours":157,"approval_perbill":725284340,"support_perbill":107336390,"approval":72.528434,"support":10.733639},{"time_hours":158,"approval_perbill":724258290,"support_perbill":106639004,"approval":72.425829,"support":10.6639004},{"time_hours":159,"approval_perbill":723237599,"support_perbill":105947955,"approval":72.3237599,"support":10.5947955},{"time_hours":160,"approval_perbill":722222222,"support_perbill":105263157,"approval":72.2222222,"support":10.5263157},{"time_hours":161,"approval_perbill":721212122,"support_perbill":104584527,"approval":72.1212122,"support":10.4584527},{"time_hours":162,"approval_perbill":720207254,"support_perbill":103911980,"approval":72.0207254,"support":10.391198},{"time_hours":163,"approval_perbill":719207580,"support_perbill":103245436,"approval":71.920758,"support":10.3245436},{"time_hours":164,"approval_perbill":718213059,"support_perbill":102584814,"approval":71.8213059,"support":10.2584814},{"time_hours":165,"approval_perbill":717223651,"support_perbill":101930036,"approval":71.7223651,"support":10.1930036},{"time_hours":166,"approval_perbill":716239317,"support_perbill":101281024,"approval":71.6239317,"support":10.1281024},{"time_hours":167,"approval_perbill":715260018,"support_perbill":100637704,"approval":71.5260018,"support":10.0637704},{"time_hours":168,"approval_perbill":714285714,"support_perbill":99999999,"approval":71.4285714,"support":9.9999999},{"time_hours":169,"approval_perbill":713316370,"support_perbill":99367838,"approval":71.331637,"support":9.9367838},{"time_hours":170,"approval_perbill":712351946,"support_perbill":98741148,"approval":71.2351946,"support":9.8741148},{"time_hours":171,"approval_perbill":711392406,"support_perbill":98119859,"approval":71.1392406,"support":9.8119859},{"time_hours":172,"approval_perbill":710437711,"support_perbill":97503900,"approval":71.0437711,"support":9.75039},{"time_hours":173,"approval_perbill":709487826,"support_perbill":96893203,"approval":70.9487826,"support":9.6893203},{"time_hours":174,"approval_perbill":708542714,"support_perbill":96287703,"approval":70.8542714,"support":9.6287703},{"time_hours":175,"approval_perbill":707602340,"support_perbill":95687331,"approval":70.760234,"support":9.5687331},{"time_hours":176,"approval_perbill":706666667,"support_perbill":95092024,"approval":70.6666667,"support":9.5092024},{"time_hours":177,"approval_perbill":705735661,"support_perbill":94501718,"approval":70.5735661,"support":9.4501718},{"time_hours":178,"approval_perbill":704809287,"support_perbill":93916349,"approval":70.4809287,"support":9.3916349},{"time_hours":179,"approval_perbill":703887511,"support_perbill":93335857,"approval":70.3887511,"support":9.3335857},{"time_hours":180,"approval_perbill":702970298,"support_perbill":92760181,"approval":70.2970298,"support":9.2760181},{"time_hours":181,"approval_perbill":702057613,"support_perbill":92189260,"approval":70.2057613,"support":9.218926},{"time_hours":182,"approval_perbill":701149426,"support_perbill":91623036,"approval":70.1149426,"support":9.1623036},{"time_hours":183,"approval_perbill":700245701,"support_perbill":91061452,"approval":70.0245701,"support":9.1061452},{"time_hours":184,"approval_perbill":699346406,"support_perbill":90504451,"approval":69.9346406,"support":9.0504451},{"time_hours":185,"approval_perbill":698451508,"support_perbill":89951976,"approval":69.8451508,"support":8.9951976},{"time_hours":186,"approval_perbill":697560976,"support_perbill":89403973,"approval":69.7560976,"support":8.9403973},{"time_hours":187,"approval_perbill":696674777,"support_perbill":88860388,"approval":69.6674777,"support":8.8860388},{"time_hours":188,"approval_perbill":695792881,"support_perbill":88321167,"approval":69.5792881,"support":8.8321167},{"time_hours":189,"approval_perbill":694915254,"support_perbill":87786259,"approval":69.4915254,"support":8.7786259},{"time_hours":190,"approval_perbill":694041868,"support_perbill":87255611,"approval":69.4041868,"support":8.7255611},{"time_hours":191,"approval_perbill":693172691,"support_perbill":86729174,"approval":69.3172691,"support":8.6729174},{"time_hours":192,"approval_perbill":692307693,"support_perbill":86206896,"approval":69.2307693,"support":8.6206896},{"time_hours":193,"approval_perbill":691446843,"support_perbill":85688729,"approval":69.1446843,"support":8.5688729},{"time_hours":194,"approval_perbill":690590112,"support_perbill":85174625,"approval":69.0590112,"support":8.5174625},{"time_hours":195,"approval_perbill":689737470,"support_perbill":84664536,"approval":68.973747,"support":8.4664536},{"time_hours":196,"approval_perbill":688888889,"support_perbill":84158415,"approval":68.8888889,"support":8.4158415},{"time_hours":197,"approval_perbill":688044339,"support_perbill":83656217,"approval":68.8044339,"support":8.3656217},{"time_hours":198,"approval_perbill":687203792,"support_perbill":83157894,"approval":68.7203792,"support":8.3157894},{"time_hours":199,"approval_perbill":686367219,"support_perbill":82663404,"approval":68.6367219,"support":8.2663404},{"time_hours":200,"approval_perbill":685534592,"support_perbill":82172701,"approval":68.5534592,"support":8.2172701},{"time_hours":201,"approval_perbill":684705883,"support_perbill":81685744,"approval":68.4705883,"support":8.1685744},{"time_hours":202,"approval_perbill":683881064,"support_perbill":81202487,"approval":68.3881064,"support":8.1202487},{"time_hours":203,"approval_perbill":683060110,"support_perbill":80722891,"approval":68.306011,"support":8.0722891},{"time_hours":204,"approval_perbill":682242991,"support_perbill":80246913,"approval":68.2242991,"support":8.0246913},{"time_hours":205,"approval_perbill":681429682,"support_perbill":79774513,"approval":68.1429682,"support":7.9774513},{"time_hours":206,"approval_perbill":680620155,"support_perbill":79305649,"approval":68.0620155,"support":7.9305649},{"time_hours":207,"approval_perbill":679814385,"support_perbill":78840284,"approval":67.9814385,"support":7.8840284},{"time_hours":208,"approval_perbill":679012346,"support_perbill":78378378,"approval":67.9012346,"support":7.8378378},{"time_hours":209,"approval_perbill":678214011,"support_perbill":77919892,"approval":67.8214011,"support":7.7919892},{"time_hours":210,"approval_perbill":677419355,"support_perbill":77464788,"approval":67.7419355,"support":7.7464788},{"time_hours":211,"approval_perbill":676628353,"support_perbill":77013030,"approval":67.6628353,"support":7.701303},{"time_hours":212,"approval_perbill":675840979,"support_perbill":76564580,"approval":67.5840979,"support":7.656458},{"time_hours":213,"approval_perbill":675057209,"support_perbill":76119402,"approval":67.5057209,"support":7.6119402},{"time_hours":214,"approval_perbill":674277017,"support_perbill":75677462,"approval":67.4277017,"support":7.5677462},{"time_hours":215,"approval_perbill":673500380,"support_perbill":75238722,"approval":67.350038,"support":7.5238722},{"time_hours":216,"approval_perbill":672727273,"support_perbill":74803149,"approval":67.2727273,"support":7.4803149},{"time_hours":217,"approval_perbill":671957672,"support_perbill":74370709,"approval":67.1957672,"support":7.4370709},{"time_hours":218,"approval_perbill":671191554,"support_perbill":73941368,"approval":67.1191554,"support":7.3941368},{"time_hours":219,"approval_perbill":670428894,"support_perbill":73515092,"approval":67.0428894,"support":7.3515092},{"time_hours":220,"approval_perbill":669669670,"support_perbill":73091849,"approval":66.966967,"support":7.3091849},{"time_hours":221,"approval_perbill":668913858,"support_perbill":72671608,"approval":66.8913858,"support":7.2671608},{"time_hours":222,"approval_perbill":668161435,"support_perbill":72254335,"approval":66.8161435,"support":7.2254335},{"time_hours":223,"approval_perbill":667412379,"support_perbill":71839999,"approval":66.7412379,"support":7.1839999},{"time_hours":224,"approval_perbill":666666667,"support_perbill":71428571,"approval":66.6666667,"support":7.1428571},{"time_hours":225,"approval_perbill":665924276,"support_perbill":71020018,"approval":66.5924276,"support":7.1020018},{"time_hours":226,"approval_perbill":665185186,"support_perbill":70614312,"approval":66.5185186,"support":7.0614312},{"time_hours":227,"approval_perbill":664449372,"support_perbill":70211422,"approval":66.4449372,"support":7.0211422},{"time_hours":228,"approval_perbill":663716814,"support_perbill":69811320,"approval":66.3716814,"support":6.981132},{"time_hours":229,"approval_perbill":662987491,"support_perbill":69413976,"approval":66.2987491,"support":6.9413976},{"time_hours":230,"approval_perbill":662261381,"support_perbill":69019362,"approval":66.2261381,"support":6.9019362},{"time_hours":231,"approval_perbill":661538462,"support_perbill":68627450,"approval":66.1538462,"support":6.862745},{"time_hours":232,"approval_perbill":660818714,"support_perbill":68238213,"approval":66.0818714,"support":6.8238213},{"time_hours":233,"approval_perbill":660102115,"support_perbill":67851622,"approval":66.0102115,"support":6.7851622},{"time_hours":234,"approval_perbill":659388647,"support_perbill":67467652,"approval":65.9388647,"support":6.7467652},{"time_hours":235,"approval_perbill":658678287,"support_perbill":67086275,"approval":65.8678287,"support":6.7086275},{"time_hours":236,"approval_perbill":657971015,"support_perbill":66707466,"approval":65.7971015,"support":6.6707466},{"time_hours":237,"approval_perbill":657266811,"support_perbill":66331198,"approval":65.7266811,"support":6.6331198},{"time_hours":238,"approval_perbill":656565657,"support_perbill":65957446,"approval":65.6565657,"support":6.5957446},{"time_hours":239,"approval_perbill":655867531,"support_perbill":65586185,"approval":65.5867531,"support":6.5586185},{"time_hours":240,"approval_perbill":655172414,"support_perbill":65217391,"approval":65.5172414,"support":6.5217391},{"time_hours":241,"approval_perbill":654480287,"support_perbill":64851038,"approval":65.4480287,"support":6.4851038},{"time_hours":242,"approval_perbill":653791130,"support_perbill":64487102,"approval":65.379113,"support":6.4487102},{"time_hours":243,"approval_perbill":653104925,"support_perbill":64125560,"approval":65.3104925,"support":6.412556},{"time_hours":244,"approval_perbill":652421652,"support_perbill":63766388,"approval":65.2421652,"support":6.3766388},{"time_hours":245,"approval_perbill":651741294,"support_perbill":63409563,"approval":65.1741294,"support":6.3409563},{"time_hours":246,"approval_perbill":651063830,"support_perbill":63055062,"approval":65.106383,"support":6.3055062},{"time_hours":247,"approval_perbill":650389243,"support_perbill":62702862,"approval":65.0389243,"support":6.2702862},{"time_hours":248,"approval_perbill":649717514,"support_perbill":62352940,"approval":64.9717514,"support":6.235294},{"time_hours":249,"approval_perbill":649048626,"support_perbill":62005276,"approval":64.9048626,"support":6.2005276},{"time_hours":250,"approval_perbill":648382560,"support_perbill":61659847,"approval":64.838256,"support":6.1659847},{"time_hours":251,"approval_perbill":647719299,"support_perbill":61316632,"approval":64.7719299,"support":6.1316632},{"time_hours":252,"approval_perbill":647058823,"support_perbill":60975609,"approval":64.7058823,"support":6.0975609},{"time_hours":253,"approval_perbill":646401118,"support_perbill":60636758,"approval":64.6401118,"support":6.0636758},{"time_hours":254,"approval_perbill":645746165,"support_perbill":60300057,"approval":64.5746165,"support":6.0300057},{"time_hours":255,"approval_perbill":645093946,"support_perbill":59965487,"approval":64.5093946,"support":5.9965487},{"time_hours":256,"approval_perbill":644444445,"support_perbill":59633027,"approval":64.4444445,"support":5.9633027},{"time_hours":257,"approval_perbill":643797644,"support_perbill":59302657,"approval":64.3797644,"support":5.9302657},{"time_hours":258,"approval_perbill":643153527,"support_perbill":58974358,"approval":64.3153527,"support":5.8974358},{"time_hours":259,"approval_perbill":642512078,"support_perbill":58648111,"approval":64.2512078,"support":5.8648111},{"time_hours":260,"approval_perbill":641873279,"support_perbill":58323895,"approval":64.1873279,"support":5.8323895},{"time_hours":261,"approval_perbill":641237113,"support_perbill":58001693,"approval":64.1237113,"support":5.8001693},{"time_hours":262,"approval_perbill":640603567,"support_perbill":57681485,"approval":64.0603567,"support":5.7681485},{"time_hours":263,"approval_perbill":639972622,"support_perbill":57363253,"approval":63.9972622,"support":5.7363253},{"time_hours":264,"approval_perbill":639344263,"support_perbill":57046979,"approval":63.9344263,"support":5.7046979},{"time_hours":265,"approval_perbill":638718473,"support_perbill":56732645,"approval":63.8718473,"support":5.6732645},{"time_hours":266,"approval_perbill":638095238,"support_perbill":56420233,"approval":63.8095238,"support":5.6420233},{"time_hours":267,"approval_perbill":637474542,"support_perbill":56109725,"approval":63.7474542,"support":5.6109725},{"time_hours":268,"approval_perbill":636856369,"support_perbill":55801104,"approval":63.6856369,"support":5.5801104},{"time_hours":269,"approval_perbill":636240703,"support_perbill":55494353,"approval":63.6240703,"support":5.5494353},{"time_hours":270,"approval_perbill":635627530,"support_perbill":55189456,"approval":63.562753,"support":5.5189456},{"time_hours":271,"approval_perbill":635016835,"support_perbill":54886394,"approval":63.5016835,"support":5.4886394},{"time_hours":272,"approval_perbill":634408602,"support_perbill":54585152,"approval":63.4408602,"support":5.4585152},{"time_hours":273,"approval_perbill":633802817,"support_perbill":54285714,"approval":63.3802817,"support":5.4285714},{"time_hours":274,"approval_perbill":633199465,"support_perbill":53988062,"approval":63.3199465,"support":5.3988062},{"time_hours":275,"approval_perbill":632598530,"support_perbill":53692182,"approval":63.259853,"support":5.3692182},{"time_hours":276,"approval_perbill":632000000,"support_perbill":53398058,"approval":63.2,"support":5.3398058},{"time_hours":277,"approval_perbill":631403859,"support_perbill":53105673,"approval":63.1403859,"support":5.3105673},{"time_hours":278,"approval_perbill":630810093,"support_perbill":52815013,"approval":63.0810093,"support":5.2815013},{"time_hours":279,"approval_perbill":630218688,"support_perbill":52526062,"approval":63.0218688,"support":5.2526062},{"time_hours":280,"approval_perbill":629629630,"support_perbill":52238805,"approval":62.962963,"support":5.2238805},{"time_hours":281,"approval_perbill":629042905,"support_perbill":51953228,"approval":62.9042905,"support":5.1953228},{"time_hours":282,"approval_perbill":628458498,"support_perbill":51669316,"approval":62.8458498,"support":5.1669316},{"time_hours":283,"approval_perbill":627876397,"support_perbill":51387053,"approval":62.7876397,"support":5.1387053},{"time_hours":284,"approval_perbill":627296588,"support_perbill":51106427,"approval":62.7296588,"support":5.1106427},{"time_hours":285,"approval_perbill":626719057,"support_perbill":50827423,"approval":62.6719057,"support":5.0827423},{"time_hours":286,"approval_perbill":626143791,"support_perbill":50550025,"approval":62.6143791,"support":5.0550025},{"time_hours":287,"approval_perbill":625570776,"support_perbill":50274222,"approval":62.5570776,"support":5.0274222},{"time_hours":288,"approval_perbill":625000000,"support_perbill":49999999,"approval":62.5,"support":4.9999999},{"time_hours":289,"approval_perbill":624431449,"support_perbill":49727343,"approval":62.4431449,"support":4.9727343},{"time_hours":290,"approval_perbill":623865110,"support_perbill":49456240,"approval":62.386511,"support":4.945624},{"time_hours":291,"approval_perbill":623300971,"support_perbill":49186676,"approval":62.3300971,"support":4.9186676},{"time_hours":292,"approval_perbill":622739018,"support_perbill":48918640,"approval":62.2739018,"support":4.891864},{"time_hours":293,"approval_perbill":622179239,"support_perbill":48652117,"approval":62.2179239,"support":4.8652117},{"time_hours":294,"approval_perbill":621621621,"support_perbill":48387096,"approval":62.1621621,"support":4.8387096},{"time_hours":295,"approval_perbill":621066153,"support_perbill":48123563,"approval":62.1066153,"support":4.8123563},{"time_hours":296,"approval_perbill":620512821,"support_perbill":47861506,"approval":62.0512821,"support":4.7861506},{"time_hours":297,"approval_perbill":619961612,"support_perbill":47600913,"approval":61.9961612,"support":4.7600913},{"time_hours":298,"approval_perbill":619412516,"support_perbill":47341772,"approval":61.9412516,"support":4.7341772},{"time_hours":299,"approval_perbill":618865519,"support_perbill":47084069,"approval":61.8865519,"support":4.7084069},{"time_hours":300,"approval_perbill":618320611,"support_perbill":46827794,"approval":61.8320611,"support":4.6827794},{"time_hours":301,"approval_perbill":617777778,"support_perbill":46572934,"approval":61.7777778,"support":4.6572934},{"time_hours":302,"approval_perbill":617237009,"support_perbill":46319479,"approval":61.7237009,"support":4.6319479},{"time_hours":303,"approval_perbill":616698292,"support_perbill":46067415,"approval":61.6698292,"support":4.6067415},{"time_hours":304,"approval_perbill":616161616,"support_perbill":45816732,"approval":61.6161616,"support":4.5816732},{"time_hours":305,"approval_perbill":615626969,"support_perbill":45567419,"approval":61.5626969,"support":4.5567419},{"time_hours":306,"approval_perbill":615094340,"support_perbill":45319464,"approval":61.509434,"support":4.5319464},{"time_hours":307,"approval_perbill":614563716,"support_perbill":45072857,"approval":61.4563716,"support":4.5072857},{"time_hours":308,"approval_perbill":614035088,"support_perbill":44827585,"approval":61.4035088,"support":4.4827585},{"time_hours":309,"approval_perbill":613508443,"support_perbill":44583640,"approval":61.3508443,"support":4.458364},{"time_hours":310,"approval_perbill":612983770,"support_perbill":44341009,"approval":61.298377,"support":4.4341009},{"time_hours":311,"approval_perbill":612461059,"support_perbill":44099682,"approval":61.2461059,"support":4.4099682},{"time_hours":312,"approval_perbill":611940298,"support_perbill":43859648,"approval":61.1940298,"support":4.3859648},{"time_hours":313,"approval_perbill":611421477,"support_perbill":43620898,"approval":61.1421477,"support":4.3620898},{"time_hours":314,"approval_perbill":610904585,"support_perbill":43383422,"approval":61.0904585,"support":4.3383422},{"time_hours":315,"approval_perbill":610389610,"support_perbill":43147207,"approval":61.038961,"support":4.3147207},{"time_hours":316,"approval_perbill":609876543,"support_perbill":42912246,"approval":60.9876543,"support":4.2912246},{"time_hours":317,"approval_perbill":609365373,"support_perbill":42678528,"approval":60.9365373,"support":4.2678528},{"time_hours":318,"approval_perbill":608856089,"support_perbill":42446042,"approval":60.8856089,"support":4.2446042},{"time_hours":319,"approval_perbill":608348680,"support_perbill":42214780,"approval":60.834868,"support":4.221478},{"time_hours":320,"approval_perbill":607843137,"support_perbill":41984732,"approval":60.7843137,"support":4.1984732},{"time_hours":321,"approval_perbill":607339449,"support_perbill":41755888,"approval":60.7339449,"support":4.1755888},{"time_hours":322,"approval_perbill":606837607,"support_perbill":41528238,"approval":60.6837607,"support":4.1528238},{"time_hours":323,"approval_perbill":606337599,"support_perbill":41301774,"approval":60.6337599,"support":4.1301774},{"time_hours":324,"approval_perbill":605839416,"support_perbill":41076486,"approval":60.5839416,"support":4.1076486},{"time_hours":325,"approval_perbill":605343048,"support_perbill":40852366,"approval":60.5343048,"support":4.0852366},{"time_hours":326,"approval_perbill":604848485,"support_perbill":40629403,"approval":60.4848485,"support":4.0629403},{"time_hours":327,"approval_perbill":604355717,"support_perbill":40407589,"approval":60.4355717,"support":4.0407589},{"time_hours":328,"approval_perbill":603864734,"support_perbill":40186915,"approval":60.3864734,"support":4.0186915},{"time_hours":329,"approval_perbill":603375527,"support_perbill":39967373,"approval":60.3375527,"support":3.9967373},{"time_hours":330,"approval_perbill":602888087,"support_perbill":39748953,"approval":60.2888087,"support":3.9748953},{"time_hours":331,"approval_perbill":602402402,"support_perbill":39531648,"approval":60.2402402,"support":3.9531648},{"time_hours":332,"approval_perbill":601918465,"support_perbill":39315448,"approval":60.1918465,"support":3.9315448},{"time_hours":333,"approval_perbill":601436266,"support_perbill":39100345,"approval":60.1436266,"support":3.9100345},{"time_hours":334,"approval_perbill":600955794,"support_perbill":38886332,"approval":60.0955794,"support":3.8886332},{"time_hours":335,"approval_perbill":600477042,"support_perbill":38673398,"approval":60.0477042,"support":3.8673398},{"time_hours":336,"approval_perbill":600000000,"support_perbill":38461538,"approval":60,"support":3.8461538},{"time_hours":337,"approval_perbill":599524658,"support_perbill":38250741,"approval":59.9524658,"support":3.8250741},{"time_hours":338,"approval_perbill":599051008,"support_perbill":38041002,"approval":59.9051008,"support":3.8041002},{"time_hours":339,"approval_perbill":598579041,"support_perbill":37832310,"approval":59.8579041,"support":3.783231},{"time_hours":340,"approval_perbill":598108747,"support_perbill":37624659,"approval":59.8108747,"support":3.7624659},{"time_hours":341,"approval_perbill":597640118,"support_perbill":37418041,"approval":59.7640118,"support":3.7418041},{"time_hours":342,"approval_perbill":597173145,"support_perbill":37212448,"approval":59.7173145,"support":3.7212448},{"time_hours":343,"approval_perbill":596707819,"support_perbill":37007873,"approval":59.6707819,"support":3.7007873},{"time_hours":344,"approval_perbill":596244131,"support_perbill":36804308,"approval":59.6244131,"support":3.6804308},{"time_hours":345,"approval_perbill":595782074,"support_perbill":36601745,"approval":59.5782074,"support":3.6601745},{"time_hours":346,"approval_perbill":595321637,"support_perbill":36400178,"approval":59.5321637,"support":3.6400178},{"time_hours":347,"approval_perbill":594862814,"support_perbill":36199598,"approval":59.4862814,"support":3.6199598},{"time_hours":348,"approval_perbill":594405594,"support_perbill":35999999,"approval":59.4405594,"support":3.5999999},{"time_hours":349,"approval_perbill":593949971,"support_perbill":35801374,"approval":59.3949971,"support":3.5801374},{"time_hours":350,"approval_perbill":593495935,"support_perbill":35603714,"approval":59.3495935,"support":3.5603714},{"time_hours":351,"approval_perbill":593043478,"support_perbill":35407014,"approval":59.3043478,"support":3.5407014},{"time_hours":352,"approval_perbill":592592593,"support_perbill":35211267,"approval":59.2592593,"support":3.5211267},{"time_hours":353,"approval_perbill":592143270,"support_perbill":35016465,"approval":59.214327,"support":3.5016465},{"time_hours":354,"approval_perbill":591695502,"support_perbill":34822601,"approval":59.1695502,"support":3.4822601},{"time_hours":355,"approval_perbill":591249280,"support_perbill":34629669,"approval":59.124928,"support":3.4629669},{"time_hours":356,"approval_perbill":590804598,"support_perbill":34437663,"approval":59.0804598,"support":3.4437663},{"time_hours":357,"approval_perbill":590361446,"support_perbill":34246575,"approval":59.0361446,"support":3.4246575},{"time_hours":358,"approval_perbill":589919817,"support_perbill":34056398,"approval":58.9919817,"support":3.4056398},{"time_hours":359,"approval_perbill":589479703,"support_perbill":33867128,"approval":58.9479703,"support":3.3867128},{"time_hours":360,"approval_perbill":589041096,"support_perbill":33678756,"approval":58.9041096,"support":3.3678756},{"time_hours":361,"approval_perbill":588603989,"support_perbill":33491276,"approval":58.8603989,"support":3.3491276},{"time_hours":362,"approval_perbill":588168373,"support_perbill":33304683,"approval":58.8168373,"support":3.3304683},{"time_hours":363,"approval_perbill":587734242,"support_perbill":33118970,"approval":58.7734242,"support":3.311897},{"time_hours":364,"approval_perbill":587301587,"support_perbill":32934131,"approval":58.7301587,"support":3.2934131},{"time_hours":365,"approval_perbill":586870402,"support_perbill":32750159,"approval":58.6870402,"support":3.2750159},{"time_hours":366,"approval_perbill":586440678,"support_perbill":32567049,"approval":58.6440678,"support":3.2567049},{"time_hours":367,"approval_perbill":586012408,"support_perbill":32384794,"approval":58.6012408,"support":3.2384794},{"time_hours":368,"approval_perbill":585585585,"support_perbill":32203389,"approval":58.5585585,"support":3.2203389},{"time_hours":369,"approval_perbill":585160202,"support_perbill":32022827,"approval":58.5160202,"support":3.2022827},{"time_hours":370,"approval_perbill":584736251,"support_perbill":31843103,"approval":58.4736251,"support":3.1843103},{"time_hours":371,"approval_perbill":584313725,"support_perbill":31664211,"approval":58.4313725,"support":3.1664211},{"time_hours":372,"approval_perbill":583892617,"support_perbill":31486145,"approval":58.3892617,"support":3.1486145},{"time_hours":373,"approval_perbill":583472920,"support_perbill":31308900,"approval":58.347292,"support":3.13089},{"time_hours":374,"approval_perbill":583054626,"support_perbill":31132469,"approval":58.3054626,"support":3.1132469},{"time_hours":375,"approval_perbill":582637729,"support_perbill":30956847,"approval":58.2637729,"support":3.0956847},{"time_hours":376,"approval_perbill":582222222,"support_perbill":30782029,"approval":58.2222222,"support":3.0782029},{"time_hours":377,"approval_perbill":581808098,"support_perbill":30608009,"approval":58.1808098,"support":3.0608009},{"time_hours":378,"approval_perbill":581395349,"support_perbill":30434782,"approval":58.1395349,"support":3.0434782},{"time_hours":379,"approval_perbill":580983969,"support_perbill":30262342,"approval":58.0983969,"support":3.0262342},{"time_hours":380,"approval_perbill":580573951,"support_perbill":30090683,"approval":58.0573951,"support":3.0090683},{"time_hours":381,"approval_perbill":580165289,"support_perbill":29919802,"approval":58.0165289,"support":2.9919802},{"time_hours":382,"approval_perbill":579757976,"support_perbill":29749692,"approval":57.9757976,"support":2.9749692},{"time_hours":383,"approval_perbill":579352004,"support_perbill":29580347,"approval":57.9352004,"support":2.9580347},{"time_hours":384,"approval_perbill":578947368,"support_perbill":29411764,"approval":57.8947368,"support":2.9411764},{"time_hours":385,"approval_perbill":578544061,"support_perbill":29243936,"approval":57.8544061,"support":2.9243936},{"time_hours":386,"approval_perbill":578142076,"support_perbill":29076860,"approval":57.8142076,"support":2.907686},{"time_hours":387,"approval_perbill":577741407,"support_perbill":28910529,"approval":57.7741407,"support":2.8910529},{"time_hours":388,"approval_perbill":577342048,"support_perbill":28744938,"approval":57.7342048,"support":2.8744938},{"time_hours":389,"approval_perbill":576943991,"support_perbill":28580084,"approval":57.6943991,"support":2.8580084},{"time_hours":390,"approval_perbill":576547231,"support_perbill":28415961,"approval":57.6547231,"support":2.8415961},{"time_hours":391,"approval_perbill":576151761,"support_perbill":28252563,"approval":57.6151761,"support":2.8252563},{"time_hours":392,"approval_perbill":575757576,"support_perbill":28089887,"approval":57.5757576,"support":2.8089887},{"time_hours":393,"approval_perbill":575364668,"support_perbill":27927927,"approval":57.5364668,"support":2.7927927},{"time_hours":394,"approval_perbill":574973031,"support_perbill":27766679,"approval":57.4973031,"support":2.7766679},{"time_hours":395,"approval_perbill":574582660,"support_perbill":27606138,"approval":57.458266,"support":2.7606138},{"time_hours":396,"approval_perbill":574193548,"support_perbill":27446300,"approval":57.4193548,"support":2.74463},{"time_hours":397,"approval_perbill":573805690,"support_perbill":27287159,"approval":57.380569,"support":2.7287159},{"time_hours":398,"approval_perbill":573419078,"support_perbill":27128712,"approval":57.3419078,"support":2.7128712},{"time_hours":399,"approval_perbill":573033708,"support_perbill":26970954,"approval":57.3033708,"support":2.6970954},{"time_hours":400,"approval_perbill":572649572,"support_perbill":26813879,"approval":57.2649572,"support":2.6813879},{"time_hours":401,"approval_perbill":572266666,"support_perbill":26657485,"approval":57.2266666,"support":2.6657485},{"time_hours":402,"approval_perbill":571884984,"support_perbill":26501766,"approval":57.1884984,"support":2.6501766},{"time_hours":403,"approval_perbill":571504519,"support_perbill":26346718,"approval":57.1504519,"support":2.6346718},{"time_hours":404,"approval_perbill":571125265,"support_perbill":26192337,"approval":57.1125265,"support":2.6192337},{"time_hours":405,"approval_perbill":570747218,"support_perbill":26038618,"approval":57.0747218,"support":2.6038618},{"time_hours":406,"approval_perbill":570370370,"support_perbill":25885558,"approval":57.037037,"support":2.5885558},{"time_hours":407,"approval_perbill":569994717,"support_perbill":25733151,"approval":56.9994717,"support":2.5733151},{"time_hours":408,"approval_perbill":569620253,"support_perbill":25581395,"approval":56.9620253,"support":2.5581395},{"time_hours":409,"approval_perbill":569246972,"support_perbill":25430283,"approval":56.9246972,"support":2.5430283},{"time_hours":410,"approval_perbill":568874868,"support_perbill":25279814,"approval":56.8874868,"support":2.5279814},{"time_hours":411,"approval_perbill":568503937,"support_perbill":25129982,"approval":56.8503937,"support":2.5129982},{"time_hours":412,"approval_perbill":568134172,"support_perbill":24980783,"approval":56.8134172,"support":2.4980783},{"time_hours":413,"approval_perbill":567765567,"support_perbill":24832214,"approval":56.7765567,"support":2.4832214},{"time_hours":414,"approval_perbill":567398119,"support_perbill":24684270,"approval":56.7398119,"support":2.468427},{"time_hours":415,"approval_perbill":567031820,"support_perbill":24536948,"approval":56.703182,"support":2.4536948},{"time_hours":416,"approval_perbill":566666666,"support_perbill":24390243,"approval":56.6666666,"support":2.4390243},{"time_hours":417,"approval_perbill":566302652,"support_perbill":24244152,"approval":56.6302652,"support":2.4244152},{"time_hours":418,"approval_perbill":565939771,"support_perbill":24098671,"approval":56.5939771,"support":2.4098671},{"time_hours":419,"approval_perbill":565578020,"support_perbill":23953796,"approval":56.557802,"support":2.3953796},{"time_hours":420,"approval_perbill":565217391,"support_perbill":23809523,"approval":56.5217391,"support":2.3809523},{"time_hours":421,"approval_perbill":564857881,"support_perbill":23665849,"approval":56.4857881,"support":2.3665849},{"time_hours":422,"approval_perbill":564499484,"support_perbill":23522769,"approval":56.4499484,"support":2.3522769},{"time_hours":423,"approval_perbill":564142195,"support_perbill":23380281,"approval":56.4142195,"support":2.3380281},{"time_hours":424,"approval_perbill":563786008,"support_perbill":23238380,"approval":56.3786008,"support":2.323838},{"time_hours":425,"approval_perbill":563430919,"support_perbill":23097063,"approval":56.3430919,"support":2.3097063},{"time_hours":426,"approval_perbill":563076923,"support_perbill":22956326,"approval":56.3076923,"support":2.2956326},{"time_hours":427,"approval_perbill":562724014,"support_perbill":22816166,"approval":56.2724014,"support":2.2816166},{"time_hours":428,"approval_perbill":562372188,"support_perbill":22676579,"approval":56.2372188,"support":2.2676579},{"time_hours":429,"approval_perbill":562021439,"support_perbill":22537562,"approval":56.2021439,"support":2.2537562},{"time_hours":430,"approval_perbill":561671763,"support_perbill":22399111,"approval":56.1671763,"support":2.2399111},{"time_hours":431,"approval_perbill":561323155,"support_perbill":22261222,"approval":56.1323155,"support":2.2261222},{"time_hours":432,"approval_perbill":560975610,"support_perbill":22123893,"approval":56.097561,"support":2.2123893},{"time_hours":433,"approval_perbill":560629122,"support_perbill":21987120,"approval":56.0629122,"support":2.198712},{"time_hours":434,"approval_perbill":560283688,"support_perbill":21850899,"approval":56.0283688,"support":2.1850899},{"time_hours":435,"approval_perbill":559939302,"support_perbill":21715227,"approval":55.9939302,"support":2.1715227},{"time_hours":436,"approval_perbill":559595959,"support_perbill":21580102,"approval":55.9595959,"support":2.1580102},{"time_hours":437,"approval_perbill":559253656,"support_perbill":21445518,"approval":55.9253656,"support":2.1445518},{"time_hours":438,"approval_perbill":558912386,"support_perbill":21311475,"approval":55.8912386,"support":2.1311475},{"time_hours":439,"approval_perbill":558572147,"support_perbill":21177967,"approval":55.8572147,"support":2.1177967},{"time_hours":440,"approval_perbill":558232931,"support_perbill":21044992,"approval":55.8232931,"support":2.1044992},{"time_hours":441,"approval_perbill":557894736,"support_perbill":20912547,"approval":55.7894736,"support":2.0912547},{"time_hours":442,"approval_perbill":557557557,"support_perbill":20780628,"approval":55.7557557,"support":2.0780628},{"time_hours":443,"approval_perbill":557221389,"support_perbill":20649233,"approval":55.7221389,"support":2.0649233},{"time_hours":444,"approval_perbill":556886227,"support_perbill":20518358,"approval":55.6886227,"support":2.0518358},{"time_hours":445,"approval_perbill":556552068,"support_perbill":20388000,"approval":55.6552068,"support":2.0388},{"time_hours":446,"approval_perbill":556218905,"support_perbill":20258156,"approval":55.6218905,"support":2.0258156},{"time_hours":447,"approval_perbill":555886736,"support_perbill":20128824,"approval":55.5886736,"support":2.0128824},{"time_hours":448,"approval_perbill":555555555,"support_perbill":19999999,"approval":55.5555555,"support":1.9999999},{"time_hours":449,"approval_perbill":555225359,"support_perbill":19871680,"approval":55.5225359,"support":1.987168},{"time_hours":450,"approval_perbill":554896142,"support_perbill":19743863,"approval":55.4896142,"support":1.9743863},{"time_hours":451,"approval_perbill":554567901,"support_perbill":19616545,"approval":55.4567901,"support":1.9616545},{"time_hours":452,"approval_perbill":554240631,"support_perbill":19489723,"approval":55.4240631,"support":1.9489723},{"time_hours":453,"approval_perbill":553914328,"support_perbill":19363394,"approval":55.3914328,"support":1.9363394},{"time_hours":454,"approval_perbill":553588987,"support_perbill":19237556,"approval":55.3588987,"support":1.9237556},{"time_hours":455,"approval_perbill":553264604,"support_perbill":19112206,"approval":55.3264604,"support":1.9112206},{"time_hours":456,"approval_perbill":552941176,"support_perbill":18987341,"approval":55.2941176,"support":1.8987341},{"time_hours":457,"approval_perbill":552618698,"support_perbill":18862958,"approval":55.2618698,"support":1.8862958},{"time_hours":458,"approval_perbill":552297165,"support_perbill":18739053,"approval":55.2297165,"support":1.8739053},{"time_hours":459,"approval_perbill":551976574,"support_perbill":18615626,"approval":55.1976574,"support":1.8615626},{"time_hours":460,"approval_perbill":551656920,"support_perbill":18492672,"approval":55.165692,"support":1.8492672},{"time_hours":461,"approval_perbill":551338199,"support_perbill":18370189,"approval":55.1338199,"support":1.8370189},{"time_hours":462,"approval_perbill":551020408,"support_perbill":18248174,"approval":55.1020408,"support":1.8248174},{"time_hours":463,"approval_perbill":550703542,"support_perbill":18126625,"approval":55.0703542,"support":1.8126625},{"time_hours":464,"approval_perbill":550387597,"support_perbill":18005539,"approval":55.0387597,"support":1.8005539},{"time_hours":465,"approval_perbill":550072569,"support_perbill":17884914,"approval":55.0072569,"support":1.7884914},{"time_hours":466,"approval_perbill":549758454,"support_perbill":17764746,"approval":54.9758454,"support":1.7764746},{"time_hours":467,"approval_perbill":549445248,"support_perbill":17645033,"approval":54.9445248,"support":1.7645033},{"time_hours":468,"approval_perbill":549132948,"support_perbill":17525772,"approval":54.9132948,"support":1.7525772},{"time_hours":469,"approval_perbill":548821549,"support_perbill":17406962,"approval":54.8821549,"support":1.7406962},{"time_hours":470,"approval_perbill":548511047,"support_perbill":17288599,"approval":54.8511047,"support":1.7288599},{"time_hours":471,"approval_perbill":548201438,"support_perbill":17170681,"approval":54.8201438,"support":1.7170681},{"time_hours":472,"approval_perbill":547892720,"support_perbill":17053205,"approval":54.789272,"support":1.7053205},{"time_hours":473,"approval_perbill":547584887,"support_perbill":16936169,"approval":54.7584887,"support":1.6936169},{"time_hours":474,"approval_perbill":547277937,"support_perbill":16819571,"approval":54.7277937,"support":1.6819571},{"time_hours":475,"approval_perbill":546971864,"support_perbill":16703408,"approval":54.6971864,"support":1.6703408},{"time_hours":476,"approval_perbill":546666666,"support_perbill":16587677,"approval":54.6666666,"support":1.6587677},{"time_hours":477,"approval_perbill":546362339,"support_perbill":16472376,"approval":54.6362339,"support":1.6472376},{"time_hours":478,"approval_perbill":546058879,"support_perbill":16357503,"approval":54.6058879,"support":1.6357503},{"time_hours":479,"approval_perbill":545756282,"support_perbill":16243056,"approval":54.5756282,"support":1.6243056},{"time_hours":480,"approval_perbill":545454545,"support_perbill":16129031,"approval":54.5454545,"support":1.6129031},{"time_hours":481,"approval_perbill":545153664,"support_perbill":16015428,"approval":54.5153664,"support":1.6015428},{"time_hours":482,"approval_perbill":544853635,"support_perbill":15902242,"approval":54.4853635,"support":1.5902242},{"time_hours":483,"approval_perbill":544554455,"support_perbill":15789473,"approval":54.4554455,"support":1.5789473},{"time_hours":484,"approval_perbill":544256120,"support_perbill":15677117,"approval":54.425612,"support":1.5677117},{"time_hours":485,"approval_perbill":543958627,"support_perbill":15565173,"approval":54.3958627,"support":1.5565173},{"time_hours":486,"approval_perbill":543661971,"support_perbill":15453638,"approval":54.3661971,"support":1.5453638},{"time_hours":487,"approval_perbill":543366151,"support_perbill":15342510,"approval":54.3366151,"support":1.534251},{"time_hours":488,"approval_perbill":543071161,"support_perbill":15231787,"approval":54.3071161,"support":1.5231787},{"time_hours":489,"approval_perbill":542776998,"support_perbill":15121467,"approval":54.2776998,"support":1.5121467},{"time_hours":490,"approval_perbill":542483660,"support_perbill":15011547,"approval":54.248366,"support":1.5011547},{"time_hours":491,"approval_perbill":542191142,"support_perbill":14902025,"approval":54.2191142,"support":1.4902025},{"time_hours":492,"approval_perbill":541899441,"support_perbill":14792899,"approval":54.1899441,"support":1.4792899},{"time_hours":493,"approval_perbill":541608554,"support_perbill":14684166,"approval":54.1608554,"support":1.4684166},{"time_hours":494,"approval_perbill":541318477,"support_perbill":14575826,"approval":54.1318477,"support":1.4575826},{"time_hours":495,"approval_perbill":541029207,"support_perbill":14467876,"approval":54.1029207,"support":1.4467876},{"time_hours":496,"approval_perbill":540740740,"support_perbill":14360312,"approval":54.074074,"support":1.4360312},{"time_hours":497,"approval_perbill":540453074,"support_perbill":14253135,"approval":54.0453074,"support":1.4253135},{"time_hours":498,"approval_perbill":540166205,"support_perbill":14146341,"approval":54.0166205,"support":1.4146341},{"time_hours":499,"approval_perbill":539880129,"support_perbill":14039928,"approval":53.9880129,"support":1.4039928},{"time_hours":500,"approval_perbill":539594843,"support_perbill":13933894,"approval":53.9594843,"support":1.3933894},{"time_hours":501,"approval_perbill":539310344,"support_perbill":13828238,"approval":53.9310344,"support":1.3828238},{"time_hours":502,"approval_perbill":539026630,"support_perbill":13722957,"approval":53.902663,"support":1.3722957},{"time_hours":503,"approval_perbill":538743695,"support_perbill":13618049,"approval":53.8743695,"support":1.3618049},{"time_hours":504,"approval_perbill":538461538,"support_perbill":13513513,"approval":53.8461538,"support":1.3513513},{"time_hours":505,"approval_perbill":538180155,"support_perbill":13409346,"approval":53.8180155,"support":1.3409346},{"time_hours":506,"approval_perbill":537899543,"support_perbill":13305546,"approval":53.7899543,"support":1.3305546},{"time_hours":507,"approval_perbill":537619699,"support_perbill":13202112,"approval":53.7619699,"support":1.3202112},{"time_hours":508,"approval_perbill":537340619,"support_perbill":13099041,"approval":53.7340619,"support":1.3099041},{"time_hours":509,"approval_perbill":537062301,"support_perbill":12996331,"approval":53.7062301,"support":1.2996331},{"time_hours":510,"approval_perbill":536784741,"support_perbill":12893982,"approval":53.6784741,"support":1.2893982},{"time_hours":511,"approval_perbill":536507936,"support_perbill":12791990,"approval":53.6507936,"support":1.279199},{"time_hours":512,"approval_perbill":536231884,"support_perbill":12690355,"approval":53.6231884,"support":1.2690355},{"time_hours":513,"approval_perbill":535956580,"support_perbill":12589073,"approval":53.595658,"support":1.2589073},{"time_hours":514,"approval_perbill":535682023,"support_perbill":12488143,"approval":53.5682023,"support":1.2488143},{"time_hours":515,"approval_perbill":535408209,"support_perbill":12387564,"approval":53.5408209,"support":1.2387564},{"time_hours":516,"approval_perbill":535135135,"support_perbill":12287334,"approval":53.5135135,"support":1.2287334},{"time_hours":517,"approval_perbill":534862798,"support_perbill":12187450,"approval":53.4862798,"support":1.218745},{"time_hours":518,"approval_perbill":534591195,"support_perbill":12087911,"approval":53.4591195,"support":1.2087911},{"time_hours":519,"approval_perbill":534320323,"support_perbill":11988716,"approval":53.4320323,"support":1.1988716},{"time_hours":520,"approval_perbill":534050179,"support_perbill":11889861,"approval":53.4050179,"support":1.1889861},{"time_hours":521,"approval_perbill":533780760,"support_perbill":11791347,"approval":53.378076,"support":1.1791347},{"time_hours":522,"approval_perbill":533512064,"support_perbill":11693170,"approval":53.3512064,"support":1.169317},{"time_hours":523,"approval_perbill":533244087,"support_perbill":11595330,"approval":53.3244087,"support":1.159533},{"time_hours":524,"approval_perbill":532976827,"support_perbill":11497824,"approval":53.2976827,"support":1.1497824},{"time_hours":525,"approval_perbill":532710280,"support_perbill":11400651,"approval":53.271028,"support":1.1400651},{"time_hours":526,"approval_perbill":532444444,"support_perbill":11303808,"approval":53.2444444,"support":1.1303808},{"time_hours":527,"approval_perbill":532179316,"support_perbill":11207295,"approval":53.2179316,"support":1.1207295},{"time_hours":528,"approval_perbill":531914893,"support_perbill":11111110,"approval":53.1914893,"support":1.111111},{"time_hours":529,"approval_perbill":531651173,"support_perbill":11015251,"approval":53.1651173,"support":1.1015251},{"time_hours":530,"approval_perbill":531388152,"support_perbill":10919716,"approval":53.1388152,"support":1.0919716},{"time_hours":531,"approval_perbill":531125827,"support_perbill":10824504,"approval":53.1125827,"support":1.0824504},{"time_hours":532,"approval_perbill":530864197,"support_perbill":10729613,"approval":53.0864197,"support":1.0729613},{"time_hours":533,"approval_perbill":530603258,"support_perbill":10635041,"approval":53.0603258,"support":1.0635041},{"time_hours":534,"approval_perbill":530343007,"support_perbill":10540787,"approval":53.0343007,"support":1.0540787},{"time_hours":535,"approval_perbill":530083443,"support_perbill":10446850,"approval":53.0083443,"support":1.044685},{"time_hours":536,"approval_perbill":529824561,"support_perbill":10353227,"approval":52.9824561,"support":1.0353227},{"time_hours":537,"approval_perbill":529566360,"support_perbill":10259917,"approval":52.956636,"support":1.0259917},{"time_hours":538,"approval_perbill":529308836,"support_perbill":10166919,"approval":52.9308836,"support":1.0166919},{"time_hours":539,"approval_perbill":529051987,"support_perbill":10074230,"approval":52.9051987,"support":1.007423},{"time_hours":540,"approval_perbill":528795811,"support_perbill":9981850,"approval":52.8795811,"support":0.998185},{"time_hours":541,"approval_perbill":528540305,"support_perbill":9889777,"approval":52.8540305,"support":0.9889777},{"time_hours":542,"approval_perbill":528285465,"support_perbill":9798009,"approval":52.8285465,"support":0.9798009},{"time_hours":543,"approval_perbill":528031290,"support_perbill":9706545,"approval":52.803129,"support":0.9706545},{"time_hours":544,"approval_perbill":527777777,"support_perbill":9615384,"approval":52.7777777,"support":0.9615384},{"time_hours":545,"approval_perbill":527524924,"support_perbill":9524523,"approval":52.7524924,"support":0.9524523},{"time_hours":546,"approval_perbill":527272727,"support_perbill":9433961,"approval":52.7272727,"support":0.9433961},{"time_hours":547,"approval_perbill":527021184,"support_perbill":9343698,"approval":52.7021184,"support":0.9343698},{"time_hours":548,"approval_perbill":526770293,"support_perbill":9253730,"approval":52.6770293,"support":0.925373},{"time_hours":549,"approval_perbill":526520051,"support_perbill":9164058,"approval":52.6520051,"support":0.9164058},{"time_hours":550,"approval_perbill":526270456,"support_perbill":9074679,"approval":52.6270456,"support":0.9074679},{"time_hours":551,"approval_perbill":526021505,"support_perbill":8985592,"approval":52.6021505,"support":0.8985592},{"time_hours":552,"approval_perbill":525773195,"support_perbill":8896796,"approval":52.5773195,"support":0.8896796},{"time_hours":553,"approval_perbill":525525525,"support_perbill":8808289,"approval":52.5525525,"support":0.8808289},{"time_hours":554,"approval_perbill":525278491,"support_perbill":8720070,"approval":52.5278491,"support":0.872007},{"time_hours":555,"approval_perbill":525032092,"support_perbill":8632137,"approval":52.5032092,"support":0.8632137},{"time_hours":556,"approval_perbill":524786324,"support_perbill":8544489,"approval":52.4786324,"support":0.8544489},{"time_hours":557,"approval_perbill":524541186,"support_perbill":8457125,"approval":52.4541186,"support":0.8457125},{"time_hours":558,"approval_perbill":524296675,"support_perbill":8370043,"approval":52.4296675,"support":0.8370043},{"time_hours":559,"approval_perbill":524052788,"support_perbill":8283242,"approval":52.4052788,"support":0.8283242},{"time_hours":560,"approval_perbill":523809523,"support_perbill":8196720,"approval":52.3809523,"support":0.819672},{"time_hours":561,"approval_perbill":523566878,"support_perbill":8110477,"approval":52.3566878,"support":0.8110477},{"time_hours":562,"approval_perbill":523324851,"support_perbill":8024510,"approval":52.3324851,"support":0.802451},{"time_hours":563,"approval_perbill":523083439,"support_perbill":7938819,"approval":52.3083439,"support":0.7938819},{"time_hours":564,"approval_perbill":522842639,"support_perbill":7853402,"approval":52.2842639,"support":0.7853402},{"time_hours":565,"approval_perbill":522602450,"support_perbill":7768258,"approval":52.260245,"support":0.7768258},{"time_hours":566,"approval_perbill":522362869,"support_perbill":7683386,"approval":52.2362869,"support":0.7683386},{"time_hours":567,"approval_perbill":522123893,"support_perbill":7598783,"approval":52.2123893,"support":0.7598783},{"time_hours":568,"approval_perbill":521885521,"support_perbill":7514450,"approval":52.1885521,"support":0.751445},{"time_hours":569,"approval_perbill":521647751,"support_perbill":7430384,"approval":52.1647751,"support":0.7430384},{"time_hours":570,"approval_perbill":521410579,"support_perbill":7346585,"approval":52.1410579,"support":0.7346585},{"time_hours":571,"approval_perbill":521174004,"support_perbill":7263051,"approval":52.1174004,"support":0.7263051},{"time_hours":572,"approval_perbill":520938023,"support_perbill":7179781,"approval":52.0938023,"support":0.7179781},{"time_hours":573,"approval_perbill":520702634,"support_perbill":7096773,"approval":52.0702634,"support":0.7096773},{"time_hours":574,"approval_perbill":520467836,"support_perbill":7014027,"approval":52.0467836,"support":0.7014027},{"time_hours":575,"approval_perbill":520233625,"support_perbill":6931541,"approval":52.0233625,"support":0.6931541},{"time_hours":576,"approval_perbill":519999999,"support_perbill":6849314,"approval":51.9999999,"support":0.6849314},{"time_hours":577,"approval_perbill":519766957,"support_perbill":6767345,"approval":51.9766957,"support":0.6767345},{"time_hours":578,"approval_perbill":519534497,"support_perbill":6685632,"approval":51.9534497,"support":0.6685632},{"time_hours":579,"approval_perbill":519302615,"support_perbill":6604175,"approval":51.9302615,"support":0.6604175},{"time_hours":580,"approval_perbill":519071310,"support_perbill":6522971,"approval":51.907131,"support":0.6522971},{"time_hours":581,"approval_perbill":518840579,"support_perbill":6442021,"approval":51.8840579,"support":0.6442021},{"time_hours":582,"approval_perbill":518610421,"support_perbill":6361322,"approval":51.8610421,"support":0.6361322},{"time_hours":583,"approval_perbill":518380834,"support_perbill":6280874,"approval":51.8380834,"support":0.6280874},{"time_hours":584,"approval_perbill":518151815,"support_perbill":6200676,"approval":51.8151815,"support":0.6200676},{"time_hours":585,"approval_perbill":517923362,"support_perbill":6120725,"approval":51.7923362,"support":0.6120725},{"time_hours":586,"approval_perbill":517695473,"support_perbill":6041022,"approval":51.7695473,"support":0.6041022},{"time_hours":587,"approval_perbill":517468146,"support_perbill":5961565,"approval":51.7468146,"support":0.5961565},{"time_hours":588,"approval_perbill":517241379,"support_perbill":5882352,"approval":51.7241379,"support":0.5882352},{"time_hours":589,"approval_perbill":517015170,"support_perbill":5803383,"approval":51.701517,"support":0.5803383},{"time_hours":590,"approval_perbill":516789516,"support_perbill":5724657,"approval":51.6789516,"support":0.5724657},{"time_hours":591,"approval_perbill":516564417,"support_perbill":5646172,"approval":51.6564417,"support":0.5646172},{"time_hours":592,"approval_perbill":516339869,"support_perbill":5567928,"approval":51.6339869,"support":0.5567928},{"time_hours":593,"approval_perbill":516115870,"support_perbill":5489923,"approval":51.611587,"support":0.5489923},{"time_hours":594,"approval_perbill":515892420,"support_perbill":5412156,"approval":51.589242,"support":0.5412156},{"time_hours":595,"approval_perbill":515669515,"support_perbill":5334626,"approval":51.5669515,"support":0.5334626},{"time_hours":596,"approval_perbill":515447154,"support_perbill":5257332,"approval":51.5447154,"support":0.5257332},{"time_hours":597,"approval_perbill":515225334,"support_perbill":5180273,"approval":51.5225334,"support":0.5180273},{"time_hours":598,"approval_perbill":515004055,"support_perbill":5103447,"approval":51.5004055,"support":0.5103447},{"time_hours":599,"approval_perbill":514783313,"support_perbill":5026855,"approval":51.4783313,"support":0.5026855},{"time_hours":600,"approval_perbill":514563106,"support_perbill":4950494,"approval":51.4563106,"support":0.4950494},{"time_hours":601,"approval_perbill":514343434,"support_perbill":4874364,"approval":51.4343434,"support":0.4874364},{"time_hours":602,"approval_perbill":514124293,"support_perbill":4798464,"approval":51.4124293,"support":0.4798464},{"time_hours":603,"approval_perbill":513905683,"support_perbill":4722792,"approval":51.3905683,"support":0.4722792},{"time_hours":604,"approval_perbill":513687600,"support_perbill":4647347,"approval":51.36876,"support":0.4647347},{"time_hours":605,"approval_perbill":513470044,"support_perbill":4572130,"approval":51.3470044,"support":0.457213},{"time_hours":606,"approval_perbill":513253011,"support_perbill":4497137,"approval":51.3253011,"support":0.4497137},{"time_hours":607,"approval_perbill":513036502,"support_perbill":4422370,"approval":51.3036502,"support":0.442237},{"time_hours":608,"approval_perbill":512820512,"support_perbill":4347825,"approval":51.2820512,"support":0.4347825},{"time_hours":609,"approval_perbill":512605041,"support_perbill":4273503,"approval":51.2605041,"support":0.4273503},{"time_hours":610,"approval_perbill":512390087,"support_perbill":4199403,"approval":51.2390087,"support":0.4199403},{"time_hours":611,"approval_perbill":512175648,"support_perbill":4125523,"approval":51.2175648,"support":0.4125523},{"time_hours":612,"approval_perbill":511961722,"support_perbill":4051863,"approval":51.1961722,"support":0.4051863},{"time_hours":613,"approval_perbill":511748307,"support_perbill":3978421,"approval":51.1748307,"support":0.3978421},{"time_hours":614,"approval_perbill":511535401,"support_perbill":3905197,"approval":51.1535401,"support":0.3905197},{"time_hours":615,"approval_perbill":511323003,"support_perbill":3832190,"approval":51.1323003,"support":0.383219},{"time_hours":616,"approval_perbill":511111111,"support_perbill":3759398,"approval":51.1111111,"support":0.3759398},{"time_hours":617,"approval_perbill":510899722,"support_perbill":3686820,"approval":51.0899722,"support":0.368682},{"time_hours":618,"approval_perbill":510688835,"support_perbill":3614457,"approval":51.0688835,"support":0.3614457},{"time_hours":619,"approval_perbill":510478449,"support_perbill":3542306,"approval":51.0478449,"support":0.3542306},{"time_hours":620,"approval_perbill":510268562,"support_perbill":3470368,"approval":51.0268562,"support":0.3470368},{"time_hours":621,"approval_perbill":510059171,"support_perbill":3398640,"approval":51.0059171,"support":0.339864},{"time_hours":622,"approval_perbill":509850275,"support_perbill":3327122,"approval":50.9850275,"support":0.3327122},{"time_hours":623,"approval_perbill":509641873,"support_perbill":3255813,"approval":50.9641873,"support":0.3255813},{"time_hours":624,"approval_perbill":509433962,"support_perbill":3184712,"approval":50.9433962,"support":0.3184712},{"time_hours":625,"approval_perbill":509226540,"support_perbill":3113819,"approval":50.922654,"support":0.3113819},{"time_hours":626,"approval_perbill":509019607,"support_perbill":3043132,"approval":50.9019607,"support":0.3043132},{"time_hours":627,"approval_perbill":508813160,"support_perbill":2972651,"approval":50.881316,"support":0.2972651},{"time_hours":628,"approval_perbill":508607198,"support_perbill":2902374,"approval":50.8607198,"support":0.2902374},{"time_hours":629,"approval_perbill":508401719,"support_perbill":2832301,"approval":50.8401719,"support":0.2832301},{"time_hours":630,"approval_perbill":508196721,"support_perbill":2762430,"approval":50.8196721,"support":0.276243},{"time_hours":631,"approval_perbill":507992202,"support_perbill":2692761,"approval":50.7992202,"support":0.2692761},{"time_hours":632,"approval_perbill":507788161,"support_perbill":2623294,"approval":50.7788161,"support":0.2623294},{"time_hours":633,"approval_perbill":507584597,"support_perbill":2554027,"approval":50.7584597,"support":0.2554027},{"time_hours":634,"approval_perbill":507381507,"support_perbill":2484959,"approval":50.7381507,"support":0.2484959},{"time_hours":635,"approval_perbill":507178890,"support_perbill":2416089,"approval":50.717889,"support":0.2416089},{"time_hours":636,"approval_perbill":506976744,"support_perbill":2347417,"approval":50.6976744,"support":0.2347417},{"time_hours":637,"approval_perbill":506775067,"support_perbill":2278942,"approval":50.6775067,"support":0.2278942},{"time_hours":638,"approval_perbill":506573859,"support_perbill":2210662,"approval":50.6573859,"support":0.2210662},{"time_hours":639,"approval_perbill":506373116,"support_perbill":2142578,"approval":50.6373116,"support":0.2142578},{"time_hours":640,"approval_perbill":506172839,"support_perbill":2074688,"approval":50.6172839,"support":0.2074688},{"time_hours":641,"approval_perbill":505973024,"support_perbill":2006991,"approval":50.5973024,"support":0.2006991},{"time_hours":642,"approval_perbill":505773671,"support_perbill":1939487,"approval":50.5773671,"support":0.1939487},{"time_hours":643,"approval_perbill":505574778,"support_perbill":1872175,"approval":50.5574778,"support":0.1872175},{"time_hours":644,"approval_perbill":505376343,"support_perbill":1805053,"approval":50.5376343,"support":0.1805053},{"time_hours":645,"approval_perbill":505178365,"support_perbill":1738122,"approval":50.5178365,"support":0.1738122},{"time_hours":646,"approval_perbill":504980842,"support_perbill":1671380,"approval":50.4980842,"support":0.167138},{"time_hours":647,"approval_perbill":504783773,"support_perbill":1604826,"approval":50.4783773,"support":0.1604826},{"time_hours":648,"approval_perbill":504587155,"support_perbill":1538461,"approval":50.4587155,"support":0.1538461},{"time_hours":649,"approval_perbill":504390988,"support_perbill":1472282,"approval":50.4390988,"support":0.1472282},{"time_hours":650,"approval_perbill":504195270,"support_perbill":1406289,"approval":50.419527,"support":0.1406289},{"time_hours":651,"approval_perbill":503999999,"support_perbill":1340482,"approval":50.3999999,"support":0.1340482},{"time_hours":652,"approval_perbill":503805174,"support_perbill":1274859,"approval":50.3805174,"support":0.1274859},{"time_hours":653,"approval_perbill":503610794,"support_perbill":1209420,"approval":50.3610794,"support":0.120942},{"time_hours":654,"approval_perbill":503416856,"support_perbill":1144164,"approval":50.3416856,"support":0.1144164},{"time_hours":655,"approval_perbill":503223359,"support_perbill":1079090,"approval":50.3223359,"support":0.107909},{"time_hours":656,"approval_perbill":503030302,"support_perbill":1014198,"approval":50.3030302,"support":0.1014198},{"time_hours":657,"approval_perbill":502837684,"support_perbill":949486,"approval":50.2837684,"support":0.0949486},{"time_hours":658,"approval_perbill":502645502,"support_perbill":884955,"approval":50.2645502,"support":0.0884955},{"time_hours":659,"approval_perbill":502453756,"support_perbill":820603,"approval":50.2453756,"support":0.0820603},{"time_hours":660,"approval_perbill":502262443,"support_perbill":756429,"approval":50.2262443,"support":0.0756429},{"time_hours":661,"approval_perbill":502071562,"support_perbill":692433,"approval":50.2071562,"support":0.0692433},{"time_hours":662,"approval_perbill":501881113,"support_perbill":628614,"approval":50.1881113,"support":0.0628614},{"time_hours":663,"approval_perbill":501691093,"support_perbill":564971,"approval":50.1691093,"support":0.0564971},{"time_hours":664,"approval_perbill":501501501,"support_perbill":501504,"approval":50.1501501,"support":0.0501504},{"time_hours":665,"approval_perbill":501312335,"support_perbill":438211,"approval":50.1312335,"support":0.0438211},{"time_hours":666,"approval_perbill":501123595,"support_perbill":375093,"approval":50.1123595,"support":0.0375093},{"time_hours":667,"approval_perbill":500935278,"support_perbill":312148,"approval":50.0935278,"support":0.0312148},{"time_hours":668,"approval_perbill":500747383,"support_perbill":249376,"approval":50.0747383,"support":0.0249376},{"time_hours":669,"approval_perbill":500559910,"support_perbill":186775,"approval":50.055991,"support":0.0186775},{"time_hours":670,"approval_perbill":500372855,"support_perbill":124346,"approval":50.0372855,"support":0.0124346},{"time_hours":671,"approval_perbill":500186219,"support_perbill":62088,"approval":50.0186219,"support":0.0062088},{"time_hours":672,"approval_perbill":499999999,"support_perbill":0,"approval":49.9999999,"support":0}]')},75029:p=>{"use strict";p.exports=JSON.parse('[{"time_hours":0,"approval_perbill":1000000000,"support_perbill":500000026,"approval":100,"support":50.0000026},{"time_hours":1,"approval_perbill":998774510,"support_perbill":455636061,"approval":99.877451,"support":45.5636061},{"time_hours":2,"approval_perbill":997549020,"support_perbill":418401359,"approval":99.754902,"support":41.8401359},{"time_hours":3,"approval_perbill":996323530,"support_perbill":386705228,"approval":99.632353,"support":38.6705228},{"time_hours":4,"approval_perbill":995098040,"support_perbill":359397443,"approval":99.509804,"support":35.9397443},{"time_hours":5,"approval_perbill":993872550,"support_perbill":335625639,"approval":99.387255,"support":33.5625639},{"time_hours":6,"approval_perbill":992647060,"support_perbill":314744813,"approval":99.264706,"support":31.4744813},{"time_hours":7,"approval_perbill":991421570,"support_perbill":296257808,"approval":99.142157,"support":29.6257808},{"time_hours":8,"approval_perbill":990196080,"support_perbill":279775293,"approval":99.019608,"support":27.9775293},{"time_hours":9,"approval_perbill":988970589,"support_perbill":264988013,"approval":98.8970589,"support":26.4988013},{"time_hours":10,"approval_perbill":987745099,"support_perbill":251647242,"approval":98.7745099,"support":25.1647242},{"time_hours":11,"approval_perbill":986519609,"support_perbill":239550622,"approval":98.6519609,"support":23.9550622},{"time_hours":12,"approval_perbill":985294119,"support_perbill":228531862,"approval":98.5294119,"support":22.8531862},{"time_hours":13,"approval_perbill":984068628,"support_perbill":218453039,"approval":98.4068628,"support":21.8453039},{"time_hours":14,"approval_perbill":982843138,"support_perbill":209198815,"approval":98.2843138,"support":20.9198815},{"time_hours":15,"approval_perbill":981617648,"support_perbill":200671963,"approval":98.1617648,"support":20.0671963},{"time_hours":16,"approval_perbill":980392158,"support_perbill":192789972,"approval":98.0392158,"support":19.2789972},{"time_hours":17,"approval_perbill":979166667,"support_perbill":185482348,"approval":97.9166667,"support":18.5482348},{"time_hours":18,"approval_perbill":977941177,"support_perbill":178688524,"approval":97.7941177,"support":17.8688524},{"time_hours":19,"approval_perbill":976715687,"support_perbill":172356151,"approval":97.6715687,"support":17.2356151},{"time_hours":20,"approval_perbill":975490197,"support_perbill":166439756,"approval":97.5490197,"support":16.6439756},{"time_hours":21,"approval_perbill":974264706,"support_perbill":160899652,"approval":97.4264706,"support":16.0899652},{"time_hours":22,"approval_perbill":973039216,"support_perbill":155701053,"approval":97.3039216,"support":15.5701053},{"time_hours":23,"approval_perbill":971813726,"support_perbill":150813323,"approval":97.1813726,"support":15.0813323},{"time_hours":24,"approval_perbill":970588236,"support_perbill":146209386,"approval":97.0588236,"support":14.6209386},{"time_hours":25,"approval_perbill":969362746,"support_perbill":141865225,"approval":96.9362746,"support":14.1865225},{"time_hours":26,"approval_perbill":968137256,"support_perbill":137759452,"approval":96.8137256,"support":13.7759452},{"time_hours":27,"approval_perbill":966911766,"support_perbill":133872975,"approval":96.6911766,"support":13.3872975},{"time_hours":28,"approval_perbill":965686276,"support_perbill":130188679,"approval":96.5686276,"support":13.0188679},{"time_hours":29,"approval_perbill":964460786,"support_perbill":126691186,"approval":96.4460786,"support":12.6691186},{"time_hours":30,"approval_perbill":963235295,"support_perbill":123366639,"approval":96.3235295,"support":12.3366639},{"time_hours":31,"approval_perbill":962009805,"support_perbill":120202524,"approval":96.2009805,"support":12.0202524},{"time_hours":32,"approval_perbill":960784315,"support_perbill":117187499,"approval":96.0784315,"support":11.7187499},{"time_hours":33,"approval_perbill":959558825,"support_perbill":114311269,"approval":95.9558825,"support":11.4311269},{"time_hours":34,"approval_perbill":958333334,"support_perbill":111564465,"approval":95.8333334,"support":11.1564465},{"time_hours":35,"approval_perbill":957107844,"support_perbill":108938546,"approval":95.7107844,"support":10.8938546},{"time_hours":36,"approval_perbill":955882354,"support_perbill":106425701,"approval":95.5882354,"support":10.6425701},{"time_hours":37,"approval_perbill":954656864,"support_perbill":104018782,"approval":95.4656864,"support":10.4018782},{"time_hours":38,"approval_perbill":953431373,"support_perbill":101711228,"approval":95.3431373,"support":10.1711228},{"time_hours":39,"approval_perbill":952205883,"support_perbill":99497012,"approval":95.2205883,"support":9.9497012},{"time_hours":40,"approval_perbill":950980393,"support_perbill":97370582,"approval":95.0980393,"support":9.7370582},{"time_hours":41,"approval_perbill":949754903,"support_perbill":95326819,"approval":94.9754903,"support":9.5326819},{"time_hours":42,"approval_perbill":948529412,"support_perbill":93360994,"approval":94.8529412,"support":9.3360994},{"time_hours":43,"approval_perbill":947303922,"support_perbill":91468733,"approval":94.7303922,"support":9.1468733},{"time_hours":44,"approval_perbill":946078432,"support_perbill":89645982,"approval":94.6078432,"support":8.9645982},{"time_hours":45,"approval_perbill":944852942,"support_perbill":87888981,"approval":94.4852942,"support":8.7888981},{"time_hours":46,"approval_perbill":943627452,"support_perbill":86194234,"approval":94.3627452,"support":8.6194234},{"time_hours":47,"approval_perbill":942401961,"support_perbill":84558490,"approval":94.2401961,"support":8.455849},{"time_hours":48,"approval_perbill":941176471,"support_perbill":82978722,"approval":94.1176471,"support":8.2978722},{"time_hours":49,"approval_perbill":939950981,"support_perbill":81452103,"approval":93.9950981,"support":8.1452103},{"time_hours":50,"approval_perbill":938725491,"support_perbill":79975997,"approval":93.8725491,"support":7.9975997},{"time_hours":51,"approval_perbill":937500001,"support_perbill":78547936,"approval":93.7500001,"support":7.8547936},{"time_hours":52,"approval_perbill":936274511,"support_perbill":77165614,"approval":93.6274511,"support":7.7165614},{"time_hours":53,"approval_perbill":935049021,"support_perbill":75826867,"approval":93.5049021,"support":7.5826867},{"time_hours":54,"approval_perbill":933823531,"support_perbill":74529666,"approval":93.3823531,"support":7.4529666},{"time_hours":55,"approval_perbill":932598040,"support_perbill":73272106,"approval":93.259804,"support":7.3272106},{"time_hours":56,"approval_perbill":931372550,"support_perbill":72052400,"approval":93.137255,"support":7.20524},{"time_hours":57,"approval_perbill":930147060,"support_perbill":70868862,"approval":93.014706,"support":7.0868862},{"time_hours":58,"approval_perbill":928921570,"support_perbill":69719908,"approval":92.892157,"support":6.9719908},{"time_hours":59,"approval_perbill":927696079,"support_perbill":68604042,"approval":92.7696079,"support":6.8604042},{"time_hours":60,"approval_perbill":926470589,"support_perbill":67519857,"approval":92.6470589,"support":6.7519857},{"time_hours":61,"approval_perbill":925245099,"support_perbill":66466022,"approval":92.5245099,"support":6.6466022},{"time_hours":62,"approval_perbill":924019609,"support_perbill":65441280,"approval":92.4019609,"support":6.544128},{"time_hours":63,"approval_perbill":922794118,"support_perbill":64444443,"approval":92.2794118,"support":6.4444443},{"time_hours":64,"approval_perbill":921568628,"support_perbill":63474386,"approval":92.1568628,"support":6.3474386},{"time_hours":65,"approval_perbill":920343138,"support_perbill":62530044,"approval":92.0343138,"support":6.2530044},{"time_hours":66,"approval_perbill":919117648,"support_perbill":61610409,"approval":91.9117648,"support":6.1610409},{"time_hours":67,"approval_perbill":917892158,"support_perbill":60714523,"approval":91.7892158,"support":6.0714523},{"time_hours":68,"approval_perbill":916666667,"support_perbill":59841478,"approval":91.6666667,"support":5.9841478},{"time_hours":69,"approval_perbill":915441177,"support_perbill":58990411,"approval":91.5441177,"support":5.8990411},{"time_hours":70,"approval_perbill":914215687,"support_perbill":58160504,"approval":91.4215687,"support":5.8160504},{"time_hours":71,"approval_perbill":912990197,"support_perbill":57350975,"approval":91.2990197,"support":5.7350975},{"time_hours":72,"approval_perbill":911764706,"support_perbill":56561084,"approval":91.1764706,"support":5.6561084},{"time_hours":73,"approval_perbill":910539216,"support_perbill":55790126,"approval":91.0539216,"support":5.5790126},{"time_hours":74,"approval_perbill":909313726,"support_perbill":55037426,"approval":90.9313726,"support":5.5037426},{"time_hours":75,"approval_perbill":908088236,"support_perbill":54302345,"approval":90.8088236,"support":5.4302345},{"time_hours":76,"approval_perbill":906862746,"support_perbill":53584271,"approval":90.6862746,"support":5.3584271},{"time_hours":77,"approval_perbill":905637256,"support_perbill":52882620,"approval":90.5637256,"support":5.288262},{"time_hours":78,"approval_perbill":904411766,"support_perbill":52196835,"approval":90.4411766,"support":5.2196835},{"time_hours":79,"approval_perbill":903186276,"support_perbill":51526385,"approval":90.3186276,"support":5.1526385},{"time_hours":80,"approval_perbill":901960785,"support_perbill":50870759,"approval":90.1960785,"support":5.0870759},{"time_hours":81,"approval_perbill":900735295,"support_perbill":50229473,"approval":90.0735295,"support":5.0229473},{"time_hours":82,"approval_perbill":899509805,"support_perbill":49602061,"approval":89.9509805,"support":4.9602061},{"time_hours":83,"approval_perbill":898284315,"support_perbill":48988077,"approval":89.8284315,"support":4.8988077},{"time_hours":84,"approval_perbill":897058824,"support_perbill":48387095,"approval":89.7058824,"support":4.8387095},{"time_hours":85,"approval_perbill":895833334,"support_perbill":47798707,"approval":89.5833334,"support":4.7798707},{"time_hours":86,"approval_perbill":894607844,"support_perbill":47222519,"approval":89.4607844,"support":4.7222519},{"time_hours":87,"approval_perbill":893382354,"support_perbill":46658158,"approval":89.3382354,"support":4.6658158},{"time_hours":88,"approval_perbill":892156864,"support_perbill":46105262,"approval":89.2156864,"support":4.6105262},{"time_hours":89,"approval_perbill":890931373,"support_perbill":45563485,"approval":89.0931373,"support":4.5563485},{"time_hours":90,"approval_perbill":889705883,"support_perbill":45032496,"approval":88.9705883,"support":4.5032496},{"time_hours":91,"approval_perbill":888480393,"support_perbill":44511976,"approval":88.8480393,"support":4.4511976},{"time_hours":92,"approval_perbill":887254903,"support_perbill":44001617,"approval":88.7254903,"support":4.4001617},{"time_hours":93,"approval_perbill":886029412,"support_perbill":43501126,"approval":88.6029412,"support":4.3501126},{"time_hours":94,"approval_perbill":884803922,"support_perbill":43010218,"approval":88.4803922,"support":4.3010218},{"time_hours":95,"approval_perbill":883578432,"support_perbill":42528621,"approval":88.3578432,"support":4.2528621},{"time_hours":96,"approval_perbill":882352942,"support_perbill":42056074,"approval":88.2352942,"support":4.2056074},{"time_hours":97,"approval_perbill":881127452,"support_perbill":41592321,"approval":88.1127452,"support":4.1592321},{"time_hours":98,"approval_perbill":879901962,"support_perbill":41137122,"approval":87.9901962,"support":4.1137122},{"time_hours":99,"approval_perbill":878676472,"support_perbill":40690242,"approval":87.8676472,"support":4.0690242},{"time_hours":100,"approval_perbill":877450982,"support_perbill":40251453,"approval":87.7450982,"support":4.0251453},{"time_hours":101,"approval_perbill":876225491,"support_perbill":39820539,"approval":87.6225491,"support":3.9820539},{"time_hours":102,"approval_perbill":875000001,"support_perbill":39397289,"approval":87.5000001,"support":3.9397289},{"time_hours":103,"approval_perbill":873774511,"support_perbill":38981501,"approval":87.3774511,"support":3.8981501},{"time_hours":104,"approval_perbill":872549021,"support_perbill":38572980,"approval":87.2549021,"support":3.857298},{"time_hours":105,"approval_perbill":871323530,"support_perbill":38171535,"approval":87.132353,"support":3.8171535},{"time_hours":106,"approval_perbill":870098040,"support_perbill":37776985,"approval":87.009804,"support":3.7776985},{"time_hours":107,"approval_perbill":868872550,"support_perbill":37389155,"approval":86.887255,"support":3.7389155},{"time_hours":108,"approval_perbill":867647060,"support_perbill":37007873,"approval":86.764706,"support":3.7007873},{"time_hours":109,"approval_perbill":866421570,"support_perbill":36632975,"approval":86.642157,"support":3.6632975},{"time_hours":110,"approval_perbill":865196079,"support_perbill":36264302,"approval":86.5196079,"support":3.6264302},{"time_hours":111,"approval_perbill":863970589,"support_perbill":35901701,"approval":86.3970589,"support":3.5901701},{"time_hours":112,"approval_perbill":862745099,"support_perbill":35545023,"approval":86.2745099,"support":3.5545023},{"time_hours":113,"approval_perbill":861519609,"support_perbill":35194123,"approval":86.1519609,"support":3.5194123},{"time_hours":114,"approval_perbill":860294118,"support_perbill":34848862,"approval":86.0294118,"support":3.4848862},{"time_hours":115,"approval_perbill":859068628,"support_perbill":34509106,"approval":85.9068628,"support":3.4509106},{"time_hours":116,"approval_perbill":857843138,"support_perbill":34174724,"approval":85.7843138,"support":3.4174724},{"time_hours":117,"approval_perbill":856617648,"support_perbill":33845590,"approval":85.6617648,"support":3.384559},{"time_hours":118,"approval_perbill":855392157,"support_perbill":33521580,"approval":85.5392157,"support":3.352158},{"time_hours":119,"approval_perbill":854166667,"support_perbill":33202577,"approval":85.4166667,"support":3.3202577},{"time_hours":120,"approval_perbill":852941177,"support_perbill":32888464,"approval":85.2941177,"support":3.2888464},{"time_hours":121,"approval_perbill":851715687,"support_perbill":32579131,"approval":85.1715687,"support":3.2579131},{"time_hours":122,"approval_perbill":850490197,"support_perbill":32274469,"approval":85.0490197,"support":3.2274469},{"time_hours":123,"approval_perbill":849264707,"support_perbill":31974373,"approval":84.9264707,"support":3.1974373},{"time_hours":124,"approval_perbill":848039217,"support_perbill":31678741,"approval":84.8039217,"support":3.1678741},{"time_hours":125,"approval_perbill":846813727,"support_perbill":31387475,"approval":84.6813727,"support":3.1387475},{"time_hours":126,"approval_perbill":845588236,"support_perbill":31100477,"approval":84.5588236,"support":3.1100477},{"time_hours":127,"approval_perbill":844362746,"support_perbill":30817656,"approval":84.4362746,"support":3.0817656},{"time_hours":128,"approval_perbill":843137256,"support_perbill":30538921,"approval":84.3137256,"support":3.0538921},{"time_hours":129,"approval_perbill":841911766,"support_perbill":30264184,"approval":84.1911766,"support":3.0264184},{"time_hours":130,"approval_perbill":840686276,"support_perbill":29993358,"approval":84.0686276,"support":2.9993358},{"time_hours":131,"approval_perbill":839460785,"support_perbill":29726363,"approval":83.9460785,"support":2.9726363},{"time_hours":132,"approval_perbill":838235295,"support_perbill":29463116,"approval":83.8235295,"support":2.9463116},{"time_hours":133,"approval_perbill":837009805,"support_perbill":29203539,"approval":83.7009805,"support":2.9203539},{"time_hours":134,"approval_perbill":835784315,"support_perbill":28947556,"approval":83.5784315,"support":2.8947556},{"time_hours":135,"approval_perbill":834558824,"support_perbill":28695094,"approval":83.4558824,"support":2.8695094},{"time_hours":136,"approval_perbill":833333334,"support_perbill":28446079,"approval":83.3333334,"support":2.8446079},{"time_hours":137,"approval_perbill":832107844,"support_perbill":28200442,"approval":83.2107844,"support":2.8200442},{"time_hours":138,"approval_perbill":830882354,"support_perbill":27958114,"approval":83.0882354,"support":2.7958114},{"time_hours":139,"approval_perbill":829656863,"support_perbill":27719030,"approval":82.9656863,"support":2.771903},{"time_hours":140,"approval_perbill":828431373,"support_perbill":27483123,"approval":82.8431373,"support":2.7483123},{"time_hours":141,"approval_perbill":827205883,"support_perbill":27250333,"approval":82.7205883,"support":2.7250333},{"time_hours":142,"approval_perbill":825980393,"support_perbill":27020596,"approval":82.5980393,"support":2.7020596},{"time_hours":143,"approval_perbill":824754902,"support_perbill":26793853,"approval":82.4754902,"support":2.6793853},{"time_hours":144,"approval_perbill":823529412,"support_perbill":26570047,"approval":82.3529412,"support":2.6570047},{"time_hours":145,"approval_perbill":822303922,"support_perbill":26349121,"approval":82.2303922,"support":2.6349121},{"time_hours":146,"approval_perbill":821078432,"support_perbill":26131019,"approval":82.1078432,"support":2.6131019},{"time_hours":147,"approval_perbill":819852942,"support_perbill":25915687,"approval":81.9852942,"support":2.5915687},{"time_hours":148,"approval_perbill":818627452,"support_perbill":25703073,"approval":81.8627452,"support":2.5703073},{"time_hours":149,"approval_perbill":817401962,"support_perbill":25493126,"approval":81.7401962,"support":2.5493126},{"time_hours":150,"approval_perbill":816176472,"support_perbill":25285796,"approval":81.6176472,"support":2.5285796},{"time_hours":151,"approval_perbill":814950982,"support_perbill":25081035,"approval":81.4950982,"support":2.5081035},{"time_hours":152,"approval_perbill":813725491,"support_perbill":24878795,"approval":81.3725491,"support":2.4878795},{"time_hours":153,"approval_perbill":812500001,"support_perbill":24679029,"approval":81.2500001,"support":2.4679029},{"time_hours":154,"approval_perbill":811274511,"support_perbill":24481693,"approval":81.1274511,"support":2.4481693},{"time_hours":155,"approval_perbill":810049021,"support_perbill":24286742,"approval":81.0049021,"support":2.4286742},{"time_hours":156,"approval_perbill":808823530,"support_perbill":24094134,"approval":80.882353,"support":2.4094134},{"time_hours":157,"approval_perbill":807598040,"support_perbill":23903827,"approval":80.759804,"support":2.3903827},{"time_hours":158,"approval_perbill":806372550,"support_perbill":23715779,"approval":80.637255,"support":2.3715779},{"time_hours":159,"approval_perbill":805147060,"support_perbill":23529951,"approval":80.514706,"support":2.3529951},{"time_hours":160,"approval_perbill":803921569,"support_perbill":23346303,"approval":80.3921569,"support":2.3346303},{"time_hours":161,"approval_perbill":802696079,"support_perbill":23164797,"approval":80.2696079,"support":2.3164797},{"time_hours":162,"approval_perbill":801470589,"support_perbill":22985397,"approval":80.1470589,"support":2.2985397},{"time_hours":163,"approval_perbill":800245099,"support_perbill":22808065,"approval":80.0245099,"support":2.2808065},{"time_hours":164,"approval_perbill":799019608,"support_perbill":22632766,"approval":79.9019608,"support":2.2632766},{"time_hours":165,"approval_perbill":797794118,"support_perbill":22459466,"approval":79.7794118,"support":2.2459466},{"time_hours":166,"approval_perbill":796568628,"support_perbill":22288130,"approval":79.6568628,"support":2.228813},{"time_hours":167,"approval_perbill":795343138,"support_perbill":22118725,"approval":79.5343138,"support":2.2118725},{"time_hours":168,"approval_perbill":794117648,"support_perbill":21951219,"approval":79.4117648,"support":2.1951219},{"time_hours":169,"approval_perbill":792892158,"support_perbill":21785579,"approval":79.2892158,"support":2.1785579},{"time_hours":170,"approval_perbill":791666668,"support_perbill":21621776,"approval":79.1666668,"support":2.1621776},{"time_hours":171,"approval_perbill":790441178,"support_perbill":21459778,"approval":79.0441178,"support":2.1459778},{"time_hours":172,"approval_perbill":789215688,"support_perbill":21299556,"approval":78.9215688,"support":2.1299556},{"time_hours":173,"approval_perbill":787990197,"support_perbill":21141081,"approval":78.7990197,"support":2.1141081},{"time_hours":174,"approval_perbill":786764707,"support_perbill":20984324,"approval":78.6764707,"support":2.0984324},{"time_hours":175,"approval_perbill":785539217,"support_perbill":20829258,"approval":78.5539217,"support":2.0829258},{"time_hours":176,"approval_perbill":784313727,"support_perbill":20675855,"approval":78.4313727,"support":2.0675855},{"time_hours":177,"approval_perbill":783088236,"support_perbill":20524089,"approval":78.3088236,"support":2.0524089},{"time_hours":178,"approval_perbill":781862746,"support_perbill":20373934,"approval":78.1862746,"support":2.0373934},{"time_hours":179,"approval_perbill":780637256,"support_perbill":20225364,"approval":78.0637256,"support":2.0225364},{"time_hours":180,"approval_perbill":779411766,"support_perbill":20078354,"approval":77.9411766,"support":2.0078354},{"time_hours":181,"approval_perbill":778186275,"support_perbill":19932880,"approval":77.8186275,"support":1.993288},{"time_hours":182,"approval_perbill":776960785,"support_perbill":19788917,"approval":77.6960785,"support":1.9788917},{"time_hours":183,"approval_perbill":775735295,"support_perbill":19646444,"approval":77.5735295,"support":1.9646444},{"time_hours":184,"approval_perbill":774509805,"support_perbill":19505435,"approval":77.4509805,"support":1.9505435},{"time_hours":185,"approval_perbill":773284314,"support_perbill":19365870,"approval":77.3284314,"support":1.936587},{"time_hours":186,"approval_perbill":772058824,"support_perbill":19227725,"approval":77.2058824,"support":1.9227725},{"time_hours":187,"approval_perbill":770833334,"support_perbill":19090980,"approval":77.0833334,"support":1.909098},{"time_hours":188,"approval_perbill":769607844,"support_perbill":18955613,"approval":76.9607844,"support":1.8955613},{"time_hours":189,"approval_perbill":768382353,"support_perbill":18821603,"approval":76.8382353,"support":1.8821603},{"time_hours":190,"approval_perbill":767156863,"support_perbill":18688931,"approval":76.7156863,"support":1.8688931},{"time_hours":191,"approval_perbill":765931373,"support_perbill":18557575,"approval":76.5931373,"support":1.8557575},{"time_hours":192,"approval_perbill":764705883,"support_perbill":18427518,"approval":76.4705883,"support":1.8427518},{"time_hours":193,"approval_perbill":763480393,"support_perbill":18298739,"approval":76.3480393,"support":1.8298739},{"time_hours":194,"approval_perbill":762254903,"support_perbill":18171219,"approval":76.2254903,"support":1.8171219},{"time_hours":195,"approval_perbill":761029413,"support_perbill":18044941,"approval":76.1029413,"support":1.8044941},{"time_hours":196,"approval_perbill":759803923,"support_perbill":17919887,"approval":75.9803923,"support":1.7919887},{"time_hours":197,"approval_perbill":758578433,"support_perbill":17796038,"approval":75.8578433,"support":1.7796038},{"time_hours":198,"approval_perbill":757352942,"support_perbill":17673377,"approval":75.7352942,"support":1.7673377},{"time_hours":199,"approval_perbill":756127452,"support_perbill":17551888,"approval":75.6127452,"support":1.7551888},{"time_hours":200,"approval_perbill":754901962,"support_perbill":17431553,"approval":75.4901962,"support":1.7431553},{"time_hours":201,"approval_perbill":753676472,"support_perbill":17312357,"approval":75.3676472,"support":1.7312357},{"time_hours":202,"approval_perbill":752450981,"support_perbill":17194282,"approval":75.2450981,"support":1.7194282},{"time_hours":203,"approval_perbill":751225491,"support_perbill":17077315,"approval":75.1225491,"support":1.7077315},{"time_hours":204,"approval_perbill":750000001,"support_perbill":16961437,"approval":75.0000001,"support":1.6961437},{"time_hours":205,"approval_perbill":748774511,"support_perbill":16846636,"approval":74.8774511,"support":1.6846636},{"time_hours":206,"approval_perbill":747549020,"support_perbill":16732895,"approval":74.754902,"support":1.6732895},{"time_hours":207,"approval_perbill":746323530,"support_perbill":16620201,"approval":74.632353,"support":1.6620201},{"time_hours":208,"approval_perbill":745098040,"support_perbill":16508538,"approval":74.509804,"support":1.6508538},{"time_hours":209,"approval_perbill":743872550,"support_perbill":16397893,"approval":74.387255,"support":1.6397893},{"time_hours":210,"approval_perbill":742647059,"support_perbill":16288252,"approval":74.2647059,"support":1.6288252},{"time_hours":211,"approval_perbill":741421569,"support_perbill":16179601,"approval":74.1421569,"support":1.6179601},{"time_hours":212,"approval_perbill":740196079,"support_perbill":16071927,"approval":74.0196079,"support":1.6071927},{"time_hours":213,"approval_perbill":738970589,"support_perbill":15965217,"approval":73.8970589,"support":1.5965217},{"time_hours":214,"approval_perbill":737745099,"support_perbill":15859457,"approval":73.7745099,"support":1.5859457},{"time_hours":215,"approval_perbill":736519608,"support_perbill":15754636,"approval":73.6519608,"support":1.5754636},{"time_hours":216,"approval_perbill":735294118,"support_perbill":15650741,"approval":73.5294118,"support":1.5650741},{"time_hours":217,"approval_perbill":734068628,"support_perbill":15547759,"approval":73.4068628,"support":1.5547759},{"time_hours":218,"approval_perbill":732843138,"support_perbill":15445679,"approval":73.2843138,"support":1.5445679},{"time_hours":219,"approval_perbill":731617648,"support_perbill":15344488,"approval":73.1617648,"support":1.5344488},{"time_hours":220,"approval_perbill":730392158,"support_perbill":15244176,"approval":73.0392158,"support":1.5244176},{"time_hours":221,"approval_perbill":729166668,"support_perbill":15144731,"approval":72.9166668,"support":1.5144731},{"time_hours":222,"approval_perbill":727941178,"support_perbill":15046141,"approval":72.7941178,"support":1.5046141},{"time_hours":223,"approval_perbill":726715687,"support_perbill":14948396,"approval":72.6715687,"support":1.4948396},{"time_hours":224,"approval_perbill":725490197,"support_perbill":14851485,"approval":72.5490197,"support":1.4851485},{"time_hours":225,"approval_perbill":724264707,"support_perbill":14755396,"approval":72.4264707,"support":1.4755396},{"time_hours":226,"approval_perbill":723039217,"support_perbill":14660121,"approval":72.3039217,"support":1.4660121},{"time_hours":227,"approval_perbill":721813726,"support_perbill":14565648,"approval":72.1813726,"support":1.4565648},{"time_hours":228,"approval_perbill":720588236,"support_perbill":14471968,"approval":72.0588236,"support":1.4471968},{"time_hours":229,"approval_perbill":719362746,"support_perbill":14379070,"approval":71.9362746,"support":1.437907},{"time_hours":230,"approval_perbill":718137256,"support_perbill":14286945,"approval":71.8137256,"support":1.4286945},{"time_hours":231,"approval_perbill":716911765,"support_perbill":14195583,"approval":71.6911765,"support":1.4195583},{"time_hours":232,"approval_perbill":715686275,"support_perbill":14104975,"approval":71.5686275,"support":1.4104975},{"time_hours":233,"approval_perbill":714460785,"support_perbill":14015111,"approval":71.4460785,"support":1.4015111},{"time_hours":234,"approval_perbill":713235295,"support_perbill":13925982,"approval":71.3235295,"support":1.3925982},{"time_hours":235,"approval_perbill":712009805,"support_perbill":13837579,"approval":71.2009805,"support":1.3837579},{"time_hours":236,"approval_perbill":710784314,"support_perbill":13749894,"approval":71.0784314,"support":1.3749894},{"time_hours":237,"approval_perbill":709558824,"support_perbill":13662918,"approval":70.9558824,"support":1.3662918},{"time_hours":238,"approval_perbill":708333334,"support_perbill":13576642,"approval":70.8333334,"support":1.3576642},{"time_hours":239,"approval_perbill":707107844,"support_perbill":13491057,"approval":70.7107844,"support":1.3491057},{"time_hours":240,"approval_perbill":705882353,"support_perbill":13406156,"approval":70.5882353,"support":1.3406156},{"time_hours":241,"approval_perbill":704656863,"support_perbill":13321931,"approval":70.4656863,"support":1.3321931},{"time_hours":242,"approval_perbill":703431373,"support_perbill":13238372,"approval":70.3431373,"support":1.3238372},{"time_hours":243,"approval_perbill":702205883,"support_perbill":13155473,"approval":70.2205883,"support":1.3155473},{"time_hours":244,"approval_perbill":700980393,"support_perbill":13073226,"approval":70.0980393,"support":1.3073226},{"time_hours":245,"approval_perbill":699754903,"support_perbill":12991622,"approval":69.9754903,"support":1.2991622},{"time_hours":246,"approval_perbill":698529413,"support_perbill":12910655,"approval":69.8529413,"support":1.2910655},{"time_hours":247,"approval_perbill":697303923,"support_perbill":12830317,"approval":69.7303923,"support":1.2830317},{"time_hours":248,"approval_perbill":696078432,"support_perbill":12750601,"approval":69.6078432,"support":1.2750601},{"time_hours":249,"approval_perbill":694852942,"support_perbill":12671499,"approval":69.4852942,"support":1.2671499},{"time_hours":250,"approval_perbill":693627452,"support_perbill":12593005,"approval":69.3627452,"support":1.2593005},{"time_hours":251,"approval_perbill":692401962,"support_perbill":12515111,"approval":69.2401962,"support":1.2515111},{"time_hours":252,"approval_perbill":691176471,"support_perbill":12437810,"approval":69.1176471,"support":1.243781},{"time_hours":253,"approval_perbill":689950981,"support_perbill":12361097,"approval":68.9950981,"support":1.2361097},{"time_hours":254,"approval_perbill":688725491,"support_perbill":12284964,"approval":68.8725491,"support":1.2284964},{"time_hours":255,"approval_perbill":687500001,"support_perbill":12209404,"approval":68.7500001,"support":1.2209404},{"time_hours":256,"approval_perbill":686274511,"support_perbill":12134411,"approval":68.6274511,"support":1.2134411},{"time_hours":257,"approval_perbill":685049020,"support_perbill":12059980,"approval":68.504902,"support":1.205998},{"time_hours":258,"approval_perbill":683823530,"support_perbill":11986103,"approval":68.382353,"support":1.1986103},{"time_hours":259,"approval_perbill":682598040,"support_perbill":11912774,"approval":68.259804,"support":1.1912774},{"time_hours":260,"approval_perbill":681372550,"support_perbill":11839987,"approval":68.137255,"support":1.1839987},{"time_hours":261,"approval_perbill":680147059,"support_perbill":11767737,"approval":68.0147059,"support":1.1767737},{"time_hours":262,"approval_perbill":678921569,"support_perbill":11696017,"approval":67.8921569,"support":1.1696017},{"time_hours":263,"approval_perbill":677696079,"support_perbill":11624822,"approval":67.7696079,"support":1.1624822},{"time_hours":264,"approval_perbill":676470589,"support_perbill":11554145,"approval":67.6470589,"support":1.1554145},{"time_hours":265,"approval_perbill":675245099,"support_perbill":11483982,"approval":67.5245099,"support":1.1483982},{"time_hours":266,"approval_perbill":674019609,"support_perbill":11414326,"approval":67.4019609,"support":1.1414326},{"time_hours":267,"approval_perbill":672794119,"support_perbill":11345173,"approval":67.2794119,"support":1.1345173},{"time_hours":268,"approval_perbill":671568629,"support_perbill":11276516,"approval":67.1568629,"support":1.1276516},{"time_hours":269,"approval_perbill":670343138,"support_perbill":11208351,"approval":67.0343138,"support":1.1208351},{"time_hours":270,"approval_perbill":669117648,"support_perbill":11140671,"approval":66.9117648,"support":1.1140671},{"time_hours":271,"approval_perbill":667892158,"support_perbill":11073473,"approval":66.7892158,"support":1.1073473},{"time_hours":272,"approval_perbill":666666668,"support_perbill":11006750,"approval":66.6666668,"support":1.100675},{"time_hours":273,"approval_perbill":665441177,"support_perbill":10940499,"approval":66.5441177,"support":1.0940499},{"time_hours":274,"approval_perbill":664215687,"support_perbill":10874713,"approval":66.4215687,"support":1.0874713},{"time_hours":275,"approval_perbill":662990197,"support_perbill":10809388,"approval":66.2990197,"support":1.0809388},{"time_hours":276,"approval_perbill":661764707,"support_perbill":10744519,"approval":66.1764707,"support":1.0744519},{"time_hours":277,"approval_perbill":660539217,"support_perbill":10680101,"approval":66.0539217,"support":1.0680101},{"time_hours":278,"approval_perbill":659313726,"support_perbill":10616130,"approval":65.9313726,"support":1.061613},{"time_hours":279,"approval_perbill":658088236,"support_perbill":10552601,"approval":65.8088236,"support":1.0552601},{"time_hours":280,"approval_perbill":656862746,"support_perbill":10489510,"approval":65.6862746,"support":1.048951},{"time_hours":281,"approval_perbill":655637256,"support_perbill":10426852,"approval":65.5637256,"support":1.0426852},{"time_hours":282,"approval_perbill":654411765,"support_perbill":10364622,"approval":65.4411765,"support":1.0364622},{"time_hours":283,"approval_perbill":653186275,"support_perbill":10302816,"approval":65.3186275,"support":1.0302816},{"time_hours":284,"approval_perbill":651960785,"support_perbill":10241430,"approval":65.1960785,"support":1.024143},{"time_hours":285,"approval_perbill":650735295,"support_perbill":10180459,"approval":65.0735295,"support":1.0180459},{"time_hours":286,"approval_perbill":649509804,"support_perbill":10119900,"approval":64.9509804,"support":1.01199},{"time_hours":287,"approval_perbill":648284314,"support_perbill":10059748,"approval":64.8284314,"support":1.0059748},{"time_hours":288,"approval_perbill":647058824,"support_perbill":10000000,"approval":64.7058824,"support":1},{"time_hours":289,"approval_perbill":645833334,"support_perbill":9940650,"approval":64.5833334,"support":0.994065},{"time_hours":290,"approval_perbill":644607844,"support_perbill":9881695,"approval":64.4607844,"support":0.9881695},{"time_hours":291,"approval_perbill":643382354,"support_perbill":9823132,"approval":64.3382354,"support":0.9823132},{"time_hours":292,"approval_perbill":642156864,"support_perbill":9764955,"approval":64.2156864,"support":0.9764955},{"time_hours":293,"approval_perbill":640931374,"support_perbill":9707163,"approval":64.0931374,"support":0.9707163},{"time_hours":294,"approval_perbill":639705883,"support_perbill":9649749,"approval":63.9705883,"support":0.9649749},{"time_hours":295,"approval_perbill":638480393,"support_perbill":9592712,"approval":63.8480393,"support":0.9592712},{"time_hours":296,"approval_perbill":637254903,"support_perbill":9536047,"approval":63.7254903,"support":0.9536047},{"time_hours":297,"approval_perbill":636029413,"support_perbill":9479751,"approval":63.6029413,"support":0.9479751},{"time_hours":298,"approval_perbill":634803923,"support_perbill":9423820,"approval":63.4803923,"support":0.942382},{"time_hours":299,"approval_perbill":633578432,"support_perbill":9368250,"approval":63.3578432,"support":0.936825},{"time_hours":300,"approval_perbill":632352942,"support_perbill":9313038,"approval":63.2352942,"support":0.9313038},{"time_hours":301,"approval_perbill":631127452,"support_perbill":9258181,"approval":63.1127452,"support":0.9258181},{"time_hours":302,"approval_perbill":629901962,"support_perbill":9203674,"approval":62.9901962,"support":0.9203674},{"time_hours":303,"approval_perbill":628676471,"support_perbill":9149516,"approval":62.8676471,"support":0.9149516},{"time_hours":304,"approval_perbill":627450981,"support_perbill":9095702,"approval":62.7450981,"support":0.9095702},{"time_hours":305,"approval_perbill":626225491,"support_perbill":9042230,"approval":62.6225491,"support":0.904223},{"time_hours":306,"approval_perbill":625000001,"support_perbill":8989095,"approval":62.5000001,"support":0.8989095},{"time_hours":307,"approval_perbill":623774510,"support_perbill":8936295,"approval":62.377451,"support":0.8936295},{"time_hours":308,"approval_perbill":622549020,"support_perbill":8883826,"approval":62.254902,"support":0.8883826},{"time_hours":309,"approval_perbill":621323530,"support_perbill":8831687,"approval":62.132353,"support":0.8831687},{"time_hours":310,"approval_perbill":620098040,"support_perbill":8779872,"approval":62.009804,"support":0.8779872},{"time_hours":311,"approval_perbill":618872549,"support_perbill":8728380,"approval":61.8872549,"support":0.872838},{"time_hours":312,"approval_perbill":617647059,"support_perbill":8677207,"approval":61.7647059,"support":0.8677207},{"time_hours":313,"approval_perbill":616421569,"support_perbill":8626351,"approval":61.6421569,"support":0.8626351},{"time_hours":314,"approval_perbill":615196079,"support_perbill":8575808,"approval":61.5196079,"support":0.8575808},{"time_hours":315,"approval_perbill":613970589,"support_perbill":8525576,"approval":61.3970589,"support":0.8525576},{"time_hours":316,"approval_perbill":612745099,"support_perbill":8475652,"approval":61.2745099,"support":0.8475652},{"time_hours":317,"approval_perbill":611519609,"support_perbill":8426032,"approval":61.1519609,"support":0.8426032},{"time_hours":318,"approval_perbill":610294119,"support_perbill":8376715,"approval":61.0294119,"support":0.8376715},{"time_hours":319,"approval_perbill":609068629,"support_perbill":8327697,"approval":60.9068629,"support":0.8327697},{"time_hours":320,"approval_perbill":607843138,"support_perbill":8278976,"approval":60.7843138,"support":0.8278976},{"time_hours":321,"approval_perbill":606617648,"support_perbill":8230549,"approval":60.6617648,"support":0.8230549},{"time_hours":322,"approval_perbill":605392158,"support_perbill":8182413,"approval":60.5392158,"support":0.8182413},{"time_hours":323,"approval_perbill":604166668,"support_perbill":8134566,"approval":60.4166668,"support":0.8134566},{"time_hours":324,"approval_perbill":602941177,"support_perbill":8087005,"approval":60.2941177,"support":0.8087005},{"time_hours":325,"approval_perbill":601715687,"support_perbill":8039727,"approval":60.1715687,"support":0.8039727},{"time_hours":326,"approval_perbill":600490197,"support_perbill":7992731,"approval":60.0490197,"support":0.7992731},{"time_hours":327,"approval_perbill":599264707,"support_perbill":7946013,"approval":59.9264707,"support":0.7946013},{"time_hours":328,"approval_perbill":598039216,"support_perbill":7899571,"approval":59.8039216,"support":0.7899571},{"time_hours":329,"approval_perbill":596813726,"support_perbill":7853403,"approval":59.6813726,"support":0.7853403},{"time_hours":330,"approval_perbill":595588236,"support_perbill":7807506,"approval":59.5588236,"support":0.7807506},{"time_hours":331,"approval_perbill":594362746,"support_perbill":7761878,"approval":59.4362746,"support":0.7761878},{"time_hours":332,"approval_perbill":593137255,"support_perbill":7716516,"approval":59.3137255,"support":0.7716516},{"time_hours":333,"approval_perbill":591911765,"support_perbill":7671418,"approval":59.1911765,"support":0.7671418},{"time_hours":334,"approval_perbill":590686275,"support_perbill":7626583,"approval":59.0686275,"support":0.7626583},{"time_hours":335,"approval_perbill":589460785,"support_perbill":7582007,"approval":58.9460785,"support":0.7582007},{"time_hours":336,"approval_perbill":588235295,"support_perbill":7537688,"approval":58.8235295,"support":0.7537688},{"time_hours":337,"approval_perbill":587009805,"support_perbill":7493624,"approval":58.7009805,"support":0.7493624},{"time_hours":338,"approval_perbill":585784315,"support_perbill":7449814,"approval":58.5784315,"support":0.7449814},{"time_hours":339,"approval_perbill":584558825,"support_perbill":7406254,"approval":58.4558825,"support":0.7406254},{"time_hours":340,"approval_perbill":583333335,"support_perbill":7362942,"approval":58.3333335,"support":0.7362942},{"time_hours":341,"approval_perbill":582107844,"support_perbill":7319878,"approval":58.2107844,"support":0.7319878},{"time_hours":342,"approval_perbill":580882354,"support_perbill":7277057,"approval":58.0882354,"support":0.7277057},{"time_hours":343,"approval_perbill":579656864,"support_perbill":7234479,"approval":57.9656864,"support":0.7234479},{"time_hours":344,"approval_perbill":578431374,"support_perbill":7192141,"approval":57.8431374,"support":0.7192141},{"time_hours":345,"approval_perbill":577205883,"support_perbill":7150041,"approval":57.7205883,"support":0.7150041},{"time_hours":346,"approval_perbill":575980393,"support_perbill":7108178,"approval":57.5980393,"support":0.7108178},{"time_hours":347,"approval_perbill":574754903,"support_perbill":7066548,"approval":57.4754903,"support":0.7066548},{"time_hours":348,"approval_perbill":573529413,"support_perbill":7025151,"approval":57.3529413,"support":0.7025151},{"time_hours":349,"approval_perbill":572303922,"support_perbill":6983985,"approval":57.2303922,"support":0.6983985},{"time_hours":350,"approval_perbill":571078432,"support_perbill":6943047,"approval":57.1078432,"support":0.6943047},{"time_hours":351,"approval_perbill":569852942,"support_perbill":6902335,"approval":56.9852942,"support":0.6902335},{"time_hours":352,"approval_perbill":568627452,"support_perbill":6861848,"approval":56.8627452,"support":0.6861848},{"time_hours":353,"approval_perbill":567401961,"support_perbill":6821584,"approval":56.7401961,"support":0.6821584},{"time_hours":354,"approval_perbill":566176471,"support_perbill":6781540,"approval":56.6176471,"support":0.678154},{"time_hours":355,"approval_perbill":564950981,"support_perbill":6741716,"approval":56.4950981,"support":0.6741716},{"time_hours":356,"approval_perbill":563725491,"support_perbill":6702109,"approval":56.3725491,"support":0.6702109},{"time_hours":357,"approval_perbill":562500000,"support_perbill":6662718,"approval":56.25,"support":0.6662718},{"time_hours":358,"approval_perbill":561274510,"support_perbill":6623541,"approval":56.127451,"support":0.6623541},{"time_hours":359,"approval_perbill":560049020,"support_perbill":6584575,"approval":56.004902,"support":0.6584575},{"time_hours":360,"approval_perbill":558823530,"support_perbill":6545820,"approval":55.882353,"support":0.654582},{"time_hours":361,"approval_perbill":557598040,"support_perbill":6507274,"approval":55.759804,"support":0.6507274},{"time_hours":362,"approval_perbill":556372550,"support_perbill":6468935,"approval":55.637255,"support":0.6468935},{"time_hours":363,"approval_perbill":555147060,"support_perbill":6430801,"approval":55.514706,"support":0.6430801},{"time_hours":364,"approval_perbill":553921570,"support_perbill":6392871,"approval":55.392157,"support":0.6392871},{"time_hours":365,"approval_perbill":552696080,"support_perbill":6355142,"approval":55.269608,"support":0.6355142},{"time_hours":366,"approval_perbill":551470589,"support_perbill":6317615,"approval":55.1470589,"support":0.6317615},{"time_hours":367,"approval_perbill":550245099,"support_perbill":6280286,"approval":55.0245099,"support":0.6280286},{"time_hours":368,"approval_perbill":549019609,"support_perbill":6243154,"approval":54.9019609,"support":0.6243154},{"time_hours":369,"approval_perbill":547794119,"support_perbill":6206218,"approval":54.7794119,"support":0.6206218},{"time_hours":370,"approval_perbill":546568628,"support_perbill":6169476,"approval":54.6568628,"support":0.6169476},{"time_hours":371,"approval_perbill":545343138,"support_perbill":6132927,"approval":54.5343138,"support":0.6132927},{"time_hours":372,"approval_perbill":544117648,"support_perbill":6096569,"approval":54.4117648,"support":0.6096569},{"time_hours":373,"approval_perbill":542892158,"support_perbill":6060401,"approval":54.2892158,"support":0.6060401},{"time_hours":374,"approval_perbill":541666667,"support_perbill":6024421,"approval":54.1666667,"support":0.6024421},{"time_hours":375,"approval_perbill":540441177,"support_perbill":5988627,"approval":54.0441177,"support":0.5988627},{"time_hours":376,"approval_perbill":539215687,"support_perbill":5953019,"approval":53.9215687,"support":0.5953019},{"time_hours":377,"approval_perbill":537990197,"support_perbill":5917595,"approval":53.7990197,"support":0.5917595},{"time_hours":378,"approval_perbill":536764706,"support_perbill":5882353,"approval":53.6764706,"support":0.5882353},{"time_hours":379,"approval_perbill":535539216,"support_perbill":5847292,"approval":53.5539216,"support":0.5847292},{"time_hours":380,"approval_perbill":534313726,"support_perbill":5812410,"approval":53.4313726,"support":0.581241},{"time_hours":381,"approval_perbill":533088236,"support_perbill":5777707,"approval":53.3088236,"support":0.5777707},{"time_hours":382,"approval_perbill":531862746,"support_perbill":5743181,"approval":53.1862746,"support":0.5743181},{"time_hours":383,"approval_perbill":530637255,"support_perbill":5708830,"approval":53.0637255,"support":0.570883},{"time_hours":384,"approval_perbill":529411765,"support_perbill":5674653,"approval":52.9411765,"support":0.5674653},{"time_hours":385,"approval_perbill":528186275,"support_perbill":5640649,"approval":52.8186275,"support":0.5640649},{"time_hours":386,"approval_perbill":526960785,"support_perbill":5606817,"approval":52.6960785,"support":0.5606817},{"time_hours":387,"approval_perbill":525735295,"support_perbill":5573155,"approval":52.5735295,"support":0.5573155},{"time_hours":388,"approval_perbill":524509805,"support_perbill":5539662,"approval":52.4509805,"support":0.5539662},{"time_hours":389,"approval_perbill":523284315,"support_perbill":5506336,"approval":52.3284315,"support":0.5506336},{"time_hours":390,"approval_perbill":522058825,"support_perbill":5473177,"approval":52.2058825,"support":0.5473177},{"time_hours":391,"approval_perbill":520833334,"support_perbill":5440183,"approval":52.0833334,"support":0.5440183},{"time_hours":392,"approval_perbill":519607844,"support_perbill":5407354,"approval":51.9607844,"support":0.5407354},{"time_hours":393,"approval_perbill":518382354,"support_perbill":5374687,"approval":51.8382354,"support":0.5374687},{"time_hours":394,"approval_perbill":517156864,"support_perbill":5342181,"approval":51.7156864,"support":0.5342181},{"time_hours":395,"approval_perbill":515931373,"support_perbill":5309836,"approval":51.5931373,"support":0.5309836},{"time_hours":396,"approval_perbill":514705883,"support_perbill":5277650,"approval":51.4705883,"support":0.527765},{"time_hours":397,"approval_perbill":513480393,"support_perbill":5245622,"approval":51.3480393,"support":0.5245622},{"time_hours":398,"approval_perbill":512254903,"support_perbill":5213751,"approval":51.2254903,"support":0.5213751},{"time_hours":399,"approval_perbill":511029412,"support_perbill":5182035,"approval":51.1029412,"support":0.5182035},{"time_hours":400,"approval_perbill":509803922,"support_perbill":5150474,"approval":50.9803922,"support":0.5150474},{"time_hours":401,"approval_perbill":508578432,"support_perbill":5119067,"approval":50.8578432,"support":0.5119067},{"time_hours":402,"approval_perbill":507352942,"support_perbill":5087812,"approval":50.7352942,"support":0.5087812},{"time_hours":403,"approval_perbill":506127452,"support_perbill":5056708,"approval":50.6127452,"support":0.5056708},{"time_hours":404,"approval_perbill":504901961,"support_perbill":5025754,"approval":50.4901961,"support":0.5025754},{"time_hours":405,"approval_perbill":503676471,"support_perbill":4994949,"approval":50.3676471,"support":0.4994949},{"time_hours":406,"approval_perbill":502450981,"support_perbill":4964292,"approval":50.2450981,"support":0.4964292},{"time_hours":407,"approval_perbill":501225491,"support_perbill":4933782,"approval":50.1225491,"support":0.4933782},{"time_hours":408,"approval_perbill":500000000,"support_perbill":4903417,"approval":50,"support":0.4903417},{"time_hours":409,"approval_perbill":500000000,"support_perbill":4873198,"approval":50,"support":0.4873198},{"time_hours":410,"approval_perbill":500000000,"support_perbill":4843122,"approval":50,"support":0.4843122},{"time_hours":411,"approval_perbill":500000000,"support_perbill":4813189,"approval":50,"support":0.4813189},{"time_hours":412,"approval_perbill":500000000,"support_perbill":4783398,"approval":50,"support":0.4783398},{"time_hours":413,"approval_perbill":500000000,"support_perbill":4753747,"approval":50,"support":0.4753747},{"time_hours":414,"approval_perbill":500000000,"support_perbill":4724236,"approval":50,"support":0.4724236},{"time_hours":415,"approval_perbill":500000000,"support_perbill":4694864,"approval":50,"support":0.4694864},{"time_hours":416,"approval_perbill":500000000,"support_perbill":4665630,"approval":50,"support":0.466563},{"time_hours":417,"approval_perbill":500000000,"support_perbill":4636532,"approval":50,"support":0.4636532},{"time_hours":418,"approval_perbill":500000000,"support_perbill":4607570,"approval":50,"support":0.460757},{"time_hours":419,"approval_perbill":500000000,"support_perbill":4578743,"approval":50,"support":0.4578743},{"time_hours":420,"approval_perbill":500000000,"support_perbill":4550050,"approval":50,"support":0.455005},{"time_hours":421,"approval_perbill":500000000,"support_perbill":4521490,"approval":50,"support":0.452149},{"time_hours":422,"approval_perbill":500000000,"support_perbill":4493062,"approval":50,"support":0.4493062},{"time_hours":423,"approval_perbill":500000000,"support_perbill":4464766,"approval":50,"support":0.4464766},{"time_hours":424,"approval_perbill":500000000,"support_perbill":4436599,"approval":50,"support":0.4436599},{"time_hours":425,"approval_perbill":500000000,"support_perbill":4408562,"approval":50,"support":0.4408562},{"time_hours":426,"approval_perbill":500000000,"support_perbill":4380654,"approval":50,"support":0.4380654},{"time_hours":427,"approval_perbill":500000000,"support_perbill":4352873,"approval":50,"support":0.4352873},{"time_hours":428,"approval_perbill":500000000,"support_perbill":4325218,"approval":50,"support":0.4325218},{"time_hours":429,"approval_perbill":500000000,"support_perbill":4297690,"approval":50,"support":0.429769},{"time_hours":430,"approval_perbill":500000000,"support_perbill":4270287,"approval":50,"support":0.4270287},{"time_hours":431,"approval_perbill":500000000,"support_perbill":4243007,"approval":50,"support":0.4243007},{"time_hours":432,"approval_perbill":500000000,"support_perbill":4215851,"approval":50,"support":0.4215851},{"time_hours":433,"approval_perbill":500000000,"support_perbill":4188818,"approval":50,"support":0.4188818},{"time_hours":434,"approval_perbill":500000000,"support_perbill":4161906,"approval":50,"support":0.4161906},{"time_hours":435,"approval_perbill":500000000,"support_perbill":4135115,"approval":50,"support":0.4135115},{"time_hours":436,"approval_perbill":500000000,"support_perbill":4108444,"approval":50,"support":0.4108444},{"time_hours":437,"approval_perbill":500000000,"support_perbill":4081892,"approval":50,"support":0.4081892},{"time_hours":438,"approval_perbill":500000000,"support_perbill":4055459,"approval":50,"support":0.4055459},{"time_hours":439,"approval_perbill":500000000,"support_perbill":4029143,"approval":50,"support":0.4029143},{"time_hours":440,"approval_perbill":500000000,"support_perbill":4002944,"approval":50,"support":0.4002944},{"time_hours":441,"approval_perbill":500000000,"support_perbill":3976862,"approval":50,"support":0.3976862},{"time_hours":442,"approval_perbill":500000000,"support_perbill":3950894,"approval":50,"support":0.3950894},{"time_hours":443,"approval_perbill":500000000,"support_perbill":3925041,"approval":50,"support":0.3925041},{"time_hours":444,"approval_perbill":500000000,"support_perbill":3899302,"approval":50,"support":0.3899302},{"time_hours":445,"approval_perbill":500000000,"support_perbill":3873676,"approval":50,"support":0.3873676},{"time_hours":446,"approval_perbill":500000000,"support_perbill":3848162,"approval":50,"support":0.3848162},{"time_hours":447,"approval_perbill":500000000,"support_perbill":3822760,"approval":50,"support":0.382276},{"time_hours":448,"approval_perbill":500000000,"support_perbill":3797468,"approval":50,"support":0.3797468},{"time_hours":449,"approval_perbill":500000000,"support_perbill":3772287,"approval":50,"support":0.3772287},{"time_hours":450,"approval_perbill":500000000,"support_perbill":3747215,"approval":50,"support":0.3747215},{"time_hours":451,"approval_perbill":500000000,"support_perbill":3722251,"approval":50,"support":0.3722251},{"time_hours":452,"approval_perbill":500000000,"support_perbill":3697396,"approval":50,"support":0.3697396},{"time_hours":453,"approval_perbill":500000000,"support_perbill":3672648,"approval":50,"support":0.3672648},{"time_hours":454,"approval_perbill":500000000,"support_perbill":3648006,"approval":50,"support":0.3648006},{"time_hours":455,"approval_perbill":500000000,"support_perbill":3623471,"approval":50,"support":0.3623471},{"time_hours":456,"approval_perbill":500000000,"support_perbill":3599040,"approval":50,"support":0.359904},{"time_hours":457,"approval_perbill":500000000,"support_perbill":3574714,"approval":50,"support":0.3574714},{"time_hours":458,"approval_perbill":500000000,"support_perbill":3550492,"approval":50,"support":0.3550492},{"time_hours":459,"approval_perbill":500000000,"support_perbill":3526373,"approval":50,"support":0.3526373},{"time_hours":460,"approval_perbill":500000000,"support_perbill":3502357,"approval":50,"support":0.3502357},{"time_hours":461,"approval_perbill":500000000,"support_perbill":3478442,"approval":50,"support":0.3478442},{"time_hours":462,"approval_perbill":500000000,"support_perbill":3454629,"approval":50,"support":0.3454629},{"time_hours":463,"approval_perbill":500000000,"support_perbill":3430916,"approval":50,"support":0.3430916},{"time_hours":464,"approval_perbill":500000000,"support_perbill":3407304,"approval":50,"support":0.3407304},{"time_hours":465,"approval_perbill":500000000,"support_perbill":3383790,"approval":50,"support":0.338379},{"time_hours":466,"approval_perbill":500000000,"support_perbill":3360376,"approval":50,"support":0.3360376},{"time_hours":467,"approval_perbill":500000000,"support_perbill":3337059,"approval":50,"support":0.3337059},{"time_hours":468,"approval_perbill":500000000,"support_perbill":3313840,"approval":50,"support":0.331384},{"time_hours":469,"approval_perbill":500000000,"support_perbill":3290718,"approval":50,"support":0.3290718},{"time_hours":470,"approval_perbill":500000000,"support_perbill":3267692,"approval":50,"support":0.3267692},{"time_hours":471,"approval_perbill":500000000,"support_perbill":3244761,"approval":50,"support":0.3244761},{"time_hours":472,"approval_perbill":500000000,"support_perbill":3221926,"approval":50,"support":0.3221926},{"time_hours":473,"approval_perbill":500000000,"support_perbill":3199185,"approval":50,"support":0.3199185},{"time_hours":474,"approval_perbill":500000000,"support_perbill":3176538,"approval":50,"support":0.3176538},{"time_hours":475,"approval_perbill":500000000,"support_perbill":3153985,"approval":50,"support":0.3153985},{"time_hours":476,"approval_perbill":500000000,"support_perbill":3131524,"approval":50,"support":0.3131524},{"time_hours":477,"approval_perbill":500000000,"support_perbill":3109155,"approval":50,"support":0.3109155},{"time_hours":478,"approval_perbill":500000000,"support_perbill":3086878,"approval":50,"support":0.3086878},{"time_hours":479,"approval_perbill":500000000,"support_perbill":3064692,"approval":50,"support":0.3064692},{"time_hours":480,"approval_perbill":500000000,"support_perbill":3042596,"approval":50,"support":0.3042596},{"time_hours":481,"approval_perbill":500000000,"support_perbill":3020590,"approval":50,"support":0.302059},{"time_hours":482,"approval_perbill":500000000,"support_perbill":2998674,"approval":50,"support":0.2998674},{"time_hours":483,"approval_perbill":500000000,"support_perbill":2976847,"approval":50,"support":0.2976847},{"time_hours":484,"approval_perbill":500000000,"support_perbill":2955107,"approval":50,"support":0.2955107},{"time_hours":485,"approval_perbill":500000000,"support_perbill":2933456,"approval":50,"support":0.2933456},{"time_hours":486,"approval_perbill":500000000,"support_perbill":2911892,"approval":50,"support":0.2911892},{"time_hours":487,"approval_perbill":500000000,"support_perbill":2890414,"approval":50,"support":0.2890414},{"time_hours":488,"approval_perbill":500000000,"support_perbill":2869023,"approval":50,"support":0.2869023},{"time_hours":489,"approval_perbill":500000000,"support_perbill":2847717,"approval":50,"support":0.2847717},{"time_hours":490,"approval_perbill":500000000,"support_perbill":2826496,"approval":50,"support":0.2826496},{"time_hours":491,"approval_perbill":500000000,"support_perbill":2805360,"approval":50,"support":0.280536},{"time_hours":492,"approval_perbill":500000000,"support_perbill":2784309,"approval":50,"support":0.2784309},{"time_hours":493,"approval_perbill":500000000,"support_perbill":2763341,"approval":50,"support":0.2763341},{"time_hours":494,"approval_perbill":500000000,"support_perbill":2742455,"approval":50,"support":0.2742455},{"time_hours":495,"approval_perbill":500000000,"support_perbill":2721653,"approval":50,"support":0.2721653},{"time_hours":496,"approval_perbill":500000000,"support_perbill":2700933,"approval":50,"support":0.2700933},{"time_hours":497,"approval_perbill":500000000,"support_perbill":2680294,"approval":50,"support":0.2680294},{"time_hours":498,"approval_perbill":500000000,"support_perbill":2659737,"approval":50,"support":0.2659737},{"time_hours":499,"approval_perbill":500000000,"support_perbill":2639260,"approval":50,"support":0.263926},{"time_hours":500,"approval_perbill":500000000,"support_perbill":2618864,"approval":50,"support":0.2618864},{"time_hours":501,"approval_perbill":500000000,"support_perbill":2598547,"approval":50,"support":0.2598547},{"time_hours":502,"approval_perbill":500000000,"support_perbill":2578310,"approval":50,"support":0.257831},{"time_hours":503,"approval_perbill":500000000,"support_perbill":2558151,"approval":50,"support":0.2558151},{"time_hours":504,"approval_perbill":500000000,"support_perbill":2538071,"approval":50,"support":0.2538071},{"time_hours":505,"approval_perbill":500000000,"support_perbill":2518069,"approval":50,"support":0.2518069},{"time_hours":506,"approval_perbill":500000000,"support_perbill":2498144,"approval":50,"support":0.2498144},{"time_hours":507,"approval_perbill":500000000,"support_perbill":2478296,"approval":50,"support":0.2478296},{"time_hours":508,"approval_perbill":500000000,"support_perbill":2458525,"approval":50,"support":0.2458525},{"time_hours":509,"approval_perbill":500000000,"support_perbill":2438830,"approval":50,"support":0.243883},{"time_hours":510,"approval_perbill":500000000,"support_perbill":2419210,"approval":50,"support":0.241921},{"time_hours":511,"approval_perbill":500000000,"support_perbill":2399666,"approval":50,"support":0.2399666},{"time_hours":512,"approval_perbill":500000000,"support_perbill":2380197,"approval":50,"support":0.2380197},{"time_hours":513,"approval_perbill":500000000,"support_perbill":2360802,"approval":50,"support":0.2360802},{"time_hours":514,"approval_perbill":500000000,"support_perbill":2341481,"approval":50,"support":0.2341481},{"time_hours":515,"approval_perbill":500000000,"support_perbill":2322233,"approval":50,"support":0.2322233},{"time_hours":516,"approval_perbill":500000000,"support_perbill":2303059,"approval":50,"support":0.2303059},{"time_hours":517,"approval_perbill":500000000,"support_perbill":2283957,"approval":50,"support":0.2283957},{"time_hours":518,"approval_perbill":500000000,"support_perbill":2264928,"approval":50,"support":0.2264928},{"time_hours":519,"approval_perbill":500000000,"support_perbill":2245970,"approval":50,"support":0.224597},{"time_hours":520,"approval_perbill":500000000,"support_perbill":2227084,"approval":50,"support":0.2227084},{"time_hours":521,"approval_perbill":500000000,"support_perbill":2208269,"approval":50,"support":0.2208269},{"time_hours":522,"approval_perbill":500000000,"support_perbill":2189525,"approval":50,"support":0.2189525},{"time_hours":523,"approval_perbill":500000000,"support_perbill":2170851,"approval":50,"support":0.2170851},{"time_hours":524,"approval_perbill":500000000,"support_perbill":2152247,"approval":50,"support":0.2152247},{"time_hours":525,"approval_perbill":500000000,"support_perbill":2133712,"approval":50,"support":0.2133712},{"time_hours":526,"approval_perbill":500000000,"support_perbill":2115247,"approval":50,"support":0.2115247},{"time_hours":527,"approval_perbill":500000000,"support_perbill":2096850,"approval":50,"support":0.209685},{"time_hours":528,"approval_perbill":500000000,"support_perbill":2078522,"approval":50,"support":0.2078522},{"time_hours":529,"approval_perbill":500000000,"support_perbill":2060261,"approval":50,"support":0.2060261},{"time_hours":530,"approval_perbill":500000000,"support_perbill":2042068,"approval":50,"support":0.2042068},{"time_hours":531,"approval_perbill":500000000,"support_perbill":2023943,"approval":50,"support":0.2023943},{"time_hours":532,"approval_perbill":500000000,"support_perbill":2005884,"approval":50,"support":0.2005884},{"time_hours":533,"approval_perbill":500000000,"support_perbill":1987891,"approval":50,"support":0.1987891},{"time_hours":534,"approval_perbill":500000000,"support_perbill":1969965,"approval":50,"support":0.1969965},{"time_hours":535,"approval_perbill":500000000,"support_perbill":1952104,"approval":50,"support":0.1952104},{"time_hours":536,"approval_perbill":500000000,"support_perbill":1934309,"approval":50,"support":0.1934309},{"time_hours":537,"approval_perbill":500000000,"support_perbill":1916579,"approval":50,"support":0.1916579},{"time_hours":538,"approval_perbill":500000000,"support_perbill":1898913,"approval":50,"support":0.1898913},{"time_hours":539,"approval_perbill":500000000,"support_perbill":1881312,"approval":50,"support":0.1881312},{"time_hours":540,"approval_perbill":500000000,"support_perbill":1863775,"approval":50,"support":0.1863775},{"time_hours":541,"approval_perbill":500000000,"support_perbill":1846301,"approval":50,"support":0.1846301},{"time_hours":542,"approval_perbill":500000000,"support_perbill":1828891,"approval":50,"support":0.1828891},{"time_hours":543,"approval_perbill":500000000,"support_perbill":1811543,"approval":50,"support":0.1811543},{"time_hours":544,"approval_perbill":500000000,"support_perbill":1794258,"approval":50,"support":0.1794258},{"time_hours":545,"approval_perbill":500000000,"support_perbill":1777036,"approval":50,"support":0.1777036},{"time_hours":546,"approval_perbill":500000000,"support_perbill":1759875,"approval":50,"support":0.1759875},{"time_hours":547,"approval_perbill":500000000,"support_perbill":1742775,"approval":50,"support":0.1742775},{"time_hours":548,"approval_perbill":500000000,"support_perbill":1725737,"approval":50,"support":0.1725737},{"time_hours":549,"approval_perbill":500000000,"support_perbill":1708760,"approval":50,"support":0.170876},{"time_hours":550,"approval_perbill":500000000,"support_perbill":1691844,"approval":50,"support":0.1691844},{"time_hours":551,"approval_perbill":500000000,"support_perbill":1674988,"approval":50,"support":0.1674988},{"time_hours":552,"approval_perbill":500000000,"support_perbill":1658191,"approval":50,"support":0.1658191},{"time_hours":553,"approval_perbill":500000000,"support_perbill":1641455,"approval":50,"support":0.1641455},{"time_hours":554,"approval_perbill":500000000,"support_perbill":1624777,"approval":50,"support":0.1624777},{"time_hours":555,"approval_perbill":500000000,"support_perbill":1608159,"approval":50,"support":0.1608159},{"time_hours":556,"approval_perbill":500000000,"support_perbill":1591599,"approval":50,"support":0.1591599},{"time_hours":557,"approval_perbill":500000000,"support_perbill":1575098,"approval":50,"support":0.1575098},{"time_hours":558,"approval_perbill":500000000,"support_perbill":1558654,"approval":50,"support":0.1558654},{"time_hours":559,"approval_perbill":500000000,"support_perbill":1542269,"approval":50,"support":0.1542269},{"time_hours":560,"approval_perbill":500000000,"support_perbill":1525941,"approval":50,"support":0.1525941},{"time_hours":561,"approval_perbill":500000000,"support_perbill":1509670,"approval":50,"support":0.150967},{"time_hours":562,"approval_perbill":500000000,"support_perbill":1493456,"approval":50,"support":0.1493456},{"time_hours":563,"approval_perbill":500000000,"support_perbill":1477298,"approval":50,"support":0.1477298},{"time_hours":564,"approval_perbill":500000000,"support_perbill":1461197,"approval":50,"support":0.1461197},{"time_hours":565,"approval_perbill":500000000,"support_perbill":1445152,"approval":50,"support":0.1445152},{"time_hours":566,"approval_perbill":500000000,"support_perbill":1429162,"approval":50,"support":0.1429162},{"time_hours":567,"approval_perbill":500000000,"support_perbill":1413228,"approval":50,"support":0.1413228},{"time_hours":568,"approval_perbill":500000000,"support_perbill":1397348,"approval":50,"support":0.1397348},{"time_hours":569,"approval_perbill":500000000,"support_perbill":1381524,"approval":50,"support":0.1381524},{"time_hours":570,"approval_perbill":500000000,"support_perbill":1365754,"approval":50,"support":0.1365754},{"time_hours":571,"approval_perbill":500000000,"support_perbill":1350039,"approval":50,"support":0.1350039},{"time_hours":572,"approval_perbill":500000000,"support_perbill":1334377,"approval":50,"support":0.1334377},{"time_hours":573,"approval_perbill":500000000,"support_perbill":1318769,"approval":50,"support":0.1318769},{"time_hours":574,"approval_perbill":500000000,"support_perbill":1303214,"approval":50,"support":0.1303214},{"time_hours":575,"approval_perbill":500000000,"support_perbill":1287713,"approval":50,"support":0.1287713},{"time_hours":576,"approval_perbill":500000000,"support_perbill":1272264,"approval":50,"support":0.1272264},{"time_hours":577,"approval_perbill":500000000,"support_perbill":1256869,"approval":50,"support":0.1256869},{"time_hours":578,"approval_perbill":500000000,"support_perbill":1241525,"approval":50,"support":0.1241525},{"time_hours":579,"approval_perbill":500000000,"support_perbill":1226233,"approval":50,"support":0.1226233},{"time_hours":580,"approval_perbill":500000000,"support_perbill":1210994,"approval":50,"support":0.1210994},{"time_hours":581,"approval_perbill":500000000,"support_perbill":1195805,"approval":50,"support":0.1195805},{"time_hours":582,"approval_perbill":500000000,"support_perbill":1180668,"approval":50,"support":0.1180668},{"time_hours":583,"approval_perbill":500000000,"support_perbill":1165582,"approval":50,"support":0.1165582},{"time_hours":584,"approval_perbill":500000000,"support_perbill":1150547,"approval":50,"support":0.1150547},{"time_hours":585,"approval_perbill":500000000,"support_perbill":1135563,"approval":50,"support":0.1135563},{"time_hours":586,"approval_perbill":500000000,"support_perbill":1120628,"approval":50,"support":0.1120628},{"time_hours":587,"approval_perbill":500000000,"support_perbill":1105744,"approval":50,"support":0.1105744},{"time_hours":588,"approval_perbill":500000000,"support_perbill":1090909,"approval":50,"support":0.1090909},{"time_hours":589,"approval_perbill":500000000,"support_perbill":1076124,"approval":50,"support":0.1076124},{"time_hours":590,"approval_perbill":500000000,"support_perbill":1061388,"approval":50,"support":0.1061388},{"time_hours":591,"approval_perbill":500000000,"support_perbill":1046701,"approval":50,"support":0.1046701},{"time_hours":592,"approval_perbill":500000000,"support_perbill":1032063,"approval":50,"support":0.1032063},{"time_hours":593,"approval_perbill":500000000,"support_perbill":1017473,"approval":50,"support":0.1017473},{"time_hours":594,"approval_perbill":500000000,"support_perbill":1002932,"approval":50,"support":0.1002932},{"time_hours":595,"approval_perbill":500000000,"support_perbill":988438,"approval":50,"support":0.0988438},{"time_hours":596,"approval_perbill":500000000,"support_perbill":973993,"approval":50,"support":0.0973993},{"time_hours":597,"approval_perbill":500000000,"support_perbill":959595,"approval":50,"support":0.0959595},{"time_hours":598,"approval_perbill":500000000,"support_perbill":945244,"approval":50,"support":0.0945244},{"time_hours":599,"approval_perbill":500000000,"support_perbill":930940,"approval":50,"support":0.093094},{"time_hours":600,"approval_perbill":500000000,"support_perbill":916684,"approval":50,"support":0.0916684},{"time_hours":601,"approval_perbill":500000000,"support_perbill":902473,"approval":50,"support":0.0902473},{"time_hours":602,"approval_perbill":500000000,"support_perbill":888310,"approval":50,"support":0.088831},{"time_hours":603,"approval_perbill":500000000,"support_perbill":874192,"approval":50,"support":0.0874192},{"time_hours":604,"approval_perbill":500000000,"support_perbill":860121,"approval":50,"support":0.0860121},{"time_hours":605,"approval_perbill":500000000,"support_perbill":846095,"approval":50,"support":0.0846095},{"time_hours":606,"approval_perbill":500000000,"support_perbill":832114,"approval":50,"support":0.0832114},{"time_hours":607,"approval_perbill":500000000,"support_perbill":818179,"approval":50,"support":0.0818179},{"time_hours":608,"approval_perbill":500000000,"support_perbill":804289,"approval":50,"support":0.0804289},{"time_hours":609,"approval_perbill":500000000,"support_perbill":790444,"approval":50,"support":0.0790444},{"time_hours":610,"approval_perbill":500000000,"support_perbill":776644,"approval":50,"support":0.0776644},{"time_hours":611,"approval_perbill":500000000,"support_perbill":762888,"approval":50,"support":0.0762888},{"time_hours":612,"approval_perbill":500000000,"support_perbill":749176,"approval":50,"support":0.0749176},{"time_hours":613,"approval_perbill":500000000,"support_perbill":735508,"approval":50,"support":0.0735508},{"time_hours":614,"approval_perbill":500000000,"support_perbill":721884,"approval":50,"support":0.0721884},{"time_hours":615,"approval_perbill":500000000,"support_perbill":708303,"approval":50,"support":0.0708303},{"time_hours":616,"approval_perbill":500000000,"support_perbill":694766,"approval":50,"support":0.0694766},{"time_hours":617,"approval_perbill":500000000,"support_perbill":681272,"approval":50,"support":0.0681272},{"time_hours":618,"approval_perbill":500000000,"support_perbill":667821,"approval":50,"support":0.0667821},{"time_hours":619,"approval_perbill":500000000,"support_perbill":654412,"approval":50,"support":0.0654412},{"time_hours":620,"approval_perbill":500000000,"support_perbill":641047,"approval":50,"support":0.0641047},{"time_hours":621,"approval_perbill":500000000,"support_perbill":627723,"approval":50,"support":0.0627723},{"time_hours":622,"approval_perbill":500000000,"support_perbill":614442,"approval":50,"support":0.0614442},{"time_hours":623,"approval_perbill":500000000,"support_perbill":601202,"approval":50,"support":0.0601202},{"time_hours":624,"approval_perbill":500000000,"support_perbill":588005,"approval":50,"support":0.0588005},{"time_hours":625,"approval_perbill":500000000,"support_perbill":574848,"approval":50,"support":0.0574848},{"time_hours":626,"approval_perbill":500000000,"support_perbill":561734,"approval":50,"support":0.0561734},{"time_hours":627,"approval_perbill":500000000,"support_perbill":548660,"approval":50,"support":0.054866},{"time_hours":628,"approval_perbill":500000000,"support_perbill":535627,"approval":50,"support":0.0535627},{"time_hours":629,"approval_perbill":500000000,"support_perbill":522635,"approval":50,"support":0.0522635},{"time_hours":630,"approval_perbill":500000000,"support_perbill":509684,"approval":50,"support":0.0509684},{"time_hours":631,"approval_perbill":500000000,"support_perbill":496773,"approval":50,"support":0.0496773},{"time_hours":632,"approval_perbill":500000000,"support_perbill":483902,"approval":50,"support":0.0483902},{"time_hours":633,"approval_perbill":500000000,"support_perbill":471071,"approval":50,"support":0.0471071},{"time_hours":634,"approval_perbill":500000000,"support_perbill":458280,"approval":50,"support":0.045828},{"time_hours":635,"approval_perbill":500000000,"support_perbill":445529,"approval":50,"support":0.0445529},{"time_hours":636,"approval_perbill":500000000,"support_perbill":432817,"approval":50,"support":0.0432817},{"time_hours":637,"approval_perbill":500000000,"support_perbill":420144,"approval":50,"support":0.0420144},{"time_hours":638,"approval_perbill":500000000,"support_perbill":407511,"approval":50,"support":0.0407511},{"time_hours":639,"approval_perbill":500000000,"support_perbill":394916,"approval":50,"support":0.0394916},{"time_hours":640,"approval_perbill":500000000,"support_perbill":382360,"approval":50,"support":0.038236},{"time_hours":641,"approval_perbill":500000000,"support_perbill":369843,"approval":50,"support":0.0369843},{"time_hours":642,"approval_perbill":500000000,"support_perbill":357364,"approval":50,"support":0.0357364},{"time_hours":643,"approval_perbill":500000000,"support_perbill":344923,"approval":50,"support":0.0344923},{"time_hours":644,"approval_perbill":500000000,"support_perbill":332520,"approval":50,"support":0.033252},{"time_hours":645,"approval_perbill":500000000,"support_perbill":320155,"approval":50,"support":0.0320155},{"time_hours":646,"approval_perbill":500000000,"support_perbill":307828,"approval":50,"support":0.0307828},{"time_hours":647,"approval_perbill":500000000,"support_perbill":295538,"approval":50,"support":0.0295538},{"time_hours":648,"approval_perbill":500000000,"support_perbill":283286,"approval":50,"support":0.0283286},{"time_hours":649,"approval_perbill":500000000,"support_perbill":271071,"approval":50,"support":0.0271071},{"time_hours":650,"approval_perbill":500000000,"support_perbill":258892,"approval":50,"support":0.0258892},{"time_hours":651,"approval_perbill":500000000,"support_perbill":246751,"approval":50,"support":0.0246751},{"time_hours":652,"approval_perbill":500000000,"support_perbill":234646,"approval":50,"support":0.0234646},{"time_hours":653,"approval_perbill":500000000,"support_perbill":222578,"approval":50,"support":0.0222578},{"time_hours":654,"approval_perbill":500000000,"support_perbill":210546,"approval":50,"support":0.0210546},{"time_hours":655,"approval_perbill":500000000,"support_perbill":198550,"approval":50,"support":0.019855},{"time_hours":656,"approval_perbill":500000000,"support_perbill":186590,"approval":50,"support":0.018659},{"time_hours":657,"approval_perbill":500000000,"support_perbill":174666,"approval":50,"support":0.0174666},{"time_hours":658,"approval_perbill":500000000,"support_perbill":162778,"approval":50,"support":0.0162778},{"time_hours":659,"approval_perbill":500000000,"support_perbill":150925,"approval":50,"support":0.0150925},{"time_hours":660,"approval_perbill":500000000,"support_perbill":139108,"approval":50,"support":0.0139108},{"time_hours":661,"approval_perbill":500000000,"support_perbill":127326,"approval":50,"support":0.0127326},{"time_hours":662,"approval_perbill":500000000,"support_perbill":115578,"approval":50,"support":0.0115578},{"time_hours":663,"approval_perbill":500000000,"support_perbill":103866,"approval":50,"support":0.0103866},{"time_hours":664,"approval_perbill":500000000,"support_perbill":92188,"approval":50,"support":0.0092188},{"time_hours":665,"approval_perbill":500000000,"support_perbill":80545,"approval":50,"support":0.0080545},{"time_hours":666,"approval_perbill":500000000,"support_perbill":68937,"approval":50,"support":0.0068937},{"time_hours":667,"approval_perbill":500000000,"support_perbill":57363,"approval":50,"support":0.0057363},{"time_hours":668,"approval_perbill":500000000,"support_perbill":45822,"approval":50,"support":0.0045822},{"time_hours":669,"approval_perbill":500000000,"support_perbill":34316,"approval":50,"support":0.0034316},{"time_hours":670,"approval_perbill":500000000,"support_perbill":22844,"approval":50,"support":0.0022844},{"time_hours":671,"approval_perbill":500000000,"support_perbill":11405,"approval":50,"support":0.0011405},{"time_hours":672,"approval_perbill":500000000,"support_perbill":0,"approval":50,"support":0}]')},77062:p=>{"use strict";p.exports=JSON.parse('[{"time_hours":0,"approval_perbill":1000000000,"support_perbill":500000026,"approval":100,"support":50.0000026},{"time_hours":1,"approval_perbill":998774510,"support_perbill":455636061,"approval":99.877451,"support":45.5636061},{"time_hours":2,"approval_perbill":997549020,"support_perbill":418401359,"approval":99.754902,"support":41.8401359},{"time_hours":3,"approval_perbill":996323530,"support_perbill":386705228,"approval":99.632353,"support":38.6705228},{"time_hours":4,"approval_perbill":995098040,"support_perbill":359397443,"approval":99.509804,"support":35.9397443},{"time_hours":5,"approval_perbill":993872550,"support_perbill":335625639,"approval":99.387255,"support":33.5625639},{"time_hours":6,"approval_perbill":992647060,"support_perbill":314744813,"approval":99.264706,"support":31.4744813},{"time_hours":7,"approval_perbill":991421570,"support_perbill":296257808,"approval":99.142157,"support":29.6257808},{"time_hours":8,"approval_perbill":990196080,"support_perbill":279775293,"approval":99.019608,"support":27.9775293},{"time_hours":9,"approval_perbill":988970589,"support_perbill":264988013,"approval":98.8970589,"support":26.4988013},{"time_hours":10,"approval_perbill":987745099,"support_perbill":251647242,"approval":98.7745099,"support":25.1647242},{"time_hours":11,"approval_perbill":986519609,"support_perbill":239550622,"approval":98.6519609,"support":23.9550622},{"time_hours":12,"approval_perbill":985294119,"support_perbill":228531862,"approval":98.5294119,"support":22.8531862},{"time_hours":13,"approval_perbill":984068628,"support_perbill":218453039,"approval":98.4068628,"support":21.8453039},{"time_hours":14,"approval_perbill":982843138,"support_perbill":209198815,"approval":98.2843138,"support":20.9198815},{"time_hours":15,"approval_perbill":981617648,"support_perbill":200671963,"approval":98.1617648,"support":20.0671963},{"time_hours":16,"approval_perbill":980392158,"support_perbill":192789972,"approval":98.0392158,"support":19.2789972},{"time_hours":17,"approval_perbill":979166667,"support_perbill":185482348,"approval":97.9166667,"support":18.5482348},{"time_hours":18,"approval_perbill":977941177,"support_perbill":178688524,"approval":97.7941177,"support":17.8688524},{"time_hours":19,"approval_perbill":976715687,"support_perbill":172356151,"approval":97.6715687,"support":17.2356151},{"time_hours":20,"approval_perbill":975490197,"support_perbill":166439756,"approval":97.5490197,"support":16.6439756},{"time_hours":21,"approval_perbill":974264706,"support_perbill":160899652,"approval":97.4264706,"support":16.0899652},{"time_hours":22,"approval_perbill":973039216,"support_perbill":155701053,"approval":97.3039216,"support":15.5701053},{"time_hours":23,"approval_perbill":971813726,"support_perbill":150813323,"approval":97.1813726,"support":15.0813323},{"time_hours":24,"approval_perbill":970588236,"support_perbill":146209386,"approval":97.0588236,"support":14.6209386},{"time_hours":25,"approval_perbill":969362746,"support_perbill":141865225,"approval":96.9362746,"support":14.1865225},{"time_hours":26,"approval_perbill":968137256,"support_perbill":137759452,"approval":96.8137256,"support":13.7759452},{"time_hours":27,"approval_perbill":966911766,"support_perbill":133872975,"approval":96.6911766,"support":13.3872975},{"time_hours":28,"approval_perbill":965686276,"support_perbill":130188679,"approval":96.5686276,"support":13.0188679},{"time_hours":29,"approval_perbill":964460786,"support_perbill":126691186,"approval":96.4460786,"support":12.6691186},{"time_hours":30,"approval_perbill":963235295,"support_perbill":123366639,"approval":96.3235295,"support":12.3366639},{"time_hours":31,"approval_perbill":962009805,"support_perbill":120202524,"approval":96.2009805,"support":12.0202524},{"time_hours":32,"approval_perbill":960784315,"support_perbill":117187499,"approval":96.0784315,"support":11.7187499},{"time_hours":33,"approval_perbill":959558825,"support_perbill":114311269,"approval":95.9558825,"support":11.4311269},{"time_hours":34,"approval_perbill":958333334,"support_perbill":111564465,"approval":95.8333334,"support":11.1564465},{"time_hours":35,"approval_perbill":957107844,"support_perbill":108938546,"approval":95.7107844,"support":10.8938546},{"time_hours":36,"approval_perbill":955882354,"support_perbill":106425701,"approval":95.5882354,"support":10.6425701},{"time_hours":37,"approval_perbill":954656864,"support_perbill":104018782,"approval":95.4656864,"support":10.4018782},{"time_hours":38,"approval_perbill":953431373,"support_perbill":101711228,"approval":95.3431373,"support":10.1711228},{"time_hours":39,"approval_perbill":952205883,"support_perbill":99497012,"approval":95.2205883,"support":9.9497012},{"time_hours":40,"approval_perbill":950980393,"support_perbill":97370582,"approval":95.0980393,"support":9.7370582},{"time_hours":41,"approval_perbill":949754903,"support_perbill":95326819,"approval":94.9754903,"support":9.5326819},{"time_hours":42,"approval_perbill":948529412,"support_perbill":93360994,"approval":94.8529412,"support":9.3360994},{"time_hours":43,"approval_perbill":947303922,"support_perbill":91468733,"approval":94.7303922,"support":9.1468733},{"time_hours":44,"approval_perbill":946078432,"support_perbill":89645982,"approval":94.6078432,"support":8.9645982},{"time_hours":45,"approval_perbill":944852942,"support_perbill":87888981,"approval":94.4852942,"support":8.7888981},{"time_hours":46,"approval_perbill":943627452,"support_perbill":86194234,"approval":94.3627452,"support":8.6194234},{"time_hours":47,"approval_perbill":942401961,"support_perbill":84558490,"approval":94.2401961,"support":8.455849},{"time_hours":48,"approval_perbill":941176471,"support_perbill":82978722,"approval":94.1176471,"support":8.2978722},{"time_hours":49,"approval_perbill":939950981,"support_perbill":81452103,"approval":93.9950981,"support":8.1452103},{"time_hours":50,"approval_perbill":938725491,"support_perbill":79975997,"approval":93.8725491,"support":7.9975997},{"time_hours":51,"approval_perbill":937500001,"support_perbill":78547936,"approval":93.7500001,"support":7.8547936},{"time_hours":52,"approval_perbill":936274511,"support_perbill":77165614,"approval":93.6274511,"support":7.7165614},{"time_hours":53,"approval_perbill":935049021,"support_perbill":75826867,"approval":93.5049021,"support":7.5826867},{"time_hours":54,"approval_perbill":933823531,"support_perbill":74529666,"approval":93.3823531,"support":7.4529666},{"time_hours":55,"approval_perbill":932598040,"support_perbill":73272106,"approval":93.259804,"support":7.3272106},{"time_hours":56,"approval_perbill":931372550,"support_perbill":72052400,"approval":93.137255,"support":7.20524},{"time_hours":57,"approval_perbill":930147060,"support_perbill":70868862,"approval":93.014706,"support":7.0868862},{"time_hours":58,"approval_perbill":928921570,"support_perbill":69719908,"approval":92.892157,"support":6.9719908},{"time_hours":59,"approval_perbill":927696079,"support_perbill":68604042,"approval":92.7696079,"support":6.8604042},{"time_hours":60,"approval_perbill":926470589,"support_perbill":67519857,"approval":92.6470589,"support":6.7519857},{"time_hours":61,"approval_perbill":925245099,"support_perbill":66466022,"approval":92.5245099,"support":6.6466022},{"time_hours":62,"approval_perbill":924019609,"support_perbill":65441280,"approval":92.4019609,"support":6.544128},{"time_hours":63,"approval_perbill":922794118,"support_perbill":64444443,"approval":92.2794118,"support":6.4444443},{"time_hours":64,"approval_perbill":921568628,"support_perbill":63474386,"approval":92.1568628,"support":6.3474386},{"time_hours":65,"approval_perbill":920343138,"support_perbill":62530044,"approval":92.0343138,"support":6.2530044},{"time_hours":66,"approval_perbill":919117648,"support_perbill":61610409,"approval":91.9117648,"support":6.1610409},{"time_hours":67,"approval_perbill":917892158,"support_perbill":60714523,"approval":91.7892158,"support":6.0714523},{"time_hours":68,"approval_perbill":916666667,"support_perbill":59841478,"approval":91.6666667,"support":5.9841478},{"time_hours":69,"approval_perbill":915441177,"support_perbill":58990411,"approval":91.5441177,"support":5.8990411},{"time_hours":70,"approval_perbill":914215687,"support_perbill":58160504,"approval":91.4215687,"support":5.8160504},{"time_hours":71,"approval_perbill":912990197,"support_perbill":57350975,"approval":91.2990197,"support":5.7350975},{"time_hours":72,"approval_perbill":911764706,"support_perbill":56561084,"approval":91.1764706,"support":5.6561084},{"time_hours":73,"approval_perbill":910539216,"support_perbill":55790126,"approval":91.0539216,"support":5.5790126},{"time_hours":74,"approval_perbill":909313726,"support_perbill":55037426,"approval":90.9313726,"support":5.5037426},{"time_hours":75,"approval_perbill":908088236,"support_perbill":54302345,"approval":90.8088236,"support":5.4302345},{"time_hours":76,"approval_perbill":906862746,"support_perbill":53584271,"approval":90.6862746,"support":5.3584271},{"time_hours":77,"approval_perbill":905637256,"support_perbill":52882620,"approval":90.5637256,"support":5.288262},{"time_hours":78,"approval_perbill":904411766,"support_perbill":52196835,"approval":90.4411766,"support":5.2196835},{"time_hours":79,"approval_perbill":903186276,"support_perbill":51526385,"approval":90.3186276,"support":5.1526385},{"time_hours":80,"approval_perbill":901960785,"support_perbill":50870759,"approval":90.1960785,"support":5.0870759},{"time_hours":81,"approval_perbill":900735295,"support_perbill":50229473,"approval":90.0735295,"support":5.0229473},{"time_hours":82,"approval_perbill":899509805,"support_perbill":49602061,"approval":89.9509805,"support":4.9602061},{"time_hours":83,"approval_perbill":898284315,"support_perbill":48988077,"approval":89.8284315,"support":4.8988077},{"time_hours":84,"approval_perbill":897058824,"support_perbill":48387095,"approval":89.7058824,"support":4.8387095},{"time_hours":85,"approval_perbill":895833334,"support_perbill":47798707,"approval":89.5833334,"support":4.7798707},{"time_hours":86,"approval_perbill":894607844,"support_perbill":47222519,"approval":89.4607844,"support":4.7222519},{"time_hours":87,"approval_perbill":893382354,"support_perbill":46658158,"approval":89.3382354,"support":4.6658158},{"time_hours":88,"approval_perbill":892156864,"support_perbill":46105262,"approval":89.2156864,"support":4.6105262},{"time_hours":89,"approval_perbill":890931373,"support_perbill":45563485,"approval":89.0931373,"support":4.5563485},{"time_hours":90,"approval_perbill":889705883,"support_perbill":45032496,"approval":88.9705883,"support":4.5032496},{"time_hours":91,"approval_perbill":888480393,"support_perbill":44511976,"approval":88.8480393,"support":4.4511976},{"time_hours":92,"approval_perbill":887254903,"support_perbill":44001617,"approval":88.7254903,"support":4.4001617},{"time_hours":93,"approval_perbill":886029412,"support_perbill":43501126,"approval":88.6029412,"support":4.3501126},{"time_hours":94,"approval_perbill":884803922,"support_perbill":43010218,"approval":88.4803922,"support":4.3010218},{"time_hours":95,"approval_perbill":883578432,"support_perbill":42528621,"approval":88.3578432,"support":4.2528621},{"time_hours":96,"approval_perbill":882352942,"support_perbill":42056074,"approval":88.2352942,"support":4.2056074},{"time_hours":97,"approval_perbill":881127452,"support_perbill":41592321,"approval":88.1127452,"support":4.1592321},{"time_hours":98,"approval_perbill":879901962,"support_perbill":41137122,"approval":87.9901962,"support":4.1137122},{"time_hours":99,"approval_perbill":878676472,"support_perbill":40690242,"approval":87.8676472,"support":4.0690242},{"time_hours":100,"approval_perbill":877450982,"support_perbill":40251453,"approval":87.7450982,"support":4.0251453},{"time_hours":101,"approval_perbill":876225491,"support_perbill":39820539,"approval":87.6225491,"support":3.9820539},{"time_hours":102,"approval_perbill":875000001,"support_perbill":39397289,"approval":87.5000001,"support":3.9397289},{"time_hours":103,"approval_perbill":873774511,"support_perbill":38981501,"approval":87.3774511,"support":3.8981501},{"time_hours":104,"approval_perbill":872549021,"support_perbill":38572980,"approval":87.2549021,"support":3.857298},{"time_hours":105,"approval_perbill":871323530,"support_perbill":38171535,"approval":87.132353,"support":3.8171535},{"time_hours":106,"approval_perbill":870098040,"support_perbill":37776985,"approval":87.009804,"support":3.7776985},{"time_hours":107,"approval_perbill":868872550,"support_perbill":37389155,"approval":86.887255,"support":3.7389155},{"time_hours":108,"approval_perbill":867647060,"support_perbill":37007873,"approval":86.764706,"support":3.7007873},{"time_hours":109,"approval_perbill":866421570,"support_perbill":36632975,"approval":86.642157,"support":3.6632975},{"time_hours":110,"approval_perbill":865196079,"support_perbill":36264302,"approval":86.5196079,"support":3.6264302},{"time_hours":111,"approval_perbill":863970589,"support_perbill":35901701,"approval":86.3970589,"support":3.5901701},{"time_hours":112,"approval_perbill":862745099,"support_perbill":35545023,"approval":86.2745099,"support":3.5545023},{"time_hours":113,"approval_perbill":861519609,"support_perbill":35194123,"approval":86.1519609,"support":3.5194123},{"time_hours":114,"approval_perbill":860294118,"support_perbill":34848862,"approval":86.0294118,"support":3.4848862},{"time_hours":115,"approval_perbill":859068628,"support_perbill":34509106,"approval":85.9068628,"support":3.4509106},{"time_hours":116,"approval_perbill":857843138,"support_perbill":34174724,"approval":85.7843138,"support":3.4174724},{"time_hours":117,"approval_perbill":856617648,"support_perbill":33845590,"approval":85.6617648,"support":3.384559},{"time_hours":118,"approval_perbill":855392157,"support_perbill":33521580,"approval":85.5392157,"support":3.352158},{"time_hours":119,"approval_perbill":854166667,"support_perbill":33202577,"approval":85.4166667,"support":3.3202577},{"time_hours":120,"approval_perbill":852941177,"support_perbill":32888464,"approval":85.2941177,"support":3.2888464},{"time_hours":121,"approval_perbill":851715687,"support_perbill":32579131,"approval":85.1715687,"support":3.2579131},{"time_hours":122,"approval_perbill":850490197,"support_perbill":32274469,"approval":85.0490197,"support":3.2274469},{"time_hours":123,"approval_perbill":849264707,"support_perbill":31974373,"approval":84.9264707,"support":3.1974373},{"time_hours":124,"approval_perbill":848039217,"support_perbill":31678741,"approval":84.8039217,"support":3.1678741},{"time_hours":125,"approval_perbill":846813727,"support_perbill":31387475,"approval":84.6813727,"support":3.1387475},{"time_hours":126,"approval_perbill":845588236,"support_perbill":31100477,"approval":84.5588236,"support":3.1100477},{"time_hours":127,"approval_perbill":844362746,"support_perbill":30817656,"approval":84.4362746,"support":3.0817656},{"time_hours":128,"approval_perbill":843137256,"support_perbill":30538921,"approval":84.3137256,"support":3.0538921},{"time_hours":129,"approval_perbill":841911766,"support_perbill":30264184,"approval":84.1911766,"support":3.0264184},{"time_hours":130,"approval_perbill":840686276,"support_perbill":29993358,"approval":84.0686276,"support":2.9993358},{"time_hours":131,"approval_perbill":839460785,"support_perbill":29726363,"approval":83.9460785,"support":2.9726363},{"time_hours":132,"approval_perbill":838235295,"support_perbill":29463116,"approval":83.8235295,"support":2.9463116},{"time_hours":133,"approval_perbill":837009805,"support_perbill":29203539,"approval":83.7009805,"support":2.9203539},{"time_hours":134,"approval_perbill":835784315,"support_perbill":28947556,"approval":83.5784315,"support":2.8947556},{"time_hours":135,"approval_perbill":834558824,"support_perbill":28695094,"approval":83.4558824,"support":2.8695094},{"time_hours":136,"approval_perbill":833333334,"support_perbill":28446079,"approval":83.3333334,"support":2.8446079},{"time_hours":137,"approval_perbill":832107844,"support_perbill":28200442,"approval":83.2107844,"support":2.8200442},{"time_hours":138,"approval_perbill":830882354,"support_perbill":27958114,"approval":83.0882354,"support":2.7958114},{"time_hours":139,"approval_perbill":829656863,"support_perbill":27719030,"approval":82.9656863,"support":2.771903},{"time_hours":140,"approval_perbill":828431373,"support_perbill":27483123,"approval":82.8431373,"support":2.7483123},{"time_hours":141,"approval_perbill":827205883,"support_perbill":27250333,"approval":82.7205883,"support":2.7250333},{"time_hours":142,"approval_perbill":825980393,"support_perbill":27020596,"approval":82.5980393,"support":2.7020596},{"time_hours":143,"approval_perbill":824754902,"support_perbill":26793853,"approval":82.4754902,"support":2.6793853},{"time_hours":144,"approval_perbill":823529412,"support_perbill":26570047,"approval":82.3529412,"support":2.6570047},{"time_hours":145,"approval_perbill":822303922,"support_perbill":26349121,"approval":82.2303922,"support":2.6349121},{"time_hours":146,"approval_perbill":821078432,"support_perbill":26131019,"approval":82.1078432,"support":2.6131019},{"time_hours":147,"approval_perbill":819852942,"support_perbill":25915687,"approval":81.9852942,"support":2.5915687},{"time_hours":148,"approval_perbill":818627452,"support_perbill":25703073,"approval":81.8627452,"support":2.5703073},{"time_hours":149,"approval_perbill":817401962,"support_perbill":25493126,"approval":81.7401962,"support":2.5493126},{"time_hours":150,"approval_perbill":816176472,"support_perbill":25285796,"approval":81.6176472,"support":2.5285796},{"time_hours":151,"approval_perbill":814950982,"support_perbill":25081035,"approval":81.4950982,"support":2.5081035},{"time_hours":152,"approval_perbill":813725491,"support_perbill":24878795,"approval":81.3725491,"support":2.4878795},{"time_hours":153,"approval_perbill":812500001,"support_perbill":24679029,"approval":81.2500001,"support":2.4679029},{"time_hours":154,"approval_perbill":811274511,"support_perbill":24481693,"approval":81.1274511,"support":2.4481693},{"time_hours":155,"approval_perbill":810049021,"support_perbill":24286742,"approval":81.0049021,"support":2.4286742},{"time_hours":156,"approval_perbill":808823530,"support_perbill":24094134,"approval":80.882353,"support":2.4094134},{"time_hours":157,"approval_perbill":807598040,"support_perbill":23903827,"approval":80.759804,"support":2.3903827},{"time_hours":158,"approval_perbill":806372550,"support_perbill":23715779,"approval":80.637255,"support":2.3715779},{"time_hours":159,"approval_perbill":805147060,"support_perbill":23529951,"approval":80.514706,"support":2.3529951},{"time_hours":160,"approval_perbill":803921569,"support_perbill":23346303,"approval":80.3921569,"support":2.3346303},{"time_hours":161,"approval_perbill":802696079,"support_perbill":23164797,"approval":80.2696079,"support":2.3164797},{"time_hours":162,"approval_perbill":801470589,"support_perbill":22985397,"approval":80.1470589,"support":2.2985397},{"time_hours":163,"approval_perbill":800245099,"support_perbill":22808065,"approval":80.0245099,"support":2.2808065},{"time_hours":164,"approval_perbill":799019608,"support_perbill":22632766,"approval":79.9019608,"support":2.2632766},{"time_hours":165,"approval_perbill":797794118,"support_perbill":22459466,"approval":79.7794118,"support":2.2459466},{"time_hours":166,"approval_perbill":796568628,"support_perbill":22288130,"approval":79.6568628,"support":2.228813},{"time_hours":167,"approval_perbill":795343138,"support_perbill":22118725,"approval":79.5343138,"support":2.2118725},{"time_hours":168,"approval_perbill":794117648,"support_perbill":21951219,"approval":79.4117648,"support":2.1951219},{"time_hours":169,"approval_perbill":792892158,"support_perbill":21785579,"approval":79.2892158,"support":2.1785579},{"time_hours":170,"approval_perbill":791666668,"support_perbill":21621776,"approval":79.1666668,"support":2.1621776},{"time_hours":171,"approval_perbill":790441178,"support_perbill":21459778,"approval":79.0441178,"support":2.1459778},{"time_hours":172,"approval_perbill":789215688,"support_perbill":21299556,"approval":78.9215688,"support":2.1299556},{"time_hours":173,"approval_perbill":787990197,"support_perbill":21141081,"approval":78.7990197,"support":2.1141081},{"time_hours":174,"approval_perbill":786764707,"support_perbill":20984324,"approval":78.6764707,"support":2.0984324},{"time_hours":175,"approval_perbill":785539217,"support_perbill":20829258,"approval":78.5539217,"support":2.0829258},{"time_hours":176,"approval_perbill":784313727,"support_perbill":20675855,"approval":78.4313727,"support":2.0675855},{"time_hours":177,"approval_perbill":783088236,"support_perbill":20524089,"approval":78.3088236,"support":2.0524089},{"time_hours":178,"approval_perbill":781862746,"support_perbill":20373934,"approval":78.1862746,"support":2.0373934},{"time_hours":179,"approval_perbill":780637256,"support_perbill":20225364,"approval":78.0637256,"support":2.0225364},{"time_hours":180,"approval_perbill":779411766,"support_perbill":20078354,"approval":77.9411766,"support":2.0078354},{"time_hours":181,"approval_perbill":778186275,"support_perbill":19932880,"approval":77.8186275,"support":1.993288},{"time_hours":182,"approval_perbill":776960785,"support_perbill":19788917,"approval":77.6960785,"support":1.9788917},{"time_hours":183,"approval_perbill":775735295,"support_perbill":19646444,"approval":77.5735295,"support":1.9646444},{"time_hours":184,"approval_perbill":774509805,"support_perbill":19505435,"approval":77.4509805,"support":1.9505435},{"time_hours":185,"approval_perbill":773284314,"support_perbill":19365870,"approval":77.3284314,"support":1.936587},{"time_hours":186,"approval_perbill":772058824,"support_perbill":19227725,"approval":77.2058824,"support":1.9227725},{"time_hours":187,"approval_perbill":770833334,"support_perbill":19090980,"approval":77.0833334,"support":1.909098},{"time_hours":188,"approval_perbill":769607844,"support_perbill":18955613,"approval":76.9607844,"support":1.8955613},{"time_hours":189,"approval_perbill":768382353,"support_perbill":18821603,"approval":76.8382353,"support":1.8821603},{"time_hours":190,"approval_perbill":767156863,"support_perbill":18688931,"approval":76.7156863,"support":1.8688931},{"time_hours":191,"approval_perbill":765931373,"support_perbill":18557575,"approval":76.5931373,"support":1.8557575},{"time_hours":192,"approval_perbill":764705883,"support_perbill":18427518,"approval":76.4705883,"support":1.8427518},{"time_hours":193,"approval_perbill":763480393,"support_perbill":18298739,"approval":76.3480393,"support":1.8298739},{"time_hours":194,"approval_perbill":762254903,"support_perbill":18171219,"approval":76.2254903,"support":1.8171219},{"time_hours":195,"approval_perbill":761029413,"support_perbill":18044941,"approval":76.1029413,"support":1.8044941},{"time_hours":196,"approval_perbill":759803923,"support_perbill":17919887,"approval":75.9803923,"support":1.7919887},{"time_hours":197,"approval_perbill":758578433,"support_perbill":17796038,"approval":75.8578433,"support":1.7796038},{"time_hours":198,"approval_perbill":757352942,"support_perbill":17673377,"approval":75.7352942,"support":1.7673377},{"time_hours":199,"approval_perbill":756127452,"support_perbill":17551888,"approval":75.6127452,"support":1.7551888},{"time_hours":200,"approval_perbill":754901962,"support_perbill":17431553,"approval":75.4901962,"support":1.7431553},{"time_hours":201,"approval_perbill":753676472,"support_perbill":17312357,"approval":75.3676472,"support":1.7312357},{"time_hours":202,"approval_perbill":752450981,"support_perbill":17194282,"approval":75.2450981,"support":1.7194282},{"time_hours":203,"approval_perbill":751225491,"support_perbill":17077315,"approval":75.1225491,"support":1.7077315},{"time_hours":204,"approval_perbill":750000001,"support_perbill":16961437,"approval":75.0000001,"support":1.6961437},{"time_hours":205,"approval_perbill":748774511,"support_perbill":16846636,"approval":74.8774511,"support":1.6846636},{"time_hours":206,"approval_perbill":747549020,"support_perbill":16732895,"approval":74.754902,"support":1.6732895},{"time_hours":207,"approval_perbill":746323530,"support_perbill":16620201,"approval":74.632353,"support":1.6620201},{"time_hours":208,"approval_perbill":745098040,"support_perbill":16508538,"approval":74.509804,"support":1.6508538},{"time_hours":209,"approval_perbill":743872550,"support_perbill":16397893,"approval":74.387255,"support":1.6397893},{"time_hours":210,"approval_perbill":742647059,"support_perbill":16288252,"approval":74.2647059,"support":1.6288252},{"time_hours":211,"approval_perbill":741421569,"support_perbill":16179601,"approval":74.1421569,"support":1.6179601},{"time_hours":212,"approval_perbill":740196079,"support_perbill":16071927,"approval":74.0196079,"support":1.6071927},{"time_hours":213,"approval_perbill":738970589,"support_perbill":15965217,"approval":73.8970589,"support":1.5965217},{"time_hours":214,"approval_perbill":737745099,"support_perbill":15859457,"approval":73.7745099,"support":1.5859457},{"time_hours":215,"approval_perbill":736519608,"support_perbill":15754636,"approval":73.6519608,"support":1.5754636},{"time_hours":216,"approval_perbill":735294118,"support_perbill":15650741,"approval":73.5294118,"support":1.5650741},{"time_hours":217,"approval_perbill":734068628,"support_perbill":15547759,"approval":73.4068628,"support":1.5547759},{"time_hours":218,"approval_perbill":732843138,"support_perbill":15445679,"approval":73.2843138,"support":1.5445679},{"time_hours":219,"approval_perbill":731617648,"support_perbill":15344488,"approval":73.1617648,"support":1.5344488},{"time_hours":220,"approval_perbill":730392158,"support_perbill":15244176,"approval":73.0392158,"support":1.5244176},{"time_hours":221,"approval_perbill":729166668,"support_perbill":15144731,"approval":72.9166668,"support":1.5144731},{"time_hours":222,"approval_perbill":727941178,"support_perbill":15046141,"approval":72.7941178,"support":1.5046141},{"time_hours":223,"approval_perbill":726715687,"support_perbill":14948396,"approval":72.6715687,"support":1.4948396},{"time_hours":224,"approval_perbill":725490197,"support_perbill":14851485,"approval":72.5490197,"support":1.4851485},{"time_hours":225,"approval_perbill":724264707,"support_perbill":14755396,"approval":72.4264707,"support":1.4755396},{"time_hours":226,"approval_perbill":723039217,"support_perbill":14660121,"approval":72.3039217,"support":1.4660121},{"time_hours":227,"approval_perbill":721813726,"support_perbill":14565648,"approval":72.1813726,"support":1.4565648},{"time_hours":228,"approval_perbill":720588236,"support_perbill":14471968,"approval":72.0588236,"support":1.4471968},{"time_hours":229,"approval_perbill":719362746,"support_perbill":14379070,"approval":71.9362746,"support":1.437907},{"time_hours":230,"approval_perbill":718137256,"support_perbill":14286945,"approval":71.8137256,"support":1.4286945},{"time_hours":231,"approval_perbill":716911765,"support_perbill":14195583,"approval":71.6911765,"support":1.4195583},{"time_hours":232,"approval_perbill":715686275,"support_perbill":14104975,"approval":71.5686275,"support":1.4104975},{"time_hours":233,"approval_perbill":714460785,"support_perbill":14015111,"approval":71.4460785,"support":1.4015111},{"time_hours":234,"approval_perbill":713235295,"support_perbill":13925982,"approval":71.3235295,"support":1.3925982},{"time_hours":235,"approval_perbill":712009805,"support_perbill":13837579,"approval":71.2009805,"support":1.3837579},{"time_hours":236,"approval_perbill":710784314,"support_perbill":13749894,"approval":71.0784314,"support":1.3749894},{"time_hours":237,"approval_perbill":709558824,"support_perbill":13662918,"approval":70.9558824,"support":1.3662918},{"time_hours":238,"approval_perbill":708333334,"support_perbill":13576642,"approval":70.8333334,"support":1.3576642},{"time_hours":239,"approval_perbill":707107844,"support_perbill":13491057,"approval":70.7107844,"support":1.3491057},{"time_hours":240,"approval_perbill":705882353,"support_perbill":13406156,"approval":70.5882353,"support":1.3406156},{"time_hours":241,"approval_perbill":704656863,"support_perbill":13321931,"approval":70.4656863,"support":1.3321931},{"time_hours":242,"approval_perbill":703431373,"support_perbill":13238372,"approval":70.3431373,"support":1.3238372},{"time_hours":243,"approval_perbill":702205883,"support_perbill":13155473,"approval":70.2205883,"support":1.3155473},{"time_hours":244,"approval_perbill":700980393,"support_perbill":13073226,"approval":70.0980393,"support":1.3073226},{"time_hours":245,"approval_perbill":699754903,"support_perbill":12991622,"approval":69.9754903,"support":1.2991622},{"time_hours":246,"approval_perbill":698529413,"support_perbill":12910655,"approval":69.8529413,"support":1.2910655},{"time_hours":247,"approval_perbill":697303923,"support_perbill":12830317,"approval":69.7303923,"support":1.2830317},{"time_hours":248,"approval_perbill":696078432,"support_perbill":12750601,"approval":69.6078432,"support":1.2750601},{"time_hours":249,"approval_perbill":694852942,"support_perbill":12671499,"approval":69.4852942,"support":1.2671499},{"time_hours":250,"approval_perbill":693627452,"support_perbill":12593005,"approval":69.3627452,"support":1.2593005},{"time_hours":251,"approval_perbill":692401962,"support_perbill":12515111,"approval":69.2401962,"support":1.2515111},{"time_hours":252,"approval_perbill":691176471,"support_perbill":12437810,"approval":69.1176471,"support":1.243781},{"time_hours":253,"approval_perbill":689950981,"support_perbill":12361097,"approval":68.9950981,"support":1.2361097},{"time_hours":254,"approval_perbill":688725491,"support_perbill":12284964,"approval":68.8725491,"support":1.2284964},{"time_hours":255,"approval_perbill":687500001,"support_perbill":12209404,"approval":68.7500001,"support":1.2209404},{"time_hours":256,"approval_perbill":686274511,"support_perbill":12134411,"approval":68.6274511,"support":1.2134411},{"time_hours":257,"approval_perbill":685049020,"support_perbill":12059980,"approval":68.504902,"support":1.205998},{"time_hours":258,"approval_perbill":683823530,"support_perbill":11986103,"approval":68.382353,"support":1.1986103},{"time_hours":259,"approval_perbill":682598040,"support_perbill":11912774,"approval":68.259804,"support":1.1912774},{"time_hours":260,"approval_perbill":681372550,"support_perbill":11839987,"approval":68.137255,"support":1.1839987},{"time_hours":261,"approval_perbill":680147059,"support_perbill":11767737,"approval":68.0147059,"support":1.1767737},{"time_hours":262,"approval_perbill":678921569,"support_perbill":11696017,"approval":67.8921569,"support":1.1696017},{"time_hours":263,"approval_perbill":677696079,"support_perbill":11624822,"approval":67.7696079,"support":1.1624822},{"time_hours":264,"approval_perbill":676470589,"support_perbill":11554145,"approval":67.6470589,"support":1.1554145},{"time_hours":265,"approval_perbill":675245099,"support_perbill":11483982,"approval":67.5245099,"support":1.1483982},{"time_hours":266,"approval_perbill":674019609,"support_perbill":11414326,"approval":67.4019609,"support":1.1414326},{"time_hours":267,"approval_perbill":672794119,"support_perbill":11345173,"approval":67.2794119,"support":1.1345173},{"time_hours":268,"approval_perbill":671568629,"support_perbill":11276516,"approval":67.1568629,"support":1.1276516},{"time_hours":269,"approval_perbill":670343138,"support_perbill":11208351,"approval":67.0343138,"support":1.1208351},{"time_hours":270,"approval_perbill":669117648,"support_perbill":11140671,"approval":66.9117648,"support":1.1140671},{"time_hours":271,"approval_perbill":667892158,"support_perbill":11073473,"approval":66.7892158,"support":1.1073473},{"time_hours":272,"approval_perbill":666666668,"support_perbill":11006750,"approval":66.6666668,"support":1.100675},{"time_hours":273,"approval_perbill":665441177,"support_perbill":10940499,"approval":66.5441177,"support":1.0940499},{"time_hours":274,"approval_perbill":664215687,"support_perbill":10874713,"approval":66.4215687,"support":1.0874713},{"time_hours":275,"approval_perbill":662990197,"support_perbill":10809388,"approval":66.2990197,"support":1.0809388},{"time_hours":276,"approval_perbill":661764707,"support_perbill":10744519,"approval":66.1764707,"support":1.0744519},{"time_hours":277,"approval_perbill":660539217,"support_perbill":10680101,"approval":66.0539217,"support":1.0680101},{"time_hours":278,"approval_perbill":659313726,"support_perbill":10616130,"approval":65.9313726,"support":1.061613},{"time_hours":279,"approval_perbill":658088236,"support_perbill":10552601,"approval":65.8088236,"support":1.0552601},{"time_hours":280,"approval_perbill":656862746,"support_perbill":10489510,"approval":65.6862746,"support":1.048951},{"time_hours":281,"approval_perbill":655637256,"support_perbill":10426852,"approval":65.5637256,"support":1.0426852},{"time_hours":282,"approval_perbill":654411765,"support_perbill":10364622,"approval":65.4411765,"support":1.0364622},{"time_hours":283,"approval_perbill":653186275,"support_perbill":10302816,"approval":65.3186275,"support":1.0302816},{"time_hours":284,"approval_perbill":651960785,"support_perbill":10241430,"approval":65.1960785,"support":1.024143},{"time_hours":285,"approval_perbill":650735295,"support_perbill":10180459,"approval":65.0735295,"support":1.0180459},{"time_hours":286,"approval_perbill":649509804,"support_perbill":10119900,"approval":64.9509804,"support":1.01199},{"time_hours":287,"approval_perbill":648284314,"support_perbill":10059748,"approval":64.8284314,"support":1.0059748},{"time_hours":288,"approval_perbill":647058824,"support_perbill":10000000,"approval":64.7058824,"support":1},{"time_hours":289,"approval_perbill":645833334,"support_perbill":9940650,"approval":64.5833334,"support":0.994065},{"time_hours":290,"approval_perbill":644607844,"support_perbill":9881695,"approval":64.4607844,"support":0.9881695},{"time_hours":291,"approval_perbill":643382354,"support_perbill":9823132,"approval":64.3382354,"support":0.9823132},{"time_hours":292,"approval_perbill":642156864,"support_perbill":9764955,"approval":64.2156864,"support":0.9764955},{"time_hours":293,"approval_perbill":640931374,"support_perbill":9707163,"approval":64.0931374,"support":0.9707163},{"time_hours":294,"approval_perbill":639705883,"support_perbill":9649749,"approval":63.9705883,"support":0.9649749},{"time_hours":295,"approval_perbill":638480393,"support_perbill":9592712,"approval":63.8480393,"support":0.9592712},{"time_hours":296,"approval_perbill":637254903,"support_perbill":9536047,"approval":63.7254903,"support":0.9536047},{"time_hours":297,"approval_perbill":636029413,"support_perbill":9479751,"approval":63.6029413,"support":0.9479751},{"time_hours":298,"approval_perbill":634803923,"support_perbill":9423820,"approval":63.4803923,"support":0.942382},{"time_hours":299,"approval_perbill":633578432,"support_perbill":9368250,"approval":63.3578432,"support":0.936825},{"time_hours":300,"approval_perbill":632352942,"support_perbill":9313038,"approval":63.2352942,"support":0.9313038},{"time_hours":301,"approval_perbill":631127452,"support_perbill":9258181,"approval":63.1127452,"support":0.9258181},{"time_hours":302,"approval_perbill":629901962,"support_perbill":9203674,"approval":62.9901962,"support":0.9203674},{"time_hours":303,"approval_perbill":628676471,"support_perbill":9149516,"approval":62.8676471,"support":0.9149516},{"time_hours":304,"approval_perbill":627450981,"support_perbill":9095702,"approval":62.7450981,"support":0.9095702},{"time_hours":305,"approval_perbill":626225491,"support_perbill":9042230,"approval":62.6225491,"support":0.904223},{"time_hours":306,"approval_perbill":625000001,"support_perbill":8989095,"approval":62.5000001,"support":0.8989095},{"time_hours":307,"approval_perbill":623774510,"support_perbill":8936295,"approval":62.377451,"support":0.8936295},{"time_hours":308,"approval_perbill":622549020,"support_perbill":8883826,"approval":62.254902,"support":0.8883826},{"time_hours":309,"approval_perbill":621323530,"support_perbill":8831687,"approval":62.132353,"support":0.8831687},{"time_hours":310,"approval_perbill":620098040,"support_perbill":8779872,"approval":62.009804,"support":0.8779872},{"time_hours":311,"approval_perbill":618872549,"support_perbill":8728380,"approval":61.8872549,"support":0.872838},{"time_hours":312,"approval_perbill":617647059,"support_perbill":8677207,"approval":61.7647059,"support":0.8677207},{"time_hours":313,"approval_perbill":616421569,"support_perbill":8626351,"approval":61.6421569,"support":0.8626351},{"time_hours":314,"approval_perbill":615196079,"support_perbill":8575808,"approval":61.5196079,"support":0.8575808},{"time_hours":315,"approval_perbill":613970589,"support_perbill":8525576,"approval":61.3970589,"support":0.8525576},{"time_hours":316,"approval_perbill":612745099,"support_perbill":8475652,"approval":61.2745099,"support":0.8475652},{"time_hours":317,"approval_perbill":611519609,"support_perbill":8426032,"approval":61.1519609,"support":0.8426032},{"time_hours":318,"approval_perbill":610294119,"support_perbill":8376715,"approval":61.0294119,"support":0.8376715},{"time_hours":319,"approval_perbill":609068629,"support_perbill":8327697,"approval":60.9068629,"support":0.8327697},{"time_hours":320,"approval_perbill":607843138,"support_perbill":8278976,"approval":60.7843138,"support":0.8278976},{"time_hours":321,"approval_perbill":606617648,"support_perbill":8230549,"approval":60.6617648,"support":0.8230549},{"time_hours":322,"approval_perbill":605392158,"support_perbill":8182413,"approval":60.5392158,"support":0.8182413},{"time_hours":323,"approval_perbill":604166668,"support_perbill":8134566,"approval":60.4166668,"support":0.8134566},{"time_hours":324,"approval_perbill":602941177,"support_perbill":8087005,"approval":60.2941177,"support":0.8087005},{"time_hours":325,"approval_perbill":601715687,"support_perbill":8039727,"approval":60.1715687,"support":0.8039727},{"time_hours":326,"approval_perbill":600490197,"support_perbill":7992731,"approval":60.0490197,"support":0.7992731},{"time_hours":327,"approval_perbill":599264707,"support_perbill":7946013,"approval":59.9264707,"support":0.7946013},{"time_hours":328,"approval_perbill":598039216,"support_perbill":7899571,"approval":59.8039216,"support":0.7899571},{"time_hours":329,"approval_perbill":596813726,"support_perbill":7853403,"approval":59.6813726,"support":0.7853403},{"time_hours":330,"approval_perbill":595588236,"support_perbill":7807506,"approval":59.5588236,"support":0.7807506},{"time_hours":331,"approval_perbill":594362746,"support_perbill":7761878,"approval":59.4362746,"support":0.7761878},{"time_hours":332,"approval_perbill":593137255,"support_perbill":7716516,"approval":59.3137255,"support":0.7716516},{"time_hours":333,"approval_perbill":591911765,"support_perbill":7671418,"approval":59.1911765,"support":0.7671418},{"time_hours":334,"approval_perbill":590686275,"support_perbill":7626583,"approval":59.0686275,"support":0.7626583},{"time_hours":335,"approval_perbill":589460785,"support_perbill":7582007,"approval":58.9460785,"support":0.7582007},{"time_hours":336,"approval_perbill":588235295,"support_perbill":7537688,"approval":58.8235295,"support":0.7537688},{"time_hours":337,"approval_perbill":587009805,"support_perbill":7493624,"approval":58.7009805,"support":0.7493624},{"time_hours":338,"approval_perbill":585784315,"support_perbill":7449814,"approval":58.5784315,"support":0.7449814},{"time_hours":339,"approval_perbill":584558825,"support_perbill":7406254,"approval":58.4558825,"support":0.7406254},{"time_hours":340,"approval_perbill":583333335,"support_perbill":7362942,"approval":58.3333335,"support":0.7362942},{"time_hours":341,"approval_perbill":582107844,"support_perbill":7319878,"approval":58.2107844,"support":0.7319878},{"time_hours":342,"approval_perbill":580882354,"support_perbill":7277057,"approval":58.0882354,"support":0.7277057},{"time_hours":343,"approval_perbill":579656864,"support_perbill":7234479,"approval":57.9656864,"support":0.7234479},{"time_hours":344,"approval_perbill":578431374,"support_perbill":7192141,"approval":57.8431374,"support":0.7192141},{"time_hours":345,"approval_perbill":577205883,"support_perbill":7150041,"approval":57.7205883,"support":0.7150041},{"time_hours":346,"approval_perbill":575980393,"support_perbill":7108178,"approval":57.5980393,"support":0.7108178},{"time_hours":347,"approval_perbill":574754903,"support_perbill":7066548,"approval":57.4754903,"support":0.7066548},{"time_hours":348,"approval_perbill":573529413,"support_perbill":7025151,"approval":57.3529413,"support":0.7025151},{"time_hours":349,"approval_perbill":572303922,"support_perbill":6983985,"approval":57.2303922,"support":0.6983985},{"time_hours":350,"approval_perbill":571078432,"support_perbill":6943047,"approval":57.1078432,"support":0.6943047},{"time_hours":351,"approval_perbill":569852942,"support_perbill":6902335,"approval":56.9852942,"support":0.6902335},{"time_hours":352,"approval_perbill":568627452,"support_perbill":6861848,"approval":56.8627452,"support":0.6861848},{"time_hours":353,"approval_perbill":567401961,"support_perbill":6821584,"approval":56.7401961,"support":0.6821584},{"time_hours":354,"approval_perbill":566176471,"support_perbill":6781540,"approval":56.6176471,"support":0.678154},{"time_hours":355,"approval_perbill":564950981,"support_perbill":6741716,"approval":56.4950981,"support":0.6741716},{"time_hours":356,"approval_perbill":563725491,"support_perbill":6702109,"approval":56.3725491,"support":0.6702109},{"time_hours":357,"approval_perbill":562500000,"support_perbill":6662718,"approval":56.25,"support":0.6662718},{"time_hours":358,"approval_perbill":561274510,"support_perbill":6623541,"approval":56.127451,"support":0.6623541},{"time_hours":359,"approval_perbill":560049020,"support_perbill":6584575,"approval":56.004902,"support":0.6584575},{"time_hours":360,"approval_perbill":558823530,"support_perbill":6545820,"approval":55.882353,"support":0.654582},{"time_hours":361,"approval_perbill":557598040,"support_perbill":6507274,"approval":55.759804,"support":0.6507274},{"time_hours":362,"approval_perbill":556372550,"support_perbill":6468935,"approval":55.637255,"support":0.6468935},{"time_hours":363,"approval_perbill":555147060,"support_perbill":6430801,"approval":55.514706,"support":0.6430801},{"time_hours":364,"approval_perbill":553921570,"support_perbill":6392871,"approval":55.392157,"support":0.6392871},{"time_hours":365,"approval_perbill":552696080,"support_perbill":6355142,"approval":55.269608,"support":0.6355142},{"time_hours":366,"approval_perbill":551470589,"support_perbill":6317615,"approval":55.1470589,"support":0.6317615},{"time_hours":367,"approval_perbill":550245099,"support_perbill":6280286,"approval":55.0245099,"support":0.6280286},{"time_hours":368,"approval_perbill":549019609,"support_perbill":6243154,"approval":54.9019609,"support":0.6243154},{"time_hours":369,"approval_perbill":547794119,"support_perbill":6206218,"approval":54.7794119,"support":0.6206218},{"time_hours":370,"approval_perbill":546568628,"support_perbill":6169476,"approval":54.6568628,"support":0.6169476},{"time_hours":371,"approval_perbill":545343138,"support_perbill":6132927,"approval":54.5343138,"support":0.6132927},{"time_hours":372,"approval_perbill":544117648,"support_perbill":6096569,"approval":54.4117648,"support":0.6096569},{"time_hours":373,"approval_perbill":542892158,"support_perbill":6060401,"approval":54.2892158,"support":0.6060401},{"time_hours":374,"approval_perbill":541666667,"support_perbill":6024421,"approval":54.1666667,"support":0.6024421},{"time_hours":375,"approval_perbill":540441177,"support_perbill":5988627,"approval":54.0441177,"support":0.5988627},{"time_hours":376,"approval_perbill":539215687,"support_perbill":5953019,"approval":53.9215687,"support":0.5953019},{"time_hours":377,"approval_perbill":537990197,"support_perbill":5917595,"approval":53.7990197,"support":0.5917595},{"time_hours":378,"approval_perbill":536764706,"support_perbill":5882353,"approval":53.6764706,"support":0.5882353},{"time_hours":379,"approval_perbill":535539216,"support_perbill":5847292,"approval":53.5539216,"support":0.5847292},{"time_hours":380,"approval_perbill":534313726,"support_perbill":5812410,"approval":53.4313726,"support":0.581241},{"time_hours":381,"approval_perbill":533088236,"support_perbill":5777707,"approval":53.3088236,"support":0.5777707},{"time_hours":382,"approval_perbill":531862746,"support_perbill":5743181,"approval":53.1862746,"support":0.5743181},{"time_hours":383,"approval_perbill":530637255,"support_perbill":5708830,"approval":53.0637255,"support":0.570883},{"time_hours":384,"approval_perbill":529411765,"support_perbill":5674653,"approval":52.9411765,"support":0.5674653},{"time_hours":385,"approval_perbill":528186275,"support_perbill":5640649,"approval":52.8186275,"support":0.5640649},{"time_hours":386,"approval_perbill":526960785,"support_perbill":5606817,"approval":52.6960785,"support":0.5606817},{"time_hours":387,"approval_perbill":525735295,"support_perbill":5573155,"approval":52.5735295,"support":0.5573155},{"time_hours":388,"approval_perbill":524509805,"support_perbill":5539662,"approval":52.4509805,"support":0.5539662},{"time_hours":389,"approval_perbill":523284315,"support_perbill":5506336,"approval":52.3284315,"support":0.5506336},{"time_hours":390,"approval_perbill":522058825,"support_perbill":5473177,"approval":52.2058825,"support":0.5473177},{"time_hours":391,"approval_perbill":520833334,"support_perbill":5440183,"approval":52.0833334,"support":0.5440183},{"time_hours":392,"approval_perbill":519607844,"support_perbill":5407354,"approval":51.9607844,"support":0.5407354},{"time_hours":393,"approval_perbill":518382354,"support_perbill":5374687,"approval":51.8382354,"support":0.5374687},{"time_hours":394,"approval_perbill":517156864,"support_perbill":5342181,"approval":51.7156864,"support":0.5342181},{"time_hours":395,"approval_perbill":515931373,"support_perbill":5309836,"approval":51.5931373,"support":0.5309836},{"time_hours":396,"approval_perbill":514705883,"support_perbill":5277650,"approval":51.4705883,"support":0.527765},{"time_hours":397,"approval_perbill":513480393,"support_perbill":5245622,"approval":51.3480393,"support":0.5245622},{"time_hours":398,"approval_perbill":512254903,"support_perbill":5213751,"approval":51.2254903,"support":0.5213751},{"time_hours":399,"approval_perbill":511029412,"support_perbill":5182035,"approval":51.1029412,"support":0.5182035},{"time_hours":400,"approval_perbill":509803922,"support_perbill":5150474,"approval":50.9803922,"support":0.5150474},{"time_hours":401,"approval_perbill":508578432,"support_perbill":5119067,"approval":50.8578432,"support":0.5119067},{"time_hours":402,"approval_perbill":507352942,"support_perbill":5087812,"approval":50.7352942,"support":0.5087812},{"time_hours":403,"approval_perbill":506127452,"support_perbill":5056708,"approval":50.6127452,"support":0.5056708},{"time_hours":404,"approval_perbill":504901961,"support_perbill":5025754,"approval":50.4901961,"support":0.5025754},{"time_hours":405,"approval_perbill":503676471,"support_perbill":4994949,"approval":50.3676471,"support":0.4994949},{"time_hours":406,"approval_perbill":502450981,"support_perbill":4964292,"approval":50.2450981,"support":0.4964292},{"time_hours":407,"approval_perbill":501225491,"support_perbill":4933782,"approval":50.1225491,"support":0.4933782},{"time_hours":408,"approval_perbill":500000000,"support_perbill":4903417,"approval":50,"support":0.4903417},{"time_hours":409,"approval_perbill":500000000,"support_perbill":4873198,"approval":50,"support":0.4873198},{"time_hours":410,"approval_perbill":500000000,"support_perbill":4843122,"approval":50,"support":0.4843122},{"time_hours":411,"approval_perbill":500000000,"support_perbill":4813189,"approval":50,"support":0.4813189},{"time_hours":412,"approval_perbill":500000000,"support_perbill":4783398,"approval":50,"support":0.4783398},{"time_hours":413,"approval_perbill":500000000,"support_perbill":4753747,"approval":50,"support":0.4753747},{"time_hours":414,"approval_perbill":500000000,"support_perbill":4724236,"approval":50,"support":0.4724236},{"time_hours":415,"approval_perbill":500000000,"support_perbill":4694864,"approval":50,"support":0.4694864},{"time_hours":416,"approval_perbill":500000000,"support_perbill":4665630,"approval":50,"support":0.466563},{"time_hours":417,"approval_perbill":500000000,"support_perbill":4636532,"approval":50,"support":0.4636532},{"time_hours":418,"approval_perbill":500000000,"support_perbill":4607570,"approval":50,"support":0.460757},{"time_hours":419,"approval_perbill":500000000,"support_perbill":4578743,"approval":50,"support":0.4578743},{"time_hours":420,"approval_perbill":500000000,"support_perbill":4550050,"approval":50,"support":0.455005},{"time_hours":421,"approval_perbill":500000000,"support_perbill":4521490,"approval":50,"support":0.452149},{"time_hours":422,"approval_perbill":500000000,"support_perbill":4493062,"approval":50,"support":0.4493062},{"time_hours":423,"approval_perbill":500000000,"support_perbill":4464766,"approval":50,"support":0.4464766},{"time_hours":424,"approval_perbill":500000000,"support_perbill":4436599,"approval":50,"support":0.4436599},{"time_hours":425,"approval_perbill":500000000,"support_perbill":4408562,"approval":50,"support":0.4408562},{"time_hours":426,"approval_perbill":500000000,"support_perbill":4380654,"approval":50,"support":0.4380654},{"time_hours":427,"approval_perbill":500000000,"support_perbill":4352873,"approval":50,"support":0.4352873},{"time_hours":428,"approval_perbill":500000000,"support_perbill":4325218,"approval":50,"support":0.4325218},{"time_hours":429,"approval_perbill":500000000,"support_perbill":4297690,"approval":50,"support":0.429769},{"time_hours":430,"approval_perbill":500000000,"support_perbill":4270287,"approval":50,"support":0.4270287},{"time_hours":431,"approval_perbill":500000000,"support_perbill":4243007,"approval":50,"support":0.4243007},{"time_hours":432,"approval_perbill":500000000,"support_perbill":4215851,"approval":50,"support":0.4215851},{"time_hours":433,"approval_perbill":500000000,"support_perbill":4188818,"approval":50,"support":0.4188818},{"time_hours":434,"approval_perbill":500000000,"support_perbill":4161906,"approval":50,"support":0.4161906},{"time_hours":435,"approval_perbill":500000000,"support_perbill":4135115,"approval":50,"support":0.4135115},{"time_hours":436,"approval_perbill":500000000,"support_perbill":4108444,"approval":50,"support":0.4108444},{"time_hours":437,"approval_perbill":500000000,"support_perbill":4081892,"approval":50,"support":0.4081892},{"time_hours":438,"approval_perbill":500000000,"support_perbill":4055459,"approval":50,"support":0.4055459},{"time_hours":439,"approval_perbill":500000000,"support_perbill":4029143,"approval":50,"support":0.4029143},{"time_hours":440,"approval_perbill":500000000,"support_perbill":4002944,"approval":50,"support":0.4002944},{"time_hours":441,"approval_perbill":500000000,"support_perbill":3976862,"approval":50,"support":0.3976862},{"time_hours":442,"approval_perbill":500000000,"support_perbill":3950894,"approval":50,"support":0.3950894},{"time_hours":443,"approval_perbill":500000000,"support_perbill":3925041,"approval":50,"support":0.3925041},{"time_hours":444,"approval_perbill":500000000,"support_perbill":3899302,"approval":50,"support":0.3899302},{"time_hours":445,"approval_perbill":500000000,"support_perbill":3873676,"approval":50,"support":0.3873676},{"time_hours":446,"approval_perbill":500000000,"support_perbill":3848162,"approval":50,"support":0.3848162},{"time_hours":447,"approval_perbill":500000000,"support_perbill":3822760,"approval":50,"support":0.382276},{"time_hours":448,"approval_perbill":500000000,"support_perbill":3797468,"approval":50,"support":0.3797468},{"time_hours":449,"approval_perbill":500000000,"support_perbill":3772287,"approval":50,"support":0.3772287},{"time_hours":450,"approval_perbill":500000000,"support_perbill":3747215,"approval":50,"support":0.3747215},{"time_hours":451,"approval_perbill":500000000,"support_perbill":3722251,"approval":50,"support":0.3722251},{"time_hours":452,"approval_perbill":500000000,"support_perbill":3697396,"approval":50,"support":0.3697396},{"time_hours":453,"approval_perbill":500000000,"support_perbill":3672648,"approval":50,"support":0.3672648},{"time_hours":454,"approval_perbill":500000000,"support_perbill":3648006,"approval":50,"support":0.3648006},{"time_hours":455,"approval_perbill":500000000,"support_perbill":3623471,"approval":50,"support":0.3623471},{"time_hours":456,"approval_perbill":500000000,"support_perbill":3599040,"approval":50,"support":0.359904},{"time_hours":457,"approval_perbill":500000000,"support_perbill":3574714,"approval":50,"support":0.3574714},{"time_hours":458,"approval_perbill":500000000,"support_perbill":3550492,"approval":50,"support":0.3550492},{"time_hours":459,"approval_perbill":500000000,"support_perbill":3526373,"approval":50,"support":0.3526373},{"time_hours":460,"approval_perbill":500000000,"support_perbill":3502357,"approval":50,"support":0.3502357},{"time_hours":461,"approval_perbill":500000000,"support_perbill":3478442,"approval":50,"support":0.3478442},{"time_hours":462,"approval_perbill":500000000,"support_perbill":3454629,"approval":50,"support":0.3454629},{"time_hours":463,"approval_perbill":500000000,"support_perbill":3430916,"approval":50,"support":0.3430916},{"time_hours":464,"approval_perbill":500000000,"support_perbill":3407304,"approval":50,"support":0.3407304},{"time_hours":465,"approval_perbill":500000000,"support_perbill":3383790,"approval":50,"support":0.338379},{"time_hours":466,"approval_perbill":500000000,"support_perbill":3360376,"approval":50,"support":0.3360376},{"time_hours":467,"approval_perbill":500000000,"support_perbill":3337059,"approval":50,"support":0.3337059},{"time_hours":468,"approval_perbill":500000000,"support_perbill":3313840,"approval":50,"support":0.331384},{"time_hours":469,"approval_perbill":500000000,"support_perbill":3290718,"approval":50,"support":0.3290718},{"time_hours":470,"approval_perbill":500000000,"support_perbill":3267692,"approval":50,"support":0.3267692},{"time_hours":471,"approval_perbill":500000000,"support_perbill":3244761,"approval":50,"support":0.3244761},{"time_hours":472,"approval_perbill":500000000,"support_perbill":3221926,"approval":50,"support":0.3221926},{"time_hours":473,"approval_perbill":500000000,"support_perbill":3199185,"approval":50,"support":0.3199185},{"time_hours":474,"approval_perbill":500000000,"support_perbill":3176538,"approval":50,"support":0.3176538},{"time_hours":475,"approval_perbill":500000000,"support_perbill":3153985,"approval":50,"support":0.3153985},{"time_hours":476,"approval_perbill":500000000,"support_perbill":3131524,"approval":50,"support":0.3131524},{"time_hours":477,"approval_perbill":500000000,"support_perbill":3109155,"approval":50,"support":0.3109155},{"time_hours":478,"approval_perbill":500000000,"support_perbill":3086878,"approval":50,"support":0.3086878},{"time_hours":479,"approval_perbill":500000000,"support_perbill":3064692,"approval":50,"support":0.3064692},{"time_hours":480,"approval_perbill":500000000,"support_perbill":3042596,"approval":50,"support":0.3042596},{"time_hours":481,"approval_perbill":500000000,"support_perbill":3020590,"approval":50,"support":0.302059},{"time_hours":482,"approval_perbill":500000000,"support_perbill":2998674,"approval":50,"support":0.2998674},{"time_hours":483,"approval_perbill":500000000,"support_perbill":2976847,"approval":50,"support":0.2976847},{"time_hours":484,"approval_perbill":500000000,"support_perbill":2955107,"approval":50,"support":0.2955107},{"time_hours":485,"approval_perbill":500000000,"support_perbill":2933456,"approval":50,"support":0.2933456},{"time_hours":486,"approval_perbill":500000000,"support_perbill":2911892,"approval":50,"support":0.2911892},{"time_hours":487,"approval_perbill":500000000,"support_perbill":2890414,"approval":50,"support":0.2890414},{"time_hours":488,"approval_perbill":500000000,"support_perbill":2869023,"approval":50,"support":0.2869023},{"time_hours":489,"approval_perbill":500000000,"support_perbill":2847717,"approval":50,"support":0.2847717},{"time_hours":490,"approval_perbill":500000000,"support_perbill":2826496,"approval":50,"support":0.2826496},{"time_hours":491,"approval_perbill":500000000,"support_perbill":2805360,"approval":50,"support":0.280536},{"time_hours":492,"approval_perbill":500000000,"support_perbill":2784309,"approval":50,"support":0.2784309},{"time_hours":493,"approval_perbill":500000000,"support_perbill":2763341,"approval":50,"support":0.2763341},{"time_hours":494,"approval_perbill":500000000,"support_perbill":2742455,"approval":50,"support":0.2742455},{"time_hours":495,"approval_perbill":500000000,"support_perbill":2721653,"approval":50,"support":0.2721653},{"time_hours":496,"approval_perbill":500000000,"support_perbill":2700933,"approval":50,"support":0.2700933},{"time_hours":497,"approval_perbill":500000000,"support_perbill":2680294,"approval":50,"support":0.2680294},{"time_hours":498,"approval_perbill":500000000,"support_perbill":2659737,"approval":50,"support":0.2659737},{"time_hours":499,"approval_perbill":500000000,"support_perbill":2639260,"approval":50,"support":0.263926},{"time_hours":500,"approval_perbill":500000000,"support_perbill":2618864,"approval":50,"support":0.2618864},{"time_hours":501,"approval_perbill":500000000,"support_perbill":2598547,"approval":50,"support":0.2598547},{"time_hours":502,"approval_perbill":500000000,"support_perbill":2578310,"approval":50,"support":0.257831},{"time_hours":503,"approval_perbill":500000000,"support_perbill":2558151,"approval":50,"support":0.2558151},{"time_hours":504,"approval_perbill":500000000,"support_perbill":2538071,"approval":50,"support":0.2538071},{"time_hours":505,"approval_perbill":500000000,"support_perbill":2518069,"approval":50,"support":0.2518069},{"time_hours":506,"approval_perbill":500000000,"support_perbill":2498144,"approval":50,"support":0.2498144},{"time_hours":507,"approval_perbill":500000000,"support_perbill":2478296,"approval":50,"support":0.2478296},{"time_hours":508,"approval_perbill":500000000,"support_perbill":2458525,"approval":50,"support":0.2458525},{"time_hours":509,"approval_perbill":500000000,"support_perbill":2438830,"approval":50,"support":0.243883},{"time_hours":510,"approval_perbill":500000000,"support_perbill":2419210,"approval":50,"support":0.241921},{"time_hours":511,"approval_perbill":500000000,"support_perbill":2399666,"approval":50,"support":0.2399666},{"time_hours":512,"approval_perbill":500000000,"support_perbill":2380197,"approval":50,"support":0.2380197},{"time_hours":513,"approval_perbill":500000000,"support_perbill":2360802,"approval":50,"support":0.2360802},{"time_hours":514,"approval_perbill":500000000,"support_perbill":2341481,"approval":50,"support":0.2341481},{"time_hours":515,"approval_perbill":500000000,"support_perbill":2322233,"approval":50,"support":0.2322233},{"time_hours":516,"approval_perbill":500000000,"support_perbill":2303059,"approval":50,"support":0.2303059},{"time_hours":517,"approval_perbill":500000000,"support_perbill":2283957,"approval":50,"support":0.2283957},{"time_hours":518,"approval_perbill":500000000,"support_perbill":2264928,"approval":50,"support":0.2264928},{"time_hours":519,"approval_perbill":500000000,"support_perbill":2245970,"approval":50,"support":0.224597},{"time_hours":520,"approval_perbill":500000000,"support_perbill":2227084,"approval":50,"support":0.2227084},{"time_hours":521,"approval_perbill":500000000,"support_perbill":2208269,"approval":50,"support":0.2208269},{"time_hours":522,"approval_perbill":500000000,"support_perbill":2189525,"approval":50,"support":0.2189525},{"time_hours":523,"approval_perbill":500000000,"support_perbill":2170851,"approval":50,"support":0.2170851},{"time_hours":524,"approval_perbill":500000000,"support_perbill":2152247,"approval":50,"support":0.2152247},{"time_hours":525,"approval_perbill":500000000,"support_perbill":2133712,"approval":50,"support":0.2133712},{"time_hours":526,"approval_perbill":500000000,"support_perbill":2115247,"approval":50,"support":0.2115247},{"time_hours":527,"approval_perbill":500000000,"support_perbill":2096850,"approval":50,"support":0.209685},{"time_hours":528,"approval_perbill":500000000,"support_perbill":2078522,"approval":50,"support":0.2078522},{"time_hours":529,"approval_perbill":500000000,"support_perbill":2060261,"approval":50,"support":0.2060261},{"time_hours":530,"approval_perbill":500000000,"support_perbill":2042068,"approval":50,"support":0.2042068},{"time_hours":531,"approval_perbill":500000000,"support_perbill":2023943,"approval":50,"support":0.2023943},{"time_hours":532,"approval_perbill":500000000,"support_perbill":2005884,"approval":50,"support":0.2005884},{"time_hours":533,"approval_perbill":500000000,"support_perbill":1987891,"approval":50,"support":0.1987891},{"time_hours":534,"approval_perbill":500000000,"support_perbill":1969965,"approval":50,"support":0.1969965},{"time_hours":535,"approval_perbill":500000000,"support_perbill":1952104,"approval":50,"support":0.1952104},{"time_hours":536,"approval_perbill":500000000,"support_perbill":1934309,"approval":50,"support":0.1934309},{"time_hours":537,"approval_perbill":500000000,"support_perbill":1916579,"approval":50,"support":0.1916579},{"time_hours":538,"approval_perbill":500000000,"support_perbill":1898913,"approval":50,"support":0.1898913},{"time_hours":539,"approval_perbill":500000000,"support_perbill":1881312,"approval":50,"support":0.1881312},{"time_hours":540,"approval_perbill":500000000,"support_perbill":1863775,"approval":50,"support":0.1863775},{"time_hours":541,"approval_perbill":500000000,"support_perbill":1846301,"approval":50,"support":0.1846301},{"time_hours":542,"approval_perbill":500000000,"support_perbill":1828891,"approval":50,"support":0.1828891},{"time_hours":543,"approval_perbill":500000000,"support_perbill":1811543,"approval":50,"support":0.1811543},{"time_hours":544,"approval_perbill":500000000,"support_perbill":1794258,"approval":50,"support":0.1794258},{"time_hours":545,"approval_perbill":500000000,"support_perbill":1777036,"approval":50,"support":0.1777036},{"time_hours":546,"approval_perbill":500000000,"support_perbill":1759875,"approval":50,"support":0.1759875},{"time_hours":547,"approval_perbill":500000000,"support_perbill":1742775,"approval":50,"support":0.1742775},{"time_hours":548,"approval_perbill":500000000,"support_perbill":1725737,"approval":50,"support":0.1725737},{"time_hours":549,"approval_perbill":500000000,"support_perbill":1708760,"approval":50,"support":0.170876},{"time_hours":550,"approval_perbill":500000000,"support_perbill":1691844,"approval":50,"support":0.1691844},{"time_hours":551,"approval_perbill":500000000,"support_perbill":1674988,"approval":50,"support":0.1674988},{"time_hours":552,"approval_perbill":500000000,"support_perbill":1658191,"approval":50,"support":0.1658191},{"time_hours":553,"approval_perbill":500000000,"support_perbill":1641455,"approval":50,"support":0.1641455},{"time_hours":554,"approval_perbill":500000000,"support_perbill":1624777,"approval":50,"support":0.1624777},{"time_hours":555,"approval_perbill":500000000,"support_perbill":1608159,"approval":50,"support":0.1608159},{"time_hours":556,"approval_perbill":500000000,"support_perbill":1591599,"approval":50,"support":0.1591599},{"time_hours":557,"approval_perbill":500000000,"support_perbill":1575098,"approval":50,"support":0.1575098},{"time_hours":558,"approval_perbill":500000000,"support_perbill":1558654,"approval":50,"support":0.1558654},{"time_hours":559,"approval_perbill":500000000,"support_perbill":1542269,"approval":50,"support":0.1542269},{"time_hours":560,"approval_perbill":500000000,"support_perbill":1525941,"approval":50,"support":0.1525941},{"time_hours":561,"approval_perbill":500000000,"support_perbill":1509670,"approval":50,"support":0.150967},{"time_hours":562,"approval_perbill":500000000,"support_perbill":1493456,"approval":50,"support":0.1493456},{"time_hours":563,"approval_perbill":500000000,"support_perbill":1477298,"approval":50,"support":0.1477298},{"time_hours":564,"approval_perbill":500000000,"support_perbill":1461197,"approval":50,"support":0.1461197},{"time_hours":565,"approval_perbill":500000000,"support_perbill":1445152,"approval":50,"support":0.1445152},{"time_hours":566,"approval_perbill":500000000,"support_perbill":1429162,"approval":50,"support":0.1429162},{"time_hours":567,"approval_perbill":500000000,"support_perbill":1413228,"approval":50,"support":0.1413228},{"time_hours":568,"approval_perbill":500000000,"support_perbill":1397348,"approval":50,"support":0.1397348},{"time_hours":569,"approval_perbill":500000000,"support_perbill":1381524,"approval":50,"support":0.1381524},{"time_hours":570,"approval_perbill":500000000,"support_perbill":1365754,"approval":50,"support":0.1365754},{"time_hours":571,"approval_perbill":500000000,"support_perbill":1350039,"approval":50,"support":0.1350039},{"time_hours":572,"approval_perbill":500000000,"support_perbill":1334377,"approval":50,"support":0.1334377},{"time_hours":573,"approval_perbill":500000000,"support_perbill":1318769,"approval":50,"support":0.1318769},{"time_hours":574,"approval_perbill":500000000,"support_perbill":1303214,"approval":50,"support":0.1303214},{"time_hours":575,"approval_perbill":500000000,"support_perbill":1287713,"approval":50,"support":0.1287713},{"time_hours":576,"approval_perbill":500000000,"support_perbill":1272264,"approval":50,"support":0.1272264},{"time_hours":577,"approval_perbill":500000000,"support_perbill":1256869,"approval":50,"support":0.1256869},{"time_hours":578,"approval_perbill":500000000,"support_perbill":1241525,"approval":50,"support":0.1241525},{"time_hours":579,"approval_perbill":500000000,"support_perbill":1226233,"approval":50,"support":0.1226233},{"time_hours":580,"approval_perbill":500000000,"support_perbill":1210994,"approval":50,"support":0.1210994},{"time_hours":581,"approval_perbill":500000000,"support_perbill":1195805,"approval":50,"support":0.1195805},{"time_hours":582,"approval_perbill":500000000,"support_perbill":1180668,"approval":50,"support":0.1180668},{"time_hours":583,"approval_perbill":500000000,"support_perbill":1165582,"approval":50,"support":0.1165582},{"time_hours":584,"approval_perbill":500000000,"support_perbill":1150547,"approval":50,"support":0.1150547},{"time_hours":585,"approval_perbill":500000000,"support_perbill":1135563,"approval":50,"support":0.1135563},{"time_hours":586,"approval_perbill":500000000,"support_perbill":1120628,"approval":50,"support":0.1120628},{"time_hours":587,"approval_perbill":500000000,"support_perbill":1105744,"approval":50,"support":0.1105744},{"time_hours":588,"approval_perbill":500000000,"support_perbill":1090909,"approval":50,"support":0.1090909},{"time_hours":589,"approval_perbill":500000000,"support_perbill":1076124,"approval":50,"support":0.1076124},{"time_hours":590,"approval_perbill":500000000,"support_perbill":1061388,"approval":50,"support":0.1061388},{"time_hours":591,"approval_perbill":500000000,"support_perbill":1046701,"approval":50,"support":0.1046701},{"time_hours":592,"approval_perbill":500000000,"support_perbill":1032063,"approval":50,"support":0.1032063},{"time_hours":593,"approval_perbill":500000000,"support_perbill":1017473,"approval":50,"support":0.1017473},{"time_hours":594,"approval_perbill":500000000,"support_perbill":1002932,"approval":50,"support":0.1002932},{"time_hours":595,"approval_perbill":500000000,"support_perbill":988438,"approval":50,"support":0.0988438},{"time_hours":596,"approval_perbill":500000000,"support_perbill":973993,"approval":50,"support":0.0973993},{"time_hours":597,"approval_perbill":500000000,"support_perbill":959595,"approval":50,"support":0.0959595},{"time_hours":598,"approval_perbill":500000000,"support_perbill":945244,"approval":50,"support":0.0945244},{"time_hours":599,"approval_perbill":500000000,"support_perbill":930940,"approval":50,"support":0.093094},{"time_hours":600,"approval_perbill":500000000,"support_perbill":916684,"approval":50,"support":0.0916684},{"time_hours":601,"approval_perbill":500000000,"support_perbill":902473,"approval":50,"support":0.0902473},{"time_hours":602,"approval_perbill":500000000,"support_perbill":888310,"approval":50,"support":0.088831},{"time_hours":603,"approval_perbill":500000000,"support_perbill":874192,"approval":50,"support":0.0874192},{"time_hours":604,"approval_perbill":500000000,"support_perbill":860121,"approval":50,"support":0.0860121},{"time_hours":605,"approval_perbill":500000000,"support_perbill":846095,"approval":50,"support":0.0846095},{"time_hours":606,"approval_perbill":500000000,"support_perbill":832114,"approval":50,"support":0.0832114},{"time_hours":607,"approval_perbill":500000000,"support_perbill":818179,"approval":50,"support":0.0818179},{"time_hours":608,"approval_perbill":500000000,"support_perbill":804289,"approval":50,"support":0.0804289},{"time_hours":609,"approval_perbill":500000000,"support_perbill":790444,"approval":50,"support":0.0790444},{"time_hours":610,"approval_perbill":500000000,"support_perbill":776644,"approval":50,"support":0.0776644},{"time_hours":611,"approval_perbill":500000000,"support_perbill":762888,"approval":50,"support":0.0762888},{"time_hours":612,"approval_perbill":500000000,"support_perbill":749176,"approval":50,"support":0.0749176},{"time_hours":613,"approval_perbill":500000000,"support_perbill":735508,"approval":50,"support":0.0735508},{"time_hours":614,"approval_perbill":500000000,"support_perbill":721884,"approval":50,"support":0.0721884},{"time_hours":615,"approval_perbill":500000000,"support_perbill":708303,"approval":50,"support":0.0708303},{"time_hours":616,"approval_perbill":500000000,"support_perbill":694766,"approval":50,"support":0.0694766},{"time_hours":617,"approval_perbill":500000000,"support_perbill":681272,"approval":50,"support":0.0681272},{"time_hours":618,"approval_perbill":500000000,"support_perbill":667821,"approval":50,"support":0.0667821},{"time_hours":619,"approval_perbill":500000000,"support_perbill":654412,"approval":50,"support":0.0654412},{"time_hours":620,"approval_perbill":500000000,"support_perbill":641047,"approval":50,"support":0.0641047},{"time_hours":621,"approval_perbill":500000000,"support_perbill":627723,"approval":50,"support":0.0627723},{"time_hours":622,"approval_perbill":500000000,"support_perbill":614442,"approval":50,"support":0.0614442},{"time_hours":623,"approval_perbill":500000000,"support_perbill":601202,"approval":50,"support":0.0601202},{"time_hours":624,"approval_perbill":500000000,"support_perbill":588005,"approval":50,"support":0.0588005},{"time_hours":625,"approval_perbill":500000000,"support_perbill":574848,"approval":50,"support":0.0574848},{"time_hours":626,"approval_perbill":500000000,"support_perbill":561734,"approval":50,"support":0.0561734},{"time_hours":627,"approval_perbill":500000000,"support_perbill":548660,"approval":50,"support":0.054866},{"time_hours":628,"approval_perbill":500000000,"support_perbill":535627,"approval":50,"support":0.0535627},{"time_hours":629,"approval_perbill":500000000,"support_perbill":522635,"approval":50,"support":0.0522635},{"time_hours":630,"approval_perbill":500000000,"support_perbill":509684,"approval":50,"support":0.0509684},{"time_hours":631,"approval_perbill":500000000,"support_perbill":496773,"approval":50,"support":0.0496773},{"time_hours":632,"approval_perbill":500000000,"support_perbill":483902,"approval":50,"support":0.0483902},{"time_hours":633,"approval_perbill":500000000,"support_perbill":471071,"approval":50,"support":0.0471071},{"time_hours":634,"approval_perbill":500000000,"support_perbill":458280,"approval":50,"support":0.045828},{"time_hours":635,"approval_perbill":500000000,"support_perbill":445529,"approval":50,"support":0.0445529},{"time_hours":636,"approval_perbill":500000000,"support_perbill":432817,"approval":50,"support":0.0432817},{"time_hours":637,"approval_perbill":500000000,"support_perbill":420144,"approval":50,"support":0.0420144},{"time_hours":638,"approval_perbill":500000000,"support_perbill":407511,"approval":50,"support":0.0407511},{"time_hours":639,"approval_perbill":500000000,"support_perbill":394916,"approval":50,"support":0.0394916},{"time_hours":640,"approval_perbill":500000000,"support_perbill":382360,"approval":50,"support":0.038236},{"time_hours":641,"approval_perbill":500000000,"support_perbill":369843,"approval":50,"support":0.0369843},{"time_hours":642,"approval_perbill":500000000,"support_perbill":357364,"approval":50,"support":0.0357364},{"time_hours":643,"approval_perbill":500000000,"support_perbill":344923,"approval":50,"support":0.0344923},{"time_hours":644,"approval_perbill":500000000,"support_perbill":332520,"approval":50,"support":0.033252},{"time_hours":645,"approval_perbill":500000000,"support_perbill":320155,"approval":50,"support":0.0320155},{"time_hours":646,"approval_perbill":500000000,"support_perbill":307828,"approval":50,"support":0.0307828},{"time_hours":647,"approval_perbill":500000000,"support_perbill":295538,"approval":50,"support":0.0295538},{"time_hours":648,"approval_perbill":500000000,"support_perbill":283286,"approval":50,"support":0.0283286},{"time_hours":649,"approval_perbill":500000000,"support_perbill":271071,"approval":50,"support":0.0271071},{"time_hours":650,"approval_perbill":500000000,"support_perbill":258892,"approval":50,"support":0.0258892},{"time_hours":651,"approval_perbill":500000000,"support_perbill":246751,"approval":50,"support":0.0246751},{"time_hours":652,"approval_perbill":500000000,"support_perbill":234646,"approval":50,"support":0.0234646},{"time_hours":653,"approval_perbill":500000000,"support_perbill":222578,"approval":50,"support":0.0222578},{"time_hours":654,"approval_perbill":500000000,"support_perbill":210546,"approval":50,"support":0.0210546},{"time_hours":655,"approval_perbill":500000000,"support_perbill":198550,"approval":50,"support":0.019855},{"time_hours":656,"approval_perbill":500000000,"support_perbill":186590,"approval":50,"support":0.018659},{"time_hours":657,"approval_perbill":500000000,"support_perbill":174666,"approval":50,"support":0.0174666},{"time_hours":658,"approval_perbill":500000000,"support_perbill":162778,"approval":50,"support":0.0162778},{"time_hours":659,"approval_perbill":500000000,"support_perbill":150925,"approval":50,"support":0.0150925},{"time_hours":660,"approval_perbill":500000000,"support_perbill":139108,"approval":50,"support":0.0139108},{"time_hours":661,"approval_perbill":500000000,"support_perbill":127326,"approval":50,"support":0.0127326},{"time_hours":662,"approval_perbill":500000000,"support_perbill":115578,"approval":50,"support":0.0115578},{"time_hours":663,"approval_perbill":500000000,"support_perbill":103866,"approval":50,"support":0.0103866},{"time_hours":664,"approval_perbill":500000000,"support_perbill":92188,"approval":50,"support":0.0092188},{"time_hours":665,"approval_perbill":500000000,"support_perbill":80545,"approval":50,"support":0.0080545},{"time_hours":666,"approval_perbill":500000000,"support_perbill":68937,"approval":50,"support":0.0068937},{"time_hours":667,"approval_perbill":500000000,"support_perbill":57363,"approval":50,"support":0.0057363},{"time_hours":668,"approval_perbill":500000000,"support_perbill":45822,"approval":50,"support":0.0045822},{"time_hours":669,"approval_perbill":500000000,"support_perbill":34316,"approval":50,"support":0.0034316},{"time_hours":670,"approval_perbill":500000000,"support_perbill":22844,"approval":50,"support":0.0022844},{"time_hours":671,"approval_perbill":500000000,"support_perbill":11405,"approval":50,"support":0.0011405},{"time_hours":672,"approval_perbill":500000000,"support_perbill":0,"approval":50,"support":0}]')},37329:p=>{"use strict";p.exports=JSON.parse('[{"time_hours":0,"approval_perbill":1000000000,"support_perbill":500000008,"approval":100,"support":50.0000008},{"time_hours":1,"approval_perbill":999255953,"support_perbill":485809452,"approval":99.9255953,"support":48.5809452},{"time_hours":2,"approval_perbill":998511905,"support_perbill":472363240,"approval":99.8511905,"support":47.236324},{"time_hours":3,"approval_perbill":997767858,"support_perbill":459604303,"approval":99.7767858,"support":45.9604303},{"time_hours":4,"approval_perbill":997023810,"support_perbill":447481262,"approval":99.702381,"support":44.7481262},{"time_hours":5,"approval_perbill":996279762,"support_perbill":435947725,"approval":99.6279762,"support":43.5947725},{"time_hours":6,"approval_perbill":995535715,"support_perbill":424961730,"approval":99.5535715,"support":42.496173},{"time_hours":7,"approval_perbill":994791667,"support_perbill":414485182,"approval":99.4791667,"support":41.4485182},{"time_hours":8,"approval_perbill":994047620,"support_perbill":404483449,"approval":99.404762,"support":40.4483449},{"time_hours":9,"approval_perbill":993303572,"support_perbill":394924960,"approval":99.3303572,"support":39.492496},{"time_hours":10,"approval_perbill":992559524,"support_perbill":385780901,"approval":99.2559524,"support":38.5780901},{"time_hours":11,"approval_perbill":991815477,"support_perbill":377024885,"approval":99.1815477,"support":37.7024885},{"time_hours":12,"approval_perbill":991071429,"support_perbill":368632725,"approval":99.1071429,"support":36.8632725},{"time_hours":13,"approval_perbill":990327381,"support_perbill":360582198,"approval":99.0327381,"support":36.0582198},{"time_hours":14,"approval_perbill":989583334,"support_perbill":352852868,"approval":98.9583334,"support":35.2852868},{"time_hours":15,"approval_perbill":988839286,"support_perbill":345425884,"approval":98.8839286,"support":34.5425884},{"time_hours":16,"approval_perbill":988095239,"support_perbill":338283846,"approval":98.8095239,"support":33.8283846},{"time_hours":17,"approval_perbill":987351191,"support_perbill":331410659,"approval":98.7351191,"support":33.1410659},{"time_hours":18,"approval_perbill":986607143,"support_perbill":324791433,"approval":98.6607143,"support":32.4791433},{"time_hours":19,"approval_perbill":985863096,"support_perbill":318412343,"approval":98.5863096,"support":31.8412343},{"time_hours":20,"approval_perbill":985119048,"support_perbill":312260553,"approval":98.5119048,"support":31.2260553},{"time_hours":21,"approval_perbill":984375000,"support_perbill":306324124,"approval":98.4375,"support":30.6324124},{"time_hours":22,"approval_perbill":983630953,"support_perbill":300591949,"approval":98.3630953,"support":30.0591949},{"time_hours":23,"approval_perbill":982886905,"support_perbill":295053661,"approval":98.2886905,"support":29.5053661},{"time_hours":24,"approval_perbill":982142858,"support_perbill":289699587,"approval":98.2142858,"support":28.9699587},{"time_hours":25,"approval_perbill":981398810,"support_perbill":284520685,"approval":98.139881,"support":28.4520685},{"time_hours":26,"approval_perbill":980654762,"support_perbill":279508494,"approval":98.0654762,"support":27.9508494},{"time_hours":27,"approval_perbill":979910715,"support_perbill":274655099,"approval":97.9910715,"support":27.4655099},{"time_hours":28,"approval_perbill":979166667,"support_perbill":269953067,"approval":97.9166667,"support":26.9953067},{"time_hours":29,"approval_perbill":978422620,"support_perbill":265395426,"approval":97.842262,"support":26.5395426},{"time_hours":30,"approval_perbill":977678572,"support_perbill":260975623,"approval":97.7678572,"support":26.0975623},{"time_hours":31,"approval_perbill":976934524,"support_perbill":256687504,"approval":97.6934524,"support":25.6687504},{"time_hours":32,"approval_perbill":976190477,"support_perbill":252525267,"approval":97.6190477,"support":25.2525267},{"time_hours":33,"approval_perbill":975446429,"support_perbill":248483450,"approval":97.5446429,"support":24.848345},{"time_hours":34,"approval_perbill":974702381,"support_perbill":244556897,"approval":97.4702381,"support":24.4556897},{"time_hours":35,"approval_perbill":973958334,"support_perbill":240740754,"approval":97.3958334,"support":24.0740754},{"time_hours":36,"approval_perbill":973214286,"support_perbill":237030426,"approval":97.3214286,"support":23.7030426},{"time_hours":37,"approval_perbill":972470239,"support_perbill":233421570,"approval":97.2470239,"support":23.342157},{"time_hours":38,"approval_perbill":971726191,"support_perbill":229910079,"approval":97.1726191,"support":22.9910079},{"time_hours":39,"approval_perbill":970982143,"support_perbill":226492070,"approval":97.0982143,"support":22.649207},{"time_hours":40,"approval_perbill":970238096,"support_perbill":223163855,"approval":97.0238096,"support":22.3163855},{"time_hours":41,"approval_perbill":969494048,"support_perbill":219921943,"approval":96.9494048,"support":21.9921943},{"time_hours":42,"approval_perbill":968750000,"support_perbill":216763018,"approval":96.875,"support":21.6763018},{"time_hours":43,"approval_perbill":968005953,"support_perbill":213683937,"approval":96.8005953,"support":21.3683937},{"time_hours":44,"approval_perbill":967261905,"support_perbill":210681709,"approval":96.7261905,"support":21.0681709},{"time_hours":45,"approval_perbill":966517858,"support_perbill":207753492,"approval":96.6517858,"support":20.7753492},{"time_hours":46,"approval_perbill":965773810,"support_perbill":204896583,"approval":96.577381,"support":20.4896583},{"time_hours":47,"approval_perbill":965029762,"support_perbill":202108407,"approval":96.5029762,"support":20.2108407},{"time_hours":48,"approval_perbill":964285715,"support_perbill":199386516,"approval":96.4285715,"support":19.9386516},{"time_hours":49,"approval_perbill":963541667,"support_perbill":196728572,"approval":96.3541667,"support":19.6728572},{"time_hours":50,"approval_perbill":962797620,"support_perbill":194132348,"approval":96.279762,"support":19.4132348},{"time_hours":51,"approval_perbill":962053572,"support_perbill":191595717,"approval":96.2053572,"support":19.1595717},{"time_hours":52,"approval_perbill":961309524,"support_perbill":189116654,"approval":96.1309524,"support":18.9116654},{"time_hours":53,"approval_perbill":960565477,"support_perbill":186693220,"approval":96.0565477,"support":18.669322},{"time_hours":54,"approval_perbill":959821429,"support_perbill":184323563,"approval":95.9821429,"support":18.4323563},{"time_hours":55,"approval_perbill":959077381,"support_perbill":182005911,"approval":95.9077381,"support":18.2005911},{"time_hours":56,"approval_perbill":958333334,"support_perbill":179738574,"approval":95.8333334,"support":17.9738574},{"time_hours":57,"approval_perbill":957589286,"support_perbill":177519929,"approval":95.7589286,"support":17.7519929},{"time_hours":58,"approval_perbill":956845239,"support_perbill":175348424,"approval":95.6845239,"support":17.5348424},{"time_hours":59,"approval_perbill":956101191,"support_perbill":173222572,"approval":95.6101191,"support":17.3222572},{"time_hours":60,"approval_perbill":955357143,"support_perbill":171140951,"approval":95.5357143,"support":17.1140951},{"time_hours":61,"approval_perbill":954613096,"support_perbill":169102192,"approval":95.4613096,"support":16.9102192},{"time_hours":62,"approval_perbill":953869048,"support_perbill":167104986,"approval":95.3869048,"support":16.7104986},{"time_hours":63,"approval_perbill":953125000,"support_perbill":165148074,"approval":95.3125,"support":16.5148074},{"time_hours":64,"approval_perbill":952380953,"support_perbill":163230251,"approval":95.2380953,"support":16.3230251},{"time_hours":65,"approval_perbill":951636905,"support_perbill":161350356,"approval":95.1636905,"support":16.1350356},{"time_hours":66,"approval_perbill":950892858,"support_perbill":159507276,"approval":95.0892858,"support":15.9507276},{"time_hours":67,"approval_perbill":950148810,"support_perbill":157699938,"approval":95.014881,"support":15.7699938},{"time_hours":68,"approval_perbill":949404762,"support_perbill":155927313,"approval":94.9404762,"support":15.5927313},{"time_hours":69,"approval_perbill":948660715,"support_perbill":154188412,"approval":94.8660715,"support":15.4188412},{"time_hours":70,"approval_perbill":947916667,"support_perbill":152482280,"approval":94.7916667,"support":15.248228},{"time_hours":71,"approval_perbill":947172620,"support_perbill":150808000,"approval":94.717262,"support":15.0808},{"time_hours":72,"approval_perbill":946428572,"support_perbill":149164688,"approval":94.6428572,"support":14.9164688},{"time_hours":73,"approval_perbill":945684524,"support_perbill":147551493,"approval":94.5684524,"support":14.7551493},{"time_hours":74,"approval_perbill":944940477,"support_perbill":145967595,"approval":94.4940477,"support":14.5967595},{"time_hours":75,"approval_perbill":944196429,"support_perbill":144412202,"approval":94.4196429,"support":14.4412202},{"time_hours":76,"approval_perbill":943452381,"support_perbill":142884551,"approval":94.3452381,"support":14.2884551},{"time_hours":77,"approval_perbill":942708334,"support_perbill":141383909,"approval":94.2708334,"support":14.1383909},{"time_hours":78,"approval_perbill":941964286,"support_perbill":139909563,"approval":94.1964286,"support":13.9909563},{"time_hours":79,"approval_perbill":941220239,"support_perbill":138460830,"approval":94.1220239,"support":13.846083},{"time_hours":80,"approval_perbill":940476191,"support_perbill":137037046,"approval":94.0476191,"support":13.7037046},{"time_hours":81,"approval_perbill":939732143,"support_perbill":135637575,"approval":93.9732143,"support":13.5637575},{"time_hours":82,"approval_perbill":938988096,"support_perbill":134261797,"approval":93.8988096,"support":13.4261797},{"time_hours":83,"approval_perbill":938244048,"support_perbill":132909117,"approval":93.8244048,"support":13.2909117},{"time_hours":84,"approval_perbill":937500000,"support_perbill":131578956,"approval":93.75,"support":13.1578956},{"time_hours":85,"approval_perbill":936755953,"support_perbill":130270759,"approval":93.6755953,"support":13.0270759},{"time_hours":86,"approval_perbill":936011905,"support_perbill":128983985,"approval":93.6011905,"support":12.8983985},{"time_hours":87,"approval_perbill":935267858,"support_perbill":127718112,"approval":93.5267858,"support":12.7718112},{"time_hours":88,"approval_perbill":934523810,"support_perbill":126472636,"approval":93.452381,"support":12.6472636},{"time_hours":89,"approval_perbill":933779762,"support_perbill":125247065,"approval":93.3779762,"support":12.5247065},{"time_hours":90,"approval_perbill":933035715,"support_perbill":124040929,"approval":93.3035715,"support":12.4040929},{"time_hours":91,"approval_perbill":932291667,"support_perbill":122853769,"approval":93.2291667,"support":12.2853769},{"time_hours":92,"approval_perbill":931547620,"support_perbill":121685138,"approval":93.154762,"support":12.1685138},{"time_hours":93,"approval_perbill":930803572,"support_perbill":120534607,"approval":93.0803572,"support":12.0534607},{"time_hours":94,"approval_perbill":930059524,"support_perbill":119401760,"approval":93.0059524,"support":11.940176},{"time_hours":95,"approval_perbill":929315477,"support_perbill":118286191,"approval":92.9315477,"support":11.8286191},{"time_hours":96,"approval_perbill":928571429,"support_perbill":117187509,"approval":92.8571429,"support":11.7187509},{"time_hours":97,"approval_perbill":927827381,"support_perbill":116105331,"approval":92.7827381,"support":11.6105331},{"time_hours":98,"approval_perbill":927083334,"support_perbill":115039290,"approval":92.7083334,"support":11.503929},{"time_hours":99,"approval_perbill":926339286,"support_perbill":113989027,"approval":92.6339286,"support":11.3989027},{"time_hours":100,"approval_perbill":925595239,"support_perbill":112954195,"approval":92.5595239,"support":11.2954195},{"time_hours":101,"approval_perbill":924851191,"support_perbill":111934455,"approval":92.4851191,"support":11.1934455},{"time_hours":102,"approval_perbill":924107143,"support_perbill":110929480,"approval":92.4107143,"support":11.092948},{"time_hours":103,"approval_perbill":923363096,"support_perbill":109938952,"approval":92.3363096,"support":10.9938952},{"time_hours":104,"approval_perbill":922619048,"support_perbill":108962562,"approval":92.2619048,"support":10.8962562},{"time_hours":105,"approval_perbill":921875000,"support_perbill":108000008,"approval":92.1875,"support":10.8000008},{"time_hours":106,"approval_perbill":921130953,"support_perbill":107050999,"approval":92.1130953,"support":10.7050999},{"time_hours":107,"approval_perbill":920386905,"support_perbill":106115251,"approval":92.0386905,"support":10.6115251},{"time_hours":108,"approval_perbill":919642858,"support_perbill":105192488,"approval":91.9642858,"support":10.5192488},{"time_hours":109,"approval_perbill":918898810,"support_perbill":104282441,"approval":91.889881,"support":10.4282441},{"time_hours":110,"approval_perbill":918154762,"support_perbill":103384849,"approval":91.8154762,"support":10.3384849},{"time_hours":111,"approval_perbill":917410715,"support_perbill":102499459,"approval":91.7410715,"support":10.2499459},{"time_hours":112,"approval_perbill":916666667,"support_perbill":101626024,"approval":91.6666667,"support":10.1626024},{"time_hours":113,"approval_perbill":915922620,"support_perbill":100764302,"approval":91.592262,"support":10.0764302},{"time_hours":114,"approval_perbill":915178572,"support_perbill":99914060,"approval":91.5178572,"support":9.991406},{"time_hours":115,"approval_perbill":914434524,"support_perbill":99075069,"approval":91.4434524,"support":9.9075069},{"time_hours":116,"approval_perbill":913690477,"support_perbill":98247109,"approval":91.3690477,"support":9.8247109},{"time_hours":117,"approval_perbill":912946429,"support_perbill":97429963,"approval":91.2946429,"support":9.7429963},{"time_hours":118,"approval_perbill":912202381,"support_perbill":96623420,"approval":91.2202381,"support":9.662342},{"time_hours":119,"approval_perbill":911458334,"support_perbill":95827275,"approval":91.1458334,"support":9.5827275},{"time_hours":120,"approval_perbill":910714286,"support_perbill":95041329,"approval":91.0714286,"support":9.5041329},{"time_hours":121,"approval_perbill":909970239,"support_perbill":94265387,"approval":90.9970239,"support":9.4265387},{"time_hours":122,"approval_perbill":909226191,"support_perbill":93499259,"approval":90.9226191,"support":9.3499259},{"time_hours":123,"approval_perbill":908482143,"support_perbill":92742760,"approval":90.8482143,"support":9.274276},{"time_hours":124,"approval_perbill":907738096,"support_perbill":91995709,"approval":90.7738096,"support":9.1995709},{"time_hours":125,"approval_perbill":906994048,"support_perbill":91257931,"approval":90.6994048,"support":9.1257931},{"time_hours":126,"approval_perbill":906250000,"support_perbill":90529254,"approval":90.625,"support":9.0529254},{"time_hours":127,"approval_perbill":905505953,"support_perbill":89809511,"approval":90.5505953,"support":8.9809511},{"time_hours":128,"approval_perbill":904761905,"support_perbill":89098539,"approval":90.4761905,"support":8.9098539},{"time_hours":129,"approval_perbill":904017858,"support_perbill":88396178,"approval":90.4017858,"support":8.8396178},{"time_hours":130,"approval_perbill":903273810,"support_perbill":87702272,"approval":90.327381,"support":8.7702272},{"time_hours":131,"approval_perbill":902529762,"support_perbill":87016670,"approval":90.2529762,"support":8.701667},{"time_hours":132,"approval_perbill":901785715,"support_perbill":86339224,"approval":90.1785715,"support":8.6339224},{"time_hours":133,"approval_perbill":901041667,"support_perbill":85669788,"approval":90.1041667,"support":8.5669788},{"time_hours":134,"approval_perbill":900297620,"support_perbill":85008223,"approval":90.029762,"support":8.5008223},{"time_hours":135,"approval_perbill":899553572,"support_perbill":84354389,"approval":89.9553572,"support":8.4354389},{"time_hours":136,"approval_perbill":898809524,"support_perbill":83708152,"approval":89.8809524,"support":8.3708152},{"time_hours":137,"approval_perbill":898065477,"support_perbill":83069381,"approval":89.8065477,"support":8.3069381},{"time_hours":138,"approval_perbill":897321429,"support_perbill":82437946,"approval":89.7321429,"support":8.2437946},{"time_hours":139,"approval_perbill":896577381,"support_perbill":81813722,"approval":89.6577381,"support":8.1813722},{"time_hours":140,"approval_perbill":895833334,"support_perbill":81196587,"approval":89.5833334,"support":8.1196587},{"time_hours":141,"approval_perbill":895089286,"support_perbill":80586420,"approval":89.5089286,"support":8.058642},{"time_hours":142,"approval_perbill":894345239,"support_perbill":79983104,"approval":89.4345239,"support":7.9983104},{"time_hours":143,"approval_perbill":893601191,"support_perbill":79386524,"approval":89.3601191,"support":7.9386524},{"time_hours":144,"approval_perbill":892857143,"support_perbill":78796567,"approval":89.2857143,"support":7.8796567},{"time_hours":145,"approval_perbill":892113096,"support_perbill":78213125,"approval":89.2113096,"support":7.8213125},{"time_hours":146,"approval_perbill":891369048,"support_perbill":77636090,"approval":89.1369048,"support":7.763609},{"time_hours":147,"approval_perbill":890625000,"support_perbill":77065357,"approval":89.0625,"support":7.7065357},{"time_hours":148,"approval_perbill":889880953,"support_perbill":76500823,"approval":88.9880953,"support":7.6500823},{"time_hours":149,"approval_perbill":889136905,"support_perbill":75942388,"approval":88.9136905,"support":7.5942388},{"time_hours":150,"approval_perbill":888392858,"support_perbill":75389954,"approval":88.8392858,"support":7.5389954},{"time_hours":151,"approval_perbill":887648810,"support_perbill":74843424,"approval":88.764881,"support":7.4843424},{"time_hours":152,"approval_perbill":886904762,"support_perbill":74302703,"approval":88.6904762,"support":7.4302703},{"time_hours":153,"approval_perbill":886160715,"support_perbill":73767701,"approval":88.6160715,"support":7.3767701},{"time_hours":154,"approval_perbill":885416667,"support_perbill":73238327,"approval":88.5416667,"support":7.3238327},{"time_hours":155,"approval_perbill":884672620,"support_perbill":72714492,"approval":88.467262,"support":7.2714492},{"time_hours":156,"approval_perbill":883928572,"support_perbill":72196110,"approval":88.3928572,"support":7.219611},{"time_hours":157,"approval_perbill":883184524,"support_perbill":71683096,"approval":88.3184524,"support":7.1683096},{"time_hours":158,"approval_perbill":882440477,"support_perbill":71175368,"approval":88.2440477,"support":7.1175368},{"time_hours":159,"approval_perbill":881696429,"support_perbill":70672844,"approval":88.1696429,"support":7.0672844},{"time_hours":160,"approval_perbill":880952381,"support_perbill":70175444,"approval":88.0952381,"support":7.0175444},{"time_hours":161,"approval_perbill":880208334,"support_perbill":69683090,"approval":88.0208334,"support":6.968309},{"time_hours":162,"approval_perbill":879464286,"support_perbill":69195707,"approval":87.9464286,"support":6.9195707},{"time_hours":163,"approval_perbill":878720239,"support_perbill":68713219,"approval":87.8720239,"support":6.8713219},{"time_hours":164,"approval_perbill":877976191,"support_perbill":68235552,"approval":87.7976191,"support":6.8235552},{"time_hours":165,"approval_perbill":877232143,"support_perbill":67762635,"approval":87.7232143,"support":6.7762635},{"time_hours":166,"approval_perbill":876488096,"support_perbill":67294398,"approval":87.6488096,"support":6.7294398},{"time_hours":167,"approval_perbill":875744048,"support_perbill":66830771,"approval":87.5744048,"support":6.6830771},{"time_hours":168,"approval_perbill":875000000,"support_perbill":66371686,"approval":87.5,"support":6.6371686},{"time_hours":169,"approval_perbill":874255953,"support_perbill":65917078,"approval":87.4255953,"support":6.5917078},{"time_hours":170,"approval_perbill":873511905,"support_perbill":65466880,"approval":87.3511905,"support":6.546688},{"time_hours":171,"approval_perbill":872767858,"support_perbill":65021030,"approval":87.2767858,"support":6.502103},{"time_hours":172,"approval_perbill":872023810,"support_perbill":64579464,"approval":87.202381,"support":6.4579464},{"time_hours":173,"approval_perbill":871279762,"support_perbill":64142120,"approval":87.1279762,"support":6.414212},{"time_hours":174,"approval_perbill":870535715,"support_perbill":63708939,"approval":87.0535715,"support":6.3708939},{"time_hours":175,"approval_perbill":869791667,"support_perbill":63279862,"approval":86.9791667,"support":6.3279862},{"time_hours":176,"approval_perbill":869047620,"support_perbill":62854830,"approval":86.904762,"support":6.285483},{"time_hours":177,"approval_perbill":868303572,"support_perbill":62433787,"approval":86.8303572,"support":6.2433787},{"time_hours":178,"approval_perbill":867559524,"support_perbill":62016676,"approval":86.7559524,"support":6.2016676},{"time_hours":179,"approval_perbill":866815477,"support_perbill":61603443,"approval":86.6815477,"support":6.1603443},{"time_hours":180,"approval_perbill":866071429,"support_perbill":61194035,"approval":86.6071429,"support":6.1194035},{"time_hours":181,"approval_perbill":865327381,"support_perbill":60788396,"approval":86.5327381,"support":6.0788396},{"time_hours":182,"approval_perbill":864583334,"support_perbill":60386478,"approval":86.4583334,"support":6.0386478},{"time_hours":183,"approval_perbill":863839286,"support_perbill":59988228,"approval":86.3839286,"support":5.9988228},{"time_hours":184,"approval_perbill":863095239,"support_perbill":59593596,"approval":86.3095239,"support":5.9593596},{"time_hours":185,"approval_perbill":862351191,"support_perbill":59202533,"approval":86.2351191,"support":5.9202533},{"time_hours":186,"approval_perbill":861607143,"support_perbill":58814991,"approval":86.1607143,"support":5.8814991},{"time_hours":187,"approval_perbill":860863096,"support_perbill":58430923,"approval":86.0863096,"support":5.8430923},{"time_hours":188,"approval_perbill":860119048,"support_perbill":58050283,"approval":86.0119048,"support":5.8050283},{"time_hours":189,"approval_perbill":859375000,"support_perbill":57673023,"approval":85.9375,"support":5.7673023},{"time_hours":190,"approval_perbill":858630953,"support_perbill":57299101,"approval":85.8630953,"support":5.7299101},{"time_hours":191,"approval_perbill":857886905,"support_perbill":56928471,"approval":85.7886905,"support":5.6928471},{"time_hours":192,"approval_perbill":857142858,"support_perbill":56561090,"approval":85.7142858,"support":5.656109},{"time_hours":193,"approval_perbill":856398810,"support_perbill":56196916,"approval":85.639881,"support":5.6196916},{"time_hours":194,"approval_perbill":855654762,"support_perbill":55835907,"approval":85.5654762,"support":5.5835907},{"time_hours":195,"approval_perbill":854910715,"support_perbill":55478022,"approval":85.4910715,"support":5.5478022},{"time_hours":196,"approval_perbill":854166667,"support_perbill":55123221,"approval":85.4166667,"support":5.5123221},{"time_hours":197,"approval_perbill":853422620,"support_perbill":54771463,"approval":85.342262,"support":5.4771463},{"time_hours":198,"approval_perbill":852678572,"support_perbill":54422710,"approval":85.2678572,"support":5.442271},{"time_hours":199,"approval_perbill":851934524,"support_perbill":54076924,"approval":85.1934524,"support":5.4076924},{"time_hours":200,"approval_perbill":851190477,"support_perbill":53734066,"approval":85.1190477,"support":5.3734066},{"time_hours":201,"approval_perbill":850446429,"support_perbill":53394100,"approval":85.0446429,"support":5.33941},{"time_hours":202,"approval_perbill":849702381,"support_perbill":53056989,"approval":84.9702381,"support":5.3056989},{"time_hours":203,"approval_perbill":848958334,"support_perbill":52722698,"approval":84.8958334,"support":5.2722698},{"time_hours":204,"approval_perbill":848214286,"support_perbill":52391191,"approval":84.8214286,"support":5.2391191},{"time_hours":205,"approval_perbill":847470239,"support_perbill":52062434,"approval":84.7470239,"support":5.2062434},{"time_hours":206,"approval_perbill":846726191,"support_perbill":51736392,"approval":84.6726191,"support":5.1736392},{"time_hours":207,"approval_perbill":845982143,"support_perbill":51413033,"approval":84.5982143,"support":5.1413033},{"time_hours":208,"approval_perbill":845238096,"support_perbill":51092322,"approval":84.5238096,"support":5.1092322},{"time_hours":209,"approval_perbill":844494048,"support_perbill":50774229,"approval":84.4494048,"support":5.0774229},{"time_hours":210,"approval_perbill":843750000,"support_perbill":50458719,"approval":84.375,"support":5.0458719},{"time_hours":211,"approval_perbill":843005953,"support_perbill":50145764,"approval":84.3005953,"support":5.0145764},{"time_hours":212,"approval_perbill":842261905,"support_perbill":49835330,"approval":84.2261905,"support":4.983533},{"time_hours":213,"approval_perbill":841517858,"support_perbill":49527389,"approval":84.1517858,"support":4.9527389},{"time_hours":214,"approval_perbill":840773810,"support_perbill":49221911,"approval":84.077381,"support":4.9221911},{"time_hours":215,"approval_perbill":840029762,"support_perbill":48918865,"approval":84.0029762,"support":4.8918865},{"time_hours":216,"approval_perbill":839285715,"support_perbill":48618223,"approval":83.9285715,"support":4.8618223},{"time_hours":217,"approval_perbill":838541667,"support_perbill":48319956,"approval":83.8541667,"support":4.8319956},{"time_hours":218,"approval_perbill":837797620,"support_perbill":48024037,"approval":83.779762,"support":4.8024037},{"time_hours":219,"approval_perbill":837053572,"support_perbill":47730437,"approval":83.7053572,"support":4.7730437},{"time_hours":220,"approval_perbill":836309524,"support_perbill":47439130,"approval":83.6309524,"support":4.743913},{"time_hours":221,"approval_perbill":835565477,"support_perbill":47150089,"approval":83.5565477,"support":4.7150089},{"time_hours":222,"approval_perbill":834821429,"support_perbill":46863288,"approval":83.4821429,"support":4.6863288},{"time_hours":223,"approval_perbill":834077381,"support_perbill":46578700,"approval":83.4077381,"support":4.65787},{"time_hours":224,"approval_perbill":833333334,"support_perbill":46296300,"approval":83.3333334,"support":4.62963},{"time_hours":225,"approval_perbill":832589286,"support_perbill":46016063,"approval":83.2589286,"support":4.6016063},{"time_hours":226,"approval_perbill":831845239,"support_perbill":45737964,"approval":83.1845239,"support":4.5737964},{"time_hours":227,"approval_perbill":831101191,"support_perbill":45461979,"approval":83.1101191,"support":4.5461979},{"time_hours":228,"approval_perbill":830357143,"support_perbill":45188083,"approval":83.0357143,"support":4.5188083},{"time_hours":229,"approval_perbill":829613096,"support_perbill":44916254,"approval":82.9613096,"support":4.4916254},{"time_hours":230,"approval_perbill":828869048,"support_perbill":44646468,"approval":82.8869048,"support":4.4646468},{"time_hours":231,"approval_perbill":828125000,"support_perbill":44378701,"approval":82.8125,"support":4.4378701},{"time_hours":232,"approval_perbill":827380953,"support_perbill":44112932,"approval":82.7380953,"support":4.4112932},{"time_hours":233,"approval_perbill":826636905,"support_perbill":43849138,"approval":82.6636905,"support":4.3849138},{"time_hours":234,"approval_perbill":825892858,"support_perbill":43587297,"approval":82.5892858,"support":4.3587297},{"time_hours":235,"approval_perbill":825148810,"support_perbill":43327388,"approval":82.514881,"support":4.3327388},{"time_hours":236,"approval_perbill":824404762,"support_perbill":43069388,"approval":82.4404762,"support":4.3069388},{"time_hours":237,"approval_perbill":823660715,"support_perbill":42813278,"approval":82.3660715,"support":4.2813278},{"time_hours":238,"approval_perbill":822916667,"support_perbill":42559037,"approval":82.2916667,"support":4.2559037},{"time_hours":239,"approval_perbill":822172620,"support_perbill":42306643,"approval":82.217262,"support":4.2306643},{"time_hours":240,"approval_perbill":821428572,"support_perbill":42056078,"approval":82.1428572,"support":4.2056078},{"time_hours":241,"approval_perbill":820684524,"support_perbill":41807321,"approval":82.0684524,"support":4.1807321},{"time_hours":242,"approval_perbill":819940477,"support_perbill":41560353,"approval":81.9940477,"support":4.1560353},{"time_hours":243,"approval_perbill":819196429,"support_perbill":41315154,"approval":81.9196429,"support":4.1315154},{"time_hours":244,"approval_perbill":818452381,"support_perbill":41071706,"approval":81.8452381,"support":4.1071706},{"time_hours":245,"approval_perbill":817708334,"support_perbill":40829990,"approval":81.7708334,"support":4.082999},{"time_hours":246,"approval_perbill":816964286,"support_perbill":40589987,"approval":81.6964286,"support":4.0589987},{"time_hours":247,"approval_perbill":816220239,"support_perbill":40351680,"approval":81.6220239,"support":4.035168},{"time_hours":248,"approval_perbill":815476191,"support_perbill":40115050,"approval":81.5476191,"support":4.011505},{"time_hours":249,"approval_perbill":814732143,"support_perbill":39880080,"approval":81.4732143,"support":3.988008},{"time_hours":250,"approval_perbill":813988096,"support_perbill":39646752,"approval":81.3988096,"support":3.9646752},{"time_hours":251,"approval_perbill":813244048,"support_perbill":39415050,"approval":81.3244048,"support":3.941505},{"time_hours":252,"approval_perbill":812500000,"support_perbill":39184956,"approval":81.25,"support":3.9184956},{"time_hours":253,"approval_perbill":811755953,"support_perbill":38956453,"approval":81.1755953,"support":3.8956453},{"time_hours":254,"approval_perbill":811011905,"support_perbill":38729526,"approval":81.1011905,"support":3.8729526},{"time_hours":255,"approval_perbill":810267858,"support_perbill":38504158,"approval":81.0267858,"support":3.8504158},{"time_hours":256,"approval_perbill":809523810,"support_perbill":38280333,"approval":80.952381,"support":3.8280333},{"time_hours":257,"approval_perbill":808779762,"support_perbill":38058034,"approval":80.8779762,"support":3.8058034},{"time_hours":258,"approval_perbill":808035715,"support_perbill":37837248,"approval":80.8035715,"support":3.7837248},{"time_hours":259,"approval_perbill":807291667,"support_perbill":37617957,"approval":80.7291667,"support":3.7617957},{"time_hours":260,"approval_perbill":806547620,"support_perbill":37400148,"approval":80.654762,"support":3.7400148},{"time_hours":261,"approval_perbill":805803572,"support_perbill":37183805,"approval":80.5803572,"support":3.7183805},{"time_hours":262,"approval_perbill":805059524,"support_perbill":36968913,"approval":80.5059524,"support":3.6968913},{"time_hours":263,"approval_perbill":804315477,"support_perbill":36755458,"approval":80.4315477,"support":3.6755458},{"time_hours":264,"approval_perbill":803571429,"support_perbill":36543425,"approval":80.3571429,"support":3.6543425},{"time_hours":265,"approval_perbill":802827381,"support_perbill":36332800,"approval":80.2827381,"support":3.63328},{"time_hours":266,"approval_perbill":802083334,"support_perbill":36123570,"approval":80.2083334,"support":3.612357},{"time_hours":267,"approval_perbill":801339286,"support_perbill":35915720,"approval":80.1339286,"support":3.591572},{"time_hours":268,"approval_perbill":800595239,"support_perbill":35709238,"approval":80.0595239,"support":3.5709238},{"time_hours":269,"approval_perbill":799851191,"support_perbill":35504108,"approval":79.9851191,"support":3.5504108},{"time_hours":270,"approval_perbill":799107143,"support_perbill":35300319,"approval":79.9107143,"support":3.5300319},{"time_hours":271,"approval_perbill":798363096,"support_perbill":35097856,"approval":79.8363096,"support":3.5097856},{"time_hours":272,"approval_perbill":797619048,"support_perbill":34896708,"approval":79.7619048,"support":3.4896708},{"time_hours":273,"approval_perbill":796875000,"support_perbill":34696861,"approval":79.6875,"support":3.4696861},{"time_hours":274,"approval_perbill":796130953,"support_perbill":34498304,"approval":79.6130953,"support":3.4498304},{"time_hours":275,"approval_perbill":795386905,"support_perbill":34301022,"approval":79.5386905,"support":3.4301022},{"time_hours":276,"approval_perbill":794642858,"support_perbill":34105005,"approval":79.4642858,"support":3.4105005},{"time_hours":277,"approval_perbill":793898810,"support_perbill":33910239,"approval":79.389881,"support":3.3910239},{"time_hours":278,"approval_perbill":793154762,"support_perbill":33716714,"approval":79.3154762,"support":3.3716714},{"time_hours":279,"approval_perbill":792410715,"support_perbill":33524416,"approval":79.2410715,"support":3.3524416},{"time_hours":280,"approval_perbill":791666667,"support_perbill":33333336,"approval":79.1666667,"support":3.3333336},{"time_hours":281,"approval_perbill":790922620,"support_perbill":33143460,"approval":79.092262,"support":3.314346},{"time_hours":282,"approval_perbill":790178572,"support_perbill":32954778,"approval":79.0178572,"support":3.2954778},{"time_hours":283,"approval_perbill":789434524,"support_perbill":32767279,"approval":78.9434524,"support":3.2767279},{"time_hours":284,"approval_perbill":788690477,"support_perbill":32580951,"approval":78.8690477,"support":3.2580951},{"time_hours":285,"approval_perbill":787946429,"support_perbill":32395783,"approval":78.7946429,"support":3.2395783},{"time_hours":286,"approval_perbill":787202381,"support_perbill":32211765,"approval":78.7202381,"support":3.2211765},{"time_hours":287,"approval_perbill":786458334,"support_perbill":32028886,"approval":78.6458334,"support":3.2028886},{"time_hours":288,"approval_perbill":785714286,"support_perbill":31847136,"approval":78.5714286,"support":3.1847136},{"time_hours":289,"approval_perbill":784970239,"support_perbill":31666504,"approval":78.4970239,"support":3.1666504},{"time_hours":290,"approval_perbill":784226191,"support_perbill":31486979,"approval":78.4226191,"support":3.1486979},{"time_hours":291,"approval_perbill":783482143,"support_perbill":31308552,"approval":78.3482143,"support":3.1308552},{"time_hours":292,"approval_perbill":782738096,"support_perbill":31131212,"approval":78.2738096,"support":3.1131212},{"time_hours":293,"approval_perbill":781994048,"support_perbill":30954950,"approval":78.1994048,"support":3.095495},{"time_hours":294,"approval_perbill":781250000,"support_perbill":30779756,"approval":78.125,"support":3.0779756},{"time_hours":295,"approval_perbill":780505953,"support_perbill":30605620,"approval":78.0505953,"support":3.060562},{"time_hours":296,"approval_perbill":779761905,"support_perbill":30432533,"approval":77.9761905,"support":3.0432533},{"time_hours":297,"approval_perbill":779017858,"support_perbill":30260484,"approval":77.9017858,"support":3.0260484},{"time_hours":298,"approval_perbill":778273810,"support_perbill":30089466,"approval":77.827381,"support":3.0089466},{"time_hours":299,"approval_perbill":777529762,"support_perbill":29919468,"approval":77.7529762,"support":2.9919468},{"time_hours":300,"approval_perbill":776785715,"support_perbill":29750482,"approval":77.6785715,"support":2.9750482},{"time_hours":301,"approval_perbill":776041667,"support_perbill":29582498,"approval":77.6041667,"support":2.9582498},{"time_hours":302,"approval_perbill":775297620,"support_perbill":29415508,"approval":77.529762,"support":2.9415508},{"time_hours":303,"approval_perbill":774553572,"support_perbill":29249503,"approval":77.4553572,"support":2.9249503},{"time_hours":304,"approval_perbill":773809524,"support_perbill":29084473,"approval":77.3809524,"support":2.9084473},{"time_hours":305,"approval_perbill":773065477,"support_perbill":28920412,"approval":77.3065477,"support":2.8920412},{"time_hours":306,"approval_perbill":772321429,"support_perbill":28757309,"approval":77.2321429,"support":2.8757309},{"time_hours":307,"approval_perbill":771577381,"support_perbill":28595157,"approval":77.1577381,"support":2.8595157},{"time_hours":308,"approval_perbill":770833334,"support_perbill":28433948,"approval":77.0833334,"support":2.8433948},{"time_hours":309,"approval_perbill":770089286,"support_perbill":28273672,"approval":77.0089286,"support":2.8273672},{"time_hours":310,"approval_perbill":769345239,"support_perbill":28114323,"approval":76.9345239,"support":2.8114323},{"time_hours":311,"approval_perbill":768601191,"support_perbill":27955892,"approval":76.8601191,"support":2.7955892},{"time_hours":312,"approval_perbill":767857143,"support_perbill":27798371,"approval":76.7857143,"support":2.7798371},{"time_hours":313,"approval_perbill":767113096,"support_perbill":27641753,"approval":76.7113096,"support":2.7641753},{"time_hours":314,"approval_perbill":766369048,"support_perbill":27486029,"approval":76.6369048,"support":2.7486029},{"time_hours":315,"approval_perbill":765625000,"support_perbill":27331192,"approval":76.5625,"support":2.7331192},{"time_hours":316,"approval_perbill":764880953,"support_perbill":27177234,"approval":76.4880953,"support":2.7177234},{"time_hours":317,"approval_perbill":764136905,"support_perbill":27024148,"approval":76.4136905,"support":2.7024148},{"time_hours":318,"approval_perbill":763392858,"support_perbill":26871928,"approval":76.3392858,"support":2.6871928},{"time_hours":319,"approval_perbill":762648810,"support_perbill":26720564,"approval":76.264881,"support":2.6720564},{"time_hours":320,"approval_perbill":761904762,"support_perbill":26570050,"approval":76.1904762,"support":2.657005},{"time_hours":321,"approval_perbill":761160715,"support_perbill":26420379,"approval":76.1160715,"support":2.6420379},{"time_hours":322,"approval_perbill":760416667,"support_perbill":26271544,"approval":76.0416667,"support":2.6271544},{"time_hours":323,"approval_perbill":759672620,"support_perbill":26123538,"approval":75.967262,"support":2.6123538},{"time_hours":324,"approval_perbill":758928572,"support_perbill":25976354,"approval":75.8928572,"support":2.5976354},{"time_hours":325,"approval_perbill":758184524,"support_perbill":25829985,"approval":75.8184524,"support":2.5829985},{"time_hours":326,"approval_perbill":757440477,"support_perbill":25684425,"approval":75.7440477,"support":2.5684425},{"time_hours":327,"approval_perbill":756696429,"support_perbill":25539666,"approval":75.6696429,"support":2.5539666},{"time_hours":328,"approval_perbill":755952381,"support_perbill":25395702,"approval":75.5952381,"support":2.5395702},{"time_hours":329,"approval_perbill":755208334,"support_perbill":25252527,"approval":75.5208334,"support":2.5252527},{"time_hours":330,"approval_perbill":754464286,"support_perbill":25110134,"approval":75.4464286,"support":2.5110134},{"time_hours":331,"approval_perbill":753720239,"support_perbill":24968516,"approval":75.3720239,"support":2.4968516},{"time_hours":332,"approval_perbill":752976191,"support_perbill":24827668,"approval":75.2976191,"support":2.4827668},{"time_hours":333,"approval_perbill":752232143,"support_perbill":24687584,"approval":75.2232143,"support":2.4687584},{"time_hours":334,"approval_perbill":751488096,"support_perbill":24548256,"approval":75.1488096,"support":2.4548256},{"time_hours":335,"approval_perbill":750744048,"support_perbill":24409679,"approval":75.0744048,"support":2.4409679},{"time_hours":336,"approval_perbill":750000000,"support_perbill":24271846,"approval":75,"support":2.4271846},{"time_hours":337,"approval_perbill":749255953,"support_perbill":24134753,"approval":74.9255953,"support":2.4134753},{"time_hours":338,"approval_perbill":748511905,"support_perbill":23998392,"approval":74.8511905,"support":2.3998392},{"time_hours":339,"approval_perbill":747767858,"support_perbill":23862759,"approval":74.7767858,"support":2.3862759},{"time_hours":340,"approval_perbill":747023810,"support_perbill":23727846,"approval":74.702381,"support":2.3727846},{"time_hours":341,"approval_perbill":746279762,"support_perbill":23593649,"approval":74.6279762,"support":2.3593649},{"time_hours":342,"approval_perbill":745535715,"support_perbill":23460162,"approval":74.5535715,"support":2.3460162},{"time_hours":343,"approval_perbill":744791667,"support_perbill":23327379,"approval":74.4791667,"support":2.3327379},{"time_hours":344,"approval_perbill":744047620,"support_perbill":23195295,"approval":74.404762,"support":2.3195295},{"time_hours":345,"approval_perbill":743303572,"support_perbill":23063903,"approval":74.3303572,"support":2.3063903},{"time_hours":346,"approval_perbill":742559524,"support_perbill":22933200,"approval":74.2559524,"support":2.29332},{"time_hours":347,"approval_perbill":741815477,"support_perbill":22803179,"approval":74.1815477,"support":2.2803179},{"time_hours":348,"approval_perbill":741071429,"support_perbill":22673834,"approval":74.1071429,"support":2.2673834},{"time_hours":349,"approval_perbill":740327381,"support_perbill":22545162,"approval":74.0327381,"support":2.2545162},{"time_hours":350,"approval_perbill":739583334,"support_perbill":22417155,"approval":73.9583334,"support":2.2417155},{"time_hours":351,"approval_perbill":738839286,"support_perbill":22289811,"approval":73.8839286,"support":2.2289811},{"time_hours":352,"approval_perbill":738095239,"support_perbill":22163122,"approval":73.8095239,"support":2.2163122},{"time_hours":353,"approval_perbill":737351191,"support_perbill":22037084,"approval":73.7351191,"support":2.2037084},{"time_hours":354,"approval_perbill":736607143,"support_perbill":21911693,"approval":73.6607143,"support":2.1911693},{"time_hours":355,"approval_perbill":735863096,"support_perbill":21786943,"approval":73.5863096,"support":2.1786943},{"time_hours":356,"approval_perbill":735119048,"support_perbill":21662829,"approval":73.5119048,"support":2.1662829},{"time_hours":357,"approval_perbill":734375000,"support_perbill":21539347,"approval":73.4375,"support":2.1539347},{"time_hours":358,"approval_perbill":733630953,"support_perbill":21416491,"approval":73.3630953,"support":2.1416491},{"time_hours":359,"approval_perbill":732886905,"support_perbill":21294257,"approval":73.2886905,"support":2.1294257},{"time_hours":360,"approval_perbill":732142858,"support_perbill":21172640,"approval":73.2142858,"support":2.117264},{"time_hours":361,"approval_perbill":731398810,"support_perbill":21051635,"approval":73.139881,"support":2.1051635},{"time_hours":362,"approval_perbill":730654762,"support_perbill":20931239,"approval":73.0654762,"support":2.0931239},{"time_hours":363,"approval_perbill":729910715,"support_perbill":20811446,"approval":72.9910715,"support":2.0811446},{"time_hours":364,"approval_perbill":729166667,"support_perbill":20692251,"approval":72.9166667,"support":2.0692251},{"time_hours":365,"approval_perbill":728422620,"support_perbill":20573651,"approval":72.842262,"support":2.0573651},{"time_hours":366,"approval_perbill":727678572,"support_perbill":20455641,"approval":72.7678572,"support":2.0455641},{"time_hours":367,"approval_perbill":726934524,"support_perbill":20338216,"approval":72.6934524,"support":2.0338216},{"time_hours":368,"approval_perbill":726190477,"support_perbill":20221372,"approval":72.6190477,"support":2.0221372},{"time_hours":369,"approval_perbill":725446429,"support_perbill":20105105,"approval":72.5446429,"support":2.0105105},{"time_hours":370,"approval_perbill":724702381,"support_perbill":19989411,"approval":72.4702381,"support":1.9989411},{"time_hours":371,"approval_perbill":723958334,"support_perbill":19874285,"approval":72.3958334,"support":1.9874285},{"time_hours":372,"approval_perbill":723214286,"support_perbill":19759723,"approval":72.3214286,"support":1.9759723},{"time_hours":373,"approval_perbill":722470239,"support_perbill":19645721,"approval":72.2470239,"support":1.9645721},{"time_hours":374,"approval_perbill":721726191,"support_perbill":19532275,"approval":72.1726191,"support":1.9532275},{"time_hours":375,"approval_perbill":720982143,"support_perbill":19419381,"approval":72.0982143,"support":1.9419381},{"time_hours":376,"approval_perbill":720238096,"support_perbill":19307035,"approval":72.0238096,"support":1.9307035},{"time_hours":377,"approval_perbill":719494048,"support_perbill":19195233,"approval":71.9494048,"support":1.9195233},{"time_hours":378,"approval_perbill":718750000,"support_perbill":19083971,"approval":71.875,"support":1.9083971},{"time_hours":379,"approval_perbill":718005953,"support_perbill":18973244,"approval":71.8005953,"support":1.8973244},{"time_hours":380,"approval_perbill":717261905,"support_perbill":18863050,"approval":71.7261905,"support":1.886305},{"time_hours":381,"approval_perbill":716517858,"support_perbill":18753385,"approval":71.6517858,"support":1.8753385},{"time_hours":382,"approval_perbill":715773810,"support_perbill":18644243,"approval":71.577381,"support":1.8644243},{"time_hours":383,"approval_perbill":715029762,"support_perbill":18535623,"approval":71.5029762,"support":1.8535623},{"time_hours":384,"approval_perbill":714285715,"support_perbill":18427520,"approval":71.4285715,"support":1.842752},{"time_hours":385,"approval_perbill":713541667,"support_perbill":18319930,"approval":71.3541667,"support":1.831993},{"time_hours":386,"approval_perbill":712797620,"support_perbill":18212849,"approval":71.279762,"support":1.8212849},{"time_hours":387,"approval_perbill":712053572,"support_perbill":18106275,"approval":71.2053572,"support":1.8106275},{"time_hours":388,"approval_perbill":711309524,"support_perbill":18000204,"approval":71.1309524,"support":1.8000204},{"time_hours":389,"approval_perbill":710565477,"support_perbill":17894631,"approval":71.0565477,"support":1.7894631},{"time_hours":390,"approval_perbill":709821429,"support_perbill":17789554,"approval":70.9821429,"support":1.7789554},{"time_hours":391,"approval_perbill":709077381,"support_perbill":17684969,"approval":70.9077381,"support":1.7684969},{"time_hours":392,"approval_perbill":708333334,"support_perbill":17580873,"approval":70.8333334,"support":1.7580873},{"time_hours":393,"approval_perbill":707589286,"support_perbill":17477262,"approval":70.7589286,"support":1.7477262},{"time_hours":394,"approval_perbill":706845239,"support_perbill":17374132,"approval":70.6845239,"support":1.7374132},{"time_hours":395,"approval_perbill":706101191,"support_perbill":17271481,"approval":70.6101191,"support":1.7271481},{"time_hours":396,"approval_perbill":705357143,"support_perbill":17169305,"approval":70.5357143,"support":1.7169305},{"time_hours":397,"approval_perbill":704613096,"support_perbill":17067601,"approval":70.4613096,"support":1.7067601},{"time_hours":398,"approval_perbill":703869048,"support_perbill":16966366,"approval":70.3869048,"support":1.6966366},{"time_hours":399,"approval_perbill":703125000,"support_perbill":16865595,"approval":70.3125,"support":1.6865595},{"time_hours":400,"approval_perbill":702380953,"support_perbill":16765287,"approval":70.2380953,"support":1.6765287},{"time_hours":401,"approval_perbill":701636905,"support_perbill":16665438,"approval":70.1636905,"support":1.6665438},{"time_hours":402,"approval_perbill":700892858,"support_perbill":16566044,"approval":70.0892858,"support":1.6566044},{"time_hours":403,"approval_perbill":700148810,"support_perbill":16467104,"approval":70.014881,"support":1.6467104},{"time_hours":404,"approval_perbill":699404762,"support_perbill":16368612,"approval":69.9404762,"support":1.6368612},{"time_hours":405,"approval_perbill":698660715,"support_perbill":16270568,"approval":69.8660715,"support":1.6270568},{"time_hours":406,"approval_perbill":697916667,"support_perbill":16172967,"approval":69.7916667,"support":1.6172967},{"time_hours":407,"approval_perbill":697172620,"support_perbill":16075806,"approval":69.717262,"support":1.6075806},{"time_hours":408,"approval_perbill":696428572,"support_perbill":15979083,"approval":69.6428572,"support":1.5979083},{"time_hours":409,"approval_perbill":695684524,"support_perbill":15882794,"approval":69.5684524,"support":1.5882794},{"time_hours":410,"approval_perbill":694940477,"support_perbill":15786938,"approval":69.4940477,"support":1.5786938},{"time_hours":411,"approval_perbill":694196429,"support_perbill":15691509,"approval":69.4196429,"support":1.5691509},{"time_hours":412,"approval_perbill":693452381,"support_perbill":15596507,"approval":69.3452381,"support":1.5596507},{"time_hours":413,"approval_perbill":692708334,"support_perbill":15501928,"approval":69.2708334,"support":1.5501928},{"time_hours":414,"approval_perbill":691964286,"support_perbill":15407769,"approval":69.1964286,"support":1.5407769},{"time_hours":415,"approval_perbill":691220239,"support_perbill":15314028,"approval":69.1220239,"support":1.5314028},{"time_hours":416,"approval_perbill":690476191,"support_perbill":15220701,"approval":69.0476191,"support":1.5220701},{"time_hours":417,"approval_perbill":689732143,"support_perbill":15127786,"approval":68.9732143,"support":1.5127786},{"time_hours":418,"approval_perbill":688988096,"support_perbill":15035280,"approval":68.8988096,"support":1.503528},{"time_hours":419,"approval_perbill":688244048,"support_perbill":14943181,"approval":68.8244048,"support":1.4943181},{"time_hours":420,"approval_perbill":687500000,"support_perbill":14851486,"approval":68.75,"support":1.4851486},{"time_hours":421,"approval_perbill":686755953,"support_perbill":14760192,"approval":68.6755953,"support":1.4760192},{"time_hours":422,"approval_perbill":686011905,"support_perbill":14669296,"approval":68.6011905,"support":1.4669296},{"time_hours":423,"approval_perbill":685267858,"support_perbill":14578797,"approval":68.5267858,"support":1.4578797},{"time_hours":424,"approval_perbill":684523810,"support_perbill":14488690,"approval":68.452381,"support":1.448869},{"time_hours":425,"approval_perbill":683779762,"support_perbill":14398975,"approval":68.3779762,"support":1.4398975},{"time_hours":426,"approval_perbill":683035715,"support_perbill":14309648,"approval":68.3035715,"support":1.4309648},{"time_hours":427,"approval_perbill":682291667,"support_perbill":14220706,"approval":68.2291667,"support":1.4220706},{"time_hours":428,"approval_perbill":681547620,"support_perbill":14132148,"approval":68.154762,"support":1.4132148},{"time_hours":429,"approval_perbill":680803572,"support_perbill":14043970,"approval":68.0803572,"support":1.404397},{"time_hours":430,"approval_perbill":680059524,"support_perbill":13956171,"approval":68.0059524,"support":1.3956171},{"time_hours":431,"approval_perbill":679315477,"support_perbill":13868748,"approval":67.9315477,"support":1.3868748},{"time_hours":432,"approval_perbill":678571429,"support_perbill":13781699,"approval":67.8571429,"support":1.3781699},{"time_hours":433,"approval_perbill":677827381,"support_perbill":13695020,"approval":67.7827381,"support":1.369502},{"time_hours":434,"approval_perbill":677083334,"support_perbill":13608710,"approval":67.7083334,"support":1.360871},{"time_hours":435,"approval_perbill":676339286,"support_perbill":13522767,"approval":67.6339286,"support":1.3522767},{"time_hours":436,"approval_perbill":675595239,"support_perbill":13437188,"approval":67.5595239,"support":1.3437188},{"time_hours":437,"approval_perbill":674851191,"support_perbill":13351970,"approval":67.4851191,"support":1.335197},{"time_hours":438,"approval_perbill":674107143,"support_perbill":13267112,"approval":67.4107143,"support":1.3267112},{"time_hours":439,"approval_perbill":673363096,"support_perbill":13182611,"approval":67.3363096,"support":1.3182611},{"time_hours":440,"approval_perbill":672619048,"support_perbill":13098465,"approval":67.2619048,"support":1.3098465},{"time_hours":441,"approval_perbill":671875000,"support_perbill":13014672,"approval":67.1875,"support":1.3014672},{"time_hours":442,"approval_perbill":671130953,"support_perbill":12931229,"approval":67.1130953,"support":1.2931229},{"time_hours":443,"approval_perbill":670386905,"support_perbill":12848135,"approval":67.0386905,"support":1.2848135},{"time_hours":444,"approval_perbill":669642858,"support_perbill":12765386,"approval":66.9642858,"support":1.2765386},{"time_hours":445,"approval_perbill":668898810,"support_perbill":12682982,"approval":66.889881,"support":1.2682982},{"time_hours":446,"approval_perbill":668154762,"support_perbill":12600919,"approval":66.8154762,"support":1.2600919},{"time_hours":447,"approval_perbill":667410715,"support_perbill":12519197,"approval":66.7410715,"support":1.2519197},{"time_hours":448,"approval_perbill":666666667,"support_perbill":12437812,"approval":66.6666667,"support":1.2437812},{"time_hours":449,"approval_perbill":665922620,"support_perbill":12356762,"approval":66.592262,"support":1.2356762},{"time_hours":450,"approval_perbill":665178572,"support_perbill":12276046,"approval":66.5178572,"support":1.2276046},{"time_hours":451,"approval_perbill":664434524,"support_perbill":12195661,"approval":66.4434524,"support":1.2195661},{"time_hours":452,"approval_perbill":663690477,"support_perbill":12115605,"approval":66.3690477,"support":1.2115605},{"time_hours":453,"approval_perbill":662946429,"support_perbill":12035877,"approval":66.2946429,"support":1.2035877},{"time_hours":454,"approval_perbill":662202381,"support_perbill":11956475,"approval":66.2202381,"support":1.1956475},{"time_hours":455,"approval_perbill":661458334,"support_perbill":11877395,"approval":66.1458334,"support":1.1877395},{"time_hours":456,"approval_perbill":660714286,"support_perbill":11798637,"approval":66.0714286,"support":1.1798637},{"time_hours":457,"approval_perbill":659970239,"support_perbill":11720199,"approval":65.9970239,"support":1.1720199},{"time_hours":458,"approval_perbill":659226191,"support_perbill":11642077,"approval":65.9226191,"support":1.1642077},{"time_hours":459,"approval_perbill":658482143,"support_perbill":11564272,"approval":65.8482143,"support":1.1564272},{"time_hours":460,"approval_perbill":657738096,"support_perbill":11486780,"approval":65.7738096,"support":1.148678},{"time_hours":461,"approval_perbill":656994048,"support_perbill":11409600,"approval":65.6994048,"support":1.14096},{"time_hours":462,"approval_perbill":656250000,"support_perbill":11332729,"approval":65.625,"support":1.1332729},{"time_hours":463,"approval_perbill":655505953,"support_perbill":11256167,"approval":65.5505953,"support":1.1256167},{"time_hours":464,"approval_perbill":654761905,"support_perbill":11179911,"approval":65.4761905,"support":1.1179911},{"time_hours":465,"approval_perbill":654017858,"support_perbill":11103959,"approval":65.4017858,"support":1.1103959},{"time_hours":466,"approval_perbill":653273810,"support_perbill":11028310,"approval":65.327381,"support":1.102831},{"time_hours":467,"approval_perbill":652529762,"support_perbill":10952961,"approval":65.2529762,"support":1.0952961},{"time_hours":468,"approval_perbill":651785715,"support_perbill":10877912,"approval":65.1785715,"support":1.0877912},{"time_hours":469,"approval_perbill":651041667,"support_perbill":10803159,"approval":65.1041667,"support":1.0803159},{"time_hours":470,"approval_perbill":650297620,"support_perbill":10728702,"approval":65.029762,"support":1.0728702},{"time_hours":471,"approval_perbill":649553572,"support_perbill":10654539,"approval":64.9553572,"support":1.0654539},{"time_hours":472,"approval_perbill":648809524,"support_perbill":10580667,"approval":64.8809524,"support":1.0580667},{"time_hours":473,"approval_perbill":648065477,"support_perbill":10507086,"approval":64.8065477,"support":1.0507086},{"time_hours":474,"approval_perbill":647321429,"support_perbill":10433793,"approval":64.7321429,"support":1.0433793},{"time_hours":475,"approval_perbill":646577381,"support_perbill":10360787,"approval":64.6577381,"support":1.0360787},{"time_hours":476,"approval_perbill":645833334,"support_perbill":10288066,"approval":64.5833334,"support":1.0288066},{"time_hours":477,"approval_perbill":645089286,"support_perbill":10215629,"approval":64.5089286,"support":1.0215629},{"time_hours":478,"approval_perbill":644345239,"support_perbill":10143473,"approval":64.4345239,"support":1.0143473},{"time_hours":479,"approval_perbill":643601191,"support_perbill":10071597,"approval":64.3601191,"support":1.0071597},{"time_hours":480,"approval_perbill":642857143,"support_perbill":10000000,"approval":64.2857143,"support":1},{"time_hours":481,"approval_perbill":642113096,"support_perbill":9928680,"approval":64.2113096,"support":0.992868},{"time_hours":482,"approval_perbill":641369048,"support_perbill":9857635,"approval":64.1369048,"support":0.9857635},{"time_hours":483,"approval_perbill":640625000,"support_perbill":9786864,"approval":64.0625,"support":0.9786864},{"time_hours":484,"approval_perbill":639880953,"support_perbill":9716365,"approval":63.9880953,"support":0.9716365},{"time_hours":485,"approval_perbill":639136905,"support_perbill":9646137,"approval":63.9136905,"support":0.9646137},{"time_hours":486,"approval_perbill":638392858,"support_perbill":9576177,"approval":63.8392858,"support":0.9576177},{"time_hours":487,"approval_perbill":637648810,"support_perbill":9506485,"approval":63.764881,"support":0.9506485},{"time_hours":488,"approval_perbill":636904762,"support_perbill":9437059,"approval":63.6904762,"support":0.9437059},{"time_hours":489,"approval_perbill":636160715,"support_perbill":9367898,"approval":63.6160715,"support":0.9367898},{"time_hours":490,"approval_perbill":635416667,"support_perbill":9298999,"approval":63.5416667,"support":0.9298999},{"time_hours":491,"approval_perbill":634672620,"support_perbill":9230362,"approval":63.467262,"support":0.9230362},{"time_hours":492,"approval_perbill":633928572,"support_perbill":9161984,"approval":63.3928572,"support":0.9161984},{"time_hours":493,"approval_perbill":633184524,"support_perbill":9093865,"approval":63.3184524,"support":0.9093865},{"time_hours":494,"approval_perbill":632440477,"support_perbill":9026003,"approval":63.2440477,"support":0.9026003},{"time_hours":495,"approval_perbill":631696429,"support_perbill":8958397,"approval":63.1696429,"support":0.8958397},{"time_hours":496,"approval_perbill":630952381,"support_perbill":8891045,"approval":63.0952381,"support":0.8891045},{"time_hours":497,"approval_perbill":630208334,"support_perbill":8823945,"approval":63.0208334,"support":0.8823945},{"time_hours":498,"approval_perbill":629464286,"support_perbill":8757097,"approval":62.9464286,"support":0.8757097},{"time_hours":499,"approval_perbill":628720239,"support_perbill":8690498,"approval":62.8720239,"support":0.8690498},{"time_hours":500,"approval_perbill":627976191,"support_perbill":8624148,"approval":62.7976191,"support":0.8624148},{"time_hours":501,"approval_perbill":627232143,"support_perbill":8558045,"approval":62.7232143,"support":0.8558045},{"time_hours":502,"approval_perbill":626488096,"support_perbill":8492187,"approval":62.6488096,"support":0.8492187},{"time_hours":503,"approval_perbill":625744048,"support_perbill":8426574,"approval":62.5744048,"support":0.8426574},{"time_hours":504,"approval_perbill":625000000,"support_perbill":8361204,"approval":62.5,"support":0.8361204},{"time_hours":505,"approval_perbill":624255953,"support_perbill":8296076,"approval":62.4255953,"support":0.8296076},{"time_hours":506,"approval_perbill":623511905,"support_perbill":8231187,"approval":62.3511905,"support":0.8231187},{"time_hours":507,"approval_perbill":622767858,"support_perbill":8166538,"approval":62.2767858,"support":0.8166538},{"time_hours":508,"approval_perbill":622023810,"support_perbill":8102127,"approval":62.202381,"support":0.8102127},{"time_hours":509,"approval_perbill":621279762,"support_perbill":8037951,"approval":62.1279762,"support":0.8037951},{"time_hours":510,"approval_perbill":620535715,"support_perbill":7974011,"approval":62.0535715,"support":0.7974011},{"time_hours":511,"approval_perbill":619791667,"support_perbill":7910304,"approval":61.9791667,"support":0.7910304},{"time_hours":512,"approval_perbill":619047620,"support_perbill":7846830,"approval":61.904762,"support":0.784683},{"time_hours":513,"approval_perbill":618303572,"support_perbill":7783587,"approval":61.8303572,"support":0.7783587},{"time_hours":514,"approval_perbill":617559524,"support_perbill":7720574,"approval":61.7559524,"support":0.7720574},{"time_hours":515,"approval_perbill":616815477,"support_perbill":7657790,"approval":61.6815477,"support":0.765779},{"time_hours":516,"approval_perbill":616071429,"support_perbill":7595233,"approval":61.6071429,"support":0.7595233},{"time_hours":517,"approval_perbill":615327381,"support_perbill":7532902,"approval":61.5327381,"support":0.7532902},{"time_hours":518,"approval_perbill":614583334,"support_perbill":7470796,"approval":61.4583334,"support":0.7470796},{"time_hours":519,"approval_perbill":613839286,"support_perbill":7408914,"approval":61.3839286,"support":0.7408914},{"time_hours":520,"approval_perbill":613095239,"support_perbill":7347255,"approval":61.3095239,"support":0.7347255},{"time_hours":521,"approval_perbill":612351191,"support_perbill":7285816,"approval":61.2351191,"support":0.7285816},{"time_hours":522,"approval_perbill":611607143,"support_perbill":7224598,"approval":61.1607143,"support":0.7224598},{"time_hours":523,"approval_perbill":610863096,"support_perbill":7163599,"approval":61.0863096,"support":0.7163599},{"time_hours":524,"approval_perbill":610119048,"support_perbill":7102818,"approval":61.0119048,"support":0.7102818},{"time_hours":525,"approval_perbill":609375000,"support_perbill":7042254,"approval":60.9375,"support":0.7042254},{"time_hours":526,"approval_perbill":608630953,"support_perbill":6981905,"approval":60.8630953,"support":0.6981905},{"time_hours":527,"approval_perbill":607886905,"support_perbill":6921770,"approval":60.7886905,"support":0.692177},{"time_hours":528,"approval_perbill":607142858,"support_perbill":6861848,"approval":60.7142858,"support":0.6861848},{"time_hours":529,"approval_perbill":606398810,"support_perbill":6802139,"approval":60.639881,"support":0.6802139},{"time_hours":530,"approval_perbill":605654762,"support_perbill":6742640,"approval":60.5654762,"support":0.674264},{"time_hours":531,"approval_perbill":604910715,"support_perbill":6683351,"approval":60.4910715,"support":0.6683351},{"time_hours":532,"approval_perbill":604166667,"support_perbill":6624271,"approval":60.4166667,"support":0.6624271},{"time_hours":533,"approval_perbill":603422620,"support_perbill":6565399,"approval":60.342262,"support":0.6565399},{"time_hours":534,"approval_perbill":602678572,"support_perbill":6506733,"approval":60.2678572,"support":0.6506733},{"time_hours":535,"approval_perbill":601934524,"support_perbill":6448273,"approval":60.1934524,"support":0.6448273},{"time_hours":536,"approval_perbill":601190477,"support_perbill":6390017,"approval":60.1190477,"support":0.6390017},{"time_hours":537,"approval_perbill":600446429,"support_perbill":6331964,"approval":60.0446429,"support":0.6331964},{"time_hours":538,"approval_perbill":599702381,"support_perbill":6274113,"approval":59.9702381,"support":0.6274113},{"time_hours":539,"approval_perbill":598958334,"support_perbill":6216464,"approval":59.8958334,"support":0.6216464},{"time_hours":540,"approval_perbill":598214286,"support_perbill":6159015,"approval":59.8214286,"support":0.6159015},{"time_hours":541,"approval_perbill":597470239,"support_perbill":6101764,"approval":59.7470239,"support":0.6101764},{"time_hours":542,"approval_perbill":596726191,"support_perbill":6044712,"approval":59.6726191,"support":0.6044712},{"time_hours":543,"approval_perbill":595982143,"support_perbill":5987857,"approval":59.5982143,"support":0.5987857},{"time_hours":544,"approval_perbill":595238096,"support_perbill":5931198,"approval":59.5238096,"support":0.5931198},{"time_hours":545,"approval_perbill":594494048,"support_perbill":5874734,"approval":59.4494048,"support":0.5874734},{"time_hours":546,"approval_perbill":593750000,"support_perbill":5818464,"approval":59.375,"support":0.5818464},{"time_hours":547,"approval_perbill":593005953,"support_perbill":5762387,"approval":59.3005953,"support":0.5762387},{"time_hours":548,"approval_perbill":592261905,"support_perbill":5706502,"approval":59.2261905,"support":0.5706502},{"time_hours":549,"approval_perbill":591517858,"support_perbill":5650808,"approval":59.1517858,"support":0.5650808},{"time_hours":550,"approval_perbill":590773810,"support_perbill":5595304,"approval":59.077381,"support":0.5595304},{"time_hours":551,"approval_perbill":590029762,"support_perbill":5539989,"approval":59.0029762,"support":0.5539989},{"time_hours":552,"approval_perbill":589285715,"support_perbill":5484862,"approval":58.9285715,"support":0.5484862},{"time_hours":553,"approval_perbill":588541667,"support_perbill":5429922,"approval":58.8541667,"support":0.5429922},{"time_hours":554,"approval_perbill":587797620,"support_perbill":5375169,"approval":58.779762,"support":0.5375169},{"time_hours":555,"approval_perbill":587053572,"support_perbill":5320600,"approval":58.7053572,"support":0.53206},{"time_hours":556,"approval_perbill":586309524,"support_perbill":5266216,"approval":58.6309524,"support":0.5266216},{"time_hours":557,"approval_perbill":585565477,"support_perbill":5212016,"approval":58.5565477,"support":0.5212016},{"time_hours":558,"approval_perbill":584821429,"support_perbill":5157998,"approval":58.4821429,"support":0.5157998},{"time_hours":559,"approval_perbill":584077381,"support_perbill":5104161,"approval":58.4077381,"support":0.5104161},{"time_hours":560,"approval_perbill":583333334,"support_perbill":5050505,"approval":58.3333334,"support":0.5050505},{"time_hours":561,"approval_perbill":582589286,"support_perbill":4997029,"approval":58.2589286,"support":0.4997029},{"time_hours":562,"approval_perbill":581845239,"support_perbill":4943731,"approval":58.1845239,"support":0.4943731},{"time_hours":563,"approval_perbill":581101191,"support_perbill":4890612,"approval":58.1101191,"support":0.4890612},{"time_hours":564,"approval_perbill":580357143,"support_perbill":4837669,"approval":58.0357143,"support":0.4837669},{"time_hours":565,"approval_perbill":579613096,"support_perbill":4784903,"approval":57.9613096,"support":0.4784903},{"time_hours":566,"approval_perbill":578869048,"support_perbill":4732312,"approval":57.8869048,"support":0.4732312},{"time_hours":567,"approval_perbill":578125000,"support_perbill":4679895,"approval":57.8125,"support":0.4679895},{"time_hours":568,"approval_perbill":577380953,"support_perbill":4627652,"approval":57.7380953,"support":0.4627652},{"time_hours":569,"approval_perbill":576636905,"support_perbill":4575581,"approval":57.6636905,"support":0.4575581},{"time_hours":570,"approval_perbill":575892858,"support_perbill":4523683,"approval":57.5892858,"support":0.4523683},{"time_hours":571,"approval_perbill":575148810,"support_perbill":4471955,"approval":57.514881,"support":0.4471955},{"time_hours":572,"approval_perbill":574404762,"support_perbill":4420397,"approval":57.4404762,"support":0.4420397},{"time_hours":573,"approval_perbill":573660715,"support_perbill":4369009,"approval":57.3660715,"support":0.4369009},{"time_hours":574,"approval_perbill":572916667,"support_perbill":4317789,"approval":57.2916667,"support":0.4317789},{"time_hours":575,"approval_perbill":572172620,"support_perbill":4266737,"approval":57.217262,"support":0.4266737},{"time_hours":576,"approval_perbill":571428572,"support_perbill":4215851,"approval":57.1428572,"support":0.4215851},{"time_hours":577,"approval_perbill":570684524,"support_perbill":4165132,"approval":57.0684524,"support":0.4165132},{"time_hours":578,"approval_perbill":569940477,"support_perbill":4114578,"approval":56.9940477,"support":0.4114578},{"time_hours":579,"approval_perbill":569196429,"support_perbill":4064188,"approval":56.9196429,"support":0.4064188},{"time_hours":580,"approval_perbill":568452381,"support_perbill":4013961,"approval":56.8452381,"support":0.4013961},{"time_hours":581,"approval_perbill":567708334,"support_perbill":3963898,"approval":56.7708334,"support":0.3963898},{"time_hours":582,"approval_perbill":566964286,"support_perbill":3913996,"approval":56.6964286,"support":0.3913996},{"time_hours":583,"approval_perbill":566220239,"support_perbill":3864256,"approval":56.6220239,"support":0.3864256},{"time_hours":584,"approval_perbill":565476191,"support_perbill":3814676,"approval":56.5476191,"support":0.3814676},{"time_hours":585,"approval_perbill":564732143,"support_perbill":3765256,"approval":56.4732143,"support":0.3765256},{"time_hours":586,"approval_perbill":563988096,"support_perbill":3715994,"approval":56.3988096,"support":0.3715994},{"time_hours":587,"approval_perbill":563244048,"support_perbill":3666891,"approval":56.3244048,"support":0.3666891},{"time_hours":588,"approval_perbill":562500000,"support_perbill":3617945,"approval":56.25,"support":0.3617945},{"time_hours":589,"approval_perbill":561755953,"support_perbill":3569155,"approval":56.1755953,"support":0.3569155},{"time_hours":590,"approval_perbill":561011905,"support_perbill":3520522,"approval":56.1011905,"support":0.3520522},{"time_hours":591,"approval_perbill":560267858,"support_perbill":3472043,"approval":56.0267858,"support":0.3472043},{"time_hours":592,"approval_perbill":559523810,"support_perbill":3423719,"approval":55.952381,"support":0.3423719},{"time_hours":593,"approval_perbill":558779762,"support_perbill":3375549,"approval":55.8779762,"support":0.3375549},{"time_hours":594,"approval_perbill":558035715,"support_perbill":3327531,"approval":55.8035715,"support":0.3327531},{"time_hours":595,"approval_perbill":557291667,"support_perbill":3279666,"approval":55.7291667,"support":0.3279666},{"time_hours":596,"approval_perbill":556547620,"support_perbill":3231952,"approval":55.654762,"support":0.3231952},{"time_hours":597,"approval_perbill":555803572,"support_perbill":3184389,"approval":55.5803572,"support":0.3184389},{"time_hours":598,"approval_perbill":555059524,"support_perbill":3136975,"approval":55.5059524,"support":0.3136975},{"time_hours":599,"approval_perbill":554315477,"support_perbill":3089711,"approval":55.4315477,"support":0.3089711},{"time_hours":600,"approval_perbill":553571429,"support_perbill":3042596,"approval":55.3571429,"support":0.3042596},{"time_hours":601,"approval_perbill":552827381,"support_perbill":2995629,"approval":55.2827381,"support":0.2995629},{"time_hours":602,"approval_perbill":552083334,"support_perbill":2948808,"approval":55.2083334,"support":0.2948808},{"time_hours":603,"approval_perbill":551339286,"support_perbill":2902135,"approval":55.1339286,"support":0.2902135},{"time_hours":604,"approval_perbill":550595239,"support_perbill":2855607,"approval":55.0595239,"support":0.2855607},{"time_hours":605,"approval_perbill":549851191,"support_perbill":2809224,"approval":54.9851191,"support":0.2809224},{"time_hours":606,"approval_perbill":549107143,"support_perbill":2762986,"approval":54.9107143,"support":0.2762986},{"time_hours":607,"approval_perbill":548363096,"support_perbill":2716891,"approval":54.8363096,"support":0.2716891},{"time_hours":608,"approval_perbill":547619048,"support_perbill":2670940,"approval":54.7619048,"support":0.267094},{"time_hours":609,"approval_perbill":546875000,"support_perbill":2625131,"approval":54.6875,"support":0.2625131},{"time_hours":610,"approval_perbill":546130953,"support_perbill":2579464,"approval":54.6130953,"support":0.2579464},{"time_hours":611,"approval_perbill":545386905,"support_perbill":2533938,"approval":54.5386905,"support":0.2533938},{"time_hours":612,"approval_perbill":544642858,"support_perbill":2488552,"approval":54.4642858,"support":0.2488552},{"time_hours":613,"approval_perbill":543898810,"support_perbill":2443307,"approval":54.389881,"support":0.2443307},{"time_hours":614,"approval_perbill":543154762,"support_perbill":2398200,"approval":54.3154762,"support":0.23982},{"time_hours":615,"approval_perbill":542410715,"support_perbill":2353232,"approval":54.2410715,"support":0.2353232},{"time_hours":616,"approval_perbill":541666667,"support_perbill":2308402,"approval":54.1666667,"support":0.2308402},{"time_hours":617,"approval_perbill":540922620,"support_perbill":2263710,"approval":54.092262,"support":0.226371},{"time_hours":618,"approval_perbill":540178572,"support_perbill":2219153,"approval":54.0178572,"support":0.2219153},{"time_hours":619,"approval_perbill":539434524,"support_perbill":2174733,"approval":53.9434524,"support":0.2174733},{"time_hours":620,"approval_perbill":538690477,"support_perbill":2130449,"approval":53.8690477,"support":0.2130449},{"time_hours":621,"approval_perbill":537946429,"support_perbill":2086299,"approval":53.7946429,"support":0.2086299},{"time_hours":622,"approval_perbill":537202381,"support_perbill":2042283,"approval":53.7202381,"support":0.2042283},{"time_hours":623,"approval_perbill":536458334,"support_perbill":1998401,"approval":53.6458334,"support":0.1998401},{"time_hours":624,"approval_perbill":535714286,"support_perbill":1954652,"approval":53.5714286,"support":0.1954652},{"time_hours":625,"approval_perbill":534970239,"support_perbill":1911035,"approval":53.4970239,"support":0.1911035},{"time_hours":626,"approval_perbill":534226191,"support_perbill":1867550,"approval":53.4226191,"support":0.186755},{"time_hours":627,"approval_perbill":533482143,"support_perbill":1824196,"approval":53.3482143,"support":0.1824196},{"time_hours":628,"approval_perbill":532738096,"support_perbill":1780972,"approval":53.2738096,"support":0.1780972},{"time_hours":629,"approval_perbill":531994048,"support_perbill":1737879,"approval":53.1994048,"support":0.1737879},{"time_hours":630,"approval_perbill":531250000,"support_perbill":1694915,"approval":53.125,"support":0.1694915},{"time_hours":631,"approval_perbill":530505953,"support_perbill":1652080,"approval":53.0505953,"support":0.165208},{"time_hours":632,"approval_perbill":529761905,"support_perbill":1609373,"approval":52.9761905,"support":0.1609373},{"time_hours":633,"approval_perbill":529017858,"support_perbill":1566793,"approval":52.9017858,"support":0.1566793},{"time_hours":634,"approval_perbill":528273810,"support_perbill":1524341,"approval":52.827381,"support":0.1524341},{"time_hours":635,"approval_perbill":527529762,"support_perbill":1482015,"approval":52.7529762,"support":0.1482015},{"time_hours":636,"approval_perbill":526785715,"support_perbill":1439815,"approval":52.6785715,"support":0.1439815},{"time_hours":637,"approval_perbill":526041667,"support_perbill":1397741,"approval":52.6041667,"support":0.1397741},{"time_hours":638,"approval_perbill":525297620,"support_perbill":1355791,"approval":52.529762,"support":0.1355791},{"time_hours":639,"approval_perbill":524553572,"support_perbill":1313966,"approval":52.4553572,"support":0.1313966},{"time_hours":640,"approval_perbill":523809524,"support_perbill":1272264,"approval":52.3809524,"support":0.1272264},{"time_hours":641,"approval_perbill":523065477,"support_perbill":1230686,"approval":52.3065477,"support":0.1230686},{"time_hours":642,"approval_perbill":522321429,"support_perbill":1189230,"approval":52.2321429,"support":0.118923},{"time_hours":643,"approval_perbill":521577381,"support_perbill":1147896,"approval":52.1577381,"support":0.1147896},{"time_hours":644,"approval_perbill":520833334,"support_perbill":1106684,"approval":52.0833334,"support":0.1106684},{"time_hours":645,"approval_perbill":520089286,"support_perbill":1065593,"approval":52.0089286,"support":0.1065593},{"time_hours":646,"approval_perbill":519345239,"support_perbill":1024622,"approval":51.9345239,"support":0.1024622},{"time_hours":647,"approval_perbill":518601191,"support_perbill":983771,"approval":51.8601191,"support":0.0983771},{"time_hours":648,"approval_perbill":517857143,"support_perbill":943040,"approval":51.7857143,"support":0.094304},{"time_hours":649,"approval_perbill":517113096,"support_perbill":902427,"approval":51.7113096,"support":0.0902427},{"time_hours":650,"approval_perbill":516369048,"support_perbill":861933,"approval":51.6369048,"support":0.0861933},{"time_hours":651,"approval_perbill":515625000,"support_perbill":821557,"approval":51.5625,"support":0.0821557},{"time_hours":652,"approval_perbill":514880953,"support_perbill":781298,"approval":51.4880953,"support":0.0781298},{"time_hours":653,"approval_perbill":514136905,"support_perbill":741156,"approval":51.4136905,"support":0.0741156},{"time_hours":654,"approval_perbill":513392858,"support_perbill":701131,"approval":51.3392858,"support":0.0701131},{"time_hours":655,"approval_perbill":512648810,"support_perbill":661221,"approval":51.264881,"support":0.0661221},{"time_hours":656,"approval_perbill":511904762,"support_perbill":621426,"approval":51.1904762,"support":0.0621426},{"time_hours":657,"approval_perbill":511160715,"support_perbill":581747,"approval":51.1160715,"support":0.0581747},{"time_hours":658,"approval_perbill":510416667,"support_perbill":542181,"approval":51.0416667,"support":0.0542181},{"time_hours":659,"approval_perbill":509672620,"support_perbill":502730,"approval":50.967262,"support":0.050273},{"time_hours":660,"approval_perbill":508928572,"support_perbill":463392,"approval":50.8928572,"support":0.0463392},{"time_hours":661,"approval_perbill":508184524,"support_perbill":424166,"approval":50.8184524,"support":0.0424166},{"time_hours":662,"approval_perbill":507440477,"support_perbill":385053,"approval":50.7440477,"support":0.0385053},{"time_hours":663,"approval_perbill":506696429,"support_perbill":346052,"approval":50.6696429,"support":0.0346052},{"time_hours":664,"approval_perbill":505952381,"support_perbill":307163,"approval":50.5952381,"support":0.0307163},{"time_hours":665,"approval_perbill":505208334,"support_perbill":268384,"approval":50.5208334,"support":0.0268384},{"time_hours":666,"approval_perbill":504464286,"support_perbill":229716,"approval":50.4464286,"support":0.0229716},{"time_hours":667,"approval_perbill":503720239,"support_perbill":191157,"approval":50.3720239,"support":0.0191157},{"time_hours":668,"approval_perbill":502976191,"support_perbill":152709,"approval":50.2976191,"support":0.0152709},{"time_hours":669,"approval_perbill":502232143,"support_perbill":114369,"approval":50.2232143,"support":0.0114369},{"time_hours":670,"approval_perbill":501488096,"support_perbill":76138,"approval":50.1488096,"support":0.0076138},{"time_hours":671,"approval_perbill":500744048,"support_perbill":38015,"approval":50.0744048,"support":0.0038015},{"time_hours":672,"approval_perbill":500000000,"support_perbill":0,"approval":50,"support":0}]')},76682:p=>{"use strict";p.exports=JSON.parse('[{"time_hours":0,"approval_perbill":1000000000,"support_perbill":500000038,"approval":100,"support":50.0000038},{"time_hours":1,"approval_perbill":997916667,"support_perbill":422810379,"approval":99.7916667,"support":42.2810379},{"time_hours":2,"approval_perbill":995833334,"support_perbill":366120266,"approval":99.5833334,"support":36.6120266},{"time_hours":3,"approval_perbill":993750001,"support_perbill":322720742,"approval":99.3750001,"support":32.2720742},{"time_hours":4,"approval_perbill":991666668,"support_perbill":288428371,"approval":99.1666668,"support":28.8428371},{"time_hours":5,"approval_perbill":989583334,"support_perbill":260648719,"approval":98.9583334,"support":26.0648719},{"time_hours":6,"approval_perbill":987500001,"support_perbill":237687395,"approval":98.7500001,"support":23.7687395},{"time_hours":7,"approval_perbill":985416668,"support_perbill":218390834,"approval":98.5416668,"support":21.8390834},{"time_hours":8,"approval_perbill":983333335,"support_perbill":201946501,"approval":98.3333335,"support":20.1946501},{"time_hours":9,"approval_perbill":981250001,"support_perbill":187765525,"approval":98.1250001,"support":18.7765525},{"time_hours":10,"approval_perbill":979166668,"support_perbill":175410725,"approval":97.9166668,"support":17.5410725},{"time_hours":11,"approval_perbill":977083335,"support_perbill":164550680,"approval":97.7083335,"support":16.455068},{"time_hours":12,"approval_perbill":975000002,"support_perbill":154929598,"approval":97.5000002,"support":15.4929598},{"time_hours":13,"approval_perbill":972916667,"support_perbill":146346895,"approval":97.2916667,"support":14.6346895},{"time_hours":14,"approval_perbill":970833334,"support_perbill":138643083,"approval":97.0833334,"support":13.8643083},{"time_hours":15,"approval_perbill":968750001,"support_perbill":131689733,"approval":96.8750001,"support":13.1689733},{"time_hours":16,"approval_perbill":966666668,"support_perbill":125382279,"approval":96.6666668,"support":12.5382279},{"time_hours":17,"approval_perbill":964583334,"support_perbill":119634716,"approval":96.4583334,"support":11.9634716},{"time_hours":18,"approval_perbill":962500001,"support_perbill":114375668,"approval":96.2500001,"support":11.4375668},{"time_hours":19,"approval_perbill":960416668,"support_perbill":109545391,"approval":96.0416668,"support":10.9545391},{"time_hours":20,"approval_perbill":958333335,"support_perbill":105093501,"approval":95.8333335,"support":10.5093501},{"time_hours":21,"approval_perbill":956250000,"support_perbill":100977209,"approval":95.625,"support":10.0977209},{"time_hours":22,"approval_perbill":954166667,"support_perbill":97159951,"approval":95.4166667,"support":9.7159951},{"time_hours":23,"approval_perbill":952083334,"support_perbill":93610280,"approval":95.2083334,"support":9.361028},{"time_hours":24,"approval_perbill":950000001,"support_perbill":90301014,"approval":95.0000001,"support":9.0301014},{"time_hours":25,"approval_perbill":947916668,"support_perbill":87208529,"approval":94.7916668,"support":8.7208529},{"time_hours":26,"approval_perbill":945833334,"support_perbill":84312199,"approval":94.5833334,"support":8.4312199},{"time_hours":27,"approval_perbill":943750001,"support_perbill":81593937,"approval":94.3750001,"support":8.1593937},{"time_hours":28,"approval_perbill":941666668,"support_perbill":79037810,"approval":94.1666668,"support":7.903781},{"time_hours":29,"approval_perbill":939583335,"support_perbill":76629732,"approval":93.9583335,"support":7.6629732},{"time_hours":30,"approval_perbill":937500001,"support_perbill":74357200,"approval":93.7500001,"support":7.43572},{"time_hours":31,"approval_perbill":935416668,"support_perbill":72209088,"approval":93.5416668,"support":7.2209088},{"time_hours":32,"approval_perbill":933333335,"support_perbill":70175447,"approval":93.3333335,"support":7.0175447},{"time_hours":33,"approval_perbill":931250002,"support_perbill":68247365,"approval":93.1250002,"support":6.8247365},{"time_hours":34,"approval_perbill":929166667,"support_perbill":66416830,"approval":92.9166667,"support":6.641683},{"time_hours":35,"approval_perbill":927083334,"support_perbill":64676624,"approval":92.7083334,"support":6.4676624},{"time_hours":36,"approval_perbill":925000001,"support_perbill":63020221,"approval":92.5000001,"support":6.3020221},{"time_hours":37,"approval_perbill":922916668,"support_perbill":61441710,"approval":92.2916668,"support":6.144171},{"time_hours":38,"approval_perbill":920833334,"support_perbill":59935722,"approval":92.0833334,"support":5.9935722},{"time_hours":39,"approval_perbill":918750001,"support_perbill":58497372,"approval":91.8750001,"support":5.8497372},{"time_hours":40,"approval_perbill":916666668,"support_perbill":57122204,"approval":91.6666668,"support":5.7122204},{"time_hours":41,"approval_perbill":914583335,"support_perbill":55806144,"approval":91.4583335,"support":5.5806144},{"time_hours":42,"approval_perbill":912500000,"support_perbill":54545460,"approval":91.25,"support":5.454546},{"time_hours":43,"approval_perbill":910416667,"support_perbill":53336731,"approval":91.0416667,"support":5.3336731},{"time_hours":44,"approval_perbill":908333334,"support_perbill":52176808,"approval":90.8333334,"support":5.2176808},{"time_hours":45,"approval_perbill":906250001,"support_perbill":51062796,"approval":90.6250001,"support":5.1062796},{"time_hours":46,"approval_perbill":904166668,"support_perbill":49992020,"approval":90.4166668,"support":4.999202},{"time_hours":47,"approval_perbill":902083334,"support_perbill":48962010,"approval":90.2083334,"support":4.896201},{"time_hours":48,"approval_perbill":900000001,"support_perbill":47970485,"approval":90.0000001,"support":4.7970485},{"time_hours":49,"approval_perbill":897916668,"support_perbill":47015325,"approval":89.7916668,"support":4.7015325},{"time_hours":50,"approval_perbill":895833335,"support_perbill":46094566,"approval":89.5833335,"support":4.6094566},{"time_hours":51,"approval_perbill":893750001,"support_perbill":45206381,"approval":89.3750001,"support":4.5206381},{"time_hours":52,"approval_perbill":891666668,"support_perbill":44349075,"approval":89.1666668,"support":4.4349075},{"time_hours":53,"approval_perbill":889583335,"support_perbill":43521062,"approval":88.9583335,"support":4.3521062},{"time_hours":54,"approval_perbill":887500002,"support_perbill":42720867,"approval":88.7500002,"support":4.2720867},{"time_hours":55,"approval_perbill":885416667,"support_perbill":41947111,"approval":88.5416667,"support":4.1947111},{"time_hours":56,"approval_perbill":883333334,"support_perbill":41198506,"approval":88.3333334,"support":4.1198506},{"time_hours":57,"approval_perbill":881250001,"support_perbill":40473844,"approval":88.1250001,"support":4.0473844},{"time_hours":58,"approval_perbill":879166668,"support_perbill":39771995,"approval":87.9166668,"support":3.9771995},{"time_hours":59,"approval_perbill":877083334,"support_perbill":39091898,"approval":87.7083334,"support":3.9091898},{"time_hours":60,"approval_perbill":875000001,"support_perbill":38432558,"approval":87.5000001,"support":3.8432558},{"time_hours":61,"approval_perbill":872916668,"support_perbill":37793039,"approval":87.2916668,"support":3.7793039},{"time_hours":62,"approval_perbill":870833335,"support_perbill":37172460,"approval":87.0833335,"support":3.717246},{"time_hours":63,"approval_perbill":868750000,"support_perbill":36569991,"approval":86.875,"support":3.6569991},{"time_hours":64,"approval_perbill":866666667,"support_perbill":35984852,"approval":86.6666667,"support":3.5984852},{"time_hours":65,"approval_perbill":864583334,"support_perbill":35416306,"approval":86.4583334,"support":3.5416306},{"time_hours":66,"approval_perbill":862500001,"support_perbill":34863656,"approval":86.2500001,"support":3.4863656},{"time_hours":67,"approval_perbill":860416668,"support_perbill":34326245,"approval":86.0416668,"support":3.4326245},{"time_hours":68,"approval_perbill":858333334,"support_perbill":33803451,"approval":85.8333334,"support":3.3803451},{"time_hours":69,"approval_perbill":856250001,"support_perbill":33294686,"approval":85.6250001,"support":3.3294686},{"time_hours":70,"approval_perbill":854166668,"support_perbill":32799393,"approval":85.4166668,"support":3.2799393},{"time_hours":71,"approval_perbill":852083335,"support_perbill":32317044,"approval":85.2083335,"support":3.2317044},{"time_hours":72,"approval_perbill":850000001,"support_perbill":31847137,"approval":85.0000001,"support":3.1847137},{"time_hours":73,"approval_perbill":847916668,"support_perbill":31389198,"approval":84.7916668,"support":3.1389198},{"time_hours":74,"approval_perbill":845833335,"support_perbill":30942774,"approval":84.5833335,"support":3.0942774},{"time_hours":75,"approval_perbill":843750002,"support_perbill":30507438,"approval":84.3750002,"support":3.0507438},{"time_hours":76,"approval_perbill":841666667,"support_perbill":30082781,"approval":84.1666667,"support":3.0082781},{"time_hours":77,"approval_perbill":839583334,"support_perbill":29668415,"approval":83.9583334,"support":2.9668415},{"time_hours":78,"approval_perbill":837500001,"support_perbill":29263970,"approval":83.7500001,"support":2.926397},{"time_hours":79,"approval_perbill":835416668,"support_perbill":28869094,"approval":83.5416668,"support":2.8869094},{"time_hours":80,"approval_perbill":833333334,"support_perbill":28483451,"approval":83.3333334,"support":2.8483451},{"time_hours":81,"approval_perbill":831250001,"support_perbill":28106723,"approval":83.1250001,"support":2.8106723},{"time_hours":82,"approval_perbill":829166668,"support_perbill":27738602,"approval":82.9166668,"support":2.7738602},{"time_hours":83,"approval_perbill":827083335,"support_perbill":27378797,"approval":82.7083335,"support":2.7378797},{"time_hours":84,"approval_perbill":825000000,"support_perbill":27027029,"approval":82.5,"support":2.7027029},{"time_hours":85,"approval_perbill":822916667,"support_perbill":26683033,"approval":82.2916667,"support":2.6683033},{"time_hours":86,"approval_perbill":820833334,"support_perbill":26346554,"approval":82.0833334,"support":2.6346554},{"time_hours":87,"approval_perbill":818750001,"support_perbill":26017347,"approval":81.8750001,"support":2.6017347},{"time_hours":88,"approval_perbill":816666668,"support_perbill":25695180,"approval":81.6666668,"support":2.569518},{"time_hours":89,"approval_perbill":814583334,"support_perbill":25379829,"approval":81.4583334,"support":2.5379829},{"time_hours":90,"approval_perbill":812500001,"support_perbill":25071080,"approval":81.2500001,"support":2.507108},{"time_hours":91,"approval_perbill":810416668,"support_perbill":24768728,"approval":81.0416668,"support":2.4768728},{"time_hours":92,"approval_perbill":808333335,"support_perbill":24472576,"approval":80.8333335,"support":2.4472576},{"time_hours":93,"approval_perbill":806250001,"support_perbill":24182435,"approval":80.6250001,"support":2.4182435},{"time_hours":94,"approval_perbill":804166668,"support_perbill":23898125,"approval":80.4166668,"support":2.3898125},{"time_hours":95,"approval_perbill":802083335,"support_perbill":23619471,"approval":80.2083335,"support":2.3619471},{"time_hours":96,"approval_perbill":800000002,"support_perbill":23346306,"approval":80.0000002,"support":2.3346306},{"time_hours":97,"approval_perbill":797916667,"support_perbill":23078469,"approval":79.7916667,"support":2.3078469},{"time_hours":98,"approval_perbill":795833334,"support_perbill":22815806,"approval":79.5833334,"support":2.2815806},{"time_hours":99,"approval_perbill":793750001,"support_perbill":22558169,"approval":79.3750001,"support":2.2558169},{"time_hours":100,"approval_perbill":791666668,"support_perbill":22305415,"approval":79.1666668,"support":2.2305415},{"time_hours":101,"approval_perbill":789583334,"support_perbill":22057405,"approval":78.9583334,"support":2.2057405},{"time_hours":102,"approval_perbill":787500001,"support_perbill":21814009,"approval":78.7500001,"support":2.1814009},{"time_hours":103,"approval_perbill":785416668,"support_perbill":21575098,"approval":78.5416668,"support":2.1575098},{"time_hours":104,"approval_perbill":783333335,"support_perbill":21340549,"approval":78.3333335,"support":2.1340549},{"time_hours":105,"approval_perbill":781250000,"support_perbill":21110244,"approval":78.125,"support":2.1110244},{"time_hours":106,"approval_perbill":779166667,"support_perbill":20884069,"approval":77.9166667,"support":2.0884069},{"time_hours":107,"approval_perbill":777083334,"support_perbill":20661914,"approval":77.7083334,"support":2.0661914},{"time_hours":108,"approval_perbill":775000001,"support_perbill":20443673,"approval":77.5000001,"support":2.0443673},{"time_hours":109,"approval_perbill":772916668,"support_perbill":20229243,"approval":77.2916668,"support":2.0229243},{"time_hours":110,"approval_perbill":770833334,"support_perbill":20018524,"approval":77.0833334,"support":2.0018524},{"time_hours":111,"approval_perbill":768750001,"support_perbill":19811422,"approval":76.8750001,"support":1.9811422},{"time_hours":112,"approval_perbill":766666668,"support_perbill":19607845,"approval":76.6666668,"support":1.9607845},{"time_hours":113,"approval_perbill":764583335,"support_perbill":19407702,"approval":76.4583335,"support":1.9407702},{"time_hours":114,"approval_perbill":762500001,"support_perbill":19210908,"approval":76.2500001,"support":1.9210908},{"time_hours":115,"approval_perbill":760416668,"support_perbill":19017380,"approval":76.0416668,"support":1.901738},{"time_hours":116,"approval_perbill":758333335,"support_perbill":18827037,"approval":75.8333335,"support":1.8827037},{"time_hours":117,"approval_perbill":756250002,"support_perbill":18639800,"approval":75.6250002,"support":1.86398},{"time_hours":118,"approval_perbill":754166667,"support_perbill":18455595,"approval":75.4166667,"support":1.8455595},{"time_hours":119,"approval_perbill":752083334,"support_perbill":18274348,"approval":75.2083334,"support":1.8274348},{"time_hours":120,"approval_perbill":750000001,"support_perbill":18095989,"approval":75.0000001,"support":1.8095989},{"time_hours":121,"approval_perbill":747916668,"support_perbill":17920449,"approval":74.7916668,"support":1.7920449},{"time_hours":122,"approval_perbill":745833334,"support_perbill":17747662,"approval":74.5833334,"support":1.7747662},{"time_hours":123,"approval_perbill":743750001,"support_perbill":17577564,"approval":74.3750001,"support":1.7577564},{"time_hours":124,"approval_perbill":741666668,"support_perbill":17410092,"approval":74.1666668,"support":1.7410092},{"time_hours":125,"approval_perbill":739583335,"support_perbill":17245186,"approval":73.9583335,"support":1.7245186},{"time_hours":126,"approval_perbill":737500000,"support_perbill":17082787,"approval":73.75,"support":1.7082787},{"time_hours":127,"approval_perbill":735416667,"support_perbill":16922839,"approval":73.5416667,"support":1.6922839},{"time_hours":128,"approval_perbill":733333334,"support_perbill":16765287,"approval":73.3333334,"support":1.6765287},{"time_hours":129,"approval_perbill":731250001,"support_perbill":16610077,"approval":73.1250001,"support":1.6610077},{"time_hours":130,"approval_perbill":729166668,"support_perbill":16457158,"approval":72.9166668,"support":1.6457158},{"time_hours":131,"approval_perbill":727083334,"support_perbill":16306479,"approval":72.7083334,"support":1.6306479},{"time_hours":132,"approval_perbill":725000001,"support_perbill":16157990,"approval":72.5000001,"support":1.615799},{"time_hours":133,"approval_perbill":722916668,"support_perbill":16011646,"approval":72.2916668,"support":1.6011646},{"time_hours":134,"approval_perbill":720833335,"support_perbill":15867399,"approval":72.0833335,"support":1.5867399},{"time_hours":135,"approval_perbill":718750001,"support_perbill":15725205,"approval":71.8750001,"support":1.5725205},{"time_hours":136,"approval_perbill":716666668,"support_perbill":15585021,"approval":71.6666668,"support":1.5585021},{"time_hours":137,"approval_perbill":714583335,"support_perbill":15446804,"approval":71.4583335,"support":1.5446804},{"time_hours":138,"approval_perbill":712500002,"support_perbill":15310512,"approval":71.2500002,"support":1.5310512},{"time_hours":139,"approval_perbill":710416667,"support_perbill":15176107,"approval":71.0416667,"support":1.5176107},{"time_hours":140,"approval_perbill":708333334,"support_perbill":15043548,"approval":70.8333334,"support":1.5043548},{"time_hours":141,"approval_perbill":706250001,"support_perbill":14912799,"approval":70.6250001,"support":1.4912799},{"time_hours":142,"approval_perbill":704166668,"support_perbill":14783823,"approval":70.4166668,"support":1.4783823},{"time_hours":143,"approval_perbill":702083334,"support_perbill":14656583,"approval":70.2083334,"support":1.4656583},{"time_hours":144,"approval_perbill":700000001,"support_perbill":14531045,"approval":70.0000001,"support":1.4531045},{"time_hours":145,"approval_perbill":697916668,"support_perbill":14407175,"approval":69.7916668,"support":1.4407175},{"time_hours":146,"approval_perbill":695833335,"support_perbill":14284939,"approval":69.5833335,"support":1.4284939},{"time_hours":147,"approval_perbill":693750000,"support_perbill":14164307,"approval":69.375,"support":1.4164307},{"time_hours":148,"approval_perbill":691666667,"support_perbill":14045246,"approval":69.1666667,"support":1.4045246},{"time_hours":149,"approval_perbill":689583334,"support_perbill":13927726,"approval":68.9583334,"support":1.3927726},{"time_hours":150,"approval_perbill":687500001,"support_perbill":13811717,"approval":68.7500001,"support":1.3811717},{"time_hours":151,"approval_perbill":685416668,"support_perbill":13697191,"approval":68.5416668,"support":1.3697191},{"time_hours":152,"approval_perbill":683333334,"support_perbill":13584118,"approval":68.3333334,"support":1.3584118},{"time_hours":153,"approval_perbill":681250001,"support_perbill":13472472,"approval":68.1250001,"support":1.3472472},{"time_hours":154,"approval_perbill":679166668,"support_perbill":13362226,"approval":67.9166668,"support":1.3362226},{"time_hours":155,"approval_perbill":677083335,"support_perbill":13253353,"approval":67.7083335,"support":1.3253353},{"time_hours":156,"approval_perbill":675000001,"support_perbill":13145828,"approval":67.5000001,"support":1.3145828},{"time_hours":157,"approval_perbill":672916668,"support_perbill":13039626,"approval":67.2916668,"support":1.3039626},{"time_hours":158,"approval_perbill":670833335,"support_perbill":12934723,"approval":67.0833335,"support":1.2934723},{"time_hours":159,"approval_perbill":668750002,"support_perbill":12831096,"approval":66.8750002,"support":1.2831096},{"time_hours":160,"approval_perbill":666666667,"support_perbill":12728720,"approval":66.6666667,"support":1.272872},{"time_hours":161,"approval_perbill":664583334,"support_perbill":12627574,"approval":66.4583334,"support":1.2627574},{"time_hours":162,"approval_perbill":662500001,"support_perbill":12527635,"approval":66.2500001,"support":1.2527635},{"time_hours":163,"approval_perbill":660416668,"support_perbill":12428883,"approval":66.0416668,"support":1.2428883},{"time_hours":164,"approval_perbill":658333334,"support_perbill":12331295,"approval":65.8333334,"support":1.2331295},{"time_hours":165,"approval_perbill":656250001,"support_perbill":12234852,"approval":65.6250001,"support":1.2234852},{"time_hours":166,"approval_perbill":654166668,"support_perbill":12139533,"approval":65.4166668,"support":1.2139533},{"time_hours":167,"approval_perbill":652083335,"support_perbill":12045320,"approval":65.2083335,"support":1.204532},{"time_hours":168,"approval_perbill":650000000,"support_perbill":11952192,"approval":65,"support":1.1952192},{"time_hours":169,"approval_perbill":647916667,"support_perbill":11860131,"approval":64.7916667,"support":1.1860131},{"time_hours":170,"approval_perbill":645833334,"support_perbill":11769120,"approval":64.5833334,"support":1.176912},{"time_hours":171,"approval_perbill":643750001,"support_perbill":11679139,"approval":64.3750001,"support":1.1679139},{"time_hours":172,"approval_perbill":641666668,"support_perbill":11590172,"approval":64.1666668,"support":1.1590172},{"time_hours":173,"approval_perbill":639583334,"support_perbill":11502202,"approval":63.9583334,"support":1.1502202},{"time_hours":174,"approval_perbill":637500001,"support_perbill":11415212,"approval":63.7500001,"support":1.1415212},{"time_hours":175,"approval_perbill":635416668,"support_perbill":11329185,"approval":63.5416668,"support":1.1329185},{"time_hours":176,"approval_perbill":633333335,"support_perbill":11244107,"approval":63.3333335,"support":1.1244107},{"time_hours":177,"approval_perbill":631250001,"support_perbill":11159960,"approval":63.1250001,"support":1.115996},{"time_hours":178,"approval_perbill":629166668,"support_perbill":11076731,"approval":62.9166668,"support":1.1076731},{"time_hours":179,"approval_perbill":627083335,"support_perbill":10994403,"approval":62.7083335,"support":1.0994403},{"time_hours":180,"approval_perbill":625000002,"support_perbill":10912963,"approval":62.5000002,"support":1.0912963},{"time_hours":181,"approval_perbill":622916667,"support_perbill":10832396,"approval":62.2916667,"support":1.0832396},{"time_hours":182,"approval_perbill":620833334,"support_perbill":10752689,"approval":62.0833334,"support":1.0752689},{"time_hours":183,"approval_perbill":618750001,"support_perbill":10673827,"approval":61.8750001,"support":1.0673827},{"time_hours":184,"approval_perbill":616666668,"support_perbill":10595797,"approval":61.6666668,"support":1.0595797},{"time_hours":185,"approval_perbill":614583334,"support_perbill":10518586,"approval":61.4583334,"support":1.0518586},{"time_hours":186,"approval_perbill":612500001,"support_perbill":10442182,"approval":61.2500001,"support":1.0442182},{"time_hours":187,"approval_perbill":610416668,"support_perbill":10366571,"approval":61.0416668,"support":1.0366571},{"time_hours":188,"approval_perbill":608333335,"support_perbill":10291742,"approval":60.8333335,"support":1.0291742},{"time_hours":189,"approval_perbill":606250000,"support_perbill":10217682,"approval":60.625,"support":1.0217682},{"time_hours":190,"approval_perbill":604166667,"support_perbill":10144379,"approval":60.4166667,"support":1.0144379},{"time_hours":191,"approval_perbill":602083334,"support_perbill":10071822,"approval":60.2083334,"support":1.0071822},{"time_hours":192,"approval_perbill":600000001,"support_perbill":10000001,"approval":60.0000001,"support":1.0000001},{"time_hours":193,"approval_perbill":597916668,"support_perbill":9928902,"approval":59.7916668,"support":0.9928902},{"time_hours":194,"approval_perbill":595833334,"support_perbill":9858516,"approval":59.5833334,"support":0.9858516},{"time_hours":195,"approval_perbill":593750001,"support_perbill":9788833,"approval":59.3750001,"support":0.9788833},{"time_hours":196,"approval_perbill":591666668,"support_perbill":9719840,"approval":59.1666668,"support":0.971984},{"time_hours":197,"approval_perbill":589583335,"support_perbill":9651529,"approval":58.9583335,"support":0.9651529},{"time_hours":198,"approval_perbill":587500001,"support_perbill":9583890,"approval":58.7500001,"support":0.958389},{"time_hours":199,"approval_perbill":585416668,"support_perbill":9516912,"approval":58.5416668,"support":0.9516912},{"time_hours":200,"approval_perbill":583333335,"support_perbill":9450585,"approval":58.3333335,"support":0.9450585},{"time_hours":201,"approval_perbill":581250002,"support_perbill":9384901,"approval":58.1250002,"support":0.9384901},{"time_hours":202,"approval_perbill":579166667,"support_perbill":9319850,"approval":57.9166667,"support":0.931985},{"time_hours":203,"approval_perbill":577083334,"support_perbill":9255422,"approval":57.7083334,"support":0.9255422},{"time_hours":204,"approval_perbill":575000001,"support_perbill":9191610,"approval":57.5000001,"support":0.919161},{"time_hours":205,"approval_perbill":572916668,"support_perbill":9128404,"approval":57.2916668,"support":0.9128404},{"time_hours":206,"approval_perbill":570833334,"support_perbill":9065795,"approval":57.0833334,"support":0.9065795},{"time_hours":207,"approval_perbill":568750001,"support_perbill":9003776,"approval":56.8750001,"support":0.9003776},{"time_hours":208,"approval_perbill":566666668,"support_perbill":8942338,"approval":56.6666668,"support":0.8942338},{"time_hours":209,"approval_perbill":564583335,"support_perbill":8881472,"approval":56.4583335,"support":0.8881472},{"time_hours":210,"approval_perbill":562500000,"support_perbill":8821171,"approval":56.25,"support":0.8821171},{"time_hours":211,"approval_perbill":560416667,"support_perbill":8761427,"approval":56.0416667,"support":0.8761427},{"time_hours":212,"approval_perbill":558333334,"support_perbill":8702233,"approval":55.8333334,"support":0.8702233},{"time_hours":213,"approval_perbill":556250001,"support_perbill":8643580,"approval":55.6250001,"support":0.864358},{"time_hours":214,"approval_perbill":554166668,"support_perbill":8585461,"approval":55.4166668,"support":0.8585461},{"time_hours":215,"approval_perbill":552083334,"support_perbill":8527870,"approval":55.2083334,"support":0.852787},{"time_hours":216,"approval_perbill":550000001,"support_perbill":8470798,"approval":55.0000001,"support":0.8470798},{"time_hours":217,"approval_perbill":547916668,"support_perbill":8414240,"approval":54.7916668,"support":0.841424},{"time_hours":218,"approval_perbill":545833335,"support_perbill":8358187,"approval":54.5833335,"support":0.8358187},{"time_hours":219,"approval_perbill":543750001,"support_perbill":8302634,"approval":54.3750001,"support":0.8302634},{"time_hours":220,"approval_perbill":541666668,"support_perbill":8247573,"approval":54.1666668,"support":0.8247573},{"time_hours":221,"approval_perbill":539583335,"support_perbill":8192999,"approval":53.9583335,"support":0.8192999},{"time_hours":222,"approval_perbill":537500002,"support_perbill":8138904,"approval":53.7500002,"support":0.8138904},{"time_hours":223,"approval_perbill":535416667,"support_perbill":8085283,"approval":53.5416667,"support":0.8085283},{"time_hours":224,"approval_perbill":533333334,"support_perbill":8032129,"approval":53.3333334,"support":0.8032129},{"time_hours":225,"approval_perbill":531250001,"support_perbill":7979436,"approval":53.1250001,"support":0.7979436},{"time_hours":226,"approval_perbill":529166668,"support_perbill":7927198,"approval":52.9166668,"support":0.7927198},{"time_hours":227,"approval_perbill":527083334,"support_perbill":7875409,"approval":52.7083334,"support":0.7875409},{"time_hours":228,"approval_perbill":525000001,"support_perbill":7824065,"approval":52.5000001,"support":0.7824065},{"time_hours":229,"approval_perbill":522916668,"support_perbill":7773157,"approval":52.2916668,"support":0.7773157},{"time_hours":230,"approval_perbill":520833335,"support_perbill":7722683,"approval":52.0833335,"support":0.7722683},{"time_hours":231,"approval_perbill":518750000,"support_perbill":7672634,"approval":51.875,"support":0.7672634},{"time_hours":232,"approval_perbill":516666667,"support_perbill":7623008,"approval":51.6666667,"support":0.7623008},{"time_hours":233,"approval_perbill":514583334,"support_perbill":7573797,"approval":51.4583334,"support":0.7573797},{"time_hours":234,"approval_perbill":512500001,"support_perbill":7524998,"approval":51.2500001,"support":0.7524998},{"time_hours":235,"approval_perbill":510416668,"support_perbill":7476604,"approval":51.0416668,"support":0.7476604},{"time_hours":236,"approval_perbill":508333334,"support_perbill":7428611,"approval":50.8333334,"support":0.7428611},{"time_hours":237,"approval_perbill":506250001,"support_perbill":7381013,"approval":50.6250001,"support":0.7381013},{"time_hours":238,"approval_perbill":504166668,"support_perbill":7333807,"approval":50.4166668,"support":0.7333807},{"time_hours":239,"approval_perbill":502083335,"support_perbill":7286986,"approval":50.2083335,"support":0.7286986},{"time_hours":240,"approval_perbill":500000000,"support_perbill":7240547,"approval":50,"support":0.7240547},{"time_hours":241,"approval_perbill":500000000,"support_perbill":7194485,"approval":50,"support":0.7194485},{"time_hours":242,"approval_perbill":500000000,"support_perbill":7148795,"approval":50,"support":0.7148795},{"time_hours":243,"approval_perbill":500000000,"support_perbill":7103472,"approval":50,"support":0.7103472},{"time_hours":244,"approval_perbill":500000000,"support_perbill":7058513,"approval":50,"support":0.7058513},{"time_hours":245,"approval_perbill":500000000,"support_perbill":7013913,"approval":50,"support":0.7013913},{"time_hours":246,"approval_perbill":500000000,"support_perbill":6969667,"approval":50,"support":0.6969667},{"time_hours":247,"approval_perbill":500000000,"support_perbill":6925772,"approval":50,"support":0.6925772},{"time_hours":248,"approval_perbill":500000000,"support_perbill":6882223,"approval":50,"support":0.6882223},{"time_hours":249,"approval_perbill":500000000,"support_perbill":6839016,"approval":50,"support":0.6839016},{"time_hours":250,"approval_perbill":500000000,"support_perbill":6796148,"approval":50,"support":0.6796148},{"time_hours":251,"approval_perbill":500000000,"support_perbill":6753614,"approval":50,"support":0.6753614},{"time_hours":252,"approval_perbill":500000000,"support_perbill":6711409,"approval":50,"support":0.6711409},{"time_hours":253,"approval_perbill":500000000,"support_perbill":6669532,"approval":50,"support":0.6669532},{"time_hours":254,"approval_perbill":500000000,"support_perbill":6627977,"approval":50,"support":0.6627977},{"time_hours":255,"approval_perbill":500000000,"support_perbill":6586741,"approval":50,"support":0.6586741},{"time_hours":256,"approval_perbill":500000000,"support_perbill":6545821,"approval":50,"support":0.6545821},{"time_hours":257,"approval_perbill":500000000,"support_perbill":6505212,"approval":50,"support":0.6505212},{"time_hours":258,"approval_perbill":500000000,"support_perbill":6464912,"approval":50,"support":0.6464912},{"time_hours":259,"approval_perbill":500000000,"support_perbill":6424916,"approval":50,"support":0.6424916},{"time_hours":260,"approval_perbill":500000000,"support_perbill":6385221,"approval":50,"support":0.6385221},{"time_hours":261,"approval_perbill":500000000,"support_perbill":6345824,"approval":50,"support":0.6345824},{"time_hours":262,"approval_perbill":500000000,"support_perbill":6306722,"approval":50,"support":0.6306722},{"time_hours":263,"approval_perbill":500000000,"support_perbill":6267911,"approval":50,"support":0.6267911},{"time_hours":264,"approval_perbill":500000000,"support_perbill":6229388,"approval":50,"support":0.6229388},{"time_hours":265,"approval_perbill":500000000,"support_perbill":6191150,"approval":50,"support":0.619115},{"time_hours":266,"approval_perbill":500000000,"support_perbill":6153193,"approval":50,"support":0.6153193},{"time_hours":267,"approval_perbill":500000000,"support_perbill":6115515,"approval":50,"support":0.6115515},{"time_hours":268,"approval_perbill":500000000,"support_perbill":6078113,"approval":50,"support":0.6078113},{"time_hours":269,"approval_perbill":500000000,"support_perbill":6040983,"approval":50,"support":0.6040983},{"time_hours":270,"approval_perbill":500000000,"support_perbill":6004122,"approval":50,"support":0.6004122},{"time_hours":271,"approval_perbill":500000000,"support_perbill":5967528,"approval":50,"support":0.5967528},{"time_hours":272,"approval_perbill":500000000,"support_perbill":5931198,"approval":50,"support":0.5931198},{"time_hours":273,"approval_perbill":500000000,"support_perbill":5895129,"approval":50,"support":0.5895129},{"time_hours":274,"approval_perbill":500000000,"support_perbill":5859317,"approval":50,"support":0.5859317},{"time_hours":275,"approval_perbill":500000000,"support_perbill":5823762,"approval":50,"support":0.5823762},{"time_hours":276,"approval_perbill":500000000,"support_perbill":5788458,"approval":50,"support":0.5788458},{"time_hours":277,"approval_perbill":500000000,"support_perbill":5753405,"approval":50,"support":0.5753405},{"time_hours":278,"approval_perbill":500000000,"support_perbill":5718598,"approval":50,"support":0.5718598},{"time_hours":279,"approval_perbill":500000000,"support_perbill":5684037,"approval":50,"support":0.5684037},{"time_hours":280,"approval_perbill":500000000,"support_perbill":5649718,"approval":50,"support":0.5649718},{"time_hours":281,"approval_perbill":500000000,"support_perbill":5615638,"approval":50,"support":0.5615638},{"time_hours":282,"approval_perbill":500000000,"support_perbill":5581795,"approval":50,"support":0.5581795},{"time_hours":283,"approval_perbill":500000000,"support_perbill":5548186,"approval":50,"support":0.5548186},{"time_hours":284,"approval_perbill":500000000,"support_perbill":5514810,"approval":50,"support":0.551481},{"time_hours":285,"approval_perbill":500000000,"support_perbill":5481664,"approval":50,"support":0.5481664},{"time_hours":286,"approval_perbill":500000000,"support_perbill":5448745,"approval":50,"support":0.5448745},{"time_hours":287,"approval_perbill":500000000,"support_perbill":5416051,"approval":50,"support":0.5416051},{"time_hours":288,"approval_perbill":500000000,"support_perbill":5383580,"approval":50,"support":0.538358},{"time_hours":289,"approval_perbill":500000000,"support_perbill":5351329,"approval":50,"support":0.5351329},{"time_hours":290,"approval_perbill":500000000,"support_perbill":5319297,"approval":50,"support":0.5319297},{"time_hours":291,"approval_perbill":500000000,"support_perbill":5287481,"approval":50,"support":0.5287481},{"time_hours":292,"approval_perbill":500000000,"support_perbill":5255878,"approval":50,"support":0.5255878},{"time_hours":293,"approval_perbill":500000000,"support_perbill":5224487,"approval":50,"support":0.5224487},{"time_hours":294,"approval_perbill":500000000,"support_perbill":5193306,"approval":50,"support":0.5193306},{"time_hours":295,"approval_perbill":500000000,"support_perbill":5162333,"approval":50,"support":0.5162333},{"time_hours":296,"approval_perbill":500000000,"support_perbill":5131565,"approval":50,"support":0.5131565},{"time_hours":297,"approval_perbill":500000000,"support_perbill":5101000,"approval":50,"support":0.5101},{"time_hours":298,"approval_perbill":500000000,"support_perbill":5070636,"approval":50,"support":0.5070636},{"time_hours":299,"approval_perbill":500000000,"support_perbill":5040472,"approval":50,"support":0.5040472},{"time_hours":300,"approval_perbill":500000000,"support_perbill":5010506,"approval":50,"support":0.5010506},{"time_hours":301,"approval_perbill":500000000,"support_perbill":4980735,"approval":50,"support":0.4980735},{"time_hours":302,"approval_perbill":500000000,"support_perbill":4951157,"approval":50,"support":0.4951157},{"time_hours":303,"approval_perbill":500000000,"support_perbill":4921772,"approval":50,"support":0.4921772},{"time_hours":304,"approval_perbill":500000000,"support_perbill":4892576,"approval":50,"support":0.4892576},{"time_hours":305,"approval_perbill":500000000,"support_perbill":4863568,"approval":50,"support":0.4863568},{"time_hours":306,"approval_perbill":500000000,"support_perbill":4834747,"approval":50,"support":0.4834747},{"time_hours":307,"approval_perbill":500000000,"support_perbill":4806110,"approval":50,"support":0.480611},{"time_hours":308,"approval_perbill":500000000,"support_perbill":4777655,"approval":50,"support":0.4777655},{"time_hours":309,"approval_perbill":500000000,"support_perbill":4749382,"approval":50,"support":0.4749382},{"time_hours":310,"approval_perbill":500000000,"support_perbill":4721287,"approval":50,"support":0.4721287},{"time_hours":311,"approval_perbill":500000000,"support_perbill":4693371,"approval":50,"support":0.4693371},{"time_hours":312,"approval_perbill":500000000,"support_perbill":4665630,"approval":50,"support":0.466563},{"time_hours":313,"approval_perbill":500000000,"support_perbill":4638063,"approval":50,"support":0.4638063},{"time_hours":314,"approval_perbill":500000000,"support_perbill":4610669,"approval":50,"support":0.4610669},{"time_hours":315,"approval_perbill":500000000,"support_perbill":4583446,"approval":50,"support":0.4583446},{"time_hours":316,"approval_perbill":500000000,"support_perbill":4556392,"approval":50,"support":0.4556392},{"time_hours":317,"approval_perbill":500000000,"support_perbill":4529505,"approval":50,"support":0.4529505},{"time_hours":318,"approval_perbill":500000000,"support_perbill":4502785,"approval":50,"support":0.4502785},{"time_hours":319,"approval_perbill":500000000,"support_perbill":4476230,"approval":50,"support":0.447623},{"time_hours":320,"approval_perbill":500000000,"support_perbill":4449838,"approval":50,"support":0.4449838},{"time_hours":321,"approval_perbill":500000000,"support_perbill":4423608,"approval":50,"support":0.4423608},{"time_hours":322,"approval_perbill":500000000,"support_perbill":4397537,"approval":50,"support":0.4397537},{"time_hours":323,"approval_perbill":500000000,"support_perbill":4371626,"approval":50,"support":0.4371626},{"time_hours":324,"approval_perbill":500000000,"support_perbill":4345871,"approval":50,"support":0.4345871},{"time_hours":325,"approval_perbill":500000000,"support_perbill":4320273,"approval":50,"support":0.4320273},{"time_hours":326,"approval_perbill":500000000,"support_perbill":4294829,"approval":50,"support":0.4294829},{"time_hours":327,"approval_perbill":500000000,"support_perbill":4269538,"approval":50,"support":0.4269538},{"time_hours":328,"approval_perbill":500000000,"support_perbill":4244398,"approval":50,"support":0.4244398},{"time_hours":329,"approval_perbill":500000000,"support_perbill":4219409,"approval":50,"support":0.4219409},{"time_hours":330,"approval_perbill":500000000,"support_perbill":4194569,"approval":50,"support":0.4194569},{"time_hours":331,"approval_perbill":500000000,"support_perbill":4169876,"approval":50,"support":0.4169876},{"time_hours":332,"approval_perbill":500000000,"support_perbill":4145330,"approval":50,"support":0.414533},{"time_hours":333,"approval_perbill":500000000,"support_perbill":4120929,"approval":50,"support":0.4120929},{"time_hours":334,"approval_perbill":500000000,"support_perbill":4096672,"approval":50,"support":0.4096672},{"time_hours":335,"approval_perbill":500000000,"support_perbill":4072557,"approval":50,"support":0.4072557},{"time_hours":336,"approval_perbill":500000000,"support_perbill":4048583,"approval":50,"support":0.4048583},{"time_hours":337,"approval_perbill":500000000,"support_perbill":4024749,"approval":50,"support":0.4024749},{"time_hours":338,"approval_perbill":500000000,"support_perbill":4001054,"approval":50,"support":0.4001054},{"time_hours":339,"approval_perbill":500000000,"support_perbill":3977496,"approval":50,"support":0.3977496},{"time_hours":340,"approval_perbill":500000000,"support_perbill":3954075,"approval":50,"support":0.3954075},{"time_hours":341,"approval_perbill":500000000,"support_perbill":3930789,"approval":50,"support":0.3930789},{"time_hours":342,"approval_perbill":500000000,"support_perbill":3907637,"approval":50,"support":0.3907637},{"time_hours":343,"approval_perbill":500000000,"support_perbill":3884618,"approval":50,"support":0.3884618},{"time_hours":344,"approval_perbill":500000000,"support_perbill":3861731,"approval":50,"support":0.3861731},{"time_hours":345,"approval_perbill":500000000,"support_perbill":3838974,"approval":50,"support":0.3838974},{"time_hours":346,"approval_perbill":500000000,"support_perbill":3816347,"approval":50,"support":0.3816347},{"time_hours":347,"approval_perbill":500000000,"support_perbill":3793848,"approval":50,"support":0.3793848},{"time_hours":348,"approval_perbill":500000000,"support_perbill":3771476,"approval":50,"support":0.3771476},{"time_hours":349,"approval_perbill":500000000,"support_perbill":3749231,"approval":50,"support":0.3749231},{"time_hours":350,"approval_perbill":500000000,"support_perbill":3727110,"approval":50,"support":0.372711},{"time_hours":351,"approval_perbill":500000000,"support_perbill":3705114,"approval":50,"support":0.3705114},{"time_hours":352,"approval_perbill":500000000,"support_perbill":3683241,"approval":50,"support":0.3683241},{"time_hours":353,"approval_perbill":500000000,"support_perbill":3661490,"approval":50,"support":0.366149},{"time_hours":354,"approval_perbill":500000000,"support_perbill":3639860,"approval":50,"support":0.363986},{"time_hours":355,"approval_perbill":500000000,"support_perbill":3618349,"approval":50,"support":0.3618349},{"time_hours":356,"approval_perbill":500000000,"support_perbill":3596958,"approval":50,"support":0.3596958},{"time_hours":357,"approval_perbill":500000000,"support_perbill":3575685,"approval":50,"support":0.3575685},{"time_hours":358,"approval_perbill":500000000,"support_perbill":3554529,"approval":50,"support":0.3554529},{"time_hours":359,"approval_perbill":500000000,"support_perbill":3533489,"approval":50,"support":0.3533489},{"time_hours":360,"approval_perbill":500000000,"support_perbill":3512564,"approval":50,"support":0.3512564},{"time_hours":361,"approval_perbill":500000000,"support_perbill":3491753,"approval":50,"support":0.3491753},{"time_hours":362,"approval_perbill":500000000,"support_perbill":3471056,"approval":50,"support":0.3471056},{"time_hours":363,"approval_perbill":500000000,"support_perbill":3450470,"approval":50,"support":0.345047},{"time_hours":364,"approval_perbill":500000000,"support_perbill":3429997,"approval":50,"support":0.3429997},{"time_hours":365,"approval_perbill":500000000,"support_perbill":3409633,"approval":50,"support":0.3409633},{"time_hours":366,"approval_perbill":500000000,"support_perbill":3389380,"approval":50,"support":0.338938},{"time_hours":367,"approval_perbill":500000000,"support_perbill":3369235,"approval":50,"support":0.3369235},{"time_hours":368,"approval_perbill":500000000,"support_perbill":3349198,"approval":50,"support":0.3349198},{"time_hours":369,"approval_perbill":500000000,"support_perbill":3329268,"approval":50,"support":0.3329268},{"time_hours":370,"approval_perbill":500000000,"support_perbill":3309444,"approval":50,"support":0.3309444},{"time_hours":371,"approval_perbill":500000000,"support_perbill":3289725,"approval":50,"support":0.3289725},{"time_hours":372,"approval_perbill":500000000,"support_perbill":3270111,"approval":50,"support":0.3270111},{"time_hours":373,"approval_perbill":500000000,"support_perbill":3250600,"approval":50,"support":0.32506},{"time_hours":374,"approval_perbill":500000000,"support_perbill":3231193,"approval":50,"support":0.3231193},{"time_hours":375,"approval_perbill":500000000,"support_perbill":3211887,"approval":50,"support":0.3211887},{"time_hours":376,"approval_perbill":500000000,"support_perbill":3192682,"approval":50,"support":0.3192682},{"time_hours":377,"approval_perbill":500000000,"support_perbill":3173578,"approval":50,"support":0.3173578},{"time_hours":378,"approval_perbill":500000000,"support_perbill":3154574,"approval":50,"support":0.3154574},{"time_hours":379,"approval_perbill":500000000,"support_perbill":3135668,"approval":50,"support":0.3135668},{"time_hours":380,"approval_perbill":500000000,"support_perbill":3116861,"approval":50,"support":0.3116861},{"time_hours":381,"approval_perbill":500000000,"support_perbill":3098150,"approval":50,"support":0.309815},{"time_hours":382,"approval_perbill":500000000,"support_perbill":3079537,"approval":50,"support":0.3079537},{"time_hours":383,"approval_perbill":500000000,"support_perbill":3061019,"approval":50,"support":0.3061019},{"time_hours":384,"approval_perbill":500000000,"support_perbill":3042596,"approval":50,"support":0.3042596},{"time_hours":385,"approval_perbill":500000000,"support_perbill":3024268,"approval":50,"support":0.3024268},{"time_hours":386,"approval_perbill":500000000,"support_perbill":3006033,"approval":50,"support":0.3006033},{"time_hours":387,"approval_perbill":500000000,"support_perbill":2987891,"approval":50,"support":0.2987891},{"time_hours":388,"approval_perbill":500000000,"support_perbill":2969841,"approval":50,"support":0.2969841},{"time_hours":389,"approval_perbill":500000000,"support_perbill":2951883,"approval":50,"support":0.2951883},{"time_hours":390,"approval_perbill":500000000,"support_perbill":2934016,"approval":50,"support":0.2934016},{"time_hours":391,"approval_perbill":500000000,"support_perbill":2916238,"approval":50,"support":0.2916238},{"time_hours":392,"approval_perbill":500000000,"support_perbill":2898550,"approval":50,"support":0.289855},{"time_hours":393,"approval_perbill":500000000,"support_perbill":2880951,"approval":50,"support":0.2880951},{"time_hours":394,"approval_perbill":500000000,"support_perbill":2863440,"approval":50,"support":0.286344},{"time_hours":395,"approval_perbill":500000000,"support_perbill":2846017,"approval":50,"support":0.2846017},{"time_hours":396,"approval_perbill":500000000,"support_perbill":2828680,"approval":50,"support":0.282868},{"time_hours":397,"approval_perbill":500000000,"support_perbill":2811429,"approval":50,"support":0.2811429},{"time_hours":398,"approval_perbill":500000000,"support_perbill":2794264,"approval":50,"support":0.2794264},{"time_hours":399,"approval_perbill":500000000,"support_perbill":2777184,"approval":50,"support":0.2777184},{"time_hours":400,"approval_perbill":500000000,"support_perbill":2760188,"approval":50,"support":0.2760188},{"time_hours":401,"approval_perbill":500000000,"support_perbill":2743276,"approval":50,"support":0.2743276},{"time_hours":402,"approval_perbill":500000000,"support_perbill":2726446,"approval":50,"support":0.2726446},{"time_hours":403,"approval_perbill":500000000,"support_perbill":2709699,"approval":50,"support":0.2709699},{"time_hours":404,"approval_perbill":500000000,"support_perbill":2693034,"approval":50,"support":0.2693034},{"time_hours":405,"approval_perbill":500000000,"support_perbill":2676450,"approval":50,"support":0.267645},{"time_hours":406,"approval_perbill":500000000,"support_perbill":2659946,"approval":50,"support":0.2659946},{"time_hours":407,"approval_perbill":500000000,"support_perbill":2643523,"approval":50,"support":0.2643523},{"time_hours":408,"approval_perbill":500000000,"support_perbill":2627179,"approval":50,"support":0.2627179},{"time_hours":409,"approval_perbill":500000000,"support_perbill":2610914,"approval":50,"support":0.2610914},{"time_hours":410,"approval_perbill":500000000,"support_perbill":2594727,"approval":50,"support":0.2594727},{"time_hours":411,"approval_perbill":500000000,"support_perbill":2578618,"approval":50,"support":0.2578618},{"time_hours":412,"approval_perbill":500000000,"support_perbill":2562586,"approval":50,"support":0.2562586},{"time_hours":413,"approval_perbill":500000000,"support_perbill":2546630,"approval":50,"support":0.254663},{"time_hours":414,"approval_perbill":500000000,"support_perbill":2530751,"approval":50,"support":0.2530751},{"time_hours":415,"approval_perbill":500000000,"support_perbill":2514947,"approval":50,"support":0.2514947},{"time_hours":416,"approval_perbill":500000000,"support_perbill":2499219,"approval":50,"support":0.2499219},{"time_hours":417,"approval_perbill":500000000,"support_perbill":2483564,"approval":50,"support":0.2483564},{"time_hours":418,"approval_perbill":500000000,"support_perbill":2467984,"approval":50,"support":0.2467984},{"time_hours":419,"approval_perbill":500000000,"support_perbill":2452477,"approval":50,"support":0.2452477},{"time_hours":420,"approval_perbill":500000000,"support_perbill":2437043,"approval":50,"support":0.2437043},{"time_hours":421,"approval_perbill":500000000,"support_perbill":2421681,"approval":50,"support":0.2421681},{"time_hours":422,"approval_perbill":500000000,"support_perbill":2406391,"approval":50,"support":0.2406391},{"time_hours":423,"approval_perbill":500000000,"support_perbill":2391172,"approval":50,"support":0.2391172},{"time_hours":424,"approval_perbill":500000000,"support_perbill":2376025,"approval":50,"support":0.2376025},{"time_hours":425,"approval_perbill":500000000,"support_perbill":2360947,"approval":50,"support":0.2360947},{"time_hours":426,"approval_perbill":500000000,"support_perbill":2345940,"approval":50,"support":0.234594},{"time_hours":427,"approval_perbill":500000000,"support_perbill":2331002,"approval":50,"support":0.2331002},{"time_hours":428,"approval_perbill":500000000,"support_perbill":2316133,"approval":50,"support":0.2316133},{"time_hours":429,"approval_perbill":500000000,"support_perbill":2301332,"approval":50,"support":0.2301332},{"time_hours":430,"approval_perbill":500000000,"support_perbill":2286599,"approval":50,"support":0.2286599},{"time_hours":431,"approval_perbill":500000000,"support_perbill":2271934,"approval":50,"support":0.2271934},{"time_hours":432,"approval_perbill":500000000,"support_perbill":2257336,"approval":50,"support":0.2257336},{"time_hours":433,"approval_perbill":500000000,"support_perbill":2242804,"approval":50,"support":0.2242804},{"time_hours":434,"approval_perbill":500000000,"support_perbill":2228339,"approval":50,"support":0.2228339},{"time_hours":435,"approval_perbill":500000000,"support_perbill":2213939,"approval":50,"support":0.2213939},{"time_hours":436,"approval_perbill":500000000,"support_perbill":2199604,"approval":50,"support":0.2199604},{"time_hours":437,"approval_perbill":500000000,"support_perbill":2185335,"approval":50,"support":0.2185335},{"time_hours":438,"approval_perbill":500000000,"support_perbill":2171129,"approval":50,"support":0.2171129},{"time_hours":439,"approval_perbill":500000000,"support_perbill":2156988,"approval":50,"support":0.2156988},{"time_hours":440,"approval_perbill":500000000,"support_perbill":2142909,"approval":50,"support":0.2142909},{"time_hours":441,"approval_perbill":500000000,"support_perbill":2128894,"approval":50,"support":0.2128894},{"time_hours":442,"approval_perbill":500000000,"support_perbill":2114942,"approval":50,"support":0.2114942},{"time_hours":443,"approval_perbill":500000000,"support_perbill":2101052,"approval":50,"support":0.2101052},{"time_hours":444,"approval_perbill":500000000,"support_perbill":2087224,"approval":50,"support":0.2087224},{"time_hours":445,"approval_perbill":500000000,"support_perbill":2073457,"approval":50,"support":0.2073457},{"time_hours":446,"approval_perbill":500000000,"support_perbill":2059751,"approval":50,"support":0.2059751},{"time_hours":447,"approval_perbill":500000000,"support_perbill":2046105,"approval":50,"support":0.2046105},{"time_hours":448,"approval_perbill":500000000,"support_perbill":2032520,"approval":50,"support":0.203252},{"time_hours":449,"approval_perbill":500000000,"support_perbill":2018994,"approval":50,"support":0.2018994},{"time_hours":450,"approval_perbill":500000000,"support_perbill":2005528,"approval":50,"support":0.2005528},{"time_hours":451,"approval_perbill":500000000,"support_perbill":1992121,"approval":50,"support":0.1992121},{"time_hours":452,"approval_perbill":500000000,"support_perbill":1978773,"approval":50,"support":0.1978773},{"time_hours":453,"approval_perbill":500000000,"support_perbill":1965482,"approval":50,"support":0.1965482},{"time_hours":454,"approval_perbill":500000000,"support_perbill":1952250,"approval":50,"support":0.195225},{"time_hours":455,"approval_perbill":500000000,"support_perbill":1939075,"approval":50,"support":0.1939075},{"time_hours":456,"approval_perbill":500000000,"support_perbill":1925957,"approval":50,"support":0.1925957},{"time_hours":457,"approval_perbill":500000000,"support_perbill":1912896,"approval":50,"support":0.1912896},{"time_hours":458,"approval_perbill":500000000,"support_perbill":1899891,"approval":50,"support":0.1899891},{"time_hours":459,"approval_perbill":500000000,"support_perbill":1886942,"approval":50,"support":0.1886942},{"time_hours":460,"approval_perbill":500000000,"support_perbill":1874049,"approval":50,"support":0.1874049},{"time_hours":461,"approval_perbill":500000000,"support_perbill":1861211,"approval":50,"support":0.1861211},{"time_hours":462,"approval_perbill":500000000,"support_perbill":1848428,"approval":50,"support":0.1848428},{"time_hours":463,"approval_perbill":500000000,"support_perbill":1835700,"approval":50,"support":0.18357},{"time_hours":464,"approval_perbill":500000000,"support_perbill":1823026,"approval":50,"support":0.1823026},{"time_hours":465,"approval_perbill":500000000,"support_perbill":1810405,"approval":50,"support":0.1810405},{"time_hours":466,"approval_perbill":500000000,"support_perbill":1797839,"approval":50,"support":0.1797839},{"time_hours":467,"approval_perbill":500000000,"support_perbill":1785325,"approval":50,"support":0.1785325},{"time_hours":468,"approval_perbill":500000000,"support_perbill":1772864,"approval":50,"support":0.1772864},{"time_hours":469,"approval_perbill":500000000,"support_perbill":1760456,"approval":50,"support":0.1760456},{"time_hours":470,"approval_perbill":500000000,"support_perbill":1748100,"approval":50,"support":0.17481},{"time_hours":471,"approval_perbill":500000000,"support_perbill":1735796,"approval":50,"support":0.1735796},{"time_hours":472,"approval_perbill":500000000,"support_perbill":1723543,"approval":50,"support":0.1723543},{"time_hours":473,"approval_perbill":500000000,"support_perbill":1711342,"approval":50,"support":0.1711342},{"time_hours":474,"approval_perbill":500000000,"support_perbill":1699191,"approval":50,"support":0.1699191},{"time_hours":475,"approval_perbill":500000000,"support_perbill":1687091,"approval":50,"support":0.1687091},{"time_hours":476,"approval_perbill":500000000,"support_perbill":1675041,"approval":50,"support":0.1675041},{"time_hours":477,"approval_perbill":500000000,"support_perbill":1663042,"approval":50,"support":0.1663042},{"time_hours":478,"approval_perbill":500000000,"support_perbill":1651091,"approval":50,"support":0.1651091},{"time_hours":479,"approval_perbill":500000000,"support_perbill":1639191,"approval":50,"support":0.1639191},{"time_hours":480,"approval_perbill":500000000,"support_perbill":1627339,"approval":50,"support":0.1627339},{"time_hours":481,"approval_perbill":500000000,"support_perbill":1615536,"approval":50,"support":0.1615536},{"time_hours":482,"approval_perbill":500000000,"support_perbill":1603781,"approval":50,"support":0.1603781},{"time_hours":483,"approval_perbill":500000000,"support_perbill":1592075,"approval":50,"support":0.1592075},{"time_hours":484,"approval_perbill":500000000,"support_perbill":1580416,"approval":50,"support":0.1580416},{"time_hours":485,"approval_perbill":500000000,"support_perbill":1568805,"approval":50,"support":0.1568805},{"time_hours":486,"approval_perbill":500000000,"support_perbill":1557241,"approval":50,"support":0.1557241},{"time_hours":487,"approval_perbill":500000000,"support_perbill":1545724,"approval":50,"support":0.1545724},{"time_hours":488,"approval_perbill":500000000,"support_perbill":1534253,"approval":50,"support":0.1534253},{"time_hours":489,"approval_perbill":500000000,"support_perbill":1522829,"approval":50,"support":0.1522829},{"time_hours":490,"approval_perbill":500000000,"support_perbill":1511452,"approval":50,"support":0.1511452},{"time_hours":491,"approval_perbill":500000000,"support_perbill":1500120,"approval":50,"support":0.150012},{"time_hours":492,"approval_perbill":500000000,"support_perbill":1488833,"approval":50,"support":0.1488833},{"time_hours":493,"approval_perbill":500000000,"support_perbill":1477592,"approval":50,"support":0.1477592},{"time_hours":494,"approval_perbill":500000000,"support_perbill":1466396,"approval":50,"support":0.1466396},{"time_hours":495,"approval_perbill":500000000,"support_perbill":1455245,"approval":50,"support":0.1455245},{"time_hours":496,"approval_perbill":500000000,"support_perbill":1444138,"approval":50,"support":0.1444138},{"time_hours":497,"approval_perbill":500000000,"support_perbill":1433075,"approval":50,"support":0.1433075},{"time_hours":498,"approval_perbill":500000000,"support_perbill":1422056,"approval":50,"support":0.1422056},{"time_hours":499,"approval_perbill":500000000,"support_perbill":1411081,"approval":50,"support":0.1411081},{"time_hours":500,"approval_perbill":500000000,"support_perbill":1400149,"approval":50,"support":0.1400149},{"time_hours":501,"approval_perbill":500000000,"support_perbill":1389261,"approval":50,"support":0.1389261},{"time_hours":502,"approval_perbill":500000000,"support_perbill":1378415,"approval":50,"support":0.1378415},{"time_hours":503,"approval_perbill":500000000,"support_perbill":1367612,"approval":50,"support":0.1367612},{"time_hours":504,"approval_perbill":500000000,"support_perbill":1356852,"approval":50,"support":0.1356852},{"time_hours":505,"approval_perbill":500000000,"support_perbill":1346133,"approval":50,"support":0.1346133},{"time_hours":506,"approval_perbill":500000000,"support_perbill":1335457,"approval":50,"support":0.1335457},{"time_hours":507,"approval_perbill":500000000,"support_perbill":1324822,"approval":50,"support":0.1324822},{"time_hours":508,"approval_perbill":500000000,"support_perbill":1314228,"approval":50,"support":0.1314228},{"time_hours":509,"approval_perbill":500000000,"support_perbill":1303676,"approval":50,"support":0.1303676},{"time_hours":510,"approval_perbill":500000000,"support_perbill":1293165,"approval":50,"support":0.1293165},{"time_hours":511,"approval_perbill":500000000,"support_perbill":1282694,"approval":50,"support":0.1282694},{"time_hours":512,"approval_perbill":500000000,"support_perbill":1272264,"approval":50,"support":0.1272264},{"time_hours":513,"approval_perbill":500000000,"support_perbill":1261874,"approval":50,"support":0.1261874},{"time_hours":514,"approval_perbill":500000000,"support_perbill":1251524,"approval":50,"support":0.1251524},{"time_hours":515,"approval_perbill":500000000,"support_perbill":1241214,"approval":50,"support":0.1241214},{"time_hours":516,"approval_perbill":500000000,"support_perbill":1230944,"approval":50,"support":0.1230944},{"time_hours":517,"approval_perbill":500000000,"support_perbill":1220712,"approval":50,"support":0.1220712},{"time_hours":518,"approval_perbill":500000000,"support_perbill":1210520,"approval":50,"support":0.121052},{"time_hours":519,"approval_perbill":500000000,"support_perbill":1200367,"approval":50,"support":0.1200367},{"time_hours":520,"approval_perbill":500000000,"support_perbill":1190252,"approval":50,"support":0.1190252},{"time_hours":521,"approval_perbill":500000000,"support_perbill":1180176,"approval":50,"support":0.1180176},{"time_hours":522,"approval_perbill":500000000,"support_perbill":1170138,"approval":50,"support":0.1170138},{"time_hours":523,"approval_perbill":500000000,"support_perbill":1160137,"approval":50,"support":0.1160137},{"time_hours":524,"approval_perbill":500000000,"support_perbill":1150175,"approval":50,"support":0.1150175},{"time_hours":525,"approval_perbill":500000000,"support_perbill":1140250,"approval":50,"support":0.114025},{"time_hours":526,"approval_perbill":500000000,"support_perbill":1130363,"approval":50,"support":0.1130363},{"time_hours":527,"approval_perbill":500000000,"support_perbill":1120513,"approval":50,"support":0.1120513},{"time_hours":528,"approval_perbill":500000000,"support_perbill":1110699,"approval":50,"support":0.1110699},{"time_hours":529,"approval_perbill":500000000,"support_perbill":1100923,"approval":50,"support":0.1100923},{"time_hours":530,"approval_perbill":500000000,"support_perbill":1091182,"approval":50,"support":0.1091182},{"time_hours":531,"approval_perbill":500000000,"support_perbill":1081479,"approval":50,"support":0.1081479},{"time_hours":532,"approval_perbill":500000000,"support_perbill":1071811,"approval":50,"support":0.1071811},{"time_hours":533,"approval_perbill":500000000,"support_perbill":1062179,"approval":50,"support":0.1062179},{"time_hours":534,"approval_perbill":500000000,"support_perbill":1052583,"approval":50,"support":0.1052583},{"time_hours":535,"approval_perbill":500000000,"support_perbill":1043022,"approval":50,"support":0.1043022},{"time_hours":536,"approval_perbill":500000000,"support_perbill":1033497,"approval":50,"support":0.1033497},{"time_hours":537,"approval_perbill":500000000,"support_perbill":1024007,"approval":50,"support":0.1024007},{"time_hours":538,"approval_perbill":500000000,"support_perbill":1014551,"approval":50,"support":0.1014551},{"time_hours":539,"approval_perbill":500000000,"support_perbill":1005131,"approval":50,"support":0.1005131},{"time_hours":540,"approval_perbill":500000000,"support_perbill":995745,"approval":50,"support":0.0995745},{"time_hours":541,"approval_perbill":500000000,"support_perbill":986393,"approval":50,"support":0.0986393},{"time_hours":542,"approval_perbill":500000000,"support_perbill":977076,"approval":50,"support":0.0977076},{"time_hours":543,"approval_perbill":500000000,"support_perbill":967792,"approval":50,"support":0.0967792},{"time_hours":544,"approval_perbill":500000000,"support_perbill":958542,"approval":50,"support":0.0958542},{"time_hours":545,"approval_perbill":500000000,"support_perbill":949326,"approval":50,"support":0.0949326},{"time_hours":546,"approval_perbill":500000000,"support_perbill":940144,"approval":50,"support":0.0940144},{"time_hours":547,"approval_perbill":500000000,"support_perbill":930994,"approval":50,"support":0.0930994},{"time_hours":548,"approval_perbill":500000000,"support_perbill":921878,"approval":50,"support":0.0921878},{"time_hours":549,"approval_perbill":500000000,"support_perbill":912794,"approval":50,"support":0.0912794},{"time_hours":550,"approval_perbill":500000000,"support_perbill":903743,"approval":50,"support":0.0903743},{"time_hours":551,"approval_perbill":500000000,"support_perbill":894725,"approval":50,"support":0.0894725},{"time_hours":552,"approval_perbill":500000000,"support_perbill":885739,"approval":50,"support":0.0885739},{"time_hours":553,"approval_perbill":500000000,"support_perbill":876785,"approval":50,"support":0.0876785},{"time_hours":554,"approval_perbill":500000000,"support_perbill":867863,"approval":50,"support":0.0867863},{"time_hours":555,"approval_perbill":500000000,"support_perbill":858973,"approval":50,"support":0.0858973},{"time_hours":556,"approval_perbill":500000000,"support_perbill":850115,"approval":50,"support":0.0850115},{"time_hours":557,"approval_perbill":500000000,"support_perbill":841288,"approval":50,"support":0.0841288},{"time_hours":558,"approval_perbill":500000000,"support_perbill":832493,"approval":50,"support":0.0832493},{"time_hours":559,"approval_perbill":500000000,"support_perbill":823729,"approval":50,"support":0.0823729},{"time_hours":560,"approval_perbill":500000000,"support_perbill":814995,"approval":50,"support":0.0814995},{"time_hours":561,"approval_perbill":500000000,"support_perbill":806293,"approval":50,"support":0.0806293},{"time_hours":562,"approval_perbill":500000000,"support_perbill":797621,"approval":50,"support":0.0797621},{"time_hours":563,"approval_perbill":500000000,"support_perbill":788980,"approval":50,"support":0.078898},{"time_hours":564,"approval_perbill":500000000,"support_perbill":780369,"approval":50,"support":0.0780369},{"time_hours":565,"approval_perbill":500000000,"support_perbill":771788,"approval":50,"support":0.0771788},{"time_hours":566,"approval_perbill":500000000,"support_perbill":763237,"approval":50,"support":0.0763237},{"time_hours":567,"approval_perbill":500000000,"support_perbill":754716,"approval":50,"support":0.0754716},{"time_hours":568,"approval_perbill":500000000,"support_perbill":746225,"approval":50,"support":0.0746225},{"time_hours":569,"approval_perbill":500000000,"support_perbill":737764,"approval":50,"support":0.0737764},{"time_hours":570,"approval_perbill":500000000,"support_perbill":729331,"approval":50,"support":0.0729331},{"time_hours":571,"approval_perbill":500000000,"support_perbill":720928,"approval":50,"support":0.0720928},{"time_hours":572,"approval_perbill":500000000,"support_perbill":712555,"approval":50,"support":0.0712555},{"time_hours":573,"approval_perbill":500000000,"support_perbill":704210,"approval":50,"support":0.070421},{"time_hours":574,"approval_perbill":500000000,"support_perbill":695894,"approval":50,"support":0.0695894},{"time_hours":575,"approval_perbill":500000000,"support_perbill":687606,"approval":50,"support":0.0687606},{"time_hours":576,"approval_perbill":500000000,"support_perbill":679347,"approval":50,"support":0.0679347},{"time_hours":577,"approval_perbill":500000000,"support_perbill":671117,"approval":50,"support":0.0671117},{"time_hours":578,"approval_perbill":500000000,"support_perbill":662914,"approval":50,"support":0.0662914},{"time_hours":579,"approval_perbill":500000000,"support_perbill":654740,"approval":50,"support":0.065474},{"time_hours":580,"approval_perbill":500000000,"support_perbill":646594,"approval":50,"support":0.0646594},{"time_hours":581,"approval_perbill":500000000,"support_perbill":638475,"approval":50,"support":0.0638475},{"time_hours":582,"approval_perbill":500000000,"support_perbill":630384,"approval":50,"support":0.0630384},{"time_hours":583,"approval_perbill":500000000,"support_perbill":622320,"approval":50,"support":0.062232},{"time_hours":584,"approval_perbill":500000000,"support_perbill":614284,"approval":50,"support":0.0614284},{"time_hours":585,"approval_perbill":500000000,"support_perbill":606275,"approval":50,"support":0.0606275},{"time_hours":586,"approval_perbill":500000000,"support_perbill":598294,"approval":50,"support":0.0598294},{"time_hours":587,"approval_perbill":500000000,"support_perbill":590339,"approval":50,"support":0.0590339},{"time_hours":588,"approval_perbill":500000000,"support_perbill":582411,"approval":50,"support":0.0582411},{"time_hours":589,"approval_perbill":500000000,"support_perbill":574509,"approval":50,"support":0.0574509},{"time_hours":590,"approval_perbill":500000000,"support_perbill":566634,"approval":50,"support":0.0566634},{"time_hours":591,"approval_perbill":500000000,"support_perbill":558786,"approval":50,"support":0.0558786},{"time_hours":592,"approval_perbill":500000000,"support_perbill":550964,"approval":50,"support":0.0550964},{"time_hours":593,"approval_perbill":500000000,"support_perbill":543167,"approval":50,"support":0.0543167},{"time_hours":594,"approval_perbill":500000000,"support_perbill":535397,"approval":50,"support":0.0535397},{"time_hours":595,"approval_perbill":500000000,"support_perbill":527653,"approval":50,"support":0.0527653},{"time_hours":596,"approval_perbill":500000000,"support_perbill":519935,"approval":50,"support":0.0519935},{"time_hours":597,"approval_perbill":500000000,"support_perbill":512242,"approval":50,"support":0.0512242},{"time_hours":598,"approval_perbill":500000000,"support_perbill":504575,"approval":50,"support":0.0504575},{"time_hours":599,"approval_perbill":500000000,"support_perbill":496933,"approval":50,"support":0.0496933},{"time_hours":600,"approval_perbill":500000000,"support_perbill":489316,"approval":50,"support":0.0489316},{"time_hours":601,"approval_perbill":500000000,"support_perbill":481724,"approval":50,"support":0.0481724},{"time_hours":602,"approval_perbill":500000000,"support_perbill":474158,"approval":50,"support":0.0474158},{"time_hours":603,"approval_perbill":500000000,"support_perbill":466616,"approval":50,"support":0.0466616},{"time_hours":604,"approval_perbill":500000000,"support_perbill":459099,"approval":50,"support":0.0459099},{"time_hours":605,"approval_perbill":500000000,"support_perbill":451607,"approval":50,"support":0.0451607},{"time_hours":606,"approval_perbill":500000000,"support_perbill":444139,"approval":50,"support":0.0444139},{"time_hours":607,"approval_perbill":500000000,"support_perbill":436695,"approval":50,"support":0.0436695},{"time_hours":608,"approval_perbill":500000000,"support_perbill":429276,"approval":50,"support":0.0429276},{"time_hours":609,"approval_perbill":500000000,"support_perbill":421881,"approval":50,"support":0.0421881},{"time_hours":610,"approval_perbill":500000000,"support_perbill":414510,"approval":50,"support":0.041451},{"time_hours":611,"approval_perbill":500000000,"support_perbill":407163,"approval":50,"support":0.0407163},{"time_hours":612,"approval_perbill":500000000,"support_perbill":399839,"approval":50,"support":0.0399839},{"time_hours":613,"approval_perbill":500000000,"support_perbill":392540,"approval":50,"support":0.039254},{"time_hours":614,"approval_perbill":500000000,"support_perbill":385264,"approval":50,"support":0.0385264},{"time_hours":615,"approval_perbill":500000000,"support_perbill":378011,"approval":50,"support":0.0378011},{"time_hours":616,"approval_perbill":500000000,"support_perbill":370782,"approval":50,"support":0.0370782},{"time_hours":617,"approval_perbill":500000000,"support_perbill":363576,"approval":50,"support":0.0363576},{"time_hours":618,"approval_perbill":500000000,"support_perbill":356393,"approval":50,"support":0.0356393},{"time_hours":619,"approval_perbill":500000000,"support_perbill":349233,"approval":50,"support":0.0349233},{"time_hours":620,"approval_perbill":500000000,"support_perbill":342096,"approval":50,"support":0.0342096},{"time_hours":621,"approval_perbill":500000000,"support_perbill":334981,"approval":50,"support":0.0334981},{"time_hours":622,"approval_perbill":500000000,"support_perbill":327890,"approval":50,"support":0.032789},{"time_hours":623,"approval_perbill":500000000,"support_perbill":320821,"approval":50,"support":0.0320821},{"time_hours":624,"approval_perbill":500000000,"support_perbill":313774,"approval":50,"support":0.0313774},{"time_hours":625,"approval_perbill":500000000,"support_perbill":306750,"approval":50,"support":0.030675},{"time_hours":626,"approval_perbill":500000000,"support_perbill":299748,"approval":50,"support":0.0299748},{"time_hours":627,"approval_perbill":500000000,"support_perbill":292768,"approval":50,"support":0.0292768},{"time_hours":628,"approval_perbill":500000000,"support_perbill":285810,"approval":50,"support":0.028581},{"time_hours":629,"approval_perbill":500000000,"support_perbill":278874,"approval":50,"support":0.0278874},{"time_hours":630,"approval_perbill":500000000,"support_perbill":271960,"approval":50,"support":0.027196},{"time_hours":631,"approval_perbill":500000000,"support_perbill":265068,"approval":50,"support":0.0265068},{"time_hours":632,"approval_perbill":500000000,"support_perbill":258197,"approval":50,"support":0.0258197},{"time_hours":633,"approval_perbill":500000000,"support_perbill":251348,"approval":50,"support":0.0251348},{"time_hours":634,"approval_perbill":500000000,"support_perbill":244520,"approval":50,"support":0.024452},{"time_hours":635,"approval_perbill":500000000,"support_perbill":237714,"approval":50,"support":0.0237714},{"time_hours":636,"approval_perbill":500000000,"support_perbill":230928,"approval":50,"support":0.0230928},{"time_hours":637,"approval_perbill":500000000,"support_perbill":224164,"approval":50,"support":0.0224164},{"time_hours":638,"approval_perbill":500000000,"support_perbill":217421,"approval":50,"support":0.0217421},{"time_hours":639,"approval_perbill":500000000,"support_perbill":210699,"approval":50,"support":0.0210699},{"time_hours":640,"approval_perbill":500000000,"support_perbill":203998,"approval":50,"support":0.0203998},{"time_hours":641,"approval_perbill":500000000,"support_perbill":197317,"approval":50,"support":0.0197317},{"time_hours":642,"approval_perbill":500000000,"support_perbill":190657,"approval":50,"support":0.0190657},{"time_hours":643,"approval_perbill":500000000,"support_perbill":184018,"approval":50,"support":0.0184018},{"time_hours":644,"approval_perbill":500000000,"support_perbill":177399,"approval":50,"support":0.0177399},{"time_hours":645,"approval_perbill":500000000,"support_perbill":170800,"approval":50,"support":0.01708},{"time_hours":646,"approval_perbill":500000000,"support_perbill":164222,"approval":50,"support":0.0164222},{"time_hours":647,"approval_perbill":500000000,"support_perbill":157663,"approval":50,"support":0.0157663},{"time_hours":648,"approval_perbill":500000000,"support_perbill":151125,"approval":50,"support":0.0151125},{"time_hours":649,"approval_perbill":500000000,"support_perbill":144607,"approval":50,"support":0.0144607},{"time_hours":650,"approval_perbill":500000000,"support_perbill":138109,"approval":50,"support":0.0138109},{"time_hours":651,"approval_perbill":500000000,"support_perbill":131630,"approval":50,"support":0.013163},{"time_hours":652,"approval_perbill":500000000,"support_perbill":125171,"approval":50,"support":0.0125171},{"time_hours":653,"approval_perbill":500000000,"support_perbill":118732,"approval":50,"support":0.0118732},{"time_hours":654,"approval_perbill":500000000,"support_perbill":112313,"approval":50,"support":0.0112313},{"time_hours":655,"approval_perbill":500000000,"support_perbill":105912,"approval":50,"support":0.0105912},{"time_hours":656,"approval_perbill":500000000,"support_perbill":99532,"approval":50,"support":0.0099532},{"time_hours":657,"approval_perbill":500000000,"support_perbill":93170,"approval":50,"support":0.009317},{"time_hours":658,"approval_perbill":500000000,"support_perbill":86827,"approval":50,"support":0.0086827},{"time_hours":659,"approval_perbill":500000000,"support_perbill":80504,"approval":50,"support":0.0080504},{"time_hours":660,"approval_perbill":500000000,"support_perbill":74200,"approval":50,"support":0.00742},{"time_hours":661,"approval_perbill":500000000,"support_perbill":67914,"approval":50,"support":0.0067914},{"time_hours":662,"approval_perbill":500000000,"support_perbill":61648,"approval":50,"support":0.0061648},{"time_hours":663,"approval_perbill":500000000,"support_perbill":55400,"approval":50,"support":0.00554},{"time_hours":664,"approval_perbill":500000000,"support_perbill":49171,"approval":50,"support":0.0049171},{"time_hours":665,"approval_perbill":500000000,"support_perbill":42960,"approval":50,"support":0.004296},{"time_hours":666,"approval_perbill":500000000,"support_perbill":36768,"approval":50,"support":0.0036768},{"time_hours":667,"approval_perbill":500000000,"support_perbill":30594,"approval":50,"support":0.0030594},{"time_hours":668,"approval_perbill":500000000,"support_perbill":24439,"approval":50,"support":0.0024439},{"time_hours":669,"approval_perbill":500000000,"support_perbill":18302,"approval":50,"support":0.0018302},{"time_hours":670,"approval_perbill":500000000,"support_perbill":12183,"approval":50,"support":0.0012183},{"time_hours":671,"approval_perbill":500000000,"support_perbill":6082,"approval":50,"support":0.0006082},{"time_hours":672,"approval_perbill":500000000,"support_perbill":0,"approval":50,"support":0}]')},54638:p=>{"use strict";p.exports=JSON.parse('[{"time_hours":0,"approval_perbill":1000000000,"support_perbill":500000008,"approval":100,"support":50.0000008},{"time_hours":1,"approval_perbill":999094204,"support_perbill":474037456,"approval":99.9094204,"support":47.4037456},{"time_hours":2,"approval_perbill":998188407,"support_perbill":450571639,"approval":99.8188407,"support":45.0571639},{"time_hours":3,"approval_perbill":997282610,"support_perbill":429258925,"approval":99.728261,"support":42.9258925},{"time_hours":4,"approval_perbill":996376813,"support_perbill":409815977,"approval":99.6376813,"support":40.9815977},{"time_hours":5,"approval_perbill":995471015,"support_perbill":392007070,"approval":99.5471015,"support":39.200707},{"time_hours":6,"approval_perbill":994565218,"support_perbill":375634538,"approval":99.4565218,"support":37.5634538},{"time_hours":7,"approval_perbill":993659421,"support_perbill":360531332,"approval":99.3659421,"support":36.0531332},{"time_hours":8,"approval_perbill":992753624,"support_perbill":346555348,"approval":99.2753624,"support":34.6555348},{"time_hours":9,"approval_perbill":991847827,"support_perbill":333584923,"approval":99.1847827,"support":33.3584923},{"time_hours":10,"approval_perbill":990942030,"support_perbill":321515318,"approval":99.094203,"support":32.1515318},{"time_hours":11,"approval_perbill":990036233,"support_perbill":310255830,"approval":99.0036233,"support":31.025583},{"time_hours":12,"approval_perbill":989130436,"support_perbill":299727543,"approval":98.9130436,"support":29.9727543},{"time_hours":13,"approval_perbill":988224638,"support_perbill":289861465,"approval":98.8224638,"support":28.9861465},{"time_hours":14,"approval_perbill":987318841,"support_perbill":280597034,"approval":98.7318841,"support":28.0597034},{"time_hours":15,"approval_perbill":986413044,"support_perbill":271880839,"approval":98.6413044,"support":27.1880839},{"time_hours":16,"approval_perbill":985507247,"support_perbill":263665616,"approval":98.5507247,"support":26.3665616},{"time_hours":17,"approval_perbill":984601450,"support_perbill":255909374,"approval":98.460145,"support":25.5909374},{"time_hours":18,"approval_perbill":983695653,"support_perbill":248574704,"approval":98.3695653,"support":24.8574704},{"time_hours":19,"approval_perbill":982789856,"support_perbill":241628141,"approval":98.2789856,"support":24.1628141},{"time_hours":20,"approval_perbill":981884059,"support_perbill":235039674,"approval":98.1884059,"support":23.5039674},{"time_hours":21,"approval_perbill":980978261,"support_perbill":228782304,"approval":98.0978261,"support":22.8782304},{"time_hours":22,"approval_perbill":980072464,"support_perbill":222831693,"approval":98.0072464,"support":22.2831693},{"time_hours":23,"approval_perbill":979166667,"support_perbill":217165820,"approval":97.9166667,"support":21.716582},{"time_hours":24,"approval_perbill":978260870,"support_perbill":211764724,"approval":97.826087,"support":21.1764724},{"time_hours":25,"approval_perbill":977355074,"support_perbill":206610269,"approval":97.7355074,"support":20.6610269},{"time_hours":26,"approval_perbill":976449276,"support_perbill":201685935,"approval":97.6449276,"support":20.1685935},{"time_hours":27,"approval_perbill":975543479,"support_perbill":196976654,"approval":97.5543479,"support":19.6976654},{"time_hours":28,"approval_perbill":974637682,"support_perbill":192468636,"approval":97.4637682,"support":19.2468636},{"time_hours":29,"approval_perbill":973731885,"support_perbill":188149249,"approval":97.3731885,"support":18.8149249},{"time_hours":30,"approval_perbill":972826088,"support_perbill":184006894,"approval":97.2826088,"support":18.4006894},{"time_hours":31,"approval_perbill":971920291,"support_perbill":180030910,"approval":97.1920291,"support":18.003091},{"time_hours":32,"approval_perbill":971014494,"support_perbill":176211470,"approval":97.1014494,"support":17.621147},{"time_hours":33,"approval_perbill":970108697,"support_perbill":172539506,"approval":97.0108697,"support":17.2539506},{"time_hours":34,"approval_perbill":969202899,"support_perbill":169006637,"approval":96.9202899,"support":16.9006637},{"time_hours":35,"approval_perbill":968297102,"support_perbill":165605110,"approval":96.8297102,"support":16.560511},{"time_hours":36,"approval_perbill":967391305,"support_perbill":162327733,"approval":96.7391305,"support":16.2327733},{"time_hours":37,"approval_perbill":966485508,"support_perbill":159167831,"approval":96.6485508,"support":15.9167831},{"time_hours":38,"approval_perbill":965579711,"support_perbill":156119196,"approval":96.5579711,"support":15.6119196},{"time_hours":39,"approval_perbill":964673914,"support_perbill":153176057,"approval":96.4673914,"support":15.3176057},{"time_hours":40,"approval_perbill":963768117,"support_perbill":150333030,"approval":96.3768117,"support":15.033303},{"time_hours":41,"approval_perbill":962862320,"support_perbill":147585092,"approval":96.286232,"support":14.7585092},{"time_hours":42,"approval_perbill":961956522,"support_perbill":144927549,"approval":96.1956522,"support":14.4927549},{"time_hours":43,"approval_perbill":961050725,"support_perbill":142356016,"approval":96.1050725,"support":14.2356016},{"time_hours":44,"approval_perbill":960144928,"support_perbill":139866383,"approval":96.0144928,"support":13.9866383},{"time_hours":45,"approval_perbill":959239131,"support_perbill":137454798,"approval":95.9239131,"support":13.7454798},{"time_hours":46,"approval_perbill":958333334,"support_perbill":135117648,"approval":95.8333334,"support":13.5117648},{"time_hours":47,"approval_perbill":957427537,"support_perbill":132851537,"approval":95.7427537,"support":13.2851537},{"time_hours":48,"approval_perbill":956521740,"support_perbill":130653279,"approval":95.652174,"support":13.0653279},{"time_hours":49,"approval_perbill":955615943,"support_perbill":128519868,"approval":95.5615943,"support":12.8519868},{"time_hours":50,"approval_perbill":954710146,"support_perbill":126448478,"approval":95.4710146,"support":12.6448478},{"time_hours":51,"approval_perbill":953804348,"support_perbill":124436441,"approval":95.3804348,"support":12.4436441},{"time_hours":52,"approval_perbill":952898551,"support_perbill":122481244,"approval":95.2898551,"support":12.2481244},{"time_hours":53,"approval_perbill":951992754,"support_perbill":120580512,"approval":95.1992754,"support":12.0580512},{"time_hours":54,"approval_perbill":951086958,"support_perbill":118732000,"approval":95.1086958,"support":11.8732},{"time_hours":55,"approval_perbill":950181160,"support_perbill":116933584,"approval":95.018116,"support":11.6933584},{"time_hours":56,"approval_perbill":949275363,"support_perbill":115183257,"approval":94.9275363,"support":11.5183257},{"time_hours":57,"approval_perbill":948369566,"support_perbill":113479114,"approval":94.8369566,"support":11.3479114},{"time_hours":58,"approval_perbill":947463769,"support_perbill":111819352,"approval":94.7463769,"support":11.1819352},{"time_hours":59,"approval_perbill":946557972,"support_perbill":110202257,"approval":94.6557972,"support":11.0202257},{"time_hours":60,"approval_perbill":945652175,"support_perbill":108626208,"approval":94.5652175,"support":10.8626208},{"time_hours":61,"approval_perbill":944746378,"support_perbill":107089661,"approval":94.4746378,"support":10.7089661},{"time_hours":62,"approval_perbill":943840581,"support_perbill":105591148,"approval":94.3840581,"support":10.5591148},{"time_hours":63,"approval_perbill":942934783,"support_perbill":104129274,"approval":94.2934783,"support":10.4129274},{"time_hours":64,"approval_perbill":942028986,"support_perbill":102702712,"approval":94.2028986,"support":10.2702712},{"time_hours":65,"approval_perbill":941123189,"support_perbill":101310199,"approval":94.1123189,"support":10.1310199},{"time_hours":66,"approval_perbill":940217392,"support_perbill":99950530,"approval":94.0217392,"support":9.995053},{"time_hours":67,"approval_perbill":939311595,"support_perbill":98622555,"approval":93.9311595,"support":9.8622555},{"time_hours":68,"approval_perbill":938405798,"support_perbill":97325178,"approval":93.8405798,"support":9.7325178},{"time_hours":69,"approval_perbill":937500001,"support_perbill":96057357,"approval":93.7500001,"support":9.6057357},{"time_hours":70,"approval_perbill":936594204,"support_perbill":94818091,"approval":93.6594204,"support":9.4818091},{"time_hours":71,"approval_perbill":935688407,"support_perbill":93606426,"approval":93.5688407,"support":9.3606426},{"time_hours":72,"approval_perbill":934782609,"support_perbill":92421451,"approval":93.4782609,"support":9.2421451},{"time_hours":73,"approval_perbill":933876812,"support_perbill":91262293,"approval":93.3876812,"support":9.1262293},{"time_hours":74,"approval_perbill":932971015,"support_perbill":90128118,"approval":93.2971015,"support":9.0128118},{"time_hours":75,"approval_perbill":932065218,"support_perbill":89018126,"approval":93.2065218,"support":8.9018126},{"time_hours":76,"approval_perbill":931159421,"support_perbill":87931552,"approval":93.1159421,"support":8.7931552},{"time_hours":77,"approval_perbill":930253624,"support_perbill":86867663,"approval":93.0253624,"support":8.6867663},{"time_hours":78,"approval_perbill":929347827,"support_perbill":85825756,"approval":92.9347827,"support":8.5825756},{"time_hours":79,"approval_perbill":928442030,"support_perbill":84805157,"approval":92.844203,"support":8.4805157},{"time_hours":80,"approval_perbill":927536232,"support_perbill":83805218,"approval":92.7536232,"support":8.3805218},{"time_hours":81,"approval_perbill":926630435,"support_perbill":82825318,"approval":92.6630435,"support":8.2825318},{"time_hours":82,"approval_perbill":925724638,"support_perbill":81864862,"approval":92.5724638,"support":8.1864862},{"time_hours":83,"approval_perbill":924818842,"support_perbill":80923275,"approval":92.4818842,"support":8.0923275},{"time_hours":84,"approval_perbill":923913044,"support_perbill":80000008,"approval":92.3913044,"support":8.0000008},{"time_hours":85,"approval_perbill":923007247,"support_perbill":79094530,"approval":92.3007247,"support":7.909453},{"time_hours":86,"approval_perbill":922101450,"support_perbill":78206334,"approval":92.210145,"support":7.8206334},{"time_hours":87,"approval_perbill":921195653,"support_perbill":77334928,"approval":92.1195653,"support":7.7334928},{"time_hours":88,"approval_perbill":920289856,"support_perbill":76479840,"approval":92.0289856,"support":7.647984},{"time_hours":89,"approval_perbill":919384059,"support_perbill":75640617,"approval":91.9384059,"support":7.5640617},{"time_hours":90,"approval_perbill":918478262,"support_perbill":74816822,"approval":91.8478262,"support":7.4816822},{"time_hours":91,"approval_perbill":917572465,"support_perbill":74008032,"approval":91.7572465,"support":7.4008032},{"time_hours":92,"approval_perbill":916666668,"support_perbill":73213842,"approval":91.6666668,"support":7.3213842},{"time_hours":93,"approval_perbill":915760870,"support_perbill":72433860,"approval":91.576087,"support":7.243386},{"time_hours":94,"approval_perbill":914855073,"support_perbill":71667707,"approval":91.4855073,"support":7.1667707},{"time_hours":95,"approval_perbill":913949276,"support_perbill":70915020,"approval":91.3949276,"support":7.091502},{"time_hours":96,"approval_perbill":913043479,"support_perbill":70175446,"approval":91.3043479,"support":7.0175446},{"time_hours":97,"approval_perbill":912137682,"support_perbill":69448645,"approval":91.2137682,"support":6.9448645},{"time_hours":98,"approval_perbill":911231885,"support_perbill":68734290,"approval":91.1231885,"support":6.873429},{"time_hours":99,"approval_perbill":910326088,"support_perbill":68032064,"approval":91.0326088,"support":6.8032064},{"time_hours":100,"approval_perbill":909420291,"support_perbill":67341660,"approval":90.9420291,"support":6.734166},{"time_hours":101,"approval_perbill":908514493,"support_perbill":66662782,"approval":90.8514493,"support":6.6662782},{"time_hours":102,"approval_perbill":907608696,"support_perbill":65995144,"approval":90.7608696,"support":6.5995144},{"time_hours":103,"approval_perbill":906702899,"support_perbill":65338469,"approval":90.6702899,"support":6.5338469},{"time_hours":104,"approval_perbill":905797102,"support_perbill":64692489,"approval":90.5797102,"support":6.4692489},{"time_hours":105,"approval_perbill":904891305,"support_perbill":64056946,"approval":90.4891305,"support":6.4056946},{"time_hours":106,"approval_perbill":903985508,"support_perbill":63431588,"approval":90.3985508,"support":6.3431588},{"time_hours":107,"approval_perbill":903079711,"support_perbill":62816172,"approval":90.3079711,"support":6.2816172},{"time_hours":108,"approval_perbill":902173914,"support_perbill":62210463,"approval":90.2173914,"support":6.2210463},{"time_hours":109,"approval_perbill":901268117,"support_perbill":61614233,"approval":90.1268117,"support":6.1614233},{"time_hours":110,"approval_perbill":900362319,"support_perbill":61027262,"approval":90.0362319,"support":6.1027262},{"time_hours":111,"approval_perbill":899456522,"support_perbill":60449335,"approval":89.9456522,"support":6.0449335},{"time_hours":112,"approval_perbill":898550725,"support_perbill":59880246,"approval":89.8550725,"support":5.9880246},{"time_hours":113,"approval_perbill":897644929,"support_perbill":59319792,"approval":89.7644929,"support":5.9319792},{"time_hours":114,"approval_perbill":896739131,"support_perbill":58767778,"approval":89.6739131,"support":5.8767778},{"time_hours":115,"approval_perbill":895833334,"support_perbill":58224017,"approval":89.5833334,"support":5.8224017},{"time_hours":116,"approval_perbill":894927537,"support_perbill":57688323,"approval":89.4927537,"support":5.7688323},{"time_hours":117,"approval_perbill":894021740,"support_perbill":57160519,"approval":89.402174,"support":5.7160519},{"time_hours":118,"approval_perbill":893115943,"support_perbill":56640431,"approval":89.3115943,"support":5.6640431},{"time_hours":119,"approval_perbill":892210146,"support_perbill":56127892,"approval":89.2210146,"support":5.6127892},{"time_hours":120,"approval_perbill":891304349,"support_perbill":55622738,"approval":89.1304349,"support":5.5622738},{"time_hours":121,"approval_perbill":890398552,"support_perbill":55124812,"approval":89.0398552,"support":5.5124812},{"time_hours":122,"approval_perbill":889492754,"support_perbill":54633958,"approval":88.9492754,"support":5.4633958},{"time_hours":123,"approval_perbill":888586957,"support_perbill":54150028,"approval":88.8586957,"support":5.4150028},{"time_hours":124,"approval_perbill":887681160,"support_perbill":53672875,"approval":88.768116,"support":5.3672875},{"time_hours":125,"approval_perbill":886775363,"support_perbill":53202359,"approval":88.6775363,"support":5.3202359},{"time_hours":126,"approval_perbill":885869566,"support_perbill":52738342,"approval":88.5869566,"support":5.2738342},{"time_hours":127,"approval_perbill":884963769,"support_perbill":52280690,"approval":88.4963769,"support":5.228069},{"time_hours":128,"approval_perbill":884057972,"support_perbill":51829273,"approval":88.4057972,"support":5.1829273},{"time_hours":129,"approval_perbill":883152175,"support_perbill":51383965,"approval":88.3152175,"support":5.1383965},{"time_hours":130,"approval_perbill":882246378,"support_perbill":50944643,"approval":88.2246378,"support":5.0944643},{"time_hours":131,"approval_perbill":881340580,"support_perbill":50511186,"approval":88.134058,"support":5.0511186},{"time_hours":132,"approval_perbill":880434783,"support_perbill":50083477,"approval":88.0434783,"support":5.0083477},{"time_hours":133,"approval_perbill":879528986,"support_perbill":49661405,"approval":87.9528986,"support":4.9661405},{"time_hours":134,"approval_perbill":878623189,"support_perbill":49244856,"approval":87.8623189,"support":4.9244856},{"time_hours":135,"approval_perbill":877717392,"support_perbill":48833725,"approval":87.7717392,"support":4.8833725},{"time_hours":136,"approval_perbill":876811595,"support_perbill":48427905,"approval":87.6811595,"support":4.8427905},{"time_hours":137,"approval_perbill":875905798,"support_perbill":48027295,"approval":87.5905798,"support":4.8027295},{"time_hours":138,"approval_perbill":875000001,"support_perbill":47631795,"approval":87.5000001,"support":4.7631795},{"time_hours":139,"approval_perbill":874094203,"support_perbill":47241307,"approval":87.4094203,"support":4.7241307},{"time_hours":140,"approval_perbill":873188406,"support_perbill":46855738,"approval":87.3188406,"support":4.6855738},{"time_hours":141,"approval_perbill":872282609,"support_perbill":46474995,"approval":87.2282609,"support":4.6474995},{"time_hours":142,"approval_perbill":871376813,"support_perbill":46098987,"approval":87.1376813,"support":4.6098987},{"time_hours":143,"approval_perbill":870471015,"support_perbill":45727627,"approval":87.0471015,"support":4.5727627},{"time_hours":144,"approval_perbill":869565218,"support_perbill":45360829,"approval":86.9565218,"support":4.5360829},{"time_hours":145,"approval_perbill":868659421,"support_perbill":44998510,"approval":86.8659421,"support":4.499851},{"time_hours":146,"approval_perbill":867753624,"support_perbill":44640588,"approval":86.7753624,"support":4.4640588},{"time_hours":147,"approval_perbill":866847827,"support_perbill":44286984,"approval":86.6847827,"support":4.4286984},{"time_hours":148,"approval_perbill":865942030,"support_perbill":43937620,"approval":86.594203,"support":4.393762},{"time_hours":149,"approval_perbill":865036233,"support_perbill":43592419,"approval":86.5036233,"support":4.3592419},{"time_hours":150,"approval_perbill":864130436,"support_perbill":43251309,"approval":86.4130436,"support":4.3251309},{"time_hours":151,"approval_perbill":863224639,"support_perbill":42914217,"approval":86.3224639,"support":4.2914217},{"time_hours":152,"approval_perbill":862318841,"support_perbill":42581072,"approval":86.2318841,"support":4.2581072},{"time_hours":153,"approval_perbill":861413044,"support_perbill":42251805,"approval":86.1413044,"support":4.2251805},{"time_hours":154,"approval_perbill":860507247,"support_perbill":41926350,"approval":86.0507247,"support":4.192635},{"time_hours":155,"approval_perbill":859601450,"support_perbill":41604639,"approval":85.960145,"support":4.1604639},{"time_hours":156,"approval_perbill":858695653,"support_perbill":41286610,"approval":85.8695653,"support":4.128661},{"time_hours":157,"approval_perbill":857789856,"support_perbill":40972199,"approval":85.7789856,"support":4.0972199},{"time_hours":158,"approval_perbill":856884059,"support_perbill":40661344,"approval":85.6884059,"support":4.0661344},{"time_hours":159,"approval_perbill":855978262,"support_perbill":40353986,"approval":85.5978262,"support":4.0353986},{"time_hours":160,"approval_perbill":855072464,"support_perbill":40050066,"approval":85.5072464,"support":4.0050066},{"time_hours":161,"approval_perbill":854166667,"support_perbill":39749527,"approval":85.4166667,"support":3.9749527},{"time_hours":162,"approval_perbill":853260870,"support_perbill":39452313,"approval":85.326087,"support":3.9452313},{"time_hours":163,"approval_perbill":852355073,"support_perbill":39158368,"approval":85.2355073,"support":3.9158368},{"time_hours":164,"approval_perbill":851449276,"support_perbill":38867639,"approval":85.1449276,"support":3.8867639},{"time_hours":165,"approval_perbill":850543479,"support_perbill":38580074,"approval":85.0543479,"support":3.8580074},{"time_hours":166,"approval_perbill":849637682,"support_perbill":38295622,"approval":84.9637682,"support":3.8295622},{"time_hours":167,"approval_perbill":848731885,"support_perbill":38014231,"approval":84.8731885,"support":3.8014231},{"time_hours":168,"approval_perbill":847826087,"support_perbill":37735853,"approval":84.7826087,"support":3.7735853},{"time_hours":169,"approval_perbill":846920290,"support_perbill":37460439,"approval":84.692029,"support":3.7460439},{"time_hours":170,"approval_perbill":846014493,"support_perbill":37187943,"approval":84.6014493,"support":3.7187943},{"time_hours":171,"approval_perbill":845108697,"support_perbill":36918319,"approval":84.5108697,"support":3.6918319},{"time_hours":172,"approval_perbill":844202900,"support_perbill":36651521,"approval":84.42029,"support":3.6651521},{"time_hours":173,"approval_perbill":843297102,"support_perbill":36387505,"approval":84.3297102,"support":3.6387505},{"time_hours":174,"approval_perbill":842391305,"support_perbill":36126228,"approval":84.2391305,"support":3.6126228},{"time_hours":175,"approval_perbill":841485508,"support_perbill":35867647,"approval":84.1485508,"support":3.5867647},{"time_hours":176,"approval_perbill":840579711,"support_perbill":35611721,"approval":84.0579711,"support":3.5611721},{"time_hours":177,"approval_perbill":839673914,"support_perbill":35358409,"approval":83.9673914,"support":3.5358409},{"time_hours":178,"approval_perbill":838768117,"support_perbill":35107672,"approval":83.8768117,"support":3.5107672},{"time_hours":179,"approval_perbill":837862320,"support_perbill":34859469,"approval":83.786232,"support":3.4859469},{"time_hours":180,"approval_perbill":836956523,"support_perbill":34613764,"approval":83.6956523,"support":3.4613764},{"time_hours":181,"approval_perbill":836050725,"support_perbill":34370519,"approval":83.6050725,"support":3.4370519},{"time_hours":182,"approval_perbill":835144928,"support_perbill":34129696,"approval":83.5144928,"support":3.4129696},{"time_hours":183,"approval_perbill":834239131,"support_perbill":33891260,"approval":83.4239131,"support":3.389126},{"time_hours":184,"approval_perbill":833333334,"support_perbill":33655176,"approval":83.3333334,"support":3.3655176},{"time_hours":185,"approval_perbill":832427537,"support_perbill":33421408,"approval":83.2427537,"support":3.3421408},{"time_hours":186,"approval_perbill":831521740,"support_perbill":33189923,"approval":83.152174,"support":3.3189923},{"time_hours":187,"approval_perbill":830615943,"support_perbill":32960688,"approval":83.0615943,"support":3.2960688},{"time_hours":188,"approval_perbill":829710146,"support_perbill":32733670,"approval":82.9710146,"support":3.273367},{"time_hours":189,"approval_perbill":828804348,"support_perbill":32508837,"approval":82.8804348,"support":3.2508837},{"time_hours":190,"approval_perbill":827898551,"support_perbill":32286157,"approval":82.7898551,"support":3.2286157},{"time_hours":191,"approval_perbill":826992754,"support_perbill":32065601,"approval":82.6992754,"support":3.2065601},{"time_hours":192,"approval_perbill":826086957,"support_perbill":31847137,"approval":82.6086957,"support":3.1847137},{"time_hours":193,"approval_perbill":825181160,"support_perbill":31630736,"approval":82.518116,"support":3.1630736},{"time_hours":194,"approval_perbill":824275363,"support_perbill":31416368,"approval":82.4275363,"support":3.1416368},{"time_hours":195,"approval_perbill":823369566,"support_perbill":31204006,"approval":82.3369566,"support":3.1204006},{"time_hours":196,"approval_perbill":822463769,"support_perbill":30993622,"approval":82.2463769,"support":3.0993622},{"time_hours":197,"approval_perbill":821557972,"support_perbill":30785187,"approval":82.1557972,"support":3.0785187},{"time_hours":198,"approval_perbill":820652174,"support_perbill":30578675,"approval":82.0652174,"support":3.0578675},{"time_hours":199,"approval_perbill":819746377,"support_perbill":30374060,"approval":81.9746377,"support":3.037406},{"time_hours":200,"approval_perbill":818840580,"support_perbill":30171314,"approval":81.884058,"support":3.0171314},{"time_hours":201,"approval_perbill":817934784,"support_perbill":29970414,"approval":81.7934784,"support":2.9970414},{"time_hours":202,"approval_perbill":817028986,"support_perbill":29771334,"approval":81.7028986,"support":2.9771334},{"time_hours":203,"approval_perbill":816123189,"support_perbill":29574048,"approval":81.6123189,"support":2.9574048},{"time_hours":204,"approval_perbill":815217392,"support_perbill":29378534,"approval":81.5217392,"support":2.9378534},{"time_hours":205,"approval_perbill":814311595,"support_perbill":29184767,"approval":81.4311595,"support":2.9184767},{"time_hours":206,"approval_perbill":813405798,"support_perbill":28992723,"approval":81.3405798,"support":2.8992723},{"time_hours":207,"approval_perbill":812500001,"support_perbill":28802381,"approval":81.2500001,"support":2.8802381},{"time_hours":208,"approval_perbill":811594204,"support_perbill":28613717,"approval":81.1594204,"support":2.8613717},{"time_hours":209,"approval_perbill":810688407,"support_perbill":28426710,"approval":81.0688407,"support":2.842671},{"time_hours":210,"approval_perbill":809782609,"support_perbill":28241338,"approval":80.9782609,"support":2.8241338},{"time_hours":211,"approval_perbill":808876812,"support_perbill":28057578,"approval":80.8876812,"support":2.8057578},{"time_hours":212,"approval_perbill":807971015,"support_perbill":27875412,"approval":80.7971015,"support":2.7875412},{"time_hours":213,"approval_perbill":807065218,"support_perbill":27694817,"approval":80.7065218,"support":2.7694817},{"time_hours":214,"approval_perbill":806159421,"support_perbill":27515773,"approval":80.6159421,"support":2.7515773},{"time_hours":215,"approval_perbill":805253624,"support_perbill":27338261,"approval":80.5253624,"support":2.7338261},{"time_hours":216,"approval_perbill":804347827,"support_perbill":27162261,"approval":80.4347827,"support":2.7162261},{"time_hours":217,"approval_perbill":803442030,"support_perbill":26987754,"approval":80.344203,"support":2.6987754},{"time_hours":218,"approval_perbill":802536233,"support_perbill":26814721,"approval":80.2536233,"support":2.6814721},{"time_hours":219,"approval_perbill":801630435,"support_perbill":26643143,"approval":80.1630435,"support":2.6643143},{"time_hours":220,"approval_perbill":800724638,"support_perbill":26473002,"approval":80.0724638,"support":2.6473002},{"time_hours":221,"approval_perbill":799818841,"support_perbill":26304280,"approval":79.9818841,"support":2.630428},{"time_hours":222,"approval_perbill":798913044,"support_perbill":26136960,"approval":79.8913044,"support":2.613696},{"time_hours":223,"approval_perbill":798007247,"support_perbill":25971023,"approval":79.8007247,"support":2.5971023},{"time_hours":224,"approval_perbill":797101450,"support_perbill":25806454,"approval":79.710145,"support":2.5806454},{"time_hours":225,"approval_perbill":796195653,"support_perbill":25643234,"approval":79.6195653,"support":2.5643234},{"time_hours":226,"approval_perbill":795289856,"support_perbill":25481348,"approval":79.5289856,"support":2.5481348},{"time_hours":227,"approval_perbill":794384058,"support_perbill":25320779,"approval":79.4384058,"support":2.5320779},{"time_hours":228,"approval_perbill":793478261,"support_perbill":25161512,"approval":79.3478261,"support":2.5161512},{"time_hours":229,"approval_perbill":792572464,"support_perbill":25003530,"approval":79.2572464,"support":2.500353},{"time_hours":230,"approval_perbill":791666668,"support_perbill":24846818,"approval":79.1666668,"support":2.4846818},{"time_hours":231,"approval_perbill":790760870,"support_perbill":24691360,"approval":79.076087,"support":2.469136},{"time_hours":232,"approval_perbill":789855073,"support_perbill":24537142,"approval":78.9855073,"support":2.4537142},{"time_hours":233,"approval_perbill":788949276,"support_perbill":24384150,"approval":78.8949276,"support":2.438415},{"time_hours":234,"approval_perbill":788043479,"support_perbill":24232367,"approval":78.8043479,"support":2.4232367},{"time_hours":235,"approval_perbill":787137682,"support_perbill":24081781,"approval":78.7137682,"support":2.4081781},{"time_hours":236,"approval_perbill":786231885,"support_perbill":23932377,"approval":78.6231885,"support":2.3932377},{"time_hours":237,"approval_perbill":785326088,"support_perbill":23784141,"approval":78.5326088,"support":2.3784141},{"time_hours":238,"approval_perbill":784420291,"support_perbill":23637059,"approval":78.4420291,"support":2.3637059},{"time_hours":239,"approval_perbill":783514494,"support_perbill":23491118,"approval":78.3514494,"support":2.3491118},{"time_hours":240,"approval_perbill":782608696,"support_perbill":23346305,"approval":78.2608696,"support":2.3346305},{"time_hours":241,"approval_perbill":781702899,"support_perbill":23202608,"approval":78.1702899,"support":2.3202608},{"time_hours":242,"approval_perbill":780797102,"support_perbill":23060012,"approval":78.0797102,"support":2.3060012},{"time_hours":243,"approval_perbill":779891305,"support_perbill":22918505,"approval":77.9891305,"support":2.2918505},{"time_hours":244,"approval_perbill":778985508,"support_perbill":22778075,"approval":77.8985508,"support":2.2778075},{"time_hours":245,"approval_perbill":778079711,"support_perbill":22638710,"approval":77.8079711,"support":2.263871},{"time_hours":246,"approval_perbill":777173914,"support_perbill":22500398,"approval":77.7173914,"support":2.2500398},{"time_hours":247,"approval_perbill":776268117,"support_perbill":22363126,"approval":77.6268117,"support":2.2363126},{"time_hours":248,"approval_perbill":775362319,"support_perbill":22226884,"approval":77.5362319,"support":2.2226884},{"time_hours":249,"approval_perbill":774456522,"support_perbill":22091659,"approval":77.4456522,"support":2.2091659},{"time_hours":250,"approval_perbill":773550725,"support_perbill":21957440,"approval":77.3550725,"support":2.195744},{"time_hours":251,"approval_perbill":772644928,"support_perbill":21824216,"approval":77.2644928,"support":2.1824216},{"time_hours":252,"approval_perbill":771739131,"support_perbill":21691976,"approval":77.1739131,"support":2.1691976},{"time_hours":253,"approval_perbill":770833334,"support_perbill":21560709,"approval":77.0833334,"support":2.1560709},{"time_hours":254,"approval_perbill":769927537,"support_perbill":21430404,"approval":76.9927537,"support":2.1430404},{"time_hours":255,"approval_perbill":769021740,"support_perbill":21301052,"approval":76.902174,"support":2.1301052},{"time_hours":256,"approval_perbill":768115943,"support_perbill":21172640,"approval":76.8115943,"support":2.117264},{"time_hours":257,"approval_perbill":767210145,"support_perbill":21045160,"approval":76.7210145,"support":2.104516},{"time_hours":258,"approval_perbill":766304348,"support_perbill":20918601,"approval":76.6304348,"support":2.0918601},{"time_hours":259,"approval_perbill":765398552,"support_perbill":20792953,"approval":76.5398552,"support":2.0792953},{"time_hours":260,"approval_perbill":764492755,"support_perbill":20668207,"approval":76.4492755,"support":2.0668207},{"time_hours":261,"approval_perbill":763586957,"support_perbill":20544352,"approval":76.3586957,"support":2.0544352},{"time_hours":262,"approval_perbill":762681160,"support_perbill":20421379,"approval":76.268116,"support":2.0421379},{"time_hours":263,"approval_perbill":761775363,"support_perbill":20299280,"approval":76.1775363,"support":2.029928},{"time_hours":264,"approval_perbill":760869566,"support_perbill":20178043,"approval":76.0869566,"support":2.0178043},{"time_hours":265,"approval_perbill":759963769,"support_perbill":20057661,"approval":75.9963769,"support":2.0057661},{"time_hours":266,"approval_perbill":759057972,"support_perbill":19938125,"approval":75.9057972,"support":1.9938125},{"time_hours":267,"approval_perbill":758152175,"support_perbill":19819425,"approval":75.8152175,"support":1.9819425},{"time_hours":268,"approval_perbill":757246378,"support_perbill":19701552,"approval":75.7246378,"support":1.9701552},{"time_hours":269,"approval_perbill":756340580,"support_perbill":19584499,"approval":75.634058,"support":1.9584499},{"time_hours":270,"approval_perbill":755434783,"support_perbill":19468257,"approval":75.5434783,"support":1.9468257},{"time_hours":271,"approval_perbill":754528986,"support_perbill":19352816,"approval":75.4528986,"support":1.9352816},{"time_hours":272,"approval_perbill":753623189,"support_perbill":19238170,"approval":75.3623189,"support":1.923817},{"time_hours":273,"approval_perbill":752717392,"support_perbill":19124309,"approval":75.2717392,"support":1.9124309},{"time_hours":274,"approval_perbill":751811595,"support_perbill":19011227,"approval":75.1811595,"support":1.9011227},{"time_hours":275,"approval_perbill":750905798,"support_perbill":18898914,"approval":75.0905798,"support":1.8898914},{"time_hours":276,"approval_perbill":750000001,"support_perbill":18787363,"approval":75.0000001,"support":1.8787363},{"time_hours":277,"approval_perbill":749094204,"support_perbill":18676566,"approval":74.9094204,"support":1.8676566},{"time_hours":278,"approval_perbill":748188406,"support_perbill":18566516,"approval":74.8188406,"support":1.8566516},{"time_hours":279,"approval_perbill":747282609,"support_perbill":18457205,"approval":74.7282609,"support":1.8457205},{"time_hours":280,"approval_perbill":746376812,"support_perbill":18348625,"approval":74.6376812,"support":1.8348625},{"time_hours":281,"approval_perbill":745471015,"support_perbill":18240770,"approval":74.5471015,"support":1.824077},{"time_hours":282,"approval_perbill":744565218,"support_perbill":18133632,"approval":74.4565218,"support":1.8133632},{"time_hours":283,"approval_perbill":743659421,"support_perbill":18027204,"approval":74.3659421,"support":1.8027204},{"time_hours":284,"approval_perbill":742753624,"support_perbill":17921479,"approval":74.2753624,"support":1.7921479},{"time_hours":285,"approval_perbill":741847827,"support_perbill":17816451,"approval":74.1847827,"support":1.7816451},{"time_hours":286,"approval_perbill":740942029,"support_perbill":17712111,"approval":74.0942029,"support":1.7712111},{"time_hours":287,"approval_perbill":740036232,"support_perbill":17608453,"approval":74.0036232,"support":1.7608453},{"time_hours":288,"approval_perbill":739130435,"support_perbill":17505472,"approval":73.9130435,"support":1.7505472},{"time_hours":289,"approval_perbill":738224639,"support_perbill":17403159,"approval":73.8224639,"support":1.7403159},{"time_hours":290,"approval_perbill":737318841,"support_perbill":17301510,"approval":73.7318841,"support":1.730151},{"time_hours":291,"approval_perbill":736413044,"support_perbill":17200516,"approval":73.6413044,"support":1.7200516},{"time_hours":292,"approval_perbill":735507247,"support_perbill":17100172,"approval":73.5507247,"support":1.7100172},{"time_hours":293,"approval_perbill":734601450,"support_perbill":17000472,"approval":73.460145,"support":1.7000472},{"time_hours":294,"approval_perbill":733695653,"support_perbill":16901410,"approval":73.3695653,"support":1.690141},{"time_hours":295,"approval_perbill":732789856,"support_perbill":16802979,"approval":73.2789856,"support":1.6802979},{"time_hours":296,"approval_perbill":731884059,"support_perbill":16705173,"approval":73.1884059,"support":1.6705173},{"time_hours":297,"approval_perbill":730978262,"support_perbill":16607986,"approval":73.0978262,"support":1.6607986},{"time_hours":298,"approval_perbill":730072465,"support_perbill":16511414,"approval":73.0072465,"support":1.6511414},{"time_hours":299,"approval_perbill":729166667,"support_perbill":16415448,"approval":72.9166667,"support":1.6415448},{"time_hours":300,"approval_perbill":728260870,"support_perbill":16320085,"approval":72.826087,"support":1.6320085},{"time_hours":301,"approval_perbill":727355073,"support_perbill":16225319,"approval":72.7355073,"support":1.6225319},{"time_hours":302,"approval_perbill":726449276,"support_perbill":16131143,"approval":72.6449276,"support":1.6131143},{"time_hours":303,"approval_perbill":725543479,"support_perbill":16037552,"approval":72.5543479,"support":1.6037552},{"time_hours":304,"approval_perbill":724637682,"support_perbill":15944542,"approval":72.4637682,"support":1.5944542},{"time_hours":305,"approval_perbill":723731885,"support_perbill":15852106,"approval":72.3731885,"support":1.5852106},{"time_hours":306,"approval_perbill":722826088,"support_perbill":15760239,"approval":72.2826088,"support":1.5760239},{"time_hours":307,"approval_perbill":721920290,"support_perbill":15668936,"approval":72.192029,"support":1.5668936},{"time_hours":308,"approval_perbill":721014493,"support_perbill":15578192,"approval":72.1014493,"support":1.5578192},{"time_hours":309,"approval_perbill":720108696,"support_perbill":15488001,"approval":72.0108696,"support":1.5488001},{"time_hours":310,"approval_perbill":719202899,"support_perbill":15398359,"approval":71.9202899,"support":1.5398359},{"time_hours":311,"approval_perbill":718297102,"support_perbill":15309261,"approval":71.8297102,"support":1.5309261},{"time_hours":312,"approval_perbill":717391305,"support_perbill":15220701,"approval":71.7391305,"support":1.5220701},{"time_hours":313,"approval_perbill":716485508,"support_perbill":15132675,"approval":71.6485508,"support":1.5132675},{"time_hours":314,"approval_perbill":715579711,"support_perbill":15045179,"approval":71.5579711,"support":1.5045179},{"time_hours":315,"approval_perbill":714673913,"support_perbill":14958206,"approval":71.4673913,"support":1.4958206},{"time_hours":316,"approval_perbill":713768116,"support_perbill":14871753,"approval":71.3768116,"support":1.4871753},{"time_hours":317,"approval_perbill":712862319,"support_perbill":14785815,"approval":71.2862319,"support":1.4785815},{"time_hours":318,"approval_perbill":711956523,"support_perbill":14700387,"approval":71.1956523,"support":1.4700387},{"time_hours":319,"approval_perbill":711050726,"support_perbill":14615465,"approval":71.1050726,"support":1.4615465},{"time_hours":320,"approval_perbill":710144928,"support_perbill":14531045,"approval":71.0144928,"support":1.4531045},{"time_hours":321,"approval_perbill":709239131,"support_perbill":14447121,"approval":70.9239131,"support":1.4447121},{"time_hours":322,"approval_perbill":708333334,"support_perbill":14363690,"approval":70.8333334,"support":1.436369},{"time_hours":323,"approval_perbill":707427537,"support_perbill":14280747,"approval":70.7427537,"support":1.4280747},{"time_hours":324,"approval_perbill":706521740,"support_perbill":14198287,"approval":70.652174,"support":1.4198287},{"time_hours":325,"approval_perbill":705615943,"support_perbill":14116308,"approval":70.5615943,"support":1.4116308},{"time_hours":326,"approval_perbill":704710146,"support_perbill":14034804,"approval":70.4710146,"support":1.4034804},{"time_hours":327,"approval_perbill":703804349,"support_perbill":13953771,"approval":70.3804349,"support":1.3953771},{"time_hours":328,"approval_perbill":702898551,"support_perbill":13873206,"approval":70.2898551,"support":1.3873206},{"time_hours":329,"approval_perbill":701992754,"support_perbill":13793104,"approval":70.1992754,"support":1.3793104},{"time_hours":330,"approval_perbill":701086957,"support_perbill":13713462,"approval":70.1086957,"support":1.3713462},{"time_hours":331,"approval_perbill":700181160,"support_perbill":13634275,"approval":70.018116,"support":1.3634275},{"time_hours":332,"approval_perbill":699275363,"support_perbill":13555539,"approval":69.9275363,"support":1.3555539},{"time_hours":333,"approval_perbill":698369566,"support_perbill":13477251,"approval":69.8369566,"support":1.3477251},{"time_hours":334,"approval_perbill":697463769,"support_perbill":13399406,"approval":69.7463769,"support":1.3399406},{"time_hours":335,"approval_perbill":696557972,"support_perbill":13322002,"approval":69.6557972,"support":1.3322002},{"time_hours":336,"approval_perbill":695652174,"support_perbill":13245034,"approval":69.5652174,"support":1.3245034},{"time_hours":337,"approval_perbill":694746377,"support_perbill":13168499,"approval":69.4746377,"support":1.3168499},{"time_hours":338,"approval_perbill":693840580,"support_perbill":13092392,"approval":69.384058,"support":1.3092392},{"time_hours":339,"approval_perbill":692934783,"support_perbill":13016711,"approval":69.2934783,"support":1.3016711},{"time_hours":340,"approval_perbill":692028986,"support_perbill":12941452,"approval":69.2028986,"support":1.2941452},{"time_hours":341,"approval_perbill":691123189,"support_perbill":12866612,"approval":69.1123189,"support":1.2866612},{"time_hours":342,"approval_perbill":690217392,"support_perbill":12792186,"approval":69.0217392,"support":1.2792186},{"time_hours":343,"approval_perbill":689311595,"support_perbill":12718172,"approval":68.9311595,"support":1.2718172},{"time_hours":344,"approval_perbill":688405798,"support_perbill":12644565,"approval":68.8405798,"support":1.2644565},{"time_hours":345,"approval_perbill":687500000,"support_perbill":12571363,"approval":68.75,"support":1.2571363},{"time_hours":346,"approval_perbill":686594203,"support_perbill":12498563,"approval":68.6594203,"support":1.2498563},{"time_hours":347,"approval_perbill":685688407,"support_perbill":12426161,"approval":68.5688407,"support":1.2426161},{"time_hours":348,"approval_perbill":684782610,"support_perbill":12354153,"approval":68.478261,"support":1.2354153},{"time_hours":349,"approval_perbill":683876812,"support_perbill":12282537,"approval":68.3876812,"support":1.2282537},{"time_hours":350,"approval_perbill":682971015,"support_perbill":12211309,"approval":68.2971015,"support":1.2211309},{"time_hours":351,"approval_perbill":682065218,"support_perbill":12140467,"approval":68.2065218,"support":1.2140467},{"time_hours":352,"approval_perbill":681159421,"support_perbill":12070007,"approval":68.1159421,"support":1.2070007},{"time_hours":353,"approval_perbill":680253624,"support_perbill":11999925,"approval":68.0253624,"support":1.1999925},{"time_hours":354,"approval_perbill":679347827,"support_perbill":11930220,"approval":67.9347827,"support":1.193022},{"time_hours":355,"approval_perbill":678442030,"support_perbill":11860888,"approval":67.844203,"support":1.1860888},{"time_hours":356,"approval_perbill":677536233,"support_perbill":11791925,"approval":67.7536233,"support":1.1791925},{"time_hours":357,"approval_perbill":676630435,"support_perbill":11723330,"approval":67.6630435,"support":1.172333},{"time_hours":358,"approval_perbill":675724638,"support_perbill":11655099,"approval":67.5724638,"support":1.1655099},{"time_hours":359,"approval_perbill":674818841,"support_perbill":11587229,"approval":67.4818841,"support":1.1587229},{"time_hours":360,"approval_perbill":673913044,"support_perbill":11519717,"approval":67.3913044,"support":1.1519717},{"time_hours":361,"approval_perbill":673007247,"support_perbill":11452561,"approval":67.3007247,"support":1.1452561},{"time_hours":362,"approval_perbill":672101450,"support_perbill":11385757,"approval":67.210145,"support":1.1385757},{"time_hours":363,"approval_perbill":671195653,"support_perbill":11319304,"approval":67.1195653,"support":1.1319304},{"time_hours":364,"approval_perbill":670289856,"support_perbill":11253198,"approval":67.0289856,"support":1.1253198},{"time_hours":365,"approval_perbill":669384059,"support_perbill":11187436,"approval":66.9384059,"support":1.1187436},{"time_hours":366,"approval_perbill":668478261,"support_perbill":11122016,"approval":66.8478261,"support":1.1122016},{"time_hours":367,"approval_perbill":667572464,"support_perbill":11056935,"approval":66.7572464,"support":1.1056935},{"time_hours":368,"approval_perbill":666666667,"support_perbill":10992190,"approval":66.6666667,"support":1.099219},{"time_hours":369,"approval_perbill":665760870,"support_perbill":10927780,"approval":66.576087,"support":1.092778},{"time_hours":370,"approval_perbill":664855073,"support_perbill":10863701,"approval":66.4855073,"support":1.0863701},{"time_hours":371,"approval_perbill":663949276,"support_perbill":10799950,"approval":66.3949276,"support":1.079995},{"time_hours":372,"approval_perbill":663043479,"support_perbill":10736526,"approval":66.3043479,"support":1.0736526},{"time_hours":373,"approval_perbill":662137682,"support_perbill":10673426,"approval":66.2137682,"support":1.0673426},{"time_hours":374,"approval_perbill":661231884,"support_perbill":10610647,"approval":66.1231884,"support":1.0610647},{"time_hours":375,"approval_perbill":660326087,"support_perbill":10548187,"approval":66.0326087,"support":1.0548187},{"time_hours":376,"approval_perbill":659420290,"support_perbill":10486043,"approval":65.942029,"support":1.0486043},{"time_hours":377,"approval_perbill":658514494,"support_perbill":10424213,"approval":65.8514494,"support":1.0424213},{"time_hours":378,"approval_perbill":657608696,"support_perbill":10362695,"approval":65.7608696,"support":1.0362695},{"time_hours":379,"approval_perbill":656702899,"support_perbill":10301486,"approval":65.6702899,"support":1.0301486},{"time_hours":380,"approval_perbill":655797102,"support_perbill":10240584,"approval":65.5797102,"support":1.0240584},{"time_hours":381,"approval_perbill":654891305,"support_perbill":10179987,"approval":65.4891305,"support":1.0179987},{"time_hours":382,"approval_perbill":653985508,"support_perbill":10119692,"approval":65.3985508,"support":1.0119692},{"time_hours":383,"approval_perbill":653079711,"support_perbill":10059697,"approval":65.3079711,"support":1.0059697},{"time_hours":384,"approval_perbill":652173914,"support_perbill":10000000,"approval":65.2173914,"support":1},{"time_hours":385,"approval_perbill":651268117,"support_perbill":9940599,"approval":65.1268117,"support":0.9940599},{"time_hours":386,"approval_perbill":650362320,"support_perbill":9881492,"approval":65.036232,"support":0.9881492},{"time_hours":387,"approval_perbill":649456522,"support_perbill":9822675,"approval":64.9456522,"support":0.9822675},{"time_hours":388,"approval_perbill":648550725,"support_perbill":9764148,"approval":64.8550725,"support":0.9764148},{"time_hours":389,"approval_perbill":647644928,"support_perbill":9705908,"approval":64.7644928,"support":0.9705908},{"time_hours":390,"approval_perbill":646739131,"support_perbill":9647953,"approval":64.6739131,"support":0.9647953},{"time_hours":391,"approval_perbill":645833334,"support_perbill":9590280,"approval":64.5833334,"support":0.959028},{"time_hours":392,"approval_perbill":644927537,"support_perbill":9532889,"approval":64.4927537,"support":0.9532889},{"time_hours":393,"approval_perbill":644021740,"support_perbill":9475776,"approval":64.402174,"support":0.9475776},{"time_hours":394,"approval_perbill":643115943,"support_perbill":9418940,"approval":64.3115943,"support":0.941894},{"time_hours":395,"approval_perbill":642210145,"support_perbill":9362378,"approval":64.2210145,"support":0.9362378},{"time_hours":396,"approval_perbill":641304348,"support_perbill":9306090,"approval":64.1304348,"support":0.930609},{"time_hours":397,"approval_perbill":640398551,"support_perbill":9250072,"approval":64.0398551,"support":0.9250072},{"time_hours":398,"approval_perbill":639492754,"support_perbill":9194323,"approval":63.9492754,"support":0.9194323},{"time_hours":399,"approval_perbill":638586957,"support_perbill":9138840,"approval":63.8586957,"support":0.913884},{"time_hours":400,"approval_perbill":637681160,"support_perbill":9083623,"approval":63.768116,"support":0.9083623},{"time_hours":401,"approval_perbill":636775363,"support_perbill":9028669,"approval":63.6775363,"support":0.9028669},{"time_hours":402,"approval_perbill":635869566,"support_perbill":8973976,"approval":63.5869566,"support":0.8973976},{"time_hours":403,"approval_perbill":634963769,"support_perbill":8919542,"approval":63.4963769,"support":0.8919542},{"time_hours":404,"approval_perbill":634057971,"support_perbill":8865366,"approval":63.4057971,"support":0.8865366},{"time_hours":405,"approval_perbill":633152174,"support_perbill":8811445,"approval":63.3152174,"support":0.8811445},{"time_hours":406,"approval_perbill":632246378,"support_perbill":8757779,"approval":63.2246378,"support":0.8757779},{"time_hours":407,"approval_perbill":631340581,"support_perbill":8704364,"approval":63.1340581,"support":0.8704364},{"time_hours":408,"approval_perbill":630434783,"support_perbill":8651200,"approval":63.0434783,"support":0.86512},{"time_hours":409,"approval_perbill":629528986,"support_perbill":8598284,"approval":62.9528986,"support":0.8598284},{"time_hours":410,"approval_perbill":628623189,"support_perbill":8545615,"approval":62.8623189,"support":0.8545615},{"time_hours":411,"approval_perbill":627717392,"support_perbill":8493191,"approval":62.7717392,"support":0.8493191},{"time_hours":412,"approval_perbill":626811595,"support_perbill":8441011,"approval":62.6811595,"support":0.8441011},{"time_hours":413,"approval_perbill":625905798,"support_perbill":8389072,"approval":62.5905798,"support":0.8389072},{"time_hours":414,"approval_perbill":625000001,"support_perbill":8337373,"approval":62.5000001,"support":0.8337373},{"time_hours":415,"approval_perbill":624094204,"support_perbill":8285913,"approval":62.4094204,"support":0.8285913},{"time_hours":416,"approval_perbill":623188406,"support_perbill":8234689,"approval":62.3188406,"support":0.8234689},{"time_hours":417,"approval_perbill":622282609,"support_perbill":8183700,"approval":62.2282609,"support":0.81837},{"time_hours":418,"approval_perbill":621376812,"support_perbill":8132945,"approval":62.1376812,"support":0.8132945},{"time_hours":419,"approval_perbill":620471015,"support_perbill":8082422,"approval":62.0471015,"support":0.8082422},{"time_hours":420,"approval_perbill":619565218,"support_perbill":8032129,"approval":61.9565218,"support":0.8032129},{"time_hours":421,"approval_perbill":618659421,"support_perbill":7982064,"approval":61.8659421,"support":0.7982064},{"time_hours":422,"approval_perbill":617753624,"support_perbill":7932227,"approval":61.7753624,"support":0.7932227},{"time_hours":423,"approval_perbill":616847827,"support_perbill":7882616,"approval":61.6847827,"support":0.7882616},{"time_hours":424,"approval_perbill":615942030,"support_perbill":7833228,"approval":61.594203,"support":0.7833228},{"time_hours":425,"approval_perbill":615036232,"support_perbill":7784063,"approval":61.5036232,"support":0.7784063},{"time_hours":426,"approval_perbill":614130435,"support_perbill":7735120,"approval":61.4130435,"support":0.773512},{"time_hours":427,"approval_perbill":613224638,"support_perbill":7686395,"approval":61.3224638,"support":0.7686395},{"time_hours":428,"approval_perbill":612318841,"support_perbill":7637889,"approval":61.2318841,"support":0.7637889},{"time_hours":429,"approval_perbill":611413044,"support_perbill":7589600,"approval":61.1413044,"support":0.75896},{"time_hours":430,"approval_perbill":610507247,"support_perbill":7541525,"approval":61.0507247,"support":0.7541525},{"time_hours":431,"approval_perbill":609601450,"support_perbill":7493665,"approval":60.960145,"support":0.7493665},{"time_hours":432,"approval_perbill":608695653,"support_perbill":7446017,"approval":60.8695653,"support":0.7446017},{"time_hours":433,"approval_perbill":607789855,"support_perbill":7398579,"approval":60.7789855,"support":0.7398579},{"time_hours":434,"approval_perbill":606884058,"support_perbill":7351351,"approval":60.6884058,"support":0.7351351},{"time_hours":435,"approval_perbill":605978262,"support_perbill":7304332,"approval":60.5978262,"support":0.7304332},{"time_hours":436,"approval_perbill":605072465,"support_perbill":7257519,"approval":60.5072465,"support":0.7257519},{"time_hours":437,"approval_perbill":604166667,"support_perbill":7210912,"approval":60.4166667,"support":0.7210912},{"time_hours":438,"approval_perbill":603260870,"support_perbill":7164508,"approval":60.326087,"support":0.7164508},{"time_hours":439,"approval_perbill":602355073,"support_perbill":7118308,"approval":60.2355073,"support":0.7118308},{"time_hours":440,"approval_perbill":601449276,"support_perbill":7072308,"approval":60.1449276,"support":0.7072308},{"time_hours":441,"approval_perbill":600543479,"support_perbill":7026509,"approval":60.0543479,"support":0.7026509},{"time_hours":442,"approval_perbill":599637682,"support_perbill":6980909,"approval":59.9637682,"support":0.6980909},{"time_hours":443,"approval_perbill":598731885,"support_perbill":6935506,"approval":59.8731885,"support":0.6935506},{"time_hours":444,"approval_perbill":597826088,"support_perbill":6890299,"approval":59.7826088,"support":0.6890299},{"time_hours":445,"approval_perbill":596920291,"support_perbill":6845288,"approval":59.6920291,"support":0.6845288},{"time_hours":446,"approval_perbill":596014493,"support_perbill":6800469,"approval":59.6014493,"support":0.6800469},{"time_hours":447,"approval_perbill":595108696,"support_perbill":6755844,"approval":59.5108696,"support":0.6755844},{"time_hours":448,"approval_perbill":594202899,"support_perbill":6711409,"approval":59.4202899,"support":0.6711409},{"time_hours":449,"approval_perbill":593297102,"support_perbill":6667165,"approval":59.3297102,"support":0.6667165},{"time_hours":450,"approval_perbill":592391305,"support_perbill":6623109,"approval":59.2391305,"support":0.6623109},{"time_hours":451,"approval_perbill":591485508,"support_perbill":6579241,"approval":59.1485508,"support":0.6579241},{"time_hours":452,"approval_perbill":590579711,"support_perbill":6535559,"approval":59.0579711,"support":0.6535559},{"time_hours":453,"approval_perbill":589673914,"support_perbill":6492063,"approval":58.9673914,"support":0.6492063},{"time_hours":454,"approval_perbill":588768116,"support_perbill":6448750,"approval":58.8768116,"support":0.644875},{"time_hours":455,"approval_perbill":587862319,"support_perbill":6405620,"approval":58.7862319,"support":0.640562},{"time_hours":456,"approval_perbill":586956522,"support_perbill":6362672,"approval":58.6956522,"support":0.6362672},{"time_hours":457,"approval_perbill":586050725,"support_perbill":6319905,"approval":58.6050725,"support":0.6319905},{"time_hours":458,"approval_perbill":585144928,"support_perbill":6277317,"approval":58.5144928,"support":0.6277317},{"time_hours":459,"approval_perbill":584239131,"support_perbill":6234907,"approval":58.4239131,"support":0.6234907},{"time_hours":460,"approval_perbill":583333334,"support_perbill":6192674,"approval":58.3333334,"support":0.6192674},{"time_hours":461,"approval_perbill":582427537,"support_perbill":6150617,"approval":58.2427537,"support":0.6150617},{"time_hours":462,"approval_perbill":581521739,"support_perbill":6108735,"approval":58.1521739,"support":0.6108735},{"time_hours":463,"approval_perbill":580615942,"support_perbill":6067028,"approval":58.0615942,"support":0.6067028},{"time_hours":464,"approval_perbill":579710145,"support_perbill":6025492,"approval":57.9710145,"support":0.6025492},{"time_hours":465,"approval_perbill":578804349,"support_perbill":5984129,"approval":57.8804349,"support":0.5984129},{"time_hours":466,"approval_perbill":577898552,"support_perbill":5942936,"approval":57.7898552,"support":0.5942936},{"time_hours":467,"approval_perbill":576992754,"support_perbill":5901913,"approval":57.6992754,"support":0.5901913},{"time_hours":468,"approval_perbill":576086957,"support_perbill":5861058,"approval":57.6086957,"support":0.5861058},{"time_hours":469,"approval_perbill":575181160,"support_perbill":5820371,"approval":57.518116,"support":0.5820371},{"time_hours":470,"approval_perbill":574275363,"support_perbill":5779851,"approval":57.4275363,"support":0.5779851},{"time_hours":471,"approval_perbill":573369566,"support_perbill":5739495,"approval":57.3369566,"support":0.5739495},{"time_hours":472,"approval_perbill":572463769,"support_perbill":5699305,"approval":57.2463769,"support":0.5699305},{"time_hours":473,"approval_perbill":571557972,"support_perbill":5659277,"approval":57.1557972,"support":0.5659277},{"time_hours":474,"approval_perbill":570652175,"support_perbill":5619412,"approval":57.0652175,"support":0.5619412},{"time_hours":475,"approval_perbill":569746377,"support_perbill":5579709,"approval":56.9746377,"support":0.5579709},{"time_hours":476,"approval_perbill":568840580,"support_perbill":5540166,"approval":56.884058,"support":0.5540166},{"time_hours":477,"approval_perbill":567934783,"support_perbill":5500783,"approval":56.7934783,"support":0.5500783},{"time_hours":478,"approval_perbill":567028986,"support_perbill":5461558,"approval":56.7028986,"support":0.5461558},{"time_hours":479,"approval_perbill":566123189,"support_perbill":5422491,"approval":56.6123189,"support":0.5422491},{"time_hours":480,"approval_perbill":565217392,"support_perbill":5383580,"approval":56.5217392,"support":0.538358},{"time_hours":481,"approval_perbill":564311595,"support_perbill":5344825,"approval":56.4311595,"support":0.5344825},{"time_hours":482,"approval_perbill":563405798,"support_perbill":5306225,"approval":56.3405798,"support":0.5306225},{"time_hours":483,"approval_perbill":562500000,"support_perbill":5267779,"approval":56.25,"support":0.5267779},{"time_hours":484,"approval_perbill":561594203,"support_perbill":5229485,"approval":56.1594203,"support":0.5229485},{"time_hours":485,"approval_perbill":560688406,"support_perbill":5191344,"approval":56.0688406,"support":0.5191344},{"time_hours":486,"approval_perbill":559782609,"support_perbill":5153354,"approval":55.9782609,"support":0.5153354},{"time_hours":487,"approval_perbill":558876812,"support_perbill":5115514,"approval":55.8876812,"support":0.5115514},{"time_hours":488,"approval_perbill":557971015,"support_perbill":5077823,"approval":55.7971015,"support":0.5077823},{"time_hours":489,"approval_perbill":557065218,"support_perbill":5040281,"approval":55.7065218,"support":0.5040281},{"time_hours":490,"approval_perbill":556159421,"support_perbill":5002886,"approval":55.6159421,"support":0.5002886},{"time_hours":491,"approval_perbill":555253624,"support_perbill":4965638,"approval":55.5253624,"support":0.4965638},{"time_hours":492,"approval_perbill":554347826,"support_perbill":4928536,"approval":55.4347826,"support":0.4928536},{"time_hours":493,"approval_perbill":553442029,"support_perbill":4891579,"approval":55.3442029,"support":0.4891579},{"time_hours":494,"approval_perbill":552536233,"support_perbill":4854766,"approval":55.2536233,"support":0.4854766},{"time_hours":495,"approval_perbill":551630436,"support_perbill":4818096,"approval":55.1630436,"support":0.4818096},{"time_hours":496,"approval_perbill":550724638,"support_perbill":4781569,"approval":55.0724638,"support":0.4781569},{"time_hours":497,"approval_perbill":549818841,"support_perbill":4745183,"approval":54.9818841,"support":0.4745183},{"time_hours":498,"approval_perbill":548913044,"support_perbill":4708939,"approval":54.8913044,"support":0.4708939},{"time_hours":499,"approval_perbill":548007247,"support_perbill":4672834,"approval":54.8007247,"support":0.4672834},{"time_hours":500,"approval_perbill":547101450,"support_perbill":4636868,"approval":54.710145,"support":0.4636868},{"time_hours":501,"approval_perbill":546195653,"support_perbill":4601041,"approval":54.6195653,"support":0.4601041},{"time_hours":502,"approval_perbill":545289856,"support_perbill":4565351,"approval":54.5289856,"support":0.4565351},{"time_hours":503,"approval_perbill":544384059,"support_perbill":4529799,"approval":54.4384059,"support":0.4529799},{"time_hours":504,"approval_perbill":543478261,"support_perbill":4494382,"approval":54.3478261,"support":0.4494382},{"time_hours":505,"approval_perbill":542572464,"support_perbill":4459100,"approval":54.2572464,"support":0.44591},{"time_hours":506,"approval_perbill":541666667,"support_perbill":4423953,"approval":54.1666667,"support":0.4423953},{"time_hours":507,"approval_perbill":540760870,"support_perbill":4388940,"approval":54.076087,"support":0.438894},{"time_hours":508,"approval_perbill":539855073,"support_perbill":4354059,"approval":53.9855073,"support":0.4354059},{"time_hours":509,"approval_perbill":538949276,"support_perbill":4319311,"approval":53.8949276,"support":0.4319311},{"time_hours":510,"approval_perbill":538043479,"support_perbill":4284694,"approval":53.8043479,"support":0.4284694},{"time_hours":511,"approval_perbill":537137682,"support_perbill":4250208,"approval":53.7137682,"support":0.4250208},{"time_hours":512,"approval_perbill":536231885,"support_perbill":4215851,"approval":53.6231885,"support":0.4215851},{"time_hours":513,"approval_perbill":535326087,"support_perbill":4181624,"approval":53.5326087,"support":0.4181624},{"time_hours":514,"approval_perbill":534420290,"support_perbill":4147526,"approval":53.442029,"support":0.4147526},{"time_hours":515,"approval_perbill":533514493,"support_perbill":4113555,"approval":53.3514493,"support":0.4113555},{"time_hours":516,"approval_perbill":532608696,"support_perbill":4079711,"approval":53.2608696,"support":0.4079711},{"time_hours":517,"approval_perbill":531702899,"support_perbill":4045994,"approval":53.1702899,"support":0.4045994},{"time_hours":518,"approval_perbill":530797102,"support_perbill":4012402,"approval":53.0797102,"support":0.4012402},{"time_hours":519,"approval_perbill":529891305,"support_perbill":3978935,"approval":52.9891305,"support":0.3978935},{"time_hours":520,"approval_perbill":528985508,"support_perbill":3945592,"approval":52.8985508,"support":0.3945592},{"time_hours":521,"approval_perbill":528079710,"support_perbill":3912373,"approval":52.807971,"support":0.3912373},{"time_hours":522,"approval_perbill":527173913,"support_perbill":3879277,"approval":52.7173913,"support":0.3879277},{"time_hours":523,"approval_perbill":526268117,"support_perbill":3846302,"approval":52.6268117,"support":0.3846302},{"time_hours":524,"approval_perbill":525362320,"support_perbill":3813450,"approval":52.536232,"support":0.381345},{"time_hours":525,"approval_perbill":524456522,"support_perbill":3780718,"approval":52.4456522,"support":0.3780718},{"time_hours":526,"approval_perbill":523550725,"support_perbill":3748106,"approval":52.3550725,"support":0.3748106},{"time_hours":527,"approval_perbill":522644928,"support_perbill":3715614,"approval":52.2644928,"support":0.3715614},{"time_hours":528,"approval_perbill":521739131,"support_perbill":3683241,"approval":52.1739131,"support":0.3683241},{"time_hours":529,"approval_perbill":520833334,"support_perbill":3650986,"approval":52.0833334,"support":0.3650986},{"time_hours":530,"approval_perbill":519927537,"support_perbill":3618848,"approval":51.9927537,"support":0.3618848},{"time_hours":531,"approval_perbill":519021740,"support_perbill":3586828,"approval":51.902174,"support":0.3586828},{"time_hours":532,"approval_perbill":518115943,"support_perbill":3554923,"approval":51.8115943,"support":0.3554923},{"time_hours":533,"approval_perbill":517210146,"support_perbill":3523135,"approval":51.7210146,"support":0.3523135},{"time_hours":534,"approval_perbill":516304348,"support_perbill":3491461,"approval":51.6304348,"support":0.3491461},{"time_hours":535,"approval_perbill":515398551,"support_perbill":3459901,"approval":51.5398551,"support":0.3459901},{"time_hours":536,"approval_perbill":514492754,"support_perbill":3428456,"approval":51.4492754,"support":0.3428456},{"time_hours":537,"approval_perbill":513586957,"support_perbill":3397123,"approval":51.3586957,"support":0.3397123},{"time_hours":538,"approval_perbill":512681160,"support_perbill":3365904,"approval":51.268116,"support":0.3365904},{"time_hours":539,"approval_perbill":511775363,"support_perbill":3334796,"approval":51.1775363,"support":0.3334796},{"time_hours":540,"approval_perbill":510869566,"support_perbill":3303799,"approval":51.0869566,"support":0.3303799},{"time_hours":541,"approval_perbill":509963769,"support_perbill":3272913,"approval":50.9963769,"support":0.3272913},{"time_hours":542,"approval_perbill":509057971,"support_perbill":3242137,"approval":50.9057971,"support":0.3242137},{"time_hours":543,"approval_perbill":508152174,"support_perbill":3211471,"approval":50.8152174,"support":0.3211471},{"time_hours":544,"approval_perbill":507246377,"support_perbill":3180914,"approval":50.7246377,"support":0.3180914},{"time_hours":545,"approval_perbill":506340580,"support_perbill":3150465,"approval":50.634058,"support":0.3150465},{"time_hours":546,"approval_perbill":505434783,"support_perbill":3120124,"approval":50.5434783,"support":0.3120124},{"time_hours":547,"approval_perbill":504528986,"support_perbill":3089891,"approval":50.4528986,"support":0.3089891},{"time_hours":548,"approval_perbill":503623189,"support_perbill":3059764,"approval":50.3623189,"support":0.3059764},{"time_hours":549,"approval_perbill":502717392,"support_perbill":3029743,"approval":50.2717392,"support":0.3029743},{"time_hours":550,"approval_perbill":501811595,"support_perbill":2999827,"approval":50.1811595,"support":0.2999827},{"time_hours":551,"approval_perbill":500905797,"support_perbill":2970017,"approval":50.0905797,"support":0.2970017},{"time_hours":552,"approval_perbill":500000000,"support_perbill":2940311,"approval":50,"support":0.2940311},{"time_hours":553,"approval_perbill":500000000,"support_perbill":2910709,"approval":50,"support":0.2910709},{"time_hours":554,"approval_perbill":500000000,"support_perbill":2881211,"approval":50,"support":0.2881211},{"time_hours":555,"approval_perbill":500000000,"support_perbill":2851815,"approval":50,"support":0.2851815},{"time_hours":556,"approval_perbill":500000000,"support_perbill":2822521,"approval":50,"support":0.2822521},{"time_hours":557,"approval_perbill":500000000,"support_perbill":2793330,"approval":50,"support":0.279333},{"time_hours":558,"approval_perbill":500000000,"support_perbill":2764239,"approval":50,"support":0.2764239},{"time_hours":559,"approval_perbill":500000000,"support_perbill":2735249,"approval":50,"support":0.2735249},{"time_hours":560,"approval_perbill":500000000,"support_perbill":2706360,"approval":50,"support":0.270636},{"time_hours":561,"approval_perbill":500000000,"support_perbill":2677569,"approval":50,"support":0.2677569},{"time_hours":562,"approval_perbill":500000000,"support_perbill":2648879,"approval":50,"support":0.2648879},{"time_hours":563,"approval_perbill":500000000,"support_perbill":2620286,"approval":50,"support":0.2620286},{"time_hours":564,"approval_perbill":500000000,"support_perbill":2591792,"approval":50,"support":0.2591792},{"time_hours":565,"approval_perbill":500000000,"support_perbill":2563396,"approval":50,"support":0.2563396},{"time_hours":566,"approval_perbill":500000000,"support_perbill":2535096,"approval":50,"support":0.2535096},{"time_hours":567,"approval_perbill":500000000,"support_perbill":2506893,"approval":50,"support":0.2506893},{"time_hours":568,"approval_perbill":500000000,"support_perbill":2478787,"approval":50,"support":0.2478787},{"time_hours":569,"approval_perbill":500000000,"support_perbill":2450776,"approval":50,"support":0.2450776},{"time_hours":570,"approval_perbill":500000000,"support_perbill":2422860,"approval":50,"support":0.242286},{"time_hours":571,"approval_perbill":500000000,"support_perbill":2395039,"approval":50,"support":0.2395039},{"time_hours":572,"approval_perbill":500000000,"support_perbill":2367312,"approval":50,"support":0.2367312},{"time_hours":573,"approval_perbill":500000000,"support_perbill":2339678,"approval":50,"support":0.2339678},{"time_hours":574,"approval_perbill":500000000,"support_perbill":2312138,"approval":50,"support":0.2312138},{"time_hours":575,"approval_perbill":500000000,"support_perbill":2284691,"approval":50,"support":0.2284691},{"time_hours":576,"approval_perbill":500000000,"support_perbill":2257336,"approval":50,"support":0.2257336},{"time_hours":577,"approval_perbill":500000000,"support_perbill":2230073,"approval":50,"support":0.2230073},{"time_hours":578,"approval_perbill":500000000,"support_perbill":2202901,"approval":50,"support":0.2202901},{"time_hours":579,"approval_perbill":500000000,"support_perbill":2175820,"approval":50,"support":0.217582},{"time_hours":580,"approval_perbill":500000000,"support_perbill":2148829,"approval":50,"support":0.2148829},{"time_hours":581,"approval_perbill":500000000,"support_perbill":2121929,"approval":50,"support":0.2121929},{"time_hours":582,"approval_perbill":500000000,"support_perbill":2095118,"approval":50,"support":0.2095118},{"time_hours":583,"approval_perbill":500000000,"support_perbill":2068396,"approval":50,"support":0.2068396},{"time_hours":584,"approval_perbill":500000000,"support_perbill":2041763,"approval":50,"support":0.2041763},{"time_hours":585,"approval_perbill":500000000,"support_perbill":2015218,"approval":50,"support":0.2015218},{"time_hours":586,"approval_perbill":500000000,"support_perbill":1988761,"approval":50,"support":0.1988761},{"time_hours":587,"approval_perbill":500000000,"support_perbill":1962391,"approval":50,"support":0.1962391},{"time_hours":588,"approval_perbill":500000000,"support_perbill":1936108,"approval":50,"support":0.1936108},{"time_hours":589,"approval_perbill":500000000,"support_perbill":1909911,"approval":50,"support":0.1909911},{"time_hours":590,"approval_perbill":500000000,"support_perbill":1883801,"approval":50,"support":0.1883801},{"time_hours":591,"approval_perbill":500000000,"support_perbill":1857776,"approval":50,"support":0.1857776},{"time_hours":592,"approval_perbill":500000000,"support_perbill":1831837,"approval":50,"support":0.1831837},{"time_hours":593,"approval_perbill":500000000,"support_perbill":1805982,"approval":50,"support":0.1805982},{"time_hours":594,"approval_perbill":500000000,"support_perbill":1780212,"approval":50,"support":0.1780212},{"time_hours":595,"approval_perbill":500000000,"support_perbill":1754525,"approval":50,"support":0.1754525},{"time_hours":596,"approval_perbill":500000000,"support_perbill":1728923,"approval":50,"support":0.1728923},{"time_hours":597,"approval_perbill":500000000,"support_perbill":1703403,"approval":50,"support":0.1703403},{"time_hours":598,"approval_perbill":500000000,"support_perbill":1677966,"approval":50,"support":0.1677966},{"time_hours":599,"approval_perbill":500000000,"support_perbill":1652611,"approval":50,"support":0.1652611},{"time_hours":600,"approval_perbill":500000000,"support_perbill":1627339,"approval":50,"support":0.1627339},{"time_hours":601,"approval_perbill":500000000,"support_perbill":1602148,"approval":50,"support":0.1602148},{"time_hours":602,"approval_perbill":500000000,"support_perbill":1577038,"approval":50,"support":0.1577038},{"time_hours":603,"approval_perbill":500000000,"support_perbill":1552009,"approval":50,"support":0.1552009},{"time_hours":604,"approval_perbill":500000000,"support_perbill":1527060,"approval":50,"support":0.152706},{"time_hours":605,"approval_perbill":500000000,"support_perbill":1502191,"approval":50,"support":0.1502191},{"time_hours":606,"approval_perbill":500000000,"support_perbill":1477402,"approval":50,"support":0.1477402},{"time_hours":607,"approval_perbill":500000000,"support_perbill":1452692,"approval":50,"support":0.1452692},{"time_hours":608,"approval_perbill":500000000,"support_perbill":1428061,"approval":50,"support":0.1428061},{"time_hours":609,"approval_perbill":500000000,"support_perbill":1403508,"approval":50,"support":0.1403508},{"time_hours":610,"approval_perbill":500000000,"support_perbill":1379034,"approval":50,"support":0.1379034},{"time_hours":611,"approval_perbill":500000000,"support_perbill":1354637,"approval":50,"support":0.1354637},{"time_hours":612,"approval_perbill":500000000,"support_perbill":1330317,"approval":50,"support":0.1330317},{"time_hours":613,"approval_perbill":500000000,"support_perbill":1306075,"approval":50,"support":0.1306075},{"time_hours":614,"approval_perbill":500000000,"support_perbill":1281909,"approval":50,"support":0.1281909},{"time_hours":615,"approval_perbill":500000000,"support_perbill":1257819,"approval":50,"support":0.1257819},{"time_hours":616,"approval_perbill":500000000,"support_perbill":1233806,"approval":50,"support":0.1233806},{"time_hours":617,"approval_perbill":500000000,"support_perbill":1209868,"approval":50,"support":0.1209868},{"time_hours":618,"approval_perbill":500000000,"support_perbill":1186005,"approval":50,"support":0.1186005},{"time_hours":619,"approval_perbill":500000000,"support_perbill":1162216,"approval":50,"support":0.1162216},{"time_hours":620,"approval_perbill":500000000,"support_perbill":1138503,"approval":50,"support":0.1138503},{"time_hours":621,"approval_perbill":500000000,"support_perbill":1114863,"approval":50,"support":0.1114863},{"time_hours":622,"approval_perbill":500000000,"support_perbill":1091297,"approval":50,"support":0.1091297},{"time_hours":623,"approval_perbill":500000000,"support_perbill":1067805,"approval":50,"support":0.1067805},{"time_hours":624,"approval_perbill":500000000,"support_perbill":1044386,"approval":50,"support":0.1044386},{"time_hours":625,"approval_perbill":500000000,"support_perbill":1021039,"approval":50,"support":0.1021039},{"time_hours":626,"approval_perbill":500000000,"support_perbill":997765,"approval":50,"support":0.0997765},{"time_hours":627,"approval_perbill":500000000,"support_perbill":974563,"approval":50,"support":0.0974563},{"time_hours":628,"approval_perbill":500000000,"support_perbill":951433,"approval":50,"support":0.0951433},{"time_hours":629,"approval_perbill":500000000,"support_perbill":928374,"approval":50,"support":0.0928374},{"time_hours":630,"approval_perbill":500000000,"support_perbill":905386,"approval":50,"support":0.0905386},{"time_hours":631,"approval_perbill":500000000,"support_perbill":882469,"approval":50,"support":0.0882469},{"time_hours":632,"approval_perbill":500000000,"support_perbill":859623,"approval":50,"support":0.0859623},{"time_hours":633,"approval_perbill":500000000,"support_perbill":836846,"approval":50,"support":0.0836846},{"time_hours":634,"approval_perbill":500000000,"support_perbill":814140,"approval":50,"support":0.081414},{"time_hours":635,"approval_perbill":500000000,"support_perbill":791502,"approval":50,"support":0.0791502},{"time_hours":636,"approval_perbill":500000000,"support_perbill":768934,"approval":50,"support":0.0768934},{"time_hours":637,"approval_perbill":500000000,"support_perbill":746435,"approval":50,"support":0.0746435},{"time_hours":638,"approval_perbill":500000000,"support_perbill":724004,"approval":50,"support":0.0724004},{"time_hours":639,"approval_perbill":500000000,"support_perbill":701642,"approval":50,"support":0.0701642},{"time_hours":640,"approval_perbill":500000000,"support_perbill":679347,"approval":50,"support":0.0679347},{"time_hours":641,"approval_perbill":500000000,"support_perbill":657120,"approval":50,"support":0.065712},{"time_hours":642,"approval_perbill":500000000,"support_perbill":634960,"approval":50,"support":0.063496},{"time_hours":643,"approval_perbill":500000000,"support_perbill":612867,"approval":50,"support":0.0612867},{"time_hours":644,"approval_perbill":500000000,"support_perbill":590841,"approval":50,"support":0.0590841},{"time_hours":645,"approval_perbill":500000000,"support_perbill":568881,"approval":50,"support":0.0568881},{"time_hours":646,"approval_perbill":500000000,"support_perbill":546988,"approval":50,"support":0.0546988},{"time_hours":647,"approval_perbill":500000000,"support_perbill":525160,"approval":50,"support":0.052516},{"time_hours":648,"approval_perbill":500000000,"support_perbill":503397,"approval":50,"support":0.0503397},{"time_hours":649,"approval_perbill":500000000,"support_perbill":481700,"approval":50,"support":0.04817},{"time_hours":650,"approval_perbill":500000000,"support_perbill":460067,"approval":50,"support":0.0460067},{"time_hours":651,"approval_perbill":500000000,"support_perbill":438500,"approval":50,"support":0.04385},{"time_hours":652,"approval_perbill":500000000,"support_perbill":416996,"approval":50,"support":0.0416996},{"time_hours":653,"approval_perbill":500000000,"support_perbill":395557,"approval":50,"support":0.0395557},{"time_hours":654,"approval_perbill":500000000,"support_perbill":374181,"approval":50,"support":0.0374181},{"time_hours":655,"approval_perbill":500000000,"support_perbill":352868,"approval":50,"support":0.0352868},{"time_hours":656,"approval_perbill":500000000,"support_perbill":331619,"approval":50,"support":0.0331619},{"time_hours":657,"approval_perbill":500000000,"support_perbill":310433,"approval":50,"support":0.0310433},{"time_hours":658,"approval_perbill":500000000,"support_perbill":289309,"approval":50,"support":0.0289309},{"time_hours":659,"approval_perbill":500000000,"support_perbill":268248,"approval":50,"support":0.0268248},{"time_hours":660,"approval_perbill":500000000,"support_perbill":247249,"approval":50,"support":0.0247249},{"time_hours":661,"approval_perbill":500000000,"support_perbill":226311,"approval":50,"support":0.0226311},{"time_hours":662,"approval_perbill":500000000,"support_perbill":205435,"approval":50,"support":0.0205435},{"time_hours":663,"approval_perbill":500000000,"support_perbill":184620,"approval":50,"support":0.018462},{"time_hours":664,"approval_perbill":500000000,"support_perbill":163867,"approval":50,"support":0.0163867},{"time_hours":665,"approval_perbill":500000000,"support_perbill":143173,"approval":50,"support":0.0143173},{"time_hours":666,"approval_perbill":500000000,"support_perbill":122541,"approval":50,"support":0.0122541},{"time_hours":667,"approval_perbill":500000000,"support_perbill":101968,"approval":50,"support":0.0101968},{"time_hours":668,"approval_perbill":500000000,"support_perbill":81456,"approval":50,"support":0.0081456},{"time_hours":669,"approval_perbill":500000000,"support_perbill":61003,"approval":50,"support":0.0061003},{"time_hours":670,"approval_perbill":500000000,"support_perbill":40609,"approval":50,"support":0.0040609},{"time_hours":671,"approval_perbill":500000000,"support_perbill":20275,"approval":50,"support":0.0020275},{"time_hours":672,"approval_perbill":500000000,"support_perbill":0,"approval":50,"support":0}]')},24616:p=>{"use strict";p.exports=JSON.parse('[{"time_hours":0,"approval_perbill":1000000000,"support_perbill":500000026,"approval":100,"support":50.0000026},{"time_hours":1,"approval_perbill":998774510,"support_perbill":455636061,"approval":99.877451,"support":45.5636061},{"time_hours":2,"approval_perbill":997549020,"support_perbill":418401359,"approval":99.754902,"support":41.8401359},{"time_hours":3,"approval_perbill":996323530,"support_perbill":386705228,"approval":99.632353,"support":38.6705228},{"time_hours":4,"approval_perbill":995098040,"support_perbill":359397443,"approval":99.509804,"support":35.9397443},{"time_hours":5,"approval_perbill":993872550,"support_perbill":335625639,"approval":99.387255,"support":33.5625639},{"time_hours":6,"approval_perbill":992647060,"support_perbill":314744813,"approval":99.264706,"support":31.4744813},{"time_hours":7,"approval_perbill":991421570,"support_perbill":296257808,"approval":99.142157,"support":29.6257808},{"time_hours":8,"approval_perbill":990196080,"support_perbill":279775293,"approval":99.019608,"support":27.9775293},{"time_hours":9,"approval_perbill":988970589,"support_perbill":264988013,"approval":98.8970589,"support":26.4988013},{"time_hours":10,"approval_perbill":987745099,"support_perbill":251647242,"approval":98.7745099,"support":25.1647242},{"time_hours":11,"approval_perbill":986519609,"support_perbill":239550622,"approval":98.6519609,"support":23.9550622},{"time_hours":12,"approval_perbill":985294119,"support_perbill":228531862,"approval":98.5294119,"support":22.8531862},{"time_hours":13,"approval_perbill":984068628,"support_perbill":218453039,"approval":98.4068628,"support":21.8453039},{"time_hours":14,"approval_perbill":982843138,"support_perbill":209198815,"approval":98.2843138,"support":20.9198815},{"time_hours":15,"approval_perbill":981617648,"support_perbill":200671963,"approval":98.1617648,"support":20.0671963},{"time_hours":16,"approval_perbill":980392158,"support_perbill":192789972,"approval":98.0392158,"support":19.2789972},{"time_hours":17,"approval_perbill":979166667,"support_perbill":185482348,"approval":97.9166667,"support":18.5482348},{"time_hours":18,"approval_perbill":977941177,"support_perbill":178688524,"approval":97.7941177,"support":17.8688524},{"time_hours":19,"approval_perbill":976715687,"support_perbill":172356151,"approval":97.6715687,"support":17.2356151},{"time_hours":20,"approval_perbill":975490197,"support_perbill":166439756,"approval":97.5490197,"support":16.6439756},{"time_hours":21,"approval_perbill":974264706,"support_perbill":160899652,"approval":97.4264706,"support":16.0899652},{"time_hours":22,"approval_perbill":973039216,"support_perbill":155701053,"approval":97.3039216,"support":15.5701053},{"time_hours":23,"approval_perbill":971813726,"support_perbill":150813323,"approval":97.1813726,"support":15.0813323},{"time_hours":24,"approval_perbill":970588236,"support_perbill":146209386,"approval":97.0588236,"support":14.6209386},{"time_hours":25,"approval_perbill":969362746,"support_perbill":141865225,"approval":96.9362746,"support":14.1865225},{"time_hours":26,"approval_perbill":968137256,"support_perbill":137759452,"approval":96.8137256,"support":13.7759452},{"time_hours":27,"approval_perbill":966911766,"support_perbill":133872975,"approval":96.6911766,"support":13.3872975},{"time_hours":28,"approval_perbill":965686276,"support_perbill":130188679,"approval":96.5686276,"support":13.0188679},{"time_hours":29,"approval_perbill":964460786,"support_perbill":126691186,"approval":96.4460786,"support":12.6691186},{"time_hours":30,"approval_perbill":963235295,"support_perbill":123366639,"approval":96.3235295,"support":12.3366639},{"time_hours":31,"approval_perbill":962009805,"support_perbill":120202524,"approval":96.2009805,"support":12.0202524},{"time_hours":32,"approval_perbill":960784315,"support_perbill":117187499,"approval":96.0784315,"support":11.7187499},{"time_hours":33,"approval_perbill":959558825,"support_perbill":114311269,"approval":95.9558825,"support":11.4311269},{"time_hours":34,"approval_perbill":958333334,"support_perbill":111564465,"approval":95.8333334,"support":11.1564465},{"time_hours":35,"approval_perbill":957107844,"support_perbill":108938546,"approval":95.7107844,"support":10.8938546},{"time_hours":36,"approval_perbill":955882354,"support_perbill":106425701,"approval":95.5882354,"support":10.6425701},{"time_hours":37,"approval_perbill":954656864,"support_perbill":104018782,"approval":95.4656864,"support":10.4018782},{"time_hours":38,"approval_perbill":953431373,"support_perbill":101711228,"approval":95.3431373,"support":10.1711228},{"time_hours":39,"approval_perbill":952205883,"support_perbill":99497012,"approval":95.2205883,"support":9.9497012},{"time_hours":40,"approval_perbill":950980393,"support_perbill":97370582,"approval":95.0980393,"support":9.7370582},{"time_hours":41,"approval_perbill":949754903,"support_perbill":95326819,"approval":94.9754903,"support":9.5326819},{"time_hours":42,"approval_perbill":948529412,"support_perbill":93360994,"approval":94.8529412,"support":9.3360994},{"time_hours":43,"approval_perbill":947303922,"support_perbill":91468733,"approval":94.7303922,"support":9.1468733},{"time_hours":44,"approval_perbill":946078432,"support_perbill":89645982,"approval":94.6078432,"support":8.9645982},{"time_hours":45,"approval_perbill":944852942,"support_perbill":87888981,"approval":94.4852942,"support":8.7888981},{"time_hours":46,"approval_perbill":943627452,"support_perbill":86194234,"approval":94.3627452,"support":8.6194234},{"time_hours":47,"approval_perbill":942401961,"support_perbill":84558490,"approval":94.2401961,"support":8.455849},{"time_hours":48,"approval_perbill":941176471,"support_perbill":82978722,"approval":94.1176471,"support":8.2978722},{"time_hours":49,"approval_perbill":939950981,"support_perbill":81452103,"approval":93.9950981,"support":8.1452103},{"time_hours":50,"approval_perbill":938725491,"support_perbill":79975997,"approval":93.8725491,"support":7.9975997},{"time_hours":51,"approval_perbill":937500001,"support_perbill":78547936,"approval":93.7500001,"support":7.8547936},{"time_hours":52,"approval_perbill":936274511,"support_perbill":77165614,"approval":93.6274511,"support":7.7165614},{"time_hours":53,"approval_perbill":935049021,"support_perbill":75826867,"approval":93.5049021,"support":7.5826867},{"time_hours":54,"approval_perbill":933823531,"support_perbill":74529666,"approval":93.3823531,"support":7.4529666},{"time_hours":55,"approval_perbill":932598040,"support_perbill":73272106,"approval":93.259804,"support":7.3272106},{"time_hours":56,"approval_perbill":931372550,"support_perbill":72052400,"approval":93.137255,"support":7.20524},{"time_hours":57,"approval_perbill":930147060,"support_perbill":70868862,"approval":93.014706,"support":7.0868862},{"time_hours":58,"approval_perbill":928921570,"support_perbill":69719908,"approval":92.892157,"support":6.9719908},{"time_hours":59,"approval_perbill":927696079,"support_perbill":68604042,"approval":92.7696079,"support":6.8604042},{"time_hours":60,"approval_perbill":926470589,"support_perbill":67519857,"approval":92.6470589,"support":6.7519857},{"time_hours":61,"approval_perbill":925245099,"support_perbill":66466022,"approval":92.5245099,"support":6.6466022},{"time_hours":62,"approval_perbill":924019609,"support_perbill":65441280,"approval":92.4019609,"support":6.544128},{"time_hours":63,"approval_perbill":922794118,"support_perbill":64444443,"approval":92.2794118,"support":6.4444443},{"time_hours":64,"approval_perbill":921568628,"support_perbill":63474386,"approval":92.1568628,"support":6.3474386},{"time_hours":65,"approval_perbill":920343138,"support_perbill":62530044,"approval":92.0343138,"support":6.2530044},{"time_hours":66,"approval_perbill":919117648,"support_perbill":61610409,"approval":91.9117648,"support":6.1610409},{"time_hours":67,"approval_perbill":917892158,"support_perbill":60714523,"approval":91.7892158,"support":6.0714523},{"time_hours":68,"approval_perbill":916666667,"support_perbill":59841478,"approval":91.6666667,"support":5.9841478},{"time_hours":69,"approval_perbill":915441177,"support_perbill":58990411,"approval":91.5441177,"support":5.8990411},{"time_hours":70,"approval_perbill":914215687,"support_perbill":58160504,"approval":91.4215687,"support":5.8160504},{"time_hours":71,"approval_perbill":912990197,"support_perbill":57350975,"approval":91.2990197,"support":5.7350975},{"time_hours":72,"approval_perbill":911764706,"support_perbill":56561084,"approval":91.1764706,"support":5.6561084},{"time_hours":73,"approval_perbill":910539216,"support_perbill":55790126,"approval":91.0539216,"support":5.5790126},{"time_hours":74,"approval_perbill":909313726,"support_perbill":55037426,"approval":90.9313726,"support":5.5037426},{"time_hours":75,"approval_perbill":908088236,"support_perbill":54302345,"approval":90.8088236,"support":5.4302345},{"time_hours":76,"approval_perbill":906862746,"support_perbill":53584271,"approval":90.6862746,"support":5.3584271},{"time_hours":77,"approval_perbill":905637256,"support_perbill":52882620,"approval":90.5637256,"support":5.288262},{"time_hours":78,"approval_perbill":904411766,"support_perbill":52196835,"approval":90.4411766,"support":5.2196835},{"time_hours":79,"approval_perbill":903186276,"support_perbill":51526385,"approval":90.3186276,"support":5.1526385},{"time_hours":80,"approval_perbill":901960785,"support_perbill":50870759,"approval":90.1960785,"support":5.0870759},{"time_hours":81,"approval_perbill":900735295,"support_perbill":50229473,"approval":90.0735295,"support":5.0229473},{"time_hours":82,"approval_perbill":899509805,"support_perbill":49602061,"approval":89.9509805,"support":4.9602061},{"time_hours":83,"approval_perbill":898284315,"support_perbill":48988077,"approval":89.8284315,"support":4.8988077},{"time_hours":84,"approval_perbill":897058824,"support_perbill":48387095,"approval":89.7058824,"support":4.8387095},{"time_hours":85,"approval_perbill":895833334,"support_perbill":47798707,"approval":89.5833334,"support":4.7798707},{"time_hours":86,"approval_perbill":894607844,"support_perbill":47222519,"approval":89.4607844,"support":4.7222519},{"time_hours":87,"approval_perbill":893382354,"support_perbill":46658158,"approval":89.3382354,"support":4.6658158},{"time_hours":88,"approval_perbill":892156864,"support_perbill":46105262,"approval":89.2156864,"support":4.6105262},{"time_hours":89,"approval_perbill":890931373,"support_perbill":45563485,"approval":89.0931373,"support":4.5563485},{"time_hours":90,"approval_perbill":889705883,"support_perbill":45032496,"approval":88.9705883,"support":4.5032496},{"time_hours":91,"approval_perbill":888480393,"support_perbill":44511976,"approval":88.8480393,"support":4.4511976},{"time_hours":92,"approval_perbill":887254903,"support_perbill":44001617,"approval":88.7254903,"support":4.4001617},{"time_hours":93,"approval_perbill":886029412,"support_perbill":43501126,"approval":88.6029412,"support":4.3501126},{"time_hours":94,"approval_perbill":884803922,"support_perbill":43010218,"approval":88.4803922,"support":4.3010218},{"time_hours":95,"approval_perbill":883578432,"support_perbill":42528621,"approval":88.3578432,"support":4.2528621},{"time_hours":96,"approval_perbill":882352942,"support_perbill":42056074,"approval":88.2352942,"support":4.2056074},{"time_hours":97,"approval_perbill":881127452,"support_perbill":41592321,"approval":88.1127452,"support":4.1592321},{"time_hours":98,"approval_perbill":879901962,"support_perbill":41137122,"approval":87.9901962,"support":4.1137122},{"time_hours":99,"approval_perbill":878676472,"support_perbill":40690242,"approval":87.8676472,"support":4.0690242},{"time_hours":100,"approval_perbill":877450982,"support_perbill":40251453,"approval":87.7450982,"support":4.0251453},{"time_hours":101,"approval_perbill":876225491,"support_perbill":39820539,"approval":87.6225491,"support":3.9820539},{"time_hours":102,"approval_perbill":875000001,"support_perbill":39397289,"approval":87.5000001,"support":3.9397289},{"time_hours":103,"approval_perbill":873774511,"support_perbill":38981501,"approval":87.3774511,"support":3.8981501},{"time_hours":104,"approval_perbill":872549021,"support_perbill":38572980,"approval":87.2549021,"support":3.857298},{"time_hours":105,"approval_perbill":871323530,"support_perbill":38171535,"approval":87.132353,"support":3.8171535},{"time_hours":106,"approval_perbill":870098040,"support_perbill":37776985,"approval":87.009804,"support":3.7776985},{"time_hours":107,"approval_perbill":868872550,"support_perbill":37389155,"approval":86.887255,"support":3.7389155},{"time_hours":108,"approval_perbill":867647060,"support_perbill":37007873,"approval":86.764706,"support":3.7007873},{"time_hours":109,"approval_perbill":866421570,"support_perbill":36632975,"approval":86.642157,"support":3.6632975},{"time_hours":110,"approval_perbill":865196079,"support_perbill":36264302,"approval":86.5196079,"support":3.6264302},{"time_hours":111,"approval_perbill":863970589,"support_perbill":35901701,"approval":86.3970589,"support":3.5901701},{"time_hours":112,"approval_perbill":862745099,"support_perbill":35545023,"approval":86.2745099,"support":3.5545023},{"time_hours":113,"approval_perbill":861519609,"support_perbill":35194123,"approval":86.1519609,"support":3.5194123},{"time_hours":114,"approval_perbill":860294118,"support_perbill":34848862,"approval":86.0294118,"support":3.4848862},{"time_hours":115,"approval_perbill":859068628,"support_perbill":34509106,"approval":85.9068628,"support":3.4509106},{"time_hours":116,"approval_perbill":857843138,"support_perbill":34174724,"approval":85.7843138,"support":3.4174724},{"time_hours":117,"approval_perbill":856617648,"support_perbill":33845590,"approval":85.6617648,"support":3.384559},{"time_hours":118,"approval_perbill":855392157,"support_perbill":33521580,"approval":85.5392157,"support":3.352158},{"time_hours":119,"approval_perbill":854166667,"support_perbill":33202577,"approval":85.4166667,"support":3.3202577},{"time_hours":120,"approval_perbill":852941177,"support_perbill":32888464,"approval":85.2941177,"support":3.2888464},{"time_hours":121,"approval_perbill":851715687,"support_perbill":32579131,"approval":85.1715687,"support":3.2579131},{"time_hours":122,"approval_perbill":850490197,"support_perbill":32274469,"approval":85.0490197,"support":3.2274469},{"time_hours":123,"approval_perbill":849264707,"support_perbill":31974373,"approval":84.9264707,"support":3.1974373},{"time_hours":124,"approval_perbill":848039217,"support_perbill":31678741,"approval":84.8039217,"support":3.1678741},{"time_hours":125,"approval_perbill":846813727,"support_perbill":31387475,"approval":84.6813727,"support":3.1387475},{"time_hours":126,"approval_perbill":845588236,"support_perbill":31100477,"approval":84.5588236,"support":3.1100477},{"time_hours":127,"approval_perbill":844362746,"support_perbill":30817656,"approval":84.4362746,"support":3.0817656},{"time_hours":128,"approval_perbill":843137256,"support_perbill":30538921,"approval":84.3137256,"support":3.0538921},{"time_hours":129,"approval_perbill":841911766,"support_perbill":30264184,"approval":84.1911766,"support":3.0264184},{"time_hours":130,"approval_perbill":840686276,"support_perbill":29993358,"approval":84.0686276,"support":2.9993358},{"time_hours":131,"approval_perbill":839460785,"support_perbill":29726363,"approval":83.9460785,"support":2.9726363},{"time_hours":132,"approval_perbill":838235295,"support_perbill":29463116,"approval":83.8235295,"support":2.9463116},{"time_hours":133,"approval_perbill":837009805,"support_perbill":29203539,"approval":83.7009805,"support":2.9203539},{"time_hours":134,"approval_perbill":835784315,"support_perbill":28947556,"approval":83.5784315,"support":2.8947556},{"time_hours":135,"approval_perbill":834558824,"support_perbill":28695094,"approval":83.4558824,"support":2.8695094},{"time_hours":136,"approval_perbill":833333334,"support_perbill":28446079,"approval":83.3333334,"support":2.8446079},{"time_hours":137,"approval_perbill":832107844,"support_perbill":28200442,"approval":83.2107844,"support":2.8200442},{"time_hours":138,"approval_perbill":830882354,"support_perbill":27958114,"approval":83.0882354,"support":2.7958114},{"time_hours":139,"approval_perbill":829656863,"support_perbill":27719030,"approval":82.9656863,"support":2.771903},{"time_hours":140,"approval_perbill":828431373,"support_perbill":27483123,"approval":82.8431373,"support":2.7483123},{"time_hours":141,"approval_perbill":827205883,"support_perbill":27250333,"approval":82.7205883,"support":2.7250333},{"time_hours":142,"approval_perbill":825980393,"support_perbill":27020596,"approval":82.5980393,"support":2.7020596},{"time_hours":143,"approval_perbill":824754902,"support_perbill":26793853,"approval":82.4754902,"support":2.6793853},{"time_hours":144,"approval_perbill":823529412,"support_perbill":26570047,"approval":82.3529412,"support":2.6570047},{"time_hours":145,"approval_perbill":822303922,"support_perbill":26349121,"approval":82.2303922,"support":2.6349121},{"time_hours":146,"approval_perbill":821078432,"support_perbill":26131019,"approval":82.1078432,"support":2.6131019},{"time_hours":147,"approval_perbill":819852942,"support_perbill":25915687,"approval":81.9852942,"support":2.5915687},{"time_hours":148,"approval_perbill":818627452,"support_perbill":25703073,"approval":81.8627452,"support":2.5703073},{"time_hours":149,"approval_perbill":817401962,"support_perbill":25493126,"approval":81.7401962,"support":2.5493126},{"time_hours":150,"approval_perbill":816176472,"support_perbill":25285796,"approval":81.6176472,"support":2.5285796},{"time_hours":151,"approval_perbill":814950982,"support_perbill":25081035,"approval":81.4950982,"support":2.5081035},{"time_hours":152,"approval_perbill":813725491,"support_perbill":24878795,"approval":81.3725491,"support":2.4878795},{"time_hours":153,"approval_perbill":812500001,"support_perbill":24679029,"approval":81.2500001,"support":2.4679029},{"time_hours":154,"approval_perbill":811274511,"support_perbill":24481693,"approval":81.1274511,"support":2.4481693},{"time_hours":155,"approval_perbill":810049021,"support_perbill":24286742,"approval":81.0049021,"support":2.4286742},{"time_hours":156,"approval_perbill":808823530,"support_perbill":24094134,"approval":80.882353,"support":2.4094134},{"time_hours":157,"approval_perbill":807598040,"support_perbill":23903827,"approval":80.759804,"support":2.3903827},{"time_hours":158,"approval_perbill":806372550,"support_perbill":23715779,"approval":80.637255,"support":2.3715779},{"time_hours":159,"approval_perbill":805147060,"support_perbill":23529951,"approval":80.514706,"support":2.3529951},{"time_hours":160,"approval_perbill":803921569,"support_perbill":23346303,"approval":80.3921569,"support":2.3346303},{"time_hours":161,"approval_perbill":802696079,"support_perbill":23164797,"approval":80.2696079,"support":2.3164797},{"time_hours":162,"approval_perbill":801470589,"support_perbill":22985397,"approval":80.1470589,"support":2.2985397},{"time_hours":163,"approval_perbill":800245099,"support_perbill":22808065,"approval":80.0245099,"support":2.2808065},{"time_hours":164,"approval_perbill":799019608,"support_perbill":22632766,"approval":79.9019608,"support":2.2632766},{"time_hours":165,"approval_perbill":797794118,"support_perbill":22459466,"approval":79.7794118,"support":2.2459466},{"time_hours":166,"approval_perbill":796568628,"support_perbill":22288130,"approval":79.6568628,"support":2.228813},{"time_hours":167,"approval_perbill":795343138,"support_perbill":22118725,"approval":79.5343138,"support":2.2118725},{"time_hours":168,"approval_perbill":794117648,"support_perbill":21951219,"approval":79.4117648,"support":2.1951219},{"time_hours":169,"approval_perbill":792892158,"support_perbill":21785579,"approval":79.2892158,"support":2.1785579},{"time_hours":170,"approval_perbill":791666668,"support_perbill":21621776,"approval":79.1666668,"support":2.1621776},{"time_hours":171,"approval_perbill":790441178,"support_perbill":21459778,"approval":79.0441178,"support":2.1459778},{"time_hours":172,"approval_perbill":789215688,"support_perbill":21299556,"approval":78.9215688,"support":2.1299556},{"time_hours":173,"approval_perbill":787990197,"support_perbill":21141081,"approval":78.7990197,"support":2.1141081},{"time_hours":174,"approval_perbill":786764707,"support_perbill":20984324,"approval":78.6764707,"support":2.0984324},{"time_hours":175,"approval_perbill":785539217,"support_perbill":20829258,"approval":78.5539217,"support":2.0829258},{"time_hours":176,"approval_perbill":784313727,"support_perbill":20675855,"approval":78.4313727,"support":2.0675855},{"time_hours":177,"approval_perbill":783088236,"support_perbill":20524089,"approval":78.3088236,"support":2.0524089},{"time_hours":178,"approval_perbill":781862746,"support_perbill":20373934,"approval":78.1862746,"support":2.0373934},{"time_hours":179,"approval_perbill":780637256,"support_perbill":20225364,"approval":78.0637256,"support":2.0225364},{"time_hours":180,"approval_perbill":779411766,"support_perbill":20078354,"approval":77.9411766,"support":2.0078354},{"time_hours":181,"approval_perbill":778186275,"support_perbill":19932880,"approval":77.8186275,"support":1.993288},{"time_hours":182,"approval_perbill":776960785,"support_perbill":19788917,"approval":77.6960785,"support":1.9788917},{"time_hours":183,"approval_perbill":775735295,"support_perbill":19646444,"approval":77.5735295,"support":1.9646444},{"time_hours":184,"approval_perbill":774509805,"support_perbill":19505435,"approval":77.4509805,"support":1.9505435},{"time_hours":185,"approval_perbill":773284314,"support_perbill":19365870,"approval":77.3284314,"support":1.936587},{"time_hours":186,"approval_perbill":772058824,"support_perbill":19227725,"approval":77.2058824,"support":1.9227725},{"time_hours":187,"approval_perbill":770833334,"support_perbill":19090980,"approval":77.0833334,"support":1.909098},{"time_hours":188,"approval_perbill":769607844,"support_perbill":18955613,"approval":76.9607844,"support":1.8955613},{"time_hours":189,"approval_perbill":768382353,"support_perbill":18821603,"approval":76.8382353,"support":1.8821603},{"time_hours":190,"approval_perbill":767156863,"support_perbill":18688931,"approval":76.7156863,"support":1.8688931},{"time_hours":191,"approval_perbill":765931373,"support_perbill":18557575,"approval":76.5931373,"support":1.8557575},{"time_hours":192,"approval_perbill":764705883,"support_perbill":18427518,"approval":76.4705883,"support":1.8427518},{"time_hours":193,"approval_perbill":763480393,"support_perbill":18298739,"approval":76.3480393,"support":1.8298739},{"time_hours":194,"approval_perbill":762254903,"support_perbill":18171219,"approval":76.2254903,"support":1.8171219},{"time_hours":195,"approval_perbill":761029413,"support_perbill":18044941,"approval":76.1029413,"support":1.8044941},{"time_hours":196,"approval_perbill":759803923,"support_perbill":17919887,"approval":75.9803923,"support":1.7919887},{"time_hours":197,"approval_perbill":758578433,"support_perbill":17796038,"approval":75.8578433,"support":1.7796038},{"time_hours":198,"approval_perbill":757352942,"support_perbill":17673377,"approval":75.7352942,"support":1.7673377},{"time_hours":199,"approval_perbill":756127452,"support_perbill":17551888,"approval":75.6127452,"support":1.7551888},{"time_hours":200,"approval_perbill":754901962,"support_perbill":17431553,"approval":75.4901962,"support":1.7431553},{"time_hours":201,"approval_perbill":753676472,"support_perbill":17312357,"approval":75.3676472,"support":1.7312357},{"time_hours":202,"approval_perbill":752450981,"support_perbill":17194282,"approval":75.2450981,"support":1.7194282},{"time_hours":203,"approval_perbill":751225491,"support_perbill":17077315,"approval":75.1225491,"support":1.7077315},{"time_hours":204,"approval_perbill":750000001,"support_perbill":16961437,"approval":75.0000001,"support":1.6961437},{"time_hours":205,"approval_perbill":748774511,"support_perbill":16846636,"approval":74.8774511,"support":1.6846636},{"time_hours":206,"approval_perbill":747549020,"support_perbill":16732895,"approval":74.754902,"support":1.6732895},{"time_hours":207,"approval_perbill":746323530,"support_perbill":16620201,"approval":74.632353,"support":1.6620201},{"time_hours":208,"approval_perbill":745098040,"support_perbill":16508538,"approval":74.509804,"support":1.6508538},{"time_hours":209,"approval_perbill":743872550,"support_perbill":16397893,"approval":74.387255,"support":1.6397893},{"time_hours":210,"approval_perbill":742647059,"support_perbill":16288252,"approval":74.2647059,"support":1.6288252},{"time_hours":211,"approval_perbill":741421569,"support_perbill":16179601,"approval":74.1421569,"support":1.6179601},{"time_hours":212,"approval_perbill":740196079,"support_perbill":16071927,"approval":74.0196079,"support":1.6071927},{"time_hours":213,"approval_perbill":738970589,"support_perbill":15965217,"approval":73.8970589,"support":1.5965217},{"time_hours":214,"approval_perbill":737745099,"support_perbill":15859457,"approval":73.7745099,"support":1.5859457},{"time_hours":215,"approval_perbill":736519608,"support_perbill":15754636,"approval":73.6519608,"support":1.5754636},{"time_hours":216,"approval_perbill":735294118,"support_perbill":15650741,"approval":73.5294118,"support":1.5650741},{"time_hours":217,"approval_perbill":734068628,"support_perbill":15547759,"approval":73.4068628,"support":1.5547759},{"time_hours":218,"approval_perbill":732843138,"support_perbill":15445679,"approval":73.2843138,"support":1.5445679},{"time_hours":219,"approval_perbill":731617648,"support_perbill":15344488,"approval":73.1617648,"support":1.5344488},{"time_hours":220,"approval_perbill":730392158,"support_perbill":15244176,"approval":73.0392158,"support":1.5244176},{"time_hours":221,"approval_perbill":729166668,"support_perbill":15144731,"approval":72.9166668,"support":1.5144731},{"time_hours":222,"approval_perbill":727941178,"support_perbill":15046141,"approval":72.7941178,"support":1.5046141},{"time_hours":223,"approval_perbill":726715687,"support_perbill":14948396,"approval":72.6715687,"support":1.4948396},{"time_hours":224,"approval_perbill":725490197,"support_perbill":14851485,"approval":72.5490197,"support":1.4851485},{"time_hours":225,"approval_perbill":724264707,"support_perbill":14755396,"approval":72.4264707,"support":1.4755396},{"time_hours":226,"approval_perbill":723039217,"support_perbill":14660121,"approval":72.3039217,"support":1.4660121},{"time_hours":227,"approval_perbill":721813726,"support_perbill":14565648,"approval":72.1813726,"support":1.4565648},{"time_hours":228,"approval_perbill":720588236,"support_perbill":14471968,"approval":72.0588236,"support":1.4471968},{"time_hours":229,"approval_perbill":719362746,"support_perbill":14379070,"approval":71.9362746,"support":1.437907},{"time_hours":230,"approval_perbill":718137256,"support_perbill":14286945,"approval":71.8137256,"support":1.4286945},{"time_hours":231,"approval_perbill":716911765,"support_perbill":14195583,"approval":71.6911765,"support":1.4195583},{"time_hours":232,"approval_perbill":715686275,"support_perbill":14104975,"approval":71.5686275,"support":1.4104975},{"time_hours":233,"approval_perbill":714460785,"support_perbill":14015111,"approval":71.4460785,"support":1.4015111},{"time_hours":234,"approval_perbill":713235295,"support_perbill":13925982,"approval":71.3235295,"support":1.3925982},{"time_hours":235,"approval_perbill":712009805,"support_perbill":13837579,"approval":71.2009805,"support":1.3837579},{"time_hours":236,"approval_perbill":710784314,"support_perbill":13749894,"approval":71.0784314,"support":1.3749894},{"time_hours":237,"approval_perbill":709558824,"support_perbill":13662918,"approval":70.9558824,"support":1.3662918},{"time_hours":238,"approval_perbill":708333334,"support_perbill":13576642,"approval":70.8333334,"support":1.3576642},{"time_hours":239,"approval_perbill":707107844,"support_perbill":13491057,"approval":70.7107844,"support":1.3491057},{"time_hours":240,"approval_perbill":705882353,"support_perbill":13406156,"approval":70.5882353,"support":1.3406156},{"time_hours":241,"approval_perbill":704656863,"support_perbill":13321931,"approval":70.4656863,"support":1.3321931},{"time_hours":242,"approval_perbill":703431373,"support_perbill":13238372,"approval":70.3431373,"support":1.3238372},{"time_hours":243,"approval_perbill":702205883,"support_perbill":13155473,"approval":70.2205883,"support":1.3155473},{"time_hours":244,"approval_perbill":700980393,"support_perbill":13073226,"approval":70.0980393,"support":1.3073226},{"time_hours":245,"approval_perbill":699754903,"support_perbill":12991622,"approval":69.9754903,"support":1.2991622},{"time_hours":246,"approval_perbill":698529413,"support_perbill":12910655,"approval":69.8529413,"support":1.2910655},{"time_hours":247,"approval_perbill":697303923,"support_perbill":12830317,"approval":69.7303923,"support":1.2830317},{"time_hours":248,"approval_perbill":696078432,"support_perbill":12750601,"approval":69.6078432,"support":1.2750601},{"time_hours":249,"approval_perbill":694852942,"support_perbill":12671499,"approval":69.4852942,"support":1.2671499},{"time_hours":250,"approval_perbill":693627452,"support_perbill":12593005,"approval":69.3627452,"support":1.2593005},{"time_hours":251,"approval_perbill":692401962,"support_perbill":12515111,"approval":69.2401962,"support":1.2515111},{"time_hours":252,"approval_perbill":691176471,"support_perbill":12437810,"approval":69.1176471,"support":1.243781},{"time_hours":253,"approval_perbill":689950981,"support_perbill":12361097,"approval":68.9950981,"support":1.2361097},{"time_hours":254,"approval_perbill":688725491,"support_perbill":12284964,"approval":68.8725491,"support":1.2284964},{"time_hours":255,"approval_perbill":687500001,"support_perbill":12209404,"approval":68.7500001,"support":1.2209404},{"time_hours":256,"approval_perbill":686274511,"support_perbill":12134411,"approval":68.6274511,"support":1.2134411},{"time_hours":257,"approval_perbill":685049020,"support_perbill":12059980,"approval":68.504902,"support":1.205998},{"time_hours":258,"approval_perbill":683823530,"support_perbill":11986103,"approval":68.382353,"support":1.1986103},{"time_hours":259,"approval_perbill":682598040,"support_perbill":11912774,"approval":68.259804,"support":1.1912774},{"time_hours":260,"approval_perbill":681372550,"support_perbill":11839987,"approval":68.137255,"support":1.1839987},{"time_hours":261,"approval_perbill":680147059,"support_perbill":11767737,"approval":68.0147059,"support":1.1767737},{"time_hours":262,"approval_perbill":678921569,"support_perbill":11696017,"approval":67.8921569,"support":1.1696017},{"time_hours":263,"approval_perbill":677696079,"support_perbill":11624822,"approval":67.7696079,"support":1.1624822},{"time_hours":264,"approval_perbill":676470589,"support_perbill":11554145,"approval":67.6470589,"support":1.1554145},{"time_hours":265,"approval_perbill":675245099,"support_perbill":11483982,"approval":67.5245099,"support":1.1483982},{"time_hours":266,"approval_perbill":674019609,"support_perbill":11414326,"approval":67.4019609,"support":1.1414326},{"time_hours":267,"approval_perbill":672794119,"support_perbill":11345173,"approval":67.2794119,"support":1.1345173},{"time_hours":268,"approval_perbill":671568629,"support_perbill":11276516,"approval":67.1568629,"support":1.1276516},{"time_hours":269,"approval_perbill":670343138,"support_perbill":11208351,"approval":67.0343138,"support":1.1208351},{"time_hours":270,"approval_perbill":669117648,"support_perbill":11140671,"approval":66.9117648,"support":1.1140671},{"time_hours":271,"approval_perbill":667892158,"support_perbill":11073473,"approval":66.7892158,"support":1.1073473},{"time_hours":272,"approval_perbill":666666668,"support_perbill":11006750,"approval":66.6666668,"support":1.100675},{"time_hours":273,"approval_perbill":665441177,"support_perbill":10940499,"approval":66.5441177,"support":1.0940499},{"time_hours":274,"approval_perbill":664215687,"support_perbill":10874713,"approval":66.4215687,"support":1.0874713},{"time_hours":275,"approval_perbill":662990197,"support_perbill":10809388,"approval":66.2990197,"support":1.0809388},{"time_hours":276,"approval_perbill":661764707,"support_perbill":10744519,"approval":66.1764707,"support":1.0744519},{"time_hours":277,"approval_perbill":660539217,"support_perbill":10680101,"approval":66.0539217,"support":1.0680101},{"time_hours":278,"approval_perbill":659313726,"support_perbill":10616130,"approval":65.9313726,"support":1.061613},{"time_hours":279,"approval_perbill":658088236,"support_perbill":10552601,"approval":65.8088236,"support":1.0552601},{"time_hours":280,"approval_perbill":656862746,"support_perbill":10489510,"approval":65.6862746,"support":1.048951},{"time_hours":281,"approval_perbill":655637256,"support_perbill":10426852,"approval":65.5637256,"support":1.0426852},{"time_hours":282,"approval_perbill":654411765,"support_perbill":10364622,"approval":65.4411765,"support":1.0364622},{"time_hours":283,"approval_perbill":653186275,"support_perbill":10302816,"approval":65.3186275,"support":1.0302816},{"time_hours":284,"approval_perbill":651960785,"support_perbill":10241430,"approval":65.1960785,"support":1.024143},{"time_hours":285,"approval_perbill":650735295,"support_perbill":10180459,"approval":65.0735295,"support":1.0180459},{"time_hours":286,"approval_perbill":649509804,"support_perbill":10119900,"approval":64.9509804,"support":1.01199},{"time_hours":287,"approval_perbill":648284314,"support_perbill":10059748,"approval":64.8284314,"support":1.0059748},{"time_hours":288,"approval_perbill":647058824,"support_perbill":10000000,"approval":64.7058824,"support":1},{"time_hours":289,"approval_perbill":645833334,"support_perbill":9940650,"approval":64.5833334,"support":0.994065},{"time_hours":290,"approval_perbill":644607844,"support_perbill":9881695,"approval":64.4607844,"support":0.9881695},{"time_hours":291,"approval_perbill":643382354,"support_perbill":9823132,"approval":64.3382354,"support":0.9823132},{"time_hours":292,"approval_perbill":642156864,"support_perbill":9764955,"approval":64.2156864,"support":0.9764955},{"time_hours":293,"approval_perbill":640931374,"support_perbill":9707163,"approval":64.0931374,"support":0.9707163},{"time_hours":294,"approval_perbill":639705883,"support_perbill":9649749,"approval":63.9705883,"support":0.9649749},{"time_hours":295,"approval_perbill":638480393,"support_perbill":9592712,"approval":63.8480393,"support":0.9592712},{"time_hours":296,"approval_perbill":637254903,"support_perbill":9536047,"approval":63.7254903,"support":0.9536047},{"time_hours":297,"approval_perbill":636029413,"support_perbill":9479751,"approval":63.6029413,"support":0.9479751},{"time_hours":298,"approval_perbill":634803923,"support_perbill":9423820,"approval":63.4803923,"support":0.942382},{"time_hours":299,"approval_perbill":633578432,"support_perbill":9368250,"approval":63.3578432,"support":0.936825},{"time_hours":300,"approval_perbill":632352942,"support_perbill":9313038,"approval":63.2352942,"support":0.9313038},{"time_hours":301,"approval_perbill":631127452,"support_perbill":9258181,"approval":63.1127452,"support":0.9258181},{"time_hours":302,"approval_perbill":629901962,"support_perbill":9203674,"approval":62.9901962,"support":0.9203674},{"time_hours":303,"approval_perbill":628676471,"support_perbill":9149516,"approval":62.8676471,"support":0.9149516},{"time_hours":304,"approval_perbill":627450981,"support_perbill":9095702,"approval":62.7450981,"support":0.9095702},{"time_hours":305,"approval_perbill":626225491,"support_perbill":9042230,"approval":62.6225491,"support":0.904223},{"time_hours":306,"approval_perbill":625000001,"support_perbill":8989095,"approval":62.5000001,"support":0.8989095},{"time_hours":307,"approval_perbill":623774510,"support_perbill":8936295,"approval":62.377451,"support":0.8936295},{"time_hours":308,"approval_perbill":622549020,"support_perbill":8883826,"approval":62.254902,"support":0.8883826},{"time_hours":309,"approval_perbill":621323530,"support_perbill":8831687,"approval":62.132353,"support":0.8831687},{"time_hours":310,"approval_perbill":620098040,"support_perbill":8779872,"approval":62.009804,"support":0.8779872},{"time_hours":311,"approval_perbill":618872549,"support_perbill":8728380,"approval":61.8872549,"support":0.872838},{"time_hours":312,"approval_perbill":617647059,"support_perbill":8677207,"approval":61.7647059,"support":0.8677207},{"time_hours":313,"approval_perbill":616421569,"support_perbill":8626351,"approval":61.6421569,"support":0.8626351},{"time_hours":314,"approval_perbill":615196079,"support_perbill":8575808,"approval":61.5196079,"support":0.8575808},{"time_hours":315,"approval_perbill":613970589,"support_perbill":8525576,"approval":61.3970589,"support":0.8525576},{"time_hours":316,"approval_perbill":612745099,"support_perbill":8475652,"approval":61.2745099,"support":0.8475652},{"time_hours":317,"approval_perbill":611519609,"support_perbill":8426032,"approval":61.1519609,"support":0.8426032},{"time_hours":318,"approval_perbill":610294119,"support_perbill":8376715,"approval":61.0294119,"support":0.8376715},{"time_hours":319,"approval_perbill":609068629,"support_perbill":8327697,"approval":60.9068629,"support":0.8327697},{"time_hours":320,"approval_perbill":607843138,"support_perbill":8278976,"approval":60.7843138,"support":0.8278976},{"time_hours":321,"approval_perbill":606617648,"support_perbill":8230549,"approval":60.6617648,"support":0.8230549},{"time_hours":322,"approval_perbill":605392158,"support_perbill":8182413,"approval":60.5392158,"support":0.8182413},{"time_hours":323,"approval_perbill":604166668,"support_perbill":8134566,"approval":60.4166668,"support":0.8134566},{"time_hours":324,"approval_perbill":602941177,"support_perbill":8087005,"approval":60.2941177,"support":0.8087005},{"time_hours":325,"approval_perbill":601715687,"support_perbill":8039727,"approval":60.1715687,"support":0.8039727},{"time_hours":326,"approval_perbill":600490197,"support_perbill":7992731,"approval":60.0490197,"support":0.7992731},{"time_hours":327,"approval_perbill":599264707,"support_perbill":7946013,"approval":59.9264707,"support":0.7946013},{"time_hours":328,"approval_perbill":598039216,"support_perbill":7899571,"approval":59.8039216,"support":0.7899571},{"time_hours":329,"approval_perbill":596813726,"support_perbill":7853403,"approval":59.6813726,"support":0.7853403},{"time_hours":330,"approval_perbill":595588236,"support_perbill":7807506,"approval":59.5588236,"support":0.7807506},{"time_hours":331,"approval_perbill":594362746,"support_perbill":7761878,"approval":59.4362746,"support":0.7761878},{"time_hours":332,"approval_perbill":593137255,"support_perbill":7716516,"approval":59.3137255,"support":0.7716516},{"time_hours":333,"approval_perbill":591911765,"support_perbill":7671418,"approval":59.1911765,"support":0.7671418},{"time_hours":334,"approval_perbill":590686275,"support_perbill":7626583,"approval":59.0686275,"support":0.7626583},{"time_hours":335,"approval_perbill":589460785,"support_perbill":7582007,"approval":58.9460785,"support":0.7582007},{"time_hours":336,"approval_perbill":588235295,"support_perbill":7537688,"approval":58.8235295,"support":0.7537688},{"time_hours":337,"approval_perbill":587009805,"support_perbill":7493624,"approval":58.7009805,"support":0.7493624},{"time_hours":338,"approval_perbill":585784315,"support_perbill":7449814,"approval":58.5784315,"support":0.7449814},{"time_hours":339,"approval_perbill":584558825,"support_perbill":7406254,"approval":58.4558825,"support":0.7406254},{"time_hours":340,"approval_perbill":583333335,"support_perbill":7362942,"approval":58.3333335,"support":0.7362942},{"time_hours":341,"approval_perbill":582107844,"support_perbill":7319878,"approval":58.2107844,"support":0.7319878},{"time_hours":342,"approval_perbill":580882354,"support_perbill":7277057,"approval":58.0882354,"support":0.7277057},{"time_hours":343,"approval_perbill":579656864,"support_perbill":7234479,"approval":57.9656864,"support":0.7234479},{"time_hours":344,"approval_perbill":578431374,"support_perbill":7192141,"approval":57.8431374,"support":0.7192141},{"time_hours":345,"approval_perbill":577205883,"support_perbill":7150041,"approval":57.7205883,"support":0.7150041},{"time_hours":346,"approval_perbill":575980393,"support_perbill":7108178,"approval":57.5980393,"support":0.7108178},{"time_hours":347,"approval_perbill":574754903,"support_perbill":7066548,"approval":57.4754903,"support":0.7066548},{"time_hours":348,"approval_perbill":573529413,"support_perbill":7025151,"approval":57.3529413,"support":0.7025151},{"time_hours":349,"approval_perbill":572303922,"support_perbill":6983985,"approval":57.2303922,"support":0.6983985},{"time_hours":350,"approval_perbill":571078432,"support_perbill":6943047,"approval":57.1078432,"support":0.6943047},{"time_hours":351,"approval_perbill":569852942,"support_perbill":6902335,"approval":56.9852942,"support":0.6902335},{"time_hours":352,"approval_perbill":568627452,"support_perbill":6861848,"approval":56.8627452,"support":0.6861848},{"time_hours":353,"approval_perbill":567401961,"support_perbill":6821584,"approval":56.7401961,"support":0.6821584},{"time_hours":354,"approval_perbill":566176471,"support_perbill":6781540,"approval":56.6176471,"support":0.678154},{"time_hours":355,"approval_perbill":564950981,"support_perbill":6741716,"approval":56.4950981,"support":0.6741716},{"time_hours":356,"approval_perbill":563725491,"support_perbill":6702109,"approval":56.3725491,"support":0.6702109},{"time_hours":357,"approval_perbill":562500000,"support_perbill":6662718,"approval":56.25,"support":0.6662718},{"time_hours":358,"approval_perbill":561274510,"support_perbill":6623541,"approval":56.127451,"support":0.6623541},{"time_hours":359,"approval_perbill":560049020,"support_perbill":6584575,"approval":56.004902,"support":0.6584575},{"time_hours":360,"approval_perbill":558823530,"support_perbill":6545820,"approval":55.882353,"support":0.654582},{"time_hours":361,"approval_perbill":557598040,"support_perbill":6507274,"approval":55.759804,"support":0.6507274},{"time_hours":362,"approval_perbill":556372550,"support_perbill":6468935,"approval":55.637255,"support":0.6468935},{"time_hours":363,"approval_perbill":555147060,"support_perbill":6430801,"approval":55.514706,"support":0.6430801},{"time_hours":364,"approval_perbill":553921570,"support_perbill":6392871,"approval":55.392157,"support":0.6392871},{"time_hours":365,"approval_perbill":552696080,"support_perbill":6355142,"approval":55.269608,"support":0.6355142},{"time_hours":366,"approval_perbill":551470589,"support_perbill":6317615,"approval":55.1470589,"support":0.6317615},{"time_hours":367,"approval_perbill":550245099,"support_perbill":6280286,"approval":55.0245099,"support":0.6280286},{"time_hours":368,"approval_perbill":549019609,"support_perbill":6243154,"approval":54.9019609,"support":0.6243154},{"time_hours":369,"approval_perbill":547794119,"support_perbill":6206218,"approval":54.7794119,"support":0.6206218},{"time_hours":370,"approval_perbill":546568628,"support_perbill":6169476,"approval":54.6568628,"support":0.6169476},{"time_hours":371,"approval_perbill":545343138,"support_perbill":6132927,"approval":54.5343138,"support":0.6132927},{"time_hours":372,"approval_perbill":544117648,"support_perbill":6096569,"approval":54.4117648,"support":0.6096569},{"time_hours":373,"approval_perbill":542892158,"support_perbill":6060401,"approval":54.2892158,"support":0.6060401},{"time_hours":374,"approval_perbill":541666667,"support_perbill":6024421,"approval":54.1666667,"support":0.6024421},{"time_hours":375,"approval_perbill":540441177,"support_perbill":5988627,"approval":54.0441177,"support":0.5988627},{"time_hours":376,"approval_perbill":539215687,"support_perbill":5953019,"approval":53.9215687,"support":0.5953019},{"time_hours":377,"approval_perbill":537990197,"support_perbill":5917595,"approval":53.7990197,"support":0.5917595},{"time_hours":378,"approval_perbill":536764706,"support_perbill":5882353,"approval":53.6764706,"support":0.5882353},{"time_hours":379,"approval_perbill":535539216,"support_perbill":5847292,"approval":53.5539216,"support":0.5847292},{"time_hours":380,"approval_perbill":534313726,"support_perbill":5812410,"approval":53.4313726,"support":0.581241},{"time_hours":381,"approval_perbill":533088236,"support_perbill":5777707,"approval":53.3088236,"support":0.5777707},{"time_hours":382,"approval_perbill":531862746,"support_perbill":5743181,"approval":53.1862746,"support":0.5743181},{"time_hours":383,"approval_perbill":530637255,"support_perbill":5708830,"approval":53.0637255,"support":0.570883},{"time_hours":384,"approval_perbill":529411765,"support_perbill":5674653,"approval":52.9411765,"support":0.5674653},{"time_hours":385,"approval_perbill":528186275,"support_perbill":5640649,"approval":52.8186275,"support":0.5640649},{"time_hours":386,"approval_perbill":526960785,"support_perbill":5606817,"approval":52.6960785,"support":0.5606817},{"time_hours":387,"approval_perbill":525735295,"support_perbill":5573155,"approval":52.5735295,"support":0.5573155},{"time_hours":388,"approval_perbill":524509805,"support_perbill":5539662,"approval":52.4509805,"support":0.5539662},{"time_hours":389,"approval_perbill":523284315,"support_perbill":5506336,"approval":52.3284315,"support":0.5506336},{"time_hours":390,"approval_perbill":522058825,"support_perbill":5473177,"approval":52.2058825,"support":0.5473177},{"time_hours":391,"approval_perbill":520833334,"support_perbill":5440183,"approval":52.0833334,"support":0.5440183},{"time_hours":392,"approval_perbill":519607844,"support_perbill":5407354,"approval":51.9607844,"support":0.5407354},{"time_hours":393,"approval_perbill":518382354,"support_perbill":5374687,"approval":51.8382354,"support":0.5374687},{"time_hours":394,"approval_perbill":517156864,"support_perbill":5342181,"approval":51.7156864,"support":0.5342181},{"time_hours":395,"approval_perbill":515931373,"support_perbill":5309836,"approval":51.5931373,"support":0.5309836},{"time_hours":396,"approval_perbill":514705883,"support_perbill":5277650,"approval":51.4705883,"support":0.527765},{"time_hours":397,"approval_perbill":513480393,"support_perbill":5245622,"approval":51.3480393,"support":0.5245622},{"time_hours":398,"approval_perbill":512254903,"support_perbill":5213751,"approval":51.2254903,"support":0.5213751},{"time_hours":399,"approval_perbill":511029412,"support_perbill":5182035,"approval":51.1029412,"support":0.5182035},{"time_hours":400,"approval_perbill":509803922,"support_perbill":5150474,"approval":50.9803922,"support":0.5150474},{"time_hours":401,"approval_perbill":508578432,"support_perbill":5119067,"approval":50.8578432,"support":0.5119067},{"time_hours":402,"approval_perbill":507352942,"support_perbill":5087812,"approval":50.7352942,"support":0.5087812},{"time_hours":403,"approval_perbill":506127452,"support_perbill":5056708,"approval":50.6127452,"support":0.5056708},{"time_hours":404,"approval_perbill":504901961,"support_perbill":5025754,"approval":50.4901961,"support":0.5025754},{"time_hours":405,"approval_perbill":503676471,"support_perbill":4994949,"approval":50.3676471,"support":0.4994949},{"time_hours":406,"approval_perbill":502450981,"support_perbill":4964292,"approval":50.2450981,"support":0.4964292},{"time_hours":407,"approval_perbill":501225491,"support_perbill":4933782,"approval":50.1225491,"support":0.4933782},{"time_hours":408,"approval_perbill":500000000,"support_perbill":4903417,"approval":50,"support":0.4903417},{"time_hours":409,"approval_perbill":500000000,"support_perbill":4873198,"approval":50,"support":0.4873198},{"time_hours":410,"approval_perbill":500000000,"support_perbill":4843122,"approval":50,"support":0.4843122},{"time_hours":411,"approval_perbill":500000000,"support_perbill":4813189,"approval":50,"support":0.4813189},{"time_hours":412,"approval_perbill":500000000,"support_perbill":4783398,"approval":50,"support":0.4783398},{"time_hours":413,"approval_perbill":500000000,"support_perbill":4753747,"approval":50,"support":0.4753747},{"time_hours":414,"approval_perbill":500000000,"support_perbill":4724236,"approval":50,"support":0.4724236},{"time_hours":415,"approval_perbill":500000000,"support_perbill":4694864,"approval":50,"support":0.4694864},{"time_hours":416,"approval_perbill":500000000,"support_perbill":4665630,"approval":50,"support":0.466563},{"time_hours":417,"approval_perbill":500000000,"support_perbill":4636532,"approval":50,"support":0.4636532},{"time_hours":418,"approval_perbill":500000000,"support_perbill":4607570,"approval":50,"support":0.460757},{"time_hours":419,"approval_perbill":500000000,"support_perbill":4578743,"approval":50,"support":0.4578743},{"time_hours":420,"approval_perbill":500000000,"support_perbill":4550050,"approval":50,"support":0.455005},{"time_hours":421,"approval_perbill":500000000,"support_perbill":4521490,"approval":50,"support":0.452149},{"time_hours":422,"approval_perbill":500000000,"support_perbill":4493062,"approval":50,"support":0.4493062},{"time_hours":423,"approval_perbill":500000000,"support_perbill":4464766,"approval":50,"support":0.4464766},{"time_hours":424,"approval_perbill":500000000,"support_perbill":4436599,"approval":50,"support":0.4436599},{"time_hours":425,"approval_perbill":500000000,"support_perbill":4408562,"approval":50,"support":0.4408562},{"time_hours":426,"approval_perbill":500000000,"support_perbill":4380654,"approval":50,"support":0.4380654},{"time_hours":427,"approval_perbill":500000000,"support_perbill":4352873,"approval":50,"support":0.4352873},{"time_hours":428,"approval_perbill":500000000,"support_perbill":4325218,"approval":50,"support":0.4325218},{"time_hours":429,"approval_perbill":500000000,"support_perbill":4297690,"approval":50,"support":0.429769},{"time_hours":430,"approval_perbill":500000000,"support_perbill":4270287,"approval":50,"support":0.4270287},{"time_hours":431,"approval_perbill":500000000,"support_perbill":4243007,"approval":50,"support":0.4243007},{"time_hours":432,"approval_perbill":500000000,"support_perbill":4215851,"approval":50,"support":0.4215851},{"time_hours":433,"approval_perbill":500000000,"support_perbill":4188818,"approval":50,"support":0.4188818},{"time_hours":434,"approval_perbill":500000000,"support_perbill":4161906,"approval":50,"support":0.4161906},{"time_hours":435,"approval_perbill":500000000,"support_perbill":4135115,"approval":50,"support":0.4135115},{"time_hours":436,"approval_perbill":500000000,"support_perbill":4108444,"approval":50,"support":0.4108444},{"time_hours":437,"approval_perbill":500000000,"support_perbill":4081892,"approval":50,"support":0.4081892},{"time_hours":438,"approval_perbill":500000000,"support_perbill":4055459,"approval":50,"support":0.4055459},{"time_hours":439,"approval_perbill":500000000,"support_perbill":4029143,"approval":50,"support":0.4029143},{"time_hours":440,"approval_perbill":500000000,"support_perbill":4002944,"approval":50,"support":0.4002944},{"time_hours":441,"approval_perbill":500000000,"support_perbill":3976862,"approval":50,"support":0.3976862},{"time_hours":442,"approval_perbill":500000000,"support_perbill":3950894,"approval":50,"support":0.3950894},{"time_hours":443,"approval_perbill":500000000,"support_perbill":3925041,"approval":50,"support":0.3925041},{"time_hours":444,"approval_perbill":500000000,"support_perbill":3899302,"approval":50,"support":0.3899302},{"time_hours":445,"approval_perbill":500000000,"support_perbill":3873676,"approval":50,"support":0.3873676},{"time_hours":446,"approval_perbill":500000000,"support_perbill":3848162,"approval":50,"support":0.3848162},{"time_hours":447,"approval_perbill":500000000,"support_perbill":3822760,"approval":50,"support":0.382276},{"time_hours":448,"approval_perbill":500000000,"support_perbill":3797468,"approval":50,"support":0.3797468},{"time_hours":449,"approval_perbill":500000000,"support_perbill":3772287,"approval":50,"support":0.3772287},{"time_hours":450,"approval_perbill":500000000,"support_perbill":3747215,"approval":50,"support":0.3747215},{"time_hours":451,"approval_perbill":500000000,"support_perbill":3722251,"approval":50,"support":0.3722251},{"time_hours":452,"approval_perbill":500000000,"support_perbill":3697396,"approval":50,"support":0.3697396},{"time_hours":453,"approval_perbill":500000000,"support_perbill":3672648,"approval":50,"support":0.3672648},{"time_hours":454,"approval_perbill":500000000,"support_perbill":3648006,"approval":50,"support":0.3648006},{"time_hours":455,"approval_perbill":500000000,"support_perbill":3623471,"approval":50,"support":0.3623471},{"time_hours":456,"approval_perbill":500000000,"support_perbill":3599040,"approval":50,"support":0.359904},{"time_hours":457,"approval_perbill":500000000,"support_perbill":3574714,"approval":50,"support":0.3574714},{"time_hours":458,"approval_perbill":500000000,"support_perbill":3550492,"approval":50,"support":0.3550492},{"time_hours":459,"approval_perbill":500000000,"support_perbill":3526373,"approval":50,"support":0.3526373},{"time_hours":460,"approval_perbill":500000000,"support_perbill":3502357,"approval":50,"support":0.3502357},{"time_hours":461,"approval_perbill":500000000,"support_perbill":3478442,"approval":50,"support":0.3478442},{"time_hours":462,"approval_perbill":500000000,"support_perbill":3454629,"approval":50,"support":0.3454629},{"time_hours":463,"approval_perbill":500000000,"support_perbill":3430916,"approval":50,"support":0.3430916},{"time_hours":464,"approval_perbill":500000000,"support_perbill":3407304,"approval":50,"support":0.3407304},{"time_hours":465,"approval_perbill":500000000,"support_perbill":3383790,"approval":50,"support":0.338379},{"time_hours":466,"approval_perbill":500000000,"support_perbill":3360376,"approval":50,"support":0.3360376},{"time_hours":467,"approval_perbill":500000000,"support_perbill":3337059,"approval":50,"support":0.3337059},{"time_hours":468,"approval_perbill":500000000,"support_perbill":3313840,"approval":50,"support":0.331384},{"time_hours":469,"approval_perbill":500000000,"support_perbill":3290718,"approval":50,"support":0.3290718},{"time_hours":470,"approval_perbill":500000000,"support_perbill":3267692,"approval":50,"support":0.3267692},{"time_hours":471,"approval_perbill":500000000,"support_perbill":3244761,"approval":50,"support":0.3244761},{"time_hours":472,"approval_perbill":500000000,"support_perbill":3221926,"approval":50,"support":0.3221926},{"time_hours":473,"approval_perbill":500000000,"support_perbill":3199185,"approval":50,"support":0.3199185},{"time_hours":474,"approval_perbill":500000000,"support_perbill":3176538,"approval":50,"support":0.3176538},{"time_hours":475,"approval_perbill":500000000,"support_perbill":3153985,"approval":50,"support":0.3153985},{"time_hours":476,"approval_perbill":500000000,"support_perbill":3131524,"approval":50,"support":0.3131524},{"time_hours":477,"approval_perbill":500000000,"support_perbill":3109155,"approval":50,"support":0.3109155},{"time_hours":478,"approval_perbill":500000000,"support_perbill":3086878,"approval":50,"support":0.3086878},{"time_hours":479,"approval_perbill":500000000,"support_perbill":3064692,"approval":50,"support":0.3064692},{"time_hours":480,"approval_perbill":500000000,"support_perbill":3042596,"approval":50,"support":0.3042596},{"time_hours":481,"approval_perbill":500000000,"support_perbill":3020590,"approval":50,"support":0.302059},{"time_hours":482,"approval_perbill":500000000,"support_perbill":2998674,"approval":50,"support":0.2998674},{"time_hours":483,"approval_perbill":500000000,"support_perbill":2976847,"approval":50,"support":0.2976847},{"time_hours":484,"approval_perbill":500000000,"support_perbill":2955107,"approval":50,"support":0.2955107},{"time_hours":485,"approval_perbill":500000000,"support_perbill":2933456,"approval":50,"support":0.2933456},{"time_hours":486,"approval_perbill":500000000,"support_perbill":2911892,"approval":50,"support":0.2911892},{"time_hours":487,"approval_perbill":500000000,"support_perbill":2890414,"approval":50,"support":0.2890414},{"time_hours":488,"approval_perbill":500000000,"support_perbill":2869023,"approval":50,"support":0.2869023},{"time_hours":489,"approval_perbill":500000000,"support_perbill":2847717,"approval":50,"support":0.2847717},{"time_hours":490,"approval_perbill":500000000,"support_perbill":2826496,"approval":50,"support":0.2826496},{"time_hours":491,"approval_perbill":500000000,"support_perbill":2805360,"approval":50,"support":0.280536},{"time_hours":492,"approval_perbill":500000000,"support_perbill":2784309,"approval":50,"support":0.2784309},{"time_hours":493,"approval_perbill":500000000,"support_perbill":2763341,"approval":50,"support":0.2763341},{"time_hours":494,"approval_perbill":500000000,"support_perbill":2742455,"approval":50,"support":0.2742455},{"time_hours":495,"approval_perbill":500000000,"support_perbill":2721653,"approval":50,"support":0.2721653},{"time_hours":496,"approval_perbill":500000000,"support_perbill":2700933,"approval":50,"support":0.2700933},{"time_hours":497,"approval_perbill":500000000,"support_perbill":2680294,"approval":50,"support":0.2680294},{"time_hours":498,"approval_perbill":500000000,"support_perbill":2659737,"approval":50,"support":0.2659737},{"time_hours":499,"approval_perbill":500000000,"support_perbill":2639260,"approval":50,"support":0.263926},{"time_hours":500,"approval_perbill":500000000,"support_perbill":2618864,"approval":50,"support":0.2618864},{"time_hours":501,"approval_perbill":500000000,"support_perbill":2598547,"approval":50,"support":0.2598547},{"time_hours":502,"approval_perbill":500000000,"support_perbill":2578310,"approval":50,"support":0.257831},{"time_hours":503,"approval_perbill":500000000,"support_perbill":2558151,"approval":50,"support":0.2558151},{"time_hours":504,"approval_perbill":500000000,"support_perbill":2538071,"approval":50,"support":0.2538071},{"time_hours":505,"approval_perbill":500000000,"support_perbill":2518069,"approval":50,"support":0.2518069},{"time_hours":506,"approval_perbill":500000000,"support_perbill":2498144,"approval":50,"support":0.2498144},{"time_hours":507,"approval_perbill":500000000,"support_perbill":2478296,"approval":50,"support":0.2478296},{"time_hours":508,"approval_perbill":500000000,"support_perbill":2458525,"approval":50,"support":0.2458525},{"time_hours":509,"approval_perbill":500000000,"support_perbill":2438830,"approval":50,"support":0.243883},{"time_hours":510,"approval_perbill":500000000,"support_perbill":2419210,"approval":50,"support":0.241921},{"time_hours":511,"approval_perbill":500000000,"support_perbill":2399666,"approval":50,"support":0.2399666},{"time_hours":512,"approval_perbill":500000000,"support_perbill":2380197,"approval":50,"support":0.2380197},{"time_hours":513,"approval_perbill":500000000,"support_perbill":2360802,"approval":50,"support":0.2360802},{"time_hours":514,"approval_perbill":500000000,"support_perbill":2341481,"approval":50,"support":0.2341481},{"time_hours":515,"approval_perbill":500000000,"support_perbill":2322233,"approval":50,"support":0.2322233},{"time_hours":516,"approval_perbill":500000000,"support_perbill":2303059,"approval":50,"support":0.2303059},{"time_hours":517,"approval_perbill":500000000,"support_perbill":2283957,"approval":50,"support":0.2283957},{"time_hours":518,"approval_perbill":500000000,"support_perbill":2264928,"approval":50,"support":0.2264928},{"time_hours":519,"approval_perbill":500000000,"support_perbill":2245970,"approval":50,"support":0.224597},{"time_hours":520,"approval_perbill":500000000,"support_perbill":2227084,"approval":50,"support":0.2227084},{"time_hours":521,"approval_perbill":500000000,"support_perbill":2208269,"approval":50,"support":0.2208269},{"time_hours":522,"approval_perbill":500000000,"support_perbill":2189525,"approval":50,"support":0.2189525},{"time_hours":523,"approval_perbill":500000000,"support_perbill":2170851,"approval":50,"support":0.2170851},{"time_hours":524,"approval_perbill":500000000,"support_perbill":2152247,"approval":50,"support":0.2152247},{"time_hours":525,"approval_perbill":500000000,"support_perbill":2133712,"approval":50,"support":0.2133712},{"time_hours":526,"approval_perbill":500000000,"support_perbill":2115247,"approval":50,"support":0.2115247},{"time_hours":527,"approval_perbill":500000000,"support_perbill":2096850,"approval":50,"support":0.209685},{"time_hours":528,"approval_perbill":500000000,"support_perbill":2078522,"approval":50,"support":0.2078522},{"time_hours":529,"approval_perbill":500000000,"support_perbill":2060261,"approval":50,"support":0.2060261},{"time_hours":530,"approval_perbill":500000000,"support_perbill":2042068,"approval":50,"support":0.2042068},{"time_hours":531,"approval_perbill":500000000,"support_perbill":2023943,"approval":50,"support":0.2023943},{"time_hours":532,"approval_perbill":500000000,"support_perbill":2005884,"approval":50,"support":0.2005884},{"time_hours":533,"approval_perbill":500000000,"support_perbill":1987891,"approval":50,"support":0.1987891},{"time_hours":534,"approval_perbill":500000000,"support_perbill":1969965,"approval":50,"support":0.1969965},{"time_hours":535,"approval_perbill":500000000,"support_perbill":1952104,"approval":50,"support":0.1952104},{"time_hours":536,"approval_perbill":500000000,"support_perbill":1934309,"approval":50,"support":0.1934309},{"time_hours":537,"approval_perbill":500000000,"support_perbill":1916579,"approval":50,"support":0.1916579},{"time_hours":538,"approval_perbill":500000000,"support_perbill":1898913,"approval":50,"support":0.1898913},{"time_hours":539,"approval_perbill":500000000,"support_perbill":1881312,"approval":50,"support":0.1881312},{"time_hours":540,"approval_perbill":500000000,"support_perbill":1863775,"approval":50,"support":0.1863775},{"time_hours":541,"approval_perbill":500000000,"support_perbill":1846301,"approval":50,"support":0.1846301},{"time_hours":542,"approval_perbill":500000000,"support_perbill":1828891,"approval":50,"support":0.1828891},{"time_hours":543,"approval_perbill":500000000,"support_perbill":1811543,"approval":50,"support":0.1811543},{"time_hours":544,"approval_perbill":500000000,"support_perbill":1794258,"approval":50,"support":0.1794258},{"time_hours":545,"approval_perbill":500000000,"support_perbill":1777036,"approval":50,"support":0.1777036},{"time_hours":546,"approval_perbill":500000000,"support_perbill":1759875,"approval":50,"support":0.1759875},{"time_hours":547,"approval_perbill":500000000,"support_perbill":1742775,"approval":50,"support":0.1742775},{"time_hours":548,"approval_perbill":500000000,"support_perbill":1725737,"approval":50,"support":0.1725737},{"time_hours":549,"approval_perbill":500000000,"support_perbill":1708760,"approval":50,"support":0.170876},{"time_hours":550,"approval_perbill":500000000,"support_perbill":1691844,"approval":50,"support":0.1691844},{"time_hours":551,"approval_perbill":500000000,"support_perbill":1674988,"approval":50,"support":0.1674988},{"time_hours":552,"approval_perbill":500000000,"support_perbill":1658191,"approval":50,"support":0.1658191},{"time_hours":553,"approval_perbill":500000000,"support_perbill":1641455,"approval":50,"support":0.1641455},{"time_hours":554,"approval_perbill":500000000,"support_perbill":1624777,"approval":50,"support":0.1624777},{"time_hours":555,"approval_perbill":500000000,"support_perbill":1608159,"approval":50,"support":0.1608159},{"time_hours":556,"approval_perbill":500000000,"support_perbill":1591599,"approval":50,"support":0.1591599},{"time_hours":557,"approval_perbill":500000000,"support_perbill":1575098,"approval":50,"support":0.1575098},{"time_hours":558,"approval_perbill":500000000,"support_perbill":1558654,"approval":50,"support":0.1558654},{"time_hours":559,"approval_perbill":500000000,"support_perbill":1542269,"approval":50,"support":0.1542269},{"time_hours":560,"approval_perbill":500000000,"support_perbill":1525941,"approval":50,"support":0.1525941},{"time_hours":561,"approval_perbill":500000000,"support_perbill":1509670,"approval":50,"support":0.150967},{"time_hours":562,"approval_perbill":500000000,"support_perbill":1493456,"approval":50,"support":0.1493456},{"time_hours":563,"approval_perbill":500000000,"support_perbill":1477298,"approval":50,"support":0.1477298},{"time_hours":564,"approval_perbill":500000000,"support_perbill":1461197,"approval":50,"support":0.1461197},{"time_hours":565,"approval_perbill":500000000,"support_perbill":1445152,"approval":50,"support":0.1445152},{"time_hours":566,"approval_perbill":500000000,"support_perbill":1429162,"approval":50,"support":0.1429162},{"time_hours":567,"approval_perbill":500000000,"support_perbill":1413228,"approval":50,"support":0.1413228},{"time_hours":568,"approval_perbill":500000000,"support_perbill":1397348,"approval":50,"support":0.1397348},{"time_hours":569,"approval_perbill":500000000,"support_perbill":1381524,"approval":50,"support":0.1381524},{"time_hours":570,"approval_perbill":500000000,"support_perbill":1365754,"approval":50,"support":0.1365754},{"time_hours":571,"approval_perbill":500000000,"support_perbill":1350039,"approval":50,"support":0.1350039},{"time_hours":572,"approval_perbill":500000000,"support_perbill":1334377,"approval":50,"support":0.1334377},{"time_hours":573,"approval_perbill":500000000,"support_perbill":1318769,"approval":50,"support":0.1318769},{"time_hours":574,"approval_perbill":500000000,"support_perbill":1303214,"approval":50,"support":0.1303214},{"time_hours":575,"approval_perbill":500000000,"support_perbill":1287713,"approval":50,"support":0.1287713},{"time_hours":576,"approval_perbill":500000000,"support_perbill":1272264,"approval":50,"support":0.1272264},{"time_hours":577,"approval_perbill":500000000,"support_perbill":1256869,"approval":50,"support":0.1256869},{"time_hours":578,"approval_perbill":500000000,"support_perbill":1241525,"approval":50,"support":0.1241525},{"time_hours":579,"approval_perbill":500000000,"support_perbill":1226233,"approval":50,"support":0.1226233},{"time_hours":580,"approval_perbill":500000000,"support_perbill":1210994,"approval":50,"support":0.1210994},{"time_hours":581,"approval_perbill":500000000,"support_perbill":1195805,"approval":50,"support":0.1195805},{"time_hours":582,"approval_perbill":500000000,"support_perbill":1180668,"approval":50,"support":0.1180668},{"time_hours":583,"approval_perbill":500000000,"support_perbill":1165582,"approval":50,"support":0.1165582},{"time_hours":584,"approval_perbill":500000000,"support_perbill":1150547,"approval":50,"support":0.1150547},{"time_hours":585,"approval_perbill":500000000,"support_perbill":1135563,"approval":50,"support":0.1135563},{"time_hours":586,"approval_perbill":500000000,"support_perbill":1120628,"approval":50,"support":0.1120628},{"time_hours":587,"approval_perbill":500000000,"support_perbill":1105744,"approval":50,"support":0.1105744},{"time_hours":588,"approval_perbill":500000000,"support_perbill":1090909,"approval":50,"support":0.1090909},{"time_hours":589,"approval_perbill":500000000,"support_perbill":1076124,"approval":50,"support":0.1076124},{"time_hours":590,"approval_perbill":500000000,"support_perbill":1061388,"approval":50,"support":0.1061388},{"time_hours":591,"approval_perbill":500000000,"support_perbill":1046701,"approval":50,"support":0.1046701},{"time_hours":592,"approval_perbill":500000000,"support_perbill":1032063,"approval":50,"support":0.1032063},{"time_hours":593,"approval_perbill":500000000,"support_perbill":1017473,"approval":50,"support":0.1017473},{"time_hours":594,"approval_perbill":500000000,"support_perbill":1002932,"approval":50,"support":0.1002932},{"time_hours":595,"approval_perbill":500000000,"support_perbill":988438,"approval":50,"support":0.0988438},{"time_hours":596,"approval_perbill":500000000,"support_perbill":973993,"approval":50,"support":0.0973993},{"time_hours":597,"approval_perbill":500000000,"support_perbill":959595,"approval":50,"support":0.0959595},{"time_hours":598,"approval_perbill":500000000,"support_perbill":945244,"approval":50,"support":0.0945244},{"time_hours":599,"approval_perbill":500000000,"support_perbill":930940,"approval":50,"support":0.093094},{"time_hours":600,"approval_perbill":500000000,"support_perbill":916684,"approval":50,"support":0.0916684},{"time_hours":601,"approval_perbill":500000000,"support_perbill":902473,"approval":50,"support":0.0902473},{"time_hours":602,"approval_perbill":500000000,"support_perbill":888310,"approval":50,"support":0.088831},{"time_hours":603,"approval_perbill":500000000,"support_perbill":874192,"approval":50,"support":0.0874192},{"time_hours":604,"approval_perbill":500000000,"support_perbill":860121,"approval":50,"support":0.0860121},{"time_hours":605,"approval_perbill":500000000,"support_perbill":846095,"approval":50,"support":0.0846095},{"time_hours":606,"approval_perbill":500000000,"support_perbill":832114,"approval":50,"support":0.0832114},{"time_hours":607,"approval_perbill":500000000,"support_perbill":818179,"approval":50,"support":0.0818179},{"time_hours":608,"approval_perbill":500000000,"support_perbill":804289,"approval":50,"support":0.0804289},{"time_hours":609,"approval_perbill":500000000,"support_perbill":790444,"approval":50,"support":0.0790444},{"time_hours":610,"approval_perbill":500000000,"support_perbill":776644,"approval":50,"support":0.0776644},{"time_hours":611,"approval_perbill":500000000,"support_perbill":762888,"approval":50,"support":0.0762888},{"time_hours":612,"approval_perbill":500000000,"support_perbill":749176,"approval":50,"support":0.0749176},{"time_hours":613,"approval_perbill":500000000,"support_perbill":735508,"approval":50,"support":0.0735508},{"time_hours":614,"approval_perbill":500000000,"support_perbill":721884,"approval":50,"support":0.0721884},{"time_hours":615,"approval_perbill":500000000,"support_perbill":708303,"approval":50,"support":0.0708303},{"time_hours":616,"approval_perbill":500000000,"support_perbill":694766,"approval":50,"support":0.0694766},{"time_hours":617,"approval_perbill":500000000,"support_perbill":681272,"approval":50,"support":0.0681272},{"time_hours":618,"approval_perbill":500000000,"support_perbill":667821,"approval":50,"support":0.0667821},{"time_hours":619,"approval_perbill":500000000,"support_perbill":654412,"approval":50,"support":0.0654412},{"time_hours":620,"approval_perbill":500000000,"support_perbill":641047,"approval":50,"support":0.0641047},{"time_hours":621,"approval_perbill":500000000,"support_perbill":627723,"approval":50,"support":0.0627723},{"time_hours":622,"approval_perbill":500000000,"support_perbill":614442,"approval":50,"support":0.0614442},{"time_hours":623,"approval_perbill":500000000,"support_perbill":601202,"approval":50,"support":0.0601202},{"time_hours":624,"approval_perbill":500000000,"support_perbill":588005,"approval":50,"support":0.0588005},{"time_hours":625,"approval_perbill":500000000,"support_perbill":574848,"approval":50,"support":0.0574848},{"time_hours":626,"approval_perbill":500000000,"support_perbill":561734,"approval":50,"support":0.0561734},{"time_hours":627,"approval_perbill":500000000,"support_perbill":548660,"approval":50,"support":0.054866},{"time_hours":628,"approval_perbill":500000000,"support_perbill":535627,"approval":50,"support":0.0535627},{"time_hours":629,"approval_perbill":500000000,"support_perbill":522635,"approval":50,"support":0.0522635},{"time_hours":630,"approval_perbill":500000000,"support_perbill":509684,"approval":50,"support":0.0509684},{"time_hours":631,"approval_perbill":500000000,"support_perbill":496773,"approval":50,"support":0.0496773},{"time_hours":632,"approval_perbill":500000000,"support_perbill":483902,"approval":50,"support":0.0483902},{"time_hours":633,"approval_perbill":500000000,"support_perbill":471071,"approval":50,"support":0.0471071},{"time_hours":634,"approval_perbill":500000000,"support_perbill":458280,"approval":50,"support":0.045828},{"time_hours":635,"approval_perbill":500000000,"support_perbill":445529,"approval":50,"support":0.0445529},{"time_hours":636,"approval_perbill":500000000,"support_perbill":432817,"approval":50,"support":0.0432817},{"time_hours":637,"approval_perbill":500000000,"support_perbill":420144,"approval":50,"support":0.0420144},{"time_hours":638,"approval_perbill":500000000,"support_perbill":407511,"approval":50,"support":0.0407511},{"time_hours":639,"approval_perbill":500000000,"support_perbill":394916,"approval":50,"support":0.0394916},{"time_hours":640,"approval_perbill":500000000,"support_perbill":382360,"approval":50,"support":0.038236},{"time_hours":641,"approval_perbill":500000000,"support_perbill":369843,"approval":50,"support":0.0369843},{"time_hours":642,"approval_perbill":500000000,"support_perbill":357364,"approval":50,"support":0.0357364},{"time_hours":643,"approval_perbill":500000000,"support_perbill":344923,"approval":50,"support":0.0344923},{"time_hours":644,"approval_perbill":500000000,"support_perbill":332520,"approval":50,"support":0.033252},{"time_hours":645,"approval_perbill":500000000,"support_perbill":320155,"approval":50,"support":0.0320155},{"time_hours":646,"approval_perbill":500000000,"support_perbill":307828,"approval":50,"support":0.0307828},{"time_hours":647,"approval_perbill":500000000,"support_perbill":295538,"approval":50,"support":0.0295538},{"time_hours":648,"approval_perbill":500000000,"support_perbill":283286,"approval":50,"support":0.0283286},{"time_hours":649,"approval_perbill":500000000,"support_perbill":271071,"approval":50,"support":0.0271071},{"time_hours":650,"approval_perbill":500000000,"support_perbill":258892,"approval":50,"support":0.0258892},{"time_hours":651,"approval_perbill":500000000,"support_perbill":246751,"approval":50,"support":0.0246751},{"time_hours":652,"approval_perbill":500000000,"support_perbill":234646,"approval":50,"support":0.0234646},{"time_hours":653,"approval_perbill":500000000,"support_perbill":222578,"approval":50,"support":0.0222578},{"time_hours":654,"approval_perbill":500000000,"support_perbill":210546,"approval":50,"support":0.0210546},{"time_hours":655,"approval_perbill":500000000,"support_perbill":198550,"approval":50,"support":0.019855},{"time_hours":656,"approval_perbill":500000000,"support_perbill":186590,"approval":50,"support":0.018659},{"time_hours":657,"approval_perbill":500000000,"support_perbill":174666,"approval":50,"support":0.0174666},{"time_hours":658,"approval_perbill":500000000,"support_perbill":162778,"approval":50,"support":0.0162778},{"time_hours":659,"approval_perbill":500000000,"support_perbill":150925,"approval":50,"support":0.0150925},{"time_hours":660,"approval_perbill":500000000,"support_perbill":139108,"approval":50,"support":0.0139108},{"time_hours":661,"approval_perbill":500000000,"support_perbill":127326,"approval":50,"support":0.0127326},{"time_hours":662,"approval_perbill":500000000,"support_perbill":115578,"approval":50,"support":0.0115578},{"time_hours":663,"approval_perbill":500000000,"support_perbill":103866,"approval":50,"support":0.0103866},{"time_hours":664,"approval_perbill":500000000,"support_perbill":92188,"approval":50,"support":0.0092188},{"time_hours":665,"approval_perbill":500000000,"support_perbill":80545,"approval":50,"support":0.0080545},{"time_hours":666,"approval_perbill":500000000,"support_perbill":68937,"approval":50,"support":0.0068937},{"time_hours":667,"approval_perbill":500000000,"support_perbill":57363,"approval":50,"support":0.0057363},{"time_hours":668,"approval_perbill":500000000,"support_perbill":45822,"approval":50,"support":0.0045822},{"time_hours":669,"approval_perbill":500000000,"support_perbill":34316,"approval":50,"support":0.0034316},{"time_hours":670,"approval_perbill":500000000,"support_perbill":22844,"approval":50,"support":0.0022844},{"time_hours":671,"approval_perbill":500000000,"support_perbill":11405,"approval":50,"support":0.0011405},{"time_hours":672,"approval_perbill":500000000,"support_perbill":0,"approval":50,"support":0}]')},78760:p=>{"use strict";p.exports=JSON.parse('[{"time_hours":0,"approval_perbill":1000000000,"support_perbill":500000026,"approval":100,"support":50.0000026},{"time_hours":1,"approval_perbill":998774510,"support_perbill":455636061,"approval":99.877451,"support":45.5636061},{"time_hours":2,"approval_perbill":997549020,"support_perbill":418401359,"approval":99.754902,"support":41.8401359},{"time_hours":3,"approval_perbill":996323530,"support_perbill":386705228,"approval":99.632353,"support":38.6705228},{"time_hours":4,"approval_perbill":995098040,"support_perbill":359397443,"approval":99.509804,"support":35.9397443},{"time_hours":5,"approval_perbill":993872550,"support_perbill":335625639,"approval":99.387255,"support":33.5625639},{"time_hours":6,"approval_perbill":992647060,"support_perbill":314744813,"approval":99.264706,"support":31.4744813},{"time_hours":7,"approval_perbill":991421570,"support_perbill":296257808,"approval":99.142157,"support":29.6257808},{"time_hours":8,"approval_perbill":990196080,"support_perbill":279775293,"approval":99.019608,"support":27.9775293},{"time_hours":9,"approval_perbill":988970589,"support_perbill":264988013,"approval":98.8970589,"support":26.4988013},{"time_hours":10,"approval_perbill":987745099,"support_perbill":251647242,"approval":98.7745099,"support":25.1647242},{"time_hours":11,"approval_perbill":986519609,"support_perbill":239550622,"approval":98.6519609,"support":23.9550622},{"time_hours":12,"approval_perbill":985294119,"support_perbill":228531862,"approval":98.5294119,"support":22.8531862},{"time_hours":13,"approval_perbill":984068628,"support_perbill":218453039,"approval":98.4068628,"support":21.8453039},{"time_hours":14,"approval_perbill":982843138,"support_perbill":209198815,"approval":98.2843138,"support":20.9198815},{"time_hours":15,"approval_perbill":981617648,"support_perbill":200671963,"approval":98.1617648,"support":20.0671963},{"time_hours":16,"approval_perbill":980392158,"support_perbill":192789972,"approval":98.0392158,"support":19.2789972},{"time_hours":17,"approval_perbill":979166667,"support_perbill":185482348,"approval":97.9166667,"support":18.5482348},{"time_hours":18,"approval_perbill":977941177,"support_perbill":178688524,"approval":97.7941177,"support":17.8688524},{"time_hours":19,"approval_perbill":976715687,"support_perbill":172356151,"approval":97.6715687,"support":17.2356151},{"time_hours":20,"approval_perbill":975490197,"support_perbill":166439756,"approval":97.5490197,"support":16.6439756},{"time_hours":21,"approval_perbill":974264706,"support_perbill":160899652,"approval":97.4264706,"support":16.0899652},{"time_hours":22,"approval_perbill":973039216,"support_perbill":155701053,"approval":97.3039216,"support":15.5701053},{"time_hours":23,"approval_perbill":971813726,"support_perbill":150813323,"approval":97.1813726,"support":15.0813323},{"time_hours":24,"approval_perbill":970588236,"support_perbill":146209386,"approval":97.0588236,"support":14.6209386},{"time_hours":25,"approval_perbill":969362746,"support_perbill":141865225,"approval":96.9362746,"support":14.1865225},{"time_hours":26,"approval_perbill":968137256,"support_perbill":137759452,"approval":96.8137256,"support":13.7759452},{"time_hours":27,"approval_perbill":966911766,"support_perbill":133872975,"approval":96.6911766,"support":13.3872975},{"time_hours":28,"approval_perbill":965686276,"support_perbill":130188679,"approval":96.5686276,"support":13.0188679},{"time_hours":29,"approval_perbill":964460786,"support_perbill":126691186,"approval":96.4460786,"support":12.6691186},{"time_hours":30,"approval_perbill":963235295,"support_perbill":123366639,"approval":96.3235295,"support":12.3366639},{"time_hours":31,"approval_perbill":962009805,"support_perbill":120202524,"approval":96.2009805,"support":12.0202524},{"time_hours":32,"approval_perbill":960784315,"support_perbill":117187499,"approval":96.0784315,"support":11.7187499},{"time_hours":33,"approval_perbill":959558825,"support_perbill":114311269,"approval":95.9558825,"support":11.4311269},{"time_hours":34,"approval_perbill":958333334,"support_perbill":111564465,"approval":95.8333334,"support":11.1564465},{"time_hours":35,"approval_perbill":957107844,"support_perbill":108938546,"approval":95.7107844,"support":10.8938546},{"time_hours":36,"approval_perbill":955882354,"support_perbill":106425701,"approval":95.5882354,"support":10.6425701},{"time_hours":37,"approval_perbill":954656864,"support_perbill":104018782,"approval":95.4656864,"support":10.4018782},{"time_hours":38,"approval_perbill":953431373,"support_perbill":101711228,"approval":95.3431373,"support":10.1711228},{"time_hours":39,"approval_perbill":952205883,"support_perbill":99497012,"approval":95.2205883,"support":9.9497012},{"time_hours":40,"approval_perbill":950980393,"support_perbill":97370582,"approval":95.0980393,"support":9.7370582},{"time_hours":41,"approval_perbill":949754903,"support_perbill":95326819,"approval":94.9754903,"support":9.5326819},{"time_hours":42,"approval_perbill":948529412,"support_perbill":93360994,"approval":94.8529412,"support":9.3360994},{"time_hours":43,"approval_perbill":947303922,"support_perbill":91468733,"approval":94.7303922,"support":9.1468733},{"time_hours":44,"approval_perbill":946078432,"support_perbill":89645982,"approval":94.6078432,"support":8.9645982},{"time_hours":45,"approval_perbill":944852942,"support_perbill":87888981,"approval":94.4852942,"support":8.7888981},{"time_hours":46,"approval_perbill":943627452,"support_perbill":86194234,"approval":94.3627452,"support":8.6194234},{"time_hours":47,"approval_perbill":942401961,"support_perbill":84558490,"approval":94.2401961,"support":8.455849},{"time_hours":48,"approval_perbill":941176471,"support_perbill":82978722,"approval":94.1176471,"support":8.2978722},{"time_hours":49,"approval_perbill":939950981,"support_perbill":81452103,"approval":93.9950981,"support":8.1452103},{"time_hours":50,"approval_perbill":938725491,"support_perbill":79975997,"approval":93.8725491,"support":7.9975997},{"time_hours":51,"approval_perbill":937500001,"support_perbill":78547936,"approval":93.7500001,"support":7.8547936},{"time_hours":52,"approval_perbill":936274511,"support_perbill":77165614,"approval":93.6274511,"support":7.7165614},{"time_hours":53,"approval_perbill":935049021,"support_perbill":75826867,"approval":93.5049021,"support":7.5826867},{"time_hours":54,"approval_perbill":933823531,"support_perbill":74529666,"approval":93.3823531,"support":7.4529666},{"time_hours":55,"approval_perbill":932598040,"support_perbill":73272106,"approval":93.259804,"support":7.3272106},{"time_hours":56,"approval_perbill":931372550,"support_perbill":72052400,"approval":93.137255,"support":7.20524},{"time_hours":57,"approval_perbill":930147060,"support_perbill":70868862,"approval":93.014706,"support":7.0868862},{"time_hours":58,"approval_perbill":928921570,"support_perbill":69719908,"approval":92.892157,"support":6.9719908},{"time_hours":59,"approval_perbill":927696079,"support_perbill":68604042,"approval":92.7696079,"support":6.8604042},{"time_hours":60,"approval_perbill":926470589,"support_perbill":67519857,"approval":92.6470589,"support":6.7519857},{"time_hours":61,"approval_perbill":925245099,"support_perbill":66466022,"approval":92.5245099,"support":6.6466022},{"time_hours":62,"approval_perbill":924019609,"support_perbill":65441280,"approval":92.4019609,"support":6.544128},{"time_hours":63,"approval_perbill":922794118,"support_perbill":64444443,"approval":92.2794118,"support":6.4444443},{"time_hours":64,"approval_perbill":921568628,"support_perbill":63474386,"approval":92.1568628,"support":6.3474386},{"time_hours":65,"approval_perbill":920343138,"support_perbill":62530044,"approval":92.0343138,"support":6.2530044},{"time_hours":66,"approval_perbill":919117648,"support_perbill":61610409,"approval":91.9117648,"support":6.1610409},{"time_hours":67,"approval_perbill":917892158,"support_perbill":60714523,"approval":91.7892158,"support":6.0714523},{"time_hours":68,"approval_perbill":916666667,"support_perbill":59841478,"approval":91.6666667,"support":5.9841478},{"time_hours":69,"approval_perbill":915441177,"support_perbill":58990411,"approval":91.5441177,"support":5.8990411},{"time_hours":70,"approval_perbill":914215687,"support_perbill":58160504,"approval":91.4215687,"support":5.8160504},{"time_hours":71,"approval_perbill":912990197,"support_perbill":57350975,"approval":91.2990197,"support":5.7350975},{"time_hours":72,"approval_perbill":911764706,"support_perbill":56561084,"approval":91.1764706,"support":5.6561084},{"time_hours":73,"approval_perbill":910539216,"support_perbill":55790126,"approval":91.0539216,"support":5.5790126},{"time_hours":74,"approval_perbill":909313726,"support_perbill":55037426,"approval":90.9313726,"support":5.5037426},{"time_hours":75,"approval_perbill":908088236,"support_perbill":54302345,"approval":90.8088236,"support":5.4302345},{"time_hours":76,"approval_perbill":906862746,"support_perbill":53584271,"approval":90.6862746,"support":5.3584271},{"time_hours":77,"approval_perbill":905637256,"support_perbill":52882620,"approval":90.5637256,"support":5.288262},{"time_hours":78,"approval_perbill":904411766,"support_perbill":52196835,"approval":90.4411766,"support":5.2196835},{"time_hours":79,"approval_perbill":903186276,"support_perbill":51526385,"approval":90.3186276,"support":5.1526385},{"time_hours":80,"approval_perbill":901960785,"support_perbill":50870759,"approval":90.1960785,"support":5.0870759},{"time_hours":81,"approval_perbill":900735295,"support_perbill":50229473,"approval":90.0735295,"support":5.0229473},{"time_hours":82,"approval_perbill":899509805,"support_perbill":49602061,"approval":89.9509805,"support":4.9602061},{"time_hours":83,"approval_perbill":898284315,"support_perbill":48988077,"approval":89.8284315,"support":4.8988077},{"time_hours":84,"approval_perbill":897058824,"support_perbill":48387095,"approval":89.7058824,"support":4.8387095},{"time_hours":85,"approval_perbill":895833334,"support_perbill":47798707,"approval":89.5833334,"support":4.7798707},{"time_hours":86,"approval_perbill":894607844,"support_perbill":47222519,"approval":89.4607844,"support":4.7222519},{"time_hours":87,"approval_perbill":893382354,"support_perbill":46658158,"approval":89.3382354,"support":4.6658158},{"time_hours":88,"approval_perbill":892156864,"support_perbill":46105262,"approval":89.2156864,"support":4.6105262},{"time_hours":89,"approval_perbill":890931373,"support_perbill":45563485,"approval":89.0931373,"support":4.5563485},{"time_hours":90,"approval_perbill":889705883,"support_perbill":45032496,"approval":88.9705883,"support":4.5032496},{"time_hours":91,"approval_perbill":888480393,"support_perbill":44511976,"approval":88.8480393,"support":4.4511976},{"time_hours":92,"approval_perbill":887254903,"support_perbill":44001617,"approval":88.7254903,"support":4.4001617},{"time_hours":93,"approval_perbill":886029412,"support_perbill":43501126,"approval":88.6029412,"support":4.3501126},{"time_hours":94,"approval_perbill":884803922,"support_perbill":43010218,"approval":88.4803922,"support":4.3010218},{"time_hours":95,"approval_perbill":883578432,"support_perbill":42528621,"approval":88.3578432,"support":4.2528621},{"time_hours":96,"approval_perbill":882352942,"support_perbill":42056074,"approval":88.2352942,"support":4.2056074},{"time_hours":97,"approval_perbill":881127452,"support_perbill":41592321,"approval":88.1127452,"support":4.1592321},{"time_hours":98,"approval_perbill":879901962,"support_perbill":41137122,"approval":87.9901962,"support":4.1137122},{"time_hours":99,"approval_perbill":878676472,"support_perbill":40690242,"approval":87.8676472,"support":4.0690242},{"time_hours":100,"approval_perbill":877450982,"support_perbill":40251453,"approval":87.7450982,"support":4.0251453},{"time_hours":101,"approval_perbill":876225491,"support_perbill":39820539,"approval":87.6225491,"support":3.9820539},{"time_hours":102,"approval_perbill":875000001,"support_perbill":39397289,"approval":87.5000001,"support":3.9397289},{"time_hours":103,"approval_perbill":873774511,"support_perbill":38981501,"approval":87.3774511,"support":3.8981501},{"time_hours":104,"approval_perbill":872549021,"support_perbill":38572980,"approval":87.2549021,"support":3.857298},{"time_hours":105,"approval_perbill":871323530,"support_perbill":38171535,"approval":87.132353,"support":3.8171535},{"time_hours":106,"approval_perbill":870098040,"support_perbill":37776985,"approval":87.009804,"support":3.7776985},{"time_hours":107,"approval_perbill":868872550,"support_perbill":37389155,"approval":86.887255,"support":3.7389155},{"time_hours":108,"approval_perbill":867647060,"support_perbill":37007873,"approval":86.764706,"support":3.7007873},{"time_hours":109,"approval_perbill":866421570,"support_perbill":36632975,"approval":86.642157,"support":3.6632975},{"time_hours":110,"approval_perbill":865196079,"support_perbill":36264302,"approval":86.5196079,"support":3.6264302},{"time_hours":111,"approval_perbill":863970589,"support_perbill":35901701,"approval":86.3970589,"support":3.5901701},{"time_hours":112,"approval_perbill":862745099,"support_perbill":35545023,"approval":86.2745099,"support":3.5545023},{"time_hours":113,"approval_perbill":861519609,"support_perbill":35194123,"approval":86.1519609,"support":3.5194123},{"time_hours":114,"approval_perbill":860294118,"support_perbill":34848862,"approval":86.0294118,"support":3.4848862},{"time_hours":115,"approval_perbill":859068628,"support_perbill":34509106,"approval":85.9068628,"support":3.4509106},{"time_hours":116,"approval_perbill":857843138,"support_perbill":34174724,"approval":85.7843138,"support":3.4174724},{"time_hours":117,"approval_perbill":856617648,"support_perbill":33845590,"approval":85.6617648,"support":3.384559},{"time_hours":118,"approval_perbill":855392157,"support_perbill":33521580,"approval":85.5392157,"support":3.352158},{"time_hours":119,"approval_perbill":854166667,"support_perbill":33202577,"approval":85.4166667,"support":3.3202577},{"time_hours":120,"approval_perbill":852941177,"support_perbill":32888464,"approval":85.2941177,"support":3.2888464},{"time_hours":121,"approval_perbill":851715687,"support_perbill":32579131,"approval":85.1715687,"support":3.2579131},{"time_hours":122,"approval_perbill":850490197,"support_perbill":32274469,"approval":85.0490197,"support":3.2274469},{"time_hours":123,"approval_perbill":849264707,"support_perbill":31974373,"approval":84.9264707,"support":3.1974373},{"time_hours":124,"approval_perbill":848039217,"support_perbill":31678741,"approval":84.8039217,"support":3.1678741},{"time_hours":125,"approval_perbill":846813727,"support_perbill":31387475,"approval":84.6813727,"support":3.1387475},{"time_hours":126,"approval_perbill":845588236,"support_perbill":31100477,"approval":84.5588236,"support":3.1100477},{"time_hours":127,"approval_perbill":844362746,"support_perbill":30817656,"approval":84.4362746,"support":3.0817656},{"time_hours":128,"approval_perbill":843137256,"support_perbill":30538921,"approval":84.3137256,"support":3.0538921},{"time_hours":129,"approval_perbill":841911766,"support_perbill":30264184,"approval":84.1911766,"support":3.0264184},{"time_hours":130,"approval_perbill":840686276,"support_perbill":29993358,"approval":84.0686276,"support":2.9993358},{"time_hours":131,"approval_perbill":839460785,"support_perbill":29726363,"approval":83.9460785,"support":2.9726363},{"time_hours":132,"approval_perbill":838235295,"support_perbill":29463116,"approval":83.8235295,"support":2.9463116},{"time_hours":133,"approval_perbill":837009805,"support_perbill":29203539,"approval":83.7009805,"support":2.9203539},{"time_hours":134,"approval_perbill":835784315,"support_perbill":28947556,"approval":83.5784315,"support":2.8947556},{"time_hours":135,"approval_perbill":834558824,"support_perbill":28695094,"approval":83.4558824,"support":2.8695094},{"time_hours":136,"approval_perbill":833333334,"support_perbill":28446079,"approval":83.3333334,"support":2.8446079},{"time_hours":137,"approval_perbill":832107844,"support_perbill":28200442,"approval":83.2107844,"support":2.8200442},{"time_hours":138,"approval_perbill":830882354,"support_perbill":27958114,"approval":83.0882354,"support":2.7958114},{"time_hours":139,"approval_perbill":829656863,"support_perbill":27719030,"approval":82.9656863,"support":2.771903},{"time_hours":140,"approval_perbill":828431373,"support_perbill":27483123,"approval":82.8431373,"support":2.7483123},{"time_hours":141,"approval_perbill":827205883,"support_perbill":27250333,"approval":82.7205883,"support":2.7250333},{"time_hours":142,"approval_perbill":825980393,"support_perbill":27020596,"approval":82.5980393,"support":2.7020596},{"time_hours":143,"approval_perbill":824754902,"support_perbill":26793853,"approval":82.4754902,"support":2.6793853},{"time_hours":144,"approval_perbill":823529412,"support_perbill":26570047,"approval":82.3529412,"support":2.6570047},{"time_hours":145,"approval_perbill":822303922,"support_perbill":26349121,"approval":82.2303922,"support":2.6349121},{"time_hours":146,"approval_perbill":821078432,"support_perbill":26131019,"approval":82.1078432,"support":2.6131019},{"time_hours":147,"approval_perbill":819852942,"support_perbill":25915687,"approval":81.9852942,"support":2.5915687},{"time_hours":148,"approval_perbill":818627452,"support_perbill":25703073,"approval":81.8627452,"support":2.5703073},{"time_hours":149,"approval_perbill":817401962,"support_perbill":25493126,"approval":81.7401962,"support":2.5493126},{"time_hours":150,"approval_perbill":816176472,"support_perbill":25285796,"approval":81.6176472,"support":2.5285796},{"time_hours":151,"approval_perbill":814950982,"support_perbill":25081035,"approval":81.4950982,"support":2.5081035},{"time_hours":152,"approval_perbill":813725491,"support_perbill":24878795,"approval":81.3725491,"support":2.4878795},{"time_hours":153,"approval_perbill":812500001,"support_perbill":24679029,"approval":81.2500001,"support":2.4679029},{"time_hours":154,"approval_perbill":811274511,"support_perbill":24481693,"approval":81.1274511,"support":2.4481693},{"time_hours":155,"approval_perbill":810049021,"support_perbill":24286742,"approval":81.0049021,"support":2.4286742},{"time_hours":156,"approval_perbill":808823530,"support_perbill":24094134,"approval":80.882353,"support":2.4094134},{"time_hours":157,"approval_perbill":807598040,"support_perbill":23903827,"approval":80.759804,"support":2.3903827},{"time_hours":158,"approval_perbill":806372550,"support_perbill":23715779,"approval":80.637255,"support":2.3715779},{"time_hours":159,"approval_perbill":805147060,"support_perbill":23529951,"approval":80.514706,"support":2.3529951},{"time_hours":160,"approval_perbill":803921569,"support_perbill":23346303,"approval":80.3921569,"support":2.3346303},{"time_hours":161,"approval_perbill":802696079,"support_perbill":23164797,"approval":80.2696079,"support":2.3164797},{"time_hours":162,"approval_perbill":801470589,"support_perbill":22985397,"approval":80.1470589,"support":2.2985397},{"time_hours":163,"approval_perbill":800245099,"support_perbill":22808065,"approval":80.0245099,"support":2.2808065},{"time_hours":164,"approval_perbill":799019608,"support_perbill":22632766,"approval":79.9019608,"support":2.2632766},{"time_hours":165,"approval_perbill":797794118,"support_perbill":22459466,"approval":79.7794118,"support":2.2459466},{"time_hours":166,"approval_perbill":796568628,"support_perbill":22288130,"approval":79.6568628,"support":2.228813},{"time_hours":167,"approval_perbill":795343138,"support_perbill":22118725,"approval":79.5343138,"support":2.2118725},{"time_hours":168,"approval_perbill":794117648,"support_perbill":21951219,"approval":79.4117648,"support":2.1951219},{"time_hours":169,"approval_perbill":792892158,"support_perbill":21785579,"approval":79.2892158,"support":2.1785579},{"time_hours":170,"approval_perbill":791666668,"support_perbill":21621776,"approval":79.1666668,"support":2.1621776},{"time_hours":171,"approval_perbill":790441178,"support_perbill":21459778,"approval":79.0441178,"support":2.1459778},{"time_hours":172,"approval_perbill":789215688,"support_perbill":21299556,"approval":78.9215688,"support":2.1299556},{"time_hours":173,"approval_perbill":787990197,"support_perbill":21141081,"approval":78.7990197,"support":2.1141081},{"time_hours":174,"approval_perbill":786764707,"support_perbill":20984324,"approval":78.6764707,"support":2.0984324},{"time_hours":175,"approval_perbill":785539217,"support_perbill":20829258,"approval":78.5539217,"support":2.0829258},{"time_hours":176,"approval_perbill":784313727,"support_perbill":20675855,"approval":78.4313727,"support":2.0675855},{"time_hours":177,"approval_perbill":783088236,"support_perbill":20524089,"approval":78.3088236,"support":2.0524089},{"time_hours":178,"approval_perbill":781862746,"support_perbill":20373934,"approval":78.1862746,"support":2.0373934},{"time_hours":179,"approval_perbill":780637256,"support_perbill":20225364,"approval":78.0637256,"support":2.0225364},{"time_hours":180,"approval_perbill":779411766,"support_perbill":20078354,"approval":77.9411766,"support":2.0078354},{"time_hours":181,"approval_perbill":778186275,"support_perbill":19932880,"approval":77.8186275,"support":1.993288},{"time_hours":182,"approval_perbill":776960785,"support_perbill":19788917,"approval":77.6960785,"support":1.9788917},{"time_hours":183,"approval_perbill":775735295,"support_perbill":19646444,"approval":77.5735295,"support":1.9646444},{"time_hours":184,"approval_perbill":774509805,"support_perbill":19505435,"approval":77.4509805,"support":1.9505435},{"time_hours":185,"approval_perbill":773284314,"support_perbill":19365870,"approval":77.3284314,"support":1.936587},{"time_hours":186,"approval_perbill":772058824,"support_perbill":19227725,"approval":77.2058824,"support":1.9227725},{"time_hours":187,"approval_perbill":770833334,"support_perbill":19090980,"approval":77.0833334,"support":1.909098},{"time_hours":188,"approval_perbill":769607844,"support_perbill":18955613,"approval":76.9607844,"support":1.8955613},{"time_hours":189,"approval_perbill":768382353,"support_perbill":18821603,"approval":76.8382353,"support":1.8821603},{"time_hours":190,"approval_perbill":767156863,"support_perbill":18688931,"approval":76.7156863,"support":1.8688931},{"time_hours":191,"approval_perbill":765931373,"support_perbill":18557575,"approval":76.5931373,"support":1.8557575},{"time_hours":192,"approval_perbill":764705883,"support_perbill":18427518,"approval":76.4705883,"support":1.8427518},{"time_hours":193,"approval_perbill":763480393,"support_perbill":18298739,"approval":76.3480393,"support":1.8298739},{"time_hours":194,"approval_perbill":762254903,"support_perbill":18171219,"approval":76.2254903,"support":1.8171219},{"time_hours":195,"approval_perbill":761029413,"support_perbill":18044941,"approval":76.1029413,"support":1.8044941},{"time_hours":196,"approval_perbill":759803923,"support_perbill":17919887,"approval":75.9803923,"support":1.7919887},{"time_hours":197,"approval_perbill":758578433,"support_perbill":17796038,"approval":75.8578433,"support":1.7796038},{"time_hours":198,"approval_perbill":757352942,"support_perbill":17673377,"approval":75.7352942,"support":1.7673377},{"time_hours":199,"approval_perbill":756127452,"support_perbill":17551888,"approval":75.6127452,"support":1.7551888},{"time_hours":200,"approval_perbill":754901962,"support_perbill":17431553,"approval":75.4901962,"support":1.7431553},{"time_hours":201,"approval_perbill":753676472,"support_perbill":17312357,"approval":75.3676472,"support":1.7312357},{"time_hours":202,"approval_perbill":752450981,"support_perbill":17194282,"approval":75.2450981,"support":1.7194282},{"time_hours":203,"approval_perbill":751225491,"support_perbill":17077315,"approval":75.1225491,"support":1.7077315},{"time_hours":204,"approval_perbill":750000001,"support_perbill":16961437,"approval":75.0000001,"support":1.6961437},{"time_hours":205,"approval_perbill":748774511,"support_perbill":16846636,"approval":74.8774511,"support":1.6846636},{"time_hours":206,"approval_perbill":747549020,"support_perbill":16732895,"approval":74.754902,"support":1.6732895},{"time_hours":207,"approval_perbill":746323530,"support_perbill":16620201,"approval":74.632353,"support":1.6620201},{"time_hours":208,"approval_perbill":745098040,"support_perbill":16508538,"approval":74.509804,"support":1.6508538},{"time_hours":209,"approval_perbill":743872550,"support_perbill":16397893,"approval":74.387255,"support":1.6397893},{"time_hours":210,"approval_perbill":742647059,"support_perbill":16288252,"approval":74.2647059,"support":1.6288252},{"time_hours":211,"approval_perbill":741421569,"support_perbill":16179601,"approval":74.1421569,"support":1.6179601},{"time_hours":212,"approval_perbill":740196079,"support_perbill":16071927,"approval":74.0196079,"support":1.6071927},{"time_hours":213,"approval_perbill":738970589,"support_perbill":15965217,"approval":73.8970589,"support":1.5965217},{"time_hours":214,"approval_perbill":737745099,"support_perbill":15859457,"approval":73.7745099,"support":1.5859457},{"time_hours":215,"approval_perbill":736519608,"support_perbill":15754636,"approval":73.6519608,"support":1.5754636},{"time_hours":216,"approval_perbill":735294118,"support_perbill":15650741,"approval":73.5294118,"support":1.5650741},{"time_hours":217,"approval_perbill":734068628,"support_perbill":15547759,"approval":73.4068628,"support":1.5547759},{"time_hours":218,"approval_perbill":732843138,"support_perbill":15445679,"approval":73.2843138,"support":1.5445679},{"time_hours":219,"approval_perbill":731617648,"support_perbill":15344488,"approval":73.1617648,"support":1.5344488},{"time_hours":220,"approval_perbill":730392158,"support_perbill":15244176,"approval":73.0392158,"support":1.5244176},{"time_hours":221,"approval_perbill":729166668,"support_perbill":15144731,"approval":72.9166668,"support":1.5144731},{"time_hours":222,"approval_perbill":727941178,"support_perbill":15046141,"approval":72.7941178,"support":1.5046141},{"time_hours":223,"approval_perbill":726715687,"support_perbill":14948396,"approval":72.6715687,"support":1.4948396},{"time_hours":224,"approval_perbill":725490197,"support_perbill":14851485,"approval":72.5490197,"support":1.4851485},{"time_hours":225,"approval_perbill":724264707,"support_perbill":14755396,"approval":72.4264707,"support":1.4755396},{"time_hours":226,"approval_perbill":723039217,"support_perbill":14660121,"approval":72.3039217,"support":1.4660121},{"time_hours":227,"approval_perbill":721813726,"support_perbill":14565648,"approval":72.1813726,"support":1.4565648},{"time_hours":228,"approval_perbill":720588236,"support_perbill":14471968,"approval":72.0588236,"support":1.4471968},{"time_hours":229,"approval_perbill":719362746,"support_perbill":14379070,"approval":71.9362746,"support":1.437907},{"time_hours":230,"approval_perbill":718137256,"support_perbill":14286945,"approval":71.8137256,"support":1.4286945},{"time_hours":231,"approval_perbill":716911765,"support_perbill":14195583,"approval":71.6911765,"support":1.4195583},{"time_hours":232,"approval_perbill":715686275,"support_perbill":14104975,"approval":71.5686275,"support":1.4104975},{"time_hours":233,"approval_perbill":714460785,"support_perbill":14015111,"approval":71.4460785,"support":1.4015111},{"time_hours":234,"approval_perbill":713235295,"support_perbill":13925982,"approval":71.3235295,"support":1.3925982},{"time_hours":235,"approval_perbill":712009805,"support_perbill":13837579,"approval":71.2009805,"support":1.3837579},{"time_hours":236,"approval_perbill":710784314,"support_perbill":13749894,"approval":71.0784314,"support":1.3749894},{"time_hours":237,"approval_perbill":709558824,"support_perbill":13662918,"approval":70.9558824,"support":1.3662918},{"time_hours":238,"approval_perbill":708333334,"support_perbill":13576642,"approval":70.8333334,"support":1.3576642},{"time_hours":239,"approval_perbill":707107844,"support_perbill":13491057,"approval":70.7107844,"support":1.3491057},{"time_hours":240,"approval_perbill":705882353,"support_perbill":13406156,"approval":70.5882353,"support":1.3406156},{"time_hours":241,"approval_perbill":704656863,"support_perbill":13321931,"approval":70.4656863,"support":1.3321931},{"time_hours":242,"approval_perbill":703431373,"support_perbill":13238372,"approval":70.3431373,"support":1.3238372},{"time_hours":243,"approval_perbill":702205883,"support_perbill":13155473,"approval":70.2205883,"support":1.3155473},{"time_hours":244,"approval_perbill":700980393,"support_perbill":13073226,"approval":70.0980393,"support":1.3073226},{"time_hours":245,"approval_perbill":699754903,"support_perbill":12991622,"approval":69.9754903,"support":1.2991622},{"time_hours":246,"approval_perbill":698529413,"support_perbill":12910655,"approval":69.8529413,"support":1.2910655},{"time_hours":247,"approval_perbill":697303923,"support_perbill":12830317,"approval":69.7303923,"support":1.2830317},{"time_hours":248,"approval_perbill":696078432,"support_perbill":12750601,"approval":69.6078432,"support":1.2750601},{"time_hours":249,"approval_perbill":694852942,"support_perbill":12671499,"approval":69.4852942,"support":1.2671499},{"time_hours":250,"approval_perbill":693627452,"support_perbill":12593005,"approval":69.3627452,"support":1.2593005},{"time_hours":251,"approval_perbill":692401962,"support_perbill":12515111,"approval":69.2401962,"support":1.2515111},{"time_hours":252,"approval_perbill":691176471,"support_perbill":12437810,"approval":69.1176471,"support":1.243781},{"time_hours":253,"approval_perbill":689950981,"support_perbill":12361097,"approval":68.9950981,"support":1.2361097},{"time_hours":254,"approval_perbill":688725491,"support_perbill":12284964,"approval":68.8725491,"support":1.2284964},{"time_hours":255,"approval_perbill":687500001,"support_perbill":12209404,"approval":68.7500001,"support":1.2209404},{"time_hours":256,"approval_perbill":686274511,"support_perbill":12134411,"approval":68.6274511,"support":1.2134411},{"time_hours":257,"approval_perbill":685049020,"support_perbill":12059980,"approval":68.504902,"support":1.205998},{"time_hours":258,"approval_perbill":683823530,"support_perbill":11986103,"approval":68.382353,"support":1.1986103},{"time_hours":259,"approval_perbill":682598040,"support_perbill":11912774,"approval":68.259804,"support":1.1912774},{"time_hours":260,"approval_perbill":681372550,"support_perbill":11839987,"approval":68.137255,"support":1.1839987},{"time_hours":261,"approval_perbill":680147059,"support_perbill":11767737,"approval":68.0147059,"support":1.1767737},{"time_hours":262,"approval_perbill":678921569,"support_perbill":11696017,"approval":67.8921569,"support":1.1696017},{"time_hours":263,"approval_perbill":677696079,"support_perbill":11624822,"approval":67.7696079,"support":1.1624822},{"time_hours":264,"approval_perbill":676470589,"support_perbill":11554145,"approval":67.6470589,"support":1.1554145},{"time_hours":265,"approval_perbill":675245099,"support_perbill":11483982,"approval":67.5245099,"support":1.1483982},{"time_hours":266,"approval_perbill":674019609,"support_perbill":11414326,"approval":67.4019609,"support":1.1414326},{"time_hours":267,"approval_perbill":672794119,"support_perbill":11345173,"approval":67.2794119,"support":1.1345173},{"time_hours":268,"approval_perbill":671568629,"support_perbill":11276516,"approval":67.1568629,"support":1.1276516},{"time_hours":269,"approval_perbill":670343138,"support_perbill":11208351,"approval":67.0343138,"support":1.1208351},{"time_hours":270,"approval_perbill":669117648,"support_perbill":11140671,"approval":66.9117648,"support":1.1140671},{"time_hours":271,"approval_perbill":667892158,"support_perbill":11073473,"approval":66.7892158,"support":1.1073473},{"time_hours":272,"approval_perbill":666666668,"support_perbill":11006750,"approval":66.6666668,"support":1.100675},{"time_hours":273,"approval_perbill":665441177,"support_perbill":10940499,"approval":66.5441177,"support":1.0940499},{"time_hours":274,"approval_perbill":664215687,"support_perbill":10874713,"approval":66.4215687,"support":1.0874713},{"time_hours":275,"approval_perbill":662990197,"support_perbill":10809388,"approval":66.2990197,"support":1.0809388},{"time_hours":276,"approval_perbill":661764707,"support_perbill":10744519,"approval":66.1764707,"support":1.0744519},{"time_hours":277,"approval_perbill":660539217,"support_perbill":10680101,"approval":66.0539217,"support":1.0680101},{"time_hours":278,"approval_perbill":659313726,"support_perbill":10616130,"approval":65.9313726,"support":1.061613},{"time_hours":279,"approval_perbill":658088236,"support_perbill":10552601,"approval":65.8088236,"support":1.0552601},{"time_hours":280,"approval_perbill":656862746,"support_perbill":10489510,"approval":65.6862746,"support":1.048951},{"time_hours":281,"approval_perbill":655637256,"support_perbill":10426852,"approval":65.5637256,"support":1.0426852},{"time_hours":282,"approval_perbill":654411765,"support_perbill":10364622,"approval":65.4411765,"support":1.0364622},{"time_hours":283,"approval_perbill":653186275,"support_perbill":10302816,"approval":65.3186275,"support":1.0302816},{"time_hours":284,"approval_perbill":651960785,"support_perbill":10241430,"approval":65.1960785,"support":1.024143},{"time_hours":285,"approval_perbill":650735295,"support_perbill":10180459,"approval":65.0735295,"support":1.0180459},{"time_hours":286,"approval_perbill":649509804,"support_perbill":10119900,"approval":64.9509804,"support":1.01199},{"time_hours":287,"approval_perbill":648284314,"support_perbill":10059748,"approval":64.8284314,"support":1.0059748},{"time_hours":288,"approval_perbill":647058824,"support_perbill":10000000,"approval":64.7058824,"support":1},{"time_hours":289,"approval_perbill":645833334,"support_perbill":9940650,"approval":64.5833334,"support":0.994065},{"time_hours":290,"approval_perbill":644607844,"support_perbill":9881695,"approval":64.4607844,"support":0.9881695},{"time_hours":291,"approval_perbill":643382354,"support_perbill":9823132,"approval":64.3382354,"support":0.9823132},{"time_hours":292,"approval_perbill":642156864,"support_perbill":9764955,"approval":64.2156864,"support":0.9764955},{"time_hours":293,"approval_perbill":640931374,"support_perbill":9707163,"approval":64.0931374,"support":0.9707163},{"time_hours":294,"approval_perbill":639705883,"support_perbill":9649749,"approval":63.9705883,"support":0.9649749},{"time_hours":295,"approval_perbill":638480393,"support_perbill":9592712,"approval":63.8480393,"support":0.9592712},{"time_hours":296,"approval_perbill":637254903,"support_perbill":9536047,"approval":63.7254903,"support":0.9536047},{"time_hours":297,"approval_perbill":636029413,"support_perbill":9479751,"approval":63.6029413,"support":0.9479751},{"time_hours":298,"approval_perbill":634803923,"support_perbill":9423820,"approval":63.4803923,"support":0.942382},{"time_hours":299,"approval_perbill":633578432,"support_perbill":9368250,"approval":63.3578432,"support":0.936825},{"time_hours":300,"approval_perbill":632352942,"support_perbill":9313038,"approval":63.2352942,"support":0.9313038},{"time_hours":301,"approval_perbill":631127452,"support_perbill":9258181,"approval":63.1127452,"support":0.9258181},{"time_hours":302,"approval_perbill":629901962,"support_perbill":9203674,"approval":62.9901962,"support":0.9203674},{"time_hours":303,"approval_perbill":628676471,"support_perbill":9149516,"approval":62.8676471,"support":0.9149516},{"time_hours":304,"approval_perbill":627450981,"support_perbill":9095702,"approval":62.7450981,"support":0.9095702},{"time_hours":305,"approval_perbill":626225491,"support_perbill":9042230,"approval":62.6225491,"support":0.904223},{"time_hours":306,"approval_perbill":625000001,"support_perbill":8989095,"approval":62.5000001,"support":0.8989095},{"time_hours":307,"approval_perbill":623774510,"support_perbill":8936295,"approval":62.377451,"support":0.8936295},{"time_hours":308,"approval_perbill":622549020,"support_perbill":8883826,"approval":62.254902,"support":0.8883826},{"time_hours":309,"approval_perbill":621323530,"support_perbill":8831687,"approval":62.132353,"support":0.8831687},{"time_hours":310,"approval_perbill":620098040,"support_perbill":8779872,"approval":62.009804,"support":0.8779872},{"time_hours":311,"approval_perbill":618872549,"support_perbill":8728380,"approval":61.8872549,"support":0.872838},{"time_hours":312,"approval_perbill":617647059,"support_perbill":8677207,"approval":61.7647059,"support":0.8677207},{"time_hours":313,"approval_perbill":616421569,"support_perbill":8626351,"approval":61.6421569,"support":0.8626351},{"time_hours":314,"approval_perbill":615196079,"support_perbill":8575808,"approval":61.5196079,"support":0.8575808},{"time_hours":315,"approval_perbill":613970589,"support_perbill":8525576,"approval":61.3970589,"support":0.8525576},{"time_hours":316,"approval_perbill":612745099,"support_perbill":8475652,"approval":61.2745099,"support":0.8475652},{"time_hours":317,"approval_perbill":611519609,"support_perbill":8426032,"approval":61.1519609,"support":0.8426032},{"time_hours":318,"approval_perbill":610294119,"support_perbill":8376715,"approval":61.0294119,"support":0.8376715},{"time_hours":319,"approval_perbill":609068629,"support_perbill":8327697,"approval":60.9068629,"support":0.8327697},{"time_hours":320,"approval_perbill":607843138,"support_perbill":8278976,"approval":60.7843138,"support":0.8278976},{"time_hours":321,"approval_perbill":606617648,"support_perbill":8230549,"approval":60.6617648,"support":0.8230549},{"time_hours":322,"approval_perbill":605392158,"support_perbill":8182413,"approval":60.5392158,"support":0.8182413},{"time_hours":323,"approval_perbill":604166668,"support_perbill":8134566,"approval":60.4166668,"support":0.8134566},{"time_hours":324,"approval_perbill":602941177,"support_perbill":8087005,"approval":60.2941177,"support":0.8087005},{"time_hours":325,"approval_perbill":601715687,"support_perbill":8039727,"approval":60.1715687,"support":0.8039727},{"time_hours":326,"approval_perbill":600490197,"support_perbill":7992731,"approval":60.0490197,"support":0.7992731},{"time_hours":327,"approval_perbill":599264707,"support_perbill":7946013,"approval":59.9264707,"support":0.7946013},{"time_hours":328,"approval_perbill":598039216,"support_perbill":7899571,"approval":59.8039216,"support":0.7899571},{"time_hours":329,"approval_perbill":596813726,"support_perbill":7853403,"approval":59.6813726,"support":0.7853403},{"time_hours":330,"approval_perbill":595588236,"support_perbill":7807506,"approval":59.5588236,"support":0.7807506},{"time_hours":331,"approval_perbill":594362746,"support_perbill":7761878,"approval":59.4362746,"support":0.7761878},{"time_hours":332,"approval_perbill":593137255,"support_perbill":7716516,"approval":59.3137255,"support":0.7716516},{"time_hours":333,"approval_perbill":591911765,"support_perbill":7671418,"approval":59.1911765,"support":0.7671418},{"time_hours":334,"approval_perbill":590686275,"support_perbill":7626583,"approval":59.0686275,"support":0.7626583},{"time_hours":335,"approval_perbill":589460785,"support_perbill":7582007,"approval":58.9460785,"support":0.7582007},{"time_hours":336,"approval_perbill":588235295,"support_perbill":7537688,"approval":58.8235295,"support":0.7537688},{"time_hours":337,"approval_perbill":587009805,"support_perbill":7493624,"approval":58.7009805,"support":0.7493624},{"time_hours":338,"approval_perbill":585784315,"support_perbill":7449814,"approval":58.5784315,"support":0.7449814},{"time_hours":339,"approval_perbill":584558825,"support_perbill":7406254,"approval":58.4558825,"support":0.7406254},{"time_hours":340,"approval_perbill":583333335,"support_perbill":7362942,"approval":58.3333335,"support":0.7362942},{"time_hours":341,"approval_perbill":582107844,"support_perbill":7319878,"approval":58.2107844,"support":0.7319878},{"time_hours":342,"approval_perbill":580882354,"support_perbill":7277057,"approval":58.0882354,"support":0.7277057},{"time_hours":343,"approval_perbill":579656864,"support_perbill":7234479,"approval":57.9656864,"support":0.7234479},{"time_hours":344,"approval_perbill":578431374,"support_perbill":7192141,"approval":57.8431374,"support":0.7192141},{"time_hours":345,"approval_perbill":577205883,"support_perbill":7150041,"approval":57.7205883,"support":0.7150041},{"time_hours":346,"approval_perbill":575980393,"support_perbill":7108178,"approval":57.5980393,"support":0.7108178},{"time_hours":347,"approval_perbill":574754903,"support_perbill":7066548,"approval":57.4754903,"support":0.7066548},{"time_hours":348,"approval_perbill":573529413,"support_perbill":7025151,"approval":57.3529413,"support":0.7025151},{"time_hours":349,"approval_perbill":572303922,"support_perbill":6983985,"approval":57.2303922,"support":0.6983985},{"time_hours":350,"approval_perbill":571078432,"support_perbill":6943047,"approval":57.1078432,"support":0.6943047},{"time_hours":351,"approval_perbill":569852942,"support_perbill":6902335,"approval":56.9852942,"support":0.6902335},{"time_hours":352,"approval_perbill":568627452,"support_perbill":6861848,"approval":56.8627452,"support":0.6861848},{"time_hours":353,"approval_perbill":567401961,"support_perbill":6821584,"approval":56.7401961,"support":0.6821584},{"time_hours":354,"approval_perbill":566176471,"support_perbill":6781540,"approval":56.6176471,"support":0.678154},{"time_hours":355,"approval_perbill":564950981,"support_perbill":6741716,"approval":56.4950981,"support":0.6741716},{"time_hours":356,"approval_perbill":563725491,"support_perbill":6702109,"approval":56.3725491,"support":0.6702109},{"time_hours":357,"approval_perbill":562500000,"support_perbill":6662718,"approval":56.25,"support":0.6662718},{"time_hours":358,"approval_perbill":561274510,"support_perbill":6623541,"approval":56.127451,"support":0.6623541},{"time_hours":359,"approval_perbill":560049020,"support_perbill":6584575,"approval":56.004902,"support":0.6584575},{"time_hours":360,"approval_perbill":558823530,"support_perbill":6545820,"approval":55.882353,"support":0.654582},{"time_hours":361,"approval_perbill":557598040,"support_perbill":6507274,"approval":55.759804,"support":0.6507274},{"time_hours":362,"approval_perbill":556372550,"support_perbill":6468935,"approval":55.637255,"support":0.6468935},{"time_hours":363,"approval_perbill":555147060,"support_perbill":6430801,"approval":55.514706,"support":0.6430801},{"time_hours":364,"approval_perbill":553921570,"support_perbill":6392871,"approval":55.392157,"support":0.6392871},{"time_hours":365,"approval_perbill":552696080,"support_perbill":6355142,"approval":55.269608,"support":0.6355142},{"time_hours":366,"approval_perbill":551470589,"support_perbill":6317615,"approval":55.1470589,"support":0.6317615},{"time_hours":367,"approval_perbill":550245099,"support_perbill":6280286,"approval":55.0245099,"support":0.6280286},{"time_hours":368,"approval_perbill":549019609,"support_perbill":6243154,"approval":54.9019609,"support":0.6243154},{"time_hours":369,"approval_perbill":547794119,"support_perbill":6206218,"approval":54.7794119,"support":0.6206218},{"time_hours":370,"approval_perbill":546568628,"support_perbill":6169476,"approval":54.6568628,"support":0.6169476},{"time_hours":371,"approval_perbill":545343138,"support_perbill":6132927,"approval":54.5343138,"support":0.6132927},{"time_hours":372,"approval_perbill":544117648,"support_perbill":6096569,"approval":54.4117648,"support":0.6096569},{"time_hours":373,"approval_perbill":542892158,"support_perbill":6060401,"approval":54.2892158,"support":0.6060401},{"time_hours":374,"approval_perbill":541666667,"support_perbill":6024421,"approval":54.1666667,"support":0.6024421},{"time_hours":375,"approval_perbill":540441177,"support_perbill":5988627,"approval":54.0441177,"support":0.5988627},{"time_hours":376,"approval_perbill":539215687,"support_perbill":5953019,"approval":53.9215687,"support":0.5953019},{"time_hours":377,"approval_perbill":537990197,"support_perbill":5917595,"approval":53.7990197,"support":0.5917595},{"time_hours":378,"approval_perbill":536764706,"support_perbill":5882353,"approval":53.6764706,"support":0.5882353},{"time_hours":379,"approval_perbill":535539216,"support_perbill":5847292,"approval":53.5539216,"support":0.5847292},{"time_hours":380,"approval_perbill":534313726,"support_perbill":5812410,"approval":53.4313726,"support":0.581241},{"time_hours":381,"approval_perbill":533088236,"support_perbill":5777707,"approval":53.3088236,"support":0.5777707},{"time_hours":382,"approval_perbill":531862746,"support_perbill":5743181,"approval":53.1862746,"support":0.5743181},{"time_hours":383,"approval_perbill":530637255,"support_perbill":5708830,"approval":53.0637255,"support":0.570883},{"time_hours":384,"approval_perbill":529411765,"support_perbill":5674653,"approval":52.9411765,"support":0.5674653},{"time_hours":385,"approval_perbill":528186275,"support_perbill":5640649,"approval":52.8186275,"support":0.5640649},{"time_hours":386,"approval_perbill":526960785,"support_perbill":5606817,"approval":52.6960785,"support":0.5606817},{"time_hours":387,"approval_perbill":525735295,"support_perbill":5573155,"approval":52.5735295,"support":0.5573155},{"time_hours":388,"approval_perbill":524509805,"support_perbill":5539662,"approval":52.4509805,"support":0.5539662},{"time_hours":389,"approval_perbill":523284315,"support_perbill":5506336,"approval":52.3284315,"support":0.5506336},{"time_hours":390,"approval_perbill":522058825,"support_perbill":5473177,"approval":52.2058825,"support":0.5473177},{"time_hours":391,"approval_perbill":520833334,"support_perbill":5440183,"approval":52.0833334,"support":0.5440183},{"time_hours":392,"approval_perbill":519607844,"support_perbill":5407354,"approval":51.9607844,"support":0.5407354},{"time_hours":393,"approval_perbill":518382354,"support_perbill":5374687,"approval":51.8382354,"support":0.5374687},{"time_hours":394,"approval_perbill":517156864,"support_perbill":5342181,"approval":51.7156864,"support":0.5342181},{"time_hours":395,"approval_perbill":515931373,"support_perbill":5309836,"approval":51.5931373,"support":0.5309836},{"time_hours":396,"approval_perbill":514705883,"support_perbill":5277650,"approval":51.4705883,"support":0.527765},{"time_hours":397,"approval_perbill":513480393,"support_perbill":5245622,"approval":51.3480393,"support":0.5245622},{"time_hours":398,"approval_perbill":512254903,"support_perbill":5213751,"approval":51.2254903,"support":0.5213751},{"time_hours":399,"approval_perbill":511029412,"support_perbill":5182035,"approval":51.1029412,"support":0.5182035},{"time_hours":400,"approval_perbill":509803922,"support_perbill":5150474,"approval":50.9803922,"support":0.5150474},{"time_hours":401,"approval_perbill":508578432,"support_perbill":5119067,"approval":50.8578432,"support":0.5119067},{"time_hours":402,"approval_perbill":507352942,"support_perbill":5087812,"approval":50.7352942,"support":0.5087812},{"time_hours":403,"approval_perbill":506127452,"support_perbill":5056708,"approval":50.6127452,"support":0.5056708},{"time_hours":404,"approval_perbill":504901961,"support_perbill":5025754,"approval":50.4901961,"support":0.5025754},{"time_hours":405,"approval_perbill":503676471,"support_perbill":4994949,"approval":50.3676471,"support":0.4994949},{"time_hours":406,"approval_perbill":502450981,"support_perbill":4964292,"approval":50.2450981,"support":0.4964292},{"time_hours":407,"approval_perbill":501225491,"support_perbill":4933782,"approval":50.1225491,"support":0.4933782},{"time_hours":408,"approval_perbill":500000000,"support_perbill":4903417,"approval":50,"support":0.4903417},{"time_hours":409,"approval_perbill":500000000,"support_perbill":4873198,"approval":50,"support":0.4873198},{"time_hours":410,"approval_perbill":500000000,"support_perbill":4843122,"approval":50,"support":0.4843122},{"time_hours":411,"approval_perbill":500000000,"support_perbill":4813189,"approval":50,"support":0.4813189},{"time_hours":412,"approval_perbill":500000000,"support_perbill":4783398,"approval":50,"support":0.4783398},{"time_hours":413,"approval_perbill":500000000,"support_perbill":4753747,"approval":50,"support":0.4753747},{"time_hours":414,"approval_perbill":500000000,"support_perbill":4724236,"approval":50,"support":0.4724236},{"time_hours":415,"approval_perbill":500000000,"support_perbill":4694864,"approval":50,"support":0.4694864},{"time_hours":416,"approval_perbill":500000000,"support_perbill":4665630,"approval":50,"support":0.466563},{"time_hours":417,"approval_perbill":500000000,"support_perbill":4636532,"approval":50,"support":0.4636532},{"time_hours":418,"approval_perbill":500000000,"support_perbill":4607570,"approval":50,"support":0.460757},{"time_hours":419,"approval_perbill":500000000,"support_perbill":4578743,"approval":50,"support":0.4578743},{"time_hours":420,"approval_perbill":500000000,"support_perbill":4550050,"approval":50,"support":0.455005},{"time_hours":421,"approval_perbill":500000000,"support_perbill":4521490,"approval":50,"support":0.452149},{"time_hours":422,"approval_perbill":500000000,"support_perbill":4493062,"approval":50,"support":0.4493062},{"time_hours":423,"approval_perbill":500000000,"support_perbill":4464766,"approval":50,"support":0.4464766},{"time_hours":424,"approval_perbill":500000000,"support_perbill":4436599,"approval":50,"support":0.4436599},{"time_hours":425,"approval_perbill":500000000,"support_perbill":4408562,"approval":50,"support":0.4408562},{"time_hours":426,"approval_perbill":500000000,"support_perbill":4380654,"approval":50,"support":0.4380654},{"time_hours":427,"approval_perbill":500000000,"support_perbill":4352873,"approval":50,"support":0.4352873},{"time_hours":428,"approval_perbill":500000000,"support_perbill":4325218,"approval":50,"support":0.4325218},{"time_hours":429,"approval_perbill":500000000,"support_perbill":4297690,"approval":50,"support":0.429769},{"time_hours":430,"approval_perbill":500000000,"support_perbill":4270287,"approval":50,"support":0.4270287},{"time_hours":431,"approval_perbill":500000000,"support_perbill":4243007,"approval":50,"support":0.4243007},{"time_hours":432,"approval_perbill":500000000,"support_perbill":4215851,"approval":50,"support":0.4215851},{"time_hours":433,"approval_perbill":500000000,"support_perbill":4188818,"approval":50,"support":0.4188818},{"time_hours":434,"approval_perbill":500000000,"support_perbill":4161906,"approval":50,"support":0.4161906},{"time_hours":435,"approval_perbill":500000000,"support_perbill":4135115,"approval":50,"support":0.4135115},{"time_hours":436,"approval_perbill":500000000,"support_perbill":4108444,"approval":50,"support":0.4108444},{"time_hours":437,"approval_perbill":500000000,"support_perbill":4081892,"approval":50,"support":0.4081892},{"time_hours":438,"approval_perbill":500000000,"support_perbill":4055459,"approval":50,"support":0.4055459},{"time_hours":439,"approval_perbill":500000000,"support_perbill":4029143,"approval":50,"support":0.4029143},{"time_hours":440,"approval_perbill":500000000,"support_perbill":4002944,"approval":50,"support":0.4002944},{"time_hours":441,"approval_perbill":500000000,"support_perbill":3976862,"approval":50,"support":0.3976862},{"time_hours":442,"approval_perbill":500000000,"support_perbill":3950894,"approval":50,"support":0.3950894},{"time_hours":443,"approval_perbill":500000000,"support_perbill":3925041,"approval":50,"support":0.3925041},{"time_hours":444,"approval_perbill":500000000,"support_perbill":3899302,"approval":50,"support":0.3899302},{"time_hours":445,"approval_perbill":500000000,"support_perbill":3873676,"approval":50,"support":0.3873676},{"time_hours":446,"approval_perbill":500000000,"support_perbill":3848162,"approval":50,"support":0.3848162},{"time_hours":447,"approval_perbill":500000000,"support_perbill":3822760,"approval":50,"support":0.382276},{"time_hours":448,"approval_perbill":500000000,"support_perbill":3797468,"approval":50,"support":0.3797468},{"time_hours":449,"approval_perbill":500000000,"support_perbill":3772287,"approval":50,"support":0.3772287},{"time_hours":450,"approval_perbill":500000000,"support_perbill":3747215,"approval":50,"support":0.3747215},{"time_hours":451,"approval_perbill":500000000,"support_perbill":3722251,"approval":50,"support":0.3722251},{"time_hours":452,"approval_perbill":500000000,"support_perbill":3697396,"approval":50,"support":0.3697396},{"time_hours":453,"approval_perbill":500000000,"support_perbill":3672648,"approval":50,"support":0.3672648},{"time_hours":454,"approval_perbill":500000000,"support_perbill":3648006,"approval":50,"support":0.3648006},{"time_hours":455,"approval_perbill":500000000,"support_perbill":3623471,"approval":50,"support":0.3623471},{"time_hours":456,"approval_perbill":500000000,"support_perbill":3599040,"approval":50,"support":0.359904},{"time_hours":457,"approval_perbill":500000000,"support_perbill":3574714,"approval":50,"support":0.3574714},{"time_hours":458,"approval_perbill":500000000,"support_perbill":3550492,"approval":50,"support":0.3550492},{"time_hours":459,"approval_perbill":500000000,"support_perbill":3526373,"approval":50,"support":0.3526373},{"time_hours":460,"approval_perbill":500000000,"support_perbill":3502357,"approval":50,"support":0.3502357},{"time_hours":461,"approval_perbill":500000000,"support_perbill":3478442,"approval":50,"support":0.3478442},{"time_hours":462,"approval_perbill":500000000,"support_perbill":3454629,"approval":50,"support":0.3454629},{"time_hours":463,"approval_perbill":500000000,"support_perbill":3430916,"approval":50,"support":0.3430916},{"time_hours":464,"approval_perbill":500000000,"support_perbill":3407304,"approval":50,"support":0.3407304},{"time_hours":465,"approval_perbill":500000000,"support_perbill":3383790,"approval":50,"support":0.338379},{"time_hours":466,"approval_perbill":500000000,"support_perbill":3360376,"approval":50,"support":0.3360376},{"time_hours":467,"approval_perbill":500000000,"support_perbill":3337059,"approval":50,"support":0.3337059},{"time_hours":468,"approval_perbill":500000000,"support_perbill":3313840,"approval":50,"support":0.331384},{"time_hours":469,"approval_perbill":500000000,"support_perbill":3290718,"approval":50,"support":0.3290718},{"time_hours":470,"approval_perbill":500000000,"support_perbill":3267692,"approval":50,"support":0.3267692},{"time_hours":471,"approval_perbill":500000000,"support_perbill":3244761,"approval":50,"support":0.3244761},{"time_hours":472,"approval_perbill":500000000,"support_perbill":3221926,"approval":50,"support":0.3221926},{"time_hours":473,"approval_perbill":500000000,"support_perbill":3199185,"approval":50,"support":0.3199185},{"time_hours":474,"approval_perbill":500000000,"support_perbill":3176538,"approval":50,"support":0.3176538},{"time_hours":475,"approval_perbill":500000000,"support_perbill":3153985,"approval":50,"support":0.3153985},{"time_hours":476,"approval_perbill":500000000,"support_perbill":3131524,"approval":50,"support":0.3131524},{"time_hours":477,"approval_perbill":500000000,"support_perbill":3109155,"approval":50,"support":0.3109155},{"time_hours":478,"approval_perbill":500000000,"support_perbill":3086878,"approval":50,"support":0.3086878},{"time_hours":479,"approval_perbill":500000000,"support_perbill":3064692,"approval":50,"support":0.3064692},{"time_hours":480,"approval_perbill":500000000,"support_perbill":3042596,"approval":50,"support":0.3042596},{"time_hours":481,"approval_perbill":500000000,"support_perbill":3020590,"approval":50,"support":0.302059},{"time_hours":482,"approval_perbill":500000000,"support_perbill":2998674,"approval":50,"support":0.2998674},{"time_hours":483,"approval_perbill":500000000,"support_perbill":2976847,"approval":50,"support":0.2976847},{"time_hours":484,"approval_perbill":500000000,"support_perbill":2955107,"approval":50,"support":0.2955107},{"time_hours":485,"approval_perbill":500000000,"support_perbill":2933456,"approval":50,"support":0.2933456},{"time_hours":486,"approval_perbill":500000000,"support_perbill":2911892,"approval":50,"support":0.2911892},{"time_hours":487,"approval_perbill":500000000,"support_perbill":2890414,"approval":50,"support":0.2890414},{"time_hours":488,"approval_perbill":500000000,"support_perbill":2869023,"approval":50,"support":0.2869023},{"time_hours":489,"approval_perbill":500000000,"support_perbill":2847717,"approval":50,"support":0.2847717},{"time_hours":490,"approval_perbill":500000000,"support_perbill":2826496,"approval":50,"support":0.2826496},{"time_hours":491,"approval_perbill":500000000,"support_perbill":2805360,"approval":50,"support":0.280536},{"time_hours":492,"approval_perbill":500000000,"support_perbill":2784309,"approval":50,"support":0.2784309},{"time_hours":493,"approval_perbill":500000000,"support_perbill":2763341,"approval":50,"support":0.2763341},{"time_hours":494,"approval_perbill":500000000,"support_perbill":2742455,"approval":50,"support":0.2742455},{"time_hours":495,"approval_perbill":500000000,"support_perbill":2721653,"approval":50,"support":0.2721653},{"time_hours":496,"approval_perbill":500000000,"support_perbill":2700933,"approval":50,"support":0.2700933},{"time_hours":497,"approval_perbill":500000000,"support_perbill":2680294,"approval":50,"support":0.2680294},{"time_hours":498,"approval_perbill":500000000,"support_perbill":2659737,"approval":50,"support":0.2659737},{"time_hours":499,"approval_perbill":500000000,"support_perbill":2639260,"approval":50,"support":0.263926},{"time_hours":500,"approval_perbill":500000000,"support_perbill":2618864,"approval":50,"support":0.2618864},{"time_hours":501,"approval_perbill":500000000,"support_perbill":2598547,"approval":50,"support":0.2598547},{"time_hours":502,"approval_perbill":500000000,"support_perbill":2578310,"approval":50,"support":0.257831},{"time_hours":503,"approval_perbill":500000000,"support_perbill":2558151,"approval":50,"support":0.2558151},{"time_hours":504,"approval_perbill":500000000,"support_perbill":2538071,"approval":50,"support":0.2538071},{"time_hours":505,"approval_perbill":500000000,"support_perbill":2518069,"approval":50,"support":0.2518069},{"time_hours":506,"approval_perbill":500000000,"support_perbill":2498144,"approval":50,"support":0.2498144},{"time_hours":507,"approval_perbill":500000000,"support_perbill":2478296,"approval":50,"support":0.2478296},{"time_hours":508,"approval_perbill":500000000,"support_perbill":2458525,"approval":50,"support":0.2458525},{"time_hours":509,"approval_perbill":500000000,"support_perbill":2438830,"approval":50,"support":0.243883},{"time_hours":510,"approval_perbill":500000000,"support_perbill":2419210,"approval":50,"support":0.241921},{"time_hours":511,"approval_perbill":500000000,"support_perbill":2399666,"approval":50,"support":0.2399666},{"time_hours":512,"approval_perbill":500000000,"support_perbill":2380197,"approval":50,"support":0.2380197},{"time_hours":513,"approval_perbill":500000000,"support_perbill":2360802,"approval":50,"support":0.2360802},{"time_hours":514,"approval_perbill":500000000,"support_perbill":2341481,"approval":50,"support":0.2341481},{"time_hours":515,"approval_perbill":500000000,"support_perbill":2322233,"approval":50,"support":0.2322233},{"time_hours":516,"approval_perbill":500000000,"support_perbill":2303059,"approval":50,"support":0.2303059},{"time_hours":517,"approval_perbill":500000000,"support_perbill":2283957,"approval":50,"support":0.2283957},{"time_hours":518,"approval_perbill":500000000,"support_perbill":2264928,"approval":50,"support":0.2264928},{"time_hours":519,"approval_perbill":500000000,"support_perbill":2245970,"approval":50,"support":0.224597},{"time_hours":520,"approval_perbill":500000000,"support_perbill":2227084,"approval":50,"support":0.2227084},{"time_hours":521,"approval_perbill":500000000,"support_perbill":2208269,"approval":50,"support":0.2208269},{"time_hours":522,"approval_perbill":500000000,"support_perbill":2189525,"approval":50,"support":0.2189525},{"time_hours":523,"approval_perbill":500000000,"support_perbill":2170851,"approval":50,"support":0.2170851},{"time_hours":524,"approval_perbill":500000000,"support_perbill":2152247,"approval":50,"support":0.2152247},{"time_hours":525,"approval_perbill":500000000,"support_perbill":2133712,"approval":50,"support":0.2133712},{"time_hours":526,"approval_perbill":500000000,"support_perbill":2115247,"approval":50,"support":0.2115247},{"time_hours":527,"approval_perbill":500000000,"support_perbill":2096850,"approval":50,"support":0.209685},{"time_hours":528,"approval_perbill":500000000,"support_perbill":2078522,"approval":50,"support":0.2078522},{"time_hours":529,"approval_perbill":500000000,"support_perbill":2060261,"approval":50,"support":0.2060261},{"time_hours":530,"approval_perbill":500000000,"support_perbill":2042068,"approval":50,"support":0.2042068},{"time_hours":531,"approval_perbill":500000000,"support_perbill":2023943,"approval":50,"support":0.2023943},{"time_hours":532,"approval_perbill":500000000,"support_perbill":2005884,"approval":50,"support":0.2005884},{"time_hours":533,"approval_perbill":500000000,"support_perbill":1987891,"approval":50,"support":0.1987891},{"time_hours":534,"approval_perbill":500000000,"support_perbill":1969965,"approval":50,"support":0.1969965},{"time_hours":535,"approval_perbill":500000000,"support_perbill":1952104,"approval":50,"support":0.1952104},{"time_hours":536,"approval_perbill":500000000,"support_perbill":1934309,"approval":50,"support":0.1934309},{"time_hours":537,"approval_perbill":500000000,"support_perbill":1916579,"approval":50,"support":0.1916579},{"time_hours":538,"approval_perbill":500000000,"support_perbill":1898913,"approval":50,"support":0.1898913},{"time_hours":539,"approval_perbill":500000000,"support_perbill":1881312,"approval":50,"support":0.1881312},{"time_hours":540,"approval_perbill":500000000,"support_perbill":1863775,"approval":50,"support":0.1863775},{"time_hours":541,"approval_perbill":500000000,"support_perbill":1846301,"approval":50,"support":0.1846301},{"time_hours":542,"approval_perbill":500000000,"support_perbill":1828891,"approval":50,"support":0.1828891},{"time_hours":543,"approval_perbill":500000000,"support_perbill":1811543,"approval":50,"support":0.1811543},{"time_hours":544,"approval_perbill":500000000,"support_perbill":1794258,"approval":50,"support":0.1794258},{"time_hours":545,"approval_perbill":500000000,"support_perbill":1777036,"approval":50,"support":0.1777036},{"time_hours":546,"approval_perbill":500000000,"support_perbill":1759875,"approval":50,"support":0.1759875},{"time_hours":547,"approval_perbill":500000000,"support_perbill":1742775,"approval":50,"support":0.1742775},{"time_hours":548,"approval_perbill":500000000,"support_perbill":1725737,"approval":50,"support":0.1725737},{"time_hours":549,"approval_perbill":500000000,"support_perbill":1708760,"approval":50,"support":0.170876},{"time_hours":550,"approval_perbill":500000000,"support_perbill":1691844,"approval":50,"support":0.1691844},{"time_hours":551,"approval_perbill":500000000,"support_perbill":1674988,"approval":50,"support":0.1674988},{"time_hours":552,"approval_perbill":500000000,"support_perbill":1658191,"approval":50,"support":0.1658191},{"time_hours":553,"approval_perbill":500000000,"support_perbill":1641455,"approval":50,"support":0.1641455},{"time_hours":554,"approval_perbill":500000000,"support_perbill":1624777,"approval":50,"support":0.1624777},{"time_hours":555,"approval_perbill":500000000,"support_perbill":1608159,"approval":50,"support":0.1608159},{"time_hours":556,"approval_perbill":500000000,"support_perbill":1591599,"approval":50,"support":0.1591599},{"time_hours":557,"approval_perbill":500000000,"support_perbill":1575098,"approval":50,"support":0.1575098},{"time_hours":558,"approval_perbill":500000000,"support_perbill":1558654,"approval":50,"support":0.1558654},{"time_hours":559,"approval_perbill":500000000,"support_perbill":1542269,"approval":50,"support":0.1542269},{"time_hours":560,"approval_perbill":500000000,"support_perbill":1525941,"approval":50,"support":0.1525941},{"time_hours":561,"approval_perbill":500000000,"support_perbill":1509670,"approval":50,"support":0.150967},{"time_hours":562,"approval_perbill":500000000,"support_perbill":1493456,"approval":50,"support":0.1493456},{"time_hours":563,"approval_perbill":500000000,"support_perbill":1477298,"approval":50,"support":0.1477298},{"time_hours":564,"approval_perbill":500000000,"support_perbill":1461197,"approval":50,"support":0.1461197},{"time_hours":565,"approval_perbill":500000000,"support_perbill":1445152,"approval":50,"support":0.1445152},{"time_hours":566,"approval_perbill":500000000,"support_perbill":1429162,"approval":50,"support":0.1429162},{"time_hours":567,"approval_perbill":500000000,"support_perbill":1413228,"approval":50,"support":0.1413228},{"time_hours":568,"approval_perbill":500000000,"support_perbill":1397348,"approval":50,"support":0.1397348},{"time_hours":569,"approval_perbill":500000000,"support_perbill":1381524,"approval":50,"support":0.1381524},{"time_hours":570,"approval_perbill":500000000,"support_perbill":1365754,"approval":50,"support":0.1365754},{"time_hours":571,"approval_perbill":500000000,"support_perbill":1350039,"approval":50,"support":0.1350039},{"time_hours":572,"approval_perbill":500000000,"support_perbill":1334377,"approval":50,"support":0.1334377},{"time_hours":573,"approval_perbill":500000000,"support_perbill":1318769,"approval":50,"support":0.1318769},{"time_hours":574,"approval_perbill":500000000,"support_perbill":1303214,"approval":50,"support":0.1303214},{"time_hours":575,"approval_perbill":500000000,"support_perbill":1287713,"approval":50,"support":0.1287713},{"time_hours":576,"approval_perbill":500000000,"support_perbill":1272264,"approval":50,"support":0.1272264},{"time_hours":577,"approval_perbill":500000000,"support_perbill":1256869,"approval":50,"support":0.1256869},{"time_hours":578,"approval_perbill":500000000,"support_perbill":1241525,"approval":50,"support":0.1241525},{"time_hours":579,"approval_perbill":500000000,"support_perbill":1226233,"approval":50,"support":0.1226233},{"time_hours":580,"approval_perbill":500000000,"support_perbill":1210994,"approval":50,"support":0.1210994},{"time_hours":581,"approval_perbill":500000000,"support_perbill":1195805,"approval":50,"support":0.1195805},{"time_hours":582,"approval_perbill":500000000,"support_perbill":1180668,"approval":50,"support":0.1180668},{"time_hours":583,"approval_perbill":500000000,"support_perbill":1165582,"approval":50,"support":0.1165582},{"time_hours":584,"approval_perbill":500000000,"support_perbill":1150547,"approval":50,"support":0.1150547},{"time_hours":585,"approval_perbill":500000000,"support_perbill":1135563,"approval":50,"support":0.1135563},{"time_hours":586,"approval_perbill":500000000,"support_perbill":1120628,"approval":50,"support":0.1120628},{"time_hours":587,"approval_perbill":500000000,"support_perbill":1105744,"approval":50,"support":0.1105744},{"time_hours":588,"approval_perbill":500000000,"support_perbill":1090909,"approval":50,"support":0.1090909},{"time_hours":589,"approval_perbill":500000000,"support_perbill":1076124,"approval":50,"support":0.1076124},{"time_hours":590,"approval_perbill":500000000,"support_perbill":1061388,"approval":50,"support":0.1061388},{"time_hours":591,"approval_perbill":500000000,"support_perbill":1046701,"approval":50,"support":0.1046701},{"time_hours":592,"approval_perbill":500000000,"support_perbill":1032063,"approval":50,"support":0.1032063},{"time_hours":593,"approval_perbill":500000000,"support_perbill":1017473,"approval":50,"support":0.1017473},{"time_hours":594,"approval_perbill":500000000,"support_perbill":1002932,"approval":50,"support":0.1002932},{"time_hours":595,"approval_perbill":500000000,"support_perbill":988438,"approval":50,"support":0.0988438},{"time_hours":596,"approval_perbill":500000000,"support_perbill":973993,"approval":50,"support":0.0973993},{"time_hours":597,"approval_perbill":500000000,"support_perbill":959595,"approval":50,"support":0.0959595},{"time_hours":598,"approval_perbill":500000000,"support_perbill":945244,"approval":50,"support":0.0945244},{"time_hours":599,"approval_perbill":500000000,"support_perbill":930940,"approval":50,"support":0.093094},{"time_hours":600,"approval_perbill":500000000,"support_perbill":916684,"approval":50,"support":0.0916684},{"time_hours":601,"approval_perbill":500000000,"support_perbill":902473,"approval":50,"support":0.0902473},{"time_hours":602,"approval_perbill":500000000,"support_perbill":888310,"approval":50,"support":0.088831},{"time_hours":603,"approval_perbill":500000000,"support_perbill":874192,"approval":50,"support":0.0874192},{"time_hours":604,"approval_perbill":500000000,"support_perbill":860121,"approval":50,"support":0.0860121},{"time_hours":605,"approval_perbill":500000000,"support_perbill":846095,"approval":50,"support":0.0846095},{"time_hours":606,"approval_perbill":500000000,"support_perbill":832114,"approval":50,"support":0.0832114},{"time_hours":607,"approval_perbill":500000000,"support_perbill":818179,"approval":50,"support":0.0818179},{"time_hours":608,"approval_perbill":500000000,"support_perbill":804289,"approval":50,"support":0.0804289},{"time_hours":609,"approval_perbill":500000000,"support_perbill":790444,"approval":50,"support":0.0790444},{"time_hours":610,"approval_perbill":500000000,"support_perbill":776644,"approval":50,"support":0.0776644},{"time_hours":611,"approval_perbill":500000000,"support_perbill":762888,"approval":50,"support":0.0762888},{"time_hours":612,"approval_perbill":500000000,"support_perbill":749176,"approval":50,"support":0.0749176},{"time_hours":613,"approval_perbill":500000000,"support_perbill":735508,"approval":50,"support":0.0735508},{"time_hours":614,"approval_perbill":500000000,"support_perbill":721884,"approval":50,"support":0.0721884},{"time_hours":615,"approval_perbill":500000000,"support_perbill":708303,"approval":50,"support":0.0708303},{"time_hours":616,"approval_perbill":500000000,"support_perbill":694766,"approval":50,"support":0.0694766},{"time_hours":617,"approval_perbill":500000000,"support_perbill":681272,"approval":50,"support":0.0681272},{"time_hours":618,"approval_perbill":500000000,"support_perbill":667821,"approval":50,"support":0.0667821},{"time_hours":619,"approval_perbill":500000000,"support_perbill":654412,"approval":50,"support":0.0654412},{"time_hours":620,"approval_perbill":500000000,"support_perbill":641047,"approval":50,"support":0.0641047},{"time_hours":621,"approval_perbill":500000000,"support_perbill":627723,"approval":50,"support":0.0627723},{"time_hours":622,"approval_perbill":500000000,"support_perbill":614442,"approval":50,"support":0.0614442},{"time_hours":623,"approval_perbill":500000000,"support_perbill":601202,"approval":50,"support":0.0601202},{"time_hours":624,"approval_perbill":500000000,"support_perbill":588005,"approval":50,"support":0.0588005},{"time_hours":625,"approval_perbill":500000000,"support_perbill":574848,"approval":50,"support":0.0574848},{"time_hours":626,"approval_perbill":500000000,"support_perbill":561734,"approval":50,"support":0.0561734},{"time_hours":627,"approval_perbill":500000000,"support_perbill":548660,"approval":50,"support":0.054866},{"time_hours":628,"approval_perbill":500000000,"support_perbill":535627,"approval":50,"support":0.0535627},{"time_hours":629,"approval_perbill":500000000,"support_perbill":522635,"approval":50,"support":0.0522635},{"time_hours":630,"approval_perbill":500000000,"support_perbill":509684,"approval":50,"support":0.0509684},{"time_hours":631,"approval_perbill":500000000,"support_perbill":496773,"approval":50,"support":0.0496773},{"time_hours":632,"approval_perbill":500000000,"support_perbill":483902,"approval":50,"support":0.0483902},{"time_hours":633,"approval_perbill":500000000,"support_perbill":471071,"approval":50,"support":0.0471071},{"time_hours":634,"approval_perbill":500000000,"support_perbill":458280,"approval":50,"support":0.045828},{"time_hours":635,"approval_perbill":500000000,"support_perbill":445529,"approval":50,"support":0.0445529},{"time_hours":636,"approval_perbill":500000000,"support_perbill":432817,"approval":50,"support":0.0432817},{"time_hours":637,"approval_perbill":500000000,"support_perbill":420144,"approval":50,"support":0.0420144},{"time_hours":638,"approval_perbill":500000000,"support_perbill":407511,"approval":50,"support":0.0407511},{"time_hours":639,"approval_perbill":500000000,"support_perbill":394916,"approval":50,"support":0.0394916},{"time_hours":640,"approval_perbill":500000000,"support_perbill":382360,"approval":50,"support":0.038236},{"time_hours":641,"approval_perbill":500000000,"support_perbill":369843,"approval":50,"support":0.0369843},{"time_hours":642,"approval_perbill":500000000,"support_perbill":357364,"approval":50,"support":0.0357364},{"time_hours":643,"approval_perbill":500000000,"support_perbill":344923,"approval":50,"support":0.0344923},{"time_hours":644,"approval_perbill":500000000,"support_perbill":332520,"approval":50,"support":0.033252},{"time_hours":645,"approval_perbill":500000000,"support_perbill":320155,"approval":50,"support":0.0320155},{"time_hours":646,"approval_perbill":500000000,"support_perbill":307828,"approval":50,"support":0.0307828},{"time_hours":647,"approval_perbill":500000000,"support_perbill":295538,"approval":50,"support":0.0295538},{"time_hours":648,"approval_perbill":500000000,"support_perbill":283286,"approval":50,"support":0.0283286},{"time_hours":649,"approval_perbill":500000000,"support_perbill":271071,"approval":50,"support":0.0271071},{"time_hours":650,"approval_perbill":500000000,"support_perbill":258892,"approval":50,"support":0.0258892},{"time_hours":651,"approval_perbill":500000000,"support_perbill":246751,"approval":50,"support":0.0246751},{"time_hours":652,"approval_perbill":500000000,"support_perbill":234646,"approval":50,"support":0.0234646},{"time_hours":653,"approval_perbill":500000000,"support_perbill":222578,"approval":50,"support":0.0222578},{"time_hours":654,"approval_perbill":500000000,"support_perbill":210546,"approval":50,"support":0.0210546},{"time_hours":655,"approval_perbill":500000000,"support_perbill":198550,"approval":50,"support":0.019855},{"time_hours":656,"approval_perbill":500000000,"support_perbill":186590,"approval":50,"support":0.018659},{"time_hours":657,"approval_perbill":500000000,"support_perbill":174666,"approval":50,"support":0.0174666},{"time_hours":658,"approval_perbill":500000000,"support_perbill":162778,"approval":50,"support":0.0162778},{"time_hours":659,"approval_perbill":500000000,"support_perbill":150925,"approval":50,"support":0.0150925},{"time_hours":660,"approval_perbill":500000000,"support_perbill":139108,"approval":50,"support":0.0139108},{"time_hours":661,"approval_perbill":500000000,"support_perbill":127326,"approval":50,"support":0.0127326},{"time_hours":662,"approval_perbill":500000000,"support_perbill":115578,"approval":50,"support":0.0115578},{"time_hours":663,"approval_perbill":500000000,"support_perbill":103866,"approval":50,"support":0.0103866},{"time_hours":664,"approval_perbill":500000000,"support_perbill":92188,"approval":50,"support":0.0092188},{"time_hours":665,"approval_perbill":500000000,"support_perbill":80545,"approval":50,"support":0.0080545},{"time_hours":666,"approval_perbill":500000000,"support_perbill":68937,"approval":50,"support":0.0068937},{"time_hours":667,"approval_perbill":500000000,"support_perbill":57363,"approval":50,"support":0.0057363},{"time_hours":668,"approval_perbill":500000000,"support_perbill":45822,"approval":50,"support":0.0045822},{"time_hours":669,"approval_perbill":500000000,"support_perbill":34316,"approval":50,"support":0.0034316},{"time_hours":670,"approval_perbill":500000000,"support_perbill":22844,"approval":50,"support":0.0022844},{"time_hours":671,"approval_perbill":500000000,"support_perbill":11405,"approval":50,"support":0.0011405},{"time_hours":672,"approval_perbill":500000000,"support_perbill":0,"approval":50,"support":0}]')},92085:p=>{"use strict";p.exports=JSON.parse('[{"time_hours":0,"approval_perbill":1000000000,"support_perbill":500000000,"approval":100,"support":50,"days":0,"dot_needed":"567,056,300"},{"time_hours":1,"approval_perbill":997037038,"support_perbill":499255953,"approval":99.7037038,"support":49.9255953,"days":1,"dot_needed":"566,212,467"},{"time_hours":2,"approval_perbill":994100296,"support_perbill":498511905,"approval":99.4100296,"support":49.8511905,"days":1,"dot_needed":"565,368,633"},{"time_hours":3,"approval_perbill":991189429,"support_perbill":497767858,"approval":99.1189429,"support":49.7767858,"days":1,"dot_needed":"564,524,800"},{"time_hours":4,"approval_perbill":988304096,"support_perbill":497023810,"approval":98.8304096,"support":49.702381,"days":1,"dot_needed":"563,680,965"},{"time_hours":5,"approval_perbill":985443960,"support_perbill":496279762,"approval":98.544396,"support":49.6279762,"days":1,"dot_needed":"562,837,131"},{"time_hours":6,"approval_perbill":982608697,"support_perbill":495535715,"approval":98.2608697,"support":49.5535715,"days":1,"dot_needed":"561,993,298"},{"time_hours":7,"approval_perbill":979797981,"support_perbill":494791667,"approval":97.9797981,"support":49.4791667,"days":1,"dot_needed":"561,149,464"},{"time_hours":8,"approval_perbill":977011496,"support_perbill":494047620,"approval":97.7011496,"support":49.404762,"days":1,"dot_needed":"560,305,631"},{"time_hours":9,"approval_perbill":974248928,"support_perbill":493303572,"approval":97.4248928,"support":49.3303572,"days":1,"dot_needed":"559,461,797"},{"time_hours":10,"approval_perbill":971509972,"support_perbill":492559524,"approval":97.1509972,"support":49.2559524,"days":1,"dot_needed":"558,617,962"},{"time_hours":11,"approval_perbill":968794328,"support_perbill":491815477,"approval":96.8794328,"support":49.1815477,"days":1,"dot_needed":"557,774,129"},{"time_hours":12,"approval_perbill":966101697,"support_perbill":491071429,"approval":96.6101697,"support":49.1071429,"days":1,"dot_needed":"556,930,295"},{"time_hours":13,"approval_perbill":963431787,"support_perbill":490327381,"approval":96.3431787,"support":49.0327381,"days":1,"dot_needed":"556,086,461"},{"time_hours":14,"approval_perbill":960784315,"support_perbill":489583334,"approval":96.0784315,"support":48.9583334,"days":1,"dot_needed":"555,242,628"},{"time_hours":15,"approval_perbill":958158997,"support_perbill":488839286,"approval":95.8158997,"support":48.8839286,"days":1,"dot_needed":"554,398,794"},{"time_hours":16,"approval_perbill":955555557,"support_perbill":488095239,"approval":95.5555557,"support":48.8095239,"days":1,"dot_needed":"553,554,961"},{"time_hours":17,"approval_perbill":952973721,"support_perbill":487351191,"approval":95.2973721,"support":48.7351191,"days":1,"dot_needed":"552,711,126"},{"time_hours":18,"approval_perbill":950413224,"support_perbill":486607143,"approval":95.0413224,"support":48.6607143,"days":1,"dot_needed":"551,867,292"},{"time_hours":19,"approval_perbill":947873801,"support_perbill":485863096,"approval":94.7873801,"support":48.5863096,"days":1,"dot_needed":"551,023,459"},{"time_hours":20,"approval_perbill":945355193,"support_perbill":485119048,"approval":94.5355193,"support":48.5119048,"days":1,"dot_needed":"550,179,625"},{"time_hours":21,"approval_perbill":942857143,"support_perbill":484375000,"approval":94.2857143,"support":48.4375,"days":1,"dot_needed":"549,335,791"},{"time_hours":22,"approval_perbill":940379404,"support_perbill":483630953,"approval":94.0379404,"support":48.3630953,"days":1,"dot_needed":"548,491,958"},{"time_hours":23,"approval_perbill":937921728,"support_perbill":482886905,"approval":93.7921728,"support":48.2886905,"days":1,"dot_needed":"547,648,123"},{"time_hours":24,"approval_perbill":935483872,"support_perbill":482142858,"approval":93.5483872,"support":48.2142858,"days":1,"dot_needed":"546,804,290"},{"time_hours":25,"approval_perbill":933065598,"support_perbill":481398810,"approval":93.3065598,"support":48.139881,"days":2,"dot_needed":"545,960,456"},{"time_hours":26,"approval_perbill":930666667,"support_perbill":480654762,"approval":93.0666667,"support":48.0654762,"days":2,"dot_needed":"545,116,622"},{"time_hours":27,"approval_perbill":928286854,"support_perbill":479910715,"approval":92.8286854,"support":47.9910715,"days":2,"dot_needed":"544,272,789"},{"time_hours":28,"approval_perbill":925925927,"support_perbill":479166667,"approval":92.5925927,"support":47.9166667,"days":2,"dot_needed":"543,428,955"},{"time_hours":29,"approval_perbill":923583664,"support_perbill":478422620,"approval":92.3583664,"support":47.842262,"days":2,"dot_needed":"542,585,121"},{"time_hours":30,"approval_perbill":921259843,"support_perbill":477678572,"approval":92.1259843,"support":47.7678572,"days":2,"dot_needed":"541,741,287"},{"time_hours":31,"approval_perbill":918954249,"support_perbill":476934524,"approval":91.8954249,"support":47.6934524,"days":2,"dot_needed":"540,897,453"},{"time_hours":32,"approval_perbill":916666668,"support_perbill":476190477,"approval":91.6666668,"support":47.6190477,"days":2,"dot_needed":"540,053,620"},{"time_hours":33,"approval_perbill":914396889,"support_perbill":475446429,"approval":91.4396889,"support":47.5446429,"days":2,"dot_needed":"539,209,786"},{"time_hours":34,"approval_perbill":912144703,"support_perbill":474702381,"approval":91.2144703,"support":47.4702381,"days":2,"dot_needed":"538,365,952"},{"time_hours":35,"approval_perbill":909909911,"support_perbill":473958334,"approval":90.9909911,"support":47.3958334,"days":2,"dot_needed":"537,522,118"},{"time_hours":36,"approval_perbill":907692309,"support_perbill":473214286,"approval":90.7692309,"support":47.3214286,"days":2,"dot_needed":"536,678,284"},{"time_hours":37,"approval_perbill":905491700,"support_perbill":472470239,"approval":90.54917,"support":47.2470239,"days":2,"dot_needed":"535,834,451"},{"time_hours":38,"approval_perbill":903307888,"support_perbill":471726191,"approval":90.3307888,"support":47.1726191,"days":2,"dot_needed":"534,990,617"},{"time_hours":39,"approval_perbill":901140685,"support_perbill":470982143,"approval":90.1140685,"support":47.0982143,"days":2,"dot_needed":"534,146,783"},{"time_hours":40,"approval_perbill":898989900,"support_perbill":470238096,"approval":89.89899,"support":47.0238096,"days":2,"dot_needed":"533,302,950"},{"time_hours":41,"approval_perbill":896855347,"support_perbill":469494048,"approval":89.6855347,"support":46.9494048,"days":2,"dot_needed":"532,459,115"},{"time_hours":42,"approval_perbill":894736842,"support_perbill":468750000,"approval":89.4736842,"support":46.875,"days":2,"dot_needed":"531,615,281"},{"time_hours":43,"approval_perbill":892634208,"support_perbill":468005953,"approval":89.2634208,"support":46.8005953,"days":2,"dot_needed":"530,771,448"},{"time_hours":44,"approval_perbill":890547265,"support_perbill":467261905,"approval":89.0547265,"support":46.7261905,"days":2,"dot_needed":"529,927,614"},{"time_hours":45,"approval_perbill":888475838,"support_perbill":466517858,"approval":88.8475838,"support":46.6517858,"days":2,"dot_needed":"529,083,781"},{"time_hours":46,"approval_perbill":886419755,"support_perbill":465773810,"approval":88.6419755,"support":46.577381,"days":2,"dot_needed":"528,239,947"},{"time_hours":47,"approval_perbill":884378844,"support_perbill":465029762,"approval":88.4378844,"support":46.5029762,"days":2,"dot_needed":"527,396,112"},{"time_hours":48,"approval_perbill":882352942,"support_perbill":464285715,"approval":88.2352942,"support":46.4285715,"days":2,"dot_needed":"526,552,279"},{"time_hours":49,"approval_perbill":880341882,"support_perbill":463541667,"approval":88.0341882,"support":46.3541667,"days":3,"dot_needed":"525,708,445"},{"time_hours":50,"approval_perbill":878345500,"support_perbill":462797620,"approval":87.83455,"support":46.279762,"days":3,"dot_needed":"524,864,612"},{"time_hours":51,"approval_perbill":876363637,"support_perbill":462053572,"approval":87.6363637,"support":46.2053572,"days":3,"dot_needed":"524,020,778"},{"time_hours":52,"approval_perbill":874396136,"support_perbill":461309524,"approval":87.4396136,"support":46.1309524,"days":3,"dot_needed":"523,176,944"},{"time_hours":53,"approval_perbill":872442841,"support_perbill":460565477,"approval":87.2442841,"support":46.0565477,"days":3,"dot_needed":"522,333,111"},{"time_hours":54,"approval_perbill":870503599,"support_perbill":459821429,"approval":87.0503599,"support":45.9821429,"days":3,"dot_needed":"521,489,276"},{"time_hours":55,"approval_perbill":868578256,"support_perbill":459077381,"approval":86.8578256,"support":45.9077381,"days":3,"dot_needed":"520,645,442"},{"time_hours":56,"approval_perbill":866666667,"support_perbill":458333334,"approval":86.6666667,"support":45.8333334,"days":3,"dot_needed":"519,801,609"},{"time_hours":57,"approval_perbill":864768684,"support_perbill":457589286,"approval":86.4768684,"support":45.7589286,"days":3,"dot_needed":"518,957,775"},{"time_hours":58,"approval_perbill":862884162,"support_perbill":456845239,"approval":86.2884162,"support":45.6845239,"days":3,"dot_needed":"518,113,942"},{"time_hours":59,"approval_perbill":861012957,"support_perbill":456101191,"approval":86.1012957,"support":45.6101191,"days":3,"dot_needed":"517,270,108"},{"time_hours":60,"approval_perbill":859154930,"support_perbill":455357143,"approval":85.915493,"support":45.5357143,"days":3,"dot_needed":"516,426,273"},{"time_hours":61,"approval_perbill":857309942,"support_perbill":454613096,"approval":85.7309942,"support":45.4613096,"days":3,"dot_needed":"515,582,440"},{"time_hours":62,"approval_perbill":855477857,"support_perbill":453869048,"approval":85.5477857,"support":45.3869048,"days":3,"dot_needed":"514,738,606"},{"time_hours":63,"approval_perbill":853658537,"support_perbill":453125000,"approval":85.3658537,"support":45.3125,"days":3,"dot_needed":"513,894,772"},{"time_hours":64,"approval_perbill":851851852,"support_perbill":452380953,"approval":85.1851852,"support":45.2380953,"days":3,"dot_needed":"513,050,939"},{"time_hours":65,"approval_perbill":850057671,"support_perbill":451636905,"approval":85.0057671,"support":45.1636905,"days":3,"dot_needed":"512,207,105"},{"time_hours":66,"approval_perbill":848275863,"support_perbill":450892858,"approval":84.8275863,"support":45.0892858,"days":3,"dot_needed":"511,363,272"},{"time_hours":67,"approval_perbill":846506302,"support_perbill":450148810,"approval":84.6506302,"support":45.014881,"days":3,"dot_needed":"510,519,437"},{"time_hours":68,"approval_perbill":844748859,"support_perbill":449404762,"approval":84.4748859,"support":44.9404762,"days":3,"dot_needed":"509,675,603"},{"time_hours":69,"approval_perbill":843003414,"support_perbill":448660715,"approval":84.3003414,"support":44.8660715,"days":3,"dot_needed":"508,831,770"},{"time_hours":70,"approval_perbill":841269842,"support_perbill":447916667,"approval":84.1269842,"support":44.7916667,"days":3,"dot_needed":"507,987,936"},{"time_hours":71,"approval_perbill":839548024,"support_perbill":447172620,"approval":83.9548024,"support":44.717262,"days":3,"dot_needed":"507,144,103"},{"time_hours":72,"approval_perbill":837837838,"support_perbill":446428572,"approval":83.7837838,"support":44.6428572,"days":3,"dot_needed":"506,300,269"},{"time_hours":73,"approval_perbill":836139170,"support_perbill":445684524,"approval":83.613917,"support":44.5684524,"days":4,"dot_needed":"505,456,434"},{"time_hours":74,"approval_perbill":834451903,"support_perbill":444940477,"approval":83.4451903,"support":44.4940477,"days":4,"dot_needed":"504,612,601"},{"time_hours":75,"approval_perbill":832775921,"support_perbill":444196429,"approval":83.2775921,"support":44.4196429,"days":4,"dot_needed":"503,768,767"},{"time_hours":76,"approval_perbill":831111112,"support_perbill":443452381,"approval":83.1111112,"support":44.3452381,"days":4,"dot_needed":"502,924,933"},{"time_hours":77,"approval_perbill":829457365,"support_perbill":442708334,"approval":82.9457365,"support":44.2708334,"days":4,"dot_needed":"502,081,100"},{"time_hours":78,"approval_perbill":827814570,"support_perbill":441964286,"approval":82.781457,"support":44.1964286,"days":4,"dot_needed":"501,237,266"},{"time_hours":79,"approval_perbill":826182619,"support_perbill":441220239,"approval":82.6182619,"support":44.1220239,"days":4,"dot_needed":"500,393,432"},{"time_hours":80,"approval_perbill":824561404,"support_perbill":440476191,"approval":82.4561404,"support":44.0476191,"days":4,"dot_needed":"499,549,598"},{"time_hours":81,"approval_perbill":822950820,"support_perbill":439732143,"approval":82.295082,"support":43.9732143,"days":4,"dot_needed":"498,705,764"},{"time_hours":82,"approval_perbill":821350763,"support_perbill":438988096,"approval":82.1350763,"support":43.8988096,"days":4,"dot_needed":"497,861,931"},{"time_hours":83,"approval_perbill":819761130,"support_perbill":438244048,"approval":81.976113,"support":43.8244048,"days":4,"dot_needed":"497,018,097"},{"time_hours":84,"approval_perbill":818181818,"support_perbill":437500000,"approval":81.8181818,"support":43.75,"days":4,"dot_needed":"496,174,263"},{"time_hours":85,"approval_perbill":816612730,"support_perbill":436755953,"approval":81.661273,"support":43.6755953,"days":4,"dot_needed":"495,330,429"},{"time_hours":86,"approval_perbill":815053764,"support_perbill":436011905,"approval":81.5053764,"support":43.6011905,"days":4,"dot_needed":"494,486,595"},{"time_hours":87,"approval_perbill":813504824,"support_perbill":435267858,"approval":81.3504824,"support":43.5267858,"days":4,"dot_needed":"493,642,762"},{"time_hours":88,"approval_perbill":811965813,"support_perbill":434523810,"approval":81.1965813,"support":43.452381,"days":4,"dot_needed":"492,798,928"},{"time_hours":89,"approval_perbill":810436635,"support_perbill":433779762,"approval":81.0436635,"support":43.3779762,"days":4,"dot_needed":"491,955,094"},{"time_hours":90,"approval_perbill":808917198,"support_perbill":433035715,"approval":80.8917198,"support":43.3035715,"days":4,"dot_needed":"491,111,261"},{"time_hours":91,"approval_perbill":807407408,"support_perbill":432291667,"approval":80.7407408,"support":43.2291667,"days":4,"dot_needed":"490,267,426"},{"time_hours":92,"approval_perbill":805907174,"support_perbill":431547620,"approval":80.5907174,"support":43.154762,"days":4,"dot_needed":"489,423,593"},{"time_hours":93,"approval_perbill":804416404,"support_perbill":430803572,"approval":80.4416404,"support":43.0803572,"days":4,"dot_needed":"488,579,759"},{"time_hours":94,"approval_perbill":802935011,"support_perbill":430059524,"approval":80.2935011,"support":43.0059524,"days":4,"dot_needed":"487,735,925"},{"time_hours":95,"approval_perbill":801462906,"support_perbill":429315477,"approval":80.1462906,"support":42.9315477,"days":4,"dot_needed":"486,892,092"},{"time_hours":96,"approval_perbill":800000001,"support_perbill":428571429,"approval":80.0000001,"support":42.8571429,"days":4,"dot_needed":"486,048,258"},{"time_hours":97,"approval_perbill":798546210,"support_perbill":427827381,"approval":79.854621,"support":42.7827381,"days":5,"dot_needed":"485,204,423"},{"time_hours":98,"approval_perbill":797101450,"support_perbill":427083334,"approval":79.710145,"support":42.7083334,"days":5,"dot_needed":"484,360,590"},{"time_hours":99,"approval_perbill":795665635,"support_perbill":426339286,"approval":79.5665635,"support":42.6339286,"days":5,"dot_needed":"483,516,756"},{"time_hours":100,"approval_perbill":794238684,"support_perbill":425595239,"approval":79.4238684,"support":42.5595239,"days":5,"dot_needed":"482,672,923"},{"time_hours":101,"approval_perbill":792820513,"support_perbill":424851191,"approval":79.2820513,"support":42.4851191,"days":5,"dot_needed":"481,829,089"},{"time_hours":102,"approval_perbill":791411043,"support_perbill":424107143,"approval":79.1411043,"support":42.4107143,"days":5,"dot_needed":"480,985,255"},{"time_hours":103,"approval_perbill":790010194,"support_perbill":423363096,"approval":79.0010194,"support":42.3363096,"days":5,"dot_needed":"480,141,422"},{"time_hours":104,"approval_perbill":788617887,"support_perbill":422619048,"approval":78.8617887,"support":42.2619048,"days":5,"dot_needed":"479,297,587"},{"time_hours":105,"approval_perbill":787234043,"support_perbill":421875000,"approval":78.7234043,"support":42.1875,"days":5,"dot_needed":"478,453,753"},{"time_hours":106,"approval_perbill":785858586,"support_perbill":421130953,"approval":78.5858586,"support":42.1130953,"days":5,"dot_needed":"477,609,920"},{"time_hours":107,"approval_perbill":784491441,"support_perbill":420386905,"approval":78.4491441,"support":42.0386905,"days":5,"dot_needed":"476,766,086"},{"time_hours":108,"approval_perbill":783132531,"support_perbill":419642858,"approval":78.3132531,"support":41.9642858,"days":5,"dot_needed":"475,922,253"},{"time_hours":109,"approval_perbill":781781783,"support_perbill":418898810,"approval":78.1781783,"support":41.889881,"days":5,"dot_needed":"475,078,419"},{"time_hours":110,"approval_perbill":780439122,"support_perbill":418154762,"approval":78.0439122,"support":41.8154762,"days":5,"dot_needed":"474,234,584"},{"time_hours":111,"approval_perbill":779104478,"support_perbill":417410715,"approval":77.9104478,"support":41.7410715,"days":5,"dot_needed":"473,390,751"},{"time_hours":112,"approval_perbill":777777779,"support_perbill":416666667,"approval":77.7777779,"support":41.6666667,"days":5,"dot_needed":"472,546,917"},{"time_hours":113,"approval_perbill":776458953,"support_perbill":415922620,"approval":77.6458953,"support":41.592262,"days":5,"dot_needed":"471,703,084"},{"time_hours":114,"approval_perbill":775147929,"support_perbill":415178572,"approval":77.5147929,"support":41.5178572,"days":5,"dot_needed":"470,859,250"},{"time_hours":115,"approval_perbill":773844642,"support_perbill":414434524,"approval":77.3844642,"support":41.4434524,"days":5,"dot_needed":"470,015,416"},{"time_hours":116,"approval_perbill":772549020,"support_perbill":413690477,"approval":77.254902,"support":41.3690477,"days":5,"dot_needed":"469,171,582"},{"time_hours":117,"approval_perbill":771260998,"support_perbill":412946429,"approval":77.1260998,"support":41.2946429,"days":5,"dot_needed":"468,327,748"},{"time_hours":118,"approval_perbill":769980507,"support_perbill":412202381,"approval":76.9980507,"support":41.2202381,"days":5,"dot_needed":"467,483,914"},{"time_hours":119,"approval_perbill":768707484,"support_perbill":411458334,"approval":76.8707484,"support":41.1458334,"days":5,"dot_needed":"466,640,081"},{"time_hours":120,"approval_perbill":767441861,"support_perbill":410714286,"approval":76.7441861,"support":41.0714286,"days":5,"dot_needed":"465,796,247"},{"time_hours":121,"approval_perbill":766183576,"support_perbill":409970239,"approval":76.6183576,"support":40.9970239,"days":6,"dot_needed":"464,952,414"},{"time_hours":122,"approval_perbill":764932563,"support_perbill":409226191,"approval":76.4932563,"support":40.9226191,"days":6,"dot_needed":"464,108,579"},{"time_hours":123,"approval_perbill":763688761,"support_perbill":408482143,"approval":76.3688761,"support":40.8482143,"days":6,"dot_needed":"463,264,745"},{"time_hours":124,"approval_perbill":762452108,"support_perbill":407738096,"approval":76.2452108,"support":40.7738096,"days":6,"dot_needed":"462,420,912"},{"time_hours":125,"approval_perbill":761222541,"support_perbill":406994048,"approval":76.1222541,"support":40.6994048,"days":6,"dot_needed":"461,577,078"},{"time_hours":126,"approval_perbill":760000000,"support_perbill":406250000,"approval":76,"support":40.625,"days":6,"dot_needed":"460,733,244"},{"time_hours":127,"approval_perbill":758784426,"support_perbill":405505953,"approval":75.8784426,"support":40.5505953,"days":6,"dot_needed":"459,889,411"},{"time_hours":128,"approval_perbill":757575758,"support_perbill":404761905,"approval":75.7575758,"support":40.4761905,"days":6,"dot_needed":"459,045,576"},{"time_hours":129,"approval_perbill":756373938,"support_perbill":404017858,"approval":75.6373938,"support":40.4017858,"days":6,"dot_needed":"458,201,743"},{"time_hours":130,"approval_perbill":755178909,"support_perbill":403273810,"approval":75.5178909,"support":40.327381,"days":6,"dot_needed":"457,357,909"},{"time_hours":131,"approval_perbill":753990611,"support_perbill":402529762,"approval":75.3990611,"support":40.2529762,"days":6,"dot_needed":"456,514,075"},{"time_hours":132,"approval_perbill":752808989,"support_perbill":401785715,"approval":75.2808989,"support":40.1785715,"days":6,"dot_needed":"455,670,242"},{"time_hours":133,"approval_perbill":751633988,"support_perbill":401041667,"approval":75.1633988,"support":40.1041667,"days":6,"dot_needed":"454,826,408"},{"time_hours":134,"approval_perbill":750465550,"support_perbill":400297620,"approval":75.046555,"support":40.029762,"days":6,"dot_needed":"453,982,575"},{"time_hours":135,"approval_perbill":749303621,"support_perbill":399553572,"approval":74.9303621,"support":39.9553572,"days":6,"dot_needed":"453,138,740"},{"time_hours":136,"approval_perbill":748148149,"support_perbill":398809524,"approval":74.8148149,"support":39.8809524,"days":6,"dot_needed":"452,294,906"},{"time_hours":137,"approval_perbill":746999077,"support_perbill":398065477,"approval":74.6999077,"support":39.8065477,"days":6,"dot_needed":"451,451,073"},{"time_hours":138,"approval_perbill":745856354,"support_perbill":397321429,"approval":74.5856354,"support":39.7321429,"days":6,"dot_needed":"450,607,239"},{"time_hours":139,"approval_perbill":744719927,"support_perbill":396577381,"approval":74.4719927,"support":39.6577381,"days":6,"dot_needed":"449,763,405"},{"time_hours":140,"approval_perbill":743589744,"support_perbill":395833334,"approval":74.3589744,"support":39.5833334,"days":6,"dot_needed":"448,919,572"},{"time_hours":141,"approval_perbill":742465754,"support_perbill":395089286,"approval":74.2465754,"support":39.5089286,"days":6,"dot_needed":"448,075,737"},{"time_hours":142,"approval_perbill":741347906,"support_perbill":394345239,"approval":74.1347906,"support":39.4345239,"days":6,"dot_needed":"447,231,904"},{"time_hours":143,"approval_perbill":740236149,"support_perbill":393601191,"approval":74.0236149,"support":39.3601191,"days":6,"dot_needed":"446,388,070"},{"time_hours":144,"approval_perbill":739130435,"support_perbill":392857143,"approval":73.9130435,"support":39.2857143,"days":6,"dot_needed":"445,544,236"},{"time_hours":145,"approval_perbill":738030714,"support_perbill":392113096,"approval":73.8030714,"support":39.2113096,"days":7,"dot_needed":"444,700,403"},{"time_hours":146,"approval_perbill":736936938,"support_perbill":391369048,"approval":73.6936938,"support":39.1369048,"days":7,"dot_needed":"443,856,569"},{"time_hours":147,"approval_perbill":735849057,"support_perbill":390625000,"approval":73.5849057,"support":39.0625,"days":7,"dot_needed":"443,012,734"},{"time_hours":148,"approval_perbill":734767025,"support_perbill":389880953,"approval":73.4767025,"support":38.9880953,"days":7,"dot_needed":"442,168,901"},{"time_hours":149,"approval_perbill":733690796,"support_perbill":389136905,"approval":73.3690796,"support":38.9136905,"days":7,"dot_needed":"441,325,067"},{"time_hours":150,"approval_perbill":732620322,"support_perbill":388392858,"approval":73.2620322,"support":38.8392858,"days":7,"dot_needed":"440,481,234"},{"time_hours":151,"approval_perbill":731555556,"support_perbill":387648810,"approval":73.1555556,"support":38.764881,"days":7,"dot_needed":"439,637,400"},{"time_hours":152,"approval_perbill":730496454,"support_perbill":386904762,"approval":73.0496454,"support":38.6904762,"days":7,"dot_needed":"438,793,566"},{"time_hours":153,"approval_perbill":729442971,"support_perbill":386160715,"approval":72.9442971,"support":38.6160715,"days":7,"dot_needed":"437,949,733"},{"time_hours":154,"approval_perbill":728395062,"support_perbill":385416667,"approval":72.8395062,"support":38.5416667,"days":7,"dot_needed":"437,105,898"},{"time_hours":155,"approval_perbill":727352683,"support_perbill":384672620,"approval":72.7352683,"support":38.467262,"days":7,"dot_needed":"436,262,065"},{"time_hours":156,"approval_perbill":726315790,"support_perbill":383928572,"approval":72.631579,"support":38.3928572,"days":7,"dot_needed":"435,418,231"},{"time_hours":157,"approval_perbill":725284340,"support_perbill":383184524,"approval":72.528434,"support":38.3184524,"days":7,"dot_needed":"434,574,397"},{"time_hours":158,"approval_perbill":724258290,"support_perbill":382440477,"approval":72.425829,"support":38.2440477,"days":7,"dot_needed":"433,730,564"},{"time_hours":159,"approval_perbill":723237599,"support_perbill":381696429,"approval":72.3237599,"support":38.1696429,"days":7,"dot_needed":"432,886,730"},{"time_hours":160,"approval_perbill":722222222,"support_perbill":380952381,"approval":72.2222222,"support":38.0952381,"days":7,"dot_needed":"432,042,895"},{"time_hours":161,"approval_perbill":721212122,"support_perbill":380208334,"approval":72.1212122,"support":38.0208334,"days":7,"dot_needed":"431,199,062"},{"time_hours":162,"approval_perbill":720207254,"support_perbill":379464286,"approval":72.0207254,"support":37.9464286,"days":7,"dot_needed":"430,355,228"},{"time_hours":163,"approval_perbill":719207580,"support_perbill":378720239,"approval":71.920758,"support":37.8720239,"days":7,"dot_needed":"429,511,395"},{"time_hours":164,"approval_perbill":718213059,"support_perbill":377976191,"approval":71.8213059,"support":37.7976191,"days":7,"dot_needed":"428,667,561"},{"time_hours":165,"approval_perbill":717223651,"support_perbill":377232143,"approval":71.7223651,"support":37.7232143,"days":7,"dot_needed":"427,823,727"},{"time_hours":166,"approval_perbill":716239317,"support_perbill":376488096,"approval":71.6239317,"support":37.6488096,"days":7,"dot_needed":"426,979,893"},{"time_hours":167,"approval_perbill":715260018,"support_perbill":375744048,"approval":71.5260018,"support":37.5744048,"days":7,"dot_needed":"426,136,059"},{"time_hours":168,"approval_perbill":714285714,"support_perbill":375000000,"approval":71.4285714,"support":37.5,"days":7,"dot_needed":"425,292,225"},{"time_hours":169,"approval_perbill":713316370,"support_perbill":374255953,"approval":71.331637,"support":37.4255953,"days":8,"dot_needed":"424,448,392"},{"time_hours":170,"approval_perbill":712351946,"support_perbill":373511905,"approval":71.2351946,"support":37.3511905,"days":8,"dot_needed":"423,604,558"},{"time_hours":171,"approval_perbill":711392406,"support_perbill":372767858,"approval":71.1392406,"support":37.2767858,"days":8,"dot_needed":"422,760,725"},{"time_hours":172,"approval_perbill":710437711,"support_perbill":372023810,"approval":71.0437711,"support":37.202381,"days":8,"dot_needed":"421,916,890"},{"time_hours":173,"approval_perbill":709487826,"support_perbill":371279762,"approval":70.9487826,"support":37.1279762,"days":8,"dot_needed":"421,073,056"},{"time_hours":174,"approval_perbill":708542714,"support_perbill":370535715,"approval":70.8542714,"support":37.0535715,"days":8,"dot_needed":"420,229,223"},{"time_hours":175,"approval_perbill":707602340,"support_perbill":369791667,"approval":70.760234,"support":36.9791667,"days":8,"dot_needed":"419,385,389"},{"time_hours":176,"approval_perbill":706666667,"support_perbill":369047620,"approval":70.6666667,"support":36.904762,"days":8,"dot_needed":"418,541,556"},{"time_hours":177,"approval_perbill":705735661,"support_perbill":368303572,"approval":70.5735661,"support":36.8303572,"days":8,"dot_needed":"417,697,722"},{"time_hours":178,"approval_perbill":704809287,"support_perbill":367559524,"approval":70.4809287,"support":36.7559524,"days":8,"dot_needed":"416,853,887"},{"time_hours":179,"approval_perbill":703887511,"support_perbill":366815477,"approval":70.3887511,"support":36.6815477,"days":8,"dot_needed":"416,010,054"},{"time_hours":180,"approval_perbill":702970298,"support_perbill":366071429,"approval":70.2970298,"support":36.6071429,"days":8,"dot_needed":"415,166,220"},{"time_hours":181,"approval_perbill":702057613,"support_perbill":365327381,"approval":70.2057613,"support":36.5327381,"days":8,"dot_needed":"414,322,386"},{"time_hours":182,"approval_perbill":701149426,"support_perbill":364583334,"approval":70.1149426,"support":36.4583334,"days":8,"dot_needed":"413,478,553"},{"time_hours":183,"approval_perbill":700245701,"support_perbill":363839286,"approval":70.0245701,"support":36.3839286,"days":8,"dot_needed":"412,634,719"},{"time_hours":184,"approval_perbill":699346406,"support_perbill":363095239,"approval":69.9346406,"support":36.3095239,"days":8,"dot_needed":"411,790,886"},{"time_hours":185,"approval_perbill":698451508,"support_perbill":362351191,"approval":69.8451508,"support":36.2351191,"days":8,"dot_needed":"410,947,051"},{"time_hours":186,"approval_perbill":697560976,"support_perbill":361607143,"approval":69.7560976,"support":36.1607143,"days":8,"dot_needed":"410,103,217"},{"time_hours":187,"approval_perbill":696674777,"support_perbill":360863096,"approval":69.6674777,"support":36.0863096,"days":8,"dot_needed":"409,259,384"},{"time_hours":188,"approval_perbill":695792881,"support_perbill":360119048,"approval":69.5792881,"support":36.0119048,"days":8,"dot_needed":"408,415,550"},{"time_hours":189,"approval_perbill":694915254,"support_perbill":359375000,"approval":69.4915254,"support":35.9375,"days":8,"dot_needed":"407,571,716"},{"time_hours":190,"approval_perbill":694041868,"support_perbill":358630953,"approval":69.4041868,"support":35.8630953,"days":8,"dot_needed":"406,727,883"},{"time_hours":191,"approval_perbill":693172691,"support_perbill":357886905,"approval":69.3172691,"support":35.7886905,"days":8,"dot_needed":"405,884,048"},{"time_hours":192,"approval_perbill":692307693,"support_perbill":357142858,"approval":69.2307693,"support":35.7142858,"days":8,"dot_needed":"405,040,215"},{"time_hours":193,"approval_perbill":691446843,"support_perbill":356398810,"approval":69.1446843,"support":35.639881,"days":9,"dot_needed":"404,196,381"},{"time_hours":194,"approval_perbill":690590112,"support_perbill":355654762,"approval":69.0590112,"support":35.5654762,"days":9,"dot_needed":"403,352,547"},{"time_hours":195,"approval_perbill":689737470,"support_perbill":354910715,"approval":68.973747,"support":35.4910715,"days":9,"dot_needed":"402,508,714"},{"time_hours":196,"approval_perbill":688888889,"support_perbill":354166667,"approval":68.8888889,"support":35.4166667,"days":9,"dot_needed":"401,664,880"},{"time_hours":197,"approval_perbill":688044339,"support_perbill":353422620,"approval":68.8044339,"support":35.342262,"days":9,"dot_needed":"400,821,046"},{"time_hours":198,"approval_perbill":687203792,"support_perbill":352678572,"approval":68.7203792,"support":35.2678572,"days":9,"dot_needed":"399,977,212"},{"time_hours":199,"approval_perbill":686367219,"support_perbill":351934524,"approval":68.6367219,"support":35.1934524,"days":9,"dot_needed":"399,133,378"},{"time_hours":200,"approval_perbill":685534592,"support_perbill":351190477,"approval":68.5534592,"support":35.1190477,"days":9,"dot_needed":"398,289,545"},{"time_hours":201,"approval_perbill":684705883,"support_perbill":350446429,"approval":68.4705883,"support":35.0446429,"days":9,"dot_needed":"397,445,711"},{"time_hours":202,"approval_perbill":683881064,"support_perbill":349702381,"approval":68.3881064,"support":34.9702381,"days":9,"dot_needed":"396,601,877"},{"time_hours":203,"approval_perbill":683060110,"support_perbill":348958334,"approval":68.306011,"support":34.8958334,"days":9,"dot_needed":"395,758,043"},{"time_hours":204,"approval_perbill":682242991,"support_perbill":348214286,"approval":68.2242991,"support":34.8214286,"days":9,"dot_needed":"394,914,209"},{"time_hours":205,"approval_perbill":681429682,"support_perbill":347470239,"approval":68.1429682,"support":34.7470239,"days":9,"dot_needed":"394,070,376"},{"time_hours":206,"approval_perbill":680620155,"support_perbill":346726191,"approval":68.0620155,"support":34.6726191,"days":9,"dot_needed":"393,226,542"},{"time_hours":207,"approval_perbill":679814385,"support_perbill":345982143,"approval":67.9814385,"support":34.5982143,"days":9,"dot_needed":"392,382,708"},{"time_hours":208,"approval_perbill":679012346,"support_perbill":345238096,"approval":67.9012346,"support":34.5238096,"days":9,"dot_needed":"391,538,875"},{"time_hours":209,"approval_perbill":678214011,"support_perbill":344494048,"approval":67.8214011,"support":34.4494048,"days":9,"dot_needed":"390,695,040"},{"time_hours":210,"approval_perbill":677419355,"support_perbill":343750000,"approval":67.7419355,"support":34.375,"days":9,"dot_needed":"389,851,206"},{"time_hours":211,"approval_perbill":676628353,"support_perbill":343005953,"approval":67.6628353,"support":34.3005953,"days":9,"dot_needed":"389,007,373"},{"time_hours":212,"approval_perbill":675840979,"support_perbill":342261905,"approval":67.5840979,"support":34.2261905,"days":9,"dot_needed":"388,163,539"},{"time_hours":213,"approval_perbill":675057209,"support_perbill":341517858,"approval":67.5057209,"support":34.1517858,"days":9,"dot_needed":"387,319,706"},{"time_hours":214,"approval_perbill":674277017,"support_perbill":340773810,"approval":67.4277017,"support":34.077381,"days":9,"dot_needed":"386,475,872"},{"time_hours":215,"approval_perbill":673500380,"support_perbill":340029762,"approval":67.350038,"support":34.0029762,"days":9,"dot_needed":"385,632,037"},{"time_hours":216,"approval_perbill":672727273,"support_perbill":339285715,"approval":67.2727273,"support":33.9285715,"days":9,"dot_needed":"384,788,204"},{"time_hours":217,"approval_perbill":671957672,"support_perbill":338541667,"approval":67.1957672,"support":33.8541667,"days":10,"dot_needed":"383,944,370"},{"time_hours":218,"approval_perbill":671191554,"support_perbill":337797620,"approval":67.1191554,"support":33.779762,"days":10,"dot_needed":"383,100,537"},{"time_hours":219,"approval_perbill":670428894,"support_perbill":337053572,"approval":67.0428894,"support":33.7053572,"days":10,"dot_needed":"382,256,703"},{"time_hours":220,"approval_perbill":669669670,"support_perbill":336309524,"approval":66.966967,"support":33.6309524,"days":10,"dot_needed":"381,412,869"},{"time_hours":221,"approval_perbill":668913858,"support_perbill":335565477,"approval":66.8913858,"support":33.5565477,"days":10,"dot_needed":"380,569,036"},{"time_hours":222,"approval_perbill":668161435,"support_perbill":334821429,"approval":66.8161435,"support":33.4821429,"days":10,"dot_needed":"379,725,201"},{"time_hours":223,"approval_perbill":667412379,"support_perbill":334077381,"approval":66.7412379,"support":33.4077381,"days":10,"dot_needed":"378,881,367"},{"time_hours":224,"approval_perbill":666666667,"support_perbill":333333334,"approval":66.6666667,"support":33.3333334,"days":10,"dot_needed":"378,037,534"},{"time_hours":225,"approval_perbill":665924276,"support_perbill":332589286,"approval":66.5924276,"support":33.2589286,"days":10,"dot_needed":"377,193,700"},{"time_hours":226,"approval_perbill":665185186,"support_perbill":331845239,"approval":66.5185186,"support":33.1845239,"days":10,"dot_needed":"376,349,867"},{"time_hours":227,"approval_perbill":664449372,"support_perbill":331101191,"approval":66.4449372,"support":33.1101191,"days":10,"dot_needed":"375,506,033"},{"time_hours":228,"approval_perbill":663716814,"support_perbill":330357143,"approval":66.3716814,"support":33.0357143,"days":10,"dot_needed":"374,662,198"},{"time_hours":229,"approval_perbill":662987491,"support_perbill":329613096,"approval":66.2987491,"support":32.9613096,"days":10,"dot_needed":"373,818,365"},{"time_hours":230,"approval_perbill":662261381,"support_perbill":328869048,"approval":66.2261381,"support":32.8869048,"days":10,"dot_needed":"372,974,531"},{"time_hours":231,"approval_perbill":661538462,"support_perbill":328125000,"approval":66.1538462,"support":32.8125,"days":10,"dot_needed":"372,130,697"},{"time_hours":232,"approval_perbill":660818714,"support_perbill":327380953,"approval":66.0818714,"support":32.7380953,"days":10,"dot_needed":"371,286,864"},{"time_hours":233,"approval_perbill":660102115,"support_perbill":326636905,"approval":66.0102115,"support":32.6636905,"days":10,"dot_needed":"370,443,030"},{"time_hours":234,"approval_perbill":659388647,"support_perbill":325892858,"approval":65.9388647,"support":32.5892858,"days":10,"dot_needed":"369,599,197"},{"time_hours":235,"approval_perbill":658678287,"support_perbill":325148810,"approval":65.8678287,"support":32.514881,"days":10,"dot_needed":"368,755,362"},{"time_hours":236,"approval_perbill":657971015,"support_perbill":324404762,"approval":65.7971015,"support":32.4404762,"days":10,"dot_needed":"367,911,528"},{"time_hours":237,"approval_perbill":657266811,"support_perbill":323660715,"approval":65.7266811,"support":32.3660715,"days":10,"dot_needed":"367,067,695"},{"time_hours":238,"approval_perbill":656565657,"support_perbill":322916667,"approval":65.6565657,"support":32.2916667,"days":10,"dot_needed":"366,223,861"},{"time_hours":239,"approval_perbill":655867531,"support_perbill":322172620,"approval":65.5867531,"support":32.217262,"days":10,"dot_needed":"365,380,028"},{"time_hours":240,"approval_perbill":655172414,"support_perbill":321428572,"approval":65.5172414,"support":32.1428572,"days":10,"dot_needed":"364,536,194"},{"time_hours":241,"approval_perbill":654480287,"support_perbill":320684524,"approval":65.4480287,"support":32.0684524,"days":11,"dot_needed":"363,692,359"},{"time_hours":242,"approval_perbill":653791130,"support_perbill":319940477,"approval":65.379113,"support":31.9940477,"days":11,"dot_needed":"362,848,526"},{"time_hours":243,"approval_perbill":653104925,"support_perbill":319196429,"approval":65.3104925,"support":31.9196429,"days":11,"dot_needed":"362,004,692"},{"time_hours":244,"approval_perbill":652421652,"support_perbill":318452381,"approval":65.2421652,"support":31.8452381,"days":11,"dot_needed":"361,160,858"},{"time_hours":245,"approval_perbill":651741294,"support_perbill":317708334,"approval":65.1741294,"support":31.7708334,"days":11,"dot_needed":"360,317,025"},{"time_hours":246,"approval_perbill":651063830,"support_perbill":316964286,"approval":65.106383,"support":31.6964286,"days":11,"dot_needed":"359,473,191"},{"time_hours":247,"approval_perbill":650389243,"support_perbill":316220239,"approval":65.0389243,"support":31.6220239,"days":11,"dot_needed":"358,629,357"},{"time_hours":248,"approval_perbill":649717514,"support_perbill":315476191,"approval":64.9717514,"support":31.5476191,"days":11,"dot_needed":"357,785,523"},{"time_hours":249,"approval_perbill":649048626,"support_perbill":314732143,"approval":64.9048626,"support":31.4732143,"days":11,"dot_needed":"356,941,689"},{"time_hours":250,"approval_perbill":648382560,"support_perbill":313988096,"approval":64.838256,"support":31.3988096,"days":11,"dot_needed":"356,097,856"},{"time_hours":251,"approval_perbill":647719299,"support_perbill":313244048,"approval":64.7719299,"support":31.3244048,"days":11,"dot_needed":"355,254,022"},{"time_hours":252,"approval_perbill":647058823,"support_perbill":312500000,"approval":64.7058823,"support":31.25,"days":11,"dot_needed":"354,410,188"},{"time_hours":253,"approval_perbill":646401118,"support_perbill":311755953,"approval":64.6401118,"support":31.1755953,"days":11,"dot_needed":"353,566,354"},{"time_hours":254,"approval_perbill":645746165,"support_perbill":311011905,"approval":64.5746165,"support":31.1011905,"days":11,"dot_needed":"352,722,520"},{"time_hours":255,"approval_perbill":645093946,"support_perbill":310267858,"approval":64.5093946,"support":31.0267858,"days":11,"dot_needed":"351,878,687"},{"time_hours":256,"approval_perbill":644444445,"support_perbill":309523810,"approval":64.4444445,"support":30.952381,"days":11,"dot_needed":"351,034,853"},{"time_hours":257,"approval_perbill":643797644,"support_perbill":308779762,"approval":64.3797644,"support":30.8779762,"days":11,"dot_needed":"350,191,019"},{"time_hours":258,"approval_perbill":643153527,"support_perbill":308035715,"approval":64.3153527,"support":30.8035715,"days":11,"dot_needed":"349,347,186"},{"time_hours":259,"approval_perbill":642512078,"support_perbill":307291667,"approval":64.2512078,"support":30.7291667,"days":11,"dot_needed":"348,503,351"},{"time_hours":260,"approval_perbill":641873279,"support_perbill":306547620,"approval":64.1873279,"support":30.654762,"days":11,"dot_needed":"347,659,518"},{"time_hours":261,"approval_perbill":641237113,"support_perbill":305803572,"approval":64.1237113,"support":30.5803572,"days":11,"dot_needed":"346,815,684"},{"time_hours":262,"approval_perbill":640603567,"support_perbill":305059524,"approval":64.0603567,"support":30.5059524,"days":11,"dot_needed":"345,971,850"},{"time_hours":263,"approval_perbill":639972622,"support_perbill":304315477,"approval":63.9972622,"support":30.4315477,"days":11,"dot_needed":"345,128,017"},{"time_hours":264,"approval_perbill":639344263,"support_perbill":303571429,"approval":63.9344263,"support":30.3571429,"days":11,"dot_needed":"344,284,183"},{"time_hours":265,"approval_perbill":638718473,"support_perbill":302827381,"approval":63.8718473,"support":30.2827381,"days":12,"dot_needed":"343,440,348"},{"time_hours":266,"approval_perbill":638095238,"support_perbill":302083334,"approval":63.8095238,"support":30.2083334,"days":12,"dot_needed":"342,596,515"},{"time_hours":267,"approval_perbill":637474542,"support_perbill":301339286,"approval":63.7474542,"support":30.1339286,"days":12,"dot_needed":"341,752,681"},{"time_hours":268,"approval_perbill":636856369,"support_perbill":300595239,"approval":63.6856369,"support":30.0595239,"days":12,"dot_needed":"340,908,848"},{"time_hours":269,"approval_perbill":636240703,"support_perbill":299851191,"approval":63.6240703,"support":29.9851191,"days":12,"dot_needed":"340,065,014"},{"time_hours":270,"approval_perbill":635627530,"support_perbill":299107143,"approval":63.562753,"support":29.9107143,"days":12,"dot_needed":"339,221,180"},{"time_hours":271,"approval_perbill":635016835,"support_perbill":298363096,"approval":63.5016835,"support":29.8363096,"days":12,"dot_needed":"338,377,347"},{"time_hours":272,"approval_perbill":634408602,"support_perbill":297619048,"approval":63.4408602,"support":29.7619048,"days":12,"dot_needed":"337,533,512"},{"time_hours":273,"approval_perbill":633802817,"support_perbill":296875000,"approval":63.3802817,"support":29.6875,"days":12,"dot_needed":"336,689,678"},{"time_hours":274,"approval_perbill":633199465,"support_perbill":296130953,"approval":63.3199465,"support":29.6130953,"days":12,"dot_needed":"335,845,845"},{"time_hours":275,"approval_perbill":632598530,"support_perbill":295386905,"approval":63.259853,"support":29.5386905,"days":12,"dot_needed":"335,002,011"},{"time_hours":276,"approval_perbill":632000000,"support_perbill":294642858,"approval":63.2,"support":29.4642858,"days":12,"dot_needed":"334,158,178"},{"time_hours":277,"approval_perbill":631403859,"support_perbill":293898810,"approval":63.1403859,"support":29.389881,"days":12,"dot_needed":"333,314,344"},{"time_hours":278,"approval_perbill":630810093,"support_perbill":293154762,"approval":63.0810093,"support":29.3154762,"days":12,"dot_needed":"332,470,509"},{"time_hours":279,"approval_perbill":630218688,"support_perbill":292410715,"approval":63.0218688,"support":29.2410715,"days":12,"dot_needed":"331,626,676"},{"time_hours":280,"approval_perbill":629629630,"support_perbill":291666667,"approval":62.962963,"support":29.1666667,"days":12,"dot_needed":"330,782,842"},{"time_hours":281,"approval_perbill":629042905,"support_perbill":290922620,"approval":62.9042905,"support":29.092262,"days":12,"dot_needed":"329,939,009"},{"time_hours":282,"approval_perbill":628458498,"support_perbill":290178572,"approval":62.8458498,"support":29.0178572,"days":12,"dot_needed":"329,095,175"},{"time_hours":283,"approval_perbill":627876397,"support_perbill":289434524,"approval":62.7876397,"support":28.9434524,"days":12,"dot_needed":"328,251,341"},{"time_hours":284,"approval_perbill":627296588,"support_perbill":288690477,"approval":62.7296588,"support":28.8690477,"days":12,"dot_needed":"327,407,507"},{"time_hours":285,"approval_perbill":626719057,"support_perbill":287946429,"approval":62.6719057,"support":28.7946429,"days":12,"dot_needed":"326,563,673"},{"time_hours":286,"approval_perbill":626143791,"support_perbill":287202381,"approval":62.6143791,"support":28.7202381,"days":12,"dot_needed":"325,719,839"},{"time_hours":287,"approval_perbill":625570776,"support_perbill":286458334,"approval":62.5570776,"support":28.6458334,"days":12,"dot_needed":"324,876,006"},{"time_hours":288,"approval_perbill":625000000,"support_perbill":285714286,"approval":62.5,"support":28.5714286,"days":12,"dot_needed":"324,032,172"},{"time_hours":289,"approval_perbill":624431449,"support_perbill":284970239,"approval":62.4431449,"support":28.4970239,"days":13,"dot_needed":"323,188,339"},{"time_hours":290,"approval_perbill":623865110,"support_perbill":284226191,"approval":62.386511,"support":28.4226191,"days":13,"dot_needed":"322,344,504"},{"time_hours":291,"approval_perbill":623300971,"support_perbill":283482143,"approval":62.3300971,"support":28.3482143,"days":13,"dot_needed":"321,500,670"},{"time_hours":292,"approval_perbill":622739018,"support_perbill":282738096,"approval":62.2739018,"support":28.2738096,"days":13,"dot_needed":"320,656,837"},{"time_hours":293,"approval_perbill":622179239,"support_perbill":281994048,"approval":62.2179239,"support":28.1994048,"days":13,"dot_needed":"319,813,003"},{"time_hours":294,"approval_perbill":621621621,"support_perbill":281250000,"approval":62.1621621,"support":28.125,"days":13,"dot_needed":"318,969,169"},{"time_hours":295,"approval_perbill":621066153,"support_perbill":280505953,"approval":62.1066153,"support":28.0505953,"days":13,"dot_needed":"318,125,336"},{"time_hours":296,"approval_perbill":620512821,"support_perbill":279761905,"approval":62.0512821,"support":27.9761905,"days":13,"dot_needed":"317,281,501"},{"time_hours":297,"approval_perbill":619961612,"support_perbill":279017858,"approval":61.9961612,"support":27.9017858,"days":13,"dot_needed":"316,437,668"},{"time_hours":298,"approval_perbill":619412516,"support_perbill":278273810,"approval":61.9412516,"support":27.827381,"days":13,"dot_needed":"315,593,834"},{"time_hours":299,"approval_perbill":618865519,"support_perbill":277529762,"approval":61.8865519,"support":27.7529762,"days":13,"dot_needed":"314,750,000"},{"time_hours":300,"approval_perbill":618320611,"support_perbill":276785715,"approval":61.8320611,"support":27.6785715,"days":13,"dot_needed":"313,906,167"},{"time_hours":301,"approval_perbill":617777778,"support_perbill":276041667,"approval":61.7777778,"support":27.6041667,"days":13,"dot_needed":"313,062,333"},{"time_hours":302,"approval_perbill":617237009,"support_perbill":275297620,"approval":61.7237009,"support":27.529762,"days":13,"dot_needed":"312,218,500"},{"time_hours":303,"approval_perbill":616698292,"support_perbill":274553572,"approval":61.6698292,"support":27.4553572,"days":13,"dot_needed":"311,374,665"},{"time_hours":304,"approval_perbill":616161616,"support_perbill":273809524,"approval":61.6161616,"support":27.3809524,"days":13,"dot_needed":"310,530,831"},{"time_hours":305,"approval_perbill":615626969,"support_perbill":273065477,"approval":61.5626969,"support":27.3065477,"days":13,"dot_needed":"309,686,998"},{"time_hours":306,"approval_perbill":615094340,"support_perbill":272321429,"approval":61.509434,"support":27.2321429,"days":13,"dot_needed":"308,843,164"},{"time_hours":307,"approval_perbill":614563716,"support_perbill":271577381,"approval":61.4563716,"support":27.1577381,"days":13,"dot_needed":"307,999,330"},{"time_hours":308,"approval_perbill":614035088,"support_perbill":270833334,"approval":61.4035088,"support":27.0833334,"days":13,"dot_needed":"307,155,497"},{"time_hours":309,"approval_perbill":613508443,"support_perbill":270089286,"approval":61.3508443,"support":27.0089286,"days":13,"dot_needed":"306,311,662"},{"time_hours":310,"approval_perbill":612983770,"support_perbill":269345239,"approval":61.298377,"support":26.9345239,"days":13,"dot_needed":"305,467,829"},{"time_hours":311,"approval_perbill":612461059,"support_perbill":268601191,"approval":61.2461059,"support":26.8601191,"days":13,"dot_needed":"304,623,995"},{"time_hours":312,"approval_perbill":611940298,"support_perbill":267857143,"approval":61.1940298,"support":26.7857143,"days":13,"dot_needed":"303,780,161"},{"time_hours":313,"approval_perbill":611421477,"support_perbill":267113096,"approval":61.1421477,"support":26.7113096,"days":14,"dot_needed":"302,936,328"},{"time_hours":314,"approval_perbill":610904585,"support_perbill":266369048,"approval":61.0904585,"support":26.6369048,"days":14,"dot_needed":"302,092,494"},{"time_hours":315,"approval_perbill":610389610,"support_perbill":265625000,"approval":61.038961,"support":26.5625,"days":14,"dot_needed":"301,248,659"},{"time_hours":316,"approval_perbill":609876543,"support_perbill":264880953,"approval":60.9876543,"support":26.4880953,"days":14,"dot_needed":"300,404,826"},{"time_hours":317,"approval_perbill":609365373,"support_perbill":264136905,"approval":60.9365373,"support":26.4136905,"days":14,"dot_needed":"299,560,992"},{"time_hours":318,"approval_perbill":608856089,"support_perbill":263392858,"approval":60.8856089,"support":26.3392858,"days":14,"dot_needed":"298,717,159"},{"time_hours":319,"approval_perbill":608348680,"support_perbill":262648810,"approval":60.834868,"support":26.264881,"days":14,"dot_needed":"297,873,325"},{"time_hours":320,"approval_perbill":607843137,"support_perbill":261904762,"approval":60.7843137,"support":26.1904762,"days":14,"dot_needed":"297,029,491"},{"time_hours":321,"approval_perbill":607339449,"support_perbill":261160715,"approval":60.7339449,"support":26.1160715,"days":14,"dot_needed":"296,185,658"},{"time_hours":322,"approval_perbill":606837607,"support_perbill":260416667,"approval":60.6837607,"support":26.0416667,"days":14,"dot_needed":"295,341,823"},{"time_hours":323,"approval_perbill":606337599,"support_perbill":259672620,"approval":60.6337599,"support":25.967262,"days":14,"dot_needed":"294,497,990"},{"time_hours":324,"approval_perbill":605839416,"support_perbill":258928572,"approval":60.5839416,"support":25.8928572,"days":14,"dot_needed":"293,654,156"},{"time_hours":325,"approval_perbill":605343048,"support_perbill":258184524,"approval":60.5343048,"support":25.8184524,"days":14,"dot_needed":"292,810,322"},{"time_hours":326,"approval_perbill":604848485,"support_perbill":257440477,"approval":60.4848485,"support":25.7440477,"days":14,"dot_needed":"291,966,489"},{"time_hours":327,"approval_perbill":604355717,"support_perbill":256696429,"approval":60.4355717,"support":25.6696429,"days":14,"dot_needed":"291,122,655"},{"time_hours":328,"approval_perbill":603864734,"support_perbill":255952381,"approval":60.3864734,"support":25.5952381,"days":14,"dot_needed":"290,278,820"},{"time_hours":329,"approval_perbill":603375527,"support_perbill":255208334,"approval":60.3375527,"support":25.5208334,"days":14,"dot_needed":"289,434,987"},{"time_hours":330,"approval_perbill":602888087,"support_perbill":254464286,"approval":60.2888087,"support":25.4464286,"days":14,"dot_needed":"288,591,153"},{"time_hours":331,"approval_perbill":602402402,"support_perbill":253720239,"approval":60.2402402,"support":25.3720239,"days":14,"dot_needed":"287,747,320"},{"time_hours":332,"approval_perbill":601918465,"support_perbill":252976191,"approval":60.1918465,"support":25.2976191,"days":14,"dot_needed":"286,903,486"},{"time_hours":333,"approval_perbill":601436266,"support_perbill":252232143,"approval":60.1436266,"support":25.2232143,"days":14,"dot_needed":"286,059,652"},{"time_hours":334,"approval_perbill":600955794,"support_perbill":251488096,"approval":60.0955794,"support":25.1488096,"days":14,"dot_needed":"285,215,818"},{"time_hours":335,"approval_perbill":600477042,"support_perbill":250744048,"approval":60.0477042,"support":25.0744048,"days":14,"dot_needed":"284,371,984"},{"time_hours":336,"approval_perbill":600000000,"support_perbill":250000000,"approval":60,"support":25,"days":14,"dot_needed":"283,528,150"},{"time_hours":337,"approval_perbill":599524658,"support_perbill":249255953,"approval":59.9524658,"support":24.9255953,"days":15,"dot_needed":"282,684,317"},{"time_hours":338,"approval_perbill":599051008,"support_perbill":248511905,"approval":59.9051008,"support":24.8511905,"days":15,"dot_needed":"281,840,483"},{"time_hours":339,"approval_perbill":598579041,"support_perbill":247767858,"approval":59.8579041,"support":24.7767858,"days":15,"dot_needed":"280,996,650"},{"time_hours":340,"approval_perbill":598108747,"support_perbill":247023810,"approval":59.8108747,"support":24.702381,"days":15,"dot_needed":"280,152,815"},{"time_hours":341,"approval_perbill":597640118,"support_perbill":246279762,"approval":59.7640118,"support":24.6279762,"days":15,"dot_needed":"279,308,981"},{"time_hours":342,"approval_perbill":597173145,"support_perbill":245535715,"approval":59.7173145,"support":24.5535715,"days":15,"dot_needed":"278,465,148"},{"time_hours":343,"approval_perbill":596707819,"support_perbill":244791667,"approval":59.6707819,"support":24.4791667,"days":15,"dot_needed":"277,621,314"},{"time_hours":344,"approval_perbill":596244131,"support_perbill":244047620,"approval":59.6244131,"support":24.404762,"days":15,"dot_needed":"276,777,481"},{"time_hours":345,"approval_perbill":595782074,"support_perbill":243303572,"approval":59.5782074,"support":24.3303572,"days":15,"dot_needed":"275,933,647"},{"time_hours":346,"approval_perbill":595321637,"support_perbill":242559524,"approval":59.5321637,"support":24.2559524,"days":15,"dot_needed":"275,089,812"},{"time_hours":347,"approval_perbill":594862814,"support_perbill":241815477,"approval":59.4862814,"support":24.1815477,"days":15,"dot_needed":"274,245,979"},{"time_hours":348,"approval_perbill":594405594,"support_perbill":241071429,"approval":59.4405594,"support":24.1071429,"days":15,"dot_needed":"273,402,145"},{"time_hours":349,"approval_perbill":593949971,"support_perbill":240327381,"approval":59.3949971,"support":24.0327381,"days":15,"dot_needed":"272,558,311"},{"time_hours":350,"approval_perbill":593495935,"support_perbill":239583334,"approval":59.3495935,"support":23.9583334,"days":15,"dot_needed":"271,714,478"},{"time_hours":351,"approval_perbill":593043478,"support_perbill":238839286,"approval":59.3043478,"support":23.8839286,"days":15,"dot_needed":"270,870,644"},{"time_hours":352,"approval_perbill":592592593,"support_perbill":238095239,"approval":59.2592593,"support":23.8095239,"days":15,"dot_needed":"270,026,811"},{"time_hours":353,"approval_perbill":592143270,"support_perbill":237351191,"approval":59.214327,"support":23.7351191,"days":15,"dot_needed":"269,182,976"},{"time_hours":354,"approval_perbill":591695502,"support_perbill":236607143,"approval":59.1695502,"support":23.6607143,"days":15,"dot_needed":"268,339,142"},{"time_hours":355,"approval_perbill":591249280,"support_perbill":235863096,"approval":59.124928,"support":23.5863096,"days":15,"dot_needed":"267,495,309"},{"time_hours":356,"approval_perbill":590804598,"support_perbill":235119048,"approval":59.0804598,"support":23.5119048,"days":15,"dot_needed":"266,651,475"},{"time_hours":357,"approval_perbill":590361446,"support_perbill":234375000,"approval":59.0361446,"support":23.4375,"days":15,"dot_needed":"265,807,641"},{"time_hours":358,"approval_perbill":589919817,"support_perbill":233630953,"approval":58.9919817,"support":23.3630953,"days":15,"dot_needed":"264,963,808"},{"time_hours":359,"approval_perbill":589479703,"support_perbill":232886905,"approval":58.9479703,"support":23.2886905,"days":15,"dot_needed":"264,119,973"},{"time_hours":360,"approval_perbill":589041096,"support_perbill":232142858,"approval":58.9041096,"support":23.2142858,"days":15,"dot_needed":"263,276,140"},{"time_hours":361,"approval_perbill":588603989,"support_perbill":231398810,"approval":58.8603989,"support":23.139881,"days":16,"dot_needed":"262,432,306"},{"time_hours":362,"approval_perbill":588168373,"support_perbill":230654762,"approval":58.8168373,"support":23.0654762,"days":16,"dot_needed":"261,588,472"},{"time_hours":363,"approval_perbill":587734242,"support_perbill":229910715,"approval":58.7734242,"support":22.9910715,"days":16,"dot_needed":"260,744,639"},{"time_hours":364,"approval_perbill":587301587,"support_perbill":229166667,"approval":58.7301587,"support":22.9166667,"days":16,"dot_needed":"259,900,805"},{"time_hours":365,"approval_perbill":586870402,"support_perbill":228422620,"approval":58.6870402,"support":22.842262,"days":16,"dot_needed":"259,056,971"},{"time_hours":366,"approval_perbill":586440678,"support_perbill":227678572,"approval":58.6440678,"support":22.7678572,"days":16,"dot_needed":"258,213,137"},{"time_hours":367,"approval_perbill":586012408,"support_perbill":226934524,"approval":58.6012408,"support":22.6934524,"days":16,"dot_needed":"257,369,303"},{"time_hours":368,"approval_perbill":585585585,"support_perbill":226190477,"approval":58.5585585,"support":22.6190477,"days":16,"dot_needed":"256,525,470"},{"time_hours":369,"approval_perbill":585160202,"support_perbill":225446429,"approval":58.5160202,"support":22.5446429,"days":16,"dot_needed":"255,681,636"},{"time_hours":370,"approval_perbill":584736251,"support_perbill":224702381,"approval":58.4736251,"support":22.4702381,"days":16,"dot_needed":"254,837,802"},{"time_hours":371,"approval_perbill":584313725,"support_perbill":223958334,"approval":58.4313725,"support":22.3958334,"days":16,"dot_needed":"253,993,968"},{"time_hours":372,"approval_perbill":583892617,"support_perbill":223214286,"approval":58.3892617,"support":22.3214286,"days":16,"dot_needed":"253,150,134"},{"time_hours":373,"approval_perbill":583472920,"support_perbill":222470239,"approval":58.347292,"support":22.2470239,"days":16,"dot_needed":"252,306,301"},{"time_hours":374,"approval_perbill":583054626,"support_perbill":221726191,"approval":58.3054626,"support":22.1726191,"days":16,"dot_needed":"251,462,467"},{"time_hours":375,"approval_perbill":582637729,"support_perbill":220982143,"approval":58.2637729,"support":22.0982143,"days":16,"dot_needed":"250,618,633"},{"time_hours":376,"approval_perbill":582222222,"support_perbill":220238096,"approval":58.2222222,"support":22.0238096,"days":16,"dot_needed":"249,774,800"},{"time_hours":377,"approval_perbill":581808098,"support_perbill":219494048,"approval":58.1808098,"support":21.9494048,"days":16,"dot_needed":"248,930,965"},{"time_hours":378,"approval_perbill":581395349,"support_perbill":218750000,"approval":58.1395349,"support":21.875,"days":16,"dot_needed":"248,087,131"},{"time_hours":379,"approval_perbill":580983969,"support_perbill":218005953,"approval":58.0983969,"support":21.8005953,"days":16,"dot_needed":"247,243,298"},{"time_hours":380,"approval_perbill":580573951,"support_perbill":217261905,"approval":58.0573951,"support":21.7261905,"days":16,"dot_needed":"246,399,464"},{"time_hours":381,"approval_perbill":580165289,"support_perbill":216517858,"approval":58.0165289,"support":21.6517858,"days":16,"dot_needed":"245,555,631"},{"time_hours":382,"approval_perbill":579757976,"support_perbill":215773810,"approval":57.9757976,"support":21.577381,"days":16,"dot_needed":"244,711,797"},{"time_hours":383,"approval_perbill":579352004,"support_perbill":215029762,"approval":57.9352004,"support":21.5029762,"days":16,"dot_needed":"243,867,962"},{"time_hours":384,"approval_perbill":578947368,"support_perbill":214285715,"approval":57.8947368,"support":21.4285715,"days":16,"dot_needed":"243,024,129"},{"time_hours":385,"approval_perbill":578544061,"support_perbill":213541667,"approval":57.8544061,"support":21.3541667,"days":17,"dot_needed":"242,180,295"},{"time_hours":386,"approval_perbill":578142076,"support_perbill":212797620,"approval":57.8142076,"support":21.279762,"days":17,"dot_needed":"241,336,462"},{"time_hours":387,"approval_perbill":577741407,"support_perbill":212053572,"approval":57.7741407,"support":21.2053572,"days":17,"dot_needed":"240,492,628"},{"time_hours":388,"approval_perbill":577342048,"support_perbill":211309524,"approval":57.7342048,"support":21.1309524,"days":17,"dot_needed":"239,648,794"},{"time_hours":389,"approval_perbill":576943991,"support_perbill":210565477,"approval":57.6943991,"support":21.0565477,"days":17,"dot_needed":"238,804,961"},{"time_hours":390,"approval_perbill":576547231,"support_perbill":209821429,"approval":57.6547231,"support":20.9821429,"days":17,"dot_needed":"237,961,126"},{"time_hours":391,"approval_perbill":576151761,"support_perbill":209077381,"approval":57.6151761,"support":20.9077381,"days":17,"dot_needed":"237,117,292"},{"time_hours":392,"approval_perbill":575757576,"support_perbill":208333334,"approval":57.5757576,"support":20.8333334,"days":17,"dot_needed":"236,273,459"},{"time_hours":393,"approval_perbill":575364668,"support_perbill":207589286,"approval":57.5364668,"support":20.7589286,"days":17,"dot_needed":"235,429,625"},{"time_hours":394,"approval_perbill":574973031,"support_perbill":206845239,"approval":57.4973031,"support":20.6845239,"days":17,"dot_needed":"234,585,792"},{"time_hours":395,"approval_perbill":574582660,"support_perbill":206101191,"approval":57.458266,"support":20.6101191,"days":17,"dot_needed":"233,741,958"},{"time_hours":396,"approval_perbill":574193548,"support_perbill":205357143,"approval":57.4193548,"support":20.5357143,"days":17,"dot_needed":"232,898,123"},{"time_hours":397,"approval_perbill":573805690,"support_perbill":204613096,"approval":57.380569,"support":20.4613096,"days":17,"dot_needed":"232,054,290"},{"time_hours":398,"approval_perbill":573419078,"support_perbill":203869048,"approval":57.3419078,"support":20.3869048,"days":17,"dot_needed":"231,210,456"},{"time_hours":399,"approval_perbill":573033708,"support_perbill":203125000,"approval":57.3033708,"support":20.3125,"days":17,"dot_needed":"230,366,622"},{"time_hours":400,"approval_perbill":572649572,"support_perbill":202380953,"approval":57.2649572,"support":20.2380953,"days":17,"dot_needed":"229,522,789"},{"time_hours":401,"approval_perbill":572266666,"support_perbill":201636905,"approval":57.2266666,"support":20.1636905,"days":17,"dot_needed":"228,678,955"},{"time_hours":402,"approval_perbill":571884984,"support_perbill":200892858,"approval":57.1884984,"support":20.0892858,"days":17,"dot_needed":"227,835,122"},{"time_hours":403,"approval_perbill":571504519,"support_perbill":200148810,"approval":57.1504519,"support":20.014881,"days":17,"dot_needed":"226,991,287"},{"time_hours":404,"approval_perbill":571125265,"support_perbill":199404762,"approval":57.1125265,"support":19.9404762,"days":17,"dot_needed":"226,147,453"},{"time_hours":405,"approval_perbill":570747218,"support_perbill":198660715,"approval":57.0747218,"support":19.8660715,"days":17,"dot_needed":"225,303,620"},{"time_hours":406,"approval_perbill":570370370,"support_perbill":197916667,"approval":57.037037,"support":19.7916667,"days":17,"dot_needed":"224,459,786"},{"time_hours":407,"approval_perbill":569994717,"support_perbill":197172620,"approval":56.9994717,"support":19.717262,"days":17,"dot_needed":"223,615,953"},{"time_hours":408,"approval_perbill":569620253,"support_perbill":196428572,"approval":56.9620253,"support":19.6428572,"days":17,"dot_needed":"222,772,119"},{"time_hours":409,"approval_perbill":569246972,"support_perbill":195684524,"approval":56.9246972,"support":19.5684524,"days":18,"dot_needed":"221,928,284"},{"time_hours":410,"approval_perbill":568874868,"support_perbill":194940477,"approval":56.8874868,"support":19.4940477,"days":18,"dot_needed":"221,084,451"},{"time_hours":411,"approval_perbill":568503937,"support_perbill":194196429,"approval":56.8503937,"support":19.4196429,"days":18,"dot_needed":"220,240,617"},{"time_hours":412,"approval_perbill":568134172,"support_perbill":193452381,"approval":56.8134172,"support":19.3452381,"days":18,"dot_needed":"219,396,783"},{"time_hours":413,"approval_perbill":567765567,"support_perbill":192708334,"approval":56.7765567,"support":19.2708334,"days":18,"dot_needed":"218,552,950"},{"time_hours":414,"approval_perbill":567398119,"support_perbill":191964286,"approval":56.7398119,"support":19.1964286,"days":18,"dot_needed":"217,709,116"},{"time_hours":415,"approval_perbill":567031820,"support_perbill":191220239,"approval":56.703182,"support":19.1220239,"days":18,"dot_needed":"216,865,282"},{"time_hours":416,"approval_perbill":566666666,"support_perbill":190476191,"approval":56.6666666,"support":19.0476191,"days":18,"dot_needed":"216,021,448"},{"time_hours":417,"approval_perbill":566302652,"support_perbill":189732143,"approval":56.6302652,"support":18.9732143,"days":18,"dot_needed":"215,177,614"},{"time_hours":418,"approval_perbill":565939771,"support_perbill":188988096,"approval":56.5939771,"support":18.8988096,"days":18,"dot_needed":"214,333,781"},{"time_hours":419,"approval_perbill":565578020,"support_perbill":188244048,"approval":56.557802,"support":18.8244048,"days":18,"dot_needed":"213,489,947"},{"time_hours":420,"approval_perbill":565217391,"support_perbill":187500000,"approval":56.5217391,"support":18.75,"days":18,"dot_needed":"212,646,113"},{"time_hours":421,"approval_perbill":564857881,"support_perbill":186755953,"approval":56.4857881,"support":18.6755953,"days":18,"dot_needed":"211,802,279"},{"time_hours":422,"approval_perbill":564499484,"support_perbill":186011905,"approval":56.4499484,"support":18.6011905,"days":18,"dot_needed":"210,958,445"},{"time_hours":423,"approval_perbill":564142195,"support_perbill":185267858,"approval":56.4142195,"support":18.5267858,"days":18,"dot_needed":"210,114,612"},{"time_hours":424,"approval_perbill":563786008,"support_perbill":184523810,"approval":56.3786008,"support":18.452381,"days":18,"dot_needed":"209,270,778"},{"time_hours":425,"approval_perbill":563430919,"support_perbill":183779762,"approval":56.3430919,"support":18.3779762,"days":18,"dot_needed":"208,426,944"},{"time_hours":426,"approval_perbill":563076923,"support_perbill":183035715,"approval":56.3076923,"support":18.3035715,"days":18,"dot_needed":"207,583,111"},{"time_hours":427,"approval_perbill":562724014,"support_perbill":182291667,"approval":56.2724014,"support":18.2291667,"days":18,"dot_needed":"206,739,276"},{"time_hours":428,"approval_perbill":562372188,"support_perbill":181547620,"approval":56.2372188,"support":18.154762,"days":18,"dot_needed":"205,895,443"},{"time_hours":429,"approval_perbill":562021439,"support_perbill":180803572,"approval":56.2021439,"support":18.0803572,"days":18,"dot_needed":"205,051,609"},{"time_hours":430,"approval_perbill":561671763,"support_perbill":180059524,"approval":56.1671763,"support":18.0059524,"days":18,"dot_needed":"204,207,775"},{"time_hours":431,"approval_perbill":561323155,"support_perbill":179315477,"approval":56.1323155,"support":17.9315477,"days":18,"dot_needed":"203,363,942"},{"time_hours":432,"approval_perbill":560975610,"support_perbill":178571429,"approval":56.097561,"support":17.8571429,"days":18,"dot_needed":"202,520,108"},{"time_hours":433,"approval_perbill":560629122,"support_perbill":177827381,"approval":56.0629122,"support":17.7827381,"days":19,"dot_needed":"201,676,273"},{"time_hours":434,"approval_perbill":560283688,"support_perbill":177083334,"approval":56.0283688,"support":17.7083334,"days":19,"dot_needed":"200,832,440"},{"time_hours":435,"approval_perbill":559939302,"support_perbill":176339286,"approval":55.9939302,"support":17.6339286,"days":19,"dot_needed":"199,988,606"},{"time_hours":436,"approval_perbill":559595959,"support_perbill":175595239,"approval":55.9595959,"support":17.5595239,"days":19,"dot_needed":"199,144,773"},{"time_hours":437,"approval_perbill":559253656,"support_perbill":174851191,"approval":55.9253656,"support":17.4851191,"days":19,"dot_needed":"198,300,939"},{"time_hours":438,"approval_perbill":558912386,"support_perbill":174107143,"approval":55.8912386,"support":17.4107143,"days":19,"dot_needed":"197,457,105"},{"time_hours":439,"approval_perbill":558572147,"support_perbill":173363096,"approval":55.8572147,"support":17.3363096,"days":19,"dot_needed":"196,613,272"},{"time_hours":440,"approval_perbill":558232931,"support_perbill":172619048,"approval":55.8232931,"support":17.2619048,"days":19,"dot_needed":"195,769,437"},{"time_hours":441,"approval_perbill":557894736,"support_perbill":171875000,"approval":55.7894736,"support":17.1875,"days":19,"dot_needed":"194,925,603"},{"time_hours":442,"approval_perbill":557557557,"support_perbill":171130953,"approval":55.7557557,"support":17.1130953,"days":19,"dot_needed":"194,081,770"},{"time_hours":443,"approval_perbill":557221389,"support_perbill":170386905,"approval":55.7221389,"support":17.0386905,"days":19,"dot_needed":"193,237,936"},{"time_hours":444,"approval_perbill":556886227,"support_perbill":169642858,"approval":55.6886227,"support":16.9642858,"days":19,"dot_needed":"192,394,103"},{"time_hours":445,"approval_perbill":556552068,"support_perbill":168898810,"approval":55.6552068,"support":16.889881,"days":19,"dot_needed":"191,550,269"},{"time_hours":446,"approval_perbill":556218905,"support_perbill":168154762,"approval":55.6218905,"support":16.8154762,"days":19,"dot_needed":"190,706,434"},{"time_hours":447,"approval_perbill":555886736,"support_perbill":167410715,"approval":55.5886736,"support":16.7410715,"days":19,"dot_needed":"189,862,601"},{"time_hours":448,"approval_perbill":555555555,"support_perbill":166666667,"approval":55.5555555,"support":16.6666667,"days":19,"dot_needed":"189,018,767"},{"time_hours":449,"approval_perbill":555225359,"support_perbill":165922620,"approval":55.5225359,"support":16.592262,"days":19,"dot_needed":"188,174,934"},{"time_hours":450,"approval_perbill":554896142,"support_perbill":165178572,"approval":55.4896142,"support":16.5178572,"days":19,"dot_needed":"187,331,100"},{"time_hours":451,"approval_perbill":554567901,"support_perbill":164434524,"approval":55.4567901,"support":16.4434524,"days":19,"dot_needed":"186,487,266"},{"time_hours":452,"approval_perbill":554240631,"support_perbill":163690477,"approval":55.4240631,"support":16.3690477,"days":19,"dot_needed":"185,643,432"},{"time_hours":453,"approval_perbill":553914328,"support_perbill":162946429,"approval":55.3914328,"support":16.2946429,"days":19,"dot_needed":"184,799,598"},{"time_hours":454,"approval_perbill":553588987,"support_perbill":162202381,"approval":55.3588987,"support":16.2202381,"days":19,"dot_needed":"183,955,764"},{"time_hours":455,"approval_perbill":553264604,"support_perbill":161458334,"approval":55.3264604,"support":16.1458334,"days":19,"dot_needed":"183,111,931"},{"time_hours":456,"approval_perbill":552941176,"support_perbill":160714286,"approval":55.2941176,"support":16.0714286,"days":19,"dot_needed":"182,268,097"},{"time_hours":457,"approval_perbill":552618698,"support_perbill":159970239,"approval":55.2618698,"support":15.9970239,"days":20,"dot_needed":"181,424,264"},{"time_hours":458,"approval_perbill":552297165,"support_perbill":159226191,"approval":55.2297165,"support":15.9226191,"days":20,"dot_needed":"180,580,429"},{"time_hours":459,"approval_perbill":551976574,"support_perbill":158482143,"approval":55.1976574,"support":15.8482143,"days":20,"dot_needed":"179,736,595"},{"time_hours":460,"approval_perbill":551656920,"support_perbill":157738096,"approval":55.165692,"support":15.7738096,"days":20,"dot_needed":"178,892,762"},{"time_hours":461,"approval_perbill":551338199,"support_perbill":156994048,"approval":55.1338199,"support":15.6994048,"days":20,"dot_needed":"178,048,928"},{"time_hours":462,"approval_perbill":551020408,"support_perbill":156250000,"approval":55.1020408,"support":15.625,"days":20,"dot_needed":"177,205,094"},{"time_hours":463,"approval_perbill":550703542,"support_perbill":155505953,"approval":55.0703542,"support":15.5505953,"days":20,"dot_needed":"176,361,261"},{"time_hours":464,"approval_perbill":550387597,"support_perbill":154761905,"approval":55.0387597,"support":15.4761905,"days":20,"dot_needed":"175,517,426"},{"time_hours":465,"approval_perbill":550072569,"support_perbill":154017858,"approval":55.0072569,"support":15.4017858,"days":20,"dot_needed":"174,673,593"},{"time_hours":466,"approval_perbill":549758454,"support_perbill":153273810,"approval":54.9758454,"support":15.327381,"days":20,"dot_needed":"173,829,759"},{"time_hours":467,"approval_perbill":549445248,"support_perbill":152529762,"approval":54.9445248,"support":15.2529762,"days":20,"dot_needed":"172,985,925"},{"time_hours":468,"approval_perbill":549132948,"support_perbill":151785715,"approval":54.9132948,"support":15.1785715,"days":20,"dot_needed":"172,142,092"},{"time_hours":469,"approval_perbill":548821549,"support_perbill":151041667,"approval":54.8821549,"support":15.1041667,"days":20,"dot_needed":"171,298,258"},{"time_hours":470,"approval_perbill":548511047,"support_perbill":150297620,"approval":54.8511047,"support":15.029762,"days":20,"dot_needed":"170,454,425"},{"time_hours":471,"approval_perbill":548201438,"support_perbill":149553572,"approval":54.8201438,"support":14.9553572,"days":20,"dot_needed":"169,610,590"},{"time_hours":472,"approval_perbill":547892720,"support_perbill":148809524,"approval":54.789272,"support":14.8809524,"days":20,"dot_needed":"168,766,756"},{"time_hours":473,"approval_perbill":547584887,"support_perbill":148065477,"approval":54.7584887,"support":14.8065477,"days":20,"dot_needed":"167,922,923"},{"time_hours":474,"approval_perbill":547277937,"support_perbill":147321429,"approval":54.7277937,"support":14.7321429,"days":20,"dot_needed":"167,079,089"},{"time_hours":475,"approval_perbill":546971864,"support_perbill":146577381,"approval":54.6971864,"support":14.6577381,"days":20,"dot_needed":"166,235,255"},{"time_hours":476,"approval_perbill":546666666,"support_perbill":145833334,"approval":54.6666666,"support":14.5833334,"days":20,"dot_needed":"165,391,422"},{"time_hours":477,"approval_perbill":546362339,"support_perbill":145089286,"approval":54.6362339,"support":14.5089286,"days":20,"dot_needed":"164,547,587"},{"time_hours":478,"approval_perbill":546058879,"support_perbill":144345239,"approval":54.6058879,"support":14.4345239,"days":20,"dot_needed":"163,703,754"},{"time_hours":479,"approval_perbill":545756282,"support_perbill":143601191,"approval":54.5756282,"support":14.3601191,"days":20,"dot_needed":"162,859,920"},{"time_hours":480,"approval_perbill":545454545,"support_perbill":142857143,"approval":54.5454545,"support":14.2857143,"days":20,"dot_needed":"162,016,086"},{"time_hours":481,"approval_perbill":545153664,"support_perbill":142113096,"approval":54.5153664,"support":14.2113096,"days":21,"dot_needed":"161,172,253"},{"time_hours":482,"approval_perbill":544853635,"support_perbill":141369048,"approval":54.4853635,"support":14.1369048,"days":21,"dot_needed":"160,328,419"},{"time_hours":483,"approval_perbill":544554455,"support_perbill":140625000,"approval":54.4554455,"support":14.0625,"days":21,"dot_needed":"159,484,584"},{"time_hours":484,"approval_perbill":544256120,"support_perbill":139880953,"approval":54.425612,"support":13.9880953,"days":21,"dot_needed":"158,640,751"},{"time_hours":485,"approval_perbill":543958627,"support_perbill":139136905,"approval":54.3958627,"support":13.9136905,"days":21,"dot_needed":"157,796,917"},{"time_hours":486,"approval_perbill":543661971,"support_perbill":138392858,"approval":54.3661971,"support":13.8392858,"days":21,"dot_needed":"156,953,084"},{"time_hours":487,"approval_perbill":543366151,"support_perbill":137648810,"approval":54.3366151,"support":13.764881,"days":21,"dot_needed":"156,109,250"},{"time_hours":488,"approval_perbill":543071161,"support_perbill":136904762,"approval":54.3071161,"support":13.6904762,"days":21,"dot_needed":"155,265,416"},{"time_hours":489,"approval_perbill":542776998,"support_perbill":136160715,"approval":54.2776998,"support":13.6160715,"days":21,"dot_needed":"154,421,583"},{"time_hours":490,"approval_perbill":542483660,"support_perbill":135416667,"approval":54.248366,"support":13.5416667,"days":21,"dot_needed":"153,577,748"},{"time_hours":491,"approval_perbill":542191142,"support_perbill":134672620,"approval":54.2191142,"support":13.467262,"days":21,"dot_needed":"152,733,915"},{"time_hours":492,"approval_perbill":541899441,"support_perbill":133928572,"approval":54.1899441,"support":13.3928572,"days":21,"dot_needed":"151,890,081"},{"time_hours":493,"approval_perbill":541608554,"support_perbill":133184524,"approval":54.1608554,"support":13.3184524,"days":21,"dot_needed":"151,046,247"},{"time_hours":494,"approval_perbill":541318477,"support_perbill":132440477,"approval":54.1318477,"support":13.2440477,"days":21,"dot_needed":"150,202,414"},{"time_hours":495,"approval_perbill":541029207,"support_perbill":131696429,"approval":54.1029207,"support":13.1696429,"days":21,"dot_needed":"149,358,580"},{"time_hours":496,"approval_perbill":540740740,"support_perbill":130952381,"approval":54.074074,"support":13.0952381,"days":21,"dot_needed":"148,514,745"},{"time_hours":497,"approval_perbill":540453074,"support_perbill":130208334,"approval":54.0453074,"support":13.0208334,"days":21,"dot_needed":"147,670,912"},{"time_hours":498,"approval_perbill":540166205,"support_perbill":129464286,"approval":54.0166205,"support":12.9464286,"days":21,"dot_needed":"146,827,078"},{"time_hours":499,"approval_perbill":539880129,"support_perbill":128720239,"approval":53.9880129,"support":12.8720239,"days":21,"dot_needed":"145,983,245"},{"time_hours":500,"approval_perbill":539594843,"support_perbill":127976191,"approval":53.9594843,"support":12.7976191,"days":21,"dot_needed":"145,139,411"},{"time_hours":501,"approval_perbill":539310344,"support_perbill":127232143,"approval":53.9310344,"support":12.7232143,"days":21,"dot_needed":"144,295,577"},{"time_hours":502,"approval_perbill":539026630,"support_perbill":126488096,"approval":53.902663,"support":12.6488096,"days":21,"dot_needed":"143,451,743"},{"time_hours":503,"approval_perbill":538743695,"support_perbill":125744048,"approval":53.8743695,"support":12.5744048,"days":21,"dot_needed":"142,607,909"},{"time_hours":504,"approval_perbill":538461538,"support_perbill":125000000,"approval":53.8461538,"support":12.5,"days":21,"dot_needed":"141,764,075"},{"time_hours":505,"approval_perbill":538180155,"support_perbill":124255953,"approval":53.8180155,"support":12.4255953,"days":22,"dot_needed":"140,920,242"},{"time_hours":506,"approval_perbill":537899543,"support_perbill":123511905,"approval":53.7899543,"support":12.3511905,"days":22,"dot_needed":"140,076,408"},{"time_hours":507,"approval_perbill":537619699,"support_perbill":122767858,"approval":53.7619699,"support":12.2767858,"days":22,"dot_needed":"139,232,575"},{"time_hours":508,"approval_perbill":537340619,"support_perbill":122023810,"approval":53.7340619,"support":12.202381,"days":22,"dot_needed":"138,388,740"},{"time_hours":509,"approval_perbill":537062301,"support_perbill":121279762,"approval":53.7062301,"support":12.1279762,"days":22,"dot_needed":"137,544,906"},{"time_hours":510,"approval_perbill":536784741,"support_perbill":120535715,"approval":53.6784741,"support":12.0535715,"days":22,"dot_needed":"136,701,073"},{"time_hours":511,"approval_perbill":536507936,"support_perbill":119791667,"approval":53.6507936,"support":11.9791667,"days":22,"dot_needed":"135,857,239"},{"time_hours":512,"approval_perbill":536231884,"support_perbill":119047620,"approval":53.6231884,"support":11.904762,"days":22,"dot_needed":"135,013,406"},{"time_hours":513,"approval_perbill":535956580,"support_perbill":118303572,"approval":53.595658,"support":11.8303572,"days":22,"dot_needed":"134,169,572"},{"time_hours":514,"approval_perbill":535682023,"support_perbill":117559524,"approval":53.5682023,"support":11.7559524,"days":22,"dot_needed":"133,325,737"},{"time_hours":515,"approval_perbill":535408209,"support_perbill":116815477,"approval":53.5408209,"support":11.6815477,"days":22,"dot_needed":"132,481,904"},{"time_hours":516,"approval_perbill":535135135,"support_perbill":116071429,"approval":53.5135135,"support":11.6071429,"days":22,"dot_needed":"131,638,070"},{"time_hours":517,"approval_perbill":534862798,"support_perbill":115327381,"approval":53.4862798,"support":11.5327381,"days":22,"dot_needed":"130,794,236"},{"time_hours":518,"approval_perbill":534591195,"support_perbill":114583334,"approval":53.4591195,"support":11.4583334,"days":22,"dot_needed":"129,950,403"},{"time_hours":519,"approval_perbill":534320323,"support_perbill":113839286,"approval":53.4320323,"support":11.3839286,"days":22,"dot_needed":"129,106,569"},{"time_hours":520,"approval_perbill":534050179,"support_perbill":113095239,"approval":53.4050179,"support":11.3095239,"days":22,"dot_needed":"128,262,736"},{"time_hours":521,"approval_perbill":533780760,"support_perbill":112351191,"approval":53.378076,"support":11.2351191,"days":22,"dot_needed":"127,418,901"},{"time_hours":522,"approval_perbill":533512064,"support_perbill":111607143,"approval":53.3512064,"support":11.1607143,"days":22,"dot_needed":"126,575,067"},{"time_hours":523,"approval_perbill":533244087,"support_perbill":110863096,"approval":53.3244087,"support":11.0863096,"days":22,"dot_needed":"125,731,234"},{"time_hours":524,"approval_perbill":532976827,"support_perbill":110119048,"approval":53.2976827,"support":11.0119048,"days":22,"dot_needed":"124,887,400"},{"time_hours":525,"approval_perbill":532710280,"support_perbill":109375000,"approval":53.271028,"support":10.9375,"days":22,"dot_needed":"124,043,566"},{"time_hours":526,"approval_perbill":532444444,"support_perbill":108630953,"approval":53.2444444,"support":10.8630953,"days":22,"dot_needed":"123,199,733"},{"time_hours":527,"approval_perbill":532179316,"support_perbill":107886905,"approval":53.2179316,"support":10.7886905,"days":22,"dot_needed":"122,355,898"},{"time_hours":528,"approval_perbill":531914893,"support_perbill":107142858,"approval":53.1914893,"support":10.7142858,"days":22,"dot_needed":"121,512,065"},{"time_hours":529,"approval_perbill":531651173,"support_perbill":106398810,"approval":53.1651173,"support":10.639881,"days":23,"dot_needed":"120,668,231"},{"time_hours":530,"approval_perbill":531388152,"support_perbill":105654762,"approval":53.1388152,"support":10.5654762,"days":23,"dot_needed":"119,824,397"},{"time_hours":531,"approval_perbill":531125827,"support_perbill":104910715,"approval":53.1125827,"support":10.4910715,"days":23,"dot_needed":"118,980,564"},{"time_hours":532,"approval_perbill":530864197,"support_perbill":104166667,"approval":53.0864197,"support":10.4166667,"days":23,"dot_needed":"118,136,730"},{"time_hours":533,"approval_perbill":530603258,"support_perbill":103422620,"approval":53.0603258,"support":10.342262,"days":23,"dot_needed":"117,292,896"},{"time_hours":534,"approval_perbill":530343007,"support_perbill":102678572,"approval":53.0343007,"support":10.2678572,"days":23,"dot_needed":"116,449,062"},{"time_hours":535,"approval_perbill":530083443,"support_perbill":101934524,"approval":53.0083443,"support":10.1934524,"days":23,"dot_needed":"115,605,228"},{"time_hours":536,"approval_perbill":529824561,"support_perbill":101190477,"approval":52.9824561,"support":10.1190477,"days":23,"dot_needed":"114,761,395"},{"time_hours":537,"approval_perbill":529566360,"support_perbill":100446429,"approval":52.956636,"support":10.0446429,"days":23,"dot_needed":"113,917,561"},{"time_hours":538,"approval_perbill":529308836,"support_perbill":99702381,"approval":52.9308836,"support":9.9702381,"days":23,"dot_needed":"113,073,727"},{"time_hours":539,"approval_perbill":529051987,"support_perbill":98958334,"approval":52.9051987,"support":9.8958334,"days":23,"dot_needed":"112,229,893"},{"time_hours":540,"approval_perbill":528795811,"support_perbill":98214286,"approval":52.8795811,"support":9.8214286,"days":23,"dot_needed":"111,386,059"},{"time_hours":541,"approval_perbill":528540305,"support_perbill":97470239,"approval":52.8540305,"support":9.7470239,"days":23,"dot_needed":"110,542,226"},{"time_hours":542,"approval_perbill":528285465,"support_perbill":96726191,"approval":52.8285465,"support":9.6726191,"days":23,"dot_needed":"109,698,392"},{"time_hours":543,"approval_perbill":528031290,"support_perbill":95982143,"approval":52.803129,"support":9.5982143,"days":23,"dot_needed":"108,854,558"},{"time_hours":544,"approval_perbill":527777777,"support_perbill":95238096,"approval":52.7777777,"support":9.5238096,"days":23,"dot_needed":"108,010,725"},{"time_hours":545,"approval_perbill":527524924,"support_perbill":94494048,"approval":52.7524924,"support":9.4494048,"days":23,"dot_needed":"107,166,890"},{"time_hours":546,"approval_perbill":527272727,"support_perbill":93750000,"approval":52.7272727,"support":9.375,"days":23,"dot_needed":"106,323,056"},{"time_hours":547,"approval_perbill":527021184,"support_perbill":93005953,"approval":52.7021184,"support":9.3005953,"days":23,"dot_needed":"105,479,223"},{"time_hours":548,"approval_perbill":526770293,"support_perbill":92261905,"approval":52.6770293,"support":9.2261905,"days":23,"dot_needed":"104,635,389"},{"time_hours":549,"approval_perbill":526520051,"support_perbill":91517858,"approval":52.6520051,"support":9.1517858,"days":23,"dot_needed":"103,791,556"},{"time_hours":550,"approval_perbill":526270456,"support_perbill":90773810,"approval":52.6270456,"support":9.077381,"days":23,"dot_needed":"102,947,722"},{"time_hours":551,"approval_perbill":526021505,"support_perbill":90029762,"approval":52.6021505,"support":9.0029762,"days":23,"dot_needed":"102,103,887"},{"time_hours":552,"approval_perbill":525773195,"support_perbill":89285715,"approval":52.5773195,"support":8.9285715,"days":23,"dot_needed":"101,260,054"},{"time_hours":553,"approval_perbill":525525525,"support_perbill":88541667,"approval":52.5525525,"support":8.8541667,"days":24,"dot_needed":"100,416,220"},{"time_hours":554,"approval_perbill":525278491,"support_perbill":87797620,"approval":52.5278491,"support":8.779762,"days":24,"dot_needed":"99,572,387"},{"time_hours":555,"approval_perbill":525032092,"support_perbill":87053572,"approval":52.5032092,"support":8.7053572,"days":24,"dot_needed":"98,728,553"},{"time_hours":556,"approval_perbill":524786324,"support_perbill":86309524,"approval":52.4786324,"support":8.6309524,"days":24,"dot_needed":"97,884,719"},{"time_hours":557,"approval_perbill":524541186,"support_perbill":85565477,"approval":52.4541186,"support":8.5565477,"days":24,"dot_needed":"97,040,886"},{"time_hours":558,"approval_perbill":524296675,"support_perbill":84821429,"approval":52.4296675,"support":8.4821429,"days":24,"dot_needed":"96,197,051"},{"time_hours":559,"approval_perbill":524052788,"support_perbill":84077381,"approval":52.4052788,"support":8.4077381,"days":24,"dot_needed":"95,353,217"},{"time_hours":560,"approval_perbill":523809523,"support_perbill":83333334,"approval":52.3809523,"support":8.3333334,"days":24,"dot_needed":"94,509,384"},{"time_hours":561,"approval_perbill":523566878,"support_perbill":82589286,"approval":52.3566878,"support":8.2589286,"days":24,"dot_needed":"93,665,550"},{"time_hours":562,"approval_perbill":523324851,"support_perbill":81845239,"approval":52.3324851,"support":8.1845239,"days":24,"dot_needed":"92,821,717"},{"time_hours":563,"approval_perbill":523083439,"support_perbill":81101191,"approval":52.3083439,"support":8.1101191,"days":24,"dot_needed":"91,977,883"},{"time_hours":564,"approval_perbill":522842639,"support_perbill":80357143,"approval":52.2842639,"support":8.0357143,"days":24,"dot_needed":"91,134,048"},{"time_hours":565,"approval_perbill":522602450,"support_perbill":79613096,"approval":52.260245,"support":7.9613096,"days":24,"dot_needed":"90,290,215"},{"time_hours":566,"approval_perbill":522362869,"support_perbill":78869048,"approval":52.2362869,"support":7.8869048,"days":24,"dot_needed":"89,446,381"},{"time_hours":567,"approval_perbill":522123893,"support_perbill":78125000,"approval":52.2123893,"support":7.8125,"days":24,"dot_needed":"88,602,547"},{"time_hours":568,"approval_perbill":521885521,"support_perbill":77380953,"approval":52.1885521,"support":7.7380953,"days":24,"dot_needed":"87,758,714"},{"time_hours":569,"approval_perbill":521647751,"support_perbill":76636905,"approval":52.1647751,"support":7.6636905,"days":24,"dot_needed":"86,914,880"},{"time_hours":570,"approval_perbill":521410579,"support_perbill":75892858,"approval":52.1410579,"support":7.5892858,"days":24,"dot_needed":"86,071,047"},{"time_hours":571,"approval_perbill":521174004,"support_perbill":75148810,"approval":52.1174004,"support":7.514881,"days":24,"dot_needed":"85,227,212"},{"time_hours":572,"approval_perbill":520938023,"support_perbill":74404762,"approval":52.0938023,"support":7.4404762,"days":24,"dot_needed":"84,383,378"},{"time_hours":573,"approval_perbill":520702634,"support_perbill":73660715,"approval":52.0702634,"support":7.3660715,"days":24,"dot_needed":"83,539,545"},{"time_hours":574,"approval_perbill":520467836,"support_perbill":72916667,"approval":52.0467836,"support":7.2916667,"days":24,"dot_needed":"82,695,711"},{"time_hours":575,"approval_perbill":520233625,"support_perbill":72172620,"approval":52.0233625,"support":7.217262,"days":24,"dot_needed":"81,851,878"},{"time_hours":576,"approval_perbill":519999999,"support_perbill":71428572,"approval":51.9999999,"support":7.1428572,"days":24,"dot_needed":"81,008,044"},{"time_hours":577,"approval_perbill":519766957,"support_perbill":70684524,"approval":51.9766957,"support":7.0684524,"days":25,"dot_needed":"80,164,209"},{"time_hours":578,"approval_perbill":519534497,"support_perbill":69940477,"approval":51.9534497,"support":6.9940477,"days":25,"dot_needed":"79,320,376"},{"time_hours":579,"approval_perbill":519302615,"support_perbill":69196429,"approval":51.9302615,"support":6.9196429,"days":25,"dot_needed":"78,476,542"},{"time_hours":580,"approval_perbill":519071310,"support_perbill":68452381,"approval":51.907131,"support":6.8452381,"days":25,"dot_needed":"77,632,708"},{"time_hours":581,"approval_perbill":518840579,"support_perbill":67708334,"approval":51.8840579,"support":6.7708334,"days":25,"dot_needed":"76,788,875"},{"time_hours":582,"approval_perbill":518610421,"support_perbill":66964286,"approval":51.8610421,"support":6.6964286,"days":25,"dot_needed":"75,945,041"},{"time_hours":583,"approval_perbill":518380834,"support_perbill":66220239,"approval":51.8380834,"support":6.6220239,"days":25,"dot_needed":"75,101,207"},{"time_hours":584,"approval_perbill":518151815,"support_perbill":65476191,"approval":51.8151815,"support":6.5476191,"days":25,"dot_needed":"74,257,373"},{"time_hours":585,"approval_perbill":517923362,"support_perbill":64732143,"approval":51.7923362,"support":6.4732143,"days":25,"dot_needed":"73,413,539"},{"time_hours":586,"approval_perbill":517695473,"support_perbill":63988096,"approval":51.7695473,"support":6.3988096,"days":25,"dot_needed":"72,569,706"},{"time_hours":587,"approval_perbill":517468146,"support_perbill":63244048,"approval":51.7468146,"support":6.3244048,"days":25,"dot_needed":"71,725,872"},{"time_hours":588,"approval_perbill":517241379,"support_perbill":62500000,"approval":51.7241379,"support":6.25,"days":25,"dot_needed":"70,882,038"},{"time_hours":589,"approval_perbill":517015170,"support_perbill":61755953,"approval":51.701517,"support":6.1755953,"days":25,"dot_needed":"70,038,204"},{"time_hours":590,"approval_perbill":516789516,"support_perbill":61011905,"approval":51.6789516,"support":6.1011905,"days":25,"dot_needed":"69,194,370"},{"time_hours":591,"approval_perbill":516564417,"support_perbill":60267858,"approval":51.6564417,"support":6.0267858,"days":25,"dot_needed":"68,350,537"},{"time_hours":592,"approval_perbill":516339869,"support_perbill":59523810,"approval":51.6339869,"support":5.952381,"days":25,"dot_needed":"67,506,703"},{"time_hours":593,"approval_perbill":516115870,"support_perbill":58779762,"approval":51.611587,"support":5.8779762,"days":25,"dot_needed":"66,662,869"},{"time_hours":594,"approval_perbill":515892420,"support_perbill":58035715,"approval":51.589242,"support":5.8035715,"days":25,"dot_needed":"65,819,036"},{"time_hours":595,"approval_perbill":515669515,"support_perbill":57291667,"approval":51.5669515,"support":5.7291667,"days":25,"dot_needed":"64,975,201"},{"time_hours":596,"approval_perbill":515447154,"support_perbill":56547620,"approval":51.5447154,"support":5.654762,"days":25,"dot_needed":"64,131,368"},{"time_hours":597,"approval_perbill":515225334,"support_perbill":55803572,"approval":51.5225334,"support":5.5803572,"days":25,"dot_needed":"63,287,534"},{"time_hours":598,"approval_perbill":515004055,"support_perbill":55059524,"approval":51.5004055,"support":5.5059524,"days":25,"dot_needed":"62,443,700"},{"time_hours":599,"approval_perbill":514783313,"support_perbill":54315477,"approval":51.4783313,"support":5.4315477,"days":25,"dot_needed":"61,599,867"},{"time_hours":600,"approval_perbill":514563106,"support_perbill":53571429,"approval":51.4563106,"support":5.3571429,"days":25,"dot_needed":"60,756,033"},{"time_hours":601,"approval_perbill":514343434,"support_perbill":52827381,"approval":51.4343434,"support":5.2827381,"days":26,"dot_needed":"59,912,198"},{"time_hours":602,"approval_perbill":514124293,"support_perbill":52083334,"approval":51.4124293,"support":5.2083334,"days":26,"dot_needed":"59,068,365"},{"time_hours":603,"approval_perbill":513905683,"support_perbill":51339286,"approval":51.3905683,"support":5.1339286,"days":26,"dot_needed":"58,224,531"},{"time_hours":604,"approval_perbill":513687600,"support_perbill":50595239,"approval":51.36876,"support":5.0595239,"days":26,"dot_needed":"57,380,698"},{"time_hours":605,"approval_perbill":513470044,"support_perbill":49851191,"approval":51.3470044,"support":4.9851191,"days":26,"dot_needed":"56,536,864"},{"time_hours":606,"approval_perbill":513253011,"support_perbill":49107143,"approval":51.3253011,"support":4.9107143,"days":26,"dot_needed":"55,693,030"},{"time_hours":607,"approval_perbill":513036502,"support_perbill":48363096,"approval":51.3036502,"support":4.8363096,"days":26,"dot_needed":"54,849,197"},{"time_hours":608,"approval_perbill":512820512,"support_perbill":47619048,"approval":51.2820512,"support":4.7619048,"days":26,"dot_needed":"54,005,362"},{"time_hours":609,"approval_perbill":512605041,"support_perbill":46875000,"approval":51.2605041,"support":4.6875,"days":26,"dot_needed":"53,161,528"},{"time_hours":610,"approval_perbill":512390087,"support_perbill":46130953,"approval":51.2390087,"support":4.6130953,"days":26,"dot_needed":"52,317,695"},{"time_hours":611,"approval_perbill":512175648,"support_perbill":45386905,"approval":51.2175648,"support":4.5386905,"days":26,"dot_needed":"51,473,861"},{"time_hours":612,"approval_perbill":511961722,"support_perbill":44642858,"approval":51.1961722,"support":4.4642858,"days":26,"dot_needed":"50,630,028"},{"time_hours":613,"approval_perbill":511748307,"support_perbill":43898810,"approval":51.1748307,"support":4.389881,"days":26,"dot_needed":"49,786,194"},{"time_hours":614,"approval_perbill":511535401,"support_perbill":43154762,"approval":51.1535401,"support":4.3154762,"days":26,"dot_needed":"48,942,359"},{"time_hours":615,"approval_perbill":511323003,"support_perbill":42410715,"approval":51.1323003,"support":4.2410715,"days":26,"dot_needed":"48,098,526"},{"time_hours":616,"approval_perbill":511111111,"support_perbill":41666667,"approval":51.1111111,"support":4.1666667,"days":26,"dot_needed":"47,254,692"},{"time_hours":617,"approval_perbill":510899722,"support_perbill":40922620,"approval":51.0899722,"support":4.092262,"days":26,"dot_needed":"46,410,859"},{"time_hours":618,"approval_perbill":510688835,"support_perbill":40178572,"approval":51.0688835,"support":4.0178572,"days":26,"dot_needed":"45,567,025"},{"time_hours":619,"approval_perbill":510478449,"support_perbill":39434524,"approval":51.0478449,"support":3.9434524,"days":26,"dot_needed":"44,723,191"},{"time_hours":620,"approval_perbill":510268562,"support_perbill":38690477,"approval":51.0268562,"support":3.8690477,"days":26,"dot_needed":"43,879,357"},{"time_hours":621,"approval_perbill":510059171,"support_perbill":37946429,"approval":51.0059171,"support":3.7946429,"days":26,"dot_needed":"43,035,523"},{"time_hours":622,"approval_perbill":509850275,"support_perbill":37202381,"approval":50.9850275,"support":3.7202381,"days":26,"dot_needed":"42,191,689"},{"time_hours":623,"approval_perbill":509641873,"support_perbill":36458334,"approval":50.9641873,"support":3.6458334,"days":26,"dot_needed":"41,347,856"},{"time_hours":624,"approval_perbill":509433962,"support_perbill":35714286,"approval":50.9433962,"support":3.5714286,"days":26,"dot_needed":"40,504,022"},{"time_hours":625,"approval_perbill":509226540,"support_perbill":34970239,"approval":50.922654,"support":3.4970239,"days":27,"dot_needed":"39,660,189"},{"time_hours":626,"approval_perbill":509019607,"support_perbill":34226191,"approval":50.9019607,"support":3.4226191,"days":27,"dot_needed":"38,816,354"},{"time_hours":627,"approval_perbill":508813160,"support_perbill":33482143,"approval":50.881316,"support":3.3482143,"days":27,"dot_needed":"37,972,520"},{"time_hours":628,"approval_perbill":508607198,"support_perbill":32738096,"approval":50.8607198,"support":3.2738096,"days":27,"dot_needed":"37,128,687"},{"time_hours":629,"approval_perbill":508401719,"support_perbill":31994048,"approval":50.8401719,"support":3.1994048,"days":27,"dot_needed":"36,284,853"},{"time_hours":630,"approval_perbill":508196721,"support_perbill":31250000,"approval":50.8196721,"support":3.125,"days":27,"dot_needed":"35,441,019"},{"time_hours":631,"approval_perbill":507992202,"support_perbill":30505953,"approval":50.7992202,"support":3.0505953,"days":27,"dot_needed":"34,597,186"},{"time_hours":632,"approval_perbill":507788161,"support_perbill":29761905,"approval":50.7788161,"support":2.9761905,"days":27,"dot_needed":"33,753,351"},{"time_hours":633,"approval_perbill":507584597,"support_perbill":29017858,"approval":50.7584597,"support":2.9017858,"days":27,"dot_needed":"32,909,518"},{"time_hours":634,"approval_perbill":507381507,"support_perbill":28273810,"approval":50.7381507,"support":2.827381,"days":27,"dot_needed":"32,065,684"},{"time_hours":635,"approval_perbill":507178890,"support_perbill":27529762,"approval":50.717889,"support":2.7529762,"days":27,"dot_needed":"31,221,850"},{"time_hours":636,"approval_perbill":506976744,"support_perbill":26785715,"approval":50.6976744,"support":2.6785715,"days":27,"dot_needed":"30,378,017"},{"time_hours":637,"approval_perbill":506775067,"support_perbill":26041667,"approval":50.6775067,"support":2.6041667,"days":27,"dot_needed":"29,534,183"},{"time_hours":638,"approval_perbill":506573859,"support_perbill":25297620,"approval":50.6573859,"support":2.529762,"days":27,"dot_needed":"28,690,350"},{"time_hours":639,"approval_perbill":506373116,"support_perbill":24553572,"approval":50.6373116,"support":2.4553572,"days":27,"dot_needed":"27,846,515"},{"time_hours":640,"approval_perbill":506172839,"support_perbill":23809524,"approval":50.6172839,"support":2.3809524,"days":27,"dot_needed":"27,002,681"},{"time_hours":641,"approval_perbill":505973024,"support_perbill":23065477,"approval":50.5973024,"support":2.3065477,"days":27,"dot_needed":"26,158,848"},{"time_hours":642,"approval_perbill":505773671,"support_perbill":22321429,"approval":50.5773671,"support":2.2321429,"days":27,"dot_needed":"25,315,014"},{"time_hours":643,"approval_perbill":505574778,"support_perbill":21577381,"approval":50.5574778,"support":2.1577381,"days":27,"dot_needed":"24,471,180"},{"time_hours":644,"approval_perbill":505376343,"support_perbill":20833334,"approval":50.5376343,"support":2.0833334,"days":27,"dot_needed":"23,627,347"},{"time_hours":645,"approval_perbill":505178365,"support_perbill":20089286,"approval":50.5178365,"support":2.0089286,"days":27,"dot_needed":"22,783,512"},{"time_hours":646,"approval_perbill":504980842,"support_perbill":19345239,"approval":50.4980842,"support":1.9345239,"days":27,"dot_needed":"21,939,679"},{"time_hours":647,"approval_perbill":504783773,"support_perbill":18601191,"approval":50.4783773,"support":1.8601191,"days":27,"dot_needed":"21,095,845"},{"time_hours":648,"approval_perbill":504587155,"support_perbill":17857143,"approval":50.4587155,"support":1.7857143,"days":27,"dot_needed":"20,252,011"},{"time_hours":649,"approval_perbill":504390988,"support_perbill":17113096,"approval":50.4390988,"support":1.7113096,"days":28,"dot_needed":"19,408,178"},{"time_hours":650,"approval_perbill":504195270,"support_perbill":16369048,"approval":50.419527,"support":1.6369048,"days":28,"dot_needed":"18,564,344"},{"time_hours":651,"approval_perbill":503999999,"support_perbill":15625000,"approval":50.3999999,"support":1.5625,"days":28,"dot_needed":"17,720,509"},{"time_hours":652,"approval_perbill":503805174,"support_perbill":14880953,"approval":50.3805174,"support":1.4880953,"days":28,"dot_needed":"16,876,676"},{"time_hours":653,"approval_perbill":503610794,"support_perbill":14136905,"approval":50.3610794,"support":1.4136905,"days":28,"dot_needed":"16,032,842"},{"time_hours":654,"approval_perbill":503416856,"support_perbill":13392858,"approval":50.3416856,"support":1.3392858,"days":28,"dot_needed":"15,189,009"},{"time_hours":655,"approval_perbill":503223359,"support_perbill":12648810,"approval":50.3223359,"support":1.264881,"days":28,"dot_needed":"14,345,175"},{"time_hours":656,"approval_perbill":503030302,"support_perbill":11904762,"approval":50.3030302,"support":1.1904762,"days":28,"dot_needed":"13,501,341"},{"time_hours":657,"approval_perbill":502837684,"support_perbill":11160715,"approval":50.2837684,"support":1.1160715,"days":28,"dot_needed":"12,657,508"},{"time_hours":658,"approval_perbill":502645502,"support_perbill":10416667,"approval":50.2645502,"support":1.0416667,"days":28,"dot_needed":"11,813,673"},{"time_hours":659,"approval_perbill":502453756,"support_perbill":9672620,"approval":50.2453756,"support":0.967262,"days":28,"dot_needed":"10,969,840"},{"time_hours":660,"approval_perbill":502262443,"support_perbill":8928572,"approval":50.2262443,"support":0.8928572,"days":28,"dot_needed":"10,126,006"},{"time_hours":661,"approval_perbill":502071562,"support_perbill":8184524,"approval":50.2071562,"support":0.8184524,"days":28,"dot_needed":"9,282,172"},{"time_hours":662,"approval_perbill":501881113,"support_perbill":7440477,"approval":50.1881113,"support":0.7440477,"days":28,"dot_needed":"8,438,339"},{"time_hours":663,"approval_perbill":501691093,"support_perbill":6696429,"approval":50.1691093,"support":0.6696429,"days":28,"dot_needed":"7,594,505"},{"time_hours":664,"approval_perbill":501501501,"support_perbill":5952381,"approval":50.1501501,"support":0.5952381,"days":28,"dot_needed":"6,750,670"},{"time_hours":665,"approval_perbill":501312335,"support_perbill":5208334,"approval":50.1312335,"support":0.5208334,"days":28,"dot_needed":"5,906,837"},{"time_hours":666,"approval_perbill":501123595,"support_perbill":4464286,"approval":50.1123595,"support":0.4464286,"days":28,"dot_needed":"5,063,003"},{"time_hours":667,"approval_perbill":500935278,"support_perbill":3720239,"approval":50.0935278,"support":0.3720239,"days":28,"dot_needed":"4,219,170"},{"time_hours":668,"approval_perbill":500747383,"support_perbill":2976191,"approval":50.0747383,"support":0.2976191,"days":28,"dot_needed":"3,375,336"},{"time_hours":669,"approval_perbill":500559910,"support_perbill":2232143,"approval":50.055991,"support":0.2232143,"days":28,"dot_needed":"2,531,502"},{"time_hours":670,"approval_perbill":500372855,"support_perbill":1488096,"approval":50.0372855,"support":0.1488096,"days":28,"dot_needed":"1,687,668"},{"time_hours":671,"approval_perbill":500186219,"support_perbill":744048,"approval":50.0186219,"support":0.0744048,"days":28,"dot_needed":"843,834"},{"time_hours":672,"approval_perbill":499999999,"support_perbill":0,"approval":49.9999999,"support":0,"days":28,"dot_needed":0}]')},19752:p=>{"use strict";p.exports=JSON.parse('[{"time_hours":0,"approval_perbill":1000000000,"support_perbill":500000026,"approval":100,"support":50.0000026},{"time_hours":1,"approval_perbill":998774510,"support_perbill":455636061,"approval":99.877451,"support":45.5636061},{"time_hours":2,"approval_perbill":997549020,"support_perbill":418401359,"approval":99.754902,"support":41.8401359},{"time_hours":3,"approval_perbill":996323530,"support_perbill":386705228,"approval":99.632353,"support":38.6705228},{"time_hours":4,"approval_perbill":995098040,"support_perbill":359397443,"approval":99.509804,"support":35.9397443},{"time_hours":5,"approval_perbill":993872550,"support_perbill":335625639,"approval":99.387255,"support":33.5625639},{"time_hours":6,"approval_perbill":992647060,"support_perbill":314744813,"approval":99.264706,"support":31.4744813},{"time_hours":7,"approval_perbill":991421570,"support_perbill":296257808,"approval":99.142157,"support":29.6257808},{"time_hours":8,"approval_perbill":990196080,"support_perbill":279775293,"approval":99.019608,"support":27.9775293},{"time_hours":9,"approval_perbill":988970589,"support_perbill":264988013,"approval":98.8970589,"support":26.4988013},{"time_hours":10,"approval_perbill":987745099,"support_perbill":251647242,"approval":98.7745099,"support":25.1647242},{"time_hours":11,"approval_perbill":986519609,"support_perbill":239550622,"approval":98.6519609,"support":23.9550622},{"time_hours":12,"approval_perbill":985294119,"support_perbill":228531862,"approval":98.5294119,"support":22.8531862},{"time_hours":13,"approval_perbill":984068628,"support_perbill":218453039,"approval":98.4068628,"support":21.8453039},{"time_hours":14,"approval_perbill":982843138,"support_perbill":209198815,"approval":98.2843138,"support":20.9198815},{"time_hours":15,"approval_perbill":981617648,"support_perbill":200671963,"approval":98.1617648,"support":20.0671963},{"time_hours":16,"approval_perbill":980392158,"support_perbill":192789972,"approval":98.0392158,"support":19.2789972},{"time_hours":17,"approval_perbill":979166667,"support_perbill":185482348,"approval":97.9166667,"support":18.5482348},{"time_hours":18,"approval_perbill":977941177,"support_perbill":178688524,"approval":97.7941177,"support":17.8688524},{"time_hours":19,"approval_perbill":976715687,"support_perbill":172356151,"approval":97.6715687,"support":17.2356151},{"time_hours":20,"approval_perbill":975490197,"support_perbill":166439756,"approval":97.5490197,"support":16.6439756},{"time_hours":21,"approval_perbill":974264706,"support_perbill":160899652,"approval":97.4264706,"support":16.0899652},{"time_hours":22,"approval_perbill":973039216,"support_perbill":155701053,"approval":97.3039216,"support":15.5701053},{"time_hours":23,"approval_perbill":971813726,"support_perbill":150813323,"approval":97.1813726,"support":15.0813323},{"time_hours":24,"approval_perbill":970588236,"support_perbill":146209386,"approval":97.0588236,"support":14.6209386},{"time_hours":25,"approval_perbill":969362746,"support_perbill":141865225,"approval":96.9362746,"support":14.1865225},{"time_hours":26,"approval_perbill":968137256,"support_perbill":137759452,"approval":96.8137256,"support":13.7759452},{"time_hours":27,"approval_perbill":966911766,"support_perbill":133872975,"approval":96.6911766,"support":13.3872975},{"time_hours":28,"approval_perbill":965686276,"support_perbill":130188679,"approval":96.5686276,"support":13.0188679},{"time_hours":29,"approval_perbill":964460786,"support_perbill":126691186,"approval":96.4460786,"support":12.6691186},{"time_hours":30,"approval_perbill":963235295,"support_perbill":123366639,"approval":96.3235295,"support":12.3366639},{"time_hours":31,"approval_perbill":962009805,"support_perbill":120202524,"approval":96.2009805,"support":12.0202524},{"time_hours":32,"approval_perbill":960784315,"support_perbill":117187499,"approval":96.0784315,"support":11.7187499},{"time_hours":33,"approval_perbill":959558825,"support_perbill":114311269,"approval":95.9558825,"support":11.4311269},{"time_hours":34,"approval_perbill":958333334,"support_perbill":111564465,"approval":95.8333334,"support":11.1564465},{"time_hours":35,"approval_perbill":957107844,"support_perbill":108938546,"approval":95.7107844,"support":10.8938546},{"time_hours":36,"approval_perbill":955882354,"support_perbill":106425701,"approval":95.5882354,"support":10.6425701},{"time_hours":37,"approval_perbill":954656864,"support_perbill":104018782,"approval":95.4656864,"support":10.4018782},{"time_hours":38,"approval_perbill":953431373,"support_perbill":101711228,"approval":95.3431373,"support":10.1711228},{"time_hours":39,"approval_perbill":952205883,"support_perbill":99497012,"approval":95.2205883,"support":9.9497012},{"time_hours":40,"approval_perbill":950980393,"support_perbill":97370582,"approval":95.0980393,"support":9.7370582},{"time_hours":41,"approval_perbill":949754903,"support_perbill":95326819,"approval":94.9754903,"support":9.5326819},{"time_hours":42,"approval_perbill":948529412,"support_perbill":93360994,"approval":94.8529412,"support":9.3360994},{"time_hours":43,"approval_perbill":947303922,"support_perbill":91468733,"approval":94.7303922,"support":9.1468733},{"time_hours":44,"approval_perbill":946078432,"support_perbill":89645982,"approval":94.6078432,"support":8.9645982},{"time_hours":45,"approval_perbill":944852942,"support_perbill":87888981,"approval":94.4852942,"support":8.7888981},{"time_hours":46,"approval_perbill":943627452,"support_perbill":86194234,"approval":94.3627452,"support":8.6194234},{"time_hours":47,"approval_perbill":942401961,"support_perbill":84558490,"approval":94.2401961,"support":8.455849},{"time_hours":48,"approval_perbill":941176471,"support_perbill":82978722,"approval":94.1176471,"support":8.2978722},{"time_hours":49,"approval_perbill":939950981,"support_perbill":81452103,"approval":93.9950981,"support":8.1452103},{"time_hours":50,"approval_perbill":938725491,"support_perbill":79975997,"approval":93.8725491,"support":7.9975997},{"time_hours":51,"approval_perbill":937500001,"support_perbill":78547936,"approval":93.7500001,"support":7.8547936},{"time_hours":52,"approval_perbill":936274511,"support_perbill":77165614,"approval":93.6274511,"support":7.7165614},{"time_hours":53,"approval_perbill":935049021,"support_perbill":75826867,"approval":93.5049021,"support":7.5826867},{"time_hours":54,"approval_perbill":933823531,"support_perbill":74529666,"approval":93.3823531,"support":7.4529666},{"time_hours":55,"approval_perbill":932598040,"support_perbill":73272106,"approval":93.259804,"support":7.3272106},{"time_hours":56,"approval_perbill":931372550,"support_perbill":72052400,"approval":93.137255,"support":7.20524},{"time_hours":57,"approval_perbill":930147060,"support_perbill":70868862,"approval":93.014706,"support":7.0868862},{"time_hours":58,"approval_perbill":928921570,"support_perbill":69719908,"approval":92.892157,"support":6.9719908},{"time_hours":59,"approval_perbill":927696079,"support_perbill":68604042,"approval":92.7696079,"support":6.8604042},{"time_hours":60,"approval_perbill":926470589,"support_perbill":67519857,"approval":92.6470589,"support":6.7519857},{"time_hours":61,"approval_perbill":925245099,"support_perbill":66466022,"approval":92.5245099,"support":6.6466022},{"time_hours":62,"approval_perbill":924019609,"support_perbill":65441280,"approval":92.4019609,"support":6.544128},{"time_hours":63,"approval_perbill":922794118,"support_perbill":64444443,"approval":92.2794118,"support":6.4444443},{"time_hours":64,"approval_perbill":921568628,"support_perbill":63474386,"approval":92.1568628,"support":6.3474386},{"time_hours":65,"approval_perbill":920343138,"support_perbill":62530044,"approval":92.0343138,"support":6.2530044},{"time_hours":66,"approval_perbill":919117648,"support_perbill":61610409,"approval":91.9117648,"support":6.1610409},{"time_hours":67,"approval_perbill":917892158,"support_perbill":60714523,"approval":91.7892158,"support":6.0714523},{"time_hours":68,"approval_perbill":916666667,"support_perbill":59841478,"approval":91.6666667,"support":5.9841478},{"time_hours":69,"approval_perbill":915441177,"support_perbill":58990411,"approval":91.5441177,"support":5.8990411},{"time_hours":70,"approval_perbill":914215687,"support_perbill":58160504,"approval":91.4215687,"support":5.8160504},{"time_hours":71,"approval_perbill":912990197,"support_perbill":57350975,"approval":91.2990197,"support":5.7350975},{"time_hours":72,"approval_perbill":911764706,"support_perbill":56561084,"approval":91.1764706,"support":5.6561084},{"time_hours":73,"approval_perbill":910539216,"support_perbill":55790126,"approval":91.0539216,"support":5.5790126},{"time_hours":74,"approval_perbill":909313726,"support_perbill":55037426,"approval":90.9313726,"support":5.5037426},{"time_hours":75,"approval_perbill":908088236,"support_perbill":54302345,"approval":90.8088236,"support":5.4302345},{"time_hours":76,"approval_perbill":906862746,"support_perbill":53584271,"approval":90.6862746,"support":5.3584271},{"time_hours":77,"approval_perbill":905637256,"support_perbill":52882620,"approval":90.5637256,"support":5.288262},{"time_hours":78,"approval_perbill":904411766,"support_perbill":52196835,"approval":90.4411766,"support":5.2196835},{"time_hours":79,"approval_perbill":903186276,"support_perbill":51526385,"approval":90.3186276,"support":5.1526385},{"time_hours":80,"approval_perbill":901960785,"support_perbill":50870759,"approval":90.1960785,"support":5.0870759},{"time_hours":81,"approval_perbill":900735295,"support_perbill":50229473,"approval":90.0735295,"support":5.0229473},{"time_hours":82,"approval_perbill":899509805,"support_perbill":49602061,"approval":89.9509805,"support":4.9602061},{"time_hours":83,"approval_perbill":898284315,"support_perbill":48988077,"approval":89.8284315,"support":4.8988077},{"time_hours":84,"approval_perbill":897058824,"support_perbill":48387095,"approval":89.7058824,"support":4.8387095},{"time_hours":85,"approval_perbill":895833334,"support_perbill":47798707,"approval":89.5833334,"support":4.7798707},{"time_hours":86,"approval_perbill":894607844,"support_perbill":47222519,"approval":89.4607844,"support":4.7222519},{"time_hours":87,"approval_perbill":893382354,"support_perbill":46658158,"approval":89.3382354,"support":4.6658158},{"time_hours":88,"approval_perbill":892156864,"support_perbill":46105262,"approval":89.2156864,"support":4.6105262},{"time_hours":89,"approval_perbill":890931373,"support_perbill":45563485,"approval":89.0931373,"support":4.5563485},{"time_hours":90,"approval_perbill":889705883,"support_perbill":45032496,"approval":88.9705883,"support":4.5032496},{"time_hours":91,"approval_perbill":888480393,"support_perbill":44511976,"approval":88.8480393,"support":4.4511976},{"time_hours":92,"approval_perbill":887254903,"support_perbill":44001617,"approval":88.7254903,"support":4.4001617},{"time_hours":93,"approval_perbill":886029412,"support_perbill":43501126,"approval":88.6029412,"support":4.3501126},{"time_hours":94,"approval_perbill":884803922,"support_perbill":43010218,"approval":88.4803922,"support":4.3010218},{"time_hours":95,"approval_perbill":883578432,"support_perbill":42528621,"approval":88.3578432,"support":4.2528621},{"time_hours":96,"approval_perbill":882352942,"support_perbill":42056074,"approval":88.2352942,"support":4.2056074},{"time_hours":97,"approval_perbill":881127452,"support_perbill":41592321,"approval":88.1127452,"support":4.1592321},{"time_hours":98,"approval_perbill":879901962,"support_perbill":41137122,"approval":87.9901962,"support":4.1137122},{"time_hours":99,"approval_perbill":878676472,"support_perbill":40690242,"approval":87.8676472,"support":4.0690242},{"time_hours":100,"approval_perbill":877450982,"support_perbill":40251453,"approval":87.7450982,"support":4.0251453},{"time_hours":101,"approval_perbill":876225491,"support_perbill":39820539,"approval":87.6225491,"support":3.9820539},{"time_hours":102,"approval_perbill":875000001,"support_perbill":39397289,"approval":87.5000001,"support":3.9397289},{"time_hours":103,"approval_perbill":873774511,"support_perbill":38981501,"approval":87.3774511,"support":3.8981501},{"time_hours":104,"approval_perbill":872549021,"support_perbill":38572980,"approval":87.2549021,"support":3.857298},{"time_hours":105,"approval_perbill":871323530,"support_perbill":38171535,"approval":87.132353,"support":3.8171535},{"time_hours":106,"approval_perbill":870098040,"support_perbill":37776985,"approval":87.009804,"support":3.7776985},{"time_hours":107,"approval_perbill":868872550,"support_perbill":37389155,"approval":86.887255,"support":3.7389155},{"time_hours":108,"approval_perbill":867647060,"support_perbill":37007873,"approval":86.764706,"support":3.7007873},{"time_hours":109,"approval_perbill":866421570,"support_perbill":36632975,"approval":86.642157,"support":3.6632975},{"time_hours":110,"approval_perbill":865196079,"support_perbill":36264302,"approval":86.5196079,"support":3.6264302},{"time_hours":111,"approval_perbill":863970589,"support_perbill":35901701,"approval":86.3970589,"support":3.5901701},{"time_hours":112,"approval_perbill":862745099,"support_perbill":35545023,"approval":86.2745099,"support":3.5545023},{"time_hours":113,"approval_perbill":861519609,"support_perbill":35194123,"approval":86.1519609,"support":3.5194123},{"time_hours":114,"approval_perbill":860294118,"support_perbill":34848862,"approval":86.0294118,"support":3.4848862},{"time_hours":115,"approval_perbill":859068628,"support_perbill":34509106,"approval":85.9068628,"support":3.4509106},{"time_hours":116,"approval_perbill":857843138,"support_perbill":34174724,"approval":85.7843138,"support":3.4174724},{"time_hours":117,"approval_perbill":856617648,"support_perbill":33845590,"approval":85.6617648,"support":3.384559},{"time_hours":118,"approval_perbill":855392157,"support_perbill":33521580,"approval":85.5392157,"support":3.352158},{"time_hours":119,"approval_perbill":854166667,"support_perbill":33202577,"approval":85.4166667,"support":3.3202577},{"time_hours":120,"approval_perbill":852941177,"support_perbill":32888464,"approval":85.2941177,"support":3.2888464},{"time_hours":121,"approval_perbill":851715687,"support_perbill":32579131,"approval":85.1715687,"support":3.2579131},{"time_hours":122,"approval_perbill":850490197,"support_perbill":32274469,"approval":85.0490197,"support":3.2274469},{"time_hours":123,"approval_perbill":849264707,"support_perbill":31974373,"approval":84.9264707,"support":3.1974373},{"time_hours":124,"approval_perbill":848039217,"support_perbill":31678741,"approval":84.8039217,"support":3.1678741},{"time_hours":125,"approval_perbill":846813727,"support_perbill":31387475,"approval":84.6813727,"support":3.1387475},{"time_hours":126,"approval_perbill":845588236,"support_perbill":31100477,"approval":84.5588236,"support":3.1100477},{"time_hours":127,"approval_perbill":844362746,"support_perbill":30817656,"approval":84.4362746,"support":3.0817656},{"time_hours":128,"approval_perbill":843137256,"support_perbill":30538921,"approval":84.3137256,"support":3.0538921},{"time_hours":129,"approval_perbill":841911766,"support_perbill":30264184,"approval":84.1911766,"support":3.0264184},{"time_hours":130,"approval_perbill":840686276,"support_perbill":29993358,"approval":84.0686276,"support":2.9993358},{"time_hours":131,"approval_perbill":839460785,"support_perbill":29726363,"approval":83.9460785,"support":2.9726363},{"time_hours":132,"approval_perbill":838235295,"support_perbill":29463116,"approval":83.8235295,"support":2.9463116},{"time_hours":133,"approval_perbill":837009805,"support_perbill":29203539,"approval":83.7009805,"support":2.9203539},{"time_hours":134,"approval_perbill":835784315,"support_perbill":28947556,"approval":83.5784315,"support":2.8947556},{"time_hours":135,"approval_perbill":834558824,"support_perbill":28695094,"approval":83.4558824,"support":2.8695094},{"time_hours":136,"approval_perbill":833333334,"support_perbill":28446079,"approval":83.3333334,"support":2.8446079},{"time_hours":137,"approval_perbill":832107844,"support_perbill":28200442,"approval":83.2107844,"support":2.8200442},{"time_hours":138,"approval_perbill":830882354,"support_perbill":27958114,"approval":83.0882354,"support":2.7958114},{"time_hours":139,"approval_perbill":829656863,"support_perbill":27719030,"approval":82.9656863,"support":2.771903},{"time_hours":140,"approval_perbill":828431373,"support_perbill":27483123,"approval":82.8431373,"support":2.7483123},{"time_hours":141,"approval_perbill":827205883,"support_perbill":27250333,"approval":82.7205883,"support":2.7250333},{"time_hours":142,"approval_perbill":825980393,"support_perbill":27020596,"approval":82.5980393,"support":2.7020596},{"time_hours":143,"approval_perbill":824754902,"support_perbill":26793853,"approval":82.4754902,"support":2.6793853},{"time_hours":144,"approval_perbill":823529412,"support_perbill":26570047,"approval":82.3529412,"support":2.6570047},{"time_hours":145,"approval_perbill":822303922,"support_perbill":26349121,"approval":82.2303922,"support":2.6349121},{"time_hours":146,"approval_perbill":821078432,"support_perbill":26131019,"approval":82.1078432,"support":2.6131019},{"time_hours":147,"approval_perbill":819852942,"support_perbill":25915687,"approval":81.9852942,"support":2.5915687},{"time_hours":148,"approval_perbill":818627452,"support_perbill":25703073,"approval":81.8627452,"support":2.5703073},{"time_hours":149,"approval_perbill":817401962,"support_perbill":25493126,"approval":81.7401962,"support":2.5493126},{"time_hours":150,"approval_perbill":816176472,"support_perbill":25285796,"approval":81.6176472,"support":2.5285796},{"time_hours":151,"approval_perbill":814950982,"support_perbill":25081035,"approval":81.4950982,"support":2.5081035},{"time_hours":152,"approval_perbill":813725491,"support_perbill":24878795,"approval":81.3725491,"support":2.4878795},{"time_hours":153,"approval_perbill":812500001,"support_perbill":24679029,"approval":81.2500001,"support":2.4679029},{"time_hours":154,"approval_perbill":811274511,"support_perbill":24481693,"approval":81.1274511,"support":2.4481693},{"time_hours":155,"approval_perbill":810049021,"support_perbill":24286742,"approval":81.0049021,"support":2.4286742},{"time_hours":156,"approval_perbill":808823530,"support_perbill":24094134,"approval":80.882353,"support":2.4094134},{"time_hours":157,"approval_perbill":807598040,"support_perbill":23903827,"approval":80.759804,"support":2.3903827},{"time_hours":158,"approval_perbill":806372550,"support_perbill":23715779,"approval":80.637255,"support":2.3715779},{"time_hours":159,"approval_perbill":805147060,"support_perbill":23529951,"approval":80.514706,"support":2.3529951},{"time_hours":160,"approval_perbill":803921569,"support_perbill":23346303,"approval":80.3921569,"support":2.3346303},{"time_hours":161,"approval_perbill":802696079,"support_perbill":23164797,"approval":80.2696079,"support":2.3164797},{"time_hours":162,"approval_perbill":801470589,"support_perbill":22985397,"approval":80.1470589,"support":2.2985397},{"time_hours":163,"approval_perbill":800245099,"support_perbill":22808065,"approval":80.0245099,"support":2.2808065},{"time_hours":164,"approval_perbill":799019608,"support_perbill":22632766,"approval":79.9019608,"support":2.2632766},{"time_hours":165,"approval_perbill":797794118,"support_perbill":22459466,"approval":79.7794118,"support":2.2459466},{"time_hours":166,"approval_perbill":796568628,"support_perbill":22288130,"approval":79.6568628,"support":2.228813},{"time_hours":167,"approval_perbill":795343138,"support_perbill":22118725,"approval":79.5343138,"support":2.2118725},{"time_hours":168,"approval_perbill":794117648,"support_perbill":21951219,"approval":79.4117648,"support":2.1951219},{"time_hours":169,"approval_perbill":792892158,"support_perbill":21785579,"approval":79.2892158,"support":2.1785579},{"time_hours":170,"approval_perbill":791666668,"support_perbill":21621776,"approval":79.1666668,"support":2.1621776},{"time_hours":171,"approval_perbill":790441178,"support_perbill":21459778,"approval":79.0441178,"support":2.1459778},{"time_hours":172,"approval_perbill":789215688,"support_perbill":21299556,"approval":78.9215688,"support":2.1299556},{"time_hours":173,"approval_perbill":787990197,"support_perbill":21141081,"approval":78.7990197,"support":2.1141081},{"time_hours":174,"approval_perbill":786764707,"support_perbill":20984324,"approval":78.6764707,"support":2.0984324},{"time_hours":175,"approval_perbill":785539217,"support_perbill":20829258,"approval":78.5539217,"support":2.0829258},{"time_hours":176,"approval_perbill":784313727,"support_perbill":20675855,"approval":78.4313727,"support":2.0675855},{"time_hours":177,"approval_perbill":783088236,"support_perbill":20524089,"approval":78.3088236,"support":2.0524089},{"time_hours":178,"approval_perbill":781862746,"support_perbill":20373934,"approval":78.1862746,"support":2.0373934},{"time_hours":179,"approval_perbill":780637256,"support_perbill":20225364,"approval":78.0637256,"support":2.0225364},{"time_hours":180,"approval_perbill":779411766,"support_perbill":20078354,"approval":77.9411766,"support":2.0078354},{"time_hours":181,"approval_perbill":778186275,"support_perbill":19932880,"approval":77.8186275,"support":1.993288},{"time_hours":182,"approval_perbill":776960785,"support_perbill":19788917,"approval":77.6960785,"support":1.9788917},{"time_hours":183,"approval_perbill":775735295,"support_perbill":19646444,"approval":77.5735295,"support":1.9646444},{"time_hours":184,"approval_perbill":774509805,"support_perbill":19505435,"approval":77.4509805,"support":1.9505435},{"time_hours":185,"approval_perbill":773284314,"support_perbill":19365870,"approval":77.3284314,"support":1.936587},{"time_hours":186,"approval_perbill":772058824,"support_perbill":19227725,"approval":77.2058824,"support":1.9227725},{"time_hours":187,"approval_perbill":770833334,"support_perbill":19090980,"approval":77.0833334,"support":1.909098},{"time_hours":188,"approval_perbill":769607844,"support_perbill":18955613,"approval":76.9607844,"support":1.8955613},{"time_hours":189,"approval_perbill":768382353,"support_perbill":18821603,"approval":76.8382353,"support":1.8821603},{"time_hours":190,"approval_perbill":767156863,"support_perbill":18688931,"approval":76.7156863,"support":1.8688931},{"time_hours":191,"approval_perbill":765931373,"support_perbill":18557575,"approval":76.5931373,"support":1.8557575},{"time_hours":192,"approval_perbill":764705883,"support_perbill":18427518,"approval":76.4705883,"support":1.8427518},{"time_hours":193,"approval_perbill":763480393,"support_perbill":18298739,"approval":76.3480393,"support":1.8298739},{"time_hours":194,"approval_perbill":762254903,"support_perbill":18171219,"approval":76.2254903,"support":1.8171219},{"time_hours":195,"approval_perbill":761029413,"support_perbill":18044941,"approval":76.1029413,"support":1.8044941},{"time_hours":196,"approval_perbill":759803923,"support_perbill":17919887,"approval":75.9803923,"support":1.7919887},{"time_hours":197,"approval_perbill":758578433,"support_perbill":17796038,"approval":75.8578433,"support":1.7796038},{"time_hours":198,"approval_perbill":757352942,"support_perbill":17673377,"approval":75.7352942,"support":1.7673377},{"time_hours":199,"approval_perbill":756127452,"support_perbill":17551888,"approval":75.6127452,"support":1.7551888},{"time_hours":200,"approval_perbill":754901962,"support_perbill":17431553,"approval":75.4901962,"support":1.7431553},{"time_hours":201,"approval_perbill":753676472,"support_perbill":17312357,"approval":75.3676472,"support":1.7312357},{"time_hours":202,"approval_perbill":752450981,"support_perbill":17194282,"approval":75.2450981,"support":1.7194282},{"time_hours":203,"approval_perbill":751225491,"support_perbill":17077315,"approval":75.1225491,"support":1.7077315},{"time_hours":204,"approval_perbill":750000001,"support_perbill":16961437,"approval":75.0000001,"support":1.6961437},{"time_hours":205,"approval_perbill":748774511,"support_perbill":16846636,"approval":74.8774511,"support":1.6846636},{"time_hours":206,"approval_perbill":747549020,"support_perbill":16732895,"approval":74.754902,"support":1.6732895},{"time_hours":207,"approval_perbill":746323530,"support_perbill":16620201,"approval":74.632353,"support":1.6620201},{"time_hours":208,"approval_perbill":745098040,"support_perbill":16508538,"approval":74.509804,"support":1.6508538},{"time_hours":209,"approval_perbill":743872550,"support_perbill":16397893,"approval":74.387255,"support":1.6397893},{"time_hours":210,"approval_perbill":742647059,"support_perbill":16288252,"approval":74.2647059,"support":1.6288252},{"time_hours":211,"approval_perbill":741421569,"support_perbill":16179601,"approval":74.1421569,"support":1.6179601},{"time_hours":212,"approval_perbill":740196079,"support_perbill":16071927,"approval":74.0196079,"support":1.6071927},{"time_hours":213,"approval_perbill":738970589,"support_perbill":15965217,"approval":73.8970589,"support":1.5965217},{"time_hours":214,"approval_perbill":737745099,"support_perbill":15859457,"approval":73.7745099,"support":1.5859457},{"time_hours":215,"approval_perbill":736519608,"support_perbill":15754636,"approval":73.6519608,"support":1.5754636},{"time_hours":216,"approval_perbill":735294118,"support_perbill":15650741,"approval":73.5294118,"support":1.5650741},{"time_hours":217,"approval_perbill":734068628,"support_perbill":15547759,"approval":73.4068628,"support":1.5547759},{"time_hours":218,"approval_perbill":732843138,"support_perbill":15445679,"approval":73.2843138,"support":1.5445679},{"time_hours":219,"approval_perbill":731617648,"support_perbill":15344488,"approval":73.1617648,"support":1.5344488},{"time_hours":220,"approval_perbill":730392158,"support_perbill":15244176,"approval":73.0392158,"support":1.5244176},{"time_hours":221,"approval_perbill":729166668,"support_perbill":15144731,"approval":72.9166668,"support":1.5144731},{"time_hours":222,"approval_perbill":727941178,"support_perbill":15046141,"approval":72.7941178,"support":1.5046141},{"time_hours":223,"approval_perbill":726715687,"support_perbill":14948396,"approval":72.6715687,"support":1.4948396},{"time_hours":224,"approval_perbill":725490197,"support_perbill":14851485,"approval":72.5490197,"support":1.4851485},{"time_hours":225,"approval_perbill":724264707,"support_perbill":14755396,"approval":72.4264707,"support":1.4755396},{"time_hours":226,"approval_perbill":723039217,"support_perbill":14660121,"approval":72.3039217,"support":1.4660121},{"time_hours":227,"approval_perbill":721813726,"support_perbill":14565648,"approval":72.1813726,"support":1.4565648},{"time_hours":228,"approval_perbill":720588236,"support_perbill":14471968,"approval":72.0588236,"support":1.4471968},{"time_hours":229,"approval_perbill":719362746,"support_perbill":14379070,"approval":71.9362746,"support":1.437907},{"time_hours":230,"approval_perbill":718137256,"support_perbill":14286945,"approval":71.8137256,"support":1.4286945},{"time_hours":231,"approval_perbill":716911765,"support_perbill":14195583,"approval":71.6911765,"support":1.4195583},{"time_hours":232,"approval_perbill":715686275,"support_perbill":14104975,"approval":71.5686275,"support":1.4104975},{"time_hours":233,"approval_perbill":714460785,"support_perbill":14015111,"approval":71.4460785,"support":1.4015111},{"time_hours":234,"approval_perbill":713235295,"support_perbill":13925982,"approval":71.3235295,"support":1.3925982},{"time_hours":235,"approval_perbill":712009805,"support_perbill":13837579,"approval":71.2009805,"support":1.3837579},{"time_hours":236,"approval_perbill":710784314,"support_perbill":13749894,"approval":71.0784314,"support":1.3749894},{"time_hours":237,"approval_perbill":709558824,"support_perbill":13662918,"approval":70.9558824,"support":1.3662918},{"time_hours":238,"approval_perbill":708333334,"support_perbill":13576642,"approval":70.8333334,"support":1.3576642},{"time_hours":239,"approval_perbill":707107844,"support_perbill":13491057,"approval":70.7107844,"support":1.3491057},{"time_hours":240,"approval_perbill":705882353,"support_perbill":13406156,"approval":70.5882353,"support":1.3406156},{"time_hours":241,"approval_perbill":704656863,"support_perbill":13321931,"approval":70.4656863,"support":1.3321931},{"time_hours":242,"approval_perbill":703431373,"support_perbill":13238372,"approval":70.3431373,"support":1.3238372},{"time_hours":243,"approval_perbill":702205883,"support_perbill":13155473,"approval":70.2205883,"support":1.3155473},{"time_hours":244,"approval_perbill":700980393,"support_perbill":13073226,"approval":70.0980393,"support":1.3073226},{"time_hours":245,"approval_perbill":699754903,"support_perbill":12991622,"approval":69.9754903,"support":1.2991622},{"time_hours":246,"approval_perbill":698529413,"support_perbill":12910655,"approval":69.8529413,"support":1.2910655},{"time_hours":247,"approval_perbill":697303923,"support_perbill":12830317,"approval":69.7303923,"support":1.2830317},{"time_hours":248,"approval_perbill":696078432,"support_perbill":12750601,"approval":69.6078432,"support":1.2750601},{"time_hours":249,"approval_perbill":694852942,"support_perbill":12671499,"approval":69.4852942,"support":1.2671499},{"time_hours":250,"approval_perbill":693627452,"support_perbill":12593005,"approval":69.3627452,"support":1.2593005},{"time_hours":251,"approval_perbill":692401962,"support_perbill":12515111,"approval":69.2401962,"support":1.2515111},{"time_hours":252,"approval_perbill":691176471,"support_perbill":12437810,"approval":69.1176471,"support":1.243781},{"time_hours":253,"approval_perbill":689950981,"support_perbill":12361097,"approval":68.9950981,"support":1.2361097},{"time_hours":254,"approval_perbill":688725491,"support_perbill":12284964,"approval":68.8725491,"support":1.2284964},{"time_hours":255,"approval_perbill":687500001,"support_perbill":12209404,"approval":68.7500001,"support":1.2209404},{"time_hours":256,"approval_perbill":686274511,"support_perbill":12134411,"approval":68.6274511,"support":1.2134411},{"time_hours":257,"approval_perbill":685049020,"support_perbill":12059980,"approval":68.504902,"support":1.205998},{"time_hours":258,"approval_perbill":683823530,"support_perbill":11986103,"approval":68.382353,"support":1.1986103},{"time_hours":259,"approval_perbill":682598040,"support_perbill":11912774,"approval":68.259804,"support":1.1912774},{"time_hours":260,"approval_perbill":681372550,"support_perbill":11839987,"approval":68.137255,"support":1.1839987},{"time_hours":261,"approval_perbill":680147059,"support_perbill":11767737,"approval":68.0147059,"support":1.1767737},{"time_hours":262,"approval_perbill":678921569,"support_perbill":11696017,"approval":67.8921569,"support":1.1696017},{"time_hours":263,"approval_perbill":677696079,"support_perbill":11624822,"approval":67.7696079,"support":1.1624822},{"time_hours":264,"approval_perbill":676470589,"support_perbill":11554145,"approval":67.6470589,"support":1.1554145},{"time_hours":265,"approval_perbill":675245099,"support_perbill":11483982,"approval":67.5245099,"support":1.1483982},{"time_hours":266,"approval_perbill":674019609,"support_perbill":11414326,"approval":67.4019609,"support":1.1414326},{"time_hours":267,"approval_perbill":672794119,"support_perbill":11345173,"approval":67.2794119,"support":1.1345173},{"time_hours":268,"approval_perbill":671568629,"support_perbill":11276516,"approval":67.1568629,"support":1.1276516},{"time_hours":269,"approval_perbill":670343138,"support_perbill":11208351,"approval":67.0343138,"support":1.1208351},{"time_hours":270,"approval_perbill":669117648,"support_perbill":11140671,"approval":66.9117648,"support":1.1140671},{"time_hours":271,"approval_perbill":667892158,"support_perbill":11073473,"approval":66.7892158,"support":1.1073473},{"time_hours":272,"approval_perbill":666666668,"support_perbill":11006750,"approval":66.6666668,"support":1.100675},{"time_hours":273,"approval_perbill":665441177,"support_perbill":10940499,"approval":66.5441177,"support":1.0940499},{"time_hours":274,"approval_perbill":664215687,"support_perbill":10874713,"approval":66.4215687,"support":1.0874713},{"time_hours":275,"approval_perbill":662990197,"support_perbill":10809388,"approval":66.2990197,"support":1.0809388},{"time_hours":276,"approval_perbill":661764707,"support_perbill":10744519,"approval":66.1764707,"support":1.0744519},{"time_hours":277,"approval_perbill":660539217,"support_perbill":10680101,"approval":66.0539217,"support":1.0680101},{"time_hours":278,"approval_perbill":659313726,"support_perbill":10616130,"approval":65.9313726,"support":1.061613},{"time_hours":279,"approval_perbill":658088236,"support_perbill":10552601,"approval":65.8088236,"support":1.0552601},{"time_hours":280,"approval_perbill":656862746,"support_perbill":10489510,"approval":65.6862746,"support":1.048951},{"time_hours":281,"approval_perbill":655637256,"support_perbill":10426852,"approval":65.5637256,"support":1.0426852},{"time_hours":282,"approval_perbill":654411765,"support_perbill":10364622,"approval":65.4411765,"support":1.0364622},{"time_hours":283,"approval_perbill":653186275,"support_perbill":10302816,"approval":65.3186275,"support":1.0302816},{"time_hours":284,"approval_perbill":651960785,"support_perbill":10241430,"approval":65.1960785,"support":1.024143},{"time_hours":285,"approval_perbill":650735295,"support_perbill":10180459,"approval":65.0735295,"support":1.0180459},{"time_hours":286,"approval_perbill":649509804,"support_perbill":10119900,"approval":64.9509804,"support":1.01199},{"time_hours":287,"approval_perbill":648284314,"support_perbill":10059748,"approval":64.8284314,"support":1.0059748},{"time_hours":288,"approval_perbill":647058824,"support_perbill":10000000,"approval":64.7058824,"support":1},{"time_hours":289,"approval_perbill":645833334,"support_perbill":9940650,"approval":64.5833334,"support":0.994065},{"time_hours":290,"approval_perbill":644607844,"support_perbill":9881695,"approval":64.4607844,"support":0.9881695},{"time_hours":291,"approval_perbill":643382354,"support_perbill":9823132,"approval":64.3382354,"support":0.9823132},{"time_hours":292,"approval_perbill":642156864,"support_perbill":9764955,"approval":64.2156864,"support":0.9764955},{"time_hours":293,"approval_perbill":640931374,"support_perbill":9707163,"approval":64.0931374,"support":0.9707163},{"time_hours":294,"approval_perbill":639705883,"support_perbill":9649749,"approval":63.9705883,"support":0.9649749},{"time_hours":295,"approval_perbill":638480393,"support_perbill":9592712,"approval":63.8480393,"support":0.9592712},{"time_hours":296,"approval_perbill":637254903,"support_perbill":9536047,"approval":63.7254903,"support":0.9536047},{"time_hours":297,"approval_perbill":636029413,"support_perbill":9479751,"approval":63.6029413,"support":0.9479751},{"time_hours":298,"approval_perbill":634803923,"support_perbill":9423820,"approval":63.4803923,"support":0.942382},{"time_hours":299,"approval_perbill":633578432,"support_perbill":9368250,"approval":63.3578432,"support":0.936825},{"time_hours":300,"approval_perbill":632352942,"support_perbill":9313038,"approval":63.2352942,"support":0.9313038},{"time_hours":301,"approval_perbill":631127452,"support_perbill":9258181,"approval":63.1127452,"support":0.9258181},{"time_hours":302,"approval_perbill":629901962,"support_perbill":9203674,"approval":62.9901962,"support":0.9203674},{"time_hours":303,"approval_perbill":628676471,"support_perbill":9149516,"approval":62.8676471,"support":0.9149516},{"time_hours":304,"approval_perbill":627450981,"support_perbill":9095702,"approval":62.7450981,"support":0.9095702},{"time_hours":305,"approval_perbill":626225491,"support_perbill":9042230,"approval":62.6225491,"support":0.904223},{"time_hours":306,"approval_perbill":625000001,"support_perbill":8989095,"approval":62.5000001,"support":0.8989095},{"time_hours":307,"approval_perbill":623774510,"support_perbill":8936295,"approval":62.377451,"support":0.8936295},{"time_hours":308,"approval_perbill":622549020,"support_perbill":8883826,"approval":62.254902,"support":0.8883826},{"time_hours":309,"approval_perbill":621323530,"support_perbill":8831687,"approval":62.132353,"support":0.8831687},{"time_hours":310,"approval_perbill":620098040,"support_perbill":8779872,"approval":62.009804,"support":0.8779872},{"time_hours":311,"approval_perbill":618872549,"support_perbill":8728380,"approval":61.8872549,"support":0.872838},{"time_hours":312,"approval_perbill":617647059,"support_perbill":8677207,"approval":61.7647059,"support":0.8677207},{"time_hours":313,"approval_perbill":616421569,"support_perbill":8626351,"approval":61.6421569,"support":0.8626351},{"time_hours":314,"approval_perbill":615196079,"support_perbill":8575808,"approval":61.5196079,"support":0.8575808},{"time_hours":315,"approval_perbill":613970589,"support_perbill":8525576,"approval":61.3970589,"support":0.8525576},{"time_hours":316,"approval_perbill":612745099,"support_perbill":8475652,"approval":61.2745099,"support":0.8475652},{"time_hours":317,"approval_perbill":611519609,"support_perbill":8426032,"approval":61.1519609,"support":0.8426032},{"time_hours":318,"approval_perbill":610294119,"support_perbill":8376715,"approval":61.0294119,"support":0.8376715},{"time_hours":319,"approval_perbill":609068629,"support_perbill":8327697,"approval":60.9068629,"support":0.8327697},{"time_hours":320,"approval_perbill":607843138,"support_perbill":8278976,"approval":60.7843138,"support":0.8278976},{"time_hours":321,"approval_perbill":606617648,"support_perbill":8230549,"approval":60.6617648,"support":0.8230549},{"time_hours":322,"approval_perbill":605392158,"support_perbill":8182413,"approval":60.5392158,"support":0.8182413},{"time_hours":323,"approval_perbill":604166668,"support_perbill":8134566,"approval":60.4166668,"support":0.8134566},{"time_hours":324,"approval_perbill":602941177,"support_perbill":8087005,"approval":60.2941177,"support":0.8087005},{"time_hours":325,"approval_perbill":601715687,"support_perbill":8039727,"approval":60.1715687,"support":0.8039727},{"time_hours":326,"approval_perbill":600490197,"support_perbill":7992731,"approval":60.0490197,"support":0.7992731},{"time_hours":327,"approval_perbill":599264707,"support_perbill":7946013,"approval":59.9264707,"support":0.7946013},{"time_hours":328,"approval_perbill":598039216,"support_perbill":7899571,"approval":59.8039216,"support":0.7899571},{"time_hours":329,"approval_perbill":596813726,"support_perbill":7853403,"approval":59.6813726,"support":0.7853403},{"time_hours":330,"approval_perbill":595588236,"support_perbill":7807506,"approval":59.5588236,"support":0.7807506},{"time_hours":331,"approval_perbill":594362746,"support_perbill":7761878,"approval":59.4362746,"support":0.7761878},{"time_hours":332,"approval_perbill":593137255,"support_perbill":7716516,"approval":59.3137255,"support":0.7716516},{"time_hours":333,"approval_perbill":591911765,"support_perbill":7671418,"approval":59.1911765,"support":0.7671418},{"time_hours":334,"approval_perbill":590686275,"support_perbill":7626583,"approval":59.0686275,"support":0.7626583},{"time_hours":335,"approval_perbill":589460785,"support_perbill":7582007,"approval":58.9460785,"support":0.7582007},{"time_hours":336,"approval_perbill":588235295,"support_perbill":7537688,"approval":58.8235295,"support":0.7537688},{"time_hours":337,"approval_perbill":587009805,"support_perbill":7493624,"approval":58.7009805,"support":0.7493624},{"time_hours":338,"approval_perbill":585784315,"support_perbill":7449814,"approval":58.5784315,"support":0.7449814},{"time_hours":339,"approval_perbill":584558825,"support_perbill":7406254,"approval":58.4558825,"support":0.7406254},{"time_hours":340,"approval_perbill":583333335,"support_perbill":7362942,"approval":58.3333335,"support":0.7362942},{"time_hours":341,"approval_perbill":582107844,"support_perbill":7319878,"approval":58.2107844,"support":0.7319878},{"time_hours":342,"approval_perbill":580882354,"support_perbill":7277057,"approval":58.0882354,"support":0.7277057},{"time_hours":343,"approval_perbill":579656864,"support_perbill":7234479,"approval":57.9656864,"support":0.7234479},{"time_hours":344,"approval_perbill":578431374,"support_perbill":7192141,"approval":57.8431374,"support":0.7192141},{"time_hours":345,"approval_perbill":577205883,"support_perbill":7150041,"approval":57.7205883,"support":0.7150041},{"time_hours":346,"approval_perbill":575980393,"support_perbill":7108178,"approval":57.5980393,"support":0.7108178},{"time_hours":347,"approval_perbill":574754903,"support_perbill":7066548,"approval":57.4754903,"support":0.7066548},{"time_hours":348,"approval_perbill":573529413,"support_perbill":7025151,"approval":57.3529413,"support":0.7025151},{"time_hours":349,"approval_perbill":572303922,"support_perbill":6983985,"approval":57.2303922,"support":0.6983985},{"time_hours":350,"approval_perbill":571078432,"support_perbill":6943047,"approval":57.1078432,"support":0.6943047},{"time_hours":351,"approval_perbill":569852942,"support_perbill":6902335,"approval":56.9852942,"support":0.6902335},{"time_hours":352,"approval_perbill":568627452,"support_perbill":6861848,"approval":56.8627452,"support":0.6861848},{"time_hours":353,"approval_perbill":567401961,"support_perbill":6821584,"approval":56.7401961,"support":0.6821584},{"time_hours":354,"approval_perbill":566176471,"support_perbill":6781540,"approval":56.6176471,"support":0.678154},{"time_hours":355,"approval_perbill":564950981,"support_perbill":6741716,"approval":56.4950981,"support":0.6741716},{"time_hours":356,"approval_perbill":563725491,"support_perbill":6702109,"approval":56.3725491,"support":0.6702109},{"time_hours":357,"approval_perbill":562500000,"support_perbill":6662718,"approval":56.25,"support":0.6662718},{"time_hours":358,"approval_perbill":561274510,"support_perbill":6623541,"approval":56.127451,"support":0.6623541},{"time_hours":359,"approval_perbill":560049020,"support_perbill":6584575,"approval":56.004902,"support":0.6584575},{"time_hours":360,"approval_perbill":558823530,"support_perbill":6545820,"approval":55.882353,"support":0.654582},{"time_hours":361,"approval_perbill":557598040,"support_perbill":6507274,"approval":55.759804,"support":0.6507274},{"time_hours":362,"approval_perbill":556372550,"support_perbill":6468935,"approval":55.637255,"support":0.6468935},{"time_hours":363,"approval_perbill":555147060,"support_perbill":6430801,"approval":55.514706,"support":0.6430801},{"time_hours":364,"approval_perbill":553921570,"support_perbill":6392871,"approval":55.392157,"support":0.6392871},{"time_hours":365,"approval_perbill":552696080,"support_perbill":6355142,"approval":55.269608,"support":0.6355142},{"time_hours":366,"approval_perbill":551470589,"support_perbill":6317615,"approval":55.1470589,"support":0.6317615},{"time_hours":367,"approval_perbill":550245099,"support_perbill":6280286,"approval":55.0245099,"support":0.6280286},{"time_hours":368,"approval_perbill":549019609,"support_perbill":6243154,"approval":54.9019609,"support":0.6243154},{"time_hours":369,"approval_perbill":547794119,"support_perbill":6206218,"approval":54.7794119,"support":0.6206218},{"time_hours":370,"approval_perbill":546568628,"support_perbill":6169476,"approval":54.6568628,"support":0.6169476},{"time_hours":371,"approval_perbill":545343138,"support_perbill":6132927,"approval":54.5343138,"support":0.6132927},{"time_hours":372,"approval_perbill":544117648,"support_perbill":6096569,"approval":54.4117648,"support":0.6096569},{"time_hours":373,"approval_perbill":542892158,"support_perbill":6060401,"approval":54.2892158,"support":0.6060401},{"time_hours":374,"approval_perbill":541666667,"support_perbill":6024421,"approval":54.1666667,"support":0.6024421},{"time_hours":375,"approval_perbill":540441177,"support_perbill":5988627,"approval":54.0441177,"support":0.5988627},{"time_hours":376,"approval_perbill":539215687,"support_perbill":5953019,"approval":53.9215687,"support":0.5953019},{"time_hours":377,"approval_perbill":537990197,"support_perbill":5917595,"approval":53.7990197,"support":0.5917595},{"time_hours":378,"approval_perbill":536764706,"support_perbill":5882353,"approval":53.6764706,"support":0.5882353},{"time_hours":379,"approval_perbill":535539216,"support_perbill":5847292,"approval":53.5539216,"support":0.5847292},{"time_hours":380,"approval_perbill":534313726,"support_perbill":5812410,"approval":53.4313726,"support":0.581241},{"time_hours":381,"approval_perbill":533088236,"support_perbill":5777707,"approval":53.3088236,"support":0.5777707},{"time_hours":382,"approval_perbill":531862746,"support_perbill":5743181,"approval":53.1862746,"support":0.5743181},{"time_hours":383,"approval_perbill":530637255,"support_perbill":5708830,"approval":53.0637255,"support":0.570883},{"time_hours":384,"approval_perbill":529411765,"support_perbill":5674653,"approval":52.9411765,"support":0.5674653},{"time_hours":385,"approval_perbill":528186275,"support_perbill":5640649,"approval":52.8186275,"support":0.5640649},{"time_hours":386,"approval_perbill":526960785,"support_perbill":5606817,"approval":52.6960785,"support":0.5606817},{"time_hours":387,"approval_perbill":525735295,"support_perbill":5573155,"approval":52.5735295,"support":0.5573155},{"time_hours":388,"approval_perbill":524509805,"support_perbill":5539662,"approval":52.4509805,"support":0.5539662},{"time_hours":389,"approval_perbill":523284315,"support_perbill":5506336,"approval":52.3284315,"support":0.5506336},{"time_hours":390,"approval_perbill":522058825,"support_perbill":5473177,"approval":52.2058825,"support":0.5473177},{"time_hours":391,"approval_perbill":520833334,"support_perbill":5440183,"approval":52.0833334,"support":0.5440183},{"time_hours":392,"approval_perbill":519607844,"support_perbill":5407354,"approval":51.9607844,"support":0.5407354},{"time_hours":393,"approval_perbill":518382354,"support_perbill":5374687,"approval":51.8382354,"support":0.5374687},{"time_hours":394,"approval_perbill":517156864,"support_perbill":5342181,"approval":51.7156864,"support":0.5342181},{"time_hours":395,"approval_perbill":515931373,"support_perbill":5309836,"approval":51.5931373,"support":0.5309836},{"time_hours":396,"approval_perbill":514705883,"support_perbill":5277650,"approval":51.4705883,"support":0.527765},{"time_hours":397,"approval_perbill":513480393,"support_perbill":5245622,"approval":51.3480393,"support":0.5245622},{"time_hours":398,"approval_perbill":512254903,"support_perbill":5213751,"approval":51.2254903,"support":0.5213751},{"time_hours":399,"approval_perbill":511029412,"support_perbill":5182035,"approval":51.1029412,"support":0.5182035},{"time_hours":400,"approval_perbill":509803922,"support_perbill":5150474,"approval":50.9803922,"support":0.5150474},{"time_hours":401,"approval_perbill":508578432,"support_perbill":5119067,"approval":50.8578432,"support":0.5119067},{"time_hours":402,"approval_perbill":507352942,"support_perbill":5087812,"approval":50.7352942,"support":0.5087812},{"time_hours":403,"approval_perbill":506127452,"support_perbill":5056708,"approval":50.6127452,"support":0.5056708},{"time_hours":404,"approval_perbill":504901961,"support_perbill":5025754,"approval":50.4901961,"support":0.5025754},{"time_hours":405,"approval_perbill":503676471,"support_perbill":4994949,"approval":50.3676471,"support":0.4994949},{"time_hours":406,"approval_perbill":502450981,"support_perbill":4964292,"approval":50.2450981,"support":0.4964292},{"time_hours":407,"approval_perbill":501225491,"support_perbill":4933782,"approval":50.1225491,"support":0.4933782},{"time_hours":408,"approval_perbill":500000000,"support_perbill":4903417,"approval":50,"support":0.4903417},{"time_hours":409,"approval_perbill":500000000,"support_perbill":4873198,"approval":50,"support":0.4873198},{"time_hours":410,"approval_perbill":500000000,"support_perbill":4843122,"approval":50,"support":0.4843122},{"time_hours":411,"approval_perbill":500000000,"support_perbill":4813189,"approval":50,"support":0.4813189},{"time_hours":412,"approval_perbill":500000000,"support_perbill":4783398,"approval":50,"support":0.4783398},{"time_hours":413,"approval_perbill":500000000,"support_perbill":4753747,"approval":50,"support":0.4753747},{"time_hours":414,"approval_perbill":500000000,"support_perbill":4724236,"approval":50,"support":0.4724236},{"time_hours":415,"approval_perbill":500000000,"support_perbill":4694864,"approval":50,"support":0.4694864},{"time_hours":416,"approval_perbill":500000000,"support_perbill":4665630,"approval":50,"support":0.466563},{"time_hours":417,"approval_perbill":500000000,"support_perbill":4636532,"approval":50,"support":0.4636532},{"time_hours":418,"approval_perbill":500000000,"support_perbill":4607570,"approval":50,"support":0.460757},{"time_hours":419,"approval_perbill":500000000,"support_perbill":4578743,"approval":50,"support":0.4578743},{"time_hours":420,"approval_perbill":500000000,"support_perbill":4550050,"approval":50,"support":0.455005},{"time_hours":421,"approval_perbill":500000000,"support_perbill":4521490,"approval":50,"support":0.452149},{"time_hours":422,"approval_perbill":500000000,"support_perbill":4493062,"approval":50,"support":0.4493062},{"time_hours":423,"approval_perbill":500000000,"support_perbill":4464766,"approval":50,"support":0.4464766},{"time_hours":424,"approval_perbill":500000000,"support_perbill":4436599,"approval":50,"support":0.4436599},{"time_hours":425,"approval_perbill":500000000,"support_perbill":4408562,"approval":50,"support":0.4408562},{"time_hours":426,"approval_perbill":500000000,"support_perbill":4380654,"approval":50,"support":0.4380654},{"time_hours":427,"approval_perbill":500000000,"support_perbill":4352873,"approval":50,"support":0.4352873},{"time_hours":428,"approval_perbill":500000000,"support_perbill":4325218,"approval":50,"support":0.4325218},{"time_hours":429,"approval_perbill":500000000,"support_perbill":4297690,"approval":50,"support":0.429769},{"time_hours":430,"approval_perbill":500000000,"support_perbill":4270287,"approval":50,"support":0.4270287},{"time_hours":431,"approval_perbill":500000000,"support_perbill":4243007,"approval":50,"support":0.4243007},{"time_hours":432,"approval_perbill":500000000,"support_perbill":4215851,"approval":50,"support":0.4215851},{"time_hours":433,"approval_perbill":500000000,"support_perbill":4188818,"approval":50,"support":0.4188818},{"time_hours":434,"approval_perbill":500000000,"support_perbill":4161906,"approval":50,"support":0.4161906},{"time_hours":435,"approval_perbill":500000000,"support_perbill":4135115,"approval":50,"support":0.4135115},{"time_hours":436,"approval_perbill":500000000,"support_perbill":4108444,"approval":50,"support":0.4108444},{"time_hours":437,"approval_perbill":500000000,"support_perbill":4081892,"approval":50,"support":0.4081892},{"time_hours":438,"approval_perbill":500000000,"support_perbill":4055459,"approval":50,"support":0.4055459},{"time_hours":439,"approval_perbill":500000000,"support_perbill":4029143,"approval":50,"support":0.4029143},{"time_hours":440,"approval_perbill":500000000,"support_perbill":4002944,"approval":50,"support":0.4002944},{"time_hours":441,"approval_perbill":500000000,"support_perbill":3976862,"approval":50,"support":0.3976862},{"time_hours":442,"approval_perbill":500000000,"support_perbill":3950894,"approval":50,"support":0.3950894},{"time_hours":443,"approval_perbill":500000000,"support_perbill":3925041,"approval":50,"support":0.3925041},{"time_hours":444,"approval_perbill":500000000,"support_perbill":3899302,"approval":50,"support":0.3899302},{"time_hours":445,"approval_perbill":500000000,"support_perbill":3873676,"approval":50,"support":0.3873676},{"time_hours":446,"approval_perbill":500000000,"support_perbill":3848162,"approval":50,"support":0.3848162},{"time_hours":447,"approval_perbill":500000000,"support_perbill":3822760,"approval":50,"support":0.382276},{"time_hours":448,"approval_perbill":500000000,"support_perbill":3797468,"approval":50,"support":0.3797468},{"time_hours":449,"approval_perbill":500000000,"support_perbill":3772287,"approval":50,"support":0.3772287},{"time_hours":450,"approval_perbill":500000000,"support_perbill":3747215,"approval":50,"support":0.3747215},{"time_hours":451,"approval_perbill":500000000,"support_perbill":3722251,"approval":50,"support":0.3722251},{"time_hours":452,"approval_perbill":500000000,"support_perbill":3697396,"approval":50,"support":0.3697396},{"time_hours":453,"approval_perbill":500000000,"support_perbill":3672648,"approval":50,"support":0.3672648},{"time_hours":454,"approval_perbill":500000000,"support_perbill":3648006,"approval":50,"support":0.3648006},{"time_hours":455,"approval_perbill":500000000,"support_perbill":3623471,"approval":50,"support":0.3623471},{"time_hours":456,"approval_perbill":500000000,"support_perbill":3599040,"approval":50,"support":0.359904},{"time_hours":457,"approval_perbill":500000000,"support_perbill":3574714,"approval":50,"support":0.3574714},{"time_hours":458,"approval_perbill":500000000,"support_perbill":3550492,"approval":50,"support":0.3550492},{"time_hours":459,"approval_perbill":500000000,"support_perbill":3526373,"approval":50,"support":0.3526373},{"time_hours":460,"approval_perbill":500000000,"support_perbill":3502357,"approval":50,"support":0.3502357},{"time_hours":461,"approval_perbill":500000000,"support_perbill":3478442,"approval":50,"support":0.3478442},{"time_hours":462,"approval_perbill":500000000,"support_perbill":3454629,"approval":50,"support":0.3454629},{"time_hours":463,"approval_perbill":500000000,"support_perbill":3430916,"approval":50,"support":0.3430916},{"time_hours":464,"approval_perbill":500000000,"support_perbill":3407304,"approval":50,"support":0.3407304},{"time_hours":465,"approval_perbill":500000000,"support_perbill":3383790,"approval":50,"support":0.338379},{"time_hours":466,"approval_perbill":500000000,"support_perbill":3360376,"approval":50,"support":0.3360376},{"time_hours":467,"approval_perbill":500000000,"support_perbill":3337059,"approval":50,"support":0.3337059},{"time_hours":468,"approval_perbill":500000000,"support_perbill":3313840,"approval":50,"support":0.331384},{"time_hours":469,"approval_perbill":500000000,"support_perbill":3290718,"approval":50,"support":0.3290718},{"time_hours":470,"approval_perbill":500000000,"support_perbill":3267692,"approval":50,"support":0.3267692},{"time_hours":471,"approval_perbill":500000000,"support_perbill":3244761,"approval":50,"support":0.3244761},{"time_hours":472,"approval_perbill":500000000,"support_perbill":3221926,"approval":50,"support":0.3221926},{"time_hours":473,"approval_perbill":500000000,"support_perbill":3199185,"approval":50,"support":0.3199185},{"time_hours":474,"approval_perbill":500000000,"support_perbill":3176538,"approval":50,"support":0.3176538},{"time_hours":475,"approval_perbill":500000000,"support_perbill":3153985,"approval":50,"support":0.3153985},{"time_hours":476,"approval_perbill":500000000,"support_perbill":3131524,"approval":50,"support":0.3131524},{"time_hours":477,"approval_perbill":500000000,"support_perbill":3109155,"approval":50,"support":0.3109155},{"time_hours":478,"approval_perbill":500000000,"support_perbill":3086878,"approval":50,"support":0.3086878},{"time_hours":479,"approval_perbill":500000000,"support_perbill":3064692,"approval":50,"support":0.3064692},{"time_hours":480,"approval_perbill":500000000,"support_perbill":3042596,"approval":50,"support":0.3042596},{"time_hours":481,"approval_perbill":500000000,"support_perbill":3020590,"approval":50,"support":0.302059},{"time_hours":482,"approval_perbill":500000000,"support_perbill":2998674,"approval":50,"support":0.2998674},{"time_hours":483,"approval_perbill":500000000,"support_perbill":2976847,"approval":50,"support":0.2976847},{"time_hours":484,"approval_perbill":500000000,"support_perbill":2955107,"approval":50,"support":0.2955107},{"time_hours":485,"approval_perbill":500000000,"support_perbill":2933456,"approval":50,"support":0.2933456},{"time_hours":486,"approval_perbill":500000000,"support_perbill":2911892,"approval":50,"support":0.2911892},{"time_hours":487,"approval_perbill":500000000,"support_perbill":2890414,"approval":50,"support":0.2890414},{"time_hours":488,"approval_perbill":500000000,"support_perbill":2869023,"approval":50,"support":0.2869023},{"time_hours":489,"approval_perbill":500000000,"support_perbill":2847717,"approval":50,"support":0.2847717},{"time_hours":490,"approval_perbill":500000000,"support_perbill":2826496,"approval":50,"support":0.2826496},{"time_hours":491,"approval_perbill":500000000,"support_perbill":2805360,"approval":50,"support":0.280536},{"time_hours":492,"approval_perbill":500000000,"support_perbill":2784309,"approval":50,"support":0.2784309},{"time_hours":493,"approval_perbill":500000000,"support_perbill":2763341,"approval":50,"support":0.2763341},{"time_hours":494,"approval_perbill":500000000,"support_perbill":2742455,"approval":50,"support":0.2742455},{"time_hours":495,"approval_perbill":500000000,"support_perbill":2721653,"approval":50,"support":0.2721653},{"time_hours":496,"approval_perbill":500000000,"support_perbill":2700933,"approval":50,"support":0.2700933},{"time_hours":497,"approval_perbill":500000000,"support_perbill":2680294,"approval":50,"support":0.2680294},{"time_hours":498,"approval_perbill":500000000,"support_perbill":2659737,"approval":50,"support":0.2659737},{"time_hours":499,"approval_perbill":500000000,"support_perbill":2639260,"approval":50,"support":0.263926},{"time_hours":500,"approval_perbill":500000000,"support_perbill":2618864,"approval":50,"support":0.2618864},{"time_hours":501,"approval_perbill":500000000,"support_perbill":2598547,"approval":50,"support":0.2598547},{"time_hours":502,"approval_perbill":500000000,"support_perbill":2578310,"approval":50,"support":0.257831},{"time_hours":503,"approval_perbill":500000000,"support_perbill":2558151,"approval":50,"support":0.2558151},{"time_hours":504,"approval_perbill":500000000,"support_perbill":2538071,"approval":50,"support":0.2538071},{"time_hours":505,"approval_perbill":500000000,"support_perbill":2518069,"approval":50,"support":0.2518069},{"time_hours":506,"approval_perbill":500000000,"support_perbill":2498144,"approval":50,"support":0.2498144},{"time_hours":507,"approval_perbill":500000000,"support_perbill":2478296,"approval":50,"support":0.2478296},{"time_hours":508,"approval_perbill":500000000,"support_perbill":2458525,"approval":50,"support":0.2458525},{"time_hours":509,"approval_perbill":500000000,"support_perbill":2438830,"approval":50,"support":0.243883},{"time_hours":510,"approval_perbill":500000000,"support_perbill":2419210,"approval":50,"support":0.241921},{"time_hours":511,"approval_perbill":500000000,"support_perbill":2399666,"approval":50,"support":0.2399666},{"time_hours":512,"approval_perbill":500000000,"support_perbill":2380197,"approval":50,"support":0.2380197},{"time_hours":513,"approval_perbill":500000000,"support_perbill":2360802,"approval":50,"support":0.2360802},{"time_hours":514,"approval_perbill":500000000,"support_perbill":2341481,"approval":50,"support":0.2341481},{"time_hours":515,"approval_perbill":500000000,"support_perbill":2322233,"approval":50,"support":0.2322233},{"time_hours":516,"approval_perbill":500000000,"support_perbill":2303059,"approval":50,"support":0.2303059},{"time_hours":517,"approval_perbill":500000000,"support_perbill":2283957,"approval":50,"support":0.2283957},{"time_hours":518,"approval_perbill":500000000,"support_perbill":2264928,"approval":50,"support":0.2264928},{"time_hours":519,"approval_perbill":500000000,"support_perbill":2245970,"approval":50,"support":0.224597},{"time_hours":520,"approval_perbill":500000000,"support_perbill":2227084,"approval":50,"support":0.2227084},{"time_hours":521,"approval_perbill":500000000,"support_perbill":2208269,"approval":50,"support":0.2208269},{"time_hours":522,"approval_perbill":500000000,"support_perbill":2189525,"approval":50,"support":0.2189525},{"time_hours":523,"approval_perbill":500000000,"support_perbill":2170851,"approval":50,"support":0.2170851},{"time_hours":524,"approval_perbill":500000000,"support_perbill":2152247,"approval":50,"support":0.2152247},{"time_hours":525,"approval_perbill":500000000,"support_perbill":2133712,"approval":50,"support":0.2133712},{"time_hours":526,"approval_perbill":500000000,"support_perbill":2115247,"approval":50,"support":0.2115247},{"time_hours":527,"approval_perbill":500000000,"support_perbill":2096850,"approval":50,"support":0.209685},{"time_hours":528,"approval_perbill":500000000,"support_perbill":2078522,"approval":50,"support":0.2078522},{"time_hours":529,"approval_perbill":500000000,"support_perbill":2060261,"approval":50,"support":0.2060261},{"time_hours":530,"approval_perbill":500000000,"support_perbill":2042068,"approval":50,"support":0.2042068},{"time_hours":531,"approval_perbill":500000000,"support_perbill":2023943,"approval":50,"support":0.2023943},{"time_hours":532,"approval_perbill":500000000,"support_perbill":2005884,"approval":50,"support":0.2005884},{"time_hours":533,"approval_perbill":500000000,"support_perbill":1987891,"approval":50,"support":0.1987891},{"time_hours":534,"approval_perbill":500000000,"support_perbill":1969965,"approval":50,"support":0.1969965},{"time_hours":535,"approval_perbill":500000000,"support_perbill":1952104,"approval":50,"support":0.1952104},{"time_hours":536,"approval_perbill":500000000,"support_perbill":1934309,"approval":50,"support":0.1934309},{"time_hours":537,"approval_perbill":500000000,"support_perbill":1916579,"approval":50,"support":0.1916579},{"time_hours":538,"approval_perbill":500000000,"support_perbill":1898913,"approval":50,"support":0.1898913},{"time_hours":539,"approval_perbill":500000000,"support_perbill":1881312,"approval":50,"support":0.1881312},{"time_hours":540,"approval_perbill":500000000,"support_perbill":1863775,"approval":50,"support":0.1863775},{"time_hours":541,"approval_perbill":500000000,"support_perbill":1846301,"approval":50,"support":0.1846301},{"time_hours":542,"approval_perbill":500000000,"support_perbill":1828891,"approval":50,"support":0.1828891},{"time_hours":543,"approval_perbill":500000000,"support_perbill":1811543,"approval":50,"support":0.1811543},{"time_hours":544,"approval_perbill":500000000,"support_perbill":1794258,"approval":50,"support":0.1794258},{"time_hours":545,"approval_perbill":500000000,"support_perbill":1777036,"approval":50,"support":0.1777036},{"time_hours":546,"approval_perbill":500000000,"support_perbill":1759875,"approval":50,"support":0.1759875},{"time_hours":547,"approval_perbill":500000000,"support_perbill":1742775,"approval":50,"support":0.1742775},{"time_hours":548,"approval_perbill":500000000,"support_perbill":1725737,"approval":50,"support":0.1725737},{"time_hours":549,"approval_perbill":500000000,"support_perbill":1708760,"approval":50,"support":0.170876},{"time_hours":550,"approval_perbill":500000000,"support_perbill":1691844,"approval":50,"support":0.1691844},{"time_hours":551,"approval_perbill":500000000,"support_perbill":1674988,"approval":50,"support":0.1674988},{"time_hours":552,"approval_perbill":500000000,"support_perbill":1658191,"approval":50,"support":0.1658191},{"time_hours":553,"approval_perbill":500000000,"support_perbill":1641455,"approval":50,"support":0.1641455},{"time_hours":554,"approval_perbill":500000000,"support_perbill":1624777,"approval":50,"support":0.1624777},{"time_hours":555,"approval_perbill":500000000,"support_perbill":1608159,"approval":50,"support":0.1608159},{"time_hours":556,"approval_perbill":500000000,"support_perbill":1591599,"approval":50,"support":0.1591599},{"time_hours":557,"approval_perbill":500000000,"support_perbill":1575098,"approval":50,"support":0.1575098},{"time_hours":558,"approval_perbill":500000000,"support_perbill":1558654,"approval":50,"support":0.1558654},{"time_hours":559,"approval_perbill":500000000,"support_perbill":1542269,"approval":50,"support":0.1542269},{"time_hours":560,"approval_perbill":500000000,"support_perbill":1525941,"approval":50,"support":0.1525941},{"time_hours":561,"approval_perbill":500000000,"support_perbill":1509670,"approval":50,"support":0.150967},{"time_hours":562,"approval_perbill":500000000,"support_perbill":1493456,"approval":50,"support":0.1493456},{"time_hours":563,"approval_perbill":500000000,"support_perbill":1477298,"approval":50,"support":0.1477298},{"time_hours":564,"approval_perbill":500000000,"support_perbill":1461197,"approval":50,"support":0.1461197},{"time_hours":565,"approval_perbill":500000000,"support_perbill":1445152,"approval":50,"support":0.1445152},{"time_hours":566,"approval_perbill":500000000,"support_perbill":1429162,"approval":50,"support":0.1429162},{"time_hours":567,"approval_perbill":500000000,"support_perbill":1413228,"approval":50,"support":0.1413228},{"time_hours":568,"approval_perbill":500000000,"support_perbill":1397348,"approval":50,"support":0.1397348},{"time_hours":569,"approval_perbill":500000000,"support_perbill":1381524,"approval":50,"support":0.1381524},{"time_hours":570,"approval_perbill":500000000,"support_perbill":1365754,"approval":50,"support":0.1365754},{"time_hours":571,"approval_perbill":500000000,"support_perbill":1350039,"approval":50,"support":0.1350039},{"time_hours":572,"approval_perbill":500000000,"support_perbill":1334377,"approval":50,"support":0.1334377},{"time_hours":573,"approval_perbill":500000000,"support_perbill":1318769,"approval":50,"support":0.1318769},{"time_hours":574,"approval_perbill":500000000,"support_perbill":1303214,"approval":50,"support":0.1303214},{"time_hours":575,"approval_perbill":500000000,"support_perbill":1287713,"approval":50,"support":0.1287713},{"time_hours":576,"approval_perbill":500000000,"support_perbill":1272264,"approval":50,"support":0.1272264},{"time_hours":577,"approval_perbill":500000000,"support_perbill":1256869,"approval":50,"support":0.1256869},{"time_hours":578,"approval_perbill":500000000,"support_perbill":1241525,"approval":50,"support":0.1241525},{"time_hours":579,"approval_perbill":500000000,"support_perbill":1226233,"approval":50,"support":0.1226233},{"time_hours":580,"approval_perbill":500000000,"support_perbill":1210994,"approval":50,"support":0.1210994},{"time_hours":581,"approval_perbill":500000000,"support_perbill":1195805,"approval":50,"support":0.1195805},{"time_hours":582,"approval_perbill":500000000,"support_perbill":1180668,"approval":50,"support":0.1180668},{"time_hours":583,"approval_perbill":500000000,"support_perbill":1165582,"approval":50,"support":0.1165582},{"time_hours":584,"approval_perbill":500000000,"support_perbill":1150547,"approval":50,"support":0.1150547},{"time_hours":585,"approval_perbill":500000000,"support_perbill":1135563,"approval":50,"support":0.1135563},{"time_hours":586,"approval_perbill":500000000,"support_perbill":1120628,"approval":50,"support":0.1120628},{"time_hours":587,"approval_perbill":500000000,"support_perbill":1105744,"approval":50,"support":0.1105744},{"time_hours":588,"approval_perbill":500000000,"support_perbill":1090909,"approval":50,"support":0.1090909},{"time_hours":589,"approval_perbill":500000000,"support_perbill":1076124,"approval":50,"support":0.1076124},{"time_hours":590,"approval_perbill":500000000,"support_perbill":1061388,"approval":50,"support":0.1061388},{"time_hours":591,"approval_perbill":500000000,"support_perbill":1046701,"approval":50,"support":0.1046701},{"time_hours":592,"approval_perbill":500000000,"support_perbill":1032063,"approval":50,"support":0.1032063},{"time_hours":593,"approval_perbill":500000000,"support_perbill":1017473,"approval":50,"support":0.1017473},{"time_hours":594,"approval_perbill":500000000,"support_perbill":1002932,"approval":50,"support":0.1002932},{"time_hours":595,"approval_perbill":500000000,"support_perbill":988438,"approval":50,"support":0.0988438},{"time_hours":596,"approval_perbill":500000000,"support_perbill":973993,"approval":50,"support":0.0973993},{"time_hours":597,"approval_perbill":500000000,"support_perbill":959595,"approval":50,"support":0.0959595},{"time_hours":598,"approval_perbill":500000000,"support_perbill":945244,"approval":50,"support":0.0945244},{"time_hours":599,"approval_perbill":500000000,"support_perbill":930940,"approval":50,"support":0.093094},{"time_hours":600,"approval_perbill":500000000,"support_perbill":916684,"approval":50,"support":0.0916684},{"time_hours":601,"approval_perbill":500000000,"support_perbill":902473,"approval":50,"support":0.0902473},{"time_hours":602,"approval_perbill":500000000,"support_perbill":888310,"approval":50,"support":0.088831},{"time_hours":603,"approval_perbill":500000000,"support_perbill":874192,"approval":50,"support":0.0874192},{"time_hours":604,"approval_perbill":500000000,"support_perbill":860121,"approval":50,"support":0.0860121},{"time_hours":605,"approval_perbill":500000000,"support_perbill":846095,"approval":50,"support":0.0846095},{"time_hours":606,"approval_perbill":500000000,"support_perbill":832114,"approval":50,"support":0.0832114},{"time_hours":607,"approval_perbill":500000000,"support_perbill":818179,"approval":50,"support":0.0818179},{"time_hours":608,"approval_perbill":500000000,"support_perbill":804289,"approval":50,"support":0.0804289},{"time_hours":609,"approval_perbill":500000000,"support_perbill":790444,"approval":50,"support":0.0790444},{"time_hours":610,"approval_perbill":500000000,"support_perbill":776644,"approval":50,"support":0.0776644},{"time_hours":611,"approval_perbill":500000000,"support_perbill":762888,"approval":50,"support":0.0762888},{"time_hours":612,"approval_perbill":500000000,"support_perbill":749176,"approval":50,"support":0.0749176},{"time_hours":613,"approval_perbill":500000000,"support_perbill":735508,"approval":50,"support":0.0735508},{"time_hours":614,"approval_perbill":500000000,"support_perbill":721884,"approval":50,"support":0.0721884},{"time_hours":615,"approval_perbill":500000000,"support_perbill":708303,"approval":50,"support":0.0708303},{"time_hours":616,"approval_perbill":500000000,"support_perbill":694766,"approval":50,"support":0.0694766},{"time_hours":617,"approval_perbill":500000000,"support_perbill":681272,"approval":50,"support":0.0681272},{"time_hours":618,"approval_perbill":500000000,"support_perbill":667821,"approval":50,"support":0.0667821},{"time_hours":619,"approval_perbill":500000000,"support_perbill":654412,"approval":50,"support":0.0654412},{"time_hours":620,"approval_perbill":500000000,"support_perbill":641047,"approval":50,"support":0.0641047},{"time_hours":621,"approval_perbill":500000000,"support_perbill":627723,"approval":50,"support":0.0627723},{"time_hours":622,"approval_perbill":500000000,"support_perbill":614442,"approval":50,"support":0.0614442},{"time_hours":623,"approval_perbill":500000000,"support_perbill":601202,"approval":50,"support":0.0601202},{"time_hours":624,"approval_perbill":500000000,"support_perbill":588005,"approval":50,"support":0.0588005},{"time_hours":625,"approval_perbill":500000000,"support_perbill":574848,"approval":50,"support":0.0574848},{"time_hours":626,"approval_perbill":500000000,"support_perbill":561734,"approval":50,"support":0.0561734},{"time_hours":627,"approval_perbill":500000000,"support_perbill":548660,"approval":50,"support":0.054866},{"time_hours":628,"approval_perbill":500000000,"support_perbill":535627,"approval":50,"support":0.0535627},{"time_hours":629,"approval_perbill":500000000,"support_perbill":522635,"approval":50,"support":0.0522635},{"time_hours":630,"approval_perbill":500000000,"support_perbill":509684,"approval":50,"support":0.0509684},{"time_hours":631,"approval_perbill":500000000,"support_perbill":496773,"approval":50,"support":0.0496773},{"time_hours":632,"approval_perbill":500000000,"support_perbill":483902,"approval":50,"support":0.0483902},{"time_hours":633,"approval_perbill":500000000,"support_perbill":471071,"approval":50,"support":0.0471071},{"time_hours":634,"approval_perbill":500000000,"support_perbill":458280,"approval":50,"support":0.045828},{"time_hours":635,"approval_perbill":500000000,"support_perbill":445529,"approval":50,"support":0.0445529},{"time_hours":636,"approval_perbill":500000000,"support_perbill":432817,"approval":50,"support":0.0432817},{"time_hours":637,"approval_perbill":500000000,"support_perbill":420144,"approval":50,"support":0.0420144},{"time_hours":638,"approval_perbill":500000000,"support_perbill":407511,"approval":50,"support":0.0407511},{"time_hours":639,"approval_perbill":500000000,"support_perbill":394916,"approval":50,"support":0.0394916},{"time_hours":640,"approval_perbill":500000000,"support_perbill":382360,"approval":50,"support":0.038236},{"time_hours":641,"approval_perbill":500000000,"support_perbill":369843,"approval":50,"support":0.0369843},{"time_hours":642,"approval_perbill":500000000,"support_perbill":357364,"approval":50,"support":0.0357364},{"time_hours":643,"approval_perbill":500000000,"support_perbill":344923,"approval":50,"support":0.0344923},{"time_hours":644,"approval_perbill":500000000,"support_perbill":332520,"approval":50,"support":0.033252},{"time_hours":645,"approval_perbill":500000000,"support_perbill":320155,"approval":50,"support":0.0320155},{"time_hours":646,"approval_perbill":500000000,"support_perbill":307828,"approval":50,"support":0.0307828},{"time_hours":647,"approval_perbill":500000000,"support_perbill":295538,"approval":50,"support":0.0295538},{"time_hours":648,"approval_perbill":500000000,"support_perbill":283286,"approval":50,"support":0.0283286},{"time_hours":649,"approval_perbill":500000000,"support_perbill":271071,"approval":50,"support":0.0271071},{"time_hours":650,"approval_perbill":500000000,"support_perbill":258892,"approval":50,"support":0.0258892},{"time_hours":651,"approval_perbill":500000000,"support_perbill":246751,"approval":50,"support":0.0246751},{"time_hours":652,"approval_perbill":500000000,"support_perbill":234646,"approval":50,"support":0.0234646},{"time_hours":653,"approval_perbill":500000000,"support_perbill":222578,"approval":50,"support":0.0222578},{"time_hours":654,"approval_perbill":500000000,"support_perbill":210546,"approval":50,"support":0.0210546},{"time_hours":655,"approval_perbill":500000000,"support_perbill":198550,"approval":50,"support":0.019855},{"time_hours":656,"approval_perbill":500000000,"support_perbill":186590,"approval":50,"support":0.018659},{"time_hours":657,"approval_perbill":500000000,"support_perbill":174666,"approval":50,"support":0.0174666},{"time_hours":658,"approval_perbill":500000000,"support_perbill":162778,"approval":50,"support":0.0162778},{"time_hours":659,"approval_perbill":500000000,"support_perbill":150925,"approval":50,"support":0.0150925},{"time_hours":660,"approval_perbill":500000000,"support_perbill":139108,"approval":50,"support":0.0139108},{"time_hours":661,"approval_perbill":500000000,"support_perbill":127326,"approval":50,"support":0.0127326},{"time_hours":662,"approval_perbill":500000000,"support_perbill":115578,"approval":50,"support":0.0115578},{"time_hours":663,"approval_perbill":500000000,"support_perbill":103866,"approval":50,"support":0.0103866},{"time_hours":664,"approval_perbill":500000000,"support_perbill":92188,"approval":50,"support":0.0092188},{"time_hours":665,"approval_perbill":500000000,"support_perbill":80545,"approval":50,"support":0.0080545},{"time_hours":666,"approval_perbill":500000000,"support_perbill":68937,"approval":50,"support":0.0068937},{"time_hours":667,"approval_perbill":500000000,"support_perbill":57363,"approval":50,"support":0.0057363},{"time_hours":668,"approval_perbill":500000000,"support_perbill":45822,"approval":50,"support":0.0045822},{"time_hours":669,"approval_perbill":500000000,"support_perbill":34316,"approval":50,"support":0.0034316},{"time_hours":670,"approval_perbill":500000000,"support_perbill":22844,"approval":50,"support":0.0022844},{"time_hours":671,"approval_perbill":500000000,"support_perbill":11405,"approval":50,"support":0.0011405},{"time_hours":672,"approval_perbill":500000000,"support_perbill":0,"approval":50,"support":0}]')},84301:p=>{"use strict";p.exports=JSON.parse('[{"time_hours":0,"approval_perbill":1000000000,"support_perbill":500000080,"approval":100,"support":50.000008},{"time_hours":1,"approval_perbill":997916667,"support_perbill":341823819,"approval":99.7916667,"support":34.1823819},{"time_hours":2,"approval_perbill":995833334,"support_perbill":259488839,"approval":99.5833334,"support":25.9488839},{"time_hours":3,"approval_perbill":993750001,"support_perbill":208997250,"approval":99.3750001,"support":20.899725},{"time_hours":4,"approval_perbill":991666668,"support_perbill":174869164,"approval":99.1666668,"support":17.4869164},{"time_hours":5,"approval_perbill":989583334,"support_perbill":150259101,"approval":98.9583334,"support":15.0259101},{"time_hours":6,"approval_perbill":987500001,"support_perbill":131672630,"approval":98.7500001,"support":13.167263},{"time_hours":7,"approval_perbill":985416668,"support_perbill":117139365,"approval":98.5416668,"support":11.7139365},{"time_hours":8,"approval_perbill":983333335,"support_perbill":105463816,"approval":98.3333335,"support":10.5463816},{"time_hours":9,"approval_perbill":981250001,"support_perbill":95878546,"approval":98.1250001,"support":9.5878546},{"time_hours":10,"approval_perbill":979166668,"support_perbill":87868351,"approval":97.9166668,"support":8.7868351},{"time_hours":11,"approval_perbill":977083335,"support_perbill":81074471,"approval":97.7083335,"support":8.1074471},{"time_hours":12,"approval_perbill":975000002,"support_perbill":75239418,"approval":97.5000002,"support":7.5239418},{"time_hours":13,"approval_perbill":972916667,"support_perbill":70173586,"approval":97.2916667,"support":7.0173586},{"time_hours":14,"approval_perbill":970833334,"support_perbill":65734281,"approval":97.0833334,"support":6.5734281},{"time_hours":15,"approval_perbill":968750001,"support_perbill":61812039,"approval":96.8750001,"support":6.1812039},{"time_hours":16,"approval_perbill":966666668,"support_perbill":58321494,"approval":96.6666668,"support":5.8321494},{"time_hours":17,"approval_perbill":964583334,"support_perbill":55195091,"approval":96.4583334,"support":5.5195091},{"time_hours":18,"approval_perbill":962500001,"support_perbill":52378676,"approval":96.2500001,"support":5.2378676},{"time_hours":19,"approval_perbill":960416668,"support_perbill":49828322,"approval":96.0416668,"support":4.9828322},{"time_hours":20,"approval_perbill":958333335,"support_perbill":47508027,"approval":95.8333335,"support":4.7508027},{"time_hours":21,"approval_perbill":956250000,"support_perbill":45388004,"approval":95.625,"support":4.5388004},{"time_hours":22,"approval_perbill":954166667,"support_perbill":43443400,"approval":95.4166667,"support":4.34434},{"time_hours":23,"approval_perbill":952083334,"support_perbill":41653305,"approval":95.2083334,"support":4.1653305},{"time_hours":24,"approval_perbill":950000001,"support_perbill":40000010,"approval":95.0000001,"support":4.000001},{"time_hours":25,"approval_perbill":947916668,"support_perbill":38468408,"approval":94.7916668,"support":3.8468408},{"time_hours":26,"approval_perbill":945833334,"support_perbill":37045541,"approval":94.5833334,"support":3.7045541},{"time_hours":27,"approval_perbill":943750001,"support_perbill":35720228,"approval":94.3750001,"support":3.5720228},{"time_hours":28,"approval_perbill":941666668,"support_perbill":34482767,"approval":94.1666668,"support":3.4482767},{"time_hours":29,"approval_perbill":939583335,"support_perbill":33324704,"approval":93.9583335,"support":3.3324704},{"time_hours":30,"approval_perbill":937500001,"support_perbill":32238633,"approval":93.7500001,"support":3.2238633},{"time_hours":31,"approval_perbill":935416668,"support_perbill":31218046,"approval":93.5416668,"support":3.1218046},{"time_hours":32,"approval_perbill":933333335,"support_perbill":30257193,"approval":93.3333335,"support":3.0257193},{"time_hours":33,"approval_perbill":931250002,"support_perbill":29350978,"approval":93.1250002,"support":2.9350978},{"time_hours":34,"approval_perbill":929166667,"support_perbill":28494870,"approval":92.9166667,"support":2.849487},{"time_hours":35,"approval_perbill":927083334,"support_perbill":27684825,"approval":92.7083334,"support":2.7684825},{"time_hours":36,"approval_perbill":925000001,"support_perbill":26917223,"approval":92.5000001,"support":2.6917223},{"time_hours":37,"approval_perbill":922916668,"support_perbill":26188813,"approval":92.2916668,"support":2.6188813},{"time_hours":38,"approval_perbill":920833334,"support_perbill":25496668,"approval":92.0833334,"support":2.5496668},{"time_hours":39,"approval_perbill":918750001,"support_perbill":24838146,"approval":91.8750001,"support":2.4838146},{"time_hours":40,"approval_perbill":916666668,"support_perbill":24210854,"approval":91.6666668,"support":2.4210854},{"time_hours":41,"approval_perbill":914583335,"support_perbill":23612624,"approval":91.4583335,"support":2.3612624},{"time_hours":42,"approval_perbill":912500000,"support_perbill":23041480,"approval":91.25,"support":2.304148},{"time_hours":43,"approval_perbill":910416667,"support_perbill":22495624,"approval":91.0416667,"support":2.2495624},{"time_hours":44,"approval_perbill":908333334,"support_perbill":21973413,"approval":90.8333334,"support":2.1973413},{"time_hours":45,"approval_perbill":906250001,"support_perbill":21473343,"approval":90.6250001,"support":2.1473343},{"time_hours":46,"approval_perbill":904166668,"support_perbill":20994035,"approval":90.4166668,"support":2.0994035},{"time_hours":47,"approval_perbill":902083334,"support_perbill":20534223,"approval":90.2083334,"support":2.0534223},{"time_hours":48,"approval_perbill":900000001,"support_perbill":20092740,"approval":90.0000001,"support":2.009274},{"time_hours":49,"approval_perbill":897916668,"support_perbill":19668513,"approval":89.7916668,"support":1.9668513},{"time_hours":50,"approval_perbill":895833335,"support_perbill":19260548,"approval":89.5833335,"support":1.9260548},{"time_hours":51,"approval_perbill":893750001,"support_perbill":18867929,"approval":89.3750001,"support":1.8867929},{"time_hours":52,"approval_perbill":891666668,"support_perbill":18489805,"approval":89.1666668,"support":1.8489805},{"time_hours":53,"approval_perbill":889583335,"support_perbill":18125388,"approval":88.9583335,"support":1.8125388},{"time_hours":54,"approval_perbill":887500002,"support_perbill":17773947,"approval":88.7500002,"support":1.7773947},{"time_hours":55,"approval_perbill":885416667,"support_perbill":17434800,"approval":88.5416667,"support":1.74348},{"time_hours":56,"approval_perbill":883333334,"support_perbill":17107313,"approval":88.3333334,"support":1.7107313},{"time_hours":57,"approval_perbill":881250001,"support_perbill":16790896,"approval":88.1250001,"support":1.6790896},{"time_hours":58,"approval_perbill":879166668,"support_perbill":16484995,"approval":87.9166668,"support":1.6484995},{"time_hours":59,"approval_perbill":877083334,"support_perbill":16189096,"approval":87.7083334,"support":1.6189096},{"time_hours":60,"approval_perbill":875000001,"support_perbill":15902716,"approval":87.5000001,"support":1.5902716},{"time_hours":61,"approval_perbill":872916668,"support_perbill":15625403,"approval":87.2916668,"support":1.5625403},{"time_hours":62,"approval_perbill":870833335,"support_perbill":15356733,"approval":87.0833335,"support":1.5356733},{"time_hours":63,"approval_perbill":868750000,"support_perbill":15096307,"approval":86.875,"support":1.5096307},{"time_hours":64,"approval_perbill":866666667,"support_perbill":14843753,"approval":86.6666667,"support":1.4843753},{"time_hours":65,"approval_perbill":864583334,"support_perbill":14598719,"approval":86.4583334,"support":1.4598719},{"time_hours":66,"approval_perbill":862500001,"support_perbill":14360873,"approval":86.2500001,"support":1.4360873},{"time_hours":67,"approval_perbill":860416668,"support_perbill":14129905,"approval":86.0416668,"support":1.4129905},{"time_hours":68,"approval_perbill":858333334,"support_perbill":13905519,"approval":85.8333334,"support":1.3905519},{"time_hours":69,"approval_perbill":856250001,"support_perbill":13687439,"approval":85.6250001,"support":1.3687439},{"time_hours":70,"approval_perbill":854166668,"support_perbill":13475403,"approval":85.4166668,"support":1.3475403},{"time_hours":71,"approval_perbill":852083335,"support_perbill":13269162,"approval":85.2083335,"support":1.3269162},{"time_hours":72,"approval_perbill":850000001,"support_perbill":13068482,"approval":85.0000001,"support":1.3068482},{"time_hours":73,"approval_perbill":847916668,"support_perbill":12873141,"approval":84.7916668,"support":1.2873141},{"time_hours":74,"approval_perbill":845833335,"support_perbill":12682930,"approval":84.5833335,"support":1.268293},{"time_hours":75,"approval_perbill":843750002,"support_perbill":12497648,"approval":84.3750002,"support":1.2497648},{"time_hours":76,"approval_perbill":841666667,"support_perbill":12317106,"approval":84.1666667,"support":1.2317106},{"time_hours":77,"approval_perbill":839583334,"support_perbill":12141125,"approval":83.9583334,"support":1.2141125},{"time_hours":78,"approval_perbill":837500001,"support_perbill":11969535,"approval":83.7500001,"support":1.1969535},{"time_hours":79,"approval_perbill":835416668,"support_perbill":11802172,"approval":83.5416668,"support":1.1802172},{"time_hours":80,"approval_perbill":833333334,"support_perbill":11638883,"approval":83.3333334,"support":1.1638883},{"time_hours":81,"approval_perbill":831250001,"support_perbill":11479520,"approval":83.1250001,"support":1.147952},{"time_hours":82,"approval_perbill":829166668,"support_perbill":11323944,"approval":82.9166668,"support":1.1323944},{"time_hours":83,"approval_perbill":827083335,"support_perbill":11172021,"approval":82.7083335,"support":1.1172021},{"time_hours":84,"approval_perbill":825000000,"support_perbill":11023624,"approval":82.5,"support":1.1023624},{"time_hours":85,"approval_perbill":822916667,"support_perbill":10878632,"approval":82.2916667,"support":1.0878632},{"time_hours":86,"approval_perbill":820833334,"support_perbill":10736929,"approval":82.0833334,"support":1.0736929},{"time_hours":87,"approval_perbill":818750001,"support_perbill":10598404,"approval":81.8750001,"support":1.0598404},{"time_hours":88,"approval_perbill":816666668,"support_perbill":10462952,"approval":81.6666668,"support":1.0462952},{"time_hours":89,"approval_perbill":814583334,"support_perbill":10330471,"approval":81.4583334,"support":1.0330471},{"time_hours":90,"approval_perbill":812500001,"support_perbill":10200864,"approval":81.2500001,"support":1.0200864},{"time_hours":91,"approval_perbill":810416668,"support_perbill":10074040,"approval":81.0416668,"support":1.007404},{"time_hours":92,"approval_perbill":808333335,"support_perbill":9949909,"approval":80.8333335,"support":0.9949909},{"time_hours":93,"approval_perbill":806250001,"support_perbill":9828387,"approval":80.6250001,"support":0.9828387},{"time_hours":94,"approval_perbill":804166668,"support_perbill":9709392,"approval":80.4166668,"support":0.9709392},{"time_hours":95,"approval_perbill":802083335,"support_perbill":9592846,"approval":80.2083335,"support":0.9592846},{"time_hours":96,"approval_perbill":800000002,"support_perbill":9478675,"approval":80.0000002,"support":0.9478675},{"time_hours":97,"approval_perbill":797916667,"support_perbill":9366806,"approval":79.7916667,"support":0.9366806},{"time_hours":98,"approval_perbill":795833334,"support_perbill":9257171,"approval":79.5833334,"support":0.9257171},{"time_hours":99,"approval_perbill":793750001,"support_perbill":9149703,"approval":79.3750001,"support":0.9149703},{"time_hours":100,"approval_perbill":791666668,"support_perbill":9044338,"approval":79.1666668,"support":0.9044338},{"time_hours":101,"approval_perbill":789583334,"support_perbill":8941016,"approval":78.9583334,"support":0.8941016},{"time_hours":102,"approval_perbill":787500001,"support_perbill":8839678,"approval":78.7500001,"support":0.8839678},{"time_hours":103,"approval_perbill":785416668,"support_perbill":8740267,"approval":78.5416668,"support":0.8740267},{"time_hours":104,"approval_perbill":783333335,"support_perbill":8642729,"approval":78.3333335,"support":0.8642729},{"time_hours":105,"approval_perbill":781250000,"support_perbill":8547010,"approval":78.125,"support":0.854701},{"time_hours":106,"approval_perbill":779166667,"support_perbill":8453062,"approval":77.9166667,"support":0.8453062},{"time_hours":107,"approval_perbill":777083334,"support_perbill":8360835,"approval":77.7083334,"support":0.8360835},{"time_hours":108,"approval_perbill":775000001,"support_perbill":8270281,"approval":77.5000001,"support":0.8270281},{"time_hours":109,"approval_perbill":772916668,"support_perbill":8181358,"approval":77.2916668,"support":0.8181358},{"time_hours":110,"approval_perbill":770833334,"support_perbill":8094019,"approval":77.0833334,"support":0.8094019},{"time_hours":111,"approval_perbill":768750001,"support_perbill":8008224,"approval":76.8750001,"support":0.8008224},{"time_hours":112,"approval_perbill":766666668,"support_perbill":7923932,"approval":76.6666668,"support":0.7923932},{"time_hours":113,"approval_perbill":764583335,"support_perbill":7841104,"approval":76.4583335,"support":0.7841104},{"time_hours":114,"approval_perbill":762500001,"support_perbill":7759701,"approval":76.2500001,"support":0.7759701},{"time_hours":115,"approval_perbill":760416668,"support_perbill":7679688,"approval":76.0416668,"support":0.7679688},{"time_hours":116,"approval_perbill":758333335,"support_perbill":7601030,"approval":75.8333335,"support":0.760103},{"time_hours":117,"approval_perbill":756250002,"support_perbill":7523691,"approval":75.6250002,"support":0.7523691},{"time_hours":118,"approval_perbill":754166667,"support_perbill":7447639,"approval":75.4166667,"support":0.7447639},{"time_hours":119,"approval_perbill":752083334,"support_perbill":7372843,"approval":75.2083334,"support":0.7372843},{"time_hours":120,"approval_perbill":750000001,"support_perbill":7299272,"approval":75.0000001,"support":0.7299272},{"time_hours":121,"approval_perbill":747916668,"support_perbill":7226894,"approval":74.7916668,"support":0.7226894},{"time_hours":122,"approval_perbill":745833334,"support_perbill":7155683,"approval":74.5833334,"support":0.7155683},{"time_hours":123,"approval_perbill":743750001,"support_perbill":7085609,"approval":74.3750001,"support":0.7085609},{"time_hours":124,"approval_perbill":741666668,"support_perbill":7016647,"approval":74.1666668,"support":0.7016647},{"time_hours":125,"approval_perbill":739583335,"support_perbill":6948769,"approval":73.9583335,"support":0.6948769},{"time_hours":126,"approval_perbill":737500000,"support_perbill":6881949,"approval":73.75,"support":0.6881949},{"time_hours":127,"approval_perbill":735416667,"support_perbill":6816165,"approval":73.5416667,"support":0.6816165},{"time_hours":128,"approval_perbill":733333334,"support_perbill":6751391,"approval":73.3333334,"support":0.6751391},{"time_hours":129,"approval_perbill":731250001,"support_perbill":6687605,"approval":73.1250001,"support":0.6687605},{"time_hours":130,"approval_perbill":729166668,"support_perbill":6624784,"approval":72.9166668,"support":0.6624784},{"time_hours":131,"approval_perbill":727083334,"support_perbill":6562907,"approval":72.7083334,"support":0.6562907},{"time_hours":132,"approval_perbill":725000001,"support_perbill":6501952,"approval":72.5000001,"support":0.6501952},{"time_hours":133,"approval_perbill":722916668,"support_perbill":6441899,"approval":72.2916668,"support":0.6441899},{"time_hours":134,"approval_perbill":720833335,"support_perbill":6382728,"approval":72.0833335,"support":0.6382728},{"time_hours":135,"approval_perbill":718750001,"support_perbill":6324419,"approval":71.8750001,"support":0.6324419},{"time_hours":136,"approval_perbill":716666668,"support_perbill":6266955,"approval":71.6666668,"support":0.6266955},{"time_hours":137,"approval_perbill":714583335,"support_perbill":6210316,"approval":71.4583335,"support":0.6210316},{"time_hours":138,"approval_perbill":712500002,"support_perbill":6154486,"approval":71.2500002,"support":0.6154486},{"time_hours":139,"approval_perbill":710416667,"support_perbill":6099446,"approval":71.0416667,"support":0.6099446},{"time_hours":140,"approval_perbill":708333334,"support_perbill":6045181,"approval":70.8333334,"support":0.6045181},{"time_hours":141,"approval_perbill":706250001,"support_perbill":5991674,"approval":70.6250001,"support":0.5991674},{"time_hours":142,"approval_perbill":704166668,"support_perbill":5938909,"approval":70.4166668,"support":0.5938909},{"time_hours":143,"approval_perbill":702083334,"support_perbill":5886871,"approval":70.2083334,"support":0.5886871},{"time_hours":144,"approval_perbill":700000001,"support_perbill":5835545,"approval":70.0000001,"support":0.5835545},{"time_hours":145,"approval_perbill":697916668,"support_perbill":5784916,"approval":69.7916668,"support":0.5784916},{"time_hours":146,"approval_perbill":695833335,"support_perbill":5734971,"approval":69.5833335,"support":0.5734971},{"time_hours":147,"approval_perbill":693750000,"support_perbill":5685696,"approval":69.375,"support":0.5685696},{"time_hours":148,"approval_perbill":691666667,"support_perbill":5637077,"approval":69.1666667,"support":0.5637077},{"time_hours":149,"approval_perbill":689583334,"support_perbill":5589101,"approval":68.9583334,"support":0.5589101},{"time_hours":150,"approval_perbill":687500001,"support_perbill":5541755,"approval":68.7500001,"support":0.5541755},{"time_hours":151,"approval_perbill":685416668,"support_perbill":5495028,"approval":68.5416668,"support":0.5495028},{"time_hours":152,"approval_perbill":683333334,"support_perbill":5448907,"approval":68.3333334,"support":0.5448907},{"time_hours":153,"approval_perbill":681250001,"support_perbill":5403380,"approval":68.1250001,"support":0.540338},{"time_hours":154,"approval_perbill":679166668,"support_perbill":5358437,"approval":67.9166668,"support":0.5358437},{"time_hours":155,"approval_perbill":677083335,"support_perbill":5314065,"approval":67.7083335,"support":0.5314065},{"time_hours":156,"approval_perbill":675000001,"support_perbill":5270255,"approval":67.5000001,"support":0.5270255},{"time_hours":157,"approval_perbill":672916668,"support_perbill":5226995,"approval":67.2916668,"support":0.5226995},{"time_hours":158,"approval_perbill":670833335,"support_perbill":5184275,"approval":67.0833335,"support":0.5184275},{"time_hours":159,"approval_perbill":668750002,"support_perbill":5142085,"approval":66.8750002,"support":0.5142085},{"time_hours":160,"approval_perbill":666666667,"support_perbill":5100415,"approval":66.6666667,"support":0.5100415},{"time_hours":161,"approval_perbill":664583334,"support_perbill":5059257,"approval":66.4583334,"support":0.5059257},{"time_hours":162,"approval_perbill":662500001,"support_perbill":5018599,"approval":66.2500001,"support":0.5018599},{"time_hours":163,"approval_perbill":660416668,"support_perbill":4978434,"approval":66.0416668,"support":0.4978434},{"time_hours":164,"approval_perbill":658333334,"support_perbill":4938753,"approval":65.8333334,"support":0.4938753},{"time_hours":165,"approval_perbill":656250001,"support_perbill":4899546,"approval":65.6250001,"support":0.4899546},{"time_hours":166,"approval_perbill":654166668,"support_perbill":4860805,"approval":65.4166668,"support":0.4860805},{"time_hours":167,"approval_perbill":652083335,"support_perbill":4822523,"approval":65.2083335,"support":0.4822523},{"time_hours":168,"approval_perbill":650000000,"support_perbill":4784690,"approval":65,"support":0.478469},{"time_hours":169,"approval_perbill":647916667,"support_perbill":4747299,"approval":64.7916667,"support":0.4747299},{"time_hours":170,"approval_perbill":645833334,"support_perbill":4710343,"approval":64.5833334,"support":0.4710343},{"time_hours":171,"approval_perbill":643750001,"support_perbill":4673814,"approval":64.3750001,"support":0.4673814},{"time_hours":172,"approval_perbill":641666668,"support_perbill":4637704,"approval":64.1666668,"support":0.4637704},{"time_hours":173,"approval_perbill":639583334,"support_perbill":4602006,"approval":63.9583334,"support":0.4602006},{"time_hours":174,"approval_perbill":637500001,"support_perbill":4566713,"approval":63.7500001,"support":0.4566713},{"time_hours":175,"approval_perbill":635416668,"support_perbill":4531819,"approval":63.5416668,"support":0.4531819},{"time_hours":176,"approval_perbill":633333335,"support_perbill":4497317,"approval":63.3333335,"support":0.4497317},{"time_hours":177,"approval_perbill":631250001,"support_perbill":4463200,"approval":63.1250001,"support":0.44632},{"time_hours":178,"approval_perbill":629166668,"support_perbill":4429461,"approval":62.9166668,"support":0.4429461},{"time_hours":179,"approval_perbill":627083335,"support_perbill":4396095,"approval":62.7083335,"support":0.4396095},{"time_hours":180,"approval_perbill":625000002,"support_perbill":4363095,"approval":62.5000002,"support":0.4363095},{"time_hours":181,"approval_perbill":622916667,"support_perbill":4330456,"approval":62.2916667,"support":0.4330456},{"time_hours":182,"approval_perbill":620833334,"support_perbill":4298171,"approval":62.0833334,"support":0.4298171},{"time_hours":183,"approval_perbill":618750001,"support_perbill":4266235,"approval":61.8750001,"support":0.4266235},{"time_hours":184,"approval_perbill":616666668,"support_perbill":4234642,"approval":61.6666668,"support":0.4234642},{"time_hours":185,"approval_perbill":614583334,"support_perbill":4203386,"approval":61.4583334,"support":0.4203386},{"time_hours":186,"approval_perbill":612500001,"support_perbill":4172462,"approval":61.2500001,"support":0.4172462},{"time_hours":187,"approval_perbill":610416668,"support_perbill":4141866,"approval":61.0416668,"support":0.4141866},{"time_hours":188,"approval_perbill":608333335,"support_perbill":4111591,"approval":60.8333335,"support":0.4111591},{"time_hours":189,"approval_perbill":606250000,"support_perbill":4081633,"approval":60.625,"support":0.4081633},{"time_hours":190,"approval_perbill":604166667,"support_perbill":4051987,"approval":60.4166667,"support":0.4051987},{"time_hours":191,"approval_perbill":602083334,"support_perbill":4022648,"approval":60.2083334,"support":0.4022648},{"time_hours":192,"approval_perbill":600000001,"support_perbill":3993611,"approval":60.0000001,"support":0.3993611},{"time_hours":193,"approval_perbill":597916668,"support_perbill":3964871,"approval":59.7916668,"support":0.3964871},{"time_hours":194,"approval_perbill":595833334,"support_perbill":3936425,"approval":59.5833334,"support":0.3936425},{"time_hours":195,"approval_perbill":593750001,"support_perbill":3908267,"approval":59.3750001,"support":0.3908267},{"time_hours":196,"approval_perbill":591666668,"support_perbill":3880393,"approval":59.1666668,"support":0.3880393},{"time_hours":197,"approval_perbill":589583335,"support_perbill":3852799,"approval":58.9583335,"support":0.3852799},{"time_hours":198,"approval_perbill":587500001,"support_perbill":3825481,"approval":58.7500001,"support":0.3825481},{"time_hours":199,"approval_perbill":585416668,"support_perbill":3798435,"approval":58.5416668,"support":0.3798435},{"time_hours":200,"approval_perbill":583333335,"support_perbill":3771656,"approval":58.3333335,"support":0.3771656},{"time_hours":201,"approval_perbill":581250002,"support_perbill":3745140,"approval":58.1250002,"support":0.374514},{"time_hours":202,"approval_perbill":579166667,"support_perbill":3718885,"approval":57.9166667,"support":0.3718885},{"time_hours":203,"approval_perbill":577083334,"support_perbill":3692885,"approval":57.7083334,"support":0.3692885},{"time_hours":204,"approval_perbill":575000001,"support_perbill":3667137,"approval":57.5000001,"support":0.3667137},{"time_hours":205,"approval_perbill":572916668,"support_perbill":3641638,"approval":57.2916668,"support":0.3641638},{"time_hours":206,"approval_perbill":570833334,"support_perbill":3616385,"approval":57.0833334,"support":0.3616385},{"time_hours":207,"approval_perbill":568750001,"support_perbill":3591372,"approval":56.8750001,"support":0.3591372},{"time_hours":208,"approval_perbill":566666668,"support_perbill":3566598,"approval":56.6666668,"support":0.3566598},{"time_hours":209,"approval_perbill":564583335,"support_perbill":3542058,"approval":56.4583335,"support":0.3542058},{"time_hours":210,"approval_perbill":562500000,"support_perbill":3517749,"approval":56.25,"support":0.3517749},{"time_hours":211,"approval_perbill":560416667,"support_perbill":3493669,"approval":56.0416667,"support":0.3493669},{"time_hours":212,"approval_perbill":558333334,"support_perbill":3469813,"approval":55.8333334,"support":0.3469813},{"time_hours":213,"approval_perbill":556250001,"support_perbill":3446179,"approval":55.6250001,"support":0.3446179},{"time_hours":214,"approval_perbill":554166668,"support_perbill":3422764,"approval":55.4166668,"support":0.3422764},{"time_hours":215,"approval_perbill":552083334,"support_perbill":3399565,"approval":55.2083334,"support":0.3399565},{"time_hours":216,"approval_perbill":550000001,"support_perbill":3376578,"approval":55.0000001,"support":0.3376578},{"time_hours":217,"approval_perbill":547916668,"support_perbill":3353801,"approval":54.7916668,"support":0.3353801},{"time_hours":218,"approval_perbill":545833335,"support_perbill":3331230,"approval":54.5833335,"support":0.333123},{"time_hours":219,"approval_perbill":543750001,"support_perbill":3308864,"approval":54.3750001,"support":0.3308864},{"time_hours":220,"approval_perbill":541666668,"support_perbill":3286700,"approval":54.1666668,"support":0.32867},{"time_hours":221,"approval_perbill":539583335,"support_perbill":3264733,"approval":53.9583335,"support":0.3264733},{"time_hours":222,"approval_perbill":537500002,"support_perbill":3242963,"approval":53.7500002,"support":0.3242963},{"time_hours":223,"approval_perbill":535416667,"support_perbill":3221386,"approval":53.5416667,"support":0.3221386},{"time_hours":224,"approval_perbill":533333334,"support_perbill":3200001,"approval":53.3333334,"support":0.3200001},{"time_hours":225,"approval_perbill":531250001,"support_perbill":3178803,"approval":53.1250001,"support":0.3178803},{"time_hours":226,"approval_perbill":529166668,"support_perbill":3157791,"approval":52.9166668,"support":0.3157791},{"time_hours":227,"approval_perbill":527083334,"support_perbill":3136962,"approval":52.7083334,"support":0.3136962},{"time_hours":228,"approval_perbill":525000001,"support_perbill":3116315,"approval":52.5000001,"support":0.3116315},{"time_hours":229,"approval_perbill":522916668,"support_perbill":3095846,"approval":52.2916668,"support":0.3095846},{"time_hours":230,"approval_perbill":520833335,"support_perbill":3075553,"approval":52.0833335,"support":0.3075553},{"time_hours":231,"approval_perbill":518750000,"support_perbill":3055435,"approval":51.875,"support":0.3055435},{"time_hours":232,"approval_perbill":516666667,"support_perbill":3035488,"approval":51.6666667,"support":0.3035488},{"time_hours":233,"approval_perbill":514583334,"support_perbill":3015711,"approval":51.4583334,"support":0.3015711},{"time_hours":234,"approval_perbill":512500001,"support_perbill":2996101,"approval":51.2500001,"support":0.2996101},{"time_hours":235,"approval_perbill":510416668,"support_perbill":2976657,"approval":51.0416668,"support":0.2976657},{"time_hours":236,"approval_perbill":508333334,"support_perbill":2957376,"approval":50.8333334,"support":0.2957376},{"time_hours":237,"approval_perbill":506250001,"support_perbill":2938257,"approval":50.6250001,"support":0.2938257},{"time_hours":238,"approval_perbill":504166668,"support_perbill":2919296,"approval":50.4166668,"support":0.2919296},{"time_hours":239,"approval_perbill":502083335,"support_perbill":2900493,"approval":50.2083335,"support":0.2900493},{"time_hours":240,"approval_perbill":500000000,"support_perbill":2881845,"approval":50,"support":0.2881845},{"time_hours":241,"approval_perbill":500000000,"support_perbill":2863350,"approval":50,"support":0.286335},{"time_hours":242,"approval_perbill":500000000,"support_perbill":2845007,"approval":50,"support":0.2845007},{"time_hours":243,"approval_perbill":500000000,"support_perbill":2826814,"approval":50,"support":0.2826814},{"time_hours":244,"approval_perbill":500000000,"support_perbill":2808768,"approval":50,"support":0.2808768},{"time_hours":245,"approval_perbill":500000000,"support_perbill":2790868,"approval":50,"support":0.2790868},{"time_hours":246,"approval_perbill":500000000,"support_perbill":2773113,"approval":50,"support":0.2773113},{"time_hours":247,"approval_perbill":500000000,"support_perbill":2755500,"approval":50,"support":0.27555},{"time_hours":248,"approval_perbill":500000000,"support_perbill":2738028,"approval":50,"support":0.2738028},{"time_hours":249,"approval_perbill":500000000,"support_perbill":2720695,"approval":50,"support":0.2720695},{"time_hours":250,"approval_perbill":500000000,"support_perbill":2703500,"approval":50,"support":0.27035},{"time_hours":251,"approval_perbill":500000000,"support_perbill":2686440,"approval":50,"support":0.268644},{"time_hours":252,"approval_perbill":500000000,"support_perbill":2669515,"approval":50,"support":0.2669515},{"time_hours":253,"approval_perbill":500000000,"support_perbill":2652722,"approval":50,"support":0.2652722},{"time_hours":254,"approval_perbill":500000000,"support_perbill":2636060,"approval":50,"support":0.263606},{"time_hours":255,"approval_perbill":500000000,"support_perbill":2619528,"approval":50,"support":0.2619528},{"time_hours":256,"approval_perbill":500000000,"support_perbill":2603124,"approval":50,"support":0.2603124},{"time_hours":257,"approval_perbill":500000000,"support_perbill":2586847,"approval":50,"support":0.2586847},{"time_hours":258,"approval_perbill":500000000,"support_perbill":2570694,"approval":50,"support":0.2570694},{"time_hours":259,"approval_perbill":500000000,"support_perbill":2554666,"approval":50,"support":0.2554666},{"time_hours":260,"approval_perbill":500000000,"support_perbill":2538760,"approval":50,"support":0.253876},{"time_hours":261,"approval_perbill":500000000,"support_perbill":2522974,"approval":50,"support":0.2522974},{"time_hours":262,"approval_perbill":500000000,"support_perbill":2507308,"approval":50,"support":0.2507308},{"time_hours":263,"approval_perbill":500000000,"support_perbill":2491760,"approval":50,"support":0.249176},{"time_hours":264,"approval_perbill":500000000,"support_perbill":2476330,"approval":50,"support":0.247633},{"time_hours":265,"approval_perbill":500000000,"support_perbill":2461014,"approval":50,"support":0.2461014},{"time_hours":266,"approval_perbill":500000000,"support_perbill":2445813,"approval":50,"support":0.2445813},{"time_hours":267,"approval_perbill":500000000,"support_perbill":2430725,"approval":50,"support":0.2430725},{"time_hours":268,"approval_perbill":500000000,"support_perbill":2415748,"approval":50,"support":0.2415748},{"time_hours":269,"approval_perbill":500000000,"support_perbill":2400882,"approval":50,"support":0.2400882},{"time_hours":270,"approval_perbill":500000000,"support_perbill":2386125,"approval":50,"support":0.2386125},{"time_hours":271,"approval_perbill":500000000,"support_perbill":2371476,"approval":50,"support":0.2371476},{"time_hours":272,"approval_perbill":500000000,"support_perbill":2356934,"approval":50,"support":0.2356934},{"time_hours":273,"approval_perbill":500000000,"support_perbill":2342498,"approval":50,"support":0.2342498},{"time_hours":274,"approval_perbill":500000000,"support_perbill":2328166,"approval":50,"support":0.2328166},{"time_hours":275,"approval_perbill":500000000,"support_perbill":2313938,"approval":50,"support":0.2313938},{"time_hours":276,"approval_perbill":500000000,"support_perbill":2299812,"approval":50,"support":0.2299812},{"time_hours":277,"approval_perbill":500000000,"support_perbill":2285787,"approval":50,"support":0.2285787},{"time_hours":278,"approval_perbill":500000000,"support_perbill":2271863,"approval":50,"support":0.2271863},{"time_hours":279,"approval_perbill":500000000,"support_perbill":2258037,"approval":50,"support":0.2258037},{"time_hours":280,"approval_perbill":500000000,"support_perbill":2244309,"approval":50,"support":0.2244309},{"time_hours":281,"approval_perbill":500000000,"support_perbill":2230679,"approval":50,"support":0.2230679},{"time_hours":282,"approval_perbill":500000000,"support_perbill":2217144,"approval":50,"support":0.2217144},{"time_hours":283,"approval_perbill":500000000,"support_perbill":2203704,"approval":50,"support":0.2203704},{"time_hours":284,"approval_perbill":500000000,"support_perbill":2190358,"approval":50,"support":0.2190358},{"time_hours":285,"approval_perbill":500000000,"support_perbill":2177105,"approval":50,"support":0.2177105},{"time_hours":286,"approval_perbill":500000000,"support_perbill":2163944,"approval":50,"support":0.2163944},{"time_hours":287,"approval_perbill":500000000,"support_perbill":2150874,"approval":50,"support":0.2150874},{"time_hours":288,"approval_perbill":500000000,"support_perbill":2137894,"approval":50,"support":0.2137894},{"time_hours":289,"approval_perbill":500000000,"support_perbill":2125004,"approval":50,"support":0.2125004},{"time_hours":290,"approval_perbill":500000000,"support_perbill":2112201,"approval":50,"support":0.2112201},{"time_hours":291,"approval_perbill":500000000,"support_perbill":2099486,"approval":50,"support":0.2099486},{"time_hours":292,"approval_perbill":500000000,"support_perbill":2086857,"approval":50,"support":0.2086857},{"time_hours":293,"approval_perbill":500000000,"support_perbill":2074314,"approval":50,"support":0.2074314},{"time_hours":294,"approval_perbill":500000000,"support_perbill":2061856,"approval":50,"support":0.2061856},{"time_hours":295,"approval_perbill":500000000,"support_perbill":2049481,"approval":50,"support":0.2049481},{"time_hours":296,"approval_perbill":500000000,"support_perbill":2037190,"approval":50,"support":0.203719},{"time_hours":297,"approval_perbill":500000000,"support_perbill":2024980,"approval":50,"support":0.202498},{"time_hours":298,"approval_perbill":500000000,"support_perbill":2012852,"approval":50,"support":0.2012852},{"time_hours":299,"approval_perbill":500000000,"support_perbill":2000805,"approval":50,"support":0.2000805},{"time_hours":300,"approval_perbill":500000000,"support_perbill":1988837,"approval":50,"support":0.1988837},{"time_hours":301,"approval_perbill":500000000,"support_perbill":1976948,"approval":50,"support":0.1976948},{"time_hours":302,"approval_perbill":500000000,"support_perbill":1965138,"approval":50,"support":0.1965138},{"time_hours":303,"approval_perbill":500000000,"support_perbill":1953404,"approval":50,"support":0.1953404},{"time_hours":304,"approval_perbill":500000000,"support_perbill":1941748,"approval":50,"support":0.1941748},{"time_hours":305,"approval_perbill":500000000,"support_perbill":1930167,"approval":50,"support":0.1930167},{"time_hours":306,"approval_perbill":500000000,"support_perbill":1918662,"approval":50,"support":0.1918662},{"time_hours":307,"approval_perbill":500000000,"support_perbill":1907230,"approval":50,"support":0.190723},{"time_hours":308,"approval_perbill":500000000,"support_perbill":1895873,"approval":50,"support":0.1895873},{"time_hours":309,"approval_perbill":500000000,"support_perbill":1884589,"approval":50,"support":0.1884589},{"time_hours":310,"approval_perbill":500000000,"support_perbill":1873377,"approval":50,"support":0.1873377},{"time_hours":311,"approval_perbill":500000000,"support_perbill":1862236,"approval":50,"support":0.1862236},{"time_hours":312,"approval_perbill":500000000,"support_perbill":1851166,"approval":50,"support":0.1851166},{"time_hours":313,"approval_perbill":500000000,"support_perbill":1840167,"approval":50,"support":0.1840167},{"time_hours":314,"approval_perbill":500000000,"support_perbill":1829237,"approval":50,"support":0.1829237},{"time_hours":315,"approval_perbill":500000000,"support_perbill":1818376,"approval":50,"support":0.1818376},{"time_hours":316,"approval_perbill":500000000,"support_perbill":1807584,"approval":50,"support":0.1807584},{"time_hours":317,"approval_perbill":500000000,"support_perbill":1796859,"approval":50,"support":0.1796859},{"time_hours":318,"approval_perbill":500000000,"support_perbill":1786201,"approval":50,"support":0.1786201},{"time_hours":319,"approval_perbill":500000000,"support_perbill":1775609,"approval":50,"support":0.1775609},{"time_hours":320,"approval_perbill":500000000,"support_perbill":1765084,"approval":50,"support":0.1765084},{"time_hours":321,"approval_perbill":500000000,"support_perbill":1754623,"approval":50,"support":0.1754623},{"time_hours":322,"approval_perbill":500000000,"support_perbill":1744227,"approval":50,"support":0.1744227},{"time_hours":323,"approval_perbill":500000000,"support_perbill":1733895,"approval":50,"support":0.1733895},{"time_hours":324,"approval_perbill":500000000,"support_perbill":1723626,"approval":50,"support":0.1723626},{"time_hours":325,"approval_perbill":500000000,"support_perbill":1713420,"approval":50,"support":0.171342},{"time_hours":326,"approval_perbill":500000000,"support_perbill":1703276,"approval":50,"support":0.1703276},{"time_hours":327,"approval_perbill":500000000,"support_perbill":1693194,"approval":50,"support":0.1693194},{"time_hours":328,"approval_perbill":500000000,"support_perbill":1683172,"approval":50,"support":0.1683172},{"time_hours":329,"approval_perbill":500000000,"support_perbill":1673212,"approval":50,"support":0.1673212},{"time_hours":330,"approval_perbill":500000000,"support_perbill":1663311,"approval":50,"support":0.1663311},{"time_hours":331,"approval_perbill":500000000,"support_perbill":1653470,"approval":50,"support":0.165347},{"time_hours":332,"approval_perbill":500000000,"support_perbill":1643687,"approval":50,"support":0.1643687},{"time_hours":333,"approval_perbill":500000000,"support_perbill":1633963,"approval":50,"support":0.1633963},{"time_hours":334,"approval_perbill":500000000,"support_perbill":1624297,"approval":50,"support":0.1624297},{"time_hours":335,"approval_perbill":500000000,"support_perbill":1614689,"approval":50,"support":0.1614689},{"time_hours":336,"approval_perbill":500000000,"support_perbill":1605137,"approval":50,"support":0.1605137},{"time_hours":337,"approval_perbill":500000000,"support_perbill":1595641,"approval":50,"support":0.1595641},{"time_hours":338,"approval_perbill":500000000,"support_perbill":1586201,"approval":50,"support":0.1586201},{"time_hours":339,"approval_perbill":500000000,"support_perbill":1576817,"approval":50,"support":0.1576817},{"time_hours":340,"approval_perbill":500000000,"support_perbill":1567487,"approval":50,"support":0.1567487},{"time_hours":341,"approval_perbill":500000000,"support_perbill":1558212,"approval":50,"support":0.1558212},{"time_hours":342,"approval_perbill":500000000,"support_perbill":1548990,"approval":50,"support":0.154899},{"time_hours":343,"approval_perbill":500000000,"support_perbill":1539823,"approval":50,"support":0.1539823},{"time_hours":344,"approval_perbill":500000000,"support_perbill":1530708,"approval":50,"support":0.1530708},{"time_hours":345,"approval_perbill":500000000,"support_perbill":1521645,"approval":50,"support":0.1521645},{"time_hours":346,"approval_perbill":500000000,"support_perbill":1512635,"approval":50,"support":0.1512635},{"time_hours":347,"approval_perbill":500000000,"support_perbill":1503676,"approval":50,"support":0.1503676},{"time_hours":348,"approval_perbill":500000000,"support_perbill":1494768,"approval":50,"support":0.1494768},{"time_hours":349,"approval_perbill":500000000,"support_perbill":1485912,"approval":50,"support":0.1485912},{"time_hours":350,"approval_perbill":500000000,"support_perbill":1477105,"approval":50,"support":0.1477105},{"time_hours":351,"approval_perbill":500000000,"support_perbill":1468348,"approval":50,"support":0.1468348},{"time_hours":352,"approval_perbill":500000000,"support_perbill":1459641,"approval":50,"support":0.1459641},{"time_hours":353,"approval_perbill":500000000,"support_perbill":1450983,"approval":50,"support":0.1450983},{"time_hours":354,"approval_perbill":500000000,"support_perbill":1442373,"approval":50,"support":0.1442373},{"time_hours":355,"approval_perbill":500000000,"support_perbill":1433812,"approval":50,"support":0.1433812},{"time_hours":356,"approval_perbill":500000000,"support_perbill":1425298,"approval":50,"support":0.1425298},{"time_hours":357,"approval_perbill":500000000,"support_perbill":1416832,"approval":50,"support":0.1416832},{"time_hours":358,"approval_perbill":500000000,"support_perbill":1408413,"approval":50,"support":0.1408413},{"time_hours":359,"approval_perbill":500000000,"support_perbill":1400040,"approval":50,"support":0.140004},{"time_hours":360,"approval_perbill":500000000,"support_perbill":1391714,"approval":50,"support":0.1391714},{"time_hours":361,"approval_perbill":500000000,"support_perbill":1383434,"approval":50,"support":0.1383434},{"time_hours":362,"approval_perbill":500000000,"support_perbill":1375199,"approval":50,"support":0.1375199},{"time_hours":363,"approval_perbill":500000000,"support_perbill":1367009,"approval":50,"support":0.1367009},{"time_hours":364,"approval_perbill":500000000,"support_perbill":1358864,"approval":50,"support":0.1358864},{"time_hours":365,"approval_perbill":500000000,"support_perbill":1350763,"approval":50,"support":0.1350763},{"time_hours":366,"approval_perbill":500000000,"support_perbill":1342706,"approval":50,"support":0.1342706},{"time_hours":367,"approval_perbill":500000000,"support_perbill":1334693,"approval":50,"support":0.1334693},{"time_hours":368,"approval_perbill":500000000,"support_perbill":1326723,"approval":50,"support":0.1326723},{"time_hours":369,"approval_perbill":500000000,"support_perbill":1318796,"approval":50,"support":0.1318796},{"time_hours":370,"approval_perbill":500000000,"support_perbill":1310912,"approval":50,"support":0.1310912},{"time_hours":371,"approval_perbill":500000000,"support_perbill":1303070,"approval":50,"support":0.130307},{"time_hours":372,"approval_perbill":500000000,"support_perbill":1295270,"approval":50,"support":0.129527},{"time_hours":373,"approval_perbill":500000000,"support_perbill":1287511,"approval":50,"support":0.1287511},{"time_hours":374,"approval_perbill":500000000,"support_perbill":1279794,"approval":50,"support":0.1279794},{"time_hours":375,"approval_perbill":500000000,"support_perbill":1272118,"approval":50,"support":0.1272118},{"time_hours":376,"approval_perbill":500000000,"support_perbill":1264482,"approval":50,"support":0.1264482},{"time_hours":377,"approval_perbill":500000000,"support_perbill":1256886,"approval":50,"support":0.1256886},{"time_hours":378,"approval_perbill":500000000,"support_perbill":1249331,"approval":50,"support":0.1249331},{"time_hours":379,"approval_perbill":500000000,"support_perbill":1241815,"approval":50,"support":0.1241815},{"time_hours":380,"approval_perbill":500000000,"support_perbill":1234338,"approval":50,"support":0.1234338},{"time_hours":381,"approval_perbill":500000000,"support_perbill":1226901,"approval":50,"support":0.1226901},{"time_hours":382,"approval_perbill":500000000,"support_perbill":1219502,"approval":50,"support":0.1219502},{"time_hours":383,"approval_perbill":500000000,"support_perbill":1212142,"approval":50,"support":0.1212142},{"time_hours":384,"approval_perbill":500000000,"support_perbill":1204819,"approval":50,"support":0.1204819},{"time_hours":385,"approval_perbill":500000000,"support_perbill":1197535,"approval":50,"support":0.1197535},{"time_hours":386,"approval_perbill":500000000,"support_perbill":1190288,"approval":50,"support":0.1190288},{"time_hours":387,"approval_perbill":500000000,"support_perbill":1183078,"approval":50,"support":0.1183078},{"time_hours":388,"approval_perbill":500000000,"support_perbill":1175906,"approval":50,"support":0.1175906},{"time_hours":389,"approval_perbill":500000000,"support_perbill":1168770,"approval":50,"support":0.116877},{"time_hours":390,"approval_perbill":500000000,"support_perbill":1161670,"approval":50,"support":0.116167},{"time_hours":391,"approval_perbill":500000000,"support_perbill":1154606,"approval":50,"support":0.1154606},{"time_hours":392,"approval_perbill":500000000,"support_perbill":1147579,"approval":50,"support":0.1147579},{"time_hours":393,"approval_perbill":500000000,"support_perbill":1140587,"approval":50,"support":0.1140587},{"time_hours":394,"approval_perbill":500000000,"support_perbill":1133630,"approval":50,"support":0.113363},{"time_hours":395,"approval_perbill":500000000,"support_perbill":1126708,"approval":50,"support":0.1126708},{"time_hours":396,"approval_perbill":500000000,"support_perbill":1119821,"approval":50,"support":0.1119821},{"time_hours":397,"approval_perbill":500000000,"support_perbill":1112968,"approval":50,"support":0.1112968},{"time_hours":398,"approval_perbill":500000000,"support_perbill":1106150,"approval":50,"support":0.110615},{"time_hours":399,"approval_perbill":500000000,"support_perbill":1099366,"approval":50,"support":0.1099366},{"time_hours":400,"approval_perbill":500000000,"support_perbill":1092615,"approval":50,"support":0.1092615},{"time_hours":401,"approval_perbill":500000000,"support_perbill":1085898,"approval":50,"support":0.1085898},{"time_hours":402,"approval_perbill":500000000,"support_perbill":1079214,"approval":50,"support":0.1079214},{"time_hours":403,"approval_perbill":500000000,"support_perbill":1072564,"approval":50,"support":0.1072564},{"time_hours":404,"approval_perbill":500000000,"support_perbill":1065945,"approval":50,"support":0.1065945},{"time_hours":405,"approval_perbill":500000000,"support_perbill":1059360,"approval":50,"support":0.105936},{"time_hours":406,"approval_perbill":500000000,"support_perbill":1052807,"approval":50,"support":0.1052807},{"time_hours":407,"approval_perbill":500000000,"support_perbill":1046285,"approval":50,"support":0.1046285},{"time_hours":408,"approval_perbill":500000000,"support_perbill":1039796,"approval":50,"support":0.1039796},{"time_hours":409,"approval_perbill":500000000,"support_perbill":1033338,"approval":50,"support":0.1033338},{"time_hours":410,"approval_perbill":500000000,"support_perbill":1026911,"approval":50,"support":0.1026911},{"time_hours":411,"approval_perbill":500000000,"support_perbill":1020516,"approval":50,"support":0.1020516},{"time_hours":412,"approval_perbill":500000000,"support_perbill":1014151,"approval":50,"support":0.1014151},{"time_hours":413,"approval_perbill":500000000,"support_perbill":1007817,"approval":50,"support":0.1007817},{"time_hours":414,"approval_perbill":500000000,"support_perbill":1001514,"approval":50,"support":0.1001514},{"time_hours":415,"approval_perbill":500000000,"support_perbill":995241,"approval":50,"support":0.0995241},{"time_hours":416,"approval_perbill":500000000,"support_perbill":988997,"approval":50,"support":0.0988997},{"time_hours":417,"approval_perbill":500000000,"support_perbill":982784,"approval":50,"support":0.0982784},{"time_hours":418,"approval_perbill":500000000,"support_perbill":976600,"approval":50,"support":0.09766},{"time_hours":419,"approval_perbill":500000000,"support_perbill":970446,"approval":50,"support":0.0970446},{"time_hours":420,"approval_perbill":500000000,"support_perbill":964320,"approval":50,"support":0.096432},{"time_hours":421,"approval_perbill":500000000,"support_perbill":958224,"approval":50,"support":0.0958224},{"time_hours":422,"approval_perbill":500000000,"support_perbill":952156,"approval":50,"support":0.0952156},{"time_hours":423,"approval_perbill":500000000,"support_perbill":946117,"approval":50,"support":0.0946117},{"time_hours":424,"approval_perbill":500000000,"support_perbill":940106,"approval":50,"support":0.0940106},{"time_hours":425,"approval_perbill":500000000,"support_perbill":934123,"approval":50,"support":0.0934123},{"time_hours":426,"approval_perbill":500000000,"support_perbill":928169,"approval":50,"support":0.0928169},{"time_hours":427,"approval_perbill":500000000,"support_perbill":922242,"approval":50,"support":0.0922242},{"time_hours":428,"approval_perbill":500000000,"support_perbill":916342,"approval":50,"support":0.0916342},{"time_hours":429,"approval_perbill":500000000,"support_perbill":910470,"approval":50,"support":0.091047},{"time_hours":430,"approval_perbill":500000000,"support_perbill":904626,"approval":50,"support":0.0904626},{"time_hours":431,"approval_perbill":500000000,"support_perbill":898808,"approval":50,"support":0.0898808},{"time_hours":432,"approval_perbill":500000000,"support_perbill":893017,"approval":50,"support":0.0893017},{"time_hours":433,"approval_perbill":500000000,"support_perbill":887252,"approval":50,"support":0.0887252},{"time_hours":434,"approval_perbill":500000000,"support_perbill":881514,"approval":50,"support":0.0881514},{"time_hours":435,"approval_perbill":500000000,"support_perbill":875802,"approval":50,"support":0.0875802},{"time_hours":436,"approval_perbill":500000000,"support_perbill":870117,"approval":50,"support":0.0870117},{"time_hours":437,"approval_perbill":500000000,"support_perbill":864457,"approval":50,"support":0.0864457},{"time_hours":438,"approval_perbill":500000000,"support_perbill":858823,"approval":50,"support":0.0858823},{"time_hours":439,"approval_perbill":500000000,"support_perbill":853214,"approval":50,"support":0.0853214},{"time_hours":440,"approval_perbill":500000000,"support_perbill":847631,"approval":50,"support":0.0847631},{"time_hours":441,"approval_perbill":500000000,"support_perbill":842073,"approval":50,"support":0.0842073},{"time_hours":442,"approval_perbill":500000000,"support_perbill":836540,"approval":50,"support":0.083654},{"time_hours":443,"approval_perbill":500000000,"support_perbill":831032,"approval":50,"support":0.0831032},{"time_hours":444,"approval_perbill":500000000,"support_perbill":825549,"approval":50,"support":0.0825549},{"time_hours":445,"approval_perbill":500000000,"support_perbill":820090,"approval":50,"support":0.082009},{"time_hours":446,"approval_perbill":500000000,"support_perbill":814655,"approval":50,"support":0.0814655},{"time_hours":447,"approval_perbill":500000000,"support_perbill":809245,"approval":50,"support":0.0809245},{"time_hours":448,"approval_perbill":500000000,"support_perbill":803858,"approval":50,"support":0.0803858},{"time_hours":449,"approval_perbill":500000000,"support_perbill":798496,"approval":50,"support":0.0798496},{"time_hours":450,"approval_perbill":500000000,"support_perbill":793157,"approval":50,"support":0.0793157},{"time_hours":451,"approval_perbill":500000000,"support_perbill":787842,"approval":50,"support":0.0787842},{"time_hours":452,"approval_perbill":500000000,"support_perbill":782550,"approval":50,"support":0.078255},{"time_hours":453,"approval_perbill":500000000,"support_perbill":777282,"approval":50,"support":0.0777282},{"time_hours":454,"approval_perbill":500000000,"support_perbill":772037,"approval":50,"support":0.0772037},{"time_hours":455,"approval_perbill":500000000,"support_perbill":766814,"approval":50,"support":0.0766814},{"time_hours":456,"approval_perbill":500000000,"support_perbill":761615,"approval":50,"support":0.0761615},{"time_hours":457,"approval_perbill":500000000,"support_perbill":756438,"approval":50,"support":0.0756438},{"time_hours":458,"approval_perbill":500000000,"support_perbill":751283,"approval":50,"support":0.0751283},{"time_hours":459,"approval_perbill":500000000,"support_perbill":746151,"approval":50,"support":0.0746151},{"time_hours":460,"approval_perbill":500000000,"support_perbill":741041,"approval":50,"support":0.0741041},{"time_hours":461,"approval_perbill":500000000,"support_perbill":735953,"approval":50,"support":0.0735953},{"time_hours":462,"approval_perbill":500000000,"support_perbill":730887,"approval":50,"support":0.0730887},{"time_hours":463,"approval_perbill":500000000,"support_perbill":725843,"approval":50,"support":0.0725843},{"time_hours":464,"approval_perbill":500000000,"support_perbill":720821,"approval":50,"support":0.0720821},{"time_hours":465,"approval_perbill":500000000,"support_perbill":715820,"approval":50,"support":0.071582},{"time_hours":466,"approval_perbill":500000000,"support_perbill":710840,"approval":50,"support":0.071084},{"time_hours":467,"approval_perbill":500000000,"support_perbill":705881,"approval":50,"support":0.0705881},{"time_hours":468,"approval_perbill":500000000,"support_perbill":700944,"approval":50,"support":0.0700944},{"time_hours":469,"approval_perbill":500000000,"support_perbill":696028,"approval":50,"support":0.0696028},{"time_hours":470,"approval_perbill":500000000,"support_perbill":691132,"approval":50,"support":0.0691132},{"time_hours":471,"approval_perbill":500000000,"support_perbill":686257,"approval":50,"support":0.0686257},{"time_hours":472,"approval_perbill":500000000,"support_perbill":681403,"approval":50,"support":0.0681403},{"time_hours":473,"approval_perbill":500000000,"support_perbill":676569,"approval":50,"support":0.0676569},{"time_hours":474,"approval_perbill":500000000,"support_perbill":671756,"approval":50,"support":0.0671756},{"time_hours":475,"approval_perbill":500000000,"support_perbill":666962,"approval":50,"support":0.0666962},{"time_hours":476,"approval_perbill":500000000,"support_perbill":662189,"approval":50,"support":0.0662189},{"time_hours":477,"approval_perbill":500000000,"support_perbill":657436,"approval":50,"support":0.0657436},{"time_hours":478,"approval_perbill":500000000,"support_perbill":652702,"approval":50,"support":0.0652702},{"time_hours":479,"approval_perbill":500000000,"support_perbill":647988,"approval":50,"support":0.0647988},{"time_hours":480,"approval_perbill":500000000,"support_perbill":643294,"approval":50,"support":0.0643294},{"time_hours":481,"approval_perbill":500000000,"support_perbill":638619,"approval":50,"support":0.0638619},{"time_hours":482,"approval_perbill":500000000,"support_perbill":633963,"approval":50,"support":0.0633963},{"time_hours":483,"approval_perbill":500000000,"support_perbill":629327,"approval":50,"support":0.0629327},{"time_hours":484,"approval_perbill":500000000,"support_perbill":624709,"approval":50,"support":0.0624709},{"time_hours":485,"approval_perbill":500000000,"support_perbill":620111,"approval":50,"support":0.0620111},{"time_hours":486,"approval_perbill":500000000,"support_perbill":615531,"approval":50,"support":0.0615531},{"time_hours":487,"approval_perbill":500000000,"support_perbill":610970,"approval":50,"support":0.061097},{"time_hours":488,"approval_perbill":500000000,"support_perbill":606428,"approval":50,"support":0.0606428},{"time_hours":489,"approval_perbill":500000000,"support_perbill":601904,"approval":50,"support":0.0601904},{"time_hours":490,"approval_perbill":500000000,"support_perbill":597399,"approval":50,"support":0.0597399},{"time_hours":491,"approval_perbill":500000000,"support_perbill":592912,"approval":50,"support":0.0592912},{"time_hours":492,"approval_perbill":500000000,"support_perbill":588443,"approval":50,"support":0.0588443},{"time_hours":493,"approval_perbill":500000000,"support_perbill":583992,"approval":50,"support":0.0583992},{"time_hours":494,"approval_perbill":500000000,"support_perbill":579559,"approval":50,"support":0.0579559},{"time_hours":495,"approval_perbill":500000000,"support_perbill":575144,"approval":50,"support":0.0575144},{"time_hours":496,"approval_perbill":500000000,"support_perbill":570747,"approval":50,"support":0.0570747},{"time_hours":497,"approval_perbill":500000000,"support_perbill":566367,"approval":50,"support":0.0566367},{"time_hours":498,"approval_perbill":500000000,"support_perbill":562005,"approval":50,"support":0.0562005},{"time_hours":499,"approval_perbill":500000000,"support_perbill":557660,"approval":50,"support":0.055766},{"time_hours":500,"approval_perbill":500000000,"support_perbill":553332,"approval":50,"support":0.0553332},{"time_hours":501,"approval_perbill":500000000,"support_perbill":549022,"approval":50,"support":0.0549022},{"time_hours":502,"approval_perbill":500000000,"support_perbill":544729,"approval":50,"support":0.0544729},{"time_hours":503,"approval_perbill":500000000,"support_perbill":540452,"approval":50,"support":0.0540452},{"time_hours":504,"approval_perbill":500000000,"support_perbill":536193,"approval":50,"support":0.0536193},{"time_hours":505,"approval_perbill":500000000,"support_perbill":531950,"approval":50,"support":0.053195},{"time_hours":506,"approval_perbill":500000000,"support_perbill":527725,"approval":50,"support":0.0527725},{"time_hours":507,"approval_perbill":500000000,"support_perbill":523515,"approval":50,"support":0.0523515},{"time_hours":508,"approval_perbill":500000000,"support_perbill":519322,"approval":50,"support":0.0519322},{"time_hours":509,"approval_perbill":500000000,"support_perbill":515146,"approval":50,"support":0.0515146},{"time_hours":510,"approval_perbill":500000000,"support_perbill":510986,"approval":50,"support":0.0510986},{"time_hours":511,"approval_perbill":500000000,"support_perbill":506842,"approval":50,"support":0.0506842},{"time_hours":512,"approval_perbill":500000000,"support_perbill":502715,"approval":50,"support":0.0502715},{"time_hours":513,"approval_perbill":500000000,"support_perbill":498603,"approval":50,"support":0.0498603},{"time_hours":514,"approval_perbill":500000000,"support_perbill":494507,"approval":50,"support":0.0494507},{"time_hours":515,"approval_perbill":500000000,"support_perbill":490427,"approval":50,"support":0.0490427},{"time_hours":516,"approval_perbill":500000000,"support_perbill":486363,"approval":50,"support":0.0486363},{"time_hours":517,"approval_perbill":500000000,"support_perbill":482314,"approval":50,"support":0.0482314},{"time_hours":518,"approval_perbill":500000000,"support_perbill":478282,"approval":50,"support":0.0478282},{"time_hours":519,"approval_perbill":500000000,"support_perbill":474264,"approval":50,"support":0.0474264},{"time_hours":520,"approval_perbill":500000000,"support_perbill":470262,"approval":50,"support":0.0470262},{"time_hours":521,"approval_perbill":500000000,"support_perbill":466275,"approval":50,"support":0.0466275},{"time_hours":522,"approval_perbill":500000000,"support_perbill":462304,"approval":50,"support":0.0462304},{"time_hours":523,"approval_perbill":500000000,"support_perbill":458347,"approval":50,"support":0.0458347},{"time_hours":524,"approval_perbill":500000000,"support_perbill":454406,"approval":50,"support":0.0454406},{"time_hours":525,"approval_perbill":500000000,"support_perbill":450479,"approval":50,"support":0.0450479},{"time_hours":526,"approval_perbill":500000000,"support_perbill":446568,"approval":50,"support":0.0446568},{"time_hours":527,"approval_perbill":500000000,"support_perbill":442671,"approval":50,"support":0.0442671},{"time_hours":528,"approval_perbill":500000000,"support_perbill":438789,"approval":50,"support":0.0438789},{"time_hours":529,"approval_perbill":500000000,"support_perbill":434921,"approval":50,"support":0.0434921},{"time_hours":530,"approval_perbill":500000000,"support_perbill":431068,"approval":50,"support":0.0431068},{"time_hours":531,"approval_perbill":500000000,"support_perbill":427230,"approval":50,"support":0.042723},{"time_hours":532,"approval_perbill":500000000,"support_perbill":423406,"approval":50,"support":0.0423406},{"time_hours":533,"approval_perbill":500000000,"support_perbill":419596,"approval":50,"support":0.0419596},{"time_hours":534,"approval_perbill":500000000,"support_perbill":415800,"approval":50,"support":0.04158},{"time_hours":535,"approval_perbill":500000000,"support_perbill":412019,"approval":50,"support":0.0412019},{"time_hours":536,"approval_perbill":500000000,"support_perbill":408251,"approval":50,"support":0.0408251},{"time_hours":537,"approval_perbill":500000000,"support_perbill":404498,"approval":50,"support":0.0404498},{"time_hours":538,"approval_perbill":500000000,"support_perbill":400758,"approval":50,"support":0.0400758},{"time_hours":539,"approval_perbill":500000000,"support_perbill":397033,"approval":50,"support":0.0397033},{"time_hours":540,"approval_perbill":500000000,"support_perbill":393321,"approval":50,"support":0.0393321},{"time_hours":541,"approval_perbill":500000000,"support_perbill":389622,"approval":50,"support":0.0389622},{"time_hours":542,"approval_perbill":500000000,"support_perbill":385937,"approval":50,"support":0.0385937},{"time_hours":543,"approval_perbill":500000000,"support_perbill":382266,"approval":50,"support":0.0382266},{"time_hours":544,"approval_perbill":500000000,"support_perbill":378608,"approval":50,"support":0.0378608},{"time_hours":545,"approval_perbill":500000000,"support_perbill":374964,"approval":50,"support":0.0374964},{"time_hours":546,"approval_perbill":500000000,"support_perbill":371333,"approval":50,"support":0.0371333},{"time_hours":547,"approval_perbill":500000000,"support_perbill":367715,"approval":50,"support":0.0367715},{"time_hours":548,"approval_perbill":500000000,"support_perbill":364110,"approval":50,"support":0.036411},{"time_hours":549,"approval_perbill":500000000,"support_perbill":360519,"approval":50,"support":0.0360519},{"time_hours":550,"approval_perbill":500000000,"support_perbill":356940,"approval":50,"support":0.035694},{"time_hours":551,"approval_perbill":500000000,"support_perbill":353374,"approval":50,"support":0.0353374},{"time_hours":552,"approval_perbill":500000000,"support_perbill":349821,"approval":50,"support":0.0349821},{"time_hours":553,"approval_perbill":500000000,"support_perbill":346281,"approval":50,"support":0.0346281},{"time_hours":554,"approval_perbill":500000000,"support_perbill":342754,"approval":50,"support":0.0342754},{"time_hours":555,"approval_perbill":500000000,"support_perbill":339239,"approval":50,"support":0.0339239},{"time_hours":556,"approval_perbill":500000000,"support_perbill":335737,"approval":50,"support":0.0335737},{"time_hours":557,"approval_perbill":500000000,"support_perbill":332248,"approval":50,"support":0.0332248},{"time_hours":558,"approval_perbill":500000000,"support_perbill":328771,"approval":50,"support":0.0328771},{"time_hours":559,"approval_perbill":500000000,"support_perbill":325306,"approval":50,"support":0.0325306},{"time_hours":560,"approval_perbill":500000000,"support_perbill":321854,"approval":50,"support":0.0321854},{"time_hours":561,"approval_perbill":500000000,"support_perbill":318414,"approval":50,"support":0.0318414},{"time_hours":562,"approval_perbill":500000000,"support_perbill":314986,"approval":50,"support":0.0314986},{"time_hours":563,"approval_perbill":500000000,"support_perbill":311570,"approval":50,"support":0.031157},{"time_hours":564,"approval_perbill":500000000,"support_perbill":308166,"approval":50,"support":0.0308166},{"time_hours":565,"approval_perbill":500000000,"support_perbill":304775,"approval":50,"support":0.0304775},{"time_hours":566,"approval_perbill":500000000,"support_perbill":301395,"approval":50,"support":0.0301395},{"time_hours":567,"approval_perbill":500000000,"support_perbill":298027,"approval":50,"support":0.0298027},{"time_hours":568,"approval_perbill":500000000,"support_perbill":294671,"approval":50,"support":0.0294671},{"time_hours":569,"approval_perbill":500000000,"support_perbill":291326,"approval":50,"support":0.0291326},{"time_hours":570,"approval_perbill":500000000,"support_perbill":287994,"approval":50,"support":0.0287994},{"time_hours":571,"approval_perbill":500000000,"support_perbill":284673,"approval":50,"support":0.0284673},{"time_hours":572,"approval_perbill":500000000,"support_perbill":281363,"approval":50,"support":0.0281363},{"time_hours":573,"approval_perbill":500000000,"support_perbill":278066,"approval":50,"support":0.0278066},{"time_hours":574,"approval_perbill":500000000,"support_perbill":274779,"approval":50,"support":0.0274779},{"time_hours":575,"approval_perbill":500000000,"support_perbill":271504,"approval":50,"support":0.0271504},{"time_hours":576,"approval_perbill":500000000,"support_perbill":268240,"approval":50,"support":0.026824},{"time_hours":577,"approval_perbill":500000000,"support_perbill":264988,"approval":50,"support":0.0264988},{"time_hours":578,"approval_perbill":500000000,"support_perbill":261746,"approval":50,"support":0.0261746},{"time_hours":579,"approval_perbill":500000000,"support_perbill":258516,"approval":50,"support":0.0258516},{"time_hours":580,"approval_perbill":500000000,"support_perbill":255297,"approval":50,"support":0.0255297},{"time_hours":581,"approval_perbill":500000000,"support_perbill":252089,"approval":50,"support":0.0252089},{"time_hours":582,"approval_perbill":500000000,"support_perbill":248892,"approval":50,"support":0.0248892},{"time_hours":583,"approval_perbill":500000000,"support_perbill":245706,"approval":50,"support":0.0245706},{"time_hours":584,"approval_perbill":500000000,"support_perbill":242531,"approval":50,"support":0.0242531},{"time_hours":585,"approval_perbill":500000000,"support_perbill":239367,"approval":50,"support":0.0239367},{"time_hours":586,"approval_perbill":500000000,"support_perbill":236213,"approval":50,"support":0.0236213},{"time_hours":587,"approval_perbill":500000000,"support_perbill":233070,"approval":50,"support":0.023307},{"time_hours":588,"approval_perbill":500000000,"support_perbill":229938,"approval":50,"support":0.0229938},{"time_hours":589,"approval_perbill":500000000,"support_perbill":226816,"approval":50,"support":0.0226816},{"time_hours":590,"approval_perbill":500000000,"support_perbill":223705,"approval":50,"support":0.0223705},{"time_hours":591,"approval_perbill":500000000,"support_perbill":220604,"approval":50,"support":0.0220604},{"time_hours":592,"approval_perbill":500000000,"support_perbill":217514,"approval":50,"support":0.0217514},{"time_hours":593,"approval_perbill":500000000,"support_perbill":214434,"approval":50,"support":0.0214434},{"time_hours":594,"approval_perbill":500000000,"support_perbill":211365,"approval":50,"support":0.0211365},{"time_hours":595,"approval_perbill":500000000,"support_perbill":208306,"approval":50,"support":0.0208306},{"time_hours":596,"approval_perbill":500000000,"support_perbill":205257,"approval":50,"support":0.0205257},{"time_hours":597,"approval_perbill":500000000,"support_perbill":202218,"approval":50,"support":0.0202218},{"time_hours":598,"approval_perbill":500000000,"support_perbill":199189,"approval":50,"support":0.0199189},{"time_hours":599,"approval_perbill":500000000,"support_perbill":196170,"approval":50,"support":0.019617},{"time_hours":600,"approval_perbill":500000000,"support_perbill":193162,"approval":50,"support":0.0193162},{"time_hours":601,"approval_perbill":500000000,"support_perbill":190163,"approval":50,"support":0.0190163},{"time_hours":602,"approval_perbill":500000000,"support_perbill":187175,"approval":50,"support":0.0187175},{"time_hours":603,"approval_perbill":500000000,"support_perbill":184196,"approval":50,"support":0.0184196},{"time_hours":604,"approval_perbill":500000000,"support_perbill":181227,"approval":50,"support":0.0181227},{"time_hours":605,"approval_perbill":500000000,"support_perbill":178268,"approval":50,"support":0.0178268},{"time_hours":606,"approval_perbill":500000000,"support_perbill":175318,"approval":50,"support":0.0175318},{"time_hours":607,"approval_perbill":500000000,"support_perbill":172378,"approval":50,"support":0.0172378},{"time_hours":608,"approval_perbill":500000000,"support_perbill":169448,"approval":50,"support":0.0169448},{"time_hours":609,"approval_perbill":500000000,"support_perbill":166528,"approval":50,"support":0.0166528},{"time_hours":610,"approval_perbill":500000000,"support_perbill":163617,"approval":50,"support":0.0163617},{"time_hours":611,"approval_perbill":500000000,"support_perbill":160715,"approval":50,"support":0.0160715},{"time_hours":612,"approval_perbill":500000000,"support_perbill":157823,"approval":50,"support":0.0157823},{"time_hours":613,"approval_perbill":500000000,"support_perbill":154940,"approval":50,"support":0.015494},{"time_hours":614,"approval_perbill":500000000,"support_perbill":152067,"approval":50,"support":0.0152067},{"time_hours":615,"approval_perbill":500000000,"support_perbill":149203,"approval":50,"support":0.0149203},{"time_hours":616,"approval_perbill":500000000,"support_perbill":146348,"approval":50,"support":0.0146348},{"time_hours":617,"approval_perbill":500000000,"support_perbill":143503,"approval":50,"support":0.0143503},{"time_hours":618,"approval_perbill":500000000,"support_perbill":140667,"approval":50,"support":0.0140667},{"time_hours":619,"approval_perbill":500000000,"support_perbill":137839,"approval":50,"support":0.0137839},{"time_hours":620,"approval_perbill":500000000,"support_perbill":135021,"approval":50,"support":0.0135021},{"time_hours":621,"approval_perbill":500000000,"support_perbill":132212,"approval":50,"support":0.0132212},{"time_hours":622,"approval_perbill":500000000,"support_perbill":129412,"approval":50,"support":0.0129412},{"time_hours":623,"approval_perbill":500000000,"support_perbill":126621,"approval":50,"support":0.0126621},{"time_hours":624,"approval_perbill":500000000,"support_perbill":123839,"approval":50,"support":0.0123839},{"time_hours":625,"approval_perbill":500000000,"support_perbill":121065,"approval":50,"support":0.0121065},{"time_hours":626,"approval_perbill":500000000,"support_perbill":118301,"approval":50,"support":0.0118301},{"time_hours":627,"approval_perbill":500000000,"support_perbill":115545,"approval":50,"support":0.0115545},{"time_hours":628,"approval_perbill":500000000,"support_perbill":112798,"approval":50,"support":0.0112798},{"time_hours":629,"approval_perbill":500000000,"support_perbill":110060,"approval":50,"support":0.011006},{"time_hours":630,"approval_perbill":500000000,"support_perbill":107330,"approval":50,"support":0.010733},{"time_hours":631,"approval_perbill":500000000,"support_perbill":104610,"approval":50,"support":0.010461},{"time_hours":632,"approval_perbill":500000000,"support_perbill":101897,"approval":50,"support":0.0101897},{"time_hours":633,"approval_perbill":500000000,"support_perbill":99193,"approval":50,"support":0.0099193},{"time_hours":634,"approval_perbill":500000000,"support_perbill":96498,"approval":50,"support":0.0096498},{"time_hours":635,"approval_perbill":500000000,"support_perbill":93811,"approval":50,"support":0.0093811},{"time_hours":636,"approval_perbill":500000000,"support_perbill":91133,"approval":50,"support":0.0091133},{"time_hours":637,"approval_perbill":500000000,"support_perbill":88462,"approval":50,"support":0.0088462},{"time_hours":638,"approval_perbill":500000000,"support_perbill":85801,"approval":50,"support":0.0085801},{"time_hours":639,"approval_perbill":500000000,"support_perbill":83147,"approval":50,"support":0.0083147},{"time_hours":640,"approval_perbill":500000000,"support_perbill":80502,"approval":50,"support":0.0080502},{"time_hours":641,"approval_perbill":500000000,"support_perbill":77865,"approval":50,"support":0.0077865},{"time_hours":642,"approval_perbill":500000000,"support_perbill":75236,"approval":50,"support":0.0075236},{"time_hours":643,"approval_perbill":500000000,"support_perbill":72616,"approval":50,"support":0.0072616},{"time_hours":644,"approval_perbill":500000000,"support_perbill":70003,"approval":50,"support":0.0070003},{"time_hours":645,"approval_perbill":500000000,"support_perbill":67399,"approval":50,"support":0.0067399},{"time_hours":646,"approval_perbill":500000000,"support_perbill":64802,"approval":50,"support":0.0064802},{"time_hours":647,"approval_perbill":500000000,"support_perbill":62214,"approval":50,"support":0.0062214},{"time_hours":648,"approval_perbill":500000000,"support_perbill":59634,"approval":50,"support":0.0059634},{"time_hours":649,"approval_perbill":500000000,"support_perbill":57061,"approval":50,"support":0.0057061},{"time_hours":650,"approval_perbill":500000000,"support_perbill":54496,"approval":50,"support":0.0054496},{"time_hours":651,"approval_perbill":500000000,"support_perbill":51940,"approval":50,"support":0.005194},{"time_hours":652,"approval_perbill":500000000,"support_perbill":49391,"approval":50,"support":0.0049391},{"time_hours":653,"approval_perbill":500000000,"support_perbill":46850,"approval":50,"support":0.004685},{"time_hours":654,"approval_perbill":500000000,"support_perbill":44316,"approval":50,"support":0.0044316},{"time_hours":655,"approval_perbill":500000000,"support_perbill":41790,"approval":50,"support":0.004179},{"time_hours":656,"approval_perbill":500000000,"support_perbill":39272,"approval":50,"support":0.0039272},{"time_hours":657,"approval_perbill":500000000,"support_perbill":36762,"approval":50,"support":0.0036762},{"time_hours":658,"approval_perbill":500000000,"support_perbill":34259,"approval":50,"support":0.0034259},{"time_hours":659,"approval_perbill":500000000,"support_perbill":31764,"approval":50,"support":0.0031764},{"time_hours":660,"approval_perbill":500000000,"support_perbill":29276,"approval":50,"support":0.0029276},{"time_hours":661,"approval_perbill":500000000,"support_perbill":26796,"approval":50,"support":0.0026796},{"time_hours":662,"approval_perbill":500000000,"support_perbill":24323,"approval":50,"support":0.0024323},{"time_hours":663,"approval_perbill":500000000,"support_perbill":21858,"approval":50,"support":0.0021858},{"time_hours":664,"approval_perbill":500000000,"support_perbill":19400,"approval":50,"support":0.00194},{"time_hours":665,"approval_perbill":500000000,"support_perbill":16950,"approval":50,"support":0.001695},{"time_hours":666,"approval_perbill":500000000,"support_perbill":14507,"approval":50,"support":0.0014507},{"time_hours":667,"approval_perbill":500000000,"support_perbill":12071,"approval":50,"support":0.0012071},{"time_hours":668,"approval_perbill":500000000,"support_perbill":9642,"approval":50,"support":0.0009642},{"time_hours":669,"approval_perbill":500000000,"support_perbill":7221,"approval":50,"support":0.0007221},{"time_hours":670,"approval_perbill":500000000,"support_perbill":4807,"approval":50,"support":0.0004807},{"time_hours":671,"approval_perbill":500000000,"support_perbill":2400,"approval":50,"support":0.00024},{"time_hours":672,"approval_perbill":500000000,"support_perbill":0,"approval":50,"support":0}]')},16234:p=>{"use strict";p.exports=JSON.parse('[{"time_hours":0,"approval_perbill":1000000000,"support_perbill":500000000,"approval":100,"support":50},{"time_hours":1,"approval_perbill":997037038,"support_perbill":499255953,"approval":99.7037038,"support":49.9255953},{"time_hours":2,"approval_perbill":994100296,"support_perbill":498511905,"approval":99.4100296,"support":49.8511905},{"time_hours":3,"approval_perbill":991189429,"support_perbill":497767858,"approval":99.1189429,"support":49.7767858},{"time_hours":4,"approval_perbill":988304096,"support_perbill":497023810,"approval":98.8304096,"support":49.702381},{"time_hours":5,"approval_perbill":985443960,"support_perbill":496279762,"approval":98.544396,"support":49.6279762},{"time_hours":6,"approval_perbill":982608697,"support_perbill":495535715,"approval":98.2608697,"support":49.5535715},{"time_hours":7,"approval_perbill":979797981,"support_perbill":494791667,"approval":97.9797981,"support":49.4791667},{"time_hours":8,"approval_perbill":977011496,"support_perbill":494047620,"approval":97.7011496,"support":49.404762},{"time_hours":9,"approval_perbill":974248928,"support_perbill":493303572,"approval":97.4248928,"support":49.3303572},{"time_hours":10,"approval_perbill":971509972,"support_perbill":492559524,"approval":97.1509972,"support":49.2559524},{"time_hours":11,"approval_perbill":968794328,"support_perbill":491815477,"approval":96.8794328,"support":49.1815477},{"time_hours":12,"approval_perbill":966101697,"support_perbill":491071429,"approval":96.6101697,"support":49.1071429},{"time_hours":13,"approval_perbill":963431787,"support_perbill":490327381,"approval":96.3431787,"support":49.0327381},{"time_hours":14,"approval_perbill":960784315,"support_perbill":489583334,"approval":96.0784315,"support":48.9583334},{"time_hours":15,"approval_perbill":958158997,"support_perbill":488839286,"approval":95.8158997,"support":48.8839286},{"time_hours":16,"approval_perbill":955555557,"support_perbill":488095239,"approval":95.5555557,"support":48.8095239},{"time_hours":17,"approval_perbill":952973721,"support_perbill":487351191,"approval":95.2973721,"support":48.7351191},{"time_hours":18,"approval_perbill":950413224,"support_perbill":486607143,"approval":95.0413224,"support":48.6607143},{"time_hours":19,"approval_perbill":947873801,"support_perbill":485863096,"approval":94.7873801,"support":48.5863096},{"time_hours":20,"approval_perbill":945355193,"support_perbill":485119048,"approval":94.5355193,"support":48.5119048},{"time_hours":21,"approval_perbill":942857143,"support_perbill":484375000,"approval":94.2857143,"support":48.4375},{"time_hours":22,"approval_perbill":940379404,"support_perbill":483630953,"approval":94.0379404,"support":48.3630953},{"time_hours":23,"approval_perbill":937921728,"support_perbill":482886905,"approval":93.7921728,"support":48.2886905},{"time_hours":24,"approval_perbill":935483872,"support_perbill":482142858,"approval":93.5483872,"support":48.2142858},{"time_hours":25,"approval_perbill":933065598,"support_perbill":481398810,"approval":93.3065598,"support":48.139881},{"time_hours":26,"approval_perbill":930666667,"support_perbill":480654762,"approval":93.0666667,"support":48.0654762},{"time_hours":27,"approval_perbill":928286854,"support_perbill":479910715,"approval":92.8286854,"support":47.9910715},{"time_hours":28,"approval_perbill":925925927,"support_perbill":479166667,"approval":92.5925927,"support":47.9166667},{"time_hours":29,"approval_perbill":923583664,"support_perbill":478422620,"approval":92.3583664,"support":47.842262},{"time_hours":30,"approval_perbill":921259843,"support_perbill":477678572,"approval":92.1259843,"support":47.7678572},{"time_hours":31,"approval_perbill":918954249,"support_perbill":476934524,"approval":91.8954249,"support":47.6934524},{"time_hours":32,"approval_perbill":916666668,"support_perbill":476190477,"approval":91.6666668,"support":47.6190477},{"time_hours":33,"approval_perbill":914396889,"support_perbill":475446429,"approval":91.4396889,"support":47.5446429},{"time_hours":34,"approval_perbill":912144703,"support_perbill":474702381,"approval":91.2144703,"support":47.4702381},{"time_hours":35,"approval_perbill":909909911,"support_perbill":473958334,"approval":90.9909911,"support":47.3958334},{"time_hours":36,"approval_perbill":907692309,"support_perbill":473214286,"approval":90.7692309,"support":47.3214286},{"time_hours":37,"approval_perbill":905491700,"support_perbill":472470239,"approval":90.54917,"support":47.2470239},{"time_hours":38,"approval_perbill":903307888,"support_perbill":471726191,"approval":90.3307888,"support":47.1726191},{"time_hours":39,"approval_perbill":901140685,"support_perbill":470982143,"approval":90.1140685,"support":47.0982143},{"time_hours":40,"approval_perbill":898989900,"support_perbill":470238096,"approval":89.89899,"support":47.0238096},{"time_hours":41,"approval_perbill":896855347,"support_perbill":469494048,"approval":89.6855347,"support":46.9494048},{"time_hours":42,"approval_perbill":894736842,"support_perbill":468750000,"approval":89.4736842,"support":46.875},{"time_hours":43,"approval_perbill":892634208,"support_perbill":468005953,"approval":89.2634208,"support":46.8005953},{"time_hours":44,"approval_perbill":890547265,"support_perbill":467261905,"approval":89.0547265,"support":46.7261905},{"time_hours":45,"approval_perbill":888475838,"support_perbill":466517858,"approval":88.8475838,"support":46.6517858},{"time_hours":46,"approval_perbill":886419755,"support_perbill":465773810,"approval":88.6419755,"support":46.577381},{"time_hours":47,"approval_perbill":884378844,"support_perbill":465029762,"approval":88.4378844,"support":46.5029762},{"time_hours":48,"approval_perbill":882352942,"support_perbill":464285715,"approval":88.2352942,"support":46.4285715},{"time_hours":49,"approval_perbill":880341882,"support_perbill":463541667,"approval":88.0341882,"support":46.3541667},{"time_hours":50,"approval_perbill":878345500,"support_perbill":462797620,"approval":87.83455,"support":46.279762},{"time_hours":51,"approval_perbill":876363637,"support_perbill":462053572,"approval":87.6363637,"support":46.2053572},{"time_hours":52,"approval_perbill":874396136,"support_perbill":461309524,"approval":87.4396136,"support":46.1309524},{"time_hours":53,"approval_perbill":872442841,"support_perbill":460565477,"approval":87.2442841,"support":46.0565477},{"time_hours":54,"approval_perbill":870503599,"support_perbill":459821429,"approval":87.0503599,"support":45.9821429},{"time_hours":55,"approval_perbill":868578256,"support_perbill":459077381,"approval":86.8578256,"support":45.9077381},{"time_hours":56,"approval_perbill":866666667,"support_perbill":458333334,"approval":86.6666667,"support":45.8333334},{"time_hours":57,"approval_perbill":864768684,"support_perbill":457589286,"approval":86.4768684,"support":45.7589286},{"time_hours":58,"approval_perbill":862884162,"support_perbill":456845239,"approval":86.2884162,"support":45.6845239},{"time_hours":59,"approval_perbill":861012957,"support_perbill":456101191,"approval":86.1012957,"support":45.6101191},{"time_hours":60,"approval_perbill":859154930,"support_perbill":455357143,"approval":85.915493,"support":45.5357143},{"time_hours":61,"approval_perbill":857309942,"support_perbill":454613096,"approval":85.7309942,"support":45.4613096},{"time_hours":62,"approval_perbill":855477857,"support_perbill":453869048,"approval":85.5477857,"support":45.3869048},{"time_hours":63,"approval_perbill":853658537,"support_perbill":453125000,"approval":85.3658537,"support":45.3125},{"time_hours":64,"approval_perbill":851851852,"support_perbill":452380953,"approval":85.1851852,"support":45.2380953},{"time_hours":65,"approval_perbill":850057671,"support_perbill":451636905,"approval":85.0057671,"support":45.1636905},{"time_hours":66,"approval_perbill":848275863,"support_perbill":450892858,"approval":84.8275863,"support":45.0892858},{"time_hours":67,"approval_perbill":846506302,"support_perbill":450148810,"approval":84.6506302,"support":45.014881},{"time_hours":68,"approval_perbill":844748859,"support_perbill":449404762,"approval":84.4748859,"support":44.9404762},{"time_hours":69,"approval_perbill":843003414,"support_perbill":448660715,"approval":84.3003414,"support":44.8660715},{"time_hours":70,"approval_perbill":841269842,"support_perbill":447916667,"approval":84.1269842,"support":44.7916667},{"time_hours":71,"approval_perbill":839548024,"support_perbill":447172620,"approval":83.9548024,"support":44.717262},{"time_hours":72,"approval_perbill":837837838,"support_perbill":446428572,"approval":83.7837838,"support":44.6428572},{"time_hours":73,"approval_perbill":836139170,"support_perbill":445684524,"approval":83.613917,"support":44.5684524},{"time_hours":74,"approval_perbill":834451903,"support_perbill":444940477,"approval":83.4451903,"support":44.4940477},{"time_hours":75,"approval_perbill":832775921,"support_perbill":444196429,"approval":83.2775921,"support":44.4196429},{"time_hours":76,"approval_perbill":831111112,"support_perbill":443452381,"approval":83.1111112,"support":44.3452381},{"time_hours":77,"approval_perbill":829457365,"support_perbill":442708334,"approval":82.9457365,"support":44.2708334},{"time_hours":78,"approval_perbill":827814570,"support_perbill":441964286,"approval":82.781457,"support":44.1964286},{"time_hours":79,"approval_perbill":826182619,"support_perbill":441220239,"approval":82.6182619,"support":44.1220239},{"time_hours":80,"approval_perbill":824561404,"support_perbill":440476191,"approval":82.4561404,"support":44.0476191},{"time_hours":81,"approval_perbill":822950820,"support_perbill":439732143,"approval":82.295082,"support":43.9732143},{"time_hours":82,"approval_perbill":821350763,"support_perbill":438988096,"approval":82.1350763,"support":43.8988096},{"time_hours":83,"approval_perbill":819761130,"support_perbill":438244048,"approval":81.976113,"support":43.8244048},{"time_hours":84,"approval_perbill":818181818,"support_perbill":437500000,"approval":81.8181818,"support":43.75},{"time_hours":85,"approval_perbill":816612730,"support_perbill":436755953,"approval":81.661273,"support":43.6755953},{"time_hours":86,"approval_perbill":815053764,"support_perbill":436011905,"approval":81.5053764,"support":43.6011905},{"time_hours":87,"approval_perbill":813504824,"support_perbill":435267858,"approval":81.3504824,"support":43.5267858},{"time_hours":88,"approval_perbill":811965813,"support_perbill":434523810,"approval":81.1965813,"support":43.452381},{"time_hours":89,"approval_perbill":810436635,"support_perbill":433779762,"approval":81.0436635,"support":43.3779762},{"time_hours":90,"approval_perbill":808917198,"support_perbill":433035715,"approval":80.8917198,"support":43.3035715},{"time_hours":91,"approval_perbill":807407408,"support_perbill":432291667,"approval":80.7407408,"support":43.2291667},{"time_hours":92,"approval_perbill":805907174,"support_perbill":431547620,"approval":80.5907174,"support":43.154762},{"time_hours":93,"approval_perbill":804416404,"support_perbill":430803572,"approval":80.4416404,"support":43.0803572},{"time_hours":94,"approval_perbill":802935011,"support_perbill":430059524,"approval":80.2935011,"support":43.0059524},{"time_hours":95,"approval_perbill":801462906,"support_perbill":429315477,"approval":80.1462906,"support":42.9315477},{"time_hours":96,"approval_perbill":800000001,"support_perbill":428571429,"approval":80.0000001,"support":42.8571429},{"time_hours":97,"approval_perbill":798546210,"support_perbill":427827381,"approval":79.854621,"support":42.7827381},{"time_hours":98,"approval_perbill":797101450,"support_perbill":427083334,"approval":79.710145,"support":42.7083334},{"time_hours":99,"approval_perbill":795665635,"support_perbill":426339286,"approval":79.5665635,"support":42.6339286},{"time_hours":100,"approval_perbill":794238684,"support_perbill":425595239,"approval":79.4238684,"support":42.5595239},{"time_hours":101,"approval_perbill":792820513,"support_perbill":424851191,"approval":79.2820513,"support":42.4851191},{"time_hours":102,"approval_perbill":791411043,"support_perbill":424107143,"approval":79.1411043,"support":42.4107143},{"time_hours":103,"approval_perbill":790010194,"support_perbill":423363096,"approval":79.0010194,"support":42.3363096},{"time_hours":104,"approval_perbill":788617887,"support_perbill":422619048,"approval":78.8617887,"support":42.2619048},{"time_hours":105,"approval_perbill":787234043,"support_perbill":421875000,"approval":78.7234043,"support":42.1875},{"time_hours":106,"approval_perbill":785858586,"support_perbill":421130953,"approval":78.5858586,"support":42.1130953},{"time_hours":107,"approval_perbill":784491441,"support_perbill":420386905,"approval":78.4491441,"support":42.0386905},{"time_hours":108,"approval_perbill":783132531,"support_perbill":419642858,"approval":78.3132531,"support":41.9642858},{"time_hours":109,"approval_perbill":781781783,"support_perbill":418898810,"approval":78.1781783,"support":41.889881},{"time_hours":110,"approval_perbill":780439122,"support_perbill":418154762,"approval":78.0439122,"support":41.8154762},{"time_hours":111,"approval_perbill":779104478,"support_perbill":417410715,"approval":77.9104478,"support":41.7410715},{"time_hours":112,"approval_perbill":777777779,"support_perbill":416666667,"approval":77.7777779,"support":41.6666667},{"time_hours":113,"approval_perbill":776458953,"support_perbill":415922620,"approval":77.6458953,"support":41.592262},{"time_hours":114,"approval_perbill":775147929,"support_perbill":415178572,"approval":77.5147929,"support":41.5178572},{"time_hours":115,"approval_perbill":773844642,"support_perbill":414434524,"approval":77.3844642,"support":41.4434524},{"time_hours":116,"approval_perbill":772549020,"support_perbill":413690477,"approval":77.254902,"support":41.3690477},{"time_hours":117,"approval_perbill":771260998,"support_perbill":412946429,"approval":77.1260998,"support":41.2946429},{"time_hours":118,"approval_perbill":769980507,"support_perbill":412202381,"approval":76.9980507,"support":41.2202381},{"time_hours":119,"approval_perbill":768707484,"support_perbill":411458334,"approval":76.8707484,"support":41.1458334},{"time_hours":120,"approval_perbill":767441861,"support_perbill":410714286,"approval":76.7441861,"support":41.0714286},{"time_hours":121,"approval_perbill":766183576,"support_perbill":409970239,"approval":76.6183576,"support":40.9970239},{"time_hours":122,"approval_perbill":764932563,"support_perbill":409226191,"approval":76.4932563,"support":40.9226191},{"time_hours":123,"approval_perbill":763688761,"support_perbill":408482143,"approval":76.3688761,"support":40.8482143},{"time_hours":124,"approval_perbill":762452108,"support_perbill":407738096,"approval":76.2452108,"support":40.7738096},{"time_hours":125,"approval_perbill":761222541,"support_perbill":406994048,"approval":76.1222541,"support":40.6994048},{"time_hours":126,"approval_perbill":760000000,"support_perbill":406250000,"approval":76,"support":40.625},{"time_hours":127,"approval_perbill":758784426,"support_perbill":405505953,"approval":75.8784426,"support":40.5505953},{"time_hours":128,"approval_perbill":757575758,"support_perbill":404761905,"approval":75.7575758,"support":40.4761905},{"time_hours":129,"approval_perbill":756373938,"support_perbill":404017858,"approval":75.6373938,"support":40.4017858},{"time_hours":130,"approval_perbill":755178909,"support_perbill":403273810,"approval":75.5178909,"support":40.327381},{"time_hours":131,"approval_perbill":753990611,"support_perbill":402529762,"approval":75.3990611,"support":40.2529762},{"time_hours":132,"approval_perbill":752808989,"support_perbill":401785715,"approval":75.2808989,"support":40.1785715},{"time_hours":133,"approval_perbill":751633988,"support_perbill":401041667,"approval":75.1633988,"support":40.1041667},{"time_hours":134,"approval_perbill":750465550,"support_perbill":400297620,"approval":75.046555,"support":40.029762},{"time_hours":135,"approval_perbill":749303621,"support_perbill":399553572,"approval":74.9303621,"support":39.9553572},{"time_hours":136,"approval_perbill":748148149,"support_perbill":398809524,"approval":74.8148149,"support":39.8809524},{"time_hours":137,"approval_perbill":746999077,"support_perbill":398065477,"approval":74.6999077,"support":39.8065477},{"time_hours":138,"approval_perbill":745856354,"support_perbill":397321429,"approval":74.5856354,"support":39.7321429},{"time_hours":139,"approval_perbill":744719927,"support_perbill":396577381,"approval":74.4719927,"support":39.6577381},{"time_hours":140,"approval_perbill":743589744,"support_perbill":395833334,"approval":74.3589744,"support":39.5833334},{"time_hours":141,"approval_perbill":742465754,"support_perbill":395089286,"approval":74.2465754,"support":39.5089286},{"time_hours":142,"approval_perbill":741347906,"support_perbill":394345239,"approval":74.1347906,"support":39.4345239},{"time_hours":143,"approval_perbill":740236149,"support_perbill":393601191,"approval":74.0236149,"support":39.3601191},{"time_hours":144,"approval_perbill":739130435,"support_perbill":392857143,"approval":73.9130435,"support":39.2857143},{"time_hours":145,"approval_perbill":738030714,"support_perbill":392113096,"approval":73.8030714,"support":39.2113096},{"time_hours":146,"approval_perbill":736936938,"support_perbill":391369048,"approval":73.6936938,"support":39.1369048},{"time_hours":147,"approval_perbill":735849057,"support_perbill":390625000,"approval":73.5849057,"support":39.0625},{"time_hours":148,"approval_perbill":734767025,"support_perbill":389880953,"approval":73.4767025,"support":38.9880953},{"time_hours":149,"approval_perbill":733690796,"support_perbill":389136905,"approval":73.3690796,"support":38.9136905},{"time_hours":150,"approval_perbill":732620322,"support_perbill":388392858,"approval":73.2620322,"support":38.8392858},{"time_hours":151,"approval_perbill":731555556,"support_perbill":387648810,"approval":73.1555556,"support":38.764881},{"time_hours":152,"approval_perbill":730496454,"support_perbill":386904762,"approval":73.0496454,"support":38.6904762},{"time_hours":153,"approval_perbill":729442971,"support_perbill":386160715,"approval":72.9442971,"support":38.6160715},{"time_hours":154,"approval_perbill":728395062,"support_perbill":385416667,"approval":72.8395062,"support":38.5416667},{"time_hours":155,"approval_perbill":727352683,"support_perbill":384672620,"approval":72.7352683,"support":38.467262},{"time_hours":156,"approval_perbill":726315790,"support_perbill":383928572,"approval":72.631579,"support":38.3928572},{"time_hours":157,"approval_perbill":725284340,"support_perbill":383184524,"approval":72.528434,"support":38.3184524},{"time_hours":158,"approval_perbill":724258290,"support_perbill":382440477,"approval":72.425829,"support":38.2440477},{"time_hours":159,"approval_perbill":723237599,"support_perbill":381696429,"approval":72.3237599,"support":38.1696429},{"time_hours":160,"approval_perbill":722222222,"support_perbill":380952381,"approval":72.2222222,"support":38.0952381},{"time_hours":161,"approval_perbill":721212122,"support_perbill":380208334,"approval":72.1212122,"support":38.0208334},{"time_hours":162,"approval_perbill":720207254,"support_perbill":379464286,"approval":72.0207254,"support":37.9464286},{"time_hours":163,"approval_perbill":719207580,"support_perbill":378720239,"approval":71.920758,"support":37.8720239},{"time_hours":164,"approval_perbill":718213059,"support_perbill":377976191,"approval":71.8213059,"support":37.7976191},{"time_hours":165,"approval_perbill":717223651,"support_perbill":377232143,"approval":71.7223651,"support":37.7232143},{"time_hours":166,"approval_perbill":716239317,"support_perbill":376488096,"approval":71.6239317,"support":37.6488096},{"time_hours":167,"approval_perbill":715260018,"support_perbill":375744048,"approval":71.5260018,"support":37.5744048},{"time_hours":168,"approval_perbill":714285714,"support_perbill":375000000,"approval":71.4285714,"support":37.5},{"time_hours":169,"approval_perbill":713316370,"support_perbill":374255953,"approval":71.331637,"support":37.4255953},{"time_hours":170,"approval_perbill":712351946,"support_perbill":373511905,"approval":71.2351946,"support":37.3511905},{"time_hours":171,"approval_perbill":711392406,"support_perbill":372767858,"approval":71.1392406,"support":37.2767858},{"time_hours":172,"approval_perbill":710437711,"support_perbill":372023810,"approval":71.0437711,"support":37.202381},{"time_hours":173,"approval_perbill":709487826,"support_perbill":371279762,"approval":70.9487826,"support":37.1279762},{"time_hours":174,"approval_perbill":708542714,"support_perbill":370535715,"approval":70.8542714,"support":37.0535715},{"time_hours":175,"approval_perbill":707602340,"support_perbill":369791667,"approval":70.760234,"support":36.9791667},{"time_hours":176,"approval_perbill":706666667,"support_perbill":369047620,"approval":70.6666667,"support":36.904762},{"time_hours":177,"approval_perbill":705735661,"support_perbill":368303572,"approval":70.5735661,"support":36.8303572},{"time_hours":178,"approval_perbill":704809287,"support_perbill":367559524,"approval":70.4809287,"support":36.7559524},{"time_hours":179,"approval_perbill":703887511,"support_perbill":366815477,"approval":70.3887511,"support":36.6815477},{"time_hours":180,"approval_perbill":702970298,"support_perbill":366071429,"approval":70.2970298,"support":36.6071429},{"time_hours":181,"approval_perbill":702057613,"support_perbill":365327381,"approval":70.2057613,"support":36.5327381},{"time_hours":182,"approval_perbill":701149426,"support_perbill":364583334,"approval":70.1149426,"support":36.4583334},{"time_hours":183,"approval_perbill":700245701,"support_perbill":363839286,"approval":70.0245701,"support":36.3839286},{"time_hours":184,"approval_perbill":699346406,"support_perbill":363095239,"approval":69.9346406,"support":36.3095239},{"time_hours":185,"approval_perbill":698451508,"support_perbill":362351191,"approval":69.8451508,"support":36.2351191},{"time_hours":186,"approval_perbill":697560976,"support_perbill":361607143,"approval":69.7560976,"support":36.1607143},{"time_hours":187,"approval_perbill":696674777,"support_perbill":360863096,"approval":69.6674777,"support":36.0863096},{"time_hours":188,"approval_perbill":695792881,"support_perbill":360119048,"approval":69.5792881,"support":36.0119048},{"time_hours":189,"approval_perbill":694915254,"support_perbill":359375000,"approval":69.4915254,"support":35.9375},{"time_hours":190,"approval_perbill":694041868,"support_perbill":358630953,"approval":69.4041868,"support":35.8630953},{"time_hours":191,"approval_perbill":693172691,"support_perbill":357886905,"approval":69.3172691,"support":35.7886905},{"time_hours":192,"approval_perbill":692307693,"support_perbill":357142858,"approval":69.2307693,"support":35.7142858},{"time_hours":193,"approval_perbill":691446843,"support_perbill":356398810,"approval":69.1446843,"support":35.639881},{"time_hours":194,"approval_perbill":690590112,"support_perbill":355654762,"approval":69.0590112,"support":35.5654762},{"time_hours":195,"approval_perbill":689737470,"support_perbill":354910715,"approval":68.973747,"support":35.4910715},{"time_hours":196,"approval_perbill":688888889,"support_perbill":354166667,"approval":68.8888889,"support":35.4166667},{"time_hours":197,"approval_perbill":688044339,"support_perbill":353422620,"approval":68.8044339,"support":35.342262},{"time_hours":198,"approval_perbill":687203792,"support_perbill":352678572,"approval":68.7203792,"support":35.2678572},{"time_hours":199,"approval_perbill":686367219,"support_perbill":351934524,"approval":68.6367219,"support":35.1934524},{"time_hours":200,"approval_perbill":685534592,"support_perbill":351190477,"approval":68.5534592,"support":35.1190477},{"time_hours":201,"approval_perbill":684705883,"support_perbill":350446429,"approval":68.4705883,"support":35.0446429},{"time_hours":202,"approval_perbill":683881064,"support_perbill":349702381,"approval":68.3881064,"support":34.9702381},{"time_hours":203,"approval_perbill":683060110,"support_perbill":348958334,"approval":68.306011,"support":34.8958334},{"time_hours":204,"approval_perbill":682242991,"support_perbill":348214286,"approval":68.2242991,"support":34.8214286},{"time_hours":205,"approval_perbill":681429682,"support_perbill":347470239,"approval":68.1429682,"support":34.7470239},{"time_hours":206,"approval_perbill":680620155,"support_perbill":346726191,"approval":68.0620155,"support":34.6726191},{"time_hours":207,"approval_perbill":679814385,"support_perbill":345982143,"approval":67.9814385,"support":34.5982143},{"time_hours":208,"approval_perbill":679012346,"support_perbill":345238096,"approval":67.9012346,"support":34.5238096},{"time_hours":209,"approval_perbill":678214011,"support_perbill":344494048,"approval":67.8214011,"support":34.4494048},{"time_hours":210,"approval_perbill":677419355,"support_perbill":343750000,"approval":67.7419355,"support":34.375},{"time_hours":211,"approval_perbill":676628353,"support_perbill":343005953,"approval":67.6628353,"support":34.3005953},{"time_hours":212,"approval_perbill":675840979,"support_perbill":342261905,"approval":67.5840979,"support":34.2261905},{"time_hours":213,"approval_perbill":675057209,"support_perbill":341517858,"approval":67.5057209,"support":34.1517858},{"time_hours":214,"approval_perbill":674277017,"support_perbill":340773810,"approval":67.4277017,"support":34.077381},{"time_hours":215,"approval_perbill":673500380,"support_perbill":340029762,"approval":67.350038,"support":34.0029762},{"time_hours":216,"approval_perbill":672727273,"support_perbill":339285715,"approval":67.2727273,"support":33.9285715},{"time_hours":217,"approval_perbill":671957672,"support_perbill":338541667,"approval":67.1957672,"support":33.8541667},{"time_hours":218,"approval_perbill":671191554,"support_perbill":337797620,"approval":67.1191554,"support":33.779762},{"time_hours":219,"approval_perbill":670428894,"support_perbill":337053572,"approval":67.0428894,"support":33.7053572},{"time_hours":220,"approval_perbill":669669670,"support_perbill":336309524,"approval":66.966967,"support":33.6309524},{"time_hours":221,"approval_perbill":668913858,"support_perbill":335565477,"approval":66.8913858,"support":33.5565477},{"time_hours":222,"approval_perbill":668161435,"support_perbill":334821429,"approval":66.8161435,"support":33.4821429},{"time_hours":223,"approval_perbill":667412379,"support_perbill":334077381,"approval":66.7412379,"support":33.4077381},{"time_hours":224,"approval_perbill":666666667,"support_perbill":333333334,"approval":66.6666667,"support":33.3333334},{"time_hours":225,"approval_perbill":665924276,"support_perbill":332589286,"approval":66.5924276,"support":33.2589286},{"time_hours":226,"approval_perbill":665185186,"support_perbill":331845239,"approval":66.5185186,"support":33.1845239},{"time_hours":227,"approval_perbill":664449372,"support_perbill":331101191,"approval":66.4449372,"support":33.1101191},{"time_hours":228,"approval_perbill":663716814,"support_perbill":330357143,"approval":66.3716814,"support":33.0357143},{"time_hours":229,"approval_perbill":662987491,"support_perbill":329613096,"approval":66.2987491,"support":32.9613096},{"time_hours":230,"approval_perbill":662261381,"support_perbill":328869048,"approval":66.2261381,"support":32.8869048},{"time_hours":231,"approval_perbill":661538462,"support_perbill":328125000,"approval":66.1538462,"support":32.8125},{"time_hours":232,"approval_perbill":660818714,"support_perbill":327380953,"approval":66.0818714,"support":32.7380953},{"time_hours":233,"approval_perbill":660102115,"support_perbill":326636905,"approval":66.0102115,"support":32.6636905},{"time_hours":234,"approval_perbill":659388647,"support_perbill":325892858,"approval":65.9388647,"support":32.5892858},{"time_hours":235,"approval_perbill":658678287,"support_perbill":325148810,"approval":65.8678287,"support":32.514881},{"time_hours":236,"approval_perbill":657971015,"support_perbill":324404762,"approval":65.7971015,"support":32.4404762},{"time_hours":237,"approval_perbill":657266811,"support_perbill":323660715,"approval":65.7266811,"support":32.3660715},{"time_hours":238,"approval_perbill":656565657,"support_perbill":322916667,"approval":65.6565657,"support":32.2916667},{"time_hours":239,"approval_perbill":655867531,"support_perbill":322172620,"approval":65.5867531,"support":32.217262},{"time_hours":240,"approval_perbill":655172414,"support_perbill":321428572,"approval":65.5172414,"support":32.1428572},{"time_hours":241,"approval_perbill":654480287,"support_perbill":320684524,"approval":65.4480287,"support":32.0684524},{"time_hours":242,"approval_perbill":653791130,"support_perbill":319940477,"approval":65.379113,"support":31.9940477},{"time_hours":243,"approval_perbill":653104925,"support_perbill":319196429,"approval":65.3104925,"support":31.9196429},{"time_hours":244,"approval_perbill":652421652,"support_perbill":318452381,"approval":65.2421652,"support":31.8452381},{"time_hours":245,"approval_perbill":651741294,"support_perbill":317708334,"approval":65.1741294,"support":31.7708334},{"time_hours":246,"approval_perbill":651063830,"support_perbill":316964286,"approval":65.106383,"support":31.6964286},{"time_hours":247,"approval_perbill":650389243,"support_perbill":316220239,"approval":65.0389243,"support":31.6220239},{"time_hours":248,"approval_perbill":649717514,"support_perbill":315476191,"approval":64.9717514,"support":31.5476191},{"time_hours":249,"approval_perbill":649048626,"support_perbill":314732143,"approval":64.9048626,"support":31.4732143},{"time_hours":250,"approval_perbill":648382560,"support_perbill":313988096,"approval":64.838256,"support":31.3988096},{"time_hours":251,"approval_perbill":647719299,"support_perbill":313244048,"approval":64.7719299,"support":31.3244048},{"time_hours":252,"approval_perbill":647058823,"support_perbill":312500000,"approval":64.7058823,"support":31.25},{"time_hours":253,"approval_perbill":646401118,"support_perbill":311755953,"approval":64.6401118,"support":31.1755953},{"time_hours":254,"approval_perbill":645746165,"support_perbill":311011905,"approval":64.5746165,"support":31.1011905},{"time_hours":255,"approval_perbill":645093946,"support_perbill":310267858,"approval":64.5093946,"support":31.0267858},{"time_hours":256,"approval_perbill":644444445,"support_perbill":309523810,"approval":64.4444445,"support":30.952381},{"time_hours":257,"approval_perbill":643797644,"support_perbill":308779762,"approval":64.3797644,"support":30.8779762},{"time_hours":258,"approval_perbill":643153527,"support_perbill":308035715,"approval":64.3153527,"support":30.8035715},{"time_hours":259,"approval_perbill":642512078,"support_perbill":307291667,"approval":64.2512078,"support":30.7291667},{"time_hours":260,"approval_perbill":641873279,"support_perbill":306547620,"approval":64.1873279,"support":30.654762},{"time_hours":261,"approval_perbill":641237113,"support_perbill":305803572,"approval":64.1237113,"support":30.5803572},{"time_hours":262,"approval_perbill":640603567,"support_perbill":305059524,"approval":64.0603567,"support":30.5059524},{"time_hours":263,"approval_perbill":639972622,"support_perbill":304315477,"approval":63.9972622,"support":30.4315477},{"time_hours":264,"approval_perbill":639344263,"support_perbill":303571429,"approval":63.9344263,"support":30.3571429},{"time_hours":265,"approval_perbill":638718473,"support_perbill":302827381,"approval":63.8718473,"support":30.2827381},{"time_hours":266,"approval_perbill":638095238,"support_perbill":302083334,"approval":63.8095238,"support":30.2083334},{"time_hours":267,"approval_perbill":637474542,"support_perbill":301339286,"approval":63.7474542,"support":30.1339286},{"time_hours":268,"approval_perbill":636856369,"support_perbill":300595239,"approval":63.6856369,"support":30.0595239},{"time_hours":269,"approval_perbill":636240703,"support_perbill":299851191,"approval":63.6240703,"support":29.9851191},{"time_hours":270,"approval_perbill":635627530,"support_perbill":299107143,"approval":63.562753,"support":29.9107143},{"time_hours":271,"approval_perbill":635016835,"support_perbill":298363096,"approval":63.5016835,"support":29.8363096},{"time_hours":272,"approval_perbill":634408602,"support_perbill":297619048,"approval":63.4408602,"support":29.7619048},{"time_hours":273,"approval_perbill":633802817,"support_perbill":296875000,"approval":63.3802817,"support":29.6875},{"time_hours":274,"approval_perbill":633199465,"support_perbill":296130953,"approval":63.3199465,"support":29.6130953},{"time_hours":275,"approval_perbill":632598530,"support_perbill":295386905,"approval":63.259853,"support":29.5386905},{"time_hours":276,"approval_perbill":632000000,"support_perbill":294642858,"approval":63.2,"support":29.4642858},{"time_hours":277,"approval_perbill":631403859,"support_perbill":293898810,"approval":63.1403859,"support":29.389881},{"time_hours":278,"approval_perbill":630810093,"support_perbill":293154762,"approval":63.0810093,"support":29.3154762},{"time_hours":279,"approval_perbill":630218688,"support_perbill":292410715,"approval":63.0218688,"support":29.2410715},{"time_hours":280,"approval_perbill":629629630,"support_perbill":291666667,"approval":62.962963,"support":29.1666667},{"time_hours":281,"approval_perbill":629042905,"support_perbill":290922620,"approval":62.9042905,"support":29.092262},{"time_hours":282,"approval_perbill":628458498,"support_perbill":290178572,"approval":62.8458498,"support":29.0178572},{"time_hours":283,"approval_perbill":627876397,"support_perbill":289434524,"approval":62.7876397,"support":28.9434524},{"time_hours":284,"approval_perbill":627296588,"support_perbill":288690477,"approval":62.7296588,"support":28.8690477},{"time_hours":285,"approval_perbill":626719057,"support_perbill":287946429,"approval":62.6719057,"support":28.7946429},{"time_hours":286,"approval_perbill":626143791,"support_perbill":287202381,"approval":62.6143791,"support":28.7202381},{"time_hours":287,"approval_perbill":625570776,"support_perbill":286458334,"approval":62.5570776,"support":28.6458334},{"time_hours":288,"approval_perbill":625000000,"support_perbill":285714286,"approval":62.5,"support":28.5714286},{"time_hours":289,"approval_perbill":624431449,"support_perbill":284970239,"approval":62.4431449,"support":28.4970239},{"time_hours":290,"approval_perbill":623865110,"support_perbill":284226191,"approval":62.386511,"support":28.4226191},{"time_hours":291,"approval_perbill":623300971,"support_perbill":283482143,"approval":62.3300971,"support":28.3482143},{"time_hours":292,"approval_perbill":622739018,"support_perbill":282738096,"approval":62.2739018,"support":28.2738096},{"time_hours":293,"approval_perbill":622179239,"support_perbill":281994048,"approval":62.2179239,"support":28.1994048},{"time_hours":294,"approval_perbill":621621621,"support_perbill":281250000,"approval":62.1621621,"support":28.125},{"time_hours":295,"approval_perbill":621066153,"support_perbill":280505953,"approval":62.1066153,"support":28.0505953},{"time_hours":296,"approval_perbill":620512821,"support_perbill":279761905,"approval":62.0512821,"support":27.9761905},{"time_hours":297,"approval_perbill":619961612,"support_perbill":279017858,"approval":61.9961612,"support":27.9017858},{"time_hours":298,"approval_perbill":619412516,"support_perbill":278273810,"approval":61.9412516,"support":27.827381},{"time_hours":299,"approval_perbill":618865519,"support_perbill":277529762,"approval":61.8865519,"support":27.7529762},{"time_hours":300,"approval_perbill":618320611,"support_perbill":276785715,"approval":61.8320611,"support":27.6785715},{"time_hours":301,"approval_perbill":617777778,"support_perbill":276041667,"approval":61.7777778,"support":27.6041667},{"time_hours":302,"approval_perbill":617237009,"support_perbill":275297620,"approval":61.7237009,"support":27.529762},{"time_hours":303,"approval_perbill":616698292,"support_perbill":274553572,"approval":61.6698292,"support":27.4553572},{"time_hours":304,"approval_perbill":616161616,"support_perbill":273809524,"approval":61.6161616,"support":27.3809524},{"time_hours":305,"approval_perbill":615626969,"support_perbill":273065477,"approval":61.5626969,"support":27.3065477},{"time_hours":306,"approval_perbill":615094340,"support_perbill":272321429,"approval":61.509434,"support":27.2321429},{"time_hours":307,"approval_perbill":614563716,"support_perbill":271577381,"approval":61.4563716,"support":27.1577381},{"time_hours":308,"approval_perbill":614035088,"support_perbill":270833334,"approval":61.4035088,"support":27.0833334},{"time_hours":309,"approval_perbill":613508443,"support_perbill":270089286,"approval":61.3508443,"support":27.0089286},{"time_hours":310,"approval_perbill":612983770,"support_perbill":269345239,"approval":61.298377,"support":26.9345239},{"time_hours":311,"approval_perbill":612461059,"support_perbill":268601191,"approval":61.2461059,"support":26.8601191},{"time_hours":312,"approval_perbill":611940298,"support_perbill":267857143,"approval":61.1940298,"support":26.7857143},{"time_hours":313,"approval_perbill":611421477,"support_perbill":267113096,"approval":61.1421477,"support":26.7113096},{"time_hours":314,"approval_perbill":610904585,"support_perbill":266369048,"approval":61.0904585,"support":26.6369048},{"time_hours":315,"approval_perbill":610389610,"support_perbill":265625000,"approval":61.038961,"support":26.5625},{"time_hours":316,"approval_perbill":609876543,"support_perbill":264880953,"approval":60.9876543,"support":26.4880953},{"time_hours":317,"approval_perbill":609365373,"support_perbill":264136905,"approval":60.9365373,"support":26.4136905},{"time_hours":318,"approval_perbill":608856089,"support_perbill":263392858,"approval":60.8856089,"support":26.3392858},{"time_hours":319,"approval_perbill":608348680,"support_perbill":262648810,"approval":60.834868,"support":26.264881},{"time_hours":320,"approval_perbill":607843137,"support_perbill":261904762,"approval":60.7843137,"support":26.1904762},{"time_hours":321,"approval_perbill":607339449,"support_perbill":261160715,"approval":60.7339449,"support":26.1160715},{"time_hours":322,"approval_perbill":606837607,"support_perbill":260416667,"approval":60.6837607,"support":26.0416667},{"time_hours":323,"approval_perbill":606337599,"support_perbill":259672620,"approval":60.6337599,"support":25.967262},{"time_hours":324,"approval_perbill":605839416,"support_perbill":258928572,"approval":60.5839416,"support":25.8928572},{"time_hours":325,"approval_perbill":605343048,"support_perbill":258184524,"approval":60.5343048,"support":25.8184524},{"time_hours":326,"approval_perbill":604848485,"support_perbill":257440477,"approval":60.4848485,"support":25.7440477},{"time_hours":327,"approval_perbill":604355717,"support_perbill":256696429,"approval":60.4355717,"support":25.6696429},{"time_hours":328,"approval_perbill":603864734,"support_perbill":255952381,"approval":60.3864734,"support":25.5952381},{"time_hours":329,"approval_perbill":603375527,"support_perbill":255208334,"approval":60.3375527,"support":25.5208334},{"time_hours":330,"approval_perbill":602888087,"support_perbill":254464286,"approval":60.2888087,"support":25.4464286},{"time_hours":331,"approval_perbill":602402402,"support_perbill":253720239,"approval":60.2402402,"support":25.3720239},{"time_hours":332,"approval_perbill":601918465,"support_perbill":252976191,"approval":60.1918465,"support":25.2976191},{"time_hours":333,"approval_perbill":601436266,"support_perbill":252232143,"approval":60.1436266,"support":25.2232143},{"time_hours":334,"approval_perbill":600955794,"support_perbill":251488096,"approval":60.0955794,"support":25.1488096},{"time_hours":335,"approval_perbill":600477042,"support_perbill":250744048,"approval":60.0477042,"support":25.0744048},{"time_hours":336,"approval_perbill":600000000,"support_perbill":250000000,"approval":60,"support":25},{"time_hours":337,"approval_perbill":599524658,"support_perbill":249255953,"approval":59.9524658,"support":24.9255953},{"time_hours":338,"approval_perbill":599051008,"support_perbill":248511905,"approval":59.9051008,"support":24.8511905},{"time_hours":339,"approval_perbill":598579041,"support_perbill":247767858,"approval":59.8579041,"support":24.7767858},{"time_hours":340,"approval_perbill":598108747,"support_perbill":247023810,"approval":59.8108747,"support":24.702381},{"time_hours":341,"approval_perbill":597640118,"support_perbill":246279762,"approval":59.7640118,"support":24.6279762},{"time_hours":342,"approval_perbill":597173145,"support_perbill":245535715,"approval":59.7173145,"support":24.5535715},{"time_hours":343,"approval_perbill":596707819,"support_perbill":244791667,"approval":59.6707819,"support":24.4791667},{"time_hours":344,"approval_perbill":596244131,"support_perbill":244047620,"approval":59.6244131,"support":24.404762},{"time_hours":345,"approval_perbill":595782074,"support_perbill":243303572,"approval":59.5782074,"support":24.3303572},{"time_hours":346,"approval_perbill":595321637,"support_perbill":242559524,"approval":59.5321637,"support":24.2559524},{"time_hours":347,"approval_perbill":594862814,"support_perbill":241815477,"approval":59.4862814,"support":24.1815477},{"time_hours":348,"approval_perbill":594405594,"support_perbill":241071429,"approval":59.4405594,"support":24.1071429},{"time_hours":349,"approval_perbill":593949971,"support_perbill":240327381,"approval":59.3949971,"support":24.0327381},{"time_hours":350,"approval_perbill":593495935,"support_perbill":239583334,"approval":59.3495935,"support":23.9583334},{"time_hours":351,"approval_perbill":593043478,"support_perbill":238839286,"approval":59.3043478,"support":23.8839286},{"time_hours":352,"approval_perbill":592592593,"support_perbill":238095239,"approval":59.2592593,"support":23.8095239},{"time_hours":353,"approval_perbill":592143270,"support_perbill":237351191,"approval":59.214327,"support":23.7351191},{"time_hours":354,"approval_perbill":591695502,"support_perbill":236607143,"approval":59.1695502,"support":23.6607143},{"time_hours":355,"approval_perbill":591249280,"support_perbill":235863096,"approval":59.124928,"support":23.5863096},{"time_hours":356,"approval_perbill":590804598,"support_perbill":235119048,"approval":59.0804598,"support":23.5119048},{"time_hours":357,"approval_perbill":590361446,"support_perbill":234375000,"approval":59.0361446,"support":23.4375},{"time_hours":358,"approval_perbill":589919817,"support_perbill":233630953,"approval":58.9919817,"support":23.3630953},{"time_hours":359,"approval_perbill":589479703,"support_perbill":232886905,"approval":58.9479703,"support":23.2886905},{"time_hours":360,"approval_perbill":589041096,"support_perbill":232142858,"approval":58.9041096,"support":23.2142858},{"time_hours":361,"approval_perbill":588603989,"support_perbill":231398810,"approval":58.8603989,"support":23.139881},{"time_hours":362,"approval_perbill":588168373,"support_perbill":230654762,"approval":58.8168373,"support":23.0654762},{"time_hours":363,"approval_perbill":587734242,"support_perbill":229910715,"approval":58.7734242,"support":22.9910715},{"time_hours":364,"approval_perbill":587301587,"support_perbill":229166667,"approval":58.7301587,"support":22.9166667},{"time_hours":365,"approval_perbill":586870402,"support_perbill":228422620,"approval":58.6870402,"support":22.842262},{"time_hours":366,"approval_perbill":586440678,"support_perbill":227678572,"approval":58.6440678,"support":22.7678572},{"time_hours":367,"approval_perbill":586012408,"support_perbill":226934524,"approval":58.6012408,"support":22.6934524},{"time_hours":368,"approval_perbill":585585585,"support_perbill":226190477,"approval":58.5585585,"support":22.6190477},{"time_hours":369,"approval_perbill":585160202,"support_perbill":225446429,"approval":58.5160202,"support":22.5446429},{"time_hours":370,"approval_perbill":584736251,"support_perbill":224702381,"approval":58.4736251,"support":22.4702381},{"time_hours":371,"approval_perbill":584313725,"support_perbill":223958334,"approval":58.4313725,"support":22.3958334},{"time_hours":372,"approval_perbill":583892617,"support_perbill":223214286,"approval":58.3892617,"support":22.3214286},{"time_hours":373,"approval_perbill":583472920,"support_perbill":222470239,"approval":58.347292,"support":22.2470239},{"time_hours":374,"approval_perbill":583054626,"support_perbill":221726191,"approval":58.3054626,"support":22.1726191},{"time_hours":375,"approval_perbill":582637729,"support_perbill":220982143,"approval":58.2637729,"support":22.0982143},{"time_hours":376,"approval_perbill":582222222,"support_perbill":220238096,"approval":58.2222222,"support":22.0238096},{"time_hours":377,"approval_perbill":581808098,"support_perbill":219494048,"approval":58.1808098,"support":21.9494048},{"time_hours":378,"approval_perbill":581395349,"support_perbill":218750000,"approval":58.1395349,"support":21.875},{"time_hours":379,"approval_perbill":580983969,"support_perbill":218005953,"approval":58.0983969,"support":21.8005953},{"time_hours":380,"approval_perbill":580573951,"support_perbill":217261905,"approval":58.0573951,"support":21.7261905},{"time_hours":381,"approval_perbill":580165289,"support_perbill":216517858,"approval":58.0165289,"support":21.6517858},{"time_hours":382,"approval_perbill":579757976,"support_perbill":215773810,"approval":57.9757976,"support":21.577381},{"time_hours":383,"approval_perbill":579352004,"support_perbill":215029762,"approval":57.9352004,"support":21.5029762},{"time_hours":384,"approval_perbill":578947368,"support_perbill":214285715,"approval":57.8947368,"support":21.4285715},{"time_hours":385,"approval_perbill":578544061,"support_perbill":213541667,"approval":57.8544061,"support":21.3541667},{"time_hours":386,"approval_perbill":578142076,"support_perbill":212797620,"approval":57.8142076,"support":21.279762},{"time_hours":387,"approval_perbill":577741407,"support_perbill":212053572,"approval":57.7741407,"support":21.2053572},{"time_hours":388,"approval_perbill":577342048,"support_perbill":211309524,"approval":57.7342048,"support":21.1309524},{"time_hours":389,"approval_perbill":576943991,"support_perbill":210565477,"approval":57.6943991,"support":21.0565477},{"time_hours":390,"approval_perbill":576547231,"support_perbill":209821429,"approval":57.6547231,"support":20.9821429},{"time_hours":391,"approval_perbill":576151761,"support_perbill":209077381,"approval":57.6151761,"support":20.9077381},{"time_hours":392,"approval_perbill":575757576,"support_perbill":208333334,"approval":57.5757576,"support":20.8333334},{"time_hours":393,"approval_perbill":575364668,"support_perbill":207589286,"approval":57.5364668,"support":20.7589286},{"time_hours":394,"approval_perbill":574973031,"support_perbill":206845239,"approval":57.4973031,"support":20.6845239},{"time_hours":395,"approval_perbill":574582660,"support_perbill":206101191,"approval":57.458266,"support":20.6101191},{"time_hours":396,"approval_perbill":574193548,"support_perbill":205357143,"approval":57.4193548,"support":20.5357143},{"time_hours":397,"approval_perbill":573805690,"support_perbill":204613096,"approval":57.380569,"support":20.4613096},{"time_hours":398,"approval_perbill":573419078,"support_perbill":203869048,"approval":57.3419078,"support":20.3869048},{"time_hours":399,"approval_perbill":573033708,"support_perbill":203125000,"approval":57.3033708,"support":20.3125},{"time_hours":400,"approval_perbill":572649572,"support_perbill":202380953,"approval":57.2649572,"support":20.2380953},{"time_hours":401,"approval_perbill":572266666,"support_perbill":201636905,"approval":57.2266666,"support":20.1636905},{"time_hours":402,"approval_perbill":571884984,"support_perbill":200892858,"approval":57.1884984,"support":20.0892858},{"time_hours":403,"approval_perbill":571504519,"support_perbill":200148810,"approval":57.1504519,"support":20.014881},{"time_hours":404,"approval_perbill":571125265,"support_perbill":199404762,"approval":57.1125265,"support":19.9404762},{"time_hours":405,"approval_perbill":570747218,"support_perbill":198660715,"approval":57.0747218,"support":19.8660715},{"time_hours":406,"approval_perbill":570370370,"support_perbill":197916667,"approval":57.037037,"support":19.7916667},{"time_hours":407,"approval_perbill":569994717,"support_perbill":197172620,"approval":56.9994717,"support":19.717262},{"time_hours":408,"approval_perbill":569620253,"support_perbill":196428572,"approval":56.9620253,"support":19.6428572},{"time_hours":409,"approval_perbill":569246972,"support_perbill":195684524,"approval":56.9246972,"support":19.5684524},{"time_hours":410,"approval_perbill":568874868,"support_perbill":194940477,"approval":56.8874868,"support":19.4940477},{"time_hours":411,"approval_perbill":568503937,"support_perbill":194196429,"approval":56.8503937,"support":19.4196429},{"time_hours":412,"approval_perbill":568134172,"support_perbill":193452381,"approval":56.8134172,"support":19.3452381},{"time_hours":413,"approval_perbill":567765567,"support_perbill":192708334,"approval":56.7765567,"support":19.2708334},{"time_hours":414,"approval_perbill":567398119,"support_perbill":191964286,"approval":56.7398119,"support":19.1964286},{"time_hours":415,"approval_perbill":567031820,"support_perbill":191220239,"approval":56.703182,"support":19.1220239},{"time_hours":416,"approval_perbill":566666666,"support_perbill":190476191,"approval":56.6666666,"support":19.0476191},{"time_hours":417,"approval_perbill":566302652,"support_perbill":189732143,"approval":56.6302652,"support":18.9732143},{"time_hours":418,"approval_perbill":565939771,"support_perbill":188988096,"approval":56.5939771,"support":18.8988096},{"time_hours":419,"approval_perbill":565578020,"support_perbill":188244048,"approval":56.557802,"support":18.8244048},{"time_hours":420,"approval_perbill":565217391,"support_perbill":187500000,"approval":56.5217391,"support":18.75},{"time_hours":421,"approval_perbill":564857881,"support_perbill":186755953,"approval":56.4857881,"support":18.6755953},{"time_hours":422,"approval_perbill":564499484,"support_perbill":186011905,"approval":56.4499484,"support":18.6011905},{"time_hours":423,"approval_perbill":564142195,"support_perbill":185267858,"approval":56.4142195,"support":18.5267858},{"time_hours":424,"approval_perbill":563786008,"support_perbill":184523810,"approval":56.3786008,"support":18.452381},{"time_hours":425,"approval_perbill":563430919,"support_perbill":183779762,"approval":56.3430919,"support":18.3779762},{"time_hours":426,"approval_perbill":563076923,"support_perbill":183035715,"approval":56.3076923,"support":18.3035715},{"time_hours":427,"approval_perbill":562724014,"support_perbill":182291667,"approval":56.2724014,"support":18.2291667},{"time_hours":428,"approval_perbill":562372188,"support_perbill":181547620,"approval":56.2372188,"support":18.154762},{"time_hours":429,"approval_perbill":562021439,"support_perbill":180803572,"approval":56.2021439,"support":18.0803572},{"time_hours":430,"approval_perbill":561671763,"support_perbill":180059524,"approval":56.1671763,"support":18.0059524},{"time_hours":431,"approval_perbill":561323155,"support_perbill":179315477,"approval":56.1323155,"support":17.9315477},{"time_hours":432,"approval_perbill":560975610,"support_perbill":178571429,"approval":56.097561,"support":17.8571429},{"time_hours":433,"approval_perbill":560629122,"support_perbill":177827381,"approval":56.0629122,"support":17.7827381},{"time_hours":434,"approval_perbill":560283688,"support_perbill":177083334,"approval":56.0283688,"support":17.7083334},{"time_hours":435,"approval_perbill":559939302,"support_perbill":176339286,"approval":55.9939302,"support":17.6339286},{"time_hours":436,"approval_perbill":559595959,"support_perbill":175595239,"approval":55.9595959,"support":17.5595239},{"time_hours":437,"approval_perbill":559253656,"support_perbill":174851191,"approval":55.9253656,"support":17.4851191},{"time_hours":438,"approval_perbill":558912386,"support_perbill":174107143,"approval":55.8912386,"support":17.4107143},{"time_hours":439,"approval_perbill":558572147,"support_perbill":173363096,"approval":55.8572147,"support":17.3363096},{"time_hours":440,"approval_perbill":558232931,"support_perbill":172619048,"approval":55.8232931,"support":17.2619048},{"time_hours":441,"approval_perbill":557894736,"support_perbill":171875000,"approval":55.7894736,"support":17.1875},{"time_hours":442,"approval_perbill":557557557,"support_perbill":171130953,"approval":55.7557557,"support":17.1130953},{"time_hours":443,"approval_perbill":557221389,"support_perbill":170386905,"approval":55.7221389,"support":17.0386905},{"time_hours":444,"approval_perbill":556886227,"support_perbill":169642858,"approval":55.6886227,"support":16.9642858},{"time_hours":445,"approval_perbill":556552068,"support_perbill":168898810,"approval":55.6552068,"support":16.889881},{"time_hours":446,"approval_perbill":556218905,"support_perbill":168154762,"approval":55.6218905,"support":16.8154762},{"time_hours":447,"approval_perbill":555886736,"support_perbill":167410715,"approval":55.5886736,"support":16.7410715},{"time_hours":448,"approval_perbill":555555555,"support_perbill":166666667,"approval":55.5555555,"support":16.6666667},{"time_hours":449,"approval_perbill":555225359,"support_perbill":165922620,"approval":55.5225359,"support":16.592262},{"time_hours":450,"approval_perbill":554896142,"support_perbill":165178572,"approval":55.4896142,"support":16.5178572},{"time_hours":451,"approval_perbill":554567901,"support_perbill":164434524,"approval":55.4567901,"support":16.4434524},{"time_hours":452,"approval_perbill":554240631,"support_perbill":163690477,"approval":55.4240631,"support":16.3690477},{"time_hours":453,"approval_perbill":553914328,"support_perbill":162946429,"approval":55.3914328,"support":16.2946429},{"time_hours":454,"approval_perbill":553588987,"support_perbill":162202381,"approval":55.3588987,"support":16.2202381},{"time_hours":455,"approval_perbill":553264604,"support_perbill":161458334,"approval":55.3264604,"support":16.1458334},{"time_hours":456,"approval_perbill":552941176,"support_perbill":160714286,"approval":55.2941176,"support":16.0714286},{"time_hours":457,"approval_perbill":552618698,"support_perbill":159970239,"approval":55.2618698,"support":15.9970239},{"time_hours":458,"approval_perbill":552297165,"support_perbill":159226191,"approval":55.2297165,"support":15.9226191},{"time_hours":459,"approval_perbill":551976574,"support_perbill":158482143,"approval":55.1976574,"support":15.8482143},{"time_hours":460,"approval_perbill":551656920,"support_perbill":157738096,"approval":55.165692,"support":15.7738096},{"time_hours":461,"approval_perbill":551338199,"support_perbill":156994048,"approval":55.1338199,"support":15.6994048},{"time_hours":462,"approval_perbill":551020408,"support_perbill":156250000,"approval":55.1020408,"support":15.625},{"time_hours":463,"approval_perbill":550703542,"support_perbill":155505953,"approval":55.0703542,"support":15.5505953},{"time_hours":464,"approval_perbill":550387597,"support_perbill":154761905,"approval":55.0387597,"support":15.4761905},{"time_hours":465,"approval_perbill":550072569,"support_perbill":154017858,"approval":55.0072569,"support":15.4017858},{"time_hours":466,"approval_perbill":549758454,"support_perbill":153273810,"approval":54.9758454,"support":15.327381},{"time_hours":467,"approval_perbill":549445248,"support_perbill":152529762,"approval":54.9445248,"support":15.2529762},{"time_hours":468,"approval_perbill":549132948,"support_perbill":151785715,"approval":54.9132948,"support":15.1785715},{"time_hours":469,"approval_perbill":548821549,"support_perbill":151041667,"approval":54.8821549,"support":15.1041667},{"time_hours":470,"approval_perbill":548511047,"support_perbill":150297620,"approval":54.8511047,"support":15.029762},{"time_hours":471,"approval_perbill":548201438,"support_perbill":149553572,"approval":54.8201438,"support":14.9553572},{"time_hours":472,"approval_perbill":547892720,"support_perbill":148809524,"approval":54.789272,"support":14.8809524},{"time_hours":473,"approval_perbill":547584887,"support_perbill":148065477,"approval":54.7584887,"support":14.8065477},{"time_hours":474,"approval_perbill":547277937,"support_perbill":147321429,"approval":54.7277937,"support":14.7321429},{"time_hours":475,"approval_perbill":546971864,"support_perbill":146577381,"approval":54.6971864,"support":14.6577381},{"time_hours":476,"approval_perbill":546666666,"support_perbill":145833334,"approval":54.6666666,"support":14.5833334},{"time_hours":477,"approval_perbill":546362339,"support_perbill":145089286,"approval":54.6362339,"support":14.5089286},{"time_hours":478,"approval_perbill":546058879,"support_perbill":144345239,"approval":54.6058879,"support":14.4345239},{"time_hours":479,"approval_perbill":545756282,"support_perbill":143601191,"approval":54.5756282,"support":14.3601191},{"time_hours":480,"approval_perbill":545454545,"support_perbill":142857143,"approval":54.5454545,"support":14.2857143},{"time_hours":481,"approval_perbill":545153664,"support_perbill":142113096,"approval":54.5153664,"support":14.2113096},{"time_hours":482,"approval_perbill":544853635,"support_perbill":141369048,"approval":54.4853635,"support":14.1369048},{"time_hours":483,"approval_perbill":544554455,"support_perbill":140625000,"approval":54.4554455,"support":14.0625},{"time_hours":484,"approval_perbill":544256120,"support_perbill":139880953,"approval":54.425612,"support":13.9880953},{"time_hours":485,"approval_perbill":543958627,"support_perbill":139136905,"approval":54.3958627,"support":13.9136905},{"time_hours":486,"approval_perbill":543661971,"support_perbill":138392858,"approval":54.3661971,"support":13.8392858},{"time_hours":487,"approval_perbill":543366151,"support_perbill":137648810,"approval":54.3366151,"support":13.764881},{"time_hours":488,"approval_perbill":543071161,"support_perbill":136904762,"approval":54.3071161,"support":13.6904762},{"time_hours":489,"approval_perbill":542776998,"support_perbill":136160715,"approval":54.2776998,"support":13.6160715},{"time_hours":490,"approval_perbill":542483660,"support_perbill":135416667,"approval":54.248366,"support":13.5416667},{"time_hours":491,"approval_perbill":542191142,"support_perbill":134672620,"approval":54.2191142,"support":13.467262},{"time_hours":492,"approval_perbill":541899441,"support_perbill":133928572,"approval":54.1899441,"support":13.3928572},{"time_hours":493,"approval_perbill":541608554,"support_perbill":133184524,"approval":54.1608554,"support":13.3184524},{"time_hours":494,"approval_perbill":541318477,"support_perbill":132440477,"approval":54.1318477,"support":13.2440477},{"time_hours":495,"approval_perbill":541029207,"support_perbill":131696429,"approval":54.1029207,"support":13.1696429},{"time_hours":496,"approval_perbill":540740740,"support_perbill":130952381,"approval":54.074074,"support":13.0952381},{"time_hours":497,"approval_perbill":540453074,"support_perbill":130208334,"approval":54.0453074,"support":13.0208334},{"time_hours":498,"approval_perbill":540166205,"support_perbill":129464286,"approval":54.0166205,"support":12.9464286},{"time_hours":499,"approval_perbill":539880129,"support_perbill":128720239,"approval":53.9880129,"support":12.8720239},{"time_hours":500,"approval_perbill":539594843,"support_perbill":127976191,"approval":53.9594843,"support":12.7976191},{"time_hours":501,"approval_perbill":539310344,"support_perbill":127232143,"approval":53.9310344,"support":12.7232143},{"time_hours":502,"approval_perbill":539026630,"support_perbill":126488096,"approval":53.902663,"support":12.6488096},{"time_hours":503,"approval_perbill":538743695,"support_perbill":125744048,"approval":53.8743695,"support":12.5744048},{"time_hours":504,"approval_perbill":538461538,"support_perbill":125000000,"approval":53.8461538,"support":12.5},{"time_hours":505,"approval_perbill":538180155,"support_perbill":124255953,"approval":53.8180155,"support":12.4255953},{"time_hours":506,"approval_perbill":537899543,"support_perbill":123511905,"approval":53.7899543,"support":12.3511905},{"time_hours":507,"approval_perbill":537619699,"support_perbill":122767858,"approval":53.7619699,"support":12.2767858},{"time_hours":508,"approval_perbill":537340619,"support_perbill":122023810,"approval":53.7340619,"support":12.202381},{"time_hours":509,"approval_perbill":537062301,"support_perbill":121279762,"approval":53.7062301,"support":12.1279762},{"time_hours":510,"approval_perbill":536784741,"support_perbill":120535715,"approval":53.6784741,"support":12.0535715},{"time_hours":511,"approval_perbill":536507936,"support_perbill":119791667,"approval":53.6507936,"support":11.9791667},{"time_hours":512,"approval_perbill":536231884,"support_perbill":119047620,"approval":53.6231884,"support":11.904762},{"time_hours":513,"approval_perbill":535956580,"support_perbill":118303572,"approval":53.595658,"support":11.8303572},{"time_hours":514,"approval_perbill":535682023,"support_perbill":117559524,"approval":53.5682023,"support":11.7559524},{"time_hours":515,"approval_perbill":535408209,"support_perbill":116815477,"approval":53.5408209,"support":11.6815477},{"time_hours":516,"approval_perbill":535135135,"support_perbill":116071429,"approval":53.5135135,"support":11.6071429},{"time_hours":517,"approval_perbill":534862798,"support_perbill":115327381,"approval":53.4862798,"support":11.5327381},{"time_hours":518,"approval_perbill":534591195,"support_perbill":114583334,"approval":53.4591195,"support":11.4583334},{"time_hours":519,"approval_perbill":534320323,"support_perbill":113839286,"approval":53.4320323,"support":11.3839286},{"time_hours":520,"approval_perbill":534050179,"support_perbill":113095239,"approval":53.4050179,"support":11.3095239},{"time_hours":521,"approval_perbill":533780760,"support_perbill":112351191,"approval":53.378076,"support":11.2351191},{"time_hours":522,"approval_perbill":533512064,"support_perbill":111607143,"approval":53.3512064,"support":11.1607143},{"time_hours":523,"approval_perbill":533244087,"support_perbill":110863096,"approval":53.3244087,"support":11.0863096},{"time_hours":524,"approval_perbill":532976827,"support_perbill":110119048,"approval":53.2976827,"support":11.0119048},{"time_hours":525,"approval_perbill":532710280,"support_perbill":109375000,"approval":53.271028,"support":10.9375},{"time_hours":526,"approval_perbill":532444444,"support_perbill":108630953,"approval":53.2444444,"support":10.8630953},{"time_hours":527,"approval_perbill":532179316,"support_perbill":107886905,"approval":53.2179316,"support":10.7886905},{"time_hours":528,"approval_perbill":531914893,"support_perbill":107142858,"approval":53.1914893,"support":10.7142858},{"time_hours":529,"approval_perbill":531651173,"support_perbill":106398810,"approval":53.1651173,"support":10.639881},{"time_hours":530,"approval_perbill":531388152,"support_perbill":105654762,"approval":53.1388152,"support":10.5654762},{"time_hours":531,"approval_perbill":531125827,"support_perbill":104910715,"approval":53.1125827,"support":10.4910715},{"time_hours":532,"approval_perbill":530864197,"support_perbill":104166667,"approval":53.0864197,"support":10.4166667},{"time_hours":533,"approval_perbill":530603258,"support_perbill":103422620,"approval":53.0603258,"support":10.342262},{"time_hours":534,"approval_perbill":530343007,"support_perbill":102678572,"approval":53.0343007,"support":10.2678572},{"time_hours":535,"approval_perbill":530083443,"support_perbill":101934524,"approval":53.0083443,"support":10.1934524},{"time_hours":536,"approval_perbill":529824561,"support_perbill":101190477,"approval":52.9824561,"support":10.1190477},{"time_hours":537,"approval_perbill":529566360,"support_perbill":100446429,"approval":52.956636,"support":10.0446429},{"time_hours":538,"approval_perbill":529308836,"support_perbill":99702381,"approval":52.9308836,"support":9.9702381},{"time_hours":539,"approval_perbill":529051987,"support_perbill":98958334,"approval":52.9051987,"support":9.8958334},{"time_hours":540,"approval_perbill":528795811,"support_perbill":98214286,"approval":52.8795811,"support":9.8214286},{"time_hours":541,"approval_perbill":528540305,"support_perbill":97470239,"approval":52.8540305,"support":9.7470239},{"time_hours":542,"approval_perbill":528285465,"support_perbill":96726191,"approval":52.8285465,"support":9.6726191},{"time_hours":543,"approval_perbill":528031290,"support_perbill":95982143,"approval":52.803129,"support":9.5982143},{"time_hours":544,"approval_perbill":527777777,"support_perbill":95238096,"approval":52.7777777,"support":9.5238096},{"time_hours":545,"approval_perbill":527524924,"support_perbill":94494048,"approval":52.7524924,"support":9.4494048},{"time_hours":546,"approval_perbill":527272727,"support_perbill":93750000,"approval":52.7272727,"support":9.375},{"time_hours":547,"approval_perbill":527021184,"support_perbill":93005953,"approval":52.7021184,"support":9.3005953},{"time_hours":548,"approval_perbill":526770293,"support_perbill":92261905,"approval":52.6770293,"support":9.2261905},{"time_hours":549,"approval_perbill":526520051,"support_perbill":91517858,"approval":52.6520051,"support":9.1517858},{"time_hours":550,"approval_perbill":526270456,"support_perbill":90773810,"approval":52.6270456,"support":9.077381},{"time_hours":551,"approval_perbill":526021505,"support_perbill":90029762,"approval":52.6021505,"support":9.0029762},{"time_hours":552,"approval_perbill":525773195,"support_perbill":89285715,"approval":52.5773195,"support":8.9285715},{"time_hours":553,"approval_perbill":525525525,"support_perbill":88541667,"approval":52.5525525,"support":8.8541667},{"time_hours":554,"approval_perbill":525278491,"support_perbill":87797620,"approval":52.5278491,"support":8.779762},{"time_hours":555,"approval_perbill":525032092,"support_perbill":87053572,"approval":52.5032092,"support":8.7053572},{"time_hours":556,"approval_perbill":524786324,"support_perbill":86309524,"approval":52.4786324,"support":8.6309524},{"time_hours":557,"approval_perbill":524541186,"support_perbill":85565477,"approval":52.4541186,"support":8.5565477},{"time_hours":558,"approval_perbill":524296675,"support_perbill":84821429,"approval":52.4296675,"support":8.4821429},{"time_hours":559,"approval_perbill":524052788,"support_perbill":84077381,"approval":52.4052788,"support":8.4077381},{"time_hours":560,"approval_perbill":523809523,"support_perbill":83333334,"approval":52.3809523,"support":8.3333334},{"time_hours":561,"approval_perbill":523566878,"support_perbill":82589286,"approval":52.3566878,"support":8.2589286},{"time_hours":562,"approval_perbill":523324851,"support_perbill":81845239,"approval":52.3324851,"support":8.1845239},{"time_hours":563,"approval_perbill":523083439,"support_perbill":81101191,"approval":52.3083439,"support":8.1101191},{"time_hours":564,"approval_perbill":522842639,"support_perbill":80357143,"approval":52.2842639,"support":8.0357143},{"time_hours":565,"approval_perbill":522602450,"support_perbill":79613096,"approval":52.260245,"support":7.9613096},{"time_hours":566,"approval_perbill":522362869,"support_perbill":78869048,"approval":52.2362869,"support":7.8869048},{"time_hours":567,"approval_perbill":522123893,"support_perbill":78125000,"approval":52.2123893,"support":7.8125},{"time_hours":568,"approval_perbill":521885521,"support_perbill":77380953,"approval":52.1885521,"support":7.7380953},{"time_hours":569,"approval_perbill":521647751,"support_perbill":76636905,"approval":52.1647751,"support":7.6636905},{"time_hours":570,"approval_perbill":521410579,"support_perbill":75892858,"approval":52.1410579,"support":7.5892858},{"time_hours":571,"approval_perbill":521174004,"support_perbill":75148810,"approval":52.1174004,"support":7.514881},{"time_hours":572,"approval_perbill":520938023,"support_perbill":74404762,"approval":52.0938023,"support":7.4404762},{"time_hours":573,"approval_perbill":520702634,"support_perbill":73660715,"approval":52.0702634,"support":7.3660715},{"time_hours":574,"approval_perbill":520467836,"support_perbill":72916667,"approval":52.0467836,"support":7.2916667},{"time_hours":575,"approval_perbill":520233625,"support_perbill":72172620,"approval":52.0233625,"support":7.217262},{"time_hours":576,"approval_perbill":519999999,"support_perbill":71428572,"approval":51.9999999,"support":7.1428572},{"time_hours":577,"approval_perbill":519766957,"support_perbill":70684524,"approval":51.9766957,"support":7.0684524},{"time_hours":578,"approval_perbill":519534497,"support_perbill":69940477,"approval":51.9534497,"support":6.9940477},{"time_hours":579,"approval_perbill":519302615,"support_perbill":69196429,"approval":51.9302615,"support":6.9196429},{"time_hours":580,"approval_perbill":519071310,"support_perbill":68452381,"approval":51.907131,"support":6.8452381},{"time_hours":581,"approval_perbill":518840579,"support_perbill":67708334,"approval":51.8840579,"support":6.7708334},{"time_hours":582,"approval_perbill":518610421,"support_perbill":66964286,"approval":51.8610421,"support":6.6964286},{"time_hours":583,"approval_perbill":518380834,"support_perbill":66220239,"approval":51.8380834,"support":6.6220239},{"time_hours":584,"approval_perbill":518151815,"support_perbill":65476191,"approval":51.8151815,"support":6.5476191},{"time_hours":585,"approval_perbill":517923362,"support_perbill":64732143,"approval":51.7923362,"support":6.4732143},{"time_hours":586,"approval_perbill":517695473,"support_perbill":63988096,"approval":51.7695473,"support":6.3988096},{"time_hours":587,"approval_perbill":517468146,"support_perbill":63244048,"approval":51.7468146,"support":6.3244048},{"time_hours":588,"approval_perbill":517241379,"support_perbill":62500000,"approval":51.7241379,"support":6.25},{"time_hours":589,"approval_perbill":517015170,"support_perbill":61755953,"approval":51.701517,"support":6.1755953},{"time_hours":590,"approval_perbill":516789516,"support_perbill":61011905,"approval":51.6789516,"support":6.1011905},{"time_hours":591,"approval_perbill":516564417,"support_perbill":60267858,"approval":51.6564417,"support":6.0267858},{"time_hours":592,"approval_perbill":516339869,"support_perbill":59523810,"approval":51.6339869,"support":5.952381},{"time_hours":593,"approval_perbill":516115870,"support_perbill":58779762,"approval":51.611587,"support":5.8779762},{"time_hours":594,"approval_perbill":515892420,"support_perbill":58035715,"approval":51.589242,"support":5.8035715},{"time_hours":595,"approval_perbill":515669515,"support_perbill":57291667,"approval":51.5669515,"support":5.7291667},{"time_hours":596,"approval_perbill":515447154,"support_perbill":56547620,"approval":51.5447154,"support":5.654762},{"time_hours":597,"approval_perbill":515225334,"support_perbill":55803572,"approval":51.5225334,"support":5.5803572},{"time_hours":598,"approval_perbill":515004055,"support_perbill":55059524,"approval":51.5004055,"support":5.5059524},{"time_hours":599,"approval_perbill":514783313,"support_perbill":54315477,"approval":51.4783313,"support":5.4315477},{"time_hours":600,"approval_perbill":514563106,"support_perbill":53571429,"approval":51.4563106,"support":5.3571429},{"time_hours":601,"approval_perbill":514343434,"support_perbill":52827381,"approval":51.4343434,"support":5.2827381},{"time_hours":602,"approval_perbill":514124293,"support_perbill":52083334,"approval":51.4124293,"support":5.2083334},{"time_hours":603,"approval_perbill":513905683,"support_perbill":51339286,"approval":51.3905683,"support":5.1339286},{"time_hours":604,"approval_perbill":513687600,"support_perbill":50595239,"approval":51.36876,"support":5.0595239},{"time_hours":605,"approval_perbill":513470044,"support_perbill":49851191,"approval":51.3470044,"support":4.9851191},{"time_hours":606,"approval_perbill":513253011,"support_perbill":49107143,"approval":51.3253011,"support":4.9107143},{"time_hours":607,"approval_perbill":513036502,"support_perbill":48363096,"approval":51.3036502,"support":4.8363096},{"time_hours":608,"approval_perbill":512820512,"support_perbill":47619048,"approval":51.2820512,"support":4.7619048},{"time_hours":609,"approval_perbill":512605041,"support_perbill":46875000,"approval":51.2605041,"support":4.6875},{"time_hours":610,"approval_perbill":512390087,"support_perbill":46130953,"approval":51.2390087,"support":4.6130953},{"time_hours":611,"approval_perbill":512175648,"support_perbill":45386905,"approval":51.2175648,"support":4.5386905},{"time_hours":612,"approval_perbill":511961722,"support_perbill":44642858,"approval":51.1961722,"support":4.4642858},{"time_hours":613,"approval_perbill":511748307,"support_perbill":43898810,"approval":51.1748307,"support":4.389881},{"time_hours":614,"approval_perbill":511535401,"support_perbill":43154762,"approval":51.1535401,"support":4.3154762},{"time_hours":615,"approval_perbill":511323003,"support_perbill":42410715,"approval":51.1323003,"support":4.2410715},{"time_hours":616,"approval_perbill":511111111,"support_perbill":41666667,"approval":51.1111111,"support":4.1666667},{"time_hours":617,"approval_perbill":510899722,"support_perbill":40922620,"approval":51.0899722,"support":4.092262},{"time_hours":618,"approval_perbill":510688835,"support_perbill":40178572,"approval":51.0688835,"support":4.0178572},{"time_hours":619,"approval_perbill":510478449,"support_perbill":39434524,"approval":51.0478449,"support":3.9434524},{"time_hours":620,"approval_perbill":510268562,"support_perbill":38690477,"approval":51.0268562,"support":3.8690477},{"time_hours":621,"approval_perbill":510059171,"support_perbill":37946429,"approval":51.0059171,"support":3.7946429},{"time_hours":622,"approval_perbill":509850275,"support_perbill":37202381,"approval":50.9850275,"support":3.7202381},{"time_hours":623,"approval_perbill":509641873,"support_perbill":36458334,"approval":50.9641873,"support":3.6458334},{"time_hours":624,"approval_perbill":509433962,"support_perbill":35714286,"approval":50.9433962,"support":3.5714286},{"time_hours":625,"approval_perbill":509226540,"support_perbill":34970239,"approval":50.922654,"support":3.4970239},{"time_hours":626,"approval_perbill":509019607,"support_perbill":34226191,"approval":50.9019607,"support":3.4226191},{"time_hours":627,"approval_perbill":508813160,"support_perbill":33482143,"approval":50.881316,"support":3.3482143},{"time_hours":628,"approval_perbill":508607198,"support_perbill":32738096,"approval":50.8607198,"support":3.2738096},{"time_hours":629,"approval_perbill":508401719,"support_perbill":31994048,"approval":50.8401719,"support":3.1994048},{"time_hours":630,"approval_perbill":508196721,"support_perbill":31250000,"approval":50.8196721,"support":3.125},{"time_hours":631,"approval_perbill":507992202,"support_perbill":30505953,"approval":50.7992202,"support":3.0505953},{"time_hours":632,"approval_perbill":507788161,"support_perbill":29761905,"approval":50.7788161,"support":2.9761905},{"time_hours":633,"approval_perbill":507584597,"support_perbill":29017858,"approval":50.7584597,"support":2.9017858},{"time_hours":634,"approval_perbill":507381507,"support_perbill":28273810,"approval":50.7381507,"support":2.827381},{"time_hours":635,"approval_perbill":507178890,"support_perbill":27529762,"approval":50.717889,"support":2.7529762},{"time_hours":636,"approval_perbill":506976744,"support_perbill":26785715,"approval":50.6976744,"support":2.6785715},{"time_hours":637,"approval_perbill":506775067,"support_perbill":26041667,"approval":50.6775067,"support":2.6041667},{"time_hours":638,"approval_perbill":506573859,"support_perbill":25297620,"approval":50.6573859,"support":2.529762},{"time_hours":639,"approval_perbill":506373116,"support_perbill":24553572,"approval":50.6373116,"support":2.4553572},{"time_hours":640,"approval_perbill":506172839,"support_perbill":23809524,"approval":50.6172839,"support":2.3809524},{"time_hours":641,"approval_perbill":505973024,"support_perbill":23065477,"approval":50.5973024,"support":2.3065477},{"time_hours":642,"approval_perbill":505773671,"support_perbill":22321429,"approval":50.5773671,"support":2.2321429},{"time_hours":643,"approval_perbill":505574778,"support_perbill":21577381,"approval":50.5574778,"support":2.1577381},{"time_hours":644,"approval_perbill":505376343,"support_perbill":20833334,"approval":50.5376343,"support":2.0833334},{"time_hours":645,"approval_perbill":505178365,"support_perbill":20089286,"approval":50.5178365,"support":2.0089286},{"time_hours":646,"approval_perbill":504980842,"support_perbill":19345239,"approval":50.4980842,"support":1.9345239},{"time_hours":647,"approval_perbill":504783773,"support_perbill":18601191,"approval":50.4783773,"support":1.8601191},{"time_hours":648,"approval_perbill":504587155,"support_perbill":17857143,"approval":50.4587155,"support":1.7857143},{"time_hours":649,"approval_perbill":504390988,"support_perbill":17113096,"approval":50.4390988,"support":1.7113096},{"time_hours":650,"approval_perbill":504195270,"support_perbill":16369048,"approval":50.419527,"support":1.6369048},{"time_hours":651,"approval_perbill":503999999,"support_perbill":15625000,"approval":50.3999999,"support":1.5625},{"time_hours":652,"approval_perbill":503805174,"support_perbill":14880953,"approval":50.3805174,"support":1.4880953},{"time_hours":653,"approval_perbill":503610794,"support_perbill":14136905,"approval":50.3610794,"support":1.4136905},{"time_hours":654,"approval_perbill":503416856,"support_perbill":13392858,"approval":50.3416856,"support":1.3392858},{"time_hours":655,"approval_perbill":503223359,"support_perbill":12648810,"approval":50.3223359,"support":1.264881},{"time_hours":656,"approval_perbill":503030302,"support_perbill":11904762,"approval":50.3030302,"support":1.1904762},{"time_hours":657,"approval_perbill":502837684,"support_perbill":11160715,"approval":50.2837684,"support":1.1160715},{"time_hours":658,"approval_perbill":502645502,"support_perbill":10416667,"approval":50.2645502,"support":1.0416667},{"time_hours":659,"approval_perbill":502453756,"support_perbill":9672620,"approval":50.2453756,"support":0.967262},{"time_hours":660,"approval_perbill":502262443,"support_perbill":8928572,"approval":50.2262443,"support":0.8928572},{"time_hours":661,"approval_perbill":502071562,"support_perbill":8184524,"approval":50.2071562,"support":0.8184524},{"time_hours":662,"approval_perbill":501881113,"support_perbill":7440477,"approval":50.1881113,"support":0.7440477},{"time_hours":663,"approval_perbill":501691093,"support_perbill":6696429,"approval":50.1691093,"support":0.6696429},{"time_hours":664,"approval_perbill":501501501,"support_perbill":5952381,"approval":50.1501501,"support":0.5952381},{"time_hours":665,"approval_perbill":501312335,"support_perbill":5208334,"approval":50.1312335,"support":0.5208334},{"time_hours":666,"approval_perbill":501123595,"support_perbill":4464286,"approval":50.1123595,"support":0.4464286},{"time_hours":667,"approval_perbill":500935278,"support_perbill":3720239,"approval":50.0935278,"support":0.3720239},{"time_hours":668,"approval_perbill":500747383,"support_perbill":2976191,"approval":50.0747383,"support":0.2976191},{"time_hours":669,"approval_perbill":500559910,"support_perbill":2232143,"approval":50.055991,"support":0.2232143},{"time_hours":670,"approval_perbill":500372855,"support_perbill":1488096,"approval":50.0372855,"support":0.1488096},{"time_hours":671,"approval_perbill":500186219,"support_perbill":744048,"approval":50.0186219,"support":0.0744048},{"time_hours":672,"approval_perbill":499999999,"support_perbill":0,"approval":49.9999999,"support":0}]')},23738:p=>{"use strict";p.exports=JSON.parse('[{"time_hours":0,"approval_perbill":999999999,"support_perbill":499999995,"approval":99.9999999,"support":49.9999995,"days":0,"dot_needed":"567,056,294"},{"time_hours":1,"approval_perbill":997357396,"support_perbill":466482761,"approval":99.7357396,"support":46.6482761,"days":1,"dot_needed":"529,043,977"},{"time_hours":2,"approval_perbill":994734815,"support_perbill":437532142,"approval":99.4734815,"support":43.7532142,"days":1,"dot_needed":"496,210,715"},{"time_hours":3,"approval_perbill":992132029,"support_perbill":412274381,"approval":99.2132029,"support":41.2274381,"days":1,"dot_needed":"467,565,570"},{"time_hours":4,"approval_perbill":989548816,"support_perbill":390045264,"approval":98.9548816,"support":39.0045264,"days":1,"dot_needed":"442,355,248"},{"time_hours":5,"approval_perbill":986984953,"support_perbill":370330849,"approval":98.6984953,"support":37.0330849,"days":1,"dot_needed":"419,996,882"},{"time_hours":6,"approval_perbill":984440228,"support_perbill":352727281,"approval":98.4440228,"support":35.2727281,"days":1,"dot_needed":"400,032,454"},{"time_hours":7,"approval_perbill":981914425,"support_perbill":336912763,"approval":98.1914425,"support":33.6912763,"days":1,"dot_needed":"382,097,010"},{"time_hours":8,"approval_perbill":979407334,"support_perbill":322627750,"approval":97.9407334,"support":32.262775,"days":1,"dot_needed":"365,896,196"},{"time_hours":9,"approval_perbill":976918747,"support_perbill":309660581,"approval":97.6918747,"support":30.9660581,"days":1,"dot_needed":"351,189,967"},{"time_hours":10,"approval_perbill":974448461,"support_perbill":297836947,"approval":97.4448461,"support":29.7836947,"days":1,"dot_needed":"337,780,634"},{"time_hours":11,"approval_perbill":971996276,"support_perbill":287011962,"approval":97.1996276,"support":28.7011962,"days":1,"dot_needed":"325,503,882"},{"time_hours":12,"approval_perbill":969561991,"support_perbill":277064231,"approval":96.9561991,"support":27.7064231,"days":1,"dot_needed":"314,222,035"},{"time_hours":13,"approval_perbill":967145411,"support_perbill":267891263,"approval":96.7145411,"support":26.7891263,"days":1,"dot_needed":"303,818,857"},{"time_hours":14,"approval_perbill":964746346,"support_perbill":259405948,"approval":96.4746346,"support":25.9405948,"days":1,"dot_needed":"294,195,554"},{"time_hours":15,"approval_perbill":962364606,"support_perbill":251533751,"approval":96.2364606,"support":25.1533751,"days":1,"dot_needed":"285,267,596"},{"time_hours":16,"approval_perbill":960000002,"support_perbill":244210536,"approval":96.0000002,"support":24.4210536,"days":1,"dot_needed":"276,962,246"},{"time_hours":17,"approval_perbill":957652349,"support_perbill":237380807,"approval":95.7652349,"support":23.7380807,"days":1,"dot_needed":"269,216,564"},{"time_hours":18,"approval_perbill":955321468,"support_perbill":230996317,"approval":95.5321468,"support":23.0996317,"days":1,"dot_needed":"261,975,834"},{"time_hours":19,"approval_perbill":953007180,"support_perbill":225014897,"approval":95.300718,"support":22.5014897,"days":1,"dot_needed":"255,192,230"},{"time_hours":20,"approval_perbill":950709307,"support_perbill":219399546,"approval":95.0709307,"support":21.9399546,"days":1,"dot_needed":"248,823,790"},{"time_hours":21,"approval_perbill":948427674,"support_perbill":214117653,"approval":94.8427674,"support":21.4117653,"days":1,"dot_needed":"242,833,528"},{"time_hours":22,"approval_perbill":946162112,"support_perbill":209140376,"approval":94.6162112,"support":20.9140376,"days":1,"dot_needed":"237,188,736"},{"time_hours":23,"approval_perbill":943912450,"support_perbill":204442101,"approval":94.391245,"support":20.4442101,"days":1,"dot_needed":"231,860,363"},{"time_hours":24,"approval_perbill":941678522,"support_perbill":200000007,"approval":94.1678522,"support":20.0000007,"days":1,"dot_needed":"226,822,528"},{"time_hours":25,"approval_perbill":939460164,"support_perbill":195793698,"approval":93.9460164,"support":19.5793698,"days":2,"dot_needed":"222,052,100"},{"time_hours":26,"approval_perbill":937257211,"support_perbill":191804884,"approval":93.7257211,"support":19.1804884,"days":2,"dot_needed":"217,528,336"},{"time_hours":27,"approval_perbill":935069507,"support_perbill":188017125,"approval":93.5069507,"support":18.8017125,"days":2,"dot_needed":"213,232,590"},{"time_hours":28,"approval_perbill":932896892,"support_perbill":184415591,"approval":93.2896892,"support":18.4415591,"days":2,"dot_needed":"209,148,045"},{"time_hours":29,"approval_perbill":930739211,"support_perbill":180986879,"approval":93.0739211,"support":18.0986879,"days":2,"dot_needed":"205,259,500"},{"time_hours":30,"approval_perbill":928596309,"support_perbill":177718838,"approval":92.8596309,"support":17.7718838,"days":2,"dot_needed":"201,553,173"},{"time_hours":31,"approval_perbill":926468037,"support_perbill":174600438,"approval":92.6468037,"support":17.4600438,"days":2,"dot_needed":"198,016,557"},{"time_hours":32,"approval_perbill":924354246,"support_perbill":171621628,"approval":92.4354246,"support":17.1621628,"days":2,"dot_needed":"194,638,251"},{"time_hours":33,"approval_perbill":922254786,"support_perbill":168773240,"approval":92.2254786,"support":16.877324,"days":2,"dot_needed":"191,407,858"},{"time_hours":34,"approval_perbill":920169512,"support_perbill":166046892,"approval":92.0169512,"support":16.6046892,"days":2,"dot_needed":"188,315,872"},{"time_hours":35,"approval_perbill":918098284,"support_perbill":163434908,"approval":91.8098284,"support":16.3434908,"days":2,"dot_needed":"185,353,588"},{"time_hours":36,"approval_perbill":916040958,"support_perbill":160930238,"approval":91.6040958,"support":16.0930238,"days":2,"dot_needed":"182,513,011"},{"time_hours":37,"approval_perbill":913997395,"support_perbill":158526401,"approval":91.3997395,"support":15.8526401,"days":2,"dot_needed":"179,786,789"},{"time_hours":38,"approval_perbill":911967455,"support_perbill":156217428,"approval":91.1967455,"support":15.6217428,"days":2,"dot_needed":"177,168,153"},{"time_hours":39,"approval_perbill":909951007,"support_perbill":153997814,"approval":90.9951007,"support":15.3997814,"days":2,"dot_needed":"174,650,861"},{"time_hours":40,"approval_perbill":907947914,"support_perbill":151862469,"approval":90.7947914,"support":15.1862469,"days":2,"dot_needed":"172,229,140"},{"time_hours":41,"approval_perbill":905958044,"support_perbill":149806684,"approval":90.5958044,"support":14.9806684,"days":2,"dot_needed":"169,897,648"},{"time_hours":42,"approval_perbill":903981266,"support_perbill":147826091,"approval":90.3981266,"support":14.7826091,"days":2,"dot_needed":"167,651,432"},{"time_hours":43,"approval_perbill":902017453,"support_perbill":145916643,"approval":90.2017453,"support":14.5916643,"days":2,"dot_needed":"165,485,903"},{"time_hours":44,"approval_perbill":900066477,"support_perbill":144074572,"approval":90.0066477,"support":14.4074572,"days":2,"dot_needed":"163,396,787"},{"time_hours":45,"approval_perbill":898128212,"support_perbill":142296374,"approval":89.8128212,"support":14.2296374,"days":2,"dot_needed":"161,380,111"},{"time_hours":46,"approval_perbill":896202534,"support_perbill":140578783,"approval":89.6202534,"support":14.0578783,"days":2,"dot_needed":"159,432,169"},{"time_hours":47,"approval_perbill":894289321,"support_perbill":138918752,"approval":89.4289321,"support":13.8918752,"days":2,"dot_needed":"157,549,507"},{"time_hours":48,"approval_perbill":892388454,"support_perbill":137313437,"approval":89.2388454,"support":13.7313437,"days":2,"dot_needed":"155,728,899"},{"time_hours":49,"approval_perbill":890499812,"support_perbill":135760176,"approval":89.0499812,"support":13.5760176,"days":3,"dot_needed":"153,967,326"},{"time_hours":50,"approval_perbill":888623278,"support_perbill":134256476,"approval":88.8623278,"support":13.4256476,"days":3,"dot_needed":"152,261,961"},{"time_hours":51,"approval_perbill":886758735,"support_perbill":132800004,"approval":88.6758735,"support":13.2800004,"days":3,"dot_needed":"150,610,158"},{"time_hours":52,"approval_perbill":884906070,"support_perbill":131388569,"approval":88.490607,"support":13.1388569,"days":3,"dot_needed":"149,009,432"},{"time_hours":53,"approval_perbill":883065170,"support_perbill":130020113,"approval":88.306517,"support":13.0020113,"days":3,"dot_needed":"147,457,448"},{"time_hours":54,"approval_perbill":881235922,"support_perbill":128692704,"approval":88.1235922,"support":12.8692704,"days":3,"dot_needed":"145,952,017"},{"time_hours":55,"approval_perbill":879418215,"support_perbill":127404520,"approval":87.9418215,"support":12.740452,"days":3,"dot_needed":"144,491,071"},{"time_hours":56,"approval_perbill":877611943,"support_perbill":126153850,"approval":87.7611943,"support":12.615385,"days":3,"dot_needed":"143,072,671"},{"time_hours":57,"approval_perbill":875816996,"support_perbill":124939078,"approval":87.5816996,"support":12.4939078,"days":3,"dot_needed":"141,694,983"},{"time_hours":58,"approval_perbill":874033269,"support_perbill":123758680,"approval":87.4033269,"support":12.375868,"days":3,"dot_needed":"140,356,278"},{"time_hours":59,"approval_perbill":872260656,"support_perbill":122611217,"approval":87.2260656,"support":12.2611217,"days":3,"dot_needed":"139,054,926"},{"time_hours":60,"approval_perbill":870499055,"support_perbill":121495330,"approval":87.0499055,"support":12.149533,"days":3,"dot_needed":"137,789,385"},{"time_hours":61,"approval_perbill":868748363,"support_perbill":120409734,"approval":86.8748363,"support":12.0409734,"days":3,"dot_needed":"136,558,196"},{"time_hours":62,"approval_perbill":867008478,"support_perbill":119353212,"approval":86.7008478,"support":11.9353212,"days":3,"dot_needed":"135,359,982"},{"time_hours":63,"approval_perbill":865279301,"support_perbill":118324610,"approval":86.5279301,"support":11.832461,"days":3,"dot_needed":"134,193,431"},{"time_hours":64,"approval_perbill":863560734,"support_perbill":117322838,"approval":86.3560734,"support":11.7322838,"days":3,"dot_needed":"133,057,309"},{"time_hours":65,"approval_perbill":861852680,"support_perbill":116346858,"approval":86.185268,"support":11.6346858,"days":3,"dot_needed":"131,950,438"},{"time_hours":66,"approval_perbill":860155042,"support_perbill":115395687,"approval":86.0155042,"support":11.5395687,"days":3,"dot_needed":"130,871,703"},{"time_hours":67,"approval_perbill":858467724,"support_perbill":114468391,"approval":85.8467724,"support":11.4468391,"days":3,"dot_needed":"129,820,045"},{"time_hours":68,"approval_perbill":856790633,"support_perbill":113564081,"approval":85.6790633,"support":11.3564081,"days":3,"dot_needed":"128,794,455"},{"time_hours":69,"approval_perbill":855123677,"support_perbill":112681916,"approval":85.5123677,"support":11.2681916,"days":3,"dot_needed":"127,793,981"},{"time_hours":70,"approval_perbill":853466765,"support_perbill":111821089,"approval":85.3466765,"support":11.1821089,"days":3,"dot_needed":"126,817,706"},{"time_hours":71,"approval_perbill":851819805,"support_perbill":110980837,"approval":85.1819805,"support":11.0980837,"days":3,"dot_needed":"125,864,766"},{"time_hours":72,"approval_perbill":850182706,"support_perbill":110160430,"approval":85.0182706,"support":11.016043,"days":3,"dot_needed":"124,934,332"},{"time_hours":73,"approval_perbill":848555384,"support_perbill":109359175,"approval":84.8555384,"support":10.9359175,"days":4,"dot_needed":"124,025,618"},{"time_hours":74,"approval_perbill":846937749,"support_perbill":108576407,"approval":84.6937749,"support":10.8576407,"days":4,"dot_needed":"123,137,871"},{"time_hours":75,"approval_perbill":845329715,"support_perbill":107811494,"approval":84.5329715,"support":10.7811494,"days":4,"dot_needed":"122,270,374"},{"time_hours":76,"approval_perbill":843731196,"support_perbill":107063832,"approval":84.3731196,"support":10.7063832,"days":4,"dot_needed":"121,422,441"},{"time_hours":77,"approval_perbill":842142110,"support_perbill":106332845,"approval":84.214211,"support":10.6332845,"days":4,"dot_needed":"120,593,419"},{"time_hours":78,"approval_perbill":840562372,"support_perbill":105617980,"approval":84.0562372,"support":10.561798,"days":4,"dot_needed":"119,782,682"},{"time_hours":79,"approval_perbill":838991901,"support_perbill":104918710,"approval":83.8991901,"support":10.491871,"days":4,"dot_needed":"118,989,631"},{"time_hours":80,"approval_perbill":837430613,"support_perbill":104234530,"approval":83.7430613,"support":10.423453,"days":4,"dot_needed":"118,213,694"},{"time_hours":81,"approval_perbill":835878431,"support_perbill":103564957,"approval":83.5878431,"support":10.3564957,"days":4,"dot_needed":"117,454,323"},{"time_hours":82,"approval_perbill":834335274,"support_perbill":102909528,"approval":83.4335274,"support":10.2909528,"days":4,"dot_needed":"116,710,992"},{"time_hours":83,"approval_perbill":832801064,"support_perbill":102267800,"approval":83.2801064,"support":10.22678,"days":4,"dot_needed":"115,983,201"},{"time_hours":84,"approval_perbill":831275722,"support_perbill":101639346,"approval":83.1275722,"support":10.1639346,"days":4,"dot_needed":"115,270,463"},{"time_hours":85,"approval_perbill":829759174,"support_perbill":101023761,"approval":82.9759174,"support":10.1023761,"days":4,"dot_needed":"114,572,320"},{"time_hours":86,"approval_perbill":828251342,"support_perbill":100420652,"approval":82.8251342,"support":10.0420652,"days":4,"dot_needed":"113,888,327"},{"time_hours":87,"approval_perbill":826752152,"support_perbill":99829645,"approval":82.6752152,"support":9.9829645,"days":4,"dot_needed":"113,218,058"},{"time_hours":88,"approval_perbill":825261530,"support_perbill":99250377,"approval":82.526153,"support":9.9250377,"days":4,"dot_needed":"112,561,103"},{"time_hours":89,"approval_perbill":823779401,"support_perbill":98682503,"approval":82.3779401,"support":9.8682503,"days":4,"dot_needed":"111,917,070"},{"time_hours":90,"approval_perbill":822305695,"support_perbill":98125691,"approval":82.2305695,"support":9.8125691,"days":4,"dot_needed":"111,285,583"},{"time_hours":91,"approval_perbill":820840339,"support_perbill":97579620,"approval":82.0840339,"support":9.757962,"days":4,"dot_needed":"110,666,277"},{"time_hours":92,"approval_perbill":819383263,"support_perbill":97043982,"approval":81.9383263,"support":9.7043982,"days":4,"dot_needed":"110,058,803"},{"time_hours":93,"approval_perbill":817934396,"support_perbill":96518481,"approval":81.7934396,"support":9.6518481,"days":4,"dot_needed":"109,462,825"},{"time_hours":94,"approval_perbill":816493670,"support_perbill":96002832,"approval":81.649367,"support":9.6002832,"days":4,"dot_needed":"108,878,021"},{"time_hours":95,"approval_perbill":815061016,"support_perbill":95496760,"approval":81.5061016,"support":9.549676,"days":4,"dot_needed":"108,304,079"},{"time_hours":96,"approval_perbill":813636367,"support_perbill":95000002,"approval":81.3636367,"support":9.5000002,"days":4,"dot_needed":"107,740,699"},{"time_hours":97,"approval_perbill":812219654,"support_perbill":94512302,"approval":81.2219654,"support":9.4512302,"days":5,"dot_needed":"107,187,593"},{"time_hours":98,"approval_perbill":810810814,"support_perbill":94033415,"approval":81.0810814,"support":9.4033415,"days":5,"dot_needed":"106,644,481"},{"time_hours":99,"approval_perbill":809409779,"support_perbill":93563104,"approval":80.9409779,"support":9.3563104,"days":5,"dot_needed":"106,111,095"},{"time_hours":100,"approval_perbill":808016486,"support_perbill":93101141,"approval":80.8016486,"support":9.3101141,"days":5,"dot_needed":"105,587,177"},{"time_hours":101,"approval_perbill":806630869,"support_perbill":92647305,"approval":80.6630869,"support":9.2647305,"days":5,"dot_needed":"105,072,476"},{"time_hours":102,"approval_perbill":805252867,"support_perbill":92201384,"approval":80.5252867,"support":9.2201384,"days":5,"dot_needed":"104,566,751"},{"time_hours":103,"approval_perbill":803882416,"support_perbill":91763173,"approval":80.3882416,"support":9.1763173,"days":5,"dot_needed":"104,069,771"},{"time_hours":104,"approval_perbill":802519455,"support_perbill":91332473,"approval":80.2519455,"support":9.1332473,"days":5,"dot_needed":"103,581,308"},{"time_hours":105,"approval_perbill":801163921,"support_perbill":90909092,"approval":80.1163921,"support":9.0909092,"days":5,"dot_needed":"103,101,147"},{"time_hours":106,"approval_perbill":799815756,"support_perbill":90492847,"approval":79.9815756,"support":9.0492847,"days":5,"dot_needed":"102,629,078"},{"time_hours":107,"approval_perbill":798474898,"support_perbill":90083558,"approval":79.8474898,"support":9.0083558,"days":5,"dot_needed":"102,164,898"},{"time_hours":108,"approval_perbill":797141290,"support_perbill":89681052,"approval":79.714129,"support":8.9681052,"days":5,"dot_needed":"101,708,411"},{"time_hours":109,"approval_perbill":795814871,"support_perbill":89285162,"approval":79.5814871,"support":8.9285162,"days":5,"dot_needed":"101,259,427"},{"time_hours":110,"approval_perbill":794495583,"support_perbill":88895726,"approval":79.4495583,"support":8.8895726,"days":5,"dot_needed":"100,817,763"},{"time_hours":111,"approval_perbill":793183370,"support_perbill":88512587,"approval":79.318337,"support":8.8512587,"days":5,"dot_needed":"100,383,240"},{"time_hours":112,"approval_perbill":791878176,"support_perbill":88135595,"approval":79.1878176,"support":8.8135595,"days":5,"dot_needed":"99,955,689"},{"time_hours":113,"approval_perbill":790579943,"support_perbill":87764602,"approval":79.0579943,"support":8.7764602,"days":5,"dot_needed":"99,534,941"},{"time_hours":114,"approval_perbill":789288615,"support_perbill":87399465,"approval":78.9288615,"support":8.7399465,"days":5,"dot_needed":"99,120,834"},{"time_hours":115,"approval_perbill":788004139,"support_perbill":87040049,"approval":78.8004139,"support":8.7040049,"days":5,"dot_needed":"98,713,216"},{"time_hours":116,"approval_perbill":786726461,"support_perbill":86686218,"approval":78.6726461,"support":8.6686218,"days":5,"dot_needed":"98,311,932"},{"time_hours":117,"approval_perbill":785455525,"support_perbill":86337845,"approval":78.5455525,"support":8.6337845,"days":5,"dot_needed":"97,916,838"},{"time_hours":118,"approval_perbill":784191278,"support_perbill":85994804,"approval":78.4191278,"support":8.5994804,"days":5,"dot_needed":"97,527,791"},{"time_hours":119,"approval_perbill":782933668,"support_perbill":85656972,"approval":78.2933668,"support":8.5656972,"days":5,"dot_needed":"97,144,651"},{"time_hours":120,"approval_perbill":781682644,"support_perbill":85324233,"approval":78.1682644,"support":8.5324233,"days":5,"dot_needed":"96,767,288"},{"time_hours":121,"approval_perbill":780438153,"support_perbill":84996473,"approval":78.0438153,"support":8.4996473,"days":6,"dot_needed":"96,395,571"},{"time_hours":122,"approval_perbill":779200144,"support_perbill":84673579,"approval":77.9200144,"support":8.4673579,"days":6,"dot_needed":"96,029,373"},{"time_hours":123,"approval_perbill":777968567,"support_perbill":84355446,"approval":77.7968567,"support":8.4355446,"days":6,"dot_needed":"95,668,574"},{"time_hours":124,"approval_perbill":776743372,"support_perbill":84041967,"approval":77.6743372,"support":8.4041967,"days":6,"dot_needed":"95,313,054"},{"time_hours":125,"approval_perbill":775524509,"support_perbill":83733042,"approval":77.5524509,"support":8.3733042,"days":6,"dot_needed":"94,962,698"},{"time_hours":126,"approval_perbill":774311929,"support_perbill":83428573,"approval":77.4311929,"support":8.3428573,"days":6,"dot_needed":"94,617,396"},{"time_hours":127,"approval_perbill":773105585,"support_perbill":83128463,"approval":77.3105585,"support":8.3128463,"days":6,"dot_needed":"94,277,037"},{"time_hours":128,"approval_perbill":771905427,"support_perbill":82832619,"approval":77.1905427,"support":8.2832619,"days":6,"dot_needed":"93,941,517"},{"time_hours":129,"approval_perbill":770711409,"support_perbill":82540952,"approval":77.0711409,"support":8.2540952,"days":6,"dot_needed":"93,610,734"},{"time_hours":130,"approval_perbill":769523483,"support_perbill":82253373,"approval":76.9523483,"support":8.2253373,"days":6,"dot_needed":"93,284,587"},{"time_hours":131,"approval_perbill":768341603,"support_perbill":81969798,"approval":76.8341603,"support":8.1969798,"days":6,"dot_needed":"92,962,981"},{"time_hours":132,"approval_perbill":767165723,"support_perbill":81690142,"approval":76.7165723,"support":8.1690142,"days":6,"dot_needed":"92,645,819"},{"time_hours":133,"approval_perbill":765995798,"support_perbill":81414326,"approval":76.5995798,"support":8.1414326,"days":6,"dot_needed":"92,333,013"},{"time_hours":134,"approval_perbill":764831781,"support_perbill":81142270,"approval":76.4831781,"support":8.114227,"days":6,"dot_needed":"92,024,471"},{"time_hours":135,"approval_perbill":763673629,"support_perbill":80873899,"approval":76.3673629,"support":8.0873899,"days":6,"dot_needed":"91,720,108"},{"time_hours":136,"approval_perbill":762521298,"support_perbill":80609138,"approval":76.2521298,"support":8.0609138,"days":6,"dot_needed":"91,419,839"},{"time_hours":137,"approval_perbill":761374743,"support_perbill":80347915,"approval":76.1374743,"support":8.0347915,"days":6,"dot_needed":"91,123,583"},{"time_hours":138,"approval_perbill":760233921,"support_perbill":80090159,"approval":76.0233921,"support":8.0090159,"days":6,"dot_needed":"90,831,258"},{"time_hours":139,"approval_perbill":759098790,"support_perbill":79835801,"approval":75.909879,"support":7.9835801,"days":6,"dot_needed":"90,542,788"},{"time_hours":140,"approval_perbill":757969306,"support_perbill":79584776,"approval":75.7969306,"support":7.9584776,"days":6,"dot_needed":"90,258,097"},{"time_hours":141,"approval_perbill":756845429,"support_perbill":79337018,"approval":75.6845429,"support":7.9337018,"days":6,"dot_needed":"89,977,112"},{"time_hours":142,"approval_perbill":755727116,"support_perbill":79092463,"approval":75.5727116,"support":7.9092463,"days":6,"dot_needed":"89,699,759"},{"time_hours":143,"approval_perbill":754614325,"support_perbill":78851049,"approval":75.4614325,"support":7.8851049,"days":6,"dot_needed":"89,425,968"},{"time_hours":144,"approval_perbill":753507017,"support_perbill":78612718,"approval":75.3507017,"support":7.8612718,"days":6,"dot_needed":"89,155,674"},{"time_hours":145,"approval_perbill":752405151,"support_perbill":78377409,"approval":75.2405151,"support":7.8377409,"days":7,"dot_needed":"88,888,807"},{"time_hours":146,"approval_perbill":751308686,"support_perbill":78145066,"approval":75.1308686,"support":7.8145066,"days":7,"dot_needed":"88,625,304"},{"time_hours":147,"approval_perbill":750217583,"support_perbill":77915634,"approval":75.0217583,"support":7.7915634,"days":7,"dot_needed":"88,365,102"},{"time_hours":148,"approval_perbill":749131804,"support_perbill":77689057,"approval":74.9131804,"support":7.7689057,"days":7,"dot_needed":"88,108,138"},{"time_hours":149,"approval_perbill":748051308,"support_perbill":77465283,"approval":74.8051308,"support":7.7465283,"days":7,"dot_needed":"87,854,354"},{"time_hours":150,"approval_perbill":746976058,"support_perbill":77244260,"approval":74.6976058,"support":7.724426,"days":7,"dot_needed":"87,603,689"},{"time_hours":151,"approval_perbill":745906016,"support_perbill":77025938,"approval":74.5906016,"support":7.7025938,"days":7,"dot_needed":"87,356,087"},{"time_hours":152,"approval_perbill":744841143,"support_perbill":76810267,"approval":74.4841143,"support":7.6810267,"days":7,"dot_needed":"87,111,492"},{"time_hours":153,"approval_perbill":743781402,"support_perbill":76597199,"approval":74.3781402,"support":7.6597199,"days":7,"dot_needed":"86,869,849"},{"time_hours":154,"approval_perbill":742726757,"support_perbill":76386689,"approval":74.2726757,"support":7.6386689,"days":7,"dot_needed":"86,631,106"},{"time_hours":155,"approval_perbill":741677171,"support_perbill":76178689,"approval":74.1677171,"support":7.6178689,"days":7,"dot_needed":"86,395,211"},{"time_hours":156,"approval_perbill":740632606,"support_perbill":75973155,"approval":74.0632606,"support":7.5973155,"days":7,"dot_needed":"86,162,112"},{"time_hours":157,"approval_perbill":739593028,"support_perbill":75770044,"approval":73.9593028,"support":7.5770044,"days":7,"dot_needed":"85,931,762"},{"time_hours":158,"approval_perbill":738558402,"support_perbill":75569313,"approval":73.8558402,"support":7.5569313,"days":7,"dot_needed":"85,704,110"},{"time_hours":159,"approval_perbill":737528690,"support_perbill":75370921,"approval":73.752869,"support":7.5370921,"days":7,"dot_needed":"85,479,111"},{"time_hours":160,"approval_perbill":736503859,"support_perbill":75174826,"approval":73.6503859,"support":7.5174826,"days":7,"dot_needed":"85,256,717"},{"time_hours":161,"approval_perbill":735483874,"support_perbill":74980989,"approval":73.5483874,"support":7.4980989,"days":7,"dot_needed":"85,036,884"},{"time_hours":162,"approval_perbill":734468701,"support_perbill":74789372,"approval":73.4468701,"support":7.4789372,"days":7,"dot_needed":"84,819,569"},{"time_hours":163,"approval_perbill":733458305,"support_perbill":74599936,"approval":73.3458305,"support":7.4599936,"days":7,"dot_needed":"84,604,727"},{"time_hours":164,"approval_perbill":732452653,"support_perbill":74412645,"approval":73.2452653,"support":7.4412645,"days":7,"dot_needed":"84,392,318"},{"time_hours":165,"approval_perbill":731451712,"support_perbill":74227462,"approval":73.1451712,"support":7.4227462,"days":7,"dot_needed":"84,182,300"},{"time_hours":166,"approval_perbill":730455448,"support_perbill":74044351,"approval":73.0455448,"support":7.4044351,"days":7,"dot_needed":"83,974,631"},{"time_hours":167,"approval_perbill":729463830,"support_perbill":73863279,"approval":72.946383,"support":7.3863279,"days":7,"dot_needed":"83,769,275"},{"time_hours":168,"approval_perbill":728476824,"support_perbill":73684211,"approval":72.8476824,"support":7.3684211,"days":7,"dot_needed":"83,566,192"},{"time_hours":169,"approval_perbill":727494398,"support_perbill":73507115,"approval":72.7494398,"support":7.3507115,"days":8,"dot_needed":"83,365,345"},{"time_hours":170,"approval_perbill":726516522,"support_perbill":73331957,"approval":72.6516522,"support":7.3331957,"days":8,"dot_needed":"83,166,696"},{"time_hours":171,"approval_perbill":725543162,"support_perbill":73158706,"approval":72.5543162,"support":7.3158706,"days":8,"dot_needed":"82,970,210"},{"time_hours":172,"approval_perbill":724574288,"support_perbill":72987332,"approval":72.4574288,"support":7.2987332,"days":8,"dot_needed":"82,775,853"},{"time_hours":173,"approval_perbill":723609869,"support_perbill":72817804,"approval":72.3609869,"support":7.2817804,"days":8,"dot_needed":"82,583,589"},{"time_hours":174,"approval_perbill":722649875,"support_perbill":72650092,"approval":72.2649875,"support":7.2650092,"days":8,"dot_needed":"82,393,385"},{"time_hours":175,"approval_perbill":721694274,"support_perbill":72484167,"approval":72.1694274,"support":7.2484167,"days":8,"dot_needed":"82,205,207"},{"time_hours":176,"approval_perbill":720743037,"support_perbill":72320001,"approval":72.0743037,"support":7.2320001,"days":8,"dot_needed":"82,019,024"},{"time_hours":177,"approval_perbill":719796134,"support_perbill":72157565,"approval":71.9796134,"support":7.2157565,"days":8,"dot_needed":"81,834,804"},{"time_hours":178,"approval_perbill":718853535,"support_perbill":71996834,"approval":71.8853535,"support":7.1996834,"days":8,"dot_needed":"81,652,517"},{"time_hours":179,"approval_perbill":717915212,"support_perbill":71837780,"approval":71.7915212,"support":7.183778,"days":8,"dot_needed":"81,472,131"},{"time_hours":180,"approval_perbill":716981135,"support_perbill":71680377,"approval":71.6981135,"support":7.1680377,"days":8,"dot_needed":"81,293,619"},{"time_hours":181,"approval_perbill":716051275,"support_perbill":71524599,"approval":71.6051275,"support":7.1524599,"days":8,"dot_needed":"81,116,949"},{"time_hours":182,"approval_perbill":715125604,"support_perbill":71370421,"approval":71.5125604,"support":7.1370421,"days":8,"dot_needed":"80,942,094"},{"time_hours":183,"approval_perbill":714204094,"support_perbill":71217819,"approval":71.4204094,"support":7.1217819,"days":8,"dot_needed":"80,769,026"},{"time_hours":184,"approval_perbill":713286716,"support_perbill":71066770,"approval":71.3286716,"support":7.106677,"days":8,"dot_needed":"80,597,719"},{"time_hours":185,"approval_perbill":712373443,"support_perbill":70917248,"approval":71.2373443,"support":7.0917248,"days":8,"dot_needed":"80,428,145"},{"time_hours":186,"approval_perbill":711464248,"support_perbill":70769231,"approval":71.1464248,"support":7.0769231,"days":8,"dot_needed":"80,260,277"},{"time_hours":187,"approval_perbill":710559103,"support_perbill":70622697,"approval":71.0559103,"support":7.0622697,"days":8,"dot_needed":"80,094,091"},{"time_hours":188,"approval_perbill":709657981,"support_perbill":70477624,"approval":70.9657981,"support":7.0477624,"days":8,"dot_needed":"79,929,561"},{"time_hours":189,"approval_perbill":708760855,"support_perbill":70333989,"approval":70.8760855,"support":7.0333989,"days":8,"dot_needed":"79,766,663"},{"time_hours":190,"approval_perbill":707867699,"support_perbill":70191771,"approval":70.7867699,"support":7.0191771,"days":8,"dot_needed":"79,605,372"},{"time_hours":191,"approval_perbill":706978487,"support_perbill":70050950,"approval":70.6978487,"support":7.005095,"days":8,"dot_needed":"79,445,665"},{"time_hours":192,"approval_perbill":706093193,"support_perbill":69911505,"approval":70.6093193,"support":6.9911505,"days":8,"dot_needed":"79,287,519"},{"time_hours":193,"approval_perbill":705211790,"support_perbill":69773416,"approval":70.521179,"support":6.9773416,"days":9,"dot_needed":"79,130,910"},{"time_hours":194,"approval_perbill":704334253,"support_perbill":69636663,"approval":70.4334253,"support":6.9636663,"days":9,"dot_needed":"78,975,817"},{"time_hours":195,"approval_perbill":703460557,"support_perbill":69501227,"approval":70.3460557,"support":6.9501227,"days":9,"dot_needed":"78,822,217"},{"time_hours":196,"approval_perbill":702590676,"support_perbill":69367089,"approval":70.2590676,"support":6.9367089,"days":9,"dot_needed":"78,670,090"},{"time_hours":197,"approval_perbill":701724587,"support_perbill":69234231,"approval":70.1724587,"support":6.9234231,"days":9,"dot_needed":"78,519,414"},{"time_hours":198,"approval_perbill":700862262,"support_perbill":69102633,"approval":70.0862262,"support":6.9102633,"days":9,"dot_needed":"78,370,167"},{"time_hours":199,"approval_perbill":700003680,"support_perbill":68972280,"approval":70.000368,"support":6.897228,"days":9,"dot_needed":"78,222,332"},{"time_hours":200,"approval_perbill":699148814,"support_perbill":68843152,"approval":69.9148814,"support":6.8843152,"days":9,"dot_needed":"78,075,886"},{"time_hours":201,"approval_perbill":698297642,"support_perbill":68715232,"approval":69.8297642,"support":6.8715232,"days":9,"dot_needed":"77,930,810"},{"time_hours":202,"approval_perbill":697450138,"support_perbill":68588504,"approval":69.7450138,"support":6.8588504,"days":9,"dot_needed":"77,787,087"},{"time_hours":203,"approval_perbill":696606280,"support_perbill":68462952,"approval":69.660628,"support":6.8462952,"days":9,"dot_needed":"77,644,696"},{"time_hours":204,"approval_perbill":695766044,"support_perbill":68338558,"approval":69.5766044,"support":6.8338558,"days":9,"dot_needed":"77,503,620"},{"time_hours":205,"approval_perbill":694929407,"support_perbill":68215308,"approval":69.4929407,"support":6.8215308,"days":9,"dot_needed":"77,363,840"},{"time_hours":206,"approval_perbill":694096344,"support_perbill":68093184,"approval":69.4096344,"support":6.8093184,"days":9,"dot_needed":"77,225,338"},{"time_hours":207,"approval_perbill":693266835,"support_perbill":67972172,"approval":69.3266835,"support":6.7972172,"days":9,"dot_needed":"77,088,097"},{"time_hours":208,"approval_perbill":692440857,"support_perbill":67852257,"approval":69.2440857,"support":6.7852257,"days":9,"dot_needed":"76,952,100"},{"time_hours":209,"approval_perbill":691618386,"support_perbill":67733424,"approval":69.1618386,"support":6.7733424,"days":9,"dot_needed":"76,817,330"},{"time_hours":210,"approval_perbill":690799399,"support_perbill":67615659,"approval":69.0799399,"support":6.7615659,"days":9,"dot_needed":"76,683,771"},{"time_hours":211,"approval_perbill":689983876,"support_perbill":67498946,"approval":68.9983876,"support":6.7498946,"days":9,"dot_needed":"76,551,405"},{"time_hours":212,"approval_perbill":689171795,"support_perbill":67383272,"approval":68.9171795,"support":6.7383272,"days":9,"dot_needed":"76,420,218"},{"time_hours":213,"approval_perbill":688363133,"support_perbill":67268623,"approval":68.8363133,"support":6.7268623,"days":9,"dot_needed":"76,290,193"},{"time_hours":214,"approval_perbill":687557869,"support_perbill":67154986,"approval":68.7557869,"support":6.7154986,"days":9,"dot_needed":"76,161,316"},{"time_hours":215,"approval_perbill":686755981,"support_perbill":67042347,"approval":68.6755981,"support":6.7042347,"days":9,"dot_needed":"76,033,570"},{"time_hours":216,"approval_perbill":685957449,"support_perbill":66930693,"approval":68.5957449,"support":6.6930693,"days":9,"dot_needed":"75,906,942"},{"time_hours":217,"approval_perbill":685162252,"support_perbill":66820012,"approval":68.5162252,"support":6.6820012,"days":10,"dot_needed":"75,781,418"},{"time_hours":218,"approval_perbill":684370368,"support_perbill":66710290,"approval":68.4370368,"support":6.671029,"days":10,"dot_needed":"75,656,980"},{"time_hours":219,"approval_perbill":683581776,"support_perbill":66601515,"approval":68.3581776,"support":6.6601515,"days":10,"dot_needed":"75,533,617"},{"time_hours":220,"approval_perbill":682796458,"support_perbill":66493675,"approval":68.2796458,"support":6.6493675,"days":10,"dot_needed":"75,411,315"},{"time_hours":221,"approval_perbill":682014391,"support_perbill":66386758,"approval":68.2014391,"support":6.6386758,"days":10,"dot_needed":"75,290,059"},{"time_hours":222,"approval_perbill":681235556,"support_perbill":66280753,"approval":68.1235556,"support":6.6280753,"days":10,"dot_needed":"75,169,837"},{"time_hours":223,"approval_perbill":680459933,"support_perbill":66175647,"approval":68.0459933,"support":6.6175647,"days":10,"dot_needed":"75,050,635"},{"time_hours":224,"approval_perbill":679687502,"support_perbill":66071429,"approval":67.9687502,"support":6.6071429,"days":10,"dot_needed":"74,932,440"},{"time_hours":225,"approval_perbill":678918244,"support_perbill":65968088,"approval":67.8918244,"support":6.5968088,"days":10,"dot_needed":"74,815,240"},{"time_hours":226,"approval_perbill":678152139,"support_perbill":65865613,"approval":67.8152139,"support":6.5865613,"days":10,"dot_needed":"74,699,022"},{"time_hours":227,"approval_perbill":677389167,"support_perbill":65763993,"approval":67.7389167,"support":6.5763993,"days":10,"dot_needed":"74,583,773"},{"time_hours":228,"approval_perbill":676629309,"support_perbill":65663217,"approval":67.6629309,"support":6.5663217,"days":10,"dot_needed":"74,469,482"},{"time_hours":229,"approval_perbill":675872547,"support_perbill":65563276,"approval":67.5872547,"support":6.5563276,"days":10,"dot_needed":"74,356,137"},{"time_hours":230,"approval_perbill":675118862,"support_perbill":65464158,"approval":67.5118862,"support":6.5464158,"days":10,"dot_needed":"74,243,726"},{"time_hours":231,"approval_perbill":674368233,"support_perbill":65365854,"approval":67.4368233,"support":6.5365854,"days":10,"dot_needed":"74,132,239"},{"time_hours":232,"approval_perbill":673620645,"support_perbill":65268353,"approval":67.3620645,"support":6.5268353,"days":10,"dot_needed":"74,021,662"},{"time_hours":233,"approval_perbill":672876077,"support_perbill":65171646,"approval":67.2876077,"support":6.5171646,"days":10,"dot_needed":"73,911,985"},{"time_hours":234,"approval_perbill":672134512,"support_perbill":65075723,"approval":67.2134512,"support":6.5075723,"days":10,"dot_needed":"73,803,197"},{"time_hours":235,"approval_perbill":671395931,"support_perbill":64980575,"approval":67.1395931,"support":6.4980575,"days":10,"dot_needed":"73,695,289"},{"time_hours":236,"approval_perbill":670660315,"support_perbill":64886191,"approval":67.0660315,"support":6.4886191,"days":10,"dot_needed":"73,588,247"},{"time_hours":237,"approval_perbill":669927649,"support_perbill":64792564,"approval":66.9927649,"support":6.4792564,"days":10,"dot_needed":"73,482,063"},{"time_hours":238,"approval_perbill":669197914,"support_perbill":64699684,"approval":66.9197914,"support":6.4699684,"days":10,"dot_needed":"73,376,727"},{"time_hours":239,"approval_perbill":668471092,"support_perbill":64607542,"approval":66.8471092,"support":6.4607542,"days":10,"dot_needed":"73,272,227"},{"time_hours":240,"approval_perbill":667747166,"support_perbill":64516129,"approval":66.7747166,"support":6.4516129,"days":10,"dot_needed":"73,168,555"},{"time_hours":241,"approval_perbill":667026119,"support_perbill":64425437,"approval":66.7026119,"support":6.4425437,"days":11,"dot_needed":"73,065,700"},{"time_hours":242,"approval_perbill":666307933,"support_perbill":64335457,"approval":66.6307933,"support":6.4335457,"days":11,"dot_needed":"72,963,652"},{"time_hours":243,"approval_perbill":665592591,"support_perbill":64246181,"approval":66.5592591,"support":6.4246181,"days":11,"dot_needed":"72,862,403"},{"time_hours":244,"approval_perbill":664880077,"support_perbill":64157601,"approval":66.4880077,"support":6.4157601,"days":11,"dot_needed":"72,761,944"},{"time_hours":245,"approval_perbill":664170374,"support_perbill":64069708,"approval":66.4170374,"support":6.4069708,"days":11,"dot_needed":"72,662,263"},{"time_hours":246,"approval_perbill":663463466,"support_perbill":63982495,"approval":66.3463466,"support":6.3982495,"days":11,"dot_needed":"72,563,354"},{"time_hours":247,"approval_perbill":662759335,"support_perbill":63895953,"approval":66.2759335,"support":6.3895953,"days":11,"dot_needed":"72,465,205"},{"time_hours":248,"approval_perbill":662057965,"support_perbill":63810075,"approval":66.2057965,"support":6.3810075,"days":11,"dot_needed":"72,367,810"},{"time_hours":249,"approval_perbill":661359342,"support_perbill":63724854,"approval":66.1359342,"support":6.3724854,"days":11,"dot_needed":"72,271,160"},{"time_hours":250,"approval_perbill":660663447,"support_perbill":63640282,"approval":66.0663447,"support":6.3640282,"days":11,"dot_needed":"72,175,246"},{"time_hours":251,"approval_perbill":659970265,"support_perbill":63556351,"approval":65.9970265,"support":6.3556351,"days":11,"dot_needed":"72,080,058"},{"time_hours":252,"approval_perbill":659279781,"support_perbill":63473054,"approval":65.9279781,"support":6.3473054,"days":11,"dot_needed":"71,985,590"},{"time_hours":253,"approval_perbill":658591978,"support_perbill":63390384,"approval":65.8591978,"support":6.3390384,"days":11,"dot_needed":"71,891,833"},{"time_hours":254,"approval_perbill":657906842,"support_perbill":63308335,"approval":65.7906842,"support":6.3308335,"days":11,"dot_needed":"71,798,780"},{"time_hours":255,"approval_perbill":657224356,"support_perbill":63226898,"approval":65.7224356,"support":6.3226898,"days":11,"dot_needed":"71,706,422"},{"time_hours":256,"approval_perbill":656544505,"support_perbill":63146067,"approval":65.6544505,"support":6.3146067,"days":11,"dot_needed":"71,614,750"},{"time_hours":257,"approval_perbill":655867274,"support_perbill":63065836,"approval":65.5867274,"support":6.3065836,"days":11,"dot_needed":"71,523,759"},{"time_hours":258,"approval_perbill":655192648,"support_perbill":62986198,"approval":65.5192648,"support":6.2986198,"days":11,"dot_needed":"71,433,441"},{"time_hours":259,"approval_perbill":654520613,"support_perbill":62907146,"approval":65.4520613,"support":6.2907146,"days":11,"dot_needed":"71,343,787"},{"time_hours":260,"approval_perbill":653851152,"support_perbill":62828674,"approval":65.3851152,"support":6.2828674,"days":11,"dot_needed":"71,254,791"},{"time_hours":261,"approval_perbill":653184251,"support_perbill":62750776,"approval":65.3184251,"support":6.2750776,"days":11,"dot_needed":"71,166,446"},{"time_hours":262,"approval_perbill":652519896,"support_perbill":62673444,"approval":65.2519896,"support":6.2673444,"days":11,"dot_needed":"71,078,743"},{"time_hours":263,"approval_perbill":651858072,"support_perbill":62596674,"approval":65.1858072,"support":6.2596674,"days":11,"dot_needed":"70,991,677"},{"time_hours":264,"approval_perbill":651198765,"support_perbill":62520458,"approval":65.1198765,"support":6.2520458,"days":11,"dot_needed":"70,905,239"},{"time_hours":265,"approval_perbill":650541960,"support_perbill":62444792,"approval":65.054196,"support":6.2444792,"days":12,"dot_needed":"70,819,425"},{"time_hours":266,"approval_perbill":649887643,"support_perbill":62369668,"approval":64.9887643,"support":6.2369668,"days":12,"dot_needed":"70,734,226"},{"time_hours":267,"approval_perbill":649235800,"support_perbill":62295082,"approval":64.92358,"support":6.2295082,"days":12,"dot_needed":"70,649,637"},{"time_hours":268,"approval_perbill":648586417,"support_perbill":62221027,"approval":64.8586417,"support":6.2221027,"days":12,"dot_needed":"70,565,651"},{"time_hours":269,"approval_perbill":647939479,"support_perbill":62147498,"approval":64.7939479,"support":6.2147498,"days":12,"dot_needed":"70,482,261"},{"time_hours":270,"approval_perbill":647294974,"support_perbill":62074489,"approval":64.7294974,"support":6.2074489,"days":12,"dot_needed":"70,399,460"},{"time_hours":271,"approval_perbill":646652888,"support_perbill":62001995,"approval":64.6652888,"support":6.2001995,"days":12,"dot_needed":"70,317,244"},{"time_hours":272,"approval_perbill":646013207,"support_perbill":61930011,"approval":64.6013207,"support":6.1930011,"days":12,"dot_needed":"70,235,606"},{"time_hours":273,"approval_perbill":645375917,"support_perbill":61858530,"approval":64.5375917,"support":6.185853,"days":12,"dot_needed":"70,154,538"},{"time_hours":274,"approval_perbill":644741005,"support_perbill":61787548,"approval":64.4741005,"support":6.1787548,"days":12,"dot_needed":"70,074,037"},{"time_hours":275,"approval_perbill":644108458,"support_perbill":61717059,"approval":64.4108458,"support":6.1717059,"days":12,"dot_needed":"69,994,094"},{"time_hours":276,"approval_perbill":643478263,"support_perbill":61647059,"approval":64.3478263,"support":6.1647059,"days":12,"dot_needed":"69,914,706"},{"time_hours":277,"approval_perbill":642850406,"support_perbill":61577542,"approval":64.2850406,"support":6.1577542,"days":12,"dot_needed":"69,835,866"},{"time_hours":278,"approval_perbill":642224875,"support_perbill":61508503,"approval":64.2224875,"support":6.1508503,"days":12,"dot_needed":"69,757,568"},{"time_hours":279,"approval_perbill":641601656,"support_perbill":61439938,"approval":64.1601656,"support":6.1439938,"days":12,"dot_needed":"69,679,808"},{"time_hours":280,"approval_perbill":640980738,"support_perbill":61371841,"approval":64.0980738,"support":6.1371841,"days":12,"dot_needed":"69,602,578"},{"time_hours":281,"approval_perbill":640362106,"support_perbill":61304208,"approval":64.0362106,"support":6.1304208,"days":12,"dot_needed":"69,525,875"},{"time_hours":282,"approval_perbill":639745749,"support_perbill":61237034,"approval":63.9745749,"support":6.1237034,"days":12,"dot_needed":"69,449,692"},{"time_hours":283,"approval_perbill":639131654,"support_perbill":61170314,"approval":63.9131654,"support":6.1170314,"days":12,"dot_needed":"69,374,024"},{"time_hours":284,"approval_perbill":638519808,"support_perbill":61104045,"approval":63.8519808,"support":6.1104045,"days":12,"dot_needed":"69,298,867"},{"time_hours":285,"approval_perbill":637910200,"support_perbill":61038220,"approval":63.79102,"support":6.103822,"days":12,"dot_needed":"69,224,214"},{"time_hours":286,"approval_perbill":637302817,"support_perbill":60972836,"approval":63.7302817,"support":6.0972836,"days":12,"dot_needed":"69,150,062"},{"time_hours":287,"approval_perbill":636697646,"support_perbill":60907889,"approval":63.6697646,"support":6.0907889,"days":12,"dot_needed":"69,076,404"},{"time_hours":288,"approval_perbill":636094677,"support_perbill":60843373,"approval":63.6094677,"support":6.0843373,"days":12,"dot_needed":"69,003,236"},{"time_hours":289,"approval_perbill":635493896,"support_perbill":60779286,"approval":63.5493896,"support":6.0779286,"days":13,"dot_needed":"68,930,554"},{"time_hours":290,"approval_perbill":634895291,"support_perbill":60715621,"approval":63.4895291,"support":6.0715621,"days":13,"dot_needed":"68,858,351"},{"time_hours":291,"approval_perbill":634298853,"support_perbill":60652376,"approval":63.4298853,"support":6.0652376,"days":13,"dot_needed":"68,786,624"},{"time_hours":292,"approval_perbill":633704567,"support_perbill":60589547,"approval":63.3704567,"support":6.0589547,"days":13,"dot_needed":"68,715,369"},{"time_hours":293,"approval_perbill":633112423,"support_perbill":60527128,"approval":63.3112423,"support":6.0527128,"days":13,"dot_needed":"68,644,579"},{"time_hours":294,"approval_perbill":632522409,"support_perbill":60465116,"approval":63.2522409,"support":6.0465116,"days":13,"dot_needed":"68,574,250"},{"time_hours":295,"approval_perbill":631934514,"support_perbill":60403508,"approval":63.1934514,"support":6.0403508,"days":13,"dot_needed":"68,504,380"},{"time_hours":296,"approval_perbill":631348726,"support_perbill":60342298,"approval":63.1348726,"support":6.0342298,"days":13,"dot_needed":"68,434,960"},{"time_hours":297,"approval_perbill":630765034,"support_perbill":60281484,"approval":63.0765034,"support":6.0281484,"days":13,"dot_needed":"68,365,991"},{"time_hours":298,"approval_perbill":630183427,"support_perbill":60221061,"approval":63.0183427,"support":6.0221061,"days":13,"dot_needed":"68,297,464"},{"time_hours":299,"approval_perbill":629603893,"support_perbill":60161026,"approval":62.9603893,"support":6.0161026,"days":13,"dot_needed":"68,229,378"},{"time_hours":300,"approval_perbill":629026422,"support_perbill":60101376,"approval":62.9026422,"support":6.0101376,"days":13,"dot_needed":"68,161,728"},{"time_hours":301,"approval_perbill":628451003,"support_perbill":60042105,"approval":62.8451003,"support":6.0042105,"days":13,"dot_needed":"68,094,508"},{"time_hours":302,"approval_perbill":627877624,"support_perbill":59983211,"approval":62.7877624,"support":5.9983211,"days":13,"dot_needed":"68,027,715"},{"time_hours":303,"approval_perbill":627306275,"support_perbill":59924690,"approval":62.7306275,"support":5.992469,"days":13,"dot_needed":"67,961,346"},{"time_hours":304,"approval_perbill":626736945,"support_perbill":59866539,"approval":62.6736945,"support":5.9866539,"days":13,"dot_needed":"67,895,396"},{"time_hours":305,"approval_perbill":626169623,"support_perbill":59808754,"approval":62.6169623,"support":5.9808754,"days":13,"dot_needed":"67,829,862"},{"time_hours":306,"approval_perbill":625604299,"support_perbill":59751332,"approval":62.5604299,"support":5.9751332,"days":13,"dot_needed":"67,764,738"},{"time_hours":307,"approval_perbill":625040962,"support_perbill":59694269,"approval":62.5040962,"support":5.9694269,"days":13,"dot_needed":"67,700,023"},{"time_hours":308,"approval_perbill":624479602,"support_perbill":59637562,"approval":62.4479602,"support":5.9637562,"days":13,"dot_needed":"67,635,710"},{"time_hours":309,"approval_perbill":623920209,"support_perbill":59581207,"approval":62.3920209,"support":5.9581207,"days":13,"dot_needed":"67,571,798"},{"time_hours":310,"approval_perbill":623362771,"support_perbill":59525201,"approval":62.3362771,"support":5.9525201,"days":13,"dot_needed":"67,508,280"},{"time_hours":311,"approval_perbill":622807279,"support_perbill":59469542,"approval":62.2807279,"support":5.9469542,"days":13,"dot_needed":"67,445,157"},{"time_hours":312,"approval_perbill":622253723,"support_perbill":59414226,"approval":62.2253723,"support":5.9414226,"days":13,"dot_needed":"67,382,422"},{"time_hours":313,"approval_perbill":621702092,"support_perbill":59359249,"approval":62.1702092,"support":5.9359249,"days":14,"dot_needed":"67,320,072"},{"time_hours":314,"approval_perbill":621152377,"support_perbill":59304609,"approval":62.1152377,"support":5.9304609,"days":14,"dot_needed":"67,258,104"},{"time_hours":315,"approval_perbill":620604567,"support_perbill":59250302,"approval":62.0604567,"support":5.9250302,"days":14,"dot_needed":"67,196,514"},{"time_hours":316,"approval_perbill":620058653,"support_perbill":59196326,"approval":62.0058653,"support":5.9196326,"days":14,"dot_needed":"67,135,299"},{"time_hours":317,"approval_perbill":619514625,"support_perbill":59142677,"approval":61.9514625,"support":5.9142677,"days":14,"dot_needed":"67,074,455"},{"time_hours":318,"approval_perbill":618972473,"support_perbill":59089353,"approval":61.8972473,"support":5.9089353,"days":14,"dot_needed":"67,013,980"},{"time_hours":319,"approval_perbill":618432187,"support_perbill":59036350,"approval":61.8432187,"support":5.903635,"days":14,"dot_needed":"66,953,868"},{"time_hours":320,"approval_perbill":617893758,"support_perbill":58983666,"approval":61.7893758,"support":5.8983666,"days":14,"dot_needed":"66,894,119"},{"time_hours":321,"approval_perbill":617357176,"support_perbill":58931297,"approval":61.7357176,"support":5.8931297,"days":14,"dot_needed":"66,834,726"},{"time_hours":322,"approval_perbill":616822432,"support_perbill":58879242,"approval":61.6822432,"support":5.8879242,"days":14,"dot_needed":"66,775,690"},{"time_hours":323,"approval_perbill":616289516,"support_perbill":58827497,"approval":61.6289516,"support":5.8827497,"days":14,"dot_needed":"66,717,006"},{"time_hours":324,"approval_perbill":615758419,"support_perbill":58776059,"approval":61.5758419,"support":5.8776059,"days":14,"dot_needed":"66,658,669"},{"time_hours":325,"approval_perbill":615229132,"support_perbill":58724926,"approval":61.5229132,"support":5.8724926,"days":14,"dot_needed":"66,600,679"},{"time_hours":326,"approval_perbill":614701645,"support_perbill":58674094,"approval":61.4701645,"support":5.8674094,"days":14,"dot_needed":"66,543,029"},{"time_hours":327,"approval_perbill":614175949,"support_perbill":58623562,"approval":61.4175949,"support":5.8623562,"days":14,"dot_needed":"66,485,720"},{"time_hours":328,"approval_perbill":613652036,"support_perbill":58573327,"approval":61.3652036,"support":5.8573327,"days":14,"dot_needed":"66,428,748"},{"time_hours":329,"approval_perbill":613129895,"support_perbill":58523386,"approval":61.3129895,"support":5.8523386,"days":14,"dot_needed":"66,372,109"},{"time_hours":330,"approval_perbill":612609519,"support_perbill":58473736,"approval":61.2609519,"support":5.8473736,"days":14,"dot_needed":"66,315,801"},{"time_hours":331,"approval_perbill":612090898,"support_perbill":58424375,"approval":61.2090898,"support":5.8424375,"days":14,"dot_needed":"66,259,820"},{"time_hours":332,"approval_perbill":611574023,"support_perbill":58375301,"approval":61.1574023,"support":5.8375301,"days":14,"dot_needed":"66,204,164"},{"time_hours":333,"approval_perbill":611058885,"support_perbill":58326510,"approval":61.1058885,"support":5.832651,"days":14,"dot_needed":"66,148,830"},{"time_hours":334,"approval_perbill":610545477,"support_perbill":58278001,"approval":61.0545477,"support":5.8278001,"days":14,"dot_needed":"66,093,815"},{"time_hours":335,"approval_perbill":610033788,"support_perbill":58229771,"approval":61.0033788,"support":5.8229771,"days":14,"dot_needed":"66,039,117"},{"time_hours":336,"approval_perbill":609523811,"support_perbill":58181818,"approval":60.9523811,"support":5.8181818,"days":14,"dot_needed":"65,984,733"},{"time_hours":337,"approval_perbill":609015537,"support_perbill":58134139,"approval":60.9015537,"support":5.8134139,"days":15,"dot_needed":"65,930,660"},{"time_hours":338,"approval_perbill":608508957,"support_perbill":58086732,"approval":60.8508957,"support":5.8086732,"days":15,"dot_needed":"65,876,895"},{"time_hours":339,"approval_perbill":608004063,"support_perbill":58039594,"approval":60.8004063,"support":5.8039594,"days":15,"dot_needed":"65,823,435"},{"time_hours":340,"approval_perbill":607500846,"support_perbill":57992724,"approval":60.7500846,"support":5.7992724,"days":15,"dot_needed":"65,770,279"},{"time_hours":341,"approval_perbill":606999299,"support_perbill":57946119,"approval":60.6999299,"support":5.7946119,"days":15,"dot_needed":"65,717,424"},{"time_hours":342,"approval_perbill":606499412,"support_perbill":57899776,"approval":60.6499412,"support":5.7899776,"days":15,"dot_needed":"65,664,865"},{"time_hours":343,"approval_perbill":606001178,"support_perbill":57853694,"approval":60.6001178,"support":5.7853694,"days":15,"dot_needed":"65,612,603"},{"time_hours":344,"approval_perbill":605504589,"support_perbill":57807871,"approval":60.5504589,"support":5.7807871,"days":15,"dot_needed":"65,560,635"},{"time_hours":345,"approval_perbill":605009635,"support_perbill":57762304,"approval":60.5009635,"support":5.7762304,"days":15,"dot_needed":"65,508,957"},{"time_hours":346,"approval_perbill":604516310,"support_perbill":57716991,"approval":60.451631,"support":5.7716991,"days":15,"dot_needed":"65,457,567"},{"time_hours":347,"approval_perbill":604024606,"support_perbill":57671930,"approval":60.4024606,"support":5.767193,"days":15,"dot_needed":"65,406,462"},{"time_hours":348,"approval_perbill":603534513,"support_perbill":57627118,"approval":60.3534513,"support":5.7627118,"days":15,"dot_needed":"65,355,641"},{"time_hours":349,"approval_perbill":603046025,"support_perbill":57582555,"approval":60.3046025,"support":5.7582555,"days":15,"dot_needed":"65,305,101"},{"time_hours":350,"approval_perbill":602559133,"support_perbill":57538237,"approval":60.2559133,"support":5.7538237,"days":15,"dot_needed":"65,254,840"},{"time_hours":351,"approval_perbill":602073830,"support_perbill":57494163,"approval":60.207383,"support":5.7494163,"days":15,"dot_needed":"65,204,855"},{"time_hours":352,"approval_perbill":601590108,"support_perbill":57450331,"approval":60.1590108,"support":5.7450331,"days":15,"dot_needed":"65,155,144"},{"time_hours":353,"approval_perbill":601107958,"support_perbill":57406738,"approval":60.1107958,"support":5.7406738,"days":15,"dot_needed":"65,105,705"},{"time_hours":354,"approval_perbill":600627375,"support_perbill":57363383,"approval":60.0627375,"support":5.7363383,"days":15,"dot_needed":"65,056,535"},{"time_hours":355,"approval_perbill":600148349,"support_perbill":57320264,"approval":60.0148349,"support":5.7320264,"days":15,"dot_needed":"65,007,634"},{"time_hours":356,"approval_perbill":599670874,"support_perbill":57277379,"approval":59.9670874,"support":5.7277379,"days":15,"dot_needed":"64,958,997"},{"time_hours":357,"approval_perbill":599194941,"support_perbill":57234726,"approval":59.9194941,"support":5.7234726,"days":15,"dot_needed":"64,910,624"},{"time_hours":358,"approval_perbill":598720544,"support_perbill":57192303,"approval":59.8720544,"support":5.7192303,"days":15,"dot_needed":"64,862,511"},{"time_hours":359,"approval_perbill":598247675,"support_perbill":57150109,"approval":59.8247675,"support":5.7150109,"days":15,"dot_needed":"64,814,659"},{"time_hours":360,"approval_perbill":597776326,"support_perbill":57108141,"approval":59.7776326,"support":5.7108141,"days":15,"dot_needed":"64,767,062"},{"time_hours":361,"approval_perbill":597306490,"support_perbill":57066397,"approval":59.730649,"support":5.7066397,"days":16,"dot_needed":"64,719,720"},{"time_hours":362,"approval_perbill":596838161,"support_perbill":57024876,"approval":59.6838161,"support":5.7024876,"days":16,"dot_needed":"64,672,630"},{"time_hours":363,"approval_perbill":596371330,"support_perbill":56983577,"approval":59.637133,"support":5.6983577,"days":16,"dot_needed":"64,625,793"},{"time_hours":364,"approval_perbill":595905991,"support_perbill":56942496,"approval":59.5905991,"support":5.6942496,"days":16,"dot_needed":"64,579,202"},{"time_hours":365,"approval_perbill":595442136,"support_perbill":56901633,"approval":59.5442136,"support":5.6901633,"days":16,"dot_needed":"64,532,859"},{"time_hours":366,"approval_perbill":594979758,"support_perbill":56860986,"approval":59.4979758,"support":5.6860986,"days":16,"dot_needed":"64,486,761"},{"time_hours":367,"approval_perbill":594518851,"support_perbill":56820553,"approval":59.4518851,"support":5.6820553,"days":16,"dot_needed":"64,440,905"},{"time_hours":368,"approval_perbill":594059407,"support_perbill":56780333,"approval":59.4059407,"support":5.6780333,"days":16,"dot_needed":"64,395,291"},{"time_hours":369,"approval_perbill":593601420,"support_perbill":56740323,"approval":59.360142,"support":5.6740323,"days":16,"dot_needed":"64,349,915"},{"time_hours":370,"approval_perbill":593144881,"support_perbill":56700522,"approval":59.3144881,"support":5.6700522,"days":16,"dot_needed":"64,304,776"},{"time_hours":371,"approval_perbill":592689786,"support_perbill":56660929,"approval":59.2689786,"support":5.6660929,"days":16,"dot_needed":"64,259,874"},{"time_hours":372,"approval_perbill":592236126,"support_perbill":56621542,"approval":59.2236126,"support":5.6621542,"days":16,"dot_needed":"64,215,204"},{"time_hours":373,"approval_perbill":591783895,"support_perbill":56582359,"approval":59.1783895,"support":5.6582359,"days":16,"dot_needed":"64,170,766"},{"time_hours":374,"approval_perbill":591333086,"support_perbill":56543378,"approval":59.1333086,"support":5.6543378,"days":16,"dot_needed":"64,126,557"},{"time_hours":375,"approval_perbill":590883692,"support_perbill":56504599,"approval":59.0883692,"support":5.6504599,"days":16,"dot_needed":"64,082,578"},{"time_hours":376,"approval_perbill":590435708,"support_perbill":56466019,"approval":59.0435708,"support":5.6466019,"days":16,"dot_needed":"64,038,824"},{"time_hours":377,"approval_perbill":589989126,"support_perbill":56427637,"approval":58.9989126,"support":5.6427637,"days":16,"dot_needed":"63,995,294"},{"time_hours":378,"approval_perbill":589543939,"support_perbill":56389452,"approval":58.9543939,"support":5.6389452,"days":16,"dot_needed":"63,951,988"},{"time_hours":379,"approval_perbill":589100141,"support_perbill":56351462,"approval":58.9100141,"support":5.6351462,"days":16,"dot_needed":"63,908,903"},{"time_hours":380,"approval_perbill":588657726,"support_perbill":56313665,"approval":58.8657726,"support":5.6313665,"days":16,"dot_needed":"63,866,037"},{"time_hours":381,"approval_perbill":588216688,"support_perbill":56276060,"approval":58.8216688,"support":5.627606,"days":16,"dot_needed":"63,823,389"},{"time_hours":382,"approval_perbill":587777019,"support_perbill":56238646,"approval":58.7777019,"support":5.6238646,"days":16,"dot_needed":"63,780,957"},{"time_hours":383,"approval_perbill":587338713,"support_perbill":56201421,"approval":58.7338713,"support":5.6201421,"days":16,"dot_needed":"63,738,740"},{"time_hours":384,"approval_perbill":586901764,"support_perbill":56164383,"approval":58.6901764,"support":5.6164383,"days":16,"dot_needed":"63,696,734"},{"time_hours":385,"approval_perbill":586466167,"support_perbill":56127532,"approval":58.6466167,"support":5.6127532,"days":17,"dot_needed":"63,654,941"},{"time_hours":386,"approval_perbill":586031913,"support_perbill":56090866,"approval":58.6031913,"support":5.6090866,"days":17,"dot_needed":"63,613,358"},{"time_hours":387,"approval_perbill":585598998,"support_perbill":56054383,"approval":58.5598998,"support":5.6054383,"days":17,"dot_needed":"63,571,982"},{"time_hours":388,"approval_perbill":585167415,"support_perbill":56018082,"approval":58.5167415,"support":5.6018082,"days":17,"dot_needed":"63,530,813"},{"time_hours":389,"approval_perbill":584737159,"support_perbill":55981962,"approval":58.4737159,"support":5.5981962,"days":17,"dot_needed":"63,489,848"},{"time_hours":390,"approval_perbill":584308222,"support_perbill":55946021,"approval":58.4308222,"support":5.5946021,"days":17,"dot_needed":"63,449,087"},{"time_hours":391,"approval_perbill":583880598,"support_perbill":55910259,"approval":58.3880598,"support":5.5910259,"days":17,"dot_needed":"63,408,529"},{"time_hours":392,"approval_perbill":583454283,"support_perbill":55874673,"approval":58.3454283,"support":5.5874673,"days":17,"dot_needed":"63,368,171"},{"time_hours":393,"approval_perbill":583029269,"support_perbill":55839263,"approval":58.3029269,"support":5.5839263,"days":17,"dot_needed":"63,328,012"},{"time_hours":394,"approval_perbill":582605551,"support_perbill":55804027,"approval":58.2605551,"support":5.5804027,"days":17,"dot_needed":"63,288,050"},{"time_hours":395,"approval_perbill":582183123,"support_perbill":55768963,"approval":58.2183123,"support":5.5768963,"days":17,"dot_needed":"63,248,284"},{"time_hours":396,"approval_perbill":581761979,"support_perbill":55734072,"approval":58.1761979,"support":5.5734072,"days":17,"dot_needed":"63,208,713"},{"time_hours":397,"approval_perbill":581342114,"support_perbill":55699350,"approval":58.1342114,"support":5.569935,"days":17,"dot_needed":"63,169,335"},{"time_hours":398,"approval_perbill":580923521,"support_perbill":55664798,"approval":58.0923521,"support":5.5664798,"days":17,"dot_needed":"63,130,149"},{"time_hours":399,"approval_perbill":580506194,"support_perbill":55630413,"approval":58.0506194,"support":5.5630413,"days":17,"dot_needed":"63,091,152"},{"time_hours":400,"approval_perbill":580090128,"support_perbill":55596196,"approval":58.0090128,"support":5.5596196,"days":17,"dot_needed":"63,052,346"},{"time_hours":401,"approval_perbill":579675317,"support_perbill":55562143,"approval":57.9675317,"support":5.5562143,"days":17,"dot_needed":"63,013,726"},{"time_hours":402,"approval_perbill":579261756,"support_perbill":55528255,"approval":57.9261756,"support":5.5528255,"days":17,"dot_needed":"62,975,294"},{"time_hours":403,"approval_perbill":578849439,"support_perbill":55494530,"approval":57.8849439,"support":5.549453,"days":17,"dot_needed":"62,937,046"},{"time_hours":404,"approval_perbill":578438360,"support_perbill":55460967,"approval":57.843836,"support":5.5460967,"days":17,"dot_needed":"62,898,981"},{"time_hours":405,"approval_perbill":578028514,"support_perbill":55427564,"approval":57.8028514,"support":5.5427564,"days":17,"dot_needed":"62,861,099"},{"time_hours":406,"approval_perbill":577619895,"support_perbill":55394321,"approval":57.7619895,"support":5.5394321,"days":17,"dot_needed":"62,823,397"},{"time_hours":407,"approval_perbill":577212497,"support_perbill":55361237,"approval":57.7212497,"support":5.5361237,"days":17,"dot_needed":"62,785,876"},{"time_hours":408,"approval_perbill":576806315,"support_perbill":55328309,"approval":57.6806315,"support":5.5328309,"days":17,"dot_needed":"62,748,532"},{"time_hours":409,"approval_perbill":576401345,"support_perbill":55295538,"approval":57.6401345,"support":5.5295538,"days":18,"dot_needed":"62,711,366"},{"time_hours":410,"approval_perbill":575997580,"support_perbill":55262922,"approval":57.599758,"support":5.5262922,"days":18,"dot_needed":"62,674,376"},{"time_hours":411,"approval_perbill":575595014,"support_perbill":55230460,"approval":57.5595014,"support":5.523046,"days":18,"dot_needed":"62,637,561"},{"time_hours":412,"approval_perbill":575193643,"support_perbill":55198151,"approval":57.5193643,"support":5.5198151,"days":18,"dot_needed":"62,600,919"},{"time_hours":413,"approval_perbill":574793462,"support_perbill":55165994,"approval":57.4793462,"support":5.5165994,"days":18,"dot_needed":"62,564,449"},{"time_hours":414,"approval_perbill":574394465,"support_perbill":55133987,"approval":57.4394465,"support":5.5133987,"days":18,"dot_needed":"62,528,149"},{"time_hours":415,"approval_perbill":573996646,"support_perbill":55102130,"approval":57.3996646,"support":5.510213,"days":18,"dot_needed":"62,492,020"},{"time_hours":416,"approval_perbill":573600001,"support_perbill":55070422,"approval":57.3600001,"support":5.5070422,"days":18,"dot_needed":"62,456,059"},{"time_hours":417,"approval_perbill":573204524,"support_perbill":55038861,"approval":57.3204524,"support":5.5038861,"days":18,"dot_needed":"62,420,266"},{"time_hours":418,"approval_perbill":572810211,"support_perbill":55007447,"approval":57.2810211,"support":5.5007447,"days":18,"dot_needed":"62,384,639"},{"time_hours":419,"approval_perbill":572417056,"support_perbill":54976178,"approval":57.2417056,"support":5.4976178,"days":18,"dot_needed":"62,349,176"},{"time_hours":420,"approval_perbill":572025053,"support_perbill":54945054,"approval":57.2025053,"support":5.4945054,"days":18,"dot_needed":"62,313,878"},{"time_hours":421,"approval_perbill":571634199,"support_perbill":54914074,"approval":57.1634199,"support":5.4914074,"days":18,"dot_needed":"62,278,743"},{"time_hours":422,"approval_perbill":571244487,"support_perbill":54883236,"approval":57.1244487,"support":5.4883236,"days":18,"dot_needed":"62,243,769"},{"time_hours":423,"approval_perbill":570855914,"support_perbill":54852539,"approval":57.0855914,"support":5.4852539,"days":18,"dot_needed":"62,208,956"},{"time_hours":424,"approval_perbill":570468473,"support_perbill":54821984,"approval":57.0468473,"support":5.4821984,"days":18,"dot_needed":"62,174,303"},{"time_hours":425,"approval_perbill":570082160,"support_perbill":54791567,"approval":57.008216,"support":5.4791567,"days":18,"dot_needed":"62,139,807"},{"time_hours":426,"approval_perbill":569696971,"support_perbill":54761290,"approval":56.9696971,"support":5.476129,"days":18,"dot_needed":"62,105,469"},{"time_hours":427,"approval_perbill":569312899,"support_perbill":54731150,"approval":56.9312899,"support":5.473115,"days":18,"dot_needed":"62,071,287"},{"time_hours":428,"approval_perbill":568929941,"support_perbill":54701147,"approval":56.8929941,"support":5.4701147,"days":18,"dot_needed":"62,037,260"},{"time_hours":429,"approval_perbill":568548091,"support_perbill":54671280,"approval":56.8548091,"support":5.467128,"days":18,"dot_needed":"62,003,388"},{"time_hours":430,"approval_perbill":568167345,"support_perbill":54641547,"approval":56.8167345,"support":5.4641547,"days":18,"dot_needed":"61,969,667"},{"time_hours":431,"approval_perbill":567787698,"support_perbill":54611949,"approval":56.7787698,"support":5.4611949,"days":18,"dot_needed":"61,936,099"},{"time_hours":432,"approval_perbill":567409145,"support_perbill":54582484,"approval":56.7409145,"support":5.4582484,"days":18,"dot_needed":"61,902,683"},{"time_hours":433,"approval_perbill":567031681,"support_perbill":54553151,"approval":56.7031681,"support":5.4553151,"days":19,"dot_needed":"61,869,416"},{"time_hours":434,"approval_perbill":566655303,"support_perbill":54523950,"approval":56.6655303,"support":5.452395,"days":19,"dot_needed":"61,836,299"},{"time_hours":435,"approval_perbill":566280004,"support_perbill":54494879,"approval":56.6280004,"support":5.4494879,"days":19,"dot_needed":"61,803,329"},{"time_hours":436,"approval_perbill":565905780,"support_perbill":54465937,"approval":56.590578,"support":5.4465937,"days":19,"dot_needed":"61,770,505"},{"time_hours":437,"approval_perbill":565532628,"support_perbill":54437124,"approval":56.5532628,"support":5.4437124,"days":19,"dot_needed":"61,737,828"},{"time_hours":438,"approval_perbill":565160541,"support_perbill":54408440,"approval":56.5160541,"support":5.440844,"days":19,"dot_needed":"61,705,297"},{"time_hours":439,"approval_perbill":564789516,"support_perbill":54379882,"approval":56.4789516,"support":5.4379882,"days":19,"dot_needed":"61,672,909"},{"time_hours":440,"approval_perbill":564419549,"support_perbill":54351450,"approval":56.4419549,"support":5.435145,"days":19,"dot_needed":"61,640,664"},{"time_hours":441,"approval_perbill":564050634,"support_perbill":54323144,"approval":56.4050634,"support":5.4323144,"days":19,"dot_needed":"61,608,562"},{"time_hours":442,"approval_perbill":563682767,"support_perbill":54294962,"approval":56.3682767,"support":5.4294962,"days":19,"dot_needed":"61,576,601"},{"time_hours":443,"approval_perbill":563315943,"support_perbill":54266903,"approval":56.3315943,"support":5.4266903,"days":19,"dot_needed":"61,544,778"},{"time_hours":444,"approval_perbill":562950159,"support_perbill":54238968,"approval":56.2950159,"support":5.4238968,"days":19,"dot_needed":"61,513,097"},{"time_hours":445,"approval_perbill":562585410,"support_perbill":54211155,"approval":56.258541,"support":5.4211155,"days":19,"dot_needed":"61,481,554"},{"time_hours":446,"approval_perbill":562221691,"support_perbill":54183463,"approval":56.2221691,"support":5.4183463,"days":19,"dot_needed":"61,450,148"},{"time_hours":447,"approval_perbill":561858998,"support_perbill":54155892,"approval":56.1858998,"support":5.4155892,"days":19,"dot_needed":"61,418,879"},{"time_hours":448,"approval_perbill":561497327,"support_perbill":54128440,"approval":56.1497327,"support":5.412844,"days":19,"dot_needed":"61,387,746"},{"time_hours":449,"approval_perbill":561136673,"support_perbill":54101107,"approval":56.1136673,"support":5.4101107,"days":19,"dot_needed":"61,356,747"},{"time_hours":450,"approval_perbill":560777032,"support_perbill":54073892,"approval":56.0777032,"support":5.4073892,"days":19,"dot_needed":"61,325,882"},{"time_hours":451,"approval_perbill":560418401,"support_perbill":54046795,"approval":56.0418401,"support":5.4046795,"days":19,"dot_needed":"61,295,151"},{"time_hours":452,"approval_perbill":560060774,"support_perbill":54019814,"approval":56.0060774,"support":5.4019814,"days":19,"dot_needed":"61,264,552"},{"time_hours":453,"approval_perbill":559704147,"support_perbill":53992949,"approval":55.9704147,"support":5.3992949,"days":19,"dot_needed":"61,234,084"},{"time_hours":454,"approval_perbill":559348516,"support_perbill":53966200,"approval":55.9348516,"support":5.39662,"days":19,"dot_needed":"61,203,747"},{"time_hours":455,"approval_perbill":558993878,"support_perbill":53939564,"approval":55.8993878,"support":5.3939564,"days":19,"dot_needed":"61,173,539"},{"time_hours":456,"approval_perbill":558640227,"support_perbill":53913043,"approval":55.8640227,"support":5.3913043,"days":19,"dot_needed":"61,143,461"},{"time_hours":457,"approval_perbill":558287561,"support_perbill":53886634,"approval":55.8287561,"support":5.3886634,"days":20,"dot_needed":"61,113,511"},{"time_hours":458,"approval_perbill":557935873,"support_perbill":53860338,"approval":55.7935873,"support":5.3860338,"days":20,"dot_needed":"61,083,688"},{"time_hours":459,"approval_perbill":557585162,"support_perbill":53834153,"approval":55.7585162,"support":5.3834153,"days":20,"dot_needed":"61,053,991"},{"time_hours":460,"approval_perbill":557235422,"support_perbill":53808079,"approval":55.7235422,"support":5.3808079,"days":20,"dot_needed":"61,024,420"},{"time_hours":461,"approval_perbill":556886649,"support_perbill":53782114,"approval":55.6886649,"support":5.3782114,"days":20,"dot_needed":"60,994,973"},{"time_hours":462,"approval_perbill":556538840,"support_perbill":53756260,"approval":55.653884,"support":5.375626,"days":20,"dot_needed":"60,965,652"},{"time_hours":463,"approval_perbill":556191991,"support_perbill":53730514,"approval":55.6191991,"support":5.3730514,"days":20,"dot_needed":"60,936,453"},{"time_hours":464,"approval_perbill":555846097,"support_perbill":53704876,"approval":55.5846097,"support":5.3704876,"days":20,"dot_needed":"60,907,377"},{"time_hours":465,"approval_perbill":555501155,"support_perbill":53679345,"approval":55.5501155,"support":5.3679345,"days":20,"dot_needed":"60,878,422"},{"time_hours":466,"approval_perbill":555157160,"support_perbill":53653921,"approval":55.515716,"support":5.3653921,"days":20,"dot_needed":"60,849,588"},{"time_hours":467,"approval_perbill":554814109,"support_perbill":53628603,"approval":55.4814109,"support":5.3628603,"days":20,"dot_needed":"60,820,874"},{"time_hours":468,"approval_perbill":554471998,"support_perbill":53603391,"approval":55.4471998,"support":5.3603391,"days":20,"dot_needed":"60,792,281"},{"time_hours":469,"approval_perbill":554130824,"support_perbill":53578283,"approval":55.4130824,"support":5.3578283,"days":20,"dot_needed":"60,763,806"},{"time_hours":470,"approval_perbill":553790581,"support_perbill":53553279,"approval":55.3790581,"support":5.3553279,"days":20,"dot_needed":"60,735,448"},{"time_hours":471,"approval_perbill":553451267,"support_perbill":53528379,"approval":55.3451267,"support":5.3528379,"days":20,"dot_needed":"60,707,209"},{"time_hours":472,"approval_perbill":553112877,"support_perbill":53503581,"approval":55.3112877,"support":5.3503581,"days":20,"dot_needed":"60,679,085"},{"time_hours":473,"approval_perbill":552775408,"support_perbill":53478885,"approval":55.2775408,"support":5.3478885,"days":20,"dot_needed":"60,651,077"},{"time_hours":474,"approval_perbill":552438856,"support_perbill":53454291,"approval":55.2438856,"support":5.3454291,"days":20,"dot_needed":"60,623,185"},{"time_hours":475,"approval_perbill":552103218,"support_perbill":53429798,"approval":55.2103218,"support":5.3429798,"days":20,"dot_needed":"60,595,407"},{"time_hours":476,"approval_perbill":551768489,"support_perbill":53405405,"approval":55.1768489,"support":5.3405405,"days":20,"dot_needed":"60,567,743"},{"time_hours":477,"approval_perbill":551434666,"support_perbill":53381111,"approval":55.1434666,"support":5.3381111,"days":20,"dot_needed":"60,540,191"},{"time_hours":478,"approval_perbill":551101746,"support_perbill":53356917,"approval":55.1101746,"support":5.3356917,"days":20,"dot_needed":"60,512,752"},{"time_hours":479,"approval_perbill":550769724,"support_perbill":53332821,"approval":55.0769724,"support":5.3332821,"days":20,"dot_needed":"60,485,424"},{"time_hours":480,"approval_perbill":550438597,"support_perbill":53308823,"approval":55.0438597,"support":5.3308823,"days":20,"dot_needed":"60,458,208"},{"time_hours":481,"approval_perbill":550108361,"support_perbill":53284922,"approval":55.0108361,"support":5.3284922,"days":21,"dot_needed":"60,431,101"},{"time_hours":482,"approval_perbill":549779014,"support_perbill":53261118,"approval":54.9779014,"support":5.3261118,"days":21,"dot_needed":"60,404,105"},{"time_hours":483,"approval_perbill":549450550,"support_perbill":53237409,"approval":54.945055,"support":5.3237409,"days":21,"dot_needed":"60,377,216"},{"time_hours":484,"approval_perbill":549122967,"support_perbill":53213797,"approval":54.9122967,"support":5.3213797,"days":21,"dot_needed":"60,350,438"},{"time_hours":485,"approval_perbill":548796261,"support_perbill":53190279,"approval":54.8796261,"support":5.3190279,"days":21,"dot_needed":"60,323,766"},{"time_hours":486,"approval_perbill":548470429,"support_perbill":53166855,"approval":54.8470429,"support":5.3166855,"days":21,"dot_needed":"60,297,200"},{"time_hours":487,"approval_perbill":548145467,"support_perbill":53143525,"approval":54.8145467,"support":5.3143525,"days":21,"dot_needed":"60,270,741"},{"time_hours":488,"approval_perbill":547821371,"support_perbill":53120289,"approval":54.7821371,"support":5.3120289,"days":21,"dot_needed":"60,244,389"},{"time_hours":489,"approval_perbill":547498138,"support_perbill":53097145,"approval":54.7498138,"support":5.3097145,"days":21,"dot_needed":"60,218,141"},{"time_hours":490,"approval_perbill":547175766,"support_perbill":53074093,"approval":54.7175766,"support":5.3074093,"days":21,"dot_needed":"60,191,998"},{"time_hours":491,"approval_perbill":546854249,"support_perbill":53051133,"approval":54.6854249,"support":5.3051133,"days":21,"dot_needed":"60,165,958"},{"time_hours":492,"approval_perbill":546533585,"support_perbill":53028263,"approval":54.6533585,"support":5.3028263,"days":21,"dot_needed":"60,140,021"},{"time_hours":493,"approval_perbill":546213771,"support_perbill":53005484,"approval":54.6213771,"support":5.3005484,"days":21,"dot_needed":"60,114,187"},{"time_hours":494,"approval_perbill":545894803,"support_perbill":52982795,"approval":54.5894803,"support":5.2982795,"days":21,"dot_needed":"60,088,455"},{"time_hours":495,"approval_perbill":545576678,"support_perbill":52960196,"approval":54.5576678,"support":5.2960196,"days":21,"dot_needed":"60,062,826"},{"time_hours":496,"approval_perbill":545259392,"support_perbill":52937685,"approval":54.5259392,"support":5.2937685,"days":21,"dot_needed":"60,037,296"},{"time_hours":497,"approval_perbill":544942942,"support_perbill":52915262,"approval":54.4942942,"support":5.2915262,"days":21,"dot_needed":"60,011,865"},{"time_hours":498,"approval_perbill":544627325,"support_perbill":52892928,"approval":54.4627325,"support":5.2892928,"days":21,"dot_needed":"59,986,536"},{"time_hours":499,"approval_perbill":544312538,"support_perbill":52870680,"approval":54.4312538,"support":5.287068,"days":21,"dot_needed":"59,961,304"},{"time_hours":500,"approval_perbill":543998577,"support_perbill":52848520,"approval":54.3998577,"support":5.284852,"days":21,"dot_needed":"59,936,172"},{"time_hours":501,"approval_perbill":543685438,"support_perbill":52826446,"approval":54.3685438,"support":5.2826446,"days":21,"dot_needed":"59,911,138"},{"time_hours":502,"approval_perbill":543373120,"support_perbill":52804457,"approval":54.337312,"support":5.2804457,"days":21,"dot_needed":"59,886,200"},{"time_hours":503,"approval_perbill":543061618,"support_perbill":52782554,"approval":54.3061618,"support":5.2782554,"days":21,"dot_needed":"59,861,360"},{"time_hours":504,"approval_perbill":542750930,"support_perbill":52760735,"approval":54.275093,"support":5.2760735,"days":21,"dot_needed":"59,836,614"},{"time_hours":505,"approval_perbill":542441051,"support_perbill":52739001,"approval":54.2441051,"support":5.2739001,"days":22,"dot_needed":"59,811,966"},{"time_hours":506,"approval_perbill":542131980,"support_perbill":52717351,"approval":54.213198,"support":5.2717351,"days":22,"dot_needed":"59,787,412"},{"time_hours":507,"approval_perbill":541823713,"support_perbill":52695784,"approval":54.1823713,"support":5.2695784,"days":22,"dot_needed":"59,762,953"},{"time_hours":508,"approval_perbill":541516246,"support_perbill":52674300,"approval":54.1516246,"support":5.26743,"days":22,"dot_needed":"59,738,587"},{"time_hours":509,"approval_perbill":541209577,"support_perbill":52652898,"approval":54.1209577,"support":5.2652898,"days":22,"dot_needed":"59,714,315"},{"time_hours":510,"approval_perbill":540903702,"support_perbill":52631578,"approval":54.0903702,"support":5.2631578,"days":22,"dot_needed":"59,690,136"},{"time_hours":511,"approval_perbill":540598619,"support_perbill":52610340,"approval":54.0598619,"support":5.261034,"days":22,"dot_needed":"59,666,049"},{"time_hours":512,"approval_perbill":540294324,"support_perbill":52589182,"approval":54.0294324,"support":5.2589182,"days":22,"dot_needed":"59,642,054"},{"time_hours":513,"approval_perbill":539990814,"support_perbill":52568105,"approval":53.9990814,"support":5.2568105,"days":22,"dot_needed":"59,618,150"},{"time_hours":514,"approval_perbill":539688087,"support_perbill":52547108,"approval":53.9688087,"support":5.2547108,"days":22,"dot_needed":"59,594,337"},{"time_hours":515,"approval_perbill":539386139,"support_perbill":52526191,"approval":53.9386139,"support":5.2526191,"days":22,"dot_needed":"59,570,615"},{"time_hours":516,"approval_perbill":539084968,"support_perbill":52505353,"approval":53.9084968,"support":5.2505353,"days":22,"dot_needed":"59,546,982"},{"time_hours":517,"approval_perbill":538784569,"support_perbill":52484593,"approval":53.8784569,"support":5.2484593,"days":22,"dot_needed":"59,523,438"},{"time_hours":518,"approval_perbill":538484941,"support_perbill":52463912,"approval":53.8484941,"support":5.2463912,"days":22,"dot_needed":"59,499,984"},{"time_hours":519,"approval_perbill":538186080,"support_perbill":52443308,"approval":53.818608,"support":5.2443308,"days":22,"dot_needed":"59,476,616"},{"time_hours":520,"approval_perbill":537887984,"support_perbill":52422782,"approval":53.7887984,"support":5.2422782,"days":22,"dot_needed":"59,453,338"},{"time_hours":521,"approval_perbill":537590648,"support_perbill":52402333,"approval":53.7590648,"support":5.2402333,"days":22,"dot_needed":"59,430,146"},{"time_hours":522,"approval_perbill":537294072,"support_perbill":52381960,"approval":53.7294072,"support":5.238196,"days":22,"dot_needed":"59,407,041"},{"time_hours":523,"approval_perbill":536998251,"support_perbill":52361663,"approval":53.6998251,"support":5.2361663,"days":22,"dot_needed":"59,384,022"},{"time_hours":524,"approval_perbill":536703183,"support_perbill":52341442,"approval":53.6703183,"support":5.2341442,"days":22,"dot_needed":"59,361,089"},{"time_hours":525,"approval_perbill":536408865,"support_perbill":52321296,"approval":53.6408865,"support":5.2321296,"days":22,"dot_needed":"59,338,241"},{"time_hours":526,"approval_perbill":536115294,"support_perbill":52301225,"approval":53.6115294,"support":5.2301225,"days":22,"dot_needed":"59,315,478"},{"time_hours":527,"approval_perbill":535822467,"support_perbill":52281229,"approval":53.5822467,"support":5.2281229,"days":22,"dot_needed":"59,292,801"},{"time_hours":528,"approval_perbill":535530381,"support_perbill":52261306,"approval":53.5530381,"support":5.2261306,"days":22,"dot_needed":"59,270,206"},{"time_hours":529,"approval_perbill":535239034,"support_perbill":52241457,"approval":53.5239034,"support":5.2241457,"days":23,"dot_needed":"59,247,695"},{"time_hours":530,"approval_perbill":534948423,"support_perbill":52221681,"approval":53.4948423,"support":5.2221681,"days":23,"dot_needed":"59,225,266"},{"time_hours":531,"approval_perbill":534658544,"support_perbill":52201977,"approval":53.4658544,"support":5.2201977,"days":23,"dot_needed":"59,202,920"},{"time_hours":532,"approval_perbill":534369396,"support_perbill":52182347,"approval":53.4369396,"support":5.2182347,"days":23,"dot_needed":"59,180,657"},{"time_hours":533,"approval_perbill":534080976,"support_perbill":52162788,"approval":53.4080976,"support":5.2162788,"days":23,"dot_needed":"59,158,475"},{"time_hours":534,"approval_perbill":533793280,"support_perbill":52143300,"approval":53.379328,"support":5.21433,"days":23,"dot_needed":"59,136,374"},{"time_hours":535,"approval_perbill":533506306,"support_perbill":52123884,"approval":53.3506306,"support":5.2123884,"days":23,"dot_needed":"59,114,354"},{"time_hours":536,"approval_perbill":533220051,"support_perbill":52104538,"approval":53.3220051,"support":5.2104538,"days":23,"dot_needed":"59,092,413"},{"time_hours":537,"approval_perbill":532934513,"support_perbill":52085263,"approval":53.2934513,"support":5.2085263,"days":23,"dot_needed":"59,070,553"},{"time_hours":538,"approval_perbill":532649689,"support_perbill":52066058,"approval":53.2649689,"support":5.2066058,"days":23,"dot_needed":"59,048,772"},{"time_hours":539,"approval_perbill":532365575,"support_perbill":52046923,"approval":53.2365575,"support":5.2046923,"days":23,"dot_needed":"59,027,071"},{"time_hours":540,"approval_perbill":532082171,"support_perbill":52027857,"approval":53.2082171,"support":5.2027857,"days":23,"dot_needed":"59,005,448"},{"time_hours":541,"approval_perbill":531799472,"support_perbill":52008859,"approval":53.1799472,"support":5.2008859,"days":23,"dot_needed":"58,983,902"},{"time_hours":542,"approval_perbill":531517477,"support_perbill":51989931,"approval":53.1517477,"support":5.1989931,"days":23,"dot_needed":"58,962,436"},{"time_hours":543,"approval_perbill":531236182,"support_perbill":51971070,"approval":53.1236182,"support":5.197107,"days":23,"dot_needed":"58,941,045"},{"time_hours":544,"approval_perbill":530955585,"support_perbill":51952277,"approval":53.0955585,"support":5.1952277,"days":23,"dot_needed":"58,919,732"},{"time_hours":545,"approval_perbill":530675684,"support_perbill":51933551,"approval":53.0675684,"support":5.1933551,"days":23,"dot_needed":"58,898,495"},{"time_hours":546,"approval_perbill":530396476,"support_perbill":51914893,"approval":53.0396476,"support":5.1914893,"days":23,"dot_needed":"58,877,334"},{"time_hours":547,"approval_perbill":530117958,"support_perbill":51896301,"approval":53.0117958,"support":5.1896301,"days":23,"dot_needed":"58,856,249"},{"time_hours":548,"approval_perbill":529840127,"support_perbill":51877776,"approval":52.9840127,"support":5.1877776,"days":23,"dot_needed":"58,835,239"},{"time_hours":549,"approval_perbill":529562982,"support_perbill":51859316,"approval":52.9562982,"support":5.1859316,"days":23,"dot_needed":"58,814,304"},{"time_hours":550,"approval_perbill":529286519,"support_perbill":51840922,"approval":52.9286519,"support":5.1840922,"days":23,"dot_needed":"58,793,443"},{"time_hours":551,"approval_perbill":529010737,"support_perbill":51822593,"approval":52.9010737,"support":5.1822593,"days":23,"dot_needed":"58,772,656"},{"time_hours":552,"approval_perbill":528735632,"support_perbill":51804330,"approval":52.8735632,"support":5.180433,"days":23,"dot_needed":"58,751,943"},{"time_hours":553,"approval_perbill":528461202,"support_perbill":51786130,"approval":52.8461202,"support":5.178613,"days":24,"dot_needed":"58,731,303"},{"time_hours":554,"approval_perbill":528187445,"support_perbill":51767996,"approval":52.8187445,"support":5.1767996,"days":24,"dot_needed":"58,710,737"},{"time_hours":555,"approval_perbill":527914358,"support_perbill":51749924,"approval":52.7914358,"support":5.1749924,"days":24,"dot_needed":"58,690,241"},{"time_hours":556,"approval_perbill":527641939,"support_perbill":51731917,"approval":52.7641939,"support":5.1731917,"days":24,"dot_needed":"58,669,819"},{"time_hours":557,"approval_perbill":527370186,"support_perbill":51713973,"approval":52.7370186,"support":5.1713973,"days":24,"dot_needed":"58,649,468"},{"time_hours":558,"approval_perbill":527099095,"support_perbill":51696091,"approval":52.7099095,"support":5.1696091,"days":24,"dot_needed":"58,629,188"},{"time_hours":559,"approval_perbill":526828664,"support_perbill":51678272,"approval":52.6828664,"support":5.1678272,"days":24,"dot_needed":"58,608,979"},{"time_hours":560,"approval_perbill":526558891,"support_perbill":51660516,"approval":52.6558891,"support":5.1660516,"days":24,"dot_needed":"58,588,842"},{"time_hours":561,"approval_perbill":526289774,"support_perbill":51642821,"approval":52.6289774,"support":5.1642821,"days":24,"dot_needed":"58,568,774"},{"time_hours":562,"approval_perbill":526021311,"support_perbill":51625188,"approval":52.6021311,"support":5.1625188,"days":24,"dot_needed":"58,548,776"},{"time_hours":563,"approval_perbill":525753498,"support_perbill":51607616,"approval":52.5753498,"support":5.1607616,"days":24,"dot_needed":"58,528,848"},{"time_hours":564,"approval_perbill":525486333,"support_perbill":51590105,"approval":52.5486333,"support":5.1590105,"days":24,"dot_needed":"58,508,988"},{"time_hours":565,"approval_perbill":525219815,"support_perbill":51572655,"approval":52.5219815,"support":5.1572655,"days":24,"dot_needed":"58,489,198"},{"time_hours":566,"approval_perbill":524953941,"support_perbill":51555265,"approval":52.4953941,"support":5.1555265,"days":24,"dot_needed":"58,469,476"},{"time_hours":567,"approval_perbill":524688707,"support_perbill":51537935,"approval":52.4688707,"support":5.1537935,"days":24,"dot_needed":"58,449,821"},{"time_hours":568,"approval_perbill":524424114,"support_perbill":51520665,"approval":52.4424114,"support":5.1520665,"days":24,"dot_needed":"58,430,235"},{"time_hours":569,"approval_perbill":524160156,"support_perbill":51503454,"approval":52.4160156,"support":5.1503454,"days":24,"dot_needed":"58,410,716"},{"time_hours":570,"approval_perbill":523896834,"support_perbill":51486302,"approval":52.3896834,"support":5.1486302,"days":24,"dot_needed":"58,391,264"},{"time_hours":571,"approval_perbill":523634144,"support_perbill":51469209,"approval":52.3634144,"support":5.1469209,"days":24,"dot_needed":"58,371,878"},{"time_hours":572,"approval_perbill":523372083,"support_perbill":51452174,"approval":52.3372083,"support":5.1452174,"days":24,"dot_needed":"58,352,559"},{"time_hours":573,"approval_perbill":523110651,"support_perbill":51435198,"approval":52.3110651,"support":5.1435198,"days":24,"dot_needed":"58,333,306"},{"time_hours":574,"approval_perbill":522849844,"support_perbill":51418279,"approval":52.2849844,"support":5.1418279,"days":24,"dot_needed":"58,314,118"},{"time_hours":575,"approval_perbill":522589660,"support_perbill":51401418,"approval":52.258966,"support":5.1401418,"days":24,"dot_needed":"58,294,996"},{"time_hours":576,"approval_perbill":522330097,"support_perbill":51384615,"approval":52.2330097,"support":5.1384615,"days":24,"dot_needed":"58,275,939"},{"time_hours":577,"approval_perbill":522071153,"support_perbill":51367868,"approval":52.2071153,"support":5.1367868,"days":25,"dot_needed":"58,256,946"},{"time_hours":578,"approval_perbill":521812825,"support_perbill":51351178,"approval":52.1812825,"support":5.1351178,"days":25,"dot_needed":"58,238,018"},{"time_hours":579,"approval_perbill":521555112,"support_perbill":51334544,"approval":52.1555112,"support":5.1334544,"days":25,"dot_needed":"58,219,153"},{"time_hours":580,"approval_perbill":521298011,"support_perbill":51317967,"approval":52.1298011,"support":5.1317967,"days":25,"dot_needed":"58,200,353"},{"time_hours":581,"approval_perbill":521041520,"support_perbill":51301445,"approval":52.104152,"support":5.1301445,"days":25,"dot_needed":"58,181,615"},{"time_hours":582,"approval_perbill":520785637,"support_perbill":51284979,"approval":52.0785637,"support":5.1284979,"days":25,"dot_needed":"58,162,941"},{"time_hours":583,"approval_perbill":520530359,"support_perbill":51268568,"approval":52.0530359,"support":5.1268568,"days":25,"dot_needed":"58,144,329"},{"time_hours":584,"approval_perbill":520275685,"support_perbill":51252213,"approval":52.0275685,"support":5.1252213,"days":25,"dot_needed":"58,125,781"},{"time_hours":585,"approval_perbill":520021612,"support_perbill":51235912,"approval":52.0021612,"support":5.1235912,"days":25,"dot_needed":"58,107,293"},{"time_hours":586,"approval_perbill":519768139,"support_perbill":51219665,"approval":51.9768139,"support":5.1219665,"days":25,"dot_needed":"58,088,867"},{"time_hours":587,"approval_perbill":519515263,"support_perbill":51203473,"approval":51.9515263,"support":5.1203473,"days":25,"dot_needed":"58,070,504"},{"time_hours":588,"approval_perbill":519262981,"support_perbill":51187334,"approval":51.9262981,"support":5.1187334,"days":25,"dot_needed":"58,052,200"},{"time_hours":589,"approval_perbill":519011293,"support_perbill":51171249,"approval":51.9011293,"support":5.1171249,"days":25,"dot_needed":"58,033,958"},{"time_hours":590,"approval_perbill":518760195,"support_perbill":51155218,"approval":51.8760195,"support":5.1155218,"days":25,"dot_needed":"58,015,777"},{"time_hours":591,"approval_perbill":518509687,"support_perbill":51139240,"approval":51.8509687,"support":5.113924,"days":25,"dot_needed":"57,997,656"},{"time_hours":592,"approval_perbill":518259765,"support_perbill":51123314,"approval":51.8259765,"support":5.1123314,"days":25,"dot_needed":"57,979,595"},{"time_hours":593,"approval_perbill":518010427,"support_perbill":51107441,"approval":51.8010427,"support":5.1107441,"days":25,"dot_needed":"57,961,593"},{"time_hours":594,"approval_perbill":517761672,"support_perbill":51091621,"approval":51.7761672,"support":5.1091621,"days":25,"dot_needed":"57,943,651"},{"time_hours":595,"approval_perbill":517513498,"support_perbill":51075852,"approval":51.7513498,"support":5.1075852,"days":25,"dot_needed":"57,925,767"},{"time_hours":596,"approval_perbill":517265903,"support_perbill":51060136,"approval":51.7265903,"support":5.1060136,"days":25,"dot_needed":"57,907,944"},{"time_hours":597,"approval_perbill":517018883,"support_perbill":51044470,"approval":51.7018883,"support":5.104447,"days":25,"dot_needed":"57,890,177"},{"time_hours":598,"approval_perbill":516772438,"support_perbill":51028857,"approval":51.6772438,"support":5.1028857,"days":25,"dot_needed":"57,872,470"},{"time_hours":599,"approval_perbill":516526566,"support_perbill":51013294,"approval":51.6526566,"support":5.1013294,"days":25,"dot_needed":"57,854,819"},{"time_hours":600,"approval_perbill":516281264,"support_perbill":50997782,"approval":51.6281264,"support":5.0997782,"days":25,"dot_needed":"57,837,227"},{"time_hours":601,"approval_perbill":516036531,"support_perbill":50982320,"approval":51.6036531,"support":5.098232,"days":26,"dot_needed":"57,819,691"},{"time_hours":602,"approval_perbill":515792364,"support_perbill":50966909,"approval":51.5792364,"support":5.0966909,"days":26,"dot_needed":"57,802,214"},{"time_hours":603,"approval_perbill":515548762,"support_perbill":50951548,"approval":51.5548762,"support":5.0951548,"days":26,"dot_needed":"57,784,793"},{"time_hours":604,"approval_perbill":515305723,"support_perbill":50936237,"approval":51.5305723,"support":5.0936237,"days":26,"dot_needed":"57,767,428"},{"time_hours":605,"approval_perbill":515063244,"support_perbill":50920975,"approval":51.5063244,"support":5.0920975,"days":26,"dot_needed":"57,750,119"},{"time_hours":606,"approval_perbill":514821324,"support_perbill":50905763,"approval":51.4821324,"support":5.0905763,"days":26,"dot_needed":"57,732,867"},{"time_hours":607,"approval_perbill":514579960,"support_perbill":50890600,"approval":51.457996,"support":5.08906,"days":26,"dot_needed":"57,715,671"},{"time_hours":608,"approval_perbill":514339152,"support_perbill":50875486,"approval":51.4339152,"support":5.0875486,"days":26,"dot_needed":"57,698,530"},{"time_hours":609,"approval_perbill":514098896,"support_perbill":50860420,"approval":51.4098896,"support":5.086042,"days":26,"dot_needed":"57,681,443"},{"time_hours":610,"approval_perbill":513859192,"support_perbill":50845402,"approval":51.3859192,"support":5.0845402,"days":26,"dot_needed":"57,664,411"},{"time_hours":611,"approval_perbill":513620036,"support_perbill":50830433,"approval":51.3620036,"support":5.0830433,"days":26,"dot_needed":"57,647,435"},{"time_hours":612,"approval_perbill":513381428,"support_perbill":50815512,"approval":51.3381428,"support":5.0815512,"days":26,"dot_needed":"57,630,512"},{"time_hours":613,"approval_perbill":513143366,"support_perbill":50800638,"approval":51.3143366,"support":5.0800638,"days":26,"dot_needed":"57,613,644"},{"time_hours":614,"approval_perbill":512905847,"support_perbill":50785812,"approval":51.2905847,"support":5.0785812,"days":26,"dot_needed":"57,596,829"},{"time_hours":615,"approval_perbill":512668869,"support_perbill":50771034,"approval":51.2668869,"support":5.0771034,"days":26,"dot_needed":"57,580,069"},{"time_hours":616,"approval_perbill":512432432,"support_perbill":50756302,"approval":51.2432432,"support":5.0756302,"days":26,"dot_needed":"57,563,362"},{"time_hours":617,"approval_perbill":512196532,"support_perbill":50741617,"approval":51.2196532,"support":5.0741617,"days":26,"dot_needed":"57,546,707"},{"time_hours":618,"approval_perbill":511961169,"support_perbill":50726978,"approval":51.1961169,"support":5.0726978,"days":26,"dot_needed":"57,530,105"},{"time_hours":619,"approval_perbill":511726340,"support_perbill":50712386,"approval":51.172634,"support":5.0712386,"days":26,"dot_needed":"57,513,556"},{"time_hours":620,"approval_perbill":511492043,"support_perbill":50697840,"approval":51.1492043,"support":5.069784,"days":26,"dot_needed":"57,497,059"},{"time_hours":621,"approval_perbill":511258278,"support_perbill":50683340,"approval":51.1258278,"support":5.068334,"days":26,"dot_needed":"57,480,615"},{"time_hours":622,"approval_perbill":511025041,"support_perbill":50668886,"approval":51.1025041,"support":5.0668886,"days":26,"dot_needed":"57,464,222"},{"time_hours":623,"approval_perbill":510792331,"support_perbill":50654477,"approval":51.0792331,"support":5.0654477,"days":26,"dot_needed":"57,447,881"},{"time_hours":624,"approval_perbill":510560146,"support_perbill":50640113,"approval":51.0560146,"support":5.0640113,"days":26,"dot_needed":"57,431,590"},{"time_hours":625,"approval_perbill":510328486,"support_perbill":50625794,"approval":51.0328486,"support":5.0625794,"days":27,"dot_needed":"57,415,351"},{"time_hours":626,"approval_perbill":510097346,"support_perbill":50611521,"approval":51.0097346,"support":5.0611521,"days":27,"dot_needed":"57,399,164"},{"time_hours":627,"approval_perbill":509866727,"support_perbill":50597291,"approval":50.9866727,"support":5.0597291,"days":27,"dot_needed":"57,383,025"},{"time_hours":628,"approval_perbill":509636626,"support_perbill":50583107,"approval":50.9636626,"support":5.0583107,"days":27,"dot_needed":"57,366,939"},{"time_hours":629,"approval_perbill":509407042,"support_perbill":50568966,"approval":50.9407042,"support":5.0568966,"days":27,"dot_needed":"57,350,902"},{"time_hours":630,"approval_perbill":509177972,"support_perbill":50554870,"approval":50.9177972,"support":5.055487,"days":27,"dot_needed":"57,334,915"},{"time_hours":631,"approval_perbill":508949416,"support_perbill":50540817,"approval":50.8949416,"support":5.0540817,"days":27,"dot_needed":"57,318,977"},{"time_hours":632,"approval_perbill":508721371,"support_perbill":50526808,"approval":50.8721371,"support":5.0526808,"days":27,"dot_needed":"57,303,090"},{"time_hours":633,"approval_perbill":508493835,"support_perbill":50512842,"approval":50.8493835,"support":5.0512842,"days":27,"dot_needed":"57,287,251"},{"time_hours":634,"approval_perbill":508266807,"support_perbill":50498920,"approval":50.8266807,"support":5.049892,"days":27,"dot_needed":"57,271,461"},{"time_hours":635,"approval_perbill":508040286,"support_perbill":50485040,"approval":50.8040286,"support":5.048504,"days":27,"dot_needed":"57,255,720"},{"time_hours":636,"approval_perbill":507814269,"support_perbill":50471203,"approval":50.7814269,"support":5.0471203,"days":27,"dot_needed":"57,240,027"},{"time_hours":637,"approval_perbill":507588755,"support_perbill":50457409,"approval":50.7588755,"support":5.0457409,"days":27,"dot_needed":"57,224,383"},{"time_hours":638,"approval_perbill":507363742,"support_perbill":50443657,"approval":50.7363742,"support":5.0443657,"days":27,"dot_needed":"57,208,787"},{"time_hours":639,"approval_perbill":507139228,"support_perbill":50429948,"approval":50.7139228,"support":5.0429948,"days":27,"dot_needed":"57,193,239"},{"time_hours":640,"approval_perbill":506915213,"support_perbill":50416280,"approval":50.6915213,"support":5.041628,"days":27,"dot_needed":"57,177,738"},{"time_hours":641,"approval_perbill":506691693,"support_perbill":50402655,"approval":50.6691693,"support":5.0402655,"days":27,"dot_needed":"57,162,286"},{"time_hours":642,"approval_perbill":506468669,"support_perbill":50389071,"approval":50.6468669,"support":5.0389071,"days":27,"dot_needed":"57,146,880"},{"time_hours":643,"approval_perbill":506246136,"support_perbill":50375528,"approval":50.6246136,"support":5.0375528,"days":27,"dot_needed":"57,131,521"},{"time_hours":644,"approval_perbill":506024096,"support_perbill":50362026,"approval":50.6024096,"support":5.0362026,"days":27,"dot_needed":"57,116,208"},{"time_hours":645,"approval_perbill":505802545,"support_perbill":50348566,"approval":50.5802545,"support":5.0348566,"days":27,"dot_needed":"57,100,943"},{"time_hours":646,"approval_perbill":505581482,"support_perbill":50335147,"approval":50.5581482,"support":5.0335147,"days":27,"dot_needed":"57,085,724"},{"time_hours":647,"approval_perbill":505360905,"support_perbill":50321768,"approval":50.5360905,"support":5.0321768,"days":27,"dot_needed":"57,070,551"},{"time_hours":648,"approval_perbill":505140813,"support_perbill":50308430,"approval":50.5140813,"support":5.030843,"days":27,"dot_needed":"57,055,424"},{"time_hours":649,"approval_perbill":504921204,"support_perbill":50295132,"approval":50.4921204,"support":5.0295132,"days":28,"dot_needed":"57,040,343"},{"time_hours":650,"approval_perbill":504702077,"support_perbill":50281874,"approval":50.4702077,"support":5.0281874,"days":28,"dot_needed":"57,025,307"},{"time_hours":651,"approval_perbill":504483430,"support_perbill":50268656,"approval":50.448343,"support":5.0268656,"days":28,"dot_needed":"57,010,316"},{"time_hours":652,"approval_perbill":504265261,"support_perbill":50255478,"approval":50.4265261,"support":5.0255478,"days":28,"dot_needed":"56,995,371"},{"time_hours":653,"approval_perbill":504047570,"support_perbill":50242339,"approval":50.404757,"support":5.0242339,"days":28,"dot_needed":"56,980,470"},{"time_hours":654,"approval_perbill":503830353,"support_perbill":50229240,"approval":50.3830353,"support":5.022924,"days":28,"dot_needed":"56,965,614"},{"time_hours":655,"approval_perbill":503613611,"support_perbill":50216180,"approval":50.3613611,"support":5.021618,"days":28,"dot_needed":"56,950,802"},{"time_hours":656,"approval_perbill":503397340,"support_perbill":50203159,"approval":50.339734,"support":5.0203159,"days":28,"dot_needed":"56,936,035"},{"time_hours":657,"approval_perbill":503181541,"support_perbill":50190177,"approval":50.3181541,"support":5.0190177,"days":28,"dot_needed":"56,921,312"},{"time_hours":658,"approval_perbill":502966210,"support_perbill":50177234,"approval":50.296621,"support":5.0177234,"days":28,"dot_needed":"56,906,633"},{"time_hours":659,"approval_perbill":502751347,"support_perbill":50164330,"approval":50.2751347,"support":5.016433,"days":28,"dot_needed":"56,891,999"},{"time_hours":660,"approval_perbill":502536950,"support_perbill":50151463,"approval":50.253695,"support":5.0151463,"days":28,"dot_needed":"56,877,406"},{"time_hours":661,"approval_perbill":502323018,"support_perbill":50138635,"approval":50.2323018,"support":5.0138635,"days":28,"dot_needed":"56,862,858"},{"time_hours":662,"approval_perbill":502109549,"support_perbill":50125845,"approval":50.2109549,"support":5.0125845,"days":28,"dot_needed":"56,848,352"},{"time_hours":663,"approval_perbill":501896542,"support_perbill":50113093,"approval":50.1896542,"support":5.0113093,"days":28,"dot_needed":"56,833,890"},{"time_hours":664,"approval_perbill":501683994,"support_perbill":50100378,"approval":50.1683994,"support":5.0100378,"days":28,"dot_needed":"56,819,470"},{"time_hours":665,"approval_perbill":501471905,"support_perbill":50087701,"approval":50.1471905,"support":5.0087701,"days":28,"dot_needed":"56,805,093"},{"time_hours":666,"approval_perbill":501260273,"support_perbill":50075062,"approval":50.1260273,"support":5.0075062,"days":28,"dot_needed":"56,790,759"},{"time_hours":667,"approval_perbill":501049097,"support_perbill":50062459,"approval":50.1049097,"support":5.0062459,"days":28,"dot_needed":"56,776,466"},{"time_hours":668,"approval_perbill":500838375,"support_perbill":50049894,"approval":50.0838375,"support":5.0049894,"days":28,"dot_needed":"56,762,215"},{"time_hours":669,"approval_perbill":500628106,"support_perbill":50037365,"approval":50.0628106,"support":5.0037365,"days":28,"dot_needed":"56,748,006"},{"time_hours":670,"approval_perbill":500418287,"support_perbill":50024873,"approval":50.0418287,"support":5.0024873,"days":28,"dot_needed":"56,733,839"},{"time_hours":671,"approval_perbill":500208919,"support_perbill":50012418,"approval":50.0208919,"support":5.0012418,"days":28,"dot_needed":"56,719,713"},{"time_hours":672,"approval_perbill":499999999,"support_perbill":49999999,"approval":49.9999999,"support":4.9999999,"days":28,"dot_needed":"56,705,629"}]')}}]); \ No newline at end of file diff --git a/assets/js/5355b952.edcdfc4d.js b/assets/js/5355b952.edcdfc4d.js new file mode 100644 index 000000000000..f3a7ed686cfb --- /dev/null +++ b/assets/js/5355b952.edcdfc4d.js @@ -0,0 +1 @@ +(self.webpackChunk=self.webpackChunk||[]).push([[1003],{30866:(p,r,l)=>{"use strict";l.r(r),l.d(r,{assets:()=>j,contentTitle:()=>f,default:()=>O,frontMatter:()=>g,metadata:()=>o,toc:()=>w});const o=JSON.parse('{"id":"learn/learn-polkadot-opengov-origins","title":"Polkadot OpenGov Origins","description":"All Origins for Polkadot\'s OpenGov.","source":"@site/../docs/learn/learn-polkadot-opengov-origins.md","sourceDirName":"learn","slug":"/learn-polkadot-opengov-origins","permalink":"/docs/learn-polkadot-opengov-origins","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-polkadot-opengov-origins.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1727943421000,"frontMatter":{"id":"learn-polkadot-opengov-origins","title":"Polkadot OpenGov Origins","sidebar_label":"OpenGov Origins","description":"All Origins for Polkadot\'s OpenGov.","keywords":["proposal","referenda","OpenGov","origins"],"slug":"../learn-polkadot-opengov-origins"},"sidebar":"docs","previous":{"title":"Polkadot OpenGov","permalink":"/docs/learn-polkadot-opengov"},"next":{"title":"Technical Fellowship","permalink":"/docs/learn-polkadot-technical-fellowship"}}');var a=l(74848),e=l(28453),t=l(90675),s=l(10467),i=l(96540),u=l(19588),_=l(2026);function v(p,r,l){return b.apply(this,arguments)}function b(){return(b=(0,s.A)((0,t.A)().mark((function p(r,l,o){var e,s,i,v;return(0,t.A)().wrap((function(p){for(;;)switch(p.prev=p.next){case 0:return e=new u.E(l),p.next=3,_.G.create({provider:e});case 3:if(s=p.sent,"polkadot"===r||"kusama"===r){p.next=7;break}return o((0,a.jsx)("div",{})),p.abrupt("return");case 7:return i=[],v={color:"#e6007a",cursor:"pointer",textDecoration:"underline"},s.consts.referenda.tracks.forEach((function(p){var l=p.toHuman(),o=l[1].name.replace(/_/g," ");o=o.split(" ").map((function(p){return p.charAt(0).toUpperCase()+p.substring(1)})).join(" ");var e=m(l[1].minApproval),t=m(l[1].minSupport);i.push((0,a.jsxs)("tr",{children:[(0,a.jsx)("td",{children:(0,a.jsx)("b",{children:l[0]})}),(0,a.jsx)("td",{children:(0,a.jsx)("a",{href:"#"+o.toLowerCase().replace(" ","-"),children:(0,a.jsx)("b",{children:o})})}),(0,a.jsx)("td",{children:l[1].maxDeciding}),(0,a.jsx)("td",{children:d(l[1].decisionDeposit,r)}),(0,a.jsx)("td",{style:v,title:l[1].preparePeriod+" Blocks",children:h(l[1].preparePeriod)}),(0,a.jsx)("td",{style:v,title:l[1].decisionPeriod+" Blocks",children:h(l[1].decisionPeriod)}),(0,a.jsx)("td",{style:v,title:l[1].confirmPeriod+" Blocks",children:h(l[1].confirmPeriod)}),(0,a.jsx)("td",{style:v,title:l[1].minEnactmentPeriod+" Blocks",children:h(l[1].minEnactmentPeriod)}),(0,a.jsx)("td",{style:v,children:e}),(0,a.jsx)("td",{style:v,children:t})]},l[0]))})),o((0,a.jsxs)("div",{style:{textAlign:"center"},children:[(0,a.jsxs)("b",{children:[r.charAt(0).toUpperCase()+r.slice(1)," Tracks (",i.length,"):"]}),(0,a.jsx)("br",{}),(0,a.jsx)("div",{style:{border:"1px solid #dadde1"},children:(0,a.jsxs)("table",{style:{margin:0,maxHeight:"600px",borderCollapse:"separate",borderSpacing:0,whiteSpace:"nowrap"},children:[(0,a.jsx)("thead",{style:{width:"100%",textAlign:"center",position:"sticky",top:0,background:"#c1c1c1"},children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{children:"ID"}),(0,a.jsx)("th",{children:"Origin"}),(0,a.jsx)("th",{children:"Max Deciding"}),(0,a.jsx)("th",{children:"Decision Deposit"}),(0,a.jsx)("th",{children:"Prepare Period"}),(0,a.jsx)("th",{children:"Decision Period"}),(0,a.jsx)("th",{children:"Confirm Period"}),(0,a.jsx)("th",{children:"Min Enactment Period"}),(0,a.jsx)("th",{children:"Min Approval"}),(0,a.jsx)("th",{children:"Min Support"})]})}),(0,a.jsx)("tbody",{style:{width:"100%",textAlign:"center"},children:i})]})}),(0,a.jsxs)("b",{style:{fontSize:"12px"},children:["**Hover\xa0",(0,a.jsx)("span",{style:{color:"#e6007a",textDecoration:"underline"},children:"underlined cell values"}),"\xa0for additional info**"]})]})),p.abrupt("return",s);case 13:case"end":return p.stop()}}),p)})))).apply(this,arguments)}function m(p){if(p.hasOwnProperty("Reciprocal")){var r=p.Reciprocal;return(0,a.jsx)("div",{title:"Factor: "+r.factor+", X-Offset: "+r.xOffset+", Y-Offset: "+r.yOffset,children:"Reciprocal"})}if(p.hasOwnProperty("LinearDecreasing")){var l=p.LinearDecreasing;return(0,a.jsx)("div",{title:"Length: "+l.length+", Floor: "+l.floor+", Ceiling: "+l.ceil,children:"Linear Decreasing"})}return""}function h(p){var r=p.replace(/\,/g,"");return r=parseInt(r),(r*=6)>=86400?(r/=86400)>1?r+" Days":r+" Day":r%3600==0?(r/=3600)+" Hours":(r/=60)+" Minutes"}function d(p,r){var l={polkadot:{precision:1e10,symbol:"DOT"},kusama:{precision:1e12,symbol:"KSM"}},o=void 0;if("polkadot"===r)o=3;else{if("kusama"!==r)return;o=6}return p=p.replace(/\,/g,""),p=parseFloat(p),(p=Number.isInteger(p/l[r].precision)?p/l[r].precision+" "+l[r].symbol:(p/l[r].precision).toFixed(o)+" "+l[r].symbol).toString()}const n=function(p){var r=p.network,l=p.defaultValue,o=(0,i.useState)(""),e=o[0],u=o[1];return(0,i.useEffect)((function(){var p=void 0,o=null;if("polkadot"===r)p="wss://rpc.polkadot.io";else{if("kusama"!==r)return;p="wss://kusama-rpc.polkadot.io/"}u((0,a.jsx)("div",{style:{color:"#e6007a",textAlign:"center"},children:(0,a.jsx)("b",{children:l})}));var e=function(){var l=(0,s.A)((0,t.A)().mark((function l(){return(0,t.A)().wrap((function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,v(r,p,u);case 2:o=l.sent;case 3:case"end":return l.stop()}}),l)})));return function(){return l.apply(this,arguments)}}();return e(),function(){o&&o.disconnect&&o.disconnect()}}),[r,l]),e};var y=l(44731),A=l(22022),S=l(7935),c=l.n(S);function T(p,r,l,o,e){A.t1.register(A.PP,A.kc,A.FN,A.No,A.hE,A.m_,A.s$);var t=function(p,r,l,o){console.log(""+r+p);var a=c()[""+r+p],e=a.map((function(p){return{x:p.time_hours,y:p.approval}})),t=a.map((function(p){return{x:p.time_hours,y:p.support}})),s={data:{labels:["Approval","Support"],datasets:[{label:"Approval",data:e,backgroundColor:"#00B2FF"},{label:"Support",data:t,backgroundColor:"#56F39A"}]},options:{animation:!1,normalized:!0,parsing:!1,scales:{y:{type:"linear",min:0,max:l,ticks:{callback:function(p){return p+"%"}}},x:{type:"linear",min:0,max:o,title:{display:!0,text:"Hours"},ticks:{callback:function(p){return""+p}}}},plugins:{tooltip:{callbacks:{title:function(p){return"Hour: "+p[0].label},label:function(p){return p.dataset.label+": "+p.parsed.y+"%"}}}}}};return s}(r,l,o,e);switch(A.t1.defaults.font.size=18,p){case"line":return(0,a.jsx)(y.N1,{datasetIdKey:t.datasetIdKey,data:t.data,options:t.options});case"scatter":return(0,a.jsx)(y.Xl,{datasetIdKey:t.datasetIdKey,data:t.data,options:t.options})}}const H=function(p){var r=p.title,l=T(p.type,p.dataId,p.network,p.maxY,p.maxX);return(0,a.jsxs)("div",{className:"App",children:[(0,a.jsx)("header",{className:"App-header",children:(0,a.jsx)("h3",{children:r})}),l]})};var x=l(11470),k=l(19365);const g={id:"learn-polkadot-opengov-origins",title:"Polkadot OpenGov Origins",sidebar_label:"OpenGov Origins",description:"All Origins for Polkadot's OpenGov.",keywords:["proposal","referenda","OpenGov","origins"],slug:"../learn-polkadot-opengov-origins"},f=void 0,j={},w=[{value:"Polkadot OpenGov Terminology and Parameters",id:"polkadot-opengov-terminology-and-parameters",level:2},{value:"Origins and Tracks Info",id:"origins-and-tracks-info",level:2},{value:"Root",id:"root",level:3},{value:"Whitelisted Caller",id:"whitelisted-caller",level:3},{value:"Wish For Change",id:"wish-for-change",level:3},{value:"Staking Admin",id:"staking-admin",level:3},{value:"Treasurer",id:"treasurer",level:3},{value:"Lease Admin",id:"lease-admin",level:3},{value:"Fellowship Admin",id:"fellowship-admin",level:3},{value:"General Admin",id:"general-admin",level:3},{value:"Referendum Canceller",id:"referendum-canceller",level:3},{value:"Referendum Killer",id:"referendum-killer",level:3},{value:"Small Tipper",id:"small-tipper",level:3},{value:"Big Tipper",id:"big-tipper",level:3},{value:"Small Spender",id:"small-spender",level:3},{value:"Medium Spender",id:"medium-spender",level:3},{value:"Big Spender",id:"big-spender",level:3}];function P(p){const r={a:"a",admonition:"admonition",h2:"h2",h3:"h3",img:"img",p:"p",strong:"strong",...(0,e.R)(),...p.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(r.admonition,{title:"Learn more about Polkadot OpenGov",type:"info",children:(0,a.jsxs)(r.p,{children:["For background information about Polkadot OpenGov, please refer to this\n",(0,a.jsx)(r.a,{href:"/docs/learn-polkadot-opengov",children:"dedicated Wiki document"}),"."]})}),"\n",(0,a.jsx)(r.h2,{id:"polkadot-opengov-terminology-and-parameters",children:"Polkadot OpenGov Terminology and Parameters"}),"\n",(0,a.jsx)(r.p,{children:"The important parameters to be aware of when voting using the Referenda module are as follows:"}),"\n",(0,a.jsxs)(r.p,{children:[(0,a.jsx)(r.strong,{children:"Origin"})," - Each origin has a fixed set of privileges. When making a proposal, it is important to\nchoose the origin that has the privilege to execute the referenda."]}),"\n",(0,a.jsxs)(r.p,{children:[(0,a.jsx)(r.strong,{children:"Track"})," - Each track has its own dispatch origin and a preset configuration that governs the\nvoting process and parameters."]}),"\n",(0,a.jsxs)(r.p,{children:[(0,a.jsx)(r.strong,{children:"Submission Deposit"})," - The minimum amount to be used as a (refundable) deposit to submit a public\nreferendum proposal."]}),"\n",(0,a.jsxs)(r.p,{children:[(0,a.jsx)(r.strong,{children:"Prepare Period"})," - The minimum time the referendum needs to wait before it can progress to the\nnext phase after submission. Voting is enabled, but the votes do not count toward the outcome of the\nreferendum yet."]}),"\n",(0,a.jsxs)(r.p,{children:[(0,a.jsx)(r.strong,{children:"Decision Deposit"})," - This deposit is required for a referendum to progress to the decision phase\nafter the end of prepare period."]}),"\n",(0,a.jsxs)(r.p,{children:[(0,a.jsx)(r.strong,{children:"Decision Period"})," - Amount of time a decision may take to be approved to move to the confirming\nperiod. If the proposal is not approved by the end of the decision period, it gets rejected."]}),"\n",(0,a.jsxs)(r.p,{children:[(0,a.jsx)(r.strong,{children:"Max Deciding"})," - The maximum number of referenda that can be in the decision period of a track all\nat once."]}),"\n",(0,a.jsxs)(r.p,{children:[(0,a.jsx)(r.strong,{children:"Conviction"}),": A multiplier to increase voting power."]}),"\n",(0,a.jsxs)(r.p,{children:[(0,a.jsx)(r.strong,{children:"Approval"}),": the share of the approval vote-weight after adjustments for conviction against the\ntotal number of vote-weight for both approval and rejection"]}),"\n",(0,a.jsxs)(r.p,{children:[(0,a.jsx)(r.strong,{children:"Support"}),": The total number of votes in approval (ignoring adjustments for conviction) compared to\nthe total possible amount of votes that could be made in the system. Support also takes into account\nabstained votes."]}),"\n",(0,a.jsxs)(r.p,{children:[(0,a.jsx)(r.strong,{children:"Min Approval"})," - The threshold of approval (along with the min support) needed for a proposal to\nmeet the requirements of the confirm period."]}),"\n",(0,a.jsxs)(r.p,{children:[(0,a.jsx)(r.strong,{children:"Min Support"})," - The threshold of support (along with the min approval) needed for a proposal to\nmeet the requirements of the confirm period."]}),"\n",(0,a.jsxs)(r.p,{children:[(0,a.jsx)(r.strong,{children:"Confirmation Period"})," - The total time the referenda must meet both the min approval and support\ncriteria during the decision period in order to pass and enter the enactment period."]}),"\n",(0,a.jsxs)(r.p,{children:[(0,a.jsx)(r.strong,{children:"Min Enactment Period"})," - Minimum time that an approved proposal must be in the dispatch queue\nafter approval. The proposer has the option to set the enactment period to be of any value greater\nthan the min enactment period."]}),"\n",(0,a.jsx)(r.h2,{id:"origins-and-tracks-info",children:"Origins and Tracks Info"}),"\n",(0,a.jsxs)(x.A,{groupId:"tracks",values:[{label:"Polkadot",value:"polkadot"},{label:"Kusama",value:"kusama"}],children:[(0,a.jsx)(k.A,{value:"polkadot",children:(0,a.jsx)(n,{network:"polkadot",defaultValue:"Loading Polkadot Tracks..."})}),(0,a.jsx)(k.A,{value:"kusama",children:(0,a.jsx)(n,{network:"kusama",defaultValue:"Loading Kusama Tracks..."})})]}),"\n",(0,a.jsxs)(r.admonition,{type:"info",children:[(0,a.jsx)(r.p,{children:"For every referendum in each of these tracks, the Polkadot-JS UI displays interactive graphs of the\nsupport and approval."}),(0,a.jsx)(r.p,{children:(0,a.jsx)(r.img,{alt:"UI Support and Approval",src:l(24816).A+"",width:"2719",height:"1116"})})]}),"\n",(0,a.jsx)(r.h3,{id:"root",children:"Root"}),"\n",(0,a.jsxs)(x.A,{groupId:"chart",values:[{label:"Polkadot",value:"polkadot"},{label:"Kusama",value:"kusama"}],children:[(0,a.jsxs)(k.A,{value:"polkadot",children:[(0,a.jsx)(r.p,{children:"The origin with the highest level of privileges. This track requires extremely high levels of\napproval and support for early passing. The prepare and enactment periods are also large. For\ninstance, a referendum proposed in this track needs to amass 48.2% support (total network issuance)\nby the end of the first day with over 93.5% approval to be considered to be part of the confirm\nperiod. The support curve drops linearly to 25% by the end of day 14 and almost to 0% by the end of\nday 28. This ensures that the token holders receive ample time to vote on the proposal during the\ndecision period."}),(0,a.jsx)(H,{title:"",type:"line",dataId:"Root",network:"Polkadot",maxX:"672",maxY:"100"})]}),(0,a.jsxs)(k.A,{value:"kusama",children:[(0,a.jsx)(r.p,{children:"The origin with the highest level of privileges. This track requires extremely high levels of\napproval and support for early passing. The prepare and enactment periods are also large. For\ninstance, a referendum proposed in this track needs to amass 46.8% support (total network issuance)\nby the end of the first day with over 88% approval to be considered to be part of the confirm\nperiod. The support curve drops linearly to 25% by the end of day 7 and almost to 0% by the end of\nday 14. This ensures that the token holders receive ample time to vote on the proposal during the\ndecision period."}),(0,a.jsx)(H,{title:"",type:"line",dataId:"Root",network:"Kusama",maxX:"336",maxY:"100"})]})]}),"\n",(0,a.jsx)(r.h3,{id:"whitelisted-caller",children:"Whitelisted Caller"}),"\n",(0,a.jsxs)(x.A,{groupId:"chart",values:[{label:"Polkadot",value:"polkadot"},{label:"Kusama",value:"kusama"}],children:[(0,a.jsxs)(k.A,{value:"polkadot",children:[(0,a.jsxs)(r.p,{children:["Origin commanded by the ",(0,a.jsx)(r.a,{href:"/docs/learn-polkadot-technical-fellowship",children:"Fellowship"})," whitelist some\nhash of a call and allow the call to be dispatched with the root origin (after the referendum\npasses). This track allows for a shorter voting turnaround, safe in the knowledge through an open\nand transparent process for time-critical proposals. For instance, a referendum proposed in this\ntrack needs to amass 20% ",":polkadot"," support (much lesser than the root) by the end of the first day\nwith over 93.5% approval to be considered to be part of the confirm period. ",(0,a.jsx)(r.strong,{children:"Note how no referendum\non the Whitelisted track can ever pass with less than 5% support."})]}),(0,a.jsx)(H,{title:"",type:"line",dataId:"Whitelist",network:"Polkadot",maxX:"672",maxY:"100"})]}),(0,a.jsxs)(k.A,{value:"kusama",children:[(0,a.jsxs)(r.p,{children:["Origin commanded by the ",(0,a.jsx)(r.a,{href:"/docs/learn-polkadot-technical-fellowship",children:"Fellowship"})," whitelist some\nhash of a call and allow the call to be dispatched with the root origin (after the referendum\npasses). This track allows for a shorter voting turnaround, safe in the knowledge through an open\nand transparent process for time-critical proposals. For instance, a referendum proposed in this\ntrack needs to amass 14% support (much lesser than the root) by the end of the first day with over\n88% approval to be considered to be part of the confirm period. ",(0,a.jsx)(r.strong,{children:"Note how no referendum on the\nWhitelisted track can ever pass with less than 5% support."})]}),(0,a.jsx)(H,{title:"",type:"line",dataId:"Whitelist",network:"Kusama",maxX:"336",maxY:"100"})]})]}),"\n",(0,a.jsx)(r.h3,{id:"wish-for-change",children:"Wish For Change"}),"\n",(0,a.jsxs)(r.p,{children:["The Wish For Change track serves as a medium for gathering consensus through OpenGov on a proposed\nchange to the network through an ",(0,a.jsx)(r.a,{href:"/docs/glossary#remarks",children:"on-chain remark"}),". This track was\nadded to ensure the Root track, which is typically utilized for handling one referendum at a time\ndue to the sensitive nature of Root calls, is not employed to convey network desires to various\nbodies within the network. These remark statements could be voted on simultaneously because they\nlack stateful logic impacting the network. They should not delay voting on proposals requiring Root\nor be obligated to its queue. The approval/support criteria resemble Root, and passing items on this\ntrack serves as a signal for a change without conferring privileges."]}),"\n",(0,a.jsxs)(x.A,{groupId:"chart",values:[{label:"Polkadot",value:"polkadot"},{label:"Kusama",value:"kusama"}],children:[(0,a.jsx)(k.A,{value:"polkadot",children:(0,a.jsx)(H,{title:"",type:"line",dataId:"Root",network:"Polkadot",maxX:"672",maxY:"100"})}),(0,a.jsx)(k.A,{value:"kusama",children:(0,a.jsx)(H,{title:"",type:"line",dataId:"Root",network:"Kusama",maxX:"336",maxY:"100"})})]}),"\n",(0,a.jsx)(r.h3,{id:"staking-admin",children:"Staking Admin"}),"\n",(0,a.jsxs)(r.p,{children:["The origin for canceling ",(0,a.jsx)(r.a,{href:"/docs/learn-offenses",children:"slashes"}),". This origin has the privilege to execute\ncalls from the staking pallet and the Election Provider Multiphase Pallet."]}),"\n",(0,a.jsxs)(x.A,{groupId:"chart",values:[{label:"Polkadot",value:"polkadot"},{label:"Kusama",value:"kusama"}],children:[(0,a.jsx)(k.A,{value:"polkadot",children:(0,a.jsx)(H,{title:"",type:"line",dataId:"AdminStaking",network:"Polkadot",maxX:"672",maxY:"100"})}),(0,a.jsx)(k.A,{value:"kusama",children:(0,a.jsx)(H,{title:"",type:"line",dataId:"AdminStaking",network:"Kusama",maxX:"336",maxY:"100"})})]}),"\n",(0,a.jsx)(r.h3,{id:"treasurer",children:"Treasurer"}),"\n",(0,a.jsxs)(x.A,{groupId:"chart",values:[{label:"Polkadot",value:"polkadot"},{label:"Kusama",value:"kusama"}],children:[(0,a.jsxs)(k.A,{value:"polkadot",children:[(0,a.jsx)(r.p,{children:"The origin for spending funds from the treasury (up to 10M DOT). This origin has the privilege to\nexecute calls from the Treasury pallet."}),(0,a.jsxs)(r.p,{children:[(0,a.jsx)(H,{title:"",type:"line",dataId:"Treasurer",network:"Polkadot",maxX:"672",maxY:"100"})," ",":polkadot"]})]}),(0,a.jsxs)(k.A,{value:"kusama",children:[(0,a.jsx)(r.p,{children:"The origin for spending funds from the treasury (up to 333333.33 KSM). This origin has the privilege\nto execute calls from the Treasury pallet."}),(0,a.jsx)(H,{title:"",type:"line",dataId:"Treasurer",network:"Kusama",maxX:"336",maxY:"100"})]})]}),"\n",(0,a.jsx)(r.h3,{id:"lease-admin",children:"Lease Admin"}),"\n",(0,a.jsx)(r.p,{children:"Origin can force slot leases. This origin has the privilege to execute calls from the Slots pallet."}),"\n",(0,a.jsxs)(x.A,{groupId:"chart",values:[{label:"Polkadot",value:"polkadot"},{label:"Kusama",value:"kusama"}],children:[(0,a.jsx)(k.A,{value:"polkadot",children:(0,a.jsx)(H,{title:"",type:"line",dataId:"AdminLease",network:"Polkadot",maxX:"672",maxY:"100"})}),(0,a.jsx)(k.A,{value:"kusama",children:(0,a.jsx)(H,{title:"",type:"line",dataId:"AdminLease",network:"Kusama",maxX:"336",maxY:"100"})})]}),"\n",(0,a.jsx)(r.h3,{id:"fellowship-admin",children:"Fellowship Admin"}),"\n",(0,a.jsx)(r.p,{children:"The origin for managing the composition of the fellowship."}),"\n",(0,a.jsxs)(x.A,{groupId:"chart",values:[{label:"Polkadot",value:"polkadot"},{label:"Kusama",value:"kusama"}],children:[(0,a.jsx)(k.A,{value:"polkadot",children:(0,a.jsx)(H,{title:"",type:"line",dataId:"AdminFellowship",network:"Polkadot",maxX:"672",maxY:"100"})}),(0,a.jsx)(k.A,{value:"kusama",children:(0,a.jsx)(H,{title:"",type:"line",dataId:"AdminFellowship",network:"Kusama",maxX:"336",maxY:"100"})})]}),"\n",(0,a.jsx)(r.h3,{id:"general-admin",children:"General Admin"}),"\n",(0,a.jsx)(r.p,{children:"The origin managing the registrar and permissioned HRMP channel operations."}),"\n",(0,a.jsxs)(x.A,{groupId:"chart",values:[{label:"Polkadot",value:"polkadot"},{label:"Kusama",value:"kusama"}],children:[(0,a.jsx)(k.A,{value:"polkadot",children:(0,a.jsx)(H,{title:"",type:"line",dataId:"AdminGeneral",network:"Polkadot",maxX:"672",maxY:"100"})}),(0,a.jsx)(k.A,{value:"kusama",children:(0,a.jsx)(H,{title:"",type:"line",dataId:"AdminGeneral",network:"Kusama",maxX:"336",maxY:"100"})})]}),"\n",(0,a.jsx)(r.h3,{id:"referendum-canceller",children:"Referendum Canceller"}),"\n",(0,a.jsx)(r.p,{children:"The origin can cancel referenda. This track has a low lead time and approval/support curves with\nslightly sharper reductions in their thresholds for passing."}),"\n",(0,a.jsxs)(x.A,{groupId:"chart",values:[{label:"Polkadot",value:"polkadot"},{label:"Kusama",value:"kusama"}],children:[(0,a.jsx)(k.A,{value:"polkadot",children:(0,a.jsx)(H,{title:"",type:"line",dataId:"RefCanceller",network:"Polkadot",maxX:"672",maxY:"100"})}),(0,a.jsx)(k.A,{value:"kusama",children:(0,a.jsx)(H,{title:"",type:"line",dataId:"RefCanceller",network:"Kusama",maxX:"336",maxY:"100"})})]}),"\n",(0,a.jsx)(r.h3,{id:"referendum-killer",children:"Referendum Killer"}),"\n",(0,a.jsx)(r.p,{children:"The origin can cancel an ongoing referendum and slash the deposits. This track also has a low\nlead-time and approval/support curves with slightly sharper reductions in their thresholds for\npassing."}),"\n",(0,a.jsxs)(x.A,{groupId:"chart",values:[{label:"Polkadot",value:"polkadot"},{label:"Kusama",value:"kusama"}],children:[(0,a.jsx)(k.A,{value:"polkadot",children:(0,a.jsx)(H,{title:"",type:"line",dataId:"RefKiller",network:"Polkadot",maxX:"672",maxY:"100"})}),(0,a.jsx)(k.A,{value:"kusama",children:(0,a.jsx)(H,{title:"",type:"line",dataId:"RefKiller",network:"Kusama",maxX:"336",maxY:"100"})})]}),"\n",(0,a.jsx)(r.h3,{id:"small-tipper",children:"Small Tipper"}),"\n",(0,a.jsxs)(x.A,{groupId:"chart",values:[{label:"Polkadot",value:"polkadot"},{label:"Kusama",value:"kusama"}],children:[(0,a.jsxs)(k.A,{value:"polkadot",children:[(0,a.jsx)(r.p,{children:"Origin able to spend up to 250 DOT from the treasury at once."}),(0,a.jsx)(H,{title:"",type:"line",dataId:"SmallTipper",network:"Polkadot",maxX:"672",maxY:"100"})]}),(0,a.jsxs)(k.A,{value:"kusama",children:[(0,a.jsx)(r.p,{children:"Origin able to spend up to 8.25 KSM from the treasury at once."}),(0,a.jsx)(H,{title:"",type:"line",dataId:"SmallTipper",network:"Kusama",maxX:"336",maxY:"100"})]})]}),"\n",(0,a.jsx)(r.h3,{id:"big-tipper",children:"Big Tipper"}),"\n",(0,a.jsxs)(x.A,{groupId:"chart",values:[{label:"Polkadot",value:"polkadot"},{label:"Kusama",value:"kusama"}],children:[(0,a.jsxs)(k.A,{value:"polkadot",children:[(0,a.jsx)(r.p,{children:"Origin able to spend up to 1000 DOT from the treasury at once."}),(0,a.jsx)(H,{title:"",type:"line",dataId:"BigTipper",network:"Polkadot",maxX:"672",maxY:"100"})]}),(0,a.jsxs)(k.A,{value:"kusama",children:[(0,a.jsx)(r.p,{children:"Origin able to spend up to 33.33 KSM from the treasury at once."}),(0,a.jsx)(H,{title:"",type:"line",dataId:"BigTipper",network:"Kusama",maxX:"336",maxY:"100"})]})]}),"\n",(0,a.jsx)(r.h3,{id:"small-spender",children:"Small Spender"}),"\n",(0,a.jsxs)(x.A,{groupId:"chart",values:[{label:"Polkadot",value:"polkadot"},{label:"Kusama",value:"kusama"}],children:[(0,a.jsxs)(k.A,{value:"polkadot",children:[(0,a.jsx)(r.p,{children:"Origin able to spend up to 10000 DOT from the treasury at once."}),(0,a.jsx)(H,{title:"",type:"line",dataId:"SmallSpender",network:"Polkadot",maxX:"672",maxY:"100"})]}),(0,a.jsxs)(k.A,{value:"kusama",children:[(0,a.jsx)(r.p,{children:"Origin able to spend up to 333.33 KSM from the treasury at once."}),(0,a.jsx)(H,{title:"",type:"line",dataId:"SmallSpender",network:"Kusama",maxX:"336",maxY:"100"})]})]}),"\n",(0,a.jsx)(r.h3,{id:"medium-spender",children:"Medium Spender"}),"\n",(0,a.jsxs)(x.A,{groupId:"chart",values:[{label:"Polkadot",value:"polkadot"},{label:"Kusama",value:"kusama"}],children:[(0,a.jsxs)(k.A,{value:"polkadot",children:[(0,a.jsx)(r.p,{children:"Origin able to spend up to 100000 DOT from the treasury at once."}),(0,a.jsx)(H,{title:"",type:"line",dataId:"MediumSpender",network:"Polkadot",maxX:"672",maxY:"100"})]}),(0,a.jsxs)(k.A,{value:"kusama",children:[(0,a.jsx)(r.p,{children:"Origin able to spend up to 3333.33 KSM from the treasury at once."}),(0,a.jsx)(H,{title:"",type:"line",dataId:"MediumSpender",network:"Kusama",maxX:"336",maxY:"100"})]})]}),"\n",(0,a.jsx)(r.h3,{id:"big-spender",children:"Big Spender"}),"\n",(0,a.jsxs)(x.A,{groupId:"chart",values:[{label:"Polkadot",value:"polkadot"},{label:"Kusama",value:"kusama"}],children:[(0,a.jsxs)(k.A,{value:"polkadot",children:[(0,a.jsx)(r.p,{children:"Origin able to spend up to 1000000 DOT from the treasury at once."}),(0,a.jsx)(H,{title:"",type:"line",dataId:"BigSpender",network:"Polkadot",maxX:"672",maxY:"100"})]}),(0,a.jsxs)(k.A,{value:"kusama",children:[(0,a.jsx)(r.p,{children:"Origin able to spend up to 33333.33 KSM from the treasury at once."}),(0,a.jsx)(H,{title:"",type:"line",dataId:"BigSpender",network:"Kusama",maxX:"336",maxY:"100"})]})]})]})}function O(p={}){const{wrapper:r}={...(0,e.R)(),...p.components};return r?(0,a.jsx)(r,{...p,children:(0,a.jsx)(P,{...p})}):P(p)}},7935:(p,r,l)=>{var o=l(92085),a=l(77256),e=l(39379),t=l(75029),s=l(77062),i=l(37329),u=l(54638),_=l(19752),v=l(76682),b=l(84301),m=l(24616),h=l(78760),d=l(16234),n=l(23738),y=l(27289),A=l(83620),S=l(6303),c=l(51953),T=l(16066),H=l(40149),x=l(17802),k=l(54924),g=l(50902),f=l(56041),j=l(95036),w=l(54836),P=l(90398),O=l(39046);p.exports={KusamaRoot:y,KusamaWhitelist:O,KusamaTreasurer:P,KusamaBigTipper:g,KusamaSmallTipper:f,KusamaRefKiller:w,KusamaRefCanceller:j,KusamaBigSpender:H,KusamaMediumSpender:x,KusamaSmallSpender:k,KusamaAdminFellowship:A,KusamaAdminGeneral:S,KusamaAdminLease:c,KusamaAdminStaking:T,PolkadotRoot:o,PolkadotWhitelist:n,PolkadotTreasurer:d,PolkadotBigTipper:v,PolkadotSmallTipper:b,PolkadotRefKiller:h,PolkadotRefCanceller:m,PolkadotBigSpender:i,PolkadotMediumSpender:u,PolkadotSmallSpender:_,PolkadotAdminFellowship:a,PolkadotAdminGeneral:e,PolkadotAdminLease:t,PolkadotAdminStaking:s}},24816:(p,r,l)=>{"use strict";l.d(r,{A:()=>o});const o=l.p+"assets/images/support-approval-polkadot-js-ui-166ce95f9cf31c1e65b1b57d38dbec73.png"},47790:()=>{},83620:p=>{"use strict";p.exports=JSON.parse('[{"time_hours":0,"approval_perbill":1000000000,"support_perbill":500000026,"approval":100,"support":50.0000026},{"time_hours":1,"approval_perbill":997549020,"support_perbill":418401359,"approval":99.754902,"support":41.8401359},{"time_hours":2,"approval_perbill":995098040,"support_perbill":359397443,"approval":99.509804,"support":35.9397443},{"time_hours":3,"approval_perbill":992647060,"support_perbill":314744813,"approval":99.264706,"support":31.4744813},{"time_hours":4,"approval_perbill":990196080,"support_perbill":279775293,"approval":99.019608,"support":27.9775293},{"time_hours":5,"approval_perbill":987745099,"support_perbill":251647242,"approval":98.7745099,"support":25.1647242},{"time_hours":6,"approval_perbill":985294119,"support_perbill":228531862,"approval":98.5294119,"support":22.8531862},{"time_hours":7,"approval_perbill":982843138,"support_perbill":209198815,"approval":98.2843138,"support":20.9198815},{"time_hours":8,"approval_perbill":980392158,"support_perbill":192789972,"approval":98.0392158,"support":19.2789972},{"time_hours":9,"approval_perbill":977941177,"support_perbill":178688524,"approval":97.7941177,"support":17.8688524},{"time_hours":10,"approval_perbill":975490197,"support_perbill":166439756,"approval":97.5490197,"support":16.6439756},{"time_hours":11,"approval_perbill":973039216,"support_perbill":155701053,"approval":97.3039216,"support":15.5701053},{"time_hours":12,"approval_perbill":970588236,"support_perbill":146209386,"approval":97.0588236,"support":14.6209386},{"time_hours":13,"approval_perbill":968137256,"support_perbill":137759452,"approval":96.8137256,"support":13.7759452},{"time_hours":14,"approval_perbill":965686276,"support_perbill":130188679,"approval":96.5686276,"support":13.0188679},{"time_hours":15,"approval_perbill":963235295,"support_perbill":123366639,"approval":96.3235295,"support":12.3366639},{"time_hours":16,"approval_perbill":960784315,"support_perbill":117187499,"approval":96.0784315,"support":11.7187499},{"time_hours":17,"approval_perbill":958333334,"support_perbill":111564465,"approval":95.8333334,"support":11.1564465},{"time_hours":18,"approval_perbill":955882354,"support_perbill":106425701,"approval":95.5882354,"support":10.6425701},{"time_hours":19,"approval_perbill":953431373,"support_perbill":101711228,"approval":95.3431373,"support":10.1711228},{"time_hours":20,"approval_perbill":950980393,"support_perbill":97370582,"approval":95.0980393,"support":9.7370582},{"time_hours":21,"approval_perbill":948529412,"support_perbill":93360994,"approval":94.8529412,"support":9.3360994},{"time_hours":22,"approval_perbill":946078432,"support_perbill":89645982,"approval":94.6078432,"support":8.9645982},{"time_hours":23,"approval_perbill":943627452,"support_perbill":86194234,"approval":94.3627452,"support":8.6194234},{"time_hours":24,"approval_perbill":941176471,"support_perbill":82978722,"approval":94.1176471,"support":8.2978722},{"time_hours":25,"approval_perbill":938725491,"support_perbill":79975997,"approval":93.8725491,"support":7.9975997},{"time_hours":26,"approval_perbill":936274511,"support_perbill":77165614,"approval":93.6274511,"support":7.7165614},{"time_hours":27,"approval_perbill":933823531,"support_perbill":74529666,"approval":93.3823531,"support":7.4529666},{"time_hours":28,"approval_perbill":931372550,"support_perbill":72052400,"approval":93.137255,"support":7.20524},{"time_hours":29,"approval_perbill":928921570,"support_perbill":69719908,"approval":92.892157,"support":6.9719908},{"time_hours":30,"approval_perbill":926470589,"support_perbill":67519857,"approval":92.6470589,"support":6.7519857},{"time_hours":31,"approval_perbill":924019609,"support_perbill":65441280,"approval":92.4019609,"support":6.544128},{"time_hours":32,"approval_perbill":921568628,"support_perbill":63474386,"approval":92.1568628,"support":6.3474386},{"time_hours":33,"approval_perbill":919117648,"support_perbill":61610409,"approval":91.9117648,"support":6.1610409},{"time_hours":34,"approval_perbill":916666667,"support_perbill":59841478,"approval":91.6666667,"support":5.9841478},{"time_hours":35,"approval_perbill":914215687,"support_perbill":58160504,"approval":91.4215687,"support":5.8160504},{"time_hours":36,"approval_perbill":911764706,"support_perbill":56561084,"approval":91.1764706,"support":5.6561084},{"time_hours":37,"approval_perbill":909313726,"support_perbill":55037426,"approval":90.9313726,"support":5.5037426},{"time_hours":38,"approval_perbill":906862746,"support_perbill":53584271,"approval":90.6862746,"support":5.3584271},{"time_hours":39,"approval_perbill":904411766,"support_perbill":52196835,"approval":90.4411766,"support":5.2196835},{"time_hours":40,"approval_perbill":901960785,"support_perbill":50870759,"approval":90.1960785,"support":5.0870759},{"time_hours":41,"approval_perbill":899509805,"support_perbill":49602061,"approval":89.9509805,"support":4.9602061},{"time_hours":42,"approval_perbill":897058824,"support_perbill":48387095,"approval":89.7058824,"support":4.8387095},{"time_hours":43,"approval_perbill":894607844,"support_perbill":47222519,"approval":89.4607844,"support":4.7222519},{"time_hours":44,"approval_perbill":892156864,"support_perbill":46105262,"approval":89.2156864,"support":4.6105262},{"time_hours":45,"approval_perbill":889705883,"support_perbill":45032496,"approval":88.9705883,"support":4.5032496},{"time_hours":46,"approval_perbill":887254903,"support_perbill":44001617,"approval":88.7254903,"support":4.4001617},{"time_hours":47,"approval_perbill":884803922,"support_perbill":43010218,"approval":88.4803922,"support":4.3010218},{"time_hours":48,"approval_perbill":882352942,"support_perbill":42056074,"approval":88.2352942,"support":4.2056074},{"time_hours":49,"approval_perbill":879901962,"support_perbill":41137122,"approval":87.9901962,"support":4.1137122},{"time_hours":50,"approval_perbill":877450982,"support_perbill":40251453,"approval":87.7450982,"support":4.0251453},{"time_hours":51,"approval_perbill":875000001,"support_perbill":39397289,"approval":87.5000001,"support":3.9397289},{"time_hours":52,"approval_perbill":872549021,"support_perbill":38572980,"approval":87.2549021,"support":3.857298},{"time_hours":53,"approval_perbill":870098040,"support_perbill":37776985,"approval":87.009804,"support":3.7776985},{"time_hours":54,"approval_perbill":867647060,"support_perbill":37007873,"approval":86.764706,"support":3.7007873},{"time_hours":55,"approval_perbill":865196079,"support_perbill":36264302,"approval":86.5196079,"support":3.6264302},{"time_hours":56,"approval_perbill":862745099,"support_perbill":35545023,"approval":86.2745099,"support":3.5545023},{"time_hours":57,"approval_perbill":860294118,"support_perbill":34848862,"approval":86.0294118,"support":3.4848862},{"time_hours":58,"approval_perbill":857843138,"support_perbill":34174724,"approval":85.7843138,"support":3.4174724},{"time_hours":59,"approval_perbill":855392157,"support_perbill":33521580,"approval":85.5392157,"support":3.352158},{"time_hours":60,"approval_perbill":852941177,"support_perbill":32888464,"approval":85.2941177,"support":3.2888464},{"time_hours":61,"approval_perbill":850490197,"support_perbill":32274469,"approval":85.0490197,"support":3.2274469},{"time_hours":62,"approval_perbill":848039217,"support_perbill":31678741,"approval":84.8039217,"support":3.1678741},{"time_hours":63,"approval_perbill":845588236,"support_perbill":31100477,"approval":84.5588236,"support":3.1100477},{"time_hours":64,"approval_perbill":843137256,"support_perbill":30538921,"approval":84.3137256,"support":3.0538921},{"time_hours":65,"approval_perbill":840686276,"support_perbill":29993358,"approval":84.0686276,"support":2.9993358},{"time_hours":66,"approval_perbill":838235295,"support_perbill":29463116,"approval":83.8235295,"support":2.9463116},{"time_hours":67,"approval_perbill":835784315,"support_perbill":28947556,"approval":83.5784315,"support":2.8947556},{"time_hours":68,"approval_perbill":833333334,"support_perbill":28446079,"approval":83.3333334,"support":2.8446079},{"time_hours":69,"approval_perbill":830882354,"support_perbill":27958114,"approval":83.0882354,"support":2.7958114},{"time_hours":70,"approval_perbill":828431373,"support_perbill":27483123,"approval":82.8431373,"support":2.7483123},{"time_hours":71,"approval_perbill":825980393,"support_perbill":27020596,"approval":82.5980393,"support":2.7020596},{"time_hours":72,"approval_perbill":823529412,"support_perbill":26570047,"approval":82.3529412,"support":2.6570047},{"time_hours":73,"approval_perbill":821078432,"support_perbill":26131019,"approval":82.1078432,"support":2.6131019},{"time_hours":74,"approval_perbill":818627452,"support_perbill":25703073,"approval":81.8627452,"support":2.5703073},{"time_hours":75,"approval_perbill":816176472,"support_perbill":25285796,"approval":81.6176472,"support":2.5285796},{"time_hours":76,"approval_perbill":813725491,"support_perbill":24878795,"approval":81.3725491,"support":2.4878795},{"time_hours":77,"approval_perbill":811274511,"support_perbill":24481693,"approval":81.1274511,"support":2.4481693},{"time_hours":78,"approval_perbill":808823530,"support_perbill":24094134,"approval":80.882353,"support":2.4094134},{"time_hours":79,"approval_perbill":806372550,"support_perbill":23715779,"approval":80.637255,"support":2.3715779},{"time_hours":80,"approval_perbill":803921569,"support_perbill":23346303,"approval":80.3921569,"support":2.3346303},{"time_hours":81,"approval_perbill":801470589,"support_perbill":22985397,"approval":80.1470589,"support":2.2985397},{"time_hours":82,"approval_perbill":799019608,"support_perbill":22632766,"approval":79.9019608,"support":2.2632766},{"time_hours":83,"approval_perbill":796568628,"support_perbill":22288130,"approval":79.6568628,"support":2.228813},{"time_hours":84,"approval_perbill":794117648,"support_perbill":21951219,"approval":79.4117648,"support":2.1951219},{"time_hours":85,"approval_perbill":791666668,"support_perbill":21621776,"approval":79.1666668,"support":2.1621776},{"time_hours":86,"approval_perbill":789215688,"support_perbill":21299556,"approval":78.9215688,"support":2.1299556},{"time_hours":87,"approval_perbill":786764707,"support_perbill":20984324,"approval":78.6764707,"support":2.0984324},{"time_hours":88,"approval_perbill":784313727,"support_perbill":20675855,"approval":78.4313727,"support":2.0675855},{"time_hours":89,"approval_perbill":781862746,"support_perbill":20373934,"approval":78.1862746,"support":2.0373934},{"time_hours":90,"approval_perbill":779411766,"support_perbill":20078354,"approval":77.9411766,"support":2.0078354},{"time_hours":91,"approval_perbill":776960785,"support_perbill":19788917,"approval":77.6960785,"support":1.9788917},{"time_hours":92,"approval_perbill":774509805,"support_perbill":19505435,"approval":77.4509805,"support":1.9505435},{"time_hours":93,"approval_perbill":772058824,"support_perbill":19227725,"approval":77.2058824,"support":1.9227725},{"time_hours":94,"approval_perbill":769607844,"support_perbill":18955613,"approval":76.9607844,"support":1.8955613},{"time_hours":95,"approval_perbill":767156863,"support_perbill":18688931,"approval":76.7156863,"support":1.8688931},{"time_hours":96,"approval_perbill":764705883,"support_perbill":18427518,"approval":76.4705883,"support":1.8427518},{"time_hours":97,"approval_perbill":762254903,"support_perbill":18171219,"approval":76.2254903,"support":1.8171219},{"time_hours":98,"approval_perbill":759803923,"support_perbill":17919887,"approval":75.9803923,"support":1.7919887},{"time_hours":99,"approval_perbill":757352942,"support_perbill":17673377,"approval":75.7352942,"support":1.7673377},{"time_hours":100,"approval_perbill":754901962,"support_perbill":17431553,"approval":75.4901962,"support":1.7431553},{"time_hours":101,"approval_perbill":752450981,"support_perbill":17194282,"approval":75.2450981,"support":1.7194282},{"time_hours":102,"approval_perbill":750000001,"support_perbill":16961437,"approval":75.0000001,"support":1.6961437},{"time_hours":103,"approval_perbill":747549020,"support_perbill":16732895,"approval":74.754902,"support":1.6732895},{"time_hours":104,"approval_perbill":745098040,"support_perbill":16508538,"approval":74.509804,"support":1.6508538},{"time_hours":105,"approval_perbill":742647059,"support_perbill":16288252,"approval":74.2647059,"support":1.6288252},{"time_hours":106,"approval_perbill":740196079,"support_perbill":16071927,"approval":74.0196079,"support":1.6071927},{"time_hours":107,"approval_perbill":737745099,"support_perbill":15859457,"approval":73.7745099,"support":1.5859457},{"time_hours":108,"approval_perbill":735294118,"support_perbill":15650741,"approval":73.5294118,"support":1.5650741},{"time_hours":109,"approval_perbill":732843138,"support_perbill":15445679,"approval":73.2843138,"support":1.5445679},{"time_hours":110,"approval_perbill":730392158,"support_perbill":15244176,"approval":73.0392158,"support":1.5244176},{"time_hours":111,"approval_perbill":727941178,"support_perbill":15046141,"approval":72.7941178,"support":1.5046141},{"time_hours":112,"approval_perbill":725490197,"support_perbill":14851485,"approval":72.5490197,"support":1.4851485},{"time_hours":113,"approval_perbill":723039217,"support_perbill":14660121,"approval":72.3039217,"support":1.4660121},{"time_hours":114,"approval_perbill":720588236,"support_perbill":14471968,"approval":72.0588236,"support":1.4471968},{"time_hours":115,"approval_perbill":718137256,"support_perbill":14286945,"approval":71.8137256,"support":1.4286945},{"time_hours":116,"approval_perbill":715686275,"support_perbill":14104975,"approval":71.5686275,"support":1.4104975},{"time_hours":117,"approval_perbill":713235295,"support_perbill":13925982,"approval":71.3235295,"support":1.3925982},{"time_hours":118,"approval_perbill":710784314,"support_perbill":13749894,"approval":71.0784314,"support":1.3749894},{"time_hours":119,"approval_perbill":708333334,"support_perbill":13576642,"approval":70.8333334,"support":1.3576642},{"time_hours":120,"approval_perbill":705882353,"support_perbill":13406156,"approval":70.5882353,"support":1.3406156},{"time_hours":121,"approval_perbill":703431373,"support_perbill":13238372,"approval":70.3431373,"support":1.3238372},{"time_hours":122,"approval_perbill":700980393,"support_perbill":13073226,"approval":70.0980393,"support":1.3073226},{"time_hours":123,"approval_perbill":698529413,"support_perbill":12910655,"approval":69.8529413,"support":1.2910655},{"time_hours":124,"approval_perbill":696078432,"support_perbill":12750601,"approval":69.6078432,"support":1.2750601},{"time_hours":125,"approval_perbill":693627452,"support_perbill":12593005,"approval":69.3627452,"support":1.2593005},{"time_hours":126,"approval_perbill":691176471,"support_perbill":12437810,"approval":69.1176471,"support":1.243781},{"time_hours":127,"approval_perbill":688725491,"support_perbill":12284964,"approval":68.8725491,"support":1.2284964},{"time_hours":128,"approval_perbill":686274511,"support_perbill":12134411,"approval":68.6274511,"support":1.2134411},{"time_hours":129,"approval_perbill":683823530,"support_perbill":11986103,"approval":68.382353,"support":1.1986103},{"time_hours":130,"approval_perbill":681372550,"support_perbill":11839987,"approval":68.137255,"support":1.1839987},{"time_hours":131,"approval_perbill":678921569,"support_perbill":11696017,"approval":67.8921569,"support":1.1696017},{"time_hours":132,"approval_perbill":676470589,"support_perbill":11554145,"approval":67.6470589,"support":1.1554145},{"time_hours":133,"approval_perbill":674019609,"support_perbill":11414326,"approval":67.4019609,"support":1.1414326},{"time_hours":134,"approval_perbill":671568629,"support_perbill":11276516,"approval":67.1568629,"support":1.1276516},{"time_hours":135,"approval_perbill":669117648,"support_perbill":11140671,"approval":66.9117648,"support":1.1140671},{"time_hours":136,"approval_perbill":666666668,"support_perbill":11006750,"approval":66.6666668,"support":1.100675},{"time_hours":137,"approval_perbill":664215687,"support_perbill":10874713,"approval":66.4215687,"support":1.0874713},{"time_hours":138,"approval_perbill":661764707,"support_perbill":10744519,"approval":66.1764707,"support":1.0744519},{"time_hours":139,"approval_perbill":659313726,"support_perbill":10616130,"approval":65.9313726,"support":1.061613},{"time_hours":140,"approval_perbill":656862746,"support_perbill":10489510,"approval":65.6862746,"support":1.048951},{"time_hours":141,"approval_perbill":654411765,"support_perbill":10364622,"approval":65.4411765,"support":1.0364622},{"time_hours":142,"approval_perbill":651960785,"support_perbill":10241430,"approval":65.1960785,"support":1.024143},{"time_hours":143,"approval_perbill":649509804,"support_perbill":10119900,"approval":64.9509804,"support":1.01199},{"time_hours":144,"approval_perbill":647058824,"support_perbill":10000000,"approval":64.7058824,"support":1},{"time_hours":145,"approval_perbill":644607844,"support_perbill":9881695,"approval":64.4607844,"support":0.9881695},{"time_hours":146,"approval_perbill":642156864,"support_perbill":9764955,"approval":64.2156864,"support":0.9764955},{"time_hours":147,"approval_perbill":639705883,"support_perbill":9649749,"approval":63.9705883,"support":0.9649749},{"time_hours":148,"approval_perbill":637254903,"support_perbill":9536047,"approval":63.7254903,"support":0.9536047},{"time_hours":149,"approval_perbill":634803923,"support_perbill":9423820,"approval":63.4803923,"support":0.942382},{"time_hours":150,"approval_perbill":632352942,"support_perbill":9313038,"approval":63.2352942,"support":0.9313038},{"time_hours":151,"approval_perbill":629901962,"support_perbill":9203674,"approval":62.9901962,"support":0.9203674},{"time_hours":152,"approval_perbill":627450981,"support_perbill":9095702,"approval":62.7450981,"support":0.9095702},{"time_hours":153,"approval_perbill":625000001,"support_perbill":8989095,"approval":62.5000001,"support":0.8989095},{"time_hours":154,"approval_perbill":622549020,"support_perbill":8883826,"approval":62.254902,"support":0.8883826},{"time_hours":155,"approval_perbill":620098040,"support_perbill":8779872,"approval":62.009804,"support":0.8779872},{"time_hours":156,"approval_perbill":617647059,"support_perbill":8677207,"approval":61.7647059,"support":0.8677207},{"time_hours":157,"approval_perbill":615196079,"support_perbill":8575808,"approval":61.5196079,"support":0.8575808},{"time_hours":158,"approval_perbill":612745099,"support_perbill":8475652,"approval":61.2745099,"support":0.8475652},{"time_hours":159,"approval_perbill":610294119,"support_perbill":8376715,"approval":61.0294119,"support":0.8376715},{"time_hours":160,"approval_perbill":607843138,"support_perbill":8278976,"approval":60.7843138,"support":0.8278976},{"time_hours":161,"approval_perbill":605392158,"support_perbill":8182413,"approval":60.5392158,"support":0.8182413},{"time_hours":162,"approval_perbill":602941177,"support_perbill":8087005,"approval":60.2941177,"support":0.8087005},{"time_hours":163,"approval_perbill":600490197,"support_perbill":7992731,"approval":60.0490197,"support":0.7992731},{"time_hours":164,"approval_perbill":598039216,"support_perbill":7899571,"approval":59.8039216,"support":0.7899571},{"time_hours":165,"approval_perbill":595588236,"support_perbill":7807506,"approval":59.5588236,"support":0.7807506},{"time_hours":166,"approval_perbill":593137255,"support_perbill":7716516,"approval":59.3137255,"support":0.7716516},{"time_hours":167,"approval_perbill":590686275,"support_perbill":7626583,"approval":59.0686275,"support":0.7626583},{"time_hours":168,"approval_perbill":588235295,"support_perbill":7537688,"approval":58.8235295,"support":0.7537688},{"time_hours":169,"approval_perbill":585784315,"support_perbill":7449814,"approval":58.5784315,"support":0.7449814},{"time_hours":170,"approval_perbill":583333335,"support_perbill":7362942,"approval":58.3333335,"support":0.7362942},{"time_hours":171,"approval_perbill":580882354,"support_perbill":7277057,"approval":58.0882354,"support":0.7277057},{"time_hours":172,"approval_perbill":578431374,"support_perbill":7192141,"approval":57.8431374,"support":0.7192141},{"time_hours":173,"approval_perbill":575980393,"support_perbill":7108178,"approval":57.5980393,"support":0.7108178},{"time_hours":174,"approval_perbill":573529413,"support_perbill":7025151,"approval":57.3529413,"support":0.7025151},{"time_hours":175,"approval_perbill":571078432,"support_perbill":6943047,"approval":57.1078432,"support":0.6943047},{"time_hours":176,"approval_perbill":568627452,"support_perbill":6861848,"approval":56.8627452,"support":0.6861848},{"time_hours":177,"approval_perbill":566176471,"support_perbill":6781540,"approval":56.6176471,"support":0.678154},{"time_hours":178,"approval_perbill":563725491,"support_perbill":6702109,"approval":56.3725491,"support":0.6702109},{"time_hours":179,"approval_perbill":561274510,"support_perbill":6623541,"approval":56.127451,"support":0.6623541},{"time_hours":180,"approval_perbill":558823530,"support_perbill":6545820,"approval":55.882353,"support":0.654582},{"time_hours":181,"approval_perbill":556372550,"support_perbill":6468935,"approval":55.637255,"support":0.6468935},{"time_hours":182,"approval_perbill":553921570,"support_perbill":6392871,"approval":55.392157,"support":0.6392871},{"time_hours":183,"approval_perbill":551470589,"support_perbill":6317615,"approval":55.1470589,"support":0.6317615},{"time_hours":184,"approval_perbill":549019609,"support_perbill":6243154,"approval":54.9019609,"support":0.6243154},{"time_hours":185,"approval_perbill":546568628,"support_perbill":6169476,"approval":54.6568628,"support":0.6169476},{"time_hours":186,"approval_perbill":544117648,"support_perbill":6096569,"approval":54.4117648,"support":0.6096569},{"time_hours":187,"approval_perbill":541666667,"support_perbill":6024421,"approval":54.1666667,"support":0.6024421},{"time_hours":188,"approval_perbill":539215687,"support_perbill":5953019,"approval":53.9215687,"support":0.5953019},{"time_hours":189,"approval_perbill":536764706,"support_perbill":5882353,"approval":53.6764706,"support":0.5882353},{"time_hours":190,"approval_perbill":534313726,"support_perbill":5812410,"approval":53.4313726,"support":0.581241},{"time_hours":191,"approval_perbill":531862746,"support_perbill":5743181,"approval":53.1862746,"support":0.5743181},{"time_hours":192,"approval_perbill":529411765,"support_perbill":5674653,"approval":52.9411765,"support":0.5674653},{"time_hours":193,"approval_perbill":526960785,"support_perbill":5606817,"approval":52.6960785,"support":0.5606817},{"time_hours":194,"approval_perbill":524509805,"support_perbill":5539662,"approval":52.4509805,"support":0.5539662},{"time_hours":195,"approval_perbill":522058825,"support_perbill":5473177,"approval":52.2058825,"support":0.5473177},{"time_hours":196,"approval_perbill":519607844,"support_perbill":5407354,"approval":51.9607844,"support":0.5407354},{"time_hours":197,"approval_perbill":517156864,"support_perbill":5342181,"approval":51.7156864,"support":0.5342181},{"time_hours":198,"approval_perbill":514705883,"support_perbill":5277650,"approval":51.4705883,"support":0.527765},{"time_hours":199,"approval_perbill":512254903,"support_perbill":5213751,"approval":51.2254903,"support":0.5213751},{"time_hours":200,"approval_perbill":509803922,"support_perbill":5150474,"approval":50.9803922,"support":0.5150474},{"time_hours":201,"approval_perbill":507352942,"support_perbill":5087812,"approval":50.7352942,"support":0.5087812},{"time_hours":202,"approval_perbill":504901961,"support_perbill":5025754,"approval":50.4901961,"support":0.5025754},{"time_hours":203,"approval_perbill":502450981,"support_perbill":4964292,"approval":50.2450981,"support":0.4964292},{"time_hours":204,"approval_perbill":500000000,"support_perbill":4903417,"approval":50,"support":0.4903417},{"time_hours":205,"approval_perbill":500000000,"support_perbill":4843122,"approval":50,"support":0.4843122},{"time_hours":206,"approval_perbill":500000000,"support_perbill":4783398,"approval":50,"support":0.4783398},{"time_hours":207,"approval_perbill":500000000,"support_perbill":4724236,"approval":50,"support":0.4724236},{"time_hours":208,"approval_perbill":500000000,"support_perbill":4665630,"approval":50,"support":0.466563},{"time_hours":209,"approval_perbill":500000000,"support_perbill":4607570,"approval":50,"support":0.460757},{"time_hours":210,"approval_perbill":500000000,"support_perbill":4550050,"approval":50,"support":0.455005},{"time_hours":211,"approval_perbill":500000000,"support_perbill":4493062,"approval":50,"support":0.4493062},{"time_hours":212,"approval_perbill":500000000,"support_perbill":4436599,"approval":50,"support":0.4436599},{"time_hours":213,"approval_perbill":500000000,"support_perbill":4380654,"approval":50,"support":0.4380654},{"time_hours":214,"approval_perbill":500000000,"support_perbill":4325218,"approval":50,"support":0.4325218},{"time_hours":215,"approval_perbill":500000000,"support_perbill":4270287,"approval":50,"support":0.4270287},{"time_hours":216,"approval_perbill":500000000,"support_perbill":4215851,"approval":50,"support":0.4215851},{"time_hours":217,"approval_perbill":500000000,"support_perbill":4161906,"approval":50,"support":0.4161906},{"time_hours":218,"approval_perbill":500000000,"support_perbill":4108444,"approval":50,"support":0.4108444},{"time_hours":219,"approval_perbill":500000000,"support_perbill":4055459,"approval":50,"support":0.4055459},{"time_hours":220,"approval_perbill":500000000,"support_perbill":4002944,"approval":50,"support":0.4002944},{"time_hours":221,"approval_perbill":500000000,"support_perbill":3950894,"approval":50,"support":0.3950894},{"time_hours":222,"approval_perbill":500000000,"support_perbill":3899302,"approval":50,"support":0.3899302},{"time_hours":223,"approval_perbill":500000000,"support_perbill":3848162,"approval":50,"support":0.3848162},{"time_hours":224,"approval_perbill":500000000,"support_perbill":3797468,"approval":50,"support":0.3797468},{"time_hours":225,"approval_perbill":500000000,"support_perbill":3747215,"approval":50,"support":0.3747215},{"time_hours":226,"approval_perbill":500000000,"support_perbill":3697396,"approval":50,"support":0.3697396},{"time_hours":227,"approval_perbill":500000000,"support_perbill":3648006,"approval":50,"support":0.3648006},{"time_hours":228,"approval_perbill":500000000,"support_perbill":3599040,"approval":50,"support":0.359904},{"time_hours":229,"approval_perbill":500000000,"support_perbill":3550492,"approval":50,"support":0.3550492},{"time_hours":230,"approval_perbill":500000000,"support_perbill":3502357,"approval":50,"support":0.3502357},{"time_hours":231,"approval_perbill":500000000,"support_perbill":3454629,"approval":50,"support":0.3454629},{"time_hours":232,"approval_perbill":500000000,"support_perbill":3407304,"approval":50,"support":0.3407304},{"time_hours":233,"approval_perbill":500000000,"support_perbill":3360376,"approval":50,"support":0.3360376},{"time_hours":234,"approval_perbill":500000000,"support_perbill":3313840,"approval":50,"support":0.331384},{"time_hours":235,"approval_perbill":500000000,"support_perbill":3267692,"approval":50,"support":0.3267692},{"time_hours":236,"approval_perbill":500000000,"support_perbill":3221926,"approval":50,"support":0.3221926},{"time_hours":237,"approval_perbill":500000000,"support_perbill":3176538,"approval":50,"support":0.3176538},{"time_hours":238,"approval_perbill":500000000,"support_perbill":3131524,"approval":50,"support":0.3131524},{"time_hours":239,"approval_perbill":500000000,"support_perbill":3086878,"approval":50,"support":0.3086878},{"time_hours":240,"approval_perbill":500000000,"support_perbill":3042596,"approval":50,"support":0.3042596},{"time_hours":241,"approval_perbill":500000000,"support_perbill":2998674,"approval":50,"support":0.2998674},{"time_hours":242,"approval_perbill":500000000,"support_perbill":2955107,"approval":50,"support":0.2955107},{"time_hours":243,"approval_perbill":500000000,"support_perbill":2911892,"approval":50,"support":0.2911892},{"time_hours":244,"approval_perbill":500000000,"support_perbill":2869023,"approval":50,"support":0.2869023},{"time_hours":245,"approval_perbill":500000000,"support_perbill":2826496,"approval":50,"support":0.2826496},{"time_hours":246,"approval_perbill":500000000,"support_perbill":2784309,"approval":50,"support":0.2784309},{"time_hours":247,"approval_perbill":500000000,"support_perbill":2742455,"approval":50,"support":0.2742455},{"time_hours":248,"approval_perbill":500000000,"support_perbill":2700933,"approval":50,"support":0.2700933},{"time_hours":249,"approval_perbill":500000000,"support_perbill":2659737,"approval":50,"support":0.2659737},{"time_hours":250,"approval_perbill":500000000,"support_perbill":2618864,"approval":50,"support":0.2618864},{"time_hours":251,"approval_perbill":500000000,"support_perbill":2578310,"approval":50,"support":0.257831},{"time_hours":252,"approval_perbill":500000000,"support_perbill":2538071,"approval":50,"support":0.2538071},{"time_hours":253,"approval_perbill":500000000,"support_perbill":2498144,"approval":50,"support":0.2498144},{"time_hours":254,"approval_perbill":500000000,"support_perbill":2458525,"approval":50,"support":0.2458525},{"time_hours":255,"approval_perbill":500000000,"support_perbill":2419210,"approval":50,"support":0.241921},{"time_hours":256,"approval_perbill":500000000,"support_perbill":2380197,"approval":50,"support":0.2380197},{"time_hours":257,"approval_perbill":500000000,"support_perbill":2341481,"approval":50,"support":0.2341481},{"time_hours":258,"approval_perbill":500000000,"support_perbill":2303059,"approval":50,"support":0.2303059},{"time_hours":259,"approval_perbill":500000000,"support_perbill":2264928,"approval":50,"support":0.2264928},{"time_hours":260,"approval_perbill":500000000,"support_perbill":2227084,"approval":50,"support":0.2227084},{"time_hours":261,"approval_perbill":500000000,"support_perbill":2189525,"approval":50,"support":0.2189525},{"time_hours":262,"approval_perbill":500000000,"support_perbill":2152247,"approval":50,"support":0.2152247},{"time_hours":263,"approval_perbill":500000000,"support_perbill":2115247,"approval":50,"support":0.2115247},{"time_hours":264,"approval_perbill":500000000,"support_perbill":2078522,"approval":50,"support":0.2078522},{"time_hours":265,"approval_perbill":500000000,"support_perbill":2042068,"approval":50,"support":0.2042068},{"time_hours":266,"approval_perbill":500000000,"support_perbill":2005884,"approval":50,"support":0.2005884},{"time_hours":267,"approval_perbill":500000000,"support_perbill":1969965,"approval":50,"support":0.1969965},{"time_hours":268,"approval_perbill":500000000,"support_perbill":1934309,"approval":50,"support":0.1934309},{"time_hours":269,"approval_perbill":500000000,"support_perbill":1898913,"approval":50,"support":0.1898913},{"time_hours":270,"approval_perbill":500000000,"support_perbill":1863775,"approval":50,"support":0.1863775},{"time_hours":271,"approval_perbill":500000000,"support_perbill":1828891,"approval":50,"support":0.1828891},{"time_hours":272,"approval_perbill":500000000,"support_perbill":1794258,"approval":50,"support":0.1794258},{"time_hours":273,"approval_perbill":500000000,"support_perbill":1759875,"approval":50,"support":0.1759875},{"time_hours":274,"approval_perbill":500000000,"support_perbill":1725737,"approval":50,"support":0.1725737},{"time_hours":275,"approval_perbill":500000000,"support_perbill":1691844,"approval":50,"support":0.1691844},{"time_hours":276,"approval_perbill":500000000,"support_perbill":1658191,"approval":50,"support":0.1658191},{"time_hours":277,"approval_perbill":500000000,"support_perbill":1624777,"approval":50,"support":0.1624777},{"time_hours":278,"approval_perbill":500000000,"support_perbill":1591599,"approval":50,"support":0.1591599},{"time_hours":279,"approval_perbill":500000000,"support_perbill":1558654,"approval":50,"support":0.1558654},{"time_hours":280,"approval_perbill":500000000,"support_perbill":1525941,"approval":50,"support":0.1525941},{"time_hours":281,"approval_perbill":500000000,"support_perbill":1493456,"approval":50,"support":0.1493456},{"time_hours":282,"approval_perbill":500000000,"support_perbill":1461197,"approval":50,"support":0.1461197},{"time_hours":283,"approval_perbill":500000000,"support_perbill":1429162,"approval":50,"support":0.1429162},{"time_hours":284,"approval_perbill":500000000,"support_perbill":1397348,"approval":50,"support":0.1397348},{"time_hours":285,"approval_perbill":500000000,"support_perbill":1365754,"approval":50,"support":0.1365754},{"time_hours":286,"approval_perbill":500000000,"support_perbill":1334377,"approval":50,"support":0.1334377},{"time_hours":287,"approval_perbill":500000000,"support_perbill":1303214,"approval":50,"support":0.1303214},{"time_hours":288,"approval_perbill":500000000,"support_perbill":1272264,"approval":50,"support":0.1272264},{"time_hours":289,"approval_perbill":500000000,"support_perbill":1241525,"approval":50,"support":0.1241525},{"time_hours":290,"approval_perbill":500000000,"support_perbill":1210994,"approval":50,"support":0.1210994},{"time_hours":291,"approval_perbill":500000000,"support_perbill":1180668,"approval":50,"support":0.1180668},{"time_hours":292,"approval_perbill":500000000,"support_perbill":1150547,"approval":50,"support":0.1150547},{"time_hours":293,"approval_perbill":500000000,"support_perbill":1120628,"approval":50,"support":0.1120628},{"time_hours":294,"approval_perbill":500000000,"support_perbill":1090909,"approval":50,"support":0.1090909},{"time_hours":295,"approval_perbill":500000000,"support_perbill":1061388,"approval":50,"support":0.1061388},{"time_hours":296,"approval_perbill":500000000,"support_perbill":1032063,"approval":50,"support":0.1032063},{"time_hours":297,"approval_perbill":500000000,"support_perbill":1002932,"approval":50,"support":0.1002932},{"time_hours":298,"approval_perbill":500000000,"support_perbill":973993,"approval":50,"support":0.0973993},{"time_hours":299,"approval_perbill":500000000,"support_perbill":945244,"approval":50,"support":0.0945244},{"time_hours":300,"approval_perbill":500000000,"support_perbill":916684,"approval":50,"support":0.0916684},{"time_hours":301,"approval_perbill":500000000,"support_perbill":888310,"approval":50,"support":0.088831},{"time_hours":302,"approval_perbill":500000000,"support_perbill":860121,"approval":50,"support":0.0860121},{"time_hours":303,"approval_perbill":500000000,"support_perbill":832114,"approval":50,"support":0.0832114},{"time_hours":304,"approval_perbill":500000000,"support_perbill":804289,"approval":50,"support":0.0804289},{"time_hours":305,"approval_perbill":500000000,"support_perbill":776644,"approval":50,"support":0.0776644},{"time_hours":306,"approval_perbill":500000000,"support_perbill":749176,"approval":50,"support":0.0749176},{"time_hours":307,"approval_perbill":500000000,"support_perbill":721884,"approval":50,"support":0.0721884},{"time_hours":308,"approval_perbill":500000000,"support_perbill":694766,"approval":50,"support":0.0694766},{"time_hours":309,"approval_perbill":500000000,"support_perbill":667821,"approval":50,"support":0.0667821},{"time_hours":310,"approval_perbill":500000000,"support_perbill":641047,"approval":50,"support":0.0641047},{"time_hours":311,"approval_perbill":500000000,"support_perbill":614442,"approval":50,"support":0.0614442},{"time_hours":312,"approval_perbill":500000000,"support_perbill":588005,"approval":50,"support":0.0588005},{"time_hours":313,"approval_perbill":500000000,"support_perbill":561734,"approval":50,"support":0.0561734},{"time_hours":314,"approval_perbill":500000000,"support_perbill":535627,"approval":50,"support":0.0535627},{"time_hours":315,"approval_perbill":500000000,"support_perbill":509684,"approval":50,"support":0.0509684},{"time_hours":316,"approval_perbill":500000000,"support_perbill":483902,"approval":50,"support":0.0483902},{"time_hours":317,"approval_perbill":500000000,"support_perbill":458280,"approval":50,"support":0.045828},{"time_hours":318,"approval_perbill":500000000,"support_perbill":432817,"approval":50,"support":0.0432817},{"time_hours":319,"approval_perbill":500000000,"support_perbill":407511,"approval":50,"support":0.0407511},{"time_hours":320,"approval_perbill":500000000,"support_perbill":382360,"approval":50,"support":0.038236},{"time_hours":321,"approval_perbill":500000000,"support_perbill":357364,"approval":50,"support":0.0357364},{"time_hours":322,"approval_perbill":500000000,"support_perbill":332520,"approval":50,"support":0.033252},{"time_hours":323,"approval_perbill":500000000,"support_perbill":307828,"approval":50,"support":0.0307828},{"time_hours":324,"approval_perbill":500000000,"support_perbill":283286,"approval":50,"support":0.0283286},{"time_hours":325,"approval_perbill":500000000,"support_perbill":258892,"approval":50,"support":0.0258892},{"time_hours":326,"approval_perbill":500000000,"support_perbill":234646,"approval":50,"support":0.0234646},{"time_hours":327,"approval_perbill":500000000,"support_perbill":210546,"approval":50,"support":0.0210546},{"time_hours":328,"approval_perbill":500000000,"support_perbill":186590,"approval":50,"support":0.018659},{"time_hours":329,"approval_perbill":500000000,"support_perbill":162778,"approval":50,"support":0.0162778},{"time_hours":330,"approval_perbill":500000000,"support_perbill":139108,"approval":50,"support":0.0139108},{"time_hours":331,"approval_perbill":500000000,"support_perbill":115578,"approval":50,"support":0.0115578},{"time_hours":332,"approval_perbill":500000000,"support_perbill":92188,"approval":50,"support":0.0092188},{"time_hours":333,"approval_perbill":500000000,"support_perbill":68937,"approval":50,"support":0.0068937},{"time_hours":334,"approval_perbill":500000000,"support_perbill":45822,"approval":50,"support":0.0045822},{"time_hours":335,"approval_perbill":500000000,"support_perbill":22844,"approval":50,"support":0.0022844},{"time_hours":336,"approval_perbill":500000000,"support_perbill":0,"approval":50,"support":0}]')},6303:p=>{"use strict";p.exports=JSON.parse('[{"time_hours":0,"approval_perbill":1000000000,"support_perbill":500000000,"approval":100,"support":50},{"time_hours":1,"approval_perbill":994100296,"support_perbill":482708936,"approval":99.4100296,"support":48.2708936},{"time_hours":2,"approval_perbill":988304096,"support_perbill":466480452,"approval":98.8304096,"support":46.6480452},{"time_hours":3,"approval_perbill":982608697,"support_perbill":451219514,"approval":98.2608697,"support":45.1219514},{"time_hours":4,"approval_perbill":977011496,"support_perbill":436842109,"approval":97.7011496,"support":43.6842109},{"time_hours":5,"approval_perbill":971509972,"support_perbill":423273659,"approval":97.1509972,"support":42.3273659},{"time_hours":6,"approval_perbill":966101697,"support_perbill":410447765,"approval":96.6101697,"support":41.0447765},{"time_hours":7,"approval_perbill":960784315,"support_perbill":398305086,"approval":96.0784315,"support":39.8305086},{"time_hours":8,"approval_perbill":955555557,"support_perbill":386792456,"approval":95.5555557,"support":38.6792456},{"time_hours":9,"approval_perbill":950413224,"support_perbill":375862070,"approval":95.0413224,"support":37.586207},{"time_hours":10,"approval_perbill":945355193,"support_perbill":365470854,"approval":94.5355193,"support":36.5470854},{"time_hours":11,"approval_perbill":940379404,"support_perbill":355579869,"approval":94.0379404,"support":35.5579869},{"time_hours":12,"approval_perbill":935483872,"support_perbill":346153848,"approval":93.5483872,"support":34.6153848},{"time_hours":13,"approval_perbill":930666667,"support_perbill":337160752,"approval":93.0666667,"support":33.7160752},{"time_hours":14,"approval_perbill":925925927,"support_perbill":328571430,"approval":92.5925927,"support":32.857143},{"time_hours":15,"approval_perbill":921259843,"support_perbill":320359282,"approval":92.1259843,"support":32.0359282},{"time_hours":16,"approval_perbill":916666668,"support_perbill":312500001,"approval":91.6666668,"support":31.2500001},{"time_hours":17,"approval_perbill":912144703,"support_perbill":304971319,"approval":91.2144703,"support":30.4971319},{"time_hours":18,"approval_perbill":907692309,"support_perbill":297752810,"approval":90.7692309,"support":29.775281},{"time_hours":19,"approval_perbill":903307888,"support_perbill":290825688,"approval":90.3307888,"support":29.0825688},{"time_hours":20,"approval_perbill":898989900,"support_perbill":284172663,"approval":89.89899,"support":28.4172663},{"time_hours":21,"approval_perbill":894736842,"support_perbill":277777777,"approval":89.4736842,"support":27.7777777},{"time_hours":22,"approval_perbill":890547265,"support_perbill":271626298,"approval":89.0547265,"support":27.1626298},{"time_hours":23,"approval_perbill":886419755,"support_perbill":265704586,"approval":88.6419755,"support":26.5704586},{"time_hours":24,"approval_perbill":882352942,"support_perbill":260000000,"approval":88.2352942,"support":26},{"time_hours":25,"approval_perbill":878345500,"support_perbill":254500820,"approval":87.83455,"support":25.450082},{"time_hours":26,"approval_perbill":874396136,"support_perbill":249196142,"approval":87.4396136,"support":24.9196142},{"time_hours":27,"approval_perbill":870503599,"support_perbill":244075830,"approval":87.0503599,"support":24.407583},{"time_hours":28,"approval_perbill":866666667,"support_perbill":239130435,"approval":86.6666667,"support":23.9130435},{"time_hours":29,"approval_perbill":862884162,"support_perbill":234351146,"approval":86.2884162,"support":23.4351146},{"time_hours":30,"approval_perbill":859154930,"support_perbill":229729730,"approval":85.915493,"support":22.972973},{"time_hours":31,"approval_perbill":855477857,"support_perbill":225258494,"approval":85.5477857,"support":22.5258494},{"time_hours":32,"approval_perbill":851851852,"support_perbill":220930232,"approval":85.1851852,"support":22.0930232},{"time_hours":33,"approval_perbill":848275863,"support_perbill":216738198,"approval":84.8275863,"support":21.6738198},{"time_hours":34,"approval_perbill":844748859,"support_perbill":212676056,"approval":84.4748859,"support":21.2676056},{"time_hours":35,"approval_perbill":841269842,"support_perbill":208737865,"approval":84.1269842,"support":20.8737865},{"time_hours":36,"approval_perbill":837837838,"support_perbill":204918033,"approval":83.7837838,"support":20.4918033},{"time_hours":37,"approval_perbill":834451903,"support_perbill":201211306,"approval":83.4451903,"support":20.1211306},{"time_hours":38,"approval_perbill":831111112,"support_perbill":197612732,"approval":83.1111112,"support":19.7612732},{"time_hours":39,"approval_perbill":827814570,"support_perbill":194117647,"approval":82.781457,"support":19.4117647},{"time_hours":40,"approval_perbill":824561404,"support_perbill":190721649,"approval":82.4561404,"support":19.0721649},{"time_hours":41,"approval_perbill":821350763,"support_perbill":187420585,"approval":82.1350763,"support":18.7420585},{"time_hours":42,"approval_perbill":818181818,"support_perbill":184210526,"approval":81.8181818,"support":18.4210526},{"time_hours":43,"approval_perbill":815053764,"support_perbill":181087763,"approval":81.5053764,"support":18.1087763},{"time_hours":44,"approval_perbill":811965813,"support_perbill":178048781,"approval":81.1965813,"support":17.8048781},{"time_hours":45,"approval_perbill":808917198,"support_perbill":175090253,"approval":80.8917198,"support":17.5090253},{"time_hours":46,"approval_perbill":805907174,"support_perbill":172209026,"approval":80.5907174,"support":17.2209026},{"time_hours":47,"approval_perbill":802935011,"support_perbill":169402110,"approval":80.2935011,"support":16.940211},{"time_hours":48,"approval_perbill":800000001,"support_perbill":166666667,"approval":80.0000001,"support":16.6666667},{"time_hours":49,"approval_perbill":797101450,"support_perbill":164000000,"approval":79.710145,"support":16.4},{"time_hours":50,"approval_perbill":794238684,"support_perbill":161399549,"approval":79.4238684,"support":16.1399549},{"time_hours":51,"approval_perbill":791411043,"support_perbill":158862876,"approval":79.1411043,"support":15.8862876},{"time_hours":52,"approval_perbill":788617887,"support_perbill":156387665,"approval":78.8617887,"support":15.6387665},{"time_hours":53,"approval_perbill":785858586,"support_perbill":153971708,"approval":78.5858586,"support":15.3971708},{"time_hours":54,"approval_perbill":783132531,"support_perbill":151612903,"approval":78.3132531,"support":15.1612903},{"time_hours":55,"approval_perbill":780439122,"support_perbill":149309245,"approval":78.0439122,"support":14.9309245},{"time_hours":56,"approval_perbill":777777779,"support_perbill":147058823,"approval":77.7777779,"support":14.7058823},{"time_hours":57,"approval_perbill":775147929,"support_perbill":144859813,"approval":77.5147929,"support":14.4859813},{"time_hours":58,"approval_perbill":772549020,"support_perbill":142710472,"approval":77.254902,"support":14.2710472},{"time_hours":59,"approval_perbill":769980507,"support_perbill":140609137,"approval":76.9980507,"support":14.0609137},{"time_hours":60,"approval_perbill":767441861,"support_perbill":138554217,"approval":76.7441861,"support":13.8554217},{"time_hours":61,"approval_perbill":764932563,"support_perbill":136544190,"approval":76.4932563,"support":13.654419},{"time_hours":62,"approval_perbill":762452108,"support_perbill":134577603,"approval":76.2452108,"support":13.4577603},{"time_hours":63,"approval_perbill":760000000,"support_perbill":132653061,"approval":76,"support":13.2653061},{"time_hours":64,"approval_perbill":757575758,"support_perbill":130769230,"approval":75.7575758,"support":13.076923},{"time_hours":65,"approval_perbill":755178909,"support_perbill":128924833,"approval":75.5178909,"support":12.8924833},{"time_hours":66,"approval_perbill":752808989,"support_perbill":127118644,"approval":75.2808989,"support":12.7118644},{"time_hours":67,"approval_perbill":750465550,"support_perbill":125349487,"approval":75.046555,"support":12.5349487},{"time_hours":68,"approval_perbill":748148149,"support_perbill":123616236,"approval":74.8148149,"support":12.3616236},{"time_hours":69,"approval_perbill":745856354,"support_perbill":121917808,"approval":74.5856354,"support":12.1917808},{"time_hours":70,"approval_perbill":743589744,"support_perbill":120253164,"approval":74.3589744,"support":12.0253164},{"time_hours":71,"approval_perbill":741347906,"support_perbill":118621307,"approval":74.1347906,"support":11.8621307},{"time_hours":72,"approval_perbill":739130435,"support_perbill":117021276,"approval":73.9130435,"support":11.7021276},{"time_hours":73,"approval_perbill":736936938,"support_perbill":115452151,"approval":73.6936938,"support":11.5452151},{"time_hours":74,"approval_perbill":734767025,"support_perbill":113913043,"approval":73.4767025,"support":11.3913043},{"time_hours":75,"approval_perbill":732620322,"support_perbill":112403100,"approval":73.2620322,"support":11.24031},{"time_hours":76,"approval_perbill":730496454,"support_perbill":110921501,"approval":73.0496454,"support":11.0921501},{"time_hours":77,"approval_perbill":728395062,"support_perbill":109467455,"approval":72.8395062,"support":10.9467455},{"time_hours":78,"approval_perbill":726315790,"support_perbill":108040200,"approval":72.631579,"support":10.80402},{"time_hours":79,"approval_perbill":724258290,"support_perbill":106639004,"approval":72.425829,"support":10.6639004},{"time_hours":80,"approval_perbill":722222222,"support_perbill":105263157,"approval":72.2222222,"support":10.5263157},{"time_hours":81,"approval_perbill":720207254,"support_perbill":103911980,"approval":72.0207254,"support":10.391198},{"time_hours":82,"approval_perbill":718213059,"support_perbill":102584814,"approval":71.8213059,"support":10.2584814},{"time_hours":83,"approval_perbill":716239317,"support_perbill":101281024,"approval":71.6239317,"support":10.1281024},{"time_hours":84,"approval_perbill":714285714,"support_perbill":99999999,"approval":71.4285714,"support":9.9999999},{"time_hours":85,"approval_perbill":712351946,"support_perbill":98741148,"approval":71.2351946,"support":9.8741148},{"time_hours":86,"approval_perbill":710437711,"support_perbill":97503900,"approval":71.0437711,"support":9.75039},{"time_hours":87,"approval_perbill":708542714,"support_perbill":96287703,"approval":70.8542714,"support":9.6287703},{"time_hours":88,"approval_perbill":706666667,"support_perbill":95092024,"approval":70.6666667,"support":9.5092024},{"time_hours":89,"approval_perbill":704809287,"support_perbill":93916349,"approval":70.4809287,"support":9.3916349},{"time_hours":90,"approval_perbill":702970298,"support_perbill":92760181,"approval":70.2970298,"support":9.2760181},{"time_hours":91,"approval_perbill":701149426,"support_perbill":91623036,"approval":70.1149426,"support":9.1623036},{"time_hours":92,"approval_perbill":699346406,"support_perbill":90504451,"approval":69.9346406,"support":9.0504451},{"time_hours":93,"approval_perbill":697560976,"support_perbill":89403973,"approval":69.7560976,"support":8.9403973},{"time_hours":94,"approval_perbill":695792881,"support_perbill":88321167,"approval":69.5792881,"support":8.8321167},{"time_hours":95,"approval_perbill":694041868,"support_perbill":87255611,"approval":69.4041868,"support":8.7255611},{"time_hours":96,"approval_perbill":692307693,"support_perbill":86206896,"approval":69.2307693,"support":8.6206896},{"time_hours":97,"approval_perbill":690590112,"support_perbill":85174625,"approval":69.0590112,"support":8.5174625},{"time_hours":98,"approval_perbill":688888889,"support_perbill":84158415,"approval":68.8888889,"support":8.4158415},{"time_hours":99,"approval_perbill":687203792,"support_perbill":83157894,"approval":68.7203792,"support":8.3157894},{"time_hours":100,"approval_perbill":685534592,"support_perbill":82172701,"approval":68.5534592,"support":8.2172701},{"time_hours":101,"approval_perbill":683881064,"support_perbill":81202487,"approval":68.3881064,"support":8.1202487},{"time_hours":102,"approval_perbill":682242991,"support_perbill":80246913,"approval":68.2242991,"support":8.0246913},{"time_hours":103,"approval_perbill":680620155,"support_perbill":79305649,"approval":68.0620155,"support":7.9305649},{"time_hours":104,"approval_perbill":679012346,"support_perbill":78378378,"approval":67.9012346,"support":7.8378378},{"time_hours":105,"approval_perbill":677419355,"support_perbill":77464788,"approval":67.7419355,"support":7.7464788},{"time_hours":106,"approval_perbill":675840979,"support_perbill":76564580,"approval":67.5840979,"support":7.656458},{"time_hours":107,"approval_perbill":674277017,"support_perbill":75677462,"approval":67.4277017,"support":7.5677462},{"time_hours":108,"approval_perbill":672727273,"support_perbill":74803149,"approval":67.2727273,"support":7.4803149},{"time_hours":109,"approval_perbill":671191554,"support_perbill":73941368,"approval":67.1191554,"support":7.3941368},{"time_hours":110,"approval_perbill":669669670,"support_perbill":73091849,"approval":66.966967,"support":7.3091849},{"time_hours":111,"approval_perbill":668161435,"support_perbill":72254335,"approval":66.8161435,"support":7.2254335},{"time_hours":112,"approval_perbill":666666667,"support_perbill":71428571,"approval":66.6666667,"support":7.1428571},{"time_hours":113,"approval_perbill":665185186,"support_perbill":70614312,"approval":66.5185186,"support":7.0614312},{"time_hours":114,"approval_perbill":663716814,"support_perbill":69811320,"approval":66.3716814,"support":6.981132},{"time_hours":115,"approval_perbill":662261381,"support_perbill":69019362,"approval":66.2261381,"support":6.9019362},{"time_hours":116,"approval_perbill":660818714,"support_perbill":68238213,"approval":66.0818714,"support":6.8238213},{"time_hours":117,"approval_perbill":659388647,"support_perbill":67467652,"approval":65.9388647,"support":6.7467652},{"time_hours":118,"approval_perbill":657971015,"support_perbill":66707466,"approval":65.7971015,"support":6.6707466},{"time_hours":119,"approval_perbill":656565657,"support_perbill":65957446,"approval":65.6565657,"support":6.5957446},{"time_hours":120,"approval_perbill":655172414,"support_perbill":65217391,"approval":65.5172414,"support":6.5217391},{"time_hours":121,"approval_perbill":653791130,"support_perbill":64487102,"approval":65.379113,"support":6.4487102},{"time_hours":122,"approval_perbill":652421652,"support_perbill":63766388,"approval":65.2421652,"support":6.3766388},{"time_hours":123,"approval_perbill":651063830,"support_perbill":63055062,"approval":65.106383,"support":6.3055062},{"time_hours":124,"approval_perbill":649717514,"support_perbill":62352940,"approval":64.9717514,"support":6.235294},{"time_hours":125,"approval_perbill":648382560,"support_perbill":61659847,"approval":64.838256,"support":6.1659847},{"time_hours":126,"approval_perbill":647058823,"support_perbill":60975609,"approval":64.7058823,"support":6.0975609},{"time_hours":127,"approval_perbill":645746165,"support_perbill":60300057,"approval":64.5746165,"support":6.0300057},{"time_hours":128,"approval_perbill":644444445,"support_perbill":59633027,"approval":64.4444445,"support":5.9633027},{"time_hours":129,"approval_perbill":643153527,"support_perbill":58974358,"approval":64.3153527,"support":5.8974358},{"time_hours":130,"approval_perbill":641873279,"support_perbill":58323895,"approval":64.1873279,"support":5.8323895},{"time_hours":131,"approval_perbill":640603567,"support_perbill":57681485,"approval":64.0603567,"support":5.7681485},{"time_hours":132,"approval_perbill":639344263,"support_perbill":57046979,"approval":63.9344263,"support":5.7046979},{"time_hours":133,"approval_perbill":638095238,"support_perbill":56420233,"approval":63.8095238,"support":5.6420233},{"time_hours":134,"approval_perbill":636856369,"support_perbill":55801104,"approval":63.6856369,"support":5.5801104},{"time_hours":135,"approval_perbill":635627530,"support_perbill":55189456,"approval":63.562753,"support":5.5189456},{"time_hours":136,"approval_perbill":634408602,"support_perbill":54585152,"approval":63.4408602,"support":5.4585152},{"time_hours":137,"approval_perbill":633199465,"support_perbill":53988062,"approval":63.3199465,"support":5.3988062},{"time_hours":138,"approval_perbill":632000000,"support_perbill":53398058,"approval":63.2,"support":5.3398058},{"time_hours":139,"approval_perbill":630810093,"support_perbill":52815013,"approval":63.0810093,"support":5.2815013},{"time_hours":140,"approval_perbill":629629630,"support_perbill":52238805,"approval":62.962963,"support":5.2238805},{"time_hours":141,"approval_perbill":628458498,"support_perbill":51669316,"approval":62.8458498,"support":5.1669316},{"time_hours":142,"approval_perbill":627296588,"support_perbill":51106427,"approval":62.7296588,"support":5.1106427},{"time_hours":143,"approval_perbill":626143791,"support_perbill":50550025,"approval":62.6143791,"support":5.0550025},{"time_hours":144,"approval_perbill":625000000,"support_perbill":49999999,"approval":62.5,"support":4.9999999},{"time_hours":145,"approval_perbill":623865110,"support_perbill":49456240,"approval":62.386511,"support":4.945624},{"time_hours":146,"approval_perbill":622739018,"support_perbill":48918640,"approval":62.2739018,"support":4.891864},{"time_hours":147,"approval_perbill":621621621,"support_perbill":48387096,"approval":62.1621621,"support":4.8387096},{"time_hours":148,"approval_perbill":620512821,"support_perbill":47861506,"approval":62.0512821,"support":4.7861506},{"time_hours":149,"approval_perbill":619412516,"support_perbill":47341772,"approval":61.9412516,"support":4.7341772},{"time_hours":150,"approval_perbill":618320611,"support_perbill":46827794,"approval":61.8320611,"support":4.6827794},{"time_hours":151,"approval_perbill":617237009,"support_perbill":46319479,"approval":61.7237009,"support":4.6319479},{"time_hours":152,"approval_perbill":616161616,"support_perbill":45816732,"approval":61.6161616,"support":4.5816732},{"time_hours":153,"approval_perbill":615094340,"support_perbill":45319464,"approval":61.509434,"support":4.5319464},{"time_hours":154,"approval_perbill":614035088,"support_perbill":44827585,"approval":61.4035088,"support":4.4827585},{"time_hours":155,"approval_perbill":612983770,"support_perbill":44341009,"approval":61.298377,"support":4.4341009},{"time_hours":156,"approval_perbill":611940298,"support_perbill":43859648,"approval":61.1940298,"support":4.3859648},{"time_hours":157,"approval_perbill":610904585,"support_perbill":43383422,"approval":61.0904585,"support":4.3383422},{"time_hours":158,"approval_perbill":609876543,"support_perbill":42912246,"approval":60.9876543,"support":4.2912246},{"time_hours":159,"approval_perbill":608856089,"support_perbill":42446042,"approval":60.8856089,"support":4.2446042},{"time_hours":160,"approval_perbill":607843137,"support_perbill":41984732,"approval":60.7843137,"support":4.1984732},{"time_hours":161,"approval_perbill":606837607,"support_perbill":41528238,"approval":60.6837607,"support":4.1528238},{"time_hours":162,"approval_perbill":605839416,"support_perbill":41076486,"approval":60.5839416,"support":4.1076486},{"time_hours":163,"approval_perbill":604848485,"support_perbill":40629403,"approval":60.4848485,"support":4.0629403},{"time_hours":164,"approval_perbill":603864734,"support_perbill":40186915,"approval":60.3864734,"support":4.0186915},{"time_hours":165,"approval_perbill":602888087,"support_perbill":39748953,"approval":60.2888087,"support":3.9748953},{"time_hours":166,"approval_perbill":601918465,"support_perbill":39315448,"approval":60.1918465,"support":3.9315448},{"time_hours":167,"approval_perbill":600955794,"support_perbill":38886332,"approval":60.0955794,"support":3.8886332},{"time_hours":168,"approval_perbill":600000000,"support_perbill":38461538,"approval":60,"support":3.8461538},{"time_hours":169,"approval_perbill":599051008,"support_perbill":38041002,"approval":59.9051008,"support":3.8041002},{"time_hours":170,"approval_perbill":598108747,"support_perbill":37624659,"approval":59.8108747,"support":3.7624659},{"time_hours":171,"approval_perbill":597173145,"support_perbill":37212448,"approval":59.7173145,"support":3.7212448},{"time_hours":172,"approval_perbill":596244131,"support_perbill":36804308,"approval":59.6244131,"support":3.6804308},{"time_hours":173,"approval_perbill":595321637,"support_perbill":36400178,"approval":59.5321637,"support":3.6400178},{"time_hours":174,"approval_perbill":594405594,"support_perbill":35999999,"approval":59.4405594,"support":3.5999999},{"time_hours":175,"approval_perbill":593495935,"support_perbill":35603714,"approval":59.3495935,"support":3.5603714},{"time_hours":176,"approval_perbill":592592593,"support_perbill":35211267,"approval":59.2592593,"support":3.5211267},{"time_hours":177,"approval_perbill":591695502,"support_perbill":34822601,"approval":59.1695502,"support":3.4822601},{"time_hours":178,"approval_perbill":590804598,"support_perbill":34437663,"approval":59.0804598,"support":3.4437663},{"time_hours":179,"approval_perbill":589919817,"support_perbill":34056398,"approval":58.9919817,"support":3.4056398},{"time_hours":180,"approval_perbill":589041096,"support_perbill":33678756,"approval":58.9041096,"support":3.3678756},{"time_hours":181,"approval_perbill":588168373,"support_perbill":33304683,"approval":58.8168373,"support":3.3304683},{"time_hours":182,"approval_perbill":587301587,"support_perbill":32934131,"approval":58.7301587,"support":3.2934131},{"time_hours":183,"approval_perbill":586440678,"support_perbill":32567049,"approval":58.6440678,"support":3.2567049},{"time_hours":184,"approval_perbill":585585585,"support_perbill":32203389,"approval":58.5585585,"support":3.2203389},{"time_hours":185,"approval_perbill":584736251,"support_perbill":31843103,"approval":58.4736251,"support":3.1843103},{"time_hours":186,"approval_perbill":583892617,"support_perbill":31486145,"approval":58.3892617,"support":3.1486145},{"time_hours":187,"approval_perbill":583054626,"support_perbill":31132469,"approval":58.3054626,"support":3.1132469},{"time_hours":188,"approval_perbill":582222222,"support_perbill":30782029,"approval":58.2222222,"support":3.0782029},{"time_hours":189,"approval_perbill":581395349,"support_perbill":30434782,"approval":58.1395349,"support":3.0434782},{"time_hours":190,"approval_perbill":580573951,"support_perbill":30090683,"approval":58.0573951,"support":3.0090683},{"time_hours":191,"approval_perbill":579757976,"support_perbill":29749692,"approval":57.9757976,"support":2.9749692},{"time_hours":192,"approval_perbill":578947368,"support_perbill":29411764,"approval":57.8947368,"support":2.9411764},{"time_hours":193,"approval_perbill":578142076,"support_perbill":29076860,"approval":57.8142076,"support":2.907686},{"time_hours":194,"approval_perbill":577342048,"support_perbill":28744938,"approval":57.7342048,"support":2.8744938},{"time_hours":195,"approval_perbill":576547231,"support_perbill":28415961,"approval":57.6547231,"support":2.8415961},{"time_hours":196,"approval_perbill":575757576,"support_perbill":28089887,"approval":57.5757576,"support":2.8089887},{"time_hours":197,"approval_perbill":574973031,"support_perbill":27766679,"approval":57.4973031,"support":2.7766679},{"time_hours":198,"approval_perbill":574193548,"support_perbill":27446300,"approval":57.4193548,"support":2.74463},{"time_hours":199,"approval_perbill":573419078,"support_perbill":27128712,"approval":57.3419078,"support":2.7128712},{"time_hours":200,"approval_perbill":572649572,"support_perbill":26813879,"approval":57.2649572,"support":2.6813879},{"time_hours":201,"approval_perbill":571884984,"support_perbill":26501766,"approval":57.1884984,"support":2.6501766},{"time_hours":202,"approval_perbill":571125265,"support_perbill":26192337,"approval":57.1125265,"support":2.6192337},{"time_hours":203,"approval_perbill":570370370,"support_perbill":25885558,"approval":57.037037,"support":2.5885558},{"time_hours":204,"approval_perbill":569620253,"support_perbill":25581395,"approval":56.9620253,"support":2.5581395},{"time_hours":205,"approval_perbill":568874868,"support_perbill":25279814,"approval":56.8874868,"support":2.5279814},{"time_hours":206,"approval_perbill":568134172,"support_perbill":24980783,"approval":56.8134172,"support":2.4980783},{"time_hours":207,"approval_perbill":567398119,"support_perbill":24684270,"approval":56.7398119,"support":2.468427},{"time_hours":208,"approval_perbill":566666666,"support_perbill":24390243,"approval":56.6666666,"support":2.4390243},{"time_hours":209,"approval_perbill":565939771,"support_perbill":24098671,"approval":56.5939771,"support":2.4098671},{"time_hours":210,"approval_perbill":565217391,"support_perbill":23809523,"approval":56.5217391,"support":2.3809523},{"time_hours":211,"approval_perbill":564499484,"support_perbill":23522769,"approval":56.4499484,"support":2.3522769},{"time_hours":212,"approval_perbill":563786008,"support_perbill":23238380,"approval":56.3786008,"support":2.323838},{"time_hours":213,"approval_perbill":563076923,"support_perbill":22956326,"approval":56.3076923,"support":2.2956326},{"time_hours":214,"approval_perbill":562372188,"support_perbill":22676579,"approval":56.2372188,"support":2.2676579},{"time_hours":215,"approval_perbill":561671763,"support_perbill":22399111,"approval":56.1671763,"support":2.2399111},{"time_hours":216,"approval_perbill":560975610,"support_perbill":22123893,"approval":56.097561,"support":2.2123893},{"time_hours":217,"approval_perbill":560283688,"support_perbill":21850899,"approval":56.0283688,"support":2.1850899},{"time_hours":218,"approval_perbill":559595959,"support_perbill":21580102,"approval":55.9595959,"support":2.1580102},{"time_hours":219,"approval_perbill":558912386,"support_perbill":21311475,"approval":55.8912386,"support":2.1311475},{"time_hours":220,"approval_perbill":558232931,"support_perbill":21044992,"approval":55.8232931,"support":2.1044992},{"time_hours":221,"approval_perbill":557557557,"support_perbill":20780628,"approval":55.7557557,"support":2.0780628},{"time_hours":222,"approval_perbill":556886227,"support_perbill":20518358,"approval":55.6886227,"support":2.0518358},{"time_hours":223,"approval_perbill":556218905,"support_perbill":20258156,"approval":55.6218905,"support":2.0258156},{"time_hours":224,"approval_perbill":555555555,"support_perbill":19999999,"approval":55.5555555,"support":1.9999999},{"time_hours":225,"approval_perbill":554896142,"support_perbill":19743863,"approval":55.4896142,"support":1.9743863},{"time_hours":226,"approval_perbill":554240631,"support_perbill":19489723,"approval":55.4240631,"support":1.9489723},{"time_hours":227,"approval_perbill":553588987,"support_perbill":19237556,"approval":55.3588987,"support":1.9237556},{"time_hours":228,"approval_perbill":552941176,"support_perbill":18987341,"approval":55.2941176,"support":1.8987341},{"time_hours":229,"approval_perbill":552297165,"support_perbill":18739053,"approval":55.2297165,"support":1.8739053},{"time_hours":230,"approval_perbill":551656920,"support_perbill":18492672,"approval":55.165692,"support":1.8492672},{"time_hours":231,"approval_perbill":551020408,"support_perbill":18248174,"approval":55.1020408,"support":1.8248174},{"time_hours":232,"approval_perbill":550387597,"support_perbill":18005539,"approval":55.0387597,"support":1.8005539},{"time_hours":233,"approval_perbill":549758454,"support_perbill":17764746,"approval":54.9758454,"support":1.7764746},{"time_hours":234,"approval_perbill":549132948,"support_perbill":17525772,"approval":54.9132948,"support":1.7525772},{"time_hours":235,"approval_perbill":548511047,"support_perbill":17288599,"approval":54.8511047,"support":1.7288599},{"time_hours":236,"approval_perbill":547892720,"support_perbill":17053205,"approval":54.789272,"support":1.7053205},{"time_hours":237,"approval_perbill":547277937,"support_perbill":16819571,"approval":54.7277937,"support":1.6819571},{"time_hours":238,"approval_perbill":546666666,"support_perbill":16587677,"approval":54.6666666,"support":1.6587677},{"time_hours":239,"approval_perbill":546058879,"support_perbill":16357503,"approval":54.6058879,"support":1.6357503},{"time_hours":240,"approval_perbill":545454545,"support_perbill":16129031,"approval":54.5454545,"support":1.6129031},{"time_hours":241,"approval_perbill":544853635,"support_perbill":15902242,"approval":54.4853635,"support":1.5902242},{"time_hours":242,"approval_perbill":544256120,"support_perbill":15677117,"approval":54.425612,"support":1.5677117},{"time_hours":243,"approval_perbill":543661971,"support_perbill":15453638,"approval":54.3661971,"support":1.5453638},{"time_hours":244,"approval_perbill":543071161,"support_perbill":15231787,"approval":54.3071161,"support":1.5231787},{"time_hours":245,"approval_perbill":542483660,"support_perbill":15011547,"approval":54.248366,"support":1.5011547},{"time_hours":246,"approval_perbill":541899441,"support_perbill":14792899,"approval":54.1899441,"support":1.4792899},{"time_hours":247,"approval_perbill":541318477,"support_perbill":14575826,"approval":54.1318477,"support":1.4575826},{"time_hours":248,"approval_perbill":540740740,"support_perbill":14360312,"approval":54.074074,"support":1.4360312},{"time_hours":249,"approval_perbill":540166205,"support_perbill":14146341,"approval":54.0166205,"support":1.4146341},{"time_hours":250,"approval_perbill":539594843,"support_perbill":13933894,"approval":53.9594843,"support":1.3933894},{"time_hours":251,"approval_perbill":539026630,"support_perbill":13722957,"approval":53.902663,"support":1.3722957},{"time_hours":252,"approval_perbill":538461538,"support_perbill":13513513,"approval":53.8461538,"support":1.3513513},{"time_hours":253,"approval_perbill":537899543,"support_perbill":13305546,"approval":53.7899543,"support":1.3305546},{"time_hours":254,"approval_perbill":537340619,"support_perbill":13099041,"approval":53.7340619,"support":1.3099041},{"time_hours":255,"approval_perbill":536784741,"support_perbill":12893982,"approval":53.6784741,"support":1.2893982},{"time_hours":256,"approval_perbill":536231884,"support_perbill":12690355,"approval":53.6231884,"support":1.2690355},{"time_hours":257,"approval_perbill":535682023,"support_perbill":12488143,"approval":53.5682023,"support":1.2488143},{"time_hours":258,"approval_perbill":535135135,"support_perbill":12287334,"approval":53.5135135,"support":1.2287334},{"time_hours":259,"approval_perbill":534591195,"support_perbill":12087911,"approval":53.4591195,"support":1.2087911},{"time_hours":260,"approval_perbill":534050179,"support_perbill":11889861,"approval":53.4050179,"support":1.1889861},{"time_hours":261,"approval_perbill":533512064,"support_perbill":11693170,"approval":53.3512064,"support":1.169317},{"time_hours":262,"approval_perbill":532976827,"support_perbill":11497824,"approval":53.2976827,"support":1.1497824},{"time_hours":263,"approval_perbill":532444444,"support_perbill":11303808,"approval":53.2444444,"support":1.1303808},{"time_hours":264,"approval_perbill":531914893,"support_perbill":11111110,"approval":53.1914893,"support":1.111111},{"time_hours":265,"approval_perbill":531388152,"support_perbill":10919716,"approval":53.1388152,"support":1.0919716},{"time_hours":266,"approval_perbill":530864197,"support_perbill":10729613,"approval":53.0864197,"support":1.0729613},{"time_hours":267,"approval_perbill":530343007,"support_perbill":10540787,"approval":53.0343007,"support":1.0540787},{"time_hours":268,"approval_perbill":529824561,"support_perbill":10353227,"approval":52.9824561,"support":1.0353227},{"time_hours":269,"approval_perbill":529308836,"support_perbill":10166919,"approval":52.9308836,"support":1.0166919},{"time_hours":270,"approval_perbill":528795811,"support_perbill":9981850,"approval":52.8795811,"support":0.998185},{"time_hours":271,"approval_perbill":528285465,"support_perbill":9798009,"approval":52.8285465,"support":0.9798009},{"time_hours":272,"approval_perbill":527777777,"support_perbill":9615384,"approval":52.7777777,"support":0.9615384},{"time_hours":273,"approval_perbill":527272727,"support_perbill":9433961,"approval":52.7272727,"support":0.9433961},{"time_hours":274,"approval_perbill":526770293,"support_perbill":9253730,"approval":52.6770293,"support":0.925373},{"time_hours":275,"approval_perbill":526270456,"support_perbill":9074679,"approval":52.6270456,"support":0.9074679},{"time_hours":276,"approval_perbill":525773195,"support_perbill":8896796,"approval":52.5773195,"support":0.8896796},{"time_hours":277,"approval_perbill":525278491,"support_perbill":8720070,"approval":52.5278491,"support":0.872007},{"time_hours":278,"approval_perbill":524786324,"support_perbill":8544489,"approval":52.4786324,"support":0.8544489},{"time_hours":279,"approval_perbill":524296675,"support_perbill":8370043,"approval":52.4296675,"support":0.8370043},{"time_hours":280,"approval_perbill":523809523,"support_perbill":8196720,"approval":52.3809523,"support":0.819672},{"time_hours":281,"approval_perbill":523324851,"support_perbill":8024510,"approval":52.3324851,"support":0.802451},{"time_hours":282,"approval_perbill":522842639,"support_perbill":7853402,"approval":52.2842639,"support":0.7853402},{"time_hours":283,"approval_perbill":522362869,"support_perbill":7683386,"approval":52.2362869,"support":0.7683386},{"time_hours":284,"approval_perbill":521885521,"support_perbill":7514450,"approval":52.1885521,"support":0.751445},{"time_hours":285,"approval_perbill":521410579,"support_perbill":7346585,"approval":52.1410579,"support":0.7346585},{"time_hours":286,"approval_perbill":520938023,"support_perbill":7179781,"approval":52.0938023,"support":0.7179781},{"time_hours":287,"approval_perbill":520467836,"support_perbill":7014027,"approval":52.0467836,"support":0.7014027},{"time_hours":288,"approval_perbill":519999999,"support_perbill":6849314,"approval":51.9999999,"support":0.6849314},{"time_hours":289,"approval_perbill":519534497,"support_perbill":6685632,"approval":51.9534497,"support":0.6685632},{"time_hours":290,"approval_perbill":519071310,"support_perbill":6522971,"approval":51.907131,"support":0.6522971},{"time_hours":291,"approval_perbill":518610421,"support_perbill":6361322,"approval":51.8610421,"support":0.6361322},{"time_hours":292,"approval_perbill":518151815,"support_perbill":6200676,"approval":51.8151815,"support":0.6200676},{"time_hours":293,"approval_perbill":517695473,"support_perbill":6041022,"approval":51.7695473,"support":0.6041022},{"time_hours":294,"approval_perbill":517241379,"support_perbill":5882352,"approval":51.7241379,"support":0.5882352},{"time_hours":295,"approval_perbill":516789516,"support_perbill":5724657,"approval":51.6789516,"support":0.5724657},{"time_hours":296,"approval_perbill":516339869,"support_perbill":5567928,"approval":51.6339869,"support":0.5567928},{"time_hours":297,"approval_perbill":515892420,"support_perbill":5412156,"approval":51.589242,"support":0.5412156},{"time_hours":298,"approval_perbill":515447154,"support_perbill":5257332,"approval":51.5447154,"support":0.5257332},{"time_hours":299,"approval_perbill":515004055,"support_perbill":5103447,"approval":51.5004055,"support":0.5103447},{"time_hours":300,"approval_perbill":514563106,"support_perbill":4950494,"approval":51.4563106,"support":0.4950494},{"time_hours":301,"approval_perbill":514124293,"support_perbill":4798464,"approval":51.4124293,"support":0.4798464},{"time_hours":302,"approval_perbill":513687600,"support_perbill":4647347,"approval":51.36876,"support":0.4647347},{"time_hours":303,"approval_perbill":513253011,"support_perbill":4497137,"approval":51.3253011,"support":0.4497137},{"time_hours":304,"approval_perbill":512820512,"support_perbill":4347825,"approval":51.2820512,"support":0.4347825},{"time_hours":305,"approval_perbill":512390087,"support_perbill":4199403,"approval":51.2390087,"support":0.4199403},{"time_hours":306,"approval_perbill":511961722,"support_perbill":4051863,"approval":51.1961722,"support":0.4051863},{"time_hours":307,"approval_perbill":511535401,"support_perbill":3905197,"approval":51.1535401,"support":0.3905197},{"time_hours":308,"approval_perbill":511111111,"support_perbill":3759398,"approval":51.1111111,"support":0.3759398},{"time_hours":309,"approval_perbill":510688835,"support_perbill":3614457,"approval":51.0688835,"support":0.3614457},{"time_hours":310,"approval_perbill":510268562,"support_perbill":3470368,"approval":51.0268562,"support":0.3470368},{"time_hours":311,"approval_perbill":509850275,"support_perbill":3327122,"approval":50.9850275,"support":0.3327122},{"time_hours":312,"approval_perbill":509433962,"support_perbill":3184712,"approval":50.9433962,"support":0.3184712},{"time_hours":313,"approval_perbill":509019607,"support_perbill":3043132,"approval":50.9019607,"support":0.3043132},{"time_hours":314,"approval_perbill":508607198,"support_perbill":2902374,"approval":50.8607198,"support":0.2902374},{"time_hours":315,"approval_perbill":508196721,"support_perbill":2762430,"approval":50.8196721,"support":0.276243},{"time_hours":316,"approval_perbill":507788161,"support_perbill":2623294,"approval":50.7788161,"support":0.2623294},{"time_hours":317,"approval_perbill":507381507,"support_perbill":2484959,"approval":50.7381507,"support":0.2484959},{"time_hours":318,"approval_perbill":506976744,"support_perbill":2347417,"approval":50.6976744,"support":0.2347417},{"time_hours":319,"approval_perbill":506573859,"support_perbill":2210662,"approval":50.6573859,"support":0.2210662},{"time_hours":320,"approval_perbill":506172839,"support_perbill":2074688,"approval":50.6172839,"support":0.2074688},{"time_hours":321,"approval_perbill":505773671,"support_perbill":1939487,"approval":50.5773671,"support":0.1939487},{"time_hours":322,"approval_perbill":505376343,"support_perbill":1805053,"approval":50.5376343,"support":0.1805053},{"time_hours":323,"approval_perbill":504980842,"support_perbill":1671380,"approval":50.4980842,"support":0.167138},{"time_hours":324,"approval_perbill":504587155,"support_perbill":1538461,"approval":50.4587155,"support":0.1538461},{"time_hours":325,"approval_perbill":504195270,"support_perbill":1406289,"approval":50.419527,"support":0.1406289},{"time_hours":326,"approval_perbill":503805174,"support_perbill":1274859,"approval":50.3805174,"support":0.1274859},{"time_hours":327,"approval_perbill":503416856,"support_perbill":1144164,"approval":50.3416856,"support":0.1144164},{"time_hours":328,"approval_perbill":503030302,"support_perbill":1014198,"approval":50.3030302,"support":0.1014198},{"time_hours":329,"approval_perbill":502645502,"support_perbill":884955,"approval":50.2645502,"support":0.0884955},{"time_hours":330,"approval_perbill":502262443,"support_perbill":756429,"approval":50.2262443,"support":0.0756429},{"time_hours":331,"approval_perbill":501881113,"support_perbill":628614,"approval":50.1881113,"support":0.0628614},{"time_hours":332,"approval_perbill":501501501,"support_perbill":501504,"approval":50.1501501,"support":0.0501504},{"time_hours":333,"approval_perbill":501123595,"support_perbill":375093,"approval":50.1123595,"support":0.0375093},{"time_hours":334,"approval_perbill":500747383,"support_perbill":249376,"approval":50.0747383,"support":0.0249376},{"time_hours":335,"approval_perbill":500372855,"support_perbill":124346,"approval":50.0372855,"support":0.0124346},{"time_hours":336,"approval_perbill":499999999,"support_perbill":0,"approval":49.9999999,"support":0}]')},51953:p=>{"use strict";p.exports=JSON.parse('[{"Time (Hours)":0,"Approval (perbill)":1000000000,"Support (perbill)":500000026,"Approval":100,"Support":50.0000026},{"Time (Hours)":1,"Approval (perbill)":997549020,"Support (perbill)":418401359,"Approval":99.754902,"Support":41.8401359},{"Time (Hours)":2,"Approval (perbill)":995098040,"Support (perbill)":359397443,"Approval":99.509804,"Support":35.9397443},{"Time (Hours)":3,"Approval (perbill)":992647060,"Support (perbill)":314744813,"Approval":99.264706,"Support":31.4744813},{"Time (Hours)":4,"Approval (perbill)":990196080,"Support (perbill)":279775293,"Approval":99.019608,"Support":27.9775293},{"Time (Hours)":5,"Approval (perbill)":987745099,"Support (perbill)":251647242,"Approval":98.7745099,"Support":25.1647242},{"Time (Hours)":6,"Approval (perbill)":985294119,"Support (perbill)":228531862,"Approval":98.5294119,"Support":22.8531862},{"Time (Hours)":7,"Approval (perbill)":982843138,"Support (perbill)":209198815,"Approval":98.2843138,"Support":20.9198815},{"Time (Hours)":8,"Approval (perbill)":980392158,"Support (perbill)":192789972,"Approval":98.0392158,"Support":19.2789972},{"Time (Hours)":9,"Approval (perbill)":977941177,"Support (perbill)":178688524,"Approval":97.7941177,"Support":17.8688524},{"Time (Hours)":10,"Approval (perbill)":975490197,"Support (perbill)":166439756,"Approval":97.5490197,"Support":16.6439756},{"Time (Hours)":11,"Approval (perbill)":973039216,"Support (perbill)":155701053,"Approval":97.3039216,"Support":15.5701053},{"Time (Hours)":12,"Approval (perbill)":970588236,"Support (perbill)":146209386,"Approval":97.0588236,"Support":14.6209386},{"Time (Hours)":13,"Approval (perbill)":968137256,"Support (perbill)":137759452,"Approval":96.8137256,"Support":13.7759452},{"Time (Hours)":14,"Approval (perbill)":965686276,"Support (perbill)":130188679,"Approval":96.5686276,"Support":13.0188679},{"Time (Hours)":15,"Approval (perbill)":963235295,"Support (perbill)":123366639,"Approval":96.3235295,"Support":12.3366639},{"Time (Hours)":16,"Approval (perbill)":960784315,"Support (perbill)":117187499,"Approval":96.0784315,"Support":11.7187499},{"Time (Hours)":17,"Approval (perbill)":958333334,"Support (perbill)":111564465,"Approval":95.8333334,"Support":11.1564465},{"Time (Hours)":18,"Approval (perbill)":955882354,"Support (perbill)":106425701,"Approval":95.5882354,"Support":10.6425701},{"Time (Hours)":19,"Approval (perbill)":953431373,"Support (perbill)":101711228,"Approval":95.3431373,"Support":10.1711228},{"Time (Hours)":20,"Approval (perbill)":950980393,"Support (perbill)":97370582,"Approval":95.0980393,"Support":9.7370582},{"Time (Hours)":21,"Approval (perbill)":948529412,"Support (perbill)":93360994,"Approval":94.8529412,"Support":9.3360994},{"Time (Hours)":22,"Approval (perbill)":946078432,"Support (perbill)":89645982,"Approval":94.6078432,"Support":8.9645982},{"Time (Hours)":23,"Approval (perbill)":943627452,"Support (perbill)":86194234,"Approval":94.3627452,"Support":8.6194234},{"Time (Hours)":24,"Approval (perbill)":941176471,"Support (perbill)":82978722,"Approval":94.1176471,"Support":8.2978722},{"Time (Hours)":25,"Approval (perbill)":938725491,"Support (perbill)":79975997,"Approval":93.8725491,"Support":7.9975997},{"Time (Hours)":26,"Approval (perbill)":936274511,"Support (perbill)":77165614,"Approval":93.6274511,"Support":7.7165614},{"Time (Hours)":27,"Approval (perbill)":933823531,"Support (perbill)":74529666,"Approval":93.3823531,"Support":7.4529666},{"Time (Hours)":28,"Approval (perbill)":931372550,"Support (perbill)":72052400,"Approval":93.137255,"Support":7.20524},{"Time (Hours)":29,"Approval (perbill)":928921570,"Support (perbill)":69719908,"Approval":92.892157,"Support":6.9719908},{"Time (Hours)":30,"Approval (perbill)":926470589,"Support (perbill)":67519857,"Approval":92.6470589,"Support":6.7519857},{"Time (Hours)":31,"Approval (perbill)":924019609,"Support (perbill)":65441280,"Approval":92.4019609,"Support":6.544128},{"Time (Hours)":32,"Approval (perbill)":921568628,"Support (perbill)":63474386,"Approval":92.1568628,"Support":6.3474386},{"Time (Hours)":33,"Approval (perbill)":919117648,"Support (perbill)":61610409,"Approval":91.9117648,"Support":6.1610409},{"Time (Hours)":34,"Approval (perbill)":916666667,"Support (perbill)":59841478,"Approval":91.6666667,"Support":5.9841478},{"Time (Hours)":35,"Approval (perbill)":914215687,"Support (perbill)":58160504,"Approval":91.4215687,"Support":5.8160504},{"Time (Hours)":36,"Approval (perbill)":911764706,"Support (perbill)":56561084,"Approval":91.1764706,"Support":5.6561084},{"Time (Hours)":37,"Approval (perbill)":909313726,"Support (perbill)":55037426,"Approval":90.9313726,"Support":5.5037426},{"Time (Hours)":38,"Approval (perbill)":906862746,"Support (perbill)":53584271,"Approval":90.6862746,"Support":5.3584271},{"Time (Hours)":39,"Approval (perbill)":904411766,"Support (perbill)":52196835,"Approval":90.4411766,"Support":5.2196835},{"Time (Hours)":40,"Approval (perbill)":901960785,"Support (perbill)":50870759,"Approval":90.1960785,"Support":5.0870759},{"Time (Hours)":41,"Approval (perbill)":899509805,"Support (perbill)":49602061,"Approval":89.9509805,"Support":4.9602061},{"Time (Hours)":42,"Approval (perbill)":897058824,"Support (perbill)":48387095,"Approval":89.7058824,"Support":4.8387095},{"Time (Hours)":43,"Approval (perbill)":894607844,"Support (perbill)":47222519,"Approval":89.4607844,"Support":4.7222519},{"Time (Hours)":44,"Approval (perbill)":892156864,"Support (perbill)":46105262,"Approval":89.2156864,"Support":4.6105262},{"Time (Hours)":45,"Approval (perbill)":889705883,"Support (perbill)":45032496,"Approval":88.9705883,"Support":4.5032496},{"Time (Hours)":46,"Approval (perbill)":887254903,"Support (perbill)":44001617,"Approval":88.7254903,"Support":4.4001617},{"Time (Hours)":47,"Approval (perbill)":884803922,"Support (perbill)":43010218,"Approval":88.4803922,"Support":4.3010218},{"Time (Hours)":48,"Approval (perbill)":882352942,"Support (perbill)":42056074,"Approval":88.2352942,"Support":4.2056074},{"Time (Hours)":49,"Approval (perbill)":879901962,"Support (perbill)":41137122,"Approval":87.9901962,"Support":4.1137122},{"Time (Hours)":50,"Approval (perbill)":877450982,"Support (perbill)":40251453,"Approval":87.7450982,"Support":4.0251453},{"Time (Hours)":51,"Approval (perbill)":875000001,"Support (perbill)":39397289,"Approval":87.5000001,"Support":3.9397289},{"Time (Hours)":52,"Approval (perbill)":872549021,"Support (perbill)":38572980,"Approval":87.2549021,"Support":3.857298},{"Time (Hours)":53,"Approval (perbill)":870098040,"Support (perbill)":37776985,"Approval":87.009804,"Support":3.7776985},{"Time (Hours)":54,"Approval (perbill)":867647060,"Support (perbill)":37007873,"Approval":86.764706,"Support":3.7007873},{"Time (Hours)":55,"Approval (perbill)":865196079,"Support (perbill)":36264302,"Approval":86.5196079,"Support":3.6264302},{"Time (Hours)":56,"Approval (perbill)":862745099,"Support (perbill)":35545023,"Approval":86.2745099,"Support":3.5545023},{"Time (Hours)":57,"Approval (perbill)":860294118,"Support (perbill)":34848862,"Approval":86.0294118,"Support":3.4848862},{"Time (Hours)":58,"Approval (perbill)":857843138,"Support (perbill)":34174724,"Approval":85.7843138,"Support":3.4174724},{"Time (Hours)":59,"Approval (perbill)":855392157,"Support (perbill)":33521580,"Approval":85.5392157,"Support":3.352158},{"Time (Hours)":60,"Approval (perbill)":852941177,"Support (perbill)":32888464,"Approval":85.2941177,"Support":3.2888464},{"Time (Hours)":61,"Approval (perbill)":850490197,"Support (perbill)":32274469,"Approval":85.0490197,"Support":3.2274469},{"Time (Hours)":62,"Approval (perbill)":848039217,"Support (perbill)":31678741,"Approval":84.8039217,"Support":3.1678741},{"Time (Hours)":63,"Approval (perbill)":845588236,"Support (perbill)":31100477,"Approval":84.5588236,"Support":3.1100477},{"Time (Hours)":64,"Approval (perbill)":843137256,"Support (perbill)":30538921,"Approval":84.3137256,"Support":3.0538921},{"Time (Hours)":65,"Approval (perbill)":840686276,"Support (perbill)":29993358,"Approval":84.0686276,"Support":2.9993358},{"Time (Hours)":66,"Approval (perbill)":838235295,"Support (perbill)":29463116,"Approval":83.8235295,"Support":2.9463116},{"Time (Hours)":67,"Approval (perbill)":835784315,"Support (perbill)":28947556,"Approval":83.5784315,"Support":2.8947556},{"Time (Hours)":68,"Approval (perbill)":833333334,"Support (perbill)":28446079,"Approval":83.3333334,"Support":2.8446079},{"Time (Hours)":69,"Approval (perbill)":830882354,"Support (perbill)":27958114,"Approval":83.0882354,"Support":2.7958114},{"Time (Hours)":70,"Approval (perbill)":828431373,"Support (perbill)":27483123,"Approval":82.8431373,"Support":2.7483123},{"Time (Hours)":71,"Approval (perbill)":825980393,"Support (perbill)":27020596,"Approval":82.5980393,"Support":2.7020596},{"Time (Hours)":72,"Approval (perbill)":823529412,"Support (perbill)":26570047,"Approval":82.3529412,"Support":2.6570047},{"Time (Hours)":73,"Approval (perbill)":821078432,"Support (perbill)":26131019,"Approval":82.1078432,"Support":2.6131019},{"Time (Hours)":74,"Approval (perbill)":818627452,"Support (perbill)":25703073,"Approval":81.8627452,"Support":2.5703073},{"Time (Hours)":75,"Approval (perbill)":816176472,"Support (perbill)":25285796,"Approval":81.6176472,"Support":2.5285796},{"Time (Hours)":76,"Approval (perbill)":813725491,"Support (perbill)":24878795,"Approval":81.3725491,"Support":2.4878795},{"Time (Hours)":77,"Approval (perbill)":811274511,"Support (perbill)":24481693,"Approval":81.1274511,"Support":2.4481693},{"Time (Hours)":78,"Approval (perbill)":808823530,"Support (perbill)":24094134,"Approval":80.882353,"Support":2.4094134},{"Time (Hours)":79,"Approval (perbill)":806372550,"Support (perbill)":23715779,"Approval":80.637255,"Support":2.3715779},{"Time (Hours)":80,"Approval (perbill)":803921569,"Support (perbill)":23346303,"Approval":80.3921569,"Support":2.3346303},{"Time (Hours)":81,"Approval (perbill)":801470589,"Support (perbill)":22985397,"Approval":80.1470589,"Support":2.2985397},{"Time (Hours)":82,"Approval (perbill)":799019608,"Support (perbill)":22632766,"Approval":79.9019608,"Support":2.2632766},{"Time (Hours)":83,"Approval (perbill)":796568628,"Support (perbill)":22288130,"Approval":79.6568628,"Support":2.228813},{"Time (Hours)":84,"Approval (perbill)":794117648,"Support (perbill)":21951219,"Approval":79.4117648,"Support":2.1951219},{"Time (Hours)":85,"Approval (perbill)":791666668,"Support (perbill)":21621776,"Approval":79.1666668,"Support":2.1621776},{"Time (Hours)":86,"Approval (perbill)":789215688,"Support (perbill)":21299556,"Approval":78.9215688,"Support":2.1299556},{"Time (Hours)":87,"Approval (perbill)":786764707,"Support (perbill)":20984324,"Approval":78.6764707,"Support":2.0984324},{"Time (Hours)":88,"Approval (perbill)":784313727,"Support (perbill)":20675855,"Approval":78.4313727,"Support":2.0675855},{"Time (Hours)":89,"Approval (perbill)":781862746,"Support (perbill)":20373934,"Approval":78.1862746,"Support":2.0373934},{"Time (Hours)":90,"Approval (perbill)":779411766,"Support (perbill)":20078354,"Approval":77.9411766,"Support":2.0078354},{"Time (Hours)":91,"Approval (perbill)":776960785,"Support (perbill)":19788917,"Approval":77.6960785,"Support":1.9788917},{"Time (Hours)":92,"Approval (perbill)":774509805,"Support (perbill)":19505435,"Approval":77.4509805,"Support":1.9505435},{"Time (Hours)":93,"Approval (perbill)":772058824,"Support (perbill)":19227725,"Approval":77.2058824,"Support":1.9227725},{"Time (Hours)":94,"Approval (perbill)":769607844,"Support (perbill)":18955613,"Approval":76.9607844,"Support":1.8955613},{"Time (Hours)":95,"Approval (perbill)":767156863,"Support (perbill)":18688931,"Approval":76.7156863,"Support":1.8688931},{"Time (Hours)":96,"Approval (perbill)":764705883,"Support (perbill)":18427518,"Approval":76.4705883,"Support":1.8427518},{"Time (Hours)":97,"Approval (perbill)":762254903,"Support (perbill)":18171219,"Approval":76.2254903,"Support":1.8171219},{"Time (Hours)":98,"Approval (perbill)":759803923,"Support (perbill)":17919887,"Approval":75.9803923,"Support":1.7919887},{"Time (Hours)":99,"Approval (perbill)":757352942,"Support (perbill)":17673377,"Approval":75.7352942,"Support":1.7673377},{"Time (Hours)":100,"Approval (perbill)":754901962,"Support (perbill)":17431553,"Approval":75.4901962,"Support":1.7431553},{"Time (Hours)":101,"Approval (perbill)":752450981,"Support (perbill)":17194282,"Approval":75.2450981,"Support":1.7194282},{"Time (Hours)":102,"Approval (perbill)":750000001,"Support (perbill)":16961437,"Approval":75.0000001,"Support":1.6961437},{"Time (Hours)":103,"Approval (perbill)":747549020,"Support (perbill)":16732895,"Approval":74.754902,"Support":1.6732895},{"Time (Hours)":104,"Approval (perbill)":745098040,"Support (perbill)":16508538,"Approval":74.509804,"Support":1.6508538},{"Time (Hours)":105,"Approval (perbill)":742647059,"Support (perbill)":16288252,"Approval":74.2647059,"Support":1.6288252},{"Time (Hours)":106,"Approval (perbill)":740196079,"Support (perbill)":16071927,"Approval":74.0196079,"Support":1.6071927},{"Time (Hours)":107,"Approval (perbill)":737745099,"Support (perbill)":15859457,"Approval":73.7745099,"Support":1.5859457},{"Time (Hours)":108,"Approval (perbill)":735294118,"Support (perbill)":15650741,"Approval":73.5294118,"Support":1.5650741},{"Time (Hours)":109,"Approval (perbill)":732843138,"Support (perbill)":15445679,"Approval":73.2843138,"Support":1.5445679},{"Time (Hours)":110,"Approval (perbill)":730392158,"Support (perbill)":15244176,"Approval":73.0392158,"Support":1.5244176},{"Time (Hours)":111,"Approval (perbill)":727941178,"Support (perbill)":15046141,"Approval":72.7941178,"Support":1.5046141},{"Time (Hours)":112,"Approval (perbill)":725490197,"Support (perbill)":14851485,"Approval":72.5490197,"Support":1.4851485},{"Time (Hours)":113,"Approval (perbill)":723039217,"Support (perbill)":14660121,"Approval":72.3039217,"Support":1.4660121},{"Time (Hours)":114,"Approval (perbill)":720588236,"Support (perbill)":14471968,"Approval":72.0588236,"Support":1.4471968},{"Time (Hours)":115,"Approval (perbill)":718137256,"Support (perbill)":14286945,"Approval":71.8137256,"Support":1.4286945},{"Time (Hours)":116,"Approval (perbill)":715686275,"Support (perbill)":14104975,"Approval":71.5686275,"Support":1.4104975},{"Time (Hours)":117,"Approval (perbill)":713235295,"Support (perbill)":13925982,"Approval":71.3235295,"Support":1.3925982},{"Time (Hours)":118,"Approval (perbill)":710784314,"Support (perbill)":13749894,"Approval":71.0784314,"Support":1.3749894},{"Time (Hours)":119,"Approval (perbill)":708333334,"Support (perbill)":13576642,"Approval":70.8333334,"Support":1.3576642},{"Time (Hours)":120,"Approval (perbill)":705882353,"Support (perbill)":13406156,"Approval":70.5882353,"Support":1.3406156},{"Time (Hours)":121,"Approval (perbill)":703431373,"Support (perbill)":13238372,"Approval":70.3431373,"Support":1.3238372},{"Time (Hours)":122,"Approval (perbill)":700980393,"Support (perbill)":13073226,"Approval":70.0980393,"Support":1.3073226},{"Time (Hours)":123,"Approval (perbill)":698529413,"Support (perbill)":12910655,"Approval":69.8529413,"Support":1.2910655},{"Time (Hours)":124,"Approval (perbill)":696078432,"Support (perbill)":12750601,"Approval":69.6078432,"Support":1.2750601},{"Time (Hours)":125,"Approval (perbill)":693627452,"Support (perbill)":12593005,"Approval":69.3627452,"Support":1.2593005},{"Time (Hours)":126,"Approval (perbill)":691176471,"Support (perbill)":12437810,"Approval":69.1176471,"Support":1.243781},{"Time (Hours)":127,"Approval (perbill)":688725491,"Support (perbill)":12284964,"Approval":68.8725491,"Support":1.2284964},{"Time (Hours)":128,"Approval (perbill)":686274511,"Support (perbill)":12134411,"Approval":68.6274511,"Support":1.2134411},{"Time (Hours)":129,"Approval (perbill)":683823530,"Support (perbill)":11986103,"Approval":68.382353,"Support":1.1986103},{"Time (Hours)":130,"Approval (perbill)":681372550,"Support (perbill)":11839987,"Approval":68.137255,"Support":1.1839987},{"Time (Hours)":131,"Approval (perbill)":678921569,"Support (perbill)":11696017,"Approval":67.8921569,"Support":1.1696017},{"Time (Hours)":132,"Approval (perbill)":676470589,"Support (perbill)":11554145,"Approval":67.6470589,"Support":1.1554145},{"Time (Hours)":133,"Approval (perbill)":674019609,"Support (perbill)":11414326,"Approval":67.4019609,"Support":1.1414326},{"Time (Hours)":134,"Approval (perbill)":671568629,"Support (perbill)":11276516,"Approval":67.1568629,"Support":1.1276516},{"Time (Hours)":135,"Approval (perbill)":669117648,"Support (perbill)":11140671,"Approval":66.9117648,"Support":1.1140671},{"Time (Hours)":136,"Approval (perbill)":666666668,"Support (perbill)":11006750,"Approval":66.6666668,"Support":1.100675},{"Time (Hours)":137,"Approval (perbill)":664215687,"Support (perbill)":10874713,"Approval":66.4215687,"Support":1.0874713},{"Time (Hours)":138,"Approval (perbill)":661764707,"Support (perbill)":10744519,"Approval":66.1764707,"Support":1.0744519},{"Time (Hours)":139,"Approval (perbill)":659313726,"Support (perbill)":10616130,"Approval":65.9313726,"Support":1.061613},{"Time (Hours)":140,"Approval (perbill)":656862746,"Support (perbill)":10489510,"Approval":65.6862746,"Support":1.048951},{"Time (Hours)":141,"Approval (perbill)":654411765,"Support (perbill)":10364622,"Approval":65.4411765,"Support":1.0364622},{"Time (Hours)":142,"Approval (perbill)":651960785,"Support (perbill)":10241430,"Approval":65.1960785,"Support":1.024143},{"Time (Hours)":143,"Approval (perbill)":649509804,"Support (perbill)":10119900,"Approval":64.9509804,"Support":1.01199},{"Time (Hours)":144,"Approval (perbill)":647058824,"Support (perbill)":10000000,"Approval":64.7058824,"Support":1},{"Time (Hours)":145,"Approval (perbill)":644607844,"Support (perbill)":9881695,"Approval":64.4607844,"Support":0.9881695},{"Time (Hours)":146,"Approval (perbill)":642156864,"Support (perbill)":9764955,"Approval":64.2156864,"Support":0.9764955},{"Time (Hours)":147,"Approval (perbill)":639705883,"Support (perbill)":9649749,"Approval":63.9705883,"Support":0.9649749},{"Time (Hours)":148,"Approval (perbill)":637254903,"Support (perbill)":9536047,"Approval":63.7254903,"Support":0.9536047},{"Time (Hours)":149,"Approval (perbill)":634803923,"Support (perbill)":9423820,"Approval":63.4803923,"Support":0.942382},{"Time (Hours)":150,"Approval (perbill)":632352942,"Support (perbill)":9313038,"Approval":63.2352942,"Support":0.9313038},{"Time (Hours)":151,"Approval (perbill)":629901962,"Support (perbill)":9203674,"Approval":62.9901962,"Support":0.9203674},{"Time (Hours)":152,"Approval (perbill)":627450981,"Support (perbill)":9095702,"Approval":62.7450981,"Support":0.9095702},{"Time (Hours)":153,"Approval (perbill)":625000001,"Support (perbill)":8989095,"Approval":62.5000001,"Support":0.8989095},{"Time (Hours)":154,"Approval (perbill)":622549020,"Support (perbill)":8883826,"Approval":62.254902,"Support":0.8883826},{"Time (Hours)":155,"Approval (perbill)":620098040,"Support (perbill)":8779872,"Approval":62.009804,"Support":0.8779872},{"Time (Hours)":156,"Approval (perbill)":617647059,"Support (perbill)":8677207,"Approval":61.7647059,"Support":0.8677207},{"Time (Hours)":157,"Approval (perbill)":615196079,"Support (perbill)":8575808,"Approval":61.5196079,"Support":0.8575808},{"Time (Hours)":158,"Approval (perbill)":612745099,"Support (perbill)":8475652,"Approval":61.2745099,"Support":0.8475652},{"Time (Hours)":159,"Approval (perbill)":610294119,"Support (perbill)":8376715,"Approval":61.0294119,"Support":0.8376715},{"Time (Hours)":160,"Approval (perbill)":607843138,"Support (perbill)":8278976,"Approval":60.7843138,"Support":0.8278976},{"Time (Hours)":161,"Approval (perbill)":605392158,"Support (perbill)":8182413,"Approval":60.5392158,"Support":0.8182413},{"Time (Hours)":162,"Approval (perbill)":602941177,"Support (perbill)":8087005,"Approval":60.2941177,"Support":0.8087005},{"Time (Hours)":163,"Approval (perbill)":600490197,"Support (perbill)":7992731,"Approval":60.0490197,"Support":0.7992731},{"Time (Hours)":164,"Approval (perbill)":598039216,"Support (perbill)":7899571,"Approval":59.8039216,"Support":0.7899571},{"Time (Hours)":165,"Approval (perbill)":595588236,"Support (perbill)":7807506,"Approval":59.5588236,"Support":0.7807506},{"Time (Hours)":166,"Approval (perbill)":593137255,"Support (perbill)":7716516,"Approval":59.3137255,"Support":0.7716516},{"Time (Hours)":167,"Approval (perbill)":590686275,"Support (perbill)":7626583,"Approval":59.0686275,"Support":0.7626583},{"Time (Hours)":168,"Approval (perbill)":588235295,"Support (perbill)":7537688,"Approval":58.8235295,"Support":0.7537688},{"Time (Hours)":169,"Approval (perbill)":585784315,"Support (perbill)":7449814,"Approval":58.5784315,"Support":0.7449814},{"Time (Hours)":170,"Approval (perbill)":583333335,"Support (perbill)":7362942,"Approval":58.3333335,"Support":0.7362942},{"Time (Hours)":171,"Approval (perbill)":580882354,"Support (perbill)":7277057,"Approval":58.0882354,"Support":0.7277057},{"Time (Hours)":172,"Approval (perbill)":578431374,"Support (perbill)":7192141,"Approval":57.8431374,"Support":0.7192141},{"Time (Hours)":173,"Approval (perbill)":575980393,"Support (perbill)":7108178,"Approval":57.5980393,"Support":0.7108178},{"Time (Hours)":174,"Approval (perbill)":573529413,"Support (perbill)":7025151,"Approval":57.3529413,"Support":0.7025151},{"Time (Hours)":175,"Approval (perbill)":571078432,"Support (perbill)":6943047,"Approval":57.1078432,"Support":0.6943047},{"Time (Hours)":176,"Approval (perbill)":568627452,"Support (perbill)":6861848,"Approval":56.8627452,"Support":0.6861848},{"Time (Hours)":177,"Approval (perbill)":566176471,"Support (perbill)":6781540,"Approval":56.6176471,"Support":0.678154},{"Time (Hours)":178,"Approval (perbill)":563725491,"Support (perbill)":6702109,"Approval":56.3725491,"Support":0.6702109},{"Time (Hours)":179,"Approval (perbill)":561274510,"Support (perbill)":6623541,"Approval":56.127451,"Support":0.6623541},{"Time (Hours)":180,"Approval (perbill)":558823530,"Support (perbill)":6545820,"Approval":55.882353,"Support":0.654582},{"Time (Hours)":181,"Approval (perbill)":556372550,"Support (perbill)":6468935,"Approval":55.637255,"Support":0.6468935},{"Time (Hours)":182,"Approval (perbill)":553921570,"Support (perbill)":6392871,"Approval":55.392157,"Support":0.6392871},{"Time (Hours)":183,"Approval (perbill)":551470589,"Support (perbill)":6317615,"Approval":55.1470589,"Support":0.6317615},{"Time (Hours)":184,"Approval (perbill)":549019609,"Support (perbill)":6243154,"Approval":54.9019609,"Support":0.6243154},{"Time (Hours)":185,"Approval (perbill)":546568628,"Support (perbill)":6169476,"Approval":54.6568628,"Support":0.6169476},{"Time (Hours)":186,"Approval (perbill)":544117648,"Support (perbill)":6096569,"Approval":54.4117648,"Support":0.6096569},{"Time (Hours)":187,"Approval (perbill)":541666667,"Support (perbill)":6024421,"Approval":54.1666667,"Support":0.6024421},{"Time (Hours)":188,"Approval (perbill)":539215687,"Support (perbill)":5953019,"Approval":53.9215687,"Support":0.5953019},{"Time (Hours)":189,"Approval (perbill)":536764706,"Support (perbill)":5882353,"Approval":53.6764706,"Support":0.5882353},{"Time (Hours)":190,"Approval (perbill)":534313726,"Support (perbill)":5812410,"Approval":53.4313726,"Support":0.581241},{"Time (Hours)":191,"Approval (perbill)":531862746,"Support (perbill)":5743181,"Approval":53.1862746,"Support":0.5743181},{"Time (Hours)":192,"Approval (perbill)":529411765,"Support (perbill)":5674653,"Approval":52.9411765,"Support":0.5674653},{"Time (Hours)":193,"Approval (perbill)":526960785,"Support (perbill)":5606817,"Approval":52.6960785,"Support":0.5606817},{"Time (Hours)":194,"Approval (perbill)":524509805,"Support (perbill)":5539662,"Approval":52.4509805,"Support":0.5539662},{"Time (Hours)":195,"Approval (perbill)":522058825,"Support (perbill)":5473177,"Approval":52.2058825,"Support":0.5473177},{"Time (Hours)":196,"Approval (perbill)":519607844,"Support (perbill)":5407354,"Approval":51.9607844,"Support":0.5407354},{"Time (Hours)":197,"Approval (perbill)":517156864,"Support (perbill)":5342181,"Approval":51.7156864,"Support":0.5342181},{"Time (Hours)":198,"Approval (perbill)":514705883,"Support (perbill)":5277650,"Approval":51.4705883,"Support":0.527765},{"Time (Hours)":199,"Approval (perbill)":512254903,"Support (perbill)":5213751,"Approval":51.2254903,"Support":0.5213751},{"Time (Hours)":200,"Approval (perbill)":509803922,"Support (perbill)":5150474,"Approval":50.9803922,"Support":0.5150474},{"Time (Hours)":201,"Approval (perbill)":507352942,"Support (perbill)":5087812,"Approval":50.7352942,"Support":0.5087812},{"Time (Hours)":202,"Approval (perbill)":504901961,"Support (perbill)":5025754,"Approval":50.4901961,"Support":0.5025754},{"Time (Hours)":203,"Approval (perbill)":502450981,"Support (perbill)":4964292,"Approval":50.2450981,"Support":0.4964292},{"Time (Hours)":204,"Approval (perbill)":500000000,"Support (perbill)":4903417,"Approval":50,"Support":0.4903417},{"Time (Hours)":205,"Approval (perbill)":500000000,"Support (perbill)":4843122,"Approval":50,"Support":0.4843122},{"Time (Hours)":206,"Approval (perbill)":500000000,"Support (perbill)":4783398,"Approval":50,"Support":0.4783398},{"Time (Hours)":207,"Approval (perbill)":500000000,"Support (perbill)":4724236,"Approval":50,"Support":0.4724236},{"Time (Hours)":208,"Approval (perbill)":500000000,"Support (perbill)":4665630,"Approval":50,"Support":0.466563},{"Time (Hours)":209,"Approval (perbill)":500000000,"Support (perbill)":4607570,"Approval":50,"Support":0.460757},{"Time (Hours)":210,"Approval (perbill)":500000000,"Support (perbill)":4550050,"Approval":50,"Support":0.455005},{"Time (Hours)":211,"Approval (perbill)":500000000,"Support (perbill)":4493062,"Approval":50,"Support":0.4493062},{"Time (Hours)":212,"Approval (perbill)":500000000,"Support (perbill)":4436599,"Approval":50,"Support":0.4436599},{"Time (Hours)":213,"Approval (perbill)":500000000,"Support (perbill)":4380654,"Approval":50,"Support":0.4380654},{"Time (Hours)":214,"Approval (perbill)":500000000,"Support (perbill)":4325218,"Approval":50,"Support":0.4325218},{"Time (Hours)":215,"Approval (perbill)":500000000,"Support (perbill)":4270287,"Approval":50,"Support":0.4270287},{"Time (Hours)":216,"Approval (perbill)":500000000,"Support (perbill)":4215851,"Approval":50,"Support":0.4215851},{"Time (Hours)":217,"Approval (perbill)":500000000,"Support (perbill)":4161906,"Approval":50,"Support":0.4161906},{"Time (Hours)":218,"Approval (perbill)":500000000,"Support (perbill)":4108444,"Approval":50,"Support":0.4108444},{"Time (Hours)":219,"Approval (perbill)":500000000,"Support (perbill)":4055459,"Approval":50,"Support":0.4055459},{"Time (Hours)":220,"Approval (perbill)":500000000,"Support (perbill)":4002944,"Approval":50,"Support":0.4002944},{"Time (Hours)":221,"Approval (perbill)":500000000,"Support (perbill)":3950894,"Approval":50,"Support":0.3950894},{"Time (Hours)":222,"Approval (perbill)":500000000,"Support (perbill)":3899302,"Approval":50,"Support":0.3899302},{"Time (Hours)":223,"Approval (perbill)":500000000,"Support (perbill)":3848162,"Approval":50,"Support":0.3848162},{"Time (Hours)":224,"Approval (perbill)":500000000,"Support (perbill)":3797468,"Approval":50,"Support":0.3797468},{"Time (Hours)":225,"Approval (perbill)":500000000,"Support (perbill)":3747215,"Approval":50,"Support":0.3747215},{"Time (Hours)":226,"Approval (perbill)":500000000,"Support (perbill)":3697396,"Approval":50,"Support":0.3697396},{"Time (Hours)":227,"Approval (perbill)":500000000,"Support (perbill)":3648006,"Approval":50,"Support":0.3648006},{"Time (Hours)":228,"Approval (perbill)":500000000,"Support (perbill)":3599040,"Approval":50,"Support":0.359904},{"Time (Hours)":229,"Approval (perbill)":500000000,"Support (perbill)":3550492,"Approval":50,"Support":0.3550492},{"Time (Hours)":230,"Approval (perbill)":500000000,"Support (perbill)":3502357,"Approval":50,"Support":0.3502357},{"Time (Hours)":231,"Approval (perbill)":500000000,"Support (perbill)":3454629,"Approval":50,"Support":0.3454629},{"Time (Hours)":232,"Approval (perbill)":500000000,"Support (perbill)":3407304,"Approval":50,"Support":0.3407304},{"Time (Hours)":233,"Approval (perbill)":500000000,"Support (perbill)":3360376,"Approval":50,"Support":0.3360376},{"Time (Hours)":234,"Approval (perbill)":500000000,"Support (perbill)":3313840,"Approval":50,"Support":0.331384},{"Time (Hours)":235,"Approval (perbill)":500000000,"Support (perbill)":3267692,"Approval":50,"Support":0.3267692},{"Time (Hours)":236,"Approval (perbill)":500000000,"Support (perbill)":3221926,"Approval":50,"Support":0.3221926},{"Time (Hours)":237,"Approval (perbill)":500000000,"Support (perbill)":3176538,"Approval":50,"Support":0.3176538},{"Time (Hours)":238,"Approval (perbill)":500000000,"Support (perbill)":3131524,"Approval":50,"Support":0.3131524},{"Time (Hours)":239,"Approval (perbill)":500000000,"Support (perbill)":3086878,"Approval":50,"Support":0.3086878},{"Time (Hours)":240,"Approval (perbill)":500000000,"Support (perbill)":3042596,"Approval":50,"Support":0.3042596},{"Time (Hours)":241,"Approval (perbill)":500000000,"Support (perbill)":2998674,"Approval":50,"Support":0.2998674},{"Time (Hours)":242,"Approval (perbill)":500000000,"Support (perbill)":2955107,"Approval":50,"Support":0.2955107},{"Time (Hours)":243,"Approval (perbill)":500000000,"Support (perbill)":2911892,"Approval":50,"Support":0.2911892},{"Time (Hours)":244,"Approval (perbill)":500000000,"Support (perbill)":2869023,"Approval":50,"Support":0.2869023},{"Time (Hours)":245,"Approval (perbill)":500000000,"Support (perbill)":2826496,"Approval":50,"Support":0.2826496},{"Time (Hours)":246,"Approval (perbill)":500000000,"Support (perbill)":2784309,"Approval":50,"Support":0.2784309},{"Time (Hours)":247,"Approval (perbill)":500000000,"Support (perbill)":2742455,"Approval":50,"Support":0.2742455},{"Time (Hours)":248,"Approval (perbill)":500000000,"Support (perbill)":2700933,"Approval":50,"Support":0.2700933},{"Time (Hours)":249,"Approval (perbill)":500000000,"Support (perbill)":2659737,"Approval":50,"Support":0.2659737},{"Time (Hours)":250,"Approval (perbill)":500000000,"Support (perbill)":2618864,"Approval":50,"Support":0.2618864},{"Time (Hours)":251,"Approval (perbill)":500000000,"Support (perbill)":2578310,"Approval":50,"Support":0.257831},{"Time (Hours)":252,"Approval (perbill)":500000000,"Support (perbill)":2538071,"Approval":50,"Support":0.2538071},{"Time (Hours)":253,"Approval (perbill)":500000000,"Support (perbill)":2498144,"Approval":50,"Support":0.2498144},{"Time (Hours)":254,"Approval (perbill)":500000000,"Support (perbill)":2458525,"Approval":50,"Support":0.2458525},{"Time (Hours)":255,"Approval (perbill)":500000000,"Support (perbill)":2419210,"Approval":50,"Support":0.241921},{"Time (Hours)":256,"Approval (perbill)":500000000,"Support (perbill)":2380197,"Approval":50,"Support":0.2380197},{"Time (Hours)":257,"Approval (perbill)":500000000,"Support (perbill)":2341481,"Approval":50,"Support":0.2341481},{"Time (Hours)":258,"Approval (perbill)":500000000,"Support (perbill)":2303059,"Approval":50,"Support":0.2303059},{"Time (Hours)":259,"Approval (perbill)":500000000,"Support (perbill)":2264928,"Approval":50,"Support":0.2264928},{"Time (Hours)":260,"Approval (perbill)":500000000,"Support (perbill)":2227084,"Approval":50,"Support":0.2227084},{"Time (Hours)":261,"Approval (perbill)":500000000,"Support (perbill)":2189525,"Approval":50,"Support":0.2189525},{"Time (Hours)":262,"Approval (perbill)":500000000,"Support (perbill)":2152247,"Approval":50,"Support":0.2152247},{"Time (Hours)":263,"Approval (perbill)":500000000,"Support (perbill)":2115247,"Approval":50,"Support":0.2115247},{"Time (Hours)":264,"Approval (perbill)":500000000,"Support (perbill)":2078522,"Approval":50,"Support":0.2078522},{"Time (Hours)":265,"Approval (perbill)":500000000,"Support (perbill)":2042068,"Approval":50,"Support":0.2042068},{"Time (Hours)":266,"Approval (perbill)":500000000,"Support (perbill)":2005884,"Approval":50,"Support":0.2005884},{"Time (Hours)":267,"Approval (perbill)":500000000,"Support (perbill)":1969965,"Approval":50,"Support":0.1969965},{"Time (Hours)":268,"Approval (perbill)":500000000,"Support (perbill)":1934309,"Approval":50,"Support":0.1934309},{"Time (Hours)":269,"Approval (perbill)":500000000,"Support (perbill)":1898913,"Approval":50,"Support":0.1898913},{"Time (Hours)":270,"Approval (perbill)":500000000,"Support (perbill)":1863775,"Approval":50,"Support":0.1863775},{"Time (Hours)":271,"Approval (perbill)":500000000,"Support (perbill)":1828891,"Approval":50,"Support":0.1828891},{"Time (Hours)":272,"Approval (perbill)":500000000,"Support (perbill)":1794258,"Approval":50,"Support":0.1794258},{"Time (Hours)":273,"Approval (perbill)":500000000,"Support (perbill)":1759875,"Approval":50,"Support":0.1759875},{"Time (Hours)":274,"Approval (perbill)":500000000,"Support (perbill)":1725737,"Approval":50,"Support":0.1725737},{"Time (Hours)":275,"Approval (perbill)":500000000,"Support (perbill)":1691844,"Approval":50,"Support":0.1691844},{"Time (Hours)":276,"Approval (perbill)":500000000,"Support (perbill)":1658191,"Approval":50,"Support":0.1658191},{"Time (Hours)":277,"Approval (perbill)":500000000,"Support (perbill)":1624777,"Approval":50,"Support":0.1624777},{"Time (Hours)":278,"Approval (perbill)":500000000,"Support (perbill)":1591599,"Approval":50,"Support":0.1591599},{"Time (Hours)":279,"Approval (perbill)":500000000,"Support (perbill)":1558654,"Approval":50,"Support":0.1558654},{"Time (Hours)":280,"Approval (perbill)":500000000,"Support (perbill)":1525941,"Approval":50,"Support":0.1525941},{"Time (Hours)":281,"Approval (perbill)":500000000,"Support (perbill)":1493456,"Approval":50,"Support":0.1493456},{"Time (Hours)":282,"Approval (perbill)":500000000,"Support (perbill)":1461197,"Approval":50,"Support":0.1461197},{"Time (Hours)":283,"Approval (perbill)":500000000,"Support (perbill)":1429162,"Approval":50,"Support":0.1429162},{"Time (Hours)":284,"Approval (perbill)":500000000,"Support (perbill)":1397348,"Approval":50,"Support":0.1397348},{"Time (Hours)":285,"Approval (perbill)":500000000,"Support (perbill)":1365754,"Approval":50,"Support":0.1365754},{"Time (Hours)":286,"Approval (perbill)":500000000,"Support (perbill)":1334377,"Approval":50,"Support":0.1334377},{"Time (Hours)":287,"Approval (perbill)":500000000,"Support (perbill)":1303214,"Approval":50,"Support":0.1303214},{"Time (Hours)":288,"Approval (perbill)":500000000,"Support (perbill)":1272264,"Approval":50,"Support":0.1272264},{"Time (Hours)":289,"Approval (perbill)":500000000,"Support (perbill)":1241525,"Approval":50,"Support":0.1241525},{"Time (Hours)":290,"Approval (perbill)":500000000,"Support (perbill)":1210994,"Approval":50,"Support":0.1210994},{"Time (Hours)":291,"Approval (perbill)":500000000,"Support (perbill)":1180668,"Approval":50,"Support":0.1180668},{"Time (Hours)":292,"Approval (perbill)":500000000,"Support (perbill)":1150547,"Approval":50,"Support":0.1150547},{"Time (Hours)":293,"Approval (perbill)":500000000,"Support (perbill)":1120628,"Approval":50,"Support":0.1120628},{"Time (Hours)":294,"Approval (perbill)":500000000,"Support (perbill)":1090909,"Approval":50,"Support":0.1090909},{"Time (Hours)":295,"Approval (perbill)":500000000,"Support (perbill)":1061388,"Approval":50,"Support":0.1061388},{"Time (Hours)":296,"Approval (perbill)":500000000,"Support (perbill)":1032063,"Approval":50,"Support":0.1032063},{"Time (Hours)":297,"Approval (perbill)":500000000,"Support (perbill)":1002932,"Approval":50,"Support":0.1002932},{"Time (Hours)":298,"Approval (perbill)":500000000,"Support (perbill)":973993,"Approval":50,"Support":0.0973993},{"Time (Hours)":299,"Approval (perbill)":500000000,"Support (perbill)":945244,"Approval":50,"Support":0.0945244},{"Time (Hours)":300,"Approval (perbill)":500000000,"Support (perbill)":916684,"Approval":50,"Support":0.0916684},{"Time (Hours)":301,"Approval (perbill)":500000000,"Support (perbill)":888310,"Approval":50,"Support":0.088831},{"Time (Hours)":302,"Approval (perbill)":500000000,"Support (perbill)":860121,"Approval":50,"Support":0.0860121},{"Time (Hours)":303,"Approval (perbill)":500000000,"Support (perbill)":832114,"Approval":50,"Support":0.0832114},{"Time (Hours)":304,"Approval (perbill)":500000000,"Support (perbill)":804289,"Approval":50,"Support":0.0804289},{"Time (Hours)":305,"Approval (perbill)":500000000,"Support (perbill)":776644,"Approval":50,"Support":0.0776644},{"Time (Hours)":306,"Approval (perbill)":500000000,"Support (perbill)":749176,"Approval":50,"Support":0.0749176},{"Time (Hours)":307,"Approval (perbill)":500000000,"Support (perbill)":721884,"Approval":50,"Support":0.0721884},{"Time (Hours)":308,"Approval (perbill)":500000000,"Support (perbill)":694766,"Approval":50,"Support":0.0694766},{"Time (Hours)":309,"Approval (perbill)":500000000,"Support (perbill)":667821,"Approval":50,"Support":0.0667821},{"Time (Hours)":310,"Approval (perbill)":500000000,"Support (perbill)":641047,"Approval":50,"Support":0.0641047},{"Time (Hours)":311,"Approval (perbill)":500000000,"Support (perbill)":614442,"Approval":50,"Support":0.0614442},{"Time (Hours)":312,"Approval (perbill)":500000000,"Support (perbill)":588005,"Approval":50,"Support":0.0588005},{"Time (Hours)":313,"Approval (perbill)":500000000,"Support (perbill)":561734,"Approval":50,"Support":0.0561734},{"Time (Hours)":314,"Approval (perbill)":500000000,"Support (perbill)":535627,"Approval":50,"Support":0.0535627},{"Time (Hours)":315,"Approval (perbill)":500000000,"Support (perbill)":509684,"Approval":50,"Support":0.0509684},{"Time (Hours)":316,"Approval (perbill)":500000000,"Support (perbill)":483902,"Approval":50,"Support":0.0483902},{"Time (Hours)":317,"Approval (perbill)":500000000,"Support (perbill)":458280,"Approval":50,"Support":0.045828},{"Time (Hours)":318,"Approval (perbill)":500000000,"Support (perbill)":432817,"Approval":50,"Support":0.0432817},{"Time (Hours)":319,"Approval (perbill)":500000000,"Support (perbill)":407511,"Approval":50,"Support":0.0407511},{"Time (Hours)":320,"Approval (perbill)":500000000,"Support (perbill)":382360,"Approval":50,"Support":0.038236},{"Time (Hours)":321,"Approval (perbill)":500000000,"Support (perbill)":357364,"Approval":50,"Support":0.0357364},{"Time (Hours)":322,"Approval (perbill)":500000000,"Support (perbill)":332520,"Approval":50,"Support":0.033252},{"Time (Hours)":323,"Approval (perbill)":500000000,"Support (perbill)":307828,"Approval":50,"Support":0.0307828},{"Time (Hours)":324,"Approval (perbill)":500000000,"Support (perbill)":283286,"Approval":50,"Support":0.0283286},{"Time (Hours)":325,"Approval (perbill)":500000000,"Support (perbill)":258892,"Approval":50,"Support":0.0258892},{"Time (Hours)":326,"Approval (perbill)":500000000,"Support (perbill)":234646,"Approval":50,"Support":0.0234646},{"Time (Hours)":327,"Approval (perbill)":500000000,"Support (perbill)":210546,"Approval":50,"Support":0.0210546},{"Time (Hours)":328,"Approval (perbill)":500000000,"Support (perbill)":186590,"Approval":50,"Support":0.018659},{"Time (Hours)":329,"Approval (perbill)":500000000,"Support (perbill)":162778,"Approval":50,"Support":0.0162778},{"Time (Hours)":330,"Approval (perbill)":500000000,"Support (perbill)":139108,"Approval":50,"Support":0.0139108},{"Time (Hours)":331,"Approval (perbill)":500000000,"Support (perbill)":115578,"Approval":50,"Support":0.0115578},{"Time (Hours)":332,"Approval (perbill)":500000000,"Support (perbill)":92188,"Approval":50,"Support":0.0092188},{"Time (Hours)":333,"Approval (perbill)":500000000,"Support (perbill)":68937,"Approval":50,"Support":0.0068937},{"Time (Hours)":334,"Approval (perbill)":500000000,"Support (perbill)":45822,"Approval":50,"Support":0.0045822},{"Time (Hours)":335,"Approval (perbill)":500000000,"Support (perbill)":22844,"Approval":50,"Support":0.0022844},{"Time (Hours)":336,"Approval (perbill)":500000000,"Support (perbill)":0,"Approval":50,"Support":0}]')},16066:p=>{"use strict";p.exports=JSON.parse('[{"time_hours":0,"approval_perbill":1000000000,"support_perbill":500000026,"approval":100,"support":50.0000026},{"time_hours":1,"approval_perbill":997549020,"support_perbill":418401359,"approval":99.754902,"support":41.8401359},{"time_hours":2,"approval_perbill":995098040,"support_perbill":359397443,"approval":99.509804,"support":35.9397443},{"time_hours":3,"approval_perbill":992647060,"support_perbill":314744813,"approval":99.264706,"support":31.4744813},{"time_hours":4,"approval_perbill":990196080,"support_perbill":279775293,"approval":99.019608,"support":27.9775293},{"time_hours":5,"approval_perbill":987745099,"support_perbill":251647242,"approval":98.7745099,"support":25.1647242},{"time_hours":6,"approval_perbill":985294119,"support_perbill":228531862,"approval":98.5294119,"support":22.8531862},{"time_hours":7,"approval_perbill":982843138,"support_perbill":209198815,"approval":98.2843138,"support":20.9198815},{"time_hours":8,"approval_perbill":980392158,"support_perbill":192789972,"approval":98.0392158,"support":19.2789972},{"time_hours":9,"approval_perbill":977941177,"support_perbill":178688524,"approval":97.7941177,"support":17.8688524},{"time_hours":10,"approval_perbill":975490197,"support_perbill":166439756,"approval":97.5490197,"support":16.6439756},{"time_hours":11,"approval_perbill":973039216,"support_perbill":155701053,"approval":97.3039216,"support":15.5701053},{"time_hours":12,"approval_perbill":970588236,"support_perbill":146209386,"approval":97.0588236,"support":14.6209386},{"time_hours":13,"approval_perbill":968137256,"support_perbill":137759452,"approval":96.8137256,"support":13.7759452},{"time_hours":14,"approval_perbill":965686276,"support_perbill":130188679,"approval":96.5686276,"support":13.0188679},{"time_hours":15,"approval_perbill":963235295,"support_perbill":123366639,"approval":96.3235295,"support":12.3366639},{"time_hours":16,"approval_perbill":960784315,"support_perbill":117187499,"approval":96.0784315,"support":11.7187499},{"time_hours":17,"approval_perbill":958333334,"support_perbill":111564465,"approval":95.8333334,"support":11.1564465},{"time_hours":18,"approval_perbill":955882354,"support_perbill":106425701,"approval":95.5882354,"support":10.6425701},{"time_hours":19,"approval_perbill":953431373,"support_perbill":101711228,"approval":95.3431373,"support":10.1711228},{"time_hours":20,"approval_perbill":950980393,"support_perbill":97370582,"approval":95.0980393,"support":9.7370582},{"time_hours":21,"approval_perbill":948529412,"support_perbill":93360994,"approval":94.8529412,"support":9.3360994},{"time_hours":22,"approval_perbill":946078432,"support_perbill":89645982,"approval":94.6078432,"support":8.9645982},{"time_hours":23,"approval_perbill":943627452,"support_perbill":86194234,"approval":94.3627452,"support":8.6194234},{"time_hours":24,"approval_perbill":941176471,"support_perbill":82978722,"approval":94.1176471,"support":8.2978722},{"time_hours":25,"approval_perbill":938725491,"support_perbill":79975997,"approval":93.8725491,"support":7.9975997},{"time_hours":26,"approval_perbill":936274511,"support_perbill":77165614,"approval":93.6274511,"support":7.7165614},{"time_hours":27,"approval_perbill":933823531,"support_perbill":74529666,"approval":93.3823531,"support":7.4529666},{"time_hours":28,"approval_perbill":931372550,"support_perbill":72052400,"approval":93.137255,"support":7.20524},{"time_hours":29,"approval_perbill":928921570,"support_perbill":69719908,"approval":92.892157,"support":6.9719908},{"time_hours":30,"approval_perbill":926470589,"support_perbill":67519857,"approval":92.6470589,"support":6.7519857},{"time_hours":31,"approval_perbill":924019609,"support_perbill":65441280,"approval":92.4019609,"support":6.544128},{"time_hours":32,"approval_perbill":921568628,"support_perbill":63474386,"approval":92.1568628,"support":6.3474386},{"time_hours":33,"approval_perbill":919117648,"support_perbill":61610409,"approval":91.9117648,"support":6.1610409},{"time_hours":34,"approval_perbill":916666667,"support_perbill":59841478,"approval":91.6666667,"support":5.9841478},{"time_hours":35,"approval_perbill":914215687,"support_perbill":58160504,"approval":91.4215687,"support":5.8160504},{"time_hours":36,"approval_perbill":911764706,"support_perbill":56561084,"approval":91.1764706,"support":5.6561084},{"time_hours":37,"approval_perbill":909313726,"support_perbill":55037426,"approval":90.9313726,"support":5.5037426},{"time_hours":38,"approval_perbill":906862746,"support_perbill":53584271,"approval":90.6862746,"support":5.3584271},{"time_hours":39,"approval_perbill":904411766,"support_perbill":52196835,"approval":90.4411766,"support":5.2196835},{"time_hours":40,"approval_perbill":901960785,"support_perbill":50870759,"approval":90.1960785,"support":5.0870759},{"time_hours":41,"approval_perbill":899509805,"support_perbill":49602061,"approval":89.9509805,"support":4.9602061},{"time_hours":42,"approval_perbill":897058824,"support_perbill":48387095,"approval":89.7058824,"support":4.8387095},{"time_hours":43,"approval_perbill":894607844,"support_perbill":47222519,"approval":89.4607844,"support":4.7222519},{"time_hours":44,"approval_perbill":892156864,"support_perbill":46105262,"approval":89.2156864,"support":4.6105262},{"time_hours":45,"approval_perbill":889705883,"support_perbill":45032496,"approval":88.9705883,"support":4.5032496},{"time_hours":46,"approval_perbill":887254903,"support_perbill":44001617,"approval":88.7254903,"support":4.4001617},{"time_hours":47,"approval_perbill":884803922,"support_perbill":43010218,"approval":88.4803922,"support":4.3010218},{"time_hours":48,"approval_perbill":882352942,"support_perbill":42056074,"approval":88.2352942,"support":4.2056074},{"time_hours":49,"approval_perbill":879901962,"support_perbill":41137122,"approval":87.9901962,"support":4.1137122},{"time_hours":50,"approval_perbill":877450982,"support_perbill":40251453,"approval":87.7450982,"support":4.0251453},{"time_hours":51,"approval_perbill":875000001,"support_perbill":39397289,"approval":87.5000001,"support":3.9397289},{"time_hours":52,"approval_perbill":872549021,"support_perbill":38572980,"approval":87.2549021,"support":3.857298},{"time_hours":53,"approval_perbill":870098040,"support_perbill":37776985,"approval":87.009804,"support":3.7776985},{"time_hours":54,"approval_perbill":867647060,"support_perbill":37007873,"approval":86.764706,"support":3.7007873},{"time_hours":55,"approval_perbill":865196079,"support_perbill":36264302,"approval":86.5196079,"support":3.6264302},{"time_hours":56,"approval_perbill":862745099,"support_perbill":35545023,"approval":86.2745099,"support":3.5545023},{"time_hours":57,"approval_perbill":860294118,"support_perbill":34848862,"approval":86.0294118,"support":3.4848862},{"time_hours":58,"approval_perbill":857843138,"support_perbill":34174724,"approval":85.7843138,"support":3.4174724},{"time_hours":59,"approval_perbill":855392157,"support_perbill":33521580,"approval":85.5392157,"support":3.352158},{"time_hours":60,"approval_perbill":852941177,"support_perbill":32888464,"approval":85.2941177,"support":3.2888464},{"time_hours":61,"approval_perbill":850490197,"support_perbill":32274469,"approval":85.0490197,"support":3.2274469},{"time_hours":62,"approval_perbill":848039217,"support_perbill":31678741,"approval":84.8039217,"support":3.1678741},{"time_hours":63,"approval_perbill":845588236,"support_perbill":31100477,"approval":84.5588236,"support":3.1100477},{"time_hours":64,"approval_perbill":843137256,"support_perbill":30538921,"approval":84.3137256,"support":3.0538921},{"time_hours":65,"approval_perbill":840686276,"support_perbill":29993358,"approval":84.0686276,"support":2.9993358},{"time_hours":66,"approval_perbill":838235295,"support_perbill":29463116,"approval":83.8235295,"support":2.9463116},{"time_hours":67,"approval_perbill":835784315,"support_perbill":28947556,"approval":83.5784315,"support":2.8947556},{"time_hours":68,"approval_perbill":833333334,"support_perbill":28446079,"approval":83.3333334,"support":2.8446079},{"time_hours":69,"approval_perbill":830882354,"support_perbill":27958114,"approval":83.0882354,"support":2.7958114},{"time_hours":70,"approval_perbill":828431373,"support_perbill":27483123,"approval":82.8431373,"support":2.7483123},{"time_hours":71,"approval_perbill":825980393,"support_perbill":27020596,"approval":82.5980393,"support":2.7020596},{"time_hours":72,"approval_perbill":823529412,"support_perbill":26570047,"approval":82.3529412,"support":2.6570047},{"time_hours":73,"approval_perbill":821078432,"support_perbill":26131019,"approval":82.1078432,"support":2.6131019},{"time_hours":74,"approval_perbill":818627452,"support_perbill":25703073,"approval":81.8627452,"support":2.5703073},{"time_hours":75,"approval_perbill":816176472,"support_perbill":25285796,"approval":81.6176472,"support":2.5285796},{"time_hours":76,"approval_perbill":813725491,"support_perbill":24878795,"approval":81.3725491,"support":2.4878795},{"time_hours":77,"approval_perbill":811274511,"support_perbill":24481693,"approval":81.1274511,"support":2.4481693},{"time_hours":78,"approval_perbill":808823530,"support_perbill":24094134,"approval":80.882353,"support":2.4094134},{"time_hours":79,"approval_perbill":806372550,"support_perbill":23715779,"approval":80.637255,"support":2.3715779},{"time_hours":80,"approval_perbill":803921569,"support_perbill":23346303,"approval":80.3921569,"support":2.3346303},{"time_hours":81,"approval_perbill":801470589,"support_perbill":22985397,"approval":80.1470589,"support":2.2985397},{"time_hours":82,"approval_perbill":799019608,"support_perbill":22632766,"approval":79.9019608,"support":2.2632766},{"time_hours":83,"approval_perbill":796568628,"support_perbill":22288130,"approval":79.6568628,"support":2.228813},{"time_hours":84,"approval_perbill":794117648,"support_perbill":21951219,"approval":79.4117648,"support":2.1951219},{"time_hours":85,"approval_perbill":791666668,"support_perbill":21621776,"approval":79.1666668,"support":2.1621776},{"time_hours":86,"approval_perbill":789215688,"support_perbill":21299556,"approval":78.9215688,"support":2.1299556},{"time_hours":87,"approval_perbill":786764707,"support_perbill":20984324,"approval":78.6764707,"support":2.0984324},{"time_hours":88,"approval_perbill":784313727,"support_perbill":20675855,"approval":78.4313727,"support":2.0675855},{"time_hours":89,"approval_perbill":781862746,"support_perbill":20373934,"approval":78.1862746,"support":2.0373934},{"time_hours":90,"approval_perbill":779411766,"support_perbill":20078354,"approval":77.9411766,"support":2.0078354},{"time_hours":91,"approval_perbill":776960785,"support_perbill":19788917,"approval":77.6960785,"support":1.9788917},{"time_hours":92,"approval_perbill":774509805,"support_perbill":19505435,"approval":77.4509805,"support":1.9505435},{"time_hours":93,"approval_perbill":772058824,"support_perbill":19227725,"approval":77.2058824,"support":1.9227725},{"time_hours":94,"approval_perbill":769607844,"support_perbill":18955613,"approval":76.9607844,"support":1.8955613},{"time_hours":95,"approval_perbill":767156863,"support_perbill":18688931,"approval":76.7156863,"support":1.8688931},{"time_hours":96,"approval_perbill":764705883,"support_perbill":18427518,"approval":76.4705883,"support":1.8427518},{"time_hours":97,"approval_perbill":762254903,"support_perbill":18171219,"approval":76.2254903,"support":1.8171219},{"time_hours":98,"approval_perbill":759803923,"support_perbill":17919887,"approval":75.9803923,"support":1.7919887},{"time_hours":99,"approval_perbill":757352942,"support_perbill":17673377,"approval":75.7352942,"support":1.7673377},{"time_hours":100,"approval_perbill":754901962,"support_perbill":17431553,"approval":75.4901962,"support":1.7431553},{"time_hours":101,"approval_perbill":752450981,"support_perbill":17194282,"approval":75.2450981,"support":1.7194282},{"time_hours":102,"approval_perbill":750000001,"support_perbill":16961437,"approval":75.0000001,"support":1.6961437},{"time_hours":103,"approval_perbill":747549020,"support_perbill":16732895,"approval":74.754902,"support":1.6732895},{"time_hours":104,"approval_perbill":745098040,"support_perbill":16508538,"approval":74.509804,"support":1.6508538},{"time_hours":105,"approval_perbill":742647059,"support_perbill":16288252,"approval":74.2647059,"support":1.6288252},{"time_hours":106,"approval_perbill":740196079,"support_perbill":16071927,"approval":74.0196079,"support":1.6071927},{"time_hours":107,"approval_perbill":737745099,"support_perbill":15859457,"approval":73.7745099,"support":1.5859457},{"time_hours":108,"approval_perbill":735294118,"support_perbill":15650741,"approval":73.5294118,"support":1.5650741},{"time_hours":109,"approval_perbill":732843138,"support_perbill":15445679,"approval":73.2843138,"support":1.5445679},{"time_hours":110,"approval_perbill":730392158,"support_perbill":15244176,"approval":73.0392158,"support":1.5244176},{"time_hours":111,"approval_perbill":727941178,"support_perbill":15046141,"approval":72.7941178,"support":1.5046141},{"time_hours":112,"approval_perbill":725490197,"support_perbill":14851485,"approval":72.5490197,"support":1.4851485},{"time_hours":113,"approval_perbill":723039217,"support_perbill":14660121,"approval":72.3039217,"support":1.4660121},{"time_hours":114,"approval_perbill":720588236,"support_perbill":14471968,"approval":72.0588236,"support":1.4471968},{"time_hours":115,"approval_perbill":718137256,"support_perbill":14286945,"approval":71.8137256,"support":1.4286945},{"time_hours":116,"approval_perbill":715686275,"support_perbill":14104975,"approval":71.5686275,"support":1.4104975},{"time_hours":117,"approval_perbill":713235295,"support_perbill":13925982,"approval":71.3235295,"support":1.3925982},{"time_hours":118,"approval_perbill":710784314,"support_perbill":13749894,"approval":71.0784314,"support":1.3749894},{"time_hours":119,"approval_perbill":708333334,"support_perbill":13576642,"approval":70.8333334,"support":1.3576642},{"time_hours":120,"approval_perbill":705882353,"support_perbill":13406156,"approval":70.5882353,"support":1.3406156},{"time_hours":121,"approval_perbill":703431373,"support_perbill":13238372,"approval":70.3431373,"support":1.3238372},{"time_hours":122,"approval_perbill":700980393,"support_perbill":13073226,"approval":70.0980393,"support":1.3073226},{"time_hours":123,"approval_perbill":698529413,"support_perbill":12910655,"approval":69.8529413,"support":1.2910655},{"time_hours":124,"approval_perbill":696078432,"support_perbill":12750601,"approval":69.6078432,"support":1.2750601},{"time_hours":125,"approval_perbill":693627452,"support_perbill":12593005,"approval":69.3627452,"support":1.2593005},{"time_hours":126,"approval_perbill":691176471,"support_perbill":12437810,"approval":69.1176471,"support":1.243781},{"time_hours":127,"approval_perbill":688725491,"support_perbill":12284964,"approval":68.8725491,"support":1.2284964},{"time_hours":128,"approval_perbill":686274511,"support_perbill":12134411,"approval":68.6274511,"support":1.2134411},{"time_hours":129,"approval_perbill":683823530,"support_perbill":11986103,"approval":68.382353,"support":1.1986103},{"time_hours":130,"approval_perbill":681372550,"support_perbill":11839987,"approval":68.137255,"support":1.1839987},{"time_hours":131,"approval_perbill":678921569,"support_perbill":11696017,"approval":67.8921569,"support":1.1696017},{"time_hours":132,"approval_perbill":676470589,"support_perbill":11554145,"approval":67.6470589,"support":1.1554145},{"time_hours":133,"approval_perbill":674019609,"support_perbill":11414326,"approval":67.4019609,"support":1.1414326},{"time_hours":134,"approval_perbill":671568629,"support_perbill":11276516,"approval":67.1568629,"support":1.1276516},{"time_hours":135,"approval_perbill":669117648,"support_perbill":11140671,"approval":66.9117648,"support":1.1140671},{"time_hours":136,"approval_perbill":666666668,"support_perbill":11006750,"approval":66.6666668,"support":1.100675},{"time_hours":137,"approval_perbill":664215687,"support_perbill":10874713,"approval":66.4215687,"support":1.0874713},{"time_hours":138,"approval_perbill":661764707,"support_perbill":10744519,"approval":66.1764707,"support":1.0744519},{"time_hours":139,"approval_perbill":659313726,"support_perbill":10616130,"approval":65.9313726,"support":1.061613},{"time_hours":140,"approval_perbill":656862746,"support_perbill":10489510,"approval":65.6862746,"support":1.048951},{"time_hours":141,"approval_perbill":654411765,"support_perbill":10364622,"approval":65.4411765,"support":1.0364622},{"time_hours":142,"approval_perbill":651960785,"support_perbill":10241430,"approval":65.1960785,"support":1.024143},{"time_hours":143,"approval_perbill":649509804,"support_perbill":10119900,"approval":64.9509804,"support":1.01199},{"time_hours":144,"approval_perbill":647058824,"support_perbill":10000000,"approval":64.7058824,"support":1},{"time_hours":145,"approval_perbill":644607844,"support_perbill":9881695,"approval":64.4607844,"support":0.9881695},{"time_hours":146,"approval_perbill":642156864,"support_perbill":9764955,"approval":64.2156864,"support":0.9764955},{"time_hours":147,"approval_perbill":639705883,"support_perbill":9649749,"approval":63.9705883,"support":0.9649749},{"time_hours":148,"approval_perbill":637254903,"support_perbill":9536047,"approval":63.7254903,"support":0.9536047},{"time_hours":149,"approval_perbill":634803923,"support_perbill":9423820,"approval":63.4803923,"support":0.942382},{"time_hours":150,"approval_perbill":632352942,"support_perbill":9313038,"approval":63.2352942,"support":0.9313038},{"time_hours":151,"approval_perbill":629901962,"support_perbill":9203674,"approval":62.9901962,"support":0.9203674},{"time_hours":152,"approval_perbill":627450981,"support_perbill":9095702,"approval":62.7450981,"support":0.9095702},{"time_hours":153,"approval_perbill":625000001,"support_perbill":8989095,"approval":62.5000001,"support":0.8989095},{"time_hours":154,"approval_perbill":622549020,"support_perbill":8883826,"approval":62.254902,"support":0.8883826},{"time_hours":155,"approval_perbill":620098040,"support_perbill":8779872,"approval":62.009804,"support":0.8779872},{"time_hours":156,"approval_perbill":617647059,"support_perbill":8677207,"approval":61.7647059,"support":0.8677207},{"time_hours":157,"approval_perbill":615196079,"support_perbill":8575808,"approval":61.5196079,"support":0.8575808},{"time_hours":158,"approval_perbill":612745099,"support_perbill":8475652,"approval":61.2745099,"support":0.8475652},{"time_hours":159,"approval_perbill":610294119,"support_perbill":8376715,"approval":61.0294119,"support":0.8376715},{"time_hours":160,"approval_perbill":607843138,"support_perbill":8278976,"approval":60.7843138,"support":0.8278976},{"time_hours":161,"approval_perbill":605392158,"support_perbill":8182413,"approval":60.5392158,"support":0.8182413},{"time_hours":162,"approval_perbill":602941177,"support_perbill":8087005,"approval":60.2941177,"support":0.8087005},{"time_hours":163,"approval_perbill":600490197,"support_perbill":7992731,"approval":60.0490197,"support":0.7992731},{"time_hours":164,"approval_perbill":598039216,"support_perbill":7899571,"approval":59.8039216,"support":0.7899571},{"time_hours":165,"approval_perbill":595588236,"support_perbill":7807506,"approval":59.5588236,"support":0.7807506},{"time_hours":166,"approval_perbill":593137255,"support_perbill":7716516,"approval":59.3137255,"support":0.7716516},{"time_hours":167,"approval_perbill":590686275,"support_perbill":7626583,"approval":59.0686275,"support":0.7626583},{"time_hours":168,"approval_perbill":588235295,"support_perbill":7537688,"approval":58.8235295,"support":0.7537688},{"time_hours":169,"approval_perbill":585784315,"support_perbill":7449814,"approval":58.5784315,"support":0.7449814},{"time_hours":170,"approval_perbill":583333335,"support_perbill":7362942,"approval":58.3333335,"support":0.7362942},{"time_hours":171,"approval_perbill":580882354,"support_perbill":7277057,"approval":58.0882354,"support":0.7277057},{"time_hours":172,"approval_perbill":578431374,"support_perbill":7192141,"approval":57.8431374,"support":0.7192141},{"time_hours":173,"approval_perbill":575980393,"support_perbill":7108178,"approval":57.5980393,"support":0.7108178},{"time_hours":174,"approval_perbill":573529413,"support_perbill":7025151,"approval":57.3529413,"support":0.7025151},{"time_hours":175,"approval_perbill":571078432,"support_perbill":6943047,"approval":57.1078432,"support":0.6943047},{"time_hours":176,"approval_perbill":568627452,"support_perbill":6861848,"approval":56.8627452,"support":0.6861848},{"time_hours":177,"approval_perbill":566176471,"support_perbill":6781540,"approval":56.6176471,"support":0.678154},{"time_hours":178,"approval_perbill":563725491,"support_perbill":6702109,"approval":56.3725491,"support":0.6702109},{"time_hours":179,"approval_perbill":561274510,"support_perbill":6623541,"approval":56.127451,"support":0.6623541},{"time_hours":180,"approval_perbill":558823530,"support_perbill":6545820,"approval":55.882353,"support":0.654582},{"time_hours":181,"approval_perbill":556372550,"support_perbill":6468935,"approval":55.637255,"support":0.6468935},{"time_hours":182,"approval_perbill":553921570,"support_perbill":6392871,"approval":55.392157,"support":0.6392871},{"time_hours":183,"approval_perbill":551470589,"support_perbill":6317615,"approval":55.1470589,"support":0.6317615},{"time_hours":184,"approval_perbill":549019609,"support_perbill":6243154,"approval":54.9019609,"support":0.6243154},{"time_hours":185,"approval_perbill":546568628,"support_perbill":6169476,"approval":54.6568628,"support":0.6169476},{"time_hours":186,"approval_perbill":544117648,"support_perbill":6096569,"approval":54.4117648,"support":0.6096569},{"time_hours":187,"approval_perbill":541666667,"support_perbill":6024421,"approval":54.1666667,"support":0.6024421},{"time_hours":188,"approval_perbill":539215687,"support_perbill":5953019,"approval":53.9215687,"support":0.5953019},{"time_hours":189,"approval_perbill":536764706,"support_perbill":5882353,"approval":53.6764706,"support":0.5882353},{"time_hours":190,"approval_perbill":534313726,"support_perbill":5812410,"approval":53.4313726,"support":0.581241},{"time_hours":191,"approval_perbill":531862746,"support_perbill":5743181,"approval":53.1862746,"support":0.5743181},{"time_hours":192,"approval_perbill":529411765,"support_perbill":5674653,"approval":52.9411765,"support":0.5674653},{"time_hours":193,"approval_perbill":526960785,"support_perbill":5606817,"approval":52.6960785,"support":0.5606817},{"time_hours":194,"approval_perbill":524509805,"support_perbill":5539662,"approval":52.4509805,"support":0.5539662},{"time_hours":195,"approval_perbill":522058825,"support_perbill":5473177,"approval":52.2058825,"support":0.5473177},{"time_hours":196,"approval_perbill":519607844,"support_perbill":5407354,"approval":51.9607844,"support":0.5407354},{"time_hours":197,"approval_perbill":517156864,"support_perbill":5342181,"approval":51.7156864,"support":0.5342181},{"time_hours":198,"approval_perbill":514705883,"support_perbill":5277650,"approval":51.4705883,"support":0.527765},{"time_hours":199,"approval_perbill":512254903,"support_perbill":5213751,"approval":51.2254903,"support":0.5213751},{"time_hours":200,"approval_perbill":509803922,"support_perbill":5150474,"approval":50.9803922,"support":0.5150474},{"time_hours":201,"approval_perbill":507352942,"support_perbill":5087812,"approval":50.7352942,"support":0.5087812},{"time_hours":202,"approval_perbill":504901961,"support_perbill":5025754,"approval":50.4901961,"support":0.5025754},{"time_hours":203,"approval_perbill":502450981,"support_perbill":4964292,"approval":50.2450981,"support":0.4964292},{"time_hours":204,"approval_perbill":500000000,"support_perbill":4903417,"approval":50,"support":0.4903417},{"time_hours":205,"approval_perbill":500000000,"support_perbill":4843122,"approval":50,"support":0.4843122},{"time_hours":206,"approval_perbill":500000000,"support_perbill":4783398,"approval":50,"support":0.4783398},{"time_hours":207,"approval_perbill":500000000,"support_perbill":4724236,"approval":50,"support":0.4724236},{"time_hours":208,"approval_perbill":500000000,"support_perbill":4665630,"approval":50,"support":0.466563},{"time_hours":209,"approval_perbill":500000000,"support_perbill":4607570,"approval":50,"support":0.460757},{"time_hours":210,"approval_perbill":500000000,"support_perbill":4550050,"approval":50,"support":0.455005},{"time_hours":211,"approval_perbill":500000000,"support_perbill":4493062,"approval":50,"support":0.4493062},{"time_hours":212,"approval_perbill":500000000,"support_perbill":4436599,"approval":50,"support":0.4436599},{"time_hours":213,"approval_perbill":500000000,"support_perbill":4380654,"approval":50,"support":0.4380654},{"time_hours":214,"approval_perbill":500000000,"support_perbill":4325218,"approval":50,"support":0.4325218},{"time_hours":215,"approval_perbill":500000000,"support_perbill":4270287,"approval":50,"support":0.4270287},{"time_hours":216,"approval_perbill":500000000,"support_perbill":4215851,"approval":50,"support":0.4215851},{"time_hours":217,"approval_perbill":500000000,"support_perbill":4161906,"approval":50,"support":0.4161906},{"time_hours":218,"approval_perbill":500000000,"support_perbill":4108444,"approval":50,"support":0.4108444},{"time_hours":219,"approval_perbill":500000000,"support_perbill":4055459,"approval":50,"support":0.4055459},{"time_hours":220,"approval_perbill":500000000,"support_perbill":4002944,"approval":50,"support":0.4002944},{"time_hours":221,"approval_perbill":500000000,"support_perbill":3950894,"approval":50,"support":0.3950894},{"time_hours":222,"approval_perbill":500000000,"support_perbill":3899302,"approval":50,"support":0.3899302},{"time_hours":223,"approval_perbill":500000000,"support_perbill":3848162,"approval":50,"support":0.3848162},{"time_hours":224,"approval_perbill":500000000,"support_perbill":3797468,"approval":50,"support":0.3797468},{"time_hours":225,"approval_perbill":500000000,"support_perbill":3747215,"approval":50,"support":0.3747215},{"time_hours":226,"approval_perbill":500000000,"support_perbill":3697396,"approval":50,"support":0.3697396},{"time_hours":227,"approval_perbill":500000000,"support_perbill":3648006,"approval":50,"support":0.3648006},{"time_hours":228,"approval_perbill":500000000,"support_perbill":3599040,"approval":50,"support":0.359904},{"time_hours":229,"approval_perbill":500000000,"support_perbill":3550492,"approval":50,"support":0.3550492},{"time_hours":230,"approval_perbill":500000000,"support_perbill":3502357,"approval":50,"support":0.3502357},{"time_hours":231,"approval_perbill":500000000,"support_perbill":3454629,"approval":50,"support":0.3454629},{"time_hours":232,"approval_perbill":500000000,"support_perbill":3407304,"approval":50,"support":0.3407304},{"time_hours":233,"approval_perbill":500000000,"support_perbill":3360376,"approval":50,"support":0.3360376},{"time_hours":234,"approval_perbill":500000000,"support_perbill":3313840,"approval":50,"support":0.331384},{"time_hours":235,"approval_perbill":500000000,"support_perbill":3267692,"approval":50,"support":0.3267692},{"time_hours":236,"approval_perbill":500000000,"support_perbill":3221926,"approval":50,"support":0.3221926},{"time_hours":237,"approval_perbill":500000000,"support_perbill":3176538,"approval":50,"support":0.3176538},{"time_hours":238,"approval_perbill":500000000,"support_perbill":3131524,"approval":50,"support":0.3131524},{"time_hours":239,"approval_perbill":500000000,"support_perbill":3086878,"approval":50,"support":0.3086878},{"time_hours":240,"approval_perbill":500000000,"support_perbill":3042596,"approval":50,"support":0.3042596},{"time_hours":241,"approval_perbill":500000000,"support_perbill":2998674,"approval":50,"support":0.2998674},{"time_hours":242,"approval_perbill":500000000,"support_perbill":2955107,"approval":50,"support":0.2955107},{"time_hours":243,"approval_perbill":500000000,"support_perbill":2911892,"approval":50,"support":0.2911892},{"time_hours":244,"approval_perbill":500000000,"support_perbill":2869023,"approval":50,"support":0.2869023},{"time_hours":245,"approval_perbill":500000000,"support_perbill":2826496,"approval":50,"support":0.2826496},{"time_hours":246,"approval_perbill":500000000,"support_perbill":2784309,"approval":50,"support":0.2784309},{"time_hours":247,"approval_perbill":500000000,"support_perbill":2742455,"approval":50,"support":0.2742455},{"time_hours":248,"approval_perbill":500000000,"support_perbill":2700933,"approval":50,"support":0.2700933},{"time_hours":249,"approval_perbill":500000000,"support_perbill":2659737,"approval":50,"support":0.2659737},{"time_hours":250,"approval_perbill":500000000,"support_perbill":2618864,"approval":50,"support":0.2618864},{"time_hours":251,"approval_perbill":500000000,"support_perbill":2578310,"approval":50,"support":0.257831},{"time_hours":252,"approval_perbill":500000000,"support_perbill":2538071,"approval":50,"support":0.2538071},{"time_hours":253,"approval_perbill":500000000,"support_perbill":2498144,"approval":50,"support":0.2498144},{"time_hours":254,"approval_perbill":500000000,"support_perbill":2458525,"approval":50,"support":0.2458525},{"time_hours":255,"approval_perbill":500000000,"support_perbill":2419210,"approval":50,"support":0.241921},{"time_hours":256,"approval_perbill":500000000,"support_perbill":2380197,"approval":50,"support":0.2380197},{"time_hours":257,"approval_perbill":500000000,"support_perbill":2341481,"approval":50,"support":0.2341481},{"time_hours":258,"approval_perbill":500000000,"support_perbill":2303059,"approval":50,"support":0.2303059},{"time_hours":259,"approval_perbill":500000000,"support_perbill":2264928,"approval":50,"support":0.2264928},{"time_hours":260,"approval_perbill":500000000,"support_perbill":2227084,"approval":50,"support":0.2227084},{"time_hours":261,"approval_perbill":500000000,"support_perbill":2189525,"approval":50,"support":0.2189525},{"time_hours":262,"approval_perbill":500000000,"support_perbill":2152247,"approval":50,"support":0.2152247},{"time_hours":263,"approval_perbill":500000000,"support_perbill":2115247,"approval":50,"support":0.2115247},{"time_hours":264,"approval_perbill":500000000,"support_perbill":2078522,"approval":50,"support":0.2078522},{"time_hours":265,"approval_perbill":500000000,"support_perbill":2042068,"approval":50,"support":0.2042068},{"time_hours":266,"approval_perbill":500000000,"support_perbill":2005884,"approval":50,"support":0.2005884},{"time_hours":267,"approval_perbill":500000000,"support_perbill":1969965,"approval":50,"support":0.1969965},{"time_hours":268,"approval_perbill":500000000,"support_perbill":1934309,"approval":50,"support":0.1934309},{"time_hours":269,"approval_perbill":500000000,"support_perbill":1898913,"approval":50,"support":0.1898913},{"time_hours":270,"approval_perbill":500000000,"support_perbill":1863775,"approval":50,"support":0.1863775},{"time_hours":271,"approval_perbill":500000000,"support_perbill":1828891,"approval":50,"support":0.1828891},{"time_hours":272,"approval_perbill":500000000,"support_perbill":1794258,"approval":50,"support":0.1794258},{"time_hours":273,"approval_perbill":500000000,"support_perbill":1759875,"approval":50,"support":0.1759875},{"time_hours":274,"approval_perbill":500000000,"support_perbill":1725737,"approval":50,"support":0.1725737},{"time_hours":275,"approval_perbill":500000000,"support_perbill":1691844,"approval":50,"support":0.1691844},{"time_hours":276,"approval_perbill":500000000,"support_perbill":1658191,"approval":50,"support":0.1658191},{"time_hours":277,"approval_perbill":500000000,"support_perbill":1624777,"approval":50,"support":0.1624777},{"time_hours":278,"approval_perbill":500000000,"support_perbill":1591599,"approval":50,"support":0.1591599},{"time_hours":279,"approval_perbill":500000000,"support_perbill":1558654,"approval":50,"support":0.1558654},{"time_hours":280,"approval_perbill":500000000,"support_perbill":1525941,"approval":50,"support":0.1525941},{"time_hours":281,"approval_perbill":500000000,"support_perbill":1493456,"approval":50,"support":0.1493456},{"time_hours":282,"approval_perbill":500000000,"support_perbill":1461197,"approval":50,"support":0.1461197},{"time_hours":283,"approval_perbill":500000000,"support_perbill":1429162,"approval":50,"support":0.1429162},{"time_hours":284,"approval_perbill":500000000,"support_perbill":1397348,"approval":50,"support":0.1397348},{"time_hours":285,"approval_perbill":500000000,"support_perbill":1365754,"approval":50,"support":0.1365754},{"time_hours":286,"approval_perbill":500000000,"support_perbill":1334377,"approval":50,"support":0.1334377},{"time_hours":287,"approval_perbill":500000000,"support_perbill":1303214,"approval":50,"support":0.1303214},{"time_hours":288,"approval_perbill":500000000,"support_perbill":1272264,"approval":50,"support":0.1272264},{"time_hours":289,"approval_perbill":500000000,"support_perbill":1241525,"approval":50,"support":0.1241525},{"time_hours":290,"approval_perbill":500000000,"support_perbill":1210994,"approval":50,"support":0.1210994},{"time_hours":291,"approval_perbill":500000000,"support_perbill":1180668,"approval":50,"support":0.1180668},{"time_hours":292,"approval_perbill":500000000,"support_perbill":1150547,"approval":50,"support":0.1150547},{"time_hours":293,"approval_perbill":500000000,"support_perbill":1120628,"approval":50,"support":0.1120628},{"time_hours":294,"approval_perbill":500000000,"support_perbill":1090909,"approval":50,"support":0.1090909},{"time_hours":295,"approval_perbill":500000000,"support_perbill":1061388,"approval":50,"support":0.1061388},{"time_hours":296,"approval_perbill":500000000,"support_perbill":1032063,"approval":50,"support":0.1032063},{"time_hours":297,"approval_perbill":500000000,"support_perbill":1002932,"approval":50,"support":0.1002932},{"time_hours":298,"approval_perbill":500000000,"support_perbill":973993,"approval":50,"support":0.0973993},{"time_hours":299,"approval_perbill":500000000,"support_perbill":945244,"approval":50,"support":0.0945244},{"time_hours":300,"approval_perbill":500000000,"support_perbill":916684,"approval":50,"support":0.0916684},{"time_hours":301,"approval_perbill":500000000,"support_perbill":888310,"approval":50,"support":0.088831},{"time_hours":302,"approval_perbill":500000000,"support_perbill":860121,"approval":50,"support":0.0860121},{"time_hours":303,"approval_perbill":500000000,"support_perbill":832114,"approval":50,"support":0.0832114},{"time_hours":304,"approval_perbill":500000000,"support_perbill":804289,"approval":50,"support":0.0804289},{"time_hours":305,"approval_perbill":500000000,"support_perbill":776644,"approval":50,"support":0.0776644},{"time_hours":306,"approval_perbill":500000000,"support_perbill":749176,"approval":50,"support":0.0749176},{"time_hours":307,"approval_perbill":500000000,"support_perbill":721884,"approval":50,"support":0.0721884},{"time_hours":308,"approval_perbill":500000000,"support_perbill":694766,"approval":50,"support":0.0694766},{"time_hours":309,"approval_perbill":500000000,"support_perbill":667821,"approval":50,"support":0.0667821},{"time_hours":310,"approval_perbill":500000000,"support_perbill":641047,"approval":50,"support":0.0641047},{"time_hours":311,"approval_perbill":500000000,"support_perbill":614442,"approval":50,"support":0.0614442},{"time_hours":312,"approval_perbill":500000000,"support_perbill":588005,"approval":50,"support":0.0588005},{"time_hours":313,"approval_perbill":500000000,"support_perbill":561734,"approval":50,"support":0.0561734},{"time_hours":314,"approval_perbill":500000000,"support_perbill":535627,"approval":50,"support":0.0535627},{"time_hours":315,"approval_perbill":500000000,"support_perbill":509684,"approval":50,"support":0.0509684},{"time_hours":316,"approval_perbill":500000000,"support_perbill":483902,"approval":50,"support":0.0483902},{"time_hours":317,"approval_perbill":500000000,"support_perbill":458280,"approval":50,"support":0.045828},{"time_hours":318,"approval_perbill":500000000,"support_perbill":432817,"approval":50,"support":0.0432817},{"time_hours":319,"approval_perbill":500000000,"support_perbill":407511,"approval":50,"support":0.0407511},{"time_hours":320,"approval_perbill":500000000,"support_perbill":382360,"approval":50,"support":0.038236},{"time_hours":321,"approval_perbill":500000000,"support_perbill":357364,"approval":50,"support":0.0357364},{"time_hours":322,"approval_perbill":500000000,"support_perbill":332520,"approval":50,"support":0.033252},{"time_hours":323,"approval_perbill":500000000,"support_perbill":307828,"approval":50,"support":0.0307828},{"time_hours":324,"approval_perbill":500000000,"support_perbill":283286,"approval":50,"support":0.0283286},{"time_hours":325,"approval_perbill":500000000,"support_perbill":258892,"approval":50,"support":0.0258892},{"time_hours":326,"approval_perbill":500000000,"support_perbill":234646,"approval":50,"support":0.0234646},{"time_hours":327,"approval_perbill":500000000,"support_perbill":210546,"approval":50,"support":0.0210546},{"time_hours":328,"approval_perbill":500000000,"support_perbill":186590,"approval":50,"support":0.018659},{"time_hours":329,"approval_perbill":500000000,"support_perbill":162778,"approval":50,"support":0.0162778},{"time_hours":330,"approval_perbill":500000000,"support_perbill":139108,"approval":50,"support":0.0139108},{"time_hours":331,"approval_perbill":500000000,"support_perbill":115578,"approval":50,"support":0.0115578},{"time_hours":332,"approval_perbill":500000000,"support_perbill":92188,"approval":50,"support":0.0092188},{"time_hours":333,"approval_perbill":500000000,"support_perbill":68937,"approval":50,"support":0.0068937},{"time_hours":334,"approval_perbill":500000000,"support_perbill":45822,"approval":50,"support":0.0045822},{"time_hours":335,"approval_perbill":500000000,"support_perbill":22844,"approval":50,"support":0.0022844},{"time_hours":336,"approval_perbill":500000000,"support_perbill":0,"approval":50,"support":0}]')},40149:p=>{"use strict";p.exports=JSON.parse('[{"time_hours":0,"approval_perbill":1000000000,"support_perbill":500000008,"approval":100,"support":50.0000008},{"time_hours":1,"approval_perbill":998511905,"support_perbill":472363240,"approval":99.8511905,"support":47.236324},{"time_hours":2,"approval_perbill":997023810,"support_perbill":447481262,"approval":99.702381,"support":44.7481262},{"time_hours":3,"approval_perbill":995535715,"support_perbill":424961730,"approval":99.5535715,"support":42.496173},{"time_hours":4,"approval_perbill":994047620,"support_perbill":404483449,"approval":99.404762,"support":40.4483449},{"time_hours":5,"approval_perbill":992559524,"support_perbill":385780901,"approval":99.2559524,"support":38.5780901},{"time_hours":6,"approval_perbill":991071429,"support_perbill":368632725,"approval":99.1071429,"support":36.8632725},{"time_hours":7,"approval_perbill":989583334,"support_perbill":352852868,"approval":98.9583334,"support":35.2852868},{"time_hours":8,"approval_perbill":988095239,"support_perbill":338283846,"approval":98.8095239,"support":33.8283846},{"time_hours":9,"approval_perbill":986607143,"support_perbill":324791433,"approval":98.6607143,"support":32.4791433},{"time_hours":10,"approval_perbill":985119048,"support_perbill":312260553,"approval":98.5119048,"support":31.2260553},{"time_hours":11,"approval_perbill":983630953,"support_perbill":300591949,"approval":98.3630953,"support":30.0591949},{"time_hours":12,"approval_perbill":982142858,"support_perbill":289699587,"approval":98.2142858,"support":28.9699587},{"time_hours":13,"approval_perbill":980654762,"support_perbill":279508494,"approval":98.0654762,"support":27.9508494},{"time_hours":14,"approval_perbill":979166667,"support_perbill":269953067,"approval":97.9166667,"support":26.9953067},{"time_hours":15,"approval_perbill":977678572,"support_perbill":260975623,"approval":97.7678572,"support":26.0975623},{"time_hours":16,"approval_perbill":976190477,"support_perbill":252525267,"approval":97.6190477,"support":25.2525267},{"time_hours":17,"approval_perbill":974702381,"support_perbill":244556897,"approval":97.4702381,"support":24.4556897},{"time_hours":18,"approval_perbill":973214286,"support_perbill":237030426,"approval":97.3214286,"support":23.7030426},{"time_hours":19,"approval_perbill":971726191,"support_perbill":229910079,"approval":97.1726191,"support":22.9910079},{"time_hours":20,"approval_perbill":970238096,"support_perbill":223163855,"approval":97.0238096,"support":22.3163855},{"time_hours":21,"approval_perbill":968750000,"support_perbill":216763018,"approval":96.875,"support":21.6763018},{"time_hours":22,"approval_perbill":967261905,"support_perbill":210681709,"approval":96.7261905,"support":21.0681709},{"time_hours":23,"approval_perbill":965773810,"support_perbill":204896583,"approval":96.577381,"support":20.4896583},{"time_hours":24,"approval_perbill":964285715,"support_perbill":199386516,"approval":96.4285715,"support":19.9386516},{"time_hours":25,"approval_perbill":962797620,"support_perbill":194132348,"approval":96.279762,"support":19.4132348},{"time_hours":26,"approval_perbill":961309524,"support_perbill":189116654,"approval":96.1309524,"support":18.9116654},{"time_hours":27,"approval_perbill":959821429,"support_perbill":184323563,"approval":95.9821429,"support":18.4323563},{"time_hours":28,"approval_perbill":958333334,"support_perbill":179738574,"approval":95.8333334,"support":17.9738574},{"time_hours":29,"approval_perbill":956845239,"support_perbill":175348424,"approval":95.6845239,"support":17.5348424},{"time_hours":30,"approval_perbill":955357143,"support_perbill":171140951,"approval":95.5357143,"support":17.1140951},{"time_hours":31,"approval_perbill":953869048,"support_perbill":167104986,"approval":95.3869048,"support":16.7104986},{"time_hours":32,"approval_perbill":952380953,"support_perbill":163230251,"approval":95.2380953,"support":16.3230251},{"time_hours":33,"approval_perbill":950892858,"support_perbill":159507276,"approval":95.0892858,"support":15.9507276},{"time_hours":34,"approval_perbill":949404762,"support_perbill":155927313,"approval":94.9404762,"support":15.5927313},{"time_hours":35,"approval_perbill":947916667,"support_perbill":152482280,"approval":94.7916667,"support":15.248228},{"time_hours":36,"approval_perbill":946428572,"support_perbill":149164688,"approval":94.6428572,"support":14.9164688},{"time_hours":37,"approval_perbill":944940477,"support_perbill":145967595,"approval":94.4940477,"support":14.5967595},{"time_hours":38,"approval_perbill":943452381,"support_perbill":142884551,"approval":94.3452381,"support":14.2884551},{"time_hours":39,"approval_perbill":941964286,"support_perbill":139909563,"approval":94.1964286,"support":13.9909563},{"time_hours":40,"approval_perbill":940476191,"support_perbill":137037046,"approval":94.0476191,"support":13.7037046},{"time_hours":41,"approval_perbill":938988096,"support_perbill":134261797,"approval":93.8988096,"support":13.4261797},{"time_hours":42,"approval_perbill":937500000,"support_perbill":131578956,"approval":93.75,"support":13.1578956},{"time_hours":43,"approval_perbill":936011905,"support_perbill":128983985,"approval":93.6011905,"support":12.8983985},{"time_hours":44,"approval_perbill":934523810,"support_perbill":126472636,"approval":93.452381,"support":12.6472636},{"time_hours":45,"approval_perbill":933035715,"support_perbill":124040929,"approval":93.3035715,"support":12.4040929},{"time_hours":46,"approval_perbill":931547620,"support_perbill":121685138,"approval":93.154762,"support":12.1685138},{"time_hours":47,"approval_perbill":930059524,"support_perbill":119401760,"approval":93.0059524,"support":11.940176},{"time_hours":48,"approval_perbill":928571429,"support_perbill":117187509,"approval":92.8571429,"support":11.7187509},{"time_hours":49,"approval_perbill":927083334,"support_perbill":115039290,"approval":92.7083334,"support":11.503929},{"time_hours":50,"approval_perbill":925595239,"support_perbill":112954195,"approval":92.5595239,"support":11.2954195},{"time_hours":51,"approval_perbill":924107143,"support_perbill":110929480,"approval":92.4107143,"support":11.092948},{"time_hours":52,"approval_perbill":922619048,"support_perbill":108962562,"approval":92.2619048,"support":10.8962562},{"time_hours":53,"approval_perbill":921130953,"support_perbill":107050999,"approval":92.1130953,"support":10.7050999},{"time_hours":54,"approval_perbill":919642858,"support_perbill":105192488,"approval":91.9642858,"support":10.5192488},{"time_hours":55,"approval_perbill":918154762,"support_perbill":103384849,"approval":91.8154762,"support":10.3384849},{"time_hours":56,"approval_perbill":916666667,"support_perbill":101626024,"approval":91.6666667,"support":10.1626024},{"time_hours":57,"approval_perbill":915178572,"support_perbill":99914060,"approval":91.5178572,"support":9.991406},{"time_hours":58,"approval_perbill":913690477,"support_perbill":98247109,"approval":91.3690477,"support":9.8247109},{"time_hours":59,"approval_perbill":912202381,"support_perbill":96623420,"approval":91.2202381,"support":9.662342},{"time_hours":60,"approval_perbill":910714286,"support_perbill":95041329,"approval":91.0714286,"support":9.5041329},{"time_hours":61,"approval_perbill":909226191,"support_perbill":93499259,"approval":90.9226191,"support":9.3499259},{"time_hours":62,"approval_perbill":907738096,"support_perbill":91995709,"approval":90.7738096,"support":9.1995709},{"time_hours":63,"approval_perbill":906250000,"support_perbill":90529254,"approval":90.625,"support":9.0529254},{"time_hours":64,"approval_perbill":904761905,"support_perbill":89098539,"approval":90.4761905,"support":8.9098539},{"time_hours":65,"approval_perbill":903273810,"support_perbill":87702272,"approval":90.327381,"support":8.7702272},{"time_hours":66,"approval_perbill":901785715,"support_perbill":86339224,"approval":90.1785715,"support":8.6339224},{"time_hours":67,"approval_perbill":900297620,"support_perbill":85008223,"approval":90.029762,"support":8.5008223},{"time_hours":68,"approval_perbill":898809524,"support_perbill":83708152,"approval":89.8809524,"support":8.3708152},{"time_hours":69,"approval_perbill":897321429,"support_perbill":82437946,"approval":89.7321429,"support":8.2437946},{"time_hours":70,"approval_perbill":895833334,"support_perbill":81196587,"approval":89.5833334,"support":8.1196587},{"time_hours":71,"approval_perbill":894345239,"support_perbill":79983104,"approval":89.4345239,"support":7.9983104},{"time_hours":72,"approval_perbill":892857143,"support_perbill":78796567,"approval":89.2857143,"support":7.8796567},{"time_hours":73,"approval_perbill":891369048,"support_perbill":77636090,"approval":89.1369048,"support":7.763609},{"time_hours":74,"approval_perbill":889880953,"support_perbill":76500823,"approval":88.9880953,"support":7.6500823},{"time_hours":75,"approval_perbill":888392858,"support_perbill":75389954,"approval":88.8392858,"support":7.5389954},{"time_hours":76,"approval_perbill":886904762,"support_perbill":74302703,"approval":88.6904762,"support":7.4302703},{"time_hours":77,"approval_perbill":885416667,"support_perbill":73238327,"approval":88.5416667,"support":7.3238327},{"time_hours":78,"approval_perbill":883928572,"support_perbill":72196110,"approval":88.3928572,"support":7.219611},{"time_hours":79,"approval_perbill":882440477,"support_perbill":71175368,"approval":88.2440477,"support":7.1175368},{"time_hours":80,"approval_perbill":880952381,"support_perbill":70175444,"approval":88.0952381,"support":7.0175444},{"time_hours":81,"approval_perbill":879464286,"support_perbill":69195707,"approval":87.9464286,"support":6.9195707},{"time_hours":82,"approval_perbill":877976191,"support_perbill":68235552,"approval":87.7976191,"support":6.8235552},{"time_hours":83,"approval_perbill":876488096,"support_perbill":67294398,"approval":87.6488096,"support":6.7294398},{"time_hours":84,"approval_perbill":875000000,"support_perbill":66371686,"approval":87.5,"support":6.6371686},{"time_hours":85,"approval_perbill":873511905,"support_perbill":65466880,"approval":87.3511905,"support":6.546688},{"time_hours":86,"approval_perbill":872023810,"support_perbill":64579464,"approval":87.202381,"support":6.4579464},{"time_hours":87,"approval_perbill":870535715,"support_perbill":63708939,"approval":87.0535715,"support":6.3708939},{"time_hours":88,"approval_perbill":869047620,"support_perbill":62854830,"approval":86.904762,"support":6.285483},{"time_hours":89,"approval_perbill":867559524,"support_perbill":62016676,"approval":86.7559524,"support":6.2016676},{"time_hours":90,"approval_perbill":866071429,"support_perbill":61194035,"approval":86.6071429,"support":6.1194035},{"time_hours":91,"approval_perbill":864583334,"support_perbill":60386478,"approval":86.4583334,"support":6.0386478},{"time_hours":92,"approval_perbill":863095239,"support_perbill":59593596,"approval":86.3095239,"support":5.9593596},{"time_hours":93,"approval_perbill":861607143,"support_perbill":58814991,"approval":86.1607143,"support":5.8814991},{"time_hours":94,"approval_perbill":860119048,"support_perbill":58050283,"approval":86.0119048,"support":5.8050283},{"time_hours":95,"approval_perbill":858630953,"support_perbill":57299101,"approval":85.8630953,"support":5.7299101},{"time_hours":96,"approval_perbill":857142858,"support_perbill":56561090,"approval":85.7142858,"support":5.656109},{"time_hours":97,"approval_perbill":855654762,"support_perbill":55835907,"approval":85.5654762,"support":5.5835907},{"time_hours":98,"approval_perbill":854166667,"support_perbill":55123221,"approval":85.4166667,"support":5.5123221},{"time_hours":99,"approval_perbill":852678572,"support_perbill":54422710,"approval":85.2678572,"support":5.442271},{"time_hours":100,"approval_perbill":851190477,"support_perbill":53734066,"approval":85.1190477,"support":5.3734066},{"time_hours":101,"approval_perbill":849702381,"support_perbill":53056989,"approval":84.9702381,"support":5.3056989},{"time_hours":102,"approval_perbill":848214286,"support_perbill":52391191,"approval":84.8214286,"support":5.2391191},{"time_hours":103,"approval_perbill":846726191,"support_perbill":51736392,"approval":84.6726191,"support":5.1736392},{"time_hours":104,"approval_perbill":845238096,"support_perbill":51092322,"approval":84.5238096,"support":5.1092322},{"time_hours":105,"approval_perbill":843750000,"support_perbill":50458719,"approval":84.375,"support":5.0458719},{"time_hours":106,"approval_perbill":842261905,"support_perbill":49835330,"approval":84.2261905,"support":4.983533},{"time_hours":107,"approval_perbill":840773810,"support_perbill":49221911,"approval":84.077381,"support":4.9221911},{"time_hours":108,"approval_perbill":839285715,"support_perbill":48618223,"approval":83.9285715,"support":4.8618223},{"time_hours":109,"approval_perbill":837797620,"support_perbill":48024037,"approval":83.779762,"support":4.8024037},{"time_hours":110,"approval_perbill":836309524,"support_perbill":47439130,"approval":83.6309524,"support":4.743913},{"time_hours":111,"approval_perbill":834821429,"support_perbill":46863288,"approval":83.4821429,"support":4.6863288},{"time_hours":112,"approval_perbill":833333334,"support_perbill":46296300,"approval":83.3333334,"support":4.62963},{"time_hours":113,"approval_perbill":831845239,"support_perbill":45737964,"approval":83.1845239,"support":4.5737964},{"time_hours":114,"approval_perbill":830357143,"support_perbill":45188083,"approval":83.0357143,"support":4.5188083},{"time_hours":115,"approval_perbill":828869048,"support_perbill":44646468,"approval":82.8869048,"support":4.4646468},{"time_hours":116,"approval_perbill":827380953,"support_perbill":44112932,"approval":82.7380953,"support":4.4112932},{"time_hours":117,"approval_perbill":825892858,"support_perbill":43587297,"approval":82.5892858,"support":4.3587297},{"time_hours":118,"approval_perbill":824404762,"support_perbill":43069388,"approval":82.4404762,"support":4.3069388},{"time_hours":119,"approval_perbill":822916667,"support_perbill":42559037,"approval":82.2916667,"support":4.2559037},{"time_hours":120,"approval_perbill":821428572,"support_perbill":42056078,"approval":82.1428572,"support":4.2056078},{"time_hours":121,"approval_perbill":819940477,"support_perbill":41560353,"approval":81.9940477,"support":4.1560353},{"time_hours":122,"approval_perbill":818452381,"support_perbill":41071706,"approval":81.8452381,"support":4.1071706},{"time_hours":123,"approval_perbill":816964286,"support_perbill":40589987,"approval":81.6964286,"support":4.0589987},{"time_hours":124,"approval_perbill":815476191,"support_perbill":40115050,"approval":81.5476191,"support":4.011505},{"time_hours":125,"approval_perbill":813988096,"support_perbill":39646752,"approval":81.3988096,"support":3.9646752},{"time_hours":126,"approval_perbill":812500000,"support_perbill":39184956,"approval":81.25,"support":3.9184956},{"time_hours":127,"approval_perbill":811011905,"support_perbill":38729526,"approval":81.1011905,"support":3.8729526},{"time_hours":128,"approval_perbill":809523810,"support_perbill":38280333,"approval":80.952381,"support":3.8280333},{"time_hours":129,"approval_perbill":808035715,"support_perbill":37837248,"approval":80.8035715,"support":3.7837248},{"time_hours":130,"approval_perbill":806547620,"support_perbill":37400148,"approval":80.654762,"support":3.7400148},{"time_hours":131,"approval_perbill":805059524,"support_perbill":36968913,"approval":80.5059524,"support":3.6968913},{"time_hours":132,"approval_perbill":803571429,"support_perbill":36543425,"approval":80.3571429,"support":3.6543425},{"time_hours":133,"approval_perbill":802083334,"support_perbill":36123570,"approval":80.2083334,"support":3.612357},{"time_hours":134,"approval_perbill":800595239,"support_perbill":35709238,"approval":80.0595239,"support":3.5709238},{"time_hours":135,"approval_perbill":799107143,"support_perbill":35300319,"approval":79.9107143,"support":3.5300319},{"time_hours":136,"approval_perbill":797619048,"support_perbill":34896708,"approval":79.7619048,"support":3.4896708},{"time_hours":137,"approval_perbill":796130953,"support_perbill":34498304,"approval":79.6130953,"support":3.4498304},{"time_hours":138,"approval_perbill":794642858,"support_perbill":34105005,"approval":79.4642858,"support":3.4105005},{"time_hours":139,"approval_perbill":793154762,"support_perbill":33716714,"approval":79.3154762,"support":3.3716714},{"time_hours":140,"approval_perbill":791666667,"support_perbill":33333336,"approval":79.1666667,"support":3.3333336},{"time_hours":141,"approval_perbill":790178572,"support_perbill":32954778,"approval":79.0178572,"support":3.2954778},{"time_hours":142,"approval_perbill":788690477,"support_perbill":32580951,"approval":78.8690477,"support":3.2580951},{"time_hours":143,"approval_perbill":787202381,"support_perbill":32211765,"approval":78.7202381,"support":3.2211765},{"time_hours":144,"approval_perbill":785714286,"support_perbill":31847136,"approval":78.5714286,"support":3.1847136},{"time_hours":145,"approval_perbill":784226191,"support_perbill":31486979,"approval":78.4226191,"support":3.1486979},{"time_hours":146,"approval_perbill":782738096,"support_perbill":31131212,"approval":78.2738096,"support":3.1131212},{"time_hours":147,"approval_perbill":781250000,"support_perbill":30779756,"approval":78.125,"support":3.0779756},{"time_hours":148,"approval_perbill":779761905,"support_perbill":30432533,"approval":77.9761905,"support":3.0432533},{"time_hours":149,"approval_perbill":778273810,"support_perbill":30089466,"approval":77.827381,"support":3.0089466},{"time_hours":150,"approval_perbill":776785715,"support_perbill":29750482,"approval":77.6785715,"support":2.9750482},{"time_hours":151,"approval_perbill":775297620,"support_perbill":29415508,"approval":77.529762,"support":2.9415508},{"time_hours":152,"approval_perbill":773809524,"support_perbill":29084473,"approval":77.3809524,"support":2.9084473},{"time_hours":153,"approval_perbill":772321429,"support_perbill":28757309,"approval":77.2321429,"support":2.8757309},{"time_hours":154,"approval_perbill":770833334,"support_perbill":28433948,"approval":77.0833334,"support":2.8433948},{"time_hours":155,"approval_perbill":769345239,"support_perbill":28114323,"approval":76.9345239,"support":2.8114323},{"time_hours":156,"approval_perbill":767857143,"support_perbill":27798371,"approval":76.7857143,"support":2.7798371},{"time_hours":157,"approval_perbill":766369048,"support_perbill":27486029,"approval":76.6369048,"support":2.7486029},{"time_hours":158,"approval_perbill":764880953,"support_perbill":27177234,"approval":76.4880953,"support":2.7177234},{"time_hours":159,"approval_perbill":763392858,"support_perbill":26871928,"approval":76.3392858,"support":2.6871928},{"time_hours":160,"approval_perbill":761904762,"support_perbill":26570050,"approval":76.1904762,"support":2.657005},{"time_hours":161,"approval_perbill":760416667,"support_perbill":26271544,"approval":76.0416667,"support":2.6271544},{"time_hours":162,"approval_perbill":758928572,"support_perbill":25976354,"approval":75.8928572,"support":2.5976354},{"time_hours":163,"approval_perbill":757440477,"support_perbill":25684425,"approval":75.7440477,"support":2.5684425},{"time_hours":164,"approval_perbill":755952381,"support_perbill":25395702,"approval":75.5952381,"support":2.5395702},{"time_hours":165,"approval_perbill":754464286,"support_perbill":25110134,"approval":75.4464286,"support":2.5110134},{"time_hours":166,"approval_perbill":752976191,"support_perbill":24827668,"approval":75.2976191,"support":2.4827668},{"time_hours":167,"approval_perbill":751488096,"support_perbill":24548256,"approval":75.1488096,"support":2.4548256},{"time_hours":168,"approval_perbill":750000000,"support_perbill":24271846,"approval":75,"support":2.4271846},{"time_hours":169,"approval_perbill":748511905,"support_perbill":23998392,"approval":74.8511905,"support":2.3998392},{"time_hours":170,"approval_perbill":747023810,"support_perbill":23727846,"approval":74.702381,"support":2.3727846},{"time_hours":171,"approval_perbill":745535715,"support_perbill":23460162,"approval":74.5535715,"support":2.3460162},{"time_hours":172,"approval_perbill":744047620,"support_perbill":23195295,"approval":74.404762,"support":2.3195295},{"time_hours":173,"approval_perbill":742559524,"support_perbill":22933200,"approval":74.2559524,"support":2.29332},{"time_hours":174,"approval_perbill":741071429,"support_perbill":22673834,"approval":74.1071429,"support":2.2673834},{"time_hours":175,"approval_perbill":739583334,"support_perbill":22417155,"approval":73.9583334,"support":2.2417155},{"time_hours":176,"approval_perbill":738095239,"support_perbill":22163122,"approval":73.8095239,"support":2.2163122},{"time_hours":177,"approval_perbill":736607143,"support_perbill":21911693,"approval":73.6607143,"support":2.1911693},{"time_hours":178,"approval_perbill":735119048,"support_perbill":21662829,"approval":73.5119048,"support":2.1662829},{"time_hours":179,"approval_perbill":733630953,"support_perbill":21416491,"approval":73.3630953,"support":2.1416491},{"time_hours":180,"approval_perbill":732142858,"support_perbill":21172640,"approval":73.2142858,"support":2.117264},{"time_hours":181,"approval_perbill":730654762,"support_perbill":20931239,"approval":73.0654762,"support":2.0931239},{"time_hours":182,"approval_perbill":729166667,"support_perbill":20692251,"approval":72.9166667,"support":2.0692251},{"time_hours":183,"approval_perbill":727678572,"support_perbill":20455641,"approval":72.7678572,"support":2.0455641},{"time_hours":184,"approval_perbill":726190477,"support_perbill":20221372,"approval":72.6190477,"support":2.0221372},{"time_hours":185,"approval_perbill":724702381,"support_perbill":19989411,"approval":72.4702381,"support":1.9989411},{"time_hours":186,"approval_perbill":723214286,"support_perbill":19759723,"approval":72.3214286,"support":1.9759723},{"time_hours":187,"approval_perbill":721726191,"support_perbill":19532275,"approval":72.1726191,"support":1.9532275},{"time_hours":188,"approval_perbill":720238096,"support_perbill":19307035,"approval":72.0238096,"support":1.9307035},{"time_hours":189,"approval_perbill":718750000,"support_perbill":19083971,"approval":71.875,"support":1.9083971},{"time_hours":190,"approval_perbill":717261905,"support_perbill":18863050,"approval":71.7261905,"support":1.886305},{"time_hours":191,"approval_perbill":715773810,"support_perbill":18644243,"approval":71.577381,"support":1.8644243},{"time_hours":192,"approval_perbill":714285715,"support_perbill":18427520,"approval":71.4285715,"support":1.842752},{"time_hours":193,"approval_perbill":712797620,"support_perbill":18212849,"approval":71.279762,"support":1.8212849},{"time_hours":194,"approval_perbill":711309524,"support_perbill":18000204,"approval":71.1309524,"support":1.8000204},{"time_hours":195,"approval_perbill":709821429,"support_perbill":17789554,"approval":70.9821429,"support":1.7789554},{"time_hours":196,"approval_perbill":708333334,"support_perbill":17580873,"approval":70.8333334,"support":1.7580873},{"time_hours":197,"approval_perbill":706845239,"support_perbill":17374132,"approval":70.6845239,"support":1.7374132},{"time_hours":198,"approval_perbill":705357143,"support_perbill":17169305,"approval":70.5357143,"support":1.7169305},{"time_hours":199,"approval_perbill":703869048,"support_perbill":16966366,"approval":70.3869048,"support":1.6966366},{"time_hours":200,"approval_perbill":702380953,"support_perbill":16765287,"approval":70.2380953,"support":1.6765287},{"time_hours":201,"approval_perbill":700892858,"support_perbill":16566044,"approval":70.0892858,"support":1.6566044},{"time_hours":202,"approval_perbill":699404762,"support_perbill":16368612,"approval":69.9404762,"support":1.6368612},{"time_hours":203,"approval_perbill":697916667,"support_perbill":16172967,"approval":69.7916667,"support":1.6172967},{"time_hours":204,"approval_perbill":696428572,"support_perbill":15979083,"approval":69.6428572,"support":1.5979083},{"time_hours":205,"approval_perbill":694940477,"support_perbill":15786938,"approval":69.4940477,"support":1.5786938},{"time_hours":206,"approval_perbill":693452381,"support_perbill":15596507,"approval":69.3452381,"support":1.5596507},{"time_hours":207,"approval_perbill":691964286,"support_perbill":15407769,"approval":69.1964286,"support":1.5407769},{"time_hours":208,"approval_perbill":690476191,"support_perbill":15220701,"approval":69.0476191,"support":1.5220701},{"time_hours":209,"approval_perbill":688988096,"support_perbill":15035280,"approval":68.8988096,"support":1.503528},{"time_hours":210,"approval_perbill":687500000,"support_perbill":14851486,"approval":68.75,"support":1.4851486},{"time_hours":211,"approval_perbill":686011905,"support_perbill":14669296,"approval":68.6011905,"support":1.4669296},{"time_hours":212,"approval_perbill":684523810,"support_perbill":14488690,"approval":68.452381,"support":1.448869},{"time_hours":213,"approval_perbill":683035715,"support_perbill":14309648,"approval":68.3035715,"support":1.4309648},{"time_hours":214,"approval_perbill":681547620,"support_perbill":14132148,"approval":68.154762,"support":1.4132148},{"time_hours":215,"approval_perbill":680059524,"support_perbill":13956171,"approval":68.0059524,"support":1.3956171},{"time_hours":216,"approval_perbill":678571429,"support_perbill":13781699,"approval":67.8571429,"support":1.3781699},{"time_hours":217,"approval_perbill":677083334,"support_perbill":13608710,"approval":67.7083334,"support":1.360871},{"time_hours":218,"approval_perbill":675595239,"support_perbill":13437188,"approval":67.5595239,"support":1.3437188},{"time_hours":219,"approval_perbill":674107143,"support_perbill":13267112,"approval":67.4107143,"support":1.3267112},{"time_hours":220,"approval_perbill":672619048,"support_perbill":13098465,"approval":67.2619048,"support":1.3098465},{"time_hours":221,"approval_perbill":671130953,"support_perbill":12931229,"approval":67.1130953,"support":1.2931229},{"time_hours":222,"approval_perbill":669642858,"support_perbill":12765386,"approval":66.9642858,"support":1.2765386},{"time_hours":223,"approval_perbill":668154762,"support_perbill":12600919,"approval":66.8154762,"support":1.2600919},{"time_hours":224,"approval_perbill":666666667,"support_perbill":12437812,"approval":66.6666667,"support":1.2437812},{"time_hours":225,"approval_perbill":665178572,"support_perbill":12276046,"approval":66.5178572,"support":1.2276046},{"time_hours":226,"approval_perbill":663690477,"support_perbill":12115605,"approval":66.3690477,"support":1.2115605},{"time_hours":227,"approval_perbill":662202381,"support_perbill":11956475,"approval":66.2202381,"support":1.1956475},{"time_hours":228,"approval_perbill":660714286,"support_perbill":11798637,"approval":66.0714286,"support":1.1798637},{"time_hours":229,"approval_perbill":659226191,"support_perbill":11642077,"approval":65.9226191,"support":1.1642077},{"time_hours":230,"approval_perbill":657738096,"support_perbill":11486780,"approval":65.7738096,"support":1.148678},{"time_hours":231,"approval_perbill":656250000,"support_perbill":11332729,"approval":65.625,"support":1.1332729},{"time_hours":232,"approval_perbill":654761905,"support_perbill":11179911,"approval":65.4761905,"support":1.1179911},{"time_hours":233,"approval_perbill":653273810,"support_perbill":11028310,"approval":65.327381,"support":1.102831},{"time_hours":234,"approval_perbill":651785715,"support_perbill":10877912,"approval":65.1785715,"support":1.0877912},{"time_hours":235,"approval_perbill":650297620,"support_perbill":10728702,"approval":65.029762,"support":1.0728702},{"time_hours":236,"approval_perbill":648809524,"support_perbill":10580667,"approval":64.8809524,"support":1.0580667},{"time_hours":237,"approval_perbill":647321429,"support_perbill":10433793,"approval":64.7321429,"support":1.0433793},{"time_hours":238,"approval_perbill":645833334,"support_perbill":10288066,"approval":64.5833334,"support":1.0288066},{"time_hours":239,"approval_perbill":644345239,"support_perbill":10143473,"approval":64.4345239,"support":1.0143473},{"time_hours":240,"approval_perbill":642857143,"support_perbill":10000000,"approval":64.2857143,"support":1},{"time_hours":241,"approval_perbill":641369048,"support_perbill":9857635,"approval":64.1369048,"support":0.9857635},{"time_hours":242,"approval_perbill":639880953,"support_perbill":9716365,"approval":63.9880953,"support":0.9716365},{"time_hours":243,"approval_perbill":638392858,"support_perbill":9576177,"approval":63.8392858,"support":0.9576177},{"time_hours":244,"approval_perbill":636904762,"support_perbill":9437059,"approval":63.6904762,"support":0.9437059},{"time_hours":245,"approval_perbill":635416667,"support_perbill":9298999,"approval":63.5416667,"support":0.9298999},{"time_hours":246,"approval_perbill":633928572,"support_perbill":9161984,"approval":63.3928572,"support":0.9161984},{"time_hours":247,"approval_perbill":632440477,"support_perbill":9026003,"approval":63.2440477,"support":0.9026003},{"time_hours":248,"approval_perbill":630952381,"support_perbill":8891045,"approval":63.0952381,"support":0.8891045},{"time_hours":249,"approval_perbill":629464286,"support_perbill":8757097,"approval":62.9464286,"support":0.8757097},{"time_hours":250,"approval_perbill":627976191,"support_perbill":8624148,"approval":62.7976191,"support":0.8624148},{"time_hours":251,"approval_perbill":626488096,"support_perbill":8492187,"approval":62.6488096,"support":0.8492187},{"time_hours":252,"approval_perbill":625000000,"support_perbill":8361204,"approval":62.5,"support":0.8361204},{"time_hours":253,"approval_perbill":623511905,"support_perbill":8231187,"approval":62.3511905,"support":0.8231187},{"time_hours":254,"approval_perbill":622023810,"support_perbill":8102127,"approval":62.202381,"support":0.8102127},{"time_hours":255,"approval_perbill":620535715,"support_perbill":7974011,"approval":62.0535715,"support":0.7974011},{"time_hours":256,"approval_perbill":619047620,"support_perbill":7846830,"approval":61.904762,"support":0.784683},{"time_hours":257,"approval_perbill":617559524,"support_perbill":7720574,"approval":61.7559524,"support":0.7720574},{"time_hours":258,"approval_perbill":616071429,"support_perbill":7595233,"approval":61.6071429,"support":0.7595233},{"time_hours":259,"approval_perbill":614583334,"support_perbill":7470796,"approval":61.4583334,"support":0.7470796},{"time_hours":260,"approval_perbill":613095239,"support_perbill":7347255,"approval":61.3095239,"support":0.7347255},{"time_hours":261,"approval_perbill":611607143,"support_perbill":7224598,"approval":61.1607143,"support":0.7224598},{"time_hours":262,"approval_perbill":610119048,"support_perbill":7102818,"approval":61.0119048,"support":0.7102818},{"time_hours":263,"approval_perbill":608630953,"support_perbill":6981905,"approval":60.8630953,"support":0.6981905},{"time_hours":264,"approval_perbill":607142858,"support_perbill":6861848,"approval":60.7142858,"support":0.6861848},{"time_hours":265,"approval_perbill":605654762,"support_perbill":6742640,"approval":60.5654762,"support":0.674264},{"time_hours":266,"approval_perbill":604166667,"support_perbill":6624271,"approval":60.4166667,"support":0.6624271},{"time_hours":267,"approval_perbill":602678572,"support_perbill":6506733,"approval":60.2678572,"support":0.6506733},{"time_hours":268,"approval_perbill":601190477,"support_perbill":6390017,"approval":60.1190477,"support":0.6390017},{"time_hours":269,"approval_perbill":599702381,"support_perbill":6274113,"approval":59.9702381,"support":0.6274113},{"time_hours":270,"approval_perbill":598214286,"support_perbill":6159015,"approval":59.8214286,"support":0.6159015},{"time_hours":271,"approval_perbill":596726191,"support_perbill":6044712,"approval":59.6726191,"support":0.6044712},{"time_hours":272,"approval_perbill":595238096,"support_perbill":5931198,"approval":59.5238096,"support":0.5931198},{"time_hours":273,"approval_perbill":593750000,"support_perbill":5818464,"approval":59.375,"support":0.5818464},{"time_hours":274,"approval_perbill":592261905,"support_perbill":5706502,"approval":59.2261905,"support":0.5706502},{"time_hours":275,"approval_perbill":590773810,"support_perbill":5595304,"approval":59.077381,"support":0.5595304},{"time_hours":276,"approval_perbill":589285715,"support_perbill":5484862,"approval":58.9285715,"support":0.5484862},{"time_hours":277,"approval_perbill":587797620,"support_perbill":5375169,"approval":58.779762,"support":0.5375169},{"time_hours":278,"approval_perbill":586309524,"support_perbill":5266216,"approval":58.6309524,"support":0.5266216},{"time_hours":279,"approval_perbill":584821429,"support_perbill":5157998,"approval":58.4821429,"support":0.5157998},{"time_hours":280,"approval_perbill":583333334,"support_perbill":5050505,"approval":58.3333334,"support":0.5050505},{"time_hours":281,"approval_perbill":581845239,"support_perbill":4943731,"approval":58.1845239,"support":0.4943731},{"time_hours":282,"approval_perbill":580357143,"support_perbill":4837669,"approval":58.0357143,"support":0.4837669},{"time_hours":283,"approval_perbill":578869048,"support_perbill":4732312,"approval":57.8869048,"support":0.4732312},{"time_hours":284,"approval_perbill":577380953,"support_perbill":4627652,"approval":57.7380953,"support":0.4627652},{"time_hours":285,"approval_perbill":575892858,"support_perbill":4523683,"approval":57.5892858,"support":0.4523683},{"time_hours":286,"approval_perbill":574404762,"support_perbill":4420397,"approval":57.4404762,"support":0.4420397},{"time_hours":287,"approval_perbill":572916667,"support_perbill":4317789,"approval":57.2916667,"support":0.4317789},{"time_hours":288,"approval_perbill":571428572,"support_perbill":4215851,"approval":57.1428572,"support":0.4215851},{"time_hours":289,"approval_perbill":569940477,"support_perbill":4114578,"approval":56.9940477,"support":0.4114578},{"time_hours":290,"approval_perbill":568452381,"support_perbill":4013961,"approval":56.8452381,"support":0.4013961},{"time_hours":291,"approval_perbill":566964286,"support_perbill":3913996,"approval":56.6964286,"support":0.3913996},{"time_hours":292,"approval_perbill":565476191,"support_perbill":3814676,"approval":56.5476191,"support":0.3814676},{"time_hours":293,"approval_perbill":563988096,"support_perbill":3715994,"approval":56.3988096,"support":0.3715994},{"time_hours":294,"approval_perbill":562500000,"support_perbill":3617945,"approval":56.25,"support":0.3617945},{"time_hours":295,"approval_perbill":561011905,"support_perbill":3520522,"approval":56.1011905,"support":0.3520522},{"time_hours":296,"approval_perbill":559523810,"support_perbill":3423719,"approval":55.952381,"support":0.3423719},{"time_hours":297,"approval_perbill":558035715,"support_perbill":3327531,"approval":55.8035715,"support":0.3327531},{"time_hours":298,"approval_perbill":556547620,"support_perbill":3231952,"approval":55.654762,"support":0.3231952},{"time_hours":299,"approval_perbill":555059524,"support_perbill":3136975,"approval":55.5059524,"support":0.3136975},{"time_hours":300,"approval_perbill":553571429,"support_perbill":3042596,"approval":55.3571429,"support":0.3042596},{"time_hours":301,"approval_perbill":552083334,"support_perbill":2948808,"approval":55.2083334,"support":0.2948808},{"time_hours":302,"approval_perbill":550595239,"support_perbill":2855607,"approval":55.0595239,"support":0.2855607},{"time_hours":303,"approval_perbill":549107143,"support_perbill":2762986,"approval":54.9107143,"support":0.2762986},{"time_hours":304,"approval_perbill":547619048,"support_perbill":2670940,"approval":54.7619048,"support":0.267094},{"time_hours":305,"approval_perbill":546130953,"support_perbill":2579464,"approval":54.6130953,"support":0.2579464},{"time_hours":306,"approval_perbill":544642858,"support_perbill":2488552,"approval":54.4642858,"support":0.2488552},{"time_hours":307,"approval_perbill":543154762,"support_perbill":2398200,"approval":54.3154762,"support":0.23982},{"time_hours":308,"approval_perbill":541666667,"support_perbill":2308402,"approval":54.1666667,"support":0.2308402},{"time_hours":309,"approval_perbill":540178572,"support_perbill":2219153,"approval":54.0178572,"support":0.2219153},{"time_hours":310,"approval_perbill":538690477,"support_perbill":2130449,"approval":53.8690477,"support":0.2130449},{"time_hours":311,"approval_perbill":537202381,"support_perbill":2042283,"approval":53.7202381,"support":0.2042283},{"time_hours":312,"approval_perbill":535714286,"support_perbill":1954652,"approval":53.5714286,"support":0.1954652},{"time_hours":313,"approval_perbill":534226191,"support_perbill":1867550,"approval":53.4226191,"support":0.186755},{"time_hours":314,"approval_perbill":532738096,"support_perbill":1780972,"approval":53.2738096,"support":0.1780972},{"time_hours":315,"approval_perbill":531250000,"support_perbill":1694915,"approval":53.125,"support":0.1694915},{"time_hours":316,"approval_perbill":529761905,"support_perbill":1609373,"approval":52.9761905,"support":0.1609373},{"time_hours":317,"approval_perbill":528273810,"support_perbill":1524341,"approval":52.827381,"support":0.1524341},{"time_hours":318,"approval_perbill":526785715,"support_perbill":1439815,"approval":52.6785715,"support":0.1439815},{"time_hours":319,"approval_perbill":525297620,"support_perbill":1355791,"approval":52.529762,"support":0.1355791},{"time_hours":320,"approval_perbill":523809524,"support_perbill":1272264,"approval":52.3809524,"support":0.1272264},{"time_hours":321,"approval_perbill":522321429,"support_perbill":1189230,"approval":52.2321429,"support":0.118923},{"time_hours":322,"approval_perbill":520833334,"support_perbill":1106684,"approval":52.0833334,"support":0.1106684},{"time_hours":323,"approval_perbill":519345239,"support_perbill":1024622,"approval":51.9345239,"support":0.1024622},{"time_hours":324,"approval_perbill":517857143,"support_perbill":943040,"approval":51.7857143,"support":0.094304},{"time_hours":325,"approval_perbill":516369048,"support_perbill":861933,"approval":51.6369048,"support":0.0861933},{"time_hours":326,"approval_perbill":514880953,"support_perbill":781298,"approval":51.4880953,"support":0.0781298},{"time_hours":327,"approval_perbill":513392858,"support_perbill":701131,"approval":51.3392858,"support":0.0701131},{"time_hours":328,"approval_perbill":511904762,"support_perbill":621426,"approval":51.1904762,"support":0.0621426},{"time_hours":329,"approval_perbill":510416667,"support_perbill":542181,"approval":51.0416667,"support":0.0542181},{"time_hours":330,"approval_perbill":508928572,"support_perbill":463392,"approval":50.8928572,"support":0.0463392},{"time_hours":331,"approval_perbill":507440477,"support_perbill":385053,"approval":50.7440477,"support":0.0385053},{"time_hours":332,"approval_perbill":505952381,"support_perbill":307163,"approval":50.5952381,"support":0.0307163},{"time_hours":333,"approval_perbill":504464286,"support_perbill":229716,"approval":50.4464286,"support":0.0229716},{"time_hours":334,"approval_perbill":502976191,"support_perbill":152709,"approval":50.2976191,"support":0.0152709},{"time_hours":335,"approval_perbill":501488096,"support_perbill":76138,"approval":50.1488096,"support":0.0076138},{"time_hours":336,"approval_perbill":500000000,"support_perbill":0,"approval":50,"support":0}]')},50902:p=>{"use strict";p.exports=JSON.parse('[{"time_hours":0,"approval_perbill":1000000000,"support_perbill":500000038,"approval":100,"support":50.0000038},{"time_hours":1,"approval_perbill":995833334,"support_perbill":366120266,"approval":99.5833334,"support":36.6120266},{"time_hours":2,"approval_perbill":991666668,"support_perbill":288428371,"approval":99.1666668,"support":28.8428371},{"time_hours":3,"approval_perbill":987500001,"support_perbill":237687395,"approval":98.7500001,"support":23.7687395},{"time_hours":4,"approval_perbill":983333335,"support_perbill":201946501,"approval":98.3333335,"support":20.1946501},{"time_hours":5,"approval_perbill":979166668,"support_perbill":175410725,"approval":97.9166668,"support":17.5410725},{"time_hours":6,"approval_perbill":975000002,"support_perbill":154929598,"approval":97.5000002,"support":15.4929598},{"time_hours":7,"approval_perbill":970833334,"support_perbill":138643083,"approval":97.0833334,"support":13.8643083},{"time_hours":8,"approval_perbill":966666668,"support_perbill":125382279,"approval":96.6666668,"support":12.5382279},{"time_hours":9,"approval_perbill":962500001,"support_perbill":114375668,"approval":96.2500001,"support":11.4375668},{"time_hours":10,"approval_perbill":958333335,"support_perbill":105093501,"approval":95.8333335,"support":10.5093501},{"time_hours":11,"approval_perbill":954166667,"support_perbill":97159951,"approval":95.4166667,"support":9.7159951},{"time_hours":12,"approval_perbill":950000001,"support_perbill":90301014,"approval":95.0000001,"support":9.0301014},{"time_hours":13,"approval_perbill":945833334,"support_perbill":84312199,"approval":94.5833334,"support":8.4312199},{"time_hours":14,"approval_perbill":941666668,"support_perbill":79037810,"approval":94.1666668,"support":7.903781},{"time_hours":15,"approval_perbill":937500001,"support_perbill":74357200,"approval":93.7500001,"support":7.43572},{"time_hours":16,"approval_perbill":933333335,"support_perbill":70175447,"approval":93.3333335,"support":7.0175447},{"time_hours":17,"approval_perbill":929166667,"support_perbill":66416830,"approval":92.9166667,"support":6.641683},{"time_hours":18,"approval_perbill":925000001,"support_perbill":63020221,"approval":92.5000001,"support":6.3020221},{"time_hours":19,"approval_perbill":920833334,"support_perbill":59935722,"approval":92.0833334,"support":5.9935722},{"time_hours":20,"approval_perbill":916666668,"support_perbill":57122204,"approval":91.6666668,"support":5.7122204},{"time_hours":21,"approval_perbill":912500000,"support_perbill":54545460,"approval":91.25,"support":5.454546},{"time_hours":22,"approval_perbill":908333334,"support_perbill":52176808,"approval":90.8333334,"support":5.2176808},{"time_hours":23,"approval_perbill":904166668,"support_perbill":49992020,"approval":90.4166668,"support":4.999202},{"time_hours":24,"approval_perbill":900000001,"support_perbill":47970485,"approval":90.0000001,"support":4.7970485},{"time_hours":25,"approval_perbill":895833335,"support_perbill":46094566,"approval":89.5833335,"support":4.6094566},{"time_hours":26,"approval_perbill":891666668,"support_perbill":44349075,"approval":89.1666668,"support":4.4349075},{"time_hours":27,"approval_perbill":887500002,"support_perbill":42720867,"approval":88.7500002,"support":4.2720867},{"time_hours":28,"approval_perbill":883333334,"support_perbill":41198506,"approval":88.3333334,"support":4.1198506},{"time_hours":29,"approval_perbill":879166668,"support_perbill":39771995,"approval":87.9166668,"support":3.9771995},{"time_hours":30,"approval_perbill":875000001,"support_perbill":38432558,"approval":87.5000001,"support":3.8432558},{"time_hours":31,"approval_perbill":870833335,"support_perbill":37172460,"approval":87.0833335,"support":3.717246},{"time_hours":32,"approval_perbill":866666667,"support_perbill":35984852,"approval":86.6666667,"support":3.5984852},{"time_hours":33,"approval_perbill":862500001,"support_perbill":34863656,"approval":86.2500001,"support":3.4863656},{"time_hours":34,"approval_perbill":858333334,"support_perbill":33803451,"approval":85.8333334,"support":3.3803451},{"time_hours":35,"approval_perbill":854166668,"support_perbill":32799393,"approval":85.4166668,"support":3.2799393},{"time_hours":36,"approval_perbill":850000001,"support_perbill":31847137,"approval":85.0000001,"support":3.1847137},{"time_hours":37,"approval_perbill":845833335,"support_perbill":30942774,"approval":84.5833335,"support":3.0942774},{"time_hours":38,"approval_perbill":841666667,"support_perbill":30082781,"approval":84.1666667,"support":3.0082781},{"time_hours":39,"approval_perbill":837500001,"support_perbill":29263970,"approval":83.7500001,"support":2.926397},{"time_hours":40,"approval_perbill":833333334,"support_perbill":28483451,"approval":83.3333334,"support":2.8483451},{"time_hours":41,"approval_perbill":829166668,"support_perbill":27738602,"approval":82.9166668,"support":2.7738602},{"time_hours":42,"approval_perbill":825000000,"support_perbill":27027029,"approval":82.5,"support":2.7027029},{"time_hours":43,"approval_perbill":820833334,"support_perbill":26346554,"approval":82.0833334,"support":2.6346554},{"time_hours":44,"approval_perbill":816666668,"support_perbill":25695180,"approval":81.6666668,"support":2.569518},{"time_hours":45,"approval_perbill":812500001,"support_perbill":25071080,"approval":81.2500001,"support":2.507108},{"time_hours":46,"approval_perbill":808333335,"support_perbill":24472576,"approval":80.8333335,"support":2.4472576},{"time_hours":47,"approval_perbill":804166668,"support_perbill":23898125,"approval":80.4166668,"support":2.3898125},{"time_hours":48,"approval_perbill":800000002,"support_perbill":23346306,"approval":80.0000002,"support":2.3346306},{"time_hours":49,"approval_perbill":795833334,"support_perbill":22815806,"approval":79.5833334,"support":2.2815806},{"time_hours":50,"approval_perbill":791666668,"support_perbill":22305415,"approval":79.1666668,"support":2.2305415},{"time_hours":51,"approval_perbill":787500001,"support_perbill":21814009,"approval":78.7500001,"support":2.1814009},{"time_hours":52,"approval_perbill":783333335,"support_perbill":21340549,"approval":78.3333335,"support":2.1340549},{"time_hours":53,"approval_perbill":779166667,"support_perbill":20884069,"approval":77.9166667,"support":2.0884069},{"time_hours":54,"approval_perbill":775000001,"support_perbill":20443673,"approval":77.5000001,"support":2.0443673},{"time_hours":55,"approval_perbill":770833334,"support_perbill":20018524,"approval":77.0833334,"support":2.0018524},{"time_hours":56,"approval_perbill":766666668,"support_perbill":19607845,"approval":76.6666668,"support":1.9607845},{"time_hours":57,"approval_perbill":762500001,"support_perbill":19210908,"approval":76.2500001,"support":1.9210908},{"time_hours":58,"approval_perbill":758333335,"support_perbill":18827037,"approval":75.8333335,"support":1.8827037},{"time_hours":59,"approval_perbill":754166667,"support_perbill":18455595,"approval":75.4166667,"support":1.8455595},{"time_hours":60,"approval_perbill":750000001,"support_perbill":18095989,"approval":75.0000001,"support":1.8095989},{"time_hours":61,"approval_perbill":745833334,"support_perbill":17747662,"approval":74.5833334,"support":1.7747662},{"time_hours":62,"approval_perbill":741666668,"support_perbill":17410092,"approval":74.1666668,"support":1.7410092},{"time_hours":63,"approval_perbill":737500000,"support_perbill":17082787,"approval":73.75,"support":1.7082787},{"time_hours":64,"approval_perbill":733333334,"support_perbill":16765287,"approval":73.3333334,"support":1.6765287},{"time_hours":65,"approval_perbill":729166668,"support_perbill":16457158,"approval":72.9166668,"support":1.6457158},{"time_hours":66,"approval_perbill":725000001,"support_perbill":16157990,"approval":72.5000001,"support":1.615799},{"time_hours":67,"approval_perbill":720833335,"support_perbill":15867399,"approval":72.0833335,"support":1.5867399},{"time_hours":68,"approval_perbill":716666668,"support_perbill":15585021,"approval":71.6666668,"support":1.5585021},{"time_hours":69,"approval_perbill":712500002,"support_perbill":15310512,"approval":71.2500002,"support":1.5310512},{"time_hours":70,"approval_perbill":708333334,"support_perbill":15043548,"approval":70.8333334,"support":1.5043548},{"time_hours":71,"approval_perbill":704166668,"support_perbill":14783823,"approval":70.4166668,"support":1.4783823},{"time_hours":72,"approval_perbill":700000001,"support_perbill":14531045,"approval":70.0000001,"support":1.4531045},{"time_hours":73,"approval_perbill":695833335,"support_perbill":14284939,"approval":69.5833335,"support":1.4284939},{"time_hours":74,"approval_perbill":691666667,"support_perbill":14045246,"approval":69.1666667,"support":1.4045246},{"time_hours":75,"approval_perbill":687500001,"support_perbill":13811717,"approval":68.7500001,"support":1.3811717},{"time_hours":76,"approval_perbill":683333334,"support_perbill":13584118,"approval":68.3333334,"support":1.3584118},{"time_hours":77,"approval_perbill":679166668,"support_perbill":13362226,"approval":67.9166668,"support":1.3362226},{"time_hours":78,"approval_perbill":675000001,"support_perbill":13145828,"approval":67.5000001,"support":1.3145828},{"time_hours":79,"approval_perbill":670833335,"support_perbill":12934723,"approval":67.0833335,"support":1.2934723},{"time_hours":80,"approval_perbill":666666667,"support_perbill":12728720,"approval":66.6666667,"support":1.272872},{"time_hours":81,"approval_perbill":662500001,"support_perbill":12527635,"approval":66.2500001,"support":1.2527635},{"time_hours":82,"approval_perbill":658333334,"support_perbill":12331295,"approval":65.8333334,"support":1.2331295},{"time_hours":83,"approval_perbill":654166668,"support_perbill":12139533,"approval":65.4166668,"support":1.2139533},{"time_hours":84,"approval_perbill":650000000,"support_perbill":11952192,"approval":65,"support":1.1952192},{"time_hours":85,"approval_perbill":645833334,"support_perbill":11769120,"approval":64.5833334,"support":1.176912},{"time_hours":86,"approval_perbill":641666668,"support_perbill":11590172,"approval":64.1666668,"support":1.1590172},{"time_hours":87,"approval_perbill":637500001,"support_perbill":11415212,"approval":63.7500001,"support":1.1415212},{"time_hours":88,"approval_perbill":633333335,"support_perbill":11244107,"approval":63.3333335,"support":1.1244107},{"time_hours":89,"approval_perbill":629166668,"support_perbill":11076731,"approval":62.9166668,"support":1.1076731},{"time_hours":90,"approval_perbill":625000002,"support_perbill":10912963,"approval":62.5000002,"support":1.0912963},{"time_hours":91,"approval_perbill":620833334,"support_perbill":10752689,"approval":62.0833334,"support":1.0752689},{"time_hours":92,"approval_perbill":616666668,"support_perbill":10595797,"approval":61.6666668,"support":1.0595797},{"time_hours":93,"approval_perbill":612500001,"support_perbill":10442182,"approval":61.2500001,"support":1.0442182},{"time_hours":94,"approval_perbill":608333335,"support_perbill":10291742,"approval":60.8333335,"support":1.0291742},{"time_hours":95,"approval_perbill":604166667,"support_perbill":10144379,"approval":60.4166667,"support":1.0144379},{"time_hours":96,"approval_perbill":600000001,"support_perbill":10000001,"approval":60.0000001,"support":1.0000001},{"time_hours":97,"approval_perbill":595833334,"support_perbill":9858516,"approval":59.5833334,"support":0.9858516},{"time_hours":98,"approval_perbill":591666668,"support_perbill":9719840,"approval":59.1666668,"support":0.971984},{"time_hours":99,"approval_perbill":587500001,"support_perbill":9583890,"approval":58.7500001,"support":0.958389},{"time_hours":100,"approval_perbill":583333335,"support_perbill":9450585,"approval":58.3333335,"support":0.9450585},{"time_hours":101,"approval_perbill":579166667,"support_perbill":9319850,"approval":57.9166667,"support":0.931985},{"time_hours":102,"approval_perbill":575000001,"support_perbill":9191610,"approval":57.5000001,"support":0.919161},{"time_hours":103,"approval_perbill":570833334,"support_perbill":9065795,"approval":57.0833334,"support":0.9065795},{"time_hours":104,"approval_perbill":566666668,"support_perbill":8942338,"approval":56.6666668,"support":0.8942338},{"time_hours":105,"approval_perbill":562500000,"support_perbill":8821171,"approval":56.25,"support":0.8821171},{"time_hours":106,"approval_perbill":558333334,"support_perbill":8702233,"approval":55.8333334,"support":0.8702233},{"time_hours":107,"approval_perbill":554166668,"support_perbill":8585461,"approval":55.4166668,"support":0.8585461},{"time_hours":108,"approval_perbill":550000001,"support_perbill":8470798,"approval":55.0000001,"support":0.8470798},{"time_hours":109,"approval_perbill":545833335,"support_perbill":8358187,"approval":54.5833335,"support":0.8358187},{"time_hours":110,"approval_perbill":541666668,"support_perbill":8247573,"approval":54.1666668,"support":0.8247573},{"time_hours":111,"approval_perbill":537500002,"support_perbill":8138904,"approval":53.7500002,"support":0.8138904},{"time_hours":112,"approval_perbill":533333334,"support_perbill":8032129,"approval":53.3333334,"support":0.8032129},{"time_hours":113,"approval_perbill":529166668,"support_perbill":7927198,"approval":52.9166668,"support":0.7927198},{"time_hours":114,"approval_perbill":525000001,"support_perbill":7824065,"approval":52.5000001,"support":0.7824065},{"time_hours":115,"approval_perbill":520833335,"support_perbill":7722683,"approval":52.0833335,"support":0.7722683},{"time_hours":116,"approval_perbill":516666667,"support_perbill":7623008,"approval":51.6666667,"support":0.7623008},{"time_hours":117,"approval_perbill":512500001,"support_perbill":7524998,"approval":51.2500001,"support":0.7524998},{"time_hours":118,"approval_perbill":508333334,"support_perbill":7428611,"approval":50.8333334,"support":0.7428611},{"time_hours":119,"approval_perbill":504166668,"support_perbill":7333807,"approval":50.4166668,"support":0.7333807},{"time_hours":120,"approval_perbill":500000000,"support_perbill":7240547,"approval":50,"support":0.7240547},{"time_hours":121,"approval_perbill":500000000,"support_perbill":7148795,"approval":50,"support":0.7148795},{"time_hours":122,"approval_perbill":500000000,"support_perbill":7058513,"approval":50,"support":0.7058513},{"time_hours":123,"approval_perbill":500000000,"support_perbill":6969667,"approval":50,"support":0.6969667},{"time_hours":124,"approval_perbill":500000000,"support_perbill":6882223,"approval":50,"support":0.6882223},{"time_hours":125,"approval_perbill":500000000,"support_perbill":6796148,"approval":50,"support":0.6796148},{"time_hours":126,"approval_perbill":500000000,"support_perbill":6711409,"approval":50,"support":0.6711409},{"time_hours":127,"approval_perbill":500000000,"support_perbill":6627977,"approval":50,"support":0.6627977},{"time_hours":128,"approval_perbill":500000000,"support_perbill":6545821,"approval":50,"support":0.6545821},{"time_hours":129,"approval_perbill":500000000,"support_perbill":6464912,"approval":50,"support":0.6464912},{"time_hours":130,"approval_perbill":500000000,"support_perbill":6385221,"approval":50,"support":0.6385221},{"time_hours":131,"approval_perbill":500000000,"support_perbill":6306722,"approval":50,"support":0.6306722},{"time_hours":132,"approval_perbill":500000000,"support_perbill":6229388,"approval":50,"support":0.6229388},{"time_hours":133,"approval_perbill":500000000,"support_perbill":6153193,"approval":50,"support":0.6153193},{"time_hours":134,"approval_perbill":500000000,"support_perbill":6078113,"approval":50,"support":0.6078113},{"time_hours":135,"approval_perbill":500000000,"support_perbill":6004122,"approval":50,"support":0.6004122},{"time_hours":136,"approval_perbill":500000000,"support_perbill":5931198,"approval":50,"support":0.5931198},{"time_hours":137,"approval_perbill":500000000,"support_perbill":5859317,"approval":50,"support":0.5859317},{"time_hours":138,"approval_perbill":500000000,"support_perbill":5788458,"approval":50,"support":0.5788458},{"time_hours":139,"approval_perbill":500000000,"support_perbill":5718598,"approval":50,"support":0.5718598},{"time_hours":140,"approval_perbill":500000000,"support_perbill":5649718,"approval":50,"support":0.5649718},{"time_hours":141,"approval_perbill":500000000,"support_perbill":5581795,"approval":50,"support":0.5581795},{"time_hours":142,"approval_perbill":500000000,"support_perbill":5514810,"approval":50,"support":0.551481},{"time_hours":143,"approval_perbill":500000000,"support_perbill":5448745,"approval":50,"support":0.5448745},{"time_hours":144,"approval_perbill":500000000,"support_perbill":5383580,"approval":50,"support":0.538358},{"time_hours":145,"approval_perbill":500000000,"support_perbill":5319297,"approval":50,"support":0.5319297},{"time_hours":146,"approval_perbill":500000000,"support_perbill":5255878,"approval":50,"support":0.5255878},{"time_hours":147,"approval_perbill":500000000,"support_perbill":5193306,"approval":50,"support":0.5193306},{"time_hours":148,"approval_perbill":500000000,"support_perbill":5131565,"approval":50,"support":0.5131565},{"time_hours":149,"approval_perbill":500000000,"support_perbill":5070636,"approval":50,"support":0.5070636},{"time_hours":150,"approval_perbill":500000000,"support_perbill":5010506,"approval":50,"support":0.5010506},{"time_hours":151,"approval_perbill":500000000,"support_perbill":4951157,"approval":50,"support":0.4951157},{"time_hours":152,"approval_perbill":500000000,"support_perbill":4892576,"approval":50,"support":0.4892576},{"time_hours":153,"approval_perbill":500000000,"support_perbill":4834747,"approval":50,"support":0.4834747},{"time_hours":154,"approval_perbill":500000000,"support_perbill":4777655,"approval":50,"support":0.4777655},{"time_hours":155,"approval_perbill":500000000,"support_perbill":4721287,"approval":50,"support":0.4721287},{"time_hours":156,"approval_perbill":500000000,"support_perbill":4665630,"approval":50,"support":0.466563},{"time_hours":157,"approval_perbill":500000000,"support_perbill":4610669,"approval":50,"support":0.4610669},{"time_hours":158,"approval_perbill":500000000,"support_perbill":4556392,"approval":50,"support":0.4556392},{"time_hours":159,"approval_perbill":500000000,"support_perbill":4502785,"approval":50,"support":0.4502785},{"time_hours":160,"approval_perbill":500000000,"support_perbill":4449838,"approval":50,"support":0.4449838},{"time_hours":161,"approval_perbill":500000000,"support_perbill":4397537,"approval":50,"support":0.4397537},{"time_hours":162,"approval_perbill":500000000,"support_perbill":4345871,"approval":50,"support":0.4345871},{"time_hours":163,"approval_perbill":500000000,"support_perbill":4294829,"approval":50,"support":0.4294829},{"time_hours":164,"approval_perbill":500000000,"support_perbill":4244398,"approval":50,"support":0.4244398},{"time_hours":165,"approval_perbill":500000000,"support_perbill":4194569,"approval":50,"support":0.4194569},{"time_hours":166,"approval_perbill":500000000,"support_perbill":4145330,"approval":50,"support":0.414533},{"time_hours":167,"approval_perbill":500000000,"support_perbill":4096672,"approval":50,"support":0.4096672},{"time_hours":168,"approval_perbill":500000000,"support_perbill":4048583,"approval":50,"support":0.4048583},{"time_hours":169,"approval_perbill":500000000,"support_perbill":4001054,"approval":50,"support":0.4001054},{"time_hours":170,"approval_perbill":500000000,"support_perbill":3954075,"approval":50,"support":0.3954075},{"time_hours":171,"approval_perbill":500000000,"support_perbill":3907637,"approval":50,"support":0.3907637},{"time_hours":172,"approval_perbill":500000000,"support_perbill":3861731,"approval":50,"support":0.3861731},{"time_hours":173,"approval_perbill":500000000,"support_perbill":3816347,"approval":50,"support":0.3816347},{"time_hours":174,"approval_perbill":500000000,"support_perbill":3771476,"approval":50,"support":0.3771476},{"time_hours":175,"approval_perbill":500000000,"support_perbill":3727110,"approval":50,"support":0.372711},{"time_hours":176,"approval_perbill":500000000,"support_perbill":3683241,"approval":50,"support":0.3683241},{"time_hours":177,"approval_perbill":500000000,"support_perbill":3639860,"approval":50,"support":0.363986},{"time_hours":178,"approval_perbill":500000000,"support_perbill":3596958,"approval":50,"support":0.3596958},{"time_hours":179,"approval_perbill":500000000,"support_perbill":3554529,"approval":50,"support":0.3554529},{"time_hours":180,"approval_perbill":500000000,"support_perbill":3512564,"approval":50,"support":0.3512564},{"time_hours":181,"approval_perbill":500000000,"support_perbill":3471056,"approval":50,"support":0.3471056},{"time_hours":182,"approval_perbill":500000000,"support_perbill":3429997,"approval":50,"support":0.3429997},{"time_hours":183,"approval_perbill":500000000,"support_perbill":3389380,"approval":50,"support":0.338938},{"time_hours":184,"approval_perbill":500000000,"support_perbill":3349198,"approval":50,"support":0.3349198},{"time_hours":185,"approval_perbill":500000000,"support_perbill":3309444,"approval":50,"support":0.3309444},{"time_hours":186,"approval_perbill":500000000,"support_perbill":3270111,"approval":50,"support":0.3270111},{"time_hours":187,"approval_perbill":500000000,"support_perbill":3231193,"approval":50,"support":0.3231193},{"time_hours":188,"approval_perbill":500000000,"support_perbill":3192682,"approval":50,"support":0.3192682},{"time_hours":189,"approval_perbill":500000000,"support_perbill":3154574,"approval":50,"support":0.3154574},{"time_hours":190,"approval_perbill":500000000,"support_perbill":3116861,"approval":50,"support":0.3116861},{"time_hours":191,"approval_perbill":500000000,"support_perbill":3079537,"approval":50,"support":0.3079537},{"time_hours":192,"approval_perbill":500000000,"support_perbill":3042596,"approval":50,"support":0.3042596},{"time_hours":193,"approval_perbill":500000000,"support_perbill":3006033,"approval":50,"support":0.3006033},{"time_hours":194,"approval_perbill":500000000,"support_perbill":2969841,"approval":50,"support":0.2969841},{"time_hours":195,"approval_perbill":500000000,"support_perbill":2934016,"approval":50,"support":0.2934016},{"time_hours":196,"approval_perbill":500000000,"support_perbill":2898550,"approval":50,"support":0.289855},{"time_hours":197,"approval_perbill":500000000,"support_perbill":2863440,"approval":50,"support":0.286344},{"time_hours":198,"approval_perbill":500000000,"support_perbill":2828680,"approval":50,"support":0.282868},{"time_hours":199,"approval_perbill":500000000,"support_perbill":2794264,"approval":50,"support":0.2794264},{"time_hours":200,"approval_perbill":500000000,"support_perbill":2760188,"approval":50,"support":0.2760188},{"time_hours":201,"approval_perbill":500000000,"support_perbill":2726446,"approval":50,"support":0.2726446},{"time_hours":202,"approval_perbill":500000000,"support_perbill":2693034,"approval":50,"support":0.2693034},{"time_hours":203,"approval_perbill":500000000,"support_perbill":2659946,"approval":50,"support":0.2659946},{"time_hours":204,"approval_perbill":500000000,"support_perbill":2627179,"approval":50,"support":0.2627179},{"time_hours":205,"approval_perbill":500000000,"support_perbill":2594727,"approval":50,"support":0.2594727},{"time_hours":206,"approval_perbill":500000000,"support_perbill":2562586,"approval":50,"support":0.2562586},{"time_hours":207,"approval_perbill":500000000,"support_perbill":2530751,"approval":50,"support":0.2530751},{"time_hours":208,"approval_perbill":500000000,"support_perbill":2499219,"approval":50,"support":0.2499219},{"time_hours":209,"approval_perbill":500000000,"support_perbill":2467984,"approval":50,"support":0.2467984},{"time_hours":210,"approval_perbill":500000000,"support_perbill":2437043,"approval":50,"support":0.2437043},{"time_hours":211,"approval_perbill":500000000,"support_perbill":2406391,"approval":50,"support":0.2406391},{"time_hours":212,"approval_perbill":500000000,"support_perbill":2376025,"approval":50,"support":0.2376025},{"time_hours":213,"approval_perbill":500000000,"support_perbill":2345940,"approval":50,"support":0.234594},{"time_hours":214,"approval_perbill":500000000,"support_perbill":2316133,"approval":50,"support":0.2316133},{"time_hours":215,"approval_perbill":500000000,"support_perbill":2286599,"approval":50,"support":0.2286599},{"time_hours":216,"approval_perbill":500000000,"support_perbill":2257336,"approval":50,"support":0.2257336},{"time_hours":217,"approval_perbill":500000000,"support_perbill":2228339,"approval":50,"support":0.2228339},{"time_hours":218,"approval_perbill":500000000,"support_perbill":2199604,"approval":50,"support":0.2199604},{"time_hours":219,"approval_perbill":500000000,"support_perbill":2171129,"approval":50,"support":0.2171129},{"time_hours":220,"approval_perbill":500000000,"support_perbill":2142909,"approval":50,"support":0.2142909},{"time_hours":221,"approval_perbill":500000000,"support_perbill":2114942,"approval":50,"support":0.2114942},{"time_hours":222,"approval_perbill":500000000,"support_perbill":2087224,"approval":50,"support":0.2087224},{"time_hours":223,"approval_perbill":500000000,"support_perbill":2059751,"approval":50,"support":0.2059751},{"time_hours":224,"approval_perbill":500000000,"support_perbill":2032520,"approval":50,"support":0.203252},{"time_hours":225,"approval_perbill":500000000,"support_perbill":2005528,"approval":50,"support":0.2005528},{"time_hours":226,"approval_perbill":500000000,"support_perbill":1978773,"approval":50,"support":0.1978773},{"time_hours":227,"approval_perbill":500000000,"support_perbill":1952250,"approval":50,"support":0.195225},{"time_hours":228,"approval_perbill":500000000,"support_perbill":1925957,"approval":50,"support":0.1925957},{"time_hours":229,"approval_perbill":500000000,"support_perbill":1899891,"approval":50,"support":0.1899891},{"time_hours":230,"approval_perbill":500000000,"support_perbill":1874049,"approval":50,"support":0.1874049},{"time_hours":231,"approval_perbill":500000000,"support_perbill":1848428,"approval":50,"support":0.1848428},{"time_hours":232,"approval_perbill":500000000,"support_perbill":1823026,"approval":50,"support":0.1823026},{"time_hours":233,"approval_perbill":500000000,"support_perbill":1797839,"approval":50,"support":0.1797839},{"time_hours":234,"approval_perbill":500000000,"support_perbill":1772864,"approval":50,"support":0.1772864},{"time_hours":235,"approval_perbill":500000000,"support_perbill":1748100,"approval":50,"support":0.17481},{"time_hours":236,"approval_perbill":500000000,"support_perbill":1723543,"approval":50,"support":0.1723543},{"time_hours":237,"approval_perbill":500000000,"support_perbill":1699191,"approval":50,"support":0.1699191},{"time_hours":238,"approval_perbill":500000000,"support_perbill":1675041,"approval":50,"support":0.1675041},{"time_hours":239,"approval_perbill":500000000,"support_perbill":1651091,"approval":50,"support":0.1651091},{"time_hours":240,"approval_perbill":500000000,"support_perbill":1627339,"approval":50,"support":0.1627339},{"time_hours":241,"approval_perbill":500000000,"support_perbill":1603781,"approval":50,"support":0.1603781},{"time_hours":242,"approval_perbill":500000000,"support_perbill":1580416,"approval":50,"support":0.1580416},{"time_hours":243,"approval_perbill":500000000,"support_perbill":1557241,"approval":50,"support":0.1557241},{"time_hours":244,"approval_perbill":500000000,"support_perbill":1534253,"approval":50,"support":0.1534253},{"time_hours":245,"approval_perbill":500000000,"support_perbill":1511452,"approval":50,"support":0.1511452},{"time_hours":246,"approval_perbill":500000000,"support_perbill":1488833,"approval":50,"support":0.1488833},{"time_hours":247,"approval_perbill":500000000,"support_perbill":1466396,"approval":50,"support":0.1466396},{"time_hours":248,"approval_perbill":500000000,"support_perbill":1444138,"approval":50,"support":0.1444138},{"time_hours":249,"approval_perbill":500000000,"support_perbill":1422056,"approval":50,"support":0.1422056},{"time_hours":250,"approval_perbill":500000000,"support_perbill":1400149,"approval":50,"support":0.1400149},{"time_hours":251,"approval_perbill":500000000,"support_perbill":1378415,"approval":50,"support":0.1378415},{"time_hours":252,"approval_perbill":500000000,"support_perbill":1356852,"approval":50,"support":0.1356852},{"time_hours":253,"approval_perbill":500000000,"support_perbill":1335457,"approval":50,"support":0.1335457},{"time_hours":254,"approval_perbill":500000000,"support_perbill":1314228,"approval":50,"support":0.1314228},{"time_hours":255,"approval_perbill":500000000,"support_perbill":1293165,"approval":50,"support":0.1293165},{"time_hours":256,"approval_perbill":500000000,"support_perbill":1272264,"approval":50,"support":0.1272264},{"time_hours":257,"approval_perbill":500000000,"support_perbill":1251524,"approval":50,"support":0.1251524},{"time_hours":258,"approval_perbill":500000000,"support_perbill":1230944,"approval":50,"support":0.1230944},{"time_hours":259,"approval_perbill":500000000,"support_perbill":1210520,"approval":50,"support":0.121052},{"time_hours":260,"approval_perbill":500000000,"support_perbill":1190252,"approval":50,"support":0.1190252},{"time_hours":261,"approval_perbill":500000000,"support_perbill":1170138,"approval":50,"support":0.1170138},{"time_hours":262,"approval_perbill":500000000,"support_perbill":1150175,"approval":50,"support":0.1150175},{"time_hours":263,"approval_perbill":500000000,"support_perbill":1130363,"approval":50,"support":0.1130363},{"time_hours":264,"approval_perbill":500000000,"support_perbill":1110699,"approval":50,"support":0.1110699},{"time_hours":265,"approval_perbill":500000000,"support_perbill":1091182,"approval":50,"support":0.1091182},{"time_hours":266,"approval_perbill":500000000,"support_perbill":1071811,"approval":50,"support":0.1071811},{"time_hours":267,"approval_perbill":500000000,"support_perbill":1052583,"approval":50,"support":0.1052583},{"time_hours":268,"approval_perbill":500000000,"support_perbill":1033497,"approval":50,"support":0.1033497},{"time_hours":269,"approval_perbill":500000000,"support_perbill":1014551,"approval":50,"support":0.1014551},{"time_hours":270,"approval_perbill":500000000,"support_perbill":995745,"approval":50,"support":0.0995745},{"time_hours":271,"approval_perbill":500000000,"support_perbill":977076,"approval":50,"support":0.0977076},{"time_hours":272,"approval_perbill":500000000,"support_perbill":958542,"approval":50,"support":0.0958542},{"time_hours":273,"approval_perbill":500000000,"support_perbill":940144,"approval":50,"support":0.0940144},{"time_hours":274,"approval_perbill":500000000,"support_perbill":921878,"approval":50,"support":0.0921878},{"time_hours":275,"approval_perbill":500000000,"support_perbill":903743,"approval":50,"support":0.0903743},{"time_hours":276,"approval_perbill":500000000,"support_perbill":885739,"approval":50,"support":0.0885739},{"time_hours":277,"approval_perbill":500000000,"support_perbill":867863,"approval":50,"support":0.0867863},{"time_hours":278,"approval_perbill":500000000,"support_perbill":850115,"approval":50,"support":0.0850115},{"time_hours":279,"approval_perbill":500000000,"support_perbill":832493,"approval":50,"support":0.0832493},{"time_hours":280,"approval_perbill":500000000,"support_perbill":814995,"approval":50,"support":0.0814995},{"time_hours":281,"approval_perbill":500000000,"support_perbill":797621,"approval":50,"support":0.0797621},{"time_hours":282,"approval_perbill":500000000,"support_perbill":780369,"approval":50,"support":0.0780369},{"time_hours":283,"approval_perbill":500000000,"support_perbill":763237,"approval":50,"support":0.0763237},{"time_hours":284,"approval_perbill":500000000,"support_perbill":746225,"approval":50,"support":0.0746225},{"time_hours":285,"approval_perbill":500000000,"support_perbill":729331,"approval":50,"support":0.0729331},{"time_hours":286,"approval_perbill":500000000,"support_perbill":712555,"approval":50,"support":0.0712555},{"time_hours":287,"approval_perbill":500000000,"support_perbill":695894,"approval":50,"support":0.0695894},{"time_hours":288,"approval_perbill":500000000,"support_perbill":679347,"approval":50,"support":0.0679347},{"time_hours":289,"approval_perbill":500000000,"support_perbill":662914,"approval":50,"support":0.0662914},{"time_hours":290,"approval_perbill":500000000,"support_perbill":646594,"approval":50,"support":0.0646594},{"time_hours":291,"approval_perbill":500000000,"support_perbill":630384,"approval":50,"support":0.0630384},{"time_hours":292,"approval_perbill":500000000,"support_perbill":614284,"approval":50,"support":0.0614284},{"time_hours":293,"approval_perbill":500000000,"support_perbill":598294,"approval":50,"support":0.0598294},{"time_hours":294,"approval_perbill":500000000,"support_perbill":582411,"approval":50,"support":0.0582411},{"time_hours":295,"approval_perbill":500000000,"support_perbill":566634,"approval":50,"support":0.0566634},{"time_hours":296,"approval_perbill":500000000,"support_perbill":550964,"approval":50,"support":0.0550964},{"time_hours":297,"approval_perbill":500000000,"support_perbill":535397,"approval":50,"support":0.0535397},{"time_hours":298,"approval_perbill":500000000,"support_perbill":519935,"approval":50,"support":0.0519935},{"time_hours":299,"approval_perbill":500000000,"support_perbill":504575,"approval":50,"support":0.0504575},{"time_hours":300,"approval_perbill":500000000,"support_perbill":489316,"approval":50,"support":0.0489316},{"time_hours":301,"approval_perbill":500000000,"support_perbill":474158,"approval":50,"support":0.0474158},{"time_hours":302,"approval_perbill":500000000,"support_perbill":459099,"approval":50,"support":0.0459099},{"time_hours":303,"approval_perbill":500000000,"support_perbill":444139,"approval":50,"support":0.0444139},{"time_hours":304,"approval_perbill":500000000,"support_perbill":429276,"approval":50,"support":0.0429276},{"time_hours":305,"approval_perbill":500000000,"support_perbill":414510,"approval":50,"support":0.041451},{"time_hours":306,"approval_perbill":500000000,"support_perbill":399839,"approval":50,"support":0.0399839},{"time_hours":307,"approval_perbill":500000000,"support_perbill":385264,"approval":50,"support":0.0385264},{"time_hours":308,"approval_perbill":500000000,"support_perbill":370782,"approval":50,"support":0.0370782},{"time_hours":309,"approval_perbill":500000000,"support_perbill":356393,"approval":50,"support":0.0356393},{"time_hours":310,"approval_perbill":500000000,"support_perbill":342096,"approval":50,"support":0.0342096},{"time_hours":311,"approval_perbill":500000000,"support_perbill":327890,"approval":50,"support":0.032789},{"time_hours":312,"approval_perbill":500000000,"support_perbill":313774,"approval":50,"support":0.0313774},{"time_hours":313,"approval_perbill":500000000,"support_perbill":299748,"approval":50,"support":0.0299748},{"time_hours":314,"approval_perbill":500000000,"support_perbill":285810,"approval":50,"support":0.028581},{"time_hours":315,"approval_perbill":500000000,"support_perbill":271960,"approval":50,"support":0.027196},{"time_hours":316,"approval_perbill":500000000,"support_perbill":258197,"approval":50,"support":0.0258197},{"time_hours":317,"approval_perbill":500000000,"support_perbill":244520,"approval":50,"support":0.024452},{"time_hours":318,"approval_perbill":500000000,"support_perbill":230928,"approval":50,"support":0.0230928},{"time_hours":319,"approval_perbill":500000000,"support_perbill":217421,"approval":50,"support":0.0217421},{"time_hours":320,"approval_perbill":500000000,"support_perbill":203998,"approval":50,"support":0.0203998},{"time_hours":321,"approval_perbill":500000000,"support_perbill":190657,"approval":50,"support":0.0190657},{"time_hours":322,"approval_perbill":500000000,"support_perbill":177399,"approval":50,"support":0.0177399},{"time_hours":323,"approval_perbill":500000000,"support_perbill":164222,"approval":50,"support":0.0164222},{"time_hours":324,"approval_perbill":500000000,"support_perbill":151125,"approval":50,"support":0.0151125},{"time_hours":325,"approval_perbill":500000000,"support_perbill":138109,"approval":50,"support":0.0138109},{"time_hours":326,"approval_perbill":500000000,"support_perbill":125171,"approval":50,"support":0.0125171},{"time_hours":327,"approval_perbill":500000000,"support_perbill":112313,"approval":50,"support":0.0112313},{"time_hours":328,"approval_perbill":500000000,"support_perbill":99532,"approval":50,"support":0.0099532},{"time_hours":329,"approval_perbill":500000000,"support_perbill":86827,"approval":50,"support":0.0086827},{"time_hours":330,"approval_perbill":500000000,"support_perbill":74200,"approval":50,"support":0.00742},{"time_hours":331,"approval_perbill":500000000,"support_perbill":61648,"approval":50,"support":0.0061648},{"time_hours":332,"approval_perbill":500000000,"support_perbill":49171,"approval":50,"support":0.0049171},{"time_hours":333,"approval_perbill":500000000,"support_perbill":36768,"approval":50,"support":0.0036768},{"time_hours":334,"approval_perbill":500000000,"support_perbill":24439,"approval":50,"support":0.0024439},{"time_hours":335,"approval_perbill":500000000,"support_perbill":12183,"approval":50,"support":0.0012183},{"time_hours":336,"approval_perbill":500000000,"support_perbill":0,"approval":50,"support":0}]')},17802:p=>{"use strict";p.exports=JSON.parse('[{"time_hours":0,"approval_perbill":1000000000,"support_perbill":500000008,"approval":100,"support":50.0000008},{"time_hours":1,"approval_perbill":998188407,"support_perbill":450571639,"approval":99.8188407,"support":45.0571639},{"time_hours":2,"approval_perbill":996376813,"support_perbill":409815977,"approval":99.6376813,"support":40.9815977},{"time_hours":3,"approval_perbill":994565218,"support_perbill":375634538,"approval":99.4565218,"support":37.5634538},{"time_hours":4,"approval_perbill":992753624,"support_perbill":346555348,"approval":99.2753624,"support":34.6555348},{"time_hours":5,"approval_perbill":990942030,"support_perbill":321515318,"approval":99.094203,"support":32.1515318},{"time_hours":6,"approval_perbill":989130436,"support_perbill":299727543,"approval":98.9130436,"support":29.9727543},{"time_hours":7,"approval_perbill":987318841,"support_perbill":280597034,"approval":98.7318841,"support":28.0597034},{"time_hours":8,"approval_perbill":985507247,"support_perbill":263665616,"approval":98.5507247,"support":26.3665616},{"time_hours":9,"approval_perbill":983695653,"support_perbill":248574704,"approval":98.3695653,"support":24.8574704},{"time_hours":10,"approval_perbill":981884059,"support_perbill":235039674,"approval":98.1884059,"support":23.5039674},{"time_hours":11,"approval_perbill":980072464,"support_perbill":222831693,"approval":98.0072464,"support":22.2831693},{"time_hours":12,"approval_perbill":978260870,"support_perbill":211764724,"approval":97.826087,"support":21.1764724},{"time_hours":13,"approval_perbill":976449276,"support_perbill":201685935,"approval":97.6449276,"support":20.1685935},{"time_hours":14,"approval_perbill":974637682,"support_perbill":192468636,"approval":97.4637682,"support":19.2468636},{"time_hours":15,"approval_perbill":972826088,"support_perbill":184006894,"approval":97.2826088,"support":18.4006894},{"time_hours":16,"approval_perbill":971014494,"support_perbill":176211470,"approval":97.1014494,"support":17.621147},{"time_hours":17,"approval_perbill":969202899,"support_perbill":169006637,"approval":96.9202899,"support":16.9006637},{"time_hours":18,"approval_perbill":967391305,"support_perbill":162327733,"approval":96.7391305,"support":16.2327733},{"time_hours":19,"approval_perbill":965579711,"support_perbill":156119196,"approval":96.5579711,"support":15.6119196},{"time_hours":20,"approval_perbill":963768117,"support_perbill":150333030,"approval":96.3768117,"support":15.033303},{"time_hours":21,"approval_perbill":961956522,"support_perbill":144927549,"approval":96.1956522,"support":14.4927549},{"time_hours":22,"approval_perbill":960144928,"support_perbill":139866383,"approval":96.0144928,"support":13.9866383},{"time_hours":23,"approval_perbill":958333334,"support_perbill":135117648,"approval":95.8333334,"support":13.5117648},{"time_hours":24,"approval_perbill":956521740,"support_perbill":130653279,"approval":95.652174,"support":13.0653279},{"time_hours":25,"approval_perbill":954710146,"support_perbill":126448478,"approval":95.4710146,"support":12.6448478},{"time_hours":26,"approval_perbill":952898551,"support_perbill":122481244,"approval":95.2898551,"support":12.2481244},{"time_hours":27,"approval_perbill":951086958,"support_perbill":118732000,"approval":95.1086958,"support":11.8732},{"time_hours":28,"approval_perbill":949275363,"support_perbill":115183257,"approval":94.9275363,"support":11.5183257},{"time_hours":29,"approval_perbill":947463769,"support_perbill":111819352,"approval":94.7463769,"support":11.1819352},{"time_hours":30,"approval_perbill":945652175,"support_perbill":108626208,"approval":94.5652175,"support":10.8626208},{"time_hours":31,"approval_perbill":943840581,"support_perbill":105591148,"approval":94.3840581,"support":10.5591148},{"time_hours":32,"approval_perbill":942028986,"support_perbill":102702712,"approval":94.2028986,"support":10.2702712},{"time_hours":33,"approval_perbill":940217392,"support_perbill":99950530,"approval":94.0217392,"support":9.995053},{"time_hours":34,"approval_perbill":938405798,"support_perbill":97325178,"approval":93.8405798,"support":9.7325178},{"time_hours":35,"approval_perbill":936594204,"support_perbill":94818091,"approval":93.6594204,"support":9.4818091},{"time_hours":36,"approval_perbill":934782609,"support_perbill":92421451,"approval":93.4782609,"support":9.2421451},{"time_hours":37,"approval_perbill":932971015,"support_perbill":90128118,"approval":93.2971015,"support":9.0128118},{"time_hours":38,"approval_perbill":931159421,"support_perbill":87931552,"approval":93.1159421,"support":8.7931552},{"time_hours":39,"approval_perbill":929347827,"support_perbill":85825756,"approval":92.9347827,"support":8.5825756},{"time_hours":40,"approval_perbill":927536232,"support_perbill":83805218,"approval":92.7536232,"support":8.3805218},{"time_hours":41,"approval_perbill":925724638,"support_perbill":81864862,"approval":92.5724638,"support":8.1864862},{"time_hours":42,"approval_perbill":923913044,"support_perbill":80000008,"approval":92.3913044,"support":8.0000008},{"time_hours":43,"approval_perbill":922101450,"support_perbill":78206334,"approval":92.210145,"support":7.8206334},{"time_hours":44,"approval_perbill":920289856,"support_perbill":76479840,"approval":92.0289856,"support":7.647984},{"time_hours":45,"approval_perbill":918478262,"support_perbill":74816822,"approval":91.8478262,"support":7.4816822},{"time_hours":46,"approval_perbill":916666668,"support_perbill":73213842,"approval":91.6666668,"support":7.3213842},{"time_hours":47,"approval_perbill":914855073,"support_perbill":71667707,"approval":91.4855073,"support":7.1667707},{"time_hours":48,"approval_perbill":913043479,"support_perbill":70175446,"approval":91.3043479,"support":7.0175446},{"time_hours":49,"approval_perbill":911231885,"support_perbill":68734290,"approval":91.1231885,"support":6.873429},{"time_hours":50,"approval_perbill":909420291,"support_perbill":67341660,"approval":90.9420291,"support":6.734166},{"time_hours":51,"approval_perbill":907608696,"support_perbill":65995144,"approval":90.7608696,"support":6.5995144},{"time_hours":52,"approval_perbill":905797102,"support_perbill":64692489,"approval":90.5797102,"support":6.4692489},{"time_hours":53,"approval_perbill":903985508,"support_perbill":63431588,"approval":90.3985508,"support":6.3431588},{"time_hours":54,"approval_perbill":902173914,"support_perbill":62210463,"approval":90.2173914,"support":6.2210463},{"time_hours":55,"approval_perbill":900362319,"support_perbill":61027262,"approval":90.0362319,"support":6.1027262},{"time_hours":56,"approval_perbill":898550725,"support_perbill":59880246,"approval":89.8550725,"support":5.9880246},{"time_hours":57,"approval_perbill":896739131,"support_perbill":58767778,"approval":89.6739131,"support":5.8767778},{"time_hours":58,"approval_perbill":894927537,"support_perbill":57688323,"approval":89.4927537,"support":5.7688323},{"time_hours":59,"approval_perbill":893115943,"support_perbill":56640431,"approval":89.3115943,"support":5.6640431},{"time_hours":60,"approval_perbill":891304349,"support_perbill":55622738,"approval":89.1304349,"support":5.5622738},{"time_hours":61,"approval_perbill":889492754,"support_perbill":54633958,"approval":88.9492754,"support":5.4633958},{"time_hours":62,"approval_perbill":887681160,"support_perbill":53672875,"approval":88.768116,"support":5.3672875},{"time_hours":63,"approval_perbill":885869566,"support_perbill":52738342,"approval":88.5869566,"support":5.2738342},{"time_hours":64,"approval_perbill":884057972,"support_perbill":51829273,"approval":88.4057972,"support":5.1829273},{"time_hours":65,"approval_perbill":882246378,"support_perbill":50944643,"approval":88.2246378,"support":5.0944643},{"time_hours":66,"approval_perbill":880434783,"support_perbill":50083477,"approval":88.0434783,"support":5.0083477},{"time_hours":67,"approval_perbill":878623189,"support_perbill":49244856,"approval":87.8623189,"support":4.9244856},{"time_hours":68,"approval_perbill":876811595,"support_perbill":48427905,"approval":87.6811595,"support":4.8427905},{"time_hours":69,"approval_perbill":875000001,"support_perbill":47631795,"approval":87.5000001,"support":4.7631795},{"time_hours":70,"approval_perbill":873188406,"support_perbill":46855738,"approval":87.3188406,"support":4.6855738},{"time_hours":71,"approval_perbill":871376813,"support_perbill":46098987,"approval":87.1376813,"support":4.6098987},{"time_hours":72,"approval_perbill":869565218,"support_perbill":45360829,"approval":86.9565218,"support":4.5360829},{"time_hours":73,"approval_perbill":867753624,"support_perbill":44640588,"approval":86.7753624,"support":4.4640588},{"time_hours":74,"approval_perbill":865942030,"support_perbill":43937620,"approval":86.594203,"support":4.393762},{"time_hours":75,"approval_perbill":864130436,"support_perbill":43251309,"approval":86.4130436,"support":4.3251309},{"time_hours":76,"approval_perbill":862318841,"support_perbill":42581072,"approval":86.2318841,"support":4.2581072},{"time_hours":77,"approval_perbill":860507247,"support_perbill":41926350,"approval":86.0507247,"support":4.192635},{"time_hours":78,"approval_perbill":858695653,"support_perbill":41286610,"approval":85.8695653,"support":4.128661},{"time_hours":79,"approval_perbill":856884059,"support_perbill":40661344,"approval":85.6884059,"support":4.0661344},{"time_hours":80,"approval_perbill":855072464,"support_perbill":40050066,"approval":85.5072464,"support":4.0050066},{"time_hours":81,"approval_perbill":853260870,"support_perbill":39452313,"approval":85.326087,"support":3.9452313},{"time_hours":82,"approval_perbill":851449276,"support_perbill":38867639,"approval":85.1449276,"support":3.8867639},{"time_hours":83,"approval_perbill":849637682,"support_perbill":38295622,"approval":84.9637682,"support":3.8295622},{"time_hours":84,"approval_perbill":847826087,"support_perbill":37735853,"approval":84.7826087,"support":3.7735853},{"time_hours":85,"approval_perbill":846014493,"support_perbill":37187943,"approval":84.6014493,"support":3.7187943},{"time_hours":86,"approval_perbill":844202900,"support_perbill":36651521,"approval":84.42029,"support":3.6651521},{"time_hours":87,"approval_perbill":842391305,"support_perbill":36126228,"approval":84.2391305,"support":3.6126228},{"time_hours":88,"approval_perbill":840579711,"support_perbill":35611721,"approval":84.0579711,"support":3.5611721},{"time_hours":89,"approval_perbill":838768117,"support_perbill":35107672,"approval":83.8768117,"support":3.5107672},{"time_hours":90,"approval_perbill":836956523,"support_perbill":34613764,"approval":83.6956523,"support":3.4613764},{"time_hours":91,"approval_perbill":835144928,"support_perbill":34129696,"approval":83.5144928,"support":3.4129696},{"time_hours":92,"approval_perbill":833333334,"support_perbill":33655176,"approval":83.3333334,"support":3.3655176},{"time_hours":93,"approval_perbill":831521740,"support_perbill":33189923,"approval":83.152174,"support":3.3189923},{"time_hours":94,"approval_perbill":829710146,"support_perbill":32733670,"approval":82.9710146,"support":3.273367},{"time_hours":95,"approval_perbill":827898551,"support_perbill":32286157,"approval":82.7898551,"support":3.2286157},{"time_hours":96,"approval_perbill":826086957,"support_perbill":31847137,"approval":82.6086957,"support":3.1847137},{"time_hours":97,"approval_perbill":824275363,"support_perbill":31416368,"approval":82.4275363,"support":3.1416368},{"time_hours":98,"approval_perbill":822463769,"support_perbill":30993622,"approval":82.2463769,"support":3.0993622},{"time_hours":99,"approval_perbill":820652174,"support_perbill":30578675,"approval":82.0652174,"support":3.0578675},{"time_hours":100,"approval_perbill":818840580,"support_perbill":30171314,"approval":81.884058,"support":3.0171314},{"time_hours":101,"approval_perbill":817028986,"support_perbill":29771334,"approval":81.7028986,"support":2.9771334},{"time_hours":102,"approval_perbill":815217392,"support_perbill":29378534,"approval":81.5217392,"support":2.9378534},{"time_hours":103,"approval_perbill":813405798,"support_perbill":28992723,"approval":81.3405798,"support":2.8992723},{"time_hours":104,"approval_perbill":811594204,"support_perbill":28613717,"approval":81.1594204,"support":2.8613717},{"time_hours":105,"approval_perbill":809782609,"support_perbill":28241338,"approval":80.9782609,"support":2.8241338},{"time_hours":106,"approval_perbill":807971015,"support_perbill":27875412,"approval":80.7971015,"support":2.7875412},{"time_hours":107,"approval_perbill":806159421,"support_perbill":27515773,"approval":80.6159421,"support":2.7515773},{"time_hours":108,"approval_perbill":804347827,"support_perbill":27162261,"approval":80.4347827,"support":2.7162261},{"time_hours":109,"approval_perbill":802536233,"support_perbill":26814721,"approval":80.2536233,"support":2.6814721},{"time_hours":110,"approval_perbill":800724638,"support_perbill":26473002,"approval":80.0724638,"support":2.6473002},{"time_hours":111,"approval_perbill":798913044,"support_perbill":26136960,"approval":79.8913044,"support":2.613696},{"time_hours":112,"approval_perbill":797101450,"support_perbill":25806454,"approval":79.710145,"support":2.5806454},{"time_hours":113,"approval_perbill":795289856,"support_perbill":25481348,"approval":79.5289856,"support":2.5481348},{"time_hours":114,"approval_perbill":793478261,"support_perbill":25161512,"approval":79.3478261,"support":2.5161512},{"time_hours":115,"approval_perbill":791666668,"support_perbill":24846818,"approval":79.1666668,"support":2.4846818},{"time_hours":116,"approval_perbill":789855073,"support_perbill":24537142,"approval":78.9855073,"support":2.4537142},{"time_hours":117,"approval_perbill":788043479,"support_perbill":24232367,"approval":78.8043479,"support":2.4232367},{"time_hours":118,"approval_perbill":786231885,"support_perbill":23932377,"approval":78.6231885,"support":2.3932377},{"time_hours":119,"approval_perbill":784420291,"support_perbill":23637059,"approval":78.4420291,"support":2.3637059},{"time_hours":120,"approval_perbill":782608696,"support_perbill":23346305,"approval":78.2608696,"support":2.3346305},{"time_hours":121,"approval_perbill":780797102,"support_perbill":23060012,"approval":78.0797102,"support":2.3060012},{"time_hours":122,"approval_perbill":778985508,"support_perbill":22778075,"approval":77.8985508,"support":2.2778075},{"time_hours":123,"approval_perbill":777173914,"support_perbill":22500398,"approval":77.7173914,"support":2.2500398},{"time_hours":124,"approval_perbill":775362319,"support_perbill":22226884,"approval":77.5362319,"support":2.2226884},{"time_hours":125,"approval_perbill":773550725,"support_perbill":21957440,"approval":77.3550725,"support":2.195744},{"time_hours":126,"approval_perbill":771739131,"support_perbill":21691976,"approval":77.1739131,"support":2.1691976},{"time_hours":127,"approval_perbill":769927537,"support_perbill":21430404,"approval":76.9927537,"support":2.1430404},{"time_hours":128,"approval_perbill":768115943,"support_perbill":21172640,"approval":76.8115943,"support":2.117264},{"time_hours":129,"approval_perbill":766304348,"support_perbill":20918601,"approval":76.6304348,"support":2.0918601},{"time_hours":130,"approval_perbill":764492755,"support_perbill":20668207,"approval":76.4492755,"support":2.0668207},{"time_hours":131,"approval_perbill":762681160,"support_perbill":20421379,"approval":76.268116,"support":2.0421379},{"time_hours":132,"approval_perbill":760869566,"support_perbill":20178043,"approval":76.0869566,"support":2.0178043},{"time_hours":133,"approval_perbill":759057972,"support_perbill":19938125,"approval":75.9057972,"support":1.9938125},{"time_hours":134,"approval_perbill":757246378,"support_perbill":19701552,"approval":75.7246378,"support":1.9701552},{"time_hours":135,"approval_perbill":755434783,"support_perbill":19468257,"approval":75.5434783,"support":1.9468257},{"time_hours":136,"approval_perbill":753623189,"support_perbill":19238170,"approval":75.3623189,"support":1.923817},{"time_hours":137,"approval_perbill":751811595,"support_perbill":19011227,"approval":75.1811595,"support":1.9011227},{"time_hours":138,"approval_perbill":750000001,"support_perbill":18787363,"approval":75.0000001,"support":1.8787363},{"time_hours":139,"approval_perbill":748188406,"support_perbill":18566516,"approval":74.8188406,"support":1.8566516},{"time_hours":140,"approval_perbill":746376812,"support_perbill":18348625,"approval":74.6376812,"support":1.8348625},{"time_hours":141,"approval_perbill":744565218,"support_perbill":18133632,"approval":74.4565218,"support":1.8133632},{"time_hours":142,"approval_perbill":742753624,"support_perbill":17921479,"approval":74.2753624,"support":1.7921479},{"time_hours":143,"approval_perbill":740942029,"support_perbill":17712111,"approval":74.0942029,"support":1.7712111},{"time_hours":144,"approval_perbill":739130435,"support_perbill":17505472,"approval":73.9130435,"support":1.7505472},{"time_hours":145,"approval_perbill":737318841,"support_perbill":17301510,"approval":73.7318841,"support":1.730151},{"time_hours":146,"approval_perbill":735507247,"support_perbill":17100172,"approval":73.5507247,"support":1.7100172},{"time_hours":147,"approval_perbill":733695653,"support_perbill":16901410,"approval":73.3695653,"support":1.690141},{"time_hours":148,"approval_perbill":731884059,"support_perbill":16705173,"approval":73.1884059,"support":1.6705173},{"time_hours":149,"approval_perbill":730072465,"support_perbill":16511414,"approval":73.0072465,"support":1.6511414},{"time_hours":150,"approval_perbill":728260870,"support_perbill":16320085,"approval":72.826087,"support":1.6320085},{"time_hours":151,"approval_perbill":726449276,"support_perbill":16131143,"approval":72.6449276,"support":1.6131143},{"time_hours":152,"approval_perbill":724637682,"support_perbill":15944542,"approval":72.4637682,"support":1.5944542},{"time_hours":153,"approval_perbill":722826088,"support_perbill":15760239,"approval":72.2826088,"support":1.5760239},{"time_hours":154,"approval_perbill":721014493,"support_perbill":15578192,"approval":72.1014493,"support":1.5578192},{"time_hours":155,"approval_perbill":719202899,"support_perbill":15398359,"approval":71.9202899,"support":1.5398359},{"time_hours":156,"approval_perbill":717391305,"support_perbill":15220701,"approval":71.7391305,"support":1.5220701},{"time_hours":157,"approval_perbill":715579711,"support_perbill":15045179,"approval":71.5579711,"support":1.5045179},{"time_hours":158,"approval_perbill":713768116,"support_perbill":14871753,"approval":71.3768116,"support":1.4871753},{"time_hours":159,"approval_perbill":711956523,"support_perbill":14700387,"approval":71.1956523,"support":1.4700387},{"time_hours":160,"approval_perbill":710144928,"support_perbill":14531045,"approval":71.0144928,"support":1.4531045},{"time_hours":161,"approval_perbill":708333334,"support_perbill":14363690,"approval":70.8333334,"support":1.436369},{"time_hours":162,"approval_perbill":706521740,"support_perbill":14198287,"approval":70.652174,"support":1.4198287},{"time_hours":163,"approval_perbill":704710146,"support_perbill":14034804,"approval":70.4710146,"support":1.4034804},{"time_hours":164,"approval_perbill":702898551,"support_perbill":13873206,"approval":70.2898551,"support":1.3873206},{"time_hours":165,"approval_perbill":701086957,"support_perbill":13713462,"approval":70.1086957,"support":1.3713462},{"time_hours":166,"approval_perbill":699275363,"support_perbill":13555539,"approval":69.9275363,"support":1.3555539},{"time_hours":167,"approval_perbill":697463769,"support_perbill":13399406,"approval":69.7463769,"support":1.3399406},{"time_hours":168,"approval_perbill":695652174,"support_perbill":13245034,"approval":69.5652174,"support":1.3245034},{"time_hours":169,"approval_perbill":693840580,"support_perbill":13092392,"approval":69.384058,"support":1.3092392},{"time_hours":170,"approval_perbill":692028986,"support_perbill":12941452,"approval":69.2028986,"support":1.2941452},{"time_hours":171,"approval_perbill":690217392,"support_perbill":12792186,"approval":69.0217392,"support":1.2792186},{"time_hours":172,"approval_perbill":688405798,"support_perbill":12644565,"approval":68.8405798,"support":1.2644565},{"time_hours":173,"approval_perbill":686594203,"support_perbill":12498563,"approval":68.6594203,"support":1.2498563},{"time_hours":174,"approval_perbill":684782610,"support_perbill":12354153,"approval":68.478261,"support":1.2354153},{"time_hours":175,"approval_perbill":682971015,"support_perbill":12211309,"approval":68.2971015,"support":1.2211309},{"time_hours":176,"approval_perbill":681159421,"support_perbill":12070007,"approval":68.1159421,"support":1.2070007},{"time_hours":177,"approval_perbill":679347827,"support_perbill":11930220,"approval":67.9347827,"support":1.193022},{"time_hours":178,"approval_perbill":677536233,"support_perbill":11791925,"approval":67.7536233,"support":1.1791925},{"time_hours":179,"approval_perbill":675724638,"support_perbill":11655099,"approval":67.5724638,"support":1.1655099},{"time_hours":180,"approval_perbill":673913044,"support_perbill":11519717,"approval":67.3913044,"support":1.1519717},{"time_hours":181,"approval_perbill":672101450,"support_perbill":11385757,"approval":67.210145,"support":1.1385757},{"time_hours":182,"approval_perbill":670289856,"support_perbill":11253198,"approval":67.0289856,"support":1.1253198},{"time_hours":183,"approval_perbill":668478261,"support_perbill":11122016,"approval":66.8478261,"support":1.1122016},{"time_hours":184,"approval_perbill":666666667,"support_perbill":10992190,"approval":66.6666667,"support":1.099219},{"time_hours":185,"approval_perbill":664855073,"support_perbill":10863701,"approval":66.4855073,"support":1.0863701},{"time_hours":186,"approval_perbill":663043479,"support_perbill":10736526,"approval":66.3043479,"support":1.0736526},{"time_hours":187,"approval_perbill":661231884,"support_perbill":10610647,"approval":66.1231884,"support":1.0610647},{"time_hours":188,"approval_perbill":659420290,"support_perbill":10486043,"approval":65.942029,"support":1.0486043},{"time_hours":189,"approval_perbill":657608696,"support_perbill":10362695,"approval":65.7608696,"support":1.0362695},{"time_hours":190,"approval_perbill":655797102,"support_perbill":10240584,"approval":65.5797102,"support":1.0240584},{"time_hours":191,"approval_perbill":653985508,"support_perbill":10119692,"approval":65.3985508,"support":1.0119692},{"time_hours":192,"approval_perbill":652173914,"support_perbill":10000000,"approval":65.2173914,"support":1},{"time_hours":193,"approval_perbill":650362320,"support_perbill":9881492,"approval":65.036232,"support":0.9881492},{"time_hours":194,"approval_perbill":648550725,"support_perbill":9764148,"approval":64.8550725,"support":0.9764148},{"time_hours":195,"approval_perbill":646739131,"support_perbill":9647953,"approval":64.6739131,"support":0.9647953},{"time_hours":196,"approval_perbill":644927537,"support_perbill":9532889,"approval":64.4927537,"support":0.9532889},{"time_hours":197,"approval_perbill":643115943,"support_perbill":9418940,"approval":64.3115943,"support":0.941894},{"time_hours":198,"approval_perbill":641304348,"support_perbill":9306090,"approval":64.1304348,"support":0.930609},{"time_hours":199,"approval_perbill":639492754,"support_perbill":9194323,"approval":63.9492754,"support":0.9194323},{"time_hours":200,"approval_perbill":637681160,"support_perbill":9083623,"approval":63.768116,"support":0.9083623},{"time_hours":201,"approval_perbill":635869566,"support_perbill":8973976,"approval":63.5869566,"support":0.8973976},{"time_hours":202,"approval_perbill":634057971,"support_perbill":8865366,"approval":63.4057971,"support":0.8865366},{"time_hours":203,"approval_perbill":632246378,"support_perbill":8757779,"approval":63.2246378,"support":0.8757779},{"time_hours":204,"approval_perbill":630434783,"support_perbill":8651200,"approval":63.0434783,"support":0.86512},{"time_hours":205,"approval_perbill":628623189,"support_perbill":8545615,"approval":62.8623189,"support":0.8545615},{"time_hours":206,"approval_perbill":626811595,"support_perbill":8441011,"approval":62.6811595,"support":0.8441011},{"time_hours":207,"approval_perbill":625000001,"support_perbill":8337373,"approval":62.5000001,"support":0.8337373},{"time_hours":208,"approval_perbill":623188406,"support_perbill":8234689,"approval":62.3188406,"support":0.8234689},{"time_hours":209,"approval_perbill":621376812,"support_perbill":8132945,"approval":62.1376812,"support":0.8132945},{"time_hours":210,"approval_perbill":619565218,"support_perbill":8032129,"approval":61.9565218,"support":0.8032129},{"time_hours":211,"approval_perbill":617753624,"support_perbill":7932227,"approval":61.7753624,"support":0.7932227},{"time_hours":212,"approval_perbill":615942030,"support_perbill":7833228,"approval":61.594203,"support":0.7833228},{"time_hours":213,"approval_perbill":614130435,"support_perbill":7735120,"approval":61.4130435,"support":0.773512},{"time_hours":214,"approval_perbill":612318841,"support_perbill":7637889,"approval":61.2318841,"support":0.7637889},{"time_hours":215,"approval_perbill":610507247,"support_perbill":7541525,"approval":61.0507247,"support":0.7541525},{"time_hours":216,"approval_perbill":608695653,"support_perbill":7446017,"approval":60.8695653,"support":0.7446017},{"time_hours":217,"approval_perbill":606884058,"support_perbill":7351351,"approval":60.6884058,"support":0.7351351},{"time_hours":218,"approval_perbill":605072465,"support_perbill":7257519,"approval":60.5072465,"support":0.7257519},{"time_hours":219,"approval_perbill":603260870,"support_perbill":7164508,"approval":60.326087,"support":0.7164508},{"time_hours":220,"approval_perbill":601449276,"support_perbill":7072308,"approval":60.1449276,"support":0.7072308},{"time_hours":221,"approval_perbill":599637682,"support_perbill":6980909,"approval":59.9637682,"support":0.6980909},{"time_hours":222,"approval_perbill":597826088,"support_perbill":6890299,"approval":59.7826088,"support":0.6890299},{"time_hours":223,"approval_perbill":596014493,"support_perbill":6800469,"approval":59.6014493,"support":0.6800469},{"time_hours":224,"approval_perbill":594202899,"support_perbill":6711409,"approval":59.4202899,"support":0.6711409},{"time_hours":225,"approval_perbill":592391305,"support_perbill":6623109,"approval":59.2391305,"support":0.6623109},{"time_hours":226,"approval_perbill":590579711,"support_perbill":6535559,"approval":59.0579711,"support":0.6535559},{"time_hours":227,"approval_perbill":588768116,"support_perbill":6448750,"approval":58.8768116,"support":0.644875},{"time_hours":228,"approval_perbill":586956522,"support_perbill":6362672,"approval":58.6956522,"support":0.6362672},{"time_hours":229,"approval_perbill":585144928,"support_perbill":6277317,"approval":58.5144928,"support":0.6277317},{"time_hours":230,"approval_perbill":583333334,"support_perbill":6192674,"approval":58.3333334,"support":0.6192674},{"time_hours":231,"approval_perbill":581521739,"support_perbill":6108735,"approval":58.1521739,"support":0.6108735},{"time_hours":232,"approval_perbill":579710145,"support_perbill":6025492,"approval":57.9710145,"support":0.6025492},{"time_hours":233,"approval_perbill":577898552,"support_perbill":5942936,"approval":57.7898552,"support":0.5942936},{"time_hours":234,"approval_perbill":576086957,"support_perbill":5861058,"approval":57.6086957,"support":0.5861058},{"time_hours":235,"approval_perbill":574275363,"support_perbill":5779851,"approval":57.4275363,"support":0.5779851},{"time_hours":236,"approval_perbill":572463769,"support_perbill":5699305,"approval":57.2463769,"support":0.5699305},{"time_hours":237,"approval_perbill":570652175,"support_perbill":5619412,"approval":57.0652175,"support":0.5619412},{"time_hours":238,"approval_perbill":568840580,"support_perbill":5540166,"approval":56.884058,"support":0.5540166},{"time_hours":239,"approval_perbill":567028986,"support_perbill":5461558,"approval":56.7028986,"support":0.5461558},{"time_hours":240,"approval_perbill":565217392,"support_perbill":5383580,"approval":56.5217392,"support":0.538358},{"time_hours":241,"approval_perbill":563405798,"support_perbill":5306225,"approval":56.3405798,"support":0.5306225},{"time_hours":242,"approval_perbill":561594203,"support_perbill":5229485,"approval":56.1594203,"support":0.5229485},{"time_hours":243,"approval_perbill":559782609,"support_perbill":5153354,"approval":55.9782609,"support":0.5153354},{"time_hours":244,"approval_perbill":557971015,"support_perbill":5077823,"approval":55.7971015,"support":0.5077823},{"time_hours":245,"approval_perbill":556159421,"support_perbill":5002886,"approval":55.6159421,"support":0.5002886},{"time_hours":246,"approval_perbill":554347826,"support_perbill":4928536,"approval":55.4347826,"support":0.4928536},{"time_hours":247,"approval_perbill":552536233,"support_perbill":4854766,"approval":55.2536233,"support":0.4854766},{"time_hours":248,"approval_perbill":550724638,"support_perbill":4781569,"approval":55.0724638,"support":0.4781569},{"time_hours":249,"approval_perbill":548913044,"support_perbill":4708939,"approval":54.8913044,"support":0.4708939},{"time_hours":250,"approval_perbill":547101450,"support_perbill":4636868,"approval":54.710145,"support":0.4636868},{"time_hours":251,"approval_perbill":545289856,"support_perbill":4565351,"approval":54.5289856,"support":0.4565351},{"time_hours":252,"approval_perbill":543478261,"support_perbill":4494382,"approval":54.3478261,"support":0.4494382},{"time_hours":253,"approval_perbill":541666667,"support_perbill":4423953,"approval":54.1666667,"support":0.4423953},{"time_hours":254,"approval_perbill":539855073,"support_perbill":4354059,"approval":53.9855073,"support":0.4354059},{"time_hours":255,"approval_perbill":538043479,"support_perbill":4284694,"approval":53.8043479,"support":0.4284694},{"time_hours":256,"approval_perbill":536231885,"support_perbill":4215851,"approval":53.6231885,"support":0.4215851},{"time_hours":257,"approval_perbill":534420290,"support_perbill":4147526,"approval":53.442029,"support":0.4147526},{"time_hours":258,"approval_perbill":532608696,"support_perbill":4079711,"approval":53.2608696,"support":0.4079711},{"time_hours":259,"approval_perbill":530797102,"support_perbill":4012402,"approval":53.0797102,"support":0.4012402},{"time_hours":260,"approval_perbill":528985508,"support_perbill":3945592,"approval":52.8985508,"support":0.3945592},{"time_hours":261,"approval_perbill":527173913,"support_perbill":3879277,"approval":52.7173913,"support":0.3879277},{"time_hours":262,"approval_perbill":525362320,"support_perbill":3813450,"approval":52.536232,"support":0.381345},{"time_hours":263,"approval_perbill":523550725,"support_perbill":3748106,"approval":52.3550725,"support":0.3748106},{"time_hours":264,"approval_perbill":521739131,"support_perbill":3683241,"approval":52.1739131,"support":0.3683241},{"time_hours":265,"approval_perbill":519927537,"support_perbill":3618848,"approval":51.9927537,"support":0.3618848},{"time_hours":266,"approval_perbill":518115943,"support_perbill":3554923,"approval":51.8115943,"support":0.3554923},{"time_hours":267,"approval_perbill":516304348,"support_perbill":3491461,"approval":51.6304348,"support":0.3491461},{"time_hours":268,"approval_perbill":514492754,"support_perbill":3428456,"approval":51.4492754,"support":0.3428456},{"time_hours":269,"approval_perbill":512681160,"support_perbill":3365904,"approval":51.268116,"support":0.3365904},{"time_hours":270,"approval_perbill":510869566,"support_perbill":3303799,"approval":51.0869566,"support":0.3303799},{"time_hours":271,"approval_perbill":509057971,"support_perbill":3242137,"approval":50.9057971,"support":0.3242137},{"time_hours":272,"approval_perbill":507246377,"support_perbill":3180914,"approval":50.7246377,"support":0.3180914},{"time_hours":273,"approval_perbill":505434783,"support_perbill":3120124,"approval":50.5434783,"support":0.3120124},{"time_hours":274,"approval_perbill":503623189,"support_perbill":3059764,"approval":50.3623189,"support":0.3059764},{"time_hours":275,"approval_perbill":501811595,"support_perbill":2999827,"approval":50.1811595,"support":0.2999827},{"time_hours":276,"approval_perbill":500000000,"support_perbill":2940311,"approval":50,"support":0.2940311},{"time_hours":277,"approval_perbill":500000000,"support_perbill":2881211,"approval":50,"support":0.2881211},{"time_hours":278,"approval_perbill":500000000,"support_perbill":2822521,"approval":50,"support":0.2822521},{"time_hours":279,"approval_perbill":500000000,"support_perbill":2764239,"approval":50,"support":0.2764239},{"time_hours":280,"approval_perbill":500000000,"support_perbill":2706360,"approval":50,"support":0.270636},{"time_hours":281,"approval_perbill":500000000,"support_perbill":2648879,"approval":50,"support":0.2648879},{"time_hours":282,"approval_perbill":500000000,"support_perbill":2591792,"approval":50,"support":0.2591792},{"time_hours":283,"approval_perbill":500000000,"support_perbill":2535096,"approval":50,"support":0.2535096},{"time_hours":284,"approval_perbill":500000000,"support_perbill":2478787,"approval":50,"support":0.2478787},{"time_hours":285,"approval_perbill":500000000,"support_perbill":2422860,"approval":50,"support":0.242286},{"time_hours":286,"approval_perbill":500000000,"support_perbill":2367312,"approval":50,"support":0.2367312},{"time_hours":287,"approval_perbill":500000000,"support_perbill":2312138,"approval":50,"support":0.2312138},{"time_hours":288,"approval_perbill":500000000,"support_perbill":2257336,"approval":50,"support":0.2257336},{"time_hours":289,"approval_perbill":500000000,"support_perbill":2202901,"approval":50,"support":0.2202901},{"time_hours":290,"approval_perbill":500000000,"support_perbill":2148829,"approval":50,"support":0.2148829},{"time_hours":291,"approval_perbill":500000000,"support_perbill":2095118,"approval":50,"support":0.2095118},{"time_hours":292,"approval_perbill":500000000,"support_perbill":2041763,"approval":50,"support":0.2041763},{"time_hours":293,"approval_perbill":500000000,"support_perbill":1988761,"approval":50,"support":0.1988761},{"time_hours":294,"approval_perbill":500000000,"support_perbill":1936108,"approval":50,"support":0.1936108},{"time_hours":295,"approval_perbill":500000000,"support_perbill":1883801,"approval":50,"support":0.1883801},{"time_hours":296,"approval_perbill":500000000,"support_perbill":1831837,"approval":50,"support":0.1831837},{"time_hours":297,"approval_perbill":500000000,"support_perbill":1780212,"approval":50,"support":0.1780212},{"time_hours":298,"approval_perbill":500000000,"support_perbill":1728923,"approval":50,"support":0.1728923},{"time_hours":299,"approval_perbill":500000000,"support_perbill":1677966,"approval":50,"support":0.1677966},{"time_hours":300,"approval_perbill":500000000,"support_perbill":1627339,"approval":50,"support":0.1627339},{"time_hours":301,"approval_perbill":500000000,"support_perbill":1577038,"approval":50,"support":0.1577038},{"time_hours":302,"approval_perbill":500000000,"support_perbill":1527060,"approval":50,"support":0.152706},{"time_hours":303,"approval_perbill":500000000,"support_perbill":1477402,"approval":50,"support":0.1477402},{"time_hours":304,"approval_perbill":500000000,"support_perbill":1428061,"approval":50,"support":0.1428061},{"time_hours":305,"approval_perbill":500000000,"support_perbill":1379034,"approval":50,"support":0.1379034},{"time_hours":306,"approval_perbill":500000000,"support_perbill":1330317,"approval":50,"support":0.1330317},{"time_hours":307,"approval_perbill":500000000,"support_perbill":1281909,"approval":50,"support":0.1281909},{"time_hours":308,"approval_perbill":500000000,"support_perbill":1233806,"approval":50,"support":0.1233806},{"time_hours":309,"approval_perbill":500000000,"support_perbill":1186005,"approval":50,"support":0.1186005},{"time_hours":310,"approval_perbill":500000000,"support_perbill":1138503,"approval":50,"support":0.1138503},{"time_hours":311,"approval_perbill":500000000,"support_perbill":1091297,"approval":50,"support":0.1091297},{"time_hours":312,"approval_perbill":500000000,"support_perbill":1044386,"approval":50,"support":0.1044386},{"time_hours":313,"approval_perbill":500000000,"support_perbill":997765,"approval":50,"support":0.0997765},{"time_hours":314,"approval_perbill":500000000,"support_perbill":951433,"approval":50,"support":0.0951433},{"time_hours":315,"approval_perbill":500000000,"support_perbill":905386,"approval":50,"support":0.0905386},{"time_hours":316,"approval_perbill":500000000,"support_perbill":859623,"approval":50,"support":0.0859623},{"time_hours":317,"approval_perbill":500000000,"support_perbill":814140,"approval":50,"support":0.081414},{"time_hours":318,"approval_perbill":500000000,"support_perbill":768934,"approval":50,"support":0.0768934},{"time_hours":319,"approval_perbill":500000000,"support_perbill":724004,"approval":50,"support":0.0724004},{"time_hours":320,"approval_perbill":500000000,"support_perbill":679347,"approval":50,"support":0.0679347},{"time_hours":321,"approval_perbill":500000000,"support_perbill":634960,"approval":50,"support":0.063496},{"time_hours":322,"approval_perbill":500000000,"support_perbill":590841,"approval":50,"support":0.0590841},{"time_hours":323,"approval_perbill":500000000,"support_perbill":546988,"approval":50,"support":0.0546988},{"time_hours":324,"approval_perbill":500000000,"support_perbill":503397,"approval":50,"support":0.0503397},{"time_hours":325,"approval_perbill":500000000,"support_perbill":460067,"approval":50,"support":0.0460067},{"time_hours":326,"approval_perbill":500000000,"support_perbill":416996,"approval":50,"support":0.0416996},{"time_hours":327,"approval_perbill":500000000,"support_perbill":374181,"approval":50,"support":0.0374181},{"time_hours":328,"approval_perbill":500000000,"support_perbill":331619,"approval":50,"support":0.0331619},{"time_hours":329,"approval_perbill":500000000,"support_perbill":289309,"approval":50,"support":0.0289309},{"time_hours":330,"approval_perbill":500000000,"support_perbill":247249,"approval":50,"support":0.0247249},{"time_hours":331,"approval_perbill":500000000,"support_perbill":205435,"approval":50,"support":0.0205435},{"time_hours":332,"approval_perbill":500000000,"support_perbill":163867,"approval":50,"support":0.0163867},{"time_hours":333,"approval_perbill":500000000,"support_perbill":122541,"approval":50,"support":0.0122541},{"time_hours":334,"approval_perbill":500000000,"support_perbill":81456,"approval":50,"support":0.0081456},{"time_hours":335,"approval_perbill":500000000,"support_perbill":40609,"approval":50,"support":0.0040609},{"time_hours":336,"approval_perbill":500000000,"support_perbill":0,"approval":50,"support":0}]')},95036:p=>{"use strict";p.exports=JSON.parse('[{"time_hours":0,"approval_perbill":1000000000,"support_perbill":500000026,"approval":100,"support":50.0000026},{"time_hours":1,"approval_perbill":997549020,"support_perbill":418401359,"approval":99.754902,"support":41.8401359},{"time_hours":2,"approval_perbill":995098040,"support_perbill":359397443,"approval":99.509804,"support":35.9397443},{"time_hours":3,"approval_perbill":992647060,"support_perbill":314744813,"approval":99.264706,"support":31.4744813},{"time_hours":4,"approval_perbill":990196080,"support_perbill":279775293,"approval":99.019608,"support":27.9775293},{"time_hours":5,"approval_perbill":987745099,"support_perbill":251647242,"approval":98.7745099,"support":25.1647242},{"time_hours":6,"approval_perbill":985294119,"support_perbill":228531862,"approval":98.5294119,"support":22.8531862},{"time_hours":7,"approval_perbill":982843138,"support_perbill":209198815,"approval":98.2843138,"support":20.9198815},{"time_hours":8,"approval_perbill":980392158,"support_perbill":192789972,"approval":98.0392158,"support":19.2789972},{"time_hours":9,"approval_perbill":977941177,"support_perbill":178688524,"approval":97.7941177,"support":17.8688524},{"time_hours":10,"approval_perbill":975490197,"support_perbill":166439756,"approval":97.5490197,"support":16.6439756},{"time_hours":11,"approval_perbill":973039216,"support_perbill":155701053,"approval":97.3039216,"support":15.5701053},{"time_hours":12,"approval_perbill":970588236,"support_perbill":146209386,"approval":97.0588236,"support":14.6209386},{"time_hours":13,"approval_perbill":968137256,"support_perbill":137759452,"approval":96.8137256,"support":13.7759452},{"time_hours":14,"approval_perbill":965686276,"support_perbill":130188679,"approval":96.5686276,"support":13.0188679},{"time_hours":15,"approval_perbill":963235295,"support_perbill":123366639,"approval":96.3235295,"support":12.3366639},{"time_hours":16,"approval_perbill":960784315,"support_perbill":117187499,"approval":96.0784315,"support":11.7187499},{"time_hours":17,"approval_perbill":958333334,"support_perbill":111564465,"approval":95.8333334,"support":11.1564465},{"time_hours":18,"approval_perbill":955882354,"support_perbill":106425701,"approval":95.5882354,"support":10.6425701},{"time_hours":19,"approval_perbill":953431373,"support_perbill":101711228,"approval":95.3431373,"support":10.1711228},{"time_hours":20,"approval_perbill":950980393,"support_perbill":97370582,"approval":95.0980393,"support":9.7370582},{"time_hours":21,"approval_perbill":948529412,"support_perbill":93360994,"approval":94.8529412,"support":9.3360994},{"time_hours":22,"approval_perbill":946078432,"support_perbill":89645982,"approval":94.6078432,"support":8.9645982},{"time_hours":23,"approval_perbill":943627452,"support_perbill":86194234,"approval":94.3627452,"support":8.6194234},{"time_hours":24,"approval_perbill":941176471,"support_perbill":82978722,"approval":94.1176471,"support":8.2978722},{"time_hours":25,"approval_perbill":938725491,"support_perbill":79975997,"approval":93.8725491,"support":7.9975997},{"time_hours":26,"approval_perbill":936274511,"support_perbill":77165614,"approval":93.6274511,"support":7.7165614},{"time_hours":27,"approval_perbill":933823531,"support_perbill":74529666,"approval":93.3823531,"support":7.4529666},{"time_hours":28,"approval_perbill":931372550,"support_perbill":72052400,"approval":93.137255,"support":7.20524},{"time_hours":29,"approval_perbill":928921570,"support_perbill":69719908,"approval":92.892157,"support":6.9719908},{"time_hours":30,"approval_perbill":926470589,"support_perbill":67519857,"approval":92.6470589,"support":6.7519857},{"time_hours":31,"approval_perbill":924019609,"support_perbill":65441280,"approval":92.4019609,"support":6.544128},{"time_hours":32,"approval_perbill":921568628,"support_perbill":63474386,"approval":92.1568628,"support":6.3474386},{"time_hours":33,"approval_perbill":919117648,"support_perbill":61610409,"approval":91.9117648,"support":6.1610409},{"time_hours":34,"approval_perbill":916666667,"support_perbill":59841478,"approval":91.6666667,"support":5.9841478},{"time_hours":35,"approval_perbill":914215687,"support_perbill":58160504,"approval":91.4215687,"support":5.8160504},{"time_hours":36,"approval_perbill":911764706,"support_perbill":56561084,"approval":91.1764706,"support":5.6561084},{"time_hours":37,"approval_perbill":909313726,"support_perbill":55037426,"approval":90.9313726,"support":5.5037426},{"time_hours":38,"approval_perbill":906862746,"support_perbill":53584271,"approval":90.6862746,"support":5.3584271},{"time_hours":39,"approval_perbill":904411766,"support_perbill":52196835,"approval":90.4411766,"support":5.2196835},{"time_hours":40,"approval_perbill":901960785,"support_perbill":50870759,"approval":90.1960785,"support":5.0870759},{"time_hours":41,"approval_perbill":899509805,"support_perbill":49602061,"approval":89.9509805,"support":4.9602061},{"time_hours":42,"approval_perbill":897058824,"support_perbill":48387095,"approval":89.7058824,"support":4.8387095},{"time_hours":43,"approval_perbill":894607844,"support_perbill":47222519,"approval":89.4607844,"support":4.7222519},{"time_hours":44,"approval_perbill":892156864,"support_perbill":46105262,"approval":89.2156864,"support":4.6105262},{"time_hours":45,"approval_perbill":889705883,"support_perbill":45032496,"approval":88.9705883,"support":4.5032496},{"time_hours":46,"approval_perbill":887254903,"support_perbill":44001617,"approval":88.7254903,"support":4.4001617},{"time_hours":47,"approval_perbill":884803922,"support_perbill":43010218,"approval":88.4803922,"support":4.3010218},{"time_hours":48,"approval_perbill":882352942,"support_perbill":42056074,"approval":88.2352942,"support":4.2056074},{"time_hours":49,"approval_perbill":879901962,"support_perbill":41137122,"approval":87.9901962,"support":4.1137122},{"time_hours":50,"approval_perbill":877450982,"support_perbill":40251453,"approval":87.7450982,"support":4.0251453},{"time_hours":51,"approval_perbill":875000001,"support_perbill":39397289,"approval":87.5000001,"support":3.9397289},{"time_hours":52,"approval_perbill":872549021,"support_perbill":38572980,"approval":87.2549021,"support":3.857298},{"time_hours":53,"approval_perbill":870098040,"support_perbill":37776985,"approval":87.009804,"support":3.7776985},{"time_hours":54,"approval_perbill":867647060,"support_perbill":37007873,"approval":86.764706,"support":3.7007873},{"time_hours":55,"approval_perbill":865196079,"support_perbill":36264302,"approval":86.5196079,"support":3.6264302},{"time_hours":56,"approval_perbill":862745099,"support_perbill":35545023,"approval":86.2745099,"support":3.5545023},{"time_hours":57,"approval_perbill":860294118,"support_perbill":34848862,"approval":86.0294118,"support":3.4848862},{"time_hours":58,"approval_perbill":857843138,"support_perbill":34174724,"approval":85.7843138,"support":3.4174724},{"time_hours":59,"approval_perbill":855392157,"support_perbill":33521580,"approval":85.5392157,"support":3.352158},{"time_hours":60,"approval_perbill":852941177,"support_perbill":32888464,"approval":85.2941177,"support":3.2888464},{"time_hours":61,"approval_perbill":850490197,"support_perbill":32274469,"approval":85.0490197,"support":3.2274469},{"time_hours":62,"approval_perbill":848039217,"support_perbill":31678741,"approval":84.8039217,"support":3.1678741},{"time_hours":63,"approval_perbill":845588236,"support_perbill":31100477,"approval":84.5588236,"support":3.1100477},{"time_hours":64,"approval_perbill":843137256,"support_perbill":30538921,"approval":84.3137256,"support":3.0538921},{"time_hours":65,"approval_perbill":840686276,"support_perbill":29993358,"approval":84.0686276,"support":2.9993358},{"time_hours":66,"approval_perbill":838235295,"support_perbill":29463116,"approval":83.8235295,"support":2.9463116},{"time_hours":67,"approval_perbill":835784315,"support_perbill":28947556,"approval":83.5784315,"support":2.8947556},{"time_hours":68,"approval_perbill":833333334,"support_perbill":28446079,"approval":83.3333334,"support":2.8446079},{"time_hours":69,"approval_perbill":830882354,"support_perbill":27958114,"approval":83.0882354,"support":2.7958114},{"time_hours":70,"approval_perbill":828431373,"support_perbill":27483123,"approval":82.8431373,"support":2.7483123},{"time_hours":71,"approval_perbill":825980393,"support_perbill":27020596,"approval":82.5980393,"support":2.7020596},{"time_hours":72,"approval_perbill":823529412,"support_perbill":26570047,"approval":82.3529412,"support":2.6570047},{"time_hours":73,"approval_perbill":821078432,"support_perbill":26131019,"approval":82.1078432,"support":2.6131019},{"time_hours":74,"approval_perbill":818627452,"support_perbill":25703073,"approval":81.8627452,"support":2.5703073},{"time_hours":75,"approval_perbill":816176472,"support_perbill":25285796,"approval":81.6176472,"support":2.5285796},{"time_hours":76,"approval_perbill":813725491,"support_perbill":24878795,"approval":81.3725491,"support":2.4878795},{"time_hours":77,"approval_perbill":811274511,"support_perbill":24481693,"approval":81.1274511,"support":2.4481693},{"time_hours":78,"approval_perbill":808823530,"support_perbill":24094134,"approval":80.882353,"support":2.4094134},{"time_hours":79,"approval_perbill":806372550,"support_perbill":23715779,"approval":80.637255,"support":2.3715779},{"time_hours":80,"approval_perbill":803921569,"support_perbill":23346303,"approval":80.3921569,"support":2.3346303},{"time_hours":81,"approval_perbill":801470589,"support_perbill":22985397,"approval":80.1470589,"support":2.2985397},{"time_hours":82,"approval_perbill":799019608,"support_perbill":22632766,"approval":79.9019608,"support":2.2632766},{"time_hours":83,"approval_perbill":796568628,"support_perbill":22288130,"approval":79.6568628,"support":2.228813},{"time_hours":84,"approval_perbill":794117648,"support_perbill":21951219,"approval":79.4117648,"support":2.1951219},{"time_hours":85,"approval_perbill":791666668,"support_perbill":21621776,"approval":79.1666668,"support":2.1621776},{"time_hours":86,"approval_perbill":789215688,"support_perbill":21299556,"approval":78.9215688,"support":2.1299556},{"time_hours":87,"approval_perbill":786764707,"support_perbill":20984324,"approval":78.6764707,"support":2.0984324},{"time_hours":88,"approval_perbill":784313727,"support_perbill":20675855,"approval":78.4313727,"support":2.0675855},{"time_hours":89,"approval_perbill":781862746,"support_perbill":20373934,"approval":78.1862746,"support":2.0373934},{"time_hours":90,"approval_perbill":779411766,"support_perbill":20078354,"approval":77.9411766,"support":2.0078354},{"time_hours":91,"approval_perbill":776960785,"support_perbill":19788917,"approval":77.6960785,"support":1.9788917},{"time_hours":92,"approval_perbill":774509805,"support_perbill":19505435,"approval":77.4509805,"support":1.9505435},{"time_hours":93,"approval_perbill":772058824,"support_perbill":19227725,"approval":77.2058824,"support":1.9227725},{"time_hours":94,"approval_perbill":769607844,"support_perbill":18955613,"approval":76.9607844,"support":1.8955613},{"time_hours":95,"approval_perbill":767156863,"support_perbill":18688931,"approval":76.7156863,"support":1.8688931},{"time_hours":96,"approval_perbill":764705883,"support_perbill":18427518,"approval":76.4705883,"support":1.8427518},{"time_hours":97,"approval_perbill":762254903,"support_perbill":18171219,"approval":76.2254903,"support":1.8171219},{"time_hours":98,"approval_perbill":759803923,"support_perbill":17919887,"approval":75.9803923,"support":1.7919887},{"time_hours":99,"approval_perbill":757352942,"support_perbill":17673377,"approval":75.7352942,"support":1.7673377},{"time_hours":100,"approval_perbill":754901962,"support_perbill":17431553,"approval":75.4901962,"support":1.7431553},{"time_hours":101,"approval_perbill":752450981,"support_perbill":17194282,"approval":75.2450981,"support":1.7194282},{"time_hours":102,"approval_perbill":750000001,"support_perbill":16961437,"approval":75.0000001,"support":1.6961437},{"time_hours":103,"approval_perbill":747549020,"support_perbill":16732895,"approval":74.754902,"support":1.6732895},{"time_hours":104,"approval_perbill":745098040,"support_perbill":16508538,"approval":74.509804,"support":1.6508538},{"time_hours":105,"approval_perbill":742647059,"support_perbill":16288252,"approval":74.2647059,"support":1.6288252},{"time_hours":106,"approval_perbill":740196079,"support_perbill":16071927,"approval":74.0196079,"support":1.6071927},{"time_hours":107,"approval_perbill":737745099,"support_perbill":15859457,"approval":73.7745099,"support":1.5859457},{"time_hours":108,"approval_perbill":735294118,"support_perbill":15650741,"approval":73.5294118,"support":1.5650741},{"time_hours":109,"approval_perbill":732843138,"support_perbill":15445679,"approval":73.2843138,"support":1.5445679},{"time_hours":110,"approval_perbill":730392158,"support_perbill":15244176,"approval":73.0392158,"support":1.5244176},{"time_hours":111,"approval_perbill":727941178,"support_perbill":15046141,"approval":72.7941178,"support":1.5046141},{"time_hours":112,"approval_perbill":725490197,"support_perbill":14851485,"approval":72.5490197,"support":1.4851485},{"time_hours":113,"approval_perbill":723039217,"support_perbill":14660121,"approval":72.3039217,"support":1.4660121},{"time_hours":114,"approval_perbill":720588236,"support_perbill":14471968,"approval":72.0588236,"support":1.4471968},{"time_hours":115,"approval_perbill":718137256,"support_perbill":14286945,"approval":71.8137256,"support":1.4286945},{"time_hours":116,"approval_perbill":715686275,"support_perbill":14104975,"approval":71.5686275,"support":1.4104975},{"time_hours":117,"approval_perbill":713235295,"support_perbill":13925982,"approval":71.3235295,"support":1.3925982},{"time_hours":118,"approval_perbill":710784314,"support_perbill":13749894,"approval":71.0784314,"support":1.3749894},{"time_hours":119,"approval_perbill":708333334,"support_perbill":13576642,"approval":70.8333334,"support":1.3576642},{"time_hours":120,"approval_perbill":705882353,"support_perbill":13406156,"approval":70.5882353,"support":1.3406156},{"time_hours":121,"approval_perbill":703431373,"support_perbill":13238372,"approval":70.3431373,"support":1.3238372},{"time_hours":122,"approval_perbill":700980393,"support_perbill":13073226,"approval":70.0980393,"support":1.3073226},{"time_hours":123,"approval_perbill":698529413,"support_perbill":12910655,"approval":69.8529413,"support":1.2910655},{"time_hours":124,"approval_perbill":696078432,"support_perbill":12750601,"approval":69.6078432,"support":1.2750601},{"time_hours":125,"approval_perbill":693627452,"support_perbill":12593005,"approval":69.3627452,"support":1.2593005},{"time_hours":126,"approval_perbill":691176471,"support_perbill":12437810,"approval":69.1176471,"support":1.243781},{"time_hours":127,"approval_perbill":688725491,"support_perbill":12284964,"approval":68.8725491,"support":1.2284964},{"time_hours":128,"approval_perbill":686274511,"support_perbill":12134411,"approval":68.6274511,"support":1.2134411},{"time_hours":129,"approval_perbill":683823530,"support_perbill":11986103,"approval":68.382353,"support":1.1986103},{"time_hours":130,"approval_perbill":681372550,"support_perbill":11839987,"approval":68.137255,"support":1.1839987},{"time_hours":131,"approval_perbill":678921569,"support_perbill":11696017,"approval":67.8921569,"support":1.1696017},{"time_hours":132,"approval_perbill":676470589,"support_perbill":11554145,"approval":67.6470589,"support":1.1554145},{"time_hours":133,"approval_perbill":674019609,"support_perbill":11414326,"approval":67.4019609,"support":1.1414326},{"time_hours":134,"approval_perbill":671568629,"support_perbill":11276516,"approval":67.1568629,"support":1.1276516},{"time_hours":135,"approval_perbill":669117648,"support_perbill":11140671,"approval":66.9117648,"support":1.1140671},{"time_hours":136,"approval_perbill":666666668,"support_perbill":11006750,"approval":66.6666668,"support":1.100675},{"time_hours":137,"approval_perbill":664215687,"support_perbill":10874713,"approval":66.4215687,"support":1.0874713},{"time_hours":138,"approval_perbill":661764707,"support_perbill":10744519,"approval":66.1764707,"support":1.0744519},{"time_hours":139,"approval_perbill":659313726,"support_perbill":10616130,"approval":65.9313726,"support":1.061613},{"time_hours":140,"approval_perbill":656862746,"support_perbill":10489510,"approval":65.6862746,"support":1.048951},{"time_hours":141,"approval_perbill":654411765,"support_perbill":10364622,"approval":65.4411765,"support":1.0364622},{"time_hours":142,"approval_perbill":651960785,"support_perbill":10241430,"approval":65.1960785,"support":1.024143},{"time_hours":143,"approval_perbill":649509804,"support_perbill":10119900,"approval":64.9509804,"support":1.01199},{"time_hours":144,"approval_perbill":647058824,"support_perbill":10000000,"approval":64.7058824,"support":1},{"time_hours":145,"approval_perbill":644607844,"support_perbill":9881695,"approval":64.4607844,"support":0.9881695},{"time_hours":146,"approval_perbill":642156864,"support_perbill":9764955,"approval":64.2156864,"support":0.9764955},{"time_hours":147,"approval_perbill":639705883,"support_perbill":9649749,"approval":63.9705883,"support":0.9649749},{"time_hours":148,"approval_perbill":637254903,"support_perbill":9536047,"approval":63.7254903,"support":0.9536047},{"time_hours":149,"approval_perbill":634803923,"support_perbill":9423820,"approval":63.4803923,"support":0.942382},{"time_hours":150,"approval_perbill":632352942,"support_perbill":9313038,"approval":63.2352942,"support":0.9313038},{"time_hours":151,"approval_perbill":629901962,"support_perbill":9203674,"approval":62.9901962,"support":0.9203674},{"time_hours":152,"approval_perbill":627450981,"support_perbill":9095702,"approval":62.7450981,"support":0.9095702},{"time_hours":153,"approval_perbill":625000001,"support_perbill":8989095,"approval":62.5000001,"support":0.8989095},{"time_hours":154,"approval_perbill":622549020,"support_perbill":8883826,"approval":62.254902,"support":0.8883826},{"time_hours":155,"approval_perbill":620098040,"support_perbill":8779872,"approval":62.009804,"support":0.8779872},{"time_hours":156,"approval_perbill":617647059,"support_perbill":8677207,"approval":61.7647059,"support":0.8677207},{"time_hours":157,"approval_perbill":615196079,"support_perbill":8575808,"approval":61.5196079,"support":0.8575808},{"time_hours":158,"approval_perbill":612745099,"support_perbill":8475652,"approval":61.2745099,"support":0.8475652},{"time_hours":159,"approval_perbill":610294119,"support_perbill":8376715,"approval":61.0294119,"support":0.8376715},{"time_hours":160,"approval_perbill":607843138,"support_perbill":8278976,"approval":60.7843138,"support":0.8278976},{"time_hours":161,"approval_perbill":605392158,"support_perbill":8182413,"approval":60.5392158,"support":0.8182413},{"time_hours":162,"approval_perbill":602941177,"support_perbill":8087005,"approval":60.2941177,"support":0.8087005},{"time_hours":163,"approval_perbill":600490197,"support_perbill":7992731,"approval":60.0490197,"support":0.7992731},{"time_hours":164,"approval_perbill":598039216,"support_perbill":7899571,"approval":59.8039216,"support":0.7899571},{"time_hours":165,"approval_perbill":595588236,"support_perbill":7807506,"approval":59.5588236,"support":0.7807506},{"time_hours":166,"approval_perbill":593137255,"support_perbill":7716516,"approval":59.3137255,"support":0.7716516},{"time_hours":167,"approval_perbill":590686275,"support_perbill":7626583,"approval":59.0686275,"support":0.7626583},{"time_hours":168,"approval_perbill":588235295,"support_perbill":7537688,"approval":58.8235295,"support":0.7537688},{"time_hours":169,"approval_perbill":585784315,"support_perbill":7449814,"approval":58.5784315,"support":0.7449814},{"time_hours":170,"approval_perbill":583333335,"support_perbill":7362942,"approval":58.3333335,"support":0.7362942},{"time_hours":171,"approval_perbill":580882354,"support_perbill":7277057,"approval":58.0882354,"support":0.7277057},{"time_hours":172,"approval_perbill":578431374,"support_perbill":7192141,"approval":57.8431374,"support":0.7192141},{"time_hours":173,"approval_perbill":575980393,"support_perbill":7108178,"approval":57.5980393,"support":0.7108178},{"time_hours":174,"approval_perbill":573529413,"support_perbill":7025151,"approval":57.3529413,"support":0.7025151},{"time_hours":175,"approval_perbill":571078432,"support_perbill":6943047,"approval":57.1078432,"support":0.6943047},{"time_hours":176,"approval_perbill":568627452,"support_perbill":6861848,"approval":56.8627452,"support":0.6861848},{"time_hours":177,"approval_perbill":566176471,"support_perbill":6781540,"approval":56.6176471,"support":0.678154},{"time_hours":178,"approval_perbill":563725491,"support_perbill":6702109,"approval":56.3725491,"support":0.6702109},{"time_hours":179,"approval_perbill":561274510,"support_perbill":6623541,"approval":56.127451,"support":0.6623541},{"time_hours":180,"approval_perbill":558823530,"support_perbill":6545820,"approval":55.882353,"support":0.654582},{"time_hours":181,"approval_perbill":556372550,"support_perbill":6468935,"approval":55.637255,"support":0.6468935},{"time_hours":182,"approval_perbill":553921570,"support_perbill":6392871,"approval":55.392157,"support":0.6392871},{"time_hours":183,"approval_perbill":551470589,"support_perbill":6317615,"approval":55.1470589,"support":0.6317615},{"time_hours":184,"approval_perbill":549019609,"support_perbill":6243154,"approval":54.9019609,"support":0.6243154},{"time_hours":185,"approval_perbill":546568628,"support_perbill":6169476,"approval":54.6568628,"support":0.6169476},{"time_hours":186,"approval_perbill":544117648,"support_perbill":6096569,"approval":54.4117648,"support":0.6096569},{"time_hours":187,"approval_perbill":541666667,"support_perbill":6024421,"approval":54.1666667,"support":0.6024421},{"time_hours":188,"approval_perbill":539215687,"support_perbill":5953019,"approval":53.9215687,"support":0.5953019},{"time_hours":189,"approval_perbill":536764706,"support_perbill":5882353,"approval":53.6764706,"support":0.5882353},{"time_hours":190,"approval_perbill":534313726,"support_perbill":5812410,"approval":53.4313726,"support":0.581241},{"time_hours":191,"approval_perbill":531862746,"support_perbill":5743181,"approval":53.1862746,"support":0.5743181},{"time_hours":192,"approval_perbill":529411765,"support_perbill":5674653,"approval":52.9411765,"support":0.5674653},{"time_hours":193,"approval_perbill":526960785,"support_perbill":5606817,"approval":52.6960785,"support":0.5606817},{"time_hours":194,"approval_perbill":524509805,"support_perbill":5539662,"approval":52.4509805,"support":0.5539662},{"time_hours":195,"approval_perbill":522058825,"support_perbill":5473177,"approval":52.2058825,"support":0.5473177},{"time_hours":196,"approval_perbill":519607844,"support_perbill":5407354,"approval":51.9607844,"support":0.5407354},{"time_hours":197,"approval_perbill":517156864,"support_perbill":5342181,"approval":51.7156864,"support":0.5342181},{"time_hours":198,"approval_perbill":514705883,"support_perbill":5277650,"approval":51.4705883,"support":0.527765},{"time_hours":199,"approval_perbill":512254903,"support_perbill":5213751,"approval":51.2254903,"support":0.5213751},{"time_hours":200,"approval_perbill":509803922,"support_perbill":5150474,"approval":50.9803922,"support":0.5150474},{"time_hours":201,"approval_perbill":507352942,"support_perbill":5087812,"approval":50.7352942,"support":0.5087812},{"time_hours":202,"approval_perbill":504901961,"support_perbill":5025754,"approval":50.4901961,"support":0.5025754},{"time_hours":203,"approval_perbill":502450981,"support_perbill":4964292,"approval":50.2450981,"support":0.4964292},{"time_hours":204,"approval_perbill":500000000,"support_perbill":4903417,"approval":50,"support":0.4903417},{"time_hours":205,"approval_perbill":500000000,"support_perbill":4843122,"approval":50,"support":0.4843122},{"time_hours":206,"approval_perbill":500000000,"support_perbill":4783398,"approval":50,"support":0.4783398},{"time_hours":207,"approval_perbill":500000000,"support_perbill":4724236,"approval":50,"support":0.4724236},{"time_hours":208,"approval_perbill":500000000,"support_perbill":4665630,"approval":50,"support":0.466563},{"time_hours":209,"approval_perbill":500000000,"support_perbill":4607570,"approval":50,"support":0.460757},{"time_hours":210,"approval_perbill":500000000,"support_perbill":4550050,"approval":50,"support":0.455005},{"time_hours":211,"approval_perbill":500000000,"support_perbill":4493062,"approval":50,"support":0.4493062},{"time_hours":212,"approval_perbill":500000000,"support_perbill":4436599,"approval":50,"support":0.4436599},{"time_hours":213,"approval_perbill":500000000,"support_perbill":4380654,"approval":50,"support":0.4380654},{"time_hours":214,"approval_perbill":500000000,"support_perbill":4325218,"approval":50,"support":0.4325218},{"time_hours":215,"approval_perbill":500000000,"support_perbill":4270287,"approval":50,"support":0.4270287},{"time_hours":216,"approval_perbill":500000000,"support_perbill":4215851,"approval":50,"support":0.4215851},{"time_hours":217,"approval_perbill":500000000,"support_perbill":4161906,"approval":50,"support":0.4161906},{"time_hours":218,"approval_perbill":500000000,"support_perbill":4108444,"approval":50,"support":0.4108444},{"time_hours":219,"approval_perbill":500000000,"support_perbill":4055459,"approval":50,"support":0.4055459},{"time_hours":220,"approval_perbill":500000000,"support_perbill":4002944,"approval":50,"support":0.4002944},{"time_hours":221,"approval_perbill":500000000,"support_perbill":3950894,"approval":50,"support":0.3950894},{"time_hours":222,"approval_perbill":500000000,"support_perbill":3899302,"approval":50,"support":0.3899302},{"time_hours":223,"approval_perbill":500000000,"support_perbill":3848162,"approval":50,"support":0.3848162},{"time_hours":224,"approval_perbill":500000000,"support_perbill":3797468,"approval":50,"support":0.3797468},{"time_hours":225,"approval_perbill":500000000,"support_perbill":3747215,"approval":50,"support":0.3747215},{"time_hours":226,"approval_perbill":500000000,"support_perbill":3697396,"approval":50,"support":0.3697396},{"time_hours":227,"approval_perbill":500000000,"support_perbill":3648006,"approval":50,"support":0.3648006},{"time_hours":228,"approval_perbill":500000000,"support_perbill":3599040,"approval":50,"support":0.359904},{"time_hours":229,"approval_perbill":500000000,"support_perbill":3550492,"approval":50,"support":0.3550492},{"time_hours":230,"approval_perbill":500000000,"support_perbill":3502357,"approval":50,"support":0.3502357},{"time_hours":231,"approval_perbill":500000000,"support_perbill":3454629,"approval":50,"support":0.3454629},{"time_hours":232,"approval_perbill":500000000,"support_perbill":3407304,"approval":50,"support":0.3407304},{"time_hours":233,"approval_perbill":500000000,"support_perbill":3360376,"approval":50,"support":0.3360376},{"time_hours":234,"approval_perbill":500000000,"support_perbill":3313840,"approval":50,"support":0.331384},{"time_hours":235,"approval_perbill":500000000,"support_perbill":3267692,"approval":50,"support":0.3267692},{"time_hours":236,"approval_perbill":500000000,"support_perbill":3221926,"approval":50,"support":0.3221926},{"time_hours":237,"approval_perbill":500000000,"support_perbill":3176538,"approval":50,"support":0.3176538},{"time_hours":238,"approval_perbill":500000000,"support_perbill":3131524,"approval":50,"support":0.3131524},{"time_hours":239,"approval_perbill":500000000,"support_perbill":3086878,"approval":50,"support":0.3086878},{"time_hours":240,"approval_perbill":500000000,"support_perbill":3042596,"approval":50,"support":0.3042596},{"time_hours":241,"approval_perbill":500000000,"support_perbill":2998674,"approval":50,"support":0.2998674},{"time_hours":242,"approval_perbill":500000000,"support_perbill":2955107,"approval":50,"support":0.2955107},{"time_hours":243,"approval_perbill":500000000,"support_perbill":2911892,"approval":50,"support":0.2911892},{"time_hours":244,"approval_perbill":500000000,"support_perbill":2869023,"approval":50,"support":0.2869023},{"time_hours":245,"approval_perbill":500000000,"support_perbill":2826496,"approval":50,"support":0.2826496},{"time_hours":246,"approval_perbill":500000000,"support_perbill":2784309,"approval":50,"support":0.2784309},{"time_hours":247,"approval_perbill":500000000,"support_perbill":2742455,"approval":50,"support":0.2742455},{"time_hours":248,"approval_perbill":500000000,"support_perbill":2700933,"approval":50,"support":0.2700933},{"time_hours":249,"approval_perbill":500000000,"support_perbill":2659737,"approval":50,"support":0.2659737},{"time_hours":250,"approval_perbill":500000000,"support_perbill":2618864,"approval":50,"support":0.2618864},{"time_hours":251,"approval_perbill":500000000,"support_perbill":2578310,"approval":50,"support":0.257831},{"time_hours":252,"approval_perbill":500000000,"support_perbill":2538071,"approval":50,"support":0.2538071},{"time_hours":253,"approval_perbill":500000000,"support_perbill":2498144,"approval":50,"support":0.2498144},{"time_hours":254,"approval_perbill":500000000,"support_perbill":2458525,"approval":50,"support":0.2458525},{"time_hours":255,"approval_perbill":500000000,"support_perbill":2419210,"approval":50,"support":0.241921},{"time_hours":256,"approval_perbill":500000000,"support_perbill":2380197,"approval":50,"support":0.2380197},{"time_hours":257,"approval_perbill":500000000,"support_perbill":2341481,"approval":50,"support":0.2341481},{"time_hours":258,"approval_perbill":500000000,"support_perbill":2303059,"approval":50,"support":0.2303059},{"time_hours":259,"approval_perbill":500000000,"support_perbill":2264928,"approval":50,"support":0.2264928},{"time_hours":260,"approval_perbill":500000000,"support_perbill":2227084,"approval":50,"support":0.2227084},{"time_hours":261,"approval_perbill":500000000,"support_perbill":2189525,"approval":50,"support":0.2189525},{"time_hours":262,"approval_perbill":500000000,"support_perbill":2152247,"approval":50,"support":0.2152247},{"time_hours":263,"approval_perbill":500000000,"support_perbill":2115247,"approval":50,"support":0.2115247},{"time_hours":264,"approval_perbill":500000000,"support_perbill":2078522,"approval":50,"support":0.2078522},{"time_hours":265,"approval_perbill":500000000,"support_perbill":2042068,"approval":50,"support":0.2042068},{"time_hours":266,"approval_perbill":500000000,"support_perbill":2005884,"approval":50,"support":0.2005884},{"time_hours":267,"approval_perbill":500000000,"support_perbill":1969965,"approval":50,"support":0.1969965},{"time_hours":268,"approval_perbill":500000000,"support_perbill":1934309,"approval":50,"support":0.1934309},{"time_hours":269,"approval_perbill":500000000,"support_perbill":1898913,"approval":50,"support":0.1898913},{"time_hours":270,"approval_perbill":500000000,"support_perbill":1863775,"approval":50,"support":0.1863775},{"time_hours":271,"approval_perbill":500000000,"support_perbill":1828891,"approval":50,"support":0.1828891},{"time_hours":272,"approval_perbill":500000000,"support_perbill":1794258,"approval":50,"support":0.1794258},{"time_hours":273,"approval_perbill":500000000,"support_perbill":1759875,"approval":50,"support":0.1759875},{"time_hours":274,"approval_perbill":500000000,"support_perbill":1725737,"approval":50,"support":0.1725737},{"time_hours":275,"approval_perbill":500000000,"support_perbill":1691844,"approval":50,"support":0.1691844},{"time_hours":276,"approval_perbill":500000000,"support_perbill":1658191,"approval":50,"support":0.1658191},{"time_hours":277,"approval_perbill":500000000,"support_perbill":1624777,"approval":50,"support":0.1624777},{"time_hours":278,"approval_perbill":500000000,"support_perbill":1591599,"approval":50,"support":0.1591599},{"time_hours":279,"approval_perbill":500000000,"support_perbill":1558654,"approval":50,"support":0.1558654},{"time_hours":280,"approval_perbill":500000000,"support_perbill":1525941,"approval":50,"support":0.1525941},{"time_hours":281,"approval_perbill":500000000,"support_perbill":1493456,"approval":50,"support":0.1493456},{"time_hours":282,"approval_perbill":500000000,"support_perbill":1461197,"approval":50,"support":0.1461197},{"time_hours":283,"approval_perbill":500000000,"support_perbill":1429162,"approval":50,"support":0.1429162},{"time_hours":284,"approval_perbill":500000000,"support_perbill":1397348,"approval":50,"support":0.1397348},{"time_hours":285,"approval_perbill":500000000,"support_perbill":1365754,"approval":50,"support":0.1365754},{"time_hours":286,"approval_perbill":500000000,"support_perbill":1334377,"approval":50,"support":0.1334377},{"time_hours":287,"approval_perbill":500000000,"support_perbill":1303214,"approval":50,"support":0.1303214},{"time_hours":288,"approval_perbill":500000000,"support_perbill":1272264,"approval":50,"support":0.1272264},{"time_hours":289,"approval_perbill":500000000,"support_perbill":1241525,"approval":50,"support":0.1241525},{"time_hours":290,"approval_perbill":500000000,"support_perbill":1210994,"approval":50,"support":0.1210994},{"time_hours":291,"approval_perbill":500000000,"support_perbill":1180668,"approval":50,"support":0.1180668},{"time_hours":292,"approval_perbill":500000000,"support_perbill":1150547,"approval":50,"support":0.1150547},{"time_hours":293,"approval_perbill":500000000,"support_perbill":1120628,"approval":50,"support":0.1120628},{"time_hours":294,"approval_perbill":500000000,"support_perbill":1090909,"approval":50,"support":0.1090909},{"time_hours":295,"approval_perbill":500000000,"support_perbill":1061388,"approval":50,"support":0.1061388},{"time_hours":296,"approval_perbill":500000000,"support_perbill":1032063,"approval":50,"support":0.1032063},{"time_hours":297,"approval_perbill":500000000,"support_perbill":1002932,"approval":50,"support":0.1002932},{"time_hours":298,"approval_perbill":500000000,"support_perbill":973993,"approval":50,"support":0.0973993},{"time_hours":299,"approval_perbill":500000000,"support_perbill":945244,"approval":50,"support":0.0945244},{"time_hours":300,"approval_perbill":500000000,"support_perbill":916684,"approval":50,"support":0.0916684},{"time_hours":301,"approval_perbill":500000000,"support_perbill":888310,"approval":50,"support":0.088831},{"time_hours":302,"approval_perbill":500000000,"support_perbill":860121,"approval":50,"support":0.0860121},{"time_hours":303,"approval_perbill":500000000,"support_perbill":832114,"approval":50,"support":0.0832114},{"time_hours":304,"approval_perbill":500000000,"support_perbill":804289,"approval":50,"support":0.0804289},{"time_hours":305,"approval_perbill":500000000,"support_perbill":776644,"approval":50,"support":0.0776644},{"time_hours":306,"approval_perbill":500000000,"support_perbill":749176,"approval":50,"support":0.0749176},{"time_hours":307,"approval_perbill":500000000,"support_perbill":721884,"approval":50,"support":0.0721884},{"time_hours":308,"approval_perbill":500000000,"support_perbill":694766,"approval":50,"support":0.0694766},{"time_hours":309,"approval_perbill":500000000,"support_perbill":667821,"approval":50,"support":0.0667821},{"time_hours":310,"approval_perbill":500000000,"support_perbill":641047,"approval":50,"support":0.0641047},{"time_hours":311,"approval_perbill":500000000,"support_perbill":614442,"approval":50,"support":0.0614442},{"time_hours":312,"approval_perbill":500000000,"support_perbill":588005,"approval":50,"support":0.0588005},{"time_hours":313,"approval_perbill":500000000,"support_perbill":561734,"approval":50,"support":0.0561734},{"time_hours":314,"approval_perbill":500000000,"support_perbill":535627,"approval":50,"support":0.0535627},{"time_hours":315,"approval_perbill":500000000,"support_perbill":509684,"approval":50,"support":0.0509684},{"time_hours":316,"approval_perbill":500000000,"support_perbill":483902,"approval":50,"support":0.0483902},{"time_hours":317,"approval_perbill":500000000,"support_perbill":458280,"approval":50,"support":0.045828},{"time_hours":318,"approval_perbill":500000000,"support_perbill":432817,"approval":50,"support":0.0432817},{"time_hours":319,"approval_perbill":500000000,"support_perbill":407511,"approval":50,"support":0.0407511},{"time_hours":320,"approval_perbill":500000000,"support_perbill":382360,"approval":50,"support":0.038236},{"time_hours":321,"approval_perbill":500000000,"support_perbill":357364,"approval":50,"support":0.0357364},{"time_hours":322,"approval_perbill":500000000,"support_perbill":332520,"approval":50,"support":0.033252},{"time_hours":323,"approval_perbill":500000000,"support_perbill":307828,"approval":50,"support":0.0307828},{"time_hours":324,"approval_perbill":500000000,"support_perbill":283286,"approval":50,"support":0.0283286},{"time_hours":325,"approval_perbill":500000000,"support_perbill":258892,"approval":50,"support":0.0258892},{"time_hours":326,"approval_perbill":500000000,"support_perbill":234646,"approval":50,"support":0.0234646},{"time_hours":327,"approval_perbill":500000000,"support_perbill":210546,"approval":50,"support":0.0210546},{"time_hours":328,"approval_perbill":500000000,"support_perbill":186590,"approval":50,"support":0.018659},{"time_hours":329,"approval_perbill":500000000,"support_perbill":162778,"approval":50,"support":0.0162778},{"time_hours":330,"approval_perbill":500000000,"support_perbill":139108,"approval":50,"support":0.0139108},{"time_hours":331,"approval_perbill":500000000,"support_perbill":115578,"approval":50,"support":0.0115578},{"time_hours":332,"approval_perbill":500000000,"support_perbill":92188,"approval":50,"support":0.0092188},{"time_hours":333,"approval_perbill":500000000,"support_perbill":68937,"approval":50,"support":0.0068937},{"time_hours":334,"approval_perbill":500000000,"support_perbill":45822,"approval":50,"support":0.0045822},{"time_hours":335,"approval_perbill":500000000,"support_perbill":22844,"approval":50,"support":0.0022844},{"time_hours":336,"approval_perbill":500000000,"support_perbill":0,"approval":50,"support":0}]')},54836:p=>{"use strict";p.exports=JSON.parse('[{"time_hours":0,"approval_perbill":1000000000,"support_perbill":500000026,"approval":100,"support":50.0000026},{"time_hours":1,"approval_perbill":997549020,"support_perbill":418401359,"approval":99.754902,"support":41.8401359},{"time_hours":2,"approval_perbill":995098040,"support_perbill":359397443,"approval":99.509804,"support":35.9397443},{"time_hours":3,"approval_perbill":992647060,"support_perbill":314744813,"approval":99.264706,"support":31.4744813},{"time_hours":4,"approval_perbill":990196080,"support_perbill":279775293,"approval":99.019608,"support":27.9775293},{"time_hours":5,"approval_perbill":987745099,"support_perbill":251647242,"approval":98.7745099,"support":25.1647242},{"time_hours":6,"approval_perbill":985294119,"support_perbill":228531862,"approval":98.5294119,"support":22.8531862},{"time_hours":7,"approval_perbill":982843138,"support_perbill":209198815,"approval":98.2843138,"support":20.9198815},{"time_hours":8,"approval_perbill":980392158,"support_perbill":192789972,"approval":98.0392158,"support":19.2789972},{"time_hours":9,"approval_perbill":977941177,"support_perbill":178688524,"approval":97.7941177,"support":17.8688524},{"time_hours":10,"approval_perbill":975490197,"support_perbill":166439756,"approval":97.5490197,"support":16.6439756},{"time_hours":11,"approval_perbill":973039216,"support_perbill":155701053,"approval":97.3039216,"support":15.5701053},{"time_hours":12,"approval_perbill":970588236,"support_perbill":146209386,"approval":97.0588236,"support":14.6209386},{"time_hours":13,"approval_perbill":968137256,"support_perbill":137759452,"approval":96.8137256,"support":13.7759452},{"time_hours":14,"approval_perbill":965686276,"support_perbill":130188679,"approval":96.5686276,"support":13.0188679},{"time_hours":15,"approval_perbill":963235295,"support_perbill":123366639,"approval":96.3235295,"support":12.3366639},{"time_hours":16,"approval_perbill":960784315,"support_perbill":117187499,"approval":96.0784315,"support":11.7187499},{"time_hours":17,"approval_perbill":958333334,"support_perbill":111564465,"approval":95.8333334,"support":11.1564465},{"time_hours":18,"approval_perbill":955882354,"support_perbill":106425701,"approval":95.5882354,"support":10.6425701},{"time_hours":19,"approval_perbill":953431373,"support_perbill":101711228,"approval":95.3431373,"support":10.1711228},{"time_hours":20,"approval_perbill":950980393,"support_perbill":97370582,"approval":95.0980393,"support":9.7370582},{"time_hours":21,"approval_perbill":948529412,"support_perbill":93360994,"approval":94.8529412,"support":9.3360994},{"time_hours":22,"approval_perbill":946078432,"support_perbill":89645982,"approval":94.6078432,"support":8.9645982},{"time_hours":23,"approval_perbill":943627452,"support_perbill":86194234,"approval":94.3627452,"support":8.6194234},{"time_hours":24,"approval_perbill":941176471,"support_perbill":82978722,"approval":94.1176471,"support":8.2978722},{"time_hours":25,"approval_perbill":938725491,"support_perbill":79975997,"approval":93.8725491,"support":7.9975997},{"time_hours":26,"approval_perbill":936274511,"support_perbill":77165614,"approval":93.6274511,"support":7.7165614},{"time_hours":27,"approval_perbill":933823531,"support_perbill":74529666,"approval":93.3823531,"support":7.4529666},{"time_hours":28,"approval_perbill":931372550,"support_perbill":72052400,"approval":93.137255,"support":7.20524},{"time_hours":29,"approval_perbill":928921570,"support_perbill":69719908,"approval":92.892157,"support":6.9719908},{"time_hours":30,"approval_perbill":926470589,"support_perbill":67519857,"approval":92.6470589,"support":6.7519857},{"time_hours":31,"approval_perbill":924019609,"support_perbill":65441280,"approval":92.4019609,"support":6.544128},{"time_hours":32,"approval_perbill":921568628,"support_perbill":63474386,"approval":92.1568628,"support":6.3474386},{"time_hours":33,"approval_perbill":919117648,"support_perbill":61610409,"approval":91.9117648,"support":6.1610409},{"time_hours":34,"approval_perbill":916666667,"support_perbill":59841478,"approval":91.6666667,"support":5.9841478},{"time_hours":35,"approval_perbill":914215687,"support_perbill":58160504,"approval":91.4215687,"support":5.8160504},{"time_hours":36,"approval_perbill":911764706,"support_perbill":56561084,"approval":91.1764706,"support":5.6561084},{"time_hours":37,"approval_perbill":909313726,"support_perbill":55037426,"approval":90.9313726,"support":5.5037426},{"time_hours":38,"approval_perbill":906862746,"support_perbill":53584271,"approval":90.6862746,"support":5.3584271},{"time_hours":39,"approval_perbill":904411766,"support_perbill":52196835,"approval":90.4411766,"support":5.2196835},{"time_hours":40,"approval_perbill":901960785,"support_perbill":50870759,"approval":90.1960785,"support":5.0870759},{"time_hours":41,"approval_perbill":899509805,"support_perbill":49602061,"approval":89.9509805,"support":4.9602061},{"time_hours":42,"approval_perbill":897058824,"support_perbill":48387095,"approval":89.7058824,"support":4.8387095},{"time_hours":43,"approval_perbill":894607844,"support_perbill":47222519,"approval":89.4607844,"support":4.7222519},{"time_hours":44,"approval_perbill":892156864,"support_perbill":46105262,"approval":89.2156864,"support":4.6105262},{"time_hours":45,"approval_perbill":889705883,"support_perbill":45032496,"approval":88.9705883,"support":4.5032496},{"time_hours":46,"approval_perbill":887254903,"support_perbill":44001617,"approval":88.7254903,"support":4.4001617},{"time_hours":47,"approval_perbill":884803922,"support_perbill":43010218,"approval":88.4803922,"support":4.3010218},{"time_hours":48,"approval_perbill":882352942,"support_perbill":42056074,"approval":88.2352942,"support":4.2056074},{"time_hours":49,"approval_perbill":879901962,"support_perbill":41137122,"approval":87.9901962,"support":4.1137122},{"time_hours":50,"approval_perbill":877450982,"support_perbill":40251453,"approval":87.7450982,"support":4.0251453},{"time_hours":51,"approval_perbill":875000001,"support_perbill":39397289,"approval":87.5000001,"support":3.9397289},{"time_hours":52,"approval_perbill":872549021,"support_perbill":38572980,"approval":87.2549021,"support":3.857298},{"time_hours":53,"approval_perbill":870098040,"support_perbill":37776985,"approval":87.009804,"support":3.7776985},{"time_hours":54,"approval_perbill":867647060,"support_perbill":37007873,"approval":86.764706,"support":3.7007873},{"time_hours":55,"approval_perbill":865196079,"support_perbill":36264302,"approval":86.5196079,"support":3.6264302},{"time_hours":56,"approval_perbill":862745099,"support_perbill":35545023,"approval":86.2745099,"support":3.5545023},{"time_hours":57,"approval_perbill":860294118,"support_perbill":34848862,"approval":86.0294118,"support":3.4848862},{"time_hours":58,"approval_perbill":857843138,"support_perbill":34174724,"approval":85.7843138,"support":3.4174724},{"time_hours":59,"approval_perbill":855392157,"support_perbill":33521580,"approval":85.5392157,"support":3.352158},{"time_hours":60,"approval_perbill":852941177,"support_perbill":32888464,"approval":85.2941177,"support":3.2888464},{"time_hours":61,"approval_perbill":850490197,"support_perbill":32274469,"approval":85.0490197,"support":3.2274469},{"time_hours":62,"approval_perbill":848039217,"support_perbill":31678741,"approval":84.8039217,"support":3.1678741},{"time_hours":63,"approval_perbill":845588236,"support_perbill":31100477,"approval":84.5588236,"support":3.1100477},{"time_hours":64,"approval_perbill":843137256,"support_perbill":30538921,"approval":84.3137256,"support":3.0538921},{"time_hours":65,"approval_perbill":840686276,"support_perbill":29993358,"approval":84.0686276,"support":2.9993358},{"time_hours":66,"approval_perbill":838235295,"support_perbill":29463116,"approval":83.8235295,"support":2.9463116},{"time_hours":67,"approval_perbill":835784315,"support_perbill":28947556,"approval":83.5784315,"support":2.8947556},{"time_hours":68,"approval_perbill":833333334,"support_perbill":28446079,"approval":83.3333334,"support":2.8446079},{"time_hours":69,"approval_perbill":830882354,"support_perbill":27958114,"approval":83.0882354,"support":2.7958114},{"time_hours":70,"approval_perbill":828431373,"support_perbill":27483123,"approval":82.8431373,"support":2.7483123},{"time_hours":71,"approval_perbill":825980393,"support_perbill":27020596,"approval":82.5980393,"support":2.7020596},{"time_hours":72,"approval_perbill":823529412,"support_perbill":26570047,"approval":82.3529412,"support":2.6570047},{"time_hours":73,"approval_perbill":821078432,"support_perbill":26131019,"approval":82.1078432,"support":2.6131019},{"time_hours":74,"approval_perbill":818627452,"support_perbill":25703073,"approval":81.8627452,"support":2.5703073},{"time_hours":75,"approval_perbill":816176472,"support_perbill":25285796,"approval":81.6176472,"support":2.5285796},{"time_hours":76,"approval_perbill":813725491,"support_perbill":24878795,"approval":81.3725491,"support":2.4878795},{"time_hours":77,"approval_perbill":811274511,"support_perbill":24481693,"approval":81.1274511,"support":2.4481693},{"time_hours":78,"approval_perbill":808823530,"support_perbill":24094134,"approval":80.882353,"support":2.4094134},{"time_hours":79,"approval_perbill":806372550,"support_perbill":23715779,"approval":80.637255,"support":2.3715779},{"time_hours":80,"approval_perbill":803921569,"support_perbill":23346303,"approval":80.3921569,"support":2.3346303},{"time_hours":81,"approval_perbill":801470589,"support_perbill":22985397,"approval":80.1470589,"support":2.2985397},{"time_hours":82,"approval_perbill":799019608,"support_perbill":22632766,"approval":79.9019608,"support":2.2632766},{"time_hours":83,"approval_perbill":796568628,"support_perbill":22288130,"approval":79.6568628,"support":2.228813},{"time_hours":84,"approval_perbill":794117648,"support_perbill":21951219,"approval":79.4117648,"support":2.1951219},{"time_hours":85,"approval_perbill":791666668,"support_perbill":21621776,"approval":79.1666668,"support":2.1621776},{"time_hours":86,"approval_perbill":789215688,"support_perbill":21299556,"approval":78.9215688,"support":2.1299556},{"time_hours":87,"approval_perbill":786764707,"support_perbill":20984324,"approval":78.6764707,"support":2.0984324},{"time_hours":88,"approval_perbill":784313727,"support_perbill":20675855,"approval":78.4313727,"support":2.0675855},{"time_hours":89,"approval_perbill":781862746,"support_perbill":20373934,"approval":78.1862746,"support":2.0373934},{"time_hours":90,"approval_perbill":779411766,"support_perbill":20078354,"approval":77.9411766,"support":2.0078354},{"time_hours":91,"approval_perbill":776960785,"support_perbill":19788917,"approval":77.6960785,"support":1.9788917},{"time_hours":92,"approval_perbill":774509805,"support_perbill":19505435,"approval":77.4509805,"support":1.9505435},{"time_hours":93,"approval_perbill":772058824,"support_perbill":19227725,"approval":77.2058824,"support":1.9227725},{"time_hours":94,"approval_perbill":769607844,"support_perbill":18955613,"approval":76.9607844,"support":1.8955613},{"time_hours":95,"approval_perbill":767156863,"support_perbill":18688931,"approval":76.7156863,"support":1.8688931},{"time_hours":96,"approval_perbill":764705883,"support_perbill":18427518,"approval":76.4705883,"support":1.8427518},{"time_hours":97,"approval_perbill":762254903,"support_perbill":18171219,"approval":76.2254903,"support":1.8171219},{"time_hours":98,"approval_perbill":759803923,"support_perbill":17919887,"approval":75.9803923,"support":1.7919887},{"time_hours":99,"approval_perbill":757352942,"support_perbill":17673377,"approval":75.7352942,"support":1.7673377},{"time_hours":100,"approval_perbill":754901962,"support_perbill":17431553,"approval":75.4901962,"support":1.7431553},{"time_hours":101,"approval_perbill":752450981,"support_perbill":17194282,"approval":75.2450981,"support":1.7194282},{"time_hours":102,"approval_perbill":750000001,"support_perbill":16961437,"approval":75.0000001,"support":1.6961437},{"time_hours":103,"approval_perbill":747549020,"support_perbill":16732895,"approval":74.754902,"support":1.6732895},{"time_hours":104,"approval_perbill":745098040,"support_perbill":16508538,"approval":74.509804,"support":1.6508538},{"time_hours":105,"approval_perbill":742647059,"support_perbill":16288252,"approval":74.2647059,"support":1.6288252},{"time_hours":106,"approval_perbill":740196079,"support_perbill":16071927,"approval":74.0196079,"support":1.6071927},{"time_hours":107,"approval_perbill":737745099,"support_perbill":15859457,"approval":73.7745099,"support":1.5859457},{"time_hours":108,"approval_perbill":735294118,"support_perbill":15650741,"approval":73.5294118,"support":1.5650741},{"time_hours":109,"approval_perbill":732843138,"support_perbill":15445679,"approval":73.2843138,"support":1.5445679},{"time_hours":110,"approval_perbill":730392158,"support_perbill":15244176,"approval":73.0392158,"support":1.5244176},{"time_hours":111,"approval_perbill":727941178,"support_perbill":15046141,"approval":72.7941178,"support":1.5046141},{"time_hours":112,"approval_perbill":725490197,"support_perbill":14851485,"approval":72.5490197,"support":1.4851485},{"time_hours":113,"approval_perbill":723039217,"support_perbill":14660121,"approval":72.3039217,"support":1.4660121},{"time_hours":114,"approval_perbill":720588236,"support_perbill":14471968,"approval":72.0588236,"support":1.4471968},{"time_hours":115,"approval_perbill":718137256,"support_perbill":14286945,"approval":71.8137256,"support":1.4286945},{"time_hours":116,"approval_perbill":715686275,"support_perbill":14104975,"approval":71.5686275,"support":1.4104975},{"time_hours":117,"approval_perbill":713235295,"support_perbill":13925982,"approval":71.3235295,"support":1.3925982},{"time_hours":118,"approval_perbill":710784314,"support_perbill":13749894,"approval":71.0784314,"support":1.3749894},{"time_hours":119,"approval_perbill":708333334,"support_perbill":13576642,"approval":70.8333334,"support":1.3576642},{"time_hours":120,"approval_perbill":705882353,"support_perbill":13406156,"approval":70.5882353,"support":1.3406156},{"time_hours":121,"approval_perbill":703431373,"support_perbill":13238372,"approval":70.3431373,"support":1.3238372},{"time_hours":122,"approval_perbill":700980393,"support_perbill":13073226,"approval":70.0980393,"support":1.3073226},{"time_hours":123,"approval_perbill":698529413,"support_perbill":12910655,"approval":69.8529413,"support":1.2910655},{"time_hours":124,"approval_perbill":696078432,"support_perbill":12750601,"approval":69.6078432,"support":1.2750601},{"time_hours":125,"approval_perbill":693627452,"support_perbill":12593005,"approval":69.3627452,"support":1.2593005},{"time_hours":126,"approval_perbill":691176471,"support_perbill":12437810,"approval":69.1176471,"support":1.243781},{"time_hours":127,"approval_perbill":688725491,"support_perbill":12284964,"approval":68.8725491,"support":1.2284964},{"time_hours":128,"approval_perbill":686274511,"support_perbill":12134411,"approval":68.6274511,"support":1.2134411},{"time_hours":129,"approval_perbill":683823530,"support_perbill":11986103,"approval":68.382353,"support":1.1986103},{"time_hours":130,"approval_perbill":681372550,"support_perbill":11839987,"approval":68.137255,"support":1.1839987},{"time_hours":131,"approval_perbill":678921569,"support_perbill":11696017,"approval":67.8921569,"support":1.1696017},{"time_hours":132,"approval_perbill":676470589,"support_perbill":11554145,"approval":67.6470589,"support":1.1554145},{"time_hours":133,"approval_perbill":674019609,"support_perbill":11414326,"approval":67.4019609,"support":1.1414326},{"time_hours":134,"approval_perbill":671568629,"support_perbill":11276516,"approval":67.1568629,"support":1.1276516},{"time_hours":135,"approval_perbill":669117648,"support_perbill":11140671,"approval":66.9117648,"support":1.1140671},{"time_hours":136,"approval_perbill":666666668,"support_perbill":11006750,"approval":66.6666668,"support":1.100675},{"time_hours":137,"approval_perbill":664215687,"support_perbill":10874713,"approval":66.4215687,"support":1.0874713},{"time_hours":138,"approval_perbill":661764707,"support_perbill":10744519,"approval":66.1764707,"support":1.0744519},{"time_hours":139,"approval_perbill":659313726,"support_perbill":10616130,"approval":65.9313726,"support":1.061613},{"time_hours":140,"approval_perbill":656862746,"support_perbill":10489510,"approval":65.6862746,"support":1.048951},{"time_hours":141,"approval_perbill":654411765,"support_perbill":10364622,"approval":65.4411765,"support":1.0364622},{"time_hours":142,"approval_perbill":651960785,"support_perbill":10241430,"approval":65.1960785,"support":1.024143},{"time_hours":143,"approval_perbill":649509804,"support_perbill":10119900,"approval":64.9509804,"support":1.01199},{"time_hours":144,"approval_perbill":647058824,"support_perbill":10000000,"approval":64.7058824,"support":1},{"time_hours":145,"approval_perbill":644607844,"support_perbill":9881695,"approval":64.4607844,"support":0.9881695},{"time_hours":146,"approval_perbill":642156864,"support_perbill":9764955,"approval":64.2156864,"support":0.9764955},{"time_hours":147,"approval_perbill":639705883,"support_perbill":9649749,"approval":63.9705883,"support":0.9649749},{"time_hours":148,"approval_perbill":637254903,"support_perbill":9536047,"approval":63.7254903,"support":0.9536047},{"time_hours":149,"approval_perbill":634803923,"support_perbill":9423820,"approval":63.4803923,"support":0.942382},{"time_hours":150,"approval_perbill":632352942,"support_perbill":9313038,"approval":63.2352942,"support":0.9313038},{"time_hours":151,"approval_perbill":629901962,"support_perbill":9203674,"approval":62.9901962,"support":0.9203674},{"time_hours":152,"approval_perbill":627450981,"support_perbill":9095702,"approval":62.7450981,"support":0.9095702},{"time_hours":153,"approval_perbill":625000001,"support_perbill":8989095,"approval":62.5000001,"support":0.8989095},{"time_hours":154,"approval_perbill":622549020,"support_perbill":8883826,"approval":62.254902,"support":0.8883826},{"time_hours":155,"approval_perbill":620098040,"support_perbill":8779872,"approval":62.009804,"support":0.8779872},{"time_hours":156,"approval_perbill":617647059,"support_perbill":8677207,"approval":61.7647059,"support":0.8677207},{"time_hours":157,"approval_perbill":615196079,"support_perbill":8575808,"approval":61.5196079,"support":0.8575808},{"time_hours":158,"approval_perbill":612745099,"support_perbill":8475652,"approval":61.2745099,"support":0.8475652},{"time_hours":159,"approval_perbill":610294119,"support_perbill":8376715,"approval":61.0294119,"support":0.8376715},{"time_hours":160,"approval_perbill":607843138,"support_perbill":8278976,"approval":60.7843138,"support":0.8278976},{"time_hours":161,"approval_perbill":605392158,"support_perbill":8182413,"approval":60.5392158,"support":0.8182413},{"time_hours":162,"approval_perbill":602941177,"support_perbill":8087005,"approval":60.2941177,"support":0.8087005},{"time_hours":163,"approval_perbill":600490197,"support_perbill":7992731,"approval":60.0490197,"support":0.7992731},{"time_hours":164,"approval_perbill":598039216,"support_perbill":7899571,"approval":59.8039216,"support":0.7899571},{"time_hours":165,"approval_perbill":595588236,"support_perbill":7807506,"approval":59.5588236,"support":0.7807506},{"time_hours":166,"approval_perbill":593137255,"support_perbill":7716516,"approval":59.3137255,"support":0.7716516},{"time_hours":167,"approval_perbill":590686275,"support_perbill":7626583,"approval":59.0686275,"support":0.7626583},{"time_hours":168,"approval_perbill":588235295,"support_perbill":7537688,"approval":58.8235295,"support":0.7537688},{"time_hours":169,"approval_perbill":585784315,"support_perbill":7449814,"approval":58.5784315,"support":0.7449814},{"time_hours":170,"approval_perbill":583333335,"support_perbill":7362942,"approval":58.3333335,"support":0.7362942},{"time_hours":171,"approval_perbill":580882354,"support_perbill":7277057,"approval":58.0882354,"support":0.7277057},{"time_hours":172,"approval_perbill":578431374,"support_perbill":7192141,"approval":57.8431374,"support":0.7192141},{"time_hours":173,"approval_perbill":575980393,"support_perbill":7108178,"approval":57.5980393,"support":0.7108178},{"time_hours":174,"approval_perbill":573529413,"support_perbill":7025151,"approval":57.3529413,"support":0.7025151},{"time_hours":175,"approval_perbill":571078432,"support_perbill":6943047,"approval":57.1078432,"support":0.6943047},{"time_hours":176,"approval_perbill":568627452,"support_perbill":6861848,"approval":56.8627452,"support":0.6861848},{"time_hours":177,"approval_perbill":566176471,"support_perbill":6781540,"approval":56.6176471,"support":0.678154},{"time_hours":178,"approval_perbill":563725491,"support_perbill":6702109,"approval":56.3725491,"support":0.6702109},{"time_hours":179,"approval_perbill":561274510,"support_perbill":6623541,"approval":56.127451,"support":0.6623541},{"time_hours":180,"approval_perbill":558823530,"support_perbill":6545820,"approval":55.882353,"support":0.654582},{"time_hours":181,"approval_perbill":556372550,"support_perbill":6468935,"approval":55.637255,"support":0.6468935},{"time_hours":182,"approval_perbill":553921570,"support_perbill":6392871,"approval":55.392157,"support":0.6392871},{"time_hours":183,"approval_perbill":551470589,"support_perbill":6317615,"approval":55.1470589,"support":0.6317615},{"time_hours":184,"approval_perbill":549019609,"support_perbill":6243154,"approval":54.9019609,"support":0.6243154},{"time_hours":185,"approval_perbill":546568628,"support_perbill":6169476,"approval":54.6568628,"support":0.6169476},{"time_hours":186,"approval_perbill":544117648,"support_perbill":6096569,"approval":54.4117648,"support":0.6096569},{"time_hours":187,"approval_perbill":541666667,"support_perbill":6024421,"approval":54.1666667,"support":0.6024421},{"time_hours":188,"approval_perbill":539215687,"support_perbill":5953019,"approval":53.9215687,"support":0.5953019},{"time_hours":189,"approval_perbill":536764706,"support_perbill":5882353,"approval":53.6764706,"support":0.5882353},{"time_hours":190,"approval_perbill":534313726,"support_perbill":5812410,"approval":53.4313726,"support":0.581241},{"time_hours":191,"approval_perbill":531862746,"support_perbill":5743181,"approval":53.1862746,"support":0.5743181},{"time_hours":192,"approval_perbill":529411765,"support_perbill":5674653,"approval":52.9411765,"support":0.5674653},{"time_hours":193,"approval_perbill":526960785,"support_perbill":5606817,"approval":52.6960785,"support":0.5606817},{"time_hours":194,"approval_perbill":524509805,"support_perbill":5539662,"approval":52.4509805,"support":0.5539662},{"time_hours":195,"approval_perbill":522058825,"support_perbill":5473177,"approval":52.2058825,"support":0.5473177},{"time_hours":196,"approval_perbill":519607844,"support_perbill":5407354,"approval":51.9607844,"support":0.5407354},{"time_hours":197,"approval_perbill":517156864,"support_perbill":5342181,"approval":51.7156864,"support":0.5342181},{"time_hours":198,"approval_perbill":514705883,"support_perbill":5277650,"approval":51.4705883,"support":0.527765},{"time_hours":199,"approval_perbill":512254903,"support_perbill":5213751,"approval":51.2254903,"support":0.5213751},{"time_hours":200,"approval_perbill":509803922,"support_perbill":5150474,"approval":50.9803922,"support":0.5150474},{"time_hours":201,"approval_perbill":507352942,"support_perbill":5087812,"approval":50.7352942,"support":0.5087812},{"time_hours":202,"approval_perbill":504901961,"support_perbill":5025754,"approval":50.4901961,"support":0.5025754},{"time_hours":203,"approval_perbill":502450981,"support_perbill":4964292,"approval":50.2450981,"support":0.4964292},{"time_hours":204,"approval_perbill":500000000,"support_perbill":4903417,"approval":50,"support":0.4903417},{"time_hours":205,"approval_perbill":500000000,"support_perbill":4843122,"approval":50,"support":0.4843122},{"time_hours":206,"approval_perbill":500000000,"support_perbill":4783398,"approval":50,"support":0.4783398},{"time_hours":207,"approval_perbill":500000000,"support_perbill":4724236,"approval":50,"support":0.4724236},{"time_hours":208,"approval_perbill":500000000,"support_perbill":4665630,"approval":50,"support":0.466563},{"time_hours":209,"approval_perbill":500000000,"support_perbill":4607570,"approval":50,"support":0.460757},{"time_hours":210,"approval_perbill":500000000,"support_perbill":4550050,"approval":50,"support":0.455005},{"time_hours":211,"approval_perbill":500000000,"support_perbill":4493062,"approval":50,"support":0.4493062},{"time_hours":212,"approval_perbill":500000000,"support_perbill":4436599,"approval":50,"support":0.4436599},{"time_hours":213,"approval_perbill":500000000,"support_perbill":4380654,"approval":50,"support":0.4380654},{"time_hours":214,"approval_perbill":500000000,"support_perbill":4325218,"approval":50,"support":0.4325218},{"time_hours":215,"approval_perbill":500000000,"support_perbill":4270287,"approval":50,"support":0.4270287},{"time_hours":216,"approval_perbill":500000000,"support_perbill":4215851,"approval":50,"support":0.4215851},{"time_hours":217,"approval_perbill":500000000,"support_perbill":4161906,"approval":50,"support":0.4161906},{"time_hours":218,"approval_perbill":500000000,"support_perbill":4108444,"approval":50,"support":0.4108444},{"time_hours":219,"approval_perbill":500000000,"support_perbill":4055459,"approval":50,"support":0.4055459},{"time_hours":220,"approval_perbill":500000000,"support_perbill":4002944,"approval":50,"support":0.4002944},{"time_hours":221,"approval_perbill":500000000,"support_perbill":3950894,"approval":50,"support":0.3950894},{"time_hours":222,"approval_perbill":500000000,"support_perbill":3899302,"approval":50,"support":0.3899302},{"time_hours":223,"approval_perbill":500000000,"support_perbill":3848162,"approval":50,"support":0.3848162},{"time_hours":224,"approval_perbill":500000000,"support_perbill":3797468,"approval":50,"support":0.3797468},{"time_hours":225,"approval_perbill":500000000,"support_perbill":3747215,"approval":50,"support":0.3747215},{"time_hours":226,"approval_perbill":500000000,"support_perbill":3697396,"approval":50,"support":0.3697396},{"time_hours":227,"approval_perbill":500000000,"support_perbill":3648006,"approval":50,"support":0.3648006},{"time_hours":228,"approval_perbill":500000000,"support_perbill":3599040,"approval":50,"support":0.359904},{"time_hours":229,"approval_perbill":500000000,"support_perbill":3550492,"approval":50,"support":0.3550492},{"time_hours":230,"approval_perbill":500000000,"support_perbill":3502357,"approval":50,"support":0.3502357},{"time_hours":231,"approval_perbill":500000000,"support_perbill":3454629,"approval":50,"support":0.3454629},{"time_hours":232,"approval_perbill":500000000,"support_perbill":3407304,"approval":50,"support":0.3407304},{"time_hours":233,"approval_perbill":500000000,"support_perbill":3360376,"approval":50,"support":0.3360376},{"time_hours":234,"approval_perbill":500000000,"support_perbill":3313840,"approval":50,"support":0.331384},{"time_hours":235,"approval_perbill":500000000,"support_perbill":3267692,"approval":50,"support":0.3267692},{"time_hours":236,"approval_perbill":500000000,"support_perbill":3221926,"approval":50,"support":0.3221926},{"time_hours":237,"approval_perbill":500000000,"support_perbill":3176538,"approval":50,"support":0.3176538},{"time_hours":238,"approval_perbill":500000000,"support_perbill":3131524,"approval":50,"support":0.3131524},{"time_hours":239,"approval_perbill":500000000,"support_perbill":3086878,"approval":50,"support":0.3086878},{"time_hours":240,"approval_perbill":500000000,"support_perbill":3042596,"approval":50,"support":0.3042596},{"time_hours":241,"approval_perbill":500000000,"support_perbill":2998674,"approval":50,"support":0.2998674},{"time_hours":242,"approval_perbill":500000000,"support_perbill":2955107,"approval":50,"support":0.2955107},{"time_hours":243,"approval_perbill":500000000,"support_perbill":2911892,"approval":50,"support":0.2911892},{"time_hours":244,"approval_perbill":500000000,"support_perbill":2869023,"approval":50,"support":0.2869023},{"time_hours":245,"approval_perbill":500000000,"support_perbill":2826496,"approval":50,"support":0.2826496},{"time_hours":246,"approval_perbill":500000000,"support_perbill":2784309,"approval":50,"support":0.2784309},{"time_hours":247,"approval_perbill":500000000,"support_perbill":2742455,"approval":50,"support":0.2742455},{"time_hours":248,"approval_perbill":500000000,"support_perbill":2700933,"approval":50,"support":0.2700933},{"time_hours":249,"approval_perbill":500000000,"support_perbill":2659737,"approval":50,"support":0.2659737},{"time_hours":250,"approval_perbill":500000000,"support_perbill":2618864,"approval":50,"support":0.2618864},{"time_hours":251,"approval_perbill":500000000,"support_perbill":2578310,"approval":50,"support":0.257831},{"time_hours":252,"approval_perbill":500000000,"support_perbill":2538071,"approval":50,"support":0.2538071},{"time_hours":253,"approval_perbill":500000000,"support_perbill":2498144,"approval":50,"support":0.2498144},{"time_hours":254,"approval_perbill":500000000,"support_perbill":2458525,"approval":50,"support":0.2458525},{"time_hours":255,"approval_perbill":500000000,"support_perbill":2419210,"approval":50,"support":0.241921},{"time_hours":256,"approval_perbill":500000000,"support_perbill":2380197,"approval":50,"support":0.2380197},{"time_hours":257,"approval_perbill":500000000,"support_perbill":2341481,"approval":50,"support":0.2341481},{"time_hours":258,"approval_perbill":500000000,"support_perbill":2303059,"approval":50,"support":0.2303059},{"time_hours":259,"approval_perbill":500000000,"support_perbill":2264928,"approval":50,"support":0.2264928},{"time_hours":260,"approval_perbill":500000000,"support_perbill":2227084,"approval":50,"support":0.2227084},{"time_hours":261,"approval_perbill":500000000,"support_perbill":2189525,"approval":50,"support":0.2189525},{"time_hours":262,"approval_perbill":500000000,"support_perbill":2152247,"approval":50,"support":0.2152247},{"time_hours":263,"approval_perbill":500000000,"support_perbill":2115247,"approval":50,"support":0.2115247},{"time_hours":264,"approval_perbill":500000000,"support_perbill":2078522,"approval":50,"support":0.2078522},{"time_hours":265,"approval_perbill":500000000,"support_perbill":2042068,"approval":50,"support":0.2042068},{"time_hours":266,"approval_perbill":500000000,"support_perbill":2005884,"approval":50,"support":0.2005884},{"time_hours":267,"approval_perbill":500000000,"support_perbill":1969965,"approval":50,"support":0.1969965},{"time_hours":268,"approval_perbill":500000000,"support_perbill":1934309,"approval":50,"support":0.1934309},{"time_hours":269,"approval_perbill":500000000,"support_perbill":1898913,"approval":50,"support":0.1898913},{"time_hours":270,"approval_perbill":500000000,"support_perbill":1863775,"approval":50,"support":0.1863775},{"time_hours":271,"approval_perbill":500000000,"support_perbill":1828891,"approval":50,"support":0.1828891},{"time_hours":272,"approval_perbill":500000000,"support_perbill":1794258,"approval":50,"support":0.1794258},{"time_hours":273,"approval_perbill":500000000,"support_perbill":1759875,"approval":50,"support":0.1759875},{"time_hours":274,"approval_perbill":500000000,"support_perbill":1725737,"approval":50,"support":0.1725737},{"time_hours":275,"approval_perbill":500000000,"support_perbill":1691844,"approval":50,"support":0.1691844},{"time_hours":276,"approval_perbill":500000000,"support_perbill":1658191,"approval":50,"support":0.1658191},{"time_hours":277,"approval_perbill":500000000,"support_perbill":1624777,"approval":50,"support":0.1624777},{"time_hours":278,"approval_perbill":500000000,"support_perbill":1591599,"approval":50,"support":0.1591599},{"time_hours":279,"approval_perbill":500000000,"support_perbill":1558654,"approval":50,"support":0.1558654},{"time_hours":280,"approval_perbill":500000000,"support_perbill":1525941,"approval":50,"support":0.1525941},{"time_hours":281,"approval_perbill":500000000,"support_perbill":1493456,"approval":50,"support":0.1493456},{"time_hours":282,"approval_perbill":500000000,"support_perbill":1461197,"approval":50,"support":0.1461197},{"time_hours":283,"approval_perbill":500000000,"support_perbill":1429162,"approval":50,"support":0.1429162},{"time_hours":284,"approval_perbill":500000000,"support_perbill":1397348,"approval":50,"support":0.1397348},{"time_hours":285,"approval_perbill":500000000,"support_perbill":1365754,"approval":50,"support":0.1365754},{"time_hours":286,"approval_perbill":500000000,"support_perbill":1334377,"approval":50,"support":0.1334377},{"time_hours":287,"approval_perbill":500000000,"support_perbill":1303214,"approval":50,"support":0.1303214},{"time_hours":288,"approval_perbill":500000000,"support_perbill":1272264,"approval":50,"support":0.1272264},{"time_hours":289,"approval_perbill":500000000,"support_perbill":1241525,"approval":50,"support":0.1241525},{"time_hours":290,"approval_perbill":500000000,"support_perbill":1210994,"approval":50,"support":0.1210994},{"time_hours":291,"approval_perbill":500000000,"support_perbill":1180668,"approval":50,"support":0.1180668},{"time_hours":292,"approval_perbill":500000000,"support_perbill":1150547,"approval":50,"support":0.1150547},{"time_hours":293,"approval_perbill":500000000,"support_perbill":1120628,"approval":50,"support":0.1120628},{"time_hours":294,"approval_perbill":500000000,"support_perbill":1090909,"approval":50,"support":0.1090909},{"time_hours":295,"approval_perbill":500000000,"support_perbill":1061388,"approval":50,"support":0.1061388},{"time_hours":296,"approval_perbill":500000000,"support_perbill":1032063,"approval":50,"support":0.1032063},{"time_hours":297,"approval_perbill":500000000,"support_perbill":1002932,"approval":50,"support":0.1002932},{"time_hours":298,"approval_perbill":500000000,"support_perbill":973993,"approval":50,"support":0.0973993},{"time_hours":299,"approval_perbill":500000000,"support_perbill":945244,"approval":50,"support":0.0945244},{"time_hours":300,"approval_perbill":500000000,"support_perbill":916684,"approval":50,"support":0.0916684},{"time_hours":301,"approval_perbill":500000000,"support_perbill":888310,"approval":50,"support":0.088831},{"time_hours":302,"approval_perbill":500000000,"support_perbill":860121,"approval":50,"support":0.0860121},{"time_hours":303,"approval_perbill":500000000,"support_perbill":832114,"approval":50,"support":0.0832114},{"time_hours":304,"approval_perbill":500000000,"support_perbill":804289,"approval":50,"support":0.0804289},{"time_hours":305,"approval_perbill":500000000,"support_perbill":776644,"approval":50,"support":0.0776644},{"time_hours":306,"approval_perbill":500000000,"support_perbill":749176,"approval":50,"support":0.0749176},{"time_hours":307,"approval_perbill":500000000,"support_perbill":721884,"approval":50,"support":0.0721884},{"time_hours":308,"approval_perbill":500000000,"support_perbill":694766,"approval":50,"support":0.0694766},{"time_hours":309,"approval_perbill":500000000,"support_perbill":667821,"approval":50,"support":0.0667821},{"time_hours":310,"approval_perbill":500000000,"support_perbill":641047,"approval":50,"support":0.0641047},{"time_hours":311,"approval_perbill":500000000,"support_perbill":614442,"approval":50,"support":0.0614442},{"time_hours":312,"approval_perbill":500000000,"support_perbill":588005,"approval":50,"support":0.0588005},{"time_hours":313,"approval_perbill":500000000,"support_perbill":561734,"approval":50,"support":0.0561734},{"time_hours":314,"approval_perbill":500000000,"support_perbill":535627,"approval":50,"support":0.0535627},{"time_hours":315,"approval_perbill":500000000,"support_perbill":509684,"approval":50,"support":0.0509684},{"time_hours":316,"approval_perbill":500000000,"support_perbill":483902,"approval":50,"support":0.0483902},{"time_hours":317,"approval_perbill":500000000,"support_perbill":458280,"approval":50,"support":0.045828},{"time_hours":318,"approval_perbill":500000000,"support_perbill":432817,"approval":50,"support":0.0432817},{"time_hours":319,"approval_perbill":500000000,"support_perbill":407511,"approval":50,"support":0.0407511},{"time_hours":320,"approval_perbill":500000000,"support_perbill":382360,"approval":50,"support":0.038236},{"time_hours":321,"approval_perbill":500000000,"support_perbill":357364,"approval":50,"support":0.0357364},{"time_hours":322,"approval_perbill":500000000,"support_perbill":332520,"approval":50,"support":0.033252},{"time_hours":323,"approval_perbill":500000000,"support_perbill":307828,"approval":50,"support":0.0307828},{"time_hours":324,"approval_perbill":500000000,"support_perbill":283286,"approval":50,"support":0.0283286},{"time_hours":325,"approval_perbill":500000000,"support_perbill":258892,"approval":50,"support":0.0258892},{"time_hours":326,"approval_perbill":500000000,"support_perbill":234646,"approval":50,"support":0.0234646},{"time_hours":327,"approval_perbill":500000000,"support_perbill":210546,"approval":50,"support":0.0210546},{"time_hours":328,"approval_perbill":500000000,"support_perbill":186590,"approval":50,"support":0.018659},{"time_hours":329,"approval_perbill":500000000,"support_perbill":162778,"approval":50,"support":0.0162778},{"time_hours":330,"approval_perbill":500000000,"support_perbill":139108,"approval":50,"support":0.0139108},{"time_hours":331,"approval_perbill":500000000,"support_perbill":115578,"approval":50,"support":0.0115578},{"time_hours":332,"approval_perbill":500000000,"support_perbill":92188,"approval":50,"support":0.0092188},{"time_hours":333,"approval_perbill":500000000,"support_perbill":68937,"approval":50,"support":0.0068937},{"time_hours":334,"approval_perbill":500000000,"support_perbill":45822,"approval":50,"support":0.0045822},{"time_hours":335,"approval_perbill":500000000,"support_perbill":22844,"approval":50,"support":0.0022844},{"time_hours":336,"approval_perbill":500000000,"support_perbill":0,"approval":50,"support":0}]')},27289:p=>{"use strict";p.exports=JSON.parse('[{"time_hours":0,"approval_perbill":1000000000,"support_perbill":500000000,"approval":100,"support":50},{"time_hours":1,"approval_perbill":994100296,"support_perbill":498511905,"approval":99.4100296,"support":49.8511905},{"time_hours":2,"approval_perbill":988304096,"support_perbill":497023810,"approval":98.8304096,"support":49.702381},{"time_hours":3,"approval_perbill":982608697,"support_perbill":495535715,"approval":98.2608697,"support":49.5535715},{"time_hours":4,"approval_perbill":977011496,"support_perbill":494047620,"approval":97.7011496,"support":49.404762},{"time_hours":5,"approval_perbill":971509972,"support_perbill":492559524,"approval":97.1509972,"support":49.2559524},{"time_hours":6,"approval_perbill":966101697,"support_perbill":491071429,"approval":96.6101697,"support":49.1071429},{"time_hours":7,"approval_perbill":960784315,"support_perbill":489583334,"approval":96.0784315,"support":48.9583334},{"time_hours":8,"approval_perbill":955555557,"support_perbill":488095239,"approval":95.5555557,"support":48.8095239},{"time_hours":9,"approval_perbill":950413224,"support_perbill":486607143,"approval":95.0413224,"support":48.6607143},{"time_hours":10,"approval_perbill":945355193,"support_perbill":485119048,"approval":94.5355193,"support":48.5119048},{"time_hours":11,"approval_perbill":940379404,"support_perbill":483630953,"approval":94.0379404,"support":48.3630953},{"time_hours":12,"approval_perbill":935483872,"support_perbill":482142858,"approval":93.5483872,"support":48.2142858},{"time_hours":13,"approval_perbill":930666667,"support_perbill":480654762,"approval":93.0666667,"support":48.0654762},{"time_hours":14,"approval_perbill":925925927,"support_perbill":479166667,"approval":92.5925927,"support":47.9166667},{"time_hours":15,"approval_perbill":921259843,"support_perbill":477678572,"approval":92.1259843,"support":47.7678572},{"time_hours":16,"approval_perbill":916666668,"support_perbill":476190477,"approval":91.6666668,"support":47.6190477},{"time_hours":17,"approval_perbill":912144703,"support_perbill":474702381,"approval":91.2144703,"support":47.4702381},{"time_hours":18,"approval_perbill":907692309,"support_perbill":473214286,"approval":90.7692309,"support":47.3214286},{"time_hours":19,"approval_perbill":903307888,"support_perbill":471726191,"approval":90.3307888,"support":47.1726191},{"time_hours":20,"approval_perbill":898989900,"support_perbill":470238096,"approval":89.89899,"support":47.0238096},{"time_hours":21,"approval_perbill":894736842,"support_perbill":468750000,"approval":89.4736842,"support":46.875},{"time_hours":22,"approval_perbill":890547265,"support_perbill":467261905,"approval":89.0547265,"support":46.7261905},{"time_hours":23,"approval_perbill":886419755,"support_perbill":465773810,"approval":88.6419755,"support":46.577381},{"time_hours":24,"approval_perbill":882352942,"support_perbill":464285715,"approval":88.2352942,"support":46.4285715},{"time_hours":25,"approval_perbill":878345500,"support_perbill":462797620,"approval":87.83455,"support":46.279762},{"time_hours":26,"approval_perbill":874396136,"support_perbill":461309524,"approval":87.4396136,"support":46.1309524},{"time_hours":27,"approval_perbill":870503599,"support_perbill":459821429,"approval":87.0503599,"support":45.9821429},{"time_hours":28,"approval_perbill":866666667,"support_perbill":458333334,"approval":86.6666667,"support":45.8333334},{"time_hours":29,"approval_perbill":862884162,"support_perbill":456845239,"approval":86.2884162,"support":45.6845239},{"time_hours":30,"approval_perbill":859154930,"support_perbill":455357143,"approval":85.915493,"support":45.5357143},{"time_hours":31,"approval_perbill":855477857,"support_perbill":453869048,"approval":85.5477857,"support":45.3869048},{"time_hours":32,"approval_perbill":851851852,"support_perbill":452380953,"approval":85.1851852,"support":45.2380953},{"time_hours":33,"approval_perbill":848275863,"support_perbill":450892858,"approval":84.8275863,"support":45.0892858},{"time_hours":34,"approval_perbill":844748859,"support_perbill":449404762,"approval":84.4748859,"support":44.9404762},{"time_hours":35,"approval_perbill":841269842,"support_perbill":447916667,"approval":84.1269842,"support":44.7916667},{"time_hours":36,"approval_perbill":837837838,"support_perbill":446428572,"approval":83.7837838,"support":44.6428572},{"time_hours":37,"approval_perbill":834451903,"support_perbill":444940477,"approval":83.4451903,"support":44.4940477},{"time_hours":38,"approval_perbill":831111112,"support_perbill":443452381,"approval":83.1111112,"support":44.3452381},{"time_hours":39,"approval_perbill":827814570,"support_perbill":441964286,"approval":82.781457,"support":44.1964286},{"time_hours":40,"approval_perbill":824561404,"support_perbill":440476191,"approval":82.4561404,"support":44.0476191},{"time_hours":41,"approval_perbill":821350763,"support_perbill":438988096,"approval":82.1350763,"support":43.8988096},{"time_hours":42,"approval_perbill":818181818,"support_perbill":437500000,"approval":81.8181818,"support":43.75},{"time_hours":43,"approval_perbill":815053764,"support_perbill":436011905,"approval":81.5053764,"support":43.6011905},{"time_hours":44,"approval_perbill":811965813,"support_perbill":434523810,"approval":81.1965813,"support":43.452381},{"time_hours":45,"approval_perbill":808917198,"support_perbill":433035715,"approval":80.8917198,"support":43.3035715},{"time_hours":46,"approval_perbill":805907174,"support_perbill":431547620,"approval":80.5907174,"support":43.154762},{"time_hours":47,"approval_perbill":802935011,"support_perbill":430059524,"approval":80.2935011,"support":43.0059524},{"time_hours":48,"approval_perbill":800000001,"support_perbill":428571429,"approval":80.0000001,"support":42.8571429},{"time_hours":49,"approval_perbill":797101450,"support_perbill":427083334,"approval":79.710145,"support":42.7083334},{"time_hours":50,"approval_perbill":794238684,"support_perbill":425595239,"approval":79.4238684,"support":42.5595239},{"time_hours":51,"approval_perbill":791411043,"support_perbill":424107143,"approval":79.1411043,"support":42.4107143},{"time_hours":52,"approval_perbill":788617887,"support_perbill":422619048,"approval":78.8617887,"support":42.2619048},{"time_hours":53,"approval_perbill":785858586,"support_perbill":421130953,"approval":78.5858586,"support":42.1130953},{"time_hours":54,"approval_perbill":783132531,"support_perbill":419642858,"approval":78.3132531,"support":41.9642858},{"time_hours":55,"approval_perbill":780439122,"support_perbill":418154762,"approval":78.0439122,"support":41.8154762},{"time_hours":56,"approval_perbill":777777779,"support_perbill":416666667,"approval":77.7777779,"support":41.6666667},{"time_hours":57,"approval_perbill":775147929,"support_perbill":415178572,"approval":77.5147929,"support":41.5178572},{"time_hours":58,"approval_perbill":772549020,"support_perbill":413690477,"approval":77.254902,"support":41.3690477},{"time_hours":59,"approval_perbill":769980507,"support_perbill":412202381,"approval":76.9980507,"support":41.2202381},{"time_hours":60,"approval_perbill":767441861,"support_perbill":410714286,"approval":76.7441861,"support":41.0714286},{"time_hours":61,"approval_perbill":764932563,"support_perbill":409226191,"approval":76.4932563,"support":40.9226191},{"time_hours":62,"approval_perbill":762452108,"support_perbill":407738096,"approval":76.2452108,"support":40.7738096},{"time_hours":63,"approval_perbill":760000000,"support_perbill":406250000,"approval":76,"support":40.625},{"time_hours":64,"approval_perbill":757575758,"support_perbill":404761905,"approval":75.7575758,"support":40.4761905},{"time_hours":65,"approval_perbill":755178909,"support_perbill":403273810,"approval":75.5178909,"support":40.327381},{"time_hours":66,"approval_perbill":752808989,"support_perbill":401785715,"approval":75.2808989,"support":40.1785715},{"time_hours":67,"approval_perbill":750465550,"support_perbill":400297620,"approval":75.046555,"support":40.029762},{"time_hours":68,"approval_perbill":748148149,"support_perbill":398809524,"approval":74.8148149,"support":39.8809524},{"time_hours":69,"approval_perbill":745856354,"support_perbill":397321429,"approval":74.5856354,"support":39.7321429},{"time_hours":70,"approval_perbill":743589744,"support_perbill":395833334,"approval":74.3589744,"support":39.5833334},{"time_hours":71,"approval_perbill":741347906,"support_perbill":394345239,"approval":74.1347906,"support":39.4345239},{"time_hours":72,"approval_perbill":739130435,"support_perbill":392857143,"approval":73.9130435,"support":39.2857143},{"time_hours":73,"approval_perbill":736936938,"support_perbill":391369048,"approval":73.6936938,"support":39.1369048},{"time_hours":74,"approval_perbill":734767025,"support_perbill":389880953,"approval":73.4767025,"support":38.9880953},{"time_hours":75,"approval_perbill":732620322,"support_perbill":388392858,"approval":73.2620322,"support":38.8392858},{"time_hours":76,"approval_perbill":730496454,"support_perbill":386904762,"approval":73.0496454,"support":38.6904762},{"time_hours":77,"approval_perbill":728395062,"support_perbill":385416667,"approval":72.8395062,"support":38.5416667},{"time_hours":78,"approval_perbill":726315790,"support_perbill":383928572,"approval":72.631579,"support":38.3928572},{"time_hours":79,"approval_perbill":724258290,"support_perbill":382440477,"approval":72.425829,"support":38.2440477},{"time_hours":80,"approval_perbill":722222222,"support_perbill":380952381,"approval":72.2222222,"support":38.0952381},{"time_hours":81,"approval_perbill":720207254,"support_perbill":379464286,"approval":72.0207254,"support":37.9464286},{"time_hours":82,"approval_perbill":718213059,"support_perbill":377976191,"approval":71.8213059,"support":37.7976191},{"time_hours":83,"approval_perbill":716239317,"support_perbill":376488096,"approval":71.6239317,"support":37.6488096},{"time_hours":84,"approval_perbill":714285714,"support_perbill":375000000,"approval":71.4285714,"support":37.5},{"time_hours":85,"approval_perbill":712351946,"support_perbill":373511905,"approval":71.2351946,"support":37.3511905},{"time_hours":86,"approval_perbill":710437711,"support_perbill":372023810,"approval":71.0437711,"support":37.202381},{"time_hours":87,"approval_perbill":708542714,"support_perbill":370535715,"approval":70.8542714,"support":37.0535715},{"time_hours":88,"approval_perbill":706666667,"support_perbill":369047620,"approval":70.6666667,"support":36.904762},{"time_hours":89,"approval_perbill":704809287,"support_perbill":367559524,"approval":70.4809287,"support":36.7559524},{"time_hours":90,"approval_perbill":702970298,"support_perbill":366071429,"approval":70.2970298,"support":36.6071429},{"time_hours":91,"approval_perbill":701149426,"support_perbill":364583334,"approval":70.1149426,"support":36.4583334},{"time_hours":92,"approval_perbill":699346406,"support_perbill":363095239,"approval":69.9346406,"support":36.3095239},{"time_hours":93,"approval_perbill":697560976,"support_perbill":361607143,"approval":69.7560976,"support":36.1607143},{"time_hours":94,"approval_perbill":695792881,"support_perbill":360119048,"approval":69.5792881,"support":36.0119048},{"time_hours":95,"approval_perbill":694041868,"support_perbill":358630953,"approval":69.4041868,"support":35.8630953},{"time_hours":96,"approval_perbill":692307693,"support_perbill":357142858,"approval":69.2307693,"support":35.7142858},{"time_hours":97,"approval_perbill":690590112,"support_perbill":355654762,"approval":69.0590112,"support":35.5654762},{"time_hours":98,"approval_perbill":688888889,"support_perbill":354166667,"approval":68.8888889,"support":35.4166667},{"time_hours":99,"approval_perbill":687203792,"support_perbill":352678572,"approval":68.7203792,"support":35.2678572},{"time_hours":100,"approval_perbill":685534592,"support_perbill":351190477,"approval":68.5534592,"support":35.1190477},{"time_hours":101,"approval_perbill":683881064,"support_perbill":349702381,"approval":68.3881064,"support":34.9702381},{"time_hours":102,"approval_perbill":682242991,"support_perbill":348214286,"approval":68.2242991,"support":34.8214286},{"time_hours":103,"approval_perbill":680620155,"support_perbill":346726191,"approval":68.0620155,"support":34.6726191},{"time_hours":104,"approval_perbill":679012346,"support_perbill":345238096,"approval":67.9012346,"support":34.5238096},{"time_hours":105,"approval_perbill":677419355,"support_perbill":343750000,"approval":67.7419355,"support":34.375},{"time_hours":106,"approval_perbill":675840979,"support_perbill":342261905,"approval":67.5840979,"support":34.2261905},{"time_hours":107,"approval_perbill":674277017,"support_perbill":340773810,"approval":67.4277017,"support":34.077381},{"time_hours":108,"approval_perbill":672727273,"support_perbill":339285715,"approval":67.2727273,"support":33.9285715},{"time_hours":109,"approval_perbill":671191554,"support_perbill":337797620,"approval":67.1191554,"support":33.779762},{"time_hours":110,"approval_perbill":669669670,"support_perbill":336309524,"approval":66.966967,"support":33.6309524},{"time_hours":111,"approval_perbill":668161435,"support_perbill":334821429,"approval":66.8161435,"support":33.4821429},{"time_hours":112,"approval_perbill":666666667,"support_perbill":333333334,"approval":66.6666667,"support":33.3333334},{"time_hours":113,"approval_perbill":665185186,"support_perbill":331845239,"approval":66.5185186,"support":33.1845239},{"time_hours":114,"approval_perbill":663716814,"support_perbill":330357143,"approval":66.3716814,"support":33.0357143},{"time_hours":115,"approval_perbill":662261381,"support_perbill":328869048,"approval":66.2261381,"support":32.8869048},{"time_hours":116,"approval_perbill":660818714,"support_perbill":327380953,"approval":66.0818714,"support":32.7380953},{"time_hours":117,"approval_perbill":659388647,"support_perbill":325892858,"approval":65.9388647,"support":32.5892858},{"time_hours":118,"approval_perbill":657971015,"support_perbill":324404762,"approval":65.7971015,"support":32.4404762},{"time_hours":119,"approval_perbill":656565657,"support_perbill":322916667,"approval":65.6565657,"support":32.2916667},{"time_hours":120,"approval_perbill":655172414,"support_perbill":321428572,"approval":65.5172414,"support":32.1428572},{"time_hours":121,"approval_perbill":653791130,"support_perbill":319940477,"approval":65.379113,"support":31.9940477},{"time_hours":122,"approval_perbill":652421652,"support_perbill":318452381,"approval":65.2421652,"support":31.8452381},{"time_hours":123,"approval_perbill":651063830,"support_perbill":316964286,"approval":65.106383,"support":31.6964286},{"time_hours":124,"approval_perbill":649717514,"support_perbill":315476191,"approval":64.9717514,"support":31.5476191},{"time_hours":125,"approval_perbill":648382560,"support_perbill":313988096,"approval":64.838256,"support":31.3988096},{"time_hours":126,"approval_perbill":647058823,"support_perbill":312500000,"approval":64.7058823,"support":31.25},{"time_hours":127,"approval_perbill":645746165,"support_perbill":311011905,"approval":64.5746165,"support":31.1011905},{"time_hours":128,"approval_perbill":644444445,"support_perbill":309523810,"approval":64.4444445,"support":30.952381},{"time_hours":129,"approval_perbill":643153527,"support_perbill":308035715,"approval":64.3153527,"support":30.8035715},{"time_hours":130,"approval_perbill":641873279,"support_perbill":306547620,"approval":64.1873279,"support":30.654762},{"time_hours":131,"approval_perbill":640603567,"support_perbill":305059524,"approval":64.0603567,"support":30.5059524},{"time_hours":132,"approval_perbill":639344263,"support_perbill":303571429,"approval":63.9344263,"support":30.3571429},{"time_hours":133,"approval_perbill":638095238,"support_perbill":302083334,"approval":63.8095238,"support":30.2083334},{"time_hours":134,"approval_perbill":636856369,"support_perbill":300595239,"approval":63.6856369,"support":30.0595239},{"time_hours":135,"approval_perbill":635627530,"support_perbill":299107143,"approval":63.562753,"support":29.9107143},{"time_hours":136,"approval_perbill":634408602,"support_perbill":297619048,"approval":63.4408602,"support":29.7619048},{"time_hours":137,"approval_perbill":633199465,"support_perbill":296130953,"approval":63.3199465,"support":29.6130953},{"time_hours":138,"approval_perbill":632000000,"support_perbill":294642858,"approval":63.2,"support":29.4642858},{"time_hours":139,"approval_perbill":630810093,"support_perbill":293154762,"approval":63.0810093,"support":29.3154762},{"time_hours":140,"approval_perbill":629629630,"support_perbill":291666667,"approval":62.962963,"support":29.1666667},{"time_hours":141,"approval_perbill":628458498,"support_perbill":290178572,"approval":62.8458498,"support":29.0178572},{"time_hours":142,"approval_perbill":627296588,"support_perbill":288690477,"approval":62.7296588,"support":28.8690477},{"time_hours":143,"approval_perbill":626143791,"support_perbill":287202381,"approval":62.6143791,"support":28.7202381},{"time_hours":144,"approval_perbill":625000000,"support_perbill":285714286,"approval":62.5,"support":28.5714286},{"time_hours":145,"approval_perbill":623865110,"support_perbill":284226191,"approval":62.386511,"support":28.4226191},{"time_hours":146,"approval_perbill":622739018,"support_perbill":282738096,"approval":62.2739018,"support":28.2738096},{"time_hours":147,"approval_perbill":621621621,"support_perbill":281250000,"approval":62.1621621,"support":28.125},{"time_hours":148,"approval_perbill":620512821,"support_perbill":279761905,"approval":62.0512821,"support":27.9761905},{"time_hours":149,"approval_perbill":619412516,"support_perbill":278273810,"approval":61.9412516,"support":27.827381},{"time_hours":150,"approval_perbill":618320611,"support_perbill":276785715,"approval":61.8320611,"support":27.6785715},{"time_hours":151,"approval_perbill":617237009,"support_perbill":275297620,"approval":61.7237009,"support":27.529762},{"time_hours":152,"approval_perbill":616161616,"support_perbill":273809524,"approval":61.6161616,"support":27.3809524},{"time_hours":153,"approval_perbill":615094340,"support_perbill":272321429,"approval":61.509434,"support":27.2321429},{"time_hours":154,"approval_perbill":614035088,"support_perbill":270833334,"approval":61.4035088,"support":27.0833334},{"time_hours":155,"approval_perbill":612983770,"support_perbill":269345239,"approval":61.298377,"support":26.9345239},{"time_hours":156,"approval_perbill":611940298,"support_perbill":267857143,"approval":61.1940298,"support":26.7857143},{"time_hours":157,"approval_perbill":610904585,"support_perbill":266369048,"approval":61.0904585,"support":26.6369048},{"time_hours":158,"approval_perbill":609876543,"support_perbill":264880953,"approval":60.9876543,"support":26.4880953},{"time_hours":159,"approval_perbill":608856089,"support_perbill":263392858,"approval":60.8856089,"support":26.3392858},{"time_hours":160,"approval_perbill":607843137,"support_perbill":261904762,"approval":60.7843137,"support":26.1904762},{"time_hours":161,"approval_perbill":606837607,"support_perbill":260416667,"approval":60.6837607,"support":26.0416667},{"time_hours":162,"approval_perbill":605839416,"support_perbill":258928572,"approval":60.5839416,"support":25.8928572},{"time_hours":163,"approval_perbill":604848485,"support_perbill":257440477,"approval":60.4848485,"support":25.7440477},{"time_hours":164,"approval_perbill":603864734,"support_perbill":255952381,"approval":60.3864734,"support":25.5952381},{"time_hours":165,"approval_perbill":602888087,"support_perbill":254464286,"approval":60.2888087,"support":25.4464286},{"time_hours":166,"approval_perbill":601918465,"support_perbill":252976191,"approval":60.1918465,"support":25.2976191},{"time_hours":167,"approval_perbill":600955794,"support_perbill":251488096,"approval":60.0955794,"support":25.1488096},{"time_hours":168,"approval_perbill":600000000,"support_perbill":250000000,"approval":60,"support":25},{"time_hours":169,"approval_perbill":599051008,"support_perbill":248511905,"approval":59.9051008,"support":24.8511905},{"time_hours":170,"approval_perbill":598108747,"support_perbill":247023810,"approval":59.8108747,"support":24.702381},{"time_hours":171,"approval_perbill":597173145,"support_perbill":245535715,"approval":59.7173145,"support":24.5535715},{"time_hours":172,"approval_perbill":596244131,"support_perbill":244047620,"approval":59.6244131,"support":24.404762},{"time_hours":173,"approval_perbill":595321637,"support_perbill":242559524,"approval":59.5321637,"support":24.2559524},{"time_hours":174,"approval_perbill":594405594,"support_perbill":241071429,"approval":59.4405594,"support":24.1071429},{"time_hours":175,"approval_perbill":593495935,"support_perbill":239583334,"approval":59.3495935,"support":23.9583334},{"time_hours":176,"approval_perbill":592592593,"support_perbill":238095239,"approval":59.2592593,"support":23.8095239},{"time_hours":177,"approval_perbill":591695502,"support_perbill":236607143,"approval":59.1695502,"support":23.6607143},{"time_hours":178,"approval_perbill":590804598,"support_perbill":235119048,"approval":59.0804598,"support":23.5119048},{"time_hours":179,"approval_perbill":589919817,"support_perbill":233630953,"approval":58.9919817,"support":23.3630953},{"time_hours":180,"approval_perbill":589041096,"support_perbill":232142858,"approval":58.9041096,"support":23.2142858},{"time_hours":181,"approval_perbill":588168373,"support_perbill":230654762,"approval":58.8168373,"support":23.0654762},{"time_hours":182,"approval_perbill":587301587,"support_perbill":229166667,"approval":58.7301587,"support":22.9166667},{"time_hours":183,"approval_perbill":586440678,"support_perbill":227678572,"approval":58.6440678,"support":22.7678572},{"time_hours":184,"approval_perbill":585585585,"support_perbill":226190477,"approval":58.5585585,"support":22.6190477},{"time_hours":185,"approval_perbill":584736251,"support_perbill":224702381,"approval":58.4736251,"support":22.4702381},{"time_hours":186,"approval_perbill":583892617,"support_perbill":223214286,"approval":58.3892617,"support":22.3214286},{"time_hours":187,"approval_perbill":583054626,"support_perbill":221726191,"approval":58.3054626,"support":22.1726191},{"time_hours":188,"approval_perbill":582222222,"support_perbill":220238096,"approval":58.2222222,"support":22.0238096},{"time_hours":189,"approval_perbill":581395349,"support_perbill":218750000,"approval":58.1395349,"support":21.875},{"time_hours":190,"approval_perbill":580573951,"support_perbill":217261905,"approval":58.0573951,"support":21.7261905},{"time_hours":191,"approval_perbill":579757976,"support_perbill":215773810,"approval":57.9757976,"support":21.577381},{"time_hours":192,"approval_perbill":578947368,"support_perbill":214285715,"approval":57.8947368,"support":21.4285715},{"time_hours":193,"approval_perbill":578142076,"support_perbill":212797620,"approval":57.8142076,"support":21.279762},{"time_hours":194,"approval_perbill":577342048,"support_perbill":211309524,"approval":57.7342048,"support":21.1309524},{"time_hours":195,"approval_perbill":576547231,"support_perbill":209821429,"approval":57.6547231,"support":20.9821429},{"time_hours":196,"approval_perbill":575757576,"support_perbill":208333334,"approval":57.5757576,"support":20.8333334},{"time_hours":197,"approval_perbill":574973031,"support_perbill":206845239,"approval":57.4973031,"support":20.6845239},{"time_hours":198,"approval_perbill":574193548,"support_perbill":205357143,"approval":57.4193548,"support":20.5357143},{"time_hours":199,"approval_perbill":573419078,"support_perbill":203869048,"approval":57.3419078,"support":20.3869048},{"time_hours":200,"approval_perbill":572649572,"support_perbill":202380953,"approval":57.2649572,"support":20.2380953},{"time_hours":201,"approval_perbill":571884984,"support_perbill":200892858,"approval":57.1884984,"support":20.0892858},{"time_hours":202,"approval_perbill":571125265,"support_perbill":199404762,"approval":57.1125265,"support":19.9404762},{"time_hours":203,"approval_perbill":570370370,"support_perbill":197916667,"approval":57.037037,"support":19.7916667},{"time_hours":204,"approval_perbill":569620253,"support_perbill":196428572,"approval":56.9620253,"support":19.6428572},{"time_hours":205,"approval_perbill":568874868,"support_perbill":194940477,"approval":56.8874868,"support":19.4940477},{"time_hours":206,"approval_perbill":568134172,"support_perbill":193452381,"approval":56.8134172,"support":19.3452381},{"time_hours":207,"approval_perbill":567398119,"support_perbill":191964286,"approval":56.7398119,"support":19.1964286},{"time_hours":208,"approval_perbill":566666666,"support_perbill":190476191,"approval":56.6666666,"support":19.0476191},{"time_hours":209,"approval_perbill":565939771,"support_perbill":188988096,"approval":56.5939771,"support":18.8988096},{"time_hours":210,"approval_perbill":565217391,"support_perbill":187500000,"approval":56.5217391,"support":18.75},{"time_hours":211,"approval_perbill":564499484,"support_perbill":186011905,"approval":56.4499484,"support":18.6011905},{"time_hours":212,"approval_perbill":563786008,"support_perbill":184523810,"approval":56.3786008,"support":18.452381},{"time_hours":213,"approval_perbill":563076923,"support_perbill":183035715,"approval":56.3076923,"support":18.3035715},{"time_hours":214,"approval_perbill":562372188,"support_perbill":181547620,"approval":56.2372188,"support":18.154762},{"time_hours":215,"approval_perbill":561671763,"support_perbill":180059524,"approval":56.1671763,"support":18.0059524},{"time_hours":216,"approval_perbill":560975610,"support_perbill":178571429,"approval":56.097561,"support":17.8571429},{"time_hours":217,"approval_perbill":560283688,"support_perbill":177083334,"approval":56.0283688,"support":17.7083334},{"time_hours":218,"approval_perbill":559595959,"support_perbill":175595239,"approval":55.9595959,"support":17.5595239},{"time_hours":219,"approval_perbill":558912386,"support_perbill":174107143,"approval":55.8912386,"support":17.4107143},{"time_hours":220,"approval_perbill":558232931,"support_perbill":172619048,"approval":55.8232931,"support":17.2619048},{"time_hours":221,"approval_perbill":557557557,"support_perbill":171130953,"approval":55.7557557,"support":17.1130953},{"time_hours":222,"approval_perbill":556886227,"support_perbill":169642858,"approval":55.6886227,"support":16.9642858},{"time_hours":223,"approval_perbill":556218905,"support_perbill":168154762,"approval":55.6218905,"support":16.8154762},{"time_hours":224,"approval_perbill":555555555,"support_perbill":166666667,"approval":55.5555555,"support":16.6666667},{"time_hours":225,"approval_perbill":554896142,"support_perbill":165178572,"approval":55.4896142,"support":16.5178572},{"time_hours":226,"approval_perbill":554240631,"support_perbill":163690477,"approval":55.4240631,"support":16.3690477},{"time_hours":227,"approval_perbill":553588987,"support_perbill":162202381,"approval":55.3588987,"support":16.2202381},{"time_hours":228,"approval_perbill":552941176,"support_perbill":160714286,"approval":55.2941176,"support":16.0714286},{"time_hours":229,"approval_perbill":552297165,"support_perbill":159226191,"approval":55.2297165,"support":15.9226191},{"time_hours":230,"approval_perbill":551656920,"support_perbill":157738096,"approval":55.165692,"support":15.7738096},{"time_hours":231,"approval_perbill":551020408,"support_perbill":156250000,"approval":55.1020408,"support":15.625},{"time_hours":232,"approval_perbill":550387597,"support_perbill":154761905,"approval":55.0387597,"support":15.4761905},{"time_hours":233,"approval_perbill":549758454,"support_perbill":153273810,"approval":54.9758454,"support":15.327381},{"time_hours":234,"approval_perbill":549132948,"support_perbill":151785715,"approval":54.9132948,"support":15.1785715},{"time_hours":235,"approval_perbill":548511047,"support_perbill":150297620,"approval":54.8511047,"support":15.029762},{"time_hours":236,"approval_perbill":547892720,"support_perbill":148809524,"approval":54.789272,"support":14.8809524},{"time_hours":237,"approval_perbill":547277937,"support_perbill":147321429,"approval":54.7277937,"support":14.7321429},{"time_hours":238,"approval_perbill":546666666,"support_perbill":145833334,"approval":54.6666666,"support":14.5833334},{"time_hours":239,"approval_perbill":546058879,"support_perbill":144345239,"approval":54.6058879,"support":14.4345239},{"time_hours":240,"approval_perbill":545454545,"support_perbill":142857143,"approval":54.5454545,"support":14.2857143},{"time_hours":241,"approval_perbill":544853635,"support_perbill":141369048,"approval":54.4853635,"support":14.1369048},{"time_hours":242,"approval_perbill":544256120,"support_perbill":139880953,"approval":54.425612,"support":13.9880953},{"time_hours":243,"approval_perbill":543661971,"support_perbill":138392858,"approval":54.3661971,"support":13.8392858},{"time_hours":244,"approval_perbill":543071161,"support_perbill":136904762,"approval":54.3071161,"support":13.6904762},{"time_hours":245,"approval_perbill":542483660,"support_perbill":135416667,"approval":54.248366,"support":13.5416667},{"time_hours":246,"approval_perbill":541899441,"support_perbill":133928572,"approval":54.1899441,"support":13.3928572},{"time_hours":247,"approval_perbill":541318477,"support_perbill":132440477,"approval":54.1318477,"support":13.2440477},{"time_hours":248,"approval_perbill":540740740,"support_perbill":130952381,"approval":54.074074,"support":13.0952381},{"time_hours":249,"approval_perbill":540166205,"support_perbill":129464286,"approval":54.0166205,"support":12.9464286},{"time_hours":250,"approval_perbill":539594843,"support_perbill":127976191,"approval":53.9594843,"support":12.7976191},{"time_hours":251,"approval_perbill":539026630,"support_perbill":126488096,"approval":53.902663,"support":12.6488096},{"time_hours":252,"approval_perbill":538461538,"support_perbill":125000000,"approval":53.8461538,"support":12.5},{"time_hours":253,"approval_perbill":537899543,"support_perbill":123511905,"approval":53.7899543,"support":12.3511905},{"time_hours":254,"approval_perbill":537340619,"support_perbill":122023810,"approval":53.7340619,"support":12.202381},{"time_hours":255,"approval_perbill":536784741,"support_perbill":120535715,"approval":53.6784741,"support":12.0535715},{"time_hours":256,"approval_perbill":536231884,"support_perbill":119047620,"approval":53.6231884,"support":11.904762},{"time_hours":257,"approval_perbill":535682023,"support_perbill":117559524,"approval":53.5682023,"support":11.7559524},{"time_hours":258,"approval_perbill":535135135,"support_perbill":116071429,"approval":53.5135135,"support":11.6071429},{"time_hours":259,"approval_perbill":534591195,"support_perbill":114583334,"approval":53.4591195,"support":11.4583334},{"time_hours":260,"approval_perbill":534050179,"support_perbill":113095239,"approval":53.4050179,"support":11.3095239},{"time_hours":261,"approval_perbill":533512064,"support_perbill":111607143,"approval":53.3512064,"support":11.1607143},{"time_hours":262,"approval_perbill":532976827,"support_perbill":110119048,"approval":53.2976827,"support":11.0119048},{"time_hours":263,"approval_perbill":532444444,"support_perbill":108630953,"approval":53.2444444,"support":10.8630953},{"time_hours":264,"approval_perbill":531914893,"support_perbill":107142858,"approval":53.1914893,"support":10.7142858},{"time_hours":265,"approval_perbill":531388152,"support_perbill":105654762,"approval":53.1388152,"support":10.5654762},{"time_hours":266,"approval_perbill":530864197,"support_perbill":104166667,"approval":53.0864197,"support":10.4166667},{"time_hours":267,"approval_perbill":530343007,"support_perbill":102678572,"approval":53.0343007,"support":10.2678572},{"time_hours":268,"approval_perbill":529824561,"support_perbill":101190477,"approval":52.9824561,"support":10.1190477},{"time_hours":269,"approval_perbill":529308836,"support_perbill":99702381,"approval":52.9308836,"support":9.9702381},{"time_hours":270,"approval_perbill":528795811,"support_perbill":98214286,"approval":52.8795811,"support":9.8214286},{"time_hours":271,"approval_perbill":528285465,"support_perbill":96726191,"approval":52.8285465,"support":9.6726191},{"time_hours":272,"approval_perbill":527777777,"support_perbill":95238096,"approval":52.7777777,"support":9.5238096},{"time_hours":273,"approval_perbill":527272727,"support_perbill":93750000,"approval":52.7272727,"support":9.375},{"time_hours":274,"approval_perbill":526770293,"support_perbill":92261905,"approval":52.6770293,"support":9.2261905},{"time_hours":275,"approval_perbill":526270456,"support_perbill":90773810,"approval":52.6270456,"support":9.077381},{"time_hours":276,"approval_perbill":525773195,"support_perbill":89285715,"approval":52.5773195,"support":8.9285715},{"time_hours":277,"approval_perbill":525278491,"support_perbill":87797620,"approval":52.5278491,"support":8.779762},{"time_hours":278,"approval_perbill":524786324,"support_perbill":86309524,"approval":52.4786324,"support":8.6309524},{"time_hours":279,"approval_perbill":524296675,"support_perbill":84821429,"approval":52.4296675,"support":8.4821429},{"time_hours":280,"approval_perbill":523809523,"support_perbill":83333334,"approval":52.3809523,"support":8.3333334},{"time_hours":281,"approval_perbill":523324851,"support_perbill":81845239,"approval":52.3324851,"support":8.1845239},{"time_hours":282,"approval_perbill":522842639,"support_perbill":80357143,"approval":52.2842639,"support":8.0357143},{"time_hours":283,"approval_perbill":522362869,"support_perbill":78869048,"approval":52.2362869,"support":7.8869048},{"time_hours":284,"approval_perbill":521885521,"support_perbill":77380953,"approval":52.1885521,"support":7.7380953},{"time_hours":285,"approval_perbill":521410579,"support_perbill":75892858,"approval":52.1410579,"support":7.5892858},{"time_hours":286,"approval_perbill":520938023,"support_perbill":74404762,"approval":52.0938023,"support":7.4404762},{"time_hours":287,"approval_perbill":520467836,"support_perbill":72916667,"approval":52.0467836,"support":7.2916667},{"time_hours":288,"approval_perbill":519999999,"support_perbill":71428572,"approval":51.9999999,"support":7.1428572},{"time_hours":289,"approval_perbill":519534497,"support_perbill":69940477,"approval":51.9534497,"support":6.9940477},{"time_hours":290,"approval_perbill":519071310,"support_perbill":68452381,"approval":51.907131,"support":6.8452381},{"time_hours":291,"approval_perbill":518610421,"support_perbill":66964286,"approval":51.8610421,"support":6.6964286},{"time_hours":292,"approval_perbill":518151815,"support_perbill":65476191,"approval":51.8151815,"support":6.5476191},{"time_hours":293,"approval_perbill":517695473,"support_perbill":63988096,"approval":51.7695473,"support":6.3988096},{"time_hours":294,"approval_perbill":517241379,"support_perbill":62500000,"approval":51.7241379,"support":6.25},{"time_hours":295,"approval_perbill":516789516,"support_perbill":61011905,"approval":51.6789516,"support":6.1011905},{"time_hours":296,"approval_perbill":516339869,"support_perbill":59523810,"approval":51.6339869,"support":5.952381},{"time_hours":297,"approval_perbill":515892420,"support_perbill":58035715,"approval":51.589242,"support":5.8035715},{"time_hours":298,"approval_perbill":515447154,"support_perbill":56547620,"approval":51.5447154,"support":5.654762},{"time_hours":299,"approval_perbill":515004055,"support_perbill":55059524,"approval":51.5004055,"support":5.5059524},{"time_hours":300,"approval_perbill":514563106,"support_perbill":53571429,"approval":51.4563106,"support":5.3571429},{"time_hours":301,"approval_perbill":514124293,"support_perbill":52083334,"approval":51.4124293,"support":5.2083334},{"time_hours":302,"approval_perbill":513687600,"support_perbill":50595239,"approval":51.36876,"support":5.0595239},{"time_hours":303,"approval_perbill":513253011,"support_perbill":49107143,"approval":51.3253011,"support":4.9107143},{"time_hours":304,"approval_perbill":512820512,"support_perbill":47619048,"approval":51.2820512,"support":4.7619048},{"time_hours":305,"approval_perbill":512390087,"support_perbill":46130953,"approval":51.2390087,"support":4.6130953},{"time_hours":306,"approval_perbill":511961722,"support_perbill":44642858,"approval":51.1961722,"support":4.4642858},{"time_hours":307,"approval_perbill":511535401,"support_perbill":43154762,"approval":51.1535401,"support":4.3154762},{"time_hours":308,"approval_perbill":511111111,"support_perbill":41666667,"approval":51.1111111,"support":4.1666667},{"time_hours":309,"approval_perbill":510688835,"support_perbill":40178572,"approval":51.0688835,"support":4.0178572},{"time_hours":310,"approval_perbill":510268562,"support_perbill":38690477,"approval":51.0268562,"support":3.8690477},{"time_hours":311,"approval_perbill":509850275,"support_perbill":37202381,"approval":50.9850275,"support":3.7202381},{"time_hours":312,"approval_perbill":509433962,"support_perbill":35714286,"approval":50.9433962,"support":3.5714286},{"time_hours":313,"approval_perbill":509019607,"support_perbill":34226191,"approval":50.9019607,"support":3.4226191},{"time_hours":314,"approval_perbill":508607198,"support_perbill":32738096,"approval":50.8607198,"support":3.2738096},{"time_hours":315,"approval_perbill":508196721,"support_perbill":31250000,"approval":50.8196721,"support":3.125},{"time_hours":316,"approval_perbill":507788161,"support_perbill":29761905,"approval":50.7788161,"support":2.9761905},{"time_hours":317,"approval_perbill":507381507,"support_perbill":28273810,"approval":50.7381507,"support":2.827381},{"time_hours":318,"approval_perbill":506976744,"support_perbill":26785715,"approval":50.6976744,"support":2.6785715},{"time_hours":319,"approval_perbill":506573859,"support_perbill":25297620,"approval":50.6573859,"support":2.529762},{"time_hours":320,"approval_perbill":506172839,"support_perbill":23809524,"approval":50.6172839,"support":2.3809524},{"time_hours":321,"approval_perbill":505773671,"support_perbill":22321429,"approval":50.5773671,"support":2.2321429},{"time_hours":322,"approval_perbill":505376343,"support_perbill":20833334,"approval":50.5376343,"support":2.0833334},{"time_hours":323,"approval_perbill":504980842,"support_perbill":19345239,"approval":50.4980842,"support":1.9345239},{"time_hours":324,"approval_perbill":504587155,"support_perbill":17857143,"approval":50.4587155,"support":1.7857143},{"time_hours":325,"approval_perbill":504195270,"support_perbill":16369048,"approval":50.419527,"support":1.6369048},{"time_hours":326,"approval_perbill":503805174,"support_perbill":14880953,"approval":50.3805174,"support":1.4880953},{"time_hours":327,"approval_perbill":503416856,"support_perbill":13392858,"approval":50.3416856,"support":1.3392858},{"time_hours":328,"approval_perbill":503030302,"support_perbill":11904762,"approval":50.3030302,"support":1.1904762},{"time_hours":329,"approval_perbill":502645502,"support_perbill":10416667,"approval":50.2645502,"support":1.0416667},{"time_hours":330,"approval_perbill":502262443,"support_perbill":8928572,"approval":50.2262443,"support":0.8928572},{"time_hours":331,"approval_perbill":501881113,"support_perbill":7440477,"approval":50.1881113,"support":0.7440477},{"time_hours":332,"approval_perbill":501501501,"support_perbill":5952381,"approval":50.1501501,"support":0.5952381},{"time_hours":333,"approval_perbill":501123595,"support_perbill":4464286,"approval":50.1123595,"support":0.4464286},{"time_hours":334,"approval_perbill":500747383,"support_perbill":2976191,"approval":50.0747383,"support":0.2976191},{"time_hours":335,"approval_perbill":500372855,"support_perbill":1488096,"approval":50.0372855,"support":0.1488096},{"time_hours":336,"approval_perbill":499999999,"support_perbill":0,"approval":49.9999999,"support":0}]')},54924:p=>{"use strict";p.exports=JSON.parse('[{"time_hours":0,"approval_perbill":1000000000,"support_perbill":500000026,"approval":100,"support":50.0000026},{"time_hours":1,"approval_perbill":997549020,"support_perbill":418401359,"approval":99.754902,"support":41.8401359},{"time_hours":2,"approval_perbill":995098040,"support_perbill":359397443,"approval":99.509804,"support":35.9397443},{"time_hours":3,"approval_perbill":992647060,"support_perbill":314744813,"approval":99.264706,"support":31.4744813},{"time_hours":4,"approval_perbill":990196080,"support_perbill":279775293,"approval":99.019608,"support":27.9775293},{"time_hours":5,"approval_perbill":987745099,"support_perbill":251647242,"approval":98.7745099,"support":25.1647242},{"time_hours":6,"approval_perbill":985294119,"support_perbill":228531862,"approval":98.5294119,"support":22.8531862},{"time_hours":7,"approval_perbill":982843138,"support_perbill":209198815,"approval":98.2843138,"support":20.9198815},{"time_hours":8,"approval_perbill":980392158,"support_perbill":192789972,"approval":98.0392158,"support":19.2789972},{"time_hours":9,"approval_perbill":977941177,"support_perbill":178688524,"approval":97.7941177,"support":17.8688524},{"time_hours":10,"approval_perbill":975490197,"support_perbill":166439756,"approval":97.5490197,"support":16.6439756},{"time_hours":11,"approval_perbill":973039216,"support_perbill":155701053,"approval":97.3039216,"support":15.5701053},{"time_hours":12,"approval_perbill":970588236,"support_perbill":146209386,"approval":97.0588236,"support":14.6209386},{"time_hours":13,"approval_perbill":968137256,"support_perbill":137759452,"approval":96.8137256,"support":13.7759452},{"time_hours":14,"approval_perbill":965686276,"support_perbill":130188679,"approval":96.5686276,"support":13.0188679},{"time_hours":15,"approval_perbill":963235295,"support_perbill":123366639,"approval":96.3235295,"support":12.3366639},{"time_hours":16,"approval_perbill":960784315,"support_perbill":117187499,"approval":96.0784315,"support":11.7187499},{"time_hours":17,"approval_perbill":958333334,"support_perbill":111564465,"approval":95.8333334,"support":11.1564465},{"time_hours":18,"approval_perbill":955882354,"support_perbill":106425701,"approval":95.5882354,"support":10.6425701},{"time_hours":19,"approval_perbill":953431373,"support_perbill":101711228,"approval":95.3431373,"support":10.1711228},{"time_hours":20,"approval_perbill":950980393,"support_perbill":97370582,"approval":95.0980393,"support":9.7370582},{"time_hours":21,"approval_perbill":948529412,"support_perbill":93360994,"approval":94.8529412,"support":9.3360994},{"time_hours":22,"approval_perbill":946078432,"support_perbill":89645982,"approval":94.6078432,"support":8.9645982},{"time_hours":23,"approval_perbill":943627452,"support_perbill":86194234,"approval":94.3627452,"support":8.6194234},{"time_hours":24,"approval_perbill":941176471,"support_perbill":82978722,"approval":94.1176471,"support":8.2978722},{"time_hours":25,"approval_perbill":938725491,"support_perbill":79975997,"approval":93.8725491,"support":7.9975997},{"time_hours":26,"approval_perbill":936274511,"support_perbill":77165614,"approval":93.6274511,"support":7.7165614},{"time_hours":27,"approval_perbill":933823531,"support_perbill":74529666,"approval":93.3823531,"support":7.4529666},{"time_hours":28,"approval_perbill":931372550,"support_perbill":72052400,"approval":93.137255,"support":7.20524},{"time_hours":29,"approval_perbill":928921570,"support_perbill":69719908,"approval":92.892157,"support":6.9719908},{"time_hours":30,"approval_perbill":926470589,"support_perbill":67519857,"approval":92.6470589,"support":6.7519857},{"time_hours":31,"approval_perbill":924019609,"support_perbill":65441280,"approval":92.4019609,"support":6.544128},{"time_hours":32,"approval_perbill":921568628,"support_perbill":63474386,"approval":92.1568628,"support":6.3474386},{"time_hours":33,"approval_perbill":919117648,"support_perbill":61610409,"approval":91.9117648,"support":6.1610409},{"time_hours":34,"approval_perbill":916666667,"support_perbill":59841478,"approval":91.6666667,"support":5.9841478},{"time_hours":35,"approval_perbill":914215687,"support_perbill":58160504,"approval":91.4215687,"support":5.8160504},{"time_hours":36,"approval_perbill":911764706,"support_perbill":56561084,"approval":91.1764706,"support":5.6561084},{"time_hours":37,"approval_perbill":909313726,"support_perbill":55037426,"approval":90.9313726,"support":5.5037426},{"time_hours":38,"approval_perbill":906862746,"support_perbill":53584271,"approval":90.6862746,"support":5.3584271},{"time_hours":39,"approval_perbill":904411766,"support_perbill":52196835,"approval":90.4411766,"support":5.2196835},{"time_hours":40,"approval_perbill":901960785,"support_perbill":50870759,"approval":90.1960785,"support":5.0870759},{"time_hours":41,"approval_perbill":899509805,"support_perbill":49602061,"approval":89.9509805,"support":4.9602061},{"time_hours":42,"approval_perbill":897058824,"support_perbill":48387095,"approval":89.7058824,"support":4.8387095},{"time_hours":43,"approval_perbill":894607844,"support_perbill":47222519,"approval":89.4607844,"support":4.7222519},{"time_hours":44,"approval_perbill":892156864,"support_perbill":46105262,"approval":89.2156864,"support":4.6105262},{"time_hours":45,"approval_perbill":889705883,"support_perbill":45032496,"approval":88.9705883,"support":4.5032496},{"time_hours":46,"approval_perbill":887254903,"support_perbill":44001617,"approval":88.7254903,"support":4.4001617},{"time_hours":47,"approval_perbill":884803922,"support_perbill":43010218,"approval":88.4803922,"support":4.3010218},{"time_hours":48,"approval_perbill":882352942,"support_perbill":42056074,"approval":88.2352942,"support":4.2056074},{"time_hours":49,"approval_perbill":879901962,"support_perbill":41137122,"approval":87.9901962,"support":4.1137122},{"time_hours":50,"approval_perbill":877450982,"support_perbill":40251453,"approval":87.7450982,"support":4.0251453},{"time_hours":51,"approval_perbill":875000001,"support_perbill":39397289,"approval":87.5000001,"support":3.9397289},{"time_hours":52,"approval_perbill":872549021,"support_perbill":38572980,"approval":87.2549021,"support":3.857298},{"time_hours":53,"approval_perbill":870098040,"support_perbill":37776985,"approval":87.009804,"support":3.7776985},{"time_hours":54,"approval_perbill":867647060,"support_perbill":37007873,"approval":86.764706,"support":3.7007873},{"time_hours":55,"approval_perbill":865196079,"support_perbill":36264302,"approval":86.5196079,"support":3.6264302},{"time_hours":56,"approval_perbill":862745099,"support_perbill":35545023,"approval":86.2745099,"support":3.5545023},{"time_hours":57,"approval_perbill":860294118,"support_perbill":34848862,"approval":86.0294118,"support":3.4848862},{"time_hours":58,"approval_perbill":857843138,"support_perbill":34174724,"approval":85.7843138,"support":3.4174724},{"time_hours":59,"approval_perbill":855392157,"support_perbill":33521580,"approval":85.5392157,"support":3.352158},{"time_hours":60,"approval_perbill":852941177,"support_perbill":32888464,"approval":85.2941177,"support":3.2888464},{"time_hours":61,"approval_perbill":850490197,"support_perbill":32274469,"approval":85.0490197,"support":3.2274469},{"time_hours":62,"approval_perbill":848039217,"support_perbill":31678741,"approval":84.8039217,"support":3.1678741},{"time_hours":63,"approval_perbill":845588236,"support_perbill":31100477,"approval":84.5588236,"support":3.1100477},{"time_hours":64,"approval_perbill":843137256,"support_perbill":30538921,"approval":84.3137256,"support":3.0538921},{"time_hours":65,"approval_perbill":840686276,"support_perbill":29993358,"approval":84.0686276,"support":2.9993358},{"time_hours":66,"approval_perbill":838235295,"support_perbill":29463116,"approval":83.8235295,"support":2.9463116},{"time_hours":67,"approval_perbill":835784315,"support_perbill":28947556,"approval":83.5784315,"support":2.8947556},{"time_hours":68,"approval_perbill":833333334,"support_perbill":28446079,"approval":83.3333334,"support":2.8446079},{"time_hours":69,"approval_perbill":830882354,"support_perbill":27958114,"approval":83.0882354,"support":2.7958114},{"time_hours":70,"approval_perbill":828431373,"support_perbill":27483123,"approval":82.8431373,"support":2.7483123},{"time_hours":71,"approval_perbill":825980393,"support_perbill":27020596,"approval":82.5980393,"support":2.7020596},{"time_hours":72,"approval_perbill":823529412,"support_perbill":26570047,"approval":82.3529412,"support":2.6570047},{"time_hours":73,"approval_perbill":821078432,"support_perbill":26131019,"approval":82.1078432,"support":2.6131019},{"time_hours":74,"approval_perbill":818627452,"support_perbill":25703073,"approval":81.8627452,"support":2.5703073},{"time_hours":75,"approval_perbill":816176472,"support_perbill":25285796,"approval":81.6176472,"support":2.5285796},{"time_hours":76,"approval_perbill":813725491,"support_perbill":24878795,"approval":81.3725491,"support":2.4878795},{"time_hours":77,"approval_perbill":811274511,"support_perbill":24481693,"approval":81.1274511,"support":2.4481693},{"time_hours":78,"approval_perbill":808823530,"support_perbill":24094134,"approval":80.882353,"support":2.4094134},{"time_hours":79,"approval_perbill":806372550,"support_perbill":23715779,"approval":80.637255,"support":2.3715779},{"time_hours":80,"approval_perbill":803921569,"support_perbill":23346303,"approval":80.3921569,"support":2.3346303},{"time_hours":81,"approval_perbill":801470589,"support_perbill":22985397,"approval":80.1470589,"support":2.2985397},{"time_hours":82,"approval_perbill":799019608,"support_perbill":22632766,"approval":79.9019608,"support":2.2632766},{"time_hours":83,"approval_perbill":796568628,"support_perbill":22288130,"approval":79.6568628,"support":2.228813},{"time_hours":84,"approval_perbill":794117648,"support_perbill":21951219,"approval":79.4117648,"support":2.1951219},{"time_hours":85,"approval_perbill":791666668,"support_perbill":21621776,"approval":79.1666668,"support":2.1621776},{"time_hours":86,"approval_perbill":789215688,"support_perbill":21299556,"approval":78.9215688,"support":2.1299556},{"time_hours":87,"approval_perbill":786764707,"support_perbill":20984324,"approval":78.6764707,"support":2.0984324},{"time_hours":88,"approval_perbill":784313727,"support_perbill":20675855,"approval":78.4313727,"support":2.0675855},{"time_hours":89,"approval_perbill":781862746,"support_perbill":20373934,"approval":78.1862746,"support":2.0373934},{"time_hours":90,"approval_perbill":779411766,"support_perbill":20078354,"approval":77.9411766,"support":2.0078354},{"time_hours":91,"approval_perbill":776960785,"support_perbill":19788917,"approval":77.6960785,"support":1.9788917},{"time_hours":92,"approval_perbill":774509805,"support_perbill":19505435,"approval":77.4509805,"support":1.9505435},{"time_hours":93,"approval_perbill":772058824,"support_perbill":19227725,"approval":77.2058824,"support":1.9227725},{"time_hours":94,"approval_perbill":769607844,"support_perbill":18955613,"approval":76.9607844,"support":1.8955613},{"time_hours":95,"approval_perbill":767156863,"support_perbill":18688931,"approval":76.7156863,"support":1.8688931},{"time_hours":96,"approval_perbill":764705883,"support_perbill":18427518,"approval":76.4705883,"support":1.8427518},{"time_hours":97,"approval_perbill":762254903,"support_perbill":18171219,"approval":76.2254903,"support":1.8171219},{"time_hours":98,"approval_perbill":759803923,"support_perbill":17919887,"approval":75.9803923,"support":1.7919887},{"time_hours":99,"approval_perbill":757352942,"support_perbill":17673377,"approval":75.7352942,"support":1.7673377},{"time_hours":100,"approval_perbill":754901962,"support_perbill":17431553,"approval":75.4901962,"support":1.7431553},{"time_hours":101,"approval_perbill":752450981,"support_perbill":17194282,"approval":75.2450981,"support":1.7194282},{"time_hours":102,"approval_perbill":750000001,"support_perbill":16961437,"approval":75.0000001,"support":1.6961437},{"time_hours":103,"approval_perbill":747549020,"support_perbill":16732895,"approval":74.754902,"support":1.6732895},{"time_hours":104,"approval_perbill":745098040,"support_perbill":16508538,"approval":74.509804,"support":1.6508538},{"time_hours":105,"approval_perbill":742647059,"support_perbill":16288252,"approval":74.2647059,"support":1.6288252},{"time_hours":106,"approval_perbill":740196079,"support_perbill":16071927,"approval":74.0196079,"support":1.6071927},{"time_hours":107,"approval_perbill":737745099,"support_perbill":15859457,"approval":73.7745099,"support":1.5859457},{"time_hours":108,"approval_perbill":735294118,"support_perbill":15650741,"approval":73.5294118,"support":1.5650741},{"time_hours":109,"approval_perbill":732843138,"support_perbill":15445679,"approval":73.2843138,"support":1.5445679},{"time_hours":110,"approval_perbill":730392158,"support_perbill":15244176,"approval":73.0392158,"support":1.5244176},{"time_hours":111,"approval_perbill":727941178,"support_perbill":15046141,"approval":72.7941178,"support":1.5046141},{"time_hours":112,"approval_perbill":725490197,"support_perbill":14851485,"approval":72.5490197,"support":1.4851485},{"time_hours":113,"approval_perbill":723039217,"support_perbill":14660121,"approval":72.3039217,"support":1.4660121},{"time_hours":114,"approval_perbill":720588236,"support_perbill":14471968,"approval":72.0588236,"support":1.4471968},{"time_hours":115,"approval_perbill":718137256,"support_perbill":14286945,"approval":71.8137256,"support":1.4286945},{"time_hours":116,"approval_perbill":715686275,"support_perbill":14104975,"approval":71.5686275,"support":1.4104975},{"time_hours":117,"approval_perbill":713235295,"support_perbill":13925982,"approval":71.3235295,"support":1.3925982},{"time_hours":118,"approval_perbill":710784314,"support_perbill":13749894,"approval":71.0784314,"support":1.3749894},{"time_hours":119,"approval_perbill":708333334,"support_perbill":13576642,"approval":70.8333334,"support":1.3576642},{"time_hours":120,"approval_perbill":705882353,"support_perbill":13406156,"approval":70.5882353,"support":1.3406156},{"time_hours":121,"approval_perbill":703431373,"support_perbill":13238372,"approval":70.3431373,"support":1.3238372},{"time_hours":122,"approval_perbill":700980393,"support_perbill":13073226,"approval":70.0980393,"support":1.3073226},{"time_hours":123,"approval_perbill":698529413,"support_perbill":12910655,"approval":69.8529413,"support":1.2910655},{"time_hours":124,"approval_perbill":696078432,"support_perbill":12750601,"approval":69.6078432,"support":1.2750601},{"time_hours":125,"approval_perbill":693627452,"support_perbill":12593005,"approval":69.3627452,"support":1.2593005},{"time_hours":126,"approval_perbill":691176471,"support_perbill":12437810,"approval":69.1176471,"support":1.243781},{"time_hours":127,"approval_perbill":688725491,"support_perbill":12284964,"approval":68.8725491,"support":1.2284964},{"time_hours":128,"approval_perbill":686274511,"support_perbill":12134411,"approval":68.6274511,"support":1.2134411},{"time_hours":129,"approval_perbill":683823530,"support_perbill":11986103,"approval":68.382353,"support":1.1986103},{"time_hours":130,"approval_perbill":681372550,"support_perbill":11839987,"approval":68.137255,"support":1.1839987},{"time_hours":131,"approval_perbill":678921569,"support_perbill":11696017,"approval":67.8921569,"support":1.1696017},{"time_hours":132,"approval_perbill":676470589,"support_perbill":11554145,"approval":67.6470589,"support":1.1554145},{"time_hours":133,"approval_perbill":674019609,"support_perbill":11414326,"approval":67.4019609,"support":1.1414326},{"time_hours":134,"approval_perbill":671568629,"support_perbill":11276516,"approval":67.1568629,"support":1.1276516},{"time_hours":135,"approval_perbill":669117648,"support_perbill":11140671,"approval":66.9117648,"support":1.1140671},{"time_hours":136,"approval_perbill":666666668,"support_perbill":11006750,"approval":66.6666668,"support":1.100675},{"time_hours":137,"approval_perbill":664215687,"support_perbill":10874713,"approval":66.4215687,"support":1.0874713},{"time_hours":138,"approval_perbill":661764707,"support_perbill":10744519,"approval":66.1764707,"support":1.0744519},{"time_hours":139,"approval_perbill":659313726,"support_perbill":10616130,"approval":65.9313726,"support":1.061613},{"time_hours":140,"approval_perbill":656862746,"support_perbill":10489510,"approval":65.6862746,"support":1.048951},{"time_hours":141,"approval_perbill":654411765,"support_perbill":10364622,"approval":65.4411765,"support":1.0364622},{"time_hours":142,"approval_perbill":651960785,"support_perbill":10241430,"approval":65.1960785,"support":1.024143},{"time_hours":143,"approval_perbill":649509804,"support_perbill":10119900,"approval":64.9509804,"support":1.01199},{"time_hours":144,"approval_perbill":647058824,"support_perbill":10000000,"approval":64.7058824,"support":1},{"time_hours":145,"approval_perbill":644607844,"support_perbill":9881695,"approval":64.4607844,"support":0.9881695},{"time_hours":146,"approval_perbill":642156864,"support_perbill":9764955,"approval":64.2156864,"support":0.9764955},{"time_hours":147,"approval_perbill":639705883,"support_perbill":9649749,"approval":63.9705883,"support":0.9649749},{"time_hours":148,"approval_perbill":637254903,"support_perbill":9536047,"approval":63.7254903,"support":0.9536047},{"time_hours":149,"approval_perbill":634803923,"support_perbill":9423820,"approval":63.4803923,"support":0.942382},{"time_hours":150,"approval_perbill":632352942,"support_perbill":9313038,"approval":63.2352942,"support":0.9313038},{"time_hours":151,"approval_perbill":629901962,"support_perbill":9203674,"approval":62.9901962,"support":0.9203674},{"time_hours":152,"approval_perbill":627450981,"support_perbill":9095702,"approval":62.7450981,"support":0.9095702},{"time_hours":153,"approval_perbill":625000001,"support_perbill":8989095,"approval":62.5000001,"support":0.8989095},{"time_hours":154,"approval_perbill":622549020,"support_perbill":8883826,"approval":62.254902,"support":0.8883826},{"time_hours":155,"approval_perbill":620098040,"support_perbill":8779872,"approval":62.009804,"support":0.8779872},{"time_hours":156,"approval_perbill":617647059,"support_perbill":8677207,"approval":61.7647059,"support":0.8677207},{"time_hours":157,"approval_perbill":615196079,"support_perbill":8575808,"approval":61.5196079,"support":0.8575808},{"time_hours":158,"approval_perbill":612745099,"support_perbill":8475652,"approval":61.2745099,"support":0.8475652},{"time_hours":159,"approval_perbill":610294119,"support_perbill":8376715,"approval":61.0294119,"support":0.8376715},{"time_hours":160,"approval_perbill":607843138,"support_perbill":8278976,"approval":60.7843138,"support":0.8278976},{"time_hours":161,"approval_perbill":605392158,"support_perbill":8182413,"approval":60.5392158,"support":0.8182413},{"time_hours":162,"approval_perbill":602941177,"support_perbill":8087005,"approval":60.2941177,"support":0.8087005},{"time_hours":163,"approval_perbill":600490197,"support_perbill":7992731,"approval":60.0490197,"support":0.7992731},{"time_hours":164,"approval_perbill":598039216,"support_perbill":7899571,"approval":59.8039216,"support":0.7899571},{"time_hours":165,"approval_perbill":595588236,"support_perbill":7807506,"approval":59.5588236,"support":0.7807506},{"time_hours":166,"approval_perbill":593137255,"support_perbill":7716516,"approval":59.3137255,"support":0.7716516},{"time_hours":167,"approval_perbill":590686275,"support_perbill":7626583,"approval":59.0686275,"support":0.7626583},{"time_hours":168,"approval_perbill":588235295,"support_perbill":7537688,"approval":58.8235295,"support":0.7537688},{"time_hours":169,"approval_perbill":585784315,"support_perbill":7449814,"approval":58.5784315,"support":0.7449814},{"time_hours":170,"approval_perbill":583333335,"support_perbill":7362942,"approval":58.3333335,"support":0.7362942},{"time_hours":171,"approval_perbill":580882354,"support_perbill":7277057,"approval":58.0882354,"support":0.7277057},{"time_hours":172,"approval_perbill":578431374,"support_perbill":7192141,"approval":57.8431374,"support":0.7192141},{"time_hours":173,"approval_perbill":575980393,"support_perbill":7108178,"approval":57.5980393,"support":0.7108178},{"time_hours":174,"approval_perbill":573529413,"support_perbill":7025151,"approval":57.3529413,"support":0.7025151},{"time_hours":175,"approval_perbill":571078432,"support_perbill":6943047,"approval":57.1078432,"support":0.6943047},{"time_hours":176,"approval_perbill":568627452,"support_perbill":6861848,"approval":56.8627452,"support":0.6861848},{"time_hours":177,"approval_perbill":566176471,"support_perbill":6781540,"approval":56.6176471,"support":0.678154},{"time_hours":178,"approval_perbill":563725491,"support_perbill":6702109,"approval":56.3725491,"support":0.6702109},{"time_hours":179,"approval_perbill":561274510,"support_perbill":6623541,"approval":56.127451,"support":0.6623541},{"time_hours":180,"approval_perbill":558823530,"support_perbill":6545820,"approval":55.882353,"support":0.654582},{"time_hours":181,"approval_perbill":556372550,"support_perbill":6468935,"approval":55.637255,"support":0.6468935},{"time_hours":182,"approval_perbill":553921570,"support_perbill":6392871,"approval":55.392157,"support":0.6392871},{"time_hours":183,"approval_perbill":551470589,"support_perbill":6317615,"approval":55.1470589,"support":0.6317615},{"time_hours":184,"approval_perbill":549019609,"support_perbill":6243154,"approval":54.9019609,"support":0.6243154},{"time_hours":185,"approval_perbill":546568628,"support_perbill":6169476,"approval":54.6568628,"support":0.6169476},{"time_hours":186,"approval_perbill":544117648,"support_perbill":6096569,"approval":54.4117648,"support":0.6096569},{"time_hours":187,"approval_perbill":541666667,"support_perbill":6024421,"approval":54.1666667,"support":0.6024421},{"time_hours":188,"approval_perbill":539215687,"support_perbill":5953019,"approval":53.9215687,"support":0.5953019},{"time_hours":189,"approval_perbill":536764706,"support_perbill":5882353,"approval":53.6764706,"support":0.5882353},{"time_hours":190,"approval_perbill":534313726,"support_perbill":5812410,"approval":53.4313726,"support":0.581241},{"time_hours":191,"approval_perbill":531862746,"support_perbill":5743181,"approval":53.1862746,"support":0.5743181},{"time_hours":192,"approval_perbill":529411765,"support_perbill":5674653,"approval":52.9411765,"support":0.5674653},{"time_hours":193,"approval_perbill":526960785,"support_perbill":5606817,"approval":52.6960785,"support":0.5606817},{"time_hours":194,"approval_perbill":524509805,"support_perbill":5539662,"approval":52.4509805,"support":0.5539662},{"time_hours":195,"approval_perbill":522058825,"support_perbill":5473177,"approval":52.2058825,"support":0.5473177},{"time_hours":196,"approval_perbill":519607844,"support_perbill":5407354,"approval":51.9607844,"support":0.5407354},{"time_hours":197,"approval_perbill":517156864,"support_perbill":5342181,"approval":51.7156864,"support":0.5342181},{"time_hours":198,"approval_perbill":514705883,"support_perbill":5277650,"approval":51.4705883,"support":0.527765},{"time_hours":199,"approval_perbill":512254903,"support_perbill":5213751,"approval":51.2254903,"support":0.5213751},{"time_hours":200,"approval_perbill":509803922,"support_perbill":5150474,"approval":50.9803922,"support":0.5150474},{"time_hours":201,"approval_perbill":507352942,"support_perbill":5087812,"approval":50.7352942,"support":0.5087812},{"time_hours":202,"approval_perbill":504901961,"support_perbill":5025754,"approval":50.4901961,"support":0.5025754},{"time_hours":203,"approval_perbill":502450981,"support_perbill":4964292,"approval":50.2450981,"support":0.4964292},{"time_hours":204,"approval_perbill":500000000,"support_perbill":4903417,"approval":50,"support":0.4903417},{"time_hours":205,"approval_perbill":500000000,"support_perbill":4843122,"approval":50,"support":0.4843122},{"time_hours":206,"approval_perbill":500000000,"support_perbill":4783398,"approval":50,"support":0.4783398},{"time_hours":207,"approval_perbill":500000000,"support_perbill":4724236,"approval":50,"support":0.4724236},{"time_hours":208,"approval_perbill":500000000,"support_perbill":4665630,"approval":50,"support":0.466563},{"time_hours":209,"approval_perbill":500000000,"support_perbill":4607570,"approval":50,"support":0.460757},{"time_hours":210,"approval_perbill":500000000,"support_perbill":4550050,"approval":50,"support":0.455005},{"time_hours":211,"approval_perbill":500000000,"support_perbill":4493062,"approval":50,"support":0.4493062},{"time_hours":212,"approval_perbill":500000000,"support_perbill":4436599,"approval":50,"support":0.4436599},{"time_hours":213,"approval_perbill":500000000,"support_perbill":4380654,"approval":50,"support":0.4380654},{"time_hours":214,"approval_perbill":500000000,"support_perbill":4325218,"approval":50,"support":0.4325218},{"time_hours":215,"approval_perbill":500000000,"support_perbill":4270287,"approval":50,"support":0.4270287},{"time_hours":216,"approval_perbill":500000000,"support_perbill":4215851,"approval":50,"support":0.4215851},{"time_hours":217,"approval_perbill":500000000,"support_perbill":4161906,"approval":50,"support":0.4161906},{"time_hours":218,"approval_perbill":500000000,"support_perbill":4108444,"approval":50,"support":0.4108444},{"time_hours":219,"approval_perbill":500000000,"support_perbill":4055459,"approval":50,"support":0.4055459},{"time_hours":220,"approval_perbill":500000000,"support_perbill":4002944,"approval":50,"support":0.4002944},{"time_hours":221,"approval_perbill":500000000,"support_perbill":3950894,"approval":50,"support":0.3950894},{"time_hours":222,"approval_perbill":500000000,"support_perbill":3899302,"approval":50,"support":0.3899302},{"time_hours":223,"approval_perbill":500000000,"support_perbill":3848162,"approval":50,"support":0.3848162},{"time_hours":224,"approval_perbill":500000000,"support_perbill":3797468,"approval":50,"support":0.3797468},{"time_hours":225,"approval_perbill":500000000,"support_perbill":3747215,"approval":50,"support":0.3747215},{"time_hours":226,"approval_perbill":500000000,"support_perbill":3697396,"approval":50,"support":0.3697396},{"time_hours":227,"approval_perbill":500000000,"support_perbill":3648006,"approval":50,"support":0.3648006},{"time_hours":228,"approval_perbill":500000000,"support_perbill":3599040,"approval":50,"support":0.359904},{"time_hours":229,"approval_perbill":500000000,"support_perbill":3550492,"approval":50,"support":0.3550492},{"time_hours":230,"approval_perbill":500000000,"support_perbill":3502357,"approval":50,"support":0.3502357},{"time_hours":231,"approval_perbill":500000000,"support_perbill":3454629,"approval":50,"support":0.3454629},{"time_hours":232,"approval_perbill":500000000,"support_perbill":3407304,"approval":50,"support":0.3407304},{"time_hours":233,"approval_perbill":500000000,"support_perbill":3360376,"approval":50,"support":0.3360376},{"time_hours":234,"approval_perbill":500000000,"support_perbill":3313840,"approval":50,"support":0.331384},{"time_hours":235,"approval_perbill":500000000,"support_perbill":3267692,"approval":50,"support":0.3267692},{"time_hours":236,"approval_perbill":500000000,"support_perbill":3221926,"approval":50,"support":0.3221926},{"time_hours":237,"approval_perbill":500000000,"support_perbill":3176538,"approval":50,"support":0.3176538},{"time_hours":238,"approval_perbill":500000000,"support_perbill":3131524,"approval":50,"support":0.3131524},{"time_hours":239,"approval_perbill":500000000,"support_perbill":3086878,"approval":50,"support":0.3086878},{"time_hours":240,"approval_perbill":500000000,"support_perbill":3042596,"approval":50,"support":0.3042596},{"time_hours":241,"approval_perbill":500000000,"support_perbill":2998674,"approval":50,"support":0.2998674},{"time_hours":242,"approval_perbill":500000000,"support_perbill":2955107,"approval":50,"support":0.2955107},{"time_hours":243,"approval_perbill":500000000,"support_perbill":2911892,"approval":50,"support":0.2911892},{"time_hours":244,"approval_perbill":500000000,"support_perbill":2869023,"approval":50,"support":0.2869023},{"time_hours":245,"approval_perbill":500000000,"support_perbill":2826496,"approval":50,"support":0.2826496},{"time_hours":246,"approval_perbill":500000000,"support_perbill":2784309,"approval":50,"support":0.2784309},{"time_hours":247,"approval_perbill":500000000,"support_perbill":2742455,"approval":50,"support":0.2742455},{"time_hours":248,"approval_perbill":500000000,"support_perbill":2700933,"approval":50,"support":0.2700933},{"time_hours":249,"approval_perbill":500000000,"support_perbill":2659737,"approval":50,"support":0.2659737},{"time_hours":250,"approval_perbill":500000000,"support_perbill":2618864,"approval":50,"support":0.2618864},{"time_hours":251,"approval_perbill":500000000,"support_perbill":2578310,"approval":50,"support":0.257831},{"time_hours":252,"approval_perbill":500000000,"support_perbill":2538071,"approval":50,"support":0.2538071},{"time_hours":253,"approval_perbill":500000000,"support_perbill":2498144,"approval":50,"support":0.2498144},{"time_hours":254,"approval_perbill":500000000,"support_perbill":2458525,"approval":50,"support":0.2458525},{"time_hours":255,"approval_perbill":500000000,"support_perbill":2419210,"approval":50,"support":0.241921},{"time_hours":256,"approval_perbill":500000000,"support_perbill":2380197,"approval":50,"support":0.2380197},{"time_hours":257,"approval_perbill":500000000,"support_perbill":2341481,"approval":50,"support":0.2341481},{"time_hours":258,"approval_perbill":500000000,"support_perbill":2303059,"approval":50,"support":0.2303059},{"time_hours":259,"approval_perbill":500000000,"support_perbill":2264928,"approval":50,"support":0.2264928},{"time_hours":260,"approval_perbill":500000000,"support_perbill":2227084,"approval":50,"support":0.2227084},{"time_hours":261,"approval_perbill":500000000,"support_perbill":2189525,"approval":50,"support":0.2189525},{"time_hours":262,"approval_perbill":500000000,"support_perbill":2152247,"approval":50,"support":0.2152247},{"time_hours":263,"approval_perbill":500000000,"support_perbill":2115247,"approval":50,"support":0.2115247},{"time_hours":264,"approval_perbill":500000000,"support_perbill":2078522,"approval":50,"support":0.2078522},{"time_hours":265,"approval_perbill":500000000,"support_perbill":2042068,"approval":50,"support":0.2042068},{"time_hours":266,"approval_perbill":500000000,"support_perbill":2005884,"approval":50,"support":0.2005884},{"time_hours":267,"approval_perbill":500000000,"support_perbill":1969965,"approval":50,"support":0.1969965},{"time_hours":268,"approval_perbill":500000000,"support_perbill":1934309,"approval":50,"support":0.1934309},{"time_hours":269,"approval_perbill":500000000,"support_perbill":1898913,"approval":50,"support":0.1898913},{"time_hours":270,"approval_perbill":500000000,"support_perbill":1863775,"approval":50,"support":0.1863775},{"time_hours":271,"approval_perbill":500000000,"support_perbill":1828891,"approval":50,"support":0.1828891},{"time_hours":272,"approval_perbill":500000000,"support_perbill":1794258,"approval":50,"support":0.1794258},{"time_hours":273,"approval_perbill":500000000,"support_perbill":1759875,"approval":50,"support":0.1759875},{"time_hours":274,"approval_perbill":500000000,"support_perbill":1725737,"approval":50,"support":0.1725737},{"time_hours":275,"approval_perbill":500000000,"support_perbill":1691844,"approval":50,"support":0.1691844},{"time_hours":276,"approval_perbill":500000000,"support_perbill":1658191,"approval":50,"support":0.1658191},{"time_hours":277,"approval_perbill":500000000,"support_perbill":1624777,"approval":50,"support":0.1624777},{"time_hours":278,"approval_perbill":500000000,"support_perbill":1591599,"approval":50,"support":0.1591599},{"time_hours":279,"approval_perbill":500000000,"support_perbill":1558654,"approval":50,"support":0.1558654},{"time_hours":280,"approval_perbill":500000000,"support_perbill":1525941,"approval":50,"support":0.1525941},{"time_hours":281,"approval_perbill":500000000,"support_perbill":1493456,"approval":50,"support":0.1493456},{"time_hours":282,"approval_perbill":500000000,"support_perbill":1461197,"approval":50,"support":0.1461197},{"time_hours":283,"approval_perbill":500000000,"support_perbill":1429162,"approval":50,"support":0.1429162},{"time_hours":284,"approval_perbill":500000000,"support_perbill":1397348,"approval":50,"support":0.1397348},{"time_hours":285,"approval_perbill":500000000,"support_perbill":1365754,"approval":50,"support":0.1365754},{"time_hours":286,"approval_perbill":500000000,"support_perbill":1334377,"approval":50,"support":0.1334377},{"time_hours":287,"approval_perbill":500000000,"support_perbill":1303214,"approval":50,"support":0.1303214},{"time_hours":288,"approval_perbill":500000000,"support_perbill":1272264,"approval":50,"support":0.1272264},{"time_hours":289,"approval_perbill":500000000,"support_perbill":1241525,"approval":50,"support":0.1241525},{"time_hours":290,"approval_perbill":500000000,"support_perbill":1210994,"approval":50,"support":0.1210994},{"time_hours":291,"approval_perbill":500000000,"support_perbill":1180668,"approval":50,"support":0.1180668},{"time_hours":292,"approval_perbill":500000000,"support_perbill":1150547,"approval":50,"support":0.1150547},{"time_hours":293,"approval_perbill":500000000,"support_perbill":1120628,"approval":50,"support":0.1120628},{"time_hours":294,"approval_perbill":500000000,"support_perbill":1090909,"approval":50,"support":0.1090909},{"time_hours":295,"approval_perbill":500000000,"support_perbill":1061388,"approval":50,"support":0.1061388},{"time_hours":296,"approval_perbill":500000000,"support_perbill":1032063,"approval":50,"support":0.1032063},{"time_hours":297,"approval_perbill":500000000,"support_perbill":1002932,"approval":50,"support":0.1002932},{"time_hours":298,"approval_perbill":500000000,"support_perbill":973993,"approval":50,"support":0.0973993},{"time_hours":299,"approval_perbill":500000000,"support_perbill":945244,"approval":50,"support":0.0945244},{"time_hours":300,"approval_perbill":500000000,"support_perbill":916684,"approval":50,"support":0.0916684},{"time_hours":301,"approval_perbill":500000000,"support_perbill":888310,"approval":50,"support":0.088831},{"time_hours":302,"approval_perbill":500000000,"support_perbill":860121,"approval":50,"support":0.0860121},{"time_hours":303,"approval_perbill":500000000,"support_perbill":832114,"approval":50,"support":0.0832114},{"time_hours":304,"approval_perbill":500000000,"support_perbill":804289,"approval":50,"support":0.0804289},{"time_hours":305,"approval_perbill":500000000,"support_perbill":776644,"approval":50,"support":0.0776644},{"time_hours":306,"approval_perbill":500000000,"support_perbill":749176,"approval":50,"support":0.0749176},{"time_hours":307,"approval_perbill":500000000,"support_perbill":721884,"approval":50,"support":0.0721884},{"time_hours":308,"approval_perbill":500000000,"support_perbill":694766,"approval":50,"support":0.0694766},{"time_hours":309,"approval_perbill":500000000,"support_perbill":667821,"approval":50,"support":0.0667821},{"time_hours":310,"approval_perbill":500000000,"support_perbill":641047,"approval":50,"support":0.0641047},{"time_hours":311,"approval_perbill":500000000,"support_perbill":614442,"approval":50,"support":0.0614442},{"time_hours":312,"approval_perbill":500000000,"support_perbill":588005,"approval":50,"support":0.0588005},{"time_hours":313,"approval_perbill":500000000,"support_perbill":561734,"approval":50,"support":0.0561734},{"time_hours":314,"approval_perbill":500000000,"support_perbill":535627,"approval":50,"support":0.0535627},{"time_hours":315,"approval_perbill":500000000,"support_perbill":509684,"approval":50,"support":0.0509684},{"time_hours":316,"approval_perbill":500000000,"support_perbill":483902,"approval":50,"support":0.0483902},{"time_hours":317,"approval_perbill":500000000,"support_perbill":458280,"approval":50,"support":0.045828},{"time_hours":318,"approval_perbill":500000000,"support_perbill":432817,"approval":50,"support":0.0432817},{"time_hours":319,"approval_perbill":500000000,"support_perbill":407511,"approval":50,"support":0.0407511},{"time_hours":320,"approval_perbill":500000000,"support_perbill":382360,"approval":50,"support":0.038236},{"time_hours":321,"approval_perbill":500000000,"support_perbill":357364,"approval":50,"support":0.0357364},{"time_hours":322,"approval_perbill":500000000,"support_perbill":332520,"approval":50,"support":0.033252},{"time_hours":323,"approval_perbill":500000000,"support_perbill":307828,"approval":50,"support":0.0307828},{"time_hours":324,"approval_perbill":500000000,"support_perbill":283286,"approval":50,"support":0.0283286},{"time_hours":325,"approval_perbill":500000000,"support_perbill":258892,"approval":50,"support":0.0258892},{"time_hours":326,"approval_perbill":500000000,"support_perbill":234646,"approval":50,"support":0.0234646},{"time_hours":327,"approval_perbill":500000000,"support_perbill":210546,"approval":50,"support":0.0210546},{"time_hours":328,"approval_perbill":500000000,"support_perbill":186590,"approval":50,"support":0.018659},{"time_hours":329,"approval_perbill":500000000,"support_perbill":162778,"approval":50,"support":0.0162778},{"time_hours":330,"approval_perbill":500000000,"support_perbill":139108,"approval":50,"support":0.0139108},{"time_hours":331,"approval_perbill":500000000,"support_perbill":115578,"approval":50,"support":0.0115578},{"time_hours":332,"approval_perbill":500000000,"support_perbill":92188,"approval":50,"support":0.0092188},{"time_hours":333,"approval_perbill":500000000,"support_perbill":68937,"approval":50,"support":0.0068937},{"time_hours":334,"approval_perbill":500000000,"support_perbill":45822,"approval":50,"support":0.0045822},{"time_hours":335,"approval_perbill":500000000,"support_perbill":22844,"approval":50,"support":0.0022844},{"time_hours":336,"approval_perbill":500000000,"support_perbill":0,"approval":50,"support":0}]')},56041:p=>{"use strict";p.exports=JSON.parse('[{"time_hours":0,"approval_perbill":1000000000,"support_perbill":500000080,"approval":100,"support":50.000008},{"time_hours":1,"approval_perbill":995833334,"support_perbill":259488839,"approval":99.5833334,"support":25.9488839},{"time_hours":2,"approval_perbill":991666668,"support_perbill":174869164,"approval":99.1666668,"support":17.4869164},{"time_hours":3,"approval_perbill":987500001,"support_perbill":131672630,"approval":98.7500001,"support":13.167263},{"time_hours":4,"approval_perbill":983333335,"support_perbill":105463816,"approval":98.3333335,"support":10.5463816},{"time_hours":5,"approval_perbill":979166668,"support_perbill":87868351,"approval":97.9166668,"support":8.7868351},{"time_hours":6,"approval_perbill":975000002,"support_perbill":75239418,"approval":97.5000002,"support":7.5239418},{"time_hours":7,"approval_perbill":970833334,"support_perbill":65734281,"approval":97.0833334,"support":6.5734281},{"time_hours":8,"approval_perbill":966666668,"support_perbill":58321494,"approval":96.6666668,"support":5.8321494},{"time_hours":9,"approval_perbill":962500001,"support_perbill":52378676,"approval":96.2500001,"support":5.2378676},{"time_hours":10,"approval_perbill":958333335,"support_perbill":47508027,"approval":95.8333335,"support":4.7508027},{"time_hours":11,"approval_perbill":954166667,"support_perbill":43443400,"approval":95.4166667,"support":4.34434},{"time_hours":12,"approval_perbill":950000001,"support_perbill":40000010,"approval":95.0000001,"support":4.000001},{"time_hours":13,"approval_perbill":945833334,"support_perbill":37045541,"approval":94.5833334,"support":3.7045541},{"time_hours":14,"approval_perbill":941666668,"support_perbill":34482767,"approval":94.1666668,"support":3.4482767},{"time_hours":15,"approval_perbill":937500001,"support_perbill":32238633,"approval":93.7500001,"support":3.2238633},{"time_hours":16,"approval_perbill":933333335,"support_perbill":30257193,"approval":93.3333335,"support":3.0257193},{"time_hours":17,"approval_perbill":929166667,"support_perbill":28494870,"approval":92.9166667,"support":2.849487},{"time_hours":18,"approval_perbill":925000001,"support_perbill":26917223,"approval":92.5000001,"support":2.6917223},{"time_hours":19,"approval_perbill":920833334,"support_perbill":25496668,"approval":92.0833334,"support":2.5496668},{"time_hours":20,"approval_perbill":916666668,"support_perbill":24210854,"approval":91.6666668,"support":2.4210854},{"time_hours":21,"approval_perbill":912500000,"support_perbill":23041480,"approval":91.25,"support":2.304148},{"time_hours":22,"approval_perbill":908333334,"support_perbill":21973413,"approval":90.8333334,"support":2.1973413},{"time_hours":23,"approval_perbill":904166668,"support_perbill":20994035,"approval":90.4166668,"support":2.0994035},{"time_hours":24,"approval_perbill":900000001,"support_perbill":20092740,"approval":90.0000001,"support":2.009274},{"time_hours":25,"approval_perbill":895833335,"support_perbill":19260548,"approval":89.5833335,"support":1.9260548},{"time_hours":26,"approval_perbill":891666668,"support_perbill":18489805,"approval":89.1666668,"support":1.8489805},{"time_hours":27,"approval_perbill":887500002,"support_perbill":17773947,"approval":88.7500002,"support":1.7773947},{"time_hours":28,"approval_perbill":883333334,"support_perbill":17107313,"approval":88.3333334,"support":1.7107313},{"time_hours":29,"approval_perbill":879166668,"support_perbill":16484995,"approval":87.9166668,"support":1.6484995},{"time_hours":30,"approval_perbill":875000001,"support_perbill":15902716,"approval":87.5000001,"support":1.5902716},{"time_hours":31,"approval_perbill":870833335,"support_perbill":15356733,"approval":87.0833335,"support":1.5356733},{"time_hours":32,"approval_perbill":866666667,"support_perbill":14843753,"approval":86.6666667,"support":1.4843753},{"time_hours":33,"approval_perbill":862500001,"support_perbill":14360873,"approval":86.2500001,"support":1.4360873},{"time_hours":34,"approval_perbill":858333334,"support_perbill":13905519,"approval":85.8333334,"support":1.3905519},{"time_hours":35,"approval_perbill":854166668,"support_perbill":13475403,"approval":85.4166668,"support":1.3475403},{"time_hours":36,"approval_perbill":850000001,"support_perbill":13068482,"approval":85.0000001,"support":1.3068482},{"time_hours":37,"approval_perbill":845833335,"support_perbill":12682930,"approval":84.5833335,"support":1.268293},{"time_hours":38,"approval_perbill":841666667,"support_perbill":12317106,"approval":84.1666667,"support":1.2317106},{"time_hours":39,"approval_perbill":837500001,"support_perbill":11969535,"approval":83.7500001,"support":1.1969535},{"time_hours":40,"approval_perbill":833333334,"support_perbill":11638883,"approval":83.3333334,"support":1.1638883},{"time_hours":41,"approval_perbill":829166668,"support_perbill":11323944,"approval":82.9166668,"support":1.1323944},{"time_hours":42,"approval_perbill":825000000,"support_perbill":11023624,"approval":82.5,"support":1.1023624},{"time_hours":43,"approval_perbill":820833334,"support_perbill":10736929,"approval":82.0833334,"support":1.0736929},{"time_hours":44,"approval_perbill":816666668,"support_perbill":10462952,"approval":81.6666668,"support":1.0462952},{"time_hours":45,"approval_perbill":812500001,"support_perbill":10200864,"approval":81.2500001,"support":1.0200864},{"time_hours":46,"approval_perbill":808333335,"support_perbill":9949909,"approval":80.8333335,"support":0.9949909},{"time_hours":47,"approval_perbill":804166668,"support_perbill":9709392,"approval":80.4166668,"support":0.9709392},{"time_hours":48,"approval_perbill":800000002,"support_perbill":9478675,"approval":80.0000002,"support":0.9478675},{"time_hours":49,"approval_perbill":795833334,"support_perbill":9257171,"approval":79.5833334,"support":0.9257171},{"time_hours":50,"approval_perbill":791666668,"support_perbill":9044338,"approval":79.1666668,"support":0.9044338},{"time_hours":51,"approval_perbill":787500001,"support_perbill":8839678,"approval":78.7500001,"support":0.8839678},{"time_hours":52,"approval_perbill":783333335,"support_perbill":8642729,"approval":78.3333335,"support":0.8642729},{"time_hours":53,"approval_perbill":779166667,"support_perbill":8453062,"approval":77.9166667,"support":0.8453062},{"time_hours":54,"approval_perbill":775000001,"support_perbill":8270281,"approval":77.5000001,"support":0.8270281},{"time_hours":55,"approval_perbill":770833334,"support_perbill":8094019,"approval":77.0833334,"support":0.8094019},{"time_hours":56,"approval_perbill":766666668,"support_perbill":7923932,"approval":76.6666668,"support":0.7923932},{"time_hours":57,"approval_perbill":762500001,"support_perbill":7759701,"approval":76.2500001,"support":0.7759701},{"time_hours":58,"approval_perbill":758333335,"support_perbill":7601030,"approval":75.8333335,"support":0.760103},{"time_hours":59,"approval_perbill":754166667,"support_perbill":7447639,"approval":75.4166667,"support":0.7447639},{"time_hours":60,"approval_perbill":750000001,"support_perbill":7299272,"approval":75.0000001,"support":0.7299272},{"time_hours":61,"approval_perbill":745833334,"support_perbill":7155683,"approval":74.5833334,"support":0.7155683},{"time_hours":62,"approval_perbill":741666668,"support_perbill":7016647,"approval":74.1666668,"support":0.7016647},{"time_hours":63,"approval_perbill":737500000,"support_perbill":6881949,"approval":73.75,"support":0.6881949},{"time_hours":64,"approval_perbill":733333334,"support_perbill":6751391,"approval":73.3333334,"support":0.6751391},{"time_hours":65,"approval_perbill":729166668,"support_perbill":6624784,"approval":72.9166668,"support":0.6624784},{"time_hours":66,"approval_perbill":725000001,"support_perbill":6501952,"approval":72.5000001,"support":0.6501952},{"time_hours":67,"approval_perbill":720833335,"support_perbill":6382728,"approval":72.0833335,"support":0.6382728},{"time_hours":68,"approval_perbill":716666668,"support_perbill":6266955,"approval":71.6666668,"support":0.6266955},{"time_hours":69,"approval_perbill":712500002,"support_perbill":6154486,"approval":71.2500002,"support":0.6154486},{"time_hours":70,"approval_perbill":708333334,"support_perbill":6045181,"approval":70.8333334,"support":0.6045181},{"time_hours":71,"approval_perbill":704166668,"support_perbill":5938909,"approval":70.4166668,"support":0.5938909},{"time_hours":72,"approval_perbill":700000001,"support_perbill":5835545,"approval":70.0000001,"support":0.5835545},{"time_hours":73,"approval_perbill":695833335,"support_perbill":5734971,"approval":69.5833335,"support":0.5734971},{"time_hours":74,"approval_perbill":691666667,"support_perbill":5637077,"approval":69.1666667,"support":0.5637077},{"time_hours":75,"approval_perbill":687500001,"support_perbill":5541755,"approval":68.7500001,"support":0.5541755},{"time_hours":76,"approval_perbill":683333334,"support_perbill":5448907,"approval":68.3333334,"support":0.5448907},{"time_hours":77,"approval_perbill":679166668,"support_perbill":5358437,"approval":67.9166668,"support":0.5358437},{"time_hours":78,"approval_perbill":675000001,"support_perbill":5270255,"approval":67.5000001,"support":0.5270255},{"time_hours":79,"approval_perbill":670833335,"support_perbill":5184275,"approval":67.0833335,"support":0.5184275},{"time_hours":80,"approval_perbill":666666667,"support_perbill":5100415,"approval":66.6666667,"support":0.5100415},{"time_hours":81,"approval_perbill":662500001,"support_perbill":5018599,"approval":66.2500001,"support":0.5018599},{"time_hours":82,"approval_perbill":658333334,"support_perbill":4938753,"approval":65.8333334,"support":0.4938753},{"time_hours":83,"approval_perbill":654166668,"support_perbill":4860805,"approval":65.4166668,"support":0.4860805},{"time_hours":84,"approval_perbill":650000000,"support_perbill":4784690,"approval":65,"support":0.478469},{"time_hours":85,"approval_perbill":645833334,"support_perbill":4710343,"approval":64.5833334,"support":0.4710343},{"time_hours":86,"approval_perbill":641666668,"support_perbill":4637704,"approval":64.1666668,"support":0.4637704},{"time_hours":87,"approval_perbill":637500001,"support_perbill":4566713,"approval":63.7500001,"support":0.4566713},{"time_hours":88,"approval_perbill":633333335,"support_perbill":4497317,"approval":63.3333335,"support":0.4497317},{"time_hours":89,"approval_perbill":629166668,"support_perbill":4429461,"approval":62.9166668,"support":0.4429461},{"time_hours":90,"approval_perbill":625000002,"support_perbill":4363095,"approval":62.5000002,"support":0.4363095},{"time_hours":91,"approval_perbill":620833334,"support_perbill":4298171,"approval":62.0833334,"support":0.4298171},{"time_hours":92,"approval_perbill":616666668,"support_perbill":4234642,"approval":61.6666668,"support":0.4234642},{"time_hours":93,"approval_perbill":612500001,"support_perbill":4172462,"approval":61.2500001,"support":0.4172462},{"time_hours":94,"approval_perbill":608333335,"support_perbill":4111591,"approval":60.8333335,"support":0.4111591},{"time_hours":95,"approval_perbill":604166667,"support_perbill":4051987,"approval":60.4166667,"support":0.4051987},{"time_hours":96,"approval_perbill":600000001,"support_perbill":3993611,"approval":60.0000001,"support":0.3993611},{"time_hours":97,"approval_perbill":595833334,"support_perbill":3936425,"approval":59.5833334,"support":0.3936425},{"time_hours":98,"approval_perbill":591666668,"support_perbill":3880393,"approval":59.1666668,"support":0.3880393},{"time_hours":99,"approval_perbill":587500001,"support_perbill":3825481,"approval":58.7500001,"support":0.3825481},{"time_hours":100,"approval_perbill":583333335,"support_perbill":3771656,"approval":58.3333335,"support":0.3771656},{"time_hours":101,"approval_perbill":579166667,"support_perbill":3718885,"approval":57.9166667,"support":0.3718885},{"time_hours":102,"approval_perbill":575000001,"support_perbill":3667137,"approval":57.5000001,"support":0.3667137},{"time_hours":103,"approval_perbill":570833334,"support_perbill":3616385,"approval":57.0833334,"support":0.3616385},{"time_hours":104,"approval_perbill":566666668,"support_perbill":3566598,"approval":56.6666668,"support":0.3566598},{"time_hours":105,"approval_perbill":562500000,"support_perbill":3517749,"approval":56.25,"support":0.3517749},{"time_hours":106,"approval_perbill":558333334,"support_perbill":3469813,"approval":55.8333334,"support":0.3469813},{"time_hours":107,"approval_perbill":554166668,"support_perbill":3422764,"approval":55.4166668,"support":0.3422764},{"time_hours":108,"approval_perbill":550000001,"support_perbill":3376578,"approval":55.0000001,"support":0.3376578},{"time_hours":109,"approval_perbill":545833335,"support_perbill":3331230,"approval":54.5833335,"support":0.333123},{"time_hours":110,"approval_perbill":541666668,"support_perbill":3286700,"approval":54.1666668,"support":0.32867},{"time_hours":111,"approval_perbill":537500002,"support_perbill":3242963,"approval":53.7500002,"support":0.3242963},{"time_hours":112,"approval_perbill":533333334,"support_perbill":3200001,"approval":53.3333334,"support":0.3200001},{"time_hours":113,"approval_perbill":529166668,"support_perbill":3157791,"approval":52.9166668,"support":0.3157791},{"time_hours":114,"approval_perbill":525000001,"support_perbill":3116315,"approval":52.5000001,"support":0.3116315},{"time_hours":115,"approval_perbill":520833335,"support_perbill":3075553,"approval":52.0833335,"support":0.3075553},{"time_hours":116,"approval_perbill":516666667,"support_perbill":3035488,"approval":51.6666667,"support":0.3035488},{"time_hours":117,"approval_perbill":512500001,"support_perbill":2996101,"approval":51.2500001,"support":0.2996101},{"time_hours":118,"approval_perbill":508333334,"support_perbill":2957376,"approval":50.8333334,"support":0.2957376},{"time_hours":119,"approval_perbill":504166668,"support_perbill":2919296,"approval":50.4166668,"support":0.2919296},{"time_hours":120,"approval_perbill":500000000,"support_perbill":2881845,"approval":50,"support":0.2881845},{"time_hours":121,"approval_perbill":500000000,"support_perbill":2845007,"approval":50,"support":0.2845007},{"time_hours":122,"approval_perbill":500000000,"support_perbill":2808768,"approval":50,"support":0.2808768},{"time_hours":123,"approval_perbill":500000000,"support_perbill":2773113,"approval":50,"support":0.2773113},{"time_hours":124,"approval_perbill":500000000,"support_perbill":2738028,"approval":50,"support":0.2738028},{"time_hours":125,"approval_perbill":500000000,"support_perbill":2703500,"approval":50,"support":0.27035},{"time_hours":126,"approval_perbill":500000000,"support_perbill":2669515,"approval":50,"support":0.2669515},{"time_hours":127,"approval_perbill":500000000,"support_perbill":2636060,"approval":50,"support":0.263606},{"time_hours":128,"approval_perbill":500000000,"support_perbill":2603124,"approval":50,"support":0.2603124},{"time_hours":129,"approval_perbill":500000000,"support_perbill":2570694,"approval":50,"support":0.2570694},{"time_hours":130,"approval_perbill":500000000,"support_perbill":2538760,"approval":50,"support":0.253876},{"time_hours":131,"approval_perbill":500000000,"support_perbill":2507308,"approval":50,"support":0.2507308},{"time_hours":132,"approval_perbill":500000000,"support_perbill":2476330,"approval":50,"support":0.247633},{"time_hours":133,"approval_perbill":500000000,"support_perbill":2445813,"approval":50,"support":0.2445813},{"time_hours":134,"approval_perbill":500000000,"support_perbill":2415748,"approval":50,"support":0.2415748},{"time_hours":135,"approval_perbill":500000000,"support_perbill":2386125,"approval":50,"support":0.2386125},{"time_hours":136,"approval_perbill":500000000,"support_perbill":2356934,"approval":50,"support":0.2356934},{"time_hours":137,"approval_perbill":500000000,"support_perbill":2328166,"approval":50,"support":0.2328166},{"time_hours":138,"approval_perbill":500000000,"support_perbill":2299812,"approval":50,"support":0.2299812},{"time_hours":139,"approval_perbill":500000000,"support_perbill":2271863,"approval":50,"support":0.2271863},{"time_hours":140,"approval_perbill":500000000,"support_perbill":2244309,"approval":50,"support":0.2244309},{"time_hours":141,"approval_perbill":500000000,"support_perbill":2217144,"approval":50,"support":0.2217144},{"time_hours":142,"approval_perbill":500000000,"support_perbill":2190358,"approval":50,"support":0.2190358},{"time_hours":143,"approval_perbill":500000000,"support_perbill":2163944,"approval":50,"support":0.2163944},{"time_hours":144,"approval_perbill":500000000,"support_perbill":2137894,"approval":50,"support":0.2137894},{"time_hours":145,"approval_perbill":500000000,"support_perbill":2112201,"approval":50,"support":0.2112201},{"time_hours":146,"approval_perbill":500000000,"support_perbill":2086857,"approval":50,"support":0.2086857},{"time_hours":147,"approval_perbill":500000000,"support_perbill":2061856,"approval":50,"support":0.2061856},{"time_hours":148,"approval_perbill":500000000,"support_perbill":2037190,"approval":50,"support":0.203719},{"time_hours":149,"approval_perbill":500000000,"support_perbill":2012852,"approval":50,"support":0.2012852},{"time_hours":150,"approval_perbill":500000000,"support_perbill":1988837,"approval":50,"support":0.1988837},{"time_hours":151,"approval_perbill":500000000,"support_perbill":1965138,"approval":50,"support":0.1965138},{"time_hours":152,"approval_perbill":500000000,"support_perbill":1941748,"approval":50,"support":0.1941748},{"time_hours":153,"approval_perbill":500000000,"support_perbill":1918662,"approval":50,"support":0.1918662},{"time_hours":154,"approval_perbill":500000000,"support_perbill":1895873,"approval":50,"support":0.1895873},{"time_hours":155,"approval_perbill":500000000,"support_perbill":1873377,"approval":50,"support":0.1873377},{"time_hours":156,"approval_perbill":500000000,"support_perbill":1851166,"approval":50,"support":0.1851166},{"time_hours":157,"approval_perbill":500000000,"support_perbill":1829237,"approval":50,"support":0.1829237},{"time_hours":158,"approval_perbill":500000000,"support_perbill":1807584,"approval":50,"support":0.1807584},{"time_hours":159,"approval_perbill":500000000,"support_perbill":1786201,"approval":50,"support":0.1786201},{"time_hours":160,"approval_perbill":500000000,"support_perbill":1765084,"approval":50,"support":0.1765084},{"time_hours":161,"approval_perbill":500000000,"support_perbill":1744227,"approval":50,"support":0.1744227},{"time_hours":162,"approval_perbill":500000000,"support_perbill":1723626,"approval":50,"support":0.1723626},{"time_hours":163,"approval_perbill":500000000,"support_perbill":1703276,"approval":50,"support":0.1703276},{"time_hours":164,"approval_perbill":500000000,"support_perbill":1683172,"approval":50,"support":0.1683172},{"time_hours":165,"approval_perbill":500000000,"support_perbill":1663311,"approval":50,"support":0.1663311},{"time_hours":166,"approval_perbill":500000000,"support_perbill":1643687,"approval":50,"support":0.1643687},{"time_hours":167,"approval_perbill":500000000,"support_perbill":1624297,"approval":50,"support":0.1624297},{"time_hours":168,"approval_perbill":500000000,"support_perbill":1605137,"approval":50,"support":0.1605137},{"time_hours":169,"approval_perbill":500000000,"support_perbill":1586201,"approval":50,"support":0.1586201},{"time_hours":170,"approval_perbill":500000000,"support_perbill":1567487,"approval":50,"support":0.1567487},{"time_hours":171,"approval_perbill":500000000,"support_perbill":1548990,"approval":50,"support":0.154899},{"time_hours":172,"approval_perbill":500000000,"support_perbill":1530708,"approval":50,"support":0.1530708},{"time_hours":173,"approval_perbill":500000000,"support_perbill":1512635,"approval":50,"support":0.1512635},{"time_hours":174,"approval_perbill":500000000,"support_perbill":1494768,"approval":50,"support":0.1494768},{"time_hours":175,"approval_perbill":500000000,"support_perbill":1477105,"approval":50,"support":0.1477105},{"time_hours":176,"approval_perbill":500000000,"support_perbill":1459641,"approval":50,"support":0.1459641},{"time_hours":177,"approval_perbill":500000000,"support_perbill":1442373,"approval":50,"support":0.1442373},{"time_hours":178,"approval_perbill":500000000,"support_perbill":1425298,"approval":50,"support":0.1425298},{"time_hours":179,"approval_perbill":500000000,"support_perbill":1408413,"approval":50,"support":0.1408413},{"time_hours":180,"approval_perbill":500000000,"support_perbill":1391714,"approval":50,"support":0.1391714},{"time_hours":181,"approval_perbill":500000000,"support_perbill":1375199,"approval":50,"support":0.1375199},{"time_hours":182,"approval_perbill":500000000,"support_perbill":1358864,"approval":50,"support":0.1358864},{"time_hours":183,"approval_perbill":500000000,"support_perbill":1342706,"approval":50,"support":0.1342706},{"time_hours":184,"approval_perbill":500000000,"support_perbill":1326723,"approval":50,"support":0.1326723},{"time_hours":185,"approval_perbill":500000000,"support_perbill":1310912,"approval":50,"support":0.1310912},{"time_hours":186,"approval_perbill":500000000,"support_perbill":1295270,"approval":50,"support":0.129527},{"time_hours":187,"approval_perbill":500000000,"support_perbill":1279794,"approval":50,"support":0.1279794},{"time_hours":188,"approval_perbill":500000000,"support_perbill":1264482,"approval":50,"support":0.1264482},{"time_hours":189,"approval_perbill":500000000,"support_perbill":1249331,"approval":50,"support":0.1249331},{"time_hours":190,"approval_perbill":500000000,"support_perbill":1234338,"approval":50,"support":0.1234338},{"time_hours":191,"approval_perbill":500000000,"support_perbill":1219502,"approval":50,"support":0.1219502},{"time_hours":192,"approval_perbill":500000000,"support_perbill":1204819,"approval":50,"support":0.1204819},{"time_hours":193,"approval_perbill":500000000,"support_perbill":1190288,"approval":50,"support":0.1190288},{"time_hours":194,"approval_perbill":500000000,"support_perbill":1175906,"approval":50,"support":0.1175906},{"time_hours":195,"approval_perbill":500000000,"support_perbill":1161670,"approval":50,"support":0.116167},{"time_hours":196,"approval_perbill":500000000,"support_perbill":1147579,"approval":50,"support":0.1147579},{"time_hours":197,"approval_perbill":500000000,"support_perbill":1133630,"approval":50,"support":0.113363},{"time_hours":198,"approval_perbill":500000000,"support_perbill":1119821,"approval":50,"support":0.1119821},{"time_hours":199,"approval_perbill":500000000,"support_perbill":1106150,"approval":50,"support":0.110615},{"time_hours":200,"approval_perbill":500000000,"support_perbill":1092615,"approval":50,"support":0.1092615},{"time_hours":201,"approval_perbill":500000000,"support_perbill":1079214,"approval":50,"support":0.1079214},{"time_hours":202,"approval_perbill":500000000,"support_perbill":1065945,"approval":50,"support":0.1065945},{"time_hours":203,"approval_perbill":500000000,"support_perbill":1052807,"approval":50,"support":0.1052807},{"time_hours":204,"approval_perbill":500000000,"support_perbill":1039796,"approval":50,"support":0.1039796},{"time_hours":205,"approval_perbill":500000000,"support_perbill":1026911,"approval":50,"support":0.1026911},{"time_hours":206,"approval_perbill":500000000,"support_perbill":1014151,"approval":50,"support":0.1014151},{"time_hours":207,"approval_perbill":500000000,"support_perbill":1001514,"approval":50,"support":0.1001514},{"time_hours":208,"approval_perbill":500000000,"support_perbill":988997,"approval":50,"support":0.0988997},{"time_hours":209,"approval_perbill":500000000,"support_perbill":976600,"approval":50,"support":0.09766},{"time_hours":210,"approval_perbill":500000000,"support_perbill":964320,"approval":50,"support":0.096432},{"time_hours":211,"approval_perbill":500000000,"support_perbill":952156,"approval":50,"support":0.0952156},{"time_hours":212,"approval_perbill":500000000,"support_perbill":940106,"approval":50,"support":0.0940106},{"time_hours":213,"approval_perbill":500000000,"support_perbill":928169,"approval":50,"support":0.0928169},{"time_hours":214,"approval_perbill":500000000,"support_perbill":916342,"approval":50,"support":0.0916342},{"time_hours":215,"approval_perbill":500000000,"support_perbill":904626,"approval":50,"support":0.0904626},{"time_hours":216,"approval_perbill":500000000,"support_perbill":893017,"approval":50,"support":0.0893017},{"time_hours":217,"approval_perbill":500000000,"support_perbill":881514,"approval":50,"support":0.0881514},{"time_hours":218,"approval_perbill":500000000,"support_perbill":870117,"approval":50,"support":0.0870117},{"time_hours":219,"approval_perbill":500000000,"support_perbill":858823,"approval":50,"support":0.0858823},{"time_hours":220,"approval_perbill":500000000,"support_perbill":847631,"approval":50,"support":0.0847631},{"time_hours":221,"approval_perbill":500000000,"support_perbill":836540,"approval":50,"support":0.083654},{"time_hours":222,"approval_perbill":500000000,"support_perbill":825549,"approval":50,"support":0.0825549},{"time_hours":223,"approval_perbill":500000000,"support_perbill":814655,"approval":50,"support":0.0814655},{"time_hours":224,"approval_perbill":500000000,"support_perbill":803858,"approval":50,"support":0.0803858},{"time_hours":225,"approval_perbill":500000000,"support_perbill":793157,"approval":50,"support":0.0793157},{"time_hours":226,"approval_perbill":500000000,"support_perbill":782550,"approval":50,"support":0.078255},{"time_hours":227,"approval_perbill":500000000,"support_perbill":772037,"approval":50,"support":0.0772037},{"time_hours":228,"approval_perbill":500000000,"support_perbill":761615,"approval":50,"support":0.0761615},{"time_hours":229,"approval_perbill":500000000,"support_perbill":751283,"approval":50,"support":0.0751283},{"time_hours":230,"approval_perbill":500000000,"support_perbill":741041,"approval":50,"support":0.0741041},{"time_hours":231,"approval_perbill":500000000,"support_perbill":730887,"approval":50,"support":0.0730887},{"time_hours":232,"approval_perbill":500000000,"support_perbill":720821,"approval":50,"support":0.0720821},{"time_hours":233,"approval_perbill":500000000,"support_perbill":710840,"approval":50,"support":0.071084},{"time_hours":234,"approval_perbill":500000000,"support_perbill":700944,"approval":50,"support":0.0700944},{"time_hours":235,"approval_perbill":500000000,"support_perbill":691132,"approval":50,"support":0.0691132},{"time_hours":236,"approval_perbill":500000000,"support_perbill":681403,"approval":50,"support":0.0681403},{"time_hours":237,"approval_perbill":500000000,"support_perbill":671756,"approval":50,"support":0.0671756},{"time_hours":238,"approval_perbill":500000000,"support_perbill":662189,"approval":50,"support":0.0662189},{"time_hours":239,"approval_perbill":500000000,"support_perbill":652702,"approval":50,"support":0.0652702},{"time_hours":240,"approval_perbill":500000000,"support_perbill":643294,"approval":50,"support":0.0643294},{"time_hours":241,"approval_perbill":500000000,"support_perbill":633963,"approval":50,"support":0.0633963},{"time_hours":242,"approval_perbill":500000000,"support_perbill":624709,"approval":50,"support":0.0624709},{"time_hours":243,"approval_perbill":500000000,"support_perbill":615531,"approval":50,"support":0.0615531},{"time_hours":244,"approval_perbill":500000000,"support_perbill":606428,"approval":50,"support":0.0606428},{"time_hours":245,"approval_perbill":500000000,"support_perbill":597399,"approval":50,"support":0.0597399},{"time_hours":246,"approval_perbill":500000000,"support_perbill":588443,"approval":50,"support":0.0588443},{"time_hours":247,"approval_perbill":500000000,"support_perbill":579559,"approval":50,"support":0.0579559},{"time_hours":248,"approval_perbill":500000000,"support_perbill":570747,"approval":50,"support":0.0570747},{"time_hours":249,"approval_perbill":500000000,"support_perbill":562005,"approval":50,"support":0.0562005},{"time_hours":250,"approval_perbill":500000000,"support_perbill":553332,"approval":50,"support":0.0553332},{"time_hours":251,"approval_perbill":500000000,"support_perbill":544729,"approval":50,"support":0.0544729},{"time_hours":252,"approval_perbill":500000000,"support_perbill":536193,"approval":50,"support":0.0536193},{"time_hours":253,"approval_perbill":500000000,"support_perbill":527725,"approval":50,"support":0.0527725},{"time_hours":254,"approval_perbill":500000000,"support_perbill":519322,"approval":50,"support":0.0519322},{"time_hours":255,"approval_perbill":500000000,"support_perbill":510986,"approval":50,"support":0.0510986},{"time_hours":256,"approval_perbill":500000000,"support_perbill":502715,"approval":50,"support":0.0502715},{"time_hours":257,"approval_perbill":500000000,"support_perbill":494507,"approval":50,"support":0.0494507},{"time_hours":258,"approval_perbill":500000000,"support_perbill":486363,"approval":50,"support":0.0486363},{"time_hours":259,"approval_perbill":500000000,"support_perbill":478282,"approval":50,"support":0.0478282},{"time_hours":260,"approval_perbill":500000000,"support_perbill":470262,"approval":50,"support":0.0470262},{"time_hours":261,"approval_perbill":500000000,"support_perbill":462304,"approval":50,"support":0.0462304},{"time_hours":262,"approval_perbill":500000000,"support_perbill":454406,"approval":50,"support":0.0454406},{"time_hours":263,"approval_perbill":500000000,"support_perbill":446568,"approval":50,"support":0.0446568},{"time_hours":264,"approval_perbill":500000000,"support_perbill":438789,"approval":50,"support":0.0438789},{"time_hours":265,"approval_perbill":500000000,"support_perbill":431068,"approval":50,"support":0.0431068},{"time_hours":266,"approval_perbill":500000000,"support_perbill":423406,"approval":50,"support":0.0423406},{"time_hours":267,"approval_perbill":500000000,"support_perbill":415800,"approval":50,"support":0.04158},{"time_hours":268,"approval_perbill":500000000,"support_perbill":408251,"approval":50,"support":0.0408251},{"time_hours":269,"approval_perbill":500000000,"support_perbill":400758,"approval":50,"support":0.0400758},{"time_hours":270,"approval_perbill":500000000,"support_perbill":393321,"approval":50,"support":0.0393321},{"time_hours":271,"approval_perbill":500000000,"support_perbill":385937,"approval":50,"support":0.0385937},{"time_hours":272,"approval_perbill":500000000,"support_perbill":378608,"approval":50,"support":0.0378608},{"time_hours":273,"approval_perbill":500000000,"support_perbill":371333,"approval":50,"support":0.0371333},{"time_hours":274,"approval_perbill":500000000,"support_perbill":364110,"approval":50,"support":0.036411},{"time_hours":275,"approval_perbill":500000000,"support_perbill":356940,"approval":50,"support":0.035694},{"time_hours":276,"approval_perbill":500000000,"support_perbill":349821,"approval":50,"support":0.0349821},{"time_hours":277,"approval_perbill":500000000,"support_perbill":342754,"approval":50,"support":0.0342754},{"time_hours":278,"approval_perbill":500000000,"support_perbill":335737,"approval":50,"support":0.0335737},{"time_hours":279,"approval_perbill":500000000,"support_perbill":328771,"approval":50,"support":0.0328771},{"time_hours":280,"approval_perbill":500000000,"support_perbill":321854,"approval":50,"support":0.0321854},{"time_hours":281,"approval_perbill":500000000,"support_perbill":314986,"approval":50,"support":0.0314986},{"time_hours":282,"approval_perbill":500000000,"support_perbill":308166,"approval":50,"support":0.0308166},{"time_hours":283,"approval_perbill":500000000,"support_perbill":301395,"approval":50,"support":0.0301395},{"time_hours":284,"approval_perbill":500000000,"support_perbill":294671,"approval":50,"support":0.0294671},{"time_hours":285,"approval_perbill":500000000,"support_perbill":287994,"approval":50,"support":0.0287994},{"time_hours":286,"approval_perbill":500000000,"support_perbill":281363,"approval":50,"support":0.0281363},{"time_hours":287,"approval_perbill":500000000,"support_perbill":274779,"approval":50,"support":0.0274779},{"time_hours":288,"approval_perbill":500000000,"support_perbill":268240,"approval":50,"support":0.026824},{"time_hours":289,"approval_perbill":500000000,"support_perbill":261746,"approval":50,"support":0.0261746},{"time_hours":290,"approval_perbill":500000000,"support_perbill":255297,"approval":50,"support":0.0255297},{"time_hours":291,"approval_perbill":500000000,"support_perbill":248892,"approval":50,"support":0.0248892},{"time_hours":292,"approval_perbill":500000000,"support_perbill":242531,"approval":50,"support":0.0242531},{"time_hours":293,"approval_perbill":500000000,"support_perbill":236213,"approval":50,"support":0.0236213},{"time_hours":294,"approval_perbill":500000000,"support_perbill":229938,"approval":50,"support":0.0229938},{"time_hours":295,"approval_perbill":500000000,"support_perbill":223705,"approval":50,"support":0.0223705},{"time_hours":296,"approval_perbill":500000000,"support_perbill":217514,"approval":50,"support":0.0217514},{"time_hours":297,"approval_perbill":500000000,"support_perbill":211365,"approval":50,"support":0.0211365},{"time_hours":298,"approval_perbill":500000000,"support_perbill":205257,"approval":50,"support":0.0205257},{"time_hours":299,"approval_perbill":500000000,"support_perbill":199189,"approval":50,"support":0.0199189},{"time_hours":300,"approval_perbill":500000000,"support_perbill":193162,"approval":50,"support":0.0193162},{"time_hours":301,"approval_perbill":500000000,"support_perbill":187175,"approval":50,"support":0.0187175},{"time_hours":302,"approval_perbill":500000000,"support_perbill":181227,"approval":50,"support":0.0181227},{"time_hours":303,"approval_perbill":500000000,"support_perbill":175318,"approval":50,"support":0.0175318},{"time_hours":304,"approval_perbill":500000000,"support_perbill":169448,"approval":50,"support":0.0169448},{"time_hours":305,"approval_perbill":500000000,"support_perbill":163617,"approval":50,"support":0.0163617},{"time_hours":306,"approval_perbill":500000000,"support_perbill":157823,"approval":50,"support":0.0157823},{"time_hours":307,"approval_perbill":500000000,"support_perbill":152067,"approval":50,"support":0.0152067},{"time_hours":308,"approval_perbill":500000000,"support_perbill":146348,"approval":50,"support":0.0146348},{"time_hours":309,"approval_perbill":500000000,"support_perbill":140667,"approval":50,"support":0.0140667},{"time_hours":310,"approval_perbill":500000000,"support_perbill":135021,"approval":50,"support":0.0135021},{"time_hours":311,"approval_perbill":500000000,"support_perbill":129412,"approval":50,"support":0.0129412},{"time_hours":312,"approval_perbill":500000000,"support_perbill":123839,"approval":50,"support":0.0123839},{"time_hours":313,"approval_perbill":500000000,"support_perbill":118301,"approval":50,"support":0.0118301},{"time_hours":314,"approval_perbill":500000000,"support_perbill":112798,"approval":50,"support":0.0112798},{"time_hours":315,"approval_perbill":500000000,"support_perbill":107330,"approval":50,"support":0.010733},{"time_hours":316,"approval_perbill":500000000,"support_perbill":101897,"approval":50,"support":0.0101897},{"time_hours":317,"approval_perbill":500000000,"support_perbill":96498,"approval":50,"support":0.0096498},{"time_hours":318,"approval_perbill":500000000,"support_perbill":91133,"approval":50,"support":0.0091133},{"time_hours":319,"approval_perbill":500000000,"support_perbill":85801,"approval":50,"support":0.0085801},{"time_hours":320,"approval_perbill":500000000,"support_perbill":80502,"approval":50,"support":0.0080502},{"time_hours":321,"approval_perbill":500000000,"support_perbill":75236,"approval":50,"support":0.0075236},{"time_hours":322,"approval_perbill":500000000,"support_perbill":70003,"approval":50,"support":0.0070003},{"time_hours":323,"approval_perbill":500000000,"support_perbill":64802,"approval":50,"support":0.0064802},{"time_hours":324,"approval_perbill":500000000,"support_perbill":59634,"approval":50,"support":0.0059634},{"time_hours":325,"approval_perbill":500000000,"support_perbill":54496,"approval":50,"support":0.0054496},{"time_hours":326,"approval_perbill":500000000,"support_perbill":49391,"approval":50,"support":0.0049391},{"time_hours":327,"approval_perbill":500000000,"support_perbill":44316,"approval":50,"support":0.0044316},{"time_hours":328,"approval_perbill":500000000,"support_perbill":39272,"approval":50,"support":0.0039272},{"time_hours":329,"approval_perbill":500000000,"support_perbill":34259,"approval":50,"support":0.0034259},{"time_hours":330,"approval_perbill":500000000,"support_perbill":29276,"approval":50,"support":0.0029276},{"time_hours":331,"approval_perbill":500000000,"support_perbill":24323,"approval":50,"support":0.0024323},{"time_hours":332,"approval_perbill":500000000,"support_perbill":19400,"approval":50,"support":0.00194},{"time_hours":333,"approval_perbill":500000000,"support_perbill":14507,"approval":50,"support":0.0014507},{"time_hours":334,"approval_perbill":500000000,"support_perbill":9642,"approval":50,"support":0.0009642},{"time_hours":335,"approval_perbill":500000000,"support_perbill":4807,"approval":50,"support":0.0004807},{"time_hours":336,"approval_perbill":500000000,"support_perbill":0,"approval":50,"support":0}]')},90398:p=>{"use strict";p.exports=JSON.parse('[{"time_hours":0,"approval_perbill":1000000000,"support_perbill":500000000,"approval":100,"support":50},{"time_hours":1,"approval_perbill":994100296,"support_perbill":498511905,"approval":99.4100296,"support":49.8511905},{"time_hours":2,"approval_perbill":988304096,"support_perbill":497023810,"approval":98.8304096,"support":49.702381},{"time_hours":3,"approval_perbill":982608697,"support_perbill":495535715,"approval":98.2608697,"support":49.5535715},{"time_hours":4,"approval_perbill":977011496,"support_perbill":494047620,"approval":97.7011496,"support":49.404762},{"time_hours":5,"approval_perbill":971509972,"support_perbill":492559524,"approval":97.1509972,"support":49.2559524},{"time_hours":6,"approval_perbill":966101697,"support_perbill":491071429,"approval":96.6101697,"support":49.1071429},{"time_hours":7,"approval_perbill":960784315,"support_perbill":489583334,"approval":96.0784315,"support":48.9583334},{"time_hours":8,"approval_perbill":955555557,"support_perbill":488095239,"approval":95.5555557,"support":48.8095239},{"time_hours":9,"approval_perbill":950413224,"support_perbill":486607143,"approval":95.0413224,"support":48.6607143},{"time_hours":10,"approval_perbill":945355193,"support_perbill":485119048,"approval":94.5355193,"support":48.5119048},{"time_hours":11,"approval_perbill":940379404,"support_perbill":483630953,"approval":94.0379404,"support":48.3630953},{"time_hours":12,"approval_perbill":935483872,"support_perbill":482142858,"approval":93.5483872,"support":48.2142858},{"time_hours":13,"approval_perbill":930666667,"support_perbill":480654762,"approval":93.0666667,"support":48.0654762},{"time_hours":14,"approval_perbill":925925927,"support_perbill":479166667,"approval":92.5925927,"support":47.9166667},{"time_hours":15,"approval_perbill":921259843,"support_perbill":477678572,"approval":92.1259843,"support":47.7678572},{"time_hours":16,"approval_perbill":916666668,"support_perbill":476190477,"approval":91.6666668,"support":47.6190477},{"time_hours":17,"approval_perbill":912144703,"support_perbill":474702381,"approval":91.2144703,"support":47.4702381},{"time_hours":18,"approval_perbill":907692309,"support_perbill":473214286,"approval":90.7692309,"support":47.3214286},{"time_hours":19,"approval_perbill":903307888,"support_perbill":471726191,"approval":90.3307888,"support":47.1726191},{"time_hours":20,"approval_perbill":898989900,"support_perbill":470238096,"approval":89.89899,"support":47.0238096},{"time_hours":21,"approval_perbill":894736842,"support_perbill":468750000,"approval":89.4736842,"support":46.875},{"time_hours":22,"approval_perbill":890547265,"support_perbill":467261905,"approval":89.0547265,"support":46.7261905},{"time_hours":23,"approval_perbill":886419755,"support_perbill":465773810,"approval":88.6419755,"support":46.577381},{"time_hours":24,"approval_perbill":882352942,"support_perbill":464285715,"approval":88.2352942,"support":46.4285715},{"time_hours":25,"approval_perbill":878345500,"support_perbill":462797620,"approval":87.83455,"support":46.279762},{"time_hours":26,"approval_perbill":874396136,"support_perbill":461309524,"approval":87.4396136,"support":46.1309524},{"time_hours":27,"approval_perbill":870503599,"support_perbill":459821429,"approval":87.0503599,"support":45.9821429},{"time_hours":28,"approval_perbill":866666667,"support_perbill":458333334,"approval":86.6666667,"support":45.8333334},{"time_hours":29,"approval_perbill":862884162,"support_perbill":456845239,"approval":86.2884162,"support":45.6845239},{"time_hours":30,"approval_perbill":859154930,"support_perbill":455357143,"approval":85.915493,"support":45.5357143},{"time_hours":31,"approval_perbill":855477857,"support_perbill":453869048,"approval":85.5477857,"support":45.3869048},{"time_hours":32,"approval_perbill":851851852,"support_perbill":452380953,"approval":85.1851852,"support":45.2380953},{"time_hours":33,"approval_perbill":848275863,"support_perbill":450892858,"approval":84.8275863,"support":45.0892858},{"time_hours":34,"approval_perbill":844748859,"support_perbill":449404762,"approval":84.4748859,"support":44.9404762},{"time_hours":35,"approval_perbill":841269842,"support_perbill":447916667,"approval":84.1269842,"support":44.7916667},{"time_hours":36,"approval_perbill":837837838,"support_perbill":446428572,"approval":83.7837838,"support":44.6428572},{"time_hours":37,"approval_perbill":834451903,"support_perbill":444940477,"approval":83.4451903,"support":44.4940477},{"time_hours":38,"approval_perbill":831111112,"support_perbill":443452381,"approval":83.1111112,"support":44.3452381},{"time_hours":39,"approval_perbill":827814570,"support_perbill":441964286,"approval":82.781457,"support":44.1964286},{"time_hours":40,"approval_perbill":824561404,"support_perbill":440476191,"approval":82.4561404,"support":44.0476191},{"time_hours":41,"approval_perbill":821350763,"support_perbill":438988096,"approval":82.1350763,"support":43.8988096},{"time_hours":42,"approval_perbill":818181818,"support_perbill":437500000,"approval":81.8181818,"support":43.75},{"time_hours":43,"approval_perbill":815053764,"support_perbill":436011905,"approval":81.5053764,"support":43.6011905},{"time_hours":44,"approval_perbill":811965813,"support_perbill":434523810,"approval":81.1965813,"support":43.452381},{"time_hours":45,"approval_perbill":808917198,"support_perbill":433035715,"approval":80.8917198,"support":43.3035715},{"time_hours":46,"approval_perbill":805907174,"support_perbill":431547620,"approval":80.5907174,"support":43.154762},{"time_hours":47,"approval_perbill":802935011,"support_perbill":430059524,"approval":80.2935011,"support":43.0059524},{"time_hours":48,"approval_perbill":800000001,"support_perbill":428571429,"approval":80.0000001,"support":42.8571429},{"time_hours":49,"approval_perbill":797101450,"support_perbill":427083334,"approval":79.710145,"support":42.7083334},{"time_hours":50,"approval_perbill":794238684,"support_perbill":425595239,"approval":79.4238684,"support":42.5595239},{"time_hours":51,"approval_perbill":791411043,"support_perbill":424107143,"approval":79.1411043,"support":42.4107143},{"time_hours":52,"approval_perbill":788617887,"support_perbill":422619048,"approval":78.8617887,"support":42.2619048},{"time_hours":53,"approval_perbill":785858586,"support_perbill":421130953,"approval":78.5858586,"support":42.1130953},{"time_hours":54,"approval_perbill":783132531,"support_perbill":419642858,"approval":78.3132531,"support":41.9642858},{"time_hours":55,"approval_perbill":780439122,"support_perbill":418154762,"approval":78.0439122,"support":41.8154762},{"time_hours":56,"approval_perbill":777777779,"support_perbill":416666667,"approval":77.7777779,"support":41.6666667},{"time_hours":57,"approval_perbill":775147929,"support_perbill":415178572,"approval":77.5147929,"support":41.5178572},{"time_hours":58,"approval_perbill":772549020,"support_perbill":413690477,"approval":77.254902,"support":41.3690477},{"time_hours":59,"approval_perbill":769980507,"support_perbill":412202381,"approval":76.9980507,"support":41.2202381},{"time_hours":60,"approval_perbill":767441861,"support_perbill":410714286,"approval":76.7441861,"support":41.0714286},{"time_hours":61,"approval_perbill":764932563,"support_perbill":409226191,"approval":76.4932563,"support":40.9226191},{"time_hours":62,"approval_perbill":762452108,"support_perbill":407738096,"approval":76.2452108,"support":40.7738096},{"time_hours":63,"approval_perbill":760000000,"support_perbill":406250000,"approval":76,"support":40.625},{"time_hours":64,"approval_perbill":757575758,"support_perbill":404761905,"approval":75.7575758,"support":40.4761905},{"time_hours":65,"approval_perbill":755178909,"support_perbill":403273810,"approval":75.5178909,"support":40.327381},{"time_hours":66,"approval_perbill":752808989,"support_perbill":401785715,"approval":75.2808989,"support":40.1785715},{"time_hours":67,"approval_perbill":750465550,"support_perbill":400297620,"approval":75.046555,"support":40.029762},{"time_hours":68,"approval_perbill":748148149,"support_perbill":398809524,"approval":74.8148149,"support":39.8809524},{"time_hours":69,"approval_perbill":745856354,"support_perbill":397321429,"approval":74.5856354,"support":39.7321429},{"time_hours":70,"approval_perbill":743589744,"support_perbill":395833334,"approval":74.3589744,"support":39.5833334},{"time_hours":71,"approval_perbill":741347906,"support_perbill":394345239,"approval":74.1347906,"support":39.4345239},{"time_hours":72,"approval_perbill":739130435,"support_perbill":392857143,"approval":73.9130435,"support":39.2857143},{"time_hours":73,"approval_perbill":736936938,"support_perbill":391369048,"approval":73.6936938,"support":39.1369048},{"time_hours":74,"approval_perbill":734767025,"support_perbill":389880953,"approval":73.4767025,"support":38.9880953},{"time_hours":75,"approval_perbill":732620322,"support_perbill":388392858,"approval":73.2620322,"support":38.8392858},{"time_hours":76,"approval_perbill":730496454,"support_perbill":386904762,"approval":73.0496454,"support":38.6904762},{"time_hours":77,"approval_perbill":728395062,"support_perbill":385416667,"approval":72.8395062,"support":38.5416667},{"time_hours":78,"approval_perbill":726315790,"support_perbill":383928572,"approval":72.631579,"support":38.3928572},{"time_hours":79,"approval_perbill":724258290,"support_perbill":382440477,"approval":72.425829,"support":38.2440477},{"time_hours":80,"approval_perbill":722222222,"support_perbill":380952381,"approval":72.2222222,"support":38.0952381},{"time_hours":81,"approval_perbill":720207254,"support_perbill":379464286,"approval":72.0207254,"support":37.9464286},{"time_hours":82,"approval_perbill":718213059,"support_perbill":377976191,"approval":71.8213059,"support":37.7976191},{"time_hours":83,"approval_perbill":716239317,"support_perbill":376488096,"approval":71.6239317,"support":37.6488096},{"time_hours":84,"approval_perbill":714285714,"support_perbill":375000000,"approval":71.4285714,"support":37.5},{"time_hours":85,"approval_perbill":712351946,"support_perbill":373511905,"approval":71.2351946,"support":37.3511905},{"time_hours":86,"approval_perbill":710437711,"support_perbill":372023810,"approval":71.0437711,"support":37.202381},{"time_hours":87,"approval_perbill":708542714,"support_perbill":370535715,"approval":70.8542714,"support":37.0535715},{"time_hours":88,"approval_perbill":706666667,"support_perbill":369047620,"approval":70.6666667,"support":36.904762},{"time_hours":89,"approval_perbill":704809287,"support_perbill":367559524,"approval":70.4809287,"support":36.7559524},{"time_hours":90,"approval_perbill":702970298,"support_perbill":366071429,"approval":70.2970298,"support":36.6071429},{"time_hours":91,"approval_perbill":701149426,"support_perbill":364583334,"approval":70.1149426,"support":36.4583334},{"time_hours":92,"approval_perbill":699346406,"support_perbill":363095239,"approval":69.9346406,"support":36.3095239},{"time_hours":93,"approval_perbill":697560976,"support_perbill":361607143,"approval":69.7560976,"support":36.1607143},{"time_hours":94,"approval_perbill":695792881,"support_perbill":360119048,"approval":69.5792881,"support":36.0119048},{"time_hours":95,"approval_perbill":694041868,"support_perbill":358630953,"approval":69.4041868,"support":35.8630953},{"time_hours":96,"approval_perbill":692307693,"support_perbill":357142858,"approval":69.2307693,"support":35.7142858},{"time_hours":97,"approval_perbill":690590112,"support_perbill":355654762,"approval":69.0590112,"support":35.5654762},{"time_hours":98,"approval_perbill":688888889,"support_perbill":354166667,"approval":68.8888889,"support":35.4166667},{"time_hours":99,"approval_perbill":687203792,"support_perbill":352678572,"approval":68.7203792,"support":35.2678572},{"time_hours":100,"approval_perbill":685534592,"support_perbill":351190477,"approval":68.5534592,"support":35.1190477},{"time_hours":101,"approval_perbill":683881064,"support_perbill":349702381,"approval":68.3881064,"support":34.9702381},{"time_hours":102,"approval_perbill":682242991,"support_perbill":348214286,"approval":68.2242991,"support":34.8214286},{"time_hours":103,"approval_perbill":680620155,"support_perbill":346726191,"approval":68.0620155,"support":34.6726191},{"time_hours":104,"approval_perbill":679012346,"support_perbill":345238096,"approval":67.9012346,"support":34.5238096},{"time_hours":105,"approval_perbill":677419355,"support_perbill":343750000,"approval":67.7419355,"support":34.375},{"time_hours":106,"approval_perbill":675840979,"support_perbill":342261905,"approval":67.5840979,"support":34.2261905},{"time_hours":107,"approval_perbill":674277017,"support_perbill":340773810,"approval":67.4277017,"support":34.077381},{"time_hours":108,"approval_perbill":672727273,"support_perbill":339285715,"approval":67.2727273,"support":33.9285715},{"time_hours":109,"approval_perbill":671191554,"support_perbill":337797620,"approval":67.1191554,"support":33.779762},{"time_hours":110,"approval_perbill":669669670,"support_perbill":336309524,"approval":66.966967,"support":33.6309524},{"time_hours":111,"approval_perbill":668161435,"support_perbill":334821429,"approval":66.8161435,"support":33.4821429},{"time_hours":112,"approval_perbill":666666667,"support_perbill":333333334,"approval":66.6666667,"support":33.3333334},{"time_hours":113,"approval_perbill":665185186,"support_perbill":331845239,"approval":66.5185186,"support":33.1845239},{"time_hours":114,"approval_perbill":663716814,"support_perbill":330357143,"approval":66.3716814,"support":33.0357143},{"time_hours":115,"approval_perbill":662261381,"support_perbill":328869048,"approval":66.2261381,"support":32.8869048},{"time_hours":116,"approval_perbill":660818714,"support_perbill":327380953,"approval":66.0818714,"support":32.7380953},{"time_hours":117,"approval_perbill":659388647,"support_perbill":325892858,"approval":65.9388647,"support":32.5892858},{"time_hours":118,"approval_perbill":657971015,"support_perbill":324404762,"approval":65.7971015,"support":32.4404762},{"time_hours":119,"approval_perbill":656565657,"support_perbill":322916667,"approval":65.6565657,"support":32.2916667},{"time_hours":120,"approval_perbill":655172414,"support_perbill":321428572,"approval":65.5172414,"support":32.1428572},{"time_hours":121,"approval_perbill":653791130,"support_perbill":319940477,"approval":65.379113,"support":31.9940477},{"time_hours":122,"approval_perbill":652421652,"support_perbill":318452381,"approval":65.2421652,"support":31.8452381},{"time_hours":123,"approval_perbill":651063830,"support_perbill":316964286,"approval":65.106383,"support":31.6964286},{"time_hours":124,"approval_perbill":649717514,"support_perbill":315476191,"approval":64.9717514,"support":31.5476191},{"time_hours":125,"approval_perbill":648382560,"support_perbill":313988096,"approval":64.838256,"support":31.3988096},{"time_hours":126,"approval_perbill":647058823,"support_perbill":312500000,"approval":64.7058823,"support":31.25},{"time_hours":127,"approval_perbill":645746165,"support_perbill":311011905,"approval":64.5746165,"support":31.1011905},{"time_hours":128,"approval_perbill":644444445,"support_perbill":309523810,"approval":64.4444445,"support":30.952381},{"time_hours":129,"approval_perbill":643153527,"support_perbill":308035715,"approval":64.3153527,"support":30.8035715},{"time_hours":130,"approval_perbill":641873279,"support_perbill":306547620,"approval":64.1873279,"support":30.654762},{"time_hours":131,"approval_perbill":640603567,"support_perbill":305059524,"approval":64.0603567,"support":30.5059524},{"time_hours":132,"approval_perbill":639344263,"support_perbill":303571429,"approval":63.9344263,"support":30.3571429},{"time_hours":133,"approval_perbill":638095238,"support_perbill":302083334,"approval":63.8095238,"support":30.2083334},{"time_hours":134,"approval_perbill":636856369,"support_perbill":300595239,"approval":63.6856369,"support":30.0595239},{"time_hours":135,"approval_perbill":635627530,"support_perbill":299107143,"approval":63.562753,"support":29.9107143},{"time_hours":136,"approval_perbill":634408602,"support_perbill":297619048,"approval":63.4408602,"support":29.7619048},{"time_hours":137,"approval_perbill":633199465,"support_perbill":296130953,"approval":63.3199465,"support":29.6130953},{"time_hours":138,"approval_perbill":632000000,"support_perbill":294642858,"approval":63.2,"support":29.4642858},{"time_hours":139,"approval_perbill":630810093,"support_perbill":293154762,"approval":63.0810093,"support":29.3154762},{"time_hours":140,"approval_perbill":629629630,"support_perbill":291666667,"approval":62.962963,"support":29.1666667},{"time_hours":141,"approval_perbill":628458498,"support_perbill":290178572,"approval":62.8458498,"support":29.0178572},{"time_hours":142,"approval_perbill":627296588,"support_perbill":288690477,"approval":62.7296588,"support":28.8690477},{"time_hours":143,"approval_perbill":626143791,"support_perbill":287202381,"approval":62.6143791,"support":28.7202381},{"time_hours":144,"approval_perbill":625000000,"support_perbill":285714286,"approval":62.5,"support":28.5714286},{"time_hours":145,"approval_perbill":623865110,"support_perbill":284226191,"approval":62.386511,"support":28.4226191},{"time_hours":146,"approval_perbill":622739018,"support_perbill":282738096,"approval":62.2739018,"support":28.2738096},{"time_hours":147,"approval_perbill":621621621,"support_perbill":281250000,"approval":62.1621621,"support":28.125},{"time_hours":148,"approval_perbill":620512821,"support_perbill":279761905,"approval":62.0512821,"support":27.9761905},{"time_hours":149,"approval_perbill":619412516,"support_perbill":278273810,"approval":61.9412516,"support":27.827381},{"time_hours":150,"approval_perbill":618320611,"support_perbill":276785715,"approval":61.8320611,"support":27.6785715},{"time_hours":151,"approval_perbill":617237009,"support_perbill":275297620,"approval":61.7237009,"support":27.529762},{"time_hours":152,"approval_perbill":616161616,"support_perbill":273809524,"approval":61.6161616,"support":27.3809524},{"time_hours":153,"approval_perbill":615094340,"support_perbill":272321429,"approval":61.509434,"support":27.2321429},{"time_hours":154,"approval_perbill":614035088,"support_perbill":270833334,"approval":61.4035088,"support":27.0833334},{"time_hours":155,"approval_perbill":612983770,"support_perbill":269345239,"approval":61.298377,"support":26.9345239},{"time_hours":156,"approval_perbill":611940298,"support_perbill":267857143,"approval":61.1940298,"support":26.7857143},{"time_hours":157,"approval_perbill":610904585,"support_perbill":266369048,"approval":61.0904585,"support":26.6369048},{"time_hours":158,"approval_perbill":609876543,"support_perbill":264880953,"approval":60.9876543,"support":26.4880953},{"time_hours":159,"approval_perbill":608856089,"support_perbill":263392858,"approval":60.8856089,"support":26.3392858},{"time_hours":160,"approval_perbill":607843137,"support_perbill":261904762,"approval":60.7843137,"support":26.1904762},{"time_hours":161,"approval_perbill":606837607,"support_perbill":260416667,"approval":60.6837607,"support":26.0416667},{"time_hours":162,"approval_perbill":605839416,"support_perbill":258928572,"approval":60.5839416,"support":25.8928572},{"time_hours":163,"approval_perbill":604848485,"support_perbill":257440477,"approval":60.4848485,"support":25.7440477},{"time_hours":164,"approval_perbill":603864734,"support_perbill":255952381,"approval":60.3864734,"support":25.5952381},{"time_hours":165,"approval_perbill":602888087,"support_perbill":254464286,"approval":60.2888087,"support":25.4464286},{"time_hours":166,"approval_perbill":601918465,"support_perbill":252976191,"approval":60.1918465,"support":25.2976191},{"time_hours":167,"approval_perbill":600955794,"support_perbill":251488096,"approval":60.0955794,"support":25.1488096},{"time_hours":168,"approval_perbill":600000000,"support_perbill":250000000,"approval":60,"support":25},{"time_hours":169,"approval_perbill":599051008,"support_perbill":248511905,"approval":59.9051008,"support":24.8511905},{"time_hours":170,"approval_perbill":598108747,"support_perbill":247023810,"approval":59.8108747,"support":24.702381},{"time_hours":171,"approval_perbill":597173145,"support_perbill":245535715,"approval":59.7173145,"support":24.5535715},{"time_hours":172,"approval_perbill":596244131,"support_perbill":244047620,"approval":59.6244131,"support":24.404762},{"time_hours":173,"approval_perbill":595321637,"support_perbill":242559524,"approval":59.5321637,"support":24.2559524},{"time_hours":174,"approval_perbill":594405594,"support_perbill":241071429,"approval":59.4405594,"support":24.1071429},{"time_hours":175,"approval_perbill":593495935,"support_perbill":239583334,"approval":59.3495935,"support":23.9583334},{"time_hours":176,"approval_perbill":592592593,"support_perbill":238095239,"approval":59.2592593,"support":23.8095239},{"time_hours":177,"approval_perbill":591695502,"support_perbill":236607143,"approval":59.1695502,"support":23.6607143},{"time_hours":178,"approval_perbill":590804598,"support_perbill":235119048,"approval":59.0804598,"support":23.5119048},{"time_hours":179,"approval_perbill":589919817,"support_perbill":233630953,"approval":58.9919817,"support":23.3630953},{"time_hours":180,"approval_perbill":589041096,"support_perbill":232142858,"approval":58.9041096,"support":23.2142858},{"time_hours":181,"approval_perbill":588168373,"support_perbill":230654762,"approval":58.8168373,"support":23.0654762},{"time_hours":182,"approval_perbill":587301587,"support_perbill":229166667,"approval":58.7301587,"support":22.9166667},{"time_hours":183,"approval_perbill":586440678,"support_perbill":227678572,"approval":58.6440678,"support":22.7678572},{"time_hours":184,"approval_perbill":585585585,"support_perbill":226190477,"approval":58.5585585,"support":22.6190477},{"time_hours":185,"approval_perbill":584736251,"support_perbill":224702381,"approval":58.4736251,"support":22.4702381},{"time_hours":186,"approval_perbill":583892617,"support_perbill":223214286,"approval":58.3892617,"support":22.3214286},{"time_hours":187,"approval_perbill":583054626,"support_perbill":221726191,"approval":58.3054626,"support":22.1726191},{"time_hours":188,"approval_perbill":582222222,"support_perbill":220238096,"approval":58.2222222,"support":22.0238096},{"time_hours":189,"approval_perbill":581395349,"support_perbill":218750000,"approval":58.1395349,"support":21.875},{"time_hours":190,"approval_perbill":580573951,"support_perbill":217261905,"approval":58.0573951,"support":21.7261905},{"time_hours":191,"approval_perbill":579757976,"support_perbill":215773810,"approval":57.9757976,"support":21.577381},{"time_hours":192,"approval_perbill":578947368,"support_perbill":214285715,"approval":57.8947368,"support":21.4285715},{"time_hours":193,"approval_perbill":578142076,"support_perbill":212797620,"approval":57.8142076,"support":21.279762},{"time_hours":194,"approval_perbill":577342048,"support_perbill":211309524,"approval":57.7342048,"support":21.1309524},{"time_hours":195,"approval_perbill":576547231,"support_perbill":209821429,"approval":57.6547231,"support":20.9821429},{"time_hours":196,"approval_perbill":575757576,"support_perbill":208333334,"approval":57.5757576,"support":20.8333334},{"time_hours":197,"approval_perbill":574973031,"support_perbill":206845239,"approval":57.4973031,"support":20.6845239},{"time_hours":198,"approval_perbill":574193548,"support_perbill":205357143,"approval":57.4193548,"support":20.5357143},{"time_hours":199,"approval_perbill":573419078,"support_perbill":203869048,"approval":57.3419078,"support":20.3869048},{"time_hours":200,"approval_perbill":572649572,"support_perbill":202380953,"approval":57.2649572,"support":20.2380953},{"time_hours":201,"approval_perbill":571884984,"support_perbill":200892858,"approval":57.1884984,"support":20.0892858},{"time_hours":202,"approval_perbill":571125265,"support_perbill":199404762,"approval":57.1125265,"support":19.9404762},{"time_hours":203,"approval_perbill":570370370,"support_perbill":197916667,"approval":57.037037,"support":19.7916667},{"time_hours":204,"approval_perbill":569620253,"support_perbill":196428572,"approval":56.9620253,"support":19.6428572},{"time_hours":205,"approval_perbill":568874868,"support_perbill":194940477,"approval":56.8874868,"support":19.4940477},{"time_hours":206,"approval_perbill":568134172,"support_perbill":193452381,"approval":56.8134172,"support":19.3452381},{"time_hours":207,"approval_perbill":567398119,"support_perbill":191964286,"approval":56.7398119,"support":19.1964286},{"time_hours":208,"approval_perbill":566666666,"support_perbill":190476191,"approval":56.6666666,"support":19.0476191},{"time_hours":209,"approval_perbill":565939771,"support_perbill":188988096,"approval":56.5939771,"support":18.8988096},{"time_hours":210,"approval_perbill":565217391,"support_perbill":187500000,"approval":56.5217391,"support":18.75},{"time_hours":211,"approval_perbill":564499484,"support_perbill":186011905,"approval":56.4499484,"support":18.6011905},{"time_hours":212,"approval_perbill":563786008,"support_perbill":184523810,"approval":56.3786008,"support":18.452381},{"time_hours":213,"approval_perbill":563076923,"support_perbill":183035715,"approval":56.3076923,"support":18.3035715},{"time_hours":214,"approval_perbill":562372188,"support_perbill":181547620,"approval":56.2372188,"support":18.154762},{"time_hours":215,"approval_perbill":561671763,"support_perbill":180059524,"approval":56.1671763,"support":18.0059524},{"time_hours":216,"approval_perbill":560975610,"support_perbill":178571429,"approval":56.097561,"support":17.8571429},{"time_hours":217,"approval_perbill":560283688,"support_perbill":177083334,"approval":56.0283688,"support":17.7083334},{"time_hours":218,"approval_perbill":559595959,"support_perbill":175595239,"approval":55.9595959,"support":17.5595239},{"time_hours":219,"approval_perbill":558912386,"support_perbill":174107143,"approval":55.8912386,"support":17.4107143},{"time_hours":220,"approval_perbill":558232931,"support_perbill":172619048,"approval":55.8232931,"support":17.2619048},{"time_hours":221,"approval_perbill":557557557,"support_perbill":171130953,"approval":55.7557557,"support":17.1130953},{"time_hours":222,"approval_perbill":556886227,"support_perbill":169642858,"approval":55.6886227,"support":16.9642858},{"time_hours":223,"approval_perbill":556218905,"support_perbill":168154762,"approval":55.6218905,"support":16.8154762},{"time_hours":224,"approval_perbill":555555555,"support_perbill":166666667,"approval":55.5555555,"support":16.6666667},{"time_hours":225,"approval_perbill":554896142,"support_perbill":165178572,"approval":55.4896142,"support":16.5178572},{"time_hours":226,"approval_perbill":554240631,"support_perbill":163690477,"approval":55.4240631,"support":16.3690477},{"time_hours":227,"approval_perbill":553588987,"support_perbill":162202381,"approval":55.3588987,"support":16.2202381},{"time_hours":228,"approval_perbill":552941176,"support_perbill":160714286,"approval":55.2941176,"support":16.0714286},{"time_hours":229,"approval_perbill":552297165,"support_perbill":159226191,"approval":55.2297165,"support":15.9226191},{"time_hours":230,"approval_perbill":551656920,"support_perbill":157738096,"approval":55.165692,"support":15.7738096},{"time_hours":231,"approval_perbill":551020408,"support_perbill":156250000,"approval":55.1020408,"support":15.625},{"time_hours":232,"approval_perbill":550387597,"support_perbill":154761905,"approval":55.0387597,"support":15.4761905},{"time_hours":233,"approval_perbill":549758454,"support_perbill":153273810,"approval":54.9758454,"support":15.327381},{"time_hours":234,"approval_perbill":549132948,"support_perbill":151785715,"approval":54.9132948,"support":15.1785715},{"time_hours":235,"approval_perbill":548511047,"support_perbill":150297620,"approval":54.8511047,"support":15.029762},{"time_hours":236,"approval_perbill":547892720,"support_perbill":148809524,"approval":54.789272,"support":14.8809524},{"time_hours":237,"approval_perbill":547277937,"support_perbill":147321429,"approval":54.7277937,"support":14.7321429},{"time_hours":238,"approval_perbill":546666666,"support_perbill":145833334,"approval":54.6666666,"support":14.5833334},{"time_hours":239,"approval_perbill":546058879,"support_perbill":144345239,"approval":54.6058879,"support":14.4345239},{"time_hours":240,"approval_perbill":545454545,"support_perbill":142857143,"approval":54.5454545,"support":14.2857143},{"time_hours":241,"approval_perbill":544853635,"support_perbill":141369048,"approval":54.4853635,"support":14.1369048},{"time_hours":242,"approval_perbill":544256120,"support_perbill":139880953,"approval":54.425612,"support":13.9880953},{"time_hours":243,"approval_perbill":543661971,"support_perbill":138392858,"approval":54.3661971,"support":13.8392858},{"time_hours":244,"approval_perbill":543071161,"support_perbill":136904762,"approval":54.3071161,"support":13.6904762},{"time_hours":245,"approval_perbill":542483660,"support_perbill":135416667,"approval":54.248366,"support":13.5416667},{"time_hours":246,"approval_perbill":541899441,"support_perbill":133928572,"approval":54.1899441,"support":13.3928572},{"time_hours":247,"approval_perbill":541318477,"support_perbill":132440477,"approval":54.1318477,"support":13.2440477},{"time_hours":248,"approval_perbill":540740740,"support_perbill":130952381,"approval":54.074074,"support":13.0952381},{"time_hours":249,"approval_perbill":540166205,"support_perbill":129464286,"approval":54.0166205,"support":12.9464286},{"time_hours":250,"approval_perbill":539594843,"support_perbill":127976191,"approval":53.9594843,"support":12.7976191},{"time_hours":251,"approval_perbill":539026630,"support_perbill":126488096,"approval":53.902663,"support":12.6488096},{"time_hours":252,"approval_perbill":538461538,"support_perbill":125000000,"approval":53.8461538,"support":12.5},{"time_hours":253,"approval_perbill":537899543,"support_perbill":123511905,"approval":53.7899543,"support":12.3511905},{"time_hours":254,"approval_perbill":537340619,"support_perbill":122023810,"approval":53.7340619,"support":12.202381},{"time_hours":255,"approval_perbill":536784741,"support_perbill":120535715,"approval":53.6784741,"support":12.0535715},{"time_hours":256,"approval_perbill":536231884,"support_perbill":119047620,"approval":53.6231884,"support":11.904762},{"time_hours":257,"approval_perbill":535682023,"support_perbill":117559524,"approval":53.5682023,"support":11.7559524},{"time_hours":258,"approval_perbill":535135135,"support_perbill":116071429,"approval":53.5135135,"support":11.6071429},{"time_hours":259,"approval_perbill":534591195,"support_perbill":114583334,"approval":53.4591195,"support":11.4583334},{"time_hours":260,"approval_perbill":534050179,"support_perbill":113095239,"approval":53.4050179,"support":11.3095239},{"time_hours":261,"approval_perbill":533512064,"support_perbill":111607143,"approval":53.3512064,"support":11.1607143},{"time_hours":262,"approval_perbill":532976827,"support_perbill":110119048,"approval":53.2976827,"support":11.0119048},{"time_hours":263,"approval_perbill":532444444,"support_perbill":108630953,"approval":53.2444444,"support":10.8630953},{"time_hours":264,"approval_perbill":531914893,"support_perbill":107142858,"approval":53.1914893,"support":10.7142858},{"time_hours":265,"approval_perbill":531388152,"support_perbill":105654762,"approval":53.1388152,"support":10.5654762},{"time_hours":266,"approval_perbill":530864197,"support_perbill":104166667,"approval":53.0864197,"support":10.4166667},{"time_hours":267,"approval_perbill":530343007,"support_perbill":102678572,"approval":53.0343007,"support":10.2678572},{"time_hours":268,"approval_perbill":529824561,"support_perbill":101190477,"approval":52.9824561,"support":10.1190477},{"time_hours":269,"approval_perbill":529308836,"support_perbill":99702381,"approval":52.9308836,"support":9.9702381},{"time_hours":270,"approval_perbill":528795811,"support_perbill":98214286,"approval":52.8795811,"support":9.8214286},{"time_hours":271,"approval_perbill":528285465,"support_perbill":96726191,"approval":52.8285465,"support":9.6726191},{"time_hours":272,"approval_perbill":527777777,"support_perbill":95238096,"approval":52.7777777,"support":9.5238096},{"time_hours":273,"approval_perbill":527272727,"support_perbill":93750000,"approval":52.7272727,"support":9.375},{"time_hours":274,"approval_perbill":526770293,"support_perbill":92261905,"approval":52.6770293,"support":9.2261905},{"time_hours":275,"approval_perbill":526270456,"support_perbill":90773810,"approval":52.6270456,"support":9.077381},{"time_hours":276,"approval_perbill":525773195,"support_perbill":89285715,"approval":52.5773195,"support":8.9285715},{"time_hours":277,"approval_perbill":525278491,"support_perbill":87797620,"approval":52.5278491,"support":8.779762},{"time_hours":278,"approval_perbill":524786324,"support_perbill":86309524,"approval":52.4786324,"support":8.6309524},{"time_hours":279,"approval_perbill":524296675,"support_perbill":84821429,"approval":52.4296675,"support":8.4821429},{"time_hours":280,"approval_perbill":523809523,"support_perbill":83333334,"approval":52.3809523,"support":8.3333334},{"time_hours":281,"approval_perbill":523324851,"support_perbill":81845239,"approval":52.3324851,"support":8.1845239},{"time_hours":282,"approval_perbill":522842639,"support_perbill":80357143,"approval":52.2842639,"support":8.0357143},{"time_hours":283,"approval_perbill":522362869,"support_perbill":78869048,"approval":52.2362869,"support":7.8869048},{"time_hours":284,"approval_perbill":521885521,"support_perbill":77380953,"approval":52.1885521,"support":7.7380953},{"time_hours":285,"approval_perbill":521410579,"support_perbill":75892858,"approval":52.1410579,"support":7.5892858},{"time_hours":286,"approval_perbill":520938023,"support_perbill":74404762,"approval":52.0938023,"support":7.4404762},{"time_hours":287,"approval_perbill":520467836,"support_perbill":72916667,"approval":52.0467836,"support":7.2916667},{"time_hours":288,"approval_perbill":519999999,"support_perbill":71428572,"approval":51.9999999,"support":7.1428572},{"time_hours":289,"approval_perbill":519534497,"support_perbill":69940477,"approval":51.9534497,"support":6.9940477},{"time_hours":290,"approval_perbill":519071310,"support_perbill":68452381,"approval":51.907131,"support":6.8452381},{"time_hours":291,"approval_perbill":518610421,"support_perbill":66964286,"approval":51.8610421,"support":6.6964286},{"time_hours":292,"approval_perbill":518151815,"support_perbill":65476191,"approval":51.8151815,"support":6.5476191},{"time_hours":293,"approval_perbill":517695473,"support_perbill":63988096,"approval":51.7695473,"support":6.3988096},{"time_hours":294,"approval_perbill":517241379,"support_perbill":62500000,"approval":51.7241379,"support":6.25},{"time_hours":295,"approval_perbill":516789516,"support_perbill":61011905,"approval":51.6789516,"support":6.1011905},{"time_hours":296,"approval_perbill":516339869,"support_perbill":59523810,"approval":51.6339869,"support":5.952381},{"time_hours":297,"approval_perbill":515892420,"support_perbill":58035715,"approval":51.589242,"support":5.8035715},{"time_hours":298,"approval_perbill":515447154,"support_perbill":56547620,"approval":51.5447154,"support":5.654762},{"time_hours":299,"approval_perbill":515004055,"support_perbill":55059524,"approval":51.5004055,"support":5.5059524},{"time_hours":300,"approval_perbill":514563106,"support_perbill":53571429,"approval":51.4563106,"support":5.3571429},{"time_hours":301,"approval_perbill":514124293,"support_perbill":52083334,"approval":51.4124293,"support":5.2083334},{"time_hours":302,"approval_perbill":513687600,"support_perbill":50595239,"approval":51.36876,"support":5.0595239},{"time_hours":303,"approval_perbill":513253011,"support_perbill":49107143,"approval":51.3253011,"support":4.9107143},{"time_hours":304,"approval_perbill":512820512,"support_perbill":47619048,"approval":51.2820512,"support":4.7619048},{"time_hours":305,"approval_perbill":512390087,"support_perbill":46130953,"approval":51.2390087,"support":4.6130953},{"time_hours":306,"approval_perbill":511961722,"support_perbill":44642858,"approval":51.1961722,"support":4.4642858},{"time_hours":307,"approval_perbill":511535401,"support_perbill":43154762,"approval":51.1535401,"support":4.3154762},{"time_hours":308,"approval_perbill":511111111,"support_perbill":41666667,"approval":51.1111111,"support":4.1666667},{"time_hours":309,"approval_perbill":510688835,"support_perbill":40178572,"approval":51.0688835,"support":4.0178572},{"time_hours":310,"approval_perbill":510268562,"support_perbill":38690477,"approval":51.0268562,"support":3.8690477},{"time_hours":311,"approval_perbill":509850275,"support_perbill":37202381,"approval":50.9850275,"support":3.7202381},{"time_hours":312,"approval_perbill":509433962,"support_perbill":35714286,"approval":50.9433962,"support":3.5714286},{"time_hours":313,"approval_perbill":509019607,"support_perbill":34226191,"approval":50.9019607,"support":3.4226191},{"time_hours":314,"approval_perbill":508607198,"support_perbill":32738096,"approval":50.8607198,"support":3.2738096},{"time_hours":315,"approval_perbill":508196721,"support_perbill":31250000,"approval":50.8196721,"support":3.125},{"time_hours":316,"approval_perbill":507788161,"support_perbill":29761905,"approval":50.7788161,"support":2.9761905},{"time_hours":317,"approval_perbill":507381507,"support_perbill":28273810,"approval":50.7381507,"support":2.827381},{"time_hours":318,"approval_perbill":506976744,"support_perbill":26785715,"approval":50.6976744,"support":2.6785715},{"time_hours":319,"approval_perbill":506573859,"support_perbill":25297620,"approval":50.6573859,"support":2.529762},{"time_hours":320,"approval_perbill":506172839,"support_perbill":23809524,"approval":50.6172839,"support":2.3809524},{"time_hours":321,"approval_perbill":505773671,"support_perbill":22321429,"approval":50.5773671,"support":2.2321429},{"time_hours":322,"approval_perbill":505376343,"support_perbill":20833334,"approval":50.5376343,"support":2.0833334},{"time_hours":323,"approval_perbill":504980842,"support_perbill":19345239,"approval":50.4980842,"support":1.9345239},{"time_hours":324,"approval_perbill":504587155,"support_perbill":17857143,"approval":50.4587155,"support":1.7857143},{"time_hours":325,"approval_perbill":504195270,"support_perbill":16369048,"approval":50.419527,"support":1.6369048},{"time_hours":326,"approval_perbill":503805174,"support_perbill":14880953,"approval":50.3805174,"support":1.4880953},{"time_hours":327,"approval_perbill":503416856,"support_perbill":13392858,"approval":50.3416856,"support":1.3392858},{"time_hours":328,"approval_perbill":503030302,"support_perbill":11904762,"approval":50.3030302,"support":1.1904762},{"time_hours":329,"approval_perbill":502645502,"support_perbill":10416667,"approval":50.2645502,"support":1.0416667},{"time_hours":330,"approval_perbill":502262443,"support_perbill":8928572,"approval":50.2262443,"support":0.8928572},{"time_hours":331,"approval_perbill":501881113,"support_perbill":7440477,"approval":50.1881113,"support":0.7440477},{"time_hours":332,"approval_perbill":501501501,"support_perbill":5952381,"approval":50.1501501,"support":0.5952381},{"time_hours":333,"approval_perbill":501123595,"support_perbill":4464286,"approval":50.1123595,"support":0.4464286},{"time_hours":334,"approval_perbill":500747383,"support_perbill":2976191,"approval":50.0747383,"support":0.2976191},{"time_hours":335,"approval_perbill":500372855,"support_perbill":1488096,"approval":50.0372855,"support":0.1488096},{"time_hours":336,"approval_perbill":499999999,"support_perbill":0,"approval":49.9999999,"support":0}]')},39046:p=>{"use strict";p.exports=JSON.parse('[{"time_hours":0,"approval_perbill":999999999,"support_perbill":499999995,"approval":99.9999999,"support":49.9999995},{"time_hours":1,"approval_perbill":994734815,"support_perbill":437532142,"approval":99.4734815,"support":43.7532142},{"time_hours":2,"approval_perbill":989548816,"support_perbill":390045264,"approval":98.9548816,"support":39.0045264},{"time_hours":3,"approval_perbill":984440228,"support_perbill":352727281,"approval":98.4440228,"support":35.2727281},{"time_hours":4,"approval_perbill":979407334,"support_perbill":322627750,"approval":97.9407334,"support":32.262775},{"time_hours":5,"approval_perbill":974448461,"support_perbill":297836947,"approval":97.4448461,"support":29.7836947},{"time_hours":6,"approval_perbill":969561991,"support_perbill":277064231,"approval":96.9561991,"support":27.7064231},{"time_hours":7,"approval_perbill":964746346,"support_perbill":259405948,"approval":96.4746346,"support":25.9405948},{"time_hours":8,"approval_perbill":960000002,"support_perbill":244210536,"approval":96.0000002,"support":24.4210536},{"time_hours":9,"approval_perbill":955321468,"support_perbill":230996317,"approval":95.5321468,"support":23.0996317},{"time_hours":10,"approval_perbill":950709307,"support_perbill":219399546,"approval":95.0709307,"support":21.9399546},{"time_hours":11,"approval_perbill":946162112,"support_perbill":209140376,"approval":94.6162112,"support":20.9140376},{"time_hours":12,"approval_perbill":941678522,"support_perbill":200000007,"approval":94.1678522,"support":20.0000007},{"time_hours":13,"approval_perbill":937257211,"support_perbill":191804884,"approval":93.7257211,"support":19.1804884},{"time_hours":14,"approval_perbill":932896892,"support_perbill":184415591,"approval":93.2896892,"support":18.4415591},{"time_hours":15,"approval_perbill":928596309,"support_perbill":177718838,"approval":92.8596309,"support":17.7718838},{"time_hours":16,"approval_perbill":924354246,"support_perbill":171621628,"approval":92.4354246,"support":17.1621628},{"time_hours":17,"approval_perbill":920169512,"support_perbill":166046892,"approval":92.0169512,"support":16.6046892},{"time_hours":18,"approval_perbill":916040958,"support_perbill":160930238,"approval":91.6040958,"support":16.0930238},{"time_hours":19,"approval_perbill":911967455,"support_perbill":156217428,"approval":91.1967455,"support":15.6217428},{"time_hours":20,"approval_perbill":907947914,"support_perbill":151862469,"approval":90.7947914,"support":15.1862469},{"time_hours":21,"approval_perbill":903981266,"support_perbill":147826091,"approval":90.3981266,"support":14.7826091},{"time_hours":22,"approval_perbill":900066477,"support_perbill":144074572,"approval":90.0066477,"support":14.4074572},{"time_hours":23,"approval_perbill":896202534,"support_perbill":140578783,"approval":89.6202534,"support":14.0578783},{"time_hours":24,"approval_perbill":892388454,"support_perbill":137313437,"approval":89.2388454,"support":13.7313437},{"time_hours":25,"approval_perbill":888623278,"support_perbill":134256476,"approval":88.8623278,"support":13.4256476},{"time_hours":26,"approval_perbill":884906070,"support_perbill":131388569,"approval":88.490607,"support":13.1388569},{"time_hours":27,"approval_perbill":881235922,"support_perbill":128692704,"approval":88.1235922,"support":12.8692704},{"time_hours":28,"approval_perbill":877611943,"support_perbill":126153850,"approval":87.7611943,"support":12.615385},{"time_hours":29,"approval_perbill":874033269,"support_perbill":123758680,"approval":87.4033269,"support":12.375868},{"time_hours":30,"approval_perbill":870499055,"support_perbill":121495330,"approval":87.0499055,"support":12.149533},{"time_hours":31,"approval_perbill":867008478,"support_perbill":119353212,"approval":86.7008478,"support":11.9353212},{"time_hours":32,"approval_perbill":863560734,"support_perbill":117322838,"approval":86.3560734,"support":11.7322838},{"time_hours":33,"approval_perbill":860155042,"support_perbill":115395687,"approval":86.0155042,"support":11.5395687},{"time_hours":34,"approval_perbill":856790633,"support_perbill":113564081,"approval":85.6790633,"support":11.3564081},{"time_hours":35,"approval_perbill":853466765,"support_perbill":111821089,"approval":85.3466765,"support":11.1821089},{"time_hours":36,"approval_perbill":850182706,"support_perbill":110160430,"approval":85.0182706,"support":11.016043},{"time_hours":37,"approval_perbill":846937749,"support_perbill":108576407,"approval":84.6937749,"support":10.8576407},{"time_hours":38,"approval_perbill":843731196,"support_perbill":107063832,"approval":84.3731196,"support":10.7063832},{"time_hours":39,"approval_perbill":840562372,"support_perbill":105617980,"approval":84.0562372,"support":10.561798},{"time_hours":40,"approval_perbill":837430613,"support_perbill":104234530,"approval":83.7430613,"support":10.423453},{"time_hours":41,"approval_perbill":834335274,"support_perbill":102909528,"approval":83.4335274,"support":10.2909528},{"time_hours":42,"approval_perbill":831275722,"support_perbill":101639346,"approval":83.1275722,"support":10.1639346},{"time_hours":43,"approval_perbill":828251342,"support_perbill":100420652,"approval":82.8251342,"support":10.0420652},{"time_hours":44,"approval_perbill":825261530,"support_perbill":99250377,"approval":82.526153,"support":9.9250377},{"time_hours":45,"approval_perbill":822305695,"support_perbill":98125691,"approval":82.2305695,"support":9.8125691},{"time_hours":46,"approval_perbill":819383263,"support_perbill":97043982,"approval":81.9383263,"support":9.7043982},{"time_hours":47,"approval_perbill":816493670,"support_perbill":96002832,"approval":81.649367,"support":9.6002832},{"time_hours":48,"approval_perbill":813636367,"support_perbill":95000002,"approval":81.3636367,"support":9.5000002},{"time_hours":49,"approval_perbill":810810814,"support_perbill":94033415,"approval":81.0810814,"support":9.4033415},{"time_hours":50,"approval_perbill":808016486,"support_perbill":93101141,"approval":80.8016486,"support":9.3101141},{"time_hours":51,"approval_perbill":805252867,"support_perbill":92201384,"approval":80.5252867,"support":9.2201384},{"time_hours":52,"approval_perbill":802519455,"support_perbill":91332473,"approval":80.2519455,"support":9.1332473},{"time_hours":53,"approval_perbill":799815756,"support_perbill":90492847,"approval":79.9815756,"support":9.0492847},{"time_hours":54,"approval_perbill":797141290,"support_perbill":89681052,"approval":79.714129,"support":8.9681052},{"time_hours":55,"approval_perbill":794495583,"support_perbill":88895726,"approval":79.4495583,"support":8.8895726},{"time_hours":56,"approval_perbill":791878176,"support_perbill":88135595,"approval":79.1878176,"support":8.8135595},{"time_hours":57,"approval_perbill":789288615,"support_perbill":87399465,"approval":78.9288615,"support":8.7399465},{"time_hours":58,"approval_perbill":786726461,"support_perbill":86686218,"approval":78.6726461,"support":8.6686218},{"time_hours":59,"approval_perbill":784191278,"support_perbill":85994804,"approval":78.4191278,"support":8.5994804},{"time_hours":60,"approval_perbill":781682644,"support_perbill":85324233,"approval":78.1682644,"support":8.5324233},{"time_hours":61,"approval_perbill":779200144,"support_perbill":84673579,"approval":77.9200144,"support":8.4673579},{"time_hours":62,"approval_perbill":776743372,"support_perbill":84041967,"approval":77.6743372,"support":8.4041967},{"time_hours":63,"approval_perbill":774311929,"support_perbill":83428573,"approval":77.4311929,"support":8.3428573},{"time_hours":64,"approval_perbill":771905427,"support_perbill":82832619,"approval":77.1905427,"support":8.2832619},{"time_hours":65,"approval_perbill":769523483,"support_perbill":82253373,"approval":76.9523483,"support":8.2253373},{"time_hours":66,"approval_perbill":767165723,"support_perbill":81690142,"approval":76.7165723,"support":8.1690142},{"time_hours":67,"approval_perbill":764831781,"support_perbill":81142270,"approval":76.4831781,"support":8.114227},{"time_hours":68,"approval_perbill":762521298,"support_perbill":80609138,"approval":76.2521298,"support":8.0609138},{"time_hours":69,"approval_perbill":760233921,"support_perbill":80090159,"approval":76.0233921,"support":8.0090159},{"time_hours":70,"approval_perbill":757969306,"support_perbill":79584776,"approval":75.7969306,"support":7.9584776},{"time_hours":71,"approval_perbill":755727116,"support_perbill":79092463,"approval":75.5727116,"support":7.9092463},{"time_hours":72,"approval_perbill":753507017,"support_perbill":78612718,"approval":75.3507017,"support":7.8612718},{"time_hours":73,"approval_perbill":751308686,"support_perbill":78145066,"approval":75.1308686,"support":7.8145066},{"time_hours":74,"approval_perbill":749131804,"support_perbill":77689057,"approval":74.9131804,"support":7.7689057},{"time_hours":75,"approval_perbill":746976058,"support_perbill":77244260,"approval":74.6976058,"support":7.724426},{"time_hours":76,"approval_perbill":744841143,"support_perbill":76810267,"approval":74.4841143,"support":7.6810267},{"time_hours":77,"approval_perbill":742726757,"support_perbill":76386689,"approval":74.2726757,"support":7.6386689},{"time_hours":78,"approval_perbill":740632606,"support_perbill":75973155,"approval":74.0632606,"support":7.5973155},{"time_hours":79,"approval_perbill":738558402,"support_perbill":75569313,"approval":73.8558402,"support":7.5569313},{"time_hours":80,"approval_perbill":736503859,"support_perbill":75174826,"approval":73.6503859,"support":7.5174826},{"time_hours":81,"approval_perbill":734468701,"support_perbill":74789372,"approval":73.4468701,"support":7.4789372},{"time_hours":82,"approval_perbill":732452653,"support_perbill":74412645,"approval":73.2452653,"support":7.4412645},{"time_hours":83,"approval_perbill":730455448,"support_perbill":74044351,"approval":73.0455448,"support":7.4044351},{"time_hours":84,"approval_perbill":728476824,"support_perbill":73684211,"approval":72.8476824,"support":7.3684211},{"time_hours":85,"approval_perbill":726516522,"support_perbill":73331957,"approval":72.6516522,"support":7.3331957},{"time_hours":86,"approval_perbill":724574288,"support_perbill":72987332,"approval":72.4574288,"support":7.2987332},{"time_hours":87,"approval_perbill":722649875,"support_perbill":72650092,"approval":72.2649875,"support":7.2650092},{"time_hours":88,"approval_perbill":720743037,"support_perbill":72320001,"approval":72.0743037,"support":7.2320001},{"time_hours":89,"approval_perbill":718853535,"support_perbill":71996834,"approval":71.8853535,"support":7.1996834},{"time_hours":90,"approval_perbill":716981135,"support_perbill":71680377,"approval":71.6981135,"support":7.1680377},{"time_hours":91,"approval_perbill":715125604,"support_perbill":71370421,"approval":71.5125604,"support":7.1370421},{"time_hours":92,"approval_perbill":713286716,"support_perbill":71066770,"approval":71.3286716,"support":7.106677},{"time_hours":93,"approval_perbill":711464248,"support_perbill":70769231,"approval":71.1464248,"support":7.0769231},{"time_hours":94,"approval_perbill":709657981,"support_perbill":70477624,"approval":70.9657981,"support":7.0477624},{"time_hours":95,"approval_perbill":707867699,"support_perbill":70191771,"approval":70.7867699,"support":7.0191771},{"time_hours":96,"approval_perbill":706093193,"support_perbill":69911505,"approval":70.6093193,"support":6.9911505},{"time_hours":97,"approval_perbill":704334253,"support_perbill":69636663,"approval":70.4334253,"support":6.9636663},{"time_hours":98,"approval_perbill":702590676,"support_perbill":69367089,"approval":70.2590676,"support":6.9367089},{"time_hours":99,"approval_perbill":700862262,"support_perbill":69102633,"approval":70.0862262,"support":6.9102633},{"time_hours":100,"approval_perbill":699148814,"support_perbill":68843152,"approval":69.9148814,"support":6.8843152},{"time_hours":101,"approval_perbill":697450138,"support_perbill":68588504,"approval":69.7450138,"support":6.8588504},{"time_hours":102,"approval_perbill":695766044,"support_perbill":68338558,"approval":69.5766044,"support":6.8338558},{"time_hours":103,"approval_perbill":694096344,"support_perbill":68093184,"approval":69.4096344,"support":6.8093184},{"time_hours":104,"approval_perbill":692440857,"support_perbill":67852257,"approval":69.2440857,"support":6.7852257},{"time_hours":105,"approval_perbill":690799399,"support_perbill":67615659,"approval":69.0799399,"support":6.7615659},{"time_hours":106,"approval_perbill":689171795,"support_perbill":67383272,"approval":68.9171795,"support":6.7383272},{"time_hours":107,"approval_perbill":687557869,"support_perbill":67154986,"approval":68.7557869,"support":6.7154986},{"time_hours":108,"approval_perbill":685957449,"support_perbill":66930693,"approval":68.5957449,"support":6.6930693},{"time_hours":109,"approval_perbill":684370368,"support_perbill":66710290,"approval":68.4370368,"support":6.671029},{"time_hours":110,"approval_perbill":682796458,"support_perbill":66493675,"approval":68.2796458,"support":6.6493675},{"time_hours":111,"approval_perbill":681235556,"support_perbill":66280753,"approval":68.1235556,"support":6.6280753},{"time_hours":112,"approval_perbill":679687502,"support_perbill":66071429,"approval":67.9687502,"support":6.6071429},{"time_hours":113,"approval_perbill":678152139,"support_perbill":65865613,"approval":67.8152139,"support":6.5865613},{"time_hours":114,"approval_perbill":676629309,"support_perbill":65663217,"approval":67.6629309,"support":6.5663217},{"time_hours":115,"approval_perbill":675118862,"support_perbill":65464158,"approval":67.5118862,"support":6.5464158},{"time_hours":116,"approval_perbill":673620645,"support_perbill":65268353,"approval":67.3620645,"support":6.5268353},{"time_hours":117,"approval_perbill":672134512,"support_perbill":65075723,"approval":67.2134512,"support":6.5075723},{"time_hours":118,"approval_perbill":670660315,"support_perbill":64886191,"approval":67.0660315,"support":6.4886191},{"time_hours":119,"approval_perbill":669197914,"support_perbill":64699684,"approval":66.9197914,"support":6.4699684},{"time_hours":120,"approval_perbill":667747166,"support_perbill":64516129,"approval":66.7747166,"support":6.4516129},{"time_hours":121,"approval_perbill":666307933,"support_perbill":64335457,"approval":66.6307933,"support":6.4335457},{"time_hours":122,"approval_perbill":664880077,"support_perbill":64157601,"approval":66.4880077,"support":6.4157601},{"time_hours":123,"approval_perbill":663463466,"support_perbill":63982495,"approval":66.3463466,"support":6.3982495},{"time_hours":124,"approval_perbill":662057965,"support_perbill":63810075,"approval":66.2057965,"support":6.3810075},{"time_hours":125,"approval_perbill":660663447,"support_perbill":63640282,"approval":66.0663447,"support":6.3640282},{"time_hours":126,"approval_perbill":659279781,"support_perbill":63473054,"approval":65.9279781,"support":6.3473054},{"time_hours":127,"approval_perbill":657906842,"support_perbill":63308335,"approval":65.7906842,"support":6.3308335},{"time_hours":128,"approval_perbill":656544505,"support_perbill":63146067,"approval":65.6544505,"support":6.3146067},{"time_hours":129,"approval_perbill":655192648,"support_perbill":62986198,"approval":65.5192648,"support":6.2986198},{"time_hours":130,"approval_perbill":653851152,"support_perbill":62828674,"approval":65.3851152,"support":6.2828674},{"time_hours":131,"approval_perbill":652519896,"support_perbill":62673444,"approval":65.2519896,"support":6.2673444},{"time_hours":132,"approval_perbill":651198765,"support_perbill":62520458,"approval":65.1198765,"support":6.2520458},{"time_hours":133,"approval_perbill":649887643,"support_perbill":62369668,"approval":64.9887643,"support":6.2369668},{"time_hours":134,"approval_perbill":648586417,"support_perbill":62221027,"approval":64.8586417,"support":6.2221027},{"time_hours":135,"approval_perbill":647294974,"support_perbill":62074489,"approval":64.7294974,"support":6.2074489},{"time_hours":136,"approval_perbill":646013207,"support_perbill":61930011,"approval":64.6013207,"support":6.1930011},{"time_hours":137,"approval_perbill":644741005,"support_perbill":61787548,"approval":64.4741005,"support":6.1787548},{"time_hours":138,"approval_perbill":643478263,"support_perbill":61647059,"approval":64.3478263,"support":6.1647059},{"time_hours":139,"approval_perbill":642224875,"support_perbill":61508503,"approval":64.2224875,"support":6.1508503},{"time_hours":140,"approval_perbill":640980738,"support_perbill":61371841,"approval":64.0980738,"support":6.1371841},{"time_hours":141,"approval_perbill":639745749,"support_perbill":61237034,"approval":63.9745749,"support":6.1237034},{"time_hours":142,"approval_perbill":638519808,"support_perbill":61104045,"approval":63.8519808,"support":6.1104045},{"time_hours":143,"approval_perbill":637302817,"support_perbill":60972836,"approval":63.7302817,"support":6.0972836},{"time_hours":144,"approval_perbill":636094677,"support_perbill":60843373,"approval":63.6094677,"support":6.0843373},{"time_hours":145,"approval_perbill":634895291,"support_perbill":60715621,"approval":63.4895291,"support":6.0715621},{"time_hours":146,"approval_perbill":633704567,"support_perbill":60589547,"approval":63.3704567,"support":6.0589547},{"time_hours":147,"approval_perbill":632522409,"support_perbill":60465116,"approval":63.2522409,"support":6.0465116},{"time_hours":148,"approval_perbill":631348726,"support_perbill":60342298,"approval":63.1348726,"support":6.0342298},{"time_hours":149,"approval_perbill":630183427,"support_perbill":60221061,"approval":63.0183427,"support":6.0221061},{"time_hours":150,"approval_perbill":629026422,"support_perbill":60101376,"approval":62.9026422,"support":6.0101376},{"time_hours":151,"approval_perbill":627877624,"support_perbill":59983211,"approval":62.7877624,"support":5.9983211},{"time_hours":152,"approval_perbill":626736945,"support_perbill":59866539,"approval":62.6736945,"support":5.9866539},{"time_hours":153,"approval_perbill":625604299,"support_perbill":59751332,"approval":62.5604299,"support":5.9751332},{"time_hours":154,"approval_perbill":624479602,"support_perbill":59637562,"approval":62.4479602,"support":5.9637562},{"time_hours":155,"approval_perbill":623362771,"support_perbill":59525201,"approval":62.3362771,"support":5.9525201},{"time_hours":156,"approval_perbill":622253723,"support_perbill":59414226,"approval":62.2253723,"support":5.9414226},{"time_hours":157,"approval_perbill":621152377,"support_perbill":59304609,"approval":62.1152377,"support":5.9304609},{"time_hours":158,"approval_perbill":620058653,"support_perbill":59196326,"approval":62.0058653,"support":5.9196326},{"time_hours":159,"approval_perbill":618972473,"support_perbill":59089353,"approval":61.8972473,"support":5.9089353},{"time_hours":160,"approval_perbill":617893758,"support_perbill":58983666,"approval":61.7893758,"support":5.8983666},{"time_hours":161,"approval_perbill":616822432,"support_perbill":58879242,"approval":61.6822432,"support":5.8879242},{"time_hours":162,"approval_perbill":615758419,"support_perbill":58776059,"approval":61.5758419,"support":5.8776059},{"time_hours":163,"approval_perbill":614701645,"support_perbill":58674094,"approval":61.4701645,"support":5.8674094},{"time_hours":164,"approval_perbill":613652036,"support_perbill":58573327,"approval":61.3652036,"support":5.8573327},{"time_hours":165,"approval_perbill":612609519,"support_perbill":58473736,"approval":61.2609519,"support":5.8473736},{"time_hours":166,"approval_perbill":611574023,"support_perbill":58375301,"approval":61.1574023,"support":5.8375301},{"time_hours":167,"approval_perbill":610545477,"support_perbill":58278001,"approval":61.0545477,"support":5.8278001},{"time_hours":168,"approval_perbill":609523811,"support_perbill":58181818,"approval":60.9523811,"support":5.8181818},{"time_hours":169,"approval_perbill":608508957,"support_perbill":58086732,"approval":60.8508957,"support":5.8086732},{"time_hours":170,"approval_perbill":607500846,"support_perbill":57992724,"approval":60.7500846,"support":5.7992724},{"time_hours":171,"approval_perbill":606499412,"support_perbill":57899776,"approval":60.6499412,"support":5.7899776},{"time_hours":172,"approval_perbill":605504589,"support_perbill":57807871,"approval":60.5504589,"support":5.7807871},{"time_hours":173,"approval_perbill":604516310,"support_perbill":57716991,"approval":60.451631,"support":5.7716991},{"time_hours":174,"approval_perbill":603534513,"support_perbill":57627118,"approval":60.3534513,"support":5.7627118},{"time_hours":175,"approval_perbill":602559133,"support_perbill":57538237,"approval":60.2559133,"support":5.7538237},{"time_hours":176,"approval_perbill":601590108,"support_perbill":57450331,"approval":60.1590108,"support":5.7450331},{"time_hours":177,"approval_perbill":600627375,"support_perbill":57363383,"approval":60.0627375,"support":5.7363383},{"time_hours":178,"approval_perbill":599670874,"support_perbill":57277379,"approval":59.9670874,"support":5.7277379},{"time_hours":179,"approval_perbill":598720544,"support_perbill":57192303,"approval":59.8720544,"support":5.7192303},{"time_hours":180,"approval_perbill":597776326,"support_perbill":57108141,"approval":59.7776326,"support":5.7108141},{"time_hours":181,"approval_perbill":596838161,"support_perbill":57024876,"approval":59.6838161,"support":5.7024876},{"time_hours":182,"approval_perbill":595905991,"support_perbill":56942496,"approval":59.5905991,"support":5.6942496},{"time_hours":183,"approval_perbill":594979758,"support_perbill":56860986,"approval":59.4979758,"support":5.6860986},{"time_hours":184,"approval_perbill":594059407,"support_perbill":56780333,"approval":59.4059407,"support":5.6780333},{"time_hours":185,"approval_perbill":593144881,"support_perbill":56700522,"approval":59.3144881,"support":5.6700522},{"time_hours":186,"approval_perbill":592236126,"support_perbill":56621542,"approval":59.2236126,"support":5.6621542},{"time_hours":187,"approval_perbill":591333086,"support_perbill":56543378,"approval":59.1333086,"support":5.6543378},{"time_hours":188,"approval_perbill":590435708,"support_perbill":56466019,"approval":59.0435708,"support":5.6466019},{"time_hours":189,"approval_perbill":589543939,"support_perbill":56389452,"approval":58.9543939,"support":5.6389452},{"time_hours":190,"approval_perbill":588657726,"support_perbill":56313665,"approval":58.8657726,"support":5.6313665},{"time_hours":191,"approval_perbill":587777019,"support_perbill":56238646,"approval":58.7777019,"support":5.6238646},{"time_hours":192,"approval_perbill":586901764,"support_perbill":56164383,"approval":58.6901764,"support":5.6164383},{"time_hours":193,"approval_perbill":586031913,"support_perbill":56090866,"approval":58.6031913,"support":5.6090866},{"time_hours":194,"approval_perbill":585167415,"support_perbill":56018082,"approval":58.5167415,"support":5.6018082},{"time_hours":195,"approval_perbill":584308222,"support_perbill":55946021,"approval":58.4308222,"support":5.5946021},{"time_hours":196,"approval_perbill":583454283,"support_perbill":55874673,"approval":58.3454283,"support":5.5874673},{"time_hours":197,"approval_perbill":582605551,"support_perbill":55804027,"approval":58.2605551,"support":5.5804027},{"time_hours":198,"approval_perbill":581761979,"support_perbill":55734072,"approval":58.1761979,"support":5.5734072},{"time_hours":199,"approval_perbill":580923521,"support_perbill":55664798,"approval":58.0923521,"support":5.5664798},{"time_hours":200,"approval_perbill":580090128,"support_perbill":55596196,"approval":58.0090128,"support":5.5596196},{"time_hours":201,"approval_perbill":579261756,"support_perbill":55528255,"approval":57.9261756,"support":5.5528255},{"time_hours":202,"approval_perbill":578438360,"support_perbill":55460967,"approval":57.843836,"support":5.5460967},{"time_hours":203,"approval_perbill":577619895,"support_perbill":55394321,"approval":57.7619895,"support":5.5394321},{"time_hours":204,"approval_perbill":576806315,"support_perbill":55328309,"approval":57.6806315,"support":5.5328309},{"time_hours":205,"approval_perbill":575997580,"support_perbill":55262922,"approval":57.599758,"support":5.5262922},{"time_hours":206,"approval_perbill":575193643,"support_perbill":55198151,"approval":57.5193643,"support":5.5198151},{"time_hours":207,"approval_perbill":574394465,"support_perbill":55133987,"approval":57.4394465,"support":5.5133987},{"time_hours":208,"approval_perbill":573600001,"support_perbill":55070422,"approval":57.3600001,"support":5.5070422},{"time_hours":209,"approval_perbill":572810211,"support_perbill":55007447,"approval":57.2810211,"support":5.5007447},{"time_hours":210,"approval_perbill":572025053,"support_perbill":54945054,"approval":57.2025053,"support":5.4945054},{"time_hours":211,"approval_perbill":571244487,"support_perbill":54883236,"approval":57.1244487,"support":5.4883236},{"time_hours":212,"approval_perbill":570468473,"support_perbill":54821984,"approval":57.0468473,"support":5.4821984},{"time_hours":213,"approval_perbill":569696971,"support_perbill":54761290,"approval":56.9696971,"support":5.476129},{"time_hours":214,"approval_perbill":568929941,"support_perbill":54701147,"approval":56.8929941,"support":5.4701147},{"time_hours":215,"approval_perbill":568167345,"support_perbill":54641547,"approval":56.8167345,"support":5.4641547},{"time_hours":216,"approval_perbill":567409145,"support_perbill":54582484,"approval":56.7409145,"support":5.4582484},{"time_hours":217,"approval_perbill":566655303,"support_perbill":54523950,"approval":56.6655303,"support":5.452395},{"time_hours":218,"approval_perbill":565905780,"support_perbill":54465937,"approval":56.590578,"support":5.4465937},{"time_hours":219,"approval_perbill":565160541,"support_perbill":54408440,"approval":56.5160541,"support":5.440844},{"time_hours":220,"approval_perbill":564419549,"support_perbill":54351450,"approval":56.4419549,"support":5.435145},{"time_hours":221,"approval_perbill":563682767,"support_perbill":54294962,"approval":56.3682767,"support":5.4294962},{"time_hours":222,"approval_perbill":562950159,"support_perbill":54238968,"approval":56.2950159,"support":5.4238968},{"time_hours":223,"approval_perbill":562221691,"support_perbill":54183463,"approval":56.2221691,"support":5.4183463},{"time_hours":224,"approval_perbill":561497327,"support_perbill":54128440,"approval":56.1497327,"support":5.412844},{"time_hours":225,"approval_perbill":560777032,"support_perbill":54073892,"approval":56.0777032,"support":5.4073892},{"time_hours":226,"approval_perbill":560060774,"support_perbill":54019814,"approval":56.0060774,"support":5.4019814},{"time_hours":227,"approval_perbill":559348516,"support_perbill":53966200,"approval":55.9348516,"support":5.39662},{"time_hours":228,"approval_perbill":558640227,"support_perbill":53913043,"approval":55.8640227,"support":5.3913043},{"time_hours":229,"approval_perbill":557935873,"support_perbill":53860338,"approval":55.7935873,"support":5.3860338},{"time_hours":230,"approval_perbill":557235422,"support_perbill":53808079,"approval":55.7235422,"support":5.3808079},{"time_hours":231,"approval_perbill":556538840,"support_perbill":53756260,"approval":55.653884,"support":5.375626},{"time_hours":232,"approval_perbill":555846097,"support_perbill":53704876,"approval":55.5846097,"support":5.3704876},{"time_hours":233,"approval_perbill":555157160,"support_perbill":53653921,"approval":55.515716,"support":5.3653921},{"time_hours":234,"approval_perbill":554471998,"support_perbill":53603391,"approval":55.4471998,"support":5.3603391},{"time_hours":235,"approval_perbill":553790581,"support_perbill":53553279,"approval":55.3790581,"support":5.3553279},{"time_hours":236,"approval_perbill":553112877,"support_perbill":53503581,"approval":55.3112877,"support":5.3503581},{"time_hours":237,"approval_perbill":552438856,"support_perbill":53454291,"approval":55.2438856,"support":5.3454291},{"time_hours":238,"approval_perbill":551768489,"support_perbill":53405405,"approval":55.1768489,"support":5.3405405},{"time_hours":239,"approval_perbill":551101746,"support_perbill":53356917,"approval":55.1101746,"support":5.3356917},{"time_hours":240,"approval_perbill":550438597,"support_perbill":53308823,"approval":55.0438597,"support":5.3308823},{"time_hours":241,"approval_perbill":549779014,"support_perbill":53261118,"approval":54.9779014,"support":5.3261118},{"time_hours":242,"approval_perbill":549122967,"support_perbill":53213797,"approval":54.9122967,"support":5.3213797},{"time_hours":243,"approval_perbill":548470429,"support_perbill":53166855,"approval":54.8470429,"support":5.3166855},{"time_hours":244,"approval_perbill":547821371,"support_perbill":53120289,"approval":54.7821371,"support":5.3120289},{"time_hours":245,"approval_perbill":547175766,"support_perbill":53074093,"approval":54.7175766,"support":5.3074093},{"time_hours":246,"approval_perbill":546533585,"support_perbill":53028263,"approval":54.6533585,"support":5.3028263},{"time_hours":247,"approval_perbill":545894803,"support_perbill":52982795,"approval":54.5894803,"support":5.2982795},{"time_hours":248,"approval_perbill":545259392,"support_perbill":52937685,"approval":54.5259392,"support":5.2937685},{"time_hours":249,"approval_perbill":544627325,"support_perbill":52892928,"approval":54.4627325,"support":5.2892928},{"time_hours":250,"approval_perbill":543998577,"support_perbill":52848520,"approval":54.3998577,"support":5.284852},{"time_hours":251,"approval_perbill":543373120,"support_perbill":52804457,"approval":54.337312,"support":5.2804457},{"time_hours":252,"approval_perbill":542750930,"support_perbill":52760735,"approval":54.275093,"support":5.2760735},{"time_hours":253,"approval_perbill":542131980,"support_perbill":52717351,"approval":54.213198,"support":5.2717351},{"time_hours":254,"approval_perbill":541516246,"support_perbill":52674300,"approval":54.1516246,"support":5.26743},{"time_hours":255,"approval_perbill":540903702,"support_perbill":52631578,"approval":54.0903702,"support":5.2631578},{"time_hours":256,"approval_perbill":540294324,"support_perbill":52589182,"approval":54.0294324,"support":5.2589182},{"time_hours":257,"approval_perbill":539688087,"support_perbill":52547108,"approval":53.9688087,"support":5.2547108},{"time_hours":258,"approval_perbill":539084968,"support_perbill":52505353,"approval":53.9084968,"support":5.2505353},{"time_hours":259,"approval_perbill":538484941,"support_perbill":52463912,"approval":53.8484941,"support":5.2463912},{"time_hours":260,"approval_perbill":537887984,"support_perbill":52422782,"approval":53.7887984,"support":5.2422782},{"time_hours":261,"approval_perbill":537294072,"support_perbill":52381960,"approval":53.7294072,"support":5.238196},{"time_hours":262,"approval_perbill":536703183,"support_perbill":52341442,"approval":53.6703183,"support":5.2341442},{"time_hours":263,"approval_perbill":536115294,"support_perbill":52301225,"approval":53.6115294,"support":5.2301225},{"time_hours":264,"approval_perbill":535530381,"support_perbill":52261306,"approval":53.5530381,"support":5.2261306},{"time_hours":265,"approval_perbill":534948423,"support_perbill":52221681,"approval":53.4948423,"support":5.2221681},{"time_hours":266,"approval_perbill":534369396,"support_perbill":52182347,"approval":53.4369396,"support":5.2182347},{"time_hours":267,"approval_perbill":533793280,"support_perbill":52143300,"approval":53.379328,"support":5.21433},{"time_hours":268,"approval_perbill":533220051,"support_perbill":52104538,"approval":53.3220051,"support":5.2104538},{"time_hours":269,"approval_perbill":532649689,"support_perbill":52066058,"approval":53.2649689,"support":5.2066058},{"time_hours":270,"approval_perbill":532082171,"support_perbill":52027857,"approval":53.2082171,"support":5.2027857},{"time_hours":271,"approval_perbill":531517477,"support_perbill":51989931,"approval":53.1517477,"support":5.1989931},{"time_hours":272,"approval_perbill":530955585,"support_perbill":51952277,"approval":53.0955585,"support":5.1952277},{"time_hours":273,"approval_perbill":530396476,"support_perbill":51914893,"approval":53.0396476,"support":5.1914893},{"time_hours":274,"approval_perbill":529840127,"support_perbill":51877776,"approval":52.9840127,"support":5.1877776},{"time_hours":275,"approval_perbill":529286519,"support_perbill":51840922,"approval":52.9286519,"support":5.1840922},{"time_hours":276,"approval_perbill":528735632,"support_perbill":51804330,"approval":52.8735632,"support":5.180433},{"time_hours":277,"approval_perbill":528187445,"support_perbill":51767996,"approval":52.8187445,"support":5.1767996},{"time_hours":278,"approval_perbill":527641939,"support_perbill":51731917,"approval":52.7641939,"support":5.1731917},{"time_hours":279,"approval_perbill":527099095,"support_perbill":51696091,"approval":52.7099095,"support":5.1696091},{"time_hours":280,"approval_perbill":526558891,"support_perbill":51660516,"approval":52.6558891,"support":5.1660516},{"time_hours":281,"approval_perbill":526021311,"support_perbill":51625188,"approval":52.6021311,"support":5.1625188},{"time_hours":282,"approval_perbill":525486333,"support_perbill":51590105,"approval":52.5486333,"support":5.1590105},{"time_hours":283,"approval_perbill":524953941,"support_perbill":51555265,"approval":52.4953941,"support":5.1555265},{"time_hours":284,"approval_perbill":524424114,"support_perbill":51520665,"approval":52.4424114,"support":5.1520665},{"time_hours":285,"approval_perbill":523896834,"support_perbill":51486302,"approval":52.3896834,"support":5.1486302},{"time_hours":286,"approval_perbill":523372083,"support_perbill":51452174,"approval":52.3372083,"support":5.1452174},{"time_hours":287,"approval_perbill":522849844,"support_perbill":51418279,"approval":52.2849844,"support":5.1418279},{"time_hours":288,"approval_perbill":522330097,"support_perbill":51384615,"approval":52.2330097,"support":5.1384615},{"time_hours":289,"approval_perbill":521812825,"support_perbill":51351178,"approval":52.1812825,"support":5.1351178},{"time_hours":290,"approval_perbill":521298011,"support_perbill":51317967,"approval":52.1298011,"support":5.1317967},{"time_hours":291,"approval_perbill":520785637,"support_perbill":51284979,"approval":52.0785637,"support":5.1284979},{"time_hours":292,"approval_perbill":520275685,"support_perbill":51252213,"approval":52.0275685,"support":5.1252213},{"time_hours":293,"approval_perbill":519768139,"support_perbill":51219665,"approval":51.9768139,"support":5.1219665},{"time_hours":294,"approval_perbill":519262981,"support_perbill":51187334,"approval":51.9262981,"support":5.1187334},{"time_hours":295,"approval_perbill":518760195,"support_perbill":51155218,"approval":51.8760195,"support":5.1155218},{"time_hours":296,"approval_perbill":518259765,"support_perbill":51123314,"approval":51.8259765,"support":5.1123314},{"time_hours":297,"approval_perbill":517761672,"support_perbill":51091621,"approval":51.7761672,"support":5.1091621},{"time_hours":298,"approval_perbill":517265903,"support_perbill":51060136,"approval":51.7265903,"support":5.1060136},{"time_hours":299,"approval_perbill":516772438,"support_perbill":51028857,"approval":51.6772438,"support":5.1028857},{"time_hours":300,"approval_perbill":516281264,"support_perbill":50997782,"approval":51.6281264,"support":5.0997782},{"time_hours":301,"approval_perbill":515792364,"support_perbill":50966909,"approval":51.5792364,"support":5.0966909},{"time_hours":302,"approval_perbill":515305723,"support_perbill":50936237,"approval":51.5305723,"support":5.0936237},{"time_hours":303,"approval_perbill":514821324,"support_perbill":50905763,"approval":51.4821324,"support":5.0905763},{"time_hours":304,"approval_perbill":514339152,"support_perbill":50875486,"approval":51.4339152,"support":5.0875486},{"time_hours":305,"approval_perbill":513859192,"support_perbill":50845402,"approval":51.3859192,"support":5.0845402},{"time_hours":306,"approval_perbill":513381428,"support_perbill":50815512,"approval":51.3381428,"support":5.0815512},{"time_hours":307,"approval_perbill":512905847,"support_perbill":50785812,"approval":51.2905847,"support":5.0785812},{"time_hours":308,"approval_perbill":512432432,"support_perbill":50756302,"approval":51.2432432,"support":5.0756302},{"time_hours":309,"approval_perbill":511961169,"support_perbill":50726978,"approval":51.1961169,"support":5.0726978},{"time_hours":310,"approval_perbill":511492043,"support_perbill":50697840,"approval":51.1492043,"support":5.069784},{"time_hours":311,"approval_perbill":511025041,"support_perbill":50668886,"approval":51.1025041,"support":5.0668886},{"time_hours":312,"approval_perbill":510560146,"support_perbill":50640113,"approval":51.0560146,"support":5.0640113},{"time_hours":313,"approval_perbill":510097346,"support_perbill":50611521,"approval":51.0097346,"support":5.0611521},{"time_hours":314,"approval_perbill":509636626,"support_perbill":50583107,"approval":50.9636626,"support":5.0583107},{"time_hours":315,"approval_perbill":509177972,"support_perbill":50554870,"approval":50.9177972,"support":5.055487},{"time_hours":316,"approval_perbill":508721371,"support_perbill":50526808,"approval":50.8721371,"support":5.0526808},{"time_hours":317,"approval_perbill":508266807,"support_perbill":50498920,"approval":50.8266807,"support":5.049892},{"time_hours":318,"approval_perbill":507814269,"support_perbill":50471203,"approval":50.7814269,"support":5.0471203},{"time_hours":319,"approval_perbill":507363742,"support_perbill":50443657,"approval":50.7363742,"support":5.0443657},{"time_hours":320,"approval_perbill":506915213,"support_perbill":50416280,"approval":50.6915213,"support":5.041628},{"time_hours":321,"approval_perbill":506468669,"support_perbill":50389071,"approval":50.6468669,"support":5.0389071},{"time_hours":322,"approval_perbill":506024096,"support_perbill":50362026,"approval":50.6024096,"support":5.0362026},{"time_hours":323,"approval_perbill":505581482,"support_perbill":50335147,"approval":50.5581482,"support":5.0335147},{"time_hours":324,"approval_perbill":505140813,"support_perbill":50308430,"approval":50.5140813,"support":5.030843},{"time_hours":325,"approval_perbill":504702077,"support_perbill":50281874,"approval":50.4702077,"support":5.0281874},{"time_hours":326,"approval_perbill":504265261,"support_perbill":50255478,"approval":50.4265261,"support":5.0255478},{"time_hours":327,"approval_perbill":503830353,"support_perbill":50229240,"approval":50.3830353,"support":5.022924},{"time_hours":328,"approval_perbill":503397340,"support_perbill":50203159,"approval":50.339734,"support":5.0203159},{"time_hours":329,"approval_perbill":502966210,"support_perbill":50177234,"approval":50.296621,"support":5.0177234},{"time_hours":330,"approval_perbill":502536950,"support_perbill":50151463,"approval":50.253695,"support":5.0151463},{"time_hours":331,"approval_perbill":502109549,"support_perbill":50125845,"approval":50.2109549,"support":5.0125845},{"time_hours":332,"approval_perbill":501683994,"support_perbill":50100378,"approval":50.1683994,"support":5.0100378},{"time_hours":333,"approval_perbill":501260273,"support_perbill":50075062,"approval":50.1260273,"support":5.0075062},{"time_hours":334,"approval_perbill":500838375,"support_perbill":50049894,"approval":50.0838375,"support":5.0049894},{"time_hours":335,"approval_perbill":500418287,"support_perbill":50024873,"approval":50.0418287,"support":5.0024873},{"time_hours":336,"approval_perbill":499999999,"support_perbill":49999999,"approval":49.9999999,"support":4.9999999}]')},77256:p=>{"use strict";p.exports=JSON.parse('[{"time_hours":0,"approval_perbill":1000000000,"support_perbill":500000026,"approval":100,"support":50.0000026},{"time_hours":1,"approval_perbill":998774510,"support_perbill":455636061,"approval":99.877451,"support":45.5636061},{"time_hours":2,"approval_perbill":997549020,"support_perbill":418401359,"approval":99.754902,"support":41.8401359},{"time_hours":3,"approval_perbill":996323530,"support_perbill":386705228,"approval":99.632353,"support":38.6705228},{"time_hours":4,"approval_perbill":995098040,"support_perbill":359397443,"approval":99.509804,"support":35.9397443},{"time_hours":5,"approval_perbill":993872550,"support_perbill":335625639,"approval":99.387255,"support":33.5625639},{"time_hours":6,"approval_perbill":992647060,"support_perbill":314744813,"approval":99.264706,"support":31.4744813},{"time_hours":7,"approval_perbill":991421570,"support_perbill":296257808,"approval":99.142157,"support":29.6257808},{"time_hours":8,"approval_perbill":990196080,"support_perbill":279775293,"approval":99.019608,"support":27.9775293},{"time_hours":9,"approval_perbill":988970589,"support_perbill":264988013,"approval":98.8970589,"support":26.4988013},{"time_hours":10,"approval_perbill":987745099,"support_perbill":251647242,"approval":98.7745099,"support":25.1647242},{"time_hours":11,"approval_perbill":986519609,"support_perbill":239550622,"approval":98.6519609,"support":23.9550622},{"time_hours":12,"approval_perbill":985294119,"support_perbill":228531862,"approval":98.5294119,"support":22.8531862},{"time_hours":13,"approval_perbill":984068628,"support_perbill":218453039,"approval":98.4068628,"support":21.8453039},{"time_hours":14,"approval_perbill":982843138,"support_perbill":209198815,"approval":98.2843138,"support":20.9198815},{"time_hours":15,"approval_perbill":981617648,"support_perbill":200671963,"approval":98.1617648,"support":20.0671963},{"time_hours":16,"approval_perbill":980392158,"support_perbill":192789972,"approval":98.0392158,"support":19.2789972},{"time_hours":17,"approval_perbill":979166667,"support_perbill":185482348,"approval":97.9166667,"support":18.5482348},{"time_hours":18,"approval_perbill":977941177,"support_perbill":178688524,"approval":97.7941177,"support":17.8688524},{"time_hours":19,"approval_perbill":976715687,"support_perbill":172356151,"approval":97.6715687,"support":17.2356151},{"time_hours":20,"approval_perbill":975490197,"support_perbill":166439756,"approval":97.5490197,"support":16.6439756},{"time_hours":21,"approval_perbill":974264706,"support_perbill":160899652,"approval":97.4264706,"support":16.0899652},{"time_hours":22,"approval_perbill":973039216,"support_perbill":155701053,"approval":97.3039216,"support":15.5701053},{"time_hours":23,"approval_perbill":971813726,"support_perbill":150813323,"approval":97.1813726,"support":15.0813323},{"time_hours":24,"approval_perbill":970588236,"support_perbill":146209386,"approval":97.0588236,"support":14.6209386},{"time_hours":25,"approval_perbill":969362746,"support_perbill":141865225,"approval":96.9362746,"support":14.1865225},{"time_hours":26,"approval_perbill":968137256,"support_perbill":137759452,"approval":96.8137256,"support":13.7759452},{"time_hours":27,"approval_perbill":966911766,"support_perbill":133872975,"approval":96.6911766,"support":13.3872975},{"time_hours":28,"approval_perbill":965686276,"support_perbill":130188679,"approval":96.5686276,"support":13.0188679},{"time_hours":29,"approval_perbill":964460786,"support_perbill":126691186,"approval":96.4460786,"support":12.6691186},{"time_hours":30,"approval_perbill":963235295,"support_perbill":123366639,"approval":96.3235295,"support":12.3366639},{"time_hours":31,"approval_perbill":962009805,"support_perbill":120202524,"approval":96.2009805,"support":12.0202524},{"time_hours":32,"approval_perbill":960784315,"support_perbill":117187499,"approval":96.0784315,"support":11.7187499},{"time_hours":33,"approval_perbill":959558825,"support_perbill":114311269,"approval":95.9558825,"support":11.4311269},{"time_hours":34,"approval_perbill":958333334,"support_perbill":111564465,"approval":95.8333334,"support":11.1564465},{"time_hours":35,"approval_perbill":957107844,"support_perbill":108938546,"approval":95.7107844,"support":10.8938546},{"time_hours":36,"approval_perbill":955882354,"support_perbill":106425701,"approval":95.5882354,"support":10.6425701},{"time_hours":37,"approval_perbill":954656864,"support_perbill":104018782,"approval":95.4656864,"support":10.4018782},{"time_hours":38,"approval_perbill":953431373,"support_perbill":101711228,"approval":95.3431373,"support":10.1711228},{"time_hours":39,"approval_perbill":952205883,"support_perbill":99497012,"approval":95.2205883,"support":9.9497012},{"time_hours":40,"approval_perbill":950980393,"support_perbill":97370582,"approval":95.0980393,"support":9.7370582},{"time_hours":41,"approval_perbill":949754903,"support_perbill":95326819,"approval":94.9754903,"support":9.5326819},{"time_hours":42,"approval_perbill":948529412,"support_perbill":93360994,"approval":94.8529412,"support":9.3360994},{"time_hours":43,"approval_perbill":947303922,"support_perbill":91468733,"approval":94.7303922,"support":9.1468733},{"time_hours":44,"approval_perbill":946078432,"support_perbill":89645982,"approval":94.6078432,"support":8.9645982},{"time_hours":45,"approval_perbill":944852942,"support_perbill":87888981,"approval":94.4852942,"support":8.7888981},{"time_hours":46,"approval_perbill":943627452,"support_perbill":86194234,"approval":94.3627452,"support":8.6194234},{"time_hours":47,"approval_perbill":942401961,"support_perbill":84558490,"approval":94.2401961,"support":8.455849},{"time_hours":48,"approval_perbill":941176471,"support_perbill":82978722,"approval":94.1176471,"support":8.2978722},{"time_hours":49,"approval_perbill":939950981,"support_perbill":81452103,"approval":93.9950981,"support":8.1452103},{"time_hours":50,"approval_perbill":938725491,"support_perbill":79975997,"approval":93.8725491,"support":7.9975997},{"time_hours":51,"approval_perbill":937500001,"support_perbill":78547936,"approval":93.7500001,"support":7.8547936},{"time_hours":52,"approval_perbill":936274511,"support_perbill":77165614,"approval":93.6274511,"support":7.7165614},{"time_hours":53,"approval_perbill":935049021,"support_perbill":75826867,"approval":93.5049021,"support":7.5826867},{"time_hours":54,"approval_perbill":933823531,"support_perbill":74529666,"approval":93.3823531,"support":7.4529666},{"time_hours":55,"approval_perbill":932598040,"support_perbill":73272106,"approval":93.259804,"support":7.3272106},{"time_hours":56,"approval_perbill":931372550,"support_perbill":72052400,"approval":93.137255,"support":7.20524},{"time_hours":57,"approval_perbill":930147060,"support_perbill":70868862,"approval":93.014706,"support":7.0868862},{"time_hours":58,"approval_perbill":928921570,"support_perbill":69719908,"approval":92.892157,"support":6.9719908},{"time_hours":59,"approval_perbill":927696079,"support_perbill":68604042,"approval":92.7696079,"support":6.8604042},{"time_hours":60,"approval_perbill":926470589,"support_perbill":67519857,"approval":92.6470589,"support":6.7519857},{"time_hours":61,"approval_perbill":925245099,"support_perbill":66466022,"approval":92.5245099,"support":6.6466022},{"time_hours":62,"approval_perbill":924019609,"support_perbill":65441280,"approval":92.4019609,"support":6.544128},{"time_hours":63,"approval_perbill":922794118,"support_perbill":64444443,"approval":92.2794118,"support":6.4444443},{"time_hours":64,"approval_perbill":921568628,"support_perbill":63474386,"approval":92.1568628,"support":6.3474386},{"time_hours":65,"approval_perbill":920343138,"support_perbill":62530044,"approval":92.0343138,"support":6.2530044},{"time_hours":66,"approval_perbill":919117648,"support_perbill":61610409,"approval":91.9117648,"support":6.1610409},{"time_hours":67,"approval_perbill":917892158,"support_perbill":60714523,"approval":91.7892158,"support":6.0714523},{"time_hours":68,"approval_perbill":916666667,"support_perbill":59841478,"approval":91.6666667,"support":5.9841478},{"time_hours":69,"approval_perbill":915441177,"support_perbill":58990411,"approval":91.5441177,"support":5.8990411},{"time_hours":70,"approval_perbill":914215687,"support_perbill":58160504,"approval":91.4215687,"support":5.8160504},{"time_hours":71,"approval_perbill":912990197,"support_perbill":57350975,"approval":91.2990197,"support":5.7350975},{"time_hours":72,"approval_perbill":911764706,"support_perbill":56561084,"approval":91.1764706,"support":5.6561084},{"time_hours":73,"approval_perbill":910539216,"support_perbill":55790126,"approval":91.0539216,"support":5.5790126},{"time_hours":74,"approval_perbill":909313726,"support_perbill":55037426,"approval":90.9313726,"support":5.5037426},{"time_hours":75,"approval_perbill":908088236,"support_perbill":54302345,"approval":90.8088236,"support":5.4302345},{"time_hours":76,"approval_perbill":906862746,"support_perbill":53584271,"approval":90.6862746,"support":5.3584271},{"time_hours":77,"approval_perbill":905637256,"support_perbill":52882620,"approval":90.5637256,"support":5.288262},{"time_hours":78,"approval_perbill":904411766,"support_perbill":52196835,"approval":90.4411766,"support":5.2196835},{"time_hours":79,"approval_perbill":903186276,"support_perbill":51526385,"approval":90.3186276,"support":5.1526385},{"time_hours":80,"approval_perbill":901960785,"support_perbill":50870759,"approval":90.1960785,"support":5.0870759},{"time_hours":81,"approval_perbill":900735295,"support_perbill":50229473,"approval":90.0735295,"support":5.0229473},{"time_hours":82,"approval_perbill":899509805,"support_perbill":49602061,"approval":89.9509805,"support":4.9602061},{"time_hours":83,"approval_perbill":898284315,"support_perbill":48988077,"approval":89.8284315,"support":4.8988077},{"time_hours":84,"approval_perbill":897058824,"support_perbill":48387095,"approval":89.7058824,"support":4.8387095},{"time_hours":85,"approval_perbill":895833334,"support_perbill":47798707,"approval":89.5833334,"support":4.7798707},{"time_hours":86,"approval_perbill":894607844,"support_perbill":47222519,"approval":89.4607844,"support":4.7222519},{"time_hours":87,"approval_perbill":893382354,"support_perbill":46658158,"approval":89.3382354,"support":4.6658158},{"time_hours":88,"approval_perbill":892156864,"support_perbill":46105262,"approval":89.2156864,"support":4.6105262},{"time_hours":89,"approval_perbill":890931373,"support_perbill":45563485,"approval":89.0931373,"support":4.5563485},{"time_hours":90,"approval_perbill":889705883,"support_perbill":45032496,"approval":88.9705883,"support":4.5032496},{"time_hours":91,"approval_perbill":888480393,"support_perbill":44511976,"approval":88.8480393,"support":4.4511976},{"time_hours":92,"approval_perbill":887254903,"support_perbill":44001617,"approval":88.7254903,"support":4.4001617},{"time_hours":93,"approval_perbill":886029412,"support_perbill":43501126,"approval":88.6029412,"support":4.3501126},{"time_hours":94,"approval_perbill":884803922,"support_perbill":43010218,"approval":88.4803922,"support":4.3010218},{"time_hours":95,"approval_perbill":883578432,"support_perbill":42528621,"approval":88.3578432,"support":4.2528621},{"time_hours":96,"approval_perbill":882352942,"support_perbill":42056074,"approval":88.2352942,"support":4.2056074},{"time_hours":97,"approval_perbill":881127452,"support_perbill":41592321,"approval":88.1127452,"support":4.1592321},{"time_hours":98,"approval_perbill":879901962,"support_perbill":41137122,"approval":87.9901962,"support":4.1137122},{"time_hours":99,"approval_perbill":878676472,"support_perbill":40690242,"approval":87.8676472,"support":4.0690242},{"time_hours":100,"approval_perbill":877450982,"support_perbill":40251453,"approval":87.7450982,"support":4.0251453},{"time_hours":101,"approval_perbill":876225491,"support_perbill":39820539,"approval":87.6225491,"support":3.9820539},{"time_hours":102,"approval_perbill":875000001,"support_perbill":39397289,"approval":87.5000001,"support":3.9397289},{"time_hours":103,"approval_perbill":873774511,"support_perbill":38981501,"approval":87.3774511,"support":3.8981501},{"time_hours":104,"approval_perbill":872549021,"support_perbill":38572980,"approval":87.2549021,"support":3.857298},{"time_hours":105,"approval_perbill":871323530,"support_perbill":38171535,"approval":87.132353,"support":3.8171535},{"time_hours":106,"approval_perbill":870098040,"support_perbill":37776985,"approval":87.009804,"support":3.7776985},{"time_hours":107,"approval_perbill":868872550,"support_perbill":37389155,"approval":86.887255,"support":3.7389155},{"time_hours":108,"approval_perbill":867647060,"support_perbill":37007873,"approval":86.764706,"support":3.7007873},{"time_hours":109,"approval_perbill":866421570,"support_perbill":36632975,"approval":86.642157,"support":3.6632975},{"time_hours":110,"approval_perbill":865196079,"support_perbill":36264302,"approval":86.5196079,"support":3.6264302},{"time_hours":111,"approval_perbill":863970589,"support_perbill":35901701,"approval":86.3970589,"support":3.5901701},{"time_hours":112,"approval_perbill":862745099,"support_perbill":35545023,"approval":86.2745099,"support":3.5545023},{"time_hours":113,"approval_perbill":861519609,"support_perbill":35194123,"approval":86.1519609,"support":3.5194123},{"time_hours":114,"approval_perbill":860294118,"support_perbill":34848862,"approval":86.0294118,"support":3.4848862},{"time_hours":115,"approval_perbill":859068628,"support_perbill":34509106,"approval":85.9068628,"support":3.4509106},{"time_hours":116,"approval_perbill":857843138,"support_perbill":34174724,"approval":85.7843138,"support":3.4174724},{"time_hours":117,"approval_perbill":856617648,"support_perbill":33845590,"approval":85.6617648,"support":3.384559},{"time_hours":118,"approval_perbill":855392157,"support_perbill":33521580,"approval":85.5392157,"support":3.352158},{"time_hours":119,"approval_perbill":854166667,"support_perbill":33202577,"approval":85.4166667,"support":3.3202577},{"time_hours":120,"approval_perbill":852941177,"support_perbill":32888464,"approval":85.2941177,"support":3.2888464},{"time_hours":121,"approval_perbill":851715687,"support_perbill":32579131,"approval":85.1715687,"support":3.2579131},{"time_hours":122,"approval_perbill":850490197,"support_perbill":32274469,"approval":85.0490197,"support":3.2274469},{"time_hours":123,"approval_perbill":849264707,"support_perbill":31974373,"approval":84.9264707,"support":3.1974373},{"time_hours":124,"approval_perbill":848039217,"support_perbill":31678741,"approval":84.8039217,"support":3.1678741},{"time_hours":125,"approval_perbill":846813727,"support_perbill":31387475,"approval":84.6813727,"support":3.1387475},{"time_hours":126,"approval_perbill":845588236,"support_perbill":31100477,"approval":84.5588236,"support":3.1100477},{"time_hours":127,"approval_perbill":844362746,"support_perbill":30817656,"approval":84.4362746,"support":3.0817656},{"time_hours":128,"approval_perbill":843137256,"support_perbill":30538921,"approval":84.3137256,"support":3.0538921},{"time_hours":129,"approval_perbill":841911766,"support_perbill":30264184,"approval":84.1911766,"support":3.0264184},{"time_hours":130,"approval_perbill":840686276,"support_perbill":29993358,"approval":84.0686276,"support":2.9993358},{"time_hours":131,"approval_perbill":839460785,"support_perbill":29726363,"approval":83.9460785,"support":2.9726363},{"time_hours":132,"approval_perbill":838235295,"support_perbill":29463116,"approval":83.8235295,"support":2.9463116},{"time_hours":133,"approval_perbill":837009805,"support_perbill":29203539,"approval":83.7009805,"support":2.9203539},{"time_hours":134,"approval_perbill":835784315,"support_perbill":28947556,"approval":83.5784315,"support":2.8947556},{"time_hours":135,"approval_perbill":834558824,"support_perbill":28695094,"approval":83.4558824,"support":2.8695094},{"time_hours":136,"approval_perbill":833333334,"support_perbill":28446079,"approval":83.3333334,"support":2.8446079},{"time_hours":137,"approval_perbill":832107844,"support_perbill":28200442,"approval":83.2107844,"support":2.8200442},{"time_hours":138,"approval_perbill":830882354,"support_perbill":27958114,"approval":83.0882354,"support":2.7958114},{"time_hours":139,"approval_perbill":829656863,"support_perbill":27719030,"approval":82.9656863,"support":2.771903},{"time_hours":140,"approval_perbill":828431373,"support_perbill":27483123,"approval":82.8431373,"support":2.7483123},{"time_hours":141,"approval_perbill":827205883,"support_perbill":27250333,"approval":82.7205883,"support":2.7250333},{"time_hours":142,"approval_perbill":825980393,"support_perbill":27020596,"approval":82.5980393,"support":2.7020596},{"time_hours":143,"approval_perbill":824754902,"support_perbill":26793853,"approval":82.4754902,"support":2.6793853},{"time_hours":144,"approval_perbill":823529412,"support_perbill":26570047,"approval":82.3529412,"support":2.6570047},{"time_hours":145,"approval_perbill":822303922,"support_perbill":26349121,"approval":82.2303922,"support":2.6349121},{"time_hours":146,"approval_perbill":821078432,"support_perbill":26131019,"approval":82.1078432,"support":2.6131019},{"time_hours":147,"approval_perbill":819852942,"support_perbill":25915687,"approval":81.9852942,"support":2.5915687},{"time_hours":148,"approval_perbill":818627452,"support_perbill":25703073,"approval":81.8627452,"support":2.5703073},{"time_hours":149,"approval_perbill":817401962,"support_perbill":25493126,"approval":81.7401962,"support":2.5493126},{"time_hours":150,"approval_perbill":816176472,"support_perbill":25285796,"approval":81.6176472,"support":2.5285796},{"time_hours":151,"approval_perbill":814950982,"support_perbill":25081035,"approval":81.4950982,"support":2.5081035},{"time_hours":152,"approval_perbill":813725491,"support_perbill":24878795,"approval":81.3725491,"support":2.4878795},{"time_hours":153,"approval_perbill":812500001,"support_perbill":24679029,"approval":81.2500001,"support":2.4679029},{"time_hours":154,"approval_perbill":811274511,"support_perbill":24481693,"approval":81.1274511,"support":2.4481693},{"time_hours":155,"approval_perbill":810049021,"support_perbill":24286742,"approval":81.0049021,"support":2.4286742},{"time_hours":156,"approval_perbill":808823530,"support_perbill":24094134,"approval":80.882353,"support":2.4094134},{"time_hours":157,"approval_perbill":807598040,"support_perbill":23903827,"approval":80.759804,"support":2.3903827},{"time_hours":158,"approval_perbill":806372550,"support_perbill":23715779,"approval":80.637255,"support":2.3715779},{"time_hours":159,"approval_perbill":805147060,"support_perbill":23529951,"approval":80.514706,"support":2.3529951},{"time_hours":160,"approval_perbill":803921569,"support_perbill":23346303,"approval":80.3921569,"support":2.3346303},{"time_hours":161,"approval_perbill":802696079,"support_perbill":23164797,"approval":80.2696079,"support":2.3164797},{"time_hours":162,"approval_perbill":801470589,"support_perbill":22985397,"approval":80.1470589,"support":2.2985397},{"time_hours":163,"approval_perbill":800245099,"support_perbill":22808065,"approval":80.0245099,"support":2.2808065},{"time_hours":164,"approval_perbill":799019608,"support_perbill":22632766,"approval":79.9019608,"support":2.2632766},{"time_hours":165,"approval_perbill":797794118,"support_perbill":22459466,"approval":79.7794118,"support":2.2459466},{"time_hours":166,"approval_perbill":796568628,"support_perbill":22288130,"approval":79.6568628,"support":2.228813},{"time_hours":167,"approval_perbill":795343138,"support_perbill":22118725,"approval":79.5343138,"support":2.2118725},{"time_hours":168,"approval_perbill":794117648,"support_perbill":21951219,"approval":79.4117648,"support":2.1951219},{"time_hours":169,"approval_perbill":792892158,"support_perbill":21785579,"approval":79.2892158,"support":2.1785579},{"time_hours":170,"approval_perbill":791666668,"support_perbill":21621776,"approval":79.1666668,"support":2.1621776},{"time_hours":171,"approval_perbill":790441178,"support_perbill":21459778,"approval":79.0441178,"support":2.1459778},{"time_hours":172,"approval_perbill":789215688,"support_perbill":21299556,"approval":78.9215688,"support":2.1299556},{"time_hours":173,"approval_perbill":787990197,"support_perbill":21141081,"approval":78.7990197,"support":2.1141081},{"time_hours":174,"approval_perbill":786764707,"support_perbill":20984324,"approval":78.6764707,"support":2.0984324},{"time_hours":175,"approval_perbill":785539217,"support_perbill":20829258,"approval":78.5539217,"support":2.0829258},{"time_hours":176,"approval_perbill":784313727,"support_perbill":20675855,"approval":78.4313727,"support":2.0675855},{"time_hours":177,"approval_perbill":783088236,"support_perbill":20524089,"approval":78.3088236,"support":2.0524089},{"time_hours":178,"approval_perbill":781862746,"support_perbill":20373934,"approval":78.1862746,"support":2.0373934},{"time_hours":179,"approval_perbill":780637256,"support_perbill":20225364,"approval":78.0637256,"support":2.0225364},{"time_hours":180,"approval_perbill":779411766,"support_perbill":20078354,"approval":77.9411766,"support":2.0078354},{"time_hours":181,"approval_perbill":778186275,"support_perbill":19932880,"approval":77.8186275,"support":1.993288},{"time_hours":182,"approval_perbill":776960785,"support_perbill":19788917,"approval":77.6960785,"support":1.9788917},{"time_hours":183,"approval_perbill":775735295,"support_perbill":19646444,"approval":77.5735295,"support":1.9646444},{"time_hours":184,"approval_perbill":774509805,"support_perbill":19505435,"approval":77.4509805,"support":1.9505435},{"time_hours":185,"approval_perbill":773284314,"support_perbill":19365870,"approval":77.3284314,"support":1.936587},{"time_hours":186,"approval_perbill":772058824,"support_perbill":19227725,"approval":77.2058824,"support":1.9227725},{"time_hours":187,"approval_perbill":770833334,"support_perbill":19090980,"approval":77.0833334,"support":1.909098},{"time_hours":188,"approval_perbill":769607844,"support_perbill":18955613,"approval":76.9607844,"support":1.8955613},{"time_hours":189,"approval_perbill":768382353,"support_perbill":18821603,"approval":76.8382353,"support":1.8821603},{"time_hours":190,"approval_perbill":767156863,"support_perbill":18688931,"approval":76.7156863,"support":1.8688931},{"time_hours":191,"approval_perbill":765931373,"support_perbill":18557575,"approval":76.5931373,"support":1.8557575},{"time_hours":192,"approval_perbill":764705883,"support_perbill":18427518,"approval":76.4705883,"support":1.8427518},{"time_hours":193,"approval_perbill":763480393,"support_perbill":18298739,"approval":76.3480393,"support":1.8298739},{"time_hours":194,"approval_perbill":762254903,"support_perbill":18171219,"approval":76.2254903,"support":1.8171219},{"time_hours":195,"approval_perbill":761029413,"support_perbill":18044941,"approval":76.1029413,"support":1.8044941},{"time_hours":196,"approval_perbill":759803923,"support_perbill":17919887,"approval":75.9803923,"support":1.7919887},{"time_hours":197,"approval_perbill":758578433,"support_perbill":17796038,"approval":75.8578433,"support":1.7796038},{"time_hours":198,"approval_perbill":757352942,"support_perbill":17673377,"approval":75.7352942,"support":1.7673377},{"time_hours":199,"approval_perbill":756127452,"support_perbill":17551888,"approval":75.6127452,"support":1.7551888},{"time_hours":200,"approval_perbill":754901962,"support_perbill":17431553,"approval":75.4901962,"support":1.7431553},{"time_hours":201,"approval_perbill":753676472,"support_perbill":17312357,"approval":75.3676472,"support":1.7312357},{"time_hours":202,"approval_perbill":752450981,"support_perbill":17194282,"approval":75.2450981,"support":1.7194282},{"time_hours":203,"approval_perbill":751225491,"support_perbill":17077315,"approval":75.1225491,"support":1.7077315},{"time_hours":204,"approval_perbill":750000001,"support_perbill":16961437,"approval":75.0000001,"support":1.6961437},{"time_hours":205,"approval_perbill":748774511,"support_perbill":16846636,"approval":74.8774511,"support":1.6846636},{"time_hours":206,"approval_perbill":747549020,"support_perbill":16732895,"approval":74.754902,"support":1.6732895},{"time_hours":207,"approval_perbill":746323530,"support_perbill":16620201,"approval":74.632353,"support":1.6620201},{"time_hours":208,"approval_perbill":745098040,"support_perbill":16508538,"approval":74.509804,"support":1.6508538},{"time_hours":209,"approval_perbill":743872550,"support_perbill":16397893,"approval":74.387255,"support":1.6397893},{"time_hours":210,"approval_perbill":742647059,"support_perbill":16288252,"approval":74.2647059,"support":1.6288252},{"time_hours":211,"approval_perbill":741421569,"support_perbill":16179601,"approval":74.1421569,"support":1.6179601},{"time_hours":212,"approval_perbill":740196079,"support_perbill":16071927,"approval":74.0196079,"support":1.6071927},{"time_hours":213,"approval_perbill":738970589,"support_perbill":15965217,"approval":73.8970589,"support":1.5965217},{"time_hours":214,"approval_perbill":737745099,"support_perbill":15859457,"approval":73.7745099,"support":1.5859457},{"time_hours":215,"approval_perbill":736519608,"support_perbill":15754636,"approval":73.6519608,"support":1.5754636},{"time_hours":216,"approval_perbill":735294118,"support_perbill":15650741,"approval":73.5294118,"support":1.5650741},{"time_hours":217,"approval_perbill":734068628,"support_perbill":15547759,"approval":73.4068628,"support":1.5547759},{"time_hours":218,"approval_perbill":732843138,"support_perbill":15445679,"approval":73.2843138,"support":1.5445679},{"time_hours":219,"approval_perbill":731617648,"support_perbill":15344488,"approval":73.1617648,"support":1.5344488},{"time_hours":220,"approval_perbill":730392158,"support_perbill":15244176,"approval":73.0392158,"support":1.5244176},{"time_hours":221,"approval_perbill":729166668,"support_perbill":15144731,"approval":72.9166668,"support":1.5144731},{"time_hours":222,"approval_perbill":727941178,"support_perbill":15046141,"approval":72.7941178,"support":1.5046141},{"time_hours":223,"approval_perbill":726715687,"support_perbill":14948396,"approval":72.6715687,"support":1.4948396},{"time_hours":224,"approval_perbill":725490197,"support_perbill":14851485,"approval":72.5490197,"support":1.4851485},{"time_hours":225,"approval_perbill":724264707,"support_perbill":14755396,"approval":72.4264707,"support":1.4755396},{"time_hours":226,"approval_perbill":723039217,"support_perbill":14660121,"approval":72.3039217,"support":1.4660121},{"time_hours":227,"approval_perbill":721813726,"support_perbill":14565648,"approval":72.1813726,"support":1.4565648},{"time_hours":228,"approval_perbill":720588236,"support_perbill":14471968,"approval":72.0588236,"support":1.4471968},{"time_hours":229,"approval_perbill":719362746,"support_perbill":14379070,"approval":71.9362746,"support":1.437907},{"time_hours":230,"approval_perbill":718137256,"support_perbill":14286945,"approval":71.8137256,"support":1.4286945},{"time_hours":231,"approval_perbill":716911765,"support_perbill":14195583,"approval":71.6911765,"support":1.4195583},{"time_hours":232,"approval_perbill":715686275,"support_perbill":14104975,"approval":71.5686275,"support":1.4104975},{"time_hours":233,"approval_perbill":714460785,"support_perbill":14015111,"approval":71.4460785,"support":1.4015111},{"time_hours":234,"approval_perbill":713235295,"support_perbill":13925982,"approval":71.3235295,"support":1.3925982},{"time_hours":235,"approval_perbill":712009805,"support_perbill":13837579,"approval":71.2009805,"support":1.3837579},{"time_hours":236,"approval_perbill":710784314,"support_perbill":13749894,"approval":71.0784314,"support":1.3749894},{"time_hours":237,"approval_perbill":709558824,"support_perbill":13662918,"approval":70.9558824,"support":1.3662918},{"time_hours":238,"approval_perbill":708333334,"support_perbill":13576642,"approval":70.8333334,"support":1.3576642},{"time_hours":239,"approval_perbill":707107844,"support_perbill":13491057,"approval":70.7107844,"support":1.3491057},{"time_hours":240,"approval_perbill":705882353,"support_perbill":13406156,"approval":70.5882353,"support":1.3406156},{"time_hours":241,"approval_perbill":704656863,"support_perbill":13321931,"approval":70.4656863,"support":1.3321931},{"time_hours":242,"approval_perbill":703431373,"support_perbill":13238372,"approval":70.3431373,"support":1.3238372},{"time_hours":243,"approval_perbill":702205883,"support_perbill":13155473,"approval":70.2205883,"support":1.3155473},{"time_hours":244,"approval_perbill":700980393,"support_perbill":13073226,"approval":70.0980393,"support":1.3073226},{"time_hours":245,"approval_perbill":699754903,"support_perbill":12991622,"approval":69.9754903,"support":1.2991622},{"time_hours":246,"approval_perbill":698529413,"support_perbill":12910655,"approval":69.8529413,"support":1.2910655},{"time_hours":247,"approval_perbill":697303923,"support_perbill":12830317,"approval":69.7303923,"support":1.2830317},{"time_hours":248,"approval_perbill":696078432,"support_perbill":12750601,"approval":69.6078432,"support":1.2750601},{"time_hours":249,"approval_perbill":694852942,"support_perbill":12671499,"approval":69.4852942,"support":1.2671499},{"time_hours":250,"approval_perbill":693627452,"support_perbill":12593005,"approval":69.3627452,"support":1.2593005},{"time_hours":251,"approval_perbill":692401962,"support_perbill":12515111,"approval":69.2401962,"support":1.2515111},{"time_hours":252,"approval_perbill":691176471,"support_perbill":12437810,"approval":69.1176471,"support":1.243781},{"time_hours":253,"approval_perbill":689950981,"support_perbill":12361097,"approval":68.9950981,"support":1.2361097},{"time_hours":254,"approval_perbill":688725491,"support_perbill":12284964,"approval":68.8725491,"support":1.2284964},{"time_hours":255,"approval_perbill":687500001,"support_perbill":12209404,"approval":68.7500001,"support":1.2209404},{"time_hours":256,"approval_perbill":686274511,"support_perbill":12134411,"approval":68.6274511,"support":1.2134411},{"time_hours":257,"approval_perbill":685049020,"support_perbill":12059980,"approval":68.504902,"support":1.205998},{"time_hours":258,"approval_perbill":683823530,"support_perbill":11986103,"approval":68.382353,"support":1.1986103},{"time_hours":259,"approval_perbill":682598040,"support_perbill":11912774,"approval":68.259804,"support":1.1912774},{"time_hours":260,"approval_perbill":681372550,"support_perbill":11839987,"approval":68.137255,"support":1.1839987},{"time_hours":261,"approval_perbill":680147059,"support_perbill":11767737,"approval":68.0147059,"support":1.1767737},{"time_hours":262,"approval_perbill":678921569,"support_perbill":11696017,"approval":67.8921569,"support":1.1696017},{"time_hours":263,"approval_perbill":677696079,"support_perbill":11624822,"approval":67.7696079,"support":1.1624822},{"time_hours":264,"approval_perbill":676470589,"support_perbill":11554145,"approval":67.6470589,"support":1.1554145},{"time_hours":265,"approval_perbill":675245099,"support_perbill":11483982,"approval":67.5245099,"support":1.1483982},{"time_hours":266,"approval_perbill":674019609,"support_perbill":11414326,"approval":67.4019609,"support":1.1414326},{"time_hours":267,"approval_perbill":672794119,"support_perbill":11345173,"approval":67.2794119,"support":1.1345173},{"time_hours":268,"approval_perbill":671568629,"support_perbill":11276516,"approval":67.1568629,"support":1.1276516},{"time_hours":269,"approval_perbill":670343138,"support_perbill":11208351,"approval":67.0343138,"support":1.1208351},{"time_hours":270,"approval_perbill":669117648,"support_perbill":11140671,"approval":66.9117648,"support":1.1140671},{"time_hours":271,"approval_perbill":667892158,"support_perbill":11073473,"approval":66.7892158,"support":1.1073473},{"time_hours":272,"approval_perbill":666666668,"support_perbill":11006750,"approval":66.6666668,"support":1.100675},{"time_hours":273,"approval_perbill":665441177,"support_perbill":10940499,"approval":66.5441177,"support":1.0940499},{"time_hours":274,"approval_perbill":664215687,"support_perbill":10874713,"approval":66.4215687,"support":1.0874713},{"time_hours":275,"approval_perbill":662990197,"support_perbill":10809388,"approval":66.2990197,"support":1.0809388},{"time_hours":276,"approval_perbill":661764707,"support_perbill":10744519,"approval":66.1764707,"support":1.0744519},{"time_hours":277,"approval_perbill":660539217,"support_perbill":10680101,"approval":66.0539217,"support":1.0680101},{"time_hours":278,"approval_perbill":659313726,"support_perbill":10616130,"approval":65.9313726,"support":1.061613},{"time_hours":279,"approval_perbill":658088236,"support_perbill":10552601,"approval":65.8088236,"support":1.0552601},{"time_hours":280,"approval_perbill":656862746,"support_perbill":10489510,"approval":65.6862746,"support":1.048951},{"time_hours":281,"approval_perbill":655637256,"support_perbill":10426852,"approval":65.5637256,"support":1.0426852},{"time_hours":282,"approval_perbill":654411765,"support_perbill":10364622,"approval":65.4411765,"support":1.0364622},{"time_hours":283,"approval_perbill":653186275,"support_perbill":10302816,"approval":65.3186275,"support":1.0302816},{"time_hours":284,"approval_perbill":651960785,"support_perbill":10241430,"approval":65.1960785,"support":1.024143},{"time_hours":285,"approval_perbill":650735295,"support_perbill":10180459,"approval":65.0735295,"support":1.0180459},{"time_hours":286,"approval_perbill":649509804,"support_perbill":10119900,"approval":64.9509804,"support":1.01199},{"time_hours":287,"approval_perbill":648284314,"support_perbill":10059748,"approval":64.8284314,"support":1.0059748},{"time_hours":288,"approval_perbill":647058824,"support_perbill":10000000,"approval":64.7058824,"support":1},{"time_hours":289,"approval_perbill":645833334,"support_perbill":9940650,"approval":64.5833334,"support":0.994065},{"time_hours":290,"approval_perbill":644607844,"support_perbill":9881695,"approval":64.4607844,"support":0.9881695},{"time_hours":291,"approval_perbill":643382354,"support_perbill":9823132,"approval":64.3382354,"support":0.9823132},{"time_hours":292,"approval_perbill":642156864,"support_perbill":9764955,"approval":64.2156864,"support":0.9764955},{"time_hours":293,"approval_perbill":640931374,"support_perbill":9707163,"approval":64.0931374,"support":0.9707163},{"time_hours":294,"approval_perbill":639705883,"support_perbill":9649749,"approval":63.9705883,"support":0.9649749},{"time_hours":295,"approval_perbill":638480393,"support_perbill":9592712,"approval":63.8480393,"support":0.9592712},{"time_hours":296,"approval_perbill":637254903,"support_perbill":9536047,"approval":63.7254903,"support":0.9536047},{"time_hours":297,"approval_perbill":636029413,"support_perbill":9479751,"approval":63.6029413,"support":0.9479751},{"time_hours":298,"approval_perbill":634803923,"support_perbill":9423820,"approval":63.4803923,"support":0.942382},{"time_hours":299,"approval_perbill":633578432,"support_perbill":9368250,"approval":63.3578432,"support":0.936825},{"time_hours":300,"approval_perbill":632352942,"support_perbill":9313038,"approval":63.2352942,"support":0.9313038},{"time_hours":301,"approval_perbill":631127452,"support_perbill":9258181,"approval":63.1127452,"support":0.9258181},{"time_hours":302,"approval_perbill":629901962,"support_perbill":9203674,"approval":62.9901962,"support":0.9203674},{"time_hours":303,"approval_perbill":628676471,"support_perbill":9149516,"approval":62.8676471,"support":0.9149516},{"time_hours":304,"approval_perbill":627450981,"support_perbill":9095702,"approval":62.7450981,"support":0.9095702},{"time_hours":305,"approval_perbill":626225491,"support_perbill":9042230,"approval":62.6225491,"support":0.904223},{"time_hours":306,"approval_perbill":625000001,"support_perbill":8989095,"approval":62.5000001,"support":0.8989095},{"time_hours":307,"approval_perbill":623774510,"support_perbill":8936295,"approval":62.377451,"support":0.8936295},{"time_hours":308,"approval_perbill":622549020,"support_perbill":8883826,"approval":62.254902,"support":0.8883826},{"time_hours":309,"approval_perbill":621323530,"support_perbill":8831687,"approval":62.132353,"support":0.8831687},{"time_hours":310,"approval_perbill":620098040,"support_perbill":8779872,"approval":62.009804,"support":0.8779872},{"time_hours":311,"approval_perbill":618872549,"support_perbill":8728380,"approval":61.8872549,"support":0.872838},{"time_hours":312,"approval_perbill":617647059,"support_perbill":8677207,"approval":61.7647059,"support":0.8677207},{"time_hours":313,"approval_perbill":616421569,"support_perbill":8626351,"approval":61.6421569,"support":0.8626351},{"time_hours":314,"approval_perbill":615196079,"support_perbill":8575808,"approval":61.5196079,"support":0.8575808},{"time_hours":315,"approval_perbill":613970589,"support_perbill":8525576,"approval":61.3970589,"support":0.8525576},{"time_hours":316,"approval_perbill":612745099,"support_perbill":8475652,"approval":61.2745099,"support":0.8475652},{"time_hours":317,"approval_perbill":611519609,"support_perbill":8426032,"approval":61.1519609,"support":0.8426032},{"time_hours":318,"approval_perbill":610294119,"support_perbill":8376715,"approval":61.0294119,"support":0.8376715},{"time_hours":319,"approval_perbill":609068629,"support_perbill":8327697,"approval":60.9068629,"support":0.8327697},{"time_hours":320,"approval_perbill":607843138,"support_perbill":8278976,"approval":60.7843138,"support":0.8278976},{"time_hours":321,"approval_perbill":606617648,"support_perbill":8230549,"approval":60.6617648,"support":0.8230549},{"time_hours":322,"approval_perbill":605392158,"support_perbill":8182413,"approval":60.5392158,"support":0.8182413},{"time_hours":323,"approval_perbill":604166668,"support_perbill":8134566,"approval":60.4166668,"support":0.8134566},{"time_hours":324,"approval_perbill":602941177,"support_perbill":8087005,"approval":60.2941177,"support":0.8087005},{"time_hours":325,"approval_perbill":601715687,"support_perbill":8039727,"approval":60.1715687,"support":0.8039727},{"time_hours":326,"approval_perbill":600490197,"support_perbill":7992731,"approval":60.0490197,"support":0.7992731},{"time_hours":327,"approval_perbill":599264707,"support_perbill":7946013,"approval":59.9264707,"support":0.7946013},{"time_hours":328,"approval_perbill":598039216,"support_perbill":7899571,"approval":59.8039216,"support":0.7899571},{"time_hours":329,"approval_perbill":596813726,"support_perbill":7853403,"approval":59.6813726,"support":0.7853403},{"time_hours":330,"approval_perbill":595588236,"support_perbill":7807506,"approval":59.5588236,"support":0.7807506},{"time_hours":331,"approval_perbill":594362746,"support_perbill":7761878,"approval":59.4362746,"support":0.7761878},{"time_hours":332,"approval_perbill":593137255,"support_perbill":7716516,"approval":59.3137255,"support":0.7716516},{"time_hours":333,"approval_perbill":591911765,"support_perbill":7671418,"approval":59.1911765,"support":0.7671418},{"time_hours":334,"approval_perbill":590686275,"support_perbill":7626583,"approval":59.0686275,"support":0.7626583},{"time_hours":335,"approval_perbill":589460785,"support_perbill":7582007,"approval":58.9460785,"support":0.7582007},{"time_hours":336,"approval_perbill":588235295,"support_perbill":7537688,"approval":58.8235295,"support":0.7537688},{"time_hours":337,"approval_perbill":587009805,"support_perbill":7493624,"approval":58.7009805,"support":0.7493624},{"time_hours":338,"approval_perbill":585784315,"support_perbill":7449814,"approval":58.5784315,"support":0.7449814},{"time_hours":339,"approval_perbill":584558825,"support_perbill":7406254,"approval":58.4558825,"support":0.7406254},{"time_hours":340,"approval_perbill":583333335,"support_perbill":7362942,"approval":58.3333335,"support":0.7362942},{"time_hours":341,"approval_perbill":582107844,"support_perbill":7319878,"approval":58.2107844,"support":0.7319878},{"time_hours":342,"approval_perbill":580882354,"support_perbill":7277057,"approval":58.0882354,"support":0.7277057},{"time_hours":343,"approval_perbill":579656864,"support_perbill":7234479,"approval":57.9656864,"support":0.7234479},{"time_hours":344,"approval_perbill":578431374,"support_perbill":7192141,"approval":57.8431374,"support":0.7192141},{"time_hours":345,"approval_perbill":577205883,"support_perbill":7150041,"approval":57.7205883,"support":0.7150041},{"time_hours":346,"approval_perbill":575980393,"support_perbill":7108178,"approval":57.5980393,"support":0.7108178},{"time_hours":347,"approval_perbill":574754903,"support_perbill":7066548,"approval":57.4754903,"support":0.7066548},{"time_hours":348,"approval_perbill":573529413,"support_perbill":7025151,"approval":57.3529413,"support":0.7025151},{"time_hours":349,"approval_perbill":572303922,"support_perbill":6983985,"approval":57.2303922,"support":0.6983985},{"time_hours":350,"approval_perbill":571078432,"support_perbill":6943047,"approval":57.1078432,"support":0.6943047},{"time_hours":351,"approval_perbill":569852942,"support_perbill":6902335,"approval":56.9852942,"support":0.6902335},{"time_hours":352,"approval_perbill":568627452,"support_perbill":6861848,"approval":56.8627452,"support":0.6861848},{"time_hours":353,"approval_perbill":567401961,"support_perbill":6821584,"approval":56.7401961,"support":0.6821584},{"time_hours":354,"approval_perbill":566176471,"support_perbill":6781540,"approval":56.6176471,"support":0.678154},{"time_hours":355,"approval_perbill":564950981,"support_perbill":6741716,"approval":56.4950981,"support":0.6741716},{"time_hours":356,"approval_perbill":563725491,"support_perbill":6702109,"approval":56.3725491,"support":0.6702109},{"time_hours":357,"approval_perbill":562500000,"support_perbill":6662718,"approval":56.25,"support":0.6662718},{"time_hours":358,"approval_perbill":561274510,"support_perbill":6623541,"approval":56.127451,"support":0.6623541},{"time_hours":359,"approval_perbill":560049020,"support_perbill":6584575,"approval":56.004902,"support":0.6584575},{"time_hours":360,"approval_perbill":558823530,"support_perbill":6545820,"approval":55.882353,"support":0.654582},{"time_hours":361,"approval_perbill":557598040,"support_perbill":6507274,"approval":55.759804,"support":0.6507274},{"time_hours":362,"approval_perbill":556372550,"support_perbill":6468935,"approval":55.637255,"support":0.6468935},{"time_hours":363,"approval_perbill":555147060,"support_perbill":6430801,"approval":55.514706,"support":0.6430801},{"time_hours":364,"approval_perbill":553921570,"support_perbill":6392871,"approval":55.392157,"support":0.6392871},{"time_hours":365,"approval_perbill":552696080,"support_perbill":6355142,"approval":55.269608,"support":0.6355142},{"time_hours":366,"approval_perbill":551470589,"support_perbill":6317615,"approval":55.1470589,"support":0.6317615},{"time_hours":367,"approval_perbill":550245099,"support_perbill":6280286,"approval":55.0245099,"support":0.6280286},{"time_hours":368,"approval_perbill":549019609,"support_perbill":6243154,"approval":54.9019609,"support":0.6243154},{"time_hours":369,"approval_perbill":547794119,"support_perbill":6206218,"approval":54.7794119,"support":0.6206218},{"time_hours":370,"approval_perbill":546568628,"support_perbill":6169476,"approval":54.6568628,"support":0.6169476},{"time_hours":371,"approval_perbill":545343138,"support_perbill":6132927,"approval":54.5343138,"support":0.6132927},{"time_hours":372,"approval_perbill":544117648,"support_perbill":6096569,"approval":54.4117648,"support":0.6096569},{"time_hours":373,"approval_perbill":542892158,"support_perbill":6060401,"approval":54.2892158,"support":0.6060401},{"time_hours":374,"approval_perbill":541666667,"support_perbill":6024421,"approval":54.1666667,"support":0.6024421},{"time_hours":375,"approval_perbill":540441177,"support_perbill":5988627,"approval":54.0441177,"support":0.5988627},{"time_hours":376,"approval_perbill":539215687,"support_perbill":5953019,"approval":53.9215687,"support":0.5953019},{"time_hours":377,"approval_perbill":537990197,"support_perbill":5917595,"approval":53.7990197,"support":0.5917595},{"time_hours":378,"approval_perbill":536764706,"support_perbill":5882353,"approval":53.6764706,"support":0.5882353},{"time_hours":379,"approval_perbill":535539216,"support_perbill":5847292,"approval":53.5539216,"support":0.5847292},{"time_hours":380,"approval_perbill":534313726,"support_perbill":5812410,"approval":53.4313726,"support":0.581241},{"time_hours":381,"approval_perbill":533088236,"support_perbill":5777707,"approval":53.3088236,"support":0.5777707},{"time_hours":382,"approval_perbill":531862746,"support_perbill":5743181,"approval":53.1862746,"support":0.5743181},{"time_hours":383,"approval_perbill":530637255,"support_perbill":5708830,"approval":53.0637255,"support":0.570883},{"time_hours":384,"approval_perbill":529411765,"support_perbill":5674653,"approval":52.9411765,"support":0.5674653},{"time_hours":385,"approval_perbill":528186275,"support_perbill":5640649,"approval":52.8186275,"support":0.5640649},{"time_hours":386,"approval_perbill":526960785,"support_perbill":5606817,"approval":52.6960785,"support":0.5606817},{"time_hours":387,"approval_perbill":525735295,"support_perbill":5573155,"approval":52.5735295,"support":0.5573155},{"time_hours":388,"approval_perbill":524509805,"support_perbill":5539662,"approval":52.4509805,"support":0.5539662},{"time_hours":389,"approval_perbill":523284315,"support_perbill":5506336,"approval":52.3284315,"support":0.5506336},{"time_hours":390,"approval_perbill":522058825,"support_perbill":5473177,"approval":52.2058825,"support":0.5473177},{"time_hours":391,"approval_perbill":520833334,"support_perbill":5440183,"approval":52.0833334,"support":0.5440183},{"time_hours":392,"approval_perbill":519607844,"support_perbill":5407354,"approval":51.9607844,"support":0.5407354},{"time_hours":393,"approval_perbill":518382354,"support_perbill":5374687,"approval":51.8382354,"support":0.5374687},{"time_hours":394,"approval_perbill":517156864,"support_perbill":5342181,"approval":51.7156864,"support":0.5342181},{"time_hours":395,"approval_perbill":515931373,"support_perbill":5309836,"approval":51.5931373,"support":0.5309836},{"time_hours":396,"approval_perbill":514705883,"support_perbill":5277650,"approval":51.4705883,"support":0.527765},{"time_hours":397,"approval_perbill":513480393,"support_perbill":5245622,"approval":51.3480393,"support":0.5245622},{"time_hours":398,"approval_perbill":512254903,"support_perbill":5213751,"approval":51.2254903,"support":0.5213751},{"time_hours":399,"approval_perbill":511029412,"support_perbill":5182035,"approval":51.1029412,"support":0.5182035},{"time_hours":400,"approval_perbill":509803922,"support_perbill":5150474,"approval":50.9803922,"support":0.5150474},{"time_hours":401,"approval_perbill":508578432,"support_perbill":5119067,"approval":50.8578432,"support":0.5119067},{"time_hours":402,"approval_perbill":507352942,"support_perbill":5087812,"approval":50.7352942,"support":0.5087812},{"time_hours":403,"approval_perbill":506127452,"support_perbill":5056708,"approval":50.6127452,"support":0.5056708},{"time_hours":404,"approval_perbill":504901961,"support_perbill":5025754,"approval":50.4901961,"support":0.5025754},{"time_hours":405,"approval_perbill":503676471,"support_perbill":4994949,"approval":50.3676471,"support":0.4994949},{"time_hours":406,"approval_perbill":502450981,"support_perbill":4964292,"approval":50.2450981,"support":0.4964292},{"time_hours":407,"approval_perbill":501225491,"support_perbill":4933782,"approval":50.1225491,"support":0.4933782},{"time_hours":408,"approval_perbill":500000000,"support_perbill":4903417,"approval":50,"support":0.4903417},{"time_hours":409,"approval_perbill":500000000,"support_perbill":4873198,"approval":50,"support":0.4873198},{"time_hours":410,"approval_perbill":500000000,"support_perbill":4843122,"approval":50,"support":0.4843122},{"time_hours":411,"approval_perbill":500000000,"support_perbill":4813189,"approval":50,"support":0.4813189},{"time_hours":412,"approval_perbill":500000000,"support_perbill":4783398,"approval":50,"support":0.4783398},{"time_hours":413,"approval_perbill":500000000,"support_perbill":4753747,"approval":50,"support":0.4753747},{"time_hours":414,"approval_perbill":500000000,"support_perbill":4724236,"approval":50,"support":0.4724236},{"time_hours":415,"approval_perbill":500000000,"support_perbill":4694864,"approval":50,"support":0.4694864},{"time_hours":416,"approval_perbill":500000000,"support_perbill":4665630,"approval":50,"support":0.466563},{"time_hours":417,"approval_perbill":500000000,"support_perbill":4636532,"approval":50,"support":0.4636532},{"time_hours":418,"approval_perbill":500000000,"support_perbill":4607570,"approval":50,"support":0.460757},{"time_hours":419,"approval_perbill":500000000,"support_perbill":4578743,"approval":50,"support":0.4578743},{"time_hours":420,"approval_perbill":500000000,"support_perbill":4550050,"approval":50,"support":0.455005},{"time_hours":421,"approval_perbill":500000000,"support_perbill":4521490,"approval":50,"support":0.452149},{"time_hours":422,"approval_perbill":500000000,"support_perbill":4493062,"approval":50,"support":0.4493062},{"time_hours":423,"approval_perbill":500000000,"support_perbill":4464766,"approval":50,"support":0.4464766},{"time_hours":424,"approval_perbill":500000000,"support_perbill":4436599,"approval":50,"support":0.4436599},{"time_hours":425,"approval_perbill":500000000,"support_perbill":4408562,"approval":50,"support":0.4408562},{"time_hours":426,"approval_perbill":500000000,"support_perbill":4380654,"approval":50,"support":0.4380654},{"time_hours":427,"approval_perbill":500000000,"support_perbill":4352873,"approval":50,"support":0.4352873},{"time_hours":428,"approval_perbill":500000000,"support_perbill":4325218,"approval":50,"support":0.4325218},{"time_hours":429,"approval_perbill":500000000,"support_perbill":4297690,"approval":50,"support":0.429769},{"time_hours":430,"approval_perbill":500000000,"support_perbill":4270287,"approval":50,"support":0.4270287},{"time_hours":431,"approval_perbill":500000000,"support_perbill":4243007,"approval":50,"support":0.4243007},{"time_hours":432,"approval_perbill":500000000,"support_perbill":4215851,"approval":50,"support":0.4215851},{"time_hours":433,"approval_perbill":500000000,"support_perbill":4188818,"approval":50,"support":0.4188818},{"time_hours":434,"approval_perbill":500000000,"support_perbill":4161906,"approval":50,"support":0.4161906},{"time_hours":435,"approval_perbill":500000000,"support_perbill":4135115,"approval":50,"support":0.4135115},{"time_hours":436,"approval_perbill":500000000,"support_perbill":4108444,"approval":50,"support":0.4108444},{"time_hours":437,"approval_perbill":500000000,"support_perbill":4081892,"approval":50,"support":0.4081892},{"time_hours":438,"approval_perbill":500000000,"support_perbill":4055459,"approval":50,"support":0.4055459},{"time_hours":439,"approval_perbill":500000000,"support_perbill":4029143,"approval":50,"support":0.4029143},{"time_hours":440,"approval_perbill":500000000,"support_perbill":4002944,"approval":50,"support":0.4002944},{"time_hours":441,"approval_perbill":500000000,"support_perbill":3976862,"approval":50,"support":0.3976862},{"time_hours":442,"approval_perbill":500000000,"support_perbill":3950894,"approval":50,"support":0.3950894},{"time_hours":443,"approval_perbill":500000000,"support_perbill":3925041,"approval":50,"support":0.3925041},{"time_hours":444,"approval_perbill":500000000,"support_perbill":3899302,"approval":50,"support":0.3899302},{"time_hours":445,"approval_perbill":500000000,"support_perbill":3873676,"approval":50,"support":0.3873676},{"time_hours":446,"approval_perbill":500000000,"support_perbill":3848162,"approval":50,"support":0.3848162},{"time_hours":447,"approval_perbill":500000000,"support_perbill":3822760,"approval":50,"support":0.382276},{"time_hours":448,"approval_perbill":500000000,"support_perbill":3797468,"approval":50,"support":0.3797468},{"time_hours":449,"approval_perbill":500000000,"support_perbill":3772287,"approval":50,"support":0.3772287},{"time_hours":450,"approval_perbill":500000000,"support_perbill":3747215,"approval":50,"support":0.3747215},{"time_hours":451,"approval_perbill":500000000,"support_perbill":3722251,"approval":50,"support":0.3722251},{"time_hours":452,"approval_perbill":500000000,"support_perbill":3697396,"approval":50,"support":0.3697396},{"time_hours":453,"approval_perbill":500000000,"support_perbill":3672648,"approval":50,"support":0.3672648},{"time_hours":454,"approval_perbill":500000000,"support_perbill":3648006,"approval":50,"support":0.3648006},{"time_hours":455,"approval_perbill":500000000,"support_perbill":3623471,"approval":50,"support":0.3623471},{"time_hours":456,"approval_perbill":500000000,"support_perbill":3599040,"approval":50,"support":0.359904},{"time_hours":457,"approval_perbill":500000000,"support_perbill":3574714,"approval":50,"support":0.3574714},{"time_hours":458,"approval_perbill":500000000,"support_perbill":3550492,"approval":50,"support":0.3550492},{"time_hours":459,"approval_perbill":500000000,"support_perbill":3526373,"approval":50,"support":0.3526373},{"time_hours":460,"approval_perbill":500000000,"support_perbill":3502357,"approval":50,"support":0.3502357},{"time_hours":461,"approval_perbill":500000000,"support_perbill":3478442,"approval":50,"support":0.3478442},{"time_hours":462,"approval_perbill":500000000,"support_perbill":3454629,"approval":50,"support":0.3454629},{"time_hours":463,"approval_perbill":500000000,"support_perbill":3430916,"approval":50,"support":0.3430916},{"time_hours":464,"approval_perbill":500000000,"support_perbill":3407304,"approval":50,"support":0.3407304},{"time_hours":465,"approval_perbill":500000000,"support_perbill":3383790,"approval":50,"support":0.338379},{"time_hours":466,"approval_perbill":500000000,"support_perbill":3360376,"approval":50,"support":0.3360376},{"time_hours":467,"approval_perbill":500000000,"support_perbill":3337059,"approval":50,"support":0.3337059},{"time_hours":468,"approval_perbill":500000000,"support_perbill":3313840,"approval":50,"support":0.331384},{"time_hours":469,"approval_perbill":500000000,"support_perbill":3290718,"approval":50,"support":0.3290718},{"time_hours":470,"approval_perbill":500000000,"support_perbill":3267692,"approval":50,"support":0.3267692},{"time_hours":471,"approval_perbill":500000000,"support_perbill":3244761,"approval":50,"support":0.3244761},{"time_hours":472,"approval_perbill":500000000,"support_perbill":3221926,"approval":50,"support":0.3221926},{"time_hours":473,"approval_perbill":500000000,"support_perbill":3199185,"approval":50,"support":0.3199185},{"time_hours":474,"approval_perbill":500000000,"support_perbill":3176538,"approval":50,"support":0.3176538},{"time_hours":475,"approval_perbill":500000000,"support_perbill":3153985,"approval":50,"support":0.3153985},{"time_hours":476,"approval_perbill":500000000,"support_perbill":3131524,"approval":50,"support":0.3131524},{"time_hours":477,"approval_perbill":500000000,"support_perbill":3109155,"approval":50,"support":0.3109155},{"time_hours":478,"approval_perbill":500000000,"support_perbill":3086878,"approval":50,"support":0.3086878},{"time_hours":479,"approval_perbill":500000000,"support_perbill":3064692,"approval":50,"support":0.3064692},{"time_hours":480,"approval_perbill":500000000,"support_perbill":3042596,"approval":50,"support":0.3042596},{"time_hours":481,"approval_perbill":500000000,"support_perbill":3020590,"approval":50,"support":0.302059},{"time_hours":482,"approval_perbill":500000000,"support_perbill":2998674,"approval":50,"support":0.2998674},{"time_hours":483,"approval_perbill":500000000,"support_perbill":2976847,"approval":50,"support":0.2976847},{"time_hours":484,"approval_perbill":500000000,"support_perbill":2955107,"approval":50,"support":0.2955107},{"time_hours":485,"approval_perbill":500000000,"support_perbill":2933456,"approval":50,"support":0.2933456},{"time_hours":486,"approval_perbill":500000000,"support_perbill":2911892,"approval":50,"support":0.2911892},{"time_hours":487,"approval_perbill":500000000,"support_perbill":2890414,"approval":50,"support":0.2890414},{"time_hours":488,"approval_perbill":500000000,"support_perbill":2869023,"approval":50,"support":0.2869023},{"time_hours":489,"approval_perbill":500000000,"support_perbill":2847717,"approval":50,"support":0.2847717},{"time_hours":490,"approval_perbill":500000000,"support_perbill":2826496,"approval":50,"support":0.2826496},{"time_hours":491,"approval_perbill":500000000,"support_perbill":2805360,"approval":50,"support":0.280536},{"time_hours":492,"approval_perbill":500000000,"support_perbill":2784309,"approval":50,"support":0.2784309},{"time_hours":493,"approval_perbill":500000000,"support_perbill":2763341,"approval":50,"support":0.2763341},{"time_hours":494,"approval_perbill":500000000,"support_perbill":2742455,"approval":50,"support":0.2742455},{"time_hours":495,"approval_perbill":500000000,"support_perbill":2721653,"approval":50,"support":0.2721653},{"time_hours":496,"approval_perbill":500000000,"support_perbill":2700933,"approval":50,"support":0.2700933},{"time_hours":497,"approval_perbill":500000000,"support_perbill":2680294,"approval":50,"support":0.2680294},{"time_hours":498,"approval_perbill":500000000,"support_perbill":2659737,"approval":50,"support":0.2659737},{"time_hours":499,"approval_perbill":500000000,"support_perbill":2639260,"approval":50,"support":0.263926},{"time_hours":500,"approval_perbill":500000000,"support_perbill":2618864,"approval":50,"support":0.2618864},{"time_hours":501,"approval_perbill":500000000,"support_perbill":2598547,"approval":50,"support":0.2598547},{"time_hours":502,"approval_perbill":500000000,"support_perbill":2578310,"approval":50,"support":0.257831},{"time_hours":503,"approval_perbill":500000000,"support_perbill":2558151,"approval":50,"support":0.2558151},{"time_hours":504,"approval_perbill":500000000,"support_perbill":2538071,"approval":50,"support":0.2538071},{"time_hours":505,"approval_perbill":500000000,"support_perbill":2518069,"approval":50,"support":0.2518069},{"time_hours":506,"approval_perbill":500000000,"support_perbill":2498144,"approval":50,"support":0.2498144},{"time_hours":507,"approval_perbill":500000000,"support_perbill":2478296,"approval":50,"support":0.2478296},{"time_hours":508,"approval_perbill":500000000,"support_perbill":2458525,"approval":50,"support":0.2458525},{"time_hours":509,"approval_perbill":500000000,"support_perbill":2438830,"approval":50,"support":0.243883},{"time_hours":510,"approval_perbill":500000000,"support_perbill":2419210,"approval":50,"support":0.241921},{"time_hours":511,"approval_perbill":500000000,"support_perbill":2399666,"approval":50,"support":0.2399666},{"time_hours":512,"approval_perbill":500000000,"support_perbill":2380197,"approval":50,"support":0.2380197},{"time_hours":513,"approval_perbill":500000000,"support_perbill":2360802,"approval":50,"support":0.2360802},{"time_hours":514,"approval_perbill":500000000,"support_perbill":2341481,"approval":50,"support":0.2341481},{"time_hours":515,"approval_perbill":500000000,"support_perbill":2322233,"approval":50,"support":0.2322233},{"time_hours":516,"approval_perbill":500000000,"support_perbill":2303059,"approval":50,"support":0.2303059},{"time_hours":517,"approval_perbill":500000000,"support_perbill":2283957,"approval":50,"support":0.2283957},{"time_hours":518,"approval_perbill":500000000,"support_perbill":2264928,"approval":50,"support":0.2264928},{"time_hours":519,"approval_perbill":500000000,"support_perbill":2245970,"approval":50,"support":0.224597},{"time_hours":520,"approval_perbill":500000000,"support_perbill":2227084,"approval":50,"support":0.2227084},{"time_hours":521,"approval_perbill":500000000,"support_perbill":2208269,"approval":50,"support":0.2208269},{"time_hours":522,"approval_perbill":500000000,"support_perbill":2189525,"approval":50,"support":0.2189525},{"time_hours":523,"approval_perbill":500000000,"support_perbill":2170851,"approval":50,"support":0.2170851},{"time_hours":524,"approval_perbill":500000000,"support_perbill":2152247,"approval":50,"support":0.2152247},{"time_hours":525,"approval_perbill":500000000,"support_perbill":2133712,"approval":50,"support":0.2133712},{"time_hours":526,"approval_perbill":500000000,"support_perbill":2115247,"approval":50,"support":0.2115247},{"time_hours":527,"approval_perbill":500000000,"support_perbill":2096850,"approval":50,"support":0.209685},{"time_hours":528,"approval_perbill":500000000,"support_perbill":2078522,"approval":50,"support":0.2078522},{"time_hours":529,"approval_perbill":500000000,"support_perbill":2060261,"approval":50,"support":0.2060261},{"time_hours":530,"approval_perbill":500000000,"support_perbill":2042068,"approval":50,"support":0.2042068},{"time_hours":531,"approval_perbill":500000000,"support_perbill":2023943,"approval":50,"support":0.2023943},{"time_hours":532,"approval_perbill":500000000,"support_perbill":2005884,"approval":50,"support":0.2005884},{"time_hours":533,"approval_perbill":500000000,"support_perbill":1987891,"approval":50,"support":0.1987891},{"time_hours":534,"approval_perbill":500000000,"support_perbill":1969965,"approval":50,"support":0.1969965},{"time_hours":535,"approval_perbill":500000000,"support_perbill":1952104,"approval":50,"support":0.1952104},{"time_hours":536,"approval_perbill":500000000,"support_perbill":1934309,"approval":50,"support":0.1934309},{"time_hours":537,"approval_perbill":500000000,"support_perbill":1916579,"approval":50,"support":0.1916579},{"time_hours":538,"approval_perbill":500000000,"support_perbill":1898913,"approval":50,"support":0.1898913},{"time_hours":539,"approval_perbill":500000000,"support_perbill":1881312,"approval":50,"support":0.1881312},{"time_hours":540,"approval_perbill":500000000,"support_perbill":1863775,"approval":50,"support":0.1863775},{"time_hours":541,"approval_perbill":500000000,"support_perbill":1846301,"approval":50,"support":0.1846301},{"time_hours":542,"approval_perbill":500000000,"support_perbill":1828891,"approval":50,"support":0.1828891},{"time_hours":543,"approval_perbill":500000000,"support_perbill":1811543,"approval":50,"support":0.1811543},{"time_hours":544,"approval_perbill":500000000,"support_perbill":1794258,"approval":50,"support":0.1794258},{"time_hours":545,"approval_perbill":500000000,"support_perbill":1777036,"approval":50,"support":0.1777036},{"time_hours":546,"approval_perbill":500000000,"support_perbill":1759875,"approval":50,"support":0.1759875},{"time_hours":547,"approval_perbill":500000000,"support_perbill":1742775,"approval":50,"support":0.1742775},{"time_hours":548,"approval_perbill":500000000,"support_perbill":1725737,"approval":50,"support":0.1725737},{"time_hours":549,"approval_perbill":500000000,"support_perbill":1708760,"approval":50,"support":0.170876},{"time_hours":550,"approval_perbill":500000000,"support_perbill":1691844,"approval":50,"support":0.1691844},{"time_hours":551,"approval_perbill":500000000,"support_perbill":1674988,"approval":50,"support":0.1674988},{"time_hours":552,"approval_perbill":500000000,"support_perbill":1658191,"approval":50,"support":0.1658191},{"time_hours":553,"approval_perbill":500000000,"support_perbill":1641455,"approval":50,"support":0.1641455},{"time_hours":554,"approval_perbill":500000000,"support_perbill":1624777,"approval":50,"support":0.1624777},{"time_hours":555,"approval_perbill":500000000,"support_perbill":1608159,"approval":50,"support":0.1608159},{"time_hours":556,"approval_perbill":500000000,"support_perbill":1591599,"approval":50,"support":0.1591599},{"time_hours":557,"approval_perbill":500000000,"support_perbill":1575098,"approval":50,"support":0.1575098},{"time_hours":558,"approval_perbill":500000000,"support_perbill":1558654,"approval":50,"support":0.1558654},{"time_hours":559,"approval_perbill":500000000,"support_perbill":1542269,"approval":50,"support":0.1542269},{"time_hours":560,"approval_perbill":500000000,"support_perbill":1525941,"approval":50,"support":0.1525941},{"time_hours":561,"approval_perbill":500000000,"support_perbill":1509670,"approval":50,"support":0.150967},{"time_hours":562,"approval_perbill":500000000,"support_perbill":1493456,"approval":50,"support":0.1493456},{"time_hours":563,"approval_perbill":500000000,"support_perbill":1477298,"approval":50,"support":0.1477298},{"time_hours":564,"approval_perbill":500000000,"support_perbill":1461197,"approval":50,"support":0.1461197},{"time_hours":565,"approval_perbill":500000000,"support_perbill":1445152,"approval":50,"support":0.1445152},{"time_hours":566,"approval_perbill":500000000,"support_perbill":1429162,"approval":50,"support":0.1429162},{"time_hours":567,"approval_perbill":500000000,"support_perbill":1413228,"approval":50,"support":0.1413228},{"time_hours":568,"approval_perbill":500000000,"support_perbill":1397348,"approval":50,"support":0.1397348},{"time_hours":569,"approval_perbill":500000000,"support_perbill":1381524,"approval":50,"support":0.1381524},{"time_hours":570,"approval_perbill":500000000,"support_perbill":1365754,"approval":50,"support":0.1365754},{"time_hours":571,"approval_perbill":500000000,"support_perbill":1350039,"approval":50,"support":0.1350039},{"time_hours":572,"approval_perbill":500000000,"support_perbill":1334377,"approval":50,"support":0.1334377},{"time_hours":573,"approval_perbill":500000000,"support_perbill":1318769,"approval":50,"support":0.1318769},{"time_hours":574,"approval_perbill":500000000,"support_perbill":1303214,"approval":50,"support":0.1303214},{"time_hours":575,"approval_perbill":500000000,"support_perbill":1287713,"approval":50,"support":0.1287713},{"time_hours":576,"approval_perbill":500000000,"support_perbill":1272264,"approval":50,"support":0.1272264},{"time_hours":577,"approval_perbill":500000000,"support_perbill":1256869,"approval":50,"support":0.1256869},{"time_hours":578,"approval_perbill":500000000,"support_perbill":1241525,"approval":50,"support":0.1241525},{"time_hours":579,"approval_perbill":500000000,"support_perbill":1226233,"approval":50,"support":0.1226233},{"time_hours":580,"approval_perbill":500000000,"support_perbill":1210994,"approval":50,"support":0.1210994},{"time_hours":581,"approval_perbill":500000000,"support_perbill":1195805,"approval":50,"support":0.1195805},{"time_hours":582,"approval_perbill":500000000,"support_perbill":1180668,"approval":50,"support":0.1180668},{"time_hours":583,"approval_perbill":500000000,"support_perbill":1165582,"approval":50,"support":0.1165582},{"time_hours":584,"approval_perbill":500000000,"support_perbill":1150547,"approval":50,"support":0.1150547},{"time_hours":585,"approval_perbill":500000000,"support_perbill":1135563,"approval":50,"support":0.1135563},{"time_hours":586,"approval_perbill":500000000,"support_perbill":1120628,"approval":50,"support":0.1120628},{"time_hours":587,"approval_perbill":500000000,"support_perbill":1105744,"approval":50,"support":0.1105744},{"time_hours":588,"approval_perbill":500000000,"support_perbill":1090909,"approval":50,"support":0.1090909},{"time_hours":589,"approval_perbill":500000000,"support_perbill":1076124,"approval":50,"support":0.1076124},{"time_hours":590,"approval_perbill":500000000,"support_perbill":1061388,"approval":50,"support":0.1061388},{"time_hours":591,"approval_perbill":500000000,"support_perbill":1046701,"approval":50,"support":0.1046701},{"time_hours":592,"approval_perbill":500000000,"support_perbill":1032063,"approval":50,"support":0.1032063},{"time_hours":593,"approval_perbill":500000000,"support_perbill":1017473,"approval":50,"support":0.1017473},{"time_hours":594,"approval_perbill":500000000,"support_perbill":1002932,"approval":50,"support":0.1002932},{"time_hours":595,"approval_perbill":500000000,"support_perbill":988438,"approval":50,"support":0.0988438},{"time_hours":596,"approval_perbill":500000000,"support_perbill":973993,"approval":50,"support":0.0973993},{"time_hours":597,"approval_perbill":500000000,"support_perbill":959595,"approval":50,"support":0.0959595},{"time_hours":598,"approval_perbill":500000000,"support_perbill":945244,"approval":50,"support":0.0945244},{"time_hours":599,"approval_perbill":500000000,"support_perbill":930940,"approval":50,"support":0.093094},{"time_hours":600,"approval_perbill":500000000,"support_perbill":916684,"approval":50,"support":0.0916684},{"time_hours":601,"approval_perbill":500000000,"support_perbill":902473,"approval":50,"support":0.0902473},{"time_hours":602,"approval_perbill":500000000,"support_perbill":888310,"approval":50,"support":0.088831},{"time_hours":603,"approval_perbill":500000000,"support_perbill":874192,"approval":50,"support":0.0874192},{"time_hours":604,"approval_perbill":500000000,"support_perbill":860121,"approval":50,"support":0.0860121},{"time_hours":605,"approval_perbill":500000000,"support_perbill":846095,"approval":50,"support":0.0846095},{"time_hours":606,"approval_perbill":500000000,"support_perbill":832114,"approval":50,"support":0.0832114},{"time_hours":607,"approval_perbill":500000000,"support_perbill":818179,"approval":50,"support":0.0818179},{"time_hours":608,"approval_perbill":500000000,"support_perbill":804289,"approval":50,"support":0.0804289},{"time_hours":609,"approval_perbill":500000000,"support_perbill":790444,"approval":50,"support":0.0790444},{"time_hours":610,"approval_perbill":500000000,"support_perbill":776644,"approval":50,"support":0.0776644},{"time_hours":611,"approval_perbill":500000000,"support_perbill":762888,"approval":50,"support":0.0762888},{"time_hours":612,"approval_perbill":500000000,"support_perbill":749176,"approval":50,"support":0.0749176},{"time_hours":613,"approval_perbill":500000000,"support_perbill":735508,"approval":50,"support":0.0735508},{"time_hours":614,"approval_perbill":500000000,"support_perbill":721884,"approval":50,"support":0.0721884},{"time_hours":615,"approval_perbill":500000000,"support_perbill":708303,"approval":50,"support":0.0708303},{"time_hours":616,"approval_perbill":500000000,"support_perbill":694766,"approval":50,"support":0.0694766},{"time_hours":617,"approval_perbill":500000000,"support_perbill":681272,"approval":50,"support":0.0681272},{"time_hours":618,"approval_perbill":500000000,"support_perbill":667821,"approval":50,"support":0.0667821},{"time_hours":619,"approval_perbill":500000000,"support_perbill":654412,"approval":50,"support":0.0654412},{"time_hours":620,"approval_perbill":500000000,"support_perbill":641047,"approval":50,"support":0.0641047},{"time_hours":621,"approval_perbill":500000000,"support_perbill":627723,"approval":50,"support":0.0627723},{"time_hours":622,"approval_perbill":500000000,"support_perbill":614442,"approval":50,"support":0.0614442},{"time_hours":623,"approval_perbill":500000000,"support_perbill":601202,"approval":50,"support":0.0601202},{"time_hours":624,"approval_perbill":500000000,"support_perbill":588005,"approval":50,"support":0.0588005},{"time_hours":625,"approval_perbill":500000000,"support_perbill":574848,"approval":50,"support":0.0574848},{"time_hours":626,"approval_perbill":500000000,"support_perbill":561734,"approval":50,"support":0.0561734},{"time_hours":627,"approval_perbill":500000000,"support_perbill":548660,"approval":50,"support":0.054866},{"time_hours":628,"approval_perbill":500000000,"support_perbill":535627,"approval":50,"support":0.0535627},{"time_hours":629,"approval_perbill":500000000,"support_perbill":522635,"approval":50,"support":0.0522635},{"time_hours":630,"approval_perbill":500000000,"support_perbill":509684,"approval":50,"support":0.0509684},{"time_hours":631,"approval_perbill":500000000,"support_perbill":496773,"approval":50,"support":0.0496773},{"time_hours":632,"approval_perbill":500000000,"support_perbill":483902,"approval":50,"support":0.0483902},{"time_hours":633,"approval_perbill":500000000,"support_perbill":471071,"approval":50,"support":0.0471071},{"time_hours":634,"approval_perbill":500000000,"support_perbill":458280,"approval":50,"support":0.045828},{"time_hours":635,"approval_perbill":500000000,"support_perbill":445529,"approval":50,"support":0.0445529},{"time_hours":636,"approval_perbill":500000000,"support_perbill":432817,"approval":50,"support":0.0432817},{"time_hours":637,"approval_perbill":500000000,"support_perbill":420144,"approval":50,"support":0.0420144},{"time_hours":638,"approval_perbill":500000000,"support_perbill":407511,"approval":50,"support":0.0407511},{"time_hours":639,"approval_perbill":500000000,"support_perbill":394916,"approval":50,"support":0.0394916},{"time_hours":640,"approval_perbill":500000000,"support_perbill":382360,"approval":50,"support":0.038236},{"time_hours":641,"approval_perbill":500000000,"support_perbill":369843,"approval":50,"support":0.0369843},{"time_hours":642,"approval_perbill":500000000,"support_perbill":357364,"approval":50,"support":0.0357364},{"time_hours":643,"approval_perbill":500000000,"support_perbill":344923,"approval":50,"support":0.0344923},{"time_hours":644,"approval_perbill":500000000,"support_perbill":332520,"approval":50,"support":0.033252},{"time_hours":645,"approval_perbill":500000000,"support_perbill":320155,"approval":50,"support":0.0320155},{"time_hours":646,"approval_perbill":500000000,"support_perbill":307828,"approval":50,"support":0.0307828},{"time_hours":647,"approval_perbill":500000000,"support_perbill":295538,"approval":50,"support":0.0295538},{"time_hours":648,"approval_perbill":500000000,"support_perbill":283286,"approval":50,"support":0.0283286},{"time_hours":649,"approval_perbill":500000000,"support_perbill":271071,"approval":50,"support":0.0271071},{"time_hours":650,"approval_perbill":500000000,"support_perbill":258892,"approval":50,"support":0.0258892},{"time_hours":651,"approval_perbill":500000000,"support_perbill":246751,"approval":50,"support":0.0246751},{"time_hours":652,"approval_perbill":500000000,"support_perbill":234646,"approval":50,"support":0.0234646},{"time_hours":653,"approval_perbill":500000000,"support_perbill":222578,"approval":50,"support":0.0222578},{"time_hours":654,"approval_perbill":500000000,"support_perbill":210546,"approval":50,"support":0.0210546},{"time_hours":655,"approval_perbill":500000000,"support_perbill":198550,"approval":50,"support":0.019855},{"time_hours":656,"approval_perbill":500000000,"support_perbill":186590,"approval":50,"support":0.018659},{"time_hours":657,"approval_perbill":500000000,"support_perbill":174666,"approval":50,"support":0.0174666},{"time_hours":658,"approval_perbill":500000000,"support_perbill":162778,"approval":50,"support":0.0162778},{"time_hours":659,"approval_perbill":500000000,"support_perbill":150925,"approval":50,"support":0.0150925},{"time_hours":660,"approval_perbill":500000000,"support_perbill":139108,"approval":50,"support":0.0139108},{"time_hours":661,"approval_perbill":500000000,"support_perbill":127326,"approval":50,"support":0.0127326},{"time_hours":662,"approval_perbill":500000000,"support_perbill":115578,"approval":50,"support":0.0115578},{"time_hours":663,"approval_perbill":500000000,"support_perbill":103866,"approval":50,"support":0.0103866},{"time_hours":664,"approval_perbill":500000000,"support_perbill":92188,"approval":50,"support":0.0092188},{"time_hours":665,"approval_perbill":500000000,"support_perbill":80545,"approval":50,"support":0.0080545},{"time_hours":666,"approval_perbill":500000000,"support_perbill":68937,"approval":50,"support":0.0068937},{"time_hours":667,"approval_perbill":500000000,"support_perbill":57363,"approval":50,"support":0.0057363},{"time_hours":668,"approval_perbill":500000000,"support_perbill":45822,"approval":50,"support":0.0045822},{"time_hours":669,"approval_perbill":500000000,"support_perbill":34316,"approval":50,"support":0.0034316},{"time_hours":670,"approval_perbill":500000000,"support_perbill":22844,"approval":50,"support":0.0022844},{"time_hours":671,"approval_perbill":500000000,"support_perbill":11405,"approval":50,"support":0.0011405},{"time_hours":672,"approval_perbill":500000000,"support_perbill":0,"approval":50,"support":0}]')},39379:p=>{"use strict";p.exports=JSON.parse('[{"time_hours":0,"approval_perbill":1000000000,"support_perbill":500000000,"approval":100,"support":50},{"time_hours":1,"approval_perbill":997037038,"support_perbill":491215228,"approval":99.7037038,"support":49.1215228},{"time_hours":2,"approval_perbill":994100296,"support_perbill":482708936,"approval":99.4100296,"support":48.2708936},{"time_hours":3,"approval_perbill":991189429,"support_perbill":474468089,"approval":99.1189429,"support":47.4468089},{"time_hours":4,"approval_perbill":988304096,"support_perbill":466480452,"approval":98.8304096,"support":46.6480452},{"time_hours":5,"approval_perbill":985443960,"support_perbill":458734526,"approval":98.544396,"support":45.8734526},{"time_hours":6,"approval_perbill":982608697,"support_perbill":451219514,"approval":98.2608697,"support":45.1219514},{"time_hours":7,"approval_perbill":979797981,"support_perbill":443925237,"approval":97.9797981,"support":44.3925237},{"time_hours":8,"approval_perbill":977011496,"support_perbill":436842109,"approval":97.7011496,"support":43.6842109},{"time_hours":9,"approval_perbill":974248928,"support_perbill":429961090,"approval":97.4248928,"support":42.996109},{"time_hours":10,"approval_perbill":971509972,"support_perbill":423273659,"approval":97.1509972,"support":42.3273659},{"time_hours":11,"approval_perbill":968794328,"support_perbill":416771755,"approval":96.8794328,"support":41.6771755},{"time_hours":12,"approval_perbill":966101697,"support_perbill":410447765,"approval":96.6101697,"support":41.0447765},{"time_hours":13,"approval_perbill":963431787,"support_perbill":404294479,"approval":96.3431787,"support":40.4294479},{"time_hours":14,"approval_perbill":960784315,"support_perbill":398305086,"approval":96.0784315,"support":39.8305086},{"time_hours":15,"approval_perbill":958158997,"support_perbill":392473120,"approval":95.8158997,"support":39.247312},{"time_hours":16,"approval_perbill":955555557,"support_perbill":386792456,"approval":95.5555557,"support":38.6792456},{"time_hours":17,"approval_perbill":952973721,"support_perbill":381257276,"approval":95.2973721,"support":38.1257276},{"time_hours":18,"approval_perbill":950413224,"support_perbill":375862070,"approval":95.0413224,"support":37.586207},{"time_hours":19,"approval_perbill":947873801,"support_perbill":370601591,"approval":94.7873801,"support":37.0601591},{"time_hours":20,"approval_perbill":945355193,"support_perbill":365470854,"approval":94.5355193,"support":36.5470854},{"time_hours":21,"approval_perbill":942857143,"support_perbill":360465116,"approval":94.2857143,"support":36.0465116},{"time_hours":22,"approval_perbill":940379404,"support_perbill":355579869,"approval":94.0379404,"support":35.5579869},{"time_hours":23,"approval_perbill":937921728,"support_perbill":350810812,"approval":93.7921728,"support":35.0810812},{"time_hours":24,"approval_perbill":935483872,"support_perbill":346153848,"approval":93.5483872,"support":34.6153848},{"time_hours":25,"approval_perbill":933065598,"support_perbill":341605071,"approval":93.3065598,"support":34.1605071},{"time_hours":26,"approval_perbill":930666667,"support_perbill":337160752,"approval":93.0666667,"support":33.7160752},{"time_hours":27,"approval_perbill":928286854,"support_perbill":332817338,"approval":92.8286854,"support":33.2817338},{"time_hours":28,"approval_perbill":925925927,"support_perbill":328571430,"approval":92.5925927,"support":32.857143},{"time_hours":29,"approval_perbill":923583664,"support_perbill":324419780,"approval":92.3583664,"support":32.441978},{"time_hours":30,"approval_perbill":921259843,"support_perbill":320359282,"approval":92.1259843,"support":32.0359282},{"time_hours":31,"approval_perbill":918954249,"support_perbill":316386970,"approval":91.8954249,"support":31.638697},{"time_hours":32,"approval_perbill":916666668,"support_perbill":312500001,"approval":91.6666668,"support":31.2500001},{"time_hours":33,"approval_perbill":914396889,"support_perbill":308695654,"approval":91.4396889,"support":30.8695654},{"time_hours":34,"approval_perbill":912144703,"support_perbill":304971319,"approval":91.2144703,"support":30.4971319},{"time_hours":35,"approval_perbill":909909911,"support_perbill":301324504,"approval":90.9909911,"support":30.1324504},{"time_hours":36,"approval_perbill":907692309,"support_perbill":297752810,"approval":90.7692309,"support":29.775281},{"time_hours":37,"approval_perbill":905491700,"support_perbill":294253940,"approval":90.54917,"support":29.425394},{"time_hours":38,"approval_perbill":903307888,"support_perbill":290825688,"approval":90.3307888,"support":29.0825688},{"time_hours":39,"approval_perbill":901140685,"support_perbill":287465940,"approval":90.1140685,"support":28.746594},{"time_hours":40,"approval_perbill":898989900,"support_perbill":284172663,"approval":89.89899,"support":28.4172663},{"time_hours":41,"approval_perbill":896855347,"support_perbill":280943902,"approval":89.6855347,"support":28.0943902},{"time_hours":42,"approval_perbill":894736842,"support_perbill":277777777,"approval":89.4736842,"support":27.7777777},{"time_hours":43,"approval_perbill":892634208,"support_perbill":274672489,"approval":89.2634208,"support":27.4672489},{"time_hours":44,"approval_perbill":890547265,"support_perbill":271626298,"approval":89.0547265,"support":27.1626298},{"time_hours":45,"approval_perbill":888475838,"support_perbill":268637533,"approval":88.8475838,"support":26.8637533},{"time_hours":46,"approval_perbill":886419755,"support_perbill":265704586,"approval":88.6419755,"support":26.5704586},{"time_hours":47,"approval_perbill":884378844,"support_perbill":262825904,"approval":88.4378844,"support":26.2825904},{"time_hours":48,"approval_perbill":882352942,"support_perbill":260000000,"approval":88.2352942,"support":26},{"time_hours":49,"approval_perbill":880341882,"support_perbill":257225434,"approval":88.0341882,"support":25.7225434},{"time_hours":50,"approval_perbill":878345500,"support_perbill":254500820,"approval":87.83455,"support":25.450082},{"time_hours":51,"approval_perbill":876363637,"support_perbill":251824817,"approval":87.6363637,"support":25.1824817},{"time_hours":52,"approval_perbill":874396136,"support_perbill":249196142,"approval":87.4396136,"support":24.9196142},{"time_hours":53,"approval_perbill":872442841,"support_perbill":246613547,"approval":87.2442841,"support":24.6613547},{"time_hours":54,"approval_perbill":870503599,"support_perbill":244075830,"approval":87.0503599,"support":24.407583},{"time_hours":55,"approval_perbill":868578256,"support_perbill":241581832,"approval":86.8578256,"support":24.1581832},{"time_hours":56,"approval_perbill":866666667,"support_perbill":239130435,"approval":86.6666667,"support":23.9130435},{"time_hours":57,"approval_perbill":864768684,"support_perbill":236720555,"approval":86.4768684,"support":23.6720555},{"time_hours":58,"approval_perbill":862884162,"support_perbill":234351146,"approval":86.2884162,"support":23.4351146},{"time_hours":59,"approval_perbill":861012957,"support_perbill":232021196,"approval":86.1012957,"support":23.2021196},{"time_hours":60,"approval_perbill":859154930,"support_perbill":229729730,"approval":85.915493,"support":22.972973},{"time_hours":61,"approval_perbill":857309942,"support_perbill":227475801,"approval":85.7309942,"support":22.7475801},{"time_hours":62,"approval_perbill":855477857,"support_perbill":225258494,"approval":85.5477857,"support":22.5258494},{"time_hours":63,"approval_perbill":853658537,"support_perbill":223076923,"approval":85.3658537,"support":22.3076923},{"time_hours":64,"approval_perbill":851851852,"support_perbill":220930232,"approval":85.1851852,"support":22.0930232},{"time_hours":65,"approval_perbill":850057671,"support_perbill":218817592,"approval":85.0057671,"support":21.8817592},{"time_hours":66,"approval_perbill":848275863,"support_perbill":216738198,"approval":84.8275863,"support":21.6738198},{"time_hours":67,"approval_perbill":846506302,"support_perbill":214691271,"approval":84.6506302,"support":21.4691271},{"time_hours":68,"approval_perbill":844748859,"support_perbill":212676056,"approval":84.4748859,"support":21.2676056},{"time_hours":69,"approval_perbill":843003414,"support_perbill":210691824,"approval":84.3003414,"support":21.0691824},{"time_hours":70,"approval_perbill":841269842,"support_perbill":208737865,"approval":84.1269842,"support":20.8737865},{"time_hours":71,"approval_perbill":839548024,"support_perbill":206813490,"approval":83.9548024,"support":20.681349},{"time_hours":72,"approval_perbill":837837838,"support_perbill":204918033,"approval":83.7837838,"support":20.4918033},{"time_hours":73,"approval_perbill":836139170,"support_perbill":203050847,"approval":83.613917,"support":20.3050847},{"time_hours":74,"approval_perbill":834451903,"support_perbill":201211306,"approval":83.4451903,"support":20.1211306},{"time_hours":75,"approval_perbill":832775921,"support_perbill":199398798,"approval":83.2775921,"support":19.9398798},{"time_hours":76,"approval_perbill":831111112,"support_perbill":197612732,"approval":83.1111112,"support":19.7612732},{"time_hours":77,"approval_perbill":829457365,"support_perbill":195852534,"approval":82.9457365,"support":19.5852534},{"time_hours":78,"approval_perbill":827814570,"support_perbill":194117647,"approval":82.781457,"support":19.4117647},{"time_hours":79,"approval_perbill":826182619,"support_perbill":192407528,"approval":82.6182619,"support":19.2407528},{"time_hours":80,"approval_perbill":824561404,"support_perbill":190721649,"approval":82.4561404,"support":19.0721649},{"time_hours":81,"approval_perbill":822950820,"support_perbill":189059501,"approval":82.295082,"support":18.9059501},{"time_hours":82,"approval_perbill":821350763,"support_perbill":187420585,"approval":82.1350763,"support":18.7420585},{"time_hours":83,"approval_perbill":819761130,"support_perbill":185804417,"approval":81.976113,"support":18.5804417},{"time_hours":84,"approval_perbill":818181818,"support_perbill":184210526,"approval":81.8181818,"support":18.4210526},{"time_hours":85,"approval_perbill":816612730,"support_perbill":182638457,"approval":81.661273,"support":18.2638457},{"time_hours":86,"approval_perbill":815053764,"support_perbill":181087763,"approval":81.5053764,"support":18.1087763},{"time_hours":87,"approval_perbill":813504824,"support_perbill":179558011,"approval":81.3504824,"support":17.9558011},{"time_hours":88,"approval_perbill":811965813,"support_perbill":178048781,"approval":81.1965813,"support":17.8048781},{"time_hours":89,"approval_perbill":810436635,"support_perbill":176559660,"approval":81.0436635,"support":17.655966},{"time_hours":90,"approval_perbill":808917198,"support_perbill":175090253,"approval":80.8917198,"support":17.5090253},{"time_hours":91,"approval_perbill":807407408,"support_perbill":173640167,"approval":80.7407408,"support":17.3640167},{"time_hours":92,"approval_perbill":805907174,"support_perbill":172209026,"approval":80.5907174,"support":17.2209026},{"time_hours":93,"approval_perbill":804416404,"support_perbill":170796460,"approval":80.4416404,"support":17.079646},{"time_hours":94,"approval_perbill":802935011,"support_perbill":169402110,"approval":80.2935011,"support":16.940211},{"time_hours":95,"approval_perbill":801462906,"support_perbill":168025626,"approval":80.1462906,"support":16.8025626},{"time_hours":96,"approval_perbill":800000001,"support_perbill":166666667,"approval":80.0000001,"support":16.6666667},{"time_hours":97,"approval_perbill":798546210,"support_perbill":165324899,"approval":79.854621,"support":16.5324899},{"time_hours":98,"approval_perbill":797101450,"support_perbill":164000000,"approval":79.710145,"support":16.4},{"time_hours":99,"approval_perbill":795665635,"support_perbill":162691652,"approval":79.5665635,"support":16.2691652},{"time_hours":100,"approval_perbill":794238684,"support_perbill":161399549,"approval":79.4238684,"support":16.1399549},{"time_hours":101,"approval_perbill":792820513,"support_perbill":160123387,"approval":79.2820513,"support":16.0123387},{"time_hours":102,"approval_perbill":791411043,"support_perbill":158862876,"approval":79.1411043,"support":15.8862876},{"time_hours":103,"approval_perbill":790010194,"support_perbill":157617728,"approval":79.0010194,"support":15.7617728},{"time_hours":104,"approval_perbill":788617887,"support_perbill":156387665,"approval":78.8617887,"support":15.6387665},{"time_hours":105,"approval_perbill":787234043,"support_perbill":155172413,"approval":78.7234043,"support":15.5172413},{"time_hours":106,"approval_perbill":785858586,"support_perbill":153971708,"approval":78.5858586,"support":15.3971708},{"time_hours":107,"approval_perbill":784491441,"support_perbill":152785289,"approval":78.4491441,"support":15.2785289},{"time_hours":108,"approval_perbill":783132531,"support_perbill":151612903,"approval":78.3132531,"support":15.1612903},{"time_hours":109,"approval_perbill":781781783,"support_perbill":150454303,"approval":78.1781783,"support":15.0454303},{"time_hours":110,"approval_perbill":780439122,"support_perbill":149309245,"approval":78.0439122,"support":14.9309245},{"time_hours":111,"approval_perbill":779104478,"support_perbill":148177496,"approval":77.9104478,"support":14.8177496},{"time_hours":112,"approval_perbill":777777779,"support_perbill":147058823,"approval":77.7777779,"support":14.7058823},{"time_hours":113,"approval_perbill":776458953,"support_perbill":145953003,"approval":77.6458953,"support":14.5953003},{"time_hours":114,"approval_perbill":775147929,"support_perbill":144859813,"approval":77.5147929,"support":14.4859813},{"time_hours":115,"approval_perbill":773844642,"support_perbill":143779039,"approval":77.3844642,"support":14.3779039},{"time_hours":116,"approval_perbill":772549020,"support_perbill":142710472,"approval":77.254902,"support":14.2710472},{"time_hours":117,"approval_perbill":771260998,"support_perbill":141653905,"approval":77.1260998,"support":14.1653905},{"time_hours":118,"approval_perbill":769980507,"support_perbill":140609137,"approval":76.9980507,"support":14.0609137},{"time_hours":119,"approval_perbill":768707484,"support_perbill":139575971,"approval":76.8707484,"support":13.9575971},{"time_hours":120,"approval_perbill":767441861,"support_perbill":138554217,"approval":76.7441861,"support":13.8554217},{"time_hours":121,"approval_perbill":766183576,"support_perbill":137543684,"approval":76.6183576,"support":13.7543684},{"time_hours":122,"approval_perbill":764932563,"support_perbill":136544190,"approval":76.4932563,"support":13.654419},{"time_hours":123,"approval_perbill":763688761,"support_perbill":135555555,"approval":76.3688761,"support":13.5555555},{"time_hours":124,"approval_perbill":762452108,"support_perbill":134577603,"approval":76.2452108,"support":13.4577603},{"time_hours":125,"approval_perbill":761222541,"support_perbill":133610161,"approval":76.1222541,"support":13.3610161},{"time_hours":126,"approval_perbill":760000000,"support_perbill":132653061,"approval":76,"support":13.2653061},{"time_hours":127,"approval_perbill":758784426,"support_perbill":131706138,"approval":75.8784426,"support":13.1706138},{"time_hours":128,"approval_perbill":757575758,"support_perbill":130769230,"approval":75.7575758,"support":13.076923},{"time_hours":129,"approval_perbill":756373938,"support_perbill":129842181,"approval":75.6373938,"support":12.9842181},{"time_hours":130,"approval_perbill":755178909,"support_perbill":128924833,"approval":75.5178909,"support":12.8924833},{"time_hours":131,"approval_perbill":753990611,"support_perbill":128017037,"approval":75.3990611,"support":12.8017037},{"time_hours":132,"approval_perbill":752808989,"support_perbill":127118644,"approval":75.2808989,"support":12.7118644},{"time_hours":133,"approval_perbill":751633988,"support_perbill":126229508,"approval":75.1633988,"support":12.6229508},{"time_hours":134,"approval_perbill":750465550,"support_perbill":125349487,"approval":75.046555,"support":12.5349487},{"time_hours":135,"approval_perbill":749303621,"support_perbill":124478442,"approval":74.9303621,"support":12.4478442},{"time_hours":136,"approval_perbill":748148149,"support_perbill":123616236,"approval":74.8148149,"support":12.3616236},{"time_hours":137,"approval_perbill":746999077,"support_perbill":122762735,"approval":74.6999077,"support":12.2762735},{"time_hours":138,"approval_perbill":745856354,"support_perbill":121917808,"approval":74.5856354,"support":12.1917808},{"time_hours":139,"approval_perbill":744719927,"support_perbill":121081326,"approval":74.4719927,"support":12.1081326},{"time_hours":140,"approval_perbill":743589744,"support_perbill":120253164,"approval":74.3589744,"support":12.0253164},{"time_hours":141,"approval_perbill":742465754,"support_perbill":119433198,"approval":74.2465754,"support":11.9433198},{"time_hours":142,"approval_perbill":741347906,"support_perbill":118621307,"approval":74.1347906,"support":11.8621307},{"time_hours":143,"approval_perbill":740236149,"support_perbill":117817371,"approval":74.0236149,"support":11.7817371},{"time_hours":144,"approval_perbill":739130435,"support_perbill":117021276,"approval":73.9130435,"support":11.7021276},{"time_hours":145,"approval_perbill":738030714,"support_perbill":116232907,"approval":73.8030714,"support":11.6232907},{"time_hours":146,"approval_perbill":736936938,"support_perbill":115452151,"approval":73.6936938,"support":11.5452151},{"time_hours":147,"approval_perbill":735849057,"support_perbill":114678898,"approval":73.5849057,"support":11.4678898},{"time_hours":148,"approval_perbill":734767025,"support_perbill":113913043,"approval":73.4767025,"support":11.3913043},{"time_hours":149,"approval_perbill":733690796,"support_perbill":113154478,"approval":73.3690796,"support":11.3154478},{"time_hours":150,"approval_perbill":732620322,"support_perbill":112403100,"approval":73.2620322,"support":11.24031},{"time_hours":151,"approval_perbill":731555556,"support_perbill":111658808,"approval":73.1555556,"support":11.1658808},{"time_hours":152,"approval_perbill":730496454,"support_perbill":110921501,"approval":73.0496454,"support":11.0921501},{"time_hours":153,"approval_perbill":729442971,"support_perbill":110191082,"approval":72.9442971,"support":11.0191082},{"time_hours":154,"approval_perbill":728395062,"support_perbill":109467455,"approval":72.8395062,"support":10.9467455},{"time_hours":155,"approval_perbill":727352683,"support_perbill":108750526,"approval":72.7352683,"support":10.8750526},{"time_hours":156,"approval_perbill":726315790,"support_perbill":108040200,"approval":72.631579,"support":10.80402},{"time_hours":157,"approval_perbill":725284340,"support_perbill":107336390,"approval":72.528434,"support":10.733639},{"time_hours":158,"approval_perbill":724258290,"support_perbill":106639004,"approval":72.425829,"support":10.6639004},{"time_hours":159,"approval_perbill":723237599,"support_perbill":105947955,"approval":72.3237599,"support":10.5947955},{"time_hours":160,"approval_perbill":722222222,"support_perbill":105263157,"approval":72.2222222,"support":10.5263157},{"time_hours":161,"approval_perbill":721212122,"support_perbill":104584527,"approval":72.1212122,"support":10.4584527},{"time_hours":162,"approval_perbill":720207254,"support_perbill":103911980,"approval":72.0207254,"support":10.391198},{"time_hours":163,"approval_perbill":719207580,"support_perbill":103245436,"approval":71.920758,"support":10.3245436},{"time_hours":164,"approval_perbill":718213059,"support_perbill":102584814,"approval":71.8213059,"support":10.2584814},{"time_hours":165,"approval_perbill":717223651,"support_perbill":101930036,"approval":71.7223651,"support":10.1930036},{"time_hours":166,"approval_perbill":716239317,"support_perbill":101281024,"approval":71.6239317,"support":10.1281024},{"time_hours":167,"approval_perbill":715260018,"support_perbill":100637704,"approval":71.5260018,"support":10.0637704},{"time_hours":168,"approval_perbill":714285714,"support_perbill":99999999,"approval":71.4285714,"support":9.9999999},{"time_hours":169,"approval_perbill":713316370,"support_perbill":99367838,"approval":71.331637,"support":9.9367838},{"time_hours":170,"approval_perbill":712351946,"support_perbill":98741148,"approval":71.2351946,"support":9.8741148},{"time_hours":171,"approval_perbill":711392406,"support_perbill":98119859,"approval":71.1392406,"support":9.8119859},{"time_hours":172,"approval_perbill":710437711,"support_perbill":97503900,"approval":71.0437711,"support":9.75039},{"time_hours":173,"approval_perbill":709487826,"support_perbill":96893203,"approval":70.9487826,"support":9.6893203},{"time_hours":174,"approval_perbill":708542714,"support_perbill":96287703,"approval":70.8542714,"support":9.6287703},{"time_hours":175,"approval_perbill":707602340,"support_perbill":95687331,"approval":70.760234,"support":9.5687331},{"time_hours":176,"approval_perbill":706666667,"support_perbill":95092024,"approval":70.6666667,"support":9.5092024},{"time_hours":177,"approval_perbill":705735661,"support_perbill":94501718,"approval":70.5735661,"support":9.4501718},{"time_hours":178,"approval_perbill":704809287,"support_perbill":93916349,"approval":70.4809287,"support":9.3916349},{"time_hours":179,"approval_perbill":703887511,"support_perbill":93335857,"approval":70.3887511,"support":9.3335857},{"time_hours":180,"approval_perbill":702970298,"support_perbill":92760181,"approval":70.2970298,"support":9.2760181},{"time_hours":181,"approval_perbill":702057613,"support_perbill":92189260,"approval":70.2057613,"support":9.218926},{"time_hours":182,"approval_perbill":701149426,"support_perbill":91623036,"approval":70.1149426,"support":9.1623036},{"time_hours":183,"approval_perbill":700245701,"support_perbill":91061452,"approval":70.0245701,"support":9.1061452},{"time_hours":184,"approval_perbill":699346406,"support_perbill":90504451,"approval":69.9346406,"support":9.0504451},{"time_hours":185,"approval_perbill":698451508,"support_perbill":89951976,"approval":69.8451508,"support":8.9951976},{"time_hours":186,"approval_perbill":697560976,"support_perbill":89403973,"approval":69.7560976,"support":8.9403973},{"time_hours":187,"approval_perbill":696674777,"support_perbill":88860388,"approval":69.6674777,"support":8.8860388},{"time_hours":188,"approval_perbill":695792881,"support_perbill":88321167,"approval":69.5792881,"support":8.8321167},{"time_hours":189,"approval_perbill":694915254,"support_perbill":87786259,"approval":69.4915254,"support":8.7786259},{"time_hours":190,"approval_perbill":694041868,"support_perbill":87255611,"approval":69.4041868,"support":8.7255611},{"time_hours":191,"approval_perbill":693172691,"support_perbill":86729174,"approval":69.3172691,"support":8.6729174},{"time_hours":192,"approval_perbill":692307693,"support_perbill":86206896,"approval":69.2307693,"support":8.6206896},{"time_hours":193,"approval_perbill":691446843,"support_perbill":85688729,"approval":69.1446843,"support":8.5688729},{"time_hours":194,"approval_perbill":690590112,"support_perbill":85174625,"approval":69.0590112,"support":8.5174625},{"time_hours":195,"approval_perbill":689737470,"support_perbill":84664536,"approval":68.973747,"support":8.4664536},{"time_hours":196,"approval_perbill":688888889,"support_perbill":84158415,"approval":68.8888889,"support":8.4158415},{"time_hours":197,"approval_perbill":688044339,"support_perbill":83656217,"approval":68.8044339,"support":8.3656217},{"time_hours":198,"approval_perbill":687203792,"support_perbill":83157894,"approval":68.7203792,"support":8.3157894},{"time_hours":199,"approval_perbill":686367219,"support_perbill":82663404,"approval":68.6367219,"support":8.2663404},{"time_hours":200,"approval_perbill":685534592,"support_perbill":82172701,"approval":68.5534592,"support":8.2172701},{"time_hours":201,"approval_perbill":684705883,"support_perbill":81685744,"approval":68.4705883,"support":8.1685744},{"time_hours":202,"approval_perbill":683881064,"support_perbill":81202487,"approval":68.3881064,"support":8.1202487},{"time_hours":203,"approval_perbill":683060110,"support_perbill":80722891,"approval":68.306011,"support":8.0722891},{"time_hours":204,"approval_perbill":682242991,"support_perbill":80246913,"approval":68.2242991,"support":8.0246913},{"time_hours":205,"approval_perbill":681429682,"support_perbill":79774513,"approval":68.1429682,"support":7.9774513},{"time_hours":206,"approval_perbill":680620155,"support_perbill":79305649,"approval":68.0620155,"support":7.9305649},{"time_hours":207,"approval_perbill":679814385,"support_perbill":78840284,"approval":67.9814385,"support":7.8840284},{"time_hours":208,"approval_perbill":679012346,"support_perbill":78378378,"approval":67.9012346,"support":7.8378378},{"time_hours":209,"approval_perbill":678214011,"support_perbill":77919892,"approval":67.8214011,"support":7.7919892},{"time_hours":210,"approval_perbill":677419355,"support_perbill":77464788,"approval":67.7419355,"support":7.7464788},{"time_hours":211,"approval_perbill":676628353,"support_perbill":77013030,"approval":67.6628353,"support":7.701303},{"time_hours":212,"approval_perbill":675840979,"support_perbill":76564580,"approval":67.5840979,"support":7.656458},{"time_hours":213,"approval_perbill":675057209,"support_perbill":76119402,"approval":67.5057209,"support":7.6119402},{"time_hours":214,"approval_perbill":674277017,"support_perbill":75677462,"approval":67.4277017,"support":7.5677462},{"time_hours":215,"approval_perbill":673500380,"support_perbill":75238722,"approval":67.350038,"support":7.5238722},{"time_hours":216,"approval_perbill":672727273,"support_perbill":74803149,"approval":67.2727273,"support":7.4803149},{"time_hours":217,"approval_perbill":671957672,"support_perbill":74370709,"approval":67.1957672,"support":7.4370709},{"time_hours":218,"approval_perbill":671191554,"support_perbill":73941368,"approval":67.1191554,"support":7.3941368},{"time_hours":219,"approval_perbill":670428894,"support_perbill":73515092,"approval":67.0428894,"support":7.3515092},{"time_hours":220,"approval_perbill":669669670,"support_perbill":73091849,"approval":66.966967,"support":7.3091849},{"time_hours":221,"approval_perbill":668913858,"support_perbill":72671608,"approval":66.8913858,"support":7.2671608},{"time_hours":222,"approval_perbill":668161435,"support_perbill":72254335,"approval":66.8161435,"support":7.2254335},{"time_hours":223,"approval_perbill":667412379,"support_perbill":71839999,"approval":66.7412379,"support":7.1839999},{"time_hours":224,"approval_perbill":666666667,"support_perbill":71428571,"approval":66.6666667,"support":7.1428571},{"time_hours":225,"approval_perbill":665924276,"support_perbill":71020018,"approval":66.5924276,"support":7.1020018},{"time_hours":226,"approval_perbill":665185186,"support_perbill":70614312,"approval":66.5185186,"support":7.0614312},{"time_hours":227,"approval_perbill":664449372,"support_perbill":70211422,"approval":66.4449372,"support":7.0211422},{"time_hours":228,"approval_perbill":663716814,"support_perbill":69811320,"approval":66.3716814,"support":6.981132},{"time_hours":229,"approval_perbill":662987491,"support_perbill":69413976,"approval":66.2987491,"support":6.9413976},{"time_hours":230,"approval_perbill":662261381,"support_perbill":69019362,"approval":66.2261381,"support":6.9019362},{"time_hours":231,"approval_perbill":661538462,"support_perbill":68627450,"approval":66.1538462,"support":6.862745},{"time_hours":232,"approval_perbill":660818714,"support_perbill":68238213,"approval":66.0818714,"support":6.8238213},{"time_hours":233,"approval_perbill":660102115,"support_perbill":67851622,"approval":66.0102115,"support":6.7851622},{"time_hours":234,"approval_perbill":659388647,"support_perbill":67467652,"approval":65.9388647,"support":6.7467652},{"time_hours":235,"approval_perbill":658678287,"support_perbill":67086275,"approval":65.8678287,"support":6.7086275},{"time_hours":236,"approval_perbill":657971015,"support_perbill":66707466,"approval":65.7971015,"support":6.6707466},{"time_hours":237,"approval_perbill":657266811,"support_perbill":66331198,"approval":65.7266811,"support":6.6331198},{"time_hours":238,"approval_perbill":656565657,"support_perbill":65957446,"approval":65.6565657,"support":6.5957446},{"time_hours":239,"approval_perbill":655867531,"support_perbill":65586185,"approval":65.5867531,"support":6.5586185},{"time_hours":240,"approval_perbill":655172414,"support_perbill":65217391,"approval":65.5172414,"support":6.5217391},{"time_hours":241,"approval_perbill":654480287,"support_perbill":64851038,"approval":65.4480287,"support":6.4851038},{"time_hours":242,"approval_perbill":653791130,"support_perbill":64487102,"approval":65.379113,"support":6.4487102},{"time_hours":243,"approval_perbill":653104925,"support_perbill":64125560,"approval":65.3104925,"support":6.412556},{"time_hours":244,"approval_perbill":652421652,"support_perbill":63766388,"approval":65.2421652,"support":6.3766388},{"time_hours":245,"approval_perbill":651741294,"support_perbill":63409563,"approval":65.1741294,"support":6.3409563},{"time_hours":246,"approval_perbill":651063830,"support_perbill":63055062,"approval":65.106383,"support":6.3055062},{"time_hours":247,"approval_perbill":650389243,"support_perbill":62702862,"approval":65.0389243,"support":6.2702862},{"time_hours":248,"approval_perbill":649717514,"support_perbill":62352940,"approval":64.9717514,"support":6.235294},{"time_hours":249,"approval_perbill":649048626,"support_perbill":62005276,"approval":64.9048626,"support":6.2005276},{"time_hours":250,"approval_perbill":648382560,"support_perbill":61659847,"approval":64.838256,"support":6.1659847},{"time_hours":251,"approval_perbill":647719299,"support_perbill":61316632,"approval":64.7719299,"support":6.1316632},{"time_hours":252,"approval_perbill":647058823,"support_perbill":60975609,"approval":64.7058823,"support":6.0975609},{"time_hours":253,"approval_perbill":646401118,"support_perbill":60636758,"approval":64.6401118,"support":6.0636758},{"time_hours":254,"approval_perbill":645746165,"support_perbill":60300057,"approval":64.5746165,"support":6.0300057},{"time_hours":255,"approval_perbill":645093946,"support_perbill":59965487,"approval":64.5093946,"support":5.9965487},{"time_hours":256,"approval_perbill":644444445,"support_perbill":59633027,"approval":64.4444445,"support":5.9633027},{"time_hours":257,"approval_perbill":643797644,"support_perbill":59302657,"approval":64.3797644,"support":5.9302657},{"time_hours":258,"approval_perbill":643153527,"support_perbill":58974358,"approval":64.3153527,"support":5.8974358},{"time_hours":259,"approval_perbill":642512078,"support_perbill":58648111,"approval":64.2512078,"support":5.8648111},{"time_hours":260,"approval_perbill":641873279,"support_perbill":58323895,"approval":64.1873279,"support":5.8323895},{"time_hours":261,"approval_perbill":641237113,"support_perbill":58001693,"approval":64.1237113,"support":5.8001693},{"time_hours":262,"approval_perbill":640603567,"support_perbill":57681485,"approval":64.0603567,"support":5.7681485},{"time_hours":263,"approval_perbill":639972622,"support_perbill":57363253,"approval":63.9972622,"support":5.7363253},{"time_hours":264,"approval_perbill":639344263,"support_perbill":57046979,"approval":63.9344263,"support":5.7046979},{"time_hours":265,"approval_perbill":638718473,"support_perbill":56732645,"approval":63.8718473,"support":5.6732645},{"time_hours":266,"approval_perbill":638095238,"support_perbill":56420233,"approval":63.8095238,"support":5.6420233},{"time_hours":267,"approval_perbill":637474542,"support_perbill":56109725,"approval":63.7474542,"support":5.6109725},{"time_hours":268,"approval_perbill":636856369,"support_perbill":55801104,"approval":63.6856369,"support":5.5801104},{"time_hours":269,"approval_perbill":636240703,"support_perbill":55494353,"approval":63.6240703,"support":5.5494353},{"time_hours":270,"approval_perbill":635627530,"support_perbill":55189456,"approval":63.562753,"support":5.5189456},{"time_hours":271,"approval_perbill":635016835,"support_perbill":54886394,"approval":63.5016835,"support":5.4886394},{"time_hours":272,"approval_perbill":634408602,"support_perbill":54585152,"approval":63.4408602,"support":5.4585152},{"time_hours":273,"approval_perbill":633802817,"support_perbill":54285714,"approval":63.3802817,"support":5.4285714},{"time_hours":274,"approval_perbill":633199465,"support_perbill":53988062,"approval":63.3199465,"support":5.3988062},{"time_hours":275,"approval_perbill":632598530,"support_perbill":53692182,"approval":63.259853,"support":5.3692182},{"time_hours":276,"approval_perbill":632000000,"support_perbill":53398058,"approval":63.2,"support":5.3398058},{"time_hours":277,"approval_perbill":631403859,"support_perbill":53105673,"approval":63.1403859,"support":5.3105673},{"time_hours":278,"approval_perbill":630810093,"support_perbill":52815013,"approval":63.0810093,"support":5.2815013},{"time_hours":279,"approval_perbill":630218688,"support_perbill":52526062,"approval":63.0218688,"support":5.2526062},{"time_hours":280,"approval_perbill":629629630,"support_perbill":52238805,"approval":62.962963,"support":5.2238805},{"time_hours":281,"approval_perbill":629042905,"support_perbill":51953228,"approval":62.9042905,"support":5.1953228},{"time_hours":282,"approval_perbill":628458498,"support_perbill":51669316,"approval":62.8458498,"support":5.1669316},{"time_hours":283,"approval_perbill":627876397,"support_perbill":51387053,"approval":62.7876397,"support":5.1387053},{"time_hours":284,"approval_perbill":627296588,"support_perbill":51106427,"approval":62.7296588,"support":5.1106427},{"time_hours":285,"approval_perbill":626719057,"support_perbill":50827423,"approval":62.6719057,"support":5.0827423},{"time_hours":286,"approval_perbill":626143791,"support_perbill":50550025,"approval":62.6143791,"support":5.0550025},{"time_hours":287,"approval_perbill":625570776,"support_perbill":50274222,"approval":62.5570776,"support":5.0274222},{"time_hours":288,"approval_perbill":625000000,"support_perbill":49999999,"approval":62.5,"support":4.9999999},{"time_hours":289,"approval_perbill":624431449,"support_perbill":49727343,"approval":62.4431449,"support":4.9727343},{"time_hours":290,"approval_perbill":623865110,"support_perbill":49456240,"approval":62.386511,"support":4.945624},{"time_hours":291,"approval_perbill":623300971,"support_perbill":49186676,"approval":62.3300971,"support":4.9186676},{"time_hours":292,"approval_perbill":622739018,"support_perbill":48918640,"approval":62.2739018,"support":4.891864},{"time_hours":293,"approval_perbill":622179239,"support_perbill":48652117,"approval":62.2179239,"support":4.8652117},{"time_hours":294,"approval_perbill":621621621,"support_perbill":48387096,"approval":62.1621621,"support":4.8387096},{"time_hours":295,"approval_perbill":621066153,"support_perbill":48123563,"approval":62.1066153,"support":4.8123563},{"time_hours":296,"approval_perbill":620512821,"support_perbill":47861506,"approval":62.0512821,"support":4.7861506},{"time_hours":297,"approval_perbill":619961612,"support_perbill":47600913,"approval":61.9961612,"support":4.7600913},{"time_hours":298,"approval_perbill":619412516,"support_perbill":47341772,"approval":61.9412516,"support":4.7341772},{"time_hours":299,"approval_perbill":618865519,"support_perbill":47084069,"approval":61.8865519,"support":4.7084069},{"time_hours":300,"approval_perbill":618320611,"support_perbill":46827794,"approval":61.8320611,"support":4.6827794},{"time_hours":301,"approval_perbill":617777778,"support_perbill":46572934,"approval":61.7777778,"support":4.6572934},{"time_hours":302,"approval_perbill":617237009,"support_perbill":46319479,"approval":61.7237009,"support":4.6319479},{"time_hours":303,"approval_perbill":616698292,"support_perbill":46067415,"approval":61.6698292,"support":4.6067415},{"time_hours":304,"approval_perbill":616161616,"support_perbill":45816732,"approval":61.6161616,"support":4.5816732},{"time_hours":305,"approval_perbill":615626969,"support_perbill":45567419,"approval":61.5626969,"support":4.5567419},{"time_hours":306,"approval_perbill":615094340,"support_perbill":45319464,"approval":61.509434,"support":4.5319464},{"time_hours":307,"approval_perbill":614563716,"support_perbill":45072857,"approval":61.4563716,"support":4.5072857},{"time_hours":308,"approval_perbill":614035088,"support_perbill":44827585,"approval":61.4035088,"support":4.4827585},{"time_hours":309,"approval_perbill":613508443,"support_perbill":44583640,"approval":61.3508443,"support":4.458364},{"time_hours":310,"approval_perbill":612983770,"support_perbill":44341009,"approval":61.298377,"support":4.4341009},{"time_hours":311,"approval_perbill":612461059,"support_perbill":44099682,"approval":61.2461059,"support":4.4099682},{"time_hours":312,"approval_perbill":611940298,"support_perbill":43859648,"approval":61.1940298,"support":4.3859648},{"time_hours":313,"approval_perbill":611421477,"support_perbill":43620898,"approval":61.1421477,"support":4.3620898},{"time_hours":314,"approval_perbill":610904585,"support_perbill":43383422,"approval":61.0904585,"support":4.3383422},{"time_hours":315,"approval_perbill":610389610,"support_perbill":43147207,"approval":61.038961,"support":4.3147207},{"time_hours":316,"approval_perbill":609876543,"support_perbill":42912246,"approval":60.9876543,"support":4.2912246},{"time_hours":317,"approval_perbill":609365373,"support_perbill":42678528,"approval":60.9365373,"support":4.2678528},{"time_hours":318,"approval_perbill":608856089,"support_perbill":42446042,"approval":60.8856089,"support":4.2446042},{"time_hours":319,"approval_perbill":608348680,"support_perbill":42214780,"approval":60.834868,"support":4.221478},{"time_hours":320,"approval_perbill":607843137,"support_perbill":41984732,"approval":60.7843137,"support":4.1984732},{"time_hours":321,"approval_perbill":607339449,"support_perbill":41755888,"approval":60.7339449,"support":4.1755888},{"time_hours":322,"approval_perbill":606837607,"support_perbill":41528238,"approval":60.6837607,"support":4.1528238},{"time_hours":323,"approval_perbill":606337599,"support_perbill":41301774,"approval":60.6337599,"support":4.1301774},{"time_hours":324,"approval_perbill":605839416,"support_perbill":41076486,"approval":60.5839416,"support":4.1076486},{"time_hours":325,"approval_perbill":605343048,"support_perbill":40852366,"approval":60.5343048,"support":4.0852366},{"time_hours":326,"approval_perbill":604848485,"support_perbill":40629403,"approval":60.4848485,"support":4.0629403},{"time_hours":327,"approval_perbill":604355717,"support_perbill":40407589,"approval":60.4355717,"support":4.0407589},{"time_hours":328,"approval_perbill":603864734,"support_perbill":40186915,"approval":60.3864734,"support":4.0186915},{"time_hours":329,"approval_perbill":603375527,"support_perbill":39967373,"approval":60.3375527,"support":3.9967373},{"time_hours":330,"approval_perbill":602888087,"support_perbill":39748953,"approval":60.2888087,"support":3.9748953},{"time_hours":331,"approval_perbill":602402402,"support_perbill":39531648,"approval":60.2402402,"support":3.9531648},{"time_hours":332,"approval_perbill":601918465,"support_perbill":39315448,"approval":60.1918465,"support":3.9315448},{"time_hours":333,"approval_perbill":601436266,"support_perbill":39100345,"approval":60.1436266,"support":3.9100345},{"time_hours":334,"approval_perbill":600955794,"support_perbill":38886332,"approval":60.0955794,"support":3.8886332},{"time_hours":335,"approval_perbill":600477042,"support_perbill":38673398,"approval":60.0477042,"support":3.8673398},{"time_hours":336,"approval_perbill":600000000,"support_perbill":38461538,"approval":60,"support":3.8461538},{"time_hours":337,"approval_perbill":599524658,"support_perbill":38250741,"approval":59.9524658,"support":3.8250741},{"time_hours":338,"approval_perbill":599051008,"support_perbill":38041002,"approval":59.9051008,"support":3.8041002},{"time_hours":339,"approval_perbill":598579041,"support_perbill":37832310,"approval":59.8579041,"support":3.783231},{"time_hours":340,"approval_perbill":598108747,"support_perbill":37624659,"approval":59.8108747,"support":3.7624659},{"time_hours":341,"approval_perbill":597640118,"support_perbill":37418041,"approval":59.7640118,"support":3.7418041},{"time_hours":342,"approval_perbill":597173145,"support_perbill":37212448,"approval":59.7173145,"support":3.7212448},{"time_hours":343,"approval_perbill":596707819,"support_perbill":37007873,"approval":59.6707819,"support":3.7007873},{"time_hours":344,"approval_perbill":596244131,"support_perbill":36804308,"approval":59.6244131,"support":3.6804308},{"time_hours":345,"approval_perbill":595782074,"support_perbill":36601745,"approval":59.5782074,"support":3.6601745},{"time_hours":346,"approval_perbill":595321637,"support_perbill":36400178,"approval":59.5321637,"support":3.6400178},{"time_hours":347,"approval_perbill":594862814,"support_perbill":36199598,"approval":59.4862814,"support":3.6199598},{"time_hours":348,"approval_perbill":594405594,"support_perbill":35999999,"approval":59.4405594,"support":3.5999999},{"time_hours":349,"approval_perbill":593949971,"support_perbill":35801374,"approval":59.3949971,"support":3.5801374},{"time_hours":350,"approval_perbill":593495935,"support_perbill":35603714,"approval":59.3495935,"support":3.5603714},{"time_hours":351,"approval_perbill":593043478,"support_perbill":35407014,"approval":59.3043478,"support":3.5407014},{"time_hours":352,"approval_perbill":592592593,"support_perbill":35211267,"approval":59.2592593,"support":3.5211267},{"time_hours":353,"approval_perbill":592143270,"support_perbill":35016465,"approval":59.214327,"support":3.5016465},{"time_hours":354,"approval_perbill":591695502,"support_perbill":34822601,"approval":59.1695502,"support":3.4822601},{"time_hours":355,"approval_perbill":591249280,"support_perbill":34629669,"approval":59.124928,"support":3.4629669},{"time_hours":356,"approval_perbill":590804598,"support_perbill":34437663,"approval":59.0804598,"support":3.4437663},{"time_hours":357,"approval_perbill":590361446,"support_perbill":34246575,"approval":59.0361446,"support":3.4246575},{"time_hours":358,"approval_perbill":589919817,"support_perbill":34056398,"approval":58.9919817,"support":3.4056398},{"time_hours":359,"approval_perbill":589479703,"support_perbill":33867128,"approval":58.9479703,"support":3.3867128},{"time_hours":360,"approval_perbill":589041096,"support_perbill":33678756,"approval":58.9041096,"support":3.3678756},{"time_hours":361,"approval_perbill":588603989,"support_perbill":33491276,"approval":58.8603989,"support":3.3491276},{"time_hours":362,"approval_perbill":588168373,"support_perbill":33304683,"approval":58.8168373,"support":3.3304683},{"time_hours":363,"approval_perbill":587734242,"support_perbill":33118970,"approval":58.7734242,"support":3.311897},{"time_hours":364,"approval_perbill":587301587,"support_perbill":32934131,"approval":58.7301587,"support":3.2934131},{"time_hours":365,"approval_perbill":586870402,"support_perbill":32750159,"approval":58.6870402,"support":3.2750159},{"time_hours":366,"approval_perbill":586440678,"support_perbill":32567049,"approval":58.6440678,"support":3.2567049},{"time_hours":367,"approval_perbill":586012408,"support_perbill":32384794,"approval":58.6012408,"support":3.2384794},{"time_hours":368,"approval_perbill":585585585,"support_perbill":32203389,"approval":58.5585585,"support":3.2203389},{"time_hours":369,"approval_perbill":585160202,"support_perbill":32022827,"approval":58.5160202,"support":3.2022827},{"time_hours":370,"approval_perbill":584736251,"support_perbill":31843103,"approval":58.4736251,"support":3.1843103},{"time_hours":371,"approval_perbill":584313725,"support_perbill":31664211,"approval":58.4313725,"support":3.1664211},{"time_hours":372,"approval_perbill":583892617,"support_perbill":31486145,"approval":58.3892617,"support":3.1486145},{"time_hours":373,"approval_perbill":583472920,"support_perbill":31308900,"approval":58.347292,"support":3.13089},{"time_hours":374,"approval_perbill":583054626,"support_perbill":31132469,"approval":58.3054626,"support":3.1132469},{"time_hours":375,"approval_perbill":582637729,"support_perbill":30956847,"approval":58.2637729,"support":3.0956847},{"time_hours":376,"approval_perbill":582222222,"support_perbill":30782029,"approval":58.2222222,"support":3.0782029},{"time_hours":377,"approval_perbill":581808098,"support_perbill":30608009,"approval":58.1808098,"support":3.0608009},{"time_hours":378,"approval_perbill":581395349,"support_perbill":30434782,"approval":58.1395349,"support":3.0434782},{"time_hours":379,"approval_perbill":580983969,"support_perbill":30262342,"approval":58.0983969,"support":3.0262342},{"time_hours":380,"approval_perbill":580573951,"support_perbill":30090683,"approval":58.0573951,"support":3.0090683},{"time_hours":381,"approval_perbill":580165289,"support_perbill":29919802,"approval":58.0165289,"support":2.9919802},{"time_hours":382,"approval_perbill":579757976,"support_perbill":29749692,"approval":57.9757976,"support":2.9749692},{"time_hours":383,"approval_perbill":579352004,"support_perbill":29580347,"approval":57.9352004,"support":2.9580347},{"time_hours":384,"approval_perbill":578947368,"support_perbill":29411764,"approval":57.8947368,"support":2.9411764},{"time_hours":385,"approval_perbill":578544061,"support_perbill":29243936,"approval":57.8544061,"support":2.9243936},{"time_hours":386,"approval_perbill":578142076,"support_perbill":29076860,"approval":57.8142076,"support":2.907686},{"time_hours":387,"approval_perbill":577741407,"support_perbill":28910529,"approval":57.7741407,"support":2.8910529},{"time_hours":388,"approval_perbill":577342048,"support_perbill":28744938,"approval":57.7342048,"support":2.8744938},{"time_hours":389,"approval_perbill":576943991,"support_perbill":28580084,"approval":57.6943991,"support":2.8580084},{"time_hours":390,"approval_perbill":576547231,"support_perbill":28415961,"approval":57.6547231,"support":2.8415961},{"time_hours":391,"approval_perbill":576151761,"support_perbill":28252563,"approval":57.6151761,"support":2.8252563},{"time_hours":392,"approval_perbill":575757576,"support_perbill":28089887,"approval":57.5757576,"support":2.8089887},{"time_hours":393,"approval_perbill":575364668,"support_perbill":27927927,"approval":57.5364668,"support":2.7927927},{"time_hours":394,"approval_perbill":574973031,"support_perbill":27766679,"approval":57.4973031,"support":2.7766679},{"time_hours":395,"approval_perbill":574582660,"support_perbill":27606138,"approval":57.458266,"support":2.7606138},{"time_hours":396,"approval_perbill":574193548,"support_perbill":27446300,"approval":57.4193548,"support":2.74463},{"time_hours":397,"approval_perbill":573805690,"support_perbill":27287159,"approval":57.380569,"support":2.7287159},{"time_hours":398,"approval_perbill":573419078,"support_perbill":27128712,"approval":57.3419078,"support":2.7128712},{"time_hours":399,"approval_perbill":573033708,"support_perbill":26970954,"approval":57.3033708,"support":2.6970954},{"time_hours":400,"approval_perbill":572649572,"support_perbill":26813879,"approval":57.2649572,"support":2.6813879},{"time_hours":401,"approval_perbill":572266666,"support_perbill":26657485,"approval":57.2266666,"support":2.6657485},{"time_hours":402,"approval_perbill":571884984,"support_perbill":26501766,"approval":57.1884984,"support":2.6501766},{"time_hours":403,"approval_perbill":571504519,"support_perbill":26346718,"approval":57.1504519,"support":2.6346718},{"time_hours":404,"approval_perbill":571125265,"support_perbill":26192337,"approval":57.1125265,"support":2.6192337},{"time_hours":405,"approval_perbill":570747218,"support_perbill":26038618,"approval":57.0747218,"support":2.6038618},{"time_hours":406,"approval_perbill":570370370,"support_perbill":25885558,"approval":57.037037,"support":2.5885558},{"time_hours":407,"approval_perbill":569994717,"support_perbill":25733151,"approval":56.9994717,"support":2.5733151},{"time_hours":408,"approval_perbill":569620253,"support_perbill":25581395,"approval":56.9620253,"support":2.5581395},{"time_hours":409,"approval_perbill":569246972,"support_perbill":25430283,"approval":56.9246972,"support":2.5430283},{"time_hours":410,"approval_perbill":568874868,"support_perbill":25279814,"approval":56.8874868,"support":2.5279814},{"time_hours":411,"approval_perbill":568503937,"support_perbill":25129982,"approval":56.8503937,"support":2.5129982},{"time_hours":412,"approval_perbill":568134172,"support_perbill":24980783,"approval":56.8134172,"support":2.4980783},{"time_hours":413,"approval_perbill":567765567,"support_perbill":24832214,"approval":56.7765567,"support":2.4832214},{"time_hours":414,"approval_perbill":567398119,"support_perbill":24684270,"approval":56.7398119,"support":2.468427},{"time_hours":415,"approval_perbill":567031820,"support_perbill":24536948,"approval":56.703182,"support":2.4536948},{"time_hours":416,"approval_perbill":566666666,"support_perbill":24390243,"approval":56.6666666,"support":2.4390243},{"time_hours":417,"approval_perbill":566302652,"support_perbill":24244152,"approval":56.6302652,"support":2.4244152},{"time_hours":418,"approval_perbill":565939771,"support_perbill":24098671,"approval":56.5939771,"support":2.4098671},{"time_hours":419,"approval_perbill":565578020,"support_perbill":23953796,"approval":56.557802,"support":2.3953796},{"time_hours":420,"approval_perbill":565217391,"support_perbill":23809523,"approval":56.5217391,"support":2.3809523},{"time_hours":421,"approval_perbill":564857881,"support_perbill":23665849,"approval":56.4857881,"support":2.3665849},{"time_hours":422,"approval_perbill":564499484,"support_perbill":23522769,"approval":56.4499484,"support":2.3522769},{"time_hours":423,"approval_perbill":564142195,"support_perbill":23380281,"approval":56.4142195,"support":2.3380281},{"time_hours":424,"approval_perbill":563786008,"support_perbill":23238380,"approval":56.3786008,"support":2.323838},{"time_hours":425,"approval_perbill":563430919,"support_perbill":23097063,"approval":56.3430919,"support":2.3097063},{"time_hours":426,"approval_perbill":563076923,"support_perbill":22956326,"approval":56.3076923,"support":2.2956326},{"time_hours":427,"approval_perbill":562724014,"support_perbill":22816166,"approval":56.2724014,"support":2.2816166},{"time_hours":428,"approval_perbill":562372188,"support_perbill":22676579,"approval":56.2372188,"support":2.2676579},{"time_hours":429,"approval_perbill":562021439,"support_perbill":22537562,"approval":56.2021439,"support":2.2537562},{"time_hours":430,"approval_perbill":561671763,"support_perbill":22399111,"approval":56.1671763,"support":2.2399111},{"time_hours":431,"approval_perbill":561323155,"support_perbill":22261222,"approval":56.1323155,"support":2.2261222},{"time_hours":432,"approval_perbill":560975610,"support_perbill":22123893,"approval":56.097561,"support":2.2123893},{"time_hours":433,"approval_perbill":560629122,"support_perbill":21987120,"approval":56.0629122,"support":2.198712},{"time_hours":434,"approval_perbill":560283688,"support_perbill":21850899,"approval":56.0283688,"support":2.1850899},{"time_hours":435,"approval_perbill":559939302,"support_perbill":21715227,"approval":55.9939302,"support":2.1715227},{"time_hours":436,"approval_perbill":559595959,"support_perbill":21580102,"approval":55.9595959,"support":2.1580102},{"time_hours":437,"approval_perbill":559253656,"support_perbill":21445518,"approval":55.9253656,"support":2.1445518},{"time_hours":438,"approval_perbill":558912386,"support_perbill":21311475,"approval":55.8912386,"support":2.1311475},{"time_hours":439,"approval_perbill":558572147,"support_perbill":21177967,"approval":55.8572147,"support":2.1177967},{"time_hours":440,"approval_perbill":558232931,"support_perbill":21044992,"approval":55.8232931,"support":2.1044992},{"time_hours":441,"approval_perbill":557894736,"support_perbill":20912547,"approval":55.7894736,"support":2.0912547},{"time_hours":442,"approval_perbill":557557557,"support_perbill":20780628,"approval":55.7557557,"support":2.0780628},{"time_hours":443,"approval_perbill":557221389,"support_perbill":20649233,"approval":55.7221389,"support":2.0649233},{"time_hours":444,"approval_perbill":556886227,"support_perbill":20518358,"approval":55.6886227,"support":2.0518358},{"time_hours":445,"approval_perbill":556552068,"support_perbill":20388000,"approval":55.6552068,"support":2.0388},{"time_hours":446,"approval_perbill":556218905,"support_perbill":20258156,"approval":55.6218905,"support":2.0258156},{"time_hours":447,"approval_perbill":555886736,"support_perbill":20128824,"approval":55.5886736,"support":2.0128824},{"time_hours":448,"approval_perbill":555555555,"support_perbill":19999999,"approval":55.5555555,"support":1.9999999},{"time_hours":449,"approval_perbill":555225359,"support_perbill":19871680,"approval":55.5225359,"support":1.987168},{"time_hours":450,"approval_perbill":554896142,"support_perbill":19743863,"approval":55.4896142,"support":1.9743863},{"time_hours":451,"approval_perbill":554567901,"support_perbill":19616545,"approval":55.4567901,"support":1.9616545},{"time_hours":452,"approval_perbill":554240631,"support_perbill":19489723,"approval":55.4240631,"support":1.9489723},{"time_hours":453,"approval_perbill":553914328,"support_perbill":19363394,"approval":55.3914328,"support":1.9363394},{"time_hours":454,"approval_perbill":553588987,"support_perbill":19237556,"approval":55.3588987,"support":1.9237556},{"time_hours":455,"approval_perbill":553264604,"support_perbill":19112206,"approval":55.3264604,"support":1.9112206},{"time_hours":456,"approval_perbill":552941176,"support_perbill":18987341,"approval":55.2941176,"support":1.8987341},{"time_hours":457,"approval_perbill":552618698,"support_perbill":18862958,"approval":55.2618698,"support":1.8862958},{"time_hours":458,"approval_perbill":552297165,"support_perbill":18739053,"approval":55.2297165,"support":1.8739053},{"time_hours":459,"approval_perbill":551976574,"support_perbill":18615626,"approval":55.1976574,"support":1.8615626},{"time_hours":460,"approval_perbill":551656920,"support_perbill":18492672,"approval":55.165692,"support":1.8492672},{"time_hours":461,"approval_perbill":551338199,"support_perbill":18370189,"approval":55.1338199,"support":1.8370189},{"time_hours":462,"approval_perbill":551020408,"support_perbill":18248174,"approval":55.1020408,"support":1.8248174},{"time_hours":463,"approval_perbill":550703542,"support_perbill":18126625,"approval":55.0703542,"support":1.8126625},{"time_hours":464,"approval_perbill":550387597,"support_perbill":18005539,"approval":55.0387597,"support":1.8005539},{"time_hours":465,"approval_perbill":550072569,"support_perbill":17884914,"approval":55.0072569,"support":1.7884914},{"time_hours":466,"approval_perbill":549758454,"support_perbill":17764746,"approval":54.9758454,"support":1.7764746},{"time_hours":467,"approval_perbill":549445248,"support_perbill":17645033,"approval":54.9445248,"support":1.7645033},{"time_hours":468,"approval_perbill":549132948,"support_perbill":17525772,"approval":54.9132948,"support":1.7525772},{"time_hours":469,"approval_perbill":548821549,"support_perbill":17406962,"approval":54.8821549,"support":1.7406962},{"time_hours":470,"approval_perbill":548511047,"support_perbill":17288599,"approval":54.8511047,"support":1.7288599},{"time_hours":471,"approval_perbill":548201438,"support_perbill":17170681,"approval":54.8201438,"support":1.7170681},{"time_hours":472,"approval_perbill":547892720,"support_perbill":17053205,"approval":54.789272,"support":1.7053205},{"time_hours":473,"approval_perbill":547584887,"support_perbill":16936169,"approval":54.7584887,"support":1.6936169},{"time_hours":474,"approval_perbill":547277937,"support_perbill":16819571,"approval":54.7277937,"support":1.6819571},{"time_hours":475,"approval_perbill":546971864,"support_perbill":16703408,"approval":54.6971864,"support":1.6703408},{"time_hours":476,"approval_perbill":546666666,"support_perbill":16587677,"approval":54.6666666,"support":1.6587677},{"time_hours":477,"approval_perbill":546362339,"support_perbill":16472376,"approval":54.6362339,"support":1.6472376},{"time_hours":478,"approval_perbill":546058879,"support_perbill":16357503,"approval":54.6058879,"support":1.6357503},{"time_hours":479,"approval_perbill":545756282,"support_perbill":16243056,"approval":54.5756282,"support":1.6243056},{"time_hours":480,"approval_perbill":545454545,"support_perbill":16129031,"approval":54.5454545,"support":1.6129031},{"time_hours":481,"approval_perbill":545153664,"support_perbill":16015428,"approval":54.5153664,"support":1.6015428},{"time_hours":482,"approval_perbill":544853635,"support_perbill":15902242,"approval":54.4853635,"support":1.5902242},{"time_hours":483,"approval_perbill":544554455,"support_perbill":15789473,"approval":54.4554455,"support":1.5789473},{"time_hours":484,"approval_perbill":544256120,"support_perbill":15677117,"approval":54.425612,"support":1.5677117},{"time_hours":485,"approval_perbill":543958627,"support_perbill":15565173,"approval":54.3958627,"support":1.5565173},{"time_hours":486,"approval_perbill":543661971,"support_perbill":15453638,"approval":54.3661971,"support":1.5453638},{"time_hours":487,"approval_perbill":543366151,"support_perbill":15342510,"approval":54.3366151,"support":1.534251},{"time_hours":488,"approval_perbill":543071161,"support_perbill":15231787,"approval":54.3071161,"support":1.5231787},{"time_hours":489,"approval_perbill":542776998,"support_perbill":15121467,"approval":54.2776998,"support":1.5121467},{"time_hours":490,"approval_perbill":542483660,"support_perbill":15011547,"approval":54.248366,"support":1.5011547},{"time_hours":491,"approval_perbill":542191142,"support_perbill":14902025,"approval":54.2191142,"support":1.4902025},{"time_hours":492,"approval_perbill":541899441,"support_perbill":14792899,"approval":54.1899441,"support":1.4792899},{"time_hours":493,"approval_perbill":541608554,"support_perbill":14684166,"approval":54.1608554,"support":1.4684166},{"time_hours":494,"approval_perbill":541318477,"support_perbill":14575826,"approval":54.1318477,"support":1.4575826},{"time_hours":495,"approval_perbill":541029207,"support_perbill":14467876,"approval":54.1029207,"support":1.4467876},{"time_hours":496,"approval_perbill":540740740,"support_perbill":14360312,"approval":54.074074,"support":1.4360312},{"time_hours":497,"approval_perbill":540453074,"support_perbill":14253135,"approval":54.0453074,"support":1.4253135},{"time_hours":498,"approval_perbill":540166205,"support_perbill":14146341,"approval":54.0166205,"support":1.4146341},{"time_hours":499,"approval_perbill":539880129,"support_perbill":14039928,"approval":53.9880129,"support":1.4039928},{"time_hours":500,"approval_perbill":539594843,"support_perbill":13933894,"approval":53.9594843,"support":1.3933894},{"time_hours":501,"approval_perbill":539310344,"support_perbill":13828238,"approval":53.9310344,"support":1.3828238},{"time_hours":502,"approval_perbill":539026630,"support_perbill":13722957,"approval":53.902663,"support":1.3722957},{"time_hours":503,"approval_perbill":538743695,"support_perbill":13618049,"approval":53.8743695,"support":1.3618049},{"time_hours":504,"approval_perbill":538461538,"support_perbill":13513513,"approval":53.8461538,"support":1.3513513},{"time_hours":505,"approval_perbill":538180155,"support_perbill":13409346,"approval":53.8180155,"support":1.3409346},{"time_hours":506,"approval_perbill":537899543,"support_perbill":13305546,"approval":53.7899543,"support":1.3305546},{"time_hours":507,"approval_perbill":537619699,"support_perbill":13202112,"approval":53.7619699,"support":1.3202112},{"time_hours":508,"approval_perbill":537340619,"support_perbill":13099041,"approval":53.7340619,"support":1.3099041},{"time_hours":509,"approval_perbill":537062301,"support_perbill":12996331,"approval":53.7062301,"support":1.2996331},{"time_hours":510,"approval_perbill":536784741,"support_perbill":12893982,"approval":53.6784741,"support":1.2893982},{"time_hours":511,"approval_perbill":536507936,"support_perbill":12791990,"approval":53.6507936,"support":1.279199},{"time_hours":512,"approval_perbill":536231884,"support_perbill":12690355,"approval":53.6231884,"support":1.2690355},{"time_hours":513,"approval_perbill":535956580,"support_perbill":12589073,"approval":53.595658,"support":1.2589073},{"time_hours":514,"approval_perbill":535682023,"support_perbill":12488143,"approval":53.5682023,"support":1.2488143},{"time_hours":515,"approval_perbill":535408209,"support_perbill":12387564,"approval":53.5408209,"support":1.2387564},{"time_hours":516,"approval_perbill":535135135,"support_perbill":12287334,"approval":53.5135135,"support":1.2287334},{"time_hours":517,"approval_perbill":534862798,"support_perbill":12187450,"approval":53.4862798,"support":1.218745},{"time_hours":518,"approval_perbill":534591195,"support_perbill":12087911,"approval":53.4591195,"support":1.2087911},{"time_hours":519,"approval_perbill":534320323,"support_perbill":11988716,"approval":53.4320323,"support":1.1988716},{"time_hours":520,"approval_perbill":534050179,"support_perbill":11889861,"approval":53.4050179,"support":1.1889861},{"time_hours":521,"approval_perbill":533780760,"support_perbill":11791347,"approval":53.378076,"support":1.1791347},{"time_hours":522,"approval_perbill":533512064,"support_perbill":11693170,"approval":53.3512064,"support":1.169317},{"time_hours":523,"approval_perbill":533244087,"support_perbill":11595330,"approval":53.3244087,"support":1.159533},{"time_hours":524,"approval_perbill":532976827,"support_perbill":11497824,"approval":53.2976827,"support":1.1497824},{"time_hours":525,"approval_perbill":532710280,"support_perbill":11400651,"approval":53.271028,"support":1.1400651},{"time_hours":526,"approval_perbill":532444444,"support_perbill":11303808,"approval":53.2444444,"support":1.1303808},{"time_hours":527,"approval_perbill":532179316,"support_perbill":11207295,"approval":53.2179316,"support":1.1207295},{"time_hours":528,"approval_perbill":531914893,"support_perbill":11111110,"approval":53.1914893,"support":1.111111},{"time_hours":529,"approval_perbill":531651173,"support_perbill":11015251,"approval":53.1651173,"support":1.1015251},{"time_hours":530,"approval_perbill":531388152,"support_perbill":10919716,"approval":53.1388152,"support":1.0919716},{"time_hours":531,"approval_perbill":531125827,"support_perbill":10824504,"approval":53.1125827,"support":1.0824504},{"time_hours":532,"approval_perbill":530864197,"support_perbill":10729613,"approval":53.0864197,"support":1.0729613},{"time_hours":533,"approval_perbill":530603258,"support_perbill":10635041,"approval":53.0603258,"support":1.0635041},{"time_hours":534,"approval_perbill":530343007,"support_perbill":10540787,"approval":53.0343007,"support":1.0540787},{"time_hours":535,"approval_perbill":530083443,"support_perbill":10446850,"approval":53.0083443,"support":1.044685},{"time_hours":536,"approval_perbill":529824561,"support_perbill":10353227,"approval":52.9824561,"support":1.0353227},{"time_hours":537,"approval_perbill":529566360,"support_perbill":10259917,"approval":52.956636,"support":1.0259917},{"time_hours":538,"approval_perbill":529308836,"support_perbill":10166919,"approval":52.9308836,"support":1.0166919},{"time_hours":539,"approval_perbill":529051987,"support_perbill":10074230,"approval":52.9051987,"support":1.007423},{"time_hours":540,"approval_perbill":528795811,"support_perbill":9981850,"approval":52.8795811,"support":0.998185},{"time_hours":541,"approval_perbill":528540305,"support_perbill":9889777,"approval":52.8540305,"support":0.9889777},{"time_hours":542,"approval_perbill":528285465,"support_perbill":9798009,"approval":52.8285465,"support":0.9798009},{"time_hours":543,"approval_perbill":528031290,"support_perbill":9706545,"approval":52.803129,"support":0.9706545},{"time_hours":544,"approval_perbill":527777777,"support_perbill":9615384,"approval":52.7777777,"support":0.9615384},{"time_hours":545,"approval_perbill":527524924,"support_perbill":9524523,"approval":52.7524924,"support":0.9524523},{"time_hours":546,"approval_perbill":527272727,"support_perbill":9433961,"approval":52.7272727,"support":0.9433961},{"time_hours":547,"approval_perbill":527021184,"support_perbill":9343698,"approval":52.7021184,"support":0.9343698},{"time_hours":548,"approval_perbill":526770293,"support_perbill":9253730,"approval":52.6770293,"support":0.925373},{"time_hours":549,"approval_perbill":526520051,"support_perbill":9164058,"approval":52.6520051,"support":0.9164058},{"time_hours":550,"approval_perbill":526270456,"support_perbill":9074679,"approval":52.6270456,"support":0.9074679},{"time_hours":551,"approval_perbill":526021505,"support_perbill":8985592,"approval":52.6021505,"support":0.8985592},{"time_hours":552,"approval_perbill":525773195,"support_perbill":8896796,"approval":52.5773195,"support":0.8896796},{"time_hours":553,"approval_perbill":525525525,"support_perbill":8808289,"approval":52.5525525,"support":0.8808289},{"time_hours":554,"approval_perbill":525278491,"support_perbill":8720070,"approval":52.5278491,"support":0.872007},{"time_hours":555,"approval_perbill":525032092,"support_perbill":8632137,"approval":52.5032092,"support":0.8632137},{"time_hours":556,"approval_perbill":524786324,"support_perbill":8544489,"approval":52.4786324,"support":0.8544489},{"time_hours":557,"approval_perbill":524541186,"support_perbill":8457125,"approval":52.4541186,"support":0.8457125},{"time_hours":558,"approval_perbill":524296675,"support_perbill":8370043,"approval":52.4296675,"support":0.8370043},{"time_hours":559,"approval_perbill":524052788,"support_perbill":8283242,"approval":52.4052788,"support":0.8283242},{"time_hours":560,"approval_perbill":523809523,"support_perbill":8196720,"approval":52.3809523,"support":0.819672},{"time_hours":561,"approval_perbill":523566878,"support_perbill":8110477,"approval":52.3566878,"support":0.8110477},{"time_hours":562,"approval_perbill":523324851,"support_perbill":8024510,"approval":52.3324851,"support":0.802451},{"time_hours":563,"approval_perbill":523083439,"support_perbill":7938819,"approval":52.3083439,"support":0.7938819},{"time_hours":564,"approval_perbill":522842639,"support_perbill":7853402,"approval":52.2842639,"support":0.7853402},{"time_hours":565,"approval_perbill":522602450,"support_perbill":7768258,"approval":52.260245,"support":0.7768258},{"time_hours":566,"approval_perbill":522362869,"support_perbill":7683386,"approval":52.2362869,"support":0.7683386},{"time_hours":567,"approval_perbill":522123893,"support_perbill":7598783,"approval":52.2123893,"support":0.7598783},{"time_hours":568,"approval_perbill":521885521,"support_perbill":7514450,"approval":52.1885521,"support":0.751445},{"time_hours":569,"approval_perbill":521647751,"support_perbill":7430384,"approval":52.1647751,"support":0.7430384},{"time_hours":570,"approval_perbill":521410579,"support_perbill":7346585,"approval":52.1410579,"support":0.7346585},{"time_hours":571,"approval_perbill":521174004,"support_perbill":7263051,"approval":52.1174004,"support":0.7263051},{"time_hours":572,"approval_perbill":520938023,"support_perbill":7179781,"approval":52.0938023,"support":0.7179781},{"time_hours":573,"approval_perbill":520702634,"support_perbill":7096773,"approval":52.0702634,"support":0.7096773},{"time_hours":574,"approval_perbill":520467836,"support_perbill":7014027,"approval":52.0467836,"support":0.7014027},{"time_hours":575,"approval_perbill":520233625,"support_perbill":6931541,"approval":52.0233625,"support":0.6931541},{"time_hours":576,"approval_perbill":519999999,"support_perbill":6849314,"approval":51.9999999,"support":0.6849314},{"time_hours":577,"approval_perbill":519766957,"support_perbill":6767345,"approval":51.9766957,"support":0.6767345},{"time_hours":578,"approval_perbill":519534497,"support_perbill":6685632,"approval":51.9534497,"support":0.6685632},{"time_hours":579,"approval_perbill":519302615,"support_perbill":6604175,"approval":51.9302615,"support":0.6604175},{"time_hours":580,"approval_perbill":519071310,"support_perbill":6522971,"approval":51.907131,"support":0.6522971},{"time_hours":581,"approval_perbill":518840579,"support_perbill":6442021,"approval":51.8840579,"support":0.6442021},{"time_hours":582,"approval_perbill":518610421,"support_perbill":6361322,"approval":51.8610421,"support":0.6361322},{"time_hours":583,"approval_perbill":518380834,"support_perbill":6280874,"approval":51.8380834,"support":0.6280874},{"time_hours":584,"approval_perbill":518151815,"support_perbill":6200676,"approval":51.8151815,"support":0.6200676},{"time_hours":585,"approval_perbill":517923362,"support_perbill":6120725,"approval":51.7923362,"support":0.6120725},{"time_hours":586,"approval_perbill":517695473,"support_perbill":6041022,"approval":51.7695473,"support":0.6041022},{"time_hours":587,"approval_perbill":517468146,"support_perbill":5961565,"approval":51.7468146,"support":0.5961565},{"time_hours":588,"approval_perbill":517241379,"support_perbill":5882352,"approval":51.7241379,"support":0.5882352},{"time_hours":589,"approval_perbill":517015170,"support_perbill":5803383,"approval":51.701517,"support":0.5803383},{"time_hours":590,"approval_perbill":516789516,"support_perbill":5724657,"approval":51.6789516,"support":0.5724657},{"time_hours":591,"approval_perbill":516564417,"support_perbill":5646172,"approval":51.6564417,"support":0.5646172},{"time_hours":592,"approval_perbill":516339869,"support_perbill":5567928,"approval":51.6339869,"support":0.5567928},{"time_hours":593,"approval_perbill":516115870,"support_perbill":5489923,"approval":51.611587,"support":0.5489923},{"time_hours":594,"approval_perbill":515892420,"support_perbill":5412156,"approval":51.589242,"support":0.5412156},{"time_hours":595,"approval_perbill":515669515,"support_perbill":5334626,"approval":51.5669515,"support":0.5334626},{"time_hours":596,"approval_perbill":515447154,"support_perbill":5257332,"approval":51.5447154,"support":0.5257332},{"time_hours":597,"approval_perbill":515225334,"support_perbill":5180273,"approval":51.5225334,"support":0.5180273},{"time_hours":598,"approval_perbill":515004055,"support_perbill":5103447,"approval":51.5004055,"support":0.5103447},{"time_hours":599,"approval_perbill":514783313,"support_perbill":5026855,"approval":51.4783313,"support":0.5026855},{"time_hours":600,"approval_perbill":514563106,"support_perbill":4950494,"approval":51.4563106,"support":0.4950494},{"time_hours":601,"approval_perbill":514343434,"support_perbill":4874364,"approval":51.4343434,"support":0.4874364},{"time_hours":602,"approval_perbill":514124293,"support_perbill":4798464,"approval":51.4124293,"support":0.4798464},{"time_hours":603,"approval_perbill":513905683,"support_perbill":4722792,"approval":51.3905683,"support":0.4722792},{"time_hours":604,"approval_perbill":513687600,"support_perbill":4647347,"approval":51.36876,"support":0.4647347},{"time_hours":605,"approval_perbill":513470044,"support_perbill":4572130,"approval":51.3470044,"support":0.457213},{"time_hours":606,"approval_perbill":513253011,"support_perbill":4497137,"approval":51.3253011,"support":0.4497137},{"time_hours":607,"approval_perbill":513036502,"support_perbill":4422370,"approval":51.3036502,"support":0.442237},{"time_hours":608,"approval_perbill":512820512,"support_perbill":4347825,"approval":51.2820512,"support":0.4347825},{"time_hours":609,"approval_perbill":512605041,"support_perbill":4273503,"approval":51.2605041,"support":0.4273503},{"time_hours":610,"approval_perbill":512390087,"support_perbill":4199403,"approval":51.2390087,"support":0.4199403},{"time_hours":611,"approval_perbill":512175648,"support_perbill":4125523,"approval":51.2175648,"support":0.4125523},{"time_hours":612,"approval_perbill":511961722,"support_perbill":4051863,"approval":51.1961722,"support":0.4051863},{"time_hours":613,"approval_perbill":511748307,"support_perbill":3978421,"approval":51.1748307,"support":0.3978421},{"time_hours":614,"approval_perbill":511535401,"support_perbill":3905197,"approval":51.1535401,"support":0.3905197},{"time_hours":615,"approval_perbill":511323003,"support_perbill":3832190,"approval":51.1323003,"support":0.383219},{"time_hours":616,"approval_perbill":511111111,"support_perbill":3759398,"approval":51.1111111,"support":0.3759398},{"time_hours":617,"approval_perbill":510899722,"support_perbill":3686820,"approval":51.0899722,"support":0.368682},{"time_hours":618,"approval_perbill":510688835,"support_perbill":3614457,"approval":51.0688835,"support":0.3614457},{"time_hours":619,"approval_perbill":510478449,"support_perbill":3542306,"approval":51.0478449,"support":0.3542306},{"time_hours":620,"approval_perbill":510268562,"support_perbill":3470368,"approval":51.0268562,"support":0.3470368},{"time_hours":621,"approval_perbill":510059171,"support_perbill":3398640,"approval":51.0059171,"support":0.339864},{"time_hours":622,"approval_perbill":509850275,"support_perbill":3327122,"approval":50.9850275,"support":0.3327122},{"time_hours":623,"approval_perbill":509641873,"support_perbill":3255813,"approval":50.9641873,"support":0.3255813},{"time_hours":624,"approval_perbill":509433962,"support_perbill":3184712,"approval":50.9433962,"support":0.3184712},{"time_hours":625,"approval_perbill":509226540,"support_perbill":3113819,"approval":50.922654,"support":0.3113819},{"time_hours":626,"approval_perbill":509019607,"support_perbill":3043132,"approval":50.9019607,"support":0.3043132},{"time_hours":627,"approval_perbill":508813160,"support_perbill":2972651,"approval":50.881316,"support":0.2972651},{"time_hours":628,"approval_perbill":508607198,"support_perbill":2902374,"approval":50.8607198,"support":0.2902374},{"time_hours":629,"approval_perbill":508401719,"support_perbill":2832301,"approval":50.8401719,"support":0.2832301},{"time_hours":630,"approval_perbill":508196721,"support_perbill":2762430,"approval":50.8196721,"support":0.276243},{"time_hours":631,"approval_perbill":507992202,"support_perbill":2692761,"approval":50.7992202,"support":0.2692761},{"time_hours":632,"approval_perbill":507788161,"support_perbill":2623294,"approval":50.7788161,"support":0.2623294},{"time_hours":633,"approval_perbill":507584597,"support_perbill":2554027,"approval":50.7584597,"support":0.2554027},{"time_hours":634,"approval_perbill":507381507,"support_perbill":2484959,"approval":50.7381507,"support":0.2484959},{"time_hours":635,"approval_perbill":507178890,"support_perbill":2416089,"approval":50.717889,"support":0.2416089},{"time_hours":636,"approval_perbill":506976744,"support_perbill":2347417,"approval":50.6976744,"support":0.2347417},{"time_hours":637,"approval_perbill":506775067,"support_perbill":2278942,"approval":50.6775067,"support":0.2278942},{"time_hours":638,"approval_perbill":506573859,"support_perbill":2210662,"approval":50.6573859,"support":0.2210662},{"time_hours":639,"approval_perbill":506373116,"support_perbill":2142578,"approval":50.6373116,"support":0.2142578},{"time_hours":640,"approval_perbill":506172839,"support_perbill":2074688,"approval":50.6172839,"support":0.2074688},{"time_hours":641,"approval_perbill":505973024,"support_perbill":2006991,"approval":50.5973024,"support":0.2006991},{"time_hours":642,"approval_perbill":505773671,"support_perbill":1939487,"approval":50.5773671,"support":0.1939487},{"time_hours":643,"approval_perbill":505574778,"support_perbill":1872175,"approval":50.5574778,"support":0.1872175},{"time_hours":644,"approval_perbill":505376343,"support_perbill":1805053,"approval":50.5376343,"support":0.1805053},{"time_hours":645,"approval_perbill":505178365,"support_perbill":1738122,"approval":50.5178365,"support":0.1738122},{"time_hours":646,"approval_perbill":504980842,"support_perbill":1671380,"approval":50.4980842,"support":0.167138},{"time_hours":647,"approval_perbill":504783773,"support_perbill":1604826,"approval":50.4783773,"support":0.1604826},{"time_hours":648,"approval_perbill":504587155,"support_perbill":1538461,"approval":50.4587155,"support":0.1538461},{"time_hours":649,"approval_perbill":504390988,"support_perbill":1472282,"approval":50.4390988,"support":0.1472282},{"time_hours":650,"approval_perbill":504195270,"support_perbill":1406289,"approval":50.419527,"support":0.1406289},{"time_hours":651,"approval_perbill":503999999,"support_perbill":1340482,"approval":50.3999999,"support":0.1340482},{"time_hours":652,"approval_perbill":503805174,"support_perbill":1274859,"approval":50.3805174,"support":0.1274859},{"time_hours":653,"approval_perbill":503610794,"support_perbill":1209420,"approval":50.3610794,"support":0.120942},{"time_hours":654,"approval_perbill":503416856,"support_perbill":1144164,"approval":50.3416856,"support":0.1144164},{"time_hours":655,"approval_perbill":503223359,"support_perbill":1079090,"approval":50.3223359,"support":0.107909},{"time_hours":656,"approval_perbill":503030302,"support_perbill":1014198,"approval":50.3030302,"support":0.1014198},{"time_hours":657,"approval_perbill":502837684,"support_perbill":949486,"approval":50.2837684,"support":0.0949486},{"time_hours":658,"approval_perbill":502645502,"support_perbill":884955,"approval":50.2645502,"support":0.0884955},{"time_hours":659,"approval_perbill":502453756,"support_perbill":820603,"approval":50.2453756,"support":0.0820603},{"time_hours":660,"approval_perbill":502262443,"support_perbill":756429,"approval":50.2262443,"support":0.0756429},{"time_hours":661,"approval_perbill":502071562,"support_perbill":692433,"approval":50.2071562,"support":0.0692433},{"time_hours":662,"approval_perbill":501881113,"support_perbill":628614,"approval":50.1881113,"support":0.0628614},{"time_hours":663,"approval_perbill":501691093,"support_perbill":564971,"approval":50.1691093,"support":0.0564971},{"time_hours":664,"approval_perbill":501501501,"support_perbill":501504,"approval":50.1501501,"support":0.0501504},{"time_hours":665,"approval_perbill":501312335,"support_perbill":438211,"approval":50.1312335,"support":0.0438211},{"time_hours":666,"approval_perbill":501123595,"support_perbill":375093,"approval":50.1123595,"support":0.0375093},{"time_hours":667,"approval_perbill":500935278,"support_perbill":312148,"approval":50.0935278,"support":0.0312148},{"time_hours":668,"approval_perbill":500747383,"support_perbill":249376,"approval":50.0747383,"support":0.0249376},{"time_hours":669,"approval_perbill":500559910,"support_perbill":186775,"approval":50.055991,"support":0.0186775},{"time_hours":670,"approval_perbill":500372855,"support_perbill":124346,"approval":50.0372855,"support":0.0124346},{"time_hours":671,"approval_perbill":500186219,"support_perbill":62088,"approval":50.0186219,"support":0.0062088},{"time_hours":672,"approval_perbill":499999999,"support_perbill":0,"approval":49.9999999,"support":0}]')},75029:p=>{"use strict";p.exports=JSON.parse('[{"time_hours":0,"approval_perbill":1000000000,"support_perbill":500000026,"approval":100,"support":50.0000026},{"time_hours":1,"approval_perbill":998774510,"support_perbill":455636061,"approval":99.877451,"support":45.5636061},{"time_hours":2,"approval_perbill":997549020,"support_perbill":418401359,"approval":99.754902,"support":41.8401359},{"time_hours":3,"approval_perbill":996323530,"support_perbill":386705228,"approval":99.632353,"support":38.6705228},{"time_hours":4,"approval_perbill":995098040,"support_perbill":359397443,"approval":99.509804,"support":35.9397443},{"time_hours":5,"approval_perbill":993872550,"support_perbill":335625639,"approval":99.387255,"support":33.5625639},{"time_hours":6,"approval_perbill":992647060,"support_perbill":314744813,"approval":99.264706,"support":31.4744813},{"time_hours":7,"approval_perbill":991421570,"support_perbill":296257808,"approval":99.142157,"support":29.6257808},{"time_hours":8,"approval_perbill":990196080,"support_perbill":279775293,"approval":99.019608,"support":27.9775293},{"time_hours":9,"approval_perbill":988970589,"support_perbill":264988013,"approval":98.8970589,"support":26.4988013},{"time_hours":10,"approval_perbill":987745099,"support_perbill":251647242,"approval":98.7745099,"support":25.1647242},{"time_hours":11,"approval_perbill":986519609,"support_perbill":239550622,"approval":98.6519609,"support":23.9550622},{"time_hours":12,"approval_perbill":985294119,"support_perbill":228531862,"approval":98.5294119,"support":22.8531862},{"time_hours":13,"approval_perbill":984068628,"support_perbill":218453039,"approval":98.4068628,"support":21.8453039},{"time_hours":14,"approval_perbill":982843138,"support_perbill":209198815,"approval":98.2843138,"support":20.9198815},{"time_hours":15,"approval_perbill":981617648,"support_perbill":200671963,"approval":98.1617648,"support":20.0671963},{"time_hours":16,"approval_perbill":980392158,"support_perbill":192789972,"approval":98.0392158,"support":19.2789972},{"time_hours":17,"approval_perbill":979166667,"support_perbill":185482348,"approval":97.9166667,"support":18.5482348},{"time_hours":18,"approval_perbill":977941177,"support_perbill":178688524,"approval":97.7941177,"support":17.8688524},{"time_hours":19,"approval_perbill":976715687,"support_perbill":172356151,"approval":97.6715687,"support":17.2356151},{"time_hours":20,"approval_perbill":975490197,"support_perbill":166439756,"approval":97.5490197,"support":16.6439756},{"time_hours":21,"approval_perbill":974264706,"support_perbill":160899652,"approval":97.4264706,"support":16.0899652},{"time_hours":22,"approval_perbill":973039216,"support_perbill":155701053,"approval":97.3039216,"support":15.5701053},{"time_hours":23,"approval_perbill":971813726,"support_perbill":150813323,"approval":97.1813726,"support":15.0813323},{"time_hours":24,"approval_perbill":970588236,"support_perbill":146209386,"approval":97.0588236,"support":14.6209386},{"time_hours":25,"approval_perbill":969362746,"support_perbill":141865225,"approval":96.9362746,"support":14.1865225},{"time_hours":26,"approval_perbill":968137256,"support_perbill":137759452,"approval":96.8137256,"support":13.7759452},{"time_hours":27,"approval_perbill":966911766,"support_perbill":133872975,"approval":96.6911766,"support":13.3872975},{"time_hours":28,"approval_perbill":965686276,"support_perbill":130188679,"approval":96.5686276,"support":13.0188679},{"time_hours":29,"approval_perbill":964460786,"support_perbill":126691186,"approval":96.4460786,"support":12.6691186},{"time_hours":30,"approval_perbill":963235295,"support_perbill":123366639,"approval":96.3235295,"support":12.3366639},{"time_hours":31,"approval_perbill":962009805,"support_perbill":120202524,"approval":96.2009805,"support":12.0202524},{"time_hours":32,"approval_perbill":960784315,"support_perbill":117187499,"approval":96.0784315,"support":11.7187499},{"time_hours":33,"approval_perbill":959558825,"support_perbill":114311269,"approval":95.9558825,"support":11.4311269},{"time_hours":34,"approval_perbill":958333334,"support_perbill":111564465,"approval":95.8333334,"support":11.1564465},{"time_hours":35,"approval_perbill":957107844,"support_perbill":108938546,"approval":95.7107844,"support":10.8938546},{"time_hours":36,"approval_perbill":955882354,"support_perbill":106425701,"approval":95.5882354,"support":10.6425701},{"time_hours":37,"approval_perbill":954656864,"support_perbill":104018782,"approval":95.4656864,"support":10.4018782},{"time_hours":38,"approval_perbill":953431373,"support_perbill":101711228,"approval":95.3431373,"support":10.1711228},{"time_hours":39,"approval_perbill":952205883,"support_perbill":99497012,"approval":95.2205883,"support":9.9497012},{"time_hours":40,"approval_perbill":950980393,"support_perbill":97370582,"approval":95.0980393,"support":9.7370582},{"time_hours":41,"approval_perbill":949754903,"support_perbill":95326819,"approval":94.9754903,"support":9.5326819},{"time_hours":42,"approval_perbill":948529412,"support_perbill":93360994,"approval":94.8529412,"support":9.3360994},{"time_hours":43,"approval_perbill":947303922,"support_perbill":91468733,"approval":94.7303922,"support":9.1468733},{"time_hours":44,"approval_perbill":946078432,"support_perbill":89645982,"approval":94.6078432,"support":8.9645982},{"time_hours":45,"approval_perbill":944852942,"support_perbill":87888981,"approval":94.4852942,"support":8.7888981},{"time_hours":46,"approval_perbill":943627452,"support_perbill":86194234,"approval":94.3627452,"support":8.6194234},{"time_hours":47,"approval_perbill":942401961,"support_perbill":84558490,"approval":94.2401961,"support":8.455849},{"time_hours":48,"approval_perbill":941176471,"support_perbill":82978722,"approval":94.1176471,"support":8.2978722},{"time_hours":49,"approval_perbill":939950981,"support_perbill":81452103,"approval":93.9950981,"support":8.1452103},{"time_hours":50,"approval_perbill":938725491,"support_perbill":79975997,"approval":93.8725491,"support":7.9975997},{"time_hours":51,"approval_perbill":937500001,"support_perbill":78547936,"approval":93.7500001,"support":7.8547936},{"time_hours":52,"approval_perbill":936274511,"support_perbill":77165614,"approval":93.6274511,"support":7.7165614},{"time_hours":53,"approval_perbill":935049021,"support_perbill":75826867,"approval":93.5049021,"support":7.5826867},{"time_hours":54,"approval_perbill":933823531,"support_perbill":74529666,"approval":93.3823531,"support":7.4529666},{"time_hours":55,"approval_perbill":932598040,"support_perbill":73272106,"approval":93.259804,"support":7.3272106},{"time_hours":56,"approval_perbill":931372550,"support_perbill":72052400,"approval":93.137255,"support":7.20524},{"time_hours":57,"approval_perbill":930147060,"support_perbill":70868862,"approval":93.014706,"support":7.0868862},{"time_hours":58,"approval_perbill":928921570,"support_perbill":69719908,"approval":92.892157,"support":6.9719908},{"time_hours":59,"approval_perbill":927696079,"support_perbill":68604042,"approval":92.7696079,"support":6.8604042},{"time_hours":60,"approval_perbill":926470589,"support_perbill":67519857,"approval":92.6470589,"support":6.7519857},{"time_hours":61,"approval_perbill":925245099,"support_perbill":66466022,"approval":92.5245099,"support":6.6466022},{"time_hours":62,"approval_perbill":924019609,"support_perbill":65441280,"approval":92.4019609,"support":6.544128},{"time_hours":63,"approval_perbill":922794118,"support_perbill":64444443,"approval":92.2794118,"support":6.4444443},{"time_hours":64,"approval_perbill":921568628,"support_perbill":63474386,"approval":92.1568628,"support":6.3474386},{"time_hours":65,"approval_perbill":920343138,"support_perbill":62530044,"approval":92.0343138,"support":6.2530044},{"time_hours":66,"approval_perbill":919117648,"support_perbill":61610409,"approval":91.9117648,"support":6.1610409},{"time_hours":67,"approval_perbill":917892158,"support_perbill":60714523,"approval":91.7892158,"support":6.0714523},{"time_hours":68,"approval_perbill":916666667,"support_perbill":59841478,"approval":91.6666667,"support":5.9841478},{"time_hours":69,"approval_perbill":915441177,"support_perbill":58990411,"approval":91.5441177,"support":5.8990411},{"time_hours":70,"approval_perbill":914215687,"support_perbill":58160504,"approval":91.4215687,"support":5.8160504},{"time_hours":71,"approval_perbill":912990197,"support_perbill":57350975,"approval":91.2990197,"support":5.7350975},{"time_hours":72,"approval_perbill":911764706,"support_perbill":56561084,"approval":91.1764706,"support":5.6561084},{"time_hours":73,"approval_perbill":910539216,"support_perbill":55790126,"approval":91.0539216,"support":5.5790126},{"time_hours":74,"approval_perbill":909313726,"support_perbill":55037426,"approval":90.9313726,"support":5.5037426},{"time_hours":75,"approval_perbill":908088236,"support_perbill":54302345,"approval":90.8088236,"support":5.4302345},{"time_hours":76,"approval_perbill":906862746,"support_perbill":53584271,"approval":90.6862746,"support":5.3584271},{"time_hours":77,"approval_perbill":905637256,"support_perbill":52882620,"approval":90.5637256,"support":5.288262},{"time_hours":78,"approval_perbill":904411766,"support_perbill":52196835,"approval":90.4411766,"support":5.2196835},{"time_hours":79,"approval_perbill":903186276,"support_perbill":51526385,"approval":90.3186276,"support":5.1526385},{"time_hours":80,"approval_perbill":901960785,"support_perbill":50870759,"approval":90.1960785,"support":5.0870759},{"time_hours":81,"approval_perbill":900735295,"support_perbill":50229473,"approval":90.0735295,"support":5.0229473},{"time_hours":82,"approval_perbill":899509805,"support_perbill":49602061,"approval":89.9509805,"support":4.9602061},{"time_hours":83,"approval_perbill":898284315,"support_perbill":48988077,"approval":89.8284315,"support":4.8988077},{"time_hours":84,"approval_perbill":897058824,"support_perbill":48387095,"approval":89.7058824,"support":4.8387095},{"time_hours":85,"approval_perbill":895833334,"support_perbill":47798707,"approval":89.5833334,"support":4.7798707},{"time_hours":86,"approval_perbill":894607844,"support_perbill":47222519,"approval":89.4607844,"support":4.7222519},{"time_hours":87,"approval_perbill":893382354,"support_perbill":46658158,"approval":89.3382354,"support":4.6658158},{"time_hours":88,"approval_perbill":892156864,"support_perbill":46105262,"approval":89.2156864,"support":4.6105262},{"time_hours":89,"approval_perbill":890931373,"support_perbill":45563485,"approval":89.0931373,"support":4.5563485},{"time_hours":90,"approval_perbill":889705883,"support_perbill":45032496,"approval":88.9705883,"support":4.5032496},{"time_hours":91,"approval_perbill":888480393,"support_perbill":44511976,"approval":88.8480393,"support":4.4511976},{"time_hours":92,"approval_perbill":887254903,"support_perbill":44001617,"approval":88.7254903,"support":4.4001617},{"time_hours":93,"approval_perbill":886029412,"support_perbill":43501126,"approval":88.6029412,"support":4.3501126},{"time_hours":94,"approval_perbill":884803922,"support_perbill":43010218,"approval":88.4803922,"support":4.3010218},{"time_hours":95,"approval_perbill":883578432,"support_perbill":42528621,"approval":88.3578432,"support":4.2528621},{"time_hours":96,"approval_perbill":882352942,"support_perbill":42056074,"approval":88.2352942,"support":4.2056074},{"time_hours":97,"approval_perbill":881127452,"support_perbill":41592321,"approval":88.1127452,"support":4.1592321},{"time_hours":98,"approval_perbill":879901962,"support_perbill":41137122,"approval":87.9901962,"support":4.1137122},{"time_hours":99,"approval_perbill":878676472,"support_perbill":40690242,"approval":87.8676472,"support":4.0690242},{"time_hours":100,"approval_perbill":877450982,"support_perbill":40251453,"approval":87.7450982,"support":4.0251453},{"time_hours":101,"approval_perbill":876225491,"support_perbill":39820539,"approval":87.6225491,"support":3.9820539},{"time_hours":102,"approval_perbill":875000001,"support_perbill":39397289,"approval":87.5000001,"support":3.9397289},{"time_hours":103,"approval_perbill":873774511,"support_perbill":38981501,"approval":87.3774511,"support":3.8981501},{"time_hours":104,"approval_perbill":872549021,"support_perbill":38572980,"approval":87.2549021,"support":3.857298},{"time_hours":105,"approval_perbill":871323530,"support_perbill":38171535,"approval":87.132353,"support":3.8171535},{"time_hours":106,"approval_perbill":870098040,"support_perbill":37776985,"approval":87.009804,"support":3.7776985},{"time_hours":107,"approval_perbill":868872550,"support_perbill":37389155,"approval":86.887255,"support":3.7389155},{"time_hours":108,"approval_perbill":867647060,"support_perbill":37007873,"approval":86.764706,"support":3.7007873},{"time_hours":109,"approval_perbill":866421570,"support_perbill":36632975,"approval":86.642157,"support":3.6632975},{"time_hours":110,"approval_perbill":865196079,"support_perbill":36264302,"approval":86.5196079,"support":3.6264302},{"time_hours":111,"approval_perbill":863970589,"support_perbill":35901701,"approval":86.3970589,"support":3.5901701},{"time_hours":112,"approval_perbill":862745099,"support_perbill":35545023,"approval":86.2745099,"support":3.5545023},{"time_hours":113,"approval_perbill":861519609,"support_perbill":35194123,"approval":86.1519609,"support":3.5194123},{"time_hours":114,"approval_perbill":860294118,"support_perbill":34848862,"approval":86.0294118,"support":3.4848862},{"time_hours":115,"approval_perbill":859068628,"support_perbill":34509106,"approval":85.9068628,"support":3.4509106},{"time_hours":116,"approval_perbill":857843138,"support_perbill":34174724,"approval":85.7843138,"support":3.4174724},{"time_hours":117,"approval_perbill":856617648,"support_perbill":33845590,"approval":85.6617648,"support":3.384559},{"time_hours":118,"approval_perbill":855392157,"support_perbill":33521580,"approval":85.5392157,"support":3.352158},{"time_hours":119,"approval_perbill":854166667,"support_perbill":33202577,"approval":85.4166667,"support":3.3202577},{"time_hours":120,"approval_perbill":852941177,"support_perbill":32888464,"approval":85.2941177,"support":3.2888464},{"time_hours":121,"approval_perbill":851715687,"support_perbill":32579131,"approval":85.1715687,"support":3.2579131},{"time_hours":122,"approval_perbill":850490197,"support_perbill":32274469,"approval":85.0490197,"support":3.2274469},{"time_hours":123,"approval_perbill":849264707,"support_perbill":31974373,"approval":84.9264707,"support":3.1974373},{"time_hours":124,"approval_perbill":848039217,"support_perbill":31678741,"approval":84.8039217,"support":3.1678741},{"time_hours":125,"approval_perbill":846813727,"support_perbill":31387475,"approval":84.6813727,"support":3.1387475},{"time_hours":126,"approval_perbill":845588236,"support_perbill":31100477,"approval":84.5588236,"support":3.1100477},{"time_hours":127,"approval_perbill":844362746,"support_perbill":30817656,"approval":84.4362746,"support":3.0817656},{"time_hours":128,"approval_perbill":843137256,"support_perbill":30538921,"approval":84.3137256,"support":3.0538921},{"time_hours":129,"approval_perbill":841911766,"support_perbill":30264184,"approval":84.1911766,"support":3.0264184},{"time_hours":130,"approval_perbill":840686276,"support_perbill":29993358,"approval":84.0686276,"support":2.9993358},{"time_hours":131,"approval_perbill":839460785,"support_perbill":29726363,"approval":83.9460785,"support":2.9726363},{"time_hours":132,"approval_perbill":838235295,"support_perbill":29463116,"approval":83.8235295,"support":2.9463116},{"time_hours":133,"approval_perbill":837009805,"support_perbill":29203539,"approval":83.7009805,"support":2.9203539},{"time_hours":134,"approval_perbill":835784315,"support_perbill":28947556,"approval":83.5784315,"support":2.8947556},{"time_hours":135,"approval_perbill":834558824,"support_perbill":28695094,"approval":83.4558824,"support":2.8695094},{"time_hours":136,"approval_perbill":833333334,"support_perbill":28446079,"approval":83.3333334,"support":2.8446079},{"time_hours":137,"approval_perbill":832107844,"support_perbill":28200442,"approval":83.2107844,"support":2.8200442},{"time_hours":138,"approval_perbill":830882354,"support_perbill":27958114,"approval":83.0882354,"support":2.7958114},{"time_hours":139,"approval_perbill":829656863,"support_perbill":27719030,"approval":82.9656863,"support":2.771903},{"time_hours":140,"approval_perbill":828431373,"support_perbill":27483123,"approval":82.8431373,"support":2.7483123},{"time_hours":141,"approval_perbill":827205883,"support_perbill":27250333,"approval":82.7205883,"support":2.7250333},{"time_hours":142,"approval_perbill":825980393,"support_perbill":27020596,"approval":82.5980393,"support":2.7020596},{"time_hours":143,"approval_perbill":824754902,"support_perbill":26793853,"approval":82.4754902,"support":2.6793853},{"time_hours":144,"approval_perbill":823529412,"support_perbill":26570047,"approval":82.3529412,"support":2.6570047},{"time_hours":145,"approval_perbill":822303922,"support_perbill":26349121,"approval":82.2303922,"support":2.6349121},{"time_hours":146,"approval_perbill":821078432,"support_perbill":26131019,"approval":82.1078432,"support":2.6131019},{"time_hours":147,"approval_perbill":819852942,"support_perbill":25915687,"approval":81.9852942,"support":2.5915687},{"time_hours":148,"approval_perbill":818627452,"support_perbill":25703073,"approval":81.8627452,"support":2.5703073},{"time_hours":149,"approval_perbill":817401962,"support_perbill":25493126,"approval":81.7401962,"support":2.5493126},{"time_hours":150,"approval_perbill":816176472,"support_perbill":25285796,"approval":81.6176472,"support":2.5285796},{"time_hours":151,"approval_perbill":814950982,"support_perbill":25081035,"approval":81.4950982,"support":2.5081035},{"time_hours":152,"approval_perbill":813725491,"support_perbill":24878795,"approval":81.3725491,"support":2.4878795},{"time_hours":153,"approval_perbill":812500001,"support_perbill":24679029,"approval":81.2500001,"support":2.4679029},{"time_hours":154,"approval_perbill":811274511,"support_perbill":24481693,"approval":81.1274511,"support":2.4481693},{"time_hours":155,"approval_perbill":810049021,"support_perbill":24286742,"approval":81.0049021,"support":2.4286742},{"time_hours":156,"approval_perbill":808823530,"support_perbill":24094134,"approval":80.882353,"support":2.4094134},{"time_hours":157,"approval_perbill":807598040,"support_perbill":23903827,"approval":80.759804,"support":2.3903827},{"time_hours":158,"approval_perbill":806372550,"support_perbill":23715779,"approval":80.637255,"support":2.3715779},{"time_hours":159,"approval_perbill":805147060,"support_perbill":23529951,"approval":80.514706,"support":2.3529951},{"time_hours":160,"approval_perbill":803921569,"support_perbill":23346303,"approval":80.3921569,"support":2.3346303},{"time_hours":161,"approval_perbill":802696079,"support_perbill":23164797,"approval":80.2696079,"support":2.3164797},{"time_hours":162,"approval_perbill":801470589,"support_perbill":22985397,"approval":80.1470589,"support":2.2985397},{"time_hours":163,"approval_perbill":800245099,"support_perbill":22808065,"approval":80.0245099,"support":2.2808065},{"time_hours":164,"approval_perbill":799019608,"support_perbill":22632766,"approval":79.9019608,"support":2.2632766},{"time_hours":165,"approval_perbill":797794118,"support_perbill":22459466,"approval":79.7794118,"support":2.2459466},{"time_hours":166,"approval_perbill":796568628,"support_perbill":22288130,"approval":79.6568628,"support":2.228813},{"time_hours":167,"approval_perbill":795343138,"support_perbill":22118725,"approval":79.5343138,"support":2.2118725},{"time_hours":168,"approval_perbill":794117648,"support_perbill":21951219,"approval":79.4117648,"support":2.1951219},{"time_hours":169,"approval_perbill":792892158,"support_perbill":21785579,"approval":79.2892158,"support":2.1785579},{"time_hours":170,"approval_perbill":791666668,"support_perbill":21621776,"approval":79.1666668,"support":2.1621776},{"time_hours":171,"approval_perbill":790441178,"support_perbill":21459778,"approval":79.0441178,"support":2.1459778},{"time_hours":172,"approval_perbill":789215688,"support_perbill":21299556,"approval":78.9215688,"support":2.1299556},{"time_hours":173,"approval_perbill":787990197,"support_perbill":21141081,"approval":78.7990197,"support":2.1141081},{"time_hours":174,"approval_perbill":786764707,"support_perbill":20984324,"approval":78.6764707,"support":2.0984324},{"time_hours":175,"approval_perbill":785539217,"support_perbill":20829258,"approval":78.5539217,"support":2.0829258},{"time_hours":176,"approval_perbill":784313727,"support_perbill":20675855,"approval":78.4313727,"support":2.0675855},{"time_hours":177,"approval_perbill":783088236,"support_perbill":20524089,"approval":78.3088236,"support":2.0524089},{"time_hours":178,"approval_perbill":781862746,"support_perbill":20373934,"approval":78.1862746,"support":2.0373934},{"time_hours":179,"approval_perbill":780637256,"support_perbill":20225364,"approval":78.0637256,"support":2.0225364},{"time_hours":180,"approval_perbill":779411766,"support_perbill":20078354,"approval":77.9411766,"support":2.0078354},{"time_hours":181,"approval_perbill":778186275,"support_perbill":19932880,"approval":77.8186275,"support":1.993288},{"time_hours":182,"approval_perbill":776960785,"support_perbill":19788917,"approval":77.6960785,"support":1.9788917},{"time_hours":183,"approval_perbill":775735295,"support_perbill":19646444,"approval":77.5735295,"support":1.9646444},{"time_hours":184,"approval_perbill":774509805,"support_perbill":19505435,"approval":77.4509805,"support":1.9505435},{"time_hours":185,"approval_perbill":773284314,"support_perbill":19365870,"approval":77.3284314,"support":1.936587},{"time_hours":186,"approval_perbill":772058824,"support_perbill":19227725,"approval":77.2058824,"support":1.9227725},{"time_hours":187,"approval_perbill":770833334,"support_perbill":19090980,"approval":77.0833334,"support":1.909098},{"time_hours":188,"approval_perbill":769607844,"support_perbill":18955613,"approval":76.9607844,"support":1.8955613},{"time_hours":189,"approval_perbill":768382353,"support_perbill":18821603,"approval":76.8382353,"support":1.8821603},{"time_hours":190,"approval_perbill":767156863,"support_perbill":18688931,"approval":76.7156863,"support":1.8688931},{"time_hours":191,"approval_perbill":765931373,"support_perbill":18557575,"approval":76.5931373,"support":1.8557575},{"time_hours":192,"approval_perbill":764705883,"support_perbill":18427518,"approval":76.4705883,"support":1.8427518},{"time_hours":193,"approval_perbill":763480393,"support_perbill":18298739,"approval":76.3480393,"support":1.8298739},{"time_hours":194,"approval_perbill":762254903,"support_perbill":18171219,"approval":76.2254903,"support":1.8171219},{"time_hours":195,"approval_perbill":761029413,"support_perbill":18044941,"approval":76.1029413,"support":1.8044941},{"time_hours":196,"approval_perbill":759803923,"support_perbill":17919887,"approval":75.9803923,"support":1.7919887},{"time_hours":197,"approval_perbill":758578433,"support_perbill":17796038,"approval":75.8578433,"support":1.7796038},{"time_hours":198,"approval_perbill":757352942,"support_perbill":17673377,"approval":75.7352942,"support":1.7673377},{"time_hours":199,"approval_perbill":756127452,"support_perbill":17551888,"approval":75.6127452,"support":1.7551888},{"time_hours":200,"approval_perbill":754901962,"support_perbill":17431553,"approval":75.4901962,"support":1.7431553},{"time_hours":201,"approval_perbill":753676472,"support_perbill":17312357,"approval":75.3676472,"support":1.7312357},{"time_hours":202,"approval_perbill":752450981,"support_perbill":17194282,"approval":75.2450981,"support":1.7194282},{"time_hours":203,"approval_perbill":751225491,"support_perbill":17077315,"approval":75.1225491,"support":1.7077315},{"time_hours":204,"approval_perbill":750000001,"support_perbill":16961437,"approval":75.0000001,"support":1.6961437},{"time_hours":205,"approval_perbill":748774511,"support_perbill":16846636,"approval":74.8774511,"support":1.6846636},{"time_hours":206,"approval_perbill":747549020,"support_perbill":16732895,"approval":74.754902,"support":1.6732895},{"time_hours":207,"approval_perbill":746323530,"support_perbill":16620201,"approval":74.632353,"support":1.6620201},{"time_hours":208,"approval_perbill":745098040,"support_perbill":16508538,"approval":74.509804,"support":1.6508538},{"time_hours":209,"approval_perbill":743872550,"support_perbill":16397893,"approval":74.387255,"support":1.6397893},{"time_hours":210,"approval_perbill":742647059,"support_perbill":16288252,"approval":74.2647059,"support":1.6288252},{"time_hours":211,"approval_perbill":741421569,"support_perbill":16179601,"approval":74.1421569,"support":1.6179601},{"time_hours":212,"approval_perbill":740196079,"support_perbill":16071927,"approval":74.0196079,"support":1.6071927},{"time_hours":213,"approval_perbill":738970589,"support_perbill":15965217,"approval":73.8970589,"support":1.5965217},{"time_hours":214,"approval_perbill":737745099,"support_perbill":15859457,"approval":73.7745099,"support":1.5859457},{"time_hours":215,"approval_perbill":736519608,"support_perbill":15754636,"approval":73.6519608,"support":1.5754636},{"time_hours":216,"approval_perbill":735294118,"support_perbill":15650741,"approval":73.5294118,"support":1.5650741},{"time_hours":217,"approval_perbill":734068628,"support_perbill":15547759,"approval":73.4068628,"support":1.5547759},{"time_hours":218,"approval_perbill":732843138,"support_perbill":15445679,"approval":73.2843138,"support":1.5445679},{"time_hours":219,"approval_perbill":731617648,"support_perbill":15344488,"approval":73.1617648,"support":1.5344488},{"time_hours":220,"approval_perbill":730392158,"support_perbill":15244176,"approval":73.0392158,"support":1.5244176},{"time_hours":221,"approval_perbill":729166668,"support_perbill":15144731,"approval":72.9166668,"support":1.5144731},{"time_hours":222,"approval_perbill":727941178,"support_perbill":15046141,"approval":72.7941178,"support":1.5046141},{"time_hours":223,"approval_perbill":726715687,"support_perbill":14948396,"approval":72.6715687,"support":1.4948396},{"time_hours":224,"approval_perbill":725490197,"support_perbill":14851485,"approval":72.5490197,"support":1.4851485},{"time_hours":225,"approval_perbill":724264707,"support_perbill":14755396,"approval":72.4264707,"support":1.4755396},{"time_hours":226,"approval_perbill":723039217,"support_perbill":14660121,"approval":72.3039217,"support":1.4660121},{"time_hours":227,"approval_perbill":721813726,"support_perbill":14565648,"approval":72.1813726,"support":1.4565648},{"time_hours":228,"approval_perbill":720588236,"support_perbill":14471968,"approval":72.0588236,"support":1.4471968},{"time_hours":229,"approval_perbill":719362746,"support_perbill":14379070,"approval":71.9362746,"support":1.437907},{"time_hours":230,"approval_perbill":718137256,"support_perbill":14286945,"approval":71.8137256,"support":1.4286945},{"time_hours":231,"approval_perbill":716911765,"support_perbill":14195583,"approval":71.6911765,"support":1.4195583},{"time_hours":232,"approval_perbill":715686275,"support_perbill":14104975,"approval":71.5686275,"support":1.4104975},{"time_hours":233,"approval_perbill":714460785,"support_perbill":14015111,"approval":71.4460785,"support":1.4015111},{"time_hours":234,"approval_perbill":713235295,"support_perbill":13925982,"approval":71.3235295,"support":1.3925982},{"time_hours":235,"approval_perbill":712009805,"support_perbill":13837579,"approval":71.2009805,"support":1.3837579},{"time_hours":236,"approval_perbill":710784314,"support_perbill":13749894,"approval":71.0784314,"support":1.3749894},{"time_hours":237,"approval_perbill":709558824,"support_perbill":13662918,"approval":70.9558824,"support":1.3662918},{"time_hours":238,"approval_perbill":708333334,"support_perbill":13576642,"approval":70.8333334,"support":1.3576642},{"time_hours":239,"approval_perbill":707107844,"support_perbill":13491057,"approval":70.7107844,"support":1.3491057},{"time_hours":240,"approval_perbill":705882353,"support_perbill":13406156,"approval":70.5882353,"support":1.3406156},{"time_hours":241,"approval_perbill":704656863,"support_perbill":13321931,"approval":70.4656863,"support":1.3321931},{"time_hours":242,"approval_perbill":703431373,"support_perbill":13238372,"approval":70.3431373,"support":1.3238372},{"time_hours":243,"approval_perbill":702205883,"support_perbill":13155473,"approval":70.2205883,"support":1.3155473},{"time_hours":244,"approval_perbill":700980393,"support_perbill":13073226,"approval":70.0980393,"support":1.3073226},{"time_hours":245,"approval_perbill":699754903,"support_perbill":12991622,"approval":69.9754903,"support":1.2991622},{"time_hours":246,"approval_perbill":698529413,"support_perbill":12910655,"approval":69.8529413,"support":1.2910655},{"time_hours":247,"approval_perbill":697303923,"support_perbill":12830317,"approval":69.7303923,"support":1.2830317},{"time_hours":248,"approval_perbill":696078432,"support_perbill":12750601,"approval":69.6078432,"support":1.2750601},{"time_hours":249,"approval_perbill":694852942,"support_perbill":12671499,"approval":69.4852942,"support":1.2671499},{"time_hours":250,"approval_perbill":693627452,"support_perbill":12593005,"approval":69.3627452,"support":1.2593005},{"time_hours":251,"approval_perbill":692401962,"support_perbill":12515111,"approval":69.2401962,"support":1.2515111},{"time_hours":252,"approval_perbill":691176471,"support_perbill":12437810,"approval":69.1176471,"support":1.243781},{"time_hours":253,"approval_perbill":689950981,"support_perbill":12361097,"approval":68.9950981,"support":1.2361097},{"time_hours":254,"approval_perbill":688725491,"support_perbill":12284964,"approval":68.8725491,"support":1.2284964},{"time_hours":255,"approval_perbill":687500001,"support_perbill":12209404,"approval":68.7500001,"support":1.2209404},{"time_hours":256,"approval_perbill":686274511,"support_perbill":12134411,"approval":68.6274511,"support":1.2134411},{"time_hours":257,"approval_perbill":685049020,"support_perbill":12059980,"approval":68.504902,"support":1.205998},{"time_hours":258,"approval_perbill":683823530,"support_perbill":11986103,"approval":68.382353,"support":1.1986103},{"time_hours":259,"approval_perbill":682598040,"support_perbill":11912774,"approval":68.259804,"support":1.1912774},{"time_hours":260,"approval_perbill":681372550,"support_perbill":11839987,"approval":68.137255,"support":1.1839987},{"time_hours":261,"approval_perbill":680147059,"support_perbill":11767737,"approval":68.0147059,"support":1.1767737},{"time_hours":262,"approval_perbill":678921569,"support_perbill":11696017,"approval":67.8921569,"support":1.1696017},{"time_hours":263,"approval_perbill":677696079,"support_perbill":11624822,"approval":67.7696079,"support":1.1624822},{"time_hours":264,"approval_perbill":676470589,"support_perbill":11554145,"approval":67.6470589,"support":1.1554145},{"time_hours":265,"approval_perbill":675245099,"support_perbill":11483982,"approval":67.5245099,"support":1.1483982},{"time_hours":266,"approval_perbill":674019609,"support_perbill":11414326,"approval":67.4019609,"support":1.1414326},{"time_hours":267,"approval_perbill":672794119,"support_perbill":11345173,"approval":67.2794119,"support":1.1345173},{"time_hours":268,"approval_perbill":671568629,"support_perbill":11276516,"approval":67.1568629,"support":1.1276516},{"time_hours":269,"approval_perbill":670343138,"support_perbill":11208351,"approval":67.0343138,"support":1.1208351},{"time_hours":270,"approval_perbill":669117648,"support_perbill":11140671,"approval":66.9117648,"support":1.1140671},{"time_hours":271,"approval_perbill":667892158,"support_perbill":11073473,"approval":66.7892158,"support":1.1073473},{"time_hours":272,"approval_perbill":666666668,"support_perbill":11006750,"approval":66.6666668,"support":1.100675},{"time_hours":273,"approval_perbill":665441177,"support_perbill":10940499,"approval":66.5441177,"support":1.0940499},{"time_hours":274,"approval_perbill":664215687,"support_perbill":10874713,"approval":66.4215687,"support":1.0874713},{"time_hours":275,"approval_perbill":662990197,"support_perbill":10809388,"approval":66.2990197,"support":1.0809388},{"time_hours":276,"approval_perbill":661764707,"support_perbill":10744519,"approval":66.1764707,"support":1.0744519},{"time_hours":277,"approval_perbill":660539217,"support_perbill":10680101,"approval":66.0539217,"support":1.0680101},{"time_hours":278,"approval_perbill":659313726,"support_perbill":10616130,"approval":65.9313726,"support":1.061613},{"time_hours":279,"approval_perbill":658088236,"support_perbill":10552601,"approval":65.8088236,"support":1.0552601},{"time_hours":280,"approval_perbill":656862746,"support_perbill":10489510,"approval":65.6862746,"support":1.048951},{"time_hours":281,"approval_perbill":655637256,"support_perbill":10426852,"approval":65.5637256,"support":1.0426852},{"time_hours":282,"approval_perbill":654411765,"support_perbill":10364622,"approval":65.4411765,"support":1.0364622},{"time_hours":283,"approval_perbill":653186275,"support_perbill":10302816,"approval":65.3186275,"support":1.0302816},{"time_hours":284,"approval_perbill":651960785,"support_perbill":10241430,"approval":65.1960785,"support":1.024143},{"time_hours":285,"approval_perbill":650735295,"support_perbill":10180459,"approval":65.0735295,"support":1.0180459},{"time_hours":286,"approval_perbill":649509804,"support_perbill":10119900,"approval":64.9509804,"support":1.01199},{"time_hours":287,"approval_perbill":648284314,"support_perbill":10059748,"approval":64.8284314,"support":1.0059748},{"time_hours":288,"approval_perbill":647058824,"support_perbill":10000000,"approval":64.7058824,"support":1},{"time_hours":289,"approval_perbill":645833334,"support_perbill":9940650,"approval":64.5833334,"support":0.994065},{"time_hours":290,"approval_perbill":644607844,"support_perbill":9881695,"approval":64.4607844,"support":0.9881695},{"time_hours":291,"approval_perbill":643382354,"support_perbill":9823132,"approval":64.3382354,"support":0.9823132},{"time_hours":292,"approval_perbill":642156864,"support_perbill":9764955,"approval":64.2156864,"support":0.9764955},{"time_hours":293,"approval_perbill":640931374,"support_perbill":9707163,"approval":64.0931374,"support":0.9707163},{"time_hours":294,"approval_perbill":639705883,"support_perbill":9649749,"approval":63.9705883,"support":0.9649749},{"time_hours":295,"approval_perbill":638480393,"support_perbill":9592712,"approval":63.8480393,"support":0.9592712},{"time_hours":296,"approval_perbill":637254903,"support_perbill":9536047,"approval":63.7254903,"support":0.9536047},{"time_hours":297,"approval_perbill":636029413,"support_perbill":9479751,"approval":63.6029413,"support":0.9479751},{"time_hours":298,"approval_perbill":634803923,"support_perbill":9423820,"approval":63.4803923,"support":0.942382},{"time_hours":299,"approval_perbill":633578432,"support_perbill":9368250,"approval":63.3578432,"support":0.936825},{"time_hours":300,"approval_perbill":632352942,"support_perbill":9313038,"approval":63.2352942,"support":0.9313038},{"time_hours":301,"approval_perbill":631127452,"support_perbill":9258181,"approval":63.1127452,"support":0.9258181},{"time_hours":302,"approval_perbill":629901962,"support_perbill":9203674,"approval":62.9901962,"support":0.9203674},{"time_hours":303,"approval_perbill":628676471,"support_perbill":9149516,"approval":62.8676471,"support":0.9149516},{"time_hours":304,"approval_perbill":627450981,"support_perbill":9095702,"approval":62.7450981,"support":0.9095702},{"time_hours":305,"approval_perbill":626225491,"support_perbill":9042230,"approval":62.6225491,"support":0.904223},{"time_hours":306,"approval_perbill":625000001,"support_perbill":8989095,"approval":62.5000001,"support":0.8989095},{"time_hours":307,"approval_perbill":623774510,"support_perbill":8936295,"approval":62.377451,"support":0.8936295},{"time_hours":308,"approval_perbill":622549020,"support_perbill":8883826,"approval":62.254902,"support":0.8883826},{"time_hours":309,"approval_perbill":621323530,"support_perbill":8831687,"approval":62.132353,"support":0.8831687},{"time_hours":310,"approval_perbill":620098040,"support_perbill":8779872,"approval":62.009804,"support":0.8779872},{"time_hours":311,"approval_perbill":618872549,"support_perbill":8728380,"approval":61.8872549,"support":0.872838},{"time_hours":312,"approval_perbill":617647059,"support_perbill":8677207,"approval":61.7647059,"support":0.8677207},{"time_hours":313,"approval_perbill":616421569,"support_perbill":8626351,"approval":61.6421569,"support":0.8626351},{"time_hours":314,"approval_perbill":615196079,"support_perbill":8575808,"approval":61.5196079,"support":0.8575808},{"time_hours":315,"approval_perbill":613970589,"support_perbill":8525576,"approval":61.3970589,"support":0.8525576},{"time_hours":316,"approval_perbill":612745099,"support_perbill":8475652,"approval":61.2745099,"support":0.8475652},{"time_hours":317,"approval_perbill":611519609,"support_perbill":8426032,"approval":61.1519609,"support":0.8426032},{"time_hours":318,"approval_perbill":610294119,"support_perbill":8376715,"approval":61.0294119,"support":0.8376715},{"time_hours":319,"approval_perbill":609068629,"support_perbill":8327697,"approval":60.9068629,"support":0.8327697},{"time_hours":320,"approval_perbill":607843138,"support_perbill":8278976,"approval":60.7843138,"support":0.8278976},{"time_hours":321,"approval_perbill":606617648,"support_perbill":8230549,"approval":60.6617648,"support":0.8230549},{"time_hours":322,"approval_perbill":605392158,"support_perbill":8182413,"approval":60.5392158,"support":0.8182413},{"time_hours":323,"approval_perbill":604166668,"support_perbill":8134566,"approval":60.4166668,"support":0.8134566},{"time_hours":324,"approval_perbill":602941177,"support_perbill":8087005,"approval":60.2941177,"support":0.8087005},{"time_hours":325,"approval_perbill":601715687,"support_perbill":8039727,"approval":60.1715687,"support":0.8039727},{"time_hours":326,"approval_perbill":600490197,"support_perbill":7992731,"approval":60.0490197,"support":0.7992731},{"time_hours":327,"approval_perbill":599264707,"support_perbill":7946013,"approval":59.9264707,"support":0.7946013},{"time_hours":328,"approval_perbill":598039216,"support_perbill":7899571,"approval":59.8039216,"support":0.7899571},{"time_hours":329,"approval_perbill":596813726,"support_perbill":7853403,"approval":59.6813726,"support":0.7853403},{"time_hours":330,"approval_perbill":595588236,"support_perbill":7807506,"approval":59.5588236,"support":0.7807506},{"time_hours":331,"approval_perbill":594362746,"support_perbill":7761878,"approval":59.4362746,"support":0.7761878},{"time_hours":332,"approval_perbill":593137255,"support_perbill":7716516,"approval":59.3137255,"support":0.7716516},{"time_hours":333,"approval_perbill":591911765,"support_perbill":7671418,"approval":59.1911765,"support":0.7671418},{"time_hours":334,"approval_perbill":590686275,"support_perbill":7626583,"approval":59.0686275,"support":0.7626583},{"time_hours":335,"approval_perbill":589460785,"support_perbill":7582007,"approval":58.9460785,"support":0.7582007},{"time_hours":336,"approval_perbill":588235295,"support_perbill":7537688,"approval":58.8235295,"support":0.7537688},{"time_hours":337,"approval_perbill":587009805,"support_perbill":7493624,"approval":58.7009805,"support":0.7493624},{"time_hours":338,"approval_perbill":585784315,"support_perbill":7449814,"approval":58.5784315,"support":0.7449814},{"time_hours":339,"approval_perbill":584558825,"support_perbill":7406254,"approval":58.4558825,"support":0.7406254},{"time_hours":340,"approval_perbill":583333335,"support_perbill":7362942,"approval":58.3333335,"support":0.7362942},{"time_hours":341,"approval_perbill":582107844,"support_perbill":7319878,"approval":58.2107844,"support":0.7319878},{"time_hours":342,"approval_perbill":580882354,"support_perbill":7277057,"approval":58.0882354,"support":0.7277057},{"time_hours":343,"approval_perbill":579656864,"support_perbill":7234479,"approval":57.9656864,"support":0.7234479},{"time_hours":344,"approval_perbill":578431374,"support_perbill":7192141,"approval":57.8431374,"support":0.7192141},{"time_hours":345,"approval_perbill":577205883,"support_perbill":7150041,"approval":57.7205883,"support":0.7150041},{"time_hours":346,"approval_perbill":575980393,"support_perbill":7108178,"approval":57.5980393,"support":0.7108178},{"time_hours":347,"approval_perbill":574754903,"support_perbill":7066548,"approval":57.4754903,"support":0.7066548},{"time_hours":348,"approval_perbill":573529413,"support_perbill":7025151,"approval":57.3529413,"support":0.7025151},{"time_hours":349,"approval_perbill":572303922,"support_perbill":6983985,"approval":57.2303922,"support":0.6983985},{"time_hours":350,"approval_perbill":571078432,"support_perbill":6943047,"approval":57.1078432,"support":0.6943047},{"time_hours":351,"approval_perbill":569852942,"support_perbill":6902335,"approval":56.9852942,"support":0.6902335},{"time_hours":352,"approval_perbill":568627452,"support_perbill":6861848,"approval":56.8627452,"support":0.6861848},{"time_hours":353,"approval_perbill":567401961,"support_perbill":6821584,"approval":56.7401961,"support":0.6821584},{"time_hours":354,"approval_perbill":566176471,"support_perbill":6781540,"approval":56.6176471,"support":0.678154},{"time_hours":355,"approval_perbill":564950981,"support_perbill":6741716,"approval":56.4950981,"support":0.6741716},{"time_hours":356,"approval_perbill":563725491,"support_perbill":6702109,"approval":56.3725491,"support":0.6702109},{"time_hours":357,"approval_perbill":562500000,"support_perbill":6662718,"approval":56.25,"support":0.6662718},{"time_hours":358,"approval_perbill":561274510,"support_perbill":6623541,"approval":56.127451,"support":0.6623541},{"time_hours":359,"approval_perbill":560049020,"support_perbill":6584575,"approval":56.004902,"support":0.6584575},{"time_hours":360,"approval_perbill":558823530,"support_perbill":6545820,"approval":55.882353,"support":0.654582},{"time_hours":361,"approval_perbill":557598040,"support_perbill":6507274,"approval":55.759804,"support":0.6507274},{"time_hours":362,"approval_perbill":556372550,"support_perbill":6468935,"approval":55.637255,"support":0.6468935},{"time_hours":363,"approval_perbill":555147060,"support_perbill":6430801,"approval":55.514706,"support":0.6430801},{"time_hours":364,"approval_perbill":553921570,"support_perbill":6392871,"approval":55.392157,"support":0.6392871},{"time_hours":365,"approval_perbill":552696080,"support_perbill":6355142,"approval":55.269608,"support":0.6355142},{"time_hours":366,"approval_perbill":551470589,"support_perbill":6317615,"approval":55.1470589,"support":0.6317615},{"time_hours":367,"approval_perbill":550245099,"support_perbill":6280286,"approval":55.0245099,"support":0.6280286},{"time_hours":368,"approval_perbill":549019609,"support_perbill":6243154,"approval":54.9019609,"support":0.6243154},{"time_hours":369,"approval_perbill":547794119,"support_perbill":6206218,"approval":54.7794119,"support":0.6206218},{"time_hours":370,"approval_perbill":546568628,"support_perbill":6169476,"approval":54.6568628,"support":0.6169476},{"time_hours":371,"approval_perbill":545343138,"support_perbill":6132927,"approval":54.5343138,"support":0.6132927},{"time_hours":372,"approval_perbill":544117648,"support_perbill":6096569,"approval":54.4117648,"support":0.6096569},{"time_hours":373,"approval_perbill":542892158,"support_perbill":6060401,"approval":54.2892158,"support":0.6060401},{"time_hours":374,"approval_perbill":541666667,"support_perbill":6024421,"approval":54.1666667,"support":0.6024421},{"time_hours":375,"approval_perbill":540441177,"support_perbill":5988627,"approval":54.0441177,"support":0.5988627},{"time_hours":376,"approval_perbill":539215687,"support_perbill":5953019,"approval":53.9215687,"support":0.5953019},{"time_hours":377,"approval_perbill":537990197,"support_perbill":5917595,"approval":53.7990197,"support":0.5917595},{"time_hours":378,"approval_perbill":536764706,"support_perbill":5882353,"approval":53.6764706,"support":0.5882353},{"time_hours":379,"approval_perbill":535539216,"support_perbill":5847292,"approval":53.5539216,"support":0.5847292},{"time_hours":380,"approval_perbill":534313726,"support_perbill":5812410,"approval":53.4313726,"support":0.581241},{"time_hours":381,"approval_perbill":533088236,"support_perbill":5777707,"approval":53.3088236,"support":0.5777707},{"time_hours":382,"approval_perbill":531862746,"support_perbill":5743181,"approval":53.1862746,"support":0.5743181},{"time_hours":383,"approval_perbill":530637255,"support_perbill":5708830,"approval":53.0637255,"support":0.570883},{"time_hours":384,"approval_perbill":529411765,"support_perbill":5674653,"approval":52.9411765,"support":0.5674653},{"time_hours":385,"approval_perbill":528186275,"support_perbill":5640649,"approval":52.8186275,"support":0.5640649},{"time_hours":386,"approval_perbill":526960785,"support_perbill":5606817,"approval":52.6960785,"support":0.5606817},{"time_hours":387,"approval_perbill":525735295,"support_perbill":5573155,"approval":52.5735295,"support":0.5573155},{"time_hours":388,"approval_perbill":524509805,"support_perbill":5539662,"approval":52.4509805,"support":0.5539662},{"time_hours":389,"approval_perbill":523284315,"support_perbill":5506336,"approval":52.3284315,"support":0.5506336},{"time_hours":390,"approval_perbill":522058825,"support_perbill":5473177,"approval":52.2058825,"support":0.5473177},{"time_hours":391,"approval_perbill":520833334,"support_perbill":5440183,"approval":52.0833334,"support":0.5440183},{"time_hours":392,"approval_perbill":519607844,"support_perbill":5407354,"approval":51.9607844,"support":0.5407354},{"time_hours":393,"approval_perbill":518382354,"support_perbill":5374687,"approval":51.8382354,"support":0.5374687},{"time_hours":394,"approval_perbill":517156864,"support_perbill":5342181,"approval":51.7156864,"support":0.5342181},{"time_hours":395,"approval_perbill":515931373,"support_perbill":5309836,"approval":51.5931373,"support":0.5309836},{"time_hours":396,"approval_perbill":514705883,"support_perbill":5277650,"approval":51.4705883,"support":0.527765},{"time_hours":397,"approval_perbill":513480393,"support_perbill":5245622,"approval":51.3480393,"support":0.5245622},{"time_hours":398,"approval_perbill":512254903,"support_perbill":5213751,"approval":51.2254903,"support":0.5213751},{"time_hours":399,"approval_perbill":511029412,"support_perbill":5182035,"approval":51.1029412,"support":0.5182035},{"time_hours":400,"approval_perbill":509803922,"support_perbill":5150474,"approval":50.9803922,"support":0.5150474},{"time_hours":401,"approval_perbill":508578432,"support_perbill":5119067,"approval":50.8578432,"support":0.5119067},{"time_hours":402,"approval_perbill":507352942,"support_perbill":5087812,"approval":50.7352942,"support":0.5087812},{"time_hours":403,"approval_perbill":506127452,"support_perbill":5056708,"approval":50.6127452,"support":0.5056708},{"time_hours":404,"approval_perbill":504901961,"support_perbill":5025754,"approval":50.4901961,"support":0.5025754},{"time_hours":405,"approval_perbill":503676471,"support_perbill":4994949,"approval":50.3676471,"support":0.4994949},{"time_hours":406,"approval_perbill":502450981,"support_perbill":4964292,"approval":50.2450981,"support":0.4964292},{"time_hours":407,"approval_perbill":501225491,"support_perbill":4933782,"approval":50.1225491,"support":0.4933782},{"time_hours":408,"approval_perbill":500000000,"support_perbill":4903417,"approval":50,"support":0.4903417},{"time_hours":409,"approval_perbill":500000000,"support_perbill":4873198,"approval":50,"support":0.4873198},{"time_hours":410,"approval_perbill":500000000,"support_perbill":4843122,"approval":50,"support":0.4843122},{"time_hours":411,"approval_perbill":500000000,"support_perbill":4813189,"approval":50,"support":0.4813189},{"time_hours":412,"approval_perbill":500000000,"support_perbill":4783398,"approval":50,"support":0.4783398},{"time_hours":413,"approval_perbill":500000000,"support_perbill":4753747,"approval":50,"support":0.4753747},{"time_hours":414,"approval_perbill":500000000,"support_perbill":4724236,"approval":50,"support":0.4724236},{"time_hours":415,"approval_perbill":500000000,"support_perbill":4694864,"approval":50,"support":0.4694864},{"time_hours":416,"approval_perbill":500000000,"support_perbill":4665630,"approval":50,"support":0.466563},{"time_hours":417,"approval_perbill":500000000,"support_perbill":4636532,"approval":50,"support":0.4636532},{"time_hours":418,"approval_perbill":500000000,"support_perbill":4607570,"approval":50,"support":0.460757},{"time_hours":419,"approval_perbill":500000000,"support_perbill":4578743,"approval":50,"support":0.4578743},{"time_hours":420,"approval_perbill":500000000,"support_perbill":4550050,"approval":50,"support":0.455005},{"time_hours":421,"approval_perbill":500000000,"support_perbill":4521490,"approval":50,"support":0.452149},{"time_hours":422,"approval_perbill":500000000,"support_perbill":4493062,"approval":50,"support":0.4493062},{"time_hours":423,"approval_perbill":500000000,"support_perbill":4464766,"approval":50,"support":0.4464766},{"time_hours":424,"approval_perbill":500000000,"support_perbill":4436599,"approval":50,"support":0.4436599},{"time_hours":425,"approval_perbill":500000000,"support_perbill":4408562,"approval":50,"support":0.4408562},{"time_hours":426,"approval_perbill":500000000,"support_perbill":4380654,"approval":50,"support":0.4380654},{"time_hours":427,"approval_perbill":500000000,"support_perbill":4352873,"approval":50,"support":0.4352873},{"time_hours":428,"approval_perbill":500000000,"support_perbill":4325218,"approval":50,"support":0.4325218},{"time_hours":429,"approval_perbill":500000000,"support_perbill":4297690,"approval":50,"support":0.429769},{"time_hours":430,"approval_perbill":500000000,"support_perbill":4270287,"approval":50,"support":0.4270287},{"time_hours":431,"approval_perbill":500000000,"support_perbill":4243007,"approval":50,"support":0.4243007},{"time_hours":432,"approval_perbill":500000000,"support_perbill":4215851,"approval":50,"support":0.4215851},{"time_hours":433,"approval_perbill":500000000,"support_perbill":4188818,"approval":50,"support":0.4188818},{"time_hours":434,"approval_perbill":500000000,"support_perbill":4161906,"approval":50,"support":0.4161906},{"time_hours":435,"approval_perbill":500000000,"support_perbill":4135115,"approval":50,"support":0.4135115},{"time_hours":436,"approval_perbill":500000000,"support_perbill":4108444,"approval":50,"support":0.4108444},{"time_hours":437,"approval_perbill":500000000,"support_perbill":4081892,"approval":50,"support":0.4081892},{"time_hours":438,"approval_perbill":500000000,"support_perbill":4055459,"approval":50,"support":0.4055459},{"time_hours":439,"approval_perbill":500000000,"support_perbill":4029143,"approval":50,"support":0.4029143},{"time_hours":440,"approval_perbill":500000000,"support_perbill":4002944,"approval":50,"support":0.4002944},{"time_hours":441,"approval_perbill":500000000,"support_perbill":3976862,"approval":50,"support":0.3976862},{"time_hours":442,"approval_perbill":500000000,"support_perbill":3950894,"approval":50,"support":0.3950894},{"time_hours":443,"approval_perbill":500000000,"support_perbill":3925041,"approval":50,"support":0.3925041},{"time_hours":444,"approval_perbill":500000000,"support_perbill":3899302,"approval":50,"support":0.3899302},{"time_hours":445,"approval_perbill":500000000,"support_perbill":3873676,"approval":50,"support":0.3873676},{"time_hours":446,"approval_perbill":500000000,"support_perbill":3848162,"approval":50,"support":0.3848162},{"time_hours":447,"approval_perbill":500000000,"support_perbill":3822760,"approval":50,"support":0.382276},{"time_hours":448,"approval_perbill":500000000,"support_perbill":3797468,"approval":50,"support":0.3797468},{"time_hours":449,"approval_perbill":500000000,"support_perbill":3772287,"approval":50,"support":0.3772287},{"time_hours":450,"approval_perbill":500000000,"support_perbill":3747215,"approval":50,"support":0.3747215},{"time_hours":451,"approval_perbill":500000000,"support_perbill":3722251,"approval":50,"support":0.3722251},{"time_hours":452,"approval_perbill":500000000,"support_perbill":3697396,"approval":50,"support":0.3697396},{"time_hours":453,"approval_perbill":500000000,"support_perbill":3672648,"approval":50,"support":0.3672648},{"time_hours":454,"approval_perbill":500000000,"support_perbill":3648006,"approval":50,"support":0.3648006},{"time_hours":455,"approval_perbill":500000000,"support_perbill":3623471,"approval":50,"support":0.3623471},{"time_hours":456,"approval_perbill":500000000,"support_perbill":3599040,"approval":50,"support":0.359904},{"time_hours":457,"approval_perbill":500000000,"support_perbill":3574714,"approval":50,"support":0.3574714},{"time_hours":458,"approval_perbill":500000000,"support_perbill":3550492,"approval":50,"support":0.3550492},{"time_hours":459,"approval_perbill":500000000,"support_perbill":3526373,"approval":50,"support":0.3526373},{"time_hours":460,"approval_perbill":500000000,"support_perbill":3502357,"approval":50,"support":0.3502357},{"time_hours":461,"approval_perbill":500000000,"support_perbill":3478442,"approval":50,"support":0.3478442},{"time_hours":462,"approval_perbill":500000000,"support_perbill":3454629,"approval":50,"support":0.3454629},{"time_hours":463,"approval_perbill":500000000,"support_perbill":3430916,"approval":50,"support":0.3430916},{"time_hours":464,"approval_perbill":500000000,"support_perbill":3407304,"approval":50,"support":0.3407304},{"time_hours":465,"approval_perbill":500000000,"support_perbill":3383790,"approval":50,"support":0.338379},{"time_hours":466,"approval_perbill":500000000,"support_perbill":3360376,"approval":50,"support":0.3360376},{"time_hours":467,"approval_perbill":500000000,"support_perbill":3337059,"approval":50,"support":0.3337059},{"time_hours":468,"approval_perbill":500000000,"support_perbill":3313840,"approval":50,"support":0.331384},{"time_hours":469,"approval_perbill":500000000,"support_perbill":3290718,"approval":50,"support":0.3290718},{"time_hours":470,"approval_perbill":500000000,"support_perbill":3267692,"approval":50,"support":0.3267692},{"time_hours":471,"approval_perbill":500000000,"support_perbill":3244761,"approval":50,"support":0.3244761},{"time_hours":472,"approval_perbill":500000000,"support_perbill":3221926,"approval":50,"support":0.3221926},{"time_hours":473,"approval_perbill":500000000,"support_perbill":3199185,"approval":50,"support":0.3199185},{"time_hours":474,"approval_perbill":500000000,"support_perbill":3176538,"approval":50,"support":0.3176538},{"time_hours":475,"approval_perbill":500000000,"support_perbill":3153985,"approval":50,"support":0.3153985},{"time_hours":476,"approval_perbill":500000000,"support_perbill":3131524,"approval":50,"support":0.3131524},{"time_hours":477,"approval_perbill":500000000,"support_perbill":3109155,"approval":50,"support":0.3109155},{"time_hours":478,"approval_perbill":500000000,"support_perbill":3086878,"approval":50,"support":0.3086878},{"time_hours":479,"approval_perbill":500000000,"support_perbill":3064692,"approval":50,"support":0.3064692},{"time_hours":480,"approval_perbill":500000000,"support_perbill":3042596,"approval":50,"support":0.3042596},{"time_hours":481,"approval_perbill":500000000,"support_perbill":3020590,"approval":50,"support":0.302059},{"time_hours":482,"approval_perbill":500000000,"support_perbill":2998674,"approval":50,"support":0.2998674},{"time_hours":483,"approval_perbill":500000000,"support_perbill":2976847,"approval":50,"support":0.2976847},{"time_hours":484,"approval_perbill":500000000,"support_perbill":2955107,"approval":50,"support":0.2955107},{"time_hours":485,"approval_perbill":500000000,"support_perbill":2933456,"approval":50,"support":0.2933456},{"time_hours":486,"approval_perbill":500000000,"support_perbill":2911892,"approval":50,"support":0.2911892},{"time_hours":487,"approval_perbill":500000000,"support_perbill":2890414,"approval":50,"support":0.2890414},{"time_hours":488,"approval_perbill":500000000,"support_perbill":2869023,"approval":50,"support":0.2869023},{"time_hours":489,"approval_perbill":500000000,"support_perbill":2847717,"approval":50,"support":0.2847717},{"time_hours":490,"approval_perbill":500000000,"support_perbill":2826496,"approval":50,"support":0.2826496},{"time_hours":491,"approval_perbill":500000000,"support_perbill":2805360,"approval":50,"support":0.280536},{"time_hours":492,"approval_perbill":500000000,"support_perbill":2784309,"approval":50,"support":0.2784309},{"time_hours":493,"approval_perbill":500000000,"support_perbill":2763341,"approval":50,"support":0.2763341},{"time_hours":494,"approval_perbill":500000000,"support_perbill":2742455,"approval":50,"support":0.2742455},{"time_hours":495,"approval_perbill":500000000,"support_perbill":2721653,"approval":50,"support":0.2721653},{"time_hours":496,"approval_perbill":500000000,"support_perbill":2700933,"approval":50,"support":0.2700933},{"time_hours":497,"approval_perbill":500000000,"support_perbill":2680294,"approval":50,"support":0.2680294},{"time_hours":498,"approval_perbill":500000000,"support_perbill":2659737,"approval":50,"support":0.2659737},{"time_hours":499,"approval_perbill":500000000,"support_perbill":2639260,"approval":50,"support":0.263926},{"time_hours":500,"approval_perbill":500000000,"support_perbill":2618864,"approval":50,"support":0.2618864},{"time_hours":501,"approval_perbill":500000000,"support_perbill":2598547,"approval":50,"support":0.2598547},{"time_hours":502,"approval_perbill":500000000,"support_perbill":2578310,"approval":50,"support":0.257831},{"time_hours":503,"approval_perbill":500000000,"support_perbill":2558151,"approval":50,"support":0.2558151},{"time_hours":504,"approval_perbill":500000000,"support_perbill":2538071,"approval":50,"support":0.2538071},{"time_hours":505,"approval_perbill":500000000,"support_perbill":2518069,"approval":50,"support":0.2518069},{"time_hours":506,"approval_perbill":500000000,"support_perbill":2498144,"approval":50,"support":0.2498144},{"time_hours":507,"approval_perbill":500000000,"support_perbill":2478296,"approval":50,"support":0.2478296},{"time_hours":508,"approval_perbill":500000000,"support_perbill":2458525,"approval":50,"support":0.2458525},{"time_hours":509,"approval_perbill":500000000,"support_perbill":2438830,"approval":50,"support":0.243883},{"time_hours":510,"approval_perbill":500000000,"support_perbill":2419210,"approval":50,"support":0.241921},{"time_hours":511,"approval_perbill":500000000,"support_perbill":2399666,"approval":50,"support":0.2399666},{"time_hours":512,"approval_perbill":500000000,"support_perbill":2380197,"approval":50,"support":0.2380197},{"time_hours":513,"approval_perbill":500000000,"support_perbill":2360802,"approval":50,"support":0.2360802},{"time_hours":514,"approval_perbill":500000000,"support_perbill":2341481,"approval":50,"support":0.2341481},{"time_hours":515,"approval_perbill":500000000,"support_perbill":2322233,"approval":50,"support":0.2322233},{"time_hours":516,"approval_perbill":500000000,"support_perbill":2303059,"approval":50,"support":0.2303059},{"time_hours":517,"approval_perbill":500000000,"support_perbill":2283957,"approval":50,"support":0.2283957},{"time_hours":518,"approval_perbill":500000000,"support_perbill":2264928,"approval":50,"support":0.2264928},{"time_hours":519,"approval_perbill":500000000,"support_perbill":2245970,"approval":50,"support":0.224597},{"time_hours":520,"approval_perbill":500000000,"support_perbill":2227084,"approval":50,"support":0.2227084},{"time_hours":521,"approval_perbill":500000000,"support_perbill":2208269,"approval":50,"support":0.2208269},{"time_hours":522,"approval_perbill":500000000,"support_perbill":2189525,"approval":50,"support":0.2189525},{"time_hours":523,"approval_perbill":500000000,"support_perbill":2170851,"approval":50,"support":0.2170851},{"time_hours":524,"approval_perbill":500000000,"support_perbill":2152247,"approval":50,"support":0.2152247},{"time_hours":525,"approval_perbill":500000000,"support_perbill":2133712,"approval":50,"support":0.2133712},{"time_hours":526,"approval_perbill":500000000,"support_perbill":2115247,"approval":50,"support":0.2115247},{"time_hours":527,"approval_perbill":500000000,"support_perbill":2096850,"approval":50,"support":0.209685},{"time_hours":528,"approval_perbill":500000000,"support_perbill":2078522,"approval":50,"support":0.2078522},{"time_hours":529,"approval_perbill":500000000,"support_perbill":2060261,"approval":50,"support":0.2060261},{"time_hours":530,"approval_perbill":500000000,"support_perbill":2042068,"approval":50,"support":0.2042068},{"time_hours":531,"approval_perbill":500000000,"support_perbill":2023943,"approval":50,"support":0.2023943},{"time_hours":532,"approval_perbill":500000000,"support_perbill":2005884,"approval":50,"support":0.2005884},{"time_hours":533,"approval_perbill":500000000,"support_perbill":1987891,"approval":50,"support":0.1987891},{"time_hours":534,"approval_perbill":500000000,"support_perbill":1969965,"approval":50,"support":0.1969965},{"time_hours":535,"approval_perbill":500000000,"support_perbill":1952104,"approval":50,"support":0.1952104},{"time_hours":536,"approval_perbill":500000000,"support_perbill":1934309,"approval":50,"support":0.1934309},{"time_hours":537,"approval_perbill":500000000,"support_perbill":1916579,"approval":50,"support":0.1916579},{"time_hours":538,"approval_perbill":500000000,"support_perbill":1898913,"approval":50,"support":0.1898913},{"time_hours":539,"approval_perbill":500000000,"support_perbill":1881312,"approval":50,"support":0.1881312},{"time_hours":540,"approval_perbill":500000000,"support_perbill":1863775,"approval":50,"support":0.1863775},{"time_hours":541,"approval_perbill":500000000,"support_perbill":1846301,"approval":50,"support":0.1846301},{"time_hours":542,"approval_perbill":500000000,"support_perbill":1828891,"approval":50,"support":0.1828891},{"time_hours":543,"approval_perbill":500000000,"support_perbill":1811543,"approval":50,"support":0.1811543},{"time_hours":544,"approval_perbill":500000000,"support_perbill":1794258,"approval":50,"support":0.1794258},{"time_hours":545,"approval_perbill":500000000,"support_perbill":1777036,"approval":50,"support":0.1777036},{"time_hours":546,"approval_perbill":500000000,"support_perbill":1759875,"approval":50,"support":0.1759875},{"time_hours":547,"approval_perbill":500000000,"support_perbill":1742775,"approval":50,"support":0.1742775},{"time_hours":548,"approval_perbill":500000000,"support_perbill":1725737,"approval":50,"support":0.1725737},{"time_hours":549,"approval_perbill":500000000,"support_perbill":1708760,"approval":50,"support":0.170876},{"time_hours":550,"approval_perbill":500000000,"support_perbill":1691844,"approval":50,"support":0.1691844},{"time_hours":551,"approval_perbill":500000000,"support_perbill":1674988,"approval":50,"support":0.1674988},{"time_hours":552,"approval_perbill":500000000,"support_perbill":1658191,"approval":50,"support":0.1658191},{"time_hours":553,"approval_perbill":500000000,"support_perbill":1641455,"approval":50,"support":0.1641455},{"time_hours":554,"approval_perbill":500000000,"support_perbill":1624777,"approval":50,"support":0.1624777},{"time_hours":555,"approval_perbill":500000000,"support_perbill":1608159,"approval":50,"support":0.1608159},{"time_hours":556,"approval_perbill":500000000,"support_perbill":1591599,"approval":50,"support":0.1591599},{"time_hours":557,"approval_perbill":500000000,"support_perbill":1575098,"approval":50,"support":0.1575098},{"time_hours":558,"approval_perbill":500000000,"support_perbill":1558654,"approval":50,"support":0.1558654},{"time_hours":559,"approval_perbill":500000000,"support_perbill":1542269,"approval":50,"support":0.1542269},{"time_hours":560,"approval_perbill":500000000,"support_perbill":1525941,"approval":50,"support":0.1525941},{"time_hours":561,"approval_perbill":500000000,"support_perbill":1509670,"approval":50,"support":0.150967},{"time_hours":562,"approval_perbill":500000000,"support_perbill":1493456,"approval":50,"support":0.1493456},{"time_hours":563,"approval_perbill":500000000,"support_perbill":1477298,"approval":50,"support":0.1477298},{"time_hours":564,"approval_perbill":500000000,"support_perbill":1461197,"approval":50,"support":0.1461197},{"time_hours":565,"approval_perbill":500000000,"support_perbill":1445152,"approval":50,"support":0.1445152},{"time_hours":566,"approval_perbill":500000000,"support_perbill":1429162,"approval":50,"support":0.1429162},{"time_hours":567,"approval_perbill":500000000,"support_perbill":1413228,"approval":50,"support":0.1413228},{"time_hours":568,"approval_perbill":500000000,"support_perbill":1397348,"approval":50,"support":0.1397348},{"time_hours":569,"approval_perbill":500000000,"support_perbill":1381524,"approval":50,"support":0.1381524},{"time_hours":570,"approval_perbill":500000000,"support_perbill":1365754,"approval":50,"support":0.1365754},{"time_hours":571,"approval_perbill":500000000,"support_perbill":1350039,"approval":50,"support":0.1350039},{"time_hours":572,"approval_perbill":500000000,"support_perbill":1334377,"approval":50,"support":0.1334377},{"time_hours":573,"approval_perbill":500000000,"support_perbill":1318769,"approval":50,"support":0.1318769},{"time_hours":574,"approval_perbill":500000000,"support_perbill":1303214,"approval":50,"support":0.1303214},{"time_hours":575,"approval_perbill":500000000,"support_perbill":1287713,"approval":50,"support":0.1287713},{"time_hours":576,"approval_perbill":500000000,"support_perbill":1272264,"approval":50,"support":0.1272264},{"time_hours":577,"approval_perbill":500000000,"support_perbill":1256869,"approval":50,"support":0.1256869},{"time_hours":578,"approval_perbill":500000000,"support_perbill":1241525,"approval":50,"support":0.1241525},{"time_hours":579,"approval_perbill":500000000,"support_perbill":1226233,"approval":50,"support":0.1226233},{"time_hours":580,"approval_perbill":500000000,"support_perbill":1210994,"approval":50,"support":0.1210994},{"time_hours":581,"approval_perbill":500000000,"support_perbill":1195805,"approval":50,"support":0.1195805},{"time_hours":582,"approval_perbill":500000000,"support_perbill":1180668,"approval":50,"support":0.1180668},{"time_hours":583,"approval_perbill":500000000,"support_perbill":1165582,"approval":50,"support":0.1165582},{"time_hours":584,"approval_perbill":500000000,"support_perbill":1150547,"approval":50,"support":0.1150547},{"time_hours":585,"approval_perbill":500000000,"support_perbill":1135563,"approval":50,"support":0.1135563},{"time_hours":586,"approval_perbill":500000000,"support_perbill":1120628,"approval":50,"support":0.1120628},{"time_hours":587,"approval_perbill":500000000,"support_perbill":1105744,"approval":50,"support":0.1105744},{"time_hours":588,"approval_perbill":500000000,"support_perbill":1090909,"approval":50,"support":0.1090909},{"time_hours":589,"approval_perbill":500000000,"support_perbill":1076124,"approval":50,"support":0.1076124},{"time_hours":590,"approval_perbill":500000000,"support_perbill":1061388,"approval":50,"support":0.1061388},{"time_hours":591,"approval_perbill":500000000,"support_perbill":1046701,"approval":50,"support":0.1046701},{"time_hours":592,"approval_perbill":500000000,"support_perbill":1032063,"approval":50,"support":0.1032063},{"time_hours":593,"approval_perbill":500000000,"support_perbill":1017473,"approval":50,"support":0.1017473},{"time_hours":594,"approval_perbill":500000000,"support_perbill":1002932,"approval":50,"support":0.1002932},{"time_hours":595,"approval_perbill":500000000,"support_perbill":988438,"approval":50,"support":0.0988438},{"time_hours":596,"approval_perbill":500000000,"support_perbill":973993,"approval":50,"support":0.0973993},{"time_hours":597,"approval_perbill":500000000,"support_perbill":959595,"approval":50,"support":0.0959595},{"time_hours":598,"approval_perbill":500000000,"support_perbill":945244,"approval":50,"support":0.0945244},{"time_hours":599,"approval_perbill":500000000,"support_perbill":930940,"approval":50,"support":0.093094},{"time_hours":600,"approval_perbill":500000000,"support_perbill":916684,"approval":50,"support":0.0916684},{"time_hours":601,"approval_perbill":500000000,"support_perbill":902473,"approval":50,"support":0.0902473},{"time_hours":602,"approval_perbill":500000000,"support_perbill":888310,"approval":50,"support":0.088831},{"time_hours":603,"approval_perbill":500000000,"support_perbill":874192,"approval":50,"support":0.0874192},{"time_hours":604,"approval_perbill":500000000,"support_perbill":860121,"approval":50,"support":0.0860121},{"time_hours":605,"approval_perbill":500000000,"support_perbill":846095,"approval":50,"support":0.0846095},{"time_hours":606,"approval_perbill":500000000,"support_perbill":832114,"approval":50,"support":0.0832114},{"time_hours":607,"approval_perbill":500000000,"support_perbill":818179,"approval":50,"support":0.0818179},{"time_hours":608,"approval_perbill":500000000,"support_perbill":804289,"approval":50,"support":0.0804289},{"time_hours":609,"approval_perbill":500000000,"support_perbill":790444,"approval":50,"support":0.0790444},{"time_hours":610,"approval_perbill":500000000,"support_perbill":776644,"approval":50,"support":0.0776644},{"time_hours":611,"approval_perbill":500000000,"support_perbill":762888,"approval":50,"support":0.0762888},{"time_hours":612,"approval_perbill":500000000,"support_perbill":749176,"approval":50,"support":0.0749176},{"time_hours":613,"approval_perbill":500000000,"support_perbill":735508,"approval":50,"support":0.0735508},{"time_hours":614,"approval_perbill":500000000,"support_perbill":721884,"approval":50,"support":0.0721884},{"time_hours":615,"approval_perbill":500000000,"support_perbill":708303,"approval":50,"support":0.0708303},{"time_hours":616,"approval_perbill":500000000,"support_perbill":694766,"approval":50,"support":0.0694766},{"time_hours":617,"approval_perbill":500000000,"support_perbill":681272,"approval":50,"support":0.0681272},{"time_hours":618,"approval_perbill":500000000,"support_perbill":667821,"approval":50,"support":0.0667821},{"time_hours":619,"approval_perbill":500000000,"support_perbill":654412,"approval":50,"support":0.0654412},{"time_hours":620,"approval_perbill":500000000,"support_perbill":641047,"approval":50,"support":0.0641047},{"time_hours":621,"approval_perbill":500000000,"support_perbill":627723,"approval":50,"support":0.0627723},{"time_hours":622,"approval_perbill":500000000,"support_perbill":614442,"approval":50,"support":0.0614442},{"time_hours":623,"approval_perbill":500000000,"support_perbill":601202,"approval":50,"support":0.0601202},{"time_hours":624,"approval_perbill":500000000,"support_perbill":588005,"approval":50,"support":0.0588005},{"time_hours":625,"approval_perbill":500000000,"support_perbill":574848,"approval":50,"support":0.0574848},{"time_hours":626,"approval_perbill":500000000,"support_perbill":561734,"approval":50,"support":0.0561734},{"time_hours":627,"approval_perbill":500000000,"support_perbill":548660,"approval":50,"support":0.054866},{"time_hours":628,"approval_perbill":500000000,"support_perbill":535627,"approval":50,"support":0.0535627},{"time_hours":629,"approval_perbill":500000000,"support_perbill":522635,"approval":50,"support":0.0522635},{"time_hours":630,"approval_perbill":500000000,"support_perbill":509684,"approval":50,"support":0.0509684},{"time_hours":631,"approval_perbill":500000000,"support_perbill":496773,"approval":50,"support":0.0496773},{"time_hours":632,"approval_perbill":500000000,"support_perbill":483902,"approval":50,"support":0.0483902},{"time_hours":633,"approval_perbill":500000000,"support_perbill":471071,"approval":50,"support":0.0471071},{"time_hours":634,"approval_perbill":500000000,"support_perbill":458280,"approval":50,"support":0.045828},{"time_hours":635,"approval_perbill":500000000,"support_perbill":445529,"approval":50,"support":0.0445529},{"time_hours":636,"approval_perbill":500000000,"support_perbill":432817,"approval":50,"support":0.0432817},{"time_hours":637,"approval_perbill":500000000,"support_perbill":420144,"approval":50,"support":0.0420144},{"time_hours":638,"approval_perbill":500000000,"support_perbill":407511,"approval":50,"support":0.0407511},{"time_hours":639,"approval_perbill":500000000,"support_perbill":394916,"approval":50,"support":0.0394916},{"time_hours":640,"approval_perbill":500000000,"support_perbill":382360,"approval":50,"support":0.038236},{"time_hours":641,"approval_perbill":500000000,"support_perbill":369843,"approval":50,"support":0.0369843},{"time_hours":642,"approval_perbill":500000000,"support_perbill":357364,"approval":50,"support":0.0357364},{"time_hours":643,"approval_perbill":500000000,"support_perbill":344923,"approval":50,"support":0.0344923},{"time_hours":644,"approval_perbill":500000000,"support_perbill":332520,"approval":50,"support":0.033252},{"time_hours":645,"approval_perbill":500000000,"support_perbill":320155,"approval":50,"support":0.0320155},{"time_hours":646,"approval_perbill":500000000,"support_perbill":307828,"approval":50,"support":0.0307828},{"time_hours":647,"approval_perbill":500000000,"support_perbill":295538,"approval":50,"support":0.0295538},{"time_hours":648,"approval_perbill":500000000,"support_perbill":283286,"approval":50,"support":0.0283286},{"time_hours":649,"approval_perbill":500000000,"support_perbill":271071,"approval":50,"support":0.0271071},{"time_hours":650,"approval_perbill":500000000,"support_perbill":258892,"approval":50,"support":0.0258892},{"time_hours":651,"approval_perbill":500000000,"support_perbill":246751,"approval":50,"support":0.0246751},{"time_hours":652,"approval_perbill":500000000,"support_perbill":234646,"approval":50,"support":0.0234646},{"time_hours":653,"approval_perbill":500000000,"support_perbill":222578,"approval":50,"support":0.0222578},{"time_hours":654,"approval_perbill":500000000,"support_perbill":210546,"approval":50,"support":0.0210546},{"time_hours":655,"approval_perbill":500000000,"support_perbill":198550,"approval":50,"support":0.019855},{"time_hours":656,"approval_perbill":500000000,"support_perbill":186590,"approval":50,"support":0.018659},{"time_hours":657,"approval_perbill":500000000,"support_perbill":174666,"approval":50,"support":0.0174666},{"time_hours":658,"approval_perbill":500000000,"support_perbill":162778,"approval":50,"support":0.0162778},{"time_hours":659,"approval_perbill":500000000,"support_perbill":150925,"approval":50,"support":0.0150925},{"time_hours":660,"approval_perbill":500000000,"support_perbill":139108,"approval":50,"support":0.0139108},{"time_hours":661,"approval_perbill":500000000,"support_perbill":127326,"approval":50,"support":0.0127326},{"time_hours":662,"approval_perbill":500000000,"support_perbill":115578,"approval":50,"support":0.0115578},{"time_hours":663,"approval_perbill":500000000,"support_perbill":103866,"approval":50,"support":0.0103866},{"time_hours":664,"approval_perbill":500000000,"support_perbill":92188,"approval":50,"support":0.0092188},{"time_hours":665,"approval_perbill":500000000,"support_perbill":80545,"approval":50,"support":0.0080545},{"time_hours":666,"approval_perbill":500000000,"support_perbill":68937,"approval":50,"support":0.0068937},{"time_hours":667,"approval_perbill":500000000,"support_perbill":57363,"approval":50,"support":0.0057363},{"time_hours":668,"approval_perbill":500000000,"support_perbill":45822,"approval":50,"support":0.0045822},{"time_hours":669,"approval_perbill":500000000,"support_perbill":34316,"approval":50,"support":0.0034316},{"time_hours":670,"approval_perbill":500000000,"support_perbill":22844,"approval":50,"support":0.0022844},{"time_hours":671,"approval_perbill":500000000,"support_perbill":11405,"approval":50,"support":0.0011405},{"time_hours":672,"approval_perbill":500000000,"support_perbill":0,"approval":50,"support":0}]')},77062:p=>{"use strict";p.exports=JSON.parse('[{"time_hours":0,"approval_perbill":1000000000,"support_perbill":500000026,"approval":100,"support":50.0000026},{"time_hours":1,"approval_perbill":998774510,"support_perbill":455636061,"approval":99.877451,"support":45.5636061},{"time_hours":2,"approval_perbill":997549020,"support_perbill":418401359,"approval":99.754902,"support":41.8401359},{"time_hours":3,"approval_perbill":996323530,"support_perbill":386705228,"approval":99.632353,"support":38.6705228},{"time_hours":4,"approval_perbill":995098040,"support_perbill":359397443,"approval":99.509804,"support":35.9397443},{"time_hours":5,"approval_perbill":993872550,"support_perbill":335625639,"approval":99.387255,"support":33.5625639},{"time_hours":6,"approval_perbill":992647060,"support_perbill":314744813,"approval":99.264706,"support":31.4744813},{"time_hours":7,"approval_perbill":991421570,"support_perbill":296257808,"approval":99.142157,"support":29.6257808},{"time_hours":8,"approval_perbill":990196080,"support_perbill":279775293,"approval":99.019608,"support":27.9775293},{"time_hours":9,"approval_perbill":988970589,"support_perbill":264988013,"approval":98.8970589,"support":26.4988013},{"time_hours":10,"approval_perbill":987745099,"support_perbill":251647242,"approval":98.7745099,"support":25.1647242},{"time_hours":11,"approval_perbill":986519609,"support_perbill":239550622,"approval":98.6519609,"support":23.9550622},{"time_hours":12,"approval_perbill":985294119,"support_perbill":228531862,"approval":98.5294119,"support":22.8531862},{"time_hours":13,"approval_perbill":984068628,"support_perbill":218453039,"approval":98.4068628,"support":21.8453039},{"time_hours":14,"approval_perbill":982843138,"support_perbill":209198815,"approval":98.2843138,"support":20.9198815},{"time_hours":15,"approval_perbill":981617648,"support_perbill":200671963,"approval":98.1617648,"support":20.0671963},{"time_hours":16,"approval_perbill":980392158,"support_perbill":192789972,"approval":98.0392158,"support":19.2789972},{"time_hours":17,"approval_perbill":979166667,"support_perbill":185482348,"approval":97.9166667,"support":18.5482348},{"time_hours":18,"approval_perbill":977941177,"support_perbill":178688524,"approval":97.7941177,"support":17.8688524},{"time_hours":19,"approval_perbill":976715687,"support_perbill":172356151,"approval":97.6715687,"support":17.2356151},{"time_hours":20,"approval_perbill":975490197,"support_perbill":166439756,"approval":97.5490197,"support":16.6439756},{"time_hours":21,"approval_perbill":974264706,"support_perbill":160899652,"approval":97.4264706,"support":16.0899652},{"time_hours":22,"approval_perbill":973039216,"support_perbill":155701053,"approval":97.3039216,"support":15.5701053},{"time_hours":23,"approval_perbill":971813726,"support_perbill":150813323,"approval":97.1813726,"support":15.0813323},{"time_hours":24,"approval_perbill":970588236,"support_perbill":146209386,"approval":97.0588236,"support":14.6209386},{"time_hours":25,"approval_perbill":969362746,"support_perbill":141865225,"approval":96.9362746,"support":14.1865225},{"time_hours":26,"approval_perbill":968137256,"support_perbill":137759452,"approval":96.8137256,"support":13.7759452},{"time_hours":27,"approval_perbill":966911766,"support_perbill":133872975,"approval":96.6911766,"support":13.3872975},{"time_hours":28,"approval_perbill":965686276,"support_perbill":130188679,"approval":96.5686276,"support":13.0188679},{"time_hours":29,"approval_perbill":964460786,"support_perbill":126691186,"approval":96.4460786,"support":12.6691186},{"time_hours":30,"approval_perbill":963235295,"support_perbill":123366639,"approval":96.3235295,"support":12.3366639},{"time_hours":31,"approval_perbill":962009805,"support_perbill":120202524,"approval":96.2009805,"support":12.0202524},{"time_hours":32,"approval_perbill":960784315,"support_perbill":117187499,"approval":96.0784315,"support":11.7187499},{"time_hours":33,"approval_perbill":959558825,"support_perbill":114311269,"approval":95.9558825,"support":11.4311269},{"time_hours":34,"approval_perbill":958333334,"support_perbill":111564465,"approval":95.8333334,"support":11.1564465},{"time_hours":35,"approval_perbill":957107844,"support_perbill":108938546,"approval":95.7107844,"support":10.8938546},{"time_hours":36,"approval_perbill":955882354,"support_perbill":106425701,"approval":95.5882354,"support":10.6425701},{"time_hours":37,"approval_perbill":954656864,"support_perbill":104018782,"approval":95.4656864,"support":10.4018782},{"time_hours":38,"approval_perbill":953431373,"support_perbill":101711228,"approval":95.3431373,"support":10.1711228},{"time_hours":39,"approval_perbill":952205883,"support_perbill":99497012,"approval":95.2205883,"support":9.9497012},{"time_hours":40,"approval_perbill":950980393,"support_perbill":97370582,"approval":95.0980393,"support":9.7370582},{"time_hours":41,"approval_perbill":949754903,"support_perbill":95326819,"approval":94.9754903,"support":9.5326819},{"time_hours":42,"approval_perbill":948529412,"support_perbill":93360994,"approval":94.8529412,"support":9.3360994},{"time_hours":43,"approval_perbill":947303922,"support_perbill":91468733,"approval":94.7303922,"support":9.1468733},{"time_hours":44,"approval_perbill":946078432,"support_perbill":89645982,"approval":94.6078432,"support":8.9645982},{"time_hours":45,"approval_perbill":944852942,"support_perbill":87888981,"approval":94.4852942,"support":8.7888981},{"time_hours":46,"approval_perbill":943627452,"support_perbill":86194234,"approval":94.3627452,"support":8.6194234},{"time_hours":47,"approval_perbill":942401961,"support_perbill":84558490,"approval":94.2401961,"support":8.455849},{"time_hours":48,"approval_perbill":941176471,"support_perbill":82978722,"approval":94.1176471,"support":8.2978722},{"time_hours":49,"approval_perbill":939950981,"support_perbill":81452103,"approval":93.9950981,"support":8.1452103},{"time_hours":50,"approval_perbill":938725491,"support_perbill":79975997,"approval":93.8725491,"support":7.9975997},{"time_hours":51,"approval_perbill":937500001,"support_perbill":78547936,"approval":93.7500001,"support":7.8547936},{"time_hours":52,"approval_perbill":936274511,"support_perbill":77165614,"approval":93.6274511,"support":7.7165614},{"time_hours":53,"approval_perbill":935049021,"support_perbill":75826867,"approval":93.5049021,"support":7.5826867},{"time_hours":54,"approval_perbill":933823531,"support_perbill":74529666,"approval":93.3823531,"support":7.4529666},{"time_hours":55,"approval_perbill":932598040,"support_perbill":73272106,"approval":93.259804,"support":7.3272106},{"time_hours":56,"approval_perbill":931372550,"support_perbill":72052400,"approval":93.137255,"support":7.20524},{"time_hours":57,"approval_perbill":930147060,"support_perbill":70868862,"approval":93.014706,"support":7.0868862},{"time_hours":58,"approval_perbill":928921570,"support_perbill":69719908,"approval":92.892157,"support":6.9719908},{"time_hours":59,"approval_perbill":927696079,"support_perbill":68604042,"approval":92.7696079,"support":6.8604042},{"time_hours":60,"approval_perbill":926470589,"support_perbill":67519857,"approval":92.6470589,"support":6.7519857},{"time_hours":61,"approval_perbill":925245099,"support_perbill":66466022,"approval":92.5245099,"support":6.6466022},{"time_hours":62,"approval_perbill":924019609,"support_perbill":65441280,"approval":92.4019609,"support":6.544128},{"time_hours":63,"approval_perbill":922794118,"support_perbill":64444443,"approval":92.2794118,"support":6.4444443},{"time_hours":64,"approval_perbill":921568628,"support_perbill":63474386,"approval":92.1568628,"support":6.3474386},{"time_hours":65,"approval_perbill":920343138,"support_perbill":62530044,"approval":92.0343138,"support":6.2530044},{"time_hours":66,"approval_perbill":919117648,"support_perbill":61610409,"approval":91.9117648,"support":6.1610409},{"time_hours":67,"approval_perbill":917892158,"support_perbill":60714523,"approval":91.7892158,"support":6.0714523},{"time_hours":68,"approval_perbill":916666667,"support_perbill":59841478,"approval":91.6666667,"support":5.9841478},{"time_hours":69,"approval_perbill":915441177,"support_perbill":58990411,"approval":91.5441177,"support":5.8990411},{"time_hours":70,"approval_perbill":914215687,"support_perbill":58160504,"approval":91.4215687,"support":5.8160504},{"time_hours":71,"approval_perbill":912990197,"support_perbill":57350975,"approval":91.2990197,"support":5.7350975},{"time_hours":72,"approval_perbill":911764706,"support_perbill":56561084,"approval":91.1764706,"support":5.6561084},{"time_hours":73,"approval_perbill":910539216,"support_perbill":55790126,"approval":91.0539216,"support":5.5790126},{"time_hours":74,"approval_perbill":909313726,"support_perbill":55037426,"approval":90.9313726,"support":5.5037426},{"time_hours":75,"approval_perbill":908088236,"support_perbill":54302345,"approval":90.8088236,"support":5.4302345},{"time_hours":76,"approval_perbill":906862746,"support_perbill":53584271,"approval":90.6862746,"support":5.3584271},{"time_hours":77,"approval_perbill":905637256,"support_perbill":52882620,"approval":90.5637256,"support":5.288262},{"time_hours":78,"approval_perbill":904411766,"support_perbill":52196835,"approval":90.4411766,"support":5.2196835},{"time_hours":79,"approval_perbill":903186276,"support_perbill":51526385,"approval":90.3186276,"support":5.1526385},{"time_hours":80,"approval_perbill":901960785,"support_perbill":50870759,"approval":90.1960785,"support":5.0870759},{"time_hours":81,"approval_perbill":900735295,"support_perbill":50229473,"approval":90.0735295,"support":5.0229473},{"time_hours":82,"approval_perbill":899509805,"support_perbill":49602061,"approval":89.9509805,"support":4.9602061},{"time_hours":83,"approval_perbill":898284315,"support_perbill":48988077,"approval":89.8284315,"support":4.8988077},{"time_hours":84,"approval_perbill":897058824,"support_perbill":48387095,"approval":89.7058824,"support":4.8387095},{"time_hours":85,"approval_perbill":895833334,"support_perbill":47798707,"approval":89.5833334,"support":4.7798707},{"time_hours":86,"approval_perbill":894607844,"support_perbill":47222519,"approval":89.4607844,"support":4.7222519},{"time_hours":87,"approval_perbill":893382354,"support_perbill":46658158,"approval":89.3382354,"support":4.6658158},{"time_hours":88,"approval_perbill":892156864,"support_perbill":46105262,"approval":89.2156864,"support":4.6105262},{"time_hours":89,"approval_perbill":890931373,"support_perbill":45563485,"approval":89.0931373,"support":4.5563485},{"time_hours":90,"approval_perbill":889705883,"support_perbill":45032496,"approval":88.9705883,"support":4.5032496},{"time_hours":91,"approval_perbill":888480393,"support_perbill":44511976,"approval":88.8480393,"support":4.4511976},{"time_hours":92,"approval_perbill":887254903,"support_perbill":44001617,"approval":88.7254903,"support":4.4001617},{"time_hours":93,"approval_perbill":886029412,"support_perbill":43501126,"approval":88.6029412,"support":4.3501126},{"time_hours":94,"approval_perbill":884803922,"support_perbill":43010218,"approval":88.4803922,"support":4.3010218},{"time_hours":95,"approval_perbill":883578432,"support_perbill":42528621,"approval":88.3578432,"support":4.2528621},{"time_hours":96,"approval_perbill":882352942,"support_perbill":42056074,"approval":88.2352942,"support":4.2056074},{"time_hours":97,"approval_perbill":881127452,"support_perbill":41592321,"approval":88.1127452,"support":4.1592321},{"time_hours":98,"approval_perbill":879901962,"support_perbill":41137122,"approval":87.9901962,"support":4.1137122},{"time_hours":99,"approval_perbill":878676472,"support_perbill":40690242,"approval":87.8676472,"support":4.0690242},{"time_hours":100,"approval_perbill":877450982,"support_perbill":40251453,"approval":87.7450982,"support":4.0251453},{"time_hours":101,"approval_perbill":876225491,"support_perbill":39820539,"approval":87.6225491,"support":3.9820539},{"time_hours":102,"approval_perbill":875000001,"support_perbill":39397289,"approval":87.5000001,"support":3.9397289},{"time_hours":103,"approval_perbill":873774511,"support_perbill":38981501,"approval":87.3774511,"support":3.8981501},{"time_hours":104,"approval_perbill":872549021,"support_perbill":38572980,"approval":87.2549021,"support":3.857298},{"time_hours":105,"approval_perbill":871323530,"support_perbill":38171535,"approval":87.132353,"support":3.8171535},{"time_hours":106,"approval_perbill":870098040,"support_perbill":37776985,"approval":87.009804,"support":3.7776985},{"time_hours":107,"approval_perbill":868872550,"support_perbill":37389155,"approval":86.887255,"support":3.7389155},{"time_hours":108,"approval_perbill":867647060,"support_perbill":37007873,"approval":86.764706,"support":3.7007873},{"time_hours":109,"approval_perbill":866421570,"support_perbill":36632975,"approval":86.642157,"support":3.6632975},{"time_hours":110,"approval_perbill":865196079,"support_perbill":36264302,"approval":86.5196079,"support":3.6264302},{"time_hours":111,"approval_perbill":863970589,"support_perbill":35901701,"approval":86.3970589,"support":3.5901701},{"time_hours":112,"approval_perbill":862745099,"support_perbill":35545023,"approval":86.2745099,"support":3.5545023},{"time_hours":113,"approval_perbill":861519609,"support_perbill":35194123,"approval":86.1519609,"support":3.5194123},{"time_hours":114,"approval_perbill":860294118,"support_perbill":34848862,"approval":86.0294118,"support":3.4848862},{"time_hours":115,"approval_perbill":859068628,"support_perbill":34509106,"approval":85.9068628,"support":3.4509106},{"time_hours":116,"approval_perbill":857843138,"support_perbill":34174724,"approval":85.7843138,"support":3.4174724},{"time_hours":117,"approval_perbill":856617648,"support_perbill":33845590,"approval":85.6617648,"support":3.384559},{"time_hours":118,"approval_perbill":855392157,"support_perbill":33521580,"approval":85.5392157,"support":3.352158},{"time_hours":119,"approval_perbill":854166667,"support_perbill":33202577,"approval":85.4166667,"support":3.3202577},{"time_hours":120,"approval_perbill":852941177,"support_perbill":32888464,"approval":85.2941177,"support":3.2888464},{"time_hours":121,"approval_perbill":851715687,"support_perbill":32579131,"approval":85.1715687,"support":3.2579131},{"time_hours":122,"approval_perbill":850490197,"support_perbill":32274469,"approval":85.0490197,"support":3.2274469},{"time_hours":123,"approval_perbill":849264707,"support_perbill":31974373,"approval":84.9264707,"support":3.1974373},{"time_hours":124,"approval_perbill":848039217,"support_perbill":31678741,"approval":84.8039217,"support":3.1678741},{"time_hours":125,"approval_perbill":846813727,"support_perbill":31387475,"approval":84.6813727,"support":3.1387475},{"time_hours":126,"approval_perbill":845588236,"support_perbill":31100477,"approval":84.5588236,"support":3.1100477},{"time_hours":127,"approval_perbill":844362746,"support_perbill":30817656,"approval":84.4362746,"support":3.0817656},{"time_hours":128,"approval_perbill":843137256,"support_perbill":30538921,"approval":84.3137256,"support":3.0538921},{"time_hours":129,"approval_perbill":841911766,"support_perbill":30264184,"approval":84.1911766,"support":3.0264184},{"time_hours":130,"approval_perbill":840686276,"support_perbill":29993358,"approval":84.0686276,"support":2.9993358},{"time_hours":131,"approval_perbill":839460785,"support_perbill":29726363,"approval":83.9460785,"support":2.9726363},{"time_hours":132,"approval_perbill":838235295,"support_perbill":29463116,"approval":83.8235295,"support":2.9463116},{"time_hours":133,"approval_perbill":837009805,"support_perbill":29203539,"approval":83.7009805,"support":2.9203539},{"time_hours":134,"approval_perbill":835784315,"support_perbill":28947556,"approval":83.5784315,"support":2.8947556},{"time_hours":135,"approval_perbill":834558824,"support_perbill":28695094,"approval":83.4558824,"support":2.8695094},{"time_hours":136,"approval_perbill":833333334,"support_perbill":28446079,"approval":83.3333334,"support":2.8446079},{"time_hours":137,"approval_perbill":832107844,"support_perbill":28200442,"approval":83.2107844,"support":2.8200442},{"time_hours":138,"approval_perbill":830882354,"support_perbill":27958114,"approval":83.0882354,"support":2.7958114},{"time_hours":139,"approval_perbill":829656863,"support_perbill":27719030,"approval":82.9656863,"support":2.771903},{"time_hours":140,"approval_perbill":828431373,"support_perbill":27483123,"approval":82.8431373,"support":2.7483123},{"time_hours":141,"approval_perbill":827205883,"support_perbill":27250333,"approval":82.7205883,"support":2.7250333},{"time_hours":142,"approval_perbill":825980393,"support_perbill":27020596,"approval":82.5980393,"support":2.7020596},{"time_hours":143,"approval_perbill":824754902,"support_perbill":26793853,"approval":82.4754902,"support":2.6793853},{"time_hours":144,"approval_perbill":823529412,"support_perbill":26570047,"approval":82.3529412,"support":2.6570047},{"time_hours":145,"approval_perbill":822303922,"support_perbill":26349121,"approval":82.2303922,"support":2.6349121},{"time_hours":146,"approval_perbill":821078432,"support_perbill":26131019,"approval":82.1078432,"support":2.6131019},{"time_hours":147,"approval_perbill":819852942,"support_perbill":25915687,"approval":81.9852942,"support":2.5915687},{"time_hours":148,"approval_perbill":818627452,"support_perbill":25703073,"approval":81.8627452,"support":2.5703073},{"time_hours":149,"approval_perbill":817401962,"support_perbill":25493126,"approval":81.7401962,"support":2.5493126},{"time_hours":150,"approval_perbill":816176472,"support_perbill":25285796,"approval":81.6176472,"support":2.5285796},{"time_hours":151,"approval_perbill":814950982,"support_perbill":25081035,"approval":81.4950982,"support":2.5081035},{"time_hours":152,"approval_perbill":813725491,"support_perbill":24878795,"approval":81.3725491,"support":2.4878795},{"time_hours":153,"approval_perbill":812500001,"support_perbill":24679029,"approval":81.2500001,"support":2.4679029},{"time_hours":154,"approval_perbill":811274511,"support_perbill":24481693,"approval":81.1274511,"support":2.4481693},{"time_hours":155,"approval_perbill":810049021,"support_perbill":24286742,"approval":81.0049021,"support":2.4286742},{"time_hours":156,"approval_perbill":808823530,"support_perbill":24094134,"approval":80.882353,"support":2.4094134},{"time_hours":157,"approval_perbill":807598040,"support_perbill":23903827,"approval":80.759804,"support":2.3903827},{"time_hours":158,"approval_perbill":806372550,"support_perbill":23715779,"approval":80.637255,"support":2.3715779},{"time_hours":159,"approval_perbill":805147060,"support_perbill":23529951,"approval":80.514706,"support":2.3529951},{"time_hours":160,"approval_perbill":803921569,"support_perbill":23346303,"approval":80.3921569,"support":2.3346303},{"time_hours":161,"approval_perbill":802696079,"support_perbill":23164797,"approval":80.2696079,"support":2.3164797},{"time_hours":162,"approval_perbill":801470589,"support_perbill":22985397,"approval":80.1470589,"support":2.2985397},{"time_hours":163,"approval_perbill":800245099,"support_perbill":22808065,"approval":80.0245099,"support":2.2808065},{"time_hours":164,"approval_perbill":799019608,"support_perbill":22632766,"approval":79.9019608,"support":2.2632766},{"time_hours":165,"approval_perbill":797794118,"support_perbill":22459466,"approval":79.7794118,"support":2.2459466},{"time_hours":166,"approval_perbill":796568628,"support_perbill":22288130,"approval":79.6568628,"support":2.228813},{"time_hours":167,"approval_perbill":795343138,"support_perbill":22118725,"approval":79.5343138,"support":2.2118725},{"time_hours":168,"approval_perbill":794117648,"support_perbill":21951219,"approval":79.4117648,"support":2.1951219},{"time_hours":169,"approval_perbill":792892158,"support_perbill":21785579,"approval":79.2892158,"support":2.1785579},{"time_hours":170,"approval_perbill":791666668,"support_perbill":21621776,"approval":79.1666668,"support":2.1621776},{"time_hours":171,"approval_perbill":790441178,"support_perbill":21459778,"approval":79.0441178,"support":2.1459778},{"time_hours":172,"approval_perbill":789215688,"support_perbill":21299556,"approval":78.9215688,"support":2.1299556},{"time_hours":173,"approval_perbill":787990197,"support_perbill":21141081,"approval":78.7990197,"support":2.1141081},{"time_hours":174,"approval_perbill":786764707,"support_perbill":20984324,"approval":78.6764707,"support":2.0984324},{"time_hours":175,"approval_perbill":785539217,"support_perbill":20829258,"approval":78.5539217,"support":2.0829258},{"time_hours":176,"approval_perbill":784313727,"support_perbill":20675855,"approval":78.4313727,"support":2.0675855},{"time_hours":177,"approval_perbill":783088236,"support_perbill":20524089,"approval":78.3088236,"support":2.0524089},{"time_hours":178,"approval_perbill":781862746,"support_perbill":20373934,"approval":78.1862746,"support":2.0373934},{"time_hours":179,"approval_perbill":780637256,"support_perbill":20225364,"approval":78.0637256,"support":2.0225364},{"time_hours":180,"approval_perbill":779411766,"support_perbill":20078354,"approval":77.9411766,"support":2.0078354},{"time_hours":181,"approval_perbill":778186275,"support_perbill":19932880,"approval":77.8186275,"support":1.993288},{"time_hours":182,"approval_perbill":776960785,"support_perbill":19788917,"approval":77.6960785,"support":1.9788917},{"time_hours":183,"approval_perbill":775735295,"support_perbill":19646444,"approval":77.5735295,"support":1.9646444},{"time_hours":184,"approval_perbill":774509805,"support_perbill":19505435,"approval":77.4509805,"support":1.9505435},{"time_hours":185,"approval_perbill":773284314,"support_perbill":19365870,"approval":77.3284314,"support":1.936587},{"time_hours":186,"approval_perbill":772058824,"support_perbill":19227725,"approval":77.2058824,"support":1.9227725},{"time_hours":187,"approval_perbill":770833334,"support_perbill":19090980,"approval":77.0833334,"support":1.909098},{"time_hours":188,"approval_perbill":769607844,"support_perbill":18955613,"approval":76.9607844,"support":1.8955613},{"time_hours":189,"approval_perbill":768382353,"support_perbill":18821603,"approval":76.8382353,"support":1.8821603},{"time_hours":190,"approval_perbill":767156863,"support_perbill":18688931,"approval":76.7156863,"support":1.8688931},{"time_hours":191,"approval_perbill":765931373,"support_perbill":18557575,"approval":76.5931373,"support":1.8557575},{"time_hours":192,"approval_perbill":764705883,"support_perbill":18427518,"approval":76.4705883,"support":1.8427518},{"time_hours":193,"approval_perbill":763480393,"support_perbill":18298739,"approval":76.3480393,"support":1.8298739},{"time_hours":194,"approval_perbill":762254903,"support_perbill":18171219,"approval":76.2254903,"support":1.8171219},{"time_hours":195,"approval_perbill":761029413,"support_perbill":18044941,"approval":76.1029413,"support":1.8044941},{"time_hours":196,"approval_perbill":759803923,"support_perbill":17919887,"approval":75.9803923,"support":1.7919887},{"time_hours":197,"approval_perbill":758578433,"support_perbill":17796038,"approval":75.8578433,"support":1.7796038},{"time_hours":198,"approval_perbill":757352942,"support_perbill":17673377,"approval":75.7352942,"support":1.7673377},{"time_hours":199,"approval_perbill":756127452,"support_perbill":17551888,"approval":75.6127452,"support":1.7551888},{"time_hours":200,"approval_perbill":754901962,"support_perbill":17431553,"approval":75.4901962,"support":1.7431553},{"time_hours":201,"approval_perbill":753676472,"support_perbill":17312357,"approval":75.3676472,"support":1.7312357},{"time_hours":202,"approval_perbill":752450981,"support_perbill":17194282,"approval":75.2450981,"support":1.7194282},{"time_hours":203,"approval_perbill":751225491,"support_perbill":17077315,"approval":75.1225491,"support":1.7077315},{"time_hours":204,"approval_perbill":750000001,"support_perbill":16961437,"approval":75.0000001,"support":1.6961437},{"time_hours":205,"approval_perbill":748774511,"support_perbill":16846636,"approval":74.8774511,"support":1.6846636},{"time_hours":206,"approval_perbill":747549020,"support_perbill":16732895,"approval":74.754902,"support":1.6732895},{"time_hours":207,"approval_perbill":746323530,"support_perbill":16620201,"approval":74.632353,"support":1.6620201},{"time_hours":208,"approval_perbill":745098040,"support_perbill":16508538,"approval":74.509804,"support":1.6508538},{"time_hours":209,"approval_perbill":743872550,"support_perbill":16397893,"approval":74.387255,"support":1.6397893},{"time_hours":210,"approval_perbill":742647059,"support_perbill":16288252,"approval":74.2647059,"support":1.6288252},{"time_hours":211,"approval_perbill":741421569,"support_perbill":16179601,"approval":74.1421569,"support":1.6179601},{"time_hours":212,"approval_perbill":740196079,"support_perbill":16071927,"approval":74.0196079,"support":1.6071927},{"time_hours":213,"approval_perbill":738970589,"support_perbill":15965217,"approval":73.8970589,"support":1.5965217},{"time_hours":214,"approval_perbill":737745099,"support_perbill":15859457,"approval":73.7745099,"support":1.5859457},{"time_hours":215,"approval_perbill":736519608,"support_perbill":15754636,"approval":73.6519608,"support":1.5754636},{"time_hours":216,"approval_perbill":735294118,"support_perbill":15650741,"approval":73.5294118,"support":1.5650741},{"time_hours":217,"approval_perbill":734068628,"support_perbill":15547759,"approval":73.4068628,"support":1.5547759},{"time_hours":218,"approval_perbill":732843138,"support_perbill":15445679,"approval":73.2843138,"support":1.5445679},{"time_hours":219,"approval_perbill":731617648,"support_perbill":15344488,"approval":73.1617648,"support":1.5344488},{"time_hours":220,"approval_perbill":730392158,"support_perbill":15244176,"approval":73.0392158,"support":1.5244176},{"time_hours":221,"approval_perbill":729166668,"support_perbill":15144731,"approval":72.9166668,"support":1.5144731},{"time_hours":222,"approval_perbill":727941178,"support_perbill":15046141,"approval":72.7941178,"support":1.5046141},{"time_hours":223,"approval_perbill":726715687,"support_perbill":14948396,"approval":72.6715687,"support":1.4948396},{"time_hours":224,"approval_perbill":725490197,"support_perbill":14851485,"approval":72.5490197,"support":1.4851485},{"time_hours":225,"approval_perbill":724264707,"support_perbill":14755396,"approval":72.4264707,"support":1.4755396},{"time_hours":226,"approval_perbill":723039217,"support_perbill":14660121,"approval":72.3039217,"support":1.4660121},{"time_hours":227,"approval_perbill":721813726,"support_perbill":14565648,"approval":72.1813726,"support":1.4565648},{"time_hours":228,"approval_perbill":720588236,"support_perbill":14471968,"approval":72.0588236,"support":1.4471968},{"time_hours":229,"approval_perbill":719362746,"support_perbill":14379070,"approval":71.9362746,"support":1.437907},{"time_hours":230,"approval_perbill":718137256,"support_perbill":14286945,"approval":71.8137256,"support":1.4286945},{"time_hours":231,"approval_perbill":716911765,"support_perbill":14195583,"approval":71.6911765,"support":1.4195583},{"time_hours":232,"approval_perbill":715686275,"support_perbill":14104975,"approval":71.5686275,"support":1.4104975},{"time_hours":233,"approval_perbill":714460785,"support_perbill":14015111,"approval":71.4460785,"support":1.4015111},{"time_hours":234,"approval_perbill":713235295,"support_perbill":13925982,"approval":71.3235295,"support":1.3925982},{"time_hours":235,"approval_perbill":712009805,"support_perbill":13837579,"approval":71.2009805,"support":1.3837579},{"time_hours":236,"approval_perbill":710784314,"support_perbill":13749894,"approval":71.0784314,"support":1.3749894},{"time_hours":237,"approval_perbill":709558824,"support_perbill":13662918,"approval":70.9558824,"support":1.3662918},{"time_hours":238,"approval_perbill":708333334,"support_perbill":13576642,"approval":70.8333334,"support":1.3576642},{"time_hours":239,"approval_perbill":707107844,"support_perbill":13491057,"approval":70.7107844,"support":1.3491057},{"time_hours":240,"approval_perbill":705882353,"support_perbill":13406156,"approval":70.5882353,"support":1.3406156},{"time_hours":241,"approval_perbill":704656863,"support_perbill":13321931,"approval":70.4656863,"support":1.3321931},{"time_hours":242,"approval_perbill":703431373,"support_perbill":13238372,"approval":70.3431373,"support":1.3238372},{"time_hours":243,"approval_perbill":702205883,"support_perbill":13155473,"approval":70.2205883,"support":1.3155473},{"time_hours":244,"approval_perbill":700980393,"support_perbill":13073226,"approval":70.0980393,"support":1.3073226},{"time_hours":245,"approval_perbill":699754903,"support_perbill":12991622,"approval":69.9754903,"support":1.2991622},{"time_hours":246,"approval_perbill":698529413,"support_perbill":12910655,"approval":69.8529413,"support":1.2910655},{"time_hours":247,"approval_perbill":697303923,"support_perbill":12830317,"approval":69.7303923,"support":1.2830317},{"time_hours":248,"approval_perbill":696078432,"support_perbill":12750601,"approval":69.6078432,"support":1.2750601},{"time_hours":249,"approval_perbill":694852942,"support_perbill":12671499,"approval":69.4852942,"support":1.2671499},{"time_hours":250,"approval_perbill":693627452,"support_perbill":12593005,"approval":69.3627452,"support":1.2593005},{"time_hours":251,"approval_perbill":692401962,"support_perbill":12515111,"approval":69.2401962,"support":1.2515111},{"time_hours":252,"approval_perbill":691176471,"support_perbill":12437810,"approval":69.1176471,"support":1.243781},{"time_hours":253,"approval_perbill":689950981,"support_perbill":12361097,"approval":68.9950981,"support":1.2361097},{"time_hours":254,"approval_perbill":688725491,"support_perbill":12284964,"approval":68.8725491,"support":1.2284964},{"time_hours":255,"approval_perbill":687500001,"support_perbill":12209404,"approval":68.7500001,"support":1.2209404},{"time_hours":256,"approval_perbill":686274511,"support_perbill":12134411,"approval":68.6274511,"support":1.2134411},{"time_hours":257,"approval_perbill":685049020,"support_perbill":12059980,"approval":68.504902,"support":1.205998},{"time_hours":258,"approval_perbill":683823530,"support_perbill":11986103,"approval":68.382353,"support":1.1986103},{"time_hours":259,"approval_perbill":682598040,"support_perbill":11912774,"approval":68.259804,"support":1.1912774},{"time_hours":260,"approval_perbill":681372550,"support_perbill":11839987,"approval":68.137255,"support":1.1839987},{"time_hours":261,"approval_perbill":680147059,"support_perbill":11767737,"approval":68.0147059,"support":1.1767737},{"time_hours":262,"approval_perbill":678921569,"support_perbill":11696017,"approval":67.8921569,"support":1.1696017},{"time_hours":263,"approval_perbill":677696079,"support_perbill":11624822,"approval":67.7696079,"support":1.1624822},{"time_hours":264,"approval_perbill":676470589,"support_perbill":11554145,"approval":67.6470589,"support":1.1554145},{"time_hours":265,"approval_perbill":675245099,"support_perbill":11483982,"approval":67.5245099,"support":1.1483982},{"time_hours":266,"approval_perbill":674019609,"support_perbill":11414326,"approval":67.4019609,"support":1.1414326},{"time_hours":267,"approval_perbill":672794119,"support_perbill":11345173,"approval":67.2794119,"support":1.1345173},{"time_hours":268,"approval_perbill":671568629,"support_perbill":11276516,"approval":67.1568629,"support":1.1276516},{"time_hours":269,"approval_perbill":670343138,"support_perbill":11208351,"approval":67.0343138,"support":1.1208351},{"time_hours":270,"approval_perbill":669117648,"support_perbill":11140671,"approval":66.9117648,"support":1.1140671},{"time_hours":271,"approval_perbill":667892158,"support_perbill":11073473,"approval":66.7892158,"support":1.1073473},{"time_hours":272,"approval_perbill":666666668,"support_perbill":11006750,"approval":66.6666668,"support":1.100675},{"time_hours":273,"approval_perbill":665441177,"support_perbill":10940499,"approval":66.5441177,"support":1.0940499},{"time_hours":274,"approval_perbill":664215687,"support_perbill":10874713,"approval":66.4215687,"support":1.0874713},{"time_hours":275,"approval_perbill":662990197,"support_perbill":10809388,"approval":66.2990197,"support":1.0809388},{"time_hours":276,"approval_perbill":661764707,"support_perbill":10744519,"approval":66.1764707,"support":1.0744519},{"time_hours":277,"approval_perbill":660539217,"support_perbill":10680101,"approval":66.0539217,"support":1.0680101},{"time_hours":278,"approval_perbill":659313726,"support_perbill":10616130,"approval":65.9313726,"support":1.061613},{"time_hours":279,"approval_perbill":658088236,"support_perbill":10552601,"approval":65.8088236,"support":1.0552601},{"time_hours":280,"approval_perbill":656862746,"support_perbill":10489510,"approval":65.6862746,"support":1.048951},{"time_hours":281,"approval_perbill":655637256,"support_perbill":10426852,"approval":65.5637256,"support":1.0426852},{"time_hours":282,"approval_perbill":654411765,"support_perbill":10364622,"approval":65.4411765,"support":1.0364622},{"time_hours":283,"approval_perbill":653186275,"support_perbill":10302816,"approval":65.3186275,"support":1.0302816},{"time_hours":284,"approval_perbill":651960785,"support_perbill":10241430,"approval":65.1960785,"support":1.024143},{"time_hours":285,"approval_perbill":650735295,"support_perbill":10180459,"approval":65.0735295,"support":1.0180459},{"time_hours":286,"approval_perbill":649509804,"support_perbill":10119900,"approval":64.9509804,"support":1.01199},{"time_hours":287,"approval_perbill":648284314,"support_perbill":10059748,"approval":64.8284314,"support":1.0059748},{"time_hours":288,"approval_perbill":647058824,"support_perbill":10000000,"approval":64.7058824,"support":1},{"time_hours":289,"approval_perbill":645833334,"support_perbill":9940650,"approval":64.5833334,"support":0.994065},{"time_hours":290,"approval_perbill":644607844,"support_perbill":9881695,"approval":64.4607844,"support":0.9881695},{"time_hours":291,"approval_perbill":643382354,"support_perbill":9823132,"approval":64.3382354,"support":0.9823132},{"time_hours":292,"approval_perbill":642156864,"support_perbill":9764955,"approval":64.2156864,"support":0.9764955},{"time_hours":293,"approval_perbill":640931374,"support_perbill":9707163,"approval":64.0931374,"support":0.9707163},{"time_hours":294,"approval_perbill":639705883,"support_perbill":9649749,"approval":63.9705883,"support":0.9649749},{"time_hours":295,"approval_perbill":638480393,"support_perbill":9592712,"approval":63.8480393,"support":0.9592712},{"time_hours":296,"approval_perbill":637254903,"support_perbill":9536047,"approval":63.7254903,"support":0.9536047},{"time_hours":297,"approval_perbill":636029413,"support_perbill":9479751,"approval":63.6029413,"support":0.9479751},{"time_hours":298,"approval_perbill":634803923,"support_perbill":9423820,"approval":63.4803923,"support":0.942382},{"time_hours":299,"approval_perbill":633578432,"support_perbill":9368250,"approval":63.3578432,"support":0.936825},{"time_hours":300,"approval_perbill":632352942,"support_perbill":9313038,"approval":63.2352942,"support":0.9313038},{"time_hours":301,"approval_perbill":631127452,"support_perbill":9258181,"approval":63.1127452,"support":0.9258181},{"time_hours":302,"approval_perbill":629901962,"support_perbill":9203674,"approval":62.9901962,"support":0.9203674},{"time_hours":303,"approval_perbill":628676471,"support_perbill":9149516,"approval":62.8676471,"support":0.9149516},{"time_hours":304,"approval_perbill":627450981,"support_perbill":9095702,"approval":62.7450981,"support":0.9095702},{"time_hours":305,"approval_perbill":626225491,"support_perbill":9042230,"approval":62.6225491,"support":0.904223},{"time_hours":306,"approval_perbill":625000001,"support_perbill":8989095,"approval":62.5000001,"support":0.8989095},{"time_hours":307,"approval_perbill":623774510,"support_perbill":8936295,"approval":62.377451,"support":0.8936295},{"time_hours":308,"approval_perbill":622549020,"support_perbill":8883826,"approval":62.254902,"support":0.8883826},{"time_hours":309,"approval_perbill":621323530,"support_perbill":8831687,"approval":62.132353,"support":0.8831687},{"time_hours":310,"approval_perbill":620098040,"support_perbill":8779872,"approval":62.009804,"support":0.8779872},{"time_hours":311,"approval_perbill":618872549,"support_perbill":8728380,"approval":61.8872549,"support":0.872838},{"time_hours":312,"approval_perbill":617647059,"support_perbill":8677207,"approval":61.7647059,"support":0.8677207},{"time_hours":313,"approval_perbill":616421569,"support_perbill":8626351,"approval":61.6421569,"support":0.8626351},{"time_hours":314,"approval_perbill":615196079,"support_perbill":8575808,"approval":61.5196079,"support":0.8575808},{"time_hours":315,"approval_perbill":613970589,"support_perbill":8525576,"approval":61.3970589,"support":0.8525576},{"time_hours":316,"approval_perbill":612745099,"support_perbill":8475652,"approval":61.2745099,"support":0.8475652},{"time_hours":317,"approval_perbill":611519609,"support_perbill":8426032,"approval":61.1519609,"support":0.8426032},{"time_hours":318,"approval_perbill":610294119,"support_perbill":8376715,"approval":61.0294119,"support":0.8376715},{"time_hours":319,"approval_perbill":609068629,"support_perbill":8327697,"approval":60.9068629,"support":0.8327697},{"time_hours":320,"approval_perbill":607843138,"support_perbill":8278976,"approval":60.7843138,"support":0.8278976},{"time_hours":321,"approval_perbill":606617648,"support_perbill":8230549,"approval":60.6617648,"support":0.8230549},{"time_hours":322,"approval_perbill":605392158,"support_perbill":8182413,"approval":60.5392158,"support":0.8182413},{"time_hours":323,"approval_perbill":604166668,"support_perbill":8134566,"approval":60.4166668,"support":0.8134566},{"time_hours":324,"approval_perbill":602941177,"support_perbill":8087005,"approval":60.2941177,"support":0.8087005},{"time_hours":325,"approval_perbill":601715687,"support_perbill":8039727,"approval":60.1715687,"support":0.8039727},{"time_hours":326,"approval_perbill":600490197,"support_perbill":7992731,"approval":60.0490197,"support":0.7992731},{"time_hours":327,"approval_perbill":599264707,"support_perbill":7946013,"approval":59.9264707,"support":0.7946013},{"time_hours":328,"approval_perbill":598039216,"support_perbill":7899571,"approval":59.8039216,"support":0.7899571},{"time_hours":329,"approval_perbill":596813726,"support_perbill":7853403,"approval":59.6813726,"support":0.7853403},{"time_hours":330,"approval_perbill":595588236,"support_perbill":7807506,"approval":59.5588236,"support":0.7807506},{"time_hours":331,"approval_perbill":594362746,"support_perbill":7761878,"approval":59.4362746,"support":0.7761878},{"time_hours":332,"approval_perbill":593137255,"support_perbill":7716516,"approval":59.3137255,"support":0.7716516},{"time_hours":333,"approval_perbill":591911765,"support_perbill":7671418,"approval":59.1911765,"support":0.7671418},{"time_hours":334,"approval_perbill":590686275,"support_perbill":7626583,"approval":59.0686275,"support":0.7626583},{"time_hours":335,"approval_perbill":589460785,"support_perbill":7582007,"approval":58.9460785,"support":0.7582007},{"time_hours":336,"approval_perbill":588235295,"support_perbill":7537688,"approval":58.8235295,"support":0.7537688},{"time_hours":337,"approval_perbill":587009805,"support_perbill":7493624,"approval":58.7009805,"support":0.7493624},{"time_hours":338,"approval_perbill":585784315,"support_perbill":7449814,"approval":58.5784315,"support":0.7449814},{"time_hours":339,"approval_perbill":584558825,"support_perbill":7406254,"approval":58.4558825,"support":0.7406254},{"time_hours":340,"approval_perbill":583333335,"support_perbill":7362942,"approval":58.3333335,"support":0.7362942},{"time_hours":341,"approval_perbill":582107844,"support_perbill":7319878,"approval":58.2107844,"support":0.7319878},{"time_hours":342,"approval_perbill":580882354,"support_perbill":7277057,"approval":58.0882354,"support":0.7277057},{"time_hours":343,"approval_perbill":579656864,"support_perbill":7234479,"approval":57.9656864,"support":0.7234479},{"time_hours":344,"approval_perbill":578431374,"support_perbill":7192141,"approval":57.8431374,"support":0.7192141},{"time_hours":345,"approval_perbill":577205883,"support_perbill":7150041,"approval":57.7205883,"support":0.7150041},{"time_hours":346,"approval_perbill":575980393,"support_perbill":7108178,"approval":57.5980393,"support":0.7108178},{"time_hours":347,"approval_perbill":574754903,"support_perbill":7066548,"approval":57.4754903,"support":0.7066548},{"time_hours":348,"approval_perbill":573529413,"support_perbill":7025151,"approval":57.3529413,"support":0.7025151},{"time_hours":349,"approval_perbill":572303922,"support_perbill":6983985,"approval":57.2303922,"support":0.6983985},{"time_hours":350,"approval_perbill":571078432,"support_perbill":6943047,"approval":57.1078432,"support":0.6943047},{"time_hours":351,"approval_perbill":569852942,"support_perbill":6902335,"approval":56.9852942,"support":0.6902335},{"time_hours":352,"approval_perbill":568627452,"support_perbill":6861848,"approval":56.8627452,"support":0.6861848},{"time_hours":353,"approval_perbill":567401961,"support_perbill":6821584,"approval":56.7401961,"support":0.6821584},{"time_hours":354,"approval_perbill":566176471,"support_perbill":6781540,"approval":56.6176471,"support":0.678154},{"time_hours":355,"approval_perbill":564950981,"support_perbill":6741716,"approval":56.4950981,"support":0.6741716},{"time_hours":356,"approval_perbill":563725491,"support_perbill":6702109,"approval":56.3725491,"support":0.6702109},{"time_hours":357,"approval_perbill":562500000,"support_perbill":6662718,"approval":56.25,"support":0.6662718},{"time_hours":358,"approval_perbill":561274510,"support_perbill":6623541,"approval":56.127451,"support":0.6623541},{"time_hours":359,"approval_perbill":560049020,"support_perbill":6584575,"approval":56.004902,"support":0.6584575},{"time_hours":360,"approval_perbill":558823530,"support_perbill":6545820,"approval":55.882353,"support":0.654582},{"time_hours":361,"approval_perbill":557598040,"support_perbill":6507274,"approval":55.759804,"support":0.6507274},{"time_hours":362,"approval_perbill":556372550,"support_perbill":6468935,"approval":55.637255,"support":0.6468935},{"time_hours":363,"approval_perbill":555147060,"support_perbill":6430801,"approval":55.514706,"support":0.6430801},{"time_hours":364,"approval_perbill":553921570,"support_perbill":6392871,"approval":55.392157,"support":0.6392871},{"time_hours":365,"approval_perbill":552696080,"support_perbill":6355142,"approval":55.269608,"support":0.6355142},{"time_hours":366,"approval_perbill":551470589,"support_perbill":6317615,"approval":55.1470589,"support":0.6317615},{"time_hours":367,"approval_perbill":550245099,"support_perbill":6280286,"approval":55.0245099,"support":0.6280286},{"time_hours":368,"approval_perbill":549019609,"support_perbill":6243154,"approval":54.9019609,"support":0.6243154},{"time_hours":369,"approval_perbill":547794119,"support_perbill":6206218,"approval":54.7794119,"support":0.6206218},{"time_hours":370,"approval_perbill":546568628,"support_perbill":6169476,"approval":54.6568628,"support":0.6169476},{"time_hours":371,"approval_perbill":545343138,"support_perbill":6132927,"approval":54.5343138,"support":0.6132927},{"time_hours":372,"approval_perbill":544117648,"support_perbill":6096569,"approval":54.4117648,"support":0.6096569},{"time_hours":373,"approval_perbill":542892158,"support_perbill":6060401,"approval":54.2892158,"support":0.6060401},{"time_hours":374,"approval_perbill":541666667,"support_perbill":6024421,"approval":54.1666667,"support":0.6024421},{"time_hours":375,"approval_perbill":540441177,"support_perbill":5988627,"approval":54.0441177,"support":0.5988627},{"time_hours":376,"approval_perbill":539215687,"support_perbill":5953019,"approval":53.9215687,"support":0.5953019},{"time_hours":377,"approval_perbill":537990197,"support_perbill":5917595,"approval":53.7990197,"support":0.5917595},{"time_hours":378,"approval_perbill":536764706,"support_perbill":5882353,"approval":53.6764706,"support":0.5882353},{"time_hours":379,"approval_perbill":535539216,"support_perbill":5847292,"approval":53.5539216,"support":0.5847292},{"time_hours":380,"approval_perbill":534313726,"support_perbill":5812410,"approval":53.4313726,"support":0.581241},{"time_hours":381,"approval_perbill":533088236,"support_perbill":5777707,"approval":53.3088236,"support":0.5777707},{"time_hours":382,"approval_perbill":531862746,"support_perbill":5743181,"approval":53.1862746,"support":0.5743181},{"time_hours":383,"approval_perbill":530637255,"support_perbill":5708830,"approval":53.0637255,"support":0.570883},{"time_hours":384,"approval_perbill":529411765,"support_perbill":5674653,"approval":52.9411765,"support":0.5674653},{"time_hours":385,"approval_perbill":528186275,"support_perbill":5640649,"approval":52.8186275,"support":0.5640649},{"time_hours":386,"approval_perbill":526960785,"support_perbill":5606817,"approval":52.6960785,"support":0.5606817},{"time_hours":387,"approval_perbill":525735295,"support_perbill":5573155,"approval":52.5735295,"support":0.5573155},{"time_hours":388,"approval_perbill":524509805,"support_perbill":5539662,"approval":52.4509805,"support":0.5539662},{"time_hours":389,"approval_perbill":523284315,"support_perbill":5506336,"approval":52.3284315,"support":0.5506336},{"time_hours":390,"approval_perbill":522058825,"support_perbill":5473177,"approval":52.2058825,"support":0.5473177},{"time_hours":391,"approval_perbill":520833334,"support_perbill":5440183,"approval":52.0833334,"support":0.5440183},{"time_hours":392,"approval_perbill":519607844,"support_perbill":5407354,"approval":51.9607844,"support":0.5407354},{"time_hours":393,"approval_perbill":518382354,"support_perbill":5374687,"approval":51.8382354,"support":0.5374687},{"time_hours":394,"approval_perbill":517156864,"support_perbill":5342181,"approval":51.7156864,"support":0.5342181},{"time_hours":395,"approval_perbill":515931373,"support_perbill":5309836,"approval":51.5931373,"support":0.5309836},{"time_hours":396,"approval_perbill":514705883,"support_perbill":5277650,"approval":51.4705883,"support":0.527765},{"time_hours":397,"approval_perbill":513480393,"support_perbill":5245622,"approval":51.3480393,"support":0.5245622},{"time_hours":398,"approval_perbill":512254903,"support_perbill":5213751,"approval":51.2254903,"support":0.5213751},{"time_hours":399,"approval_perbill":511029412,"support_perbill":5182035,"approval":51.1029412,"support":0.5182035},{"time_hours":400,"approval_perbill":509803922,"support_perbill":5150474,"approval":50.9803922,"support":0.5150474},{"time_hours":401,"approval_perbill":508578432,"support_perbill":5119067,"approval":50.8578432,"support":0.5119067},{"time_hours":402,"approval_perbill":507352942,"support_perbill":5087812,"approval":50.7352942,"support":0.5087812},{"time_hours":403,"approval_perbill":506127452,"support_perbill":5056708,"approval":50.6127452,"support":0.5056708},{"time_hours":404,"approval_perbill":504901961,"support_perbill":5025754,"approval":50.4901961,"support":0.5025754},{"time_hours":405,"approval_perbill":503676471,"support_perbill":4994949,"approval":50.3676471,"support":0.4994949},{"time_hours":406,"approval_perbill":502450981,"support_perbill":4964292,"approval":50.2450981,"support":0.4964292},{"time_hours":407,"approval_perbill":501225491,"support_perbill":4933782,"approval":50.1225491,"support":0.4933782},{"time_hours":408,"approval_perbill":500000000,"support_perbill":4903417,"approval":50,"support":0.4903417},{"time_hours":409,"approval_perbill":500000000,"support_perbill":4873198,"approval":50,"support":0.4873198},{"time_hours":410,"approval_perbill":500000000,"support_perbill":4843122,"approval":50,"support":0.4843122},{"time_hours":411,"approval_perbill":500000000,"support_perbill":4813189,"approval":50,"support":0.4813189},{"time_hours":412,"approval_perbill":500000000,"support_perbill":4783398,"approval":50,"support":0.4783398},{"time_hours":413,"approval_perbill":500000000,"support_perbill":4753747,"approval":50,"support":0.4753747},{"time_hours":414,"approval_perbill":500000000,"support_perbill":4724236,"approval":50,"support":0.4724236},{"time_hours":415,"approval_perbill":500000000,"support_perbill":4694864,"approval":50,"support":0.4694864},{"time_hours":416,"approval_perbill":500000000,"support_perbill":4665630,"approval":50,"support":0.466563},{"time_hours":417,"approval_perbill":500000000,"support_perbill":4636532,"approval":50,"support":0.4636532},{"time_hours":418,"approval_perbill":500000000,"support_perbill":4607570,"approval":50,"support":0.460757},{"time_hours":419,"approval_perbill":500000000,"support_perbill":4578743,"approval":50,"support":0.4578743},{"time_hours":420,"approval_perbill":500000000,"support_perbill":4550050,"approval":50,"support":0.455005},{"time_hours":421,"approval_perbill":500000000,"support_perbill":4521490,"approval":50,"support":0.452149},{"time_hours":422,"approval_perbill":500000000,"support_perbill":4493062,"approval":50,"support":0.4493062},{"time_hours":423,"approval_perbill":500000000,"support_perbill":4464766,"approval":50,"support":0.4464766},{"time_hours":424,"approval_perbill":500000000,"support_perbill":4436599,"approval":50,"support":0.4436599},{"time_hours":425,"approval_perbill":500000000,"support_perbill":4408562,"approval":50,"support":0.4408562},{"time_hours":426,"approval_perbill":500000000,"support_perbill":4380654,"approval":50,"support":0.4380654},{"time_hours":427,"approval_perbill":500000000,"support_perbill":4352873,"approval":50,"support":0.4352873},{"time_hours":428,"approval_perbill":500000000,"support_perbill":4325218,"approval":50,"support":0.4325218},{"time_hours":429,"approval_perbill":500000000,"support_perbill":4297690,"approval":50,"support":0.429769},{"time_hours":430,"approval_perbill":500000000,"support_perbill":4270287,"approval":50,"support":0.4270287},{"time_hours":431,"approval_perbill":500000000,"support_perbill":4243007,"approval":50,"support":0.4243007},{"time_hours":432,"approval_perbill":500000000,"support_perbill":4215851,"approval":50,"support":0.4215851},{"time_hours":433,"approval_perbill":500000000,"support_perbill":4188818,"approval":50,"support":0.4188818},{"time_hours":434,"approval_perbill":500000000,"support_perbill":4161906,"approval":50,"support":0.4161906},{"time_hours":435,"approval_perbill":500000000,"support_perbill":4135115,"approval":50,"support":0.4135115},{"time_hours":436,"approval_perbill":500000000,"support_perbill":4108444,"approval":50,"support":0.4108444},{"time_hours":437,"approval_perbill":500000000,"support_perbill":4081892,"approval":50,"support":0.4081892},{"time_hours":438,"approval_perbill":500000000,"support_perbill":4055459,"approval":50,"support":0.4055459},{"time_hours":439,"approval_perbill":500000000,"support_perbill":4029143,"approval":50,"support":0.4029143},{"time_hours":440,"approval_perbill":500000000,"support_perbill":4002944,"approval":50,"support":0.4002944},{"time_hours":441,"approval_perbill":500000000,"support_perbill":3976862,"approval":50,"support":0.3976862},{"time_hours":442,"approval_perbill":500000000,"support_perbill":3950894,"approval":50,"support":0.3950894},{"time_hours":443,"approval_perbill":500000000,"support_perbill":3925041,"approval":50,"support":0.3925041},{"time_hours":444,"approval_perbill":500000000,"support_perbill":3899302,"approval":50,"support":0.3899302},{"time_hours":445,"approval_perbill":500000000,"support_perbill":3873676,"approval":50,"support":0.3873676},{"time_hours":446,"approval_perbill":500000000,"support_perbill":3848162,"approval":50,"support":0.3848162},{"time_hours":447,"approval_perbill":500000000,"support_perbill":3822760,"approval":50,"support":0.382276},{"time_hours":448,"approval_perbill":500000000,"support_perbill":3797468,"approval":50,"support":0.3797468},{"time_hours":449,"approval_perbill":500000000,"support_perbill":3772287,"approval":50,"support":0.3772287},{"time_hours":450,"approval_perbill":500000000,"support_perbill":3747215,"approval":50,"support":0.3747215},{"time_hours":451,"approval_perbill":500000000,"support_perbill":3722251,"approval":50,"support":0.3722251},{"time_hours":452,"approval_perbill":500000000,"support_perbill":3697396,"approval":50,"support":0.3697396},{"time_hours":453,"approval_perbill":500000000,"support_perbill":3672648,"approval":50,"support":0.3672648},{"time_hours":454,"approval_perbill":500000000,"support_perbill":3648006,"approval":50,"support":0.3648006},{"time_hours":455,"approval_perbill":500000000,"support_perbill":3623471,"approval":50,"support":0.3623471},{"time_hours":456,"approval_perbill":500000000,"support_perbill":3599040,"approval":50,"support":0.359904},{"time_hours":457,"approval_perbill":500000000,"support_perbill":3574714,"approval":50,"support":0.3574714},{"time_hours":458,"approval_perbill":500000000,"support_perbill":3550492,"approval":50,"support":0.3550492},{"time_hours":459,"approval_perbill":500000000,"support_perbill":3526373,"approval":50,"support":0.3526373},{"time_hours":460,"approval_perbill":500000000,"support_perbill":3502357,"approval":50,"support":0.3502357},{"time_hours":461,"approval_perbill":500000000,"support_perbill":3478442,"approval":50,"support":0.3478442},{"time_hours":462,"approval_perbill":500000000,"support_perbill":3454629,"approval":50,"support":0.3454629},{"time_hours":463,"approval_perbill":500000000,"support_perbill":3430916,"approval":50,"support":0.3430916},{"time_hours":464,"approval_perbill":500000000,"support_perbill":3407304,"approval":50,"support":0.3407304},{"time_hours":465,"approval_perbill":500000000,"support_perbill":3383790,"approval":50,"support":0.338379},{"time_hours":466,"approval_perbill":500000000,"support_perbill":3360376,"approval":50,"support":0.3360376},{"time_hours":467,"approval_perbill":500000000,"support_perbill":3337059,"approval":50,"support":0.3337059},{"time_hours":468,"approval_perbill":500000000,"support_perbill":3313840,"approval":50,"support":0.331384},{"time_hours":469,"approval_perbill":500000000,"support_perbill":3290718,"approval":50,"support":0.3290718},{"time_hours":470,"approval_perbill":500000000,"support_perbill":3267692,"approval":50,"support":0.3267692},{"time_hours":471,"approval_perbill":500000000,"support_perbill":3244761,"approval":50,"support":0.3244761},{"time_hours":472,"approval_perbill":500000000,"support_perbill":3221926,"approval":50,"support":0.3221926},{"time_hours":473,"approval_perbill":500000000,"support_perbill":3199185,"approval":50,"support":0.3199185},{"time_hours":474,"approval_perbill":500000000,"support_perbill":3176538,"approval":50,"support":0.3176538},{"time_hours":475,"approval_perbill":500000000,"support_perbill":3153985,"approval":50,"support":0.3153985},{"time_hours":476,"approval_perbill":500000000,"support_perbill":3131524,"approval":50,"support":0.3131524},{"time_hours":477,"approval_perbill":500000000,"support_perbill":3109155,"approval":50,"support":0.3109155},{"time_hours":478,"approval_perbill":500000000,"support_perbill":3086878,"approval":50,"support":0.3086878},{"time_hours":479,"approval_perbill":500000000,"support_perbill":3064692,"approval":50,"support":0.3064692},{"time_hours":480,"approval_perbill":500000000,"support_perbill":3042596,"approval":50,"support":0.3042596},{"time_hours":481,"approval_perbill":500000000,"support_perbill":3020590,"approval":50,"support":0.302059},{"time_hours":482,"approval_perbill":500000000,"support_perbill":2998674,"approval":50,"support":0.2998674},{"time_hours":483,"approval_perbill":500000000,"support_perbill":2976847,"approval":50,"support":0.2976847},{"time_hours":484,"approval_perbill":500000000,"support_perbill":2955107,"approval":50,"support":0.2955107},{"time_hours":485,"approval_perbill":500000000,"support_perbill":2933456,"approval":50,"support":0.2933456},{"time_hours":486,"approval_perbill":500000000,"support_perbill":2911892,"approval":50,"support":0.2911892},{"time_hours":487,"approval_perbill":500000000,"support_perbill":2890414,"approval":50,"support":0.2890414},{"time_hours":488,"approval_perbill":500000000,"support_perbill":2869023,"approval":50,"support":0.2869023},{"time_hours":489,"approval_perbill":500000000,"support_perbill":2847717,"approval":50,"support":0.2847717},{"time_hours":490,"approval_perbill":500000000,"support_perbill":2826496,"approval":50,"support":0.2826496},{"time_hours":491,"approval_perbill":500000000,"support_perbill":2805360,"approval":50,"support":0.280536},{"time_hours":492,"approval_perbill":500000000,"support_perbill":2784309,"approval":50,"support":0.2784309},{"time_hours":493,"approval_perbill":500000000,"support_perbill":2763341,"approval":50,"support":0.2763341},{"time_hours":494,"approval_perbill":500000000,"support_perbill":2742455,"approval":50,"support":0.2742455},{"time_hours":495,"approval_perbill":500000000,"support_perbill":2721653,"approval":50,"support":0.2721653},{"time_hours":496,"approval_perbill":500000000,"support_perbill":2700933,"approval":50,"support":0.2700933},{"time_hours":497,"approval_perbill":500000000,"support_perbill":2680294,"approval":50,"support":0.2680294},{"time_hours":498,"approval_perbill":500000000,"support_perbill":2659737,"approval":50,"support":0.2659737},{"time_hours":499,"approval_perbill":500000000,"support_perbill":2639260,"approval":50,"support":0.263926},{"time_hours":500,"approval_perbill":500000000,"support_perbill":2618864,"approval":50,"support":0.2618864},{"time_hours":501,"approval_perbill":500000000,"support_perbill":2598547,"approval":50,"support":0.2598547},{"time_hours":502,"approval_perbill":500000000,"support_perbill":2578310,"approval":50,"support":0.257831},{"time_hours":503,"approval_perbill":500000000,"support_perbill":2558151,"approval":50,"support":0.2558151},{"time_hours":504,"approval_perbill":500000000,"support_perbill":2538071,"approval":50,"support":0.2538071},{"time_hours":505,"approval_perbill":500000000,"support_perbill":2518069,"approval":50,"support":0.2518069},{"time_hours":506,"approval_perbill":500000000,"support_perbill":2498144,"approval":50,"support":0.2498144},{"time_hours":507,"approval_perbill":500000000,"support_perbill":2478296,"approval":50,"support":0.2478296},{"time_hours":508,"approval_perbill":500000000,"support_perbill":2458525,"approval":50,"support":0.2458525},{"time_hours":509,"approval_perbill":500000000,"support_perbill":2438830,"approval":50,"support":0.243883},{"time_hours":510,"approval_perbill":500000000,"support_perbill":2419210,"approval":50,"support":0.241921},{"time_hours":511,"approval_perbill":500000000,"support_perbill":2399666,"approval":50,"support":0.2399666},{"time_hours":512,"approval_perbill":500000000,"support_perbill":2380197,"approval":50,"support":0.2380197},{"time_hours":513,"approval_perbill":500000000,"support_perbill":2360802,"approval":50,"support":0.2360802},{"time_hours":514,"approval_perbill":500000000,"support_perbill":2341481,"approval":50,"support":0.2341481},{"time_hours":515,"approval_perbill":500000000,"support_perbill":2322233,"approval":50,"support":0.2322233},{"time_hours":516,"approval_perbill":500000000,"support_perbill":2303059,"approval":50,"support":0.2303059},{"time_hours":517,"approval_perbill":500000000,"support_perbill":2283957,"approval":50,"support":0.2283957},{"time_hours":518,"approval_perbill":500000000,"support_perbill":2264928,"approval":50,"support":0.2264928},{"time_hours":519,"approval_perbill":500000000,"support_perbill":2245970,"approval":50,"support":0.224597},{"time_hours":520,"approval_perbill":500000000,"support_perbill":2227084,"approval":50,"support":0.2227084},{"time_hours":521,"approval_perbill":500000000,"support_perbill":2208269,"approval":50,"support":0.2208269},{"time_hours":522,"approval_perbill":500000000,"support_perbill":2189525,"approval":50,"support":0.2189525},{"time_hours":523,"approval_perbill":500000000,"support_perbill":2170851,"approval":50,"support":0.2170851},{"time_hours":524,"approval_perbill":500000000,"support_perbill":2152247,"approval":50,"support":0.2152247},{"time_hours":525,"approval_perbill":500000000,"support_perbill":2133712,"approval":50,"support":0.2133712},{"time_hours":526,"approval_perbill":500000000,"support_perbill":2115247,"approval":50,"support":0.2115247},{"time_hours":527,"approval_perbill":500000000,"support_perbill":2096850,"approval":50,"support":0.209685},{"time_hours":528,"approval_perbill":500000000,"support_perbill":2078522,"approval":50,"support":0.2078522},{"time_hours":529,"approval_perbill":500000000,"support_perbill":2060261,"approval":50,"support":0.2060261},{"time_hours":530,"approval_perbill":500000000,"support_perbill":2042068,"approval":50,"support":0.2042068},{"time_hours":531,"approval_perbill":500000000,"support_perbill":2023943,"approval":50,"support":0.2023943},{"time_hours":532,"approval_perbill":500000000,"support_perbill":2005884,"approval":50,"support":0.2005884},{"time_hours":533,"approval_perbill":500000000,"support_perbill":1987891,"approval":50,"support":0.1987891},{"time_hours":534,"approval_perbill":500000000,"support_perbill":1969965,"approval":50,"support":0.1969965},{"time_hours":535,"approval_perbill":500000000,"support_perbill":1952104,"approval":50,"support":0.1952104},{"time_hours":536,"approval_perbill":500000000,"support_perbill":1934309,"approval":50,"support":0.1934309},{"time_hours":537,"approval_perbill":500000000,"support_perbill":1916579,"approval":50,"support":0.1916579},{"time_hours":538,"approval_perbill":500000000,"support_perbill":1898913,"approval":50,"support":0.1898913},{"time_hours":539,"approval_perbill":500000000,"support_perbill":1881312,"approval":50,"support":0.1881312},{"time_hours":540,"approval_perbill":500000000,"support_perbill":1863775,"approval":50,"support":0.1863775},{"time_hours":541,"approval_perbill":500000000,"support_perbill":1846301,"approval":50,"support":0.1846301},{"time_hours":542,"approval_perbill":500000000,"support_perbill":1828891,"approval":50,"support":0.1828891},{"time_hours":543,"approval_perbill":500000000,"support_perbill":1811543,"approval":50,"support":0.1811543},{"time_hours":544,"approval_perbill":500000000,"support_perbill":1794258,"approval":50,"support":0.1794258},{"time_hours":545,"approval_perbill":500000000,"support_perbill":1777036,"approval":50,"support":0.1777036},{"time_hours":546,"approval_perbill":500000000,"support_perbill":1759875,"approval":50,"support":0.1759875},{"time_hours":547,"approval_perbill":500000000,"support_perbill":1742775,"approval":50,"support":0.1742775},{"time_hours":548,"approval_perbill":500000000,"support_perbill":1725737,"approval":50,"support":0.1725737},{"time_hours":549,"approval_perbill":500000000,"support_perbill":1708760,"approval":50,"support":0.170876},{"time_hours":550,"approval_perbill":500000000,"support_perbill":1691844,"approval":50,"support":0.1691844},{"time_hours":551,"approval_perbill":500000000,"support_perbill":1674988,"approval":50,"support":0.1674988},{"time_hours":552,"approval_perbill":500000000,"support_perbill":1658191,"approval":50,"support":0.1658191},{"time_hours":553,"approval_perbill":500000000,"support_perbill":1641455,"approval":50,"support":0.1641455},{"time_hours":554,"approval_perbill":500000000,"support_perbill":1624777,"approval":50,"support":0.1624777},{"time_hours":555,"approval_perbill":500000000,"support_perbill":1608159,"approval":50,"support":0.1608159},{"time_hours":556,"approval_perbill":500000000,"support_perbill":1591599,"approval":50,"support":0.1591599},{"time_hours":557,"approval_perbill":500000000,"support_perbill":1575098,"approval":50,"support":0.1575098},{"time_hours":558,"approval_perbill":500000000,"support_perbill":1558654,"approval":50,"support":0.1558654},{"time_hours":559,"approval_perbill":500000000,"support_perbill":1542269,"approval":50,"support":0.1542269},{"time_hours":560,"approval_perbill":500000000,"support_perbill":1525941,"approval":50,"support":0.1525941},{"time_hours":561,"approval_perbill":500000000,"support_perbill":1509670,"approval":50,"support":0.150967},{"time_hours":562,"approval_perbill":500000000,"support_perbill":1493456,"approval":50,"support":0.1493456},{"time_hours":563,"approval_perbill":500000000,"support_perbill":1477298,"approval":50,"support":0.1477298},{"time_hours":564,"approval_perbill":500000000,"support_perbill":1461197,"approval":50,"support":0.1461197},{"time_hours":565,"approval_perbill":500000000,"support_perbill":1445152,"approval":50,"support":0.1445152},{"time_hours":566,"approval_perbill":500000000,"support_perbill":1429162,"approval":50,"support":0.1429162},{"time_hours":567,"approval_perbill":500000000,"support_perbill":1413228,"approval":50,"support":0.1413228},{"time_hours":568,"approval_perbill":500000000,"support_perbill":1397348,"approval":50,"support":0.1397348},{"time_hours":569,"approval_perbill":500000000,"support_perbill":1381524,"approval":50,"support":0.1381524},{"time_hours":570,"approval_perbill":500000000,"support_perbill":1365754,"approval":50,"support":0.1365754},{"time_hours":571,"approval_perbill":500000000,"support_perbill":1350039,"approval":50,"support":0.1350039},{"time_hours":572,"approval_perbill":500000000,"support_perbill":1334377,"approval":50,"support":0.1334377},{"time_hours":573,"approval_perbill":500000000,"support_perbill":1318769,"approval":50,"support":0.1318769},{"time_hours":574,"approval_perbill":500000000,"support_perbill":1303214,"approval":50,"support":0.1303214},{"time_hours":575,"approval_perbill":500000000,"support_perbill":1287713,"approval":50,"support":0.1287713},{"time_hours":576,"approval_perbill":500000000,"support_perbill":1272264,"approval":50,"support":0.1272264},{"time_hours":577,"approval_perbill":500000000,"support_perbill":1256869,"approval":50,"support":0.1256869},{"time_hours":578,"approval_perbill":500000000,"support_perbill":1241525,"approval":50,"support":0.1241525},{"time_hours":579,"approval_perbill":500000000,"support_perbill":1226233,"approval":50,"support":0.1226233},{"time_hours":580,"approval_perbill":500000000,"support_perbill":1210994,"approval":50,"support":0.1210994},{"time_hours":581,"approval_perbill":500000000,"support_perbill":1195805,"approval":50,"support":0.1195805},{"time_hours":582,"approval_perbill":500000000,"support_perbill":1180668,"approval":50,"support":0.1180668},{"time_hours":583,"approval_perbill":500000000,"support_perbill":1165582,"approval":50,"support":0.1165582},{"time_hours":584,"approval_perbill":500000000,"support_perbill":1150547,"approval":50,"support":0.1150547},{"time_hours":585,"approval_perbill":500000000,"support_perbill":1135563,"approval":50,"support":0.1135563},{"time_hours":586,"approval_perbill":500000000,"support_perbill":1120628,"approval":50,"support":0.1120628},{"time_hours":587,"approval_perbill":500000000,"support_perbill":1105744,"approval":50,"support":0.1105744},{"time_hours":588,"approval_perbill":500000000,"support_perbill":1090909,"approval":50,"support":0.1090909},{"time_hours":589,"approval_perbill":500000000,"support_perbill":1076124,"approval":50,"support":0.1076124},{"time_hours":590,"approval_perbill":500000000,"support_perbill":1061388,"approval":50,"support":0.1061388},{"time_hours":591,"approval_perbill":500000000,"support_perbill":1046701,"approval":50,"support":0.1046701},{"time_hours":592,"approval_perbill":500000000,"support_perbill":1032063,"approval":50,"support":0.1032063},{"time_hours":593,"approval_perbill":500000000,"support_perbill":1017473,"approval":50,"support":0.1017473},{"time_hours":594,"approval_perbill":500000000,"support_perbill":1002932,"approval":50,"support":0.1002932},{"time_hours":595,"approval_perbill":500000000,"support_perbill":988438,"approval":50,"support":0.0988438},{"time_hours":596,"approval_perbill":500000000,"support_perbill":973993,"approval":50,"support":0.0973993},{"time_hours":597,"approval_perbill":500000000,"support_perbill":959595,"approval":50,"support":0.0959595},{"time_hours":598,"approval_perbill":500000000,"support_perbill":945244,"approval":50,"support":0.0945244},{"time_hours":599,"approval_perbill":500000000,"support_perbill":930940,"approval":50,"support":0.093094},{"time_hours":600,"approval_perbill":500000000,"support_perbill":916684,"approval":50,"support":0.0916684},{"time_hours":601,"approval_perbill":500000000,"support_perbill":902473,"approval":50,"support":0.0902473},{"time_hours":602,"approval_perbill":500000000,"support_perbill":888310,"approval":50,"support":0.088831},{"time_hours":603,"approval_perbill":500000000,"support_perbill":874192,"approval":50,"support":0.0874192},{"time_hours":604,"approval_perbill":500000000,"support_perbill":860121,"approval":50,"support":0.0860121},{"time_hours":605,"approval_perbill":500000000,"support_perbill":846095,"approval":50,"support":0.0846095},{"time_hours":606,"approval_perbill":500000000,"support_perbill":832114,"approval":50,"support":0.0832114},{"time_hours":607,"approval_perbill":500000000,"support_perbill":818179,"approval":50,"support":0.0818179},{"time_hours":608,"approval_perbill":500000000,"support_perbill":804289,"approval":50,"support":0.0804289},{"time_hours":609,"approval_perbill":500000000,"support_perbill":790444,"approval":50,"support":0.0790444},{"time_hours":610,"approval_perbill":500000000,"support_perbill":776644,"approval":50,"support":0.0776644},{"time_hours":611,"approval_perbill":500000000,"support_perbill":762888,"approval":50,"support":0.0762888},{"time_hours":612,"approval_perbill":500000000,"support_perbill":749176,"approval":50,"support":0.0749176},{"time_hours":613,"approval_perbill":500000000,"support_perbill":735508,"approval":50,"support":0.0735508},{"time_hours":614,"approval_perbill":500000000,"support_perbill":721884,"approval":50,"support":0.0721884},{"time_hours":615,"approval_perbill":500000000,"support_perbill":708303,"approval":50,"support":0.0708303},{"time_hours":616,"approval_perbill":500000000,"support_perbill":694766,"approval":50,"support":0.0694766},{"time_hours":617,"approval_perbill":500000000,"support_perbill":681272,"approval":50,"support":0.0681272},{"time_hours":618,"approval_perbill":500000000,"support_perbill":667821,"approval":50,"support":0.0667821},{"time_hours":619,"approval_perbill":500000000,"support_perbill":654412,"approval":50,"support":0.0654412},{"time_hours":620,"approval_perbill":500000000,"support_perbill":641047,"approval":50,"support":0.0641047},{"time_hours":621,"approval_perbill":500000000,"support_perbill":627723,"approval":50,"support":0.0627723},{"time_hours":622,"approval_perbill":500000000,"support_perbill":614442,"approval":50,"support":0.0614442},{"time_hours":623,"approval_perbill":500000000,"support_perbill":601202,"approval":50,"support":0.0601202},{"time_hours":624,"approval_perbill":500000000,"support_perbill":588005,"approval":50,"support":0.0588005},{"time_hours":625,"approval_perbill":500000000,"support_perbill":574848,"approval":50,"support":0.0574848},{"time_hours":626,"approval_perbill":500000000,"support_perbill":561734,"approval":50,"support":0.0561734},{"time_hours":627,"approval_perbill":500000000,"support_perbill":548660,"approval":50,"support":0.054866},{"time_hours":628,"approval_perbill":500000000,"support_perbill":535627,"approval":50,"support":0.0535627},{"time_hours":629,"approval_perbill":500000000,"support_perbill":522635,"approval":50,"support":0.0522635},{"time_hours":630,"approval_perbill":500000000,"support_perbill":509684,"approval":50,"support":0.0509684},{"time_hours":631,"approval_perbill":500000000,"support_perbill":496773,"approval":50,"support":0.0496773},{"time_hours":632,"approval_perbill":500000000,"support_perbill":483902,"approval":50,"support":0.0483902},{"time_hours":633,"approval_perbill":500000000,"support_perbill":471071,"approval":50,"support":0.0471071},{"time_hours":634,"approval_perbill":500000000,"support_perbill":458280,"approval":50,"support":0.045828},{"time_hours":635,"approval_perbill":500000000,"support_perbill":445529,"approval":50,"support":0.0445529},{"time_hours":636,"approval_perbill":500000000,"support_perbill":432817,"approval":50,"support":0.0432817},{"time_hours":637,"approval_perbill":500000000,"support_perbill":420144,"approval":50,"support":0.0420144},{"time_hours":638,"approval_perbill":500000000,"support_perbill":407511,"approval":50,"support":0.0407511},{"time_hours":639,"approval_perbill":500000000,"support_perbill":394916,"approval":50,"support":0.0394916},{"time_hours":640,"approval_perbill":500000000,"support_perbill":382360,"approval":50,"support":0.038236},{"time_hours":641,"approval_perbill":500000000,"support_perbill":369843,"approval":50,"support":0.0369843},{"time_hours":642,"approval_perbill":500000000,"support_perbill":357364,"approval":50,"support":0.0357364},{"time_hours":643,"approval_perbill":500000000,"support_perbill":344923,"approval":50,"support":0.0344923},{"time_hours":644,"approval_perbill":500000000,"support_perbill":332520,"approval":50,"support":0.033252},{"time_hours":645,"approval_perbill":500000000,"support_perbill":320155,"approval":50,"support":0.0320155},{"time_hours":646,"approval_perbill":500000000,"support_perbill":307828,"approval":50,"support":0.0307828},{"time_hours":647,"approval_perbill":500000000,"support_perbill":295538,"approval":50,"support":0.0295538},{"time_hours":648,"approval_perbill":500000000,"support_perbill":283286,"approval":50,"support":0.0283286},{"time_hours":649,"approval_perbill":500000000,"support_perbill":271071,"approval":50,"support":0.0271071},{"time_hours":650,"approval_perbill":500000000,"support_perbill":258892,"approval":50,"support":0.0258892},{"time_hours":651,"approval_perbill":500000000,"support_perbill":246751,"approval":50,"support":0.0246751},{"time_hours":652,"approval_perbill":500000000,"support_perbill":234646,"approval":50,"support":0.0234646},{"time_hours":653,"approval_perbill":500000000,"support_perbill":222578,"approval":50,"support":0.0222578},{"time_hours":654,"approval_perbill":500000000,"support_perbill":210546,"approval":50,"support":0.0210546},{"time_hours":655,"approval_perbill":500000000,"support_perbill":198550,"approval":50,"support":0.019855},{"time_hours":656,"approval_perbill":500000000,"support_perbill":186590,"approval":50,"support":0.018659},{"time_hours":657,"approval_perbill":500000000,"support_perbill":174666,"approval":50,"support":0.0174666},{"time_hours":658,"approval_perbill":500000000,"support_perbill":162778,"approval":50,"support":0.0162778},{"time_hours":659,"approval_perbill":500000000,"support_perbill":150925,"approval":50,"support":0.0150925},{"time_hours":660,"approval_perbill":500000000,"support_perbill":139108,"approval":50,"support":0.0139108},{"time_hours":661,"approval_perbill":500000000,"support_perbill":127326,"approval":50,"support":0.0127326},{"time_hours":662,"approval_perbill":500000000,"support_perbill":115578,"approval":50,"support":0.0115578},{"time_hours":663,"approval_perbill":500000000,"support_perbill":103866,"approval":50,"support":0.0103866},{"time_hours":664,"approval_perbill":500000000,"support_perbill":92188,"approval":50,"support":0.0092188},{"time_hours":665,"approval_perbill":500000000,"support_perbill":80545,"approval":50,"support":0.0080545},{"time_hours":666,"approval_perbill":500000000,"support_perbill":68937,"approval":50,"support":0.0068937},{"time_hours":667,"approval_perbill":500000000,"support_perbill":57363,"approval":50,"support":0.0057363},{"time_hours":668,"approval_perbill":500000000,"support_perbill":45822,"approval":50,"support":0.0045822},{"time_hours":669,"approval_perbill":500000000,"support_perbill":34316,"approval":50,"support":0.0034316},{"time_hours":670,"approval_perbill":500000000,"support_perbill":22844,"approval":50,"support":0.0022844},{"time_hours":671,"approval_perbill":500000000,"support_perbill":11405,"approval":50,"support":0.0011405},{"time_hours":672,"approval_perbill":500000000,"support_perbill":0,"approval":50,"support":0}]')},37329:p=>{"use strict";p.exports=JSON.parse('[{"time_hours":0,"approval_perbill":1000000000,"support_perbill":500000008,"approval":100,"support":50.0000008},{"time_hours":1,"approval_perbill":999255953,"support_perbill":485809452,"approval":99.9255953,"support":48.5809452},{"time_hours":2,"approval_perbill":998511905,"support_perbill":472363240,"approval":99.8511905,"support":47.236324},{"time_hours":3,"approval_perbill":997767858,"support_perbill":459604303,"approval":99.7767858,"support":45.9604303},{"time_hours":4,"approval_perbill":997023810,"support_perbill":447481262,"approval":99.702381,"support":44.7481262},{"time_hours":5,"approval_perbill":996279762,"support_perbill":435947725,"approval":99.6279762,"support":43.5947725},{"time_hours":6,"approval_perbill":995535715,"support_perbill":424961730,"approval":99.5535715,"support":42.496173},{"time_hours":7,"approval_perbill":994791667,"support_perbill":414485182,"approval":99.4791667,"support":41.4485182},{"time_hours":8,"approval_perbill":994047620,"support_perbill":404483449,"approval":99.404762,"support":40.4483449},{"time_hours":9,"approval_perbill":993303572,"support_perbill":394924960,"approval":99.3303572,"support":39.492496},{"time_hours":10,"approval_perbill":992559524,"support_perbill":385780901,"approval":99.2559524,"support":38.5780901},{"time_hours":11,"approval_perbill":991815477,"support_perbill":377024885,"approval":99.1815477,"support":37.7024885},{"time_hours":12,"approval_perbill":991071429,"support_perbill":368632725,"approval":99.1071429,"support":36.8632725},{"time_hours":13,"approval_perbill":990327381,"support_perbill":360582198,"approval":99.0327381,"support":36.0582198},{"time_hours":14,"approval_perbill":989583334,"support_perbill":352852868,"approval":98.9583334,"support":35.2852868},{"time_hours":15,"approval_perbill":988839286,"support_perbill":345425884,"approval":98.8839286,"support":34.5425884},{"time_hours":16,"approval_perbill":988095239,"support_perbill":338283846,"approval":98.8095239,"support":33.8283846},{"time_hours":17,"approval_perbill":987351191,"support_perbill":331410659,"approval":98.7351191,"support":33.1410659},{"time_hours":18,"approval_perbill":986607143,"support_perbill":324791433,"approval":98.6607143,"support":32.4791433},{"time_hours":19,"approval_perbill":985863096,"support_perbill":318412343,"approval":98.5863096,"support":31.8412343},{"time_hours":20,"approval_perbill":985119048,"support_perbill":312260553,"approval":98.5119048,"support":31.2260553},{"time_hours":21,"approval_perbill":984375000,"support_perbill":306324124,"approval":98.4375,"support":30.6324124},{"time_hours":22,"approval_perbill":983630953,"support_perbill":300591949,"approval":98.3630953,"support":30.0591949},{"time_hours":23,"approval_perbill":982886905,"support_perbill":295053661,"approval":98.2886905,"support":29.5053661},{"time_hours":24,"approval_perbill":982142858,"support_perbill":289699587,"approval":98.2142858,"support":28.9699587},{"time_hours":25,"approval_perbill":981398810,"support_perbill":284520685,"approval":98.139881,"support":28.4520685},{"time_hours":26,"approval_perbill":980654762,"support_perbill":279508494,"approval":98.0654762,"support":27.9508494},{"time_hours":27,"approval_perbill":979910715,"support_perbill":274655099,"approval":97.9910715,"support":27.4655099},{"time_hours":28,"approval_perbill":979166667,"support_perbill":269953067,"approval":97.9166667,"support":26.9953067},{"time_hours":29,"approval_perbill":978422620,"support_perbill":265395426,"approval":97.842262,"support":26.5395426},{"time_hours":30,"approval_perbill":977678572,"support_perbill":260975623,"approval":97.7678572,"support":26.0975623},{"time_hours":31,"approval_perbill":976934524,"support_perbill":256687504,"approval":97.6934524,"support":25.6687504},{"time_hours":32,"approval_perbill":976190477,"support_perbill":252525267,"approval":97.6190477,"support":25.2525267},{"time_hours":33,"approval_perbill":975446429,"support_perbill":248483450,"approval":97.5446429,"support":24.848345},{"time_hours":34,"approval_perbill":974702381,"support_perbill":244556897,"approval":97.4702381,"support":24.4556897},{"time_hours":35,"approval_perbill":973958334,"support_perbill":240740754,"approval":97.3958334,"support":24.0740754},{"time_hours":36,"approval_perbill":973214286,"support_perbill":237030426,"approval":97.3214286,"support":23.7030426},{"time_hours":37,"approval_perbill":972470239,"support_perbill":233421570,"approval":97.2470239,"support":23.342157},{"time_hours":38,"approval_perbill":971726191,"support_perbill":229910079,"approval":97.1726191,"support":22.9910079},{"time_hours":39,"approval_perbill":970982143,"support_perbill":226492070,"approval":97.0982143,"support":22.649207},{"time_hours":40,"approval_perbill":970238096,"support_perbill":223163855,"approval":97.0238096,"support":22.3163855},{"time_hours":41,"approval_perbill":969494048,"support_perbill":219921943,"approval":96.9494048,"support":21.9921943},{"time_hours":42,"approval_perbill":968750000,"support_perbill":216763018,"approval":96.875,"support":21.6763018},{"time_hours":43,"approval_perbill":968005953,"support_perbill":213683937,"approval":96.8005953,"support":21.3683937},{"time_hours":44,"approval_perbill":967261905,"support_perbill":210681709,"approval":96.7261905,"support":21.0681709},{"time_hours":45,"approval_perbill":966517858,"support_perbill":207753492,"approval":96.6517858,"support":20.7753492},{"time_hours":46,"approval_perbill":965773810,"support_perbill":204896583,"approval":96.577381,"support":20.4896583},{"time_hours":47,"approval_perbill":965029762,"support_perbill":202108407,"approval":96.5029762,"support":20.2108407},{"time_hours":48,"approval_perbill":964285715,"support_perbill":199386516,"approval":96.4285715,"support":19.9386516},{"time_hours":49,"approval_perbill":963541667,"support_perbill":196728572,"approval":96.3541667,"support":19.6728572},{"time_hours":50,"approval_perbill":962797620,"support_perbill":194132348,"approval":96.279762,"support":19.4132348},{"time_hours":51,"approval_perbill":962053572,"support_perbill":191595717,"approval":96.2053572,"support":19.1595717},{"time_hours":52,"approval_perbill":961309524,"support_perbill":189116654,"approval":96.1309524,"support":18.9116654},{"time_hours":53,"approval_perbill":960565477,"support_perbill":186693220,"approval":96.0565477,"support":18.669322},{"time_hours":54,"approval_perbill":959821429,"support_perbill":184323563,"approval":95.9821429,"support":18.4323563},{"time_hours":55,"approval_perbill":959077381,"support_perbill":182005911,"approval":95.9077381,"support":18.2005911},{"time_hours":56,"approval_perbill":958333334,"support_perbill":179738574,"approval":95.8333334,"support":17.9738574},{"time_hours":57,"approval_perbill":957589286,"support_perbill":177519929,"approval":95.7589286,"support":17.7519929},{"time_hours":58,"approval_perbill":956845239,"support_perbill":175348424,"approval":95.6845239,"support":17.5348424},{"time_hours":59,"approval_perbill":956101191,"support_perbill":173222572,"approval":95.6101191,"support":17.3222572},{"time_hours":60,"approval_perbill":955357143,"support_perbill":171140951,"approval":95.5357143,"support":17.1140951},{"time_hours":61,"approval_perbill":954613096,"support_perbill":169102192,"approval":95.4613096,"support":16.9102192},{"time_hours":62,"approval_perbill":953869048,"support_perbill":167104986,"approval":95.3869048,"support":16.7104986},{"time_hours":63,"approval_perbill":953125000,"support_perbill":165148074,"approval":95.3125,"support":16.5148074},{"time_hours":64,"approval_perbill":952380953,"support_perbill":163230251,"approval":95.2380953,"support":16.3230251},{"time_hours":65,"approval_perbill":951636905,"support_perbill":161350356,"approval":95.1636905,"support":16.1350356},{"time_hours":66,"approval_perbill":950892858,"support_perbill":159507276,"approval":95.0892858,"support":15.9507276},{"time_hours":67,"approval_perbill":950148810,"support_perbill":157699938,"approval":95.014881,"support":15.7699938},{"time_hours":68,"approval_perbill":949404762,"support_perbill":155927313,"approval":94.9404762,"support":15.5927313},{"time_hours":69,"approval_perbill":948660715,"support_perbill":154188412,"approval":94.8660715,"support":15.4188412},{"time_hours":70,"approval_perbill":947916667,"support_perbill":152482280,"approval":94.7916667,"support":15.248228},{"time_hours":71,"approval_perbill":947172620,"support_perbill":150808000,"approval":94.717262,"support":15.0808},{"time_hours":72,"approval_perbill":946428572,"support_perbill":149164688,"approval":94.6428572,"support":14.9164688},{"time_hours":73,"approval_perbill":945684524,"support_perbill":147551493,"approval":94.5684524,"support":14.7551493},{"time_hours":74,"approval_perbill":944940477,"support_perbill":145967595,"approval":94.4940477,"support":14.5967595},{"time_hours":75,"approval_perbill":944196429,"support_perbill":144412202,"approval":94.4196429,"support":14.4412202},{"time_hours":76,"approval_perbill":943452381,"support_perbill":142884551,"approval":94.3452381,"support":14.2884551},{"time_hours":77,"approval_perbill":942708334,"support_perbill":141383909,"approval":94.2708334,"support":14.1383909},{"time_hours":78,"approval_perbill":941964286,"support_perbill":139909563,"approval":94.1964286,"support":13.9909563},{"time_hours":79,"approval_perbill":941220239,"support_perbill":138460830,"approval":94.1220239,"support":13.846083},{"time_hours":80,"approval_perbill":940476191,"support_perbill":137037046,"approval":94.0476191,"support":13.7037046},{"time_hours":81,"approval_perbill":939732143,"support_perbill":135637575,"approval":93.9732143,"support":13.5637575},{"time_hours":82,"approval_perbill":938988096,"support_perbill":134261797,"approval":93.8988096,"support":13.4261797},{"time_hours":83,"approval_perbill":938244048,"support_perbill":132909117,"approval":93.8244048,"support":13.2909117},{"time_hours":84,"approval_perbill":937500000,"support_perbill":131578956,"approval":93.75,"support":13.1578956},{"time_hours":85,"approval_perbill":936755953,"support_perbill":130270759,"approval":93.6755953,"support":13.0270759},{"time_hours":86,"approval_perbill":936011905,"support_perbill":128983985,"approval":93.6011905,"support":12.8983985},{"time_hours":87,"approval_perbill":935267858,"support_perbill":127718112,"approval":93.5267858,"support":12.7718112},{"time_hours":88,"approval_perbill":934523810,"support_perbill":126472636,"approval":93.452381,"support":12.6472636},{"time_hours":89,"approval_perbill":933779762,"support_perbill":125247065,"approval":93.3779762,"support":12.5247065},{"time_hours":90,"approval_perbill":933035715,"support_perbill":124040929,"approval":93.3035715,"support":12.4040929},{"time_hours":91,"approval_perbill":932291667,"support_perbill":122853769,"approval":93.2291667,"support":12.2853769},{"time_hours":92,"approval_perbill":931547620,"support_perbill":121685138,"approval":93.154762,"support":12.1685138},{"time_hours":93,"approval_perbill":930803572,"support_perbill":120534607,"approval":93.0803572,"support":12.0534607},{"time_hours":94,"approval_perbill":930059524,"support_perbill":119401760,"approval":93.0059524,"support":11.940176},{"time_hours":95,"approval_perbill":929315477,"support_perbill":118286191,"approval":92.9315477,"support":11.8286191},{"time_hours":96,"approval_perbill":928571429,"support_perbill":117187509,"approval":92.8571429,"support":11.7187509},{"time_hours":97,"approval_perbill":927827381,"support_perbill":116105331,"approval":92.7827381,"support":11.6105331},{"time_hours":98,"approval_perbill":927083334,"support_perbill":115039290,"approval":92.7083334,"support":11.503929},{"time_hours":99,"approval_perbill":926339286,"support_perbill":113989027,"approval":92.6339286,"support":11.3989027},{"time_hours":100,"approval_perbill":925595239,"support_perbill":112954195,"approval":92.5595239,"support":11.2954195},{"time_hours":101,"approval_perbill":924851191,"support_perbill":111934455,"approval":92.4851191,"support":11.1934455},{"time_hours":102,"approval_perbill":924107143,"support_perbill":110929480,"approval":92.4107143,"support":11.092948},{"time_hours":103,"approval_perbill":923363096,"support_perbill":109938952,"approval":92.3363096,"support":10.9938952},{"time_hours":104,"approval_perbill":922619048,"support_perbill":108962562,"approval":92.2619048,"support":10.8962562},{"time_hours":105,"approval_perbill":921875000,"support_perbill":108000008,"approval":92.1875,"support":10.8000008},{"time_hours":106,"approval_perbill":921130953,"support_perbill":107050999,"approval":92.1130953,"support":10.7050999},{"time_hours":107,"approval_perbill":920386905,"support_perbill":106115251,"approval":92.0386905,"support":10.6115251},{"time_hours":108,"approval_perbill":919642858,"support_perbill":105192488,"approval":91.9642858,"support":10.5192488},{"time_hours":109,"approval_perbill":918898810,"support_perbill":104282441,"approval":91.889881,"support":10.4282441},{"time_hours":110,"approval_perbill":918154762,"support_perbill":103384849,"approval":91.8154762,"support":10.3384849},{"time_hours":111,"approval_perbill":917410715,"support_perbill":102499459,"approval":91.7410715,"support":10.2499459},{"time_hours":112,"approval_perbill":916666667,"support_perbill":101626024,"approval":91.6666667,"support":10.1626024},{"time_hours":113,"approval_perbill":915922620,"support_perbill":100764302,"approval":91.592262,"support":10.0764302},{"time_hours":114,"approval_perbill":915178572,"support_perbill":99914060,"approval":91.5178572,"support":9.991406},{"time_hours":115,"approval_perbill":914434524,"support_perbill":99075069,"approval":91.4434524,"support":9.9075069},{"time_hours":116,"approval_perbill":913690477,"support_perbill":98247109,"approval":91.3690477,"support":9.8247109},{"time_hours":117,"approval_perbill":912946429,"support_perbill":97429963,"approval":91.2946429,"support":9.7429963},{"time_hours":118,"approval_perbill":912202381,"support_perbill":96623420,"approval":91.2202381,"support":9.662342},{"time_hours":119,"approval_perbill":911458334,"support_perbill":95827275,"approval":91.1458334,"support":9.5827275},{"time_hours":120,"approval_perbill":910714286,"support_perbill":95041329,"approval":91.0714286,"support":9.5041329},{"time_hours":121,"approval_perbill":909970239,"support_perbill":94265387,"approval":90.9970239,"support":9.4265387},{"time_hours":122,"approval_perbill":909226191,"support_perbill":93499259,"approval":90.9226191,"support":9.3499259},{"time_hours":123,"approval_perbill":908482143,"support_perbill":92742760,"approval":90.8482143,"support":9.274276},{"time_hours":124,"approval_perbill":907738096,"support_perbill":91995709,"approval":90.7738096,"support":9.1995709},{"time_hours":125,"approval_perbill":906994048,"support_perbill":91257931,"approval":90.6994048,"support":9.1257931},{"time_hours":126,"approval_perbill":906250000,"support_perbill":90529254,"approval":90.625,"support":9.0529254},{"time_hours":127,"approval_perbill":905505953,"support_perbill":89809511,"approval":90.5505953,"support":8.9809511},{"time_hours":128,"approval_perbill":904761905,"support_perbill":89098539,"approval":90.4761905,"support":8.9098539},{"time_hours":129,"approval_perbill":904017858,"support_perbill":88396178,"approval":90.4017858,"support":8.8396178},{"time_hours":130,"approval_perbill":903273810,"support_perbill":87702272,"approval":90.327381,"support":8.7702272},{"time_hours":131,"approval_perbill":902529762,"support_perbill":87016670,"approval":90.2529762,"support":8.701667},{"time_hours":132,"approval_perbill":901785715,"support_perbill":86339224,"approval":90.1785715,"support":8.6339224},{"time_hours":133,"approval_perbill":901041667,"support_perbill":85669788,"approval":90.1041667,"support":8.5669788},{"time_hours":134,"approval_perbill":900297620,"support_perbill":85008223,"approval":90.029762,"support":8.5008223},{"time_hours":135,"approval_perbill":899553572,"support_perbill":84354389,"approval":89.9553572,"support":8.4354389},{"time_hours":136,"approval_perbill":898809524,"support_perbill":83708152,"approval":89.8809524,"support":8.3708152},{"time_hours":137,"approval_perbill":898065477,"support_perbill":83069381,"approval":89.8065477,"support":8.3069381},{"time_hours":138,"approval_perbill":897321429,"support_perbill":82437946,"approval":89.7321429,"support":8.2437946},{"time_hours":139,"approval_perbill":896577381,"support_perbill":81813722,"approval":89.6577381,"support":8.1813722},{"time_hours":140,"approval_perbill":895833334,"support_perbill":81196587,"approval":89.5833334,"support":8.1196587},{"time_hours":141,"approval_perbill":895089286,"support_perbill":80586420,"approval":89.5089286,"support":8.058642},{"time_hours":142,"approval_perbill":894345239,"support_perbill":79983104,"approval":89.4345239,"support":7.9983104},{"time_hours":143,"approval_perbill":893601191,"support_perbill":79386524,"approval":89.3601191,"support":7.9386524},{"time_hours":144,"approval_perbill":892857143,"support_perbill":78796567,"approval":89.2857143,"support":7.8796567},{"time_hours":145,"approval_perbill":892113096,"support_perbill":78213125,"approval":89.2113096,"support":7.8213125},{"time_hours":146,"approval_perbill":891369048,"support_perbill":77636090,"approval":89.1369048,"support":7.763609},{"time_hours":147,"approval_perbill":890625000,"support_perbill":77065357,"approval":89.0625,"support":7.7065357},{"time_hours":148,"approval_perbill":889880953,"support_perbill":76500823,"approval":88.9880953,"support":7.6500823},{"time_hours":149,"approval_perbill":889136905,"support_perbill":75942388,"approval":88.9136905,"support":7.5942388},{"time_hours":150,"approval_perbill":888392858,"support_perbill":75389954,"approval":88.8392858,"support":7.5389954},{"time_hours":151,"approval_perbill":887648810,"support_perbill":74843424,"approval":88.764881,"support":7.4843424},{"time_hours":152,"approval_perbill":886904762,"support_perbill":74302703,"approval":88.6904762,"support":7.4302703},{"time_hours":153,"approval_perbill":886160715,"support_perbill":73767701,"approval":88.6160715,"support":7.3767701},{"time_hours":154,"approval_perbill":885416667,"support_perbill":73238327,"approval":88.5416667,"support":7.3238327},{"time_hours":155,"approval_perbill":884672620,"support_perbill":72714492,"approval":88.467262,"support":7.2714492},{"time_hours":156,"approval_perbill":883928572,"support_perbill":72196110,"approval":88.3928572,"support":7.219611},{"time_hours":157,"approval_perbill":883184524,"support_perbill":71683096,"approval":88.3184524,"support":7.1683096},{"time_hours":158,"approval_perbill":882440477,"support_perbill":71175368,"approval":88.2440477,"support":7.1175368},{"time_hours":159,"approval_perbill":881696429,"support_perbill":70672844,"approval":88.1696429,"support":7.0672844},{"time_hours":160,"approval_perbill":880952381,"support_perbill":70175444,"approval":88.0952381,"support":7.0175444},{"time_hours":161,"approval_perbill":880208334,"support_perbill":69683090,"approval":88.0208334,"support":6.968309},{"time_hours":162,"approval_perbill":879464286,"support_perbill":69195707,"approval":87.9464286,"support":6.9195707},{"time_hours":163,"approval_perbill":878720239,"support_perbill":68713219,"approval":87.8720239,"support":6.8713219},{"time_hours":164,"approval_perbill":877976191,"support_perbill":68235552,"approval":87.7976191,"support":6.8235552},{"time_hours":165,"approval_perbill":877232143,"support_perbill":67762635,"approval":87.7232143,"support":6.7762635},{"time_hours":166,"approval_perbill":876488096,"support_perbill":67294398,"approval":87.6488096,"support":6.7294398},{"time_hours":167,"approval_perbill":875744048,"support_perbill":66830771,"approval":87.5744048,"support":6.6830771},{"time_hours":168,"approval_perbill":875000000,"support_perbill":66371686,"approval":87.5,"support":6.6371686},{"time_hours":169,"approval_perbill":874255953,"support_perbill":65917078,"approval":87.4255953,"support":6.5917078},{"time_hours":170,"approval_perbill":873511905,"support_perbill":65466880,"approval":87.3511905,"support":6.546688},{"time_hours":171,"approval_perbill":872767858,"support_perbill":65021030,"approval":87.2767858,"support":6.502103},{"time_hours":172,"approval_perbill":872023810,"support_perbill":64579464,"approval":87.202381,"support":6.4579464},{"time_hours":173,"approval_perbill":871279762,"support_perbill":64142120,"approval":87.1279762,"support":6.414212},{"time_hours":174,"approval_perbill":870535715,"support_perbill":63708939,"approval":87.0535715,"support":6.3708939},{"time_hours":175,"approval_perbill":869791667,"support_perbill":63279862,"approval":86.9791667,"support":6.3279862},{"time_hours":176,"approval_perbill":869047620,"support_perbill":62854830,"approval":86.904762,"support":6.285483},{"time_hours":177,"approval_perbill":868303572,"support_perbill":62433787,"approval":86.8303572,"support":6.2433787},{"time_hours":178,"approval_perbill":867559524,"support_perbill":62016676,"approval":86.7559524,"support":6.2016676},{"time_hours":179,"approval_perbill":866815477,"support_perbill":61603443,"approval":86.6815477,"support":6.1603443},{"time_hours":180,"approval_perbill":866071429,"support_perbill":61194035,"approval":86.6071429,"support":6.1194035},{"time_hours":181,"approval_perbill":865327381,"support_perbill":60788396,"approval":86.5327381,"support":6.0788396},{"time_hours":182,"approval_perbill":864583334,"support_perbill":60386478,"approval":86.4583334,"support":6.0386478},{"time_hours":183,"approval_perbill":863839286,"support_perbill":59988228,"approval":86.3839286,"support":5.9988228},{"time_hours":184,"approval_perbill":863095239,"support_perbill":59593596,"approval":86.3095239,"support":5.9593596},{"time_hours":185,"approval_perbill":862351191,"support_perbill":59202533,"approval":86.2351191,"support":5.9202533},{"time_hours":186,"approval_perbill":861607143,"support_perbill":58814991,"approval":86.1607143,"support":5.8814991},{"time_hours":187,"approval_perbill":860863096,"support_perbill":58430923,"approval":86.0863096,"support":5.8430923},{"time_hours":188,"approval_perbill":860119048,"support_perbill":58050283,"approval":86.0119048,"support":5.8050283},{"time_hours":189,"approval_perbill":859375000,"support_perbill":57673023,"approval":85.9375,"support":5.7673023},{"time_hours":190,"approval_perbill":858630953,"support_perbill":57299101,"approval":85.8630953,"support":5.7299101},{"time_hours":191,"approval_perbill":857886905,"support_perbill":56928471,"approval":85.7886905,"support":5.6928471},{"time_hours":192,"approval_perbill":857142858,"support_perbill":56561090,"approval":85.7142858,"support":5.656109},{"time_hours":193,"approval_perbill":856398810,"support_perbill":56196916,"approval":85.639881,"support":5.6196916},{"time_hours":194,"approval_perbill":855654762,"support_perbill":55835907,"approval":85.5654762,"support":5.5835907},{"time_hours":195,"approval_perbill":854910715,"support_perbill":55478022,"approval":85.4910715,"support":5.5478022},{"time_hours":196,"approval_perbill":854166667,"support_perbill":55123221,"approval":85.4166667,"support":5.5123221},{"time_hours":197,"approval_perbill":853422620,"support_perbill":54771463,"approval":85.342262,"support":5.4771463},{"time_hours":198,"approval_perbill":852678572,"support_perbill":54422710,"approval":85.2678572,"support":5.442271},{"time_hours":199,"approval_perbill":851934524,"support_perbill":54076924,"approval":85.1934524,"support":5.4076924},{"time_hours":200,"approval_perbill":851190477,"support_perbill":53734066,"approval":85.1190477,"support":5.3734066},{"time_hours":201,"approval_perbill":850446429,"support_perbill":53394100,"approval":85.0446429,"support":5.33941},{"time_hours":202,"approval_perbill":849702381,"support_perbill":53056989,"approval":84.9702381,"support":5.3056989},{"time_hours":203,"approval_perbill":848958334,"support_perbill":52722698,"approval":84.8958334,"support":5.2722698},{"time_hours":204,"approval_perbill":848214286,"support_perbill":52391191,"approval":84.8214286,"support":5.2391191},{"time_hours":205,"approval_perbill":847470239,"support_perbill":52062434,"approval":84.7470239,"support":5.2062434},{"time_hours":206,"approval_perbill":846726191,"support_perbill":51736392,"approval":84.6726191,"support":5.1736392},{"time_hours":207,"approval_perbill":845982143,"support_perbill":51413033,"approval":84.5982143,"support":5.1413033},{"time_hours":208,"approval_perbill":845238096,"support_perbill":51092322,"approval":84.5238096,"support":5.1092322},{"time_hours":209,"approval_perbill":844494048,"support_perbill":50774229,"approval":84.4494048,"support":5.0774229},{"time_hours":210,"approval_perbill":843750000,"support_perbill":50458719,"approval":84.375,"support":5.0458719},{"time_hours":211,"approval_perbill":843005953,"support_perbill":50145764,"approval":84.3005953,"support":5.0145764},{"time_hours":212,"approval_perbill":842261905,"support_perbill":49835330,"approval":84.2261905,"support":4.983533},{"time_hours":213,"approval_perbill":841517858,"support_perbill":49527389,"approval":84.1517858,"support":4.9527389},{"time_hours":214,"approval_perbill":840773810,"support_perbill":49221911,"approval":84.077381,"support":4.9221911},{"time_hours":215,"approval_perbill":840029762,"support_perbill":48918865,"approval":84.0029762,"support":4.8918865},{"time_hours":216,"approval_perbill":839285715,"support_perbill":48618223,"approval":83.9285715,"support":4.8618223},{"time_hours":217,"approval_perbill":838541667,"support_perbill":48319956,"approval":83.8541667,"support":4.8319956},{"time_hours":218,"approval_perbill":837797620,"support_perbill":48024037,"approval":83.779762,"support":4.8024037},{"time_hours":219,"approval_perbill":837053572,"support_perbill":47730437,"approval":83.7053572,"support":4.7730437},{"time_hours":220,"approval_perbill":836309524,"support_perbill":47439130,"approval":83.6309524,"support":4.743913},{"time_hours":221,"approval_perbill":835565477,"support_perbill":47150089,"approval":83.5565477,"support":4.7150089},{"time_hours":222,"approval_perbill":834821429,"support_perbill":46863288,"approval":83.4821429,"support":4.6863288},{"time_hours":223,"approval_perbill":834077381,"support_perbill":46578700,"approval":83.4077381,"support":4.65787},{"time_hours":224,"approval_perbill":833333334,"support_perbill":46296300,"approval":83.3333334,"support":4.62963},{"time_hours":225,"approval_perbill":832589286,"support_perbill":46016063,"approval":83.2589286,"support":4.6016063},{"time_hours":226,"approval_perbill":831845239,"support_perbill":45737964,"approval":83.1845239,"support":4.5737964},{"time_hours":227,"approval_perbill":831101191,"support_perbill":45461979,"approval":83.1101191,"support":4.5461979},{"time_hours":228,"approval_perbill":830357143,"support_perbill":45188083,"approval":83.0357143,"support":4.5188083},{"time_hours":229,"approval_perbill":829613096,"support_perbill":44916254,"approval":82.9613096,"support":4.4916254},{"time_hours":230,"approval_perbill":828869048,"support_perbill":44646468,"approval":82.8869048,"support":4.4646468},{"time_hours":231,"approval_perbill":828125000,"support_perbill":44378701,"approval":82.8125,"support":4.4378701},{"time_hours":232,"approval_perbill":827380953,"support_perbill":44112932,"approval":82.7380953,"support":4.4112932},{"time_hours":233,"approval_perbill":826636905,"support_perbill":43849138,"approval":82.6636905,"support":4.3849138},{"time_hours":234,"approval_perbill":825892858,"support_perbill":43587297,"approval":82.5892858,"support":4.3587297},{"time_hours":235,"approval_perbill":825148810,"support_perbill":43327388,"approval":82.514881,"support":4.3327388},{"time_hours":236,"approval_perbill":824404762,"support_perbill":43069388,"approval":82.4404762,"support":4.3069388},{"time_hours":237,"approval_perbill":823660715,"support_perbill":42813278,"approval":82.3660715,"support":4.2813278},{"time_hours":238,"approval_perbill":822916667,"support_perbill":42559037,"approval":82.2916667,"support":4.2559037},{"time_hours":239,"approval_perbill":822172620,"support_perbill":42306643,"approval":82.217262,"support":4.2306643},{"time_hours":240,"approval_perbill":821428572,"support_perbill":42056078,"approval":82.1428572,"support":4.2056078},{"time_hours":241,"approval_perbill":820684524,"support_perbill":41807321,"approval":82.0684524,"support":4.1807321},{"time_hours":242,"approval_perbill":819940477,"support_perbill":41560353,"approval":81.9940477,"support":4.1560353},{"time_hours":243,"approval_perbill":819196429,"support_perbill":41315154,"approval":81.9196429,"support":4.1315154},{"time_hours":244,"approval_perbill":818452381,"support_perbill":41071706,"approval":81.8452381,"support":4.1071706},{"time_hours":245,"approval_perbill":817708334,"support_perbill":40829990,"approval":81.7708334,"support":4.082999},{"time_hours":246,"approval_perbill":816964286,"support_perbill":40589987,"approval":81.6964286,"support":4.0589987},{"time_hours":247,"approval_perbill":816220239,"support_perbill":40351680,"approval":81.6220239,"support":4.035168},{"time_hours":248,"approval_perbill":815476191,"support_perbill":40115050,"approval":81.5476191,"support":4.011505},{"time_hours":249,"approval_perbill":814732143,"support_perbill":39880080,"approval":81.4732143,"support":3.988008},{"time_hours":250,"approval_perbill":813988096,"support_perbill":39646752,"approval":81.3988096,"support":3.9646752},{"time_hours":251,"approval_perbill":813244048,"support_perbill":39415050,"approval":81.3244048,"support":3.941505},{"time_hours":252,"approval_perbill":812500000,"support_perbill":39184956,"approval":81.25,"support":3.9184956},{"time_hours":253,"approval_perbill":811755953,"support_perbill":38956453,"approval":81.1755953,"support":3.8956453},{"time_hours":254,"approval_perbill":811011905,"support_perbill":38729526,"approval":81.1011905,"support":3.8729526},{"time_hours":255,"approval_perbill":810267858,"support_perbill":38504158,"approval":81.0267858,"support":3.8504158},{"time_hours":256,"approval_perbill":809523810,"support_perbill":38280333,"approval":80.952381,"support":3.8280333},{"time_hours":257,"approval_perbill":808779762,"support_perbill":38058034,"approval":80.8779762,"support":3.8058034},{"time_hours":258,"approval_perbill":808035715,"support_perbill":37837248,"approval":80.8035715,"support":3.7837248},{"time_hours":259,"approval_perbill":807291667,"support_perbill":37617957,"approval":80.7291667,"support":3.7617957},{"time_hours":260,"approval_perbill":806547620,"support_perbill":37400148,"approval":80.654762,"support":3.7400148},{"time_hours":261,"approval_perbill":805803572,"support_perbill":37183805,"approval":80.5803572,"support":3.7183805},{"time_hours":262,"approval_perbill":805059524,"support_perbill":36968913,"approval":80.5059524,"support":3.6968913},{"time_hours":263,"approval_perbill":804315477,"support_perbill":36755458,"approval":80.4315477,"support":3.6755458},{"time_hours":264,"approval_perbill":803571429,"support_perbill":36543425,"approval":80.3571429,"support":3.6543425},{"time_hours":265,"approval_perbill":802827381,"support_perbill":36332800,"approval":80.2827381,"support":3.63328},{"time_hours":266,"approval_perbill":802083334,"support_perbill":36123570,"approval":80.2083334,"support":3.612357},{"time_hours":267,"approval_perbill":801339286,"support_perbill":35915720,"approval":80.1339286,"support":3.591572},{"time_hours":268,"approval_perbill":800595239,"support_perbill":35709238,"approval":80.0595239,"support":3.5709238},{"time_hours":269,"approval_perbill":799851191,"support_perbill":35504108,"approval":79.9851191,"support":3.5504108},{"time_hours":270,"approval_perbill":799107143,"support_perbill":35300319,"approval":79.9107143,"support":3.5300319},{"time_hours":271,"approval_perbill":798363096,"support_perbill":35097856,"approval":79.8363096,"support":3.5097856},{"time_hours":272,"approval_perbill":797619048,"support_perbill":34896708,"approval":79.7619048,"support":3.4896708},{"time_hours":273,"approval_perbill":796875000,"support_perbill":34696861,"approval":79.6875,"support":3.4696861},{"time_hours":274,"approval_perbill":796130953,"support_perbill":34498304,"approval":79.6130953,"support":3.4498304},{"time_hours":275,"approval_perbill":795386905,"support_perbill":34301022,"approval":79.5386905,"support":3.4301022},{"time_hours":276,"approval_perbill":794642858,"support_perbill":34105005,"approval":79.4642858,"support":3.4105005},{"time_hours":277,"approval_perbill":793898810,"support_perbill":33910239,"approval":79.389881,"support":3.3910239},{"time_hours":278,"approval_perbill":793154762,"support_perbill":33716714,"approval":79.3154762,"support":3.3716714},{"time_hours":279,"approval_perbill":792410715,"support_perbill":33524416,"approval":79.2410715,"support":3.3524416},{"time_hours":280,"approval_perbill":791666667,"support_perbill":33333336,"approval":79.1666667,"support":3.3333336},{"time_hours":281,"approval_perbill":790922620,"support_perbill":33143460,"approval":79.092262,"support":3.314346},{"time_hours":282,"approval_perbill":790178572,"support_perbill":32954778,"approval":79.0178572,"support":3.2954778},{"time_hours":283,"approval_perbill":789434524,"support_perbill":32767279,"approval":78.9434524,"support":3.2767279},{"time_hours":284,"approval_perbill":788690477,"support_perbill":32580951,"approval":78.8690477,"support":3.2580951},{"time_hours":285,"approval_perbill":787946429,"support_perbill":32395783,"approval":78.7946429,"support":3.2395783},{"time_hours":286,"approval_perbill":787202381,"support_perbill":32211765,"approval":78.7202381,"support":3.2211765},{"time_hours":287,"approval_perbill":786458334,"support_perbill":32028886,"approval":78.6458334,"support":3.2028886},{"time_hours":288,"approval_perbill":785714286,"support_perbill":31847136,"approval":78.5714286,"support":3.1847136},{"time_hours":289,"approval_perbill":784970239,"support_perbill":31666504,"approval":78.4970239,"support":3.1666504},{"time_hours":290,"approval_perbill":784226191,"support_perbill":31486979,"approval":78.4226191,"support":3.1486979},{"time_hours":291,"approval_perbill":783482143,"support_perbill":31308552,"approval":78.3482143,"support":3.1308552},{"time_hours":292,"approval_perbill":782738096,"support_perbill":31131212,"approval":78.2738096,"support":3.1131212},{"time_hours":293,"approval_perbill":781994048,"support_perbill":30954950,"approval":78.1994048,"support":3.095495},{"time_hours":294,"approval_perbill":781250000,"support_perbill":30779756,"approval":78.125,"support":3.0779756},{"time_hours":295,"approval_perbill":780505953,"support_perbill":30605620,"approval":78.0505953,"support":3.060562},{"time_hours":296,"approval_perbill":779761905,"support_perbill":30432533,"approval":77.9761905,"support":3.0432533},{"time_hours":297,"approval_perbill":779017858,"support_perbill":30260484,"approval":77.9017858,"support":3.0260484},{"time_hours":298,"approval_perbill":778273810,"support_perbill":30089466,"approval":77.827381,"support":3.0089466},{"time_hours":299,"approval_perbill":777529762,"support_perbill":29919468,"approval":77.7529762,"support":2.9919468},{"time_hours":300,"approval_perbill":776785715,"support_perbill":29750482,"approval":77.6785715,"support":2.9750482},{"time_hours":301,"approval_perbill":776041667,"support_perbill":29582498,"approval":77.6041667,"support":2.9582498},{"time_hours":302,"approval_perbill":775297620,"support_perbill":29415508,"approval":77.529762,"support":2.9415508},{"time_hours":303,"approval_perbill":774553572,"support_perbill":29249503,"approval":77.4553572,"support":2.9249503},{"time_hours":304,"approval_perbill":773809524,"support_perbill":29084473,"approval":77.3809524,"support":2.9084473},{"time_hours":305,"approval_perbill":773065477,"support_perbill":28920412,"approval":77.3065477,"support":2.8920412},{"time_hours":306,"approval_perbill":772321429,"support_perbill":28757309,"approval":77.2321429,"support":2.8757309},{"time_hours":307,"approval_perbill":771577381,"support_perbill":28595157,"approval":77.1577381,"support":2.8595157},{"time_hours":308,"approval_perbill":770833334,"support_perbill":28433948,"approval":77.0833334,"support":2.8433948},{"time_hours":309,"approval_perbill":770089286,"support_perbill":28273672,"approval":77.0089286,"support":2.8273672},{"time_hours":310,"approval_perbill":769345239,"support_perbill":28114323,"approval":76.9345239,"support":2.8114323},{"time_hours":311,"approval_perbill":768601191,"support_perbill":27955892,"approval":76.8601191,"support":2.7955892},{"time_hours":312,"approval_perbill":767857143,"support_perbill":27798371,"approval":76.7857143,"support":2.7798371},{"time_hours":313,"approval_perbill":767113096,"support_perbill":27641753,"approval":76.7113096,"support":2.7641753},{"time_hours":314,"approval_perbill":766369048,"support_perbill":27486029,"approval":76.6369048,"support":2.7486029},{"time_hours":315,"approval_perbill":765625000,"support_perbill":27331192,"approval":76.5625,"support":2.7331192},{"time_hours":316,"approval_perbill":764880953,"support_perbill":27177234,"approval":76.4880953,"support":2.7177234},{"time_hours":317,"approval_perbill":764136905,"support_perbill":27024148,"approval":76.4136905,"support":2.7024148},{"time_hours":318,"approval_perbill":763392858,"support_perbill":26871928,"approval":76.3392858,"support":2.6871928},{"time_hours":319,"approval_perbill":762648810,"support_perbill":26720564,"approval":76.264881,"support":2.6720564},{"time_hours":320,"approval_perbill":761904762,"support_perbill":26570050,"approval":76.1904762,"support":2.657005},{"time_hours":321,"approval_perbill":761160715,"support_perbill":26420379,"approval":76.1160715,"support":2.6420379},{"time_hours":322,"approval_perbill":760416667,"support_perbill":26271544,"approval":76.0416667,"support":2.6271544},{"time_hours":323,"approval_perbill":759672620,"support_perbill":26123538,"approval":75.967262,"support":2.6123538},{"time_hours":324,"approval_perbill":758928572,"support_perbill":25976354,"approval":75.8928572,"support":2.5976354},{"time_hours":325,"approval_perbill":758184524,"support_perbill":25829985,"approval":75.8184524,"support":2.5829985},{"time_hours":326,"approval_perbill":757440477,"support_perbill":25684425,"approval":75.7440477,"support":2.5684425},{"time_hours":327,"approval_perbill":756696429,"support_perbill":25539666,"approval":75.6696429,"support":2.5539666},{"time_hours":328,"approval_perbill":755952381,"support_perbill":25395702,"approval":75.5952381,"support":2.5395702},{"time_hours":329,"approval_perbill":755208334,"support_perbill":25252527,"approval":75.5208334,"support":2.5252527},{"time_hours":330,"approval_perbill":754464286,"support_perbill":25110134,"approval":75.4464286,"support":2.5110134},{"time_hours":331,"approval_perbill":753720239,"support_perbill":24968516,"approval":75.3720239,"support":2.4968516},{"time_hours":332,"approval_perbill":752976191,"support_perbill":24827668,"approval":75.2976191,"support":2.4827668},{"time_hours":333,"approval_perbill":752232143,"support_perbill":24687584,"approval":75.2232143,"support":2.4687584},{"time_hours":334,"approval_perbill":751488096,"support_perbill":24548256,"approval":75.1488096,"support":2.4548256},{"time_hours":335,"approval_perbill":750744048,"support_perbill":24409679,"approval":75.0744048,"support":2.4409679},{"time_hours":336,"approval_perbill":750000000,"support_perbill":24271846,"approval":75,"support":2.4271846},{"time_hours":337,"approval_perbill":749255953,"support_perbill":24134753,"approval":74.9255953,"support":2.4134753},{"time_hours":338,"approval_perbill":748511905,"support_perbill":23998392,"approval":74.8511905,"support":2.3998392},{"time_hours":339,"approval_perbill":747767858,"support_perbill":23862759,"approval":74.7767858,"support":2.3862759},{"time_hours":340,"approval_perbill":747023810,"support_perbill":23727846,"approval":74.702381,"support":2.3727846},{"time_hours":341,"approval_perbill":746279762,"support_perbill":23593649,"approval":74.6279762,"support":2.3593649},{"time_hours":342,"approval_perbill":745535715,"support_perbill":23460162,"approval":74.5535715,"support":2.3460162},{"time_hours":343,"approval_perbill":744791667,"support_perbill":23327379,"approval":74.4791667,"support":2.3327379},{"time_hours":344,"approval_perbill":744047620,"support_perbill":23195295,"approval":74.404762,"support":2.3195295},{"time_hours":345,"approval_perbill":743303572,"support_perbill":23063903,"approval":74.3303572,"support":2.3063903},{"time_hours":346,"approval_perbill":742559524,"support_perbill":22933200,"approval":74.2559524,"support":2.29332},{"time_hours":347,"approval_perbill":741815477,"support_perbill":22803179,"approval":74.1815477,"support":2.2803179},{"time_hours":348,"approval_perbill":741071429,"support_perbill":22673834,"approval":74.1071429,"support":2.2673834},{"time_hours":349,"approval_perbill":740327381,"support_perbill":22545162,"approval":74.0327381,"support":2.2545162},{"time_hours":350,"approval_perbill":739583334,"support_perbill":22417155,"approval":73.9583334,"support":2.2417155},{"time_hours":351,"approval_perbill":738839286,"support_perbill":22289811,"approval":73.8839286,"support":2.2289811},{"time_hours":352,"approval_perbill":738095239,"support_perbill":22163122,"approval":73.8095239,"support":2.2163122},{"time_hours":353,"approval_perbill":737351191,"support_perbill":22037084,"approval":73.7351191,"support":2.2037084},{"time_hours":354,"approval_perbill":736607143,"support_perbill":21911693,"approval":73.6607143,"support":2.1911693},{"time_hours":355,"approval_perbill":735863096,"support_perbill":21786943,"approval":73.5863096,"support":2.1786943},{"time_hours":356,"approval_perbill":735119048,"support_perbill":21662829,"approval":73.5119048,"support":2.1662829},{"time_hours":357,"approval_perbill":734375000,"support_perbill":21539347,"approval":73.4375,"support":2.1539347},{"time_hours":358,"approval_perbill":733630953,"support_perbill":21416491,"approval":73.3630953,"support":2.1416491},{"time_hours":359,"approval_perbill":732886905,"support_perbill":21294257,"approval":73.2886905,"support":2.1294257},{"time_hours":360,"approval_perbill":732142858,"support_perbill":21172640,"approval":73.2142858,"support":2.117264},{"time_hours":361,"approval_perbill":731398810,"support_perbill":21051635,"approval":73.139881,"support":2.1051635},{"time_hours":362,"approval_perbill":730654762,"support_perbill":20931239,"approval":73.0654762,"support":2.0931239},{"time_hours":363,"approval_perbill":729910715,"support_perbill":20811446,"approval":72.9910715,"support":2.0811446},{"time_hours":364,"approval_perbill":729166667,"support_perbill":20692251,"approval":72.9166667,"support":2.0692251},{"time_hours":365,"approval_perbill":728422620,"support_perbill":20573651,"approval":72.842262,"support":2.0573651},{"time_hours":366,"approval_perbill":727678572,"support_perbill":20455641,"approval":72.7678572,"support":2.0455641},{"time_hours":367,"approval_perbill":726934524,"support_perbill":20338216,"approval":72.6934524,"support":2.0338216},{"time_hours":368,"approval_perbill":726190477,"support_perbill":20221372,"approval":72.6190477,"support":2.0221372},{"time_hours":369,"approval_perbill":725446429,"support_perbill":20105105,"approval":72.5446429,"support":2.0105105},{"time_hours":370,"approval_perbill":724702381,"support_perbill":19989411,"approval":72.4702381,"support":1.9989411},{"time_hours":371,"approval_perbill":723958334,"support_perbill":19874285,"approval":72.3958334,"support":1.9874285},{"time_hours":372,"approval_perbill":723214286,"support_perbill":19759723,"approval":72.3214286,"support":1.9759723},{"time_hours":373,"approval_perbill":722470239,"support_perbill":19645721,"approval":72.2470239,"support":1.9645721},{"time_hours":374,"approval_perbill":721726191,"support_perbill":19532275,"approval":72.1726191,"support":1.9532275},{"time_hours":375,"approval_perbill":720982143,"support_perbill":19419381,"approval":72.0982143,"support":1.9419381},{"time_hours":376,"approval_perbill":720238096,"support_perbill":19307035,"approval":72.0238096,"support":1.9307035},{"time_hours":377,"approval_perbill":719494048,"support_perbill":19195233,"approval":71.9494048,"support":1.9195233},{"time_hours":378,"approval_perbill":718750000,"support_perbill":19083971,"approval":71.875,"support":1.9083971},{"time_hours":379,"approval_perbill":718005953,"support_perbill":18973244,"approval":71.8005953,"support":1.8973244},{"time_hours":380,"approval_perbill":717261905,"support_perbill":18863050,"approval":71.7261905,"support":1.886305},{"time_hours":381,"approval_perbill":716517858,"support_perbill":18753385,"approval":71.6517858,"support":1.8753385},{"time_hours":382,"approval_perbill":715773810,"support_perbill":18644243,"approval":71.577381,"support":1.8644243},{"time_hours":383,"approval_perbill":715029762,"support_perbill":18535623,"approval":71.5029762,"support":1.8535623},{"time_hours":384,"approval_perbill":714285715,"support_perbill":18427520,"approval":71.4285715,"support":1.842752},{"time_hours":385,"approval_perbill":713541667,"support_perbill":18319930,"approval":71.3541667,"support":1.831993},{"time_hours":386,"approval_perbill":712797620,"support_perbill":18212849,"approval":71.279762,"support":1.8212849},{"time_hours":387,"approval_perbill":712053572,"support_perbill":18106275,"approval":71.2053572,"support":1.8106275},{"time_hours":388,"approval_perbill":711309524,"support_perbill":18000204,"approval":71.1309524,"support":1.8000204},{"time_hours":389,"approval_perbill":710565477,"support_perbill":17894631,"approval":71.0565477,"support":1.7894631},{"time_hours":390,"approval_perbill":709821429,"support_perbill":17789554,"approval":70.9821429,"support":1.7789554},{"time_hours":391,"approval_perbill":709077381,"support_perbill":17684969,"approval":70.9077381,"support":1.7684969},{"time_hours":392,"approval_perbill":708333334,"support_perbill":17580873,"approval":70.8333334,"support":1.7580873},{"time_hours":393,"approval_perbill":707589286,"support_perbill":17477262,"approval":70.7589286,"support":1.7477262},{"time_hours":394,"approval_perbill":706845239,"support_perbill":17374132,"approval":70.6845239,"support":1.7374132},{"time_hours":395,"approval_perbill":706101191,"support_perbill":17271481,"approval":70.6101191,"support":1.7271481},{"time_hours":396,"approval_perbill":705357143,"support_perbill":17169305,"approval":70.5357143,"support":1.7169305},{"time_hours":397,"approval_perbill":704613096,"support_perbill":17067601,"approval":70.4613096,"support":1.7067601},{"time_hours":398,"approval_perbill":703869048,"support_perbill":16966366,"approval":70.3869048,"support":1.6966366},{"time_hours":399,"approval_perbill":703125000,"support_perbill":16865595,"approval":70.3125,"support":1.6865595},{"time_hours":400,"approval_perbill":702380953,"support_perbill":16765287,"approval":70.2380953,"support":1.6765287},{"time_hours":401,"approval_perbill":701636905,"support_perbill":16665438,"approval":70.1636905,"support":1.6665438},{"time_hours":402,"approval_perbill":700892858,"support_perbill":16566044,"approval":70.0892858,"support":1.6566044},{"time_hours":403,"approval_perbill":700148810,"support_perbill":16467104,"approval":70.014881,"support":1.6467104},{"time_hours":404,"approval_perbill":699404762,"support_perbill":16368612,"approval":69.9404762,"support":1.6368612},{"time_hours":405,"approval_perbill":698660715,"support_perbill":16270568,"approval":69.8660715,"support":1.6270568},{"time_hours":406,"approval_perbill":697916667,"support_perbill":16172967,"approval":69.7916667,"support":1.6172967},{"time_hours":407,"approval_perbill":697172620,"support_perbill":16075806,"approval":69.717262,"support":1.6075806},{"time_hours":408,"approval_perbill":696428572,"support_perbill":15979083,"approval":69.6428572,"support":1.5979083},{"time_hours":409,"approval_perbill":695684524,"support_perbill":15882794,"approval":69.5684524,"support":1.5882794},{"time_hours":410,"approval_perbill":694940477,"support_perbill":15786938,"approval":69.4940477,"support":1.5786938},{"time_hours":411,"approval_perbill":694196429,"support_perbill":15691509,"approval":69.4196429,"support":1.5691509},{"time_hours":412,"approval_perbill":693452381,"support_perbill":15596507,"approval":69.3452381,"support":1.5596507},{"time_hours":413,"approval_perbill":692708334,"support_perbill":15501928,"approval":69.2708334,"support":1.5501928},{"time_hours":414,"approval_perbill":691964286,"support_perbill":15407769,"approval":69.1964286,"support":1.5407769},{"time_hours":415,"approval_perbill":691220239,"support_perbill":15314028,"approval":69.1220239,"support":1.5314028},{"time_hours":416,"approval_perbill":690476191,"support_perbill":15220701,"approval":69.0476191,"support":1.5220701},{"time_hours":417,"approval_perbill":689732143,"support_perbill":15127786,"approval":68.9732143,"support":1.5127786},{"time_hours":418,"approval_perbill":688988096,"support_perbill":15035280,"approval":68.8988096,"support":1.503528},{"time_hours":419,"approval_perbill":688244048,"support_perbill":14943181,"approval":68.8244048,"support":1.4943181},{"time_hours":420,"approval_perbill":687500000,"support_perbill":14851486,"approval":68.75,"support":1.4851486},{"time_hours":421,"approval_perbill":686755953,"support_perbill":14760192,"approval":68.6755953,"support":1.4760192},{"time_hours":422,"approval_perbill":686011905,"support_perbill":14669296,"approval":68.6011905,"support":1.4669296},{"time_hours":423,"approval_perbill":685267858,"support_perbill":14578797,"approval":68.5267858,"support":1.4578797},{"time_hours":424,"approval_perbill":684523810,"support_perbill":14488690,"approval":68.452381,"support":1.448869},{"time_hours":425,"approval_perbill":683779762,"support_perbill":14398975,"approval":68.3779762,"support":1.4398975},{"time_hours":426,"approval_perbill":683035715,"support_perbill":14309648,"approval":68.3035715,"support":1.4309648},{"time_hours":427,"approval_perbill":682291667,"support_perbill":14220706,"approval":68.2291667,"support":1.4220706},{"time_hours":428,"approval_perbill":681547620,"support_perbill":14132148,"approval":68.154762,"support":1.4132148},{"time_hours":429,"approval_perbill":680803572,"support_perbill":14043970,"approval":68.0803572,"support":1.404397},{"time_hours":430,"approval_perbill":680059524,"support_perbill":13956171,"approval":68.0059524,"support":1.3956171},{"time_hours":431,"approval_perbill":679315477,"support_perbill":13868748,"approval":67.9315477,"support":1.3868748},{"time_hours":432,"approval_perbill":678571429,"support_perbill":13781699,"approval":67.8571429,"support":1.3781699},{"time_hours":433,"approval_perbill":677827381,"support_perbill":13695020,"approval":67.7827381,"support":1.369502},{"time_hours":434,"approval_perbill":677083334,"support_perbill":13608710,"approval":67.7083334,"support":1.360871},{"time_hours":435,"approval_perbill":676339286,"support_perbill":13522767,"approval":67.6339286,"support":1.3522767},{"time_hours":436,"approval_perbill":675595239,"support_perbill":13437188,"approval":67.5595239,"support":1.3437188},{"time_hours":437,"approval_perbill":674851191,"support_perbill":13351970,"approval":67.4851191,"support":1.335197},{"time_hours":438,"approval_perbill":674107143,"support_perbill":13267112,"approval":67.4107143,"support":1.3267112},{"time_hours":439,"approval_perbill":673363096,"support_perbill":13182611,"approval":67.3363096,"support":1.3182611},{"time_hours":440,"approval_perbill":672619048,"support_perbill":13098465,"approval":67.2619048,"support":1.3098465},{"time_hours":441,"approval_perbill":671875000,"support_perbill":13014672,"approval":67.1875,"support":1.3014672},{"time_hours":442,"approval_perbill":671130953,"support_perbill":12931229,"approval":67.1130953,"support":1.2931229},{"time_hours":443,"approval_perbill":670386905,"support_perbill":12848135,"approval":67.0386905,"support":1.2848135},{"time_hours":444,"approval_perbill":669642858,"support_perbill":12765386,"approval":66.9642858,"support":1.2765386},{"time_hours":445,"approval_perbill":668898810,"support_perbill":12682982,"approval":66.889881,"support":1.2682982},{"time_hours":446,"approval_perbill":668154762,"support_perbill":12600919,"approval":66.8154762,"support":1.2600919},{"time_hours":447,"approval_perbill":667410715,"support_perbill":12519197,"approval":66.7410715,"support":1.2519197},{"time_hours":448,"approval_perbill":666666667,"support_perbill":12437812,"approval":66.6666667,"support":1.2437812},{"time_hours":449,"approval_perbill":665922620,"support_perbill":12356762,"approval":66.592262,"support":1.2356762},{"time_hours":450,"approval_perbill":665178572,"support_perbill":12276046,"approval":66.5178572,"support":1.2276046},{"time_hours":451,"approval_perbill":664434524,"support_perbill":12195661,"approval":66.4434524,"support":1.2195661},{"time_hours":452,"approval_perbill":663690477,"support_perbill":12115605,"approval":66.3690477,"support":1.2115605},{"time_hours":453,"approval_perbill":662946429,"support_perbill":12035877,"approval":66.2946429,"support":1.2035877},{"time_hours":454,"approval_perbill":662202381,"support_perbill":11956475,"approval":66.2202381,"support":1.1956475},{"time_hours":455,"approval_perbill":661458334,"support_perbill":11877395,"approval":66.1458334,"support":1.1877395},{"time_hours":456,"approval_perbill":660714286,"support_perbill":11798637,"approval":66.0714286,"support":1.1798637},{"time_hours":457,"approval_perbill":659970239,"support_perbill":11720199,"approval":65.9970239,"support":1.1720199},{"time_hours":458,"approval_perbill":659226191,"support_perbill":11642077,"approval":65.9226191,"support":1.1642077},{"time_hours":459,"approval_perbill":658482143,"support_perbill":11564272,"approval":65.8482143,"support":1.1564272},{"time_hours":460,"approval_perbill":657738096,"support_perbill":11486780,"approval":65.7738096,"support":1.148678},{"time_hours":461,"approval_perbill":656994048,"support_perbill":11409600,"approval":65.6994048,"support":1.14096},{"time_hours":462,"approval_perbill":656250000,"support_perbill":11332729,"approval":65.625,"support":1.1332729},{"time_hours":463,"approval_perbill":655505953,"support_perbill":11256167,"approval":65.5505953,"support":1.1256167},{"time_hours":464,"approval_perbill":654761905,"support_perbill":11179911,"approval":65.4761905,"support":1.1179911},{"time_hours":465,"approval_perbill":654017858,"support_perbill":11103959,"approval":65.4017858,"support":1.1103959},{"time_hours":466,"approval_perbill":653273810,"support_perbill":11028310,"approval":65.327381,"support":1.102831},{"time_hours":467,"approval_perbill":652529762,"support_perbill":10952961,"approval":65.2529762,"support":1.0952961},{"time_hours":468,"approval_perbill":651785715,"support_perbill":10877912,"approval":65.1785715,"support":1.0877912},{"time_hours":469,"approval_perbill":651041667,"support_perbill":10803159,"approval":65.1041667,"support":1.0803159},{"time_hours":470,"approval_perbill":650297620,"support_perbill":10728702,"approval":65.029762,"support":1.0728702},{"time_hours":471,"approval_perbill":649553572,"support_perbill":10654539,"approval":64.9553572,"support":1.0654539},{"time_hours":472,"approval_perbill":648809524,"support_perbill":10580667,"approval":64.8809524,"support":1.0580667},{"time_hours":473,"approval_perbill":648065477,"support_perbill":10507086,"approval":64.8065477,"support":1.0507086},{"time_hours":474,"approval_perbill":647321429,"support_perbill":10433793,"approval":64.7321429,"support":1.0433793},{"time_hours":475,"approval_perbill":646577381,"support_perbill":10360787,"approval":64.6577381,"support":1.0360787},{"time_hours":476,"approval_perbill":645833334,"support_perbill":10288066,"approval":64.5833334,"support":1.0288066},{"time_hours":477,"approval_perbill":645089286,"support_perbill":10215629,"approval":64.5089286,"support":1.0215629},{"time_hours":478,"approval_perbill":644345239,"support_perbill":10143473,"approval":64.4345239,"support":1.0143473},{"time_hours":479,"approval_perbill":643601191,"support_perbill":10071597,"approval":64.3601191,"support":1.0071597},{"time_hours":480,"approval_perbill":642857143,"support_perbill":10000000,"approval":64.2857143,"support":1},{"time_hours":481,"approval_perbill":642113096,"support_perbill":9928680,"approval":64.2113096,"support":0.992868},{"time_hours":482,"approval_perbill":641369048,"support_perbill":9857635,"approval":64.1369048,"support":0.9857635},{"time_hours":483,"approval_perbill":640625000,"support_perbill":9786864,"approval":64.0625,"support":0.9786864},{"time_hours":484,"approval_perbill":639880953,"support_perbill":9716365,"approval":63.9880953,"support":0.9716365},{"time_hours":485,"approval_perbill":639136905,"support_perbill":9646137,"approval":63.9136905,"support":0.9646137},{"time_hours":486,"approval_perbill":638392858,"support_perbill":9576177,"approval":63.8392858,"support":0.9576177},{"time_hours":487,"approval_perbill":637648810,"support_perbill":9506485,"approval":63.764881,"support":0.9506485},{"time_hours":488,"approval_perbill":636904762,"support_perbill":9437059,"approval":63.6904762,"support":0.9437059},{"time_hours":489,"approval_perbill":636160715,"support_perbill":9367898,"approval":63.6160715,"support":0.9367898},{"time_hours":490,"approval_perbill":635416667,"support_perbill":9298999,"approval":63.5416667,"support":0.9298999},{"time_hours":491,"approval_perbill":634672620,"support_perbill":9230362,"approval":63.467262,"support":0.9230362},{"time_hours":492,"approval_perbill":633928572,"support_perbill":9161984,"approval":63.3928572,"support":0.9161984},{"time_hours":493,"approval_perbill":633184524,"support_perbill":9093865,"approval":63.3184524,"support":0.9093865},{"time_hours":494,"approval_perbill":632440477,"support_perbill":9026003,"approval":63.2440477,"support":0.9026003},{"time_hours":495,"approval_perbill":631696429,"support_perbill":8958397,"approval":63.1696429,"support":0.8958397},{"time_hours":496,"approval_perbill":630952381,"support_perbill":8891045,"approval":63.0952381,"support":0.8891045},{"time_hours":497,"approval_perbill":630208334,"support_perbill":8823945,"approval":63.0208334,"support":0.8823945},{"time_hours":498,"approval_perbill":629464286,"support_perbill":8757097,"approval":62.9464286,"support":0.8757097},{"time_hours":499,"approval_perbill":628720239,"support_perbill":8690498,"approval":62.8720239,"support":0.8690498},{"time_hours":500,"approval_perbill":627976191,"support_perbill":8624148,"approval":62.7976191,"support":0.8624148},{"time_hours":501,"approval_perbill":627232143,"support_perbill":8558045,"approval":62.7232143,"support":0.8558045},{"time_hours":502,"approval_perbill":626488096,"support_perbill":8492187,"approval":62.6488096,"support":0.8492187},{"time_hours":503,"approval_perbill":625744048,"support_perbill":8426574,"approval":62.5744048,"support":0.8426574},{"time_hours":504,"approval_perbill":625000000,"support_perbill":8361204,"approval":62.5,"support":0.8361204},{"time_hours":505,"approval_perbill":624255953,"support_perbill":8296076,"approval":62.4255953,"support":0.8296076},{"time_hours":506,"approval_perbill":623511905,"support_perbill":8231187,"approval":62.3511905,"support":0.8231187},{"time_hours":507,"approval_perbill":622767858,"support_perbill":8166538,"approval":62.2767858,"support":0.8166538},{"time_hours":508,"approval_perbill":622023810,"support_perbill":8102127,"approval":62.202381,"support":0.8102127},{"time_hours":509,"approval_perbill":621279762,"support_perbill":8037951,"approval":62.1279762,"support":0.8037951},{"time_hours":510,"approval_perbill":620535715,"support_perbill":7974011,"approval":62.0535715,"support":0.7974011},{"time_hours":511,"approval_perbill":619791667,"support_perbill":7910304,"approval":61.9791667,"support":0.7910304},{"time_hours":512,"approval_perbill":619047620,"support_perbill":7846830,"approval":61.904762,"support":0.784683},{"time_hours":513,"approval_perbill":618303572,"support_perbill":7783587,"approval":61.8303572,"support":0.7783587},{"time_hours":514,"approval_perbill":617559524,"support_perbill":7720574,"approval":61.7559524,"support":0.7720574},{"time_hours":515,"approval_perbill":616815477,"support_perbill":7657790,"approval":61.6815477,"support":0.765779},{"time_hours":516,"approval_perbill":616071429,"support_perbill":7595233,"approval":61.6071429,"support":0.7595233},{"time_hours":517,"approval_perbill":615327381,"support_perbill":7532902,"approval":61.5327381,"support":0.7532902},{"time_hours":518,"approval_perbill":614583334,"support_perbill":7470796,"approval":61.4583334,"support":0.7470796},{"time_hours":519,"approval_perbill":613839286,"support_perbill":7408914,"approval":61.3839286,"support":0.7408914},{"time_hours":520,"approval_perbill":613095239,"support_perbill":7347255,"approval":61.3095239,"support":0.7347255},{"time_hours":521,"approval_perbill":612351191,"support_perbill":7285816,"approval":61.2351191,"support":0.7285816},{"time_hours":522,"approval_perbill":611607143,"support_perbill":7224598,"approval":61.1607143,"support":0.7224598},{"time_hours":523,"approval_perbill":610863096,"support_perbill":7163599,"approval":61.0863096,"support":0.7163599},{"time_hours":524,"approval_perbill":610119048,"support_perbill":7102818,"approval":61.0119048,"support":0.7102818},{"time_hours":525,"approval_perbill":609375000,"support_perbill":7042254,"approval":60.9375,"support":0.7042254},{"time_hours":526,"approval_perbill":608630953,"support_perbill":6981905,"approval":60.8630953,"support":0.6981905},{"time_hours":527,"approval_perbill":607886905,"support_perbill":6921770,"approval":60.7886905,"support":0.692177},{"time_hours":528,"approval_perbill":607142858,"support_perbill":6861848,"approval":60.7142858,"support":0.6861848},{"time_hours":529,"approval_perbill":606398810,"support_perbill":6802139,"approval":60.639881,"support":0.6802139},{"time_hours":530,"approval_perbill":605654762,"support_perbill":6742640,"approval":60.5654762,"support":0.674264},{"time_hours":531,"approval_perbill":604910715,"support_perbill":6683351,"approval":60.4910715,"support":0.6683351},{"time_hours":532,"approval_perbill":604166667,"support_perbill":6624271,"approval":60.4166667,"support":0.6624271},{"time_hours":533,"approval_perbill":603422620,"support_perbill":6565399,"approval":60.342262,"support":0.6565399},{"time_hours":534,"approval_perbill":602678572,"support_perbill":6506733,"approval":60.2678572,"support":0.6506733},{"time_hours":535,"approval_perbill":601934524,"support_perbill":6448273,"approval":60.1934524,"support":0.6448273},{"time_hours":536,"approval_perbill":601190477,"support_perbill":6390017,"approval":60.1190477,"support":0.6390017},{"time_hours":537,"approval_perbill":600446429,"support_perbill":6331964,"approval":60.0446429,"support":0.6331964},{"time_hours":538,"approval_perbill":599702381,"support_perbill":6274113,"approval":59.9702381,"support":0.6274113},{"time_hours":539,"approval_perbill":598958334,"support_perbill":6216464,"approval":59.8958334,"support":0.6216464},{"time_hours":540,"approval_perbill":598214286,"support_perbill":6159015,"approval":59.8214286,"support":0.6159015},{"time_hours":541,"approval_perbill":597470239,"support_perbill":6101764,"approval":59.7470239,"support":0.6101764},{"time_hours":542,"approval_perbill":596726191,"support_perbill":6044712,"approval":59.6726191,"support":0.6044712},{"time_hours":543,"approval_perbill":595982143,"support_perbill":5987857,"approval":59.5982143,"support":0.5987857},{"time_hours":544,"approval_perbill":595238096,"support_perbill":5931198,"approval":59.5238096,"support":0.5931198},{"time_hours":545,"approval_perbill":594494048,"support_perbill":5874734,"approval":59.4494048,"support":0.5874734},{"time_hours":546,"approval_perbill":593750000,"support_perbill":5818464,"approval":59.375,"support":0.5818464},{"time_hours":547,"approval_perbill":593005953,"support_perbill":5762387,"approval":59.3005953,"support":0.5762387},{"time_hours":548,"approval_perbill":592261905,"support_perbill":5706502,"approval":59.2261905,"support":0.5706502},{"time_hours":549,"approval_perbill":591517858,"support_perbill":5650808,"approval":59.1517858,"support":0.5650808},{"time_hours":550,"approval_perbill":590773810,"support_perbill":5595304,"approval":59.077381,"support":0.5595304},{"time_hours":551,"approval_perbill":590029762,"support_perbill":5539989,"approval":59.0029762,"support":0.5539989},{"time_hours":552,"approval_perbill":589285715,"support_perbill":5484862,"approval":58.9285715,"support":0.5484862},{"time_hours":553,"approval_perbill":588541667,"support_perbill":5429922,"approval":58.8541667,"support":0.5429922},{"time_hours":554,"approval_perbill":587797620,"support_perbill":5375169,"approval":58.779762,"support":0.5375169},{"time_hours":555,"approval_perbill":587053572,"support_perbill":5320600,"approval":58.7053572,"support":0.53206},{"time_hours":556,"approval_perbill":586309524,"support_perbill":5266216,"approval":58.6309524,"support":0.5266216},{"time_hours":557,"approval_perbill":585565477,"support_perbill":5212016,"approval":58.5565477,"support":0.5212016},{"time_hours":558,"approval_perbill":584821429,"support_perbill":5157998,"approval":58.4821429,"support":0.5157998},{"time_hours":559,"approval_perbill":584077381,"support_perbill":5104161,"approval":58.4077381,"support":0.5104161},{"time_hours":560,"approval_perbill":583333334,"support_perbill":5050505,"approval":58.3333334,"support":0.5050505},{"time_hours":561,"approval_perbill":582589286,"support_perbill":4997029,"approval":58.2589286,"support":0.4997029},{"time_hours":562,"approval_perbill":581845239,"support_perbill":4943731,"approval":58.1845239,"support":0.4943731},{"time_hours":563,"approval_perbill":581101191,"support_perbill":4890612,"approval":58.1101191,"support":0.4890612},{"time_hours":564,"approval_perbill":580357143,"support_perbill":4837669,"approval":58.0357143,"support":0.4837669},{"time_hours":565,"approval_perbill":579613096,"support_perbill":4784903,"approval":57.9613096,"support":0.4784903},{"time_hours":566,"approval_perbill":578869048,"support_perbill":4732312,"approval":57.8869048,"support":0.4732312},{"time_hours":567,"approval_perbill":578125000,"support_perbill":4679895,"approval":57.8125,"support":0.4679895},{"time_hours":568,"approval_perbill":577380953,"support_perbill":4627652,"approval":57.7380953,"support":0.4627652},{"time_hours":569,"approval_perbill":576636905,"support_perbill":4575581,"approval":57.6636905,"support":0.4575581},{"time_hours":570,"approval_perbill":575892858,"support_perbill":4523683,"approval":57.5892858,"support":0.4523683},{"time_hours":571,"approval_perbill":575148810,"support_perbill":4471955,"approval":57.514881,"support":0.4471955},{"time_hours":572,"approval_perbill":574404762,"support_perbill":4420397,"approval":57.4404762,"support":0.4420397},{"time_hours":573,"approval_perbill":573660715,"support_perbill":4369009,"approval":57.3660715,"support":0.4369009},{"time_hours":574,"approval_perbill":572916667,"support_perbill":4317789,"approval":57.2916667,"support":0.4317789},{"time_hours":575,"approval_perbill":572172620,"support_perbill":4266737,"approval":57.217262,"support":0.4266737},{"time_hours":576,"approval_perbill":571428572,"support_perbill":4215851,"approval":57.1428572,"support":0.4215851},{"time_hours":577,"approval_perbill":570684524,"support_perbill":4165132,"approval":57.0684524,"support":0.4165132},{"time_hours":578,"approval_perbill":569940477,"support_perbill":4114578,"approval":56.9940477,"support":0.4114578},{"time_hours":579,"approval_perbill":569196429,"support_perbill":4064188,"approval":56.9196429,"support":0.4064188},{"time_hours":580,"approval_perbill":568452381,"support_perbill":4013961,"approval":56.8452381,"support":0.4013961},{"time_hours":581,"approval_perbill":567708334,"support_perbill":3963898,"approval":56.7708334,"support":0.3963898},{"time_hours":582,"approval_perbill":566964286,"support_perbill":3913996,"approval":56.6964286,"support":0.3913996},{"time_hours":583,"approval_perbill":566220239,"support_perbill":3864256,"approval":56.6220239,"support":0.3864256},{"time_hours":584,"approval_perbill":565476191,"support_perbill":3814676,"approval":56.5476191,"support":0.3814676},{"time_hours":585,"approval_perbill":564732143,"support_perbill":3765256,"approval":56.4732143,"support":0.3765256},{"time_hours":586,"approval_perbill":563988096,"support_perbill":3715994,"approval":56.3988096,"support":0.3715994},{"time_hours":587,"approval_perbill":563244048,"support_perbill":3666891,"approval":56.3244048,"support":0.3666891},{"time_hours":588,"approval_perbill":562500000,"support_perbill":3617945,"approval":56.25,"support":0.3617945},{"time_hours":589,"approval_perbill":561755953,"support_perbill":3569155,"approval":56.1755953,"support":0.3569155},{"time_hours":590,"approval_perbill":561011905,"support_perbill":3520522,"approval":56.1011905,"support":0.3520522},{"time_hours":591,"approval_perbill":560267858,"support_perbill":3472043,"approval":56.0267858,"support":0.3472043},{"time_hours":592,"approval_perbill":559523810,"support_perbill":3423719,"approval":55.952381,"support":0.3423719},{"time_hours":593,"approval_perbill":558779762,"support_perbill":3375549,"approval":55.8779762,"support":0.3375549},{"time_hours":594,"approval_perbill":558035715,"support_perbill":3327531,"approval":55.8035715,"support":0.3327531},{"time_hours":595,"approval_perbill":557291667,"support_perbill":3279666,"approval":55.7291667,"support":0.3279666},{"time_hours":596,"approval_perbill":556547620,"support_perbill":3231952,"approval":55.654762,"support":0.3231952},{"time_hours":597,"approval_perbill":555803572,"support_perbill":3184389,"approval":55.5803572,"support":0.3184389},{"time_hours":598,"approval_perbill":555059524,"support_perbill":3136975,"approval":55.5059524,"support":0.3136975},{"time_hours":599,"approval_perbill":554315477,"support_perbill":3089711,"approval":55.4315477,"support":0.3089711},{"time_hours":600,"approval_perbill":553571429,"support_perbill":3042596,"approval":55.3571429,"support":0.3042596},{"time_hours":601,"approval_perbill":552827381,"support_perbill":2995629,"approval":55.2827381,"support":0.2995629},{"time_hours":602,"approval_perbill":552083334,"support_perbill":2948808,"approval":55.2083334,"support":0.2948808},{"time_hours":603,"approval_perbill":551339286,"support_perbill":2902135,"approval":55.1339286,"support":0.2902135},{"time_hours":604,"approval_perbill":550595239,"support_perbill":2855607,"approval":55.0595239,"support":0.2855607},{"time_hours":605,"approval_perbill":549851191,"support_perbill":2809224,"approval":54.9851191,"support":0.2809224},{"time_hours":606,"approval_perbill":549107143,"support_perbill":2762986,"approval":54.9107143,"support":0.2762986},{"time_hours":607,"approval_perbill":548363096,"support_perbill":2716891,"approval":54.8363096,"support":0.2716891},{"time_hours":608,"approval_perbill":547619048,"support_perbill":2670940,"approval":54.7619048,"support":0.267094},{"time_hours":609,"approval_perbill":546875000,"support_perbill":2625131,"approval":54.6875,"support":0.2625131},{"time_hours":610,"approval_perbill":546130953,"support_perbill":2579464,"approval":54.6130953,"support":0.2579464},{"time_hours":611,"approval_perbill":545386905,"support_perbill":2533938,"approval":54.5386905,"support":0.2533938},{"time_hours":612,"approval_perbill":544642858,"support_perbill":2488552,"approval":54.4642858,"support":0.2488552},{"time_hours":613,"approval_perbill":543898810,"support_perbill":2443307,"approval":54.389881,"support":0.2443307},{"time_hours":614,"approval_perbill":543154762,"support_perbill":2398200,"approval":54.3154762,"support":0.23982},{"time_hours":615,"approval_perbill":542410715,"support_perbill":2353232,"approval":54.2410715,"support":0.2353232},{"time_hours":616,"approval_perbill":541666667,"support_perbill":2308402,"approval":54.1666667,"support":0.2308402},{"time_hours":617,"approval_perbill":540922620,"support_perbill":2263710,"approval":54.092262,"support":0.226371},{"time_hours":618,"approval_perbill":540178572,"support_perbill":2219153,"approval":54.0178572,"support":0.2219153},{"time_hours":619,"approval_perbill":539434524,"support_perbill":2174733,"approval":53.9434524,"support":0.2174733},{"time_hours":620,"approval_perbill":538690477,"support_perbill":2130449,"approval":53.8690477,"support":0.2130449},{"time_hours":621,"approval_perbill":537946429,"support_perbill":2086299,"approval":53.7946429,"support":0.2086299},{"time_hours":622,"approval_perbill":537202381,"support_perbill":2042283,"approval":53.7202381,"support":0.2042283},{"time_hours":623,"approval_perbill":536458334,"support_perbill":1998401,"approval":53.6458334,"support":0.1998401},{"time_hours":624,"approval_perbill":535714286,"support_perbill":1954652,"approval":53.5714286,"support":0.1954652},{"time_hours":625,"approval_perbill":534970239,"support_perbill":1911035,"approval":53.4970239,"support":0.1911035},{"time_hours":626,"approval_perbill":534226191,"support_perbill":1867550,"approval":53.4226191,"support":0.186755},{"time_hours":627,"approval_perbill":533482143,"support_perbill":1824196,"approval":53.3482143,"support":0.1824196},{"time_hours":628,"approval_perbill":532738096,"support_perbill":1780972,"approval":53.2738096,"support":0.1780972},{"time_hours":629,"approval_perbill":531994048,"support_perbill":1737879,"approval":53.1994048,"support":0.1737879},{"time_hours":630,"approval_perbill":531250000,"support_perbill":1694915,"approval":53.125,"support":0.1694915},{"time_hours":631,"approval_perbill":530505953,"support_perbill":1652080,"approval":53.0505953,"support":0.165208},{"time_hours":632,"approval_perbill":529761905,"support_perbill":1609373,"approval":52.9761905,"support":0.1609373},{"time_hours":633,"approval_perbill":529017858,"support_perbill":1566793,"approval":52.9017858,"support":0.1566793},{"time_hours":634,"approval_perbill":528273810,"support_perbill":1524341,"approval":52.827381,"support":0.1524341},{"time_hours":635,"approval_perbill":527529762,"support_perbill":1482015,"approval":52.7529762,"support":0.1482015},{"time_hours":636,"approval_perbill":526785715,"support_perbill":1439815,"approval":52.6785715,"support":0.1439815},{"time_hours":637,"approval_perbill":526041667,"support_perbill":1397741,"approval":52.6041667,"support":0.1397741},{"time_hours":638,"approval_perbill":525297620,"support_perbill":1355791,"approval":52.529762,"support":0.1355791},{"time_hours":639,"approval_perbill":524553572,"support_perbill":1313966,"approval":52.4553572,"support":0.1313966},{"time_hours":640,"approval_perbill":523809524,"support_perbill":1272264,"approval":52.3809524,"support":0.1272264},{"time_hours":641,"approval_perbill":523065477,"support_perbill":1230686,"approval":52.3065477,"support":0.1230686},{"time_hours":642,"approval_perbill":522321429,"support_perbill":1189230,"approval":52.2321429,"support":0.118923},{"time_hours":643,"approval_perbill":521577381,"support_perbill":1147896,"approval":52.1577381,"support":0.1147896},{"time_hours":644,"approval_perbill":520833334,"support_perbill":1106684,"approval":52.0833334,"support":0.1106684},{"time_hours":645,"approval_perbill":520089286,"support_perbill":1065593,"approval":52.0089286,"support":0.1065593},{"time_hours":646,"approval_perbill":519345239,"support_perbill":1024622,"approval":51.9345239,"support":0.1024622},{"time_hours":647,"approval_perbill":518601191,"support_perbill":983771,"approval":51.8601191,"support":0.0983771},{"time_hours":648,"approval_perbill":517857143,"support_perbill":943040,"approval":51.7857143,"support":0.094304},{"time_hours":649,"approval_perbill":517113096,"support_perbill":902427,"approval":51.7113096,"support":0.0902427},{"time_hours":650,"approval_perbill":516369048,"support_perbill":861933,"approval":51.6369048,"support":0.0861933},{"time_hours":651,"approval_perbill":515625000,"support_perbill":821557,"approval":51.5625,"support":0.0821557},{"time_hours":652,"approval_perbill":514880953,"support_perbill":781298,"approval":51.4880953,"support":0.0781298},{"time_hours":653,"approval_perbill":514136905,"support_perbill":741156,"approval":51.4136905,"support":0.0741156},{"time_hours":654,"approval_perbill":513392858,"support_perbill":701131,"approval":51.3392858,"support":0.0701131},{"time_hours":655,"approval_perbill":512648810,"support_perbill":661221,"approval":51.264881,"support":0.0661221},{"time_hours":656,"approval_perbill":511904762,"support_perbill":621426,"approval":51.1904762,"support":0.0621426},{"time_hours":657,"approval_perbill":511160715,"support_perbill":581747,"approval":51.1160715,"support":0.0581747},{"time_hours":658,"approval_perbill":510416667,"support_perbill":542181,"approval":51.0416667,"support":0.0542181},{"time_hours":659,"approval_perbill":509672620,"support_perbill":502730,"approval":50.967262,"support":0.050273},{"time_hours":660,"approval_perbill":508928572,"support_perbill":463392,"approval":50.8928572,"support":0.0463392},{"time_hours":661,"approval_perbill":508184524,"support_perbill":424166,"approval":50.8184524,"support":0.0424166},{"time_hours":662,"approval_perbill":507440477,"support_perbill":385053,"approval":50.7440477,"support":0.0385053},{"time_hours":663,"approval_perbill":506696429,"support_perbill":346052,"approval":50.6696429,"support":0.0346052},{"time_hours":664,"approval_perbill":505952381,"support_perbill":307163,"approval":50.5952381,"support":0.0307163},{"time_hours":665,"approval_perbill":505208334,"support_perbill":268384,"approval":50.5208334,"support":0.0268384},{"time_hours":666,"approval_perbill":504464286,"support_perbill":229716,"approval":50.4464286,"support":0.0229716},{"time_hours":667,"approval_perbill":503720239,"support_perbill":191157,"approval":50.3720239,"support":0.0191157},{"time_hours":668,"approval_perbill":502976191,"support_perbill":152709,"approval":50.2976191,"support":0.0152709},{"time_hours":669,"approval_perbill":502232143,"support_perbill":114369,"approval":50.2232143,"support":0.0114369},{"time_hours":670,"approval_perbill":501488096,"support_perbill":76138,"approval":50.1488096,"support":0.0076138},{"time_hours":671,"approval_perbill":500744048,"support_perbill":38015,"approval":50.0744048,"support":0.0038015},{"time_hours":672,"approval_perbill":500000000,"support_perbill":0,"approval":50,"support":0}]')},76682:p=>{"use strict";p.exports=JSON.parse('[{"time_hours":0,"approval_perbill":1000000000,"support_perbill":500000038,"approval":100,"support":50.0000038},{"time_hours":1,"approval_perbill":997916667,"support_perbill":422810379,"approval":99.7916667,"support":42.2810379},{"time_hours":2,"approval_perbill":995833334,"support_perbill":366120266,"approval":99.5833334,"support":36.6120266},{"time_hours":3,"approval_perbill":993750001,"support_perbill":322720742,"approval":99.3750001,"support":32.2720742},{"time_hours":4,"approval_perbill":991666668,"support_perbill":288428371,"approval":99.1666668,"support":28.8428371},{"time_hours":5,"approval_perbill":989583334,"support_perbill":260648719,"approval":98.9583334,"support":26.0648719},{"time_hours":6,"approval_perbill":987500001,"support_perbill":237687395,"approval":98.7500001,"support":23.7687395},{"time_hours":7,"approval_perbill":985416668,"support_perbill":218390834,"approval":98.5416668,"support":21.8390834},{"time_hours":8,"approval_perbill":983333335,"support_perbill":201946501,"approval":98.3333335,"support":20.1946501},{"time_hours":9,"approval_perbill":981250001,"support_perbill":187765525,"approval":98.1250001,"support":18.7765525},{"time_hours":10,"approval_perbill":979166668,"support_perbill":175410725,"approval":97.9166668,"support":17.5410725},{"time_hours":11,"approval_perbill":977083335,"support_perbill":164550680,"approval":97.7083335,"support":16.455068},{"time_hours":12,"approval_perbill":975000002,"support_perbill":154929598,"approval":97.5000002,"support":15.4929598},{"time_hours":13,"approval_perbill":972916667,"support_perbill":146346895,"approval":97.2916667,"support":14.6346895},{"time_hours":14,"approval_perbill":970833334,"support_perbill":138643083,"approval":97.0833334,"support":13.8643083},{"time_hours":15,"approval_perbill":968750001,"support_perbill":131689733,"approval":96.8750001,"support":13.1689733},{"time_hours":16,"approval_perbill":966666668,"support_perbill":125382279,"approval":96.6666668,"support":12.5382279},{"time_hours":17,"approval_perbill":964583334,"support_perbill":119634716,"approval":96.4583334,"support":11.9634716},{"time_hours":18,"approval_perbill":962500001,"support_perbill":114375668,"approval":96.2500001,"support":11.4375668},{"time_hours":19,"approval_perbill":960416668,"support_perbill":109545391,"approval":96.0416668,"support":10.9545391},{"time_hours":20,"approval_perbill":958333335,"support_perbill":105093501,"approval":95.8333335,"support":10.5093501},{"time_hours":21,"approval_perbill":956250000,"support_perbill":100977209,"approval":95.625,"support":10.0977209},{"time_hours":22,"approval_perbill":954166667,"support_perbill":97159951,"approval":95.4166667,"support":9.7159951},{"time_hours":23,"approval_perbill":952083334,"support_perbill":93610280,"approval":95.2083334,"support":9.361028},{"time_hours":24,"approval_perbill":950000001,"support_perbill":90301014,"approval":95.0000001,"support":9.0301014},{"time_hours":25,"approval_perbill":947916668,"support_perbill":87208529,"approval":94.7916668,"support":8.7208529},{"time_hours":26,"approval_perbill":945833334,"support_perbill":84312199,"approval":94.5833334,"support":8.4312199},{"time_hours":27,"approval_perbill":943750001,"support_perbill":81593937,"approval":94.3750001,"support":8.1593937},{"time_hours":28,"approval_perbill":941666668,"support_perbill":79037810,"approval":94.1666668,"support":7.903781},{"time_hours":29,"approval_perbill":939583335,"support_perbill":76629732,"approval":93.9583335,"support":7.6629732},{"time_hours":30,"approval_perbill":937500001,"support_perbill":74357200,"approval":93.7500001,"support":7.43572},{"time_hours":31,"approval_perbill":935416668,"support_perbill":72209088,"approval":93.5416668,"support":7.2209088},{"time_hours":32,"approval_perbill":933333335,"support_perbill":70175447,"approval":93.3333335,"support":7.0175447},{"time_hours":33,"approval_perbill":931250002,"support_perbill":68247365,"approval":93.1250002,"support":6.8247365},{"time_hours":34,"approval_perbill":929166667,"support_perbill":66416830,"approval":92.9166667,"support":6.641683},{"time_hours":35,"approval_perbill":927083334,"support_perbill":64676624,"approval":92.7083334,"support":6.4676624},{"time_hours":36,"approval_perbill":925000001,"support_perbill":63020221,"approval":92.5000001,"support":6.3020221},{"time_hours":37,"approval_perbill":922916668,"support_perbill":61441710,"approval":92.2916668,"support":6.144171},{"time_hours":38,"approval_perbill":920833334,"support_perbill":59935722,"approval":92.0833334,"support":5.9935722},{"time_hours":39,"approval_perbill":918750001,"support_perbill":58497372,"approval":91.8750001,"support":5.8497372},{"time_hours":40,"approval_perbill":916666668,"support_perbill":57122204,"approval":91.6666668,"support":5.7122204},{"time_hours":41,"approval_perbill":914583335,"support_perbill":55806144,"approval":91.4583335,"support":5.5806144},{"time_hours":42,"approval_perbill":912500000,"support_perbill":54545460,"approval":91.25,"support":5.454546},{"time_hours":43,"approval_perbill":910416667,"support_perbill":53336731,"approval":91.0416667,"support":5.3336731},{"time_hours":44,"approval_perbill":908333334,"support_perbill":52176808,"approval":90.8333334,"support":5.2176808},{"time_hours":45,"approval_perbill":906250001,"support_perbill":51062796,"approval":90.6250001,"support":5.1062796},{"time_hours":46,"approval_perbill":904166668,"support_perbill":49992020,"approval":90.4166668,"support":4.999202},{"time_hours":47,"approval_perbill":902083334,"support_perbill":48962010,"approval":90.2083334,"support":4.896201},{"time_hours":48,"approval_perbill":900000001,"support_perbill":47970485,"approval":90.0000001,"support":4.7970485},{"time_hours":49,"approval_perbill":897916668,"support_perbill":47015325,"approval":89.7916668,"support":4.7015325},{"time_hours":50,"approval_perbill":895833335,"support_perbill":46094566,"approval":89.5833335,"support":4.6094566},{"time_hours":51,"approval_perbill":893750001,"support_perbill":45206381,"approval":89.3750001,"support":4.5206381},{"time_hours":52,"approval_perbill":891666668,"support_perbill":44349075,"approval":89.1666668,"support":4.4349075},{"time_hours":53,"approval_perbill":889583335,"support_perbill":43521062,"approval":88.9583335,"support":4.3521062},{"time_hours":54,"approval_perbill":887500002,"support_perbill":42720867,"approval":88.7500002,"support":4.2720867},{"time_hours":55,"approval_perbill":885416667,"support_perbill":41947111,"approval":88.5416667,"support":4.1947111},{"time_hours":56,"approval_perbill":883333334,"support_perbill":41198506,"approval":88.3333334,"support":4.1198506},{"time_hours":57,"approval_perbill":881250001,"support_perbill":40473844,"approval":88.1250001,"support":4.0473844},{"time_hours":58,"approval_perbill":879166668,"support_perbill":39771995,"approval":87.9166668,"support":3.9771995},{"time_hours":59,"approval_perbill":877083334,"support_perbill":39091898,"approval":87.7083334,"support":3.9091898},{"time_hours":60,"approval_perbill":875000001,"support_perbill":38432558,"approval":87.5000001,"support":3.8432558},{"time_hours":61,"approval_perbill":872916668,"support_perbill":37793039,"approval":87.2916668,"support":3.7793039},{"time_hours":62,"approval_perbill":870833335,"support_perbill":37172460,"approval":87.0833335,"support":3.717246},{"time_hours":63,"approval_perbill":868750000,"support_perbill":36569991,"approval":86.875,"support":3.6569991},{"time_hours":64,"approval_perbill":866666667,"support_perbill":35984852,"approval":86.6666667,"support":3.5984852},{"time_hours":65,"approval_perbill":864583334,"support_perbill":35416306,"approval":86.4583334,"support":3.5416306},{"time_hours":66,"approval_perbill":862500001,"support_perbill":34863656,"approval":86.2500001,"support":3.4863656},{"time_hours":67,"approval_perbill":860416668,"support_perbill":34326245,"approval":86.0416668,"support":3.4326245},{"time_hours":68,"approval_perbill":858333334,"support_perbill":33803451,"approval":85.8333334,"support":3.3803451},{"time_hours":69,"approval_perbill":856250001,"support_perbill":33294686,"approval":85.6250001,"support":3.3294686},{"time_hours":70,"approval_perbill":854166668,"support_perbill":32799393,"approval":85.4166668,"support":3.2799393},{"time_hours":71,"approval_perbill":852083335,"support_perbill":32317044,"approval":85.2083335,"support":3.2317044},{"time_hours":72,"approval_perbill":850000001,"support_perbill":31847137,"approval":85.0000001,"support":3.1847137},{"time_hours":73,"approval_perbill":847916668,"support_perbill":31389198,"approval":84.7916668,"support":3.1389198},{"time_hours":74,"approval_perbill":845833335,"support_perbill":30942774,"approval":84.5833335,"support":3.0942774},{"time_hours":75,"approval_perbill":843750002,"support_perbill":30507438,"approval":84.3750002,"support":3.0507438},{"time_hours":76,"approval_perbill":841666667,"support_perbill":30082781,"approval":84.1666667,"support":3.0082781},{"time_hours":77,"approval_perbill":839583334,"support_perbill":29668415,"approval":83.9583334,"support":2.9668415},{"time_hours":78,"approval_perbill":837500001,"support_perbill":29263970,"approval":83.7500001,"support":2.926397},{"time_hours":79,"approval_perbill":835416668,"support_perbill":28869094,"approval":83.5416668,"support":2.8869094},{"time_hours":80,"approval_perbill":833333334,"support_perbill":28483451,"approval":83.3333334,"support":2.8483451},{"time_hours":81,"approval_perbill":831250001,"support_perbill":28106723,"approval":83.1250001,"support":2.8106723},{"time_hours":82,"approval_perbill":829166668,"support_perbill":27738602,"approval":82.9166668,"support":2.7738602},{"time_hours":83,"approval_perbill":827083335,"support_perbill":27378797,"approval":82.7083335,"support":2.7378797},{"time_hours":84,"approval_perbill":825000000,"support_perbill":27027029,"approval":82.5,"support":2.7027029},{"time_hours":85,"approval_perbill":822916667,"support_perbill":26683033,"approval":82.2916667,"support":2.6683033},{"time_hours":86,"approval_perbill":820833334,"support_perbill":26346554,"approval":82.0833334,"support":2.6346554},{"time_hours":87,"approval_perbill":818750001,"support_perbill":26017347,"approval":81.8750001,"support":2.6017347},{"time_hours":88,"approval_perbill":816666668,"support_perbill":25695180,"approval":81.6666668,"support":2.569518},{"time_hours":89,"approval_perbill":814583334,"support_perbill":25379829,"approval":81.4583334,"support":2.5379829},{"time_hours":90,"approval_perbill":812500001,"support_perbill":25071080,"approval":81.2500001,"support":2.507108},{"time_hours":91,"approval_perbill":810416668,"support_perbill":24768728,"approval":81.0416668,"support":2.4768728},{"time_hours":92,"approval_perbill":808333335,"support_perbill":24472576,"approval":80.8333335,"support":2.4472576},{"time_hours":93,"approval_perbill":806250001,"support_perbill":24182435,"approval":80.6250001,"support":2.4182435},{"time_hours":94,"approval_perbill":804166668,"support_perbill":23898125,"approval":80.4166668,"support":2.3898125},{"time_hours":95,"approval_perbill":802083335,"support_perbill":23619471,"approval":80.2083335,"support":2.3619471},{"time_hours":96,"approval_perbill":800000002,"support_perbill":23346306,"approval":80.0000002,"support":2.3346306},{"time_hours":97,"approval_perbill":797916667,"support_perbill":23078469,"approval":79.7916667,"support":2.3078469},{"time_hours":98,"approval_perbill":795833334,"support_perbill":22815806,"approval":79.5833334,"support":2.2815806},{"time_hours":99,"approval_perbill":793750001,"support_perbill":22558169,"approval":79.3750001,"support":2.2558169},{"time_hours":100,"approval_perbill":791666668,"support_perbill":22305415,"approval":79.1666668,"support":2.2305415},{"time_hours":101,"approval_perbill":789583334,"support_perbill":22057405,"approval":78.9583334,"support":2.2057405},{"time_hours":102,"approval_perbill":787500001,"support_perbill":21814009,"approval":78.7500001,"support":2.1814009},{"time_hours":103,"approval_perbill":785416668,"support_perbill":21575098,"approval":78.5416668,"support":2.1575098},{"time_hours":104,"approval_perbill":783333335,"support_perbill":21340549,"approval":78.3333335,"support":2.1340549},{"time_hours":105,"approval_perbill":781250000,"support_perbill":21110244,"approval":78.125,"support":2.1110244},{"time_hours":106,"approval_perbill":779166667,"support_perbill":20884069,"approval":77.9166667,"support":2.0884069},{"time_hours":107,"approval_perbill":777083334,"support_perbill":20661914,"approval":77.7083334,"support":2.0661914},{"time_hours":108,"approval_perbill":775000001,"support_perbill":20443673,"approval":77.5000001,"support":2.0443673},{"time_hours":109,"approval_perbill":772916668,"support_perbill":20229243,"approval":77.2916668,"support":2.0229243},{"time_hours":110,"approval_perbill":770833334,"support_perbill":20018524,"approval":77.0833334,"support":2.0018524},{"time_hours":111,"approval_perbill":768750001,"support_perbill":19811422,"approval":76.8750001,"support":1.9811422},{"time_hours":112,"approval_perbill":766666668,"support_perbill":19607845,"approval":76.6666668,"support":1.9607845},{"time_hours":113,"approval_perbill":764583335,"support_perbill":19407702,"approval":76.4583335,"support":1.9407702},{"time_hours":114,"approval_perbill":762500001,"support_perbill":19210908,"approval":76.2500001,"support":1.9210908},{"time_hours":115,"approval_perbill":760416668,"support_perbill":19017380,"approval":76.0416668,"support":1.901738},{"time_hours":116,"approval_perbill":758333335,"support_perbill":18827037,"approval":75.8333335,"support":1.8827037},{"time_hours":117,"approval_perbill":756250002,"support_perbill":18639800,"approval":75.6250002,"support":1.86398},{"time_hours":118,"approval_perbill":754166667,"support_perbill":18455595,"approval":75.4166667,"support":1.8455595},{"time_hours":119,"approval_perbill":752083334,"support_perbill":18274348,"approval":75.2083334,"support":1.8274348},{"time_hours":120,"approval_perbill":750000001,"support_perbill":18095989,"approval":75.0000001,"support":1.8095989},{"time_hours":121,"approval_perbill":747916668,"support_perbill":17920449,"approval":74.7916668,"support":1.7920449},{"time_hours":122,"approval_perbill":745833334,"support_perbill":17747662,"approval":74.5833334,"support":1.7747662},{"time_hours":123,"approval_perbill":743750001,"support_perbill":17577564,"approval":74.3750001,"support":1.7577564},{"time_hours":124,"approval_perbill":741666668,"support_perbill":17410092,"approval":74.1666668,"support":1.7410092},{"time_hours":125,"approval_perbill":739583335,"support_perbill":17245186,"approval":73.9583335,"support":1.7245186},{"time_hours":126,"approval_perbill":737500000,"support_perbill":17082787,"approval":73.75,"support":1.7082787},{"time_hours":127,"approval_perbill":735416667,"support_perbill":16922839,"approval":73.5416667,"support":1.6922839},{"time_hours":128,"approval_perbill":733333334,"support_perbill":16765287,"approval":73.3333334,"support":1.6765287},{"time_hours":129,"approval_perbill":731250001,"support_perbill":16610077,"approval":73.1250001,"support":1.6610077},{"time_hours":130,"approval_perbill":729166668,"support_perbill":16457158,"approval":72.9166668,"support":1.6457158},{"time_hours":131,"approval_perbill":727083334,"support_perbill":16306479,"approval":72.7083334,"support":1.6306479},{"time_hours":132,"approval_perbill":725000001,"support_perbill":16157990,"approval":72.5000001,"support":1.615799},{"time_hours":133,"approval_perbill":722916668,"support_perbill":16011646,"approval":72.2916668,"support":1.6011646},{"time_hours":134,"approval_perbill":720833335,"support_perbill":15867399,"approval":72.0833335,"support":1.5867399},{"time_hours":135,"approval_perbill":718750001,"support_perbill":15725205,"approval":71.8750001,"support":1.5725205},{"time_hours":136,"approval_perbill":716666668,"support_perbill":15585021,"approval":71.6666668,"support":1.5585021},{"time_hours":137,"approval_perbill":714583335,"support_perbill":15446804,"approval":71.4583335,"support":1.5446804},{"time_hours":138,"approval_perbill":712500002,"support_perbill":15310512,"approval":71.2500002,"support":1.5310512},{"time_hours":139,"approval_perbill":710416667,"support_perbill":15176107,"approval":71.0416667,"support":1.5176107},{"time_hours":140,"approval_perbill":708333334,"support_perbill":15043548,"approval":70.8333334,"support":1.5043548},{"time_hours":141,"approval_perbill":706250001,"support_perbill":14912799,"approval":70.6250001,"support":1.4912799},{"time_hours":142,"approval_perbill":704166668,"support_perbill":14783823,"approval":70.4166668,"support":1.4783823},{"time_hours":143,"approval_perbill":702083334,"support_perbill":14656583,"approval":70.2083334,"support":1.4656583},{"time_hours":144,"approval_perbill":700000001,"support_perbill":14531045,"approval":70.0000001,"support":1.4531045},{"time_hours":145,"approval_perbill":697916668,"support_perbill":14407175,"approval":69.7916668,"support":1.4407175},{"time_hours":146,"approval_perbill":695833335,"support_perbill":14284939,"approval":69.5833335,"support":1.4284939},{"time_hours":147,"approval_perbill":693750000,"support_perbill":14164307,"approval":69.375,"support":1.4164307},{"time_hours":148,"approval_perbill":691666667,"support_perbill":14045246,"approval":69.1666667,"support":1.4045246},{"time_hours":149,"approval_perbill":689583334,"support_perbill":13927726,"approval":68.9583334,"support":1.3927726},{"time_hours":150,"approval_perbill":687500001,"support_perbill":13811717,"approval":68.7500001,"support":1.3811717},{"time_hours":151,"approval_perbill":685416668,"support_perbill":13697191,"approval":68.5416668,"support":1.3697191},{"time_hours":152,"approval_perbill":683333334,"support_perbill":13584118,"approval":68.3333334,"support":1.3584118},{"time_hours":153,"approval_perbill":681250001,"support_perbill":13472472,"approval":68.1250001,"support":1.3472472},{"time_hours":154,"approval_perbill":679166668,"support_perbill":13362226,"approval":67.9166668,"support":1.3362226},{"time_hours":155,"approval_perbill":677083335,"support_perbill":13253353,"approval":67.7083335,"support":1.3253353},{"time_hours":156,"approval_perbill":675000001,"support_perbill":13145828,"approval":67.5000001,"support":1.3145828},{"time_hours":157,"approval_perbill":672916668,"support_perbill":13039626,"approval":67.2916668,"support":1.3039626},{"time_hours":158,"approval_perbill":670833335,"support_perbill":12934723,"approval":67.0833335,"support":1.2934723},{"time_hours":159,"approval_perbill":668750002,"support_perbill":12831096,"approval":66.8750002,"support":1.2831096},{"time_hours":160,"approval_perbill":666666667,"support_perbill":12728720,"approval":66.6666667,"support":1.272872},{"time_hours":161,"approval_perbill":664583334,"support_perbill":12627574,"approval":66.4583334,"support":1.2627574},{"time_hours":162,"approval_perbill":662500001,"support_perbill":12527635,"approval":66.2500001,"support":1.2527635},{"time_hours":163,"approval_perbill":660416668,"support_perbill":12428883,"approval":66.0416668,"support":1.2428883},{"time_hours":164,"approval_perbill":658333334,"support_perbill":12331295,"approval":65.8333334,"support":1.2331295},{"time_hours":165,"approval_perbill":656250001,"support_perbill":12234852,"approval":65.6250001,"support":1.2234852},{"time_hours":166,"approval_perbill":654166668,"support_perbill":12139533,"approval":65.4166668,"support":1.2139533},{"time_hours":167,"approval_perbill":652083335,"support_perbill":12045320,"approval":65.2083335,"support":1.204532},{"time_hours":168,"approval_perbill":650000000,"support_perbill":11952192,"approval":65,"support":1.1952192},{"time_hours":169,"approval_perbill":647916667,"support_perbill":11860131,"approval":64.7916667,"support":1.1860131},{"time_hours":170,"approval_perbill":645833334,"support_perbill":11769120,"approval":64.5833334,"support":1.176912},{"time_hours":171,"approval_perbill":643750001,"support_perbill":11679139,"approval":64.3750001,"support":1.1679139},{"time_hours":172,"approval_perbill":641666668,"support_perbill":11590172,"approval":64.1666668,"support":1.1590172},{"time_hours":173,"approval_perbill":639583334,"support_perbill":11502202,"approval":63.9583334,"support":1.1502202},{"time_hours":174,"approval_perbill":637500001,"support_perbill":11415212,"approval":63.7500001,"support":1.1415212},{"time_hours":175,"approval_perbill":635416668,"support_perbill":11329185,"approval":63.5416668,"support":1.1329185},{"time_hours":176,"approval_perbill":633333335,"support_perbill":11244107,"approval":63.3333335,"support":1.1244107},{"time_hours":177,"approval_perbill":631250001,"support_perbill":11159960,"approval":63.1250001,"support":1.115996},{"time_hours":178,"approval_perbill":629166668,"support_perbill":11076731,"approval":62.9166668,"support":1.1076731},{"time_hours":179,"approval_perbill":627083335,"support_perbill":10994403,"approval":62.7083335,"support":1.0994403},{"time_hours":180,"approval_perbill":625000002,"support_perbill":10912963,"approval":62.5000002,"support":1.0912963},{"time_hours":181,"approval_perbill":622916667,"support_perbill":10832396,"approval":62.2916667,"support":1.0832396},{"time_hours":182,"approval_perbill":620833334,"support_perbill":10752689,"approval":62.0833334,"support":1.0752689},{"time_hours":183,"approval_perbill":618750001,"support_perbill":10673827,"approval":61.8750001,"support":1.0673827},{"time_hours":184,"approval_perbill":616666668,"support_perbill":10595797,"approval":61.6666668,"support":1.0595797},{"time_hours":185,"approval_perbill":614583334,"support_perbill":10518586,"approval":61.4583334,"support":1.0518586},{"time_hours":186,"approval_perbill":612500001,"support_perbill":10442182,"approval":61.2500001,"support":1.0442182},{"time_hours":187,"approval_perbill":610416668,"support_perbill":10366571,"approval":61.0416668,"support":1.0366571},{"time_hours":188,"approval_perbill":608333335,"support_perbill":10291742,"approval":60.8333335,"support":1.0291742},{"time_hours":189,"approval_perbill":606250000,"support_perbill":10217682,"approval":60.625,"support":1.0217682},{"time_hours":190,"approval_perbill":604166667,"support_perbill":10144379,"approval":60.4166667,"support":1.0144379},{"time_hours":191,"approval_perbill":602083334,"support_perbill":10071822,"approval":60.2083334,"support":1.0071822},{"time_hours":192,"approval_perbill":600000001,"support_perbill":10000001,"approval":60.0000001,"support":1.0000001},{"time_hours":193,"approval_perbill":597916668,"support_perbill":9928902,"approval":59.7916668,"support":0.9928902},{"time_hours":194,"approval_perbill":595833334,"support_perbill":9858516,"approval":59.5833334,"support":0.9858516},{"time_hours":195,"approval_perbill":593750001,"support_perbill":9788833,"approval":59.3750001,"support":0.9788833},{"time_hours":196,"approval_perbill":591666668,"support_perbill":9719840,"approval":59.1666668,"support":0.971984},{"time_hours":197,"approval_perbill":589583335,"support_perbill":9651529,"approval":58.9583335,"support":0.9651529},{"time_hours":198,"approval_perbill":587500001,"support_perbill":9583890,"approval":58.7500001,"support":0.958389},{"time_hours":199,"approval_perbill":585416668,"support_perbill":9516912,"approval":58.5416668,"support":0.9516912},{"time_hours":200,"approval_perbill":583333335,"support_perbill":9450585,"approval":58.3333335,"support":0.9450585},{"time_hours":201,"approval_perbill":581250002,"support_perbill":9384901,"approval":58.1250002,"support":0.9384901},{"time_hours":202,"approval_perbill":579166667,"support_perbill":9319850,"approval":57.9166667,"support":0.931985},{"time_hours":203,"approval_perbill":577083334,"support_perbill":9255422,"approval":57.7083334,"support":0.9255422},{"time_hours":204,"approval_perbill":575000001,"support_perbill":9191610,"approval":57.5000001,"support":0.919161},{"time_hours":205,"approval_perbill":572916668,"support_perbill":9128404,"approval":57.2916668,"support":0.9128404},{"time_hours":206,"approval_perbill":570833334,"support_perbill":9065795,"approval":57.0833334,"support":0.9065795},{"time_hours":207,"approval_perbill":568750001,"support_perbill":9003776,"approval":56.8750001,"support":0.9003776},{"time_hours":208,"approval_perbill":566666668,"support_perbill":8942338,"approval":56.6666668,"support":0.8942338},{"time_hours":209,"approval_perbill":564583335,"support_perbill":8881472,"approval":56.4583335,"support":0.8881472},{"time_hours":210,"approval_perbill":562500000,"support_perbill":8821171,"approval":56.25,"support":0.8821171},{"time_hours":211,"approval_perbill":560416667,"support_perbill":8761427,"approval":56.0416667,"support":0.8761427},{"time_hours":212,"approval_perbill":558333334,"support_perbill":8702233,"approval":55.8333334,"support":0.8702233},{"time_hours":213,"approval_perbill":556250001,"support_perbill":8643580,"approval":55.6250001,"support":0.864358},{"time_hours":214,"approval_perbill":554166668,"support_perbill":8585461,"approval":55.4166668,"support":0.8585461},{"time_hours":215,"approval_perbill":552083334,"support_perbill":8527870,"approval":55.2083334,"support":0.852787},{"time_hours":216,"approval_perbill":550000001,"support_perbill":8470798,"approval":55.0000001,"support":0.8470798},{"time_hours":217,"approval_perbill":547916668,"support_perbill":8414240,"approval":54.7916668,"support":0.841424},{"time_hours":218,"approval_perbill":545833335,"support_perbill":8358187,"approval":54.5833335,"support":0.8358187},{"time_hours":219,"approval_perbill":543750001,"support_perbill":8302634,"approval":54.3750001,"support":0.8302634},{"time_hours":220,"approval_perbill":541666668,"support_perbill":8247573,"approval":54.1666668,"support":0.8247573},{"time_hours":221,"approval_perbill":539583335,"support_perbill":8192999,"approval":53.9583335,"support":0.8192999},{"time_hours":222,"approval_perbill":537500002,"support_perbill":8138904,"approval":53.7500002,"support":0.8138904},{"time_hours":223,"approval_perbill":535416667,"support_perbill":8085283,"approval":53.5416667,"support":0.8085283},{"time_hours":224,"approval_perbill":533333334,"support_perbill":8032129,"approval":53.3333334,"support":0.8032129},{"time_hours":225,"approval_perbill":531250001,"support_perbill":7979436,"approval":53.1250001,"support":0.7979436},{"time_hours":226,"approval_perbill":529166668,"support_perbill":7927198,"approval":52.9166668,"support":0.7927198},{"time_hours":227,"approval_perbill":527083334,"support_perbill":7875409,"approval":52.7083334,"support":0.7875409},{"time_hours":228,"approval_perbill":525000001,"support_perbill":7824065,"approval":52.5000001,"support":0.7824065},{"time_hours":229,"approval_perbill":522916668,"support_perbill":7773157,"approval":52.2916668,"support":0.7773157},{"time_hours":230,"approval_perbill":520833335,"support_perbill":7722683,"approval":52.0833335,"support":0.7722683},{"time_hours":231,"approval_perbill":518750000,"support_perbill":7672634,"approval":51.875,"support":0.7672634},{"time_hours":232,"approval_perbill":516666667,"support_perbill":7623008,"approval":51.6666667,"support":0.7623008},{"time_hours":233,"approval_perbill":514583334,"support_perbill":7573797,"approval":51.4583334,"support":0.7573797},{"time_hours":234,"approval_perbill":512500001,"support_perbill":7524998,"approval":51.2500001,"support":0.7524998},{"time_hours":235,"approval_perbill":510416668,"support_perbill":7476604,"approval":51.0416668,"support":0.7476604},{"time_hours":236,"approval_perbill":508333334,"support_perbill":7428611,"approval":50.8333334,"support":0.7428611},{"time_hours":237,"approval_perbill":506250001,"support_perbill":7381013,"approval":50.6250001,"support":0.7381013},{"time_hours":238,"approval_perbill":504166668,"support_perbill":7333807,"approval":50.4166668,"support":0.7333807},{"time_hours":239,"approval_perbill":502083335,"support_perbill":7286986,"approval":50.2083335,"support":0.7286986},{"time_hours":240,"approval_perbill":500000000,"support_perbill":7240547,"approval":50,"support":0.7240547},{"time_hours":241,"approval_perbill":500000000,"support_perbill":7194485,"approval":50,"support":0.7194485},{"time_hours":242,"approval_perbill":500000000,"support_perbill":7148795,"approval":50,"support":0.7148795},{"time_hours":243,"approval_perbill":500000000,"support_perbill":7103472,"approval":50,"support":0.7103472},{"time_hours":244,"approval_perbill":500000000,"support_perbill":7058513,"approval":50,"support":0.7058513},{"time_hours":245,"approval_perbill":500000000,"support_perbill":7013913,"approval":50,"support":0.7013913},{"time_hours":246,"approval_perbill":500000000,"support_perbill":6969667,"approval":50,"support":0.6969667},{"time_hours":247,"approval_perbill":500000000,"support_perbill":6925772,"approval":50,"support":0.6925772},{"time_hours":248,"approval_perbill":500000000,"support_perbill":6882223,"approval":50,"support":0.6882223},{"time_hours":249,"approval_perbill":500000000,"support_perbill":6839016,"approval":50,"support":0.6839016},{"time_hours":250,"approval_perbill":500000000,"support_perbill":6796148,"approval":50,"support":0.6796148},{"time_hours":251,"approval_perbill":500000000,"support_perbill":6753614,"approval":50,"support":0.6753614},{"time_hours":252,"approval_perbill":500000000,"support_perbill":6711409,"approval":50,"support":0.6711409},{"time_hours":253,"approval_perbill":500000000,"support_perbill":6669532,"approval":50,"support":0.6669532},{"time_hours":254,"approval_perbill":500000000,"support_perbill":6627977,"approval":50,"support":0.6627977},{"time_hours":255,"approval_perbill":500000000,"support_perbill":6586741,"approval":50,"support":0.6586741},{"time_hours":256,"approval_perbill":500000000,"support_perbill":6545821,"approval":50,"support":0.6545821},{"time_hours":257,"approval_perbill":500000000,"support_perbill":6505212,"approval":50,"support":0.6505212},{"time_hours":258,"approval_perbill":500000000,"support_perbill":6464912,"approval":50,"support":0.6464912},{"time_hours":259,"approval_perbill":500000000,"support_perbill":6424916,"approval":50,"support":0.6424916},{"time_hours":260,"approval_perbill":500000000,"support_perbill":6385221,"approval":50,"support":0.6385221},{"time_hours":261,"approval_perbill":500000000,"support_perbill":6345824,"approval":50,"support":0.6345824},{"time_hours":262,"approval_perbill":500000000,"support_perbill":6306722,"approval":50,"support":0.6306722},{"time_hours":263,"approval_perbill":500000000,"support_perbill":6267911,"approval":50,"support":0.6267911},{"time_hours":264,"approval_perbill":500000000,"support_perbill":6229388,"approval":50,"support":0.6229388},{"time_hours":265,"approval_perbill":500000000,"support_perbill":6191150,"approval":50,"support":0.619115},{"time_hours":266,"approval_perbill":500000000,"support_perbill":6153193,"approval":50,"support":0.6153193},{"time_hours":267,"approval_perbill":500000000,"support_perbill":6115515,"approval":50,"support":0.6115515},{"time_hours":268,"approval_perbill":500000000,"support_perbill":6078113,"approval":50,"support":0.6078113},{"time_hours":269,"approval_perbill":500000000,"support_perbill":6040983,"approval":50,"support":0.6040983},{"time_hours":270,"approval_perbill":500000000,"support_perbill":6004122,"approval":50,"support":0.6004122},{"time_hours":271,"approval_perbill":500000000,"support_perbill":5967528,"approval":50,"support":0.5967528},{"time_hours":272,"approval_perbill":500000000,"support_perbill":5931198,"approval":50,"support":0.5931198},{"time_hours":273,"approval_perbill":500000000,"support_perbill":5895129,"approval":50,"support":0.5895129},{"time_hours":274,"approval_perbill":500000000,"support_perbill":5859317,"approval":50,"support":0.5859317},{"time_hours":275,"approval_perbill":500000000,"support_perbill":5823762,"approval":50,"support":0.5823762},{"time_hours":276,"approval_perbill":500000000,"support_perbill":5788458,"approval":50,"support":0.5788458},{"time_hours":277,"approval_perbill":500000000,"support_perbill":5753405,"approval":50,"support":0.5753405},{"time_hours":278,"approval_perbill":500000000,"support_perbill":5718598,"approval":50,"support":0.5718598},{"time_hours":279,"approval_perbill":500000000,"support_perbill":5684037,"approval":50,"support":0.5684037},{"time_hours":280,"approval_perbill":500000000,"support_perbill":5649718,"approval":50,"support":0.5649718},{"time_hours":281,"approval_perbill":500000000,"support_perbill":5615638,"approval":50,"support":0.5615638},{"time_hours":282,"approval_perbill":500000000,"support_perbill":5581795,"approval":50,"support":0.5581795},{"time_hours":283,"approval_perbill":500000000,"support_perbill":5548186,"approval":50,"support":0.5548186},{"time_hours":284,"approval_perbill":500000000,"support_perbill":5514810,"approval":50,"support":0.551481},{"time_hours":285,"approval_perbill":500000000,"support_perbill":5481664,"approval":50,"support":0.5481664},{"time_hours":286,"approval_perbill":500000000,"support_perbill":5448745,"approval":50,"support":0.5448745},{"time_hours":287,"approval_perbill":500000000,"support_perbill":5416051,"approval":50,"support":0.5416051},{"time_hours":288,"approval_perbill":500000000,"support_perbill":5383580,"approval":50,"support":0.538358},{"time_hours":289,"approval_perbill":500000000,"support_perbill":5351329,"approval":50,"support":0.5351329},{"time_hours":290,"approval_perbill":500000000,"support_perbill":5319297,"approval":50,"support":0.5319297},{"time_hours":291,"approval_perbill":500000000,"support_perbill":5287481,"approval":50,"support":0.5287481},{"time_hours":292,"approval_perbill":500000000,"support_perbill":5255878,"approval":50,"support":0.5255878},{"time_hours":293,"approval_perbill":500000000,"support_perbill":5224487,"approval":50,"support":0.5224487},{"time_hours":294,"approval_perbill":500000000,"support_perbill":5193306,"approval":50,"support":0.5193306},{"time_hours":295,"approval_perbill":500000000,"support_perbill":5162333,"approval":50,"support":0.5162333},{"time_hours":296,"approval_perbill":500000000,"support_perbill":5131565,"approval":50,"support":0.5131565},{"time_hours":297,"approval_perbill":500000000,"support_perbill":5101000,"approval":50,"support":0.5101},{"time_hours":298,"approval_perbill":500000000,"support_perbill":5070636,"approval":50,"support":0.5070636},{"time_hours":299,"approval_perbill":500000000,"support_perbill":5040472,"approval":50,"support":0.5040472},{"time_hours":300,"approval_perbill":500000000,"support_perbill":5010506,"approval":50,"support":0.5010506},{"time_hours":301,"approval_perbill":500000000,"support_perbill":4980735,"approval":50,"support":0.4980735},{"time_hours":302,"approval_perbill":500000000,"support_perbill":4951157,"approval":50,"support":0.4951157},{"time_hours":303,"approval_perbill":500000000,"support_perbill":4921772,"approval":50,"support":0.4921772},{"time_hours":304,"approval_perbill":500000000,"support_perbill":4892576,"approval":50,"support":0.4892576},{"time_hours":305,"approval_perbill":500000000,"support_perbill":4863568,"approval":50,"support":0.4863568},{"time_hours":306,"approval_perbill":500000000,"support_perbill":4834747,"approval":50,"support":0.4834747},{"time_hours":307,"approval_perbill":500000000,"support_perbill":4806110,"approval":50,"support":0.480611},{"time_hours":308,"approval_perbill":500000000,"support_perbill":4777655,"approval":50,"support":0.4777655},{"time_hours":309,"approval_perbill":500000000,"support_perbill":4749382,"approval":50,"support":0.4749382},{"time_hours":310,"approval_perbill":500000000,"support_perbill":4721287,"approval":50,"support":0.4721287},{"time_hours":311,"approval_perbill":500000000,"support_perbill":4693371,"approval":50,"support":0.4693371},{"time_hours":312,"approval_perbill":500000000,"support_perbill":4665630,"approval":50,"support":0.466563},{"time_hours":313,"approval_perbill":500000000,"support_perbill":4638063,"approval":50,"support":0.4638063},{"time_hours":314,"approval_perbill":500000000,"support_perbill":4610669,"approval":50,"support":0.4610669},{"time_hours":315,"approval_perbill":500000000,"support_perbill":4583446,"approval":50,"support":0.4583446},{"time_hours":316,"approval_perbill":500000000,"support_perbill":4556392,"approval":50,"support":0.4556392},{"time_hours":317,"approval_perbill":500000000,"support_perbill":4529505,"approval":50,"support":0.4529505},{"time_hours":318,"approval_perbill":500000000,"support_perbill":4502785,"approval":50,"support":0.4502785},{"time_hours":319,"approval_perbill":500000000,"support_perbill":4476230,"approval":50,"support":0.447623},{"time_hours":320,"approval_perbill":500000000,"support_perbill":4449838,"approval":50,"support":0.4449838},{"time_hours":321,"approval_perbill":500000000,"support_perbill":4423608,"approval":50,"support":0.4423608},{"time_hours":322,"approval_perbill":500000000,"support_perbill":4397537,"approval":50,"support":0.4397537},{"time_hours":323,"approval_perbill":500000000,"support_perbill":4371626,"approval":50,"support":0.4371626},{"time_hours":324,"approval_perbill":500000000,"support_perbill":4345871,"approval":50,"support":0.4345871},{"time_hours":325,"approval_perbill":500000000,"support_perbill":4320273,"approval":50,"support":0.4320273},{"time_hours":326,"approval_perbill":500000000,"support_perbill":4294829,"approval":50,"support":0.4294829},{"time_hours":327,"approval_perbill":500000000,"support_perbill":4269538,"approval":50,"support":0.4269538},{"time_hours":328,"approval_perbill":500000000,"support_perbill":4244398,"approval":50,"support":0.4244398},{"time_hours":329,"approval_perbill":500000000,"support_perbill":4219409,"approval":50,"support":0.4219409},{"time_hours":330,"approval_perbill":500000000,"support_perbill":4194569,"approval":50,"support":0.4194569},{"time_hours":331,"approval_perbill":500000000,"support_perbill":4169876,"approval":50,"support":0.4169876},{"time_hours":332,"approval_perbill":500000000,"support_perbill":4145330,"approval":50,"support":0.414533},{"time_hours":333,"approval_perbill":500000000,"support_perbill":4120929,"approval":50,"support":0.4120929},{"time_hours":334,"approval_perbill":500000000,"support_perbill":4096672,"approval":50,"support":0.4096672},{"time_hours":335,"approval_perbill":500000000,"support_perbill":4072557,"approval":50,"support":0.4072557},{"time_hours":336,"approval_perbill":500000000,"support_perbill":4048583,"approval":50,"support":0.4048583},{"time_hours":337,"approval_perbill":500000000,"support_perbill":4024749,"approval":50,"support":0.4024749},{"time_hours":338,"approval_perbill":500000000,"support_perbill":4001054,"approval":50,"support":0.4001054},{"time_hours":339,"approval_perbill":500000000,"support_perbill":3977496,"approval":50,"support":0.3977496},{"time_hours":340,"approval_perbill":500000000,"support_perbill":3954075,"approval":50,"support":0.3954075},{"time_hours":341,"approval_perbill":500000000,"support_perbill":3930789,"approval":50,"support":0.3930789},{"time_hours":342,"approval_perbill":500000000,"support_perbill":3907637,"approval":50,"support":0.3907637},{"time_hours":343,"approval_perbill":500000000,"support_perbill":3884618,"approval":50,"support":0.3884618},{"time_hours":344,"approval_perbill":500000000,"support_perbill":3861731,"approval":50,"support":0.3861731},{"time_hours":345,"approval_perbill":500000000,"support_perbill":3838974,"approval":50,"support":0.3838974},{"time_hours":346,"approval_perbill":500000000,"support_perbill":3816347,"approval":50,"support":0.3816347},{"time_hours":347,"approval_perbill":500000000,"support_perbill":3793848,"approval":50,"support":0.3793848},{"time_hours":348,"approval_perbill":500000000,"support_perbill":3771476,"approval":50,"support":0.3771476},{"time_hours":349,"approval_perbill":500000000,"support_perbill":3749231,"approval":50,"support":0.3749231},{"time_hours":350,"approval_perbill":500000000,"support_perbill":3727110,"approval":50,"support":0.372711},{"time_hours":351,"approval_perbill":500000000,"support_perbill":3705114,"approval":50,"support":0.3705114},{"time_hours":352,"approval_perbill":500000000,"support_perbill":3683241,"approval":50,"support":0.3683241},{"time_hours":353,"approval_perbill":500000000,"support_perbill":3661490,"approval":50,"support":0.366149},{"time_hours":354,"approval_perbill":500000000,"support_perbill":3639860,"approval":50,"support":0.363986},{"time_hours":355,"approval_perbill":500000000,"support_perbill":3618349,"approval":50,"support":0.3618349},{"time_hours":356,"approval_perbill":500000000,"support_perbill":3596958,"approval":50,"support":0.3596958},{"time_hours":357,"approval_perbill":500000000,"support_perbill":3575685,"approval":50,"support":0.3575685},{"time_hours":358,"approval_perbill":500000000,"support_perbill":3554529,"approval":50,"support":0.3554529},{"time_hours":359,"approval_perbill":500000000,"support_perbill":3533489,"approval":50,"support":0.3533489},{"time_hours":360,"approval_perbill":500000000,"support_perbill":3512564,"approval":50,"support":0.3512564},{"time_hours":361,"approval_perbill":500000000,"support_perbill":3491753,"approval":50,"support":0.3491753},{"time_hours":362,"approval_perbill":500000000,"support_perbill":3471056,"approval":50,"support":0.3471056},{"time_hours":363,"approval_perbill":500000000,"support_perbill":3450470,"approval":50,"support":0.345047},{"time_hours":364,"approval_perbill":500000000,"support_perbill":3429997,"approval":50,"support":0.3429997},{"time_hours":365,"approval_perbill":500000000,"support_perbill":3409633,"approval":50,"support":0.3409633},{"time_hours":366,"approval_perbill":500000000,"support_perbill":3389380,"approval":50,"support":0.338938},{"time_hours":367,"approval_perbill":500000000,"support_perbill":3369235,"approval":50,"support":0.3369235},{"time_hours":368,"approval_perbill":500000000,"support_perbill":3349198,"approval":50,"support":0.3349198},{"time_hours":369,"approval_perbill":500000000,"support_perbill":3329268,"approval":50,"support":0.3329268},{"time_hours":370,"approval_perbill":500000000,"support_perbill":3309444,"approval":50,"support":0.3309444},{"time_hours":371,"approval_perbill":500000000,"support_perbill":3289725,"approval":50,"support":0.3289725},{"time_hours":372,"approval_perbill":500000000,"support_perbill":3270111,"approval":50,"support":0.3270111},{"time_hours":373,"approval_perbill":500000000,"support_perbill":3250600,"approval":50,"support":0.32506},{"time_hours":374,"approval_perbill":500000000,"support_perbill":3231193,"approval":50,"support":0.3231193},{"time_hours":375,"approval_perbill":500000000,"support_perbill":3211887,"approval":50,"support":0.3211887},{"time_hours":376,"approval_perbill":500000000,"support_perbill":3192682,"approval":50,"support":0.3192682},{"time_hours":377,"approval_perbill":500000000,"support_perbill":3173578,"approval":50,"support":0.3173578},{"time_hours":378,"approval_perbill":500000000,"support_perbill":3154574,"approval":50,"support":0.3154574},{"time_hours":379,"approval_perbill":500000000,"support_perbill":3135668,"approval":50,"support":0.3135668},{"time_hours":380,"approval_perbill":500000000,"support_perbill":3116861,"approval":50,"support":0.3116861},{"time_hours":381,"approval_perbill":500000000,"support_perbill":3098150,"approval":50,"support":0.309815},{"time_hours":382,"approval_perbill":500000000,"support_perbill":3079537,"approval":50,"support":0.3079537},{"time_hours":383,"approval_perbill":500000000,"support_perbill":3061019,"approval":50,"support":0.3061019},{"time_hours":384,"approval_perbill":500000000,"support_perbill":3042596,"approval":50,"support":0.3042596},{"time_hours":385,"approval_perbill":500000000,"support_perbill":3024268,"approval":50,"support":0.3024268},{"time_hours":386,"approval_perbill":500000000,"support_perbill":3006033,"approval":50,"support":0.3006033},{"time_hours":387,"approval_perbill":500000000,"support_perbill":2987891,"approval":50,"support":0.2987891},{"time_hours":388,"approval_perbill":500000000,"support_perbill":2969841,"approval":50,"support":0.2969841},{"time_hours":389,"approval_perbill":500000000,"support_perbill":2951883,"approval":50,"support":0.2951883},{"time_hours":390,"approval_perbill":500000000,"support_perbill":2934016,"approval":50,"support":0.2934016},{"time_hours":391,"approval_perbill":500000000,"support_perbill":2916238,"approval":50,"support":0.2916238},{"time_hours":392,"approval_perbill":500000000,"support_perbill":2898550,"approval":50,"support":0.289855},{"time_hours":393,"approval_perbill":500000000,"support_perbill":2880951,"approval":50,"support":0.2880951},{"time_hours":394,"approval_perbill":500000000,"support_perbill":2863440,"approval":50,"support":0.286344},{"time_hours":395,"approval_perbill":500000000,"support_perbill":2846017,"approval":50,"support":0.2846017},{"time_hours":396,"approval_perbill":500000000,"support_perbill":2828680,"approval":50,"support":0.282868},{"time_hours":397,"approval_perbill":500000000,"support_perbill":2811429,"approval":50,"support":0.2811429},{"time_hours":398,"approval_perbill":500000000,"support_perbill":2794264,"approval":50,"support":0.2794264},{"time_hours":399,"approval_perbill":500000000,"support_perbill":2777184,"approval":50,"support":0.2777184},{"time_hours":400,"approval_perbill":500000000,"support_perbill":2760188,"approval":50,"support":0.2760188},{"time_hours":401,"approval_perbill":500000000,"support_perbill":2743276,"approval":50,"support":0.2743276},{"time_hours":402,"approval_perbill":500000000,"support_perbill":2726446,"approval":50,"support":0.2726446},{"time_hours":403,"approval_perbill":500000000,"support_perbill":2709699,"approval":50,"support":0.2709699},{"time_hours":404,"approval_perbill":500000000,"support_perbill":2693034,"approval":50,"support":0.2693034},{"time_hours":405,"approval_perbill":500000000,"support_perbill":2676450,"approval":50,"support":0.267645},{"time_hours":406,"approval_perbill":500000000,"support_perbill":2659946,"approval":50,"support":0.2659946},{"time_hours":407,"approval_perbill":500000000,"support_perbill":2643523,"approval":50,"support":0.2643523},{"time_hours":408,"approval_perbill":500000000,"support_perbill":2627179,"approval":50,"support":0.2627179},{"time_hours":409,"approval_perbill":500000000,"support_perbill":2610914,"approval":50,"support":0.2610914},{"time_hours":410,"approval_perbill":500000000,"support_perbill":2594727,"approval":50,"support":0.2594727},{"time_hours":411,"approval_perbill":500000000,"support_perbill":2578618,"approval":50,"support":0.2578618},{"time_hours":412,"approval_perbill":500000000,"support_perbill":2562586,"approval":50,"support":0.2562586},{"time_hours":413,"approval_perbill":500000000,"support_perbill":2546630,"approval":50,"support":0.254663},{"time_hours":414,"approval_perbill":500000000,"support_perbill":2530751,"approval":50,"support":0.2530751},{"time_hours":415,"approval_perbill":500000000,"support_perbill":2514947,"approval":50,"support":0.2514947},{"time_hours":416,"approval_perbill":500000000,"support_perbill":2499219,"approval":50,"support":0.2499219},{"time_hours":417,"approval_perbill":500000000,"support_perbill":2483564,"approval":50,"support":0.2483564},{"time_hours":418,"approval_perbill":500000000,"support_perbill":2467984,"approval":50,"support":0.2467984},{"time_hours":419,"approval_perbill":500000000,"support_perbill":2452477,"approval":50,"support":0.2452477},{"time_hours":420,"approval_perbill":500000000,"support_perbill":2437043,"approval":50,"support":0.2437043},{"time_hours":421,"approval_perbill":500000000,"support_perbill":2421681,"approval":50,"support":0.2421681},{"time_hours":422,"approval_perbill":500000000,"support_perbill":2406391,"approval":50,"support":0.2406391},{"time_hours":423,"approval_perbill":500000000,"support_perbill":2391172,"approval":50,"support":0.2391172},{"time_hours":424,"approval_perbill":500000000,"support_perbill":2376025,"approval":50,"support":0.2376025},{"time_hours":425,"approval_perbill":500000000,"support_perbill":2360947,"approval":50,"support":0.2360947},{"time_hours":426,"approval_perbill":500000000,"support_perbill":2345940,"approval":50,"support":0.234594},{"time_hours":427,"approval_perbill":500000000,"support_perbill":2331002,"approval":50,"support":0.2331002},{"time_hours":428,"approval_perbill":500000000,"support_perbill":2316133,"approval":50,"support":0.2316133},{"time_hours":429,"approval_perbill":500000000,"support_perbill":2301332,"approval":50,"support":0.2301332},{"time_hours":430,"approval_perbill":500000000,"support_perbill":2286599,"approval":50,"support":0.2286599},{"time_hours":431,"approval_perbill":500000000,"support_perbill":2271934,"approval":50,"support":0.2271934},{"time_hours":432,"approval_perbill":500000000,"support_perbill":2257336,"approval":50,"support":0.2257336},{"time_hours":433,"approval_perbill":500000000,"support_perbill":2242804,"approval":50,"support":0.2242804},{"time_hours":434,"approval_perbill":500000000,"support_perbill":2228339,"approval":50,"support":0.2228339},{"time_hours":435,"approval_perbill":500000000,"support_perbill":2213939,"approval":50,"support":0.2213939},{"time_hours":436,"approval_perbill":500000000,"support_perbill":2199604,"approval":50,"support":0.2199604},{"time_hours":437,"approval_perbill":500000000,"support_perbill":2185335,"approval":50,"support":0.2185335},{"time_hours":438,"approval_perbill":500000000,"support_perbill":2171129,"approval":50,"support":0.2171129},{"time_hours":439,"approval_perbill":500000000,"support_perbill":2156988,"approval":50,"support":0.2156988},{"time_hours":440,"approval_perbill":500000000,"support_perbill":2142909,"approval":50,"support":0.2142909},{"time_hours":441,"approval_perbill":500000000,"support_perbill":2128894,"approval":50,"support":0.2128894},{"time_hours":442,"approval_perbill":500000000,"support_perbill":2114942,"approval":50,"support":0.2114942},{"time_hours":443,"approval_perbill":500000000,"support_perbill":2101052,"approval":50,"support":0.2101052},{"time_hours":444,"approval_perbill":500000000,"support_perbill":2087224,"approval":50,"support":0.2087224},{"time_hours":445,"approval_perbill":500000000,"support_perbill":2073457,"approval":50,"support":0.2073457},{"time_hours":446,"approval_perbill":500000000,"support_perbill":2059751,"approval":50,"support":0.2059751},{"time_hours":447,"approval_perbill":500000000,"support_perbill":2046105,"approval":50,"support":0.2046105},{"time_hours":448,"approval_perbill":500000000,"support_perbill":2032520,"approval":50,"support":0.203252},{"time_hours":449,"approval_perbill":500000000,"support_perbill":2018994,"approval":50,"support":0.2018994},{"time_hours":450,"approval_perbill":500000000,"support_perbill":2005528,"approval":50,"support":0.2005528},{"time_hours":451,"approval_perbill":500000000,"support_perbill":1992121,"approval":50,"support":0.1992121},{"time_hours":452,"approval_perbill":500000000,"support_perbill":1978773,"approval":50,"support":0.1978773},{"time_hours":453,"approval_perbill":500000000,"support_perbill":1965482,"approval":50,"support":0.1965482},{"time_hours":454,"approval_perbill":500000000,"support_perbill":1952250,"approval":50,"support":0.195225},{"time_hours":455,"approval_perbill":500000000,"support_perbill":1939075,"approval":50,"support":0.1939075},{"time_hours":456,"approval_perbill":500000000,"support_perbill":1925957,"approval":50,"support":0.1925957},{"time_hours":457,"approval_perbill":500000000,"support_perbill":1912896,"approval":50,"support":0.1912896},{"time_hours":458,"approval_perbill":500000000,"support_perbill":1899891,"approval":50,"support":0.1899891},{"time_hours":459,"approval_perbill":500000000,"support_perbill":1886942,"approval":50,"support":0.1886942},{"time_hours":460,"approval_perbill":500000000,"support_perbill":1874049,"approval":50,"support":0.1874049},{"time_hours":461,"approval_perbill":500000000,"support_perbill":1861211,"approval":50,"support":0.1861211},{"time_hours":462,"approval_perbill":500000000,"support_perbill":1848428,"approval":50,"support":0.1848428},{"time_hours":463,"approval_perbill":500000000,"support_perbill":1835700,"approval":50,"support":0.18357},{"time_hours":464,"approval_perbill":500000000,"support_perbill":1823026,"approval":50,"support":0.1823026},{"time_hours":465,"approval_perbill":500000000,"support_perbill":1810405,"approval":50,"support":0.1810405},{"time_hours":466,"approval_perbill":500000000,"support_perbill":1797839,"approval":50,"support":0.1797839},{"time_hours":467,"approval_perbill":500000000,"support_perbill":1785325,"approval":50,"support":0.1785325},{"time_hours":468,"approval_perbill":500000000,"support_perbill":1772864,"approval":50,"support":0.1772864},{"time_hours":469,"approval_perbill":500000000,"support_perbill":1760456,"approval":50,"support":0.1760456},{"time_hours":470,"approval_perbill":500000000,"support_perbill":1748100,"approval":50,"support":0.17481},{"time_hours":471,"approval_perbill":500000000,"support_perbill":1735796,"approval":50,"support":0.1735796},{"time_hours":472,"approval_perbill":500000000,"support_perbill":1723543,"approval":50,"support":0.1723543},{"time_hours":473,"approval_perbill":500000000,"support_perbill":1711342,"approval":50,"support":0.1711342},{"time_hours":474,"approval_perbill":500000000,"support_perbill":1699191,"approval":50,"support":0.1699191},{"time_hours":475,"approval_perbill":500000000,"support_perbill":1687091,"approval":50,"support":0.1687091},{"time_hours":476,"approval_perbill":500000000,"support_perbill":1675041,"approval":50,"support":0.1675041},{"time_hours":477,"approval_perbill":500000000,"support_perbill":1663042,"approval":50,"support":0.1663042},{"time_hours":478,"approval_perbill":500000000,"support_perbill":1651091,"approval":50,"support":0.1651091},{"time_hours":479,"approval_perbill":500000000,"support_perbill":1639191,"approval":50,"support":0.1639191},{"time_hours":480,"approval_perbill":500000000,"support_perbill":1627339,"approval":50,"support":0.1627339},{"time_hours":481,"approval_perbill":500000000,"support_perbill":1615536,"approval":50,"support":0.1615536},{"time_hours":482,"approval_perbill":500000000,"support_perbill":1603781,"approval":50,"support":0.1603781},{"time_hours":483,"approval_perbill":500000000,"support_perbill":1592075,"approval":50,"support":0.1592075},{"time_hours":484,"approval_perbill":500000000,"support_perbill":1580416,"approval":50,"support":0.1580416},{"time_hours":485,"approval_perbill":500000000,"support_perbill":1568805,"approval":50,"support":0.1568805},{"time_hours":486,"approval_perbill":500000000,"support_perbill":1557241,"approval":50,"support":0.1557241},{"time_hours":487,"approval_perbill":500000000,"support_perbill":1545724,"approval":50,"support":0.1545724},{"time_hours":488,"approval_perbill":500000000,"support_perbill":1534253,"approval":50,"support":0.1534253},{"time_hours":489,"approval_perbill":500000000,"support_perbill":1522829,"approval":50,"support":0.1522829},{"time_hours":490,"approval_perbill":500000000,"support_perbill":1511452,"approval":50,"support":0.1511452},{"time_hours":491,"approval_perbill":500000000,"support_perbill":1500120,"approval":50,"support":0.150012},{"time_hours":492,"approval_perbill":500000000,"support_perbill":1488833,"approval":50,"support":0.1488833},{"time_hours":493,"approval_perbill":500000000,"support_perbill":1477592,"approval":50,"support":0.1477592},{"time_hours":494,"approval_perbill":500000000,"support_perbill":1466396,"approval":50,"support":0.1466396},{"time_hours":495,"approval_perbill":500000000,"support_perbill":1455245,"approval":50,"support":0.1455245},{"time_hours":496,"approval_perbill":500000000,"support_perbill":1444138,"approval":50,"support":0.1444138},{"time_hours":497,"approval_perbill":500000000,"support_perbill":1433075,"approval":50,"support":0.1433075},{"time_hours":498,"approval_perbill":500000000,"support_perbill":1422056,"approval":50,"support":0.1422056},{"time_hours":499,"approval_perbill":500000000,"support_perbill":1411081,"approval":50,"support":0.1411081},{"time_hours":500,"approval_perbill":500000000,"support_perbill":1400149,"approval":50,"support":0.1400149},{"time_hours":501,"approval_perbill":500000000,"support_perbill":1389261,"approval":50,"support":0.1389261},{"time_hours":502,"approval_perbill":500000000,"support_perbill":1378415,"approval":50,"support":0.1378415},{"time_hours":503,"approval_perbill":500000000,"support_perbill":1367612,"approval":50,"support":0.1367612},{"time_hours":504,"approval_perbill":500000000,"support_perbill":1356852,"approval":50,"support":0.1356852},{"time_hours":505,"approval_perbill":500000000,"support_perbill":1346133,"approval":50,"support":0.1346133},{"time_hours":506,"approval_perbill":500000000,"support_perbill":1335457,"approval":50,"support":0.1335457},{"time_hours":507,"approval_perbill":500000000,"support_perbill":1324822,"approval":50,"support":0.1324822},{"time_hours":508,"approval_perbill":500000000,"support_perbill":1314228,"approval":50,"support":0.1314228},{"time_hours":509,"approval_perbill":500000000,"support_perbill":1303676,"approval":50,"support":0.1303676},{"time_hours":510,"approval_perbill":500000000,"support_perbill":1293165,"approval":50,"support":0.1293165},{"time_hours":511,"approval_perbill":500000000,"support_perbill":1282694,"approval":50,"support":0.1282694},{"time_hours":512,"approval_perbill":500000000,"support_perbill":1272264,"approval":50,"support":0.1272264},{"time_hours":513,"approval_perbill":500000000,"support_perbill":1261874,"approval":50,"support":0.1261874},{"time_hours":514,"approval_perbill":500000000,"support_perbill":1251524,"approval":50,"support":0.1251524},{"time_hours":515,"approval_perbill":500000000,"support_perbill":1241214,"approval":50,"support":0.1241214},{"time_hours":516,"approval_perbill":500000000,"support_perbill":1230944,"approval":50,"support":0.1230944},{"time_hours":517,"approval_perbill":500000000,"support_perbill":1220712,"approval":50,"support":0.1220712},{"time_hours":518,"approval_perbill":500000000,"support_perbill":1210520,"approval":50,"support":0.121052},{"time_hours":519,"approval_perbill":500000000,"support_perbill":1200367,"approval":50,"support":0.1200367},{"time_hours":520,"approval_perbill":500000000,"support_perbill":1190252,"approval":50,"support":0.1190252},{"time_hours":521,"approval_perbill":500000000,"support_perbill":1180176,"approval":50,"support":0.1180176},{"time_hours":522,"approval_perbill":500000000,"support_perbill":1170138,"approval":50,"support":0.1170138},{"time_hours":523,"approval_perbill":500000000,"support_perbill":1160137,"approval":50,"support":0.1160137},{"time_hours":524,"approval_perbill":500000000,"support_perbill":1150175,"approval":50,"support":0.1150175},{"time_hours":525,"approval_perbill":500000000,"support_perbill":1140250,"approval":50,"support":0.114025},{"time_hours":526,"approval_perbill":500000000,"support_perbill":1130363,"approval":50,"support":0.1130363},{"time_hours":527,"approval_perbill":500000000,"support_perbill":1120513,"approval":50,"support":0.1120513},{"time_hours":528,"approval_perbill":500000000,"support_perbill":1110699,"approval":50,"support":0.1110699},{"time_hours":529,"approval_perbill":500000000,"support_perbill":1100923,"approval":50,"support":0.1100923},{"time_hours":530,"approval_perbill":500000000,"support_perbill":1091182,"approval":50,"support":0.1091182},{"time_hours":531,"approval_perbill":500000000,"support_perbill":1081479,"approval":50,"support":0.1081479},{"time_hours":532,"approval_perbill":500000000,"support_perbill":1071811,"approval":50,"support":0.1071811},{"time_hours":533,"approval_perbill":500000000,"support_perbill":1062179,"approval":50,"support":0.1062179},{"time_hours":534,"approval_perbill":500000000,"support_perbill":1052583,"approval":50,"support":0.1052583},{"time_hours":535,"approval_perbill":500000000,"support_perbill":1043022,"approval":50,"support":0.1043022},{"time_hours":536,"approval_perbill":500000000,"support_perbill":1033497,"approval":50,"support":0.1033497},{"time_hours":537,"approval_perbill":500000000,"support_perbill":1024007,"approval":50,"support":0.1024007},{"time_hours":538,"approval_perbill":500000000,"support_perbill":1014551,"approval":50,"support":0.1014551},{"time_hours":539,"approval_perbill":500000000,"support_perbill":1005131,"approval":50,"support":0.1005131},{"time_hours":540,"approval_perbill":500000000,"support_perbill":995745,"approval":50,"support":0.0995745},{"time_hours":541,"approval_perbill":500000000,"support_perbill":986393,"approval":50,"support":0.0986393},{"time_hours":542,"approval_perbill":500000000,"support_perbill":977076,"approval":50,"support":0.0977076},{"time_hours":543,"approval_perbill":500000000,"support_perbill":967792,"approval":50,"support":0.0967792},{"time_hours":544,"approval_perbill":500000000,"support_perbill":958542,"approval":50,"support":0.0958542},{"time_hours":545,"approval_perbill":500000000,"support_perbill":949326,"approval":50,"support":0.0949326},{"time_hours":546,"approval_perbill":500000000,"support_perbill":940144,"approval":50,"support":0.0940144},{"time_hours":547,"approval_perbill":500000000,"support_perbill":930994,"approval":50,"support":0.0930994},{"time_hours":548,"approval_perbill":500000000,"support_perbill":921878,"approval":50,"support":0.0921878},{"time_hours":549,"approval_perbill":500000000,"support_perbill":912794,"approval":50,"support":0.0912794},{"time_hours":550,"approval_perbill":500000000,"support_perbill":903743,"approval":50,"support":0.0903743},{"time_hours":551,"approval_perbill":500000000,"support_perbill":894725,"approval":50,"support":0.0894725},{"time_hours":552,"approval_perbill":500000000,"support_perbill":885739,"approval":50,"support":0.0885739},{"time_hours":553,"approval_perbill":500000000,"support_perbill":876785,"approval":50,"support":0.0876785},{"time_hours":554,"approval_perbill":500000000,"support_perbill":867863,"approval":50,"support":0.0867863},{"time_hours":555,"approval_perbill":500000000,"support_perbill":858973,"approval":50,"support":0.0858973},{"time_hours":556,"approval_perbill":500000000,"support_perbill":850115,"approval":50,"support":0.0850115},{"time_hours":557,"approval_perbill":500000000,"support_perbill":841288,"approval":50,"support":0.0841288},{"time_hours":558,"approval_perbill":500000000,"support_perbill":832493,"approval":50,"support":0.0832493},{"time_hours":559,"approval_perbill":500000000,"support_perbill":823729,"approval":50,"support":0.0823729},{"time_hours":560,"approval_perbill":500000000,"support_perbill":814995,"approval":50,"support":0.0814995},{"time_hours":561,"approval_perbill":500000000,"support_perbill":806293,"approval":50,"support":0.0806293},{"time_hours":562,"approval_perbill":500000000,"support_perbill":797621,"approval":50,"support":0.0797621},{"time_hours":563,"approval_perbill":500000000,"support_perbill":788980,"approval":50,"support":0.078898},{"time_hours":564,"approval_perbill":500000000,"support_perbill":780369,"approval":50,"support":0.0780369},{"time_hours":565,"approval_perbill":500000000,"support_perbill":771788,"approval":50,"support":0.0771788},{"time_hours":566,"approval_perbill":500000000,"support_perbill":763237,"approval":50,"support":0.0763237},{"time_hours":567,"approval_perbill":500000000,"support_perbill":754716,"approval":50,"support":0.0754716},{"time_hours":568,"approval_perbill":500000000,"support_perbill":746225,"approval":50,"support":0.0746225},{"time_hours":569,"approval_perbill":500000000,"support_perbill":737764,"approval":50,"support":0.0737764},{"time_hours":570,"approval_perbill":500000000,"support_perbill":729331,"approval":50,"support":0.0729331},{"time_hours":571,"approval_perbill":500000000,"support_perbill":720928,"approval":50,"support":0.0720928},{"time_hours":572,"approval_perbill":500000000,"support_perbill":712555,"approval":50,"support":0.0712555},{"time_hours":573,"approval_perbill":500000000,"support_perbill":704210,"approval":50,"support":0.070421},{"time_hours":574,"approval_perbill":500000000,"support_perbill":695894,"approval":50,"support":0.0695894},{"time_hours":575,"approval_perbill":500000000,"support_perbill":687606,"approval":50,"support":0.0687606},{"time_hours":576,"approval_perbill":500000000,"support_perbill":679347,"approval":50,"support":0.0679347},{"time_hours":577,"approval_perbill":500000000,"support_perbill":671117,"approval":50,"support":0.0671117},{"time_hours":578,"approval_perbill":500000000,"support_perbill":662914,"approval":50,"support":0.0662914},{"time_hours":579,"approval_perbill":500000000,"support_perbill":654740,"approval":50,"support":0.065474},{"time_hours":580,"approval_perbill":500000000,"support_perbill":646594,"approval":50,"support":0.0646594},{"time_hours":581,"approval_perbill":500000000,"support_perbill":638475,"approval":50,"support":0.0638475},{"time_hours":582,"approval_perbill":500000000,"support_perbill":630384,"approval":50,"support":0.0630384},{"time_hours":583,"approval_perbill":500000000,"support_perbill":622320,"approval":50,"support":0.062232},{"time_hours":584,"approval_perbill":500000000,"support_perbill":614284,"approval":50,"support":0.0614284},{"time_hours":585,"approval_perbill":500000000,"support_perbill":606275,"approval":50,"support":0.0606275},{"time_hours":586,"approval_perbill":500000000,"support_perbill":598294,"approval":50,"support":0.0598294},{"time_hours":587,"approval_perbill":500000000,"support_perbill":590339,"approval":50,"support":0.0590339},{"time_hours":588,"approval_perbill":500000000,"support_perbill":582411,"approval":50,"support":0.0582411},{"time_hours":589,"approval_perbill":500000000,"support_perbill":574509,"approval":50,"support":0.0574509},{"time_hours":590,"approval_perbill":500000000,"support_perbill":566634,"approval":50,"support":0.0566634},{"time_hours":591,"approval_perbill":500000000,"support_perbill":558786,"approval":50,"support":0.0558786},{"time_hours":592,"approval_perbill":500000000,"support_perbill":550964,"approval":50,"support":0.0550964},{"time_hours":593,"approval_perbill":500000000,"support_perbill":543167,"approval":50,"support":0.0543167},{"time_hours":594,"approval_perbill":500000000,"support_perbill":535397,"approval":50,"support":0.0535397},{"time_hours":595,"approval_perbill":500000000,"support_perbill":527653,"approval":50,"support":0.0527653},{"time_hours":596,"approval_perbill":500000000,"support_perbill":519935,"approval":50,"support":0.0519935},{"time_hours":597,"approval_perbill":500000000,"support_perbill":512242,"approval":50,"support":0.0512242},{"time_hours":598,"approval_perbill":500000000,"support_perbill":504575,"approval":50,"support":0.0504575},{"time_hours":599,"approval_perbill":500000000,"support_perbill":496933,"approval":50,"support":0.0496933},{"time_hours":600,"approval_perbill":500000000,"support_perbill":489316,"approval":50,"support":0.0489316},{"time_hours":601,"approval_perbill":500000000,"support_perbill":481724,"approval":50,"support":0.0481724},{"time_hours":602,"approval_perbill":500000000,"support_perbill":474158,"approval":50,"support":0.0474158},{"time_hours":603,"approval_perbill":500000000,"support_perbill":466616,"approval":50,"support":0.0466616},{"time_hours":604,"approval_perbill":500000000,"support_perbill":459099,"approval":50,"support":0.0459099},{"time_hours":605,"approval_perbill":500000000,"support_perbill":451607,"approval":50,"support":0.0451607},{"time_hours":606,"approval_perbill":500000000,"support_perbill":444139,"approval":50,"support":0.0444139},{"time_hours":607,"approval_perbill":500000000,"support_perbill":436695,"approval":50,"support":0.0436695},{"time_hours":608,"approval_perbill":500000000,"support_perbill":429276,"approval":50,"support":0.0429276},{"time_hours":609,"approval_perbill":500000000,"support_perbill":421881,"approval":50,"support":0.0421881},{"time_hours":610,"approval_perbill":500000000,"support_perbill":414510,"approval":50,"support":0.041451},{"time_hours":611,"approval_perbill":500000000,"support_perbill":407163,"approval":50,"support":0.0407163},{"time_hours":612,"approval_perbill":500000000,"support_perbill":399839,"approval":50,"support":0.0399839},{"time_hours":613,"approval_perbill":500000000,"support_perbill":392540,"approval":50,"support":0.039254},{"time_hours":614,"approval_perbill":500000000,"support_perbill":385264,"approval":50,"support":0.0385264},{"time_hours":615,"approval_perbill":500000000,"support_perbill":378011,"approval":50,"support":0.0378011},{"time_hours":616,"approval_perbill":500000000,"support_perbill":370782,"approval":50,"support":0.0370782},{"time_hours":617,"approval_perbill":500000000,"support_perbill":363576,"approval":50,"support":0.0363576},{"time_hours":618,"approval_perbill":500000000,"support_perbill":356393,"approval":50,"support":0.0356393},{"time_hours":619,"approval_perbill":500000000,"support_perbill":349233,"approval":50,"support":0.0349233},{"time_hours":620,"approval_perbill":500000000,"support_perbill":342096,"approval":50,"support":0.0342096},{"time_hours":621,"approval_perbill":500000000,"support_perbill":334981,"approval":50,"support":0.0334981},{"time_hours":622,"approval_perbill":500000000,"support_perbill":327890,"approval":50,"support":0.032789},{"time_hours":623,"approval_perbill":500000000,"support_perbill":320821,"approval":50,"support":0.0320821},{"time_hours":624,"approval_perbill":500000000,"support_perbill":313774,"approval":50,"support":0.0313774},{"time_hours":625,"approval_perbill":500000000,"support_perbill":306750,"approval":50,"support":0.030675},{"time_hours":626,"approval_perbill":500000000,"support_perbill":299748,"approval":50,"support":0.0299748},{"time_hours":627,"approval_perbill":500000000,"support_perbill":292768,"approval":50,"support":0.0292768},{"time_hours":628,"approval_perbill":500000000,"support_perbill":285810,"approval":50,"support":0.028581},{"time_hours":629,"approval_perbill":500000000,"support_perbill":278874,"approval":50,"support":0.0278874},{"time_hours":630,"approval_perbill":500000000,"support_perbill":271960,"approval":50,"support":0.027196},{"time_hours":631,"approval_perbill":500000000,"support_perbill":265068,"approval":50,"support":0.0265068},{"time_hours":632,"approval_perbill":500000000,"support_perbill":258197,"approval":50,"support":0.0258197},{"time_hours":633,"approval_perbill":500000000,"support_perbill":251348,"approval":50,"support":0.0251348},{"time_hours":634,"approval_perbill":500000000,"support_perbill":244520,"approval":50,"support":0.024452},{"time_hours":635,"approval_perbill":500000000,"support_perbill":237714,"approval":50,"support":0.0237714},{"time_hours":636,"approval_perbill":500000000,"support_perbill":230928,"approval":50,"support":0.0230928},{"time_hours":637,"approval_perbill":500000000,"support_perbill":224164,"approval":50,"support":0.0224164},{"time_hours":638,"approval_perbill":500000000,"support_perbill":217421,"approval":50,"support":0.0217421},{"time_hours":639,"approval_perbill":500000000,"support_perbill":210699,"approval":50,"support":0.0210699},{"time_hours":640,"approval_perbill":500000000,"support_perbill":203998,"approval":50,"support":0.0203998},{"time_hours":641,"approval_perbill":500000000,"support_perbill":197317,"approval":50,"support":0.0197317},{"time_hours":642,"approval_perbill":500000000,"support_perbill":190657,"approval":50,"support":0.0190657},{"time_hours":643,"approval_perbill":500000000,"support_perbill":184018,"approval":50,"support":0.0184018},{"time_hours":644,"approval_perbill":500000000,"support_perbill":177399,"approval":50,"support":0.0177399},{"time_hours":645,"approval_perbill":500000000,"support_perbill":170800,"approval":50,"support":0.01708},{"time_hours":646,"approval_perbill":500000000,"support_perbill":164222,"approval":50,"support":0.0164222},{"time_hours":647,"approval_perbill":500000000,"support_perbill":157663,"approval":50,"support":0.0157663},{"time_hours":648,"approval_perbill":500000000,"support_perbill":151125,"approval":50,"support":0.0151125},{"time_hours":649,"approval_perbill":500000000,"support_perbill":144607,"approval":50,"support":0.0144607},{"time_hours":650,"approval_perbill":500000000,"support_perbill":138109,"approval":50,"support":0.0138109},{"time_hours":651,"approval_perbill":500000000,"support_perbill":131630,"approval":50,"support":0.013163},{"time_hours":652,"approval_perbill":500000000,"support_perbill":125171,"approval":50,"support":0.0125171},{"time_hours":653,"approval_perbill":500000000,"support_perbill":118732,"approval":50,"support":0.0118732},{"time_hours":654,"approval_perbill":500000000,"support_perbill":112313,"approval":50,"support":0.0112313},{"time_hours":655,"approval_perbill":500000000,"support_perbill":105912,"approval":50,"support":0.0105912},{"time_hours":656,"approval_perbill":500000000,"support_perbill":99532,"approval":50,"support":0.0099532},{"time_hours":657,"approval_perbill":500000000,"support_perbill":93170,"approval":50,"support":0.009317},{"time_hours":658,"approval_perbill":500000000,"support_perbill":86827,"approval":50,"support":0.0086827},{"time_hours":659,"approval_perbill":500000000,"support_perbill":80504,"approval":50,"support":0.0080504},{"time_hours":660,"approval_perbill":500000000,"support_perbill":74200,"approval":50,"support":0.00742},{"time_hours":661,"approval_perbill":500000000,"support_perbill":67914,"approval":50,"support":0.0067914},{"time_hours":662,"approval_perbill":500000000,"support_perbill":61648,"approval":50,"support":0.0061648},{"time_hours":663,"approval_perbill":500000000,"support_perbill":55400,"approval":50,"support":0.00554},{"time_hours":664,"approval_perbill":500000000,"support_perbill":49171,"approval":50,"support":0.0049171},{"time_hours":665,"approval_perbill":500000000,"support_perbill":42960,"approval":50,"support":0.004296},{"time_hours":666,"approval_perbill":500000000,"support_perbill":36768,"approval":50,"support":0.0036768},{"time_hours":667,"approval_perbill":500000000,"support_perbill":30594,"approval":50,"support":0.0030594},{"time_hours":668,"approval_perbill":500000000,"support_perbill":24439,"approval":50,"support":0.0024439},{"time_hours":669,"approval_perbill":500000000,"support_perbill":18302,"approval":50,"support":0.0018302},{"time_hours":670,"approval_perbill":500000000,"support_perbill":12183,"approval":50,"support":0.0012183},{"time_hours":671,"approval_perbill":500000000,"support_perbill":6082,"approval":50,"support":0.0006082},{"time_hours":672,"approval_perbill":500000000,"support_perbill":0,"approval":50,"support":0}]')},54638:p=>{"use strict";p.exports=JSON.parse('[{"time_hours":0,"approval_perbill":1000000000,"support_perbill":500000008,"approval":100,"support":50.0000008},{"time_hours":1,"approval_perbill":999094204,"support_perbill":474037456,"approval":99.9094204,"support":47.4037456},{"time_hours":2,"approval_perbill":998188407,"support_perbill":450571639,"approval":99.8188407,"support":45.0571639},{"time_hours":3,"approval_perbill":997282610,"support_perbill":429258925,"approval":99.728261,"support":42.9258925},{"time_hours":4,"approval_perbill":996376813,"support_perbill":409815977,"approval":99.6376813,"support":40.9815977},{"time_hours":5,"approval_perbill":995471015,"support_perbill":392007070,"approval":99.5471015,"support":39.200707},{"time_hours":6,"approval_perbill":994565218,"support_perbill":375634538,"approval":99.4565218,"support":37.5634538},{"time_hours":7,"approval_perbill":993659421,"support_perbill":360531332,"approval":99.3659421,"support":36.0531332},{"time_hours":8,"approval_perbill":992753624,"support_perbill":346555348,"approval":99.2753624,"support":34.6555348},{"time_hours":9,"approval_perbill":991847827,"support_perbill":333584923,"approval":99.1847827,"support":33.3584923},{"time_hours":10,"approval_perbill":990942030,"support_perbill":321515318,"approval":99.094203,"support":32.1515318},{"time_hours":11,"approval_perbill":990036233,"support_perbill":310255830,"approval":99.0036233,"support":31.025583},{"time_hours":12,"approval_perbill":989130436,"support_perbill":299727543,"approval":98.9130436,"support":29.9727543},{"time_hours":13,"approval_perbill":988224638,"support_perbill":289861465,"approval":98.8224638,"support":28.9861465},{"time_hours":14,"approval_perbill":987318841,"support_perbill":280597034,"approval":98.7318841,"support":28.0597034},{"time_hours":15,"approval_perbill":986413044,"support_perbill":271880839,"approval":98.6413044,"support":27.1880839},{"time_hours":16,"approval_perbill":985507247,"support_perbill":263665616,"approval":98.5507247,"support":26.3665616},{"time_hours":17,"approval_perbill":984601450,"support_perbill":255909374,"approval":98.460145,"support":25.5909374},{"time_hours":18,"approval_perbill":983695653,"support_perbill":248574704,"approval":98.3695653,"support":24.8574704},{"time_hours":19,"approval_perbill":982789856,"support_perbill":241628141,"approval":98.2789856,"support":24.1628141},{"time_hours":20,"approval_perbill":981884059,"support_perbill":235039674,"approval":98.1884059,"support":23.5039674},{"time_hours":21,"approval_perbill":980978261,"support_perbill":228782304,"approval":98.0978261,"support":22.8782304},{"time_hours":22,"approval_perbill":980072464,"support_perbill":222831693,"approval":98.0072464,"support":22.2831693},{"time_hours":23,"approval_perbill":979166667,"support_perbill":217165820,"approval":97.9166667,"support":21.716582},{"time_hours":24,"approval_perbill":978260870,"support_perbill":211764724,"approval":97.826087,"support":21.1764724},{"time_hours":25,"approval_perbill":977355074,"support_perbill":206610269,"approval":97.7355074,"support":20.6610269},{"time_hours":26,"approval_perbill":976449276,"support_perbill":201685935,"approval":97.6449276,"support":20.1685935},{"time_hours":27,"approval_perbill":975543479,"support_perbill":196976654,"approval":97.5543479,"support":19.6976654},{"time_hours":28,"approval_perbill":974637682,"support_perbill":192468636,"approval":97.4637682,"support":19.2468636},{"time_hours":29,"approval_perbill":973731885,"support_perbill":188149249,"approval":97.3731885,"support":18.8149249},{"time_hours":30,"approval_perbill":972826088,"support_perbill":184006894,"approval":97.2826088,"support":18.4006894},{"time_hours":31,"approval_perbill":971920291,"support_perbill":180030910,"approval":97.1920291,"support":18.003091},{"time_hours":32,"approval_perbill":971014494,"support_perbill":176211470,"approval":97.1014494,"support":17.621147},{"time_hours":33,"approval_perbill":970108697,"support_perbill":172539506,"approval":97.0108697,"support":17.2539506},{"time_hours":34,"approval_perbill":969202899,"support_perbill":169006637,"approval":96.9202899,"support":16.9006637},{"time_hours":35,"approval_perbill":968297102,"support_perbill":165605110,"approval":96.8297102,"support":16.560511},{"time_hours":36,"approval_perbill":967391305,"support_perbill":162327733,"approval":96.7391305,"support":16.2327733},{"time_hours":37,"approval_perbill":966485508,"support_perbill":159167831,"approval":96.6485508,"support":15.9167831},{"time_hours":38,"approval_perbill":965579711,"support_perbill":156119196,"approval":96.5579711,"support":15.6119196},{"time_hours":39,"approval_perbill":964673914,"support_perbill":153176057,"approval":96.4673914,"support":15.3176057},{"time_hours":40,"approval_perbill":963768117,"support_perbill":150333030,"approval":96.3768117,"support":15.033303},{"time_hours":41,"approval_perbill":962862320,"support_perbill":147585092,"approval":96.286232,"support":14.7585092},{"time_hours":42,"approval_perbill":961956522,"support_perbill":144927549,"approval":96.1956522,"support":14.4927549},{"time_hours":43,"approval_perbill":961050725,"support_perbill":142356016,"approval":96.1050725,"support":14.2356016},{"time_hours":44,"approval_perbill":960144928,"support_perbill":139866383,"approval":96.0144928,"support":13.9866383},{"time_hours":45,"approval_perbill":959239131,"support_perbill":137454798,"approval":95.9239131,"support":13.7454798},{"time_hours":46,"approval_perbill":958333334,"support_perbill":135117648,"approval":95.8333334,"support":13.5117648},{"time_hours":47,"approval_perbill":957427537,"support_perbill":132851537,"approval":95.7427537,"support":13.2851537},{"time_hours":48,"approval_perbill":956521740,"support_perbill":130653279,"approval":95.652174,"support":13.0653279},{"time_hours":49,"approval_perbill":955615943,"support_perbill":128519868,"approval":95.5615943,"support":12.8519868},{"time_hours":50,"approval_perbill":954710146,"support_perbill":126448478,"approval":95.4710146,"support":12.6448478},{"time_hours":51,"approval_perbill":953804348,"support_perbill":124436441,"approval":95.3804348,"support":12.4436441},{"time_hours":52,"approval_perbill":952898551,"support_perbill":122481244,"approval":95.2898551,"support":12.2481244},{"time_hours":53,"approval_perbill":951992754,"support_perbill":120580512,"approval":95.1992754,"support":12.0580512},{"time_hours":54,"approval_perbill":951086958,"support_perbill":118732000,"approval":95.1086958,"support":11.8732},{"time_hours":55,"approval_perbill":950181160,"support_perbill":116933584,"approval":95.018116,"support":11.6933584},{"time_hours":56,"approval_perbill":949275363,"support_perbill":115183257,"approval":94.9275363,"support":11.5183257},{"time_hours":57,"approval_perbill":948369566,"support_perbill":113479114,"approval":94.8369566,"support":11.3479114},{"time_hours":58,"approval_perbill":947463769,"support_perbill":111819352,"approval":94.7463769,"support":11.1819352},{"time_hours":59,"approval_perbill":946557972,"support_perbill":110202257,"approval":94.6557972,"support":11.0202257},{"time_hours":60,"approval_perbill":945652175,"support_perbill":108626208,"approval":94.5652175,"support":10.8626208},{"time_hours":61,"approval_perbill":944746378,"support_perbill":107089661,"approval":94.4746378,"support":10.7089661},{"time_hours":62,"approval_perbill":943840581,"support_perbill":105591148,"approval":94.3840581,"support":10.5591148},{"time_hours":63,"approval_perbill":942934783,"support_perbill":104129274,"approval":94.2934783,"support":10.4129274},{"time_hours":64,"approval_perbill":942028986,"support_perbill":102702712,"approval":94.2028986,"support":10.2702712},{"time_hours":65,"approval_perbill":941123189,"support_perbill":101310199,"approval":94.1123189,"support":10.1310199},{"time_hours":66,"approval_perbill":940217392,"support_perbill":99950530,"approval":94.0217392,"support":9.995053},{"time_hours":67,"approval_perbill":939311595,"support_perbill":98622555,"approval":93.9311595,"support":9.8622555},{"time_hours":68,"approval_perbill":938405798,"support_perbill":97325178,"approval":93.8405798,"support":9.7325178},{"time_hours":69,"approval_perbill":937500001,"support_perbill":96057357,"approval":93.7500001,"support":9.6057357},{"time_hours":70,"approval_perbill":936594204,"support_perbill":94818091,"approval":93.6594204,"support":9.4818091},{"time_hours":71,"approval_perbill":935688407,"support_perbill":93606426,"approval":93.5688407,"support":9.3606426},{"time_hours":72,"approval_perbill":934782609,"support_perbill":92421451,"approval":93.4782609,"support":9.2421451},{"time_hours":73,"approval_perbill":933876812,"support_perbill":91262293,"approval":93.3876812,"support":9.1262293},{"time_hours":74,"approval_perbill":932971015,"support_perbill":90128118,"approval":93.2971015,"support":9.0128118},{"time_hours":75,"approval_perbill":932065218,"support_perbill":89018126,"approval":93.2065218,"support":8.9018126},{"time_hours":76,"approval_perbill":931159421,"support_perbill":87931552,"approval":93.1159421,"support":8.7931552},{"time_hours":77,"approval_perbill":930253624,"support_perbill":86867663,"approval":93.0253624,"support":8.6867663},{"time_hours":78,"approval_perbill":929347827,"support_perbill":85825756,"approval":92.9347827,"support":8.5825756},{"time_hours":79,"approval_perbill":928442030,"support_perbill":84805157,"approval":92.844203,"support":8.4805157},{"time_hours":80,"approval_perbill":927536232,"support_perbill":83805218,"approval":92.7536232,"support":8.3805218},{"time_hours":81,"approval_perbill":926630435,"support_perbill":82825318,"approval":92.6630435,"support":8.2825318},{"time_hours":82,"approval_perbill":925724638,"support_perbill":81864862,"approval":92.5724638,"support":8.1864862},{"time_hours":83,"approval_perbill":924818842,"support_perbill":80923275,"approval":92.4818842,"support":8.0923275},{"time_hours":84,"approval_perbill":923913044,"support_perbill":80000008,"approval":92.3913044,"support":8.0000008},{"time_hours":85,"approval_perbill":923007247,"support_perbill":79094530,"approval":92.3007247,"support":7.909453},{"time_hours":86,"approval_perbill":922101450,"support_perbill":78206334,"approval":92.210145,"support":7.8206334},{"time_hours":87,"approval_perbill":921195653,"support_perbill":77334928,"approval":92.1195653,"support":7.7334928},{"time_hours":88,"approval_perbill":920289856,"support_perbill":76479840,"approval":92.0289856,"support":7.647984},{"time_hours":89,"approval_perbill":919384059,"support_perbill":75640617,"approval":91.9384059,"support":7.5640617},{"time_hours":90,"approval_perbill":918478262,"support_perbill":74816822,"approval":91.8478262,"support":7.4816822},{"time_hours":91,"approval_perbill":917572465,"support_perbill":74008032,"approval":91.7572465,"support":7.4008032},{"time_hours":92,"approval_perbill":916666668,"support_perbill":73213842,"approval":91.6666668,"support":7.3213842},{"time_hours":93,"approval_perbill":915760870,"support_perbill":72433860,"approval":91.576087,"support":7.243386},{"time_hours":94,"approval_perbill":914855073,"support_perbill":71667707,"approval":91.4855073,"support":7.1667707},{"time_hours":95,"approval_perbill":913949276,"support_perbill":70915020,"approval":91.3949276,"support":7.091502},{"time_hours":96,"approval_perbill":913043479,"support_perbill":70175446,"approval":91.3043479,"support":7.0175446},{"time_hours":97,"approval_perbill":912137682,"support_perbill":69448645,"approval":91.2137682,"support":6.9448645},{"time_hours":98,"approval_perbill":911231885,"support_perbill":68734290,"approval":91.1231885,"support":6.873429},{"time_hours":99,"approval_perbill":910326088,"support_perbill":68032064,"approval":91.0326088,"support":6.8032064},{"time_hours":100,"approval_perbill":909420291,"support_perbill":67341660,"approval":90.9420291,"support":6.734166},{"time_hours":101,"approval_perbill":908514493,"support_perbill":66662782,"approval":90.8514493,"support":6.6662782},{"time_hours":102,"approval_perbill":907608696,"support_perbill":65995144,"approval":90.7608696,"support":6.5995144},{"time_hours":103,"approval_perbill":906702899,"support_perbill":65338469,"approval":90.6702899,"support":6.5338469},{"time_hours":104,"approval_perbill":905797102,"support_perbill":64692489,"approval":90.5797102,"support":6.4692489},{"time_hours":105,"approval_perbill":904891305,"support_perbill":64056946,"approval":90.4891305,"support":6.4056946},{"time_hours":106,"approval_perbill":903985508,"support_perbill":63431588,"approval":90.3985508,"support":6.3431588},{"time_hours":107,"approval_perbill":903079711,"support_perbill":62816172,"approval":90.3079711,"support":6.2816172},{"time_hours":108,"approval_perbill":902173914,"support_perbill":62210463,"approval":90.2173914,"support":6.2210463},{"time_hours":109,"approval_perbill":901268117,"support_perbill":61614233,"approval":90.1268117,"support":6.1614233},{"time_hours":110,"approval_perbill":900362319,"support_perbill":61027262,"approval":90.0362319,"support":6.1027262},{"time_hours":111,"approval_perbill":899456522,"support_perbill":60449335,"approval":89.9456522,"support":6.0449335},{"time_hours":112,"approval_perbill":898550725,"support_perbill":59880246,"approval":89.8550725,"support":5.9880246},{"time_hours":113,"approval_perbill":897644929,"support_perbill":59319792,"approval":89.7644929,"support":5.9319792},{"time_hours":114,"approval_perbill":896739131,"support_perbill":58767778,"approval":89.6739131,"support":5.8767778},{"time_hours":115,"approval_perbill":895833334,"support_perbill":58224017,"approval":89.5833334,"support":5.8224017},{"time_hours":116,"approval_perbill":894927537,"support_perbill":57688323,"approval":89.4927537,"support":5.7688323},{"time_hours":117,"approval_perbill":894021740,"support_perbill":57160519,"approval":89.402174,"support":5.7160519},{"time_hours":118,"approval_perbill":893115943,"support_perbill":56640431,"approval":89.3115943,"support":5.6640431},{"time_hours":119,"approval_perbill":892210146,"support_perbill":56127892,"approval":89.2210146,"support":5.6127892},{"time_hours":120,"approval_perbill":891304349,"support_perbill":55622738,"approval":89.1304349,"support":5.5622738},{"time_hours":121,"approval_perbill":890398552,"support_perbill":55124812,"approval":89.0398552,"support":5.5124812},{"time_hours":122,"approval_perbill":889492754,"support_perbill":54633958,"approval":88.9492754,"support":5.4633958},{"time_hours":123,"approval_perbill":888586957,"support_perbill":54150028,"approval":88.8586957,"support":5.4150028},{"time_hours":124,"approval_perbill":887681160,"support_perbill":53672875,"approval":88.768116,"support":5.3672875},{"time_hours":125,"approval_perbill":886775363,"support_perbill":53202359,"approval":88.6775363,"support":5.3202359},{"time_hours":126,"approval_perbill":885869566,"support_perbill":52738342,"approval":88.5869566,"support":5.2738342},{"time_hours":127,"approval_perbill":884963769,"support_perbill":52280690,"approval":88.4963769,"support":5.228069},{"time_hours":128,"approval_perbill":884057972,"support_perbill":51829273,"approval":88.4057972,"support":5.1829273},{"time_hours":129,"approval_perbill":883152175,"support_perbill":51383965,"approval":88.3152175,"support":5.1383965},{"time_hours":130,"approval_perbill":882246378,"support_perbill":50944643,"approval":88.2246378,"support":5.0944643},{"time_hours":131,"approval_perbill":881340580,"support_perbill":50511186,"approval":88.134058,"support":5.0511186},{"time_hours":132,"approval_perbill":880434783,"support_perbill":50083477,"approval":88.0434783,"support":5.0083477},{"time_hours":133,"approval_perbill":879528986,"support_perbill":49661405,"approval":87.9528986,"support":4.9661405},{"time_hours":134,"approval_perbill":878623189,"support_perbill":49244856,"approval":87.8623189,"support":4.9244856},{"time_hours":135,"approval_perbill":877717392,"support_perbill":48833725,"approval":87.7717392,"support":4.8833725},{"time_hours":136,"approval_perbill":876811595,"support_perbill":48427905,"approval":87.6811595,"support":4.8427905},{"time_hours":137,"approval_perbill":875905798,"support_perbill":48027295,"approval":87.5905798,"support":4.8027295},{"time_hours":138,"approval_perbill":875000001,"support_perbill":47631795,"approval":87.5000001,"support":4.7631795},{"time_hours":139,"approval_perbill":874094203,"support_perbill":47241307,"approval":87.4094203,"support":4.7241307},{"time_hours":140,"approval_perbill":873188406,"support_perbill":46855738,"approval":87.3188406,"support":4.6855738},{"time_hours":141,"approval_perbill":872282609,"support_perbill":46474995,"approval":87.2282609,"support":4.6474995},{"time_hours":142,"approval_perbill":871376813,"support_perbill":46098987,"approval":87.1376813,"support":4.6098987},{"time_hours":143,"approval_perbill":870471015,"support_perbill":45727627,"approval":87.0471015,"support":4.5727627},{"time_hours":144,"approval_perbill":869565218,"support_perbill":45360829,"approval":86.9565218,"support":4.5360829},{"time_hours":145,"approval_perbill":868659421,"support_perbill":44998510,"approval":86.8659421,"support":4.499851},{"time_hours":146,"approval_perbill":867753624,"support_perbill":44640588,"approval":86.7753624,"support":4.4640588},{"time_hours":147,"approval_perbill":866847827,"support_perbill":44286984,"approval":86.6847827,"support":4.4286984},{"time_hours":148,"approval_perbill":865942030,"support_perbill":43937620,"approval":86.594203,"support":4.393762},{"time_hours":149,"approval_perbill":865036233,"support_perbill":43592419,"approval":86.5036233,"support":4.3592419},{"time_hours":150,"approval_perbill":864130436,"support_perbill":43251309,"approval":86.4130436,"support":4.3251309},{"time_hours":151,"approval_perbill":863224639,"support_perbill":42914217,"approval":86.3224639,"support":4.2914217},{"time_hours":152,"approval_perbill":862318841,"support_perbill":42581072,"approval":86.2318841,"support":4.2581072},{"time_hours":153,"approval_perbill":861413044,"support_perbill":42251805,"approval":86.1413044,"support":4.2251805},{"time_hours":154,"approval_perbill":860507247,"support_perbill":41926350,"approval":86.0507247,"support":4.192635},{"time_hours":155,"approval_perbill":859601450,"support_perbill":41604639,"approval":85.960145,"support":4.1604639},{"time_hours":156,"approval_perbill":858695653,"support_perbill":41286610,"approval":85.8695653,"support":4.128661},{"time_hours":157,"approval_perbill":857789856,"support_perbill":40972199,"approval":85.7789856,"support":4.0972199},{"time_hours":158,"approval_perbill":856884059,"support_perbill":40661344,"approval":85.6884059,"support":4.0661344},{"time_hours":159,"approval_perbill":855978262,"support_perbill":40353986,"approval":85.5978262,"support":4.0353986},{"time_hours":160,"approval_perbill":855072464,"support_perbill":40050066,"approval":85.5072464,"support":4.0050066},{"time_hours":161,"approval_perbill":854166667,"support_perbill":39749527,"approval":85.4166667,"support":3.9749527},{"time_hours":162,"approval_perbill":853260870,"support_perbill":39452313,"approval":85.326087,"support":3.9452313},{"time_hours":163,"approval_perbill":852355073,"support_perbill":39158368,"approval":85.2355073,"support":3.9158368},{"time_hours":164,"approval_perbill":851449276,"support_perbill":38867639,"approval":85.1449276,"support":3.8867639},{"time_hours":165,"approval_perbill":850543479,"support_perbill":38580074,"approval":85.0543479,"support":3.8580074},{"time_hours":166,"approval_perbill":849637682,"support_perbill":38295622,"approval":84.9637682,"support":3.8295622},{"time_hours":167,"approval_perbill":848731885,"support_perbill":38014231,"approval":84.8731885,"support":3.8014231},{"time_hours":168,"approval_perbill":847826087,"support_perbill":37735853,"approval":84.7826087,"support":3.7735853},{"time_hours":169,"approval_perbill":846920290,"support_perbill":37460439,"approval":84.692029,"support":3.7460439},{"time_hours":170,"approval_perbill":846014493,"support_perbill":37187943,"approval":84.6014493,"support":3.7187943},{"time_hours":171,"approval_perbill":845108697,"support_perbill":36918319,"approval":84.5108697,"support":3.6918319},{"time_hours":172,"approval_perbill":844202900,"support_perbill":36651521,"approval":84.42029,"support":3.6651521},{"time_hours":173,"approval_perbill":843297102,"support_perbill":36387505,"approval":84.3297102,"support":3.6387505},{"time_hours":174,"approval_perbill":842391305,"support_perbill":36126228,"approval":84.2391305,"support":3.6126228},{"time_hours":175,"approval_perbill":841485508,"support_perbill":35867647,"approval":84.1485508,"support":3.5867647},{"time_hours":176,"approval_perbill":840579711,"support_perbill":35611721,"approval":84.0579711,"support":3.5611721},{"time_hours":177,"approval_perbill":839673914,"support_perbill":35358409,"approval":83.9673914,"support":3.5358409},{"time_hours":178,"approval_perbill":838768117,"support_perbill":35107672,"approval":83.8768117,"support":3.5107672},{"time_hours":179,"approval_perbill":837862320,"support_perbill":34859469,"approval":83.786232,"support":3.4859469},{"time_hours":180,"approval_perbill":836956523,"support_perbill":34613764,"approval":83.6956523,"support":3.4613764},{"time_hours":181,"approval_perbill":836050725,"support_perbill":34370519,"approval":83.6050725,"support":3.4370519},{"time_hours":182,"approval_perbill":835144928,"support_perbill":34129696,"approval":83.5144928,"support":3.4129696},{"time_hours":183,"approval_perbill":834239131,"support_perbill":33891260,"approval":83.4239131,"support":3.389126},{"time_hours":184,"approval_perbill":833333334,"support_perbill":33655176,"approval":83.3333334,"support":3.3655176},{"time_hours":185,"approval_perbill":832427537,"support_perbill":33421408,"approval":83.2427537,"support":3.3421408},{"time_hours":186,"approval_perbill":831521740,"support_perbill":33189923,"approval":83.152174,"support":3.3189923},{"time_hours":187,"approval_perbill":830615943,"support_perbill":32960688,"approval":83.0615943,"support":3.2960688},{"time_hours":188,"approval_perbill":829710146,"support_perbill":32733670,"approval":82.9710146,"support":3.273367},{"time_hours":189,"approval_perbill":828804348,"support_perbill":32508837,"approval":82.8804348,"support":3.2508837},{"time_hours":190,"approval_perbill":827898551,"support_perbill":32286157,"approval":82.7898551,"support":3.2286157},{"time_hours":191,"approval_perbill":826992754,"support_perbill":32065601,"approval":82.6992754,"support":3.2065601},{"time_hours":192,"approval_perbill":826086957,"support_perbill":31847137,"approval":82.6086957,"support":3.1847137},{"time_hours":193,"approval_perbill":825181160,"support_perbill":31630736,"approval":82.518116,"support":3.1630736},{"time_hours":194,"approval_perbill":824275363,"support_perbill":31416368,"approval":82.4275363,"support":3.1416368},{"time_hours":195,"approval_perbill":823369566,"support_perbill":31204006,"approval":82.3369566,"support":3.1204006},{"time_hours":196,"approval_perbill":822463769,"support_perbill":30993622,"approval":82.2463769,"support":3.0993622},{"time_hours":197,"approval_perbill":821557972,"support_perbill":30785187,"approval":82.1557972,"support":3.0785187},{"time_hours":198,"approval_perbill":820652174,"support_perbill":30578675,"approval":82.0652174,"support":3.0578675},{"time_hours":199,"approval_perbill":819746377,"support_perbill":30374060,"approval":81.9746377,"support":3.037406},{"time_hours":200,"approval_perbill":818840580,"support_perbill":30171314,"approval":81.884058,"support":3.0171314},{"time_hours":201,"approval_perbill":817934784,"support_perbill":29970414,"approval":81.7934784,"support":2.9970414},{"time_hours":202,"approval_perbill":817028986,"support_perbill":29771334,"approval":81.7028986,"support":2.9771334},{"time_hours":203,"approval_perbill":816123189,"support_perbill":29574048,"approval":81.6123189,"support":2.9574048},{"time_hours":204,"approval_perbill":815217392,"support_perbill":29378534,"approval":81.5217392,"support":2.9378534},{"time_hours":205,"approval_perbill":814311595,"support_perbill":29184767,"approval":81.4311595,"support":2.9184767},{"time_hours":206,"approval_perbill":813405798,"support_perbill":28992723,"approval":81.3405798,"support":2.8992723},{"time_hours":207,"approval_perbill":812500001,"support_perbill":28802381,"approval":81.2500001,"support":2.8802381},{"time_hours":208,"approval_perbill":811594204,"support_perbill":28613717,"approval":81.1594204,"support":2.8613717},{"time_hours":209,"approval_perbill":810688407,"support_perbill":28426710,"approval":81.0688407,"support":2.842671},{"time_hours":210,"approval_perbill":809782609,"support_perbill":28241338,"approval":80.9782609,"support":2.8241338},{"time_hours":211,"approval_perbill":808876812,"support_perbill":28057578,"approval":80.8876812,"support":2.8057578},{"time_hours":212,"approval_perbill":807971015,"support_perbill":27875412,"approval":80.7971015,"support":2.7875412},{"time_hours":213,"approval_perbill":807065218,"support_perbill":27694817,"approval":80.7065218,"support":2.7694817},{"time_hours":214,"approval_perbill":806159421,"support_perbill":27515773,"approval":80.6159421,"support":2.7515773},{"time_hours":215,"approval_perbill":805253624,"support_perbill":27338261,"approval":80.5253624,"support":2.7338261},{"time_hours":216,"approval_perbill":804347827,"support_perbill":27162261,"approval":80.4347827,"support":2.7162261},{"time_hours":217,"approval_perbill":803442030,"support_perbill":26987754,"approval":80.344203,"support":2.6987754},{"time_hours":218,"approval_perbill":802536233,"support_perbill":26814721,"approval":80.2536233,"support":2.6814721},{"time_hours":219,"approval_perbill":801630435,"support_perbill":26643143,"approval":80.1630435,"support":2.6643143},{"time_hours":220,"approval_perbill":800724638,"support_perbill":26473002,"approval":80.0724638,"support":2.6473002},{"time_hours":221,"approval_perbill":799818841,"support_perbill":26304280,"approval":79.9818841,"support":2.630428},{"time_hours":222,"approval_perbill":798913044,"support_perbill":26136960,"approval":79.8913044,"support":2.613696},{"time_hours":223,"approval_perbill":798007247,"support_perbill":25971023,"approval":79.8007247,"support":2.5971023},{"time_hours":224,"approval_perbill":797101450,"support_perbill":25806454,"approval":79.710145,"support":2.5806454},{"time_hours":225,"approval_perbill":796195653,"support_perbill":25643234,"approval":79.6195653,"support":2.5643234},{"time_hours":226,"approval_perbill":795289856,"support_perbill":25481348,"approval":79.5289856,"support":2.5481348},{"time_hours":227,"approval_perbill":794384058,"support_perbill":25320779,"approval":79.4384058,"support":2.5320779},{"time_hours":228,"approval_perbill":793478261,"support_perbill":25161512,"approval":79.3478261,"support":2.5161512},{"time_hours":229,"approval_perbill":792572464,"support_perbill":25003530,"approval":79.2572464,"support":2.500353},{"time_hours":230,"approval_perbill":791666668,"support_perbill":24846818,"approval":79.1666668,"support":2.4846818},{"time_hours":231,"approval_perbill":790760870,"support_perbill":24691360,"approval":79.076087,"support":2.469136},{"time_hours":232,"approval_perbill":789855073,"support_perbill":24537142,"approval":78.9855073,"support":2.4537142},{"time_hours":233,"approval_perbill":788949276,"support_perbill":24384150,"approval":78.8949276,"support":2.438415},{"time_hours":234,"approval_perbill":788043479,"support_perbill":24232367,"approval":78.8043479,"support":2.4232367},{"time_hours":235,"approval_perbill":787137682,"support_perbill":24081781,"approval":78.7137682,"support":2.4081781},{"time_hours":236,"approval_perbill":786231885,"support_perbill":23932377,"approval":78.6231885,"support":2.3932377},{"time_hours":237,"approval_perbill":785326088,"support_perbill":23784141,"approval":78.5326088,"support":2.3784141},{"time_hours":238,"approval_perbill":784420291,"support_perbill":23637059,"approval":78.4420291,"support":2.3637059},{"time_hours":239,"approval_perbill":783514494,"support_perbill":23491118,"approval":78.3514494,"support":2.3491118},{"time_hours":240,"approval_perbill":782608696,"support_perbill":23346305,"approval":78.2608696,"support":2.3346305},{"time_hours":241,"approval_perbill":781702899,"support_perbill":23202608,"approval":78.1702899,"support":2.3202608},{"time_hours":242,"approval_perbill":780797102,"support_perbill":23060012,"approval":78.0797102,"support":2.3060012},{"time_hours":243,"approval_perbill":779891305,"support_perbill":22918505,"approval":77.9891305,"support":2.2918505},{"time_hours":244,"approval_perbill":778985508,"support_perbill":22778075,"approval":77.8985508,"support":2.2778075},{"time_hours":245,"approval_perbill":778079711,"support_perbill":22638710,"approval":77.8079711,"support":2.263871},{"time_hours":246,"approval_perbill":777173914,"support_perbill":22500398,"approval":77.7173914,"support":2.2500398},{"time_hours":247,"approval_perbill":776268117,"support_perbill":22363126,"approval":77.6268117,"support":2.2363126},{"time_hours":248,"approval_perbill":775362319,"support_perbill":22226884,"approval":77.5362319,"support":2.2226884},{"time_hours":249,"approval_perbill":774456522,"support_perbill":22091659,"approval":77.4456522,"support":2.2091659},{"time_hours":250,"approval_perbill":773550725,"support_perbill":21957440,"approval":77.3550725,"support":2.195744},{"time_hours":251,"approval_perbill":772644928,"support_perbill":21824216,"approval":77.2644928,"support":2.1824216},{"time_hours":252,"approval_perbill":771739131,"support_perbill":21691976,"approval":77.1739131,"support":2.1691976},{"time_hours":253,"approval_perbill":770833334,"support_perbill":21560709,"approval":77.0833334,"support":2.1560709},{"time_hours":254,"approval_perbill":769927537,"support_perbill":21430404,"approval":76.9927537,"support":2.1430404},{"time_hours":255,"approval_perbill":769021740,"support_perbill":21301052,"approval":76.902174,"support":2.1301052},{"time_hours":256,"approval_perbill":768115943,"support_perbill":21172640,"approval":76.8115943,"support":2.117264},{"time_hours":257,"approval_perbill":767210145,"support_perbill":21045160,"approval":76.7210145,"support":2.104516},{"time_hours":258,"approval_perbill":766304348,"support_perbill":20918601,"approval":76.6304348,"support":2.0918601},{"time_hours":259,"approval_perbill":765398552,"support_perbill":20792953,"approval":76.5398552,"support":2.0792953},{"time_hours":260,"approval_perbill":764492755,"support_perbill":20668207,"approval":76.4492755,"support":2.0668207},{"time_hours":261,"approval_perbill":763586957,"support_perbill":20544352,"approval":76.3586957,"support":2.0544352},{"time_hours":262,"approval_perbill":762681160,"support_perbill":20421379,"approval":76.268116,"support":2.0421379},{"time_hours":263,"approval_perbill":761775363,"support_perbill":20299280,"approval":76.1775363,"support":2.029928},{"time_hours":264,"approval_perbill":760869566,"support_perbill":20178043,"approval":76.0869566,"support":2.0178043},{"time_hours":265,"approval_perbill":759963769,"support_perbill":20057661,"approval":75.9963769,"support":2.0057661},{"time_hours":266,"approval_perbill":759057972,"support_perbill":19938125,"approval":75.9057972,"support":1.9938125},{"time_hours":267,"approval_perbill":758152175,"support_perbill":19819425,"approval":75.8152175,"support":1.9819425},{"time_hours":268,"approval_perbill":757246378,"support_perbill":19701552,"approval":75.7246378,"support":1.9701552},{"time_hours":269,"approval_perbill":756340580,"support_perbill":19584499,"approval":75.634058,"support":1.9584499},{"time_hours":270,"approval_perbill":755434783,"support_perbill":19468257,"approval":75.5434783,"support":1.9468257},{"time_hours":271,"approval_perbill":754528986,"support_perbill":19352816,"approval":75.4528986,"support":1.9352816},{"time_hours":272,"approval_perbill":753623189,"support_perbill":19238170,"approval":75.3623189,"support":1.923817},{"time_hours":273,"approval_perbill":752717392,"support_perbill":19124309,"approval":75.2717392,"support":1.9124309},{"time_hours":274,"approval_perbill":751811595,"support_perbill":19011227,"approval":75.1811595,"support":1.9011227},{"time_hours":275,"approval_perbill":750905798,"support_perbill":18898914,"approval":75.0905798,"support":1.8898914},{"time_hours":276,"approval_perbill":750000001,"support_perbill":18787363,"approval":75.0000001,"support":1.8787363},{"time_hours":277,"approval_perbill":749094204,"support_perbill":18676566,"approval":74.9094204,"support":1.8676566},{"time_hours":278,"approval_perbill":748188406,"support_perbill":18566516,"approval":74.8188406,"support":1.8566516},{"time_hours":279,"approval_perbill":747282609,"support_perbill":18457205,"approval":74.7282609,"support":1.8457205},{"time_hours":280,"approval_perbill":746376812,"support_perbill":18348625,"approval":74.6376812,"support":1.8348625},{"time_hours":281,"approval_perbill":745471015,"support_perbill":18240770,"approval":74.5471015,"support":1.824077},{"time_hours":282,"approval_perbill":744565218,"support_perbill":18133632,"approval":74.4565218,"support":1.8133632},{"time_hours":283,"approval_perbill":743659421,"support_perbill":18027204,"approval":74.3659421,"support":1.8027204},{"time_hours":284,"approval_perbill":742753624,"support_perbill":17921479,"approval":74.2753624,"support":1.7921479},{"time_hours":285,"approval_perbill":741847827,"support_perbill":17816451,"approval":74.1847827,"support":1.7816451},{"time_hours":286,"approval_perbill":740942029,"support_perbill":17712111,"approval":74.0942029,"support":1.7712111},{"time_hours":287,"approval_perbill":740036232,"support_perbill":17608453,"approval":74.0036232,"support":1.7608453},{"time_hours":288,"approval_perbill":739130435,"support_perbill":17505472,"approval":73.9130435,"support":1.7505472},{"time_hours":289,"approval_perbill":738224639,"support_perbill":17403159,"approval":73.8224639,"support":1.7403159},{"time_hours":290,"approval_perbill":737318841,"support_perbill":17301510,"approval":73.7318841,"support":1.730151},{"time_hours":291,"approval_perbill":736413044,"support_perbill":17200516,"approval":73.6413044,"support":1.7200516},{"time_hours":292,"approval_perbill":735507247,"support_perbill":17100172,"approval":73.5507247,"support":1.7100172},{"time_hours":293,"approval_perbill":734601450,"support_perbill":17000472,"approval":73.460145,"support":1.7000472},{"time_hours":294,"approval_perbill":733695653,"support_perbill":16901410,"approval":73.3695653,"support":1.690141},{"time_hours":295,"approval_perbill":732789856,"support_perbill":16802979,"approval":73.2789856,"support":1.6802979},{"time_hours":296,"approval_perbill":731884059,"support_perbill":16705173,"approval":73.1884059,"support":1.6705173},{"time_hours":297,"approval_perbill":730978262,"support_perbill":16607986,"approval":73.0978262,"support":1.6607986},{"time_hours":298,"approval_perbill":730072465,"support_perbill":16511414,"approval":73.0072465,"support":1.6511414},{"time_hours":299,"approval_perbill":729166667,"support_perbill":16415448,"approval":72.9166667,"support":1.6415448},{"time_hours":300,"approval_perbill":728260870,"support_perbill":16320085,"approval":72.826087,"support":1.6320085},{"time_hours":301,"approval_perbill":727355073,"support_perbill":16225319,"approval":72.7355073,"support":1.6225319},{"time_hours":302,"approval_perbill":726449276,"support_perbill":16131143,"approval":72.6449276,"support":1.6131143},{"time_hours":303,"approval_perbill":725543479,"support_perbill":16037552,"approval":72.5543479,"support":1.6037552},{"time_hours":304,"approval_perbill":724637682,"support_perbill":15944542,"approval":72.4637682,"support":1.5944542},{"time_hours":305,"approval_perbill":723731885,"support_perbill":15852106,"approval":72.3731885,"support":1.5852106},{"time_hours":306,"approval_perbill":722826088,"support_perbill":15760239,"approval":72.2826088,"support":1.5760239},{"time_hours":307,"approval_perbill":721920290,"support_perbill":15668936,"approval":72.192029,"support":1.5668936},{"time_hours":308,"approval_perbill":721014493,"support_perbill":15578192,"approval":72.1014493,"support":1.5578192},{"time_hours":309,"approval_perbill":720108696,"support_perbill":15488001,"approval":72.0108696,"support":1.5488001},{"time_hours":310,"approval_perbill":719202899,"support_perbill":15398359,"approval":71.9202899,"support":1.5398359},{"time_hours":311,"approval_perbill":718297102,"support_perbill":15309261,"approval":71.8297102,"support":1.5309261},{"time_hours":312,"approval_perbill":717391305,"support_perbill":15220701,"approval":71.7391305,"support":1.5220701},{"time_hours":313,"approval_perbill":716485508,"support_perbill":15132675,"approval":71.6485508,"support":1.5132675},{"time_hours":314,"approval_perbill":715579711,"support_perbill":15045179,"approval":71.5579711,"support":1.5045179},{"time_hours":315,"approval_perbill":714673913,"support_perbill":14958206,"approval":71.4673913,"support":1.4958206},{"time_hours":316,"approval_perbill":713768116,"support_perbill":14871753,"approval":71.3768116,"support":1.4871753},{"time_hours":317,"approval_perbill":712862319,"support_perbill":14785815,"approval":71.2862319,"support":1.4785815},{"time_hours":318,"approval_perbill":711956523,"support_perbill":14700387,"approval":71.1956523,"support":1.4700387},{"time_hours":319,"approval_perbill":711050726,"support_perbill":14615465,"approval":71.1050726,"support":1.4615465},{"time_hours":320,"approval_perbill":710144928,"support_perbill":14531045,"approval":71.0144928,"support":1.4531045},{"time_hours":321,"approval_perbill":709239131,"support_perbill":14447121,"approval":70.9239131,"support":1.4447121},{"time_hours":322,"approval_perbill":708333334,"support_perbill":14363690,"approval":70.8333334,"support":1.436369},{"time_hours":323,"approval_perbill":707427537,"support_perbill":14280747,"approval":70.7427537,"support":1.4280747},{"time_hours":324,"approval_perbill":706521740,"support_perbill":14198287,"approval":70.652174,"support":1.4198287},{"time_hours":325,"approval_perbill":705615943,"support_perbill":14116308,"approval":70.5615943,"support":1.4116308},{"time_hours":326,"approval_perbill":704710146,"support_perbill":14034804,"approval":70.4710146,"support":1.4034804},{"time_hours":327,"approval_perbill":703804349,"support_perbill":13953771,"approval":70.3804349,"support":1.3953771},{"time_hours":328,"approval_perbill":702898551,"support_perbill":13873206,"approval":70.2898551,"support":1.3873206},{"time_hours":329,"approval_perbill":701992754,"support_perbill":13793104,"approval":70.1992754,"support":1.3793104},{"time_hours":330,"approval_perbill":701086957,"support_perbill":13713462,"approval":70.1086957,"support":1.3713462},{"time_hours":331,"approval_perbill":700181160,"support_perbill":13634275,"approval":70.018116,"support":1.3634275},{"time_hours":332,"approval_perbill":699275363,"support_perbill":13555539,"approval":69.9275363,"support":1.3555539},{"time_hours":333,"approval_perbill":698369566,"support_perbill":13477251,"approval":69.8369566,"support":1.3477251},{"time_hours":334,"approval_perbill":697463769,"support_perbill":13399406,"approval":69.7463769,"support":1.3399406},{"time_hours":335,"approval_perbill":696557972,"support_perbill":13322002,"approval":69.6557972,"support":1.3322002},{"time_hours":336,"approval_perbill":695652174,"support_perbill":13245034,"approval":69.5652174,"support":1.3245034},{"time_hours":337,"approval_perbill":694746377,"support_perbill":13168499,"approval":69.4746377,"support":1.3168499},{"time_hours":338,"approval_perbill":693840580,"support_perbill":13092392,"approval":69.384058,"support":1.3092392},{"time_hours":339,"approval_perbill":692934783,"support_perbill":13016711,"approval":69.2934783,"support":1.3016711},{"time_hours":340,"approval_perbill":692028986,"support_perbill":12941452,"approval":69.2028986,"support":1.2941452},{"time_hours":341,"approval_perbill":691123189,"support_perbill":12866612,"approval":69.1123189,"support":1.2866612},{"time_hours":342,"approval_perbill":690217392,"support_perbill":12792186,"approval":69.0217392,"support":1.2792186},{"time_hours":343,"approval_perbill":689311595,"support_perbill":12718172,"approval":68.9311595,"support":1.2718172},{"time_hours":344,"approval_perbill":688405798,"support_perbill":12644565,"approval":68.8405798,"support":1.2644565},{"time_hours":345,"approval_perbill":687500000,"support_perbill":12571363,"approval":68.75,"support":1.2571363},{"time_hours":346,"approval_perbill":686594203,"support_perbill":12498563,"approval":68.6594203,"support":1.2498563},{"time_hours":347,"approval_perbill":685688407,"support_perbill":12426161,"approval":68.5688407,"support":1.2426161},{"time_hours":348,"approval_perbill":684782610,"support_perbill":12354153,"approval":68.478261,"support":1.2354153},{"time_hours":349,"approval_perbill":683876812,"support_perbill":12282537,"approval":68.3876812,"support":1.2282537},{"time_hours":350,"approval_perbill":682971015,"support_perbill":12211309,"approval":68.2971015,"support":1.2211309},{"time_hours":351,"approval_perbill":682065218,"support_perbill":12140467,"approval":68.2065218,"support":1.2140467},{"time_hours":352,"approval_perbill":681159421,"support_perbill":12070007,"approval":68.1159421,"support":1.2070007},{"time_hours":353,"approval_perbill":680253624,"support_perbill":11999925,"approval":68.0253624,"support":1.1999925},{"time_hours":354,"approval_perbill":679347827,"support_perbill":11930220,"approval":67.9347827,"support":1.193022},{"time_hours":355,"approval_perbill":678442030,"support_perbill":11860888,"approval":67.844203,"support":1.1860888},{"time_hours":356,"approval_perbill":677536233,"support_perbill":11791925,"approval":67.7536233,"support":1.1791925},{"time_hours":357,"approval_perbill":676630435,"support_perbill":11723330,"approval":67.6630435,"support":1.172333},{"time_hours":358,"approval_perbill":675724638,"support_perbill":11655099,"approval":67.5724638,"support":1.1655099},{"time_hours":359,"approval_perbill":674818841,"support_perbill":11587229,"approval":67.4818841,"support":1.1587229},{"time_hours":360,"approval_perbill":673913044,"support_perbill":11519717,"approval":67.3913044,"support":1.1519717},{"time_hours":361,"approval_perbill":673007247,"support_perbill":11452561,"approval":67.3007247,"support":1.1452561},{"time_hours":362,"approval_perbill":672101450,"support_perbill":11385757,"approval":67.210145,"support":1.1385757},{"time_hours":363,"approval_perbill":671195653,"support_perbill":11319304,"approval":67.1195653,"support":1.1319304},{"time_hours":364,"approval_perbill":670289856,"support_perbill":11253198,"approval":67.0289856,"support":1.1253198},{"time_hours":365,"approval_perbill":669384059,"support_perbill":11187436,"approval":66.9384059,"support":1.1187436},{"time_hours":366,"approval_perbill":668478261,"support_perbill":11122016,"approval":66.8478261,"support":1.1122016},{"time_hours":367,"approval_perbill":667572464,"support_perbill":11056935,"approval":66.7572464,"support":1.1056935},{"time_hours":368,"approval_perbill":666666667,"support_perbill":10992190,"approval":66.6666667,"support":1.099219},{"time_hours":369,"approval_perbill":665760870,"support_perbill":10927780,"approval":66.576087,"support":1.092778},{"time_hours":370,"approval_perbill":664855073,"support_perbill":10863701,"approval":66.4855073,"support":1.0863701},{"time_hours":371,"approval_perbill":663949276,"support_perbill":10799950,"approval":66.3949276,"support":1.079995},{"time_hours":372,"approval_perbill":663043479,"support_perbill":10736526,"approval":66.3043479,"support":1.0736526},{"time_hours":373,"approval_perbill":662137682,"support_perbill":10673426,"approval":66.2137682,"support":1.0673426},{"time_hours":374,"approval_perbill":661231884,"support_perbill":10610647,"approval":66.1231884,"support":1.0610647},{"time_hours":375,"approval_perbill":660326087,"support_perbill":10548187,"approval":66.0326087,"support":1.0548187},{"time_hours":376,"approval_perbill":659420290,"support_perbill":10486043,"approval":65.942029,"support":1.0486043},{"time_hours":377,"approval_perbill":658514494,"support_perbill":10424213,"approval":65.8514494,"support":1.0424213},{"time_hours":378,"approval_perbill":657608696,"support_perbill":10362695,"approval":65.7608696,"support":1.0362695},{"time_hours":379,"approval_perbill":656702899,"support_perbill":10301486,"approval":65.6702899,"support":1.0301486},{"time_hours":380,"approval_perbill":655797102,"support_perbill":10240584,"approval":65.5797102,"support":1.0240584},{"time_hours":381,"approval_perbill":654891305,"support_perbill":10179987,"approval":65.4891305,"support":1.0179987},{"time_hours":382,"approval_perbill":653985508,"support_perbill":10119692,"approval":65.3985508,"support":1.0119692},{"time_hours":383,"approval_perbill":653079711,"support_perbill":10059697,"approval":65.3079711,"support":1.0059697},{"time_hours":384,"approval_perbill":652173914,"support_perbill":10000000,"approval":65.2173914,"support":1},{"time_hours":385,"approval_perbill":651268117,"support_perbill":9940599,"approval":65.1268117,"support":0.9940599},{"time_hours":386,"approval_perbill":650362320,"support_perbill":9881492,"approval":65.036232,"support":0.9881492},{"time_hours":387,"approval_perbill":649456522,"support_perbill":9822675,"approval":64.9456522,"support":0.9822675},{"time_hours":388,"approval_perbill":648550725,"support_perbill":9764148,"approval":64.8550725,"support":0.9764148},{"time_hours":389,"approval_perbill":647644928,"support_perbill":9705908,"approval":64.7644928,"support":0.9705908},{"time_hours":390,"approval_perbill":646739131,"support_perbill":9647953,"approval":64.6739131,"support":0.9647953},{"time_hours":391,"approval_perbill":645833334,"support_perbill":9590280,"approval":64.5833334,"support":0.959028},{"time_hours":392,"approval_perbill":644927537,"support_perbill":9532889,"approval":64.4927537,"support":0.9532889},{"time_hours":393,"approval_perbill":644021740,"support_perbill":9475776,"approval":64.402174,"support":0.9475776},{"time_hours":394,"approval_perbill":643115943,"support_perbill":9418940,"approval":64.3115943,"support":0.941894},{"time_hours":395,"approval_perbill":642210145,"support_perbill":9362378,"approval":64.2210145,"support":0.9362378},{"time_hours":396,"approval_perbill":641304348,"support_perbill":9306090,"approval":64.1304348,"support":0.930609},{"time_hours":397,"approval_perbill":640398551,"support_perbill":9250072,"approval":64.0398551,"support":0.9250072},{"time_hours":398,"approval_perbill":639492754,"support_perbill":9194323,"approval":63.9492754,"support":0.9194323},{"time_hours":399,"approval_perbill":638586957,"support_perbill":9138840,"approval":63.8586957,"support":0.913884},{"time_hours":400,"approval_perbill":637681160,"support_perbill":9083623,"approval":63.768116,"support":0.9083623},{"time_hours":401,"approval_perbill":636775363,"support_perbill":9028669,"approval":63.6775363,"support":0.9028669},{"time_hours":402,"approval_perbill":635869566,"support_perbill":8973976,"approval":63.5869566,"support":0.8973976},{"time_hours":403,"approval_perbill":634963769,"support_perbill":8919542,"approval":63.4963769,"support":0.8919542},{"time_hours":404,"approval_perbill":634057971,"support_perbill":8865366,"approval":63.4057971,"support":0.8865366},{"time_hours":405,"approval_perbill":633152174,"support_perbill":8811445,"approval":63.3152174,"support":0.8811445},{"time_hours":406,"approval_perbill":632246378,"support_perbill":8757779,"approval":63.2246378,"support":0.8757779},{"time_hours":407,"approval_perbill":631340581,"support_perbill":8704364,"approval":63.1340581,"support":0.8704364},{"time_hours":408,"approval_perbill":630434783,"support_perbill":8651200,"approval":63.0434783,"support":0.86512},{"time_hours":409,"approval_perbill":629528986,"support_perbill":8598284,"approval":62.9528986,"support":0.8598284},{"time_hours":410,"approval_perbill":628623189,"support_perbill":8545615,"approval":62.8623189,"support":0.8545615},{"time_hours":411,"approval_perbill":627717392,"support_perbill":8493191,"approval":62.7717392,"support":0.8493191},{"time_hours":412,"approval_perbill":626811595,"support_perbill":8441011,"approval":62.6811595,"support":0.8441011},{"time_hours":413,"approval_perbill":625905798,"support_perbill":8389072,"approval":62.5905798,"support":0.8389072},{"time_hours":414,"approval_perbill":625000001,"support_perbill":8337373,"approval":62.5000001,"support":0.8337373},{"time_hours":415,"approval_perbill":624094204,"support_perbill":8285913,"approval":62.4094204,"support":0.8285913},{"time_hours":416,"approval_perbill":623188406,"support_perbill":8234689,"approval":62.3188406,"support":0.8234689},{"time_hours":417,"approval_perbill":622282609,"support_perbill":8183700,"approval":62.2282609,"support":0.81837},{"time_hours":418,"approval_perbill":621376812,"support_perbill":8132945,"approval":62.1376812,"support":0.8132945},{"time_hours":419,"approval_perbill":620471015,"support_perbill":8082422,"approval":62.0471015,"support":0.8082422},{"time_hours":420,"approval_perbill":619565218,"support_perbill":8032129,"approval":61.9565218,"support":0.8032129},{"time_hours":421,"approval_perbill":618659421,"support_perbill":7982064,"approval":61.8659421,"support":0.7982064},{"time_hours":422,"approval_perbill":617753624,"support_perbill":7932227,"approval":61.7753624,"support":0.7932227},{"time_hours":423,"approval_perbill":616847827,"support_perbill":7882616,"approval":61.6847827,"support":0.7882616},{"time_hours":424,"approval_perbill":615942030,"support_perbill":7833228,"approval":61.594203,"support":0.7833228},{"time_hours":425,"approval_perbill":615036232,"support_perbill":7784063,"approval":61.5036232,"support":0.7784063},{"time_hours":426,"approval_perbill":614130435,"support_perbill":7735120,"approval":61.4130435,"support":0.773512},{"time_hours":427,"approval_perbill":613224638,"support_perbill":7686395,"approval":61.3224638,"support":0.7686395},{"time_hours":428,"approval_perbill":612318841,"support_perbill":7637889,"approval":61.2318841,"support":0.7637889},{"time_hours":429,"approval_perbill":611413044,"support_perbill":7589600,"approval":61.1413044,"support":0.75896},{"time_hours":430,"approval_perbill":610507247,"support_perbill":7541525,"approval":61.0507247,"support":0.7541525},{"time_hours":431,"approval_perbill":609601450,"support_perbill":7493665,"approval":60.960145,"support":0.7493665},{"time_hours":432,"approval_perbill":608695653,"support_perbill":7446017,"approval":60.8695653,"support":0.7446017},{"time_hours":433,"approval_perbill":607789855,"support_perbill":7398579,"approval":60.7789855,"support":0.7398579},{"time_hours":434,"approval_perbill":606884058,"support_perbill":7351351,"approval":60.6884058,"support":0.7351351},{"time_hours":435,"approval_perbill":605978262,"support_perbill":7304332,"approval":60.5978262,"support":0.7304332},{"time_hours":436,"approval_perbill":605072465,"support_perbill":7257519,"approval":60.5072465,"support":0.7257519},{"time_hours":437,"approval_perbill":604166667,"support_perbill":7210912,"approval":60.4166667,"support":0.7210912},{"time_hours":438,"approval_perbill":603260870,"support_perbill":7164508,"approval":60.326087,"support":0.7164508},{"time_hours":439,"approval_perbill":602355073,"support_perbill":7118308,"approval":60.2355073,"support":0.7118308},{"time_hours":440,"approval_perbill":601449276,"support_perbill":7072308,"approval":60.1449276,"support":0.7072308},{"time_hours":441,"approval_perbill":600543479,"support_perbill":7026509,"approval":60.0543479,"support":0.7026509},{"time_hours":442,"approval_perbill":599637682,"support_perbill":6980909,"approval":59.9637682,"support":0.6980909},{"time_hours":443,"approval_perbill":598731885,"support_perbill":6935506,"approval":59.8731885,"support":0.6935506},{"time_hours":444,"approval_perbill":597826088,"support_perbill":6890299,"approval":59.7826088,"support":0.6890299},{"time_hours":445,"approval_perbill":596920291,"support_perbill":6845288,"approval":59.6920291,"support":0.6845288},{"time_hours":446,"approval_perbill":596014493,"support_perbill":6800469,"approval":59.6014493,"support":0.6800469},{"time_hours":447,"approval_perbill":595108696,"support_perbill":6755844,"approval":59.5108696,"support":0.6755844},{"time_hours":448,"approval_perbill":594202899,"support_perbill":6711409,"approval":59.4202899,"support":0.6711409},{"time_hours":449,"approval_perbill":593297102,"support_perbill":6667165,"approval":59.3297102,"support":0.6667165},{"time_hours":450,"approval_perbill":592391305,"support_perbill":6623109,"approval":59.2391305,"support":0.6623109},{"time_hours":451,"approval_perbill":591485508,"support_perbill":6579241,"approval":59.1485508,"support":0.6579241},{"time_hours":452,"approval_perbill":590579711,"support_perbill":6535559,"approval":59.0579711,"support":0.6535559},{"time_hours":453,"approval_perbill":589673914,"support_perbill":6492063,"approval":58.9673914,"support":0.6492063},{"time_hours":454,"approval_perbill":588768116,"support_perbill":6448750,"approval":58.8768116,"support":0.644875},{"time_hours":455,"approval_perbill":587862319,"support_perbill":6405620,"approval":58.7862319,"support":0.640562},{"time_hours":456,"approval_perbill":586956522,"support_perbill":6362672,"approval":58.6956522,"support":0.6362672},{"time_hours":457,"approval_perbill":586050725,"support_perbill":6319905,"approval":58.6050725,"support":0.6319905},{"time_hours":458,"approval_perbill":585144928,"support_perbill":6277317,"approval":58.5144928,"support":0.6277317},{"time_hours":459,"approval_perbill":584239131,"support_perbill":6234907,"approval":58.4239131,"support":0.6234907},{"time_hours":460,"approval_perbill":583333334,"support_perbill":6192674,"approval":58.3333334,"support":0.6192674},{"time_hours":461,"approval_perbill":582427537,"support_perbill":6150617,"approval":58.2427537,"support":0.6150617},{"time_hours":462,"approval_perbill":581521739,"support_perbill":6108735,"approval":58.1521739,"support":0.6108735},{"time_hours":463,"approval_perbill":580615942,"support_perbill":6067028,"approval":58.0615942,"support":0.6067028},{"time_hours":464,"approval_perbill":579710145,"support_perbill":6025492,"approval":57.9710145,"support":0.6025492},{"time_hours":465,"approval_perbill":578804349,"support_perbill":5984129,"approval":57.8804349,"support":0.5984129},{"time_hours":466,"approval_perbill":577898552,"support_perbill":5942936,"approval":57.7898552,"support":0.5942936},{"time_hours":467,"approval_perbill":576992754,"support_perbill":5901913,"approval":57.6992754,"support":0.5901913},{"time_hours":468,"approval_perbill":576086957,"support_perbill":5861058,"approval":57.6086957,"support":0.5861058},{"time_hours":469,"approval_perbill":575181160,"support_perbill":5820371,"approval":57.518116,"support":0.5820371},{"time_hours":470,"approval_perbill":574275363,"support_perbill":5779851,"approval":57.4275363,"support":0.5779851},{"time_hours":471,"approval_perbill":573369566,"support_perbill":5739495,"approval":57.3369566,"support":0.5739495},{"time_hours":472,"approval_perbill":572463769,"support_perbill":5699305,"approval":57.2463769,"support":0.5699305},{"time_hours":473,"approval_perbill":571557972,"support_perbill":5659277,"approval":57.1557972,"support":0.5659277},{"time_hours":474,"approval_perbill":570652175,"support_perbill":5619412,"approval":57.0652175,"support":0.5619412},{"time_hours":475,"approval_perbill":569746377,"support_perbill":5579709,"approval":56.9746377,"support":0.5579709},{"time_hours":476,"approval_perbill":568840580,"support_perbill":5540166,"approval":56.884058,"support":0.5540166},{"time_hours":477,"approval_perbill":567934783,"support_perbill":5500783,"approval":56.7934783,"support":0.5500783},{"time_hours":478,"approval_perbill":567028986,"support_perbill":5461558,"approval":56.7028986,"support":0.5461558},{"time_hours":479,"approval_perbill":566123189,"support_perbill":5422491,"approval":56.6123189,"support":0.5422491},{"time_hours":480,"approval_perbill":565217392,"support_perbill":5383580,"approval":56.5217392,"support":0.538358},{"time_hours":481,"approval_perbill":564311595,"support_perbill":5344825,"approval":56.4311595,"support":0.5344825},{"time_hours":482,"approval_perbill":563405798,"support_perbill":5306225,"approval":56.3405798,"support":0.5306225},{"time_hours":483,"approval_perbill":562500000,"support_perbill":5267779,"approval":56.25,"support":0.5267779},{"time_hours":484,"approval_perbill":561594203,"support_perbill":5229485,"approval":56.1594203,"support":0.5229485},{"time_hours":485,"approval_perbill":560688406,"support_perbill":5191344,"approval":56.0688406,"support":0.5191344},{"time_hours":486,"approval_perbill":559782609,"support_perbill":5153354,"approval":55.9782609,"support":0.5153354},{"time_hours":487,"approval_perbill":558876812,"support_perbill":5115514,"approval":55.8876812,"support":0.5115514},{"time_hours":488,"approval_perbill":557971015,"support_perbill":5077823,"approval":55.7971015,"support":0.5077823},{"time_hours":489,"approval_perbill":557065218,"support_perbill":5040281,"approval":55.7065218,"support":0.5040281},{"time_hours":490,"approval_perbill":556159421,"support_perbill":5002886,"approval":55.6159421,"support":0.5002886},{"time_hours":491,"approval_perbill":555253624,"support_perbill":4965638,"approval":55.5253624,"support":0.4965638},{"time_hours":492,"approval_perbill":554347826,"support_perbill":4928536,"approval":55.4347826,"support":0.4928536},{"time_hours":493,"approval_perbill":553442029,"support_perbill":4891579,"approval":55.3442029,"support":0.4891579},{"time_hours":494,"approval_perbill":552536233,"support_perbill":4854766,"approval":55.2536233,"support":0.4854766},{"time_hours":495,"approval_perbill":551630436,"support_perbill":4818096,"approval":55.1630436,"support":0.4818096},{"time_hours":496,"approval_perbill":550724638,"support_perbill":4781569,"approval":55.0724638,"support":0.4781569},{"time_hours":497,"approval_perbill":549818841,"support_perbill":4745183,"approval":54.9818841,"support":0.4745183},{"time_hours":498,"approval_perbill":548913044,"support_perbill":4708939,"approval":54.8913044,"support":0.4708939},{"time_hours":499,"approval_perbill":548007247,"support_perbill":4672834,"approval":54.8007247,"support":0.4672834},{"time_hours":500,"approval_perbill":547101450,"support_perbill":4636868,"approval":54.710145,"support":0.4636868},{"time_hours":501,"approval_perbill":546195653,"support_perbill":4601041,"approval":54.6195653,"support":0.4601041},{"time_hours":502,"approval_perbill":545289856,"support_perbill":4565351,"approval":54.5289856,"support":0.4565351},{"time_hours":503,"approval_perbill":544384059,"support_perbill":4529799,"approval":54.4384059,"support":0.4529799},{"time_hours":504,"approval_perbill":543478261,"support_perbill":4494382,"approval":54.3478261,"support":0.4494382},{"time_hours":505,"approval_perbill":542572464,"support_perbill":4459100,"approval":54.2572464,"support":0.44591},{"time_hours":506,"approval_perbill":541666667,"support_perbill":4423953,"approval":54.1666667,"support":0.4423953},{"time_hours":507,"approval_perbill":540760870,"support_perbill":4388940,"approval":54.076087,"support":0.438894},{"time_hours":508,"approval_perbill":539855073,"support_perbill":4354059,"approval":53.9855073,"support":0.4354059},{"time_hours":509,"approval_perbill":538949276,"support_perbill":4319311,"approval":53.8949276,"support":0.4319311},{"time_hours":510,"approval_perbill":538043479,"support_perbill":4284694,"approval":53.8043479,"support":0.4284694},{"time_hours":511,"approval_perbill":537137682,"support_perbill":4250208,"approval":53.7137682,"support":0.4250208},{"time_hours":512,"approval_perbill":536231885,"support_perbill":4215851,"approval":53.6231885,"support":0.4215851},{"time_hours":513,"approval_perbill":535326087,"support_perbill":4181624,"approval":53.5326087,"support":0.4181624},{"time_hours":514,"approval_perbill":534420290,"support_perbill":4147526,"approval":53.442029,"support":0.4147526},{"time_hours":515,"approval_perbill":533514493,"support_perbill":4113555,"approval":53.3514493,"support":0.4113555},{"time_hours":516,"approval_perbill":532608696,"support_perbill":4079711,"approval":53.2608696,"support":0.4079711},{"time_hours":517,"approval_perbill":531702899,"support_perbill":4045994,"approval":53.1702899,"support":0.4045994},{"time_hours":518,"approval_perbill":530797102,"support_perbill":4012402,"approval":53.0797102,"support":0.4012402},{"time_hours":519,"approval_perbill":529891305,"support_perbill":3978935,"approval":52.9891305,"support":0.3978935},{"time_hours":520,"approval_perbill":528985508,"support_perbill":3945592,"approval":52.8985508,"support":0.3945592},{"time_hours":521,"approval_perbill":528079710,"support_perbill":3912373,"approval":52.807971,"support":0.3912373},{"time_hours":522,"approval_perbill":527173913,"support_perbill":3879277,"approval":52.7173913,"support":0.3879277},{"time_hours":523,"approval_perbill":526268117,"support_perbill":3846302,"approval":52.6268117,"support":0.3846302},{"time_hours":524,"approval_perbill":525362320,"support_perbill":3813450,"approval":52.536232,"support":0.381345},{"time_hours":525,"approval_perbill":524456522,"support_perbill":3780718,"approval":52.4456522,"support":0.3780718},{"time_hours":526,"approval_perbill":523550725,"support_perbill":3748106,"approval":52.3550725,"support":0.3748106},{"time_hours":527,"approval_perbill":522644928,"support_perbill":3715614,"approval":52.2644928,"support":0.3715614},{"time_hours":528,"approval_perbill":521739131,"support_perbill":3683241,"approval":52.1739131,"support":0.3683241},{"time_hours":529,"approval_perbill":520833334,"support_perbill":3650986,"approval":52.0833334,"support":0.3650986},{"time_hours":530,"approval_perbill":519927537,"support_perbill":3618848,"approval":51.9927537,"support":0.3618848},{"time_hours":531,"approval_perbill":519021740,"support_perbill":3586828,"approval":51.902174,"support":0.3586828},{"time_hours":532,"approval_perbill":518115943,"support_perbill":3554923,"approval":51.8115943,"support":0.3554923},{"time_hours":533,"approval_perbill":517210146,"support_perbill":3523135,"approval":51.7210146,"support":0.3523135},{"time_hours":534,"approval_perbill":516304348,"support_perbill":3491461,"approval":51.6304348,"support":0.3491461},{"time_hours":535,"approval_perbill":515398551,"support_perbill":3459901,"approval":51.5398551,"support":0.3459901},{"time_hours":536,"approval_perbill":514492754,"support_perbill":3428456,"approval":51.4492754,"support":0.3428456},{"time_hours":537,"approval_perbill":513586957,"support_perbill":3397123,"approval":51.3586957,"support":0.3397123},{"time_hours":538,"approval_perbill":512681160,"support_perbill":3365904,"approval":51.268116,"support":0.3365904},{"time_hours":539,"approval_perbill":511775363,"support_perbill":3334796,"approval":51.1775363,"support":0.3334796},{"time_hours":540,"approval_perbill":510869566,"support_perbill":3303799,"approval":51.0869566,"support":0.3303799},{"time_hours":541,"approval_perbill":509963769,"support_perbill":3272913,"approval":50.9963769,"support":0.3272913},{"time_hours":542,"approval_perbill":509057971,"support_perbill":3242137,"approval":50.9057971,"support":0.3242137},{"time_hours":543,"approval_perbill":508152174,"support_perbill":3211471,"approval":50.8152174,"support":0.3211471},{"time_hours":544,"approval_perbill":507246377,"support_perbill":3180914,"approval":50.7246377,"support":0.3180914},{"time_hours":545,"approval_perbill":506340580,"support_perbill":3150465,"approval":50.634058,"support":0.3150465},{"time_hours":546,"approval_perbill":505434783,"support_perbill":3120124,"approval":50.5434783,"support":0.3120124},{"time_hours":547,"approval_perbill":504528986,"support_perbill":3089891,"approval":50.4528986,"support":0.3089891},{"time_hours":548,"approval_perbill":503623189,"support_perbill":3059764,"approval":50.3623189,"support":0.3059764},{"time_hours":549,"approval_perbill":502717392,"support_perbill":3029743,"approval":50.2717392,"support":0.3029743},{"time_hours":550,"approval_perbill":501811595,"support_perbill":2999827,"approval":50.1811595,"support":0.2999827},{"time_hours":551,"approval_perbill":500905797,"support_perbill":2970017,"approval":50.0905797,"support":0.2970017},{"time_hours":552,"approval_perbill":500000000,"support_perbill":2940311,"approval":50,"support":0.2940311},{"time_hours":553,"approval_perbill":500000000,"support_perbill":2910709,"approval":50,"support":0.2910709},{"time_hours":554,"approval_perbill":500000000,"support_perbill":2881211,"approval":50,"support":0.2881211},{"time_hours":555,"approval_perbill":500000000,"support_perbill":2851815,"approval":50,"support":0.2851815},{"time_hours":556,"approval_perbill":500000000,"support_perbill":2822521,"approval":50,"support":0.2822521},{"time_hours":557,"approval_perbill":500000000,"support_perbill":2793330,"approval":50,"support":0.279333},{"time_hours":558,"approval_perbill":500000000,"support_perbill":2764239,"approval":50,"support":0.2764239},{"time_hours":559,"approval_perbill":500000000,"support_perbill":2735249,"approval":50,"support":0.2735249},{"time_hours":560,"approval_perbill":500000000,"support_perbill":2706360,"approval":50,"support":0.270636},{"time_hours":561,"approval_perbill":500000000,"support_perbill":2677569,"approval":50,"support":0.2677569},{"time_hours":562,"approval_perbill":500000000,"support_perbill":2648879,"approval":50,"support":0.2648879},{"time_hours":563,"approval_perbill":500000000,"support_perbill":2620286,"approval":50,"support":0.2620286},{"time_hours":564,"approval_perbill":500000000,"support_perbill":2591792,"approval":50,"support":0.2591792},{"time_hours":565,"approval_perbill":500000000,"support_perbill":2563396,"approval":50,"support":0.2563396},{"time_hours":566,"approval_perbill":500000000,"support_perbill":2535096,"approval":50,"support":0.2535096},{"time_hours":567,"approval_perbill":500000000,"support_perbill":2506893,"approval":50,"support":0.2506893},{"time_hours":568,"approval_perbill":500000000,"support_perbill":2478787,"approval":50,"support":0.2478787},{"time_hours":569,"approval_perbill":500000000,"support_perbill":2450776,"approval":50,"support":0.2450776},{"time_hours":570,"approval_perbill":500000000,"support_perbill":2422860,"approval":50,"support":0.242286},{"time_hours":571,"approval_perbill":500000000,"support_perbill":2395039,"approval":50,"support":0.2395039},{"time_hours":572,"approval_perbill":500000000,"support_perbill":2367312,"approval":50,"support":0.2367312},{"time_hours":573,"approval_perbill":500000000,"support_perbill":2339678,"approval":50,"support":0.2339678},{"time_hours":574,"approval_perbill":500000000,"support_perbill":2312138,"approval":50,"support":0.2312138},{"time_hours":575,"approval_perbill":500000000,"support_perbill":2284691,"approval":50,"support":0.2284691},{"time_hours":576,"approval_perbill":500000000,"support_perbill":2257336,"approval":50,"support":0.2257336},{"time_hours":577,"approval_perbill":500000000,"support_perbill":2230073,"approval":50,"support":0.2230073},{"time_hours":578,"approval_perbill":500000000,"support_perbill":2202901,"approval":50,"support":0.2202901},{"time_hours":579,"approval_perbill":500000000,"support_perbill":2175820,"approval":50,"support":0.217582},{"time_hours":580,"approval_perbill":500000000,"support_perbill":2148829,"approval":50,"support":0.2148829},{"time_hours":581,"approval_perbill":500000000,"support_perbill":2121929,"approval":50,"support":0.2121929},{"time_hours":582,"approval_perbill":500000000,"support_perbill":2095118,"approval":50,"support":0.2095118},{"time_hours":583,"approval_perbill":500000000,"support_perbill":2068396,"approval":50,"support":0.2068396},{"time_hours":584,"approval_perbill":500000000,"support_perbill":2041763,"approval":50,"support":0.2041763},{"time_hours":585,"approval_perbill":500000000,"support_perbill":2015218,"approval":50,"support":0.2015218},{"time_hours":586,"approval_perbill":500000000,"support_perbill":1988761,"approval":50,"support":0.1988761},{"time_hours":587,"approval_perbill":500000000,"support_perbill":1962391,"approval":50,"support":0.1962391},{"time_hours":588,"approval_perbill":500000000,"support_perbill":1936108,"approval":50,"support":0.1936108},{"time_hours":589,"approval_perbill":500000000,"support_perbill":1909911,"approval":50,"support":0.1909911},{"time_hours":590,"approval_perbill":500000000,"support_perbill":1883801,"approval":50,"support":0.1883801},{"time_hours":591,"approval_perbill":500000000,"support_perbill":1857776,"approval":50,"support":0.1857776},{"time_hours":592,"approval_perbill":500000000,"support_perbill":1831837,"approval":50,"support":0.1831837},{"time_hours":593,"approval_perbill":500000000,"support_perbill":1805982,"approval":50,"support":0.1805982},{"time_hours":594,"approval_perbill":500000000,"support_perbill":1780212,"approval":50,"support":0.1780212},{"time_hours":595,"approval_perbill":500000000,"support_perbill":1754525,"approval":50,"support":0.1754525},{"time_hours":596,"approval_perbill":500000000,"support_perbill":1728923,"approval":50,"support":0.1728923},{"time_hours":597,"approval_perbill":500000000,"support_perbill":1703403,"approval":50,"support":0.1703403},{"time_hours":598,"approval_perbill":500000000,"support_perbill":1677966,"approval":50,"support":0.1677966},{"time_hours":599,"approval_perbill":500000000,"support_perbill":1652611,"approval":50,"support":0.1652611},{"time_hours":600,"approval_perbill":500000000,"support_perbill":1627339,"approval":50,"support":0.1627339},{"time_hours":601,"approval_perbill":500000000,"support_perbill":1602148,"approval":50,"support":0.1602148},{"time_hours":602,"approval_perbill":500000000,"support_perbill":1577038,"approval":50,"support":0.1577038},{"time_hours":603,"approval_perbill":500000000,"support_perbill":1552009,"approval":50,"support":0.1552009},{"time_hours":604,"approval_perbill":500000000,"support_perbill":1527060,"approval":50,"support":0.152706},{"time_hours":605,"approval_perbill":500000000,"support_perbill":1502191,"approval":50,"support":0.1502191},{"time_hours":606,"approval_perbill":500000000,"support_perbill":1477402,"approval":50,"support":0.1477402},{"time_hours":607,"approval_perbill":500000000,"support_perbill":1452692,"approval":50,"support":0.1452692},{"time_hours":608,"approval_perbill":500000000,"support_perbill":1428061,"approval":50,"support":0.1428061},{"time_hours":609,"approval_perbill":500000000,"support_perbill":1403508,"approval":50,"support":0.1403508},{"time_hours":610,"approval_perbill":500000000,"support_perbill":1379034,"approval":50,"support":0.1379034},{"time_hours":611,"approval_perbill":500000000,"support_perbill":1354637,"approval":50,"support":0.1354637},{"time_hours":612,"approval_perbill":500000000,"support_perbill":1330317,"approval":50,"support":0.1330317},{"time_hours":613,"approval_perbill":500000000,"support_perbill":1306075,"approval":50,"support":0.1306075},{"time_hours":614,"approval_perbill":500000000,"support_perbill":1281909,"approval":50,"support":0.1281909},{"time_hours":615,"approval_perbill":500000000,"support_perbill":1257819,"approval":50,"support":0.1257819},{"time_hours":616,"approval_perbill":500000000,"support_perbill":1233806,"approval":50,"support":0.1233806},{"time_hours":617,"approval_perbill":500000000,"support_perbill":1209868,"approval":50,"support":0.1209868},{"time_hours":618,"approval_perbill":500000000,"support_perbill":1186005,"approval":50,"support":0.1186005},{"time_hours":619,"approval_perbill":500000000,"support_perbill":1162216,"approval":50,"support":0.1162216},{"time_hours":620,"approval_perbill":500000000,"support_perbill":1138503,"approval":50,"support":0.1138503},{"time_hours":621,"approval_perbill":500000000,"support_perbill":1114863,"approval":50,"support":0.1114863},{"time_hours":622,"approval_perbill":500000000,"support_perbill":1091297,"approval":50,"support":0.1091297},{"time_hours":623,"approval_perbill":500000000,"support_perbill":1067805,"approval":50,"support":0.1067805},{"time_hours":624,"approval_perbill":500000000,"support_perbill":1044386,"approval":50,"support":0.1044386},{"time_hours":625,"approval_perbill":500000000,"support_perbill":1021039,"approval":50,"support":0.1021039},{"time_hours":626,"approval_perbill":500000000,"support_perbill":997765,"approval":50,"support":0.0997765},{"time_hours":627,"approval_perbill":500000000,"support_perbill":974563,"approval":50,"support":0.0974563},{"time_hours":628,"approval_perbill":500000000,"support_perbill":951433,"approval":50,"support":0.0951433},{"time_hours":629,"approval_perbill":500000000,"support_perbill":928374,"approval":50,"support":0.0928374},{"time_hours":630,"approval_perbill":500000000,"support_perbill":905386,"approval":50,"support":0.0905386},{"time_hours":631,"approval_perbill":500000000,"support_perbill":882469,"approval":50,"support":0.0882469},{"time_hours":632,"approval_perbill":500000000,"support_perbill":859623,"approval":50,"support":0.0859623},{"time_hours":633,"approval_perbill":500000000,"support_perbill":836846,"approval":50,"support":0.0836846},{"time_hours":634,"approval_perbill":500000000,"support_perbill":814140,"approval":50,"support":0.081414},{"time_hours":635,"approval_perbill":500000000,"support_perbill":791502,"approval":50,"support":0.0791502},{"time_hours":636,"approval_perbill":500000000,"support_perbill":768934,"approval":50,"support":0.0768934},{"time_hours":637,"approval_perbill":500000000,"support_perbill":746435,"approval":50,"support":0.0746435},{"time_hours":638,"approval_perbill":500000000,"support_perbill":724004,"approval":50,"support":0.0724004},{"time_hours":639,"approval_perbill":500000000,"support_perbill":701642,"approval":50,"support":0.0701642},{"time_hours":640,"approval_perbill":500000000,"support_perbill":679347,"approval":50,"support":0.0679347},{"time_hours":641,"approval_perbill":500000000,"support_perbill":657120,"approval":50,"support":0.065712},{"time_hours":642,"approval_perbill":500000000,"support_perbill":634960,"approval":50,"support":0.063496},{"time_hours":643,"approval_perbill":500000000,"support_perbill":612867,"approval":50,"support":0.0612867},{"time_hours":644,"approval_perbill":500000000,"support_perbill":590841,"approval":50,"support":0.0590841},{"time_hours":645,"approval_perbill":500000000,"support_perbill":568881,"approval":50,"support":0.0568881},{"time_hours":646,"approval_perbill":500000000,"support_perbill":546988,"approval":50,"support":0.0546988},{"time_hours":647,"approval_perbill":500000000,"support_perbill":525160,"approval":50,"support":0.052516},{"time_hours":648,"approval_perbill":500000000,"support_perbill":503397,"approval":50,"support":0.0503397},{"time_hours":649,"approval_perbill":500000000,"support_perbill":481700,"approval":50,"support":0.04817},{"time_hours":650,"approval_perbill":500000000,"support_perbill":460067,"approval":50,"support":0.0460067},{"time_hours":651,"approval_perbill":500000000,"support_perbill":438500,"approval":50,"support":0.04385},{"time_hours":652,"approval_perbill":500000000,"support_perbill":416996,"approval":50,"support":0.0416996},{"time_hours":653,"approval_perbill":500000000,"support_perbill":395557,"approval":50,"support":0.0395557},{"time_hours":654,"approval_perbill":500000000,"support_perbill":374181,"approval":50,"support":0.0374181},{"time_hours":655,"approval_perbill":500000000,"support_perbill":352868,"approval":50,"support":0.0352868},{"time_hours":656,"approval_perbill":500000000,"support_perbill":331619,"approval":50,"support":0.0331619},{"time_hours":657,"approval_perbill":500000000,"support_perbill":310433,"approval":50,"support":0.0310433},{"time_hours":658,"approval_perbill":500000000,"support_perbill":289309,"approval":50,"support":0.0289309},{"time_hours":659,"approval_perbill":500000000,"support_perbill":268248,"approval":50,"support":0.0268248},{"time_hours":660,"approval_perbill":500000000,"support_perbill":247249,"approval":50,"support":0.0247249},{"time_hours":661,"approval_perbill":500000000,"support_perbill":226311,"approval":50,"support":0.0226311},{"time_hours":662,"approval_perbill":500000000,"support_perbill":205435,"approval":50,"support":0.0205435},{"time_hours":663,"approval_perbill":500000000,"support_perbill":184620,"approval":50,"support":0.018462},{"time_hours":664,"approval_perbill":500000000,"support_perbill":163867,"approval":50,"support":0.0163867},{"time_hours":665,"approval_perbill":500000000,"support_perbill":143173,"approval":50,"support":0.0143173},{"time_hours":666,"approval_perbill":500000000,"support_perbill":122541,"approval":50,"support":0.0122541},{"time_hours":667,"approval_perbill":500000000,"support_perbill":101968,"approval":50,"support":0.0101968},{"time_hours":668,"approval_perbill":500000000,"support_perbill":81456,"approval":50,"support":0.0081456},{"time_hours":669,"approval_perbill":500000000,"support_perbill":61003,"approval":50,"support":0.0061003},{"time_hours":670,"approval_perbill":500000000,"support_perbill":40609,"approval":50,"support":0.0040609},{"time_hours":671,"approval_perbill":500000000,"support_perbill":20275,"approval":50,"support":0.0020275},{"time_hours":672,"approval_perbill":500000000,"support_perbill":0,"approval":50,"support":0}]')},24616:p=>{"use strict";p.exports=JSON.parse('[{"time_hours":0,"approval_perbill":1000000000,"support_perbill":500000026,"approval":100,"support":50.0000026},{"time_hours":1,"approval_perbill":998774510,"support_perbill":455636061,"approval":99.877451,"support":45.5636061},{"time_hours":2,"approval_perbill":997549020,"support_perbill":418401359,"approval":99.754902,"support":41.8401359},{"time_hours":3,"approval_perbill":996323530,"support_perbill":386705228,"approval":99.632353,"support":38.6705228},{"time_hours":4,"approval_perbill":995098040,"support_perbill":359397443,"approval":99.509804,"support":35.9397443},{"time_hours":5,"approval_perbill":993872550,"support_perbill":335625639,"approval":99.387255,"support":33.5625639},{"time_hours":6,"approval_perbill":992647060,"support_perbill":314744813,"approval":99.264706,"support":31.4744813},{"time_hours":7,"approval_perbill":991421570,"support_perbill":296257808,"approval":99.142157,"support":29.6257808},{"time_hours":8,"approval_perbill":990196080,"support_perbill":279775293,"approval":99.019608,"support":27.9775293},{"time_hours":9,"approval_perbill":988970589,"support_perbill":264988013,"approval":98.8970589,"support":26.4988013},{"time_hours":10,"approval_perbill":987745099,"support_perbill":251647242,"approval":98.7745099,"support":25.1647242},{"time_hours":11,"approval_perbill":986519609,"support_perbill":239550622,"approval":98.6519609,"support":23.9550622},{"time_hours":12,"approval_perbill":985294119,"support_perbill":228531862,"approval":98.5294119,"support":22.8531862},{"time_hours":13,"approval_perbill":984068628,"support_perbill":218453039,"approval":98.4068628,"support":21.8453039},{"time_hours":14,"approval_perbill":982843138,"support_perbill":209198815,"approval":98.2843138,"support":20.9198815},{"time_hours":15,"approval_perbill":981617648,"support_perbill":200671963,"approval":98.1617648,"support":20.0671963},{"time_hours":16,"approval_perbill":980392158,"support_perbill":192789972,"approval":98.0392158,"support":19.2789972},{"time_hours":17,"approval_perbill":979166667,"support_perbill":185482348,"approval":97.9166667,"support":18.5482348},{"time_hours":18,"approval_perbill":977941177,"support_perbill":178688524,"approval":97.7941177,"support":17.8688524},{"time_hours":19,"approval_perbill":976715687,"support_perbill":172356151,"approval":97.6715687,"support":17.2356151},{"time_hours":20,"approval_perbill":975490197,"support_perbill":166439756,"approval":97.5490197,"support":16.6439756},{"time_hours":21,"approval_perbill":974264706,"support_perbill":160899652,"approval":97.4264706,"support":16.0899652},{"time_hours":22,"approval_perbill":973039216,"support_perbill":155701053,"approval":97.3039216,"support":15.5701053},{"time_hours":23,"approval_perbill":971813726,"support_perbill":150813323,"approval":97.1813726,"support":15.0813323},{"time_hours":24,"approval_perbill":970588236,"support_perbill":146209386,"approval":97.0588236,"support":14.6209386},{"time_hours":25,"approval_perbill":969362746,"support_perbill":141865225,"approval":96.9362746,"support":14.1865225},{"time_hours":26,"approval_perbill":968137256,"support_perbill":137759452,"approval":96.8137256,"support":13.7759452},{"time_hours":27,"approval_perbill":966911766,"support_perbill":133872975,"approval":96.6911766,"support":13.3872975},{"time_hours":28,"approval_perbill":965686276,"support_perbill":130188679,"approval":96.5686276,"support":13.0188679},{"time_hours":29,"approval_perbill":964460786,"support_perbill":126691186,"approval":96.4460786,"support":12.6691186},{"time_hours":30,"approval_perbill":963235295,"support_perbill":123366639,"approval":96.3235295,"support":12.3366639},{"time_hours":31,"approval_perbill":962009805,"support_perbill":120202524,"approval":96.2009805,"support":12.0202524},{"time_hours":32,"approval_perbill":960784315,"support_perbill":117187499,"approval":96.0784315,"support":11.7187499},{"time_hours":33,"approval_perbill":959558825,"support_perbill":114311269,"approval":95.9558825,"support":11.4311269},{"time_hours":34,"approval_perbill":958333334,"support_perbill":111564465,"approval":95.8333334,"support":11.1564465},{"time_hours":35,"approval_perbill":957107844,"support_perbill":108938546,"approval":95.7107844,"support":10.8938546},{"time_hours":36,"approval_perbill":955882354,"support_perbill":106425701,"approval":95.5882354,"support":10.6425701},{"time_hours":37,"approval_perbill":954656864,"support_perbill":104018782,"approval":95.4656864,"support":10.4018782},{"time_hours":38,"approval_perbill":953431373,"support_perbill":101711228,"approval":95.3431373,"support":10.1711228},{"time_hours":39,"approval_perbill":952205883,"support_perbill":99497012,"approval":95.2205883,"support":9.9497012},{"time_hours":40,"approval_perbill":950980393,"support_perbill":97370582,"approval":95.0980393,"support":9.7370582},{"time_hours":41,"approval_perbill":949754903,"support_perbill":95326819,"approval":94.9754903,"support":9.5326819},{"time_hours":42,"approval_perbill":948529412,"support_perbill":93360994,"approval":94.8529412,"support":9.3360994},{"time_hours":43,"approval_perbill":947303922,"support_perbill":91468733,"approval":94.7303922,"support":9.1468733},{"time_hours":44,"approval_perbill":946078432,"support_perbill":89645982,"approval":94.6078432,"support":8.9645982},{"time_hours":45,"approval_perbill":944852942,"support_perbill":87888981,"approval":94.4852942,"support":8.7888981},{"time_hours":46,"approval_perbill":943627452,"support_perbill":86194234,"approval":94.3627452,"support":8.6194234},{"time_hours":47,"approval_perbill":942401961,"support_perbill":84558490,"approval":94.2401961,"support":8.455849},{"time_hours":48,"approval_perbill":941176471,"support_perbill":82978722,"approval":94.1176471,"support":8.2978722},{"time_hours":49,"approval_perbill":939950981,"support_perbill":81452103,"approval":93.9950981,"support":8.1452103},{"time_hours":50,"approval_perbill":938725491,"support_perbill":79975997,"approval":93.8725491,"support":7.9975997},{"time_hours":51,"approval_perbill":937500001,"support_perbill":78547936,"approval":93.7500001,"support":7.8547936},{"time_hours":52,"approval_perbill":936274511,"support_perbill":77165614,"approval":93.6274511,"support":7.7165614},{"time_hours":53,"approval_perbill":935049021,"support_perbill":75826867,"approval":93.5049021,"support":7.5826867},{"time_hours":54,"approval_perbill":933823531,"support_perbill":74529666,"approval":93.3823531,"support":7.4529666},{"time_hours":55,"approval_perbill":932598040,"support_perbill":73272106,"approval":93.259804,"support":7.3272106},{"time_hours":56,"approval_perbill":931372550,"support_perbill":72052400,"approval":93.137255,"support":7.20524},{"time_hours":57,"approval_perbill":930147060,"support_perbill":70868862,"approval":93.014706,"support":7.0868862},{"time_hours":58,"approval_perbill":928921570,"support_perbill":69719908,"approval":92.892157,"support":6.9719908},{"time_hours":59,"approval_perbill":927696079,"support_perbill":68604042,"approval":92.7696079,"support":6.8604042},{"time_hours":60,"approval_perbill":926470589,"support_perbill":67519857,"approval":92.6470589,"support":6.7519857},{"time_hours":61,"approval_perbill":925245099,"support_perbill":66466022,"approval":92.5245099,"support":6.6466022},{"time_hours":62,"approval_perbill":924019609,"support_perbill":65441280,"approval":92.4019609,"support":6.544128},{"time_hours":63,"approval_perbill":922794118,"support_perbill":64444443,"approval":92.2794118,"support":6.4444443},{"time_hours":64,"approval_perbill":921568628,"support_perbill":63474386,"approval":92.1568628,"support":6.3474386},{"time_hours":65,"approval_perbill":920343138,"support_perbill":62530044,"approval":92.0343138,"support":6.2530044},{"time_hours":66,"approval_perbill":919117648,"support_perbill":61610409,"approval":91.9117648,"support":6.1610409},{"time_hours":67,"approval_perbill":917892158,"support_perbill":60714523,"approval":91.7892158,"support":6.0714523},{"time_hours":68,"approval_perbill":916666667,"support_perbill":59841478,"approval":91.6666667,"support":5.9841478},{"time_hours":69,"approval_perbill":915441177,"support_perbill":58990411,"approval":91.5441177,"support":5.8990411},{"time_hours":70,"approval_perbill":914215687,"support_perbill":58160504,"approval":91.4215687,"support":5.8160504},{"time_hours":71,"approval_perbill":912990197,"support_perbill":57350975,"approval":91.2990197,"support":5.7350975},{"time_hours":72,"approval_perbill":911764706,"support_perbill":56561084,"approval":91.1764706,"support":5.6561084},{"time_hours":73,"approval_perbill":910539216,"support_perbill":55790126,"approval":91.0539216,"support":5.5790126},{"time_hours":74,"approval_perbill":909313726,"support_perbill":55037426,"approval":90.9313726,"support":5.5037426},{"time_hours":75,"approval_perbill":908088236,"support_perbill":54302345,"approval":90.8088236,"support":5.4302345},{"time_hours":76,"approval_perbill":906862746,"support_perbill":53584271,"approval":90.6862746,"support":5.3584271},{"time_hours":77,"approval_perbill":905637256,"support_perbill":52882620,"approval":90.5637256,"support":5.288262},{"time_hours":78,"approval_perbill":904411766,"support_perbill":52196835,"approval":90.4411766,"support":5.2196835},{"time_hours":79,"approval_perbill":903186276,"support_perbill":51526385,"approval":90.3186276,"support":5.1526385},{"time_hours":80,"approval_perbill":901960785,"support_perbill":50870759,"approval":90.1960785,"support":5.0870759},{"time_hours":81,"approval_perbill":900735295,"support_perbill":50229473,"approval":90.0735295,"support":5.0229473},{"time_hours":82,"approval_perbill":899509805,"support_perbill":49602061,"approval":89.9509805,"support":4.9602061},{"time_hours":83,"approval_perbill":898284315,"support_perbill":48988077,"approval":89.8284315,"support":4.8988077},{"time_hours":84,"approval_perbill":897058824,"support_perbill":48387095,"approval":89.7058824,"support":4.8387095},{"time_hours":85,"approval_perbill":895833334,"support_perbill":47798707,"approval":89.5833334,"support":4.7798707},{"time_hours":86,"approval_perbill":894607844,"support_perbill":47222519,"approval":89.4607844,"support":4.7222519},{"time_hours":87,"approval_perbill":893382354,"support_perbill":46658158,"approval":89.3382354,"support":4.6658158},{"time_hours":88,"approval_perbill":892156864,"support_perbill":46105262,"approval":89.2156864,"support":4.6105262},{"time_hours":89,"approval_perbill":890931373,"support_perbill":45563485,"approval":89.0931373,"support":4.5563485},{"time_hours":90,"approval_perbill":889705883,"support_perbill":45032496,"approval":88.9705883,"support":4.5032496},{"time_hours":91,"approval_perbill":888480393,"support_perbill":44511976,"approval":88.8480393,"support":4.4511976},{"time_hours":92,"approval_perbill":887254903,"support_perbill":44001617,"approval":88.7254903,"support":4.4001617},{"time_hours":93,"approval_perbill":886029412,"support_perbill":43501126,"approval":88.6029412,"support":4.3501126},{"time_hours":94,"approval_perbill":884803922,"support_perbill":43010218,"approval":88.4803922,"support":4.3010218},{"time_hours":95,"approval_perbill":883578432,"support_perbill":42528621,"approval":88.3578432,"support":4.2528621},{"time_hours":96,"approval_perbill":882352942,"support_perbill":42056074,"approval":88.2352942,"support":4.2056074},{"time_hours":97,"approval_perbill":881127452,"support_perbill":41592321,"approval":88.1127452,"support":4.1592321},{"time_hours":98,"approval_perbill":879901962,"support_perbill":41137122,"approval":87.9901962,"support":4.1137122},{"time_hours":99,"approval_perbill":878676472,"support_perbill":40690242,"approval":87.8676472,"support":4.0690242},{"time_hours":100,"approval_perbill":877450982,"support_perbill":40251453,"approval":87.7450982,"support":4.0251453},{"time_hours":101,"approval_perbill":876225491,"support_perbill":39820539,"approval":87.6225491,"support":3.9820539},{"time_hours":102,"approval_perbill":875000001,"support_perbill":39397289,"approval":87.5000001,"support":3.9397289},{"time_hours":103,"approval_perbill":873774511,"support_perbill":38981501,"approval":87.3774511,"support":3.8981501},{"time_hours":104,"approval_perbill":872549021,"support_perbill":38572980,"approval":87.2549021,"support":3.857298},{"time_hours":105,"approval_perbill":871323530,"support_perbill":38171535,"approval":87.132353,"support":3.8171535},{"time_hours":106,"approval_perbill":870098040,"support_perbill":37776985,"approval":87.009804,"support":3.7776985},{"time_hours":107,"approval_perbill":868872550,"support_perbill":37389155,"approval":86.887255,"support":3.7389155},{"time_hours":108,"approval_perbill":867647060,"support_perbill":37007873,"approval":86.764706,"support":3.7007873},{"time_hours":109,"approval_perbill":866421570,"support_perbill":36632975,"approval":86.642157,"support":3.6632975},{"time_hours":110,"approval_perbill":865196079,"support_perbill":36264302,"approval":86.5196079,"support":3.6264302},{"time_hours":111,"approval_perbill":863970589,"support_perbill":35901701,"approval":86.3970589,"support":3.5901701},{"time_hours":112,"approval_perbill":862745099,"support_perbill":35545023,"approval":86.2745099,"support":3.5545023},{"time_hours":113,"approval_perbill":861519609,"support_perbill":35194123,"approval":86.1519609,"support":3.5194123},{"time_hours":114,"approval_perbill":860294118,"support_perbill":34848862,"approval":86.0294118,"support":3.4848862},{"time_hours":115,"approval_perbill":859068628,"support_perbill":34509106,"approval":85.9068628,"support":3.4509106},{"time_hours":116,"approval_perbill":857843138,"support_perbill":34174724,"approval":85.7843138,"support":3.4174724},{"time_hours":117,"approval_perbill":856617648,"support_perbill":33845590,"approval":85.6617648,"support":3.384559},{"time_hours":118,"approval_perbill":855392157,"support_perbill":33521580,"approval":85.5392157,"support":3.352158},{"time_hours":119,"approval_perbill":854166667,"support_perbill":33202577,"approval":85.4166667,"support":3.3202577},{"time_hours":120,"approval_perbill":852941177,"support_perbill":32888464,"approval":85.2941177,"support":3.2888464},{"time_hours":121,"approval_perbill":851715687,"support_perbill":32579131,"approval":85.1715687,"support":3.2579131},{"time_hours":122,"approval_perbill":850490197,"support_perbill":32274469,"approval":85.0490197,"support":3.2274469},{"time_hours":123,"approval_perbill":849264707,"support_perbill":31974373,"approval":84.9264707,"support":3.1974373},{"time_hours":124,"approval_perbill":848039217,"support_perbill":31678741,"approval":84.8039217,"support":3.1678741},{"time_hours":125,"approval_perbill":846813727,"support_perbill":31387475,"approval":84.6813727,"support":3.1387475},{"time_hours":126,"approval_perbill":845588236,"support_perbill":31100477,"approval":84.5588236,"support":3.1100477},{"time_hours":127,"approval_perbill":844362746,"support_perbill":30817656,"approval":84.4362746,"support":3.0817656},{"time_hours":128,"approval_perbill":843137256,"support_perbill":30538921,"approval":84.3137256,"support":3.0538921},{"time_hours":129,"approval_perbill":841911766,"support_perbill":30264184,"approval":84.1911766,"support":3.0264184},{"time_hours":130,"approval_perbill":840686276,"support_perbill":29993358,"approval":84.0686276,"support":2.9993358},{"time_hours":131,"approval_perbill":839460785,"support_perbill":29726363,"approval":83.9460785,"support":2.9726363},{"time_hours":132,"approval_perbill":838235295,"support_perbill":29463116,"approval":83.8235295,"support":2.9463116},{"time_hours":133,"approval_perbill":837009805,"support_perbill":29203539,"approval":83.7009805,"support":2.9203539},{"time_hours":134,"approval_perbill":835784315,"support_perbill":28947556,"approval":83.5784315,"support":2.8947556},{"time_hours":135,"approval_perbill":834558824,"support_perbill":28695094,"approval":83.4558824,"support":2.8695094},{"time_hours":136,"approval_perbill":833333334,"support_perbill":28446079,"approval":83.3333334,"support":2.8446079},{"time_hours":137,"approval_perbill":832107844,"support_perbill":28200442,"approval":83.2107844,"support":2.8200442},{"time_hours":138,"approval_perbill":830882354,"support_perbill":27958114,"approval":83.0882354,"support":2.7958114},{"time_hours":139,"approval_perbill":829656863,"support_perbill":27719030,"approval":82.9656863,"support":2.771903},{"time_hours":140,"approval_perbill":828431373,"support_perbill":27483123,"approval":82.8431373,"support":2.7483123},{"time_hours":141,"approval_perbill":827205883,"support_perbill":27250333,"approval":82.7205883,"support":2.7250333},{"time_hours":142,"approval_perbill":825980393,"support_perbill":27020596,"approval":82.5980393,"support":2.7020596},{"time_hours":143,"approval_perbill":824754902,"support_perbill":26793853,"approval":82.4754902,"support":2.6793853},{"time_hours":144,"approval_perbill":823529412,"support_perbill":26570047,"approval":82.3529412,"support":2.6570047},{"time_hours":145,"approval_perbill":822303922,"support_perbill":26349121,"approval":82.2303922,"support":2.6349121},{"time_hours":146,"approval_perbill":821078432,"support_perbill":26131019,"approval":82.1078432,"support":2.6131019},{"time_hours":147,"approval_perbill":819852942,"support_perbill":25915687,"approval":81.9852942,"support":2.5915687},{"time_hours":148,"approval_perbill":818627452,"support_perbill":25703073,"approval":81.8627452,"support":2.5703073},{"time_hours":149,"approval_perbill":817401962,"support_perbill":25493126,"approval":81.7401962,"support":2.5493126},{"time_hours":150,"approval_perbill":816176472,"support_perbill":25285796,"approval":81.6176472,"support":2.5285796},{"time_hours":151,"approval_perbill":814950982,"support_perbill":25081035,"approval":81.4950982,"support":2.5081035},{"time_hours":152,"approval_perbill":813725491,"support_perbill":24878795,"approval":81.3725491,"support":2.4878795},{"time_hours":153,"approval_perbill":812500001,"support_perbill":24679029,"approval":81.2500001,"support":2.4679029},{"time_hours":154,"approval_perbill":811274511,"support_perbill":24481693,"approval":81.1274511,"support":2.4481693},{"time_hours":155,"approval_perbill":810049021,"support_perbill":24286742,"approval":81.0049021,"support":2.4286742},{"time_hours":156,"approval_perbill":808823530,"support_perbill":24094134,"approval":80.882353,"support":2.4094134},{"time_hours":157,"approval_perbill":807598040,"support_perbill":23903827,"approval":80.759804,"support":2.3903827},{"time_hours":158,"approval_perbill":806372550,"support_perbill":23715779,"approval":80.637255,"support":2.3715779},{"time_hours":159,"approval_perbill":805147060,"support_perbill":23529951,"approval":80.514706,"support":2.3529951},{"time_hours":160,"approval_perbill":803921569,"support_perbill":23346303,"approval":80.3921569,"support":2.3346303},{"time_hours":161,"approval_perbill":802696079,"support_perbill":23164797,"approval":80.2696079,"support":2.3164797},{"time_hours":162,"approval_perbill":801470589,"support_perbill":22985397,"approval":80.1470589,"support":2.2985397},{"time_hours":163,"approval_perbill":800245099,"support_perbill":22808065,"approval":80.0245099,"support":2.2808065},{"time_hours":164,"approval_perbill":799019608,"support_perbill":22632766,"approval":79.9019608,"support":2.2632766},{"time_hours":165,"approval_perbill":797794118,"support_perbill":22459466,"approval":79.7794118,"support":2.2459466},{"time_hours":166,"approval_perbill":796568628,"support_perbill":22288130,"approval":79.6568628,"support":2.228813},{"time_hours":167,"approval_perbill":795343138,"support_perbill":22118725,"approval":79.5343138,"support":2.2118725},{"time_hours":168,"approval_perbill":794117648,"support_perbill":21951219,"approval":79.4117648,"support":2.1951219},{"time_hours":169,"approval_perbill":792892158,"support_perbill":21785579,"approval":79.2892158,"support":2.1785579},{"time_hours":170,"approval_perbill":791666668,"support_perbill":21621776,"approval":79.1666668,"support":2.1621776},{"time_hours":171,"approval_perbill":790441178,"support_perbill":21459778,"approval":79.0441178,"support":2.1459778},{"time_hours":172,"approval_perbill":789215688,"support_perbill":21299556,"approval":78.9215688,"support":2.1299556},{"time_hours":173,"approval_perbill":787990197,"support_perbill":21141081,"approval":78.7990197,"support":2.1141081},{"time_hours":174,"approval_perbill":786764707,"support_perbill":20984324,"approval":78.6764707,"support":2.0984324},{"time_hours":175,"approval_perbill":785539217,"support_perbill":20829258,"approval":78.5539217,"support":2.0829258},{"time_hours":176,"approval_perbill":784313727,"support_perbill":20675855,"approval":78.4313727,"support":2.0675855},{"time_hours":177,"approval_perbill":783088236,"support_perbill":20524089,"approval":78.3088236,"support":2.0524089},{"time_hours":178,"approval_perbill":781862746,"support_perbill":20373934,"approval":78.1862746,"support":2.0373934},{"time_hours":179,"approval_perbill":780637256,"support_perbill":20225364,"approval":78.0637256,"support":2.0225364},{"time_hours":180,"approval_perbill":779411766,"support_perbill":20078354,"approval":77.9411766,"support":2.0078354},{"time_hours":181,"approval_perbill":778186275,"support_perbill":19932880,"approval":77.8186275,"support":1.993288},{"time_hours":182,"approval_perbill":776960785,"support_perbill":19788917,"approval":77.6960785,"support":1.9788917},{"time_hours":183,"approval_perbill":775735295,"support_perbill":19646444,"approval":77.5735295,"support":1.9646444},{"time_hours":184,"approval_perbill":774509805,"support_perbill":19505435,"approval":77.4509805,"support":1.9505435},{"time_hours":185,"approval_perbill":773284314,"support_perbill":19365870,"approval":77.3284314,"support":1.936587},{"time_hours":186,"approval_perbill":772058824,"support_perbill":19227725,"approval":77.2058824,"support":1.9227725},{"time_hours":187,"approval_perbill":770833334,"support_perbill":19090980,"approval":77.0833334,"support":1.909098},{"time_hours":188,"approval_perbill":769607844,"support_perbill":18955613,"approval":76.9607844,"support":1.8955613},{"time_hours":189,"approval_perbill":768382353,"support_perbill":18821603,"approval":76.8382353,"support":1.8821603},{"time_hours":190,"approval_perbill":767156863,"support_perbill":18688931,"approval":76.7156863,"support":1.8688931},{"time_hours":191,"approval_perbill":765931373,"support_perbill":18557575,"approval":76.5931373,"support":1.8557575},{"time_hours":192,"approval_perbill":764705883,"support_perbill":18427518,"approval":76.4705883,"support":1.8427518},{"time_hours":193,"approval_perbill":763480393,"support_perbill":18298739,"approval":76.3480393,"support":1.8298739},{"time_hours":194,"approval_perbill":762254903,"support_perbill":18171219,"approval":76.2254903,"support":1.8171219},{"time_hours":195,"approval_perbill":761029413,"support_perbill":18044941,"approval":76.1029413,"support":1.8044941},{"time_hours":196,"approval_perbill":759803923,"support_perbill":17919887,"approval":75.9803923,"support":1.7919887},{"time_hours":197,"approval_perbill":758578433,"support_perbill":17796038,"approval":75.8578433,"support":1.7796038},{"time_hours":198,"approval_perbill":757352942,"support_perbill":17673377,"approval":75.7352942,"support":1.7673377},{"time_hours":199,"approval_perbill":756127452,"support_perbill":17551888,"approval":75.6127452,"support":1.7551888},{"time_hours":200,"approval_perbill":754901962,"support_perbill":17431553,"approval":75.4901962,"support":1.7431553},{"time_hours":201,"approval_perbill":753676472,"support_perbill":17312357,"approval":75.3676472,"support":1.7312357},{"time_hours":202,"approval_perbill":752450981,"support_perbill":17194282,"approval":75.2450981,"support":1.7194282},{"time_hours":203,"approval_perbill":751225491,"support_perbill":17077315,"approval":75.1225491,"support":1.7077315},{"time_hours":204,"approval_perbill":750000001,"support_perbill":16961437,"approval":75.0000001,"support":1.6961437},{"time_hours":205,"approval_perbill":748774511,"support_perbill":16846636,"approval":74.8774511,"support":1.6846636},{"time_hours":206,"approval_perbill":747549020,"support_perbill":16732895,"approval":74.754902,"support":1.6732895},{"time_hours":207,"approval_perbill":746323530,"support_perbill":16620201,"approval":74.632353,"support":1.6620201},{"time_hours":208,"approval_perbill":745098040,"support_perbill":16508538,"approval":74.509804,"support":1.6508538},{"time_hours":209,"approval_perbill":743872550,"support_perbill":16397893,"approval":74.387255,"support":1.6397893},{"time_hours":210,"approval_perbill":742647059,"support_perbill":16288252,"approval":74.2647059,"support":1.6288252},{"time_hours":211,"approval_perbill":741421569,"support_perbill":16179601,"approval":74.1421569,"support":1.6179601},{"time_hours":212,"approval_perbill":740196079,"support_perbill":16071927,"approval":74.0196079,"support":1.6071927},{"time_hours":213,"approval_perbill":738970589,"support_perbill":15965217,"approval":73.8970589,"support":1.5965217},{"time_hours":214,"approval_perbill":737745099,"support_perbill":15859457,"approval":73.7745099,"support":1.5859457},{"time_hours":215,"approval_perbill":736519608,"support_perbill":15754636,"approval":73.6519608,"support":1.5754636},{"time_hours":216,"approval_perbill":735294118,"support_perbill":15650741,"approval":73.5294118,"support":1.5650741},{"time_hours":217,"approval_perbill":734068628,"support_perbill":15547759,"approval":73.4068628,"support":1.5547759},{"time_hours":218,"approval_perbill":732843138,"support_perbill":15445679,"approval":73.2843138,"support":1.5445679},{"time_hours":219,"approval_perbill":731617648,"support_perbill":15344488,"approval":73.1617648,"support":1.5344488},{"time_hours":220,"approval_perbill":730392158,"support_perbill":15244176,"approval":73.0392158,"support":1.5244176},{"time_hours":221,"approval_perbill":729166668,"support_perbill":15144731,"approval":72.9166668,"support":1.5144731},{"time_hours":222,"approval_perbill":727941178,"support_perbill":15046141,"approval":72.7941178,"support":1.5046141},{"time_hours":223,"approval_perbill":726715687,"support_perbill":14948396,"approval":72.6715687,"support":1.4948396},{"time_hours":224,"approval_perbill":725490197,"support_perbill":14851485,"approval":72.5490197,"support":1.4851485},{"time_hours":225,"approval_perbill":724264707,"support_perbill":14755396,"approval":72.4264707,"support":1.4755396},{"time_hours":226,"approval_perbill":723039217,"support_perbill":14660121,"approval":72.3039217,"support":1.4660121},{"time_hours":227,"approval_perbill":721813726,"support_perbill":14565648,"approval":72.1813726,"support":1.4565648},{"time_hours":228,"approval_perbill":720588236,"support_perbill":14471968,"approval":72.0588236,"support":1.4471968},{"time_hours":229,"approval_perbill":719362746,"support_perbill":14379070,"approval":71.9362746,"support":1.437907},{"time_hours":230,"approval_perbill":718137256,"support_perbill":14286945,"approval":71.8137256,"support":1.4286945},{"time_hours":231,"approval_perbill":716911765,"support_perbill":14195583,"approval":71.6911765,"support":1.4195583},{"time_hours":232,"approval_perbill":715686275,"support_perbill":14104975,"approval":71.5686275,"support":1.4104975},{"time_hours":233,"approval_perbill":714460785,"support_perbill":14015111,"approval":71.4460785,"support":1.4015111},{"time_hours":234,"approval_perbill":713235295,"support_perbill":13925982,"approval":71.3235295,"support":1.3925982},{"time_hours":235,"approval_perbill":712009805,"support_perbill":13837579,"approval":71.2009805,"support":1.3837579},{"time_hours":236,"approval_perbill":710784314,"support_perbill":13749894,"approval":71.0784314,"support":1.3749894},{"time_hours":237,"approval_perbill":709558824,"support_perbill":13662918,"approval":70.9558824,"support":1.3662918},{"time_hours":238,"approval_perbill":708333334,"support_perbill":13576642,"approval":70.8333334,"support":1.3576642},{"time_hours":239,"approval_perbill":707107844,"support_perbill":13491057,"approval":70.7107844,"support":1.3491057},{"time_hours":240,"approval_perbill":705882353,"support_perbill":13406156,"approval":70.5882353,"support":1.3406156},{"time_hours":241,"approval_perbill":704656863,"support_perbill":13321931,"approval":70.4656863,"support":1.3321931},{"time_hours":242,"approval_perbill":703431373,"support_perbill":13238372,"approval":70.3431373,"support":1.3238372},{"time_hours":243,"approval_perbill":702205883,"support_perbill":13155473,"approval":70.2205883,"support":1.3155473},{"time_hours":244,"approval_perbill":700980393,"support_perbill":13073226,"approval":70.0980393,"support":1.3073226},{"time_hours":245,"approval_perbill":699754903,"support_perbill":12991622,"approval":69.9754903,"support":1.2991622},{"time_hours":246,"approval_perbill":698529413,"support_perbill":12910655,"approval":69.8529413,"support":1.2910655},{"time_hours":247,"approval_perbill":697303923,"support_perbill":12830317,"approval":69.7303923,"support":1.2830317},{"time_hours":248,"approval_perbill":696078432,"support_perbill":12750601,"approval":69.6078432,"support":1.2750601},{"time_hours":249,"approval_perbill":694852942,"support_perbill":12671499,"approval":69.4852942,"support":1.2671499},{"time_hours":250,"approval_perbill":693627452,"support_perbill":12593005,"approval":69.3627452,"support":1.2593005},{"time_hours":251,"approval_perbill":692401962,"support_perbill":12515111,"approval":69.2401962,"support":1.2515111},{"time_hours":252,"approval_perbill":691176471,"support_perbill":12437810,"approval":69.1176471,"support":1.243781},{"time_hours":253,"approval_perbill":689950981,"support_perbill":12361097,"approval":68.9950981,"support":1.2361097},{"time_hours":254,"approval_perbill":688725491,"support_perbill":12284964,"approval":68.8725491,"support":1.2284964},{"time_hours":255,"approval_perbill":687500001,"support_perbill":12209404,"approval":68.7500001,"support":1.2209404},{"time_hours":256,"approval_perbill":686274511,"support_perbill":12134411,"approval":68.6274511,"support":1.2134411},{"time_hours":257,"approval_perbill":685049020,"support_perbill":12059980,"approval":68.504902,"support":1.205998},{"time_hours":258,"approval_perbill":683823530,"support_perbill":11986103,"approval":68.382353,"support":1.1986103},{"time_hours":259,"approval_perbill":682598040,"support_perbill":11912774,"approval":68.259804,"support":1.1912774},{"time_hours":260,"approval_perbill":681372550,"support_perbill":11839987,"approval":68.137255,"support":1.1839987},{"time_hours":261,"approval_perbill":680147059,"support_perbill":11767737,"approval":68.0147059,"support":1.1767737},{"time_hours":262,"approval_perbill":678921569,"support_perbill":11696017,"approval":67.8921569,"support":1.1696017},{"time_hours":263,"approval_perbill":677696079,"support_perbill":11624822,"approval":67.7696079,"support":1.1624822},{"time_hours":264,"approval_perbill":676470589,"support_perbill":11554145,"approval":67.6470589,"support":1.1554145},{"time_hours":265,"approval_perbill":675245099,"support_perbill":11483982,"approval":67.5245099,"support":1.1483982},{"time_hours":266,"approval_perbill":674019609,"support_perbill":11414326,"approval":67.4019609,"support":1.1414326},{"time_hours":267,"approval_perbill":672794119,"support_perbill":11345173,"approval":67.2794119,"support":1.1345173},{"time_hours":268,"approval_perbill":671568629,"support_perbill":11276516,"approval":67.1568629,"support":1.1276516},{"time_hours":269,"approval_perbill":670343138,"support_perbill":11208351,"approval":67.0343138,"support":1.1208351},{"time_hours":270,"approval_perbill":669117648,"support_perbill":11140671,"approval":66.9117648,"support":1.1140671},{"time_hours":271,"approval_perbill":667892158,"support_perbill":11073473,"approval":66.7892158,"support":1.1073473},{"time_hours":272,"approval_perbill":666666668,"support_perbill":11006750,"approval":66.6666668,"support":1.100675},{"time_hours":273,"approval_perbill":665441177,"support_perbill":10940499,"approval":66.5441177,"support":1.0940499},{"time_hours":274,"approval_perbill":664215687,"support_perbill":10874713,"approval":66.4215687,"support":1.0874713},{"time_hours":275,"approval_perbill":662990197,"support_perbill":10809388,"approval":66.2990197,"support":1.0809388},{"time_hours":276,"approval_perbill":661764707,"support_perbill":10744519,"approval":66.1764707,"support":1.0744519},{"time_hours":277,"approval_perbill":660539217,"support_perbill":10680101,"approval":66.0539217,"support":1.0680101},{"time_hours":278,"approval_perbill":659313726,"support_perbill":10616130,"approval":65.9313726,"support":1.061613},{"time_hours":279,"approval_perbill":658088236,"support_perbill":10552601,"approval":65.8088236,"support":1.0552601},{"time_hours":280,"approval_perbill":656862746,"support_perbill":10489510,"approval":65.6862746,"support":1.048951},{"time_hours":281,"approval_perbill":655637256,"support_perbill":10426852,"approval":65.5637256,"support":1.0426852},{"time_hours":282,"approval_perbill":654411765,"support_perbill":10364622,"approval":65.4411765,"support":1.0364622},{"time_hours":283,"approval_perbill":653186275,"support_perbill":10302816,"approval":65.3186275,"support":1.0302816},{"time_hours":284,"approval_perbill":651960785,"support_perbill":10241430,"approval":65.1960785,"support":1.024143},{"time_hours":285,"approval_perbill":650735295,"support_perbill":10180459,"approval":65.0735295,"support":1.0180459},{"time_hours":286,"approval_perbill":649509804,"support_perbill":10119900,"approval":64.9509804,"support":1.01199},{"time_hours":287,"approval_perbill":648284314,"support_perbill":10059748,"approval":64.8284314,"support":1.0059748},{"time_hours":288,"approval_perbill":647058824,"support_perbill":10000000,"approval":64.7058824,"support":1},{"time_hours":289,"approval_perbill":645833334,"support_perbill":9940650,"approval":64.5833334,"support":0.994065},{"time_hours":290,"approval_perbill":644607844,"support_perbill":9881695,"approval":64.4607844,"support":0.9881695},{"time_hours":291,"approval_perbill":643382354,"support_perbill":9823132,"approval":64.3382354,"support":0.9823132},{"time_hours":292,"approval_perbill":642156864,"support_perbill":9764955,"approval":64.2156864,"support":0.9764955},{"time_hours":293,"approval_perbill":640931374,"support_perbill":9707163,"approval":64.0931374,"support":0.9707163},{"time_hours":294,"approval_perbill":639705883,"support_perbill":9649749,"approval":63.9705883,"support":0.9649749},{"time_hours":295,"approval_perbill":638480393,"support_perbill":9592712,"approval":63.8480393,"support":0.9592712},{"time_hours":296,"approval_perbill":637254903,"support_perbill":9536047,"approval":63.7254903,"support":0.9536047},{"time_hours":297,"approval_perbill":636029413,"support_perbill":9479751,"approval":63.6029413,"support":0.9479751},{"time_hours":298,"approval_perbill":634803923,"support_perbill":9423820,"approval":63.4803923,"support":0.942382},{"time_hours":299,"approval_perbill":633578432,"support_perbill":9368250,"approval":63.3578432,"support":0.936825},{"time_hours":300,"approval_perbill":632352942,"support_perbill":9313038,"approval":63.2352942,"support":0.9313038},{"time_hours":301,"approval_perbill":631127452,"support_perbill":9258181,"approval":63.1127452,"support":0.9258181},{"time_hours":302,"approval_perbill":629901962,"support_perbill":9203674,"approval":62.9901962,"support":0.9203674},{"time_hours":303,"approval_perbill":628676471,"support_perbill":9149516,"approval":62.8676471,"support":0.9149516},{"time_hours":304,"approval_perbill":627450981,"support_perbill":9095702,"approval":62.7450981,"support":0.9095702},{"time_hours":305,"approval_perbill":626225491,"support_perbill":9042230,"approval":62.6225491,"support":0.904223},{"time_hours":306,"approval_perbill":625000001,"support_perbill":8989095,"approval":62.5000001,"support":0.8989095},{"time_hours":307,"approval_perbill":623774510,"support_perbill":8936295,"approval":62.377451,"support":0.8936295},{"time_hours":308,"approval_perbill":622549020,"support_perbill":8883826,"approval":62.254902,"support":0.8883826},{"time_hours":309,"approval_perbill":621323530,"support_perbill":8831687,"approval":62.132353,"support":0.8831687},{"time_hours":310,"approval_perbill":620098040,"support_perbill":8779872,"approval":62.009804,"support":0.8779872},{"time_hours":311,"approval_perbill":618872549,"support_perbill":8728380,"approval":61.8872549,"support":0.872838},{"time_hours":312,"approval_perbill":617647059,"support_perbill":8677207,"approval":61.7647059,"support":0.8677207},{"time_hours":313,"approval_perbill":616421569,"support_perbill":8626351,"approval":61.6421569,"support":0.8626351},{"time_hours":314,"approval_perbill":615196079,"support_perbill":8575808,"approval":61.5196079,"support":0.8575808},{"time_hours":315,"approval_perbill":613970589,"support_perbill":8525576,"approval":61.3970589,"support":0.8525576},{"time_hours":316,"approval_perbill":612745099,"support_perbill":8475652,"approval":61.2745099,"support":0.8475652},{"time_hours":317,"approval_perbill":611519609,"support_perbill":8426032,"approval":61.1519609,"support":0.8426032},{"time_hours":318,"approval_perbill":610294119,"support_perbill":8376715,"approval":61.0294119,"support":0.8376715},{"time_hours":319,"approval_perbill":609068629,"support_perbill":8327697,"approval":60.9068629,"support":0.8327697},{"time_hours":320,"approval_perbill":607843138,"support_perbill":8278976,"approval":60.7843138,"support":0.8278976},{"time_hours":321,"approval_perbill":606617648,"support_perbill":8230549,"approval":60.6617648,"support":0.8230549},{"time_hours":322,"approval_perbill":605392158,"support_perbill":8182413,"approval":60.5392158,"support":0.8182413},{"time_hours":323,"approval_perbill":604166668,"support_perbill":8134566,"approval":60.4166668,"support":0.8134566},{"time_hours":324,"approval_perbill":602941177,"support_perbill":8087005,"approval":60.2941177,"support":0.8087005},{"time_hours":325,"approval_perbill":601715687,"support_perbill":8039727,"approval":60.1715687,"support":0.8039727},{"time_hours":326,"approval_perbill":600490197,"support_perbill":7992731,"approval":60.0490197,"support":0.7992731},{"time_hours":327,"approval_perbill":599264707,"support_perbill":7946013,"approval":59.9264707,"support":0.7946013},{"time_hours":328,"approval_perbill":598039216,"support_perbill":7899571,"approval":59.8039216,"support":0.7899571},{"time_hours":329,"approval_perbill":596813726,"support_perbill":7853403,"approval":59.6813726,"support":0.7853403},{"time_hours":330,"approval_perbill":595588236,"support_perbill":7807506,"approval":59.5588236,"support":0.7807506},{"time_hours":331,"approval_perbill":594362746,"support_perbill":7761878,"approval":59.4362746,"support":0.7761878},{"time_hours":332,"approval_perbill":593137255,"support_perbill":7716516,"approval":59.3137255,"support":0.7716516},{"time_hours":333,"approval_perbill":591911765,"support_perbill":7671418,"approval":59.1911765,"support":0.7671418},{"time_hours":334,"approval_perbill":590686275,"support_perbill":7626583,"approval":59.0686275,"support":0.7626583},{"time_hours":335,"approval_perbill":589460785,"support_perbill":7582007,"approval":58.9460785,"support":0.7582007},{"time_hours":336,"approval_perbill":588235295,"support_perbill":7537688,"approval":58.8235295,"support":0.7537688},{"time_hours":337,"approval_perbill":587009805,"support_perbill":7493624,"approval":58.7009805,"support":0.7493624},{"time_hours":338,"approval_perbill":585784315,"support_perbill":7449814,"approval":58.5784315,"support":0.7449814},{"time_hours":339,"approval_perbill":584558825,"support_perbill":7406254,"approval":58.4558825,"support":0.7406254},{"time_hours":340,"approval_perbill":583333335,"support_perbill":7362942,"approval":58.3333335,"support":0.7362942},{"time_hours":341,"approval_perbill":582107844,"support_perbill":7319878,"approval":58.2107844,"support":0.7319878},{"time_hours":342,"approval_perbill":580882354,"support_perbill":7277057,"approval":58.0882354,"support":0.7277057},{"time_hours":343,"approval_perbill":579656864,"support_perbill":7234479,"approval":57.9656864,"support":0.7234479},{"time_hours":344,"approval_perbill":578431374,"support_perbill":7192141,"approval":57.8431374,"support":0.7192141},{"time_hours":345,"approval_perbill":577205883,"support_perbill":7150041,"approval":57.7205883,"support":0.7150041},{"time_hours":346,"approval_perbill":575980393,"support_perbill":7108178,"approval":57.5980393,"support":0.7108178},{"time_hours":347,"approval_perbill":574754903,"support_perbill":7066548,"approval":57.4754903,"support":0.7066548},{"time_hours":348,"approval_perbill":573529413,"support_perbill":7025151,"approval":57.3529413,"support":0.7025151},{"time_hours":349,"approval_perbill":572303922,"support_perbill":6983985,"approval":57.2303922,"support":0.6983985},{"time_hours":350,"approval_perbill":571078432,"support_perbill":6943047,"approval":57.1078432,"support":0.6943047},{"time_hours":351,"approval_perbill":569852942,"support_perbill":6902335,"approval":56.9852942,"support":0.6902335},{"time_hours":352,"approval_perbill":568627452,"support_perbill":6861848,"approval":56.8627452,"support":0.6861848},{"time_hours":353,"approval_perbill":567401961,"support_perbill":6821584,"approval":56.7401961,"support":0.6821584},{"time_hours":354,"approval_perbill":566176471,"support_perbill":6781540,"approval":56.6176471,"support":0.678154},{"time_hours":355,"approval_perbill":564950981,"support_perbill":6741716,"approval":56.4950981,"support":0.6741716},{"time_hours":356,"approval_perbill":563725491,"support_perbill":6702109,"approval":56.3725491,"support":0.6702109},{"time_hours":357,"approval_perbill":562500000,"support_perbill":6662718,"approval":56.25,"support":0.6662718},{"time_hours":358,"approval_perbill":561274510,"support_perbill":6623541,"approval":56.127451,"support":0.6623541},{"time_hours":359,"approval_perbill":560049020,"support_perbill":6584575,"approval":56.004902,"support":0.6584575},{"time_hours":360,"approval_perbill":558823530,"support_perbill":6545820,"approval":55.882353,"support":0.654582},{"time_hours":361,"approval_perbill":557598040,"support_perbill":6507274,"approval":55.759804,"support":0.6507274},{"time_hours":362,"approval_perbill":556372550,"support_perbill":6468935,"approval":55.637255,"support":0.6468935},{"time_hours":363,"approval_perbill":555147060,"support_perbill":6430801,"approval":55.514706,"support":0.6430801},{"time_hours":364,"approval_perbill":553921570,"support_perbill":6392871,"approval":55.392157,"support":0.6392871},{"time_hours":365,"approval_perbill":552696080,"support_perbill":6355142,"approval":55.269608,"support":0.6355142},{"time_hours":366,"approval_perbill":551470589,"support_perbill":6317615,"approval":55.1470589,"support":0.6317615},{"time_hours":367,"approval_perbill":550245099,"support_perbill":6280286,"approval":55.0245099,"support":0.6280286},{"time_hours":368,"approval_perbill":549019609,"support_perbill":6243154,"approval":54.9019609,"support":0.6243154},{"time_hours":369,"approval_perbill":547794119,"support_perbill":6206218,"approval":54.7794119,"support":0.6206218},{"time_hours":370,"approval_perbill":546568628,"support_perbill":6169476,"approval":54.6568628,"support":0.6169476},{"time_hours":371,"approval_perbill":545343138,"support_perbill":6132927,"approval":54.5343138,"support":0.6132927},{"time_hours":372,"approval_perbill":544117648,"support_perbill":6096569,"approval":54.4117648,"support":0.6096569},{"time_hours":373,"approval_perbill":542892158,"support_perbill":6060401,"approval":54.2892158,"support":0.6060401},{"time_hours":374,"approval_perbill":541666667,"support_perbill":6024421,"approval":54.1666667,"support":0.6024421},{"time_hours":375,"approval_perbill":540441177,"support_perbill":5988627,"approval":54.0441177,"support":0.5988627},{"time_hours":376,"approval_perbill":539215687,"support_perbill":5953019,"approval":53.9215687,"support":0.5953019},{"time_hours":377,"approval_perbill":537990197,"support_perbill":5917595,"approval":53.7990197,"support":0.5917595},{"time_hours":378,"approval_perbill":536764706,"support_perbill":5882353,"approval":53.6764706,"support":0.5882353},{"time_hours":379,"approval_perbill":535539216,"support_perbill":5847292,"approval":53.5539216,"support":0.5847292},{"time_hours":380,"approval_perbill":534313726,"support_perbill":5812410,"approval":53.4313726,"support":0.581241},{"time_hours":381,"approval_perbill":533088236,"support_perbill":5777707,"approval":53.3088236,"support":0.5777707},{"time_hours":382,"approval_perbill":531862746,"support_perbill":5743181,"approval":53.1862746,"support":0.5743181},{"time_hours":383,"approval_perbill":530637255,"support_perbill":5708830,"approval":53.0637255,"support":0.570883},{"time_hours":384,"approval_perbill":529411765,"support_perbill":5674653,"approval":52.9411765,"support":0.5674653},{"time_hours":385,"approval_perbill":528186275,"support_perbill":5640649,"approval":52.8186275,"support":0.5640649},{"time_hours":386,"approval_perbill":526960785,"support_perbill":5606817,"approval":52.6960785,"support":0.5606817},{"time_hours":387,"approval_perbill":525735295,"support_perbill":5573155,"approval":52.5735295,"support":0.5573155},{"time_hours":388,"approval_perbill":524509805,"support_perbill":5539662,"approval":52.4509805,"support":0.5539662},{"time_hours":389,"approval_perbill":523284315,"support_perbill":5506336,"approval":52.3284315,"support":0.5506336},{"time_hours":390,"approval_perbill":522058825,"support_perbill":5473177,"approval":52.2058825,"support":0.5473177},{"time_hours":391,"approval_perbill":520833334,"support_perbill":5440183,"approval":52.0833334,"support":0.5440183},{"time_hours":392,"approval_perbill":519607844,"support_perbill":5407354,"approval":51.9607844,"support":0.5407354},{"time_hours":393,"approval_perbill":518382354,"support_perbill":5374687,"approval":51.8382354,"support":0.5374687},{"time_hours":394,"approval_perbill":517156864,"support_perbill":5342181,"approval":51.7156864,"support":0.5342181},{"time_hours":395,"approval_perbill":515931373,"support_perbill":5309836,"approval":51.5931373,"support":0.5309836},{"time_hours":396,"approval_perbill":514705883,"support_perbill":5277650,"approval":51.4705883,"support":0.527765},{"time_hours":397,"approval_perbill":513480393,"support_perbill":5245622,"approval":51.3480393,"support":0.5245622},{"time_hours":398,"approval_perbill":512254903,"support_perbill":5213751,"approval":51.2254903,"support":0.5213751},{"time_hours":399,"approval_perbill":511029412,"support_perbill":5182035,"approval":51.1029412,"support":0.5182035},{"time_hours":400,"approval_perbill":509803922,"support_perbill":5150474,"approval":50.9803922,"support":0.5150474},{"time_hours":401,"approval_perbill":508578432,"support_perbill":5119067,"approval":50.8578432,"support":0.5119067},{"time_hours":402,"approval_perbill":507352942,"support_perbill":5087812,"approval":50.7352942,"support":0.5087812},{"time_hours":403,"approval_perbill":506127452,"support_perbill":5056708,"approval":50.6127452,"support":0.5056708},{"time_hours":404,"approval_perbill":504901961,"support_perbill":5025754,"approval":50.4901961,"support":0.5025754},{"time_hours":405,"approval_perbill":503676471,"support_perbill":4994949,"approval":50.3676471,"support":0.4994949},{"time_hours":406,"approval_perbill":502450981,"support_perbill":4964292,"approval":50.2450981,"support":0.4964292},{"time_hours":407,"approval_perbill":501225491,"support_perbill":4933782,"approval":50.1225491,"support":0.4933782},{"time_hours":408,"approval_perbill":500000000,"support_perbill":4903417,"approval":50,"support":0.4903417},{"time_hours":409,"approval_perbill":500000000,"support_perbill":4873198,"approval":50,"support":0.4873198},{"time_hours":410,"approval_perbill":500000000,"support_perbill":4843122,"approval":50,"support":0.4843122},{"time_hours":411,"approval_perbill":500000000,"support_perbill":4813189,"approval":50,"support":0.4813189},{"time_hours":412,"approval_perbill":500000000,"support_perbill":4783398,"approval":50,"support":0.4783398},{"time_hours":413,"approval_perbill":500000000,"support_perbill":4753747,"approval":50,"support":0.4753747},{"time_hours":414,"approval_perbill":500000000,"support_perbill":4724236,"approval":50,"support":0.4724236},{"time_hours":415,"approval_perbill":500000000,"support_perbill":4694864,"approval":50,"support":0.4694864},{"time_hours":416,"approval_perbill":500000000,"support_perbill":4665630,"approval":50,"support":0.466563},{"time_hours":417,"approval_perbill":500000000,"support_perbill":4636532,"approval":50,"support":0.4636532},{"time_hours":418,"approval_perbill":500000000,"support_perbill":4607570,"approval":50,"support":0.460757},{"time_hours":419,"approval_perbill":500000000,"support_perbill":4578743,"approval":50,"support":0.4578743},{"time_hours":420,"approval_perbill":500000000,"support_perbill":4550050,"approval":50,"support":0.455005},{"time_hours":421,"approval_perbill":500000000,"support_perbill":4521490,"approval":50,"support":0.452149},{"time_hours":422,"approval_perbill":500000000,"support_perbill":4493062,"approval":50,"support":0.4493062},{"time_hours":423,"approval_perbill":500000000,"support_perbill":4464766,"approval":50,"support":0.4464766},{"time_hours":424,"approval_perbill":500000000,"support_perbill":4436599,"approval":50,"support":0.4436599},{"time_hours":425,"approval_perbill":500000000,"support_perbill":4408562,"approval":50,"support":0.4408562},{"time_hours":426,"approval_perbill":500000000,"support_perbill":4380654,"approval":50,"support":0.4380654},{"time_hours":427,"approval_perbill":500000000,"support_perbill":4352873,"approval":50,"support":0.4352873},{"time_hours":428,"approval_perbill":500000000,"support_perbill":4325218,"approval":50,"support":0.4325218},{"time_hours":429,"approval_perbill":500000000,"support_perbill":4297690,"approval":50,"support":0.429769},{"time_hours":430,"approval_perbill":500000000,"support_perbill":4270287,"approval":50,"support":0.4270287},{"time_hours":431,"approval_perbill":500000000,"support_perbill":4243007,"approval":50,"support":0.4243007},{"time_hours":432,"approval_perbill":500000000,"support_perbill":4215851,"approval":50,"support":0.4215851},{"time_hours":433,"approval_perbill":500000000,"support_perbill":4188818,"approval":50,"support":0.4188818},{"time_hours":434,"approval_perbill":500000000,"support_perbill":4161906,"approval":50,"support":0.4161906},{"time_hours":435,"approval_perbill":500000000,"support_perbill":4135115,"approval":50,"support":0.4135115},{"time_hours":436,"approval_perbill":500000000,"support_perbill":4108444,"approval":50,"support":0.4108444},{"time_hours":437,"approval_perbill":500000000,"support_perbill":4081892,"approval":50,"support":0.4081892},{"time_hours":438,"approval_perbill":500000000,"support_perbill":4055459,"approval":50,"support":0.4055459},{"time_hours":439,"approval_perbill":500000000,"support_perbill":4029143,"approval":50,"support":0.4029143},{"time_hours":440,"approval_perbill":500000000,"support_perbill":4002944,"approval":50,"support":0.4002944},{"time_hours":441,"approval_perbill":500000000,"support_perbill":3976862,"approval":50,"support":0.3976862},{"time_hours":442,"approval_perbill":500000000,"support_perbill":3950894,"approval":50,"support":0.3950894},{"time_hours":443,"approval_perbill":500000000,"support_perbill":3925041,"approval":50,"support":0.3925041},{"time_hours":444,"approval_perbill":500000000,"support_perbill":3899302,"approval":50,"support":0.3899302},{"time_hours":445,"approval_perbill":500000000,"support_perbill":3873676,"approval":50,"support":0.3873676},{"time_hours":446,"approval_perbill":500000000,"support_perbill":3848162,"approval":50,"support":0.3848162},{"time_hours":447,"approval_perbill":500000000,"support_perbill":3822760,"approval":50,"support":0.382276},{"time_hours":448,"approval_perbill":500000000,"support_perbill":3797468,"approval":50,"support":0.3797468},{"time_hours":449,"approval_perbill":500000000,"support_perbill":3772287,"approval":50,"support":0.3772287},{"time_hours":450,"approval_perbill":500000000,"support_perbill":3747215,"approval":50,"support":0.3747215},{"time_hours":451,"approval_perbill":500000000,"support_perbill":3722251,"approval":50,"support":0.3722251},{"time_hours":452,"approval_perbill":500000000,"support_perbill":3697396,"approval":50,"support":0.3697396},{"time_hours":453,"approval_perbill":500000000,"support_perbill":3672648,"approval":50,"support":0.3672648},{"time_hours":454,"approval_perbill":500000000,"support_perbill":3648006,"approval":50,"support":0.3648006},{"time_hours":455,"approval_perbill":500000000,"support_perbill":3623471,"approval":50,"support":0.3623471},{"time_hours":456,"approval_perbill":500000000,"support_perbill":3599040,"approval":50,"support":0.359904},{"time_hours":457,"approval_perbill":500000000,"support_perbill":3574714,"approval":50,"support":0.3574714},{"time_hours":458,"approval_perbill":500000000,"support_perbill":3550492,"approval":50,"support":0.3550492},{"time_hours":459,"approval_perbill":500000000,"support_perbill":3526373,"approval":50,"support":0.3526373},{"time_hours":460,"approval_perbill":500000000,"support_perbill":3502357,"approval":50,"support":0.3502357},{"time_hours":461,"approval_perbill":500000000,"support_perbill":3478442,"approval":50,"support":0.3478442},{"time_hours":462,"approval_perbill":500000000,"support_perbill":3454629,"approval":50,"support":0.3454629},{"time_hours":463,"approval_perbill":500000000,"support_perbill":3430916,"approval":50,"support":0.3430916},{"time_hours":464,"approval_perbill":500000000,"support_perbill":3407304,"approval":50,"support":0.3407304},{"time_hours":465,"approval_perbill":500000000,"support_perbill":3383790,"approval":50,"support":0.338379},{"time_hours":466,"approval_perbill":500000000,"support_perbill":3360376,"approval":50,"support":0.3360376},{"time_hours":467,"approval_perbill":500000000,"support_perbill":3337059,"approval":50,"support":0.3337059},{"time_hours":468,"approval_perbill":500000000,"support_perbill":3313840,"approval":50,"support":0.331384},{"time_hours":469,"approval_perbill":500000000,"support_perbill":3290718,"approval":50,"support":0.3290718},{"time_hours":470,"approval_perbill":500000000,"support_perbill":3267692,"approval":50,"support":0.3267692},{"time_hours":471,"approval_perbill":500000000,"support_perbill":3244761,"approval":50,"support":0.3244761},{"time_hours":472,"approval_perbill":500000000,"support_perbill":3221926,"approval":50,"support":0.3221926},{"time_hours":473,"approval_perbill":500000000,"support_perbill":3199185,"approval":50,"support":0.3199185},{"time_hours":474,"approval_perbill":500000000,"support_perbill":3176538,"approval":50,"support":0.3176538},{"time_hours":475,"approval_perbill":500000000,"support_perbill":3153985,"approval":50,"support":0.3153985},{"time_hours":476,"approval_perbill":500000000,"support_perbill":3131524,"approval":50,"support":0.3131524},{"time_hours":477,"approval_perbill":500000000,"support_perbill":3109155,"approval":50,"support":0.3109155},{"time_hours":478,"approval_perbill":500000000,"support_perbill":3086878,"approval":50,"support":0.3086878},{"time_hours":479,"approval_perbill":500000000,"support_perbill":3064692,"approval":50,"support":0.3064692},{"time_hours":480,"approval_perbill":500000000,"support_perbill":3042596,"approval":50,"support":0.3042596},{"time_hours":481,"approval_perbill":500000000,"support_perbill":3020590,"approval":50,"support":0.302059},{"time_hours":482,"approval_perbill":500000000,"support_perbill":2998674,"approval":50,"support":0.2998674},{"time_hours":483,"approval_perbill":500000000,"support_perbill":2976847,"approval":50,"support":0.2976847},{"time_hours":484,"approval_perbill":500000000,"support_perbill":2955107,"approval":50,"support":0.2955107},{"time_hours":485,"approval_perbill":500000000,"support_perbill":2933456,"approval":50,"support":0.2933456},{"time_hours":486,"approval_perbill":500000000,"support_perbill":2911892,"approval":50,"support":0.2911892},{"time_hours":487,"approval_perbill":500000000,"support_perbill":2890414,"approval":50,"support":0.2890414},{"time_hours":488,"approval_perbill":500000000,"support_perbill":2869023,"approval":50,"support":0.2869023},{"time_hours":489,"approval_perbill":500000000,"support_perbill":2847717,"approval":50,"support":0.2847717},{"time_hours":490,"approval_perbill":500000000,"support_perbill":2826496,"approval":50,"support":0.2826496},{"time_hours":491,"approval_perbill":500000000,"support_perbill":2805360,"approval":50,"support":0.280536},{"time_hours":492,"approval_perbill":500000000,"support_perbill":2784309,"approval":50,"support":0.2784309},{"time_hours":493,"approval_perbill":500000000,"support_perbill":2763341,"approval":50,"support":0.2763341},{"time_hours":494,"approval_perbill":500000000,"support_perbill":2742455,"approval":50,"support":0.2742455},{"time_hours":495,"approval_perbill":500000000,"support_perbill":2721653,"approval":50,"support":0.2721653},{"time_hours":496,"approval_perbill":500000000,"support_perbill":2700933,"approval":50,"support":0.2700933},{"time_hours":497,"approval_perbill":500000000,"support_perbill":2680294,"approval":50,"support":0.2680294},{"time_hours":498,"approval_perbill":500000000,"support_perbill":2659737,"approval":50,"support":0.2659737},{"time_hours":499,"approval_perbill":500000000,"support_perbill":2639260,"approval":50,"support":0.263926},{"time_hours":500,"approval_perbill":500000000,"support_perbill":2618864,"approval":50,"support":0.2618864},{"time_hours":501,"approval_perbill":500000000,"support_perbill":2598547,"approval":50,"support":0.2598547},{"time_hours":502,"approval_perbill":500000000,"support_perbill":2578310,"approval":50,"support":0.257831},{"time_hours":503,"approval_perbill":500000000,"support_perbill":2558151,"approval":50,"support":0.2558151},{"time_hours":504,"approval_perbill":500000000,"support_perbill":2538071,"approval":50,"support":0.2538071},{"time_hours":505,"approval_perbill":500000000,"support_perbill":2518069,"approval":50,"support":0.2518069},{"time_hours":506,"approval_perbill":500000000,"support_perbill":2498144,"approval":50,"support":0.2498144},{"time_hours":507,"approval_perbill":500000000,"support_perbill":2478296,"approval":50,"support":0.2478296},{"time_hours":508,"approval_perbill":500000000,"support_perbill":2458525,"approval":50,"support":0.2458525},{"time_hours":509,"approval_perbill":500000000,"support_perbill":2438830,"approval":50,"support":0.243883},{"time_hours":510,"approval_perbill":500000000,"support_perbill":2419210,"approval":50,"support":0.241921},{"time_hours":511,"approval_perbill":500000000,"support_perbill":2399666,"approval":50,"support":0.2399666},{"time_hours":512,"approval_perbill":500000000,"support_perbill":2380197,"approval":50,"support":0.2380197},{"time_hours":513,"approval_perbill":500000000,"support_perbill":2360802,"approval":50,"support":0.2360802},{"time_hours":514,"approval_perbill":500000000,"support_perbill":2341481,"approval":50,"support":0.2341481},{"time_hours":515,"approval_perbill":500000000,"support_perbill":2322233,"approval":50,"support":0.2322233},{"time_hours":516,"approval_perbill":500000000,"support_perbill":2303059,"approval":50,"support":0.2303059},{"time_hours":517,"approval_perbill":500000000,"support_perbill":2283957,"approval":50,"support":0.2283957},{"time_hours":518,"approval_perbill":500000000,"support_perbill":2264928,"approval":50,"support":0.2264928},{"time_hours":519,"approval_perbill":500000000,"support_perbill":2245970,"approval":50,"support":0.224597},{"time_hours":520,"approval_perbill":500000000,"support_perbill":2227084,"approval":50,"support":0.2227084},{"time_hours":521,"approval_perbill":500000000,"support_perbill":2208269,"approval":50,"support":0.2208269},{"time_hours":522,"approval_perbill":500000000,"support_perbill":2189525,"approval":50,"support":0.2189525},{"time_hours":523,"approval_perbill":500000000,"support_perbill":2170851,"approval":50,"support":0.2170851},{"time_hours":524,"approval_perbill":500000000,"support_perbill":2152247,"approval":50,"support":0.2152247},{"time_hours":525,"approval_perbill":500000000,"support_perbill":2133712,"approval":50,"support":0.2133712},{"time_hours":526,"approval_perbill":500000000,"support_perbill":2115247,"approval":50,"support":0.2115247},{"time_hours":527,"approval_perbill":500000000,"support_perbill":2096850,"approval":50,"support":0.209685},{"time_hours":528,"approval_perbill":500000000,"support_perbill":2078522,"approval":50,"support":0.2078522},{"time_hours":529,"approval_perbill":500000000,"support_perbill":2060261,"approval":50,"support":0.2060261},{"time_hours":530,"approval_perbill":500000000,"support_perbill":2042068,"approval":50,"support":0.2042068},{"time_hours":531,"approval_perbill":500000000,"support_perbill":2023943,"approval":50,"support":0.2023943},{"time_hours":532,"approval_perbill":500000000,"support_perbill":2005884,"approval":50,"support":0.2005884},{"time_hours":533,"approval_perbill":500000000,"support_perbill":1987891,"approval":50,"support":0.1987891},{"time_hours":534,"approval_perbill":500000000,"support_perbill":1969965,"approval":50,"support":0.1969965},{"time_hours":535,"approval_perbill":500000000,"support_perbill":1952104,"approval":50,"support":0.1952104},{"time_hours":536,"approval_perbill":500000000,"support_perbill":1934309,"approval":50,"support":0.1934309},{"time_hours":537,"approval_perbill":500000000,"support_perbill":1916579,"approval":50,"support":0.1916579},{"time_hours":538,"approval_perbill":500000000,"support_perbill":1898913,"approval":50,"support":0.1898913},{"time_hours":539,"approval_perbill":500000000,"support_perbill":1881312,"approval":50,"support":0.1881312},{"time_hours":540,"approval_perbill":500000000,"support_perbill":1863775,"approval":50,"support":0.1863775},{"time_hours":541,"approval_perbill":500000000,"support_perbill":1846301,"approval":50,"support":0.1846301},{"time_hours":542,"approval_perbill":500000000,"support_perbill":1828891,"approval":50,"support":0.1828891},{"time_hours":543,"approval_perbill":500000000,"support_perbill":1811543,"approval":50,"support":0.1811543},{"time_hours":544,"approval_perbill":500000000,"support_perbill":1794258,"approval":50,"support":0.1794258},{"time_hours":545,"approval_perbill":500000000,"support_perbill":1777036,"approval":50,"support":0.1777036},{"time_hours":546,"approval_perbill":500000000,"support_perbill":1759875,"approval":50,"support":0.1759875},{"time_hours":547,"approval_perbill":500000000,"support_perbill":1742775,"approval":50,"support":0.1742775},{"time_hours":548,"approval_perbill":500000000,"support_perbill":1725737,"approval":50,"support":0.1725737},{"time_hours":549,"approval_perbill":500000000,"support_perbill":1708760,"approval":50,"support":0.170876},{"time_hours":550,"approval_perbill":500000000,"support_perbill":1691844,"approval":50,"support":0.1691844},{"time_hours":551,"approval_perbill":500000000,"support_perbill":1674988,"approval":50,"support":0.1674988},{"time_hours":552,"approval_perbill":500000000,"support_perbill":1658191,"approval":50,"support":0.1658191},{"time_hours":553,"approval_perbill":500000000,"support_perbill":1641455,"approval":50,"support":0.1641455},{"time_hours":554,"approval_perbill":500000000,"support_perbill":1624777,"approval":50,"support":0.1624777},{"time_hours":555,"approval_perbill":500000000,"support_perbill":1608159,"approval":50,"support":0.1608159},{"time_hours":556,"approval_perbill":500000000,"support_perbill":1591599,"approval":50,"support":0.1591599},{"time_hours":557,"approval_perbill":500000000,"support_perbill":1575098,"approval":50,"support":0.1575098},{"time_hours":558,"approval_perbill":500000000,"support_perbill":1558654,"approval":50,"support":0.1558654},{"time_hours":559,"approval_perbill":500000000,"support_perbill":1542269,"approval":50,"support":0.1542269},{"time_hours":560,"approval_perbill":500000000,"support_perbill":1525941,"approval":50,"support":0.1525941},{"time_hours":561,"approval_perbill":500000000,"support_perbill":1509670,"approval":50,"support":0.150967},{"time_hours":562,"approval_perbill":500000000,"support_perbill":1493456,"approval":50,"support":0.1493456},{"time_hours":563,"approval_perbill":500000000,"support_perbill":1477298,"approval":50,"support":0.1477298},{"time_hours":564,"approval_perbill":500000000,"support_perbill":1461197,"approval":50,"support":0.1461197},{"time_hours":565,"approval_perbill":500000000,"support_perbill":1445152,"approval":50,"support":0.1445152},{"time_hours":566,"approval_perbill":500000000,"support_perbill":1429162,"approval":50,"support":0.1429162},{"time_hours":567,"approval_perbill":500000000,"support_perbill":1413228,"approval":50,"support":0.1413228},{"time_hours":568,"approval_perbill":500000000,"support_perbill":1397348,"approval":50,"support":0.1397348},{"time_hours":569,"approval_perbill":500000000,"support_perbill":1381524,"approval":50,"support":0.1381524},{"time_hours":570,"approval_perbill":500000000,"support_perbill":1365754,"approval":50,"support":0.1365754},{"time_hours":571,"approval_perbill":500000000,"support_perbill":1350039,"approval":50,"support":0.1350039},{"time_hours":572,"approval_perbill":500000000,"support_perbill":1334377,"approval":50,"support":0.1334377},{"time_hours":573,"approval_perbill":500000000,"support_perbill":1318769,"approval":50,"support":0.1318769},{"time_hours":574,"approval_perbill":500000000,"support_perbill":1303214,"approval":50,"support":0.1303214},{"time_hours":575,"approval_perbill":500000000,"support_perbill":1287713,"approval":50,"support":0.1287713},{"time_hours":576,"approval_perbill":500000000,"support_perbill":1272264,"approval":50,"support":0.1272264},{"time_hours":577,"approval_perbill":500000000,"support_perbill":1256869,"approval":50,"support":0.1256869},{"time_hours":578,"approval_perbill":500000000,"support_perbill":1241525,"approval":50,"support":0.1241525},{"time_hours":579,"approval_perbill":500000000,"support_perbill":1226233,"approval":50,"support":0.1226233},{"time_hours":580,"approval_perbill":500000000,"support_perbill":1210994,"approval":50,"support":0.1210994},{"time_hours":581,"approval_perbill":500000000,"support_perbill":1195805,"approval":50,"support":0.1195805},{"time_hours":582,"approval_perbill":500000000,"support_perbill":1180668,"approval":50,"support":0.1180668},{"time_hours":583,"approval_perbill":500000000,"support_perbill":1165582,"approval":50,"support":0.1165582},{"time_hours":584,"approval_perbill":500000000,"support_perbill":1150547,"approval":50,"support":0.1150547},{"time_hours":585,"approval_perbill":500000000,"support_perbill":1135563,"approval":50,"support":0.1135563},{"time_hours":586,"approval_perbill":500000000,"support_perbill":1120628,"approval":50,"support":0.1120628},{"time_hours":587,"approval_perbill":500000000,"support_perbill":1105744,"approval":50,"support":0.1105744},{"time_hours":588,"approval_perbill":500000000,"support_perbill":1090909,"approval":50,"support":0.1090909},{"time_hours":589,"approval_perbill":500000000,"support_perbill":1076124,"approval":50,"support":0.1076124},{"time_hours":590,"approval_perbill":500000000,"support_perbill":1061388,"approval":50,"support":0.1061388},{"time_hours":591,"approval_perbill":500000000,"support_perbill":1046701,"approval":50,"support":0.1046701},{"time_hours":592,"approval_perbill":500000000,"support_perbill":1032063,"approval":50,"support":0.1032063},{"time_hours":593,"approval_perbill":500000000,"support_perbill":1017473,"approval":50,"support":0.1017473},{"time_hours":594,"approval_perbill":500000000,"support_perbill":1002932,"approval":50,"support":0.1002932},{"time_hours":595,"approval_perbill":500000000,"support_perbill":988438,"approval":50,"support":0.0988438},{"time_hours":596,"approval_perbill":500000000,"support_perbill":973993,"approval":50,"support":0.0973993},{"time_hours":597,"approval_perbill":500000000,"support_perbill":959595,"approval":50,"support":0.0959595},{"time_hours":598,"approval_perbill":500000000,"support_perbill":945244,"approval":50,"support":0.0945244},{"time_hours":599,"approval_perbill":500000000,"support_perbill":930940,"approval":50,"support":0.093094},{"time_hours":600,"approval_perbill":500000000,"support_perbill":916684,"approval":50,"support":0.0916684},{"time_hours":601,"approval_perbill":500000000,"support_perbill":902473,"approval":50,"support":0.0902473},{"time_hours":602,"approval_perbill":500000000,"support_perbill":888310,"approval":50,"support":0.088831},{"time_hours":603,"approval_perbill":500000000,"support_perbill":874192,"approval":50,"support":0.0874192},{"time_hours":604,"approval_perbill":500000000,"support_perbill":860121,"approval":50,"support":0.0860121},{"time_hours":605,"approval_perbill":500000000,"support_perbill":846095,"approval":50,"support":0.0846095},{"time_hours":606,"approval_perbill":500000000,"support_perbill":832114,"approval":50,"support":0.0832114},{"time_hours":607,"approval_perbill":500000000,"support_perbill":818179,"approval":50,"support":0.0818179},{"time_hours":608,"approval_perbill":500000000,"support_perbill":804289,"approval":50,"support":0.0804289},{"time_hours":609,"approval_perbill":500000000,"support_perbill":790444,"approval":50,"support":0.0790444},{"time_hours":610,"approval_perbill":500000000,"support_perbill":776644,"approval":50,"support":0.0776644},{"time_hours":611,"approval_perbill":500000000,"support_perbill":762888,"approval":50,"support":0.0762888},{"time_hours":612,"approval_perbill":500000000,"support_perbill":749176,"approval":50,"support":0.0749176},{"time_hours":613,"approval_perbill":500000000,"support_perbill":735508,"approval":50,"support":0.0735508},{"time_hours":614,"approval_perbill":500000000,"support_perbill":721884,"approval":50,"support":0.0721884},{"time_hours":615,"approval_perbill":500000000,"support_perbill":708303,"approval":50,"support":0.0708303},{"time_hours":616,"approval_perbill":500000000,"support_perbill":694766,"approval":50,"support":0.0694766},{"time_hours":617,"approval_perbill":500000000,"support_perbill":681272,"approval":50,"support":0.0681272},{"time_hours":618,"approval_perbill":500000000,"support_perbill":667821,"approval":50,"support":0.0667821},{"time_hours":619,"approval_perbill":500000000,"support_perbill":654412,"approval":50,"support":0.0654412},{"time_hours":620,"approval_perbill":500000000,"support_perbill":641047,"approval":50,"support":0.0641047},{"time_hours":621,"approval_perbill":500000000,"support_perbill":627723,"approval":50,"support":0.0627723},{"time_hours":622,"approval_perbill":500000000,"support_perbill":614442,"approval":50,"support":0.0614442},{"time_hours":623,"approval_perbill":500000000,"support_perbill":601202,"approval":50,"support":0.0601202},{"time_hours":624,"approval_perbill":500000000,"support_perbill":588005,"approval":50,"support":0.0588005},{"time_hours":625,"approval_perbill":500000000,"support_perbill":574848,"approval":50,"support":0.0574848},{"time_hours":626,"approval_perbill":500000000,"support_perbill":561734,"approval":50,"support":0.0561734},{"time_hours":627,"approval_perbill":500000000,"support_perbill":548660,"approval":50,"support":0.054866},{"time_hours":628,"approval_perbill":500000000,"support_perbill":535627,"approval":50,"support":0.0535627},{"time_hours":629,"approval_perbill":500000000,"support_perbill":522635,"approval":50,"support":0.0522635},{"time_hours":630,"approval_perbill":500000000,"support_perbill":509684,"approval":50,"support":0.0509684},{"time_hours":631,"approval_perbill":500000000,"support_perbill":496773,"approval":50,"support":0.0496773},{"time_hours":632,"approval_perbill":500000000,"support_perbill":483902,"approval":50,"support":0.0483902},{"time_hours":633,"approval_perbill":500000000,"support_perbill":471071,"approval":50,"support":0.0471071},{"time_hours":634,"approval_perbill":500000000,"support_perbill":458280,"approval":50,"support":0.045828},{"time_hours":635,"approval_perbill":500000000,"support_perbill":445529,"approval":50,"support":0.0445529},{"time_hours":636,"approval_perbill":500000000,"support_perbill":432817,"approval":50,"support":0.0432817},{"time_hours":637,"approval_perbill":500000000,"support_perbill":420144,"approval":50,"support":0.0420144},{"time_hours":638,"approval_perbill":500000000,"support_perbill":407511,"approval":50,"support":0.0407511},{"time_hours":639,"approval_perbill":500000000,"support_perbill":394916,"approval":50,"support":0.0394916},{"time_hours":640,"approval_perbill":500000000,"support_perbill":382360,"approval":50,"support":0.038236},{"time_hours":641,"approval_perbill":500000000,"support_perbill":369843,"approval":50,"support":0.0369843},{"time_hours":642,"approval_perbill":500000000,"support_perbill":357364,"approval":50,"support":0.0357364},{"time_hours":643,"approval_perbill":500000000,"support_perbill":344923,"approval":50,"support":0.0344923},{"time_hours":644,"approval_perbill":500000000,"support_perbill":332520,"approval":50,"support":0.033252},{"time_hours":645,"approval_perbill":500000000,"support_perbill":320155,"approval":50,"support":0.0320155},{"time_hours":646,"approval_perbill":500000000,"support_perbill":307828,"approval":50,"support":0.0307828},{"time_hours":647,"approval_perbill":500000000,"support_perbill":295538,"approval":50,"support":0.0295538},{"time_hours":648,"approval_perbill":500000000,"support_perbill":283286,"approval":50,"support":0.0283286},{"time_hours":649,"approval_perbill":500000000,"support_perbill":271071,"approval":50,"support":0.0271071},{"time_hours":650,"approval_perbill":500000000,"support_perbill":258892,"approval":50,"support":0.0258892},{"time_hours":651,"approval_perbill":500000000,"support_perbill":246751,"approval":50,"support":0.0246751},{"time_hours":652,"approval_perbill":500000000,"support_perbill":234646,"approval":50,"support":0.0234646},{"time_hours":653,"approval_perbill":500000000,"support_perbill":222578,"approval":50,"support":0.0222578},{"time_hours":654,"approval_perbill":500000000,"support_perbill":210546,"approval":50,"support":0.0210546},{"time_hours":655,"approval_perbill":500000000,"support_perbill":198550,"approval":50,"support":0.019855},{"time_hours":656,"approval_perbill":500000000,"support_perbill":186590,"approval":50,"support":0.018659},{"time_hours":657,"approval_perbill":500000000,"support_perbill":174666,"approval":50,"support":0.0174666},{"time_hours":658,"approval_perbill":500000000,"support_perbill":162778,"approval":50,"support":0.0162778},{"time_hours":659,"approval_perbill":500000000,"support_perbill":150925,"approval":50,"support":0.0150925},{"time_hours":660,"approval_perbill":500000000,"support_perbill":139108,"approval":50,"support":0.0139108},{"time_hours":661,"approval_perbill":500000000,"support_perbill":127326,"approval":50,"support":0.0127326},{"time_hours":662,"approval_perbill":500000000,"support_perbill":115578,"approval":50,"support":0.0115578},{"time_hours":663,"approval_perbill":500000000,"support_perbill":103866,"approval":50,"support":0.0103866},{"time_hours":664,"approval_perbill":500000000,"support_perbill":92188,"approval":50,"support":0.0092188},{"time_hours":665,"approval_perbill":500000000,"support_perbill":80545,"approval":50,"support":0.0080545},{"time_hours":666,"approval_perbill":500000000,"support_perbill":68937,"approval":50,"support":0.0068937},{"time_hours":667,"approval_perbill":500000000,"support_perbill":57363,"approval":50,"support":0.0057363},{"time_hours":668,"approval_perbill":500000000,"support_perbill":45822,"approval":50,"support":0.0045822},{"time_hours":669,"approval_perbill":500000000,"support_perbill":34316,"approval":50,"support":0.0034316},{"time_hours":670,"approval_perbill":500000000,"support_perbill":22844,"approval":50,"support":0.0022844},{"time_hours":671,"approval_perbill":500000000,"support_perbill":11405,"approval":50,"support":0.0011405},{"time_hours":672,"approval_perbill":500000000,"support_perbill":0,"approval":50,"support":0}]')},78760:p=>{"use strict";p.exports=JSON.parse('[{"time_hours":0,"approval_perbill":1000000000,"support_perbill":500000026,"approval":100,"support":50.0000026},{"time_hours":1,"approval_perbill":998774510,"support_perbill":455636061,"approval":99.877451,"support":45.5636061},{"time_hours":2,"approval_perbill":997549020,"support_perbill":418401359,"approval":99.754902,"support":41.8401359},{"time_hours":3,"approval_perbill":996323530,"support_perbill":386705228,"approval":99.632353,"support":38.6705228},{"time_hours":4,"approval_perbill":995098040,"support_perbill":359397443,"approval":99.509804,"support":35.9397443},{"time_hours":5,"approval_perbill":993872550,"support_perbill":335625639,"approval":99.387255,"support":33.5625639},{"time_hours":6,"approval_perbill":992647060,"support_perbill":314744813,"approval":99.264706,"support":31.4744813},{"time_hours":7,"approval_perbill":991421570,"support_perbill":296257808,"approval":99.142157,"support":29.6257808},{"time_hours":8,"approval_perbill":990196080,"support_perbill":279775293,"approval":99.019608,"support":27.9775293},{"time_hours":9,"approval_perbill":988970589,"support_perbill":264988013,"approval":98.8970589,"support":26.4988013},{"time_hours":10,"approval_perbill":987745099,"support_perbill":251647242,"approval":98.7745099,"support":25.1647242},{"time_hours":11,"approval_perbill":986519609,"support_perbill":239550622,"approval":98.6519609,"support":23.9550622},{"time_hours":12,"approval_perbill":985294119,"support_perbill":228531862,"approval":98.5294119,"support":22.8531862},{"time_hours":13,"approval_perbill":984068628,"support_perbill":218453039,"approval":98.4068628,"support":21.8453039},{"time_hours":14,"approval_perbill":982843138,"support_perbill":209198815,"approval":98.2843138,"support":20.9198815},{"time_hours":15,"approval_perbill":981617648,"support_perbill":200671963,"approval":98.1617648,"support":20.0671963},{"time_hours":16,"approval_perbill":980392158,"support_perbill":192789972,"approval":98.0392158,"support":19.2789972},{"time_hours":17,"approval_perbill":979166667,"support_perbill":185482348,"approval":97.9166667,"support":18.5482348},{"time_hours":18,"approval_perbill":977941177,"support_perbill":178688524,"approval":97.7941177,"support":17.8688524},{"time_hours":19,"approval_perbill":976715687,"support_perbill":172356151,"approval":97.6715687,"support":17.2356151},{"time_hours":20,"approval_perbill":975490197,"support_perbill":166439756,"approval":97.5490197,"support":16.6439756},{"time_hours":21,"approval_perbill":974264706,"support_perbill":160899652,"approval":97.4264706,"support":16.0899652},{"time_hours":22,"approval_perbill":973039216,"support_perbill":155701053,"approval":97.3039216,"support":15.5701053},{"time_hours":23,"approval_perbill":971813726,"support_perbill":150813323,"approval":97.1813726,"support":15.0813323},{"time_hours":24,"approval_perbill":970588236,"support_perbill":146209386,"approval":97.0588236,"support":14.6209386},{"time_hours":25,"approval_perbill":969362746,"support_perbill":141865225,"approval":96.9362746,"support":14.1865225},{"time_hours":26,"approval_perbill":968137256,"support_perbill":137759452,"approval":96.8137256,"support":13.7759452},{"time_hours":27,"approval_perbill":966911766,"support_perbill":133872975,"approval":96.6911766,"support":13.3872975},{"time_hours":28,"approval_perbill":965686276,"support_perbill":130188679,"approval":96.5686276,"support":13.0188679},{"time_hours":29,"approval_perbill":964460786,"support_perbill":126691186,"approval":96.4460786,"support":12.6691186},{"time_hours":30,"approval_perbill":963235295,"support_perbill":123366639,"approval":96.3235295,"support":12.3366639},{"time_hours":31,"approval_perbill":962009805,"support_perbill":120202524,"approval":96.2009805,"support":12.0202524},{"time_hours":32,"approval_perbill":960784315,"support_perbill":117187499,"approval":96.0784315,"support":11.7187499},{"time_hours":33,"approval_perbill":959558825,"support_perbill":114311269,"approval":95.9558825,"support":11.4311269},{"time_hours":34,"approval_perbill":958333334,"support_perbill":111564465,"approval":95.8333334,"support":11.1564465},{"time_hours":35,"approval_perbill":957107844,"support_perbill":108938546,"approval":95.7107844,"support":10.8938546},{"time_hours":36,"approval_perbill":955882354,"support_perbill":106425701,"approval":95.5882354,"support":10.6425701},{"time_hours":37,"approval_perbill":954656864,"support_perbill":104018782,"approval":95.4656864,"support":10.4018782},{"time_hours":38,"approval_perbill":953431373,"support_perbill":101711228,"approval":95.3431373,"support":10.1711228},{"time_hours":39,"approval_perbill":952205883,"support_perbill":99497012,"approval":95.2205883,"support":9.9497012},{"time_hours":40,"approval_perbill":950980393,"support_perbill":97370582,"approval":95.0980393,"support":9.7370582},{"time_hours":41,"approval_perbill":949754903,"support_perbill":95326819,"approval":94.9754903,"support":9.5326819},{"time_hours":42,"approval_perbill":948529412,"support_perbill":93360994,"approval":94.8529412,"support":9.3360994},{"time_hours":43,"approval_perbill":947303922,"support_perbill":91468733,"approval":94.7303922,"support":9.1468733},{"time_hours":44,"approval_perbill":946078432,"support_perbill":89645982,"approval":94.6078432,"support":8.9645982},{"time_hours":45,"approval_perbill":944852942,"support_perbill":87888981,"approval":94.4852942,"support":8.7888981},{"time_hours":46,"approval_perbill":943627452,"support_perbill":86194234,"approval":94.3627452,"support":8.6194234},{"time_hours":47,"approval_perbill":942401961,"support_perbill":84558490,"approval":94.2401961,"support":8.455849},{"time_hours":48,"approval_perbill":941176471,"support_perbill":82978722,"approval":94.1176471,"support":8.2978722},{"time_hours":49,"approval_perbill":939950981,"support_perbill":81452103,"approval":93.9950981,"support":8.1452103},{"time_hours":50,"approval_perbill":938725491,"support_perbill":79975997,"approval":93.8725491,"support":7.9975997},{"time_hours":51,"approval_perbill":937500001,"support_perbill":78547936,"approval":93.7500001,"support":7.8547936},{"time_hours":52,"approval_perbill":936274511,"support_perbill":77165614,"approval":93.6274511,"support":7.7165614},{"time_hours":53,"approval_perbill":935049021,"support_perbill":75826867,"approval":93.5049021,"support":7.5826867},{"time_hours":54,"approval_perbill":933823531,"support_perbill":74529666,"approval":93.3823531,"support":7.4529666},{"time_hours":55,"approval_perbill":932598040,"support_perbill":73272106,"approval":93.259804,"support":7.3272106},{"time_hours":56,"approval_perbill":931372550,"support_perbill":72052400,"approval":93.137255,"support":7.20524},{"time_hours":57,"approval_perbill":930147060,"support_perbill":70868862,"approval":93.014706,"support":7.0868862},{"time_hours":58,"approval_perbill":928921570,"support_perbill":69719908,"approval":92.892157,"support":6.9719908},{"time_hours":59,"approval_perbill":927696079,"support_perbill":68604042,"approval":92.7696079,"support":6.8604042},{"time_hours":60,"approval_perbill":926470589,"support_perbill":67519857,"approval":92.6470589,"support":6.7519857},{"time_hours":61,"approval_perbill":925245099,"support_perbill":66466022,"approval":92.5245099,"support":6.6466022},{"time_hours":62,"approval_perbill":924019609,"support_perbill":65441280,"approval":92.4019609,"support":6.544128},{"time_hours":63,"approval_perbill":922794118,"support_perbill":64444443,"approval":92.2794118,"support":6.4444443},{"time_hours":64,"approval_perbill":921568628,"support_perbill":63474386,"approval":92.1568628,"support":6.3474386},{"time_hours":65,"approval_perbill":920343138,"support_perbill":62530044,"approval":92.0343138,"support":6.2530044},{"time_hours":66,"approval_perbill":919117648,"support_perbill":61610409,"approval":91.9117648,"support":6.1610409},{"time_hours":67,"approval_perbill":917892158,"support_perbill":60714523,"approval":91.7892158,"support":6.0714523},{"time_hours":68,"approval_perbill":916666667,"support_perbill":59841478,"approval":91.6666667,"support":5.9841478},{"time_hours":69,"approval_perbill":915441177,"support_perbill":58990411,"approval":91.5441177,"support":5.8990411},{"time_hours":70,"approval_perbill":914215687,"support_perbill":58160504,"approval":91.4215687,"support":5.8160504},{"time_hours":71,"approval_perbill":912990197,"support_perbill":57350975,"approval":91.2990197,"support":5.7350975},{"time_hours":72,"approval_perbill":911764706,"support_perbill":56561084,"approval":91.1764706,"support":5.6561084},{"time_hours":73,"approval_perbill":910539216,"support_perbill":55790126,"approval":91.0539216,"support":5.5790126},{"time_hours":74,"approval_perbill":909313726,"support_perbill":55037426,"approval":90.9313726,"support":5.5037426},{"time_hours":75,"approval_perbill":908088236,"support_perbill":54302345,"approval":90.8088236,"support":5.4302345},{"time_hours":76,"approval_perbill":906862746,"support_perbill":53584271,"approval":90.6862746,"support":5.3584271},{"time_hours":77,"approval_perbill":905637256,"support_perbill":52882620,"approval":90.5637256,"support":5.288262},{"time_hours":78,"approval_perbill":904411766,"support_perbill":52196835,"approval":90.4411766,"support":5.2196835},{"time_hours":79,"approval_perbill":903186276,"support_perbill":51526385,"approval":90.3186276,"support":5.1526385},{"time_hours":80,"approval_perbill":901960785,"support_perbill":50870759,"approval":90.1960785,"support":5.0870759},{"time_hours":81,"approval_perbill":900735295,"support_perbill":50229473,"approval":90.0735295,"support":5.0229473},{"time_hours":82,"approval_perbill":899509805,"support_perbill":49602061,"approval":89.9509805,"support":4.9602061},{"time_hours":83,"approval_perbill":898284315,"support_perbill":48988077,"approval":89.8284315,"support":4.8988077},{"time_hours":84,"approval_perbill":897058824,"support_perbill":48387095,"approval":89.7058824,"support":4.8387095},{"time_hours":85,"approval_perbill":895833334,"support_perbill":47798707,"approval":89.5833334,"support":4.7798707},{"time_hours":86,"approval_perbill":894607844,"support_perbill":47222519,"approval":89.4607844,"support":4.7222519},{"time_hours":87,"approval_perbill":893382354,"support_perbill":46658158,"approval":89.3382354,"support":4.6658158},{"time_hours":88,"approval_perbill":892156864,"support_perbill":46105262,"approval":89.2156864,"support":4.6105262},{"time_hours":89,"approval_perbill":890931373,"support_perbill":45563485,"approval":89.0931373,"support":4.5563485},{"time_hours":90,"approval_perbill":889705883,"support_perbill":45032496,"approval":88.9705883,"support":4.5032496},{"time_hours":91,"approval_perbill":888480393,"support_perbill":44511976,"approval":88.8480393,"support":4.4511976},{"time_hours":92,"approval_perbill":887254903,"support_perbill":44001617,"approval":88.7254903,"support":4.4001617},{"time_hours":93,"approval_perbill":886029412,"support_perbill":43501126,"approval":88.6029412,"support":4.3501126},{"time_hours":94,"approval_perbill":884803922,"support_perbill":43010218,"approval":88.4803922,"support":4.3010218},{"time_hours":95,"approval_perbill":883578432,"support_perbill":42528621,"approval":88.3578432,"support":4.2528621},{"time_hours":96,"approval_perbill":882352942,"support_perbill":42056074,"approval":88.2352942,"support":4.2056074},{"time_hours":97,"approval_perbill":881127452,"support_perbill":41592321,"approval":88.1127452,"support":4.1592321},{"time_hours":98,"approval_perbill":879901962,"support_perbill":41137122,"approval":87.9901962,"support":4.1137122},{"time_hours":99,"approval_perbill":878676472,"support_perbill":40690242,"approval":87.8676472,"support":4.0690242},{"time_hours":100,"approval_perbill":877450982,"support_perbill":40251453,"approval":87.7450982,"support":4.0251453},{"time_hours":101,"approval_perbill":876225491,"support_perbill":39820539,"approval":87.6225491,"support":3.9820539},{"time_hours":102,"approval_perbill":875000001,"support_perbill":39397289,"approval":87.5000001,"support":3.9397289},{"time_hours":103,"approval_perbill":873774511,"support_perbill":38981501,"approval":87.3774511,"support":3.8981501},{"time_hours":104,"approval_perbill":872549021,"support_perbill":38572980,"approval":87.2549021,"support":3.857298},{"time_hours":105,"approval_perbill":871323530,"support_perbill":38171535,"approval":87.132353,"support":3.8171535},{"time_hours":106,"approval_perbill":870098040,"support_perbill":37776985,"approval":87.009804,"support":3.7776985},{"time_hours":107,"approval_perbill":868872550,"support_perbill":37389155,"approval":86.887255,"support":3.7389155},{"time_hours":108,"approval_perbill":867647060,"support_perbill":37007873,"approval":86.764706,"support":3.7007873},{"time_hours":109,"approval_perbill":866421570,"support_perbill":36632975,"approval":86.642157,"support":3.6632975},{"time_hours":110,"approval_perbill":865196079,"support_perbill":36264302,"approval":86.5196079,"support":3.6264302},{"time_hours":111,"approval_perbill":863970589,"support_perbill":35901701,"approval":86.3970589,"support":3.5901701},{"time_hours":112,"approval_perbill":862745099,"support_perbill":35545023,"approval":86.2745099,"support":3.5545023},{"time_hours":113,"approval_perbill":861519609,"support_perbill":35194123,"approval":86.1519609,"support":3.5194123},{"time_hours":114,"approval_perbill":860294118,"support_perbill":34848862,"approval":86.0294118,"support":3.4848862},{"time_hours":115,"approval_perbill":859068628,"support_perbill":34509106,"approval":85.9068628,"support":3.4509106},{"time_hours":116,"approval_perbill":857843138,"support_perbill":34174724,"approval":85.7843138,"support":3.4174724},{"time_hours":117,"approval_perbill":856617648,"support_perbill":33845590,"approval":85.6617648,"support":3.384559},{"time_hours":118,"approval_perbill":855392157,"support_perbill":33521580,"approval":85.5392157,"support":3.352158},{"time_hours":119,"approval_perbill":854166667,"support_perbill":33202577,"approval":85.4166667,"support":3.3202577},{"time_hours":120,"approval_perbill":852941177,"support_perbill":32888464,"approval":85.2941177,"support":3.2888464},{"time_hours":121,"approval_perbill":851715687,"support_perbill":32579131,"approval":85.1715687,"support":3.2579131},{"time_hours":122,"approval_perbill":850490197,"support_perbill":32274469,"approval":85.0490197,"support":3.2274469},{"time_hours":123,"approval_perbill":849264707,"support_perbill":31974373,"approval":84.9264707,"support":3.1974373},{"time_hours":124,"approval_perbill":848039217,"support_perbill":31678741,"approval":84.8039217,"support":3.1678741},{"time_hours":125,"approval_perbill":846813727,"support_perbill":31387475,"approval":84.6813727,"support":3.1387475},{"time_hours":126,"approval_perbill":845588236,"support_perbill":31100477,"approval":84.5588236,"support":3.1100477},{"time_hours":127,"approval_perbill":844362746,"support_perbill":30817656,"approval":84.4362746,"support":3.0817656},{"time_hours":128,"approval_perbill":843137256,"support_perbill":30538921,"approval":84.3137256,"support":3.0538921},{"time_hours":129,"approval_perbill":841911766,"support_perbill":30264184,"approval":84.1911766,"support":3.0264184},{"time_hours":130,"approval_perbill":840686276,"support_perbill":29993358,"approval":84.0686276,"support":2.9993358},{"time_hours":131,"approval_perbill":839460785,"support_perbill":29726363,"approval":83.9460785,"support":2.9726363},{"time_hours":132,"approval_perbill":838235295,"support_perbill":29463116,"approval":83.8235295,"support":2.9463116},{"time_hours":133,"approval_perbill":837009805,"support_perbill":29203539,"approval":83.7009805,"support":2.9203539},{"time_hours":134,"approval_perbill":835784315,"support_perbill":28947556,"approval":83.5784315,"support":2.8947556},{"time_hours":135,"approval_perbill":834558824,"support_perbill":28695094,"approval":83.4558824,"support":2.8695094},{"time_hours":136,"approval_perbill":833333334,"support_perbill":28446079,"approval":83.3333334,"support":2.8446079},{"time_hours":137,"approval_perbill":832107844,"support_perbill":28200442,"approval":83.2107844,"support":2.8200442},{"time_hours":138,"approval_perbill":830882354,"support_perbill":27958114,"approval":83.0882354,"support":2.7958114},{"time_hours":139,"approval_perbill":829656863,"support_perbill":27719030,"approval":82.9656863,"support":2.771903},{"time_hours":140,"approval_perbill":828431373,"support_perbill":27483123,"approval":82.8431373,"support":2.7483123},{"time_hours":141,"approval_perbill":827205883,"support_perbill":27250333,"approval":82.7205883,"support":2.7250333},{"time_hours":142,"approval_perbill":825980393,"support_perbill":27020596,"approval":82.5980393,"support":2.7020596},{"time_hours":143,"approval_perbill":824754902,"support_perbill":26793853,"approval":82.4754902,"support":2.6793853},{"time_hours":144,"approval_perbill":823529412,"support_perbill":26570047,"approval":82.3529412,"support":2.6570047},{"time_hours":145,"approval_perbill":822303922,"support_perbill":26349121,"approval":82.2303922,"support":2.6349121},{"time_hours":146,"approval_perbill":821078432,"support_perbill":26131019,"approval":82.1078432,"support":2.6131019},{"time_hours":147,"approval_perbill":819852942,"support_perbill":25915687,"approval":81.9852942,"support":2.5915687},{"time_hours":148,"approval_perbill":818627452,"support_perbill":25703073,"approval":81.8627452,"support":2.5703073},{"time_hours":149,"approval_perbill":817401962,"support_perbill":25493126,"approval":81.7401962,"support":2.5493126},{"time_hours":150,"approval_perbill":816176472,"support_perbill":25285796,"approval":81.6176472,"support":2.5285796},{"time_hours":151,"approval_perbill":814950982,"support_perbill":25081035,"approval":81.4950982,"support":2.5081035},{"time_hours":152,"approval_perbill":813725491,"support_perbill":24878795,"approval":81.3725491,"support":2.4878795},{"time_hours":153,"approval_perbill":812500001,"support_perbill":24679029,"approval":81.2500001,"support":2.4679029},{"time_hours":154,"approval_perbill":811274511,"support_perbill":24481693,"approval":81.1274511,"support":2.4481693},{"time_hours":155,"approval_perbill":810049021,"support_perbill":24286742,"approval":81.0049021,"support":2.4286742},{"time_hours":156,"approval_perbill":808823530,"support_perbill":24094134,"approval":80.882353,"support":2.4094134},{"time_hours":157,"approval_perbill":807598040,"support_perbill":23903827,"approval":80.759804,"support":2.3903827},{"time_hours":158,"approval_perbill":806372550,"support_perbill":23715779,"approval":80.637255,"support":2.3715779},{"time_hours":159,"approval_perbill":805147060,"support_perbill":23529951,"approval":80.514706,"support":2.3529951},{"time_hours":160,"approval_perbill":803921569,"support_perbill":23346303,"approval":80.3921569,"support":2.3346303},{"time_hours":161,"approval_perbill":802696079,"support_perbill":23164797,"approval":80.2696079,"support":2.3164797},{"time_hours":162,"approval_perbill":801470589,"support_perbill":22985397,"approval":80.1470589,"support":2.2985397},{"time_hours":163,"approval_perbill":800245099,"support_perbill":22808065,"approval":80.0245099,"support":2.2808065},{"time_hours":164,"approval_perbill":799019608,"support_perbill":22632766,"approval":79.9019608,"support":2.2632766},{"time_hours":165,"approval_perbill":797794118,"support_perbill":22459466,"approval":79.7794118,"support":2.2459466},{"time_hours":166,"approval_perbill":796568628,"support_perbill":22288130,"approval":79.6568628,"support":2.228813},{"time_hours":167,"approval_perbill":795343138,"support_perbill":22118725,"approval":79.5343138,"support":2.2118725},{"time_hours":168,"approval_perbill":794117648,"support_perbill":21951219,"approval":79.4117648,"support":2.1951219},{"time_hours":169,"approval_perbill":792892158,"support_perbill":21785579,"approval":79.2892158,"support":2.1785579},{"time_hours":170,"approval_perbill":791666668,"support_perbill":21621776,"approval":79.1666668,"support":2.1621776},{"time_hours":171,"approval_perbill":790441178,"support_perbill":21459778,"approval":79.0441178,"support":2.1459778},{"time_hours":172,"approval_perbill":789215688,"support_perbill":21299556,"approval":78.9215688,"support":2.1299556},{"time_hours":173,"approval_perbill":787990197,"support_perbill":21141081,"approval":78.7990197,"support":2.1141081},{"time_hours":174,"approval_perbill":786764707,"support_perbill":20984324,"approval":78.6764707,"support":2.0984324},{"time_hours":175,"approval_perbill":785539217,"support_perbill":20829258,"approval":78.5539217,"support":2.0829258},{"time_hours":176,"approval_perbill":784313727,"support_perbill":20675855,"approval":78.4313727,"support":2.0675855},{"time_hours":177,"approval_perbill":783088236,"support_perbill":20524089,"approval":78.3088236,"support":2.0524089},{"time_hours":178,"approval_perbill":781862746,"support_perbill":20373934,"approval":78.1862746,"support":2.0373934},{"time_hours":179,"approval_perbill":780637256,"support_perbill":20225364,"approval":78.0637256,"support":2.0225364},{"time_hours":180,"approval_perbill":779411766,"support_perbill":20078354,"approval":77.9411766,"support":2.0078354},{"time_hours":181,"approval_perbill":778186275,"support_perbill":19932880,"approval":77.8186275,"support":1.993288},{"time_hours":182,"approval_perbill":776960785,"support_perbill":19788917,"approval":77.6960785,"support":1.9788917},{"time_hours":183,"approval_perbill":775735295,"support_perbill":19646444,"approval":77.5735295,"support":1.9646444},{"time_hours":184,"approval_perbill":774509805,"support_perbill":19505435,"approval":77.4509805,"support":1.9505435},{"time_hours":185,"approval_perbill":773284314,"support_perbill":19365870,"approval":77.3284314,"support":1.936587},{"time_hours":186,"approval_perbill":772058824,"support_perbill":19227725,"approval":77.2058824,"support":1.9227725},{"time_hours":187,"approval_perbill":770833334,"support_perbill":19090980,"approval":77.0833334,"support":1.909098},{"time_hours":188,"approval_perbill":769607844,"support_perbill":18955613,"approval":76.9607844,"support":1.8955613},{"time_hours":189,"approval_perbill":768382353,"support_perbill":18821603,"approval":76.8382353,"support":1.8821603},{"time_hours":190,"approval_perbill":767156863,"support_perbill":18688931,"approval":76.7156863,"support":1.8688931},{"time_hours":191,"approval_perbill":765931373,"support_perbill":18557575,"approval":76.5931373,"support":1.8557575},{"time_hours":192,"approval_perbill":764705883,"support_perbill":18427518,"approval":76.4705883,"support":1.8427518},{"time_hours":193,"approval_perbill":763480393,"support_perbill":18298739,"approval":76.3480393,"support":1.8298739},{"time_hours":194,"approval_perbill":762254903,"support_perbill":18171219,"approval":76.2254903,"support":1.8171219},{"time_hours":195,"approval_perbill":761029413,"support_perbill":18044941,"approval":76.1029413,"support":1.8044941},{"time_hours":196,"approval_perbill":759803923,"support_perbill":17919887,"approval":75.9803923,"support":1.7919887},{"time_hours":197,"approval_perbill":758578433,"support_perbill":17796038,"approval":75.8578433,"support":1.7796038},{"time_hours":198,"approval_perbill":757352942,"support_perbill":17673377,"approval":75.7352942,"support":1.7673377},{"time_hours":199,"approval_perbill":756127452,"support_perbill":17551888,"approval":75.6127452,"support":1.7551888},{"time_hours":200,"approval_perbill":754901962,"support_perbill":17431553,"approval":75.4901962,"support":1.7431553},{"time_hours":201,"approval_perbill":753676472,"support_perbill":17312357,"approval":75.3676472,"support":1.7312357},{"time_hours":202,"approval_perbill":752450981,"support_perbill":17194282,"approval":75.2450981,"support":1.7194282},{"time_hours":203,"approval_perbill":751225491,"support_perbill":17077315,"approval":75.1225491,"support":1.7077315},{"time_hours":204,"approval_perbill":750000001,"support_perbill":16961437,"approval":75.0000001,"support":1.6961437},{"time_hours":205,"approval_perbill":748774511,"support_perbill":16846636,"approval":74.8774511,"support":1.6846636},{"time_hours":206,"approval_perbill":747549020,"support_perbill":16732895,"approval":74.754902,"support":1.6732895},{"time_hours":207,"approval_perbill":746323530,"support_perbill":16620201,"approval":74.632353,"support":1.6620201},{"time_hours":208,"approval_perbill":745098040,"support_perbill":16508538,"approval":74.509804,"support":1.6508538},{"time_hours":209,"approval_perbill":743872550,"support_perbill":16397893,"approval":74.387255,"support":1.6397893},{"time_hours":210,"approval_perbill":742647059,"support_perbill":16288252,"approval":74.2647059,"support":1.6288252},{"time_hours":211,"approval_perbill":741421569,"support_perbill":16179601,"approval":74.1421569,"support":1.6179601},{"time_hours":212,"approval_perbill":740196079,"support_perbill":16071927,"approval":74.0196079,"support":1.6071927},{"time_hours":213,"approval_perbill":738970589,"support_perbill":15965217,"approval":73.8970589,"support":1.5965217},{"time_hours":214,"approval_perbill":737745099,"support_perbill":15859457,"approval":73.7745099,"support":1.5859457},{"time_hours":215,"approval_perbill":736519608,"support_perbill":15754636,"approval":73.6519608,"support":1.5754636},{"time_hours":216,"approval_perbill":735294118,"support_perbill":15650741,"approval":73.5294118,"support":1.5650741},{"time_hours":217,"approval_perbill":734068628,"support_perbill":15547759,"approval":73.4068628,"support":1.5547759},{"time_hours":218,"approval_perbill":732843138,"support_perbill":15445679,"approval":73.2843138,"support":1.5445679},{"time_hours":219,"approval_perbill":731617648,"support_perbill":15344488,"approval":73.1617648,"support":1.5344488},{"time_hours":220,"approval_perbill":730392158,"support_perbill":15244176,"approval":73.0392158,"support":1.5244176},{"time_hours":221,"approval_perbill":729166668,"support_perbill":15144731,"approval":72.9166668,"support":1.5144731},{"time_hours":222,"approval_perbill":727941178,"support_perbill":15046141,"approval":72.7941178,"support":1.5046141},{"time_hours":223,"approval_perbill":726715687,"support_perbill":14948396,"approval":72.6715687,"support":1.4948396},{"time_hours":224,"approval_perbill":725490197,"support_perbill":14851485,"approval":72.5490197,"support":1.4851485},{"time_hours":225,"approval_perbill":724264707,"support_perbill":14755396,"approval":72.4264707,"support":1.4755396},{"time_hours":226,"approval_perbill":723039217,"support_perbill":14660121,"approval":72.3039217,"support":1.4660121},{"time_hours":227,"approval_perbill":721813726,"support_perbill":14565648,"approval":72.1813726,"support":1.4565648},{"time_hours":228,"approval_perbill":720588236,"support_perbill":14471968,"approval":72.0588236,"support":1.4471968},{"time_hours":229,"approval_perbill":719362746,"support_perbill":14379070,"approval":71.9362746,"support":1.437907},{"time_hours":230,"approval_perbill":718137256,"support_perbill":14286945,"approval":71.8137256,"support":1.4286945},{"time_hours":231,"approval_perbill":716911765,"support_perbill":14195583,"approval":71.6911765,"support":1.4195583},{"time_hours":232,"approval_perbill":715686275,"support_perbill":14104975,"approval":71.5686275,"support":1.4104975},{"time_hours":233,"approval_perbill":714460785,"support_perbill":14015111,"approval":71.4460785,"support":1.4015111},{"time_hours":234,"approval_perbill":713235295,"support_perbill":13925982,"approval":71.3235295,"support":1.3925982},{"time_hours":235,"approval_perbill":712009805,"support_perbill":13837579,"approval":71.2009805,"support":1.3837579},{"time_hours":236,"approval_perbill":710784314,"support_perbill":13749894,"approval":71.0784314,"support":1.3749894},{"time_hours":237,"approval_perbill":709558824,"support_perbill":13662918,"approval":70.9558824,"support":1.3662918},{"time_hours":238,"approval_perbill":708333334,"support_perbill":13576642,"approval":70.8333334,"support":1.3576642},{"time_hours":239,"approval_perbill":707107844,"support_perbill":13491057,"approval":70.7107844,"support":1.3491057},{"time_hours":240,"approval_perbill":705882353,"support_perbill":13406156,"approval":70.5882353,"support":1.3406156},{"time_hours":241,"approval_perbill":704656863,"support_perbill":13321931,"approval":70.4656863,"support":1.3321931},{"time_hours":242,"approval_perbill":703431373,"support_perbill":13238372,"approval":70.3431373,"support":1.3238372},{"time_hours":243,"approval_perbill":702205883,"support_perbill":13155473,"approval":70.2205883,"support":1.3155473},{"time_hours":244,"approval_perbill":700980393,"support_perbill":13073226,"approval":70.0980393,"support":1.3073226},{"time_hours":245,"approval_perbill":699754903,"support_perbill":12991622,"approval":69.9754903,"support":1.2991622},{"time_hours":246,"approval_perbill":698529413,"support_perbill":12910655,"approval":69.8529413,"support":1.2910655},{"time_hours":247,"approval_perbill":697303923,"support_perbill":12830317,"approval":69.7303923,"support":1.2830317},{"time_hours":248,"approval_perbill":696078432,"support_perbill":12750601,"approval":69.6078432,"support":1.2750601},{"time_hours":249,"approval_perbill":694852942,"support_perbill":12671499,"approval":69.4852942,"support":1.2671499},{"time_hours":250,"approval_perbill":693627452,"support_perbill":12593005,"approval":69.3627452,"support":1.2593005},{"time_hours":251,"approval_perbill":692401962,"support_perbill":12515111,"approval":69.2401962,"support":1.2515111},{"time_hours":252,"approval_perbill":691176471,"support_perbill":12437810,"approval":69.1176471,"support":1.243781},{"time_hours":253,"approval_perbill":689950981,"support_perbill":12361097,"approval":68.9950981,"support":1.2361097},{"time_hours":254,"approval_perbill":688725491,"support_perbill":12284964,"approval":68.8725491,"support":1.2284964},{"time_hours":255,"approval_perbill":687500001,"support_perbill":12209404,"approval":68.7500001,"support":1.2209404},{"time_hours":256,"approval_perbill":686274511,"support_perbill":12134411,"approval":68.6274511,"support":1.2134411},{"time_hours":257,"approval_perbill":685049020,"support_perbill":12059980,"approval":68.504902,"support":1.205998},{"time_hours":258,"approval_perbill":683823530,"support_perbill":11986103,"approval":68.382353,"support":1.1986103},{"time_hours":259,"approval_perbill":682598040,"support_perbill":11912774,"approval":68.259804,"support":1.1912774},{"time_hours":260,"approval_perbill":681372550,"support_perbill":11839987,"approval":68.137255,"support":1.1839987},{"time_hours":261,"approval_perbill":680147059,"support_perbill":11767737,"approval":68.0147059,"support":1.1767737},{"time_hours":262,"approval_perbill":678921569,"support_perbill":11696017,"approval":67.8921569,"support":1.1696017},{"time_hours":263,"approval_perbill":677696079,"support_perbill":11624822,"approval":67.7696079,"support":1.1624822},{"time_hours":264,"approval_perbill":676470589,"support_perbill":11554145,"approval":67.6470589,"support":1.1554145},{"time_hours":265,"approval_perbill":675245099,"support_perbill":11483982,"approval":67.5245099,"support":1.1483982},{"time_hours":266,"approval_perbill":674019609,"support_perbill":11414326,"approval":67.4019609,"support":1.1414326},{"time_hours":267,"approval_perbill":672794119,"support_perbill":11345173,"approval":67.2794119,"support":1.1345173},{"time_hours":268,"approval_perbill":671568629,"support_perbill":11276516,"approval":67.1568629,"support":1.1276516},{"time_hours":269,"approval_perbill":670343138,"support_perbill":11208351,"approval":67.0343138,"support":1.1208351},{"time_hours":270,"approval_perbill":669117648,"support_perbill":11140671,"approval":66.9117648,"support":1.1140671},{"time_hours":271,"approval_perbill":667892158,"support_perbill":11073473,"approval":66.7892158,"support":1.1073473},{"time_hours":272,"approval_perbill":666666668,"support_perbill":11006750,"approval":66.6666668,"support":1.100675},{"time_hours":273,"approval_perbill":665441177,"support_perbill":10940499,"approval":66.5441177,"support":1.0940499},{"time_hours":274,"approval_perbill":664215687,"support_perbill":10874713,"approval":66.4215687,"support":1.0874713},{"time_hours":275,"approval_perbill":662990197,"support_perbill":10809388,"approval":66.2990197,"support":1.0809388},{"time_hours":276,"approval_perbill":661764707,"support_perbill":10744519,"approval":66.1764707,"support":1.0744519},{"time_hours":277,"approval_perbill":660539217,"support_perbill":10680101,"approval":66.0539217,"support":1.0680101},{"time_hours":278,"approval_perbill":659313726,"support_perbill":10616130,"approval":65.9313726,"support":1.061613},{"time_hours":279,"approval_perbill":658088236,"support_perbill":10552601,"approval":65.8088236,"support":1.0552601},{"time_hours":280,"approval_perbill":656862746,"support_perbill":10489510,"approval":65.6862746,"support":1.048951},{"time_hours":281,"approval_perbill":655637256,"support_perbill":10426852,"approval":65.5637256,"support":1.0426852},{"time_hours":282,"approval_perbill":654411765,"support_perbill":10364622,"approval":65.4411765,"support":1.0364622},{"time_hours":283,"approval_perbill":653186275,"support_perbill":10302816,"approval":65.3186275,"support":1.0302816},{"time_hours":284,"approval_perbill":651960785,"support_perbill":10241430,"approval":65.1960785,"support":1.024143},{"time_hours":285,"approval_perbill":650735295,"support_perbill":10180459,"approval":65.0735295,"support":1.0180459},{"time_hours":286,"approval_perbill":649509804,"support_perbill":10119900,"approval":64.9509804,"support":1.01199},{"time_hours":287,"approval_perbill":648284314,"support_perbill":10059748,"approval":64.8284314,"support":1.0059748},{"time_hours":288,"approval_perbill":647058824,"support_perbill":10000000,"approval":64.7058824,"support":1},{"time_hours":289,"approval_perbill":645833334,"support_perbill":9940650,"approval":64.5833334,"support":0.994065},{"time_hours":290,"approval_perbill":644607844,"support_perbill":9881695,"approval":64.4607844,"support":0.9881695},{"time_hours":291,"approval_perbill":643382354,"support_perbill":9823132,"approval":64.3382354,"support":0.9823132},{"time_hours":292,"approval_perbill":642156864,"support_perbill":9764955,"approval":64.2156864,"support":0.9764955},{"time_hours":293,"approval_perbill":640931374,"support_perbill":9707163,"approval":64.0931374,"support":0.9707163},{"time_hours":294,"approval_perbill":639705883,"support_perbill":9649749,"approval":63.9705883,"support":0.9649749},{"time_hours":295,"approval_perbill":638480393,"support_perbill":9592712,"approval":63.8480393,"support":0.9592712},{"time_hours":296,"approval_perbill":637254903,"support_perbill":9536047,"approval":63.7254903,"support":0.9536047},{"time_hours":297,"approval_perbill":636029413,"support_perbill":9479751,"approval":63.6029413,"support":0.9479751},{"time_hours":298,"approval_perbill":634803923,"support_perbill":9423820,"approval":63.4803923,"support":0.942382},{"time_hours":299,"approval_perbill":633578432,"support_perbill":9368250,"approval":63.3578432,"support":0.936825},{"time_hours":300,"approval_perbill":632352942,"support_perbill":9313038,"approval":63.2352942,"support":0.9313038},{"time_hours":301,"approval_perbill":631127452,"support_perbill":9258181,"approval":63.1127452,"support":0.9258181},{"time_hours":302,"approval_perbill":629901962,"support_perbill":9203674,"approval":62.9901962,"support":0.9203674},{"time_hours":303,"approval_perbill":628676471,"support_perbill":9149516,"approval":62.8676471,"support":0.9149516},{"time_hours":304,"approval_perbill":627450981,"support_perbill":9095702,"approval":62.7450981,"support":0.9095702},{"time_hours":305,"approval_perbill":626225491,"support_perbill":9042230,"approval":62.6225491,"support":0.904223},{"time_hours":306,"approval_perbill":625000001,"support_perbill":8989095,"approval":62.5000001,"support":0.8989095},{"time_hours":307,"approval_perbill":623774510,"support_perbill":8936295,"approval":62.377451,"support":0.8936295},{"time_hours":308,"approval_perbill":622549020,"support_perbill":8883826,"approval":62.254902,"support":0.8883826},{"time_hours":309,"approval_perbill":621323530,"support_perbill":8831687,"approval":62.132353,"support":0.8831687},{"time_hours":310,"approval_perbill":620098040,"support_perbill":8779872,"approval":62.009804,"support":0.8779872},{"time_hours":311,"approval_perbill":618872549,"support_perbill":8728380,"approval":61.8872549,"support":0.872838},{"time_hours":312,"approval_perbill":617647059,"support_perbill":8677207,"approval":61.7647059,"support":0.8677207},{"time_hours":313,"approval_perbill":616421569,"support_perbill":8626351,"approval":61.6421569,"support":0.8626351},{"time_hours":314,"approval_perbill":615196079,"support_perbill":8575808,"approval":61.5196079,"support":0.8575808},{"time_hours":315,"approval_perbill":613970589,"support_perbill":8525576,"approval":61.3970589,"support":0.8525576},{"time_hours":316,"approval_perbill":612745099,"support_perbill":8475652,"approval":61.2745099,"support":0.8475652},{"time_hours":317,"approval_perbill":611519609,"support_perbill":8426032,"approval":61.1519609,"support":0.8426032},{"time_hours":318,"approval_perbill":610294119,"support_perbill":8376715,"approval":61.0294119,"support":0.8376715},{"time_hours":319,"approval_perbill":609068629,"support_perbill":8327697,"approval":60.9068629,"support":0.8327697},{"time_hours":320,"approval_perbill":607843138,"support_perbill":8278976,"approval":60.7843138,"support":0.8278976},{"time_hours":321,"approval_perbill":606617648,"support_perbill":8230549,"approval":60.6617648,"support":0.8230549},{"time_hours":322,"approval_perbill":605392158,"support_perbill":8182413,"approval":60.5392158,"support":0.8182413},{"time_hours":323,"approval_perbill":604166668,"support_perbill":8134566,"approval":60.4166668,"support":0.8134566},{"time_hours":324,"approval_perbill":602941177,"support_perbill":8087005,"approval":60.2941177,"support":0.8087005},{"time_hours":325,"approval_perbill":601715687,"support_perbill":8039727,"approval":60.1715687,"support":0.8039727},{"time_hours":326,"approval_perbill":600490197,"support_perbill":7992731,"approval":60.0490197,"support":0.7992731},{"time_hours":327,"approval_perbill":599264707,"support_perbill":7946013,"approval":59.9264707,"support":0.7946013},{"time_hours":328,"approval_perbill":598039216,"support_perbill":7899571,"approval":59.8039216,"support":0.7899571},{"time_hours":329,"approval_perbill":596813726,"support_perbill":7853403,"approval":59.6813726,"support":0.7853403},{"time_hours":330,"approval_perbill":595588236,"support_perbill":7807506,"approval":59.5588236,"support":0.7807506},{"time_hours":331,"approval_perbill":594362746,"support_perbill":7761878,"approval":59.4362746,"support":0.7761878},{"time_hours":332,"approval_perbill":593137255,"support_perbill":7716516,"approval":59.3137255,"support":0.7716516},{"time_hours":333,"approval_perbill":591911765,"support_perbill":7671418,"approval":59.1911765,"support":0.7671418},{"time_hours":334,"approval_perbill":590686275,"support_perbill":7626583,"approval":59.0686275,"support":0.7626583},{"time_hours":335,"approval_perbill":589460785,"support_perbill":7582007,"approval":58.9460785,"support":0.7582007},{"time_hours":336,"approval_perbill":588235295,"support_perbill":7537688,"approval":58.8235295,"support":0.7537688},{"time_hours":337,"approval_perbill":587009805,"support_perbill":7493624,"approval":58.7009805,"support":0.7493624},{"time_hours":338,"approval_perbill":585784315,"support_perbill":7449814,"approval":58.5784315,"support":0.7449814},{"time_hours":339,"approval_perbill":584558825,"support_perbill":7406254,"approval":58.4558825,"support":0.7406254},{"time_hours":340,"approval_perbill":583333335,"support_perbill":7362942,"approval":58.3333335,"support":0.7362942},{"time_hours":341,"approval_perbill":582107844,"support_perbill":7319878,"approval":58.2107844,"support":0.7319878},{"time_hours":342,"approval_perbill":580882354,"support_perbill":7277057,"approval":58.0882354,"support":0.7277057},{"time_hours":343,"approval_perbill":579656864,"support_perbill":7234479,"approval":57.9656864,"support":0.7234479},{"time_hours":344,"approval_perbill":578431374,"support_perbill":7192141,"approval":57.8431374,"support":0.7192141},{"time_hours":345,"approval_perbill":577205883,"support_perbill":7150041,"approval":57.7205883,"support":0.7150041},{"time_hours":346,"approval_perbill":575980393,"support_perbill":7108178,"approval":57.5980393,"support":0.7108178},{"time_hours":347,"approval_perbill":574754903,"support_perbill":7066548,"approval":57.4754903,"support":0.7066548},{"time_hours":348,"approval_perbill":573529413,"support_perbill":7025151,"approval":57.3529413,"support":0.7025151},{"time_hours":349,"approval_perbill":572303922,"support_perbill":6983985,"approval":57.2303922,"support":0.6983985},{"time_hours":350,"approval_perbill":571078432,"support_perbill":6943047,"approval":57.1078432,"support":0.6943047},{"time_hours":351,"approval_perbill":569852942,"support_perbill":6902335,"approval":56.9852942,"support":0.6902335},{"time_hours":352,"approval_perbill":568627452,"support_perbill":6861848,"approval":56.8627452,"support":0.6861848},{"time_hours":353,"approval_perbill":567401961,"support_perbill":6821584,"approval":56.7401961,"support":0.6821584},{"time_hours":354,"approval_perbill":566176471,"support_perbill":6781540,"approval":56.6176471,"support":0.678154},{"time_hours":355,"approval_perbill":564950981,"support_perbill":6741716,"approval":56.4950981,"support":0.6741716},{"time_hours":356,"approval_perbill":563725491,"support_perbill":6702109,"approval":56.3725491,"support":0.6702109},{"time_hours":357,"approval_perbill":562500000,"support_perbill":6662718,"approval":56.25,"support":0.6662718},{"time_hours":358,"approval_perbill":561274510,"support_perbill":6623541,"approval":56.127451,"support":0.6623541},{"time_hours":359,"approval_perbill":560049020,"support_perbill":6584575,"approval":56.004902,"support":0.6584575},{"time_hours":360,"approval_perbill":558823530,"support_perbill":6545820,"approval":55.882353,"support":0.654582},{"time_hours":361,"approval_perbill":557598040,"support_perbill":6507274,"approval":55.759804,"support":0.6507274},{"time_hours":362,"approval_perbill":556372550,"support_perbill":6468935,"approval":55.637255,"support":0.6468935},{"time_hours":363,"approval_perbill":555147060,"support_perbill":6430801,"approval":55.514706,"support":0.6430801},{"time_hours":364,"approval_perbill":553921570,"support_perbill":6392871,"approval":55.392157,"support":0.6392871},{"time_hours":365,"approval_perbill":552696080,"support_perbill":6355142,"approval":55.269608,"support":0.6355142},{"time_hours":366,"approval_perbill":551470589,"support_perbill":6317615,"approval":55.1470589,"support":0.6317615},{"time_hours":367,"approval_perbill":550245099,"support_perbill":6280286,"approval":55.0245099,"support":0.6280286},{"time_hours":368,"approval_perbill":549019609,"support_perbill":6243154,"approval":54.9019609,"support":0.6243154},{"time_hours":369,"approval_perbill":547794119,"support_perbill":6206218,"approval":54.7794119,"support":0.6206218},{"time_hours":370,"approval_perbill":546568628,"support_perbill":6169476,"approval":54.6568628,"support":0.6169476},{"time_hours":371,"approval_perbill":545343138,"support_perbill":6132927,"approval":54.5343138,"support":0.6132927},{"time_hours":372,"approval_perbill":544117648,"support_perbill":6096569,"approval":54.4117648,"support":0.6096569},{"time_hours":373,"approval_perbill":542892158,"support_perbill":6060401,"approval":54.2892158,"support":0.6060401},{"time_hours":374,"approval_perbill":541666667,"support_perbill":6024421,"approval":54.1666667,"support":0.6024421},{"time_hours":375,"approval_perbill":540441177,"support_perbill":5988627,"approval":54.0441177,"support":0.5988627},{"time_hours":376,"approval_perbill":539215687,"support_perbill":5953019,"approval":53.9215687,"support":0.5953019},{"time_hours":377,"approval_perbill":537990197,"support_perbill":5917595,"approval":53.7990197,"support":0.5917595},{"time_hours":378,"approval_perbill":536764706,"support_perbill":5882353,"approval":53.6764706,"support":0.5882353},{"time_hours":379,"approval_perbill":535539216,"support_perbill":5847292,"approval":53.5539216,"support":0.5847292},{"time_hours":380,"approval_perbill":534313726,"support_perbill":5812410,"approval":53.4313726,"support":0.581241},{"time_hours":381,"approval_perbill":533088236,"support_perbill":5777707,"approval":53.3088236,"support":0.5777707},{"time_hours":382,"approval_perbill":531862746,"support_perbill":5743181,"approval":53.1862746,"support":0.5743181},{"time_hours":383,"approval_perbill":530637255,"support_perbill":5708830,"approval":53.0637255,"support":0.570883},{"time_hours":384,"approval_perbill":529411765,"support_perbill":5674653,"approval":52.9411765,"support":0.5674653},{"time_hours":385,"approval_perbill":528186275,"support_perbill":5640649,"approval":52.8186275,"support":0.5640649},{"time_hours":386,"approval_perbill":526960785,"support_perbill":5606817,"approval":52.6960785,"support":0.5606817},{"time_hours":387,"approval_perbill":525735295,"support_perbill":5573155,"approval":52.5735295,"support":0.5573155},{"time_hours":388,"approval_perbill":524509805,"support_perbill":5539662,"approval":52.4509805,"support":0.5539662},{"time_hours":389,"approval_perbill":523284315,"support_perbill":5506336,"approval":52.3284315,"support":0.5506336},{"time_hours":390,"approval_perbill":522058825,"support_perbill":5473177,"approval":52.2058825,"support":0.5473177},{"time_hours":391,"approval_perbill":520833334,"support_perbill":5440183,"approval":52.0833334,"support":0.5440183},{"time_hours":392,"approval_perbill":519607844,"support_perbill":5407354,"approval":51.9607844,"support":0.5407354},{"time_hours":393,"approval_perbill":518382354,"support_perbill":5374687,"approval":51.8382354,"support":0.5374687},{"time_hours":394,"approval_perbill":517156864,"support_perbill":5342181,"approval":51.7156864,"support":0.5342181},{"time_hours":395,"approval_perbill":515931373,"support_perbill":5309836,"approval":51.5931373,"support":0.5309836},{"time_hours":396,"approval_perbill":514705883,"support_perbill":5277650,"approval":51.4705883,"support":0.527765},{"time_hours":397,"approval_perbill":513480393,"support_perbill":5245622,"approval":51.3480393,"support":0.5245622},{"time_hours":398,"approval_perbill":512254903,"support_perbill":5213751,"approval":51.2254903,"support":0.5213751},{"time_hours":399,"approval_perbill":511029412,"support_perbill":5182035,"approval":51.1029412,"support":0.5182035},{"time_hours":400,"approval_perbill":509803922,"support_perbill":5150474,"approval":50.9803922,"support":0.5150474},{"time_hours":401,"approval_perbill":508578432,"support_perbill":5119067,"approval":50.8578432,"support":0.5119067},{"time_hours":402,"approval_perbill":507352942,"support_perbill":5087812,"approval":50.7352942,"support":0.5087812},{"time_hours":403,"approval_perbill":506127452,"support_perbill":5056708,"approval":50.6127452,"support":0.5056708},{"time_hours":404,"approval_perbill":504901961,"support_perbill":5025754,"approval":50.4901961,"support":0.5025754},{"time_hours":405,"approval_perbill":503676471,"support_perbill":4994949,"approval":50.3676471,"support":0.4994949},{"time_hours":406,"approval_perbill":502450981,"support_perbill":4964292,"approval":50.2450981,"support":0.4964292},{"time_hours":407,"approval_perbill":501225491,"support_perbill":4933782,"approval":50.1225491,"support":0.4933782},{"time_hours":408,"approval_perbill":500000000,"support_perbill":4903417,"approval":50,"support":0.4903417},{"time_hours":409,"approval_perbill":500000000,"support_perbill":4873198,"approval":50,"support":0.4873198},{"time_hours":410,"approval_perbill":500000000,"support_perbill":4843122,"approval":50,"support":0.4843122},{"time_hours":411,"approval_perbill":500000000,"support_perbill":4813189,"approval":50,"support":0.4813189},{"time_hours":412,"approval_perbill":500000000,"support_perbill":4783398,"approval":50,"support":0.4783398},{"time_hours":413,"approval_perbill":500000000,"support_perbill":4753747,"approval":50,"support":0.4753747},{"time_hours":414,"approval_perbill":500000000,"support_perbill":4724236,"approval":50,"support":0.4724236},{"time_hours":415,"approval_perbill":500000000,"support_perbill":4694864,"approval":50,"support":0.4694864},{"time_hours":416,"approval_perbill":500000000,"support_perbill":4665630,"approval":50,"support":0.466563},{"time_hours":417,"approval_perbill":500000000,"support_perbill":4636532,"approval":50,"support":0.4636532},{"time_hours":418,"approval_perbill":500000000,"support_perbill":4607570,"approval":50,"support":0.460757},{"time_hours":419,"approval_perbill":500000000,"support_perbill":4578743,"approval":50,"support":0.4578743},{"time_hours":420,"approval_perbill":500000000,"support_perbill":4550050,"approval":50,"support":0.455005},{"time_hours":421,"approval_perbill":500000000,"support_perbill":4521490,"approval":50,"support":0.452149},{"time_hours":422,"approval_perbill":500000000,"support_perbill":4493062,"approval":50,"support":0.4493062},{"time_hours":423,"approval_perbill":500000000,"support_perbill":4464766,"approval":50,"support":0.4464766},{"time_hours":424,"approval_perbill":500000000,"support_perbill":4436599,"approval":50,"support":0.4436599},{"time_hours":425,"approval_perbill":500000000,"support_perbill":4408562,"approval":50,"support":0.4408562},{"time_hours":426,"approval_perbill":500000000,"support_perbill":4380654,"approval":50,"support":0.4380654},{"time_hours":427,"approval_perbill":500000000,"support_perbill":4352873,"approval":50,"support":0.4352873},{"time_hours":428,"approval_perbill":500000000,"support_perbill":4325218,"approval":50,"support":0.4325218},{"time_hours":429,"approval_perbill":500000000,"support_perbill":4297690,"approval":50,"support":0.429769},{"time_hours":430,"approval_perbill":500000000,"support_perbill":4270287,"approval":50,"support":0.4270287},{"time_hours":431,"approval_perbill":500000000,"support_perbill":4243007,"approval":50,"support":0.4243007},{"time_hours":432,"approval_perbill":500000000,"support_perbill":4215851,"approval":50,"support":0.4215851},{"time_hours":433,"approval_perbill":500000000,"support_perbill":4188818,"approval":50,"support":0.4188818},{"time_hours":434,"approval_perbill":500000000,"support_perbill":4161906,"approval":50,"support":0.4161906},{"time_hours":435,"approval_perbill":500000000,"support_perbill":4135115,"approval":50,"support":0.4135115},{"time_hours":436,"approval_perbill":500000000,"support_perbill":4108444,"approval":50,"support":0.4108444},{"time_hours":437,"approval_perbill":500000000,"support_perbill":4081892,"approval":50,"support":0.4081892},{"time_hours":438,"approval_perbill":500000000,"support_perbill":4055459,"approval":50,"support":0.4055459},{"time_hours":439,"approval_perbill":500000000,"support_perbill":4029143,"approval":50,"support":0.4029143},{"time_hours":440,"approval_perbill":500000000,"support_perbill":4002944,"approval":50,"support":0.4002944},{"time_hours":441,"approval_perbill":500000000,"support_perbill":3976862,"approval":50,"support":0.3976862},{"time_hours":442,"approval_perbill":500000000,"support_perbill":3950894,"approval":50,"support":0.3950894},{"time_hours":443,"approval_perbill":500000000,"support_perbill":3925041,"approval":50,"support":0.3925041},{"time_hours":444,"approval_perbill":500000000,"support_perbill":3899302,"approval":50,"support":0.3899302},{"time_hours":445,"approval_perbill":500000000,"support_perbill":3873676,"approval":50,"support":0.3873676},{"time_hours":446,"approval_perbill":500000000,"support_perbill":3848162,"approval":50,"support":0.3848162},{"time_hours":447,"approval_perbill":500000000,"support_perbill":3822760,"approval":50,"support":0.382276},{"time_hours":448,"approval_perbill":500000000,"support_perbill":3797468,"approval":50,"support":0.3797468},{"time_hours":449,"approval_perbill":500000000,"support_perbill":3772287,"approval":50,"support":0.3772287},{"time_hours":450,"approval_perbill":500000000,"support_perbill":3747215,"approval":50,"support":0.3747215},{"time_hours":451,"approval_perbill":500000000,"support_perbill":3722251,"approval":50,"support":0.3722251},{"time_hours":452,"approval_perbill":500000000,"support_perbill":3697396,"approval":50,"support":0.3697396},{"time_hours":453,"approval_perbill":500000000,"support_perbill":3672648,"approval":50,"support":0.3672648},{"time_hours":454,"approval_perbill":500000000,"support_perbill":3648006,"approval":50,"support":0.3648006},{"time_hours":455,"approval_perbill":500000000,"support_perbill":3623471,"approval":50,"support":0.3623471},{"time_hours":456,"approval_perbill":500000000,"support_perbill":3599040,"approval":50,"support":0.359904},{"time_hours":457,"approval_perbill":500000000,"support_perbill":3574714,"approval":50,"support":0.3574714},{"time_hours":458,"approval_perbill":500000000,"support_perbill":3550492,"approval":50,"support":0.3550492},{"time_hours":459,"approval_perbill":500000000,"support_perbill":3526373,"approval":50,"support":0.3526373},{"time_hours":460,"approval_perbill":500000000,"support_perbill":3502357,"approval":50,"support":0.3502357},{"time_hours":461,"approval_perbill":500000000,"support_perbill":3478442,"approval":50,"support":0.3478442},{"time_hours":462,"approval_perbill":500000000,"support_perbill":3454629,"approval":50,"support":0.3454629},{"time_hours":463,"approval_perbill":500000000,"support_perbill":3430916,"approval":50,"support":0.3430916},{"time_hours":464,"approval_perbill":500000000,"support_perbill":3407304,"approval":50,"support":0.3407304},{"time_hours":465,"approval_perbill":500000000,"support_perbill":3383790,"approval":50,"support":0.338379},{"time_hours":466,"approval_perbill":500000000,"support_perbill":3360376,"approval":50,"support":0.3360376},{"time_hours":467,"approval_perbill":500000000,"support_perbill":3337059,"approval":50,"support":0.3337059},{"time_hours":468,"approval_perbill":500000000,"support_perbill":3313840,"approval":50,"support":0.331384},{"time_hours":469,"approval_perbill":500000000,"support_perbill":3290718,"approval":50,"support":0.3290718},{"time_hours":470,"approval_perbill":500000000,"support_perbill":3267692,"approval":50,"support":0.3267692},{"time_hours":471,"approval_perbill":500000000,"support_perbill":3244761,"approval":50,"support":0.3244761},{"time_hours":472,"approval_perbill":500000000,"support_perbill":3221926,"approval":50,"support":0.3221926},{"time_hours":473,"approval_perbill":500000000,"support_perbill":3199185,"approval":50,"support":0.3199185},{"time_hours":474,"approval_perbill":500000000,"support_perbill":3176538,"approval":50,"support":0.3176538},{"time_hours":475,"approval_perbill":500000000,"support_perbill":3153985,"approval":50,"support":0.3153985},{"time_hours":476,"approval_perbill":500000000,"support_perbill":3131524,"approval":50,"support":0.3131524},{"time_hours":477,"approval_perbill":500000000,"support_perbill":3109155,"approval":50,"support":0.3109155},{"time_hours":478,"approval_perbill":500000000,"support_perbill":3086878,"approval":50,"support":0.3086878},{"time_hours":479,"approval_perbill":500000000,"support_perbill":3064692,"approval":50,"support":0.3064692},{"time_hours":480,"approval_perbill":500000000,"support_perbill":3042596,"approval":50,"support":0.3042596},{"time_hours":481,"approval_perbill":500000000,"support_perbill":3020590,"approval":50,"support":0.302059},{"time_hours":482,"approval_perbill":500000000,"support_perbill":2998674,"approval":50,"support":0.2998674},{"time_hours":483,"approval_perbill":500000000,"support_perbill":2976847,"approval":50,"support":0.2976847},{"time_hours":484,"approval_perbill":500000000,"support_perbill":2955107,"approval":50,"support":0.2955107},{"time_hours":485,"approval_perbill":500000000,"support_perbill":2933456,"approval":50,"support":0.2933456},{"time_hours":486,"approval_perbill":500000000,"support_perbill":2911892,"approval":50,"support":0.2911892},{"time_hours":487,"approval_perbill":500000000,"support_perbill":2890414,"approval":50,"support":0.2890414},{"time_hours":488,"approval_perbill":500000000,"support_perbill":2869023,"approval":50,"support":0.2869023},{"time_hours":489,"approval_perbill":500000000,"support_perbill":2847717,"approval":50,"support":0.2847717},{"time_hours":490,"approval_perbill":500000000,"support_perbill":2826496,"approval":50,"support":0.2826496},{"time_hours":491,"approval_perbill":500000000,"support_perbill":2805360,"approval":50,"support":0.280536},{"time_hours":492,"approval_perbill":500000000,"support_perbill":2784309,"approval":50,"support":0.2784309},{"time_hours":493,"approval_perbill":500000000,"support_perbill":2763341,"approval":50,"support":0.2763341},{"time_hours":494,"approval_perbill":500000000,"support_perbill":2742455,"approval":50,"support":0.2742455},{"time_hours":495,"approval_perbill":500000000,"support_perbill":2721653,"approval":50,"support":0.2721653},{"time_hours":496,"approval_perbill":500000000,"support_perbill":2700933,"approval":50,"support":0.2700933},{"time_hours":497,"approval_perbill":500000000,"support_perbill":2680294,"approval":50,"support":0.2680294},{"time_hours":498,"approval_perbill":500000000,"support_perbill":2659737,"approval":50,"support":0.2659737},{"time_hours":499,"approval_perbill":500000000,"support_perbill":2639260,"approval":50,"support":0.263926},{"time_hours":500,"approval_perbill":500000000,"support_perbill":2618864,"approval":50,"support":0.2618864},{"time_hours":501,"approval_perbill":500000000,"support_perbill":2598547,"approval":50,"support":0.2598547},{"time_hours":502,"approval_perbill":500000000,"support_perbill":2578310,"approval":50,"support":0.257831},{"time_hours":503,"approval_perbill":500000000,"support_perbill":2558151,"approval":50,"support":0.2558151},{"time_hours":504,"approval_perbill":500000000,"support_perbill":2538071,"approval":50,"support":0.2538071},{"time_hours":505,"approval_perbill":500000000,"support_perbill":2518069,"approval":50,"support":0.2518069},{"time_hours":506,"approval_perbill":500000000,"support_perbill":2498144,"approval":50,"support":0.2498144},{"time_hours":507,"approval_perbill":500000000,"support_perbill":2478296,"approval":50,"support":0.2478296},{"time_hours":508,"approval_perbill":500000000,"support_perbill":2458525,"approval":50,"support":0.2458525},{"time_hours":509,"approval_perbill":500000000,"support_perbill":2438830,"approval":50,"support":0.243883},{"time_hours":510,"approval_perbill":500000000,"support_perbill":2419210,"approval":50,"support":0.241921},{"time_hours":511,"approval_perbill":500000000,"support_perbill":2399666,"approval":50,"support":0.2399666},{"time_hours":512,"approval_perbill":500000000,"support_perbill":2380197,"approval":50,"support":0.2380197},{"time_hours":513,"approval_perbill":500000000,"support_perbill":2360802,"approval":50,"support":0.2360802},{"time_hours":514,"approval_perbill":500000000,"support_perbill":2341481,"approval":50,"support":0.2341481},{"time_hours":515,"approval_perbill":500000000,"support_perbill":2322233,"approval":50,"support":0.2322233},{"time_hours":516,"approval_perbill":500000000,"support_perbill":2303059,"approval":50,"support":0.2303059},{"time_hours":517,"approval_perbill":500000000,"support_perbill":2283957,"approval":50,"support":0.2283957},{"time_hours":518,"approval_perbill":500000000,"support_perbill":2264928,"approval":50,"support":0.2264928},{"time_hours":519,"approval_perbill":500000000,"support_perbill":2245970,"approval":50,"support":0.224597},{"time_hours":520,"approval_perbill":500000000,"support_perbill":2227084,"approval":50,"support":0.2227084},{"time_hours":521,"approval_perbill":500000000,"support_perbill":2208269,"approval":50,"support":0.2208269},{"time_hours":522,"approval_perbill":500000000,"support_perbill":2189525,"approval":50,"support":0.2189525},{"time_hours":523,"approval_perbill":500000000,"support_perbill":2170851,"approval":50,"support":0.2170851},{"time_hours":524,"approval_perbill":500000000,"support_perbill":2152247,"approval":50,"support":0.2152247},{"time_hours":525,"approval_perbill":500000000,"support_perbill":2133712,"approval":50,"support":0.2133712},{"time_hours":526,"approval_perbill":500000000,"support_perbill":2115247,"approval":50,"support":0.2115247},{"time_hours":527,"approval_perbill":500000000,"support_perbill":2096850,"approval":50,"support":0.209685},{"time_hours":528,"approval_perbill":500000000,"support_perbill":2078522,"approval":50,"support":0.2078522},{"time_hours":529,"approval_perbill":500000000,"support_perbill":2060261,"approval":50,"support":0.2060261},{"time_hours":530,"approval_perbill":500000000,"support_perbill":2042068,"approval":50,"support":0.2042068},{"time_hours":531,"approval_perbill":500000000,"support_perbill":2023943,"approval":50,"support":0.2023943},{"time_hours":532,"approval_perbill":500000000,"support_perbill":2005884,"approval":50,"support":0.2005884},{"time_hours":533,"approval_perbill":500000000,"support_perbill":1987891,"approval":50,"support":0.1987891},{"time_hours":534,"approval_perbill":500000000,"support_perbill":1969965,"approval":50,"support":0.1969965},{"time_hours":535,"approval_perbill":500000000,"support_perbill":1952104,"approval":50,"support":0.1952104},{"time_hours":536,"approval_perbill":500000000,"support_perbill":1934309,"approval":50,"support":0.1934309},{"time_hours":537,"approval_perbill":500000000,"support_perbill":1916579,"approval":50,"support":0.1916579},{"time_hours":538,"approval_perbill":500000000,"support_perbill":1898913,"approval":50,"support":0.1898913},{"time_hours":539,"approval_perbill":500000000,"support_perbill":1881312,"approval":50,"support":0.1881312},{"time_hours":540,"approval_perbill":500000000,"support_perbill":1863775,"approval":50,"support":0.1863775},{"time_hours":541,"approval_perbill":500000000,"support_perbill":1846301,"approval":50,"support":0.1846301},{"time_hours":542,"approval_perbill":500000000,"support_perbill":1828891,"approval":50,"support":0.1828891},{"time_hours":543,"approval_perbill":500000000,"support_perbill":1811543,"approval":50,"support":0.1811543},{"time_hours":544,"approval_perbill":500000000,"support_perbill":1794258,"approval":50,"support":0.1794258},{"time_hours":545,"approval_perbill":500000000,"support_perbill":1777036,"approval":50,"support":0.1777036},{"time_hours":546,"approval_perbill":500000000,"support_perbill":1759875,"approval":50,"support":0.1759875},{"time_hours":547,"approval_perbill":500000000,"support_perbill":1742775,"approval":50,"support":0.1742775},{"time_hours":548,"approval_perbill":500000000,"support_perbill":1725737,"approval":50,"support":0.1725737},{"time_hours":549,"approval_perbill":500000000,"support_perbill":1708760,"approval":50,"support":0.170876},{"time_hours":550,"approval_perbill":500000000,"support_perbill":1691844,"approval":50,"support":0.1691844},{"time_hours":551,"approval_perbill":500000000,"support_perbill":1674988,"approval":50,"support":0.1674988},{"time_hours":552,"approval_perbill":500000000,"support_perbill":1658191,"approval":50,"support":0.1658191},{"time_hours":553,"approval_perbill":500000000,"support_perbill":1641455,"approval":50,"support":0.1641455},{"time_hours":554,"approval_perbill":500000000,"support_perbill":1624777,"approval":50,"support":0.1624777},{"time_hours":555,"approval_perbill":500000000,"support_perbill":1608159,"approval":50,"support":0.1608159},{"time_hours":556,"approval_perbill":500000000,"support_perbill":1591599,"approval":50,"support":0.1591599},{"time_hours":557,"approval_perbill":500000000,"support_perbill":1575098,"approval":50,"support":0.1575098},{"time_hours":558,"approval_perbill":500000000,"support_perbill":1558654,"approval":50,"support":0.1558654},{"time_hours":559,"approval_perbill":500000000,"support_perbill":1542269,"approval":50,"support":0.1542269},{"time_hours":560,"approval_perbill":500000000,"support_perbill":1525941,"approval":50,"support":0.1525941},{"time_hours":561,"approval_perbill":500000000,"support_perbill":1509670,"approval":50,"support":0.150967},{"time_hours":562,"approval_perbill":500000000,"support_perbill":1493456,"approval":50,"support":0.1493456},{"time_hours":563,"approval_perbill":500000000,"support_perbill":1477298,"approval":50,"support":0.1477298},{"time_hours":564,"approval_perbill":500000000,"support_perbill":1461197,"approval":50,"support":0.1461197},{"time_hours":565,"approval_perbill":500000000,"support_perbill":1445152,"approval":50,"support":0.1445152},{"time_hours":566,"approval_perbill":500000000,"support_perbill":1429162,"approval":50,"support":0.1429162},{"time_hours":567,"approval_perbill":500000000,"support_perbill":1413228,"approval":50,"support":0.1413228},{"time_hours":568,"approval_perbill":500000000,"support_perbill":1397348,"approval":50,"support":0.1397348},{"time_hours":569,"approval_perbill":500000000,"support_perbill":1381524,"approval":50,"support":0.1381524},{"time_hours":570,"approval_perbill":500000000,"support_perbill":1365754,"approval":50,"support":0.1365754},{"time_hours":571,"approval_perbill":500000000,"support_perbill":1350039,"approval":50,"support":0.1350039},{"time_hours":572,"approval_perbill":500000000,"support_perbill":1334377,"approval":50,"support":0.1334377},{"time_hours":573,"approval_perbill":500000000,"support_perbill":1318769,"approval":50,"support":0.1318769},{"time_hours":574,"approval_perbill":500000000,"support_perbill":1303214,"approval":50,"support":0.1303214},{"time_hours":575,"approval_perbill":500000000,"support_perbill":1287713,"approval":50,"support":0.1287713},{"time_hours":576,"approval_perbill":500000000,"support_perbill":1272264,"approval":50,"support":0.1272264},{"time_hours":577,"approval_perbill":500000000,"support_perbill":1256869,"approval":50,"support":0.1256869},{"time_hours":578,"approval_perbill":500000000,"support_perbill":1241525,"approval":50,"support":0.1241525},{"time_hours":579,"approval_perbill":500000000,"support_perbill":1226233,"approval":50,"support":0.1226233},{"time_hours":580,"approval_perbill":500000000,"support_perbill":1210994,"approval":50,"support":0.1210994},{"time_hours":581,"approval_perbill":500000000,"support_perbill":1195805,"approval":50,"support":0.1195805},{"time_hours":582,"approval_perbill":500000000,"support_perbill":1180668,"approval":50,"support":0.1180668},{"time_hours":583,"approval_perbill":500000000,"support_perbill":1165582,"approval":50,"support":0.1165582},{"time_hours":584,"approval_perbill":500000000,"support_perbill":1150547,"approval":50,"support":0.1150547},{"time_hours":585,"approval_perbill":500000000,"support_perbill":1135563,"approval":50,"support":0.1135563},{"time_hours":586,"approval_perbill":500000000,"support_perbill":1120628,"approval":50,"support":0.1120628},{"time_hours":587,"approval_perbill":500000000,"support_perbill":1105744,"approval":50,"support":0.1105744},{"time_hours":588,"approval_perbill":500000000,"support_perbill":1090909,"approval":50,"support":0.1090909},{"time_hours":589,"approval_perbill":500000000,"support_perbill":1076124,"approval":50,"support":0.1076124},{"time_hours":590,"approval_perbill":500000000,"support_perbill":1061388,"approval":50,"support":0.1061388},{"time_hours":591,"approval_perbill":500000000,"support_perbill":1046701,"approval":50,"support":0.1046701},{"time_hours":592,"approval_perbill":500000000,"support_perbill":1032063,"approval":50,"support":0.1032063},{"time_hours":593,"approval_perbill":500000000,"support_perbill":1017473,"approval":50,"support":0.1017473},{"time_hours":594,"approval_perbill":500000000,"support_perbill":1002932,"approval":50,"support":0.1002932},{"time_hours":595,"approval_perbill":500000000,"support_perbill":988438,"approval":50,"support":0.0988438},{"time_hours":596,"approval_perbill":500000000,"support_perbill":973993,"approval":50,"support":0.0973993},{"time_hours":597,"approval_perbill":500000000,"support_perbill":959595,"approval":50,"support":0.0959595},{"time_hours":598,"approval_perbill":500000000,"support_perbill":945244,"approval":50,"support":0.0945244},{"time_hours":599,"approval_perbill":500000000,"support_perbill":930940,"approval":50,"support":0.093094},{"time_hours":600,"approval_perbill":500000000,"support_perbill":916684,"approval":50,"support":0.0916684},{"time_hours":601,"approval_perbill":500000000,"support_perbill":902473,"approval":50,"support":0.0902473},{"time_hours":602,"approval_perbill":500000000,"support_perbill":888310,"approval":50,"support":0.088831},{"time_hours":603,"approval_perbill":500000000,"support_perbill":874192,"approval":50,"support":0.0874192},{"time_hours":604,"approval_perbill":500000000,"support_perbill":860121,"approval":50,"support":0.0860121},{"time_hours":605,"approval_perbill":500000000,"support_perbill":846095,"approval":50,"support":0.0846095},{"time_hours":606,"approval_perbill":500000000,"support_perbill":832114,"approval":50,"support":0.0832114},{"time_hours":607,"approval_perbill":500000000,"support_perbill":818179,"approval":50,"support":0.0818179},{"time_hours":608,"approval_perbill":500000000,"support_perbill":804289,"approval":50,"support":0.0804289},{"time_hours":609,"approval_perbill":500000000,"support_perbill":790444,"approval":50,"support":0.0790444},{"time_hours":610,"approval_perbill":500000000,"support_perbill":776644,"approval":50,"support":0.0776644},{"time_hours":611,"approval_perbill":500000000,"support_perbill":762888,"approval":50,"support":0.0762888},{"time_hours":612,"approval_perbill":500000000,"support_perbill":749176,"approval":50,"support":0.0749176},{"time_hours":613,"approval_perbill":500000000,"support_perbill":735508,"approval":50,"support":0.0735508},{"time_hours":614,"approval_perbill":500000000,"support_perbill":721884,"approval":50,"support":0.0721884},{"time_hours":615,"approval_perbill":500000000,"support_perbill":708303,"approval":50,"support":0.0708303},{"time_hours":616,"approval_perbill":500000000,"support_perbill":694766,"approval":50,"support":0.0694766},{"time_hours":617,"approval_perbill":500000000,"support_perbill":681272,"approval":50,"support":0.0681272},{"time_hours":618,"approval_perbill":500000000,"support_perbill":667821,"approval":50,"support":0.0667821},{"time_hours":619,"approval_perbill":500000000,"support_perbill":654412,"approval":50,"support":0.0654412},{"time_hours":620,"approval_perbill":500000000,"support_perbill":641047,"approval":50,"support":0.0641047},{"time_hours":621,"approval_perbill":500000000,"support_perbill":627723,"approval":50,"support":0.0627723},{"time_hours":622,"approval_perbill":500000000,"support_perbill":614442,"approval":50,"support":0.0614442},{"time_hours":623,"approval_perbill":500000000,"support_perbill":601202,"approval":50,"support":0.0601202},{"time_hours":624,"approval_perbill":500000000,"support_perbill":588005,"approval":50,"support":0.0588005},{"time_hours":625,"approval_perbill":500000000,"support_perbill":574848,"approval":50,"support":0.0574848},{"time_hours":626,"approval_perbill":500000000,"support_perbill":561734,"approval":50,"support":0.0561734},{"time_hours":627,"approval_perbill":500000000,"support_perbill":548660,"approval":50,"support":0.054866},{"time_hours":628,"approval_perbill":500000000,"support_perbill":535627,"approval":50,"support":0.0535627},{"time_hours":629,"approval_perbill":500000000,"support_perbill":522635,"approval":50,"support":0.0522635},{"time_hours":630,"approval_perbill":500000000,"support_perbill":509684,"approval":50,"support":0.0509684},{"time_hours":631,"approval_perbill":500000000,"support_perbill":496773,"approval":50,"support":0.0496773},{"time_hours":632,"approval_perbill":500000000,"support_perbill":483902,"approval":50,"support":0.0483902},{"time_hours":633,"approval_perbill":500000000,"support_perbill":471071,"approval":50,"support":0.0471071},{"time_hours":634,"approval_perbill":500000000,"support_perbill":458280,"approval":50,"support":0.045828},{"time_hours":635,"approval_perbill":500000000,"support_perbill":445529,"approval":50,"support":0.0445529},{"time_hours":636,"approval_perbill":500000000,"support_perbill":432817,"approval":50,"support":0.0432817},{"time_hours":637,"approval_perbill":500000000,"support_perbill":420144,"approval":50,"support":0.0420144},{"time_hours":638,"approval_perbill":500000000,"support_perbill":407511,"approval":50,"support":0.0407511},{"time_hours":639,"approval_perbill":500000000,"support_perbill":394916,"approval":50,"support":0.0394916},{"time_hours":640,"approval_perbill":500000000,"support_perbill":382360,"approval":50,"support":0.038236},{"time_hours":641,"approval_perbill":500000000,"support_perbill":369843,"approval":50,"support":0.0369843},{"time_hours":642,"approval_perbill":500000000,"support_perbill":357364,"approval":50,"support":0.0357364},{"time_hours":643,"approval_perbill":500000000,"support_perbill":344923,"approval":50,"support":0.0344923},{"time_hours":644,"approval_perbill":500000000,"support_perbill":332520,"approval":50,"support":0.033252},{"time_hours":645,"approval_perbill":500000000,"support_perbill":320155,"approval":50,"support":0.0320155},{"time_hours":646,"approval_perbill":500000000,"support_perbill":307828,"approval":50,"support":0.0307828},{"time_hours":647,"approval_perbill":500000000,"support_perbill":295538,"approval":50,"support":0.0295538},{"time_hours":648,"approval_perbill":500000000,"support_perbill":283286,"approval":50,"support":0.0283286},{"time_hours":649,"approval_perbill":500000000,"support_perbill":271071,"approval":50,"support":0.0271071},{"time_hours":650,"approval_perbill":500000000,"support_perbill":258892,"approval":50,"support":0.0258892},{"time_hours":651,"approval_perbill":500000000,"support_perbill":246751,"approval":50,"support":0.0246751},{"time_hours":652,"approval_perbill":500000000,"support_perbill":234646,"approval":50,"support":0.0234646},{"time_hours":653,"approval_perbill":500000000,"support_perbill":222578,"approval":50,"support":0.0222578},{"time_hours":654,"approval_perbill":500000000,"support_perbill":210546,"approval":50,"support":0.0210546},{"time_hours":655,"approval_perbill":500000000,"support_perbill":198550,"approval":50,"support":0.019855},{"time_hours":656,"approval_perbill":500000000,"support_perbill":186590,"approval":50,"support":0.018659},{"time_hours":657,"approval_perbill":500000000,"support_perbill":174666,"approval":50,"support":0.0174666},{"time_hours":658,"approval_perbill":500000000,"support_perbill":162778,"approval":50,"support":0.0162778},{"time_hours":659,"approval_perbill":500000000,"support_perbill":150925,"approval":50,"support":0.0150925},{"time_hours":660,"approval_perbill":500000000,"support_perbill":139108,"approval":50,"support":0.0139108},{"time_hours":661,"approval_perbill":500000000,"support_perbill":127326,"approval":50,"support":0.0127326},{"time_hours":662,"approval_perbill":500000000,"support_perbill":115578,"approval":50,"support":0.0115578},{"time_hours":663,"approval_perbill":500000000,"support_perbill":103866,"approval":50,"support":0.0103866},{"time_hours":664,"approval_perbill":500000000,"support_perbill":92188,"approval":50,"support":0.0092188},{"time_hours":665,"approval_perbill":500000000,"support_perbill":80545,"approval":50,"support":0.0080545},{"time_hours":666,"approval_perbill":500000000,"support_perbill":68937,"approval":50,"support":0.0068937},{"time_hours":667,"approval_perbill":500000000,"support_perbill":57363,"approval":50,"support":0.0057363},{"time_hours":668,"approval_perbill":500000000,"support_perbill":45822,"approval":50,"support":0.0045822},{"time_hours":669,"approval_perbill":500000000,"support_perbill":34316,"approval":50,"support":0.0034316},{"time_hours":670,"approval_perbill":500000000,"support_perbill":22844,"approval":50,"support":0.0022844},{"time_hours":671,"approval_perbill":500000000,"support_perbill":11405,"approval":50,"support":0.0011405},{"time_hours":672,"approval_perbill":500000000,"support_perbill":0,"approval":50,"support":0}]')},92085:p=>{"use strict";p.exports=JSON.parse('[{"time_hours":0,"approval_perbill":1000000000,"support_perbill":500000000,"approval":100,"support":50,"days":0,"dot_needed":"567,056,300"},{"time_hours":1,"approval_perbill":997037038,"support_perbill":499255953,"approval":99.7037038,"support":49.9255953,"days":1,"dot_needed":"566,212,467"},{"time_hours":2,"approval_perbill":994100296,"support_perbill":498511905,"approval":99.4100296,"support":49.8511905,"days":1,"dot_needed":"565,368,633"},{"time_hours":3,"approval_perbill":991189429,"support_perbill":497767858,"approval":99.1189429,"support":49.7767858,"days":1,"dot_needed":"564,524,800"},{"time_hours":4,"approval_perbill":988304096,"support_perbill":497023810,"approval":98.8304096,"support":49.702381,"days":1,"dot_needed":"563,680,965"},{"time_hours":5,"approval_perbill":985443960,"support_perbill":496279762,"approval":98.544396,"support":49.6279762,"days":1,"dot_needed":"562,837,131"},{"time_hours":6,"approval_perbill":982608697,"support_perbill":495535715,"approval":98.2608697,"support":49.5535715,"days":1,"dot_needed":"561,993,298"},{"time_hours":7,"approval_perbill":979797981,"support_perbill":494791667,"approval":97.9797981,"support":49.4791667,"days":1,"dot_needed":"561,149,464"},{"time_hours":8,"approval_perbill":977011496,"support_perbill":494047620,"approval":97.7011496,"support":49.404762,"days":1,"dot_needed":"560,305,631"},{"time_hours":9,"approval_perbill":974248928,"support_perbill":493303572,"approval":97.4248928,"support":49.3303572,"days":1,"dot_needed":"559,461,797"},{"time_hours":10,"approval_perbill":971509972,"support_perbill":492559524,"approval":97.1509972,"support":49.2559524,"days":1,"dot_needed":"558,617,962"},{"time_hours":11,"approval_perbill":968794328,"support_perbill":491815477,"approval":96.8794328,"support":49.1815477,"days":1,"dot_needed":"557,774,129"},{"time_hours":12,"approval_perbill":966101697,"support_perbill":491071429,"approval":96.6101697,"support":49.1071429,"days":1,"dot_needed":"556,930,295"},{"time_hours":13,"approval_perbill":963431787,"support_perbill":490327381,"approval":96.3431787,"support":49.0327381,"days":1,"dot_needed":"556,086,461"},{"time_hours":14,"approval_perbill":960784315,"support_perbill":489583334,"approval":96.0784315,"support":48.9583334,"days":1,"dot_needed":"555,242,628"},{"time_hours":15,"approval_perbill":958158997,"support_perbill":488839286,"approval":95.8158997,"support":48.8839286,"days":1,"dot_needed":"554,398,794"},{"time_hours":16,"approval_perbill":955555557,"support_perbill":488095239,"approval":95.5555557,"support":48.8095239,"days":1,"dot_needed":"553,554,961"},{"time_hours":17,"approval_perbill":952973721,"support_perbill":487351191,"approval":95.2973721,"support":48.7351191,"days":1,"dot_needed":"552,711,126"},{"time_hours":18,"approval_perbill":950413224,"support_perbill":486607143,"approval":95.0413224,"support":48.6607143,"days":1,"dot_needed":"551,867,292"},{"time_hours":19,"approval_perbill":947873801,"support_perbill":485863096,"approval":94.7873801,"support":48.5863096,"days":1,"dot_needed":"551,023,459"},{"time_hours":20,"approval_perbill":945355193,"support_perbill":485119048,"approval":94.5355193,"support":48.5119048,"days":1,"dot_needed":"550,179,625"},{"time_hours":21,"approval_perbill":942857143,"support_perbill":484375000,"approval":94.2857143,"support":48.4375,"days":1,"dot_needed":"549,335,791"},{"time_hours":22,"approval_perbill":940379404,"support_perbill":483630953,"approval":94.0379404,"support":48.3630953,"days":1,"dot_needed":"548,491,958"},{"time_hours":23,"approval_perbill":937921728,"support_perbill":482886905,"approval":93.7921728,"support":48.2886905,"days":1,"dot_needed":"547,648,123"},{"time_hours":24,"approval_perbill":935483872,"support_perbill":482142858,"approval":93.5483872,"support":48.2142858,"days":1,"dot_needed":"546,804,290"},{"time_hours":25,"approval_perbill":933065598,"support_perbill":481398810,"approval":93.3065598,"support":48.139881,"days":2,"dot_needed":"545,960,456"},{"time_hours":26,"approval_perbill":930666667,"support_perbill":480654762,"approval":93.0666667,"support":48.0654762,"days":2,"dot_needed":"545,116,622"},{"time_hours":27,"approval_perbill":928286854,"support_perbill":479910715,"approval":92.8286854,"support":47.9910715,"days":2,"dot_needed":"544,272,789"},{"time_hours":28,"approval_perbill":925925927,"support_perbill":479166667,"approval":92.5925927,"support":47.9166667,"days":2,"dot_needed":"543,428,955"},{"time_hours":29,"approval_perbill":923583664,"support_perbill":478422620,"approval":92.3583664,"support":47.842262,"days":2,"dot_needed":"542,585,121"},{"time_hours":30,"approval_perbill":921259843,"support_perbill":477678572,"approval":92.1259843,"support":47.7678572,"days":2,"dot_needed":"541,741,287"},{"time_hours":31,"approval_perbill":918954249,"support_perbill":476934524,"approval":91.8954249,"support":47.6934524,"days":2,"dot_needed":"540,897,453"},{"time_hours":32,"approval_perbill":916666668,"support_perbill":476190477,"approval":91.6666668,"support":47.6190477,"days":2,"dot_needed":"540,053,620"},{"time_hours":33,"approval_perbill":914396889,"support_perbill":475446429,"approval":91.4396889,"support":47.5446429,"days":2,"dot_needed":"539,209,786"},{"time_hours":34,"approval_perbill":912144703,"support_perbill":474702381,"approval":91.2144703,"support":47.4702381,"days":2,"dot_needed":"538,365,952"},{"time_hours":35,"approval_perbill":909909911,"support_perbill":473958334,"approval":90.9909911,"support":47.3958334,"days":2,"dot_needed":"537,522,118"},{"time_hours":36,"approval_perbill":907692309,"support_perbill":473214286,"approval":90.7692309,"support":47.3214286,"days":2,"dot_needed":"536,678,284"},{"time_hours":37,"approval_perbill":905491700,"support_perbill":472470239,"approval":90.54917,"support":47.2470239,"days":2,"dot_needed":"535,834,451"},{"time_hours":38,"approval_perbill":903307888,"support_perbill":471726191,"approval":90.3307888,"support":47.1726191,"days":2,"dot_needed":"534,990,617"},{"time_hours":39,"approval_perbill":901140685,"support_perbill":470982143,"approval":90.1140685,"support":47.0982143,"days":2,"dot_needed":"534,146,783"},{"time_hours":40,"approval_perbill":898989900,"support_perbill":470238096,"approval":89.89899,"support":47.0238096,"days":2,"dot_needed":"533,302,950"},{"time_hours":41,"approval_perbill":896855347,"support_perbill":469494048,"approval":89.6855347,"support":46.9494048,"days":2,"dot_needed":"532,459,115"},{"time_hours":42,"approval_perbill":894736842,"support_perbill":468750000,"approval":89.4736842,"support":46.875,"days":2,"dot_needed":"531,615,281"},{"time_hours":43,"approval_perbill":892634208,"support_perbill":468005953,"approval":89.2634208,"support":46.8005953,"days":2,"dot_needed":"530,771,448"},{"time_hours":44,"approval_perbill":890547265,"support_perbill":467261905,"approval":89.0547265,"support":46.7261905,"days":2,"dot_needed":"529,927,614"},{"time_hours":45,"approval_perbill":888475838,"support_perbill":466517858,"approval":88.8475838,"support":46.6517858,"days":2,"dot_needed":"529,083,781"},{"time_hours":46,"approval_perbill":886419755,"support_perbill":465773810,"approval":88.6419755,"support":46.577381,"days":2,"dot_needed":"528,239,947"},{"time_hours":47,"approval_perbill":884378844,"support_perbill":465029762,"approval":88.4378844,"support":46.5029762,"days":2,"dot_needed":"527,396,112"},{"time_hours":48,"approval_perbill":882352942,"support_perbill":464285715,"approval":88.2352942,"support":46.4285715,"days":2,"dot_needed":"526,552,279"},{"time_hours":49,"approval_perbill":880341882,"support_perbill":463541667,"approval":88.0341882,"support":46.3541667,"days":3,"dot_needed":"525,708,445"},{"time_hours":50,"approval_perbill":878345500,"support_perbill":462797620,"approval":87.83455,"support":46.279762,"days":3,"dot_needed":"524,864,612"},{"time_hours":51,"approval_perbill":876363637,"support_perbill":462053572,"approval":87.6363637,"support":46.2053572,"days":3,"dot_needed":"524,020,778"},{"time_hours":52,"approval_perbill":874396136,"support_perbill":461309524,"approval":87.4396136,"support":46.1309524,"days":3,"dot_needed":"523,176,944"},{"time_hours":53,"approval_perbill":872442841,"support_perbill":460565477,"approval":87.2442841,"support":46.0565477,"days":3,"dot_needed":"522,333,111"},{"time_hours":54,"approval_perbill":870503599,"support_perbill":459821429,"approval":87.0503599,"support":45.9821429,"days":3,"dot_needed":"521,489,276"},{"time_hours":55,"approval_perbill":868578256,"support_perbill":459077381,"approval":86.8578256,"support":45.9077381,"days":3,"dot_needed":"520,645,442"},{"time_hours":56,"approval_perbill":866666667,"support_perbill":458333334,"approval":86.6666667,"support":45.8333334,"days":3,"dot_needed":"519,801,609"},{"time_hours":57,"approval_perbill":864768684,"support_perbill":457589286,"approval":86.4768684,"support":45.7589286,"days":3,"dot_needed":"518,957,775"},{"time_hours":58,"approval_perbill":862884162,"support_perbill":456845239,"approval":86.2884162,"support":45.6845239,"days":3,"dot_needed":"518,113,942"},{"time_hours":59,"approval_perbill":861012957,"support_perbill":456101191,"approval":86.1012957,"support":45.6101191,"days":3,"dot_needed":"517,270,108"},{"time_hours":60,"approval_perbill":859154930,"support_perbill":455357143,"approval":85.915493,"support":45.5357143,"days":3,"dot_needed":"516,426,273"},{"time_hours":61,"approval_perbill":857309942,"support_perbill":454613096,"approval":85.7309942,"support":45.4613096,"days":3,"dot_needed":"515,582,440"},{"time_hours":62,"approval_perbill":855477857,"support_perbill":453869048,"approval":85.5477857,"support":45.3869048,"days":3,"dot_needed":"514,738,606"},{"time_hours":63,"approval_perbill":853658537,"support_perbill":453125000,"approval":85.3658537,"support":45.3125,"days":3,"dot_needed":"513,894,772"},{"time_hours":64,"approval_perbill":851851852,"support_perbill":452380953,"approval":85.1851852,"support":45.2380953,"days":3,"dot_needed":"513,050,939"},{"time_hours":65,"approval_perbill":850057671,"support_perbill":451636905,"approval":85.0057671,"support":45.1636905,"days":3,"dot_needed":"512,207,105"},{"time_hours":66,"approval_perbill":848275863,"support_perbill":450892858,"approval":84.8275863,"support":45.0892858,"days":3,"dot_needed":"511,363,272"},{"time_hours":67,"approval_perbill":846506302,"support_perbill":450148810,"approval":84.6506302,"support":45.014881,"days":3,"dot_needed":"510,519,437"},{"time_hours":68,"approval_perbill":844748859,"support_perbill":449404762,"approval":84.4748859,"support":44.9404762,"days":3,"dot_needed":"509,675,603"},{"time_hours":69,"approval_perbill":843003414,"support_perbill":448660715,"approval":84.3003414,"support":44.8660715,"days":3,"dot_needed":"508,831,770"},{"time_hours":70,"approval_perbill":841269842,"support_perbill":447916667,"approval":84.1269842,"support":44.7916667,"days":3,"dot_needed":"507,987,936"},{"time_hours":71,"approval_perbill":839548024,"support_perbill":447172620,"approval":83.9548024,"support":44.717262,"days":3,"dot_needed":"507,144,103"},{"time_hours":72,"approval_perbill":837837838,"support_perbill":446428572,"approval":83.7837838,"support":44.6428572,"days":3,"dot_needed":"506,300,269"},{"time_hours":73,"approval_perbill":836139170,"support_perbill":445684524,"approval":83.613917,"support":44.5684524,"days":4,"dot_needed":"505,456,434"},{"time_hours":74,"approval_perbill":834451903,"support_perbill":444940477,"approval":83.4451903,"support":44.4940477,"days":4,"dot_needed":"504,612,601"},{"time_hours":75,"approval_perbill":832775921,"support_perbill":444196429,"approval":83.2775921,"support":44.4196429,"days":4,"dot_needed":"503,768,767"},{"time_hours":76,"approval_perbill":831111112,"support_perbill":443452381,"approval":83.1111112,"support":44.3452381,"days":4,"dot_needed":"502,924,933"},{"time_hours":77,"approval_perbill":829457365,"support_perbill":442708334,"approval":82.9457365,"support":44.2708334,"days":4,"dot_needed":"502,081,100"},{"time_hours":78,"approval_perbill":827814570,"support_perbill":441964286,"approval":82.781457,"support":44.1964286,"days":4,"dot_needed":"501,237,266"},{"time_hours":79,"approval_perbill":826182619,"support_perbill":441220239,"approval":82.6182619,"support":44.1220239,"days":4,"dot_needed":"500,393,432"},{"time_hours":80,"approval_perbill":824561404,"support_perbill":440476191,"approval":82.4561404,"support":44.0476191,"days":4,"dot_needed":"499,549,598"},{"time_hours":81,"approval_perbill":822950820,"support_perbill":439732143,"approval":82.295082,"support":43.9732143,"days":4,"dot_needed":"498,705,764"},{"time_hours":82,"approval_perbill":821350763,"support_perbill":438988096,"approval":82.1350763,"support":43.8988096,"days":4,"dot_needed":"497,861,931"},{"time_hours":83,"approval_perbill":819761130,"support_perbill":438244048,"approval":81.976113,"support":43.8244048,"days":4,"dot_needed":"497,018,097"},{"time_hours":84,"approval_perbill":818181818,"support_perbill":437500000,"approval":81.8181818,"support":43.75,"days":4,"dot_needed":"496,174,263"},{"time_hours":85,"approval_perbill":816612730,"support_perbill":436755953,"approval":81.661273,"support":43.6755953,"days":4,"dot_needed":"495,330,429"},{"time_hours":86,"approval_perbill":815053764,"support_perbill":436011905,"approval":81.5053764,"support":43.6011905,"days":4,"dot_needed":"494,486,595"},{"time_hours":87,"approval_perbill":813504824,"support_perbill":435267858,"approval":81.3504824,"support":43.5267858,"days":4,"dot_needed":"493,642,762"},{"time_hours":88,"approval_perbill":811965813,"support_perbill":434523810,"approval":81.1965813,"support":43.452381,"days":4,"dot_needed":"492,798,928"},{"time_hours":89,"approval_perbill":810436635,"support_perbill":433779762,"approval":81.0436635,"support":43.3779762,"days":4,"dot_needed":"491,955,094"},{"time_hours":90,"approval_perbill":808917198,"support_perbill":433035715,"approval":80.8917198,"support":43.3035715,"days":4,"dot_needed":"491,111,261"},{"time_hours":91,"approval_perbill":807407408,"support_perbill":432291667,"approval":80.7407408,"support":43.2291667,"days":4,"dot_needed":"490,267,426"},{"time_hours":92,"approval_perbill":805907174,"support_perbill":431547620,"approval":80.5907174,"support":43.154762,"days":4,"dot_needed":"489,423,593"},{"time_hours":93,"approval_perbill":804416404,"support_perbill":430803572,"approval":80.4416404,"support":43.0803572,"days":4,"dot_needed":"488,579,759"},{"time_hours":94,"approval_perbill":802935011,"support_perbill":430059524,"approval":80.2935011,"support":43.0059524,"days":4,"dot_needed":"487,735,925"},{"time_hours":95,"approval_perbill":801462906,"support_perbill":429315477,"approval":80.1462906,"support":42.9315477,"days":4,"dot_needed":"486,892,092"},{"time_hours":96,"approval_perbill":800000001,"support_perbill":428571429,"approval":80.0000001,"support":42.8571429,"days":4,"dot_needed":"486,048,258"},{"time_hours":97,"approval_perbill":798546210,"support_perbill":427827381,"approval":79.854621,"support":42.7827381,"days":5,"dot_needed":"485,204,423"},{"time_hours":98,"approval_perbill":797101450,"support_perbill":427083334,"approval":79.710145,"support":42.7083334,"days":5,"dot_needed":"484,360,590"},{"time_hours":99,"approval_perbill":795665635,"support_perbill":426339286,"approval":79.5665635,"support":42.6339286,"days":5,"dot_needed":"483,516,756"},{"time_hours":100,"approval_perbill":794238684,"support_perbill":425595239,"approval":79.4238684,"support":42.5595239,"days":5,"dot_needed":"482,672,923"},{"time_hours":101,"approval_perbill":792820513,"support_perbill":424851191,"approval":79.2820513,"support":42.4851191,"days":5,"dot_needed":"481,829,089"},{"time_hours":102,"approval_perbill":791411043,"support_perbill":424107143,"approval":79.1411043,"support":42.4107143,"days":5,"dot_needed":"480,985,255"},{"time_hours":103,"approval_perbill":790010194,"support_perbill":423363096,"approval":79.0010194,"support":42.3363096,"days":5,"dot_needed":"480,141,422"},{"time_hours":104,"approval_perbill":788617887,"support_perbill":422619048,"approval":78.8617887,"support":42.2619048,"days":5,"dot_needed":"479,297,587"},{"time_hours":105,"approval_perbill":787234043,"support_perbill":421875000,"approval":78.7234043,"support":42.1875,"days":5,"dot_needed":"478,453,753"},{"time_hours":106,"approval_perbill":785858586,"support_perbill":421130953,"approval":78.5858586,"support":42.1130953,"days":5,"dot_needed":"477,609,920"},{"time_hours":107,"approval_perbill":784491441,"support_perbill":420386905,"approval":78.4491441,"support":42.0386905,"days":5,"dot_needed":"476,766,086"},{"time_hours":108,"approval_perbill":783132531,"support_perbill":419642858,"approval":78.3132531,"support":41.9642858,"days":5,"dot_needed":"475,922,253"},{"time_hours":109,"approval_perbill":781781783,"support_perbill":418898810,"approval":78.1781783,"support":41.889881,"days":5,"dot_needed":"475,078,419"},{"time_hours":110,"approval_perbill":780439122,"support_perbill":418154762,"approval":78.0439122,"support":41.8154762,"days":5,"dot_needed":"474,234,584"},{"time_hours":111,"approval_perbill":779104478,"support_perbill":417410715,"approval":77.9104478,"support":41.7410715,"days":5,"dot_needed":"473,390,751"},{"time_hours":112,"approval_perbill":777777779,"support_perbill":416666667,"approval":77.7777779,"support":41.6666667,"days":5,"dot_needed":"472,546,917"},{"time_hours":113,"approval_perbill":776458953,"support_perbill":415922620,"approval":77.6458953,"support":41.592262,"days":5,"dot_needed":"471,703,084"},{"time_hours":114,"approval_perbill":775147929,"support_perbill":415178572,"approval":77.5147929,"support":41.5178572,"days":5,"dot_needed":"470,859,250"},{"time_hours":115,"approval_perbill":773844642,"support_perbill":414434524,"approval":77.3844642,"support":41.4434524,"days":5,"dot_needed":"470,015,416"},{"time_hours":116,"approval_perbill":772549020,"support_perbill":413690477,"approval":77.254902,"support":41.3690477,"days":5,"dot_needed":"469,171,582"},{"time_hours":117,"approval_perbill":771260998,"support_perbill":412946429,"approval":77.1260998,"support":41.2946429,"days":5,"dot_needed":"468,327,748"},{"time_hours":118,"approval_perbill":769980507,"support_perbill":412202381,"approval":76.9980507,"support":41.2202381,"days":5,"dot_needed":"467,483,914"},{"time_hours":119,"approval_perbill":768707484,"support_perbill":411458334,"approval":76.8707484,"support":41.1458334,"days":5,"dot_needed":"466,640,081"},{"time_hours":120,"approval_perbill":767441861,"support_perbill":410714286,"approval":76.7441861,"support":41.0714286,"days":5,"dot_needed":"465,796,247"},{"time_hours":121,"approval_perbill":766183576,"support_perbill":409970239,"approval":76.6183576,"support":40.9970239,"days":6,"dot_needed":"464,952,414"},{"time_hours":122,"approval_perbill":764932563,"support_perbill":409226191,"approval":76.4932563,"support":40.9226191,"days":6,"dot_needed":"464,108,579"},{"time_hours":123,"approval_perbill":763688761,"support_perbill":408482143,"approval":76.3688761,"support":40.8482143,"days":6,"dot_needed":"463,264,745"},{"time_hours":124,"approval_perbill":762452108,"support_perbill":407738096,"approval":76.2452108,"support":40.7738096,"days":6,"dot_needed":"462,420,912"},{"time_hours":125,"approval_perbill":761222541,"support_perbill":406994048,"approval":76.1222541,"support":40.6994048,"days":6,"dot_needed":"461,577,078"},{"time_hours":126,"approval_perbill":760000000,"support_perbill":406250000,"approval":76,"support":40.625,"days":6,"dot_needed":"460,733,244"},{"time_hours":127,"approval_perbill":758784426,"support_perbill":405505953,"approval":75.8784426,"support":40.5505953,"days":6,"dot_needed":"459,889,411"},{"time_hours":128,"approval_perbill":757575758,"support_perbill":404761905,"approval":75.7575758,"support":40.4761905,"days":6,"dot_needed":"459,045,576"},{"time_hours":129,"approval_perbill":756373938,"support_perbill":404017858,"approval":75.6373938,"support":40.4017858,"days":6,"dot_needed":"458,201,743"},{"time_hours":130,"approval_perbill":755178909,"support_perbill":403273810,"approval":75.5178909,"support":40.327381,"days":6,"dot_needed":"457,357,909"},{"time_hours":131,"approval_perbill":753990611,"support_perbill":402529762,"approval":75.3990611,"support":40.2529762,"days":6,"dot_needed":"456,514,075"},{"time_hours":132,"approval_perbill":752808989,"support_perbill":401785715,"approval":75.2808989,"support":40.1785715,"days":6,"dot_needed":"455,670,242"},{"time_hours":133,"approval_perbill":751633988,"support_perbill":401041667,"approval":75.1633988,"support":40.1041667,"days":6,"dot_needed":"454,826,408"},{"time_hours":134,"approval_perbill":750465550,"support_perbill":400297620,"approval":75.046555,"support":40.029762,"days":6,"dot_needed":"453,982,575"},{"time_hours":135,"approval_perbill":749303621,"support_perbill":399553572,"approval":74.9303621,"support":39.9553572,"days":6,"dot_needed":"453,138,740"},{"time_hours":136,"approval_perbill":748148149,"support_perbill":398809524,"approval":74.8148149,"support":39.8809524,"days":6,"dot_needed":"452,294,906"},{"time_hours":137,"approval_perbill":746999077,"support_perbill":398065477,"approval":74.6999077,"support":39.8065477,"days":6,"dot_needed":"451,451,073"},{"time_hours":138,"approval_perbill":745856354,"support_perbill":397321429,"approval":74.5856354,"support":39.7321429,"days":6,"dot_needed":"450,607,239"},{"time_hours":139,"approval_perbill":744719927,"support_perbill":396577381,"approval":74.4719927,"support":39.6577381,"days":6,"dot_needed":"449,763,405"},{"time_hours":140,"approval_perbill":743589744,"support_perbill":395833334,"approval":74.3589744,"support":39.5833334,"days":6,"dot_needed":"448,919,572"},{"time_hours":141,"approval_perbill":742465754,"support_perbill":395089286,"approval":74.2465754,"support":39.5089286,"days":6,"dot_needed":"448,075,737"},{"time_hours":142,"approval_perbill":741347906,"support_perbill":394345239,"approval":74.1347906,"support":39.4345239,"days":6,"dot_needed":"447,231,904"},{"time_hours":143,"approval_perbill":740236149,"support_perbill":393601191,"approval":74.0236149,"support":39.3601191,"days":6,"dot_needed":"446,388,070"},{"time_hours":144,"approval_perbill":739130435,"support_perbill":392857143,"approval":73.9130435,"support":39.2857143,"days":6,"dot_needed":"445,544,236"},{"time_hours":145,"approval_perbill":738030714,"support_perbill":392113096,"approval":73.8030714,"support":39.2113096,"days":7,"dot_needed":"444,700,403"},{"time_hours":146,"approval_perbill":736936938,"support_perbill":391369048,"approval":73.6936938,"support":39.1369048,"days":7,"dot_needed":"443,856,569"},{"time_hours":147,"approval_perbill":735849057,"support_perbill":390625000,"approval":73.5849057,"support":39.0625,"days":7,"dot_needed":"443,012,734"},{"time_hours":148,"approval_perbill":734767025,"support_perbill":389880953,"approval":73.4767025,"support":38.9880953,"days":7,"dot_needed":"442,168,901"},{"time_hours":149,"approval_perbill":733690796,"support_perbill":389136905,"approval":73.3690796,"support":38.9136905,"days":7,"dot_needed":"441,325,067"},{"time_hours":150,"approval_perbill":732620322,"support_perbill":388392858,"approval":73.2620322,"support":38.8392858,"days":7,"dot_needed":"440,481,234"},{"time_hours":151,"approval_perbill":731555556,"support_perbill":387648810,"approval":73.1555556,"support":38.764881,"days":7,"dot_needed":"439,637,400"},{"time_hours":152,"approval_perbill":730496454,"support_perbill":386904762,"approval":73.0496454,"support":38.6904762,"days":7,"dot_needed":"438,793,566"},{"time_hours":153,"approval_perbill":729442971,"support_perbill":386160715,"approval":72.9442971,"support":38.6160715,"days":7,"dot_needed":"437,949,733"},{"time_hours":154,"approval_perbill":728395062,"support_perbill":385416667,"approval":72.8395062,"support":38.5416667,"days":7,"dot_needed":"437,105,898"},{"time_hours":155,"approval_perbill":727352683,"support_perbill":384672620,"approval":72.7352683,"support":38.467262,"days":7,"dot_needed":"436,262,065"},{"time_hours":156,"approval_perbill":726315790,"support_perbill":383928572,"approval":72.631579,"support":38.3928572,"days":7,"dot_needed":"435,418,231"},{"time_hours":157,"approval_perbill":725284340,"support_perbill":383184524,"approval":72.528434,"support":38.3184524,"days":7,"dot_needed":"434,574,397"},{"time_hours":158,"approval_perbill":724258290,"support_perbill":382440477,"approval":72.425829,"support":38.2440477,"days":7,"dot_needed":"433,730,564"},{"time_hours":159,"approval_perbill":723237599,"support_perbill":381696429,"approval":72.3237599,"support":38.1696429,"days":7,"dot_needed":"432,886,730"},{"time_hours":160,"approval_perbill":722222222,"support_perbill":380952381,"approval":72.2222222,"support":38.0952381,"days":7,"dot_needed":"432,042,895"},{"time_hours":161,"approval_perbill":721212122,"support_perbill":380208334,"approval":72.1212122,"support":38.0208334,"days":7,"dot_needed":"431,199,062"},{"time_hours":162,"approval_perbill":720207254,"support_perbill":379464286,"approval":72.0207254,"support":37.9464286,"days":7,"dot_needed":"430,355,228"},{"time_hours":163,"approval_perbill":719207580,"support_perbill":378720239,"approval":71.920758,"support":37.8720239,"days":7,"dot_needed":"429,511,395"},{"time_hours":164,"approval_perbill":718213059,"support_perbill":377976191,"approval":71.8213059,"support":37.7976191,"days":7,"dot_needed":"428,667,561"},{"time_hours":165,"approval_perbill":717223651,"support_perbill":377232143,"approval":71.7223651,"support":37.7232143,"days":7,"dot_needed":"427,823,727"},{"time_hours":166,"approval_perbill":716239317,"support_perbill":376488096,"approval":71.6239317,"support":37.6488096,"days":7,"dot_needed":"426,979,893"},{"time_hours":167,"approval_perbill":715260018,"support_perbill":375744048,"approval":71.5260018,"support":37.5744048,"days":7,"dot_needed":"426,136,059"},{"time_hours":168,"approval_perbill":714285714,"support_perbill":375000000,"approval":71.4285714,"support":37.5,"days":7,"dot_needed":"425,292,225"},{"time_hours":169,"approval_perbill":713316370,"support_perbill":374255953,"approval":71.331637,"support":37.4255953,"days":8,"dot_needed":"424,448,392"},{"time_hours":170,"approval_perbill":712351946,"support_perbill":373511905,"approval":71.2351946,"support":37.3511905,"days":8,"dot_needed":"423,604,558"},{"time_hours":171,"approval_perbill":711392406,"support_perbill":372767858,"approval":71.1392406,"support":37.2767858,"days":8,"dot_needed":"422,760,725"},{"time_hours":172,"approval_perbill":710437711,"support_perbill":372023810,"approval":71.0437711,"support":37.202381,"days":8,"dot_needed":"421,916,890"},{"time_hours":173,"approval_perbill":709487826,"support_perbill":371279762,"approval":70.9487826,"support":37.1279762,"days":8,"dot_needed":"421,073,056"},{"time_hours":174,"approval_perbill":708542714,"support_perbill":370535715,"approval":70.8542714,"support":37.0535715,"days":8,"dot_needed":"420,229,223"},{"time_hours":175,"approval_perbill":707602340,"support_perbill":369791667,"approval":70.760234,"support":36.9791667,"days":8,"dot_needed":"419,385,389"},{"time_hours":176,"approval_perbill":706666667,"support_perbill":369047620,"approval":70.6666667,"support":36.904762,"days":8,"dot_needed":"418,541,556"},{"time_hours":177,"approval_perbill":705735661,"support_perbill":368303572,"approval":70.5735661,"support":36.8303572,"days":8,"dot_needed":"417,697,722"},{"time_hours":178,"approval_perbill":704809287,"support_perbill":367559524,"approval":70.4809287,"support":36.7559524,"days":8,"dot_needed":"416,853,887"},{"time_hours":179,"approval_perbill":703887511,"support_perbill":366815477,"approval":70.3887511,"support":36.6815477,"days":8,"dot_needed":"416,010,054"},{"time_hours":180,"approval_perbill":702970298,"support_perbill":366071429,"approval":70.2970298,"support":36.6071429,"days":8,"dot_needed":"415,166,220"},{"time_hours":181,"approval_perbill":702057613,"support_perbill":365327381,"approval":70.2057613,"support":36.5327381,"days":8,"dot_needed":"414,322,386"},{"time_hours":182,"approval_perbill":701149426,"support_perbill":364583334,"approval":70.1149426,"support":36.4583334,"days":8,"dot_needed":"413,478,553"},{"time_hours":183,"approval_perbill":700245701,"support_perbill":363839286,"approval":70.0245701,"support":36.3839286,"days":8,"dot_needed":"412,634,719"},{"time_hours":184,"approval_perbill":699346406,"support_perbill":363095239,"approval":69.9346406,"support":36.3095239,"days":8,"dot_needed":"411,790,886"},{"time_hours":185,"approval_perbill":698451508,"support_perbill":362351191,"approval":69.8451508,"support":36.2351191,"days":8,"dot_needed":"410,947,051"},{"time_hours":186,"approval_perbill":697560976,"support_perbill":361607143,"approval":69.7560976,"support":36.1607143,"days":8,"dot_needed":"410,103,217"},{"time_hours":187,"approval_perbill":696674777,"support_perbill":360863096,"approval":69.6674777,"support":36.0863096,"days":8,"dot_needed":"409,259,384"},{"time_hours":188,"approval_perbill":695792881,"support_perbill":360119048,"approval":69.5792881,"support":36.0119048,"days":8,"dot_needed":"408,415,550"},{"time_hours":189,"approval_perbill":694915254,"support_perbill":359375000,"approval":69.4915254,"support":35.9375,"days":8,"dot_needed":"407,571,716"},{"time_hours":190,"approval_perbill":694041868,"support_perbill":358630953,"approval":69.4041868,"support":35.8630953,"days":8,"dot_needed":"406,727,883"},{"time_hours":191,"approval_perbill":693172691,"support_perbill":357886905,"approval":69.3172691,"support":35.7886905,"days":8,"dot_needed":"405,884,048"},{"time_hours":192,"approval_perbill":692307693,"support_perbill":357142858,"approval":69.2307693,"support":35.7142858,"days":8,"dot_needed":"405,040,215"},{"time_hours":193,"approval_perbill":691446843,"support_perbill":356398810,"approval":69.1446843,"support":35.639881,"days":9,"dot_needed":"404,196,381"},{"time_hours":194,"approval_perbill":690590112,"support_perbill":355654762,"approval":69.0590112,"support":35.5654762,"days":9,"dot_needed":"403,352,547"},{"time_hours":195,"approval_perbill":689737470,"support_perbill":354910715,"approval":68.973747,"support":35.4910715,"days":9,"dot_needed":"402,508,714"},{"time_hours":196,"approval_perbill":688888889,"support_perbill":354166667,"approval":68.8888889,"support":35.4166667,"days":9,"dot_needed":"401,664,880"},{"time_hours":197,"approval_perbill":688044339,"support_perbill":353422620,"approval":68.8044339,"support":35.342262,"days":9,"dot_needed":"400,821,046"},{"time_hours":198,"approval_perbill":687203792,"support_perbill":352678572,"approval":68.7203792,"support":35.2678572,"days":9,"dot_needed":"399,977,212"},{"time_hours":199,"approval_perbill":686367219,"support_perbill":351934524,"approval":68.6367219,"support":35.1934524,"days":9,"dot_needed":"399,133,378"},{"time_hours":200,"approval_perbill":685534592,"support_perbill":351190477,"approval":68.5534592,"support":35.1190477,"days":9,"dot_needed":"398,289,545"},{"time_hours":201,"approval_perbill":684705883,"support_perbill":350446429,"approval":68.4705883,"support":35.0446429,"days":9,"dot_needed":"397,445,711"},{"time_hours":202,"approval_perbill":683881064,"support_perbill":349702381,"approval":68.3881064,"support":34.9702381,"days":9,"dot_needed":"396,601,877"},{"time_hours":203,"approval_perbill":683060110,"support_perbill":348958334,"approval":68.306011,"support":34.8958334,"days":9,"dot_needed":"395,758,043"},{"time_hours":204,"approval_perbill":682242991,"support_perbill":348214286,"approval":68.2242991,"support":34.8214286,"days":9,"dot_needed":"394,914,209"},{"time_hours":205,"approval_perbill":681429682,"support_perbill":347470239,"approval":68.1429682,"support":34.7470239,"days":9,"dot_needed":"394,070,376"},{"time_hours":206,"approval_perbill":680620155,"support_perbill":346726191,"approval":68.0620155,"support":34.6726191,"days":9,"dot_needed":"393,226,542"},{"time_hours":207,"approval_perbill":679814385,"support_perbill":345982143,"approval":67.9814385,"support":34.5982143,"days":9,"dot_needed":"392,382,708"},{"time_hours":208,"approval_perbill":679012346,"support_perbill":345238096,"approval":67.9012346,"support":34.5238096,"days":9,"dot_needed":"391,538,875"},{"time_hours":209,"approval_perbill":678214011,"support_perbill":344494048,"approval":67.8214011,"support":34.4494048,"days":9,"dot_needed":"390,695,040"},{"time_hours":210,"approval_perbill":677419355,"support_perbill":343750000,"approval":67.7419355,"support":34.375,"days":9,"dot_needed":"389,851,206"},{"time_hours":211,"approval_perbill":676628353,"support_perbill":343005953,"approval":67.6628353,"support":34.3005953,"days":9,"dot_needed":"389,007,373"},{"time_hours":212,"approval_perbill":675840979,"support_perbill":342261905,"approval":67.5840979,"support":34.2261905,"days":9,"dot_needed":"388,163,539"},{"time_hours":213,"approval_perbill":675057209,"support_perbill":341517858,"approval":67.5057209,"support":34.1517858,"days":9,"dot_needed":"387,319,706"},{"time_hours":214,"approval_perbill":674277017,"support_perbill":340773810,"approval":67.4277017,"support":34.077381,"days":9,"dot_needed":"386,475,872"},{"time_hours":215,"approval_perbill":673500380,"support_perbill":340029762,"approval":67.350038,"support":34.0029762,"days":9,"dot_needed":"385,632,037"},{"time_hours":216,"approval_perbill":672727273,"support_perbill":339285715,"approval":67.2727273,"support":33.9285715,"days":9,"dot_needed":"384,788,204"},{"time_hours":217,"approval_perbill":671957672,"support_perbill":338541667,"approval":67.1957672,"support":33.8541667,"days":10,"dot_needed":"383,944,370"},{"time_hours":218,"approval_perbill":671191554,"support_perbill":337797620,"approval":67.1191554,"support":33.779762,"days":10,"dot_needed":"383,100,537"},{"time_hours":219,"approval_perbill":670428894,"support_perbill":337053572,"approval":67.0428894,"support":33.7053572,"days":10,"dot_needed":"382,256,703"},{"time_hours":220,"approval_perbill":669669670,"support_perbill":336309524,"approval":66.966967,"support":33.6309524,"days":10,"dot_needed":"381,412,869"},{"time_hours":221,"approval_perbill":668913858,"support_perbill":335565477,"approval":66.8913858,"support":33.5565477,"days":10,"dot_needed":"380,569,036"},{"time_hours":222,"approval_perbill":668161435,"support_perbill":334821429,"approval":66.8161435,"support":33.4821429,"days":10,"dot_needed":"379,725,201"},{"time_hours":223,"approval_perbill":667412379,"support_perbill":334077381,"approval":66.7412379,"support":33.4077381,"days":10,"dot_needed":"378,881,367"},{"time_hours":224,"approval_perbill":666666667,"support_perbill":333333334,"approval":66.6666667,"support":33.3333334,"days":10,"dot_needed":"378,037,534"},{"time_hours":225,"approval_perbill":665924276,"support_perbill":332589286,"approval":66.5924276,"support":33.2589286,"days":10,"dot_needed":"377,193,700"},{"time_hours":226,"approval_perbill":665185186,"support_perbill":331845239,"approval":66.5185186,"support":33.1845239,"days":10,"dot_needed":"376,349,867"},{"time_hours":227,"approval_perbill":664449372,"support_perbill":331101191,"approval":66.4449372,"support":33.1101191,"days":10,"dot_needed":"375,506,033"},{"time_hours":228,"approval_perbill":663716814,"support_perbill":330357143,"approval":66.3716814,"support":33.0357143,"days":10,"dot_needed":"374,662,198"},{"time_hours":229,"approval_perbill":662987491,"support_perbill":329613096,"approval":66.2987491,"support":32.9613096,"days":10,"dot_needed":"373,818,365"},{"time_hours":230,"approval_perbill":662261381,"support_perbill":328869048,"approval":66.2261381,"support":32.8869048,"days":10,"dot_needed":"372,974,531"},{"time_hours":231,"approval_perbill":661538462,"support_perbill":328125000,"approval":66.1538462,"support":32.8125,"days":10,"dot_needed":"372,130,697"},{"time_hours":232,"approval_perbill":660818714,"support_perbill":327380953,"approval":66.0818714,"support":32.7380953,"days":10,"dot_needed":"371,286,864"},{"time_hours":233,"approval_perbill":660102115,"support_perbill":326636905,"approval":66.0102115,"support":32.6636905,"days":10,"dot_needed":"370,443,030"},{"time_hours":234,"approval_perbill":659388647,"support_perbill":325892858,"approval":65.9388647,"support":32.5892858,"days":10,"dot_needed":"369,599,197"},{"time_hours":235,"approval_perbill":658678287,"support_perbill":325148810,"approval":65.8678287,"support":32.514881,"days":10,"dot_needed":"368,755,362"},{"time_hours":236,"approval_perbill":657971015,"support_perbill":324404762,"approval":65.7971015,"support":32.4404762,"days":10,"dot_needed":"367,911,528"},{"time_hours":237,"approval_perbill":657266811,"support_perbill":323660715,"approval":65.7266811,"support":32.3660715,"days":10,"dot_needed":"367,067,695"},{"time_hours":238,"approval_perbill":656565657,"support_perbill":322916667,"approval":65.6565657,"support":32.2916667,"days":10,"dot_needed":"366,223,861"},{"time_hours":239,"approval_perbill":655867531,"support_perbill":322172620,"approval":65.5867531,"support":32.217262,"days":10,"dot_needed":"365,380,028"},{"time_hours":240,"approval_perbill":655172414,"support_perbill":321428572,"approval":65.5172414,"support":32.1428572,"days":10,"dot_needed":"364,536,194"},{"time_hours":241,"approval_perbill":654480287,"support_perbill":320684524,"approval":65.4480287,"support":32.0684524,"days":11,"dot_needed":"363,692,359"},{"time_hours":242,"approval_perbill":653791130,"support_perbill":319940477,"approval":65.379113,"support":31.9940477,"days":11,"dot_needed":"362,848,526"},{"time_hours":243,"approval_perbill":653104925,"support_perbill":319196429,"approval":65.3104925,"support":31.9196429,"days":11,"dot_needed":"362,004,692"},{"time_hours":244,"approval_perbill":652421652,"support_perbill":318452381,"approval":65.2421652,"support":31.8452381,"days":11,"dot_needed":"361,160,858"},{"time_hours":245,"approval_perbill":651741294,"support_perbill":317708334,"approval":65.1741294,"support":31.7708334,"days":11,"dot_needed":"360,317,025"},{"time_hours":246,"approval_perbill":651063830,"support_perbill":316964286,"approval":65.106383,"support":31.6964286,"days":11,"dot_needed":"359,473,191"},{"time_hours":247,"approval_perbill":650389243,"support_perbill":316220239,"approval":65.0389243,"support":31.6220239,"days":11,"dot_needed":"358,629,357"},{"time_hours":248,"approval_perbill":649717514,"support_perbill":315476191,"approval":64.9717514,"support":31.5476191,"days":11,"dot_needed":"357,785,523"},{"time_hours":249,"approval_perbill":649048626,"support_perbill":314732143,"approval":64.9048626,"support":31.4732143,"days":11,"dot_needed":"356,941,689"},{"time_hours":250,"approval_perbill":648382560,"support_perbill":313988096,"approval":64.838256,"support":31.3988096,"days":11,"dot_needed":"356,097,856"},{"time_hours":251,"approval_perbill":647719299,"support_perbill":313244048,"approval":64.7719299,"support":31.3244048,"days":11,"dot_needed":"355,254,022"},{"time_hours":252,"approval_perbill":647058823,"support_perbill":312500000,"approval":64.7058823,"support":31.25,"days":11,"dot_needed":"354,410,188"},{"time_hours":253,"approval_perbill":646401118,"support_perbill":311755953,"approval":64.6401118,"support":31.1755953,"days":11,"dot_needed":"353,566,354"},{"time_hours":254,"approval_perbill":645746165,"support_perbill":311011905,"approval":64.5746165,"support":31.1011905,"days":11,"dot_needed":"352,722,520"},{"time_hours":255,"approval_perbill":645093946,"support_perbill":310267858,"approval":64.5093946,"support":31.0267858,"days":11,"dot_needed":"351,878,687"},{"time_hours":256,"approval_perbill":644444445,"support_perbill":309523810,"approval":64.4444445,"support":30.952381,"days":11,"dot_needed":"351,034,853"},{"time_hours":257,"approval_perbill":643797644,"support_perbill":308779762,"approval":64.3797644,"support":30.8779762,"days":11,"dot_needed":"350,191,019"},{"time_hours":258,"approval_perbill":643153527,"support_perbill":308035715,"approval":64.3153527,"support":30.8035715,"days":11,"dot_needed":"349,347,186"},{"time_hours":259,"approval_perbill":642512078,"support_perbill":307291667,"approval":64.2512078,"support":30.7291667,"days":11,"dot_needed":"348,503,351"},{"time_hours":260,"approval_perbill":641873279,"support_perbill":306547620,"approval":64.1873279,"support":30.654762,"days":11,"dot_needed":"347,659,518"},{"time_hours":261,"approval_perbill":641237113,"support_perbill":305803572,"approval":64.1237113,"support":30.5803572,"days":11,"dot_needed":"346,815,684"},{"time_hours":262,"approval_perbill":640603567,"support_perbill":305059524,"approval":64.0603567,"support":30.5059524,"days":11,"dot_needed":"345,971,850"},{"time_hours":263,"approval_perbill":639972622,"support_perbill":304315477,"approval":63.9972622,"support":30.4315477,"days":11,"dot_needed":"345,128,017"},{"time_hours":264,"approval_perbill":639344263,"support_perbill":303571429,"approval":63.9344263,"support":30.3571429,"days":11,"dot_needed":"344,284,183"},{"time_hours":265,"approval_perbill":638718473,"support_perbill":302827381,"approval":63.8718473,"support":30.2827381,"days":12,"dot_needed":"343,440,348"},{"time_hours":266,"approval_perbill":638095238,"support_perbill":302083334,"approval":63.8095238,"support":30.2083334,"days":12,"dot_needed":"342,596,515"},{"time_hours":267,"approval_perbill":637474542,"support_perbill":301339286,"approval":63.7474542,"support":30.1339286,"days":12,"dot_needed":"341,752,681"},{"time_hours":268,"approval_perbill":636856369,"support_perbill":300595239,"approval":63.6856369,"support":30.0595239,"days":12,"dot_needed":"340,908,848"},{"time_hours":269,"approval_perbill":636240703,"support_perbill":299851191,"approval":63.6240703,"support":29.9851191,"days":12,"dot_needed":"340,065,014"},{"time_hours":270,"approval_perbill":635627530,"support_perbill":299107143,"approval":63.562753,"support":29.9107143,"days":12,"dot_needed":"339,221,180"},{"time_hours":271,"approval_perbill":635016835,"support_perbill":298363096,"approval":63.5016835,"support":29.8363096,"days":12,"dot_needed":"338,377,347"},{"time_hours":272,"approval_perbill":634408602,"support_perbill":297619048,"approval":63.4408602,"support":29.7619048,"days":12,"dot_needed":"337,533,512"},{"time_hours":273,"approval_perbill":633802817,"support_perbill":296875000,"approval":63.3802817,"support":29.6875,"days":12,"dot_needed":"336,689,678"},{"time_hours":274,"approval_perbill":633199465,"support_perbill":296130953,"approval":63.3199465,"support":29.6130953,"days":12,"dot_needed":"335,845,845"},{"time_hours":275,"approval_perbill":632598530,"support_perbill":295386905,"approval":63.259853,"support":29.5386905,"days":12,"dot_needed":"335,002,011"},{"time_hours":276,"approval_perbill":632000000,"support_perbill":294642858,"approval":63.2,"support":29.4642858,"days":12,"dot_needed":"334,158,178"},{"time_hours":277,"approval_perbill":631403859,"support_perbill":293898810,"approval":63.1403859,"support":29.389881,"days":12,"dot_needed":"333,314,344"},{"time_hours":278,"approval_perbill":630810093,"support_perbill":293154762,"approval":63.0810093,"support":29.3154762,"days":12,"dot_needed":"332,470,509"},{"time_hours":279,"approval_perbill":630218688,"support_perbill":292410715,"approval":63.0218688,"support":29.2410715,"days":12,"dot_needed":"331,626,676"},{"time_hours":280,"approval_perbill":629629630,"support_perbill":291666667,"approval":62.962963,"support":29.1666667,"days":12,"dot_needed":"330,782,842"},{"time_hours":281,"approval_perbill":629042905,"support_perbill":290922620,"approval":62.9042905,"support":29.092262,"days":12,"dot_needed":"329,939,009"},{"time_hours":282,"approval_perbill":628458498,"support_perbill":290178572,"approval":62.8458498,"support":29.0178572,"days":12,"dot_needed":"329,095,175"},{"time_hours":283,"approval_perbill":627876397,"support_perbill":289434524,"approval":62.7876397,"support":28.9434524,"days":12,"dot_needed":"328,251,341"},{"time_hours":284,"approval_perbill":627296588,"support_perbill":288690477,"approval":62.7296588,"support":28.8690477,"days":12,"dot_needed":"327,407,507"},{"time_hours":285,"approval_perbill":626719057,"support_perbill":287946429,"approval":62.6719057,"support":28.7946429,"days":12,"dot_needed":"326,563,673"},{"time_hours":286,"approval_perbill":626143791,"support_perbill":287202381,"approval":62.6143791,"support":28.7202381,"days":12,"dot_needed":"325,719,839"},{"time_hours":287,"approval_perbill":625570776,"support_perbill":286458334,"approval":62.5570776,"support":28.6458334,"days":12,"dot_needed":"324,876,006"},{"time_hours":288,"approval_perbill":625000000,"support_perbill":285714286,"approval":62.5,"support":28.5714286,"days":12,"dot_needed":"324,032,172"},{"time_hours":289,"approval_perbill":624431449,"support_perbill":284970239,"approval":62.4431449,"support":28.4970239,"days":13,"dot_needed":"323,188,339"},{"time_hours":290,"approval_perbill":623865110,"support_perbill":284226191,"approval":62.386511,"support":28.4226191,"days":13,"dot_needed":"322,344,504"},{"time_hours":291,"approval_perbill":623300971,"support_perbill":283482143,"approval":62.3300971,"support":28.3482143,"days":13,"dot_needed":"321,500,670"},{"time_hours":292,"approval_perbill":622739018,"support_perbill":282738096,"approval":62.2739018,"support":28.2738096,"days":13,"dot_needed":"320,656,837"},{"time_hours":293,"approval_perbill":622179239,"support_perbill":281994048,"approval":62.2179239,"support":28.1994048,"days":13,"dot_needed":"319,813,003"},{"time_hours":294,"approval_perbill":621621621,"support_perbill":281250000,"approval":62.1621621,"support":28.125,"days":13,"dot_needed":"318,969,169"},{"time_hours":295,"approval_perbill":621066153,"support_perbill":280505953,"approval":62.1066153,"support":28.0505953,"days":13,"dot_needed":"318,125,336"},{"time_hours":296,"approval_perbill":620512821,"support_perbill":279761905,"approval":62.0512821,"support":27.9761905,"days":13,"dot_needed":"317,281,501"},{"time_hours":297,"approval_perbill":619961612,"support_perbill":279017858,"approval":61.9961612,"support":27.9017858,"days":13,"dot_needed":"316,437,668"},{"time_hours":298,"approval_perbill":619412516,"support_perbill":278273810,"approval":61.9412516,"support":27.827381,"days":13,"dot_needed":"315,593,834"},{"time_hours":299,"approval_perbill":618865519,"support_perbill":277529762,"approval":61.8865519,"support":27.7529762,"days":13,"dot_needed":"314,750,000"},{"time_hours":300,"approval_perbill":618320611,"support_perbill":276785715,"approval":61.8320611,"support":27.6785715,"days":13,"dot_needed":"313,906,167"},{"time_hours":301,"approval_perbill":617777778,"support_perbill":276041667,"approval":61.7777778,"support":27.6041667,"days":13,"dot_needed":"313,062,333"},{"time_hours":302,"approval_perbill":617237009,"support_perbill":275297620,"approval":61.7237009,"support":27.529762,"days":13,"dot_needed":"312,218,500"},{"time_hours":303,"approval_perbill":616698292,"support_perbill":274553572,"approval":61.6698292,"support":27.4553572,"days":13,"dot_needed":"311,374,665"},{"time_hours":304,"approval_perbill":616161616,"support_perbill":273809524,"approval":61.6161616,"support":27.3809524,"days":13,"dot_needed":"310,530,831"},{"time_hours":305,"approval_perbill":615626969,"support_perbill":273065477,"approval":61.5626969,"support":27.3065477,"days":13,"dot_needed":"309,686,998"},{"time_hours":306,"approval_perbill":615094340,"support_perbill":272321429,"approval":61.509434,"support":27.2321429,"days":13,"dot_needed":"308,843,164"},{"time_hours":307,"approval_perbill":614563716,"support_perbill":271577381,"approval":61.4563716,"support":27.1577381,"days":13,"dot_needed":"307,999,330"},{"time_hours":308,"approval_perbill":614035088,"support_perbill":270833334,"approval":61.4035088,"support":27.0833334,"days":13,"dot_needed":"307,155,497"},{"time_hours":309,"approval_perbill":613508443,"support_perbill":270089286,"approval":61.3508443,"support":27.0089286,"days":13,"dot_needed":"306,311,662"},{"time_hours":310,"approval_perbill":612983770,"support_perbill":269345239,"approval":61.298377,"support":26.9345239,"days":13,"dot_needed":"305,467,829"},{"time_hours":311,"approval_perbill":612461059,"support_perbill":268601191,"approval":61.2461059,"support":26.8601191,"days":13,"dot_needed":"304,623,995"},{"time_hours":312,"approval_perbill":611940298,"support_perbill":267857143,"approval":61.1940298,"support":26.7857143,"days":13,"dot_needed":"303,780,161"},{"time_hours":313,"approval_perbill":611421477,"support_perbill":267113096,"approval":61.1421477,"support":26.7113096,"days":14,"dot_needed":"302,936,328"},{"time_hours":314,"approval_perbill":610904585,"support_perbill":266369048,"approval":61.0904585,"support":26.6369048,"days":14,"dot_needed":"302,092,494"},{"time_hours":315,"approval_perbill":610389610,"support_perbill":265625000,"approval":61.038961,"support":26.5625,"days":14,"dot_needed":"301,248,659"},{"time_hours":316,"approval_perbill":609876543,"support_perbill":264880953,"approval":60.9876543,"support":26.4880953,"days":14,"dot_needed":"300,404,826"},{"time_hours":317,"approval_perbill":609365373,"support_perbill":264136905,"approval":60.9365373,"support":26.4136905,"days":14,"dot_needed":"299,560,992"},{"time_hours":318,"approval_perbill":608856089,"support_perbill":263392858,"approval":60.8856089,"support":26.3392858,"days":14,"dot_needed":"298,717,159"},{"time_hours":319,"approval_perbill":608348680,"support_perbill":262648810,"approval":60.834868,"support":26.264881,"days":14,"dot_needed":"297,873,325"},{"time_hours":320,"approval_perbill":607843137,"support_perbill":261904762,"approval":60.7843137,"support":26.1904762,"days":14,"dot_needed":"297,029,491"},{"time_hours":321,"approval_perbill":607339449,"support_perbill":261160715,"approval":60.7339449,"support":26.1160715,"days":14,"dot_needed":"296,185,658"},{"time_hours":322,"approval_perbill":606837607,"support_perbill":260416667,"approval":60.6837607,"support":26.0416667,"days":14,"dot_needed":"295,341,823"},{"time_hours":323,"approval_perbill":606337599,"support_perbill":259672620,"approval":60.6337599,"support":25.967262,"days":14,"dot_needed":"294,497,990"},{"time_hours":324,"approval_perbill":605839416,"support_perbill":258928572,"approval":60.5839416,"support":25.8928572,"days":14,"dot_needed":"293,654,156"},{"time_hours":325,"approval_perbill":605343048,"support_perbill":258184524,"approval":60.5343048,"support":25.8184524,"days":14,"dot_needed":"292,810,322"},{"time_hours":326,"approval_perbill":604848485,"support_perbill":257440477,"approval":60.4848485,"support":25.7440477,"days":14,"dot_needed":"291,966,489"},{"time_hours":327,"approval_perbill":604355717,"support_perbill":256696429,"approval":60.4355717,"support":25.6696429,"days":14,"dot_needed":"291,122,655"},{"time_hours":328,"approval_perbill":603864734,"support_perbill":255952381,"approval":60.3864734,"support":25.5952381,"days":14,"dot_needed":"290,278,820"},{"time_hours":329,"approval_perbill":603375527,"support_perbill":255208334,"approval":60.3375527,"support":25.5208334,"days":14,"dot_needed":"289,434,987"},{"time_hours":330,"approval_perbill":602888087,"support_perbill":254464286,"approval":60.2888087,"support":25.4464286,"days":14,"dot_needed":"288,591,153"},{"time_hours":331,"approval_perbill":602402402,"support_perbill":253720239,"approval":60.2402402,"support":25.3720239,"days":14,"dot_needed":"287,747,320"},{"time_hours":332,"approval_perbill":601918465,"support_perbill":252976191,"approval":60.1918465,"support":25.2976191,"days":14,"dot_needed":"286,903,486"},{"time_hours":333,"approval_perbill":601436266,"support_perbill":252232143,"approval":60.1436266,"support":25.2232143,"days":14,"dot_needed":"286,059,652"},{"time_hours":334,"approval_perbill":600955794,"support_perbill":251488096,"approval":60.0955794,"support":25.1488096,"days":14,"dot_needed":"285,215,818"},{"time_hours":335,"approval_perbill":600477042,"support_perbill":250744048,"approval":60.0477042,"support":25.0744048,"days":14,"dot_needed":"284,371,984"},{"time_hours":336,"approval_perbill":600000000,"support_perbill":250000000,"approval":60,"support":25,"days":14,"dot_needed":"283,528,150"},{"time_hours":337,"approval_perbill":599524658,"support_perbill":249255953,"approval":59.9524658,"support":24.9255953,"days":15,"dot_needed":"282,684,317"},{"time_hours":338,"approval_perbill":599051008,"support_perbill":248511905,"approval":59.9051008,"support":24.8511905,"days":15,"dot_needed":"281,840,483"},{"time_hours":339,"approval_perbill":598579041,"support_perbill":247767858,"approval":59.8579041,"support":24.7767858,"days":15,"dot_needed":"280,996,650"},{"time_hours":340,"approval_perbill":598108747,"support_perbill":247023810,"approval":59.8108747,"support":24.702381,"days":15,"dot_needed":"280,152,815"},{"time_hours":341,"approval_perbill":597640118,"support_perbill":246279762,"approval":59.7640118,"support":24.6279762,"days":15,"dot_needed":"279,308,981"},{"time_hours":342,"approval_perbill":597173145,"support_perbill":245535715,"approval":59.7173145,"support":24.5535715,"days":15,"dot_needed":"278,465,148"},{"time_hours":343,"approval_perbill":596707819,"support_perbill":244791667,"approval":59.6707819,"support":24.4791667,"days":15,"dot_needed":"277,621,314"},{"time_hours":344,"approval_perbill":596244131,"support_perbill":244047620,"approval":59.6244131,"support":24.404762,"days":15,"dot_needed":"276,777,481"},{"time_hours":345,"approval_perbill":595782074,"support_perbill":243303572,"approval":59.5782074,"support":24.3303572,"days":15,"dot_needed":"275,933,647"},{"time_hours":346,"approval_perbill":595321637,"support_perbill":242559524,"approval":59.5321637,"support":24.2559524,"days":15,"dot_needed":"275,089,812"},{"time_hours":347,"approval_perbill":594862814,"support_perbill":241815477,"approval":59.4862814,"support":24.1815477,"days":15,"dot_needed":"274,245,979"},{"time_hours":348,"approval_perbill":594405594,"support_perbill":241071429,"approval":59.4405594,"support":24.1071429,"days":15,"dot_needed":"273,402,145"},{"time_hours":349,"approval_perbill":593949971,"support_perbill":240327381,"approval":59.3949971,"support":24.0327381,"days":15,"dot_needed":"272,558,311"},{"time_hours":350,"approval_perbill":593495935,"support_perbill":239583334,"approval":59.3495935,"support":23.9583334,"days":15,"dot_needed":"271,714,478"},{"time_hours":351,"approval_perbill":593043478,"support_perbill":238839286,"approval":59.3043478,"support":23.8839286,"days":15,"dot_needed":"270,870,644"},{"time_hours":352,"approval_perbill":592592593,"support_perbill":238095239,"approval":59.2592593,"support":23.8095239,"days":15,"dot_needed":"270,026,811"},{"time_hours":353,"approval_perbill":592143270,"support_perbill":237351191,"approval":59.214327,"support":23.7351191,"days":15,"dot_needed":"269,182,976"},{"time_hours":354,"approval_perbill":591695502,"support_perbill":236607143,"approval":59.1695502,"support":23.6607143,"days":15,"dot_needed":"268,339,142"},{"time_hours":355,"approval_perbill":591249280,"support_perbill":235863096,"approval":59.124928,"support":23.5863096,"days":15,"dot_needed":"267,495,309"},{"time_hours":356,"approval_perbill":590804598,"support_perbill":235119048,"approval":59.0804598,"support":23.5119048,"days":15,"dot_needed":"266,651,475"},{"time_hours":357,"approval_perbill":590361446,"support_perbill":234375000,"approval":59.0361446,"support":23.4375,"days":15,"dot_needed":"265,807,641"},{"time_hours":358,"approval_perbill":589919817,"support_perbill":233630953,"approval":58.9919817,"support":23.3630953,"days":15,"dot_needed":"264,963,808"},{"time_hours":359,"approval_perbill":589479703,"support_perbill":232886905,"approval":58.9479703,"support":23.2886905,"days":15,"dot_needed":"264,119,973"},{"time_hours":360,"approval_perbill":589041096,"support_perbill":232142858,"approval":58.9041096,"support":23.2142858,"days":15,"dot_needed":"263,276,140"},{"time_hours":361,"approval_perbill":588603989,"support_perbill":231398810,"approval":58.8603989,"support":23.139881,"days":16,"dot_needed":"262,432,306"},{"time_hours":362,"approval_perbill":588168373,"support_perbill":230654762,"approval":58.8168373,"support":23.0654762,"days":16,"dot_needed":"261,588,472"},{"time_hours":363,"approval_perbill":587734242,"support_perbill":229910715,"approval":58.7734242,"support":22.9910715,"days":16,"dot_needed":"260,744,639"},{"time_hours":364,"approval_perbill":587301587,"support_perbill":229166667,"approval":58.7301587,"support":22.9166667,"days":16,"dot_needed":"259,900,805"},{"time_hours":365,"approval_perbill":586870402,"support_perbill":228422620,"approval":58.6870402,"support":22.842262,"days":16,"dot_needed":"259,056,971"},{"time_hours":366,"approval_perbill":586440678,"support_perbill":227678572,"approval":58.6440678,"support":22.7678572,"days":16,"dot_needed":"258,213,137"},{"time_hours":367,"approval_perbill":586012408,"support_perbill":226934524,"approval":58.6012408,"support":22.6934524,"days":16,"dot_needed":"257,369,303"},{"time_hours":368,"approval_perbill":585585585,"support_perbill":226190477,"approval":58.5585585,"support":22.6190477,"days":16,"dot_needed":"256,525,470"},{"time_hours":369,"approval_perbill":585160202,"support_perbill":225446429,"approval":58.5160202,"support":22.5446429,"days":16,"dot_needed":"255,681,636"},{"time_hours":370,"approval_perbill":584736251,"support_perbill":224702381,"approval":58.4736251,"support":22.4702381,"days":16,"dot_needed":"254,837,802"},{"time_hours":371,"approval_perbill":584313725,"support_perbill":223958334,"approval":58.4313725,"support":22.3958334,"days":16,"dot_needed":"253,993,968"},{"time_hours":372,"approval_perbill":583892617,"support_perbill":223214286,"approval":58.3892617,"support":22.3214286,"days":16,"dot_needed":"253,150,134"},{"time_hours":373,"approval_perbill":583472920,"support_perbill":222470239,"approval":58.347292,"support":22.2470239,"days":16,"dot_needed":"252,306,301"},{"time_hours":374,"approval_perbill":583054626,"support_perbill":221726191,"approval":58.3054626,"support":22.1726191,"days":16,"dot_needed":"251,462,467"},{"time_hours":375,"approval_perbill":582637729,"support_perbill":220982143,"approval":58.2637729,"support":22.0982143,"days":16,"dot_needed":"250,618,633"},{"time_hours":376,"approval_perbill":582222222,"support_perbill":220238096,"approval":58.2222222,"support":22.0238096,"days":16,"dot_needed":"249,774,800"},{"time_hours":377,"approval_perbill":581808098,"support_perbill":219494048,"approval":58.1808098,"support":21.9494048,"days":16,"dot_needed":"248,930,965"},{"time_hours":378,"approval_perbill":581395349,"support_perbill":218750000,"approval":58.1395349,"support":21.875,"days":16,"dot_needed":"248,087,131"},{"time_hours":379,"approval_perbill":580983969,"support_perbill":218005953,"approval":58.0983969,"support":21.8005953,"days":16,"dot_needed":"247,243,298"},{"time_hours":380,"approval_perbill":580573951,"support_perbill":217261905,"approval":58.0573951,"support":21.7261905,"days":16,"dot_needed":"246,399,464"},{"time_hours":381,"approval_perbill":580165289,"support_perbill":216517858,"approval":58.0165289,"support":21.6517858,"days":16,"dot_needed":"245,555,631"},{"time_hours":382,"approval_perbill":579757976,"support_perbill":215773810,"approval":57.9757976,"support":21.577381,"days":16,"dot_needed":"244,711,797"},{"time_hours":383,"approval_perbill":579352004,"support_perbill":215029762,"approval":57.9352004,"support":21.5029762,"days":16,"dot_needed":"243,867,962"},{"time_hours":384,"approval_perbill":578947368,"support_perbill":214285715,"approval":57.8947368,"support":21.4285715,"days":16,"dot_needed":"243,024,129"},{"time_hours":385,"approval_perbill":578544061,"support_perbill":213541667,"approval":57.8544061,"support":21.3541667,"days":17,"dot_needed":"242,180,295"},{"time_hours":386,"approval_perbill":578142076,"support_perbill":212797620,"approval":57.8142076,"support":21.279762,"days":17,"dot_needed":"241,336,462"},{"time_hours":387,"approval_perbill":577741407,"support_perbill":212053572,"approval":57.7741407,"support":21.2053572,"days":17,"dot_needed":"240,492,628"},{"time_hours":388,"approval_perbill":577342048,"support_perbill":211309524,"approval":57.7342048,"support":21.1309524,"days":17,"dot_needed":"239,648,794"},{"time_hours":389,"approval_perbill":576943991,"support_perbill":210565477,"approval":57.6943991,"support":21.0565477,"days":17,"dot_needed":"238,804,961"},{"time_hours":390,"approval_perbill":576547231,"support_perbill":209821429,"approval":57.6547231,"support":20.9821429,"days":17,"dot_needed":"237,961,126"},{"time_hours":391,"approval_perbill":576151761,"support_perbill":209077381,"approval":57.6151761,"support":20.9077381,"days":17,"dot_needed":"237,117,292"},{"time_hours":392,"approval_perbill":575757576,"support_perbill":208333334,"approval":57.5757576,"support":20.8333334,"days":17,"dot_needed":"236,273,459"},{"time_hours":393,"approval_perbill":575364668,"support_perbill":207589286,"approval":57.5364668,"support":20.7589286,"days":17,"dot_needed":"235,429,625"},{"time_hours":394,"approval_perbill":574973031,"support_perbill":206845239,"approval":57.4973031,"support":20.6845239,"days":17,"dot_needed":"234,585,792"},{"time_hours":395,"approval_perbill":574582660,"support_perbill":206101191,"approval":57.458266,"support":20.6101191,"days":17,"dot_needed":"233,741,958"},{"time_hours":396,"approval_perbill":574193548,"support_perbill":205357143,"approval":57.4193548,"support":20.5357143,"days":17,"dot_needed":"232,898,123"},{"time_hours":397,"approval_perbill":573805690,"support_perbill":204613096,"approval":57.380569,"support":20.4613096,"days":17,"dot_needed":"232,054,290"},{"time_hours":398,"approval_perbill":573419078,"support_perbill":203869048,"approval":57.3419078,"support":20.3869048,"days":17,"dot_needed":"231,210,456"},{"time_hours":399,"approval_perbill":573033708,"support_perbill":203125000,"approval":57.3033708,"support":20.3125,"days":17,"dot_needed":"230,366,622"},{"time_hours":400,"approval_perbill":572649572,"support_perbill":202380953,"approval":57.2649572,"support":20.2380953,"days":17,"dot_needed":"229,522,789"},{"time_hours":401,"approval_perbill":572266666,"support_perbill":201636905,"approval":57.2266666,"support":20.1636905,"days":17,"dot_needed":"228,678,955"},{"time_hours":402,"approval_perbill":571884984,"support_perbill":200892858,"approval":57.1884984,"support":20.0892858,"days":17,"dot_needed":"227,835,122"},{"time_hours":403,"approval_perbill":571504519,"support_perbill":200148810,"approval":57.1504519,"support":20.014881,"days":17,"dot_needed":"226,991,287"},{"time_hours":404,"approval_perbill":571125265,"support_perbill":199404762,"approval":57.1125265,"support":19.9404762,"days":17,"dot_needed":"226,147,453"},{"time_hours":405,"approval_perbill":570747218,"support_perbill":198660715,"approval":57.0747218,"support":19.8660715,"days":17,"dot_needed":"225,303,620"},{"time_hours":406,"approval_perbill":570370370,"support_perbill":197916667,"approval":57.037037,"support":19.7916667,"days":17,"dot_needed":"224,459,786"},{"time_hours":407,"approval_perbill":569994717,"support_perbill":197172620,"approval":56.9994717,"support":19.717262,"days":17,"dot_needed":"223,615,953"},{"time_hours":408,"approval_perbill":569620253,"support_perbill":196428572,"approval":56.9620253,"support":19.6428572,"days":17,"dot_needed":"222,772,119"},{"time_hours":409,"approval_perbill":569246972,"support_perbill":195684524,"approval":56.9246972,"support":19.5684524,"days":18,"dot_needed":"221,928,284"},{"time_hours":410,"approval_perbill":568874868,"support_perbill":194940477,"approval":56.8874868,"support":19.4940477,"days":18,"dot_needed":"221,084,451"},{"time_hours":411,"approval_perbill":568503937,"support_perbill":194196429,"approval":56.8503937,"support":19.4196429,"days":18,"dot_needed":"220,240,617"},{"time_hours":412,"approval_perbill":568134172,"support_perbill":193452381,"approval":56.8134172,"support":19.3452381,"days":18,"dot_needed":"219,396,783"},{"time_hours":413,"approval_perbill":567765567,"support_perbill":192708334,"approval":56.7765567,"support":19.2708334,"days":18,"dot_needed":"218,552,950"},{"time_hours":414,"approval_perbill":567398119,"support_perbill":191964286,"approval":56.7398119,"support":19.1964286,"days":18,"dot_needed":"217,709,116"},{"time_hours":415,"approval_perbill":567031820,"support_perbill":191220239,"approval":56.703182,"support":19.1220239,"days":18,"dot_needed":"216,865,282"},{"time_hours":416,"approval_perbill":566666666,"support_perbill":190476191,"approval":56.6666666,"support":19.0476191,"days":18,"dot_needed":"216,021,448"},{"time_hours":417,"approval_perbill":566302652,"support_perbill":189732143,"approval":56.6302652,"support":18.9732143,"days":18,"dot_needed":"215,177,614"},{"time_hours":418,"approval_perbill":565939771,"support_perbill":188988096,"approval":56.5939771,"support":18.8988096,"days":18,"dot_needed":"214,333,781"},{"time_hours":419,"approval_perbill":565578020,"support_perbill":188244048,"approval":56.557802,"support":18.8244048,"days":18,"dot_needed":"213,489,947"},{"time_hours":420,"approval_perbill":565217391,"support_perbill":187500000,"approval":56.5217391,"support":18.75,"days":18,"dot_needed":"212,646,113"},{"time_hours":421,"approval_perbill":564857881,"support_perbill":186755953,"approval":56.4857881,"support":18.6755953,"days":18,"dot_needed":"211,802,279"},{"time_hours":422,"approval_perbill":564499484,"support_perbill":186011905,"approval":56.4499484,"support":18.6011905,"days":18,"dot_needed":"210,958,445"},{"time_hours":423,"approval_perbill":564142195,"support_perbill":185267858,"approval":56.4142195,"support":18.5267858,"days":18,"dot_needed":"210,114,612"},{"time_hours":424,"approval_perbill":563786008,"support_perbill":184523810,"approval":56.3786008,"support":18.452381,"days":18,"dot_needed":"209,270,778"},{"time_hours":425,"approval_perbill":563430919,"support_perbill":183779762,"approval":56.3430919,"support":18.3779762,"days":18,"dot_needed":"208,426,944"},{"time_hours":426,"approval_perbill":563076923,"support_perbill":183035715,"approval":56.3076923,"support":18.3035715,"days":18,"dot_needed":"207,583,111"},{"time_hours":427,"approval_perbill":562724014,"support_perbill":182291667,"approval":56.2724014,"support":18.2291667,"days":18,"dot_needed":"206,739,276"},{"time_hours":428,"approval_perbill":562372188,"support_perbill":181547620,"approval":56.2372188,"support":18.154762,"days":18,"dot_needed":"205,895,443"},{"time_hours":429,"approval_perbill":562021439,"support_perbill":180803572,"approval":56.2021439,"support":18.0803572,"days":18,"dot_needed":"205,051,609"},{"time_hours":430,"approval_perbill":561671763,"support_perbill":180059524,"approval":56.1671763,"support":18.0059524,"days":18,"dot_needed":"204,207,775"},{"time_hours":431,"approval_perbill":561323155,"support_perbill":179315477,"approval":56.1323155,"support":17.9315477,"days":18,"dot_needed":"203,363,942"},{"time_hours":432,"approval_perbill":560975610,"support_perbill":178571429,"approval":56.097561,"support":17.8571429,"days":18,"dot_needed":"202,520,108"},{"time_hours":433,"approval_perbill":560629122,"support_perbill":177827381,"approval":56.0629122,"support":17.7827381,"days":19,"dot_needed":"201,676,273"},{"time_hours":434,"approval_perbill":560283688,"support_perbill":177083334,"approval":56.0283688,"support":17.7083334,"days":19,"dot_needed":"200,832,440"},{"time_hours":435,"approval_perbill":559939302,"support_perbill":176339286,"approval":55.9939302,"support":17.6339286,"days":19,"dot_needed":"199,988,606"},{"time_hours":436,"approval_perbill":559595959,"support_perbill":175595239,"approval":55.9595959,"support":17.5595239,"days":19,"dot_needed":"199,144,773"},{"time_hours":437,"approval_perbill":559253656,"support_perbill":174851191,"approval":55.9253656,"support":17.4851191,"days":19,"dot_needed":"198,300,939"},{"time_hours":438,"approval_perbill":558912386,"support_perbill":174107143,"approval":55.8912386,"support":17.4107143,"days":19,"dot_needed":"197,457,105"},{"time_hours":439,"approval_perbill":558572147,"support_perbill":173363096,"approval":55.8572147,"support":17.3363096,"days":19,"dot_needed":"196,613,272"},{"time_hours":440,"approval_perbill":558232931,"support_perbill":172619048,"approval":55.8232931,"support":17.2619048,"days":19,"dot_needed":"195,769,437"},{"time_hours":441,"approval_perbill":557894736,"support_perbill":171875000,"approval":55.7894736,"support":17.1875,"days":19,"dot_needed":"194,925,603"},{"time_hours":442,"approval_perbill":557557557,"support_perbill":171130953,"approval":55.7557557,"support":17.1130953,"days":19,"dot_needed":"194,081,770"},{"time_hours":443,"approval_perbill":557221389,"support_perbill":170386905,"approval":55.7221389,"support":17.0386905,"days":19,"dot_needed":"193,237,936"},{"time_hours":444,"approval_perbill":556886227,"support_perbill":169642858,"approval":55.6886227,"support":16.9642858,"days":19,"dot_needed":"192,394,103"},{"time_hours":445,"approval_perbill":556552068,"support_perbill":168898810,"approval":55.6552068,"support":16.889881,"days":19,"dot_needed":"191,550,269"},{"time_hours":446,"approval_perbill":556218905,"support_perbill":168154762,"approval":55.6218905,"support":16.8154762,"days":19,"dot_needed":"190,706,434"},{"time_hours":447,"approval_perbill":555886736,"support_perbill":167410715,"approval":55.5886736,"support":16.7410715,"days":19,"dot_needed":"189,862,601"},{"time_hours":448,"approval_perbill":555555555,"support_perbill":166666667,"approval":55.5555555,"support":16.6666667,"days":19,"dot_needed":"189,018,767"},{"time_hours":449,"approval_perbill":555225359,"support_perbill":165922620,"approval":55.5225359,"support":16.592262,"days":19,"dot_needed":"188,174,934"},{"time_hours":450,"approval_perbill":554896142,"support_perbill":165178572,"approval":55.4896142,"support":16.5178572,"days":19,"dot_needed":"187,331,100"},{"time_hours":451,"approval_perbill":554567901,"support_perbill":164434524,"approval":55.4567901,"support":16.4434524,"days":19,"dot_needed":"186,487,266"},{"time_hours":452,"approval_perbill":554240631,"support_perbill":163690477,"approval":55.4240631,"support":16.3690477,"days":19,"dot_needed":"185,643,432"},{"time_hours":453,"approval_perbill":553914328,"support_perbill":162946429,"approval":55.3914328,"support":16.2946429,"days":19,"dot_needed":"184,799,598"},{"time_hours":454,"approval_perbill":553588987,"support_perbill":162202381,"approval":55.3588987,"support":16.2202381,"days":19,"dot_needed":"183,955,764"},{"time_hours":455,"approval_perbill":553264604,"support_perbill":161458334,"approval":55.3264604,"support":16.1458334,"days":19,"dot_needed":"183,111,931"},{"time_hours":456,"approval_perbill":552941176,"support_perbill":160714286,"approval":55.2941176,"support":16.0714286,"days":19,"dot_needed":"182,268,097"},{"time_hours":457,"approval_perbill":552618698,"support_perbill":159970239,"approval":55.2618698,"support":15.9970239,"days":20,"dot_needed":"181,424,264"},{"time_hours":458,"approval_perbill":552297165,"support_perbill":159226191,"approval":55.2297165,"support":15.9226191,"days":20,"dot_needed":"180,580,429"},{"time_hours":459,"approval_perbill":551976574,"support_perbill":158482143,"approval":55.1976574,"support":15.8482143,"days":20,"dot_needed":"179,736,595"},{"time_hours":460,"approval_perbill":551656920,"support_perbill":157738096,"approval":55.165692,"support":15.7738096,"days":20,"dot_needed":"178,892,762"},{"time_hours":461,"approval_perbill":551338199,"support_perbill":156994048,"approval":55.1338199,"support":15.6994048,"days":20,"dot_needed":"178,048,928"},{"time_hours":462,"approval_perbill":551020408,"support_perbill":156250000,"approval":55.1020408,"support":15.625,"days":20,"dot_needed":"177,205,094"},{"time_hours":463,"approval_perbill":550703542,"support_perbill":155505953,"approval":55.0703542,"support":15.5505953,"days":20,"dot_needed":"176,361,261"},{"time_hours":464,"approval_perbill":550387597,"support_perbill":154761905,"approval":55.0387597,"support":15.4761905,"days":20,"dot_needed":"175,517,426"},{"time_hours":465,"approval_perbill":550072569,"support_perbill":154017858,"approval":55.0072569,"support":15.4017858,"days":20,"dot_needed":"174,673,593"},{"time_hours":466,"approval_perbill":549758454,"support_perbill":153273810,"approval":54.9758454,"support":15.327381,"days":20,"dot_needed":"173,829,759"},{"time_hours":467,"approval_perbill":549445248,"support_perbill":152529762,"approval":54.9445248,"support":15.2529762,"days":20,"dot_needed":"172,985,925"},{"time_hours":468,"approval_perbill":549132948,"support_perbill":151785715,"approval":54.9132948,"support":15.1785715,"days":20,"dot_needed":"172,142,092"},{"time_hours":469,"approval_perbill":548821549,"support_perbill":151041667,"approval":54.8821549,"support":15.1041667,"days":20,"dot_needed":"171,298,258"},{"time_hours":470,"approval_perbill":548511047,"support_perbill":150297620,"approval":54.8511047,"support":15.029762,"days":20,"dot_needed":"170,454,425"},{"time_hours":471,"approval_perbill":548201438,"support_perbill":149553572,"approval":54.8201438,"support":14.9553572,"days":20,"dot_needed":"169,610,590"},{"time_hours":472,"approval_perbill":547892720,"support_perbill":148809524,"approval":54.789272,"support":14.8809524,"days":20,"dot_needed":"168,766,756"},{"time_hours":473,"approval_perbill":547584887,"support_perbill":148065477,"approval":54.7584887,"support":14.8065477,"days":20,"dot_needed":"167,922,923"},{"time_hours":474,"approval_perbill":547277937,"support_perbill":147321429,"approval":54.7277937,"support":14.7321429,"days":20,"dot_needed":"167,079,089"},{"time_hours":475,"approval_perbill":546971864,"support_perbill":146577381,"approval":54.6971864,"support":14.6577381,"days":20,"dot_needed":"166,235,255"},{"time_hours":476,"approval_perbill":546666666,"support_perbill":145833334,"approval":54.6666666,"support":14.5833334,"days":20,"dot_needed":"165,391,422"},{"time_hours":477,"approval_perbill":546362339,"support_perbill":145089286,"approval":54.6362339,"support":14.5089286,"days":20,"dot_needed":"164,547,587"},{"time_hours":478,"approval_perbill":546058879,"support_perbill":144345239,"approval":54.6058879,"support":14.4345239,"days":20,"dot_needed":"163,703,754"},{"time_hours":479,"approval_perbill":545756282,"support_perbill":143601191,"approval":54.5756282,"support":14.3601191,"days":20,"dot_needed":"162,859,920"},{"time_hours":480,"approval_perbill":545454545,"support_perbill":142857143,"approval":54.5454545,"support":14.2857143,"days":20,"dot_needed":"162,016,086"},{"time_hours":481,"approval_perbill":545153664,"support_perbill":142113096,"approval":54.5153664,"support":14.2113096,"days":21,"dot_needed":"161,172,253"},{"time_hours":482,"approval_perbill":544853635,"support_perbill":141369048,"approval":54.4853635,"support":14.1369048,"days":21,"dot_needed":"160,328,419"},{"time_hours":483,"approval_perbill":544554455,"support_perbill":140625000,"approval":54.4554455,"support":14.0625,"days":21,"dot_needed":"159,484,584"},{"time_hours":484,"approval_perbill":544256120,"support_perbill":139880953,"approval":54.425612,"support":13.9880953,"days":21,"dot_needed":"158,640,751"},{"time_hours":485,"approval_perbill":543958627,"support_perbill":139136905,"approval":54.3958627,"support":13.9136905,"days":21,"dot_needed":"157,796,917"},{"time_hours":486,"approval_perbill":543661971,"support_perbill":138392858,"approval":54.3661971,"support":13.8392858,"days":21,"dot_needed":"156,953,084"},{"time_hours":487,"approval_perbill":543366151,"support_perbill":137648810,"approval":54.3366151,"support":13.764881,"days":21,"dot_needed":"156,109,250"},{"time_hours":488,"approval_perbill":543071161,"support_perbill":136904762,"approval":54.3071161,"support":13.6904762,"days":21,"dot_needed":"155,265,416"},{"time_hours":489,"approval_perbill":542776998,"support_perbill":136160715,"approval":54.2776998,"support":13.6160715,"days":21,"dot_needed":"154,421,583"},{"time_hours":490,"approval_perbill":542483660,"support_perbill":135416667,"approval":54.248366,"support":13.5416667,"days":21,"dot_needed":"153,577,748"},{"time_hours":491,"approval_perbill":542191142,"support_perbill":134672620,"approval":54.2191142,"support":13.467262,"days":21,"dot_needed":"152,733,915"},{"time_hours":492,"approval_perbill":541899441,"support_perbill":133928572,"approval":54.1899441,"support":13.3928572,"days":21,"dot_needed":"151,890,081"},{"time_hours":493,"approval_perbill":541608554,"support_perbill":133184524,"approval":54.1608554,"support":13.3184524,"days":21,"dot_needed":"151,046,247"},{"time_hours":494,"approval_perbill":541318477,"support_perbill":132440477,"approval":54.1318477,"support":13.2440477,"days":21,"dot_needed":"150,202,414"},{"time_hours":495,"approval_perbill":541029207,"support_perbill":131696429,"approval":54.1029207,"support":13.1696429,"days":21,"dot_needed":"149,358,580"},{"time_hours":496,"approval_perbill":540740740,"support_perbill":130952381,"approval":54.074074,"support":13.0952381,"days":21,"dot_needed":"148,514,745"},{"time_hours":497,"approval_perbill":540453074,"support_perbill":130208334,"approval":54.0453074,"support":13.0208334,"days":21,"dot_needed":"147,670,912"},{"time_hours":498,"approval_perbill":540166205,"support_perbill":129464286,"approval":54.0166205,"support":12.9464286,"days":21,"dot_needed":"146,827,078"},{"time_hours":499,"approval_perbill":539880129,"support_perbill":128720239,"approval":53.9880129,"support":12.8720239,"days":21,"dot_needed":"145,983,245"},{"time_hours":500,"approval_perbill":539594843,"support_perbill":127976191,"approval":53.9594843,"support":12.7976191,"days":21,"dot_needed":"145,139,411"},{"time_hours":501,"approval_perbill":539310344,"support_perbill":127232143,"approval":53.9310344,"support":12.7232143,"days":21,"dot_needed":"144,295,577"},{"time_hours":502,"approval_perbill":539026630,"support_perbill":126488096,"approval":53.902663,"support":12.6488096,"days":21,"dot_needed":"143,451,743"},{"time_hours":503,"approval_perbill":538743695,"support_perbill":125744048,"approval":53.8743695,"support":12.5744048,"days":21,"dot_needed":"142,607,909"},{"time_hours":504,"approval_perbill":538461538,"support_perbill":125000000,"approval":53.8461538,"support":12.5,"days":21,"dot_needed":"141,764,075"},{"time_hours":505,"approval_perbill":538180155,"support_perbill":124255953,"approval":53.8180155,"support":12.4255953,"days":22,"dot_needed":"140,920,242"},{"time_hours":506,"approval_perbill":537899543,"support_perbill":123511905,"approval":53.7899543,"support":12.3511905,"days":22,"dot_needed":"140,076,408"},{"time_hours":507,"approval_perbill":537619699,"support_perbill":122767858,"approval":53.7619699,"support":12.2767858,"days":22,"dot_needed":"139,232,575"},{"time_hours":508,"approval_perbill":537340619,"support_perbill":122023810,"approval":53.7340619,"support":12.202381,"days":22,"dot_needed":"138,388,740"},{"time_hours":509,"approval_perbill":537062301,"support_perbill":121279762,"approval":53.7062301,"support":12.1279762,"days":22,"dot_needed":"137,544,906"},{"time_hours":510,"approval_perbill":536784741,"support_perbill":120535715,"approval":53.6784741,"support":12.0535715,"days":22,"dot_needed":"136,701,073"},{"time_hours":511,"approval_perbill":536507936,"support_perbill":119791667,"approval":53.6507936,"support":11.9791667,"days":22,"dot_needed":"135,857,239"},{"time_hours":512,"approval_perbill":536231884,"support_perbill":119047620,"approval":53.6231884,"support":11.904762,"days":22,"dot_needed":"135,013,406"},{"time_hours":513,"approval_perbill":535956580,"support_perbill":118303572,"approval":53.595658,"support":11.8303572,"days":22,"dot_needed":"134,169,572"},{"time_hours":514,"approval_perbill":535682023,"support_perbill":117559524,"approval":53.5682023,"support":11.7559524,"days":22,"dot_needed":"133,325,737"},{"time_hours":515,"approval_perbill":535408209,"support_perbill":116815477,"approval":53.5408209,"support":11.6815477,"days":22,"dot_needed":"132,481,904"},{"time_hours":516,"approval_perbill":535135135,"support_perbill":116071429,"approval":53.5135135,"support":11.6071429,"days":22,"dot_needed":"131,638,070"},{"time_hours":517,"approval_perbill":534862798,"support_perbill":115327381,"approval":53.4862798,"support":11.5327381,"days":22,"dot_needed":"130,794,236"},{"time_hours":518,"approval_perbill":534591195,"support_perbill":114583334,"approval":53.4591195,"support":11.4583334,"days":22,"dot_needed":"129,950,403"},{"time_hours":519,"approval_perbill":534320323,"support_perbill":113839286,"approval":53.4320323,"support":11.3839286,"days":22,"dot_needed":"129,106,569"},{"time_hours":520,"approval_perbill":534050179,"support_perbill":113095239,"approval":53.4050179,"support":11.3095239,"days":22,"dot_needed":"128,262,736"},{"time_hours":521,"approval_perbill":533780760,"support_perbill":112351191,"approval":53.378076,"support":11.2351191,"days":22,"dot_needed":"127,418,901"},{"time_hours":522,"approval_perbill":533512064,"support_perbill":111607143,"approval":53.3512064,"support":11.1607143,"days":22,"dot_needed":"126,575,067"},{"time_hours":523,"approval_perbill":533244087,"support_perbill":110863096,"approval":53.3244087,"support":11.0863096,"days":22,"dot_needed":"125,731,234"},{"time_hours":524,"approval_perbill":532976827,"support_perbill":110119048,"approval":53.2976827,"support":11.0119048,"days":22,"dot_needed":"124,887,400"},{"time_hours":525,"approval_perbill":532710280,"support_perbill":109375000,"approval":53.271028,"support":10.9375,"days":22,"dot_needed":"124,043,566"},{"time_hours":526,"approval_perbill":532444444,"support_perbill":108630953,"approval":53.2444444,"support":10.8630953,"days":22,"dot_needed":"123,199,733"},{"time_hours":527,"approval_perbill":532179316,"support_perbill":107886905,"approval":53.2179316,"support":10.7886905,"days":22,"dot_needed":"122,355,898"},{"time_hours":528,"approval_perbill":531914893,"support_perbill":107142858,"approval":53.1914893,"support":10.7142858,"days":22,"dot_needed":"121,512,065"},{"time_hours":529,"approval_perbill":531651173,"support_perbill":106398810,"approval":53.1651173,"support":10.639881,"days":23,"dot_needed":"120,668,231"},{"time_hours":530,"approval_perbill":531388152,"support_perbill":105654762,"approval":53.1388152,"support":10.5654762,"days":23,"dot_needed":"119,824,397"},{"time_hours":531,"approval_perbill":531125827,"support_perbill":104910715,"approval":53.1125827,"support":10.4910715,"days":23,"dot_needed":"118,980,564"},{"time_hours":532,"approval_perbill":530864197,"support_perbill":104166667,"approval":53.0864197,"support":10.4166667,"days":23,"dot_needed":"118,136,730"},{"time_hours":533,"approval_perbill":530603258,"support_perbill":103422620,"approval":53.0603258,"support":10.342262,"days":23,"dot_needed":"117,292,896"},{"time_hours":534,"approval_perbill":530343007,"support_perbill":102678572,"approval":53.0343007,"support":10.2678572,"days":23,"dot_needed":"116,449,062"},{"time_hours":535,"approval_perbill":530083443,"support_perbill":101934524,"approval":53.0083443,"support":10.1934524,"days":23,"dot_needed":"115,605,228"},{"time_hours":536,"approval_perbill":529824561,"support_perbill":101190477,"approval":52.9824561,"support":10.1190477,"days":23,"dot_needed":"114,761,395"},{"time_hours":537,"approval_perbill":529566360,"support_perbill":100446429,"approval":52.956636,"support":10.0446429,"days":23,"dot_needed":"113,917,561"},{"time_hours":538,"approval_perbill":529308836,"support_perbill":99702381,"approval":52.9308836,"support":9.9702381,"days":23,"dot_needed":"113,073,727"},{"time_hours":539,"approval_perbill":529051987,"support_perbill":98958334,"approval":52.9051987,"support":9.8958334,"days":23,"dot_needed":"112,229,893"},{"time_hours":540,"approval_perbill":528795811,"support_perbill":98214286,"approval":52.8795811,"support":9.8214286,"days":23,"dot_needed":"111,386,059"},{"time_hours":541,"approval_perbill":528540305,"support_perbill":97470239,"approval":52.8540305,"support":9.7470239,"days":23,"dot_needed":"110,542,226"},{"time_hours":542,"approval_perbill":528285465,"support_perbill":96726191,"approval":52.8285465,"support":9.6726191,"days":23,"dot_needed":"109,698,392"},{"time_hours":543,"approval_perbill":528031290,"support_perbill":95982143,"approval":52.803129,"support":9.5982143,"days":23,"dot_needed":"108,854,558"},{"time_hours":544,"approval_perbill":527777777,"support_perbill":95238096,"approval":52.7777777,"support":9.5238096,"days":23,"dot_needed":"108,010,725"},{"time_hours":545,"approval_perbill":527524924,"support_perbill":94494048,"approval":52.7524924,"support":9.4494048,"days":23,"dot_needed":"107,166,890"},{"time_hours":546,"approval_perbill":527272727,"support_perbill":93750000,"approval":52.7272727,"support":9.375,"days":23,"dot_needed":"106,323,056"},{"time_hours":547,"approval_perbill":527021184,"support_perbill":93005953,"approval":52.7021184,"support":9.3005953,"days":23,"dot_needed":"105,479,223"},{"time_hours":548,"approval_perbill":526770293,"support_perbill":92261905,"approval":52.6770293,"support":9.2261905,"days":23,"dot_needed":"104,635,389"},{"time_hours":549,"approval_perbill":526520051,"support_perbill":91517858,"approval":52.6520051,"support":9.1517858,"days":23,"dot_needed":"103,791,556"},{"time_hours":550,"approval_perbill":526270456,"support_perbill":90773810,"approval":52.6270456,"support":9.077381,"days":23,"dot_needed":"102,947,722"},{"time_hours":551,"approval_perbill":526021505,"support_perbill":90029762,"approval":52.6021505,"support":9.0029762,"days":23,"dot_needed":"102,103,887"},{"time_hours":552,"approval_perbill":525773195,"support_perbill":89285715,"approval":52.5773195,"support":8.9285715,"days":23,"dot_needed":"101,260,054"},{"time_hours":553,"approval_perbill":525525525,"support_perbill":88541667,"approval":52.5525525,"support":8.8541667,"days":24,"dot_needed":"100,416,220"},{"time_hours":554,"approval_perbill":525278491,"support_perbill":87797620,"approval":52.5278491,"support":8.779762,"days":24,"dot_needed":"99,572,387"},{"time_hours":555,"approval_perbill":525032092,"support_perbill":87053572,"approval":52.5032092,"support":8.7053572,"days":24,"dot_needed":"98,728,553"},{"time_hours":556,"approval_perbill":524786324,"support_perbill":86309524,"approval":52.4786324,"support":8.6309524,"days":24,"dot_needed":"97,884,719"},{"time_hours":557,"approval_perbill":524541186,"support_perbill":85565477,"approval":52.4541186,"support":8.5565477,"days":24,"dot_needed":"97,040,886"},{"time_hours":558,"approval_perbill":524296675,"support_perbill":84821429,"approval":52.4296675,"support":8.4821429,"days":24,"dot_needed":"96,197,051"},{"time_hours":559,"approval_perbill":524052788,"support_perbill":84077381,"approval":52.4052788,"support":8.4077381,"days":24,"dot_needed":"95,353,217"},{"time_hours":560,"approval_perbill":523809523,"support_perbill":83333334,"approval":52.3809523,"support":8.3333334,"days":24,"dot_needed":"94,509,384"},{"time_hours":561,"approval_perbill":523566878,"support_perbill":82589286,"approval":52.3566878,"support":8.2589286,"days":24,"dot_needed":"93,665,550"},{"time_hours":562,"approval_perbill":523324851,"support_perbill":81845239,"approval":52.3324851,"support":8.1845239,"days":24,"dot_needed":"92,821,717"},{"time_hours":563,"approval_perbill":523083439,"support_perbill":81101191,"approval":52.3083439,"support":8.1101191,"days":24,"dot_needed":"91,977,883"},{"time_hours":564,"approval_perbill":522842639,"support_perbill":80357143,"approval":52.2842639,"support":8.0357143,"days":24,"dot_needed":"91,134,048"},{"time_hours":565,"approval_perbill":522602450,"support_perbill":79613096,"approval":52.260245,"support":7.9613096,"days":24,"dot_needed":"90,290,215"},{"time_hours":566,"approval_perbill":522362869,"support_perbill":78869048,"approval":52.2362869,"support":7.8869048,"days":24,"dot_needed":"89,446,381"},{"time_hours":567,"approval_perbill":522123893,"support_perbill":78125000,"approval":52.2123893,"support":7.8125,"days":24,"dot_needed":"88,602,547"},{"time_hours":568,"approval_perbill":521885521,"support_perbill":77380953,"approval":52.1885521,"support":7.7380953,"days":24,"dot_needed":"87,758,714"},{"time_hours":569,"approval_perbill":521647751,"support_perbill":76636905,"approval":52.1647751,"support":7.6636905,"days":24,"dot_needed":"86,914,880"},{"time_hours":570,"approval_perbill":521410579,"support_perbill":75892858,"approval":52.1410579,"support":7.5892858,"days":24,"dot_needed":"86,071,047"},{"time_hours":571,"approval_perbill":521174004,"support_perbill":75148810,"approval":52.1174004,"support":7.514881,"days":24,"dot_needed":"85,227,212"},{"time_hours":572,"approval_perbill":520938023,"support_perbill":74404762,"approval":52.0938023,"support":7.4404762,"days":24,"dot_needed":"84,383,378"},{"time_hours":573,"approval_perbill":520702634,"support_perbill":73660715,"approval":52.0702634,"support":7.3660715,"days":24,"dot_needed":"83,539,545"},{"time_hours":574,"approval_perbill":520467836,"support_perbill":72916667,"approval":52.0467836,"support":7.2916667,"days":24,"dot_needed":"82,695,711"},{"time_hours":575,"approval_perbill":520233625,"support_perbill":72172620,"approval":52.0233625,"support":7.217262,"days":24,"dot_needed":"81,851,878"},{"time_hours":576,"approval_perbill":519999999,"support_perbill":71428572,"approval":51.9999999,"support":7.1428572,"days":24,"dot_needed":"81,008,044"},{"time_hours":577,"approval_perbill":519766957,"support_perbill":70684524,"approval":51.9766957,"support":7.0684524,"days":25,"dot_needed":"80,164,209"},{"time_hours":578,"approval_perbill":519534497,"support_perbill":69940477,"approval":51.9534497,"support":6.9940477,"days":25,"dot_needed":"79,320,376"},{"time_hours":579,"approval_perbill":519302615,"support_perbill":69196429,"approval":51.9302615,"support":6.9196429,"days":25,"dot_needed":"78,476,542"},{"time_hours":580,"approval_perbill":519071310,"support_perbill":68452381,"approval":51.907131,"support":6.8452381,"days":25,"dot_needed":"77,632,708"},{"time_hours":581,"approval_perbill":518840579,"support_perbill":67708334,"approval":51.8840579,"support":6.7708334,"days":25,"dot_needed":"76,788,875"},{"time_hours":582,"approval_perbill":518610421,"support_perbill":66964286,"approval":51.8610421,"support":6.6964286,"days":25,"dot_needed":"75,945,041"},{"time_hours":583,"approval_perbill":518380834,"support_perbill":66220239,"approval":51.8380834,"support":6.6220239,"days":25,"dot_needed":"75,101,207"},{"time_hours":584,"approval_perbill":518151815,"support_perbill":65476191,"approval":51.8151815,"support":6.5476191,"days":25,"dot_needed":"74,257,373"},{"time_hours":585,"approval_perbill":517923362,"support_perbill":64732143,"approval":51.7923362,"support":6.4732143,"days":25,"dot_needed":"73,413,539"},{"time_hours":586,"approval_perbill":517695473,"support_perbill":63988096,"approval":51.7695473,"support":6.3988096,"days":25,"dot_needed":"72,569,706"},{"time_hours":587,"approval_perbill":517468146,"support_perbill":63244048,"approval":51.7468146,"support":6.3244048,"days":25,"dot_needed":"71,725,872"},{"time_hours":588,"approval_perbill":517241379,"support_perbill":62500000,"approval":51.7241379,"support":6.25,"days":25,"dot_needed":"70,882,038"},{"time_hours":589,"approval_perbill":517015170,"support_perbill":61755953,"approval":51.701517,"support":6.1755953,"days":25,"dot_needed":"70,038,204"},{"time_hours":590,"approval_perbill":516789516,"support_perbill":61011905,"approval":51.6789516,"support":6.1011905,"days":25,"dot_needed":"69,194,370"},{"time_hours":591,"approval_perbill":516564417,"support_perbill":60267858,"approval":51.6564417,"support":6.0267858,"days":25,"dot_needed":"68,350,537"},{"time_hours":592,"approval_perbill":516339869,"support_perbill":59523810,"approval":51.6339869,"support":5.952381,"days":25,"dot_needed":"67,506,703"},{"time_hours":593,"approval_perbill":516115870,"support_perbill":58779762,"approval":51.611587,"support":5.8779762,"days":25,"dot_needed":"66,662,869"},{"time_hours":594,"approval_perbill":515892420,"support_perbill":58035715,"approval":51.589242,"support":5.8035715,"days":25,"dot_needed":"65,819,036"},{"time_hours":595,"approval_perbill":515669515,"support_perbill":57291667,"approval":51.5669515,"support":5.7291667,"days":25,"dot_needed":"64,975,201"},{"time_hours":596,"approval_perbill":515447154,"support_perbill":56547620,"approval":51.5447154,"support":5.654762,"days":25,"dot_needed":"64,131,368"},{"time_hours":597,"approval_perbill":515225334,"support_perbill":55803572,"approval":51.5225334,"support":5.5803572,"days":25,"dot_needed":"63,287,534"},{"time_hours":598,"approval_perbill":515004055,"support_perbill":55059524,"approval":51.5004055,"support":5.5059524,"days":25,"dot_needed":"62,443,700"},{"time_hours":599,"approval_perbill":514783313,"support_perbill":54315477,"approval":51.4783313,"support":5.4315477,"days":25,"dot_needed":"61,599,867"},{"time_hours":600,"approval_perbill":514563106,"support_perbill":53571429,"approval":51.4563106,"support":5.3571429,"days":25,"dot_needed":"60,756,033"},{"time_hours":601,"approval_perbill":514343434,"support_perbill":52827381,"approval":51.4343434,"support":5.2827381,"days":26,"dot_needed":"59,912,198"},{"time_hours":602,"approval_perbill":514124293,"support_perbill":52083334,"approval":51.4124293,"support":5.2083334,"days":26,"dot_needed":"59,068,365"},{"time_hours":603,"approval_perbill":513905683,"support_perbill":51339286,"approval":51.3905683,"support":5.1339286,"days":26,"dot_needed":"58,224,531"},{"time_hours":604,"approval_perbill":513687600,"support_perbill":50595239,"approval":51.36876,"support":5.0595239,"days":26,"dot_needed":"57,380,698"},{"time_hours":605,"approval_perbill":513470044,"support_perbill":49851191,"approval":51.3470044,"support":4.9851191,"days":26,"dot_needed":"56,536,864"},{"time_hours":606,"approval_perbill":513253011,"support_perbill":49107143,"approval":51.3253011,"support":4.9107143,"days":26,"dot_needed":"55,693,030"},{"time_hours":607,"approval_perbill":513036502,"support_perbill":48363096,"approval":51.3036502,"support":4.8363096,"days":26,"dot_needed":"54,849,197"},{"time_hours":608,"approval_perbill":512820512,"support_perbill":47619048,"approval":51.2820512,"support":4.7619048,"days":26,"dot_needed":"54,005,362"},{"time_hours":609,"approval_perbill":512605041,"support_perbill":46875000,"approval":51.2605041,"support":4.6875,"days":26,"dot_needed":"53,161,528"},{"time_hours":610,"approval_perbill":512390087,"support_perbill":46130953,"approval":51.2390087,"support":4.6130953,"days":26,"dot_needed":"52,317,695"},{"time_hours":611,"approval_perbill":512175648,"support_perbill":45386905,"approval":51.2175648,"support":4.5386905,"days":26,"dot_needed":"51,473,861"},{"time_hours":612,"approval_perbill":511961722,"support_perbill":44642858,"approval":51.1961722,"support":4.4642858,"days":26,"dot_needed":"50,630,028"},{"time_hours":613,"approval_perbill":511748307,"support_perbill":43898810,"approval":51.1748307,"support":4.389881,"days":26,"dot_needed":"49,786,194"},{"time_hours":614,"approval_perbill":511535401,"support_perbill":43154762,"approval":51.1535401,"support":4.3154762,"days":26,"dot_needed":"48,942,359"},{"time_hours":615,"approval_perbill":511323003,"support_perbill":42410715,"approval":51.1323003,"support":4.2410715,"days":26,"dot_needed":"48,098,526"},{"time_hours":616,"approval_perbill":511111111,"support_perbill":41666667,"approval":51.1111111,"support":4.1666667,"days":26,"dot_needed":"47,254,692"},{"time_hours":617,"approval_perbill":510899722,"support_perbill":40922620,"approval":51.0899722,"support":4.092262,"days":26,"dot_needed":"46,410,859"},{"time_hours":618,"approval_perbill":510688835,"support_perbill":40178572,"approval":51.0688835,"support":4.0178572,"days":26,"dot_needed":"45,567,025"},{"time_hours":619,"approval_perbill":510478449,"support_perbill":39434524,"approval":51.0478449,"support":3.9434524,"days":26,"dot_needed":"44,723,191"},{"time_hours":620,"approval_perbill":510268562,"support_perbill":38690477,"approval":51.0268562,"support":3.8690477,"days":26,"dot_needed":"43,879,357"},{"time_hours":621,"approval_perbill":510059171,"support_perbill":37946429,"approval":51.0059171,"support":3.7946429,"days":26,"dot_needed":"43,035,523"},{"time_hours":622,"approval_perbill":509850275,"support_perbill":37202381,"approval":50.9850275,"support":3.7202381,"days":26,"dot_needed":"42,191,689"},{"time_hours":623,"approval_perbill":509641873,"support_perbill":36458334,"approval":50.9641873,"support":3.6458334,"days":26,"dot_needed":"41,347,856"},{"time_hours":624,"approval_perbill":509433962,"support_perbill":35714286,"approval":50.9433962,"support":3.5714286,"days":26,"dot_needed":"40,504,022"},{"time_hours":625,"approval_perbill":509226540,"support_perbill":34970239,"approval":50.922654,"support":3.4970239,"days":27,"dot_needed":"39,660,189"},{"time_hours":626,"approval_perbill":509019607,"support_perbill":34226191,"approval":50.9019607,"support":3.4226191,"days":27,"dot_needed":"38,816,354"},{"time_hours":627,"approval_perbill":508813160,"support_perbill":33482143,"approval":50.881316,"support":3.3482143,"days":27,"dot_needed":"37,972,520"},{"time_hours":628,"approval_perbill":508607198,"support_perbill":32738096,"approval":50.8607198,"support":3.2738096,"days":27,"dot_needed":"37,128,687"},{"time_hours":629,"approval_perbill":508401719,"support_perbill":31994048,"approval":50.8401719,"support":3.1994048,"days":27,"dot_needed":"36,284,853"},{"time_hours":630,"approval_perbill":508196721,"support_perbill":31250000,"approval":50.8196721,"support":3.125,"days":27,"dot_needed":"35,441,019"},{"time_hours":631,"approval_perbill":507992202,"support_perbill":30505953,"approval":50.7992202,"support":3.0505953,"days":27,"dot_needed":"34,597,186"},{"time_hours":632,"approval_perbill":507788161,"support_perbill":29761905,"approval":50.7788161,"support":2.9761905,"days":27,"dot_needed":"33,753,351"},{"time_hours":633,"approval_perbill":507584597,"support_perbill":29017858,"approval":50.7584597,"support":2.9017858,"days":27,"dot_needed":"32,909,518"},{"time_hours":634,"approval_perbill":507381507,"support_perbill":28273810,"approval":50.7381507,"support":2.827381,"days":27,"dot_needed":"32,065,684"},{"time_hours":635,"approval_perbill":507178890,"support_perbill":27529762,"approval":50.717889,"support":2.7529762,"days":27,"dot_needed":"31,221,850"},{"time_hours":636,"approval_perbill":506976744,"support_perbill":26785715,"approval":50.6976744,"support":2.6785715,"days":27,"dot_needed":"30,378,017"},{"time_hours":637,"approval_perbill":506775067,"support_perbill":26041667,"approval":50.6775067,"support":2.6041667,"days":27,"dot_needed":"29,534,183"},{"time_hours":638,"approval_perbill":506573859,"support_perbill":25297620,"approval":50.6573859,"support":2.529762,"days":27,"dot_needed":"28,690,350"},{"time_hours":639,"approval_perbill":506373116,"support_perbill":24553572,"approval":50.6373116,"support":2.4553572,"days":27,"dot_needed":"27,846,515"},{"time_hours":640,"approval_perbill":506172839,"support_perbill":23809524,"approval":50.6172839,"support":2.3809524,"days":27,"dot_needed":"27,002,681"},{"time_hours":641,"approval_perbill":505973024,"support_perbill":23065477,"approval":50.5973024,"support":2.3065477,"days":27,"dot_needed":"26,158,848"},{"time_hours":642,"approval_perbill":505773671,"support_perbill":22321429,"approval":50.5773671,"support":2.2321429,"days":27,"dot_needed":"25,315,014"},{"time_hours":643,"approval_perbill":505574778,"support_perbill":21577381,"approval":50.5574778,"support":2.1577381,"days":27,"dot_needed":"24,471,180"},{"time_hours":644,"approval_perbill":505376343,"support_perbill":20833334,"approval":50.5376343,"support":2.0833334,"days":27,"dot_needed":"23,627,347"},{"time_hours":645,"approval_perbill":505178365,"support_perbill":20089286,"approval":50.5178365,"support":2.0089286,"days":27,"dot_needed":"22,783,512"},{"time_hours":646,"approval_perbill":504980842,"support_perbill":19345239,"approval":50.4980842,"support":1.9345239,"days":27,"dot_needed":"21,939,679"},{"time_hours":647,"approval_perbill":504783773,"support_perbill":18601191,"approval":50.4783773,"support":1.8601191,"days":27,"dot_needed":"21,095,845"},{"time_hours":648,"approval_perbill":504587155,"support_perbill":17857143,"approval":50.4587155,"support":1.7857143,"days":27,"dot_needed":"20,252,011"},{"time_hours":649,"approval_perbill":504390988,"support_perbill":17113096,"approval":50.4390988,"support":1.7113096,"days":28,"dot_needed":"19,408,178"},{"time_hours":650,"approval_perbill":504195270,"support_perbill":16369048,"approval":50.419527,"support":1.6369048,"days":28,"dot_needed":"18,564,344"},{"time_hours":651,"approval_perbill":503999999,"support_perbill":15625000,"approval":50.3999999,"support":1.5625,"days":28,"dot_needed":"17,720,509"},{"time_hours":652,"approval_perbill":503805174,"support_perbill":14880953,"approval":50.3805174,"support":1.4880953,"days":28,"dot_needed":"16,876,676"},{"time_hours":653,"approval_perbill":503610794,"support_perbill":14136905,"approval":50.3610794,"support":1.4136905,"days":28,"dot_needed":"16,032,842"},{"time_hours":654,"approval_perbill":503416856,"support_perbill":13392858,"approval":50.3416856,"support":1.3392858,"days":28,"dot_needed":"15,189,009"},{"time_hours":655,"approval_perbill":503223359,"support_perbill":12648810,"approval":50.3223359,"support":1.264881,"days":28,"dot_needed":"14,345,175"},{"time_hours":656,"approval_perbill":503030302,"support_perbill":11904762,"approval":50.3030302,"support":1.1904762,"days":28,"dot_needed":"13,501,341"},{"time_hours":657,"approval_perbill":502837684,"support_perbill":11160715,"approval":50.2837684,"support":1.1160715,"days":28,"dot_needed":"12,657,508"},{"time_hours":658,"approval_perbill":502645502,"support_perbill":10416667,"approval":50.2645502,"support":1.0416667,"days":28,"dot_needed":"11,813,673"},{"time_hours":659,"approval_perbill":502453756,"support_perbill":9672620,"approval":50.2453756,"support":0.967262,"days":28,"dot_needed":"10,969,840"},{"time_hours":660,"approval_perbill":502262443,"support_perbill":8928572,"approval":50.2262443,"support":0.8928572,"days":28,"dot_needed":"10,126,006"},{"time_hours":661,"approval_perbill":502071562,"support_perbill":8184524,"approval":50.2071562,"support":0.8184524,"days":28,"dot_needed":"9,282,172"},{"time_hours":662,"approval_perbill":501881113,"support_perbill":7440477,"approval":50.1881113,"support":0.7440477,"days":28,"dot_needed":"8,438,339"},{"time_hours":663,"approval_perbill":501691093,"support_perbill":6696429,"approval":50.1691093,"support":0.6696429,"days":28,"dot_needed":"7,594,505"},{"time_hours":664,"approval_perbill":501501501,"support_perbill":5952381,"approval":50.1501501,"support":0.5952381,"days":28,"dot_needed":"6,750,670"},{"time_hours":665,"approval_perbill":501312335,"support_perbill":5208334,"approval":50.1312335,"support":0.5208334,"days":28,"dot_needed":"5,906,837"},{"time_hours":666,"approval_perbill":501123595,"support_perbill":4464286,"approval":50.1123595,"support":0.4464286,"days":28,"dot_needed":"5,063,003"},{"time_hours":667,"approval_perbill":500935278,"support_perbill":3720239,"approval":50.0935278,"support":0.3720239,"days":28,"dot_needed":"4,219,170"},{"time_hours":668,"approval_perbill":500747383,"support_perbill":2976191,"approval":50.0747383,"support":0.2976191,"days":28,"dot_needed":"3,375,336"},{"time_hours":669,"approval_perbill":500559910,"support_perbill":2232143,"approval":50.055991,"support":0.2232143,"days":28,"dot_needed":"2,531,502"},{"time_hours":670,"approval_perbill":500372855,"support_perbill":1488096,"approval":50.0372855,"support":0.1488096,"days":28,"dot_needed":"1,687,668"},{"time_hours":671,"approval_perbill":500186219,"support_perbill":744048,"approval":50.0186219,"support":0.0744048,"days":28,"dot_needed":"843,834"},{"time_hours":672,"approval_perbill":499999999,"support_perbill":0,"approval":49.9999999,"support":0,"days":28,"dot_needed":0}]')},19752:p=>{"use strict";p.exports=JSON.parse('[{"time_hours":0,"approval_perbill":1000000000,"support_perbill":500000026,"approval":100,"support":50.0000026},{"time_hours":1,"approval_perbill":998774510,"support_perbill":455636061,"approval":99.877451,"support":45.5636061},{"time_hours":2,"approval_perbill":997549020,"support_perbill":418401359,"approval":99.754902,"support":41.8401359},{"time_hours":3,"approval_perbill":996323530,"support_perbill":386705228,"approval":99.632353,"support":38.6705228},{"time_hours":4,"approval_perbill":995098040,"support_perbill":359397443,"approval":99.509804,"support":35.9397443},{"time_hours":5,"approval_perbill":993872550,"support_perbill":335625639,"approval":99.387255,"support":33.5625639},{"time_hours":6,"approval_perbill":992647060,"support_perbill":314744813,"approval":99.264706,"support":31.4744813},{"time_hours":7,"approval_perbill":991421570,"support_perbill":296257808,"approval":99.142157,"support":29.6257808},{"time_hours":8,"approval_perbill":990196080,"support_perbill":279775293,"approval":99.019608,"support":27.9775293},{"time_hours":9,"approval_perbill":988970589,"support_perbill":264988013,"approval":98.8970589,"support":26.4988013},{"time_hours":10,"approval_perbill":987745099,"support_perbill":251647242,"approval":98.7745099,"support":25.1647242},{"time_hours":11,"approval_perbill":986519609,"support_perbill":239550622,"approval":98.6519609,"support":23.9550622},{"time_hours":12,"approval_perbill":985294119,"support_perbill":228531862,"approval":98.5294119,"support":22.8531862},{"time_hours":13,"approval_perbill":984068628,"support_perbill":218453039,"approval":98.4068628,"support":21.8453039},{"time_hours":14,"approval_perbill":982843138,"support_perbill":209198815,"approval":98.2843138,"support":20.9198815},{"time_hours":15,"approval_perbill":981617648,"support_perbill":200671963,"approval":98.1617648,"support":20.0671963},{"time_hours":16,"approval_perbill":980392158,"support_perbill":192789972,"approval":98.0392158,"support":19.2789972},{"time_hours":17,"approval_perbill":979166667,"support_perbill":185482348,"approval":97.9166667,"support":18.5482348},{"time_hours":18,"approval_perbill":977941177,"support_perbill":178688524,"approval":97.7941177,"support":17.8688524},{"time_hours":19,"approval_perbill":976715687,"support_perbill":172356151,"approval":97.6715687,"support":17.2356151},{"time_hours":20,"approval_perbill":975490197,"support_perbill":166439756,"approval":97.5490197,"support":16.6439756},{"time_hours":21,"approval_perbill":974264706,"support_perbill":160899652,"approval":97.4264706,"support":16.0899652},{"time_hours":22,"approval_perbill":973039216,"support_perbill":155701053,"approval":97.3039216,"support":15.5701053},{"time_hours":23,"approval_perbill":971813726,"support_perbill":150813323,"approval":97.1813726,"support":15.0813323},{"time_hours":24,"approval_perbill":970588236,"support_perbill":146209386,"approval":97.0588236,"support":14.6209386},{"time_hours":25,"approval_perbill":969362746,"support_perbill":141865225,"approval":96.9362746,"support":14.1865225},{"time_hours":26,"approval_perbill":968137256,"support_perbill":137759452,"approval":96.8137256,"support":13.7759452},{"time_hours":27,"approval_perbill":966911766,"support_perbill":133872975,"approval":96.6911766,"support":13.3872975},{"time_hours":28,"approval_perbill":965686276,"support_perbill":130188679,"approval":96.5686276,"support":13.0188679},{"time_hours":29,"approval_perbill":964460786,"support_perbill":126691186,"approval":96.4460786,"support":12.6691186},{"time_hours":30,"approval_perbill":963235295,"support_perbill":123366639,"approval":96.3235295,"support":12.3366639},{"time_hours":31,"approval_perbill":962009805,"support_perbill":120202524,"approval":96.2009805,"support":12.0202524},{"time_hours":32,"approval_perbill":960784315,"support_perbill":117187499,"approval":96.0784315,"support":11.7187499},{"time_hours":33,"approval_perbill":959558825,"support_perbill":114311269,"approval":95.9558825,"support":11.4311269},{"time_hours":34,"approval_perbill":958333334,"support_perbill":111564465,"approval":95.8333334,"support":11.1564465},{"time_hours":35,"approval_perbill":957107844,"support_perbill":108938546,"approval":95.7107844,"support":10.8938546},{"time_hours":36,"approval_perbill":955882354,"support_perbill":106425701,"approval":95.5882354,"support":10.6425701},{"time_hours":37,"approval_perbill":954656864,"support_perbill":104018782,"approval":95.4656864,"support":10.4018782},{"time_hours":38,"approval_perbill":953431373,"support_perbill":101711228,"approval":95.3431373,"support":10.1711228},{"time_hours":39,"approval_perbill":952205883,"support_perbill":99497012,"approval":95.2205883,"support":9.9497012},{"time_hours":40,"approval_perbill":950980393,"support_perbill":97370582,"approval":95.0980393,"support":9.7370582},{"time_hours":41,"approval_perbill":949754903,"support_perbill":95326819,"approval":94.9754903,"support":9.5326819},{"time_hours":42,"approval_perbill":948529412,"support_perbill":93360994,"approval":94.8529412,"support":9.3360994},{"time_hours":43,"approval_perbill":947303922,"support_perbill":91468733,"approval":94.7303922,"support":9.1468733},{"time_hours":44,"approval_perbill":946078432,"support_perbill":89645982,"approval":94.6078432,"support":8.9645982},{"time_hours":45,"approval_perbill":944852942,"support_perbill":87888981,"approval":94.4852942,"support":8.7888981},{"time_hours":46,"approval_perbill":943627452,"support_perbill":86194234,"approval":94.3627452,"support":8.6194234},{"time_hours":47,"approval_perbill":942401961,"support_perbill":84558490,"approval":94.2401961,"support":8.455849},{"time_hours":48,"approval_perbill":941176471,"support_perbill":82978722,"approval":94.1176471,"support":8.2978722},{"time_hours":49,"approval_perbill":939950981,"support_perbill":81452103,"approval":93.9950981,"support":8.1452103},{"time_hours":50,"approval_perbill":938725491,"support_perbill":79975997,"approval":93.8725491,"support":7.9975997},{"time_hours":51,"approval_perbill":937500001,"support_perbill":78547936,"approval":93.7500001,"support":7.8547936},{"time_hours":52,"approval_perbill":936274511,"support_perbill":77165614,"approval":93.6274511,"support":7.7165614},{"time_hours":53,"approval_perbill":935049021,"support_perbill":75826867,"approval":93.5049021,"support":7.5826867},{"time_hours":54,"approval_perbill":933823531,"support_perbill":74529666,"approval":93.3823531,"support":7.4529666},{"time_hours":55,"approval_perbill":932598040,"support_perbill":73272106,"approval":93.259804,"support":7.3272106},{"time_hours":56,"approval_perbill":931372550,"support_perbill":72052400,"approval":93.137255,"support":7.20524},{"time_hours":57,"approval_perbill":930147060,"support_perbill":70868862,"approval":93.014706,"support":7.0868862},{"time_hours":58,"approval_perbill":928921570,"support_perbill":69719908,"approval":92.892157,"support":6.9719908},{"time_hours":59,"approval_perbill":927696079,"support_perbill":68604042,"approval":92.7696079,"support":6.8604042},{"time_hours":60,"approval_perbill":926470589,"support_perbill":67519857,"approval":92.6470589,"support":6.7519857},{"time_hours":61,"approval_perbill":925245099,"support_perbill":66466022,"approval":92.5245099,"support":6.6466022},{"time_hours":62,"approval_perbill":924019609,"support_perbill":65441280,"approval":92.4019609,"support":6.544128},{"time_hours":63,"approval_perbill":922794118,"support_perbill":64444443,"approval":92.2794118,"support":6.4444443},{"time_hours":64,"approval_perbill":921568628,"support_perbill":63474386,"approval":92.1568628,"support":6.3474386},{"time_hours":65,"approval_perbill":920343138,"support_perbill":62530044,"approval":92.0343138,"support":6.2530044},{"time_hours":66,"approval_perbill":919117648,"support_perbill":61610409,"approval":91.9117648,"support":6.1610409},{"time_hours":67,"approval_perbill":917892158,"support_perbill":60714523,"approval":91.7892158,"support":6.0714523},{"time_hours":68,"approval_perbill":916666667,"support_perbill":59841478,"approval":91.6666667,"support":5.9841478},{"time_hours":69,"approval_perbill":915441177,"support_perbill":58990411,"approval":91.5441177,"support":5.8990411},{"time_hours":70,"approval_perbill":914215687,"support_perbill":58160504,"approval":91.4215687,"support":5.8160504},{"time_hours":71,"approval_perbill":912990197,"support_perbill":57350975,"approval":91.2990197,"support":5.7350975},{"time_hours":72,"approval_perbill":911764706,"support_perbill":56561084,"approval":91.1764706,"support":5.6561084},{"time_hours":73,"approval_perbill":910539216,"support_perbill":55790126,"approval":91.0539216,"support":5.5790126},{"time_hours":74,"approval_perbill":909313726,"support_perbill":55037426,"approval":90.9313726,"support":5.5037426},{"time_hours":75,"approval_perbill":908088236,"support_perbill":54302345,"approval":90.8088236,"support":5.4302345},{"time_hours":76,"approval_perbill":906862746,"support_perbill":53584271,"approval":90.6862746,"support":5.3584271},{"time_hours":77,"approval_perbill":905637256,"support_perbill":52882620,"approval":90.5637256,"support":5.288262},{"time_hours":78,"approval_perbill":904411766,"support_perbill":52196835,"approval":90.4411766,"support":5.2196835},{"time_hours":79,"approval_perbill":903186276,"support_perbill":51526385,"approval":90.3186276,"support":5.1526385},{"time_hours":80,"approval_perbill":901960785,"support_perbill":50870759,"approval":90.1960785,"support":5.0870759},{"time_hours":81,"approval_perbill":900735295,"support_perbill":50229473,"approval":90.0735295,"support":5.0229473},{"time_hours":82,"approval_perbill":899509805,"support_perbill":49602061,"approval":89.9509805,"support":4.9602061},{"time_hours":83,"approval_perbill":898284315,"support_perbill":48988077,"approval":89.8284315,"support":4.8988077},{"time_hours":84,"approval_perbill":897058824,"support_perbill":48387095,"approval":89.7058824,"support":4.8387095},{"time_hours":85,"approval_perbill":895833334,"support_perbill":47798707,"approval":89.5833334,"support":4.7798707},{"time_hours":86,"approval_perbill":894607844,"support_perbill":47222519,"approval":89.4607844,"support":4.7222519},{"time_hours":87,"approval_perbill":893382354,"support_perbill":46658158,"approval":89.3382354,"support":4.6658158},{"time_hours":88,"approval_perbill":892156864,"support_perbill":46105262,"approval":89.2156864,"support":4.6105262},{"time_hours":89,"approval_perbill":890931373,"support_perbill":45563485,"approval":89.0931373,"support":4.5563485},{"time_hours":90,"approval_perbill":889705883,"support_perbill":45032496,"approval":88.9705883,"support":4.5032496},{"time_hours":91,"approval_perbill":888480393,"support_perbill":44511976,"approval":88.8480393,"support":4.4511976},{"time_hours":92,"approval_perbill":887254903,"support_perbill":44001617,"approval":88.7254903,"support":4.4001617},{"time_hours":93,"approval_perbill":886029412,"support_perbill":43501126,"approval":88.6029412,"support":4.3501126},{"time_hours":94,"approval_perbill":884803922,"support_perbill":43010218,"approval":88.4803922,"support":4.3010218},{"time_hours":95,"approval_perbill":883578432,"support_perbill":42528621,"approval":88.3578432,"support":4.2528621},{"time_hours":96,"approval_perbill":882352942,"support_perbill":42056074,"approval":88.2352942,"support":4.2056074},{"time_hours":97,"approval_perbill":881127452,"support_perbill":41592321,"approval":88.1127452,"support":4.1592321},{"time_hours":98,"approval_perbill":879901962,"support_perbill":41137122,"approval":87.9901962,"support":4.1137122},{"time_hours":99,"approval_perbill":878676472,"support_perbill":40690242,"approval":87.8676472,"support":4.0690242},{"time_hours":100,"approval_perbill":877450982,"support_perbill":40251453,"approval":87.7450982,"support":4.0251453},{"time_hours":101,"approval_perbill":876225491,"support_perbill":39820539,"approval":87.6225491,"support":3.9820539},{"time_hours":102,"approval_perbill":875000001,"support_perbill":39397289,"approval":87.5000001,"support":3.9397289},{"time_hours":103,"approval_perbill":873774511,"support_perbill":38981501,"approval":87.3774511,"support":3.8981501},{"time_hours":104,"approval_perbill":872549021,"support_perbill":38572980,"approval":87.2549021,"support":3.857298},{"time_hours":105,"approval_perbill":871323530,"support_perbill":38171535,"approval":87.132353,"support":3.8171535},{"time_hours":106,"approval_perbill":870098040,"support_perbill":37776985,"approval":87.009804,"support":3.7776985},{"time_hours":107,"approval_perbill":868872550,"support_perbill":37389155,"approval":86.887255,"support":3.7389155},{"time_hours":108,"approval_perbill":867647060,"support_perbill":37007873,"approval":86.764706,"support":3.7007873},{"time_hours":109,"approval_perbill":866421570,"support_perbill":36632975,"approval":86.642157,"support":3.6632975},{"time_hours":110,"approval_perbill":865196079,"support_perbill":36264302,"approval":86.5196079,"support":3.6264302},{"time_hours":111,"approval_perbill":863970589,"support_perbill":35901701,"approval":86.3970589,"support":3.5901701},{"time_hours":112,"approval_perbill":862745099,"support_perbill":35545023,"approval":86.2745099,"support":3.5545023},{"time_hours":113,"approval_perbill":861519609,"support_perbill":35194123,"approval":86.1519609,"support":3.5194123},{"time_hours":114,"approval_perbill":860294118,"support_perbill":34848862,"approval":86.0294118,"support":3.4848862},{"time_hours":115,"approval_perbill":859068628,"support_perbill":34509106,"approval":85.9068628,"support":3.4509106},{"time_hours":116,"approval_perbill":857843138,"support_perbill":34174724,"approval":85.7843138,"support":3.4174724},{"time_hours":117,"approval_perbill":856617648,"support_perbill":33845590,"approval":85.6617648,"support":3.384559},{"time_hours":118,"approval_perbill":855392157,"support_perbill":33521580,"approval":85.5392157,"support":3.352158},{"time_hours":119,"approval_perbill":854166667,"support_perbill":33202577,"approval":85.4166667,"support":3.3202577},{"time_hours":120,"approval_perbill":852941177,"support_perbill":32888464,"approval":85.2941177,"support":3.2888464},{"time_hours":121,"approval_perbill":851715687,"support_perbill":32579131,"approval":85.1715687,"support":3.2579131},{"time_hours":122,"approval_perbill":850490197,"support_perbill":32274469,"approval":85.0490197,"support":3.2274469},{"time_hours":123,"approval_perbill":849264707,"support_perbill":31974373,"approval":84.9264707,"support":3.1974373},{"time_hours":124,"approval_perbill":848039217,"support_perbill":31678741,"approval":84.8039217,"support":3.1678741},{"time_hours":125,"approval_perbill":846813727,"support_perbill":31387475,"approval":84.6813727,"support":3.1387475},{"time_hours":126,"approval_perbill":845588236,"support_perbill":31100477,"approval":84.5588236,"support":3.1100477},{"time_hours":127,"approval_perbill":844362746,"support_perbill":30817656,"approval":84.4362746,"support":3.0817656},{"time_hours":128,"approval_perbill":843137256,"support_perbill":30538921,"approval":84.3137256,"support":3.0538921},{"time_hours":129,"approval_perbill":841911766,"support_perbill":30264184,"approval":84.1911766,"support":3.0264184},{"time_hours":130,"approval_perbill":840686276,"support_perbill":29993358,"approval":84.0686276,"support":2.9993358},{"time_hours":131,"approval_perbill":839460785,"support_perbill":29726363,"approval":83.9460785,"support":2.9726363},{"time_hours":132,"approval_perbill":838235295,"support_perbill":29463116,"approval":83.8235295,"support":2.9463116},{"time_hours":133,"approval_perbill":837009805,"support_perbill":29203539,"approval":83.7009805,"support":2.9203539},{"time_hours":134,"approval_perbill":835784315,"support_perbill":28947556,"approval":83.5784315,"support":2.8947556},{"time_hours":135,"approval_perbill":834558824,"support_perbill":28695094,"approval":83.4558824,"support":2.8695094},{"time_hours":136,"approval_perbill":833333334,"support_perbill":28446079,"approval":83.3333334,"support":2.8446079},{"time_hours":137,"approval_perbill":832107844,"support_perbill":28200442,"approval":83.2107844,"support":2.8200442},{"time_hours":138,"approval_perbill":830882354,"support_perbill":27958114,"approval":83.0882354,"support":2.7958114},{"time_hours":139,"approval_perbill":829656863,"support_perbill":27719030,"approval":82.9656863,"support":2.771903},{"time_hours":140,"approval_perbill":828431373,"support_perbill":27483123,"approval":82.8431373,"support":2.7483123},{"time_hours":141,"approval_perbill":827205883,"support_perbill":27250333,"approval":82.7205883,"support":2.7250333},{"time_hours":142,"approval_perbill":825980393,"support_perbill":27020596,"approval":82.5980393,"support":2.7020596},{"time_hours":143,"approval_perbill":824754902,"support_perbill":26793853,"approval":82.4754902,"support":2.6793853},{"time_hours":144,"approval_perbill":823529412,"support_perbill":26570047,"approval":82.3529412,"support":2.6570047},{"time_hours":145,"approval_perbill":822303922,"support_perbill":26349121,"approval":82.2303922,"support":2.6349121},{"time_hours":146,"approval_perbill":821078432,"support_perbill":26131019,"approval":82.1078432,"support":2.6131019},{"time_hours":147,"approval_perbill":819852942,"support_perbill":25915687,"approval":81.9852942,"support":2.5915687},{"time_hours":148,"approval_perbill":818627452,"support_perbill":25703073,"approval":81.8627452,"support":2.5703073},{"time_hours":149,"approval_perbill":817401962,"support_perbill":25493126,"approval":81.7401962,"support":2.5493126},{"time_hours":150,"approval_perbill":816176472,"support_perbill":25285796,"approval":81.6176472,"support":2.5285796},{"time_hours":151,"approval_perbill":814950982,"support_perbill":25081035,"approval":81.4950982,"support":2.5081035},{"time_hours":152,"approval_perbill":813725491,"support_perbill":24878795,"approval":81.3725491,"support":2.4878795},{"time_hours":153,"approval_perbill":812500001,"support_perbill":24679029,"approval":81.2500001,"support":2.4679029},{"time_hours":154,"approval_perbill":811274511,"support_perbill":24481693,"approval":81.1274511,"support":2.4481693},{"time_hours":155,"approval_perbill":810049021,"support_perbill":24286742,"approval":81.0049021,"support":2.4286742},{"time_hours":156,"approval_perbill":808823530,"support_perbill":24094134,"approval":80.882353,"support":2.4094134},{"time_hours":157,"approval_perbill":807598040,"support_perbill":23903827,"approval":80.759804,"support":2.3903827},{"time_hours":158,"approval_perbill":806372550,"support_perbill":23715779,"approval":80.637255,"support":2.3715779},{"time_hours":159,"approval_perbill":805147060,"support_perbill":23529951,"approval":80.514706,"support":2.3529951},{"time_hours":160,"approval_perbill":803921569,"support_perbill":23346303,"approval":80.3921569,"support":2.3346303},{"time_hours":161,"approval_perbill":802696079,"support_perbill":23164797,"approval":80.2696079,"support":2.3164797},{"time_hours":162,"approval_perbill":801470589,"support_perbill":22985397,"approval":80.1470589,"support":2.2985397},{"time_hours":163,"approval_perbill":800245099,"support_perbill":22808065,"approval":80.0245099,"support":2.2808065},{"time_hours":164,"approval_perbill":799019608,"support_perbill":22632766,"approval":79.9019608,"support":2.2632766},{"time_hours":165,"approval_perbill":797794118,"support_perbill":22459466,"approval":79.7794118,"support":2.2459466},{"time_hours":166,"approval_perbill":796568628,"support_perbill":22288130,"approval":79.6568628,"support":2.228813},{"time_hours":167,"approval_perbill":795343138,"support_perbill":22118725,"approval":79.5343138,"support":2.2118725},{"time_hours":168,"approval_perbill":794117648,"support_perbill":21951219,"approval":79.4117648,"support":2.1951219},{"time_hours":169,"approval_perbill":792892158,"support_perbill":21785579,"approval":79.2892158,"support":2.1785579},{"time_hours":170,"approval_perbill":791666668,"support_perbill":21621776,"approval":79.1666668,"support":2.1621776},{"time_hours":171,"approval_perbill":790441178,"support_perbill":21459778,"approval":79.0441178,"support":2.1459778},{"time_hours":172,"approval_perbill":789215688,"support_perbill":21299556,"approval":78.9215688,"support":2.1299556},{"time_hours":173,"approval_perbill":787990197,"support_perbill":21141081,"approval":78.7990197,"support":2.1141081},{"time_hours":174,"approval_perbill":786764707,"support_perbill":20984324,"approval":78.6764707,"support":2.0984324},{"time_hours":175,"approval_perbill":785539217,"support_perbill":20829258,"approval":78.5539217,"support":2.0829258},{"time_hours":176,"approval_perbill":784313727,"support_perbill":20675855,"approval":78.4313727,"support":2.0675855},{"time_hours":177,"approval_perbill":783088236,"support_perbill":20524089,"approval":78.3088236,"support":2.0524089},{"time_hours":178,"approval_perbill":781862746,"support_perbill":20373934,"approval":78.1862746,"support":2.0373934},{"time_hours":179,"approval_perbill":780637256,"support_perbill":20225364,"approval":78.0637256,"support":2.0225364},{"time_hours":180,"approval_perbill":779411766,"support_perbill":20078354,"approval":77.9411766,"support":2.0078354},{"time_hours":181,"approval_perbill":778186275,"support_perbill":19932880,"approval":77.8186275,"support":1.993288},{"time_hours":182,"approval_perbill":776960785,"support_perbill":19788917,"approval":77.6960785,"support":1.9788917},{"time_hours":183,"approval_perbill":775735295,"support_perbill":19646444,"approval":77.5735295,"support":1.9646444},{"time_hours":184,"approval_perbill":774509805,"support_perbill":19505435,"approval":77.4509805,"support":1.9505435},{"time_hours":185,"approval_perbill":773284314,"support_perbill":19365870,"approval":77.3284314,"support":1.936587},{"time_hours":186,"approval_perbill":772058824,"support_perbill":19227725,"approval":77.2058824,"support":1.9227725},{"time_hours":187,"approval_perbill":770833334,"support_perbill":19090980,"approval":77.0833334,"support":1.909098},{"time_hours":188,"approval_perbill":769607844,"support_perbill":18955613,"approval":76.9607844,"support":1.8955613},{"time_hours":189,"approval_perbill":768382353,"support_perbill":18821603,"approval":76.8382353,"support":1.8821603},{"time_hours":190,"approval_perbill":767156863,"support_perbill":18688931,"approval":76.7156863,"support":1.8688931},{"time_hours":191,"approval_perbill":765931373,"support_perbill":18557575,"approval":76.5931373,"support":1.8557575},{"time_hours":192,"approval_perbill":764705883,"support_perbill":18427518,"approval":76.4705883,"support":1.8427518},{"time_hours":193,"approval_perbill":763480393,"support_perbill":18298739,"approval":76.3480393,"support":1.8298739},{"time_hours":194,"approval_perbill":762254903,"support_perbill":18171219,"approval":76.2254903,"support":1.8171219},{"time_hours":195,"approval_perbill":761029413,"support_perbill":18044941,"approval":76.1029413,"support":1.8044941},{"time_hours":196,"approval_perbill":759803923,"support_perbill":17919887,"approval":75.9803923,"support":1.7919887},{"time_hours":197,"approval_perbill":758578433,"support_perbill":17796038,"approval":75.8578433,"support":1.7796038},{"time_hours":198,"approval_perbill":757352942,"support_perbill":17673377,"approval":75.7352942,"support":1.7673377},{"time_hours":199,"approval_perbill":756127452,"support_perbill":17551888,"approval":75.6127452,"support":1.7551888},{"time_hours":200,"approval_perbill":754901962,"support_perbill":17431553,"approval":75.4901962,"support":1.7431553},{"time_hours":201,"approval_perbill":753676472,"support_perbill":17312357,"approval":75.3676472,"support":1.7312357},{"time_hours":202,"approval_perbill":752450981,"support_perbill":17194282,"approval":75.2450981,"support":1.7194282},{"time_hours":203,"approval_perbill":751225491,"support_perbill":17077315,"approval":75.1225491,"support":1.7077315},{"time_hours":204,"approval_perbill":750000001,"support_perbill":16961437,"approval":75.0000001,"support":1.6961437},{"time_hours":205,"approval_perbill":748774511,"support_perbill":16846636,"approval":74.8774511,"support":1.6846636},{"time_hours":206,"approval_perbill":747549020,"support_perbill":16732895,"approval":74.754902,"support":1.6732895},{"time_hours":207,"approval_perbill":746323530,"support_perbill":16620201,"approval":74.632353,"support":1.6620201},{"time_hours":208,"approval_perbill":745098040,"support_perbill":16508538,"approval":74.509804,"support":1.6508538},{"time_hours":209,"approval_perbill":743872550,"support_perbill":16397893,"approval":74.387255,"support":1.6397893},{"time_hours":210,"approval_perbill":742647059,"support_perbill":16288252,"approval":74.2647059,"support":1.6288252},{"time_hours":211,"approval_perbill":741421569,"support_perbill":16179601,"approval":74.1421569,"support":1.6179601},{"time_hours":212,"approval_perbill":740196079,"support_perbill":16071927,"approval":74.0196079,"support":1.6071927},{"time_hours":213,"approval_perbill":738970589,"support_perbill":15965217,"approval":73.8970589,"support":1.5965217},{"time_hours":214,"approval_perbill":737745099,"support_perbill":15859457,"approval":73.7745099,"support":1.5859457},{"time_hours":215,"approval_perbill":736519608,"support_perbill":15754636,"approval":73.6519608,"support":1.5754636},{"time_hours":216,"approval_perbill":735294118,"support_perbill":15650741,"approval":73.5294118,"support":1.5650741},{"time_hours":217,"approval_perbill":734068628,"support_perbill":15547759,"approval":73.4068628,"support":1.5547759},{"time_hours":218,"approval_perbill":732843138,"support_perbill":15445679,"approval":73.2843138,"support":1.5445679},{"time_hours":219,"approval_perbill":731617648,"support_perbill":15344488,"approval":73.1617648,"support":1.5344488},{"time_hours":220,"approval_perbill":730392158,"support_perbill":15244176,"approval":73.0392158,"support":1.5244176},{"time_hours":221,"approval_perbill":729166668,"support_perbill":15144731,"approval":72.9166668,"support":1.5144731},{"time_hours":222,"approval_perbill":727941178,"support_perbill":15046141,"approval":72.7941178,"support":1.5046141},{"time_hours":223,"approval_perbill":726715687,"support_perbill":14948396,"approval":72.6715687,"support":1.4948396},{"time_hours":224,"approval_perbill":725490197,"support_perbill":14851485,"approval":72.5490197,"support":1.4851485},{"time_hours":225,"approval_perbill":724264707,"support_perbill":14755396,"approval":72.4264707,"support":1.4755396},{"time_hours":226,"approval_perbill":723039217,"support_perbill":14660121,"approval":72.3039217,"support":1.4660121},{"time_hours":227,"approval_perbill":721813726,"support_perbill":14565648,"approval":72.1813726,"support":1.4565648},{"time_hours":228,"approval_perbill":720588236,"support_perbill":14471968,"approval":72.0588236,"support":1.4471968},{"time_hours":229,"approval_perbill":719362746,"support_perbill":14379070,"approval":71.9362746,"support":1.437907},{"time_hours":230,"approval_perbill":718137256,"support_perbill":14286945,"approval":71.8137256,"support":1.4286945},{"time_hours":231,"approval_perbill":716911765,"support_perbill":14195583,"approval":71.6911765,"support":1.4195583},{"time_hours":232,"approval_perbill":715686275,"support_perbill":14104975,"approval":71.5686275,"support":1.4104975},{"time_hours":233,"approval_perbill":714460785,"support_perbill":14015111,"approval":71.4460785,"support":1.4015111},{"time_hours":234,"approval_perbill":713235295,"support_perbill":13925982,"approval":71.3235295,"support":1.3925982},{"time_hours":235,"approval_perbill":712009805,"support_perbill":13837579,"approval":71.2009805,"support":1.3837579},{"time_hours":236,"approval_perbill":710784314,"support_perbill":13749894,"approval":71.0784314,"support":1.3749894},{"time_hours":237,"approval_perbill":709558824,"support_perbill":13662918,"approval":70.9558824,"support":1.3662918},{"time_hours":238,"approval_perbill":708333334,"support_perbill":13576642,"approval":70.8333334,"support":1.3576642},{"time_hours":239,"approval_perbill":707107844,"support_perbill":13491057,"approval":70.7107844,"support":1.3491057},{"time_hours":240,"approval_perbill":705882353,"support_perbill":13406156,"approval":70.5882353,"support":1.3406156},{"time_hours":241,"approval_perbill":704656863,"support_perbill":13321931,"approval":70.4656863,"support":1.3321931},{"time_hours":242,"approval_perbill":703431373,"support_perbill":13238372,"approval":70.3431373,"support":1.3238372},{"time_hours":243,"approval_perbill":702205883,"support_perbill":13155473,"approval":70.2205883,"support":1.3155473},{"time_hours":244,"approval_perbill":700980393,"support_perbill":13073226,"approval":70.0980393,"support":1.3073226},{"time_hours":245,"approval_perbill":699754903,"support_perbill":12991622,"approval":69.9754903,"support":1.2991622},{"time_hours":246,"approval_perbill":698529413,"support_perbill":12910655,"approval":69.8529413,"support":1.2910655},{"time_hours":247,"approval_perbill":697303923,"support_perbill":12830317,"approval":69.7303923,"support":1.2830317},{"time_hours":248,"approval_perbill":696078432,"support_perbill":12750601,"approval":69.6078432,"support":1.2750601},{"time_hours":249,"approval_perbill":694852942,"support_perbill":12671499,"approval":69.4852942,"support":1.2671499},{"time_hours":250,"approval_perbill":693627452,"support_perbill":12593005,"approval":69.3627452,"support":1.2593005},{"time_hours":251,"approval_perbill":692401962,"support_perbill":12515111,"approval":69.2401962,"support":1.2515111},{"time_hours":252,"approval_perbill":691176471,"support_perbill":12437810,"approval":69.1176471,"support":1.243781},{"time_hours":253,"approval_perbill":689950981,"support_perbill":12361097,"approval":68.9950981,"support":1.2361097},{"time_hours":254,"approval_perbill":688725491,"support_perbill":12284964,"approval":68.8725491,"support":1.2284964},{"time_hours":255,"approval_perbill":687500001,"support_perbill":12209404,"approval":68.7500001,"support":1.2209404},{"time_hours":256,"approval_perbill":686274511,"support_perbill":12134411,"approval":68.6274511,"support":1.2134411},{"time_hours":257,"approval_perbill":685049020,"support_perbill":12059980,"approval":68.504902,"support":1.205998},{"time_hours":258,"approval_perbill":683823530,"support_perbill":11986103,"approval":68.382353,"support":1.1986103},{"time_hours":259,"approval_perbill":682598040,"support_perbill":11912774,"approval":68.259804,"support":1.1912774},{"time_hours":260,"approval_perbill":681372550,"support_perbill":11839987,"approval":68.137255,"support":1.1839987},{"time_hours":261,"approval_perbill":680147059,"support_perbill":11767737,"approval":68.0147059,"support":1.1767737},{"time_hours":262,"approval_perbill":678921569,"support_perbill":11696017,"approval":67.8921569,"support":1.1696017},{"time_hours":263,"approval_perbill":677696079,"support_perbill":11624822,"approval":67.7696079,"support":1.1624822},{"time_hours":264,"approval_perbill":676470589,"support_perbill":11554145,"approval":67.6470589,"support":1.1554145},{"time_hours":265,"approval_perbill":675245099,"support_perbill":11483982,"approval":67.5245099,"support":1.1483982},{"time_hours":266,"approval_perbill":674019609,"support_perbill":11414326,"approval":67.4019609,"support":1.1414326},{"time_hours":267,"approval_perbill":672794119,"support_perbill":11345173,"approval":67.2794119,"support":1.1345173},{"time_hours":268,"approval_perbill":671568629,"support_perbill":11276516,"approval":67.1568629,"support":1.1276516},{"time_hours":269,"approval_perbill":670343138,"support_perbill":11208351,"approval":67.0343138,"support":1.1208351},{"time_hours":270,"approval_perbill":669117648,"support_perbill":11140671,"approval":66.9117648,"support":1.1140671},{"time_hours":271,"approval_perbill":667892158,"support_perbill":11073473,"approval":66.7892158,"support":1.1073473},{"time_hours":272,"approval_perbill":666666668,"support_perbill":11006750,"approval":66.6666668,"support":1.100675},{"time_hours":273,"approval_perbill":665441177,"support_perbill":10940499,"approval":66.5441177,"support":1.0940499},{"time_hours":274,"approval_perbill":664215687,"support_perbill":10874713,"approval":66.4215687,"support":1.0874713},{"time_hours":275,"approval_perbill":662990197,"support_perbill":10809388,"approval":66.2990197,"support":1.0809388},{"time_hours":276,"approval_perbill":661764707,"support_perbill":10744519,"approval":66.1764707,"support":1.0744519},{"time_hours":277,"approval_perbill":660539217,"support_perbill":10680101,"approval":66.0539217,"support":1.0680101},{"time_hours":278,"approval_perbill":659313726,"support_perbill":10616130,"approval":65.9313726,"support":1.061613},{"time_hours":279,"approval_perbill":658088236,"support_perbill":10552601,"approval":65.8088236,"support":1.0552601},{"time_hours":280,"approval_perbill":656862746,"support_perbill":10489510,"approval":65.6862746,"support":1.048951},{"time_hours":281,"approval_perbill":655637256,"support_perbill":10426852,"approval":65.5637256,"support":1.0426852},{"time_hours":282,"approval_perbill":654411765,"support_perbill":10364622,"approval":65.4411765,"support":1.0364622},{"time_hours":283,"approval_perbill":653186275,"support_perbill":10302816,"approval":65.3186275,"support":1.0302816},{"time_hours":284,"approval_perbill":651960785,"support_perbill":10241430,"approval":65.1960785,"support":1.024143},{"time_hours":285,"approval_perbill":650735295,"support_perbill":10180459,"approval":65.0735295,"support":1.0180459},{"time_hours":286,"approval_perbill":649509804,"support_perbill":10119900,"approval":64.9509804,"support":1.01199},{"time_hours":287,"approval_perbill":648284314,"support_perbill":10059748,"approval":64.8284314,"support":1.0059748},{"time_hours":288,"approval_perbill":647058824,"support_perbill":10000000,"approval":64.7058824,"support":1},{"time_hours":289,"approval_perbill":645833334,"support_perbill":9940650,"approval":64.5833334,"support":0.994065},{"time_hours":290,"approval_perbill":644607844,"support_perbill":9881695,"approval":64.4607844,"support":0.9881695},{"time_hours":291,"approval_perbill":643382354,"support_perbill":9823132,"approval":64.3382354,"support":0.9823132},{"time_hours":292,"approval_perbill":642156864,"support_perbill":9764955,"approval":64.2156864,"support":0.9764955},{"time_hours":293,"approval_perbill":640931374,"support_perbill":9707163,"approval":64.0931374,"support":0.9707163},{"time_hours":294,"approval_perbill":639705883,"support_perbill":9649749,"approval":63.9705883,"support":0.9649749},{"time_hours":295,"approval_perbill":638480393,"support_perbill":9592712,"approval":63.8480393,"support":0.9592712},{"time_hours":296,"approval_perbill":637254903,"support_perbill":9536047,"approval":63.7254903,"support":0.9536047},{"time_hours":297,"approval_perbill":636029413,"support_perbill":9479751,"approval":63.6029413,"support":0.9479751},{"time_hours":298,"approval_perbill":634803923,"support_perbill":9423820,"approval":63.4803923,"support":0.942382},{"time_hours":299,"approval_perbill":633578432,"support_perbill":9368250,"approval":63.3578432,"support":0.936825},{"time_hours":300,"approval_perbill":632352942,"support_perbill":9313038,"approval":63.2352942,"support":0.9313038},{"time_hours":301,"approval_perbill":631127452,"support_perbill":9258181,"approval":63.1127452,"support":0.9258181},{"time_hours":302,"approval_perbill":629901962,"support_perbill":9203674,"approval":62.9901962,"support":0.9203674},{"time_hours":303,"approval_perbill":628676471,"support_perbill":9149516,"approval":62.8676471,"support":0.9149516},{"time_hours":304,"approval_perbill":627450981,"support_perbill":9095702,"approval":62.7450981,"support":0.9095702},{"time_hours":305,"approval_perbill":626225491,"support_perbill":9042230,"approval":62.6225491,"support":0.904223},{"time_hours":306,"approval_perbill":625000001,"support_perbill":8989095,"approval":62.5000001,"support":0.8989095},{"time_hours":307,"approval_perbill":623774510,"support_perbill":8936295,"approval":62.377451,"support":0.8936295},{"time_hours":308,"approval_perbill":622549020,"support_perbill":8883826,"approval":62.254902,"support":0.8883826},{"time_hours":309,"approval_perbill":621323530,"support_perbill":8831687,"approval":62.132353,"support":0.8831687},{"time_hours":310,"approval_perbill":620098040,"support_perbill":8779872,"approval":62.009804,"support":0.8779872},{"time_hours":311,"approval_perbill":618872549,"support_perbill":8728380,"approval":61.8872549,"support":0.872838},{"time_hours":312,"approval_perbill":617647059,"support_perbill":8677207,"approval":61.7647059,"support":0.8677207},{"time_hours":313,"approval_perbill":616421569,"support_perbill":8626351,"approval":61.6421569,"support":0.8626351},{"time_hours":314,"approval_perbill":615196079,"support_perbill":8575808,"approval":61.5196079,"support":0.8575808},{"time_hours":315,"approval_perbill":613970589,"support_perbill":8525576,"approval":61.3970589,"support":0.8525576},{"time_hours":316,"approval_perbill":612745099,"support_perbill":8475652,"approval":61.2745099,"support":0.8475652},{"time_hours":317,"approval_perbill":611519609,"support_perbill":8426032,"approval":61.1519609,"support":0.8426032},{"time_hours":318,"approval_perbill":610294119,"support_perbill":8376715,"approval":61.0294119,"support":0.8376715},{"time_hours":319,"approval_perbill":609068629,"support_perbill":8327697,"approval":60.9068629,"support":0.8327697},{"time_hours":320,"approval_perbill":607843138,"support_perbill":8278976,"approval":60.7843138,"support":0.8278976},{"time_hours":321,"approval_perbill":606617648,"support_perbill":8230549,"approval":60.6617648,"support":0.8230549},{"time_hours":322,"approval_perbill":605392158,"support_perbill":8182413,"approval":60.5392158,"support":0.8182413},{"time_hours":323,"approval_perbill":604166668,"support_perbill":8134566,"approval":60.4166668,"support":0.8134566},{"time_hours":324,"approval_perbill":602941177,"support_perbill":8087005,"approval":60.2941177,"support":0.8087005},{"time_hours":325,"approval_perbill":601715687,"support_perbill":8039727,"approval":60.1715687,"support":0.8039727},{"time_hours":326,"approval_perbill":600490197,"support_perbill":7992731,"approval":60.0490197,"support":0.7992731},{"time_hours":327,"approval_perbill":599264707,"support_perbill":7946013,"approval":59.9264707,"support":0.7946013},{"time_hours":328,"approval_perbill":598039216,"support_perbill":7899571,"approval":59.8039216,"support":0.7899571},{"time_hours":329,"approval_perbill":596813726,"support_perbill":7853403,"approval":59.6813726,"support":0.7853403},{"time_hours":330,"approval_perbill":595588236,"support_perbill":7807506,"approval":59.5588236,"support":0.7807506},{"time_hours":331,"approval_perbill":594362746,"support_perbill":7761878,"approval":59.4362746,"support":0.7761878},{"time_hours":332,"approval_perbill":593137255,"support_perbill":7716516,"approval":59.3137255,"support":0.7716516},{"time_hours":333,"approval_perbill":591911765,"support_perbill":7671418,"approval":59.1911765,"support":0.7671418},{"time_hours":334,"approval_perbill":590686275,"support_perbill":7626583,"approval":59.0686275,"support":0.7626583},{"time_hours":335,"approval_perbill":589460785,"support_perbill":7582007,"approval":58.9460785,"support":0.7582007},{"time_hours":336,"approval_perbill":588235295,"support_perbill":7537688,"approval":58.8235295,"support":0.7537688},{"time_hours":337,"approval_perbill":587009805,"support_perbill":7493624,"approval":58.7009805,"support":0.7493624},{"time_hours":338,"approval_perbill":585784315,"support_perbill":7449814,"approval":58.5784315,"support":0.7449814},{"time_hours":339,"approval_perbill":584558825,"support_perbill":7406254,"approval":58.4558825,"support":0.7406254},{"time_hours":340,"approval_perbill":583333335,"support_perbill":7362942,"approval":58.3333335,"support":0.7362942},{"time_hours":341,"approval_perbill":582107844,"support_perbill":7319878,"approval":58.2107844,"support":0.7319878},{"time_hours":342,"approval_perbill":580882354,"support_perbill":7277057,"approval":58.0882354,"support":0.7277057},{"time_hours":343,"approval_perbill":579656864,"support_perbill":7234479,"approval":57.9656864,"support":0.7234479},{"time_hours":344,"approval_perbill":578431374,"support_perbill":7192141,"approval":57.8431374,"support":0.7192141},{"time_hours":345,"approval_perbill":577205883,"support_perbill":7150041,"approval":57.7205883,"support":0.7150041},{"time_hours":346,"approval_perbill":575980393,"support_perbill":7108178,"approval":57.5980393,"support":0.7108178},{"time_hours":347,"approval_perbill":574754903,"support_perbill":7066548,"approval":57.4754903,"support":0.7066548},{"time_hours":348,"approval_perbill":573529413,"support_perbill":7025151,"approval":57.3529413,"support":0.7025151},{"time_hours":349,"approval_perbill":572303922,"support_perbill":6983985,"approval":57.2303922,"support":0.6983985},{"time_hours":350,"approval_perbill":571078432,"support_perbill":6943047,"approval":57.1078432,"support":0.6943047},{"time_hours":351,"approval_perbill":569852942,"support_perbill":6902335,"approval":56.9852942,"support":0.6902335},{"time_hours":352,"approval_perbill":568627452,"support_perbill":6861848,"approval":56.8627452,"support":0.6861848},{"time_hours":353,"approval_perbill":567401961,"support_perbill":6821584,"approval":56.7401961,"support":0.6821584},{"time_hours":354,"approval_perbill":566176471,"support_perbill":6781540,"approval":56.6176471,"support":0.678154},{"time_hours":355,"approval_perbill":564950981,"support_perbill":6741716,"approval":56.4950981,"support":0.6741716},{"time_hours":356,"approval_perbill":563725491,"support_perbill":6702109,"approval":56.3725491,"support":0.6702109},{"time_hours":357,"approval_perbill":562500000,"support_perbill":6662718,"approval":56.25,"support":0.6662718},{"time_hours":358,"approval_perbill":561274510,"support_perbill":6623541,"approval":56.127451,"support":0.6623541},{"time_hours":359,"approval_perbill":560049020,"support_perbill":6584575,"approval":56.004902,"support":0.6584575},{"time_hours":360,"approval_perbill":558823530,"support_perbill":6545820,"approval":55.882353,"support":0.654582},{"time_hours":361,"approval_perbill":557598040,"support_perbill":6507274,"approval":55.759804,"support":0.6507274},{"time_hours":362,"approval_perbill":556372550,"support_perbill":6468935,"approval":55.637255,"support":0.6468935},{"time_hours":363,"approval_perbill":555147060,"support_perbill":6430801,"approval":55.514706,"support":0.6430801},{"time_hours":364,"approval_perbill":553921570,"support_perbill":6392871,"approval":55.392157,"support":0.6392871},{"time_hours":365,"approval_perbill":552696080,"support_perbill":6355142,"approval":55.269608,"support":0.6355142},{"time_hours":366,"approval_perbill":551470589,"support_perbill":6317615,"approval":55.1470589,"support":0.6317615},{"time_hours":367,"approval_perbill":550245099,"support_perbill":6280286,"approval":55.0245099,"support":0.6280286},{"time_hours":368,"approval_perbill":549019609,"support_perbill":6243154,"approval":54.9019609,"support":0.6243154},{"time_hours":369,"approval_perbill":547794119,"support_perbill":6206218,"approval":54.7794119,"support":0.6206218},{"time_hours":370,"approval_perbill":546568628,"support_perbill":6169476,"approval":54.6568628,"support":0.6169476},{"time_hours":371,"approval_perbill":545343138,"support_perbill":6132927,"approval":54.5343138,"support":0.6132927},{"time_hours":372,"approval_perbill":544117648,"support_perbill":6096569,"approval":54.4117648,"support":0.6096569},{"time_hours":373,"approval_perbill":542892158,"support_perbill":6060401,"approval":54.2892158,"support":0.6060401},{"time_hours":374,"approval_perbill":541666667,"support_perbill":6024421,"approval":54.1666667,"support":0.6024421},{"time_hours":375,"approval_perbill":540441177,"support_perbill":5988627,"approval":54.0441177,"support":0.5988627},{"time_hours":376,"approval_perbill":539215687,"support_perbill":5953019,"approval":53.9215687,"support":0.5953019},{"time_hours":377,"approval_perbill":537990197,"support_perbill":5917595,"approval":53.7990197,"support":0.5917595},{"time_hours":378,"approval_perbill":536764706,"support_perbill":5882353,"approval":53.6764706,"support":0.5882353},{"time_hours":379,"approval_perbill":535539216,"support_perbill":5847292,"approval":53.5539216,"support":0.5847292},{"time_hours":380,"approval_perbill":534313726,"support_perbill":5812410,"approval":53.4313726,"support":0.581241},{"time_hours":381,"approval_perbill":533088236,"support_perbill":5777707,"approval":53.3088236,"support":0.5777707},{"time_hours":382,"approval_perbill":531862746,"support_perbill":5743181,"approval":53.1862746,"support":0.5743181},{"time_hours":383,"approval_perbill":530637255,"support_perbill":5708830,"approval":53.0637255,"support":0.570883},{"time_hours":384,"approval_perbill":529411765,"support_perbill":5674653,"approval":52.9411765,"support":0.5674653},{"time_hours":385,"approval_perbill":528186275,"support_perbill":5640649,"approval":52.8186275,"support":0.5640649},{"time_hours":386,"approval_perbill":526960785,"support_perbill":5606817,"approval":52.6960785,"support":0.5606817},{"time_hours":387,"approval_perbill":525735295,"support_perbill":5573155,"approval":52.5735295,"support":0.5573155},{"time_hours":388,"approval_perbill":524509805,"support_perbill":5539662,"approval":52.4509805,"support":0.5539662},{"time_hours":389,"approval_perbill":523284315,"support_perbill":5506336,"approval":52.3284315,"support":0.5506336},{"time_hours":390,"approval_perbill":522058825,"support_perbill":5473177,"approval":52.2058825,"support":0.5473177},{"time_hours":391,"approval_perbill":520833334,"support_perbill":5440183,"approval":52.0833334,"support":0.5440183},{"time_hours":392,"approval_perbill":519607844,"support_perbill":5407354,"approval":51.9607844,"support":0.5407354},{"time_hours":393,"approval_perbill":518382354,"support_perbill":5374687,"approval":51.8382354,"support":0.5374687},{"time_hours":394,"approval_perbill":517156864,"support_perbill":5342181,"approval":51.7156864,"support":0.5342181},{"time_hours":395,"approval_perbill":515931373,"support_perbill":5309836,"approval":51.5931373,"support":0.5309836},{"time_hours":396,"approval_perbill":514705883,"support_perbill":5277650,"approval":51.4705883,"support":0.527765},{"time_hours":397,"approval_perbill":513480393,"support_perbill":5245622,"approval":51.3480393,"support":0.5245622},{"time_hours":398,"approval_perbill":512254903,"support_perbill":5213751,"approval":51.2254903,"support":0.5213751},{"time_hours":399,"approval_perbill":511029412,"support_perbill":5182035,"approval":51.1029412,"support":0.5182035},{"time_hours":400,"approval_perbill":509803922,"support_perbill":5150474,"approval":50.9803922,"support":0.5150474},{"time_hours":401,"approval_perbill":508578432,"support_perbill":5119067,"approval":50.8578432,"support":0.5119067},{"time_hours":402,"approval_perbill":507352942,"support_perbill":5087812,"approval":50.7352942,"support":0.5087812},{"time_hours":403,"approval_perbill":506127452,"support_perbill":5056708,"approval":50.6127452,"support":0.5056708},{"time_hours":404,"approval_perbill":504901961,"support_perbill":5025754,"approval":50.4901961,"support":0.5025754},{"time_hours":405,"approval_perbill":503676471,"support_perbill":4994949,"approval":50.3676471,"support":0.4994949},{"time_hours":406,"approval_perbill":502450981,"support_perbill":4964292,"approval":50.2450981,"support":0.4964292},{"time_hours":407,"approval_perbill":501225491,"support_perbill":4933782,"approval":50.1225491,"support":0.4933782},{"time_hours":408,"approval_perbill":500000000,"support_perbill":4903417,"approval":50,"support":0.4903417},{"time_hours":409,"approval_perbill":500000000,"support_perbill":4873198,"approval":50,"support":0.4873198},{"time_hours":410,"approval_perbill":500000000,"support_perbill":4843122,"approval":50,"support":0.4843122},{"time_hours":411,"approval_perbill":500000000,"support_perbill":4813189,"approval":50,"support":0.4813189},{"time_hours":412,"approval_perbill":500000000,"support_perbill":4783398,"approval":50,"support":0.4783398},{"time_hours":413,"approval_perbill":500000000,"support_perbill":4753747,"approval":50,"support":0.4753747},{"time_hours":414,"approval_perbill":500000000,"support_perbill":4724236,"approval":50,"support":0.4724236},{"time_hours":415,"approval_perbill":500000000,"support_perbill":4694864,"approval":50,"support":0.4694864},{"time_hours":416,"approval_perbill":500000000,"support_perbill":4665630,"approval":50,"support":0.466563},{"time_hours":417,"approval_perbill":500000000,"support_perbill":4636532,"approval":50,"support":0.4636532},{"time_hours":418,"approval_perbill":500000000,"support_perbill":4607570,"approval":50,"support":0.460757},{"time_hours":419,"approval_perbill":500000000,"support_perbill":4578743,"approval":50,"support":0.4578743},{"time_hours":420,"approval_perbill":500000000,"support_perbill":4550050,"approval":50,"support":0.455005},{"time_hours":421,"approval_perbill":500000000,"support_perbill":4521490,"approval":50,"support":0.452149},{"time_hours":422,"approval_perbill":500000000,"support_perbill":4493062,"approval":50,"support":0.4493062},{"time_hours":423,"approval_perbill":500000000,"support_perbill":4464766,"approval":50,"support":0.4464766},{"time_hours":424,"approval_perbill":500000000,"support_perbill":4436599,"approval":50,"support":0.4436599},{"time_hours":425,"approval_perbill":500000000,"support_perbill":4408562,"approval":50,"support":0.4408562},{"time_hours":426,"approval_perbill":500000000,"support_perbill":4380654,"approval":50,"support":0.4380654},{"time_hours":427,"approval_perbill":500000000,"support_perbill":4352873,"approval":50,"support":0.4352873},{"time_hours":428,"approval_perbill":500000000,"support_perbill":4325218,"approval":50,"support":0.4325218},{"time_hours":429,"approval_perbill":500000000,"support_perbill":4297690,"approval":50,"support":0.429769},{"time_hours":430,"approval_perbill":500000000,"support_perbill":4270287,"approval":50,"support":0.4270287},{"time_hours":431,"approval_perbill":500000000,"support_perbill":4243007,"approval":50,"support":0.4243007},{"time_hours":432,"approval_perbill":500000000,"support_perbill":4215851,"approval":50,"support":0.4215851},{"time_hours":433,"approval_perbill":500000000,"support_perbill":4188818,"approval":50,"support":0.4188818},{"time_hours":434,"approval_perbill":500000000,"support_perbill":4161906,"approval":50,"support":0.4161906},{"time_hours":435,"approval_perbill":500000000,"support_perbill":4135115,"approval":50,"support":0.4135115},{"time_hours":436,"approval_perbill":500000000,"support_perbill":4108444,"approval":50,"support":0.4108444},{"time_hours":437,"approval_perbill":500000000,"support_perbill":4081892,"approval":50,"support":0.4081892},{"time_hours":438,"approval_perbill":500000000,"support_perbill":4055459,"approval":50,"support":0.4055459},{"time_hours":439,"approval_perbill":500000000,"support_perbill":4029143,"approval":50,"support":0.4029143},{"time_hours":440,"approval_perbill":500000000,"support_perbill":4002944,"approval":50,"support":0.4002944},{"time_hours":441,"approval_perbill":500000000,"support_perbill":3976862,"approval":50,"support":0.3976862},{"time_hours":442,"approval_perbill":500000000,"support_perbill":3950894,"approval":50,"support":0.3950894},{"time_hours":443,"approval_perbill":500000000,"support_perbill":3925041,"approval":50,"support":0.3925041},{"time_hours":444,"approval_perbill":500000000,"support_perbill":3899302,"approval":50,"support":0.3899302},{"time_hours":445,"approval_perbill":500000000,"support_perbill":3873676,"approval":50,"support":0.3873676},{"time_hours":446,"approval_perbill":500000000,"support_perbill":3848162,"approval":50,"support":0.3848162},{"time_hours":447,"approval_perbill":500000000,"support_perbill":3822760,"approval":50,"support":0.382276},{"time_hours":448,"approval_perbill":500000000,"support_perbill":3797468,"approval":50,"support":0.3797468},{"time_hours":449,"approval_perbill":500000000,"support_perbill":3772287,"approval":50,"support":0.3772287},{"time_hours":450,"approval_perbill":500000000,"support_perbill":3747215,"approval":50,"support":0.3747215},{"time_hours":451,"approval_perbill":500000000,"support_perbill":3722251,"approval":50,"support":0.3722251},{"time_hours":452,"approval_perbill":500000000,"support_perbill":3697396,"approval":50,"support":0.3697396},{"time_hours":453,"approval_perbill":500000000,"support_perbill":3672648,"approval":50,"support":0.3672648},{"time_hours":454,"approval_perbill":500000000,"support_perbill":3648006,"approval":50,"support":0.3648006},{"time_hours":455,"approval_perbill":500000000,"support_perbill":3623471,"approval":50,"support":0.3623471},{"time_hours":456,"approval_perbill":500000000,"support_perbill":3599040,"approval":50,"support":0.359904},{"time_hours":457,"approval_perbill":500000000,"support_perbill":3574714,"approval":50,"support":0.3574714},{"time_hours":458,"approval_perbill":500000000,"support_perbill":3550492,"approval":50,"support":0.3550492},{"time_hours":459,"approval_perbill":500000000,"support_perbill":3526373,"approval":50,"support":0.3526373},{"time_hours":460,"approval_perbill":500000000,"support_perbill":3502357,"approval":50,"support":0.3502357},{"time_hours":461,"approval_perbill":500000000,"support_perbill":3478442,"approval":50,"support":0.3478442},{"time_hours":462,"approval_perbill":500000000,"support_perbill":3454629,"approval":50,"support":0.3454629},{"time_hours":463,"approval_perbill":500000000,"support_perbill":3430916,"approval":50,"support":0.3430916},{"time_hours":464,"approval_perbill":500000000,"support_perbill":3407304,"approval":50,"support":0.3407304},{"time_hours":465,"approval_perbill":500000000,"support_perbill":3383790,"approval":50,"support":0.338379},{"time_hours":466,"approval_perbill":500000000,"support_perbill":3360376,"approval":50,"support":0.3360376},{"time_hours":467,"approval_perbill":500000000,"support_perbill":3337059,"approval":50,"support":0.3337059},{"time_hours":468,"approval_perbill":500000000,"support_perbill":3313840,"approval":50,"support":0.331384},{"time_hours":469,"approval_perbill":500000000,"support_perbill":3290718,"approval":50,"support":0.3290718},{"time_hours":470,"approval_perbill":500000000,"support_perbill":3267692,"approval":50,"support":0.3267692},{"time_hours":471,"approval_perbill":500000000,"support_perbill":3244761,"approval":50,"support":0.3244761},{"time_hours":472,"approval_perbill":500000000,"support_perbill":3221926,"approval":50,"support":0.3221926},{"time_hours":473,"approval_perbill":500000000,"support_perbill":3199185,"approval":50,"support":0.3199185},{"time_hours":474,"approval_perbill":500000000,"support_perbill":3176538,"approval":50,"support":0.3176538},{"time_hours":475,"approval_perbill":500000000,"support_perbill":3153985,"approval":50,"support":0.3153985},{"time_hours":476,"approval_perbill":500000000,"support_perbill":3131524,"approval":50,"support":0.3131524},{"time_hours":477,"approval_perbill":500000000,"support_perbill":3109155,"approval":50,"support":0.3109155},{"time_hours":478,"approval_perbill":500000000,"support_perbill":3086878,"approval":50,"support":0.3086878},{"time_hours":479,"approval_perbill":500000000,"support_perbill":3064692,"approval":50,"support":0.3064692},{"time_hours":480,"approval_perbill":500000000,"support_perbill":3042596,"approval":50,"support":0.3042596},{"time_hours":481,"approval_perbill":500000000,"support_perbill":3020590,"approval":50,"support":0.302059},{"time_hours":482,"approval_perbill":500000000,"support_perbill":2998674,"approval":50,"support":0.2998674},{"time_hours":483,"approval_perbill":500000000,"support_perbill":2976847,"approval":50,"support":0.2976847},{"time_hours":484,"approval_perbill":500000000,"support_perbill":2955107,"approval":50,"support":0.2955107},{"time_hours":485,"approval_perbill":500000000,"support_perbill":2933456,"approval":50,"support":0.2933456},{"time_hours":486,"approval_perbill":500000000,"support_perbill":2911892,"approval":50,"support":0.2911892},{"time_hours":487,"approval_perbill":500000000,"support_perbill":2890414,"approval":50,"support":0.2890414},{"time_hours":488,"approval_perbill":500000000,"support_perbill":2869023,"approval":50,"support":0.2869023},{"time_hours":489,"approval_perbill":500000000,"support_perbill":2847717,"approval":50,"support":0.2847717},{"time_hours":490,"approval_perbill":500000000,"support_perbill":2826496,"approval":50,"support":0.2826496},{"time_hours":491,"approval_perbill":500000000,"support_perbill":2805360,"approval":50,"support":0.280536},{"time_hours":492,"approval_perbill":500000000,"support_perbill":2784309,"approval":50,"support":0.2784309},{"time_hours":493,"approval_perbill":500000000,"support_perbill":2763341,"approval":50,"support":0.2763341},{"time_hours":494,"approval_perbill":500000000,"support_perbill":2742455,"approval":50,"support":0.2742455},{"time_hours":495,"approval_perbill":500000000,"support_perbill":2721653,"approval":50,"support":0.2721653},{"time_hours":496,"approval_perbill":500000000,"support_perbill":2700933,"approval":50,"support":0.2700933},{"time_hours":497,"approval_perbill":500000000,"support_perbill":2680294,"approval":50,"support":0.2680294},{"time_hours":498,"approval_perbill":500000000,"support_perbill":2659737,"approval":50,"support":0.2659737},{"time_hours":499,"approval_perbill":500000000,"support_perbill":2639260,"approval":50,"support":0.263926},{"time_hours":500,"approval_perbill":500000000,"support_perbill":2618864,"approval":50,"support":0.2618864},{"time_hours":501,"approval_perbill":500000000,"support_perbill":2598547,"approval":50,"support":0.2598547},{"time_hours":502,"approval_perbill":500000000,"support_perbill":2578310,"approval":50,"support":0.257831},{"time_hours":503,"approval_perbill":500000000,"support_perbill":2558151,"approval":50,"support":0.2558151},{"time_hours":504,"approval_perbill":500000000,"support_perbill":2538071,"approval":50,"support":0.2538071},{"time_hours":505,"approval_perbill":500000000,"support_perbill":2518069,"approval":50,"support":0.2518069},{"time_hours":506,"approval_perbill":500000000,"support_perbill":2498144,"approval":50,"support":0.2498144},{"time_hours":507,"approval_perbill":500000000,"support_perbill":2478296,"approval":50,"support":0.2478296},{"time_hours":508,"approval_perbill":500000000,"support_perbill":2458525,"approval":50,"support":0.2458525},{"time_hours":509,"approval_perbill":500000000,"support_perbill":2438830,"approval":50,"support":0.243883},{"time_hours":510,"approval_perbill":500000000,"support_perbill":2419210,"approval":50,"support":0.241921},{"time_hours":511,"approval_perbill":500000000,"support_perbill":2399666,"approval":50,"support":0.2399666},{"time_hours":512,"approval_perbill":500000000,"support_perbill":2380197,"approval":50,"support":0.2380197},{"time_hours":513,"approval_perbill":500000000,"support_perbill":2360802,"approval":50,"support":0.2360802},{"time_hours":514,"approval_perbill":500000000,"support_perbill":2341481,"approval":50,"support":0.2341481},{"time_hours":515,"approval_perbill":500000000,"support_perbill":2322233,"approval":50,"support":0.2322233},{"time_hours":516,"approval_perbill":500000000,"support_perbill":2303059,"approval":50,"support":0.2303059},{"time_hours":517,"approval_perbill":500000000,"support_perbill":2283957,"approval":50,"support":0.2283957},{"time_hours":518,"approval_perbill":500000000,"support_perbill":2264928,"approval":50,"support":0.2264928},{"time_hours":519,"approval_perbill":500000000,"support_perbill":2245970,"approval":50,"support":0.224597},{"time_hours":520,"approval_perbill":500000000,"support_perbill":2227084,"approval":50,"support":0.2227084},{"time_hours":521,"approval_perbill":500000000,"support_perbill":2208269,"approval":50,"support":0.2208269},{"time_hours":522,"approval_perbill":500000000,"support_perbill":2189525,"approval":50,"support":0.2189525},{"time_hours":523,"approval_perbill":500000000,"support_perbill":2170851,"approval":50,"support":0.2170851},{"time_hours":524,"approval_perbill":500000000,"support_perbill":2152247,"approval":50,"support":0.2152247},{"time_hours":525,"approval_perbill":500000000,"support_perbill":2133712,"approval":50,"support":0.2133712},{"time_hours":526,"approval_perbill":500000000,"support_perbill":2115247,"approval":50,"support":0.2115247},{"time_hours":527,"approval_perbill":500000000,"support_perbill":2096850,"approval":50,"support":0.209685},{"time_hours":528,"approval_perbill":500000000,"support_perbill":2078522,"approval":50,"support":0.2078522},{"time_hours":529,"approval_perbill":500000000,"support_perbill":2060261,"approval":50,"support":0.2060261},{"time_hours":530,"approval_perbill":500000000,"support_perbill":2042068,"approval":50,"support":0.2042068},{"time_hours":531,"approval_perbill":500000000,"support_perbill":2023943,"approval":50,"support":0.2023943},{"time_hours":532,"approval_perbill":500000000,"support_perbill":2005884,"approval":50,"support":0.2005884},{"time_hours":533,"approval_perbill":500000000,"support_perbill":1987891,"approval":50,"support":0.1987891},{"time_hours":534,"approval_perbill":500000000,"support_perbill":1969965,"approval":50,"support":0.1969965},{"time_hours":535,"approval_perbill":500000000,"support_perbill":1952104,"approval":50,"support":0.1952104},{"time_hours":536,"approval_perbill":500000000,"support_perbill":1934309,"approval":50,"support":0.1934309},{"time_hours":537,"approval_perbill":500000000,"support_perbill":1916579,"approval":50,"support":0.1916579},{"time_hours":538,"approval_perbill":500000000,"support_perbill":1898913,"approval":50,"support":0.1898913},{"time_hours":539,"approval_perbill":500000000,"support_perbill":1881312,"approval":50,"support":0.1881312},{"time_hours":540,"approval_perbill":500000000,"support_perbill":1863775,"approval":50,"support":0.1863775},{"time_hours":541,"approval_perbill":500000000,"support_perbill":1846301,"approval":50,"support":0.1846301},{"time_hours":542,"approval_perbill":500000000,"support_perbill":1828891,"approval":50,"support":0.1828891},{"time_hours":543,"approval_perbill":500000000,"support_perbill":1811543,"approval":50,"support":0.1811543},{"time_hours":544,"approval_perbill":500000000,"support_perbill":1794258,"approval":50,"support":0.1794258},{"time_hours":545,"approval_perbill":500000000,"support_perbill":1777036,"approval":50,"support":0.1777036},{"time_hours":546,"approval_perbill":500000000,"support_perbill":1759875,"approval":50,"support":0.1759875},{"time_hours":547,"approval_perbill":500000000,"support_perbill":1742775,"approval":50,"support":0.1742775},{"time_hours":548,"approval_perbill":500000000,"support_perbill":1725737,"approval":50,"support":0.1725737},{"time_hours":549,"approval_perbill":500000000,"support_perbill":1708760,"approval":50,"support":0.170876},{"time_hours":550,"approval_perbill":500000000,"support_perbill":1691844,"approval":50,"support":0.1691844},{"time_hours":551,"approval_perbill":500000000,"support_perbill":1674988,"approval":50,"support":0.1674988},{"time_hours":552,"approval_perbill":500000000,"support_perbill":1658191,"approval":50,"support":0.1658191},{"time_hours":553,"approval_perbill":500000000,"support_perbill":1641455,"approval":50,"support":0.1641455},{"time_hours":554,"approval_perbill":500000000,"support_perbill":1624777,"approval":50,"support":0.1624777},{"time_hours":555,"approval_perbill":500000000,"support_perbill":1608159,"approval":50,"support":0.1608159},{"time_hours":556,"approval_perbill":500000000,"support_perbill":1591599,"approval":50,"support":0.1591599},{"time_hours":557,"approval_perbill":500000000,"support_perbill":1575098,"approval":50,"support":0.1575098},{"time_hours":558,"approval_perbill":500000000,"support_perbill":1558654,"approval":50,"support":0.1558654},{"time_hours":559,"approval_perbill":500000000,"support_perbill":1542269,"approval":50,"support":0.1542269},{"time_hours":560,"approval_perbill":500000000,"support_perbill":1525941,"approval":50,"support":0.1525941},{"time_hours":561,"approval_perbill":500000000,"support_perbill":1509670,"approval":50,"support":0.150967},{"time_hours":562,"approval_perbill":500000000,"support_perbill":1493456,"approval":50,"support":0.1493456},{"time_hours":563,"approval_perbill":500000000,"support_perbill":1477298,"approval":50,"support":0.1477298},{"time_hours":564,"approval_perbill":500000000,"support_perbill":1461197,"approval":50,"support":0.1461197},{"time_hours":565,"approval_perbill":500000000,"support_perbill":1445152,"approval":50,"support":0.1445152},{"time_hours":566,"approval_perbill":500000000,"support_perbill":1429162,"approval":50,"support":0.1429162},{"time_hours":567,"approval_perbill":500000000,"support_perbill":1413228,"approval":50,"support":0.1413228},{"time_hours":568,"approval_perbill":500000000,"support_perbill":1397348,"approval":50,"support":0.1397348},{"time_hours":569,"approval_perbill":500000000,"support_perbill":1381524,"approval":50,"support":0.1381524},{"time_hours":570,"approval_perbill":500000000,"support_perbill":1365754,"approval":50,"support":0.1365754},{"time_hours":571,"approval_perbill":500000000,"support_perbill":1350039,"approval":50,"support":0.1350039},{"time_hours":572,"approval_perbill":500000000,"support_perbill":1334377,"approval":50,"support":0.1334377},{"time_hours":573,"approval_perbill":500000000,"support_perbill":1318769,"approval":50,"support":0.1318769},{"time_hours":574,"approval_perbill":500000000,"support_perbill":1303214,"approval":50,"support":0.1303214},{"time_hours":575,"approval_perbill":500000000,"support_perbill":1287713,"approval":50,"support":0.1287713},{"time_hours":576,"approval_perbill":500000000,"support_perbill":1272264,"approval":50,"support":0.1272264},{"time_hours":577,"approval_perbill":500000000,"support_perbill":1256869,"approval":50,"support":0.1256869},{"time_hours":578,"approval_perbill":500000000,"support_perbill":1241525,"approval":50,"support":0.1241525},{"time_hours":579,"approval_perbill":500000000,"support_perbill":1226233,"approval":50,"support":0.1226233},{"time_hours":580,"approval_perbill":500000000,"support_perbill":1210994,"approval":50,"support":0.1210994},{"time_hours":581,"approval_perbill":500000000,"support_perbill":1195805,"approval":50,"support":0.1195805},{"time_hours":582,"approval_perbill":500000000,"support_perbill":1180668,"approval":50,"support":0.1180668},{"time_hours":583,"approval_perbill":500000000,"support_perbill":1165582,"approval":50,"support":0.1165582},{"time_hours":584,"approval_perbill":500000000,"support_perbill":1150547,"approval":50,"support":0.1150547},{"time_hours":585,"approval_perbill":500000000,"support_perbill":1135563,"approval":50,"support":0.1135563},{"time_hours":586,"approval_perbill":500000000,"support_perbill":1120628,"approval":50,"support":0.1120628},{"time_hours":587,"approval_perbill":500000000,"support_perbill":1105744,"approval":50,"support":0.1105744},{"time_hours":588,"approval_perbill":500000000,"support_perbill":1090909,"approval":50,"support":0.1090909},{"time_hours":589,"approval_perbill":500000000,"support_perbill":1076124,"approval":50,"support":0.1076124},{"time_hours":590,"approval_perbill":500000000,"support_perbill":1061388,"approval":50,"support":0.1061388},{"time_hours":591,"approval_perbill":500000000,"support_perbill":1046701,"approval":50,"support":0.1046701},{"time_hours":592,"approval_perbill":500000000,"support_perbill":1032063,"approval":50,"support":0.1032063},{"time_hours":593,"approval_perbill":500000000,"support_perbill":1017473,"approval":50,"support":0.1017473},{"time_hours":594,"approval_perbill":500000000,"support_perbill":1002932,"approval":50,"support":0.1002932},{"time_hours":595,"approval_perbill":500000000,"support_perbill":988438,"approval":50,"support":0.0988438},{"time_hours":596,"approval_perbill":500000000,"support_perbill":973993,"approval":50,"support":0.0973993},{"time_hours":597,"approval_perbill":500000000,"support_perbill":959595,"approval":50,"support":0.0959595},{"time_hours":598,"approval_perbill":500000000,"support_perbill":945244,"approval":50,"support":0.0945244},{"time_hours":599,"approval_perbill":500000000,"support_perbill":930940,"approval":50,"support":0.093094},{"time_hours":600,"approval_perbill":500000000,"support_perbill":916684,"approval":50,"support":0.0916684},{"time_hours":601,"approval_perbill":500000000,"support_perbill":902473,"approval":50,"support":0.0902473},{"time_hours":602,"approval_perbill":500000000,"support_perbill":888310,"approval":50,"support":0.088831},{"time_hours":603,"approval_perbill":500000000,"support_perbill":874192,"approval":50,"support":0.0874192},{"time_hours":604,"approval_perbill":500000000,"support_perbill":860121,"approval":50,"support":0.0860121},{"time_hours":605,"approval_perbill":500000000,"support_perbill":846095,"approval":50,"support":0.0846095},{"time_hours":606,"approval_perbill":500000000,"support_perbill":832114,"approval":50,"support":0.0832114},{"time_hours":607,"approval_perbill":500000000,"support_perbill":818179,"approval":50,"support":0.0818179},{"time_hours":608,"approval_perbill":500000000,"support_perbill":804289,"approval":50,"support":0.0804289},{"time_hours":609,"approval_perbill":500000000,"support_perbill":790444,"approval":50,"support":0.0790444},{"time_hours":610,"approval_perbill":500000000,"support_perbill":776644,"approval":50,"support":0.0776644},{"time_hours":611,"approval_perbill":500000000,"support_perbill":762888,"approval":50,"support":0.0762888},{"time_hours":612,"approval_perbill":500000000,"support_perbill":749176,"approval":50,"support":0.0749176},{"time_hours":613,"approval_perbill":500000000,"support_perbill":735508,"approval":50,"support":0.0735508},{"time_hours":614,"approval_perbill":500000000,"support_perbill":721884,"approval":50,"support":0.0721884},{"time_hours":615,"approval_perbill":500000000,"support_perbill":708303,"approval":50,"support":0.0708303},{"time_hours":616,"approval_perbill":500000000,"support_perbill":694766,"approval":50,"support":0.0694766},{"time_hours":617,"approval_perbill":500000000,"support_perbill":681272,"approval":50,"support":0.0681272},{"time_hours":618,"approval_perbill":500000000,"support_perbill":667821,"approval":50,"support":0.0667821},{"time_hours":619,"approval_perbill":500000000,"support_perbill":654412,"approval":50,"support":0.0654412},{"time_hours":620,"approval_perbill":500000000,"support_perbill":641047,"approval":50,"support":0.0641047},{"time_hours":621,"approval_perbill":500000000,"support_perbill":627723,"approval":50,"support":0.0627723},{"time_hours":622,"approval_perbill":500000000,"support_perbill":614442,"approval":50,"support":0.0614442},{"time_hours":623,"approval_perbill":500000000,"support_perbill":601202,"approval":50,"support":0.0601202},{"time_hours":624,"approval_perbill":500000000,"support_perbill":588005,"approval":50,"support":0.0588005},{"time_hours":625,"approval_perbill":500000000,"support_perbill":574848,"approval":50,"support":0.0574848},{"time_hours":626,"approval_perbill":500000000,"support_perbill":561734,"approval":50,"support":0.0561734},{"time_hours":627,"approval_perbill":500000000,"support_perbill":548660,"approval":50,"support":0.054866},{"time_hours":628,"approval_perbill":500000000,"support_perbill":535627,"approval":50,"support":0.0535627},{"time_hours":629,"approval_perbill":500000000,"support_perbill":522635,"approval":50,"support":0.0522635},{"time_hours":630,"approval_perbill":500000000,"support_perbill":509684,"approval":50,"support":0.0509684},{"time_hours":631,"approval_perbill":500000000,"support_perbill":496773,"approval":50,"support":0.0496773},{"time_hours":632,"approval_perbill":500000000,"support_perbill":483902,"approval":50,"support":0.0483902},{"time_hours":633,"approval_perbill":500000000,"support_perbill":471071,"approval":50,"support":0.0471071},{"time_hours":634,"approval_perbill":500000000,"support_perbill":458280,"approval":50,"support":0.045828},{"time_hours":635,"approval_perbill":500000000,"support_perbill":445529,"approval":50,"support":0.0445529},{"time_hours":636,"approval_perbill":500000000,"support_perbill":432817,"approval":50,"support":0.0432817},{"time_hours":637,"approval_perbill":500000000,"support_perbill":420144,"approval":50,"support":0.0420144},{"time_hours":638,"approval_perbill":500000000,"support_perbill":407511,"approval":50,"support":0.0407511},{"time_hours":639,"approval_perbill":500000000,"support_perbill":394916,"approval":50,"support":0.0394916},{"time_hours":640,"approval_perbill":500000000,"support_perbill":382360,"approval":50,"support":0.038236},{"time_hours":641,"approval_perbill":500000000,"support_perbill":369843,"approval":50,"support":0.0369843},{"time_hours":642,"approval_perbill":500000000,"support_perbill":357364,"approval":50,"support":0.0357364},{"time_hours":643,"approval_perbill":500000000,"support_perbill":344923,"approval":50,"support":0.0344923},{"time_hours":644,"approval_perbill":500000000,"support_perbill":332520,"approval":50,"support":0.033252},{"time_hours":645,"approval_perbill":500000000,"support_perbill":320155,"approval":50,"support":0.0320155},{"time_hours":646,"approval_perbill":500000000,"support_perbill":307828,"approval":50,"support":0.0307828},{"time_hours":647,"approval_perbill":500000000,"support_perbill":295538,"approval":50,"support":0.0295538},{"time_hours":648,"approval_perbill":500000000,"support_perbill":283286,"approval":50,"support":0.0283286},{"time_hours":649,"approval_perbill":500000000,"support_perbill":271071,"approval":50,"support":0.0271071},{"time_hours":650,"approval_perbill":500000000,"support_perbill":258892,"approval":50,"support":0.0258892},{"time_hours":651,"approval_perbill":500000000,"support_perbill":246751,"approval":50,"support":0.0246751},{"time_hours":652,"approval_perbill":500000000,"support_perbill":234646,"approval":50,"support":0.0234646},{"time_hours":653,"approval_perbill":500000000,"support_perbill":222578,"approval":50,"support":0.0222578},{"time_hours":654,"approval_perbill":500000000,"support_perbill":210546,"approval":50,"support":0.0210546},{"time_hours":655,"approval_perbill":500000000,"support_perbill":198550,"approval":50,"support":0.019855},{"time_hours":656,"approval_perbill":500000000,"support_perbill":186590,"approval":50,"support":0.018659},{"time_hours":657,"approval_perbill":500000000,"support_perbill":174666,"approval":50,"support":0.0174666},{"time_hours":658,"approval_perbill":500000000,"support_perbill":162778,"approval":50,"support":0.0162778},{"time_hours":659,"approval_perbill":500000000,"support_perbill":150925,"approval":50,"support":0.0150925},{"time_hours":660,"approval_perbill":500000000,"support_perbill":139108,"approval":50,"support":0.0139108},{"time_hours":661,"approval_perbill":500000000,"support_perbill":127326,"approval":50,"support":0.0127326},{"time_hours":662,"approval_perbill":500000000,"support_perbill":115578,"approval":50,"support":0.0115578},{"time_hours":663,"approval_perbill":500000000,"support_perbill":103866,"approval":50,"support":0.0103866},{"time_hours":664,"approval_perbill":500000000,"support_perbill":92188,"approval":50,"support":0.0092188},{"time_hours":665,"approval_perbill":500000000,"support_perbill":80545,"approval":50,"support":0.0080545},{"time_hours":666,"approval_perbill":500000000,"support_perbill":68937,"approval":50,"support":0.0068937},{"time_hours":667,"approval_perbill":500000000,"support_perbill":57363,"approval":50,"support":0.0057363},{"time_hours":668,"approval_perbill":500000000,"support_perbill":45822,"approval":50,"support":0.0045822},{"time_hours":669,"approval_perbill":500000000,"support_perbill":34316,"approval":50,"support":0.0034316},{"time_hours":670,"approval_perbill":500000000,"support_perbill":22844,"approval":50,"support":0.0022844},{"time_hours":671,"approval_perbill":500000000,"support_perbill":11405,"approval":50,"support":0.0011405},{"time_hours":672,"approval_perbill":500000000,"support_perbill":0,"approval":50,"support":0}]')},84301:p=>{"use strict";p.exports=JSON.parse('[{"time_hours":0,"approval_perbill":1000000000,"support_perbill":500000080,"approval":100,"support":50.000008},{"time_hours":1,"approval_perbill":997916667,"support_perbill":341823819,"approval":99.7916667,"support":34.1823819},{"time_hours":2,"approval_perbill":995833334,"support_perbill":259488839,"approval":99.5833334,"support":25.9488839},{"time_hours":3,"approval_perbill":993750001,"support_perbill":208997250,"approval":99.3750001,"support":20.899725},{"time_hours":4,"approval_perbill":991666668,"support_perbill":174869164,"approval":99.1666668,"support":17.4869164},{"time_hours":5,"approval_perbill":989583334,"support_perbill":150259101,"approval":98.9583334,"support":15.0259101},{"time_hours":6,"approval_perbill":987500001,"support_perbill":131672630,"approval":98.7500001,"support":13.167263},{"time_hours":7,"approval_perbill":985416668,"support_perbill":117139365,"approval":98.5416668,"support":11.7139365},{"time_hours":8,"approval_perbill":983333335,"support_perbill":105463816,"approval":98.3333335,"support":10.5463816},{"time_hours":9,"approval_perbill":981250001,"support_perbill":95878546,"approval":98.1250001,"support":9.5878546},{"time_hours":10,"approval_perbill":979166668,"support_perbill":87868351,"approval":97.9166668,"support":8.7868351},{"time_hours":11,"approval_perbill":977083335,"support_perbill":81074471,"approval":97.7083335,"support":8.1074471},{"time_hours":12,"approval_perbill":975000002,"support_perbill":75239418,"approval":97.5000002,"support":7.5239418},{"time_hours":13,"approval_perbill":972916667,"support_perbill":70173586,"approval":97.2916667,"support":7.0173586},{"time_hours":14,"approval_perbill":970833334,"support_perbill":65734281,"approval":97.0833334,"support":6.5734281},{"time_hours":15,"approval_perbill":968750001,"support_perbill":61812039,"approval":96.8750001,"support":6.1812039},{"time_hours":16,"approval_perbill":966666668,"support_perbill":58321494,"approval":96.6666668,"support":5.8321494},{"time_hours":17,"approval_perbill":964583334,"support_perbill":55195091,"approval":96.4583334,"support":5.5195091},{"time_hours":18,"approval_perbill":962500001,"support_perbill":52378676,"approval":96.2500001,"support":5.2378676},{"time_hours":19,"approval_perbill":960416668,"support_perbill":49828322,"approval":96.0416668,"support":4.9828322},{"time_hours":20,"approval_perbill":958333335,"support_perbill":47508027,"approval":95.8333335,"support":4.7508027},{"time_hours":21,"approval_perbill":956250000,"support_perbill":45388004,"approval":95.625,"support":4.5388004},{"time_hours":22,"approval_perbill":954166667,"support_perbill":43443400,"approval":95.4166667,"support":4.34434},{"time_hours":23,"approval_perbill":952083334,"support_perbill":41653305,"approval":95.2083334,"support":4.1653305},{"time_hours":24,"approval_perbill":950000001,"support_perbill":40000010,"approval":95.0000001,"support":4.000001},{"time_hours":25,"approval_perbill":947916668,"support_perbill":38468408,"approval":94.7916668,"support":3.8468408},{"time_hours":26,"approval_perbill":945833334,"support_perbill":37045541,"approval":94.5833334,"support":3.7045541},{"time_hours":27,"approval_perbill":943750001,"support_perbill":35720228,"approval":94.3750001,"support":3.5720228},{"time_hours":28,"approval_perbill":941666668,"support_perbill":34482767,"approval":94.1666668,"support":3.4482767},{"time_hours":29,"approval_perbill":939583335,"support_perbill":33324704,"approval":93.9583335,"support":3.3324704},{"time_hours":30,"approval_perbill":937500001,"support_perbill":32238633,"approval":93.7500001,"support":3.2238633},{"time_hours":31,"approval_perbill":935416668,"support_perbill":31218046,"approval":93.5416668,"support":3.1218046},{"time_hours":32,"approval_perbill":933333335,"support_perbill":30257193,"approval":93.3333335,"support":3.0257193},{"time_hours":33,"approval_perbill":931250002,"support_perbill":29350978,"approval":93.1250002,"support":2.9350978},{"time_hours":34,"approval_perbill":929166667,"support_perbill":28494870,"approval":92.9166667,"support":2.849487},{"time_hours":35,"approval_perbill":927083334,"support_perbill":27684825,"approval":92.7083334,"support":2.7684825},{"time_hours":36,"approval_perbill":925000001,"support_perbill":26917223,"approval":92.5000001,"support":2.6917223},{"time_hours":37,"approval_perbill":922916668,"support_perbill":26188813,"approval":92.2916668,"support":2.6188813},{"time_hours":38,"approval_perbill":920833334,"support_perbill":25496668,"approval":92.0833334,"support":2.5496668},{"time_hours":39,"approval_perbill":918750001,"support_perbill":24838146,"approval":91.8750001,"support":2.4838146},{"time_hours":40,"approval_perbill":916666668,"support_perbill":24210854,"approval":91.6666668,"support":2.4210854},{"time_hours":41,"approval_perbill":914583335,"support_perbill":23612624,"approval":91.4583335,"support":2.3612624},{"time_hours":42,"approval_perbill":912500000,"support_perbill":23041480,"approval":91.25,"support":2.304148},{"time_hours":43,"approval_perbill":910416667,"support_perbill":22495624,"approval":91.0416667,"support":2.2495624},{"time_hours":44,"approval_perbill":908333334,"support_perbill":21973413,"approval":90.8333334,"support":2.1973413},{"time_hours":45,"approval_perbill":906250001,"support_perbill":21473343,"approval":90.6250001,"support":2.1473343},{"time_hours":46,"approval_perbill":904166668,"support_perbill":20994035,"approval":90.4166668,"support":2.0994035},{"time_hours":47,"approval_perbill":902083334,"support_perbill":20534223,"approval":90.2083334,"support":2.0534223},{"time_hours":48,"approval_perbill":900000001,"support_perbill":20092740,"approval":90.0000001,"support":2.009274},{"time_hours":49,"approval_perbill":897916668,"support_perbill":19668513,"approval":89.7916668,"support":1.9668513},{"time_hours":50,"approval_perbill":895833335,"support_perbill":19260548,"approval":89.5833335,"support":1.9260548},{"time_hours":51,"approval_perbill":893750001,"support_perbill":18867929,"approval":89.3750001,"support":1.8867929},{"time_hours":52,"approval_perbill":891666668,"support_perbill":18489805,"approval":89.1666668,"support":1.8489805},{"time_hours":53,"approval_perbill":889583335,"support_perbill":18125388,"approval":88.9583335,"support":1.8125388},{"time_hours":54,"approval_perbill":887500002,"support_perbill":17773947,"approval":88.7500002,"support":1.7773947},{"time_hours":55,"approval_perbill":885416667,"support_perbill":17434800,"approval":88.5416667,"support":1.74348},{"time_hours":56,"approval_perbill":883333334,"support_perbill":17107313,"approval":88.3333334,"support":1.7107313},{"time_hours":57,"approval_perbill":881250001,"support_perbill":16790896,"approval":88.1250001,"support":1.6790896},{"time_hours":58,"approval_perbill":879166668,"support_perbill":16484995,"approval":87.9166668,"support":1.6484995},{"time_hours":59,"approval_perbill":877083334,"support_perbill":16189096,"approval":87.7083334,"support":1.6189096},{"time_hours":60,"approval_perbill":875000001,"support_perbill":15902716,"approval":87.5000001,"support":1.5902716},{"time_hours":61,"approval_perbill":872916668,"support_perbill":15625403,"approval":87.2916668,"support":1.5625403},{"time_hours":62,"approval_perbill":870833335,"support_perbill":15356733,"approval":87.0833335,"support":1.5356733},{"time_hours":63,"approval_perbill":868750000,"support_perbill":15096307,"approval":86.875,"support":1.5096307},{"time_hours":64,"approval_perbill":866666667,"support_perbill":14843753,"approval":86.6666667,"support":1.4843753},{"time_hours":65,"approval_perbill":864583334,"support_perbill":14598719,"approval":86.4583334,"support":1.4598719},{"time_hours":66,"approval_perbill":862500001,"support_perbill":14360873,"approval":86.2500001,"support":1.4360873},{"time_hours":67,"approval_perbill":860416668,"support_perbill":14129905,"approval":86.0416668,"support":1.4129905},{"time_hours":68,"approval_perbill":858333334,"support_perbill":13905519,"approval":85.8333334,"support":1.3905519},{"time_hours":69,"approval_perbill":856250001,"support_perbill":13687439,"approval":85.6250001,"support":1.3687439},{"time_hours":70,"approval_perbill":854166668,"support_perbill":13475403,"approval":85.4166668,"support":1.3475403},{"time_hours":71,"approval_perbill":852083335,"support_perbill":13269162,"approval":85.2083335,"support":1.3269162},{"time_hours":72,"approval_perbill":850000001,"support_perbill":13068482,"approval":85.0000001,"support":1.3068482},{"time_hours":73,"approval_perbill":847916668,"support_perbill":12873141,"approval":84.7916668,"support":1.2873141},{"time_hours":74,"approval_perbill":845833335,"support_perbill":12682930,"approval":84.5833335,"support":1.268293},{"time_hours":75,"approval_perbill":843750002,"support_perbill":12497648,"approval":84.3750002,"support":1.2497648},{"time_hours":76,"approval_perbill":841666667,"support_perbill":12317106,"approval":84.1666667,"support":1.2317106},{"time_hours":77,"approval_perbill":839583334,"support_perbill":12141125,"approval":83.9583334,"support":1.2141125},{"time_hours":78,"approval_perbill":837500001,"support_perbill":11969535,"approval":83.7500001,"support":1.1969535},{"time_hours":79,"approval_perbill":835416668,"support_perbill":11802172,"approval":83.5416668,"support":1.1802172},{"time_hours":80,"approval_perbill":833333334,"support_perbill":11638883,"approval":83.3333334,"support":1.1638883},{"time_hours":81,"approval_perbill":831250001,"support_perbill":11479520,"approval":83.1250001,"support":1.147952},{"time_hours":82,"approval_perbill":829166668,"support_perbill":11323944,"approval":82.9166668,"support":1.1323944},{"time_hours":83,"approval_perbill":827083335,"support_perbill":11172021,"approval":82.7083335,"support":1.1172021},{"time_hours":84,"approval_perbill":825000000,"support_perbill":11023624,"approval":82.5,"support":1.1023624},{"time_hours":85,"approval_perbill":822916667,"support_perbill":10878632,"approval":82.2916667,"support":1.0878632},{"time_hours":86,"approval_perbill":820833334,"support_perbill":10736929,"approval":82.0833334,"support":1.0736929},{"time_hours":87,"approval_perbill":818750001,"support_perbill":10598404,"approval":81.8750001,"support":1.0598404},{"time_hours":88,"approval_perbill":816666668,"support_perbill":10462952,"approval":81.6666668,"support":1.0462952},{"time_hours":89,"approval_perbill":814583334,"support_perbill":10330471,"approval":81.4583334,"support":1.0330471},{"time_hours":90,"approval_perbill":812500001,"support_perbill":10200864,"approval":81.2500001,"support":1.0200864},{"time_hours":91,"approval_perbill":810416668,"support_perbill":10074040,"approval":81.0416668,"support":1.007404},{"time_hours":92,"approval_perbill":808333335,"support_perbill":9949909,"approval":80.8333335,"support":0.9949909},{"time_hours":93,"approval_perbill":806250001,"support_perbill":9828387,"approval":80.6250001,"support":0.9828387},{"time_hours":94,"approval_perbill":804166668,"support_perbill":9709392,"approval":80.4166668,"support":0.9709392},{"time_hours":95,"approval_perbill":802083335,"support_perbill":9592846,"approval":80.2083335,"support":0.9592846},{"time_hours":96,"approval_perbill":800000002,"support_perbill":9478675,"approval":80.0000002,"support":0.9478675},{"time_hours":97,"approval_perbill":797916667,"support_perbill":9366806,"approval":79.7916667,"support":0.9366806},{"time_hours":98,"approval_perbill":795833334,"support_perbill":9257171,"approval":79.5833334,"support":0.9257171},{"time_hours":99,"approval_perbill":793750001,"support_perbill":9149703,"approval":79.3750001,"support":0.9149703},{"time_hours":100,"approval_perbill":791666668,"support_perbill":9044338,"approval":79.1666668,"support":0.9044338},{"time_hours":101,"approval_perbill":789583334,"support_perbill":8941016,"approval":78.9583334,"support":0.8941016},{"time_hours":102,"approval_perbill":787500001,"support_perbill":8839678,"approval":78.7500001,"support":0.8839678},{"time_hours":103,"approval_perbill":785416668,"support_perbill":8740267,"approval":78.5416668,"support":0.8740267},{"time_hours":104,"approval_perbill":783333335,"support_perbill":8642729,"approval":78.3333335,"support":0.8642729},{"time_hours":105,"approval_perbill":781250000,"support_perbill":8547010,"approval":78.125,"support":0.854701},{"time_hours":106,"approval_perbill":779166667,"support_perbill":8453062,"approval":77.9166667,"support":0.8453062},{"time_hours":107,"approval_perbill":777083334,"support_perbill":8360835,"approval":77.7083334,"support":0.8360835},{"time_hours":108,"approval_perbill":775000001,"support_perbill":8270281,"approval":77.5000001,"support":0.8270281},{"time_hours":109,"approval_perbill":772916668,"support_perbill":8181358,"approval":77.2916668,"support":0.8181358},{"time_hours":110,"approval_perbill":770833334,"support_perbill":8094019,"approval":77.0833334,"support":0.8094019},{"time_hours":111,"approval_perbill":768750001,"support_perbill":8008224,"approval":76.8750001,"support":0.8008224},{"time_hours":112,"approval_perbill":766666668,"support_perbill":7923932,"approval":76.6666668,"support":0.7923932},{"time_hours":113,"approval_perbill":764583335,"support_perbill":7841104,"approval":76.4583335,"support":0.7841104},{"time_hours":114,"approval_perbill":762500001,"support_perbill":7759701,"approval":76.2500001,"support":0.7759701},{"time_hours":115,"approval_perbill":760416668,"support_perbill":7679688,"approval":76.0416668,"support":0.7679688},{"time_hours":116,"approval_perbill":758333335,"support_perbill":7601030,"approval":75.8333335,"support":0.760103},{"time_hours":117,"approval_perbill":756250002,"support_perbill":7523691,"approval":75.6250002,"support":0.7523691},{"time_hours":118,"approval_perbill":754166667,"support_perbill":7447639,"approval":75.4166667,"support":0.7447639},{"time_hours":119,"approval_perbill":752083334,"support_perbill":7372843,"approval":75.2083334,"support":0.7372843},{"time_hours":120,"approval_perbill":750000001,"support_perbill":7299272,"approval":75.0000001,"support":0.7299272},{"time_hours":121,"approval_perbill":747916668,"support_perbill":7226894,"approval":74.7916668,"support":0.7226894},{"time_hours":122,"approval_perbill":745833334,"support_perbill":7155683,"approval":74.5833334,"support":0.7155683},{"time_hours":123,"approval_perbill":743750001,"support_perbill":7085609,"approval":74.3750001,"support":0.7085609},{"time_hours":124,"approval_perbill":741666668,"support_perbill":7016647,"approval":74.1666668,"support":0.7016647},{"time_hours":125,"approval_perbill":739583335,"support_perbill":6948769,"approval":73.9583335,"support":0.6948769},{"time_hours":126,"approval_perbill":737500000,"support_perbill":6881949,"approval":73.75,"support":0.6881949},{"time_hours":127,"approval_perbill":735416667,"support_perbill":6816165,"approval":73.5416667,"support":0.6816165},{"time_hours":128,"approval_perbill":733333334,"support_perbill":6751391,"approval":73.3333334,"support":0.6751391},{"time_hours":129,"approval_perbill":731250001,"support_perbill":6687605,"approval":73.1250001,"support":0.6687605},{"time_hours":130,"approval_perbill":729166668,"support_perbill":6624784,"approval":72.9166668,"support":0.6624784},{"time_hours":131,"approval_perbill":727083334,"support_perbill":6562907,"approval":72.7083334,"support":0.6562907},{"time_hours":132,"approval_perbill":725000001,"support_perbill":6501952,"approval":72.5000001,"support":0.6501952},{"time_hours":133,"approval_perbill":722916668,"support_perbill":6441899,"approval":72.2916668,"support":0.6441899},{"time_hours":134,"approval_perbill":720833335,"support_perbill":6382728,"approval":72.0833335,"support":0.6382728},{"time_hours":135,"approval_perbill":718750001,"support_perbill":6324419,"approval":71.8750001,"support":0.6324419},{"time_hours":136,"approval_perbill":716666668,"support_perbill":6266955,"approval":71.6666668,"support":0.6266955},{"time_hours":137,"approval_perbill":714583335,"support_perbill":6210316,"approval":71.4583335,"support":0.6210316},{"time_hours":138,"approval_perbill":712500002,"support_perbill":6154486,"approval":71.2500002,"support":0.6154486},{"time_hours":139,"approval_perbill":710416667,"support_perbill":6099446,"approval":71.0416667,"support":0.6099446},{"time_hours":140,"approval_perbill":708333334,"support_perbill":6045181,"approval":70.8333334,"support":0.6045181},{"time_hours":141,"approval_perbill":706250001,"support_perbill":5991674,"approval":70.6250001,"support":0.5991674},{"time_hours":142,"approval_perbill":704166668,"support_perbill":5938909,"approval":70.4166668,"support":0.5938909},{"time_hours":143,"approval_perbill":702083334,"support_perbill":5886871,"approval":70.2083334,"support":0.5886871},{"time_hours":144,"approval_perbill":700000001,"support_perbill":5835545,"approval":70.0000001,"support":0.5835545},{"time_hours":145,"approval_perbill":697916668,"support_perbill":5784916,"approval":69.7916668,"support":0.5784916},{"time_hours":146,"approval_perbill":695833335,"support_perbill":5734971,"approval":69.5833335,"support":0.5734971},{"time_hours":147,"approval_perbill":693750000,"support_perbill":5685696,"approval":69.375,"support":0.5685696},{"time_hours":148,"approval_perbill":691666667,"support_perbill":5637077,"approval":69.1666667,"support":0.5637077},{"time_hours":149,"approval_perbill":689583334,"support_perbill":5589101,"approval":68.9583334,"support":0.5589101},{"time_hours":150,"approval_perbill":687500001,"support_perbill":5541755,"approval":68.7500001,"support":0.5541755},{"time_hours":151,"approval_perbill":685416668,"support_perbill":5495028,"approval":68.5416668,"support":0.5495028},{"time_hours":152,"approval_perbill":683333334,"support_perbill":5448907,"approval":68.3333334,"support":0.5448907},{"time_hours":153,"approval_perbill":681250001,"support_perbill":5403380,"approval":68.1250001,"support":0.540338},{"time_hours":154,"approval_perbill":679166668,"support_perbill":5358437,"approval":67.9166668,"support":0.5358437},{"time_hours":155,"approval_perbill":677083335,"support_perbill":5314065,"approval":67.7083335,"support":0.5314065},{"time_hours":156,"approval_perbill":675000001,"support_perbill":5270255,"approval":67.5000001,"support":0.5270255},{"time_hours":157,"approval_perbill":672916668,"support_perbill":5226995,"approval":67.2916668,"support":0.5226995},{"time_hours":158,"approval_perbill":670833335,"support_perbill":5184275,"approval":67.0833335,"support":0.5184275},{"time_hours":159,"approval_perbill":668750002,"support_perbill":5142085,"approval":66.8750002,"support":0.5142085},{"time_hours":160,"approval_perbill":666666667,"support_perbill":5100415,"approval":66.6666667,"support":0.5100415},{"time_hours":161,"approval_perbill":664583334,"support_perbill":5059257,"approval":66.4583334,"support":0.5059257},{"time_hours":162,"approval_perbill":662500001,"support_perbill":5018599,"approval":66.2500001,"support":0.5018599},{"time_hours":163,"approval_perbill":660416668,"support_perbill":4978434,"approval":66.0416668,"support":0.4978434},{"time_hours":164,"approval_perbill":658333334,"support_perbill":4938753,"approval":65.8333334,"support":0.4938753},{"time_hours":165,"approval_perbill":656250001,"support_perbill":4899546,"approval":65.6250001,"support":0.4899546},{"time_hours":166,"approval_perbill":654166668,"support_perbill":4860805,"approval":65.4166668,"support":0.4860805},{"time_hours":167,"approval_perbill":652083335,"support_perbill":4822523,"approval":65.2083335,"support":0.4822523},{"time_hours":168,"approval_perbill":650000000,"support_perbill":4784690,"approval":65,"support":0.478469},{"time_hours":169,"approval_perbill":647916667,"support_perbill":4747299,"approval":64.7916667,"support":0.4747299},{"time_hours":170,"approval_perbill":645833334,"support_perbill":4710343,"approval":64.5833334,"support":0.4710343},{"time_hours":171,"approval_perbill":643750001,"support_perbill":4673814,"approval":64.3750001,"support":0.4673814},{"time_hours":172,"approval_perbill":641666668,"support_perbill":4637704,"approval":64.1666668,"support":0.4637704},{"time_hours":173,"approval_perbill":639583334,"support_perbill":4602006,"approval":63.9583334,"support":0.4602006},{"time_hours":174,"approval_perbill":637500001,"support_perbill":4566713,"approval":63.7500001,"support":0.4566713},{"time_hours":175,"approval_perbill":635416668,"support_perbill":4531819,"approval":63.5416668,"support":0.4531819},{"time_hours":176,"approval_perbill":633333335,"support_perbill":4497317,"approval":63.3333335,"support":0.4497317},{"time_hours":177,"approval_perbill":631250001,"support_perbill":4463200,"approval":63.1250001,"support":0.44632},{"time_hours":178,"approval_perbill":629166668,"support_perbill":4429461,"approval":62.9166668,"support":0.4429461},{"time_hours":179,"approval_perbill":627083335,"support_perbill":4396095,"approval":62.7083335,"support":0.4396095},{"time_hours":180,"approval_perbill":625000002,"support_perbill":4363095,"approval":62.5000002,"support":0.4363095},{"time_hours":181,"approval_perbill":622916667,"support_perbill":4330456,"approval":62.2916667,"support":0.4330456},{"time_hours":182,"approval_perbill":620833334,"support_perbill":4298171,"approval":62.0833334,"support":0.4298171},{"time_hours":183,"approval_perbill":618750001,"support_perbill":4266235,"approval":61.8750001,"support":0.4266235},{"time_hours":184,"approval_perbill":616666668,"support_perbill":4234642,"approval":61.6666668,"support":0.4234642},{"time_hours":185,"approval_perbill":614583334,"support_perbill":4203386,"approval":61.4583334,"support":0.4203386},{"time_hours":186,"approval_perbill":612500001,"support_perbill":4172462,"approval":61.2500001,"support":0.4172462},{"time_hours":187,"approval_perbill":610416668,"support_perbill":4141866,"approval":61.0416668,"support":0.4141866},{"time_hours":188,"approval_perbill":608333335,"support_perbill":4111591,"approval":60.8333335,"support":0.4111591},{"time_hours":189,"approval_perbill":606250000,"support_perbill":4081633,"approval":60.625,"support":0.4081633},{"time_hours":190,"approval_perbill":604166667,"support_perbill":4051987,"approval":60.4166667,"support":0.4051987},{"time_hours":191,"approval_perbill":602083334,"support_perbill":4022648,"approval":60.2083334,"support":0.4022648},{"time_hours":192,"approval_perbill":600000001,"support_perbill":3993611,"approval":60.0000001,"support":0.3993611},{"time_hours":193,"approval_perbill":597916668,"support_perbill":3964871,"approval":59.7916668,"support":0.3964871},{"time_hours":194,"approval_perbill":595833334,"support_perbill":3936425,"approval":59.5833334,"support":0.3936425},{"time_hours":195,"approval_perbill":593750001,"support_perbill":3908267,"approval":59.3750001,"support":0.3908267},{"time_hours":196,"approval_perbill":591666668,"support_perbill":3880393,"approval":59.1666668,"support":0.3880393},{"time_hours":197,"approval_perbill":589583335,"support_perbill":3852799,"approval":58.9583335,"support":0.3852799},{"time_hours":198,"approval_perbill":587500001,"support_perbill":3825481,"approval":58.7500001,"support":0.3825481},{"time_hours":199,"approval_perbill":585416668,"support_perbill":3798435,"approval":58.5416668,"support":0.3798435},{"time_hours":200,"approval_perbill":583333335,"support_perbill":3771656,"approval":58.3333335,"support":0.3771656},{"time_hours":201,"approval_perbill":581250002,"support_perbill":3745140,"approval":58.1250002,"support":0.374514},{"time_hours":202,"approval_perbill":579166667,"support_perbill":3718885,"approval":57.9166667,"support":0.3718885},{"time_hours":203,"approval_perbill":577083334,"support_perbill":3692885,"approval":57.7083334,"support":0.3692885},{"time_hours":204,"approval_perbill":575000001,"support_perbill":3667137,"approval":57.5000001,"support":0.3667137},{"time_hours":205,"approval_perbill":572916668,"support_perbill":3641638,"approval":57.2916668,"support":0.3641638},{"time_hours":206,"approval_perbill":570833334,"support_perbill":3616385,"approval":57.0833334,"support":0.3616385},{"time_hours":207,"approval_perbill":568750001,"support_perbill":3591372,"approval":56.8750001,"support":0.3591372},{"time_hours":208,"approval_perbill":566666668,"support_perbill":3566598,"approval":56.6666668,"support":0.3566598},{"time_hours":209,"approval_perbill":564583335,"support_perbill":3542058,"approval":56.4583335,"support":0.3542058},{"time_hours":210,"approval_perbill":562500000,"support_perbill":3517749,"approval":56.25,"support":0.3517749},{"time_hours":211,"approval_perbill":560416667,"support_perbill":3493669,"approval":56.0416667,"support":0.3493669},{"time_hours":212,"approval_perbill":558333334,"support_perbill":3469813,"approval":55.8333334,"support":0.3469813},{"time_hours":213,"approval_perbill":556250001,"support_perbill":3446179,"approval":55.6250001,"support":0.3446179},{"time_hours":214,"approval_perbill":554166668,"support_perbill":3422764,"approval":55.4166668,"support":0.3422764},{"time_hours":215,"approval_perbill":552083334,"support_perbill":3399565,"approval":55.2083334,"support":0.3399565},{"time_hours":216,"approval_perbill":550000001,"support_perbill":3376578,"approval":55.0000001,"support":0.3376578},{"time_hours":217,"approval_perbill":547916668,"support_perbill":3353801,"approval":54.7916668,"support":0.3353801},{"time_hours":218,"approval_perbill":545833335,"support_perbill":3331230,"approval":54.5833335,"support":0.333123},{"time_hours":219,"approval_perbill":543750001,"support_perbill":3308864,"approval":54.3750001,"support":0.3308864},{"time_hours":220,"approval_perbill":541666668,"support_perbill":3286700,"approval":54.1666668,"support":0.32867},{"time_hours":221,"approval_perbill":539583335,"support_perbill":3264733,"approval":53.9583335,"support":0.3264733},{"time_hours":222,"approval_perbill":537500002,"support_perbill":3242963,"approval":53.7500002,"support":0.3242963},{"time_hours":223,"approval_perbill":535416667,"support_perbill":3221386,"approval":53.5416667,"support":0.3221386},{"time_hours":224,"approval_perbill":533333334,"support_perbill":3200001,"approval":53.3333334,"support":0.3200001},{"time_hours":225,"approval_perbill":531250001,"support_perbill":3178803,"approval":53.1250001,"support":0.3178803},{"time_hours":226,"approval_perbill":529166668,"support_perbill":3157791,"approval":52.9166668,"support":0.3157791},{"time_hours":227,"approval_perbill":527083334,"support_perbill":3136962,"approval":52.7083334,"support":0.3136962},{"time_hours":228,"approval_perbill":525000001,"support_perbill":3116315,"approval":52.5000001,"support":0.3116315},{"time_hours":229,"approval_perbill":522916668,"support_perbill":3095846,"approval":52.2916668,"support":0.3095846},{"time_hours":230,"approval_perbill":520833335,"support_perbill":3075553,"approval":52.0833335,"support":0.3075553},{"time_hours":231,"approval_perbill":518750000,"support_perbill":3055435,"approval":51.875,"support":0.3055435},{"time_hours":232,"approval_perbill":516666667,"support_perbill":3035488,"approval":51.6666667,"support":0.3035488},{"time_hours":233,"approval_perbill":514583334,"support_perbill":3015711,"approval":51.4583334,"support":0.3015711},{"time_hours":234,"approval_perbill":512500001,"support_perbill":2996101,"approval":51.2500001,"support":0.2996101},{"time_hours":235,"approval_perbill":510416668,"support_perbill":2976657,"approval":51.0416668,"support":0.2976657},{"time_hours":236,"approval_perbill":508333334,"support_perbill":2957376,"approval":50.8333334,"support":0.2957376},{"time_hours":237,"approval_perbill":506250001,"support_perbill":2938257,"approval":50.6250001,"support":0.2938257},{"time_hours":238,"approval_perbill":504166668,"support_perbill":2919296,"approval":50.4166668,"support":0.2919296},{"time_hours":239,"approval_perbill":502083335,"support_perbill":2900493,"approval":50.2083335,"support":0.2900493},{"time_hours":240,"approval_perbill":500000000,"support_perbill":2881845,"approval":50,"support":0.2881845},{"time_hours":241,"approval_perbill":500000000,"support_perbill":2863350,"approval":50,"support":0.286335},{"time_hours":242,"approval_perbill":500000000,"support_perbill":2845007,"approval":50,"support":0.2845007},{"time_hours":243,"approval_perbill":500000000,"support_perbill":2826814,"approval":50,"support":0.2826814},{"time_hours":244,"approval_perbill":500000000,"support_perbill":2808768,"approval":50,"support":0.2808768},{"time_hours":245,"approval_perbill":500000000,"support_perbill":2790868,"approval":50,"support":0.2790868},{"time_hours":246,"approval_perbill":500000000,"support_perbill":2773113,"approval":50,"support":0.2773113},{"time_hours":247,"approval_perbill":500000000,"support_perbill":2755500,"approval":50,"support":0.27555},{"time_hours":248,"approval_perbill":500000000,"support_perbill":2738028,"approval":50,"support":0.2738028},{"time_hours":249,"approval_perbill":500000000,"support_perbill":2720695,"approval":50,"support":0.2720695},{"time_hours":250,"approval_perbill":500000000,"support_perbill":2703500,"approval":50,"support":0.27035},{"time_hours":251,"approval_perbill":500000000,"support_perbill":2686440,"approval":50,"support":0.268644},{"time_hours":252,"approval_perbill":500000000,"support_perbill":2669515,"approval":50,"support":0.2669515},{"time_hours":253,"approval_perbill":500000000,"support_perbill":2652722,"approval":50,"support":0.2652722},{"time_hours":254,"approval_perbill":500000000,"support_perbill":2636060,"approval":50,"support":0.263606},{"time_hours":255,"approval_perbill":500000000,"support_perbill":2619528,"approval":50,"support":0.2619528},{"time_hours":256,"approval_perbill":500000000,"support_perbill":2603124,"approval":50,"support":0.2603124},{"time_hours":257,"approval_perbill":500000000,"support_perbill":2586847,"approval":50,"support":0.2586847},{"time_hours":258,"approval_perbill":500000000,"support_perbill":2570694,"approval":50,"support":0.2570694},{"time_hours":259,"approval_perbill":500000000,"support_perbill":2554666,"approval":50,"support":0.2554666},{"time_hours":260,"approval_perbill":500000000,"support_perbill":2538760,"approval":50,"support":0.253876},{"time_hours":261,"approval_perbill":500000000,"support_perbill":2522974,"approval":50,"support":0.2522974},{"time_hours":262,"approval_perbill":500000000,"support_perbill":2507308,"approval":50,"support":0.2507308},{"time_hours":263,"approval_perbill":500000000,"support_perbill":2491760,"approval":50,"support":0.249176},{"time_hours":264,"approval_perbill":500000000,"support_perbill":2476330,"approval":50,"support":0.247633},{"time_hours":265,"approval_perbill":500000000,"support_perbill":2461014,"approval":50,"support":0.2461014},{"time_hours":266,"approval_perbill":500000000,"support_perbill":2445813,"approval":50,"support":0.2445813},{"time_hours":267,"approval_perbill":500000000,"support_perbill":2430725,"approval":50,"support":0.2430725},{"time_hours":268,"approval_perbill":500000000,"support_perbill":2415748,"approval":50,"support":0.2415748},{"time_hours":269,"approval_perbill":500000000,"support_perbill":2400882,"approval":50,"support":0.2400882},{"time_hours":270,"approval_perbill":500000000,"support_perbill":2386125,"approval":50,"support":0.2386125},{"time_hours":271,"approval_perbill":500000000,"support_perbill":2371476,"approval":50,"support":0.2371476},{"time_hours":272,"approval_perbill":500000000,"support_perbill":2356934,"approval":50,"support":0.2356934},{"time_hours":273,"approval_perbill":500000000,"support_perbill":2342498,"approval":50,"support":0.2342498},{"time_hours":274,"approval_perbill":500000000,"support_perbill":2328166,"approval":50,"support":0.2328166},{"time_hours":275,"approval_perbill":500000000,"support_perbill":2313938,"approval":50,"support":0.2313938},{"time_hours":276,"approval_perbill":500000000,"support_perbill":2299812,"approval":50,"support":0.2299812},{"time_hours":277,"approval_perbill":500000000,"support_perbill":2285787,"approval":50,"support":0.2285787},{"time_hours":278,"approval_perbill":500000000,"support_perbill":2271863,"approval":50,"support":0.2271863},{"time_hours":279,"approval_perbill":500000000,"support_perbill":2258037,"approval":50,"support":0.2258037},{"time_hours":280,"approval_perbill":500000000,"support_perbill":2244309,"approval":50,"support":0.2244309},{"time_hours":281,"approval_perbill":500000000,"support_perbill":2230679,"approval":50,"support":0.2230679},{"time_hours":282,"approval_perbill":500000000,"support_perbill":2217144,"approval":50,"support":0.2217144},{"time_hours":283,"approval_perbill":500000000,"support_perbill":2203704,"approval":50,"support":0.2203704},{"time_hours":284,"approval_perbill":500000000,"support_perbill":2190358,"approval":50,"support":0.2190358},{"time_hours":285,"approval_perbill":500000000,"support_perbill":2177105,"approval":50,"support":0.2177105},{"time_hours":286,"approval_perbill":500000000,"support_perbill":2163944,"approval":50,"support":0.2163944},{"time_hours":287,"approval_perbill":500000000,"support_perbill":2150874,"approval":50,"support":0.2150874},{"time_hours":288,"approval_perbill":500000000,"support_perbill":2137894,"approval":50,"support":0.2137894},{"time_hours":289,"approval_perbill":500000000,"support_perbill":2125004,"approval":50,"support":0.2125004},{"time_hours":290,"approval_perbill":500000000,"support_perbill":2112201,"approval":50,"support":0.2112201},{"time_hours":291,"approval_perbill":500000000,"support_perbill":2099486,"approval":50,"support":0.2099486},{"time_hours":292,"approval_perbill":500000000,"support_perbill":2086857,"approval":50,"support":0.2086857},{"time_hours":293,"approval_perbill":500000000,"support_perbill":2074314,"approval":50,"support":0.2074314},{"time_hours":294,"approval_perbill":500000000,"support_perbill":2061856,"approval":50,"support":0.2061856},{"time_hours":295,"approval_perbill":500000000,"support_perbill":2049481,"approval":50,"support":0.2049481},{"time_hours":296,"approval_perbill":500000000,"support_perbill":2037190,"approval":50,"support":0.203719},{"time_hours":297,"approval_perbill":500000000,"support_perbill":2024980,"approval":50,"support":0.202498},{"time_hours":298,"approval_perbill":500000000,"support_perbill":2012852,"approval":50,"support":0.2012852},{"time_hours":299,"approval_perbill":500000000,"support_perbill":2000805,"approval":50,"support":0.2000805},{"time_hours":300,"approval_perbill":500000000,"support_perbill":1988837,"approval":50,"support":0.1988837},{"time_hours":301,"approval_perbill":500000000,"support_perbill":1976948,"approval":50,"support":0.1976948},{"time_hours":302,"approval_perbill":500000000,"support_perbill":1965138,"approval":50,"support":0.1965138},{"time_hours":303,"approval_perbill":500000000,"support_perbill":1953404,"approval":50,"support":0.1953404},{"time_hours":304,"approval_perbill":500000000,"support_perbill":1941748,"approval":50,"support":0.1941748},{"time_hours":305,"approval_perbill":500000000,"support_perbill":1930167,"approval":50,"support":0.1930167},{"time_hours":306,"approval_perbill":500000000,"support_perbill":1918662,"approval":50,"support":0.1918662},{"time_hours":307,"approval_perbill":500000000,"support_perbill":1907230,"approval":50,"support":0.190723},{"time_hours":308,"approval_perbill":500000000,"support_perbill":1895873,"approval":50,"support":0.1895873},{"time_hours":309,"approval_perbill":500000000,"support_perbill":1884589,"approval":50,"support":0.1884589},{"time_hours":310,"approval_perbill":500000000,"support_perbill":1873377,"approval":50,"support":0.1873377},{"time_hours":311,"approval_perbill":500000000,"support_perbill":1862236,"approval":50,"support":0.1862236},{"time_hours":312,"approval_perbill":500000000,"support_perbill":1851166,"approval":50,"support":0.1851166},{"time_hours":313,"approval_perbill":500000000,"support_perbill":1840167,"approval":50,"support":0.1840167},{"time_hours":314,"approval_perbill":500000000,"support_perbill":1829237,"approval":50,"support":0.1829237},{"time_hours":315,"approval_perbill":500000000,"support_perbill":1818376,"approval":50,"support":0.1818376},{"time_hours":316,"approval_perbill":500000000,"support_perbill":1807584,"approval":50,"support":0.1807584},{"time_hours":317,"approval_perbill":500000000,"support_perbill":1796859,"approval":50,"support":0.1796859},{"time_hours":318,"approval_perbill":500000000,"support_perbill":1786201,"approval":50,"support":0.1786201},{"time_hours":319,"approval_perbill":500000000,"support_perbill":1775609,"approval":50,"support":0.1775609},{"time_hours":320,"approval_perbill":500000000,"support_perbill":1765084,"approval":50,"support":0.1765084},{"time_hours":321,"approval_perbill":500000000,"support_perbill":1754623,"approval":50,"support":0.1754623},{"time_hours":322,"approval_perbill":500000000,"support_perbill":1744227,"approval":50,"support":0.1744227},{"time_hours":323,"approval_perbill":500000000,"support_perbill":1733895,"approval":50,"support":0.1733895},{"time_hours":324,"approval_perbill":500000000,"support_perbill":1723626,"approval":50,"support":0.1723626},{"time_hours":325,"approval_perbill":500000000,"support_perbill":1713420,"approval":50,"support":0.171342},{"time_hours":326,"approval_perbill":500000000,"support_perbill":1703276,"approval":50,"support":0.1703276},{"time_hours":327,"approval_perbill":500000000,"support_perbill":1693194,"approval":50,"support":0.1693194},{"time_hours":328,"approval_perbill":500000000,"support_perbill":1683172,"approval":50,"support":0.1683172},{"time_hours":329,"approval_perbill":500000000,"support_perbill":1673212,"approval":50,"support":0.1673212},{"time_hours":330,"approval_perbill":500000000,"support_perbill":1663311,"approval":50,"support":0.1663311},{"time_hours":331,"approval_perbill":500000000,"support_perbill":1653470,"approval":50,"support":0.165347},{"time_hours":332,"approval_perbill":500000000,"support_perbill":1643687,"approval":50,"support":0.1643687},{"time_hours":333,"approval_perbill":500000000,"support_perbill":1633963,"approval":50,"support":0.1633963},{"time_hours":334,"approval_perbill":500000000,"support_perbill":1624297,"approval":50,"support":0.1624297},{"time_hours":335,"approval_perbill":500000000,"support_perbill":1614689,"approval":50,"support":0.1614689},{"time_hours":336,"approval_perbill":500000000,"support_perbill":1605137,"approval":50,"support":0.1605137},{"time_hours":337,"approval_perbill":500000000,"support_perbill":1595641,"approval":50,"support":0.1595641},{"time_hours":338,"approval_perbill":500000000,"support_perbill":1586201,"approval":50,"support":0.1586201},{"time_hours":339,"approval_perbill":500000000,"support_perbill":1576817,"approval":50,"support":0.1576817},{"time_hours":340,"approval_perbill":500000000,"support_perbill":1567487,"approval":50,"support":0.1567487},{"time_hours":341,"approval_perbill":500000000,"support_perbill":1558212,"approval":50,"support":0.1558212},{"time_hours":342,"approval_perbill":500000000,"support_perbill":1548990,"approval":50,"support":0.154899},{"time_hours":343,"approval_perbill":500000000,"support_perbill":1539823,"approval":50,"support":0.1539823},{"time_hours":344,"approval_perbill":500000000,"support_perbill":1530708,"approval":50,"support":0.1530708},{"time_hours":345,"approval_perbill":500000000,"support_perbill":1521645,"approval":50,"support":0.1521645},{"time_hours":346,"approval_perbill":500000000,"support_perbill":1512635,"approval":50,"support":0.1512635},{"time_hours":347,"approval_perbill":500000000,"support_perbill":1503676,"approval":50,"support":0.1503676},{"time_hours":348,"approval_perbill":500000000,"support_perbill":1494768,"approval":50,"support":0.1494768},{"time_hours":349,"approval_perbill":500000000,"support_perbill":1485912,"approval":50,"support":0.1485912},{"time_hours":350,"approval_perbill":500000000,"support_perbill":1477105,"approval":50,"support":0.1477105},{"time_hours":351,"approval_perbill":500000000,"support_perbill":1468348,"approval":50,"support":0.1468348},{"time_hours":352,"approval_perbill":500000000,"support_perbill":1459641,"approval":50,"support":0.1459641},{"time_hours":353,"approval_perbill":500000000,"support_perbill":1450983,"approval":50,"support":0.1450983},{"time_hours":354,"approval_perbill":500000000,"support_perbill":1442373,"approval":50,"support":0.1442373},{"time_hours":355,"approval_perbill":500000000,"support_perbill":1433812,"approval":50,"support":0.1433812},{"time_hours":356,"approval_perbill":500000000,"support_perbill":1425298,"approval":50,"support":0.1425298},{"time_hours":357,"approval_perbill":500000000,"support_perbill":1416832,"approval":50,"support":0.1416832},{"time_hours":358,"approval_perbill":500000000,"support_perbill":1408413,"approval":50,"support":0.1408413},{"time_hours":359,"approval_perbill":500000000,"support_perbill":1400040,"approval":50,"support":0.140004},{"time_hours":360,"approval_perbill":500000000,"support_perbill":1391714,"approval":50,"support":0.1391714},{"time_hours":361,"approval_perbill":500000000,"support_perbill":1383434,"approval":50,"support":0.1383434},{"time_hours":362,"approval_perbill":500000000,"support_perbill":1375199,"approval":50,"support":0.1375199},{"time_hours":363,"approval_perbill":500000000,"support_perbill":1367009,"approval":50,"support":0.1367009},{"time_hours":364,"approval_perbill":500000000,"support_perbill":1358864,"approval":50,"support":0.1358864},{"time_hours":365,"approval_perbill":500000000,"support_perbill":1350763,"approval":50,"support":0.1350763},{"time_hours":366,"approval_perbill":500000000,"support_perbill":1342706,"approval":50,"support":0.1342706},{"time_hours":367,"approval_perbill":500000000,"support_perbill":1334693,"approval":50,"support":0.1334693},{"time_hours":368,"approval_perbill":500000000,"support_perbill":1326723,"approval":50,"support":0.1326723},{"time_hours":369,"approval_perbill":500000000,"support_perbill":1318796,"approval":50,"support":0.1318796},{"time_hours":370,"approval_perbill":500000000,"support_perbill":1310912,"approval":50,"support":0.1310912},{"time_hours":371,"approval_perbill":500000000,"support_perbill":1303070,"approval":50,"support":0.130307},{"time_hours":372,"approval_perbill":500000000,"support_perbill":1295270,"approval":50,"support":0.129527},{"time_hours":373,"approval_perbill":500000000,"support_perbill":1287511,"approval":50,"support":0.1287511},{"time_hours":374,"approval_perbill":500000000,"support_perbill":1279794,"approval":50,"support":0.1279794},{"time_hours":375,"approval_perbill":500000000,"support_perbill":1272118,"approval":50,"support":0.1272118},{"time_hours":376,"approval_perbill":500000000,"support_perbill":1264482,"approval":50,"support":0.1264482},{"time_hours":377,"approval_perbill":500000000,"support_perbill":1256886,"approval":50,"support":0.1256886},{"time_hours":378,"approval_perbill":500000000,"support_perbill":1249331,"approval":50,"support":0.1249331},{"time_hours":379,"approval_perbill":500000000,"support_perbill":1241815,"approval":50,"support":0.1241815},{"time_hours":380,"approval_perbill":500000000,"support_perbill":1234338,"approval":50,"support":0.1234338},{"time_hours":381,"approval_perbill":500000000,"support_perbill":1226901,"approval":50,"support":0.1226901},{"time_hours":382,"approval_perbill":500000000,"support_perbill":1219502,"approval":50,"support":0.1219502},{"time_hours":383,"approval_perbill":500000000,"support_perbill":1212142,"approval":50,"support":0.1212142},{"time_hours":384,"approval_perbill":500000000,"support_perbill":1204819,"approval":50,"support":0.1204819},{"time_hours":385,"approval_perbill":500000000,"support_perbill":1197535,"approval":50,"support":0.1197535},{"time_hours":386,"approval_perbill":500000000,"support_perbill":1190288,"approval":50,"support":0.1190288},{"time_hours":387,"approval_perbill":500000000,"support_perbill":1183078,"approval":50,"support":0.1183078},{"time_hours":388,"approval_perbill":500000000,"support_perbill":1175906,"approval":50,"support":0.1175906},{"time_hours":389,"approval_perbill":500000000,"support_perbill":1168770,"approval":50,"support":0.116877},{"time_hours":390,"approval_perbill":500000000,"support_perbill":1161670,"approval":50,"support":0.116167},{"time_hours":391,"approval_perbill":500000000,"support_perbill":1154606,"approval":50,"support":0.1154606},{"time_hours":392,"approval_perbill":500000000,"support_perbill":1147579,"approval":50,"support":0.1147579},{"time_hours":393,"approval_perbill":500000000,"support_perbill":1140587,"approval":50,"support":0.1140587},{"time_hours":394,"approval_perbill":500000000,"support_perbill":1133630,"approval":50,"support":0.113363},{"time_hours":395,"approval_perbill":500000000,"support_perbill":1126708,"approval":50,"support":0.1126708},{"time_hours":396,"approval_perbill":500000000,"support_perbill":1119821,"approval":50,"support":0.1119821},{"time_hours":397,"approval_perbill":500000000,"support_perbill":1112968,"approval":50,"support":0.1112968},{"time_hours":398,"approval_perbill":500000000,"support_perbill":1106150,"approval":50,"support":0.110615},{"time_hours":399,"approval_perbill":500000000,"support_perbill":1099366,"approval":50,"support":0.1099366},{"time_hours":400,"approval_perbill":500000000,"support_perbill":1092615,"approval":50,"support":0.1092615},{"time_hours":401,"approval_perbill":500000000,"support_perbill":1085898,"approval":50,"support":0.1085898},{"time_hours":402,"approval_perbill":500000000,"support_perbill":1079214,"approval":50,"support":0.1079214},{"time_hours":403,"approval_perbill":500000000,"support_perbill":1072564,"approval":50,"support":0.1072564},{"time_hours":404,"approval_perbill":500000000,"support_perbill":1065945,"approval":50,"support":0.1065945},{"time_hours":405,"approval_perbill":500000000,"support_perbill":1059360,"approval":50,"support":0.105936},{"time_hours":406,"approval_perbill":500000000,"support_perbill":1052807,"approval":50,"support":0.1052807},{"time_hours":407,"approval_perbill":500000000,"support_perbill":1046285,"approval":50,"support":0.1046285},{"time_hours":408,"approval_perbill":500000000,"support_perbill":1039796,"approval":50,"support":0.1039796},{"time_hours":409,"approval_perbill":500000000,"support_perbill":1033338,"approval":50,"support":0.1033338},{"time_hours":410,"approval_perbill":500000000,"support_perbill":1026911,"approval":50,"support":0.1026911},{"time_hours":411,"approval_perbill":500000000,"support_perbill":1020516,"approval":50,"support":0.1020516},{"time_hours":412,"approval_perbill":500000000,"support_perbill":1014151,"approval":50,"support":0.1014151},{"time_hours":413,"approval_perbill":500000000,"support_perbill":1007817,"approval":50,"support":0.1007817},{"time_hours":414,"approval_perbill":500000000,"support_perbill":1001514,"approval":50,"support":0.1001514},{"time_hours":415,"approval_perbill":500000000,"support_perbill":995241,"approval":50,"support":0.0995241},{"time_hours":416,"approval_perbill":500000000,"support_perbill":988997,"approval":50,"support":0.0988997},{"time_hours":417,"approval_perbill":500000000,"support_perbill":982784,"approval":50,"support":0.0982784},{"time_hours":418,"approval_perbill":500000000,"support_perbill":976600,"approval":50,"support":0.09766},{"time_hours":419,"approval_perbill":500000000,"support_perbill":970446,"approval":50,"support":0.0970446},{"time_hours":420,"approval_perbill":500000000,"support_perbill":964320,"approval":50,"support":0.096432},{"time_hours":421,"approval_perbill":500000000,"support_perbill":958224,"approval":50,"support":0.0958224},{"time_hours":422,"approval_perbill":500000000,"support_perbill":952156,"approval":50,"support":0.0952156},{"time_hours":423,"approval_perbill":500000000,"support_perbill":946117,"approval":50,"support":0.0946117},{"time_hours":424,"approval_perbill":500000000,"support_perbill":940106,"approval":50,"support":0.0940106},{"time_hours":425,"approval_perbill":500000000,"support_perbill":934123,"approval":50,"support":0.0934123},{"time_hours":426,"approval_perbill":500000000,"support_perbill":928169,"approval":50,"support":0.0928169},{"time_hours":427,"approval_perbill":500000000,"support_perbill":922242,"approval":50,"support":0.0922242},{"time_hours":428,"approval_perbill":500000000,"support_perbill":916342,"approval":50,"support":0.0916342},{"time_hours":429,"approval_perbill":500000000,"support_perbill":910470,"approval":50,"support":0.091047},{"time_hours":430,"approval_perbill":500000000,"support_perbill":904626,"approval":50,"support":0.0904626},{"time_hours":431,"approval_perbill":500000000,"support_perbill":898808,"approval":50,"support":0.0898808},{"time_hours":432,"approval_perbill":500000000,"support_perbill":893017,"approval":50,"support":0.0893017},{"time_hours":433,"approval_perbill":500000000,"support_perbill":887252,"approval":50,"support":0.0887252},{"time_hours":434,"approval_perbill":500000000,"support_perbill":881514,"approval":50,"support":0.0881514},{"time_hours":435,"approval_perbill":500000000,"support_perbill":875802,"approval":50,"support":0.0875802},{"time_hours":436,"approval_perbill":500000000,"support_perbill":870117,"approval":50,"support":0.0870117},{"time_hours":437,"approval_perbill":500000000,"support_perbill":864457,"approval":50,"support":0.0864457},{"time_hours":438,"approval_perbill":500000000,"support_perbill":858823,"approval":50,"support":0.0858823},{"time_hours":439,"approval_perbill":500000000,"support_perbill":853214,"approval":50,"support":0.0853214},{"time_hours":440,"approval_perbill":500000000,"support_perbill":847631,"approval":50,"support":0.0847631},{"time_hours":441,"approval_perbill":500000000,"support_perbill":842073,"approval":50,"support":0.0842073},{"time_hours":442,"approval_perbill":500000000,"support_perbill":836540,"approval":50,"support":0.083654},{"time_hours":443,"approval_perbill":500000000,"support_perbill":831032,"approval":50,"support":0.0831032},{"time_hours":444,"approval_perbill":500000000,"support_perbill":825549,"approval":50,"support":0.0825549},{"time_hours":445,"approval_perbill":500000000,"support_perbill":820090,"approval":50,"support":0.082009},{"time_hours":446,"approval_perbill":500000000,"support_perbill":814655,"approval":50,"support":0.0814655},{"time_hours":447,"approval_perbill":500000000,"support_perbill":809245,"approval":50,"support":0.0809245},{"time_hours":448,"approval_perbill":500000000,"support_perbill":803858,"approval":50,"support":0.0803858},{"time_hours":449,"approval_perbill":500000000,"support_perbill":798496,"approval":50,"support":0.0798496},{"time_hours":450,"approval_perbill":500000000,"support_perbill":793157,"approval":50,"support":0.0793157},{"time_hours":451,"approval_perbill":500000000,"support_perbill":787842,"approval":50,"support":0.0787842},{"time_hours":452,"approval_perbill":500000000,"support_perbill":782550,"approval":50,"support":0.078255},{"time_hours":453,"approval_perbill":500000000,"support_perbill":777282,"approval":50,"support":0.0777282},{"time_hours":454,"approval_perbill":500000000,"support_perbill":772037,"approval":50,"support":0.0772037},{"time_hours":455,"approval_perbill":500000000,"support_perbill":766814,"approval":50,"support":0.0766814},{"time_hours":456,"approval_perbill":500000000,"support_perbill":761615,"approval":50,"support":0.0761615},{"time_hours":457,"approval_perbill":500000000,"support_perbill":756438,"approval":50,"support":0.0756438},{"time_hours":458,"approval_perbill":500000000,"support_perbill":751283,"approval":50,"support":0.0751283},{"time_hours":459,"approval_perbill":500000000,"support_perbill":746151,"approval":50,"support":0.0746151},{"time_hours":460,"approval_perbill":500000000,"support_perbill":741041,"approval":50,"support":0.0741041},{"time_hours":461,"approval_perbill":500000000,"support_perbill":735953,"approval":50,"support":0.0735953},{"time_hours":462,"approval_perbill":500000000,"support_perbill":730887,"approval":50,"support":0.0730887},{"time_hours":463,"approval_perbill":500000000,"support_perbill":725843,"approval":50,"support":0.0725843},{"time_hours":464,"approval_perbill":500000000,"support_perbill":720821,"approval":50,"support":0.0720821},{"time_hours":465,"approval_perbill":500000000,"support_perbill":715820,"approval":50,"support":0.071582},{"time_hours":466,"approval_perbill":500000000,"support_perbill":710840,"approval":50,"support":0.071084},{"time_hours":467,"approval_perbill":500000000,"support_perbill":705881,"approval":50,"support":0.0705881},{"time_hours":468,"approval_perbill":500000000,"support_perbill":700944,"approval":50,"support":0.0700944},{"time_hours":469,"approval_perbill":500000000,"support_perbill":696028,"approval":50,"support":0.0696028},{"time_hours":470,"approval_perbill":500000000,"support_perbill":691132,"approval":50,"support":0.0691132},{"time_hours":471,"approval_perbill":500000000,"support_perbill":686257,"approval":50,"support":0.0686257},{"time_hours":472,"approval_perbill":500000000,"support_perbill":681403,"approval":50,"support":0.0681403},{"time_hours":473,"approval_perbill":500000000,"support_perbill":676569,"approval":50,"support":0.0676569},{"time_hours":474,"approval_perbill":500000000,"support_perbill":671756,"approval":50,"support":0.0671756},{"time_hours":475,"approval_perbill":500000000,"support_perbill":666962,"approval":50,"support":0.0666962},{"time_hours":476,"approval_perbill":500000000,"support_perbill":662189,"approval":50,"support":0.0662189},{"time_hours":477,"approval_perbill":500000000,"support_perbill":657436,"approval":50,"support":0.0657436},{"time_hours":478,"approval_perbill":500000000,"support_perbill":652702,"approval":50,"support":0.0652702},{"time_hours":479,"approval_perbill":500000000,"support_perbill":647988,"approval":50,"support":0.0647988},{"time_hours":480,"approval_perbill":500000000,"support_perbill":643294,"approval":50,"support":0.0643294},{"time_hours":481,"approval_perbill":500000000,"support_perbill":638619,"approval":50,"support":0.0638619},{"time_hours":482,"approval_perbill":500000000,"support_perbill":633963,"approval":50,"support":0.0633963},{"time_hours":483,"approval_perbill":500000000,"support_perbill":629327,"approval":50,"support":0.0629327},{"time_hours":484,"approval_perbill":500000000,"support_perbill":624709,"approval":50,"support":0.0624709},{"time_hours":485,"approval_perbill":500000000,"support_perbill":620111,"approval":50,"support":0.0620111},{"time_hours":486,"approval_perbill":500000000,"support_perbill":615531,"approval":50,"support":0.0615531},{"time_hours":487,"approval_perbill":500000000,"support_perbill":610970,"approval":50,"support":0.061097},{"time_hours":488,"approval_perbill":500000000,"support_perbill":606428,"approval":50,"support":0.0606428},{"time_hours":489,"approval_perbill":500000000,"support_perbill":601904,"approval":50,"support":0.0601904},{"time_hours":490,"approval_perbill":500000000,"support_perbill":597399,"approval":50,"support":0.0597399},{"time_hours":491,"approval_perbill":500000000,"support_perbill":592912,"approval":50,"support":0.0592912},{"time_hours":492,"approval_perbill":500000000,"support_perbill":588443,"approval":50,"support":0.0588443},{"time_hours":493,"approval_perbill":500000000,"support_perbill":583992,"approval":50,"support":0.0583992},{"time_hours":494,"approval_perbill":500000000,"support_perbill":579559,"approval":50,"support":0.0579559},{"time_hours":495,"approval_perbill":500000000,"support_perbill":575144,"approval":50,"support":0.0575144},{"time_hours":496,"approval_perbill":500000000,"support_perbill":570747,"approval":50,"support":0.0570747},{"time_hours":497,"approval_perbill":500000000,"support_perbill":566367,"approval":50,"support":0.0566367},{"time_hours":498,"approval_perbill":500000000,"support_perbill":562005,"approval":50,"support":0.0562005},{"time_hours":499,"approval_perbill":500000000,"support_perbill":557660,"approval":50,"support":0.055766},{"time_hours":500,"approval_perbill":500000000,"support_perbill":553332,"approval":50,"support":0.0553332},{"time_hours":501,"approval_perbill":500000000,"support_perbill":549022,"approval":50,"support":0.0549022},{"time_hours":502,"approval_perbill":500000000,"support_perbill":544729,"approval":50,"support":0.0544729},{"time_hours":503,"approval_perbill":500000000,"support_perbill":540452,"approval":50,"support":0.0540452},{"time_hours":504,"approval_perbill":500000000,"support_perbill":536193,"approval":50,"support":0.0536193},{"time_hours":505,"approval_perbill":500000000,"support_perbill":531950,"approval":50,"support":0.053195},{"time_hours":506,"approval_perbill":500000000,"support_perbill":527725,"approval":50,"support":0.0527725},{"time_hours":507,"approval_perbill":500000000,"support_perbill":523515,"approval":50,"support":0.0523515},{"time_hours":508,"approval_perbill":500000000,"support_perbill":519322,"approval":50,"support":0.0519322},{"time_hours":509,"approval_perbill":500000000,"support_perbill":515146,"approval":50,"support":0.0515146},{"time_hours":510,"approval_perbill":500000000,"support_perbill":510986,"approval":50,"support":0.0510986},{"time_hours":511,"approval_perbill":500000000,"support_perbill":506842,"approval":50,"support":0.0506842},{"time_hours":512,"approval_perbill":500000000,"support_perbill":502715,"approval":50,"support":0.0502715},{"time_hours":513,"approval_perbill":500000000,"support_perbill":498603,"approval":50,"support":0.0498603},{"time_hours":514,"approval_perbill":500000000,"support_perbill":494507,"approval":50,"support":0.0494507},{"time_hours":515,"approval_perbill":500000000,"support_perbill":490427,"approval":50,"support":0.0490427},{"time_hours":516,"approval_perbill":500000000,"support_perbill":486363,"approval":50,"support":0.0486363},{"time_hours":517,"approval_perbill":500000000,"support_perbill":482314,"approval":50,"support":0.0482314},{"time_hours":518,"approval_perbill":500000000,"support_perbill":478282,"approval":50,"support":0.0478282},{"time_hours":519,"approval_perbill":500000000,"support_perbill":474264,"approval":50,"support":0.0474264},{"time_hours":520,"approval_perbill":500000000,"support_perbill":470262,"approval":50,"support":0.0470262},{"time_hours":521,"approval_perbill":500000000,"support_perbill":466275,"approval":50,"support":0.0466275},{"time_hours":522,"approval_perbill":500000000,"support_perbill":462304,"approval":50,"support":0.0462304},{"time_hours":523,"approval_perbill":500000000,"support_perbill":458347,"approval":50,"support":0.0458347},{"time_hours":524,"approval_perbill":500000000,"support_perbill":454406,"approval":50,"support":0.0454406},{"time_hours":525,"approval_perbill":500000000,"support_perbill":450479,"approval":50,"support":0.0450479},{"time_hours":526,"approval_perbill":500000000,"support_perbill":446568,"approval":50,"support":0.0446568},{"time_hours":527,"approval_perbill":500000000,"support_perbill":442671,"approval":50,"support":0.0442671},{"time_hours":528,"approval_perbill":500000000,"support_perbill":438789,"approval":50,"support":0.0438789},{"time_hours":529,"approval_perbill":500000000,"support_perbill":434921,"approval":50,"support":0.0434921},{"time_hours":530,"approval_perbill":500000000,"support_perbill":431068,"approval":50,"support":0.0431068},{"time_hours":531,"approval_perbill":500000000,"support_perbill":427230,"approval":50,"support":0.042723},{"time_hours":532,"approval_perbill":500000000,"support_perbill":423406,"approval":50,"support":0.0423406},{"time_hours":533,"approval_perbill":500000000,"support_perbill":419596,"approval":50,"support":0.0419596},{"time_hours":534,"approval_perbill":500000000,"support_perbill":415800,"approval":50,"support":0.04158},{"time_hours":535,"approval_perbill":500000000,"support_perbill":412019,"approval":50,"support":0.0412019},{"time_hours":536,"approval_perbill":500000000,"support_perbill":408251,"approval":50,"support":0.0408251},{"time_hours":537,"approval_perbill":500000000,"support_perbill":404498,"approval":50,"support":0.0404498},{"time_hours":538,"approval_perbill":500000000,"support_perbill":400758,"approval":50,"support":0.0400758},{"time_hours":539,"approval_perbill":500000000,"support_perbill":397033,"approval":50,"support":0.0397033},{"time_hours":540,"approval_perbill":500000000,"support_perbill":393321,"approval":50,"support":0.0393321},{"time_hours":541,"approval_perbill":500000000,"support_perbill":389622,"approval":50,"support":0.0389622},{"time_hours":542,"approval_perbill":500000000,"support_perbill":385937,"approval":50,"support":0.0385937},{"time_hours":543,"approval_perbill":500000000,"support_perbill":382266,"approval":50,"support":0.0382266},{"time_hours":544,"approval_perbill":500000000,"support_perbill":378608,"approval":50,"support":0.0378608},{"time_hours":545,"approval_perbill":500000000,"support_perbill":374964,"approval":50,"support":0.0374964},{"time_hours":546,"approval_perbill":500000000,"support_perbill":371333,"approval":50,"support":0.0371333},{"time_hours":547,"approval_perbill":500000000,"support_perbill":367715,"approval":50,"support":0.0367715},{"time_hours":548,"approval_perbill":500000000,"support_perbill":364110,"approval":50,"support":0.036411},{"time_hours":549,"approval_perbill":500000000,"support_perbill":360519,"approval":50,"support":0.0360519},{"time_hours":550,"approval_perbill":500000000,"support_perbill":356940,"approval":50,"support":0.035694},{"time_hours":551,"approval_perbill":500000000,"support_perbill":353374,"approval":50,"support":0.0353374},{"time_hours":552,"approval_perbill":500000000,"support_perbill":349821,"approval":50,"support":0.0349821},{"time_hours":553,"approval_perbill":500000000,"support_perbill":346281,"approval":50,"support":0.0346281},{"time_hours":554,"approval_perbill":500000000,"support_perbill":342754,"approval":50,"support":0.0342754},{"time_hours":555,"approval_perbill":500000000,"support_perbill":339239,"approval":50,"support":0.0339239},{"time_hours":556,"approval_perbill":500000000,"support_perbill":335737,"approval":50,"support":0.0335737},{"time_hours":557,"approval_perbill":500000000,"support_perbill":332248,"approval":50,"support":0.0332248},{"time_hours":558,"approval_perbill":500000000,"support_perbill":328771,"approval":50,"support":0.0328771},{"time_hours":559,"approval_perbill":500000000,"support_perbill":325306,"approval":50,"support":0.0325306},{"time_hours":560,"approval_perbill":500000000,"support_perbill":321854,"approval":50,"support":0.0321854},{"time_hours":561,"approval_perbill":500000000,"support_perbill":318414,"approval":50,"support":0.0318414},{"time_hours":562,"approval_perbill":500000000,"support_perbill":314986,"approval":50,"support":0.0314986},{"time_hours":563,"approval_perbill":500000000,"support_perbill":311570,"approval":50,"support":0.031157},{"time_hours":564,"approval_perbill":500000000,"support_perbill":308166,"approval":50,"support":0.0308166},{"time_hours":565,"approval_perbill":500000000,"support_perbill":304775,"approval":50,"support":0.0304775},{"time_hours":566,"approval_perbill":500000000,"support_perbill":301395,"approval":50,"support":0.0301395},{"time_hours":567,"approval_perbill":500000000,"support_perbill":298027,"approval":50,"support":0.0298027},{"time_hours":568,"approval_perbill":500000000,"support_perbill":294671,"approval":50,"support":0.0294671},{"time_hours":569,"approval_perbill":500000000,"support_perbill":291326,"approval":50,"support":0.0291326},{"time_hours":570,"approval_perbill":500000000,"support_perbill":287994,"approval":50,"support":0.0287994},{"time_hours":571,"approval_perbill":500000000,"support_perbill":284673,"approval":50,"support":0.0284673},{"time_hours":572,"approval_perbill":500000000,"support_perbill":281363,"approval":50,"support":0.0281363},{"time_hours":573,"approval_perbill":500000000,"support_perbill":278066,"approval":50,"support":0.0278066},{"time_hours":574,"approval_perbill":500000000,"support_perbill":274779,"approval":50,"support":0.0274779},{"time_hours":575,"approval_perbill":500000000,"support_perbill":271504,"approval":50,"support":0.0271504},{"time_hours":576,"approval_perbill":500000000,"support_perbill":268240,"approval":50,"support":0.026824},{"time_hours":577,"approval_perbill":500000000,"support_perbill":264988,"approval":50,"support":0.0264988},{"time_hours":578,"approval_perbill":500000000,"support_perbill":261746,"approval":50,"support":0.0261746},{"time_hours":579,"approval_perbill":500000000,"support_perbill":258516,"approval":50,"support":0.0258516},{"time_hours":580,"approval_perbill":500000000,"support_perbill":255297,"approval":50,"support":0.0255297},{"time_hours":581,"approval_perbill":500000000,"support_perbill":252089,"approval":50,"support":0.0252089},{"time_hours":582,"approval_perbill":500000000,"support_perbill":248892,"approval":50,"support":0.0248892},{"time_hours":583,"approval_perbill":500000000,"support_perbill":245706,"approval":50,"support":0.0245706},{"time_hours":584,"approval_perbill":500000000,"support_perbill":242531,"approval":50,"support":0.0242531},{"time_hours":585,"approval_perbill":500000000,"support_perbill":239367,"approval":50,"support":0.0239367},{"time_hours":586,"approval_perbill":500000000,"support_perbill":236213,"approval":50,"support":0.0236213},{"time_hours":587,"approval_perbill":500000000,"support_perbill":233070,"approval":50,"support":0.023307},{"time_hours":588,"approval_perbill":500000000,"support_perbill":229938,"approval":50,"support":0.0229938},{"time_hours":589,"approval_perbill":500000000,"support_perbill":226816,"approval":50,"support":0.0226816},{"time_hours":590,"approval_perbill":500000000,"support_perbill":223705,"approval":50,"support":0.0223705},{"time_hours":591,"approval_perbill":500000000,"support_perbill":220604,"approval":50,"support":0.0220604},{"time_hours":592,"approval_perbill":500000000,"support_perbill":217514,"approval":50,"support":0.0217514},{"time_hours":593,"approval_perbill":500000000,"support_perbill":214434,"approval":50,"support":0.0214434},{"time_hours":594,"approval_perbill":500000000,"support_perbill":211365,"approval":50,"support":0.0211365},{"time_hours":595,"approval_perbill":500000000,"support_perbill":208306,"approval":50,"support":0.0208306},{"time_hours":596,"approval_perbill":500000000,"support_perbill":205257,"approval":50,"support":0.0205257},{"time_hours":597,"approval_perbill":500000000,"support_perbill":202218,"approval":50,"support":0.0202218},{"time_hours":598,"approval_perbill":500000000,"support_perbill":199189,"approval":50,"support":0.0199189},{"time_hours":599,"approval_perbill":500000000,"support_perbill":196170,"approval":50,"support":0.019617},{"time_hours":600,"approval_perbill":500000000,"support_perbill":193162,"approval":50,"support":0.0193162},{"time_hours":601,"approval_perbill":500000000,"support_perbill":190163,"approval":50,"support":0.0190163},{"time_hours":602,"approval_perbill":500000000,"support_perbill":187175,"approval":50,"support":0.0187175},{"time_hours":603,"approval_perbill":500000000,"support_perbill":184196,"approval":50,"support":0.0184196},{"time_hours":604,"approval_perbill":500000000,"support_perbill":181227,"approval":50,"support":0.0181227},{"time_hours":605,"approval_perbill":500000000,"support_perbill":178268,"approval":50,"support":0.0178268},{"time_hours":606,"approval_perbill":500000000,"support_perbill":175318,"approval":50,"support":0.0175318},{"time_hours":607,"approval_perbill":500000000,"support_perbill":172378,"approval":50,"support":0.0172378},{"time_hours":608,"approval_perbill":500000000,"support_perbill":169448,"approval":50,"support":0.0169448},{"time_hours":609,"approval_perbill":500000000,"support_perbill":166528,"approval":50,"support":0.0166528},{"time_hours":610,"approval_perbill":500000000,"support_perbill":163617,"approval":50,"support":0.0163617},{"time_hours":611,"approval_perbill":500000000,"support_perbill":160715,"approval":50,"support":0.0160715},{"time_hours":612,"approval_perbill":500000000,"support_perbill":157823,"approval":50,"support":0.0157823},{"time_hours":613,"approval_perbill":500000000,"support_perbill":154940,"approval":50,"support":0.015494},{"time_hours":614,"approval_perbill":500000000,"support_perbill":152067,"approval":50,"support":0.0152067},{"time_hours":615,"approval_perbill":500000000,"support_perbill":149203,"approval":50,"support":0.0149203},{"time_hours":616,"approval_perbill":500000000,"support_perbill":146348,"approval":50,"support":0.0146348},{"time_hours":617,"approval_perbill":500000000,"support_perbill":143503,"approval":50,"support":0.0143503},{"time_hours":618,"approval_perbill":500000000,"support_perbill":140667,"approval":50,"support":0.0140667},{"time_hours":619,"approval_perbill":500000000,"support_perbill":137839,"approval":50,"support":0.0137839},{"time_hours":620,"approval_perbill":500000000,"support_perbill":135021,"approval":50,"support":0.0135021},{"time_hours":621,"approval_perbill":500000000,"support_perbill":132212,"approval":50,"support":0.0132212},{"time_hours":622,"approval_perbill":500000000,"support_perbill":129412,"approval":50,"support":0.0129412},{"time_hours":623,"approval_perbill":500000000,"support_perbill":126621,"approval":50,"support":0.0126621},{"time_hours":624,"approval_perbill":500000000,"support_perbill":123839,"approval":50,"support":0.0123839},{"time_hours":625,"approval_perbill":500000000,"support_perbill":121065,"approval":50,"support":0.0121065},{"time_hours":626,"approval_perbill":500000000,"support_perbill":118301,"approval":50,"support":0.0118301},{"time_hours":627,"approval_perbill":500000000,"support_perbill":115545,"approval":50,"support":0.0115545},{"time_hours":628,"approval_perbill":500000000,"support_perbill":112798,"approval":50,"support":0.0112798},{"time_hours":629,"approval_perbill":500000000,"support_perbill":110060,"approval":50,"support":0.011006},{"time_hours":630,"approval_perbill":500000000,"support_perbill":107330,"approval":50,"support":0.010733},{"time_hours":631,"approval_perbill":500000000,"support_perbill":104610,"approval":50,"support":0.010461},{"time_hours":632,"approval_perbill":500000000,"support_perbill":101897,"approval":50,"support":0.0101897},{"time_hours":633,"approval_perbill":500000000,"support_perbill":99193,"approval":50,"support":0.0099193},{"time_hours":634,"approval_perbill":500000000,"support_perbill":96498,"approval":50,"support":0.0096498},{"time_hours":635,"approval_perbill":500000000,"support_perbill":93811,"approval":50,"support":0.0093811},{"time_hours":636,"approval_perbill":500000000,"support_perbill":91133,"approval":50,"support":0.0091133},{"time_hours":637,"approval_perbill":500000000,"support_perbill":88462,"approval":50,"support":0.0088462},{"time_hours":638,"approval_perbill":500000000,"support_perbill":85801,"approval":50,"support":0.0085801},{"time_hours":639,"approval_perbill":500000000,"support_perbill":83147,"approval":50,"support":0.0083147},{"time_hours":640,"approval_perbill":500000000,"support_perbill":80502,"approval":50,"support":0.0080502},{"time_hours":641,"approval_perbill":500000000,"support_perbill":77865,"approval":50,"support":0.0077865},{"time_hours":642,"approval_perbill":500000000,"support_perbill":75236,"approval":50,"support":0.0075236},{"time_hours":643,"approval_perbill":500000000,"support_perbill":72616,"approval":50,"support":0.0072616},{"time_hours":644,"approval_perbill":500000000,"support_perbill":70003,"approval":50,"support":0.0070003},{"time_hours":645,"approval_perbill":500000000,"support_perbill":67399,"approval":50,"support":0.0067399},{"time_hours":646,"approval_perbill":500000000,"support_perbill":64802,"approval":50,"support":0.0064802},{"time_hours":647,"approval_perbill":500000000,"support_perbill":62214,"approval":50,"support":0.0062214},{"time_hours":648,"approval_perbill":500000000,"support_perbill":59634,"approval":50,"support":0.0059634},{"time_hours":649,"approval_perbill":500000000,"support_perbill":57061,"approval":50,"support":0.0057061},{"time_hours":650,"approval_perbill":500000000,"support_perbill":54496,"approval":50,"support":0.0054496},{"time_hours":651,"approval_perbill":500000000,"support_perbill":51940,"approval":50,"support":0.005194},{"time_hours":652,"approval_perbill":500000000,"support_perbill":49391,"approval":50,"support":0.0049391},{"time_hours":653,"approval_perbill":500000000,"support_perbill":46850,"approval":50,"support":0.004685},{"time_hours":654,"approval_perbill":500000000,"support_perbill":44316,"approval":50,"support":0.0044316},{"time_hours":655,"approval_perbill":500000000,"support_perbill":41790,"approval":50,"support":0.004179},{"time_hours":656,"approval_perbill":500000000,"support_perbill":39272,"approval":50,"support":0.0039272},{"time_hours":657,"approval_perbill":500000000,"support_perbill":36762,"approval":50,"support":0.0036762},{"time_hours":658,"approval_perbill":500000000,"support_perbill":34259,"approval":50,"support":0.0034259},{"time_hours":659,"approval_perbill":500000000,"support_perbill":31764,"approval":50,"support":0.0031764},{"time_hours":660,"approval_perbill":500000000,"support_perbill":29276,"approval":50,"support":0.0029276},{"time_hours":661,"approval_perbill":500000000,"support_perbill":26796,"approval":50,"support":0.0026796},{"time_hours":662,"approval_perbill":500000000,"support_perbill":24323,"approval":50,"support":0.0024323},{"time_hours":663,"approval_perbill":500000000,"support_perbill":21858,"approval":50,"support":0.0021858},{"time_hours":664,"approval_perbill":500000000,"support_perbill":19400,"approval":50,"support":0.00194},{"time_hours":665,"approval_perbill":500000000,"support_perbill":16950,"approval":50,"support":0.001695},{"time_hours":666,"approval_perbill":500000000,"support_perbill":14507,"approval":50,"support":0.0014507},{"time_hours":667,"approval_perbill":500000000,"support_perbill":12071,"approval":50,"support":0.0012071},{"time_hours":668,"approval_perbill":500000000,"support_perbill":9642,"approval":50,"support":0.0009642},{"time_hours":669,"approval_perbill":500000000,"support_perbill":7221,"approval":50,"support":0.0007221},{"time_hours":670,"approval_perbill":500000000,"support_perbill":4807,"approval":50,"support":0.0004807},{"time_hours":671,"approval_perbill":500000000,"support_perbill":2400,"approval":50,"support":0.00024},{"time_hours":672,"approval_perbill":500000000,"support_perbill":0,"approval":50,"support":0}]')},16234:p=>{"use strict";p.exports=JSON.parse('[{"time_hours":0,"approval_perbill":1000000000,"support_perbill":500000000,"approval":100,"support":50},{"time_hours":1,"approval_perbill":997037038,"support_perbill":499255953,"approval":99.7037038,"support":49.9255953},{"time_hours":2,"approval_perbill":994100296,"support_perbill":498511905,"approval":99.4100296,"support":49.8511905},{"time_hours":3,"approval_perbill":991189429,"support_perbill":497767858,"approval":99.1189429,"support":49.7767858},{"time_hours":4,"approval_perbill":988304096,"support_perbill":497023810,"approval":98.8304096,"support":49.702381},{"time_hours":5,"approval_perbill":985443960,"support_perbill":496279762,"approval":98.544396,"support":49.6279762},{"time_hours":6,"approval_perbill":982608697,"support_perbill":495535715,"approval":98.2608697,"support":49.5535715},{"time_hours":7,"approval_perbill":979797981,"support_perbill":494791667,"approval":97.9797981,"support":49.4791667},{"time_hours":8,"approval_perbill":977011496,"support_perbill":494047620,"approval":97.7011496,"support":49.404762},{"time_hours":9,"approval_perbill":974248928,"support_perbill":493303572,"approval":97.4248928,"support":49.3303572},{"time_hours":10,"approval_perbill":971509972,"support_perbill":492559524,"approval":97.1509972,"support":49.2559524},{"time_hours":11,"approval_perbill":968794328,"support_perbill":491815477,"approval":96.8794328,"support":49.1815477},{"time_hours":12,"approval_perbill":966101697,"support_perbill":491071429,"approval":96.6101697,"support":49.1071429},{"time_hours":13,"approval_perbill":963431787,"support_perbill":490327381,"approval":96.3431787,"support":49.0327381},{"time_hours":14,"approval_perbill":960784315,"support_perbill":489583334,"approval":96.0784315,"support":48.9583334},{"time_hours":15,"approval_perbill":958158997,"support_perbill":488839286,"approval":95.8158997,"support":48.8839286},{"time_hours":16,"approval_perbill":955555557,"support_perbill":488095239,"approval":95.5555557,"support":48.8095239},{"time_hours":17,"approval_perbill":952973721,"support_perbill":487351191,"approval":95.2973721,"support":48.7351191},{"time_hours":18,"approval_perbill":950413224,"support_perbill":486607143,"approval":95.0413224,"support":48.6607143},{"time_hours":19,"approval_perbill":947873801,"support_perbill":485863096,"approval":94.7873801,"support":48.5863096},{"time_hours":20,"approval_perbill":945355193,"support_perbill":485119048,"approval":94.5355193,"support":48.5119048},{"time_hours":21,"approval_perbill":942857143,"support_perbill":484375000,"approval":94.2857143,"support":48.4375},{"time_hours":22,"approval_perbill":940379404,"support_perbill":483630953,"approval":94.0379404,"support":48.3630953},{"time_hours":23,"approval_perbill":937921728,"support_perbill":482886905,"approval":93.7921728,"support":48.2886905},{"time_hours":24,"approval_perbill":935483872,"support_perbill":482142858,"approval":93.5483872,"support":48.2142858},{"time_hours":25,"approval_perbill":933065598,"support_perbill":481398810,"approval":93.3065598,"support":48.139881},{"time_hours":26,"approval_perbill":930666667,"support_perbill":480654762,"approval":93.0666667,"support":48.0654762},{"time_hours":27,"approval_perbill":928286854,"support_perbill":479910715,"approval":92.8286854,"support":47.9910715},{"time_hours":28,"approval_perbill":925925927,"support_perbill":479166667,"approval":92.5925927,"support":47.9166667},{"time_hours":29,"approval_perbill":923583664,"support_perbill":478422620,"approval":92.3583664,"support":47.842262},{"time_hours":30,"approval_perbill":921259843,"support_perbill":477678572,"approval":92.1259843,"support":47.7678572},{"time_hours":31,"approval_perbill":918954249,"support_perbill":476934524,"approval":91.8954249,"support":47.6934524},{"time_hours":32,"approval_perbill":916666668,"support_perbill":476190477,"approval":91.6666668,"support":47.6190477},{"time_hours":33,"approval_perbill":914396889,"support_perbill":475446429,"approval":91.4396889,"support":47.5446429},{"time_hours":34,"approval_perbill":912144703,"support_perbill":474702381,"approval":91.2144703,"support":47.4702381},{"time_hours":35,"approval_perbill":909909911,"support_perbill":473958334,"approval":90.9909911,"support":47.3958334},{"time_hours":36,"approval_perbill":907692309,"support_perbill":473214286,"approval":90.7692309,"support":47.3214286},{"time_hours":37,"approval_perbill":905491700,"support_perbill":472470239,"approval":90.54917,"support":47.2470239},{"time_hours":38,"approval_perbill":903307888,"support_perbill":471726191,"approval":90.3307888,"support":47.1726191},{"time_hours":39,"approval_perbill":901140685,"support_perbill":470982143,"approval":90.1140685,"support":47.0982143},{"time_hours":40,"approval_perbill":898989900,"support_perbill":470238096,"approval":89.89899,"support":47.0238096},{"time_hours":41,"approval_perbill":896855347,"support_perbill":469494048,"approval":89.6855347,"support":46.9494048},{"time_hours":42,"approval_perbill":894736842,"support_perbill":468750000,"approval":89.4736842,"support":46.875},{"time_hours":43,"approval_perbill":892634208,"support_perbill":468005953,"approval":89.2634208,"support":46.8005953},{"time_hours":44,"approval_perbill":890547265,"support_perbill":467261905,"approval":89.0547265,"support":46.7261905},{"time_hours":45,"approval_perbill":888475838,"support_perbill":466517858,"approval":88.8475838,"support":46.6517858},{"time_hours":46,"approval_perbill":886419755,"support_perbill":465773810,"approval":88.6419755,"support":46.577381},{"time_hours":47,"approval_perbill":884378844,"support_perbill":465029762,"approval":88.4378844,"support":46.5029762},{"time_hours":48,"approval_perbill":882352942,"support_perbill":464285715,"approval":88.2352942,"support":46.4285715},{"time_hours":49,"approval_perbill":880341882,"support_perbill":463541667,"approval":88.0341882,"support":46.3541667},{"time_hours":50,"approval_perbill":878345500,"support_perbill":462797620,"approval":87.83455,"support":46.279762},{"time_hours":51,"approval_perbill":876363637,"support_perbill":462053572,"approval":87.6363637,"support":46.2053572},{"time_hours":52,"approval_perbill":874396136,"support_perbill":461309524,"approval":87.4396136,"support":46.1309524},{"time_hours":53,"approval_perbill":872442841,"support_perbill":460565477,"approval":87.2442841,"support":46.0565477},{"time_hours":54,"approval_perbill":870503599,"support_perbill":459821429,"approval":87.0503599,"support":45.9821429},{"time_hours":55,"approval_perbill":868578256,"support_perbill":459077381,"approval":86.8578256,"support":45.9077381},{"time_hours":56,"approval_perbill":866666667,"support_perbill":458333334,"approval":86.6666667,"support":45.8333334},{"time_hours":57,"approval_perbill":864768684,"support_perbill":457589286,"approval":86.4768684,"support":45.7589286},{"time_hours":58,"approval_perbill":862884162,"support_perbill":456845239,"approval":86.2884162,"support":45.6845239},{"time_hours":59,"approval_perbill":861012957,"support_perbill":456101191,"approval":86.1012957,"support":45.6101191},{"time_hours":60,"approval_perbill":859154930,"support_perbill":455357143,"approval":85.915493,"support":45.5357143},{"time_hours":61,"approval_perbill":857309942,"support_perbill":454613096,"approval":85.7309942,"support":45.4613096},{"time_hours":62,"approval_perbill":855477857,"support_perbill":453869048,"approval":85.5477857,"support":45.3869048},{"time_hours":63,"approval_perbill":853658537,"support_perbill":453125000,"approval":85.3658537,"support":45.3125},{"time_hours":64,"approval_perbill":851851852,"support_perbill":452380953,"approval":85.1851852,"support":45.2380953},{"time_hours":65,"approval_perbill":850057671,"support_perbill":451636905,"approval":85.0057671,"support":45.1636905},{"time_hours":66,"approval_perbill":848275863,"support_perbill":450892858,"approval":84.8275863,"support":45.0892858},{"time_hours":67,"approval_perbill":846506302,"support_perbill":450148810,"approval":84.6506302,"support":45.014881},{"time_hours":68,"approval_perbill":844748859,"support_perbill":449404762,"approval":84.4748859,"support":44.9404762},{"time_hours":69,"approval_perbill":843003414,"support_perbill":448660715,"approval":84.3003414,"support":44.8660715},{"time_hours":70,"approval_perbill":841269842,"support_perbill":447916667,"approval":84.1269842,"support":44.7916667},{"time_hours":71,"approval_perbill":839548024,"support_perbill":447172620,"approval":83.9548024,"support":44.717262},{"time_hours":72,"approval_perbill":837837838,"support_perbill":446428572,"approval":83.7837838,"support":44.6428572},{"time_hours":73,"approval_perbill":836139170,"support_perbill":445684524,"approval":83.613917,"support":44.5684524},{"time_hours":74,"approval_perbill":834451903,"support_perbill":444940477,"approval":83.4451903,"support":44.4940477},{"time_hours":75,"approval_perbill":832775921,"support_perbill":444196429,"approval":83.2775921,"support":44.4196429},{"time_hours":76,"approval_perbill":831111112,"support_perbill":443452381,"approval":83.1111112,"support":44.3452381},{"time_hours":77,"approval_perbill":829457365,"support_perbill":442708334,"approval":82.9457365,"support":44.2708334},{"time_hours":78,"approval_perbill":827814570,"support_perbill":441964286,"approval":82.781457,"support":44.1964286},{"time_hours":79,"approval_perbill":826182619,"support_perbill":441220239,"approval":82.6182619,"support":44.1220239},{"time_hours":80,"approval_perbill":824561404,"support_perbill":440476191,"approval":82.4561404,"support":44.0476191},{"time_hours":81,"approval_perbill":822950820,"support_perbill":439732143,"approval":82.295082,"support":43.9732143},{"time_hours":82,"approval_perbill":821350763,"support_perbill":438988096,"approval":82.1350763,"support":43.8988096},{"time_hours":83,"approval_perbill":819761130,"support_perbill":438244048,"approval":81.976113,"support":43.8244048},{"time_hours":84,"approval_perbill":818181818,"support_perbill":437500000,"approval":81.8181818,"support":43.75},{"time_hours":85,"approval_perbill":816612730,"support_perbill":436755953,"approval":81.661273,"support":43.6755953},{"time_hours":86,"approval_perbill":815053764,"support_perbill":436011905,"approval":81.5053764,"support":43.6011905},{"time_hours":87,"approval_perbill":813504824,"support_perbill":435267858,"approval":81.3504824,"support":43.5267858},{"time_hours":88,"approval_perbill":811965813,"support_perbill":434523810,"approval":81.1965813,"support":43.452381},{"time_hours":89,"approval_perbill":810436635,"support_perbill":433779762,"approval":81.0436635,"support":43.3779762},{"time_hours":90,"approval_perbill":808917198,"support_perbill":433035715,"approval":80.8917198,"support":43.3035715},{"time_hours":91,"approval_perbill":807407408,"support_perbill":432291667,"approval":80.7407408,"support":43.2291667},{"time_hours":92,"approval_perbill":805907174,"support_perbill":431547620,"approval":80.5907174,"support":43.154762},{"time_hours":93,"approval_perbill":804416404,"support_perbill":430803572,"approval":80.4416404,"support":43.0803572},{"time_hours":94,"approval_perbill":802935011,"support_perbill":430059524,"approval":80.2935011,"support":43.0059524},{"time_hours":95,"approval_perbill":801462906,"support_perbill":429315477,"approval":80.1462906,"support":42.9315477},{"time_hours":96,"approval_perbill":800000001,"support_perbill":428571429,"approval":80.0000001,"support":42.8571429},{"time_hours":97,"approval_perbill":798546210,"support_perbill":427827381,"approval":79.854621,"support":42.7827381},{"time_hours":98,"approval_perbill":797101450,"support_perbill":427083334,"approval":79.710145,"support":42.7083334},{"time_hours":99,"approval_perbill":795665635,"support_perbill":426339286,"approval":79.5665635,"support":42.6339286},{"time_hours":100,"approval_perbill":794238684,"support_perbill":425595239,"approval":79.4238684,"support":42.5595239},{"time_hours":101,"approval_perbill":792820513,"support_perbill":424851191,"approval":79.2820513,"support":42.4851191},{"time_hours":102,"approval_perbill":791411043,"support_perbill":424107143,"approval":79.1411043,"support":42.4107143},{"time_hours":103,"approval_perbill":790010194,"support_perbill":423363096,"approval":79.0010194,"support":42.3363096},{"time_hours":104,"approval_perbill":788617887,"support_perbill":422619048,"approval":78.8617887,"support":42.2619048},{"time_hours":105,"approval_perbill":787234043,"support_perbill":421875000,"approval":78.7234043,"support":42.1875},{"time_hours":106,"approval_perbill":785858586,"support_perbill":421130953,"approval":78.5858586,"support":42.1130953},{"time_hours":107,"approval_perbill":784491441,"support_perbill":420386905,"approval":78.4491441,"support":42.0386905},{"time_hours":108,"approval_perbill":783132531,"support_perbill":419642858,"approval":78.3132531,"support":41.9642858},{"time_hours":109,"approval_perbill":781781783,"support_perbill":418898810,"approval":78.1781783,"support":41.889881},{"time_hours":110,"approval_perbill":780439122,"support_perbill":418154762,"approval":78.0439122,"support":41.8154762},{"time_hours":111,"approval_perbill":779104478,"support_perbill":417410715,"approval":77.9104478,"support":41.7410715},{"time_hours":112,"approval_perbill":777777779,"support_perbill":416666667,"approval":77.7777779,"support":41.6666667},{"time_hours":113,"approval_perbill":776458953,"support_perbill":415922620,"approval":77.6458953,"support":41.592262},{"time_hours":114,"approval_perbill":775147929,"support_perbill":415178572,"approval":77.5147929,"support":41.5178572},{"time_hours":115,"approval_perbill":773844642,"support_perbill":414434524,"approval":77.3844642,"support":41.4434524},{"time_hours":116,"approval_perbill":772549020,"support_perbill":413690477,"approval":77.254902,"support":41.3690477},{"time_hours":117,"approval_perbill":771260998,"support_perbill":412946429,"approval":77.1260998,"support":41.2946429},{"time_hours":118,"approval_perbill":769980507,"support_perbill":412202381,"approval":76.9980507,"support":41.2202381},{"time_hours":119,"approval_perbill":768707484,"support_perbill":411458334,"approval":76.8707484,"support":41.1458334},{"time_hours":120,"approval_perbill":767441861,"support_perbill":410714286,"approval":76.7441861,"support":41.0714286},{"time_hours":121,"approval_perbill":766183576,"support_perbill":409970239,"approval":76.6183576,"support":40.9970239},{"time_hours":122,"approval_perbill":764932563,"support_perbill":409226191,"approval":76.4932563,"support":40.9226191},{"time_hours":123,"approval_perbill":763688761,"support_perbill":408482143,"approval":76.3688761,"support":40.8482143},{"time_hours":124,"approval_perbill":762452108,"support_perbill":407738096,"approval":76.2452108,"support":40.7738096},{"time_hours":125,"approval_perbill":761222541,"support_perbill":406994048,"approval":76.1222541,"support":40.6994048},{"time_hours":126,"approval_perbill":760000000,"support_perbill":406250000,"approval":76,"support":40.625},{"time_hours":127,"approval_perbill":758784426,"support_perbill":405505953,"approval":75.8784426,"support":40.5505953},{"time_hours":128,"approval_perbill":757575758,"support_perbill":404761905,"approval":75.7575758,"support":40.4761905},{"time_hours":129,"approval_perbill":756373938,"support_perbill":404017858,"approval":75.6373938,"support":40.4017858},{"time_hours":130,"approval_perbill":755178909,"support_perbill":403273810,"approval":75.5178909,"support":40.327381},{"time_hours":131,"approval_perbill":753990611,"support_perbill":402529762,"approval":75.3990611,"support":40.2529762},{"time_hours":132,"approval_perbill":752808989,"support_perbill":401785715,"approval":75.2808989,"support":40.1785715},{"time_hours":133,"approval_perbill":751633988,"support_perbill":401041667,"approval":75.1633988,"support":40.1041667},{"time_hours":134,"approval_perbill":750465550,"support_perbill":400297620,"approval":75.046555,"support":40.029762},{"time_hours":135,"approval_perbill":749303621,"support_perbill":399553572,"approval":74.9303621,"support":39.9553572},{"time_hours":136,"approval_perbill":748148149,"support_perbill":398809524,"approval":74.8148149,"support":39.8809524},{"time_hours":137,"approval_perbill":746999077,"support_perbill":398065477,"approval":74.6999077,"support":39.8065477},{"time_hours":138,"approval_perbill":745856354,"support_perbill":397321429,"approval":74.5856354,"support":39.7321429},{"time_hours":139,"approval_perbill":744719927,"support_perbill":396577381,"approval":74.4719927,"support":39.6577381},{"time_hours":140,"approval_perbill":743589744,"support_perbill":395833334,"approval":74.3589744,"support":39.5833334},{"time_hours":141,"approval_perbill":742465754,"support_perbill":395089286,"approval":74.2465754,"support":39.5089286},{"time_hours":142,"approval_perbill":741347906,"support_perbill":394345239,"approval":74.1347906,"support":39.4345239},{"time_hours":143,"approval_perbill":740236149,"support_perbill":393601191,"approval":74.0236149,"support":39.3601191},{"time_hours":144,"approval_perbill":739130435,"support_perbill":392857143,"approval":73.9130435,"support":39.2857143},{"time_hours":145,"approval_perbill":738030714,"support_perbill":392113096,"approval":73.8030714,"support":39.2113096},{"time_hours":146,"approval_perbill":736936938,"support_perbill":391369048,"approval":73.6936938,"support":39.1369048},{"time_hours":147,"approval_perbill":735849057,"support_perbill":390625000,"approval":73.5849057,"support":39.0625},{"time_hours":148,"approval_perbill":734767025,"support_perbill":389880953,"approval":73.4767025,"support":38.9880953},{"time_hours":149,"approval_perbill":733690796,"support_perbill":389136905,"approval":73.3690796,"support":38.9136905},{"time_hours":150,"approval_perbill":732620322,"support_perbill":388392858,"approval":73.2620322,"support":38.8392858},{"time_hours":151,"approval_perbill":731555556,"support_perbill":387648810,"approval":73.1555556,"support":38.764881},{"time_hours":152,"approval_perbill":730496454,"support_perbill":386904762,"approval":73.0496454,"support":38.6904762},{"time_hours":153,"approval_perbill":729442971,"support_perbill":386160715,"approval":72.9442971,"support":38.6160715},{"time_hours":154,"approval_perbill":728395062,"support_perbill":385416667,"approval":72.8395062,"support":38.5416667},{"time_hours":155,"approval_perbill":727352683,"support_perbill":384672620,"approval":72.7352683,"support":38.467262},{"time_hours":156,"approval_perbill":726315790,"support_perbill":383928572,"approval":72.631579,"support":38.3928572},{"time_hours":157,"approval_perbill":725284340,"support_perbill":383184524,"approval":72.528434,"support":38.3184524},{"time_hours":158,"approval_perbill":724258290,"support_perbill":382440477,"approval":72.425829,"support":38.2440477},{"time_hours":159,"approval_perbill":723237599,"support_perbill":381696429,"approval":72.3237599,"support":38.1696429},{"time_hours":160,"approval_perbill":722222222,"support_perbill":380952381,"approval":72.2222222,"support":38.0952381},{"time_hours":161,"approval_perbill":721212122,"support_perbill":380208334,"approval":72.1212122,"support":38.0208334},{"time_hours":162,"approval_perbill":720207254,"support_perbill":379464286,"approval":72.0207254,"support":37.9464286},{"time_hours":163,"approval_perbill":719207580,"support_perbill":378720239,"approval":71.920758,"support":37.8720239},{"time_hours":164,"approval_perbill":718213059,"support_perbill":377976191,"approval":71.8213059,"support":37.7976191},{"time_hours":165,"approval_perbill":717223651,"support_perbill":377232143,"approval":71.7223651,"support":37.7232143},{"time_hours":166,"approval_perbill":716239317,"support_perbill":376488096,"approval":71.6239317,"support":37.6488096},{"time_hours":167,"approval_perbill":715260018,"support_perbill":375744048,"approval":71.5260018,"support":37.5744048},{"time_hours":168,"approval_perbill":714285714,"support_perbill":375000000,"approval":71.4285714,"support":37.5},{"time_hours":169,"approval_perbill":713316370,"support_perbill":374255953,"approval":71.331637,"support":37.4255953},{"time_hours":170,"approval_perbill":712351946,"support_perbill":373511905,"approval":71.2351946,"support":37.3511905},{"time_hours":171,"approval_perbill":711392406,"support_perbill":372767858,"approval":71.1392406,"support":37.2767858},{"time_hours":172,"approval_perbill":710437711,"support_perbill":372023810,"approval":71.0437711,"support":37.202381},{"time_hours":173,"approval_perbill":709487826,"support_perbill":371279762,"approval":70.9487826,"support":37.1279762},{"time_hours":174,"approval_perbill":708542714,"support_perbill":370535715,"approval":70.8542714,"support":37.0535715},{"time_hours":175,"approval_perbill":707602340,"support_perbill":369791667,"approval":70.760234,"support":36.9791667},{"time_hours":176,"approval_perbill":706666667,"support_perbill":369047620,"approval":70.6666667,"support":36.904762},{"time_hours":177,"approval_perbill":705735661,"support_perbill":368303572,"approval":70.5735661,"support":36.8303572},{"time_hours":178,"approval_perbill":704809287,"support_perbill":367559524,"approval":70.4809287,"support":36.7559524},{"time_hours":179,"approval_perbill":703887511,"support_perbill":366815477,"approval":70.3887511,"support":36.6815477},{"time_hours":180,"approval_perbill":702970298,"support_perbill":366071429,"approval":70.2970298,"support":36.6071429},{"time_hours":181,"approval_perbill":702057613,"support_perbill":365327381,"approval":70.2057613,"support":36.5327381},{"time_hours":182,"approval_perbill":701149426,"support_perbill":364583334,"approval":70.1149426,"support":36.4583334},{"time_hours":183,"approval_perbill":700245701,"support_perbill":363839286,"approval":70.0245701,"support":36.3839286},{"time_hours":184,"approval_perbill":699346406,"support_perbill":363095239,"approval":69.9346406,"support":36.3095239},{"time_hours":185,"approval_perbill":698451508,"support_perbill":362351191,"approval":69.8451508,"support":36.2351191},{"time_hours":186,"approval_perbill":697560976,"support_perbill":361607143,"approval":69.7560976,"support":36.1607143},{"time_hours":187,"approval_perbill":696674777,"support_perbill":360863096,"approval":69.6674777,"support":36.0863096},{"time_hours":188,"approval_perbill":695792881,"support_perbill":360119048,"approval":69.5792881,"support":36.0119048},{"time_hours":189,"approval_perbill":694915254,"support_perbill":359375000,"approval":69.4915254,"support":35.9375},{"time_hours":190,"approval_perbill":694041868,"support_perbill":358630953,"approval":69.4041868,"support":35.8630953},{"time_hours":191,"approval_perbill":693172691,"support_perbill":357886905,"approval":69.3172691,"support":35.7886905},{"time_hours":192,"approval_perbill":692307693,"support_perbill":357142858,"approval":69.2307693,"support":35.7142858},{"time_hours":193,"approval_perbill":691446843,"support_perbill":356398810,"approval":69.1446843,"support":35.639881},{"time_hours":194,"approval_perbill":690590112,"support_perbill":355654762,"approval":69.0590112,"support":35.5654762},{"time_hours":195,"approval_perbill":689737470,"support_perbill":354910715,"approval":68.973747,"support":35.4910715},{"time_hours":196,"approval_perbill":688888889,"support_perbill":354166667,"approval":68.8888889,"support":35.4166667},{"time_hours":197,"approval_perbill":688044339,"support_perbill":353422620,"approval":68.8044339,"support":35.342262},{"time_hours":198,"approval_perbill":687203792,"support_perbill":352678572,"approval":68.7203792,"support":35.2678572},{"time_hours":199,"approval_perbill":686367219,"support_perbill":351934524,"approval":68.6367219,"support":35.1934524},{"time_hours":200,"approval_perbill":685534592,"support_perbill":351190477,"approval":68.5534592,"support":35.1190477},{"time_hours":201,"approval_perbill":684705883,"support_perbill":350446429,"approval":68.4705883,"support":35.0446429},{"time_hours":202,"approval_perbill":683881064,"support_perbill":349702381,"approval":68.3881064,"support":34.9702381},{"time_hours":203,"approval_perbill":683060110,"support_perbill":348958334,"approval":68.306011,"support":34.8958334},{"time_hours":204,"approval_perbill":682242991,"support_perbill":348214286,"approval":68.2242991,"support":34.8214286},{"time_hours":205,"approval_perbill":681429682,"support_perbill":347470239,"approval":68.1429682,"support":34.7470239},{"time_hours":206,"approval_perbill":680620155,"support_perbill":346726191,"approval":68.0620155,"support":34.6726191},{"time_hours":207,"approval_perbill":679814385,"support_perbill":345982143,"approval":67.9814385,"support":34.5982143},{"time_hours":208,"approval_perbill":679012346,"support_perbill":345238096,"approval":67.9012346,"support":34.5238096},{"time_hours":209,"approval_perbill":678214011,"support_perbill":344494048,"approval":67.8214011,"support":34.4494048},{"time_hours":210,"approval_perbill":677419355,"support_perbill":343750000,"approval":67.7419355,"support":34.375},{"time_hours":211,"approval_perbill":676628353,"support_perbill":343005953,"approval":67.6628353,"support":34.3005953},{"time_hours":212,"approval_perbill":675840979,"support_perbill":342261905,"approval":67.5840979,"support":34.2261905},{"time_hours":213,"approval_perbill":675057209,"support_perbill":341517858,"approval":67.5057209,"support":34.1517858},{"time_hours":214,"approval_perbill":674277017,"support_perbill":340773810,"approval":67.4277017,"support":34.077381},{"time_hours":215,"approval_perbill":673500380,"support_perbill":340029762,"approval":67.350038,"support":34.0029762},{"time_hours":216,"approval_perbill":672727273,"support_perbill":339285715,"approval":67.2727273,"support":33.9285715},{"time_hours":217,"approval_perbill":671957672,"support_perbill":338541667,"approval":67.1957672,"support":33.8541667},{"time_hours":218,"approval_perbill":671191554,"support_perbill":337797620,"approval":67.1191554,"support":33.779762},{"time_hours":219,"approval_perbill":670428894,"support_perbill":337053572,"approval":67.0428894,"support":33.7053572},{"time_hours":220,"approval_perbill":669669670,"support_perbill":336309524,"approval":66.966967,"support":33.6309524},{"time_hours":221,"approval_perbill":668913858,"support_perbill":335565477,"approval":66.8913858,"support":33.5565477},{"time_hours":222,"approval_perbill":668161435,"support_perbill":334821429,"approval":66.8161435,"support":33.4821429},{"time_hours":223,"approval_perbill":667412379,"support_perbill":334077381,"approval":66.7412379,"support":33.4077381},{"time_hours":224,"approval_perbill":666666667,"support_perbill":333333334,"approval":66.6666667,"support":33.3333334},{"time_hours":225,"approval_perbill":665924276,"support_perbill":332589286,"approval":66.5924276,"support":33.2589286},{"time_hours":226,"approval_perbill":665185186,"support_perbill":331845239,"approval":66.5185186,"support":33.1845239},{"time_hours":227,"approval_perbill":664449372,"support_perbill":331101191,"approval":66.4449372,"support":33.1101191},{"time_hours":228,"approval_perbill":663716814,"support_perbill":330357143,"approval":66.3716814,"support":33.0357143},{"time_hours":229,"approval_perbill":662987491,"support_perbill":329613096,"approval":66.2987491,"support":32.9613096},{"time_hours":230,"approval_perbill":662261381,"support_perbill":328869048,"approval":66.2261381,"support":32.8869048},{"time_hours":231,"approval_perbill":661538462,"support_perbill":328125000,"approval":66.1538462,"support":32.8125},{"time_hours":232,"approval_perbill":660818714,"support_perbill":327380953,"approval":66.0818714,"support":32.7380953},{"time_hours":233,"approval_perbill":660102115,"support_perbill":326636905,"approval":66.0102115,"support":32.6636905},{"time_hours":234,"approval_perbill":659388647,"support_perbill":325892858,"approval":65.9388647,"support":32.5892858},{"time_hours":235,"approval_perbill":658678287,"support_perbill":325148810,"approval":65.8678287,"support":32.514881},{"time_hours":236,"approval_perbill":657971015,"support_perbill":324404762,"approval":65.7971015,"support":32.4404762},{"time_hours":237,"approval_perbill":657266811,"support_perbill":323660715,"approval":65.7266811,"support":32.3660715},{"time_hours":238,"approval_perbill":656565657,"support_perbill":322916667,"approval":65.6565657,"support":32.2916667},{"time_hours":239,"approval_perbill":655867531,"support_perbill":322172620,"approval":65.5867531,"support":32.217262},{"time_hours":240,"approval_perbill":655172414,"support_perbill":321428572,"approval":65.5172414,"support":32.1428572},{"time_hours":241,"approval_perbill":654480287,"support_perbill":320684524,"approval":65.4480287,"support":32.0684524},{"time_hours":242,"approval_perbill":653791130,"support_perbill":319940477,"approval":65.379113,"support":31.9940477},{"time_hours":243,"approval_perbill":653104925,"support_perbill":319196429,"approval":65.3104925,"support":31.9196429},{"time_hours":244,"approval_perbill":652421652,"support_perbill":318452381,"approval":65.2421652,"support":31.8452381},{"time_hours":245,"approval_perbill":651741294,"support_perbill":317708334,"approval":65.1741294,"support":31.7708334},{"time_hours":246,"approval_perbill":651063830,"support_perbill":316964286,"approval":65.106383,"support":31.6964286},{"time_hours":247,"approval_perbill":650389243,"support_perbill":316220239,"approval":65.0389243,"support":31.6220239},{"time_hours":248,"approval_perbill":649717514,"support_perbill":315476191,"approval":64.9717514,"support":31.5476191},{"time_hours":249,"approval_perbill":649048626,"support_perbill":314732143,"approval":64.9048626,"support":31.4732143},{"time_hours":250,"approval_perbill":648382560,"support_perbill":313988096,"approval":64.838256,"support":31.3988096},{"time_hours":251,"approval_perbill":647719299,"support_perbill":313244048,"approval":64.7719299,"support":31.3244048},{"time_hours":252,"approval_perbill":647058823,"support_perbill":312500000,"approval":64.7058823,"support":31.25},{"time_hours":253,"approval_perbill":646401118,"support_perbill":311755953,"approval":64.6401118,"support":31.1755953},{"time_hours":254,"approval_perbill":645746165,"support_perbill":311011905,"approval":64.5746165,"support":31.1011905},{"time_hours":255,"approval_perbill":645093946,"support_perbill":310267858,"approval":64.5093946,"support":31.0267858},{"time_hours":256,"approval_perbill":644444445,"support_perbill":309523810,"approval":64.4444445,"support":30.952381},{"time_hours":257,"approval_perbill":643797644,"support_perbill":308779762,"approval":64.3797644,"support":30.8779762},{"time_hours":258,"approval_perbill":643153527,"support_perbill":308035715,"approval":64.3153527,"support":30.8035715},{"time_hours":259,"approval_perbill":642512078,"support_perbill":307291667,"approval":64.2512078,"support":30.7291667},{"time_hours":260,"approval_perbill":641873279,"support_perbill":306547620,"approval":64.1873279,"support":30.654762},{"time_hours":261,"approval_perbill":641237113,"support_perbill":305803572,"approval":64.1237113,"support":30.5803572},{"time_hours":262,"approval_perbill":640603567,"support_perbill":305059524,"approval":64.0603567,"support":30.5059524},{"time_hours":263,"approval_perbill":639972622,"support_perbill":304315477,"approval":63.9972622,"support":30.4315477},{"time_hours":264,"approval_perbill":639344263,"support_perbill":303571429,"approval":63.9344263,"support":30.3571429},{"time_hours":265,"approval_perbill":638718473,"support_perbill":302827381,"approval":63.8718473,"support":30.2827381},{"time_hours":266,"approval_perbill":638095238,"support_perbill":302083334,"approval":63.8095238,"support":30.2083334},{"time_hours":267,"approval_perbill":637474542,"support_perbill":301339286,"approval":63.7474542,"support":30.1339286},{"time_hours":268,"approval_perbill":636856369,"support_perbill":300595239,"approval":63.6856369,"support":30.0595239},{"time_hours":269,"approval_perbill":636240703,"support_perbill":299851191,"approval":63.6240703,"support":29.9851191},{"time_hours":270,"approval_perbill":635627530,"support_perbill":299107143,"approval":63.562753,"support":29.9107143},{"time_hours":271,"approval_perbill":635016835,"support_perbill":298363096,"approval":63.5016835,"support":29.8363096},{"time_hours":272,"approval_perbill":634408602,"support_perbill":297619048,"approval":63.4408602,"support":29.7619048},{"time_hours":273,"approval_perbill":633802817,"support_perbill":296875000,"approval":63.3802817,"support":29.6875},{"time_hours":274,"approval_perbill":633199465,"support_perbill":296130953,"approval":63.3199465,"support":29.6130953},{"time_hours":275,"approval_perbill":632598530,"support_perbill":295386905,"approval":63.259853,"support":29.5386905},{"time_hours":276,"approval_perbill":632000000,"support_perbill":294642858,"approval":63.2,"support":29.4642858},{"time_hours":277,"approval_perbill":631403859,"support_perbill":293898810,"approval":63.1403859,"support":29.389881},{"time_hours":278,"approval_perbill":630810093,"support_perbill":293154762,"approval":63.0810093,"support":29.3154762},{"time_hours":279,"approval_perbill":630218688,"support_perbill":292410715,"approval":63.0218688,"support":29.2410715},{"time_hours":280,"approval_perbill":629629630,"support_perbill":291666667,"approval":62.962963,"support":29.1666667},{"time_hours":281,"approval_perbill":629042905,"support_perbill":290922620,"approval":62.9042905,"support":29.092262},{"time_hours":282,"approval_perbill":628458498,"support_perbill":290178572,"approval":62.8458498,"support":29.0178572},{"time_hours":283,"approval_perbill":627876397,"support_perbill":289434524,"approval":62.7876397,"support":28.9434524},{"time_hours":284,"approval_perbill":627296588,"support_perbill":288690477,"approval":62.7296588,"support":28.8690477},{"time_hours":285,"approval_perbill":626719057,"support_perbill":287946429,"approval":62.6719057,"support":28.7946429},{"time_hours":286,"approval_perbill":626143791,"support_perbill":287202381,"approval":62.6143791,"support":28.7202381},{"time_hours":287,"approval_perbill":625570776,"support_perbill":286458334,"approval":62.5570776,"support":28.6458334},{"time_hours":288,"approval_perbill":625000000,"support_perbill":285714286,"approval":62.5,"support":28.5714286},{"time_hours":289,"approval_perbill":624431449,"support_perbill":284970239,"approval":62.4431449,"support":28.4970239},{"time_hours":290,"approval_perbill":623865110,"support_perbill":284226191,"approval":62.386511,"support":28.4226191},{"time_hours":291,"approval_perbill":623300971,"support_perbill":283482143,"approval":62.3300971,"support":28.3482143},{"time_hours":292,"approval_perbill":622739018,"support_perbill":282738096,"approval":62.2739018,"support":28.2738096},{"time_hours":293,"approval_perbill":622179239,"support_perbill":281994048,"approval":62.2179239,"support":28.1994048},{"time_hours":294,"approval_perbill":621621621,"support_perbill":281250000,"approval":62.1621621,"support":28.125},{"time_hours":295,"approval_perbill":621066153,"support_perbill":280505953,"approval":62.1066153,"support":28.0505953},{"time_hours":296,"approval_perbill":620512821,"support_perbill":279761905,"approval":62.0512821,"support":27.9761905},{"time_hours":297,"approval_perbill":619961612,"support_perbill":279017858,"approval":61.9961612,"support":27.9017858},{"time_hours":298,"approval_perbill":619412516,"support_perbill":278273810,"approval":61.9412516,"support":27.827381},{"time_hours":299,"approval_perbill":618865519,"support_perbill":277529762,"approval":61.8865519,"support":27.7529762},{"time_hours":300,"approval_perbill":618320611,"support_perbill":276785715,"approval":61.8320611,"support":27.6785715},{"time_hours":301,"approval_perbill":617777778,"support_perbill":276041667,"approval":61.7777778,"support":27.6041667},{"time_hours":302,"approval_perbill":617237009,"support_perbill":275297620,"approval":61.7237009,"support":27.529762},{"time_hours":303,"approval_perbill":616698292,"support_perbill":274553572,"approval":61.6698292,"support":27.4553572},{"time_hours":304,"approval_perbill":616161616,"support_perbill":273809524,"approval":61.6161616,"support":27.3809524},{"time_hours":305,"approval_perbill":615626969,"support_perbill":273065477,"approval":61.5626969,"support":27.3065477},{"time_hours":306,"approval_perbill":615094340,"support_perbill":272321429,"approval":61.509434,"support":27.2321429},{"time_hours":307,"approval_perbill":614563716,"support_perbill":271577381,"approval":61.4563716,"support":27.1577381},{"time_hours":308,"approval_perbill":614035088,"support_perbill":270833334,"approval":61.4035088,"support":27.0833334},{"time_hours":309,"approval_perbill":613508443,"support_perbill":270089286,"approval":61.3508443,"support":27.0089286},{"time_hours":310,"approval_perbill":612983770,"support_perbill":269345239,"approval":61.298377,"support":26.9345239},{"time_hours":311,"approval_perbill":612461059,"support_perbill":268601191,"approval":61.2461059,"support":26.8601191},{"time_hours":312,"approval_perbill":611940298,"support_perbill":267857143,"approval":61.1940298,"support":26.7857143},{"time_hours":313,"approval_perbill":611421477,"support_perbill":267113096,"approval":61.1421477,"support":26.7113096},{"time_hours":314,"approval_perbill":610904585,"support_perbill":266369048,"approval":61.0904585,"support":26.6369048},{"time_hours":315,"approval_perbill":610389610,"support_perbill":265625000,"approval":61.038961,"support":26.5625},{"time_hours":316,"approval_perbill":609876543,"support_perbill":264880953,"approval":60.9876543,"support":26.4880953},{"time_hours":317,"approval_perbill":609365373,"support_perbill":264136905,"approval":60.9365373,"support":26.4136905},{"time_hours":318,"approval_perbill":608856089,"support_perbill":263392858,"approval":60.8856089,"support":26.3392858},{"time_hours":319,"approval_perbill":608348680,"support_perbill":262648810,"approval":60.834868,"support":26.264881},{"time_hours":320,"approval_perbill":607843137,"support_perbill":261904762,"approval":60.7843137,"support":26.1904762},{"time_hours":321,"approval_perbill":607339449,"support_perbill":261160715,"approval":60.7339449,"support":26.1160715},{"time_hours":322,"approval_perbill":606837607,"support_perbill":260416667,"approval":60.6837607,"support":26.0416667},{"time_hours":323,"approval_perbill":606337599,"support_perbill":259672620,"approval":60.6337599,"support":25.967262},{"time_hours":324,"approval_perbill":605839416,"support_perbill":258928572,"approval":60.5839416,"support":25.8928572},{"time_hours":325,"approval_perbill":605343048,"support_perbill":258184524,"approval":60.5343048,"support":25.8184524},{"time_hours":326,"approval_perbill":604848485,"support_perbill":257440477,"approval":60.4848485,"support":25.7440477},{"time_hours":327,"approval_perbill":604355717,"support_perbill":256696429,"approval":60.4355717,"support":25.6696429},{"time_hours":328,"approval_perbill":603864734,"support_perbill":255952381,"approval":60.3864734,"support":25.5952381},{"time_hours":329,"approval_perbill":603375527,"support_perbill":255208334,"approval":60.3375527,"support":25.5208334},{"time_hours":330,"approval_perbill":602888087,"support_perbill":254464286,"approval":60.2888087,"support":25.4464286},{"time_hours":331,"approval_perbill":602402402,"support_perbill":253720239,"approval":60.2402402,"support":25.3720239},{"time_hours":332,"approval_perbill":601918465,"support_perbill":252976191,"approval":60.1918465,"support":25.2976191},{"time_hours":333,"approval_perbill":601436266,"support_perbill":252232143,"approval":60.1436266,"support":25.2232143},{"time_hours":334,"approval_perbill":600955794,"support_perbill":251488096,"approval":60.0955794,"support":25.1488096},{"time_hours":335,"approval_perbill":600477042,"support_perbill":250744048,"approval":60.0477042,"support":25.0744048},{"time_hours":336,"approval_perbill":600000000,"support_perbill":250000000,"approval":60,"support":25},{"time_hours":337,"approval_perbill":599524658,"support_perbill":249255953,"approval":59.9524658,"support":24.9255953},{"time_hours":338,"approval_perbill":599051008,"support_perbill":248511905,"approval":59.9051008,"support":24.8511905},{"time_hours":339,"approval_perbill":598579041,"support_perbill":247767858,"approval":59.8579041,"support":24.7767858},{"time_hours":340,"approval_perbill":598108747,"support_perbill":247023810,"approval":59.8108747,"support":24.702381},{"time_hours":341,"approval_perbill":597640118,"support_perbill":246279762,"approval":59.7640118,"support":24.6279762},{"time_hours":342,"approval_perbill":597173145,"support_perbill":245535715,"approval":59.7173145,"support":24.5535715},{"time_hours":343,"approval_perbill":596707819,"support_perbill":244791667,"approval":59.6707819,"support":24.4791667},{"time_hours":344,"approval_perbill":596244131,"support_perbill":244047620,"approval":59.6244131,"support":24.404762},{"time_hours":345,"approval_perbill":595782074,"support_perbill":243303572,"approval":59.5782074,"support":24.3303572},{"time_hours":346,"approval_perbill":595321637,"support_perbill":242559524,"approval":59.5321637,"support":24.2559524},{"time_hours":347,"approval_perbill":594862814,"support_perbill":241815477,"approval":59.4862814,"support":24.1815477},{"time_hours":348,"approval_perbill":594405594,"support_perbill":241071429,"approval":59.4405594,"support":24.1071429},{"time_hours":349,"approval_perbill":593949971,"support_perbill":240327381,"approval":59.3949971,"support":24.0327381},{"time_hours":350,"approval_perbill":593495935,"support_perbill":239583334,"approval":59.3495935,"support":23.9583334},{"time_hours":351,"approval_perbill":593043478,"support_perbill":238839286,"approval":59.3043478,"support":23.8839286},{"time_hours":352,"approval_perbill":592592593,"support_perbill":238095239,"approval":59.2592593,"support":23.8095239},{"time_hours":353,"approval_perbill":592143270,"support_perbill":237351191,"approval":59.214327,"support":23.7351191},{"time_hours":354,"approval_perbill":591695502,"support_perbill":236607143,"approval":59.1695502,"support":23.6607143},{"time_hours":355,"approval_perbill":591249280,"support_perbill":235863096,"approval":59.124928,"support":23.5863096},{"time_hours":356,"approval_perbill":590804598,"support_perbill":235119048,"approval":59.0804598,"support":23.5119048},{"time_hours":357,"approval_perbill":590361446,"support_perbill":234375000,"approval":59.0361446,"support":23.4375},{"time_hours":358,"approval_perbill":589919817,"support_perbill":233630953,"approval":58.9919817,"support":23.3630953},{"time_hours":359,"approval_perbill":589479703,"support_perbill":232886905,"approval":58.9479703,"support":23.2886905},{"time_hours":360,"approval_perbill":589041096,"support_perbill":232142858,"approval":58.9041096,"support":23.2142858},{"time_hours":361,"approval_perbill":588603989,"support_perbill":231398810,"approval":58.8603989,"support":23.139881},{"time_hours":362,"approval_perbill":588168373,"support_perbill":230654762,"approval":58.8168373,"support":23.0654762},{"time_hours":363,"approval_perbill":587734242,"support_perbill":229910715,"approval":58.7734242,"support":22.9910715},{"time_hours":364,"approval_perbill":587301587,"support_perbill":229166667,"approval":58.7301587,"support":22.9166667},{"time_hours":365,"approval_perbill":586870402,"support_perbill":228422620,"approval":58.6870402,"support":22.842262},{"time_hours":366,"approval_perbill":586440678,"support_perbill":227678572,"approval":58.6440678,"support":22.7678572},{"time_hours":367,"approval_perbill":586012408,"support_perbill":226934524,"approval":58.6012408,"support":22.6934524},{"time_hours":368,"approval_perbill":585585585,"support_perbill":226190477,"approval":58.5585585,"support":22.6190477},{"time_hours":369,"approval_perbill":585160202,"support_perbill":225446429,"approval":58.5160202,"support":22.5446429},{"time_hours":370,"approval_perbill":584736251,"support_perbill":224702381,"approval":58.4736251,"support":22.4702381},{"time_hours":371,"approval_perbill":584313725,"support_perbill":223958334,"approval":58.4313725,"support":22.3958334},{"time_hours":372,"approval_perbill":583892617,"support_perbill":223214286,"approval":58.3892617,"support":22.3214286},{"time_hours":373,"approval_perbill":583472920,"support_perbill":222470239,"approval":58.347292,"support":22.2470239},{"time_hours":374,"approval_perbill":583054626,"support_perbill":221726191,"approval":58.3054626,"support":22.1726191},{"time_hours":375,"approval_perbill":582637729,"support_perbill":220982143,"approval":58.2637729,"support":22.0982143},{"time_hours":376,"approval_perbill":582222222,"support_perbill":220238096,"approval":58.2222222,"support":22.0238096},{"time_hours":377,"approval_perbill":581808098,"support_perbill":219494048,"approval":58.1808098,"support":21.9494048},{"time_hours":378,"approval_perbill":581395349,"support_perbill":218750000,"approval":58.1395349,"support":21.875},{"time_hours":379,"approval_perbill":580983969,"support_perbill":218005953,"approval":58.0983969,"support":21.8005953},{"time_hours":380,"approval_perbill":580573951,"support_perbill":217261905,"approval":58.0573951,"support":21.7261905},{"time_hours":381,"approval_perbill":580165289,"support_perbill":216517858,"approval":58.0165289,"support":21.6517858},{"time_hours":382,"approval_perbill":579757976,"support_perbill":215773810,"approval":57.9757976,"support":21.577381},{"time_hours":383,"approval_perbill":579352004,"support_perbill":215029762,"approval":57.9352004,"support":21.5029762},{"time_hours":384,"approval_perbill":578947368,"support_perbill":214285715,"approval":57.8947368,"support":21.4285715},{"time_hours":385,"approval_perbill":578544061,"support_perbill":213541667,"approval":57.8544061,"support":21.3541667},{"time_hours":386,"approval_perbill":578142076,"support_perbill":212797620,"approval":57.8142076,"support":21.279762},{"time_hours":387,"approval_perbill":577741407,"support_perbill":212053572,"approval":57.7741407,"support":21.2053572},{"time_hours":388,"approval_perbill":577342048,"support_perbill":211309524,"approval":57.7342048,"support":21.1309524},{"time_hours":389,"approval_perbill":576943991,"support_perbill":210565477,"approval":57.6943991,"support":21.0565477},{"time_hours":390,"approval_perbill":576547231,"support_perbill":209821429,"approval":57.6547231,"support":20.9821429},{"time_hours":391,"approval_perbill":576151761,"support_perbill":209077381,"approval":57.6151761,"support":20.9077381},{"time_hours":392,"approval_perbill":575757576,"support_perbill":208333334,"approval":57.5757576,"support":20.8333334},{"time_hours":393,"approval_perbill":575364668,"support_perbill":207589286,"approval":57.5364668,"support":20.7589286},{"time_hours":394,"approval_perbill":574973031,"support_perbill":206845239,"approval":57.4973031,"support":20.6845239},{"time_hours":395,"approval_perbill":574582660,"support_perbill":206101191,"approval":57.458266,"support":20.6101191},{"time_hours":396,"approval_perbill":574193548,"support_perbill":205357143,"approval":57.4193548,"support":20.5357143},{"time_hours":397,"approval_perbill":573805690,"support_perbill":204613096,"approval":57.380569,"support":20.4613096},{"time_hours":398,"approval_perbill":573419078,"support_perbill":203869048,"approval":57.3419078,"support":20.3869048},{"time_hours":399,"approval_perbill":573033708,"support_perbill":203125000,"approval":57.3033708,"support":20.3125},{"time_hours":400,"approval_perbill":572649572,"support_perbill":202380953,"approval":57.2649572,"support":20.2380953},{"time_hours":401,"approval_perbill":572266666,"support_perbill":201636905,"approval":57.2266666,"support":20.1636905},{"time_hours":402,"approval_perbill":571884984,"support_perbill":200892858,"approval":57.1884984,"support":20.0892858},{"time_hours":403,"approval_perbill":571504519,"support_perbill":200148810,"approval":57.1504519,"support":20.014881},{"time_hours":404,"approval_perbill":571125265,"support_perbill":199404762,"approval":57.1125265,"support":19.9404762},{"time_hours":405,"approval_perbill":570747218,"support_perbill":198660715,"approval":57.0747218,"support":19.8660715},{"time_hours":406,"approval_perbill":570370370,"support_perbill":197916667,"approval":57.037037,"support":19.7916667},{"time_hours":407,"approval_perbill":569994717,"support_perbill":197172620,"approval":56.9994717,"support":19.717262},{"time_hours":408,"approval_perbill":569620253,"support_perbill":196428572,"approval":56.9620253,"support":19.6428572},{"time_hours":409,"approval_perbill":569246972,"support_perbill":195684524,"approval":56.9246972,"support":19.5684524},{"time_hours":410,"approval_perbill":568874868,"support_perbill":194940477,"approval":56.8874868,"support":19.4940477},{"time_hours":411,"approval_perbill":568503937,"support_perbill":194196429,"approval":56.8503937,"support":19.4196429},{"time_hours":412,"approval_perbill":568134172,"support_perbill":193452381,"approval":56.8134172,"support":19.3452381},{"time_hours":413,"approval_perbill":567765567,"support_perbill":192708334,"approval":56.7765567,"support":19.2708334},{"time_hours":414,"approval_perbill":567398119,"support_perbill":191964286,"approval":56.7398119,"support":19.1964286},{"time_hours":415,"approval_perbill":567031820,"support_perbill":191220239,"approval":56.703182,"support":19.1220239},{"time_hours":416,"approval_perbill":566666666,"support_perbill":190476191,"approval":56.6666666,"support":19.0476191},{"time_hours":417,"approval_perbill":566302652,"support_perbill":189732143,"approval":56.6302652,"support":18.9732143},{"time_hours":418,"approval_perbill":565939771,"support_perbill":188988096,"approval":56.5939771,"support":18.8988096},{"time_hours":419,"approval_perbill":565578020,"support_perbill":188244048,"approval":56.557802,"support":18.8244048},{"time_hours":420,"approval_perbill":565217391,"support_perbill":187500000,"approval":56.5217391,"support":18.75},{"time_hours":421,"approval_perbill":564857881,"support_perbill":186755953,"approval":56.4857881,"support":18.6755953},{"time_hours":422,"approval_perbill":564499484,"support_perbill":186011905,"approval":56.4499484,"support":18.6011905},{"time_hours":423,"approval_perbill":564142195,"support_perbill":185267858,"approval":56.4142195,"support":18.5267858},{"time_hours":424,"approval_perbill":563786008,"support_perbill":184523810,"approval":56.3786008,"support":18.452381},{"time_hours":425,"approval_perbill":563430919,"support_perbill":183779762,"approval":56.3430919,"support":18.3779762},{"time_hours":426,"approval_perbill":563076923,"support_perbill":183035715,"approval":56.3076923,"support":18.3035715},{"time_hours":427,"approval_perbill":562724014,"support_perbill":182291667,"approval":56.2724014,"support":18.2291667},{"time_hours":428,"approval_perbill":562372188,"support_perbill":181547620,"approval":56.2372188,"support":18.154762},{"time_hours":429,"approval_perbill":562021439,"support_perbill":180803572,"approval":56.2021439,"support":18.0803572},{"time_hours":430,"approval_perbill":561671763,"support_perbill":180059524,"approval":56.1671763,"support":18.0059524},{"time_hours":431,"approval_perbill":561323155,"support_perbill":179315477,"approval":56.1323155,"support":17.9315477},{"time_hours":432,"approval_perbill":560975610,"support_perbill":178571429,"approval":56.097561,"support":17.8571429},{"time_hours":433,"approval_perbill":560629122,"support_perbill":177827381,"approval":56.0629122,"support":17.7827381},{"time_hours":434,"approval_perbill":560283688,"support_perbill":177083334,"approval":56.0283688,"support":17.7083334},{"time_hours":435,"approval_perbill":559939302,"support_perbill":176339286,"approval":55.9939302,"support":17.6339286},{"time_hours":436,"approval_perbill":559595959,"support_perbill":175595239,"approval":55.9595959,"support":17.5595239},{"time_hours":437,"approval_perbill":559253656,"support_perbill":174851191,"approval":55.9253656,"support":17.4851191},{"time_hours":438,"approval_perbill":558912386,"support_perbill":174107143,"approval":55.8912386,"support":17.4107143},{"time_hours":439,"approval_perbill":558572147,"support_perbill":173363096,"approval":55.8572147,"support":17.3363096},{"time_hours":440,"approval_perbill":558232931,"support_perbill":172619048,"approval":55.8232931,"support":17.2619048},{"time_hours":441,"approval_perbill":557894736,"support_perbill":171875000,"approval":55.7894736,"support":17.1875},{"time_hours":442,"approval_perbill":557557557,"support_perbill":171130953,"approval":55.7557557,"support":17.1130953},{"time_hours":443,"approval_perbill":557221389,"support_perbill":170386905,"approval":55.7221389,"support":17.0386905},{"time_hours":444,"approval_perbill":556886227,"support_perbill":169642858,"approval":55.6886227,"support":16.9642858},{"time_hours":445,"approval_perbill":556552068,"support_perbill":168898810,"approval":55.6552068,"support":16.889881},{"time_hours":446,"approval_perbill":556218905,"support_perbill":168154762,"approval":55.6218905,"support":16.8154762},{"time_hours":447,"approval_perbill":555886736,"support_perbill":167410715,"approval":55.5886736,"support":16.7410715},{"time_hours":448,"approval_perbill":555555555,"support_perbill":166666667,"approval":55.5555555,"support":16.6666667},{"time_hours":449,"approval_perbill":555225359,"support_perbill":165922620,"approval":55.5225359,"support":16.592262},{"time_hours":450,"approval_perbill":554896142,"support_perbill":165178572,"approval":55.4896142,"support":16.5178572},{"time_hours":451,"approval_perbill":554567901,"support_perbill":164434524,"approval":55.4567901,"support":16.4434524},{"time_hours":452,"approval_perbill":554240631,"support_perbill":163690477,"approval":55.4240631,"support":16.3690477},{"time_hours":453,"approval_perbill":553914328,"support_perbill":162946429,"approval":55.3914328,"support":16.2946429},{"time_hours":454,"approval_perbill":553588987,"support_perbill":162202381,"approval":55.3588987,"support":16.2202381},{"time_hours":455,"approval_perbill":553264604,"support_perbill":161458334,"approval":55.3264604,"support":16.1458334},{"time_hours":456,"approval_perbill":552941176,"support_perbill":160714286,"approval":55.2941176,"support":16.0714286},{"time_hours":457,"approval_perbill":552618698,"support_perbill":159970239,"approval":55.2618698,"support":15.9970239},{"time_hours":458,"approval_perbill":552297165,"support_perbill":159226191,"approval":55.2297165,"support":15.9226191},{"time_hours":459,"approval_perbill":551976574,"support_perbill":158482143,"approval":55.1976574,"support":15.8482143},{"time_hours":460,"approval_perbill":551656920,"support_perbill":157738096,"approval":55.165692,"support":15.7738096},{"time_hours":461,"approval_perbill":551338199,"support_perbill":156994048,"approval":55.1338199,"support":15.6994048},{"time_hours":462,"approval_perbill":551020408,"support_perbill":156250000,"approval":55.1020408,"support":15.625},{"time_hours":463,"approval_perbill":550703542,"support_perbill":155505953,"approval":55.0703542,"support":15.5505953},{"time_hours":464,"approval_perbill":550387597,"support_perbill":154761905,"approval":55.0387597,"support":15.4761905},{"time_hours":465,"approval_perbill":550072569,"support_perbill":154017858,"approval":55.0072569,"support":15.4017858},{"time_hours":466,"approval_perbill":549758454,"support_perbill":153273810,"approval":54.9758454,"support":15.327381},{"time_hours":467,"approval_perbill":549445248,"support_perbill":152529762,"approval":54.9445248,"support":15.2529762},{"time_hours":468,"approval_perbill":549132948,"support_perbill":151785715,"approval":54.9132948,"support":15.1785715},{"time_hours":469,"approval_perbill":548821549,"support_perbill":151041667,"approval":54.8821549,"support":15.1041667},{"time_hours":470,"approval_perbill":548511047,"support_perbill":150297620,"approval":54.8511047,"support":15.029762},{"time_hours":471,"approval_perbill":548201438,"support_perbill":149553572,"approval":54.8201438,"support":14.9553572},{"time_hours":472,"approval_perbill":547892720,"support_perbill":148809524,"approval":54.789272,"support":14.8809524},{"time_hours":473,"approval_perbill":547584887,"support_perbill":148065477,"approval":54.7584887,"support":14.8065477},{"time_hours":474,"approval_perbill":547277937,"support_perbill":147321429,"approval":54.7277937,"support":14.7321429},{"time_hours":475,"approval_perbill":546971864,"support_perbill":146577381,"approval":54.6971864,"support":14.6577381},{"time_hours":476,"approval_perbill":546666666,"support_perbill":145833334,"approval":54.6666666,"support":14.5833334},{"time_hours":477,"approval_perbill":546362339,"support_perbill":145089286,"approval":54.6362339,"support":14.5089286},{"time_hours":478,"approval_perbill":546058879,"support_perbill":144345239,"approval":54.6058879,"support":14.4345239},{"time_hours":479,"approval_perbill":545756282,"support_perbill":143601191,"approval":54.5756282,"support":14.3601191},{"time_hours":480,"approval_perbill":545454545,"support_perbill":142857143,"approval":54.5454545,"support":14.2857143},{"time_hours":481,"approval_perbill":545153664,"support_perbill":142113096,"approval":54.5153664,"support":14.2113096},{"time_hours":482,"approval_perbill":544853635,"support_perbill":141369048,"approval":54.4853635,"support":14.1369048},{"time_hours":483,"approval_perbill":544554455,"support_perbill":140625000,"approval":54.4554455,"support":14.0625},{"time_hours":484,"approval_perbill":544256120,"support_perbill":139880953,"approval":54.425612,"support":13.9880953},{"time_hours":485,"approval_perbill":543958627,"support_perbill":139136905,"approval":54.3958627,"support":13.9136905},{"time_hours":486,"approval_perbill":543661971,"support_perbill":138392858,"approval":54.3661971,"support":13.8392858},{"time_hours":487,"approval_perbill":543366151,"support_perbill":137648810,"approval":54.3366151,"support":13.764881},{"time_hours":488,"approval_perbill":543071161,"support_perbill":136904762,"approval":54.3071161,"support":13.6904762},{"time_hours":489,"approval_perbill":542776998,"support_perbill":136160715,"approval":54.2776998,"support":13.6160715},{"time_hours":490,"approval_perbill":542483660,"support_perbill":135416667,"approval":54.248366,"support":13.5416667},{"time_hours":491,"approval_perbill":542191142,"support_perbill":134672620,"approval":54.2191142,"support":13.467262},{"time_hours":492,"approval_perbill":541899441,"support_perbill":133928572,"approval":54.1899441,"support":13.3928572},{"time_hours":493,"approval_perbill":541608554,"support_perbill":133184524,"approval":54.1608554,"support":13.3184524},{"time_hours":494,"approval_perbill":541318477,"support_perbill":132440477,"approval":54.1318477,"support":13.2440477},{"time_hours":495,"approval_perbill":541029207,"support_perbill":131696429,"approval":54.1029207,"support":13.1696429},{"time_hours":496,"approval_perbill":540740740,"support_perbill":130952381,"approval":54.074074,"support":13.0952381},{"time_hours":497,"approval_perbill":540453074,"support_perbill":130208334,"approval":54.0453074,"support":13.0208334},{"time_hours":498,"approval_perbill":540166205,"support_perbill":129464286,"approval":54.0166205,"support":12.9464286},{"time_hours":499,"approval_perbill":539880129,"support_perbill":128720239,"approval":53.9880129,"support":12.8720239},{"time_hours":500,"approval_perbill":539594843,"support_perbill":127976191,"approval":53.9594843,"support":12.7976191},{"time_hours":501,"approval_perbill":539310344,"support_perbill":127232143,"approval":53.9310344,"support":12.7232143},{"time_hours":502,"approval_perbill":539026630,"support_perbill":126488096,"approval":53.902663,"support":12.6488096},{"time_hours":503,"approval_perbill":538743695,"support_perbill":125744048,"approval":53.8743695,"support":12.5744048},{"time_hours":504,"approval_perbill":538461538,"support_perbill":125000000,"approval":53.8461538,"support":12.5},{"time_hours":505,"approval_perbill":538180155,"support_perbill":124255953,"approval":53.8180155,"support":12.4255953},{"time_hours":506,"approval_perbill":537899543,"support_perbill":123511905,"approval":53.7899543,"support":12.3511905},{"time_hours":507,"approval_perbill":537619699,"support_perbill":122767858,"approval":53.7619699,"support":12.2767858},{"time_hours":508,"approval_perbill":537340619,"support_perbill":122023810,"approval":53.7340619,"support":12.202381},{"time_hours":509,"approval_perbill":537062301,"support_perbill":121279762,"approval":53.7062301,"support":12.1279762},{"time_hours":510,"approval_perbill":536784741,"support_perbill":120535715,"approval":53.6784741,"support":12.0535715},{"time_hours":511,"approval_perbill":536507936,"support_perbill":119791667,"approval":53.6507936,"support":11.9791667},{"time_hours":512,"approval_perbill":536231884,"support_perbill":119047620,"approval":53.6231884,"support":11.904762},{"time_hours":513,"approval_perbill":535956580,"support_perbill":118303572,"approval":53.595658,"support":11.8303572},{"time_hours":514,"approval_perbill":535682023,"support_perbill":117559524,"approval":53.5682023,"support":11.7559524},{"time_hours":515,"approval_perbill":535408209,"support_perbill":116815477,"approval":53.5408209,"support":11.6815477},{"time_hours":516,"approval_perbill":535135135,"support_perbill":116071429,"approval":53.5135135,"support":11.6071429},{"time_hours":517,"approval_perbill":534862798,"support_perbill":115327381,"approval":53.4862798,"support":11.5327381},{"time_hours":518,"approval_perbill":534591195,"support_perbill":114583334,"approval":53.4591195,"support":11.4583334},{"time_hours":519,"approval_perbill":534320323,"support_perbill":113839286,"approval":53.4320323,"support":11.3839286},{"time_hours":520,"approval_perbill":534050179,"support_perbill":113095239,"approval":53.4050179,"support":11.3095239},{"time_hours":521,"approval_perbill":533780760,"support_perbill":112351191,"approval":53.378076,"support":11.2351191},{"time_hours":522,"approval_perbill":533512064,"support_perbill":111607143,"approval":53.3512064,"support":11.1607143},{"time_hours":523,"approval_perbill":533244087,"support_perbill":110863096,"approval":53.3244087,"support":11.0863096},{"time_hours":524,"approval_perbill":532976827,"support_perbill":110119048,"approval":53.2976827,"support":11.0119048},{"time_hours":525,"approval_perbill":532710280,"support_perbill":109375000,"approval":53.271028,"support":10.9375},{"time_hours":526,"approval_perbill":532444444,"support_perbill":108630953,"approval":53.2444444,"support":10.8630953},{"time_hours":527,"approval_perbill":532179316,"support_perbill":107886905,"approval":53.2179316,"support":10.7886905},{"time_hours":528,"approval_perbill":531914893,"support_perbill":107142858,"approval":53.1914893,"support":10.7142858},{"time_hours":529,"approval_perbill":531651173,"support_perbill":106398810,"approval":53.1651173,"support":10.639881},{"time_hours":530,"approval_perbill":531388152,"support_perbill":105654762,"approval":53.1388152,"support":10.5654762},{"time_hours":531,"approval_perbill":531125827,"support_perbill":104910715,"approval":53.1125827,"support":10.4910715},{"time_hours":532,"approval_perbill":530864197,"support_perbill":104166667,"approval":53.0864197,"support":10.4166667},{"time_hours":533,"approval_perbill":530603258,"support_perbill":103422620,"approval":53.0603258,"support":10.342262},{"time_hours":534,"approval_perbill":530343007,"support_perbill":102678572,"approval":53.0343007,"support":10.2678572},{"time_hours":535,"approval_perbill":530083443,"support_perbill":101934524,"approval":53.0083443,"support":10.1934524},{"time_hours":536,"approval_perbill":529824561,"support_perbill":101190477,"approval":52.9824561,"support":10.1190477},{"time_hours":537,"approval_perbill":529566360,"support_perbill":100446429,"approval":52.956636,"support":10.0446429},{"time_hours":538,"approval_perbill":529308836,"support_perbill":99702381,"approval":52.9308836,"support":9.9702381},{"time_hours":539,"approval_perbill":529051987,"support_perbill":98958334,"approval":52.9051987,"support":9.8958334},{"time_hours":540,"approval_perbill":528795811,"support_perbill":98214286,"approval":52.8795811,"support":9.8214286},{"time_hours":541,"approval_perbill":528540305,"support_perbill":97470239,"approval":52.8540305,"support":9.7470239},{"time_hours":542,"approval_perbill":528285465,"support_perbill":96726191,"approval":52.8285465,"support":9.6726191},{"time_hours":543,"approval_perbill":528031290,"support_perbill":95982143,"approval":52.803129,"support":9.5982143},{"time_hours":544,"approval_perbill":527777777,"support_perbill":95238096,"approval":52.7777777,"support":9.5238096},{"time_hours":545,"approval_perbill":527524924,"support_perbill":94494048,"approval":52.7524924,"support":9.4494048},{"time_hours":546,"approval_perbill":527272727,"support_perbill":93750000,"approval":52.7272727,"support":9.375},{"time_hours":547,"approval_perbill":527021184,"support_perbill":93005953,"approval":52.7021184,"support":9.3005953},{"time_hours":548,"approval_perbill":526770293,"support_perbill":92261905,"approval":52.6770293,"support":9.2261905},{"time_hours":549,"approval_perbill":526520051,"support_perbill":91517858,"approval":52.6520051,"support":9.1517858},{"time_hours":550,"approval_perbill":526270456,"support_perbill":90773810,"approval":52.6270456,"support":9.077381},{"time_hours":551,"approval_perbill":526021505,"support_perbill":90029762,"approval":52.6021505,"support":9.0029762},{"time_hours":552,"approval_perbill":525773195,"support_perbill":89285715,"approval":52.5773195,"support":8.9285715},{"time_hours":553,"approval_perbill":525525525,"support_perbill":88541667,"approval":52.5525525,"support":8.8541667},{"time_hours":554,"approval_perbill":525278491,"support_perbill":87797620,"approval":52.5278491,"support":8.779762},{"time_hours":555,"approval_perbill":525032092,"support_perbill":87053572,"approval":52.5032092,"support":8.7053572},{"time_hours":556,"approval_perbill":524786324,"support_perbill":86309524,"approval":52.4786324,"support":8.6309524},{"time_hours":557,"approval_perbill":524541186,"support_perbill":85565477,"approval":52.4541186,"support":8.5565477},{"time_hours":558,"approval_perbill":524296675,"support_perbill":84821429,"approval":52.4296675,"support":8.4821429},{"time_hours":559,"approval_perbill":524052788,"support_perbill":84077381,"approval":52.4052788,"support":8.4077381},{"time_hours":560,"approval_perbill":523809523,"support_perbill":83333334,"approval":52.3809523,"support":8.3333334},{"time_hours":561,"approval_perbill":523566878,"support_perbill":82589286,"approval":52.3566878,"support":8.2589286},{"time_hours":562,"approval_perbill":523324851,"support_perbill":81845239,"approval":52.3324851,"support":8.1845239},{"time_hours":563,"approval_perbill":523083439,"support_perbill":81101191,"approval":52.3083439,"support":8.1101191},{"time_hours":564,"approval_perbill":522842639,"support_perbill":80357143,"approval":52.2842639,"support":8.0357143},{"time_hours":565,"approval_perbill":522602450,"support_perbill":79613096,"approval":52.260245,"support":7.9613096},{"time_hours":566,"approval_perbill":522362869,"support_perbill":78869048,"approval":52.2362869,"support":7.8869048},{"time_hours":567,"approval_perbill":522123893,"support_perbill":78125000,"approval":52.2123893,"support":7.8125},{"time_hours":568,"approval_perbill":521885521,"support_perbill":77380953,"approval":52.1885521,"support":7.7380953},{"time_hours":569,"approval_perbill":521647751,"support_perbill":76636905,"approval":52.1647751,"support":7.6636905},{"time_hours":570,"approval_perbill":521410579,"support_perbill":75892858,"approval":52.1410579,"support":7.5892858},{"time_hours":571,"approval_perbill":521174004,"support_perbill":75148810,"approval":52.1174004,"support":7.514881},{"time_hours":572,"approval_perbill":520938023,"support_perbill":74404762,"approval":52.0938023,"support":7.4404762},{"time_hours":573,"approval_perbill":520702634,"support_perbill":73660715,"approval":52.0702634,"support":7.3660715},{"time_hours":574,"approval_perbill":520467836,"support_perbill":72916667,"approval":52.0467836,"support":7.2916667},{"time_hours":575,"approval_perbill":520233625,"support_perbill":72172620,"approval":52.0233625,"support":7.217262},{"time_hours":576,"approval_perbill":519999999,"support_perbill":71428572,"approval":51.9999999,"support":7.1428572},{"time_hours":577,"approval_perbill":519766957,"support_perbill":70684524,"approval":51.9766957,"support":7.0684524},{"time_hours":578,"approval_perbill":519534497,"support_perbill":69940477,"approval":51.9534497,"support":6.9940477},{"time_hours":579,"approval_perbill":519302615,"support_perbill":69196429,"approval":51.9302615,"support":6.9196429},{"time_hours":580,"approval_perbill":519071310,"support_perbill":68452381,"approval":51.907131,"support":6.8452381},{"time_hours":581,"approval_perbill":518840579,"support_perbill":67708334,"approval":51.8840579,"support":6.7708334},{"time_hours":582,"approval_perbill":518610421,"support_perbill":66964286,"approval":51.8610421,"support":6.6964286},{"time_hours":583,"approval_perbill":518380834,"support_perbill":66220239,"approval":51.8380834,"support":6.6220239},{"time_hours":584,"approval_perbill":518151815,"support_perbill":65476191,"approval":51.8151815,"support":6.5476191},{"time_hours":585,"approval_perbill":517923362,"support_perbill":64732143,"approval":51.7923362,"support":6.4732143},{"time_hours":586,"approval_perbill":517695473,"support_perbill":63988096,"approval":51.7695473,"support":6.3988096},{"time_hours":587,"approval_perbill":517468146,"support_perbill":63244048,"approval":51.7468146,"support":6.3244048},{"time_hours":588,"approval_perbill":517241379,"support_perbill":62500000,"approval":51.7241379,"support":6.25},{"time_hours":589,"approval_perbill":517015170,"support_perbill":61755953,"approval":51.701517,"support":6.1755953},{"time_hours":590,"approval_perbill":516789516,"support_perbill":61011905,"approval":51.6789516,"support":6.1011905},{"time_hours":591,"approval_perbill":516564417,"support_perbill":60267858,"approval":51.6564417,"support":6.0267858},{"time_hours":592,"approval_perbill":516339869,"support_perbill":59523810,"approval":51.6339869,"support":5.952381},{"time_hours":593,"approval_perbill":516115870,"support_perbill":58779762,"approval":51.611587,"support":5.8779762},{"time_hours":594,"approval_perbill":515892420,"support_perbill":58035715,"approval":51.589242,"support":5.8035715},{"time_hours":595,"approval_perbill":515669515,"support_perbill":57291667,"approval":51.5669515,"support":5.7291667},{"time_hours":596,"approval_perbill":515447154,"support_perbill":56547620,"approval":51.5447154,"support":5.654762},{"time_hours":597,"approval_perbill":515225334,"support_perbill":55803572,"approval":51.5225334,"support":5.5803572},{"time_hours":598,"approval_perbill":515004055,"support_perbill":55059524,"approval":51.5004055,"support":5.5059524},{"time_hours":599,"approval_perbill":514783313,"support_perbill":54315477,"approval":51.4783313,"support":5.4315477},{"time_hours":600,"approval_perbill":514563106,"support_perbill":53571429,"approval":51.4563106,"support":5.3571429},{"time_hours":601,"approval_perbill":514343434,"support_perbill":52827381,"approval":51.4343434,"support":5.2827381},{"time_hours":602,"approval_perbill":514124293,"support_perbill":52083334,"approval":51.4124293,"support":5.2083334},{"time_hours":603,"approval_perbill":513905683,"support_perbill":51339286,"approval":51.3905683,"support":5.1339286},{"time_hours":604,"approval_perbill":513687600,"support_perbill":50595239,"approval":51.36876,"support":5.0595239},{"time_hours":605,"approval_perbill":513470044,"support_perbill":49851191,"approval":51.3470044,"support":4.9851191},{"time_hours":606,"approval_perbill":513253011,"support_perbill":49107143,"approval":51.3253011,"support":4.9107143},{"time_hours":607,"approval_perbill":513036502,"support_perbill":48363096,"approval":51.3036502,"support":4.8363096},{"time_hours":608,"approval_perbill":512820512,"support_perbill":47619048,"approval":51.2820512,"support":4.7619048},{"time_hours":609,"approval_perbill":512605041,"support_perbill":46875000,"approval":51.2605041,"support":4.6875},{"time_hours":610,"approval_perbill":512390087,"support_perbill":46130953,"approval":51.2390087,"support":4.6130953},{"time_hours":611,"approval_perbill":512175648,"support_perbill":45386905,"approval":51.2175648,"support":4.5386905},{"time_hours":612,"approval_perbill":511961722,"support_perbill":44642858,"approval":51.1961722,"support":4.4642858},{"time_hours":613,"approval_perbill":511748307,"support_perbill":43898810,"approval":51.1748307,"support":4.389881},{"time_hours":614,"approval_perbill":511535401,"support_perbill":43154762,"approval":51.1535401,"support":4.3154762},{"time_hours":615,"approval_perbill":511323003,"support_perbill":42410715,"approval":51.1323003,"support":4.2410715},{"time_hours":616,"approval_perbill":511111111,"support_perbill":41666667,"approval":51.1111111,"support":4.1666667},{"time_hours":617,"approval_perbill":510899722,"support_perbill":40922620,"approval":51.0899722,"support":4.092262},{"time_hours":618,"approval_perbill":510688835,"support_perbill":40178572,"approval":51.0688835,"support":4.0178572},{"time_hours":619,"approval_perbill":510478449,"support_perbill":39434524,"approval":51.0478449,"support":3.9434524},{"time_hours":620,"approval_perbill":510268562,"support_perbill":38690477,"approval":51.0268562,"support":3.8690477},{"time_hours":621,"approval_perbill":510059171,"support_perbill":37946429,"approval":51.0059171,"support":3.7946429},{"time_hours":622,"approval_perbill":509850275,"support_perbill":37202381,"approval":50.9850275,"support":3.7202381},{"time_hours":623,"approval_perbill":509641873,"support_perbill":36458334,"approval":50.9641873,"support":3.6458334},{"time_hours":624,"approval_perbill":509433962,"support_perbill":35714286,"approval":50.9433962,"support":3.5714286},{"time_hours":625,"approval_perbill":509226540,"support_perbill":34970239,"approval":50.922654,"support":3.4970239},{"time_hours":626,"approval_perbill":509019607,"support_perbill":34226191,"approval":50.9019607,"support":3.4226191},{"time_hours":627,"approval_perbill":508813160,"support_perbill":33482143,"approval":50.881316,"support":3.3482143},{"time_hours":628,"approval_perbill":508607198,"support_perbill":32738096,"approval":50.8607198,"support":3.2738096},{"time_hours":629,"approval_perbill":508401719,"support_perbill":31994048,"approval":50.8401719,"support":3.1994048},{"time_hours":630,"approval_perbill":508196721,"support_perbill":31250000,"approval":50.8196721,"support":3.125},{"time_hours":631,"approval_perbill":507992202,"support_perbill":30505953,"approval":50.7992202,"support":3.0505953},{"time_hours":632,"approval_perbill":507788161,"support_perbill":29761905,"approval":50.7788161,"support":2.9761905},{"time_hours":633,"approval_perbill":507584597,"support_perbill":29017858,"approval":50.7584597,"support":2.9017858},{"time_hours":634,"approval_perbill":507381507,"support_perbill":28273810,"approval":50.7381507,"support":2.827381},{"time_hours":635,"approval_perbill":507178890,"support_perbill":27529762,"approval":50.717889,"support":2.7529762},{"time_hours":636,"approval_perbill":506976744,"support_perbill":26785715,"approval":50.6976744,"support":2.6785715},{"time_hours":637,"approval_perbill":506775067,"support_perbill":26041667,"approval":50.6775067,"support":2.6041667},{"time_hours":638,"approval_perbill":506573859,"support_perbill":25297620,"approval":50.6573859,"support":2.529762},{"time_hours":639,"approval_perbill":506373116,"support_perbill":24553572,"approval":50.6373116,"support":2.4553572},{"time_hours":640,"approval_perbill":506172839,"support_perbill":23809524,"approval":50.6172839,"support":2.3809524},{"time_hours":641,"approval_perbill":505973024,"support_perbill":23065477,"approval":50.5973024,"support":2.3065477},{"time_hours":642,"approval_perbill":505773671,"support_perbill":22321429,"approval":50.5773671,"support":2.2321429},{"time_hours":643,"approval_perbill":505574778,"support_perbill":21577381,"approval":50.5574778,"support":2.1577381},{"time_hours":644,"approval_perbill":505376343,"support_perbill":20833334,"approval":50.5376343,"support":2.0833334},{"time_hours":645,"approval_perbill":505178365,"support_perbill":20089286,"approval":50.5178365,"support":2.0089286},{"time_hours":646,"approval_perbill":504980842,"support_perbill":19345239,"approval":50.4980842,"support":1.9345239},{"time_hours":647,"approval_perbill":504783773,"support_perbill":18601191,"approval":50.4783773,"support":1.8601191},{"time_hours":648,"approval_perbill":504587155,"support_perbill":17857143,"approval":50.4587155,"support":1.7857143},{"time_hours":649,"approval_perbill":504390988,"support_perbill":17113096,"approval":50.4390988,"support":1.7113096},{"time_hours":650,"approval_perbill":504195270,"support_perbill":16369048,"approval":50.419527,"support":1.6369048},{"time_hours":651,"approval_perbill":503999999,"support_perbill":15625000,"approval":50.3999999,"support":1.5625},{"time_hours":652,"approval_perbill":503805174,"support_perbill":14880953,"approval":50.3805174,"support":1.4880953},{"time_hours":653,"approval_perbill":503610794,"support_perbill":14136905,"approval":50.3610794,"support":1.4136905},{"time_hours":654,"approval_perbill":503416856,"support_perbill":13392858,"approval":50.3416856,"support":1.3392858},{"time_hours":655,"approval_perbill":503223359,"support_perbill":12648810,"approval":50.3223359,"support":1.264881},{"time_hours":656,"approval_perbill":503030302,"support_perbill":11904762,"approval":50.3030302,"support":1.1904762},{"time_hours":657,"approval_perbill":502837684,"support_perbill":11160715,"approval":50.2837684,"support":1.1160715},{"time_hours":658,"approval_perbill":502645502,"support_perbill":10416667,"approval":50.2645502,"support":1.0416667},{"time_hours":659,"approval_perbill":502453756,"support_perbill":9672620,"approval":50.2453756,"support":0.967262},{"time_hours":660,"approval_perbill":502262443,"support_perbill":8928572,"approval":50.2262443,"support":0.8928572},{"time_hours":661,"approval_perbill":502071562,"support_perbill":8184524,"approval":50.2071562,"support":0.8184524},{"time_hours":662,"approval_perbill":501881113,"support_perbill":7440477,"approval":50.1881113,"support":0.7440477},{"time_hours":663,"approval_perbill":501691093,"support_perbill":6696429,"approval":50.1691093,"support":0.6696429},{"time_hours":664,"approval_perbill":501501501,"support_perbill":5952381,"approval":50.1501501,"support":0.5952381},{"time_hours":665,"approval_perbill":501312335,"support_perbill":5208334,"approval":50.1312335,"support":0.5208334},{"time_hours":666,"approval_perbill":501123595,"support_perbill":4464286,"approval":50.1123595,"support":0.4464286},{"time_hours":667,"approval_perbill":500935278,"support_perbill":3720239,"approval":50.0935278,"support":0.3720239},{"time_hours":668,"approval_perbill":500747383,"support_perbill":2976191,"approval":50.0747383,"support":0.2976191},{"time_hours":669,"approval_perbill":500559910,"support_perbill":2232143,"approval":50.055991,"support":0.2232143},{"time_hours":670,"approval_perbill":500372855,"support_perbill":1488096,"approval":50.0372855,"support":0.1488096},{"time_hours":671,"approval_perbill":500186219,"support_perbill":744048,"approval":50.0186219,"support":0.0744048},{"time_hours":672,"approval_perbill":499999999,"support_perbill":0,"approval":49.9999999,"support":0}]')},23738:p=>{"use strict";p.exports=JSON.parse('[{"time_hours":0,"approval_perbill":999999999,"support_perbill":499999995,"approval":99.9999999,"support":49.9999995,"days":0,"dot_needed":"567,056,294"},{"time_hours":1,"approval_perbill":997357396,"support_perbill":466482761,"approval":99.7357396,"support":46.6482761,"days":1,"dot_needed":"529,043,977"},{"time_hours":2,"approval_perbill":994734815,"support_perbill":437532142,"approval":99.4734815,"support":43.7532142,"days":1,"dot_needed":"496,210,715"},{"time_hours":3,"approval_perbill":992132029,"support_perbill":412274381,"approval":99.2132029,"support":41.2274381,"days":1,"dot_needed":"467,565,570"},{"time_hours":4,"approval_perbill":989548816,"support_perbill":390045264,"approval":98.9548816,"support":39.0045264,"days":1,"dot_needed":"442,355,248"},{"time_hours":5,"approval_perbill":986984953,"support_perbill":370330849,"approval":98.6984953,"support":37.0330849,"days":1,"dot_needed":"419,996,882"},{"time_hours":6,"approval_perbill":984440228,"support_perbill":352727281,"approval":98.4440228,"support":35.2727281,"days":1,"dot_needed":"400,032,454"},{"time_hours":7,"approval_perbill":981914425,"support_perbill":336912763,"approval":98.1914425,"support":33.6912763,"days":1,"dot_needed":"382,097,010"},{"time_hours":8,"approval_perbill":979407334,"support_perbill":322627750,"approval":97.9407334,"support":32.262775,"days":1,"dot_needed":"365,896,196"},{"time_hours":9,"approval_perbill":976918747,"support_perbill":309660581,"approval":97.6918747,"support":30.9660581,"days":1,"dot_needed":"351,189,967"},{"time_hours":10,"approval_perbill":974448461,"support_perbill":297836947,"approval":97.4448461,"support":29.7836947,"days":1,"dot_needed":"337,780,634"},{"time_hours":11,"approval_perbill":971996276,"support_perbill":287011962,"approval":97.1996276,"support":28.7011962,"days":1,"dot_needed":"325,503,882"},{"time_hours":12,"approval_perbill":969561991,"support_perbill":277064231,"approval":96.9561991,"support":27.7064231,"days":1,"dot_needed":"314,222,035"},{"time_hours":13,"approval_perbill":967145411,"support_perbill":267891263,"approval":96.7145411,"support":26.7891263,"days":1,"dot_needed":"303,818,857"},{"time_hours":14,"approval_perbill":964746346,"support_perbill":259405948,"approval":96.4746346,"support":25.9405948,"days":1,"dot_needed":"294,195,554"},{"time_hours":15,"approval_perbill":962364606,"support_perbill":251533751,"approval":96.2364606,"support":25.1533751,"days":1,"dot_needed":"285,267,596"},{"time_hours":16,"approval_perbill":960000002,"support_perbill":244210536,"approval":96.0000002,"support":24.4210536,"days":1,"dot_needed":"276,962,246"},{"time_hours":17,"approval_perbill":957652349,"support_perbill":237380807,"approval":95.7652349,"support":23.7380807,"days":1,"dot_needed":"269,216,564"},{"time_hours":18,"approval_perbill":955321468,"support_perbill":230996317,"approval":95.5321468,"support":23.0996317,"days":1,"dot_needed":"261,975,834"},{"time_hours":19,"approval_perbill":953007180,"support_perbill":225014897,"approval":95.300718,"support":22.5014897,"days":1,"dot_needed":"255,192,230"},{"time_hours":20,"approval_perbill":950709307,"support_perbill":219399546,"approval":95.0709307,"support":21.9399546,"days":1,"dot_needed":"248,823,790"},{"time_hours":21,"approval_perbill":948427674,"support_perbill":214117653,"approval":94.8427674,"support":21.4117653,"days":1,"dot_needed":"242,833,528"},{"time_hours":22,"approval_perbill":946162112,"support_perbill":209140376,"approval":94.6162112,"support":20.9140376,"days":1,"dot_needed":"237,188,736"},{"time_hours":23,"approval_perbill":943912450,"support_perbill":204442101,"approval":94.391245,"support":20.4442101,"days":1,"dot_needed":"231,860,363"},{"time_hours":24,"approval_perbill":941678522,"support_perbill":200000007,"approval":94.1678522,"support":20.0000007,"days":1,"dot_needed":"226,822,528"},{"time_hours":25,"approval_perbill":939460164,"support_perbill":195793698,"approval":93.9460164,"support":19.5793698,"days":2,"dot_needed":"222,052,100"},{"time_hours":26,"approval_perbill":937257211,"support_perbill":191804884,"approval":93.7257211,"support":19.1804884,"days":2,"dot_needed":"217,528,336"},{"time_hours":27,"approval_perbill":935069507,"support_perbill":188017125,"approval":93.5069507,"support":18.8017125,"days":2,"dot_needed":"213,232,590"},{"time_hours":28,"approval_perbill":932896892,"support_perbill":184415591,"approval":93.2896892,"support":18.4415591,"days":2,"dot_needed":"209,148,045"},{"time_hours":29,"approval_perbill":930739211,"support_perbill":180986879,"approval":93.0739211,"support":18.0986879,"days":2,"dot_needed":"205,259,500"},{"time_hours":30,"approval_perbill":928596309,"support_perbill":177718838,"approval":92.8596309,"support":17.7718838,"days":2,"dot_needed":"201,553,173"},{"time_hours":31,"approval_perbill":926468037,"support_perbill":174600438,"approval":92.6468037,"support":17.4600438,"days":2,"dot_needed":"198,016,557"},{"time_hours":32,"approval_perbill":924354246,"support_perbill":171621628,"approval":92.4354246,"support":17.1621628,"days":2,"dot_needed":"194,638,251"},{"time_hours":33,"approval_perbill":922254786,"support_perbill":168773240,"approval":92.2254786,"support":16.877324,"days":2,"dot_needed":"191,407,858"},{"time_hours":34,"approval_perbill":920169512,"support_perbill":166046892,"approval":92.0169512,"support":16.6046892,"days":2,"dot_needed":"188,315,872"},{"time_hours":35,"approval_perbill":918098284,"support_perbill":163434908,"approval":91.8098284,"support":16.3434908,"days":2,"dot_needed":"185,353,588"},{"time_hours":36,"approval_perbill":916040958,"support_perbill":160930238,"approval":91.6040958,"support":16.0930238,"days":2,"dot_needed":"182,513,011"},{"time_hours":37,"approval_perbill":913997395,"support_perbill":158526401,"approval":91.3997395,"support":15.8526401,"days":2,"dot_needed":"179,786,789"},{"time_hours":38,"approval_perbill":911967455,"support_perbill":156217428,"approval":91.1967455,"support":15.6217428,"days":2,"dot_needed":"177,168,153"},{"time_hours":39,"approval_perbill":909951007,"support_perbill":153997814,"approval":90.9951007,"support":15.3997814,"days":2,"dot_needed":"174,650,861"},{"time_hours":40,"approval_perbill":907947914,"support_perbill":151862469,"approval":90.7947914,"support":15.1862469,"days":2,"dot_needed":"172,229,140"},{"time_hours":41,"approval_perbill":905958044,"support_perbill":149806684,"approval":90.5958044,"support":14.9806684,"days":2,"dot_needed":"169,897,648"},{"time_hours":42,"approval_perbill":903981266,"support_perbill":147826091,"approval":90.3981266,"support":14.7826091,"days":2,"dot_needed":"167,651,432"},{"time_hours":43,"approval_perbill":902017453,"support_perbill":145916643,"approval":90.2017453,"support":14.5916643,"days":2,"dot_needed":"165,485,903"},{"time_hours":44,"approval_perbill":900066477,"support_perbill":144074572,"approval":90.0066477,"support":14.4074572,"days":2,"dot_needed":"163,396,787"},{"time_hours":45,"approval_perbill":898128212,"support_perbill":142296374,"approval":89.8128212,"support":14.2296374,"days":2,"dot_needed":"161,380,111"},{"time_hours":46,"approval_perbill":896202534,"support_perbill":140578783,"approval":89.6202534,"support":14.0578783,"days":2,"dot_needed":"159,432,169"},{"time_hours":47,"approval_perbill":894289321,"support_perbill":138918752,"approval":89.4289321,"support":13.8918752,"days":2,"dot_needed":"157,549,507"},{"time_hours":48,"approval_perbill":892388454,"support_perbill":137313437,"approval":89.2388454,"support":13.7313437,"days":2,"dot_needed":"155,728,899"},{"time_hours":49,"approval_perbill":890499812,"support_perbill":135760176,"approval":89.0499812,"support":13.5760176,"days":3,"dot_needed":"153,967,326"},{"time_hours":50,"approval_perbill":888623278,"support_perbill":134256476,"approval":88.8623278,"support":13.4256476,"days":3,"dot_needed":"152,261,961"},{"time_hours":51,"approval_perbill":886758735,"support_perbill":132800004,"approval":88.6758735,"support":13.2800004,"days":3,"dot_needed":"150,610,158"},{"time_hours":52,"approval_perbill":884906070,"support_perbill":131388569,"approval":88.490607,"support":13.1388569,"days":3,"dot_needed":"149,009,432"},{"time_hours":53,"approval_perbill":883065170,"support_perbill":130020113,"approval":88.306517,"support":13.0020113,"days":3,"dot_needed":"147,457,448"},{"time_hours":54,"approval_perbill":881235922,"support_perbill":128692704,"approval":88.1235922,"support":12.8692704,"days":3,"dot_needed":"145,952,017"},{"time_hours":55,"approval_perbill":879418215,"support_perbill":127404520,"approval":87.9418215,"support":12.740452,"days":3,"dot_needed":"144,491,071"},{"time_hours":56,"approval_perbill":877611943,"support_perbill":126153850,"approval":87.7611943,"support":12.615385,"days":3,"dot_needed":"143,072,671"},{"time_hours":57,"approval_perbill":875816996,"support_perbill":124939078,"approval":87.5816996,"support":12.4939078,"days":3,"dot_needed":"141,694,983"},{"time_hours":58,"approval_perbill":874033269,"support_perbill":123758680,"approval":87.4033269,"support":12.375868,"days":3,"dot_needed":"140,356,278"},{"time_hours":59,"approval_perbill":872260656,"support_perbill":122611217,"approval":87.2260656,"support":12.2611217,"days":3,"dot_needed":"139,054,926"},{"time_hours":60,"approval_perbill":870499055,"support_perbill":121495330,"approval":87.0499055,"support":12.149533,"days":3,"dot_needed":"137,789,385"},{"time_hours":61,"approval_perbill":868748363,"support_perbill":120409734,"approval":86.8748363,"support":12.0409734,"days":3,"dot_needed":"136,558,196"},{"time_hours":62,"approval_perbill":867008478,"support_perbill":119353212,"approval":86.7008478,"support":11.9353212,"days":3,"dot_needed":"135,359,982"},{"time_hours":63,"approval_perbill":865279301,"support_perbill":118324610,"approval":86.5279301,"support":11.832461,"days":3,"dot_needed":"134,193,431"},{"time_hours":64,"approval_perbill":863560734,"support_perbill":117322838,"approval":86.3560734,"support":11.7322838,"days":3,"dot_needed":"133,057,309"},{"time_hours":65,"approval_perbill":861852680,"support_perbill":116346858,"approval":86.185268,"support":11.6346858,"days":3,"dot_needed":"131,950,438"},{"time_hours":66,"approval_perbill":860155042,"support_perbill":115395687,"approval":86.0155042,"support":11.5395687,"days":3,"dot_needed":"130,871,703"},{"time_hours":67,"approval_perbill":858467724,"support_perbill":114468391,"approval":85.8467724,"support":11.4468391,"days":3,"dot_needed":"129,820,045"},{"time_hours":68,"approval_perbill":856790633,"support_perbill":113564081,"approval":85.6790633,"support":11.3564081,"days":3,"dot_needed":"128,794,455"},{"time_hours":69,"approval_perbill":855123677,"support_perbill":112681916,"approval":85.5123677,"support":11.2681916,"days":3,"dot_needed":"127,793,981"},{"time_hours":70,"approval_perbill":853466765,"support_perbill":111821089,"approval":85.3466765,"support":11.1821089,"days":3,"dot_needed":"126,817,706"},{"time_hours":71,"approval_perbill":851819805,"support_perbill":110980837,"approval":85.1819805,"support":11.0980837,"days":3,"dot_needed":"125,864,766"},{"time_hours":72,"approval_perbill":850182706,"support_perbill":110160430,"approval":85.0182706,"support":11.016043,"days":3,"dot_needed":"124,934,332"},{"time_hours":73,"approval_perbill":848555384,"support_perbill":109359175,"approval":84.8555384,"support":10.9359175,"days":4,"dot_needed":"124,025,618"},{"time_hours":74,"approval_perbill":846937749,"support_perbill":108576407,"approval":84.6937749,"support":10.8576407,"days":4,"dot_needed":"123,137,871"},{"time_hours":75,"approval_perbill":845329715,"support_perbill":107811494,"approval":84.5329715,"support":10.7811494,"days":4,"dot_needed":"122,270,374"},{"time_hours":76,"approval_perbill":843731196,"support_perbill":107063832,"approval":84.3731196,"support":10.7063832,"days":4,"dot_needed":"121,422,441"},{"time_hours":77,"approval_perbill":842142110,"support_perbill":106332845,"approval":84.214211,"support":10.6332845,"days":4,"dot_needed":"120,593,419"},{"time_hours":78,"approval_perbill":840562372,"support_perbill":105617980,"approval":84.0562372,"support":10.561798,"days":4,"dot_needed":"119,782,682"},{"time_hours":79,"approval_perbill":838991901,"support_perbill":104918710,"approval":83.8991901,"support":10.491871,"days":4,"dot_needed":"118,989,631"},{"time_hours":80,"approval_perbill":837430613,"support_perbill":104234530,"approval":83.7430613,"support":10.423453,"days":4,"dot_needed":"118,213,694"},{"time_hours":81,"approval_perbill":835878431,"support_perbill":103564957,"approval":83.5878431,"support":10.3564957,"days":4,"dot_needed":"117,454,323"},{"time_hours":82,"approval_perbill":834335274,"support_perbill":102909528,"approval":83.4335274,"support":10.2909528,"days":4,"dot_needed":"116,710,992"},{"time_hours":83,"approval_perbill":832801064,"support_perbill":102267800,"approval":83.2801064,"support":10.22678,"days":4,"dot_needed":"115,983,201"},{"time_hours":84,"approval_perbill":831275722,"support_perbill":101639346,"approval":83.1275722,"support":10.1639346,"days":4,"dot_needed":"115,270,463"},{"time_hours":85,"approval_perbill":829759174,"support_perbill":101023761,"approval":82.9759174,"support":10.1023761,"days":4,"dot_needed":"114,572,320"},{"time_hours":86,"approval_perbill":828251342,"support_perbill":100420652,"approval":82.8251342,"support":10.0420652,"days":4,"dot_needed":"113,888,327"},{"time_hours":87,"approval_perbill":826752152,"support_perbill":99829645,"approval":82.6752152,"support":9.9829645,"days":4,"dot_needed":"113,218,058"},{"time_hours":88,"approval_perbill":825261530,"support_perbill":99250377,"approval":82.526153,"support":9.9250377,"days":4,"dot_needed":"112,561,103"},{"time_hours":89,"approval_perbill":823779401,"support_perbill":98682503,"approval":82.3779401,"support":9.8682503,"days":4,"dot_needed":"111,917,070"},{"time_hours":90,"approval_perbill":822305695,"support_perbill":98125691,"approval":82.2305695,"support":9.8125691,"days":4,"dot_needed":"111,285,583"},{"time_hours":91,"approval_perbill":820840339,"support_perbill":97579620,"approval":82.0840339,"support":9.757962,"days":4,"dot_needed":"110,666,277"},{"time_hours":92,"approval_perbill":819383263,"support_perbill":97043982,"approval":81.9383263,"support":9.7043982,"days":4,"dot_needed":"110,058,803"},{"time_hours":93,"approval_perbill":817934396,"support_perbill":96518481,"approval":81.7934396,"support":9.6518481,"days":4,"dot_needed":"109,462,825"},{"time_hours":94,"approval_perbill":816493670,"support_perbill":96002832,"approval":81.649367,"support":9.6002832,"days":4,"dot_needed":"108,878,021"},{"time_hours":95,"approval_perbill":815061016,"support_perbill":95496760,"approval":81.5061016,"support":9.549676,"days":4,"dot_needed":"108,304,079"},{"time_hours":96,"approval_perbill":813636367,"support_perbill":95000002,"approval":81.3636367,"support":9.5000002,"days":4,"dot_needed":"107,740,699"},{"time_hours":97,"approval_perbill":812219654,"support_perbill":94512302,"approval":81.2219654,"support":9.4512302,"days":5,"dot_needed":"107,187,593"},{"time_hours":98,"approval_perbill":810810814,"support_perbill":94033415,"approval":81.0810814,"support":9.4033415,"days":5,"dot_needed":"106,644,481"},{"time_hours":99,"approval_perbill":809409779,"support_perbill":93563104,"approval":80.9409779,"support":9.3563104,"days":5,"dot_needed":"106,111,095"},{"time_hours":100,"approval_perbill":808016486,"support_perbill":93101141,"approval":80.8016486,"support":9.3101141,"days":5,"dot_needed":"105,587,177"},{"time_hours":101,"approval_perbill":806630869,"support_perbill":92647305,"approval":80.6630869,"support":9.2647305,"days":5,"dot_needed":"105,072,476"},{"time_hours":102,"approval_perbill":805252867,"support_perbill":92201384,"approval":80.5252867,"support":9.2201384,"days":5,"dot_needed":"104,566,751"},{"time_hours":103,"approval_perbill":803882416,"support_perbill":91763173,"approval":80.3882416,"support":9.1763173,"days":5,"dot_needed":"104,069,771"},{"time_hours":104,"approval_perbill":802519455,"support_perbill":91332473,"approval":80.2519455,"support":9.1332473,"days":5,"dot_needed":"103,581,308"},{"time_hours":105,"approval_perbill":801163921,"support_perbill":90909092,"approval":80.1163921,"support":9.0909092,"days":5,"dot_needed":"103,101,147"},{"time_hours":106,"approval_perbill":799815756,"support_perbill":90492847,"approval":79.9815756,"support":9.0492847,"days":5,"dot_needed":"102,629,078"},{"time_hours":107,"approval_perbill":798474898,"support_perbill":90083558,"approval":79.8474898,"support":9.0083558,"days":5,"dot_needed":"102,164,898"},{"time_hours":108,"approval_perbill":797141290,"support_perbill":89681052,"approval":79.714129,"support":8.9681052,"days":5,"dot_needed":"101,708,411"},{"time_hours":109,"approval_perbill":795814871,"support_perbill":89285162,"approval":79.5814871,"support":8.9285162,"days":5,"dot_needed":"101,259,427"},{"time_hours":110,"approval_perbill":794495583,"support_perbill":88895726,"approval":79.4495583,"support":8.8895726,"days":5,"dot_needed":"100,817,763"},{"time_hours":111,"approval_perbill":793183370,"support_perbill":88512587,"approval":79.318337,"support":8.8512587,"days":5,"dot_needed":"100,383,240"},{"time_hours":112,"approval_perbill":791878176,"support_perbill":88135595,"approval":79.1878176,"support":8.8135595,"days":5,"dot_needed":"99,955,689"},{"time_hours":113,"approval_perbill":790579943,"support_perbill":87764602,"approval":79.0579943,"support":8.7764602,"days":5,"dot_needed":"99,534,941"},{"time_hours":114,"approval_perbill":789288615,"support_perbill":87399465,"approval":78.9288615,"support":8.7399465,"days":5,"dot_needed":"99,120,834"},{"time_hours":115,"approval_perbill":788004139,"support_perbill":87040049,"approval":78.8004139,"support":8.7040049,"days":5,"dot_needed":"98,713,216"},{"time_hours":116,"approval_perbill":786726461,"support_perbill":86686218,"approval":78.6726461,"support":8.6686218,"days":5,"dot_needed":"98,311,932"},{"time_hours":117,"approval_perbill":785455525,"support_perbill":86337845,"approval":78.5455525,"support":8.6337845,"days":5,"dot_needed":"97,916,838"},{"time_hours":118,"approval_perbill":784191278,"support_perbill":85994804,"approval":78.4191278,"support":8.5994804,"days":5,"dot_needed":"97,527,791"},{"time_hours":119,"approval_perbill":782933668,"support_perbill":85656972,"approval":78.2933668,"support":8.5656972,"days":5,"dot_needed":"97,144,651"},{"time_hours":120,"approval_perbill":781682644,"support_perbill":85324233,"approval":78.1682644,"support":8.5324233,"days":5,"dot_needed":"96,767,288"},{"time_hours":121,"approval_perbill":780438153,"support_perbill":84996473,"approval":78.0438153,"support":8.4996473,"days":6,"dot_needed":"96,395,571"},{"time_hours":122,"approval_perbill":779200144,"support_perbill":84673579,"approval":77.9200144,"support":8.4673579,"days":6,"dot_needed":"96,029,373"},{"time_hours":123,"approval_perbill":777968567,"support_perbill":84355446,"approval":77.7968567,"support":8.4355446,"days":6,"dot_needed":"95,668,574"},{"time_hours":124,"approval_perbill":776743372,"support_perbill":84041967,"approval":77.6743372,"support":8.4041967,"days":6,"dot_needed":"95,313,054"},{"time_hours":125,"approval_perbill":775524509,"support_perbill":83733042,"approval":77.5524509,"support":8.3733042,"days":6,"dot_needed":"94,962,698"},{"time_hours":126,"approval_perbill":774311929,"support_perbill":83428573,"approval":77.4311929,"support":8.3428573,"days":6,"dot_needed":"94,617,396"},{"time_hours":127,"approval_perbill":773105585,"support_perbill":83128463,"approval":77.3105585,"support":8.3128463,"days":6,"dot_needed":"94,277,037"},{"time_hours":128,"approval_perbill":771905427,"support_perbill":82832619,"approval":77.1905427,"support":8.2832619,"days":6,"dot_needed":"93,941,517"},{"time_hours":129,"approval_perbill":770711409,"support_perbill":82540952,"approval":77.0711409,"support":8.2540952,"days":6,"dot_needed":"93,610,734"},{"time_hours":130,"approval_perbill":769523483,"support_perbill":82253373,"approval":76.9523483,"support":8.2253373,"days":6,"dot_needed":"93,284,587"},{"time_hours":131,"approval_perbill":768341603,"support_perbill":81969798,"approval":76.8341603,"support":8.1969798,"days":6,"dot_needed":"92,962,981"},{"time_hours":132,"approval_perbill":767165723,"support_perbill":81690142,"approval":76.7165723,"support":8.1690142,"days":6,"dot_needed":"92,645,819"},{"time_hours":133,"approval_perbill":765995798,"support_perbill":81414326,"approval":76.5995798,"support":8.1414326,"days":6,"dot_needed":"92,333,013"},{"time_hours":134,"approval_perbill":764831781,"support_perbill":81142270,"approval":76.4831781,"support":8.114227,"days":6,"dot_needed":"92,024,471"},{"time_hours":135,"approval_perbill":763673629,"support_perbill":80873899,"approval":76.3673629,"support":8.0873899,"days":6,"dot_needed":"91,720,108"},{"time_hours":136,"approval_perbill":762521298,"support_perbill":80609138,"approval":76.2521298,"support":8.0609138,"days":6,"dot_needed":"91,419,839"},{"time_hours":137,"approval_perbill":761374743,"support_perbill":80347915,"approval":76.1374743,"support":8.0347915,"days":6,"dot_needed":"91,123,583"},{"time_hours":138,"approval_perbill":760233921,"support_perbill":80090159,"approval":76.0233921,"support":8.0090159,"days":6,"dot_needed":"90,831,258"},{"time_hours":139,"approval_perbill":759098790,"support_perbill":79835801,"approval":75.909879,"support":7.9835801,"days":6,"dot_needed":"90,542,788"},{"time_hours":140,"approval_perbill":757969306,"support_perbill":79584776,"approval":75.7969306,"support":7.9584776,"days":6,"dot_needed":"90,258,097"},{"time_hours":141,"approval_perbill":756845429,"support_perbill":79337018,"approval":75.6845429,"support":7.9337018,"days":6,"dot_needed":"89,977,112"},{"time_hours":142,"approval_perbill":755727116,"support_perbill":79092463,"approval":75.5727116,"support":7.9092463,"days":6,"dot_needed":"89,699,759"},{"time_hours":143,"approval_perbill":754614325,"support_perbill":78851049,"approval":75.4614325,"support":7.8851049,"days":6,"dot_needed":"89,425,968"},{"time_hours":144,"approval_perbill":753507017,"support_perbill":78612718,"approval":75.3507017,"support":7.8612718,"days":6,"dot_needed":"89,155,674"},{"time_hours":145,"approval_perbill":752405151,"support_perbill":78377409,"approval":75.2405151,"support":7.8377409,"days":7,"dot_needed":"88,888,807"},{"time_hours":146,"approval_perbill":751308686,"support_perbill":78145066,"approval":75.1308686,"support":7.8145066,"days":7,"dot_needed":"88,625,304"},{"time_hours":147,"approval_perbill":750217583,"support_perbill":77915634,"approval":75.0217583,"support":7.7915634,"days":7,"dot_needed":"88,365,102"},{"time_hours":148,"approval_perbill":749131804,"support_perbill":77689057,"approval":74.9131804,"support":7.7689057,"days":7,"dot_needed":"88,108,138"},{"time_hours":149,"approval_perbill":748051308,"support_perbill":77465283,"approval":74.8051308,"support":7.7465283,"days":7,"dot_needed":"87,854,354"},{"time_hours":150,"approval_perbill":746976058,"support_perbill":77244260,"approval":74.6976058,"support":7.724426,"days":7,"dot_needed":"87,603,689"},{"time_hours":151,"approval_perbill":745906016,"support_perbill":77025938,"approval":74.5906016,"support":7.7025938,"days":7,"dot_needed":"87,356,087"},{"time_hours":152,"approval_perbill":744841143,"support_perbill":76810267,"approval":74.4841143,"support":7.6810267,"days":7,"dot_needed":"87,111,492"},{"time_hours":153,"approval_perbill":743781402,"support_perbill":76597199,"approval":74.3781402,"support":7.6597199,"days":7,"dot_needed":"86,869,849"},{"time_hours":154,"approval_perbill":742726757,"support_perbill":76386689,"approval":74.2726757,"support":7.6386689,"days":7,"dot_needed":"86,631,106"},{"time_hours":155,"approval_perbill":741677171,"support_perbill":76178689,"approval":74.1677171,"support":7.6178689,"days":7,"dot_needed":"86,395,211"},{"time_hours":156,"approval_perbill":740632606,"support_perbill":75973155,"approval":74.0632606,"support":7.5973155,"days":7,"dot_needed":"86,162,112"},{"time_hours":157,"approval_perbill":739593028,"support_perbill":75770044,"approval":73.9593028,"support":7.5770044,"days":7,"dot_needed":"85,931,762"},{"time_hours":158,"approval_perbill":738558402,"support_perbill":75569313,"approval":73.8558402,"support":7.5569313,"days":7,"dot_needed":"85,704,110"},{"time_hours":159,"approval_perbill":737528690,"support_perbill":75370921,"approval":73.752869,"support":7.5370921,"days":7,"dot_needed":"85,479,111"},{"time_hours":160,"approval_perbill":736503859,"support_perbill":75174826,"approval":73.6503859,"support":7.5174826,"days":7,"dot_needed":"85,256,717"},{"time_hours":161,"approval_perbill":735483874,"support_perbill":74980989,"approval":73.5483874,"support":7.4980989,"days":7,"dot_needed":"85,036,884"},{"time_hours":162,"approval_perbill":734468701,"support_perbill":74789372,"approval":73.4468701,"support":7.4789372,"days":7,"dot_needed":"84,819,569"},{"time_hours":163,"approval_perbill":733458305,"support_perbill":74599936,"approval":73.3458305,"support":7.4599936,"days":7,"dot_needed":"84,604,727"},{"time_hours":164,"approval_perbill":732452653,"support_perbill":74412645,"approval":73.2452653,"support":7.4412645,"days":7,"dot_needed":"84,392,318"},{"time_hours":165,"approval_perbill":731451712,"support_perbill":74227462,"approval":73.1451712,"support":7.4227462,"days":7,"dot_needed":"84,182,300"},{"time_hours":166,"approval_perbill":730455448,"support_perbill":74044351,"approval":73.0455448,"support":7.4044351,"days":7,"dot_needed":"83,974,631"},{"time_hours":167,"approval_perbill":729463830,"support_perbill":73863279,"approval":72.946383,"support":7.3863279,"days":7,"dot_needed":"83,769,275"},{"time_hours":168,"approval_perbill":728476824,"support_perbill":73684211,"approval":72.8476824,"support":7.3684211,"days":7,"dot_needed":"83,566,192"},{"time_hours":169,"approval_perbill":727494398,"support_perbill":73507115,"approval":72.7494398,"support":7.3507115,"days":8,"dot_needed":"83,365,345"},{"time_hours":170,"approval_perbill":726516522,"support_perbill":73331957,"approval":72.6516522,"support":7.3331957,"days":8,"dot_needed":"83,166,696"},{"time_hours":171,"approval_perbill":725543162,"support_perbill":73158706,"approval":72.5543162,"support":7.3158706,"days":8,"dot_needed":"82,970,210"},{"time_hours":172,"approval_perbill":724574288,"support_perbill":72987332,"approval":72.4574288,"support":7.2987332,"days":8,"dot_needed":"82,775,853"},{"time_hours":173,"approval_perbill":723609869,"support_perbill":72817804,"approval":72.3609869,"support":7.2817804,"days":8,"dot_needed":"82,583,589"},{"time_hours":174,"approval_perbill":722649875,"support_perbill":72650092,"approval":72.2649875,"support":7.2650092,"days":8,"dot_needed":"82,393,385"},{"time_hours":175,"approval_perbill":721694274,"support_perbill":72484167,"approval":72.1694274,"support":7.2484167,"days":8,"dot_needed":"82,205,207"},{"time_hours":176,"approval_perbill":720743037,"support_perbill":72320001,"approval":72.0743037,"support":7.2320001,"days":8,"dot_needed":"82,019,024"},{"time_hours":177,"approval_perbill":719796134,"support_perbill":72157565,"approval":71.9796134,"support":7.2157565,"days":8,"dot_needed":"81,834,804"},{"time_hours":178,"approval_perbill":718853535,"support_perbill":71996834,"approval":71.8853535,"support":7.1996834,"days":8,"dot_needed":"81,652,517"},{"time_hours":179,"approval_perbill":717915212,"support_perbill":71837780,"approval":71.7915212,"support":7.183778,"days":8,"dot_needed":"81,472,131"},{"time_hours":180,"approval_perbill":716981135,"support_perbill":71680377,"approval":71.6981135,"support":7.1680377,"days":8,"dot_needed":"81,293,619"},{"time_hours":181,"approval_perbill":716051275,"support_perbill":71524599,"approval":71.6051275,"support":7.1524599,"days":8,"dot_needed":"81,116,949"},{"time_hours":182,"approval_perbill":715125604,"support_perbill":71370421,"approval":71.5125604,"support":7.1370421,"days":8,"dot_needed":"80,942,094"},{"time_hours":183,"approval_perbill":714204094,"support_perbill":71217819,"approval":71.4204094,"support":7.1217819,"days":8,"dot_needed":"80,769,026"},{"time_hours":184,"approval_perbill":713286716,"support_perbill":71066770,"approval":71.3286716,"support":7.106677,"days":8,"dot_needed":"80,597,719"},{"time_hours":185,"approval_perbill":712373443,"support_perbill":70917248,"approval":71.2373443,"support":7.0917248,"days":8,"dot_needed":"80,428,145"},{"time_hours":186,"approval_perbill":711464248,"support_perbill":70769231,"approval":71.1464248,"support":7.0769231,"days":8,"dot_needed":"80,260,277"},{"time_hours":187,"approval_perbill":710559103,"support_perbill":70622697,"approval":71.0559103,"support":7.0622697,"days":8,"dot_needed":"80,094,091"},{"time_hours":188,"approval_perbill":709657981,"support_perbill":70477624,"approval":70.9657981,"support":7.0477624,"days":8,"dot_needed":"79,929,561"},{"time_hours":189,"approval_perbill":708760855,"support_perbill":70333989,"approval":70.8760855,"support":7.0333989,"days":8,"dot_needed":"79,766,663"},{"time_hours":190,"approval_perbill":707867699,"support_perbill":70191771,"approval":70.7867699,"support":7.0191771,"days":8,"dot_needed":"79,605,372"},{"time_hours":191,"approval_perbill":706978487,"support_perbill":70050950,"approval":70.6978487,"support":7.005095,"days":8,"dot_needed":"79,445,665"},{"time_hours":192,"approval_perbill":706093193,"support_perbill":69911505,"approval":70.6093193,"support":6.9911505,"days":8,"dot_needed":"79,287,519"},{"time_hours":193,"approval_perbill":705211790,"support_perbill":69773416,"approval":70.521179,"support":6.9773416,"days":9,"dot_needed":"79,130,910"},{"time_hours":194,"approval_perbill":704334253,"support_perbill":69636663,"approval":70.4334253,"support":6.9636663,"days":9,"dot_needed":"78,975,817"},{"time_hours":195,"approval_perbill":703460557,"support_perbill":69501227,"approval":70.3460557,"support":6.9501227,"days":9,"dot_needed":"78,822,217"},{"time_hours":196,"approval_perbill":702590676,"support_perbill":69367089,"approval":70.2590676,"support":6.9367089,"days":9,"dot_needed":"78,670,090"},{"time_hours":197,"approval_perbill":701724587,"support_perbill":69234231,"approval":70.1724587,"support":6.9234231,"days":9,"dot_needed":"78,519,414"},{"time_hours":198,"approval_perbill":700862262,"support_perbill":69102633,"approval":70.0862262,"support":6.9102633,"days":9,"dot_needed":"78,370,167"},{"time_hours":199,"approval_perbill":700003680,"support_perbill":68972280,"approval":70.000368,"support":6.897228,"days":9,"dot_needed":"78,222,332"},{"time_hours":200,"approval_perbill":699148814,"support_perbill":68843152,"approval":69.9148814,"support":6.8843152,"days":9,"dot_needed":"78,075,886"},{"time_hours":201,"approval_perbill":698297642,"support_perbill":68715232,"approval":69.8297642,"support":6.8715232,"days":9,"dot_needed":"77,930,810"},{"time_hours":202,"approval_perbill":697450138,"support_perbill":68588504,"approval":69.7450138,"support":6.8588504,"days":9,"dot_needed":"77,787,087"},{"time_hours":203,"approval_perbill":696606280,"support_perbill":68462952,"approval":69.660628,"support":6.8462952,"days":9,"dot_needed":"77,644,696"},{"time_hours":204,"approval_perbill":695766044,"support_perbill":68338558,"approval":69.5766044,"support":6.8338558,"days":9,"dot_needed":"77,503,620"},{"time_hours":205,"approval_perbill":694929407,"support_perbill":68215308,"approval":69.4929407,"support":6.8215308,"days":9,"dot_needed":"77,363,840"},{"time_hours":206,"approval_perbill":694096344,"support_perbill":68093184,"approval":69.4096344,"support":6.8093184,"days":9,"dot_needed":"77,225,338"},{"time_hours":207,"approval_perbill":693266835,"support_perbill":67972172,"approval":69.3266835,"support":6.7972172,"days":9,"dot_needed":"77,088,097"},{"time_hours":208,"approval_perbill":692440857,"support_perbill":67852257,"approval":69.2440857,"support":6.7852257,"days":9,"dot_needed":"76,952,100"},{"time_hours":209,"approval_perbill":691618386,"support_perbill":67733424,"approval":69.1618386,"support":6.7733424,"days":9,"dot_needed":"76,817,330"},{"time_hours":210,"approval_perbill":690799399,"support_perbill":67615659,"approval":69.0799399,"support":6.7615659,"days":9,"dot_needed":"76,683,771"},{"time_hours":211,"approval_perbill":689983876,"support_perbill":67498946,"approval":68.9983876,"support":6.7498946,"days":9,"dot_needed":"76,551,405"},{"time_hours":212,"approval_perbill":689171795,"support_perbill":67383272,"approval":68.9171795,"support":6.7383272,"days":9,"dot_needed":"76,420,218"},{"time_hours":213,"approval_perbill":688363133,"support_perbill":67268623,"approval":68.8363133,"support":6.7268623,"days":9,"dot_needed":"76,290,193"},{"time_hours":214,"approval_perbill":687557869,"support_perbill":67154986,"approval":68.7557869,"support":6.7154986,"days":9,"dot_needed":"76,161,316"},{"time_hours":215,"approval_perbill":686755981,"support_perbill":67042347,"approval":68.6755981,"support":6.7042347,"days":9,"dot_needed":"76,033,570"},{"time_hours":216,"approval_perbill":685957449,"support_perbill":66930693,"approval":68.5957449,"support":6.6930693,"days":9,"dot_needed":"75,906,942"},{"time_hours":217,"approval_perbill":685162252,"support_perbill":66820012,"approval":68.5162252,"support":6.6820012,"days":10,"dot_needed":"75,781,418"},{"time_hours":218,"approval_perbill":684370368,"support_perbill":66710290,"approval":68.4370368,"support":6.671029,"days":10,"dot_needed":"75,656,980"},{"time_hours":219,"approval_perbill":683581776,"support_perbill":66601515,"approval":68.3581776,"support":6.6601515,"days":10,"dot_needed":"75,533,617"},{"time_hours":220,"approval_perbill":682796458,"support_perbill":66493675,"approval":68.2796458,"support":6.6493675,"days":10,"dot_needed":"75,411,315"},{"time_hours":221,"approval_perbill":682014391,"support_perbill":66386758,"approval":68.2014391,"support":6.6386758,"days":10,"dot_needed":"75,290,059"},{"time_hours":222,"approval_perbill":681235556,"support_perbill":66280753,"approval":68.1235556,"support":6.6280753,"days":10,"dot_needed":"75,169,837"},{"time_hours":223,"approval_perbill":680459933,"support_perbill":66175647,"approval":68.0459933,"support":6.6175647,"days":10,"dot_needed":"75,050,635"},{"time_hours":224,"approval_perbill":679687502,"support_perbill":66071429,"approval":67.9687502,"support":6.6071429,"days":10,"dot_needed":"74,932,440"},{"time_hours":225,"approval_perbill":678918244,"support_perbill":65968088,"approval":67.8918244,"support":6.5968088,"days":10,"dot_needed":"74,815,240"},{"time_hours":226,"approval_perbill":678152139,"support_perbill":65865613,"approval":67.8152139,"support":6.5865613,"days":10,"dot_needed":"74,699,022"},{"time_hours":227,"approval_perbill":677389167,"support_perbill":65763993,"approval":67.7389167,"support":6.5763993,"days":10,"dot_needed":"74,583,773"},{"time_hours":228,"approval_perbill":676629309,"support_perbill":65663217,"approval":67.6629309,"support":6.5663217,"days":10,"dot_needed":"74,469,482"},{"time_hours":229,"approval_perbill":675872547,"support_perbill":65563276,"approval":67.5872547,"support":6.5563276,"days":10,"dot_needed":"74,356,137"},{"time_hours":230,"approval_perbill":675118862,"support_perbill":65464158,"approval":67.5118862,"support":6.5464158,"days":10,"dot_needed":"74,243,726"},{"time_hours":231,"approval_perbill":674368233,"support_perbill":65365854,"approval":67.4368233,"support":6.5365854,"days":10,"dot_needed":"74,132,239"},{"time_hours":232,"approval_perbill":673620645,"support_perbill":65268353,"approval":67.3620645,"support":6.5268353,"days":10,"dot_needed":"74,021,662"},{"time_hours":233,"approval_perbill":672876077,"support_perbill":65171646,"approval":67.2876077,"support":6.5171646,"days":10,"dot_needed":"73,911,985"},{"time_hours":234,"approval_perbill":672134512,"support_perbill":65075723,"approval":67.2134512,"support":6.5075723,"days":10,"dot_needed":"73,803,197"},{"time_hours":235,"approval_perbill":671395931,"support_perbill":64980575,"approval":67.1395931,"support":6.4980575,"days":10,"dot_needed":"73,695,289"},{"time_hours":236,"approval_perbill":670660315,"support_perbill":64886191,"approval":67.0660315,"support":6.4886191,"days":10,"dot_needed":"73,588,247"},{"time_hours":237,"approval_perbill":669927649,"support_perbill":64792564,"approval":66.9927649,"support":6.4792564,"days":10,"dot_needed":"73,482,063"},{"time_hours":238,"approval_perbill":669197914,"support_perbill":64699684,"approval":66.9197914,"support":6.4699684,"days":10,"dot_needed":"73,376,727"},{"time_hours":239,"approval_perbill":668471092,"support_perbill":64607542,"approval":66.8471092,"support":6.4607542,"days":10,"dot_needed":"73,272,227"},{"time_hours":240,"approval_perbill":667747166,"support_perbill":64516129,"approval":66.7747166,"support":6.4516129,"days":10,"dot_needed":"73,168,555"},{"time_hours":241,"approval_perbill":667026119,"support_perbill":64425437,"approval":66.7026119,"support":6.4425437,"days":11,"dot_needed":"73,065,700"},{"time_hours":242,"approval_perbill":666307933,"support_perbill":64335457,"approval":66.6307933,"support":6.4335457,"days":11,"dot_needed":"72,963,652"},{"time_hours":243,"approval_perbill":665592591,"support_perbill":64246181,"approval":66.5592591,"support":6.4246181,"days":11,"dot_needed":"72,862,403"},{"time_hours":244,"approval_perbill":664880077,"support_perbill":64157601,"approval":66.4880077,"support":6.4157601,"days":11,"dot_needed":"72,761,944"},{"time_hours":245,"approval_perbill":664170374,"support_perbill":64069708,"approval":66.4170374,"support":6.4069708,"days":11,"dot_needed":"72,662,263"},{"time_hours":246,"approval_perbill":663463466,"support_perbill":63982495,"approval":66.3463466,"support":6.3982495,"days":11,"dot_needed":"72,563,354"},{"time_hours":247,"approval_perbill":662759335,"support_perbill":63895953,"approval":66.2759335,"support":6.3895953,"days":11,"dot_needed":"72,465,205"},{"time_hours":248,"approval_perbill":662057965,"support_perbill":63810075,"approval":66.2057965,"support":6.3810075,"days":11,"dot_needed":"72,367,810"},{"time_hours":249,"approval_perbill":661359342,"support_perbill":63724854,"approval":66.1359342,"support":6.3724854,"days":11,"dot_needed":"72,271,160"},{"time_hours":250,"approval_perbill":660663447,"support_perbill":63640282,"approval":66.0663447,"support":6.3640282,"days":11,"dot_needed":"72,175,246"},{"time_hours":251,"approval_perbill":659970265,"support_perbill":63556351,"approval":65.9970265,"support":6.3556351,"days":11,"dot_needed":"72,080,058"},{"time_hours":252,"approval_perbill":659279781,"support_perbill":63473054,"approval":65.9279781,"support":6.3473054,"days":11,"dot_needed":"71,985,590"},{"time_hours":253,"approval_perbill":658591978,"support_perbill":63390384,"approval":65.8591978,"support":6.3390384,"days":11,"dot_needed":"71,891,833"},{"time_hours":254,"approval_perbill":657906842,"support_perbill":63308335,"approval":65.7906842,"support":6.3308335,"days":11,"dot_needed":"71,798,780"},{"time_hours":255,"approval_perbill":657224356,"support_perbill":63226898,"approval":65.7224356,"support":6.3226898,"days":11,"dot_needed":"71,706,422"},{"time_hours":256,"approval_perbill":656544505,"support_perbill":63146067,"approval":65.6544505,"support":6.3146067,"days":11,"dot_needed":"71,614,750"},{"time_hours":257,"approval_perbill":655867274,"support_perbill":63065836,"approval":65.5867274,"support":6.3065836,"days":11,"dot_needed":"71,523,759"},{"time_hours":258,"approval_perbill":655192648,"support_perbill":62986198,"approval":65.5192648,"support":6.2986198,"days":11,"dot_needed":"71,433,441"},{"time_hours":259,"approval_perbill":654520613,"support_perbill":62907146,"approval":65.4520613,"support":6.2907146,"days":11,"dot_needed":"71,343,787"},{"time_hours":260,"approval_perbill":653851152,"support_perbill":62828674,"approval":65.3851152,"support":6.2828674,"days":11,"dot_needed":"71,254,791"},{"time_hours":261,"approval_perbill":653184251,"support_perbill":62750776,"approval":65.3184251,"support":6.2750776,"days":11,"dot_needed":"71,166,446"},{"time_hours":262,"approval_perbill":652519896,"support_perbill":62673444,"approval":65.2519896,"support":6.2673444,"days":11,"dot_needed":"71,078,743"},{"time_hours":263,"approval_perbill":651858072,"support_perbill":62596674,"approval":65.1858072,"support":6.2596674,"days":11,"dot_needed":"70,991,677"},{"time_hours":264,"approval_perbill":651198765,"support_perbill":62520458,"approval":65.1198765,"support":6.2520458,"days":11,"dot_needed":"70,905,239"},{"time_hours":265,"approval_perbill":650541960,"support_perbill":62444792,"approval":65.054196,"support":6.2444792,"days":12,"dot_needed":"70,819,425"},{"time_hours":266,"approval_perbill":649887643,"support_perbill":62369668,"approval":64.9887643,"support":6.2369668,"days":12,"dot_needed":"70,734,226"},{"time_hours":267,"approval_perbill":649235800,"support_perbill":62295082,"approval":64.92358,"support":6.2295082,"days":12,"dot_needed":"70,649,637"},{"time_hours":268,"approval_perbill":648586417,"support_perbill":62221027,"approval":64.8586417,"support":6.2221027,"days":12,"dot_needed":"70,565,651"},{"time_hours":269,"approval_perbill":647939479,"support_perbill":62147498,"approval":64.7939479,"support":6.2147498,"days":12,"dot_needed":"70,482,261"},{"time_hours":270,"approval_perbill":647294974,"support_perbill":62074489,"approval":64.7294974,"support":6.2074489,"days":12,"dot_needed":"70,399,460"},{"time_hours":271,"approval_perbill":646652888,"support_perbill":62001995,"approval":64.6652888,"support":6.2001995,"days":12,"dot_needed":"70,317,244"},{"time_hours":272,"approval_perbill":646013207,"support_perbill":61930011,"approval":64.6013207,"support":6.1930011,"days":12,"dot_needed":"70,235,606"},{"time_hours":273,"approval_perbill":645375917,"support_perbill":61858530,"approval":64.5375917,"support":6.185853,"days":12,"dot_needed":"70,154,538"},{"time_hours":274,"approval_perbill":644741005,"support_perbill":61787548,"approval":64.4741005,"support":6.1787548,"days":12,"dot_needed":"70,074,037"},{"time_hours":275,"approval_perbill":644108458,"support_perbill":61717059,"approval":64.4108458,"support":6.1717059,"days":12,"dot_needed":"69,994,094"},{"time_hours":276,"approval_perbill":643478263,"support_perbill":61647059,"approval":64.3478263,"support":6.1647059,"days":12,"dot_needed":"69,914,706"},{"time_hours":277,"approval_perbill":642850406,"support_perbill":61577542,"approval":64.2850406,"support":6.1577542,"days":12,"dot_needed":"69,835,866"},{"time_hours":278,"approval_perbill":642224875,"support_perbill":61508503,"approval":64.2224875,"support":6.1508503,"days":12,"dot_needed":"69,757,568"},{"time_hours":279,"approval_perbill":641601656,"support_perbill":61439938,"approval":64.1601656,"support":6.1439938,"days":12,"dot_needed":"69,679,808"},{"time_hours":280,"approval_perbill":640980738,"support_perbill":61371841,"approval":64.0980738,"support":6.1371841,"days":12,"dot_needed":"69,602,578"},{"time_hours":281,"approval_perbill":640362106,"support_perbill":61304208,"approval":64.0362106,"support":6.1304208,"days":12,"dot_needed":"69,525,875"},{"time_hours":282,"approval_perbill":639745749,"support_perbill":61237034,"approval":63.9745749,"support":6.1237034,"days":12,"dot_needed":"69,449,692"},{"time_hours":283,"approval_perbill":639131654,"support_perbill":61170314,"approval":63.9131654,"support":6.1170314,"days":12,"dot_needed":"69,374,024"},{"time_hours":284,"approval_perbill":638519808,"support_perbill":61104045,"approval":63.8519808,"support":6.1104045,"days":12,"dot_needed":"69,298,867"},{"time_hours":285,"approval_perbill":637910200,"support_perbill":61038220,"approval":63.79102,"support":6.103822,"days":12,"dot_needed":"69,224,214"},{"time_hours":286,"approval_perbill":637302817,"support_perbill":60972836,"approval":63.7302817,"support":6.0972836,"days":12,"dot_needed":"69,150,062"},{"time_hours":287,"approval_perbill":636697646,"support_perbill":60907889,"approval":63.6697646,"support":6.0907889,"days":12,"dot_needed":"69,076,404"},{"time_hours":288,"approval_perbill":636094677,"support_perbill":60843373,"approval":63.6094677,"support":6.0843373,"days":12,"dot_needed":"69,003,236"},{"time_hours":289,"approval_perbill":635493896,"support_perbill":60779286,"approval":63.5493896,"support":6.0779286,"days":13,"dot_needed":"68,930,554"},{"time_hours":290,"approval_perbill":634895291,"support_perbill":60715621,"approval":63.4895291,"support":6.0715621,"days":13,"dot_needed":"68,858,351"},{"time_hours":291,"approval_perbill":634298853,"support_perbill":60652376,"approval":63.4298853,"support":6.0652376,"days":13,"dot_needed":"68,786,624"},{"time_hours":292,"approval_perbill":633704567,"support_perbill":60589547,"approval":63.3704567,"support":6.0589547,"days":13,"dot_needed":"68,715,369"},{"time_hours":293,"approval_perbill":633112423,"support_perbill":60527128,"approval":63.3112423,"support":6.0527128,"days":13,"dot_needed":"68,644,579"},{"time_hours":294,"approval_perbill":632522409,"support_perbill":60465116,"approval":63.2522409,"support":6.0465116,"days":13,"dot_needed":"68,574,250"},{"time_hours":295,"approval_perbill":631934514,"support_perbill":60403508,"approval":63.1934514,"support":6.0403508,"days":13,"dot_needed":"68,504,380"},{"time_hours":296,"approval_perbill":631348726,"support_perbill":60342298,"approval":63.1348726,"support":6.0342298,"days":13,"dot_needed":"68,434,960"},{"time_hours":297,"approval_perbill":630765034,"support_perbill":60281484,"approval":63.0765034,"support":6.0281484,"days":13,"dot_needed":"68,365,991"},{"time_hours":298,"approval_perbill":630183427,"support_perbill":60221061,"approval":63.0183427,"support":6.0221061,"days":13,"dot_needed":"68,297,464"},{"time_hours":299,"approval_perbill":629603893,"support_perbill":60161026,"approval":62.9603893,"support":6.0161026,"days":13,"dot_needed":"68,229,378"},{"time_hours":300,"approval_perbill":629026422,"support_perbill":60101376,"approval":62.9026422,"support":6.0101376,"days":13,"dot_needed":"68,161,728"},{"time_hours":301,"approval_perbill":628451003,"support_perbill":60042105,"approval":62.8451003,"support":6.0042105,"days":13,"dot_needed":"68,094,508"},{"time_hours":302,"approval_perbill":627877624,"support_perbill":59983211,"approval":62.7877624,"support":5.9983211,"days":13,"dot_needed":"68,027,715"},{"time_hours":303,"approval_perbill":627306275,"support_perbill":59924690,"approval":62.7306275,"support":5.992469,"days":13,"dot_needed":"67,961,346"},{"time_hours":304,"approval_perbill":626736945,"support_perbill":59866539,"approval":62.6736945,"support":5.9866539,"days":13,"dot_needed":"67,895,396"},{"time_hours":305,"approval_perbill":626169623,"support_perbill":59808754,"approval":62.6169623,"support":5.9808754,"days":13,"dot_needed":"67,829,862"},{"time_hours":306,"approval_perbill":625604299,"support_perbill":59751332,"approval":62.5604299,"support":5.9751332,"days":13,"dot_needed":"67,764,738"},{"time_hours":307,"approval_perbill":625040962,"support_perbill":59694269,"approval":62.5040962,"support":5.9694269,"days":13,"dot_needed":"67,700,023"},{"time_hours":308,"approval_perbill":624479602,"support_perbill":59637562,"approval":62.4479602,"support":5.9637562,"days":13,"dot_needed":"67,635,710"},{"time_hours":309,"approval_perbill":623920209,"support_perbill":59581207,"approval":62.3920209,"support":5.9581207,"days":13,"dot_needed":"67,571,798"},{"time_hours":310,"approval_perbill":623362771,"support_perbill":59525201,"approval":62.3362771,"support":5.9525201,"days":13,"dot_needed":"67,508,280"},{"time_hours":311,"approval_perbill":622807279,"support_perbill":59469542,"approval":62.2807279,"support":5.9469542,"days":13,"dot_needed":"67,445,157"},{"time_hours":312,"approval_perbill":622253723,"support_perbill":59414226,"approval":62.2253723,"support":5.9414226,"days":13,"dot_needed":"67,382,422"},{"time_hours":313,"approval_perbill":621702092,"support_perbill":59359249,"approval":62.1702092,"support":5.9359249,"days":14,"dot_needed":"67,320,072"},{"time_hours":314,"approval_perbill":621152377,"support_perbill":59304609,"approval":62.1152377,"support":5.9304609,"days":14,"dot_needed":"67,258,104"},{"time_hours":315,"approval_perbill":620604567,"support_perbill":59250302,"approval":62.0604567,"support":5.9250302,"days":14,"dot_needed":"67,196,514"},{"time_hours":316,"approval_perbill":620058653,"support_perbill":59196326,"approval":62.0058653,"support":5.9196326,"days":14,"dot_needed":"67,135,299"},{"time_hours":317,"approval_perbill":619514625,"support_perbill":59142677,"approval":61.9514625,"support":5.9142677,"days":14,"dot_needed":"67,074,455"},{"time_hours":318,"approval_perbill":618972473,"support_perbill":59089353,"approval":61.8972473,"support":5.9089353,"days":14,"dot_needed":"67,013,980"},{"time_hours":319,"approval_perbill":618432187,"support_perbill":59036350,"approval":61.8432187,"support":5.903635,"days":14,"dot_needed":"66,953,868"},{"time_hours":320,"approval_perbill":617893758,"support_perbill":58983666,"approval":61.7893758,"support":5.8983666,"days":14,"dot_needed":"66,894,119"},{"time_hours":321,"approval_perbill":617357176,"support_perbill":58931297,"approval":61.7357176,"support":5.8931297,"days":14,"dot_needed":"66,834,726"},{"time_hours":322,"approval_perbill":616822432,"support_perbill":58879242,"approval":61.6822432,"support":5.8879242,"days":14,"dot_needed":"66,775,690"},{"time_hours":323,"approval_perbill":616289516,"support_perbill":58827497,"approval":61.6289516,"support":5.8827497,"days":14,"dot_needed":"66,717,006"},{"time_hours":324,"approval_perbill":615758419,"support_perbill":58776059,"approval":61.5758419,"support":5.8776059,"days":14,"dot_needed":"66,658,669"},{"time_hours":325,"approval_perbill":615229132,"support_perbill":58724926,"approval":61.5229132,"support":5.8724926,"days":14,"dot_needed":"66,600,679"},{"time_hours":326,"approval_perbill":614701645,"support_perbill":58674094,"approval":61.4701645,"support":5.8674094,"days":14,"dot_needed":"66,543,029"},{"time_hours":327,"approval_perbill":614175949,"support_perbill":58623562,"approval":61.4175949,"support":5.8623562,"days":14,"dot_needed":"66,485,720"},{"time_hours":328,"approval_perbill":613652036,"support_perbill":58573327,"approval":61.3652036,"support":5.8573327,"days":14,"dot_needed":"66,428,748"},{"time_hours":329,"approval_perbill":613129895,"support_perbill":58523386,"approval":61.3129895,"support":5.8523386,"days":14,"dot_needed":"66,372,109"},{"time_hours":330,"approval_perbill":612609519,"support_perbill":58473736,"approval":61.2609519,"support":5.8473736,"days":14,"dot_needed":"66,315,801"},{"time_hours":331,"approval_perbill":612090898,"support_perbill":58424375,"approval":61.2090898,"support":5.8424375,"days":14,"dot_needed":"66,259,820"},{"time_hours":332,"approval_perbill":611574023,"support_perbill":58375301,"approval":61.1574023,"support":5.8375301,"days":14,"dot_needed":"66,204,164"},{"time_hours":333,"approval_perbill":611058885,"support_perbill":58326510,"approval":61.1058885,"support":5.832651,"days":14,"dot_needed":"66,148,830"},{"time_hours":334,"approval_perbill":610545477,"support_perbill":58278001,"approval":61.0545477,"support":5.8278001,"days":14,"dot_needed":"66,093,815"},{"time_hours":335,"approval_perbill":610033788,"support_perbill":58229771,"approval":61.0033788,"support":5.8229771,"days":14,"dot_needed":"66,039,117"},{"time_hours":336,"approval_perbill":609523811,"support_perbill":58181818,"approval":60.9523811,"support":5.8181818,"days":14,"dot_needed":"65,984,733"},{"time_hours":337,"approval_perbill":609015537,"support_perbill":58134139,"approval":60.9015537,"support":5.8134139,"days":15,"dot_needed":"65,930,660"},{"time_hours":338,"approval_perbill":608508957,"support_perbill":58086732,"approval":60.8508957,"support":5.8086732,"days":15,"dot_needed":"65,876,895"},{"time_hours":339,"approval_perbill":608004063,"support_perbill":58039594,"approval":60.8004063,"support":5.8039594,"days":15,"dot_needed":"65,823,435"},{"time_hours":340,"approval_perbill":607500846,"support_perbill":57992724,"approval":60.7500846,"support":5.7992724,"days":15,"dot_needed":"65,770,279"},{"time_hours":341,"approval_perbill":606999299,"support_perbill":57946119,"approval":60.6999299,"support":5.7946119,"days":15,"dot_needed":"65,717,424"},{"time_hours":342,"approval_perbill":606499412,"support_perbill":57899776,"approval":60.6499412,"support":5.7899776,"days":15,"dot_needed":"65,664,865"},{"time_hours":343,"approval_perbill":606001178,"support_perbill":57853694,"approval":60.6001178,"support":5.7853694,"days":15,"dot_needed":"65,612,603"},{"time_hours":344,"approval_perbill":605504589,"support_perbill":57807871,"approval":60.5504589,"support":5.7807871,"days":15,"dot_needed":"65,560,635"},{"time_hours":345,"approval_perbill":605009635,"support_perbill":57762304,"approval":60.5009635,"support":5.7762304,"days":15,"dot_needed":"65,508,957"},{"time_hours":346,"approval_perbill":604516310,"support_perbill":57716991,"approval":60.451631,"support":5.7716991,"days":15,"dot_needed":"65,457,567"},{"time_hours":347,"approval_perbill":604024606,"support_perbill":57671930,"approval":60.4024606,"support":5.767193,"days":15,"dot_needed":"65,406,462"},{"time_hours":348,"approval_perbill":603534513,"support_perbill":57627118,"approval":60.3534513,"support":5.7627118,"days":15,"dot_needed":"65,355,641"},{"time_hours":349,"approval_perbill":603046025,"support_perbill":57582555,"approval":60.3046025,"support":5.7582555,"days":15,"dot_needed":"65,305,101"},{"time_hours":350,"approval_perbill":602559133,"support_perbill":57538237,"approval":60.2559133,"support":5.7538237,"days":15,"dot_needed":"65,254,840"},{"time_hours":351,"approval_perbill":602073830,"support_perbill":57494163,"approval":60.207383,"support":5.7494163,"days":15,"dot_needed":"65,204,855"},{"time_hours":352,"approval_perbill":601590108,"support_perbill":57450331,"approval":60.1590108,"support":5.7450331,"days":15,"dot_needed":"65,155,144"},{"time_hours":353,"approval_perbill":601107958,"support_perbill":57406738,"approval":60.1107958,"support":5.7406738,"days":15,"dot_needed":"65,105,705"},{"time_hours":354,"approval_perbill":600627375,"support_perbill":57363383,"approval":60.0627375,"support":5.7363383,"days":15,"dot_needed":"65,056,535"},{"time_hours":355,"approval_perbill":600148349,"support_perbill":57320264,"approval":60.0148349,"support":5.7320264,"days":15,"dot_needed":"65,007,634"},{"time_hours":356,"approval_perbill":599670874,"support_perbill":57277379,"approval":59.9670874,"support":5.7277379,"days":15,"dot_needed":"64,958,997"},{"time_hours":357,"approval_perbill":599194941,"support_perbill":57234726,"approval":59.9194941,"support":5.7234726,"days":15,"dot_needed":"64,910,624"},{"time_hours":358,"approval_perbill":598720544,"support_perbill":57192303,"approval":59.8720544,"support":5.7192303,"days":15,"dot_needed":"64,862,511"},{"time_hours":359,"approval_perbill":598247675,"support_perbill":57150109,"approval":59.8247675,"support":5.7150109,"days":15,"dot_needed":"64,814,659"},{"time_hours":360,"approval_perbill":597776326,"support_perbill":57108141,"approval":59.7776326,"support":5.7108141,"days":15,"dot_needed":"64,767,062"},{"time_hours":361,"approval_perbill":597306490,"support_perbill":57066397,"approval":59.730649,"support":5.7066397,"days":16,"dot_needed":"64,719,720"},{"time_hours":362,"approval_perbill":596838161,"support_perbill":57024876,"approval":59.6838161,"support":5.7024876,"days":16,"dot_needed":"64,672,630"},{"time_hours":363,"approval_perbill":596371330,"support_perbill":56983577,"approval":59.637133,"support":5.6983577,"days":16,"dot_needed":"64,625,793"},{"time_hours":364,"approval_perbill":595905991,"support_perbill":56942496,"approval":59.5905991,"support":5.6942496,"days":16,"dot_needed":"64,579,202"},{"time_hours":365,"approval_perbill":595442136,"support_perbill":56901633,"approval":59.5442136,"support":5.6901633,"days":16,"dot_needed":"64,532,859"},{"time_hours":366,"approval_perbill":594979758,"support_perbill":56860986,"approval":59.4979758,"support":5.6860986,"days":16,"dot_needed":"64,486,761"},{"time_hours":367,"approval_perbill":594518851,"support_perbill":56820553,"approval":59.4518851,"support":5.6820553,"days":16,"dot_needed":"64,440,905"},{"time_hours":368,"approval_perbill":594059407,"support_perbill":56780333,"approval":59.4059407,"support":5.6780333,"days":16,"dot_needed":"64,395,291"},{"time_hours":369,"approval_perbill":593601420,"support_perbill":56740323,"approval":59.360142,"support":5.6740323,"days":16,"dot_needed":"64,349,915"},{"time_hours":370,"approval_perbill":593144881,"support_perbill":56700522,"approval":59.3144881,"support":5.6700522,"days":16,"dot_needed":"64,304,776"},{"time_hours":371,"approval_perbill":592689786,"support_perbill":56660929,"approval":59.2689786,"support":5.6660929,"days":16,"dot_needed":"64,259,874"},{"time_hours":372,"approval_perbill":592236126,"support_perbill":56621542,"approval":59.2236126,"support":5.6621542,"days":16,"dot_needed":"64,215,204"},{"time_hours":373,"approval_perbill":591783895,"support_perbill":56582359,"approval":59.1783895,"support":5.6582359,"days":16,"dot_needed":"64,170,766"},{"time_hours":374,"approval_perbill":591333086,"support_perbill":56543378,"approval":59.1333086,"support":5.6543378,"days":16,"dot_needed":"64,126,557"},{"time_hours":375,"approval_perbill":590883692,"support_perbill":56504599,"approval":59.0883692,"support":5.6504599,"days":16,"dot_needed":"64,082,578"},{"time_hours":376,"approval_perbill":590435708,"support_perbill":56466019,"approval":59.0435708,"support":5.6466019,"days":16,"dot_needed":"64,038,824"},{"time_hours":377,"approval_perbill":589989126,"support_perbill":56427637,"approval":58.9989126,"support":5.6427637,"days":16,"dot_needed":"63,995,294"},{"time_hours":378,"approval_perbill":589543939,"support_perbill":56389452,"approval":58.9543939,"support":5.6389452,"days":16,"dot_needed":"63,951,988"},{"time_hours":379,"approval_perbill":589100141,"support_perbill":56351462,"approval":58.9100141,"support":5.6351462,"days":16,"dot_needed":"63,908,903"},{"time_hours":380,"approval_perbill":588657726,"support_perbill":56313665,"approval":58.8657726,"support":5.6313665,"days":16,"dot_needed":"63,866,037"},{"time_hours":381,"approval_perbill":588216688,"support_perbill":56276060,"approval":58.8216688,"support":5.627606,"days":16,"dot_needed":"63,823,389"},{"time_hours":382,"approval_perbill":587777019,"support_perbill":56238646,"approval":58.7777019,"support":5.6238646,"days":16,"dot_needed":"63,780,957"},{"time_hours":383,"approval_perbill":587338713,"support_perbill":56201421,"approval":58.7338713,"support":5.6201421,"days":16,"dot_needed":"63,738,740"},{"time_hours":384,"approval_perbill":586901764,"support_perbill":56164383,"approval":58.6901764,"support":5.6164383,"days":16,"dot_needed":"63,696,734"},{"time_hours":385,"approval_perbill":586466167,"support_perbill":56127532,"approval":58.6466167,"support":5.6127532,"days":17,"dot_needed":"63,654,941"},{"time_hours":386,"approval_perbill":586031913,"support_perbill":56090866,"approval":58.6031913,"support":5.6090866,"days":17,"dot_needed":"63,613,358"},{"time_hours":387,"approval_perbill":585598998,"support_perbill":56054383,"approval":58.5598998,"support":5.6054383,"days":17,"dot_needed":"63,571,982"},{"time_hours":388,"approval_perbill":585167415,"support_perbill":56018082,"approval":58.5167415,"support":5.6018082,"days":17,"dot_needed":"63,530,813"},{"time_hours":389,"approval_perbill":584737159,"support_perbill":55981962,"approval":58.4737159,"support":5.5981962,"days":17,"dot_needed":"63,489,848"},{"time_hours":390,"approval_perbill":584308222,"support_perbill":55946021,"approval":58.4308222,"support":5.5946021,"days":17,"dot_needed":"63,449,087"},{"time_hours":391,"approval_perbill":583880598,"support_perbill":55910259,"approval":58.3880598,"support":5.5910259,"days":17,"dot_needed":"63,408,529"},{"time_hours":392,"approval_perbill":583454283,"support_perbill":55874673,"approval":58.3454283,"support":5.5874673,"days":17,"dot_needed":"63,368,171"},{"time_hours":393,"approval_perbill":583029269,"support_perbill":55839263,"approval":58.3029269,"support":5.5839263,"days":17,"dot_needed":"63,328,012"},{"time_hours":394,"approval_perbill":582605551,"support_perbill":55804027,"approval":58.2605551,"support":5.5804027,"days":17,"dot_needed":"63,288,050"},{"time_hours":395,"approval_perbill":582183123,"support_perbill":55768963,"approval":58.2183123,"support":5.5768963,"days":17,"dot_needed":"63,248,284"},{"time_hours":396,"approval_perbill":581761979,"support_perbill":55734072,"approval":58.1761979,"support":5.5734072,"days":17,"dot_needed":"63,208,713"},{"time_hours":397,"approval_perbill":581342114,"support_perbill":55699350,"approval":58.1342114,"support":5.569935,"days":17,"dot_needed":"63,169,335"},{"time_hours":398,"approval_perbill":580923521,"support_perbill":55664798,"approval":58.0923521,"support":5.5664798,"days":17,"dot_needed":"63,130,149"},{"time_hours":399,"approval_perbill":580506194,"support_perbill":55630413,"approval":58.0506194,"support":5.5630413,"days":17,"dot_needed":"63,091,152"},{"time_hours":400,"approval_perbill":580090128,"support_perbill":55596196,"approval":58.0090128,"support":5.5596196,"days":17,"dot_needed":"63,052,346"},{"time_hours":401,"approval_perbill":579675317,"support_perbill":55562143,"approval":57.9675317,"support":5.5562143,"days":17,"dot_needed":"63,013,726"},{"time_hours":402,"approval_perbill":579261756,"support_perbill":55528255,"approval":57.9261756,"support":5.5528255,"days":17,"dot_needed":"62,975,294"},{"time_hours":403,"approval_perbill":578849439,"support_perbill":55494530,"approval":57.8849439,"support":5.549453,"days":17,"dot_needed":"62,937,046"},{"time_hours":404,"approval_perbill":578438360,"support_perbill":55460967,"approval":57.843836,"support":5.5460967,"days":17,"dot_needed":"62,898,981"},{"time_hours":405,"approval_perbill":578028514,"support_perbill":55427564,"approval":57.8028514,"support":5.5427564,"days":17,"dot_needed":"62,861,099"},{"time_hours":406,"approval_perbill":577619895,"support_perbill":55394321,"approval":57.7619895,"support":5.5394321,"days":17,"dot_needed":"62,823,397"},{"time_hours":407,"approval_perbill":577212497,"support_perbill":55361237,"approval":57.7212497,"support":5.5361237,"days":17,"dot_needed":"62,785,876"},{"time_hours":408,"approval_perbill":576806315,"support_perbill":55328309,"approval":57.6806315,"support":5.5328309,"days":17,"dot_needed":"62,748,532"},{"time_hours":409,"approval_perbill":576401345,"support_perbill":55295538,"approval":57.6401345,"support":5.5295538,"days":18,"dot_needed":"62,711,366"},{"time_hours":410,"approval_perbill":575997580,"support_perbill":55262922,"approval":57.599758,"support":5.5262922,"days":18,"dot_needed":"62,674,376"},{"time_hours":411,"approval_perbill":575595014,"support_perbill":55230460,"approval":57.5595014,"support":5.523046,"days":18,"dot_needed":"62,637,561"},{"time_hours":412,"approval_perbill":575193643,"support_perbill":55198151,"approval":57.5193643,"support":5.5198151,"days":18,"dot_needed":"62,600,919"},{"time_hours":413,"approval_perbill":574793462,"support_perbill":55165994,"approval":57.4793462,"support":5.5165994,"days":18,"dot_needed":"62,564,449"},{"time_hours":414,"approval_perbill":574394465,"support_perbill":55133987,"approval":57.4394465,"support":5.5133987,"days":18,"dot_needed":"62,528,149"},{"time_hours":415,"approval_perbill":573996646,"support_perbill":55102130,"approval":57.3996646,"support":5.510213,"days":18,"dot_needed":"62,492,020"},{"time_hours":416,"approval_perbill":573600001,"support_perbill":55070422,"approval":57.3600001,"support":5.5070422,"days":18,"dot_needed":"62,456,059"},{"time_hours":417,"approval_perbill":573204524,"support_perbill":55038861,"approval":57.3204524,"support":5.5038861,"days":18,"dot_needed":"62,420,266"},{"time_hours":418,"approval_perbill":572810211,"support_perbill":55007447,"approval":57.2810211,"support":5.5007447,"days":18,"dot_needed":"62,384,639"},{"time_hours":419,"approval_perbill":572417056,"support_perbill":54976178,"approval":57.2417056,"support":5.4976178,"days":18,"dot_needed":"62,349,176"},{"time_hours":420,"approval_perbill":572025053,"support_perbill":54945054,"approval":57.2025053,"support":5.4945054,"days":18,"dot_needed":"62,313,878"},{"time_hours":421,"approval_perbill":571634199,"support_perbill":54914074,"approval":57.1634199,"support":5.4914074,"days":18,"dot_needed":"62,278,743"},{"time_hours":422,"approval_perbill":571244487,"support_perbill":54883236,"approval":57.1244487,"support":5.4883236,"days":18,"dot_needed":"62,243,769"},{"time_hours":423,"approval_perbill":570855914,"support_perbill":54852539,"approval":57.0855914,"support":5.4852539,"days":18,"dot_needed":"62,208,956"},{"time_hours":424,"approval_perbill":570468473,"support_perbill":54821984,"approval":57.0468473,"support":5.4821984,"days":18,"dot_needed":"62,174,303"},{"time_hours":425,"approval_perbill":570082160,"support_perbill":54791567,"approval":57.008216,"support":5.4791567,"days":18,"dot_needed":"62,139,807"},{"time_hours":426,"approval_perbill":569696971,"support_perbill":54761290,"approval":56.9696971,"support":5.476129,"days":18,"dot_needed":"62,105,469"},{"time_hours":427,"approval_perbill":569312899,"support_perbill":54731150,"approval":56.9312899,"support":5.473115,"days":18,"dot_needed":"62,071,287"},{"time_hours":428,"approval_perbill":568929941,"support_perbill":54701147,"approval":56.8929941,"support":5.4701147,"days":18,"dot_needed":"62,037,260"},{"time_hours":429,"approval_perbill":568548091,"support_perbill":54671280,"approval":56.8548091,"support":5.467128,"days":18,"dot_needed":"62,003,388"},{"time_hours":430,"approval_perbill":568167345,"support_perbill":54641547,"approval":56.8167345,"support":5.4641547,"days":18,"dot_needed":"61,969,667"},{"time_hours":431,"approval_perbill":567787698,"support_perbill":54611949,"approval":56.7787698,"support":5.4611949,"days":18,"dot_needed":"61,936,099"},{"time_hours":432,"approval_perbill":567409145,"support_perbill":54582484,"approval":56.7409145,"support":5.4582484,"days":18,"dot_needed":"61,902,683"},{"time_hours":433,"approval_perbill":567031681,"support_perbill":54553151,"approval":56.7031681,"support":5.4553151,"days":19,"dot_needed":"61,869,416"},{"time_hours":434,"approval_perbill":566655303,"support_perbill":54523950,"approval":56.6655303,"support":5.452395,"days":19,"dot_needed":"61,836,299"},{"time_hours":435,"approval_perbill":566280004,"support_perbill":54494879,"approval":56.6280004,"support":5.4494879,"days":19,"dot_needed":"61,803,329"},{"time_hours":436,"approval_perbill":565905780,"support_perbill":54465937,"approval":56.590578,"support":5.4465937,"days":19,"dot_needed":"61,770,505"},{"time_hours":437,"approval_perbill":565532628,"support_perbill":54437124,"approval":56.5532628,"support":5.4437124,"days":19,"dot_needed":"61,737,828"},{"time_hours":438,"approval_perbill":565160541,"support_perbill":54408440,"approval":56.5160541,"support":5.440844,"days":19,"dot_needed":"61,705,297"},{"time_hours":439,"approval_perbill":564789516,"support_perbill":54379882,"approval":56.4789516,"support":5.4379882,"days":19,"dot_needed":"61,672,909"},{"time_hours":440,"approval_perbill":564419549,"support_perbill":54351450,"approval":56.4419549,"support":5.435145,"days":19,"dot_needed":"61,640,664"},{"time_hours":441,"approval_perbill":564050634,"support_perbill":54323144,"approval":56.4050634,"support":5.4323144,"days":19,"dot_needed":"61,608,562"},{"time_hours":442,"approval_perbill":563682767,"support_perbill":54294962,"approval":56.3682767,"support":5.4294962,"days":19,"dot_needed":"61,576,601"},{"time_hours":443,"approval_perbill":563315943,"support_perbill":54266903,"approval":56.3315943,"support":5.4266903,"days":19,"dot_needed":"61,544,778"},{"time_hours":444,"approval_perbill":562950159,"support_perbill":54238968,"approval":56.2950159,"support":5.4238968,"days":19,"dot_needed":"61,513,097"},{"time_hours":445,"approval_perbill":562585410,"support_perbill":54211155,"approval":56.258541,"support":5.4211155,"days":19,"dot_needed":"61,481,554"},{"time_hours":446,"approval_perbill":562221691,"support_perbill":54183463,"approval":56.2221691,"support":5.4183463,"days":19,"dot_needed":"61,450,148"},{"time_hours":447,"approval_perbill":561858998,"support_perbill":54155892,"approval":56.1858998,"support":5.4155892,"days":19,"dot_needed":"61,418,879"},{"time_hours":448,"approval_perbill":561497327,"support_perbill":54128440,"approval":56.1497327,"support":5.412844,"days":19,"dot_needed":"61,387,746"},{"time_hours":449,"approval_perbill":561136673,"support_perbill":54101107,"approval":56.1136673,"support":5.4101107,"days":19,"dot_needed":"61,356,747"},{"time_hours":450,"approval_perbill":560777032,"support_perbill":54073892,"approval":56.0777032,"support":5.4073892,"days":19,"dot_needed":"61,325,882"},{"time_hours":451,"approval_perbill":560418401,"support_perbill":54046795,"approval":56.0418401,"support":5.4046795,"days":19,"dot_needed":"61,295,151"},{"time_hours":452,"approval_perbill":560060774,"support_perbill":54019814,"approval":56.0060774,"support":5.4019814,"days":19,"dot_needed":"61,264,552"},{"time_hours":453,"approval_perbill":559704147,"support_perbill":53992949,"approval":55.9704147,"support":5.3992949,"days":19,"dot_needed":"61,234,084"},{"time_hours":454,"approval_perbill":559348516,"support_perbill":53966200,"approval":55.9348516,"support":5.39662,"days":19,"dot_needed":"61,203,747"},{"time_hours":455,"approval_perbill":558993878,"support_perbill":53939564,"approval":55.8993878,"support":5.3939564,"days":19,"dot_needed":"61,173,539"},{"time_hours":456,"approval_perbill":558640227,"support_perbill":53913043,"approval":55.8640227,"support":5.3913043,"days":19,"dot_needed":"61,143,461"},{"time_hours":457,"approval_perbill":558287561,"support_perbill":53886634,"approval":55.8287561,"support":5.3886634,"days":20,"dot_needed":"61,113,511"},{"time_hours":458,"approval_perbill":557935873,"support_perbill":53860338,"approval":55.7935873,"support":5.3860338,"days":20,"dot_needed":"61,083,688"},{"time_hours":459,"approval_perbill":557585162,"support_perbill":53834153,"approval":55.7585162,"support":5.3834153,"days":20,"dot_needed":"61,053,991"},{"time_hours":460,"approval_perbill":557235422,"support_perbill":53808079,"approval":55.7235422,"support":5.3808079,"days":20,"dot_needed":"61,024,420"},{"time_hours":461,"approval_perbill":556886649,"support_perbill":53782114,"approval":55.6886649,"support":5.3782114,"days":20,"dot_needed":"60,994,973"},{"time_hours":462,"approval_perbill":556538840,"support_perbill":53756260,"approval":55.653884,"support":5.375626,"days":20,"dot_needed":"60,965,652"},{"time_hours":463,"approval_perbill":556191991,"support_perbill":53730514,"approval":55.6191991,"support":5.3730514,"days":20,"dot_needed":"60,936,453"},{"time_hours":464,"approval_perbill":555846097,"support_perbill":53704876,"approval":55.5846097,"support":5.3704876,"days":20,"dot_needed":"60,907,377"},{"time_hours":465,"approval_perbill":555501155,"support_perbill":53679345,"approval":55.5501155,"support":5.3679345,"days":20,"dot_needed":"60,878,422"},{"time_hours":466,"approval_perbill":555157160,"support_perbill":53653921,"approval":55.515716,"support":5.3653921,"days":20,"dot_needed":"60,849,588"},{"time_hours":467,"approval_perbill":554814109,"support_perbill":53628603,"approval":55.4814109,"support":5.3628603,"days":20,"dot_needed":"60,820,874"},{"time_hours":468,"approval_perbill":554471998,"support_perbill":53603391,"approval":55.4471998,"support":5.3603391,"days":20,"dot_needed":"60,792,281"},{"time_hours":469,"approval_perbill":554130824,"support_perbill":53578283,"approval":55.4130824,"support":5.3578283,"days":20,"dot_needed":"60,763,806"},{"time_hours":470,"approval_perbill":553790581,"support_perbill":53553279,"approval":55.3790581,"support":5.3553279,"days":20,"dot_needed":"60,735,448"},{"time_hours":471,"approval_perbill":553451267,"support_perbill":53528379,"approval":55.3451267,"support":5.3528379,"days":20,"dot_needed":"60,707,209"},{"time_hours":472,"approval_perbill":553112877,"support_perbill":53503581,"approval":55.3112877,"support":5.3503581,"days":20,"dot_needed":"60,679,085"},{"time_hours":473,"approval_perbill":552775408,"support_perbill":53478885,"approval":55.2775408,"support":5.3478885,"days":20,"dot_needed":"60,651,077"},{"time_hours":474,"approval_perbill":552438856,"support_perbill":53454291,"approval":55.2438856,"support":5.3454291,"days":20,"dot_needed":"60,623,185"},{"time_hours":475,"approval_perbill":552103218,"support_perbill":53429798,"approval":55.2103218,"support":5.3429798,"days":20,"dot_needed":"60,595,407"},{"time_hours":476,"approval_perbill":551768489,"support_perbill":53405405,"approval":55.1768489,"support":5.3405405,"days":20,"dot_needed":"60,567,743"},{"time_hours":477,"approval_perbill":551434666,"support_perbill":53381111,"approval":55.1434666,"support":5.3381111,"days":20,"dot_needed":"60,540,191"},{"time_hours":478,"approval_perbill":551101746,"support_perbill":53356917,"approval":55.1101746,"support":5.3356917,"days":20,"dot_needed":"60,512,752"},{"time_hours":479,"approval_perbill":550769724,"support_perbill":53332821,"approval":55.0769724,"support":5.3332821,"days":20,"dot_needed":"60,485,424"},{"time_hours":480,"approval_perbill":550438597,"support_perbill":53308823,"approval":55.0438597,"support":5.3308823,"days":20,"dot_needed":"60,458,208"},{"time_hours":481,"approval_perbill":550108361,"support_perbill":53284922,"approval":55.0108361,"support":5.3284922,"days":21,"dot_needed":"60,431,101"},{"time_hours":482,"approval_perbill":549779014,"support_perbill":53261118,"approval":54.9779014,"support":5.3261118,"days":21,"dot_needed":"60,404,105"},{"time_hours":483,"approval_perbill":549450550,"support_perbill":53237409,"approval":54.945055,"support":5.3237409,"days":21,"dot_needed":"60,377,216"},{"time_hours":484,"approval_perbill":549122967,"support_perbill":53213797,"approval":54.9122967,"support":5.3213797,"days":21,"dot_needed":"60,350,438"},{"time_hours":485,"approval_perbill":548796261,"support_perbill":53190279,"approval":54.8796261,"support":5.3190279,"days":21,"dot_needed":"60,323,766"},{"time_hours":486,"approval_perbill":548470429,"support_perbill":53166855,"approval":54.8470429,"support":5.3166855,"days":21,"dot_needed":"60,297,200"},{"time_hours":487,"approval_perbill":548145467,"support_perbill":53143525,"approval":54.8145467,"support":5.3143525,"days":21,"dot_needed":"60,270,741"},{"time_hours":488,"approval_perbill":547821371,"support_perbill":53120289,"approval":54.7821371,"support":5.3120289,"days":21,"dot_needed":"60,244,389"},{"time_hours":489,"approval_perbill":547498138,"support_perbill":53097145,"approval":54.7498138,"support":5.3097145,"days":21,"dot_needed":"60,218,141"},{"time_hours":490,"approval_perbill":547175766,"support_perbill":53074093,"approval":54.7175766,"support":5.3074093,"days":21,"dot_needed":"60,191,998"},{"time_hours":491,"approval_perbill":546854249,"support_perbill":53051133,"approval":54.6854249,"support":5.3051133,"days":21,"dot_needed":"60,165,958"},{"time_hours":492,"approval_perbill":546533585,"support_perbill":53028263,"approval":54.6533585,"support":5.3028263,"days":21,"dot_needed":"60,140,021"},{"time_hours":493,"approval_perbill":546213771,"support_perbill":53005484,"approval":54.6213771,"support":5.3005484,"days":21,"dot_needed":"60,114,187"},{"time_hours":494,"approval_perbill":545894803,"support_perbill":52982795,"approval":54.5894803,"support":5.2982795,"days":21,"dot_needed":"60,088,455"},{"time_hours":495,"approval_perbill":545576678,"support_perbill":52960196,"approval":54.5576678,"support":5.2960196,"days":21,"dot_needed":"60,062,826"},{"time_hours":496,"approval_perbill":545259392,"support_perbill":52937685,"approval":54.5259392,"support":5.2937685,"days":21,"dot_needed":"60,037,296"},{"time_hours":497,"approval_perbill":544942942,"support_perbill":52915262,"approval":54.4942942,"support":5.2915262,"days":21,"dot_needed":"60,011,865"},{"time_hours":498,"approval_perbill":544627325,"support_perbill":52892928,"approval":54.4627325,"support":5.2892928,"days":21,"dot_needed":"59,986,536"},{"time_hours":499,"approval_perbill":544312538,"support_perbill":52870680,"approval":54.4312538,"support":5.287068,"days":21,"dot_needed":"59,961,304"},{"time_hours":500,"approval_perbill":543998577,"support_perbill":52848520,"approval":54.3998577,"support":5.284852,"days":21,"dot_needed":"59,936,172"},{"time_hours":501,"approval_perbill":543685438,"support_perbill":52826446,"approval":54.3685438,"support":5.2826446,"days":21,"dot_needed":"59,911,138"},{"time_hours":502,"approval_perbill":543373120,"support_perbill":52804457,"approval":54.337312,"support":5.2804457,"days":21,"dot_needed":"59,886,200"},{"time_hours":503,"approval_perbill":543061618,"support_perbill":52782554,"approval":54.3061618,"support":5.2782554,"days":21,"dot_needed":"59,861,360"},{"time_hours":504,"approval_perbill":542750930,"support_perbill":52760735,"approval":54.275093,"support":5.2760735,"days":21,"dot_needed":"59,836,614"},{"time_hours":505,"approval_perbill":542441051,"support_perbill":52739001,"approval":54.2441051,"support":5.2739001,"days":22,"dot_needed":"59,811,966"},{"time_hours":506,"approval_perbill":542131980,"support_perbill":52717351,"approval":54.213198,"support":5.2717351,"days":22,"dot_needed":"59,787,412"},{"time_hours":507,"approval_perbill":541823713,"support_perbill":52695784,"approval":54.1823713,"support":5.2695784,"days":22,"dot_needed":"59,762,953"},{"time_hours":508,"approval_perbill":541516246,"support_perbill":52674300,"approval":54.1516246,"support":5.26743,"days":22,"dot_needed":"59,738,587"},{"time_hours":509,"approval_perbill":541209577,"support_perbill":52652898,"approval":54.1209577,"support":5.2652898,"days":22,"dot_needed":"59,714,315"},{"time_hours":510,"approval_perbill":540903702,"support_perbill":52631578,"approval":54.0903702,"support":5.2631578,"days":22,"dot_needed":"59,690,136"},{"time_hours":511,"approval_perbill":540598619,"support_perbill":52610340,"approval":54.0598619,"support":5.261034,"days":22,"dot_needed":"59,666,049"},{"time_hours":512,"approval_perbill":540294324,"support_perbill":52589182,"approval":54.0294324,"support":5.2589182,"days":22,"dot_needed":"59,642,054"},{"time_hours":513,"approval_perbill":539990814,"support_perbill":52568105,"approval":53.9990814,"support":5.2568105,"days":22,"dot_needed":"59,618,150"},{"time_hours":514,"approval_perbill":539688087,"support_perbill":52547108,"approval":53.9688087,"support":5.2547108,"days":22,"dot_needed":"59,594,337"},{"time_hours":515,"approval_perbill":539386139,"support_perbill":52526191,"approval":53.9386139,"support":5.2526191,"days":22,"dot_needed":"59,570,615"},{"time_hours":516,"approval_perbill":539084968,"support_perbill":52505353,"approval":53.9084968,"support":5.2505353,"days":22,"dot_needed":"59,546,982"},{"time_hours":517,"approval_perbill":538784569,"support_perbill":52484593,"approval":53.8784569,"support":5.2484593,"days":22,"dot_needed":"59,523,438"},{"time_hours":518,"approval_perbill":538484941,"support_perbill":52463912,"approval":53.8484941,"support":5.2463912,"days":22,"dot_needed":"59,499,984"},{"time_hours":519,"approval_perbill":538186080,"support_perbill":52443308,"approval":53.818608,"support":5.2443308,"days":22,"dot_needed":"59,476,616"},{"time_hours":520,"approval_perbill":537887984,"support_perbill":52422782,"approval":53.7887984,"support":5.2422782,"days":22,"dot_needed":"59,453,338"},{"time_hours":521,"approval_perbill":537590648,"support_perbill":52402333,"approval":53.7590648,"support":5.2402333,"days":22,"dot_needed":"59,430,146"},{"time_hours":522,"approval_perbill":537294072,"support_perbill":52381960,"approval":53.7294072,"support":5.238196,"days":22,"dot_needed":"59,407,041"},{"time_hours":523,"approval_perbill":536998251,"support_perbill":52361663,"approval":53.6998251,"support":5.2361663,"days":22,"dot_needed":"59,384,022"},{"time_hours":524,"approval_perbill":536703183,"support_perbill":52341442,"approval":53.6703183,"support":5.2341442,"days":22,"dot_needed":"59,361,089"},{"time_hours":525,"approval_perbill":536408865,"support_perbill":52321296,"approval":53.6408865,"support":5.2321296,"days":22,"dot_needed":"59,338,241"},{"time_hours":526,"approval_perbill":536115294,"support_perbill":52301225,"approval":53.6115294,"support":5.2301225,"days":22,"dot_needed":"59,315,478"},{"time_hours":527,"approval_perbill":535822467,"support_perbill":52281229,"approval":53.5822467,"support":5.2281229,"days":22,"dot_needed":"59,292,801"},{"time_hours":528,"approval_perbill":535530381,"support_perbill":52261306,"approval":53.5530381,"support":5.2261306,"days":22,"dot_needed":"59,270,206"},{"time_hours":529,"approval_perbill":535239034,"support_perbill":52241457,"approval":53.5239034,"support":5.2241457,"days":23,"dot_needed":"59,247,695"},{"time_hours":530,"approval_perbill":534948423,"support_perbill":52221681,"approval":53.4948423,"support":5.2221681,"days":23,"dot_needed":"59,225,266"},{"time_hours":531,"approval_perbill":534658544,"support_perbill":52201977,"approval":53.4658544,"support":5.2201977,"days":23,"dot_needed":"59,202,920"},{"time_hours":532,"approval_perbill":534369396,"support_perbill":52182347,"approval":53.4369396,"support":5.2182347,"days":23,"dot_needed":"59,180,657"},{"time_hours":533,"approval_perbill":534080976,"support_perbill":52162788,"approval":53.4080976,"support":5.2162788,"days":23,"dot_needed":"59,158,475"},{"time_hours":534,"approval_perbill":533793280,"support_perbill":52143300,"approval":53.379328,"support":5.21433,"days":23,"dot_needed":"59,136,374"},{"time_hours":535,"approval_perbill":533506306,"support_perbill":52123884,"approval":53.3506306,"support":5.2123884,"days":23,"dot_needed":"59,114,354"},{"time_hours":536,"approval_perbill":533220051,"support_perbill":52104538,"approval":53.3220051,"support":5.2104538,"days":23,"dot_needed":"59,092,413"},{"time_hours":537,"approval_perbill":532934513,"support_perbill":52085263,"approval":53.2934513,"support":5.2085263,"days":23,"dot_needed":"59,070,553"},{"time_hours":538,"approval_perbill":532649689,"support_perbill":52066058,"approval":53.2649689,"support":5.2066058,"days":23,"dot_needed":"59,048,772"},{"time_hours":539,"approval_perbill":532365575,"support_perbill":52046923,"approval":53.2365575,"support":5.2046923,"days":23,"dot_needed":"59,027,071"},{"time_hours":540,"approval_perbill":532082171,"support_perbill":52027857,"approval":53.2082171,"support":5.2027857,"days":23,"dot_needed":"59,005,448"},{"time_hours":541,"approval_perbill":531799472,"support_perbill":52008859,"approval":53.1799472,"support":5.2008859,"days":23,"dot_needed":"58,983,902"},{"time_hours":542,"approval_perbill":531517477,"support_perbill":51989931,"approval":53.1517477,"support":5.1989931,"days":23,"dot_needed":"58,962,436"},{"time_hours":543,"approval_perbill":531236182,"support_perbill":51971070,"approval":53.1236182,"support":5.197107,"days":23,"dot_needed":"58,941,045"},{"time_hours":544,"approval_perbill":530955585,"support_perbill":51952277,"approval":53.0955585,"support":5.1952277,"days":23,"dot_needed":"58,919,732"},{"time_hours":545,"approval_perbill":530675684,"support_perbill":51933551,"approval":53.0675684,"support":5.1933551,"days":23,"dot_needed":"58,898,495"},{"time_hours":546,"approval_perbill":530396476,"support_perbill":51914893,"approval":53.0396476,"support":5.1914893,"days":23,"dot_needed":"58,877,334"},{"time_hours":547,"approval_perbill":530117958,"support_perbill":51896301,"approval":53.0117958,"support":5.1896301,"days":23,"dot_needed":"58,856,249"},{"time_hours":548,"approval_perbill":529840127,"support_perbill":51877776,"approval":52.9840127,"support":5.1877776,"days":23,"dot_needed":"58,835,239"},{"time_hours":549,"approval_perbill":529562982,"support_perbill":51859316,"approval":52.9562982,"support":5.1859316,"days":23,"dot_needed":"58,814,304"},{"time_hours":550,"approval_perbill":529286519,"support_perbill":51840922,"approval":52.9286519,"support":5.1840922,"days":23,"dot_needed":"58,793,443"},{"time_hours":551,"approval_perbill":529010737,"support_perbill":51822593,"approval":52.9010737,"support":5.1822593,"days":23,"dot_needed":"58,772,656"},{"time_hours":552,"approval_perbill":528735632,"support_perbill":51804330,"approval":52.8735632,"support":5.180433,"days":23,"dot_needed":"58,751,943"},{"time_hours":553,"approval_perbill":528461202,"support_perbill":51786130,"approval":52.8461202,"support":5.178613,"days":24,"dot_needed":"58,731,303"},{"time_hours":554,"approval_perbill":528187445,"support_perbill":51767996,"approval":52.8187445,"support":5.1767996,"days":24,"dot_needed":"58,710,737"},{"time_hours":555,"approval_perbill":527914358,"support_perbill":51749924,"approval":52.7914358,"support":5.1749924,"days":24,"dot_needed":"58,690,241"},{"time_hours":556,"approval_perbill":527641939,"support_perbill":51731917,"approval":52.7641939,"support":5.1731917,"days":24,"dot_needed":"58,669,819"},{"time_hours":557,"approval_perbill":527370186,"support_perbill":51713973,"approval":52.7370186,"support":5.1713973,"days":24,"dot_needed":"58,649,468"},{"time_hours":558,"approval_perbill":527099095,"support_perbill":51696091,"approval":52.7099095,"support":5.1696091,"days":24,"dot_needed":"58,629,188"},{"time_hours":559,"approval_perbill":526828664,"support_perbill":51678272,"approval":52.6828664,"support":5.1678272,"days":24,"dot_needed":"58,608,979"},{"time_hours":560,"approval_perbill":526558891,"support_perbill":51660516,"approval":52.6558891,"support":5.1660516,"days":24,"dot_needed":"58,588,842"},{"time_hours":561,"approval_perbill":526289774,"support_perbill":51642821,"approval":52.6289774,"support":5.1642821,"days":24,"dot_needed":"58,568,774"},{"time_hours":562,"approval_perbill":526021311,"support_perbill":51625188,"approval":52.6021311,"support":5.1625188,"days":24,"dot_needed":"58,548,776"},{"time_hours":563,"approval_perbill":525753498,"support_perbill":51607616,"approval":52.5753498,"support":5.1607616,"days":24,"dot_needed":"58,528,848"},{"time_hours":564,"approval_perbill":525486333,"support_perbill":51590105,"approval":52.5486333,"support":5.1590105,"days":24,"dot_needed":"58,508,988"},{"time_hours":565,"approval_perbill":525219815,"support_perbill":51572655,"approval":52.5219815,"support":5.1572655,"days":24,"dot_needed":"58,489,198"},{"time_hours":566,"approval_perbill":524953941,"support_perbill":51555265,"approval":52.4953941,"support":5.1555265,"days":24,"dot_needed":"58,469,476"},{"time_hours":567,"approval_perbill":524688707,"support_perbill":51537935,"approval":52.4688707,"support":5.1537935,"days":24,"dot_needed":"58,449,821"},{"time_hours":568,"approval_perbill":524424114,"support_perbill":51520665,"approval":52.4424114,"support":5.1520665,"days":24,"dot_needed":"58,430,235"},{"time_hours":569,"approval_perbill":524160156,"support_perbill":51503454,"approval":52.4160156,"support":5.1503454,"days":24,"dot_needed":"58,410,716"},{"time_hours":570,"approval_perbill":523896834,"support_perbill":51486302,"approval":52.3896834,"support":5.1486302,"days":24,"dot_needed":"58,391,264"},{"time_hours":571,"approval_perbill":523634144,"support_perbill":51469209,"approval":52.3634144,"support":5.1469209,"days":24,"dot_needed":"58,371,878"},{"time_hours":572,"approval_perbill":523372083,"support_perbill":51452174,"approval":52.3372083,"support":5.1452174,"days":24,"dot_needed":"58,352,559"},{"time_hours":573,"approval_perbill":523110651,"support_perbill":51435198,"approval":52.3110651,"support":5.1435198,"days":24,"dot_needed":"58,333,306"},{"time_hours":574,"approval_perbill":522849844,"support_perbill":51418279,"approval":52.2849844,"support":5.1418279,"days":24,"dot_needed":"58,314,118"},{"time_hours":575,"approval_perbill":522589660,"support_perbill":51401418,"approval":52.258966,"support":5.1401418,"days":24,"dot_needed":"58,294,996"},{"time_hours":576,"approval_perbill":522330097,"support_perbill":51384615,"approval":52.2330097,"support":5.1384615,"days":24,"dot_needed":"58,275,939"},{"time_hours":577,"approval_perbill":522071153,"support_perbill":51367868,"approval":52.2071153,"support":5.1367868,"days":25,"dot_needed":"58,256,946"},{"time_hours":578,"approval_perbill":521812825,"support_perbill":51351178,"approval":52.1812825,"support":5.1351178,"days":25,"dot_needed":"58,238,018"},{"time_hours":579,"approval_perbill":521555112,"support_perbill":51334544,"approval":52.1555112,"support":5.1334544,"days":25,"dot_needed":"58,219,153"},{"time_hours":580,"approval_perbill":521298011,"support_perbill":51317967,"approval":52.1298011,"support":5.1317967,"days":25,"dot_needed":"58,200,353"},{"time_hours":581,"approval_perbill":521041520,"support_perbill":51301445,"approval":52.104152,"support":5.1301445,"days":25,"dot_needed":"58,181,615"},{"time_hours":582,"approval_perbill":520785637,"support_perbill":51284979,"approval":52.0785637,"support":5.1284979,"days":25,"dot_needed":"58,162,941"},{"time_hours":583,"approval_perbill":520530359,"support_perbill":51268568,"approval":52.0530359,"support":5.1268568,"days":25,"dot_needed":"58,144,329"},{"time_hours":584,"approval_perbill":520275685,"support_perbill":51252213,"approval":52.0275685,"support":5.1252213,"days":25,"dot_needed":"58,125,781"},{"time_hours":585,"approval_perbill":520021612,"support_perbill":51235912,"approval":52.0021612,"support":5.1235912,"days":25,"dot_needed":"58,107,293"},{"time_hours":586,"approval_perbill":519768139,"support_perbill":51219665,"approval":51.9768139,"support":5.1219665,"days":25,"dot_needed":"58,088,867"},{"time_hours":587,"approval_perbill":519515263,"support_perbill":51203473,"approval":51.9515263,"support":5.1203473,"days":25,"dot_needed":"58,070,504"},{"time_hours":588,"approval_perbill":519262981,"support_perbill":51187334,"approval":51.9262981,"support":5.1187334,"days":25,"dot_needed":"58,052,200"},{"time_hours":589,"approval_perbill":519011293,"support_perbill":51171249,"approval":51.9011293,"support":5.1171249,"days":25,"dot_needed":"58,033,958"},{"time_hours":590,"approval_perbill":518760195,"support_perbill":51155218,"approval":51.8760195,"support":5.1155218,"days":25,"dot_needed":"58,015,777"},{"time_hours":591,"approval_perbill":518509687,"support_perbill":51139240,"approval":51.8509687,"support":5.113924,"days":25,"dot_needed":"57,997,656"},{"time_hours":592,"approval_perbill":518259765,"support_perbill":51123314,"approval":51.8259765,"support":5.1123314,"days":25,"dot_needed":"57,979,595"},{"time_hours":593,"approval_perbill":518010427,"support_perbill":51107441,"approval":51.8010427,"support":5.1107441,"days":25,"dot_needed":"57,961,593"},{"time_hours":594,"approval_perbill":517761672,"support_perbill":51091621,"approval":51.7761672,"support":5.1091621,"days":25,"dot_needed":"57,943,651"},{"time_hours":595,"approval_perbill":517513498,"support_perbill":51075852,"approval":51.7513498,"support":5.1075852,"days":25,"dot_needed":"57,925,767"},{"time_hours":596,"approval_perbill":517265903,"support_perbill":51060136,"approval":51.7265903,"support":5.1060136,"days":25,"dot_needed":"57,907,944"},{"time_hours":597,"approval_perbill":517018883,"support_perbill":51044470,"approval":51.7018883,"support":5.104447,"days":25,"dot_needed":"57,890,177"},{"time_hours":598,"approval_perbill":516772438,"support_perbill":51028857,"approval":51.6772438,"support":5.1028857,"days":25,"dot_needed":"57,872,470"},{"time_hours":599,"approval_perbill":516526566,"support_perbill":51013294,"approval":51.6526566,"support":5.1013294,"days":25,"dot_needed":"57,854,819"},{"time_hours":600,"approval_perbill":516281264,"support_perbill":50997782,"approval":51.6281264,"support":5.0997782,"days":25,"dot_needed":"57,837,227"},{"time_hours":601,"approval_perbill":516036531,"support_perbill":50982320,"approval":51.6036531,"support":5.098232,"days":26,"dot_needed":"57,819,691"},{"time_hours":602,"approval_perbill":515792364,"support_perbill":50966909,"approval":51.5792364,"support":5.0966909,"days":26,"dot_needed":"57,802,214"},{"time_hours":603,"approval_perbill":515548762,"support_perbill":50951548,"approval":51.5548762,"support":5.0951548,"days":26,"dot_needed":"57,784,793"},{"time_hours":604,"approval_perbill":515305723,"support_perbill":50936237,"approval":51.5305723,"support":5.0936237,"days":26,"dot_needed":"57,767,428"},{"time_hours":605,"approval_perbill":515063244,"support_perbill":50920975,"approval":51.5063244,"support":5.0920975,"days":26,"dot_needed":"57,750,119"},{"time_hours":606,"approval_perbill":514821324,"support_perbill":50905763,"approval":51.4821324,"support":5.0905763,"days":26,"dot_needed":"57,732,867"},{"time_hours":607,"approval_perbill":514579960,"support_perbill":50890600,"approval":51.457996,"support":5.08906,"days":26,"dot_needed":"57,715,671"},{"time_hours":608,"approval_perbill":514339152,"support_perbill":50875486,"approval":51.4339152,"support":5.0875486,"days":26,"dot_needed":"57,698,530"},{"time_hours":609,"approval_perbill":514098896,"support_perbill":50860420,"approval":51.4098896,"support":5.086042,"days":26,"dot_needed":"57,681,443"},{"time_hours":610,"approval_perbill":513859192,"support_perbill":50845402,"approval":51.3859192,"support":5.0845402,"days":26,"dot_needed":"57,664,411"},{"time_hours":611,"approval_perbill":513620036,"support_perbill":50830433,"approval":51.3620036,"support":5.0830433,"days":26,"dot_needed":"57,647,435"},{"time_hours":612,"approval_perbill":513381428,"support_perbill":50815512,"approval":51.3381428,"support":5.0815512,"days":26,"dot_needed":"57,630,512"},{"time_hours":613,"approval_perbill":513143366,"support_perbill":50800638,"approval":51.3143366,"support":5.0800638,"days":26,"dot_needed":"57,613,644"},{"time_hours":614,"approval_perbill":512905847,"support_perbill":50785812,"approval":51.2905847,"support":5.0785812,"days":26,"dot_needed":"57,596,829"},{"time_hours":615,"approval_perbill":512668869,"support_perbill":50771034,"approval":51.2668869,"support":5.0771034,"days":26,"dot_needed":"57,580,069"},{"time_hours":616,"approval_perbill":512432432,"support_perbill":50756302,"approval":51.2432432,"support":5.0756302,"days":26,"dot_needed":"57,563,362"},{"time_hours":617,"approval_perbill":512196532,"support_perbill":50741617,"approval":51.2196532,"support":5.0741617,"days":26,"dot_needed":"57,546,707"},{"time_hours":618,"approval_perbill":511961169,"support_perbill":50726978,"approval":51.1961169,"support":5.0726978,"days":26,"dot_needed":"57,530,105"},{"time_hours":619,"approval_perbill":511726340,"support_perbill":50712386,"approval":51.172634,"support":5.0712386,"days":26,"dot_needed":"57,513,556"},{"time_hours":620,"approval_perbill":511492043,"support_perbill":50697840,"approval":51.1492043,"support":5.069784,"days":26,"dot_needed":"57,497,059"},{"time_hours":621,"approval_perbill":511258278,"support_perbill":50683340,"approval":51.1258278,"support":5.068334,"days":26,"dot_needed":"57,480,615"},{"time_hours":622,"approval_perbill":511025041,"support_perbill":50668886,"approval":51.1025041,"support":5.0668886,"days":26,"dot_needed":"57,464,222"},{"time_hours":623,"approval_perbill":510792331,"support_perbill":50654477,"approval":51.0792331,"support":5.0654477,"days":26,"dot_needed":"57,447,881"},{"time_hours":624,"approval_perbill":510560146,"support_perbill":50640113,"approval":51.0560146,"support":5.0640113,"days":26,"dot_needed":"57,431,590"},{"time_hours":625,"approval_perbill":510328486,"support_perbill":50625794,"approval":51.0328486,"support":5.0625794,"days":27,"dot_needed":"57,415,351"},{"time_hours":626,"approval_perbill":510097346,"support_perbill":50611521,"approval":51.0097346,"support":5.0611521,"days":27,"dot_needed":"57,399,164"},{"time_hours":627,"approval_perbill":509866727,"support_perbill":50597291,"approval":50.9866727,"support":5.0597291,"days":27,"dot_needed":"57,383,025"},{"time_hours":628,"approval_perbill":509636626,"support_perbill":50583107,"approval":50.9636626,"support":5.0583107,"days":27,"dot_needed":"57,366,939"},{"time_hours":629,"approval_perbill":509407042,"support_perbill":50568966,"approval":50.9407042,"support":5.0568966,"days":27,"dot_needed":"57,350,902"},{"time_hours":630,"approval_perbill":509177972,"support_perbill":50554870,"approval":50.9177972,"support":5.055487,"days":27,"dot_needed":"57,334,915"},{"time_hours":631,"approval_perbill":508949416,"support_perbill":50540817,"approval":50.8949416,"support":5.0540817,"days":27,"dot_needed":"57,318,977"},{"time_hours":632,"approval_perbill":508721371,"support_perbill":50526808,"approval":50.8721371,"support":5.0526808,"days":27,"dot_needed":"57,303,090"},{"time_hours":633,"approval_perbill":508493835,"support_perbill":50512842,"approval":50.8493835,"support":5.0512842,"days":27,"dot_needed":"57,287,251"},{"time_hours":634,"approval_perbill":508266807,"support_perbill":50498920,"approval":50.8266807,"support":5.049892,"days":27,"dot_needed":"57,271,461"},{"time_hours":635,"approval_perbill":508040286,"support_perbill":50485040,"approval":50.8040286,"support":5.048504,"days":27,"dot_needed":"57,255,720"},{"time_hours":636,"approval_perbill":507814269,"support_perbill":50471203,"approval":50.7814269,"support":5.0471203,"days":27,"dot_needed":"57,240,027"},{"time_hours":637,"approval_perbill":507588755,"support_perbill":50457409,"approval":50.7588755,"support":5.0457409,"days":27,"dot_needed":"57,224,383"},{"time_hours":638,"approval_perbill":507363742,"support_perbill":50443657,"approval":50.7363742,"support":5.0443657,"days":27,"dot_needed":"57,208,787"},{"time_hours":639,"approval_perbill":507139228,"support_perbill":50429948,"approval":50.7139228,"support":5.0429948,"days":27,"dot_needed":"57,193,239"},{"time_hours":640,"approval_perbill":506915213,"support_perbill":50416280,"approval":50.6915213,"support":5.041628,"days":27,"dot_needed":"57,177,738"},{"time_hours":641,"approval_perbill":506691693,"support_perbill":50402655,"approval":50.6691693,"support":5.0402655,"days":27,"dot_needed":"57,162,286"},{"time_hours":642,"approval_perbill":506468669,"support_perbill":50389071,"approval":50.6468669,"support":5.0389071,"days":27,"dot_needed":"57,146,880"},{"time_hours":643,"approval_perbill":506246136,"support_perbill":50375528,"approval":50.6246136,"support":5.0375528,"days":27,"dot_needed":"57,131,521"},{"time_hours":644,"approval_perbill":506024096,"support_perbill":50362026,"approval":50.6024096,"support":5.0362026,"days":27,"dot_needed":"57,116,208"},{"time_hours":645,"approval_perbill":505802545,"support_perbill":50348566,"approval":50.5802545,"support":5.0348566,"days":27,"dot_needed":"57,100,943"},{"time_hours":646,"approval_perbill":505581482,"support_perbill":50335147,"approval":50.5581482,"support":5.0335147,"days":27,"dot_needed":"57,085,724"},{"time_hours":647,"approval_perbill":505360905,"support_perbill":50321768,"approval":50.5360905,"support":5.0321768,"days":27,"dot_needed":"57,070,551"},{"time_hours":648,"approval_perbill":505140813,"support_perbill":50308430,"approval":50.5140813,"support":5.030843,"days":27,"dot_needed":"57,055,424"},{"time_hours":649,"approval_perbill":504921204,"support_perbill":50295132,"approval":50.4921204,"support":5.0295132,"days":28,"dot_needed":"57,040,343"},{"time_hours":650,"approval_perbill":504702077,"support_perbill":50281874,"approval":50.4702077,"support":5.0281874,"days":28,"dot_needed":"57,025,307"},{"time_hours":651,"approval_perbill":504483430,"support_perbill":50268656,"approval":50.448343,"support":5.0268656,"days":28,"dot_needed":"57,010,316"},{"time_hours":652,"approval_perbill":504265261,"support_perbill":50255478,"approval":50.4265261,"support":5.0255478,"days":28,"dot_needed":"56,995,371"},{"time_hours":653,"approval_perbill":504047570,"support_perbill":50242339,"approval":50.404757,"support":5.0242339,"days":28,"dot_needed":"56,980,470"},{"time_hours":654,"approval_perbill":503830353,"support_perbill":50229240,"approval":50.3830353,"support":5.022924,"days":28,"dot_needed":"56,965,614"},{"time_hours":655,"approval_perbill":503613611,"support_perbill":50216180,"approval":50.3613611,"support":5.021618,"days":28,"dot_needed":"56,950,802"},{"time_hours":656,"approval_perbill":503397340,"support_perbill":50203159,"approval":50.339734,"support":5.0203159,"days":28,"dot_needed":"56,936,035"},{"time_hours":657,"approval_perbill":503181541,"support_perbill":50190177,"approval":50.3181541,"support":5.0190177,"days":28,"dot_needed":"56,921,312"},{"time_hours":658,"approval_perbill":502966210,"support_perbill":50177234,"approval":50.296621,"support":5.0177234,"days":28,"dot_needed":"56,906,633"},{"time_hours":659,"approval_perbill":502751347,"support_perbill":50164330,"approval":50.2751347,"support":5.016433,"days":28,"dot_needed":"56,891,999"},{"time_hours":660,"approval_perbill":502536950,"support_perbill":50151463,"approval":50.253695,"support":5.0151463,"days":28,"dot_needed":"56,877,406"},{"time_hours":661,"approval_perbill":502323018,"support_perbill":50138635,"approval":50.2323018,"support":5.0138635,"days":28,"dot_needed":"56,862,858"},{"time_hours":662,"approval_perbill":502109549,"support_perbill":50125845,"approval":50.2109549,"support":5.0125845,"days":28,"dot_needed":"56,848,352"},{"time_hours":663,"approval_perbill":501896542,"support_perbill":50113093,"approval":50.1896542,"support":5.0113093,"days":28,"dot_needed":"56,833,890"},{"time_hours":664,"approval_perbill":501683994,"support_perbill":50100378,"approval":50.1683994,"support":5.0100378,"days":28,"dot_needed":"56,819,470"},{"time_hours":665,"approval_perbill":501471905,"support_perbill":50087701,"approval":50.1471905,"support":5.0087701,"days":28,"dot_needed":"56,805,093"},{"time_hours":666,"approval_perbill":501260273,"support_perbill":50075062,"approval":50.1260273,"support":5.0075062,"days":28,"dot_needed":"56,790,759"},{"time_hours":667,"approval_perbill":501049097,"support_perbill":50062459,"approval":50.1049097,"support":5.0062459,"days":28,"dot_needed":"56,776,466"},{"time_hours":668,"approval_perbill":500838375,"support_perbill":50049894,"approval":50.0838375,"support":5.0049894,"days":28,"dot_needed":"56,762,215"},{"time_hours":669,"approval_perbill":500628106,"support_perbill":50037365,"approval":50.0628106,"support":5.0037365,"days":28,"dot_needed":"56,748,006"},{"time_hours":670,"approval_perbill":500418287,"support_perbill":50024873,"approval":50.0418287,"support":5.0024873,"days":28,"dot_needed":"56,733,839"},{"time_hours":671,"approval_perbill":500208919,"support_perbill":50012418,"approval":50.0208919,"support":5.0012418,"days":28,"dot_needed":"56,719,713"},{"time_hours":672,"approval_perbill":499999999,"support_perbill":49999999,"approval":49.9999999,"support":4.9999999,"days":28,"dot_needed":"56,705,629"}]')}}]); \ No newline at end of file diff --git a/assets/js/54338ffb.59853afe.js b/assets/js/54338ffb.59853afe.js new file mode 100644 index 000000000000..81e110c7eb6e --- /dev/null +++ b/assets/js/54338ffb.59853afe.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8112],{69870:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>r,default:()=>d,frontMatter:()=>a,metadata:()=>i,toc:()=>l});const i=JSON.parse('{"id":"learn/learn-account-multisig","title":"Multi-Signature Accounts","description":"Multi-signature Accounts on Polkadot.","source":"@site/../docs/learn/learn-account-multisig.md","sourceDirName":"learn","slug":"/learn-account-multisig","permalink":"/docs/learn-account-multisig","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-account-multisig.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1726731604000,"frontMatter":{"id":"learn-account-multisig","title":"Multi-Signature Accounts","sidebar_label":"Multi-Signature Accounts","description":"Multi-signature Accounts on Polkadot.","keywords":["account","multisig","polkadot account","polkadotjs","multix"],"slug":"../learn-account-multisig"},"sidebar":"docs","previous":{"title":"Account Identity","permalink":"/docs/learn-identity"},"next":{"title":"Proxy Accounts","permalink":"/docs/learn-proxies"}}');var s=n(74848),o=n(28453);const a={id:"learn-account-multisig",title:"Multi-Signature Accounts",sidebar_label:"Multi-Signature Accounts",description:"Multi-signature Accounts on Polkadot.",keywords:["account","multisig","polkadot account","polkadotjs","multix"],slug:"../learn-account-multisig"},r=void 0,c={},l=[];function u(e){const t={a:"a",admonition:"admonition",hr:"hr",li:"li",p:"p",strong:"strong",ul:"ul",...(0,o.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.admonition,{title:"Multisig Apps",type:"info",children:(0,s.jsxs)(t.p,{children:["See the ",(0,s.jsx)(t.a,{href:"/docs/multisig-apps",children:"multisig apps"})," page for more information about user-friendly\ntools about multi-signature accounts."]})}),"\n",(0,s.jsx)(t.p,{children:"It is possible to create multi-signature accounts (multisig) in Substrate-based chains. A multisig\nis composed of one or more addresses and a threshold. The threshold defines how many signatories\n(participating addresses) need to agree on submitting an extrinsic for the call to be successful."}),"\n",(0,s.jsx)(t.p,{children:"For example, Alice, Bob, and Charlie set up a multisig with a threshold of 2. This means Alice and\nBob can execute any call even if Charlie disagrees with it. Likewise, Charlie and Bob can execute\nany call without Alice. A threshold is typically a number smaller than the total number of members\nbut can also be equal to it, which means they all have to agree."}),"\n",(0,s.jsx)(t.p,{children:"Multi-signature accounts have several uses:"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:"securing your stash: use additional signatories as a 2FA mechanism to secure your funds. One\nsigner can be on one computer, and another can be on another or in cold storage. This slows down\nyour interactions with the chain but is orders of magnitude more secure."}),"\n",(0,s.jsx)(t.li,{children:"board decisions: legal entities such as businesses and foundations use multisigs to govern over\nthe entity's treasury collectively."}),"\n",(0,s.jsx)(t.li,{children:"group participation in governance: a multisig account can do everything a regular account can. A\nmultisig account could be a referendum proposer or a recipient of funds (recommended) in\ngovernance."}),"\n"]}),"\n",(0,s.jsxs)(t.p,{children:["Multi-signature accounts ",(0,s.jsx)(t.strong,{children:"cannot be modified after being created"}),". Changing the set of members or\naltering the threshold is not possible and instead requires the dissolution of the current multisig\nand creation of a new one. As such, multisig account addresses are ",(0,s.jsx)(t.strong,{children:"deterministic"}),", i.e. you can\nalways calculate the address of a multisig by knowing the members and the threshold, without the\naccount existing yet. This means one can send tokens to an address that does not exist yet, and if\nthe entities designated as the recipients come together in a new multisig under a matching\nthreshold, they will immediately have access to these tokens."]}),"\n",(0,s.jsx)(t.hr,{}),"\n",(0,s.jsx)(t.admonition,{title:"Polkadot-JS Guides",type:"info",children:(0,s.jsxs)(t.p,{children:["If you are an advanced user, see the\n",(0,s.jsx)(t.a,{href:"/docs/learn-guides-accounts-multisig",children:"Polkadot-JS guides about multi-signature accounts"}),"."]})})]})}function d(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(u,{...e})}):u(e)}},28453:(e,t,n)=>{n.d(t,{R:()=>a,x:()=>r});var i=n(96540);const s={},o=i.createContext(s);function a(e){const t=i.useContext(o);return i.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:a(e.components),i.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/54338ffb.7a0f5395.js b/assets/js/54338ffb.7a0f5395.js deleted file mode 100644 index bf471af6dc56..000000000000 --- a/assets/js/54338ffb.7a0f5395.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8112],{60799:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>a,default:()=>d,frontMatter:()=>o,metadata:()=>r,toc:()=>l});var i=n(74848),s=n(28453);const o={id:"learn-account-multisig",title:"Multi-Signature Accounts",sidebar_label:"Multi-Signature Accounts",description:"Multi-signature Accounts on Polkadot.",keywords:["account","multisig","polkadot account","polkadotjs","multix"],slug:"../learn-account-multisig"},a=void 0,r={id:"learn/learn-account-multisig",title:"Multi-Signature Accounts",description:"Multi-signature Accounts on Polkadot.",source:"@site/../docs/learn/learn-account-multisig.md",sourceDirName:"learn",slug:"/learn-account-multisig",permalink:"/docs/learn-account-multisig",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-account-multisig.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1726731604e3,frontMatter:{id:"learn-account-multisig",title:"Multi-Signature Accounts",sidebar_label:"Multi-Signature Accounts",description:"Multi-signature Accounts on Polkadot.",keywords:["account","multisig","polkadot account","polkadotjs","multix"],slug:"../learn-account-multisig"},sidebar:"docs",previous:{title:"Account Identity",permalink:"/docs/learn-identity"},next:{title:"Proxy Accounts",permalink:"/docs/learn-proxies"}},c={},l=[];function u(e){const t={a:"a",admonition:"admonition",hr:"hr",li:"li",p:"p",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.admonition,{title:"Multisig Apps",type:"info",children:(0,i.jsxs)(t.p,{children:["See the ",(0,i.jsx)(t.a,{href:"/docs/multisig-apps",children:"multisig apps"})," page for more information about user-friendly\ntools about multi-signature accounts."]})}),"\n",(0,i.jsx)(t.p,{children:"It is possible to create multi-signature accounts (multisig) in Substrate-based chains. A multisig\nis composed of one or more addresses and a threshold. The threshold defines how many signatories\n(participating addresses) need to agree on submitting an extrinsic for the call to be successful."}),"\n",(0,i.jsx)(t.p,{children:"For example, Alice, Bob, and Charlie set up a multisig with a threshold of 2. This means Alice and\nBob can execute any call even if Charlie disagrees with it. Likewise, Charlie and Bob can execute\nany call without Alice. A threshold is typically a number smaller than the total number of members\nbut can also be equal to it, which means they all have to agree."}),"\n",(0,i.jsx)(t.p,{children:"Multi-signature accounts have several uses:"}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsx)(t.li,{children:"securing your stash: use additional signatories as a 2FA mechanism to secure your funds. One\nsigner can be on one computer, and another can be on another or in cold storage. This slows down\nyour interactions with the chain but is orders of magnitude more secure."}),"\n",(0,i.jsx)(t.li,{children:"board decisions: legal entities such as businesses and foundations use multisigs to govern over\nthe entity's treasury collectively."}),"\n",(0,i.jsx)(t.li,{children:"group participation in governance: a multisig account can do everything a regular account can. A\nmultisig account could be a referendum proposer or a recipient of funds (recommended) in\ngovernance."}),"\n"]}),"\n",(0,i.jsxs)(t.p,{children:["Multi-signature accounts ",(0,i.jsx)(t.strong,{children:"cannot be modified after being created"}),". Changing the set of members or\naltering the threshold is not possible and instead requires the dissolution of the current multisig\nand creation of a new one. As such, multisig account addresses are ",(0,i.jsx)(t.strong,{children:"deterministic"}),", i.e. you can\nalways calculate the address of a multisig by knowing the members and the threshold, without the\naccount existing yet. This means one can send tokens to an address that does not exist yet, and if\nthe entities designated as the recipients come together in a new multisig under a matching\nthreshold, they will immediately have access to these tokens."]}),"\n",(0,i.jsx)(t.hr,{}),"\n",(0,i.jsx)(t.admonition,{title:"Polkadot-JS Guides",type:"info",children:(0,i.jsxs)(t.p,{children:["If you are an advanced user, see the\n",(0,i.jsx)(t.a,{href:"/docs/learn-guides-accounts-multisig",children:"Polkadot-JS guides about multi-signature accounts"}),"."]})})]})}function d(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(u,{...e})}):u(e)}},28453:(e,t,n)=>{n.d(t,{R:()=>a,x:()=>r});var i=n(96540);const s={},o=i.createContext(s);function a(e){const t=i.useContext(o);return i.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:a(e.components),i.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/543c9f0a.2413bae1.js b/assets/js/543c9f0a.2413bae1.js deleted file mode 100644 index d26eeaab9a4b..000000000000 --- a/assets/js/543c9f0a.2413bae1.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[566],{30644:(e,o,t)=>{t.r(o),t.d(o,{assets:()=>c,contentTitle:()=>s,default:()=>d,frontMatter:()=>i,metadata:()=>r,toc:()=>l});var a=t(74848),n=t(28453);const i={id:"build-guides-coretime-troubleshoot",title:"Coretime Troubleshooting FAQ",sidebar_label:"Troubleshooting FAQ",description:"FAQ on issues related to using coretime and testing/deploying parachains using Polkadot SDK",keywords:["coretime","blockspace","parathread","parachain","cores","coretime","agile"],slug:"../build-guides-coretime-troubleshoot"},s=void 0,r={id:"build/build-guides-coretime-troubleshoot",title:"Coretime Troubleshooting FAQ",description:"FAQ on issues related to using coretime and testing/deploying parachains using Polkadot SDK",source:"@site/../docs/build/build-guides-coretime-troubleshoot.md",sourceDirName:"build",slug:"/build-guides-coretime-troubleshoot",permalink:"/docs/build-guides-coretime-troubleshoot",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/build/build-guides-coretime-troubleshoot.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1729248214e3,frontMatter:{id:"build-guides-coretime-troubleshoot",title:"Coretime Troubleshooting FAQ",sidebar_label:"Troubleshooting FAQ",description:"FAQ on issues related to using coretime and testing/deploying parachains using Polkadot SDK",keywords:["coretime","blockspace","parathread","parachain","cores","coretime","agile"],slug:"../build-guides-coretime-troubleshoot"},sidebar:"docs",previous:{title:"Parachain Template Guide",permalink:"/docs/build-guides-template-basic"},next:{title:"Coretime Swap",permalink:"/docs/learn-guides-coretime-swap"}},c={},l=[{value:"FAQ / Troubleshooting",id:"faq--troubleshooting",level:2},{value:"Why do I have to sync Paseo locally? Can't I just use a remote, trusted node and connect to that?",id:"why-do-i-have-to-sync-paseo-locally-cant-i-just-use-a-remote-trusted-node-and-connect-to-that",level:3},{value:"My collator is not producing blocks",id:"my-collator-is-not-producing-blocks",level:3},{value:"I want to run more than one collator, how do I do that?",id:"i-want-to-run-more-than-one-collator-how-do-i-do-that",level:3},{value:"Why do we only have one collator in the parachain guides on the Wiki? Isn't it better to have more?",id:"why-do-we-only-have-one-collator-in-the-parachain-guides-on-the-wiki-isnt-it-better-to-have-more",level:3},{value:"Why are we registering parathreads and not parachains?",id:"why-are-we-registering-parathreads-and-not-parachains",level:3}];function h(e){const o={a:"a",code:"code",em:"em",h2:"h2",h3:"h3",li:"li",p:"p",ul:"ul",...(0,n.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(o.p,{children:"This page aims to cover and aggregate various resources that relate to troubleshooting common\nproblems when using the Polkadot SDK or deploying on a core."}),"\n",(0,a.jsx)(o.h2,{id:"faq--troubleshooting",children:"FAQ / Troubleshooting"}),"\n",(0,a.jsx)(o.h3,{id:"why-do-i-have-to-sync-paseo-locally-cant-i-just-use-a-remote-trusted-node-and-connect-to-that",children:"Why do I have to sync Paseo locally? Can't I just use a remote, trusted node and connect to that?"}),"\n",(0,a.jsxs)(o.p,{children:["You can remotely connect to Paseo network via the ",(0,a.jsx)(o.code,{children:"--relay-chain-rpc-urls"})," flag, which can be passed\nto your node. Unfortunately, the caveat is you can't use this node for collation at this time -\nmeaning if you intend on being a collator/validator for your blockchain and intend to create blocks,\nyou need to sync the chain locally."]}),"\n",(0,a.jsx)(o.h3,{id:"my-collator-is-not-producing-blocks",children:"My collator is not producing blocks"}),"\n",(0,a.jsx)(o.p,{children:"Check these sanity checklists:"}),"\n",(0,a.jsxs)(o.ul,{children:["\n",(0,a.jsx)(o.li,{children:(0,a.jsx)(o.a,{href:"https://substrate.stackexchange.com/questions/178/how-can-i-get-my-parachain-to-produce-blocks-sanity-checklist",children:"https://substrate.stackexchange.com/questions/178/how-can-i-get-my-parachain-to-produce-blocks-sanity-checklist"})}),"\n",(0,a.jsx)(o.li,{children:(0,a.jsx)(o.a,{href:"https://substrate.stackexchange.com/questions/1394/our-parachain-doesnt-produce-blocks-checklist",children:"https://substrate.stackexchange.com/questions/1394/our-parachain-doesnt-produce-blocks-checklist"})}),"\n"]}),"\n",(0,a.jsx)(o.h3,{id:"i-want-to-run-more-than-one-collator-how-do-i-do-that",children:"I want to run more than one collator, how do I do that?"}),"\n",(0,a.jsxs)(o.p,{children:["Ideally, you would want to run these on separate machines/servers, but you could as long as you\nensure you can provide different RPC/WebSocket and P2P ports for each collator. You also may need to\nsync a separate instance of Paseo for each collator on the same machine. You also will need to\nchoose the block production mechanism like\n",(0,a.jsx)(o.a,{href:"https://substrate.stackexchange.com/questions/5572/production-like-parachain-setup-and-launch",children:"Aura"}),"."]}),"\n",(0,a.jsx)(o.h3,{id:"why-do-we-only-have-one-collator-in-the-parachain-guides-on-the-wiki-isnt-it-better-to-have-more",children:"Why do we only have one collator in the parachain guides on the Wiki? Isn't it better to have more?"}),"\n",(0,a.jsx)(o.p,{children:"Mostly for simplicity. If we have more than one collator, we would have to also spin it up, which\nwould be a hassle on a single machine (it is possible though). Of course, if you had an actual\nnetwork with multiple collators, it is assumed you'd have separate VPS/servers for each."}),"\n",(0,a.jsx)(o.h3,{id:"why-are-we-registering-parathreads-and-not-parachains",children:"Why are we registering parathreads and not parachains?"}),"\n",(0,a.jsxs)(o.p,{children:["When registering a parachain on a relay chain, they are assigned a ",(0,a.jsx)(o.code,{children:"ParaID"}),", and they are referred\nto as Parathreads till they start producing blocks. ",(0,a.jsx)(o.em,{children:"Parathreads"})," are a bit of an outdated term now.\nThey refer to what are now known as on-demand parachains. Although they be references in various\nplaces through PolkadotJS, docs, or other UIs, really we only have two types of parachain: on-demand\nparachains, and parachains which use bulk coretime."]})]})}function d(e={}){const{wrapper:o}={...(0,n.R)(),...e.components};return o?(0,a.jsx)(o,{...e,children:(0,a.jsx)(h,{...e})}):h(e)}},28453:(e,o,t)=>{t.d(o,{R:()=>s,x:()=>r});var a=t(96540);const n={},i=a.createContext(n);function s(e){const o=a.useContext(i);return a.useMemo((function(){return"function"==typeof e?e(o):{...o,...e}}),[o,e])}function r(e){let o;return o=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:s(e.components),a.createElement(i.Provider,{value:o},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/543c9f0a.2cac2d50.js b/assets/js/543c9f0a.2cac2d50.js new file mode 100644 index 000000000000..9494e17c1223 --- /dev/null +++ b/assets/js/543c9f0a.2cac2d50.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[566],{19668:(e,o,t)=>{t.r(o),t.d(o,{assets:()=>c,contentTitle:()=>r,default:()=>d,frontMatter:()=>i,metadata:()=>a,toc:()=>l});const a=JSON.parse('{"id":"build/build-guides-coretime-troubleshoot","title":"Coretime Troubleshooting FAQ","description":"FAQ on issues related to using coretime and testing/deploying parachains using Polkadot SDK","source":"@site/../docs/build/build-guides-coretime-troubleshoot.md","sourceDirName":"build","slug":"/build-guides-coretime-troubleshoot","permalink":"/docs/build-guides-coretime-troubleshoot","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/build/build-guides-coretime-troubleshoot.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1729248214000,"frontMatter":{"id":"build-guides-coretime-troubleshoot","title":"Coretime Troubleshooting FAQ","sidebar_label":"Troubleshooting FAQ","description":"FAQ on issues related to using coretime and testing/deploying parachains using Polkadot SDK","keywords":["coretime","blockspace","parathread","parachain","cores","coretime","agile"],"slug":"../build-guides-coretime-troubleshoot"},"sidebar":"docs","previous":{"title":"Parachain Template Guide","permalink":"/docs/build-guides-template-basic"},"next":{"title":"Coretime Swap","permalink":"/docs/learn-guides-coretime-swap"}}');var n=t(74848),s=t(28453);const i={id:"build-guides-coretime-troubleshoot",title:"Coretime Troubleshooting FAQ",sidebar_label:"Troubleshooting FAQ",description:"FAQ on issues related to using coretime and testing/deploying parachains using Polkadot SDK",keywords:["coretime","blockspace","parathread","parachain","cores","coretime","agile"],slug:"../build-guides-coretime-troubleshoot"},r=void 0,c={},l=[{value:"FAQ / Troubleshooting",id:"faq--troubleshooting",level:2},{value:"Why do I have to sync Paseo locally? Can't I just use a remote, trusted node and connect to that?",id:"why-do-i-have-to-sync-paseo-locally-cant-i-just-use-a-remote-trusted-node-and-connect-to-that",level:3},{value:"My collator is not producing blocks",id:"my-collator-is-not-producing-blocks",level:3},{value:"I want to run more than one collator, how do I do that?",id:"i-want-to-run-more-than-one-collator-how-do-i-do-that",level:3},{value:"Why do we only have one collator in the parachain guides on the Wiki? Isn't it better to have more?",id:"why-do-we-only-have-one-collator-in-the-parachain-guides-on-the-wiki-isnt-it-better-to-have-more",level:3},{value:"Why are we registering parathreads and not parachains?",id:"why-are-we-registering-parathreads-and-not-parachains",level:3}];function h(e){const o={a:"a",code:"code",em:"em",h2:"h2",h3:"h3",li:"li",p:"p",ul:"ul",...(0,s.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(o.p,{children:"This page aims to cover and aggregate various resources that relate to troubleshooting common\nproblems when using the Polkadot SDK or deploying on a core."}),"\n",(0,n.jsx)(o.h2,{id:"faq--troubleshooting",children:"FAQ / Troubleshooting"}),"\n",(0,n.jsx)(o.h3,{id:"why-do-i-have-to-sync-paseo-locally-cant-i-just-use-a-remote-trusted-node-and-connect-to-that",children:"Why do I have to sync Paseo locally? Can't I just use a remote, trusted node and connect to that?"}),"\n",(0,n.jsxs)(o.p,{children:["You can remotely connect to Paseo network via the ",(0,n.jsx)(o.code,{children:"--relay-chain-rpc-urls"})," flag, which can be passed\nto your node. Unfortunately, the caveat is you can't use this node for collation at this time -\nmeaning if you intend on being a collator/validator for your blockchain and intend to create blocks,\nyou need to sync the chain locally."]}),"\n",(0,n.jsx)(o.h3,{id:"my-collator-is-not-producing-blocks",children:"My collator is not producing blocks"}),"\n",(0,n.jsx)(o.p,{children:"Check these sanity checklists:"}),"\n",(0,n.jsxs)(o.ul,{children:["\n",(0,n.jsx)(o.li,{children:(0,n.jsx)(o.a,{href:"https://substrate.stackexchange.com/questions/178/how-can-i-get-my-parachain-to-produce-blocks-sanity-checklist",children:"https://substrate.stackexchange.com/questions/178/how-can-i-get-my-parachain-to-produce-blocks-sanity-checklist"})}),"\n",(0,n.jsx)(o.li,{children:(0,n.jsx)(o.a,{href:"https://substrate.stackexchange.com/questions/1394/our-parachain-doesnt-produce-blocks-checklist",children:"https://substrate.stackexchange.com/questions/1394/our-parachain-doesnt-produce-blocks-checklist"})}),"\n"]}),"\n",(0,n.jsx)(o.h3,{id:"i-want-to-run-more-than-one-collator-how-do-i-do-that",children:"I want to run more than one collator, how do I do that?"}),"\n",(0,n.jsxs)(o.p,{children:["Ideally, you would want to run these on separate machines/servers, but you could as long as you\nensure you can provide different RPC/WebSocket and P2P ports for each collator. You also may need to\nsync a separate instance of Paseo for each collator on the same machine. You also will need to\nchoose the block production mechanism like\n",(0,n.jsx)(o.a,{href:"https://substrate.stackexchange.com/questions/5572/production-like-parachain-setup-and-launch",children:"Aura"}),"."]}),"\n",(0,n.jsx)(o.h3,{id:"why-do-we-only-have-one-collator-in-the-parachain-guides-on-the-wiki-isnt-it-better-to-have-more",children:"Why do we only have one collator in the parachain guides on the Wiki? Isn't it better to have more?"}),"\n",(0,n.jsx)(o.p,{children:"Mostly for simplicity. If we have more than one collator, we would have to also spin it up, which\nwould be a hassle on a single machine (it is possible though). Of course, if you had an actual\nnetwork with multiple collators, it is assumed you'd have separate VPS/servers for each."}),"\n",(0,n.jsx)(o.h3,{id:"why-are-we-registering-parathreads-and-not-parachains",children:"Why are we registering parathreads and not parachains?"}),"\n",(0,n.jsxs)(o.p,{children:["When registering a parachain on a relay chain, they are assigned a ",(0,n.jsx)(o.code,{children:"ParaID"}),", and they are referred\nto as Parathreads till they start producing blocks. ",(0,n.jsx)(o.em,{children:"Parathreads"})," are a bit of an outdated term now.\nThey refer to what are now known as on-demand parachains. Although they be references in various\nplaces through PolkadotJS, docs, or other UIs, really we only have two types of parachain: on-demand\nparachains, and parachains which use bulk coretime."]})]})}function d(e={}){const{wrapper:o}={...(0,s.R)(),...e.components};return o?(0,n.jsx)(o,{...e,children:(0,n.jsx)(h,{...e})}):h(e)}},28453:(e,o,t)=>{t.d(o,{R:()=>i,x:()=>r});var a=t(96540);const n={},s=a.createContext(n);function i(e){const o=a.useContext(s);return a.useMemo((function(){return"function"==typeof e?e(o):{...o,...e}}),[o,e])}function r(e){let o;return o=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:i(e.components),a.createElement(s.Provider,{value:o},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/556d3f96.352260ab.js b/assets/js/556d3f96.352260ab.js deleted file mode 100644 index 96cd7bee5a30..000000000000 --- a/assets/js/556d3f96.352260ab.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1241],{62659:(e,a,s)=>{s.r(a),s.d(a,{assets:()=>o,contentTitle:()=>i,default:()=>h,frontMatter:()=>n,metadata:()=>d,toc:()=>l});var r=s(74848),t=s(28453);const n={id:"astar-dashboards",title:"Astar Dashboards",sidebar_label:"Astar",description:"Astar Network, previously known as Plasm, is a decentralized blockchain platform designed for Web3.",keywords:["polkadot","dashboard","dune","astar","dApp"],slug:"../astar-dashboards"},i="Astar Dashboards",d={id:"general/dune-analytics/parachain-dashboards/astar-dashboards",title:"Astar Dashboards",description:"Astar Network, previously known as Plasm, is a decentralized blockchain platform designed for Web3.",source:"@site/../docs/general/dune-analytics/parachain-dashboards/astar-dashboards.md",sourceDirName:"general/dune-analytics/parachain-dashboards",slug:"/general/dune-analytics/astar-dashboards",permalink:"/docs/general/dune-analytics/astar-dashboards",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/parachain-dashboards/astar-dashboards.md",tags:[],version:"current",lastUpdatedBy:"MK",lastUpdatedAt:1719215716e3,frontMatter:{id:"astar-dashboards",title:"Astar Dashboards",sidebar_label:"Astar",description:"Astar Network, previously known as Plasm, is a decentralized blockchain platform designed for Web3.",keywords:["polkadot","dashboard","dune","astar","dApp"],slug:"../astar-dashboards"},sidebar:"docs",previous:{title:"Asset Hub",permalink:"/docs/general/dune-analytics/assethub-dashboards"},next:{title:"Bifrost",permalink:"/docs/general/dune-analytics/bifrost-dashboards"}},o={},l=[{value:"Overview",id:"overview",level:2},{value:"Featured Dashboards on Dune",id:"featured-dashboards-on-dune",level:2},{value:"Key Tables",id:"key-tables",level:2},{value:"Useful Queries",id:"useful-queries",level:2},{value:"Getting Started with Queries",id:"getting-started-with-queries",level:2}];function c(e){const a={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,t.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(a.header,{children:(0,r.jsx)(a.h1,{id:"astar-dashboards",children:"Astar Dashboards"})}),"\n",(0,r.jsx)(a.h2,{id:"overview",children:"Overview"}),"\n",(0,r.jsx)(a.p,{children:"Astar Network, previously known as Plasm, is a blockchain platform designed for Web3. It is\ncompatible with both EVM (Ethereum Virtual Machine) and WebAssembly, enabling seamless interaction\nbetween the two environments. Developers can participate in the Build2Earn program to earn rewards\nby creating decentralized applications."}),"\n",(0,r.jsx)(a.h2,{id:"featured-dashboards-on-dune",children:"Featured Dashboards on Dune"}),"\n",(0,r.jsx)(a.p,{children:"Here you will find a variety of dashboards that help visualize data from the Astar parachain:"}),"\n",(0,r.jsxs)(a.ul,{children:["\n",(0,r.jsxs)(a.li,{children:[(0,r.jsx)(a.a,{href:"https://dune.com/substrate/astar-dapp-staking",children:"Astar dApp Staking Overview"}),": This dashboard is\ndesigned to provide a quick overview of various aspects of Astar dApp Staking."]}),"\n"]}),"\n",(0,r.jsx)(a.h2,{id:"key-tables",children:"Key Tables"}),"\n",(0,r.jsx)(a.p,{children:"Data from the Astar parachain is organized into several key tables:"}),"\n",(0,r.jsxs)(a.ul,{children:["\n",(0,r.jsx)(a.li,{children:(0,r.jsx)(a.code,{children:"astar.balances"})}),"\n",(0,r.jsx)(a.li,{children:(0,r.jsx)(a.code,{children:"astar.blocks"})}),"\n",(0,r.jsx)(a.li,{children:(0,r.jsx)(a.code,{children:"astar.calls"})}),"\n",(0,r.jsx)(a.li,{children:(0,r.jsx)(a.code,{children:"astar.events"})}),"\n",(0,r.jsx)(a.li,{children:(0,r.jsx)(a.code,{children:"astar.extrinsics"})}),"\n",(0,r.jsx)(a.li,{children:(0,r.jsx)(a.code,{children:"astar.transfers"})}),"\n",(0,r.jsx)(a.li,{children:(0,r.jsx)(a.code,{children:"astar.traces"})}),"\n"]}),"\n",(0,r.jsxs)(a.p,{children:["Start building your own queries using granular data on Dune\n",(0,r.jsx)(a.a,{href:"https://dune.com/queries?category=canonical&namespace=astar",children:"here"}),"."]}),"\n",(0,r.jsx)(a.h2,{id:"useful-queries",children:"Useful Queries"}),"\n",(0,r.jsx)(a.p,{children:"Some useful queries for Astar are provided:"}),"\n",(0,r.jsxs)(a.table,{children:[(0,r.jsx)(a.thead,{children:(0,r.jsxs)(a.tr,{children:[(0,r.jsx)(a.th,{children:"Title"}),(0,r.jsx)(a.th,{children:"Query"}),(0,r.jsx)(a.th,{children:"Description"})]})}),(0,r.jsxs)(a.tbody,{children:[(0,r.jsxs)(a.tr,{children:[(0,r.jsx)(a.td,{children:"Astar dApp Info by Era"}),(0,r.jsx)(a.td,{children:(0,r.jsx)(a.a,{href:"https://dune.com/queries/3727264",children:"query_3727264"})}),(0,r.jsx)(a.td,{children:"This query provides comprehensive information on decentralized applications (dApps) within the Astar ecosystem, including details about the dApp name, staking statistics, tier levels, and developer profiles, facilitating deeper insights into dApp performance and engagement across different eras."})]}),(0,r.jsxs)(a.tr,{children:[(0,r.jsx)(a.td,{children:"Astar Reward Info by Era"}),(0,r.jsx)(a.td,{children:(0,r.jsx)(a.a,{href:"https://dune.com/queries/3727888",children:"query_3727888"})}),(0,r.jsx)(a.td,{children:"Explore comprehensive data on rewards distribution within the Astar network, broken down by era to identify trends and patterns."})]}),(0,r.jsxs)(a.tr,{children:[(0,r.jsx)(a.td,{children:"Astar Staker info by Era"}),(0,r.jsx)(a.td,{children:(0,r.jsx)(a.a,{href:"https://dune.com/queries/3728048",children:"query_3728048"})}),(0,r.jsx)(a.td,{children:"Access a detailed breakdown of staker activities and statistics on the Astar network, categorized by era for historical comparison."})]})]})]}),"\n",(0,r.jsx)(a.h2,{id:"getting-started-with-queries",children:"Getting Started with Queries"}),"\n",(0,r.jsx)(a.p,{children:"To get started with querying data from Astar, you are welcome to use the mentioned materialized\nqueries. You can use the following DuneSQL queries as examples:"}),"\n",(0,r.jsx)(a.pre,{children:(0,r.jsx)(a.code,{className:"language-sql",metastring:'title="Astar EVM Executed" showLineNumbers',children:"SELECT\n block_number, extrinsic_id, event_id, extrinsic_hash, section, method,\n json_extract_scalar(data, '$[0]') as tx_from,\n json_extract_scalar(data, '$[1]') as tx_to,\n json_extract_scalar(data, '$[2]') as tx_hash,\n json_extract(data, '$[3]') as tx_success\nFROM\n astar.events\nWHERE\n block_time >= TIMESTAMP '2024-02-13 00:00:00' and (section = 'ethereum' and method = 'Executed')\nlimit 10000;\n"})}),"\n",(0,r.jsx)(a.p,{children:"Query result:"}),"\n",(0,r.jsx)("iframe",{src:"https://dune.com/embeds/3476827/6371367/",height:"350",width:"100%"}),"\n",(0,r.jsx)(a.admonition,{title:"DuneSQL Referece",type:"info",children:(0,r.jsxs)(a.p,{children:["For more information on DuneSQL, please refer to the ",(0,r.jsx)(a.a,{href:"/docs/general/dunesql-cheatsheet",children:"DuneSQL Cheatsheet"}),"\nand\n",(0,r.jsx)(a.a,{href:"https://docs.dune.com/query-engine/Functions-and-operators/index",children:"DuneSQL Official Documentation"}),"."]})})]})}function h(e={}){const{wrapper:a}={...(0,t.R)(),...e.components};return a?(0,r.jsx)(a,{...e,children:(0,r.jsx)(c,{...e})}):c(e)}},28453:(e,a,s)=>{s.d(a,{R:()=>i,x:()=>d});var r=s(96540);const t={},n=r.createContext(t);function i(e){const a=r.useContext(n);return r.useMemo((function(){return"function"==typeof e?e(a):{...a,...e}}),[a,e])}function d(e){let a;return a=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:i(e.components),r.createElement(n.Provider,{value:a},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/556d3f96.dfd87c56.js b/assets/js/556d3f96.dfd87c56.js new file mode 100644 index 000000000000..a2d79fdf45a8 --- /dev/null +++ b/assets/js/556d3f96.dfd87c56.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1241],{90731:(e,a,s)=>{s.r(a),s.d(a,{assets:()=>o,contentTitle:()=>d,default:()=>h,frontMatter:()=>i,metadata:()=>r,toc:()=>l});const r=JSON.parse('{"id":"general/dune-analytics/parachain-dashboards/astar-dashboards","title":"Astar Dashboards","description":"Astar Network, previously known as Plasm, is a decentralized blockchain platform designed for Web3.","source":"@site/../docs/general/dune-analytics/parachain-dashboards/astar-dashboards.md","sourceDirName":"general/dune-analytics/parachain-dashboards","slug":"/general/dune-analytics/astar-dashboards","permalink":"/docs/general/dune-analytics/astar-dashboards","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/parachain-dashboards/astar-dashboards.md","tags":[],"version":"current","lastUpdatedBy":"MK","lastUpdatedAt":1719215716000,"frontMatter":{"id":"astar-dashboards","title":"Astar Dashboards","sidebar_label":"Astar","description":"Astar Network, previously known as Plasm, is a decentralized blockchain platform designed for Web3.","keywords":["polkadot","dashboard","dune","astar","dApp"],"slug":"../astar-dashboards"},"sidebar":"docs","previous":{"title":"Asset Hub","permalink":"/docs/general/dune-analytics/assethub-dashboards"},"next":{"title":"Bifrost","permalink":"/docs/general/dune-analytics/bifrost-dashboards"}}');var t=s(74848),n=s(28453);const i={id:"astar-dashboards",title:"Astar Dashboards",sidebar_label:"Astar",description:"Astar Network, previously known as Plasm, is a decentralized blockchain platform designed for Web3.",keywords:["polkadot","dashboard","dune","astar","dApp"],slug:"../astar-dashboards"},d="Astar Dashboards",o={},l=[{value:"Overview",id:"overview",level:2},{value:"Featured Dashboards on Dune",id:"featured-dashboards-on-dune",level:2},{value:"Key Tables",id:"key-tables",level:2},{value:"Useful Queries",id:"useful-queries",level:2},{value:"Getting Started with Queries",id:"getting-started-with-queries",level:2}];function c(e){const a={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,n.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(a.header,{children:(0,t.jsx)(a.h1,{id:"astar-dashboards",children:"Astar Dashboards"})}),"\n",(0,t.jsx)(a.h2,{id:"overview",children:"Overview"}),"\n",(0,t.jsx)(a.p,{children:"Astar Network, previously known as Plasm, is a blockchain platform designed for Web3. It is\ncompatible with both EVM (Ethereum Virtual Machine) and WebAssembly, enabling seamless interaction\nbetween the two environments. Developers can participate in the Build2Earn program to earn rewards\nby creating decentralized applications."}),"\n",(0,t.jsx)(a.h2,{id:"featured-dashboards-on-dune",children:"Featured Dashboards on Dune"}),"\n",(0,t.jsx)(a.p,{children:"Here you will find a variety of dashboards that help visualize data from the Astar parachain:"}),"\n",(0,t.jsxs)(a.ul,{children:["\n",(0,t.jsxs)(a.li,{children:[(0,t.jsx)(a.a,{href:"https://dune.com/substrate/astar-dapp-staking",children:"Astar dApp Staking Overview"}),": This dashboard is\ndesigned to provide a quick overview of various aspects of Astar dApp Staking."]}),"\n"]}),"\n",(0,t.jsx)(a.h2,{id:"key-tables",children:"Key Tables"}),"\n",(0,t.jsx)(a.p,{children:"Data from the Astar parachain is organized into several key tables:"}),"\n",(0,t.jsxs)(a.ul,{children:["\n",(0,t.jsx)(a.li,{children:(0,t.jsx)(a.code,{children:"astar.balances"})}),"\n",(0,t.jsx)(a.li,{children:(0,t.jsx)(a.code,{children:"astar.blocks"})}),"\n",(0,t.jsx)(a.li,{children:(0,t.jsx)(a.code,{children:"astar.calls"})}),"\n",(0,t.jsx)(a.li,{children:(0,t.jsx)(a.code,{children:"astar.events"})}),"\n",(0,t.jsx)(a.li,{children:(0,t.jsx)(a.code,{children:"astar.extrinsics"})}),"\n",(0,t.jsx)(a.li,{children:(0,t.jsx)(a.code,{children:"astar.transfers"})}),"\n",(0,t.jsx)(a.li,{children:(0,t.jsx)(a.code,{children:"astar.traces"})}),"\n"]}),"\n",(0,t.jsxs)(a.p,{children:["Start building your own queries using granular data on Dune\n",(0,t.jsx)(a.a,{href:"https://dune.com/queries?category=canonical&namespace=astar",children:"here"}),"."]}),"\n",(0,t.jsx)(a.h2,{id:"useful-queries",children:"Useful Queries"}),"\n",(0,t.jsx)(a.p,{children:"Some useful queries for Astar are provided:"}),"\n",(0,t.jsxs)(a.table,{children:[(0,t.jsx)(a.thead,{children:(0,t.jsxs)(a.tr,{children:[(0,t.jsx)(a.th,{children:"Title"}),(0,t.jsx)(a.th,{children:"Query"}),(0,t.jsx)(a.th,{children:"Description"})]})}),(0,t.jsxs)(a.tbody,{children:[(0,t.jsxs)(a.tr,{children:[(0,t.jsx)(a.td,{children:"Astar dApp Info by Era"}),(0,t.jsx)(a.td,{children:(0,t.jsx)(a.a,{href:"https://dune.com/queries/3727264",children:"query_3727264"})}),(0,t.jsx)(a.td,{children:"This query provides comprehensive information on decentralized applications (dApps) within the Astar ecosystem, including details about the dApp name, staking statistics, tier levels, and developer profiles, facilitating deeper insights into dApp performance and engagement across different eras."})]}),(0,t.jsxs)(a.tr,{children:[(0,t.jsx)(a.td,{children:"Astar Reward Info by Era"}),(0,t.jsx)(a.td,{children:(0,t.jsx)(a.a,{href:"https://dune.com/queries/3727888",children:"query_3727888"})}),(0,t.jsx)(a.td,{children:"Explore comprehensive data on rewards distribution within the Astar network, broken down by era to identify trends and patterns."})]}),(0,t.jsxs)(a.tr,{children:[(0,t.jsx)(a.td,{children:"Astar Staker info by Era"}),(0,t.jsx)(a.td,{children:(0,t.jsx)(a.a,{href:"https://dune.com/queries/3728048",children:"query_3728048"})}),(0,t.jsx)(a.td,{children:"Access a detailed breakdown of staker activities and statistics on the Astar network, categorized by era for historical comparison."})]})]})]}),"\n",(0,t.jsx)(a.h2,{id:"getting-started-with-queries",children:"Getting Started with Queries"}),"\n",(0,t.jsx)(a.p,{children:"To get started with querying data from Astar, you are welcome to use the mentioned materialized\nqueries. You can use the following DuneSQL queries as examples:"}),"\n",(0,t.jsx)(a.pre,{children:(0,t.jsx)(a.code,{className:"language-sql",metastring:'title="Astar EVM Executed" showLineNumbers',children:"SELECT\n block_number, extrinsic_id, event_id, extrinsic_hash, section, method,\n json_extract_scalar(data, '$[0]') as tx_from,\n json_extract_scalar(data, '$[1]') as tx_to,\n json_extract_scalar(data, '$[2]') as tx_hash,\n json_extract(data, '$[3]') as tx_success\nFROM\n astar.events\nWHERE\n block_time >= TIMESTAMP '2024-02-13 00:00:00' and (section = 'ethereum' and method = 'Executed')\nlimit 10000;\n"})}),"\n",(0,t.jsx)(a.p,{children:"Query result:"}),"\n",(0,t.jsx)("iframe",{src:"https://dune.com/embeds/3476827/6371367/",height:"350",width:"100%"}),"\n",(0,t.jsx)(a.admonition,{title:"DuneSQL Referece",type:"info",children:(0,t.jsxs)(a.p,{children:["For more information on DuneSQL, please refer to the ",(0,t.jsx)(a.a,{href:"/docs/general/dunesql-cheatsheet",children:"DuneSQL Cheatsheet"}),"\nand\n",(0,t.jsx)(a.a,{href:"https://docs.dune.com/query-engine/Functions-and-operators/index",children:"DuneSQL Official Documentation"}),"."]})})]})}function h(e={}){const{wrapper:a}={...(0,n.R)(),...e.components};return a?(0,t.jsx)(a,{...e,children:(0,t.jsx)(c,{...e})}):c(e)}},28453:(e,a,s)=>{s.d(a,{R:()=>i,x:()=>d});var r=s(96540);const t={},n=r.createContext(t);function i(e){const a=r.useContext(n);return r.useMemo((function(){return"function"==typeof e?e(a):{...a,...e}}),[a,e])}function d(e){let a;return a=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:i(e.components),r.createElement(n.Provider,{value:a},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/5606.0e895dd9.js b/assets/js/5606.0e895dd9.js new file mode 100644 index 000000000000..4c66cc82d316 --- /dev/null +++ b/assets/js/5606.0e895dd9.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5606],{65606:(r,s,e)=>{e.d(s,{diagram:()=>t});var a=e(96790),l=(e(79972),e(79740),e(6396),e(5081),e(34483),e(52294),e(62392),e(86825),e(85039),e(45567)),t={parser:a._$,db:a.z2,renderer:a.Lh,styles:a.tM,init:(0,l.K2)((r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute,a.z2.clear()}),"init")}}}]); \ No newline at end of file diff --git a/assets/js/5628.51bbd39b.js b/assets/js/5628.51bbd39b.js deleted file mode 100644 index 55b0967d4fa6..000000000000 --- a/assets/js/5628.51bbd39b.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5628],{85628:(e,t,l)=>{l.d(t,{diagram:()=>f});var n=l(21987),a=l(26312),o=l(697),i=l(86079),s=l(8995);l(74353),l(16750),l(42838),l(21176),l(14075);const d=e=>i.e.sanitizeText(e,(0,i.c)());let r={dividerMargin:10,padding:5,textHeight:10,curve:void 0};const c=function(e,t,l,n,a){const o=Object.keys(e);i.l.info("keys:",o),i.l.info(e),o.filter((t=>e[t].parent==a)).forEach((function(l){var o,s;const r=e[l],c=r.cssClasses.join(" "),p=(0,i.k)(r.styles),b=r.label??r.id,f={labelStyle:p.labelStyle,shape:"class_box",labelText:d(b),classData:r,rx:0,ry:0,class:c,style:p.style,id:r.id,domId:r.domId,tooltip:n.db.getTooltip(r.id,a)||"",haveCallback:r.haveCallback,link:r.link,width:"group"===r.type?500:void 0,type:r.type,padding:(null==(o=(0,i.c)().flowchart)?void 0:o.padding)??(null==(s=(0,i.c)().class)?void 0:s.padding)};t.setNode(r.id,f),a&&t.setParent(r.id,a),i.l.info("setNode",f)}))};function p(e){let t;switch(e){case 0:t="aggregation";break;case 1:t="extension";break;case 2:t="composition";break;case 3:t="dependency";break;case 4:t="lollipop";break;default:t="none"}return t}const b={setConf:function(e){r={...r,...e}},draw:async function(e,t,l,n){i.l.info("Drawing class - ",t);const b=(0,i.c)().flowchart??(0,i.c)().class,f=(0,i.c)().securityLevel;i.l.info("config:",b);const y=(null==b?void 0:b.nodeSpacing)??50,u=(null==b?void 0:b.rankSpacing)??50,g=new o.T({multigraph:!0,compound:!0}).setGraph({rankdir:n.db.getDirection(),nodesep:y,ranksep:u,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}})),h=n.db.getNamespaces(),v=n.db.getClasses(),w=n.db.getRelations(),k=n.db.getNotes();let x;i.l.info(w),function(e,t,l,n){const a=Object.keys(e);i.l.info("keys:",a),i.l.info(e),a.forEach((function(a){var o,s;const r=e[a],p={shape:"rect",id:r.id,domId:r.domId,labelText:d(r.id),labelStyle:"",style:"fill: none; stroke: black",padding:(null==(o=(0,i.c)().flowchart)?void 0:o.padding)??(null==(s=(0,i.c)().class)?void 0:s.padding)};t.setNode(r.id,p),c(r.classes,t,l,n,r.id),i.l.info("setNode",p)}))}(h,g,t,n),c(v,g,t,n),function(e,t){const l=(0,i.c)().flowchart;let n=0;e.forEach((function(e){var o;n++;const s={classes:"relation",pattern:1==e.relation.lineType?"dashed":"solid",id:`id_${e.id1}_${e.id2}_${n}`,arrowhead:"arrow_open"===e.type?"none":"normal",startLabelRight:"none"===e.relationTitle1?"":e.relationTitle1,endLabelLeft:"none"===e.relationTitle2?"":e.relationTitle2,arrowTypeStart:p(e.relation.type1),arrowTypeEnd:p(e.relation.type2),style:"fill:none",labelStyle:"",curve:(0,i.n)(null==l?void 0:l.curve,a.lUB)};if(i.l.info(s,e),void 0!==e.style){const t=(0,i.k)(e.style);s.style=t.style,s.labelStyle=t.labelStyle}e.text=e.title,void 0===e.text?void 0!==e.style&&(s.arrowheadStyle="fill: #333"):(s.arrowheadStyle="fill: #333",s.labelpos="c",(null==(o=(0,i.c)().flowchart)?void 0:o.htmlLabels)??(0,i.c)().htmlLabels?(s.labelType="html",s.label=''+e.text+""):(s.labelType="text",s.label=e.text.replace(i.e.lineBreakRegex,"\n"),void 0===e.style&&(s.style=s.style||"stroke: #333; stroke-width: 1.5px;fill:none"),s.labelStyle=s.labelStyle.replace("color:","fill:"))),t.setEdge(e.id1,e.id2,s,n)}))}(w,g),function(e,t,l,n){i.l.info(e),e.forEach((function(e,o){var s,c;const p=e,b="",f="",y=p.text,u={labelStyle:b,shape:"note",labelText:d(y),noteData:p,rx:0,ry:0,class:"",style:f,id:p.id,domId:p.id,tooltip:"",type:"note",padding:(null==(s=(0,i.c)().flowchart)?void 0:s.padding)??(null==(c=(0,i.c)().class)?void 0:c.padding)};if(t.setNode(p.id,u),i.l.info("setNode",u),!p.class||!(p.class in n))return;const g=l+o,h={id:`edgeNote${g}`,classes:"relation",pattern:"dotted",arrowhead:"none",startLabelRight:"",endLabelLeft:"",arrowTypeStart:"none",arrowTypeEnd:"none",style:"fill:none",labelStyle:"",curve:(0,i.n)(r.curve,a.lUB)};t.setEdge(p.id,p.class,h,g)}))}(k,g,w.length+1,v),"sandbox"===f&&(x=(0,a.Ltv)("#i"+t));const m="sandbox"===f?(0,a.Ltv)(x.nodes()[0].contentDocument.body):(0,a.Ltv)("body"),T=m.select(`[id="${t}"]`),S=m.select("#"+t+" g");if(await(0,s.r)(S,g,["aggregation","extension","composition","dependency","lollipop"],"classDiagram",t),i.u.insertTitle(T,"classTitleText",(null==b?void 0:b.titleTopMargin)??5,n.db.getDiagramTitle()),(0,i.o)(g,T,null==b?void 0:b.diagramPadding,null==b?void 0:b.useMaxWidth),!(null==b?void 0:b.htmlLabels)){const e="sandbox"===f?x.nodes()[0].contentDocument:document,l=e.querySelectorAll('[id="'+t+'"] .edgeLabel .label');for(const t of l){const l=t.getBBox(),n=e.createElementNS("http://www.w3.org/2000/svg","rect");n.setAttribute("rx",0),n.setAttribute("ry",0),n.setAttribute("width",l.width),n.setAttribute("height",l.height),t.insertBefore(n,t.firstChild)}}}},f={parser:n.p,db:n.d,renderer:b,styles:n.s,init:e=>{e.class||(e.class={}),e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute,n.d.clear()}}}}]); \ No newline at end of file diff --git a/assets/js/564.d069b264.js b/assets/js/564.d069b264.js deleted file mode 100644 index ed77f1b8fc5d..000000000000 --- a/assets/js/564.d069b264.js +++ /dev/null @@ -1,1227 +0,0 @@ -"use strict"; -exports.id = 564; -exports.ids = [564]; -exports.modules = { - -/***/ 94564: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ diagram: () => (/* binding */ diagram) -/* harmony export */ }); -/* harmony import */ var _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(86079); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(26312); -/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(74353); -/* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(16750); -/* harmony import */ var dompurify__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(99418); - - - - - - - - - - - -var parser = function() { - var o = function(k, v, o2, l) { - for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) - ; - return o2; - }, $V0 = [1, 3], $V1 = [1, 4], $V2 = [1, 5], $V3 = [1, 6], $V4 = [1, 7], $V5 = [1, 5, 13, 15, 17, 19, 20, 25, 27, 28, 29, 30, 31, 32, 33, 34, 37, 38, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50], $V6 = [1, 5, 6, 13, 15, 17, 19, 20, 25, 27, 28, 29, 30, 31, 32, 33, 34, 37, 38, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50], $V7 = [32, 33, 34], $V8 = [2, 7], $V9 = [1, 13], $Va = [1, 17], $Vb = [1, 18], $Vc = [1, 19], $Vd = [1, 20], $Ve = [1, 21], $Vf = [1, 22], $Vg = [1, 23], $Vh = [1, 24], $Vi = [1, 25], $Vj = [1, 26], $Vk = [1, 27], $Vl = [1, 30], $Vm = [1, 31], $Vn = [1, 32], $Vo = [1, 33], $Vp = [1, 34], $Vq = [1, 35], $Vr = [1, 36], $Vs = [1, 37], $Vt = [1, 38], $Vu = [1, 39], $Vv = [1, 40], $Vw = [1, 41], $Vx = [1, 42], $Vy = [1, 57], $Vz = [1, 58], $VA = [5, 22, 26, 32, 33, 34, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51]; - var parser2 = { - trace: function trace() { - }, - yy: {}, - symbols_: { "error": 2, "start": 3, "eol": 4, "SPACE": 5, "QUADRANT": 6, "document": 7, "line": 8, "statement": 9, "axisDetails": 10, "quadrantDetails": 11, "points": 12, "title": 13, "title_value": 14, "acc_title": 15, "acc_title_value": 16, "acc_descr": 17, "acc_descr_value": 18, "acc_descr_multiline_value": 19, "section": 20, "text": 21, "point_start": 22, "point_x": 23, "point_y": 24, "X-AXIS": 25, "AXIS-TEXT-DELIMITER": 26, "Y-AXIS": 27, "QUADRANT_1": 28, "QUADRANT_2": 29, "QUADRANT_3": 30, "QUADRANT_4": 31, "NEWLINE": 32, "SEMI": 33, "EOF": 34, "alphaNumToken": 35, "textNoTagsToken": 36, "STR": 37, "MD_STR": 38, "alphaNum": 39, "PUNCTUATION": 40, "AMP": 41, "NUM": 42, "ALPHA": 43, "COMMA": 44, "PLUS": 45, "EQUALS": 46, "MULT": 47, "DOT": 48, "BRKT": 49, "UNDERSCORE": 50, "MINUS": 51, "$accept": 0, "$end": 1 }, - terminals_: { 2: "error", 5: "SPACE", 6: "QUADRANT", 13: "title", 14: "title_value", 15: "acc_title", 16: "acc_title_value", 17: "acc_descr", 18: "acc_descr_value", 19: "acc_descr_multiline_value", 20: "section", 22: "point_start", 23: "point_x", 24: "point_y", 25: "X-AXIS", 26: "AXIS-TEXT-DELIMITER", 27: "Y-AXIS", 28: "QUADRANT_1", 29: "QUADRANT_2", 30: "QUADRANT_3", 31: "QUADRANT_4", 32: "NEWLINE", 33: "SEMI", 34: "EOF", 37: "STR", 38: "MD_STR", 40: "PUNCTUATION", 41: "AMP", 42: "NUM", 43: "ALPHA", 44: "COMMA", 45: "PLUS", 46: "EQUALS", 47: "MULT", 48: "DOT", 49: "BRKT", 50: "UNDERSCORE", 51: "MINUS" }, - productions_: [0, [3, 2], [3, 2], [3, 2], [7, 0], [7, 2], [8, 2], [9, 0], [9, 2], [9, 1], [9, 1], [9, 1], [9, 2], [9, 2], [9, 2], [9, 1], [9, 1], [12, 4], [10, 4], [10, 3], [10, 2], [10, 4], [10, 3], [10, 2], [11, 2], [11, 2], [11, 2], [11, 2], [4, 1], [4, 1], [4, 1], [21, 1], [21, 2], [21, 1], [21, 1], [39, 1], [39, 2], [35, 1], [35, 1], [35, 1], [35, 1], [35, 1], [35, 1], [35, 1], [35, 1], [35, 1], [35, 1], [35, 1], [36, 1], [36, 1], [36, 1]], - performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { - var $0 = $$.length - 1; - switch (yystate) { - case 12: - this.$ = $$[$0].trim(); - yy.setDiagramTitle(this.$); - break; - case 13: - this.$ = $$[$0].trim(); - yy.setAccTitle(this.$); - break; - case 14: - case 15: - this.$ = $$[$0].trim(); - yy.setAccDescription(this.$); - break; - case 16: - yy.addSection($$[$0].substr(8)); - this.$ = $$[$0].substr(8); - break; - case 17: - yy.addPoint($$[$0 - 3], $$[$0 - 1], $$[$0]); - break; - case 18: - yy.setXAxisLeftText($$[$0 - 2]); - yy.setXAxisRightText($$[$0]); - break; - case 19: - $$[$0 - 1].text += " ⟶ "; - yy.setXAxisLeftText($$[$0 - 1]); - break; - case 20: - yy.setXAxisLeftText($$[$0]); - break; - case 21: - yy.setYAxisBottomText($$[$0 - 2]); - yy.setYAxisTopText($$[$0]); - break; - case 22: - $$[$0 - 1].text += " ⟶ "; - yy.setYAxisBottomText($$[$0 - 1]); - break; - case 23: - yy.setYAxisBottomText($$[$0]); - break; - case 24: - yy.setQuadrant1Text($$[$0]); - break; - case 25: - yy.setQuadrant2Text($$[$0]); - break; - case 26: - yy.setQuadrant3Text($$[$0]); - break; - case 27: - yy.setQuadrant4Text($$[$0]); - break; - case 31: - this.$ = { text: $$[$0], type: "text" }; - break; - case 32: - this.$ = { text: $$[$0 - 1].text + "" + $$[$0], type: $$[$0 - 1].type }; - break; - case 33: - this.$ = { text: $$[$0], type: "text" }; - break; - case 34: - this.$ = { text: $$[$0], type: "markdown" }; - break; - case 35: - this.$ = $$[$0]; - break; - case 36: - this.$ = $$[$0 - 1] + "" + $$[$0]; - break; - } - }, - table: [{ 3: 1, 4: 2, 5: $V0, 6: $V1, 32: $V2, 33: $V3, 34: $V4 }, { 1: [3] }, { 3: 8, 4: 2, 5: $V0, 6: $V1, 32: $V2, 33: $V3, 34: $V4 }, { 3: 9, 4: 2, 5: $V0, 6: $V1, 32: $V2, 33: $V3, 34: $V4 }, o($V5, [2, 4], { 7: 10 }), o($V6, [2, 28]), o($V6, [2, 29]), o($V6, [2, 30]), { 1: [2, 1] }, { 1: [2, 2] }, o($V7, $V8, { 8: 11, 9: 12, 10: 14, 11: 15, 12: 16, 21: 28, 35: 29, 1: [2, 3], 5: $V9, 13: $Va, 15: $Vb, 17: $Vc, 19: $Vd, 20: $Ve, 25: $Vf, 27: $Vg, 28: $Vh, 29: $Vi, 30: $Vj, 31: $Vk, 37: $Vl, 38: $Vm, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx }), o($V5, [2, 5]), { 4: 43, 32: $V2, 33: $V3, 34: $V4 }, o($V7, $V8, { 10: 14, 11: 15, 12: 16, 21: 28, 35: 29, 9: 44, 5: $V9, 13: $Va, 15: $Vb, 17: $Vc, 19: $Vd, 20: $Ve, 25: $Vf, 27: $Vg, 28: $Vh, 29: $Vi, 30: $Vj, 31: $Vk, 37: $Vl, 38: $Vm, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx }), o($V7, [2, 9]), o($V7, [2, 10]), o($V7, [2, 11]), { 14: [1, 45] }, { 16: [1, 46] }, { 18: [1, 47] }, o($V7, [2, 15]), o($V7, [2, 16]), { 21: 48, 35: 29, 37: $Vl, 38: $Vm, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx }, { 21: 49, 35: 29, 37: $Vl, 38: $Vm, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx }, { 21: 50, 35: 29, 37: $Vl, 38: $Vm, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx }, { 21: 51, 35: 29, 37: $Vl, 38: $Vm, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx }, { 21: 52, 35: 29, 37: $Vl, 38: $Vm, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx }, { 21: 53, 35: 29, 37: $Vl, 38: $Vm, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx }, { 5: $Vy, 22: [1, 54], 35: 56, 36: 55, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx, 51: $Vz }, o($VA, [2, 31]), o($VA, [2, 33]), o($VA, [2, 34]), o($VA, [2, 37]), o($VA, [2, 38]), o($VA, [2, 39]), o($VA, [2, 40]), o($VA, [2, 41]), o($VA, [2, 42]), o($VA, [2, 43]), o($VA, [2, 44]), o($VA, [2, 45]), o($VA, [2, 46]), o($VA, [2, 47]), o($V5, [2, 6]), o($V7, [2, 8]), o($V7, [2, 12]), o($V7, [2, 13]), o($V7, [2, 14]), o($V7, [2, 20], { 36: 55, 35: 56, 5: $Vy, 26: [1, 59], 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx, 51: $Vz }), o($V7, [2, 23], { 36: 55, 35: 56, 5: $Vy, 26: [1, 60], 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx, 51: $Vz }), o($V7, [2, 24], { 36: 55, 35: 56, 5: $Vy, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx, 51: $Vz }), o($V7, [2, 25], { 36: 55, 35: 56, 5: $Vy, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx, 51: $Vz }), o($V7, [2, 26], { 36: 55, 35: 56, 5: $Vy, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx, 51: $Vz }), o($V7, [2, 27], { 36: 55, 35: 56, 5: $Vy, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx, 51: $Vz }), { 23: [1, 61] }, o($VA, [2, 32]), o($VA, [2, 48]), o($VA, [2, 49]), o($VA, [2, 50]), o($V7, [2, 19], { 35: 29, 21: 62, 37: $Vl, 38: $Vm, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx }), o($V7, [2, 22], { 35: 29, 21: 63, 37: $Vl, 38: $Vm, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx }), { 24: [1, 64] }, o($V7, [2, 18], { 36: 55, 35: 56, 5: $Vy, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx, 51: $Vz }), o($V7, [2, 21], { 36: 55, 35: 56, 5: $Vy, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx, 51: $Vz }), o($V7, [2, 17])], - defaultActions: { 8: [2, 1], 9: [2, 2] }, - parseError: function parseError(str, hash) { - if (hash.recoverable) { - this.trace(str); - } else { - var error = new Error(str); - error.hash = hash; - throw error; - } - }, - parse: function parse(input) { - var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; - var args = lstack.slice.call(arguments, 1); - var lexer2 = Object.create(this.lexer); - var sharedState = { yy: {} }; - for (var k in this.yy) { - if (Object.prototype.hasOwnProperty.call(this.yy, k)) { - sharedState.yy[k] = this.yy[k]; - } - } - lexer2.setInput(input, sharedState.yy); - sharedState.yy.lexer = lexer2; - sharedState.yy.parser = this; - if (typeof lexer2.yylloc == "undefined") { - lexer2.yylloc = {}; - } - var yyloc = lexer2.yylloc; - lstack.push(yyloc); - var ranges = lexer2.options && lexer2.options.ranges; - if (typeof sharedState.yy.parseError === "function") { - this.parseError = sharedState.yy.parseError; - } else { - this.parseError = Object.getPrototypeOf(this).parseError; - } - function lex() { - var token; - token = tstack.pop() || lexer2.lex() || EOF; - if (typeof token !== "number") { - if (token instanceof Array) { - tstack = token; - token = tstack.pop(); - } - token = self.symbols_[token] || token; - } - return token; - } - var symbol, state, action, r, yyval = {}, p, len, newState, expected; - while (true) { - state = stack[stack.length - 1]; - if (this.defaultActions[state]) { - action = this.defaultActions[state]; - } else { - if (symbol === null || typeof symbol == "undefined") { - symbol = lex(); - } - action = table[state] && table[state][symbol]; - } - if (typeof action === "undefined" || !action.length || !action[0]) { - var errStr = ""; - expected = []; - for (p in table[state]) { - if (this.terminals_[p] && p > TERROR) { - expected.push("'" + this.terminals_[p] + "'"); - } - } - if (lexer2.showPosition) { - errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; - } else { - errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); - } - this.parseError(errStr, { - text: lexer2.match, - token: this.terminals_[symbol] || symbol, - line: lexer2.yylineno, - loc: yyloc, - expected - }); - } - if (action[0] instanceof Array && action.length > 1) { - throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); - } - switch (action[0]) { - case 1: - stack.push(symbol); - vstack.push(lexer2.yytext); - lstack.push(lexer2.yylloc); - stack.push(action[1]); - symbol = null; - { - yyleng = lexer2.yyleng; - yytext = lexer2.yytext; - yylineno = lexer2.yylineno; - yyloc = lexer2.yylloc; - } - break; - case 2: - len = this.productions_[action[1]][1]; - yyval.$ = vstack[vstack.length - len]; - yyval._$ = { - first_line: lstack[lstack.length - (len || 1)].first_line, - last_line: lstack[lstack.length - 1].last_line, - first_column: lstack[lstack.length - (len || 1)].first_column, - last_column: lstack[lstack.length - 1].last_column - }; - if (ranges) { - yyval._$.range = [ - lstack[lstack.length - (len || 1)].range[0], - lstack[lstack.length - 1].range[1] - ]; - } - r = this.performAction.apply(yyval, [ - yytext, - yyleng, - yylineno, - sharedState.yy, - action[1], - vstack, - lstack - ].concat(args)); - if (typeof r !== "undefined") { - return r; - } - if (len) { - stack = stack.slice(0, -1 * len * 2); - vstack = vstack.slice(0, -1 * len); - lstack = lstack.slice(0, -1 * len); - } - stack.push(this.productions_[action[1]][0]); - vstack.push(yyval.$); - lstack.push(yyval._$); - newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; - stack.push(newState); - break; - case 3: - return true; - } - } - return true; - } - }; - var lexer = function() { - var lexer2 = { - EOF: 1, - parseError: function parseError(str, hash) { - if (this.yy.parser) { - this.yy.parser.parseError(str, hash); - } else { - throw new Error(str); - } - }, - // resets the lexer, sets new input - setInput: function(input, yy) { - this.yy = yy || this.yy || {}; - this._input = input; - this._more = this._backtrack = this.done = false; - this.yylineno = this.yyleng = 0; - this.yytext = this.matched = this.match = ""; - this.conditionStack = ["INITIAL"]; - this.yylloc = { - first_line: 1, - first_column: 0, - last_line: 1, - last_column: 0 - }; - if (this.options.ranges) { - this.yylloc.range = [0, 0]; - } - this.offset = 0; - return this; - }, - // consumes and returns one char from the input - input: function() { - var ch = this._input[0]; - this.yytext += ch; - this.yyleng++; - this.offset++; - this.match += ch; - this.matched += ch; - var lines = ch.match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno++; - this.yylloc.last_line++; - } else { - this.yylloc.last_column++; - } - if (this.options.ranges) { - this.yylloc.range[1]++; - } - this._input = this._input.slice(1); - return ch; - }, - // unshifts one char (or a string) into the input - unput: function(ch) { - var len = ch.length; - var lines = ch.split(/(?:\r\n?|\n)/g); - this._input = ch + this._input; - this.yytext = this.yytext.substr(0, this.yytext.length - len); - this.offset -= len; - var oldLines = this.match.split(/(?:\r\n?|\n)/g); - this.match = this.match.substr(0, this.match.length - 1); - this.matched = this.matched.substr(0, this.matched.length - 1); - if (lines.length - 1) { - this.yylineno -= lines.length - 1; - } - var r = this.yylloc.range; - this.yylloc = { - first_line: this.yylloc.first_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.first_column, - last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len - }; - if (this.options.ranges) { - this.yylloc.range = [r[0], r[0] + this.yyleng - len]; - } - this.yyleng = this.yytext.length; - return this; - }, - // When called from action, caches matched text and appends it on next action - more: function() { - this._more = true; - return this; - }, - // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. - reject: function() { - if (this.options.backtrack_lexer) { - this._backtrack = true; - } else { - return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), { - text: "", - token: null, - line: this.yylineno - }); - } - return this; - }, - // retain first n characters of the match - less: function(n) { - this.unput(this.match.slice(n)); - }, - // displays already matched input, i.e. for error messages - pastInput: function() { - var past = this.matched.substr(0, this.matched.length - this.match.length); - return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); - }, - // displays upcoming input, i.e. for error messages - upcomingInput: function() { - var next = this.match; - if (next.length < 20) { - next += this._input.substr(0, 20 - next.length); - } - return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); - }, - // displays the character position where the lexing error occurred, i.e. for error messages - showPosition: function() { - var pre = this.pastInput(); - var c = new Array(pre.length + 1).join("-"); - return pre + this.upcomingInput() + "\n" + c + "^"; - }, - // test the lexed token: return FALSE when not a match, otherwise return token - test_match: function(match, indexed_rule) { - var token, lines, backup; - if (this.options.backtrack_lexer) { - backup = { - yylineno: this.yylineno, - yylloc: { - first_line: this.yylloc.first_line, - last_line: this.last_line, - first_column: this.yylloc.first_column, - last_column: this.yylloc.last_column - }, - yytext: this.yytext, - match: this.match, - matches: this.matches, - matched: this.matched, - yyleng: this.yyleng, - offset: this.offset, - _more: this._more, - _input: this._input, - yy: this.yy, - conditionStack: this.conditionStack.slice(0), - done: this.done - }; - if (this.options.ranges) { - backup.yylloc.range = this.yylloc.range.slice(0); - } - } - lines = match[0].match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno += lines.length; - } - this.yylloc = { - first_line: this.yylloc.last_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.last_column, - last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length - }; - this.yytext += match[0]; - this.match += match[0]; - this.matches = match; - this.yyleng = this.yytext.length; - if (this.options.ranges) { - this.yylloc.range = [this.offset, this.offset += this.yyleng]; - } - this._more = false; - this._backtrack = false; - this._input = this._input.slice(match[0].length); - this.matched += match[0]; - token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); - if (this.done && this._input) { - this.done = false; - } - if (token) { - return token; - } else if (this._backtrack) { - for (var k in backup) { - this[k] = backup[k]; - } - return false; - } - return false; - }, - // return next match in input - next: function() { - if (this.done) { - return this.EOF; - } - if (!this._input) { - this.done = true; - } - var token, match, tempMatch, index; - if (!this._more) { - this.yytext = ""; - this.match = ""; - } - var rules = this._currentRules(); - for (var i = 0; i < rules.length; i++) { - tempMatch = this._input.match(this.rules[rules[i]]); - if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { - match = tempMatch; - index = i; - if (this.options.backtrack_lexer) { - token = this.test_match(tempMatch, rules[i]); - if (token !== false) { - return token; - } else if (this._backtrack) { - match = false; - continue; - } else { - return false; - } - } else if (!this.options.flex) { - break; - } - } - } - if (match) { - token = this.test_match(match, rules[index]); - if (token !== false) { - return token; - } - return false; - } - if (this._input === "") { - return this.EOF; - } else { - return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { - text: "", - token: null, - line: this.yylineno - }); - } - }, - // return next match that has a token - lex: function lex() { - var r = this.next(); - if (r) { - return r; - } else { - return this.lex(); - } - }, - // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) - begin: function begin(condition) { - this.conditionStack.push(condition); - }, - // pop the previously active lexer condition state off the condition stack - popState: function popState() { - var n = this.conditionStack.length - 1; - if (n > 0) { - return this.conditionStack.pop(); - } else { - return this.conditionStack[0]; - } - }, - // produce the lexer rule set which is active for the currently active lexer condition state - _currentRules: function _currentRules() { - if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { - return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; - } else { - return this.conditions["INITIAL"].rules; - } - }, - // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available - topState: function topState(n) { - n = this.conditionStack.length - 1 - Math.abs(n || 0); - if (n >= 0) { - return this.conditionStack[n]; - } else { - return "INITIAL"; - } - }, - // alias for begin(condition) - pushState: function pushState(condition) { - this.begin(condition); - }, - // return the number of states currently on the stack - stateStackSize: function stateStackSize() { - return this.conditionStack.length; - }, - options: { "case-insensitive": true }, - performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { - switch ($avoiding_name_collisions) { - case 0: - break; - case 1: - break; - case 2: - return 32; - case 3: - break; - case 4: - this.begin("title"); - return 13; - case 5: - this.popState(); - return "title_value"; - case 6: - this.begin("acc_title"); - return 15; - case 7: - this.popState(); - return "acc_title_value"; - case 8: - this.begin("acc_descr"); - return 17; - case 9: - this.popState(); - return "acc_descr_value"; - case 10: - this.begin("acc_descr_multiline"); - break; - case 11: - this.popState(); - break; - case 12: - return "acc_descr_multiline_value"; - case 13: - return 25; - case 14: - return 27; - case 15: - return 26; - case 16: - return 28; - case 17: - return 29; - case 18: - return 30; - case 19: - return 31; - case 20: - this.begin("md_string"); - break; - case 21: - return "MD_STR"; - case 22: - this.popState(); - break; - case 23: - this.begin("string"); - break; - case 24: - this.popState(); - break; - case 25: - return "STR"; - case 26: - this.begin("point_start"); - return 22; - case 27: - this.begin("point_x"); - return 23; - case 28: - this.popState(); - break; - case 29: - this.popState(); - this.begin("point_y"); - break; - case 30: - this.popState(); - return 24; - case 31: - return 6; - case 32: - return 43; - case 33: - return "COLON"; - case 34: - return 45; - case 35: - return 44; - case 36: - return 46; - case 37: - return 46; - case 38: - return 47; - case 39: - return 49; - case 40: - return 50; - case 41: - return 48; - case 42: - return 41; - case 43: - return 51; - case 44: - return 42; - case 45: - return 5; - case 46: - return 33; - case 47: - return 40; - case 48: - return 34; - } - }, - rules: [/^(?:%%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[\n\r]+)/i, /^(?:%%[^\n]*)/i, /^(?:title\b)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?: *x-axis *)/i, /^(?: *y-axis *)/i, /^(?: *--+> *)/i, /^(?: *quadrant-1 *)/i, /^(?: *quadrant-2 *)/i, /^(?: *quadrant-3 *)/i, /^(?: *quadrant-4 *)/i, /^(?:["][`])/i, /^(?:[^`"]+)/i, /^(?:[`]["])/i, /^(?:["])/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:\s*:\s*\[\s*)/i, /^(?:(1)|(0(.\d+)?))/i, /^(?:\s*\] *)/i, /^(?:\s*,\s*)/i, /^(?:(1)|(0(.\d+)?))/i, /^(?: *quadrantChart *)/i, /^(?:[A-Za-z]+)/i, /^(?::)/i, /^(?:\+)/i, /^(?:,)/i, /^(?:=)/i, /^(?:=)/i, /^(?:\*)/i, /^(?:#)/i, /^(?:[\_])/i, /^(?:\.)/i, /^(?:&)/i, /^(?:-)/i, /^(?:[0-9]+)/i, /^(?:\s)/i, /^(?:;)/i, /^(?:[!"#$%&'*+,-.`?\\_/])/i, /^(?:$)/i], - conditions: { "point_y": { "rules": [30], "inclusive": false }, "point_x": { "rules": [29], "inclusive": false }, "point_start": { "rules": [27, 28], "inclusive": false }, "acc_descr_multiline": { "rules": [11, 12], "inclusive": false }, "acc_descr": { "rules": [9], "inclusive": false }, "acc_title": { "rules": [7], "inclusive": false }, "title": { "rules": [5], "inclusive": false }, "md_string": { "rules": [21, 22], "inclusive": false }, "string": { "rules": [24, 25], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 3, 4, 6, 8, 10, 13, 14, 15, 16, 17, 18, 19, 20, 23, 26, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48], "inclusive": true } } - }; - return lexer2; - }(); - parser2.lexer = lexer; - function Parser() { - this.yy = {}; - } - Parser.prototype = parser2; - parser2.Parser = Parser; - return new Parser(); -}(); -parser.parser = parser; -const parser$1 = parser; -const defaultThemeVariables = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.E)(); -class QuadrantBuilder { - constructor() { - this.config = this.getDefaultConfig(); - this.themeConfig = this.getDefaultThemeConfig(); - this.data = this.getDefaultData(); - } - getDefaultData() { - return { - titleText: "", - quadrant1Text: "", - quadrant2Text: "", - quadrant3Text: "", - quadrant4Text: "", - xAxisLeftText: "", - xAxisRightText: "", - yAxisBottomText: "", - yAxisTopText: "", - points: [] - }; - } - getDefaultConfig() { - var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r; - return { - showXAxis: true, - showYAxis: true, - showTitle: true, - chartHeight: ((_a = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.B.quadrantChart) == null ? void 0 : _a.chartWidth) || 500, - chartWidth: ((_b = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.B.quadrantChart) == null ? void 0 : _b.chartHeight) || 500, - titlePadding: ((_c = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.B.quadrantChart) == null ? void 0 : _c.titlePadding) || 10, - titleFontSize: ((_d = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.B.quadrantChart) == null ? void 0 : _d.titleFontSize) || 20, - quadrantPadding: ((_e = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.B.quadrantChart) == null ? void 0 : _e.quadrantPadding) || 5, - xAxisLabelPadding: ((_f = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.B.quadrantChart) == null ? void 0 : _f.xAxisLabelPadding) || 5, - yAxisLabelPadding: ((_g = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.B.quadrantChart) == null ? void 0 : _g.yAxisLabelPadding) || 5, - xAxisLabelFontSize: ((_h = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.B.quadrantChart) == null ? void 0 : _h.xAxisLabelFontSize) || 16, - yAxisLabelFontSize: ((_i = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.B.quadrantChart) == null ? void 0 : _i.yAxisLabelFontSize) || 16, - quadrantLabelFontSize: ((_j = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.B.quadrantChart) == null ? void 0 : _j.quadrantLabelFontSize) || 16, - quadrantTextTopPadding: ((_k = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.B.quadrantChart) == null ? void 0 : _k.quadrantTextTopPadding) || 5, - pointTextPadding: ((_l = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.B.quadrantChart) == null ? void 0 : _l.pointTextPadding) || 5, - pointLabelFontSize: ((_m = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.B.quadrantChart) == null ? void 0 : _m.pointLabelFontSize) || 12, - pointRadius: ((_n = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.B.quadrantChart) == null ? void 0 : _n.pointRadius) || 5, - xAxisPosition: ((_o = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.B.quadrantChart) == null ? void 0 : _o.xAxisPosition) || "top", - yAxisPosition: ((_p = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.B.quadrantChart) == null ? void 0 : _p.yAxisPosition) || "left", - quadrantInternalBorderStrokeWidth: ((_q = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.B.quadrantChart) == null ? void 0 : _q.quadrantInternalBorderStrokeWidth) || 1, - quadrantExternalBorderStrokeWidth: ((_r = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.B.quadrantChart) == null ? void 0 : _r.quadrantExternalBorderStrokeWidth) || 2 - }; - } - getDefaultThemeConfig() { - return { - quadrant1Fill: defaultThemeVariables.quadrant1Fill, - quadrant2Fill: defaultThemeVariables.quadrant2Fill, - quadrant3Fill: defaultThemeVariables.quadrant3Fill, - quadrant4Fill: defaultThemeVariables.quadrant4Fill, - quadrant1TextFill: defaultThemeVariables.quadrant1TextFill, - quadrant2TextFill: defaultThemeVariables.quadrant2TextFill, - quadrant3TextFill: defaultThemeVariables.quadrant3TextFill, - quadrant4TextFill: defaultThemeVariables.quadrant4TextFill, - quadrantPointFill: defaultThemeVariables.quadrantPointFill, - quadrantPointTextFill: defaultThemeVariables.quadrantPointTextFill, - quadrantXAxisTextFill: defaultThemeVariables.quadrantXAxisTextFill, - quadrantYAxisTextFill: defaultThemeVariables.quadrantYAxisTextFill, - quadrantTitleFill: defaultThemeVariables.quadrantTitleFill, - quadrantInternalBorderStrokeFill: defaultThemeVariables.quadrantInternalBorderStrokeFill, - quadrantExternalBorderStrokeFill: defaultThemeVariables.quadrantExternalBorderStrokeFill - }; - } - clear() { - this.config = this.getDefaultConfig(); - this.themeConfig = this.getDefaultThemeConfig(); - this.data = this.getDefaultData(); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("clear called"); - } - setData(data) { - this.data = { ...this.data, ...data }; - } - addPoints(points) { - this.data.points = [...points, ...this.data.points]; - } - setConfig(config2) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("setConfig called with: ", config2); - this.config = { ...this.config, ...config2 }; - } - setThemeConfig(themeConfig) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("setThemeConfig called with: ", themeConfig); - this.themeConfig = { ...this.themeConfig, ...themeConfig }; - } - calculateSpace(xAxisPosition, showXAxis, showYAxis, showTitle) { - const xAxisSpaceCalculation = this.config.xAxisLabelPadding * 2 + this.config.xAxisLabelFontSize; - const xAxisSpace = { - top: xAxisPosition === "top" && showXAxis ? xAxisSpaceCalculation : 0, - bottom: xAxisPosition === "bottom" && showXAxis ? xAxisSpaceCalculation : 0 - }; - const yAxisSpaceCalculation = this.config.yAxisLabelPadding * 2 + this.config.yAxisLabelFontSize; - const yAxisSpace = { - left: this.config.yAxisPosition === "left" && showYAxis ? yAxisSpaceCalculation : 0, - right: this.config.yAxisPosition === "right" && showYAxis ? yAxisSpaceCalculation : 0 - }; - const titleSpaceCalculation = this.config.titleFontSize + this.config.titlePadding * 2; - const titleSpace = { - top: showTitle ? titleSpaceCalculation : 0 - }; - const quadrantLeft = this.config.quadrantPadding + yAxisSpace.left; - const quadrantTop = this.config.quadrantPadding + xAxisSpace.top + titleSpace.top; - const quadrantWidth = this.config.chartWidth - this.config.quadrantPadding * 2 - yAxisSpace.left - yAxisSpace.right; - const quadrantHeight = this.config.chartHeight - this.config.quadrantPadding * 2 - xAxisSpace.top - xAxisSpace.bottom - titleSpace.top; - const quadrantHalfWidth = quadrantWidth / 2; - const quadrantHalfHeight = quadrantHeight / 2; - const quadrantSpace = { - quadrantLeft, - quadrantTop, - quadrantWidth, - quadrantHalfWidth, - quadrantHeight, - quadrantHalfHeight - }; - return { - xAxisSpace, - yAxisSpace, - titleSpace, - quadrantSpace - }; - } - getAxisLabels(xAxisPosition, showXAxis, showYAxis, spaceData) { - const { quadrantSpace, titleSpace } = spaceData; - const { - quadrantHalfHeight, - quadrantHeight, - quadrantLeft, - quadrantHalfWidth, - quadrantTop, - quadrantWidth - } = quadrantSpace; - const drawXAxisLabelsInMiddle = Boolean(this.data.xAxisRightText); - const drawYAxisLabelsInMiddle = Boolean(this.data.yAxisTopText); - const axisLabels = []; - if (this.data.xAxisLeftText && showXAxis) { - axisLabels.push({ - text: this.data.xAxisLeftText, - fill: this.themeConfig.quadrantXAxisTextFill, - x: quadrantLeft + (drawXAxisLabelsInMiddle ? quadrantHalfWidth / 2 : 0), - y: xAxisPosition === "top" ? this.config.xAxisLabelPadding + titleSpace.top : this.config.xAxisLabelPadding + quadrantTop + quadrantHeight + this.config.quadrantPadding, - fontSize: this.config.xAxisLabelFontSize, - verticalPos: drawXAxisLabelsInMiddle ? "center" : "left", - horizontalPos: "top", - rotation: 0 - }); - } - if (this.data.xAxisRightText && showXAxis) { - axisLabels.push({ - text: this.data.xAxisRightText, - fill: this.themeConfig.quadrantXAxisTextFill, - x: quadrantLeft + quadrantHalfWidth + (drawXAxisLabelsInMiddle ? quadrantHalfWidth / 2 : 0), - y: xAxisPosition === "top" ? this.config.xAxisLabelPadding + titleSpace.top : this.config.xAxisLabelPadding + quadrantTop + quadrantHeight + this.config.quadrantPadding, - fontSize: this.config.xAxisLabelFontSize, - verticalPos: drawXAxisLabelsInMiddle ? "center" : "left", - horizontalPos: "top", - rotation: 0 - }); - } - if (this.data.yAxisBottomText && showYAxis) { - axisLabels.push({ - text: this.data.yAxisBottomText, - fill: this.themeConfig.quadrantYAxisTextFill, - x: this.config.yAxisPosition === "left" ? this.config.yAxisLabelPadding : this.config.yAxisLabelPadding + quadrantLeft + quadrantWidth + this.config.quadrantPadding, - y: quadrantTop + quadrantHeight - (drawYAxisLabelsInMiddle ? quadrantHalfHeight / 2 : 0), - fontSize: this.config.yAxisLabelFontSize, - verticalPos: drawYAxisLabelsInMiddle ? "center" : "left", - horizontalPos: "top", - rotation: -90 - }); - } - if (this.data.yAxisTopText && showYAxis) { - axisLabels.push({ - text: this.data.yAxisTopText, - fill: this.themeConfig.quadrantYAxisTextFill, - x: this.config.yAxisPosition === "left" ? this.config.yAxisLabelPadding : this.config.yAxisLabelPadding + quadrantLeft + quadrantWidth + this.config.quadrantPadding, - y: quadrantTop + quadrantHalfHeight - (drawYAxisLabelsInMiddle ? quadrantHalfHeight / 2 : 0), - fontSize: this.config.yAxisLabelFontSize, - verticalPos: drawYAxisLabelsInMiddle ? "center" : "left", - horizontalPos: "top", - rotation: -90 - }); - } - return axisLabels; - } - getQuadrants(spaceData) { - const { quadrantSpace } = spaceData; - const { quadrantHalfHeight, quadrantLeft, quadrantHalfWidth, quadrantTop } = quadrantSpace; - const quadrants = [ - { - text: { - text: this.data.quadrant1Text, - fill: this.themeConfig.quadrant1TextFill, - x: 0, - y: 0, - fontSize: this.config.quadrantLabelFontSize, - verticalPos: "center", - horizontalPos: "middle", - rotation: 0 - }, - x: quadrantLeft + quadrantHalfWidth, - y: quadrantTop, - width: quadrantHalfWidth, - height: quadrantHalfHeight, - fill: this.themeConfig.quadrant1Fill - }, - { - text: { - text: this.data.quadrant2Text, - fill: this.themeConfig.quadrant2TextFill, - x: 0, - y: 0, - fontSize: this.config.quadrantLabelFontSize, - verticalPos: "center", - horizontalPos: "middle", - rotation: 0 - }, - x: quadrantLeft, - y: quadrantTop, - width: quadrantHalfWidth, - height: quadrantHalfHeight, - fill: this.themeConfig.quadrant2Fill - }, - { - text: { - text: this.data.quadrant3Text, - fill: this.themeConfig.quadrant3TextFill, - x: 0, - y: 0, - fontSize: this.config.quadrantLabelFontSize, - verticalPos: "center", - horizontalPos: "middle", - rotation: 0 - }, - x: quadrantLeft, - y: quadrantTop + quadrantHalfHeight, - width: quadrantHalfWidth, - height: quadrantHalfHeight, - fill: this.themeConfig.quadrant3Fill - }, - { - text: { - text: this.data.quadrant4Text, - fill: this.themeConfig.quadrant4TextFill, - x: 0, - y: 0, - fontSize: this.config.quadrantLabelFontSize, - verticalPos: "center", - horizontalPos: "middle", - rotation: 0 - }, - x: quadrantLeft + quadrantHalfWidth, - y: quadrantTop + quadrantHalfHeight, - width: quadrantHalfWidth, - height: quadrantHalfHeight, - fill: this.themeConfig.quadrant4Fill - } - ]; - for (const quadrant of quadrants) { - quadrant.text.x = quadrant.x + quadrant.width / 2; - if (this.data.points.length === 0) { - quadrant.text.y = quadrant.y + quadrant.height / 2; - quadrant.text.horizontalPos = "middle"; - } else { - quadrant.text.y = quadrant.y + this.config.quadrantTextTopPadding; - quadrant.text.horizontalPos = "top"; - } - } - return quadrants; - } - getQuadrantPoints(spaceData) { - const { quadrantSpace } = spaceData; - const { quadrantHeight, quadrantLeft, quadrantTop, quadrantWidth } = quadrantSpace; - const xAxis = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .scaleLinear */ .m4Y)().domain([0, 1]).range([quadrantLeft, quadrantWidth + quadrantLeft]); - const yAxis = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .scaleLinear */ .m4Y)().domain([0, 1]).range([quadrantHeight + quadrantTop, quadrantTop]); - const points = this.data.points.map((point) => { - const props = { - x: xAxis(point.x), - y: yAxis(point.y), - fill: this.themeConfig.quadrantPointFill, - radius: this.config.pointRadius, - text: { - text: point.text, - fill: this.themeConfig.quadrantPointTextFill, - x: xAxis(point.x), - y: yAxis(point.y) + this.config.pointTextPadding, - verticalPos: "center", - horizontalPos: "top", - fontSize: this.config.pointLabelFontSize, - rotation: 0 - } - }; - return props; - }); - return points; - } - getBorders(spaceData) { - const halfExternalBorderWidth = this.config.quadrantExternalBorderStrokeWidth / 2; - const { quadrantSpace } = spaceData; - const { - quadrantHalfHeight, - quadrantHeight, - quadrantLeft, - quadrantHalfWidth, - quadrantTop, - quadrantWidth - } = quadrantSpace; - const borderLines = [ - // top border - { - strokeFill: this.themeConfig.quadrantExternalBorderStrokeFill, - strokeWidth: this.config.quadrantExternalBorderStrokeWidth, - x1: quadrantLeft - halfExternalBorderWidth, - y1: quadrantTop, - x2: quadrantLeft + quadrantWidth + halfExternalBorderWidth, - y2: quadrantTop - }, - // right border - { - strokeFill: this.themeConfig.quadrantExternalBorderStrokeFill, - strokeWidth: this.config.quadrantExternalBorderStrokeWidth, - x1: quadrantLeft + quadrantWidth, - y1: quadrantTop + halfExternalBorderWidth, - x2: quadrantLeft + quadrantWidth, - y2: quadrantTop + quadrantHeight - halfExternalBorderWidth - }, - // bottom border - { - strokeFill: this.themeConfig.quadrantExternalBorderStrokeFill, - strokeWidth: this.config.quadrantExternalBorderStrokeWidth, - x1: quadrantLeft - halfExternalBorderWidth, - y1: quadrantTop + quadrantHeight, - x2: quadrantLeft + quadrantWidth + halfExternalBorderWidth, - y2: quadrantTop + quadrantHeight - }, - // left border - { - strokeFill: this.themeConfig.quadrantExternalBorderStrokeFill, - strokeWidth: this.config.quadrantExternalBorderStrokeWidth, - x1: quadrantLeft, - y1: quadrantTop + halfExternalBorderWidth, - x2: quadrantLeft, - y2: quadrantTop + quadrantHeight - halfExternalBorderWidth - }, - // vertical inner border - { - strokeFill: this.themeConfig.quadrantInternalBorderStrokeFill, - strokeWidth: this.config.quadrantInternalBorderStrokeWidth, - x1: quadrantLeft + quadrantHalfWidth, - y1: quadrantTop + halfExternalBorderWidth, - x2: quadrantLeft + quadrantHalfWidth, - y2: quadrantTop + quadrantHeight - halfExternalBorderWidth - }, - // horizontal inner border - { - strokeFill: this.themeConfig.quadrantInternalBorderStrokeFill, - strokeWidth: this.config.quadrantInternalBorderStrokeWidth, - x1: quadrantLeft + halfExternalBorderWidth, - y1: quadrantTop + quadrantHalfHeight, - x2: quadrantLeft + quadrantWidth - halfExternalBorderWidth, - y2: quadrantTop + quadrantHalfHeight - } - ]; - return borderLines; - } - getTitle(showTitle) { - if (showTitle) { - return { - text: this.data.titleText, - fill: this.themeConfig.quadrantTitleFill, - fontSize: this.config.titleFontSize, - horizontalPos: "top", - verticalPos: "center", - rotation: 0, - y: this.config.titlePadding, - x: this.config.chartWidth / 2 - }; - } - return; - } - build() { - const showXAxis = this.config.showXAxis && !!(this.data.xAxisLeftText || this.data.xAxisRightText); - const showYAxis = this.config.showYAxis && !!(this.data.yAxisTopText || this.data.yAxisBottomText); - const showTitle = this.config.showTitle && !!this.data.titleText; - const xAxisPosition = this.data.points.length > 0 ? "bottom" : this.config.xAxisPosition; - const calculatedSpace = this.calculateSpace(xAxisPosition, showXAxis, showYAxis, showTitle); - return { - points: this.getQuadrantPoints(calculatedSpace), - quadrants: this.getQuadrants(calculatedSpace), - axisLabels: this.getAxisLabels(xAxisPosition, showXAxis, showYAxis, calculatedSpace), - borderLines: this.getBorders(calculatedSpace), - title: this.getTitle(showTitle) - }; - } -} -const config = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.c)(); -function textSanitizer(text) { - return (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.d)(text.trim(), config); -} -const quadrantBuilder = new QuadrantBuilder(); -function setQuadrant1Text(textObj) { - quadrantBuilder.setData({ quadrant1Text: textSanitizer(textObj.text) }); -} -function setQuadrant2Text(textObj) { - quadrantBuilder.setData({ quadrant2Text: textSanitizer(textObj.text) }); -} -function setQuadrant3Text(textObj) { - quadrantBuilder.setData({ quadrant3Text: textSanitizer(textObj.text) }); -} -function setQuadrant4Text(textObj) { - quadrantBuilder.setData({ quadrant4Text: textSanitizer(textObj.text) }); -} -function setXAxisLeftText(textObj) { - quadrantBuilder.setData({ xAxisLeftText: textSanitizer(textObj.text) }); -} -function setXAxisRightText(textObj) { - quadrantBuilder.setData({ xAxisRightText: textSanitizer(textObj.text) }); -} -function setYAxisTopText(textObj) { - quadrantBuilder.setData({ yAxisTopText: textSanitizer(textObj.text) }); -} -function setYAxisBottomText(textObj) { - quadrantBuilder.setData({ yAxisBottomText: textSanitizer(textObj.text) }); -} -function addPoint(textObj, x, y) { - quadrantBuilder.addPoints([{ x, y, text: textSanitizer(textObj.text) }]); -} -function setWidth(width) { - quadrantBuilder.setConfig({ chartWidth: width }); -} -function setHeight(height) { - quadrantBuilder.setConfig({ chartHeight: height }); -} -function getQuadrantData() { - const config2 = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.c)(); - const { themeVariables, quadrantChart: quadrantChartConfig } = config2; - if (quadrantChartConfig) { - quadrantBuilder.setConfig(quadrantChartConfig); - } - quadrantBuilder.setThemeConfig({ - quadrant1Fill: themeVariables.quadrant1Fill, - quadrant2Fill: themeVariables.quadrant2Fill, - quadrant3Fill: themeVariables.quadrant3Fill, - quadrant4Fill: themeVariables.quadrant4Fill, - quadrant1TextFill: themeVariables.quadrant1TextFill, - quadrant2TextFill: themeVariables.quadrant2TextFill, - quadrant3TextFill: themeVariables.quadrant3TextFill, - quadrant4TextFill: themeVariables.quadrant4TextFill, - quadrantPointFill: themeVariables.quadrantPointFill, - quadrantPointTextFill: themeVariables.quadrantPointTextFill, - quadrantXAxisTextFill: themeVariables.quadrantXAxisTextFill, - quadrantYAxisTextFill: themeVariables.quadrantYAxisTextFill, - quadrantExternalBorderStrokeFill: themeVariables.quadrantExternalBorderStrokeFill, - quadrantInternalBorderStrokeFill: themeVariables.quadrantInternalBorderStrokeFill, - quadrantTitleFill: themeVariables.quadrantTitleFill - }); - quadrantBuilder.setData({ titleText: (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.t)() }); - return quadrantBuilder.build(); -} -const clear = function() { - quadrantBuilder.clear(); - (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.v)(); -}; -const db = { - setWidth, - setHeight, - setQuadrant1Text, - setQuadrant2Text, - setQuadrant3Text, - setQuadrant4Text, - setXAxisLeftText, - setXAxisRightText, - setYAxisTopText, - setYAxisBottomText, - addPoint, - getQuadrantData, - clear, - setAccTitle: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.s, - getAccTitle: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.g, - setDiagramTitle: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.q, - getDiagramTitle: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.t, - getAccDescription: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.a, - setAccDescription: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.b -}; -const draw = (txt, id, _version, diagObj) => { - var _a, _b, _c; - function getDominantBaseLine(horizontalPos) { - return horizontalPos === "top" ? "hanging" : "middle"; - } - function getTextAnchor(verticalPos) { - return verticalPos === "left" ? "start" : "middle"; - } - function getTransformation(data) { - return `translate(${data.x}, ${data.y}) rotate(${data.rotation || 0})`; - } - const conf = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.c)(); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Rendering quadrant chart\n" + txt); - const securityLevel = conf.securityLevel; - let sandboxElement; - if (securityLevel === "sandbox") { - sandboxElement = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)("#i" + id); - } - const root = securityLevel === "sandbox" ? (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(sandboxElement.nodes()[0].contentDocument.body) : (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)("body"); - const svg = root.select(`[id="${id}"]`); - const group = svg.append("g").attr("class", "main"); - const width = ((_a = conf.quadrantChart) == null ? void 0 : _a.chartWidth) || 500; - const height = ((_b = conf.quadrantChart) == null ? void 0 : _b.chartHeight) || 500; - (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.i)(svg, height, width, ((_c = conf.quadrantChart) == null ? void 0 : _c.useMaxWidth) || true); - svg.attr("viewBox", "0 0 " + width + " " + height); - diagObj.db.setHeight(height); - diagObj.db.setWidth(width); - const quadrantData = diagObj.db.getQuadrantData(); - const quadrantsGroup = group.append("g").attr("class", "quadrants"); - const borderGroup = group.append("g").attr("class", "border"); - const dataPointGroup = group.append("g").attr("class", "data-points"); - const labelGroup = group.append("g").attr("class", "labels"); - const titleGroup = group.append("g").attr("class", "title"); - if (quadrantData.title) { - titleGroup.append("text").attr("x", 0).attr("y", 0).attr("fill", quadrantData.title.fill).attr("font-size", quadrantData.title.fontSize).attr("dominant-baseline", getDominantBaseLine(quadrantData.title.horizontalPos)).attr("text-anchor", getTextAnchor(quadrantData.title.verticalPos)).attr("transform", getTransformation(quadrantData.title)).text(quadrantData.title.text); - } - if (quadrantData.borderLines) { - borderGroup.selectAll("line").data(quadrantData.borderLines).enter().append("line").attr("x1", (data) => data.x1).attr("y1", (data) => data.y1).attr("x2", (data) => data.x2).attr("y2", (data) => data.y2).style("stroke", (data) => data.strokeFill).style("stroke-width", (data) => data.strokeWidth); - } - const quadrants = quadrantsGroup.selectAll("g.quadrant").data(quadrantData.quadrants).enter().append("g").attr("class", "quadrant"); - quadrants.append("rect").attr("x", (data) => data.x).attr("y", (data) => data.y).attr("width", (data) => data.width).attr("height", (data) => data.height).attr("fill", (data) => data.fill); - quadrants.append("text").attr("x", 0).attr("y", 0).attr("fill", (data) => data.text.fill).attr("font-size", (data) => data.text.fontSize).attr( - "dominant-baseline", - (data) => getDominantBaseLine(data.text.horizontalPos) - ).attr("text-anchor", (data) => getTextAnchor(data.text.verticalPos)).attr("transform", (data) => getTransformation(data.text)).text((data) => data.text.text); - const labels = labelGroup.selectAll("g.label").data(quadrantData.axisLabels).enter().append("g").attr("class", "label"); - labels.append("text").attr("x", 0).attr("y", 0).text((data) => data.text).attr("fill", (data) => data.fill).attr("font-size", (data) => data.fontSize).attr("dominant-baseline", (data) => getDominantBaseLine(data.horizontalPos)).attr("text-anchor", (data) => getTextAnchor(data.verticalPos)).attr("transform", (data) => getTransformation(data)); - const dataPoints = dataPointGroup.selectAll("g.data-point").data(quadrantData.points).enter().append("g").attr("class", "data-point"); - dataPoints.append("circle").attr("cx", (data) => data.x).attr("cy", (data) => data.y).attr("r", (data) => data.radius).attr("fill", (data) => data.fill); - dataPoints.append("text").attr("x", 0).attr("y", 0).text((data) => data.text.text).attr("fill", (data) => data.text.fill).attr("font-size", (data) => data.text.fontSize).attr( - "dominant-baseline", - (data) => getDominantBaseLine(data.text.horizontalPos) - ).attr("text-anchor", (data) => getTextAnchor(data.text.verticalPos)).attr("transform", (data) => getTransformation(data.text)); -}; -const renderer = { - draw -}; -const diagram = { - parser: parser$1, - db, - renderer, - styles: () => "" -}; - - - -/***/ }) - -}; -; \ No newline at end of file diff --git a/assets/js/571c8793.2a091ba0.js b/assets/js/571c8793.2a091ba0.js new file mode 100644 index 000000000000..78d3568af2f7 --- /dev/null +++ b/assets/js/571c8793.2a091ba0.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3984],{71701:(e,n,a)=>{a.r(n),a.d(n,{assets:()=>i,contentTitle:()=>d,default:()=>c,frontMatter:()=>r,metadata:()=>o,toc:()=>l});const o=JSON.parse('{"id":"general/dune-analytics/parachain-dashboards/moonbeam-dashboards","title":"Moonbeam Dashboards","description":"Moonbeam is a fully Ethereum-compatible parachain on the Polkadot network, enabling","source":"@site/../docs/general/dune-analytics/parachain-dashboards/moonbeam-dashboards.md","sourceDirName":"general/dune-analytics/parachain-dashboards","slug":"/general/dune-analytics/moonbeam-dashboards","permalink":"/docs/general/dune-analytics/moonbeam-dashboards","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/parachain-dashboards/moonbeam-dashboards.md","tags":[],"version":"current","lastUpdatedBy":"MK","lastUpdatedAt":1719215716000,"frontMatter":{"id":"moonbeam-dashboards","title":"Moonbeam Dashboards","sidebar_label":"Moonbeam","description":"Moonbeam is a fully Ethereum-compatible parachain on the Polkadot network, enabling","keywords":["polkadot","dashboard","dune","moonbeam","Ethereum"],"slug":"../moonbeam-dashboards"},"sidebar":"docs","previous":{"title":"Manta","permalink":"/docs/general/dune-analytics/manta-dashboards"},"next":{"title":"Neuroweb","permalink":"/docs/general/dune-analytics/neuroweb-dashboards"}}');var t=a(74848),s=a(28453);const r={id:"moonbeam-dashboards",title:"Moonbeam Dashboards",sidebar_label:"Moonbeam",description:"Moonbeam is a fully Ethereum-compatible parachain on the Polkadot network, enabling",keywords:["polkadot","dashboard","dune","moonbeam","Ethereum"],slug:"../moonbeam-dashboards"},d="Moonbeam Dashboards",i={},l=[{value:"Overview",id:"overview",level:2},{value:"Featured Dashboards on Dune",id:"featured-dashboards-on-dune",level:2},{value:"Key Tables",id:"key-tables",level:2},{value:"Useful Queries",id:"useful-queries",level:2},{value:"Getting Started with Queries",id:"getting-started-with-queries",level:2}];function h(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,s.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.header,{children:(0,t.jsx)(n.h1,{id:"moonbeam-dashboards",children:"Moonbeam Dashboards"})}),"\n",(0,t.jsx)(n.h2,{id:"overview",children:"Overview"}),"\n",(0,t.jsx)(n.p,{children:"Moonbeam is a fully Ethereum-compatible parachain on the Polkadot network, enabling developers to\ndeploy existing Solidity smart contracts and DApp frontends with minimal changes. It is designed to\nprovide interoperability and compatibility, bridging the gap between Ethereum and Polkadot."}),"\n",(0,t.jsx)(n.h2,{id:"featured-dashboards-on-dune",children:"Featured Dashboards on Dune"}),"\n",(0,t.jsx)(n.p,{children:"Here you will find a variety of dashboards that help visualize data from the Moonbeam parachain:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"https://dune.com/substrate/moonbeam-dex",children:"Moonbeam DEX"}),": Explore decentralized exchange activities\nand token swaps within the Moonbeam ecosystem."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"https://dune.com/substrate/moonbeam-governance",children:"Moonbeam Governance"}),": Detailed insights into\ngovernance proposals, voting, and outcomes within the Moonbeam community."]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"key-tables",children:"Key Tables"}),"\n",(0,t.jsx)(n.p,{children:"Data from the Moonbeam parachain is organized into several key tables:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"moonbeam.balances"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"moonbeam.blocks"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"moonbeam.calls"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"moonbeam.events"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"moonbeam.extrinsics"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"moonbeam.transfers"})}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["Start building your own queries using granular data on Dune\n",(0,t.jsx)(n.a,{href:"https://dune.com/queries?category=canonical&namespace=moonbeam",children:"here"}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"useful-queries",children:"Useful Queries"}),"\n",(0,t.jsx)(n.p,{children:"Some useful queries for Moonbeam are provided:"}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Title"}),(0,t.jsx)(n.th,{children:"Query"}),(0,t.jsx)(n.th,{children:"Description"})]})}),(0,t.jsxs)(n.tbody,{children:[(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:"Moonbeam Referenda Result"}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.a,{href:"https://dune.com/queries/3679042",children:"query_3679042"})}),(0,t.jsx)(n.td,{children:"Provides details on the results of Moonbeam referenda, including the total aye and nay votes, support, and the result of the referendum."})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:"Moonbeam All Voting Types"}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.a,{href:"https://dune.com/queries/3642417",children:"query_3642417"})}),(0,t.jsx)(n.td,{children:"Offers a comprehensive overview of all voting types on Moonbeam, including standard, split, and split abstain votes, voting conviction, and voting tokens."})]})]})]}),"\n",(0,t.jsx)(n.h2,{id:"getting-started-with-queries",children:"Getting Started with Queries"}),"\n",(0,t.jsx)(n.p,{children:"To get started with querying data from Unique, you are welcome to use the mentioned materialized\nqueries. You can use the following DuneSQL queries as examples:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-sql",metastring:'title="Moonbeam Referenda Result" showLineNumbers',children:"SELECT DISTINCT\n CAST(JSON_EXTRACT_SCALAR(data, '$[0]') AS INTEGER) AS referenda_id,\n get_href(\n 'https://moonbeam.subscan.io/referenda_v2/' || CAST(JSON_EXTRACT_SCALAR(data, '$[0]') AS VARCHAR),\n CAST(JSON_EXTRACT_SCALAR(data, '$[0]') AS VARCHAR)\n ) AS referenda_id_url,\n varbinary_to_uint256(\n from_hex(SUBSTR(JSON_EXTRACT_SCALAR(data, '$[1].ayes'), 3))\n ) / POW(10, 18) AS aye_total,\n varbinary_to_uint256(\n from_hex(SUBSTR(JSON_EXTRACT_SCALAR(data, '$[1].nays'), 3))\n ) / POW(10, 18) AS nay_total,\n varbinary_to_uint256(\n from_hex(SUBSTR(JSON_EXTRACT_SCALAR(data, '$[1].support'), 3))\n ) / POW(10, 18) AS support,\n method AS result\nFROM\n moonbeam.events\nWHERE\n section = 'referenda'\n AND (\n method = 'Confirmed'\n OR method = 'Rejected'\n OR method = 'Cancelled'\n OR method = 'TimedOut'\n )\nORDER BY\n referenda_id DESC;\n"})}),"\n",(0,t.jsx)(n.p,{children:"Query result:"}),"\n",(0,t.jsx)("iframe",{src:"https://dune.com/embeds/3679042/6187736/",height:"350",width:"100%"}),"\n",(0,t.jsx)(n.admonition,{title:"DuneSQL Referece",type:"info",children:(0,t.jsxs)(n.p,{children:["For more information on DuneSQL, please refer to the ",(0,t.jsx)(n.a,{href:"/docs/general/dunesql-cheatsheet",children:"DuneSQL Cheatsheet"}),"\nand\n",(0,t.jsx)(n.a,{href:"https://docs.dune.com/query-engine/Functions-and-operators/index",children:"DuneSQL Official Documentation"}),"."]})})]})}function c(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(h,{...e})}):h(e)}},28453:(e,n,a)=>{a.d(n,{R:()=>r,x:()=>d});var o=a(96540);const t={},s=o.createContext(t);function r(e){const n=o.useContext(s);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:r(e.components),o.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/571c8793.b85c17df.js b/assets/js/571c8793.b85c17df.js deleted file mode 100644 index d0935a8c1299..000000000000 --- a/assets/js/571c8793.b85c17df.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3984],{28506:(e,n,a)=>{a.r(n),a.d(n,{assets:()=>i,contentTitle:()=>r,default:()=>c,frontMatter:()=>s,metadata:()=>d,toc:()=>l});var o=a(74848),t=a(28453);const s={id:"moonbeam-dashboards",title:"Moonbeam Dashboards",sidebar_label:"Moonbeam",description:"Moonbeam is a fully Ethereum-compatible parachain on the Polkadot network, enabling",keywords:["polkadot","dashboard","dune","moonbeam","Ethereum"],slug:"../moonbeam-dashboards"},r="Moonbeam Dashboards",d={id:"general/dune-analytics/parachain-dashboards/moonbeam-dashboards",title:"Moonbeam Dashboards",description:"Moonbeam is a fully Ethereum-compatible parachain on the Polkadot network, enabling",source:"@site/../docs/general/dune-analytics/parachain-dashboards/moonbeam-dashboards.md",sourceDirName:"general/dune-analytics/parachain-dashboards",slug:"/general/dune-analytics/moonbeam-dashboards",permalink:"/docs/general/dune-analytics/moonbeam-dashboards",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/parachain-dashboards/moonbeam-dashboards.md",tags:[],version:"current",lastUpdatedBy:"MK",lastUpdatedAt:1719215716e3,frontMatter:{id:"moonbeam-dashboards",title:"Moonbeam Dashboards",sidebar_label:"Moonbeam",description:"Moonbeam is a fully Ethereum-compatible parachain on the Polkadot network, enabling",keywords:["polkadot","dashboard","dune","moonbeam","Ethereum"],slug:"../moonbeam-dashboards"},sidebar:"docs",previous:{title:"Manta",permalink:"/docs/general/dune-analytics/manta-dashboards"},next:{title:"Neuroweb",permalink:"/docs/general/dune-analytics/neuroweb-dashboards"}},i={},l=[{value:"Overview",id:"overview",level:2},{value:"Featured Dashboards on Dune",id:"featured-dashboards-on-dune",level:2},{value:"Key Tables",id:"key-tables",level:2},{value:"Useful Queries",id:"useful-queries",level:2},{value:"Getting Started with Queries",id:"getting-started-with-queries",level:2}];function h(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,t.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.header,{children:(0,o.jsx)(n.h1,{id:"moonbeam-dashboards",children:"Moonbeam Dashboards"})}),"\n",(0,o.jsx)(n.h2,{id:"overview",children:"Overview"}),"\n",(0,o.jsx)(n.p,{children:"Moonbeam is a fully Ethereum-compatible parachain on the Polkadot network, enabling developers to\ndeploy existing Solidity smart contracts and DApp frontends with minimal changes. It is designed to\nprovide interoperability and compatibility, bridging the gap between Ethereum and Polkadot."}),"\n",(0,o.jsx)(n.h2,{id:"featured-dashboards-on-dune",children:"Featured Dashboards on Dune"}),"\n",(0,o.jsx)(n.p,{children:"Here you will find a variety of dashboards that help visualize data from the Moonbeam parachain:"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.a,{href:"https://dune.com/substrate/moonbeam-dex",children:"Moonbeam DEX"}),": Explore decentralized exchange activities\nand token swaps within the Moonbeam ecosystem."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.a,{href:"https://dune.com/substrate/moonbeam-governance",children:"Moonbeam Governance"}),": Detailed insights into\ngovernance proposals, voting, and outcomes within the Moonbeam community."]}),"\n"]}),"\n",(0,o.jsx)(n.h2,{id:"key-tables",children:"Key Tables"}),"\n",(0,o.jsx)(n.p,{children:"Data from the Moonbeam parachain is organized into several key tables:"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.code,{children:"moonbeam.balances"})}),"\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.code,{children:"moonbeam.blocks"})}),"\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.code,{children:"moonbeam.calls"})}),"\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.code,{children:"moonbeam.events"})}),"\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.code,{children:"moonbeam.extrinsics"})}),"\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.code,{children:"moonbeam.transfers"})}),"\n"]}),"\n",(0,o.jsxs)(n.p,{children:["Start building your own queries using granular data on Dune\n",(0,o.jsx)(n.a,{href:"https://dune.com/queries?category=canonical&namespace=moonbeam",children:"here"}),"."]}),"\n",(0,o.jsx)(n.h2,{id:"useful-queries",children:"Useful Queries"}),"\n",(0,o.jsx)(n.p,{children:"Some useful queries for Moonbeam are provided:"}),"\n",(0,o.jsxs)(n.table,{children:[(0,o.jsx)(n.thead,{children:(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.th,{children:"Title"}),(0,o.jsx)(n.th,{children:"Query"}),(0,o.jsx)(n.th,{children:"Description"})]})}),(0,o.jsxs)(n.tbody,{children:[(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:"Moonbeam Referenda Result"}),(0,o.jsx)(n.td,{children:(0,o.jsx)(n.a,{href:"https://dune.com/queries/3679042",children:"query_3679042"})}),(0,o.jsx)(n.td,{children:"Provides details on the results of Moonbeam referenda, including the total aye and nay votes, support, and the result of the referendum."})]}),(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:"Moonbeam All Voting Types"}),(0,o.jsx)(n.td,{children:(0,o.jsx)(n.a,{href:"https://dune.com/queries/3642417",children:"query_3642417"})}),(0,o.jsx)(n.td,{children:"Offers a comprehensive overview of all voting types on Moonbeam, including standard, split, and split abstain votes, voting conviction, and voting tokens."})]})]})]}),"\n",(0,o.jsx)(n.h2,{id:"getting-started-with-queries",children:"Getting Started with Queries"}),"\n",(0,o.jsx)(n.p,{children:"To get started with querying data from Unique, you are welcome to use the mentioned materialized\nqueries. You can use the following DuneSQL queries as examples:"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-sql",metastring:'title="Moonbeam Referenda Result" showLineNumbers',children:"SELECT DISTINCT\n CAST(JSON_EXTRACT_SCALAR(data, '$[0]') AS INTEGER) AS referenda_id,\n get_href(\n 'https://moonbeam.subscan.io/referenda_v2/' || CAST(JSON_EXTRACT_SCALAR(data, '$[0]') AS VARCHAR),\n CAST(JSON_EXTRACT_SCALAR(data, '$[0]') AS VARCHAR)\n ) AS referenda_id_url,\n varbinary_to_uint256(\n from_hex(SUBSTR(JSON_EXTRACT_SCALAR(data, '$[1].ayes'), 3))\n ) / POW(10, 18) AS aye_total,\n varbinary_to_uint256(\n from_hex(SUBSTR(JSON_EXTRACT_SCALAR(data, '$[1].nays'), 3))\n ) / POW(10, 18) AS nay_total,\n varbinary_to_uint256(\n from_hex(SUBSTR(JSON_EXTRACT_SCALAR(data, '$[1].support'), 3))\n ) / POW(10, 18) AS support,\n method AS result\nFROM\n moonbeam.events\nWHERE\n section = 'referenda'\n AND (\n method = 'Confirmed'\n OR method = 'Rejected'\n OR method = 'Cancelled'\n OR method = 'TimedOut'\n )\nORDER BY\n referenda_id DESC;\n"})}),"\n",(0,o.jsx)(n.p,{children:"Query result:"}),"\n",(0,o.jsx)("iframe",{src:"https://dune.com/embeds/3679042/6187736/",height:"350",width:"100%"}),"\n",(0,o.jsx)(n.admonition,{title:"DuneSQL Referece",type:"info",children:(0,o.jsxs)(n.p,{children:["For more information on DuneSQL, please refer to the ",(0,o.jsx)(n.a,{href:"/docs/general/dunesql-cheatsheet",children:"DuneSQL Cheatsheet"}),"\nand\n",(0,o.jsx)(n.a,{href:"https://docs.dune.com/query-engine/Functions-and-operators/index",children:"DuneSQL Official Documentation"}),"."]})})]})}function c(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(h,{...e})}):h(e)}},28453:(e,n,a)=>{a.d(n,{R:()=>r,x:()=>d});var o=a(96540);const t={},s=o.createContext(t);function r(e){const n=o.useContext(s);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:r(e.components),o.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/5857.07488f4b.js b/assets/js/5857.07488f4b.js deleted file mode 100644 index 10efa3ee0323..000000000000 --- a/assets/js/5857.07488f4b.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5857],{15857:(t,i,n)=>{n.d(i,{diagram:()=>o});var s=n(86079),e=(n(74353),n(16750),n(26312),n(42838),function(){var t=function(t,i,n,s){for(n=n||{},s=t.length;s--;n[t[s]]=i);return n},i=[6,9,10],n={trace:function(){},yy:{},symbols_:{error:2,start:3,info:4,document:5,EOF:6,line:7,statement:8,NL:9,showInfo:10,$accept:0,$end:1},terminals_:{2:"error",4:"info",6:"EOF",9:"NL",10:"showInfo"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[8,1]],performAction:function(t,i,n,s,e,r,h){switch(r.length,e){case 1:return s;case 4:break;case 6:s.setInfo(!0)}},table:[{3:1,4:[1,2]},{1:[3]},t(i,[2,2],{5:3}),{6:[1,4],7:5,8:6,9:[1,7],10:[1,8]},{1:[2,1]},t(i,[2,3]),t(i,[2,4]),t(i,[2,5]),t(i,[2,6])],defaultActions:{4:[2,1]},parseError:function(t,i){if(!i.recoverable){var n=new Error(t);throw n.hash=i,n}this.trace(t)},parse:function(t){var i=this,n=[0],s=[],e=[null],r=[],h=this.table,o="",l=0,c=0,a=r.slice.call(arguments,1),y=Object.create(this.lexer),u={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(u.yy[p]=this.yy[p]);y.setInput(t,u.yy),u.yy.lexer=y,u.yy.parser=this,void 0===y.yylloc&&(y.yylloc={});var f=y.yylloc;r.push(f);var g=y.options&&y.options.ranges;"function"==typeof u.yy.parseError?this.parseError=u.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,m,d,k,x,b,v,w,I,S={};;){if(m=n[n.length-1],this.defaultActions[m]?d=this.defaultActions[m]:(null==_&&(I=void 0,"number"!=typeof(I=s.pop()||y.lex()||1)&&(I instanceof Array&&(I=(s=I).pop()),I=i.symbols_[I]||I),_=I),d=h[m]&&h[m][_]),void 0===d||!d.length||!d[0]){var E="";for(x in w=[],h[m])this.terminals_[x]&&x>2&&w.push("'"+this.terminals_[x]+"'");E=y.showPosition?"Parse error on line "+(l+1)+":\n"+y.showPosition()+"\nExpecting "+w.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==_?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(E,{text:y.match,token:this.terminals_[_]||_,line:y.yylineno,loc:f,expected:w})}if(d[0]instanceof Array&&d.length>1)throw new Error("Parse Error: multiple actions possible at state: "+m+", token: "+_);switch(d[0]){case 1:n.push(_),e.push(y.yytext),r.push(y.yylloc),n.push(d[1]),_=null,c=y.yyleng,o=y.yytext,l=y.yylineno,f=y.yylloc;break;case 2:if(b=this.productions_[d[1]][1],S.$=e[e.length-b],S._$={first_line:r[r.length-(b||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(b||1)].first_column,last_column:r[r.length-1].last_column},g&&(S._$.range=[r[r.length-(b||1)].range[0],r[r.length-1].range[1]]),void 0!==(k=this.performAction.apply(S,[o,c,l,u.yy,d[1],e,r].concat(a))))return k;b&&(n=n.slice(0,-1*b*2),e=e.slice(0,-1*b),r=r.slice(0,-1*b)),n.push(this.productions_[d[1]][0]),e.push(S.$),r.push(S._$),v=h[n[n.length-2]][n[n.length-1]],n.push(v);break;case 3:return!0}}return!0}},s={EOF:1,parseError:function(t,i){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,i)},setInput:function(t,i){return this.yy=i||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var i=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-i),this.offset-=i;var s=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var e=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===s.length?this.yylloc.first_column:0)+s[s.length-n.length].length-n[0].length:this.yylloc.first_column-i},this.options.ranges&&(this.yylloc.range=[e[0],e[0]+this.yyleng-i]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),i=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+i+"^"},test_match:function(t,i){var n,s,e;if(this.options.backtrack_lexer&&(e={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(e.yylloc.range=this.yylloc.range.slice(0))),(s=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=s.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:s?s[s.length-1].length-s[s.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,i,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var r in e)this[r]=e[r];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,i,n,s;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var e=this._currentRules(),r=0;ri[0].length)){if(i=n,s=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,e[r])))return t;if(this._backtrack){i=!1;continue}return!1}if(!this.options.flex)break}return i?!1!==(t=this.test_match(i,e[s]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,i,n,s){switch(n){case 0:return 4;case 1:return 9;case 2:return"space";case 3:return 10;case 4:return 6;case 5:return"TXT"}},rules:[/^(?:info\b)/i,/^(?:[\s\n\r]+)/i,/^(?:[\s]+)/i,/^(?:showInfo\b)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5],inclusive:!0}}};function e(){this.yy={}}return n.lexer=s,e.prototype=n,n.Parser=e,new e}());e.parser=e;const r=!1;let h=r;const o={parser:e,db:{clear:()=>{h=r},setInfo:t=>{h=t},getInfo:()=>h},renderer:{draw:(t,i,n)=>{s.l.debug("rendering info diagram\n"+t);const e=(0,s.A)(i);(0,s.i)(e,100,400,!0);e.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${n}`)}}}}}]); \ No newline at end of file diff --git a/assets/js/5860.56040b01.js b/assets/js/5860.56040b01.js deleted file mode 100644 index c329ed58c8bb..000000000000 --- a/assets/js/5860.56040b01.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5860],{35860:(t,e,s)=>{s.d(e,{d:()=>st,f:()=>et,p:()=>r});var u=s(26312),i=s(86079),n=function(){var t=function(t,e,s,u){for(s=s||{},u=t.length;u--;s[t[u]]=e);return s},e=[1,4],s=[1,3],u=[1,5],i=[1,8,9,10,11,27,34,36,38,42,58,81,82,83,84,85,86,99,102,103,106,108,111,112,113,118,119,120,121],n=[2,2],r=[1,13],a=[1,14],c=[1,15],o=[1,16],l=[1,23],h=[1,25],A=[1,26],d=[1,27],p=[1,49],y=[1,48],E=[1,29],f=[1,30],g=[1,31],k=[1,32],D=[1,33],b=[1,44],F=[1,46],T=[1,42],C=[1,47],_=[1,43],B=[1,50],S=[1,45],m=[1,51],x=[1,52],v=[1,34],L=[1,35],I=[1,36],R=[1,37],$=[1,57],N=[1,8,9,10,11,27,32,34,36,38,42,58,81,82,83,84,85,86,99,102,103,106,108,111,112,113,118,119,120,121],O=[1,61],w=[1,60],P=[1,62],U=[8,9,11,73,75],V=[1,88],G=[1,93],M=[1,92],K=[1,89],Y=[1,85],j=[1,91],X=[1,87],z=[1,94],H=[1,90],W=[1,95],Q=[1,86],q=[8,9,10,11,73,75],Z=[8,9,10,11,44,73,75],J=[8,9,10,11,29,42,44,46,48,50,52,54,56,58,61,63,65,66,68,73,75,86,99,102,103,106,108,111,112,113],tt=[8,9,11,42,58,73,75,86,99,102,103,106,108,111,112,113],et=[42,58,86,99,102,103,106,108,111,112,113],st=[1,121],ut=[1,120],it=[1,128],nt=[1,142],rt=[1,143],at=[1,144],ct=[1,145],ot=[1,130],lt=[1,132],ht=[1,136],At=[1,137],dt=[1,138],pt=[1,139],yt=[1,140],Et=[1,141],ft=[1,146],gt=[1,147],kt=[1,126],Dt=[1,127],bt=[1,134],Ft=[1,129],Tt=[1,133],Ct=[1,131],_t=[8,9,10,11,27,32,34,36,38,42,58,81,82,83,84,85,86,99,102,103,106,108,111,112,113,118,119,120,121],Bt=[1,149],St=[8,9,11],mt=[8,9,10,11,14,42,58,86,102,103,106,108,111,112,113],xt=[1,169],vt=[1,165],Lt=[1,166],It=[1,170],Rt=[1,167],$t=[1,168],Nt=[75,113,116],Ot=[8,9,10,11,12,14,27,29,32,42,58,73,81,82,83,84,85,86,87,102,106,108,111,112,113],wt=[10,103],Pt=[31,47,49,51,53,55,60,62,64,65,67,69,113,114,115],Ut=[1,235],Vt=[1,233],Gt=[1,237],Mt=[1,231],Kt=[1,232],Yt=[1,234],jt=[1,236],Xt=[1,238],zt=[1,255],Ht=[8,9,11,103],Wt=[8,9,10,11,58,81,102,103,106,107,108,109],Qt={trace:function(){},yy:{},symbols_:{error:2,start:3,graphConfig:4,document:5,line:6,statement:7,SEMI:8,NEWLINE:9,SPACE:10,EOF:11,GRAPH:12,NODIR:13,DIR:14,FirstStmtSeparator:15,ending:16,endToken:17,spaceList:18,spaceListNewline:19,vertexStatement:20,separator:21,styleStatement:22,linkStyleStatement:23,classDefStatement:24,classStatement:25,clickStatement:26,subgraph:27,textNoTags:28,SQS:29,text:30,SQE:31,end:32,direction:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,link:39,node:40,styledVertex:41,AMP:42,vertex:43,STYLE_SEPARATOR:44,idString:45,DOUBLECIRCLESTART:46,DOUBLECIRCLEEND:47,PS:48,PE:49,"(-":50,"-)":51,STADIUMSTART:52,STADIUMEND:53,SUBROUTINESTART:54,SUBROUTINEEND:55,VERTEX_WITH_PROPS_START:56,"NODE_STRING[field]":57,COLON:58,"NODE_STRING[value]":59,PIPE:60,CYLINDERSTART:61,CYLINDEREND:62,DIAMOND_START:63,DIAMOND_STOP:64,TAGEND:65,TRAPSTART:66,TRAPEND:67,INVTRAPSTART:68,INVTRAPEND:69,linkStatement:70,arrowText:71,TESTSTR:72,START_LINK:73,edgeText:74,LINK:75,edgeTextToken:76,STR:77,MD_STR:78,textToken:79,keywords:80,STYLE:81,LINKSTYLE:82,CLASSDEF:83,CLASS:84,CLICK:85,DOWN:86,UP:87,textNoTagsToken:88,stylesOpt:89,"idString[vertex]":90,"idString[class]":91,CALLBACKNAME:92,CALLBACKARGS:93,HREF:94,LINK_TARGET:95,"STR[link]":96,"STR[tooltip]":97,alphaNum:98,DEFAULT:99,numList:100,INTERPOLATE:101,NUM:102,COMMA:103,style:104,styleComponent:105,NODE_STRING:106,UNIT:107,BRKT:108,PCT:109,idStringToken:110,MINUS:111,MULT:112,UNICODE_TEXT:113,TEXT:114,TAGSTART:115,EDGE_TEXT:116,alphaNumToken:117,direction_tb:118,direction_bt:119,direction_rl:120,direction_lr:121,$accept:0,$end:1},terminals_:{2:"error",8:"SEMI",9:"NEWLINE",10:"SPACE",11:"EOF",12:"GRAPH",13:"NODIR",14:"DIR",27:"subgraph",29:"SQS",31:"SQE",32:"end",34:"acc_title",35:"acc_title_value",36:"acc_descr",37:"acc_descr_value",38:"acc_descr_multiline_value",42:"AMP",44:"STYLE_SEPARATOR",46:"DOUBLECIRCLESTART",47:"DOUBLECIRCLEEND",48:"PS",49:"PE",50:"(-",51:"-)",52:"STADIUMSTART",53:"STADIUMEND",54:"SUBROUTINESTART",55:"SUBROUTINEEND",56:"VERTEX_WITH_PROPS_START",57:"NODE_STRING[field]",58:"COLON",59:"NODE_STRING[value]",60:"PIPE",61:"CYLINDERSTART",62:"CYLINDEREND",63:"DIAMOND_START",64:"DIAMOND_STOP",65:"TAGEND",66:"TRAPSTART",67:"TRAPEND",68:"INVTRAPSTART",69:"INVTRAPEND",72:"TESTSTR",73:"START_LINK",75:"LINK",77:"STR",78:"MD_STR",81:"STYLE",82:"LINKSTYLE",83:"CLASSDEF",84:"CLASS",85:"CLICK",86:"DOWN",87:"UP",90:"idString[vertex]",91:"idString[class]",92:"CALLBACKNAME",93:"CALLBACKARGS",94:"HREF",95:"LINK_TARGET",96:"STR[link]",97:"STR[tooltip]",99:"DEFAULT",101:"INTERPOLATE",102:"NUM",103:"COMMA",106:"NODE_STRING",107:"UNIT",108:"BRKT",109:"PCT",111:"MINUS",112:"MULT",113:"UNICODE_TEXT",114:"TEXT",115:"TAGSTART",116:"EDGE_TEXT",118:"direction_tb",119:"direction_bt",120:"direction_rl",121:"direction_lr"},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,2],[4,3],[16,2],[16,1],[17,1],[17,1],[17,1],[15,1],[15,1],[15,2],[19,2],[19,2],[19,1],[19,1],[18,2],[18,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,9],[7,6],[7,4],[7,1],[7,2],[7,2],[7,1],[21,1],[21,1],[21,1],[20,3],[20,4],[20,2],[20,1],[40,1],[40,5],[41,1],[41,3],[43,4],[43,4],[43,6],[43,4],[43,4],[43,4],[43,8],[43,4],[43,4],[43,4],[43,6],[43,4],[43,4],[43,4],[43,4],[43,4],[43,1],[39,2],[39,3],[39,3],[39,1],[39,3],[74,1],[74,2],[74,1],[74,1],[70,1],[71,3],[30,1],[30,2],[30,1],[30,1],[80,1],[80,1],[80,1],[80,1],[80,1],[80,1],[80,1],[80,1],[80,1],[80,1],[80,1],[28,1],[28,2],[28,1],[28,1],[24,5],[25,5],[26,2],[26,4],[26,3],[26,5],[26,3],[26,5],[26,5],[26,7],[26,2],[26,4],[26,2],[26,4],[26,4],[26,6],[22,5],[23,5],[23,5],[23,9],[23,9],[23,7],[23,7],[100,1],[100,3],[89,1],[89,3],[104,1],[104,2],[105,1],[105,1],[105,1],[105,1],[105,1],[105,1],[105,1],[105,1],[110,1],[110,1],[110,1],[110,1],[110,1],[110,1],[110,1],[110,1],[110,1],[110,1],[110,1],[79,1],[79,1],[79,1],[79,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[76,1],[76,1],[117,1],[117,1],[117,1],[117,1],[117,1],[117,1],[117,1],[117,1],[117,1],[117,1],[117,1],[45,1],[45,2],[98,1],[98,2],[33,1],[33,1],[33,1],[33,1]],performAction:function(t,e,s,u,i,n,r){var a=n.length-1;switch(i){case 2:case 28:case 29:case 30:case 31:case 32:this.$=[];break;case 3:(!Array.isArray(n[a])||n[a].length>0)&&n[a-1].push(n[a]),this.$=n[a-1];break;case 4:case 176:case 49:case 71:case 174:this.$=n[a];break;case 11:u.setDirection("TB"),this.$="TB";break;case 12:u.setDirection(n[a-1]),this.$=n[a-1];break;case 27:this.$=n[a-1].nodes;break;case 33:this.$=u.addSubGraph(n[a-6],n[a-1],n[a-4]);break;case 34:this.$=u.addSubGraph(n[a-3],n[a-1],n[a-3]);break;case 35:this.$=u.addSubGraph(void 0,n[a-1],void 0);break;case 37:this.$=n[a].trim(),u.setAccTitle(this.$);break;case 38:case 39:this.$=n[a].trim(),u.setAccDescription(this.$);break;case 43:u.addLink(n[a-2].stmt,n[a],n[a-1]),this.$={stmt:n[a],nodes:n[a].concat(n[a-2].nodes)};break;case 44:u.addLink(n[a-3].stmt,n[a-1],n[a-2]),this.$={stmt:n[a-1],nodes:n[a-1].concat(n[a-3].nodes)};break;case 45:this.$={stmt:n[a-1],nodes:n[a-1]};break;case 46:this.$={stmt:n[a],nodes:n[a]};break;case 47:case 121:case 123:this.$=[n[a]];break;case 48:this.$=n[a-4].concat(n[a]);break;case 50:this.$=n[a-2],u.setClass(n[a-2],n[a]);break;case 51:this.$=n[a-3],u.addVertex(n[a-3],n[a-1],"square");break;case 52:this.$=n[a-3],u.addVertex(n[a-3],n[a-1],"doublecircle");break;case 53:this.$=n[a-5],u.addVertex(n[a-5],n[a-2],"circle");break;case 54:this.$=n[a-3],u.addVertex(n[a-3],n[a-1],"ellipse");break;case 55:this.$=n[a-3],u.addVertex(n[a-3],n[a-1],"stadium");break;case 56:this.$=n[a-3],u.addVertex(n[a-3],n[a-1],"subroutine");break;case 57:this.$=n[a-7],u.addVertex(n[a-7],n[a-1],"rect",void 0,void 0,void 0,Object.fromEntries([[n[a-5],n[a-3]]]));break;case 58:this.$=n[a-3],u.addVertex(n[a-3],n[a-1],"cylinder");break;case 59:this.$=n[a-3],u.addVertex(n[a-3],n[a-1],"round");break;case 60:this.$=n[a-3],u.addVertex(n[a-3],n[a-1],"diamond");break;case 61:this.$=n[a-5],u.addVertex(n[a-5],n[a-2],"hexagon");break;case 62:this.$=n[a-3],u.addVertex(n[a-3],n[a-1],"odd");break;case 63:this.$=n[a-3],u.addVertex(n[a-3],n[a-1],"trapezoid");break;case 64:this.$=n[a-3],u.addVertex(n[a-3],n[a-1],"inv_trapezoid");break;case 65:this.$=n[a-3],u.addVertex(n[a-3],n[a-1],"lean_right");break;case 66:this.$=n[a-3],u.addVertex(n[a-3],n[a-1],"lean_left");break;case 67:this.$=n[a],u.addVertex(n[a]);break;case 68:n[a-1].text=n[a],this.$=n[a-1];break;case 69:case 70:n[a-2].text=n[a-1],this.$=n[a-2];break;case 72:var c=u.destructLink(n[a],n[a-2]);this.$={type:c.type,stroke:c.stroke,length:c.length,text:n[a-1]};break;case 73:case 79:case 94:case 96:this.$={text:n[a],type:"text"};break;case 74:case 80:case 95:this.$={text:n[a-1].text+""+n[a],type:n[a-1].type};break;case 75:case 81:this.$={text:n[a],type:"string"};break;case 76:case 82:case 97:this.$={text:n[a],type:"markdown"};break;case 77:c=u.destructLink(n[a]);this.$={type:c.type,stroke:c.stroke,length:c.length};break;case 78:this.$=n[a-1];break;case 98:this.$=n[a-4],u.addClass(n[a-2],n[a]);break;case 99:this.$=n[a-4],u.setClass(n[a-2],n[a]);break;case 100:case 108:this.$=n[a-1],u.setClickEvent(n[a-1],n[a]);break;case 101:case 109:this.$=n[a-3],u.setClickEvent(n[a-3],n[a-2]),u.setTooltip(n[a-3],n[a]);break;case 102:this.$=n[a-2],u.setClickEvent(n[a-2],n[a-1],n[a]);break;case 103:this.$=n[a-4],u.setClickEvent(n[a-4],n[a-3],n[a-2]),u.setTooltip(n[a-4],n[a]);break;case 104:this.$=n[a-2],u.setLink(n[a-2],n[a]);break;case 105:this.$=n[a-4],u.setLink(n[a-4],n[a-2]),u.setTooltip(n[a-4],n[a]);break;case 106:this.$=n[a-4],u.setLink(n[a-4],n[a-2],n[a]);break;case 107:this.$=n[a-6],u.setLink(n[a-6],n[a-4],n[a]),u.setTooltip(n[a-6],n[a-2]);break;case 110:this.$=n[a-1],u.setLink(n[a-1],n[a]);break;case 111:this.$=n[a-3],u.setLink(n[a-3],n[a-2]),u.setTooltip(n[a-3],n[a]);break;case 112:this.$=n[a-3],u.setLink(n[a-3],n[a-2],n[a]);break;case 113:this.$=n[a-5],u.setLink(n[a-5],n[a-4],n[a]),u.setTooltip(n[a-5],n[a-2]);break;case 114:this.$=n[a-4],u.addVertex(n[a-2],void 0,void 0,n[a]);break;case 115:this.$=n[a-4],u.updateLink([n[a-2]],n[a]);break;case 116:this.$=n[a-4],u.updateLink(n[a-2],n[a]);break;case 117:this.$=n[a-8],u.updateLinkInterpolate([n[a-6]],n[a-2]),u.updateLink([n[a-6]],n[a]);break;case 118:this.$=n[a-8],u.updateLinkInterpolate(n[a-6],n[a-2]),u.updateLink(n[a-6],n[a]);break;case 119:this.$=n[a-6],u.updateLinkInterpolate([n[a-4]],n[a]);break;case 120:this.$=n[a-6],u.updateLinkInterpolate(n[a-4],n[a]);break;case 122:case 124:n[a-2].push(n[a]),this.$=n[a-2];break;case 126:this.$=n[a-1]+n[a];break;case 175:case 177:this.$=n[a-1]+""+n[a];break;case 178:this.$={stmt:"dir",value:"TB"};break;case 179:this.$={stmt:"dir",value:"BT"};break;case 180:this.$={stmt:"dir",value:"RL"};break;case 181:this.$={stmt:"dir",value:"LR"}}},table:[{3:1,4:2,9:e,10:s,12:u},{1:[3]},t(i,n,{5:6}),{4:7,9:e,10:s,12:u},{4:8,9:e,10:s,12:u},{13:[1,9],14:[1,10]},{1:[2,1],6:11,7:12,8:r,9:a,10:c,11:o,20:17,22:18,23:19,24:20,25:21,26:22,27:l,33:24,34:h,36:A,38:d,40:28,41:38,42:p,43:39,45:40,58:y,81:E,82:f,83:g,84:k,85:D,86:b,99:F,102:T,103:C,106:_,108:B,110:41,111:S,112:m,113:x,118:v,119:L,120:I,121:R},t(i,[2,9]),t(i,[2,10]),t(i,[2,11]),{8:[1,54],9:[1,55],10:$,15:53,18:56},t(N,[2,3]),t(N,[2,4]),t(N,[2,5]),t(N,[2,6]),t(N,[2,7]),t(N,[2,8]),{8:O,9:w,11:P,21:58,39:59,70:63,73:[1,64],75:[1,65]},{8:O,9:w,11:P,21:66},{8:O,9:w,11:P,21:67},{8:O,9:w,11:P,21:68},{8:O,9:w,11:P,21:69},{8:O,9:w,11:P,21:70},{8:O,9:w,10:[1,71],11:P,21:72},t(N,[2,36]),{35:[1,73]},{37:[1,74]},t(N,[2,39]),t(U,[2,46],{18:75,10:$}),{10:[1,76]},{10:[1,77]},{10:[1,78]},{10:[1,79]},{14:V,42:G,58:M,77:[1,83],86:K,92:[1,80],94:[1,81],98:82,102:Y,103:j,106:X,108:z,111:H,112:W,113:Q,117:84},t(N,[2,178]),t(N,[2,179]),t(N,[2,180]),t(N,[2,181]),t(q,[2,47]),t(q,[2,49],{44:[1,96]}),t(Z,[2,67],{110:109,29:[1,97],42:p,46:[1,98],48:[1,99],50:[1,100],52:[1,101],54:[1,102],56:[1,103],58:y,61:[1,104],63:[1,105],65:[1,106],66:[1,107],68:[1,108],86:b,99:F,102:T,103:C,106:_,108:B,111:S,112:m,113:x}),t(J,[2,174]),t(J,[2,135]),t(J,[2,136]),t(J,[2,137]),t(J,[2,138]),t(J,[2,139]),t(J,[2,140]),t(J,[2,141]),t(J,[2,142]),t(J,[2,143]),t(J,[2,144]),t(J,[2,145]),t(i,[2,12]),t(i,[2,18]),t(i,[2,19]),{9:[1,110]},t(tt,[2,26],{18:111,10:$}),t(N,[2,27]),{40:112,41:38,42:p,43:39,45:40,58:y,86:b,99:F,102:T,103:C,106:_,108:B,110:41,111:S,112:m,113:x},t(N,[2,40]),t(N,[2,41]),t(N,[2,42]),t(et,[2,71],{71:113,60:[1,115],72:[1,114]}),{74:116,76:117,77:[1,118],78:[1,119],113:st,116:ut},t([42,58,60,72,86,99,102,103,106,108,111,112,113],[2,77]),t(N,[2,28]),t(N,[2,29]),t(N,[2,30]),t(N,[2,31]),t(N,[2,32]),{10:it,12:nt,14:rt,27:at,28:122,32:ct,42:ot,58:lt,73:ht,77:[1,124],78:[1,125],80:135,81:At,82:dt,83:pt,84:yt,85:Et,86:ft,87:gt,88:123,102:kt,106:Dt,108:bt,111:Ft,112:Tt,113:Ct},t(_t,n,{5:148}),t(N,[2,37]),t(N,[2,38]),t(U,[2,45],{42:Bt}),{42:p,45:150,58:y,86:b,99:F,102:T,103:C,106:_,108:B,110:41,111:S,112:m,113:x},{99:[1,151],100:152,102:[1,153]},{42:p,45:154,58:y,86:b,99:F,102:T,103:C,106:_,108:B,110:41,111:S,112:m,113:x},{42:p,45:155,58:y,86:b,99:F,102:T,103:C,106:_,108:B,110:41,111:S,112:m,113:x},t(St,[2,100],{10:[1,156],93:[1,157]}),{77:[1,158]},t(St,[2,108],{117:160,10:[1,159],14:V,42:G,58:M,86:K,102:Y,103:j,106:X,108:z,111:H,112:W,113:Q}),t(St,[2,110],{10:[1,161]}),t(mt,[2,176]),t(mt,[2,163]),t(mt,[2,164]),t(mt,[2,165]),t(mt,[2,166]),t(mt,[2,167]),t(mt,[2,168]),t(mt,[2,169]),t(mt,[2,170]),t(mt,[2,171]),t(mt,[2,172]),t(mt,[2,173]),{42:p,45:162,58:y,86:b,99:F,102:T,103:C,106:_,108:B,110:41,111:S,112:m,113:x},{30:163,65:xt,77:vt,78:Lt,79:164,113:It,114:Rt,115:$t},{30:171,65:xt,77:vt,78:Lt,79:164,113:It,114:Rt,115:$t},{30:173,48:[1,172],65:xt,77:vt,78:Lt,79:164,113:It,114:Rt,115:$t},{30:174,65:xt,77:vt,78:Lt,79:164,113:It,114:Rt,115:$t},{30:175,65:xt,77:vt,78:Lt,79:164,113:It,114:Rt,115:$t},{30:176,65:xt,77:vt,78:Lt,79:164,113:It,114:Rt,115:$t},{106:[1,177]},{30:178,65:xt,77:vt,78:Lt,79:164,113:It,114:Rt,115:$t},{30:179,63:[1,180],65:xt,77:vt,78:Lt,79:164,113:It,114:Rt,115:$t},{30:181,65:xt,77:vt,78:Lt,79:164,113:It,114:Rt,115:$t},{30:182,65:xt,77:vt,78:Lt,79:164,113:It,114:Rt,115:$t},{30:183,65:xt,77:vt,78:Lt,79:164,113:It,114:Rt,115:$t},t(J,[2,175]),t(i,[2,20]),t(tt,[2,25]),t(U,[2,43],{18:184,10:$}),t(et,[2,68],{10:[1,185]}),{10:[1,186]},{30:187,65:xt,77:vt,78:Lt,79:164,113:It,114:Rt,115:$t},{75:[1,188],76:189,113:st,116:ut},t(Nt,[2,73]),t(Nt,[2,75]),t(Nt,[2,76]),t(Nt,[2,161]),t(Nt,[2,162]),{8:O,9:w,10:it,11:P,12:nt,14:rt,21:191,27:at,29:[1,190],32:ct,42:ot,58:lt,73:ht,80:135,81:At,82:dt,83:pt,84:yt,85:Et,86:ft,87:gt,88:192,102:kt,106:Dt,108:bt,111:Ft,112:Tt,113:Ct},t(Ot,[2,94]),t(Ot,[2,96]),t(Ot,[2,97]),t(Ot,[2,150]),t(Ot,[2,151]),t(Ot,[2,152]),t(Ot,[2,153]),t(Ot,[2,154]),t(Ot,[2,155]),t(Ot,[2,156]),t(Ot,[2,157]),t(Ot,[2,158]),t(Ot,[2,159]),t(Ot,[2,160]),t(Ot,[2,83]),t(Ot,[2,84]),t(Ot,[2,85]),t(Ot,[2,86]),t(Ot,[2,87]),t(Ot,[2,88]),t(Ot,[2,89]),t(Ot,[2,90]),t(Ot,[2,91]),t(Ot,[2,92]),t(Ot,[2,93]),{6:11,7:12,8:r,9:a,10:c,11:o,20:17,22:18,23:19,24:20,25:21,26:22,27:l,32:[1,193],33:24,34:h,36:A,38:d,40:28,41:38,42:p,43:39,45:40,58:y,81:E,82:f,83:g,84:k,85:D,86:b,99:F,102:T,103:C,106:_,108:B,110:41,111:S,112:m,113:x,118:v,119:L,120:I,121:R},{10:$,18:194},{10:[1,195],42:p,58:y,86:b,99:F,102:T,103:C,106:_,108:B,110:109,111:S,112:m,113:x},{10:[1,196]},{10:[1,197],103:[1,198]},t(wt,[2,121]),{10:[1,199],42:p,58:y,86:b,99:F,102:T,103:C,106:_,108:B,110:109,111:S,112:m,113:x},{10:[1,200],42:p,58:y,86:b,99:F,102:T,103:C,106:_,108:B,110:109,111:S,112:m,113:x},{77:[1,201]},t(St,[2,102],{10:[1,202]}),t(St,[2,104],{10:[1,203]}),{77:[1,204]},t(mt,[2,177]),{77:[1,205],95:[1,206]},t(q,[2,50],{110:109,42:p,58:y,86:b,99:F,102:T,103:C,106:_,108:B,111:S,112:m,113:x}),{31:[1,207],65:xt,79:208,113:It,114:Rt,115:$t},t(Pt,[2,79]),t(Pt,[2,81]),t(Pt,[2,82]),t(Pt,[2,146]),t(Pt,[2,147]),t(Pt,[2,148]),t(Pt,[2,149]),{47:[1,209],65:xt,79:208,113:It,114:Rt,115:$t},{30:210,65:xt,77:vt,78:Lt,79:164,113:It,114:Rt,115:$t},{49:[1,211],65:xt,79:208,113:It,114:Rt,115:$t},{51:[1,212],65:xt,79:208,113:It,114:Rt,115:$t},{53:[1,213],65:xt,79:208,113:It,114:Rt,115:$t},{55:[1,214],65:xt,79:208,113:It,114:Rt,115:$t},{58:[1,215]},{62:[1,216],65:xt,79:208,113:It,114:Rt,115:$t},{64:[1,217],65:xt,79:208,113:It,114:Rt,115:$t},{30:218,65:xt,77:vt,78:Lt,79:164,113:It,114:Rt,115:$t},{31:[1,219],65:xt,79:208,113:It,114:Rt,115:$t},{65:xt,67:[1,220],69:[1,221],79:208,113:It,114:Rt,115:$t},{65:xt,67:[1,223],69:[1,222],79:208,113:It,114:Rt,115:$t},t(U,[2,44],{42:Bt}),t(et,[2,70]),t(et,[2,69]),{60:[1,224],65:xt,79:208,113:It,114:Rt,115:$t},t(et,[2,72]),t(Nt,[2,74]),{30:225,65:xt,77:vt,78:Lt,79:164,113:It,114:Rt,115:$t},t(_t,n,{5:226}),t(Ot,[2,95]),t(N,[2,35]),{41:227,42:p,43:39,45:40,58:y,86:b,99:F,102:T,103:C,106:_,108:B,110:41,111:S,112:m,113:x},{10:Ut,58:Vt,81:Gt,89:228,102:Mt,104:229,105:230,106:Kt,107:Yt,108:jt,109:Xt},{10:Ut,58:Vt,81:Gt,89:239,101:[1,240],102:Mt,104:229,105:230,106:Kt,107:Yt,108:jt,109:Xt},{10:Ut,58:Vt,81:Gt,89:241,101:[1,242],102:Mt,104:229,105:230,106:Kt,107:Yt,108:jt,109:Xt},{102:[1,243]},{10:Ut,58:Vt,81:Gt,89:244,102:Mt,104:229,105:230,106:Kt,107:Yt,108:jt,109:Xt},{42:p,45:245,58:y,86:b,99:F,102:T,103:C,106:_,108:B,110:41,111:S,112:m,113:x},t(St,[2,101]),{77:[1,246]},{77:[1,247],95:[1,248]},t(St,[2,109]),t(St,[2,111],{10:[1,249]}),t(St,[2,112]),t(Z,[2,51]),t(Pt,[2,80]),t(Z,[2,52]),{49:[1,250],65:xt,79:208,113:It,114:Rt,115:$t},t(Z,[2,59]),t(Z,[2,54]),t(Z,[2,55]),t(Z,[2,56]),{106:[1,251]},t(Z,[2,58]),t(Z,[2,60]),{64:[1,252],65:xt,79:208,113:It,114:Rt,115:$t},t(Z,[2,62]),t(Z,[2,63]),t(Z,[2,65]),t(Z,[2,64]),t(Z,[2,66]),t([10,42,58,86,99,102,103,106,108,111,112,113],[2,78]),{31:[1,253],65:xt,79:208,113:It,114:Rt,115:$t},{6:11,7:12,8:r,9:a,10:c,11:o,20:17,22:18,23:19,24:20,25:21,26:22,27:l,32:[1,254],33:24,34:h,36:A,38:d,40:28,41:38,42:p,43:39,45:40,58:y,81:E,82:f,83:g,84:k,85:D,86:b,99:F,102:T,103:C,106:_,108:B,110:41,111:S,112:m,113:x,118:v,119:L,120:I,121:R},t(q,[2,48]),t(St,[2,114],{103:zt}),t(Ht,[2,123],{105:256,10:Ut,58:Vt,81:Gt,102:Mt,106:Kt,107:Yt,108:jt,109:Xt}),t(Wt,[2,125]),t(Wt,[2,127]),t(Wt,[2,128]),t(Wt,[2,129]),t(Wt,[2,130]),t(Wt,[2,131]),t(Wt,[2,132]),t(Wt,[2,133]),t(Wt,[2,134]),t(St,[2,115],{103:zt}),{10:[1,257]},t(St,[2,116],{103:zt}),{10:[1,258]},t(wt,[2,122]),t(St,[2,98],{103:zt}),t(St,[2,99],{110:109,42:p,58:y,86:b,99:F,102:T,103:C,106:_,108:B,111:S,112:m,113:x}),t(St,[2,103]),t(St,[2,105],{10:[1,259]}),t(St,[2,106]),{95:[1,260]},{49:[1,261]},{60:[1,262]},{64:[1,263]},{8:O,9:w,11:P,21:264},t(N,[2,34]),{10:Ut,58:Vt,81:Gt,102:Mt,104:265,105:230,106:Kt,107:Yt,108:jt,109:Xt},t(Wt,[2,126]),{14:V,42:G,58:M,86:K,98:266,102:Y,103:j,106:X,108:z,111:H,112:W,113:Q,117:84},{14:V,42:G,58:M,86:K,98:267,102:Y,103:j,106:X,108:z,111:H,112:W,113:Q,117:84},{95:[1,268]},t(St,[2,113]),t(Z,[2,53]),{30:269,65:xt,77:vt,78:Lt,79:164,113:It,114:Rt,115:$t},t(Z,[2,61]),t(_t,n,{5:270}),t(Ht,[2,124],{105:256,10:Ut,58:Vt,81:Gt,102:Mt,106:Kt,107:Yt,108:jt,109:Xt}),t(St,[2,119],{117:160,10:[1,271],14:V,42:G,58:M,86:K,102:Y,103:j,106:X,108:z,111:H,112:W,113:Q}),t(St,[2,120],{117:160,10:[1,272],14:V,42:G,58:M,86:K,102:Y,103:j,106:X,108:z,111:H,112:W,113:Q}),t(St,[2,107]),{31:[1,273],65:xt,79:208,113:It,114:Rt,115:$t},{6:11,7:12,8:r,9:a,10:c,11:o,20:17,22:18,23:19,24:20,25:21,26:22,27:l,32:[1,274],33:24,34:h,36:A,38:d,40:28,41:38,42:p,43:39,45:40,58:y,81:E,82:f,83:g,84:k,85:D,86:b,99:F,102:T,103:C,106:_,108:B,110:41,111:S,112:m,113:x,118:v,119:L,120:I,121:R},{10:Ut,58:Vt,81:Gt,89:275,102:Mt,104:229,105:230,106:Kt,107:Yt,108:jt,109:Xt},{10:Ut,58:Vt,81:Gt,89:276,102:Mt,104:229,105:230,106:Kt,107:Yt,108:jt,109:Xt},t(Z,[2,57]),t(N,[2,33]),t(St,[2,117],{103:zt}),t(St,[2,118],{103:zt})],defaultActions:{},parseError:function(t,e){if(!e.recoverable){var s=new Error(t);throw s.hash=e,s}this.trace(t)},parse:function(t){var e=this,s=[0],u=[],i=[null],n=[],r=this.table,a="",c=0,o=0,l=n.slice.call(arguments,1),h=Object.create(this.lexer),A={yy:{}};for(var d in this.yy)Object.prototype.hasOwnProperty.call(this.yy,d)&&(A.yy[d]=this.yy[d]);h.setInput(t,A.yy),A.yy.lexer=h,A.yy.parser=this,void 0===h.yylloc&&(h.yylloc={});var p=h.yylloc;n.push(p);var y=h.options&&h.options.ranges;"function"==typeof A.yy.parseError?this.parseError=A.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var E,f,g,k,D,b,F,T,C,_={};;){if(f=s[s.length-1],this.defaultActions[f]?g=this.defaultActions[f]:(null==E&&(C=void 0,"number"!=typeof(C=u.pop()||h.lex()||1)&&(C instanceof Array&&(C=(u=C).pop()),C=e.symbols_[C]||C),E=C),g=r[f]&&r[f][E]),void 0===g||!g.length||!g[0]){var B="";for(D in T=[],r[f])this.terminals_[D]&&D>2&&T.push("'"+this.terminals_[D]+"'");B=h.showPosition?"Parse error on line "+(c+1)+":\n"+h.showPosition()+"\nExpecting "+T.join(", ")+", got '"+(this.terminals_[E]||E)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==E?"end of input":"'"+(this.terminals_[E]||E)+"'"),this.parseError(B,{text:h.match,token:this.terminals_[E]||E,line:h.yylineno,loc:p,expected:T})}if(g[0]instanceof Array&&g.length>1)throw new Error("Parse Error: multiple actions possible at state: "+f+", token: "+E);switch(g[0]){case 1:s.push(E),i.push(h.yytext),n.push(h.yylloc),s.push(g[1]),E=null,o=h.yyleng,a=h.yytext,c=h.yylineno,p=h.yylloc;break;case 2:if(b=this.productions_[g[1]][1],_.$=i[i.length-b],_._$={first_line:n[n.length-(b||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(b||1)].first_column,last_column:n[n.length-1].last_column},y&&(_._$.range=[n[n.length-(b||1)].range[0],n[n.length-1].range[1]]),void 0!==(k=this.performAction.apply(_,[a,o,c,A.yy,g[1],i,n].concat(l))))return k;b&&(s=s.slice(0,-1*b*2),i=i.slice(0,-1*b),n=n.slice(0,-1*b)),s.push(this.productions_[g[1]][0]),i.push(_.$),n.push(_._$),F=r[s[s.length-2]][s[s.length-1]],s.push(F);break;case 3:return!0}}return!0}},qt={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,s=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var u=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),s.length-1&&(this.yylineno-=s.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:s?(s.length===u.length?this.yylloc.first_column:0)+u[u.length-s.length].length-s[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var s,u,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(u=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=u.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:u?u[u.length-1].length-u[u.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],s=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack){for(var n in i)this[n]=i[n];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,s,u;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),n=0;ne[0].length)){if(e=s,u=n,this.options.backtrack_lexer){if(!1!==(t=this.test_match(s,i[n])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[u]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,s,u){switch(s){case 0:return this.begin("acc_title"),34;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),36;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:case 8:case 11:case 14:case 17:case 27:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:this.begin("callbackname");break;case 9:this.popState(),this.begin("callbackargs");break;case 10:return 92;case 12:return 93;case 13:return"MD_STR";case 15:this.begin("md_string");break;case 16:return"STR";case 18:this.pushState("string");break;case 19:return 81;case 20:return 99;case 21:return 82;case 22:return 101;case 23:return 83;case 24:return 84;case 25:return 94;case 26:this.begin("click");break;case 28:return 85;case 29:case 30:case 31:return t.lex.firstGraph()&&this.begin("dir"),12;case 32:return 27;case 33:return 32;case 34:case 35:case 36:case 37:return 95;case 38:return this.popState(),13;case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 48:return this.popState(),14;case 49:return 118;case 50:return 119;case 51:return 120;case 52:return 121;case 53:return 102;case 54:case 95:return 108;case 55:return 44;case 56:return 58;case 57:case 96:return 42;case 58:return 8;case 59:return 103;case 60:case 94:return 112;case 61:case 64:case 67:return this.popState(),75;case 62:return this.pushState("edgeText"),73;case 63:case 66:case 69:return 116;case 65:return this.pushState("thickEdgeText"),73;case 68:return this.pushState("dottedEdgeText"),73;case 70:return 75;case 71:return this.popState(),51;case 72:case 108:return"TEXT";case 73:return this.pushState("ellipseText"),50;case 74:return this.popState(),53;case 75:return this.pushState("text"),52;case 76:return this.popState(),55;case 77:return this.pushState("text"),54;case 78:return 56;case 79:return this.pushState("text"),65;case 80:return this.popState(),62;case 81:return this.pushState("text"),61;case 82:return this.popState(),47;case 83:return this.pushState("text"),46;case 84:return this.popState(),67;case 85:return this.popState(),69;case 86:return 114;case 87:return this.pushState("trapText"),66;case 88:return this.pushState("trapText"),68;case 89:return 115;case 90:return 65;case 91:return 87;case 92:return"SEP";case 93:return 86;case 97:return 106;case 98:return 111;case 99:return 113;case 100:return this.popState(),60;case 101:return this.pushState("text"),60;case 102:return this.popState(),49;case 103:return this.pushState("text"),48;case 104:return this.popState(),31;case 105:return this.pushState("text"),29;case 106:return this.popState(),64;case 107:return this.pushState("text"),63;case 109:return"QUOTE";case 110:return 9;case 111:return 10;case 112:return 11}},rules:[/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["][`])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:["])/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:href[\s])/,/^(?:click[\s]+)/,/^(?:[\s\n])/,/^(?:[^\s\n]*)/,/^(?:flowchart-elk\b)/,/^(?:graph\b)/,/^(?:flowchart\b)/,/^(?:subgraph\b)/,/^(?:end\b\s*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:(\r?\n)*\s*\n)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:[^-]|-(?!-)+)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:[^=]|=(?!))/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:[^\.]|\.(?!))/,/^(?:\s*~~[\~]+\s*)/,/^(?:[-/\)][\)])/,/^(?:[^\(\)\[\]\{\}]|!\)+)/,/^(?:\(-)/,/^(?:\]\))/,/^(?:\(\[)/,/^(?:\]\])/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:>)/,/^(?:\)\])/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\(\(\()/,/^(?:[\\(?=\])][\]])/,/^(?:\/(?=\])\])/,/^(?:\/(?!\])|\\(?!\])|[^\\\[\]\(\)\{\}\/]+)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:\*)/,/^(?:#)/,/^(?:&)/,/^(?:([A-Za-z0-9!"\#$%&'*+\.`?\\_\/]|-(?=[^\>\-\.])|(?!))+)/,/^(?:-)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\|)/,/^(?:\))/,/^(?:\()/,/^(?:\])/,/^(?:\[)/,/^(?:(\}))/,/^(?:\{)/,/^(?:[^\[\]\(\)\{\}\|\"]+)/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:\s)/,/^(?:$)/],conditions:{callbackargs:{rules:[11,12,15,18,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},callbackname:{rules:[8,9,10,15,18,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},href:{rules:[15,18,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},click:{rules:[15,18,27,28,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},dottedEdgeText:{rules:[15,18,67,69,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},thickEdgeText:{rules:[15,18,64,66,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},edgeText:{rules:[15,18,61,63,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},trapText:{rules:[15,18,70,73,75,77,81,83,84,85,86,87,88,101,103,105,107],inclusive:!1},ellipseText:{rules:[15,18,70,71,72,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},text:{rules:[15,18,70,73,74,75,76,77,80,81,82,83,87,88,100,101,102,103,104,105,106,107,108],inclusive:!1},vertex:{rules:[15,18,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},dir:{rules:[15,18,38,39,40,41,42,43,44,45,46,47,48,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},acc_descr_multiline:{rules:[5,6,15,18,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},acc_descr:{rules:[3,15,18,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},acc_title:{rules:[1,15,18,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},md_string:{rules:[13,14,15,18,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},string:{rules:[15,16,17,18,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},INITIAL:{rules:[0,2,4,7,15,18,19,20,21,22,23,24,25,26,29,30,31,32,33,34,35,36,37,49,50,51,52,53,54,55,56,57,58,59,60,61,62,64,65,67,68,70,73,75,77,78,79,81,83,87,88,89,90,91,92,93,94,95,96,97,98,99,101,103,105,107,109,110,111,112],inclusive:!0}}};function Zt(){this.yy={}}return Qt.lexer=qt,Zt.prototype=Qt,Qt.Parser=Zt,new Zt}();n.parser=n;const r=n;let a,c,o=0,l=(0,i.c)(),h={},A=[],d={},p=[],y={},E={},f=0,g=!0,k=[];const D=t=>i.e.sanitizeText(t,l),b=function(t){const e=Object.keys(h);for(const s of e)if(h[s].id===t)return h[s].domId;return t},F=function(t,e,s,u,n,r,a={}){let c,A=t;void 0!==A&&0!==A.trim().length&&(void 0===h[A]&&(h[A]={id:A,labelType:"text",domId:"flowchart-"+A+"-"+o,styles:[],classes:[]}),o++,void 0!==e?(l=(0,i.c)(),c=D(e.text.trim()),h[A].labelType=e.type,'"'===c[0]&&'"'===c[c.length-1]&&(c=c.substring(1,c.length-1)),h[A].text=c):void 0===h[A].text&&(h[A].text=t),void 0!==s&&(h[A].type=s),null!=u&&u.forEach((function(t){h[A].styles.push(t)})),null!=n&&n.forEach((function(t){h[A].classes.push(t)})),void 0!==r&&(h[A].dir=r),void 0===h[A].props?h[A].props=a:void 0!==a&&Object.assign(h[A].props,a))},T=function(t,e,s){const u={start:t,end:e,type:void 0,text:"",labelType:"text"};i.l.info("abc78 Got edge...",u);const n=s.text;if(void 0!==n&&(u.text=D(n.text.trim()),'"'===u.text[0]&&'"'===u.text[u.text.length-1]&&(u.text=u.text.substring(1,u.text.length-1)),u.labelType=n.type),void 0!==s&&(u.type=s.type,u.stroke=s.stroke,u.length=s.length),(null==u?void 0:u.length)>10&&(u.length=10),!(A.length<(l.maxEdges??500)))throw new Error(`Edge limit exceeded. ${A.length} edges found, but the limit is ${l.maxEdges}.\n\nInitialize mermaid with maxEdges set to a higher number to allow more edges.\nYou cannot set this config via configuration inside the diagram as it is a secure config.\nYou have to call mermaid.initialize.`);i.l.info("abc78 pushing edge..."),A.push(u)},C=function(t,e,s){let u,n;for(i.l.info("addLink (abc78)",t,e,s),u=0;u=A.length)throw new Error(`The index ${t} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${A.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);"default"===t?A.defaultStyle=e:(-1===i.u.isSubstringInArray("fill",e)&&e.push("fill:none"),A[t].style=e)}))},S=function(t,e){t.split(",").forEach((function(t){void 0===d[t]&&(d[t]={id:t,styles:[],textStyles:[]}),null!=e&&e.forEach((function(e){if(e.match("color")){const s=e.replace("fill","bgFill").replace("color","fill");d[t].textStyles.push(s)}d[t].styles.push(e)}))}))},m=function(t){a=t,a.match(/.*/)&&(a="LR"),a.match(/.*v/)&&(a="TB"),"TD"===a&&(a="TB")},x=function(t,e){t.split(",").forEach((function(t){let s=t;void 0!==h[s]&&h[s].classes.push(e),void 0!==y[s]&&y[s].classes.push(e)}))},v=function(t,e,s){t.split(",").forEach((function(t){void 0!==h[t]&&(h[t].link=i.u.formatUrl(e,l),h[t].linkTarget=s)})),x(t,"clickable")},L=function(t){if(E.hasOwnProperty(t))return E[t]},I=function(t,e,s){t.split(",").forEach((function(t){!function(t,e,s){let u=b(t);if("loose"!==(0,i.c)().securityLevel)return;if(void 0===e)return;let n=[];if("string"==typeof s){n=s.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let t=0;t")),t.classed("hover",!0)})).on("mouseout",(function(){e.transition().duration(500).style("opacity",0);(0,u.Ltv)(this).classed("hover",!1)}))};k.push(P);const U=function(t="gen-1"){h={},d={},A=[],k=[P],p=[],y={},f=0,E={},g=!0,c=t,l=(0,i.c)(),(0,i.v)()},V=t=>{c=t||"gen-2"},G=function(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"},M=function(t,e,s){let u=t.text.trim(),n=s.text;t===s&&s.text.match(/\s/)&&(u=void 0);let r=[];const{nodeList:a,dir:o}=function(t){const e={boolean:{},number:{},string:{}},s=[];let u;return{nodeList:t.filter((function(t){const i=typeof t;return t.stmt&&"dir"===t.stmt?(u=t.value,!1):""!==t.trim()&&(i in e?!e[i].hasOwnProperty(t)&&(e[i][t]=!0):!s.includes(t)&&s.push(t))})),dir:u}}(r.concat.apply(r,e));if(r=a,"gen-1"===c)for(let i=0;i2e3)return;if(j[Y]=e,p[e].id===t)return{result:!0,count:0};let u=0,i=1;for(;u=0){const s=X(t,e);if(s.result)return{result:!0,count:i+s.count};i+=s.count}u+=1}return{result:!1,count:i}},z=function(t){return j[t]},H=function(){Y=-1,p.length>0&&X("none",p.length-1)},W=function(){return p},Q=()=>!!g&&(g=!1,!0),q=(t,e)=>{const s=(t=>{const e=t.trim();let s=e.slice(0,-1),u="arrow_open";switch(e.slice(-1)){case"x":u="arrow_cross","x"===e[0]&&(u="double_"+u,s=s.slice(1));break;case">":u="arrow_point","<"===e[0]&&(u="double_"+u,s=s.slice(1));break;case"o":u="arrow_circle","o"===e[0]&&(u="double_"+u,s=s.slice(1))}let i="normal",n=s.length-1;"="===s[0]&&(i="thick"),"~"===s[0]&&(i="invisible");let r=((t,e)=>{const s=e.length;let u=0;for(let i=0;i{let e=t.trim(),s="arrow_open";switch(e[0]){case"<":s="arrow_point",e=e.slice(1);break;case"x":s="arrow_cross",e=e.slice(1);break;case"o":s="arrow_circle",e=e.slice(1)}let u="normal";return e.includes("=")&&(u="thick"),e.includes(".")&&(u="dotted"),{type:s,stroke:u}})(e),u.stroke!==s.stroke)return{type:"INVALID",stroke:"INVALID"};if("arrow_open"===u.type)u.type=s.type;else{if(u.type!==s.type)return{type:"INVALID",stroke:"INVALID"};u.type="double_"+u.type}return"double_arrow"===u.type&&(u.type="double_arrow_point"),u.length=s.length,u}return s},Z=(t,e)=>{let s=!1;return t.forEach((t=>{t.nodes.indexOf(e)>=0&&(s=!0)})),s},J=(t,e)=>{const s=[];return t.nodes.forEach(((u,i)=>{Z(e,u)||s.push(t.nodes[i])})),{nodes:s}},tt={firstGraph:Q},et={defaultConfig:()=>i.K.flowchart,setAccTitle:i.s,getAccTitle:i.g,getAccDescription:i.a,setAccDescription:i.b,addVertex:F,lookUpDomId:b,addLink:C,updateLinkInterpolate:_,updateLink:B,addClass:S,setDirection:m,setClass:x,setTooltip:function(t,e){t.split(",").forEach((function(t){void 0!==e&&(E["gen-1"===c?b(t):t]=D(e))}))},getTooltip:L,setClickEvent:I,setLink:v,bindFunctions:R,getDirection:$,getVertices:N,getEdges:O,getClasses:w,clear:U,setGen:V,defaultStyle:G,addSubGraph:M,getDepthFirstPos:z,indexNodes:H,getSubGraphs:W,destructLink:q,lex:tt,exists:Z,makeUniq:J,setDiagramTitle:i.q,getDiagramTitle:i.t},st=Object.freeze(Object.defineProperty({__proto__:null,addClass:S,addLink:C,addSingleLink:T,addSubGraph:M,addVertex:F,bindFunctions:R,clear:U,default:et,defaultStyle:G,destructLink:q,firstGraph:Q,getClasses:w,getDepthFirstPos:z,getDirection:$,getEdges:O,getSubGraphs:W,getTooltip:L,getVertices:N,indexNodes:H,lex:tt,lookUpDomId:b,setClass:x,setClickEvent:I,setDirection:m,setGen:V,setLink:v,updateLink:B,updateLinkInterpolate:_},Symbol.toStringTag,{value:"Module"}))}}]); \ No newline at end of file diff --git a/assets/js/591eca19.119d37d0.js b/assets/js/591eca19.119d37d0.js new file mode 100644 index 000000000000..5c131718d37b --- /dev/null +++ b/assets/js/591eca19.119d37d0.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2493],{54758:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>c,contentTitle:()=>r,default:()=>h,frontMatter:()=>s,metadata:()=>a,toc:()=>l});const a=JSON.parse('{"id":"general/polkadot-direction","title":"Polkadot Direction","description":"Polkadot as a Decentralized and Secure Ubiquitous Computer.","source":"@site/../docs/general/polkadot-direction.md","sourceDirName":"general","slug":"/polkadot-direction","permalink":"/docs/polkadot-direction","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/polkadot-direction.md","tags":[],"version":"current","lastUpdatedBy":"github-actions[bot]","lastUpdatedAt":1730123236000,"frontMatter":{"id":"polkadot-direction","title":"Polkadot Direction","sidebar_label":"Polkadot Direction","description":"Polkadot as a Decentralized and Secure Ubiquitous Computer.","keywords":["polkadot vision","decentralization","ubiquitous computer","coretime","blockspace","cores"],"slug":"../polkadot-direction"},"sidebar":"docs","previous":{"title":"Polkadot 1.0","permalink":"/docs/polkadot-v1"},"next":{"title":"Stay Safe","permalink":"/docs/stay-safe-index"}}');var o=i(74848),t=i(28453);const s={id:"polkadot-direction",title:"Polkadot Direction",sidebar_label:"Polkadot Direction",description:"Polkadot as a Decentralized and Secure Ubiquitous Computer.",keywords:["polkadot vision","decentralization","ubiquitous computer","coretime","blockspace","cores"],slug:"../polkadot-direction"},r=void 0,c={},l=[{value:"Polkadot as a Computational Resource",id:"polkadot-as-a-computational-resource",level:2},{value:"Summary",id:"summary",level:2},{value:"From Slot Auctions to Coretime Marketplace",id:"from-slot-auctions-to-coretime-marketplace",level:2},{value:"From Chain-centricity to Application-centricity",id:"from-chain-centricity-to-application-centricity",level:2},{value:"XCM and Accords",id:"xcm-and-accords",level:3},{value:"Core Usage in Polkadot 1.0",id:"core-usage-in-polkadot-10",level:2},{value:"Agile Coretime Allocation",id:"agile-coretime-allocation",level:2},{value:"Split Coretime",id:"split-coretime",level:3},{value:"Strided Coretime",id:"strided-coretime",level:3},{value:"Combined Coretime",id:"combined-coretime",level:3},{value:"Agile Core Usage",id:"agile-core-usage",level:2},{value:"Compressed Cores",id:"compressed-cores",level:3},{value:"Shared Cores",id:"shared-cores",level:3},{value:"Agile Composable Computer",id:"agile-composable-computer",level:2},{value:"Polkadot's Resilience",id:"polkadots-resilience",level:2}];function d(e){const n={a:"a",admonition:"admonition",em:"em",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",strong:"strong",ul:"ul",...(0,t.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.admonition,{type:"info",children:(0,o.jsxs)(n.p,{children:["The material on this page is based on\n",(0,o.jsx)(n.a,{href:"https://www.youtube.com/watch?v=GIB1WeVuJD0",children:"Gavin Wood's talk at Polkadot Decoded 2023"}),"."]})}),"\n",(0,o.jsxs)(n.p,{children:["Understanding what ",(0,o.jsx)(n.a,{href:"/docs/polkadot-v1",children:"Polkadot 1.0"})," is about and the philosophy behind it will help\nus to envision the future direction of the Polkadot ecosystem toward abstraction and generalization."]}),"\n",(0,o.jsx)(n.h2,{id:"polkadot-as-a-computational-resource",children:"Polkadot as a Computational Resource"}),"\n",(0,o.jsxs)(n.p,{children:["Polkadot has been abstracted and generalized beyond what was originally proposed and envisioned in\nthe ",(0,o.jsx)(n.a,{href:"https://polkadot.network/whitepaper/",children:"whitepaper"}),". Polkadot is:"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:["About ",(0,o.jsx)(n.a,{href:"/docs/polkadot-v1#polkadots-blockspace",children:(0,o.jsx)(n.strong,{children:"Blockspace"})})," (the underlying resources that\nchains need), not chains."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"A platform to build applications"})," rather than chains and for people to use those applications.\nFundamentally, Polkadot is not a platform to host chains, and so far, chains happened to be one\nway to build applications and grow Polkadot's utility."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"A provider of resilient general-purpose continuation computation"}),", where the term\n",(0,o.jsx)(n.em,{children:"continuation"})," refers to a broad, long-running task that can do something, pause, continue (or do\nsomething else) later."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"A multicore computer"})," where chains that continuously operate in parallel on different cores are\ncalled ",(0,o.jsx)(n.a,{href:"/docs/learn-parachains",children:"parachains"}),". One core can be reserved for one single chain\nin-bulk or on-demand. On-demand cores can be accessed by multiple chains at different periods (see\nthe ",(0,o.jsx)(n.a,{href:"/docs/learn-agile-coretime",children:"Agile Coretime page"}),"). At the time of writing (2024), there\nare around 50 cores independently operating in parallel on Polkadot."]}),"\n"]}),"\n",(0,o.jsxs)(n.p,{children:["From now on ",(0,o.jsx)(n.em,{children:"application"})," will be used as a general term to describe anything that can use a\nPolkadot core to access secure and decentralized computation."]}),"\n",(0,o.jsx)(n.h2,{id:"summary",children:"Summary"}),"\n",(0,o.jsx)(n.p,{children:"If we see Polkadot as a service provider of trustless and resilient computation through cores as\nwell as secure interoperability between core-powered applications, the future development of\nPolkadot can be directed towards the following main changes."}),"\n",(0,o.jsx)(n.p,{children:"A paradigm shift from:"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"being a chain-focused ecosystem where each parachain owned an execution core at all times\n(acquired through fixed parachain auction), which allowed a simple and secure, sharded execution\nenvironment"}),"\n",(0,o.jsx)(n.li,{children:"to being an application-focused ecosystem where we remove the assumption that each application\nowns a core, and instead that all cores are a resource to be consumed and used as needed by all\napplications."}),"\n"]}),"\n",(0,o.jsxs)(n.p,{children:["Previously, securing a core was a competitive process through an\n",(0,o.jsx)(n.a,{href:"/docs/learn/learn-auction",children:"auction mechanism"}),". With Agile Coretime, there is no need for\nauctions anymore. Teams can purchase on-demand coretime or reserve bulk coretime as required. This\ngreatly decreases the barrier-to-entry for software tinkerers and parachain teams."]}),"\n",(0,o.jsxs)(n.p,{children:["On top of those main changes, ",(0,o.jsx)(n.a,{href:"#agile-core-usage",children:"agile core usage"})," and\n",(0,o.jsx)(n.a,{href:"#agile-coretime-allocation",children:"coretime allocation"})," will allow any application to access Polkadot's\ncomputation based on their needs without wasting valuable blockspace. ",(0,o.jsx)(n.a,{href:"#xcm-and-accords",children:"Accords"}),"\nwill improve cross-chain communication and the security guarantees of XCM messages. Finally,\nPolkadot will scale by moving on-chain logic into its system parachains, allowing it to have more\nbandwidth for the ",(0,o.jsx)(n.a,{href:"/docs/learn-parachains-protocol",children:"parachains protocol"})," and accords."]}),"\n",(0,o.jsx)(n.h2,{id:"from-slot-auctions-to-coretime-marketplace",children:"From Slot Auctions to Coretime Marketplace"}),"\n",(0,o.jsxs)(n.p,{children:["The end product of blockchains is ",(0,o.jsx)(n.a,{href:"/docs/polkadot-v1#polkadots-blockspace",children:(0,o.jsx)(n.strong,{children:"Blockspace"})}),".\nApplications need to access Polkadot's blockspace, and the entry points to blockspace are the cores.\nThus, applications will need to reserve some time on cores or ",(0,o.jsx)(n.strong,{children:"Coretime"})," to gain the right to\naccess Polkadot's secure blockspace and interoperability for a finite period."]}),"\n",(0,o.jsx)(n.p,{children:"Cores must be agile and general: they can change what job they run as easily as a modern CPU. It\nfollows that the procurement of those cores must be agile as well."}),"\n",(0,o.jsx)(n.p,{children:"The auction mechanism is not agile, creates high entry barriers, and is designed for long-running\nsingle applications (i.e., the original Polkadot vision proposed in the whitepaper)."}),"\n",(0,o.jsxs)(n.p,{children:["We depart from the classic lease auctions and propose an agile marketplace for coretime, where\nessentially ",(0,o.jsx)(n.strong,{children:"coretime becomes a commodity that can be tokenized, sold, and traded"}),". This setup\nmaximizes the agility of Polkadot and lets the market figure out the best solution needed for\napplications to be successful."]}),"\n",(0,o.jsxs)(n.p,{children:["Applications can reserve ",(0,o.jsx)(n.strong,{children:"bulk coretime"})," and ",(0,o.jsx)(n.strong,{children:"on-demand coretime"})," depending on their needs. Bulk\ncoretime rental will be a standard rental of coretime through a broker system parachain at a fixed\nprice for a fixed period of time. On-demand coretime rental will be available through ongoing sale\nof coretime for immediate use at a spot price. This system lowers the barrier to entry for\nprospective builders."]}),"\n",(0,o.jsxs)(n.p,{children:["For example, revenues from coretime sales can be burnt, used to fund the Treasury, or used for a mix\nof those options. The topic is currently under discussion. For more information, see\n",(0,o.jsx)(n.a,{href:"https://github.com/polkadot-fellows/RFCs/pull/10",children:"RFC-0010"})," and\n",(0,o.jsx)(n.a,{href:"https://github.com/polkadot-fellows/RFCs/pull/17/files",children:"RFC-0015"}),"."]}),"\n",(0,o.jsx)(n.h2,{id:"from-chain-centricity-to-application-centricity",children:"From Chain-centricity to Application-centricity"}),"\n",(0,o.jsxs)(n.p,{children:["Polkadot 1.0 was a chain-centric paradigm consisting of isolated chains able to exchange messages.\nThis was not fundamentally different from having completely different chains connected to bridges,\nwith the only difference of having the relay chain securing the network, providing message-passing\ncapability, and doing some extra tasks such as ",(0,o.jsx)(n.a,{href:"/docs/learn-staking",children:"staking"}),",\n",(0,o.jsx)(n.a,{href:"./learn-accounts-index",children:"accounts"}),", ",(0,o.jsx)(n.a,{href:"/docs/learn-transactions#balance-transfers",children:"balances"}),",\nand ",(0,o.jsx)(n.a,{href:"/docs/learn-polkadot-opengov",children:"governance"}),". Having a chain-centric system will ultimately\nend in chain-centric application and UX."]}),"\n",(0,o.jsx)(n.p,{children:"The true innovation of Polkadot is about leveraging the unique value proposition offered by\ndifferent chains and using those chains\u2019 collaborative potential to build inter-chain applications\nto solve real-world problems. Those applications will thus need to span across chains."}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Increasingly fewer tasks will be handled by the relay chain"})," that will focus efforts only on\nprimary tasks: securing the network and providing secure message-passing capability.\n",(0,o.jsx)(n.a,{href:"/docs/learn-system-chains",children:"System parachains"})," will be used to take over secondary relay chain\ntasks such as staking, governance, etc."]}),"\n",(0,o.jsx)(n.h3,{id:"xcm-and-accords",children:"XCM and Accords"}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.a,{href:"/docs/learn-xcm",children:"XCMP"})," is the transport layer for delivering XCM messages. It gives the\ntransportation method and a secure route but not a framework for binding agreements."]}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.a,{href:"/docs/learn-xcm-transport",children:"XCM"})," is a format, a language of intention abstract over\nfunctionality common within chains. It creates an expressive language of what you intend to do or\nwant to happen. XCM messages are transported between different chains using XCMP. Ideally, in a\nfully trustless environment, strong guarantees ensure chains faithfully interpret XCM messages. We\ncan have a secure mode of delivering messages that can be interpreted across protocols, but still\nmessages might be misinterpreted. These guarantees can be achieved with accords."]}),"\n",(0,o.jsxs)(n.p,{children:["An ",(0,o.jsx)(n.strong,{children:"Accord"})," is an ",(0,o.jsx)(n.em,{children:"opt-in"})," treaty across many chains, where treaty logic cannot be changed or\nundermined by one or more of those chains, and Polkadot guarantees faithful execution of this logic.\nAccords will be specific to a particular function, and any chain that enters the accord will be held\nto it and will service that particular function. To lower the entry barrier, accords can be proposed\npermissionlessly, but because they are opt-in, the accord proposal will take effect until chains\nagree and sign up."]}),"\n",(0,o.jsx)(n.p,{children:"To sum up, accords ensure that the receiver faithfully interprets XCM messages securely sent via\nXCMP channels. Accords are the missing piece of the puzzle to achieve a fully trustless and\ncollaborative environment between applications."}),"\n",(0,o.jsx)(n.p,{children:"Polkadot is the only ecosystem where accords can properly exist because it has a homogenous security\nlayer that provides a specific state transition function for each logic component. This allows\npatterns of cooperation between multiple logic components (i.e., trans-applications) that would not\nbe possible to achieve over bridges."}),"\n",(0,o.jsxs)(n.p,{children:["Accords will be implemented using ",(0,o.jsx)(n.a,{href:"/docs/learn-spree",children:"SPREE technology"}),"."]}),"\n",(0,o.jsx)(n.h2,{id:"core-usage-in-polkadot-10",children:"Core Usage in Polkadot 1.0"}),"\n",(0,o.jsx)(n.p,{children:"In Polkadot 1.0, applications produced blocks at a fixed rate of 12 seconds, whether needed or not.\nThis led to inefficient energy allocation and economic incentives for producing full blocks under\nheavy traffic and empty blocks under light traffic."}),"\n",(0,o.jsx)(n.p,{children:"The figure below shows the core usage for Polkadot 1.0, where the horizontal axis is time, and each\nrow represents a core. Colors show different parachains, each using one core (i.e., one parachain,\none core formula)."}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"core-usage-dumb",src:i(32550).A+"",width:"1920",height:"800"})}),"\n",(0,o.jsxs)(n.p,{children:["The above setup allowed a ",(0,o.jsx)(n.strong,{children:"simple and secure, sharded execution environment"}),"."]}),"\n",(0,o.jsx)(n.p,{children:"However, to achieve full efficiency, blocks must be produced when needed, and the system must target\nfull block capacity, lowering the probability of incentivizing validators to build blocks half full\nor, worse, empty."}),"\n",(0,o.jsx)(n.h2,{id:"agile-coretime-allocation",children:"Agile Coretime Allocation"}),"\n",(0,o.jsxs)(n.p,{children:["In Polkadot 1.0, coretime is a fixed two-year period on one specific core. Here, we remove this\nlimitation and generalize coretime usage to meet different application needs. For more information,\nsee the ",(0,o.jsx)(n.a,{href:"/docs/learn-agile-coretime",children:"agile coretime documentation"}),"."]}),"\n",(0,o.jsx)(n.h3,{id:"split-coretime",children:"Split Coretime"}),"\n",(0,o.jsx)(n.p,{children:"Owners of coretime can split or trade it. An application A1 can run on core C1 for a finite period\nand then another application A2 can run on that core, or application A1 can continue running on\nanother core C2. Some applications might stop running for some time and resume later on."}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"core-usage-agile-rangeSplit",src:i(67150).A+"",width:"1920",height:"800"})}),"\n",(0,o.jsx)(n.h3,{id:"strided-coretime",children:"Strided Coretime"}),"\n",(0,o.jsx)(n.p,{children:"Ranges can be strided (i.e., applications can take turns on a core) to share costs or decrease block\nproduction rate, for example."}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"core-usage-agile-rangeStrided",src:i(6923).A+"",width:"1920",height:"800"})}),"\n",(0,o.jsx)(n.h3,{id:"combined-coretime",children:"Combined Coretime"}),"\n",(0,o.jsxs)(n.p,{children:["An application can be assigned to multiple cores simultaneously. Some applications can have a\npermanent core assignment and an intermittent one, for example, in a period of high demand to send\nmultiple blocks to multiple cores at the same time slot to reduce latency. Combining coretime in\nthis manner is achieved through ",(0,o.jsx)(n.a,{href:"/docs/learn-elastic-scaling",children:"elastic scaling"}),"."]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"core-usage-agile-combined",src:i(41938).A+"",width:"1920",height:"800"})}),"\n",(0,o.jsx)(n.h2,{id:"agile-core-usage",children:"Agile Core Usage"}),"\n",(0,o.jsx)(n.p,{children:"In Polkadot 1.0, one core is assigned to one application (in this case, equivalent to a parachain).\nIdeally, core affinity (i.e., which application operates on which core) is unimportant (see below).\nCores do not have any higher friendliness to one application than another."}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"core-usage-dumb-noAffinity",src:i(7960).A+"",width:"1920",height:"800"})}),"\n",(0,o.jsx)(n.p,{children:"Here, we remove the assumption that each application owns a core and instead that all cores are a\nresource to be consumed and used as needed by all applications in the ecosystem."}),"\n",(0,o.jsx)(n.h3,{id:"compressed-cores",children:"Compressed Cores"}),"\n",(0,o.jsx)(n.p,{children:"The same core can secure multiple blocks of the same application simultaneously. Combining multiple\napplication blocks in the same relay chain core will reduce latency at the expense of increased\nbandwidth for the fixed price of opening and closing a block."}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"core-usage-agile-compressed",src:i(62720).A+"",width:"1920",height:"800"})}),"\n",(0,o.jsx)(n.h3,{id:"shared-cores",children:"Shared Cores"}),"\n",(0,o.jsxs)(n.p,{children:["Sharing cores with other applications to share costs but with no reduction in latency. Note that\nthis is different from the ",(0,o.jsx)(n.a,{href:"#split-coretime",children:"split coretime"})," where one core is used by multiple\napplication at different times to share costs at the expense of higher latency. Shared cores will be\nenabled with ",(0,o.jsx)(n.a,{href:"/docs/learn-jam-chain",children:"JAM"}),", a semi-coherent system in which data from different\nshards can be scheduled within the same core."]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"core-usage-agile-shared",src:i(49984).A+"",width:"1920",height:"800"})}),"\n",(0,o.jsx)(n.h2,{id:"agile-composable-computer",children:"Agile Composable Computer"}),"\n",(0,o.jsxs)(n.p,{children:["All the above options of agile ",(0,o.jsx)(n.a,{href:"#agile-coretime-allocation",children:"coretime allocation"})," and\n",(0,o.jsx)(n.a,{href:"#agile-core-usage",children:"core usage"})," can be composable and enable the creation of an agile decentralized\nglobal computing system."]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"core-usage-agile-composable",src:i(8420).A+"",width:"1920",height:"800"})}),"\n",(0,o.jsx)(n.p,{children:"Thus, this new vision is focused on Polkadot\u2019s resource, which is secure, flexible, and available\nblockspace that can be accessed by reserving some time on a core. Agility in allocating coretime and\nusing cores allows for maximized network efficiency and blockspace usage."}),"\n",(0,o.jsx)(n.h2,{id:"polkadots-resilience",children:"Polkadot's Resilience"}),"\n",(0,o.jsx)(n.p,{children:"Systems that have yet to be engineered with decentralization, cryptography, and game theory in mind,\nare breakable and prone to cyber-attacks. Polkadot is basing its resilience on different pillars:"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Preponderance of light-client usage:"})," Centralized RPC servers are common but susceptible to\nattack and not trustless decentralized entry points to using blockchain-based applications. Light\nclient usage on Polkadot is possible through\n",(0,o.jsx)(n.a,{href:"/docs/build-light-clients#how-to-use-substrate-connect",children:"Smoldot"}),"."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Zero-Knowledge (ZK) Primitives:"})," They can have a problematic effect on censorship and\ncentralization as having a big state transition function boiled down to a single proof of correct\nexecution is not currently a scaling solution to build resilient systems. However, a library of\nrichly featured and high-performance ZK primitives ready for specific use cases is being built.\nThe first use-case will be used to improve privacy for on-chain collectives such as\n",(0,o.jsx)(n.a,{href:"/docs/learn-polkadot-technical-fellowship",children:"the Polkadot Technical Fellowship"}),"."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsxs)(n.strong,{children:[(0,o.jsx)(n.a,{href:"/docs/learn-safrole",children:"SAFROLE"})," consensus:"]})," New forkless block-production consensus\nalgorithm replacing ",(0,o.jsx)(n.a,{href:"/docs/learn-consensus#block-production-babe",children:"BABE"})," and where block are\nnot produced unless they are expected to be finalized. This will provide several benefits, such\nas:","\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"Improved security, parachain performance, and UX from being forkless"}),"\n",(0,o.jsx)(n.li,{children:"Preventing front-running attacks through high-performance transaction routing where transactions\nare included in blocks in one hop instead of being gossiped, and transaction encryption."}),"\n"]}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Internode Mixnet:"})," Shielded transport for short messages that","\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"avoids leaking IP information for transactions, and"}),"\n",(0,o.jsx)(n.li,{children:"introduces a general messaging system allowing users, chains and off-chain workers, smart\ncontracts, pallets, and anything else existing within a chain to exchange messages containing\nsignatures, intentions, etc."}),"\n"]}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Social Decentralization:"})," Resilience is achieved by including many participants contributing to\nthe system and coming to decisions through on-chain governance. Involving as many people as\npossible ensures resilience against spending becoming systemically misjudged and appropriately\ndirects wealth for spending treasury funds, salaries, and grants. Another crucial way of\ndecentralizing the network is ensuring experts on which the maintenance of the system relies upon\nare incentivized and recruited over time by the Polkadot network and not by organizations within\nthe Polkadot ecosystem."]}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},41938:(e,n,i)=>{i.d(n,{A:()=>a});const a=i.p+"assets/images/core-usage-agile-combined-4ef969fb72931430cf067bccc10c1a73.png"},8420:(e,n,i)=>{i.d(n,{A:()=>a});const a=i.p+"assets/images/core-usage-agile-composable-ee626ebd055fdf3bbd6d88d70bc2c110.png"},62720:(e,n,i)=>{i.d(n,{A:()=>a});const a=i.p+"assets/images/core-usage-agile-compressed-db4821b411e6f4be0c12167d89ee022e.png"},67150:(e,n,i)=>{i.d(n,{A:()=>a});const a=i.p+"assets/images/core-usage-agile-rangeSplit-d8511cbb8658052ac0a639bd6a722982.png"},6923:(e,n,i)=>{i.d(n,{A:()=>a});const a=i.p+"assets/images/core-usage-agile-rangeStrided-605254487f94721806beca92707cfaf3.png"},49984:(e,n,i)=>{i.d(n,{A:()=>a});const a=i.p+"assets/images/core-usage-agile-shared-f395560cce9a4fd4976c5259ce8c67c4.png"},7960:(e,n,i)=>{i.d(n,{A:()=>a});const a=i.p+"assets/images/core-usage-dumb-noAffinity-8d86655d36adc7c8de32114821a1764a.png"},32550:(e,n,i)=>{i.d(n,{A:()=>a});const a=i.p+"assets/images/core-usage-dumb-6419ee60a3606e10d89a1c91dbf24e20.png"},28453:(e,n,i)=>{i.d(n,{R:()=>s,x:()=>r});var a=i(96540);const o={},t=a.createContext(o);function s(e){const n=a.useContext(t);return a.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:s(e.components),a.createElement(t.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/591eca19.1e2bb13b.js b/assets/js/591eca19.1e2bb13b.js deleted file mode 100644 index c0155d2f9987..000000000000 --- a/assets/js/591eca19.1e2bb13b.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2493],{53458:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>c,contentTitle:()=>s,default:()=>h,frontMatter:()=>t,metadata:()=>r,toc:()=>l});var a=i(74848),o=i(28453);const t={id:"polkadot-direction",title:"Polkadot Direction",sidebar_label:"Polkadot Direction",description:"Polkadot as a Decentralized and Secure Ubiquitous Computer.",keywords:["polkadot vision","decentralization","ubiquitous computer","coretime","blockspace","cores"],slug:"../polkadot-direction"},s=void 0,r={id:"general/polkadot-direction",title:"Polkadot Direction",description:"Polkadot as a Decentralized and Secure Ubiquitous Computer.",source:"@site/../docs/general/polkadot-direction.md",sourceDirName:"general",slug:"/polkadot-direction",permalink:"/docs/polkadot-direction",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/polkadot-direction.md",tags:[],version:"current",lastUpdatedBy:"github-actions[bot]",lastUpdatedAt:1730123236e3,frontMatter:{id:"polkadot-direction",title:"Polkadot Direction",sidebar_label:"Polkadot Direction",description:"Polkadot as a Decentralized and Secure Ubiquitous Computer.",keywords:["polkadot vision","decentralization","ubiquitous computer","coretime","blockspace","cores"],slug:"../polkadot-direction"},sidebar:"docs",previous:{title:"Polkadot 1.0",permalink:"/docs/polkadot-v1"},next:{title:"Stay Safe",permalink:"/docs/stay-safe-index"}},c={},l=[{value:"Polkadot as a Computational Resource",id:"polkadot-as-a-computational-resource",level:2},{value:"Summary",id:"summary",level:2},{value:"From Slot Auctions to Coretime Marketplace",id:"from-slot-auctions-to-coretime-marketplace",level:2},{value:"From Chain-centricity to Application-centricity",id:"from-chain-centricity-to-application-centricity",level:2},{value:"XCM and Accords",id:"xcm-and-accords",level:3},{value:"Core Usage in Polkadot 1.0",id:"core-usage-in-polkadot-10",level:2},{value:"Agile Coretime Allocation",id:"agile-coretime-allocation",level:2},{value:"Split Coretime",id:"split-coretime",level:3},{value:"Strided Coretime",id:"strided-coretime",level:3},{value:"Combined Coretime",id:"combined-coretime",level:3},{value:"Agile Core Usage",id:"agile-core-usage",level:2},{value:"Compressed Cores",id:"compressed-cores",level:3},{value:"Shared Cores",id:"shared-cores",level:3},{value:"Agile Composable Computer",id:"agile-composable-computer",level:2},{value:"Polkadot's Resilience",id:"polkadots-resilience",level:2}];function d(e){const n={a:"a",admonition:"admonition",em:"em",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",strong:"strong",ul:"ul",...(0,o.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.admonition,{type:"info",children:(0,a.jsxs)(n.p,{children:["The material on this page is based on\n",(0,a.jsx)(n.a,{href:"https://www.youtube.com/watch?v=GIB1WeVuJD0",children:"Gavin Wood's talk at Polkadot Decoded 2023"}),"."]})}),"\n",(0,a.jsxs)(n.p,{children:["Understanding what ",(0,a.jsx)(n.a,{href:"/docs/polkadot-v1",children:"Polkadot 1.0"})," is about and the philosophy behind it will help\nus to envision the future direction of the Polkadot ecosystem toward abstraction and generalization."]}),"\n",(0,a.jsx)(n.h2,{id:"polkadot-as-a-computational-resource",children:"Polkadot as a Computational Resource"}),"\n",(0,a.jsxs)(n.p,{children:["Polkadot has been abstracted and generalized beyond what was originally proposed and envisioned in\nthe ",(0,a.jsx)(n.a,{href:"https://polkadot.network/whitepaper/",children:"whitepaper"}),". Polkadot is:"]}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["About ",(0,a.jsx)(n.a,{href:"/docs/polkadot-v1#polkadots-blockspace",children:(0,a.jsx)(n.strong,{children:"Blockspace"})})," (the underlying resources that\nchains need), not chains."]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.strong,{children:"A platform to build applications"})," rather than chains and for people to use those applications.\nFundamentally, Polkadot is not a platform to host chains, and so far, chains happened to be one\nway to build applications and grow Polkadot's utility."]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.strong,{children:"A provider of resilient general-purpose continuation computation"}),", where the term\n",(0,a.jsx)(n.em,{children:"continuation"})," refers to a broad, long-running task that can do something, pause, continue (or do\nsomething else) later."]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.strong,{children:"A multicore computer"})," where chains that continuously operate in parallel on different cores are\ncalled ",(0,a.jsx)(n.a,{href:"/docs/learn-parachains",children:"parachains"}),". One core can be reserved for one single chain\nin-bulk or on-demand. On-demand cores can be accessed by multiple chains at different periods (see\nthe ",(0,a.jsx)(n.a,{href:"/docs/learn-agile-coretime",children:"Agile Coretime page"}),"). At the time of writing (2024), there\nare around 50 cores independently operating in parallel on Polkadot."]}),"\n"]}),"\n",(0,a.jsxs)(n.p,{children:["From now on ",(0,a.jsx)(n.em,{children:"application"})," will be used as a general term to describe anything that can use a\nPolkadot core to access secure and decentralized computation."]}),"\n",(0,a.jsx)(n.h2,{id:"summary",children:"Summary"}),"\n",(0,a.jsx)(n.p,{children:"If we see Polkadot as a service provider of trustless and resilient computation through cores as\nwell as secure interoperability between core-powered applications, the future development of\nPolkadot can be directed towards the following main changes."}),"\n",(0,a.jsx)(n.p,{children:"A paradigm shift from:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:"being a chain-focused ecosystem where each parachain owned an execution core at all times\n(acquired through fixed parachain auction), which allowed a simple and secure, sharded execution\nenvironment"}),"\n",(0,a.jsx)(n.li,{children:"to being an application-focused ecosystem where we remove the assumption that each application\nowns a core, and instead that all cores are a resource to be consumed and used as needed by all\napplications."}),"\n"]}),"\n",(0,a.jsxs)(n.p,{children:["Previously, securing a core was a competitive process through an\n",(0,a.jsx)(n.a,{href:"/docs/learn/learn-auction",children:"auction mechanism"}),". With Agile Coretime, there is no need for\nauctions anymore. Teams can purchase on-demand coretime or reserve bulk coretime as required. This\ngreatly decreases the barrier-to-entry for software tinkerers and parachain teams."]}),"\n",(0,a.jsxs)(n.p,{children:["On top of those main changes, ",(0,a.jsx)(n.a,{href:"#agile-core-usage",children:"agile core usage"})," and\n",(0,a.jsx)(n.a,{href:"#agile-coretime-allocation",children:"coretime allocation"})," will allow any application to access Polkadot's\ncomputation based on their needs without wasting valuable blockspace. ",(0,a.jsx)(n.a,{href:"#xcm-and-accords",children:"Accords"}),"\nwill improve cross-chain communication and the security guarantees of XCM messages. Finally,\nPolkadot will scale by moving on-chain logic into its system parachains, allowing it to have more\nbandwidth for the ",(0,a.jsx)(n.a,{href:"/docs/learn-parachains-protocol",children:"parachains protocol"})," and accords."]}),"\n",(0,a.jsx)(n.h2,{id:"from-slot-auctions-to-coretime-marketplace",children:"From Slot Auctions to Coretime Marketplace"}),"\n",(0,a.jsxs)(n.p,{children:["The end product of blockchains is ",(0,a.jsx)(n.a,{href:"/docs/polkadot-v1#polkadots-blockspace",children:(0,a.jsx)(n.strong,{children:"Blockspace"})}),".\nApplications need to access Polkadot's blockspace, and the entry points to blockspace are the cores.\nThus, applications will need to reserve some time on cores or ",(0,a.jsx)(n.strong,{children:"Coretime"})," to gain the right to\naccess Polkadot's secure blockspace and interoperability for a finite period."]}),"\n",(0,a.jsx)(n.p,{children:"Cores must be agile and general: they can change what job they run as easily as a modern CPU. It\nfollows that the procurement of those cores must be agile as well."}),"\n",(0,a.jsx)(n.p,{children:"The auction mechanism is not agile, creates high entry barriers, and is designed for long-running\nsingle applications (i.e., the original Polkadot vision proposed in the whitepaper)."}),"\n",(0,a.jsxs)(n.p,{children:["We depart from the classic lease auctions and propose an agile marketplace for coretime, where\nessentially ",(0,a.jsx)(n.strong,{children:"coretime becomes a commodity that can be tokenized, sold, and traded"}),". This setup\nmaximizes the agility of Polkadot and lets the market figure out the best solution needed for\napplications to be successful."]}),"\n",(0,a.jsxs)(n.p,{children:["Applications can reserve ",(0,a.jsx)(n.strong,{children:"bulk coretime"})," and ",(0,a.jsx)(n.strong,{children:"on-demand coretime"})," depending on their needs. Bulk\ncoretime rental will be a standard rental of coretime through a broker system parachain at a fixed\nprice for a fixed period of time. On-demand coretime rental will be available through ongoing sale\nof coretime for immediate use at a spot price. This system lowers the barrier to entry for\nprospective builders."]}),"\n",(0,a.jsxs)(n.p,{children:["For example, revenues from coretime sales can be burnt, used to fund the Treasury, or used for a mix\nof those options. The topic is currently under discussion. For more information, see\n",(0,a.jsx)(n.a,{href:"https://github.com/polkadot-fellows/RFCs/pull/10",children:"RFC-0010"})," and\n",(0,a.jsx)(n.a,{href:"https://github.com/polkadot-fellows/RFCs/pull/17/files",children:"RFC-0015"}),"."]}),"\n",(0,a.jsx)(n.h2,{id:"from-chain-centricity-to-application-centricity",children:"From Chain-centricity to Application-centricity"}),"\n",(0,a.jsxs)(n.p,{children:["Polkadot 1.0 was a chain-centric paradigm consisting of isolated chains able to exchange messages.\nThis was not fundamentally different from having completely different chains connected to bridges,\nwith the only difference of having the relay chain securing the network, providing message-passing\ncapability, and doing some extra tasks such as ",(0,a.jsx)(n.a,{href:"/docs/learn-staking",children:"staking"}),",\n",(0,a.jsx)(n.a,{href:"./learn-accounts-index",children:"accounts"}),", ",(0,a.jsx)(n.a,{href:"/docs/learn-transactions#balance-transfers",children:"balances"}),",\nand ",(0,a.jsx)(n.a,{href:"/docs/learn-polkadot-opengov",children:"governance"}),". Having a chain-centric system will ultimately\nend in chain-centric application and UX."]}),"\n",(0,a.jsx)(n.p,{children:"The true innovation of Polkadot is about leveraging the unique value proposition offered by\ndifferent chains and using those chains\u2019 collaborative potential to build inter-chain applications\nto solve real-world problems. Those applications will thus need to span across chains."}),"\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.strong,{children:"Increasingly fewer tasks will be handled by the relay chain"})," that will focus efforts only on\nprimary tasks: securing the network and providing secure message-passing capability.\n",(0,a.jsx)(n.a,{href:"/docs/learn-system-chains",children:"System parachains"})," will be used to take over secondary relay chain\ntasks such as staking, governance, etc."]}),"\n",(0,a.jsx)(n.h3,{id:"xcm-and-accords",children:"XCM and Accords"}),"\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.a,{href:"/docs/learn-xcm",children:"XCMP"})," is the transport layer for delivering XCM messages. It gives the\ntransportation method and a secure route but not a framework for binding agreements."]}),"\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.a,{href:"/docs/learn-xcm-transport",children:"XCM"})," is a format, a language of intention abstract over\nfunctionality common within chains. It creates an expressive language of what you intend to do or\nwant to happen. XCM messages are transported between different chains using XCMP. Ideally, in a\nfully trustless environment, strong guarantees ensure chains faithfully interpret XCM messages. We\ncan have a secure mode of delivering messages that can be interpreted across protocols, but still\nmessages might be misinterpreted. These guarantees can be achieved with accords."]}),"\n",(0,a.jsxs)(n.p,{children:["An ",(0,a.jsx)(n.strong,{children:"Accord"})," is an ",(0,a.jsx)(n.em,{children:"opt-in"})," treaty across many chains, where treaty logic cannot be changed or\nundermined by one or more of those chains, and Polkadot guarantees faithful execution of this logic.\nAccords will be specific to a particular function, and any chain that enters the accord will be held\nto it and will service that particular function. To lower the entry barrier, accords can be proposed\npermissionlessly, but because they are opt-in, the accord proposal will take effect until chains\nagree and sign up."]}),"\n",(0,a.jsx)(n.p,{children:"To sum up, accords ensure that the receiver faithfully interprets XCM messages securely sent via\nXCMP channels. Accords are the missing piece of the puzzle to achieve a fully trustless and\ncollaborative environment between applications."}),"\n",(0,a.jsx)(n.p,{children:"Polkadot is the only ecosystem where accords can properly exist because it has a homogenous security\nlayer that provides a specific state transition function for each logic component. This allows\npatterns of cooperation between multiple logic components (i.e., trans-applications) that would not\nbe possible to achieve over bridges."}),"\n",(0,a.jsxs)(n.p,{children:["Accords will be implemented using ",(0,a.jsx)(n.a,{href:"/docs/learn-spree",children:"SPREE technology"}),"."]}),"\n",(0,a.jsx)(n.h2,{id:"core-usage-in-polkadot-10",children:"Core Usage in Polkadot 1.0"}),"\n",(0,a.jsx)(n.p,{children:"In Polkadot 1.0, applications produced blocks at a fixed rate of 12 seconds, whether needed or not.\nThis led to inefficient energy allocation and economic incentives for producing full blocks under\nheavy traffic and empty blocks under light traffic."}),"\n",(0,a.jsx)(n.p,{children:"The figure below shows the core usage for Polkadot 1.0, where the horizontal axis is time, and each\nrow represents a core. Colors show different parachains, each using one core (i.e., one parachain,\none core formula)."}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.img,{alt:"core-usage-dumb",src:i(32550).A+"",width:"1920",height:"800"})}),"\n",(0,a.jsxs)(n.p,{children:["The above setup allowed a ",(0,a.jsx)(n.strong,{children:"simple and secure, sharded execution environment"}),"."]}),"\n",(0,a.jsx)(n.p,{children:"However, to achieve full efficiency, blocks must be produced when needed, and the system must target\nfull block capacity, lowering the probability of incentivizing validators to build blocks half full\nor, worse, empty."}),"\n",(0,a.jsx)(n.h2,{id:"agile-coretime-allocation",children:"Agile Coretime Allocation"}),"\n",(0,a.jsxs)(n.p,{children:["In Polkadot 1.0, coretime is a fixed two-year period on one specific core. Here, we remove this\nlimitation and generalize coretime usage to meet different application needs. For more information,\nsee the ",(0,a.jsx)(n.a,{href:"/docs/learn-agile-coretime",children:"agile coretime documentation"}),"."]}),"\n",(0,a.jsx)(n.h3,{id:"split-coretime",children:"Split Coretime"}),"\n",(0,a.jsx)(n.p,{children:"Owners of coretime can split or trade it. An application A1 can run on core C1 for a finite period\nand then another application A2 can run on that core, or application A1 can continue running on\nanother core C2. Some applications might stop running for some time and resume later on."}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.img,{alt:"core-usage-agile-rangeSplit",src:i(67150).A+"",width:"1920",height:"800"})}),"\n",(0,a.jsx)(n.h3,{id:"strided-coretime",children:"Strided Coretime"}),"\n",(0,a.jsx)(n.p,{children:"Ranges can be strided (i.e., applications can take turns on a core) to share costs or decrease block\nproduction rate, for example."}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.img,{alt:"core-usage-agile-rangeStrided",src:i(6923).A+"",width:"1920",height:"800"})}),"\n",(0,a.jsx)(n.h3,{id:"combined-coretime",children:"Combined Coretime"}),"\n",(0,a.jsxs)(n.p,{children:["An application can be assigned to multiple cores simultaneously. Some applications can have a\npermanent core assignment and an intermittent one, for example, in a period of high demand to send\nmultiple blocks to multiple cores at the same time slot to reduce latency. Combining coretime in\nthis manner is achieved through ",(0,a.jsx)(n.a,{href:"/docs/learn-elastic-scaling",children:"elastic scaling"}),"."]}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.img,{alt:"core-usage-agile-combined",src:i(41938).A+"",width:"1920",height:"800"})}),"\n",(0,a.jsx)(n.h2,{id:"agile-core-usage",children:"Agile Core Usage"}),"\n",(0,a.jsx)(n.p,{children:"In Polkadot 1.0, one core is assigned to one application (in this case, equivalent to a parachain).\nIdeally, core affinity (i.e., which application operates on which core) is unimportant (see below).\nCores do not have any higher friendliness to one application than another."}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.img,{alt:"core-usage-dumb-noAffinity",src:i(7960).A+"",width:"1920",height:"800"})}),"\n",(0,a.jsx)(n.p,{children:"Here, we remove the assumption that each application owns a core and instead that all cores are a\nresource to be consumed and used as needed by all applications in the ecosystem."}),"\n",(0,a.jsx)(n.h3,{id:"compressed-cores",children:"Compressed Cores"}),"\n",(0,a.jsx)(n.p,{children:"The same core can secure multiple blocks of the same application simultaneously. Combining multiple\napplication blocks in the same relay chain core will reduce latency at the expense of increased\nbandwidth for the fixed price of opening and closing a block."}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.img,{alt:"core-usage-agile-compressed",src:i(62720).A+"",width:"1920",height:"800"})}),"\n",(0,a.jsx)(n.h3,{id:"shared-cores",children:"Shared Cores"}),"\n",(0,a.jsxs)(n.p,{children:["Sharing cores with other applications to share costs but with no reduction in latency. Note that\nthis is different from the ",(0,a.jsx)(n.a,{href:"#split-coretime",children:"split coretime"})," where one core is used by multiple\napplication at different times to share costs at the expense of higher latency. Shared cores will be\nenabled with ",(0,a.jsx)(n.a,{href:"/docs/learn-jam-chain",children:"JAM"}),", a semi-coherent system in which data from different\nshards can be scheduled within the same core."]}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.img,{alt:"core-usage-agile-shared",src:i(49984).A+"",width:"1920",height:"800"})}),"\n",(0,a.jsx)(n.h2,{id:"agile-composable-computer",children:"Agile Composable Computer"}),"\n",(0,a.jsxs)(n.p,{children:["All the above options of agile ",(0,a.jsx)(n.a,{href:"#agile-coretime-allocation",children:"coretime allocation"})," and\n",(0,a.jsx)(n.a,{href:"#agile-core-usage",children:"core usage"})," can be composable and enable the creation of an agile decentralized\nglobal computing system."]}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.img,{alt:"core-usage-agile-composable",src:i(8420).A+"",width:"1920",height:"800"})}),"\n",(0,a.jsx)(n.p,{children:"Thus, this new vision is focused on Polkadot\u2019s resource, which is secure, flexible, and available\nblockspace that can be accessed by reserving some time on a core. Agility in allocating coretime and\nusing cores allows for maximized network efficiency and blockspace usage."}),"\n",(0,a.jsx)(n.h2,{id:"polkadots-resilience",children:"Polkadot's Resilience"}),"\n",(0,a.jsx)(n.p,{children:"Systems that have yet to be engineered with decentralization, cryptography, and game theory in mind,\nare breakable and prone to cyber-attacks. Polkadot is basing its resilience on different pillars:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.strong,{children:"Preponderance of light-client usage:"})," Centralized RPC servers are common but susceptible to\nattack and not trustless decentralized entry points to using blockchain-based applications. Light\nclient usage on Polkadot is possible through\n",(0,a.jsx)(n.a,{href:"/docs/build-light-clients#how-to-use-substrate-connect",children:"Smoldot"}),"."]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.strong,{children:"Zero-Knowledge (ZK) Primitives:"})," They can have a problematic effect on censorship and\ncentralization as having a big state transition function boiled down to a single proof of correct\nexecution is not currently a scaling solution to build resilient systems. However, a library of\nrichly featured and high-performance ZK primitives ready for specific use cases is being built.\nThe first use-case will be used to improve privacy for on-chain collectives such as\n",(0,a.jsx)(n.a,{href:"/docs/learn-polkadot-technical-fellowship",children:"the Polkadot Technical Fellowship"}),"."]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsxs)(n.strong,{children:[(0,a.jsx)(n.a,{href:"/docs/learn-safrole",children:"SAFROLE"})," consensus:"]})," New forkless block-production consensus\nalgorithm replacing ",(0,a.jsx)(n.a,{href:"/docs/learn-consensus#block-production-babe",children:"BABE"})," and where block are\nnot produced unless they are expected to be finalized. This will provide several benefits, such\nas:","\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:"Improved security, parachain performance, and UX from being forkless"}),"\n",(0,a.jsx)(n.li,{children:"Preventing front-running attacks through high-performance transaction routing where transactions\nare included in blocks in one hop instead of being gossiped, and transaction encryption."}),"\n"]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.strong,{children:"Internode Mixnet:"})," Shielded transport for short messages that","\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:"avoids leaking IP information for transactions, and"}),"\n",(0,a.jsx)(n.li,{children:"introduces a general messaging system allowing users, chains and off-chain workers, smart\ncontracts, pallets, and anything else existing within a chain to exchange messages containing\nsignatures, intentions, etc."}),"\n"]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.strong,{children:"Social Decentralization:"})," Resilience is achieved by including many participants contributing to\nthe system and coming to decisions through on-chain governance. Involving as many people as\npossible ensures resilience against spending becoming systemically misjudged and appropriately\ndirects wealth for spending treasury funds, salaries, and grants. Another crucial way of\ndecentralizing the network is ensuring experts on which the maintenance of the system relies upon\nare incentivized and recruited over time by the Polkadot network and not by organizations within\nthe Polkadot ecosystem."]}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(d,{...e})}):d(e)}},41938:(e,n,i)=>{i.d(n,{A:()=>a});const a=i.p+"assets/images/core-usage-agile-combined-4ef969fb72931430cf067bccc10c1a73.png"},8420:(e,n,i)=>{i.d(n,{A:()=>a});const a=i.p+"assets/images/core-usage-agile-composable-ee626ebd055fdf3bbd6d88d70bc2c110.png"},62720:(e,n,i)=>{i.d(n,{A:()=>a});const a=i.p+"assets/images/core-usage-agile-compressed-db4821b411e6f4be0c12167d89ee022e.png"},67150:(e,n,i)=>{i.d(n,{A:()=>a});const a=i.p+"assets/images/core-usage-agile-rangeSplit-d8511cbb8658052ac0a639bd6a722982.png"},6923:(e,n,i)=>{i.d(n,{A:()=>a});const a=i.p+"assets/images/core-usage-agile-rangeStrided-605254487f94721806beca92707cfaf3.png"},49984:(e,n,i)=>{i.d(n,{A:()=>a});const a=i.p+"assets/images/core-usage-agile-shared-f395560cce9a4fd4976c5259ce8c67c4.png"},7960:(e,n,i)=>{i.d(n,{A:()=>a});const a=i.p+"assets/images/core-usage-dumb-noAffinity-8d86655d36adc7c8de32114821a1764a.png"},32550:(e,n,i)=>{i.d(n,{A:()=>a});const a=i.p+"assets/images/core-usage-dumb-6419ee60a3606e10d89a1c91dbf24e20.png"},28453:(e,n,i)=>{i.d(n,{R:()=>s,x:()=>r});var a=i(96540);const o={},t=a.createContext(o);function s(e){const n=a.useContext(t);return a.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:s(e.components),a.createElement(t.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/5c6a20c2.772c1458.js b/assets/js/5c6a20c2.772c1458.js new file mode 100644 index 000000000000..c8c011f1e0dc --- /dev/null +++ b/assets/js/5c6a20c2.772c1458.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9349],{97771:(e,o,n)=>{n.r(o),n.d(o,{assets:()=>l,contentTitle:()=>i,default:()=>h,frontMatter:()=>a,metadata:()=>t,toc:()=>c});const t=JSON.parse('{"id":"learn/learn-safrole","title":"Polkadot Block Production: SAFROLE","description":"The Consensus Mechanism of Polkadot.","source":"@site/../docs/learn/learn-safrole.md","sourceDirName":"learn","slug":"/learn-safrole","permalink":"/docs/learn-safrole","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-safrole.md","tags":[],"version":"current","lastUpdatedBy":"bader y","lastUpdatedAt":1719324390000,"frontMatter":{"id":"learn-safrole","title":"Polkadot Block Production: SAFROLE","sidebar_label":"SAFROLE","description":"The Consensus Mechanism of Polkadot.","keywords":["consensus","proof of stake","nominated proof of stake","hybrid consensus","block production","sassafras","safrole","babe"],"slug":"../learn-safrole"},"sidebar":"docs","previous":{"title":"Elastic Scaling","permalink":"/docs/learn-elastic-scaling"},"next":{"title":"JAM","permalink":"/docs/learn-jam"}}');var s=n(74848),r=n(28453);const a={id:"learn-safrole",title:"Polkadot Block Production: SAFROLE",sidebar_label:"SAFROLE",description:"The Consensus Mechanism of Polkadot.",keywords:["consensus","proof of stake","nominated proof of stake","hybrid consensus","block production","sassafras","safrole","babe"],slug:"../learn-safrole"},i=void 0,l={},c=[{value:"Resources",id:"resources",level:2}];function d(e){const o={a:"a",h2:"h2",li:"li",p:"p",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(o.p,{children:["SAFROLE (formerly known as SASSAFRAS) is a SNARK-based block production algorithm that provides\nanonymity in the validator selection process. SAFROLE also aims to deliver (nearly) fork-free,\nconstant time block production. SAFROLE is an upgrade to BABE, the block production portion of the\n",(0,s.jsx)(o.a,{href:"https://wiki.polkadot.network/docs/learn-consensus#hybrid-consensus",children:"hybrid consensus model"})," that\nPolkadot uses (and later JAM)."]}),"\n",(0,s.jsx)(o.p,{children:"zkSNARKs, in conjunction with a RingVRF, are used to ensure that slots are not preassigned to\nmalicious actors that are not part of the active validator set. Using a zkSNARK would allow\nanonymity to be preserved when a validator submits a ticket, proving they are in the active set\nwithout revealing their identity. This solution enables a validator to prove they are part of an\neligible group (via the RingVRF) while preserving anonymity within the block production mechanism\nand preventing the likelihood of spam."}),"\n",(0,s.jsxs)(o.p,{children:["Part of how SAFROLE minimizes the possibility of forks is by limiting the possibility of multiple\nvalid authors per six-second timeslot (the time to produce a block) where a valid, possible author\nmust only be a single key-holder from within a pre-specified group of validators. In other words, it\nlimits the possibility of two heads of the chain (built on the same parent) forming. More on how\nSAFROLE prevents forks can be found in\n",(0,s.jsx)(o.a,{href:"https://graypaper.com/graypaper.pdf",children:"Section 4.3, 4.8, and 6 of the JAM Graypaper."})]}),"\n",(0,s.jsx)(o.h2,{id:"resources",children:"Resources"}),"\n",(0,s.jsxs)(o.ul,{children:["\n",(0,s.jsx)(o.li,{children:(0,s.jsxs)(o.a,{href:"https://graypaper.com/graypaper.pdf",children:["The JAM Graypaper (see: ",(0,s.jsx)(o.strong,{children:"Block Production and Chain Growth"}),")"]})}),"\n",(0,s.jsxs)(o.li,{children:[(0,s.jsx)(o.a,{href:"https://research.web3.foundation/Polkadot/protocols/block-production/SASSAFRAS",children:"Web3 Foundation Research Page (SASSAFRAS)"}),"\nabout SASSAFRAS."]}),"\n"]})]})}function h(e={}){const{wrapper:o}={...(0,r.R)(),...e.components};return o?(0,s.jsx)(o,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},28453:(e,o,n)=>{n.d(o,{R:()=>a,x:()=>i});var t=n(96540);const s={},r=t.createContext(s);function a(e){const o=t.useContext(r);return t.useMemo((function(){return"function"==typeof e?e(o):{...o,...e}}),[o,e])}function i(e){let o;return o=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:a(e.components),t.createElement(r.Provider,{value:o},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/5c6a20c2.9ed9c93e.js b/assets/js/5c6a20c2.9ed9c93e.js deleted file mode 100644 index 596dce8b2512..000000000000 --- a/assets/js/5c6a20c2.9ed9c93e.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9349],{77377:(e,o,n)=>{n.r(o),n.d(o,{assets:()=>l,contentTitle:()=>a,default:()=>h,frontMatter:()=>r,metadata:()=>i,toc:()=>c});var t=n(74848),s=n(28453);const r={id:"learn-safrole",title:"Polkadot Block Production: SAFROLE",sidebar_label:"SAFROLE",description:"The Consensus Mechanism of Polkadot.",keywords:["consensus","proof of stake","nominated proof of stake","hybrid consensus","block production","sassafras","safrole","babe"],slug:"../learn-safrole"},a=void 0,i={id:"learn/learn-safrole",title:"Polkadot Block Production: SAFROLE",description:"The Consensus Mechanism of Polkadot.",source:"@site/../docs/learn/learn-safrole.md",sourceDirName:"learn",slug:"/learn-safrole",permalink:"/docs/learn-safrole",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-safrole.md",tags:[],version:"current",lastUpdatedBy:"bader y",lastUpdatedAt:171932439e4,frontMatter:{id:"learn-safrole",title:"Polkadot Block Production: SAFROLE",sidebar_label:"SAFROLE",description:"The Consensus Mechanism of Polkadot.",keywords:["consensus","proof of stake","nominated proof of stake","hybrid consensus","block production","sassafras","safrole","babe"],slug:"../learn-safrole"},sidebar:"docs",previous:{title:"Elastic Scaling",permalink:"/docs/learn-elastic-scaling"},next:{title:"JAM",permalink:"/docs/learn-jam"}},l={},c=[{value:"Resources",id:"resources",level:2}];function d(e){const o={a:"a",h2:"h2",li:"li",p:"p",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(o.p,{children:["SAFROLE (formerly known as SASSAFRAS) is a SNARK-based block production algorithm that provides\nanonymity in the validator selection process. SAFROLE also aims to deliver (nearly) fork-free,\nconstant time block production. SAFROLE is an upgrade to BABE, the block production portion of the\n",(0,t.jsx)(o.a,{href:"https://wiki.polkadot.network/docs/learn-consensus#hybrid-consensus",children:"hybrid consensus model"})," that\nPolkadot uses (and later JAM)."]}),"\n",(0,t.jsx)(o.p,{children:"zkSNARKs, in conjunction with a RingVRF, are used to ensure that slots are not preassigned to\nmalicious actors that are not part of the active validator set. Using a zkSNARK would allow\nanonymity to be preserved when a validator submits a ticket, proving they are in the active set\nwithout revealing their identity. This solution enables a validator to prove they are part of an\neligible group (via the RingVRF) while preserving anonymity within the block production mechanism\nand preventing the likelihood of spam."}),"\n",(0,t.jsxs)(o.p,{children:["Part of how SAFROLE minimizes the possibility of forks is by limiting the possibility of multiple\nvalid authors per six-second timeslot (the time to produce a block) where a valid, possible author\nmust only be a single key-holder from within a pre-specified group of validators. In other words, it\nlimits the possibility of two heads of the chain (built on the same parent) forming. More on how\nSAFROLE prevents forks can be found in\n",(0,t.jsx)(o.a,{href:"https://graypaper.com/graypaper.pdf",children:"Section 4.3, 4.8, and 6 of the JAM Graypaper."})]}),"\n",(0,t.jsx)(o.h2,{id:"resources",children:"Resources"}),"\n",(0,t.jsxs)(o.ul,{children:["\n",(0,t.jsx)(o.li,{children:(0,t.jsxs)(o.a,{href:"https://graypaper.com/graypaper.pdf",children:["The JAM Graypaper (see: ",(0,t.jsx)(o.strong,{children:"Block Production and Chain Growth"}),")"]})}),"\n",(0,t.jsxs)(o.li,{children:[(0,t.jsx)(o.a,{href:"https://research.web3.foundation/Polkadot/protocols/block-production/SASSAFRAS",children:"Web3 Foundation Research Page (SASSAFRAS)"}),"\nabout SASSAFRAS."]}),"\n"]})]})}function h(e={}){const{wrapper:o}={...(0,s.R)(),...e.components};return o?(0,t.jsx)(o,{...e,children:(0,t.jsx)(d,{...e})}):d(e)}},28453:(e,o,n)=>{n.d(o,{R:()=>a,x:()=>i});var t=n(96540);const s={},r=t.createContext(s);function a(e){const o=t.useContext(r);return t.useMemo((function(){return"function"==typeof e?e(o):{...o,...e}}),[o,e])}function i(e){let o;return o=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:a(e.components),t.createElement(r.Provider,{value:o},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/5c90fc9b.c4e67f55.js b/assets/js/5c90fc9b.c4e67f55.js new file mode 100644 index 000000000000..908e080fcc73 --- /dev/null +++ b/assets/js/5c90fc9b.c4e67f55.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3708],{91519:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>a,default:()=>d,frontMatter:()=>r,metadata:()=>i,toc:()=>l});const i=JSON.parse('{"id":"learn/xcm/executor_config/learn-xcm-docs-config-deep-dive","title":"Executor Configuration","description":"Deep Dive into the Configuration of the XCM-Executor.","source":"@site/../docs/learn/xcm/executor_config/config.md","sourceDirName":"learn/xcm/executor_config","slug":"/learn/xcm/config-deep-dive","permalink":"/docs/learn/xcm/config-deep-dive","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/xcm/executor_config/config.md","tags":[],"version":"current","lastUpdatedBy":"gui","lastUpdatedAt":1712067554000,"frontMatter":{"id":"learn-xcm-docs-config-deep-dive","title":"Executor Configuration","sidebar_label":"Executor Configuration","description":"Deep Dive into the Configuration of the XCM-Executor.","keywords":["xcm","cross-consensus messaging","config"],"slug":"../config-deep-dive"},"sidebar":"docs","previous":{"title":"Channels and Bridges","permalink":"/docs/learn/xcm/journey-channels"},"next":{"title":"Testing","permalink":"/docs/learn/xcm/testing"}}');var s=t(74848),o=t(28453);const r={id:"learn-xcm-docs-config-deep-dive",title:"Executor Configuration",sidebar_label:"Executor Configuration",description:"Deep Dive into the Configuration of the XCM-Executor.",keywords:["xcm","cross-consensus messaging","config"],slug:"../config-deep-dive"},a="Executor Config",c={},l=[{value:"XCM Executor Configuration",id:"xcm-executor-configuration",level:2},{value:"How to use multiple implementations.",id:"how-to-use-multiple-implementations",level:2},{value:"Config Items",id:"config-items",level:2},{value:"RuntimeCall",id:"runtimecall",level:3},{value:"XcmSender",id:"xcmsender",level:3},{value:"AssetTransactor",id:"assettransactor",level:3},{value:"OriginConverter",id:"originconverter",level:3},{value:"IsReserve",id:"isreserve",level:3},{value:"IsTeleporter",id:"isteleporter",level:3},{value:"UniversalLocation",id:"universallocation",level:3},{value:"Barrier",id:"barrier",level:3},{value:"Weigher",id:"weigher",level:3},{value:"Trader",id:"trader",level:3},{value:"ResponseHandler",id:"responsehandler",level:3},{value:"AssetTrap",id:"assettrap",level:3},{value:"AssetClaims",id:"assetclaims",level:3},{value:"AssetLocker",id:"assetlocker",level:3},{value:"AssetExchanger",id:"assetexchanger",level:3},{value:"SubscriptionService",id:"subscriptionservice",level:3},{value:"PalletInstancesInfo",id:"palletinstancesinfo",level:3},{value:"MaxAssetsIntoHolding",id:"maxassetsintoholding",level:3},{value:"FeeManager",id:"feemanager",level:3},{value:"MessageExporter",id:"messageexporter",level:3},{value:"UniversalAliases",id:"universalaliases",level:3},{value:"CallDispatcher",id:"calldispatcher",level:3},{value:"SafeCallFilter",id:"safecallfilter",level:3},{value:"What Next",id:"what-next",level:2}];function h(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",p:"p",pre:"pre",...(0,o.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"executor-config",children:"Executor Config"})}),"\n",(0,s.jsx)(n.p,{children:"As previously mentioned, the xcm-executor is a Cross-Consensus Virtual Machine (XCVM)\nimplementation. It provides an opinionated interpretation and execution of XCMs. Each chain that\nuses the xcm-executor, can configure it for their use case. In this chapter we will go over this\nconfiguration, explain each config item and give some examples of the tools and types that can be\nused to configure these items."}),"\n",(0,s.jsx)(n.h2,{id:"xcm-executor-configuration",children:"XCM Executor Configuration"}),"\n",(0,s.jsxs)(n.p,{children:["Below we list the ",(0,s.jsx)(n.a,{href:"https://paritytech.github.io/polkadot/doc/xcm_executor/trait.Config.html",children:"Config"}),"\ntrait of the xcm-executor. The Config trait expects multiple associated types. Each type has a trait\nbound which the concrete type must implement. Some of these types will use a default implementation\nin most situations (e.g. RuntimeCall). Other types have a default implementation specified by the\nunit type ",(0,s.jsx)(n.code,{children:"()"}),". Most types you'll want to carefully choose which implementation they get. For most\nof these types there are pre-defined solutions and building blocks you can use and adapt to your\nscenario. These solutions are listed in the xcm-builder\n",(0,s.jsx)(n.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/polkadot/xcm/xcm-builder/src",children:"folder"}),"."]}),"\n",(0,s.jsx)(n.p,{children:"We will now explain each type and go over some of the implementations of the type:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-rust,",metastring:"noplayground",children:"/// The trait to parameterize the `XcmExecutor`.\npub trait Config {\n\ttype RuntimeCall: Parameter + Dispatchable + GetDispatchInfo;\n\ttype XcmSender: SendXcm;\n\ttype AssetTransactor: TransactAsset;\n\ttype OriginConverter: ConvertOrigin<::RuntimeOrigin>;\n\ttype IsReserve: ContainsPair;\n\ttype IsTeleporter: ContainsPair;\n\ttype UniversalLocation: Get;\n\ttype Barrier: ShouldExecute;\n\ttype Weigher: WeightBounds;\n\ttype Trader: WeightTrader;\n\ttype ResponseHandler: OnResponse;\n\ttype AssetTrap: DropAssets;\n\ttype AssetClaims: ClaimAssets;\n\ttype AssetLocker: AssetLock;\n\ttype AssetExchanger: AssetExchange;\n\ttype SubscriptionService: VersionChangeNotifier;\n\ttype PalletInstancesInfo: PalletsInfoAccess;\n\ttype MaxAssetsIntoHolding: Get;\n\ttype FeeManager: FeeManager;\n\ttype MessageExporter: ExportXcm;\n\ttype UniversalAliases: Contains<(MultiLocation, Junction)>;\n\ttype CallDispatcher: CallDispatcher;\n\ttype SafeCallFilter: Contains;\n}\n"})}),"\n",(0,s.jsx)(n.h2,{id:"how-to-use-multiple-implementations",children:"How to use multiple implementations."}),"\n",(0,s.jsxs)(n.p,{children:["Some associated types in the Config trait are highly configurable and in certain cases will have\nmultiple implementations (e.g. Barrier). These implementations are then grouped using a tuple\n",(0,s.jsx)(n.code,{children:"(impl_1, impl_2, ..., impl_n)"}),". The execution of the tuple type is sequential, meaning that each\nitem is executed one after another. Each item is checked to see whether it fails to pass, then the\nnext item is checked, and so on. The execution is halted when one of these items returns positive\n(Ok or true, etc.). The next example of the Barrier type shows how the grouping works (understanding\neach item in the tuple is not necessary)."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-rust",children:"pub type Barrier = (\n\tTakeWeightCredit,\n\tAllowTopLevelPaidExecutionFrom,\n\tAllowKnownQueryResponses,\n\tAllowSubscriptionsFrom,\n);\n\npub struct XcmConfig;\nimpl xcm_executor::Config for XcmConfig {\n ...\n\ttype Barrier = Barrier;\n ...\n}\n"})}),"\n",(0,s.jsxs)(n.p,{children:["In the above example, when checking the barrier, we'll first check the TakeWeightCredit type. If it\nfails, we'll go on to check the ",(0,s.jsx)(n.code,{children:"AllowTopLevelPaidExecutionFrom"})," and so on until one of\nthem gives a positive. If they all fail, a ",(0,s.jsx)(n.code,{children:"Barrier"})," error is thrown."]}),"\n",(0,s.jsx)(n.h2,{id:"config-items",children:"Config Items"}),"\n",(0,s.jsx)(n.p,{children:"We now go over each config item to explain what the associate type does and how it is used in the\nxcm-executor. Many of these types have pre-defined solutions that can be found in the xcm-builder\nand a good way to understand these configurations is to look at example configurations. On the\nbottom of this page we listed some examples."}),"\n",(0,s.jsx)(n.h3,{id:"runtimecall",children:"RuntimeCall"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"RuntimeCall"})," type is equal to the RuntimeCall created in the ",(0,s.jsx)(n.code,{children:"construct_runtime!"})," macro. It is\nan enum of all the callable functions of each of the implemented pallets."]}),"\n",(0,s.jsx)(n.h3,{id:"xcmsender",children:"XcmSender"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"XcmSender"})," type implements the ",(0,s.jsx)(n.code,{children:"SendXcm"})," trait, and defines how the xcm_executor can send XCMs\n(which transport layer it can use for the XCMs). This type normally implements a tuple for one or\nmore ",(0,s.jsx)(n.a,{href:"https://wiki.polkadot.network/docs/learn-xcm-transport",children:"transport layer(s)"}),". For example a\nparachain can implement the XcmSender as:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-rust",children:" (\n\t// Two routers - use UMP to communicate with the relay chain:\n\tcumulus_primitives_utility::ParentAsUmp,\n\t// ..and XCMP to communicate with the sibling chains.\n\tXcmpQueue,\n);\n"})}),"\n",(0,s.jsx)(n.p,{children:"If a runtime does not contain the XcmpQueue pallet as a config item for XcmSender, it will not be\nable to send messages to other parachains. This can be useful for controlling the destinations that\nan XCM can be sent to."}),"\n",(0,s.jsx)(n.h3,{id:"assettransactor",children:"AssetTransactor"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"AssetTransactor"})," type implements the ",(0,s.jsx)(n.code,{children:"TransactAsset"})," trait and defines how the xcm-executor can\nconvert ",(0,s.jsx)(n.code,{children:"MultiAsset"}),"s from and to on chain assets and how to transfer these assets between accounts,\nor from and to the holding register. As chains can support different types of currencies (native\ntokens), fungibles and non-fungibles, we can configure the AssetTransactor in different ways,\ndepending on the chains implementation fo these types. Three default implementations are provided in\nthe xcm-builder, namely the ",(0,s.jsx)(n.code,{children:"CurrencyAdapter"}),", ",(0,s.jsx)(n.code,{children:"FungiblesAdapter"})," and ",(0,s.jsx)(n.code,{children:"NonFungiblesAdapter"}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"originconverter",children:"OriginConverter"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"OriginConverter"})," type implements the ",(0,s.jsx)(n.code,{children:"ConvertOrigin"})," trait and defines how the xcm-executor can\nconvert a ",(0,s.jsx)(n.code,{children:"MultiLocation"})," into a ",(0,s.jsx)(n.code,{children:"RuntimeOrigin"}),". Most xcm-executors take multiple implementations\nin a tuple for this configuration as there are many different MLs we would like to convert. When\nmultiple ",(0,s.jsx)(n.code,{children:"OriginConverter"}),"s conflict, the\n",(0,s.jsx)(n.a,{href:"https://paritytech.github.io/polkadot/doc/xcm/v2/enum.OriginKind.html",children:"OriginKind"})," that is passed\nto the ",(0,s.jsx)(n.code,{children:"convert_origin"})," function is used to distingues which ",(0,s.jsx)(n.code,{children:"OriginConverter"})," to use. There are\nfour different ",(0,s.jsx)(n.code,{children:"OriginKind"}),"s :"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-rust",children:"pub enum OriginKind {\n\tNative,\n\tSovereignAccount,\n\tSuperuser,\n\tXcm,\n}\n"})}),"\n",(0,s.jsxs)(n.p,{children:["An example of the use of ",(0,s.jsx)(n.code,{children:"OriginKind"}),"s are the ",(0,s.jsx)(n.code,{children:"SovereignSignedViaLocation"})," and\n",(0,s.jsx)(n.code,{children:"SignedAccountId32AsNative"})," OriginConverters (defined in xcm-builder). The first converts an\nsovereign account into a ",(0,s.jsx)(n.code,{children:"Signed"})," RuntimeOrigin (uses ",(0,s.jsx)(n.code,{children:"SovereignAccount"})," OriginKind) while the\nsecond converts a local native account into a ",(0,s.jsx)(n.code,{children:"Signed"})," RuntimeOrigin (uses ",(0,s.jsx)(n.code,{children:"Native"})," OriginKind)."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-rust",children:"pub type SovereignAccountOf = AccountId32Aliases;\n(\n\t// A `Signed` origin of the sovereign account that the original location controls.\n\tSovereignSignedViaLocation,\n\t// The AccountId32 location type can be expressed natively as a `Signed` origin.\n\tSignedAccountId32AsNative,\n);\n\n"})}),"\n",(0,s.jsx)(n.h3,{id:"isreserve",children:"IsReserve"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"IsReserve"})," type must be set to specify which ",(0,s.jsx)(n.code,{children:""})," pair we trust to\ndeposit reserve assets on our chain. We can also use the unit type ",(0,s.jsx)(n.code,{children:"()"})," to block\n",(0,s.jsx)(n.code,{children:"ReserveAssetDeposited"})," instructions. An example implementation is the ",(0,s.jsx)(n.code,{children:"NativeAsset"})," struct, that\naccepts an asset iff it is a native asset."]}),"\n",(0,s.jsx)(n.h3,{id:"isteleporter",children:"IsTeleporter"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"IsTeleporter"})," type must be set to specify which ",(0,s.jsx)(n.code,{children:""})," pair we trust to\nteleport assets to our chain. We can also use the unit type ",(0,s.jsx)(n.code,{children:"()"})," to block ",(0,s.jsx)(n.code,{children:"ReceiveTeleportedAssets"}),"\ninstruction. An example implementation is the ",(0,s.jsx)(n.code,{children:"NativeAsset"})," struct, that accepts an asset iff it is\na native asset."]}),"\n",(0,s.jsx)(n.h3,{id:"universallocation",children:"UniversalLocation"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"UniversalLocation"})," type describes the location of the runtime implementing the xcm-executor in\nthe consensus universe. Below we give some examples of ",(0,s.jsx)(n.code,{children:"UniversalLocation"})," implementations."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-rust",children:"//Polkadot\nX1(GlobalConsensus(NetworkId::Polkadot))\n//Kusama\nX1(GlobalConsensus(NetworkId::Kusama))\n//Statemint\nX2(GlobalConsensus(NetworkId::Polkadot), Parachain(1000))\n"})}),"\n",(0,s.jsx)(n.h3,{id:"barrier",children:"Barrier"}),"\n",(0,s.jsxs)(n.p,{children:["Before any XCMs are executed in the XCM executor, they need to pass the ",(0,s.jsx)(n.code,{children:"Barrier"}),". The ",(0,s.jsx)(n.code,{children:"Barrier"}),"\ntype implements the ",(0,s.jsx)(n.code,{children:"ShouldExecute"})," trait and can be seen as the firewall of the xcm-executor. Each\ntime the xcm-executor receives an XCM, it check with the barrier if the XCM should be executed. We\ncan also define multiple barriers for our ",(0,s.jsx)(n.code,{children:"Barrier"})," type by using a tuple. During execution, each\nbarrier is checks, and if one of them succeed, the XCM is executed. Example of a ",(0,s.jsx)(n.code,{children:"Barrier"}),"\nimplementations is ",(0,s.jsx)(n.code,{children:"AllowTopLevelPaidExecutionFrom"})," that accepts the XCM if the ",(0,s.jsx)(n.code,{children:"T"})," contains the\norigin of the XCM and the XCM contains the ",(0,s.jsx)(n.code,{children:"BuyExecution"})," instruction. To accept all XCMs that pay\nfor execution we could set the barrier to ",(0,s.jsx)(n.code,{children:"AllowTopLevelPaidExecutionFrom"}),". There are\nmultiple pre-defined barrier implementations in the xcm-builder."]}),"\n",(0,s.jsx)(n.h3,{id:"weigher",children:"Weigher"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"Weigher"})," is responsible for weighing full XCMs and individual instructions. This weight is\ncalculated before the XCM execution, and this calculated weight is checked against the weight_limit.\nIf the weight is more than weight_limit, the xcm will not be executed. The weight is also passed to\neach ",(0,s.jsx)(n.code,{children:"Barrier"}),", as certain barriers execute weight-based checks. After the execution of the XCM,\nunused weight is refunded (if possible). There are pre-defined ",(0,s.jsx)(n.code,{children:"Weigher"})," solutions in the\nxcm-builder. The most used is the ",(0,s.jsx)(n.code,{children:"FixedWeightBounds"}),":"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-rust",children:"// BaseXcmWeight is a const weight.\nFixedWeightBounds;\n"})}),"\n",(0,s.jsxs)(n.p,{children:["Note: ",(0,s.jsx)(n.a,{href:"/docs/learn/xcm/fundamentals-fees",children:"More information"})," about weight."]}),"\n",(0,s.jsx)(n.h3,{id:"trader",children:"Trader"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"Trader"})," type is responsible for buying weight in the ",(0,s.jsx)(n.code,{children:"BuyExecution"})," instruction using assets in\nthe holding register and to refund unspend weight. One of the first implementations of the ",(0,s.jsx)(n.code,{children:"Trader"}),"\nis defined in the xcm-builder, namely the ",(0,s.jsx)(n.code,{children:"UsingComponents"})," trader."]}),"\n",(0,s.jsx)(n.h3,{id:"responsehandler",children:"ResponseHandler"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"ResponseHandler"})," type is responsible for handling the ",(0,s.jsx)(n.code,{children:"QueryResponse"})," instructions. A\n",(0,s.jsx)(n.code,{children:"ResponseHandler"})," implementation has to implement the ",(0,s.jsx)(n.code,{children:"OnResponse"})," trait. One of the implementations\nof the ",(0,s.jsx)(n.code,{children:"ResponseHandler"})," is the ",(0,s.jsx)(n.code,{children:"pallet-xcm"}),". This will be the main implementation for most\nFRAME-based systems that implement the XCM-executor. Another option is to use the unit type ",(0,s.jsx)(n.code,{children:"()"})," if\nyou do not want to support ",(0,s.jsx)(n.code,{children:"QueryResponse"}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"assettrap",children:"AssetTrap"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"AssetTrap"})," type is responsible for handling the funds left over in holding after the execution\nof the XCM. The assets are stored in the AssetTrap and can be claimed using the ClaimAsset\ninstruction. One of the implementations of the ",(0,s.jsx)(n.code,{children:"AssetTrap"})," type is the ",(0,s.jsx)(n.code,{children:"pallet-xcm"}),". Another option\nis to use the unit type ",(0,s.jsx)(n.code,{children:"()"})," if you do not want to support asset trapping. In this case, the assets\nthat are left in holding are burned."]}),"\n",(0,s.jsx)(n.h3,{id:"assetclaims",children:"AssetClaims"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"AssetClaims"})," type is responsible for claiming trapped assets. It is during execution of the\n",(0,s.jsx)(n.code,{children:"ClaimAsset"})," instruction. One of the implementations of the ",(0,s.jsx)(n.code,{children:"AssetClaims"})," type is the ",(0,s.jsx)(n.code,{children:"pallet-xcm"}),".\nAnother option is to use the unit type ",(0,s.jsx)(n.code,{children:"()"})," if you do not want to support asset claiming."]}),"\n",(0,s.jsx)(n.h3,{id:"assetlocker",children:"AssetLocker"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"AssetLocker"})," type is responsible with handling locking and unlocking assets. One of the\nimplementations of the ",(0,s.jsx)(n.code,{children:"AssetLocker"})," type is the ",(0,s.jsx)(n.code,{children:"pallet-xcm"}),". Another option is to use the unit\ntype ",(0,s.jsx)(n.code,{children:"()"})," if you do not want to support asset locking."]}),"\n",(0,s.jsx)(n.h3,{id:"assetexchanger",children:"AssetExchanger"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"AssetExchanger"})," type implements the ",(0,s.jsx)(n.code,{children:"AssetExchange"})," trait and handles the exchange of assets\nfor the ExchangeAsset instruction. An option is to use the unit type ",(0,s.jsx)(n.code,{children:"()"})," if you do not want to\nsupport asset exchanging."]}),"\n",(0,s.jsx)(n.h3,{id:"subscriptionservice",children:"SubscriptionService"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"SubscriptionService"})," type implements the ",(0,s.jsx)(n.code,{children:"VersionChangeNotifier"})," trait and is used for the\nexecution of the (Un)SubscribeVersion instructions. When a chain receives the ",(0,s.jsx)(n.code,{children:"SubscribeVersion"}),"\ninstruction, the ",(0,s.jsx)(n.code,{children:"SubscriptionService"})," should send back a ",(0,s.jsx)(n.code,{children:"QueryResponse"})," with the XCM version that\nthe chain uses. One of the implementations of the ",(0,s.jsx)(n.code,{children:"SubscriptionService"})," is the ",(0,s.jsx)(n.code,{children:"pallet-xcm"}),". This\nwill be the main implementation for most FRAME-based systems that implement the XCM-executor."]}),"\n",(0,s.jsx)(n.h3,{id:"palletinstancesinfo",children:"PalletInstancesInfo"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"PalletInstancesInfo"})," type implements the ",(0,s.jsx)(n.code,{children:"PalletsInfoAccess"})," trait and is used in the\n",(0,s.jsx)(n.code,{children:"QueryPallet"})," and ",(0,s.jsx)(n.code,{children:"ExpectPallet"})," instructions. It supplies the information of all the pallets in the\nRuntime, and is therefore FRAME specific. The unit type ",(0,s.jsx)(n.code,{children:"()"})," can be used if you do not want to\nsupport pallet information."]}),"\n",(0,s.jsx)(n.h3,{id:"maxassetsintoholding",children:"MaxAssetsIntoHolding"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"MaxAssetsIntoHolding"})," type is used to set a limit on the number of assets in the Holding\nRegister. In the worse case, the Holding Register may contain up to twice as many assets as this\nlimit."]}),"\n",(0,s.jsx)(n.h3,{id:"feemanager",children:"FeeManager"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"FeeManager"})," type is used to manage what happens with the fees that need to be paid for certain\nXCM instructions. A ",(0,s.jsx)(n.code,{children:"FeeManager"})," implementation implements the ",(0,s.jsx)(n.code,{children:"FeeManager"})," trait. The FeeManager\ndetermines if fees should be paid (or if they are waived) and what to do with the paid fees. The\nunit type ",(0,s.jsx)(n.code,{children:"()"})," can be used if you want to waive every fee."]}),"\n",(0,s.jsx)(n.h3,{id:"messageexporter",children:"MessageExporter"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"MessageExporter"})," type implements the ",(0,s.jsx)(n.code,{children:"ExportXcm"})," trait and is used to export a message to\nanother consensus system. The ",(0,s.jsx)(n.code,{children:"MessageExporter"})," is different from the ",(0,s.jsx)(n.code,{children:"XcmSender"}),". The\n",(0,s.jsx)(n.code,{children:"MessageExporter"})," is able to spoof the origin of the message, meaning it can represent a different\norigin then the local (i.e. the caller chain's) location. The MessageExporter will mainly be used to\nsend XCMs over bridges. For a more in depth explanation, see the\n",(0,s.jsx)(n.a,{href:"https://paritytech.github.io/polkadot/doc/xcm_executor/traits/trait.ExportXcm.html",children:"ExportXcm trait"}),".\nThe unit type ",(0,s.jsx)(n.code,{children:"()"})," can be used if you do not want to support XCM exporting."]}),"\n",(0,s.jsx)(n.h3,{id:"universalaliases",children:"UniversalAliases"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"UniversalAliases"})," type is used to list the origin locations and specific universal junctions to\nwhich they are allowed to elevate themselves. ",(0,s.jsx)(n.code,{children:"UniversalAliases"})," is used in the ",(0,s.jsx)(n.code,{children:"UniversalOrigin"}),"\ninstruction. To not allow any alliasing of origins, ",(0,s.jsx)(n.code,{children:"Nothing"})," can be used."]}),"\n",(0,s.jsx)(n.h3,{id:"calldispatcher",children:"CallDispatcher"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"CallDispatcher"})," type is used by xcm-executor to dispatch calls that are passed in the\n",(0,s.jsx)(n.code,{children:"Transact"})," instruction with the given origin. When no special call dispatcher is required, this can\nbe set to the same type as ",(0,s.jsx)(n.code,{children:"RuntimeCall"}),". However, ",(0,s.jsx)(n.code,{children:"CallDispatcher"})," can be used to customize call\ndispatch, such as adapting the origin based on the call or modifying the call."]}),"\n",(0,s.jsx)(n.h3,{id:"safecallfilter",children:"SafeCallFilter"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"SafeCallFilter"})," type is used by the xcm-executor to whitelist calls that can be made in the\n",(0,s.jsx)(n.code,{children:"Transact"})," instruction. This is a temporary measure until proof size weights for XCM instructions\nare properly account for. If you want to allow all calls in ",(0,s.jsx)(n.code,{children:"Tansact"}),", use ",(0,s.jsx)(n.code,{children:"Everything"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"what-next",children:"What Next"}),"\n",(0,s.jsxs)(n.p,{children:["Check out the\n",(0,s.jsx)(n.a,{href:"https://github.com/polkadot-fellows/runtimes/blob/main/relay/kusama/src/xcm_config.rs",children:"Kusama"}),",\n",(0,s.jsx)(n.a,{href:"https://github.com/polkadot-fellows/runtimes/blob/main/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs",children:"Statemine"}),",\nor ",(0,s.jsx)(n.a,{href:"https://github.com/paritytech/trappist/blob/main/runtime/trappist/src/xcm_config.rs",children:"Trappist"}),"\nfor examples of how to implement the xcm-executor config."]})]})}function d(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}},28453:(e,n,t)=>{t.d(n,{R:()=>r,x:()=>a});var i=t(96540);const s={},o=i.createContext(s);function r(e){const n=i.useContext(o);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:r(e.components),i.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/5c90fc9b.dc915915.js b/assets/js/5c90fc9b.dc915915.js deleted file mode 100644 index ca4a3dffcada..000000000000 --- a/assets/js/5c90fc9b.dc915915.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3708],{52012:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>r,default:()=>d,frontMatter:()=>o,metadata:()=>a,toc:()=>l});var i=t(74848),s=t(28453);const o={id:"learn-xcm-docs-config-deep-dive",title:"Executor Configuration",sidebar_label:"Executor Configuration",description:"Deep Dive into the Configuration of the XCM-Executor.",keywords:["xcm","cross-consensus messaging","config"],slug:"../config-deep-dive"},r="Executor Config",a={id:"learn/xcm/executor_config/learn-xcm-docs-config-deep-dive",title:"Executor Configuration",description:"Deep Dive into the Configuration of the XCM-Executor.",source:"@site/../docs/learn/xcm/executor_config/config.md",sourceDirName:"learn/xcm/executor_config",slug:"/learn/xcm/config-deep-dive",permalink:"/docs/learn/xcm/config-deep-dive",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/xcm/executor_config/config.md",tags:[],version:"current",lastUpdatedBy:"gui",lastUpdatedAt:1712067554e3,frontMatter:{id:"learn-xcm-docs-config-deep-dive",title:"Executor Configuration",sidebar_label:"Executor Configuration",description:"Deep Dive into the Configuration of the XCM-Executor.",keywords:["xcm","cross-consensus messaging","config"],slug:"../config-deep-dive"},sidebar:"docs",previous:{title:"Channels and Bridges",permalink:"/docs/learn/xcm/journey-channels"},next:{title:"Testing",permalink:"/docs/learn/xcm/testing"}},c={},l=[{value:"XCM Executor Configuration",id:"xcm-executor-configuration",level:2},{value:"How to use multiple implementations.",id:"how-to-use-multiple-implementations",level:2},{value:"Config Items",id:"config-items",level:2},{value:"RuntimeCall",id:"runtimecall",level:3},{value:"XcmSender",id:"xcmsender",level:3},{value:"AssetTransactor",id:"assettransactor",level:3},{value:"OriginConverter",id:"originconverter",level:3},{value:"IsReserve",id:"isreserve",level:3},{value:"IsTeleporter",id:"isteleporter",level:3},{value:"UniversalLocation",id:"universallocation",level:3},{value:"Barrier",id:"barrier",level:3},{value:"Weigher",id:"weigher",level:3},{value:"Trader",id:"trader",level:3},{value:"ResponseHandler",id:"responsehandler",level:3},{value:"AssetTrap",id:"assettrap",level:3},{value:"AssetClaims",id:"assetclaims",level:3},{value:"AssetLocker",id:"assetlocker",level:3},{value:"AssetExchanger",id:"assetexchanger",level:3},{value:"SubscriptionService",id:"subscriptionservice",level:3},{value:"PalletInstancesInfo",id:"palletinstancesinfo",level:3},{value:"MaxAssetsIntoHolding",id:"maxassetsintoholding",level:3},{value:"FeeManager",id:"feemanager",level:3},{value:"MessageExporter",id:"messageexporter",level:3},{value:"UniversalAliases",id:"universalaliases",level:3},{value:"CallDispatcher",id:"calldispatcher",level:3},{value:"SafeCallFilter",id:"safecallfilter",level:3},{value:"What Next",id:"what-next",level:2}];function h(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",p:"p",pre:"pre",...(0,s.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.header,{children:(0,i.jsx)(n.h1,{id:"executor-config",children:"Executor Config"})}),"\n",(0,i.jsx)(n.p,{children:"As previously mentioned, the xcm-executor is a Cross-Consensus Virtual Machine (XCVM)\nimplementation. It provides an opinionated interpretation and execution of XCMs. Each chain that\nuses the xcm-executor, can configure it for their use case. In this chapter we will go over this\nconfiguration, explain each config item and give some examples of the tools and types that can be\nused to configure these items."}),"\n",(0,i.jsx)(n.h2,{id:"xcm-executor-configuration",children:"XCM Executor Configuration"}),"\n",(0,i.jsxs)(n.p,{children:["Below we list the ",(0,i.jsx)(n.a,{href:"https://paritytech.github.io/polkadot/doc/xcm_executor/trait.Config.html",children:"Config"}),"\ntrait of the xcm-executor. The Config trait expects multiple associated types. Each type has a trait\nbound which the concrete type must implement. Some of these types will use a default implementation\nin most situations (e.g. RuntimeCall). Other types have a default implementation specified by the\nunit type ",(0,i.jsx)(n.code,{children:"()"}),". Most types you'll want to carefully choose which implementation they get. For most\nof these types there are pre-defined solutions and building blocks you can use and adapt to your\nscenario. These solutions are listed in the xcm-builder\n",(0,i.jsx)(n.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/polkadot/xcm/xcm-builder/src",children:"folder"}),"."]}),"\n",(0,i.jsx)(n.p,{children:"We will now explain each type and go over some of the implementations of the type:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-rust,",metastring:"noplayground",children:"/// The trait to parameterize the `XcmExecutor`.\npub trait Config {\n\ttype RuntimeCall: Parameter + Dispatchable + GetDispatchInfo;\n\ttype XcmSender: SendXcm;\n\ttype AssetTransactor: TransactAsset;\n\ttype OriginConverter: ConvertOrigin<::RuntimeOrigin>;\n\ttype IsReserve: ContainsPair;\n\ttype IsTeleporter: ContainsPair;\n\ttype UniversalLocation: Get;\n\ttype Barrier: ShouldExecute;\n\ttype Weigher: WeightBounds;\n\ttype Trader: WeightTrader;\n\ttype ResponseHandler: OnResponse;\n\ttype AssetTrap: DropAssets;\n\ttype AssetClaims: ClaimAssets;\n\ttype AssetLocker: AssetLock;\n\ttype AssetExchanger: AssetExchange;\n\ttype SubscriptionService: VersionChangeNotifier;\n\ttype PalletInstancesInfo: PalletsInfoAccess;\n\ttype MaxAssetsIntoHolding: Get;\n\ttype FeeManager: FeeManager;\n\ttype MessageExporter: ExportXcm;\n\ttype UniversalAliases: Contains<(MultiLocation, Junction)>;\n\ttype CallDispatcher: CallDispatcher;\n\ttype SafeCallFilter: Contains;\n}\n"})}),"\n",(0,i.jsx)(n.h2,{id:"how-to-use-multiple-implementations",children:"How to use multiple implementations."}),"\n",(0,i.jsxs)(n.p,{children:["Some associated types in the Config trait are highly configurable and in certain cases will have\nmultiple implementations (e.g. Barrier). These implementations are then grouped using a tuple\n",(0,i.jsx)(n.code,{children:"(impl_1, impl_2, ..., impl_n)"}),". The execution of the tuple type is sequential, meaning that each\nitem is executed one after another. Each item is checked to see whether it fails to pass, then the\nnext item is checked, and so on. The execution is halted when one of these items returns positive\n(Ok or true, etc.). The next example of the Barrier type shows how the grouping works (understanding\neach item in the tuple is not necessary)."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-rust",children:"pub type Barrier = (\n\tTakeWeightCredit,\n\tAllowTopLevelPaidExecutionFrom,\n\tAllowKnownQueryResponses,\n\tAllowSubscriptionsFrom,\n);\n\npub struct XcmConfig;\nimpl xcm_executor::Config for XcmConfig {\n ...\n\ttype Barrier = Barrier;\n ...\n}\n"})}),"\n",(0,i.jsxs)(n.p,{children:["In the above example, when checking the barrier, we'll first check the TakeWeightCredit type. If it\nfails, we'll go on to check the ",(0,i.jsx)(n.code,{children:"AllowTopLevelPaidExecutionFrom"})," and so on until one of\nthem gives a positive. If they all fail, a ",(0,i.jsx)(n.code,{children:"Barrier"})," error is thrown."]}),"\n",(0,i.jsx)(n.h2,{id:"config-items",children:"Config Items"}),"\n",(0,i.jsx)(n.p,{children:"We now go over each config item to explain what the associate type does and how it is used in the\nxcm-executor. Many of these types have pre-defined solutions that can be found in the xcm-builder\nand a good way to understand these configurations is to look at example configurations. On the\nbottom of this page we listed some examples."}),"\n",(0,i.jsx)(n.h3,{id:"runtimecall",children:"RuntimeCall"}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.code,{children:"RuntimeCall"})," type is equal to the RuntimeCall created in the ",(0,i.jsx)(n.code,{children:"construct_runtime!"})," macro. It is\nan enum of all the callable functions of each of the implemented pallets."]}),"\n",(0,i.jsx)(n.h3,{id:"xcmsender",children:"XcmSender"}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.code,{children:"XcmSender"})," type implements the ",(0,i.jsx)(n.code,{children:"SendXcm"})," trait, and defines how the xcm_executor can send XCMs\n(which transport layer it can use for the XCMs). This type normally implements a tuple for one or\nmore ",(0,i.jsx)(n.a,{href:"https://wiki.polkadot.network/docs/learn-xcm-transport",children:"transport layer(s)"}),". For example a\nparachain can implement the XcmSender as:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-rust",children:" (\n\t// Two routers - use UMP to communicate with the relay chain:\n\tcumulus_primitives_utility::ParentAsUmp,\n\t// ..and XCMP to communicate with the sibling chains.\n\tXcmpQueue,\n);\n"})}),"\n",(0,i.jsx)(n.p,{children:"If a runtime does not contain the XcmpQueue pallet as a config item for XcmSender, it will not be\nable to send messages to other parachains. This can be useful for controlling the destinations that\nan XCM can be sent to."}),"\n",(0,i.jsx)(n.h3,{id:"assettransactor",children:"AssetTransactor"}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.code,{children:"AssetTransactor"})," type implements the ",(0,i.jsx)(n.code,{children:"TransactAsset"})," trait and defines how the xcm-executor can\nconvert ",(0,i.jsx)(n.code,{children:"MultiAsset"}),"s from and to on chain assets and how to transfer these assets between accounts,\nor from and to the holding register. As chains can support different types of currencies (native\ntokens), fungibles and non-fungibles, we can configure the AssetTransactor in different ways,\ndepending on the chains implementation fo these types. Three default implementations are provided in\nthe xcm-builder, namely the ",(0,i.jsx)(n.code,{children:"CurrencyAdapter"}),", ",(0,i.jsx)(n.code,{children:"FungiblesAdapter"})," and ",(0,i.jsx)(n.code,{children:"NonFungiblesAdapter"}),"."]}),"\n",(0,i.jsx)(n.h3,{id:"originconverter",children:"OriginConverter"}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.code,{children:"OriginConverter"})," type implements the ",(0,i.jsx)(n.code,{children:"ConvertOrigin"})," trait and defines how the xcm-executor can\nconvert a ",(0,i.jsx)(n.code,{children:"MultiLocation"})," into a ",(0,i.jsx)(n.code,{children:"RuntimeOrigin"}),". Most xcm-executors take multiple implementations\nin a tuple for this configuration as there are many different MLs we would like to convert. When\nmultiple ",(0,i.jsx)(n.code,{children:"OriginConverter"}),"s conflict, the\n",(0,i.jsx)(n.a,{href:"https://paritytech.github.io/polkadot/doc/xcm/v2/enum.OriginKind.html",children:"OriginKind"})," that is passed\nto the ",(0,i.jsx)(n.code,{children:"convert_origin"})," function is used to distingues which ",(0,i.jsx)(n.code,{children:"OriginConverter"})," to use. There are\nfour different ",(0,i.jsx)(n.code,{children:"OriginKind"}),"s :"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-rust",children:"pub enum OriginKind {\n\tNative,\n\tSovereignAccount,\n\tSuperuser,\n\tXcm,\n}\n"})}),"\n",(0,i.jsxs)(n.p,{children:["An example of the use of ",(0,i.jsx)(n.code,{children:"OriginKind"}),"s are the ",(0,i.jsx)(n.code,{children:"SovereignSignedViaLocation"})," and\n",(0,i.jsx)(n.code,{children:"SignedAccountId32AsNative"})," OriginConverters (defined in xcm-builder). The first converts an\nsovereign account into a ",(0,i.jsx)(n.code,{children:"Signed"})," RuntimeOrigin (uses ",(0,i.jsx)(n.code,{children:"SovereignAccount"})," OriginKind) while the\nsecond converts a local native account into a ",(0,i.jsx)(n.code,{children:"Signed"})," RuntimeOrigin (uses ",(0,i.jsx)(n.code,{children:"Native"})," OriginKind)."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-rust",children:"pub type SovereignAccountOf = AccountId32Aliases;\n(\n\t// A `Signed` origin of the sovereign account that the original location controls.\n\tSovereignSignedViaLocation,\n\t// The AccountId32 location type can be expressed natively as a `Signed` origin.\n\tSignedAccountId32AsNative,\n);\n\n"})}),"\n",(0,i.jsx)(n.h3,{id:"isreserve",children:"IsReserve"}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.code,{children:"IsReserve"})," type must be set to specify which ",(0,i.jsx)(n.code,{children:""})," pair we trust to\ndeposit reserve assets on our chain. We can also use the unit type ",(0,i.jsx)(n.code,{children:"()"})," to block\n",(0,i.jsx)(n.code,{children:"ReserveAssetDeposited"})," instructions. An example implementation is the ",(0,i.jsx)(n.code,{children:"NativeAsset"})," struct, that\naccepts an asset iff it is a native asset."]}),"\n",(0,i.jsx)(n.h3,{id:"isteleporter",children:"IsTeleporter"}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.code,{children:"IsTeleporter"})," type must be set to specify which ",(0,i.jsx)(n.code,{children:""})," pair we trust to\nteleport assets to our chain. We can also use the unit type ",(0,i.jsx)(n.code,{children:"()"})," to block ",(0,i.jsx)(n.code,{children:"ReceiveTeleportedAssets"}),"\ninstruction. An example implementation is the ",(0,i.jsx)(n.code,{children:"NativeAsset"})," struct, that accepts an asset iff it is\na native asset."]}),"\n",(0,i.jsx)(n.h3,{id:"universallocation",children:"UniversalLocation"}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.code,{children:"UniversalLocation"})," type describes the location of the runtime implementing the xcm-executor in\nthe consensus universe. Below we give some examples of ",(0,i.jsx)(n.code,{children:"UniversalLocation"})," implementations."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-rust",children:"//Polkadot\nX1(GlobalConsensus(NetworkId::Polkadot))\n//Kusama\nX1(GlobalConsensus(NetworkId::Kusama))\n//Statemint\nX2(GlobalConsensus(NetworkId::Polkadot), Parachain(1000))\n"})}),"\n",(0,i.jsx)(n.h3,{id:"barrier",children:"Barrier"}),"\n",(0,i.jsxs)(n.p,{children:["Before any XCMs are executed in the XCM executor, they need to pass the ",(0,i.jsx)(n.code,{children:"Barrier"}),". The ",(0,i.jsx)(n.code,{children:"Barrier"}),"\ntype implements the ",(0,i.jsx)(n.code,{children:"ShouldExecute"})," trait and can be seen as the firewall of the xcm-executor. Each\ntime the xcm-executor receives an XCM, it check with the barrier if the XCM should be executed. We\ncan also define multiple barriers for our ",(0,i.jsx)(n.code,{children:"Barrier"})," type by using a tuple. During execution, each\nbarrier is checks, and if one of them succeed, the XCM is executed. Example of a ",(0,i.jsx)(n.code,{children:"Barrier"}),"\nimplementations is ",(0,i.jsx)(n.code,{children:"AllowTopLevelPaidExecutionFrom"})," that accepts the XCM if the ",(0,i.jsx)(n.code,{children:"T"})," contains the\norigin of the XCM and the XCM contains the ",(0,i.jsx)(n.code,{children:"BuyExecution"})," instruction. To accept all XCMs that pay\nfor execution we could set the barrier to ",(0,i.jsx)(n.code,{children:"AllowTopLevelPaidExecutionFrom"}),". There are\nmultiple pre-defined barrier implementations in the xcm-builder."]}),"\n",(0,i.jsx)(n.h3,{id:"weigher",children:"Weigher"}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.code,{children:"Weigher"})," is responsible for weighing full XCMs and individual instructions. This weight is\ncalculated before the XCM execution, and this calculated weight is checked against the weight_limit.\nIf the weight is more than weight_limit, the xcm will not be executed. The weight is also passed to\neach ",(0,i.jsx)(n.code,{children:"Barrier"}),", as certain barriers execute weight-based checks. After the execution of the XCM,\nunused weight is refunded (if possible). There are pre-defined ",(0,i.jsx)(n.code,{children:"Weigher"})," solutions in the\nxcm-builder. The most used is the ",(0,i.jsx)(n.code,{children:"FixedWeightBounds"}),":"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-rust",children:"// BaseXcmWeight is a const weight.\nFixedWeightBounds;\n"})}),"\n",(0,i.jsxs)(n.p,{children:["Note: ",(0,i.jsx)(n.a,{href:"/docs/learn/xcm/fundamentals-fees",children:"More information"})," about weight."]}),"\n",(0,i.jsx)(n.h3,{id:"trader",children:"Trader"}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.code,{children:"Trader"})," type is responsible for buying weight in the ",(0,i.jsx)(n.code,{children:"BuyExecution"})," instruction using assets in\nthe holding register and to refund unspend weight. One of the first implementations of the ",(0,i.jsx)(n.code,{children:"Trader"}),"\nis defined in the xcm-builder, namely the ",(0,i.jsx)(n.code,{children:"UsingComponents"})," trader."]}),"\n",(0,i.jsx)(n.h3,{id:"responsehandler",children:"ResponseHandler"}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.code,{children:"ResponseHandler"})," type is responsible for handling the ",(0,i.jsx)(n.code,{children:"QueryResponse"})," instructions. A\n",(0,i.jsx)(n.code,{children:"ResponseHandler"})," implementation has to implement the ",(0,i.jsx)(n.code,{children:"OnResponse"})," trait. One of the implementations\nof the ",(0,i.jsx)(n.code,{children:"ResponseHandler"})," is the ",(0,i.jsx)(n.code,{children:"pallet-xcm"}),". This will be the main implementation for most\nFRAME-based systems that implement the XCM-executor. Another option is to use the unit type ",(0,i.jsx)(n.code,{children:"()"})," if\nyou do not want to support ",(0,i.jsx)(n.code,{children:"QueryResponse"}),"."]}),"\n",(0,i.jsx)(n.h3,{id:"assettrap",children:"AssetTrap"}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.code,{children:"AssetTrap"})," type is responsible for handling the funds left over in holding after the execution\nof the XCM. The assets are stored in the AssetTrap and can be claimed using the ClaimAsset\ninstruction. One of the implementations of the ",(0,i.jsx)(n.code,{children:"AssetTrap"})," type is the ",(0,i.jsx)(n.code,{children:"pallet-xcm"}),". Another option\nis to use the unit type ",(0,i.jsx)(n.code,{children:"()"})," if you do not want to support asset trapping. In this case, the assets\nthat are left in holding are burned."]}),"\n",(0,i.jsx)(n.h3,{id:"assetclaims",children:"AssetClaims"}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.code,{children:"AssetClaims"})," type is responsible for claiming trapped assets. It is during execution of the\n",(0,i.jsx)(n.code,{children:"ClaimAsset"})," instruction. One of the implementations of the ",(0,i.jsx)(n.code,{children:"AssetClaims"})," type is the ",(0,i.jsx)(n.code,{children:"pallet-xcm"}),".\nAnother option is to use the unit type ",(0,i.jsx)(n.code,{children:"()"})," if you do not want to support asset claiming."]}),"\n",(0,i.jsx)(n.h3,{id:"assetlocker",children:"AssetLocker"}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.code,{children:"AssetLocker"})," type is responsible with handling locking and unlocking assets. One of the\nimplementations of the ",(0,i.jsx)(n.code,{children:"AssetLocker"})," type is the ",(0,i.jsx)(n.code,{children:"pallet-xcm"}),". Another option is to use the unit\ntype ",(0,i.jsx)(n.code,{children:"()"})," if you do not want to support asset locking."]}),"\n",(0,i.jsx)(n.h3,{id:"assetexchanger",children:"AssetExchanger"}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.code,{children:"AssetExchanger"})," type implements the ",(0,i.jsx)(n.code,{children:"AssetExchange"})," trait and handles the exchange of assets\nfor the ExchangeAsset instruction. An option is to use the unit type ",(0,i.jsx)(n.code,{children:"()"})," if you do not want to\nsupport asset exchanging."]}),"\n",(0,i.jsx)(n.h3,{id:"subscriptionservice",children:"SubscriptionService"}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.code,{children:"SubscriptionService"})," type implements the ",(0,i.jsx)(n.code,{children:"VersionChangeNotifier"})," trait and is used for the\nexecution of the (Un)SubscribeVersion instructions. When a chain receives the ",(0,i.jsx)(n.code,{children:"SubscribeVersion"}),"\ninstruction, the ",(0,i.jsx)(n.code,{children:"SubscriptionService"})," should send back a ",(0,i.jsx)(n.code,{children:"QueryResponse"})," with the XCM version that\nthe chain uses. One of the implementations of the ",(0,i.jsx)(n.code,{children:"SubscriptionService"})," is the ",(0,i.jsx)(n.code,{children:"pallet-xcm"}),". This\nwill be the main implementation for most FRAME-based systems that implement the XCM-executor."]}),"\n",(0,i.jsx)(n.h3,{id:"palletinstancesinfo",children:"PalletInstancesInfo"}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.code,{children:"PalletInstancesInfo"})," type implements the ",(0,i.jsx)(n.code,{children:"PalletsInfoAccess"})," trait and is used in the\n",(0,i.jsx)(n.code,{children:"QueryPallet"})," and ",(0,i.jsx)(n.code,{children:"ExpectPallet"})," instructions. It supplies the information of all the pallets in the\nRuntime, and is therefore FRAME specific. The unit type ",(0,i.jsx)(n.code,{children:"()"})," can be used if you do not want to\nsupport pallet information."]}),"\n",(0,i.jsx)(n.h3,{id:"maxassetsintoholding",children:"MaxAssetsIntoHolding"}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.code,{children:"MaxAssetsIntoHolding"})," type is used to set a limit on the number of assets in the Holding\nRegister. In the worse case, the Holding Register may contain up to twice as many assets as this\nlimit."]}),"\n",(0,i.jsx)(n.h3,{id:"feemanager",children:"FeeManager"}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.code,{children:"FeeManager"})," type is used to manage what happens with the fees that need to be paid for certain\nXCM instructions. A ",(0,i.jsx)(n.code,{children:"FeeManager"})," implementation implements the ",(0,i.jsx)(n.code,{children:"FeeManager"})," trait. The FeeManager\ndetermines if fees should be paid (or if they are waived) and what to do with the paid fees. The\nunit type ",(0,i.jsx)(n.code,{children:"()"})," can be used if you want to waive every fee."]}),"\n",(0,i.jsx)(n.h3,{id:"messageexporter",children:"MessageExporter"}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.code,{children:"MessageExporter"})," type implements the ",(0,i.jsx)(n.code,{children:"ExportXcm"})," trait and is used to export a message to\nanother consensus system. The ",(0,i.jsx)(n.code,{children:"MessageExporter"})," is different from the ",(0,i.jsx)(n.code,{children:"XcmSender"}),". The\n",(0,i.jsx)(n.code,{children:"MessageExporter"})," is able to spoof the origin of the message, meaning it can represent a different\norigin then the local (i.e. the caller chain's) location. The MessageExporter will mainly be used to\nsend XCMs over bridges. For a more in depth explanation, see the\n",(0,i.jsx)(n.a,{href:"https://paritytech.github.io/polkadot/doc/xcm_executor/traits/trait.ExportXcm.html",children:"ExportXcm trait"}),".\nThe unit type ",(0,i.jsx)(n.code,{children:"()"})," can be used if you do not want to support XCM exporting."]}),"\n",(0,i.jsx)(n.h3,{id:"universalaliases",children:"UniversalAliases"}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.code,{children:"UniversalAliases"})," type is used to list the origin locations and specific universal junctions to\nwhich they are allowed to elevate themselves. ",(0,i.jsx)(n.code,{children:"UniversalAliases"})," is used in the ",(0,i.jsx)(n.code,{children:"UniversalOrigin"}),"\ninstruction. To not allow any alliasing of origins, ",(0,i.jsx)(n.code,{children:"Nothing"})," can be used."]}),"\n",(0,i.jsx)(n.h3,{id:"calldispatcher",children:"CallDispatcher"}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.code,{children:"CallDispatcher"})," type is used by xcm-executor to dispatch calls that are passed in the\n",(0,i.jsx)(n.code,{children:"Transact"})," instruction with the given origin. When no special call dispatcher is required, this can\nbe set to the same type as ",(0,i.jsx)(n.code,{children:"RuntimeCall"}),". However, ",(0,i.jsx)(n.code,{children:"CallDispatcher"})," can be used to customize call\ndispatch, such as adapting the origin based on the call or modifying the call."]}),"\n",(0,i.jsx)(n.h3,{id:"safecallfilter",children:"SafeCallFilter"}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.code,{children:"SafeCallFilter"})," type is used by the xcm-executor to whitelist calls that can be made in the\n",(0,i.jsx)(n.code,{children:"Transact"})," instruction. This is a temporary measure until proof size weights for XCM instructions\nare properly account for. If you want to allow all calls in ",(0,i.jsx)(n.code,{children:"Tansact"}),", use ",(0,i.jsx)(n.code,{children:"Everything"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"what-next",children:"What Next"}),"\n",(0,i.jsxs)(n.p,{children:["Check out the\n",(0,i.jsx)(n.a,{href:"https://github.com/polkadot-fellows/runtimes/blob/main/relay/kusama/src/xcm_config.rs",children:"Kusama"}),",\n",(0,i.jsx)(n.a,{href:"https://github.com/polkadot-fellows/runtimes/blob/main/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs",children:"Statemine"}),",\nor ",(0,i.jsx)(n.a,{href:"https://github.com/paritytech/trappist/blob/main/runtime/trappist/src/xcm_config.rs",children:"Trappist"}),"\nfor examples of how to implement the xcm-executor config."]})]})}function d(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(h,{...e})}):h(e)}},28453:(e,n,t)=>{t.d(n,{R:()=>r,x:()=>a});var i=t(96540);const s={},o=i.createContext(s);function r(e){const n=i.useContext(o);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:r(e.components),i.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/5d69d9d4.7d7ad9fa.js b/assets/js/5d69d9d4.7d7ad9fa.js new file mode 100644 index 000000000000..541ce5beb487 --- /dev/null +++ b/assets/js/5d69d9d4.7d7ad9fa.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1658],{23071:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>d,contentTitle:()=>r,default:()=>h,frontMatter:()=>a,metadata:()=>t,toc:()=>l});const t=JSON.parse('{"id":"maintain/maintain-guides-how-to-upgrade","title":"How to Upgrade Your Validator","description":"Validators perform critical functions for the network by","source":"@site/../docs/maintain/maintain-guides-how-to-upgrade.md","sourceDirName":"maintain","slug":"/maintain-guides-how-to-upgrade","permalink":"/docs/maintain-guides-how-to-upgrade","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/maintain/maintain-guides-how-to-upgrade.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1718028821000,"frontMatter":{"id":"maintain-guides-how-to-upgrade","title":"How to Upgrade Your Validator","sidebar_label":"How to Upgrade Your Validator","descriptions":"Steps on how to upgrade your validator node.","keywords":["upgrade","node","validator","release","session"],"slug":"../maintain-guides-how-to-upgrade"},"sidebar":"docs","previous":{"title":"Secure Validator","permalink":"/docs/maintain-guides-secure-validator"},"next":{"title":"Monitor your node","permalink":"/docs/maintain-guides-how-to-monitor-your-node"}}');var i=s(74848),o=s(28453);const a={id:"maintain-guides-how-to-upgrade",title:"How to Upgrade Your Validator",sidebar_label:"How to Upgrade Your Validator",descriptions:"Steps on how to upgrade your validator node.",keywords:["upgrade","node","validator","release","session"],slug:"../maintain-guides-how-to-upgrade"},r=void 0,d={},l=[{value:"Key Components",id:"key-components",level:2},{value:"Session Keys",id:"session-keys",level:3},{value:"Keystore",id:"keystore",level:3},{value:"Steps",id:"steps",level:2},{value:"Session N",id:"session-n",level:3},{value:"Session N+3",id:"session-n3",level:3}];function c(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",...(0,o.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(n.p,{children:["Validators perform critical functions for the network by\n",(0,i.jsx)(n.a,{href:"/docs/learn-parachains-protocol",children:"backing and including blocks"}),". Validators may have to go\noffline for short-periods of time to upgrade client software or to upgrade the host machine.\nUsually, standard client upgrades will only require you to stop the service, replace the binary and\nrestart the service. This operation can be executed within a session."]}),"\n",(0,i.jsx)(n.p,{children:"Validators may also need to perform long-lead maintenance tasks that will span more than one\nsession. Under these circumstances, an active validator may chill their stash and be removed from\nthe active validator set. Alternatively, the validator may substitute the active validator server\nwith another allowing the former to undergo maintenance activities."}),"\n",(0,i.jsx)(n.p,{children:"This guide will provide an option for validators to seamlessly substitute an active validator server\nto allow for maintenance operations."}),"\n",(0,i.jsx)(n.p,{children:"The process can take several hours, so make sure you understand the instructions first and plan\naccordingly."}),"\n",(0,i.jsx)(n.admonition,{title:"Keep an eye out on new releases from the community",type:"tip",children:(0,i.jsx)(n.p,{children:"Upgrade or downgrade accordingly."})}),"\n",(0,i.jsx)(n.h2,{id:"key-components",children:"Key Components"}),"\n",(0,i.jsx)(n.h3,{id:"session-keys",children:"Session Keys"}),"\n",(0,i.jsx)(n.p,{children:"Session keys are stored in the client and used to sign validator operations. They are what link your\nvalidator node to your staking proxy. If you change them within a session you will have to wait for\nthe current session to finish and a further two sessions to elapse before they are applied."}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.a,{href:"/docs/learn-cryptography",children:"More info about keys in Polkadot."})}),"\n",(0,i.jsx)(n.h3,{id:"keystore",children:"Keystore"}),"\n",(0,i.jsxs)(n.p,{children:["Each validator server contains essential private keys in a folder called the ",(0,i.jsx)(n.em,{children:"keystore"}),". These keys\nare used by a validator to sign transactions at the network level. If two or more validators sign\ncertain transactions using the same keys, it can lead to an\n",(0,i.jsx)(n.a,{href:"/docs/learn-offenses",children:"equivocation slash"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["For this reason, it is advised that validators DO NOT CLONE or COPY the ",(0,i.jsx)(n.em,{children:"keystore"})," folder and\ninstead generate session keys for each new validator instance."]}),"\n",(0,i.jsxs)(n.p,{children:["Default keystore path - ",(0,i.jsx)(n.code,{children:"/home/polkadot/.local/share/polkadot/chains//keystore"})]}),"\n",(0,i.jsx)(n.h2,{id:"steps",children:"Steps"}),"\n",(0,i.jsxs)(n.p,{children:["The following steps require a second validator which will be referred to as ",(0,i.jsx)(n.code,{children:"Validator B"}),"; the\noriginal server that is in the active set will be referred to as ",(0,i.jsx)(n.code,{children:"Validator A"}),"."]}),"\n",(0,i.jsxs)(n.h3,{id:"session-n",children:["Session ",(0,i.jsx)(n.code,{children:"N"})]}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsxs)(n.li,{children:["Start a second node. Once it is synced, use the ",(0,i.jsx)(n.code,{children:"--validator"}),' flag. This is now "Validator B."']}),"\n",(0,i.jsxs)(n.li,{children:["Generate Session keys for ",(0,i.jsx)(n.strong,{children:"Validator B"}),"."]}),"\n",(0,i.jsxs)(n.li,{children:["Submit a ",(0,i.jsx)(n.code,{children:"set_key"})," extrinsic from your staking proxy with the session key generated from\n",(0,i.jsx)(n.strong,{children:"Validator B"}),"."]}),"\n",(0,i.jsx)(n.li,{children:"Take note of the Session that this extrinsic was executed in."}),"\n",(0,i.jsx)(n.li,{children:"Allow the current session to elapse and then wait for two full sessions."}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"It is imperative that you keep Validator A running during this time."})," ",(0,i.jsx)(n.code,{children:"set_key"})," does not have an\nimmediate effect and requires two full sessions to elapse before it does. If you do switch off\nValidator A too early you may risk being chilled and face a fault within the Thousand Validator\nProgramme."]}),"\n",(0,i.jsxs)(n.h3,{id:"session-n3",children:["Session ",(0,i.jsx)(n.code,{children:"N+3"})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Validator B"})," is now acting as your validator - you can safely perform operations on ",(0,i.jsx)(n.strong,{children:"Validator\nA"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["When you are ready to restore ",(0,i.jsx)(n.strong,{children:"Validator A"}),":"]}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsxs)(n.li,{children:["Start ",(0,i.jsx)(n.strong,{children:"Validator A"}),", sync the database and ensure that it is operating with the ",(0,i.jsx)(n.code,{children:"--validator"}),"\nflag."]}),"\n",(0,i.jsxs)(n.li,{children:["Generate new Session keys for ",(0,i.jsx)(n.strong,{children:"Validator A"}),"."]}),"\n",(0,i.jsxs)(n.li,{children:["Submit a ",(0,i.jsx)(n.code,{children:"set_key"})," extrinsic from your staking proxy with the session key generated from\n",(0,i.jsx)(n.strong,{children:"Validator A"}),"."]}),"\n",(0,i.jsx)(n.li,{children:"Take note of the Session that this extrinsic was executed in."}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"Again, it is imperative that Validator B is kept running until the current session finishes and\ntwo further full sessions have elapsed."})}),"\n",(0,i.jsxs)(n.p,{children:["Once this time has elapsed, ",(0,i.jsx)(n.strong,{children:"Validator A"})," will take over. You can safely stop Validator B."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"NOTE:"})," To verify that the Session has changed, make sure that a block in the new Session is\nfinalized. You should see log messages like the ones below to confirm the change:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"2019-10-28 21:44:13 Applying authority set change scheduled at block #450092\n2019-10-28 21:44:13 Applying GRANDPA set change to new set with 20 authorities\n"})})]})}function h(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(c,{...e})}):c(e)}},28453:(e,n,s)=>{s.d(n,{R:()=>a,x:()=>r});var t=s(96540);const i={},o=t.createContext(i);function a(e){const n=t.useContext(o);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:a(e.components),t.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/5d69d9d4.c9efaea4.js b/assets/js/5d69d9d4.c9efaea4.js deleted file mode 100644 index fd789c346e35..000000000000 --- a/assets/js/5d69d9d4.c9efaea4.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1658],{87390:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>d,contentTitle:()=>a,default:()=>h,frontMatter:()=>o,metadata:()=>r,toc:()=>l});var t=s(74848),i=s(28453);const o={id:"maintain-guides-how-to-upgrade",title:"How to Upgrade Your Validator",sidebar_label:"How to Upgrade Your Validator",descriptions:"Steps on how to upgrade your validator node.",keywords:["upgrade","node","validator","release","session"],slug:"../maintain-guides-how-to-upgrade"},a=void 0,r={id:"maintain/maintain-guides-how-to-upgrade",title:"How to Upgrade Your Validator",description:"Validators perform critical functions for the network by",source:"@site/../docs/maintain/maintain-guides-how-to-upgrade.md",sourceDirName:"maintain",slug:"/maintain-guides-how-to-upgrade",permalink:"/docs/maintain-guides-how-to-upgrade",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/maintain/maintain-guides-how-to-upgrade.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1718028821e3,frontMatter:{id:"maintain-guides-how-to-upgrade",title:"How to Upgrade Your Validator",sidebar_label:"How to Upgrade Your Validator",descriptions:"Steps on how to upgrade your validator node.",keywords:["upgrade","node","validator","release","session"],slug:"../maintain-guides-how-to-upgrade"},sidebar:"docs",previous:{title:"Secure Validator",permalink:"/docs/maintain-guides-secure-validator"},next:{title:"Monitor your node",permalink:"/docs/maintain-guides-how-to-monitor-your-node"}},d={},l=[{value:"Key Components",id:"key-components",level:2},{value:"Session Keys",id:"session-keys",level:3},{value:"Keystore",id:"keystore",level:3},{value:"Steps",id:"steps",level:2},{value:"Session N",id:"session-n",level:3},{value:"Session N+3",id:"session-n3",level:3}];function c(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",...(0,i.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(n.p,{children:["Validators perform critical functions for the network by\n",(0,t.jsx)(n.a,{href:"/docs/learn-parachains-protocol",children:"backing and including blocks"}),". Validators may have to go\noffline for short-periods of time to upgrade client software or to upgrade the host machine.\nUsually, standard client upgrades will only require you to stop the service, replace the binary and\nrestart the service. This operation can be executed within a session."]}),"\n",(0,t.jsx)(n.p,{children:"Validators may also need to perform long-lead maintenance tasks that will span more than one\nsession. Under these circumstances, an active validator may chill their stash and be removed from\nthe active validator set. Alternatively, the validator may substitute the active validator server\nwith another allowing the former to undergo maintenance activities."}),"\n",(0,t.jsx)(n.p,{children:"This guide will provide an option for validators to seamlessly substitute an active validator server\nto allow for maintenance operations."}),"\n",(0,t.jsx)(n.p,{children:"The process can take several hours, so make sure you understand the instructions first and plan\naccordingly."}),"\n",(0,t.jsx)(n.admonition,{title:"Keep an eye out on new releases from the community",type:"tip",children:(0,t.jsx)(n.p,{children:"Upgrade or downgrade accordingly."})}),"\n",(0,t.jsx)(n.h2,{id:"key-components",children:"Key Components"}),"\n",(0,t.jsx)(n.h3,{id:"session-keys",children:"Session Keys"}),"\n",(0,t.jsx)(n.p,{children:"Session keys are stored in the client and used to sign validator operations. They are what link your\nvalidator node to your staking proxy. If you change them within a session you will have to wait for\nthe current session to finish and a further two sessions to elapse before they are applied."}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.a,{href:"/docs/learn-cryptography",children:"More info about keys in Polkadot."})}),"\n",(0,t.jsx)(n.h3,{id:"keystore",children:"Keystore"}),"\n",(0,t.jsxs)(n.p,{children:["Each validator server contains essential private keys in a folder called the ",(0,t.jsx)(n.em,{children:"keystore"}),". These keys\nare used by a validator to sign transactions at the network level. If two or more validators sign\ncertain transactions using the same keys, it can lead to an\n",(0,t.jsx)(n.a,{href:"/docs/learn-offenses",children:"equivocation slash"}),"."]}),"\n",(0,t.jsxs)(n.p,{children:["For this reason, it is advised that validators DO NOT CLONE or COPY the ",(0,t.jsx)(n.em,{children:"keystore"})," folder and\ninstead generate session keys for each new validator instance."]}),"\n",(0,t.jsxs)(n.p,{children:["Default keystore path - ",(0,t.jsx)(n.code,{children:"/home/polkadot/.local/share/polkadot/chains//keystore"})]}),"\n",(0,t.jsx)(n.h2,{id:"steps",children:"Steps"}),"\n",(0,t.jsxs)(n.p,{children:["The following steps require a second validator which will be referred to as ",(0,t.jsx)(n.code,{children:"Validator B"}),"; the\noriginal server that is in the active set will be referred to as ",(0,t.jsx)(n.code,{children:"Validator A"}),"."]}),"\n",(0,t.jsxs)(n.h3,{id:"session-n",children:["Session ",(0,t.jsx)(n.code,{children:"N"})]}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["Start a second node. Once it is synced, use the ",(0,t.jsx)(n.code,{children:"--validator"}),' flag. This is now "Validator B."']}),"\n",(0,t.jsxs)(n.li,{children:["Generate Session keys for ",(0,t.jsx)(n.strong,{children:"Validator B"}),"."]}),"\n",(0,t.jsxs)(n.li,{children:["Submit a ",(0,t.jsx)(n.code,{children:"set_key"})," extrinsic from your staking proxy with the session key generated from\n",(0,t.jsx)(n.strong,{children:"Validator B"}),"."]}),"\n",(0,t.jsx)(n.li,{children:"Take note of the Session that this extrinsic was executed in."}),"\n",(0,t.jsx)(n.li,{children:"Allow the current session to elapse and then wait for two full sessions."}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"It is imperative that you keep Validator A running during this time."})," ",(0,t.jsx)(n.code,{children:"set_key"})," does not have an\nimmediate effect and requires two full sessions to elapse before it does. If you do switch off\nValidator A too early you may risk being chilled and face a fault within the Thousand Validator\nProgramme."]}),"\n",(0,t.jsxs)(n.h3,{id:"session-n3",children:["Session ",(0,t.jsx)(n.code,{children:"N+3"})]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Validator B"})," is now acting as your validator - you can safely perform operations on ",(0,t.jsx)(n.strong,{children:"Validator\nA"}),"."]}),"\n",(0,t.jsxs)(n.p,{children:["When you are ready to restore ",(0,t.jsx)(n.strong,{children:"Validator A"}),":"]}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["Start ",(0,t.jsx)(n.strong,{children:"Validator A"}),", sync the database and ensure that it is operating with the ",(0,t.jsx)(n.code,{children:"--validator"}),"\nflag."]}),"\n",(0,t.jsxs)(n.li,{children:["Generate new Session keys for ",(0,t.jsx)(n.strong,{children:"Validator A"}),"."]}),"\n",(0,t.jsxs)(n.li,{children:["Submit a ",(0,t.jsx)(n.code,{children:"set_key"})," extrinsic from your staking proxy with the session key generated from\n",(0,t.jsx)(n.strong,{children:"Validator A"}),"."]}),"\n",(0,t.jsx)(n.li,{children:"Take note of the Session that this extrinsic was executed in."}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Again, it is imperative that Validator B is kept running until the current session finishes and\ntwo further full sessions have elapsed."})}),"\n",(0,t.jsxs)(n.p,{children:["Once this time has elapsed, ",(0,t.jsx)(n.strong,{children:"Validator A"})," will take over. You can safely stop Validator B."]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"NOTE:"})," To verify that the Session has changed, make sure that a block in the new Session is\nfinalized. You should see log messages like the ones below to confirm the change:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"2019-10-28 21:44:13 Applying authority set change scheduled at block #450092\n2019-10-28 21:44:13 Applying GRANDPA set change to new set with 20 authorities\n"})})]})}function h(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(c,{...e})}):c(e)}},28453:(e,n,s)=>{s.d(n,{R:()=>a,x:()=>r});var t=s(96540);const i={},o=t.createContext(i);function a(e){const n=t.useContext(o);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:a(e.components),t.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/5db34cd0.505e6b2c.js b/assets/js/5db34cd0.505e6b2c.js new file mode 100644 index 000000000000..8db29e6c2dc8 --- /dev/null +++ b/assets/js/5db34cd0.505e6b2c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8058],{21507:(e,o,n)=>{n.r(o),n.d(o,{assets:()=>l,contentTitle:()=>s,default:()=>h,frontMatter:()=>r,metadata:()=>i,toc:()=>c});const i=JSON.parse('{"id":"general/decentralized-voices","title":"Decentralized Voices Program","description":"Learn about the Decentralized Voices Program.","source":"@site/../docs/general/decentralized-voices.md","sourceDirName":"general","slug":"/decentralized-voices","permalink":"/docs/decentralized-voices","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/decentralized-voices.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1726729579000,"frontMatter":{"id":"decentralized-voices","title":"Decentralized Voices Program","sidebar_label":"Decentralized Voices","description":"Learn about the Decentralized Voices Program.","keywords":["community","ecosystem","governance","decentralized voices","delegations"],"slug":"../decentralized-voices"},"sidebar":"docs","previous":{"title":"Programs","permalink":"/docs/programs-index"},"next":{"title":"Bug Bounty","permalink":"/docs/bug-bounty"}}');var t=n(74848),a=n(28453);const r={id:"decentralized-voices",title:"Decentralized Voices Program",sidebar_label:"Decentralized Voices",description:"Learn about the Decentralized Voices Program.",keywords:["community","ecosystem","governance","decentralized voices","delegations"],slug:"../decentralized-voices"},s=void 0,l={},c=[{value:"Decentralized Votes",id:"decentralized-votes",level:2},{value:"How to Apply",id:"how-to-apply",level:2}];function d(e){const o={a:"a",em:"em",h2:"h2",li:"li",p:"p",strong:"strong",ul:"ul",...(0,a.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(o.p,{children:["The Decentralized Voices program empowers broader community participation in\n",(0,t.jsx)(o.a,{href:"/docs/learn-polkadot-opengov",children:"Polkadot OpenGov"})," by\n",(0,t.jsx)(o.a,{href:"/docs/learn-polkadot-opengov#multirole-delegation",children:"delegating"})," 42 Million DOT and 80,000 KSM\nof voting power."]}),"\n",(0,t.jsx)(o.h2,{id:"decentralized-votes",children:"Decentralized Votes"}),"\n",(0,t.jsxs)(o.p,{children:["Building on the success of previous initiatives like\n",(0,t.jsx)(o.a,{href:"/docs/thousand-validators",children:"the Thousand Validators Programme"})," and\n",(0,t.jsx)(o.a,{href:"/docs/decentralized-futures",children:"the Decentralized Futures Program"}),", Web3 Foundation is working on\ndecentralizing governance within the Polkadot ecosystem to ensure a fair decision-making process. In\nline with the Foundation's ethos, this program seeks to amplify the voices of passionate and\nknowledgeable participants who may lack significant holdings, aiming to mitigate potential\nmarginalization. This initiative does not impact existing programs like the Thousand Validators\nProgram, as\n",(0,t.jsx)(o.a,{href:"/docs/learn-polkadot-opengov#voluntary-locking-conviction-voting",children:"the tokens allocated can be used for both staking and governance"}),"."]}),"\n",(0,t.jsx)(o.h2,{id:"how-to-apply",children:"How to Apply"}),"\n",(0,t.jsxs)(o.p,{children:["Please fill out\n",(0,t.jsx)(o.a,{href:"https://docs.google.com/forms/d/e/1FAIpQLSeIFOhMfoqRoeYqr1c_-UeB2a6u0YEsi9CaNEEeUAXtN0oE3w/viewform",children:"this application"}),"\nprovided by Web3 Foundation. Information requested in the form includes the following:"]}),"\n",(0,t.jsxs)(o.ul,{children:["\n",(0,t.jsx)(o.li,{children:"The account address to which you would like to have DOT or KSM delegated. This account must have a\nverified identity, including at least one of the following fields: X (formerly Twitter), Matrix\n(Element), or email."}),"\n",(0,t.jsxs)(o.li,{children:["A link to a ",(0,t.jsx)(o.em,{children:"publicly accessible"})," declaration of your Polkadot \u201cpolitical philosophy\u201d and/or\nagenda on the ",(0,t.jsx)(o.a,{href:"https://forum.polkadot.network/",children:"Polkadot Forum"}),". This can include an actual\nphilosophical statement, analogies to other political philosophies, opinions on previous Referenda\nor governance decisions, or any other way you would like to explain to people how you would vote\nin the future. This should be at least one paragraph."]}),"\n",(0,t.jsx)(o.li,{children:"A description of why you would be a good choice for this program. This can include such\ninformation as previous votes (including votes with other accounts if you can prove you own them),\nas well as commentary, blog posts, etc. on Polkadot OpenGov or specific referenda. It can also\ninclude other information that you would consider relevant to decision making, e.g. being part of\nother political groups or legislative bodies."}),"\n"]}),"\n",(0,t.jsx)(o.p,{children:"The Decentralized Voices program initially designates delegates who will be receiving delegated\nfunds. In addition to the platforms mentioned above, to expand their reach, participants can\nshowcase their governance contributions and political philosophy through public declarations and\nactive engagement (optionally) on other social media platforms such as:"}),"\n",(0,t.jsxs)(o.ul,{children:["\n",(0,t.jsx)(o.li,{children:(0,t.jsx)(o.a,{href:"https://www.reddit.com/r/Polkadot/",children:"Reddit"})}),"\n",(0,t.jsx)(o.li,{children:(0,t.jsx)(o.a,{href:"https://discord.gg/polkadot",children:"Discord"})}),"\n",(0,t.jsx)(o.li,{children:(0,t.jsx)(o.a,{href:"https://polkaverse.com/",children:"PolkaVerse"})}),"\n"]}),"\n",(0,t.jsx)(o.p,{children:"Delegations are subject to review, and non-compliance may result in revocation."}),"\n",(0,t.jsxs)(o.p,{children:["The Decentralized Voices program commenced on ",(0,t.jsx)(o.strong,{children:"February 6, 2024"}),", offering an opportunity for\ndedicated community members to shape the future of the Polkadot ecosystem. For more detailed\ninformation, see\n",(0,t.jsx)(o.a,{href:"https://medium.com/web3foundation/decentralized-voices-program-93623c27ae43",children:"the original Medium article"}),"."]})]})}function h(e={}){const{wrapper:o}={...(0,a.R)(),...e.components};return o?(0,t.jsx)(o,{...e,children:(0,t.jsx)(d,{...e})}):d(e)}},28453:(e,o,n)=>{n.d(o,{R:()=>r,x:()=>s});var i=n(96540);const t={},a=i.createContext(t);function r(e){const o=i.useContext(a);return i.useMemo((function(){return"function"==typeof e?e(o):{...o,...e}}),[o,e])}function s(e){let o;return o=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:r(e.components),i.createElement(a.Provider,{value:o},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/5db34cd0.59d4a66a.js b/assets/js/5db34cd0.59d4a66a.js deleted file mode 100644 index b06666cfb031..000000000000 --- a/assets/js/5db34cd0.59d4a66a.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8058],{74078:(e,o,n)=>{n.r(o),n.d(o,{assets:()=>l,contentTitle:()=>r,default:()=>h,frontMatter:()=>a,metadata:()=>s,toc:()=>c});var i=n(74848),t=n(28453);const a={id:"decentralized-voices",title:"Decentralized Voices Program",sidebar_label:"Decentralized Voices",description:"Learn about the Decentralized Voices Program.",keywords:["community","ecosystem","governance","decentralized voices","delegations"],slug:"../decentralized-voices"},r=void 0,s={id:"general/decentralized-voices",title:"Decentralized Voices Program",description:"Learn about the Decentralized Voices Program.",source:"@site/../docs/general/decentralized-voices.md",sourceDirName:"general",slug:"/decentralized-voices",permalink:"/docs/decentralized-voices",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/decentralized-voices.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1726729579e3,frontMatter:{id:"decentralized-voices",title:"Decentralized Voices Program",sidebar_label:"Decentralized Voices",description:"Learn about the Decentralized Voices Program.",keywords:["community","ecosystem","governance","decentralized voices","delegations"],slug:"../decentralized-voices"},sidebar:"docs",previous:{title:"Programs",permalink:"/docs/programs-index"},next:{title:"Bug Bounty",permalink:"/docs/bug-bounty"}},l={},c=[{value:"Decentralized Votes",id:"decentralized-votes",level:2},{value:"How to Apply",id:"how-to-apply",level:2}];function d(e){const o={a:"a",em:"em",h2:"h2",li:"li",p:"p",strong:"strong",ul:"ul",...(0,t.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(o.p,{children:["The Decentralized Voices program empowers broader community participation in\n",(0,i.jsx)(o.a,{href:"/docs/learn-polkadot-opengov",children:"Polkadot OpenGov"})," by\n",(0,i.jsx)(o.a,{href:"/docs/learn-polkadot-opengov#multirole-delegation",children:"delegating"})," 42 Million DOT and 80,000 KSM\nof voting power."]}),"\n",(0,i.jsx)(o.h2,{id:"decentralized-votes",children:"Decentralized Votes"}),"\n",(0,i.jsxs)(o.p,{children:["Building on the success of previous initiatives like\n",(0,i.jsx)(o.a,{href:"/docs/thousand-validators",children:"the Thousand Validators Programme"})," and\n",(0,i.jsx)(o.a,{href:"/docs/decentralized-futures",children:"the Decentralized Futures Program"}),", Web3 Foundation is working on\ndecentralizing governance within the Polkadot ecosystem to ensure a fair decision-making process. In\nline with the Foundation's ethos, this program seeks to amplify the voices of passionate and\nknowledgeable participants who may lack significant holdings, aiming to mitigate potential\nmarginalization. This initiative does not impact existing programs like the Thousand Validators\nProgram, as\n",(0,i.jsx)(o.a,{href:"/docs/learn-polkadot-opengov#voluntary-locking-conviction-voting",children:"the tokens allocated can be used for both staking and governance"}),"."]}),"\n",(0,i.jsx)(o.h2,{id:"how-to-apply",children:"How to Apply"}),"\n",(0,i.jsxs)(o.p,{children:["Please fill out\n",(0,i.jsx)(o.a,{href:"https://docs.google.com/forms/d/e/1FAIpQLSeIFOhMfoqRoeYqr1c_-UeB2a6u0YEsi9CaNEEeUAXtN0oE3w/viewform",children:"this application"}),"\nprovided by Web3 Foundation. Information requested in the form includes the following:"]}),"\n",(0,i.jsxs)(o.ul,{children:["\n",(0,i.jsx)(o.li,{children:"The account address to which you would like to have DOT or KSM delegated. This account must have a\nverified identity, including at least one of the following fields: X (formerly Twitter), Matrix\n(Element), or email."}),"\n",(0,i.jsxs)(o.li,{children:["A link to a ",(0,i.jsx)(o.em,{children:"publicly accessible"})," declaration of your Polkadot \u201cpolitical philosophy\u201d and/or\nagenda on the ",(0,i.jsx)(o.a,{href:"https://forum.polkadot.network/",children:"Polkadot Forum"}),". This can include an actual\nphilosophical statement, analogies to other political philosophies, opinions on previous Referenda\nor governance decisions, or any other way you would like to explain to people how you would vote\nin the future. This should be at least one paragraph."]}),"\n",(0,i.jsx)(o.li,{children:"A description of why you would be a good choice for this program. This can include such\ninformation as previous votes (including votes with other accounts if you can prove you own them),\nas well as commentary, blog posts, etc. on Polkadot OpenGov or specific referenda. It can also\ninclude other information that you would consider relevant to decision making, e.g. being part of\nother political groups or legislative bodies."}),"\n"]}),"\n",(0,i.jsx)(o.p,{children:"The Decentralized Voices program initially designates delegates who will be receiving delegated\nfunds. In addition to the platforms mentioned above, to expand their reach, participants can\nshowcase their governance contributions and political philosophy through public declarations and\nactive engagement (optionally) on other social media platforms such as:"}),"\n",(0,i.jsxs)(o.ul,{children:["\n",(0,i.jsx)(o.li,{children:(0,i.jsx)(o.a,{href:"https://www.reddit.com/r/Polkadot/",children:"Reddit"})}),"\n",(0,i.jsx)(o.li,{children:(0,i.jsx)(o.a,{href:"https://discord.gg/polkadot",children:"Discord"})}),"\n",(0,i.jsx)(o.li,{children:(0,i.jsx)(o.a,{href:"https://polkaverse.com/",children:"PolkaVerse"})}),"\n"]}),"\n",(0,i.jsx)(o.p,{children:"Delegations are subject to review, and non-compliance may result in revocation."}),"\n",(0,i.jsxs)(o.p,{children:["The Decentralized Voices program commenced on ",(0,i.jsx)(o.strong,{children:"February 6, 2024"}),", offering an opportunity for\ndedicated community members to shape the future of the Polkadot ecosystem. For more detailed\ninformation, see\n",(0,i.jsx)(o.a,{href:"https://medium.com/web3foundation/decentralized-voices-program-93623c27ae43",children:"the original Medium article"}),"."]})]})}function h(e={}){const{wrapper:o}={...(0,t.R)(),...e.components};return o?(0,i.jsx)(o,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}},28453:(e,o,n)=>{n.d(o,{R:()=>r,x:()=>s});var i=n(96540);const t={},a=i.createContext(t);function r(e){const o=i.useContext(a);return i.useMemo((function(){return"function"==typeof e?e(o):{...o,...e}}),[o,e])}function s(e){let o;return o=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:r(e.components),i.createElement(a.Provider,{value:o},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/5dfc1fb1.66ee2695.js b/assets/js/5dfc1fb1.66ee2695.js new file mode 100644 index 000000000000..8d42a0625372 --- /dev/null +++ b/assets/js/5dfc1fb1.66ee2695.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1187],{27150:(e,n,o)=>{o.r(n),o.d(n,{assets:()=>d,contentTitle:()=>s,default:()=>h,frontMatter:()=>r,metadata:()=>t,toc:()=>l});const t=JSON.parse('{"id":"general/polkadot-community-foundation","title":"Polkadot Community Foundation","description":"Polkadot Community Foundation.","source":"@site/../docs/general/pcf.md","sourceDirName":"general","slug":"/polkadot-community-foundation","permalink":"/docs/polkadot-community-foundation","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/pcf.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1728913410000,"frontMatter":{"id":"polkadot-community-foundation","title":"Polkadot Community Foundation","sidebar_label":"Polkadot Community Foundation","description":"Polkadot Community Foundation.","keywords":["polkadot","governance","OpenGov","community","polkadot community foundation"],"slug":"../polkadot-community-foundation"},"sidebar":"docs","previous":{"title":"Treasury","permalink":"/docs/learn-polkadot-opengov-treasury"},"next":{"title":"Ecosystem Funds","permalink":"/docs/ecosystem-funds"}}');var i=o(74848),a=o(28453);const r={id:"polkadot-community-foundation",title:"Polkadot Community Foundation",sidebar_label:"Polkadot Community Foundation",description:"Polkadot Community Foundation.",keywords:["polkadot","governance","OpenGov","community","polkadot community foundation"],slug:"../polkadot-community-foundation"},s=void 0,d={},l=[{value:"Role of the Polkadot Community Foundation",id:"role-of-the-polkadot-community-foundation",level:2},{value:"PCF Background",id:"pcf-background",level:2},{value:"PCF Activities",id:"pcf-activities",level:2},{value:"PCF Entity Design",id:"pcf-entity-design",level:2},{value:"PCF Corporate Structure",id:"pcf-corporate-structure",level:2},{value:"PCF Initial Personnel",id:"pcf-initial-personnel",level:2},{value:"Supervisor",id:"supervisor",level:3},{value:"Directors",id:"directors",level:3},{value:"Administrator",id:"administrator",level:3},{value:"How to use the PCF",id:"how-to-use-the-pcf",level:2},{value:"Foundation Funding Proposals",id:"foundation-funding-proposals",level:3},{value:"Wallet Addresses",id:"wallet-addresses",level:4},{value:"Foundation Resolution Proposals",id:"foundation-resolution-proposals",level:3},{value:"How to Write a Funding Proposal to PCF",id:"how-to-write-a-funding-proposal-to-pcf",level:2},{value:"PCF FAQ",id:"pcf-faq",level:2},{value:"PCF General FAQ",id:"pcf-general-faq",level:3},{value:"PCF Proposal FAQ",id:"pcf-proposal-faq",level:3},{value:"PCF Supporting Material",id:"pcf-supporting-material",level:2}];function c(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",h4:"h4",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,a.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(n.p,{children:["The Polkadot Community Foundation (PCF) is a foundation company incorporated in the Cayman Islands\nwhose activities are directed by DOT holders via\n",(0,i.jsx)(n.a,{href:"/docs/learn-polkadot-opengov",children:"Polkadot\u2019s OpenGov"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["The PCF is an optional off-chain vehicle for OpenGov to execute tasks such as signing commercial\ncontracts, making fiat payments, enforcing intellectual property, and contracting third-party\nservice providers like consultants. Unlike typical companies, the PCF has no shareholders, members,\ntrustees, or beneficiaries whose interests could conflict with those of the token holders. See more\nabout PCF in ",(0,i.jsx)(n.a,{href:"https://polkadot.polkassembly.io/referenda/730",children:"the original OpenGov proposal"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"role-of-the-polkadot-community-foundation",children:"Role of the Polkadot Community Foundation"}),"\n",(0,i.jsx)(n.p,{children:"The PCF is a real-world extension of the existing on-chain Polkadot governance process. It is an\nunopinionated entity with no agenda, roadmap, or business purpose except to take actions directed to\nit via OpenGov referenda."}),"\n",(0,i.jsxs)(n.p,{children:["In cases where token holders are interested in proposing treasury expenditures or other actions that\ncould benefit from a real-world legal presence, off-chain accounts, accountable management, and\ncommunity ownership, they may author their proposals to include directions for the PCF to fulfill\nthese functions. The PCF\u2019s functions are fulfilled by\n",(0,i.jsx)(n.a,{href:"#administrator",children:"a 3rd party foundation administrator"}),"."]}),"\n",(0,i.jsx)(n.p,{children:"So long as the PCF receives sufficient detail, funding, and authority to carry out its directions,\nthe PCF administrators will do so within the confines of any legal, regulatory, and contractual\nobligations."}),"\n",(0,i.jsx)(n.h2,{id:"pcf-background",children:"PCF Background"}),"\n",(0,i.jsx)(n.p,{children:"Decentralized protocols and organizations increasingly require a bridge between the analog,\ncentralized world and a more fully digital and decentralized future while complying with applicable\nlaws and regulations."}),"\n",(0,i.jsxs)(n.p,{children:["In the past, there has been a significant reliance on the\n",(0,i.jsx)(n.a,{href:"https://web3.foundation/",children:"Web3 Foundation"})," and ",(0,i.jsx)(n.a,{href:"https://www.parity.io/",children:"Parity Technologies"})," to\nadvance the ecosystem off-chain. While those organizations are philosophically aligned to the health\nand growth of Polkadot, their corporate governance structures offer no formal role or rights to DOT\nholders (nor are they in a good position to do so)."]}),"\n",(0,i.jsx)(n.p,{children:"As Polkadot evolves to decentralize governance further, and as Parity and the Web3 Foundation look\nto turn over critical functions to the community, it will benefit from a legal entity to effectuate\nPolkadot community governance in the \u201creal world.\u201d"}),"\n",(0,i.jsx)(n.p,{children:"The PCF is designed to represent and explicitly serve DOT holders\u2019 interests off-chain. Its\ngoverning documents grant DOT holders permanent, irrevocable rights to guide its activities and\noversee significant matters through the existing on-chain Polkadot OpenGov system."}),"\n",(0,i.jsx)(n.h2,{id:"pcf-activities",children:"PCF Activities"}),"\n",(0,i.jsx)(n.p,{children:"The PCF will take on activities delegated to it by Polkadot governance. The community will likely\ndiscover and evolve its thinking over time about which activities are best delegated to the\nFoundation, but as a rule of thumb, any activity that is best served with a legal contract that\nrequires fiat payments or physical presence, or that requires active project management is\nappropriate for the Foundation to execute on the community\u2019s behalf."}),"\n",(0,i.jsx)(n.p,{children:"Initially, the Foundation will have a minimal scope to:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Create and maintain a compliant off-chain organization capable of acting on directives from the\ncommunity,"}),"\n",(0,i.jsx)(n.li,{children:"Taking custody of accounts, logins, keys, and assets as a form of community ownership,"}),"\n",(0,i.jsx)(n.li,{children:"Executing contract agreements with partners, vendors, and service providers."}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"Additional activities that require additional resources for project management, capital\nexpenditures, business development, technical development, etc., will likely require incremental\nbudget, staff, and legal design, which can be provisioned through subsequent line-item OpenGov\ntreasury proposals. This allows the Foundation to adapt and grow to suit the community\u2019s directives\nas they become concrete."}),"\n",(0,i.jsx)(n.p,{children:"Some hypothetical future activities that the community may consider delegating to the Foundation can\ninclude:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Retail marketing activities, e.g., social ad campaigns targeting developers"}),"\n",(0,i.jsxs)(n.li,{children:["Educational programs, e.g. ",(0,i.jsx)(n.a,{href:"https://polkadot.com/blockchain-academy",children:"Polkadot Blockchain Academy"})]}),"\n",(0,i.jsx)(n.li,{children:"Complex grants programs, e.g., tranched or actively managed awards tied to milestones"}),"\n",(0,i.jsx)(n.li,{children:"Community events, e.g., contracting with venues and service providers for physical gatherings"}),"\n",(0,i.jsxs)(n.li,{children:["Code management, e.g., maintain ",(0,i.jsx)(n.a,{href:"https://github.com/polkadot-js",children:"the polkadot-js GitHub repo"})]}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"As the community gains interest in various use cases, it can direct the Foundation to explore them\nin greater depth and report on how it can execute them."}),"\n",(0,i.jsx)(n.h2,{id:"pcf-entity-design",children:"PCF Entity Design"}),"\n",(0,i.jsx)(n.p,{children:"The proposed structure incorporates several features to optimize trust, risk, and efficiency. It\nbalances community representation with professional robustness, minimizes the treasury assets at\nrisk, maximizes the ability to adjust and evolve, and allows each proposed activity to be evaluated\non its merits."}),"\n",(0,i.jsx)(n.h2,{id:"pcf-corporate-structure",children:"PCF Corporate Structure"}),"\n",(0,i.jsx)(n.p,{children:"Cayman Islands foundation companies offer a unique way to assign important rights to a broader\nstakeholder pool beyond traditional shareholders, directors, and employees. This proposal uses that\nfeature to give DOT holders significant oversight and important powers to ensure that the Foundation\ncarries out its business appropriately."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Memberless:"})," There are no members or shareholders who hold an economic claim over the Foundation.\nThis eliminates a common source of conflict between legal entities and the communities they serve."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Supervisor:"})," There is a ",(0,i.jsx)(n.a,{href:"#supervisor",children:"supervisor role"})," whose primary purpose is to oversee the\n",(0,i.jsx)(n.a,{href:"#directors",children:"Board of Directors"})," and ensure that the Foundation\u2019s governing documents are upheld.\nThe supervisor holds legal standing to act on behalf of the foundation if directors diverge from\ntheir commitments or fail in their fiduciary duties. Given that the governing documents specifically\ninstruct the directors to respect token holder preferences, provide adequate transparency, and not\ndilute the rights given to token holders, the Supervisor acts as a direct safeguard for token holder\ninterests."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Directors:"})," The Foundation will have a five-member Board of Directors, divided between:"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:"A three-director majority served by Cayman resident professional governance service providers to\nensure the Foundation is sufficiently independent of other entities in the Polkadot ecosystem and\nto comply with the Cayman Islands economic substance requirements."}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:"Two seats reserved for future directors to be appointed by Polkadot governance to ensure token\nholder interests are fully represented and considered in all matters."}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Staff & Administration:"})," Day-to-day administration will be outsourced to a Cayman Islands-based\nprofessional services firm, reporting to the Board of Directors. These needs may fluctuate over time\ndepending on the scope of activities delegated to the Foundation, and the Foundation will maintain\nflexibility to add, modify, and redirect the administrative staff as needed. The administrator\u2019s\nduties include:"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Operational support and project management"}),"\n",(0,i.jsx)(n.li,{children:"Engaging and managing corporate service providers, including legal and bookkeeping"}),"\n",(0,i.jsx)(n.li,{children:"Actively engaging and collaborating with the community to help craft, review, and execute\ngovernance proposals for Foundation activities"}),"\n",(0,i.jsx)(n.li,{children:"Maintaining appropriate documentation and transparency reports and"}),"\n",(0,i.jsx)(n.li,{children:"Ensuring legal and regulatory compliance under applicable law"}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"DOT Holder Rights:"})," The Foundation\u2019s bylaws ensure special voting rights and protections for DOT\ntoken holders, including:"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Polkadot OpenGov treasury proposals are the Foundation\u2019s funding source, so DOT holders can choose\nto withhold future funding to cover basic operating expenses if they are unhappy with the\nFoundation."}),"\n",(0,i.jsx)(n.li,{children:"Delegating specific activities to the Foundation. These activities will be approved as referenda\nthrough on-chain Polkadot governance via OpenGov, using any track with adequate spending\npermissions. If approved, the Foundation\u2019s Directors will review approved referenda, and if they\nare appropriate and actionable, then the Foundation will execute the requested activities. The\ntoken holder-appointed Directors have full access to represent tokenholders\u2019 interests in all\nmatters and may notify the Supervisor and/or the community of any improprieties."}),"\n",(0,i.jsx)(n.li,{children:"Token holders can vote via Polkadot OpenGov\u2019s General Admin track to remove the Supervisor or\nDirectors who are not serving appropriately."}),"\n",(0,i.jsx)(n.li,{children:"Token holders can vote via Polkadot OpenGov\u2019s General Admin track to amend the Foundation\u2019s\nbylaws."}),"\n",(0,i.jsx)(n.li,{children:"A requirement that the Foundation cannot agree to any deliverables, responsibilities, or payments\nto third parties unless they have been pre-approved by tokenholders."}),"\n",(0,i.jsx)(n.li,{children:"A requirement that the Foundation make public transparency reports detailing the Foundation\u2019s\nactivities, including but not limited to transactions, proposal status, and ongoing efforts to\ncarry out approved proposals."}),"\n",(0,i.jsx)(n.li,{children:"Token holders can vote via Polkadot OpenGov\u2019s General Admin track to wind up the Foundation or\ninstruct it to transfer some or all of its assets to another charitable object."}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"pcf-initial-personnel",children:"PCF Initial Personnel"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Actum Node"})," interviewed several candidates for each role, including referrals from the\nabove-mentioned law firms, and members of the Polkadot community, and selected the following to\npropose as the initial office holders."]}),"\n",(0,i.jsx)(n.p,{children:"Please note that some of the candidates requested that their names and backgrounds be partially\nredacted in public internet posts to prevent spam and phishing vectors that could compromise\nthemselves or the Foundation. We extended the same level of privacy to all candidates for the same\nreasons."}),"\n",(0,i.jsx)(n.h3,{id:"supervisor",children:"Supervisor"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"J. Bain"})," is a career fiduciary services professional. He has a regulatory background, having\npreviously worked at the Cayman Islands Monetary Authority, and he has significant experience\noverseeing DAO foundations, other crypto-related entities, and traditional investment fund entities.\nMr. Bain was introduced by our Cayman Islands counsel and recommended by the CEO of a crypto\ninvestment firm that he governs."]}),"\n",(0,i.jsx)(n.h3,{id:"directors",children:"Directors"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"G. Kennedy"})," is an experienced governance professional. He has a legal background, having served\nas General Counsel and outside counsel to several Cayman and European investment funds, and he sits\non the board of several blockchain-related companies and foundations. Mr. Kennedy was introduced by\nour Cayman Islands counsel and strongly recommended by the General Counsel of an L1 development\ncompany and the CEO of a decentralized identity protocol that he also serves."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"M. Shaw"})," is an experienced governance professional. He is a serial finance entrepreneur, having\nfounded a DeFi protocol, a digital asset management company, and a data analytics company, among\nothers. He has a finance background with a focus on global markets. Mr. Shaw was introduced by the\nproposed Supervisor J Bain and strongly recommended by the Managing Director of a crypto investment\nfirm where he holds a director seat."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"E. Noyons"})," is an experienced governance professional. He has an accounting background from a \u201cbig\nfour\u201d firm and is a member of the Cayman Islands Institute of Professional Accountants. Mr. Noyons\nwas introduced by our Cayman Islands counsel and strongly recommended by the COO of an NFT Gaming\ncompany where he holds a director seat."]}),"\n",(0,i.jsx)(n.p,{children:"Two vacant seats, which Polkadot governance and only Polkadot governance can vote to fill at any\ntime."}),"\n",(0,i.jsx)(n.h3,{id:"administrator",children:"Administrator"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.a,{href:"https://autonomousprojects.co/",children:(0,i.jsx)(n.strong,{children:"Autonomous Projects"})})," is a team of professionals based in the\nCayman Islands with a collective 30+ years of web3 industry experience spanning legal, regulatory,\nfinance, operations, and investment management. This includes working with clients across the asset\nmanagement and web3 spectrum including Layer 1\u2019s, Layer 2\u2019s, and other scaling solutions, DeFi,\ninfrastructure, gaming, and NFTs across multiple different blockchains where we support our clients\nin the development, implementation, maintenance, support and upgrade of their day-to-day operations\nlayered with a keen understanding of the Cayman Islands\u2019 legal and regulatory landscape."]}),"\n",(0,i.jsx)(n.p,{children:"After a competitive process, Autonomous was selected for their previous experience working with the\nPolkadot ecosystem, their emphasis on sound financial & back office management, and their\nflexibility to adapt as the Foundation\u2019s operations evolve."}),"\n",(0,i.jsx)(n.h2,{id:"how-to-use-the-pcf",children:"How to use the PCF"}),"\n",(0,i.jsx)(n.p,{children:"To execute a proposal, the PCF needs clear, detailed instructions to ensure it acts in the\ncommunity's best interest. Because not all OpenGov proposals involve the PCF, the PCF requires that\nproposers adopt certain requirements to identify what is and is not intended for PCF action."}),"\n",(0,i.jsxs)(n.p,{children:["There are two types of Proposals: ",(0,i.jsx)(n.em,{children:"Foundation Funding Proposals"})," and ",(0,i.jsx)(n.em,{children:"Foundation Resolution\nProposals"}),"."]}),"\n",(0,i.jsx)(n.h3,{id:"foundation-funding-proposals",children:"Foundation Funding Proposals"}),"\n",(0,i.jsxs)(n.p,{children:["Foundation Funding Proposals are funding requests from the\n",(0,i.jsx)(n.a,{href:"/docs/learn-guides-treasury#creating-a-treasury-proposal",children:"Polkadot treasury"}),", specifying the\namount in the preimage's value field according to the level of spend required, and setting the\nbeneficiary to the PCF multisig wallet address. The Proposal must also include the intended use of\nfunds in a comment on the ",(0,i.jsx)(n.a,{href:"https://polkadot.polkassembly.io/opengov",children:"Polkassembly"})," website and begin\nwith \u201c[Polkadot Community Foundation]\u201d in its name. The referenda can use any\n",(0,i.jsx)(n.a,{href:"/docs/learn-polkadot-opengov-origins",children:"OpenGov origin"})," with sufficient spending permission."]}),"\n",(0,i.jsx)(n.p,{children:"Examples of Foundation Funding Proposals:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Request funding for developing a Mobile App"}),"\n",(0,i.jsx)(n.li,{children:"Request funding for growing the network's awareness through event attendance"}),"\n",(0,i.jsx)(n.li,{children:"Request funding for a Polkadot-branded clothing line"}),"\n",(0,i.jsx)(n.li,{children:"Request funding for a Polkadot-related advertisement campaign"}),"\n",(0,i.jsx)(n.li,{children:"Request funding for developing a Web3 game on Polkadot utilizing a 3rd party game developer"}),"\n",(0,i.jsx)(n.li,{children:"Request funding to diversify a portion of the Polkadot treasury into real-world asset investments"}),"\n",(0,i.jsx)(n.li,{children:"Propose funding to run a Polkadot-branded competition"}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"Ensure that the track selected aligns with the funding requested, according to the DOT amount\nallocated per track."}),"\n",(0,i.jsx)(n.h4,{id:"wallet-addresses",children:"Wallet Addresses"}),"\n",(0,i.jsx)(n.p,{children:"DOT requested on the relay chain"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"13ECX4PUNHTdnpXX6KNeyd2qQHmruX6LE42iHuXcaBWVjz3e\n"})}),"\n",(0,i.jsx)(n.p,{children:"USDT requested on Polkadot Asset Hub"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"167tDhLwaQ6kmqau1zwWx48Ux7CS1rxC9jW5kn8PeRZWAVUy\n"})}),"\n",(0,i.jsx)(n.p,{children:"Please be aware that any proposals approved for funding by the foundation will require all\nrecipients of those funds to undergo the necessary Know Your Customer (KYC) and/or Know Your\nBusiness (KYB) checks. This process may involve submitting personal information and supporting\ndocumentation. Proposals that do not meet these requirements or fail to provide the necessary\ndocumentation may be subject to rejection by the directors to avoid legal risk to the PCF and its\nother activities."}),"\n",(0,i.jsx)(n.h3,{id:"foundation-resolution-proposals",children:"Foundation Resolution Proposals"}),"\n",(0,i.jsxs)(n.p,{children:["Foundation Resolution Proposals indicate token holders' wishes for the foundation without requiring\nfunding. These must be of the type\n",(0,i.jsx)(n.a,{href:"/docs/learn-guides-polkadot-opengov#submitting-a-preimage",children:"system.remark"}),", with the remark\ntext starting with \u201c[Polkadot Community Foundation]\u201d and submitted using\n",(0,i.jsx)(n.a,{href:"/docs/learn-polkadot-opengov-origins#wish-for-change",children:"the Wish For Change submission track"}),"."]}),"\n",(0,i.jsx)(n.p,{children:"Examples of Foundation Resolution Proposals (Wish for Change)"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Propose a change to the Foundation\u2019s Bylaws"}),"\n",(0,i.jsx)(n.li,{children:"Propose the foundation not utilize certain 3rd party service providers."}),"\n",(0,i.jsx)(n.li,{children:"Propose to remove/change a supervisor"}),"\n",(0,i.jsx)(n.li,{children:"Propose to remove/change a director"}),"\n",(0,i.jsx)(n.li,{children:"Propose the PCF transfer all or some of its assets to a charitable entity"}),"\n",(0,i.jsx)(n.li,{children:"Propose to wind up the foundation"}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"how-to-write-a-funding-proposal-to-pcf",children:"How to Write a Funding Proposal to PCF"}),"\n",(0,i.jsx)(n.p,{children:"When determining the amount of funding to request for the PCF to execute a proposal, the author must\nconsider the PCF\u2019s costs to execute. If the instructions are unambiguous and actionable, require no\nfurther refinement, exploration, or discretion, and require minimal project management, then no\noverhead is required. Otherwise, the PCF will engage consultants and 3rd party service providers for\nspecialized expertise or external support needed to fulfill its objectives, execute specific tasks,\nor manage complex projects that exceed the capacity or knowledge of its internal team. As the PCF\nsometimes incurs legal or operational costs to execute a proposal, we suggest including a greater\nthan 5% overhead cost or $5,000 above the original funding request as a line item for PCF overhead\nto avoid any unforeseen issues. The PCF will always carry out its directives cost-efficiently and\nreturn any unspent budget to the treasury. Still, if a proposal has insufficient funding, the PCF\nmay be forced to request additional follow-on funding or, in extreme cases, reject a proposal for\nunviability."}),"\n",(0,i.jsx)(n.p,{children:"When consultants or 3rd party service providers for specialized expertise or external support are\nneeded, there are three approaches a proposal author may consider:"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:"Submitting a proposal with fully actionable implementation instructions for the PCF, with\nprovisions for activities outside its remit."}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:"Submitting a proposal directing the PCF to conduct a consulting or advisory project to create a\nfeasibility study and implementation plan for an idea and share its findings. The community could\nreview the findings and then create a second proposal to execute the project according to the\nsuggested implementation plan."}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:"Submitting a single proposal that combines both steps in the second approach, directing the PCF\nto conduct a consulting or advisory project to create an implementation plan, and then the\ndiscretion to proceed immediately into execution."}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.em,{children:"For assistance in deciding the best option, the PCF team is happy to discuss and offer proposal\nassessments to advise on sufficient budget, clarity, and structure."}),"\n",(0,i.jsx)(n.a,{href:"mailto:info@polkadotcommunity.foundation",children:"info@polkadotcommunity.foundation"})]}),"\n",(0,i.jsx)(n.p,{children:"The PCF\u2019s directors\u2019 roles include ensuring that The Foundation\u2019s actions do not create undue risk\nfor the foundation or the Polkadot community. Following the approval of a proposal via OpenGov, the\ndirectors can potentially reject it, if they determine that implementing it would compromise their\nfiduciary duties, violate the foundation governing documents, the Polkadot community governance\nprocess, or any applicable laws or regulations, cause harm to the PCF or breach existing contracts.\nThey can also reject proposals that lack sufficient detail, are too vague for implementation, or\nlack adequate funding. This is an action the PCF wants to avoid as much as possible; therefore,\nsubmitted proposals must be as detailed and researched as possible to have a greater chance of\napproval."}),"\n",(0,i.jsx)(n.h2,{id:"pcf-faq",children:"PCF FAQ"}),"\n",(0,i.jsx)(n.h3,{id:"pcf-general-faq",children:"PCF General FAQ"}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"Why a Cayman Foundation Company and not a Swiss Foundation?"})}),"\n",(0,i.jsx)(n.p,{children:"A Swiss Foundation structure is a valid option for this entity, but the Cayman structure offers\ngreater operational ease and flexibility. Swiss Foundations are subject to income tax by default\nunless government authorities explicitly grant exceptions, which come with specific requirements. In\ncontrast, Cayman Foundation Companies are tax-exempt by default."}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"Can this Foundation service Kusama as well?"})}),"\n",(0,i.jsx)(n.p,{children:"As the Foundation reserves certain rights and powers for token holders, it is unclear how the\ncombination of DOT and KSM holders, with differing governance instances, can jointly indicate their\npreferences."}),"\n",(0,i.jsx)(n.p,{children:"After gathering input from key members of the Polkadot community and legal counsel, we suggest\nmoving forward with a Foundation to serve only DOT holders initially. Later, as a separate\ninitiative we can consider creating a similar but separate foundation to serve KSM holders, and\nperhaps even help facilitate the creation of similar foundations for any parachain or DAO in the\nPolkadot ecosystem."}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"How does this foundation shield token holders and governance participants from liability?"})}),"\n",(0,i.jsx)(n.p,{children:"If someone were to make a legal claim that a Polkadot OpenGov action harmed them somehow, everyone\nwho participated in governance may be liable. However, suppose the action was taken by a legal\nentity with limited liability, like the Polkadot Community Foundation. In that case, it may be held\nliable, but it absorbs the risk and shields the liability of governance participants and token\nholders. This is an advantage of routing activities through the Foundation."}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"How will token holders know if the foundation is doing what it\u2019s supposed to?"})}),"\n",(0,i.jsx)(n.p,{children:"Token holders can appoint 2 of the five directors and the supervisor. The idea is that this lets\nthem choose known people who share their values and are committed to Polkadot to gain full access to\neverything happening inside the foundation, and the ability to represent the token holders in all\ndecisions."}),"\n",(0,i.jsx)(n.p,{children:"The bylaws also require quarterly public transparency reports. Over time, that can mature to become\nrobust real-time reporting if:"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsx)(n.li,{children:"the foundation team does that proactively,"}),"\n",(0,i.jsx)(n.li,{children:"if token holders provide additional funding and explicit instructions to enable real-time\nreporting, or"}),"\n",(0,i.jsx)(n.li,{children:"if tokenholders vote to amend the bylaws to require real-time reporting."}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"How do we avoid service providers or directors turning passive or amassing power over time?"})}),"\n",(0,i.jsx)(n.p,{children:"A vote of token holders can remove any service provider, director, or supervisor at any time. In the\nfuture, the community could decide to implement a seat rotation, term limits, or other measures to\nreduce the risk of bureaucratic power. These are not provisioned in the current proposal but can be\ndecided via a proposal on the Polkadot OpenGov General Admin track at any time."}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"Can a director spend the foundation\u2019s money however they want?"})}),"\n",(0,i.jsx)(n.p,{children:"No. This depends on the operating policies the foundation team puts into place, like how many people\nhave to approve/sign any expenditures, if small expenditures are pre-authorized, etc. As with any\ntraditional company, it is technically possible for someone to spend money they\u2019re not supposed to.\nBut ultimately, there are several types of recourse if this were to happen."}),"\n",(0,i.jsx)(n.p,{children:"If a service provider spends money in a way that the directors didn\u2019t authorize, the service\nprovider is likely in breach of their contract and subject to legal action. If a director spends\nmoney that is not properly authorized by the board, the other directors or the supervisor can act.\nIf they don\u2019t, the token holders can replace them with someone who will."}),"\n",(0,i.jsx)(n.p,{children:"Finally, the design of this Foundation as an option, with funding coming only as needed, minimizes\nthe funds at risk and ensures the Foundation stays reliant on community trust."}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"What if there\u2019s a bad actor?"})}),"\n",(0,i.jsx)(n.p,{children:"We built redundant checks and balances into the governance system. No one person and no one layer of\ngovernance is immune. In addition, we selected professional governance professionals for each role,\nwhose businesses rely heavily on maintaining a good reputation. Ultimately, all trails end with the\ntokenholders\u2019 ability to fire people, withhold budget, or dissolve the foundation in case of any\nextreme events."}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"Who can fire a director?"})}),"\n",(0,i.jsx)(n.p,{children:"The bylaws allow two ways for a director to be fired. By a director vote or token holder vote via\nthe OpenGov General Admin track. What if the directors collude?"}),"\n",(0,i.jsx)(n.p,{children:"Colluding directors would have to do so in full sight of the tokenholder-appointed directors and the\nsupervisor. If all those people colluded, the tokenholders could remove them, withhold the budget,\nor dissolve the foundation."}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"Who can appoint a Cayman Professional director after one has been removed?"})}),"\n",(0,i.jsx)(n.p,{children:"The three director seats not tokenholder-appointed are filled by a director vote, meaning all the\ncurrently filled seats include both those appointed by tokenholders and those not. The supervisor\ncan appoint one as a backstop if there are no active directors."}),"\n",(0,i.jsx)(n.p,{children:"Technically, these seats that are not tokenholder-appointed do not always have to be filled by\nCayman professionals, but the advice we received is that having a majority based in the Cayman\nIslands is an important tax and regulatory consideration."}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"Can the tokenholders sue?"})}),"\n",(0,i.jsx)(n.p,{children:"Potentially, but coordination to prove those bringing suit represent \u201cthe token holders\u201d as a class\nwould likely be difficult, costly, and require doxing themselves."}),"\n",(0,i.jsx)(n.p,{children:"However, the supervisor has a unique role in Cayman Foundation Companies with legal standing to sue\ndirectors who violate the Foundation\u2019s governing documents. Those documents instruct the directors\nto respect tokenholder preferences. Suppose tokenholders ever feel that the supervisor is not acting\nappropriately. In that case, they can remove and replace the supervisor at any time by approving a\nproposal to do so on Polkadot OpenGov\u2019s General Admin track."}),"\n",(0,i.jsx)(n.h3,{id:"pcf-proposal-faq",children:"PCF Proposal FAQ"}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"Who can submit a proposal to the PCF?"})}),"\n",(0,i.jsx)(n.p,{children:"Any token holder who has a valid and actionable idea that aligns with the goals and vision of the\nPolkadot ecosystem can submit a proposal."}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"How do I ensure my proposal is appropriately funded?"})}),"\n",(0,i.jsx)(n.p,{children:"Provide a detailed budget breakdown in your proposal, including all anticipated costs. It\u2019s crucial\nto account for all phases of the project, potential contingencies, and any third-party costs, such\nas contractor, consulting, and legal fees."}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"Where can I find referenda creation guidelines?"})}),"\n",(0,i.jsxs)(n.p,{children:["This can be found on\n",(0,i.jsx)(n.a,{href:"https://docs.polkassembly.io/opengov/learn-about-referenda/creating-a-referendum/creating-a-referendum-on-polkassembly",children:"the Polkassembly docs website"}),",\nor ",(0,i.jsx)(n.a,{href:"/docs/learn-guides-polkadot-opengov#create-a-referenda-proposal",children:"Polkadot-JS guides"}),"."]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"What happens if the proposal isn\u2019t sufficiently funded during the execution phase?"})}),"\n",(0,i.jsx)(n.p,{children:"If additional funding is needed during the execution phase, you must submit a supplemental funding\nrequest. This request will be evaluated similarly to your original proposal, and additional funds\nwill be allocated if approved."}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"What happens to any funds remaining after a proposal has been executed?"})}),"\n",(0,i.jsx)(n.p,{children:"Any remaining funds after the successful completion of a project should be returned to the Polkadot\ncommunity treasury unless otherwise agreed upon in the initial proposal."}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"Are there any specific requirements for proposals that involve third parties?"})}),"\n",(0,i.jsx)(n.p,{children:"Yes, any proposals that require the PCF to engage with third parties (contractors, etc.) must\ninclude funding for contractor fees, onboarding processes, such as background checks and MSA\nreviews."}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"Where is the foundation incorporated?"})}),"\n",(0,i.jsx)(n.p,{children:"The Polkadot Community Foundation is incorporated in the Cayman Islands."}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"Are there any Cayman Islands-specific considerations I need to be aware of?"})}),"\n",(0,i.jsx)(n.p,{children:"Yes, proposals must comply with Cayman Islands laws and regulations. Activities prohibited in the\nCayman Islands, such as certain financial transactions or business practices, cannot be funded or\nexecuted. E.g., Activities involving money laundering or gambling."}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"Who are the signers on the PCF beneficiary multi-sig?"})}),"\n",(0,i.jsx)(n.p,{children:"The signers controlling these addresses are experienced, competent, and well-known individuals\nwithin the Polkadot ecosystem."}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"Can I get feedback if my proposal is rejected?"})}),"\n",(0,i.jsx)(n.p,{children:"Yes, we provide feedback on rejected proposals to help you understand the reasons and improve future\nsubmissions."}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"Who can I contact for more information or assistance?"})}),"\n",(0,i.jsxs)(n.p,{children:["For any questions or assistance, please get in touch with the PCF team at\n",(0,i.jsx)(n.a,{href:"mailto:info@polkadotcommunity.foundation",children:"info@polkadotcommunity.foundation"})]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"What does the PCF not do?"})}),"\n",(0,i.jsx)(n.p,{children:"The PCF will not enact any proposals that create undue risk for the foundation or the Polkadot\ncommunity, compromise their fiduciary duties, violate foundation governing documents, the Polkadot\ncommunity governance process, or any applicable laws or regulations, cause harm to the PCF or breach\nexisting contracts. The foundation will not enact proposals that are too broad and require\ndiscretion/opinion from the PCF."}),"\n",(0,i.jsx)(n.h2,{id:"pcf-supporting-material",children:"PCF Supporting Material"}),"\n",(0,i.jsx)(n.admonition,{title:"Work in Progress",type:"info",children:(0,i.jsx)(n.p,{children:"The supporting material listed below is temporary. Final versions will be uploaded in due time."})}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://twitter.com/TheKusamarian/status/1838956632610669006",children:"Kusamarian AAG Video Discussion"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://docs.google.com/document/d/1tvWEuSU4JzrShNE_HR9p0cBiiQSGQ4dJ/edit",children:"Polkadot Community Foundation Constitution"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://docs.google.com/document/d/1Yrq5mAquY2pPW5ZBnl07Xt7Woj-HwGJd/edit?usp=sharing&ouid=109408449182956936927&rtpof=true&sd=true",children:"Polkadot Community Foundation Bylaws"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://docs.google.com/document/d/1rG6crLnwkXsl6hM-BsnmXpaTT9IfefQY/edit",children:"Polkadot Community Foundation M&A"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://polkadot.polkassembly.io/terms-and-conditions",children:"Terms of Service"})}),"\n",(0,i.jsx)(n.li,{children:"Forum code of conduct"}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(c,{...e})}):c(e)}},28453:(e,n,o)=>{o.d(n,{R:()=>r,x:()=>s});var t=o(96540);const i={},a=t.createContext(i);function r(e){const n=t.useContext(a);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function s(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),t.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/5dfc1fb1.e9fa3b5c.js b/assets/js/5dfc1fb1.e9fa3b5c.js deleted file mode 100644 index d3d69f5daa38..000000000000 --- a/assets/js/5dfc1fb1.e9fa3b5c.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1187],{2423:(e,n,o)=>{o.r(n),o.d(n,{assets:()=>d,contentTitle:()=>r,default:()=>h,frontMatter:()=>a,metadata:()=>s,toc:()=>l});var t=o(74848),i=o(28453);const a={id:"polkadot-community-foundation",title:"Polkadot Community Foundation",sidebar_label:"Polkadot Community Foundation",description:"Polkadot Community Foundation.",keywords:["polkadot","governance","OpenGov","community","polkadot community foundation"],slug:"../polkadot-community-foundation"},r=void 0,s={id:"general/polkadot-community-foundation",title:"Polkadot Community Foundation",description:"Polkadot Community Foundation.",source:"@site/../docs/general/pcf.md",sourceDirName:"general",slug:"/polkadot-community-foundation",permalink:"/docs/polkadot-community-foundation",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/pcf.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:172891341e4,frontMatter:{id:"polkadot-community-foundation",title:"Polkadot Community Foundation",sidebar_label:"Polkadot Community Foundation",description:"Polkadot Community Foundation.",keywords:["polkadot","governance","OpenGov","community","polkadot community foundation"],slug:"../polkadot-community-foundation"},sidebar:"docs",previous:{title:"Treasury",permalink:"/docs/learn-polkadot-opengov-treasury"},next:{title:"Ecosystem Funds",permalink:"/docs/ecosystem-funds"}},d={},l=[{value:"Role of the Polkadot Community Foundation",id:"role-of-the-polkadot-community-foundation",level:2},{value:"PCF Background",id:"pcf-background",level:2},{value:"PCF Activities",id:"pcf-activities",level:2},{value:"PCF Entity Design",id:"pcf-entity-design",level:2},{value:"PCF Corporate Structure",id:"pcf-corporate-structure",level:2},{value:"PCF Initial Personnel",id:"pcf-initial-personnel",level:2},{value:"Supervisor",id:"supervisor",level:3},{value:"Directors",id:"directors",level:3},{value:"Administrator",id:"administrator",level:3},{value:"How to use the PCF",id:"how-to-use-the-pcf",level:2},{value:"Foundation Funding Proposals",id:"foundation-funding-proposals",level:3},{value:"Wallet Addresses",id:"wallet-addresses",level:4},{value:"Foundation Resolution Proposals",id:"foundation-resolution-proposals",level:3},{value:"How to Write a Funding Proposal to PCF",id:"how-to-write-a-funding-proposal-to-pcf",level:2},{value:"PCF FAQ",id:"pcf-faq",level:2},{value:"PCF General FAQ",id:"pcf-general-faq",level:3},{value:"PCF Proposal FAQ",id:"pcf-proposal-faq",level:3},{value:"PCF Supporting Material",id:"pcf-supporting-material",level:2}];function c(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",h4:"h4",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(n.p,{children:["The Polkadot Community Foundation (PCF) is a foundation company incorporated in the Cayman Islands\nwhose activities are directed by DOT holders via\n",(0,t.jsx)(n.a,{href:"/docs/learn-polkadot-opengov",children:"Polkadot\u2019s OpenGov"}),"."]}),"\n",(0,t.jsxs)(n.p,{children:["The PCF is an optional off-chain vehicle for OpenGov to execute tasks such as signing commercial\ncontracts, making fiat payments, enforcing intellectual property, and contracting third-party\nservice providers like consultants. Unlike typical companies, the PCF has no shareholders, members,\ntrustees, or beneficiaries whose interests could conflict with those of the token holders. See more\nabout PCF in ",(0,t.jsx)(n.a,{href:"https://polkadot.polkassembly.io/referenda/730",children:"the original OpenGov proposal"}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"role-of-the-polkadot-community-foundation",children:"Role of the Polkadot Community Foundation"}),"\n",(0,t.jsx)(n.p,{children:"The PCF is a real-world extension of the existing on-chain Polkadot governance process. It is an\nunopinionated entity with no agenda, roadmap, or business purpose except to take actions directed to\nit via OpenGov referenda."}),"\n",(0,t.jsxs)(n.p,{children:["In cases where token holders are interested in proposing treasury expenditures or other actions that\ncould benefit from a real-world legal presence, off-chain accounts, accountable management, and\ncommunity ownership, they may author their proposals to include directions for the PCF to fulfill\nthese functions. The PCF\u2019s functions are fulfilled by\n",(0,t.jsx)(n.a,{href:"#administrator",children:"a 3rd party foundation administrator"}),"."]}),"\n",(0,t.jsx)(n.p,{children:"So long as the PCF receives sufficient detail, funding, and authority to carry out its directions,\nthe PCF administrators will do so within the confines of any legal, regulatory, and contractual\nobligations."}),"\n",(0,t.jsx)(n.h2,{id:"pcf-background",children:"PCF Background"}),"\n",(0,t.jsx)(n.p,{children:"Decentralized protocols and organizations increasingly require a bridge between the analog,\ncentralized world and a more fully digital and decentralized future while complying with applicable\nlaws and regulations."}),"\n",(0,t.jsxs)(n.p,{children:["In the past, there has been a significant reliance on the\n",(0,t.jsx)(n.a,{href:"https://web3.foundation/",children:"Web3 Foundation"})," and ",(0,t.jsx)(n.a,{href:"https://www.parity.io/",children:"Parity Technologies"})," to\nadvance the ecosystem off-chain. While those organizations are philosophically aligned to the health\nand growth of Polkadot, their corporate governance structures offer no formal role or rights to DOT\nholders (nor are they in a good position to do so)."]}),"\n",(0,t.jsx)(n.p,{children:"As Polkadot evolves to decentralize governance further, and as Parity and the Web3 Foundation look\nto turn over critical functions to the community, it will benefit from a legal entity to effectuate\nPolkadot community governance in the \u201creal world.\u201d"}),"\n",(0,t.jsx)(n.p,{children:"The PCF is designed to represent and explicitly serve DOT holders\u2019 interests off-chain. Its\ngoverning documents grant DOT holders permanent, irrevocable rights to guide its activities and\noversee significant matters through the existing on-chain Polkadot OpenGov system."}),"\n",(0,t.jsx)(n.h2,{id:"pcf-activities",children:"PCF Activities"}),"\n",(0,t.jsx)(n.p,{children:"The PCF will take on activities delegated to it by Polkadot governance. The community will likely\ndiscover and evolve its thinking over time about which activities are best delegated to the\nFoundation, but as a rule of thumb, any activity that is best served with a legal contract that\nrequires fiat payments or physical presence, or that requires active project management is\nappropriate for the Foundation to execute on the community\u2019s behalf."}),"\n",(0,t.jsx)(n.p,{children:"Initially, the Foundation will have a minimal scope to:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Create and maintain a compliant off-chain organization capable of acting on directives from the\ncommunity,"}),"\n",(0,t.jsx)(n.li,{children:"Taking custody of accounts, logins, keys, and assets as a form of community ownership,"}),"\n",(0,t.jsx)(n.li,{children:"Executing contract agreements with partners, vendors, and service providers."}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"Additional activities that require additional resources for project management, capital\nexpenditures, business development, technical development, etc., will likely require incremental\nbudget, staff, and legal design, which can be provisioned through subsequent line-item OpenGov\ntreasury proposals. This allows the Foundation to adapt and grow to suit the community\u2019s directives\nas they become concrete."}),"\n",(0,t.jsx)(n.p,{children:"Some hypothetical future activities that the community may consider delegating to the Foundation can\ninclude:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Retail marketing activities, e.g., social ad campaigns targeting developers"}),"\n",(0,t.jsxs)(n.li,{children:["Educational programs, e.g. ",(0,t.jsx)(n.a,{href:"https://polkadot.com/blockchain-academy",children:"Polkadot Blockchain Academy"})]}),"\n",(0,t.jsx)(n.li,{children:"Complex grants programs, e.g., tranched or actively managed awards tied to milestones"}),"\n",(0,t.jsx)(n.li,{children:"Community events, e.g., contracting with venues and service providers for physical gatherings"}),"\n",(0,t.jsxs)(n.li,{children:["Code management, e.g., maintain ",(0,t.jsx)(n.a,{href:"https://github.com/polkadot-js",children:"the polkadot-js GitHub repo"})]}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"As the community gains interest in various use cases, it can direct the Foundation to explore them\nin greater depth and report on how it can execute them."}),"\n",(0,t.jsx)(n.h2,{id:"pcf-entity-design",children:"PCF Entity Design"}),"\n",(0,t.jsx)(n.p,{children:"The proposed structure incorporates several features to optimize trust, risk, and efficiency. It\nbalances community representation with professional robustness, minimizes the treasury assets at\nrisk, maximizes the ability to adjust and evolve, and allows each proposed activity to be evaluated\non its merits."}),"\n",(0,t.jsx)(n.h2,{id:"pcf-corporate-structure",children:"PCF Corporate Structure"}),"\n",(0,t.jsx)(n.p,{children:"Cayman Islands foundation companies offer a unique way to assign important rights to a broader\nstakeholder pool beyond traditional shareholders, directors, and employees. This proposal uses that\nfeature to give DOT holders significant oversight and important powers to ensure that the Foundation\ncarries out its business appropriately."}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Memberless:"})," There are no members or shareholders who hold an economic claim over the Foundation.\nThis eliminates a common source of conflict between legal entities and the communities they serve."]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Supervisor:"})," There is a ",(0,t.jsx)(n.a,{href:"#supervisor",children:"supervisor role"})," whose primary purpose is to oversee the\n",(0,t.jsx)(n.a,{href:"#directors",children:"Board of Directors"})," and ensure that the Foundation\u2019s governing documents are upheld.\nThe supervisor holds legal standing to act on behalf of the foundation if directors diverge from\ntheir commitments or fail in their fiduciary duties. Given that the governing documents specifically\ninstruct the directors to respect token holder preferences, provide adequate transparency, and not\ndilute the rights given to token holders, the Supervisor acts as a direct safeguard for token holder\ninterests."]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Directors:"})," The Foundation will have a five-member Board of Directors, divided between:"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"A three-director majority served by Cayman resident professional governance service providers to\nensure the Foundation is sufficiently independent of other entities in the Polkadot ecosystem and\nto comply with the Cayman Islands economic substance requirements."}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Two seats reserved for future directors to be appointed by Polkadot governance to ensure token\nholder interests are fully represented and considered in all matters."}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Staff & Administration:"})," Day-to-day administration will be outsourced to a Cayman Islands-based\nprofessional services firm, reporting to the Board of Directors. These needs may fluctuate over time\ndepending on the scope of activities delegated to the Foundation, and the Foundation will maintain\nflexibility to add, modify, and redirect the administrative staff as needed. The administrator\u2019s\nduties include:"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Operational support and project management"}),"\n",(0,t.jsx)(n.li,{children:"Engaging and managing corporate service providers, including legal and bookkeeping"}),"\n",(0,t.jsx)(n.li,{children:"Actively engaging and collaborating with the community to help craft, review, and execute\ngovernance proposals for Foundation activities"}),"\n",(0,t.jsx)(n.li,{children:"Maintaining appropriate documentation and transparency reports and"}),"\n",(0,t.jsx)(n.li,{children:"Ensuring legal and regulatory compliance under applicable law"}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"DOT Holder Rights:"})," The Foundation\u2019s bylaws ensure special voting rights and protections for DOT\ntoken holders, including:"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Polkadot OpenGov treasury proposals are the Foundation\u2019s funding source, so DOT holders can choose\nto withhold future funding to cover basic operating expenses if they are unhappy with the\nFoundation."}),"\n",(0,t.jsx)(n.li,{children:"Delegating specific activities to the Foundation. These activities will be approved as referenda\nthrough on-chain Polkadot governance via OpenGov, using any track with adequate spending\npermissions. If approved, the Foundation\u2019s Directors will review approved referenda, and if they\nare appropriate and actionable, then the Foundation will execute the requested activities. The\ntoken holder-appointed Directors have full access to represent tokenholders\u2019 interests in all\nmatters and may notify the Supervisor and/or the community of any improprieties."}),"\n",(0,t.jsx)(n.li,{children:"Token holders can vote via Polkadot OpenGov\u2019s General Admin track to remove the Supervisor or\nDirectors who are not serving appropriately."}),"\n",(0,t.jsx)(n.li,{children:"Token holders can vote via Polkadot OpenGov\u2019s General Admin track to amend the Foundation\u2019s\nbylaws."}),"\n",(0,t.jsx)(n.li,{children:"A requirement that the Foundation cannot agree to any deliverables, responsibilities, or payments\nto third parties unless they have been pre-approved by tokenholders."}),"\n",(0,t.jsx)(n.li,{children:"A requirement that the Foundation make public transparency reports detailing the Foundation\u2019s\nactivities, including but not limited to transactions, proposal status, and ongoing efforts to\ncarry out approved proposals."}),"\n",(0,t.jsx)(n.li,{children:"Token holders can vote via Polkadot OpenGov\u2019s General Admin track to wind up the Foundation or\ninstruct it to transfer some or all of its assets to another charitable object."}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"pcf-initial-personnel",children:"PCF Initial Personnel"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Actum Node"})," interviewed several candidates for each role, including referrals from the\nabove-mentioned law firms, and members of the Polkadot community, and selected the following to\npropose as the initial office holders."]}),"\n",(0,t.jsx)(n.p,{children:"Please note that some of the candidates requested that their names and backgrounds be partially\nredacted in public internet posts to prevent spam and phishing vectors that could compromise\nthemselves or the Foundation. We extended the same level of privacy to all candidates for the same\nreasons."}),"\n",(0,t.jsx)(n.h3,{id:"supervisor",children:"Supervisor"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"J. Bain"})," is a career fiduciary services professional. He has a regulatory background, having\npreviously worked at the Cayman Islands Monetary Authority, and he has significant experience\noverseeing DAO foundations, other crypto-related entities, and traditional investment fund entities.\nMr. Bain was introduced by our Cayman Islands counsel and recommended by the CEO of a crypto\ninvestment firm that he governs."]}),"\n",(0,t.jsx)(n.h3,{id:"directors",children:"Directors"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"G. Kennedy"})," is an experienced governance professional. He has a legal background, having served\nas General Counsel and outside counsel to several Cayman and European investment funds, and he sits\non the board of several blockchain-related companies and foundations. Mr. Kennedy was introduced by\nour Cayman Islands counsel and strongly recommended by the General Counsel of an L1 development\ncompany and the CEO of a decentralized identity protocol that he also serves."]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"M. Shaw"})," is an experienced governance professional. He is a serial finance entrepreneur, having\nfounded a DeFi protocol, a digital asset management company, and a data analytics company, among\nothers. He has a finance background with a focus on global markets. Mr. Shaw was introduced by the\nproposed Supervisor J Bain and strongly recommended by the Managing Director of a crypto investment\nfirm where he holds a director seat."]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"E. Noyons"})," is an experienced governance professional. He has an accounting background from a \u201cbig\nfour\u201d firm and is a member of the Cayman Islands Institute of Professional Accountants. Mr. Noyons\nwas introduced by our Cayman Islands counsel and strongly recommended by the COO of an NFT Gaming\ncompany where he holds a director seat."]}),"\n",(0,t.jsx)(n.p,{children:"Two vacant seats, which Polkadot governance and only Polkadot governance can vote to fill at any\ntime."}),"\n",(0,t.jsx)(n.h3,{id:"administrator",children:"Administrator"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.a,{href:"https://autonomousprojects.co/",children:(0,t.jsx)(n.strong,{children:"Autonomous Projects"})})," is a team of professionals based in the\nCayman Islands with a collective 30+ years of web3 industry experience spanning legal, regulatory,\nfinance, operations, and investment management. This includes working with clients across the asset\nmanagement and web3 spectrum including Layer 1\u2019s, Layer 2\u2019s, and other scaling solutions, DeFi,\ninfrastructure, gaming, and NFTs across multiple different blockchains where we support our clients\nin the development, implementation, maintenance, support and upgrade of their day-to-day operations\nlayered with a keen understanding of the Cayman Islands\u2019 legal and regulatory landscape."]}),"\n",(0,t.jsx)(n.p,{children:"After a competitive process, Autonomous was selected for their previous experience working with the\nPolkadot ecosystem, their emphasis on sound financial & back office management, and their\nflexibility to adapt as the Foundation\u2019s operations evolve."}),"\n",(0,t.jsx)(n.h2,{id:"how-to-use-the-pcf",children:"How to use the PCF"}),"\n",(0,t.jsx)(n.p,{children:"To execute a proposal, the PCF needs clear, detailed instructions to ensure it acts in the\ncommunity's best interest. Because not all OpenGov proposals involve the PCF, the PCF requires that\nproposers adopt certain requirements to identify what is and is not intended for PCF action."}),"\n",(0,t.jsxs)(n.p,{children:["There are two types of Proposals: ",(0,t.jsx)(n.em,{children:"Foundation Funding Proposals"})," and ",(0,t.jsx)(n.em,{children:"Foundation Resolution\nProposals"}),"."]}),"\n",(0,t.jsx)(n.h3,{id:"foundation-funding-proposals",children:"Foundation Funding Proposals"}),"\n",(0,t.jsxs)(n.p,{children:["Foundation Funding Proposals are funding requests from the\n",(0,t.jsx)(n.a,{href:"/docs/learn-guides-treasury#creating-a-treasury-proposal",children:"Polkadot treasury"}),", specifying the\namount in the preimage's value field according to the level of spend required, and setting the\nbeneficiary to the PCF multisig wallet address. The Proposal must also include the intended use of\nfunds in a comment on the ",(0,t.jsx)(n.a,{href:"https://polkadot.polkassembly.io/opengov",children:"Polkassembly"})," website and begin\nwith \u201c[Polkadot Community Foundation]\u201d in its name. The referenda can use any\n",(0,t.jsx)(n.a,{href:"/docs/learn-polkadot-opengov-origins",children:"OpenGov origin"})," with sufficient spending permission."]}),"\n",(0,t.jsx)(n.p,{children:"Examples of Foundation Funding Proposals:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Request funding for developing a Mobile App"}),"\n",(0,t.jsx)(n.li,{children:"Request funding for growing the network's awareness through event attendance"}),"\n",(0,t.jsx)(n.li,{children:"Request funding for a Polkadot-branded clothing line"}),"\n",(0,t.jsx)(n.li,{children:"Request funding for a Polkadot-related advertisement campaign"}),"\n",(0,t.jsx)(n.li,{children:"Request funding for developing a Web3 game on Polkadot utilizing a 3rd party game developer"}),"\n",(0,t.jsx)(n.li,{children:"Request funding to diversify a portion of the Polkadot treasury into real-world asset investments"}),"\n",(0,t.jsx)(n.li,{children:"Propose funding to run a Polkadot-branded competition"}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"Ensure that the track selected aligns with the funding requested, according to the DOT amount\nallocated per track."}),"\n",(0,t.jsx)(n.h4,{id:"wallet-addresses",children:"Wallet Addresses"}),"\n",(0,t.jsx)(n.p,{children:"DOT requested on the relay chain"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"13ECX4PUNHTdnpXX6KNeyd2qQHmruX6LE42iHuXcaBWVjz3e\n"})}),"\n",(0,t.jsx)(n.p,{children:"USDT requested on Polkadot Asset Hub"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"167tDhLwaQ6kmqau1zwWx48Ux7CS1rxC9jW5kn8PeRZWAVUy\n"})}),"\n",(0,t.jsx)(n.p,{children:"Please be aware that any proposals approved for funding by the foundation will require all\nrecipients of those funds to undergo the necessary Know Your Customer (KYC) and/or Know Your\nBusiness (KYB) checks. This process may involve submitting personal information and supporting\ndocumentation. Proposals that do not meet these requirements or fail to provide the necessary\ndocumentation may be subject to rejection by the directors to avoid legal risk to the PCF and its\nother activities."}),"\n",(0,t.jsx)(n.h3,{id:"foundation-resolution-proposals",children:"Foundation Resolution Proposals"}),"\n",(0,t.jsxs)(n.p,{children:["Foundation Resolution Proposals indicate token holders' wishes for the foundation without requiring\nfunding. These must be of the type\n",(0,t.jsx)(n.a,{href:"/docs/learn-guides-polkadot-opengov#submitting-a-preimage",children:"system.remark"}),", with the remark\ntext starting with \u201c[Polkadot Community Foundation]\u201d and submitted using\n",(0,t.jsx)(n.a,{href:"/docs/learn-polkadot-opengov-origins#wish-for-change",children:"the Wish For Change submission track"}),"."]}),"\n",(0,t.jsx)(n.p,{children:"Examples of Foundation Resolution Proposals (Wish for Change)"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Propose a change to the Foundation\u2019s Bylaws"}),"\n",(0,t.jsx)(n.li,{children:"Propose the foundation not utilize certain 3rd party service providers."}),"\n",(0,t.jsx)(n.li,{children:"Propose to remove/change a supervisor"}),"\n",(0,t.jsx)(n.li,{children:"Propose to remove/change a director"}),"\n",(0,t.jsx)(n.li,{children:"Propose the PCF transfer all or some of its assets to a charitable entity"}),"\n",(0,t.jsx)(n.li,{children:"Propose to wind up the foundation"}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"how-to-write-a-funding-proposal-to-pcf",children:"How to Write a Funding Proposal to PCF"}),"\n",(0,t.jsx)(n.p,{children:"When determining the amount of funding to request for the PCF to execute a proposal, the author must\nconsider the PCF\u2019s costs to execute. If the instructions are unambiguous and actionable, require no\nfurther refinement, exploration, or discretion, and require minimal project management, then no\noverhead is required. Otherwise, the PCF will engage consultants and 3rd party service providers for\nspecialized expertise or external support needed to fulfill its objectives, execute specific tasks,\nor manage complex projects that exceed the capacity or knowledge of its internal team. As the PCF\nsometimes incurs legal or operational costs to execute a proposal, we suggest including a greater\nthan 5% overhead cost or $5,000 above the original funding request as a line item for PCF overhead\nto avoid any unforeseen issues. The PCF will always carry out its directives cost-efficiently and\nreturn any unspent budget to the treasury. Still, if a proposal has insufficient funding, the PCF\nmay be forced to request additional follow-on funding or, in extreme cases, reject a proposal for\nunviability."}),"\n",(0,t.jsx)(n.p,{children:"When consultants or 3rd party service providers for specialized expertise or external support are\nneeded, there are three approaches a proposal author may consider:"}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Submitting a proposal with fully actionable implementation instructions for the PCF, with\nprovisions for activities outside its remit."}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Submitting a proposal directing the PCF to conduct a consulting or advisory project to create a\nfeasibility study and implementation plan for an idea and share its findings. The community could\nreview the findings and then create a second proposal to execute the project according to the\nsuggested implementation plan."}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Submitting a single proposal that combines both steps in the second approach, directing the PCF\nto conduct a consulting or advisory project to create an implementation plan, and then the\ndiscretion to proceed immediately into execution."}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.em,{children:"For assistance in deciding the best option, the PCF team is happy to discuss and offer proposal\nassessments to advise on sufficient budget, clarity, and structure."}),"\n",(0,t.jsx)(n.a,{href:"mailto:info@polkadotcommunity.foundation",children:"info@polkadotcommunity.foundation"})]}),"\n",(0,t.jsx)(n.p,{children:"The PCF\u2019s directors\u2019 roles include ensuring that The Foundation\u2019s actions do not create undue risk\nfor the foundation or the Polkadot community. Following the approval of a proposal via OpenGov, the\ndirectors can potentially reject it, if they determine that implementing it would compromise their\nfiduciary duties, violate the foundation governing documents, the Polkadot community governance\nprocess, or any applicable laws or regulations, cause harm to the PCF or breach existing contracts.\nThey can also reject proposals that lack sufficient detail, are too vague for implementation, or\nlack adequate funding. This is an action the PCF wants to avoid as much as possible; therefore,\nsubmitted proposals must be as detailed and researched as possible to have a greater chance of\napproval."}),"\n",(0,t.jsx)(n.h2,{id:"pcf-faq",children:"PCF FAQ"}),"\n",(0,t.jsx)(n.h3,{id:"pcf-general-faq",children:"PCF General FAQ"}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Why a Cayman Foundation Company and not a Swiss Foundation?"})}),"\n",(0,t.jsx)(n.p,{children:"A Swiss Foundation structure is a valid option for this entity, but the Cayman structure offers\ngreater operational ease and flexibility. Swiss Foundations are subject to income tax by default\nunless government authorities explicitly grant exceptions, which come with specific requirements. In\ncontrast, Cayman Foundation Companies are tax-exempt by default."}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Can this Foundation service Kusama as well?"})}),"\n",(0,t.jsx)(n.p,{children:"As the Foundation reserves certain rights and powers for token holders, it is unclear how the\ncombination of DOT and KSM holders, with differing governance instances, can jointly indicate their\npreferences."}),"\n",(0,t.jsx)(n.p,{children:"After gathering input from key members of the Polkadot community and legal counsel, we suggest\nmoving forward with a Foundation to serve only DOT holders initially. Later, as a separate\ninitiative we can consider creating a similar but separate foundation to serve KSM holders, and\nperhaps even help facilitate the creation of similar foundations for any parachain or DAO in the\nPolkadot ecosystem."}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"How does this foundation shield token holders and governance participants from liability?"})}),"\n",(0,t.jsx)(n.p,{children:"If someone were to make a legal claim that a Polkadot OpenGov action harmed them somehow, everyone\nwho participated in governance may be liable. However, suppose the action was taken by a legal\nentity with limited liability, like the Polkadot Community Foundation. In that case, it may be held\nliable, but it absorbs the risk and shields the liability of governance participants and token\nholders. This is an advantage of routing activities through the Foundation."}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"How will token holders know if the foundation is doing what it\u2019s supposed to?"})}),"\n",(0,t.jsx)(n.p,{children:"Token holders can appoint 2 of the five directors and the supervisor. The idea is that this lets\nthem choose known people who share their values and are committed to Polkadot to gain full access to\neverything happening inside the foundation, and the ability to represent the token holders in all\ndecisions."}),"\n",(0,t.jsx)(n.p,{children:"The bylaws also require quarterly public transparency reports. Over time, that can mature to become\nrobust real-time reporting if:"}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsx)(n.li,{children:"the foundation team does that proactively,"}),"\n",(0,t.jsx)(n.li,{children:"if token holders provide additional funding and explicit instructions to enable real-time\nreporting, or"}),"\n",(0,t.jsx)(n.li,{children:"if tokenholders vote to amend the bylaws to require real-time reporting."}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"How do we avoid service providers or directors turning passive or amassing power over time?"})}),"\n",(0,t.jsx)(n.p,{children:"A vote of token holders can remove any service provider, director, or supervisor at any time. In the\nfuture, the community could decide to implement a seat rotation, term limits, or other measures to\nreduce the risk of bureaucratic power. These are not provisioned in the current proposal but can be\ndecided via a proposal on the Polkadot OpenGov General Admin track at any time."}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Can a director spend the foundation\u2019s money however they want?"})}),"\n",(0,t.jsx)(n.p,{children:"No. This depends on the operating policies the foundation team puts into place, like how many people\nhave to approve/sign any expenditures, if small expenditures are pre-authorized, etc. As with any\ntraditional company, it is technically possible for someone to spend money they\u2019re not supposed to.\nBut ultimately, there are several types of recourse if this were to happen."}),"\n",(0,t.jsx)(n.p,{children:"If a service provider spends money in a way that the directors didn\u2019t authorize, the service\nprovider is likely in breach of their contract and subject to legal action. If a director spends\nmoney that is not properly authorized by the board, the other directors or the supervisor can act.\nIf they don\u2019t, the token holders can replace them with someone who will."}),"\n",(0,t.jsx)(n.p,{children:"Finally, the design of this Foundation as an option, with funding coming only as needed, minimizes\nthe funds at risk and ensures the Foundation stays reliant on community trust."}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"What if there\u2019s a bad actor?"})}),"\n",(0,t.jsx)(n.p,{children:"We built redundant checks and balances into the governance system. No one person and no one layer of\ngovernance is immune. In addition, we selected professional governance professionals for each role,\nwhose businesses rely heavily on maintaining a good reputation. Ultimately, all trails end with the\ntokenholders\u2019 ability to fire people, withhold budget, or dissolve the foundation in case of any\nextreme events."}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Who can fire a director?"})}),"\n",(0,t.jsx)(n.p,{children:"The bylaws allow two ways for a director to be fired. By a director vote or token holder vote via\nthe OpenGov General Admin track. What if the directors collude?"}),"\n",(0,t.jsx)(n.p,{children:"Colluding directors would have to do so in full sight of the tokenholder-appointed directors and the\nsupervisor. If all those people colluded, the tokenholders could remove them, withhold the budget,\nor dissolve the foundation."}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Who can appoint a Cayman Professional director after one has been removed?"})}),"\n",(0,t.jsx)(n.p,{children:"The three director seats not tokenholder-appointed are filled by a director vote, meaning all the\ncurrently filled seats include both those appointed by tokenholders and those not. The supervisor\ncan appoint one as a backstop if there are no active directors."}),"\n",(0,t.jsx)(n.p,{children:"Technically, these seats that are not tokenholder-appointed do not always have to be filled by\nCayman professionals, but the advice we received is that having a majority based in the Cayman\nIslands is an important tax and regulatory consideration."}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Can the tokenholders sue?"})}),"\n",(0,t.jsx)(n.p,{children:"Potentially, but coordination to prove those bringing suit represent \u201cthe token holders\u201d as a class\nwould likely be difficult, costly, and require doxing themselves."}),"\n",(0,t.jsx)(n.p,{children:"However, the supervisor has a unique role in Cayman Foundation Companies with legal standing to sue\ndirectors who violate the Foundation\u2019s governing documents. Those documents instruct the directors\nto respect tokenholder preferences. Suppose tokenholders ever feel that the supervisor is not acting\nappropriately. In that case, they can remove and replace the supervisor at any time by approving a\nproposal to do so on Polkadot OpenGov\u2019s General Admin track."}),"\n",(0,t.jsx)(n.h3,{id:"pcf-proposal-faq",children:"PCF Proposal FAQ"}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Who can submit a proposal to the PCF?"})}),"\n",(0,t.jsx)(n.p,{children:"Any token holder who has a valid and actionable idea that aligns with the goals and vision of the\nPolkadot ecosystem can submit a proposal."}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"How do I ensure my proposal is appropriately funded?"})}),"\n",(0,t.jsx)(n.p,{children:"Provide a detailed budget breakdown in your proposal, including all anticipated costs. It\u2019s crucial\nto account for all phases of the project, potential contingencies, and any third-party costs, such\nas contractor, consulting, and legal fees."}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Where can I find referenda creation guidelines?"})}),"\n",(0,t.jsxs)(n.p,{children:["This can be found on\n",(0,t.jsx)(n.a,{href:"https://docs.polkassembly.io/opengov/learn-about-referenda/creating-a-referendum/creating-a-referendum-on-polkassembly",children:"the Polkassembly docs website"}),",\nor ",(0,t.jsx)(n.a,{href:"/docs/learn-guides-polkadot-opengov#create-a-referenda-proposal",children:"Polkadot-JS guides"}),"."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"What happens if the proposal isn\u2019t sufficiently funded during the execution phase?"})}),"\n",(0,t.jsx)(n.p,{children:"If additional funding is needed during the execution phase, you must submit a supplemental funding\nrequest. This request will be evaluated similarly to your original proposal, and additional funds\nwill be allocated if approved."}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"What happens to any funds remaining after a proposal has been executed?"})}),"\n",(0,t.jsx)(n.p,{children:"Any remaining funds after the successful completion of a project should be returned to the Polkadot\ncommunity treasury unless otherwise agreed upon in the initial proposal."}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Are there any specific requirements for proposals that involve third parties?"})}),"\n",(0,t.jsx)(n.p,{children:"Yes, any proposals that require the PCF to engage with third parties (contractors, etc.) must\ninclude funding for contractor fees, onboarding processes, such as background checks and MSA\nreviews."}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Where is the foundation incorporated?"})}),"\n",(0,t.jsx)(n.p,{children:"The Polkadot Community Foundation is incorporated in the Cayman Islands."}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Are there any Cayman Islands-specific considerations I need to be aware of?"})}),"\n",(0,t.jsx)(n.p,{children:"Yes, proposals must comply with Cayman Islands laws and regulations. Activities prohibited in the\nCayman Islands, such as certain financial transactions or business practices, cannot be funded or\nexecuted. E.g., Activities involving money laundering or gambling."}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Who are the signers on the PCF beneficiary multi-sig?"})}),"\n",(0,t.jsx)(n.p,{children:"The signers controlling these addresses are experienced, competent, and well-known individuals\nwithin the Polkadot ecosystem."}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Can I get feedback if my proposal is rejected?"})}),"\n",(0,t.jsx)(n.p,{children:"Yes, we provide feedback on rejected proposals to help you understand the reasons and improve future\nsubmissions."}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Who can I contact for more information or assistance?"})}),"\n",(0,t.jsxs)(n.p,{children:["For any questions or assistance, please get in touch with the PCF team at\n",(0,t.jsx)(n.a,{href:"mailto:info@polkadotcommunity.foundation",children:"info@polkadotcommunity.foundation"})]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"What does the PCF not do?"})}),"\n",(0,t.jsx)(n.p,{children:"The PCF will not enact any proposals that create undue risk for the foundation or the Polkadot\ncommunity, compromise their fiduciary duties, violate foundation governing documents, the Polkadot\ncommunity governance process, or any applicable laws or regulations, cause harm to the PCF or breach\nexisting contracts. The foundation will not enact proposals that are too broad and require\ndiscretion/opinion from the PCF."}),"\n",(0,t.jsx)(n.h2,{id:"pcf-supporting-material",children:"PCF Supporting Material"}),"\n",(0,t.jsx)(n.admonition,{title:"Work in Progress",type:"info",children:(0,t.jsx)(n.p,{children:"The supporting material listed below is temporary. Final versions will be uploaded in due time."})}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://twitter.com/TheKusamarian/status/1838956632610669006",children:"Kusamarian AAG Video Discussion"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://docs.google.com/document/d/1tvWEuSU4JzrShNE_HR9p0cBiiQSGQ4dJ/edit",children:"Polkadot Community Foundation Constitution"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://docs.google.com/document/d/1Yrq5mAquY2pPW5ZBnl07Xt7Woj-HwGJd/edit?usp=sharing&ouid=109408449182956936927&rtpof=true&sd=true",children:"Polkadot Community Foundation Bylaws"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://docs.google.com/document/d/1rG6crLnwkXsl6hM-BsnmXpaTT9IfefQY/edit",children:"Polkadot Community Foundation M&A"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://polkadot.polkassembly.io/terms-and-conditions",children:"Terms of Service"})}),"\n",(0,t.jsx)(n.li,{children:"Forum code of conduct"}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(c,{...e})}):c(e)}},28453:(e,n,o)=>{o.d(n,{R:()=>r,x:()=>s});var t=o(96540);const i={},a=t.createContext(i);function r(e){const n=t.useContext(a);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function s(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),t.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/604.1c4a3eae.js b/assets/js/604.1c4a3eae.js deleted file mode 100644 index 1fc453f74eac..000000000000 --- a/assets/js/604.1c4a3eae.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[604],{70604:(t,e,r)=>{r.d(e,{diagram:()=>D});var i=r(86079),a=r(697),n=r(26312),s=r(21176);const o=[];for(let S=0;S<256;++S)o.push((S+256).toString(16).slice(1));function c(t,e=0){return o[t[e+0]]+o[t[e+1]]+o[t[e+2]]+o[t[e+3]]+"-"+o[t[e+4]]+o[t[e+5]]+"-"+o[t[e+6]]+o[t[e+7]]+"-"+o[t[e+8]]+o[t[e+9]]+"-"+o[t[e+10]]+o[t[e+11]]+o[t[e+12]]+o[t[e+13]]+o[t[e+14]]+o[t[e+15]]}const l=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;const h=function(t){return"string"==typeof t&&l.test(t)};const d=function(t){if(!h(t))throw TypeError("Invalid UUID");let e;const r=new Uint8Array(16);return r[0]=(e=parseInt(t.slice(0,8),16))>>>24,r[1]=e>>>16&255,r[2]=e>>>8&255,r[3]=255&e,r[4]=(e=parseInt(t.slice(9,13),16))>>>8,r[5]=255&e,r[6]=(e=parseInt(t.slice(14,18),16))>>>8,r[7]=255&e,r[8]=(e=parseInt(t.slice(19,23),16))>>>8,r[9]=255&e,r[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255,r[11]=e/4294967296&255,r[12]=e>>>24&255,r[13]=e>>>16&255,r[14]=e>>>8&255,r[15]=255&e,r};function y(t,e,r,i){switch(t){case 0:return e&r^~e&i;case 1:case 3:return e^r^i;case 2:return e&r^e&i^r&i}}function u(t,e){return t<>>32-e}const p=function(t,e,r){function i(t,i,a,n){var s;if("string"==typeof t&&(t=function(t){t=unescape(encodeURIComponent(t));const e=[];for(let r=0;r>>0;l=c,c=o,o=u(a,30)>>>0,a=i,i=s}r[0]=r[0]+i>>>0,r[1]=r[1]+a>>>0,r[2]=r[2]+o>>>0,r[3]=r[3]+c>>>0,r[4]=r[4]+l>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,255&r[0],r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,255&r[1],r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,255&r[2],r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,255&r[3],r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,255&r[4]]}));r(74353),r(16750),r(42838);var _=function(){var t=function(t,e,r,i){for(r=r||{},i=t.length;i--;r[t[i]]=e);return r},e=[6,8,10,20,22,24,26,27,28],r=[1,10],i=[1,11],a=[1,12],n=[1,13],s=[1,14],o=[1,15],c=[1,21],l=[1,22],h=[1,23],d=[1,24],y=[1,25],u=[6,8,10,13,15,18,19,20,22,24,26,27,28,41,42,43,44,45],p=[1,34],_=[27,28,46,47],f=[41,42,43,44,45],m=[17,34],E=[1,54],g=[1,53],O=[17,34,36,38],b={trace:function(){},yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,":":13,role:14,BLOCK_START:15,attributes:16,BLOCK_STOP:17,SQS:18,SQE:19,title:20,title_value:21,acc_title:22,acc_title_value:23,acc_descr:24,acc_descr_value:25,acc_descr_multiline_value:26,ALPHANUM:27,ENTITY_NAME:28,attribute:29,attributeType:30,attributeName:31,attributeKeyTypeList:32,attributeComment:33,ATTRIBUTE_WORD:34,attributeKeyType:35,COMMA:36,ATTRIBUTE_KEY:37,COMMENT:38,cardinality:39,relType:40,ZERO_OR_ONE:41,ZERO_OR_MORE:42,ONE_OR_MORE:43,ONLY_ONE:44,MD_PARENT:45,NON_IDENTIFYING:46,IDENTIFYING:47,WORD:48,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",8:"SPACE",10:"NEWLINE",13:":",15:"BLOCK_START",17:"BLOCK_STOP",18:"SQS",19:"SQE",20:"title",21:"title_value",22:"acc_title",23:"acc_title_value",24:"acc_descr",25:"acc_descr_value",26:"acc_descr_multiline_value",27:"ALPHANUM",28:"ENTITY_NAME",34:"ATTRIBUTE_WORD",36:"COMMA",37:"ATTRIBUTE_KEY",38:"COMMENT",41:"ZERO_OR_ONE",42:"ZERO_OR_MORE",43:"ONE_OR_MORE",44:"ONLY_ONE",45:"MD_PARENT",46:"NON_IDENTIFYING",47:"IDENTIFYING",48:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,4],[9,3],[9,1],[9,7],[9,6],[9,4],[9,2],[9,2],[9,2],[9,1],[11,1],[11,1],[16,1],[16,2],[29,2],[29,3],[29,3],[29,4],[30,1],[31,1],[32,1],[32,3],[35,1],[33,1],[12,3],[39,1],[39,1],[39,1],[39,1],[39,1],[40,1],[40,1],[14,1],[14,1],[14,1]],performAction:function(t,e,r,i,a,n,s){var o=n.length-1;switch(a){case 1:break;case 2:case 6:case 7:this.$=[];break;case 3:n[o-1].push(n[o]),this.$=n[o-1];break;case 4:case 5:case 19:case 43:case 27:case 28:case 31:this.$=n[o];break;case 8:i.addEntity(n[o-4]),i.addEntity(n[o-2]),i.addRelationship(n[o-4],n[o],n[o-2],n[o-3]);break;case 9:i.addEntity(n[o-3]),i.addAttributes(n[o-3],n[o-1]);break;case 10:i.addEntity(n[o-2]);break;case 11:i.addEntity(n[o]);break;case 12:i.addEntity(n[o-6],n[o-4]),i.addAttributes(n[o-6],n[o-1]);break;case 13:i.addEntity(n[o-5],n[o-3]);break;case 14:i.addEntity(n[o-3],n[o-1]);break;case 15:case 16:this.$=n[o].trim(),i.setAccTitle(this.$);break;case 17:case 18:this.$=n[o].trim(),i.setAccDescription(this.$);break;case 20:case 41:case 42:case 32:this.$=n[o].replace(/"/g,"");break;case 21:case 29:this.$=[n[o]];break;case 22:n[o].push(n[o-1]),this.$=n[o];break;case 23:this.$={attributeType:n[o-1],attributeName:n[o]};break;case 24:this.$={attributeType:n[o-2],attributeName:n[o-1],attributeKeyTypeList:n[o]};break;case 25:this.$={attributeType:n[o-2],attributeName:n[o-1],attributeComment:n[o]};break;case 26:this.$={attributeType:n[o-3],attributeName:n[o-2],attributeKeyTypeList:n[o-1],attributeComment:n[o]};break;case 30:n[o-2].push(n[o]),this.$=n[o-2];break;case 33:this.$={cardA:n[o],relType:n[o-1],cardB:n[o-2]};break;case 34:this.$=i.Cardinality.ZERO_OR_ONE;break;case 35:this.$=i.Cardinality.ZERO_OR_MORE;break;case 36:this.$=i.Cardinality.ONE_OR_MORE;break;case 37:this.$=i.Cardinality.ONLY_ONE;break;case 38:this.$=i.Cardinality.MD_PARENT;break;case 39:this.$=i.Identification.NON_IDENTIFYING;break;case 40:this.$=i.Identification.IDENTIFYING}},table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,20:r,22:i,24:a,26:n,27:s,28:o},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:16,11:9,20:r,22:i,24:a,26:n,27:s,28:o},t(e,[2,5]),t(e,[2,6]),t(e,[2,11],{12:17,39:20,15:[1,18],18:[1,19],41:c,42:l,43:h,44:d,45:y}),{21:[1,26]},{23:[1,27]},{25:[1,28]},t(e,[2,18]),t(u,[2,19]),t(u,[2,20]),t(e,[2,4]),{11:29,27:s,28:o},{16:30,17:[1,31],29:32,30:33,34:p},{11:35,27:s,28:o},{40:36,46:[1,37],47:[1,38]},t(_,[2,34]),t(_,[2,35]),t(_,[2,36]),t(_,[2,37]),t(_,[2,38]),t(e,[2,15]),t(e,[2,16]),t(e,[2,17]),{13:[1,39]},{17:[1,40]},t(e,[2,10]),{16:41,17:[2,21],29:32,30:33,34:p},{31:42,34:[1,43]},{34:[2,27]},{19:[1,44]},{39:45,41:c,42:l,43:h,44:d,45:y},t(f,[2,39]),t(f,[2,40]),{14:46,27:[1,49],28:[1,48],48:[1,47]},t(e,[2,9]),{17:[2,22]},t(m,[2,23],{32:50,33:51,35:52,37:E,38:g}),t([17,34,37,38],[2,28]),t(e,[2,14],{15:[1,55]}),t([27,28],[2,33]),t(e,[2,8]),t(e,[2,41]),t(e,[2,42]),t(e,[2,43]),t(m,[2,24],{33:56,36:[1,57],38:g}),t(m,[2,25]),t(O,[2,29]),t(m,[2,32]),t(O,[2,31]),{16:58,17:[1,59],29:32,30:33,34:p},t(m,[2,26]),{35:60,37:E},{17:[1,61]},t(e,[2,13]),t(O,[2,30]),t(e,[2,12])],defaultActions:{34:[2,27],41:[2,22]},parseError:function(t,e){if(!e.recoverable){var r=new Error(t);throw r.hash=e,r}this.trace(t)},parse:function(t){var e=this,r=[0],i=[],a=[null],n=[],s=this.table,o="",c=0,l=0,h=n.slice.call(arguments,1),d=Object.create(this.lexer),y={yy:{}};for(var u in this.yy)Object.prototype.hasOwnProperty.call(this.yy,u)&&(y.yy[u]=this.yy[u]);d.setInput(t,y.yy),y.yy.lexer=d,y.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var p=d.yylloc;n.push(p);var _=d.options&&d.options.ranges;"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var f,m,E,g,O,b,k,R,N,T={};;){if(m=r[r.length-1],this.defaultActions[m]?E=this.defaultActions[m]:(null==f&&(N=void 0,"number"!=typeof(N=i.pop()||d.lex()||1)&&(N instanceof Array&&(N=(i=N).pop()),N=e.symbols_[N]||N),f=N),E=s[m]&&s[m][f]),void 0===E||!E.length||!E[0]){var x="";for(O in R=[],s[m])this.terminals_[O]&&O>2&&R.push("'"+this.terminals_[O]+"'");x=d.showPosition?"Parse error on line "+(c+1)+":\n"+d.showPosition()+"\nExpecting "+R.join(", ")+", got '"+(this.terminals_[f]||f)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==f?"end of input":"'"+(this.terminals_[f]||f)+"'"),this.parseError(x,{text:d.match,token:this.terminals_[f]||f,line:d.yylineno,loc:p,expected:R})}if(E[0]instanceof Array&&E.length>1)throw new Error("Parse Error: multiple actions possible at state: "+m+", token: "+f);switch(E[0]){case 1:r.push(f),a.push(d.yytext),n.push(d.yylloc),r.push(E[1]),f=null,l=d.yyleng,o=d.yytext,c=d.yylineno,p=d.yylloc;break;case 2:if(b=this.productions_[E[1]][1],T.$=a[a.length-b],T._$={first_line:n[n.length-(b||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(b||1)].first_column,last_column:n[n.length-1].last_column},_&&(T._$.range=[n[n.length-(b||1)].range[0],n[n.length-1].range[1]]),void 0!==(g=this.performAction.apply(T,[o,l,c,y.yy,E[1],a,n].concat(h))))return g;b&&(r=r.slice(0,-1*b*2),a=a.slice(0,-1*b),n=n.slice(0,-1*b)),r.push(this.productions_[E[1]][0]),a.push(T.$),n.push(T._$),k=s[r[r.length-2]][r[r.length-1]],r.push(k);break;case 3:return!0}}return!0}},k={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1);var a=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===i.length?this.yylloc.first_column:0)+i[i.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[a[0],a[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var r,i,a;if(this.options.backtrack_lexer&&(a={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(a.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var n in a)this[n]=a[n];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,r,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var a=this._currentRules(),n=0;ne[0].length)){if(e=r,i=n,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,a[n])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,a[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,r,i){switch(r){case 0:return this.begin("acc_title"),22;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),24;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return 10;case 8:case 15:case 20:break;case 9:return 8;case 10:return 28;case 11:return 48;case 12:return 4;case 13:return this.begin("block"),15;case 14:return 36;case 16:return 37;case 17:case 18:return 34;case 19:return 38;case 21:return this.popState(),17;case 22:case 54:return e.yytext[0];case 23:return 18;case 24:return 19;case 25:case 29:case 30:case 43:return 41;case 26:case 27:case 28:case 36:case 38:case 45:return 43;case 31:case 32:case 33:case 34:case 35:case 37:case 44:return 42;case 39:case 40:case 41:case 42:return 44;case 46:return 45;case 47:case 50:case 51:case 52:return 46;case 48:case 49:return 47;case 53:return 27;case 55:return 6}},rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:,)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i,/^(?:(.*?)[~](.*?)*[~])/i,/^(?:[\*A-Za-z_][A-Za-z0-9\-_\[\]\(\)]*)/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:one or zero\b)/i,/^(?:one or more\b)/i,/^(?:one or many\b)/i,/^(?:1\+)/i,/^(?:\|o\b)/i,/^(?:zero or one\b)/i,/^(?:zero or more\b)/i,/^(?:zero or many\b)/i,/^(?:0\+)/i,/^(?:\}o\b)/i,/^(?:many\(0\))/i,/^(?:many\(1\))/i,/^(?:many\b)/i,/^(?:\}\|)/i,/^(?:one\b)/i,/^(?:only one\b)/i,/^(?:1\b)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:\s*u\b)/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:[A-Za-z_][A-Za-z0-9\-_]*)/i,/^(?:.)/i,/^(?:$)/i],conditions:{acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},block:{rules:[14,15,16,17,18,19,20,21,22],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55],inclusive:!0}}};function R(){this.yy={}}return b.lexer=k,R.prototype=b,b.Parser=R,new R}();_.parser=_;const f=_;let m={},E=[];const g=function(t,e=void 0){return void 0===m[t]?(m[t]={attributes:[],alias:e},i.l.info("Added new entity :",t)):m[t]&&!m[t].alias&&e&&(m[t].alias=e,i.l.info(`Add alias '${e}' to entity '${t}'`)),m[t]},O={Cardinality:{ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE",MD_PARENT:"MD_PARENT"},Identification:{NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},getConfig:()=>(0,i.c)().er,addEntity:g,addAttributes:function(t,e){let r,a=g(t);for(r=e.length-1;r>=0;r--)a.attributes.push(e[r]),i.l.debug("Added attribute ",e[r].attributeName)},getEntities:()=>m,addRelationship:function(t,e,r,a){let n={entityA:t,roleA:e,entityB:r,relSpec:a};E.push(n),i.l.debug("Added new relationship :",n)},getRelationships:()=>E,clear:function(){m={},E=[],(0,i.v)()},setAccTitle:i.s,getAccTitle:i.g,setAccDescription:i.b,getAccDescription:i.a,setDiagramTitle:i.q,getDiagramTitle:i.t},b={ONLY_ONE_START:"ONLY_ONE_START",ONLY_ONE_END:"ONLY_ONE_END",ZERO_OR_ONE_START:"ZERO_OR_ONE_START",ZERO_OR_ONE_END:"ZERO_OR_ONE_END",ONE_OR_MORE_START:"ONE_OR_MORE_START",ONE_OR_MORE_END:"ONE_OR_MORE_END",ZERO_OR_MORE_START:"ZERO_OR_MORE_START",ZERO_OR_MORE_END:"ZERO_OR_MORE_END",MD_PARENT_END:"MD_PARENT_END",MD_PARENT_START:"MD_PARENT_START"},k=b,R=function(t,e){let r;t.append("defs").append("marker").attr("id",b.MD_PARENT_START).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",b.MD_PARENT_END).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",b.ONLY_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18 M15,0 L15,18"),t.append("defs").append("marker").attr("id",b.ONLY_ONE_END).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,0 L3,18 M9,0 L9,18"),r=t.append("defs").append("marker").attr("id",b.ZERO_OR_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18"),r=t.append("defs").append("marker").attr("id",b.ZERO_OR_ONE_END).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,0 L21,18"),t.append("defs").append("marker").attr("id",b.ONE_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),t.append("defs").append("marker").attr("id",b.ONE_OR_MORE_END).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18"),r=t.append("defs").append("marker").attr("id",b.ZERO_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18"),r=t.append("defs").append("marker").attr("id",b.ZERO_OR_MORE_END).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},N=/[^\dA-Za-z](\W)*/g;let T={},x=new Map;const A=function(t,e,r){let a;return Object.keys(e).forEach((function(n){const s=function(t="",e=""){const r=t.replace(N,"");return`${v(e)}${v(r)}${p(t,I)}`}(n,"entity");x.set(n,s);const o=t.append("g").attr("id",s);a=void 0===a?s:a;const c="text-"+s,l=o.append("text").classed("er entityLabel",!0).attr("id",c).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","middle").style("font-family",(0,i.c)().fontFamily).style("font-size",T.fontSize+"px").text(e[n].alias??n),{width:h,height:d}=((t,e,r)=>{const a=T.entityPadding/3,n=T.entityPadding/3,s=.85*T.fontSize,o=e.node().getBBox(),c=[];let l=!1,h=!1,d=0,y=0,u=0,p=0,_=o.height+2*a,f=1;r.forEach((t=>{void 0!==t.attributeKeyTypeList&&t.attributeKeyTypeList.length>0&&(l=!0),void 0!==t.attributeComment&&(h=!0)})),r.forEach((r=>{const n=`${e.node().id}-attr-${f}`;let o=0;const m=(0,i.x)(r.attributeType),E=t.append("text").classed("er entityLabel",!0).attr("id",`${n}-type`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",(0,i.c)().fontFamily).style("font-size",s+"px").text(m),g=t.append("text").classed("er entityLabel",!0).attr("id",`${n}-name`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",(0,i.c)().fontFamily).style("font-size",s+"px").text(r.attributeName),O={};O.tn=E,O.nn=g;const b=E.node().getBBox(),k=g.node().getBBox();if(d=Math.max(d,b.width),y=Math.max(y,k.width),o=Math.max(b.height,k.height),l){const e=void 0!==r.attributeKeyTypeList?r.attributeKeyTypeList.join(","):"",a=t.append("text").classed("er entityLabel",!0).attr("id",`${n}-key`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",(0,i.c)().fontFamily).style("font-size",s+"px").text(e);O.kn=a;const c=a.node().getBBox();u=Math.max(u,c.width),o=Math.max(o,c.height)}if(h){const e=t.append("text").classed("er entityLabel",!0).attr("id",`${n}-comment`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",(0,i.c)().fontFamily).style("font-size",s+"px").text(r.attributeComment||"");O.cn=e;const a=e.node().getBBox();p=Math.max(p,a.width),o=Math.max(o,a.height)}O.height=o,c.push(O),_+=o+2*a,f+=1}));let m=4;l&&(m+=2),h&&(m+=2);const E=d+y+u+p,g={width:Math.max(T.minEntityWidth,Math.max(o.width+2*T.entityPadding,E+n*m)),height:r.length>0?_:Math.max(T.minEntityHeight,o.height+2*T.entityPadding)};if(r.length>0){const r=Math.max(0,(g.width-E-n*m)/(m/2));e.attr("transform","translate("+g.width/2+","+(a+o.height/2)+")");let i=o.height+2*a,s="attributeBoxOdd";c.forEach((e=>{const o=i+a+e.height/2;e.tn.attr("transform","translate("+n+","+o+")");const c=t.insert("rect","#"+e.tn.node().id).classed(`er ${s}`,!0).attr("x",0).attr("y",i).attr("width",d+2*n+r).attr("height",e.height+2*a),_=parseFloat(c.attr("x"))+parseFloat(c.attr("width"));e.nn.attr("transform","translate("+(_+n)+","+o+")");const f=t.insert("rect","#"+e.nn.node().id).classed(`er ${s}`,!0).attr("x",_).attr("y",i).attr("width",y+2*n+r).attr("height",e.height+2*a);let m=parseFloat(f.attr("x"))+parseFloat(f.attr("width"));if(l){e.kn.attr("transform","translate("+(m+n)+","+o+")");const c=t.insert("rect","#"+e.kn.node().id).classed(`er ${s}`,!0).attr("x",m).attr("y",i).attr("width",u+2*n+r).attr("height",e.height+2*a);m=parseFloat(c.attr("x"))+parseFloat(c.attr("width"))}h&&(e.cn.attr("transform","translate("+(m+n)+","+o+")"),t.insert("rect","#"+e.cn.node().id).classed(`er ${s}`,"true").attr("x",m).attr("y",i).attr("width",p+2*n+r).attr("height",e.height+2*a)),i+=e.height+2*a,s="attributeBoxOdd"===s?"attributeBoxEven":"attributeBoxOdd"}))}else g.height=Math.max(T.minEntityHeight,_),e.attr("transform","translate("+g.width/2+","+g.height/2+")");return g})(o,l,e[n].attributes),y=o.insert("rect","#"+c).classed("er entityBox",!0).attr("x",0).attr("y",0).attr("width",h).attr("height",d).node().getBBox();r.setNode(s,{width:y.width,height:y.height,shape:"rect",id:s})})),a},M=function(t){return(t.entityA+t.roleA+t.entityB).replace(/\s/g,"")};let w=0;const I="28e9f9db-3c8d-5aa5-9faf-44286ae5937c";function v(t=""){return t.length>0?`${t}-`:""}const D={parser:f,db:O,renderer:{setConf:function(t){const e=Object.keys(t);for(const r of e)T[r]=t[r]},draw:function(t,e,r,o){T=(0,i.c)().er,i.l.info("Drawing ER diagram");const c=(0,i.c)().securityLevel;let l;"sandbox"===c&&(l=(0,n.Ltv)("#i"+e));const h=("sandbox"===c?(0,n.Ltv)(l.nodes()[0].contentDocument.body):(0,n.Ltv)("body")).select(`[id='${e}']`);let d;R(h,T),d=new a.T({multigraph:!0,directed:!0,compound:!1}).setGraph({rankdir:T.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel((function(){return{}}));const y=A(h,o.db.getEntities(),d),u=function(t,e){return t.forEach((function(t){e.setEdge(x.get(t.entityA),x.get(t.entityB),{relationship:t},M(t))})),t}(o.db.getRelationships(),d);var p,_;(0,s.Zp)(d),p=h,(_=d).nodes().forEach((function(t){void 0!==t&&void 0!==_.node(t)&&p.select("#"+t).attr("transform","translate("+(_.node(t).x-_.node(t).width/2)+","+(_.node(t).y-_.node(t).height/2)+" )")})),u.forEach((function(t){!function(t,e,r,a,s){w++;const o=r.edge(x.get(e.entityA),x.get(e.entityB),M(e)),c=(0,n.n8j)().x((function(t){return t.x})).y((function(t){return t.y})).curve(n.qrM),l=t.insert("path","#"+a).classed("er relationshipLine",!0).attr("d",c(o.points)).style("stroke",T.stroke).style("fill","none");e.relSpec.relType===s.db.Identification.NON_IDENTIFYING&&l.attr("stroke-dasharray","8,8");let h="";switch(T.arrowMarkerAbsolute&&(h=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,h=h.replace(/\(/g,"\\("),h=h.replace(/\)/g,"\\)")),e.relSpec.cardA){case s.db.Cardinality.ZERO_OR_ONE:l.attr("marker-end","url("+h+"#"+k.ZERO_OR_ONE_END+")");break;case s.db.Cardinality.ZERO_OR_MORE:l.attr("marker-end","url("+h+"#"+k.ZERO_OR_MORE_END+")");break;case s.db.Cardinality.ONE_OR_MORE:l.attr("marker-end","url("+h+"#"+k.ONE_OR_MORE_END+")");break;case s.db.Cardinality.ONLY_ONE:l.attr("marker-end","url("+h+"#"+k.ONLY_ONE_END+")");break;case s.db.Cardinality.MD_PARENT:l.attr("marker-end","url("+h+"#"+k.MD_PARENT_END+")")}switch(e.relSpec.cardB){case s.db.Cardinality.ZERO_OR_ONE:l.attr("marker-start","url("+h+"#"+k.ZERO_OR_ONE_START+")");break;case s.db.Cardinality.ZERO_OR_MORE:l.attr("marker-start","url("+h+"#"+k.ZERO_OR_MORE_START+")");break;case s.db.Cardinality.ONE_OR_MORE:l.attr("marker-start","url("+h+"#"+k.ONE_OR_MORE_START+")");break;case s.db.Cardinality.ONLY_ONE:l.attr("marker-start","url("+h+"#"+k.ONLY_ONE_START+")");break;case s.db.Cardinality.MD_PARENT:l.attr("marker-start","url("+h+"#"+k.MD_PARENT_START+")")}const d=l.node().getTotalLength(),y=l.node().getPointAtLength(.5*d),u="rel"+w,p=t.append("text").classed("er relationshipLabel",!0).attr("id",u).attr("x",y.x).attr("y",y.y).style("text-anchor","middle").style("dominant-baseline","middle").style("font-family",(0,i.c)().fontFamily).style("font-size",T.fontSize+"px").text(e.roleA).node().getBBox();t.insert("rect","#"+u).classed("er relationshipLabelBox",!0).attr("x",y.x-p.width/2).attr("y",y.y-p.height/2).attr("width",p.width).attr("height",p.height)}(h,t,d,y,o)}));const f=T.diagramPadding;i.u.insertTitle(h,"entityTitleText",T.titleTopMargin,o.db.getDiagramTitle());const m=h.node().getBBox(),E=m.width+2*f,g=m.height+2*f;(0,i.i)(h,g,E,T.useMaxWidth),h.attr("viewBox",`${m.x-f} ${m.y-f} ${E} ${g}`)}},styles:t=>`\n .entityBox {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n }\n\n .attributeBoxOdd {\n fill: ${t.attributeBackgroundColorOdd};\n stroke: ${t.nodeBorder};\n }\n\n .attributeBoxEven {\n fill: ${t.attributeBackgroundColorEven};\n stroke: ${t.nodeBorder};\n }\n\n .relationshipLabelBox {\n fill: ${t.tertiaryColor};\n opacity: 0.7;\n background-color: ${t.tertiaryColor};\n rect {\n opacity: 0.5;\n }\n }\n\n .relationshipLine {\n stroke: ${t.lineColor};\n }\n\n .entityTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n } \n #MD_PARENT_START {\n fill: #f5f5f5 !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n }\n #MD_PARENT_END {\n fill: #f5f5f5 !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n }\n \n`}}}]); \ No newline at end of file diff --git a/assets/js/60738e36.3f741a93.js b/assets/js/60738e36.3f741a93.js new file mode 100644 index 000000000000..0051121abd29 --- /dev/null +++ b/assets/js/60738e36.3f741a93.js @@ -0,0 +1 @@ +(self.webpackChunk=self.webpackChunk||[]).push([[7777],{513:(e,t,a)=>{"use strict";a.r(t),a.d(t,{assets:()=>X,contentTitle:()=>Q,default:()=>ee,frontMatter:()=>Y,metadata:()=>s,toc:()=>Z});const s=JSON.parse('{"id":"general/metadata","title":"Metadata Explorer","description":"Visualize Metadata and related Documentation.","source":"@site/../docs/general/metadata.md","sourceDirName":"general","slug":"/metadata","permalink":"/docs/metadata","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/metadata.md","tags":[],"version":"current","lastUpdatedBy":"github-actions[bot]","lastUpdatedAt":1730712423000,"frontMatter":{"id":"metadata","title":"Metadata Explorer","sidebar_label":"Metadata Explorer","description":"Visualize Metadata and related Documentation.","keywords":["docs","substrate","metadata","explorer","search","api","tools","js","javascript"],"slug":"../metadata"},"sidebar":"docs","previous":{"title":"Developer Heroes","permalink":"/docs/dev-heroes"},"next":{"title":"Chain State","permalink":"/docs/chain-state-values"}}');var n=a(74848),r=a(28453),i=a(43845);var l=a(90675),c=a(10467),o=a(96540),d=a(19588),p=a(2026);var h,u=JSON.parse('{"rh":{"Cn":"^14.2.2"}}').rh.Cn.substring(1),m=[{name:"Polkadot",rpc:"wss://rpc.ibp.network/polkadot"},{name:"Polkadot Asset Hub",rpc:"wss://polkadot-asset-hub-rpc.polkadot.io"},{name:"Polkadot People",rpc:"wss://polkadot-people-rpc.polkadot.io"},{name:"Polkadot Bridge Hub",rpc:"wss://polkadot-bridge-hub-rpc.polkadot.io"},{name:"Polkadot Collectives",rpc:"wss://polkadot-collectives-rpc.polkadot.io"},{name:"Polkadot Coretime",rpc:"wss://polkadot-coretime-rpc.polkadot.io"},{name:"Kusama",rpc:"wss://rpc.ibp.network/kusama"},{name:"Kusama Asset Hub",rpc:"wss://kusama-asset-hub-rpc.polkadot.io"},{name:"Kusama People",rpc:"wss://kusama-people-rpc.polkadot.io"},{name:"Kusama Bridge Hub",rpc:"wss://kusama-bridge-hub-rpc.polkadot.io"},{name:"Kusama Coretime",rpc:"wss://kusama-coretime-rpc.polkadot.io"},{name:"Westend",rpc:"wss://westend-rpc.polkadot.io"}],x=["auctions","claims","crowdloan","registrar","slots"],j=["configuration","hrmp","initializer","paras_inherent","paras","disputes","disputes/slashing"],f={registrar:"paras_registrar",xcmpallet:"xcm",voterlist:"bags_list",fastunstake:"fast_unstake",childbounties:"child_bounties",nominationpools:"nomination_pools",convictionvoting:"conviction_voting",imonline:"im_online",parasdisputes:"disputes",parasslashing:"disputes/slashing",parainherent:"paras_inherent",messagequeue:"message_queue",electionprovidermultiphase:"election_provider_multi_phase",system:"frame_system"},y=[];function b(e){var t=e.version,a=(0,o.useState)(""),s=a[0],r=a[1];return(0,o.useEffect)((function(){var e=function(){var e=(0,c.A)((0,l.A)().mark((function e(){var a,s,i,c,o;return(0,l.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a="Polkadot","Metadata Explorer \xb7 Guide"===document.title&&(a="Kusama"),s=m.find((function(e){return e.name===a})),i=s.rpc,c=[],m.forEach((function(e){var t=(0,n.jsx)("option",{value:e.rpc,children:""+(e.name.charAt(0).toUpperCase()+e.name.slice(1))},e.name);c.push(t)})),o=(0,n.jsx)("select",{defaultValue:s.rpc,style:U,onChange:function(e){return g(t,e.target.value,o,r)},children:c}),r((0,n.jsx)("div",{style:B,children:(0,n.jsx)("b",{children:"Loading Metadata Explorer..."})})),e.next=10,g(t,i,o,r);case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();e()}),[t]),s}function g(e,t,a,s){return v.apply(this,arguments)}function v(){return(v=(0,c.A)((0,l.A)().mark((function e(t,a,s,r){var i,c,o,h,m,x,j,f,b;return(0,l.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return S("metadataLoading",!1),i=new d.E(a),e.next=4,p.G.create({provider:i});case 4:return c=e.sent,y=[],e.next=8,c.rpc.state.getMetadata();case 8:o=e.sent,h=o.toHuman(),m=h.metadata[t].lookup.types,(x=h.metadata[t].pallets).sort((function(e,t){return e.name.localeCompare(t.name)})),j=[],x.forEach((function(e){var t=k(e,c.consts[""+E(e.name)],"constants",m),a=k(e,c.errors[""+E(e.name)],"errors",m),s=k(e,c.events[""+E(e.name)],"events",m),r=k(e,c.tx[""+E(e.name)],"extrinsics",m),i=k(e,c.query[E(e.name)],"storage",m),l=P(e.name,"constants",t),o=P(e.name,"errors",a),d=P(e.name,"events",s),p=P(e.name,"extrinsics",r),h=P(e.name,"storage",i);j.push((0,n.jsxs)("div",{style:G,children:[(0,n.jsxs)("span",{children:[(0,n.jsx)("b",{id:e.name+"-button",style:W,onClick:function(){I(e.name)},children:"+"}),"\xa0",(0,n.jsx)("b",{children:e.name})]}),(0,n.jsxs)("div",{id:e.name,style:L,children:[l,o,d,p,h]})]},e.name)),y.push(e.name),y.push(e.name+"-constants",e.name+"-errors",e.name+"-events",e.name+"-extrinsics",e.name+"-storage")})),f=w(c.rpc,"rpc"),b=w(c.call,"runtime"),S("metadataLoading",!0),r((0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{style:D,children:[(0,n.jsx)("input",{id:"metaSearch",type:"text",placeholder:"Search Metadata",style:J,onInput:function(){return H()}}),(0,n.jsx)("br",{}),s,(0,n.jsxs)("div",{id:"buttonControls",children:[(0,n.jsx)("button",{style:K,onClick:function(){return M(!0)},children:(0,n.jsx)("span",{style:{fontSize:"10px"},children:"Expand All"})}),(0,n.jsx)("button",{style:K,onClick:function(){return M(!1)},children:(0,n.jsx)("span",{style:{fontSize:"10px"},children:"Collapse All"})})]}),(0,n.jsxs)("div",{style:{fontSize:"10px"},children:[(0,n.jsx)("b",{style:B,children:"metadata"}),(0,n.jsx)("b",{children:" "+t}),"\xa0",(0,n.jsx)("b",{style:B,children:"@polkadot/api"}),(0,n.jsx)("b",{children:" V"+u})]}),(0,n.jsx)("div",{id:"metadataLoading",style:q,children:(0,n.jsx)("b",{children:"Connecting to "+a+"..."})}),(0,n.jsx)("div",{id:"searchLoading",style:q,children:(0,n.jsx)("b",{children:"Searching..."})}),(0,n.jsxs)("div",{id:"searchResults",style:q,children:[(0,n.jsx)("b",{children:"Matches: "}),(0,n.jsx)("b",{id:"searchCount",style:B,children:"0"})]})]}),(0,n.jsx)("b",{style:F,children:"Pallets:"}),j,(0,n.jsx)("br",{}),(0,n.jsx)("b",{style:F,children:"RPC:"}),f,(0,n.jsx)("br",{}),(0,n.jsx)("b",{style:F,children:"Runtime:"}),b]}));case 19:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function k(e,t,a,s){var r=[];null!=t&&Object.keys(t).sort((function(e,t){return e.localeCompare(t)})).forEach((function(i){var l,c=t[i].meta.toHuman(),o=N(e.name.toLowerCase(),c.docs.join(" ")),d=i.charAt(0).toUpperCase()+i.slice(1);switch(a){case"constants":var p=s[c.type].type.def;l=(0,n.jsxs)("ul",{children:[(0,n.jsxs)("li",{className:"searchable",children:[(0,n.jsx)("u",{children:"Description"}),": ",o]}),(0,n.jsxs)("li",{className:"searchable",children:[(0,n.jsx)("u",{children:"API Endpoint"}),": ",(0,n.jsx)("span",{style:B,children:"api.consts."+E(e.name)+"."+E(i)})]}),(0,n.jsxs)("li",{className:"searchable",children:[(0,n.jsx)("u",{children:"Chain Value"}),": ",(0,n.jsx)("span",{style:B,children:""+JSON.stringify(t[i])})]}),(0,n.jsxs)("li",{className:"searchable",children:[(0,n.jsx)("u",{children:"Chain Value Type"}),": ","("+Object.keys(p)[0]+": "+Object.values(p)[0]+")"]})]});break;case"errors":l=(0,n.jsxs)("ul",{children:[(0,n.jsxs)("li",{className:"searchable",children:[(0,n.jsx)("u",{children:"Description"}),": ",o]}),(0,n.jsxs)("li",{className:"searchable",children:[(0,n.jsx)("u",{children:"API Endpoint"}),": ",(0,n.jsx)("span",{style:B,children:"api.errors."+E(e.name)+"."+E(i)})]})]});break;case"events":l=(0,n.jsxs)("ul",{children:[(0,n.jsxs)("li",{className:"searchable",children:[(0,n.jsx)("u",{children:"Description"}),": ",o]}),(0,n.jsxs)("li",{className:"searchable",children:[(0,n.jsx)("u",{children:"API Endpoint"}),": ",(0,n.jsx)("span",{style:B,children:"api.events."+E(e.name)+"."+E(i)})]}),(0,n.jsxs)("li",{className:"searchable",children:[(0,n.jsx)("u",{children:"Fields"}),": ",T(c,"events")]})]});break;case"extrinsics":l=(0,n.jsxs)("ul",{children:[(0,n.jsxs)("li",{className:"searchable",children:[(0,n.jsx)("u",{children:"Description"}),": ",o]}),(0,n.jsxs)("li",{className:"searchable",children:[(0,n.jsx)("u",{children:"API Endpoint"}),": ",(0,n.jsx)("span",{style:B,children:"api.tx."+E(e.name)+"."+E(i)})]}),(0,n.jsxs)("li",{className:"searchable",children:[(0,n.jsx)("u",{children:"Parameters"}),": ",T(c,"extrinsics")]})]});break;case"storage":l=(0,n.jsxs)("ul",{children:[(0,n.jsxs)("li",{className:"searchable",children:[(0,n.jsx)("u",{children:"Description"}),": ",o]}),(0,n.jsxs)("li",{className:"searchable",children:[(0,n.jsx)("u",{children:"API Endpoint"}),": ",(0,n.jsx)("span",{style:B,children:"api.query."+E(e.name)+"."+E(i)})]}),(0,n.jsxs)("li",{className:"searchable",children:[(0,n.jsx)("u",{children:"Return Type"}),": ",T(c,"storage",s)]})]});break;default:!function(e){throw new TypeError('"'+e+'" is read-only')}("item")}var h=(0,n.jsxs)("li",{children:[(0,n.jsx)("b",{children:d}),l]},i);r.push(h)}));return r=C(r)}function w(e,t){var a=[],s=Object.keys(e);return s.sort((function(e,t){return e.localeCompare(t)})),s.forEach((function(s){var r=[],i=e[s],l=Object.keys(i);l.sort((function(e,t){return e.localeCompare(t)})),l.forEach((function(e){var a,l=i[e].meta,c=N("",l.description);switch(t){case"rpc":a=(0,n.jsxs)("ul",{style:V,children:[(0,n.jsxs)("li",{className:"searchable",children:[(0,n.jsx)("u",{children:"Description"}),": ",c]}),(0,n.jsxs)("li",{className:"searchable",children:[(0,n.jsx)("u",{children:"API Endpoint"}),": ",(0,n.jsx)("span",{style:B,children:"api.rpc."+s+"."+e})]}),(0,n.jsxs)("li",{className:"searchable",children:[(0,n.jsx)("u",{children:"Return Type"}),": ",l.type]}),(0,n.jsxs)("li",{className:"searchable",children:[(0,n.jsx)("u",{children:"Parameters"}),": ",T(l,"rpc")]})]});break;case"runtime":a=(0,n.jsxs)("ul",{style:V,children:[(0,n.jsxs)("li",{className:"searchable",children:[(0,n.jsx)("u",{children:"Description"}),": ",c]}),(0,n.jsxs)("li",{className:"searchable",children:[(0,n.jsx)("u",{children:"API Endpoint"}),": ",(0,n.jsx)("span",{style:B,children:"api.call."+s+"."+e})]}),(0,n.jsxs)("li",{className:"searchable",children:[(0,n.jsx)("u",{children:"Type"}),": ",l.type]})]})}var o=(0,n.jsxs)("div",{children:[(0,n.jsx)("b",{children:""+(e.charAt(0).toUpperCase()+e.slice(1))}),a]},s+"."+e);r.push(o)})),r=C(r);var c=s.charAt(0).toUpperCase()+s.slice(1),o=(0,n.jsxs)("div",{style:G,children:[(0,n.jsxs)("span",{children:[(0,n.jsx)("b",{id:s+"-button",style:W,onClick:function(){I(s)},children:"+"}),"\xa0",(0,n.jsx)("b",{children:c})]}),(0,n.jsx)("div",{id:s,style:L,children:(0,n.jsx)("ul",{style:V,children:r})})]},s);a.push(o),y.push(s)})),a}function E(e){return e.charAt(0).toLowerCase()+e.slice(1)}function C(e){return 0===e.length?(0,n.jsx)("p",{style:V,children:"None"}):e}function P(e,t,a){return(0,n.jsxs)("ul",{style:V,children:[(0,n.jsxs)("span",{children:[(0,n.jsx)("b",{id:e+"-"+t+"-button",style:W,onClick:function(){I(e+"-"+t)},children:"+"}),"\xa0",(0,n.jsx)("b",{children:t.charAt(0).toUpperCase()+t.slice(1)})]}),(0,n.jsx)("div",{id:e+"-"+t,style:O,children:(0,n.jsx)("ul",{children:a})})]})}function A(e,t){var a=null!=f[e]?f[e]:e;return x.includes(e)?"https://paritytech.github.io/polkadot-sdk/master/polkadot_runtime_common/"+a+"/pallet/struct.Pallet.html#method."+t:j.includes(a)?"https://paritytech.github.io/polkadot-sdk/master/polkadot_runtime_parachains/"+a+"/pallet/struct.Pallet.html#method."+t:"staking"==e?"https://paritytech.github.io/polkadot-sdk/master/pallet_"+a+"/struct.Pallet.html#method."+t:a.startsWith("frame_")?"https://paritytech.github.io/polkadot-sdk/master/"+a+"/pallet/struct.Pallet.html#method."+t:"https://paritytech.github.io/polkadot-sdk/master/pallet_"+a+"/pallet/struct.Pallet.html#method."+t}function N(e,t){for(var a=t.split("`"),s=[],r=0;r{}}]); \ No newline at end of file diff --git a/assets/js/60738e36.afd988ec.js b/assets/js/60738e36.afd988ec.js deleted file mode 100644 index cbafe79f7e7c..000000000000 --- a/assets/js/60738e36.afd988ec.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk=self.webpackChunk||[]).push([[7777],{268:(e,t,a)=>{"use strict";a.r(t),a.d(t,{assets:()=>X,contentTitle:()=>Y,default:()=>ee,frontMatter:()=>J,metadata:()=>Q,toc:()=>Z});var s=a(74848),n=a(28453),r=a(43845);var i=a(90675),l=a(10467),c=a(96540),o=a(19588),d=a(2026);var p,h=JSON.parse('{"rh":{"Cn":"^14.2.1"}}').rh.Cn.substring(1),u=[{name:"Polkadot",rpc:"wss://rpc.ibp.network/polkadot"},{name:"Polkadot Asset Hub",rpc:"wss://polkadot-asset-hub-rpc.polkadot.io"},{name:"Polkadot People",rpc:"wss://polkadot-people-rpc.polkadot.io"},{name:"Polkadot Bridge Hub",rpc:"wss://polkadot-bridge-hub-rpc.polkadot.io"},{name:"Polkadot Collectives",rpc:"wss://polkadot-collectives-rpc.polkadot.io"},{name:"Polkadot Coretime",rpc:"wss://polkadot-coretime-rpc.polkadot.io"},{name:"Kusama",rpc:"wss://rpc.ibp.network/kusama"},{name:"Kusama Asset Hub",rpc:"wss://kusama-asset-hub-rpc.polkadot.io"},{name:"Kusama People",rpc:"wss://kusama-people-rpc.polkadot.io"},{name:"Kusama Bridge Hub",rpc:"wss://kusama-bridge-hub-rpc.polkadot.io"},{name:"Kusama Coretime",rpc:"wss://kusama-coretime-rpc.polkadot.io"},{name:"Westend",rpc:"wss://westend-rpc.polkadot.io"}],m=["auctions","claims","crowdloan","registrar","slots"],x=["configuration","hrmp","initializer","paras_inherent","paras","disputes","disputes/slashing"],j={registrar:"paras_registrar",xcmpallet:"xcm",voterlist:"bags_list",fastunstake:"fast_unstake",childbounties:"child_bounties",nominationpools:"nomination_pools",convictionvoting:"conviction_voting",imonline:"im_online",parasdisputes:"disputes",parasslashing:"disputes/slashing",parainherent:"paras_inherent",messagequeue:"message_queue",electionprovidermultiphase:"election_provider_multi_phase",system:"frame_system"},f=[];function y(e){var t=e.version,a=(0,c.useState)(""),n=a[0],r=a[1];return(0,c.useEffect)((function(){var e=function(){var e=(0,l.A)((0,i.A)().mark((function e(){var a,n,l,c,o;return(0,i.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a="Polkadot","Metadata Explorer \xb7 Guide"===document.title&&(a="Kusama"),n=u.find((function(e){return e.name===a})),l=n.rpc,c=[],u.forEach((function(e){var t=(0,s.jsx)("option",{value:e.rpc,children:""+(e.name.charAt(0).toUpperCase()+e.name.slice(1))},e.name);c.push(t)})),o=(0,s.jsx)("select",{defaultValue:n.rpc,style:O,onChange:function(e){return b(t,e.target.value,o,r)},children:c}),r((0,s.jsx)("div",{style:H,children:(0,s.jsx)("b",{children:"Loading Metadata Explorer..."})})),e.next=10,b(t,l,o,r);case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();e()}),[t]),n}function b(e,t,a,s){return g.apply(this,arguments)}function g(){return(g=(0,l.A)((0,i.A)().mark((function e(t,a,n,r){var l,c,p,u,m,x,j,y,b;return(0,i.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return _("metadataLoading",!1),l=new o.E(a),e.next=4,d.G.create({provider:l});case 4:return c=e.sent,f=[],e.next=8,c.rpc.state.getMetadata();case 8:p=e.sent,u=p.toHuman(),m=u.metadata[t].lookup.types,(x=u.metadata[t].pallets).sort((function(e,t){return e.name.localeCompare(t.name)})),j=[],x.forEach((function(e){var t=v(e,c.consts[""+w(e.name)],"constants",m),a=v(e,c.errors[""+w(e.name)],"errors",m),n=v(e,c.events[""+w(e.name)],"events",m),r=v(e,c.tx[""+w(e.name)],"extrinsics",m),i=v(e,c.query[w(e.name)],"storage",m),l=C(e.name,"constants",t),o=C(e.name,"errors",a),d=C(e.name,"events",n),p=C(e.name,"extrinsics",r),h=C(e.name,"storage",i);j.push((0,s.jsxs)("div",{style:G,children:[(0,s.jsxs)("span",{children:[(0,s.jsx)("b",{id:e.name+"-button",style:q,onClick:function(){S(e.name)},children:"+"}),"\xa0",(0,s.jsx)("b",{children:e.name})]}),(0,s.jsxs)("div",{id:e.name,style:z,children:[l,o,d,p,h]})]},e.name)),f.push(e.name),f.push(e.name+"-constants",e.name+"-errors",e.name+"-events",e.name+"-extrinsics",e.name+"-storage")})),y=k(c.rpc,"rpc"),b=k(c.call,"runtime"),_("metadataLoading",!0),r((0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{style:B,children:[(0,s.jsx)("input",{id:"metaSearch",type:"text",placeholder:"Search Metadata",style:W,onInput:function(){return M()}}),(0,s.jsx)("br",{}),n,(0,s.jsxs)("div",{id:"buttonControls",children:[(0,s.jsx)("button",{style:U,onClick:function(){return I(!0)},children:(0,s.jsx)("span",{style:{fontSize:"10px"},children:"Expand All"})}),(0,s.jsx)("button",{style:U,onClick:function(){return I(!1)},children:(0,s.jsx)("span",{style:{fontSize:"10px"},children:"Collapse All"})})]}),(0,s.jsxs)("div",{style:{fontSize:"10px"},children:[(0,s.jsx)("b",{style:H,children:"metadata"}),(0,s.jsx)("b",{children:" "+t}),"\xa0",(0,s.jsx)("b",{style:H,children:"@polkadot/api"}),(0,s.jsx)("b",{children:" V"+h})]}),(0,s.jsx)("div",{id:"metadataLoading",style:K,children:(0,s.jsx)("b",{children:"Connecting to "+a+"..."})}),(0,s.jsx)("div",{id:"searchLoading",style:K,children:(0,s.jsx)("b",{children:"Searching..."})}),(0,s.jsxs)("div",{id:"searchResults",style:K,children:[(0,s.jsx)("b",{children:"Matches: "}),(0,s.jsx)("b",{id:"searchCount",style:H,children:"0"})]})]}),(0,s.jsx)("b",{style:F,children:"Pallets:"}),j,(0,s.jsx)("br",{}),(0,s.jsx)("b",{style:F,children:"RPC:"}),y,(0,s.jsx)("br",{}),(0,s.jsx)("b",{style:F,children:"Runtime:"}),b]}));case 19:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function v(e,t,a,n){var r=[];null!=t&&Object.keys(t).sort((function(e,t){return e.localeCompare(t)})).forEach((function(i){var l,c=t[i].meta.toHuman(),o=A(e.name.toLowerCase(),c.docs.join(" ")),d=i.charAt(0).toUpperCase()+i.slice(1);switch(a){case"constants":var p=n[c.type].type.def;l=(0,s.jsxs)("ul",{children:[(0,s.jsxs)("li",{className:"searchable",children:[(0,s.jsx)("u",{children:"Description"}),": ",o]}),(0,s.jsxs)("li",{className:"searchable",children:[(0,s.jsx)("u",{children:"API Endpoint"}),": ",(0,s.jsx)("span",{style:H,children:"api.consts."+w(e.name)+"."+w(i)})]}),(0,s.jsxs)("li",{className:"searchable",children:[(0,s.jsx)("u",{children:"Chain Value"}),": ",(0,s.jsx)("span",{style:H,children:""+JSON.stringify(t[i])})]}),(0,s.jsxs)("li",{className:"searchable",children:[(0,s.jsx)("u",{children:"Chain Value Type"}),": ","("+Object.keys(p)[0]+": "+Object.values(p)[0]+")"]})]});break;case"errors":l=(0,s.jsxs)("ul",{children:[(0,s.jsxs)("li",{className:"searchable",children:[(0,s.jsx)("u",{children:"Description"}),": ",o]}),(0,s.jsxs)("li",{className:"searchable",children:[(0,s.jsx)("u",{children:"API Endpoint"}),": ",(0,s.jsx)("span",{style:H,children:"api.errors."+w(e.name)+"."+w(i)})]})]});break;case"events":l=(0,s.jsxs)("ul",{children:[(0,s.jsxs)("li",{className:"searchable",children:[(0,s.jsx)("u",{children:"Description"}),": ",o]}),(0,s.jsxs)("li",{className:"searchable",children:[(0,s.jsx)("u",{children:"API Endpoint"}),": ",(0,s.jsx)("span",{style:H,children:"api.events."+w(e.name)+"."+w(i)})]}),(0,s.jsxs)("li",{className:"searchable",children:[(0,s.jsx)("u",{children:"Fields"}),": ",N(c,"events")]})]});break;case"extrinsics":l=(0,s.jsxs)("ul",{children:[(0,s.jsxs)("li",{className:"searchable",children:[(0,s.jsx)("u",{children:"Description"}),": ",o]}),(0,s.jsxs)("li",{className:"searchable",children:[(0,s.jsx)("u",{children:"API Endpoint"}),": ",(0,s.jsx)("span",{style:H,children:"api.tx."+w(e.name)+"."+w(i)})]}),(0,s.jsxs)("li",{className:"searchable",children:[(0,s.jsx)("u",{children:"Parameters"}),": ",N(c,"extrinsics")]})]});break;case"storage":l=(0,s.jsxs)("ul",{children:[(0,s.jsxs)("li",{className:"searchable",children:[(0,s.jsx)("u",{children:"Description"}),": ",o]}),(0,s.jsxs)("li",{className:"searchable",children:[(0,s.jsx)("u",{children:"API Endpoint"}),": ",(0,s.jsx)("span",{style:H,children:"api.query."+w(e.name)+"."+w(i)})]}),(0,s.jsxs)("li",{className:"searchable",children:[(0,s.jsx)("u",{children:"Return Type"}),": ",N(c,"storage",n)]})]});break;default:!function(e){throw new TypeError('"'+e+'" is read-only')}("item")}var h=(0,s.jsxs)("li",{children:[(0,s.jsx)("b",{children:d}),l]},i);r.push(h)}));return r=E(r)}function k(e,t){var a=[],n=Object.keys(e);return n.sort((function(e,t){return e.localeCompare(t)})),n.forEach((function(n){var r=[],i=e[n],l=Object.keys(i);l.sort((function(e,t){return e.localeCompare(t)})),l.forEach((function(e){var a,l=i[e].meta,c=A("",l.description);switch(t){case"rpc":a=(0,s.jsxs)("ul",{style:V,children:[(0,s.jsxs)("li",{className:"searchable",children:[(0,s.jsx)("u",{children:"Description"}),": ",c]}),(0,s.jsxs)("li",{className:"searchable",children:[(0,s.jsx)("u",{children:"API Endpoint"}),": ",(0,s.jsx)("span",{style:H,children:"api.rpc."+n+"."+e})]}),(0,s.jsxs)("li",{className:"searchable",children:[(0,s.jsx)("u",{children:"Return Type"}),": ",l.type]}),(0,s.jsxs)("li",{className:"searchable",children:[(0,s.jsx)("u",{children:"Parameters"}),": ",N(l,"rpc")]})]});break;case"runtime":a=(0,s.jsxs)("ul",{style:V,children:[(0,s.jsxs)("li",{className:"searchable",children:[(0,s.jsx)("u",{children:"Description"}),": ",c]}),(0,s.jsxs)("li",{className:"searchable",children:[(0,s.jsx)("u",{children:"API Endpoint"}),": ",(0,s.jsx)("span",{style:H,children:"api.call."+n+"."+e})]}),(0,s.jsxs)("li",{className:"searchable",children:[(0,s.jsx)("u",{children:"Type"}),": ",l.type]})]})}var o=(0,s.jsxs)("div",{children:[(0,s.jsx)("b",{children:""+(e.charAt(0).toUpperCase()+e.slice(1))}),a]},n+"."+e);r.push(o)})),r=E(r);var c=n.charAt(0).toUpperCase()+n.slice(1),o=(0,s.jsxs)("div",{style:G,children:[(0,s.jsxs)("span",{children:[(0,s.jsx)("b",{id:n+"-button",style:q,onClick:function(){S(n)},children:"+"}),"\xa0",(0,s.jsx)("b",{children:c})]}),(0,s.jsx)("div",{id:n,style:z,children:(0,s.jsx)("ul",{style:V,children:r})})]},n);a.push(o),f.push(n)})),a}function w(e){return e.charAt(0).toLowerCase()+e.slice(1)}function E(e){return 0===e.length?(0,s.jsx)("p",{style:V,children:"None"}):e}function C(e,t,a){return(0,s.jsxs)("ul",{style:V,children:[(0,s.jsxs)("span",{children:[(0,s.jsx)("b",{id:e+"-"+t+"-button",style:q,onClick:function(){S(e+"-"+t)},children:"+"}),"\xa0",(0,s.jsx)("b",{children:t.charAt(0).toUpperCase()+t.slice(1)})]}),(0,s.jsx)("div",{id:e+"-"+t,style:L,children:(0,s.jsx)("ul",{children:a})})]})}function P(e,t){var a=null!=j[e]?j[e]:e;return m.includes(e)?"https://paritytech.github.io/polkadot-sdk/master/polkadot_runtime_common/"+a+"/pallet/struct.Pallet.html#method."+t:x.includes(a)?"https://paritytech.github.io/polkadot-sdk/master/polkadot_runtime_parachains/"+a+"/pallet/struct.Pallet.html#method."+t:"staking"==e?"https://paritytech.github.io/polkadot-sdk/master/pallet_"+a+"/struct.Pallet.html#method."+t:a.startsWith("frame_")?"https://paritytech.github.io/polkadot-sdk/master/"+a+"/pallet/struct.Pallet.html#method."+t:"https://paritytech.github.io/polkadot-sdk/master/pallet_"+a+"/pallet/struct.Pallet.html#method."+t}function A(e,t){for(var a=t.split("`"),n=[],r=0;r{}}]); \ No newline at end of file diff --git a/assets/js/6116139f.77ec5b75.js b/assets/js/6116139f.77ec5b75.js deleted file mode 100644 index 85e95561adec..000000000000 --- a/assets/js/6116139f.77ec5b75.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4840],{53932:(e,a,n)=>{n.r(a),n.d(a,{assets:()=>l,contentTitle:()=>c,default:()=>d,frontMatter:()=>s,metadata:()=>o,toc:()=>r});var i=n(74848),t=n(28453);const s={id:"learn-elastic-scaling",title:"Polkadot's Elastic Scaling",sidebar_label:"Elastic Scaling",description:"Enabling parachains to scale on-demand through instantaneous coretime.",keywords:["elastic scaling","parachains","coretime","blockspace"],slug:"../learn-elastic-scaling"},c=void 0,o={id:"learn/learn-elastic-scaling",title:"Polkadot's Elastic Scaling",description:"Enabling parachains to scale on-demand through instantaneous coretime.",source:"@site/../docs/learn/learn-elastic-scaling.md",sourceDirName:"learn",slug:"/learn-elastic-scaling",permalink:"/docs/learn-elastic-scaling",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-elastic-scaling.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1712052468e3,frontMatter:{id:"learn-elastic-scaling",title:"Polkadot's Elastic Scaling",sidebar_label:"Elastic Scaling",description:"Enabling parachains to scale on-demand through instantaneous coretime.",keywords:["elastic scaling","parachains","coretime","blockspace"],slug:"../learn-elastic-scaling"},sidebar:"docs",previous:{title:"SPREE",permalink:"/docs/learn-spree"},next:{title:"SAFROLE",permalink:"/docs/learn-safrole"}},l={},r=[{value:"Technical Considerations",id:"technical-considerations",level:2}];function h(e){const a={a:"a",code:"code",h2:"h2",p:"p",pre:"pre",...(0,t.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(a.p,{children:["The path of parablocks from their creation to their inclusion into the relay chain (discussed in the\n",(0,i.jsx)(a.a,{href:"/docs/learn-parachains-protocol",children:"Parachain Protocol Page"}),") spans two domains: the parachain's and\nrelay chain's. Scaling the Polkadot protocol involves consideration of how parablocks are produced\nby the parachain and then validated, processed, secured, made available for additional checks, and\nfinally included on the relay chain."]}),"\n",(0,i.jsxs)(a.p,{children:[(0,i.jsx)(a.a,{href:"/docs/learn-async-backing",children:"Asynchronous backing"})," is the optimization implemented on the relay chain\nthat allows parachains to produce blocks faster and allows relay chain to process them seamlessly.\nAsynchronous backing also improves the parachain side with unincluded segments and augmented info\nthat allows collators to produce multiple parablocks even if the previous blocks are not yet\nincluded. This upgrade allows parachains to utilize up to 2 seconds execution time per parablock,\nand the relay chain will be able to include a parablock every 6 seconds."]}),"\n",(0,i.jsx)(a.p,{children:"With elastic scaling, parachains can use multiple cores to include multiple parablocks within the\nsame relay chain block."}),"\n",(0,i.jsx)(a.p,{children:"The relay chain receives a sequence of parachain blocks on multiple cores, which are validated and\nchecked if all their state roots line up during their inclusion, but assume they\u2019re unrelated\nparachain blocks during backing, availability, and approvals. With elastic scaling implemented, a\nparachain's throughput depends upon its collator infrastructure."}),"\n",(0,i.jsxs)(a.p,{children:["The ",(0,i.jsx)(a.a,{href:"https://github.com/paritytech/polkadot-sdk/issues/1829",children:"elastic scaling implementation"})," will be\nrolled out in multiple phases. In the first phase, elastic scaling is set to work on parachains with\na trusted/permissioned collator set. With this restriction, it is possible to launch elastic scaling\nwithout changing the candidate receipt. After successfully implementing the first phase, changes can\nbe made to the candidate receipt so the collator set can be untrusted/permissionless again. The\nfinal phase will feature full integration with the Cumulus framework, enabling parachains to be\nconfigured to access multiple cores continuously."]}),"\n",(0,i.jsx)(a.p,{children:"Take, for example, a parachain that wants to submit four parablocks to the relay chain. Without\nelastic scaling, it will take 24 seconds to include all of them through one core. Remember that a\ncore is occupied after backing and before inclusion, i.e., for the whole data availability process.\nA block cannot enter a core before the previous block has been declared available."}),"\n",(0,i.jsx)(a.pre,{children:(0,i.jsx)(a.code,{children:" R1 <----- R2 <----- R3 <----- R4 <----- R5\n\nC1 |P1 B I\n |P2 B I\n |P3 B I\n |P4 B I\n\n"})}),"\n",(0,i.jsx)(a.p,{children:"The diagram above shows how the backing and inclusion of parablocks (P) happen within the same relay\nchain block (R). With one core (C1), a parablock is included every 6 seconds. Note how P4 is\nincluded after 30 seconds (not 24 seconds) because when P1 was pushed to the relay chain for being\nbacked, there was no previous parablock."}),"\n",(0,i.jsx)(a.p,{children:"With elastic scaling, it will take just 12 seconds (3-second block time) to include all four\nparablocks using two cores."}),"\n",(0,i.jsx)(a.pre,{children:(0,i.jsx)(a.code,{children:" R1 <----- R2 <----- R3\n\nC1 |P1 B I\n |P2 B I\nC2 |P3 B I\n |P4 B I\n\n"})}),"\n",(0,i.jsx)(a.p,{children:"The diagram above shows how four parablocks are backed and included in the relay chain using two\ncores (C1 and C2). Note how P2 and P4 are included after 18 seconds (not 12 seconds) because when P1\nand P3 were pushed to the relay chain for being backed, there were no other parablocks before them."}),"\n",(0,i.jsx)(a.h2,{id:"technical-considerations",children:"Technical Considerations"}),"\n",(0,i.jsx)(a.p,{children:"If the pace per core on the relay chain will not change (backing and inclusion every 6 seconds per\ncore), on the parachain side, collators will need to increase the parablock production rate to push\nP1 and P2 to the two relay chain cores."}),"\n",(0,i.jsx)(a.p,{children:"Assuming a constant number of cores, from the relay chain side, elastic scaling will not see major\nupgrades as a parachain will use multiple existing cores instead of just one. However, from the\nparachain side, collators must produce more parablocks per unit of time, implying that technical\nspecifications for collators will likely increase."}),"\n",(0,i.jsxs)(a.p,{children:["For more advanced technical challenges, see the\n",(0,i.jsx)(a.a,{href:"https://github.com/paritytech/polkadot-sdk/issues/1829",children:"Elastic Scaling GitHub PR"}),"."]})]})}function d(e={}){const{wrapper:a}={...(0,t.R)(),...e.components};return a?(0,i.jsx)(a,{...e,children:(0,i.jsx)(h,{...e})}):h(e)}},28453:(e,a,n)=>{n.d(a,{R:()=>c,x:()=>o});var i=n(96540);const t={},s=i.createContext(t);function c(e){const a=i.useContext(s);return i.useMemo((function(){return"function"==typeof e?e(a):{...a,...e}}),[a,e])}function o(e){let a;return a=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:c(e.components),i.createElement(s.Provider,{value:a},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/6116139f.923f26ba.js b/assets/js/6116139f.923f26ba.js new file mode 100644 index 000000000000..8c1e8ad03067 --- /dev/null +++ b/assets/js/6116139f.923f26ba.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4840],{4908:(e,a,n)=>{n.r(a),n.d(a,{assets:()=>l,contentTitle:()=>o,default:()=>d,frontMatter:()=>c,metadata:()=>i,toc:()=>r});const i=JSON.parse('{"id":"learn/learn-elastic-scaling","title":"Polkadot\'s Elastic Scaling","description":"Enabling parachains to scale on-demand through instantaneous coretime.","source":"@site/../docs/learn/learn-elastic-scaling.md","sourceDirName":"learn","slug":"/learn-elastic-scaling","permalink":"/docs/learn-elastic-scaling","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-elastic-scaling.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1712052468000,"frontMatter":{"id":"learn-elastic-scaling","title":"Polkadot\'s Elastic Scaling","sidebar_label":"Elastic Scaling","description":"Enabling parachains to scale on-demand through instantaneous coretime.","keywords":["elastic scaling","parachains","coretime","blockspace"],"slug":"../learn-elastic-scaling"},"sidebar":"docs","previous":{"title":"SPREE","permalink":"/docs/learn-spree"},"next":{"title":"SAFROLE","permalink":"/docs/learn-safrole"}}');var s=n(74848),t=n(28453);const c={id:"learn-elastic-scaling",title:"Polkadot's Elastic Scaling",sidebar_label:"Elastic Scaling",description:"Enabling parachains to scale on-demand through instantaneous coretime.",keywords:["elastic scaling","parachains","coretime","blockspace"],slug:"../learn-elastic-scaling"},o=void 0,l={},r=[{value:"Technical Considerations",id:"technical-considerations",level:2}];function h(e){const a={a:"a",code:"code",h2:"h2",p:"p",pre:"pre",...(0,t.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(a.p,{children:["The path of parablocks from their creation to their inclusion into the relay chain (discussed in the\n",(0,s.jsx)(a.a,{href:"/docs/learn-parachains-protocol",children:"Parachain Protocol Page"}),") spans two domains: the parachain's and\nrelay chain's. Scaling the Polkadot protocol involves consideration of how parablocks are produced\nby the parachain and then validated, processed, secured, made available for additional checks, and\nfinally included on the relay chain."]}),"\n",(0,s.jsxs)(a.p,{children:[(0,s.jsx)(a.a,{href:"/docs/learn-async-backing",children:"Asynchronous backing"})," is the optimization implemented on the relay chain\nthat allows parachains to produce blocks faster and allows relay chain to process them seamlessly.\nAsynchronous backing also improves the parachain side with unincluded segments and augmented info\nthat allows collators to produce multiple parablocks even if the previous blocks are not yet\nincluded. This upgrade allows parachains to utilize up to 2 seconds execution time per parablock,\nand the relay chain will be able to include a parablock every 6 seconds."]}),"\n",(0,s.jsx)(a.p,{children:"With elastic scaling, parachains can use multiple cores to include multiple parablocks within the\nsame relay chain block."}),"\n",(0,s.jsx)(a.p,{children:"The relay chain receives a sequence of parachain blocks on multiple cores, which are validated and\nchecked if all their state roots line up during their inclusion, but assume they\u2019re unrelated\nparachain blocks during backing, availability, and approvals. With elastic scaling implemented, a\nparachain's throughput depends upon its collator infrastructure."}),"\n",(0,s.jsxs)(a.p,{children:["The ",(0,s.jsx)(a.a,{href:"https://github.com/paritytech/polkadot-sdk/issues/1829",children:"elastic scaling implementation"})," will be\nrolled out in multiple phases. In the first phase, elastic scaling is set to work on parachains with\na trusted/permissioned collator set. With this restriction, it is possible to launch elastic scaling\nwithout changing the candidate receipt. After successfully implementing the first phase, changes can\nbe made to the candidate receipt so the collator set can be untrusted/permissionless again. The\nfinal phase will feature full integration with the Cumulus framework, enabling parachains to be\nconfigured to access multiple cores continuously."]}),"\n",(0,s.jsx)(a.p,{children:"Take, for example, a parachain that wants to submit four parablocks to the relay chain. Without\nelastic scaling, it will take 24 seconds to include all of them through one core. Remember that a\ncore is occupied after backing and before inclusion, i.e., for the whole data availability process.\nA block cannot enter a core before the previous block has been declared available."}),"\n",(0,s.jsx)(a.pre,{children:(0,s.jsx)(a.code,{children:" R1 <----- R2 <----- R3 <----- R4 <----- R5\n\nC1 |P1 B I\n |P2 B I\n |P3 B I\n |P4 B I\n\n"})}),"\n",(0,s.jsx)(a.p,{children:"The diagram above shows how the backing and inclusion of parablocks (P) happen within the same relay\nchain block (R). With one core (C1), a parablock is included every 6 seconds. Note how P4 is\nincluded after 30 seconds (not 24 seconds) because when P1 was pushed to the relay chain for being\nbacked, there was no previous parablock."}),"\n",(0,s.jsx)(a.p,{children:"With elastic scaling, it will take just 12 seconds (3-second block time) to include all four\nparablocks using two cores."}),"\n",(0,s.jsx)(a.pre,{children:(0,s.jsx)(a.code,{children:" R1 <----- R2 <----- R3\n\nC1 |P1 B I\n |P2 B I\nC2 |P3 B I\n |P4 B I\n\n"})}),"\n",(0,s.jsx)(a.p,{children:"The diagram above shows how four parablocks are backed and included in the relay chain using two\ncores (C1 and C2). Note how P2 and P4 are included after 18 seconds (not 12 seconds) because when P1\nand P3 were pushed to the relay chain for being backed, there were no other parablocks before them."}),"\n",(0,s.jsx)(a.h2,{id:"technical-considerations",children:"Technical Considerations"}),"\n",(0,s.jsx)(a.p,{children:"If the pace per core on the relay chain will not change (backing and inclusion every 6 seconds per\ncore), on the parachain side, collators will need to increase the parablock production rate to push\nP1 and P2 to the two relay chain cores."}),"\n",(0,s.jsx)(a.p,{children:"Assuming a constant number of cores, from the relay chain side, elastic scaling will not see major\nupgrades as a parachain will use multiple existing cores instead of just one. However, from the\nparachain side, collators must produce more parablocks per unit of time, implying that technical\nspecifications for collators will likely increase."}),"\n",(0,s.jsxs)(a.p,{children:["For more advanced technical challenges, see the\n",(0,s.jsx)(a.a,{href:"https://github.com/paritytech/polkadot-sdk/issues/1829",children:"Elastic Scaling GitHub PR"}),"."]})]})}function d(e={}){const{wrapper:a}={...(0,t.R)(),...e.components};return a?(0,s.jsx)(a,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}},28453:(e,a,n)=>{n.d(a,{R:()=>c,x:()=>o});var i=n(96540);const s={},t=i.createContext(s);function c(e){const a=i.useContext(t);return i.useMemo((function(){return"function"==typeof e?e(a):{...a,...e}}),[a,e])}function o(e){let a;return a=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:c(e.components),i.createElement(t.Provider,{value:a},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/625.c5f9afd7.js b/assets/js/625.c5f9afd7.js deleted file mode 100644 index 061b1788b2db..000000000000 --- a/assets/js/625.c5f9afd7.js +++ /dev/null @@ -1,20521 +0,0 @@ -"use strict"; -exports.id = 625; -exports.ids = [625]; -exports.modules = { - -/***/ 73046: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - T: () => (/* binding */ Graph) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/has.js + 1 modules -var has = __webpack_require__(48585); -// EXTERNAL MODULE: ./node_modules/lodash-es/constant.js -var constant = __webpack_require__(39142); -// EXTERNAL MODULE: ./node_modules/lodash-es/isFunction.js -var isFunction = __webpack_require__(89610); -// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js -var keys = __webpack_require__(27422); -// EXTERNAL MODULE: ./node_modules/lodash-es/filter.js + 1 modules -var filter = __webpack_require__(11662); -// EXTERNAL MODULE: ./node_modules/lodash-es/isEmpty.js -var isEmpty = __webpack_require__(66401); -// EXTERNAL MODULE: ./node_modules/lodash-es/forEach.js -var forEach = __webpack_require__(8058); -// EXTERNAL MODULE: ./node_modules/lodash-es/isUndefined.js -var isUndefined = __webpack_require__(69592); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFlatten.js + 1 modules -var _baseFlatten = __webpack_require__(13588); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseRest.js -var _baseRest = __webpack_require__(24326); -// EXTERNAL MODULE: ./node_modules/lodash-es/_SetCache.js + 2 modules -var _SetCache = __webpack_require__(62062); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFindIndex.js -var _baseFindIndex = __webpack_require__(25707); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsNaN.js -/** - * The base implementation of `_.isNaN` without support for number objects. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. - */ -function baseIsNaN(value) { - return value !== value; -} - -/* harmony default export */ const _baseIsNaN = (baseIsNaN); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_strictIndexOf.js -/** - * A specialized version of `_.indexOf` which performs strict equality - * comparisons of values, i.e. `===`. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} fromIndex The index to search from. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function strictIndexOf(array, value, fromIndex) { - var index = fromIndex - 1, - length = array.length; - - while (++index < length) { - if (array[index] === value) { - return index; - } - } - return -1; -} - -/* harmony default export */ const _strictIndexOf = (strictIndexOf); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIndexOf.js - - - - -/** - * The base implementation of `_.indexOf` without `fromIndex` bounds checks. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} fromIndex The index to search from. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function baseIndexOf(array, value, fromIndex) { - return value === value - ? _strictIndexOf(array, value, fromIndex) - : (0,_baseFindIndex/* default */.A)(array, _baseIsNaN, fromIndex); -} - -/* harmony default export */ const _baseIndexOf = (baseIndexOf); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_arrayIncludes.js - - -/** - * A specialized version of `_.includes` for arrays without support for - * specifying an index to search from. - * - * @private - * @param {Array} [array] The array to inspect. - * @param {*} target The value to search for. - * @returns {boolean} Returns `true` if `target` is found, else `false`. - */ -function arrayIncludes(array, value) { - var length = array == null ? 0 : array.length; - return !!length && _baseIndexOf(array, value, 0) > -1; -} - -/* harmony default export */ const _arrayIncludes = (arrayIncludes); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_arrayIncludesWith.js -/** - * This function is like `arrayIncludes` except that it accepts a comparator. - * - * @private - * @param {Array} [array] The array to inspect. - * @param {*} target The value to search for. - * @param {Function} comparator The comparator invoked per element. - * @returns {boolean} Returns `true` if `target` is found, else `false`. - */ -function arrayIncludesWith(array, value, comparator) { - var index = -1, - length = array == null ? 0 : array.length; - - while (++index < length) { - if (comparator(value, array[index])) { - return true; - } - } - return false; -} - -/* harmony default export */ const _arrayIncludesWith = (arrayIncludesWith); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_cacheHas.js -var _cacheHas = __webpack_require__(64099); -// EXTERNAL MODULE: ./node_modules/lodash-es/_Set.js -var _Set = __webpack_require__(39857); -;// CONCATENATED MODULE: ./node_modules/lodash-es/noop.js -/** - * This method returns `undefined`. - * - * @static - * @memberOf _ - * @since 2.3.0 - * @category Util - * @example - * - * _.times(2, _.noop); - * // => [undefined, undefined] - */ -function noop() { - // No operation performed. -} - -/* harmony default export */ const lodash_es_noop = (noop); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_setToArray.js -var _setToArray = __webpack_require__(29959); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_createSet.js - - - - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0; - -/** - * Creates a set object of `values`. - * - * @private - * @param {Array} values The values to add to the set. - * @returns {Object} Returns the new set. - */ -var createSet = !(_Set/* default */.A && (1 / (0,_setToArray/* default */.A)(new _Set/* default */.A([,-0]))[1]) == INFINITY) ? lodash_es_noop : function(values) { - return new _Set/* default */.A(values); -}; - -/* harmony default export */ const _createSet = (createSet); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseUniq.js - - - - - - - -/** Used as the size to enable large array optimizations. */ -var LARGE_ARRAY_SIZE = 200; - -/** - * The base implementation of `_.uniqBy` without support for iteratee shorthands. - * - * @private - * @param {Array} array The array to inspect. - * @param {Function} [iteratee] The iteratee invoked per element. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new duplicate free array. - */ -function baseUniq(array, iteratee, comparator) { - var index = -1, - includes = _arrayIncludes, - length = array.length, - isCommon = true, - result = [], - seen = result; - - if (comparator) { - isCommon = false; - includes = _arrayIncludesWith; - } - else if (length >= LARGE_ARRAY_SIZE) { - var set = iteratee ? null : _createSet(array); - if (set) { - return (0,_setToArray/* default */.A)(set); - } - isCommon = false; - includes = _cacheHas/* default */.A; - seen = new _SetCache/* default */.A; - } - else { - seen = iteratee ? [] : result; - } - outer: - while (++index < length) { - var value = array[index], - computed = iteratee ? iteratee(value) : value; - - value = (comparator || value !== 0) ? value : 0; - if (isCommon && computed === computed) { - var seenIndex = seen.length; - while (seenIndex--) { - if (seen[seenIndex] === computed) { - continue outer; - } - } - if (iteratee) { - seen.push(computed); - } - result.push(value); - } - else if (!includes(seen, computed, comparator)) { - if (seen !== result) { - seen.push(computed); - } - result.push(value); - } - } - return result; -} - -/* harmony default export */ const _baseUniq = (baseUniq); - -// EXTERNAL MODULE: ./node_modules/lodash-es/isArrayLikeObject.js -var isArrayLikeObject = __webpack_require__(53533); -;// CONCATENATED MODULE: ./node_modules/lodash-es/union.js - - - - - -/** - * Creates an array of unique values, in order, from all given arrays using - * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @returns {Array} Returns the new array of combined values. - * @example - * - * _.union([2], [1, 2]); - * // => [2, 1] - */ -var union = (0,_baseRest/* default */.A)(function(arrays) { - return _baseUniq((0,_baseFlatten/* default */.A)(arrays, 1, isArrayLikeObject/* default */.A, true)); -}); - -/* harmony default export */ const lodash_es_union = (union); - -// EXTERNAL MODULE: ./node_modules/lodash-es/values.js + 1 modules -var values = __webpack_require__(38207); -// EXTERNAL MODULE: ./node_modules/lodash-es/reduce.js + 2 modules -var reduce = __webpack_require__(89463); -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/graph.js - - -var DEFAULT_EDGE_NAME = '\x00'; -var GRAPH_NODE = '\x00'; -var EDGE_KEY_DELIM = '\x01'; - -// Implementation notes: -// -// * Node id query functions should return string ids for the nodes -// * Edge id query functions should return an "edgeObj", edge object, that is -// composed of enough information to uniquely identify an edge: {v, w, name}. -// * Internally we use an "edgeId", a stringified form of the edgeObj, to -// reference edges. This is because we need a performant way to look these -// edges up and, object properties, which have string keys, are the closest -// we're going to get to a performant hashtable in JavaScript. - -// Implementation notes: -// -// * Node id query functions should return string ids for the nodes -// * Edge id query functions should return an "edgeObj", edge object, that is -// composed of enough information to uniquely identify an edge: {v, w, name}. -// * Internally we use an "edgeId", a stringified form of the edgeObj, to -// reference edges. This is because we need a performant way to look these -// edges up and, object properties, which have string keys, are the closest -// we're going to get to a performant hashtable in JavaScript. -class Graph { - constructor(opts = {}) { - this._isDirected = has/* default */.A(opts, 'directed') ? opts.directed : true; - this._isMultigraph = has/* default */.A(opts, 'multigraph') ? opts.multigraph : false; - this._isCompound = has/* default */.A(opts, 'compound') ? opts.compound : false; - - // Label for the graph itself - this._label = undefined; - - // Defaults to be set when creating a new node - this._defaultNodeLabelFn = constant/* default */.A(undefined); - - // Defaults to be set when creating a new edge - this._defaultEdgeLabelFn = constant/* default */.A(undefined); - - // v -> label - this._nodes = {}; - - if (this._isCompound) { - // v -> parent - this._parent = {}; - - // v -> children - this._children = {}; - this._children[GRAPH_NODE] = {}; - } - - // v -> edgeObj - this._in = {}; - - // u -> v -> Number - this._preds = {}; - - // v -> edgeObj - this._out = {}; - - // v -> w -> Number - this._sucs = {}; - - // e -> edgeObj - this._edgeObjs = {}; - - // e -> label - this._edgeLabels = {}; - } - /* === Graph functions ========= */ - isDirected() { - return this._isDirected; - } - isMultigraph() { - return this._isMultigraph; - } - isCompound() { - return this._isCompound; - } - setGraph(label) { - this._label = label; - return this; - } - graph() { - return this._label; - } - /* === Node functions ========== */ - setDefaultNodeLabel(newDefault) { - if (!isFunction/* default */.A(newDefault)) { - newDefault = constant/* default */.A(newDefault); - } - this._defaultNodeLabelFn = newDefault; - return this; - } - nodeCount() { - return this._nodeCount; - } - nodes() { - return keys/* default */.A(this._nodes); - } - sources() { - var self = this; - return filter/* default */.A(this.nodes(), function (v) { - return isEmpty/* default */.A(self._in[v]); - }); - } - sinks() { - var self = this; - return filter/* default */.A(this.nodes(), function (v) { - return isEmpty/* default */.A(self._out[v]); - }); - } - setNodes(vs, value) { - var args = arguments; - var self = this; - forEach/* default */.A(vs, function (v) { - if (args.length > 1) { - self.setNode(v, value); - } else { - self.setNode(v); - } - }); - return this; - } - setNode(v, value) { - if (has/* default */.A(this._nodes, v)) { - if (arguments.length > 1) { - this._nodes[v] = value; - } - return this; - } - - // @ts-expect-error - this._nodes[v] = arguments.length > 1 ? value : this._defaultNodeLabelFn(v); - if (this._isCompound) { - this._parent[v] = GRAPH_NODE; - this._children[v] = {}; - this._children[GRAPH_NODE][v] = true; - } - this._in[v] = {}; - this._preds[v] = {}; - this._out[v] = {}; - this._sucs[v] = {}; - ++this._nodeCount; - return this; - } - node(v) { - return this._nodes[v]; - } - hasNode(v) { - return has/* default */.A(this._nodes, v); - } - removeNode(v) { - var self = this; - if (has/* default */.A(this._nodes, v)) { - var removeEdge = function (e) { - self.removeEdge(self._edgeObjs[e]); - }; - delete this._nodes[v]; - if (this._isCompound) { - this._removeFromParentsChildList(v); - delete this._parent[v]; - forEach/* default */.A(this.children(v), function (child) { - self.setParent(child); - }); - delete this._children[v]; - } - forEach/* default */.A(keys/* default */.A(this._in[v]), removeEdge); - delete this._in[v]; - delete this._preds[v]; - forEach/* default */.A(keys/* default */.A(this._out[v]), removeEdge); - delete this._out[v]; - delete this._sucs[v]; - --this._nodeCount; - } - return this; - } - setParent(v, parent) { - if (!this._isCompound) { - throw new Error('Cannot set parent in a non-compound graph'); - } - - if (isUndefined/* default */.A(parent)) { - parent = GRAPH_NODE; - } else { - // Coerce parent to string - parent += ''; - for (var ancestor = parent; !isUndefined/* default */.A(ancestor); ancestor = this.parent(ancestor)) { - if (ancestor === v) { - throw new Error('Setting ' + parent + ' as parent of ' + v + ' would create a cycle'); - } - } - - this.setNode(parent); - } - - this.setNode(v); - this._removeFromParentsChildList(v); - this._parent[v] = parent; - this._children[parent][v] = true; - return this; - } - _removeFromParentsChildList(v) { - delete this._children[this._parent[v]][v]; - } - parent(v) { - if (this._isCompound) { - var parent = this._parent[v]; - if (parent !== GRAPH_NODE) { - return parent; - } - } - } - children(v) { - if (isUndefined/* default */.A(v)) { - v = GRAPH_NODE; - } - - if (this._isCompound) { - var children = this._children[v]; - if (children) { - return keys/* default */.A(children); - } - } else if (v === GRAPH_NODE) { - return this.nodes(); - } else if (this.hasNode(v)) { - return []; - } - } - predecessors(v) { - var predsV = this._preds[v]; - if (predsV) { - return keys/* default */.A(predsV); - } - } - successors(v) { - var sucsV = this._sucs[v]; - if (sucsV) { - return keys/* default */.A(sucsV); - } - } - neighbors(v) { - var preds = this.predecessors(v); - if (preds) { - return lodash_es_union(preds, this.successors(v)); - } - } - isLeaf(v) { - var neighbors; - if (this.isDirected()) { - neighbors = this.successors(v); - } else { - neighbors = this.neighbors(v); - } - return neighbors.length === 0; - } - filterNodes(filter) { - // @ts-expect-error - var copy = new this.constructor({ - directed: this._isDirected, - multigraph: this._isMultigraph, - compound: this._isCompound, - }); - - copy.setGraph(this.graph()); - - var self = this; - forEach/* default */.A(this._nodes, function (value, v) { - if (filter(v)) { - copy.setNode(v, value); - } - }); - - forEach/* default */.A(this._edgeObjs, function (e) { - // @ts-expect-error - if (copy.hasNode(e.v) && copy.hasNode(e.w)) { - copy.setEdge(e, self.edge(e)); - } - }); - - var parents = {}; - function findParent(v) { - var parent = self.parent(v); - if (parent === undefined || copy.hasNode(parent)) { - parents[v] = parent; - return parent; - } else if (parent in parents) { - return parents[parent]; - } else { - return findParent(parent); - } - } - - if (this._isCompound) { - forEach/* default */.A(copy.nodes(), function (v) { - copy.setParent(v, findParent(v)); - }); - } - - return copy; - } - /* === Edge functions ========== */ - setDefaultEdgeLabel(newDefault) { - if (!isFunction/* default */.A(newDefault)) { - newDefault = constant/* default */.A(newDefault); - } - this._defaultEdgeLabelFn = newDefault; - return this; - } - edgeCount() { - return this._edgeCount; - } - edges() { - return values/* default */.A(this._edgeObjs); - } - setPath(vs, value) { - var self = this; - var args = arguments; - reduce/* default */.A(vs, function (v, w) { - if (args.length > 1) { - self.setEdge(v, w, value); - } else { - self.setEdge(v, w); - } - return w; - }); - return this; - } - /* - * setEdge(v, w, [value, [name]]) - * setEdge({ v, w, [name] }, [value]) - */ - setEdge() { - var v, w, name, value; - var valueSpecified = false; - var arg0 = arguments[0]; - - if (typeof arg0 === 'object' && arg0 !== null && 'v' in arg0) { - v = arg0.v; - w = arg0.w; - name = arg0.name; - if (arguments.length === 2) { - value = arguments[1]; - valueSpecified = true; - } - } else { - v = arg0; - w = arguments[1]; - name = arguments[3]; - if (arguments.length > 2) { - value = arguments[2]; - valueSpecified = true; - } - } - - v = '' + v; - w = '' + w; - if (!isUndefined/* default */.A(name)) { - name = '' + name; - } - - var e = edgeArgsToId(this._isDirected, v, w, name); - if (has/* default */.A(this._edgeLabels, e)) { - if (valueSpecified) { - this._edgeLabels[e] = value; - } - return this; - } - - if (!isUndefined/* default */.A(name) && !this._isMultigraph) { - throw new Error('Cannot set a named edge when isMultigraph = false'); - } - - // It didn't exist, so we need to create it. - // First ensure the nodes exist. - this.setNode(v); - this.setNode(w); - - // @ts-expect-error - this._edgeLabels[e] = valueSpecified ? value : this._defaultEdgeLabelFn(v, w, name); - - var edgeObj = edgeArgsToObj(this._isDirected, v, w, name); - // Ensure we add undirected edges in a consistent way. - v = edgeObj.v; - w = edgeObj.w; - - Object.freeze(edgeObj); - this._edgeObjs[e] = edgeObj; - incrementOrInitEntry(this._preds[w], v); - incrementOrInitEntry(this._sucs[v], w); - this._in[w][e] = edgeObj; - this._out[v][e] = edgeObj; - this._edgeCount++; - return this; - } - edge(v, w, name) { - var e = - arguments.length === 1 - ? edgeObjToId(this._isDirected, arguments[0]) - : edgeArgsToId(this._isDirected, v, w, name); - return this._edgeLabels[e]; - } - hasEdge(v, w, name) { - var e = - arguments.length === 1 - ? edgeObjToId(this._isDirected, arguments[0]) - : edgeArgsToId(this._isDirected, v, w, name); - return has/* default */.A(this._edgeLabels, e); - } - removeEdge(v, w, name) { - var e = - arguments.length === 1 - ? edgeObjToId(this._isDirected, arguments[0]) - : edgeArgsToId(this._isDirected, v, w, name); - var edge = this._edgeObjs[e]; - if (edge) { - v = edge.v; - w = edge.w; - delete this._edgeLabels[e]; - delete this._edgeObjs[e]; - decrementOrRemoveEntry(this._preds[w], v); - decrementOrRemoveEntry(this._sucs[v], w); - delete this._in[w][e]; - delete this._out[v][e]; - this._edgeCount--; - } - return this; - } - inEdges(v, u) { - var inV = this._in[v]; - if (inV) { - var edges = values/* default */.A(inV); - if (!u) { - return edges; - } - return filter/* default */.A(edges, function (edge) { - return edge.v === u; - }); - } - } - outEdges(v, w) { - var outV = this._out[v]; - if (outV) { - var edges = values/* default */.A(outV); - if (!w) { - return edges; - } - return filter/* default */.A(edges, function (edge) { - return edge.w === w; - }); - } - } - nodeEdges(v, w) { - var inEdges = this.inEdges(v, w); - if (inEdges) { - return inEdges.concat(this.outEdges(v, w)); - } - } -} - -/* Number of nodes in the graph. Should only be changed by the implementation. */ -Graph.prototype._nodeCount = 0; - -/* Number of edges in the graph. Should only be changed by the implementation. */ -Graph.prototype._edgeCount = 0; - -function incrementOrInitEntry(map, k) { - if (map[k]) { - map[k]++; - } else { - map[k] = 1; - } -} - -function decrementOrRemoveEntry(map, k) { - if (!--map[k]) { - delete map[k]; - } -} - -function edgeArgsToId(isDirected, v_, w_, name) { - var v = '' + v_; - var w = '' + w_; - if (!isDirected && v > w) { - var tmp = v; - v = w; - w = tmp; - } - return v + EDGE_KEY_DELIM + w + EDGE_KEY_DELIM + (isUndefined/* default */.A(name) ? DEFAULT_EDGE_NAME : name); -} - -function edgeArgsToObj(isDirected, v_, w_, name) { - var v = '' + v_; - var w = '' + w_; - if (!isDirected && v > w) { - var tmp = v; - v = w; - w = tmp; - } - var edgeObj = { v: v, w: w }; - if (name) { - edgeObj.name = name; - } - return edgeObj; -} - -function edgeObjToId(isDirected, edgeObj) { - return edgeArgsToId(isDirected, edgeObj.v, edgeObj.w, edgeObj.name); -} - - -/***/ }), - -/***/ 697: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ T: () => (/* reexport safe */ _graph_js__WEBPACK_IMPORTED_MODULE_0__.T) -/* harmony export */ }); -/* unused harmony export version */ -/* harmony import */ var _graph_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(73046); -// Includes only the "core" of graphlib - - - -const version = '2.1.9-pre'; - - - - -/***/ }), - -/***/ 75937: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _utils_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(72453); -/* harmony import */ var _color_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(74886); -/* IMPORT */ - - -/* MAIN */ -const channel = (color, channel) => { - return _utils_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.lang.round(_color_index_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A.parse(color)[channel]); -}; -/* EXPORT */ -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (channel); - - -/***/ }), - -/***/ 62062: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ _SetCache) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_MapCache.js + 14 modules -var _MapCache = __webpack_require__(29471); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_setCacheAdd.js -/** Used to stand-in for `undefined` hash values. */ -var HASH_UNDEFINED = '__lodash_hash_undefined__'; - -/** - * Adds `value` to the array cache. - * - * @private - * @name add - * @memberOf SetCache - * @alias push - * @param {*} value The value to cache. - * @returns {Object} Returns the cache instance. - */ -function setCacheAdd(value) { - this.__data__.set(value, HASH_UNDEFINED); - return this; -} - -/* harmony default export */ const _setCacheAdd = (setCacheAdd); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_setCacheHas.js -/** - * Checks if `value` is in the array cache. - * - * @private - * @name has - * @memberOf SetCache - * @param {*} value The value to search for. - * @returns {number} Returns `true` if `value` is found, else `false`. - */ -function setCacheHas(value) { - return this.__data__.has(value); -} - -/* harmony default export */ const _setCacheHas = (setCacheHas); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_SetCache.js - - - - -/** - * - * Creates an array cache object to store unique values. - * - * @private - * @constructor - * @param {Array} [values] The values to cache. - */ -function SetCache(values) { - var index = -1, - length = values == null ? 0 : values.length; - - this.__data__ = new _MapCache/* default */.A; - while (++index < length) { - this.add(values[index]); - } -} - -// Add methods to `SetCache`. -SetCache.prototype.add = SetCache.prototype.push = _setCacheAdd; -SetCache.prototype.has = _setCacheHas; - -/* harmony default export */ const _SetCache = (SetCache); - - -/***/ }), - -/***/ 72641: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * A specialized version of `_.forEach` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns `array`. - */ -function arrayEach(array, iteratee) { - var index = -1, - length = array == null ? 0 : array.length; - - while (++index < length) { - if (iteratee(array[index], index, array) === false) { - break; - } - } - return array; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (arrayEach); - - -/***/ }), - -/***/ 2634: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * A specialized version of `_.filter` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {Array} Returns the new filtered array. - */ -function arrayFilter(array, predicate) { - var index = -1, - length = array == null ? 0 : array.length, - resIndex = 0, - result = []; - - while (++index < length) { - var value = array[index]; - if (predicate(value, index, array)) { - result[resIndex++] = value; - } - } - return result; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (arrayFilter); - - -/***/ }), - -/***/ 45572: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * A specialized version of `_.map` for arrays without support for iteratee - * shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the new mapped array. - */ -function arrayMap(array, iteratee) { - var index = -1, - length = array == null ? 0 : array.length, - result = Array(length); - - while (++index < length) { - result[index] = iteratee(array[index], index, array); - } - return result; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (arrayMap); - - -/***/ }), - -/***/ 76912: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * Appends the elements of `values` to `array`. - * - * @private - * @param {Array} array The array to modify. - * @param {Array} values The values to append. - * @returns {Array} Returns `array`. - */ -function arrayPush(array, values) { - var index = -1, - length = values.length, - offset = array.length; - - while (++index < length) { - array[offset + index] = values[index]; - } - return array; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (arrayPush); - - -/***/ }), - -/***/ 91641: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ _baseClone) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_Stack.js + 5 modules -var _Stack = __webpack_require__(11754); -// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayEach.js -var _arrayEach = __webpack_require__(72641); -// EXTERNAL MODULE: ./node_modules/lodash-es/_assignValue.js -var _assignValue = __webpack_require__(52851); -// EXTERNAL MODULE: ./node_modules/lodash-es/_copyObject.js -var _copyObject = __webpack_require__(22031); -// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js -var keys = __webpack_require__(27422); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseAssign.js - - - -/** - * The base implementation of `_.assign` without support for multiple sources - * or `customizer` functions. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @returns {Object} Returns `object`. - */ -function baseAssign(object, source) { - return object && (0,_copyObject/* default */.A)(source, (0,keys/* default */.A)(source), object); -} - -/* harmony default export */ const _baseAssign = (baseAssign); - -// EXTERNAL MODULE: ./node_modules/lodash-es/keysIn.js + 2 modules -var keysIn = __webpack_require__(55615); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseAssignIn.js - - - -/** - * The base implementation of `_.assignIn` without support for multiple sources - * or `customizer` functions. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @returns {Object} Returns `object`. - */ -function baseAssignIn(object, source) { - return object && (0,_copyObject/* default */.A)(source, (0,keysIn/* default */.A)(source), object); -} - -/* harmony default export */ const _baseAssignIn = (baseAssignIn); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_cloneBuffer.js -var _cloneBuffer = __webpack_require__(80154); -// EXTERNAL MODULE: ./node_modules/lodash-es/_copyArray.js -var _copyArray = __webpack_require__(39759); -// EXTERNAL MODULE: ./node_modules/lodash-es/_getSymbols.js -var _getSymbols = __webpack_require__(14792); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_copySymbols.js - - - -/** - * Copies own symbols of `source` to `object`. - * - * @private - * @param {Object} source The object to copy symbols from. - * @param {Object} [object={}] The object to copy symbols to. - * @returns {Object} Returns `object`. - */ -function copySymbols(source, object) { - return (0,_copyObject/* default */.A)(source, (0,_getSymbols/* default */.A)(source), object); -} - -/* harmony default export */ const _copySymbols = (copySymbols); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayPush.js -var _arrayPush = __webpack_require__(76912); -// EXTERNAL MODULE: ./node_modules/lodash-es/_getPrototype.js -var _getPrototype = __webpack_require__(15647); -// EXTERNAL MODULE: ./node_modules/lodash-es/stubArray.js -var stubArray = __webpack_require__(13153); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_getSymbolsIn.js - - - - - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeGetSymbols = Object.getOwnPropertySymbols; - -/** - * Creates an array of the own and inherited enumerable symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of symbols. - */ -var getSymbolsIn = !nativeGetSymbols ? stubArray/* default */.A : function(object) { - var result = []; - while (object) { - (0,_arrayPush/* default */.A)(result, (0,_getSymbols/* default */.A)(object)); - object = (0,_getPrototype/* default */.A)(object); - } - return result; -}; - -/* harmony default export */ const _getSymbolsIn = (getSymbolsIn); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_copySymbolsIn.js - - - -/** - * Copies own and inherited symbols of `source` to `object`. - * - * @private - * @param {Object} source The object to copy symbols from. - * @param {Object} [object={}] The object to copy symbols to. - * @returns {Object} Returns `object`. - */ -function copySymbolsIn(source, object) { - return (0,_copyObject/* default */.A)(source, _getSymbolsIn(source), object); -} - -/* harmony default export */ const _copySymbolsIn = (copySymbolsIn); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_getAllKeys.js -var _getAllKeys = __webpack_require__(19042); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGetAllKeys.js -var _baseGetAllKeys = __webpack_require__(33831); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_getAllKeysIn.js - - - - -/** - * Creates an array of own and inherited enumerable property names and - * symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names and symbols. - */ -function getAllKeysIn(object) { - return (0,_baseGetAllKeys/* default */.A)(object, keysIn/* default */.A, _getSymbolsIn); -} - -/* harmony default export */ const _getAllKeysIn = (getAllKeysIn); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_getTag.js + 3 modules -var _getTag = __webpack_require__(9779); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_initCloneArray.js -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var _initCloneArray_hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Initializes an array clone. - * - * @private - * @param {Array} array The array to clone. - * @returns {Array} Returns the initialized clone. - */ -function initCloneArray(array) { - var length = array.length, - result = new array.constructor(length); - - // Add properties assigned by `RegExp#exec`. - if (length && typeof array[0] == 'string' && _initCloneArray_hasOwnProperty.call(array, 'index')) { - result.index = array.index; - result.input = array.input; - } - return result; -} - -/* harmony default export */ const _initCloneArray = (initCloneArray); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_cloneArrayBuffer.js -var _cloneArrayBuffer = __webpack_require__(90565); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_cloneDataView.js - - -/** - * Creates a clone of `dataView`. - * - * @private - * @param {Object} dataView The data view to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the cloned data view. - */ -function cloneDataView(dataView, isDeep) { - var buffer = isDeep ? (0,_cloneArrayBuffer/* default */.A)(dataView.buffer) : dataView.buffer; - return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); -} - -/* harmony default export */ const _cloneDataView = (cloneDataView); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_cloneRegExp.js -/** Used to match `RegExp` flags from their coerced string values. */ -var reFlags = /\w*$/; - -/** - * Creates a clone of `regexp`. - * - * @private - * @param {Object} regexp The regexp to clone. - * @returns {Object} Returns the cloned regexp. - */ -function cloneRegExp(regexp) { - var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); - result.lastIndex = regexp.lastIndex; - return result; -} - -/* harmony default export */ const _cloneRegExp = (cloneRegExp); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_Symbol.js -var _Symbol = __webpack_require__(241); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_cloneSymbol.js - - -/** Used to convert symbols to primitives and strings. */ -var symbolProto = _Symbol/* default */.A ? _Symbol/* default */.A.prototype : undefined, - symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; - -/** - * Creates a clone of the `symbol` object. - * - * @private - * @param {Object} symbol The symbol object to clone. - * @returns {Object} Returns the cloned symbol object. - */ -function cloneSymbol(symbol) { - return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; -} - -/* harmony default export */ const _cloneSymbol = (cloneSymbol); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_cloneTypedArray.js -var _cloneTypedArray = __webpack_require__(1801); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_initCloneByTag.js - - - - - - -/** `Object#toString` result references. */ -var boolTag = '[object Boolean]', - dateTag = '[object Date]', - mapTag = '[object Map]', - numberTag = '[object Number]', - regexpTag = '[object RegExp]', - setTag = '[object Set]', - stringTag = '[object String]', - symbolTag = '[object Symbol]'; - -var arrayBufferTag = '[object ArrayBuffer]', - dataViewTag = '[object DataView]', - float32Tag = '[object Float32Array]', - float64Tag = '[object Float64Array]', - int8Tag = '[object Int8Array]', - int16Tag = '[object Int16Array]', - int32Tag = '[object Int32Array]', - uint8Tag = '[object Uint8Array]', - uint8ClampedTag = '[object Uint8ClampedArray]', - uint16Tag = '[object Uint16Array]', - uint32Tag = '[object Uint32Array]'; - -/** - * Initializes an object clone based on its `toStringTag`. - * - * **Note:** This function only supports cloning values with tags of - * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`. - * - * @private - * @param {Object} object The object to clone. - * @param {string} tag The `toStringTag` of the object to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the initialized clone. - */ -function initCloneByTag(object, tag, isDeep) { - var Ctor = object.constructor; - switch (tag) { - case arrayBufferTag: - return (0,_cloneArrayBuffer/* default */.A)(object); - - case boolTag: - case dateTag: - return new Ctor(+object); - - case dataViewTag: - return _cloneDataView(object, isDeep); - - case float32Tag: case float64Tag: - case int8Tag: case int16Tag: case int32Tag: - case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: - return (0,_cloneTypedArray/* default */.A)(object, isDeep); - - case mapTag: - return new Ctor; - - case numberTag: - case stringTag: - return new Ctor(object); - - case regexpTag: - return _cloneRegExp(object); - - case setTag: - return new Ctor; - - case symbolTag: - return _cloneSymbol(object); - } -} - -/* harmony default export */ const _initCloneByTag = (initCloneByTag); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_initCloneObject.js + 1 modules -var _initCloneObject = __webpack_require__(18598); -// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js -var isArray = __webpack_require__(92049); -// EXTERNAL MODULE: ./node_modules/lodash-es/isBuffer.js + 1 modules -var isBuffer = __webpack_require__(99912); -// EXTERNAL MODULE: ./node_modules/lodash-es/isObjectLike.js -var isObjectLike = __webpack_require__(53098); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsMap.js - - - -/** `Object#toString` result references. */ -var _baseIsMap_mapTag = '[object Map]'; - -/** - * The base implementation of `_.isMap` without Node.js optimizations. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a map, else `false`. - */ -function baseIsMap(value) { - return (0,isObjectLike/* default */.A)(value) && (0,_getTag/* default */.A)(value) == _baseIsMap_mapTag; -} - -/* harmony default export */ const _baseIsMap = (baseIsMap); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseUnary.js -var _baseUnary = __webpack_require__(52789); -// EXTERNAL MODULE: ./node_modules/lodash-es/_nodeUtil.js -var _nodeUtil = __webpack_require__(64841); -;// CONCATENATED MODULE: ./node_modules/lodash-es/isMap.js - - - - -/* Node.js helper references. */ -var nodeIsMap = _nodeUtil/* default */.A && _nodeUtil/* default */.A.isMap; - -/** - * Checks if `value` is classified as a `Map` object. - * - * @static - * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a map, else `false`. - * @example - * - * _.isMap(new Map); - * // => true - * - * _.isMap(new WeakMap); - * // => false - */ -var isMap = nodeIsMap ? (0,_baseUnary/* default */.A)(nodeIsMap) : _baseIsMap; - -/* harmony default export */ const lodash_es_isMap = (isMap); - -// EXTERNAL MODULE: ./node_modules/lodash-es/isObject.js -var isObject = __webpack_require__(23149); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsSet.js - - - -/** `Object#toString` result references. */ -var _baseIsSet_setTag = '[object Set]'; - -/** - * The base implementation of `_.isSet` without Node.js optimizations. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a set, else `false`. - */ -function baseIsSet(value) { - return (0,isObjectLike/* default */.A)(value) && (0,_getTag/* default */.A)(value) == _baseIsSet_setTag; -} - -/* harmony default export */ const _baseIsSet = (baseIsSet); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/isSet.js - - - - -/* Node.js helper references. */ -var nodeIsSet = _nodeUtil/* default */.A && _nodeUtil/* default */.A.isSet; - -/** - * Checks if `value` is classified as a `Set` object. - * - * @static - * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a set, else `false`. - * @example - * - * _.isSet(new Set); - * // => true - * - * _.isSet(new WeakSet); - * // => false - */ -var isSet = nodeIsSet ? (0,_baseUnary/* default */.A)(nodeIsSet) : _baseIsSet; - -/* harmony default export */ const lodash_es_isSet = (isSet); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseClone.js - - - - - - - - - - - - - - - - - - - - - - - -/** Used to compose bitmasks for cloning. */ -var CLONE_DEEP_FLAG = 1, - CLONE_FLAT_FLAG = 2, - CLONE_SYMBOLS_FLAG = 4; - -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - _baseClone_boolTag = '[object Boolean]', - _baseClone_dateTag = '[object Date]', - errorTag = '[object Error]', - funcTag = '[object Function]', - genTag = '[object GeneratorFunction]', - _baseClone_mapTag = '[object Map]', - _baseClone_numberTag = '[object Number]', - objectTag = '[object Object]', - _baseClone_regexpTag = '[object RegExp]', - _baseClone_setTag = '[object Set]', - _baseClone_stringTag = '[object String]', - _baseClone_symbolTag = '[object Symbol]', - weakMapTag = '[object WeakMap]'; - -var _baseClone_arrayBufferTag = '[object ArrayBuffer]', - _baseClone_dataViewTag = '[object DataView]', - _baseClone_float32Tag = '[object Float32Array]', - _baseClone_float64Tag = '[object Float64Array]', - _baseClone_int8Tag = '[object Int8Array]', - _baseClone_int16Tag = '[object Int16Array]', - _baseClone_int32Tag = '[object Int32Array]', - _baseClone_uint8Tag = '[object Uint8Array]', - _baseClone_uint8ClampedTag = '[object Uint8ClampedArray]', - _baseClone_uint16Tag = '[object Uint16Array]', - _baseClone_uint32Tag = '[object Uint32Array]'; - -/** Used to identify `toStringTag` values supported by `_.clone`. */ -var cloneableTags = {}; -cloneableTags[argsTag] = cloneableTags[arrayTag] = -cloneableTags[_baseClone_arrayBufferTag] = cloneableTags[_baseClone_dataViewTag] = -cloneableTags[_baseClone_boolTag] = cloneableTags[_baseClone_dateTag] = -cloneableTags[_baseClone_float32Tag] = cloneableTags[_baseClone_float64Tag] = -cloneableTags[_baseClone_int8Tag] = cloneableTags[_baseClone_int16Tag] = -cloneableTags[_baseClone_int32Tag] = cloneableTags[_baseClone_mapTag] = -cloneableTags[_baseClone_numberTag] = cloneableTags[objectTag] = -cloneableTags[_baseClone_regexpTag] = cloneableTags[_baseClone_setTag] = -cloneableTags[_baseClone_stringTag] = cloneableTags[_baseClone_symbolTag] = -cloneableTags[_baseClone_uint8Tag] = cloneableTags[_baseClone_uint8ClampedTag] = -cloneableTags[_baseClone_uint16Tag] = cloneableTags[_baseClone_uint32Tag] = true; -cloneableTags[errorTag] = cloneableTags[funcTag] = -cloneableTags[weakMapTag] = false; - -/** - * The base implementation of `_.clone` and `_.cloneDeep` which tracks - * traversed objects. - * - * @private - * @param {*} value The value to clone. - * @param {boolean} bitmask The bitmask flags. - * 1 - Deep clone - * 2 - Flatten inherited properties - * 4 - Clone symbols - * @param {Function} [customizer] The function to customize cloning. - * @param {string} [key] The key of `value`. - * @param {Object} [object] The parent object of `value`. - * @param {Object} [stack] Tracks traversed objects and their clone counterparts. - * @returns {*} Returns the cloned value. - */ -function baseClone(value, bitmask, customizer, key, object, stack) { - var result, - isDeep = bitmask & CLONE_DEEP_FLAG, - isFlat = bitmask & CLONE_FLAT_FLAG, - isFull = bitmask & CLONE_SYMBOLS_FLAG; - - if (customizer) { - result = object ? customizer(value, key, object, stack) : customizer(value); - } - if (result !== undefined) { - return result; - } - if (!(0,isObject/* default */.A)(value)) { - return value; - } - var isArr = (0,isArray/* default */.A)(value); - if (isArr) { - result = _initCloneArray(value); - if (!isDeep) { - return (0,_copyArray/* default */.A)(value, result); - } - } else { - var tag = (0,_getTag/* default */.A)(value), - isFunc = tag == funcTag || tag == genTag; - - if ((0,isBuffer/* default */.A)(value)) { - return (0,_cloneBuffer/* default */.A)(value, isDeep); - } - if (tag == objectTag || tag == argsTag || (isFunc && !object)) { - result = (isFlat || isFunc) ? {} : (0,_initCloneObject/* default */.A)(value); - if (!isDeep) { - return isFlat - ? _copySymbolsIn(value, _baseAssignIn(result, value)) - : _copySymbols(value, _baseAssign(result, value)); - } - } else { - if (!cloneableTags[tag]) { - return object ? value : {}; - } - result = _initCloneByTag(value, tag, isDeep); - } - } - // Check for circular references and return its corresponding clone. - stack || (stack = new _Stack/* default */.A); - var stacked = stack.get(value); - if (stacked) { - return stacked; - } - stack.set(value, result); - - if (lodash_es_isSet(value)) { - value.forEach(function(subValue) { - result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack)); - }); - } else if (lodash_es_isMap(value)) { - value.forEach(function(subValue, key) { - result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack)); - }); - } - - var keysFunc = isFull - ? (isFlat ? _getAllKeysIn : _getAllKeys/* default */.A) - : (isFlat ? keysIn/* default */.A : keys/* default */.A); - - var props = isArr ? undefined : keysFunc(value); - (0,_arrayEach/* default */.A)(props || value, function(subValue, key) { - if (props) { - key = subValue; - subValue = value[key]; - } - // Recursively populate clone (susceptible to call stack limits). - (0,_assignValue/* default */.A)(result, key, baseClone(subValue, bitmask, customizer, key, value, stack)); - }); - return result; -} - -/* harmony default export */ const _baseClone = (baseClone); - - -/***/ }), - -/***/ 6240: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ _baseEach) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseForOwn.js -var _baseForOwn = __webpack_require__(79841); -// EXTERNAL MODULE: ./node_modules/lodash-es/isArrayLike.js -var isArrayLike = __webpack_require__(38446); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_createBaseEach.js - - -/** - * Creates a `baseEach` or `baseEachRight` function. - * - * @private - * @param {Function} eachFunc The function to iterate over a collection. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new base function. - */ -function createBaseEach(eachFunc, fromRight) { - return function(collection, iteratee) { - if (collection == null) { - return collection; - } - if (!(0,isArrayLike/* default */.A)(collection)) { - return eachFunc(collection, iteratee); - } - var length = collection.length, - index = fromRight ? length : -1, - iterable = Object(collection); - - while ((fromRight ? index-- : ++index < length)) { - if (iteratee(iterable[index], index, iterable) === false) { - break; - } - } - return collection; - }; -} - -/* harmony default export */ const _createBaseEach = (createBaseEach); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseEach.js - - - -/** - * The base implementation of `_.forEach` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array|Object} Returns `collection`. - */ -var baseEach = _createBaseEach(_baseForOwn/* default */.A); - -/* harmony default export */ const _baseEach = (baseEach); - - -/***/ }), - -/***/ 25707: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * The base implementation of `_.findIndex` and `_.findLastIndex` without - * support for iteratee shorthands. - * - * @private - * @param {Array} array The array to inspect. - * @param {Function} predicate The function invoked per iteration. - * @param {number} fromIndex The index to search from. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function baseFindIndex(array, predicate, fromIndex, fromRight) { - var length = array.length, - index = fromIndex + (fromRight ? 1 : -1); - - while ((fromRight ? index-- : ++index < length)) { - if (predicate(array[index], index, array)) { - return index; - } - } - return -1; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseFindIndex); - - -/***/ }), - -/***/ 13588: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ _baseFlatten) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayPush.js -var _arrayPush = __webpack_require__(76912); -// EXTERNAL MODULE: ./node_modules/lodash-es/_Symbol.js -var _Symbol = __webpack_require__(241); -// EXTERNAL MODULE: ./node_modules/lodash-es/isArguments.js + 1 modules -var isArguments = __webpack_require__(52274); -// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js -var isArray = __webpack_require__(92049); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_isFlattenable.js - - - - -/** Built-in value references. */ -var spreadableSymbol = _Symbol/* default */.A ? _Symbol/* default */.A.isConcatSpreadable : undefined; - -/** - * Checks if `value` is a flattenable `arguments` object or array. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. - */ -function isFlattenable(value) { - return (0,isArray/* default */.A)(value) || (0,isArguments/* default */.A)(value) || - !!(spreadableSymbol && value && value[spreadableSymbol]); -} - -/* harmony default export */ const _isFlattenable = (isFlattenable); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseFlatten.js - - - -/** - * The base implementation of `_.flatten` with support for restricting flattening. - * - * @private - * @param {Array} array The array to flatten. - * @param {number} depth The maximum recursion depth. - * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. - * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. - * @param {Array} [result=[]] The initial result value. - * @returns {Array} Returns the new flattened array. - */ -function baseFlatten(array, depth, predicate, isStrict, result) { - var index = -1, - length = array.length; - - predicate || (predicate = _isFlattenable); - result || (result = []); - - while (++index < length) { - var value = array[index]; - if (depth > 0 && predicate(value)) { - if (depth > 1) { - // Recursively flatten arrays (susceptible to call stack limits). - baseFlatten(value, depth - 1, predicate, isStrict, result); - } else { - (0,_arrayPush/* default */.A)(result, value); - } - } else if (!isStrict) { - result[result.length] = value; - } - } - return result; -} - -/* harmony default export */ const _baseFlatten = (baseFlatten); - - -/***/ }), - -/***/ 79841: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _baseFor_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4574); -/* harmony import */ var _keys_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(27422); - - - -/** - * The base implementation of `_.forOwn` without support for iteratee shorthands. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Object} Returns `object`. - */ -function baseForOwn(object, iteratee) { - return object && (0,_baseFor_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(object, iteratee, _keys_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseForOwn); - - -/***/ }), - -/***/ 66318: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _castPath_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7819); -/* harmony import */ var _toKey_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(30901); - - - -/** - * The base implementation of `_.get` without support for default values. - * - * @private - * @param {Object} object The object to query. - * @param {Array|string} path The path of the property to get. - * @returns {*} Returns the resolved value. - */ -function baseGet(object, path) { - path = (0,_castPath_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(path, object); - - var index = 0, - length = path.length; - - while (object != null && index < length) { - object = object[(0,_toKey_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(path[index++])]; - } - return (index && index == length) ? object : undefined; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseGet); - - -/***/ }), - -/***/ 33831: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _arrayPush_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(76912); -/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(92049); - - - -/** - * The base implementation of `getAllKeys` and `getAllKeysIn` which uses - * `keysFunc` and `symbolsFunc` to get the enumerable property names and - * symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @param {Function} keysFunc The function to get the keys of `object`. - * @param {Function} symbolsFunc The function to get the symbols of `object`. - * @returns {Array} Returns the array of property names and symbols. - */ -function baseGetAllKeys(object, keysFunc, symbolsFunc) { - var result = keysFunc(object); - return (0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(object) ? result : (0,_arrayPush_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(result, symbolsFunc(object)); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseGetAllKeys); - - -/***/ }), - -/***/ 49574: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ _baseIteratee) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_Stack.js + 5 modules -var _Stack = __webpack_require__(11754); -// EXTERNAL MODULE: ./node_modules/lodash-es/_SetCache.js + 2 modules -var _SetCache = __webpack_require__(62062); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_arraySome.js -/** - * A specialized version of `_.some` for arrays without support for iteratee - * shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {boolean} Returns `true` if any element passes the predicate check, - * else `false`. - */ -function arraySome(array, predicate) { - var index = -1, - length = array == null ? 0 : array.length; - - while (++index < length) { - if (predicate(array[index], index, array)) { - return true; - } - } - return false; -} - -/* harmony default export */ const _arraySome = (arraySome); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_cacheHas.js -var _cacheHas = __webpack_require__(64099); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_equalArrays.js - - - - -/** Used to compose bitmasks for value comparisons. */ -var COMPARE_PARTIAL_FLAG = 1, - COMPARE_UNORDERED_FLAG = 2; - -/** - * A specialized version of `baseIsEqualDeep` for arrays with support for - * partial deep comparisons. - * - * @private - * @param {Array} array The array to compare. - * @param {Array} other The other array to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} stack Tracks traversed `array` and `other` objects. - * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. - */ -function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { - var isPartial = bitmask & COMPARE_PARTIAL_FLAG, - arrLength = array.length, - othLength = other.length; - - if (arrLength != othLength && !(isPartial && othLength > arrLength)) { - return false; - } - // Check that cyclic values are equal. - var arrStacked = stack.get(array); - var othStacked = stack.get(other); - if (arrStacked && othStacked) { - return arrStacked == other && othStacked == array; - } - var index = -1, - result = true, - seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new _SetCache/* default */.A : undefined; - - stack.set(array, other); - stack.set(other, array); - - // Ignore non-index properties. - while (++index < arrLength) { - var arrValue = array[index], - othValue = other[index]; - - if (customizer) { - var compared = isPartial - ? customizer(othValue, arrValue, index, other, array, stack) - : customizer(arrValue, othValue, index, array, other, stack); - } - if (compared !== undefined) { - if (compared) { - continue; - } - result = false; - break; - } - // Recursively compare arrays (susceptible to call stack limits). - if (seen) { - if (!_arraySome(other, function(othValue, othIndex) { - if (!(0,_cacheHas/* default */.A)(seen, othIndex) && - (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { - return seen.push(othIndex); - } - })) { - result = false; - break; - } - } else if (!( - arrValue === othValue || - equalFunc(arrValue, othValue, bitmask, customizer, stack) - )) { - result = false; - break; - } - } - stack['delete'](array); - stack['delete'](other); - return result; -} - -/* harmony default export */ const _equalArrays = (equalArrays); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_Symbol.js -var _Symbol = __webpack_require__(241); -// EXTERNAL MODULE: ./node_modules/lodash-es/_Uint8Array.js -var _Uint8Array = __webpack_require__(43988); -// EXTERNAL MODULE: ./node_modules/lodash-es/eq.js -var eq = __webpack_require__(66984); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_mapToArray.js -/** - * Converts `map` to its key-value pairs. - * - * @private - * @param {Object} map The map to convert. - * @returns {Array} Returns the key-value pairs. - */ -function mapToArray(map) { - var index = -1, - result = Array(map.size); - - map.forEach(function(value, key) { - result[++index] = [key, value]; - }); - return result; -} - -/* harmony default export */ const _mapToArray = (mapToArray); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_setToArray.js -var _setToArray = __webpack_require__(29959); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_equalByTag.js - - - - - - - -/** Used to compose bitmasks for value comparisons. */ -var _equalByTag_COMPARE_PARTIAL_FLAG = 1, - _equalByTag_COMPARE_UNORDERED_FLAG = 2; - -/** `Object#toString` result references. */ -var boolTag = '[object Boolean]', - dateTag = '[object Date]', - errorTag = '[object Error]', - mapTag = '[object Map]', - numberTag = '[object Number]', - regexpTag = '[object RegExp]', - setTag = '[object Set]', - stringTag = '[object String]', - symbolTag = '[object Symbol]'; - -var arrayBufferTag = '[object ArrayBuffer]', - dataViewTag = '[object DataView]'; - -/** Used to convert symbols to primitives and strings. */ -var symbolProto = _Symbol/* default */.A ? _Symbol/* default */.A.prototype : undefined, - symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; - -/** - * A specialized version of `baseIsEqualDeep` for comparing objects of - * the same `toStringTag`. - * - * **Note:** This function only supports comparing values with tags of - * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {string} tag The `toStringTag` of the objects to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} stack Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ -function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { - switch (tag) { - case dataViewTag: - if ((object.byteLength != other.byteLength) || - (object.byteOffset != other.byteOffset)) { - return false; - } - object = object.buffer; - other = other.buffer; - - case arrayBufferTag: - if ((object.byteLength != other.byteLength) || - !equalFunc(new _Uint8Array/* default */.A(object), new _Uint8Array/* default */.A(other))) { - return false; - } - return true; - - case boolTag: - case dateTag: - case numberTag: - // Coerce booleans to `1` or `0` and dates to milliseconds. - // Invalid dates are coerced to `NaN`. - return (0,eq/* default */.A)(+object, +other); - - case errorTag: - return object.name == other.name && object.message == other.message; - - case regexpTag: - case stringTag: - // Coerce regexes to strings and treat strings, primitives and objects, - // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring - // for more details. - return object == (other + ''); - - case mapTag: - var convert = _mapToArray; - - case setTag: - var isPartial = bitmask & _equalByTag_COMPARE_PARTIAL_FLAG; - convert || (convert = _setToArray/* default */.A); - - if (object.size != other.size && !isPartial) { - return false; - } - // Assume cyclic values are equal. - var stacked = stack.get(object); - if (stacked) { - return stacked == other; - } - bitmask |= _equalByTag_COMPARE_UNORDERED_FLAG; - - // Recursively compare objects (susceptible to call stack limits). - stack.set(object, other); - var result = _equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); - stack['delete'](object); - return result; - - case symbolTag: - if (symbolValueOf) { - return symbolValueOf.call(object) == symbolValueOf.call(other); - } - } - return false; -} - -/* harmony default export */ const _equalByTag = (equalByTag); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_getAllKeys.js -var _getAllKeys = __webpack_require__(19042); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_equalObjects.js - - -/** Used to compose bitmasks for value comparisons. */ -var _equalObjects_COMPARE_PARTIAL_FLAG = 1; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var _equalObjects_hasOwnProperty = objectProto.hasOwnProperty; - -/** - * A specialized version of `baseIsEqualDeep` for objects with support for - * partial deep comparisons. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} stack Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ -function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { - var isPartial = bitmask & _equalObjects_COMPARE_PARTIAL_FLAG, - objProps = (0,_getAllKeys/* default */.A)(object), - objLength = objProps.length, - othProps = (0,_getAllKeys/* default */.A)(other), - othLength = othProps.length; - - if (objLength != othLength && !isPartial) { - return false; - } - var index = objLength; - while (index--) { - var key = objProps[index]; - if (!(isPartial ? key in other : _equalObjects_hasOwnProperty.call(other, key))) { - return false; - } - } - // Check that cyclic values are equal. - var objStacked = stack.get(object); - var othStacked = stack.get(other); - if (objStacked && othStacked) { - return objStacked == other && othStacked == object; - } - var result = true; - stack.set(object, other); - stack.set(other, object); - - var skipCtor = isPartial; - while (++index < objLength) { - key = objProps[index]; - var objValue = object[key], - othValue = other[key]; - - if (customizer) { - var compared = isPartial - ? customizer(othValue, objValue, key, other, object, stack) - : customizer(objValue, othValue, key, object, other, stack); - } - // Recursively compare objects (susceptible to call stack limits). - if (!(compared === undefined - ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) - : compared - )) { - result = false; - break; - } - skipCtor || (skipCtor = key == 'constructor'); - } - if (result && !skipCtor) { - var objCtor = object.constructor, - othCtor = other.constructor; - - // Non `Object` object instances with different constructors are not equal. - if (objCtor != othCtor && - ('constructor' in object && 'constructor' in other) && - !(typeof objCtor == 'function' && objCtor instanceof objCtor && - typeof othCtor == 'function' && othCtor instanceof othCtor)) { - result = false; - } - } - stack['delete'](object); - stack['delete'](other); - return result; -} - -/* harmony default export */ const _equalObjects = (equalObjects); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_getTag.js + 3 modules -var _getTag = __webpack_require__(9779); -// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js -var isArray = __webpack_require__(92049); -// EXTERNAL MODULE: ./node_modules/lodash-es/isBuffer.js + 1 modules -var isBuffer = __webpack_require__(99912); -// EXTERNAL MODULE: ./node_modules/lodash-es/isTypedArray.js + 1 modules -var isTypedArray = __webpack_require__(33858); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsEqualDeep.js - - - - - - - - - -/** Used to compose bitmasks for value comparisons. */ -var _baseIsEqualDeep_COMPARE_PARTIAL_FLAG = 1; - -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - objectTag = '[object Object]'; - -/** Used for built-in method references. */ -var _baseIsEqualDeep_objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var _baseIsEqualDeep_hasOwnProperty = _baseIsEqualDeep_objectProto.hasOwnProperty; - -/** - * A specialized version of `baseIsEqual` for arrays and objects which performs - * deep comparisons and tracks traversed objects enabling objects with circular - * references to be compared. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} [stack] Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ -function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { - var objIsArr = (0,isArray/* default */.A)(object), - othIsArr = (0,isArray/* default */.A)(other), - objTag = objIsArr ? arrayTag : (0,_getTag/* default */.A)(object), - othTag = othIsArr ? arrayTag : (0,_getTag/* default */.A)(other); - - objTag = objTag == argsTag ? objectTag : objTag; - othTag = othTag == argsTag ? objectTag : othTag; - - var objIsObj = objTag == objectTag, - othIsObj = othTag == objectTag, - isSameTag = objTag == othTag; - - if (isSameTag && (0,isBuffer/* default */.A)(object)) { - if (!(0,isBuffer/* default */.A)(other)) { - return false; - } - objIsArr = true; - objIsObj = false; - } - if (isSameTag && !objIsObj) { - stack || (stack = new _Stack/* default */.A); - return (objIsArr || (0,isTypedArray/* default */.A)(object)) - ? _equalArrays(object, other, bitmask, customizer, equalFunc, stack) - : _equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); - } - if (!(bitmask & _baseIsEqualDeep_COMPARE_PARTIAL_FLAG)) { - var objIsWrapped = objIsObj && _baseIsEqualDeep_hasOwnProperty.call(object, '__wrapped__'), - othIsWrapped = othIsObj && _baseIsEqualDeep_hasOwnProperty.call(other, '__wrapped__'); - - if (objIsWrapped || othIsWrapped) { - var objUnwrapped = objIsWrapped ? object.value() : object, - othUnwrapped = othIsWrapped ? other.value() : other; - - stack || (stack = new _Stack/* default */.A); - return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); - } - } - if (!isSameTag) { - return false; - } - stack || (stack = new _Stack/* default */.A); - return _equalObjects(object, other, bitmask, customizer, equalFunc, stack); -} - -/* harmony default export */ const _baseIsEqualDeep = (baseIsEqualDeep); - -// EXTERNAL MODULE: ./node_modules/lodash-es/isObjectLike.js -var isObjectLike = __webpack_require__(53098); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsEqual.js - - - -/** - * The base implementation of `_.isEqual` which supports partial comparisons - * and tracks traversed objects. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @param {boolean} bitmask The bitmask flags. - * 1 - Unordered comparison - * 2 - Partial comparison - * @param {Function} [customizer] The function to customize comparisons. - * @param {Object} [stack] Tracks traversed `value` and `other` objects. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - */ -function baseIsEqual(value, other, bitmask, customizer, stack) { - if (value === other) { - return true; - } - if (value == null || other == null || (!(0,isObjectLike/* default */.A)(value) && !(0,isObjectLike/* default */.A)(other))) { - return value !== value && other !== other; - } - return _baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); -} - -/* harmony default export */ const _baseIsEqual = (baseIsEqual); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsMatch.js - - - -/** Used to compose bitmasks for value comparisons. */ -var _baseIsMatch_COMPARE_PARTIAL_FLAG = 1, - _baseIsMatch_COMPARE_UNORDERED_FLAG = 2; - -/** - * The base implementation of `_.isMatch` without support for iteratee shorthands. - * - * @private - * @param {Object} object The object to inspect. - * @param {Object} source The object of property values to match. - * @param {Array} matchData The property names, values, and compare flags to match. - * @param {Function} [customizer] The function to customize comparisons. - * @returns {boolean} Returns `true` if `object` is a match, else `false`. - */ -function baseIsMatch(object, source, matchData, customizer) { - var index = matchData.length, - length = index, - noCustomizer = !customizer; - - if (object == null) { - return !length; - } - object = Object(object); - while (index--) { - var data = matchData[index]; - if ((noCustomizer && data[2]) - ? data[1] !== object[data[0]] - : !(data[0] in object) - ) { - return false; - } - } - while (++index < length) { - data = matchData[index]; - var key = data[0], - objValue = object[key], - srcValue = data[1]; - - if (noCustomizer && data[2]) { - if (objValue === undefined && !(key in object)) { - return false; - } - } else { - var stack = new _Stack/* default */.A; - if (customizer) { - var result = customizer(objValue, srcValue, key, object, source, stack); - } - if (!(result === undefined - ? _baseIsEqual(srcValue, objValue, _baseIsMatch_COMPARE_PARTIAL_FLAG | _baseIsMatch_COMPARE_UNORDERED_FLAG, customizer, stack) - : result - )) { - return false; - } - } - } - return true; -} - -/* harmony default export */ const _baseIsMatch = (baseIsMatch); - -// EXTERNAL MODULE: ./node_modules/lodash-es/isObject.js -var isObject = __webpack_require__(23149); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_isStrictComparable.js - - -/** - * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` if suitable for strict - * equality comparisons, else `false`. - */ -function isStrictComparable(value) { - return value === value && !(0,isObject/* default */.A)(value); -} - -/* harmony default export */ const _isStrictComparable = (isStrictComparable); - -// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js -var keys = __webpack_require__(27422); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_getMatchData.js - - - -/** - * Gets the property names, values, and compare flags of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the match data of `object`. - */ -function getMatchData(object) { - var result = (0,keys/* default */.A)(object), - length = result.length; - - while (length--) { - var key = result[length], - value = object[key]; - - result[length] = [key, value, _isStrictComparable(value)]; - } - return result; -} - -/* harmony default export */ const _getMatchData = (getMatchData); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_matchesStrictComparable.js -/** - * A specialized version of `matchesProperty` for source values suitable - * for strict equality comparisons, i.e. `===`. - * - * @private - * @param {string} key The key of the property to get. - * @param {*} srcValue The value to match. - * @returns {Function} Returns the new spec function. - */ -function matchesStrictComparable(key, srcValue) { - return function(object) { - if (object == null) { - return false; - } - return object[key] === srcValue && - (srcValue !== undefined || (key in Object(object))); - }; -} - -/* harmony default export */ const _matchesStrictComparable = (matchesStrictComparable); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseMatches.js - - - - -/** - * The base implementation of `_.matches` which doesn't clone `source`. - * - * @private - * @param {Object} source The object of property values to match. - * @returns {Function} Returns the new spec function. - */ -function baseMatches(source) { - var matchData = _getMatchData(source); - if (matchData.length == 1 && matchData[0][2]) { - return _matchesStrictComparable(matchData[0][0], matchData[0][1]); - } - return function(object) { - return object === source || _baseIsMatch(object, source, matchData); - }; -} - -/* harmony default export */ const _baseMatches = (baseMatches); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGet.js -var _baseGet = __webpack_require__(66318); -;// CONCATENATED MODULE: ./node_modules/lodash-es/get.js - - -/** - * Gets the value at `path` of `object`. If the resolved value is - * `undefined`, the `defaultValue` is returned in its place. - * - * @static - * @memberOf _ - * @since 3.7.0 - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path of the property to get. - * @param {*} [defaultValue] The value returned for `undefined` resolved values. - * @returns {*} Returns the resolved value. - * @example - * - * var object = { 'a': [{ 'b': { 'c': 3 } }] }; - * - * _.get(object, 'a[0].b.c'); - * // => 3 - * - * _.get(object, ['a', '0', 'b', 'c']); - * // => 3 - * - * _.get(object, 'a.b.c', 'default'); - * // => 'default' - */ -function get(object, path, defaultValue) { - var result = object == null ? undefined : (0,_baseGet/* default */.A)(object, path); - return result === undefined ? defaultValue : result; -} - -/* harmony default export */ const lodash_es_get = (get); - -// EXTERNAL MODULE: ./node_modules/lodash-es/hasIn.js + 1 modules -var hasIn = __webpack_require__(39188); -// EXTERNAL MODULE: ./node_modules/lodash-es/_isKey.js -var _isKey = __webpack_require__(86586); -// EXTERNAL MODULE: ./node_modules/lodash-es/_toKey.js -var _toKey = __webpack_require__(30901); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseMatchesProperty.js - - - - - - - - -/** Used to compose bitmasks for value comparisons. */ -var _baseMatchesProperty_COMPARE_PARTIAL_FLAG = 1, - _baseMatchesProperty_COMPARE_UNORDERED_FLAG = 2; - -/** - * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. - * - * @private - * @param {string} path The path of the property to get. - * @param {*} srcValue The value to match. - * @returns {Function} Returns the new spec function. - */ -function baseMatchesProperty(path, srcValue) { - if ((0,_isKey/* default */.A)(path) && _isStrictComparable(srcValue)) { - return _matchesStrictComparable((0,_toKey/* default */.A)(path), srcValue); - } - return function(object) { - var objValue = lodash_es_get(object, path); - return (objValue === undefined && objValue === srcValue) - ? (0,hasIn/* default */.A)(object, path) - : _baseIsEqual(srcValue, objValue, _baseMatchesProperty_COMPARE_PARTIAL_FLAG | _baseMatchesProperty_COMPARE_UNORDERED_FLAG); - }; -} - -/* harmony default export */ const _baseMatchesProperty = (baseMatchesProperty); - -// EXTERNAL MODULE: ./node_modules/lodash-es/identity.js -var identity = __webpack_require__(29008); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseProperty.js -var _baseProperty = __webpack_require__(70805); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_basePropertyDeep.js - - -/** - * A specialized version of `baseProperty` which supports deep paths. - * - * @private - * @param {Array|string} path The path of the property to get. - * @returns {Function} Returns the new accessor function. - */ -function basePropertyDeep(path) { - return function(object) { - return (0,_baseGet/* default */.A)(object, path); - }; -} - -/* harmony default export */ const _basePropertyDeep = (basePropertyDeep); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/property.js - - - - - -/** - * Creates a function that returns the value at `path` of a given object. - * - * @static - * @memberOf _ - * @since 2.4.0 - * @category Util - * @param {Array|string} path The path of the property to get. - * @returns {Function} Returns the new accessor function. - * @example - * - * var objects = [ - * { 'a': { 'b': 2 } }, - * { 'a': { 'b': 1 } } - * ]; - * - * _.map(objects, _.property('a.b')); - * // => [2, 1] - * - * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b'); - * // => [1, 2] - */ -function property(path) { - return (0,_isKey/* default */.A)(path) ? (0,_baseProperty/* default */.A)((0,_toKey/* default */.A)(path)) : _basePropertyDeep(path); -} - -/* harmony default export */ const lodash_es_property = (property); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIteratee.js - - - - - - -/** - * The base implementation of `_.iteratee`. - * - * @private - * @param {*} [value=_.identity] The value to convert to an iteratee. - * @returns {Function} Returns the iteratee. - */ -function baseIteratee(value) { - // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. - // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. - if (typeof value == 'function') { - return value; - } - if (value == null) { - return identity/* default */.A; - } - if (typeof value == 'object') { - return (0,isArray/* default */.A)(value) - ? _baseMatchesProperty(value[0], value[1]) - : _baseMatches(value); - } - return lodash_es_property(value); -} - -/* harmony default export */ const _baseIteratee = (baseIteratee); - - -/***/ }), - -/***/ 70805: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * The base implementation of `_.property` without support for deep paths. - * - * @private - * @param {string} key The key of the property to get. - * @returns {Function} Returns the new accessor function. - */ -function baseProperty(key) { - return function(object) { - return object == null ? undefined : object[key]; - }; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseProperty); - - -/***/ }), - -/***/ 64099: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * Checks if a `cache` value for `key` exists. - * - * @private - * @param {Object} cache The cache to query. - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ -function cacheHas(cache, key) { - return cache.has(key); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (cacheHas); - - -/***/ }), - -/***/ 99922: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(29008); - - -/** - * Casts `value` to `identity` if it's not a function. - * - * @private - * @param {*} value The value to inspect. - * @returns {Function} Returns cast function. - */ -function castFunction(value) { - return typeof value == 'function' ? value : _identity_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (castFunction); - - -/***/ }), - -/***/ 7819: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ _castPath) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js -var isArray = __webpack_require__(92049); -// EXTERNAL MODULE: ./node_modules/lodash-es/_isKey.js -var _isKey = __webpack_require__(86586); -// EXTERNAL MODULE: ./node_modules/lodash-es/memoize.js -var memoize = __webpack_require__(46632); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_memoizeCapped.js - - -/** Used as the maximum memoize cache size. */ -var MAX_MEMOIZE_SIZE = 500; - -/** - * A specialized version of `_.memoize` which clears the memoized function's - * cache when it exceeds `MAX_MEMOIZE_SIZE`. - * - * @private - * @param {Function} func The function to have its output memoized. - * @returns {Function} Returns the new memoized function. - */ -function memoizeCapped(func) { - var result = (0,memoize/* default */.A)(func, function(key) { - if (cache.size === MAX_MEMOIZE_SIZE) { - cache.clear(); - } - return key; - }); - - var cache = result.cache; - return result; -} - -/* harmony default export */ const _memoizeCapped = (memoizeCapped); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_stringToPath.js - - -/** Used to match property names within property paths. */ -var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; - -/** Used to match backslashes in property paths. */ -var reEscapeChar = /\\(\\)?/g; - -/** - * Converts `string` to a property path array. - * - * @private - * @param {string} string The string to convert. - * @returns {Array} Returns the property path array. - */ -var stringToPath = _memoizeCapped(function(string) { - var result = []; - if (string.charCodeAt(0) === 46 /* . */) { - result.push(''); - } - string.replace(rePropName, function(match, number, quote, subString) { - result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match)); - }); - return result; -}); - -/* harmony default export */ const _stringToPath = (stringToPath); - -// EXTERNAL MODULE: ./node_modules/lodash-es/toString.js + 1 modules -var lodash_es_toString = __webpack_require__(28894); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_castPath.js - - - - - -/** - * Casts `value` to a path array if it's not one. - * - * @private - * @param {*} value The value to inspect. - * @param {Object} [object] The object to query keys on. - * @returns {Array} Returns the cast property path array. - */ -function castPath(value, object) { - if ((0,isArray/* default */.A)(value)) { - return value; - } - return (0,_isKey/* default */.A)(value, object) ? [value] : _stringToPath((0,lodash_es_toString/* default */.A)(value)); -} - -/* harmony default export */ const _castPath = (castPath); - - -/***/ }), - -/***/ 19042: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _baseGetAllKeys_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(33831); -/* harmony import */ var _getSymbols_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(14792); -/* harmony import */ var _keys_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(27422); - - - - -/** - * Creates an array of own enumerable property names and symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names and symbols. - */ -function getAllKeys(object) { - return (0,_baseGetAllKeys_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(object, _keys_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A, _getSymbols_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (getAllKeys); - - -/***/ }), - -/***/ 14792: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _arrayFilter_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2634); -/* harmony import */ var _stubArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13153); - - - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Built-in value references. */ -var propertyIsEnumerable = objectProto.propertyIsEnumerable; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeGetSymbols = Object.getOwnPropertySymbols; - -/** - * Creates an array of the own enumerable symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of symbols. - */ -var getSymbols = !nativeGetSymbols ? _stubArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A : function(object) { - if (object == null) { - return []; - } - object = Object(object); - return (0,_arrayFilter_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(nativeGetSymbols(object), function(symbol) { - return propertyIsEnumerable.call(object, symbol); - }); -}; - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (getSymbols); - - -/***/ }), - -/***/ 85054: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _castPath_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7819); -/* harmony import */ var _isArguments_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(52274); -/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(92049); -/* harmony import */ var _isIndex_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(25353); -/* harmony import */ var _isLength_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5254); -/* harmony import */ var _toKey_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(30901); - - - - - - - -/** - * Checks if `path` exists on `object`. - * - * @private - * @param {Object} object The object to query. - * @param {Array|string} path The path to check. - * @param {Function} hasFunc The function to check properties. - * @returns {boolean} Returns `true` if `path` exists, else `false`. - */ -function hasPath(object, path, hasFunc) { - path = (0,_castPath_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(path, object); - - var index = -1, - length = path.length, - result = false; - - while (++index < length) { - var key = (0,_toKey_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(path[index]); - if (!(result = object != null && hasFunc(object, key))) { - break; - } - object = object[key]; - } - if (result || ++index != length) { - return result; - } - length = object == null ? 0 : object.length; - return !!length && (0,_isLength_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)(length) && (0,_isIndex_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(key, length) && - ((0,_isArray_js__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .A)(object) || (0,_isArguments_js__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A)(object)); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (hasPath); - - -/***/ }), - -/***/ 86586: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(92049); -/* harmony import */ var _isSymbol_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(61882); - - - -/** Used to match property names within property paths. */ -var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, - reIsPlainProp = /^\w*$/; - -/** - * Checks if `value` is a property name and not a property path. - * - * @private - * @param {*} value The value to check. - * @param {Object} [object] The object to query keys on. - * @returns {boolean} Returns `true` if `value` is a property name, else `false`. - */ -function isKey(value, object) { - if ((0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(value)) { - return false; - } - var type = typeof value; - if (type == 'number' || type == 'symbol' || type == 'boolean' || - value == null || (0,_isSymbol_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(value)) { - return true; - } - return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || - (object != null && value in Object(object)); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isKey); - - -/***/ }), - -/***/ 29959: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * Converts `set` to an array of its values. - * - * @private - * @param {Object} set The set to convert. - * @returns {Array} Returns the values. - */ -function setToArray(set) { - var index = -1, - result = Array(set.size); - - set.forEach(function(value) { - result[++index] = value; - }); - return result; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (setToArray); - - -/***/ }), - -/***/ 30901: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _isSymbol_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(61882); - - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0; - -/** - * Converts `value` to a string key if it's not a string or symbol. - * - * @private - * @param {*} value The value to inspect. - * @returns {string|symbol} Returns the key. - */ -function toKey(value) { - if (typeof value == 'string' || (0,_isSymbol_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(value)) { - return value; - } - var result = (value + ''); - return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (toKey); - - -/***/ }), - -/***/ 50053: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _baseClone_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(91641); - - -/** Used to compose bitmasks for cloning. */ -var CLONE_SYMBOLS_FLAG = 4; - -/** - * Creates a shallow clone of `value`. - * - * **Note:** This method is loosely based on the - * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm) - * and supports cloning arrays, array buffers, booleans, date objects, maps, - * numbers, `Object` objects, regexes, sets, strings, symbols, and typed - * arrays. The own enumerable properties of `arguments` objects are cloned - * as plain objects. An empty object is returned for uncloneable values such - * as error objects, functions, DOM nodes, and WeakMaps. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to clone. - * @returns {*} Returns the cloned value. - * @see _.cloneDeep - * @example - * - * var objects = [{ 'a': 1 }, { 'b': 2 }]; - * - * var shallow = _.clone(objects); - * console.log(shallow[0] === objects[0]); - * // => true - */ -function clone(value) { - return (0,_baseClone_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(value, CLONE_SYMBOLS_FLAG); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (clone); - - -/***/ }), - -/***/ 11662: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ lodash_es_filter) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayFilter.js -var _arrayFilter = __webpack_require__(2634); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseEach.js + 1 modules -var _baseEach = __webpack_require__(6240); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseFilter.js - - -/** - * The base implementation of `_.filter` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {Array} Returns the new filtered array. - */ -function baseFilter(collection, predicate) { - var result = []; - (0,_baseEach/* default */.A)(collection, function(value, index, collection) { - if (predicate(value, index, collection)) { - result.push(value); - } - }); - return result; -} - -/* harmony default export */ const _baseFilter = (baseFilter); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseIteratee.js + 16 modules -var _baseIteratee = __webpack_require__(49574); -// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js -var isArray = __webpack_require__(92049); -;// CONCATENATED MODULE: ./node_modules/lodash-es/filter.js - - - - - -/** - * Iterates over elements of `collection`, returning an array of all elements - * `predicate` returns truthy for. The predicate is invoked with three - * arguments: (value, index|key, collection). - * - * **Note:** Unlike `_.remove`, this method returns a new array. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @returns {Array} Returns the new filtered array. - * @see _.reject - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': true }, - * { 'user': 'fred', 'age': 40, 'active': false } - * ]; - * - * _.filter(users, function(o) { return !o.active; }); - * // => objects for ['fred'] - * - * // The `_.matches` iteratee shorthand. - * _.filter(users, { 'age': 36, 'active': true }); - * // => objects for ['barney'] - * - * // The `_.matchesProperty` iteratee shorthand. - * _.filter(users, ['active', false]); - * // => objects for ['fred'] - * - * // The `_.property` iteratee shorthand. - * _.filter(users, 'active'); - * // => objects for ['barney'] - * - * // Combining several predicates using `_.overEvery` or `_.overSome`. - * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]])); - * // => objects for ['fred', 'barney'] - */ -function filter(collection, predicate) { - var func = (0,isArray/* default */.A)(collection) ? _arrayFilter/* default */.A : _baseFilter; - return func(collection, (0,_baseIteratee/* default */.A)(predicate, 3)); -} - -/* harmony default export */ const lodash_es_filter = (filter); - - -/***/ }), - -/***/ 8058: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _arrayEach_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(72641); -/* harmony import */ var _baseEach_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6240); -/* harmony import */ var _castFunction_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(99922); -/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(92049); - - - - - -/** - * Iterates over elements of `collection` and invokes `iteratee` for each element. - * The iteratee is invoked with three arguments: (value, index|key, collection). - * Iteratee functions may exit iteration early by explicitly returning `false`. - * - * **Note:** As with other "Collections" methods, objects with a "length" - * property are iterated like arrays. To avoid this behavior use `_.forIn` - * or `_.forOwn` for object iteration. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @alias each - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Array|Object} Returns `collection`. - * @see _.forEachRight - * @example - * - * _.forEach([1, 2], function(value) { - * console.log(value); - * }); - * // => Logs `1` then `2`. - * - * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { - * console.log(key); - * }); - * // => Logs 'a' then 'b' (iteration order is not guaranteed). - */ -function forEach(collection, iteratee) { - var func = (0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(collection) ? _arrayEach_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A : _baseEach_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A; - return func(collection, (0,_castFunction_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(iteratee)); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (forEach); - - -/***/ }), - -/***/ 48585: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ lodash_es_has) -}); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseHas.js -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var _baseHas_hasOwnProperty = objectProto.hasOwnProperty; - -/** - * The base implementation of `_.has` without support for deep paths. - * - * @private - * @param {Object} [object] The object to query. - * @param {Array|string} key The key to check. - * @returns {boolean} Returns `true` if `key` exists, else `false`. - */ -function baseHas(object, key) { - return object != null && _baseHas_hasOwnProperty.call(object, key); -} - -/* harmony default export */ const _baseHas = (baseHas); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_hasPath.js -var _hasPath = __webpack_require__(85054); -;// CONCATENATED MODULE: ./node_modules/lodash-es/has.js - - - -/** - * Checks if `path` is a direct property of `object`. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path to check. - * @returns {boolean} Returns `true` if `path` exists, else `false`. - * @example - * - * var object = { 'a': { 'b': 2 } }; - * var other = _.create({ 'a': _.create({ 'b': 2 }) }); - * - * _.has(object, 'a'); - * // => true - * - * _.has(object, 'a.b'); - * // => true - * - * _.has(object, ['a', 'b']); - * // => true - * - * _.has(other, 'a'); - * // => false - */ -function has(object, path) { - return object != null && (0,_hasPath/* default */.A)(object, path, _baseHas); -} - -/* harmony default export */ const lodash_es_has = (has); - - -/***/ }), - -/***/ 39188: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ lodash_es_hasIn) -}); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseHasIn.js -/** - * The base implementation of `_.hasIn` without support for deep paths. - * - * @private - * @param {Object} [object] The object to query. - * @param {Array|string} key The key to check. - * @returns {boolean} Returns `true` if `key` exists, else `false`. - */ -function baseHasIn(object, key) { - return object != null && key in Object(object); -} - -/* harmony default export */ const _baseHasIn = (baseHasIn); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_hasPath.js -var _hasPath = __webpack_require__(85054); -;// CONCATENATED MODULE: ./node_modules/lodash-es/hasIn.js - - - -/** - * Checks if `path` is a direct or inherited property of `object`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path to check. - * @returns {boolean} Returns `true` if `path` exists, else `false`. - * @example - * - * var object = _.create({ 'a': _.create({ 'b': 2 }) }); - * - * _.hasIn(object, 'a'); - * // => true - * - * _.hasIn(object, 'a.b'); - * // => true - * - * _.hasIn(object, ['a', 'b']); - * // => true - * - * _.hasIn(object, 'b'); - * // => false - */ -function hasIn(object, path) { - return object != null && (0,_hasPath/* default */.A)(object, path, _baseHasIn); -} - -/* harmony default export */ const lodash_es_hasIn = (hasIn); - - -/***/ }), - -/***/ 61882: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _baseGetTag_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(88496); -/* harmony import */ var _isObjectLike_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(53098); - - - -/** `Object#toString` result references. */ -var symbolTag = '[object Symbol]'; - -/** - * Checks if `value` is classified as a `Symbol` primitive or object. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. - * @example - * - * _.isSymbol(Symbol.iterator); - * // => true - * - * _.isSymbol('abc'); - * // => false - */ -function isSymbol(value) { - return typeof value == 'symbol' || - ((0,_isObjectLike_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(value) && (0,_baseGetTag_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(value) == symbolTag); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isSymbol); - - -/***/ }), - -/***/ 69592: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * Checks if `value` is `undefined`. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. - * @example - * - * _.isUndefined(void 0); - * // => true - * - * _.isUndefined(null); - * // => false - */ -function isUndefined(value) { - return value === undefined; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isUndefined); - - -/***/ }), - -/***/ 27422: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _arrayLikeKeys_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(83607); -/* harmony import */ var _baseKeys_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(69471); -/* harmony import */ var _isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(38446); - - - - -/** - * Creates an array of the own enumerable property names of `object`. - * - * **Note:** Non-object values are coerced to objects. See the - * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) - * for more details. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.keys(new Foo); - * // => ['a', 'b'] (iteration order is not guaranteed) - * - * _.keys('hi'); - * // => ['0', '1'] - */ -function keys(object) { - return (0,_isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(object) ? (0,_arrayLikeKeys_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(object) : (0,_baseKeys_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)(object); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (keys); - - -/***/ }), - -/***/ 89463: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ lodash_es_reduce) -}); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_arrayReduce.js -/** - * A specialized version of `_.reduce` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {*} [accumulator] The initial value. - * @param {boolean} [initAccum] Specify using the first element of `array` as - * the initial value. - * @returns {*} Returns the accumulated value. - */ -function arrayReduce(array, iteratee, accumulator, initAccum) { - var index = -1, - length = array == null ? 0 : array.length; - - if (initAccum && length) { - accumulator = array[++index]; - } - while (++index < length) { - accumulator = iteratee(accumulator, array[index], index, array); - } - return accumulator; -} - -/* harmony default export */ const _arrayReduce = (arrayReduce); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseEach.js + 1 modules -var _baseEach = __webpack_require__(6240); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseIteratee.js + 16 modules -var _baseIteratee = __webpack_require__(49574); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseReduce.js -/** - * The base implementation of `_.reduce` and `_.reduceRight`, without support - * for iteratee shorthands, which iterates over `collection` using `eachFunc`. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {*} accumulator The initial value. - * @param {boolean} initAccum Specify using the first or last element of - * `collection` as the initial value. - * @param {Function} eachFunc The function to iterate over `collection`. - * @returns {*} Returns the accumulated value. - */ -function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { - eachFunc(collection, function(value, index, collection) { - accumulator = initAccum - ? (initAccum = false, value) - : iteratee(accumulator, value, index, collection); - }); - return accumulator; -} - -/* harmony default export */ const _baseReduce = (baseReduce); - -// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js -var isArray = __webpack_require__(92049); -;// CONCATENATED MODULE: ./node_modules/lodash-es/reduce.js - - - - - - -/** - * Reduces `collection` to a value which is the accumulated result of running - * each element in `collection` thru `iteratee`, where each successive - * invocation is supplied the return value of the previous. If `accumulator` - * is not given, the first element of `collection` is used as the initial - * value. The iteratee is invoked with four arguments: - * (accumulator, value, index|key, collection). - * - * Many lodash methods are guarded to work as iteratees for methods like - * `_.reduce`, `_.reduceRight`, and `_.transform`. - * - * The guarded methods are: - * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`, - * and `sortBy` - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @param {*} [accumulator] The initial value. - * @returns {*} Returns the accumulated value. - * @see _.reduceRight - * @example - * - * _.reduce([1, 2], function(sum, n) { - * return sum + n; - * }, 0); - * // => 3 - * - * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { - * (result[value] || (result[value] = [])).push(key); - * return result; - * }, {}); - * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed) - */ -function reduce(collection, iteratee, accumulator) { - var func = (0,isArray/* default */.A)(collection) ? _arrayReduce : _baseReduce, - initAccum = arguments.length < 3; - - return func(collection, (0,_baseIteratee/* default */.A)(iteratee, 4), accumulator, initAccum, _baseEach/* default */.A); -} - -/* harmony default export */ const lodash_es_reduce = (reduce); - - -/***/ }), - -/***/ 13153: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * This method returns a new empty array. - * - * @static - * @memberOf _ - * @since 4.13.0 - * @category Util - * @returns {Array} Returns the new empty array. - * @example - * - * var arrays = _.times(2, _.stubArray); - * - * console.log(arrays); - * // => [[], []] - * - * console.log(arrays[0] === arrays[1]); - * // => false - */ -function stubArray() { - return []; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (stubArray); - - -/***/ }), - -/***/ 28894: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ lodash_es_toString) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_Symbol.js -var _Symbol = __webpack_require__(241); -// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayMap.js -var _arrayMap = __webpack_require__(45572); -// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js -var isArray = __webpack_require__(92049); -// EXTERNAL MODULE: ./node_modules/lodash-es/isSymbol.js -var isSymbol = __webpack_require__(61882); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseToString.js - - - - - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0; - -/** Used to convert symbols to primitives and strings. */ -var symbolProto = _Symbol/* default */.A ? _Symbol/* default */.A.prototype : undefined, - symbolToString = symbolProto ? symbolProto.toString : undefined; - -/** - * The base implementation of `_.toString` which doesn't convert nullish - * values to empty strings. - * - * @private - * @param {*} value The value to process. - * @returns {string} Returns the string. - */ -function baseToString(value) { - // Exit early for strings to avoid a performance hit in some environments. - if (typeof value == 'string') { - return value; - } - if ((0,isArray/* default */.A)(value)) { - // Recursively convert values (susceptible to call stack limits). - return (0,_arrayMap/* default */.A)(value, baseToString) + ''; - } - if ((0,isSymbol/* default */.A)(value)) { - return symbolToString ? symbolToString.call(value) : ''; - } - var result = (value + ''); - return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; -} - -/* harmony default export */ const _baseToString = (baseToString); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/toString.js - - -/** - * Converts `value` to a string. An empty string is returned for `null` - * and `undefined` values. The sign of `-0` is preserved. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {string} Returns the converted string. - * @example - * - * _.toString(null); - * // => '' - * - * _.toString(-0); - * // => '-0' - * - * _.toString([1, 2, 3]); - * // => '1,2,3' - */ -function toString_toString(value) { - return value == null ? '' : _baseToString(value); -} - -/* harmony default export */ const lodash_es_toString = (toString_toString); - - -/***/ }), - -/***/ 38207: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ lodash_es_values) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayMap.js -var _arrayMap = __webpack_require__(45572); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseValues.js - - -/** - * The base implementation of `_.values` and `_.valuesIn` which creates an - * array of `object` property values corresponding to the property names - * of `props`. - * - * @private - * @param {Object} object The object to query. - * @param {Array} props The property names to get values for. - * @returns {Object} Returns the array of property values. - */ -function baseValues(object, props) { - return (0,_arrayMap/* default */.A)(props, function(key) { - return object[key]; - }); -} - -/* harmony default export */ const _baseValues = (baseValues); - -// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js -var keys = __webpack_require__(27422); -;// CONCATENATED MODULE: ./node_modules/lodash-es/values.js - - - -/** - * Creates an array of the own enumerable string keyed property values of `object`. - * - * **Note:** Non-object values are coerced to objects. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property values. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.values(new Foo); - * // => [1, 2] (iteration order is not guaranteed) - * - * _.values('hi'); - * // => ['h', 'i'] - */ -function values(object) { - return object == null ? [] : _baseValues(object, (0,keys/* default */.A)(object)); -} - -/* harmony default export */ const lodash_es_values = (values); - - -/***/ }), - -/***/ 56625: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ diagram: () => (/* binding */ diagram) -/* harmony export */ }); -/* harmony import */ var _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(86079); -/* harmony import */ var lodash_es_clone_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(50053); -/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(75937); -/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(25582); -/* harmony import */ var _edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(88146); -/* harmony import */ var dagre_d3_es_src_graphlib_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(697); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(26312); -/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(74353); -/* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(16750); -/* harmony import */ var dompurify__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(99418); -var _a, _b; - - - - - - - - - - - - - - - - -var parser = function() { - var o = function(k, v, o2, l) { - for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) - ; - return o2; - }, $V0 = [1, 7], $V1 = [1, 13], $V2 = [1, 14], $V3 = [1, 15], $V4 = [1, 19], $V5 = [1, 16], $V6 = [1, 17], $V7 = [1, 18], $V8 = [8, 30], $V9 = [8, 21, 28, 29, 30, 31, 32, 40, 44, 47], $Va = [1, 23], $Vb = [1, 24], $Vc = [8, 15, 16, 21, 28, 29, 30, 31, 32, 40, 44, 47], $Vd = [8, 15, 16, 21, 27, 28, 29, 30, 31, 32, 40, 44, 47], $Ve = [1, 49]; - var parser2 = { - trace: function trace() { - }, - yy: {}, - symbols_: { "error": 2, "spaceLines": 3, "SPACELINE": 4, "NL": 5, "separator": 6, "SPACE": 7, "EOF": 8, "start": 9, "BLOCK_DIAGRAM_KEY": 10, "document": 11, "stop": 12, "statement": 13, "link": 14, "LINK": 15, "START_LINK": 16, "LINK_LABEL": 17, "STR": 18, "nodeStatement": 19, "columnsStatement": 20, "SPACE_BLOCK": 21, "blockStatement": 22, "classDefStatement": 23, "cssClassStatement": 24, "styleStatement": 25, "node": 26, "SIZE": 27, "COLUMNS": 28, "id-block": 29, "end": 30, "block": 31, "NODE_ID": 32, "nodeShapeNLabel": 33, "dirList": 34, "DIR": 35, "NODE_DSTART": 36, "NODE_DEND": 37, "BLOCK_ARROW_START": 38, "BLOCK_ARROW_END": 39, "classDef": 40, "CLASSDEF_ID": 41, "CLASSDEF_STYLEOPTS": 42, "DEFAULT": 43, "class": 44, "CLASSENTITY_IDS": 45, "STYLECLASS": 46, "style": 47, "STYLE_ENTITY_IDS": 48, "STYLE_DEFINITION_DATA": 49, "$accept": 0, "$end": 1 }, - terminals_: { 2: "error", 4: "SPACELINE", 5: "NL", 7: "SPACE", 8: "EOF", 10: "BLOCK_DIAGRAM_KEY", 15: "LINK", 16: "START_LINK", 17: "LINK_LABEL", 18: "STR", 21: "SPACE_BLOCK", 27: "SIZE", 28: "COLUMNS", 29: "id-block", 30: "end", 31: "block", 32: "NODE_ID", 35: "DIR", 36: "NODE_DSTART", 37: "NODE_DEND", 38: "BLOCK_ARROW_START", 39: "BLOCK_ARROW_END", 40: "classDef", 41: "CLASSDEF_ID", 42: "CLASSDEF_STYLEOPTS", 43: "DEFAULT", 44: "class", 45: "CLASSENTITY_IDS", 46: "STYLECLASS", 47: "style", 48: "STYLE_ENTITY_IDS", 49: "STYLE_DEFINITION_DATA" }, - productions_: [0, [3, 1], [3, 2], [3, 2], [6, 1], [6, 1], [6, 1], [9, 3], [12, 1], [12, 1], [12, 2], [12, 2], [11, 1], [11, 2], [14, 1], [14, 4], [13, 1], [13, 1], [13, 1], [13, 1], [13, 1], [13, 1], [13, 1], [19, 3], [19, 2], [19, 1], [20, 1], [22, 4], [22, 3], [26, 1], [26, 2], [34, 1], [34, 2], [33, 3], [33, 4], [23, 3], [23, 3], [24, 3], [25, 3]], - performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { - var $0 = $$.length - 1; - switch (yystate) { - case 4: - yy.getLogger().debug("Rule: separator (NL) "); - break; - case 5: - yy.getLogger().debug("Rule: separator (Space) "); - break; - case 6: - yy.getLogger().debug("Rule: separator (EOF) "); - break; - case 7: - yy.getLogger().debug("Rule: hierarchy: ", $$[$0 - 1]); - yy.setHierarchy($$[$0 - 1]); - break; - case 8: - yy.getLogger().debug("Stop NL "); - break; - case 9: - yy.getLogger().debug("Stop EOF "); - break; - case 10: - yy.getLogger().debug("Stop NL2 "); - break; - case 11: - yy.getLogger().debug("Stop EOF2 "); - break; - case 12: - yy.getLogger().debug("Rule: statement: ", $$[$0]); - typeof $$[$0].length === "number" ? this.$ = $$[$0] : this.$ = [$$[$0]]; - break; - case 13: - yy.getLogger().debug("Rule: statement #2: ", $$[$0 - 1]); - this.$ = [$$[$0 - 1]].concat($$[$0]); - break; - case 14: - yy.getLogger().debug("Rule: link: ", $$[$0], yytext); - this.$ = { edgeTypeStr: $$[$0], label: "" }; - break; - case 15: - yy.getLogger().debug("Rule: LABEL link: ", $$[$0 - 3], $$[$0 - 1], $$[$0]); - this.$ = { edgeTypeStr: $$[$0], label: $$[$0 - 1] }; - break; - case 18: - const num = parseInt($$[$0]); - const spaceId = yy.generateId(); - this.$ = { id: spaceId, type: "space", label: "", width: num, children: [] }; - break; - case 23: - yy.getLogger().debug("Rule: (nodeStatement link node) ", $$[$0 - 2], $$[$0 - 1], $$[$0], " typestr: ", $$[$0 - 1].edgeTypeStr); - const edgeData = yy.edgeStrToEdgeData($$[$0 - 1].edgeTypeStr); - this.$ = [ - { id: $$[$0 - 2].id, label: $$[$0 - 2].label, type: $$[$0 - 2].type, directions: $$[$0 - 2].directions }, - { id: $$[$0 - 2].id + "-" + $$[$0].id, start: $$[$0 - 2].id, end: $$[$0].id, label: $$[$0 - 1].label, type: "edge", directions: $$[$0].directions, arrowTypeEnd: edgeData, arrowTypeStart: "arrow_open" }, - { id: $$[$0].id, label: $$[$0].label, type: yy.typeStr2Type($$[$0].typeStr), directions: $$[$0].directions } - ]; - break; - case 24: - yy.getLogger().debug("Rule: nodeStatement (abc88 node size) ", $$[$0 - 1], $$[$0]); - this.$ = { id: $$[$0 - 1].id, label: $$[$0 - 1].label, type: yy.typeStr2Type($$[$0 - 1].typeStr), directions: $$[$0 - 1].directions, widthInColumns: parseInt($$[$0], 10) }; - break; - case 25: - yy.getLogger().debug("Rule: nodeStatement (node) ", $$[$0]); - this.$ = { id: $$[$0].id, label: $$[$0].label, type: yy.typeStr2Type($$[$0].typeStr), directions: $$[$0].directions, widthInColumns: 1 }; - break; - case 26: - yy.getLogger().debug("APA123", this ? this : "na"); - yy.getLogger().debug("COLUMNS: ", $$[$0]); - this.$ = { type: "column-setting", columns: $$[$0] === "auto" ? -1 : parseInt($$[$0]) }; - break; - case 27: - yy.getLogger().debug("Rule: id-block statement : ", $$[$0 - 2], $$[$0 - 1]); - yy.generateId(); - this.$ = { ...$$[$0 - 2], type: "composite", children: $$[$0 - 1] }; - break; - case 28: - yy.getLogger().debug("Rule: blockStatement : ", $$[$0 - 2], $$[$0 - 1], $$[$0]); - const id = yy.generateId(); - this.$ = { id, type: "composite", label: "", children: $$[$0 - 1] }; - break; - case 29: - yy.getLogger().debug("Rule: node (NODE_ID separator): ", $$[$0]); - this.$ = { id: $$[$0] }; - break; - case 30: - yy.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ", $$[$0 - 1], $$[$0]); - this.$ = { id: $$[$0 - 1], label: $$[$0].label, typeStr: $$[$0].typeStr, directions: $$[$0].directions }; - break; - case 31: - yy.getLogger().debug("Rule: dirList: ", $$[$0]); - this.$ = [$$[$0]]; - break; - case 32: - yy.getLogger().debug("Rule: dirList: ", $$[$0 - 1], $$[$0]); - this.$ = [$$[$0 - 1]].concat($$[$0]); - break; - case 33: - yy.getLogger().debug("Rule: nodeShapeNLabel: ", $$[$0 - 2], $$[$0 - 1], $$[$0]); - this.$ = { typeStr: $$[$0 - 2] + $$[$0], label: $$[$0 - 1] }; - break; - case 34: - yy.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ", $$[$0 - 3], $$[$0 - 2], " #3:", $$[$0 - 1], $$[$0]); - this.$ = { typeStr: $$[$0 - 3] + $$[$0], label: $$[$0 - 2], directions: $$[$0 - 1] }; - break; - case 35: - case 36: - this.$ = { type: "classDef", id: $$[$0 - 1].trim(), css: $$[$0].trim() }; - break; - case 37: - this.$ = { type: "applyClass", id: $$[$0 - 1].trim(), styleClass: $$[$0].trim() }; - break; - case 38: - this.$ = { type: "applyStyles", id: $$[$0 - 1].trim(), stylesStr: $$[$0].trim() }; - break; - } - }, - table: [{ 9: 1, 10: [1, 2] }, { 1: [3] }, { 11: 3, 13: 4, 19: 5, 20: 6, 21: $V0, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: $V1, 29: $V2, 31: $V3, 32: $V4, 40: $V5, 44: $V6, 47: $V7 }, { 8: [1, 20] }, o($V8, [2, 12], { 13: 4, 19: 5, 20: 6, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 11: 21, 21: $V0, 28: $V1, 29: $V2, 31: $V3, 32: $V4, 40: $V5, 44: $V6, 47: $V7 }), o($V9, [2, 16], { 14: 22, 15: $Va, 16: $Vb }), o($V9, [2, 17]), o($V9, [2, 18]), o($V9, [2, 19]), o($V9, [2, 20]), o($V9, [2, 21]), o($V9, [2, 22]), o($Vc, [2, 25], { 27: [1, 25] }), o($V9, [2, 26]), { 19: 26, 26: 12, 32: $V4 }, { 11: 27, 13: 4, 19: 5, 20: 6, 21: $V0, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: $V1, 29: $V2, 31: $V3, 32: $V4, 40: $V5, 44: $V6, 47: $V7 }, { 41: [1, 28], 43: [1, 29] }, { 45: [1, 30] }, { 48: [1, 31] }, o($Vd, [2, 29], { 33: 32, 36: [1, 33], 38: [1, 34] }), { 1: [2, 7] }, o($V8, [2, 13]), { 26: 35, 32: $V4 }, { 32: [2, 14] }, { 17: [1, 36] }, o($Vc, [2, 24]), { 11: 37, 13: 4, 14: 22, 15: $Va, 16: $Vb, 19: 5, 20: 6, 21: $V0, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: $V1, 29: $V2, 31: $V3, 32: $V4, 40: $V5, 44: $V6, 47: $V7 }, { 30: [1, 38] }, { 42: [1, 39] }, { 42: [1, 40] }, { 46: [1, 41] }, { 49: [1, 42] }, o($Vd, [2, 30]), { 18: [1, 43] }, { 18: [1, 44] }, o($Vc, [2, 23]), { 18: [1, 45] }, { 30: [1, 46] }, o($V9, [2, 28]), o($V9, [2, 35]), o($V9, [2, 36]), o($V9, [2, 37]), o($V9, [2, 38]), { 37: [1, 47] }, { 34: 48, 35: $Ve }, { 15: [1, 50] }, o($V9, [2, 27]), o($Vd, [2, 33]), { 39: [1, 51] }, { 34: 52, 35: $Ve, 39: [2, 31] }, { 32: [2, 15] }, o($Vd, [2, 34]), { 39: [2, 32] }], - defaultActions: { 20: [2, 7], 23: [2, 14], 50: [2, 15], 52: [2, 32] }, - parseError: function parseError(str, hash) { - if (hash.recoverable) { - this.trace(str); - } else { - var error = new Error(str); - error.hash = hash; - throw error; - } - }, - parse: function parse(input) { - var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; - var args = lstack.slice.call(arguments, 1); - var lexer2 = Object.create(this.lexer); - var sharedState = { yy: {} }; - for (var k in this.yy) { - if (Object.prototype.hasOwnProperty.call(this.yy, k)) { - sharedState.yy[k] = this.yy[k]; - } - } - lexer2.setInput(input, sharedState.yy); - sharedState.yy.lexer = lexer2; - sharedState.yy.parser = this; - if (typeof lexer2.yylloc == "undefined") { - lexer2.yylloc = {}; - } - var yyloc = lexer2.yylloc; - lstack.push(yyloc); - var ranges = lexer2.options && lexer2.options.ranges; - if (typeof sharedState.yy.parseError === "function") { - this.parseError = sharedState.yy.parseError; - } else { - this.parseError = Object.getPrototypeOf(this).parseError; - } - function lex() { - var token; - token = tstack.pop() || lexer2.lex() || EOF; - if (typeof token !== "number") { - if (token instanceof Array) { - tstack = token; - token = tstack.pop(); - } - token = self.symbols_[token] || token; - } - return token; - } - var symbol, state, action, r, yyval = {}, p, len, newState, expected; - while (true) { - state = stack[stack.length - 1]; - if (this.defaultActions[state]) { - action = this.defaultActions[state]; - } else { - if (symbol === null || typeof symbol == "undefined") { - symbol = lex(); - } - action = table[state] && table[state][symbol]; - } - if (typeof action === "undefined" || !action.length || !action[0]) { - var errStr = ""; - expected = []; - for (p in table[state]) { - if (this.terminals_[p] && p > TERROR) { - expected.push("'" + this.terminals_[p] + "'"); - } - } - if (lexer2.showPosition) { - errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; - } else { - errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); - } - this.parseError(errStr, { - text: lexer2.match, - token: this.terminals_[symbol] || symbol, - line: lexer2.yylineno, - loc: yyloc, - expected - }); - } - if (action[0] instanceof Array && action.length > 1) { - throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); - } - switch (action[0]) { - case 1: - stack.push(symbol); - vstack.push(lexer2.yytext); - lstack.push(lexer2.yylloc); - stack.push(action[1]); - symbol = null; - { - yyleng = lexer2.yyleng; - yytext = lexer2.yytext; - yylineno = lexer2.yylineno; - yyloc = lexer2.yylloc; - } - break; - case 2: - len = this.productions_[action[1]][1]; - yyval.$ = vstack[vstack.length - len]; - yyval._$ = { - first_line: lstack[lstack.length - (len || 1)].first_line, - last_line: lstack[lstack.length - 1].last_line, - first_column: lstack[lstack.length - (len || 1)].first_column, - last_column: lstack[lstack.length - 1].last_column - }; - if (ranges) { - yyval._$.range = [ - lstack[lstack.length - (len || 1)].range[0], - lstack[lstack.length - 1].range[1] - ]; - } - r = this.performAction.apply(yyval, [ - yytext, - yyleng, - yylineno, - sharedState.yy, - action[1], - vstack, - lstack - ].concat(args)); - if (typeof r !== "undefined") { - return r; - } - if (len) { - stack = stack.slice(0, -1 * len * 2); - vstack = vstack.slice(0, -1 * len); - lstack = lstack.slice(0, -1 * len); - } - stack.push(this.productions_[action[1]][0]); - vstack.push(yyval.$); - lstack.push(yyval._$); - newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; - stack.push(newState); - break; - case 3: - return true; - } - } - return true; - } - }; - var lexer = function() { - var lexer2 = { - EOF: 1, - parseError: function parseError(str, hash) { - if (this.yy.parser) { - this.yy.parser.parseError(str, hash); - } else { - throw new Error(str); - } - }, - // resets the lexer, sets new input - setInput: function(input, yy) { - this.yy = yy || this.yy || {}; - this._input = input; - this._more = this._backtrack = this.done = false; - this.yylineno = this.yyleng = 0; - this.yytext = this.matched = this.match = ""; - this.conditionStack = ["INITIAL"]; - this.yylloc = { - first_line: 1, - first_column: 0, - last_line: 1, - last_column: 0 - }; - if (this.options.ranges) { - this.yylloc.range = [0, 0]; - } - this.offset = 0; - return this; - }, - // consumes and returns one char from the input - input: function() { - var ch = this._input[0]; - this.yytext += ch; - this.yyleng++; - this.offset++; - this.match += ch; - this.matched += ch; - var lines = ch.match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno++; - this.yylloc.last_line++; - } else { - this.yylloc.last_column++; - } - if (this.options.ranges) { - this.yylloc.range[1]++; - } - this._input = this._input.slice(1); - return ch; - }, - // unshifts one char (or a string) into the input - unput: function(ch) { - var len = ch.length; - var lines = ch.split(/(?:\r\n?|\n)/g); - this._input = ch + this._input; - this.yytext = this.yytext.substr(0, this.yytext.length - len); - this.offset -= len; - var oldLines = this.match.split(/(?:\r\n?|\n)/g); - this.match = this.match.substr(0, this.match.length - 1); - this.matched = this.matched.substr(0, this.matched.length - 1); - if (lines.length - 1) { - this.yylineno -= lines.length - 1; - } - var r = this.yylloc.range; - this.yylloc = { - first_line: this.yylloc.first_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.first_column, - last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len - }; - if (this.options.ranges) { - this.yylloc.range = [r[0], r[0] + this.yyleng - len]; - } - this.yyleng = this.yytext.length; - return this; - }, - // When called from action, caches matched text and appends it on next action - more: function() { - this._more = true; - return this; - }, - // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. - reject: function() { - if (this.options.backtrack_lexer) { - this._backtrack = true; - } else { - return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), { - text: "", - token: null, - line: this.yylineno - }); - } - return this; - }, - // retain first n characters of the match - less: function(n) { - this.unput(this.match.slice(n)); - }, - // displays already matched input, i.e. for error messages - pastInput: function() { - var past = this.matched.substr(0, this.matched.length - this.match.length); - return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); - }, - // displays upcoming input, i.e. for error messages - upcomingInput: function() { - var next = this.match; - if (next.length < 20) { - next += this._input.substr(0, 20 - next.length); - } - return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); - }, - // displays the character position where the lexing error occurred, i.e. for error messages - showPosition: function() { - var pre = this.pastInput(); - var c = new Array(pre.length + 1).join("-"); - return pre + this.upcomingInput() + "\n" + c + "^"; - }, - // test the lexed token: return FALSE when not a match, otherwise return token - test_match: function(match, indexed_rule) { - var token, lines, backup; - if (this.options.backtrack_lexer) { - backup = { - yylineno: this.yylineno, - yylloc: { - first_line: this.yylloc.first_line, - last_line: this.last_line, - first_column: this.yylloc.first_column, - last_column: this.yylloc.last_column - }, - yytext: this.yytext, - match: this.match, - matches: this.matches, - matched: this.matched, - yyleng: this.yyleng, - offset: this.offset, - _more: this._more, - _input: this._input, - yy: this.yy, - conditionStack: this.conditionStack.slice(0), - done: this.done - }; - if (this.options.ranges) { - backup.yylloc.range = this.yylloc.range.slice(0); - } - } - lines = match[0].match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno += lines.length; - } - this.yylloc = { - first_line: this.yylloc.last_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.last_column, - last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length - }; - this.yytext += match[0]; - this.match += match[0]; - this.matches = match; - this.yyleng = this.yytext.length; - if (this.options.ranges) { - this.yylloc.range = [this.offset, this.offset += this.yyleng]; - } - this._more = false; - this._backtrack = false; - this._input = this._input.slice(match[0].length); - this.matched += match[0]; - token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); - if (this.done && this._input) { - this.done = false; - } - if (token) { - return token; - } else if (this._backtrack) { - for (var k in backup) { - this[k] = backup[k]; - } - return false; - } - return false; - }, - // return next match in input - next: function() { - if (this.done) { - return this.EOF; - } - if (!this._input) { - this.done = true; - } - var token, match, tempMatch, index; - if (!this._more) { - this.yytext = ""; - this.match = ""; - } - var rules = this._currentRules(); - for (var i = 0; i < rules.length; i++) { - tempMatch = this._input.match(this.rules[rules[i]]); - if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { - match = tempMatch; - index = i; - if (this.options.backtrack_lexer) { - token = this.test_match(tempMatch, rules[i]); - if (token !== false) { - return token; - } else if (this._backtrack) { - match = false; - continue; - } else { - return false; - } - } else if (!this.options.flex) { - break; - } - } - } - if (match) { - token = this.test_match(match, rules[index]); - if (token !== false) { - return token; - } - return false; - } - if (this._input === "") { - return this.EOF; - } else { - return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { - text: "", - token: null, - line: this.yylineno - }); - } - }, - // return next match that has a token - lex: function lex() { - var r = this.next(); - if (r) { - return r; - } else { - return this.lex(); - } - }, - // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) - begin: function begin(condition) { - this.conditionStack.push(condition); - }, - // pop the previously active lexer condition state off the condition stack - popState: function popState() { - var n = this.conditionStack.length - 1; - if (n > 0) { - return this.conditionStack.pop(); - } else { - return this.conditionStack[0]; - } - }, - // produce the lexer rule set which is active for the currently active lexer condition state - _currentRules: function _currentRules() { - if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { - return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; - } else { - return this.conditions["INITIAL"].rules; - } - }, - // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available - topState: function topState(n) { - n = this.conditionStack.length - 1 - Math.abs(n || 0); - if (n >= 0) { - return this.conditionStack[n]; - } else { - return "INITIAL"; - } - }, - // alias for begin(condition) - pushState: function pushState(condition) { - this.begin(condition); - }, - // return the number of states currently on the stack - stateStackSize: function stateStackSize() { - return this.conditionStack.length; - }, - options: {}, - performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { - switch ($avoiding_name_collisions) { - case 0: - return 10; - case 1: - yy.getLogger().debug("Found space-block"); - return 31; - case 2: - yy.getLogger().debug("Found nl-block"); - return 31; - case 3: - yy.getLogger().debug("Found space-block"); - return 29; - case 4: - yy.getLogger().debug(".", yy_.yytext); - break; - case 5: - yy.getLogger().debug("_", yy_.yytext); - break; - case 6: - return 5; - case 7: - yy_.yytext = -1; - return 28; - case 8: - yy_.yytext = yy_.yytext.replace(/columns\s+/, ""); - yy.getLogger().debug("COLUMNS (LEX)", yy_.yytext); - return 28; - case 9: - this.pushState("md_string"); - break; - case 10: - return "MD_STR"; - case 11: - this.popState(); - break; - case 12: - this.pushState("string"); - break; - case 13: - yy.getLogger().debug("LEX: POPPING STR:", yy_.yytext); - this.popState(); - break; - case 14: - yy.getLogger().debug("LEX: STR end:", yy_.yytext); - return "STR"; - case 15: - yy_.yytext = yy_.yytext.replace(/space\:/, ""); - yy.getLogger().debug("SPACE NUM (LEX)", yy_.yytext); - return 21; - case 16: - yy_.yytext = "1"; - yy.getLogger().debug("COLUMNS (LEX)", yy_.yytext); - return 21; - case 17: - return 43; - case 18: - return "LINKSTYLE"; - case 19: - return "INTERPOLATE"; - case 20: - this.pushState("CLASSDEF"); - return 40; - case 21: - this.popState(); - this.pushState("CLASSDEFID"); - return "DEFAULT_CLASSDEF_ID"; - case 22: - this.popState(); - this.pushState("CLASSDEFID"); - return 41; - case 23: - this.popState(); - return 42; - case 24: - this.pushState("CLASS"); - return 44; - case 25: - this.popState(); - this.pushState("CLASS_STYLE"); - return 45; - case 26: - this.popState(); - return 46; - case 27: - this.pushState("STYLE_STMNT"); - return 47; - case 28: - this.popState(); - this.pushState("STYLE_DEFINITION"); - return 48; - case 29: - this.popState(); - return 49; - case 30: - this.pushState("acc_title"); - return "acc_title"; - case 31: - this.popState(); - return "acc_title_value"; - case 32: - this.pushState("acc_descr"); - return "acc_descr"; - case 33: - this.popState(); - return "acc_descr_value"; - case 34: - this.pushState("acc_descr_multiline"); - break; - case 35: - this.popState(); - break; - case 36: - return "acc_descr_multiline_value"; - case 37: - return 30; - case 38: - this.popState(); - yy.getLogger().debug("Lex: (("); - return "NODE_DEND"; - case 39: - this.popState(); - yy.getLogger().debug("Lex: (("); - return "NODE_DEND"; - case 40: - this.popState(); - yy.getLogger().debug("Lex: ))"); - return "NODE_DEND"; - case 41: - this.popState(); - yy.getLogger().debug("Lex: (("); - return "NODE_DEND"; - case 42: - this.popState(); - yy.getLogger().debug("Lex: (("); - return "NODE_DEND"; - case 43: - this.popState(); - yy.getLogger().debug("Lex: (-"); - return "NODE_DEND"; - case 44: - this.popState(); - yy.getLogger().debug("Lex: -)"); - return "NODE_DEND"; - case 45: - this.popState(); - yy.getLogger().debug("Lex: (("); - return "NODE_DEND"; - case 46: - this.popState(); - yy.getLogger().debug("Lex: ]]"); - return "NODE_DEND"; - case 47: - this.popState(); - yy.getLogger().debug("Lex: ("); - return "NODE_DEND"; - case 48: - this.popState(); - yy.getLogger().debug("Lex: ])"); - return "NODE_DEND"; - case 49: - this.popState(); - yy.getLogger().debug("Lex: /]"); - return "NODE_DEND"; - case 50: - this.popState(); - yy.getLogger().debug("Lex: /]"); - return "NODE_DEND"; - case 51: - this.popState(); - yy.getLogger().debug("Lex: )]"); - return "NODE_DEND"; - case 52: - this.popState(); - yy.getLogger().debug("Lex: )"); - return "NODE_DEND"; - case 53: - this.popState(); - yy.getLogger().debug("Lex: ]>"); - return "NODE_DEND"; - case 54: - this.popState(); - yy.getLogger().debug("Lex: ]"); - return "NODE_DEND"; - case 55: - yy.getLogger().debug("Lexa: -)"); - this.pushState("NODE"); - return 36; - case 56: - yy.getLogger().debug("Lexa: (-"); - this.pushState("NODE"); - return 36; - case 57: - yy.getLogger().debug("Lexa: ))"); - this.pushState("NODE"); - return 36; - case 58: - yy.getLogger().debug("Lexa: )"); - this.pushState("NODE"); - return 36; - case 59: - yy.getLogger().debug("Lex: ((("); - this.pushState("NODE"); - return 36; - case 60: - yy.getLogger().debug("Lexa: )"); - this.pushState("NODE"); - return 36; - case 61: - yy.getLogger().debug("Lexa: )"); - this.pushState("NODE"); - return 36; - case 62: - yy.getLogger().debug("Lexa: )"); - this.pushState("NODE"); - return 36; - case 63: - yy.getLogger().debug("Lexc: >"); - this.pushState("NODE"); - return 36; - case 64: - yy.getLogger().debug("Lexa: (["); - this.pushState("NODE"); - return 36; - case 65: - yy.getLogger().debug("Lexa: )"); - this.pushState("NODE"); - return 36; - case 66: - this.pushState("NODE"); - return 36; - case 67: - this.pushState("NODE"); - return 36; - case 68: - this.pushState("NODE"); - return 36; - case 69: - this.pushState("NODE"); - return 36; - case 70: - this.pushState("NODE"); - return 36; - case 71: - this.pushState("NODE"); - return 36; - case 72: - this.pushState("NODE"); - return 36; - case 73: - yy.getLogger().debug("Lexa: ["); - this.pushState("NODE"); - return 36; - case 74: - this.pushState("BLOCK_ARROW"); - yy.getLogger().debug("LEX ARR START"); - return 38; - case 75: - yy.getLogger().debug("Lex: NODE_ID", yy_.yytext); - return 32; - case 76: - yy.getLogger().debug("Lex: EOF", yy_.yytext); - return 8; - case 77: - this.pushState("md_string"); - break; - case 78: - this.pushState("md_string"); - break; - case 79: - return "NODE_DESCR"; - case 80: - this.popState(); - break; - case 81: - yy.getLogger().debug("Lex: Starting string"); - this.pushState("string"); - break; - case 82: - yy.getLogger().debug("LEX ARR: Starting string"); - this.pushState("string"); - break; - case 83: - yy.getLogger().debug("LEX: NODE_DESCR:", yy_.yytext); - return "NODE_DESCR"; - case 84: - yy.getLogger().debug("LEX POPPING"); - this.popState(); - break; - case 85: - yy.getLogger().debug("Lex: =>BAE"); - this.pushState("ARROW_DIR"); - break; - case 86: - yy_.yytext = yy_.yytext.replace(/^,\s*/, ""); - yy.getLogger().debug("Lex (right): dir:", yy_.yytext); - return "DIR"; - case 87: - yy_.yytext = yy_.yytext.replace(/^,\s*/, ""); - yy.getLogger().debug("Lex (left):", yy_.yytext); - return "DIR"; - case 88: - yy_.yytext = yy_.yytext.replace(/^,\s*/, ""); - yy.getLogger().debug("Lex (x):", yy_.yytext); - return "DIR"; - case 89: - yy_.yytext = yy_.yytext.replace(/^,\s*/, ""); - yy.getLogger().debug("Lex (y):", yy_.yytext); - return "DIR"; - case 90: - yy_.yytext = yy_.yytext.replace(/^,\s*/, ""); - yy.getLogger().debug("Lex (up):", yy_.yytext); - return "DIR"; - case 91: - yy_.yytext = yy_.yytext.replace(/^,\s*/, ""); - yy.getLogger().debug("Lex (down):", yy_.yytext); - return "DIR"; - case 92: - yy_.yytext = "]>"; - yy.getLogger().debug("Lex (ARROW_DIR end):", yy_.yytext); - this.popState(); - this.popState(); - return "BLOCK_ARROW_END"; - case 93: - yy.getLogger().debug("Lex: LINK", "#" + yy_.yytext + "#"); - return 15; - case 94: - yy.getLogger().debug("Lex: LINK", yy_.yytext); - return 15; - case 95: - yy.getLogger().debug("Lex: LINK", yy_.yytext); - return 15; - case 96: - yy.getLogger().debug("Lex: LINK", yy_.yytext); - return 15; - case 97: - yy.getLogger().debug("Lex: START_LINK", yy_.yytext); - this.pushState("LLABEL"); - return 16; - case 98: - yy.getLogger().debug("Lex: START_LINK", yy_.yytext); - this.pushState("LLABEL"); - return 16; - case 99: - yy.getLogger().debug("Lex: START_LINK", yy_.yytext); - this.pushState("LLABEL"); - return 16; - case 100: - this.pushState("md_string"); - break; - case 101: - yy.getLogger().debug("Lex: Starting string"); - this.pushState("string"); - return "LINK_LABEL"; - case 102: - this.popState(); - yy.getLogger().debug("Lex: LINK", "#" + yy_.yytext + "#"); - return 15; - case 103: - this.popState(); - yy.getLogger().debug("Lex: LINK", yy_.yytext); - return 15; - case 104: - this.popState(); - yy.getLogger().debug("Lex: LINK", yy_.yytext); - return 15; - case 105: - yy.getLogger().debug("Lex: COLON", yy_.yytext); - yy_.yytext = yy_.yytext.slice(1); - return 27; - } - }, - rules: [/^(?:block-beta\b)/, /^(?:block\s+)/, /^(?:block\n+)/, /^(?:block:)/, /^(?:[\s]+)/, /^(?:[\n]+)/, /^(?:((\u000D\u000A)|(\u000A)))/, /^(?:columns\s+auto\b)/, /^(?:columns\s+[\d]+)/, /^(?:["][`])/, /^(?:[^`"]+)/, /^(?:[`]["])/, /^(?:["])/, /^(?:["])/, /^(?:[^"]*)/, /^(?:space[:]\d+)/, /^(?:space\b)/, /^(?:default\b)/, /^(?:linkStyle\b)/, /^(?:interpolate\b)/, /^(?:classDef\s+)/, /^(?:DEFAULT\s+)/, /^(?:\w+\s+)/, /^(?:[^\n]*)/, /^(?:class\s+)/, /^(?:(\w+)+((,\s*\w+)*))/, /^(?:[^\n]*)/, /^(?:style\s+)/, /^(?:(\w+)+((,\s*\w+)*))/, /^(?:[^\n]*)/, /^(?:accTitle\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*\{\s*)/, /^(?:[\}])/, /^(?:[^\}]*)/, /^(?:end\b\s*)/, /^(?:\(\(\()/, /^(?:\)\)\))/, /^(?:[\)]\))/, /^(?:\}\})/, /^(?:\})/, /^(?:\(-)/, /^(?:-\))/, /^(?:\(\()/, /^(?:\]\])/, /^(?:\()/, /^(?:\]\))/, /^(?:\\\])/, /^(?:\/\])/, /^(?:\)\])/, /^(?:[\)])/, /^(?:\]>)/, /^(?:[\]])/, /^(?:-\))/, /^(?:\(-)/, /^(?:\)\))/, /^(?:\))/, /^(?:\(\(\()/, /^(?:\(\()/, /^(?:\{\{)/, /^(?:\{)/, /^(?:>)/, /^(?:\(\[)/, /^(?:\()/, /^(?:\[\[)/, /^(?:\[\|)/, /^(?:\[\()/, /^(?:\)\)\))/, /^(?:\[\\)/, /^(?:\[\/)/, /^(?:\[\\)/, /^(?:\[)/, /^(?:<\[)/, /^(?:[^\(\[\n\-\)\{\}\s\<\>:]+)/, /^(?:$)/, /^(?:["][`])/, /^(?:["][`])/, /^(?:[^`"]+)/, /^(?:[`]["])/, /^(?:["])/, /^(?:["])/, /^(?:[^"]+)/, /^(?:["])/, /^(?:\]>\s*\()/, /^(?:,?\s*right\s*)/, /^(?:,?\s*left\s*)/, /^(?:,?\s*x\s*)/, /^(?:,?\s*y\s*)/, /^(?:,?\s*up\s*)/, /^(?:,?\s*down\s*)/, /^(?:\)\s*)/, /^(?:\s*[xo<]?--+[-xo>]\s*)/, /^(?:\s*[xo<]?==+[=xo>]\s*)/, /^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/, /^(?:\s*~~[\~]+\s*)/, /^(?:\s*[xo<]?--\s*)/, /^(?:\s*[xo<]?==\s*)/, /^(?:\s*[xo<]?-\.\s*)/, /^(?:["][`])/, /^(?:["])/, /^(?:\s*[xo<]?--+[-xo>]\s*)/, /^(?:\s*[xo<]?==+[=xo>]\s*)/, /^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/, /^(?::\d+)/], - conditions: { "STYLE_DEFINITION": { "rules": [29], "inclusive": false }, "STYLE_STMNT": { "rules": [28], "inclusive": false }, "CLASSDEFID": { "rules": [23], "inclusive": false }, "CLASSDEF": { "rules": [21, 22], "inclusive": false }, "CLASS_STYLE": { "rules": [26], "inclusive": false }, "CLASS": { "rules": [25], "inclusive": false }, "LLABEL": { "rules": [100, 101, 102, 103, 104], "inclusive": false }, "ARROW_DIR": { "rules": [86, 87, 88, 89, 90, 91, 92], "inclusive": false }, "BLOCK_ARROW": { "rules": [77, 82, 85], "inclusive": false }, "NODE": { "rules": [38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 78, 81], "inclusive": false }, "md_string": { "rules": [10, 11, 79, 80], "inclusive": false }, "space": { "rules": [], "inclusive": false }, "string": { "rules": [13, 14, 83, 84], "inclusive": false }, "acc_descr_multiline": { "rules": [35, 36], "inclusive": false }, "acc_descr": { "rules": [33], "inclusive": false }, "acc_title": { "rules": [31], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 15, 16, 17, 18, 19, 20, 24, 27, 30, 32, 34, 37, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 93, 94, 95, 96, 97, 98, 99, 105], "inclusive": true } } - }; - return lexer2; - }(); - parser2.lexer = lexer; - function Parser() { - this.yy = {}; - } - Parser.prototype = parser2; - parser2.Parser = Parser; - return new Parser(); -}(); -parser.parser = parser; -const parser$1 = parser; -let blockDatabase = {}; -let edgeList = []; -let edgeCount = {}; -const COLOR_KEYWORD = "color"; -const FILL_KEYWORD = "fill"; -const BG_FILL = "bgFill"; -const STYLECLASS_SEP = ","; -const config = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__.c)(); -let classes = {}; -const sanitizeText = (txt) => _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__.e.sanitizeText(txt, config); -const addStyleClass = function(id, styleAttributes = "") { - if (classes[id] === void 0) { - classes[id] = { id, styles: [], textStyles: [] }; - } - const foundClass = classes[id]; - if (styleAttributes !== void 0 && styleAttributes !== null) { - styleAttributes.split(STYLECLASS_SEP).forEach((attrib) => { - const fixedAttrib = attrib.replace(/([^;]*);/, "$1").trim(); - if (attrib.match(COLOR_KEYWORD)) { - const newStyle1 = fixedAttrib.replace(FILL_KEYWORD, BG_FILL); - const newStyle2 = newStyle1.replace(COLOR_KEYWORD, FILL_KEYWORD); - foundClass.textStyles.push(newStyle2); - } - foundClass.styles.push(fixedAttrib); - }); - } -}; -const addStyle2Node = function(id, styles = "") { - const foundBlock = blockDatabase[id]; - if (styles !== void 0 && styles !== null) { - foundBlock.styles = styles.split(STYLECLASS_SEP); - } -}; -const setCssClass = function(itemIds, cssClassName) { - itemIds.split(",").forEach(function(id) { - let foundBlock = blockDatabase[id]; - if (foundBlock === void 0) { - const trimmedId = id.trim(); - blockDatabase[trimmedId] = { id: trimmedId, type: "na", children: [] }; - foundBlock = blockDatabase[trimmedId]; - } - if (!foundBlock.classes) { - foundBlock.classes = []; - } - foundBlock.classes.push(cssClassName); - }); -}; -const populateBlockDatabase = (_blockList, parent) => { - const blockList = _blockList.flat(); - const children = []; - for (const block of blockList) { - if (block.label) { - block.label = sanitizeText(block.label); - } - if (block.type === "classDef") { - addStyleClass(block.id, block.css); - continue; - } - if (block.type === "applyClass") { - setCssClass(block.id, (block == null ? void 0 : block.styleClass) || ""); - continue; - } - if (block.type === "applyStyles") { - if (block == null ? void 0 : block.stylesStr) { - addStyle2Node(block.id, block == null ? void 0 : block.stylesStr); - } - continue; - } - if (block.type === "column-setting") { - parent.columns = block.columns || -1; - } else if (block.type === "edge") { - if (edgeCount[block.id]) { - edgeCount[block.id]++; - } else { - edgeCount[block.id] = 1; - } - block.id = edgeCount[block.id] + "-" + block.id; - edgeList.push(block); - } else { - if (!block.label) { - if (block.type === "composite") { - block.label = ""; - } else { - block.label = block.id; - } - } - const newBlock = !blockDatabase[block.id]; - if (newBlock) { - blockDatabase[block.id] = block; - } else { - if (block.type !== "na") { - blockDatabase[block.id].type = block.type; - } - if (block.label !== block.id) { - blockDatabase[block.id].label = block.label; - } - } - if (block.children) { - populateBlockDatabase(block.children, block); - } - if (block.type === "space") { - const w = block.width || 1; - for (let j = 0; j < w; j++) { - const newBlock2 = (0,lodash_es_clone_js__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .A)(block); - newBlock2.id = newBlock2.id + "-" + j; - blockDatabase[newBlock2.id] = newBlock2; - children.push(newBlock2); - } - } else if (newBlock) { - children.push(block); - } - } - } - parent.children = children; -}; -let blocks = []; -let rootBlock = { id: "root", type: "composite", children: [], columns: -1 }; -const clear = () => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__.l.debug("Clear called"); - (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__.v)(); - rootBlock = { id: "root", type: "composite", children: [], columns: -1 }; - blockDatabase = { root: rootBlock }; - blocks = []; - classes = {}; - edgeList = []; - edgeCount = {}; -}; -function typeStr2Type(typeStr) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__.l.debug("typeStr2Type", typeStr); - switch (typeStr) { - case "[]": - return "square"; - case "()": - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__.l.debug("we have a round"); - return "round"; - case "(())": - return "circle"; - case ">]": - return "rect_left_inv_arrow"; - case "{}": - return "diamond"; - case "{{}}": - return "hexagon"; - case "([])": - return "stadium"; - case "[[]]": - return "subroutine"; - case "[()]": - return "cylinder"; - case "((()))": - return "doublecircle"; - case "[//]": - return "lean_right"; - case "[\\\\]": - return "lean_left"; - case "[/\\]": - return "trapezoid"; - case "[\\/]": - return "inv_trapezoid"; - case "<[]>": - return "block_arrow"; - default: - return "na"; - } -} -function edgeTypeStr2Type(typeStr) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__.l.debug("typeStr2Type", typeStr); - switch (typeStr) { - case "==": - return "thick"; - default: - return "normal"; - } -} -function edgeStrToEdgeData(typeStr) { - switch (typeStr.trim()) { - case "--x": - return "arrow_cross"; - case "--o": - return "arrow_circle"; - default: - return "arrow_point"; - } -} -let cnt = 0; -const generateId = () => { - cnt++; - return "id-" + Math.random().toString(36).substr(2, 12) + "-" + cnt; -}; -const setHierarchy = (block) => { - rootBlock.children = block; - populateBlockDatabase(block, rootBlock); - blocks = rootBlock.children; -}; -const getColumns = (blockId) => { - const block = blockDatabase[blockId]; - if (!block) { - return -1; - } - if (block.columns) { - return block.columns; - } - if (!block.children) { - return -1; - } - return block.children.length; -}; -const getBlocksFlat = () => { - return [...Object.values(blockDatabase)]; -}; -const getBlocks = () => { - return blocks || []; -}; -const getEdges = () => { - return edgeList; -}; -const getBlock = (id) => { - return blockDatabase[id]; -}; -const setBlock = (block) => { - blockDatabase[block.id] = block; -}; -const getLogger = () => console; -const getClasses$1 = function() { - return classes; -}; -const db = { - getConfig: () => (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__.F)().block, - typeStr2Type, - edgeTypeStr2Type, - edgeStrToEdgeData, - getLogger, - getBlocksFlat, - getBlocks, - getEdges, - setHierarchy, - getBlock, - setBlock, - getColumns, - getClasses: getClasses$1, - clear, - generateId -}; -const db$1 = db; -const fade = (color, opacity) => { - const channel = khroma__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .A; - const r = channel(color, "r"); - const g = channel(color, "g"); - const b = channel(color, "b"); - return khroma__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .A(r, g, b, opacity); -}; -const getStyles = (options) => `.label { - font-family: ${options.fontFamily}; - color: ${options.nodeTextColor || options.textColor}; - } - .cluster-label text { - fill: ${options.titleColor}; - } - .cluster-label span,p { - color: ${options.titleColor}; - } - - - - .label text,span,p { - fill: ${options.nodeTextColor || options.textColor}; - color: ${options.nodeTextColor || options.textColor}; - } - - .node rect, - .node circle, - .node ellipse, - .node polygon, - .node path { - fill: ${options.mainBkg}; - stroke: ${options.nodeBorder}; - stroke-width: 1px; - } - .flowchart-label text { - text-anchor: middle; - } - // .flowchart-label .text-outer-tspan { - // text-anchor: middle; - // } - // .flowchart-label .text-inner-tspan { - // text-anchor: start; - // } - - .node .label { - text-align: center; - } - .node.clickable { - cursor: pointer; - } - - .arrowheadPath { - fill: ${options.arrowheadColor}; - } - - .edgePath .path { - stroke: ${options.lineColor}; - stroke-width: 2.0px; - } - - .flowchart-link { - stroke: ${options.lineColor}; - fill: none; - } - - .edgeLabel { - background-color: ${options.edgeLabelBackground}; - rect { - opacity: 0.5; - background-color: ${options.edgeLabelBackground}; - fill: ${options.edgeLabelBackground}; - } - text-align: center; - } - - /* For html labels only */ - .labelBkg { - background-color: ${fade(options.edgeLabelBackground, 0.5)}; - // background-color: - } - - .node .cluster { - // fill: ${fade(options.mainBkg, 0.5)}; - fill: ${fade(options.clusterBkg, 0.5)}; - stroke: ${fade(options.clusterBorder, 0.2)}; - box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px; - stroke-width: 1px; - } - - .cluster text { - fill: ${options.titleColor}; - } - - .cluster span,p { - color: ${options.titleColor}; - } - /* .cluster div { - color: ${options.titleColor}; - } */ - - div.mermaidTooltip { - position: absolute; - text-align: center; - max-width: 200px; - padding: 2px; - font-family: ${options.fontFamily}; - font-size: 12px; - background: ${options.tertiaryColor}; - border: 1px solid ${options.border2}; - border-radius: 2px; - pointer-events: none; - z-index: 100; - } - - .flowchartTitleText { - text-anchor: middle; - font-size: 18px; - fill: ${options.textColor}; - } -`; -const flowStyles = getStyles; -function getNodeFromBlock(block, db2, positioned = false) { - var _a2, _b2, _c; - const vertex = block; - let classStr = "default"; - if ((((_a2 = vertex == null ? void 0 : vertex.classes) == null ? void 0 : _a2.length) || 0) > 0) { - classStr = ((vertex == null ? void 0 : vertex.classes) || []).join(" "); - } - classStr = classStr + " flowchart-label"; - let radius = 0; - let shape = ""; - let padding2; - switch (vertex.type) { - case "round": - radius = 5; - shape = "rect"; - break; - case "composite": - radius = 0; - shape = "composite"; - padding2 = 0; - break; - case "square": - shape = "rect"; - break; - case "diamond": - shape = "question"; - break; - case "hexagon": - shape = "hexagon"; - break; - case "block_arrow": - shape = "block_arrow"; - break; - case "odd": - shape = "rect_left_inv_arrow"; - break; - case "lean_right": - shape = "lean_right"; - break; - case "lean_left": - shape = "lean_left"; - break; - case "trapezoid": - shape = "trapezoid"; - break; - case "inv_trapezoid": - shape = "inv_trapezoid"; - break; - case "rect_left_inv_arrow": - shape = "rect_left_inv_arrow"; - break; - case "circle": - shape = "circle"; - break; - case "ellipse": - shape = "ellipse"; - break; - case "stadium": - shape = "stadium"; - break; - case "subroutine": - shape = "subroutine"; - break; - case "cylinder": - shape = "cylinder"; - break; - case "group": - shape = "rect"; - break; - case "doublecircle": - shape = "doublecircle"; - break; - default: - shape = "rect"; - } - const styles = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__.k)((vertex == null ? void 0 : vertex.styles) || []); - const vertexText = vertex.label; - const bounds = vertex.size || { width: 0, height: 0, x: 0, y: 0 }; - const node = { - labelStyle: styles.labelStyle, - shape, - labelText: vertexText, - rx: radius, - ry: radius, - class: classStr, - style: styles.style, - id: vertex.id, - directions: vertex.directions, - width: bounds.width, - height: bounds.height, - x: bounds.x, - y: bounds.y, - positioned, - intersect: void 0, - type: vertex.type, - padding: padding2 ?? (((_c = (_b2 = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__.F)()) == null ? void 0 : _b2.block) == null ? void 0 : _c.padding) || 0) - }; - return node; -} -async function calculateBlockSize(elem, block, db2) { - const node = getNodeFromBlock(block, db2, false); - if (node.type === "group") { - return; - } - const nodeEl = await (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_9__.e)(elem, node); - const boundingBox = nodeEl.node().getBBox(); - const obj = db2.getBlock(node.id); - obj.size = { width: boundingBox.width, height: boundingBox.height, x: 0, y: 0, node: nodeEl }; - db2.setBlock(obj); - nodeEl.remove(); -} -async function insertBlockPositioned(elem, block, db2) { - const node = getNodeFromBlock(block, db2, true); - const obj = db2.getBlock(node.id); - if (obj.type !== "space") { - await (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_9__.e)(elem, node); - block.intersect = node == null ? void 0 : node.intersect; - (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_9__.p)(node); - } -} -async function performOperations(elem, blocks2, db2, operation) { - for (const block of blocks2) { - await operation(elem, block, db2); - if (block.children) { - await performOperations(elem, block.children, db2, operation); - } - } -} -async function calculateBlockSizes(elem, blocks2, db2) { - await performOperations(elem, blocks2, db2, calculateBlockSize); -} -async function insertBlocks(elem, blocks2, db2) { - await performOperations(elem, blocks2, db2, insertBlockPositioned); -} -async function insertEdges(elem, edges, blocks2, db2, id) { - const g = new dagre_d3_es_src_graphlib_index_js__WEBPACK_IMPORTED_MODULE_0__/* .Graph */ .T({ - multigraph: true, - compound: true - }); - g.setGraph({ - rankdir: "TB", - nodesep: 10, - ranksep: 10, - marginx: 8, - marginy: 8 - }); - for (const block of blocks2) { - if (block.size) { - g.setNode(block.id, { - width: block.size.width, - height: block.size.height, - intersect: block.intersect - }); - } - } - for (const edge of edges) { - if (edge.start && edge.end) { - const startBlock = db2.getBlock(edge.start); - const endBlock = db2.getBlock(edge.end); - if ((startBlock == null ? void 0 : startBlock.size) && (endBlock == null ? void 0 : endBlock.size)) { - const start = startBlock.size; - const end = endBlock.size; - const points = [ - { x: start.x, y: start.y }, - { x: start.x + (end.x - start.x) / 2, y: start.y + (end.y - start.y) / 2 }, - { x: end.x, y: end.y } - ]; - await (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_9__.h)( - elem, - { v: edge.start, w: edge.end, name: edge.id }, - { - ...edge, - arrowTypeEnd: edge.arrowTypeEnd, - arrowTypeStart: edge.arrowTypeStart, - points, - classes: "edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1" - }, - void 0, - "block", - g, - id - ); - if (edge.label) { - await (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_9__.f)(elem, { - ...edge, - label: edge.label, - labelStyle: "stroke: #333; stroke-width: 1.5px;fill:none;", - arrowTypeEnd: edge.arrowTypeEnd, - arrowTypeStart: edge.arrowTypeStart, - points, - classes: "edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1" - }); - await (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_9__.j)( - { ...edge, x: points[1].x, y: points[1].y }, - { - originalPath: points - } - ); - } - } - } - } -} -const padding = ((_b = (_a = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__.c)()) == null ? void 0 : _a.block) == null ? void 0 : _b.padding) || 8; -function calculateBlockPosition(columns, position) { - if (columns === 0 || !Number.isInteger(columns)) { - throw new Error("Columns must be an integer !== 0."); - } - if (position < 0 || !Number.isInteger(position)) { - throw new Error("Position must be a non-negative integer." + position); - } - if (columns < 0) { - return { px: position, py: 0 }; - } - if (columns === 1) { - return { px: 0, py: position }; - } - const px = position % columns; - const py = Math.floor(position / columns); - return { px, py }; -} -const getMaxChildSize = (block) => { - let maxWidth = 0; - let maxHeight = 0; - for (const child of block.children) { - const { width, height, x, y } = child.size || { width: 0, height: 0, x: 0, y: 0 }; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__.l.debug( - "getMaxChildSize abc95 child:", - child.id, - "width:", - width, - "height:", - height, - "x:", - x, - "y:", - y, - child.type - ); - if (child.type === "space") { - continue; - } - if (width > maxWidth) { - maxWidth = width / (block.widthInColumns || 1); - } - if (height > maxHeight) { - maxHeight = height; - } - } - return { width: maxWidth, height: maxHeight }; -}; -function setBlockSizes(block, db2, siblingWidth = 0, siblingHeight = 0) { - var _a2, _b2, _c, _d, _e, _f, _g, _h, _i, _j, _k; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__.l.debug( - "setBlockSizes abc95 (start)", - block.id, - (_a2 = block == null ? void 0 : block.size) == null ? void 0 : _a2.x, - "block width =", - block == null ? void 0 : block.size, - "sieblingWidth", - siblingWidth - ); - if (!((_b2 = block == null ? void 0 : block.size) == null ? void 0 : _b2.width)) { - block.size = { - width: siblingWidth, - height: siblingHeight, - x: 0, - y: 0 - }; - } - let maxWidth = 0; - let maxHeight = 0; - if (((_c = block.children) == null ? void 0 : _c.length) > 0) { - for (const child of block.children) { - setBlockSizes(child, db2); - } - const childSize = getMaxChildSize(block); - maxWidth = childSize.width; - maxHeight = childSize.height; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__.l.debug("setBlockSizes abc95 maxWidth of", block.id, ":s children is ", maxWidth, maxHeight); - for (const child of block.children) { - if (child.size) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__.l.debug( - `abc95 Setting size of children of ${block.id} id=${child.id} ${maxWidth} ${maxHeight} ${child.size}` - ); - child.size.width = maxWidth * (child.widthInColumns || 1) + padding * ((child.widthInColumns || 1) - 1); - child.size.height = maxHeight; - child.size.x = 0; - child.size.y = 0; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__.l.debug( - `abc95 updating size of ${block.id} children child:${child.id} maxWidth:${maxWidth} maxHeight:${maxHeight}` - ); - } - } - for (const child of block.children) { - setBlockSizes(child, db2, maxWidth, maxHeight); - } - const columns = block.columns || -1; - let numItems = 0; - for (const child of block.children) { - numItems += child.widthInColumns || 1; - } - let xSize = block.children.length; - if (columns > 0 && columns < numItems) { - xSize = columns; - } - block.widthInColumns || 1; - const ySize = Math.ceil(numItems / xSize); - let width = xSize * (maxWidth + padding) + padding; - let height = ySize * (maxHeight + padding) + padding; - if (width < siblingWidth) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__.l.debug( - `Detected to small siebling: abc95 ${block.id} sieblingWidth ${siblingWidth} sieblingHeight ${siblingHeight} width ${width}` - ); - width = siblingWidth; - height = siblingHeight; - const childWidth = (siblingWidth - xSize * padding - padding) / xSize; - const childHeight = (siblingHeight - ySize * padding - padding) / ySize; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__.l.debug("Size indata abc88", block.id, "childWidth", childWidth, "maxWidth", maxWidth); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__.l.debug("Size indata abc88", block.id, "childHeight", childHeight, "maxHeight", maxHeight); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__.l.debug("Size indata abc88 xSize", xSize, "padding", padding); - for (const child of block.children) { - if (child.size) { - child.size.width = childWidth; - child.size.height = childHeight; - child.size.x = 0; - child.size.y = 0; - } - } - } - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__.l.debug( - `abc95 (finale calc) ${block.id} xSize ${xSize} ySize ${ySize} columns ${columns}${block.children.length} width=${Math.max(width, ((_d = block.size) == null ? void 0 : _d.width) || 0)}` - ); - if (width < (((_e = block == null ? void 0 : block.size) == null ? void 0 : _e.width) || 0)) { - width = ((_f = block == null ? void 0 : block.size) == null ? void 0 : _f.width) || 0; - const num = columns > 0 ? Math.min(block.children.length, columns) : block.children.length; - if (num > 0) { - const childWidth = (width - num * padding - padding) / num; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__.l.debug("abc95 (growing to fit) width", block.id, width, (_g = block.size) == null ? void 0 : _g.width, childWidth); - for (const child of block.children) { - if (child.size) { - child.size.width = childWidth; - } - } - } - } - block.size = { - width, - height, - x: 0, - y: 0 - }; - } - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__.l.debug( - "setBlockSizes abc94 (done)", - block.id, - (_h = block == null ? void 0 : block.size) == null ? void 0 : _h.x, - (_i = block == null ? void 0 : block.size) == null ? void 0 : _i.width, - (_j = block == null ? void 0 : block.size) == null ? void 0 : _j.y, - (_k = block == null ? void 0 : block.size) == null ? void 0 : _k.height - ); -} -function layoutBlocks(block, db2) { - var _a2, _b2, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__.l.debug( - `abc85 layout blocks (=>layoutBlocks) ${block.id} x: ${(_a2 = block == null ? void 0 : block.size) == null ? void 0 : _a2.x} y: ${(_b2 = block == null ? void 0 : block.size) == null ? void 0 : _b2.y} width: ${(_c = block == null ? void 0 : block.size) == null ? void 0 : _c.width}` - ); - const columns = block.columns || -1; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__.l.debug("layoutBlocks columns abc95", block.id, "=>", columns, block); - if (block.children && // find max width of children - block.children.length > 0) { - const width = ((_e = (_d = block == null ? void 0 : block.children[0]) == null ? void 0 : _d.size) == null ? void 0 : _e.width) || 0; - const widthOfChildren = block.children.length * width + (block.children.length - 1) * padding; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__.l.debug("widthOfChildren 88", widthOfChildren, "posX"); - let columnPos = 0; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__.l.debug("abc91 block?.size?.x", block.id, (_f = block == null ? void 0 : block.size) == null ? void 0 : _f.x); - let startingPosX = ((_g = block == null ? void 0 : block.size) == null ? void 0 : _g.x) ? ((_h = block == null ? void 0 : block.size) == null ? void 0 : _h.x) + (-((_i = block == null ? void 0 : block.size) == null ? void 0 : _i.width) / 2 || 0) : -padding; - let rowPos = 0; - for (const child of block.children) { - const parent = block; - if (!child.size) { - continue; - } - const { width: width2, height } = child.size; - const { px, py } = calculateBlockPosition(columns, columnPos); - if (py != rowPos) { - rowPos = py; - startingPosX = ((_j = block == null ? void 0 : block.size) == null ? void 0 : _j.x) ? ((_k = block == null ? void 0 : block.size) == null ? void 0 : _k.x) + (-((_l = block == null ? void 0 : block.size) == null ? void 0 : _l.width) / 2 || 0) : -padding; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__.l.debug("New row in layout for block", block.id, " and child ", child.id, rowPos); - } - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__.l.debug( - `abc89 layout blocks (child) id: ${child.id} Pos: ${columnPos} (px, py) ${px},${py} (${(_m = parent == null ? void 0 : parent.size) == null ? void 0 : _m.x},${(_n = parent == null ? void 0 : parent.size) == null ? void 0 : _n.y}) parent: ${parent.id} width: ${width2}${padding}` - ); - if (parent.size) { - const halfWidth = width2 / 2; - child.size.x = startingPosX + padding + halfWidth; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__.l.debug( - `abc91 layout blocks (calc) px, pyid:${child.id} startingPos=X${startingPosX} new startingPosX${child.size.x} ${halfWidth} padding=${padding} width=${width2} halfWidth=${halfWidth} => x:${child.size.x} y:${child.size.y} ${child.widthInColumns} (width * (child?.w || 1)) / 2 ${width2 * ((child == null ? void 0 : child.widthInColumns) || 1) / 2}` - ); - startingPosX = child.size.x + halfWidth; - child.size.y = parent.size.y - parent.size.height / 2 + py * (height + padding) + height / 2 + padding; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__.l.debug( - `abc88 layout blocks (calc) px, pyid:${child.id}startingPosX${startingPosX}${padding}${halfWidth}=>x:${child.size.x}y:${child.size.y}${child.widthInColumns}(width * (child?.w || 1)) / 2${width2 * ((child == null ? void 0 : child.widthInColumns) || 1) / 2}` - ); - } - if (child.children) { - layoutBlocks(child); - } - columnPos += (child == null ? void 0 : child.widthInColumns) || 1; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__.l.debug("abc88 columnsPos", child, columnPos); - } - } - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__.l.debug( - `layout blocks (<==layoutBlocks) ${block.id} x: ${(_o = block == null ? void 0 : block.size) == null ? void 0 : _o.x} y: ${(_p = block == null ? void 0 : block.size) == null ? void 0 : _p.y} width: ${(_q = block == null ? void 0 : block.size) == null ? void 0 : _q.width}` - ); -} -function findBounds(block, { minX, minY, maxX, maxY } = { minX: 0, minY: 0, maxX: 0, maxY: 0 }) { - if (block.size && block.id !== "root") { - const { x, y, width, height } = block.size; - if (x - width / 2 < minX) { - minX = x - width / 2; - } - if (y - height / 2 < minY) { - minY = y - height / 2; - } - if (x + width / 2 > maxX) { - maxX = x + width / 2; - } - if (y + height / 2 > maxY) { - maxY = y + height / 2; - } - } - if (block.children) { - for (const child of block.children) { - ({ minX, minY, maxX, maxY } = findBounds(child, { minX, minY, maxX, maxY })); - } - } - return { minX, minY, maxX, maxY }; -} -function layout(db2) { - const root = db2.getBlock("root"); - if (!root) { - return; - } - setBlockSizes(root, db2, 0, 0); - layoutBlocks(root); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__.l.debug("getBlocks", JSON.stringify(root, null, 2)); - const { minX, minY, maxX, maxY } = findBounds(root); - const height = maxY - minY; - const width = maxX - minX; - return { x: minX, y: minY, width, height }; -} -const getClasses = function(text, diagObj) { - return diagObj.db.getClasses(); -}; -const draw = async function(text, id, _version, diagObj) { - const { securityLevel, block: conf } = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__.F)(); - const db2 = diagObj.db; - let sandboxElement; - if (securityLevel === "sandbox") { - sandboxElement = (0,d3__WEBPACK_IMPORTED_MODULE_1__/* .select */ .Ltv)("#i" + id); - } - const root = securityLevel === "sandbox" ? (0,d3__WEBPACK_IMPORTED_MODULE_1__/* .select */ .Ltv)(sandboxElement.nodes()[0].contentDocument.body) : (0,d3__WEBPACK_IMPORTED_MODULE_1__/* .select */ .Ltv)("body"); - const svg = securityLevel === "sandbox" ? root.select(`[id="${id}"]`) : (0,d3__WEBPACK_IMPORTED_MODULE_1__/* .select */ .Ltv)(`[id="${id}"]`); - const markers = ["point", "circle", "cross"]; - (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_9__.a)(svg, markers, diagObj.type, id); - const bl = db2.getBlocks(); - const blArr = db2.getBlocksFlat(); - const edges = db2.getEdges(); - const nodes = svg.insert("g").attr("class", "block"); - await calculateBlockSizes(nodes, bl, db2); - const bounds = layout(db2); - await insertBlocks(nodes, bl, db2); - await insertEdges(nodes, edges, blArr, db2, id); - if (bounds) { - const bounds2 = bounds; - const magicFactor = Math.max(1, Math.round(0.125 * (bounds2.width / bounds2.height))); - const height = bounds2.height + magicFactor + 10; - const width = bounds2.width + 10; - const { useMaxWidth } = conf; - (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__.i)(svg, height, width, !!useMaxWidth); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_5__.l.debug("Here Bounds", bounds, bounds2); - svg.attr( - "viewBox", - `${bounds2.x - 5} ${bounds2.y - 5} ${bounds2.width + 10} ${bounds2.height + 10}` - ); - } - (0,d3__WEBPACK_IMPORTED_MODULE_1__/* .scaleOrdinal */ .UMr)(d3__WEBPACK_IMPORTED_MODULE_1__/* .schemeTableau10 */ .zt); -}; -const renderer = { - draw, - getClasses -}; -const diagram = { - parser: parser$1, - db: db$1, - renderer, - styles: flowStyles -}; - - - -/***/ }), - -/***/ 73743: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - a: () => (/* binding */ createText), - c: () => (/* binding */ computeDimensionOfText) -}); - -// NAMESPACE OBJECT: ./node_modules/mermaid/node_modules/micromark/lib/constructs.js -var constructs_namespaceObject = {}; -__webpack_require__.r(constructs_namespaceObject); -__webpack_require__.d(constructs_namespaceObject, { - attentionMarkers: () => (attentionMarkers), - contentInitial: () => (contentInitial), - disable: () => (disable), - document: () => (constructs_document), - flow: () => (constructs_flow), - flowInitial: () => (flowInitial), - insideSpan: () => (insideSpan), - string: () => (constructs_string), - text: () => (constructs_text) -}); - -// EXTERNAL MODULE: ./node_modules/mermaid/dist/mermaid-b5860b54.js + 8 modules -var mermaid_b5860b54 = __webpack_require__(86079); -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/mdast-util-to-string/lib/index.js -/** - * @typedef {import('mdast').Root|import('mdast').Content} Node - * - * @typedef Options - * Configuration (optional). - * @property {boolean | null | undefined} [includeImageAlt=true] - * Whether to use `alt` for `image`s. - * @property {boolean | null | undefined} [includeHtml=true] - * Whether to use `value` of HTML. - */ - -/** @type {Options} */ -const emptyOptions = {} - -/** - * Get the text content of a node or list of nodes. - * - * Prefers the node’s plain-text fields, otherwise serializes its children, - * and if the given value is an array, serialize the nodes in it. - * - * @param {unknown} value - * Thing to serialize, typically `Node`. - * @param {Options | null | undefined} [options] - * Configuration (optional). - * @returns {string} - * Serialized `value`. - */ -function lib_toString(value, options) { - const settings = options || emptyOptions - const includeImageAlt = - typeof settings.includeImageAlt === 'boolean' - ? settings.includeImageAlt - : true - const includeHtml = - typeof settings.includeHtml === 'boolean' ? settings.includeHtml : true - - return one(value, includeImageAlt, includeHtml) -} - -/** - * One node or several nodes. - * - * @param {unknown} value - * Thing to serialize. - * @param {boolean} includeImageAlt - * Include image `alt`s. - * @param {boolean} includeHtml - * Include HTML. - * @returns {string} - * Serialized node. - */ -function one(value, includeImageAlt, includeHtml) { - if (node(value)) { - if ('value' in value) { - return value.type === 'html' && !includeHtml ? '' : value.value - } - - if (includeImageAlt && 'alt' in value && value.alt) { - return value.alt - } - - if ('children' in value) { - return lib_all(value.children, includeImageAlt, includeHtml) - } - } - - if (Array.isArray(value)) { - return lib_all(value, includeImageAlt, includeHtml) - } - - return '' -} - -/** - * Serialize a list of nodes. - * - * @param {Array} values - * Thing to serialize. - * @param {boolean} includeImageAlt - * Include image `alt`s. - * @param {boolean} includeHtml - * Include HTML. - * @returns {string} - * Serialized nodes. - */ -function lib_all(values, includeImageAlt, includeHtml) { - /** @type {Array} */ - const result = [] - let index = -1 - - while (++index < values.length) { - result[index] = one(values[index], includeImageAlt, includeHtml) - } - - return result.join('') -} - -/** - * Check if `value` looks like a node. - * - * @param {unknown} value - * Thing. - * @returns {value is Node} - * Whether `value` is a node. - */ -function node(value) { - return Boolean(value && typeof value === 'object') -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-chunked/index.js -/** - * Like `Array#splice`, but smarter for giant arrays. - * - * `Array#splice` takes all items to be inserted as individual argument which - * causes a stack overflow in V8 when trying to insert 100k items for instance. - * - * Otherwise, this does not return the removed items, and takes `items` as an - * array instead of rest parameters. - * - * @template {unknown} T - * Item type. - * @param {Array} list - * List to operate on. - * @param {number} start - * Index to remove/insert at (can be negative). - * @param {number} remove - * Number of items to remove. - * @param {Array} items - * Items to inject into `list`. - * @returns {void} - * Nothing. - */ -function splice(list, start, remove, items) { - const end = list.length - let chunkStart = 0 - /** @type {Array} */ - let parameters - - // Make start between zero and `end` (included). - if (start < 0) { - start = -start > end ? 0 : end + start - } else { - start = start > end ? end : start - } - remove = remove > 0 ? remove : 0 - - // No need to chunk the items if there’s only a couple (10k) items. - if (items.length < 10000) { - parameters = Array.from(items) - parameters.unshift(start, remove) - // @ts-expect-error Hush, it’s fine. - list.splice(...parameters) - } else { - // Delete `remove` items starting from `start` - if (remove) list.splice(start, remove) - - // Insert the items in chunks to not cause stack overflows. - while (chunkStart < items.length) { - parameters = items.slice(chunkStart, chunkStart + 10000) - parameters.unshift(start, 0) - // @ts-expect-error Hush, it’s fine. - list.splice(...parameters) - chunkStart += 10000 - start += 10000 - } - } -} - -/** - * Append `items` (an array) at the end of `list` (another array). - * When `list` was empty, returns `items` instead. - * - * This prevents a potentially expensive operation when `list` is empty, - * and adds items in batches to prevent V8 from hanging. - * - * @template {unknown} T - * Item type. - * @param {Array} list - * List to operate on. - * @param {Array} items - * Items to add to `list`. - * @returns {Array} - * Either `list` or `items`. - */ -function push(list, items) { - if (list.length > 0) { - splice(list, list.length, 0, items) - return list - } - return items -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-combine-extensions/index.js -/** - * @typedef {import('micromark-util-types').Extension} Extension - * @typedef {import('micromark-util-types').Handles} Handles - * @typedef {import('micromark-util-types').HtmlExtension} HtmlExtension - * @typedef {import('micromark-util-types').NormalizedExtension} NormalizedExtension - */ - - - -const micromark_util_combine_extensions_hasOwnProperty = {}.hasOwnProperty - -/** - * Combine multiple syntax extensions into one. - * - * @param {Array} extensions - * List of syntax extensions. - * @returns {NormalizedExtension} - * A single combined extension. - */ -function combineExtensions(extensions) { - /** @type {NormalizedExtension} */ - const all = {} - let index = -1 - - while (++index < extensions.length) { - syntaxExtension(all, extensions[index]) - } - - return all -} - -/** - * Merge `extension` into `all`. - * - * @param {NormalizedExtension} all - * Extension to merge into. - * @param {Extension} extension - * Extension to merge. - * @returns {void} - */ -function syntaxExtension(all, extension) { - /** @type {keyof Extension} */ - let hook - - for (hook in extension) { - const maybe = micromark_util_combine_extensions_hasOwnProperty.call(all, hook) ? all[hook] : undefined - /** @type {Record} */ - const left = maybe || (all[hook] = {}) - /** @type {Record | undefined} */ - const right = extension[hook] - /** @type {string} */ - let code - - if (right) { - for (code in right) { - if (!micromark_util_combine_extensions_hasOwnProperty.call(left, code)) left[code] = [] - const value = right[code] - constructs( - // @ts-expect-error Looks like a list. - left[code], - Array.isArray(value) ? value : value ? [value] : [] - ) - } - } - } -} - -/** - * Merge `list` into `existing` (both lists of constructs). - * Mutates `existing`. - * - * @param {Array} existing - * @param {Array} list - * @returns {void} - */ -function constructs(existing, list) { - let index = -1 - /** @type {Array} */ - const before = [] - - while (++index < list.length) { - // @ts-expect-error Looks like an object. - ;(list[index].add === 'after' ? existing : before).push(list[index]) - } - - splice(existing, 0, 0, before) -} - -/** - * Combine multiple HTML extensions into one. - * - * @param {Array} htmlExtensions - * List of HTML extensions. - * @returns {HtmlExtension} - * A single combined HTML extension. - */ -function combineHtmlExtensions(htmlExtensions) { - /** @type {HtmlExtension} */ - const handlers = {} - let index = -1 - - while (++index < htmlExtensions.length) { - htmlExtension(handlers, htmlExtensions[index]) - } - - return handlers -} - -/** - * Merge `extension` into `all`. - * - * @param {HtmlExtension} all - * Extension to merge into. - * @param {HtmlExtension} extension - * Extension to merge. - * @returns {void} - */ -function htmlExtension(all, extension) { - /** @type {keyof HtmlExtension} */ - let hook - - for (hook in extension) { - const maybe = micromark_util_combine_extensions_hasOwnProperty.call(all, hook) ? all[hook] : undefined - const left = maybe || (all[hook] = {}) - const right = extension[hook] - /** @type {keyof Handles} */ - let type - - if (right) { - for (type in right) { - // @ts-expect-error assume document vs regular handler are managed correctly. - left[type] = right[type] - } - } - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-character/lib/unicode-punctuation-regex.js -// This module is generated by `script/`. -// -// CommonMark handles attention (emphasis, strong) markers based on what comes -// before or after them. -// One such difference is if those characters are Unicode punctuation. -// This script is generated from the Unicode data. - -/** - * Regular expression that matches a unicode punctuation character. - */ -const unicodePunctuationRegex = - /[!-\/:-@\[-`\{-~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/ - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-character/index.js -/** - * @typedef {import('micromark-util-types').Code} Code - */ - - - -/** - * Check whether the character code represents an ASCII alpha (`a` through `z`, - * case insensitive). - * - * An **ASCII alpha** is an ASCII upper alpha or ASCII lower alpha. - * - * An **ASCII upper alpha** is a character in the inclusive range U+0041 (`A`) - * to U+005A (`Z`). - * - * An **ASCII lower alpha** is a character in the inclusive range U+0061 (`a`) - * to U+007A (`z`). - * - * @param code - * Code. - * @returns - * Whether it matches. - */ -const asciiAlpha = regexCheck(/[A-Za-z]/) - -/** - * Check whether the character code represents an ASCII alphanumeric (`a` - * through `z`, case insensitive, or `0` through `9`). - * - * An **ASCII alphanumeric** is an ASCII digit (see `asciiDigit`) or ASCII alpha - * (see `asciiAlpha`). - * - * @param code - * Code. - * @returns - * Whether it matches. - */ -const asciiAlphanumeric = regexCheck(/[\dA-Za-z]/) - -/** - * Check whether the character code represents an ASCII atext. - * - * atext is an ASCII alphanumeric (see `asciiAlphanumeric`), or a character in - * the inclusive ranges U+0023 NUMBER SIGN (`#`) to U+0027 APOSTROPHE (`'`), - * U+002A ASTERISK (`*`), U+002B PLUS SIGN (`+`), U+002D DASH (`-`), U+002F - * SLASH (`/`), U+003D EQUALS TO (`=`), U+003F QUESTION MARK (`?`), U+005E - * CARET (`^`) to U+0060 GRAVE ACCENT (`` ` ``), or U+007B LEFT CURLY BRACE - * (`{`) to U+007E TILDE (`~`). - * - * See: - * **\[RFC5322]**: - * [Internet Message Format](https://tools.ietf.org/html/rfc5322). - * P. Resnick. - * IETF. - * - * @param code - * Code. - * @returns - * Whether it matches. - */ -const asciiAtext = regexCheck(/[#-'*+\--9=?A-Z^-~]/) - -/** - * Check whether a character code is an ASCII control character. - * - * An **ASCII control** is a character in the inclusive range U+0000 NULL (NUL) - * to U+001F (US), or U+007F (DEL). - * - * @param {Code} code - * Code. - * @returns {boolean} - * Whether it matches. - */ -function asciiControl(code) { - return ( - // Special whitespace codes (which have negative values), C0 and Control - // character DEL - code !== null && (code < 32 || code === 127) - ) -} - -/** - * Check whether the character code represents an ASCII digit (`0` through `9`). - * - * An **ASCII digit** is a character in the inclusive range U+0030 (`0`) to - * U+0039 (`9`). - * - * @param code - * Code. - * @returns - * Whether it matches. - */ -const asciiDigit = regexCheck(/\d/) - -/** - * Check whether the character code represents an ASCII hex digit (`a` through - * `f`, case insensitive, or `0` through `9`). - * - * An **ASCII hex digit** is an ASCII digit (see `asciiDigit`), ASCII upper hex - * digit, or an ASCII lower hex digit. - * - * An **ASCII upper hex digit** is a character in the inclusive range U+0041 - * (`A`) to U+0046 (`F`). - * - * An **ASCII lower hex digit** is a character in the inclusive range U+0061 - * (`a`) to U+0066 (`f`). - * - * @param code - * Code. - * @returns - * Whether it matches. - */ -const asciiHexDigit = regexCheck(/[\dA-Fa-f]/) - -/** - * Check whether the character code represents ASCII punctuation. - * - * An **ASCII punctuation** is a character in the inclusive ranges U+0021 - * EXCLAMATION MARK (`!`) to U+002F SLASH (`/`), U+003A COLON (`:`) to U+0040 AT - * SIGN (`@`), U+005B LEFT SQUARE BRACKET (`[`) to U+0060 GRAVE ACCENT - * (`` ` ``), or U+007B LEFT CURLY BRACE (`{`) to U+007E TILDE (`~`). - * - * @param code - * Code. - * @returns - * Whether it matches. - */ -const asciiPunctuation = regexCheck(/[!-/:-@[-`{-~]/) - -/** - * Check whether a character code is a markdown line ending. - * - * A **markdown line ending** is the virtual characters M-0003 CARRIAGE RETURN - * LINE FEED (CRLF), M-0004 LINE FEED (LF) and M-0005 CARRIAGE RETURN (CR). - * - * In micromark, the actual character U+000A LINE FEED (LF) and U+000D CARRIAGE - * RETURN (CR) are replaced by these virtual characters depending on whether - * they occurred together. - * - * @param {Code} code - * Code. - * @returns {boolean} - * Whether it matches. - */ -function markdownLineEnding(code) { - return code !== null && code < -2 -} - -/** - * Check whether a character code is a markdown line ending (see - * `markdownLineEnding`) or markdown space (see `markdownSpace`). - * - * @param {Code} code - * Code. - * @returns {boolean} - * Whether it matches. - */ -function markdownLineEndingOrSpace(code) { - return code !== null && (code < 0 || code === 32) -} - -/** - * Check whether a character code is a markdown space. - * - * A **markdown space** is the concrete character U+0020 SPACE (SP) and the - * virtual characters M-0001 VIRTUAL SPACE (VS) and M-0002 HORIZONTAL TAB (HT). - * - * In micromark, the actual character U+0009 CHARACTER TABULATION (HT) is - * replaced by one M-0002 HORIZONTAL TAB (HT) and between 0 and 3 M-0001 VIRTUAL - * SPACE (VS) characters, depending on the column at which the tab occurred. - * - * @param {Code} code - * Code. - * @returns {boolean} - * Whether it matches. - */ -function markdownSpace(code) { - return code === -2 || code === -1 || code === 32 -} - -// Size note: removing ASCII from the regex and using `asciiPunctuation` here -// In fact adds to the bundle size. -/** - * Check whether the character code represents Unicode punctuation. - * - * A **Unicode punctuation** is a character in the Unicode `Pc` (Punctuation, - * Connector), `Pd` (Punctuation, Dash), `Pe` (Punctuation, Close), `Pf` - * (Punctuation, Final quote), `Pi` (Punctuation, Initial quote), `Po` - * (Punctuation, Other), or `Ps` (Punctuation, Open) categories, or an ASCII - * punctuation (see `asciiPunctuation`). - * - * See: - * **\[UNICODE]**: - * [The Unicode Standard](https://www.unicode.org/versions/). - * Unicode Consortium. - * - * @param code - * Code. - * @returns - * Whether it matches. - */ -const unicodePunctuation = regexCheck(unicodePunctuationRegex) - -/** - * Check whether the character code represents Unicode whitespace. - * - * Note that this does handle micromark specific markdown whitespace characters. - * See `markdownLineEndingOrSpace` to check that. - * - * A **Unicode whitespace** is a character in the Unicode `Zs` (Separator, - * Space) category, or U+0009 CHARACTER TABULATION (HT), U+000A LINE FEED (LF), - * U+000C (FF), or U+000D CARRIAGE RETURN (CR) (**\[UNICODE]**). - * - * See: - * **\[UNICODE]**: - * [The Unicode Standard](https://www.unicode.org/versions/). - * Unicode Consortium. - * - * @param code - * Code. - * @returns - * Whether it matches. - */ -const unicodeWhitespace = regexCheck(/\s/) - -/** - * Create a code check from a regex. - * - * @param {RegExp} regex - * @returns {(code: Code) => boolean} - */ -function regexCheck(regex) { - return check - - /** - * Check whether a code matches the bound regex. - * - * @param {Code} code - * Character code. - * @returns {boolean} - * Whether the character code matches the bound regex. - */ - function check(code) { - return code !== null && regex.test(String.fromCharCode(code)) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-space/index.js -/** - * @typedef {import('micromark-util-types').Effects} Effects - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenType} TokenType - */ - - - -// To do: implement `spaceOrTab`, `spaceOrTabMinMax`, `spaceOrTabWithOptions`. - -/** - * Parse spaces and tabs. - * - * There is no `nok` parameter: - * - * * spaces in markdown are often optional, in which case this factory can be - * used and `ok` will be switched to whether spaces were found or not - * * one line ending or space can be detected with `markdownSpace(code)` right - * before using `factorySpace` - * - * ###### Examples - * - * Where `␉` represents a tab (plus how much it expands) and `␠` represents a - * single space. - * - * ```markdown - * ␉ - * ␠␠␠␠ - * ␉␠ - * ``` - * - * @param {Effects} effects - * Context. - * @param {State} ok - * State switched to when successful. - * @param {TokenType} type - * Type (`' \t'`). - * @param {number | undefined} [max=Infinity] - * Max (exclusive). - * @returns - * Start state. - */ -function factorySpace(effects, ok, type, max) { - const limit = max ? max - 1 : Number.POSITIVE_INFINITY - let size = 0 - return start - - /** @type {State} */ - function start(code) { - if (markdownSpace(code)) { - effects.enter(type) - return prefix(code) - } - return ok(code) - } - - /** @type {State} */ - function prefix(code) { - if (markdownSpace(code) && size++ < limit) { - effects.consume(code) - return prefix - } - effects.exit(type) - return ok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/initialize/content.js -/** - * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct - * @typedef {import('micromark-util-types').Initializer} Initializer - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').Token} Token - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - */ - - - -/** @type {InitialConstruct} */ -const content = { - tokenize: initializeContent -} - -/** - * @this {TokenizeContext} - * @type {Initializer} - */ -function initializeContent(effects) { - const contentStart = effects.attempt( - this.parser.constructs.contentInitial, - afterContentStartConstruct, - paragraphInitial - ) - /** @type {Token} */ - let previous - return contentStart - - /** @type {State} */ - function afterContentStartConstruct(code) { - if (code === null) { - effects.consume(code) - return - } - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return factorySpace(effects, contentStart, 'linePrefix') - } - - /** @type {State} */ - function paragraphInitial(code) { - effects.enter('paragraph') - return lineStart(code) - } - - /** @type {State} */ - function lineStart(code) { - const token = effects.enter('chunkText', { - contentType: 'text', - previous - }) - if (previous) { - previous.next = token - } - previous = token - return data(code) - } - - /** @type {State} */ - function data(code) { - if (code === null) { - effects.exit('chunkText') - effects.exit('paragraph') - effects.consume(code) - return - } - if (markdownLineEnding(code)) { - effects.consume(code) - effects.exit('chunkText') - return lineStart - } - - // Data. - effects.consume(code) - return data - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/initialize/document.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').ContainerState} ContainerState - * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct - * @typedef {import('micromark-util-types').Initializer} Initializer - * @typedef {import('micromark-util-types').Point} Point - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').Token} Token - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - -/** - * @typedef {[Construct, ContainerState]} StackItem - */ - - - - -/** @type {InitialConstruct} */ -const document_document = { - tokenize: initializeDocument -} - -/** @type {Construct} */ -const containerConstruct = { - tokenize: tokenizeContainer -} - -/** - * @this {TokenizeContext} - * @type {Initializer} - */ -function initializeDocument(effects) { - const self = this - /** @type {Array} */ - const stack = [] - let continued = 0 - /** @type {TokenizeContext | undefined} */ - let childFlow - /** @type {Token | undefined} */ - let childToken - /** @type {number} */ - let lineStartOffset - return start - - /** @type {State} */ - function start(code) { - // First we iterate through the open blocks, starting with the root - // document, and descending through last children down to the last open - // block. - // Each block imposes a condition that the line must satisfy if the block is - // to remain open. - // For example, a block quote requires a `>` character. - // A paragraph requires a non-blank line. - // In this phase we may match all or just some of the open blocks. - // But we cannot close unmatched blocks yet, because we may have a lazy - // continuation line. - if (continued < stack.length) { - const item = stack[continued] - self.containerState = item[1] - return effects.attempt( - item[0].continuation, - documentContinue, - checkNewContainers - )(code) - } - - // Done. - return checkNewContainers(code) - } - - /** @type {State} */ - function documentContinue(code) { - continued++ - - // Note: this field is called `_closeFlow` but it also closes containers. - // Perhaps a good idea to rename it but it’s already used in the wild by - // extensions. - if (self.containerState._closeFlow) { - self.containerState._closeFlow = undefined - if (childFlow) { - closeFlow() - } - - // Note: this algorithm for moving events around is similar to the - // algorithm when dealing with lazy lines in `writeToChild`. - const indexBeforeExits = self.events.length - let indexBeforeFlow = indexBeforeExits - /** @type {Point | undefined} */ - let point - - // Find the flow chunk. - while (indexBeforeFlow--) { - if ( - self.events[indexBeforeFlow][0] === 'exit' && - self.events[indexBeforeFlow][1].type === 'chunkFlow' - ) { - point = self.events[indexBeforeFlow][1].end - break - } - } - exitContainers(continued) - - // Fix positions. - let index = indexBeforeExits - while (index < self.events.length) { - self.events[index][1].end = Object.assign({}, point) - index++ - } - - // Inject the exits earlier (they’re still also at the end). - splice( - self.events, - indexBeforeFlow + 1, - 0, - self.events.slice(indexBeforeExits) - ) - - // Discard the duplicate exits. - self.events.length = index - return checkNewContainers(code) - } - return start(code) - } - - /** @type {State} */ - function checkNewContainers(code) { - // Next, after consuming the continuation markers for existing blocks, we - // look for new block starts (e.g. `>` for a block quote). - // If we encounter a new block start, we close any blocks unmatched in - // step 1 before creating the new block as a child of the last matched - // block. - if (continued === stack.length) { - // No need to `check` whether there’s a container, of `exitContainers` - // would be moot. - // We can instead immediately `attempt` to parse one. - if (!childFlow) { - return documentContinued(code) - } - - // If we have concrete content, such as block HTML or fenced code, - // we can’t have containers “pierce” into them, so we can immediately - // start. - if (childFlow.currentConstruct && childFlow.currentConstruct.concrete) { - return flowStart(code) - } - - // If we do have flow, it could still be a blank line, - // but we’d be interrupting it w/ a new container if there’s a current - // construct. - // To do: next major: remove `_gfmTableDynamicInterruptHack` (no longer - // needed in micromark-extension-gfm-table@1.0.6). - self.interrupt = Boolean( - childFlow.currentConstruct && !childFlow._gfmTableDynamicInterruptHack - ) - } - - // Check if there is a new container. - self.containerState = {} - return effects.check( - containerConstruct, - thereIsANewContainer, - thereIsNoNewContainer - )(code) - } - - /** @type {State} */ - function thereIsANewContainer(code) { - if (childFlow) closeFlow() - exitContainers(continued) - return documentContinued(code) - } - - /** @type {State} */ - function thereIsNoNewContainer(code) { - self.parser.lazy[self.now().line] = continued !== stack.length - lineStartOffset = self.now().offset - return flowStart(code) - } - - /** @type {State} */ - function documentContinued(code) { - // Try new containers. - self.containerState = {} - return effects.attempt( - containerConstruct, - containerContinue, - flowStart - )(code) - } - - /** @type {State} */ - function containerContinue(code) { - continued++ - stack.push([self.currentConstruct, self.containerState]) - // Try another. - return documentContinued(code) - } - - /** @type {State} */ - function flowStart(code) { - if (code === null) { - if (childFlow) closeFlow() - exitContainers(0) - effects.consume(code) - return - } - childFlow = childFlow || self.parser.flow(self.now()) - effects.enter('chunkFlow', { - contentType: 'flow', - previous: childToken, - _tokenizer: childFlow - }) - return flowContinue(code) - } - - /** @type {State} */ - function flowContinue(code) { - if (code === null) { - writeToChild(effects.exit('chunkFlow'), true) - exitContainers(0) - effects.consume(code) - return - } - if (markdownLineEnding(code)) { - effects.consume(code) - writeToChild(effects.exit('chunkFlow')) - // Get ready for the next line. - continued = 0 - self.interrupt = undefined - return start - } - effects.consume(code) - return flowContinue - } - - /** - * @param {Token} token - * @param {boolean | undefined} [eof] - * @returns {void} - */ - function writeToChild(token, eof) { - const stream = self.sliceStream(token) - if (eof) stream.push(null) - token.previous = childToken - if (childToken) childToken.next = token - childToken = token - childFlow.defineSkip(token.start) - childFlow.write(stream) - - // Alright, so we just added a lazy line: - // - // ```markdown - // > a - // b. - // - // Or: - // - // > ~~~c - // d - // - // Or: - // - // > | e | - // f - // ``` - // - // The construct in the second example (fenced code) does not accept lazy - // lines, so it marked itself as done at the end of its first line, and - // then the content construct parses `d`. - // Most constructs in markdown match on the first line: if the first line - // forms a construct, a non-lazy line can’t “unmake” it. - // - // The construct in the third example is potentially a GFM table, and - // those are *weird*. - // It *could* be a table, from the first line, if the following line - // matches a condition. - // In this case, that second line is lazy, which “unmakes” the first line - // and turns the whole into one content block. - // - // We’ve now parsed the non-lazy and the lazy line, and can figure out - // whether the lazy line started a new flow block. - // If it did, we exit the current containers between the two flow blocks. - if (self.parser.lazy[token.start.line]) { - let index = childFlow.events.length - while (index--) { - if ( - // The token starts before the line ending… - childFlow.events[index][1].start.offset < lineStartOffset && - // …and either is not ended yet… - (!childFlow.events[index][1].end || - // …or ends after it. - childFlow.events[index][1].end.offset > lineStartOffset) - ) { - // Exit: there’s still something open, which means it’s a lazy line - // part of something. - return - } - } - - // Note: this algorithm for moving events around is similar to the - // algorithm when closing flow in `documentContinue`. - const indexBeforeExits = self.events.length - let indexBeforeFlow = indexBeforeExits - /** @type {boolean | undefined} */ - let seen - /** @type {Point | undefined} */ - let point - - // Find the previous chunk (the one before the lazy line). - while (indexBeforeFlow--) { - if ( - self.events[indexBeforeFlow][0] === 'exit' && - self.events[indexBeforeFlow][1].type === 'chunkFlow' - ) { - if (seen) { - point = self.events[indexBeforeFlow][1].end - break - } - seen = true - } - } - exitContainers(continued) - - // Fix positions. - index = indexBeforeExits - while (index < self.events.length) { - self.events[index][1].end = Object.assign({}, point) - index++ - } - - // Inject the exits earlier (they’re still also at the end). - splice( - self.events, - indexBeforeFlow + 1, - 0, - self.events.slice(indexBeforeExits) - ) - - // Discard the duplicate exits. - self.events.length = index - } - } - - /** - * @param {number} size - * @returns {void} - */ - function exitContainers(size) { - let index = stack.length - - // Exit open containers. - while (index-- > size) { - const entry = stack[index] - self.containerState = entry[1] - entry[0].exit.call(self, effects) - } - stack.length = size - } - function closeFlow() { - childFlow.write([null]) - childToken = undefined - childFlow = undefined - self.containerState._closeFlow = undefined - } -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeContainer(effects, ok, nok) { - // Always populated by defaults. - - return factorySpace( - effects, - effects.attempt(this.parser.constructs.document, ok, nok), - 'linePrefix', - this.parser.constructs.disable.null.includes('codeIndented') ? undefined : 4 - ) -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/blank-line.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const blankLine = { - tokenize: tokenizeBlankLine, - partial: true -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeBlankLine(effects, ok, nok) { - return start - - /** - * Start of blank line. - * - * > 👉 **Note**: `␠` represents a space character. - * - * ```markdown - * > | ␠␠␊ - * ^ - * > | ␊ - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - return markdownSpace(code) - ? factorySpace(effects, after, 'linePrefix')(code) - : after(code) - } - - /** - * At eof/eol, after optional whitespace. - * - * > 👉 **Note**: `␠` represents a space character. - * - * ```markdown - * > | ␠␠␊ - * ^ - * > | ␊ - * ^ - * ``` - * - * @type {State} - */ - function after(code) { - return code === null || markdownLineEnding(code) ? ok(code) : nok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/micromark-util-subtokenize/node_modules/micromark-util-chunked/index.js -/** - * Like `Array#splice`, but smarter for giant arrays. - * - * `Array#splice` takes all items to be inserted as individual argument which - * causes a stack overflow in V8 when trying to insert 100k items for instance. - * - * Otherwise, this does not return the removed items, and takes `items` as an - * array instead of rest parameters. - * - * @template {unknown} T - * Item type. - * @param {Array} list - * List to operate on. - * @param {number} start - * Index to remove/insert at (can be negative). - * @param {number} remove - * Number of items to remove. - * @param {Array} items - * Items to inject into `list`. - * @returns {void} - * Nothing. - */ -function micromark_util_chunked_splice(list, start, remove, items) { - const end = list.length - let chunkStart = 0 - /** @type {Array} */ - let parameters - - // Make start between zero and `end` (included). - if (start < 0) { - start = -start > end ? 0 : end + start - } else { - start = start > end ? end : start - } - remove = remove > 0 ? remove : 0 - - // No need to chunk the items if there’s only a couple (10k) items. - if (items.length < 10000) { - parameters = Array.from(items) - parameters.unshift(start, remove) - // @ts-expect-error Hush, it’s fine. - list.splice(...parameters) - } else { - // Delete `remove` items starting from `start` - if (remove) list.splice(start, remove) - - // Insert the items in chunks to not cause stack overflows. - while (chunkStart < items.length) { - parameters = items.slice(chunkStart, chunkStart + 10000) - parameters.unshift(start, 0) - // @ts-expect-error Hush, it’s fine. - list.splice(...parameters) - chunkStart += 10000 - start += 10000 - } - } -} - -/** - * Append `items` (an array) at the end of `list` (another array). - * When `list` was empty, returns `items` instead. - * - * This prevents a potentially expensive operation when `list` is empty, - * and adds items in batches to prevent V8 from hanging. - * - * @template {unknown} T - * Item type. - * @param {Array} list - * List to operate on. - * @param {Array} items - * Items to add to `list`. - * @returns {Array} - * Either `list` or `items`. - */ -function micromark_util_chunked_push(list, items) { - if (list.length > 0) { - micromark_util_chunked_splice(list, list.length, 0, items) - return list - } - return items -} - -;// CONCATENATED MODULE: ./node_modules/micromark-util-subtokenize/index.js -/** - * @typedef {import('micromark-util-types').Chunk} Chunk - * @typedef {import('micromark-util-types').Event} Event - * @typedef {import('micromark-util-types').Token} Token - */ - - -/** - * Tokenize subcontent. - * - * @param {Array} events - * List of events. - * @returns {boolean} - * Whether subtokens were found. - */ -function subtokenize(events) { - /** @type {Record} */ - const jumps = {} - let index = -1 - /** @type {Event} */ - let event - /** @type {number | undefined} */ - let lineIndex - /** @type {number} */ - let otherIndex - /** @type {Event} */ - let otherEvent - /** @type {Array} */ - let parameters - /** @type {Array} */ - let subevents - /** @type {boolean | undefined} */ - let more - while (++index < events.length) { - while (index in jumps) { - index = jumps[index] - } - event = events[index] - - // Add a hook for the GFM tasklist extension, which needs to know if text - // is in the first content of a list item. - if ( - index && - event[1].type === 'chunkFlow' && - events[index - 1][1].type === 'listItemPrefix' - ) { - subevents = event[1]._tokenizer.events - otherIndex = 0 - if ( - otherIndex < subevents.length && - subevents[otherIndex][1].type === 'lineEndingBlank' - ) { - otherIndex += 2 - } - if ( - otherIndex < subevents.length && - subevents[otherIndex][1].type === 'content' - ) { - while (++otherIndex < subevents.length) { - if (subevents[otherIndex][1].type === 'content') { - break - } - if (subevents[otherIndex][1].type === 'chunkText') { - subevents[otherIndex][1]._isInFirstContentOfListItem = true - otherIndex++ - } - } - } - } - - // Enter. - if (event[0] === 'enter') { - if (event[1].contentType) { - Object.assign(jumps, subcontent(events, index)) - index = jumps[index] - more = true - } - } - // Exit. - else if (event[1]._container) { - otherIndex = index - lineIndex = undefined - while (otherIndex--) { - otherEvent = events[otherIndex] - if ( - otherEvent[1].type === 'lineEnding' || - otherEvent[1].type === 'lineEndingBlank' - ) { - if (otherEvent[0] === 'enter') { - if (lineIndex) { - events[lineIndex][1].type = 'lineEndingBlank' - } - otherEvent[1].type = 'lineEnding' - lineIndex = otherIndex - } - } else { - break - } - } - if (lineIndex) { - // Fix position. - event[1].end = Object.assign({}, events[lineIndex][1].start) - - // Switch container exit w/ line endings. - parameters = events.slice(lineIndex, index) - parameters.unshift(event) - micromark_util_chunked_splice(events, lineIndex, index - lineIndex + 1, parameters) - } - } - } - return !more -} - -/** - * Tokenize embedded tokens. - * - * @param {Array} events - * @param {number} eventIndex - * @returns {Record} - */ -function subcontent(events, eventIndex) { - const token = events[eventIndex][1] - const context = events[eventIndex][2] - let startPosition = eventIndex - 1 - /** @type {Array} */ - const startPositions = [] - const tokenizer = - token._tokenizer || context.parser[token.contentType](token.start) - const childEvents = tokenizer.events - /** @type {Array<[number, number]>} */ - const jumps = [] - /** @type {Record} */ - const gaps = {} - /** @type {Array} */ - let stream - /** @type {Token | undefined} */ - let previous - let index = -1 - /** @type {Token | undefined} */ - let current = token - let adjust = 0 - let start = 0 - const breaks = [start] - - // Loop forward through the linked tokens to pass them in order to the - // subtokenizer. - while (current) { - // Find the position of the event for this token. - while (events[++startPosition][1] !== current) { - // Empty. - } - startPositions.push(startPosition) - if (!current._tokenizer) { - stream = context.sliceStream(current) - if (!current.next) { - stream.push(null) - } - if (previous) { - tokenizer.defineSkip(current.start) - } - if (current._isInFirstContentOfListItem) { - tokenizer._gfmTasklistFirstContentOfListItem = true - } - tokenizer.write(stream) - if (current._isInFirstContentOfListItem) { - tokenizer._gfmTasklistFirstContentOfListItem = undefined - } - } - - // Unravel the next token. - previous = current - current = current.next - } - - // Now, loop back through all events (and linked tokens), to figure out which - // parts belong where. - current = token - while (++index < childEvents.length) { - if ( - // Find a void token that includes a break. - childEvents[index][0] === 'exit' && - childEvents[index - 1][0] === 'enter' && - childEvents[index][1].type === childEvents[index - 1][1].type && - childEvents[index][1].start.line !== childEvents[index][1].end.line - ) { - start = index + 1 - breaks.push(start) - // Help GC. - current._tokenizer = undefined - current.previous = undefined - current = current.next - } - } - - // Help GC. - tokenizer.events = [] - - // If there’s one more token (which is the cases for lines that end in an - // EOF), that’s perfect: the last point we found starts it. - // If there isn’t then make sure any remaining content is added to it. - if (current) { - // Help GC. - current._tokenizer = undefined - current.previous = undefined - } else { - breaks.pop() - } - - // Now splice the events from the subtokenizer into the current events, - // moving back to front so that splice indices aren’t affected. - index = breaks.length - while (index--) { - const slice = childEvents.slice(breaks[index], breaks[index + 1]) - const start = startPositions.pop() - jumps.unshift([start, start + slice.length - 1]) - micromark_util_chunked_splice(events, start, 2, slice) - } - index = -1 - while (++index < jumps.length) { - gaps[adjust + jumps[index][0]] = adjust + jumps[index][1] - adjust += jumps[index][1] - jumps[index][0] - 1 - } - return gaps -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/content.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').Resolver} Resolver - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').Token} Token - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - - -/** - * No name because it must not be turned off. - * @type {Construct} - */ -const content_content = { - tokenize: tokenizeContent, - resolve: resolveContent -} - -/** @type {Construct} */ -const continuationConstruct = { - tokenize: tokenizeContinuation, - partial: true -} - -/** - * Content is transparent: it’s parsed right now. That way, definitions are also - * parsed right now: before text in paragraphs (specifically, media) are parsed. - * - * @type {Resolver} - */ -function resolveContent(events) { - subtokenize(events) - return events -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeContent(effects, ok) { - /** @type {Token | undefined} */ - let previous - return chunkStart - - /** - * Before a content chunk. - * - * ```markdown - * > | abc - * ^ - * ``` - * - * @type {State} - */ - function chunkStart(code) { - effects.enter('content') - previous = effects.enter('chunkContent', { - contentType: 'content' - }) - return chunkInside(code) - } - - /** - * In a content chunk. - * - * ```markdown - * > | abc - * ^^^ - * ``` - * - * @type {State} - */ - function chunkInside(code) { - if (code === null) { - return contentEnd(code) - } - - // To do: in `markdown-rs`, each line is parsed on its own, and everything - // is stitched together resolving. - if (markdownLineEnding(code)) { - return effects.check( - continuationConstruct, - contentContinue, - contentEnd - )(code) - } - - // Data. - effects.consume(code) - return chunkInside - } - - /** - * - * - * @type {State} - */ - function contentEnd(code) { - effects.exit('chunkContent') - effects.exit('content') - return ok(code) - } - - /** - * - * - * @type {State} - */ - function contentContinue(code) { - effects.consume(code) - effects.exit('chunkContent') - previous.next = effects.enter('chunkContent', { - contentType: 'content', - previous - }) - previous = previous.next - return chunkInside - } -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeContinuation(effects, ok, nok) { - const self = this - return startLookahead - - /** - * - * - * @type {State} - */ - function startLookahead(code) { - effects.exit('chunkContent') - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return factorySpace(effects, prefixed, 'linePrefix') - } - - /** - * - * - * @type {State} - */ - function prefixed(code) { - if (code === null || markdownLineEnding(code)) { - return nok(code) - } - - // Always populated by defaults. - - const tail = self.events[self.events.length - 1] - if ( - !self.parser.constructs.disable.null.includes('codeIndented') && - tail && - tail[1].type === 'linePrefix' && - tail[2].sliceSerialize(tail[1], true).length >= 4 - ) { - return ok(code) - } - return effects.interrupt(self.parser.constructs.flow, nok, ok)(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/initialize/flow.js -/** - * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct - * @typedef {import('micromark-util-types').Initializer} Initializer - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - */ - - - - -/** @type {InitialConstruct} */ -const flow = { - tokenize: initializeFlow -} - -/** - * @this {TokenizeContext} - * @type {Initializer} - */ -function initializeFlow(effects) { - const self = this - const initial = effects.attempt( - // Try to parse a blank line. - blankLine, - atBlankEnding, - // Try to parse initial flow (essentially, only code). - effects.attempt( - this.parser.constructs.flowInitial, - afterConstruct, - factorySpace( - effects, - effects.attempt( - this.parser.constructs.flow, - afterConstruct, - effects.attempt(content_content, afterConstruct) - ), - 'linePrefix' - ) - ) - ) - return initial - - /** @type {State} */ - function atBlankEnding(code) { - if (code === null) { - effects.consume(code) - return - } - effects.enter('lineEndingBlank') - effects.consume(code) - effects.exit('lineEndingBlank') - self.currentConstruct = undefined - return initial - } - - /** @type {State} */ - function afterConstruct(code) { - if (code === null) { - effects.consume(code) - return - } - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - self.currentConstruct = undefined - return initial - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/initialize/text.js -/** - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct - * @typedef {import('micromark-util-types').Initializer} Initializer - * @typedef {import('micromark-util-types').Resolver} Resolver - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - */ - -const resolver = { - resolveAll: createResolver() -} -const string = initializeFactory('string') -const text_text = initializeFactory('text') - -/** - * @param {'string' | 'text'} field - * @returns {InitialConstruct} - */ -function initializeFactory(field) { - return { - tokenize: initializeText, - resolveAll: createResolver( - field === 'text' ? resolveAllLineSuffixes : undefined - ) - } - - /** - * @this {TokenizeContext} - * @type {Initializer} - */ - function initializeText(effects) { - const self = this - const constructs = this.parser.constructs[field] - const text = effects.attempt(constructs, start, notText) - return start - - /** @type {State} */ - function start(code) { - return atBreak(code) ? text(code) : notText(code) - } - - /** @type {State} */ - function notText(code) { - if (code === null) { - effects.consume(code) - return - } - effects.enter('data') - effects.consume(code) - return data - } - - /** @type {State} */ - function data(code) { - if (atBreak(code)) { - effects.exit('data') - return text(code) - } - - // Data. - effects.consume(code) - return data - } - - /** - * @param {Code} code - * @returns {boolean} - */ - function atBreak(code) { - if (code === null) { - return true - } - const list = constructs[code] - let index = -1 - if (list) { - // Always populated by defaults. - - while (++index < list.length) { - const item = list[index] - if (!item.previous || item.previous.call(self, self.previous)) { - return true - } - } - } - return false - } - } -} - -/** - * @param {Resolver | undefined} [extraResolver] - * @returns {Resolver} - */ -function createResolver(extraResolver) { - return resolveAllText - - /** @type {Resolver} */ - function resolveAllText(events, context) { - let index = -1 - /** @type {number | undefined} */ - let enter - - // A rather boring computation (to merge adjacent `data` events) which - // improves mm performance by 29%. - while (++index <= events.length) { - if (enter === undefined) { - if (events[index] && events[index][1].type === 'data') { - enter = index - index++ - } - } else if (!events[index] || events[index][1].type !== 'data') { - // Don’t do anything if there is one data token. - if (index !== enter + 2) { - events[enter][1].end = events[index - 1][1].end - events.splice(enter + 2, index - enter - 2) - index = enter + 2 - } - enter = undefined - } - } - return extraResolver ? extraResolver(events, context) : events - } -} - -/** - * A rather ugly set of instructions which again looks at chunks in the input - * stream. - * The reason to do this here is that it is *much* faster to parse in reverse. - * And that we can’t hook into `null` to split the line suffix before an EOF. - * To do: figure out if we can make this into a clean utility, or even in core. - * As it will be useful for GFMs literal autolink extension (and maybe even - * tables?) - * - * @type {Resolver} - */ -function resolveAllLineSuffixes(events, context) { - let eventIndex = 0 // Skip first. - - while (++eventIndex <= events.length) { - if ( - (eventIndex === events.length || - events[eventIndex][1].type === 'lineEnding') && - events[eventIndex - 1][1].type === 'data' - ) { - const data = events[eventIndex - 1][1] - const chunks = context.sliceStream(data) - let index = chunks.length - let bufferIndex = -1 - let size = 0 - /** @type {boolean | undefined} */ - let tabs - while (index--) { - const chunk = chunks[index] - if (typeof chunk === 'string') { - bufferIndex = chunk.length - while (chunk.charCodeAt(bufferIndex - 1) === 32) { - size++ - bufferIndex-- - } - if (bufferIndex) break - bufferIndex = -1 - } - // Number - else if (chunk === -2) { - tabs = true - size++ - } else if (chunk === -1) { - // Empty - } else { - // Replacement character, exit. - index++ - break - } - } - if (size) { - const token = { - type: - eventIndex === events.length || tabs || size < 2 - ? 'lineSuffix' - : 'hardBreakTrailing', - start: { - line: data.end.line, - column: data.end.column - size, - offset: data.end.offset - size, - _index: data.start._index + index, - _bufferIndex: index - ? bufferIndex - : data.start._bufferIndex + bufferIndex - }, - end: Object.assign({}, data.end) - } - data.end = Object.assign({}, token.start) - if (data.start.offset === data.end.offset) { - Object.assign(data, token) - } else { - events.splice( - eventIndex, - 0, - ['enter', token, context], - ['exit', token, context] - ) - eventIndex += 2 - } - } - eventIndex++ - } - } - return events -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-resolve-all/index.js -/** - * @typedef {import('micromark-util-types').Event} Event - * @typedef {import('micromark-util-types').Resolver} Resolver - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - */ - -/** - * Call all `resolveAll`s. - * - * @param {Array<{resolveAll?: Resolver | undefined}>} constructs - * List of constructs, optionally with `resolveAll`s. - * @param {Array} events - * List of events. - * @param {TokenizeContext} context - * Context used by `tokenize`. - * @returns {Array} - * Changed events. - */ -function resolveAll(constructs, events, context) { - /** @type {Array} */ - const called = [] - let index = -1 - - while (++index < constructs.length) { - const resolve = constructs[index].resolveAll - - if (resolve && !called.includes(resolve)) { - events = resolve(events, context) - called.push(resolve) - } - } - - return events -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/create-tokenizer.js -/** - * @typedef {import('micromark-util-types').Chunk} Chunk - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').ConstructRecord} ConstructRecord - * @typedef {import('micromark-util-types').Effects} Effects - * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct - * @typedef {import('micromark-util-types').ParseContext} ParseContext - * @typedef {import('micromark-util-types').Point} Point - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').Token} Token - * @typedef {import('micromark-util-types').TokenType} TokenType - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - */ - -/** - * @callback Restore - * @returns {void} - * - * @typedef Info - * @property {Restore} restore - * @property {number} from - * - * @callback ReturnHandle - * Handle a successful run. - * @param {Construct} construct - * @param {Info} info - * @returns {void} - */ - - - - -/** - * Create a tokenizer. - * Tokenizers deal with one type of data (e.g., containers, flow, text). - * The parser is the object dealing with it all. - * `initialize` works like other constructs, except that only its `tokenize` - * function is used, in which case it doesn’t receive an `ok` or `nok`. - * `from` can be given to set the point before the first character, although - * when further lines are indented, they must be set with `defineSkip`. - * - * @param {ParseContext} parser - * @param {InitialConstruct} initialize - * @param {Omit | undefined} [from] - * @returns {TokenizeContext} - */ -function createTokenizer(parser, initialize, from) { - /** @type {Point} */ - let point = Object.assign( - from - ? Object.assign({}, from) - : { - line: 1, - column: 1, - offset: 0 - }, - { - _index: 0, - _bufferIndex: -1 - } - ) - /** @type {Record} */ - const columnStart = {} - /** @type {Array} */ - const resolveAllConstructs = [] - /** @type {Array} */ - let chunks = [] - /** @type {Array} */ - let stack = [] - /** @type {boolean | undefined} */ - let consumed = true - - /** - * Tools used for tokenizing. - * - * @type {Effects} - */ - const effects = { - consume, - enter, - exit, - attempt: constructFactory(onsuccessfulconstruct), - check: constructFactory(onsuccessfulcheck), - interrupt: constructFactory(onsuccessfulcheck, { - interrupt: true - }) - } - - /** - * State and tools for resolving and serializing. - * - * @type {TokenizeContext} - */ - const context = { - previous: null, - code: null, - containerState: {}, - events: [], - parser, - sliceStream, - sliceSerialize, - now, - defineSkip, - write - } - - /** - * The state function. - * - * @type {State | void} - */ - let state = initialize.tokenize.call(context, effects) - - /** - * Track which character we expect to be consumed, to catch bugs. - * - * @type {Code} - */ - let expectedCode - if (initialize.resolveAll) { - resolveAllConstructs.push(initialize) - } - return context - - /** @type {TokenizeContext['write']} */ - function write(slice) { - chunks = push(chunks, slice) - main() - - // Exit if we’re not done, resolve might change stuff. - if (chunks[chunks.length - 1] !== null) { - return [] - } - addResult(initialize, 0) - - // Otherwise, resolve, and exit. - context.events = resolveAll(resolveAllConstructs, context.events, context) - return context.events - } - - // - // Tools. - // - - /** @type {TokenizeContext['sliceSerialize']} */ - function sliceSerialize(token, expandTabs) { - return serializeChunks(sliceStream(token), expandTabs) - } - - /** @type {TokenizeContext['sliceStream']} */ - function sliceStream(token) { - return sliceChunks(chunks, token) - } - - /** @type {TokenizeContext['now']} */ - function now() { - // This is a hot path, so we clone manually instead of `Object.assign({}, point)` - const {line, column, offset, _index, _bufferIndex} = point - return { - line, - column, - offset, - _index, - _bufferIndex - } - } - - /** @type {TokenizeContext['defineSkip']} */ - function defineSkip(value) { - columnStart[value.line] = value.column - accountForPotentialSkip() - } - - // - // State management. - // - - /** - * Main loop (note that `_index` and `_bufferIndex` in `point` are modified by - * `consume`). - * Here is where we walk through the chunks, which either include strings of - * several characters, or numerical character codes. - * The reason to do this in a loop instead of a call is so the stack can - * drain. - * - * @returns {void} - */ - function main() { - /** @type {number} */ - let chunkIndex - while (point._index < chunks.length) { - const chunk = chunks[point._index] - - // If we’re in a buffer chunk, loop through it. - if (typeof chunk === 'string') { - chunkIndex = point._index - if (point._bufferIndex < 0) { - point._bufferIndex = 0 - } - while ( - point._index === chunkIndex && - point._bufferIndex < chunk.length - ) { - go(chunk.charCodeAt(point._bufferIndex)) - } - } else { - go(chunk) - } - } - } - - /** - * Deal with one code. - * - * @param {Code} code - * @returns {void} - */ - function go(code) { - consumed = undefined - expectedCode = code - state = state(code) - } - - /** @type {Effects['consume']} */ - function consume(code) { - if (markdownLineEnding(code)) { - point.line++ - point.column = 1 - point.offset += code === -3 ? 2 : 1 - accountForPotentialSkip() - } else if (code !== -1) { - point.column++ - point.offset++ - } - - // Not in a string chunk. - if (point._bufferIndex < 0) { - point._index++ - } else { - point._bufferIndex++ - - // At end of string chunk. - // @ts-expect-error Points w/ non-negative `_bufferIndex` reference - // strings. - if (point._bufferIndex === chunks[point._index].length) { - point._bufferIndex = -1 - point._index++ - } - } - - // Expose the previous character. - context.previous = code - - // Mark as consumed. - consumed = true - } - - /** @type {Effects['enter']} */ - function enter(type, fields) { - /** @type {Token} */ - // @ts-expect-error Patch instead of assign required fields to help GC. - const token = fields || {} - token.type = type - token.start = now() - context.events.push(['enter', token, context]) - stack.push(token) - return token - } - - /** @type {Effects['exit']} */ - function exit(type) { - const token = stack.pop() - token.end = now() - context.events.push(['exit', token, context]) - return token - } - - /** - * Use results. - * - * @type {ReturnHandle} - */ - function onsuccessfulconstruct(construct, info) { - addResult(construct, info.from) - } - - /** - * Discard results. - * - * @type {ReturnHandle} - */ - function onsuccessfulcheck(_, info) { - info.restore() - } - - /** - * Factory to attempt/check/interrupt. - * - * @param {ReturnHandle} onreturn - * @param {{interrupt?: boolean | undefined} | undefined} [fields] - */ - function constructFactory(onreturn, fields) { - return hook - - /** - * Handle either an object mapping codes to constructs, a list of - * constructs, or a single construct. - * - * @param {Array | Construct | ConstructRecord} constructs - * @param {State} returnState - * @param {State | undefined} [bogusState] - * @returns {State} - */ - function hook(constructs, returnState, bogusState) { - /** @type {Array} */ - let listOfConstructs - /** @type {number} */ - let constructIndex - /** @type {Construct} */ - let currentConstruct - /** @type {Info} */ - let info - return Array.isArray(constructs) /* c8 ignore next 1 */ - ? handleListOfConstructs(constructs) - : 'tokenize' in constructs - ? // @ts-expect-error Looks like a construct. - handleListOfConstructs([constructs]) - : handleMapOfConstructs(constructs) - - /** - * Handle a list of construct. - * - * @param {ConstructRecord} map - * @returns {State} - */ - function handleMapOfConstructs(map) { - return start - - /** @type {State} */ - function start(code) { - const def = code !== null && map[code] - const all = code !== null && map.null - const list = [ - // To do: add more extension tests. - /* c8 ignore next 2 */ - ...(Array.isArray(def) ? def : def ? [def] : []), - ...(Array.isArray(all) ? all : all ? [all] : []) - ] - return handleListOfConstructs(list)(code) - } - } - - /** - * Handle a list of construct. - * - * @param {Array} list - * @returns {State} - */ - function handleListOfConstructs(list) { - listOfConstructs = list - constructIndex = 0 - if (list.length === 0) { - return bogusState - } - return handleConstruct(list[constructIndex]) - } - - /** - * Handle a single construct. - * - * @param {Construct} construct - * @returns {State} - */ - function handleConstruct(construct) { - return start - - /** @type {State} */ - function start(code) { - // To do: not needed to store if there is no bogus state, probably? - // Currently doesn’t work because `inspect` in document does a check - // w/o a bogus, which doesn’t make sense. But it does seem to help perf - // by not storing. - info = store() - currentConstruct = construct - if (!construct.partial) { - context.currentConstruct = construct - } - - // Always populated by defaults. - - if ( - construct.name && - context.parser.constructs.disable.null.includes(construct.name) - ) { - return nok(code) - } - return construct.tokenize.call( - // If we do have fields, create an object w/ `context` as its - // prototype. - // This allows a “live binding”, which is needed for `interrupt`. - fields ? Object.assign(Object.create(context), fields) : context, - effects, - ok, - nok - )(code) - } - } - - /** @type {State} */ - function ok(code) { - consumed = true - onreturn(currentConstruct, info) - return returnState - } - - /** @type {State} */ - function nok(code) { - consumed = true - info.restore() - if (++constructIndex < listOfConstructs.length) { - return handleConstruct(listOfConstructs[constructIndex]) - } - return bogusState - } - } - } - - /** - * @param {Construct} construct - * @param {number} from - * @returns {void} - */ - function addResult(construct, from) { - if (construct.resolveAll && !resolveAllConstructs.includes(construct)) { - resolveAllConstructs.push(construct) - } - if (construct.resolve) { - splice( - context.events, - from, - context.events.length - from, - construct.resolve(context.events.slice(from), context) - ) - } - if (construct.resolveTo) { - context.events = construct.resolveTo(context.events, context) - } - } - - /** - * Store state. - * - * @returns {Info} - */ - function store() { - const startPoint = now() - const startPrevious = context.previous - const startCurrentConstruct = context.currentConstruct - const startEventsIndex = context.events.length - const startStack = Array.from(stack) - return { - restore, - from: startEventsIndex - } - - /** - * Restore state. - * - * @returns {void} - */ - function restore() { - point = startPoint - context.previous = startPrevious - context.currentConstruct = startCurrentConstruct - context.events.length = startEventsIndex - stack = startStack - accountForPotentialSkip() - } - } - - /** - * Move the current point a bit forward in the line when it’s on a column - * skip. - * - * @returns {void} - */ - function accountForPotentialSkip() { - if (point.line in columnStart && point.column < 2) { - point.column = columnStart[point.line] - point.offset += columnStart[point.line] - 1 - } - } -} - -/** - * Get the chunks from a slice of chunks in the range of a token. - * - * @param {Array} chunks - * @param {Pick} token - * @returns {Array} - */ -function sliceChunks(chunks, token) { - const startIndex = token.start._index - const startBufferIndex = token.start._bufferIndex - const endIndex = token.end._index - const endBufferIndex = token.end._bufferIndex - /** @type {Array} */ - let view - if (startIndex === endIndex) { - // @ts-expect-error `_bufferIndex` is used on string chunks. - view = [chunks[startIndex].slice(startBufferIndex, endBufferIndex)] - } else { - view = chunks.slice(startIndex, endIndex) - if (startBufferIndex > -1) { - const head = view[0] - if (typeof head === 'string') { - view[0] = head.slice(startBufferIndex) - } else { - view.shift() - } - } - if (endBufferIndex > 0) { - // @ts-expect-error `_bufferIndex` is used on string chunks. - view.push(chunks[endIndex].slice(0, endBufferIndex)) - } - } - return view -} - -/** - * Get the string value of a slice of chunks. - * - * @param {Array} chunks - * @param {boolean | undefined} [expandTabs=false] - * @returns {string} - */ -function serializeChunks(chunks, expandTabs) { - let index = -1 - /** @type {Array} */ - const result = [] - /** @type {boolean | undefined} */ - let atTab - while (++index < chunks.length) { - const chunk = chunks[index] - /** @type {string} */ - let value - if (typeof chunk === 'string') { - value = chunk - } else - switch (chunk) { - case -5: { - value = '\r' - break - } - case -4: { - value = '\n' - break - } - case -3: { - value = '\r' + '\n' - break - } - case -2: { - value = expandTabs ? ' ' : '\t' - break - } - case -1: { - if (!expandTabs && atTab) continue - value = ' ' - break - } - default: { - // Currently only replacement character. - value = String.fromCharCode(chunk) - } - } - atTab = chunk === -2 - result.push(value) - } - return result.join('') -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/thematic-break.js -/** - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const thematicBreak = { - name: 'thematicBreak', - tokenize: tokenizeThematicBreak -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeThematicBreak(effects, ok, nok) { - let size = 0 - /** @type {NonNullable} */ - let marker - return start - - /** - * Start of thematic break. - * - * ```markdown - * > | *** - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter('thematicBreak') - // To do: parse indent like `markdown-rs`. - return before(code) - } - - /** - * After optional whitespace, at marker. - * - * ```markdown - * > | *** - * ^ - * ``` - * - * @type {State} - */ - function before(code) { - marker = code - return atBreak(code) - } - - /** - * After something, before something else. - * - * ```markdown - * > | *** - * ^ - * ``` - * - * @type {State} - */ - function atBreak(code) { - if (code === marker) { - effects.enter('thematicBreakSequence') - return sequence(code) - } - if (size >= 3 && (code === null || markdownLineEnding(code))) { - effects.exit('thematicBreak') - return ok(code) - } - return nok(code) - } - - /** - * In sequence. - * - * ```markdown - * > | *** - * ^ - * ``` - * - * @type {State} - */ - function sequence(code) { - if (code === marker) { - effects.consume(code) - size++ - return sequence - } - effects.exit('thematicBreakSequence') - return markdownSpace(code) - ? factorySpace(effects, atBreak, 'whitespace')(code) - : atBreak(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/list.js -/** - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').ContainerState} ContainerState - * @typedef {import('micromark-util-types').Exiter} Exiter - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - - - - -/** @type {Construct} */ -const list = { - name: 'list', - tokenize: tokenizeListStart, - continuation: { - tokenize: tokenizeListContinuation - }, - exit: tokenizeListEnd -} - -/** @type {Construct} */ -const listItemPrefixWhitespaceConstruct = { - tokenize: tokenizeListItemPrefixWhitespace, - partial: true -} - -/** @type {Construct} */ -const indentConstruct = { - tokenize: tokenizeIndent, - partial: true -} - -// To do: `markdown-rs` parses list items on their own and later stitches them -// together. - -/** - * @type {Tokenizer} - * @this {TokenizeContext} - */ -function tokenizeListStart(effects, ok, nok) { - const self = this - const tail = self.events[self.events.length - 1] - let initialSize = - tail && tail[1].type === 'linePrefix' - ? tail[2].sliceSerialize(tail[1], true).length - : 0 - let size = 0 - return start - - /** @type {State} */ - function start(code) { - const kind = - self.containerState.type || - (code === 42 || code === 43 || code === 45 - ? 'listUnordered' - : 'listOrdered') - if ( - kind === 'listUnordered' - ? !self.containerState.marker || code === self.containerState.marker - : asciiDigit(code) - ) { - if (!self.containerState.type) { - self.containerState.type = kind - effects.enter(kind, { - _container: true - }) - } - if (kind === 'listUnordered') { - effects.enter('listItemPrefix') - return code === 42 || code === 45 - ? effects.check(thematicBreak, nok, atMarker)(code) - : atMarker(code) - } - if (!self.interrupt || code === 49) { - effects.enter('listItemPrefix') - effects.enter('listItemValue') - return inside(code) - } - } - return nok(code) - } - - /** @type {State} */ - function inside(code) { - if (asciiDigit(code) && ++size < 10) { - effects.consume(code) - return inside - } - if ( - (!self.interrupt || size < 2) && - (self.containerState.marker - ? code === self.containerState.marker - : code === 41 || code === 46) - ) { - effects.exit('listItemValue') - return atMarker(code) - } - return nok(code) - } - - /** - * @type {State} - **/ - function atMarker(code) { - effects.enter('listItemMarker') - effects.consume(code) - effects.exit('listItemMarker') - self.containerState.marker = self.containerState.marker || code - return effects.check( - blankLine, - // Can’t be empty when interrupting. - self.interrupt ? nok : onBlank, - effects.attempt( - listItemPrefixWhitespaceConstruct, - endOfPrefix, - otherPrefix - ) - ) - } - - /** @type {State} */ - function onBlank(code) { - self.containerState.initialBlankLine = true - initialSize++ - return endOfPrefix(code) - } - - /** @type {State} */ - function otherPrefix(code) { - if (markdownSpace(code)) { - effects.enter('listItemPrefixWhitespace') - effects.consume(code) - effects.exit('listItemPrefixWhitespace') - return endOfPrefix - } - return nok(code) - } - - /** @type {State} */ - function endOfPrefix(code) { - self.containerState.size = - initialSize + - self.sliceSerialize(effects.exit('listItemPrefix'), true).length - return ok(code) - } -} - -/** - * @type {Tokenizer} - * @this {TokenizeContext} - */ -function tokenizeListContinuation(effects, ok, nok) { - const self = this - self.containerState._closeFlow = undefined - return effects.check(blankLine, onBlank, notBlank) - - /** @type {State} */ - function onBlank(code) { - self.containerState.furtherBlankLines = - self.containerState.furtherBlankLines || - self.containerState.initialBlankLine - - // We have a blank line. - // Still, try to consume at most the items size. - return factorySpace( - effects, - ok, - 'listItemIndent', - self.containerState.size + 1 - )(code) - } - - /** @type {State} */ - function notBlank(code) { - if (self.containerState.furtherBlankLines || !markdownSpace(code)) { - self.containerState.furtherBlankLines = undefined - self.containerState.initialBlankLine = undefined - return notInCurrentItem(code) - } - self.containerState.furtherBlankLines = undefined - self.containerState.initialBlankLine = undefined - return effects.attempt(indentConstruct, ok, notInCurrentItem)(code) - } - - /** @type {State} */ - function notInCurrentItem(code) { - // While we do continue, we signal that the flow should be closed. - self.containerState._closeFlow = true - // As we’re closing flow, we’re no longer interrupting. - self.interrupt = undefined - // Always populated by defaults. - - return factorySpace( - effects, - effects.attempt(list, ok, nok), - 'linePrefix', - self.parser.constructs.disable.null.includes('codeIndented') - ? undefined - : 4 - )(code) - } -} - -/** - * @type {Tokenizer} - * @this {TokenizeContext} - */ -function tokenizeIndent(effects, ok, nok) { - const self = this - return factorySpace( - effects, - afterPrefix, - 'listItemIndent', - self.containerState.size + 1 - ) - - /** @type {State} */ - function afterPrefix(code) { - const tail = self.events[self.events.length - 1] - return tail && - tail[1].type === 'listItemIndent' && - tail[2].sliceSerialize(tail[1], true).length === self.containerState.size - ? ok(code) - : nok(code) - } -} - -/** - * @type {Exiter} - * @this {TokenizeContext} - */ -function tokenizeListEnd(effects) { - effects.exit(this.containerState.type) -} - -/** - * @type {Tokenizer} - * @this {TokenizeContext} - */ -function tokenizeListItemPrefixWhitespace(effects, ok, nok) { - const self = this - - // Always populated by defaults. - - return factorySpace( - effects, - afterPrefix, - 'listItemPrefixWhitespace', - self.parser.constructs.disable.null.includes('codeIndented') - ? undefined - : 4 + 1 - ) - - /** @type {State} */ - function afterPrefix(code) { - const tail = self.events[self.events.length - 1] - return !markdownSpace(code) && - tail && - tail[1].type === 'listItemPrefixWhitespace' - ? ok(code) - : nok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/block-quote.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').Exiter} Exiter - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const blockQuote = { - name: 'blockQuote', - tokenize: tokenizeBlockQuoteStart, - continuation: { - tokenize: tokenizeBlockQuoteContinuation - }, - exit -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeBlockQuoteStart(effects, ok, nok) { - const self = this - return start - - /** - * Start of block quote. - * - * ```markdown - * > | > a - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - if (code === 62) { - const state = self.containerState - if (!state.open) { - effects.enter('blockQuote', { - _container: true - }) - state.open = true - } - effects.enter('blockQuotePrefix') - effects.enter('blockQuoteMarker') - effects.consume(code) - effects.exit('blockQuoteMarker') - return after - } - return nok(code) - } - - /** - * After `>`, before optional whitespace. - * - * ```markdown - * > | > a - * ^ - * ``` - * - * @type {State} - */ - function after(code) { - if (markdownSpace(code)) { - effects.enter('blockQuotePrefixWhitespace') - effects.consume(code) - effects.exit('blockQuotePrefixWhitespace') - effects.exit('blockQuotePrefix') - return ok - } - effects.exit('blockQuotePrefix') - return ok(code) - } -} - -/** - * Start of block quote continuation. - * - * ```markdown - * | > a - * > | > b - * ^ - * ``` - * - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeBlockQuoteContinuation(effects, ok, nok) { - const self = this - return contStart - - /** - * Start of block quote continuation. - * - * Also used to parse the first block quote opening. - * - * ```markdown - * | > a - * > | > b - * ^ - * ``` - * - * @type {State} - */ - function contStart(code) { - if (markdownSpace(code)) { - // Always populated by defaults. - - return factorySpace( - effects, - contBefore, - 'linePrefix', - self.parser.constructs.disable.null.includes('codeIndented') - ? undefined - : 4 - )(code) - } - return contBefore(code) - } - - /** - * At `>`, after optional whitespace. - * - * Also used to parse the first block quote opening. - * - * ```markdown - * | > a - * > | > b - * ^ - * ``` - * - * @type {State} - */ - function contBefore(code) { - return effects.attempt(blockQuote, ok, nok)(code) - } -} - -/** @type {Exiter} */ -function exit(effects) { - effects.exit('blockQuote') -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-destination/index.js -/** - * @typedef {import('micromark-util-types').Effects} Effects - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenType} TokenType - */ - - -/** - * Parse destinations. - * - * ###### Examples - * - * ```markdown - * - * b> - * - * - * a - * a\)b - * a(b)c - * a(b) - * ``` - * - * @param {Effects} effects - * Context. - * @param {State} ok - * State switched to when successful. - * @param {State} nok - * State switched to when unsuccessful. - * @param {TokenType} type - * Type for whole (`` or `b`). - * @param {TokenType} literalType - * Type when enclosed (``). - * @param {TokenType} literalMarkerType - * Type for enclosing (`<` and `>`). - * @param {TokenType} rawType - * Type when not enclosed (`b`). - * @param {TokenType} stringType - * Type for the value (`a` or `b`). - * @param {number | undefined} [max=Infinity] - * Depth of nested parens (inclusive). - * @returns {State} - * Start state. - */ // eslint-disable-next-line max-params -function factoryDestination( - effects, - ok, - nok, - type, - literalType, - literalMarkerType, - rawType, - stringType, - max -) { - const limit = max || Number.POSITIVE_INFINITY - let balance = 0 - return start - - /** - * Start of destination. - * - * ```markdown - * > | - * ^ - * > | aa - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - if (code === 60) { - effects.enter(type) - effects.enter(literalType) - effects.enter(literalMarkerType) - effects.consume(code) - effects.exit(literalMarkerType) - return enclosedBefore - } - - // ASCII control, space, closing paren. - if (code === null || code === 32 || code === 41 || asciiControl(code)) { - return nok(code) - } - effects.enter(type) - effects.enter(rawType) - effects.enter(stringType) - effects.enter('chunkString', { - contentType: 'string' - }) - return raw(code) - } - - /** - * After `<`, at an enclosed destination. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function enclosedBefore(code) { - if (code === 62) { - effects.enter(literalMarkerType) - effects.consume(code) - effects.exit(literalMarkerType) - effects.exit(literalType) - effects.exit(type) - return ok - } - effects.enter(stringType) - effects.enter('chunkString', { - contentType: 'string' - }) - return enclosed(code) - } - - /** - * In enclosed destination. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function enclosed(code) { - if (code === 62) { - effects.exit('chunkString') - effects.exit(stringType) - return enclosedBefore(code) - } - if (code === null || code === 60 || markdownLineEnding(code)) { - return nok(code) - } - effects.consume(code) - return code === 92 ? enclosedEscape : enclosed - } - - /** - * After `\`, at a special character. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function enclosedEscape(code) { - if (code === 60 || code === 62 || code === 92) { - effects.consume(code) - return enclosed - } - return enclosed(code) - } - - /** - * In raw destination. - * - * ```markdown - * > | aa - * ^ - * ``` - * - * @type {State} - */ - function raw(code) { - if ( - !balance && - (code === null || code === 41 || markdownLineEndingOrSpace(code)) - ) { - effects.exit('chunkString') - effects.exit(stringType) - effects.exit(rawType) - effects.exit(type) - return ok(code) - } - if (balance < limit && code === 40) { - effects.consume(code) - balance++ - return raw - } - if (code === 41) { - effects.consume(code) - balance-- - return raw - } - - // ASCII control (but *not* `\0`) and space and `(`. - // Note: in `markdown-rs`, `\0` exists in codes, in `micromark-js` it - // doesn’t. - if (code === null || code === 32 || code === 40 || asciiControl(code)) { - return nok(code) - } - effects.consume(code) - return code === 92 ? rawEscape : raw - } - - /** - * After `\`, at special character. - * - * ```markdown - * > | a\*a - * ^ - * ``` - * - * @type {State} - */ - function rawEscape(code) { - if (code === 40 || code === 41 || code === 92) { - effects.consume(code) - return raw - } - return raw(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-label/index.js -/** - * @typedef {import('micromark-util-types').Effects} Effects - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').TokenType} TokenType - */ - - -/** - * Parse labels. - * - * > 👉 **Note**: labels in markdown are capped at 999 characters in the string. - * - * ###### Examples - * - * ```markdown - * [a] - * [a - * b] - * [a\]b] - * ``` - * - * @this {TokenizeContext} - * Tokenize context. - * @param {Effects} effects - * Context. - * @param {State} ok - * State switched to when successful. - * @param {State} nok - * State switched to when unsuccessful. - * @param {TokenType} type - * Type of the whole label (`[a]`). - * @param {TokenType} markerType - * Type for the markers (`[` and `]`). - * @param {TokenType} stringType - * Type for the identifier (`a`). - * @returns {State} - * Start state. - */ // eslint-disable-next-line max-params -function factoryLabel(effects, ok, nok, type, markerType, stringType) { - const self = this - let size = 0 - /** @type {boolean} */ - let seen - return start - - /** - * Start of label. - * - * ```markdown - * > | [a] - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter(type) - effects.enter(markerType) - effects.consume(code) - effects.exit(markerType) - effects.enter(stringType) - return atBreak - } - - /** - * In label, at something, before something else. - * - * ```markdown - * > | [a] - * ^ - * ``` - * - * @type {State} - */ - function atBreak(code) { - if ( - size > 999 || - code === null || - code === 91 || - (code === 93 && !seen) || - // To do: remove in the future once we’ve switched from - // `micromark-extension-footnote` to `micromark-extension-gfm-footnote`, - // which doesn’t need this. - // Hidden footnotes hook. - /* c8 ignore next 3 */ - (code === 94 && - !size && - '_hiddenFootnoteSupport' in self.parser.constructs) - ) { - return nok(code) - } - if (code === 93) { - effects.exit(stringType) - effects.enter(markerType) - effects.consume(code) - effects.exit(markerType) - effects.exit(type) - return ok - } - - // To do: indent? Link chunks and EOLs together? - if (markdownLineEnding(code)) { - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return atBreak - } - effects.enter('chunkString', { - contentType: 'string' - }) - return labelInside(code) - } - - /** - * In label, in text. - * - * ```markdown - * > | [a] - * ^ - * ``` - * - * @type {State} - */ - function labelInside(code) { - if ( - code === null || - code === 91 || - code === 93 || - markdownLineEnding(code) || - size++ > 999 - ) { - effects.exit('chunkString') - return atBreak(code) - } - effects.consume(code) - if (!seen) seen = !markdownSpace(code) - return code === 92 ? labelEscape : labelInside - } - - /** - * After `\`, at a special character. - * - * ```markdown - * > | [a\*a] - * ^ - * ``` - * - * @type {State} - */ - function labelEscape(code) { - if (code === 91 || code === 92 || code === 93) { - effects.consume(code) - size++ - return labelInside - } - return labelInside(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-title/index.js -/** - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Effects} Effects - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenType} TokenType - */ - - - -/** - * Parse titles. - * - * ###### Examples - * - * ```markdown - * "a" - * 'b' - * (c) - * "a - * b" - * 'a - * b' - * (a\)b) - * ``` - * - * @param {Effects} effects - * Context. - * @param {State} ok - * State switched to when successful. - * @param {State} nok - * State switched to when unsuccessful. - * @param {TokenType} type - * Type of the whole title (`"a"`, `'b'`, `(c)`). - * @param {TokenType} markerType - * Type for the markers (`"`, `'`, `(`, and `)`). - * @param {TokenType} stringType - * Type for the value (`a`). - * @returns {State} - * Start state. - */ // eslint-disable-next-line max-params -function factoryTitle(effects, ok, nok, type, markerType, stringType) { - /** @type {NonNullable} */ - let marker - return start - - /** - * Start of title. - * - * ```markdown - * > | "a" - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - if (code === 34 || code === 39 || code === 40) { - effects.enter(type) - effects.enter(markerType) - effects.consume(code) - effects.exit(markerType) - marker = code === 40 ? 41 : code - return begin - } - return nok(code) - } - - /** - * After opening marker. - * - * This is also used at the closing marker. - * - * ```markdown - * > | "a" - * ^ - * ``` - * - * @type {State} - */ - function begin(code) { - if (code === marker) { - effects.enter(markerType) - effects.consume(code) - effects.exit(markerType) - effects.exit(type) - return ok - } - effects.enter(stringType) - return atBreak(code) - } - - /** - * At something, before something else. - * - * ```markdown - * > | "a" - * ^ - * ``` - * - * @type {State} - */ - function atBreak(code) { - if (code === marker) { - effects.exit(stringType) - return begin(marker) - } - if (code === null) { - return nok(code) - } - - // Note: blank lines can’t exist in content. - if (markdownLineEnding(code)) { - // To do: use `space_or_tab_eol_with_options`, connect. - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return factorySpace(effects, atBreak, 'linePrefix') - } - effects.enter('chunkString', { - contentType: 'string' - }) - return inside(code) - } - - /** - * - * - * @type {State} - */ - function inside(code) { - if (code === marker || code === null || markdownLineEnding(code)) { - effects.exit('chunkString') - return atBreak(code) - } - effects.consume(code) - return code === 92 ? escape : inside - } - - /** - * After `\`, at a special character. - * - * ```markdown - * > | "a\*b" - * ^ - * ``` - * - * @type {State} - */ - function escape(code) { - if (code === marker || code === 92) { - effects.consume(code) - return inside - } - return inside(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-whitespace/index.js -/** - * @typedef {import('micromark-util-types').Effects} Effects - * @typedef {import('micromark-util-types').State} State - */ - - - -/** - * Parse spaces and tabs. - * - * There is no `nok` parameter: - * - * * line endings or spaces in markdown are often optional, in which case this - * factory can be used and `ok` will be switched to whether spaces were found - * or not - * * one line ending or space can be detected with - * `markdownLineEndingOrSpace(code)` right before using `factoryWhitespace` - * - * @param {Effects} effects - * Context. - * @param {State} ok - * State switched to when successful. - * @returns - * Start state. - */ -function factoryWhitespace(effects, ok) { - /** @type {boolean} */ - let seen - return start - - /** @type {State} */ - function start(code) { - if (markdownLineEnding(code)) { - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - seen = true - return start - } - if (markdownSpace(code)) { - return factorySpace( - effects, - start, - seen ? 'linePrefix' : 'lineSuffix' - )(code) - } - return ok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-normalize-identifier/index.js -/** - * Normalize an identifier (as found in references, definitions). - * - * Collapses markdown whitespace, trim, and then lower- and uppercase. - * - * Some characters are considered “uppercase”, such as U+03F4 (`ϴ`), but if their - * lowercase counterpart (U+03B8 (`θ`)) is uppercased will result in a different - * uppercase character (U+0398 (`Θ`)). - * So, to get a canonical form, we perform both lower- and uppercase. - * - * Using uppercase last makes sure keys will never interact with default - * prototypal values (such as `constructor`): nothing in the prototype of - * `Object` is uppercase. - * - * @param {string} value - * Identifier to normalize. - * @returns {string} - * Normalized identifier. - */ -function normalizeIdentifier(value) { - return ( - value - // Collapse markdown whitespace. - .replace(/[\t\n\r ]+/g, ' ') - // Trim. - .replace(/^ | $/g, '') - // Some characters are considered “uppercase”, but if their lowercase - // counterpart is uppercased will result in a different uppercase - // character. - // Hence, to get that form, we perform both lower- and uppercase. - // Upper case makes sure keys will not interact with default prototypal - // methods: no method is uppercase. - .toLowerCase() - .toUpperCase() - ) -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/definition.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - - - - - - -/** @type {Construct} */ -const definition = { - name: 'definition', - tokenize: tokenizeDefinition -} - -/** @type {Construct} */ -const titleBefore = { - tokenize: tokenizeTitleBefore, - partial: true -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeDefinition(effects, ok, nok) { - const self = this - /** @type {string} */ - let identifier - return start - - /** - * At start of a definition. - * - * ```markdown - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - // Do not interrupt paragraphs (but do follow definitions). - // To do: do `interrupt` the way `markdown-rs` does. - // To do: parse whitespace the way `markdown-rs` does. - effects.enter('definition') - return before(code) - } - - /** - * After optional whitespace, at `[`. - * - * ```markdown - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function before(code) { - // To do: parse whitespace the way `markdown-rs` does. - - return factoryLabel.call( - self, - effects, - labelAfter, - // Note: we don’t need to reset the way `markdown-rs` does. - nok, - 'definitionLabel', - 'definitionLabelMarker', - 'definitionLabelString' - )(code) - } - - /** - * After label. - * - * ```markdown - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function labelAfter(code) { - identifier = normalizeIdentifier( - self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1) - ) - if (code === 58) { - effects.enter('definitionMarker') - effects.consume(code) - effects.exit('definitionMarker') - return markerAfter - } - return nok(code) - } - - /** - * After marker. - * - * ```markdown - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function markerAfter(code) { - // Note: whitespace is optional. - return markdownLineEndingOrSpace(code) - ? factoryWhitespace(effects, destinationBefore)(code) - : destinationBefore(code) - } - - /** - * Before destination. - * - * ```markdown - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function destinationBefore(code) { - return factoryDestination( - effects, - destinationAfter, - // Note: we don’t need to reset the way `markdown-rs` does. - nok, - 'definitionDestination', - 'definitionDestinationLiteral', - 'definitionDestinationLiteralMarker', - 'definitionDestinationRaw', - 'definitionDestinationString' - )(code) - } - - /** - * After destination. - * - * ```markdown - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function destinationAfter(code) { - return effects.attempt(titleBefore, after, after)(code) - } - - /** - * After definition. - * - * ```markdown - * > | [a]: b - * ^ - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function after(code) { - return markdownSpace(code) - ? factorySpace(effects, afterWhitespace, 'whitespace')(code) - : afterWhitespace(code) - } - - /** - * After definition, after optional whitespace. - * - * ```markdown - * > | [a]: b - * ^ - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function afterWhitespace(code) { - if (code === null || markdownLineEnding(code)) { - effects.exit('definition') - - // Note: we don’t care about uniqueness. - // It’s likely that that doesn’t happen very frequently. - // It is more likely that it wastes precious time. - self.parser.defined.push(identifier) - - // To do: `markdown-rs` interrupt. - // // You’d be interrupting. - // tokenizer.interrupt = true - return ok(code) - } - return nok(code) - } -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeTitleBefore(effects, ok, nok) { - return titleBefore - - /** - * After destination, at whitespace. - * - * ```markdown - * > | [a]: b - * ^ - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function titleBefore(code) { - return markdownLineEndingOrSpace(code) - ? factoryWhitespace(effects, beforeMarker)(code) - : nok(code) - } - - /** - * At title. - * - * ```markdown - * | [a]: b - * > | "c" - * ^ - * ``` - * - * @type {State} - */ - function beforeMarker(code) { - return factoryTitle( - effects, - titleAfter, - nok, - 'definitionTitle', - 'definitionTitleMarker', - 'definitionTitleString' - )(code) - } - - /** - * After title. - * - * ```markdown - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function titleAfter(code) { - return markdownSpace(code) - ? factorySpace(effects, titleAfterOptionalWhitespace, 'whitespace')(code) - : titleAfterOptionalWhitespace(code) - } - - /** - * After title, after optional whitespace. - * - * ```markdown - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function titleAfterOptionalWhitespace(code) { - return code === null || markdownLineEnding(code) ? ok(code) : nok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/code-indented.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const codeIndented = { - name: 'codeIndented', - tokenize: tokenizeCodeIndented -} - -/** @type {Construct} */ -const furtherStart = { - tokenize: tokenizeFurtherStart, - partial: true -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeCodeIndented(effects, ok, nok) { - const self = this - return start - - /** - * Start of code (indented). - * - * > **Parsing note**: it is not needed to check if this first line is a - * > filled line (that it has a non-whitespace character), because blank lines - * > are parsed already, so we never run into that. - * - * ```markdown - * > | aaa - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - // To do: manually check if interrupting like `markdown-rs`. - - effects.enter('codeIndented') - // To do: use an improved `space_or_tab` function like `markdown-rs`, - // so that we can drop the next state. - return factorySpace(effects, afterPrefix, 'linePrefix', 4 + 1)(code) - } - - /** - * At start, after 1 or 4 spaces. - * - * ```markdown - * > | aaa - * ^ - * ``` - * - * @type {State} - */ - function afterPrefix(code) { - const tail = self.events[self.events.length - 1] - return tail && - tail[1].type === 'linePrefix' && - tail[2].sliceSerialize(tail[1], true).length >= 4 - ? atBreak(code) - : nok(code) - } - - /** - * At a break. - * - * ```markdown - * > | aaa - * ^ ^ - * ``` - * - * @type {State} - */ - function atBreak(code) { - if (code === null) { - return after(code) - } - if (markdownLineEnding(code)) { - return effects.attempt(furtherStart, atBreak, after)(code) - } - effects.enter('codeFlowValue') - return inside(code) - } - - /** - * In code content. - * - * ```markdown - * > | aaa - * ^^^^ - * ``` - * - * @type {State} - */ - function inside(code) { - if (code === null || markdownLineEnding(code)) { - effects.exit('codeFlowValue') - return atBreak(code) - } - effects.consume(code) - return inside - } - - /** @type {State} */ - function after(code) { - effects.exit('codeIndented') - // To do: allow interrupting like `markdown-rs`. - // Feel free to interrupt. - // tokenizer.interrupt = false - return ok(code) - } -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeFurtherStart(effects, ok, nok) { - const self = this - return furtherStart - - /** - * At eol, trying to parse another indent. - * - * ```markdown - * > | aaa - * ^ - * | bbb - * ``` - * - * @type {State} - */ - function furtherStart(code) { - // To do: improve `lazy` / `pierce` handling. - // If this is a lazy line, it can’t be code. - if (self.parser.lazy[self.now().line]) { - return nok(code) - } - if (markdownLineEnding(code)) { - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return furtherStart - } - - // To do: the code here in `micromark-js` is a bit different from - // `markdown-rs` because there it can attempt spaces. - // We can’t yet. - // - // To do: use an improved `space_or_tab` function like `markdown-rs`, - // so that we can drop the next state. - return factorySpace(effects, afterPrefix, 'linePrefix', 4 + 1)(code) - } - - /** - * At start, after 1 or 4 spaces. - * - * ```markdown - * > | aaa - * ^ - * ``` - * - * @type {State} - */ - function afterPrefix(code) { - const tail = self.events[self.events.length - 1] - return tail && - tail[1].type === 'linePrefix' && - tail[2].sliceSerialize(tail[1], true).length >= 4 - ? ok(code) - : markdownLineEnding(code) - ? furtherStart(code) - : nok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/heading-atx.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').Resolver} Resolver - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').Token} Token - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - - -/** @type {Construct} */ -const headingAtx = { - name: 'headingAtx', - tokenize: tokenizeHeadingAtx, - resolve: resolveHeadingAtx -} - -/** @type {Resolver} */ -function resolveHeadingAtx(events, context) { - let contentEnd = events.length - 2 - let contentStart = 3 - /** @type {Token} */ - let content - /** @type {Token} */ - let text - - // Prefix whitespace, part of the opening. - if (events[contentStart][1].type === 'whitespace') { - contentStart += 2 - } - - // Suffix whitespace, part of the closing. - if ( - contentEnd - 2 > contentStart && - events[contentEnd][1].type === 'whitespace' - ) { - contentEnd -= 2 - } - if ( - events[contentEnd][1].type === 'atxHeadingSequence' && - (contentStart === contentEnd - 1 || - (contentEnd - 4 > contentStart && - events[contentEnd - 2][1].type === 'whitespace')) - ) { - contentEnd -= contentStart + 1 === contentEnd ? 2 : 4 - } - if (contentEnd > contentStart) { - content = { - type: 'atxHeadingText', - start: events[contentStart][1].start, - end: events[contentEnd][1].end - } - text = { - type: 'chunkText', - start: events[contentStart][1].start, - end: events[contentEnd][1].end, - contentType: 'text' - } - splice(events, contentStart, contentEnd - contentStart + 1, [ - ['enter', content, context], - ['enter', text, context], - ['exit', text, context], - ['exit', content, context] - ]) - } - return events -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeHeadingAtx(effects, ok, nok) { - let size = 0 - return start - - /** - * Start of a heading (atx). - * - * ```markdown - * > | ## aa - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - // To do: parse indent like `markdown-rs`. - effects.enter('atxHeading') - return before(code) - } - - /** - * After optional whitespace, at `#`. - * - * ```markdown - * > | ## aa - * ^ - * ``` - * - * @type {State} - */ - function before(code) { - effects.enter('atxHeadingSequence') - return sequenceOpen(code) - } - - /** - * In opening sequence. - * - * ```markdown - * > | ## aa - * ^ - * ``` - * - * @type {State} - */ - function sequenceOpen(code) { - if (code === 35 && size++ < 6) { - effects.consume(code) - return sequenceOpen - } - - // Always at least one `#`. - if (code === null || markdownLineEndingOrSpace(code)) { - effects.exit('atxHeadingSequence') - return atBreak(code) - } - return nok(code) - } - - /** - * After something, before something else. - * - * ```markdown - * > | ## aa - * ^ - * ``` - * - * @type {State} - */ - function atBreak(code) { - if (code === 35) { - effects.enter('atxHeadingSequence') - return sequenceFurther(code) - } - if (code === null || markdownLineEnding(code)) { - effects.exit('atxHeading') - // To do: interrupt like `markdown-rs`. - // // Feel free to interrupt. - // tokenizer.interrupt = false - return ok(code) - } - if (markdownSpace(code)) { - return factorySpace(effects, atBreak, 'whitespace')(code) - } - - // To do: generate `data` tokens, add the `text` token later. - // Needs edit map, see: `markdown.rs`. - effects.enter('atxHeadingText') - return data(code) - } - - /** - * In further sequence (after whitespace). - * - * Could be normal “visible” hashes in the heading or a final sequence. - * - * ```markdown - * > | ## aa ## - * ^ - * ``` - * - * @type {State} - */ - function sequenceFurther(code) { - if (code === 35) { - effects.consume(code) - return sequenceFurther - } - effects.exit('atxHeadingSequence') - return atBreak(code) - } - - /** - * In text. - * - * ```markdown - * > | ## aa - * ^ - * ``` - * - * @type {State} - */ - function data(code) { - if (code === null || code === 35 || markdownLineEndingOrSpace(code)) { - effects.exit('atxHeadingText') - return atBreak(code) - } - effects.consume(code) - return data - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/setext-underline.js -/** - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').Resolver} Resolver - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const setextUnderline = { - name: 'setextUnderline', - tokenize: tokenizeSetextUnderline, - resolveTo: resolveToSetextUnderline -} - -/** @type {Resolver} */ -function resolveToSetextUnderline(events, context) { - // To do: resolve like `markdown-rs`. - let index = events.length - /** @type {number | undefined} */ - let content - /** @type {number | undefined} */ - let text - /** @type {number | undefined} */ - let definition - - // Find the opening of the content. - // It’ll always exist: we don’t tokenize if it isn’t there. - while (index--) { - if (events[index][0] === 'enter') { - if (events[index][1].type === 'content') { - content = index - break - } - if (events[index][1].type === 'paragraph') { - text = index - } - } - // Exit - else { - if (events[index][1].type === 'content') { - // Remove the content end (if needed we’ll add it later) - events.splice(index, 1) - } - if (!definition && events[index][1].type === 'definition') { - definition = index - } - } - } - const heading = { - type: 'setextHeading', - start: Object.assign({}, events[text][1].start), - end: Object.assign({}, events[events.length - 1][1].end) - } - - // Change the paragraph to setext heading text. - events[text][1].type = 'setextHeadingText' - - // If we have definitions in the content, we’ll keep on having content, - // but we need move it. - if (definition) { - events.splice(text, 0, ['enter', heading, context]) - events.splice(definition + 1, 0, ['exit', events[content][1], context]) - events[content][1].end = Object.assign({}, events[definition][1].end) - } else { - events[content][1] = heading - } - - // Add the heading exit at the end. - events.push(['exit', heading, context]) - return events -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeSetextUnderline(effects, ok, nok) { - const self = this - /** @type {NonNullable} */ - let marker - return start - - /** - * At start of heading (setext) underline. - * - * ```markdown - * | aa - * > | == - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - let index = self.events.length - /** @type {boolean | undefined} */ - let paragraph - // Find an opening. - while (index--) { - // Skip enter/exit of line ending, line prefix, and content. - // We can now either have a definition or a paragraph. - if ( - self.events[index][1].type !== 'lineEnding' && - self.events[index][1].type !== 'linePrefix' && - self.events[index][1].type !== 'content' - ) { - paragraph = self.events[index][1].type === 'paragraph' - break - } - } - - // To do: handle lazy/pierce like `markdown-rs`. - // To do: parse indent like `markdown-rs`. - if (!self.parser.lazy[self.now().line] && (self.interrupt || paragraph)) { - effects.enter('setextHeadingLine') - marker = code - return before(code) - } - return nok(code) - } - - /** - * After optional whitespace, at `-` or `=`. - * - * ```markdown - * | aa - * > | == - * ^ - * ``` - * - * @type {State} - */ - function before(code) { - effects.enter('setextHeadingLineSequence') - return inside(code) - } - - /** - * In sequence. - * - * ```markdown - * | aa - * > | == - * ^ - * ``` - * - * @type {State} - */ - function inside(code) { - if (code === marker) { - effects.consume(code) - return inside - } - effects.exit('setextHeadingLineSequence') - return markdownSpace(code) - ? factorySpace(effects, after, 'lineSuffix')(code) - : after(code) - } - - /** - * After sequence, after optional whitespace. - * - * ```markdown - * | aa - * > | == - * ^ - * ``` - * - * @type {State} - */ - function after(code) { - if (code === null || markdownLineEnding(code)) { - effects.exit('setextHeadingLine') - return ok(code) - } - return nok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-html-tag-name/index.js -/** - * List of lowercase HTML “block” tag names. - * - * The list, when parsing HTML (flow), results in more relaxed rules (condition - * 6). - * Because they are known blocks, the HTML-like syntax doesn’t have to be - * strictly parsed. - * For tag names not in this list, a more strict algorithm (condition 7) is used - * to detect whether the HTML-like syntax is seen as HTML (flow) or not. - * - * This is copied from: - * . - * - * > 👉 **Note**: `search` was added in `CommonMark@0.31`. - */ -const htmlBlockNames = [ - 'address', - 'article', - 'aside', - 'base', - 'basefont', - 'blockquote', - 'body', - 'caption', - 'center', - 'col', - 'colgroup', - 'dd', - 'details', - 'dialog', - 'dir', - 'div', - 'dl', - 'dt', - 'fieldset', - 'figcaption', - 'figure', - 'footer', - 'form', - 'frame', - 'frameset', - 'h1', - 'h2', - 'h3', - 'h4', - 'h5', - 'h6', - 'head', - 'header', - 'hr', - 'html', - 'iframe', - 'legend', - 'li', - 'link', - 'main', - 'menu', - 'menuitem', - 'nav', - 'noframes', - 'ol', - 'optgroup', - 'option', - 'p', - 'param', - 'search', - 'section', - 'summary', - 'table', - 'tbody', - 'td', - 'tfoot', - 'th', - 'thead', - 'title', - 'tr', - 'track', - 'ul' -] - -/** - * List of lowercase HTML “raw” tag names. - * - * The list, when parsing HTML (flow), results in HTML that can include lines - * without exiting, until a closing tag also in this list is found (condition - * 1). - * - * This module is copied from: - * . - * - * > 👉 **Note**: `textarea` was added in `CommonMark@0.30`. - */ -const htmlRawNames = ['pre', 'script', 'style', 'textarea'] - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/html-flow.js -/** - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').Resolver} Resolver - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - - - -/** @type {Construct} */ -const htmlFlow = { - name: 'htmlFlow', - tokenize: tokenizeHtmlFlow, - resolveTo: resolveToHtmlFlow, - concrete: true -} - -/** @type {Construct} */ -const blankLineBefore = { - tokenize: tokenizeBlankLineBefore, - partial: true -} -const nonLazyContinuationStart = { - tokenize: tokenizeNonLazyContinuationStart, - partial: true -} - -/** @type {Resolver} */ -function resolveToHtmlFlow(events) { - let index = events.length - while (index--) { - if (events[index][0] === 'enter' && events[index][1].type === 'htmlFlow') { - break - } - } - if (index > 1 && events[index - 2][1].type === 'linePrefix') { - // Add the prefix start to the HTML token. - events[index][1].start = events[index - 2][1].start - // Add the prefix start to the HTML line token. - events[index + 1][1].start = events[index - 2][1].start - // Remove the line prefix. - events.splice(index - 2, 2) - } - return events -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeHtmlFlow(effects, ok, nok) { - const self = this - /** @type {number} */ - let marker - /** @type {boolean} */ - let closingTag - /** @type {string} */ - let buffer - /** @type {number} */ - let index - /** @type {Code} */ - let markerB - return start - - /** - * Start of HTML (flow). - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - // To do: parse indent like `markdown-rs`. - return before(code) - } - - /** - * At `<`, after optional whitespace. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function before(code) { - effects.enter('htmlFlow') - effects.enter('htmlFlowData') - effects.consume(code) - return open - } - - /** - * After `<`, at tag name or other stuff. - * - * ```markdown - * > | - * ^ - * > | - * ^ - * > | - * ^ - * ``` - * - * @type {State} - */ - function open(code) { - if (code === 33) { - effects.consume(code) - return declarationOpen - } - if (code === 47) { - effects.consume(code) - closingTag = true - return tagCloseStart - } - if (code === 63) { - effects.consume(code) - marker = 3 - // To do: - // tokenizer.concrete = true - // To do: use `markdown-rs` style interrupt. - // While we’re in an instruction instead of a declaration, we’re on a `?` - // right now, so we do need to search for `>`, similar to declarations. - return self.interrupt ? ok : continuationDeclarationInside - } - - // ASCII alphabetical. - if (asciiAlpha(code)) { - effects.consume(code) - // @ts-expect-error: not null. - buffer = String.fromCharCode(code) - return tagName - } - return nok(code) - } - - /** - * After ` | - * ^ - * > | - * ^ - * > | &<]]> - * ^ - * ``` - * - * @type {State} - */ - function declarationOpen(code) { - if (code === 45) { - effects.consume(code) - marker = 2 - return commentOpenInside - } - if (code === 91) { - effects.consume(code) - marker = 5 - index = 0 - return cdataOpenInside - } - - // ASCII alphabetical. - if (asciiAlpha(code)) { - effects.consume(code) - marker = 4 - // // Do not form containers. - // tokenizer.concrete = true - return self.interrupt ? ok : continuationDeclarationInside - } - return nok(code) - } - - /** - * After ` | - * ^ - * ``` - * - * @type {State} - */ - function commentOpenInside(code) { - if (code === 45) { - effects.consume(code) - // // Do not form containers. - // tokenizer.concrete = true - return self.interrupt ? ok : continuationDeclarationInside - } - return nok(code) - } - - /** - * After ` | &<]]> - * ^^^^^^ - * ``` - * - * @type {State} - */ - function cdataOpenInside(code) { - const value = 'CDATA[' - if (code === value.charCodeAt(index++)) { - effects.consume(code) - if (index === value.length) { - // // Do not form containers. - // tokenizer.concrete = true - return self.interrupt ? ok : continuation - } - return cdataOpenInside - } - return nok(code) - } - - /** - * After ` | - * ^ - * ``` - * - * @type {State} - */ - function tagCloseStart(code) { - if (asciiAlpha(code)) { - effects.consume(code) - // @ts-expect-error: not null. - buffer = String.fromCharCode(code) - return tagName - } - return nok(code) - } - - /** - * In tag name. - * - * ```markdown - * > | - * ^^ - * > | - * ^^ - * ``` - * - * @type {State} - */ - function tagName(code) { - if ( - code === null || - code === 47 || - code === 62 || - markdownLineEndingOrSpace(code) - ) { - const slash = code === 47 - const name = buffer.toLowerCase() - if (!slash && !closingTag && htmlRawNames.includes(name)) { - marker = 1 - // // Do not form containers. - // tokenizer.concrete = true - return self.interrupt ? ok(code) : continuation(code) - } - if (htmlBlockNames.includes(buffer.toLowerCase())) { - marker = 6 - if (slash) { - effects.consume(code) - return basicSelfClosing - } - - // // Do not form containers. - // tokenizer.concrete = true - return self.interrupt ? ok(code) : continuation(code) - } - marker = 7 - // Do not support complete HTML when interrupting. - return self.interrupt && !self.parser.lazy[self.now().line] - ? nok(code) - : closingTag - ? completeClosingTagAfter(code) - : completeAttributeNameBefore(code) - } - - // ASCII alphanumerical and `-`. - if (code === 45 || asciiAlphanumeric(code)) { - effects.consume(code) - buffer += String.fromCharCode(code) - return tagName - } - return nok(code) - } - - /** - * After closing slash of a basic tag name. - * - * ```markdown - * > |
    - * ^ - * ``` - * - * @type {State} - */ - function basicSelfClosing(code) { - if (code === 62) { - effects.consume(code) - // // Do not form containers. - // tokenizer.concrete = true - return self.interrupt ? ok : continuation - } - return nok(code) - } - - /** - * After closing slash of a complete tag name. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function completeClosingTagAfter(code) { - if (markdownSpace(code)) { - effects.consume(code) - return completeClosingTagAfter - } - return completeEnd(code) - } - - /** - * At an attribute name. - * - * At first, this state is used after a complete tag name, after whitespace, - * where it expects optional attributes or the end of the tag. - * It is also reused after attributes, when expecting more optional - * attributes. - * - * ```markdown - * > | - * ^ - * > | - * ^ - * > | - * ^ - * > | - * ^ - * > | - * ^ - * ``` - * - * @type {State} - */ - function completeAttributeNameBefore(code) { - if (code === 47) { - effects.consume(code) - return completeEnd - } - - // ASCII alphanumerical and `:` and `_`. - if (code === 58 || code === 95 || asciiAlpha(code)) { - effects.consume(code) - return completeAttributeName - } - if (markdownSpace(code)) { - effects.consume(code) - return completeAttributeNameBefore - } - return completeEnd(code) - } - - /** - * In attribute name. - * - * ```markdown - * > | - * ^ - * > | - * ^ - * > | - * ^ - * ``` - * - * @type {State} - */ - function completeAttributeName(code) { - // ASCII alphanumerical and `-`, `.`, `:`, and `_`. - if ( - code === 45 || - code === 46 || - code === 58 || - code === 95 || - asciiAlphanumeric(code) - ) { - effects.consume(code) - return completeAttributeName - } - return completeAttributeNameAfter(code) - } - - /** - * After attribute name, at an optional initializer, the end of the tag, or - * whitespace. - * - * ```markdown - * > | - * ^ - * > | - * ^ - * ``` - * - * @type {State} - */ - function completeAttributeNameAfter(code) { - if (code === 61) { - effects.consume(code) - return completeAttributeValueBefore - } - if (markdownSpace(code)) { - effects.consume(code) - return completeAttributeNameAfter - } - return completeAttributeNameBefore(code) - } - - /** - * Before unquoted, double quoted, or single quoted attribute value, allowing - * whitespace. - * - * ```markdown - * > | - * ^ - * > | - * ^ - * ``` - * - * @type {State} - */ - function completeAttributeValueBefore(code) { - if ( - code === null || - code === 60 || - code === 61 || - code === 62 || - code === 96 - ) { - return nok(code) - } - if (code === 34 || code === 39) { - effects.consume(code) - markerB = code - return completeAttributeValueQuoted - } - if (markdownSpace(code)) { - effects.consume(code) - return completeAttributeValueBefore - } - return completeAttributeValueUnquoted(code) - } - - /** - * In double or single quoted attribute value. - * - * ```markdown - * > | - * ^ - * > | - * ^ - * ``` - * - * @type {State} - */ - function completeAttributeValueQuoted(code) { - if (code === markerB) { - effects.consume(code) - markerB = null - return completeAttributeValueQuotedAfter - } - if (code === null || markdownLineEnding(code)) { - return nok(code) - } - effects.consume(code) - return completeAttributeValueQuoted - } - - /** - * In unquoted attribute value. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function completeAttributeValueUnquoted(code) { - if ( - code === null || - code === 34 || - code === 39 || - code === 47 || - code === 60 || - code === 61 || - code === 62 || - code === 96 || - markdownLineEndingOrSpace(code) - ) { - return completeAttributeNameAfter(code) - } - effects.consume(code) - return completeAttributeValueUnquoted - } - - /** - * After double or single quoted attribute value, before whitespace or the - * end of the tag. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function completeAttributeValueQuotedAfter(code) { - if (code === 47 || code === 62 || markdownSpace(code)) { - return completeAttributeNameBefore(code) - } - return nok(code) - } - - /** - * In certain circumstances of a complete tag where only an `>` is allowed. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function completeEnd(code) { - if (code === 62) { - effects.consume(code) - return completeAfter - } - return nok(code) - } - - /** - * After `>` in a complete tag. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function completeAfter(code) { - if (code === null || markdownLineEnding(code)) { - // // Do not form containers. - // tokenizer.concrete = true - return continuation(code) - } - if (markdownSpace(code)) { - effects.consume(code) - return completeAfter - } - return nok(code) - } - - /** - * In continuation of any HTML kind. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function continuation(code) { - if (code === 45 && marker === 2) { - effects.consume(code) - return continuationCommentInside - } - if (code === 60 && marker === 1) { - effects.consume(code) - return continuationRawTagOpen - } - if (code === 62 && marker === 4) { - effects.consume(code) - return continuationClose - } - if (code === 63 && marker === 3) { - effects.consume(code) - return continuationDeclarationInside - } - if (code === 93 && marker === 5) { - effects.consume(code) - return continuationCdataInside - } - if (markdownLineEnding(code) && (marker === 6 || marker === 7)) { - effects.exit('htmlFlowData') - return effects.check( - blankLineBefore, - continuationAfter, - continuationStart - )(code) - } - if (code === null || markdownLineEnding(code)) { - effects.exit('htmlFlowData') - return continuationStart(code) - } - effects.consume(code) - return continuation - } - - /** - * In continuation, at eol. - * - * ```markdown - * > | - * ^ - * | asd - * ``` - * - * @type {State} - */ - function continuationStart(code) { - return effects.check( - nonLazyContinuationStart, - continuationStartNonLazy, - continuationAfter - )(code) - } - - /** - * In continuation, at eol, before non-lazy content. - * - * ```markdown - * > | - * ^ - * | asd - * ``` - * - * @type {State} - */ - function continuationStartNonLazy(code) { - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return continuationBefore - } - - /** - * In continuation, before non-lazy content. - * - * ```markdown - * | - * > | asd - * ^ - * ``` - * - * @type {State} - */ - function continuationBefore(code) { - if (code === null || markdownLineEnding(code)) { - return continuationStart(code) - } - effects.enter('htmlFlowData') - return continuation(code) - } - - /** - * In comment continuation, after one `-`, expecting another. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function continuationCommentInside(code) { - if (code === 45) { - effects.consume(code) - return continuationDeclarationInside - } - return continuation(code) - } - - /** - * In raw continuation, after `<`, at `/`. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function continuationRawTagOpen(code) { - if (code === 47) { - effects.consume(code) - buffer = '' - return continuationRawEndTag - } - return continuation(code) - } - - /** - * In raw continuation, after ` | - * ^^^^^^ - * ``` - * - * @type {State} - */ - function continuationRawEndTag(code) { - if (code === 62) { - const name = buffer.toLowerCase() - if (htmlRawNames.includes(name)) { - effects.consume(code) - return continuationClose - } - return continuation(code) - } - if (asciiAlpha(code) && buffer.length < 8) { - effects.consume(code) - // @ts-expect-error: not null. - buffer += String.fromCharCode(code) - return continuationRawEndTag - } - return continuation(code) - } - - /** - * In cdata continuation, after `]`, expecting `]>`. - * - * ```markdown - * > | &<]]> - * ^ - * ``` - * - * @type {State} - */ - function continuationCdataInside(code) { - if (code === 93) { - effects.consume(code) - return continuationDeclarationInside - } - return continuation(code) - } - - /** - * In declaration or instruction continuation, at `>`. - * - * ```markdown - * > | - * ^ - * > | - * ^ - * > | - * ^ - * > | - * ^ - * > | &<]]> - * ^ - * ``` - * - * @type {State} - */ - function continuationDeclarationInside(code) { - if (code === 62) { - effects.consume(code) - return continuationClose - } - - // More dashes. - if (code === 45 && marker === 2) { - effects.consume(code) - return continuationDeclarationInside - } - return continuation(code) - } - - /** - * In closed continuation: everything we get until the eol/eof is part of it. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function continuationClose(code) { - if (code === null || markdownLineEnding(code)) { - effects.exit('htmlFlowData') - return continuationAfter(code) - } - effects.consume(code) - return continuationClose - } - - /** - * Done. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function continuationAfter(code) { - effects.exit('htmlFlow') - // // Feel free to interrupt. - // tokenizer.interrupt = false - // // No longer concrete. - // tokenizer.concrete = false - return ok(code) - } -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeNonLazyContinuationStart(effects, ok, nok) { - const self = this - return start - - /** - * At eol, before continuation. - * - * ```markdown - * > | * ```js - * ^ - * | b - * ``` - * - * @type {State} - */ - function start(code) { - if (markdownLineEnding(code)) { - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return after - } - return nok(code) - } - - /** - * A continuation. - * - * ```markdown - * | * ```js - * > | b - * ^ - * ``` - * - * @type {State} - */ - function after(code) { - return self.parser.lazy[self.now().line] ? nok(code) : ok(code) - } -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeBlankLineBefore(effects, ok, nok) { - return start - - /** - * Before eol, expecting blank line. - * - * ```markdown - * > |
    - * ^ - * | - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return effects.attempt(blankLine, ok, nok) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/code-fenced.js -/** - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const nonLazyContinuation = { - tokenize: tokenizeNonLazyContinuation, - partial: true -} - -/** @type {Construct} */ -const codeFenced = { - name: 'codeFenced', - tokenize: tokenizeCodeFenced, - concrete: true -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeCodeFenced(effects, ok, nok) { - const self = this - /** @type {Construct} */ - const closeStart = { - tokenize: tokenizeCloseStart, - partial: true - } - let initialPrefix = 0 - let sizeOpen = 0 - /** @type {NonNullable} */ - let marker - return start - - /** - * Start of code. - * - * ```markdown - * > | ~~~js - * ^ - * | alert(1) - * | ~~~ - * ``` - * - * @type {State} - */ - function start(code) { - // To do: parse whitespace like `markdown-rs`. - return beforeSequenceOpen(code) - } - - /** - * In opening fence, after prefix, at sequence. - * - * ```markdown - * > | ~~~js - * ^ - * | alert(1) - * | ~~~ - * ``` - * - * @type {State} - */ - function beforeSequenceOpen(code) { - const tail = self.events[self.events.length - 1] - initialPrefix = - tail && tail[1].type === 'linePrefix' - ? tail[2].sliceSerialize(tail[1], true).length - : 0 - marker = code - effects.enter('codeFenced') - effects.enter('codeFencedFence') - effects.enter('codeFencedFenceSequence') - return sequenceOpen(code) - } - - /** - * In opening fence sequence. - * - * ```markdown - * > | ~~~js - * ^ - * | alert(1) - * | ~~~ - * ``` - * - * @type {State} - */ - function sequenceOpen(code) { - if (code === marker) { - sizeOpen++ - effects.consume(code) - return sequenceOpen - } - if (sizeOpen < 3) { - return nok(code) - } - effects.exit('codeFencedFenceSequence') - return markdownSpace(code) - ? factorySpace(effects, infoBefore, 'whitespace')(code) - : infoBefore(code) - } - - /** - * In opening fence, after the sequence (and optional whitespace), before info. - * - * ```markdown - * > | ~~~js - * ^ - * | alert(1) - * | ~~~ - * ``` - * - * @type {State} - */ - function infoBefore(code) { - if (code === null || markdownLineEnding(code)) { - effects.exit('codeFencedFence') - return self.interrupt - ? ok(code) - : effects.check(nonLazyContinuation, atNonLazyBreak, after)(code) - } - effects.enter('codeFencedFenceInfo') - effects.enter('chunkString', { - contentType: 'string' - }) - return info(code) - } - - /** - * In info. - * - * ```markdown - * > | ~~~js - * ^ - * | alert(1) - * | ~~~ - * ``` - * - * @type {State} - */ - function info(code) { - if (code === null || markdownLineEnding(code)) { - effects.exit('chunkString') - effects.exit('codeFencedFenceInfo') - return infoBefore(code) - } - if (markdownSpace(code)) { - effects.exit('chunkString') - effects.exit('codeFencedFenceInfo') - return factorySpace(effects, metaBefore, 'whitespace')(code) - } - if (code === 96 && code === marker) { - return nok(code) - } - effects.consume(code) - return info - } - - /** - * In opening fence, after info and whitespace, before meta. - * - * ```markdown - * > | ~~~js eval - * ^ - * | alert(1) - * | ~~~ - * ``` - * - * @type {State} - */ - function metaBefore(code) { - if (code === null || markdownLineEnding(code)) { - return infoBefore(code) - } - effects.enter('codeFencedFenceMeta') - effects.enter('chunkString', { - contentType: 'string' - }) - return meta(code) - } - - /** - * In meta. - * - * ```markdown - * > | ~~~js eval - * ^ - * | alert(1) - * | ~~~ - * ``` - * - * @type {State} - */ - function meta(code) { - if (code === null || markdownLineEnding(code)) { - effects.exit('chunkString') - effects.exit('codeFencedFenceMeta') - return infoBefore(code) - } - if (code === 96 && code === marker) { - return nok(code) - } - effects.consume(code) - return meta - } - - /** - * At eol/eof in code, before a non-lazy closing fence or content. - * - * ```markdown - * > | ~~~js - * ^ - * > | alert(1) - * ^ - * | ~~~ - * ``` - * - * @type {State} - */ - function atNonLazyBreak(code) { - return effects.attempt(closeStart, after, contentBefore)(code) - } - - /** - * Before code content, not a closing fence, at eol. - * - * ```markdown - * | ~~~js - * > | alert(1) - * ^ - * | ~~~ - * ``` - * - * @type {State} - */ - function contentBefore(code) { - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return contentStart - } - - /** - * Before code content, not a closing fence. - * - * ```markdown - * | ~~~js - * > | alert(1) - * ^ - * | ~~~ - * ``` - * - * @type {State} - */ - function contentStart(code) { - return initialPrefix > 0 && markdownSpace(code) - ? factorySpace( - effects, - beforeContentChunk, - 'linePrefix', - initialPrefix + 1 - )(code) - : beforeContentChunk(code) - } - - /** - * Before code content, after optional prefix. - * - * ```markdown - * | ~~~js - * > | alert(1) - * ^ - * | ~~~ - * ``` - * - * @type {State} - */ - function beforeContentChunk(code) { - if (code === null || markdownLineEnding(code)) { - return effects.check(nonLazyContinuation, atNonLazyBreak, after)(code) - } - effects.enter('codeFlowValue') - return contentChunk(code) - } - - /** - * In code content. - * - * ```markdown - * | ~~~js - * > | alert(1) - * ^^^^^^^^ - * | ~~~ - * ``` - * - * @type {State} - */ - function contentChunk(code) { - if (code === null || markdownLineEnding(code)) { - effects.exit('codeFlowValue') - return beforeContentChunk(code) - } - effects.consume(code) - return contentChunk - } - - /** - * After code. - * - * ```markdown - * | ~~~js - * | alert(1) - * > | ~~~ - * ^ - * ``` - * - * @type {State} - */ - function after(code) { - effects.exit('codeFenced') - return ok(code) - } - - /** - * @this {TokenizeContext} - * @type {Tokenizer} - */ - function tokenizeCloseStart(effects, ok, nok) { - let size = 0 - return startBefore - - /** - * - * - * @type {State} - */ - function startBefore(code) { - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return start - } - - /** - * Before closing fence, at optional whitespace. - * - * ```markdown - * | ~~~js - * | alert(1) - * > | ~~~ - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - // Always populated by defaults. - - // To do: `enter` here or in next state? - effects.enter('codeFencedFence') - return markdownSpace(code) - ? factorySpace( - effects, - beforeSequenceClose, - 'linePrefix', - self.parser.constructs.disable.null.includes('codeIndented') - ? undefined - : 4 - )(code) - : beforeSequenceClose(code) - } - - /** - * In closing fence, after optional whitespace, at sequence. - * - * ```markdown - * | ~~~js - * | alert(1) - * > | ~~~ - * ^ - * ``` - * - * @type {State} - */ - function beforeSequenceClose(code) { - if (code === marker) { - effects.enter('codeFencedFenceSequence') - return sequenceClose(code) - } - return nok(code) - } - - /** - * In closing fence sequence. - * - * ```markdown - * | ~~~js - * | alert(1) - * > | ~~~ - * ^ - * ``` - * - * @type {State} - */ - function sequenceClose(code) { - if (code === marker) { - size++ - effects.consume(code) - return sequenceClose - } - if (size >= sizeOpen) { - effects.exit('codeFencedFenceSequence') - return markdownSpace(code) - ? factorySpace(effects, sequenceCloseAfter, 'whitespace')(code) - : sequenceCloseAfter(code) - } - return nok(code) - } - - /** - * After closing fence sequence, after optional whitespace. - * - * ```markdown - * | ~~~js - * | alert(1) - * > | ~~~ - * ^ - * ``` - * - * @type {State} - */ - function sequenceCloseAfter(code) { - if (code === null || markdownLineEnding(code)) { - effects.exit('codeFencedFence') - return ok(code) - } - return nok(code) - } - } -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeNonLazyContinuation(effects, ok, nok) { - const self = this - return start - - /** - * - * - * @type {State} - */ - function start(code) { - if (code === null) { - return nok(code) - } - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return lineStart - } - - /** - * - * - * @type {State} - */ - function lineStart(code) { - return self.parser.lazy[self.now().line] ? nok(code) : ok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/character-entities/index.js -/** - * Map of named character references. - * - * @type {Record} - */ -const characterEntities = { - AElig: 'Æ', - AMP: '&', - Aacute: 'Á', - Abreve: 'Ă', - Acirc: 'Â', - Acy: 'А', - Afr: '𝔄', - Agrave: 'À', - Alpha: 'Α', - Amacr: 'Ā', - And: '⩓', - Aogon: 'Ą', - Aopf: '𝔸', - ApplyFunction: '⁡', - Aring: 'Å', - Ascr: '𝒜', - Assign: '≔', - Atilde: 'Ã', - Auml: 'Ä', - Backslash: '∖', - Barv: '⫧', - Barwed: '⌆', - Bcy: 'Б', - Because: '∵', - Bernoullis: 'ℬ', - Beta: 'Β', - Bfr: '𝔅', - Bopf: '𝔹', - Breve: '˘', - Bscr: 'ℬ', - Bumpeq: '≎', - CHcy: 'Ч', - COPY: '©', - Cacute: 'Ć', - Cap: '⋒', - CapitalDifferentialD: 'ⅅ', - Cayleys: 'ℭ', - Ccaron: 'Č', - Ccedil: 'Ç', - Ccirc: 'Ĉ', - Cconint: '∰', - Cdot: 'Ċ', - Cedilla: '¸', - CenterDot: '·', - Cfr: 'ℭ', - Chi: 'Χ', - CircleDot: '⊙', - CircleMinus: '⊖', - CirclePlus: '⊕', - CircleTimes: '⊗', - ClockwiseContourIntegral: '∲', - CloseCurlyDoubleQuote: '”', - CloseCurlyQuote: '’', - Colon: '∷', - Colone: '⩴', - Congruent: '≡', - Conint: '∯', - ContourIntegral: '∮', - Copf: 'ℂ', - Coproduct: '∐', - CounterClockwiseContourIntegral: '∳', - Cross: '⨯', - Cscr: '𝒞', - Cup: '⋓', - CupCap: '≍', - DD: 'ⅅ', - DDotrahd: '⤑', - DJcy: 'Ђ', - DScy: 'Ѕ', - DZcy: 'Џ', - Dagger: '‡', - Darr: '↡', - Dashv: '⫤', - Dcaron: 'Ď', - Dcy: 'Д', - Del: '∇', - Delta: 'Δ', - Dfr: '𝔇', - DiacriticalAcute: '´', - DiacriticalDot: '˙', - DiacriticalDoubleAcute: '˝', - DiacriticalGrave: '`', - DiacriticalTilde: '˜', - Diamond: '⋄', - DifferentialD: 'ⅆ', - Dopf: '𝔻', - Dot: '¨', - DotDot: '⃜', - DotEqual: '≐', - DoubleContourIntegral: '∯', - DoubleDot: '¨', - DoubleDownArrow: '⇓', - DoubleLeftArrow: '⇐', - DoubleLeftRightArrow: '⇔', - DoubleLeftTee: '⫤', - DoubleLongLeftArrow: '⟸', - DoubleLongLeftRightArrow: '⟺', - DoubleLongRightArrow: '⟹', - DoubleRightArrow: '⇒', - DoubleRightTee: '⊨', - DoubleUpArrow: '⇑', - DoubleUpDownArrow: '⇕', - DoubleVerticalBar: '∥', - DownArrow: '↓', - DownArrowBar: '⤓', - DownArrowUpArrow: '⇵', - DownBreve: '̑', - DownLeftRightVector: '⥐', - DownLeftTeeVector: '⥞', - DownLeftVector: '↽', - DownLeftVectorBar: '⥖', - DownRightTeeVector: '⥟', - DownRightVector: '⇁', - DownRightVectorBar: '⥗', - DownTee: '⊤', - DownTeeArrow: '↧', - Downarrow: '⇓', - Dscr: '𝒟', - Dstrok: 'Đ', - ENG: 'Ŋ', - ETH: 'Ð', - Eacute: 'É', - Ecaron: 'Ě', - Ecirc: 'Ê', - Ecy: 'Э', - Edot: 'Ė', - Efr: '𝔈', - Egrave: 'È', - Element: '∈', - Emacr: 'Ē', - EmptySmallSquare: '◻', - EmptyVerySmallSquare: '▫', - Eogon: 'Ę', - Eopf: '𝔼', - Epsilon: 'Ε', - Equal: '⩵', - EqualTilde: '≂', - Equilibrium: '⇌', - Escr: 'ℰ', - Esim: '⩳', - Eta: 'Η', - Euml: 'Ë', - Exists: '∃', - ExponentialE: 'ⅇ', - Fcy: 'Ф', - Ffr: '𝔉', - FilledSmallSquare: '◼', - FilledVerySmallSquare: '▪', - Fopf: '𝔽', - ForAll: '∀', - Fouriertrf: 'ℱ', - Fscr: 'ℱ', - GJcy: 'Ѓ', - GT: '>', - Gamma: 'Γ', - Gammad: 'Ϝ', - Gbreve: 'Ğ', - Gcedil: 'Ģ', - Gcirc: 'Ĝ', - Gcy: 'Г', - Gdot: 'Ġ', - Gfr: '𝔊', - Gg: '⋙', - Gopf: '𝔾', - GreaterEqual: '≥', - GreaterEqualLess: '⋛', - GreaterFullEqual: '≧', - GreaterGreater: '⪢', - GreaterLess: '≷', - GreaterSlantEqual: '⩾', - GreaterTilde: '≳', - Gscr: '𝒢', - Gt: '≫', - HARDcy: 'Ъ', - Hacek: 'ˇ', - Hat: '^', - Hcirc: 'Ĥ', - Hfr: 'ℌ', - HilbertSpace: 'ℋ', - Hopf: 'ℍ', - HorizontalLine: '─', - Hscr: 'ℋ', - Hstrok: 'Ħ', - HumpDownHump: '≎', - HumpEqual: '≏', - IEcy: 'Е', - IJlig: 'IJ', - IOcy: 'Ё', - Iacute: 'Í', - Icirc: 'Î', - Icy: 'И', - Idot: 'İ', - Ifr: 'ℑ', - Igrave: 'Ì', - Im: 'ℑ', - Imacr: 'Ī', - ImaginaryI: 'ⅈ', - Implies: '⇒', - Int: '∬', - Integral: '∫', - Intersection: '⋂', - InvisibleComma: '⁣', - InvisibleTimes: '⁢', - Iogon: 'Į', - Iopf: '𝕀', - Iota: 'Ι', - Iscr: 'ℐ', - Itilde: 'Ĩ', - Iukcy: 'І', - Iuml: 'Ï', - Jcirc: 'Ĵ', - Jcy: 'Й', - Jfr: '𝔍', - Jopf: '𝕁', - Jscr: '𝒥', - Jsercy: 'Ј', - Jukcy: 'Є', - KHcy: 'Х', - KJcy: 'Ќ', - Kappa: 'Κ', - Kcedil: 'Ķ', - Kcy: 'К', - Kfr: '𝔎', - Kopf: '𝕂', - Kscr: '𝒦', - LJcy: 'Љ', - LT: '<', - Lacute: 'Ĺ', - Lambda: 'Λ', - Lang: '⟪', - Laplacetrf: 'ℒ', - Larr: '↞', - Lcaron: 'Ľ', - Lcedil: 'Ļ', - Lcy: 'Л', - LeftAngleBracket: '⟨', - LeftArrow: '←', - LeftArrowBar: '⇤', - LeftArrowRightArrow: '⇆', - LeftCeiling: '⌈', - LeftDoubleBracket: '⟦', - LeftDownTeeVector: '⥡', - LeftDownVector: '⇃', - LeftDownVectorBar: '⥙', - LeftFloor: '⌊', - LeftRightArrow: '↔', - LeftRightVector: '⥎', - LeftTee: '⊣', - LeftTeeArrow: '↤', - LeftTeeVector: '⥚', - LeftTriangle: '⊲', - LeftTriangleBar: '⧏', - LeftTriangleEqual: '⊴', - LeftUpDownVector: '⥑', - LeftUpTeeVector: '⥠', - LeftUpVector: '↿', - LeftUpVectorBar: '⥘', - LeftVector: '↼', - LeftVectorBar: '⥒', - Leftarrow: '⇐', - Leftrightarrow: '⇔', - LessEqualGreater: '⋚', - LessFullEqual: '≦', - LessGreater: '≶', - LessLess: '⪡', - LessSlantEqual: '⩽', - LessTilde: '≲', - Lfr: '𝔏', - Ll: '⋘', - Lleftarrow: '⇚', - Lmidot: 'Ŀ', - LongLeftArrow: '⟵', - LongLeftRightArrow: '⟷', - LongRightArrow: '⟶', - Longleftarrow: '⟸', - Longleftrightarrow: '⟺', - Longrightarrow: '⟹', - Lopf: '𝕃', - LowerLeftArrow: '↙', - LowerRightArrow: '↘', - Lscr: 'ℒ', - Lsh: '↰', - Lstrok: 'Ł', - Lt: '≪', - Map: '⤅', - Mcy: 'М', - MediumSpace: ' ', - Mellintrf: 'ℳ', - Mfr: '𝔐', - MinusPlus: '∓', - Mopf: '𝕄', - Mscr: 'ℳ', - Mu: 'Μ', - NJcy: 'Њ', - Nacute: 'Ń', - Ncaron: 'Ň', - Ncedil: 'Ņ', - Ncy: 'Н', - NegativeMediumSpace: '​', - NegativeThickSpace: '​', - NegativeThinSpace: '​', - NegativeVeryThinSpace: '​', - NestedGreaterGreater: '≫', - NestedLessLess: '≪', - NewLine: '\n', - Nfr: '𝔑', - NoBreak: '⁠', - NonBreakingSpace: ' ', - Nopf: 'ℕ', - Not: '⫬', - NotCongruent: '≢', - NotCupCap: '≭', - NotDoubleVerticalBar: '∦', - NotElement: '∉', - NotEqual: '≠', - NotEqualTilde: '≂̸', - NotExists: '∄', - NotGreater: '≯', - NotGreaterEqual: '≱', - NotGreaterFullEqual: '≧̸', - NotGreaterGreater: '≫̸', - NotGreaterLess: '≹', - NotGreaterSlantEqual: '⩾̸', - NotGreaterTilde: '≵', - NotHumpDownHump: '≎̸', - NotHumpEqual: '≏̸', - NotLeftTriangle: '⋪', - NotLeftTriangleBar: '⧏̸', - NotLeftTriangleEqual: '⋬', - NotLess: '≮', - NotLessEqual: '≰', - NotLessGreater: '≸', - NotLessLess: '≪̸', - NotLessSlantEqual: '⩽̸', - NotLessTilde: '≴', - NotNestedGreaterGreater: '⪢̸', - NotNestedLessLess: '⪡̸', - NotPrecedes: '⊀', - NotPrecedesEqual: '⪯̸', - NotPrecedesSlantEqual: '⋠', - NotReverseElement: '∌', - NotRightTriangle: '⋫', - NotRightTriangleBar: '⧐̸', - NotRightTriangleEqual: '⋭', - NotSquareSubset: '⊏̸', - NotSquareSubsetEqual: '⋢', - NotSquareSuperset: '⊐̸', - NotSquareSupersetEqual: '⋣', - NotSubset: '⊂⃒', - NotSubsetEqual: '⊈', - NotSucceeds: '⊁', - NotSucceedsEqual: '⪰̸', - NotSucceedsSlantEqual: '⋡', - NotSucceedsTilde: '≿̸', - NotSuperset: '⊃⃒', - NotSupersetEqual: '⊉', - NotTilde: '≁', - NotTildeEqual: '≄', - NotTildeFullEqual: '≇', - NotTildeTilde: '≉', - NotVerticalBar: '∤', - Nscr: '𝒩', - Ntilde: 'Ñ', - Nu: 'Ν', - OElig: 'Œ', - Oacute: 'Ó', - Ocirc: 'Ô', - Ocy: 'О', - Odblac: 'Ő', - Ofr: '𝔒', - Ograve: 'Ò', - Omacr: 'Ō', - Omega: 'Ω', - Omicron: 'Ο', - Oopf: '𝕆', - OpenCurlyDoubleQuote: '“', - OpenCurlyQuote: '‘', - Or: '⩔', - Oscr: '𝒪', - Oslash: 'Ø', - Otilde: 'Õ', - Otimes: '⨷', - Ouml: 'Ö', - OverBar: '‾', - OverBrace: '⏞', - OverBracket: '⎴', - OverParenthesis: '⏜', - PartialD: '∂', - Pcy: 'П', - Pfr: '𝔓', - Phi: 'Φ', - Pi: 'Π', - PlusMinus: '±', - Poincareplane: 'ℌ', - Popf: 'ℙ', - Pr: '⪻', - Precedes: '≺', - PrecedesEqual: '⪯', - PrecedesSlantEqual: '≼', - PrecedesTilde: '≾', - Prime: '″', - Product: '∏', - Proportion: '∷', - Proportional: '∝', - Pscr: '𝒫', - Psi: 'Ψ', - QUOT: '"', - Qfr: '𝔔', - Qopf: 'ℚ', - Qscr: '𝒬', - RBarr: '⤐', - REG: '®', - Racute: 'Ŕ', - Rang: '⟫', - Rarr: '↠', - Rarrtl: '⤖', - Rcaron: 'Ř', - Rcedil: 'Ŗ', - Rcy: 'Р', - Re: 'ℜ', - ReverseElement: '∋', - ReverseEquilibrium: '⇋', - ReverseUpEquilibrium: '⥯', - Rfr: 'ℜ', - Rho: 'Ρ', - RightAngleBracket: '⟩', - RightArrow: '→', - RightArrowBar: '⇥', - RightArrowLeftArrow: '⇄', - RightCeiling: '⌉', - RightDoubleBracket: '⟧', - RightDownTeeVector: '⥝', - RightDownVector: '⇂', - RightDownVectorBar: '⥕', - RightFloor: '⌋', - RightTee: '⊢', - RightTeeArrow: '↦', - RightTeeVector: '⥛', - RightTriangle: '⊳', - RightTriangleBar: '⧐', - RightTriangleEqual: '⊵', - RightUpDownVector: '⥏', - RightUpTeeVector: '⥜', - RightUpVector: '↾', - RightUpVectorBar: '⥔', - RightVector: '⇀', - RightVectorBar: '⥓', - Rightarrow: '⇒', - Ropf: 'ℝ', - RoundImplies: '⥰', - Rrightarrow: '⇛', - Rscr: 'ℛ', - Rsh: '↱', - RuleDelayed: '⧴', - SHCHcy: 'Щ', - SHcy: 'Ш', - SOFTcy: 'Ь', - Sacute: 'Ś', - Sc: '⪼', - Scaron: 'Š', - Scedil: 'Ş', - Scirc: 'Ŝ', - Scy: 'С', - Sfr: '𝔖', - ShortDownArrow: '↓', - ShortLeftArrow: '←', - ShortRightArrow: '→', - ShortUpArrow: '↑', - Sigma: 'Σ', - SmallCircle: '∘', - Sopf: '𝕊', - Sqrt: '√', - Square: '□', - SquareIntersection: '⊓', - SquareSubset: '⊏', - SquareSubsetEqual: '⊑', - SquareSuperset: '⊐', - SquareSupersetEqual: '⊒', - SquareUnion: '⊔', - Sscr: '𝒮', - Star: '⋆', - Sub: '⋐', - Subset: '⋐', - SubsetEqual: '⊆', - Succeeds: '≻', - SucceedsEqual: '⪰', - SucceedsSlantEqual: '≽', - SucceedsTilde: '≿', - SuchThat: '∋', - Sum: '∑', - Sup: '⋑', - Superset: '⊃', - SupersetEqual: '⊇', - Supset: '⋑', - THORN: 'Þ', - TRADE: '™', - TSHcy: 'Ћ', - TScy: 'Ц', - Tab: '\t', - Tau: 'Τ', - Tcaron: 'Ť', - Tcedil: 'Ţ', - Tcy: 'Т', - Tfr: '𝔗', - Therefore: '∴', - Theta: 'Θ', - ThickSpace: '  ', - ThinSpace: ' ', - Tilde: '∼', - TildeEqual: '≃', - TildeFullEqual: '≅', - TildeTilde: '≈', - Topf: '𝕋', - TripleDot: '⃛', - Tscr: '𝒯', - Tstrok: 'Ŧ', - Uacute: 'Ú', - Uarr: '↟', - Uarrocir: '⥉', - Ubrcy: 'Ў', - Ubreve: 'Ŭ', - Ucirc: 'Û', - Ucy: 'У', - Udblac: 'Ű', - Ufr: '𝔘', - Ugrave: 'Ù', - Umacr: 'Ū', - UnderBar: '_', - UnderBrace: '⏟', - UnderBracket: '⎵', - UnderParenthesis: '⏝', - Union: '⋃', - UnionPlus: '⊎', - Uogon: 'Ų', - Uopf: '𝕌', - UpArrow: '↑', - UpArrowBar: '⤒', - UpArrowDownArrow: '⇅', - UpDownArrow: '↕', - UpEquilibrium: '⥮', - UpTee: '⊥', - UpTeeArrow: '↥', - Uparrow: '⇑', - Updownarrow: '⇕', - UpperLeftArrow: '↖', - UpperRightArrow: '↗', - Upsi: 'ϒ', - Upsilon: 'Υ', - Uring: 'Ů', - Uscr: '𝒰', - Utilde: 'Ũ', - Uuml: 'Ü', - VDash: '⊫', - Vbar: '⫫', - Vcy: 'В', - Vdash: '⊩', - Vdashl: '⫦', - Vee: '⋁', - Verbar: '‖', - Vert: '‖', - VerticalBar: '∣', - VerticalLine: '|', - VerticalSeparator: '❘', - VerticalTilde: '≀', - VeryThinSpace: ' ', - Vfr: '𝔙', - Vopf: '𝕍', - Vscr: '𝒱', - Vvdash: '⊪', - Wcirc: 'Ŵ', - Wedge: '⋀', - Wfr: '𝔚', - Wopf: '𝕎', - Wscr: '𝒲', - Xfr: '𝔛', - Xi: 'Ξ', - Xopf: '𝕏', - Xscr: '𝒳', - YAcy: 'Я', - YIcy: 'Ї', - YUcy: 'Ю', - Yacute: 'Ý', - Ycirc: 'Ŷ', - Ycy: 'Ы', - Yfr: '𝔜', - Yopf: '𝕐', - Yscr: '𝒴', - Yuml: 'Ÿ', - ZHcy: 'Ж', - Zacute: 'Ź', - Zcaron: 'Ž', - Zcy: 'З', - Zdot: 'Ż', - ZeroWidthSpace: '​', - Zeta: 'Ζ', - Zfr: 'ℨ', - Zopf: 'ℤ', - Zscr: '𝒵', - aacute: 'á', - abreve: 'ă', - ac: '∾', - acE: '∾̳', - acd: '∿', - acirc: 'â', - acute: '´', - acy: 'а', - aelig: 'æ', - af: '⁡', - afr: '𝔞', - agrave: 'à', - alefsym: 'ℵ', - aleph: 'ℵ', - alpha: 'α', - amacr: 'ā', - amalg: '⨿', - amp: '&', - and: '∧', - andand: '⩕', - andd: '⩜', - andslope: '⩘', - andv: '⩚', - ang: '∠', - ange: '⦤', - angle: '∠', - angmsd: '∡', - angmsdaa: '⦨', - angmsdab: '⦩', - angmsdac: '⦪', - angmsdad: '⦫', - angmsdae: '⦬', - angmsdaf: '⦭', - angmsdag: '⦮', - angmsdah: '⦯', - angrt: '∟', - angrtvb: '⊾', - angrtvbd: '⦝', - angsph: '∢', - angst: 'Å', - angzarr: '⍼', - aogon: 'ą', - aopf: '𝕒', - ap: '≈', - apE: '⩰', - apacir: '⩯', - ape: '≊', - apid: '≋', - apos: "'", - approx: '≈', - approxeq: '≊', - aring: 'å', - ascr: '𝒶', - ast: '*', - asymp: '≈', - asympeq: '≍', - atilde: 'ã', - auml: 'ä', - awconint: '∳', - awint: '⨑', - bNot: '⫭', - backcong: '≌', - backepsilon: '϶', - backprime: '‵', - backsim: '∽', - backsimeq: '⋍', - barvee: '⊽', - barwed: '⌅', - barwedge: '⌅', - bbrk: '⎵', - bbrktbrk: '⎶', - bcong: '≌', - bcy: 'б', - bdquo: '„', - becaus: '∵', - because: '∵', - bemptyv: '⦰', - bepsi: '϶', - bernou: 'ℬ', - beta: 'β', - beth: 'ℶ', - between: '≬', - bfr: '𝔟', - bigcap: '⋂', - bigcirc: '◯', - bigcup: '⋃', - bigodot: '⨀', - bigoplus: '⨁', - bigotimes: '⨂', - bigsqcup: '⨆', - bigstar: '★', - bigtriangledown: '▽', - bigtriangleup: '△', - biguplus: '⨄', - bigvee: '⋁', - bigwedge: '⋀', - bkarow: '⤍', - blacklozenge: '⧫', - blacksquare: '▪', - blacktriangle: '▴', - blacktriangledown: '▾', - blacktriangleleft: '◂', - blacktriangleright: '▸', - blank: '␣', - blk12: '▒', - blk14: '░', - blk34: '▓', - block: '█', - bne: '=⃥', - bnequiv: '≡⃥', - bnot: '⌐', - bopf: '𝕓', - bot: '⊥', - bottom: '⊥', - bowtie: '⋈', - boxDL: '╗', - boxDR: '╔', - boxDl: '╖', - boxDr: '╓', - boxH: '═', - boxHD: '╦', - boxHU: '╩', - boxHd: '╤', - boxHu: '╧', - boxUL: '╝', - boxUR: '╚', - boxUl: '╜', - boxUr: '╙', - boxV: '║', - boxVH: '╬', - boxVL: '╣', - boxVR: '╠', - boxVh: '╫', - boxVl: '╢', - boxVr: '╟', - boxbox: '⧉', - boxdL: '╕', - boxdR: '╒', - boxdl: '┐', - boxdr: '┌', - boxh: '─', - boxhD: '╥', - boxhU: '╨', - boxhd: '┬', - boxhu: '┴', - boxminus: '⊟', - boxplus: '⊞', - boxtimes: '⊠', - boxuL: '╛', - boxuR: '╘', - boxul: '┘', - boxur: '└', - boxv: '│', - boxvH: '╪', - boxvL: '╡', - boxvR: '╞', - boxvh: '┼', - boxvl: '┤', - boxvr: '├', - bprime: '‵', - breve: '˘', - brvbar: '¦', - bscr: '𝒷', - bsemi: '⁏', - bsim: '∽', - bsime: '⋍', - bsol: '\\', - bsolb: '⧅', - bsolhsub: '⟈', - bull: '•', - bullet: '•', - bump: '≎', - bumpE: '⪮', - bumpe: '≏', - bumpeq: '≏', - cacute: 'ć', - cap: '∩', - capand: '⩄', - capbrcup: '⩉', - capcap: '⩋', - capcup: '⩇', - capdot: '⩀', - caps: '∩︀', - caret: '⁁', - caron: 'ˇ', - ccaps: '⩍', - ccaron: 'č', - ccedil: 'ç', - ccirc: 'ĉ', - ccups: '⩌', - ccupssm: '⩐', - cdot: 'ċ', - cedil: '¸', - cemptyv: '⦲', - cent: '¢', - centerdot: '·', - cfr: '𝔠', - chcy: 'ч', - check: '✓', - checkmark: '✓', - chi: 'χ', - cir: '○', - cirE: '⧃', - circ: 'ˆ', - circeq: '≗', - circlearrowleft: '↺', - circlearrowright: '↻', - circledR: '®', - circledS: 'Ⓢ', - circledast: '⊛', - circledcirc: '⊚', - circleddash: '⊝', - cire: '≗', - cirfnint: '⨐', - cirmid: '⫯', - cirscir: '⧂', - clubs: '♣', - clubsuit: '♣', - colon: ':', - colone: '≔', - coloneq: '≔', - comma: ',', - commat: '@', - comp: '∁', - compfn: '∘', - complement: '∁', - complexes: 'ℂ', - cong: '≅', - congdot: '⩭', - conint: '∮', - copf: '𝕔', - coprod: '∐', - copy: '©', - copysr: '℗', - crarr: '↵', - cross: '✗', - cscr: '𝒸', - csub: '⫏', - csube: '⫑', - csup: '⫐', - csupe: '⫒', - ctdot: '⋯', - cudarrl: '⤸', - cudarrr: '⤵', - cuepr: '⋞', - cuesc: '⋟', - cularr: '↶', - cularrp: '⤽', - cup: '∪', - cupbrcap: '⩈', - cupcap: '⩆', - cupcup: '⩊', - cupdot: '⊍', - cupor: '⩅', - cups: '∪︀', - curarr: '↷', - curarrm: '⤼', - curlyeqprec: '⋞', - curlyeqsucc: '⋟', - curlyvee: '⋎', - curlywedge: '⋏', - curren: '¤', - curvearrowleft: '↶', - curvearrowright: '↷', - cuvee: '⋎', - cuwed: '⋏', - cwconint: '∲', - cwint: '∱', - cylcty: '⌭', - dArr: '⇓', - dHar: '⥥', - dagger: '†', - daleth: 'ℸ', - darr: '↓', - dash: '‐', - dashv: '⊣', - dbkarow: '⤏', - dblac: '˝', - dcaron: 'ď', - dcy: 'д', - dd: 'ⅆ', - ddagger: '‡', - ddarr: '⇊', - ddotseq: '⩷', - deg: '°', - delta: 'δ', - demptyv: '⦱', - dfisht: '⥿', - dfr: '𝔡', - dharl: '⇃', - dharr: '⇂', - diam: '⋄', - diamond: '⋄', - diamondsuit: '♦', - diams: '♦', - die: '¨', - digamma: 'ϝ', - disin: '⋲', - div: '÷', - divide: '÷', - divideontimes: '⋇', - divonx: '⋇', - djcy: 'ђ', - dlcorn: '⌞', - dlcrop: '⌍', - dollar: '$', - dopf: '𝕕', - dot: '˙', - doteq: '≐', - doteqdot: '≑', - dotminus: '∸', - dotplus: '∔', - dotsquare: '⊡', - doublebarwedge: '⌆', - downarrow: '↓', - downdownarrows: '⇊', - downharpoonleft: '⇃', - downharpoonright: '⇂', - drbkarow: '⤐', - drcorn: '⌟', - drcrop: '⌌', - dscr: '𝒹', - dscy: 'ѕ', - dsol: '⧶', - dstrok: 'đ', - dtdot: '⋱', - dtri: '▿', - dtrif: '▾', - duarr: '⇵', - duhar: '⥯', - dwangle: '⦦', - dzcy: 'џ', - dzigrarr: '⟿', - eDDot: '⩷', - eDot: '≑', - eacute: 'é', - easter: '⩮', - ecaron: 'ě', - ecir: '≖', - ecirc: 'ê', - ecolon: '≕', - ecy: 'э', - edot: 'ė', - ee: 'ⅇ', - efDot: '≒', - efr: '𝔢', - eg: '⪚', - egrave: 'è', - egs: '⪖', - egsdot: '⪘', - el: '⪙', - elinters: '⏧', - ell: 'ℓ', - els: '⪕', - elsdot: '⪗', - emacr: 'ē', - empty: '∅', - emptyset: '∅', - emptyv: '∅', - emsp13: ' ', - emsp14: ' ', - emsp: ' ', - eng: 'ŋ', - ensp: ' ', - eogon: 'ę', - eopf: '𝕖', - epar: '⋕', - eparsl: '⧣', - eplus: '⩱', - epsi: 'ε', - epsilon: 'ε', - epsiv: 'ϵ', - eqcirc: '≖', - eqcolon: '≕', - eqsim: '≂', - eqslantgtr: '⪖', - eqslantless: '⪕', - equals: '=', - equest: '≟', - equiv: '≡', - equivDD: '⩸', - eqvparsl: '⧥', - erDot: '≓', - erarr: '⥱', - escr: 'ℯ', - esdot: '≐', - esim: '≂', - eta: 'η', - eth: 'ð', - euml: 'ë', - euro: '€', - excl: '!', - exist: '∃', - expectation: 'ℰ', - exponentiale: 'ⅇ', - fallingdotseq: '≒', - fcy: 'ф', - female: '♀', - ffilig: 'ffi', - fflig: 'ff', - ffllig: 'ffl', - ffr: '𝔣', - filig: 'fi', - fjlig: 'fj', - flat: '♭', - fllig: 'fl', - fltns: '▱', - fnof: 'ƒ', - fopf: '𝕗', - forall: '∀', - fork: '⋔', - forkv: '⫙', - fpartint: '⨍', - frac12: '½', - frac13: '⅓', - frac14: '¼', - frac15: '⅕', - frac16: '⅙', - frac18: '⅛', - frac23: '⅔', - frac25: '⅖', - frac34: '¾', - frac35: '⅗', - frac38: '⅜', - frac45: '⅘', - frac56: '⅚', - frac58: '⅝', - frac78: '⅞', - frasl: '⁄', - frown: '⌢', - fscr: '𝒻', - gE: '≧', - gEl: '⪌', - gacute: 'ǵ', - gamma: 'γ', - gammad: 'ϝ', - gap: '⪆', - gbreve: 'ğ', - gcirc: 'ĝ', - gcy: 'г', - gdot: 'ġ', - ge: '≥', - gel: '⋛', - geq: '≥', - geqq: '≧', - geqslant: '⩾', - ges: '⩾', - gescc: '⪩', - gesdot: '⪀', - gesdoto: '⪂', - gesdotol: '⪄', - gesl: '⋛︀', - gesles: '⪔', - gfr: '𝔤', - gg: '≫', - ggg: '⋙', - gimel: 'ℷ', - gjcy: 'ѓ', - gl: '≷', - glE: '⪒', - gla: '⪥', - glj: '⪤', - gnE: '≩', - gnap: '⪊', - gnapprox: '⪊', - gne: '⪈', - gneq: '⪈', - gneqq: '≩', - gnsim: '⋧', - gopf: '𝕘', - grave: '`', - gscr: 'ℊ', - gsim: '≳', - gsime: '⪎', - gsiml: '⪐', - gt: '>', - gtcc: '⪧', - gtcir: '⩺', - gtdot: '⋗', - gtlPar: '⦕', - gtquest: '⩼', - gtrapprox: '⪆', - gtrarr: '⥸', - gtrdot: '⋗', - gtreqless: '⋛', - gtreqqless: '⪌', - gtrless: '≷', - gtrsim: '≳', - gvertneqq: '≩︀', - gvnE: '≩︀', - hArr: '⇔', - hairsp: ' ', - half: '½', - hamilt: 'ℋ', - hardcy: 'ъ', - harr: '↔', - harrcir: '⥈', - harrw: '↭', - hbar: 'ℏ', - hcirc: 'ĥ', - hearts: '♥', - heartsuit: '♥', - hellip: '…', - hercon: '⊹', - hfr: '𝔥', - hksearow: '⤥', - hkswarow: '⤦', - hoarr: '⇿', - homtht: '∻', - hookleftarrow: '↩', - hookrightarrow: '↪', - hopf: '𝕙', - horbar: '―', - hscr: '𝒽', - hslash: 'ℏ', - hstrok: 'ħ', - hybull: '⁃', - hyphen: '‐', - iacute: 'í', - ic: '⁣', - icirc: 'î', - icy: 'и', - iecy: 'е', - iexcl: '¡', - iff: '⇔', - ifr: '𝔦', - igrave: 'ì', - ii: 'ⅈ', - iiiint: '⨌', - iiint: '∭', - iinfin: '⧜', - iiota: '℩', - ijlig: 'ij', - imacr: 'ī', - image: 'ℑ', - imagline: 'ℐ', - imagpart: 'ℑ', - imath: 'ı', - imof: '⊷', - imped: 'Ƶ', - in: '∈', - incare: '℅', - infin: '∞', - infintie: '⧝', - inodot: 'ı', - int: '∫', - intcal: '⊺', - integers: 'ℤ', - intercal: '⊺', - intlarhk: '⨗', - intprod: '⨼', - iocy: 'ё', - iogon: 'į', - iopf: '𝕚', - iota: 'ι', - iprod: '⨼', - iquest: '¿', - iscr: '𝒾', - isin: '∈', - isinE: '⋹', - isindot: '⋵', - isins: '⋴', - isinsv: '⋳', - isinv: '∈', - it: '⁢', - itilde: 'ĩ', - iukcy: 'і', - iuml: 'ï', - jcirc: 'ĵ', - jcy: 'й', - jfr: '𝔧', - jmath: 'ȷ', - jopf: '𝕛', - jscr: '𝒿', - jsercy: 'ј', - jukcy: 'є', - kappa: 'κ', - kappav: 'ϰ', - kcedil: 'ķ', - kcy: 'к', - kfr: '𝔨', - kgreen: 'ĸ', - khcy: 'х', - kjcy: 'ќ', - kopf: '𝕜', - kscr: '𝓀', - lAarr: '⇚', - lArr: '⇐', - lAtail: '⤛', - lBarr: '⤎', - lE: '≦', - lEg: '⪋', - lHar: '⥢', - lacute: 'ĺ', - laemptyv: '⦴', - lagran: 'ℒ', - lambda: 'λ', - lang: '⟨', - langd: '⦑', - langle: '⟨', - lap: '⪅', - laquo: '«', - larr: '←', - larrb: '⇤', - larrbfs: '⤟', - larrfs: '⤝', - larrhk: '↩', - larrlp: '↫', - larrpl: '⤹', - larrsim: '⥳', - larrtl: '↢', - lat: '⪫', - latail: '⤙', - late: '⪭', - lates: '⪭︀', - lbarr: '⤌', - lbbrk: '❲', - lbrace: '{', - lbrack: '[', - lbrke: '⦋', - lbrksld: '⦏', - lbrkslu: '⦍', - lcaron: 'ľ', - lcedil: 'ļ', - lceil: '⌈', - lcub: '{', - lcy: 'л', - ldca: '⤶', - ldquo: '“', - ldquor: '„', - ldrdhar: '⥧', - ldrushar: '⥋', - ldsh: '↲', - le: '≤', - leftarrow: '←', - leftarrowtail: '↢', - leftharpoondown: '↽', - leftharpoonup: '↼', - leftleftarrows: '⇇', - leftrightarrow: '↔', - leftrightarrows: '⇆', - leftrightharpoons: '⇋', - leftrightsquigarrow: '↭', - leftthreetimes: '⋋', - leg: '⋚', - leq: '≤', - leqq: '≦', - leqslant: '⩽', - les: '⩽', - lescc: '⪨', - lesdot: '⩿', - lesdoto: '⪁', - lesdotor: '⪃', - lesg: '⋚︀', - lesges: '⪓', - lessapprox: '⪅', - lessdot: '⋖', - lesseqgtr: '⋚', - lesseqqgtr: '⪋', - lessgtr: '≶', - lesssim: '≲', - lfisht: '⥼', - lfloor: '⌊', - lfr: '𝔩', - lg: '≶', - lgE: '⪑', - lhard: '↽', - lharu: '↼', - lharul: '⥪', - lhblk: '▄', - ljcy: 'љ', - ll: '≪', - llarr: '⇇', - llcorner: '⌞', - llhard: '⥫', - lltri: '◺', - lmidot: 'ŀ', - lmoust: '⎰', - lmoustache: '⎰', - lnE: '≨', - lnap: '⪉', - lnapprox: '⪉', - lne: '⪇', - lneq: '⪇', - lneqq: '≨', - lnsim: '⋦', - loang: '⟬', - loarr: '⇽', - lobrk: '⟦', - longleftarrow: '⟵', - longleftrightarrow: '⟷', - longmapsto: '⟼', - longrightarrow: '⟶', - looparrowleft: '↫', - looparrowright: '↬', - lopar: '⦅', - lopf: '𝕝', - loplus: '⨭', - lotimes: '⨴', - lowast: '∗', - lowbar: '_', - loz: '◊', - lozenge: '◊', - lozf: '⧫', - lpar: '(', - lparlt: '⦓', - lrarr: '⇆', - lrcorner: '⌟', - lrhar: '⇋', - lrhard: '⥭', - lrm: '‎', - lrtri: '⊿', - lsaquo: '‹', - lscr: '𝓁', - lsh: '↰', - lsim: '≲', - lsime: '⪍', - lsimg: '⪏', - lsqb: '[', - lsquo: '‘', - lsquor: '‚', - lstrok: 'ł', - lt: '<', - ltcc: '⪦', - ltcir: '⩹', - ltdot: '⋖', - lthree: '⋋', - ltimes: '⋉', - ltlarr: '⥶', - ltquest: '⩻', - ltrPar: '⦖', - ltri: '◃', - ltrie: '⊴', - ltrif: '◂', - lurdshar: '⥊', - luruhar: '⥦', - lvertneqq: '≨︀', - lvnE: '≨︀', - mDDot: '∺', - macr: '¯', - male: '♂', - malt: '✠', - maltese: '✠', - map: '↦', - mapsto: '↦', - mapstodown: '↧', - mapstoleft: '↤', - mapstoup: '↥', - marker: '▮', - mcomma: '⨩', - mcy: 'м', - mdash: '—', - measuredangle: '∡', - mfr: '𝔪', - mho: '℧', - micro: 'µ', - mid: '∣', - midast: '*', - midcir: '⫰', - middot: '·', - minus: '−', - minusb: '⊟', - minusd: '∸', - minusdu: '⨪', - mlcp: '⫛', - mldr: '…', - mnplus: '∓', - models: '⊧', - mopf: '𝕞', - mp: '∓', - mscr: '𝓂', - mstpos: '∾', - mu: 'μ', - multimap: '⊸', - mumap: '⊸', - nGg: '⋙̸', - nGt: '≫⃒', - nGtv: '≫̸', - nLeftarrow: '⇍', - nLeftrightarrow: '⇎', - nLl: '⋘̸', - nLt: '≪⃒', - nLtv: '≪̸', - nRightarrow: '⇏', - nVDash: '⊯', - nVdash: '⊮', - nabla: '∇', - nacute: 'ń', - nang: '∠⃒', - nap: '≉', - napE: '⩰̸', - napid: '≋̸', - napos: 'ʼn', - napprox: '≉', - natur: '♮', - natural: '♮', - naturals: 'ℕ', - nbsp: ' ', - nbump: '≎̸', - nbumpe: '≏̸', - ncap: '⩃', - ncaron: 'ň', - ncedil: 'ņ', - ncong: '≇', - ncongdot: '⩭̸', - ncup: '⩂', - ncy: 'н', - ndash: '–', - ne: '≠', - neArr: '⇗', - nearhk: '⤤', - nearr: '↗', - nearrow: '↗', - nedot: '≐̸', - nequiv: '≢', - nesear: '⤨', - nesim: '≂̸', - nexist: '∄', - nexists: '∄', - nfr: '𝔫', - ngE: '≧̸', - nge: '≱', - ngeq: '≱', - ngeqq: '≧̸', - ngeqslant: '⩾̸', - nges: '⩾̸', - ngsim: '≵', - ngt: '≯', - ngtr: '≯', - nhArr: '⇎', - nharr: '↮', - nhpar: '⫲', - ni: '∋', - nis: '⋼', - nisd: '⋺', - niv: '∋', - njcy: 'њ', - nlArr: '⇍', - nlE: '≦̸', - nlarr: '↚', - nldr: '‥', - nle: '≰', - nleftarrow: '↚', - nleftrightarrow: '↮', - nleq: '≰', - nleqq: '≦̸', - nleqslant: '⩽̸', - nles: '⩽̸', - nless: '≮', - nlsim: '≴', - nlt: '≮', - nltri: '⋪', - nltrie: '⋬', - nmid: '∤', - nopf: '𝕟', - not: '¬', - notin: '∉', - notinE: '⋹̸', - notindot: '⋵̸', - notinva: '∉', - notinvb: '⋷', - notinvc: '⋶', - notni: '∌', - notniva: '∌', - notnivb: '⋾', - notnivc: '⋽', - npar: '∦', - nparallel: '∦', - nparsl: '⫽⃥', - npart: '∂̸', - npolint: '⨔', - npr: '⊀', - nprcue: '⋠', - npre: '⪯̸', - nprec: '⊀', - npreceq: '⪯̸', - nrArr: '⇏', - nrarr: '↛', - nrarrc: '⤳̸', - nrarrw: '↝̸', - nrightarrow: '↛', - nrtri: '⋫', - nrtrie: '⋭', - nsc: '⊁', - nsccue: '⋡', - nsce: '⪰̸', - nscr: '𝓃', - nshortmid: '∤', - nshortparallel: '∦', - nsim: '≁', - nsime: '≄', - nsimeq: '≄', - nsmid: '∤', - nspar: '∦', - nsqsube: '⋢', - nsqsupe: '⋣', - nsub: '⊄', - nsubE: '⫅̸', - nsube: '⊈', - nsubset: '⊂⃒', - nsubseteq: '⊈', - nsubseteqq: '⫅̸', - nsucc: '⊁', - nsucceq: '⪰̸', - nsup: '⊅', - nsupE: '⫆̸', - nsupe: '⊉', - nsupset: '⊃⃒', - nsupseteq: '⊉', - nsupseteqq: '⫆̸', - ntgl: '≹', - ntilde: 'ñ', - ntlg: '≸', - ntriangleleft: '⋪', - ntrianglelefteq: '⋬', - ntriangleright: '⋫', - ntrianglerighteq: '⋭', - nu: 'ν', - num: '#', - numero: '№', - numsp: ' ', - nvDash: '⊭', - nvHarr: '⤄', - nvap: '≍⃒', - nvdash: '⊬', - nvge: '≥⃒', - nvgt: '>⃒', - nvinfin: '⧞', - nvlArr: '⤂', - nvle: '≤⃒', - nvlt: '<⃒', - nvltrie: '⊴⃒', - nvrArr: '⤃', - nvrtrie: '⊵⃒', - nvsim: '∼⃒', - nwArr: '⇖', - nwarhk: '⤣', - nwarr: '↖', - nwarrow: '↖', - nwnear: '⤧', - oS: 'Ⓢ', - oacute: 'ó', - oast: '⊛', - ocir: '⊚', - ocirc: 'ô', - ocy: 'о', - odash: '⊝', - odblac: 'ő', - odiv: '⨸', - odot: '⊙', - odsold: '⦼', - oelig: 'œ', - ofcir: '⦿', - ofr: '𝔬', - ogon: '˛', - ograve: 'ò', - ogt: '⧁', - ohbar: '⦵', - ohm: 'Ω', - oint: '∮', - olarr: '↺', - olcir: '⦾', - olcross: '⦻', - oline: '‾', - olt: '⧀', - omacr: 'ō', - omega: 'ω', - omicron: 'ο', - omid: '⦶', - ominus: '⊖', - oopf: '𝕠', - opar: '⦷', - operp: '⦹', - oplus: '⊕', - or: '∨', - orarr: '↻', - ord: '⩝', - order: 'ℴ', - orderof: 'ℴ', - ordf: 'ª', - ordm: 'º', - origof: '⊶', - oror: '⩖', - orslope: '⩗', - orv: '⩛', - oscr: 'ℴ', - oslash: 'ø', - osol: '⊘', - otilde: 'õ', - otimes: '⊗', - otimesas: '⨶', - ouml: 'ö', - ovbar: '⌽', - par: '∥', - para: '¶', - parallel: '∥', - parsim: '⫳', - parsl: '⫽', - part: '∂', - pcy: 'п', - percnt: '%', - period: '.', - permil: '‰', - perp: '⊥', - pertenk: '‱', - pfr: '𝔭', - phi: 'φ', - phiv: 'ϕ', - phmmat: 'ℳ', - phone: '☎', - pi: 'π', - pitchfork: '⋔', - piv: 'ϖ', - planck: 'ℏ', - planckh: 'ℎ', - plankv: 'ℏ', - plus: '+', - plusacir: '⨣', - plusb: '⊞', - pluscir: '⨢', - plusdo: '∔', - plusdu: '⨥', - pluse: '⩲', - plusmn: '±', - plussim: '⨦', - plustwo: '⨧', - pm: '±', - pointint: '⨕', - popf: '𝕡', - pound: '£', - pr: '≺', - prE: '⪳', - prap: '⪷', - prcue: '≼', - pre: '⪯', - prec: '≺', - precapprox: '⪷', - preccurlyeq: '≼', - preceq: '⪯', - precnapprox: '⪹', - precneqq: '⪵', - precnsim: '⋨', - precsim: '≾', - prime: '′', - primes: 'ℙ', - prnE: '⪵', - prnap: '⪹', - prnsim: '⋨', - prod: '∏', - profalar: '⌮', - profline: '⌒', - profsurf: '⌓', - prop: '∝', - propto: '∝', - prsim: '≾', - prurel: '⊰', - pscr: '𝓅', - psi: 'ψ', - puncsp: ' ', - qfr: '𝔮', - qint: '⨌', - qopf: '𝕢', - qprime: '⁗', - qscr: '𝓆', - quaternions: 'ℍ', - quatint: '⨖', - quest: '?', - questeq: '≟', - quot: '"', - rAarr: '⇛', - rArr: '⇒', - rAtail: '⤜', - rBarr: '⤏', - rHar: '⥤', - race: '∽̱', - racute: 'ŕ', - radic: '√', - raemptyv: '⦳', - rang: '⟩', - rangd: '⦒', - range: '⦥', - rangle: '⟩', - raquo: '»', - rarr: '→', - rarrap: '⥵', - rarrb: '⇥', - rarrbfs: '⤠', - rarrc: '⤳', - rarrfs: '⤞', - rarrhk: '↪', - rarrlp: '↬', - rarrpl: '⥅', - rarrsim: '⥴', - rarrtl: '↣', - rarrw: '↝', - ratail: '⤚', - ratio: '∶', - rationals: 'ℚ', - rbarr: '⤍', - rbbrk: '❳', - rbrace: '}', - rbrack: ']', - rbrke: '⦌', - rbrksld: '⦎', - rbrkslu: '⦐', - rcaron: 'ř', - rcedil: 'ŗ', - rceil: '⌉', - rcub: '}', - rcy: 'р', - rdca: '⤷', - rdldhar: '⥩', - rdquo: '”', - rdquor: '”', - rdsh: '↳', - real: 'ℜ', - realine: 'ℛ', - realpart: 'ℜ', - reals: 'ℝ', - rect: '▭', - reg: '®', - rfisht: '⥽', - rfloor: '⌋', - rfr: '𝔯', - rhard: '⇁', - rharu: '⇀', - rharul: '⥬', - rho: 'ρ', - rhov: 'ϱ', - rightarrow: '→', - rightarrowtail: '↣', - rightharpoondown: '⇁', - rightharpoonup: '⇀', - rightleftarrows: '⇄', - rightleftharpoons: '⇌', - rightrightarrows: '⇉', - rightsquigarrow: '↝', - rightthreetimes: '⋌', - ring: '˚', - risingdotseq: '≓', - rlarr: '⇄', - rlhar: '⇌', - rlm: '‏', - rmoust: '⎱', - rmoustache: '⎱', - rnmid: '⫮', - roang: '⟭', - roarr: '⇾', - robrk: '⟧', - ropar: '⦆', - ropf: '𝕣', - roplus: '⨮', - rotimes: '⨵', - rpar: ')', - rpargt: '⦔', - rppolint: '⨒', - rrarr: '⇉', - rsaquo: '›', - rscr: '𝓇', - rsh: '↱', - rsqb: ']', - rsquo: '’', - rsquor: '’', - rthree: '⋌', - rtimes: '⋊', - rtri: '▹', - rtrie: '⊵', - rtrif: '▸', - rtriltri: '⧎', - ruluhar: '⥨', - rx: '℞', - sacute: 'ś', - sbquo: '‚', - sc: '≻', - scE: '⪴', - scap: '⪸', - scaron: 'š', - sccue: '≽', - sce: '⪰', - scedil: 'ş', - scirc: 'ŝ', - scnE: '⪶', - scnap: '⪺', - scnsim: '⋩', - scpolint: '⨓', - scsim: '≿', - scy: 'с', - sdot: '⋅', - sdotb: '⊡', - sdote: '⩦', - seArr: '⇘', - searhk: '⤥', - searr: '↘', - searrow: '↘', - sect: '§', - semi: ';', - seswar: '⤩', - setminus: '∖', - setmn: '∖', - sext: '✶', - sfr: '𝔰', - sfrown: '⌢', - sharp: '♯', - shchcy: 'щ', - shcy: 'ш', - shortmid: '∣', - shortparallel: '∥', - shy: '­', - sigma: 'σ', - sigmaf: 'ς', - sigmav: 'ς', - sim: '∼', - simdot: '⩪', - sime: '≃', - simeq: '≃', - simg: '⪞', - simgE: '⪠', - siml: '⪝', - simlE: '⪟', - simne: '≆', - simplus: '⨤', - simrarr: '⥲', - slarr: '←', - smallsetminus: '∖', - smashp: '⨳', - smeparsl: '⧤', - smid: '∣', - smile: '⌣', - smt: '⪪', - smte: '⪬', - smtes: '⪬︀', - softcy: 'ь', - sol: '/', - solb: '⧄', - solbar: '⌿', - sopf: '𝕤', - spades: '♠', - spadesuit: '♠', - spar: '∥', - sqcap: '⊓', - sqcaps: '⊓︀', - sqcup: '⊔', - sqcups: '⊔︀', - sqsub: '⊏', - sqsube: '⊑', - sqsubset: '⊏', - sqsubseteq: '⊑', - sqsup: '⊐', - sqsupe: '⊒', - sqsupset: '⊐', - sqsupseteq: '⊒', - squ: '□', - square: '□', - squarf: '▪', - squf: '▪', - srarr: '→', - sscr: '𝓈', - ssetmn: '∖', - ssmile: '⌣', - sstarf: '⋆', - star: '☆', - starf: '★', - straightepsilon: 'ϵ', - straightphi: 'ϕ', - strns: '¯', - sub: '⊂', - subE: '⫅', - subdot: '⪽', - sube: '⊆', - subedot: '⫃', - submult: '⫁', - subnE: '⫋', - subne: '⊊', - subplus: '⪿', - subrarr: '⥹', - subset: '⊂', - subseteq: '⊆', - subseteqq: '⫅', - subsetneq: '⊊', - subsetneqq: '⫋', - subsim: '⫇', - subsub: '⫕', - subsup: '⫓', - succ: '≻', - succapprox: '⪸', - succcurlyeq: '≽', - succeq: '⪰', - succnapprox: '⪺', - succneqq: '⪶', - succnsim: '⋩', - succsim: '≿', - sum: '∑', - sung: '♪', - sup1: '¹', - sup2: '²', - sup3: '³', - sup: '⊃', - supE: '⫆', - supdot: '⪾', - supdsub: '⫘', - supe: '⊇', - supedot: '⫄', - suphsol: '⟉', - suphsub: '⫗', - suplarr: '⥻', - supmult: '⫂', - supnE: '⫌', - supne: '⊋', - supplus: '⫀', - supset: '⊃', - supseteq: '⊇', - supseteqq: '⫆', - supsetneq: '⊋', - supsetneqq: '⫌', - supsim: '⫈', - supsub: '⫔', - supsup: '⫖', - swArr: '⇙', - swarhk: '⤦', - swarr: '↙', - swarrow: '↙', - swnwar: '⤪', - szlig: 'ß', - target: '⌖', - tau: 'τ', - tbrk: '⎴', - tcaron: 'ť', - tcedil: 'ţ', - tcy: 'т', - tdot: '⃛', - telrec: '⌕', - tfr: '𝔱', - there4: '∴', - therefore: '∴', - theta: 'θ', - thetasym: 'ϑ', - thetav: 'ϑ', - thickapprox: '≈', - thicksim: '∼', - thinsp: ' ', - thkap: '≈', - thksim: '∼', - thorn: 'þ', - tilde: '˜', - times: '×', - timesb: '⊠', - timesbar: '⨱', - timesd: '⨰', - tint: '∭', - toea: '⤨', - top: '⊤', - topbot: '⌶', - topcir: '⫱', - topf: '𝕥', - topfork: '⫚', - tosa: '⤩', - tprime: '‴', - trade: '™', - triangle: '▵', - triangledown: '▿', - triangleleft: '◃', - trianglelefteq: '⊴', - triangleq: '≜', - triangleright: '▹', - trianglerighteq: '⊵', - tridot: '◬', - trie: '≜', - triminus: '⨺', - triplus: '⨹', - trisb: '⧍', - tritime: '⨻', - trpezium: '⏢', - tscr: '𝓉', - tscy: 'ц', - tshcy: 'ћ', - tstrok: 'ŧ', - twixt: '≬', - twoheadleftarrow: '↞', - twoheadrightarrow: '↠', - uArr: '⇑', - uHar: '⥣', - uacute: 'ú', - uarr: '↑', - ubrcy: 'ў', - ubreve: 'ŭ', - ucirc: 'û', - ucy: 'у', - udarr: '⇅', - udblac: 'ű', - udhar: '⥮', - ufisht: '⥾', - ufr: '𝔲', - ugrave: 'ù', - uharl: '↿', - uharr: '↾', - uhblk: '▀', - ulcorn: '⌜', - ulcorner: '⌜', - ulcrop: '⌏', - ultri: '◸', - umacr: 'ū', - uml: '¨', - uogon: 'ų', - uopf: '𝕦', - uparrow: '↑', - updownarrow: '↕', - upharpoonleft: '↿', - upharpoonright: '↾', - uplus: '⊎', - upsi: 'υ', - upsih: 'ϒ', - upsilon: 'υ', - upuparrows: '⇈', - urcorn: '⌝', - urcorner: '⌝', - urcrop: '⌎', - uring: 'ů', - urtri: '◹', - uscr: '𝓊', - utdot: '⋰', - utilde: 'ũ', - utri: '▵', - utrif: '▴', - uuarr: '⇈', - uuml: 'ü', - uwangle: '⦧', - vArr: '⇕', - vBar: '⫨', - vBarv: '⫩', - vDash: '⊨', - vangrt: '⦜', - varepsilon: 'ϵ', - varkappa: 'ϰ', - varnothing: '∅', - varphi: 'ϕ', - varpi: 'ϖ', - varpropto: '∝', - varr: '↕', - varrho: 'ϱ', - varsigma: 'ς', - varsubsetneq: '⊊︀', - varsubsetneqq: '⫋︀', - varsupsetneq: '⊋︀', - varsupsetneqq: '⫌︀', - vartheta: 'ϑ', - vartriangleleft: '⊲', - vartriangleright: '⊳', - vcy: 'в', - vdash: '⊢', - vee: '∨', - veebar: '⊻', - veeeq: '≚', - vellip: '⋮', - verbar: '|', - vert: '|', - vfr: '𝔳', - vltri: '⊲', - vnsub: '⊂⃒', - vnsup: '⊃⃒', - vopf: '𝕧', - vprop: '∝', - vrtri: '⊳', - vscr: '𝓋', - vsubnE: '⫋︀', - vsubne: '⊊︀', - vsupnE: '⫌︀', - vsupne: '⊋︀', - vzigzag: '⦚', - wcirc: 'ŵ', - wedbar: '⩟', - wedge: '∧', - wedgeq: '≙', - weierp: '℘', - wfr: '𝔴', - wopf: '𝕨', - wp: '℘', - wr: '≀', - wreath: '≀', - wscr: '𝓌', - xcap: '⋂', - xcirc: '◯', - xcup: '⋃', - xdtri: '▽', - xfr: '𝔵', - xhArr: '⟺', - xharr: '⟷', - xi: 'ξ', - xlArr: '⟸', - xlarr: '⟵', - xmap: '⟼', - xnis: '⋻', - xodot: '⨀', - xopf: '𝕩', - xoplus: '⨁', - xotime: '⨂', - xrArr: '⟹', - xrarr: '⟶', - xscr: '𝓍', - xsqcup: '⨆', - xuplus: '⨄', - xutri: '△', - xvee: '⋁', - xwedge: '⋀', - yacute: 'ý', - yacy: 'я', - ycirc: 'ŷ', - ycy: 'ы', - yen: '¥', - yfr: '𝔶', - yicy: 'ї', - yopf: '𝕪', - yscr: '𝓎', - yucy: 'ю', - yuml: 'ÿ', - zacute: 'ź', - zcaron: 'ž', - zcy: 'з', - zdot: 'ż', - zeetrf: 'ℨ', - zeta: 'ζ', - zfr: '𝔷', - zhcy: 'ж', - zigrarr: '⇝', - zopf: '𝕫', - zscr: '𝓏', - zwj: '‍', - zwnj: '‌' -} - -;// CONCATENATED MODULE: ./node_modules/decode-named-character-reference/index.js - - -const own = {}.hasOwnProperty - -/** - * Decode a single character reference (without the `&` or `;`). - * You probably only need this when you’re building parsers yourself that follow - * different rules compared to HTML. - * This is optimized to be tiny in browsers. - * - * @param {string} value - * `notin` (named), `#123` (deci), `#x123` (hexa). - * @returns {string|false} - * Decoded reference. - */ -function decodeNamedCharacterReference(value) { - return own.call(characterEntities, value) ? characterEntities[value] : false -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/character-reference.js -/** - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const characterReference = { - name: 'characterReference', - tokenize: tokenizeCharacterReference -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeCharacterReference(effects, ok, nok) { - const self = this - let size = 0 - /** @type {number} */ - let max - /** @type {(code: Code) => boolean} */ - let test - return start - - /** - * Start of character reference. - * - * ```markdown - * > | a&b - * ^ - * > | a{b - * ^ - * > | a b - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter('characterReference') - effects.enter('characterReferenceMarker') - effects.consume(code) - effects.exit('characterReferenceMarker') - return open - } - - /** - * After `&`, at `#` for numeric references or alphanumeric for named - * references. - * - * ```markdown - * > | a&b - * ^ - * > | a{b - * ^ - * > | a b - * ^ - * ``` - * - * @type {State} - */ - function open(code) { - if (code === 35) { - effects.enter('characterReferenceMarkerNumeric') - effects.consume(code) - effects.exit('characterReferenceMarkerNumeric') - return numeric - } - effects.enter('characterReferenceValue') - max = 31 - test = asciiAlphanumeric - return value(code) - } - - /** - * After `#`, at `x` for hexadecimals or digit for decimals. - * - * ```markdown - * > | a{b - * ^ - * > | a b - * ^ - * ``` - * - * @type {State} - */ - function numeric(code) { - if (code === 88 || code === 120) { - effects.enter('characterReferenceMarkerHexadecimal') - effects.consume(code) - effects.exit('characterReferenceMarkerHexadecimal') - effects.enter('characterReferenceValue') - max = 6 - test = asciiHexDigit - return value - } - effects.enter('characterReferenceValue') - max = 7 - test = asciiDigit - return value(code) - } - - /** - * After markers (`&#x`, `&#`, or `&`), in value, before `;`. - * - * The character reference kind defines what and how many characters are - * allowed. - * - * ```markdown - * > | a&b - * ^^^ - * > | a{b - * ^^^ - * > | a b - * ^ - * ``` - * - * @type {State} - */ - function value(code) { - if (code === 59 && size) { - const token = effects.exit('characterReferenceValue') - if ( - test === asciiAlphanumeric && - !decodeNamedCharacterReference(self.sliceSerialize(token)) - ) { - return nok(code) - } - - // To do: `markdown-rs` uses a different name: - // `CharacterReferenceMarkerSemi`. - effects.enter('characterReferenceMarker') - effects.consume(code) - effects.exit('characterReferenceMarker') - effects.exit('characterReference') - return ok - } - if (test(code) && size++ < max) { - effects.consume(code) - return value - } - return nok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/character-escape.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - -/** @type {Construct} */ -const characterEscape = { - name: 'characterEscape', - tokenize: tokenizeCharacterEscape -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeCharacterEscape(effects, ok, nok) { - return start - - /** - * Start of character escape. - * - * ```markdown - * > | a\*b - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter('characterEscape') - effects.enter('escapeMarker') - effects.consume(code) - effects.exit('escapeMarker') - return inside - } - - /** - * After `\`, at punctuation. - * - * ```markdown - * > | a\*b - * ^ - * ``` - * - * @type {State} - */ - function inside(code) { - // ASCII punctuation. - if (asciiPunctuation(code)) { - effects.enter('characterEscapeValue') - effects.consume(code) - effects.exit('characterEscapeValue') - effects.exit('characterEscape') - return ok - } - return nok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/line-ending.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const lineEnding = { - name: 'lineEnding', - tokenize: tokenizeLineEnding -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeLineEnding(effects, ok) { - return start - - /** @type {State} */ - function start(code) { - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return factorySpace(effects, ok, 'linePrefix') - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/label-end.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').Event} Event - * @typedef {import('micromark-util-types').Resolver} Resolver - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').Token} Token - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - - - - - - - -/** @type {Construct} */ -const labelEnd = { - name: 'labelEnd', - tokenize: tokenizeLabelEnd, - resolveTo: resolveToLabelEnd, - resolveAll: resolveAllLabelEnd -} - -/** @type {Construct} */ -const resourceConstruct = { - tokenize: tokenizeResource -} -/** @type {Construct} */ -const referenceFullConstruct = { - tokenize: tokenizeReferenceFull -} -/** @type {Construct} */ -const referenceCollapsedConstruct = { - tokenize: tokenizeReferenceCollapsed -} - -/** @type {Resolver} */ -function resolveAllLabelEnd(events) { - let index = -1 - while (++index < events.length) { - const token = events[index][1] - if ( - token.type === 'labelImage' || - token.type === 'labelLink' || - token.type === 'labelEnd' - ) { - // Remove the marker. - events.splice(index + 1, token.type === 'labelImage' ? 4 : 2) - token.type = 'data' - index++ - } - } - return events -} - -/** @type {Resolver} */ -function resolveToLabelEnd(events, context) { - let index = events.length - let offset = 0 - /** @type {Token} */ - let token - /** @type {number | undefined} */ - let open - /** @type {number | undefined} */ - let close - /** @type {Array} */ - let media - - // Find an opening. - while (index--) { - token = events[index][1] - if (open) { - // If we see another link, or inactive link label, we’ve been here before. - if ( - token.type === 'link' || - (token.type === 'labelLink' && token._inactive) - ) { - break - } - - // Mark other link openings as inactive, as we can’t have links in - // links. - if (events[index][0] === 'enter' && token.type === 'labelLink') { - token._inactive = true - } - } else if (close) { - if ( - events[index][0] === 'enter' && - (token.type === 'labelImage' || token.type === 'labelLink') && - !token._balanced - ) { - open = index - if (token.type !== 'labelLink') { - offset = 2 - break - } - } - } else if (token.type === 'labelEnd') { - close = index - } - } - const group = { - type: events[open][1].type === 'labelLink' ? 'link' : 'image', - start: Object.assign({}, events[open][1].start), - end: Object.assign({}, events[events.length - 1][1].end) - } - const label = { - type: 'label', - start: Object.assign({}, events[open][1].start), - end: Object.assign({}, events[close][1].end) - } - const text = { - type: 'labelText', - start: Object.assign({}, events[open + offset + 2][1].end), - end: Object.assign({}, events[close - 2][1].start) - } - media = [ - ['enter', group, context], - ['enter', label, context] - ] - - // Opening marker. - media = push(media, events.slice(open + 1, open + offset + 3)) - - // Text open. - media = push(media, [['enter', text, context]]) - - // Always populated by defaults. - - // Between. - media = push( - media, - resolveAll( - context.parser.constructs.insideSpan.null, - events.slice(open + offset + 4, close - 3), - context - ) - ) - - // Text close, marker close, label close. - media = push(media, [ - ['exit', text, context], - events[close - 2], - events[close - 1], - ['exit', label, context] - ]) - - // Reference, resource, or so. - media = push(media, events.slice(close + 1)) - - // Media close. - media = push(media, [['exit', group, context]]) - splice(events, open, events.length, media) - return events -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeLabelEnd(effects, ok, nok) { - const self = this - let index = self.events.length - /** @type {Token} */ - let labelStart - /** @type {boolean} */ - let defined - - // Find an opening. - while (index--) { - if ( - (self.events[index][1].type === 'labelImage' || - self.events[index][1].type === 'labelLink') && - !self.events[index][1]._balanced - ) { - labelStart = self.events[index][1] - break - } - } - return start - - /** - * Start of label end. - * - * ```markdown - * > | [a](b) c - * ^ - * > | [a][b] c - * ^ - * > | [a][] b - * ^ - * > | [a] b - * ``` - * - * @type {State} - */ - function start(code) { - // If there is not an okay opening. - if (!labelStart) { - return nok(code) - } - - // If the corresponding label (link) start is marked as inactive, - // it means we’d be wrapping a link, like this: - // - // ```markdown - // > | a [b [c](d) e](f) g. - // ^ - // ``` - // - // We can’t have that, so it’s just balanced brackets. - if (labelStart._inactive) { - return labelEndNok(code) - } - defined = self.parser.defined.includes( - normalizeIdentifier( - self.sliceSerialize({ - start: labelStart.end, - end: self.now() - }) - ) - ) - effects.enter('labelEnd') - effects.enter('labelMarker') - effects.consume(code) - effects.exit('labelMarker') - effects.exit('labelEnd') - return after - } - - /** - * After `]`. - * - * ```markdown - * > | [a](b) c - * ^ - * > | [a][b] c - * ^ - * > | [a][] b - * ^ - * > | [a] b - * ^ - * ``` - * - * @type {State} - */ - function after(code) { - // Note: `markdown-rs` also parses GFM footnotes here, which for us is in - // an extension. - - // Resource (`[asd](fgh)`)? - if (code === 40) { - return effects.attempt( - resourceConstruct, - labelEndOk, - defined ? labelEndOk : labelEndNok - )(code) - } - - // Full (`[asd][fgh]`) or collapsed (`[asd][]`) reference? - if (code === 91) { - return effects.attempt( - referenceFullConstruct, - labelEndOk, - defined ? referenceNotFull : labelEndNok - )(code) - } - - // Shortcut (`[asd]`) reference? - return defined ? labelEndOk(code) : labelEndNok(code) - } - - /** - * After `]`, at `[`, but not at a full reference. - * - * > 👉 **Note**: we only get here if the label is defined. - * - * ```markdown - * > | [a][] b - * ^ - * > | [a] b - * ^ - * ``` - * - * @type {State} - */ - function referenceNotFull(code) { - return effects.attempt( - referenceCollapsedConstruct, - labelEndOk, - labelEndNok - )(code) - } - - /** - * Done, we found something. - * - * ```markdown - * > | [a](b) c - * ^ - * > | [a][b] c - * ^ - * > | [a][] b - * ^ - * > | [a] b - * ^ - * ``` - * - * @type {State} - */ - function labelEndOk(code) { - // Note: `markdown-rs` does a bunch of stuff here. - return ok(code) - } - - /** - * Done, it’s nothing. - * - * There was an okay opening, but we didn’t match anything. - * - * ```markdown - * > | [a](b c - * ^ - * > | [a][b c - * ^ - * > | [a] b - * ^ - * ``` - * - * @type {State} - */ - function labelEndNok(code) { - labelStart._balanced = true - return nok(code) - } -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeResource(effects, ok, nok) { - return resourceStart - - /** - * At a resource. - * - * ```markdown - * > | [a](b) c - * ^ - * ``` - * - * @type {State} - */ - function resourceStart(code) { - effects.enter('resource') - effects.enter('resourceMarker') - effects.consume(code) - effects.exit('resourceMarker') - return resourceBefore - } - - /** - * In resource, after `(`, at optional whitespace. - * - * ```markdown - * > | [a](b) c - * ^ - * ``` - * - * @type {State} - */ - function resourceBefore(code) { - return markdownLineEndingOrSpace(code) - ? factoryWhitespace(effects, resourceOpen)(code) - : resourceOpen(code) - } - - /** - * In resource, after optional whitespace, at `)` or a destination. - * - * ```markdown - * > | [a](b) c - * ^ - * ``` - * - * @type {State} - */ - function resourceOpen(code) { - if (code === 41) { - return resourceEnd(code) - } - return factoryDestination( - effects, - resourceDestinationAfter, - resourceDestinationMissing, - 'resourceDestination', - 'resourceDestinationLiteral', - 'resourceDestinationLiteralMarker', - 'resourceDestinationRaw', - 'resourceDestinationString', - 32 - )(code) - } - - /** - * In resource, after destination, at optional whitespace. - * - * ```markdown - * > | [a](b) c - * ^ - * ``` - * - * @type {State} - */ - function resourceDestinationAfter(code) { - return markdownLineEndingOrSpace(code) - ? factoryWhitespace(effects, resourceBetween)(code) - : resourceEnd(code) - } - - /** - * At invalid destination. - * - * ```markdown - * > | [a](<<) b - * ^ - * ``` - * - * @type {State} - */ - function resourceDestinationMissing(code) { - return nok(code) - } - - /** - * In resource, after destination and whitespace, at `(` or title. - * - * ```markdown - * > | [a](b ) c - * ^ - * ``` - * - * @type {State} - */ - function resourceBetween(code) { - if (code === 34 || code === 39 || code === 40) { - return factoryTitle( - effects, - resourceTitleAfter, - nok, - 'resourceTitle', - 'resourceTitleMarker', - 'resourceTitleString' - )(code) - } - return resourceEnd(code) - } - - /** - * In resource, after title, at optional whitespace. - * - * ```markdown - * > | [a](b "c") d - * ^ - * ``` - * - * @type {State} - */ - function resourceTitleAfter(code) { - return markdownLineEndingOrSpace(code) - ? factoryWhitespace(effects, resourceEnd)(code) - : resourceEnd(code) - } - - /** - * In resource, at `)`. - * - * ```markdown - * > | [a](b) d - * ^ - * ``` - * - * @type {State} - */ - function resourceEnd(code) { - if (code === 41) { - effects.enter('resourceMarker') - effects.consume(code) - effects.exit('resourceMarker') - effects.exit('resource') - return ok - } - return nok(code) - } -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeReferenceFull(effects, ok, nok) { - const self = this - return referenceFull - - /** - * In a reference (full), at the `[`. - * - * ```markdown - * > | [a][b] d - * ^ - * ``` - * - * @type {State} - */ - function referenceFull(code) { - return factoryLabel.call( - self, - effects, - referenceFullAfter, - referenceFullMissing, - 'reference', - 'referenceMarker', - 'referenceString' - )(code) - } - - /** - * In a reference (full), after `]`. - * - * ```markdown - * > | [a][b] d - * ^ - * ``` - * - * @type {State} - */ - function referenceFullAfter(code) { - return self.parser.defined.includes( - normalizeIdentifier( - self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1) - ) - ) - ? ok(code) - : nok(code) - } - - /** - * In reference (full) that was missing. - * - * ```markdown - * > | [a][b d - * ^ - * ``` - * - * @type {State} - */ - function referenceFullMissing(code) { - return nok(code) - } -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeReferenceCollapsed(effects, ok, nok) { - return referenceCollapsedStart - - /** - * In reference (collapsed), at `[`. - * - * > 👉 **Note**: we only get here if the label is defined. - * - * ```markdown - * > | [a][] d - * ^ - * ``` - * - * @type {State} - */ - function referenceCollapsedStart(code) { - // We only attempt a collapsed label if there’s a `[`. - - effects.enter('reference') - effects.enter('referenceMarker') - effects.consume(code) - effects.exit('referenceMarker') - return referenceCollapsedOpen - } - - /** - * In reference (collapsed), at `]`. - * - * > 👉 **Note**: we only get here if the label is defined. - * - * ```markdown - * > | [a][] d - * ^ - * ``` - * - * @type {State} - */ - function referenceCollapsedOpen(code) { - if (code === 93) { - effects.enter('referenceMarker') - effects.consume(code) - effects.exit('referenceMarker') - effects.exit('reference') - return ok - } - return nok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/label-start-image.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const labelStartImage = { - name: 'labelStartImage', - tokenize: tokenizeLabelStartImage, - resolveAll: labelEnd.resolveAll -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeLabelStartImage(effects, ok, nok) { - const self = this - return start - - /** - * Start of label (image) start. - * - * ```markdown - * > | a ![b] c - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter('labelImage') - effects.enter('labelImageMarker') - effects.consume(code) - effects.exit('labelImageMarker') - return open - } - - /** - * After `!`, at `[`. - * - * ```markdown - * > | a ![b] c - * ^ - * ``` - * - * @type {State} - */ - function open(code) { - if (code === 91) { - effects.enter('labelMarker') - effects.consume(code) - effects.exit('labelMarker') - effects.exit('labelImage') - return after - } - return nok(code) - } - - /** - * After `![`. - * - * ```markdown - * > | a ![b] c - * ^ - * ``` - * - * This is needed in because, when GFM footnotes are enabled, images never - * form when started with a `^`. - * Instead, links form: - * - * ```markdown - * ![^a](b) - * - * ![^a][b] - * - * [b]: c - * ``` - * - * ```html - *

    !^a

    - *

    !^a

    - * ``` - * - * @type {State} - */ - function after(code) { - // To do: use a new field to do this, this is still needed for - // `micromark-extension-gfm-footnote`, but the `label-start-link` - // behavior isn’t. - // Hidden footnotes hook. - /* c8 ignore next 3 */ - return code === 94 && '_hiddenFootnoteSupport' in self.parser.constructs - ? nok(code) - : ok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-classify-character/index.js -/** - * @typedef {import('micromark-util-types').Code} Code - */ - - -/** - * Classify whether a code represents whitespace, punctuation, or something - * else. - * - * Used for attention (emphasis, strong), whose sequences can open or close - * based on the class of surrounding characters. - * - * > 👉 **Note**: eof (`null`) is seen as whitespace. - * - * @param {Code} code - * Code. - * @returns {typeof constants.characterGroupWhitespace | typeof constants.characterGroupPunctuation | undefined} - * Group. - */ -function classifyCharacter(code) { - if ( - code === null || - markdownLineEndingOrSpace(code) || - unicodeWhitespace(code) - ) { - return 1 - } - if (unicodePunctuation(code)) { - return 2 - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/attention.js -/** - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').Event} Event - * @typedef {import('micromark-util-types').Point} Point - * @typedef {import('micromark-util-types').Resolver} Resolver - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').Token} Token - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - - -/** @type {Construct} */ -const attention = { - name: 'attention', - tokenize: tokenizeAttention, - resolveAll: resolveAllAttention -} - -/** - * Take all events and resolve attention to emphasis or strong. - * - * @type {Resolver} - */ -function resolveAllAttention(events, context) { - let index = -1 - /** @type {number} */ - let open - /** @type {Token} */ - let group - /** @type {Token} */ - let text - /** @type {Token} */ - let openingSequence - /** @type {Token} */ - let closingSequence - /** @type {number} */ - let use - /** @type {Array} */ - let nextEvents - /** @type {number} */ - let offset - - // Walk through all events. - // - // Note: performance of this is fine on an mb of normal markdown, but it’s - // a bottleneck for malicious stuff. - while (++index < events.length) { - // Find a token that can close. - if ( - events[index][0] === 'enter' && - events[index][1].type === 'attentionSequence' && - events[index][1]._close - ) { - open = index - - // Now walk back to find an opener. - while (open--) { - // Find a token that can open the closer. - if ( - events[open][0] === 'exit' && - events[open][1].type === 'attentionSequence' && - events[open][1]._open && - // If the markers are the same: - context.sliceSerialize(events[open][1]).charCodeAt(0) === - context.sliceSerialize(events[index][1]).charCodeAt(0) - ) { - // If the opening can close or the closing can open, - // and the close size *is not* a multiple of three, - // but the sum of the opening and closing size *is* multiple of three, - // then don’t match. - if ( - (events[open][1]._close || events[index][1]._open) && - (events[index][1].end.offset - events[index][1].start.offset) % 3 && - !( - (events[open][1].end.offset - - events[open][1].start.offset + - events[index][1].end.offset - - events[index][1].start.offset) % - 3 - ) - ) { - continue - } - - // Number of markers to use from the sequence. - use = - events[open][1].end.offset - events[open][1].start.offset > 1 && - events[index][1].end.offset - events[index][1].start.offset > 1 - ? 2 - : 1 - const start = Object.assign({}, events[open][1].end) - const end = Object.assign({}, events[index][1].start) - movePoint(start, -use) - movePoint(end, use) - openingSequence = { - type: use > 1 ? 'strongSequence' : 'emphasisSequence', - start, - end: Object.assign({}, events[open][1].end) - } - closingSequence = { - type: use > 1 ? 'strongSequence' : 'emphasisSequence', - start: Object.assign({}, events[index][1].start), - end - } - text = { - type: use > 1 ? 'strongText' : 'emphasisText', - start: Object.assign({}, events[open][1].end), - end: Object.assign({}, events[index][1].start) - } - group = { - type: use > 1 ? 'strong' : 'emphasis', - start: Object.assign({}, openingSequence.start), - end: Object.assign({}, closingSequence.end) - } - events[open][1].end = Object.assign({}, openingSequence.start) - events[index][1].start = Object.assign({}, closingSequence.end) - nextEvents = [] - - // If there are more markers in the opening, add them before. - if (events[open][1].end.offset - events[open][1].start.offset) { - nextEvents = push(nextEvents, [ - ['enter', events[open][1], context], - ['exit', events[open][1], context] - ]) - } - - // Opening. - nextEvents = push(nextEvents, [ - ['enter', group, context], - ['enter', openingSequence, context], - ['exit', openingSequence, context], - ['enter', text, context] - ]) - - // Always populated by defaults. - - // Between. - nextEvents = push( - nextEvents, - resolveAll( - context.parser.constructs.insideSpan.null, - events.slice(open + 1, index), - context - ) - ) - - // Closing. - nextEvents = push(nextEvents, [ - ['exit', text, context], - ['enter', closingSequence, context], - ['exit', closingSequence, context], - ['exit', group, context] - ]) - - // If there are more markers in the closing, add them after. - if (events[index][1].end.offset - events[index][1].start.offset) { - offset = 2 - nextEvents = push(nextEvents, [ - ['enter', events[index][1], context], - ['exit', events[index][1], context] - ]) - } else { - offset = 0 - } - splice(events, open - 1, index - open + 3, nextEvents) - index = open + nextEvents.length - offset - 2 - break - } - } - } - } - - // Remove remaining sequences. - index = -1 - while (++index < events.length) { - if (events[index][1].type === 'attentionSequence') { - events[index][1].type = 'data' - } - } - return events -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeAttention(effects, ok) { - const attentionMarkers = this.parser.constructs.attentionMarkers.null - const previous = this.previous - const before = classifyCharacter(previous) - - /** @type {NonNullable} */ - let marker - return start - - /** - * Before a sequence. - * - * ```markdown - * > | ** - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - marker = code - effects.enter('attentionSequence') - return inside(code) - } - - /** - * In a sequence. - * - * ```markdown - * > | ** - * ^^ - * ``` - * - * @type {State} - */ - function inside(code) { - if (code === marker) { - effects.consume(code) - return inside - } - const token = effects.exit('attentionSequence') - - // To do: next major: move this to resolver, just like `markdown-rs`. - const after = classifyCharacter(code) - - // Always populated by defaults. - - const open = - !after || (after === 2 && before) || attentionMarkers.includes(code) - const close = - !before || (before === 2 && after) || attentionMarkers.includes(previous) - token._open = Boolean(marker === 42 ? open : open && (before || !close)) - token._close = Boolean(marker === 42 ? close : close && (after || !open)) - return ok(code) - } -} - -/** - * Move a point a bit. - * - * Note: `move` only works inside lines! It’s not possible to move past other - * chunks (replacement characters, tabs, or line endings). - * - * @param {Point} point - * @param {number} offset - * @returns {void} - */ -function movePoint(point, offset) { - point.column += offset - point.offset += offset - point._bufferIndex += offset -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/autolink.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - -/** @type {Construct} */ -const autolink = { - name: 'autolink', - tokenize: tokenizeAutolink -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeAutolink(effects, ok, nok) { - let size = 0 - return start - - /** - * Start of an autolink. - * - * ```markdown - * > | ab - * ^ - * > | ab - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter('autolink') - effects.enter('autolinkMarker') - effects.consume(code) - effects.exit('autolinkMarker') - effects.enter('autolinkProtocol') - return open - } - - /** - * After `<`, at protocol or atext. - * - * ```markdown - * > | ab - * ^ - * > | ab - * ^ - * ``` - * - * @type {State} - */ - function open(code) { - if (asciiAlpha(code)) { - effects.consume(code) - return schemeOrEmailAtext - } - return emailAtext(code) - } - - /** - * At second byte of protocol or atext. - * - * ```markdown - * > | ab - * ^ - * > | ab - * ^ - * ``` - * - * @type {State} - */ - function schemeOrEmailAtext(code) { - // ASCII alphanumeric and `+`, `-`, and `.`. - if (code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code)) { - // Count the previous alphabetical from `open` too. - size = 1 - return schemeInsideOrEmailAtext(code) - } - return emailAtext(code) - } - - /** - * In ambiguous protocol or atext. - * - * ```markdown - * > | ab - * ^ - * > | ab - * ^ - * ``` - * - * @type {State} - */ - function schemeInsideOrEmailAtext(code) { - if (code === 58) { - effects.consume(code) - size = 0 - return urlInside - } - - // ASCII alphanumeric and `+`, `-`, and `.`. - if ( - (code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code)) && - size++ < 32 - ) { - effects.consume(code) - return schemeInsideOrEmailAtext - } - size = 0 - return emailAtext(code) - } - - /** - * After protocol, in URL. - * - * ```markdown - * > | ab - * ^ - * ``` - * - * @type {State} - */ - function urlInside(code) { - if (code === 62) { - effects.exit('autolinkProtocol') - effects.enter('autolinkMarker') - effects.consume(code) - effects.exit('autolinkMarker') - effects.exit('autolink') - return ok - } - - // ASCII control, space, or `<`. - if (code === null || code === 32 || code === 60 || asciiControl(code)) { - return nok(code) - } - effects.consume(code) - return urlInside - } - - /** - * In email atext. - * - * ```markdown - * > | ab - * ^ - * ``` - * - * @type {State} - */ - function emailAtext(code) { - if (code === 64) { - effects.consume(code) - return emailAtSignOrDot - } - if (asciiAtext(code)) { - effects.consume(code) - return emailAtext - } - return nok(code) - } - - /** - * In label, after at-sign or dot. - * - * ```markdown - * > | ab - * ^ ^ - * ``` - * - * @type {State} - */ - function emailAtSignOrDot(code) { - return asciiAlphanumeric(code) ? emailLabel(code) : nok(code) - } - - /** - * In label, where `.` and `>` are allowed. - * - * ```markdown - * > | ab - * ^ - * ``` - * - * @type {State} - */ - function emailLabel(code) { - if (code === 46) { - effects.consume(code) - size = 0 - return emailAtSignOrDot - } - if (code === 62) { - // Exit, then change the token type. - effects.exit('autolinkProtocol').type = 'autolinkEmail' - effects.enter('autolinkMarker') - effects.consume(code) - effects.exit('autolinkMarker') - effects.exit('autolink') - return ok - } - return emailValue(code) - } - - /** - * In label, where `.` and `>` are *not* allowed. - * - * Though, this is also used in `emailLabel` to parse other values. - * - * ```markdown - * > | ab - * ^ - * ``` - * - * @type {State} - */ - function emailValue(code) { - // ASCII alphanumeric or `-`. - if ((code === 45 || asciiAlphanumeric(code)) && size++ < 63) { - const next = code === 45 ? emailValue : emailLabel - effects.consume(code) - return next - } - return nok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/html-text.js -/** - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const htmlText = { - name: 'htmlText', - tokenize: tokenizeHtmlText -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeHtmlText(effects, ok, nok) { - const self = this - /** @type {NonNullable | undefined} */ - let marker - /** @type {number} */ - let index - /** @type {State} */ - let returnState - return start - - /** - * Start of HTML (text). - * - * ```markdown - * > | a c - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter('htmlText') - effects.enter('htmlTextData') - effects.consume(code) - return open - } - - /** - * After `<`, at tag name or other stuff. - * - * ```markdown - * > | a c - * ^ - * > | a c - * ^ - * > | a c - * ^ - * ``` - * - * @type {State} - */ - function open(code) { - if (code === 33) { - effects.consume(code) - return declarationOpen - } - if (code === 47) { - effects.consume(code) - return tagCloseStart - } - if (code === 63) { - effects.consume(code) - return instruction - } - - // ASCII alphabetical. - if (asciiAlpha(code)) { - effects.consume(code) - return tagOpen - } - return nok(code) - } - - /** - * After ` | a c - * ^ - * > | a c - * ^ - * > | a &<]]> c - * ^ - * ``` - * - * @type {State} - */ - function declarationOpen(code) { - if (code === 45) { - effects.consume(code) - return commentOpenInside - } - if (code === 91) { - effects.consume(code) - index = 0 - return cdataOpenInside - } - if (asciiAlpha(code)) { - effects.consume(code) - return declaration - } - return nok(code) - } - - /** - * In a comment, after ` | a c - * ^ - * ``` - * - * @type {State} - */ - function commentOpenInside(code) { - if (code === 45) { - effects.consume(code) - return commentEnd - } - return nok(code) - } - - /** - * In comment. - * - * ```markdown - * > | a c - * ^ - * ``` - * - * @type {State} - */ - function comment(code) { - if (code === null) { - return nok(code) - } - if (code === 45) { - effects.consume(code) - return commentClose - } - if (markdownLineEnding(code)) { - returnState = comment - return lineEndingBefore(code) - } - effects.consume(code) - return comment - } - - /** - * In comment, after `-`. - * - * ```markdown - * > | a c - * ^ - * ``` - * - * @type {State} - */ - function commentClose(code) { - if (code === 45) { - effects.consume(code) - return commentEnd - } - return comment(code) - } - - /** - * In comment, after `--`. - * - * ```markdown - * > | a c - * ^ - * ``` - * - * @type {State} - */ - function commentEnd(code) { - return code === 62 - ? end(code) - : code === 45 - ? commentClose(code) - : comment(code) - } - - /** - * After ` | a &<]]> b - * ^^^^^^ - * ``` - * - * @type {State} - */ - function cdataOpenInside(code) { - const value = 'CDATA[' - if (code === value.charCodeAt(index++)) { - effects.consume(code) - return index === value.length ? cdata : cdataOpenInside - } - return nok(code) - } - - /** - * In CDATA. - * - * ```markdown - * > | a &<]]> b - * ^^^ - * ``` - * - * @type {State} - */ - function cdata(code) { - if (code === null) { - return nok(code) - } - if (code === 93) { - effects.consume(code) - return cdataClose - } - if (markdownLineEnding(code)) { - returnState = cdata - return lineEndingBefore(code) - } - effects.consume(code) - return cdata - } - - /** - * In CDATA, after `]`, at another `]`. - * - * ```markdown - * > | a &<]]> b - * ^ - * ``` - * - * @type {State} - */ - function cdataClose(code) { - if (code === 93) { - effects.consume(code) - return cdataEnd - } - return cdata(code) - } - - /** - * In CDATA, after `]]`, at `>`. - * - * ```markdown - * > | a &<]]> b - * ^ - * ``` - * - * @type {State} - */ - function cdataEnd(code) { - if (code === 62) { - return end(code) - } - if (code === 93) { - effects.consume(code) - return cdataEnd - } - return cdata(code) - } - - /** - * In declaration. - * - * ```markdown - * > | a c - * ^ - * ``` - * - * @type {State} - */ - function declaration(code) { - if (code === null || code === 62) { - return end(code) - } - if (markdownLineEnding(code)) { - returnState = declaration - return lineEndingBefore(code) - } - effects.consume(code) - return declaration - } - - /** - * In instruction. - * - * ```markdown - * > | a c - * ^ - * ``` - * - * @type {State} - */ - function instruction(code) { - if (code === null) { - return nok(code) - } - if (code === 63) { - effects.consume(code) - return instructionClose - } - if (markdownLineEnding(code)) { - returnState = instruction - return lineEndingBefore(code) - } - effects.consume(code) - return instruction - } - - /** - * In instruction, after `?`, at `>`. - * - * ```markdown - * > | a c - * ^ - * ``` - * - * @type {State} - */ - function instructionClose(code) { - return code === 62 ? end(code) : instruction(code) - } - - /** - * After ` | a c - * ^ - * ``` - * - * @type {State} - */ - function tagCloseStart(code) { - // ASCII alphabetical. - if (asciiAlpha(code)) { - effects.consume(code) - return tagClose - } - return nok(code) - } - - /** - * After ` | a c - * ^ - * ``` - * - * @type {State} - */ - function tagClose(code) { - // ASCII alphanumerical and `-`. - if (code === 45 || asciiAlphanumeric(code)) { - effects.consume(code) - return tagClose - } - return tagCloseBetween(code) - } - - /** - * In closing tag, after tag name. - * - * ```markdown - * > | a
    c - * ^ - * ``` - * - * @type {State} - */ - function tagCloseBetween(code) { - if (markdownLineEnding(code)) { - returnState = tagCloseBetween - return lineEndingBefore(code) - } - if (markdownSpace(code)) { - effects.consume(code) - return tagCloseBetween - } - return end(code) - } - - /** - * After ` | a c - * ^ - * ``` - * - * @type {State} - */ - function tagOpen(code) { - // ASCII alphanumerical and `-`. - if (code === 45 || asciiAlphanumeric(code)) { - effects.consume(code) - return tagOpen - } - if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) { - return tagOpenBetween(code) - } - return nok(code) - } - - /** - * In opening tag, after tag name. - * - * ```markdown - * > | a c - * ^ - * ``` - * - * @type {State} - */ - function tagOpenBetween(code) { - if (code === 47) { - effects.consume(code) - return end - } - - // ASCII alphabetical and `:` and `_`. - if (code === 58 || code === 95 || asciiAlpha(code)) { - effects.consume(code) - return tagOpenAttributeName - } - if (markdownLineEnding(code)) { - returnState = tagOpenBetween - return lineEndingBefore(code) - } - if (markdownSpace(code)) { - effects.consume(code) - return tagOpenBetween - } - return end(code) - } - - /** - * In attribute name. - * - * ```markdown - * > | a d - * ^ - * ``` - * - * @type {State} - */ - function tagOpenAttributeName(code) { - // ASCII alphabetical and `-`, `.`, `:`, and `_`. - if ( - code === 45 || - code === 46 || - code === 58 || - code === 95 || - asciiAlphanumeric(code) - ) { - effects.consume(code) - return tagOpenAttributeName - } - return tagOpenAttributeNameAfter(code) - } - - /** - * After attribute name, before initializer, the end of the tag, or - * whitespace. - * - * ```markdown - * > | a d - * ^ - * ``` - * - * @type {State} - */ - function tagOpenAttributeNameAfter(code) { - if (code === 61) { - effects.consume(code) - return tagOpenAttributeValueBefore - } - if (markdownLineEnding(code)) { - returnState = tagOpenAttributeNameAfter - return lineEndingBefore(code) - } - if (markdownSpace(code)) { - effects.consume(code) - return tagOpenAttributeNameAfter - } - return tagOpenBetween(code) - } - - /** - * Before unquoted, double quoted, or single quoted attribute value, allowing - * whitespace. - * - * ```markdown - * > | a e - * ^ - * ``` - * - * @type {State} - */ - function tagOpenAttributeValueBefore(code) { - if ( - code === null || - code === 60 || - code === 61 || - code === 62 || - code === 96 - ) { - return nok(code) - } - if (code === 34 || code === 39) { - effects.consume(code) - marker = code - return tagOpenAttributeValueQuoted - } - if (markdownLineEnding(code)) { - returnState = tagOpenAttributeValueBefore - return lineEndingBefore(code) - } - if (markdownSpace(code)) { - effects.consume(code) - return tagOpenAttributeValueBefore - } - effects.consume(code) - return tagOpenAttributeValueUnquoted - } - - /** - * In double or single quoted attribute value. - * - * ```markdown - * > | a e - * ^ - * ``` - * - * @type {State} - */ - function tagOpenAttributeValueQuoted(code) { - if (code === marker) { - effects.consume(code) - marker = undefined - return tagOpenAttributeValueQuotedAfter - } - if (code === null) { - return nok(code) - } - if (markdownLineEnding(code)) { - returnState = tagOpenAttributeValueQuoted - return lineEndingBefore(code) - } - effects.consume(code) - return tagOpenAttributeValueQuoted - } - - /** - * In unquoted attribute value. - * - * ```markdown - * > | a e - * ^ - * ``` - * - * @type {State} - */ - function tagOpenAttributeValueUnquoted(code) { - if ( - code === null || - code === 34 || - code === 39 || - code === 60 || - code === 61 || - code === 96 - ) { - return nok(code) - } - if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) { - return tagOpenBetween(code) - } - effects.consume(code) - return tagOpenAttributeValueUnquoted - } - - /** - * After double or single quoted attribute value, before whitespace or the end - * of the tag. - * - * ```markdown - * > | a e - * ^ - * ``` - * - * @type {State} - */ - function tagOpenAttributeValueQuotedAfter(code) { - if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) { - return tagOpenBetween(code) - } - return nok(code) - } - - /** - * In certain circumstances of a tag where only an `>` is allowed. - * - * ```markdown - * > | a e - * ^ - * ``` - * - * @type {State} - */ - function end(code) { - if (code === 62) { - effects.consume(code) - effects.exit('htmlTextData') - effects.exit('htmlText') - return ok - } - return nok(code) - } - - /** - * At eol. - * - * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about - * > empty tokens. - * - * ```markdown - * > | a - * ``` - * - * @type {State} - */ - function lineEndingBefore(code) { - effects.exit('htmlTextData') - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return lineEndingAfter - } - - /** - * After eol, at optional whitespace. - * - * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about - * > empty tokens. - * - * ```markdown - * | a - * ^ - * ``` - * - * @type {State} - */ - function lineEndingAfter(code) { - // Always populated by defaults. - - return markdownSpace(code) - ? factorySpace( - effects, - lineEndingAfterPrefix, - 'linePrefix', - self.parser.constructs.disable.null.includes('codeIndented') - ? undefined - : 4 - )(code) - : lineEndingAfterPrefix(code) - } - - /** - * After eol, after optional whitespace. - * - * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about - * > empty tokens. - * - * ```markdown - * | a - * ^ - * ``` - * - * @type {State} - */ - function lineEndingAfterPrefix(code) { - effects.enter('htmlTextData') - return returnState(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/label-start-link.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const labelStartLink = { - name: 'labelStartLink', - tokenize: tokenizeLabelStartLink, - resolveAll: labelEnd.resolveAll -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeLabelStartLink(effects, ok, nok) { - const self = this - return start - - /** - * Start of label (link) start. - * - * ```markdown - * > | a [b] c - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter('labelLink') - effects.enter('labelMarker') - effects.consume(code) - effects.exit('labelMarker') - effects.exit('labelLink') - return after - } - - /** @type {State} */ - function after(code) { - // To do: this isn’t needed in `micromark-extension-gfm-footnote`, - // remove. - // Hidden footnotes hook. - /* c8 ignore next 3 */ - return code === 94 && '_hiddenFootnoteSupport' in self.parser.constructs - ? nok(code) - : ok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/hard-break-escape.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - -/** @type {Construct} */ -const hardBreakEscape = { - name: 'hardBreakEscape', - tokenize: tokenizeHardBreakEscape -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeHardBreakEscape(effects, ok, nok) { - return start - - /** - * Start of a hard break (escape). - * - * ```markdown - * > | a\ - * ^ - * | b - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter('hardBreakEscape') - effects.consume(code) - return after - } - - /** - * After `\`, at eol. - * - * ```markdown - * > | a\ - * ^ - * | b - * ``` - * - * @type {State} - */ - function after(code) { - if (markdownLineEnding(code)) { - effects.exit('hardBreakEscape') - return ok(code) - } - return nok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/code-text.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').Previous} Previous - * @typedef {import('micromark-util-types').Resolver} Resolver - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').Token} Token - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - -/** @type {Construct} */ -const codeText = { - name: 'codeText', - tokenize: tokenizeCodeText, - resolve: resolveCodeText, - previous -} - -// To do: next major: don’t resolve, like `markdown-rs`. -/** @type {Resolver} */ -function resolveCodeText(events) { - let tailExitIndex = events.length - 4 - let headEnterIndex = 3 - /** @type {number} */ - let index - /** @type {number | undefined} */ - let enter - - // If we start and end with an EOL or a space. - if ( - (events[headEnterIndex][1].type === 'lineEnding' || - events[headEnterIndex][1].type === 'space') && - (events[tailExitIndex][1].type === 'lineEnding' || - events[tailExitIndex][1].type === 'space') - ) { - index = headEnterIndex - - // And we have data. - while (++index < tailExitIndex) { - if (events[index][1].type === 'codeTextData') { - // Then we have padding. - events[headEnterIndex][1].type = 'codeTextPadding' - events[tailExitIndex][1].type = 'codeTextPadding' - headEnterIndex += 2 - tailExitIndex -= 2 - break - } - } - } - - // Merge adjacent spaces and data. - index = headEnterIndex - 1 - tailExitIndex++ - while (++index <= tailExitIndex) { - if (enter === undefined) { - if (index !== tailExitIndex && events[index][1].type !== 'lineEnding') { - enter = index - } - } else if ( - index === tailExitIndex || - events[index][1].type === 'lineEnding' - ) { - events[enter][1].type = 'codeTextData' - if (index !== enter + 2) { - events[enter][1].end = events[index - 1][1].end - events.splice(enter + 2, index - enter - 2) - tailExitIndex -= index - enter - 2 - index = enter + 2 - } - enter = undefined - } - } - return events -} - -/** - * @this {TokenizeContext} - * @type {Previous} - */ -function previous(code) { - // If there is a previous code, there will always be a tail. - return ( - code !== 96 || - this.events[this.events.length - 1][1].type === 'characterEscape' - ) -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeCodeText(effects, ok, nok) { - const self = this - let sizeOpen = 0 - /** @type {number} */ - let size - /** @type {Token} */ - let token - return start - - /** - * Start of code (text). - * - * ```markdown - * > | `a` - * ^ - * > | \`a` - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter('codeText') - effects.enter('codeTextSequence') - return sequenceOpen(code) - } - - /** - * In opening sequence. - * - * ```markdown - * > | `a` - * ^ - * ``` - * - * @type {State} - */ - function sequenceOpen(code) { - if (code === 96) { - effects.consume(code) - sizeOpen++ - return sequenceOpen - } - effects.exit('codeTextSequence') - return between(code) - } - - /** - * Between something and something else. - * - * ```markdown - * > | `a` - * ^^ - * ``` - * - * @type {State} - */ - function between(code) { - // EOF. - if (code === null) { - return nok(code) - } - - // To do: next major: don’t do spaces in resolve, but when compiling, - // like `markdown-rs`. - // Tabs don’t work, and virtual spaces don’t make sense. - if (code === 32) { - effects.enter('space') - effects.consume(code) - effects.exit('space') - return between - } - - // Closing fence? Could also be data. - if (code === 96) { - token = effects.enter('codeTextSequence') - size = 0 - return sequenceClose(code) - } - if (markdownLineEnding(code)) { - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return between - } - - // Data. - effects.enter('codeTextData') - return data(code) - } - - /** - * In data. - * - * ```markdown - * > | `a` - * ^ - * ``` - * - * @type {State} - */ - function data(code) { - if ( - code === null || - code === 32 || - code === 96 || - markdownLineEnding(code) - ) { - effects.exit('codeTextData') - return between(code) - } - effects.consume(code) - return data - } - - /** - * In closing sequence. - * - * ```markdown - * > | `a` - * ^ - * ``` - * - * @type {State} - */ - function sequenceClose(code) { - // More. - if (code === 96) { - effects.consume(code) - size++ - return sequenceClose - } - - // Done! - if (size === sizeOpen) { - effects.exit('codeTextSequence') - effects.exit('codeText') - return ok(code) - } - - // More or less accents: mark as data. - token.type = 'codeTextData' - return data(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/constructs.js -/** - * @typedef {import('micromark-util-types').Extension} Extension - */ - - - - -/** @satisfies {Extension['document']} */ -const constructs_document = { - [42]: list, - [43]: list, - [45]: list, - [48]: list, - [49]: list, - [50]: list, - [51]: list, - [52]: list, - [53]: list, - [54]: list, - [55]: list, - [56]: list, - [57]: list, - [62]: blockQuote -} - -/** @satisfies {Extension['contentInitial']} */ -const contentInitial = { - [91]: definition -} - -/** @satisfies {Extension['flowInitial']} */ -const flowInitial = { - [-2]: codeIndented, - [-1]: codeIndented, - [32]: codeIndented -} - -/** @satisfies {Extension['flow']} */ -const constructs_flow = { - [35]: headingAtx, - [42]: thematicBreak, - [45]: [setextUnderline, thematicBreak], - [60]: htmlFlow, - [61]: setextUnderline, - [95]: thematicBreak, - [96]: codeFenced, - [126]: codeFenced -} - -/** @satisfies {Extension['string']} */ -const constructs_string = { - [38]: characterReference, - [92]: characterEscape -} - -/** @satisfies {Extension['text']} */ -const constructs_text = { - [-5]: lineEnding, - [-4]: lineEnding, - [-3]: lineEnding, - [33]: labelStartImage, - [38]: characterReference, - [42]: attention, - [60]: [autolink, htmlText], - [91]: labelStartLink, - [92]: [hardBreakEscape, characterEscape], - [93]: labelEnd, - [95]: attention, - [96]: codeText -} - -/** @satisfies {Extension['insideSpan']} */ -const insideSpan = { - null: [attention, resolver] -} - -/** @satisfies {Extension['attentionMarkers']} */ -const attentionMarkers = { - null: [42, 95] -} - -/** @satisfies {Extension['disable']} */ -const disable = { - null: [] -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/parse.js -/** - * @typedef {import('micromark-util-types').Create} Create - * @typedef {import('micromark-util-types').FullNormalizedExtension} FullNormalizedExtension - * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct - * @typedef {import('micromark-util-types').ParseContext} ParseContext - * @typedef {import('micromark-util-types').ParseOptions} ParseOptions - */ - - - - - - - - - -/** - * @param {ParseOptions | null | undefined} [options] - * @returns {ParseContext} - */ -function parse(options) { - const settings = options || {} - const constructs = - /** @type {FullNormalizedExtension} */ - combineExtensions([constructs_namespaceObject, ...(settings.extensions || [])]) - - /** @type {ParseContext} */ - const parser = { - defined: [], - lazy: {}, - constructs, - content: create(content), - document: create(document_document), - flow: create(flow), - string: create(string), - text: create(text_text) - } - return parser - - /** - * @param {InitialConstruct} initial - */ - function create(initial) { - return creator - /** @type {Create} */ - function creator(from) { - return createTokenizer(parser, initial, from) - } - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/preprocess.js -/** - * @typedef {import('micromark-util-types').Chunk} Chunk - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Encoding} Encoding - * @typedef {import('micromark-util-types').Value} Value - */ - -/** - * @callback Preprocessor - * @param {Value} value - * @param {Encoding | null | undefined} [encoding] - * @param {boolean | null | undefined} [end=false] - * @returns {Array} - */ - -const search = /[\0\t\n\r]/g - -/** - * @returns {Preprocessor} - */ -function preprocess() { - let column = 1 - let buffer = '' - /** @type {boolean | undefined} */ - let start = true - /** @type {boolean | undefined} */ - let atCarriageReturn - return preprocessor - - /** @type {Preprocessor} */ - function preprocessor(value, encoding, end) { - /** @type {Array} */ - const chunks = [] - /** @type {RegExpMatchArray | null} */ - let match - /** @type {number} */ - let next - /** @type {number} */ - let startPosition - /** @type {number} */ - let endPosition - /** @type {Code} */ - let code - - // @ts-expect-error `Buffer` does allow an encoding. - value = buffer + value.toString(encoding) - startPosition = 0 - buffer = '' - if (start) { - // To do: `markdown-rs` actually parses BOMs (byte order mark). - if (value.charCodeAt(0) === 65279) { - startPosition++ - } - start = undefined - } - while (startPosition < value.length) { - search.lastIndex = startPosition - match = search.exec(value) - endPosition = - match && match.index !== undefined ? match.index : value.length - code = value.charCodeAt(endPosition) - if (!match) { - buffer = value.slice(startPosition) - break - } - if (code === 10 && startPosition === endPosition && atCarriageReturn) { - chunks.push(-3) - atCarriageReturn = undefined - } else { - if (atCarriageReturn) { - chunks.push(-5) - atCarriageReturn = undefined - } - if (startPosition < endPosition) { - chunks.push(value.slice(startPosition, endPosition)) - column += endPosition - startPosition - } - switch (code) { - case 0: { - chunks.push(65533) - column++ - break - } - case 9: { - next = Math.ceil(column / 4) * 4 - chunks.push(-2) - while (column++ < next) chunks.push(-1) - break - } - case 10: { - chunks.push(-4) - column = 1 - break - } - default: { - atCarriageReturn = true - column = 1 - } - } - } - startPosition = endPosition + 1 - } - if (end) { - if (atCarriageReturn) chunks.push(-5) - if (buffer) chunks.push(buffer) - chunks.push(null) - } - return chunks - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/postprocess.js -/** - * @typedef {import('micromark-util-types').Event} Event - */ - - - -/** - * @param {Array} events - * @returns {Array} - */ -function postprocess(events) { - while (!subtokenize(events)) { - // Empty - } - return events -} - -;// CONCATENATED MODULE: ./node_modules/micromark-util-decode-numeric-character-reference/index.js -/** - * Turn the number (in string form as either hexa- or plain decimal) coming from - * a numeric character reference into a character. - * - * Sort of like `String.fromCharCode(Number.parseInt(value, base))`, but makes - * non-characters and control characters safe. - * - * @param {string} value - * Value to decode. - * @param {number} base - * Numeric base. - * @returns {string} - * Character. - */ -function decodeNumericCharacterReference(value, base) { - const code = Number.parseInt(value, base) - if ( - // C0 except for HT, LF, FF, CR, space. - code < 9 || - code === 11 || - (code > 13 && code < 32) || - // Control character (DEL) of C0, and C1 controls. - (code > 126 && code < 160) || - // Lone high surrogates and low surrogates. - (code > 55295 && code < 57344) || - // Noncharacters. - (code > 64975 && code < 65008) /* eslint-disable no-bitwise */ || - (code & 65535) === 65535 || - (code & 65535) === 65534 /* eslint-enable no-bitwise */ || - // Out of range - code > 1114111 - ) { - return '\uFFFD' - } - return String.fromCharCode(code) -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-decode-string/index.js - - -const characterEscapeOrReference = - /\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi - -/** - * Decode markdown strings (which occur in places such as fenced code info - * strings, destinations, labels, and titles). - * - * The “string” content type allows character escapes and -references. - * This decodes those. - * - * @param {string} value - * Value to decode. - * @returns {string} - * Decoded value. - */ -function decodeString(value) { - return value.replace(characterEscapeOrReference, decode) -} - -/** - * @param {string} $0 - * @param {string} $1 - * @param {string} $2 - * @returns {string} - */ -function decode($0, $1, $2) { - if ($1) { - // Escape. - return $1 - } - - // Reference. - const head = $2.charCodeAt(0) - if (head === 35) { - const head = $2.charCodeAt(1) - const hex = head === 120 || head === 88 - return decodeNumericCharacterReference($2.slice(hex ? 2 : 1), hex ? 16 : 10) - } - return decodeNamedCharacterReference($2) || $0 -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/unist-util-stringify-position/lib/index.js -/** - * @typedef {import('unist').Node} Node - * @typedef {import('unist').Point} Point - * @typedef {import('unist').Position} Position - */ - -/** - * @typedef NodeLike - * @property {string} type - * @property {PositionLike | null | undefined} [position] - * - * @typedef PositionLike - * @property {PointLike | null | undefined} [start] - * @property {PointLike | null | undefined} [end] - * - * @typedef PointLike - * @property {number | null | undefined} [line] - * @property {number | null | undefined} [column] - * @property {number | null | undefined} [offset] - */ - -/** - * Serialize the positional info of a point, position (start and end points), - * or node. - * - * @param {Node | NodeLike | Position | PositionLike | Point | PointLike | null | undefined} [value] - * Node, position, or point. - * @returns {string} - * Pretty printed positional info of a node (`string`). - * - * In the format of a range `ls:cs-le:ce` (when given `node` or `position`) - * or a point `l:c` (when given `point`), where `l` stands for line, `c` for - * column, `s` for `start`, and `e` for end. - * An empty string (`''`) is returned if the given value is neither `node`, - * `position`, nor `point`. - */ -function stringifyPosition(value) { - // Nothing. - if (!value || typeof value !== 'object') { - return '' - } - - // Node. - if ('position' in value || 'type' in value) { - return position(value.position) - } - - // Position. - if ('start' in value || 'end' in value) { - return position(value) - } - - // Point. - if ('line' in value || 'column' in value) { - return point(value) - } - - // ? - return '' -} - -/** - * @param {Point | PointLike | null | undefined} point - * @returns {string} - */ -function point(point) { - return index(point && point.line) + ':' + index(point && point.column) -} - -/** - * @param {Position | PositionLike | null | undefined} pos - * @returns {string} - */ -function position(pos) { - return point(pos && pos.start) + '-' + point(pos && pos.end) -} - -/** - * @param {number | null | undefined} value - * @returns {number} - */ -function index(value) { - return value && typeof value === 'number' ? value : 1 -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/mdast-util-from-markdown/lib/index.js -/** - * @typedef {import('micromark-util-types').Encoding} Encoding - * @typedef {import('micromark-util-types').Event} Event - * @typedef {import('micromark-util-types').ParseOptions} ParseOptions - * @typedef {import('micromark-util-types').Token} Token - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Value} Value - * - * @typedef {import('unist').Parent} UnistParent - * @typedef {import('unist').Point} Point - * - * @typedef {import('mdast').PhrasingContent} PhrasingContent - * @typedef {import('mdast').StaticPhrasingContent} StaticPhrasingContent - * @typedef {import('mdast').Content} Content - * @typedef {import('mdast').Break} Break - * @typedef {import('mdast').Blockquote} Blockquote - * @typedef {import('mdast').Code} Code - * @typedef {import('mdast').Definition} Definition - * @typedef {import('mdast').Emphasis} Emphasis - * @typedef {import('mdast').Heading} Heading - * @typedef {import('mdast').HTML} HTML - * @typedef {import('mdast').Image} Image - * @typedef {import('mdast').ImageReference} ImageReference - * @typedef {import('mdast').InlineCode} InlineCode - * @typedef {import('mdast').Link} Link - * @typedef {import('mdast').LinkReference} LinkReference - * @typedef {import('mdast').List} List - * @typedef {import('mdast').ListItem} ListItem - * @typedef {import('mdast').Paragraph} Paragraph - * @typedef {import('mdast').Root} Root - * @typedef {import('mdast').Strong} Strong - * @typedef {import('mdast').Text} Text - * @typedef {import('mdast').ThematicBreak} ThematicBreak - * @typedef {import('mdast').ReferenceType} ReferenceType - * @typedef {import('../index.js').CompileData} CompileData - */ - -/** - * @typedef {Root | Content} Node - * @typedef {Extract} Parent - * - * @typedef {Omit & {type: 'fragment', children: Array}} Fragment - */ - -/** - * @callback Transform - * Extra transform, to change the AST afterwards. - * @param {Root} tree - * Tree to transform. - * @returns {Root | undefined | null | void} - * New tree or nothing (in which case the current tree is used). - * - * @callback Handle - * Handle a token. - * @param {CompileContext} this - * Context. - * @param {Token} token - * Current token. - * @returns {void} - * Nothing. - * - * @typedef {Record} Handles - * Token types mapping to handles - * - * @callback OnEnterError - * Handle the case where the `right` token is open, but it is closed (by the - * `left` token) or because we reached the end of the document. - * @param {Omit} this - * Context. - * @param {Token | undefined} left - * Left token. - * @param {Token} right - * Right token. - * @returns {void} - * Nothing. - * - * @callback OnExitError - * Handle the case where the `right` token is open but it is closed by - * exiting the `left` token. - * @param {Omit} this - * Context. - * @param {Token} left - * Left token. - * @param {Token} right - * Right token. - * @returns {void} - * Nothing. - * - * @typedef {[Token, OnEnterError | undefined]} TokenTuple - * Open token on the stack, with an optional error handler for when - * that token isn’t closed properly. - */ - -/** - * @typedef Config - * Configuration. - * - * We have our defaults, but extensions will add more. - * @property {Array} canContainEols - * Token types where line endings are used. - * @property {Handles} enter - * Opening handles. - * @property {Handles} exit - * Closing handles. - * @property {Array} transforms - * Tree transforms. - * - * @typedef {Partial} Extension - * Change how markdown tokens from micromark are turned into mdast. - * - * @typedef CompileContext - * mdast compiler context. - * @property {Array} stack - * Stack of nodes. - * @property {Array} tokenStack - * Stack of tokens. - * @property {(key: Key) => CompileData[Key]} getData - * Get data from the key/value store. - * @property {(key: Key, value?: CompileData[Key]) => void} setData - * Set data into the key/value store. - * @property {(this: CompileContext) => void} buffer - * Capture some of the output data. - * @property {(this: CompileContext) => string} resume - * Stop capturing and access the output data. - * @property {(this: CompileContext, node: Kind, token: Token, onError?: OnEnterError) => Kind} enter - * Enter a token. - * @property {(this: CompileContext, token: Token, onError?: OnExitError) => Node} exit - * Exit a token. - * @property {TokenizeContext['sliceSerialize']} sliceSerialize - * Get the string value of a token. - * @property {Config} config - * Configuration. - * - * @typedef FromMarkdownOptions - * Configuration for how to build mdast. - * @property {Array> | null | undefined} [mdastExtensions] - * Extensions for this utility to change how tokens are turned into a tree. - * - * @typedef {ParseOptions & FromMarkdownOptions} Options - * Configuration. - */ - -// To do: micromark: create a registry of tokens? -// To do: next major: don’t return given `Node` from `enter`. -// To do: next major: remove setter/getter. - - - - - - - - - - -const lib_own = {}.hasOwnProperty - -/** - * @param value - * Markdown to parse. - * @param encoding - * Character encoding for when `value` is `Buffer`. - * @param options - * Configuration. - * @returns - * mdast tree. - */ -const fromMarkdown = - /** - * @type {( - * ((value: Value, encoding: Encoding, options?: Options | null | undefined) => Root) & - * ((value: Value, options?: Options | null | undefined) => Root) - * )} - */ - - /** - * @param {Value} value - * @param {Encoding | Options | null | undefined} [encoding] - * @param {Options | null | undefined} [options] - * @returns {Root} - */ - function (value, encoding, options) { - if (typeof encoding !== 'string') { - options = encoding - encoding = undefined - } - return compiler(options)( - postprocess( - parse(options).document().write(preprocess()(value, encoding, true)) - ) - ) - } - -/** - * Note this compiler only understand complete buffering, not streaming. - * - * @param {Options | null | undefined} [options] - */ -function compiler(options) { - /** @type {Config} */ - const config = { - transforms: [], - canContainEols: ['emphasis', 'fragment', 'heading', 'paragraph', 'strong'], - enter: { - autolink: opener(link), - autolinkProtocol: onenterdata, - autolinkEmail: onenterdata, - atxHeading: opener(heading), - blockQuote: opener(blockQuote), - characterEscape: onenterdata, - characterReference: onenterdata, - codeFenced: opener(codeFlow), - codeFencedFenceInfo: buffer, - codeFencedFenceMeta: buffer, - codeIndented: opener(codeFlow, buffer), - codeText: opener(codeText, buffer), - codeTextData: onenterdata, - data: onenterdata, - codeFlowValue: onenterdata, - definition: opener(definition), - definitionDestinationString: buffer, - definitionLabelString: buffer, - definitionTitleString: buffer, - emphasis: opener(emphasis), - hardBreakEscape: opener(hardBreak), - hardBreakTrailing: opener(hardBreak), - htmlFlow: opener(html, buffer), - htmlFlowData: onenterdata, - htmlText: opener(html, buffer), - htmlTextData: onenterdata, - image: opener(image), - label: buffer, - link: opener(link), - listItem: opener(listItem), - listItemValue: onenterlistitemvalue, - listOrdered: opener(list, onenterlistordered), - listUnordered: opener(list), - paragraph: opener(paragraph), - reference: onenterreference, - referenceString: buffer, - resourceDestinationString: buffer, - resourceTitleString: buffer, - setextHeading: opener(heading), - strong: opener(strong), - thematicBreak: opener(thematicBreak) - }, - exit: { - atxHeading: closer(), - atxHeadingSequence: onexitatxheadingsequence, - autolink: closer(), - autolinkEmail: onexitautolinkemail, - autolinkProtocol: onexitautolinkprotocol, - blockQuote: closer(), - characterEscapeValue: onexitdata, - characterReferenceMarkerHexadecimal: onexitcharacterreferencemarker, - characterReferenceMarkerNumeric: onexitcharacterreferencemarker, - characterReferenceValue: onexitcharacterreferencevalue, - codeFenced: closer(onexitcodefenced), - codeFencedFence: onexitcodefencedfence, - codeFencedFenceInfo: onexitcodefencedfenceinfo, - codeFencedFenceMeta: onexitcodefencedfencemeta, - codeFlowValue: onexitdata, - codeIndented: closer(onexitcodeindented), - codeText: closer(onexitcodetext), - codeTextData: onexitdata, - data: onexitdata, - definition: closer(), - definitionDestinationString: onexitdefinitiondestinationstring, - definitionLabelString: onexitdefinitionlabelstring, - definitionTitleString: onexitdefinitiontitlestring, - emphasis: closer(), - hardBreakEscape: closer(onexithardbreak), - hardBreakTrailing: closer(onexithardbreak), - htmlFlow: closer(onexithtmlflow), - htmlFlowData: onexitdata, - htmlText: closer(onexithtmltext), - htmlTextData: onexitdata, - image: closer(onexitimage), - label: onexitlabel, - labelText: onexitlabeltext, - lineEnding: onexitlineending, - link: closer(onexitlink), - listItem: closer(), - listOrdered: closer(), - listUnordered: closer(), - paragraph: closer(), - referenceString: onexitreferencestring, - resourceDestinationString: onexitresourcedestinationstring, - resourceTitleString: onexitresourcetitlestring, - resource: onexitresource, - setextHeading: closer(onexitsetextheading), - setextHeadingLineSequence: onexitsetextheadinglinesequence, - setextHeadingText: onexitsetextheadingtext, - strong: closer(), - thematicBreak: closer() - } - } - configure(config, (options || {}).mdastExtensions || []) - - /** @type {CompileData} */ - const data = {} - return compile - - /** - * Turn micromark events into an mdast tree. - * - * @param {Array} events - * Events. - * @returns {Root} - * mdast tree. - */ - function compile(events) { - /** @type {Root} */ - let tree = { - type: 'root', - children: [] - } - /** @type {Omit} */ - const context = { - stack: [tree], - tokenStack: [], - config, - enter, - exit, - buffer, - resume, - setData, - getData - } - /** @type {Array} */ - const listStack = [] - let index = -1 - while (++index < events.length) { - // We preprocess lists to add `listItem` tokens, and to infer whether - // items the list itself are spread out. - if ( - events[index][1].type === 'listOrdered' || - events[index][1].type === 'listUnordered' - ) { - if (events[index][0] === 'enter') { - listStack.push(index) - } else { - const tail = listStack.pop() - index = prepareList(events, tail, index) - } - } - } - index = -1 - while (++index < events.length) { - const handler = config[events[index][0]] - if (lib_own.call(handler, events[index][1].type)) { - handler[events[index][1].type].call( - Object.assign( - { - sliceSerialize: events[index][2].sliceSerialize - }, - context - ), - events[index][1] - ) - } - } - - // Handle tokens still being open. - if (context.tokenStack.length > 0) { - const tail = context.tokenStack[context.tokenStack.length - 1] - const handler = tail[1] || defaultOnError - handler.call(context, undefined, tail[0]) - } - - // Figure out `root` position. - tree.position = { - start: lib_point( - events.length > 0 - ? events[0][1].start - : { - line: 1, - column: 1, - offset: 0 - } - ), - end: lib_point( - events.length > 0 - ? events[events.length - 2][1].end - : { - line: 1, - column: 1, - offset: 0 - } - ) - } - - // Call transforms. - index = -1 - while (++index < config.transforms.length) { - tree = config.transforms[index](tree) || tree - } - return tree - } - - /** - * @param {Array} events - * @param {number} start - * @param {number} length - * @returns {number} - */ - function prepareList(events, start, length) { - let index = start - 1 - let containerBalance = -1 - let listSpread = false - /** @type {Token | undefined} */ - let listItem - /** @type {number | undefined} */ - let lineIndex - /** @type {number | undefined} */ - let firstBlankLineIndex - /** @type {boolean | undefined} */ - let atMarker - while (++index <= length) { - const event = events[index] - if ( - event[1].type === 'listUnordered' || - event[1].type === 'listOrdered' || - event[1].type === 'blockQuote' - ) { - if (event[0] === 'enter') { - containerBalance++ - } else { - containerBalance-- - } - atMarker = undefined - } else if (event[1].type === 'lineEndingBlank') { - if (event[0] === 'enter') { - if ( - listItem && - !atMarker && - !containerBalance && - !firstBlankLineIndex - ) { - firstBlankLineIndex = index - } - atMarker = undefined - } - } else if ( - event[1].type === 'linePrefix' || - event[1].type === 'listItemValue' || - event[1].type === 'listItemMarker' || - event[1].type === 'listItemPrefix' || - event[1].type === 'listItemPrefixWhitespace' - ) { - // Empty. - } else { - atMarker = undefined - } - if ( - (!containerBalance && - event[0] === 'enter' && - event[1].type === 'listItemPrefix') || - (containerBalance === -1 && - event[0] === 'exit' && - (event[1].type === 'listUnordered' || - event[1].type === 'listOrdered')) - ) { - if (listItem) { - let tailIndex = index - lineIndex = undefined - while (tailIndex--) { - const tailEvent = events[tailIndex] - if ( - tailEvent[1].type === 'lineEnding' || - tailEvent[1].type === 'lineEndingBlank' - ) { - if (tailEvent[0] === 'exit') continue - if (lineIndex) { - events[lineIndex][1].type = 'lineEndingBlank' - listSpread = true - } - tailEvent[1].type = 'lineEnding' - lineIndex = tailIndex - } else if ( - tailEvent[1].type === 'linePrefix' || - tailEvent[1].type === 'blockQuotePrefix' || - tailEvent[1].type === 'blockQuotePrefixWhitespace' || - tailEvent[1].type === 'blockQuoteMarker' || - tailEvent[1].type === 'listItemIndent' - ) { - // Empty - } else { - break - } - } - if ( - firstBlankLineIndex && - (!lineIndex || firstBlankLineIndex < lineIndex) - ) { - listItem._spread = true - } - - // Fix position. - listItem.end = Object.assign( - {}, - lineIndex ? events[lineIndex][1].start : event[1].end - ) - events.splice(lineIndex || index, 0, ['exit', listItem, event[2]]) - index++ - length++ - } - - // Create a new list item. - if (event[1].type === 'listItemPrefix') { - listItem = { - type: 'listItem', - _spread: false, - start: Object.assign({}, event[1].start), - // @ts-expect-error: we’ll add `end` in a second. - end: undefined - } - // @ts-expect-error: `listItem` is most definitely defined, TS... - events.splice(index, 0, ['enter', listItem, event[2]]) - index++ - length++ - firstBlankLineIndex = undefined - atMarker = true - } - } - } - events[start][1]._spread = listSpread - return length - } - - /** - * Set data. - * - * @template {keyof CompileData} Key - * Field type. - * @param {Key} key - * Key of field. - * @param {CompileData[Key]} [value] - * New value. - * @returns {void} - * Nothing. - */ - function setData(key, value) { - data[key] = value - } - - /** - * Get data. - * - * @template {keyof CompileData} Key - * Field type. - * @param {Key} key - * Key of field. - * @returns {CompileData[Key]} - * Value. - */ - function getData(key) { - return data[key] - } - - /** - * Create an opener handle. - * - * @param {(token: Token) => Node} create - * Create a node. - * @param {Handle} [and] - * Optional function to also run. - * @returns {Handle} - * Handle. - */ - function opener(create, and) { - return open - - /** - * @this {CompileContext} - * @param {Token} token - * @returns {void} - */ - function open(token) { - enter.call(this, create(token), token) - if (and) and.call(this, token) - } - } - - /** - * @this {CompileContext} - * @returns {void} - */ - function buffer() { - this.stack.push({ - type: 'fragment', - children: [] - }) - } - - /** - * @template {Node} Kind - * Node type. - * @this {CompileContext} - * Context. - * @param {Kind} node - * Node to enter. - * @param {Token} token - * Corresponding token. - * @param {OnEnterError | undefined} [errorHandler] - * Handle the case where this token is open, but it is closed by something else. - * @returns {Kind} - * The given node. - */ - function enter(node, token, errorHandler) { - const parent = this.stack[this.stack.length - 1] - // @ts-expect-error: Assume `Node` can exist as a child of `parent`. - parent.children.push(node) - this.stack.push(node) - this.tokenStack.push([token, errorHandler]) - // @ts-expect-error: `end` will be patched later. - node.position = { - start: lib_point(token.start) - } - return node - } - - /** - * Create a closer handle. - * - * @param {Handle} [and] - * Optional function to also run. - * @returns {Handle} - * Handle. - */ - function closer(and) { - return close - - /** - * @this {CompileContext} - * @param {Token} token - * @returns {void} - */ - function close(token) { - if (and) and.call(this, token) - exit.call(this, token) - } - } - - /** - * @this {CompileContext} - * Context. - * @param {Token} token - * Corresponding token. - * @param {OnExitError | undefined} [onExitError] - * Handle the case where another token is open. - * @returns {Node} - * The closed node. - */ - function exit(token, onExitError) { - const node = this.stack.pop() - const open = this.tokenStack.pop() - if (!open) { - throw new Error( - 'Cannot close `' + - token.type + - '` (' + - stringifyPosition({ - start: token.start, - end: token.end - }) + - '): it’s not open' - ) - } else if (open[0].type !== token.type) { - if (onExitError) { - onExitError.call(this, token, open[0]) - } else { - const handler = open[1] || defaultOnError - handler.call(this, token, open[0]) - } - } - node.position.end = lib_point(token.end) - return node - } - - /** - * @this {CompileContext} - * @returns {string} - */ - function resume() { - return lib_toString(this.stack.pop()) - } - - // - // Handlers. - // - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onenterlistordered() { - setData('expectingFirstListItemValue', true) - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onenterlistitemvalue(token) { - if (getData('expectingFirstListItemValue')) { - const ancestor = this.stack[this.stack.length - 2] - ancestor.start = Number.parseInt(this.sliceSerialize(token), 10) - setData('expectingFirstListItemValue') - } - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitcodefencedfenceinfo() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.lang = data - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitcodefencedfencemeta() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.meta = data - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitcodefencedfence() { - // Exit if this is the closing fence. - if (getData('flowCodeInside')) return - this.buffer() - setData('flowCodeInside', true) - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitcodefenced() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.value = data.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g, '') - setData('flowCodeInside') - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitcodeindented() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.value = data.replace(/(\r?\n|\r)$/g, '') - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitdefinitionlabelstring(token) { - const label = this.resume() - const node = this.stack[this.stack.length - 1] - node.label = label - node.identifier = normalizeIdentifier( - this.sliceSerialize(token) - ).toLowerCase() - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitdefinitiontitlestring() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.title = data - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitdefinitiondestinationstring() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.url = data - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitatxheadingsequence(token) { - const node = this.stack[this.stack.length - 1] - if (!node.depth) { - const depth = this.sliceSerialize(token).length - node.depth = depth - } - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitsetextheadingtext() { - setData('setextHeadingSlurpLineEnding', true) - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitsetextheadinglinesequence(token) { - const node = this.stack[this.stack.length - 1] - node.depth = this.sliceSerialize(token).charCodeAt(0) === 61 ? 1 : 2 - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitsetextheading() { - setData('setextHeadingSlurpLineEnding') - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onenterdata(token) { - const node = this.stack[this.stack.length - 1] - let tail = node.children[node.children.length - 1] - if (!tail || tail.type !== 'text') { - // Add a new text node. - tail = text() - // @ts-expect-error: we’ll add `end` later. - tail.position = { - start: lib_point(token.start) - } - // @ts-expect-error: Assume `parent` accepts `text`. - node.children.push(tail) - } - this.stack.push(tail) - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitdata(token) { - const tail = this.stack.pop() - tail.value += this.sliceSerialize(token) - tail.position.end = lib_point(token.end) - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitlineending(token) { - const context = this.stack[this.stack.length - 1] - // If we’re at a hard break, include the line ending in there. - if (getData('atHardBreak')) { - const tail = context.children[context.children.length - 1] - tail.position.end = lib_point(token.end) - setData('atHardBreak') - return - } - if ( - !getData('setextHeadingSlurpLineEnding') && - config.canContainEols.includes(context.type) - ) { - onenterdata.call(this, token) - onexitdata.call(this, token) - } - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexithardbreak() { - setData('atHardBreak', true) - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexithtmlflow() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.value = data - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexithtmltext() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.value = data - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitcodetext() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.value = data - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitlink() { - const node = this.stack[this.stack.length - 1] - // Note: there are also `identifier` and `label` fields on this link node! - // These are used / cleaned here. - // To do: clean. - if (getData('inReference')) { - /** @type {ReferenceType} */ - const referenceType = getData('referenceType') || 'shortcut' - node.type += 'Reference' - // @ts-expect-error: mutate. - node.referenceType = referenceType - // @ts-expect-error: mutate. - delete node.url - delete node.title - } else { - // @ts-expect-error: mutate. - delete node.identifier - // @ts-expect-error: mutate. - delete node.label - } - setData('referenceType') - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitimage() { - const node = this.stack[this.stack.length - 1] - // Note: there are also `identifier` and `label` fields on this link node! - // These are used / cleaned here. - // To do: clean. - if (getData('inReference')) { - /** @type {ReferenceType} */ - const referenceType = getData('referenceType') || 'shortcut' - node.type += 'Reference' - // @ts-expect-error: mutate. - node.referenceType = referenceType - // @ts-expect-error: mutate. - delete node.url - delete node.title - } else { - // @ts-expect-error: mutate. - delete node.identifier - // @ts-expect-error: mutate. - delete node.label - } - setData('referenceType') - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitlabeltext(token) { - const string = this.sliceSerialize(token) - const ancestor = this.stack[this.stack.length - 2] - // @ts-expect-error: stash this on the node, as it might become a reference - // later. - ancestor.label = decodeString(string) - // @ts-expect-error: same as above. - ancestor.identifier = normalizeIdentifier(string).toLowerCase() - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitlabel() { - const fragment = this.stack[this.stack.length - 1] - const value = this.resume() - const node = this.stack[this.stack.length - 1] - // Assume a reference. - setData('inReference', true) - if (node.type === 'link') { - /** @type {Array} */ - // @ts-expect-error: Assume static phrasing content. - const children = fragment.children - node.children = children - } else { - node.alt = value - } - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitresourcedestinationstring() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.url = data - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitresourcetitlestring() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.title = data - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitresource() { - setData('inReference') - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onenterreference() { - setData('referenceType', 'collapsed') - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitreferencestring(token) { - const label = this.resume() - const node = this.stack[this.stack.length - 1] - // @ts-expect-error: stash this on the node, as it might become a reference - // later. - node.label = label - // @ts-expect-error: same as above. - node.identifier = normalizeIdentifier( - this.sliceSerialize(token) - ).toLowerCase() - setData('referenceType', 'full') - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitcharacterreferencemarker(token) { - setData('characterReferenceType', token.type) - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitcharacterreferencevalue(token) { - const data = this.sliceSerialize(token) - const type = getData('characterReferenceType') - /** @type {string} */ - let value - if (type) { - value = decodeNumericCharacterReference( - data, - type === 'characterReferenceMarkerNumeric' ? 10 : 16 - ) - setData('characterReferenceType') - } else { - const result = decodeNamedCharacterReference(data) - value = result - } - const tail = this.stack.pop() - tail.value += value - tail.position.end = lib_point(token.end) - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitautolinkprotocol(token) { - onexitdata.call(this, token) - const node = this.stack[this.stack.length - 1] - node.url = this.sliceSerialize(token) - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitautolinkemail(token) { - onexitdata.call(this, token) - const node = this.stack[this.stack.length - 1] - node.url = 'mailto:' + this.sliceSerialize(token) - } - - // - // Creaters. - // - - /** @returns {Blockquote} */ - function blockQuote() { - return { - type: 'blockquote', - children: [] - } - } - - /** @returns {Code} */ - function codeFlow() { - return { - type: 'code', - lang: null, - meta: null, - value: '' - } - } - - /** @returns {InlineCode} */ - function codeText() { - return { - type: 'inlineCode', - value: '' - } - } - - /** @returns {Definition} */ - function definition() { - return { - type: 'definition', - identifier: '', - label: null, - title: null, - url: '' - } - } - - /** @returns {Emphasis} */ - function emphasis() { - return { - type: 'emphasis', - children: [] - } - } - - /** @returns {Heading} */ - function heading() { - // @ts-expect-error `depth` will be set later. - return { - type: 'heading', - depth: undefined, - children: [] - } - } - - /** @returns {Break} */ - function hardBreak() { - return { - type: 'break' - } - } - - /** @returns {HTML} */ - function html() { - return { - type: 'html', - value: '' - } - } - - /** @returns {Image} */ - function image() { - return { - type: 'image', - title: null, - url: '', - alt: null - } - } - - /** @returns {Link} */ - function link() { - return { - type: 'link', - title: null, - url: '', - children: [] - } - } - - /** - * @param {Token} token - * @returns {List} - */ - function list(token) { - return { - type: 'list', - ordered: token.type === 'listOrdered', - start: null, - spread: token._spread, - children: [] - } - } - - /** - * @param {Token} token - * @returns {ListItem} - */ - function listItem(token) { - return { - type: 'listItem', - spread: token._spread, - checked: null, - children: [] - } - } - - /** @returns {Paragraph} */ - function paragraph() { - return { - type: 'paragraph', - children: [] - } - } - - /** @returns {Strong} */ - function strong() { - return { - type: 'strong', - children: [] - } - } - - /** @returns {Text} */ - function text() { - return { - type: 'text', - value: '' - } - } - - /** @returns {ThematicBreak} */ - function thematicBreak() { - return { - type: 'thematicBreak' - } - } -} - -/** - * Copy a point-like value. - * - * @param {Point} d - * Point-like value. - * @returns {Point} - * unist point. - */ -function lib_point(d) { - return { - line: d.line, - column: d.column, - offset: d.offset - } -} - -/** - * @param {Config} combined - * @param {Array>} extensions - * @returns {void} - */ -function configure(combined, extensions) { - let index = -1 - while (++index < extensions.length) { - const value = extensions[index] - if (Array.isArray(value)) { - configure(combined, value) - } else { - extension(combined, value) - } - } -} - -/** - * @param {Config} combined - * @param {Extension} extension - * @returns {void} - */ -function extension(combined, extension) { - /** @type {keyof Extension} */ - let key - for (key in extension) { - if (lib_own.call(extension, key)) { - if (key === 'canContainEols') { - const right = extension[key] - if (right) { - combined[key].push(...right) - } - } else if (key === 'transforms') { - const right = extension[key] - if (right) { - combined[key].push(...right) - } - } else if (key === 'enter' || key === 'exit') { - const right = extension[key] - if (right) { - Object.assign(combined[key], right) - } - } - } - } -} - -/** @type {OnEnterError} */ -function defaultOnError(left, right) { - if (left) { - throw new Error( - 'Cannot close `' + - left.type + - '` (' + - stringifyPosition({ - start: left.start, - end: left.end - }) + - '): a different token (`' + - right.type + - '`, ' + - stringifyPosition({ - start: right.start, - end: right.end - }) + - ') is open' - ) - } else { - throw new Error( - 'Cannot close document, a token (`' + - right.type + - '`, ' + - stringifyPosition({ - start: right.start, - end: right.end - }) + - ') is still open' - ) - } -} - -// EXTERNAL MODULE: ./node_modules/ts-dedent/esm/index.js -var esm = __webpack_require__(60513); -;// CONCATENATED MODULE: ./node_modules/mermaid/dist/createText-2e5e7dd3.js - - - -function preprocessMarkdown(markdown) { - const withoutMultipleNewlines = markdown.replace(/\n{2,}/g, "\n"); - const withoutExtraSpaces = (0,esm/* dedent */.T)(withoutMultipleNewlines); - return withoutExtraSpaces; -} -function markdownToLines(markdown) { - const preprocessedMarkdown = preprocessMarkdown(markdown); - const { children } = fromMarkdown(preprocessedMarkdown); - const lines = [[]]; - let currentLine = 0; - function processNode(node, parentType = "normal") { - if (node.type === "text") { - const textLines = node.value.split("\n"); - textLines.forEach((textLine, index) => { - if (index !== 0) { - currentLine++; - lines.push([]); - } - textLine.split(" ").forEach((word) => { - if (word) { - lines[currentLine].push({ content: word, type: parentType }); - } - }); - }); - } else if (node.type === "strong" || node.type === "emphasis") { - node.children.forEach((contentNode) => { - processNode(contentNode, node.type); - }); - } - } - children.forEach((treeNode) => { - if (treeNode.type === "paragraph") { - treeNode.children.forEach((contentNode) => { - processNode(contentNode); - }); - } - }); - return lines; -} -function markdownToHTML(markdown) { - const { children } = fromMarkdown(markdown); - function output(node) { - if (node.type === "text") { - return node.value.replace(/\n/g, "
    "); - } else if (node.type === "strong") { - return `${node.children.map(output).join("")}`; - } else if (node.type === "emphasis") { - return `${node.children.map(output).join("")}`; - } else if (node.type === "paragraph") { - return `

    ${node.children.map(output).join("")}

    `; - } - return `Unsupported markdown: ${node.type}`; - } - return children.map(output).join(""); -} -function splitTextToChars(text) { - if (Intl.Segmenter) { - return [...new Intl.Segmenter().segment(text)].map((s) => s.segment); - } - return [...text]; -} -function splitWordToFitWidth(checkFit, word) { - const characters = splitTextToChars(word.content); - return splitWordToFitWidthRecursion(checkFit, [], characters, word.type); -} -function splitWordToFitWidthRecursion(checkFit, usedChars, remainingChars, type) { - if (remainingChars.length === 0) { - return [ - { content: usedChars.join(""), type }, - { content: "", type } - ]; - } - const [nextChar, ...rest] = remainingChars; - const newWord = [...usedChars, nextChar]; - if (checkFit([{ content: newWord.join(""), type }])) { - return splitWordToFitWidthRecursion(checkFit, newWord, rest, type); - } - if (usedChars.length === 0 && nextChar) { - usedChars.push(nextChar); - remainingChars.shift(); - } - return [ - { content: usedChars.join(""), type }, - { content: remainingChars.join(""), type } - ]; -} -function splitLineToFitWidth(line, checkFit) { - if (line.some(({ content }) => content.includes("\n"))) { - throw new Error("splitLineToFitWidth does not support newlines in the line"); - } - return splitLineToFitWidthRecursion(line, checkFit); -} -function splitLineToFitWidthRecursion(words, checkFit, lines = [], newLine = []) { - if (words.length === 0) { - if (newLine.length > 0) { - lines.push(newLine); - } - return lines.length > 0 ? lines : []; - } - let joiner = ""; - if (words[0].content === " ") { - joiner = " "; - words.shift(); - } - const nextWord = words.shift() ?? { content: " ", type: "normal" }; - const lineWithNextWord = [...newLine]; - if (joiner !== "") { - lineWithNextWord.push({ content: joiner, type: "normal" }); - } - lineWithNextWord.push(nextWord); - if (checkFit(lineWithNextWord)) { - return splitLineToFitWidthRecursion(words, checkFit, lines, lineWithNextWord); - } - if (newLine.length > 0) { - lines.push(newLine); - words.unshift(nextWord); - } else if (nextWord.content) { - const [line, rest] = splitWordToFitWidth(checkFit, nextWord); - lines.push([line]); - if (rest.content) { - words.unshift(rest); - } - } - return splitLineToFitWidthRecursion(words, checkFit, lines); -} -function applyStyle(dom, styleFn) { - if (styleFn) { - dom.attr("style", styleFn); - } -} -function addHtmlSpan(element, node, width, classes, addBackground = false) { - const fo = element.append("foreignObject"); - const div = fo.append("xhtml:div"); - const label = node.label; - const labelClass = node.isNode ? "nodeLabel" : "edgeLabel"; - div.html( - ` - " + label + "" - ); - applyStyle(div, node.labelStyle); - div.style("display", "table-cell"); - div.style("white-space", "nowrap"); - div.style("max-width", width + "px"); - div.attr("xmlns", "http://www.w3.org/1999/xhtml"); - if (addBackground) { - div.attr("class", "labelBkg"); - } - let bbox = div.node().getBoundingClientRect(); - if (bbox.width === width) { - div.style("display", "table"); - div.style("white-space", "break-spaces"); - div.style("width", width + "px"); - bbox = div.node().getBoundingClientRect(); - } - fo.style("width", bbox.width); - fo.style("height", bbox.height); - return fo.node(); -} -function createTspan(textElement, lineIndex, lineHeight) { - return textElement.append("tspan").attr("class", "text-outer-tspan").attr("x", 0).attr("y", lineIndex * lineHeight - 0.1 + "em").attr("dy", lineHeight + "em"); -} -function computeWidthOfText(parentNode, lineHeight, line) { - const testElement = parentNode.append("text"); - const testSpan = createTspan(testElement, 1, lineHeight); - updateTextContentAndStyles(testSpan, line); - const textLength = testSpan.node().getComputedTextLength(); - testElement.remove(); - return textLength; -} -function computeDimensionOfText(parentNode, lineHeight, text) { - var _a; - const testElement = parentNode.append("text"); - const testSpan = createTspan(testElement, 1, lineHeight); - updateTextContentAndStyles(testSpan, [{ content: text, type: "normal" }]); - const textDimension = (_a = testSpan.node()) == null ? void 0 : _a.getBoundingClientRect(); - if (textDimension) { - testElement.remove(); - } - return textDimension; -} -function createFormattedText(width, g, structuredText, addBackground = false) { - const lineHeight = 1.1; - const labelGroup = g.append("g"); - const bkg = labelGroup.insert("rect").attr("class", "background"); - const textElement = labelGroup.append("text").attr("y", "-10.1"); - let lineIndex = 0; - for (const line of structuredText) { - const checkWidth = (line2) => computeWidthOfText(labelGroup, lineHeight, line2) <= width; - const linesUnderWidth = checkWidth(line) ? [line] : splitLineToFitWidth(line, checkWidth); - for (const preparedLine of linesUnderWidth) { - const tspan = createTspan(textElement, lineIndex, lineHeight); - updateTextContentAndStyles(tspan, preparedLine); - lineIndex++; - } - } - if (addBackground) { - const bbox = textElement.node().getBBox(); - const padding = 2; - bkg.attr("x", -padding).attr("y", -padding).attr("width", bbox.width + 2 * padding).attr("height", bbox.height + 2 * padding); - return labelGroup.node(); - } else { - return textElement.node(); - } -} -function updateTextContentAndStyles(tspan, wrappedLine) { - tspan.text(""); - wrappedLine.forEach((word, index) => { - const innerTspan = tspan.append("tspan").attr("font-style", word.type === "emphasis" ? "italic" : "normal").attr("class", "text-inner-tspan").attr("font-weight", word.type === "strong" ? "bold" : "normal"); - if (index === 0) { - innerTspan.text(word.content); - } else { - innerTspan.text(" " + word.content); - } - }); -} -const createText = (el, text = "", { - style = "", - isTitle = false, - classes = "", - useHtmlLabels = true, - isNode = true, - width = 200, - addSvgBackground = false -} = {}) => { - mermaid_b5860b54.l.info("createText", text, style, isTitle, classes, useHtmlLabels, isNode, addSvgBackground); - if (useHtmlLabels) { - const htmlText = markdownToHTML(text); - const node = { - isNode, - label: (0,mermaid_b5860b54.M)(htmlText).replace( - /fa[blrs]?:fa-[\w-]+/g, - // cspell: disable-line - (s) => `` - ), - labelStyle: style.replace("fill:", "color:") - }; - const vertexNode = addHtmlSpan(el, node, width, classes, addSvgBackground); - return vertexNode; - } else { - const structuredText = markdownToLines(text); - const svgLabel = createFormattedText(width, el, structuredText, addSvgBackground); - return svgLabel; - } -}; - - - -/***/ }), - -/***/ 88146: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ a: () => (/* binding */ insertMarkers$1), -/* harmony export */ b: () => (/* binding */ clear$1), -/* harmony export */ c: () => (/* binding */ createLabel$1), -/* harmony export */ d: () => (/* binding */ clear), -/* harmony export */ e: () => (/* binding */ insertNode), -/* harmony export */ f: () => (/* binding */ insertEdgeLabel), -/* harmony export */ g: () => (/* binding */ getSubGraphTitleMargins), -/* harmony export */ h: () => (/* binding */ insertEdge), -/* harmony export */ i: () => (/* binding */ intersectRect$1), -/* harmony export */ j: () => (/* binding */ positionEdgeLabel), -/* harmony export */ k: () => (/* binding */ getLineFunctionsWithOffset), -/* harmony export */ l: () => (/* binding */ labelHelper), -/* harmony export */ m: () => (/* binding */ addEdgeMarkers), -/* harmony export */ p: () => (/* binding */ positionNode), -/* harmony export */ s: () => (/* binding */ setNodeElem), -/* harmony export */ u: () => (/* binding */ updateNodeBounds) -/* harmony export */ }); -/* harmony import */ var _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(86079); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(26312); -/* harmony import */ var _createText_2e5e7dd3_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(73743); - - - -const insertMarkers = (elem, markerArray, type, id) => { - markerArray.forEach((markerName) => { - markers[markerName](elem, type, id); - }); -}; -const extension = (elem, type, id) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.trace("Making markers for ", id); - elem.append("defs").append("marker").attr("id", id + "_" + type + "-extensionStart").attr("class", "marker extension " + type).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 1,7 L18,13 V 1 Z"); - elem.append("defs").append("marker").attr("id", id + "_" + type + "-extensionEnd").attr("class", "marker extension " + type).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 1,1 V 13 L18,7 Z"); -}; -const composition = (elem, type, id) => { - elem.append("defs").append("marker").attr("id", id + "_" + type + "-compositionStart").attr("class", "marker composition " + type).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"); - elem.append("defs").append("marker").attr("id", id + "_" + type + "-compositionEnd").attr("class", "marker composition " + type).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"); -}; -const aggregation = (elem, type, id) => { - elem.append("defs").append("marker").attr("id", id + "_" + type + "-aggregationStart").attr("class", "marker aggregation " + type).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"); - elem.append("defs").append("marker").attr("id", id + "_" + type + "-aggregationEnd").attr("class", "marker aggregation " + type).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"); -}; -const dependency = (elem, type, id) => { - elem.append("defs").append("marker").attr("id", id + "_" + type + "-dependencyStart").attr("class", "marker dependency " + type).attr("refX", 6).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 5,7 L9,13 L1,7 L9,1 Z"); - elem.append("defs").append("marker").attr("id", id + "_" + type + "-dependencyEnd").attr("class", "marker dependency " + type).attr("refX", 13).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z"); -}; -const lollipop = (elem, type, id) => { - elem.append("defs").append("marker").attr("id", id + "_" + type + "-lollipopStart").attr("class", "marker lollipop " + type).attr("refX", 13).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("circle").attr("stroke", "black").attr("fill", "transparent").attr("cx", 7).attr("cy", 7).attr("r", 6); - elem.append("defs").append("marker").attr("id", id + "_" + type + "-lollipopEnd").attr("class", "marker lollipop " + type).attr("refX", 1).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("circle").attr("stroke", "black").attr("fill", "transparent").attr("cx", 7).attr("cy", 7).attr("r", 6); -}; -const point = (elem, type, id) => { - elem.append("marker").attr("id", id + "_" + type + "-pointEnd").attr("class", "marker " + type).attr("viewBox", "0 0 10 10").attr("refX", 6).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"); - elem.append("marker").attr("id", id + "_" + type + "-pointStart").attr("class", "marker " + type).attr("viewBox", "0 0 10 10").attr("refX", 4.5).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 5 L 10 10 L 10 0 z").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"); -}; -const circle$1 = (elem, type, id) => { - elem.append("marker").attr("id", id + "_" + type + "-circleEnd").attr("class", "marker " + type).attr("viewBox", "0 0 10 10").attr("refX", 11).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"); - elem.append("marker").attr("id", id + "_" + type + "-circleStart").attr("class", "marker " + type).attr("viewBox", "0 0 10 10").attr("refX", -1).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"); -}; -const cross = (elem, type, id) => { - elem.append("marker").attr("id", id + "_" + type + "-crossEnd").attr("class", "marker cross " + type).attr("viewBox", "0 0 11 11").attr("refX", 12).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0"); - elem.append("marker").attr("id", id + "_" + type + "-crossStart").attr("class", "marker cross " + type).attr("viewBox", "0 0 11 11").attr("refX", -1).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0"); -}; -const barb = (elem, type, id) => { - elem.append("defs").append("marker").attr("id", id + "_" + type + "-barbEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 14).attr("markerUnits", "strokeWidth").attr("orient", "auto").append("path").attr("d", "M 19,7 L9,13 L14,7 L9,1 Z"); -}; -const markers = { - extension, - composition, - aggregation, - dependency, - lollipop, - point, - circle: circle$1, - cross, - barb -}; -const insertMarkers$1 = insertMarkers; -function applyStyle(dom, styleFn) { - if (styleFn) { - dom.attr("style", styleFn); - } -} -function addHtmlLabel(node) { - const fo = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(document.createElementNS("http://www.w3.org/2000/svg", "foreignObject")); - const div = fo.append("xhtml:div"); - const label = node.label; - const labelClass = node.isNode ? "nodeLabel" : "edgeLabel"; - div.html( - '" + label + "" - ); - applyStyle(div, node.labelStyle); - div.style("display", "inline-block"); - div.style("white-space", "nowrap"); - div.attr("xmlns", "http://www.w3.org/1999/xhtml"); - return fo.node(); -} -const createLabel = (_vertexText, style, isTitle, isNode) => { - let vertexText = _vertexText || ""; - if (typeof vertexText === "object") { - vertexText = vertexText[0]; - } - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { - vertexText = vertexText.replace(/\\n|\n/g, "
    "); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("vertexText" + vertexText); - const node = { - isNode, - label: (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.M)(vertexText).replace( - /fa[blrs]?:fa-[\w-]+/g, - // cspell: disable-line - (s) => `` - ), - labelStyle: style.replace("fill:", "color:") - }; - let vertexNode = addHtmlLabel(node); - return vertexNode; - } else { - const svgLabel = document.createElementNS("http://www.w3.org/2000/svg", "text"); - svgLabel.setAttribute("style", style.replace("color:", "fill:")); - let rows = []; - if (typeof vertexText === "string") { - rows = vertexText.split(/\\n|\n|/gi); - } else if (Array.isArray(vertexText)) { - rows = vertexText; - } else { - rows = []; - } - for (const row of rows) { - const tspan = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); - tspan.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"); - tspan.setAttribute("dy", "1em"); - tspan.setAttribute("x", "0"); - if (isTitle) { - tspan.setAttribute("class", "title-row"); - } else { - tspan.setAttribute("class", "row"); - } - tspan.textContent = row.trim(); - svgLabel.appendChild(tspan); - } - return svgLabel; - } -}; -const createLabel$1 = createLabel; -const labelHelper = async (parent, node, _classes, isNode) => { - let classes; - const useHtmlLabels = node.useHtmlLabels || (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels); - if (!_classes) { - classes = "node default"; - } else { - classes = _classes; - } - const shapeSvg = parent.insert("g").attr("class", classes).attr("id", node.domId || node.id); - const label = shapeSvg.insert("g").attr("class", "label").attr("style", node.labelStyle); - let labelText; - if (node.labelText === void 0) { - labelText = ""; - } else { - labelText = typeof node.labelText === "string" ? node.labelText : node.labelText[0]; - } - const textNode = label.node(); - let text; - if (node.labelType === "markdown") { - text = (0,_createText_2e5e7dd3_js__WEBPACK_IMPORTED_MODULE_2__.a)(label, (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.d)((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.M)(labelText), (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)()), { - useHtmlLabels, - width: node.width || (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.wrappingWidth, - classes: "markdown-node-label" - }); - } else { - text = textNode.appendChild( - createLabel$1( - (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.d)((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.M)(labelText), (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)()), - node.labelStyle, - false, - isNode - ) - ); - } - let bbox = text.getBBox(); - const halfPadding = node.padding / 2; - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { - const div = text.children[0]; - const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(text); - const images = div.getElementsByTagName("img"); - if (images) { - const noImgText = labelText.replace(/]*>/g, "").trim() === ""; - await Promise.all( - [...images].map( - (img) => new Promise((res) => { - function setupImage() { - img.style.display = "flex"; - img.style.flexDirection = "column"; - if (noImgText) { - const bodyFontSize = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().fontSize ? (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().fontSize : window.getComputedStyle(document.body).fontSize; - const enlargingFactor = 5; - const width = parseInt(bodyFontSize, 10) * enlargingFactor + "px"; - img.style.minWidth = width; - img.style.maxWidth = width; - } else { - img.style.width = "100%"; - } - res(img); - } - setTimeout(() => { - if (img.complete) { - setupImage(); - } - }); - img.addEventListener("error", setupImage); - img.addEventListener("load", setupImage); - }) - ) - ); - } - bbox = div.getBoundingClientRect(); - dv.attr("width", bbox.width); - dv.attr("height", bbox.height); - } - if (useHtmlLabels) { - label.attr("transform", "translate(" + -bbox.width / 2 + ", " + -bbox.height / 2 + ")"); - } else { - label.attr("transform", "translate(0, " + -bbox.height / 2 + ")"); - } - if (node.centerLabel) { - label.attr("transform", "translate(" + -bbox.width / 2 + ", " + -bbox.height / 2 + ")"); - } - label.insert("rect", ":first-child"); - return { shapeSvg, bbox, halfPadding, label }; -}; -const updateNodeBounds = (node, element) => { - const bbox = element.node().getBBox(); - node.width = bbox.width; - node.height = bbox.height; -}; -function insertPolygonShape(parent, w, h, points) { - return parent.insert("polygon", ":first-child").attr( - "points", - points.map(function(d) { - return d.x + "," + d.y; - }).join(" ") - ).attr("class", "label-container").attr("transform", "translate(" + -w / 2 + "," + h / 2 + ")"); -} -function intersectNode(node, point2) { - return node.intersect(point2); -} -function intersectEllipse(node, rx, ry, point2) { - var cx = node.x; - var cy = node.y; - var px = cx - point2.x; - var py = cy - point2.y; - var det = Math.sqrt(rx * rx * py * py + ry * ry * px * px); - var dx = Math.abs(rx * ry * px / det); - if (point2.x < cx) { - dx = -dx; - } - var dy = Math.abs(rx * ry * py / det); - if (point2.y < cy) { - dy = -dy; - } - return { x: cx + dx, y: cy + dy }; -} -function intersectCircle(node, rx, point2) { - return intersectEllipse(node, rx, rx, point2); -} -function intersectLine(p1, p2, q1, q2) { - var a1, a2, b1, b2, c1, c2; - var r1, r2, r3, r4; - var denom, offset, num; - var x, y; - a1 = p2.y - p1.y; - b1 = p1.x - p2.x; - c1 = p2.x * p1.y - p1.x * p2.y; - r3 = a1 * q1.x + b1 * q1.y + c1; - r4 = a1 * q2.x + b1 * q2.y + c1; - if (r3 !== 0 && r4 !== 0 && sameSign(r3, r4)) { - return; - } - a2 = q2.y - q1.y; - b2 = q1.x - q2.x; - c2 = q2.x * q1.y - q1.x * q2.y; - r1 = a2 * p1.x + b2 * p1.y + c2; - r2 = a2 * p2.x + b2 * p2.y + c2; - if (r1 !== 0 && r2 !== 0 && sameSign(r1, r2)) { - return; - } - denom = a1 * b2 - a2 * b1; - if (denom === 0) { - return; - } - offset = Math.abs(denom / 2); - num = b1 * c2 - b2 * c1; - x = num < 0 ? (num - offset) / denom : (num + offset) / denom; - num = a2 * c1 - a1 * c2; - y = num < 0 ? (num - offset) / denom : (num + offset) / denom; - return { x, y }; -} -function sameSign(r1, r2) { - return r1 * r2 > 0; -} -function intersectPolygon(node, polyPoints, point2) { - var x1 = node.x; - var y1 = node.y; - var intersections = []; - var minX = Number.POSITIVE_INFINITY; - var minY = Number.POSITIVE_INFINITY; - if (typeof polyPoints.forEach === "function") { - polyPoints.forEach(function(entry) { - minX = Math.min(minX, entry.x); - minY = Math.min(minY, entry.y); - }); - } else { - minX = Math.min(minX, polyPoints.x); - minY = Math.min(minY, polyPoints.y); - } - var left = x1 - node.width / 2 - minX; - var top = y1 - node.height / 2 - minY; - for (var i = 0; i < polyPoints.length; i++) { - var p1 = polyPoints[i]; - var p2 = polyPoints[i < polyPoints.length - 1 ? i + 1 : 0]; - var intersect2 = intersectLine( - node, - point2, - { x: left + p1.x, y: top + p1.y }, - { x: left + p2.x, y: top + p2.y } - ); - if (intersect2) { - intersections.push(intersect2); - } - } - if (!intersections.length) { - return node; - } - if (intersections.length > 1) { - intersections.sort(function(p, q) { - var pdx = p.x - point2.x; - var pdy = p.y - point2.y; - var distp = Math.sqrt(pdx * pdx + pdy * pdy); - var qdx = q.x - point2.x; - var qdy = q.y - point2.y; - var distq = Math.sqrt(qdx * qdx + qdy * qdy); - return distp < distq ? -1 : distp === distq ? 0 : 1; - }); - } - return intersections[0]; -} -const intersectRect = (node, point2) => { - var x = node.x; - var y = node.y; - var dx = point2.x - x; - var dy = point2.y - y; - var w = node.width / 2; - var h = node.height / 2; - var sx, sy; - if (Math.abs(dy) * w > Math.abs(dx) * h) { - if (dy < 0) { - h = -h; - } - sx = dy === 0 ? 0 : h * dx / dy; - sy = h; - } else { - if (dx < 0) { - w = -w; - } - sx = w; - sy = dx === 0 ? 0 : w * dy / dx; - } - return { x: x + sx, y: y + sy }; -}; -const intersectRect$1 = intersectRect; -const intersect = { - node: intersectNode, - circle: intersectCircle, - ellipse: intersectEllipse, - polygon: intersectPolygon, - rect: intersectRect$1 -}; -const note = async (parent, node) => { - const useHtmlLabels = node.useHtmlLabels || (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels; - if (!useHtmlLabels) { - node.centerLabel = true; - } - const { shapeSvg, bbox, halfPadding } = await labelHelper( - parent, - node, - "node " + node.classes, - true - ); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Classes = ", node.classes); - const rect2 = shapeSvg.insert("rect", ":first-child"); - rect2.attr("rx", node.rx).attr("ry", node.ry).attr("x", -bbox.width / 2 - halfPadding).attr("y", -bbox.height / 2 - halfPadding).attr("width", bbox.width + node.padding).attr("height", bbox.height + node.padding); - updateNodeBounds(node, rect2); - node.intersect = function(point2) { - return intersect.rect(node, point2); - }; - return shapeSvg; -}; -const note$1 = note; -const expandAndDeduplicateDirections = (directions) => { - const uniqueDirections = /* @__PURE__ */ new Set(); - for (const direction of directions) { - switch (direction) { - case "x": - uniqueDirections.add("right"); - uniqueDirections.add("left"); - break; - case "y": - uniqueDirections.add("up"); - uniqueDirections.add("down"); - break; - default: - uniqueDirections.add(direction); - break; - } - } - return uniqueDirections; -}; -const getArrowPoints = (duplicatedDirections, bbox, node) => { - const directions = expandAndDeduplicateDirections(duplicatedDirections); - const f = 2; - const height = bbox.height + 2 * node.padding; - const midpoint = height / f; - const width = bbox.width + 2 * midpoint + node.padding; - const padding = node.padding / 2; - if (directions.has("right") && directions.has("left") && directions.has("up") && directions.has("down")) { - return [ - // Bottom - { x: 0, y: 0 }, - { x: midpoint, y: 0 }, - { x: width / 2, y: 2 * padding }, - { x: width - midpoint, y: 0 }, - { x: width, y: 0 }, - // Right - { x: width, y: -height / 3 }, - { x: width + 2 * padding, y: -height / 2 }, - { x: width, y: -2 * height / 3 }, - { x: width, y: -height }, - // Top - { x: width - midpoint, y: -height }, - { x: width / 2, y: -height - 2 * padding }, - { x: midpoint, y: -height }, - // Left - { x: 0, y: -height }, - { x: 0, y: -2 * height / 3 }, - { x: -2 * padding, y: -height / 2 }, - { x: 0, y: -height / 3 } - ]; - } - if (directions.has("right") && directions.has("left") && directions.has("up")) { - return [ - { x: midpoint, y: 0 }, - { x: width - midpoint, y: 0 }, - { x: width, y: -height / 2 }, - { x: width - midpoint, y: -height }, - { x: midpoint, y: -height }, - { x: 0, y: -height / 2 } - ]; - } - if (directions.has("right") && directions.has("left") && directions.has("down")) { - return [ - { x: 0, y: 0 }, - { x: midpoint, y: -height }, - { x: width - midpoint, y: -height }, - { x: width, y: 0 } - ]; - } - if (directions.has("right") && directions.has("up") && directions.has("down")) { - return [ - { x: 0, y: 0 }, - { x: width, y: -midpoint }, - { x: width, y: -height + midpoint }, - { x: 0, y: -height } - ]; - } - if (directions.has("left") && directions.has("up") && directions.has("down")) { - return [ - { x: width, y: 0 }, - { x: 0, y: -midpoint }, - { x: 0, y: -height + midpoint }, - { x: width, y: -height } - ]; - } - if (directions.has("right") && directions.has("left")) { - return [ - { x: midpoint, y: 0 }, - { x: midpoint, y: -padding }, - { x: width - midpoint, y: -padding }, - { x: width - midpoint, y: 0 }, - { x: width, y: -height / 2 }, - { x: width - midpoint, y: -height }, - { x: width - midpoint, y: -height + padding }, - { x: midpoint, y: -height + padding }, - { x: midpoint, y: -height }, - { x: 0, y: -height / 2 } - ]; - } - if (directions.has("up") && directions.has("down")) { - return [ - // Bottom center - { x: width / 2, y: 0 }, - // Left pont of bottom arrow - { x: 0, y: -padding }, - { x: midpoint, y: -padding }, - // Left top over vertical section - { x: midpoint, y: -height + padding }, - { x: 0, y: -height + padding }, - // Top of arrow - { x: width / 2, y: -height }, - { x: width, y: -height + padding }, - // Top of right vertical bar - { x: width - midpoint, y: -height + padding }, - { x: width - midpoint, y: -padding }, - { x: width, y: -padding } - ]; - } - if (directions.has("right") && directions.has("up")) { - return [ - { x: 0, y: 0 }, - { x: width, y: -midpoint }, - { x: 0, y: -height } - ]; - } - if (directions.has("right") && directions.has("down")) { - return [ - { x: 0, y: 0 }, - { x: width, y: 0 }, - { x: 0, y: -height } - ]; - } - if (directions.has("left") && directions.has("up")) { - return [ - { x: width, y: 0 }, - { x: 0, y: -midpoint }, - { x: width, y: -height } - ]; - } - if (directions.has("left") && directions.has("down")) { - return [ - { x: width, y: 0 }, - { x: 0, y: 0 }, - { x: width, y: -height } - ]; - } - if (directions.has("right")) { - return [ - { x: midpoint, y: -padding }, - { x: midpoint, y: -padding }, - { x: width - midpoint, y: -padding }, - { x: width - midpoint, y: 0 }, - { x: width, y: -height / 2 }, - { x: width - midpoint, y: -height }, - { x: width - midpoint, y: -height + padding }, - // top left corner of arrow - { x: midpoint, y: -height + padding }, - { x: midpoint, y: -height + padding } - ]; - } - if (directions.has("left")) { - return [ - { x: midpoint, y: 0 }, - { x: midpoint, y: -padding }, - // Two points, the right corners - { x: width - midpoint, y: -padding }, - { x: width - midpoint, y: -height + padding }, - { x: midpoint, y: -height + padding }, - { x: midpoint, y: -height }, - { x: 0, y: -height / 2 } - ]; - } - if (directions.has("up")) { - return [ - // Bottom center - { x: midpoint, y: -padding }, - // Left top over vertical section - { x: midpoint, y: -height + padding }, - { x: 0, y: -height + padding }, - // Top of arrow - { x: width / 2, y: -height }, - { x: width, y: -height + padding }, - // Top of right vertical bar - { x: width - midpoint, y: -height + padding }, - { x: width - midpoint, y: -padding } - ]; - } - if (directions.has("down")) { - return [ - // Bottom center - { x: width / 2, y: 0 }, - // Left pont of bottom arrow - { x: 0, y: -padding }, - { x: midpoint, y: -padding }, - // Left top over vertical section - { x: midpoint, y: -height + padding }, - { x: width - midpoint, y: -height + padding }, - { x: width - midpoint, y: -padding }, - { x: width, y: -padding } - ]; - } - return [{ x: 0, y: 0 }]; -}; -const formatClass = (str) => { - if (str) { - return " " + str; - } - return ""; -}; -const getClassesFromNode = (node, otherClasses) => { - return `${otherClasses ? otherClasses : "node default"}${formatClass(node.classes)} ${formatClass( - node.class - )}`; -}; -const question = async (parent, node) => { - const { shapeSvg, bbox } = await labelHelper( - parent, - node, - getClassesFromNode(node, void 0), - true - ); - const w = bbox.width + node.padding; - const h = bbox.height + node.padding; - const s = w + h; - const points = [ - { x: s / 2, y: 0 }, - { x: s, y: -s / 2 }, - { x: s / 2, y: -s }, - { x: 0, y: -s / 2 } - ]; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Question main (Circle)"); - const questionElem = insertPolygonShape(shapeSvg, s, s, points); - questionElem.attr("style", node.style); - updateNodeBounds(node, questionElem); - node.intersect = function(point2) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.warn("Intersect called"); - return intersect.polygon(node, points, point2); - }; - return shapeSvg; -}; -const choice = (parent, node) => { - const shapeSvg = parent.insert("g").attr("class", "node default").attr("id", node.domId || node.id); - const s = 28; - const points = [ - { x: 0, y: s / 2 }, - { x: s / 2, y: 0 }, - { x: 0, y: -s / 2 }, - { x: -s / 2, y: 0 } - ]; - const choice2 = shapeSvg.insert("polygon", ":first-child").attr( - "points", - points.map(function(d) { - return d.x + "," + d.y; - }).join(" ") - ); - choice2.attr("class", "state-start").attr("r", 7).attr("width", 28).attr("height", 28); - node.width = 28; - node.height = 28; - node.intersect = function(point2) { - return intersect.circle(node, 14, point2); - }; - return shapeSvg; -}; -const hexagon = async (parent, node) => { - const { shapeSvg, bbox } = await labelHelper( - parent, - node, - getClassesFromNode(node, void 0), - true - ); - const f = 4; - const h = bbox.height + node.padding; - const m = h / f; - const w = bbox.width + 2 * m + node.padding; - const points = [ - { x: m, y: 0 }, - { x: w - m, y: 0 }, - { x: w, y: -h / 2 }, - { x: w - m, y: -h }, - { x: m, y: -h }, - { x: 0, y: -h / 2 } - ]; - const hex = insertPolygonShape(shapeSvg, w, h, points); - hex.attr("style", node.style); - updateNodeBounds(node, hex); - node.intersect = function(point2) { - return intersect.polygon(node, points, point2); - }; - return shapeSvg; -}; -const block_arrow = async (parent, node) => { - const { shapeSvg, bbox } = await labelHelper(parent, node, void 0, true); - const f = 2; - const h = bbox.height + 2 * node.padding; - const m = h / f; - const w = bbox.width + 2 * m + node.padding; - const points = getArrowPoints(node.directions, bbox, node); - const blockArrow = insertPolygonShape(shapeSvg, w, h, points); - blockArrow.attr("style", node.style); - updateNodeBounds(node, blockArrow); - node.intersect = function(point2) { - return intersect.polygon(node, points, point2); - }; - return shapeSvg; -}; -const rect_left_inv_arrow = async (parent, node) => { - const { shapeSvg, bbox } = await labelHelper( - parent, - node, - getClassesFromNode(node, void 0), - true - ); - const w = bbox.width + node.padding; - const h = bbox.height + node.padding; - const points = [ - { x: -h / 2, y: 0 }, - { x: w, y: 0 }, - { x: w, y: -h }, - { x: -h / 2, y: -h }, - { x: 0, y: -h / 2 } - ]; - const el = insertPolygonShape(shapeSvg, w, h, points); - el.attr("style", node.style); - node.width = w + h; - node.height = h; - node.intersect = function(point2) { - return intersect.polygon(node, points, point2); - }; - return shapeSvg; -}; -const lean_right = async (parent, node) => { - const { shapeSvg, bbox } = await labelHelper(parent, node, getClassesFromNode(node), true); - const w = bbox.width + node.padding; - const h = bbox.height + node.padding; - const points = [ - { x: -2 * h / 6, y: 0 }, - { x: w - h / 6, y: 0 }, - { x: w + 2 * h / 6, y: -h }, - { x: h / 6, y: -h } - ]; - const el = insertPolygonShape(shapeSvg, w, h, points); - el.attr("style", node.style); - updateNodeBounds(node, el); - node.intersect = function(point2) { - return intersect.polygon(node, points, point2); - }; - return shapeSvg; -}; -const lean_left = async (parent, node) => { - const { shapeSvg, bbox } = await labelHelper( - parent, - node, - getClassesFromNode(node, void 0), - true - ); - const w = bbox.width + node.padding; - const h = bbox.height + node.padding; - const points = [ - { x: 2 * h / 6, y: 0 }, - { x: w + h / 6, y: 0 }, - { x: w - 2 * h / 6, y: -h }, - { x: -h / 6, y: -h } - ]; - const el = insertPolygonShape(shapeSvg, w, h, points); - el.attr("style", node.style); - updateNodeBounds(node, el); - node.intersect = function(point2) { - return intersect.polygon(node, points, point2); - }; - return shapeSvg; -}; -const trapezoid = async (parent, node) => { - const { shapeSvg, bbox } = await labelHelper( - parent, - node, - getClassesFromNode(node, void 0), - true - ); - const w = bbox.width + node.padding; - const h = bbox.height + node.padding; - const points = [ - { x: -2 * h / 6, y: 0 }, - { x: w + 2 * h / 6, y: 0 }, - { x: w - h / 6, y: -h }, - { x: h / 6, y: -h } - ]; - const el = insertPolygonShape(shapeSvg, w, h, points); - el.attr("style", node.style); - updateNodeBounds(node, el); - node.intersect = function(point2) { - return intersect.polygon(node, points, point2); - }; - return shapeSvg; -}; -const inv_trapezoid = async (parent, node) => { - const { shapeSvg, bbox } = await labelHelper( - parent, - node, - getClassesFromNode(node, void 0), - true - ); - const w = bbox.width + node.padding; - const h = bbox.height + node.padding; - const points = [ - { x: h / 6, y: 0 }, - { x: w - h / 6, y: 0 }, - { x: w + 2 * h / 6, y: -h }, - { x: -2 * h / 6, y: -h } - ]; - const el = insertPolygonShape(shapeSvg, w, h, points); - el.attr("style", node.style); - updateNodeBounds(node, el); - node.intersect = function(point2) { - return intersect.polygon(node, points, point2); - }; - return shapeSvg; -}; -const rect_right_inv_arrow = async (parent, node) => { - const { shapeSvg, bbox } = await labelHelper( - parent, - node, - getClassesFromNode(node, void 0), - true - ); - const w = bbox.width + node.padding; - const h = bbox.height + node.padding; - const points = [ - { x: 0, y: 0 }, - { x: w + h / 2, y: 0 }, - { x: w, y: -h / 2 }, - { x: w + h / 2, y: -h }, - { x: 0, y: -h } - ]; - const el = insertPolygonShape(shapeSvg, w, h, points); - el.attr("style", node.style); - updateNodeBounds(node, el); - node.intersect = function(point2) { - return intersect.polygon(node, points, point2); - }; - return shapeSvg; -}; -const cylinder = async (parent, node) => { - const { shapeSvg, bbox } = await labelHelper( - parent, - node, - getClassesFromNode(node, void 0), - true - ); - const w = bbox.width + node.padding; - const rx = w / 2; - const ry = rx / (2.5 + w / 50); - const h = bbox.height + ry + node.padding; - const shape = "M 0," + ry + " a " + rx + "," + ry + " 0,0,0 " + w + " 0 a " + rx + "," + ry + " 0,0,0 " + -w + " 0 l 0," + h + " a " + rx + "," + ry + " 0,0,0 " + w + " 0 l 0," + -h; - const el = shapeSvg.attr("label-offset-y", ry).insert("path", ":first-child").attr("style", node.style).attr("d", shape).attr("transform", "translate(" + -w / 2 + "," + -(h / 2 + ry) + ")"); - updateNodeBounds(node, el); - node.intersect = function(point2) { - const pos = intersect.rect(node, point2); - const x = pos.x - node.x; - if (rx != 0 && (Math.abs(x) < node.width / 2 || Math.abs(x) == node.width / 2 && Math.abs(pos.y - node.y) > node.height / 2 - ry)) { - let y = ry * ry * (1 - x * x / (rx * rx)); - if (y != 0) { - y = Math.sqrt(y); - } - y = ry - y; - if (point2.y - node.y > 0) { - y = -y; - } - pos.y += y; - } - return pos; - }; - return shapeSvg; -}; -const rect = async (parent, node) => { - const { shapeSvg, bbox, halfPadding } = await labelHelper( - parent, - node, - "node " + node.classes + " " + node.class, - true - ); - const rect2 = shapeSvg.insert("rect", ":first-child"); - const totalWidth = node.positioned ? node.width : bbox.width + node.padding; - const totalHeight = node.positioned ? node.height : bbox.height + node.padding; - const x = node.positioned ? -totalWidth / 2 : -bbox.width / 2 - halfPadding; - const y = node.positioned ? -totalHeight / 2 : -bbox.height / 2 - halfPadding; - rect2.attr("class", "basic label-container").attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("x", x).attr("y", y).attr("width", totalWidth).attr("height", totalHeight); - if (node.props) { - const propKeys = new Set(Object.keys(node.props)); - if (node.props.borders) { - applyNodePropertyBorders(rect2, node.props.borders, totalWidth, totalHeight); - propKeys.delete("borders"); - } - propKeys.forEach((propKey) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.warn(`Unknown node property ${propKey}`); - }); - } - updateNodeBounds(node, rect2); - node.intersect = function(point2) { - return intersect.rect(node, point2); - }; - return shapeSvg; -}; -const composite = async (parent, node) => { - const { shapeSvg, bbox, halfPadding } = await labelHelper( - parent, - node, - "node " + node.classes, - true - ); - const rect2 = shapeSvg.insert("rect", ":first-child"); - const totalWidth = node.positioned ? node.width : bbox.width + node.padding; - const totalHeight = node.positioned ? node.height : bbox.height + node.padding; - const x = node.positioned ? -totalWidth / 2 : -bbox.width / 2 - halfPadding; - const y = node.positioned ? -totalHeight / 2 : -bbox.height / 2 - halfPadding; - rect2.attr("class", "basic cluster composite label-container").attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("x", x).attr("y", y).attr("width", totalWidth).attr("height", totalHeight); - if (node.props) { - const propKeys = new Set(Object.keys(node.props)); - if (node.props.borders) { - applyNodePropertyBorders(rect2, node.props.borders, totalWidth, totalHeight); - propKeys.delete("borders"); - } - propKeys.forEach((propKey) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.warn(`Unknown node property ${propKey}`); - }); - } - updateNodeBounds(node, rect2); - node.intersect = function(point2) { - return intersect.rect(node, point2); - }; - return shapeSvg; -}; -const labelRect = async (parent, node) => { - const { shapeSvg } = await labelHelper(parent, node, "label", true); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.trace("Classes = ", node.class); - const rect2 = shapeSvg.insert("rect", ":first-child"); - const totalWidth = 0; - const totalHeight = 0; - rect2.attr("width", totalWidth).attr("height", totalHeight); - shapeSvg.attr("class", "label edgeLabel"); - if (node.props) { - const propKeys = new Set(Object.keys(node.props)); - if (node.props.borders) { - applyNodePropertyBorders(rect2, node.props.borders, totalWidth, totalHeight); - propKeys.delete("borders"); - } - propKeys.forEach((propKey) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.warn(`Unknown node property ${propKey}`); - }); - } - updateNodeBounds(node, rect2); - node.intersect = function(point2) { - return intersect.rect(node, point2); - }; - return shapeSvg; -}; -function applyNodePropertyBorders(rect2, borders, totalWidth, totalHeight) { - const strokeDashArray = []; - const addBorder = (length) => { - strokeDashArray.push(length, 0); - }; - const skipBorder = (length) => { - strokeDashArray.push(0, length); - }; - if (borders.includes("t")) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("add top border"); - addBorder(totalWidth); - } else { - skipBorder(totalWidth); - } - if (borders.includes("r")) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("add right border"); - addBorder(totalHeight); - } else { - skipBorder(totalHeight); - } - if (borders.includes("b")) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("add bottom border"); - addBorder(totalWidth); - } else { - skipBorder(totalWidth); - } - if (borders.includes("l")) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("add left border"); - addBorder(totalHeight); - } else { - skipBorder(totalHeight); - } - rect2.attr("stroke-dasharray", strokeDashArray.join(" ")); -} -const rectWithTitle = (parent, node) => { - let classes; - if (!node.classes) { - classes = "node default"; - } else { - classes = "node " + node.classes; - } - const shapeSvg = parent.insert("g").attr("class", classes).attr("id", node.domId || node.id); - const rect2 = shapeSvg.insert("rect", ":first-child"); - const innerLine = shapeSvg.insert("line"); - const label = shapeSvg.insert("g").attr("class", "label"); - const text2 = node.labelText.flat ? node.labelText.flat() : node.labelText; - let title = ""; - if (typeof text2 === "object") { - title = text2[0]; - } else { - title = text2; - } - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Label text abc79", title, text2, typeof text2 === "object"); - const text = label.node().appendChild(createLabel$1(title, node.labelStyle, true, true)); - let bbox = { width: 0, height: 0 }; - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { - const div = text.children[0]; - const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(text); - bbox = div.getBoundingClientRect(); - dv.attr("width", bbox.width); - dv.attr("height", bbox.height); - } - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Text 2", text2); - const textRows = text2.slice(1, text2.length); - let titleBox = text.getBBox(); - const descr = label.node().appendChild( - createLabel$1(textRows.join ? textRows.join("
    ") : textRows, node.labelStyle, true, true) - ); - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { - const div = descr.children[0]; - const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(descr); - bbox = div.getBoundingClientRect(); - dv.attr("width", bbox.width); - dv.attr("height", bbox.height); - } - const halfPadding = node.padding / 2; - (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(descr).attr( - "transform", - "translate( " + // (titleBox.width - bbox.width) / 2 + - (bbox.width > titleBox.width ? 0 : (titleBox.width - bbox.width) / 2) + ", " + (titleBox.height + halfPadding + 5) + ")" - ); - (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(text).attr( - "transform", - "translate( " + // (titleBox.width - bbox.width) / 2 + - (bbox.width < titleBox.width ? 0 : -(titleBox.width - bbox.width) / 2) + ", 0)" - ); - bbox = label.node().getBBox(); - label.attr( - "transform", - "translate(" + -bbox.width / 2 + ", " + (-bbox.height / 2 - halfPadding + 3) + ")" - ); - rect2.attr("class", "outer title-state").attr("x", -bbox.width / 2 - halfPadding).attr("y", -bbox.height / 2 - halfPadding).attr("width", bbox.width + node.padding).attr("height", bbox.height + node.padding); - innerLine.attr("class", "divider").attr("x1", -bbox.width / 2 - halfPadding).attr("x2", bbox.width / 2 + halfPadding).attr("y1", -bbox.height / 2 - halfPadding + titleBox.height + halfPadding).attr("y2", -bbox.height / 2 - halfPadding + titleBox.height + halfPadding); - updateNodeBounds(node, rect2); - node.intersect = function(point2) { - return intersect.rect(node, point2); - }; - return shapeSvg; -}; -const stadium = async (parent, node) => { - const { shapeSvg, bbox } = await labelHelper( - parent, - node, - getClassesFromNode(node, void 0), - true - ); - const h = bbox.height + node.padding; - const w = bbox.width + h / 4 + node.padding; - const rect2 = shapeSvg.insert("rect", ":first-child").attr("style", node.style).attr("rx", h / 2).attr("ry", h / 2).attr("x", -w / 2).attr("y", -h / 2).attr("width", w).attr("height", h); - updateNodeBounds(node, rect2); - node.intersect = function(point2) { - return intersect.rect(node, point2); - }; - return shapeSvg; -}; -const circle = async (parent, node) => { - const { shapeSvg, bbox, halfPadding } = await labelHelper( - parent, - node, - getClassesFromNode(node, void 0), - true - ); - const circle2 = shapeSvg.insert("circle", ":first-child"); - circle2.attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("r", bbox.width / 2 + halfPadding).attr("width", bbox.width + node.padding).attr("height", bbox.height + node.padding); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Circle main"); - updateNodeBounds(node, circle2); - node.intersect = function(point2) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Circle intersect", node, bbox.width / 2 + halfPadding, point2); - return intersect.circle(node, bbox.width / 2 + halfPadding, point2); - }; - return shapeSvg; -}; -const doublecircle = async (parent, node) => { - const { shapeSvg, bbox, halfPadding } = await labelHelper( - parent, - node, - getClassesFromNode(node, void 0), - true - ); - const gap = 5; - const circleGroup = shapeSvg.insert("g", ":first-child"); - const outerCircle = circleGroup.insert("circle"); - const innerCircle = circleGroup.insert("circle"); - circleGroup.attr("class", node.class); - outerCircle.attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("r", bbox.width / 2 + halfPadding + gap).attr("width", bbox.width + node.padding + gap * 2).attr("height", bbox.height + node.padding + gap * 2); - innerCircle.attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("r", bbox.width / 2 + halfPadding).attr("width", bbox.width + node.padding).attr("height", bbox.height + node.padding); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.info("DoubleCircle main"); - updateNodeBounds(node, outerCircle); - node.intersect = function(point2) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.info("DoubleCircle intersect", node, bbox.width / 2 + halfPadding + gap, point2); - return intersect.circle(node, bbox.width / 2 + halfPadding + gap, point2); - }; - return shapeSvg; -}; -const subroutine = async (parent, node) => { - const { shapeSvg, bbox } = await labelHelper( - parent, - node, - getClassesFromNode(node, void 0), - true - ); - const w = bbox.width + node.padding; - const h = bbox.height + node.padding; - const points = [ - { x: 0, y: 0 }, - { x: w, y: 0 }, - { x: w, y: -h }, - { x: 0, y: -h }, - { x: 0, y: 0 }, - { x: -8, y: 0 }, - { x: w + 8, y: 0 }, - { x: w + 8, y: -h }, - { x: -8, y: -h }, - { x: -8, y: 0 } - ]; - const el = insertPolygonShape(shapeSvg, w, h, points); - el.attr("style", node.style); - updateNodeBounds(node, el); - node.intersect = function(point2) { - return intersect.polygon(node, points, point2); - }; - return shapeSvg; -}; -const start = (parent, node) => { - const shapeSvg = parent.insert("g").attr("class", "node default").attr("id", node.domId || node.id); - const circle2 = shapeSvg.insert("circle", ":first-child"); - circle2.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14); - updateNodeBounds(node, circle2); - node.intersect = function(point2) { - return intersect.circle(node, 7, point2); - }; - return shapeSvg; -}; -const forkJoin = (parent, node, dir) => { - const shapeSvg = parent.insert("g").attr("class", "node default").attr("id", node.domId || node.id); - let width = 70; - let height = 10; - if (dir === "LR") { - width = 10; - height = 70; - } - const shape = shapeSvg.append("rect").attr("x", -1 * width / 2).attr("y", -1 * height / 2).attr("width", width).attr("height", height).attr("class", "fork-join"); - updateNodeBounds(node, shape); - node.height = node.height + node.padding / 2; - node.width = node.width + node.padding / 2; - node.intersect = function(point2) { - return intersect.rect(node, point2); - }; - return shapeSvg; -}; -const end = (parent, node) => { - const shapeSvg = parent.insert("g").attr("class", "node default").attr("id", node.domId || node.id); - const innerCircle = shapeSvg.insert("circle", ":first-child"); - const circle2 = shapeSvg.insert("circle", ":first-child"); - circle2.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14); - innerCircle.attr("class", "state-end").attr("r", 5).attr("width", 10).attr("height", 10); - updateNodeBounds(node, circle2); - node.intersect = function(point2) { - return intersect.circle(node, 7, point2); - }; - return shapeSvg; -}; -const class_box = (parent, node) => { - const halfPadding = node.padding / 2; - const rowPadding = 4; - const lineHeight = 8; - let classes; - if (!node.classes) { - classes = "node default"; - } else { - classes = "node " + node.classes; - } - const shapeSvg = parent.insert("g").attr("class", classes).attr("id", node.domId || node.id); - const rect2 = shapeSvg.insert("rect", ":first-child"); - const topLine = shapeSvg.insert("line"); - const bottomLine = shapeSvg.insert("line"); - let maxWidth = 0; - let maxHeight = rowPadding; - const labelContainer = shapeSvg.insert("g").attr("class", "label"); - let verticalPos = 0; - const hasInterface = node.classData.annotations && node.classData.annotations[0]; - const interfaceLabelText = node.classData.annotations[0] ? "«" + node.classData.annotations[0] + "»" : ""; - const interfaceLabel = labelContainer.node().appendChild(createLabel$1(interfaceLabelText, node.labelStyle, true, true)); - let interfaceBBox = interfaceLabel.getBBox(); - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { - const div = interfaceLabel.children[0]; - const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(interfaceLabel); - interfaceBBox = div.getBoundingClientRect(); - dv.attr("width", interfaceBBox.width); - dv.attr("height", interfaceBBox.height); - } - if (node.classData.annotations[0]) { - maxHeight += interfaceBBox.height + rowPadding; - maxWidth += interfaceBBox.width; - } - let classTitleString = node.classData.label; - if (node.classData.type !== void 0 && node.classData.type !== "") { - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels) { - classTitleString += "<" + node.classData.type + ">"; - } else { - classTitleString += "<" + node.classData.type + ">"; - } - } - const classTitleLabel = labelContainer.node().appendChild(createLabel$1(classTitleString, node.labelStyle, true, true)); - (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(classTitleLabel).attr("class", "classTitle"); - let classTitleBBox = classTitleLabel.getBBox(); - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { - const div = classTitleLabel.children[0]; - const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(classTitleLabel); - classTitleBBox = div.getBoundingClientRect(); - dv.attr("width", classTitleBBox.width); - dv.attr("height", classTitleBBox.height); - } - maxHeight += classTitleBBox.height + rowPadding; - if (classTitleBBox.width > maxWidth) { - maxWidth = classTitleBBox.width; - } - const classAttributes = []; - node.classData.members.forEach((member) => { - const parsedInfo = member.getDisplayDetails(); - let parsedText = parsedInfo.displayText; - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels) { - parsedText = parsedText.replace(//g, ">"); - } - const lbl = labelContainer.node().appendChild( - createLabel$1( - parsedText, - parsedInfo.cssStyle ? parsedInfo.cssStyle : node.labelStyle, - true, - true - ) - ); - let bbox = lbl.getBBox(); - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { - const div = lbl.children[0]; - const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(lbl); - bbox = div.getBoundingClientRect(); - dv.attr("width", bbox.width); - dv.attr("height", bbox.height); - } - if (bbox.width > maxWidth) { - maxWidth = bbox.width; - } - maxHeight += bbox.height + rowPadding; - classAttributes.push(lbl); - }); - maxHeight += lineHeight; - const classMethods = []; - node.classData.methods.forEach((member) => { - const parsedInfo = member.getDisplayDetails(); - let displayText = parsedInfo.displayText; - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels) { - displayText = displayText.replace(//g, ">"); - } - const lbl = labelContainer.node().appendChild( - createLabel$1( - displayText, - parsedInfo.cssStyle ? parsedInfo.cssStyle : node.labelStyle, - true, - true - ) - ); - let bbox = lbl.getBBox(); - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { - const div = lbl.children[0]; - const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(lbl); - bbox = div.getBoundingClientRect(); - dv.attr("width", bbox.width); - dv.attr("height", bbox.height); - } - if (bbox.width > maxWidth) { - maxWidth = bbox.width; - } - maxHeight += bbox.height + rowPadding; - classMethods.push(lbl); - }); - maxHeight += lineHeight; - if (hasInterface) { - let diffX2 = (maxWidth - interfaceBBox.width) / 2; - (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(interfaceLabel).attr( - "transform", - "translate( " + (-1 * maxWidth / 2 + diffX2) + ", " + -1 * maxHeight / 2 + ")" - ); - verticalPos = interfaceBBox.height + rowPadding; - } - let diffX = (maxWidth - classTitleBBox.width) / 2; - (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(classTitleLabel).attr( - "transform", - "translate( " + (-1 * maxWidth / 2 + diffX) + ", " + (-1 * maxHeight / 2 + verticalPos) + ")" - ); - verticalPos += classTitleBBox.height + rowPadding; - topLine.attr("class", "divider").attr("x1", -maxWidth / 2 - halfPadding).attr("x2", maxWidth / 2 + halfPadding).attr("y1", -maxHeight / 2 - halfPadding + lineHeight + verticalPos).attr("y2", -maxHeight / 2 - halfPadding + lineHeight + verticalPos); - verticalPos += lineHeight; - classAttributes.forEach((lbl) => { - (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(lbl).attr( - "transform", - "translate( " + -maxWidth / 2 + ", " + (-1 * maxHeight / 2 + verticalPos + lineHeight / 2) + ")" - ); - const memberBBox = lbl == null ? void 0 : lbl.getBBox(); - verticalPos += ((memberBBox == null ? void 0 : memberBBox.height) ?? 0) + rowPadding; - }); - verticalPos += lineHeight; - bottomLine.attr("class", "divider").attr("x1", -maxWidth / 2 - halfPadding).attr("x2", maxWidth / 2 + halfPadding).attr("y1", -maxHeight / 2 - halfPadding + lineHeight + verticalPos).attr("y2", -maxHeight / 2 - halfPadding + lineHeight + verticalPos); - verticalPos += lineHeight; - classMethods.forEach((lbl) => { - (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(lbl).attr( - "transform", - "translate( " + -maxWidth / 2 + ", " + (-1 * maxHeight / 2 + verticalPos) + ")" - ); - const memberBBox = lbl == null ? void 0 : lbl.getBBox(); - verticalPos += ((memberBBox == null ? void 0 : memberBBox.height) ?? 0) + rowPadding; - }); - rect2.attr("style", node.style).attr("class", "outer title-state").attr("x", -maxWidth / 2 - halfPadding).attr("y", -(maxHeight / 2) - halfPadding).attr("width", maxWidth + node.padding).attr("height", maxHeight + node.padding); - updateNodeBounds(node, rect2); - node.intersect = function(point2) { - return intersect.rect(node, point2); - }; - return shapeSvg; -}; -const shapes = { - rhombus: question, - composite, - question, - rect, - labelRect, - rectWithTitle, - choice, - circle, - doublecircle, - stadium, - hexagon, - block_arrow, - rect_left_inv_arrow, - lean_right, - lean_left, - trapezoid, - inv_trapezoid, - rect_right_inv_arrow, - cylinder, - start, - end, - note: note$1, - subroutine, - fork: forkJoin, - join: forkJoin, - class_box -}; -let nodeElems = {}; -const insertNode = async (elem, node, dir) => { - let newEl; - let el; - if (node.link) { - let target; - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().securityLevel === "sandbox") { - target = "_top"; - } else if (node.linkTarget) { - target = node.linkTarget || "_blank"; - } - newEl = elem.insert("svg:a").attr("xlink:href", node.link).attr("target", target); - el = await shapes[node.shape](newEl, node, dir); - } else { - el = await shapes[node.shape](elem, node, dir); - newEl = el; - } - if (node.tooltip) { - el.attr("title", node.tooltip); - } - if (node.class) { - el.attr("class", "node default " + node.class); - } - newEl.attr("data-node", "true"); - newEl.attr("data-id", node.id); - nodeElems[node.id] = newEl; - if (node.haveCallback) { - nodeElems[node.id].attr("class", nodeElems[node.id].attr("class") + " clickable"); - } - return newEl; -}; -const setNodeElem = (elem, node) => { - nodeElems[node.id] = elem; -}; -const clear$1 = () => { - nodeElems = {}; -}; -const positionNode = (node) => { - const el = nodeElems[node.id]; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.trace( - "Transforming node", - node.diff, - node, - "translate(" + (node.x - node.width / 2 - 5) + ", " + node.width / 2 + ")" - ); - const padding = 8; - const diff = node.diff || 0; - if (node.clusterNode) { - el.attr( - "transform", - "translate(" + (node.x + diff - node.width / 2) + ", " + (node.y - node.height / 2 - padding) + ")" - ); - } else { - el.attr("transform", "translate(" + node.x + ", " + node.y + ")"); - } - return diff; -}; -const getSubGraphTitleMargins = ({ - flowchart -}) => { - var _a, _b; - const subGraphTitleTopMargin = ((_a = flowchart == null ? void 0 : flowchart.subGraphTitleMargin) == null ? void 0 : _a.top) ?? 0; - const subGraphTitleBottomMargin = ((_b = flowchart == null ? void 0 : flowchart.subGraphTitleMargin) == null ? void 0 : _b.bottom) ?? 0; - const subGraphTitleTotalMargin = subGraphTitleTopMargin + subGraphTitleBottomMargin; - return { - subGraphTitleTopMargin, - subGraphTitleBottomMargin, - subGraphTitleTotalMargin - }; -}; -const markerOffsets = { - aggregation: 18, - extension: 18, - composition: 18, - dependency: 6, - lollipop: 13.5, - arrow_point: 5.3 -}; -function calculateDeltaAndAngle(point1, point2) { - if (point1 === void 0 || point2 === void 0) { - return { angle: 0, deltaX: 0, deltaY: 0 }; - } - point1 = pointTransformer(point1); - point2 = pointTransformer(point2); - const [x1, y1] = [point1.x, point1.y]; - const [x2, y2] = [point2.x, point2.y]; - const deltaX = x2 - x1; - const deltaY = y2 - y1; - return { angle: Math.atan(deltaY / deltaX), deltaX, deltaY }; -} -const pointTransformer = (data) => { - if (Array.isArray(data)) { - return { x: data[0], y: data[1] }; - } - return data; -}; -const getLineFunctionsWithOffset = (edge) => { - return { - x: function(d, i, data) { - let offset = 0; - if (i === 0 && Object.hasOwn(markerOffsets, edge.arrowTypeStart)) { - const { angle, deltaX } = calculateDeltaAndAngle(data[0], data[1]); - offset = markerOffsets[edge.arrowTypeStart] * Math.cos(angle) * (deltaX >= 0 ? 1 : -1); - } else if (i === data.length - 1 && Object.hasOwn(markerOffsets, edge.arrowTypeEnd)) { - const { angle, deltaX } = calculateDeltaAndAngle( - data[data.length - 1], - data[data.length - 2] - ); - offset = markerOffsets[edge.arrowTypeEnd] * Math.cos(angle) * (deltaX >= 0 ? 1 : -1); - } - return pointTransformer(d).x + offset; - }, - y: function(d, i, data) { - let offset = 0; - if (i === 0 && Object.hasOwn(markerOffsets, edge.arrowTypeStart)) { - const { angle, deltaY } = calculateDeltaAndAngle(data[0], data[1]); - offset = markerOffsets[edge.arrowTypeStart] * Math.abs(Math.sin(angle)) * (deltaY >= 0 ? 1 : -1); - } else if (i === data.length - 1 && Object.hasOwn(markerOffsets, edge.arrowTypeEnd)) { - const { angle, deltaY } = calculateDeltaAndAngle( - data[data.length - 1], - data[data.length - 2] - ); - offset = markerOffsets[edge.arrowTypeEnd] * Math.abs(Math.sin(angle)) * (deltaY >= 0 ? 1 : -1); - } - return pointTransformer(d).y + offset; - } - }; -}; -const addEdgeMarkers = (svgPath, edge, url, id, diagramType) => { - if (edge.arrowTypeStart) { - addEdgeMarker(svgPath, "start", edge.arrowTypeStart, url, id, diagramType); - } - if (edge.arrowTypeEnd) { - addEdgeMarker(svgPath, "end", edge.arrowTypeEnd, url, id, diagramType); - } -}; -const arrowTypesMap = { - arrow_cross: "cross", - arrow_point: "point", - arrow_barb: "barb", - arrow_circle: "circle", - aggregation: "aggregation", - extension: "extension", - composition: "composition", - dependency: "dependency", - lollipop: "lollipop" -}; -const addEdgeMarker = (svgPath, position, arrowType, url, id, diagramType) => { - const endMarkerType = arrowTypesMap[arrowType]; - if (!endMarkerType) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.warn(`Unknown arrow type: ${arrowType}`); - return; - } - const suffix = position === "start" ? "Start" : "End"; - svgPath.attr(`marker-${position}`, `url(${url}#${id}_${diagramType}-${endMarkerType}${suffix})`); -}; -let edgeLabels = {}; -let terminalLabels = {}; -const clear = () => { - edgeLabels = {}; - terminalLabels = {}; -}; -const insertEdgeLabel = (elem, edge) => { - const useHtmlLabels = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels); - const labelElement = edge.labelType === "markdown" ? (0,_createText_2e5e7dd3_js__WEBPACK_IMPORTED_MODULE_2__.a)(elem, edge.label, { - style: edge.labelStyle, - useHtmlLabels, - addSvgBackground: true - }) : createLabel$1(edge.label, edge.labelStyle); - const edgeLabel = elem.insert("g").attr("class", "edgeLabel"); - const label = edgeLabel.insert("g").attr("class", "label"); - label.node().appendChild(labelElement); - let bbox = labelElement.getBBox(); - if (useHtmlLabels) { - const div = labelElement.children[0]; - const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(labelElement); - bbox = div.getBoundingClientRect(); - dv.attr("width", bbox.width); - dv.attr("height", bbox.height); - } - label.attr("transform", "translate(" + -bbox.width / 2 + ", " + -bbox.height / 2 + ")"); - edgeLabels[edge.id] = edgeLabel; - edge.width = bbox.width; - edge.height = bbox.height; - let fo; - if (edge.startLabelLeft) { - const startLabelElement = createLabel$1(edge.startLabelLeft, edge.labelStyle); - const startEdgeLabelLeft = elem.insert("g").attr("class", "edgeTerminals"); - const inner = startEdgeLabelLeft.insert("g").attr("class", "inner"); - fo = inner.node().appendChild(startLabelElement); - const slBox = startLabelElement.getBBox(); - inner.attr("transform", "translate(" + -slBox.width / 2 + ", " + -slBox.height / 2 + ")"); - if (!terminalLabels[edge.id]) { - terminalLabels[edge.id] = {}; - } - terminalLabels[edge.id].startLeft = startEdgeLabelLeft; - setTerminalWidth(fo, edge.startLabelLeft); - } - if (edge.startLabelRight) { - const startLabelElement = createLabel$1(edge.startLabelRight, edge.labelStyle); - const startEdgeLabelRight = elem.insert("g").attr("class", "edgeTerminals"); - const inner = startEdgeLabelRight.insert("g").attr("class", "inner"); - fo = startEdgeLabelRight.node().appendChild(startLabelElement); - inner.node().appendChild(startLabelElement); - const slBox = startLabelElement.getBBox(); - inner.attr("transform", "translate(" + -slBox.width / 2 + ", " + -slBox.height / 2 + ")"); - if (!terminalLabels[edge.id]) { - terminalLabels[edge.id] = {}; - } - terminalLabels[edge.id].startRight = startEdgeLabelRight; - setTerminalWidth(fo, edge.startLabelRight); - } - if (edge.endLabelLeft) { - const endLabelElement = createLabel$1(edge.endLabelLeft, edge.labelStyle); - const endEdgeLabelLeft = elem.insert("g").attr("class", "edgeTerminals"); - const inner = endEdgeLabelLeft.insert("g").attr("class", "inner"); - fo = inner.node().appendChild(endLabelElement); - const slBox = endLabelElement.getBBox(); - inner.attr("transform", "translate(" + -slBox.width / 2 + ", " + -slBox.height / 2 + ")"); - endEdgeLabelLeft.node().appendChild(endLabelElement); - if (!terminalLabels[edge.id]) { - terminalLabels[edge.id] = {}; - } - terminalLabels[edge.id].endLeft = endEdgeLabelLeft; - setTerminalWidth(fo, edge.endLabelLeft); - } - if (edge.endLabelRight) { - const endLabelElement = createLabel$1(edge.endLabelRight, edge.labelStyle); - const endEdgeLabelRight = elem.insert("g").attr("class", "edgeTerminals"); - const inner = endEdgeLabelRight.insert("g").attr("class", "inner"); - fo = inner.node().appendChild(endLabelElement); - const slBox = endLabelElement.getBBox(); - inner.attr("transform", "translate(" + -slBox.width / 2 + ", " + -slBox.height / 2 + ")"); - endEdgeLabelRight.node().appendChild(endLabelElement); - if (!terminalLabels[edge.id]) { - terminalLabels[edge.id] = {}; - } - terminalLabels[edge.id].endRight = endEdgeLabelRight; - setTerminalWidth(fo, edge.endLabelRight); - } - return labelElement; -}; -function setTerminalWidth(fo, value) { - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels && fo) { - fo.style.width = value.length * 9 + "px"; - fo.style.height = "12px"; - } -} -const positionEdgeLabel = (edge, paths) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("Moving label abc88 ", edge.id, edge.label, edgeLabels[edge.id], paths); - let path = paths.updatedPath ? paths.updatedPath : paths.originalPath; - const siteConfig = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)(); - const { subGraphTitleTotalMargin } = getSubGraphTitleMargins(siteConfig); - if (edge.label) { - const el = edgeLabels[edge.id]; - let x = edge.x; - let y = edge.y; - if (path) { - const pos = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.u.calcLabelPosition(path); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug( - "Moving label " + edge.label + " from (", - x, - ",", - y, - ") to (", - pos.x, - ",", - pos.y, - ") abc88" - ); - if (paths.updatedPath) { - x = pos.x; - y = pos.y; - } - } - el.attr("transform", `translate(${x}, ${y + subGraphTitleTotalMargin / 2})`); - } - if (edge.startLabelLeft) { - const el = terminalLabels[edge.id].startLeft; - let x = edge.x; - let y = edge.y; - if (path) { - const pos = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.u.calcTerminalLabelPosition(edge.arrowTypeStart ? 10 : 0, "start_left", path); - x = pos.x; - y = pos.y; - } - el.attr("transform", `translate(${x}, ${y})`); - } - if (edge.startLabelRight) { - const el = terminalLabels[edge.id].startRight; - let x = edge.x; - let y = edge.y; - if (path) { - const pos = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.u.calcTerminalLabelPosition( - edge.arrowTypeStart ? 10 : 0, - "start_right", - path - ); - x = pos.x; - y = pos.y; - } - el.attr("transform", `translate(${x}, ${y})`); - } - if (edge.endLabelLeft) { - const el = terminalLabels[edge.id].endLeft; - let x = edge.x; - let y = edge.y; - if (path) { - const pos = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.u.calcTerminalLabelPosition(edge.arrowTypeEnd ? 10 : 0, "end_left", path); - x = pos.x; - y = pos.y; - } - el.attr("transform", `translate(${x}, ${y})`); - } - if (edge.endLabelRight) { - const el = terminalLabels[edge.id].endRight; - let x = edge.x; - let y = edge.y; - if (path) { - const pos = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.u.calcTerminalLabelPosition(edge.arrowTypeEnd ? 10 : 0, "end_right", path); - x = pos.x; - y = pos.y; - } - el.attr("transform", `translate(${x}, ${y})`); - } -}; -const outsideNode = (node, point2) => { - const x = node.x; - const y = node.y; - const dx = Math.abs(point2.x - x); - const dy = Math.abs(point2.y - y); - const w = node.width / 2; - const h = node.height / 2; - if (dx >= w || dy >= h) { - return true; - } - return false; -}; -const intersection = (node, outsidePoint, insidePoint) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug(`intersection calc abc89: - outsidePoint: ${JSON.stringify(outsidePoint)} - insidePoint : ${JSON.stringify(insidePoint)} - node : x:${node.x} y:${node.y} w:${node.width} h:${node.height}`); - const x = node.x; - const y = node.y; - const dx = Math.abs(x - insidePoint.x); - const w = node.width / 2; - let r = insidePoint.x < outsidePoint.x ? w - dx : w + dx; - const h = node.height / 2; - const Q = Math.abs(outsidePoint.y - insidePoint.y); - const R = Math.abs(outsidePoint.x - insidePoint.x); - if (Math.abs(y - outsidePoint.y) * w > Math.abs(x - outsidePoint.x) * h) { - let q = insidePoint.y < outsidePoint.y ? outsidePoint.y - h - y : y - h - outsidePoint.y; - r = R * q / Q; - const res = { - x: insidePoint.x < outsidePoint.x ? insidePoint.x + r : insidePoint.x - R + r, - y: insidePoint.y < outsidePoint.y ? insidePoint.y + Q - q : insidePoint.y - Q + q - }; - if (r === 0) { - res.x = outsidePoint.x; - res.y = outsidePoint.y; - } - if (R === 0) { - res.x = outsidePoint.x; - } - if (Q === 0) { - res.y = outsidePoint.y; - } - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug(`abc89 topp/bott calc, Q ${Q}, q ${q}, R ${R}, r ${r}`, res); - return res; - } else { - if (insidePoint.x < outsidePoint.x) { - r = outsidePoint.x - w - x; - } else { - r = x - w - outsidePoint.x; - } - let q = Q * r / R; - let _x = insidePoint.x < outsidePoint.x ? insidePoint.x + R - r : insidePoint.x - R + r; - let _y = insidePoint.y < outsidePoint.y ? insidePoint.y + q : insidePoint.y - q; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug(`sides calc abc89, Q ${Q}, q ${q}, R ${R}, r ${r}`, { _x, _y }); - if (r === 0) { - _x = outsidePoint.x; - _y = outsidePoint.y; - } - if (R === 0) { - _x = outsidePoint.x; - } - if (Q === 0) { - _y = outsidePoint.y; - } - return { x: _x, y: _y }; - } -}; -const cutPathAtIntersect = (_points, boundaryNode) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("abc88 cutPathAtIntersect", _points, boundaryNode); - let points = []; - let lastPointOutside = _points[0]; - let isInside = false; - _points.forEach((point2) => { - if (!outsideNode(boundaryNode, point2) && !isInside) { - const inter = intersection(boundaryNode, lastPointOutside, point2); - let pointPresent = false; - points.forEach((p) => { - pointPresent = pointPresent || p.x === inter.x && p.y === inter.y; - }); - if (!points.some((e) => e.x === inter.x && e.y === inter.y)) { - points.push(inter); - } - isInside = true; - } else { - lastPointOutside = point2; - if (!isInside) { - points.push(point2); - } - } - }); - return points; -}; -const insertEdge = function(elem, e, edge, clusterDb, diagramType, graph, id) { - let points = edge.points; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("abc88 InsertEdge: edge=", edge, "e=", e); - let pointsHasChanged = false; - const tail = graph.node(e.v); - var head = graph.node(e.w); - if ((head == null ? void 0 : head.intersect) && (tail == null ? void 0 : tail.intersect)) { - points = points.slice(1, edge.points.length - 1); - points.unshift(tail.intersect(points[0])); - points.push(head.intersect(points[points.length - 1])); - } - if (edge.toCluster) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("to cluster abc88", clusterDb[edge.toCluster]); - points = cutPathAtIntersect(edge.points, clusterDb[edge.toCluster].node); - pointsHasChanged = true; - } - if (edge.fromCluster) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("from cluster abc88", clusterDb[edge.fromCluster]); - points = cutPathAtIntersect(points.reverse(), clusterDb[edge.fromCluster].node).reverse(); - pointsHasChanged = true; - } - const lineData = points.filter((p) => !Number.isNaN(p.y)); - let curve = d3__WEBPACK_IMPORTED_MODULE_0__/* .curveBasis */ .qrM; - if (edge.curve && (diagramType === "graph" || diagramType === "flowchart")) { - curve = edge.curve; - } - const { x, y } = getLineFunctionsWithOffset(edge); - const lineFunction = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .line */ .n8j)().x(x).y(y).curve(curve); - let strokeClasses; - switch (edge.thickness) { - case "normal": - strokeClasses = "edge-thickness-normal"; - break; - case "thick": - strokeClasses = "edge-thickness-thick"; - break; - case "invisible": - strokeClasses = "edge-thickness-thick"; - break; - default: - strokeClasses = ""; - } - switch (edge.pattern) { - case "solid": - strokeClasses += " edge-pattern-solid"; - break; - case "dotted": - strokeClasses += " edge-pattern-dotted"; - break; - case "dashed": - strokeClasses += " edge-pattern-dashed"; - break; - } - const svgPath = elem.append("path").attr("d", lineFunction(lineData)).attr("id", edge.id).attr("class", " " + strokeClasses + (edge.classes ? " " + edge.classes : "")).attr("style", edge.style); - let url = ""; - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.arrowMarkerAbsolute || (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().state.arrowMarkerAbsolute) { - url = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search; - url = url.replace(/\(/g, "\\("); - url = url.replace(/\)/g, "\\)"); - } - addEdgeMarkers(svgPath, edge, url, id, diagramType); - let paths = {}; - if (pointsHasChanged) { - paths.updatedPath = points; - } - paths.originalPath = edge.points; - return paths; -}; - - - -/***/ }) - -}; -; \ No newline at end of file diff --git a/assets/js/628.7de1c194.js b/assets/js/628.7de1c194.js deleted file mode 100644 index bf5be9a8db20..000000000000 --- a/assets/js/628.7de1c194.js +++ /dev/null @@ -1,26263 +0,0 @@ -"use strict"; -exports.id = 628; -exports.ids = [628]; -exports.modules = { - -/***/ 21176: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - Zp: () => (/* reexport */ layout) -}); - -// UNUSED EXPORTS: acyclic, normalize, rank - -// EXTERNAL MODULE: ./node_modules/lodash-es/forEach.js -var forEach = __webpack_require__(8058); -// EXTERNAL MODULE: ./node_modules/lodash-es/uniqueId.js -var uniqueId = __webpack_require__(5664); -// EXTERNAL MODULE: ./node_modules/lodash-es/has.js + 1 modules -var has = __webpack_require__(48585); -// EXTERNAL MODULE: ./node_modules/lodash-es/constant.js -var constant = __webpack_require__(39142); -// EXTERNAL MODULE: ./node_modules/lodash-es/flatten.js -var flatten = __webpack_require__(34098); -// EXTERNAL MODULE: ./node_modules/lodash-es/map.js -var map = __webpack_require__(74722); -// EXTERNAL MODULE: ./node_modules/lodash-es/range.js + 2 modules -var range = __webpack_require__(91395); -// EXTERNAL MODULE: ./node_modules/dagre-d3-es/src/graphlib/index.js -var graphlib = __webpack_require__(697); -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/data/list.js -/* - * Simple doubly linked list implementation derived from Cormen, et al., - * "Introduction to Algorithms". - */ - - - -class List { - constructor() { - var sentinel = {}; - sentinel._next = sentinel._prev = sentinel; - this._sentinel = sentinel; - } - dequeue() { - var sentinel = this._sentinel; - var entry = sentinel._prev; - if (entry !== sentinel) { - unlink(entry); - return entry; - } - } - enqueue(entry) { - var sentinel = this._sentinel; - if (entry._prev && entry._next) { - unlink(entry); - } - entry._next = sentinel._next; - sentinel._next._prev = entry; - sentinel._next = entry; - entry._prev = sentinel; - } - toString() { - var strs = []; - var sentinel = this._sentinel; - var curr = sentinel._prev; - while (curr !== sentinel) { - strs.push(JSON.stringify(curr, filterOutLinks)); - curr = curr._prev; - } - return '[' + strs.join(', ') + ']'; - } -} - -function unlink(entry) { - entry._prev._next = entry._next; - entry._next._prev = entry._prev; - delete entry._next; - delete entry._prev; -} - -function filterOutLinks(k, v) { - if (k !== '_next' && k !== '_prev') { - return v; - } -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/greedy-fas.js - - - - -/* - * A greedy heuristic for finding a feedback arc set for a graph. A feedback - * arc set is a set of edges that can be removed to make a graph acyclic. - * The algorithm comes from: P. Eades, X. Lin, and W. F. Smyth, "A fast and - * effective heuristic for the feedback arc set problem." This implementation - * adjusts that from the paper to allow for weighted edges. - */ - - -var DEFAULT_WEIGHT_FN = constant/* default */.A(1); - -function greedyFAS(g, weightFn) { - if (g.nodeCount() <= 1) { - return []; - } - var state = buildState(g, weightFn || DEFAULT_WEIGHT_FN); - var results = doGreedyFAS(state.graph, state.buckets, state.zeroIdx); - - // Expand multi-edges - return flatten/* default */.A( - map/* default */.A(results, function (e) { - return g.outEdges(e.v, e.w); - }) - ); -} - -function doGreedyFAS(g, buckets, zeroIdx) { - var results = []; - var sources = buckets[buckets.length - 1]; - var sinks = buckets[0]; - - var entry; - while (g.nodeCount()) { - while ((entry = sinks.dequeue())) { - removeNode(g, buckets, zeroIdx, entry); - } - while ((entry = sources.dequeue())) { - removeNode(g, buckets, zeroIdx, entry); - } - if (g.nodeCount()) { - for (var i = buckets.length - 2; i > 0; --i) { - entry = buckets[i].dequeue(); - if (entry) { - results = results.concat(removeNode(g, buckets, zeroIdx, entry, true)); - break; - } - } - } - } - - return results; -} - -function removeNode(g, buckets, zeroIdx, entry, collectPredecessors) { - var results = collectPredecessors ? [] : undefined; - - forEach/* default */.A(g.inEdges(entry.v), function (edge) { - var weight = g.edge(edge); - var uEntry = g.node(edge.v); - - if (collectPredecessors) { - results.push({ v: edge.v, w: edge.w }); - } - - uEntry.out -= weight; - assignBucket(buckets, zeroIdx, uEntry); - }); - - forEach/* default */.A(g.outEdges(entry.v), function (edge) { - var weight = g.edge(edge); - var w = edge.w; - var wEntry = g.node(w); - wEntry['in'] -= weight; - assignBucket(buckets, zeroIdx, wEntry); - }); - - g.removeNode(entry.v); - - return results; -} - -function buildState(g, weightFn) { - var fasGraph = new graphlib/* Graph */.T(); - var maxIn = 0; - var maxOut = 0; - - forEach/* default */.A(g.nodes(), function (v) { - fasGraph.setNode(v, { v: v, in: 0, out: 0 }); - }); - - // Aggregate weights on nodes, but also sum the weights across multi-edges - // into a single edge for the fasGraph. - forEach/* default */.A(g.edges(), function (e) { - var prevWeight = fasGraph.edge(e.v, e.w) || 0; - var weight = weightFn(e); - var edgeWeight = prevWeight + weight; - fasGraph.setEdge(e.v, e.w, edgeWeight); - maxOut = Math.max(maxOut, (fasGraph.node(e.v).out += weight)); - maxIn = Math.max(maxIn, (fasGraph.node(e.w)['in'] += weight)); - }); - - var buckets = range/* default */.A(maxOut + maxIn + 3).map(function () { - return new List(); - }); - var zeroIdx = maxIn + 1; - - forEach/* default */.A(fasGraph.nodes(), function (v) { - assignBucket(buckets, zeroIdx, fasGraph.node(v)); - }); - - return { graph: fasGraph, buckets: buckets, zeroIdx: zeroIdx }; -} - -function assignBucket(buckets, zeroIdx, entry) { - if (!entry.out) { - buckets[0].enqueue(entry); - } else if (!entry['in']) { - buckets[buckets.length - 1].enqueue(entry); - } else { - buckets[entry.out - entry['in'] + zeroIdx].enqueue(entry); - } -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/acyclic.js - - - - - -function run(g) { - var fas = g.graph().acyclicer === 'greedy' ? greedyFAS(g, weightFn(g)) : dfsFAS(g); - forEach/* default */.A(fas, function (e) { - var label = g.edge(e); - g.removeEdge(e); - label.forwardName = e.name; - label.reversed = true; - g.setEdge(e.w, e.v, label, uniqueId/* default */.A('rev')); - }); - - function weightFn(g) { - return function (e) { - return g.edge(e).weight; - }; - } -} - -function dfsFAS(g) { - var fas = []; - var stack = {}; - var visited = {}; - - function dfs(v) { - if (has/* default */.A(visited, v)) { - return; - } - visited[v] = true; - stack[v] = true; - forEach/* default */.A(g.outEdges(v), function (e) { - if (has/* default */.A(stack, e.w)) { - fas.push(e); - } else { - dfs(e.w); - } - }); - delete stack[v]; - } - - forEach/* default */.A(g.nodes(), dfs); - return fas; -} - -function undo(g) { - forEach/* default */.A(g.edges(), function (e) { - var label = g.edge(e); - if (label.reversed) { - g.removeEdge(e); - - var forwardName = label.forwardName; - delete label.reversed; - delete label.forwardName; - g.setEdge(e.w, e.v, label, forwardName); - } - }); -} - -// EXTERNAL MODULE: ./node_modules/lodash-es/merge.js + 6 modules -var merge = __webpack_require__(98879); -// EXTERNAL MODULE: ./node_modules/lodash-es/pick.js + 4 modules -var pick = __webpack_require__(81942); -// EXTERNAL MODULE: ./node_modules/lodash-es/defaults.js -var defaults = __webpack_require__(23068); -// EXTERNAL MODULE: ./node_modules/lodash-es/isSymbol.js -var isSymbol = __webpack_require__(61882); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseExtremum.js - - -/** - * The base implementation of methods like `_.max` and `_.min` which accepts a - * `comparator` to determine the extremum value. - * - * @private - * @param {Array} array The array to iterate over. - * @param {Function} iteratee The iteratee invoked per iteration. - * @param {Function} comparator The comparator used to compare values. - * @returns {*} Returns the extremum value. - */ -function baseExtremum(array, iteratee, comparator) { - var index = -1, - length = array.length; - - while (++index < length) { - var value = array[index], - current = iteratee(value); - - if (current != null && (computed === undefined - ? (current === current && !(0,isSymbol/* default */.A)(current)) - : comparator(current, computed) - )) { - var computed = current, - result = value; - } - } - return result; -} - -/* harmony default export */ const _baseExtremum = (baseExtremum); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseGt.js -/** - * The base implementation of `_.gt` which doesn't coerce arguments. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if `value` is greater than `other`, - * else `false`. - */ -function baseGt(value, other) { - return value > other; -} - -/* harmony default export */ const _baseGt = (baseGt); - -// EXTERNAL MODULE: ./node_modules/lodash-es/identity.js -var identity = __webpack_require__(29008); -;// CONCATENATED MODULE: ./node_modules/lodash-es/max.js - - - - -/** - * Computes the maximum value of `array`. If `array` is empty or falsey, - * `undefined` is returned. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Math - * @param {Array} array The array to iterate over. - * @returns {*} Returns the maximum value. - * @example - * - * _.max([4, 2, 8, 6]); - * // => 8 - * - * _.max([]); - * // => undefined - */ -function max(array) { - return (array && array.length) - ? _baseExtremum(array, identity/* default */.A, _baseGt) - : undefined; -} - -/* harmony default export */ const lodash_es_max = (max); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/last.js -/** - * Gets the last element of `array`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to query. - * @returns {*} Returns the last element of `array`. - * @example - * - * _.last([1, 2, 3]); - * // => 3 - */ -function last(array) { - var length = array == null ? 0 : array.length; - return length ? array[length - 1] : undefined; -} - -/* harmony default export */ const lodash_es_last = (last); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseAssignValue.js -var _baseAssignValue = __webpack_require__(52528); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseForOwn.js -var _baseForOwn = __webpack_require__(79841); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseIteratee.js + 16 modules -var _baseIteratee = __webpack_require__(49574); -;// CONCATENATED MODULE: ./node_modules/lodash-es/mapValues.js - - - - -/** - * Creates an object with the same keys as `object` and values generated - * by running each own enumerable string keyed property of `object` thru - * `iteratee`. The iteratee is invoked with three arguments: - * (value, key, object). - * - * @static - * @memberOf _ - * @since 2.4.0 - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Object} Returns the new mapped object. - * @see _.mapKeys - * @example - * - * var users = { - * 'fred': { 'user': 'fred', 'age': 40 }, - * 'pebbles': { 'user': 'pebbles', 'age': 1 } - * }; - * - * _.mapValues(users, function(o) { return o.age; }); - * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) - * - * // The `_.property` iteratee shorthand. - * _.mapValues(users, 'age'); - * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) - */ -function mapValues(object, iteratee) { - var result = {}; - iteratee = (0,_baseIteratee/* default */.A)(iteratee, 3); - - (0,_baseForOwn/* default */.A)(object, function(value, key, object) { - (0,_baseAssignValue/* default */.A)(result, key, iteratee(value, key, object)); - }); - return result; -} - -/* harmony default export */ const lodash_es_mapValues = (mapValues); - -// EXTERNAL MODULE: ./node_modules/lodash-es/isUndefined.js -var isUndefined = __webpack_require__(69592); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseLt.js -/** - * The base implementation of `_.lt` which doesn't coerce arguments. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if `value` is less than `other`, - * else `false`. - */ -function baseLt(value, other) { - return value < other; -} - -/* harmony default export */ const _baseLt = (baseLt); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/min.js - - - - -/** - * Computes the minimum value of `array`. If `array` is empty or falsey, - * `undefined` is returned. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Math - * @param {Array} array The array to iterate over. - * @returns {*} Returns the minimum value. - * @example - * - * _.min([4, 2, 8, 6]); - * // => 2 - * - * _.min([]); - * // => undefined - */ -function min(array) { - return (array && array.length) - ? _baseExtremum(array, identity/* default */.A, _baseLt) - : undefined; -} - -/* harmony default export */ const lodash_es_min = (min); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_root.js -var _root = __webpack_require__(41917); -;// CONCATENATED MODULE: ./node_modules/lodash-es/now.js - - -/** - * Gets the timestamp of the number of milliseconds that have elapsed since - * the Unix epoch (1 January 1970 00:00:00 UTC). - * - * @static - * @memberOf _ - * @since 2.4.0 - * @category Date - * @returns {number} Returns the timestamp. - * @example - * - * _.defer(function(stamp) { - * console.log(_.now() - stamp); - * }, _.now()); - * // => Logs the number of milliseconds it took for the deferred invocation. - */ -var now = function() { - return _root/* default */.A.Date.now(); -}; - -/* harmony default export */ const lodash_es_now = (now); - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/util.js - - - - - -/* - * Adds a dummy node to the graph and return v. - */ -function addDummyNode(g, type, attrs, name) { - var v; - do { - v = uniqueId/* default */.A(name); - } while (g.hasNode(v)); - - attrs.dummy = type; - g.setNode(v, attrs); - return v; -} - -/* - * Returns a new graph with only simple edges. Handles aggregation of data - * associated with multi-edges. - */ -function simplify(g) { - var simplified = new graphlib/* Graph */.T().setGraph(g.graph()); - forEach/* default */.A(g.nodes(), function (v) { - simplified.setNode(v, g.node(v)); - }); - forEach/* default */.A(g.edges(), function (e) { - var simpleLabel = simplified.edge(e.v, e.w) || { weight: 0, minlen: 1 }; - var label = g.edge(e); - simplified.setEdge(e.v, e.w, { - weight: simpleLabel.weight + label.weight, - minlen: Math.max(simpleLabel.minlen, label.minlen), - }); - }); - return simplified; -} - -function asNonCompoundGraph(g) { - var simplified = new graphlib/* Graph */.T({ multigraph: g.isMultigraph() }).setGraph(g.graph()); - forEach/* default */.A(g.nodes(), function (v) { - if (!g.children(v).length) { - simplified.setNode(v, g.node(v)); - } - }); - forEach/* default */.A(g.edges(), function (e) { - simplified.setEdge(e, g.edge(e)); - }); - return simplified; -} - -function successorWeights(g) { - var weightMap = _.map(g.nodes(), function (v) { - var sucs = {}; - _.forEach(g.outEdges(v), function (e) { - sucs[e.w] = (sucs[e.w] || 0) + g.edge(e).weight; - }); - return sucs; - }); - return _.zipObject(g.nodes(), weightMap); -} - -function predecessorWeights(g) { - var weightMap = _.map(g.nodes(), function (v) { - var preds = {}; - _.forEach(g.inEdges(v), function (e) { - preds[e.v] = (preds[e.v] || 0) + g.edge(e).weight; - }); - return preds; - }); - return _.zipObject(g.nodes(), weightMap); -} - -/* - * Finds where a line starting at point ({x, y}) would intersect a rectangle - * ({x, y, width, height}) if it were pointing at the rectangle's center. - */ -function intersectRect(rect, point) { - var x = rect.x; - var y = rect.y; - - // Rectangle intersection algorithm from: - // http://math.stackexchange.com/questions/108113/find-edge-between-two-boxes - var dx = point.x - x; - var dy = point.y - y; - var w = rect.width / 2; - var h = rect.height / 2; - - if (!dx && !dy) { - throw new Error('Not possible to find intersection inside of the rectangle'); - } - - var sx, sy; - if (Math.abs(dy) * w > Math.abs(dx) * h) { - // Intersection is top or bottom of rect. - if (dy < 0) { - h = -h; - } - sx = (h * dx) / dy; - sy = h; - } else { - // Intersection is left or right of rect. - if (dx < 0) { - w = -w; - } - sx = w; - sy = (w * dy) / dx; - } - - return { x: x + sx, y: y + sy }; -} - -/* - * Given a DAG with each node assigned "rank" and "order" properties, this - * function will produce a matrix with the ids of each node. - */ -function buildLayerMatrix(g) { - var layering = map/* default */.A(range/* default */.A(util_maxRank(g) + 1), function () { - return []; - }); - forEach/* default */.A(g.nodes(), function (v) { - var node = g.node(v); - var rank = node.rank; - if (!isUndefined/* default */.A(rank)) { - layering[rank][node.order] = v; - } - }); - return layering; -} - -/* - * Adjusts the ranks for all nodes in the graph such that all nodes v have - * rank(v) >= 0 and at least one node w has rank(w) = 0. - */ -function normalizeRanks(g) { - var min = lodash_es_min( - map/* default */.A(g.nodes(), function (v) { - return g.node(v).rank; - }) - ); - forEach/* default */.A(g.nodes(), function (v) { - var node = g.node(v); - if (has/* default */.A(node, 'rank')) { - node.rank -= min; - } - }); -} - -function removeEmptyRanks(g) { - // Ranks may not start at 0, so we need to offset them - var offset = lodash_es_min( - map/* default */.A(g.nodes(), function (v) { - return g.node(v).rank; - }) - ); - - var layers = []; - forEach/* default */.A(g.nodes(), function (v) { - var rank = g.node(v).rank - offset; - if (!layers[rank]) { - layers[rank] = []; - } - layers[rank].push(v); - }); - - var delta = 0; - var nodeRankFactor = g.graph().nodeRankFactor; - forEach/* default */.A(layers, function (vs, i) { - if (isUndefined/* default */.A(vs) && i % nodeRankFactor !== 0) { - --delta; - } else if (delta) { - forEach/* default */.A(vs, function (v) { - g.node(v).rank += delta; - }); - } - }); -} - -function addBorderNode(g, prefix, rank, order) { - var node = { - width: 0, - height: 0, - }; - if (arguments.length >= 4) { - node.rank = rank; - node.order = order; - } - return addDummyNode(g, 'border', node, prefix); -} - -function util_maxRank(g) { - return lodash_es_max( - map/* default */.A(g.nodes(), function (v) { - var rank = g.node(v).rank; - if (!isUndefined/* default */.A(rank)) { - return rank; - } - }) - ); -} - -/* - * Partition a collection into two groups: `lhs` and `rhs`. If the supplied - * function returns true for an entry it goes into `lhs`. Otherwise it goes - * into `rhs. - */ -function partition(collection, fn) { - var result = { lhs: [], rhs: [] }; - forEach/* default */.A(collection, function (value) { - if (fn(value)) { - result.lhs.push(value); - } else { - result.rhs.push(value); - } - }); - return result; -} - -/* - * Returns a new function that wraps `fn` with a timer. The wrapper logs the - * time it takes to execute the function. - */ -function util_time(name, fn) { - var start = lodash_es_now(); - try { - return fn(); - } finally { - console.log(name + ' time: ' + (lodash_es_now() - start) + 'ms'); - } -} - -function notime(name, fn) { - return fn(); -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/add-border-segments.js - - - - - -function addBorderSegments(g) { - function dfs(v) { - var children = g.children(v); - var node = g.node(v); - if (children.length) { - forEach/* default */.A(children, dfs); - } - - if (has/* default */.A(node, 'minRank')) { - node.borderLeft = []; - node.borderRight = []; - for (var rank = node.minRank, maxRank = node.maxRank + 1; rank < maxRank; ++rank) { - add_border_segments_addBorderNode(g, 'borderLeft', '_bl', v, node, rank); - add_border_segments_addBorderNode(g, 'borderRight', '_br', v, node, rank); - } - } - } - - forEach/* default */.A(g.children(), dfs); -} - -function add_border_segments_addBorderNode(g, prop, prefix, sg, sgNode, rank) { - var label = { width: 0, height: 0, rank: rank, borderType: prop }; - var prev = sgNode[prop][rank - 1]; - var curr = addDummyNode(g, 'border', label, prefix); - sgNode[prop][rank] = curr; - g.setParent(curr, sg); - if (prev) { - g.setEdge(prev, curr, { weight: 1 }); - } -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/coordinate-system.js - - - - -function adjust(g) { - var rankDir = g.graph().rankdir.toLowerCase(); - if (rankDir === 'lr' || rankDir === 'rl') { - swapWidthHeight(g); - } -} - -function coordinate_system_undo(g) { - var rankDir = g.graph().rankdir.toLowerCase(); - if (rankDir === 'bt' || rankDir === 'rl') { - reverseY(g); - } - - if (rankDir === 'lr' || rankDir === 'rl') { - swapXY(g); - swapWidthHeight(g); - } -} - -function swapWidthHeight(g) { - forEach/* default */.A(g.nodes(), function (v) { - swapWidthHeightOne(g.node(v)); - }); - forEach/* default */.A(g.edges(), function (e) { - swapWidthHeightOne(g.edge(e)); - }); -} - -function swapWidthHeightOne(attrs) { - var w = attrs.width; - attrs.width = attrs.height; - attrs.height = w; -} - -function reverseY(g) { - forEach/* default */.A(g.nodes(), function (v) { - reverseYOne(g.node(v)); - }); - - forEach/* default */.A(g.edges(), function (e) { - var edge = g.edge(e); - forEach/* default */.A(edge.points, reverseYOne); - if (has/* default */.A(edge, 'y')) { - reverseYOne(edge); - } - }); -} - -function reverseYOne(attrs) { - attrs.y = -attrs.y; -} - -function swapXY(g) { - forEach/* default */.A(g.nodes(), function (v) { - swapXYOne(g.node(v)); - }); - - forEach/* default */.A(g.edges(), function (e) { - var edge = g.edge(e); - forEach/* default */.A(edge.points, swapXYOne); - if (has/* default */.A(edge, 'x')) { - swapXYOne(edge); - } - }); -} - -function swapXYOne(attrs) { - var x = attrs.x; - attrs.x = attrs.y; - attrs.y = x; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/normalize.js - - - - - -/* - * Breaks any long edges in the graph into short segments that span 1 layer - * each. This operation is undoable with the denormalize function. - * - * Pre-conditions: - * - * 1. The input graph is a DAG. - * 2. Each node in the graph has a "rank" property. - * - * Post-condition: - * - * 1. All edges in the graph have a length of 1. - * 2. Dummy nodes are added where edges have been split into segments. - * 3. The graph is augmented with a "dummyChains" attribute which contains - * the first dummy in each chain of dummy nodes produced. - */ -function normalize_run(g) { - g.graph().dummyChains = []; - forEach/* default */.A(g.edges(), function (edge) { - normalizeEdge(g, edge); - }); -} - -function normalizeEdge(g, e) { - var v = e.v; - var vRank = g.node(v).rank; - var w = e.w; - var wRank = g.node(w).rank; - var name = e.name; - var edgeLabel = g.edge(e); - var labelRank = edgeLabel.labelRank; - - if (wRank === vRank + 1) return; - - g.removeEdge(e); - - var dummy, attrs, i; - for (i = 0, ++vRank; vRank < wRank; ++i, ++vRank) { - edgeLabel.points = []; - attrs = { - width: 0, - height: 0, - edgeLabel: edgeLabel, - edgeObj: e, - rank: vRank, - }; - dummy = addDummyNode(g, 'edge', attrs, '_d'); - if (vRank === labelRank) { - attrs.width = edgeLabel.width; - attrs.height = edgeLabel.height; - // @ts-expect-error - attrs.dummy = 'edge-label'; - // @ts-expect-error - attrs.labelpos = edgeLabel.labelpos; - } - g.setEdge(v, dummy, { weight: edgeLabel.weight }, name); - if (i === 0) { - g.graph().dummyChains.push(dummy); - } - v = dummy; - } - - g.setEdge(v, w, { weight: edgeLabel.weight }, name); -} - -function normalize_undo(g) { - forEach/* default */.A(g.graph().dummyChains, function (v) { - var node = g.node(v); - var origLabel = node.edgeLabel; - var w; - g.setEdge(node.edgeObj, origLabel); - while (node.dummy) { - w = g.successors(v)[0]; - g.removeNode(v); - origLabel.points.push({ x: node.x, y: node.y }); - if (node.dummy === 'edge-label') { - origLabel.x = node.x; - origLabel.y = node.y; - origLabel.width = node.width; - origLabel.height = node.height; - } - v = w; - node = g.node(v); - } - }); -} - -;// CONCATENATED MODULE: ./node_modules/lodash-es/minBy.js - - - - -/** - * This method is like `_.min` except that it accepts `iteratee` which is - * invoked for each element in `array` to generate the criterion by which - * the value is ranked. The iteratee is invoked with one argument: (value). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Math - * @param {Array} array The array to iterate over. - * @param {Function} [iteratee=_.identity] The iteratee invoked per element. - * @returns {*} Returns the minimum value. - * @example - * - * var objects = [{ 'n': 1 }, { 'n': 2 }]; - * - * _.minBy(objects, function(o) { return o.n; }); - * // => { 'n': 1 } - * - * // The `_.property` iteratee shorthand. - * _.minBy(objects, 'n'); - * // => { 'n': 1 } - */ -function minBy(array, iteratee) { - return (array && array.length) - ? _baseExtremum(array, (0,_baseIteratee/* default */.A)(iteratee, 2), _baseLt) - : undefined; -} - -/* harmony default export */ const lodash_es_minBy = (minBy); - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/rank/util.js - - - - -/* - * Initializes ranks for the input graph using the longest path algorithm. This - * algorithm scales well and is fast in practice, it yields rather poor - * solutions. Nodes are pushed to the lowest layer possible, leaving the bottom - * ranks wide and leaving edges longer than necessary. However, due to its - * speed, this algorithm is good for getting an initial ranking that can be fed - * into other algorithms. - * - * This algorithm does not normalize layers because it will be used by other - * algorithms in most cases. If using this algorithm directly, be sure to - * run normalize at the end. - * - * Pre-conditions: - * - * 1. Input graph is a DAG. - * 2. Input graph node labels can be assigned properties. - * - * Post-conditions: - * - * 1. Each node will be assign an (unnormalized) "rank" property. - */ -function longestPath(g) { - var visited = {}; - - function dfs(v) { - var label = g.node(v); - if (has/* default */.A(visited, v)) { - return label.rank; - } - visited[v] = true; - - var rank = lodash_es_min( - map/* default */.A(g.outEdges(v), function (e) { - return dfs(e.w) - g.edge(e).minlen; - }) - ); - - if ( - rank === Number.POSITIVE_INFINITY || // return value of _.map([]) for Lodash 3 - rank === undefined || // return value of _.map([]) for Lodash 4 - rank === null - ) { - // return value of _.map([null]) - rank = 0; - } - - return (label.rank = rank); - } - - forEach/* default */.A(g.sources(), dfs); -} - -/* - * Returns the amount of slack for the given edge. The slack is defined as the - * difference between the length of the edge and its minimum length. - */ -function slack(g, e) { - return g.node(e.w).rank - g.node(e.v).rank - g.edge(e).minlen; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/rank/feasible-tree.js - - - - - - -/* - * Constructs a spanning tree with tight edges and adjusted the input node's - * ranks to achieve this. A tight edge is one that is has a length that matches - * its "minlen" attribute. - * - * The basic structure for this function is derived from Gansner, et al., "A - * Technique for Drawing Directed Graphs." - * - * Pre-conditions: - * - * 1. Graph must be a DAG. - * 2. Graph must be connected. - * 3. Graph must have at least one node. - * 5. Graph nodes must have been previously assigned a "rank" property that - * respects the "minlen" property of incident edges. - * 6. Graph edges must have a "minlen" property. - * - * Post-conditions: - * - * - Graph nodes will have their rank adjusted to ensure that all edges are - * tight. - * - * Returns a tree (undirected graph) that is constructed using only "tight" - * edges. - */ -function feasibleTree(g) { - var t = new graphlib/* Graph */.T({ directed: false }); - - // Choose arbitrary node from which to start our tree - var start = g.nodes()[0]; - var size = g.nodeCount(); - t.setNode(start, {}); - - var edge, delta; - while (tightTree(t, g) < size) { - edge = findMinSlackEdge(t, g); - delta = t.hasNode(edge.v) ? slack(g, edge) : -slack(g, edge); - shiftRanks(t, g, delta); - } - - return t; -} - -/* - * Finds a maximal tree of tight edges and returns the number of nodes in the - * tree. - */ -function tightTree(t, g) { - function dfs(v) { - forEach/* default */.A(g.nodeEdges(v), function (e) { - var edgeV = e.v, - w = v === edgeV ? e.w : edgeV; - if (!t.hasNode(w) && !slack(g, e)) { - t.setNode(w, {}); - t.setEdge(v, w, {}); - dfs(w); - } - }); - } - - forEach/* default */.A(t.nodes(), dfs); - return t.nodeCount(); -} - -/* - * Finds the edge with the smallest slack that is incident on tree and returns - * it. - */ -function findMinSlackEdge(t, g) { - return lodash_es_minBy(g.edges(), function (e) { - if (t.hasNode(e.v) !== t.hasNode(e.w)) { - return slack(g, e); - } - }); -} - -function shiftRanks(t, g, delta) { - forEach/* default */.A(t.nodes(), function (v) { - g.node(v).rank += delta; - }); -} - -// EXTERNAL MODULE: ./node_modules/lodash-es/isArrayLike.js -var isArrayLike = __webpack_require__(38446); -// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js -var keys = __webpack_require__(27422); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_createFind.js - - - - -/** - * Creates a `_.find` or `_.findLast` function. - * - * @private - * @param {Function} findIndexFunc The function to find the collection index. - * @returns {Function} Returns the new find function. - */ -function createFind(findIndexFunc) { - return function(collection, predicate, fromIndex) { - var iterable = Object(collection); - if (!(0,isArrayLike/* default */.A)(collection)) { - var iteratee = (0,_baseIteratee/* default */.A)(predicate, 3); - collection = (0,keys/* default */.A)(collection); - predicate = function(key) { return iteratee(iterable[key], key, iterable); }; - } - var index = findIndexFunc(collection, predicate, fromIndex); - return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined; - }; -} - -/* harmony default export */ const _createFind = (createFind); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFindIndex.js -var _baseFindIndex = __webpack_require__(25707); -// EXTERNAL MODULE: ./node_modules/lodash-es/toFinite.js + 3 modules -var toFinite = __webpack_require__(74342); -;// CONCATENATED MODULE: ./node_modules/lodash-es/toInteger.js - - -/** - * Converts `value` to an integer. - * - * **Note:** This method is loosely based on - * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {number} Returns the converted integer. - * @example - * - * _.toInteger(3.2); - * // => 3 - * - * _.toInteger(Number.MIN_VALUE); - * // => 0 - * - * _.toInteger(Infinity); - * // => 1.7976931348623157e+308 - * - * _.toInteger('3.2'); - * // => 3 - */ -function toInteger(value) { - var result = (0,toFinite/* default */.A)(value), - remainder = result % 1; - - return result === result ? (remainder ? result - remainder : result) : 0; -} - -/* harmony default export */ const lodash_es_toInteger = (toInteger); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/findIndex.js - - - - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max; - -/** - * This method is like `_.find` except that it returns the index of the first - * element `predicate` returns truthy for instead of the element itself. - * - * @static - * @memberOf _ - * @since 1.1.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @param {number} [fromIndex=0] The index to search from. - * @returns {number} Returns the index of the found element, else `-1`. - * @example - * - * var users = [ - * { 'user': 'barney', 'active': false }, - * { 'user': 'fred', 'active': false }, - * { 'user': 'pebbles', 'active': true } - * ]; - * - * _.findIndex(users, function(o) { return o.user == 'barney'; }); - * // => 0 - * - * // The `_.matches` iteratee shorthand. - * _.findIndex(users, { 'user': 'fred', 'active': false }); - * // => 1 - * - * // The `_.matchesProperty` iteratee shorthand. - * _.findIndex(users, ['active', false]); - * // => 0 - * - * // The `_.property` iteratee shorthand. - * _.findIndex(users, 'active'); - * // => 2 - */ -function findIndex(array, predicate, fromIndex) { - var length = array == null ? 0 : array.length; - if (!length) { - return -1; - } - var index = fromIndex == null ? 0 : lodash_es_toInteger(fromIndex); - if (index < 0) { - index = nativeMax(length + index, 0); - } - return (0,_baseFindIndex/* default */.A)(array, (0,_baseIteratee/* default */.A)(predicate, 3), index); -} - -/* harmony default export */ const lodash_es_findIndex = (findIndex); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/find.js - - - -/** - * Iterates over elements of `collection`, returning the first element - * `predicate` returns truthy for. The predicate is invoked with three - * arguments: (value, index|key, collection). - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to inspect. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @param {number} [fromIndex=0] The index to search from. - * @returns {*} Returns the matched element, else `undefined`. - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': true }, - * { 'user': 'fred', 'age': 40, 'active': false }, - * { 'user': 'pebbles', 'age': 1, 'active': true } - * ]; - * - * _.find(users, function(o) { return o.age < 40; }); - * // => object for 'barney' - * - * // The `_.matches` iteratee shorthand. - * _.find(users, { 'age': 1, 'active': true }); - * // => object for 'pebbles' - * - * // The `_.matchesProperty` iteratee shorthand. - * _.find(users, ['active', false]); - * // => object for 'fred' - * - * // The `_.property` iteratee shorthand. - * _.find(users, 'active'); - * // => object for 'barney' - */ -var find = _createFind(lodash_es_findIndex); - -/* harmony default export */ const lodash_es_find = (find); - -// EXTERNAL MODULE: ./node_modules/lodash-es/filter.js + 1 modules -var filter = __webpack_require__(11662); -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/dijkstra.js - - - - - -var DEFAULT_WEIGHT_FUNC = constant/* default */.A(1); - -function dijkstra_dijkstra(g, source, weightFn, edgeFn) { - return runDijkstra( - g, - String(source), - weightFn || DEFAULT_WEIGHT_FUNC, - edgeFn || - function (v) { - return g.outEdges(v); - } - ); -} - -function runDijkstra(g, source, weightFn, edgeFn) { - var results = {}; - var pq = new PriorityQueue(); - var v, vEntry; - - var updateNeighbors = function (edge) { - var w = edge.v !== v ? edge.v : edge.w; - var wEntry = results[w]; - var weight = weightFn(edge); - var distance = vEntry.distance + weight; - - if (weight < 0) { - throw new Error( - 'dijkstra does not allow negative edge weights. ' + - 'Bad edge: ' + - edge + - ' Weight: ' + - weight - ); - } - - if (distance < wEntry.distance) { - wEntry.distance = distance; - wEntry.predecessor = v; - pq.decrease(w, distance); - } - }; - - g.nodes().forEach(function (v) { - var distance = v === source ? 0 : Number.POSITIVE_INFINITY; - results[v] = { distance: distance }; - pq.add(v, distance); - }); - - while (pq.size() > 0) { - v = pq.removeMin(); - vEntry = results[v]; - if (vEntry.distance === Number.POSITIVE_INFINITY) { - break; - } - - edgeFn(v).forEach(updateNeighbors); - } - - return results; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/dijkstra-all.js - - - - - -function dijkstraAll(g, weightFunc, edgeFunc) { - return _.transform( - g.nodes(), - function (acc, v) { - acc[v] = dijkstra(g, v, weightFunc, edgeFunc); - }, - {} - ); -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/floyd-warshall.js - - - - -var floyd_warshall_DEFAULT_WEIGHT_FUNC = constant/* default */.A(1); - -function floydWarshall(g, weightFn, edgeFn) { - return runFloydWarshall( - g, - weightFn || floyd_warshall_DEFAULT_WEIGHT_FUNC, - edgeFn || - function (v) { - return g.outEdges(v); - } - ); -} - -function runFloydWarshall(g, weightFn, edgeFn) { - var results = {}; - var nodes = g.nodes(); - - nodes.forEach(function (v) { - results[v] = {}; - results[v][v] = { distance: 0 }; - nodes.forEach(function (w) { - if (v !== w) { - results[v][w] = { distance: Number.POSITIVE_INFINITY }; - } - }); - edgeFn(v).forEach(function (edge) { - var w = edge.v === v ? edge.w : edge.v; - var d = weightFn(edge); - results[v][w] = { distance: d, predecessor: v }; - }); - }); - - nodes.forEach(function (k) { - var rowK = results[k]; - nodes.forEach(function (i) { - var rowI = results[i]; - nodes.forEach(function (j) { - var ik = rowI[k]; - var kj = rowK[j]; - var ij = rowI[j]; - var altDistance = ik.distance + kj.distance; - if (altDistance < ij.distance) { - ij.distance = altDistance; - ij.predecessor = kj.predecessor; - } - }); - }); - }); - - return results; -} - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseKeys.js + 1 modules -var _baseKeys = __webpack_require__(69471); -// EXTERNAL MODULE: ./node_modules/lodash-es/_getTag.js + 3 modules -var _getTag = __webpack_require__(9779); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGetTag.js + 2 modules -var _baseGetTag = __webpack_require__(88496); -// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js -var isArray = __webpack_require__(92049); -// EXTERNAL MODULE: ./node_modules/lodash-es/isObjectLike.js -var isObjectLike = __webpack_require__(53098); -;// CONCATENATED MODULE: ./node_modules/lodash-es/isString.js - - - - -/** `Object#toString` result references. */ -var stringTag = '[object String]'; - -/** - * Checks if `value` is classified as a `String` primitive or object. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a string, else `false`. - * @example - * - * _.isString('abc'); - * // => true - * - * _.isString(1); - * // => false - */ -function isString(value) { - return typeof value == 'string' || - (!(0,isArray/* default */.A)(value) && (0,isObjectLike/* default */.A)(value) && (0,_baseGetTag/* default */.A)(value) == stringTag); -} - -/* harmony default export */ const lodash_es_isString = (isString); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseProperty.js -var _baseProperty = __webpack_require__(70805); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_asciiSize.js - - -/** - * Gets the size of an ASCII `string`. - * - * @private - * @param {string} string The string inspect. - * @returns {number} Returns the string size. - */ -var asciiSize = (0,_baseProperty/* default */.A)('length'); - -/* harmony default export */ const _asciiSize = (asciiSize); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_hasUnicode.js -/** Used to compose unicode character classes. */ -var rsAstralRange = '\\ud800-\\udfff', - rsComboMarksRange = '\\u0300-\\u036f', - reComboHalfMarksRange = '\\ufe20-\\ufe2f', - rsComboSymbolsRange = '\\u20d0-\\u20ff', - rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, - rsVarRange = '\\ufe0e\\ufe0f'; - -/** Used to compose unicode capture groups. */ -var rsZWJ = '\\u200d'; - -/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ -var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']'); - -/** - * Checks if `string` contains Unicode symbols. - * - * @private - * @param {string} string The string to inspect. - * @returns {boolean} Returns `true` if a symbol is found, else `false`. - */ -function hasUnicode(string) { - return reHasUnicode.test(string); -} - -/* harmony default export */ const _hasUnicode = (hasUnicode); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_unicodeSize.js -/** Used to compose unicode character classes. */ -var _unicodeSize_rsAstralRange = '\\ud800-\\udfff', - _unicodeSize_rsComboMarksRange = '\\u0300-\\u036f', - _unicodeSize_reComboHalfMarksRange = '\\ufe20-\\ufe2f', - _unicodeSize_rsComboSymbolsRange = '\\u20d0-\\u20ff', - _unicodeSize_rsComboRange = _unicodeSize_rsComboMarksRange + _unicodeSize_reComboHalfMarksRange + _unicodeSize_rsComboSymbolsRange, - _unicodeSize_rsVarRange = '\\ufe0e\\ufe0f'; - -/** Used to compose unicode capture groups. */ -var rsAstral = '[' + _unicodeSize_rsAstralRange + ']', - rsCombo = '[' + _unicodeSize_rsComboRange + ']', - rsFitz = '\\ud83c[\\udffb-\\udfff]', - rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', - rsNonAstral = '[^' + _unicodeSize_rsAstralRange + ']', - rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', - rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', - _unicodeSize_rsZWJ = '\\u200d'; - -/** Used to compose unicode regexes. */ -var reOptMod = rsModifier + '?', - rsOptVar = '[' + _unicodeSize_rsVarRange + ']?', - rsOptJoin = '(?:' + _unicodeSize_rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', - rsSeq = rsOptVar + reOptMod + rsOptJoin, - rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; - -/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ -var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); - -/** - * Gets the size of a Unicode `string`. - * - * @private - * @param {string} string The string inspect. - * @returns {number} Returns the string size. - */ -function unicodeSize(string) { - var result = reUnicode.lastIndex = 0; - while (reUnicode.test(string)) { - ++result; - } - return result; -} - -/* harmony default export */ const _unicodeSize = (unicodeSize); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_stringSize.js - - - - -/** - * Gets the number of symbols in `string`. - * - * @private - * @param {string} string The string to inspect. - * @returns {number} Returns the string size. - */ -function stringSize(string) { - return _hasUnicode(string) - ? _unicodeSize(string) - : _asciiSize(string); -} - -/* harmony default export */ const _stringSize = (stringSize); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/size.js - - - - - - -/** `Object#toString` result references. */ -var mapTag = '[object Map]', - setTag = '[object Set]'; - -/** - * Gets the size of `collection` by returning its length for array-like - * values or the number of own enumerable string keyed properties for objects. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object|string} collection The collection to inspect. - * @returns {number} Returns the collection size. - * @example - * - * _.size([1, 2, 3]); - * // => 3 - * - * _.size({ 'a': 1, 'b': 2 }); - * // => 2 - * - * _.size('pebbles'); - * // => 7 - */ -function size(collection) { - if (collection == null) { - return 0; - } - if ((0,isArrayLike/* default */.A)(collection)) { - return lodash_es_isString(collection) ? _stringSize(collection) : collection.length; - } - var tag = (0,_getTag/* default */.A)(collection); - if (tag == mapTag || tag == setTag) { - return collection.size; - } - return (0,_baseKeys/* default */.A)(collection).length; -} - -/* harmony default export */ const lodash_es_size = (size); - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/topsort.js - - - - -topsort_topsort.CycleException = topsort_CycleException; - -function topsort_topsort(g) { - var visited = {}; - var stack = {}; - var results = []; - - function visit(node) { - if (has/* default */.A(stack, node)) { - throw new topsort_CycleException(); - } - - if (!has/* default */.A(visited, node)) { - stack[node] = true; - visited[node] = true; - forEach/* default */.A(g.predecessors(node), visit); - delete stack[node]; - results.push(node); - } - } - - forEach/* default */.A(g.sinks(), visit); - - if (lodash_es_size(visited) !== g.nodeCount()) { - throw new topsort_CycleException(); - } - - return results; -} - -function topsort_CycleException() {} -topsort_CycleException.prototype = new Error(); // must be an instance of Error to pass testing - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/is-acyclic.js - - - - -function isAcyclic(g) { - try { - topsort(g); - } catch (e) { - if (e instanceof CycleException) { - return false; - } - throw e; - } - return true; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/dfs.js - - - - -/* - * A helper that preforms a pre- or post-order traversal on the input graph - * and returns the nodes in the order they were visited. If the graph is - * undirected then this algorithm will navigate using neighbors. If the graph - * is directed then this algorithm will navigate using successors. - * - * Order must be one of "pre" or "post". - */ -function dfs(g, vs, order) { - if (!isArray/* default */.A(vs)) { - vs = [vs]; - } - - var navigation = (g.isDirected() ? g.successors : g.neighbors).bind(g); - - var acc = []; - var visited = {}; - forEach/* default */.A(vs, function (v) { - if (!g.hasNode(v)) { - throw new Error('Graph does not have node: ' + v); - } - - doDfs(g, v, order === 'post', visited, navigation, acc); - }); - return acc; -} - -function doDfs(g, v, postorder, visited, navigation, acc) { - if (!has/* default */.A(visited, v)) { - visited[v] = true; - - if (!postorder) { - acc.push(v); - } - forEach/* default */.A(navigation(v), function (w) { - doDfs(g, w, postorder, visited, navigation, acc); - }); - if (postorder) { - acc.push(v); - } - } -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/postorder.js - - - - -function postorder(g, vs) { - return dfs(g, vs, 'post'); -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/preorder.js - - - - -function preorder(g, vs) { - return dfs(g, vs, 'pre'); -} - -// EXTERNAL MODULE: ./node_modules/dagre-d3-es/src/graphlib/graph.js + 9 modules -var graph = __webpack_require__(73046); -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/prim.js - - - - - - -function prim(g, weightFunc) { - var result = new Graph(); - var parents = {}; - var pq = new PriorityQueue(); - var v; - - function updateNeighbors(edge) { - var w = edge.v === v ? edge.w : edge.v; - var pri = pq.priority(w); - if (pri !== undefined) { - var edgeWeight = weightFunc(edge); - if (edgeWeight < pri) { - parents[w] = v; - pq.decrease(w, edgeWeight); - } - } - } - - if (g.nodeCount() === 0) { - return result; - } - - _.each(g.nodes(), function (v) { - pq.add(v, Number.POSITIVE_INFINITY); - result.setNode(v); - }); - - // Start from an arbitrary node - pq.decrease(g.nodes()[0], 0); - - var init = false; - while (pq.size() > 0) { - v = pq.removeMin(); - if (_.has(parents, v)) { - result.setEdge(v, parents[v]); - } else if (init) { - throw new Error('Input graph is not connected: ' + g); - } else { - init = true; - } - - g.nodeEdges(v).forEach(updateNeighbors); - } - - return result; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/index.js - - - - - - - - - - - - - - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/rank/network-simplex.js - - - - - - - - -// Expose some internals for testing purposes -networkSimplex.initLowLimValues = initLowLimValues; -networkSimplex.initCutValues = initCutValues; -networkSimplex.calcCutValue = calcCutValue; -networkSimplex.leaveEdge = leaveEdge; -networkSimplex.enterEdge = enterEdge; -networkSimplex.exchangeEdges = exchangeEdges; - -/* - * The network simplex algorithm assigns ranks to each node in the input graph - * and iteratively improves the ranking to reduce the length of edges. - * - * Preconditions: - * - * 1. The input graph must be a DAG. - * 2. All nodes in the graph must have an object value. - * 3. All edges in the graph must have "minlen" and "weight" attributes. - * - * Postconditions: - * - * 1. All nodes in the graph will have an assigned "rank" attribute that has - * been optimized by the network simplex algorithm. Ranks start at 0. - * - * - * A rough sketch of the algorithm is as follows: - * - * 1. Assign initial ranks to each node. We use the longest path algorithm, - * which assigns ranks to the lowest position possible. In general this - * leads to very wide bottom ranks and unnecessarily long edges. - * 2. Construct a feasible tight tree. A tight tree is one such that all - * edges in the tree have no slack (difference between length of edge - * and minlen for the edge). This by itself greatly improves the assigned - * rankings by shorting edges. - * 3. Iteratively find edges that have negative cut values. Generally a - * negative cut value indicates that the edge could be removed and a new - * tree edge could be added to produce a more compact graph. - * - * Much of the algorithms here are derived from Gansner, et al., "A Technique - * for Drawing Directed Graphs." The structure of the file roughly follows the - * structure of the overall algorithm. - */ -function networkSimplex(g) { - g = simplify(g); - longestPath(g); - var t = feasibleTree(g); - initLowLimValues(t); - initCutValues(t, g); - - var e, f; - while ((e = leaveEdge(t))) { - f = enterEdge(t, g, e); - exchangeEdges(t, g, e, f); - } -} - -/* - * Initializes cut values for all edges in the tree. - */ -function initCutValues(t, g) { - var vs = postorder(t, t.nodes()); - vs = vs.slice(0, vs.length - 1); - forEach/* default */.A(vs, function (v) { - assignCutValue(t, g, v); - }); -} - -function assignCutValue(t, g, child) { - var childLab = t.node(child); - var parent = childLab.parent; - t.edge(child, parent).cutvalue = calcCutValue(t, g, child); -} - -/* - * Given the tight tree, its graph, and a child in the graph calculate and - * return the cut value for the edge between the child and its parent. - */ -function calcCutValue(t, g, child) { - var childLab = t.node(child); - var parent = childLab.parent; - // True if the child is on the tail end of the edge in the directed graph - var childIsTail = true; - // The graph's view of the tree edge we're inspecting - var graphEdge = g.edge(child, parent); - // The accumulated cut value for the edge between this node and its parent - var cutValue = 0; - - if (!graphEdge) { - childIsTail = false; - graphEdge = g.edge(parent, child); - } - - cutValue = graphEdge.weight; - - forEach/* default */.A(g.nodeEdges(child), function (e) { - var isOutEdge = e.v === child, - other = isOutEdge ? e.w : e.v; - - if (other !== parent) { - var pointsToHead = isOutEdge === childIsTail, - otherWeight = g.edge(e).weight; - - cutValue += pointsToHead ? otherWeight : -otherWeight; - if (isTreeEdge(t, child, other)) { - var otherCutValue = t.edge(child, other).cutvalue; - cutValue += pointsToHead ? -otherCutValue : otherCutValue; - } - } - }); - - return cutValue; -} - -function initLowLimValues(tree, root) { - if (arguments.length < 2) { - root = tree.nodes()[0]; - } - dfsAssignLowLim(tree, {}, 1, root); -} - -function dfsAssignLowLim(tree, visited, nextLim, v, parent) { - var low = nextLim; - var label = tree.node(v); - - visited[v] = true; - forEach/* default */.A(tree.neighbors(v), function (w) { - if (!has/* default */.A(visited, w)) { - nextLim = dfsAssignLowLim(tree, visited, nextLim, w, v); - } - }); - - label.low = low; - label.lim = nextLim++; - if (parent) { - label.parent = parent; - } else { - // TODO should be able to remove this when we incrementally update low lim - delete label.parent; - } - - return nextLim; -} - -function leaveEdge(tree) { - return lodash_es_find(tree.edges(), function (e) { - return tree.edge(e).cutvalue < 0; - }); -} - -function enterEdge(t, g, edge) { - var v = edge.v; - var w = edge.w; - - // For the rest of this function we assume that v is the tail and w is the - // head, so if we don't have this edge in the graph we should flip it to - // match the correct orientation. - if (!g.hasEdge(v, w)) { - v = edge.w; - w = edge.v; - } - - var vLabel = t.node(v); - var wLabel = t.node(w); - var tailLabel = vLabel; - var flip = false; - - // If the root is in the tail of the edge then we need to flip the logic that - // checks for the head and tail nodes in the candidates function below. - if (vLabel.lim > wLabel.lim) { - tailLabel = wLabel; - flip = true; - } - - var candidates = filter/* default */.A(g.edges(), function (edge) { - return ( - flip === isDescendant(t, t.node(edge.v), tailLabel) && - flip !== isDescendant(t, t.node(edge.w), tailLabel) - ); - }); - - return lodash_es_minBy(candidates, function (edge) { - return slack(g, edge); - }); -} - -function exchangeEdges(t, g, e, f) { - var v = e.v; - var w = e.w; - t.removeEdge(v, w); - t.setEdge(f.v, f.w, {}); - initLowLimValues(t); - initCutValues(t, g); - updateRanks(t, g); -} - -function updateRanks(t, g) { - var root = lodash_es_find(t.nodes(), function (v) { - return !g.node(v).parent; - }); - var vs = preorder(t, root); - vs = vs.slice(1); - forEach/* default */.A(vs, function (v) { - var parent = t.node(v).parent, - edge = g.edge(v, parent), - flipped = false; - - if (!edge) { - edge = g.edge(parent, v); - flipped = true; - } - - g.node(v).rank = g.node(parent).rank + (flipped ? edge.minlen : -edge.minlen); - }); -} - -/* - * Returns true if the edge is in the tree. - */ -function isTreeEdge(tree, u, v) { - return tree.hasEdge(u, v); -} - -/* - * Returns true if the specified node is descendant of the root node per the - * assigned low and lim attributes in the tree. - */ -function isDescendant(tree, vLabel, rootLabel) { - return rootLabel.low <= vLabel.lim && vLabel.lim <= rootLabel.lim; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/rank/index.js - - - - - - -/* - * Assigns a rank to each node in the input graph that respects the "minlen" - * constraint specified on edges between nodes. - * - * This basic structure is derived from Gansner, et al., "A Technique for - * Drawing Directed Graphs." - * - * Pre-conditions: - * - * 1. Graph must be a connected DAG - * 2. Graph nodes must be objects - * 3. Graph edges must have "weight" and "minlen" attributes - * - * Post-conditions: - * - * 1. Graph nodes will have a "rank" attribute based on the results of the - * algorithm. Ranks can start at any index (including negative), we'll - * fix them up later. - */ -function rank(g) { - switch (g.graph().ranker) { - case 'network-simplex': - networkSimplexRanker(g); - break; - case 'tight-tree': - tightTreeRanker(g); - break; - case 'longest-path': - longestPathRanker(g); - break; - default: - networkSimplexRanker(g); - } -} - -// A fast and simple ranker, but results are far from optimal. -var longestPathRanker = longestPath; - -function tightTreeRanker(g) { - longestPath(g); - feasibleTree(g); -} - -function networkSimplexRanker(g) { - networkSimplex(g); -} - -// EXTERNAL MODULE: ./node_modules/lodash-es/values.js + 1 modules -var values = __webpack_require__(38207); -// EXTERNAL MODULE: ./node_modules/lodash-es/reduce.js + 2 modules -var reduce = __webpack_require__(89463); -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/nesting-graph.js - - - - - -/* - * A nesting graph creates dummy nodes for the tops and bottoms of subgraphs, - * adds appropriate edges to ensure that all cluster nodes are placed between - * these boundries, and ensures that the graph is connected. - * - * In addition we ensure, through the use of the minlen property, that nodes - * and subgraph border nodes to not end up on the same rank. - * - * Preconditions: - * - * 1. Input graph is a DAG - * 2. Nodes in the input graph has a minlen attribute - * - * Postconditions: - * - * 1. Input graph is connected. - * 2. Dummy nodes are added for the tops and bottoms of subgraphs. - * 3. The minlen attribute for nodes is adjusted to ensure nodes do not - * get placed on the same rank as subgraph border nodes. - * - * The nesting graph idea comes from Sander, "Layout of Compound Directed - * Graphs." - */ -function nesting_graph_run(g) { - var root = addDummyNode(g, 'root', {}, '_root'); - var depths = treeDepths(g); - var height = lodash_es_max(values/* default */.A(depths)) - 1; // Note: depths is an Object not an array - var nodeSep = 2 * height + 1; - - g.graph().nestingRoot = root; - - // Multiply minlen by nodeSep to align nodes on non-border ranks. - forEach/* default */.A(g.edges(), function (e) { - g.edge(e).minlen *= nodeSep; - }); - - // Calculate a weight that is sufficient to keep subgraphs vertically compact - var weight = sumWeights(g) + 1; - - // Create border nodes and link them up - forEach/* default */.A(g.children(), function (child) { - nesting_graph_dfs(g, root, nodeSep, weight, height, depths, child); - }); - - // Save the multiplier for node layers for later removal of empty border - // layers. - g.graph().nodeRankFactor = nodeSep; -} - -function nesting_graph_dfs(g, root, nodeSep, weight, height, depths, v) { - var children = g.children(v); - if (!children.length) { - if (v !== root) { - g.setEdge(root, v, { weight: 0, minlen: nodeSep }); - } - return; - } - - var top = addBorderNode(g, '_bt'); - var bottom = addBorderNode(g, '_bb'); - var label = g.node(v); - - g.setParent(top, v); - label.borderTop = top; - g.setParent(bottom, v); - label.borderBottom = bottom; - - forEach/* default */.A(children, function (child) { - nesting_graph_dfs(g, root, nodeSep, weight, height, depths, child); - - var childNode = g.node(child); - var childTop = childNode.borderTop ? childNode.borderTop : child; - var childBottom = childNode.borderBottom ? childNode.borderBottom : child; - var thisWeight = childNode.borderTop ? weight : 2 * weight; - var minlen = childTop !== childBottom ? 1 : height - depths[v] + 1; - - g.setEdge(top, childTop, { - weight: thisWeight, - minlen: minlen, - nestingEdge: true, - }); - - g.setEdge(childBottom, bottom, { - weight: thisWeight, - minlen: minlen, - nestingEdge: true, - }); - }); - - if (!g.parent(v)) { - g.setEdge(root, top, { weight: 0, minlen: height + depths[v] }); - } -} - -function treeDepths(g) { - var depths = {}; - function dfs(v, depth) { - var children = g.children(v); - if (children && children.length) { - forEach/* default */.A(children, function (child) { - dfs(child, depth + 1); - }); - } - depths[v] = depth; - } - forEach/* default */.A(g.children(), function (v) { - dfs(v, 1); - }); - return depths; -} - -function sumWeights(g) { - return reduce/* default */.A( - g.edges(), - function (acc, e) { - return acc + g.edge(e).weight; - }, - 0 - ); -} - -function cleanup(g) { - var graphLabel = g.graph(); - g.removeNode(graphLabel.nestingRoot); - delete graphLabel.nestingRoot; - forEach/* default */.A(g.edges(), function (e) { - var edge = g.edge(e); - if (edge.nestingEdge) { - g.removeEdge(e); - } - }); -} - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseClone.js + 15 modules -var _baseClone = __webpack_require__(91641); -;// CONCATENATED MODULE: ./node_modules/lodash-es/cloneDeep.js - - -/** Used to compose bitmasks for cloning. */ -var CLONE_DEEP_FLAG = 1, - CLONE_SYMBOLS_FLAG = 4; - -/** - * This method is like `_.clone` except that it recursively clones `value`. - * - * @static - * @memberOf _ - * @since 1.0.0 - * @category Lang - * @param {*} value The value to recursively clone. - * @returns {*} Returns the deep cloned value. - * @see _.clone - * @example - * - * var objects = [{ 'a': 1 }, { 'b': 2 }]; - * - * var deep = _.cloneDeep(objects); - * console.log(deep[0] === objects[0]); - * // => false - */ -function cloneDeep(value) { - return (0,_baseClone/* default */.A)(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); -} - -/* harmony default export */ const lodash_es_cloneDeep = (cloneDeep); - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/add-subgraph-constraints.js - - - - -function addSubgraphConstraints(g, cg, vs) { - var prev = {}, - rootPrev; - - forEach/* default */.A(vs, function (v) { - var child = g.parent(v), - parent, - prevChild; - while (child) { - parent = g.parent(child); - if (parent) { - prevChild = prev[parent]; - prev[parent] = child; - } else { - prevChild = rootPrev; - rootPrev = child; - } - if (prevChild && prevChild !== child) { - cg.setEdge(prevChild, child); - return; - } - child = parent; - } - }); - - /* - function dfs(v) { - var children = v ? g.children(v) : g.children(); - if (children.length) { - var min = Number.POSITIVE_INFINITY, - subgraphs = []; - _.each(children, function(child) { - var childMin = dfs(child); - if (g.children(child).length) { - subgraphs.push({ v: child, order: childMin }); - } - min = Math.min(min, childMin); - }); - _.reduce(_.sortBy(subgraphs, "order"), function(prev, curr) { - cg.setEdge(prev.v, curr.v); - return curr; - }); - return min; - } - return g.node(v).order; - } - dfs(undefined); - */ -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/build-layer-graph.js - - - - - -/* - * Constructs a graph that can be used to sort a layer of nodes. The graph will - * contain all base and subgraph nodes from the request layer in their original - * hierarchy and any edges that are incident on these nodes and are of the type - * requested by the "relationship" parameter. - * - * Nodes from the requested rank that do not have parents are assigned a root - * node in the output graph, which is set in the root graph attribute. This - * makes it easy to walk the hierarchy of movable nodes during ordering. - * - * Pre-conditions: - * - * 1. Input graph is a DAG - * 2. Base nodes in the input graph have a rank attribute - * 3. Subgraph nodes in the input graph has minRank and maxRank attributes - * 4. Edges have an assigned weight - * - * Post-conditions: - * - * 1. Output graph has all nodes in the movable rank with preserved - * hierarchy. - * 2. Root nodes in the movable layer are made children of the node - * indicated by the root attribute of the graph. - * 3. Non-movable nodes incident on movable nodes, selected by the - * relationship parameter, are included in the graph (without hierarchy). - * 4. Edges incident on movable nodes, selected by the relationship - * parameter, are added to the output graph. - * 5. The weights for copied edges are aggregated as need, since the output - * graph is not a multi-graph. - */ -function buildLayerGraph(g, rank, relationship) { - var root = createRootNode(g), - result = new graphlib/* Graph */.T({ compound: true }) - .setGraph({ root: root }) - .setDefaultNodeLabel(function (v) { - return g.node(v); - }); - - forEach/* default */.A(g.nodes(), function (v) { - var node = g.node(v), - parent = g.parent(v); - - if (node.rank === rank || (node.minRank <= rank && rank <= node.maxRank)) { - result.setNode(v); - result.setParent(v, parent || root); - - // This assumes we have only short edges! - forEach/* default */.A(g[relationship](v), function (e) { - var u = e.v === v ? e.w : e.v, - edge = result.edge(u, v), - weight = !isUndefined/* default */.A(edge) ? edge.weight : 0; - result.setEdge(u, v, { weight: g.edge(e).weight + weight }); - }); - - if (has/* default */.A(node, 'minRank')) { - result.setNode(v, { - borderLeft: node.borderLeft[rank], - borderRight: node.borderRight[rank], - }); - } - } - }); - - return result; -} - -function createRootNode(g) { - var v; - while (g.hasNode((v = uniqueId/* default */.A('_root')))); - return v; -} - -// EXTERNAL MODULE: ./node_modules/lodash-es/_assignValue.js -var _assignValue = __webpack_require__(52851); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseZipObject.js -/** - * This base implementation of `_.zipObject` which assigns values using `assignFunc`. - * - * @private - * @param {Array} props The property identifiers. - * @param {Array} values The property values. - * @param {Function} assignFunc The function to assign values. - * @returns {Object} Returns the new object. - */ -function baseZipObject(props, values, assignFunc) { - var index = -1, - length = props.length, - valsLength = values.length, - result = {}; - - while (++index < length) { - var value = index < valsLength ? values[index] : undefined; - assignFunc(result, props[index], value); - } - return result; -} - -/* harmony default export */ const _baseZipObject = (baseZipObject); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/zipObject.js - - - -/** - * This method is like `_.fromPairs` except that it accepts two arrays, - * one of property identifiers and one of corresponding values. - * - * @static - * @memberOf _ - * @since 0.4.0 - * @category Array - * @param {Array} [props=[]] The property identifiers. - * @param {Array} [values=[]] The property values. - * @returns {Object} Returns the new object. - * @example - * - * _.zipObject(['a', 'b'], [1, 2]); - * // => { 'a': 1, 'b': 2 } - */ -function zipObject(props, values) { - return _baseZipObject(props || [], values || [], _assignValue/* default */.A); -} - -/* harmony default export */ const lodash_es_zipObject = (zipObject); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFlatten.js + 1 modules -var _baseFlatten = __webpack_require__(13588); -// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayMap.js -var _arrayMap = __webpack_require__(45572); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGet.js -var _baseGet = __webpack_require__(66318); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseMap.js -var _baseMap = __webpack_require__(52568); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseSortBy.js -/** - * The base implementation of `_.sortBy` which uses `comparer` to define the - * sort order of `array` and replaces criteria objects with their corresponding - * values. - * - * @private - * @param {Array} array The array to sort. - * @param {Function} comparer The function to define sort order. - * @returns {Array} Returns `array`. - */ -function baseSortBy(array, comparer) { - var length = array.length; - - array.sort(comparer); - while (length--) { - array[length] = array[length].value; - } - return array; -} - -/* harmony default export */ const _baseSortBy = (baseSortBy); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseUnary.js -var _baseUnary = __webpack_require__(52789); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_compareAscending.js - - -/** - * Compares values to sort them in ascending order. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {number} Returns the sort order indicator for `value`. - */ -function compareAscending(value, other) { - if (value !== other) { - var valIsDefined = value !== undefined, - valIsNull = value === null, - valIsReflexive = value === value, - valIsSymbol = (0,isSymbol/* default */.A)(value); - - var othIsDefined = other !== undefined, - othIsNull = other === null, - othIsReflexive = other === other, - othIsSymbol = (0,isSymbol/* default */.A)(other); - - if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) || - (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) || - (valIsNull && othIsDefined && othIsReflexive) || - (!valIsDefined && othIsReflexive) || - !valIsReflexive) { - return 1; - } - if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) || - (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) || - (othIsNull && valIsDefined && valIsReflexive) || - (!othIsDefined && valIsReflexive) || - !othIsReflexive) { - return -1; - } - } - return 0; -} - -/* harmony default export */ const _compareAscending = (compareAscending); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_compareMultiple.js - - -/** - * Used by `_.orderBy` to compare multiple properties of a value to another - * and stable sort them. - * - * If `orders` is unspecified, all values are sorted in ascending order. Otherwise, - * specify an order of "desc" for descending or "asc" for ascending sort order - * of corresponding values. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {boolean[]|string[]} orders The order to sort by for each property. - * @returns {number} Returns the sort order indicator for `object`. - */ -function compareMultiple(object, other, orders) { - var index = -1, - objCriteria = object.criteria, - othCriteria = other.criteria, - length = objCriteria.length, - ordersLength = orders.length; - - while (++index < length) { - var result = _compareAscending(objCriteria[index], othCriteria[index]); - if (result) { - if (index >= ordersLength) { - return result; - } - var order = orders[index]; - return result * (order == 'desc' ? -1 : 1); - } - } - // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications - // that causes it, under certain circumstances, to provide the same value for - // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247 - // for more details. - // - // This also ensures a stable sort in V8 and other engines. - // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details. - return object.index - other.index; -} - -/* harmony default export */ const _compareMultiple = (compareMultiple); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseOrderBy.js - - - - - - - - - - -/** - * The base implementation of `_.orderBy` without param guards. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. - * @param {string[]} orders The sort orders of `iteratees`. - * @returns {Array} Returns the new sorted array. - */ -function baseOrderBy(collection, iteratees, orders) { - if (iteratees.length) { - iteratees = (0,_arrayMap/* default */.A)(iteratees, function(iteratee) { - if ((0,isArray/* default */.A)(iteratee)) { - return function(value) { - return (0,_baseGet/* default */.A)(value, iteratee.length === 1 ? iteratee[0] : iteratee); - } - } - return iteratee; - }); - } else { - iteratees = [identity/* default */.A]; - } - - var index = -1; - iteratees = (0,_arrayMap/* default */.A)(iteratees, (0,_baseUnary/* default */.A)(_baseIteratee/* default */.A)); - - var result = (0,_baseMap/* default */.A)(collection, function(value, key, collection) { - var criteria = (0,_arrayMap/* default */.A)(iteratees, function(iteratee) { - return iteratee(value); - }); - return { 'criteria': criteria, 'index': ++index, 'value': value }; - }); - - return _baseSortBy(result, function(object, other) { - return _compareMultiple(object, other, orders); - }); -} - -/* harmony default export */ const _baseOrderBy = (baseOrderBy); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseRest.js -var _baseRest = __webpack_require__(24326); -// EXTERNAL MODULE: ./node_modules/lodash-es/_isIterateeCall.js -var _isIterateeCall = __webpack_require__(6832); -;// CONCATENATED MODULE: ./node_modules/lodash-es/sortBy.js - - - - - -/** - * Creates an array of elements, sorted in ascending order by the results of - * running each element in a collection thru each iteratee. This method - * performs a stable sort, that is, it preserves the original sort order of - * equal elements. The iteratees are invoked with one argument: (value). - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {...(Function|Function[])} [iteratees=[_.identity]] - * The iteratees to sort by. - * @returns {Array} Returns the new sorted array. - * @example - * - * var users = [ - * { 'user': 'fred', 'age': 48 }, - * { 'user': 'barney', 'age': 36 }, - * { 'user': 'fred', 'age': 30 }, - * { 'user': 'barney', 'age': 34 } - * ]; - * - * _.sortBy(users, [function(o) { return o.user; }]); - * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]] - * - * _.sortBy(users, ['user', 'age']); - * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]] - */ -var sortBy = (0,_baseRest/* default */.A)(function(collection, iteratees) { - if (collection == null) { - return []; - } - var length = iteratees.length; - if (length > 1 && (0,_isIterateeCall/* default */.A)(collection, iteratees[0], iteratees[1])) { - iteratees = []; - } else if (length > 2 && (0,_isIterateeCall/* default */.A)(iteratees[0], iteratees[1], iteratees[2])) { - iteratees = [iteratees[0]]; - } - return _baseOrderBy(collection, (0,_baseFlatten/* default */.A)(iteratees, 1), []); -}); - -/* harmony default export */ const lodash_es_sortBy = (sortBy); - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/cross-count.js - - - - -/* - * A function that takes a layering (an array of layers, each with an array of - * ordererd nodes) and a graph and returns a weighted crossing count. - * - * Pre-conditions: - * - * 1. Input graph must be simple (not a multigraph), directed, and include - * only simple edges. - * 2. Edges in the input graph must have assigned weights. - * - * Post-conditions: - * - * 1. The graph and layering matrix are left unchanged. - * - * This algorithm is derived from Barth, et al., "Bilayer Cross Counting." - */ -function crossCount(g, layering) { - var cc = 0; - for (var i = 1; i < layering.length; ++i) { - cc += twoLayerCrossCount(g, layering[i - 1], layering[i]); - } - return cc; -} - -function twoLayerCrossCount(g, northLayer, southLayer) { - // Sort all of the edges between the north and south layers by their position - // in the north layer and then the south. Map these edges to the position of - // their head in the south layer. - var southPos = lodash_es_zipObject( - southLayer, - map/* default */.A(southLayer, function (v, i) { - return i; - }) - ); - var southEntries = flatten/* default */.A( - map/* default */.A(northLayer, function (v) { - return lodash_es_sortBy( - map/* default */.A(g.outEdges(v), function (e) { - return { pos: southPos[e.w], weight: g.edge(e).weight }; - }), - 'pos' - ); - }) - ); - - // Build the accumulator tree - var firstIndex = 1; - while (firstIndex < southLayer.length) firstIndex <<= 1; - var treeSize = 2 * firstIndex - 1; - firstIndex -= 1; - var tree = map/* default */.A(new Array(treeSize), function () { - return 0; - }); - - // Calculate the weighted crossings - var cc = 0; - forEach/* default */.A( - // @ts-expect-error - southEntries.forEach(function (entry) { - var index = entry.pos + firstIndex; - tree[index] += entry.weight; - var weightSum = 0; - // @ts-expect-error - while (index > 0) { - // @ts-expect-error - if (index % 2) { - weightSum += tree[index + 1]; - } - // @ts-expect-error - index = (index - 1) >> 1; - tree[index] += entry.weight; - } - cc += entry.weight * weightSum; - }) - ); - - return cc; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/init-order.js - - - - -/* - * Assigns an initial order value for each node by performing a DFS search - * starting from nodes in the first rank. Nodes are assigned an order in their - * rank as they are first visited. - * - * This approach comes from Gansner, et al., "A Technique for Drawing Directed - * Graphs." - * - * Returns a layering matrix with an array per layer and each layer sorted by - * the order of its nodes. - */ -function initOrder(g) { - var visited = {}; - var simpleNodes = filter/* default */.A(g.nodes(), function (v) { - return !g.children(v).length; - }); - var maxRank = lodash_es_max( - map/* default */.A(simpleNodes, function (v) { - return g.node(v).rank; - }) - ); - var layers = map/* default */.A(range/* default */.A(maxRank + 1), function () { - return []; - }); - - function dfs(v) { - if (has/* default */.A(visited, v)) return; - visited[v] = true; - var node = g.node(v); - layers[node.rank].push(v); - forEach/* default */.A(g.successors(v), dfs); - } - - var orderedVs = lodash_es_sortBy(simpleNodes, function (v) { - return g.node(v).rank; - }); - forEach/* default */.A(orderedVs, dfs); - - return layers; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/barycenter.js - - - - -function barycenter(g, movable) { - return map/* default */.A(movable, function (v) { - var inV = g.inEdges(v); - if (!inV.length) { - return { v: v }; - } else { - var result = reduce/* default */.A( - inV, - function (acc, e) { - var edge = g.edge(e), - nodeU = g.node(e.v); - return { - sum: acc.sum + edge.weight * nodeU.order, - weight: acc.weight + edge.weight, - }; - }, - { sum: 0, weight: 0 } - ); - - return { - v: v, - barycenter: result.sum / result.weight, - weight: result.weight, - }; - } - }); -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/resolve-conflicts.js - - - - -/* - * Given a list of entries of the form {v, barycenter, weight} and a - * constraint graph this function will resolve any conflicts between the - * constraint graph and the barycenters for the entries. If the barycenters for - * an entry would violate a constraint in the constraint graph then we coalesce - * the nodes in the conflict into a new node that respects the contraint and - * aggregates barycenter and weight information. - * - * This implementation is based on the description in Forster, "A Fast and - * Simple Hueristic for Constrained Two-Level Crossing Reduction," thought it - * differs in some specific details. - * - * Pre-conditions: - * - * 1. Each entry has the form {v, barycenter, weight}, or if the node has - * no barycenter, then {v}. - * - * Returns: - * - * A new list of entries of the form {vs, i, barycenter, weight}. The list - * `vs` may either be a singleton or it may be an aggregation of nodes - * ordered such that they do not violate constraints from the constraint - * graph. The property `i` is the lowest original index of any of the - * elements in `vs`. - */ -function resolveConflicts(entries, cg) { - var mappedEntries = {}; - forEach/* default */.A(entries, function (entry, i) { - var tmp = (mappedEntries[entry.v] = { - indegree: 0, - in: [], - out: [], - vs: [entry.v], - i: i, - }); - if (!isUndefined/* default */.A(entry.barycenter)) { - // @ts-expect-error - tmp.barycenter = entry.barycenter; - // @ts-expect-error - tmp.weight = entry.weight; - } - }); - - forEach/* default */.A(cg.edges(), function (e) { - var entryV = mappedEntries[e.v]; - var entryW = mappedEntries[e.w]; - if (!isUndefined/* default */.A(entryV) && !isUndefined/* default */.A(entryW)) { - entryW.indegree++; - entryV.out.push(mappedEntries[e.w]); - } - }); - - var sourceSet = filter/* default */.A(mappedEntries, function (entry) { - // @ts-expect-error - return !entry.indegree; - }); - - return doResolveConflicts(sourceSet); -} - -function doResolveConflicts(sourceSet) { - var entries = []; - - function handleIn(vEntry) { - return function (uEntry) { - if (uEntry.merged) { - return; - } - if ( - isUndefined/* default */.A(uEntry.barycenter) || - isUndefined/* default */.A(vEntry.barycenter) || - uEntry.barycenter >= vEntry.barycenter - ) { - mergeEntries(vEntry, uEntry); - } - }; - } - - function handleOut(vEntry) { - return function (wEntry) { - wEntry['in'].push(vEntry); - if (--wEntry.indegree === 0) { - sourceSet.push(wEntry); - } - }; - } - - while (sourceSet.length) { - var entry = sourceSet.pop(); - entries.push(entry); - forEach/* default */.A(entry['in'].reverse(), handleIn(entry)); - forEach/* default */.A(entry.out, handleOut(entry)); - } - - return map/* default */.A( - filter/* default */.A(entries, function (entry) { - return !entry.merged; - }), - function (entry) { - return pick/* default */.A(entry, ['vs', 'i', 'barycenter', 'weight']); - } - ); -} - -function mergeEntries(target, source) { - var sum = 0; - var weight = 0; - - if (target.weight) { - sum += target.barycenter * target.weight; - weight += target.weight; - } - - if (source.weight) { - sum += source.barycenter * source.weight; - weight += source.weight; - } - - target.vs = source.vs.concat(target.vs); - target.barycenter = sum / weight; - target.weight = weight; - target.i = Math.min(source.i, target.i); - source.merged = true; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/sort.js - - - - - -function sort(entries, biasRight) { - var parts = partition(entries, function (entry) { - return has/* default */.A(entry, 'barycenter'); - }); - var sortable = parts.lhs, - unsortable = lodash_es_sortBy(parts.rhs, function (entry) { - return -entry.i; - }), - vs = [], - sum = 0, - weight = 0, - vsIndex = 0; - - sortable.sort(compareWithBias(!!biasRight)); - - vsIndex = consumeUnsortable(vs, unsortable, vsIndex); - - forEach/* default */.A(sortable, function (entry) { - vsIndex += entry.vs.length; - vs.push(entry.vs); - sum += entry.barycenter * entry.weight; - weight += entry.weight; - vsIndex = consumeUnsortable(vs, unsortable, vsIndex); - }); - - var result = { vs: flatten/* default */.A(vs) }; - if (weight) { - result.barycenter = sum / weight; - result.weight = weight; - } - return result; -} - -function consumeUnsortable(vs, unsortable, index) { - var last; - while (unsortable.length && (last = lodash_es_last(unsortable)).i <= index) { - unsortable.pop(); - vs.push(last.vs); - index++; - } - return index; -} - -function compareWithBias(bias) { - return function (entryV, entryW) { - if (entryV.barycenter < entryW.barycenter) { - return -1; - } else if (entryV.barycenter > entryW.barycenter) { - return 1; - } - - return !bias ? entryV.i - entryW.i : entryW.i - entryV.i; - }; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/sort-subgraph.js - - - - - - - -function sortSubgraph(g, v, cg, biasRight) { - var movable = g.children(v); - var node = g.node(v); - var bl = node ? node.borderLeft : undefined; - var br = node ? node.borderRight : undefined; - var subgraphs = {}; - - if (bl) { - movable = filter/* default */.A(movable, function (w) { - return w !== bl && w !== br; - }); - } - - var barycenters = barycenter(g, movable); - forEach/* default */.A(barycenters, function (entry) { - if (g.children(entry.v).length) { - var subgraphResult = sortSubgraph(g, entry.v, cg, biasRight); - subgraphs[entry.v] = subgraphResult; - if (has/* default */.A(subgraphResult, 'barycenter')) { - mergeBarycenters(entry, subgraphResult); - } - } - }); - - var entries = resolveConflicts(barycenters, cg); - expandSubgraphs(entries, subgraphs); - - var result = sort(entries, biasRight); - - if (bl) { - result.vs = flatten/* default */.A([bl, result.vs, br]); - if (g.predecessors(bl).length) { - var blPred = g.node(g.predecessors(bl)[0]), - brPred = g.node(g.predecessors(br)[0]); - if (!has/* default */.A(result, 'barycenter')) { - result.barycenter = 0; - result.weight = 0; - } - result.barycenter = - (result.barycenter * result.weight + blPred.order + brPred.order) / (result.weight + 2); - result.weight += 2; - } - } - - return result; -} - -function expandSubgraphs(entries, subgraphs) { - forEach/* default */.A(entries, function (entry) { - entry.vs = flatten/* default */.A( - entry.vs.map(function (v) { - if (subgraphs[v]) { - return subgraphs[v].vs; - } - return v; - }) - ); - }); -} - -function mergeBarycenters(target, other) { - if (!isUndefined/* default */.A(target.barycenter)) { - target.barycenter = - (target.barycenter * target.weight + other.barycenter * other.weight) / - (target.weight + other.weight); - target.weight += other.weight; - } else { - target.barycenter = other.barycenter; - target.weight = other.weight; - } -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/index.js - - - - - - - - - - - -/* - * Applies heuristics to minimize edge crossings in the graph and sets the best - * order solution as an order attribute on each node. - * - * Pre-conditions: - * - * 1. Graph must be DAG - * 2. Graph nodes must be objects with a "rank" attribute - * 3. Graph edges must have the "weight" attribute - * - * Post-conditions: - * - * 1. Graph nodes will have an "order" attribute based on the results of the - * algorithm. - */ -function order(g) { - var maxRank = util_maxRank(g), - downLayerGraphs = buildLayerGraphs(g, range/* default */.A(1, maxRank + 1), 'inEdges'), - upLayerGraphs = buildLayerGraphs(g, range/* default */.A(maxRank - 1, -1, -1), 'outEdges'); - - var layering = initOrder(g); - assignOrder(g, layering); - - var bestCC = Number.POSITIVE_INFINITY, - best; - - for (var i = 0, lastBest = 0; lastBest < 4; ++i, ++lastBest) { - sweepLayerGraphs(i % 2 ? downLayerGraphs : upLayerGraphs, i % 4 >= 2); - - layering = buildLayerMatrix(g); - var cc = crossCount(g, layering); - if (cc < bestCC) { - lastBest = 0; - best = lodash_es_cloneDeep(layering); - bestCC = cc; - } - } - - assignOrder(g, best); -} - -function buildLayerGraphs(g, ranks, relationship) { - return map/* default */.A(ranks, function (rank) { - return buildLayerGraph(g, rank, relationship); - }); -} - -function sweepLayerGraphs(layerGraphs, biasRight) { - var cg = new graphlib/* Graph */.T(); - forEach/* default */.A(layerGraphs, function (lg) { - var root = lg.graph().root; - var sorted = sortSubgraph(lg, root, cg, biasRight); - forEach/* default */.A(sorted.vs, function (v, i) { - lg.node(v).order = i; - }); - addSubgraphConstraints(lg, cg, sorted.vs); - }); -} - -function assignOrder(g, layering) { - forEach/* default */.A(layering, function (layer) { - forEach/* default */.A(layer, function (v, i) { - g.node(v).order = i; - }); - }); -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/parent-dummy-chains.js - - - - -function parentDummyChains(g) { - var postorderNums = parent_dummy_chains_postorder(g); - - forEach/* default */.A(g.graph().dummyChains, function (v) { - var node = g.node(v); - var edgeObj = node.edgeObj; - var pathData = findPath(g, postorderNums, edgeObj.v, edgeObj.w); - var path = pathData.path; - var lca = pathData.lca; - var pathIdx = 0; - var pathV = path[pathIdx]; - var ascending = true; - - while (v !== edgeObj.w) { - node = g.node(v); - - if (ascending) { - while ((pathV = path[pathIdx]) !== lca && g.node(pathV).maxRank < node.rank) { - pathIdx++; - } - - if (pathV === lca) { - ascending = false; - } - } - - if (!ascending) { - while ( - pathIdx < path.length - 1 && - g.node((pathV = path[pathIdx + 1])).minRank <= node.rank - ) { - pathIdx++; - } - pathV = path[pathIdx]; - } - - g.setParent(v, pathV); - v = g.successors(v)[0]; - } - }); -} - -// Find a path from v to w through the lowest common ancestor (LCA). Return the -// full path and the LCA. -function findPath(g, postorderNums, v, w) { - var vPath = []; - var wPath = []; - var low = Math.min(postorderNums[v].low, postorderNums[w].low); - var lim = Math.max(postorderNums[v].lim, postorderNums[w].lim); - var parent; - var lca; - - // Traverse up from v to find the LCA - parent = v; - do { - parent = g.parent(parent); - vPath.push(parent); - } while (parent && (postorderNums[parent].low > low || lim > postorderNums[parent].lim)); - lca = parent; - - // Traverse from w to LCA - parent = w; - while ((parent = g.parent(parent)) !== lca) { - wPath.push(parent); - } - - return { path: vPath.concat(wPath.reverse()), lca: lca }; -} - -function parent_dummy_chains_postorder(g) { - var result = {}; - var lim = 0; - - function dfs(v) { - var low = lim; - forEach/* default */.A(g.children(v), dfs); - result[v] = { low: low, lim: lim++ }; - } - forEach/* default */.A(g.children(), dfs); - - return result; -} - -// EXTERNAL MODULE: ./node_modules/lodash-es/_castFunction.js -var _castFunction = __webpack_require__(99922); -;// CONCATENATED MODULE: ./node_modules/lodash-es/forOwn.js - - - -/** - * Iterates over own enumerable string keyed properties of an object and - * invokes `iteratee` for each property. The iteratee is invoked with three - * arguments: (value, key, object). Iteratee functions may exit iteration - * early by explicitly returning `false`. - * - * @static - * @memberOf _ - * @since 0.3.0 - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Object} Returns `object`. - * @see _.forOwnRight - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.forOwn(new Foo, function(value, key) { - * console.log(key); - * }); - * // => Logs 'a' then 'b' (iteration order is not guaranteed). - */ -function forOwn(object, iteratee) { - return object && (0,_baseForOwn/* default */.A)(object, (0,_castFunction/* default */.A)(iteratee)); -} - -/* harmony default export */ const lodash_es_forOwn = (forOwn); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFor.js + 1 modules -var _baseFor = __webpack_require__(4574); -// EXTERNAL MODULE: ./node_modules/lodash-es/keysIn.js + 2 modules -var keysIn = __webpack_require__(55615); -;// CONCATENATED MODULE: ./node_modules/lodash-es/forIn.js - - - - -/** - * Iterates over own and inherited enumerable string keyed properties of an - * object and invokes `iteratee` for each property. The iteratee is invoked - * with three arguments: (value, key, object). Iteratee functions may exit - * iteration early by explicitly returning `false`. - * - * @static - * @memberOf _ - * @since 0.3.0 - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Object} Returns `object`. - * @see _.forInRight - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.forIn(new Foo, function(value, key) { - * console.log(key); - * }); - * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed). - */ -function forIn(object, iteratee) { - return object == null - ? object - : (0,_baseFor/* default */.A)(object, (0,_castFunction/* default */.A)(iteratee), keysIn/* default */.A); -} - -/* harmony default export */ const lodash_es_forIn = (forIn); - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/position/bk.js - - - - -/* - * This module provides coordinate assignment based on Brandes and Köpf, "Fast - * and Simple Horizontal Coordinate Assignment." - */ - - - -/* - * Marks all edges in the graph with a type-1 conflict with the "type1Conflict" - * property. A type-1 conflict is one where a non-inner segment crosses an - * inner segment. An inner segment is an edge with both incident nodes marked - * with the "dummy" property. - * - * This algorithm scans layer by layer, starting with the second, for type-1 - * conflicts between the current layer and the previous layer. For each layer - * it scans the nodes from left to right until it reaches one that is incident - * on an inner segment. It then scans predecessors to determine if they have - * edges that cross that inner segment. At the end a final scan is done for all - * nodes on the current rank to see if they cross the last visited inner - * segment. - * - * This algorithm (safely) assumes that a dummy node will only be incident on a - * single node in the layers being scanned. - */ -function findType1Conflicts(g, layering) { - var conflicts = {}; - - function visitLayer(prevLayer, layer) { - var // last visited node in the previous layer that is incident on an inner - // segment. - k0 = 0, - // Tracks the last node in this layer scanned for crossings with a type-1 - // segment. - scanPos = 0, - prevLayerLength = prevLayer.length, - lastNode = lodash_es_last(layer); - - forEach/* default */.A(layer, function (v, i) { - var w = findOtherInnerSegmentNode(g, v), - k1 = w ? g.node(w).order : prevLayerLength; - - if (w || v === lastNode) { - forEach/* default */.A(layer.slice(scanPos, i + 1), function (scanNode) { - forEach/* default */.A(g.predecessors(scanNode), function (u) { - var uLabel = g.node(u), - uPos = uLabel.order; - if ((uPos < k0 || k1 < uPos) && !(uLabel.dummy && g.node(scanNode).dummy)) { - addConflict(conflicts, u, scanNode); - } - }); - }); - // @ts-expect-error - scanPos = i + 1; - k0 = k1; - } - }); - - return layer; - } - - reduce/* default */.A(layering, visitLayer); - return conflicts; -} - -function findType2Conflicts(g, layering) { - var conflicts = {}; - - function scan(south, southPos, southEnd, prevNorthBorder, nextNorthBorder) { - var v; - forEach/* default */.A(range/* default */.A(southPos, southEnd), function (i) { - v = south[i]; - if (g.node(v).dummy) { - forEach/* default */.A(g.predecessors(v), function (u) { - var uNode = g.node(u); - if (uNode.dummy && (uNode.order < prevNorthBorder || uNode.order > nextNorthBorder)) { - addConflict(conflicts, u, v); - } - }); - } - }); - } - - function visitLayer(north, south) { - var prevNorthPos = -1, - nextNorthPos, - southPos = 0; - - forEach/* default */.A(south, function (v, southLookahead) { - if (g.node(v).dummy === 'border') { - var predecessors = g.predecessors(v); - if (predecessors.length) { - nextNorthPos = g.node(predecessors[0]).order; - scan(south, southPos, southLookahead, prevNorthPos, nextNorthPos); - // @ts-expect-error - southPos = southLookahead; - prevNorthPos = nextNorthPos; - } - } - scan(south, southPos, south.length, nextNorthPos, north.length); - }); - - return south; - } - - reduce/* default */.A(layering, visitLayer); - return conflicts; -} - -function findOtherInnerSegmentNode(g, v) { - if (g.node(v).dummy) { - return lodash_es_find(g.predecessors(v), function (u) { - return g.node(u).dummy; - }); - } -} - -function addConflict(conflicts, v, w) { - if (v > w) { - var tmp = v; - v = w; - w = tmp; - } - - var conflictsV = conflicts[v]; - if (!conflictsV) { - conflicts[v] = conflictsV = {}; - } - conflictsV[w] = true; -} - -function hasConflict(conflicts, v, w) { - if (v > w) { - var tmp = v; - v = w; - w = tmp; - } - return has/* default */.A(conflicts[v], w); -} - -/* - * Try to align nodes into vertical "blocks" where possible. This algorithm - * attempts to align a node with one of its median neighbors. If the edge - * connecting a neighbor is a type-1 conflict then we ignore that possibility. - * If a previous node has already formed a block with a node after the node - * we're trying to form a block with, we also ignore that possibility - our - * blocks would be split in that scenario. - */ -function verticalAlignment(g, layering, conflicts, neighborFn) { - var root = {}, - align = {}, - pos = {}; - - // We cache the position here based on the layering because the graph and - // layering may be out of sync. The layering matrix is manipulated to - // generate different extreme alignments. - forEach/* default */.A(layering, function (layer) { - forEach/* default */.A(layer, function (v, order) { - root[v] = v; - align[v] = v; - pos[v] = order; - }); - }); - - forEach/* default */.A(layering, function (layer) { - var prevIdx = -1; - forEach/* default */.A(layer, function (v) { - var ws = neighborFn(v); - if (ws.length) { - ws = lodash_es_sortBy(ws, function (w) { - return pos[w]; - }); - var mp = (ws.length - 1) / 2; - for (var i = Math.floor(mp), il = Math.ceil(mp); i <= il; ++i) { - var w = ws[i]; - if (align[v] === v && prevIdx < pos[w] && !hasConflict(conflicts, v, w)) { - align[w] = v; - align[v] = root[v] = root[w]; - prevIdx = pos[w]; - } - } - } - }); - }); - - return { root: root, align: align }; -} - -function horizontalCompaction(g, layering, root, align, reverseSep) { - // This portion of the algorithm differs from BK due to a number of problems. - // Instead of their algorithm we construct a new block graph and do two - // sweeps. The first sweep places blocks with the smallest possible - // coordinates. The second sweep removes unused space by moving blocks to the - // greatest coordinates without violating separation. - var xs = {}, - blockG = buildBlockGraph(g, layering, root, reverseSep), - borderType = reverseSep ? 'borderLeft' : 'borderRight'; - - function iterate(setXsFunc, nextNodesFunc) { - var stack = blockG.nodes(); - var elem = stack.pop(); - var visited = {}; - while (elem) { - if (visited[elem]) { - setXsFunc(elem); - } else { - visited[elem] = true; - stack.push(elem); - stack = stack.concat(nextNodesFunc(elem)); - } - - elem = stack.pop(); - } - } - - // First pass, assign smallest coordinates - function pass1(elem) { - xs[elem] = blockG.inEdges(elem).reduce(function (acc, e) { - return Math.max(acc, xs[e.v] + blockG.edge(e)); - }, 0); - } - - // Second pass, assign greatest coordinates - function pass2(elem) { - var min = blockG.outEdges(elem).reduce(function (acc, e) { - return Math.min(acc, xs[e.w] - blockG.edge(e)); - }, Number.POSITIVE_INFINITY); - - var node = g.node(elem); - if (min !== Number.POSITIVE_INFINITY && node.borderType !== borderType) { - xs[elem] = Math.max(xs[elem], min); - } - } - - iterate(pass1, blockG.predecessors.bind(blockG)); - iterate(pass2, blockG.successors.bind(blockG)); - - // Assign x coordinates to all nodes - forEach/* default */.A(align, function (v) { - xs[v] = xs[root[v]]; - }); - - return xs; -} - -function buildBlockGraph(g, layering, root, reverseSep) { - var blockGraph = new graphlib/* Graph */.T(), - graphLabel = g.graph(), - sepFn = sep(graphLabel.nodesep, graphLabel.edgesep, reverseSep); - - forEach/* default */.A(layering, function (layer) { - var u; - forEach/* default */.A(layer, function (v) { - var vRoot = root[v]; - blockGraph.setNode(vRoot); - if (u) { - var uRoot = root[u], - prevMax = blockGraph.edge(uRoot, vRoot); - blockGraph.setEdge(uRoot, vRoot, Math.max(sepFn(g, v, u), prevMax || 0)); - } - u = v; - }); - }); - - return blockGraph; -} - -/* - * Returns the alignment that has the smallest width of the given alignments. - */ -function findSmallestWidthAlignment(g, xss) { - return lodash_es_minBy(values/* default */.A(xss), function (xs) { - var max = Number.NEGATIVE_INFINITY; - var min = Number.POSITIVE_INFINITY; - - lodash_es_forIn(xs, function (x, v) { - var halfWidth = width(g, v) / 2; - - max = Math.max(x + halfWidth, max); - min = Math.min(x - halfWidth, min); - }); - - return max - min; - }); -} - -/* - * Align the coordinates of each of the layout alignments such that - * left-biased alignments have their minimum coordinate at the same point as - * the minimum coordinate of the smallest width alignment and right-biased - * alignments have their maximum coordinate at the same point as the maximum - * coordinate of the smallest width alignment. - */ -function alignCoordinates(xss, alignTo) { - var alignToVals = values/* default */.A(alignTo), - alignToMin = lodash_es_min(alignToVals), - alignToMax = lodash_es_max(alignToVals); - - forEach/* default */.A(['u', 'd'], function (vert) { - forEach/* default */.A(['l', 'r'], function (horiz) { - var alignment = vert + horiz, - xs = xss[alignment], - delta; - if (xs === alignTo) return; - - var xsVals = values/* default */.A(xs); - delta = horiz === 'l' ? alignToMin - lodash_es_min(xsVals) : alignToMax - lodash_es_max(xsVals); - - if (delta) { - xss[alignment] = lodash_es_mapValues(xs, function (x) { - return x + delta; - }); - } - }); - }); -} - -function balance(xss, align) { - return lodash_es_mapValues(xss.ul, function (ignore, v) { - if (align) { - return xss[align.toLowerCase()][v]; - } else { - var xs = lodash_es_sortBy(map/* default */.A(xss, v)); - return (xs[1] + xs[2]) / 2; - } - }); -} - -function positionX(g) { - var layering = buildLayerMatrix(g); - var conflicts = merge/* default */.A(findType1Conflicts(g, layering), findType2Conflicts(g, layering)); - - var xss = {}; - var adjustedLayering; - forEach/* default */.A(['u', 'd'], function (vert) { - adjustedLayering = vert === 'u' ? layering : values/* default */.A(layering).reverse(); - forEach/* default */.A(['l', 'r'], function (horiz) { - if (horiz === 'r') { - adjustedLayering = map/* default */.A(adjustedLayering, function (inner) { - return values/* default */.A(inner).reverse(); - }); - } - - var neighborFn = (vert === 'u' ? g.predecessors : g.successors).bind(g); - var align = verticalAlignment(g, adjustedLayering, conflicts, neighborFn); - var xs = horizontalCompaction(g, adjustedLayering, align.root, align.align, horiz === 'r'); - if (horiz === 'r') { - xs = lodash_es_mapValues(xs, function (x) { - return -x; - }); - } - xss[vert + horiz] = xs; - }); - }); - - var smallestWidth = findSmallestWidthAlignment(g, xss); - alignCoordinates(xss, smallestWidth); - return balance(xss, g.graph().align); -} - -function sep(nodeSep, edgeSep, reverseSep) { - return function (g, v, w) { - var vLabel = g.node(v); - var wLabel = g.node(w); - var sum = 0; - var delta; - - sum += vLabel.width / 2; - if (has/* default */.A(vLabel, 'labelpos')) { - switch (vLabel.labelpos.toLowerCase()) { - case 'l': - delta = -vLabel.width / 2; - break; - case 'r': - delta = vLabel.width / 2; - break; - } - } - if (delta) { - sum += reverseSep ? delta : -delta; - } - delta = 0; - - sum += (vLabel.dummy ? edgeSep : nodeSep) / 2; - sum += (wLabel.dummy ? edgeSep : nodeSep) / 2; - - sum += wLabel.width / 2; - if (has/* default */.A(wLabel, 'labelpos')) { - switch (wLabel.labelpos.toLowerCase()) { - case 'l': - delta = wLabel.width / 2; - break; - case 'r': - delta = -wLabel.width / 2; - break; - } - } - if (delta) { - sum += reverseSep ? delta : -delta; - } - delta = 0; - - return sum; - }; -} - -function width(g, v) { - return g.node(v).width; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/position/index.js - - - - - - -function position(g) { - g = asNonCompoundGraph(g); - - positionY(g); - lodash_es_forOwn(positionX(g), function (x, v) { - g.node(v).x = x; - }); -} - -function positionY(g) { - var layering = buildLayerMatrix(g); - var rankSep = g.graph().ranksep; - var prevY = 0; - forEach/* default */.A(layering, function (layer) { - var maxHeight = lodash_es_max( - map/* default */.A(layer, function (v) { - return g.node(v).height; - }) - ); - forEach/* default */.A(layer, function (v) { - g.node(v).y = prevY + maxHeight / 2; - }); - prevY += maxHeight + rankSep; - }); -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/layout.js - - - - - - - - - - - - - - - -function layout(g, opts) { - var time = opts && opts.debugTiming ? util_time : notime; - time('layout', function () { - var layoutGraph = time(' buildLayoutGraph', function () { - return buildLayoutGraph(g); - }); - time(' runLayout', function () { - runLayout(layoutGraph, time); - }); - time(' updateInputGraph', function () { - updateInputGraph(g, layoutGraph); - }); - }); -} - -function runLayout(g, time) { - time(' makeSpaceForEdgeLabels', function () { - makeSpaceForEdgeLabels(g); - }); - time(' removeSelfEdges', function () { - removeSelfEdges(g); - }); - time(' acyclic', function () { - run(g); - }); - time(' nestingGraph.run', function () { - nesting_graph_run(g); - }); - time(' rank', function () { - rank(asNonCompoundGraph(g)); - }); - time(' injectEdgeLabelProxies', function () { - injectEdgeLabelProxies(g); - }); - time(' removeEmptyRanks', function () { - removeEmptyRanks(g); - }); - time(' nestingGraph.cleanup', function () { - cleanup(g); - }); - time(' normalizeRanks', function () { - normalizeRanks(g); - }); - time(' assignRankMinMax', function () { - assignRankMinMax(g); - }); - time(' removeEdgeLabelProxies', function () { - removeEdgeLabelProxies(g); - }); - time(' normalize.run', function () { - normalize_run(g); - }); - time(' parentDummyChains', function () { - parentDummyChains(g); - }); - time(' addBorderSegments', function () { - addBorderSegments(g); - }); - time(' order', function () { - order(g); - }); - time(' insertSelfEdges', function () { - insertSelfEdges(g); - }); - time(' adjustCoordinateSystem', function () { - adjust(g); - }); - time(' position', function () { - position(g); - }); - time(' positionSelfEdges', function () { - positionSelfEdges(g); - }); - time(' removeBorderNodes', function () { - removeBorderNodes(g); - }); - time(' normalize.undo', function () { - normalize_undo(g); - }); - time(' fixupEdgeLabelCoords', function () { - fixupEdgeLabelCoords(g); - }); - time(' undoCoordinateSystem', function () { - coordinate_system_undo(g); - }); - time(' translateGraph', function () { - translateGraph(g); - }); - time(' assignNodeIntersects', function () { - assignNodeIntersects(g); - }); - time(' reversePoints', function () { - reversePointsForReversedEdges(g); - }); - time(' acyclic.undo', function () { - undo(g); - }); -} - -/* - * Copies final layout information from the layout graph back to the input - * graph. This process only copies whitelisted attributes from the layout graph - * to the input graph, so it serves as a good place to determine what - * attributes can influence layout. - */ -function updateInputGraph(inputGraph, layoutGraph) { - forEach/* default */.A(inputGraph.nodes(), function (v) { - var inputLabel = inputGraph.node(v); - var layoutLabel = layoutGraph.node(v); - - if (inputLabel) { - inputLabel.x = layoutLabel.x; - inputLabel.y = layoutLabel.y; - - if (layoutGraph.children(v).length) { - inputLabel.width = layoutLabel.width; - inputLabel.height = layoutLabel.height; - } - } - }); - - forEach/* default */.A(inputGraph.edges(), function (e) { - var inputLabel = inputGraph.edge(e); - var layoutLabel = layoutGraph.edge(e); - - inputLabel.points = layoutLabel.points; - if (has/* default */.A(layoutLabel, 'x')) { - inputLabel.x = layoutLabel.x; - inputLabel.y = layoutLabel.y; - } - }); - - inputGraph.graph().width = layoutGraph.graph().width; - inputGraph.graph().height = layoutGraph.graph().height; -} - -var graphNumAttrs = ['nodesep', 'edgesep', 'ranksep', 'marginx', 'marginy']; -var graphDefaults = { ranksep: 50, edgesep: 20, nodesep: 50, rankdir: 'tb' }; -var graphAttrs = ['acyclicer', 'ranker', 'rankdir', 'align']; -var nodeNumAttrs = ['width', 'height']; -var nodeDefaults = { width: 0, height: 0 }; -var edgeNumAttrs = ['minlen', 'weight', 'width', 'height', 'labeloffset']; -var edgeDefaults = { - minlen: 1, - weight: 1, - width: 0, - height: 0, - labeloffset: 10, - labelpos: 'r', -}; -var edgeAttrs = ['labelpos']; - -/* - * Constructs a new graph from the input graph, which can be used for layout. - * This process copies only whitelisted attributes from the input graph to the - * layout graph. Thus this function serves as a good place to determine what - * attributes can influence layout. - */ -function buildLayoutGraph(inputGraph) { - var g = new graphlib/* Graph */.T({ multigraph: true, compound: true }); - var graph = canonicalize(inputGraph.graph()); - - g.setGraph( - merge/* default */.A({}, graphDefaults, selectNumberAttrs(graph, graphNumAttrs), pick/* default */.A(graph, graphAttrs)) - ); - - forEach/* default */.A(inputGraph.nodes(), function (v) { - var node = canonicalize(inputGraph.node(v)); - g.setNode(v, defaults/* default */.A(selectNumberAttrs(node, nodeNumAttrs), nodeDefaults)); - g.setParent(v, inputGraph.parent(v)); - }); - - forEach/* default */.A(inputGraph.edges(), function (e) { - var edge = canonicalize(inputGraph.edge(e)); - g.setEdge( - e, - merge/* default */.A({}, edgeDefaults, selectNumberAttrs(edge, edgeNumAttrs), pick/* default */.A(edge, edgeAttrs)) - ); - }); - - return g; -} - -/* - * This idea comes from the Gansner paper: to account for edge labels in our - * layout we split each rank in half by doubling minlen and halving ranksep. - * Then we can place labels at these mid-points between nodes. - * - * We also add some minimal padding to the width to push the label for the edge - * away from the edge itself a bit. - */ -function makeSpaceForEdgeLabels(g) { - var graph = g.graph(); - graph.ranksep /= 2; - forEach/* default */.A(g.edges(), function (e) { - var edge = g.edge(e); - edge.minlen *= 2; - if (edge.labelpos.toLowerCase() !== 'c') { - if (graph.rankdir === 'TB' || graph.rankdir === 'BT') { - edge.width += edge.labeloffset; - } else { - edge.height += edge.labeloffset; - } - } - }); -} - -/* - * Creates temporary dummy nodes that capture the rank in which each edge's - * label is going to, if it has one of non-zero width and height. We do this - * so that we can safely remove empty ranks while preserving balance for the - * label's position. - */ -function injectEdgeLabelProxies(g) { - forEach/* default */.A(g.edges(), function (e) { - var edge = g.edge(e); - if (edge.width && edge.height) { - var v = g.node(e.v); - var w = g.node(e.w); - var label = { rank: (w.rank - v.rank) / 2 + v.rank, e: e }; - addDummyNode(g, 'edge-proxy', label, '_ep'); - } - }); -} - -function assignRankMinMax(g) { - var maxRank = 0; - forEach/* default */.A(g.nodes(), function (v) { - var node = g.node(v); - if (node.borderTop) { - node.minRank = g.node(node.borderTop).rank; - node.maxRank = g.node(node.borderBottom).rank; - // @ts-expect-error - maxRank = lodash_es_max(maxRank, node.maxRank); - } - }); - g.graph().maxRank = maxRank; -} - -function removeEdgeLabelProxies(g) { - forEach/* default */.A(g.nodes(), function (v) { - var node = g.node(v); - if (node.dummy === 'edge-proxy') { - g.edge(node.e).labelRank = node.rank; - g.removeNode(v); - } - }); -} - -function translateGraph(g) { - var minX = Number.POSITIVE_INFINITY; - var maxX = 0; - var minY = Number.POSITIVE_INFINITY; - var maxY = 0; - var graphLabel = g.graph(); - var marginX = graphLabel.marginx || 0; - var marginY = graphLabel.marginy || 0; - - function getExtremes(attrs) { - var x = attrs.x; - var y = attrs.y; - var w = attrs.width; - var h = attrs.height; - minX = Math.min(minX, x - w / 2); - maxX = Math.max(maxX, x + w / 2); - minY = Math.min(minY, y - h / 2); - maxY = Math.max(maxY, y + h / 2); - } - - forEach/* default */.A(g.nodes(), function (v) { - getExtremes(g.node(v)); - }); - forEach/* default */.A(g.edges(), function (e) { - var edge = g.edge(e); - if (has/* default */.A(edge, 'x')) { - getExtremes(edge); - } - }); - - minX -= marginX; - minY -= marginY; - - forEach/* default */.A(g.nodes(), function (v) { - var node = g.node(v); - node.x -= minX; - node.y -= minY; - }); - - forEach/* default */.A(g.edges(), function (e) { - var edge = g.edge(e); - forEach/* default */.A(edge.points, function (p) { - p.x -= minX; - p.y -= minY; - }); - if (has/* default */.A(edge, 'x')) { - edge.x -= minX; - } - if (has/* default */.A(edge, 'y')) { - edge.y -= minY; - } - }); - - graphLabel.width = maxX - minX + marginX; - graphLabel.height = maxY - minY + marginY; -} - -function assignNodeIntersects(g) { - forEach/* default */.A(g.edges(), function (e) { - var edge = g.edge(e); - var nodeV = g.node(e.v); - var nodeW = g.node(e.w); - var p1, p2; - if (!edge.points) { - edge.points = []; - p1 = nodeW; - p2 = nodeV; - } else { - p1 = edge.points[0]; - p2 = edge.points[edge.points.length - 1]; - } - edge.points.unshift(intersectRect(nodeV, p1)); - edge.points.push(intersectRect(nodeW, p2)); - }); -} - -function fixupEdgeLabelCoords(g) { - forEach/* default */.A(g.edges(), function (e) { - var edge = g.edge(e); - if (has/* default */.A(edge, 'x')) { - if (edge.labelpos === 'l' || edge.labelpos === 'r') { - edge.width -= edge.labeloffset; - } - switch (edge.labelpos) { - case 'l': - edge.x -= edge.width / 2 + edge.labeloffset; - break; - case 'r': - edge.x += edge.width / 2 + edge.labeloffset; - break; - } - } - }); -} - -function reversePointsForReversedEdges(g) { - forEach/* default */.A(g.edges(), function (e) { - var edge = g.edge(e); - if (edge.reversed) { - edge.points.reverse(); - } - }); -} - -function removeBorderNodes(g) { - forEach/* default */.A(g.nodes(), function (v) { - if (g.children(v).length) { - var node = g.node(v); - var t = g.node(node.borderTop); - var b = g.node(node.borderBottom); - var l = g.node(lodash_es_last(node.borderLeft)); - var r = g.node(lodash_es_last(node.borderRight)); - - node.width = Math.abs(r.x - l.x); - node.height = Math.abs(b.y - t.y); - node.x = l.x + node.width / 2; - node.y = t.y + node.height / 2; - } - }); - - forEach/* default */.A(g.nodes(), function (v) { - if (g.node(v).dummy === 'border') { - g.removeNode(v); - } - }); -} - -function removeSelfEdges(g) { - forEach/* default */.A(g.edges(), function (e) { - if (e.v === e.w) { - var node = g.node(e.v); - if (!node.selfEdges) { - node.selfEdges = []; - } - node.selfEdges.push({ e: e, label: g.edge(e) }); - g.removeEdge(e); - } - }); -} - -function insertSelfEdges(g) { - var layers = buildLayerMatrix(g); - forEach/* default */.A(layers, function (layer) { - var orderShift = 0; - forEach/* default */.A(layer, function (v, i) { - var node = g.node(v); - node.order = i + orderShift; - forEach/* default */.A(node.selfEdges, function (selfEdge) { - addDummyNode( - g, - 'selfedge', - { - width: selfEdge.label.width, - height: selfEdge.label.height, - rank: node.rank, - order: i + ++orderShift, - e: selfEdge.e, - label: selfEdge.label, - }, - '_se' - ); - }); - delete node.selfEdges; - }); - }); -} - -function positionSelfEdges(g) { - forEach/* default */.A(g.nodes(), function (v) { - var node = g.node(v); - if (node.dummy === 'selfedge') { - var selfNode = g.node(node.e.v); - var x = selfNode.x + selfNode.width / 2; - var y = selfNode.y; - var dx = node.x - x; - var dy = selfNode.height / 2; - g.setEdge(node.e, node.label); - g.removeNode(v); - node.label.points = [ - { x: x + (2 * dx) / 3, y: y - dy }, - { x: x + (5 * dx) / 6, y: y - dy }, - { x: x + dx, y: y }, - { x: x + (5 * dx) / 6, y: y + dy }, - { x: x + (2 * dx) / 3, y: y + dy }, - ]; - node.label.x = node.x; - node.label.y = node.y; - } - }); -} - -function selectNumberAttrs(obj, attrs) { - return lodash_es_mapValues(pick/* default */.A(obj, attrs), Number); -} - -function canonicalize(attrs) { - var newAttrs = {}; - forEach/* default */.A(attrs, function (v, k) { - newAttrs[k.toLowerCase()] = v; - }); - return newAttrs; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/index.js - - - - - - - - -/***/ }), - -/***/ 73046: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - T: () => (/* binding */ Graph) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/has.js + 1 modules -var has = __webpack_require__(48585); -// EXTERNAL MODULE: ./node_modules/lodash-es/constant.js -var constant = __webpack_require__(39142); -// EXTERNAL MODULE: ./node_modules/lodash-es/isFunction.js -var isFunction = __webpack_require__(89610); -// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js -var keys = __webpack_require__(27422); -// EXTERNAL MODULE: ./node_modules/lodash-es/filter.js + 1 modules -var filter = __webpack_require__(11662); -// EXTERNAL MODULE: ./node_modules/lodash-es/isEmpty.js -var isEmpty = __webpack_require__(66401); -// EXTERNAL MODULE: ./node_modules/lodash-es/forEach.js -var forEach = __webpack_require__(8058); -// EXTERNAL MODULE: ./node_modules/lodash-es/isUndefined.js -var isUndefined = __webpack_require__(69592); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFlatten.js + 1 modules -var _baseFlatten = __webpack_require__(13588); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseRest.js -var _baseRest = __webpack_require__(24326); -// EXTERNAL MODULE: ./node_modules/lodash-es/_SetCache.js + 2 modules -var _SetCache = __webpack_require__(62062); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFindIndex.js -var _baseFindIndex = __webpack_require__(25707); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsNaN.js -/** - * The base implementation of `_.isNaN` without support for number objects. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. - */ -function baseIsNaN(value) { - return value !== value; -} - -/* harmony default export */ const _baseIsNaN = (baseIsNaN); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_strictIndexOf.js -/** - * A specialized version of `_.indexOf` which performs strict equality - * comparisons of values, i.e. `===`. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} fromIndex The index to search from. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function strictIndexOf(array, value, fromIndex) { - var index = fromIndex - 1, - length = array.length; - - while (++index < length) { - if (array[index] === value) { - return index; - } - } - return -1; -} - -/* harmony default export */ const _strictIndexOf = (strictIndexOf); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIndexOf.js - - - - -/** - * The base implementation of `_.indexOf` without `fromIndex` bounds checks. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} fromIndex The index to search from. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function baseIndexOf(array, value, fromIndex) { - return value === value - ? _strictIndexOf(array, value, fromIndex) - : (0,_baseFindIndex/* default */.A)(array, _baseIsNaN, fromIndex); -} - -/* harmony default export */ const _baseIndexOf = (baseIndexOf); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_arrayIncludes.js - - -/** - * A specialized version of `_.includes` for arrays without support for - * specifying an index to search from. - * - * @private - * @param {Array} [array] The array to inspect. - * @param {*} target The value to search for. - * @returns {boolean} Returns `true` if `target` is found, else `false`. - */ -function arrayIncludes(array, value) { - var length = array == null ? 0 : array.length; - return !!length && _baseIndexOf(array, value, 0) > -1; -} - -/* harmony default export */ const _arrayIncludes = (arrayIncludes); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_arrayIncludesWith.js -/** - * This function is like `arrayIncludes` except that it accepts a comparator. - * - * @private - * @param {Array} [array] The array to inspect. - * @param {*} target The value to search for. - * @param {Function} comparator The comparator invoked per element. - * @returns {boolean} Returns `true` if `target` is found, else `false`. - */ -function arrayIncludesWith(array, value, comparator) { - var index = -1, - length = array == null ? 0 : array.length; - - while (++index < length) { - if (comparator(value, array[index])) { - return true; - } - } - return false; -} - -/* harmony default export */ const _arrayIncludesWith = (arrayIncludesWith); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_cacheHas.js -var _cacheHas = __webpack_require__(64099); -// EXTERNAL MODULE: ./node_modules/lodash-es/_Set.js -var _Set = __webpack_require__(39857); -;// CONCATENATED MODULE: ./node_modules/lodash-es/noop.js -/** - * This method returns `undefined`. - * - * @static - * @memberOf _ - * @since 2.3.0 - * @category Util - * @example - * - * _.times(2, _.noop); - * // => [undefined, undefined] - */ -function noop() { - // No operation performed. -} - -/* harmony default export */ const lodash_es_noop = (noop); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_setToArray.js -var _setToArray = __webpack_require__(29959); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_createSet.js - - - - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0; - -/** - * Creates a set object of `values`. - * - * @private - * @param {Array} values The values to add to the set. - * @returns {Object} Returns the new set. - */ -var createSet = !(_Set/* default */.A && (1 / (0,_setToArray/* default */.A)(new _Set/* default */.A([,-0]))[1]) == INFINITY) ? lodash_es_noop : function(values) { - return new _Set/* default */.A(values); -}; - -/* harmony default export */ const _createSet = (createSet); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseUniq.js - - - - - - - -/** Used as the size to enable large array optimizations. */ -var LARGE_ARRAY_SIZE = 200; - -/** - * The base implementation of `_.uniqBy` without support for iteratee shorthands. - * - * @private - * @param {Array} array The array to inspect. - * @param {Function} [iteratee] The iteratee invoked per element. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new duplicate free array. - */ -function baseUniq(array, iteratee, comparator) { - var index = -1, - includes = _arrayIncludes, - length = array.length, - isCommon = true, - result = [], - seen = result; - - if (comparator) { - isCommon = false; - includes = _arrayIncludesWith; - } - else if (length >= LARGE_ARRAY_SIZE) { - var set = iteratee ? null : _createSet(array); - if (set) { - return (0,_setToArray/* default */.A)(set); - } - isCommon = false; - includes = _cacheHas/* default */.A; - seen = new _SetCache/* default */.A; - } - else { - seen = iteratee ? [] : result; - } - outer: - while (++index < length) { - var value = array[index], - computed = iteratee ? iteratee(value) : value; - - value = (comparator || value !== 0) ? value : 0; - if (isCommon && computed === computed) { - var seenIndex = seen.length; - while (seenIndex--) { - if (seen[seenIndex] === computed) { - continue outer; - } - } - if (iteratee) { - seen.push(computed); - } - result.push(value); - } - else if (!includes(seen, computed, comparator)) { - if (seen !== result) { - seen.push(computed); - } - result.push(value); - } - } - return result; -} - -/* harmony default export */ const _baseUniq = (baseUniq); - -// EXTERNAL MODULE: ./node_modules/lodash-es/isArrayLikeObject.js -var isArrayLikeObject = __webpack_require__(53533); -;// CONCATENATED MODULE: ./node_modules/lodash-es/union.js - - - - - -/** - * Creates an array of unique values, in order, from all given arrays using - * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @returns {Array} Returns the new array of combined values. - * @example - * - * _.union([2], [1, 2]); - * // => [2, 1] - */ -var union = (0,_baseRest/* default */.A)(function(arrays) { - return _baseUniq((0,_baseFlatten/* default */.A)(arrays, 1, isArrayLikeObject/* default */.A, true)); -}); - -/* harmony default export */ const lodash_es_union = (union); - -// EXTERNAL MODULE: ./node_modules/lodash-es/values.js + 1 modules -var values = __webpack_require__(38207); -// EXTERNAL MODULE: ./node_modules/lodash-es/reduce.js + 2 modules -var reduce = __webpack_require__(89463); -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/graph.js - - -var DEFAULT_EDGE_NAME = '\x00'; -var GRAPH_NODE = '\x00'; -var EDGE_KEY_DELIM = '\x01'; - -// Implementation notes: -// -// * Node id query functions should return string ids for the nodes -// * Edge id query functions should return an "edgeObj", edge object, that is -// composed of enough information to uniquely identify an edge: {v, w, name}. -// * Internally we use an "edgeId", a stringified form of the edgeObj, to -// reference edges. This is because we need a performant way to look these -// edges up and, object properties, which have string keys, are the closest -// we're going to get to a performant hashtable in JavaScript. - -// Implementation notes: -// -// * Node id query functions should return string ids for the nodes -// * Edge id query functions should return an "edgeObj", edge object, that is -// composed of enough information to uniquely identify an edge: {v, w, name}. -// * Internally we use an "edgeId", a stringified form of the edgeObj, to -// reference edges. This is because we need a performant way to look these -// edges up and, object properties, which have string keys, are the closest -// we're going to get to a performant hashtable in JavaScript. -class Graph { - constructor(opts = {}) { - this._isDirected = has/* default */.A(opts, 'directed') ? opts.directed : true; - this._isMultigraph = has/* default */.A(opts, 'multigraph') ? opts.multigraph : false; - this._isCompound = has/* default */.A(opts, 'compound') ? opts.compound : false; - - // Label for the graph itself - this._label = undefined; - - // Defaults to be set when creating a new node - this._defaultNodeLabelFn = constant/* default */.A(undefined); - - // Defaults to be set when creating a new edge - this._defaultEdgeLabelFn = constant/* default */.A(undefined); - - // v -> label - this._nodes = {}; - - if (this._isCompound) { - // v -> parent - this._parent = {}; - - // v -> children - this._children = {}; - this._children[GRAPH_NODE] = {}; - } - - // v -> edgeObj - this._in = {}; - - // u -> v -> Number - this._preds = {}; - - // v -> edgeObj - this._out = {}; - - // v -> w -> Number - this._sucs = {}; - - // e -> edgeObj - this._edgeObjs = {}; - - // e -> label - this._edgeLabels = {}; - } - /* === Graph functions ========= */ - isDirected() { - return this._isDirected; - } - isMultigraph() { - return this._isMultigraph; - } - isCompound() { - return this._isCompound; - } - setGraph(label) { - this._label = label; - return this; - } - graph() { - return this._label; - } - /* === Node functions ========== */ - setDefaultNodeLabel(newDefault) { - if (!isFunction/* default */.A(newDefault)) { - newDefault = constant/* default */.A(newDefault); - } - this._defaultNodeLabelFn = newDefault; - return this; - } - nodeCount() { - return this._nodeCount; - } - nodes() { - return keys/* default */.A(this._nodes); - } - sources() { - var self = this; - return filter/* default */.A(this.nodes(), function (v) { - return isEmpty/* default */.A(self._in[v]); - }); - } - sinks() { - var self = this; - return filter/* default */.A(this.nodes(), function (v) { - return isEmpty/* default */.A(self._out[v]); - }); - } - setNodes(vs, value) { - var args = arguments; - var self = this; - forEach/* default */.A(vs, function (v) { - if (args.length > 1) { - self.setNode(v, value); - } else { - self.setNode(v); - } - }); - return this; - } - setNode(v, value) { - if (has/* default */.A(this._nodes, v)) { - if (arguments.length > 1) { - this._nodes[v] = value; - } - return this; - } - - // @ts-expect-error - this._nodes[v] = arguments.length > 1 ? value : this._defaultNodeLabelFn(v); - if (this._isCompound) { - this._parent[v] = GRAPH_NODE; - this._children[v] = {}; - this._children[GRAPH_NODE][v] = true; - } - this._in[v] = {}; - this._preds[v] = {}; - this._out[v] = {}; - this._sucs[v] = {}; - ++this._nodeCount; - return this; - } - node(v) { - return this._nodes[v]; - } - hasNode(v) { - return has/* default */.A(this._nodes, v); - } - removeNode(v) { - var self = this; - if (has/* default */.A(this._nodes, v)) { - var removeEdge = function (e) { - self.removeEdge(self._edgeObjs[e]); - }; - delete this._nodes[v]; - if (this._isCompound) { - this._removeFromParentsChildList(v); - delete this._parent[v]; - forEach/* default */.A(this.children(v), function (child) { - self.setParent(child); - }); - delete this._children[v]; - } - forEach/* default */.A(keys/* default */.A(this._in[v]), removeEdge); - delete this._in[v]; - delete this._preds[v]; - forEach/* default */.A(keys/* default */.A(this._out[v]), removeEdge); - delete this._out[v]; - delete this._sucs[v]; - --this._nodeCount; - } - return this; - } - setParent(v, parent) { - if (!this._isCompound) { - throw new Error('Cannot set parent in a non-compound graph'); - } - - if (isUndefined/* default */.A(parent)) { - parent = GRAPH_NODE; - } else { - // Coerce parent to string - parent += ''; - for (var ancestor = parent; !isUndefined/* default */.A(ancestor); ancestor = this.parent(ancestor)) { - if (ancestor === v) { - throw new Error('Setting ' + parent + ' as parent of ' + v + ' would create a cycle'); - } - } - - this.setNode(parent); - } - - this.setNode(v); - this._removeFromParentsChildList(v); - this._parent[v] = parent; - this._children[parent][v] = true; - return this; - } - _removeFromParentsChildList(v) { - delete this._children[this._parent[v]][v]; - } - parent(v) { - if (this._isCompound) { - var parent = this._parent[v]; - if (parent !== GRAPH_NODE) { - return parent; - } - } - } - children(v) { - if (isUndefined/* default */.A(v)) { - v = GRAPH_NODE; - } - - if (this._isCompound) { - var children = this._children[v]; - if (children) { - return keys/* default */.A(children); - } - } else if (v === GRAPH_NODE) { - return this.nodes(); - } else if (this.hasNode(v)) { - return []; - } - } - predecessors(v) { - var predsV = this._preds[v]; - if (predsV) { - return keys/* default */.A(predsV); - } - } - successors(v) { - var sucsV = this._sucs[v]; - if (sucsV) { - return keys/* default */.A(sucsV); - } - } - neighbors(v) { - var preds = this.predecessors(v); - if (preds) { - return lodash_es_union(preds, this.successors(v)); - } - } - isLeaf(v) { - var neighbors; - if (this.isDirected()) { - neighbors = this.successors(v); - } else { - neighbors = this.neighbors(v); - } - return neighbors.length === 0; - } - filterNodes(filter) { - // @ts-expect-error - var copy = new this.constructor({ - directed: this._isDirected, - multigraph: this._isMultigraph, - compound: this._isCompound, - }); - - copy.setGraph(this.graph()); - - var self = this; - forEach/* default */.A(this._nodes, function (value, v) { - if (filter(v)) { - copy.setNode(v, value); - } - }); - - forEach/* default */.A(this._edgeObjs, function (e) { - // @ts-expect-error - if (copy.hasNode(e.v) && copy.hasNode(e.w)) { - copy.setEdge(e, self.edge(e)); - } - }); - - var parents = {}; - function findParent(v) { - var parent = self.parent(v); - if (parent === undefined || copy.hasNode(parent)) { - parents[v] = parent; - return parent; - } else if (parent in parents) { - return parents[parent]; - } else { - return findParent(parent); - } - } - - if (this._isCompound) { - forEach/* default */.A(copy.nodes(), function (v) { - copy.setParent(v, findParent(v)); - }); - } - - return copy; - } - /* === Edge functions ========== */ - setDefaultEdgeLabel(newDefault) { - if (!isFunction/* default */.A(newDefault)) { - newDefault = constant/* default */.A(newDefault); - } - this._defaultEdgeLabelFn = newDefault; - return this; - } - edgeCount() { - return this._edgeCount; - } - edges() { - return values/* default */.A(this._edgeObjs); - } - setPath(vs, value) { - var self = this; - var args = arguments; - reduce/* default */.A(vs, function (v, w) { - if (args.length > 1) { - self.setEdge(v, w, value); - } else { - self.setEdge(v, w); - } - return w; - }); - return this; - } - /* - * setEdge(v, w, [value, [name]]) - * setEdge({ v, w, [name] }, [value]) - */ - setEdge() { - var v, w, name, value; - var valueSpecified = false; - var arg0 = arguments[0]; - - if (typeof arg0 === 'object' && arg0 !== null && 'v' in arg0) { - v = arg0.v; - w = arg0.w; - name = arg0.name; - if (arguments.length === 2) { - value = arguments[1]; - valueSpecified = true; - } - } else { - v = arg0; - w = arguments[1]; - name = arguments[3]; - if (arguments.length > 2) { - value = arguments[2]; - valueSpecified = true; - } - } - - v = '' + v; - w = '' + w; - if (!isUndefined/* default */.A(name)) { - name = '' + name; - } - - var e = edgeArgsToId(this._isDirected, v, w, name); - if (has/* default */.A(this._edgeLabels, e)) { - if (valueSpecified) { - this._edgeLabels[e] = value; - } - return this; - } - - if (!isUndefined/* default */.A(name) && !this._isMultigraph) { - throw new Error('Cannot set a named edge when isMultigraph = false'); - } - - // It didn't exist, so we need to create it. - // First ensure the nodes exist. - this.setNode(v); - this.setNode(w); - - // @ts-expect-error - this._edgeLabels[e] = valueSpecified ? value : this._defaultEdgeLabelFn(v, w, name); - - var edgeObj = edgeArgsToObj(this._isDirected, v, w, name); - // Ensure we add undirected edges in a consistent way. - v = edgeObj.v; - w = edgeObj.w; - - Object.freeze(edgeObj); - this._edgeObjs[e] = edgeObj; - incrementOrInitEntry(this._preds[w], v); - incrementOrInitEntry(this._sucs[v], w); - this._in[w][e] = edgeObj; - this._out[v][e] = edgeObj; - this._edgeCount++; - return this; - } - edge(v, w, name) { - var e = - arguments.length === 1 - ? edgeObjToId(this._isDirected, arguments[0]) - : edgeArgsToId(this._isDirected, v, w, name); - return this._edgeLabels[e]; - } - hasEdge(v, w, name) { - var e = - arguments.length === 1 - ? edgeObjToId(this._isDirected, arguments[0]) - : edgeArgsToId(this._isDirected, v, w, name); - return has/* default */.A(this._edgeLabels, e); - } - removeEdge(v, w, name) { - var e = - arguments.length === 1 - ? edgeObjToId(this._isDirected, arguments[0]) - : edgeArgsToId(this._isDirected, v, w, name); - var edge = this._edgeObjs[e]; - if (edge) { - v = edge.v; - w = edge.w; - delete this._edgeLabels[e]; - delete this._edgeObjs[e]; - decrementOrRemoveEntry(this._preds[w], v); - decrementOrRemoveEntry(this._sucs[v], w); - delete this._in[w][e]; - delete this._out[v][e]; - this._edgeCount--; - } - return this; - } - inEdges(v, u) { - var inV = this._in[v]; - if (inV) { - var edges = values/* default */.A(inV); - if (!u) { - return edges; - } - return filter/* default */.A(edges, function (edge) { - return edge.v === u; - }); - } - } - outEdges(v, w) { - var outV = this._out[v]; - if (outV) { - var edges = values/* default */.A(outV); - if (!w) { - return edges; - } - return filter/* default */.A(edges, function (edge) { - return edge.w === w; - }); - } - } - nodeEdges(v, w) { - var inEdges = this.inEdges(v, w); - if (inEdges) { - return inEdges.concat(this.outEdges(v, w)); - } - } -} - -/* Number of nodes in the graph. Should only be changed by the implementation. */ -Graph.prototype._nodeCount = 0; - -/* Number of edges in the graph. Should only be changed by the implementation. */ -Graph.prototype._edgeCount = 0; - -function incrementOrInitEntry(map, k) { - if (map[k]) { - map[k]++; - } else { - map[k] = 1; - } -} - -function decrementOrRemoveEntry(map, k) { - if (!--map[k]) { - delete map[k]; - } -} - -function edgeArgsToId(isDirected, v_, w_, name) { - var v = '' + v_; - var w = '' + w_; - if (!isDirected && v > w) { - var tmp = v; - v = w; - w = tmp; - } - return v + EDGE_KEY_DELIM + w + EDGE_KEY_DELIM + (isUndefined/* default */.A(name) ? DEFAULT_EDGE_NAME : name); -} - -function edgeArgsToObj(isDirected, v_, w_, name) { - var v = '' + v_; - var w = '' + w_; - if (!isDirected && v > w) { - var tmp = v; - v = w; - w = tmp; - } - var edgeObj = { v: v, w: w }; - if (name) { - edgeObj.name = name; - } - return edgeObj; -} - -function edgeObjToId(isDirected, edgeObj) { - return edgeArgsToId(isDirected, edgeObj.v, edgeObj.w, edgeObj.name); -} - - -/***/ }), - -/***/ 697: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ T: () => (/* reexport safe */ _graph_js__WEBPACK_IMPORTED_MODULE_0__.T) -/* harmony export */ }); -/* unused harmony export version */ -/* harmony import */ var _graph_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(73046); -// Includes only the "core" of graphlib - - - -const version = '2.1.9-pre'; - - - - -/***/ }), - -/***/ 14075: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ M: () => (/* binding */ write) -/* harmony export */ }); -/* unused harmony export read */ -/* harmony import */ var lodash_es__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(69592); -/* harmony import */ var lodash_es__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(50053); -/* harmony import */ var lodash_es__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(74722); -/* harmony import */ var _graph_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(73046); - - - - - -function write(g) { - var json = { - options: { - directed: g.isDirected(), - multigraph: g.isMultigraph(), - compound: g.isCompound(), - }, - nodes: writeNodes(g), - edges: writeEdges(g), - }; - if (!lodash_es__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A(g.graph())) { - json.value = lodash_es__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A(g.graph()); - } - return json; -} - -function writeNodes(g) { - return lodash_es__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A(g.nodes(), function (v) { - var nodeValue = g.node(v); - var parent = g.parent(v); - var node = { v: v }; - if (!lodash_es__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A(nodeValue)) { - node.value = nodeValue; - } - if (!lodash_es__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A(parent)) { - node.parent = parent; - } - return node; - }); -} - -function writeEdges(g) { - return lodash_es__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A(g.edges(), function (e) { - var edgeValue = g.edge(e); - var edge = { v: e.v, w: e.w }; - if (!lodash_es__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A(e.name)) { - edge.name = e.name; - } - if (!lodash_es__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A(edgeValue)) { - edge.value = edgeValue; - } - return edge; - }); -} - -function read(json) { - var g = new Graph(json.options).setGraph(json.value); - _.each(json.nodes, function (entry) { - g.setNode(entry.v, entry.value); - if (entry.parent) { - g.setParent(entry.v, entry.parent); - } - }); - _.each(json.edges, function (entry) { - g.setEdge({ v: entry.v, w: entry.w, name: entry.name }, entry.value); - }); - return g; -} - - -/***/ }), - -/***/ 62062: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ _SetCache) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_MapCache.js + 14 modules -var _MapCache = __webpack_require__(29471); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_setCacheAdd.js -/** Used to stand-in for `undefined` hash values. */ -var HASH_UNDEFINED = '__lodash_hash_undefined__'; - -/** - * Adds `value` to the array cache. - * - * @private - * @name add - * @memberOf SetCache - * @alias push - * @param {*} value The value to cache. - * @returns {Object} Returns the cache instance. - */ -function setCacheAdd(value) { - this.__data__.set(value, HASH_UNDEFINED); - return this; -} - -/* harmony default export */ const _setCacheAdd = (setCacheAdd); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_setCacheHas.js -/** - * Checks if `value` is in the array cache. - * - * @private - * @name has - * @memberOf SetCache - * @param {*} value The value to search for. - * @returns {number} Returns `true` if `value` is found, else `false`. - */ -function setCacheHas(value) { - return this.__data__.has(value); -} - -/* harmony default export */ const _setCacheHas = (setCacheHas); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_SetCache.js - - - - -/** - * - * Creates an array cache object to store unique values. - * - * @private - * @constructor - * @param {Array} [values] The values to cache. - */ -function SetCache(values) { - var index = -1, - length = values == null ? 0 : values.length; - - this.__data__ = new _MapCache/* default */.A; - while (++index < length) { - this.add(values[index]); - } -} - -// Add methods to `SetCache`. -SetCache.prototype.add = SetCache.prototype.push = _setCacheAdd; -SetCache.prototype.has = _setCacheHas; - -/* harmony default export */ const _SetCache = (SetCache); - - -/***/ }), - -/***/ 72641: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * A specialized version of `_.forEach` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns `array`. - */ -function arrayEach(array, iteratee) { - var index = -1, - length = array == null ? 0 : array.length; - - while (++index < length) { - if (iteratee(array[index], index, array) === false) { - break; - } - } - return array; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (arrayEach); - - -/***/ }), - -/***/ 2634: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * A specialized version of `_.filter` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {Array} Returns the new filtered array. - */ -function arrayFilter(array, predicate) { - var index = -1, - length = array == null ? 0 : array.length, - resIndex = 0, - result = []; - - while (++index < length) { - var value = array[index]; - if (predicate(value, index, array)) { - result[resIndex++] = value; - } - } - return result; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (arrayFilter); - - -/***/ }), - -/***/ 45572: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * A specialized version of `_.map` for arrays without support for iteratee - * shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the new mapped array. - */ -function arrayMap(array, iteratee) { - var index = -1, - length = array == null ? 0 : array.length, - result = Array(length); - - while (++index < length) { - result[index] = iteratee(array[index], index, array); - } - return result; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (arrayMap); - - -/***/ }), - -/***/ 76912: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * Appends the elements of `values` to `array`. - * - * @private - * @param {Array} array The array to modify. - * @param {Array} values The values to append. - * @returns {Array} Returns `array`. - */ -function arrayPush(array, values) { - var index = -1, - length = values.length, - offset = array.length; - - while (++index < length) { - array[offset + index] = values[index]; - } - return array; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (arrayPush); - - -/***/ }), - -/***/ 91641: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ _baseClone) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_Stack.js + 5 modules -var _Stack = __webpack_require__(11754); -// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayEach.js -var _arrayEach = __webpack_require__(72641); -// EXTERNAL MODULE: ./node_modules/lodash-es/_assignValue.js -var _assignValue = __webpack_require__(52851); -// EXTERNAL MODULE: ./node_modules/lodash-es/_copyObject.js -var _copyObject = __webpack_require__(22031); -// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js -var keys = __webpack_require__(27422); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseAssign.js - - - -/** - * The base implementation of `_.assign` without support for multiple sources - * or `customizer` functions. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @returns {Object} Returns `object`. - */ -function baseAssign(object, source) { - return object && (0,_copyObject/* default */.A)(source, (0,keys/* default */.A)(source), object); -} - -/* harmony default export */ const _baseAssign = (baseAssign); - -// EXTERNAL MODULE: ./node_modules/lodash-es/keysIn.js + 2 modules -var keysIn = __webpack_require__(55615); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseAssignIn.js - - - -/** - * The base implementation of `_.assignIn` without support for multiple sources - * or `customizer` functions. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @returns {Object} Returns `object`. - */ -function baseAssignIn(object, source) { - return object && (0,_copyObject/* default */.A)(source, (0,keysIn/* default */.A)(source), object); -} - -/* harmony default export */ const _baseAssignIn = (baseAssignIn); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_cloneBuffer.js -var _cloneBuffer = __webpack_require__(80154); -// EXTERNAL MODULE: ./node_modules/lodash-es/_copyArray.js -var _copyArray = __webpack_require__(39759); -// EXTERNAL MODULE: ./node_modules/lodash-es/_getSymbols.js -var _getSymbols = __webpack_require__(14792); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_copySymbols.js - - - -/** - * Copies own symbols of `source` to `object`. - * - * @private - * @param {Object} source The object to copy symbols from. - * @param {Object} [object={}] The object to copy symbols to. - * @returns {Object} Returns `object`. - */ -function copySymbols(source, object) { - return (0,_copyObject/* default */.A)(source, (0,_getSymbols/* default */.A)(source), object); -} - -/* harmony default export */ const _copySymbols = (copySymbols); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayPush.js -var _arrayPush = __webpack_require__(76912); -// EXTERNAL MODULE: ./node_modules/lodash-es/_getPrototype.js -var _getPrototype = __webpack_require__(15647); -// EXTERNAL MODULE: ./node_modules/lodash-es/stubArray.js -var stubArray = __webpack_require__(13153); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_getSymbolsIn.js - - - - - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeGetSymbols = Object.getOwnPropertySymbols; - -/** - * Creates an array of the own and inherited enumerable symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of symbols. - */ -var getSymbolsIn = !nativeGetSymbols ? stubArray/* default */.A : function(object) { - var result = []; - while (object) { - (0,_arrayPush/* default */.A)(result, (0,_getSymbols/* default */.A)(object)); - object = (0,_getPrototype/* default */.A)(object); - } - return result; -}; - -/* harmony default export */ const _getSymbolsIn = (getSymbolsIn); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_copySymbolsIn.js - - - -/** - * Copies own and inherited symbols of `source` to `object`. - * - * @private - * @param {Object} source The object to copy symbols from. - * @param {Object} [object={}] The object to copy symbols to. - * @returns {Object} Returns `object`. - */ -function copySymbolsIn(source, object) { - return (0,_copyObject/* default */.A)(source, _getSymbolsIn(source), object); -} - -/* harmony default export */ const _copySymbolsIn = (copySymbolsIn); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_getAllKeys.js -var _getAllKeys = __webpack_require__(19042); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGetAllKeys.js -var _baseGetAllKeys = __webpack_require__(33831); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_getAllKeysIn.js - - - - -/** - * Creates an array of own and inherited enumerable property names and - * symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names and symbols. - */ -function getAllKeysIn(object) { - return (0,_baseGetAllKeys/* default */.A)(object, keysIn/* default */.A, _getSymbolsIn); -} - -/* harmony default export */ const _getAllKeysIn = (getAllKeysIn); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_getTag.js + 3 modules -var _getTag = __webpack_require__(9779); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_initCloneArray.js -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var _initCloneArray_hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Initializes an array clone. - * - * @private - * @param {Array} array The array to clone. - * @returns {Array} Returns the initialized clone. - */ -function initCloneArray(array) { - var length = array.length, - result = new array.constructor(length); - - // Add properties assigned by `RegExp#exec`. - if (length && typeof array[0] == 'string' && _initCloneArray_hasOwnProperty.call(array, 'index')) { - result.index = array.index; - result.input = array.input; - } - return result; -} - -/* harmony default export */ const _initCloneArray = (initCloneArray); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_cloneArrayBuffer.js -var _cloneArrayBuffer = __webpack_require__(90565); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_cloneDataView.js - - -/** - * Creates a clone of `dataView`. - * - * @private - * @param {Object} dataView The data view to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the cloned data view. - */ -function cloneDataView(dataView, isDeep) { - var buffer = isDeep ? (0,_cloneArrayBuffer/* default */.A)(dataView.buffer) : dataView.buffer; - return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); -} - -/* harmony default export */ const _cloneDataView = (cloneDataView); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_cloneRegExp.js -/** Used to match `RegExp` flags from their coerced string values. */ -var reFlags = /\w*$/; - -/** - * Creates a clone of `regexp`. - * - * @private - * @param {Object} regexp The regexp to clone. - * @returns {Object} Returns the cloned regexp. - */ -function cloneRegExp(regexp) { - var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); - result.lastIndex = regexp.lastIndex; - return result; -} - -/* harmony default export */ const _cloneRegExp = (cloneRegExp); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_Symbol.js -var _Symbol = __webpack_require__(241); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_cloneSymbol.js - - -/** Used to convert symbols to primitives and strings. */ -var symbolProto = _Symbol/* default */.A ? _Symbol/* default */.A.prototype : undefined, - symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; - -/** - * Creates a clone of the `symbol` object. - * - * @private - * @param {Object} symbol The symbol object to clone. - * @returns {Object} Returns the cloned symbol object. - */ -function cloneSymbol(symbol) { - return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; -} - -/* harmony default export */ const _cloneSymbol = (cloneSymbol); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_cloneTypedArray.js -var _cloneTypedArray = __webpack_require__(1801); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_initCloneByTag.js - - - - - - -/** `Object#toString` result references. */ -var boolTag = '[object Boolean]', - dateTag = '[object Date]', - mapTag = '[object Map]', - numberTag = '[object Number]', - regexpTag = '[object RegExp]', - setTag = '[object Set]', - stringTag = '[object String]', - symbolTag = '[object Symbol]'; - -var arrayBufferTag = '[object ArrayBuffer]', - dataViewTag = '[object DataView]', - float32Tag = '[object Float32Array]', - float64Tag = '[object Float64Array]', - int8Tag = '[object Int8Array]', - int16Tag = '[object Int16Array]', - int32Tag = '[object Int32Array]', - uint8Tag = '[object Uint8Array]', - uint8ClampedTag = '[object Uint8ClampedArray]', - uint16Tag = '[object Uint16Array]', - uint32Tag = '[object Uint32Array]'; - -/** - * Initializes an object clone based on its `toStringTag`. - * - * **Note:** This function only supports cloning values with tags of - * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`. - * - * @private - * @param {Object} object The object to clone. - * @param {string} tag The `toStringTag` of the object to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the initialized clone. - */ -function initCloneByTag(object, tag, isDeep) { - var Ctor = object.constructor; - switch (tag) { - case arrayBufferTag: - return (0,_cloneArrayBuffer/* default */.A)(object); - - case boolTag: - case dateTag: - return new Ctor(+object); - - case dataViewTag: - return _cloneDataView(object, isDeep); - - case float32Tag: case float64Tag: - case int8Tag: case int16Tag: case int32Tag: - case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: - return (0,_cloneTypedArray/* default */.A)(object, isDeep); - - case mapTag: - return new Ctor; - - case numberTag: - case stringTag: - return new Ctor(object); - - case regexpTag: - return _cloneRegExp(object); - - case setTag: - return new Ctor; - - case symbolTag: - return _cloneSymbol(object); - } -} - -/* harmony default export */ const _initCloneByTag = (initCloneByTag); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_initCloneObject.js + 1 modules -var _initCloneObject = __webpack_require__(18598); -// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js -var isArray = __webpack_require__(92049); -// EXTERNAL MODULE: ./node_modules/lodash-es/isBuffer.js + 1 modules -var isBuffer = __webpack_require__(99912); -// EXTERNAL MODULE: ./node_modules/lodash-es/isObjectLike.js -var isObjectLike = __webpack_require__(53098); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsMap.js - - - -/** `Object#toString` result references. */ -var _baseIsMap_mapTag = '[object Map]'; - -/** - * The base implementation of `_.isMap` without Node.js optimizations. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a map, else `false`. - */ -function baseIsMap(value) { - return (0,isObjectLike/* default */.A)(value) && (0,_getTag/* default */.A)(value) == _baseIsMap_mapTag; -} - -/* harmony default export */ const _baseIsMap = (baseIsMap); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseUnary.js -var _baseUnary = __webpack_require__(52789); -// EXTERNAL MODULE: ./node_modules/lodash-es/_nodeUtil.js -var _nodeUtil = __webpack_require__(64841); -;// CONCATENATED MODULE: ./node_modules/lodash-es/isMap.js - - - - -/* Node.js helper references. */ -var nodeIsMap = _nodeUtil/* default */.A && _nodeUtil/* default */.A.isMap; - -/** - * Checks if `value` is classified as a `Map` object. - * - * @static - * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a map, else `false`. - * @example - * - * _.isMap(new Map); - * // => true - * - * _.isMap(new WeakMap); - * // => false - */ -var isMap = nodeIsMap ? (0,_baseUnary/* default */.A)(nodeIsMap) : _baseIsMap; - -/* harmony default export */ const lodash_es_isMap = (isMap); - -// EXTERNAL MODULE: ./node_modules/lodash-es/isObject.js -var isObject = __webpack_require__(23149); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsSet.js - - - -/** `Object#toString` result references. */ -var _baseIsSet_setTag = '[object Set]'; - -/** - * The base implementation of `_.isSet` without Node.js optimizations. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a set, else `false`. - */ -function baseIsSet(value) { - return (0,isObjectLike/* default */.A)(value) && (0,_getTag/* default */.A)(value) == _baseIsSet_setTag; -} - -/* harmony default export */ const _baseIsSet = (baseIsSet); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/isSet.js - - - - -/* Node.js helper references. */ -var nodeIsSet = _nodeUtil/* default */.A && _nodeUtil/* default */.A.isSet; - -/** - * Checks if `value` is classified as a `Set` object. - * - * @static - * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a set, else `false`. - * @example - * - * _.isSet(new Set); - * // => true - * - * _.isSet(new WeakSet); - * // => false - */ -var isSet = nodeIsSet ? (0,_baseUnary/* default */.A)(nodeIsSet) : _baseIsSet; - -/* harmony default export */ const lodash_es_isSet = (isSet); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseClone.js - - - - - - - - - - - - - - - - - - - - - - - -/** Used to compose bitmasks for cloning. */ -var CLONE_DEEP_FLAG = 1, - CLONE_FLAT_FLAG = 2, - CLONE_SYMBOLS_FLAG = 4; - -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - _baseClone_boolTag = '[object Boolean]', - _baseClone_dateTag = '[object Date]', - errorTag = '[object Error]', - funcTag = '[object Function]', - genTag = '[object GeneratorFunction]', - _baseClone_mapTag = '[object Map]', - _baseClone_numberTag = '[object Number]', - objectTag = '[object Object]', - _baseClone_regexpTag = '[object RegExp]', - _baseClone_setTag = '[object Set]', - _baseClone_stringTag = '[object String]', - _baseClone_symbolTag = '[object Symbol]', - weakMapTag = '[object WeakMap]'; - -var _baseClone_arrayBufferTag = '[object ArrayBuffer]', - _baseClone_dataViewTag = '[object DataView]', - _baseClone_float32Tag = '[object Float32Array]', - _baseClone_float64Tag = '[object Float64Array]', - _baseClone_int8Tag = '[object Int8Array]', - _baseClone_int16Tag = '[object Int16Array]', - _baseClone_int32Tag = '[object Int32Array]', - _baseClone_uint8Tag = '[object Uint8Array]', - _baseClone_uint8ClampedTag = '[object Uint8ClampedArray]', - _baseClone_uint16Tag = '[object Uint16Array]', - _baseClone_uint32Tag = '[object Uint32Array]'; - -/** Used to identify `toStringTag` values supported by `_.clone`. */ -var cloneableTags = {}; -cloneableTags[argsTag] = cloneableTags[arrayTag] = -cloneableTags[_baseClone_arrayBufferTag] = cloneableTags[_baseClone_dataViewTag] = -cloneableTags[_baseClone_boolTag] = cloneableTags[_baseClone_dateTag] = -cloneableTags[_baseClone_float32Tag] = cloneableTags[_baseClone_float64Tag] = -cloneableTags[_baseClone_int8Tag] = cloneableTags[_baseClone_int16Tag] = -cloneableTags[_baseClone_int32Tag] = cloneableTags[_baseClone_mapTag] = -cloneableTags[_baseClone_numberTag] = cloneableTags[objectTag] = -cloneableTags[_baseClone_regexpTag] = cloneableTags[_baseClone_setTag] = -cloneableTags[_baseClone_stringTag] = cloneableTags[_baseClone_symbolTag] = -cloneableTags[_baseClone_uint8Tag] = cloneableTags[_baseClone_uint8ClampedTag] = -cloneableTags[_baseClone_uint16Tag] = cloneableTags[_baseClone_uint32Tag] = true; -cloneableTags[errorTag] = cloneableTags[funcTag] = -cloneableTags[weakMapTag] = false; - -/** - * The base implementation of `_.clone` and `_.cloneDeep` which tracks - * traversed objects. - * - * @private - * @param {*} value The value to clone. - * @param {boolean} bitmask The bitmask flags. - * 1 - Deep clone - * 2 - Flatten inherited properties - * 4 - Clone symbols - * @param {Function} [customizer] The function to customize cloning. - * @param {string} [key] The key of `value`. - * @param {Object} [object] The parent object of `value`. - * @param {Object} [stack] Tracks traversed objects and their clone counterparts. - * @returns {*} Returns the cloned value. - */ -function baseClone(value, bitmask, customizer, key, object, stack) { - var result, - isDeep = bitmask & CLONE_DEEP_FLAG, - isFlat = bitmask & CLONE_FLAT_FLAG, - isFull = bitmask & CLONE_SYMBOLS_FLAG; - - if (customizer) { - result = object ? customizer(value, key, object, stack) : customizer(value); - } - if (result !== undefined) { - return result; - } - if (!(0,isObject/* default */.A)(value)) { - return value; - } - var isArr = (0,isArray/* default */.A)(value); - if (isArr) { - result = _initCloneArray(value); - if (!isDeep) { - return (0,_copyArray/* default */.A)(value, result); - } - } else { - var tag = (0,_getTag/* default */.A)(value), - isFunc = tag == funcTag || tag == genTag; - - if ((0,isBuffer/* default */.A)(value)) { - return (0,_cloneBuffer/* default */.A)(value, isDeep); - } - if (tag == objectTag || tag == argsTag || (isFunc && !object)) { - result = (isFlat || isFunc) ? {} : (0,_initCloneObject/* default */.A)(value); - if (!isDeep) { - return isFlat - ? _copySymbolsIn(value, _baseAssignIn(result, value)) - : _copySymbols(value, _baseAssign(result, value)); - } - } else { - if (!cloneableTags[tag]) { - return object ? value : {}; - } - result = _initCloneByTag(value, tag, isDeep); - } - } - // Check for circular references and return its corresponding clone. - stack || (stack = new _Stack/* default */.A); - var stacked = stack.get(value); - if (stacked) { - return stacked; - } - stack.set(value, result); - - if (lodash_es_isSet(value)) { - value.forEach(function(subValue) { - result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack)); - }); - } else if (lodash_es_isMap(value)) { - value.forEach(function(subValue, key) { - result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack)); - }); - } - - var keysFunc = isFull - ? (isFlat ? _getAllKeysIn : _getAllKeys/* default */.A) - : (isFlat ? keysIn/* default */.A : keys/* default */.A); - - var props = isArr ? undefined : keysFunc(value); - (0,_arrayEach/* default */.A)(props || value, function(subValue, key) { - if (props) { - key = subValue; - subValue = value[key]; - } - // Recursively populate clone (susceptible to call stack limits). - (0,_assignValue/* default */.A)(result, key, baseClone(subValue, bitmask, customizer, key, value, stack)); - }); - return result; -} - -/* harmony default export */ const _baseClone = (baseClone); - - -/***/ }), - -/***/ 6240: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ _baseEach) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseForOwn.js -var _baseForOwn = __webpack_require__(79841); -// EXTERNAL MODULE: ./node_modules/lodash-es/isArrayLike.js -var isArrayLike = __webpack_require__(38446); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_createBaseEach.js - - -/** - * Creates a `baseEach` or `baseEachRight` function. - * - * @private - * @param {Function} eachFunc The function to iterate over a collection. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new base function. - */ -function createBaseEach(eachFunc, fromRight) { - return function(collection, iteratee) { - if (collection == null) { - return collection; - } - if (!(0,isArrayLike/* default */.A)(collection)) { - return eachFunc(collection, iteratee); - } - var length = collection.length, - index = fromRight ? length : -1, - iterable = Object(collection); - - while ((fromRight ? index-- : ++index < length)) { - if (iteratee(iterable[index], index, iterable) === false) { - break; - } - } - return collection; - }; -} - -/* harmony default export */ const _createBaseEach = (createBaseEach); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseEach.js - - - -/** - * The base implementation of `_.forEach` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array|Object} Returns `collection`. - */ -var baseEach = _createBaseEach(_baseForOwn/* default */.A); - -/* harmony default export */ const _baseEach = (baseEach); - - -/***/ }), - -/***/ 25707: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * The base implementation of `_.findIndex` and `_.findLastIndex` without - * support for iteratee shorthands. - * - * @private - * @param {Array} array The array to inspect. - * @param {Function} predicate The function invoked per iteration. - * @param {number} fromIndex The index to search from. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function baseFindIndex(array, predicate, fromIndex, fromRight) { - var length = array.length, - index = fromIndex + (fromRight ? 1 : -1); - - while ((fromRight ? index-- : ++index < length)) { - if (predicate(array[index], index, array)) { - return index; - } - } - return -1; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseFindIndex); - - -/***/ }), - -/***/ 13588: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ _baseFlatten) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayPush.js -var _arrayPush = __webpack_require__(76912); -// EXTERNAL MODULE: ./node_modules/lodash-es/_Symbol.js -var _Symbol = __webpack_require__(241); -// EXTERNAL MODULE: ./node_modules/lodash-es/isArguments.js + 1 modules -var isArguments = __webpack_require__(52274); -// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js -var isArray = __webpack_require__(92049); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_isFlattenable.js - - - - -/** Built-in value references. */ -var spreadableSymbol = _Symbol/* default */.A ? _Symbol/* default */.A.isConcatSpreadable : undefined; - -/** - * Checks if `value` is a flattenable `arguments` object or array. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. - */ -function isFlattenable(value) { - return (0,isArray/* default */.A)(value) || (0,isArguments/* default */.A)(value) || - !!(spreadableSymbol && value && value[spreadableSymbol]); -} - -/* harmony default export */ const _isFlattenable = (isFlattenable); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseFlatten.js - - - -/** - * The base implementation of `_.flatten` with support for restricting flattening. - * - * @private - * @param {Array} array The array to flatten. - * @param {number} depth The maximum recursion depth. - * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. - * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. - * @param {Array} [result=[]] The initial result value. - * @returns {Array} Returns the new flattened array. - */ -function baseFlatten(array, depth, predicate, isStrict, result) { - var index = -1, - length = array.length; - - predicate || (predicate = _isFlattenable); - result || (result = []); - - while (++index < length) { - var value = array[index]; - if (depth > 0 && predicate(value)) { - if (depth > 1) { - // Recursively flatten arrays (susceptible to call stack limits). - baseFlatten(value, depth - 1, predicate, isStrict, result); - } else { - (0,_arrayPush/* default */.A)(result, value); - } - } else if (!isStrict) { - result[result.length] = value; - } - } - return result; -} - -/* harmony default export */ const _baseFlatten = (baseFlatten); - - -/***/ }), - -/***/ 79841: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _baseFor_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4574); -/* harmony import */ var _keys_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(27422); - - - -/** - * The base implementation of `_.forOwn` without support for iteratee shorthands. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Object} Returns `object`. - */ -function baseForOwn(object, iteratee) { - return object && (0,_baseFor_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(object, iteratee, _keys_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseForOwn); - - -/***/ }), - -/***/ 66318: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _castPath_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7819); -/* harmony import */ var _toKey_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(30901); - - - -/** - * The base implementation of `_.get` without support for default values. - * - * @private - * @param {Object} object The object to query. - * @param {Array|string} path The path of the property to get. - * @returns {*} Returns the resolved value. - */ -function baseGet(object, path) { - path = (0,_castPath_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(path, object); - - var index = 0, - length = path.length; - - while (object != null && index < length) { - object = object[(0,_toKey_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(path[index++])]; - } - return (index && index == length) ? object : undefined; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseGet); - - -/***/ }), - -/***/ 33831: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _arrayPush_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(76912); -/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(92049); - - - -/** - * The base implementation of `getAllKeys` and `getAllKeysIn` which uses - * `keysFunc` and `symbolsFunc` to get the enumerable property names and - * symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @param {Function} keysFunc The function to get the keys of `object`. - * @param {Function} symbolsFunc The function to get the symbols of `object`. - * @returns {Array} Returns the array of property names and symbols. - */ -function baseGetAllKeys(object, keysFunc, symbolsFunc) { - var result = keysFunc(object); - return (0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(object) ? result : (0,_arrayPush_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(result, symbolsFunc(object)); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseGetAllKeys); - - -/***/ }), - -/***/ 49574: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ _baseIteratee) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_Stack.js + 5 modules -var _Stack = __webpack_require__(11754); -// EXTERNAL MODULE: ./node_modules/lodash-es/_SetCache.js + 2 modules -var _SetCache = __webpack_require__(62062); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_arraySome.js -/** - * A specialized version of `_.some` for arrays without support for iteratee - * shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {boolean} Returns `true` if any element passes the predicate check, - * else `false`. - */ -function arraySome(array, predicate) { - var index = -1, - length = array == null ? 0 : array.length; - - while (++index < length) { - if (predicate(array[index], index, array)) { - return true; - } - } - return false; -} - -/* harmony default export */ const _arraySome = (arraySome); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_cacheHas.js -var _cacheHas = __webpack_require__(64099); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_equalArrays.js - - - - -/** Used to compose bitmasks for value comparisons. */ -var COMPARE_PARTIAL_FLAG = 1, - COMPARE_UNORDERED_FLAG = 2; - -/** - * A specialized version of `baseIsEqualDeep` for arrays with support for - * partial deep comparisons. - * - * @private - * @param {Array} array The array to compare. - * @param {Array} other The other array to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} stack Tracks traversed `array` and `other` objects. - * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. - */ -function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { - var isPartial = bitmask & COMPARE_PARTIAL_FLAG, - arrLength = array.length, - othLength = other.length; - - if (arrLength != othLength && !(isPartial && othLength > arrLength)) { - return false; - } - // Check that cyclic values are equal. - var arrStacked = stack.get(array); - var othStacked = stack.get(other); - if (arrStacked && othStacked) { - return arrStacked == other && othStacked == array; - } - var index = -1, - result = true, - seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new _SetCache/* default */.A : undefined; - - stack.set(array, other); - stack.set(other, array); - - // Ignore non-index properties. - while (++index < arrLength) { - var arrValue = array[index], - othValue = other[index]; - - if (customizer) { - var compared = isPartial - ? customizer(othValue, arrValue, index, other, array, stack) - : customizer(arrValue, othValue, index, array, other, stack); - } - if (compared !== undefined) { - if (compared) { - continue; - } - result = false; - break; - } - // Recursively compare arrays (susceptible to call stack limits). - if (seen) { - if (!_arraySome(other, function(othValue, othIndex) { - if (!(0,_cacheHas/* default */.A)(seen, othIndex) && - (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { - return seen.push(othIndex); - } - })) { - result = false; - break; - } - } else if (!( - arrValue === othValue || - equalFunc(arrValue, othValue, bitmask, customizer, stack) - )) { - result = false; - break; - } - } - stack['delete'](array); - stack['delete'](other); - return result; -} - -/* harmony default export */ const _equalArrays = (equalArrays); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_Symbol.js -var _Symbol = __webpack_require__(241); -// EXTERNAL MODULE: ./node_modules/lodash-es/_Uint8Array.js -var _Uint8Array = __webpack_require__(43988); -// EXTERNAL MODULE: ./node_modules/lodash-es/eq.js -var eq = __webpack_require__(66984); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_mapToArray.js -/** - * Converts `map` to its key-value pairs. - * - * @private - * @param {Object} map The map to convert. - * @returns {Array} Returns the key-value pairs. - */ -function mapToArray(map) { - var index = -1, - result = Array(map.size); - - map.forEach(function(value, key) { - result[++index] = [key, value]; - }); - return result; -} - -/* harmony default export */ const _mapToArray = (mapToArray); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_setToArray.js -var _setToArray = __webpack_require__(29959); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_equalByTag.js - - - - - - - -/** Used to compose bitmasks for value comparisons. */ -var _equalByTag_COMPARE_PARTIAL_FLAG = 1, - _equalByTag_COMPARE_UNORDERED_FLAG = 2; - -/** `Object#toString` result references. */ -var boolTag = '[object Boolean]', - dateTag = '[object Date]', - errorTag = '[object Error]', - mapTag = '[object Map]', - numberTag = '[object Number]', - regexpTag = '[object RegExp]', - setTag = '[object Set]', - stringTag = '[object String]', - symbolTag = '[object Symbol]'; - -var arrayBufferTag = '[object ArrayBuffer]', - dataViewTag = '[object DataView]'; - -/** Used to convert symbols to primitives and strings. */ -var symbolProto = _Symbol/* default */.A ? _Symbol/* default */.A.prototype : undefined, - symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; - -/** - * A specialized version of `baseIsEqualDeep` for comparing objects of - * the same `toStringTag`. - * - * **Note:** This function only supports comparing values with tags of - * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {string} tag The `toStringTag` of the objects to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} stack Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ -function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { - switch (tag) { - case dataViewTag: - if ((object.byteLength != other.byteLength) || - (object.byteOffset != other.byteOffset)) { - return false; - } - object = object.buffer; - other = other.buffer; - - case arrayBufferTag: - if ((object.byteLength != other.byteLength) || - !equalFunc(new _Uint8Array/* default */.A(object), new _Uint8Array/* default */.A(other))) { - return false; - } - return true; - - case boolTag: - case dateTag: - case numberTag: - // Coerce booleans to `1` or `0` and dates to milliseconds. - // Invalid dates are coerced to `NaN`. - return (0,eq/* default */.A)(+object, +other); - - case errorTag: - return object.name == other.name && object.message == other.message; - - case regexpTag: - case stringTag: - // Coerce regexes to strings and treat strings, primitives and objects, - // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring - // for more details. - return object == (other + ''); - - case mapTag: - var convert = _mapToArray; - - case setTag: - var isPartial = bitmask & _equalByTag_COMPARE_PARTIAL_FLAG; - convert || (convert = _setToArray/* default */.A); - - if (object.size != other.size && !isPartial) { - return false; - } - // Assume cyclic values are equal. - var stacked = stack.get(object); - if (stacked) { - return stacked == other; - } - bitmask |= _equalByTag_COMPARE_UNORDERED_FLAG; - - // Recursively compare objects (susceptible to call stack limits). - stack.set(object, other); - var result = _equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); - stack['delete'](object); - return result; - - case symbolTag: - if (symbolValueOf) { - return symbolValueOf.call(object) == symbolValueOf.call(other); - } - } - return false; -} - -/* harmony default export */ const _equalByTag = (equalByTag); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_getAllKeys.js -var _getAllKeys = __webpack_require__(19042); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_equalObjects.js - - -/** Used to compose bitmasks for value comparisons. */ -var _equalObjects_COMPARE_PARTIAL_FLAG = 1; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var _equalObjects_hasOwnProperty = objectProto.hasOwnProperty; - -/** - * A specialized version of `baseIsEqualDeep` for objects with support for - * partial deep comparisons. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} stack Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ -function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { - var isPartial = bitmask & _equalObjects_COMPARE_PARTIAL_FLAG, - objProps = (0,_getAllKeys/* default */.A)(object), - objLength = objProps.length, - othProps = (0,_getAllKeys/* default */.A)(other), - othLength = othProps.length; - - if (objLength != othLength && !isPartial) { - return false; - } - var index = objLength; - while (index--) { - var key = objProps[index]; - if (!(isPartial ? key in other : _equalObjects_hasOwnProperty.call(other, key))) { - return false; - } - } - // Check that cyclic values are equal. - var objStacked = stack.get(object); - var othStacked = stack.get(other); - if (objStacked && othStacked) { - return objStacked == other && othStacked == object; - } - var result = true; - stack.set(object, other); - stack.set(other, object); - - var skipCtor = isPartial; - while (++index < objLength) { - key = objProps[index]; - var objValue = object[key], - othValue = other[key]; - - if (customizer) { - var compared = isPartial - ? customizer(othValue, objValue, key, other, object, stack) - : customizer(objValue, othValue, key, object, other, stack); - } - // Recursively compare objects (susceptible to call stack limits). - if (!(compared === undefined - ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) - : compared - )) { - result = false; - break; - } - skipCtor || (skipCtor = key == 'constructor'); - } - if (result && !skipCtor) { - var objCtor = object.constructor, - othCtor = other.constructor; - - // Non `Object` object instances with different constructors are not equal. - if (objCtor != othCtor && - ('constructor' in object && 'constructor' in other) && - !(typeof objCtor == 'function' && objCtor instanceof objCtor && - typeof othCtor == 'function' && othCtor instanceof othCtor)) { - result = false; - } - } - stack['delete'](object); - stack['delete'](other); - return result; -} - -/* harmony default export */ const _equalObjects = (equalObjects); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_getTag.js + 3 modules -var _getTag = __webpack_require__(9779); -// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js -var isArray = __webpack_require__(92049); -// EXTERNAL MODULE: ./node_modules/lodash-es/isBuffer.js + 1 modules -var isBuffer = __webpack_require__(99912); -// EXTERNAL MODULE: ./node_modules/lodash-es/isTypedArray.js + 1 modules -var isTypedArray = __webpack_require__(33858); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsEqualDeep.js - - - - - - - - - -/** Used to compose bitmasks for value comparisons. */ -var _baseIsEqualDeep_COMPARE_PARTIAL_FLAG = 1; - -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - objectTag = '[object Object]'; - -/** Used for built-in method references. */ -var _baseIsEqualDeep_objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var _baseIsEqualDeep_hasOwnProperty = _baseIsEqualDeep_objectProto.hasOwnProperty; - -/** - * A specialized version of `baseIsEqual` for arrays and objects which performs - * deep comparisons and tracks traversed objects enabling objects with circular - * references to be compared. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} [stack] Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ -function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { - var objIsArr = (0,isArray/* default */.A)(object), - othIsArr = (0,isArray/* default */.A)(other), - objTag = objIsArr ? arrayTag : (0,_getTag/* default */.A)(object), - othTag = othIsArr ? arrayTag : (0,_getTag/* default */.A)(other); - - objTag = objTag == argsTag ? objectTag : objTag; - othTag = othTag == argsTag ? objectTag : othTag; - - var objIsObj = objTag == objectTag, - othIsObj = othTag == objectTag, - isSameTag = objTag == othTag; - - if (isSameTag && (0,isBuffer/* default */.A)(object)) { - if (!(0,isBuffer/* default */.A)(other)) { - return false; - } - objIsArr = true; - objIsObj = false; - } - if (isSameTag && !objIsObj) { - stack || (stack = new _Stack/* default */.A); - return (objIsArr || (0,isTypedArray/* default */.A)(object)) - ? _equalArrays(object, other, bitmask, customizer, equalFunc, stack) - : _equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); - } - if (!(bitmask & _baseIsEqualDeep_COMPARE_PARTIAL_FLAG)) { - var objIsWrapped = objIsObj && _baseIsEqualDeep_hasOwnProperty.call(object, '__wrapped__'), - othIsWrapped = othIsObj && _baseIsEqualDeep_hasOwnProperty.call(other, '__wrapped__'); - - if (objIsWrapped || othIsWrapped) { - var objUnwrapped = objIsWrapped ? object.value() : object, - othUnwrapped = othIsWrapped ? other.value() : other; - - stack || (stack = new _Stack/* default */.A); - return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); - } - } - if (!isSameTag) { - return false; - } - stack || (stack = new _Stack/* default */.A); - return _equalObjects(object, other, bitmask, customizer, equalFunc, stack); -} - -/* harmony default export */ const _baseIsEqualDeep = (baseIsEqualDeep); - -// EXTERNAL MODULE: ./node_modules/lodash-es/isObjectLike.js -var isObjectLike = __webpack_require__(53098); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsEqual.js - - - -/** - * The base implementation of `_.isEqual` which supports partial comparisons - * and tracks traversed objects. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @param {boolean} bitmask The bitmask flags. - * 1 - Unordered comparison - * 2 - Partial comparison - * @param {Function} [customizer] The function to customize comparisons. - * @param {Object} [stack] Tracks traversed `value` and `other` objects. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - */ -function baseIsEqual(value, other, bitmask, customizer, stack) { - if (value === other) { - return true; - } - if (value == null || other == null || (!(0,isObjectLike/* default */.A)(value) && !(0,isObjectLike/* default */.A)(other))) { - return value !== value && other !== other; - } - return _baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); -} - -/* harmony default export */ const _baseIsEqual = (baseIsEqual); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsMatch.js - - - -/** Used to compose bitmasks for value comparisons. */ -var _baseIsMatch_COMPARE_PARTIAL_FLAG = 1, - _baseIsMatch_COMPARE_UNORDERED_FLAG = 2; - -/** - * The base implementation of `_.isMatch` without support for iteratee shorthands. - * - * @private - * @param {Object} object The object to inspect. - * @param {Object} source The object of property values to match. - * @param {Array} matchData The property names, values, and compare flags to match. - * @param {Function} [customizer] The function to customize comparisons. - * @returns {boolean} Returns `true` if `object` is a match, else `false`. - */ -function baseIsMatch(object, source, matchData, customizer) { - var index = matchData.length, - length = index, - noCustomizer = !customizer; - - if (object == null) { - return !length; - } - object = Object(object); - while (index--) { - var data = matchData[index]; - if ((noCustomizer && data[2]) - ? data[1] !== object[data[0]] - : !(data[0] in object) - ) { - return false; - } - } - while (++index < length) { - data = matchData[index]; - var key = data[0], - objValue = object[key], - srcValue = data[1]; - - if (noCustomizer && data[2]) { - if (objValue === undefined && !(key in object)) { - return false; - } - } else { - var stack = new _Stack/* default */.A; - if (customizer) { - var result = customizer(objValue, srcValue, key, object, source, stack); - } - if (!(result === undefined - ? _baseIsEqual(srcValue, objValue, _baseIsMatch_COMPARE_PARTIAL_FLAG | _baseIsMatch_COMPARE_UNORDERED_FLAG, customizer, stack) - : result - )) { - return false; - } - } - } - return true; -} - -/* harmony default export */ const _baseIsMatch = (baseIsMatch); - -// EXTERNAL MODULE: ./node_modules/lodash-es/isObject.js -var isObject = __webpack_require__(23149); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_isStrictComparable.js - - -/** - * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` if suitable for strict - * equality comparisons, else `false`. - */ -function isStrictComparable(value) { - return value === value && !(0,isObject/* default */.A)(value); -} - -/* harmony default export */ const _isStrictComparable = (isStrictComparable); - -// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js -var keys = __webpack_require__(27422); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_getMatchData.js - - - -/** - * Gets the property names, values, and compare flags of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the match data of `object`. - */ -function getMatchData(object) { - var result = (0,keys/* default */.A)(object), - length = result.length; - - while (length--) { - var key = result[length], - value = object[key]; - - result[length] = [key, value, _isStrictComparable(value)]; - } - return result; -} - -/* harmony default export */ const _getMatchData = (getMatchData); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_matchesStrictComparable.js -/** - * A specialized version of `matchesProperty` for source values suitable - * for strict equality comparisons, i.e. `===`. - * - * @private - * @param {string} key The key of the property to get. - * @param {*} srcValue The value to match. - * @returns {Function} Returns the new spec function. - */ -function matchesStrictComparable(key, srcValue) { - return function(object) { - if (object == null) { - return false; - } - return object[key] === srcValue && - (srcValue !== undefined || (key in Object(object))); - }; -} - -/* harmony default export */ const _matchesStrictComparable = (matchesStrictComparable); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseMatches.js - - - - -/** - * The base implementation of `_.matches` which doesn't clone `source`. - * - * @private - * @param {Object} source The object of property values to match. - * @returns {Function} Returns the new spec function. - */ -function baseMatches(source) { - var matchData = _getMatchData(source); - if (matchData.length == 1 && matchData[0][2]) { - return _matchesStrictComparable(matchData[0][0], matchData[0][1]); - } - return function(object) { - return object === source || _baseIsMatch(object, source, matchData); - }; -} - -/* harmony default export */ const _baseMatches = (baseMatches); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGet.js -var _baseGet = __webpack_require__(66318); -;// CONCATENATED MODULE: ./node_modules/lodash-es/get.js - - -/** - * Gets the value at `path` of `object`. If the resolved value is - * `undefined`, the `defaultValue` is returned in its place. - * - * @static - * @memberOf _ - * @since 3.7.0 - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path of the property to get. - * @param {*} [defaultValue] The value returned for `undefined` resolved values. - * @returns {*} Returns the resolved value. - * @example - * - * var object = { 'a': [{ 'b': { 'c': 3 } }] }; - * - * _.get(object, 'a[0].b.c'); - * // => 3 - * - * _.get(object, ['a', '0', 'b', 'c']); - * // => 3 - * - * _.get(object, 'a.b.c', 'default'); - * // => 'default' - */ -function get(object, path, defaultValue) { - var result = object == null ? undefined : (0,_baseGet/* default */.A)(object, path); - return result === undefined ? defaultValue : result; -} - -/* harmony default export */ const lodash_es_get = (get); - -// EXTERNAL MODULE: ./node_modules/lodash-es/hasIn.js + 1 modules -var hasIn = __webpack_require__(39188); -// EXTERNAL MODULE: ./node_modules/lodash-es/_isKey.js -var _isKey = __webpack_require__(86586); -// EXTERNAL MODULE: ./node_modules/lodash-es/_toKey.js -var _toKey = __webpack_require__(30901); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseMatchesProperty.js - - - - - - - - -/** Used to compose bitmasks for value comparisons. */ -var _baseMatchesProperty_COMPARE_PARTIAL_FLAG = 1, - _baseMatchesProperty_COMPARE_UNORDERED_FLAG = 2; - -/** - * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. - * - * @private - * @param {string} path The path of the property to get. - * @param {*} srcValue The value to match. - * @returns {Function} Returns the new spec function. - */ -function baseMatchesProperty(path, srcValue) { - if ((0,_isKey/* default */.A)(path) && _isStrictComparable(srcValue)) { - return _matchesStrictComparable((0,_toKey/* default */.A)(path), srcValue); - } - return function(object) { - var objValue = lodash_es_get(object, path); - return (objValue === undefined && objValue === srcValue) - ? (0,hasIn/* default */.A)(object, path) - : _baseIsEqual(srcValue, objValue, _baseMatchesProperty_COMPARE_PARTIAL_FLAG | _baseMatchesProperty_COMPARE_UNORDERED_FLAG); - }; -} - -/* harmony default export */ const _baseMatchesProperty = (baseMatchesProperty); - -// EXTERNAL MODULE: ./node_modules/lodash-es/identity.js -var identity = __webpack_require__(29008); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseProperty.js -var _baseProperty = __webpack_require__(70805); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_basePropertyDeep.js - - -/** - * A specialized version of `baseProperty` which supports deep paths. - * - * @private - * @param {Array|string} path The path of the property to get. - * @returns {Function} Returns the new accessor function. - */ -function basePropertyDeep(path) { - return function(object) { - return (0,_baseGet/* default */.A)(object, path); - }; -} - -/* harmony default export */ const _basePropertyDeep = (basePropertyDeep); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/property.js - - - - - -/** - * Creates a function that returns the value at `path` of a given object. - * - * @static - * @memberOf _ - * @since 2.4.0 - * @category Util - * @param {Array|string} path The path of the property to get. - * @returns {Function} Returns the new accessor function. - * @example - * - * var objects = [ - * { 'a': { 'b': 2 } }, - * { 'a': { 'b': 1 } } - * ]; - * - * _.map(objects, _.property('a.b')); - * // => [2, 1] - * - * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b'); - * // => [1, 2] - */ -function property(path) { - return (0,_isKey/* default */.A)(path) ? (0,_baseProperty/* default */.A)((0,_toKey/* default */.A)(path)) : _basePropertyDeep(path); -} - -/* harmony default export */ const lodash_es_property = (property); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIteratee.js - - - - - - -/** - * The base implementation of `_.iteratee`. - * - * @private - * @param {*} [value=_.identity] The value to convert to an iteratee. - * @returns {Function} Returns the iteratee. - */ -function baseIteratee(value) { - // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. - // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. - if (typeof value == 'function') { - return value; - } - if (value == null) { - return identity/* default */.A; - } - if (typeof value == 'object') { - return (0,isArray/* default */.A)(value) - ? _baseMatchesProperty(value[0], value[1]) - : _baseMatches(value); - } - return lodash_es_property(value); -} - -/* harmony default export */ const _baseIteratee = (baseIteratee); - - -/***/ }), - -/***/ 52568: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _baseEach_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6240); -/* harmony import */ var _isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(38446); - - - -/** - * The base implementation of `_.map` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the new mapped array. - */ -function baseMap(collection, iteratee) { - var index = -1, - result = (0,_isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(collection) ? Array(collection.length) : []; - - (0,_baseEach_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(collection, function(value, key, collection) { - result[++index] = iteratee(value, key, collection); - }); - return result; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseMap); - - -/***/ }), - -/***/ 70805: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * The base implementation of `_.property` without support for deep paths. - * - * @private - * @param {string} key The key of the property to get. - * @returns {Function} Returns the new accessor function. - */ -function baseProperty(key) { - return function(object) { - return object == null ? undefined : object[key]; - }; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseProperty); - - -/***/ }), - -/***/ 64099: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * Checks if a `cache` value for `key` exists. - * - * @private - * @param {Object} cache The cache to query. - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ -function cacheHas(cache, key) { - return cache.has(key); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (cacheHas); - - -/***/ }), - -/***/ 99922: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(29008); - - -/** - * Casts `value` to `identity` if it's not a function. - * - * @private - * @param {*} value The value to inspect. - * @returns {Function} Returns cast function. - */ -function castFunction(value) { - return typeof value == 'function' ? value : _identity_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (castFunction); - - -/***/ }), - -/***/ 7819: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ _castPath) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js -var isArray = __webpack_require__(92049); -// EXTERNAL MODULE: ./node_modules/lodash-es/_isKey.js -var _isKey = __webpack_require__(86586); -// EXTERNAL MODULE: ./node_modules/lodash-es/memoize.js -var memoize = __webpack_require__(46632); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_memoizeCapped.js - - -/** Used as the maximum memoize cache size. */ -var MAX_MEMOIZE_SIZE = 500; - -/** - * A specialized version of `_.memoize` which clears the memoized function's - * cache when it exceeds `MAX_MEMOIZE_SIZE`. - * - * @private - * @param {Function} func The function to have its output memoized. - * @returns {Function} Returns the new memoized function. - */ -function memoizeCapped(func) { - var result = (0,memoize/* default */.A)(func, function(key) { - if (cache.size === MAX_MEMOIZE_SIZE) { - cache.clear(); - } - return key; - }); - - var cache = result.cache; - return result; -} - -/* harmony default export */ const _memoizeCapped = (memoizeCapped); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_stringToPath.js - - -/** Used to match property names within property paths. */ -var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; - -/** Used to match backslashes in property paths. */ -var reEscapeChar = /\\(\\)?/g; - -/** - * Converts `string` to a property path array. - * - * @private - * @param {string} string The string to convert. - * @returns {Array} Returns the property path array. - */ -var stringToPath = _memoizeCapped(function(string) { - var result = []; - if (string.charCodeAt(0) === 46 /* . */) { - result.push(''); - } - string.replace(rePropName, function(match, number, quote, subString) { - result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match)); - }); - return result; -}); - -/* harmony default export */ const _stringToPath = (stringToPath); - -// EXTERNAL MODULE: ./node_modules/lodash-es/toString.js + 1 modules -var lodash_es_toString = __webpack_require__(28894); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_castPath.js - - - - - -/** - * Casts `value` to a path array if it's not one. - * - * @private - * @param {*} value The value to inspect. - * @param {Object} [object] The object to query keys on. - * @returns {Array} Returns the cast property path array. - */ -function castPath(value, object) { - if ((0,isArray/* default */.A)(value)) { - return value; - } - return (0,_isKey/* default */.A)(value, object) ? [value] : _stringToPath((0,lodash_es_toString/* default */.A)(value)); -} - -/* harmony default export */ const _castPath = (castPath); - - -/***/ }), - -/***/ 19042: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _baseGetAllKeys_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(33831); -/* harmony import */ var _getSymbols_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(14792); -/* harmony import */ var _keys_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(27422); - - - - -/** - * Creates an array of own enumerable property names and symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names and symbols. - */ -function getAllKeys(object) { - return (0,_baseGetAllKeys_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(object, _keys_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A, _getSymbols_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (getAllKeys); - - -/***/ }), - -/***/ 14792: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _arrayFilter_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2634); -/* harmony import */ var _stubArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13153); - - - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Built-in value references. */ -var propertyIsEnumerable = objectProto.propertyIsEnumerable; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeGetSymbols = Object.getOwnPropertySymbols; - -/** - * Creates an array of the own enumerable symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of symbols. - */ -var getSymbols = !nativeGetSymbols ? _stubArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A : function(object) { - if (object == null) { - return []; - } - object = Object(object); - return (0,_arrayFilter_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(nativeGetSymbols(object), function(symbol) { - return propertyIsEnumerable.call(object, symbol); - }); -}; - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (getSymbols); - - -/***/ }), - -/***/ 85054: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _castPath_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7819); -/* harmony import */ var _isArguments_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(52274); -/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(92049); -/* harmony import */ var _isIndex_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(25353); -/* harmony import */ var _isLength_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5254); -/* harmony import */ var _toKey_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(30901); - - - - - - - -/** - * Checks if `path` exists on `object`. - * - * @private - * @param {Object} object The object to query. - * @param {Array|string} path The path to check. - * @param {Function} hasFunc The function to check properties. - * @returns {boolean} Returns `true` if `path` exists, else `false`. - */ -function hasPath(object, path, hasFunc) { - path = (0,_castPath_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(path, object); - - var index = -1, - length = path.length, - result = false; - - while (++index < length) { - var key = (0,_toKey_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(path[index]); - if (!(result = object != null && hasFunc(object, key))) { - break; - } - object = object[key]; - } - if (result || ++index != length) { - return result; - } - length = object == null ? 0 : object.length; - return !!length && (0,_isLength_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)(length) && (0,_isIndex_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(key, length) && - ((0,_isArray_js__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .A)(object) || (0,_isArguments_js__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A)(object)); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (hasPath); - - -/***/ }), - -/***/ 86586: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(92049); -/* harmony import */ var _isSymbol_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(61882); - - - -/** Used to match property names within property paths. */ -var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, - reIsPlainProp = /^\w*$/; - -/** - * Checks if `value` is a property name and not a property path. - * - * @private - * @param {*} value The value to check. - * @param {Object} [object] The object to query keys on. - * @returns {boolean} Returns `true` if `value` is a property name, else `false`. - */ -function isKey(value, object) { - if ((0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(value)) { - return false; - } - var type = typeof value; - if (type == 'number' || type == 'symbol' || type == 'boolean' || - value == null || (0,_isSymbol_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(value)) { - return true; - } - return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || - (object != null && value in Object(object)); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isKey); - - -/***/ }), - -/***/ 29959: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * Converts `set` to an array of its values. - * - * @private - * @param {Object} set The set to convert. - * @returns {Array} Returns the values. - */ -function setToArray(set) { - var index = -1, - result = Array(set.size); - - set.forEach(function(value) { - result[++index] = value; - }); - return result; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (setToArray); - - -/***/ }), - -/***/ 30901: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _isSymbol_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(61882); - - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0; - -/** - * Converts `value` to a string key if it's not a string or symbol. - * - * @private - * @param {*} value The value to inspect. - * @returns {string|symbol} Returns the key. - */ -function toKey(value) { - if (typeof value == 'string' || (0,_isSymbol_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(value)) { - return value; - } - var result = (value + ''); - return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (toKey); - - -/***/ }), - -/***/ 50053: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _baseClone_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(91641); - - -/** Used to compose bitmasks for cloning. */ -var CLONE_SYMBOLS_FLAG = 4; - -/** - * Creates a shallow clone of `value`. - * - * **Note:** This method is loosely based on the - * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm) - * and supports cloning arrays, array buffers, booleans, date objects, maps, - * numbers, `Object` objects, regexes, sets, strings, symbols, and typed - * arrays. The own enumerable properties of `arguments` objects are cloned - * as plain objects. An empty object is returned for uncloneable values such - * as error objects, functions, DOM nodes, and WeakMaps. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to clone. - * @returns {*} Returns the cloned value. - * @see _.cloneDeep - * @example - * - * var objects = [{ 'a': 1 }, { 'b': 2 }]; - * - * var shallow = _.clone(objects); - * console.log(shallow[0] === objects[0]); - * // => true - */ -function clone(value) { - return (0,_baseClone_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(value, CLONE_SYMBOLS_FLAG); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (clone); - - -/***/ }), - -/***/ 23068: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _baseRest_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(24326); -/* harmony import */ var _eq_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(66984); -/* harmony import */ var _isIterateeCall_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6832); -/* harmony import */ var _keysIn_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(55615); - - - - - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Assigns own and inherited enumerable string keyed properties of source - * objects to the destination object for all destination properties that - * resolve to `undefined`. Source objects are applied from left to right. - * Once a property is set, additional values of the same property are ignored. - * - * **Note:** This method mutates `object`. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. - * @see _.defaultsDeep - * @example - * - * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); - * // => { 'a': 1, 'b': 2 } - */ -var defaults = (0,_baseRest_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(function(object, sources) { - object = Object(object); - - var index = -1; - var length = sources.length; - var guard = length > 2 ? sources[2] : undefined; - - if (guard && (0,_isIterateeCall_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(sources[0], sources[1], guard)) { - length = 1; - } - - while (++index < length) { - var source = sources[index]; - var props = (0,_keysIn_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)(source); - var propsIndex = -1; - var propsLength = props.length; - - while (++propsIndex < propsLength) { - var key = props[propsIndex]; - var value = object[key]; - - if (value === undefined || - ((0,_eq_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(value, objectProto[key]) && !hasOwnProperty.call(object, key))) { - object[key] = source[key]; - } - } - } - - return object; -}); - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (defaults); - - -/***/ }), - -/***/ 11662: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ lodash_es_filter) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayFilter.js -var _arrayFilter = __webpack_require__(2634); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseEach.js + 1 modules -var _baseEach = __webpack_require__(6240); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseFilter.js - - -/** - * The base implementation of `_.filter` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {Array} Returns the new filtered array. - */ -function baseFilter(collection, predicate) { - var result = []; - (0,_baseEach/* default */.A)(collection, function(value, index, collection) { - if (predicate(value, index, collection)) { - result.push(value); - } - }); - return result; -} - -/* harmony default export */ const _baseFilter = (baseFilter); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseIteratee.js + 16 modules -var _baseIteratee = __webpack_require__(49574); -// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js -var isArray = __webpack_require__(92049); -;// CONCATENATED MODULE: ./node_modules/lodash-es/filter.js - - - - - -/** - * Iterates over elements of `collection`, returning an array of all elements - * `predicate` returns truthy for. The predicate is invoked with three - * arguments: (value, index|key, collection). - * - * **Note:** Unlike `_.remove`, this method returns a new array. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @returns {Array} Returns the new filtered array. - * @see _.reject - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': true }, - * { 'user': 'fred', 'age': 40, 'active': false } - * ]; - * - * _.filter(users, function(o) { return !o.active; }); - * // => objects for ['fred'] - * - * // The `_.matches` iteratee shorthand. - * _.filter(users, { 'age': 36, 'active': true }); - * // => objects for ['barney'] - * - * // The `_.matchesProperty` iteratee shorthand. - * _.filter(users, ['active', false]); - * // => objects for ['fred'] - * - * // The `_.property` iteratee shorthand. - * _.filter(users, 'active'); - * // => objects for ['barney'] - * - * // Combining several predicates using `_.overEvery` or `_.overSome`. - * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]])); - * // => objects for ['fred', 'barney'] - */ -function filter(collection, predicate) { - var func = (0,isArray/* default */.A)(collection) ? _arrayFilter/* default */.A : _baseFilter; - return func(collection, (0,_baseIteratee/* default */.A)(predicate, 3)); -} - -/* harmony default export */ const lodash_es_filter = (filter); - - -/***/ }), - -/***/ 34098: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _baseFlatten_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13588); - - -/** - * Flattens `array` a single level deep. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to flatten. - * @returns {Array} Returns the new flattened array. - * @example - * - * _.flatten([1, [2, [3, [4]], 5]]); - * // => [1, 2, [3, [4]], 5] - */ -function flatten(array) { - var length = array == null ? 0 : array.length; - return length ? (0,_baseFlatten_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(array, 1) : []; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (flatten); - - -/***/ }), - -/***/ 8058: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _arrayEach_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(72641); -/* harmony import */ var _baseEach_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6240); -/* harmony import */ var _castFunction_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(99922); -/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(92049); - - - - - -/** - * Iterates over elements of `collection` and invokes `iteratee` for each element. - * The iteratee is invoked with three arguments: (value, index|key, collection). - * Iteratee functions may exit iteration early by explicitly returning `false`. - * - * **Note:** As with other "Collections" methods, objects with a "length" - * property are iterated like arrays. To avoid this behavior use `_.forIn` - * or `_.forOwn` for object iteration. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @alias each - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Array|Object} Returns `collection`. - * @see _.forEachRight - * @example - * - * _.forEach([1, 2], function(value) { - * console.log(value); - * }); - * // => Logs `1` then `2`. - * - * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { - * console.log(key); - * }); - * // => Logs 'a' then 'b' (iteration order is not guaranteed). - */ -function forEach(collection, iteratee) { - var func = (0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(collection) ? _arrayEach_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A : _baseEach_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A; - return func(collection, (0,_castFunction_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(iteratee)); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (forEach); - - -/***/ }), - -/***/ 48585: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ lodash_es_has) -}); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseHas.js -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var _baseHas_hasOwnProperty = objectProto.hasOwnProperty; - -/** - * The base implementation of `_.has` without support for deep paths. - * - * @private - * @param {Object} [object] The object to query. - * @param {Array|string} key The key to check. - * @returns {boolean} Returns `true` if `key` exists, else `false`. - */ -function baseHas(object, key) { - return object != null && _baseHas_hasOwnProperty.call(object, key); -} - -/* harmony default export */ const _baseHas = (baseHas); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_hasPath.js -var _hasPath = __webpack_require__(85054); -;// CONCATENATED MODULE: ./node_modules/lodash-es/has.js - - - -/** - * Checks if `path` is a direct property of `object`. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path to check. - * @returns {boolean} Returns `true` if `path` exists, else `false`. - * @example - * - * var object = { 'a': { 'b': 2 } }; - * var other = _.create({ 'a': _.create({ 'b': 2 }) }); - * - * _.has(object, 'a'); - * // => true - * - * _.has(object, 'a.b'); - * // => true - * - * _.has(object, ['a', 'b']); - * // => true - * - * _.has(other, 'a'); - * // => false - */ -function has(object, path) { - return object != null && (0,_hasPath/* default */.A)(object, path, _baseHas); -} - -/* harmony default export */ const lodash_es_has = (has); - - -/***/ }), - -/***/ 39188: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ lodash_es_hasIn) -}); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseHasIn.js -/** - * The base implementation of `_.hasIn` without support for deep paths. - * - * @private - * @param {Object} [object] The object to query. - * @param {Array|string} key The key to check. - * @returns {boolean} Returns `true` if `key` exists, else `false`. - */ -function baseHasIn(object, key) { - return object != null && key in Object(object); -} - -/* harmony default export */ const _baseHasIn = (baseHasIn); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_hasPath.js -var _hasPath = __webpack_require__(85054); -;// CONCATENATED MODULE: ./node_modules/lodash-es/hasIn.js - - - -/** - * Checks if `path` is a direct or inherited property of `object`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path to check. - * @returns {boolean} Returns `true` if `path` exists, else `false`. - * @example - * - * var object = _.create({ 'a': _.create({ 'b': 2 }) }); - * - * _.hasIn(object, 'a'); - * // => true - * - * _.hasIn(object, 'a.b'); - * // => true - * - * _.hasIn(object, ['a', 'b']); - * // => true - * - * _.hasIn(object, 'b'); - * // => false - */ -function hasIn(object, path) { - return object != null && (0,_hasPath/* default */.A)(object, path, _baseHasIn); -} - -/* harmony default export */ const lodash_es_hasIn = (hasIn); - - -/***/ }), - -/***/ 61882: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _baseGetTag_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(88496); -/* harmony import */ var _isObjectLike_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(53098); - - - -/** `Object#toString` result references. */ -var symbolTag = '[object Symbol]'; - -/** - * Checks if `value` is classified as a `Symbol` primitive or object. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. - * @example - * - * _.isSymbol(Symbol.iterator); - * // => true - * - * _.isSymbol('abc'); - * // => false - */ -function isSymbol(value) { - return typeof value == 'symbol' || - ((0,_isObjectLike_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(value) && (0,_baseGetTag_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(value) == symbolTag); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isSymbol); - - -/***/ }), - -/***/ 69592: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * Checks if `value` is `undefined`. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. - * @example - * - * _.isUndefined(void 0); - * // => true - * - * _.isUndefined(null); - * // => false - */ -function isUndefined(value) { - return value === undefined; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isUndefined); - - -/***/ }), - -/***/ 27422: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _arrayLikeKeys_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(83607); -/* harmony import */ var _baseKeys_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(69471); -/* harmony import */ var _isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(38446); - - - - -/** - * Creates an array of the own enumerable property names of `object`. - * - * **Note:** Non-object values are coerced to objects. See the - * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) - * for more details. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.keys(new Foo); - * // => ['a', 'b'] (iteration order is not guaranteed) - * - * _.keys('hi'); - * // => ['0', '1'] - */ -function keys(object) { - return (0,_isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(object) ? (0,_arrayLikeKeys_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(object) : (0,_baseKeys_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)(object); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (keys); - - -/***/ }), - -/***/ 74722: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _arrayMap_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(45572); -/* harmony import */ var _baseIteratee_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(49574); -/* harmony import */ var _baseMap_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(52568); -/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(92049); - - - - - -/** - * Creates an array of values by running each element in `collection` thru - * `iteratee`. The iteratee is invoked with three arguments: - * (value, index|key, collection). - * - * Many lodash methods are guarded to work as iteratees for methods like - * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. - * - * The guarded methods are: - * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, - * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`, - * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`, - * `template`, `trim`, `trimEnd`, `trimStart`, and `words` - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Array} Returns the new mapped array. - * @example - * - * function square(n) { - * return n * n; - * } - * - * _.map([4, 8], square); - * // => [16, 64] - * - * _.map({ 'a': 4, 'b': 8 }, square); - * // => [16, 64] (iteration order is not guaranteed) - * - * var users = [ - * { 'user': 'barney' }, - * { 'user': 'fred' } - * ]; - * - * // The `_.property` iteratee shorthand. - * _.map(users, 'user'); - * // => ['barney', 'fred'] - */ -function map(collection, iteratee) { - var func = (0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(collection) ? _arrayMap_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A : _baseMap_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A; - return func(collection, (0,_baseIteratee_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(iteratee, 3)); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (map); - - -/***/ }), - -/***/ 81942: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ lodash_es_pick) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGet.js -var _baseGet = __webpack_require__(66318); -// EXTERNAL MODULE: ./node_modules/lodash-es/_assignValue.js -var _assignValue = __webpack_require__(52851); -// EXTERNAL MODULE: ./node_modules/lodash-es/_castPath.js + 2 modules -var _castPath = __webpack_require__(7819); -// EXTERNAL MODULE: ./node_modules/lodash-es/_isIndex.js -var _isIndex = __webpack_require__(25353); -// EXTERNAL MODULE: ./node_modules/lodash-es/isObject.js -var isObject = __webpack_require__(23149); -// EXTERNAL MODULE: ./node_modules/lodash-es/_toKey.js -var _toKey = __webpack_require__(30901); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseSet.js - - - - - - -/** - * The base implementation of `_.set`. - * - * @private - * @param {Object} object The object to modify. - * @param {Array|string} path The path of the property to set. - * @param {*} value The value to set. - * @param {Function} [customizer] The function to customize path creation. - * @returns {Object} Returns `object`. - */ -function baseSet(object, path, value, customizer) { - if (!(0,isObject/* default */.A)(object)) { - return object; - } - path = (0,_castPath/* default */.A)(path, object); - - var index = -1, - length = path.length, - lastIndex = length - 1, - nested = object; - - while (nested != null && ++index < length) { - var key = (0,_toKey/* default */.A)(path[index]), - newValue = value; - - if (key === '__proto__' || key === 'constructor' || key === 'prototype') { - return object; - } - - if (index != lastIndex) { - var objValue = nested[key]; - newValue = customizer ? customizer(objValue, key, nested) : undefined; - if (newValue === undefined) { - newValue = (0,isObject/* default */.A)(objValue) - ? objValue - : ((0,_isIndex/* default */.A)(path[index + 1]) ? [] : {}); - } - } - (0,_assignValue/* default */.A)(nested, key, newValue); - nested = nested[key]; - } - return object; -} - -/* harmony default export */ const _baseSet = (baseSet); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_basePickBy.js - - - - -/** - * The base implementation of `_.pickBy` without support for iteratee shorthands. - * - * @private - * @param {Object} object The source object. - * @param {string[]} paths The property paths to pick. - * @param {Function} predicate The function invoked per property. - * @returns {Object} Returns the new object. - */ -function basePickBy(object, paths, predicate) { - var index = -1, - length = paths.length, - result = {}; - - while (++index < length) { - var path = paths[index], - value = (0,_baseGet/* default */.A)(object, path); - - if (predicate(value, path)) { - _baseSet(result, (0,_castPath/* default */.A)(path, object), value); - } - } - return result; -} - -/* harmony default export */ const _basePickBy = (basePickBy); - -// EXTERNAL MODULE: ./node_modules/lodash-es/hasIn.js + 1 modules -var hasIn = __webpack_require__(39188); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_basePick.js - - - -/** - * The base implementation of `_.pick` without support for individual - * property identifiers. - * - * @private - * @param {Object} object The source object. - * @param {string[]} paths The property paths to pick. - * @returns {Object} Returns the new object. - */ -function basePick(object, paths) { - return _basePickBy(object, paths, function(value, path) { - return (0,hasIn/* default */.A)(object, path); - }); -} - -/* harmony default export */ const _basePick = (basePick); - -// EXTERNAL MODULE: ./node_modules/lodash-es/flatten.js -var flatten = __webpack_require__(34098); -// EXTERNAL MODULE: ./node_modules/lodash-es/_overRest.js + 1 modules -var _overRest = __webpack_require__(76875); -// EXTERNAL MODULE: ./node_modules/lodash-es/_setToString.js + 2 modules -var _setToString = __webpack_require__(67525); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_flatRest.js - - - - -/** - * A specialized version of `baseRest` which flattens the rest array. - * - * @private - * @param {Function} func The function to apply a rest parameter to. - * @returns {Function} Returns the new function. - */ -function flatRest(func) { - return (0,_setToString/* default */.A)((0,_overRest/* default */.A)(func, undefined, flatten/* default */.A), func + ''); -} - -/* harmony default export */ const _flatRest = (flatRest); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/pick.js - - - -/** - * Creates an object composed of the picked `object` properties. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The source object. - * @param {...(string|string[])} [paths] The property paths to pick. - * @returns {Object} Returns the new object. - * @example - * - * var object = { 'a': 1, 'b': '2', 'c': 3 }; - * - * _.pick(object, ['a', 'c']); - * // => { 'a': 1, 'c': 3 } - */ -var pick = _flatRest(function(object, paths) { - return object == null ? {} : _basePick(object, paths); -}); - -/* harmony default export */ const lodash_es_pick = (pick); - - -/***/ }), - -/***/ 91395: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ lodash_es_range) -}); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseRange.js -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeCeil = Math.ceil, - nativeMax = Math.max; - -/** - * The base implementation of `_.range` and `_.rangeRight` which doesn't - * coerce arguments. - * - * @private - * @param {number} start The start of the range. - * @param {number} end The end of the range. - * @param {number} step The value to increment or decrement by. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Array} Returns the range of numbers. - */ -function baseRange(start, end, step, fromRight) { - var index = -1, - length = nativeMax(nativeCeil((end - start) / (step || 1)), 0), - result = Array(length); - - while (length--) { - result[fromRight ? length : ++index] = start; - start += step; - } - return result; -} - -/* harmony default export */ const _baseRange = (baseRange); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_isIterateeCall.js -var _isIterateeCall = __webpack_require__(6832); -// EXTERNAL MODULE: ./node_modules/lodash-es/toFinite.js + 3 modules -var toFinite = __webpack_require__(74342); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_createRange.js - - - - -/** - * Creates a `_.range` or `_.rangeRight` function. - * - * @private - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new range function. - */ -function createRange(fromRight) { - return function(start, end, step) { - if (step && typeof step != 'number' && (0,_isIterateeCall/* default */.A)(start, end, step)) { - end = step = undefined; - } - // Ensure the sign of `-0` is preserved. - start = (0,toFinite/* default */.A)(start); - if (end === undefined) { - end = start; - start = 0; - } else { - end = (0,toFinite/* default */.A)(end); - } - step = step === undefined ? (start < end ? 1 : -1) : (0,toFinite/* default */.A)(step); - return _baseRange(start, end, step, fromRight); - }; -} - -/* harmony default export */ const _createRange = (createRange); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/range.js - - -/** - * Creates an array of numbers (positive and/or negative) progressing from - * `start` up to, but not including, `end`. A step of `-1` is used if a negative - * `start` is specified without an `end` or `step`. If `end` is not specified, - * it's set to `start` with `start` then set to `0`. - * - * **Note:** JavaScript follows the IEEE-754 standard for resolving - * floating-point values which can produce unexpected results. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Util - * @param {number} [start=0] The start of the range. - * @param {number} end The end of the range. - * @param {number} [step=1] The value to increment or decrement by. - * @returns {Array} Returns the range of numbers. - * @see _.inRange, _.rangeRight - * @example - * - * _.range(4); - * // => [0, 1, 2, 3] - * - * _.range(-4); - * // => [0, -1, -2, -3] - * - * _.range(1, 5); - * // => [1, 2, 3, 4] - * - * _.range(0, 20, 5); - * // => [0, 5, 10, 15] - * - * _.range(0, -4, -1); - * // => [0, -1, -2, -3] - * - * _.range(1, 4, 0); - * // => [1, 1, 1] - * - * _.range(0); - * // => [] - */ -var range = _createRange(); - -/* harmony default export */ const lodash_es_range = (range); - - -/***/ }), - -/***/ 89463: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ lodash_es_reduce) -}); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_arrayReduce.js -/** - * A specialized version of `_.reduce` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {*} [accumulator] The initial value. - * @param {boolean} [initAccum] Specify using the first element of `array` as - * the initial value. - * @returns {*} Returns the accumulated value. - */ -function arrayReduce(array, iteratee, accumulator, initAccum) { - var index = -1, - length = array == null ? 0 : array.length; - - if (initAccum && length) { - accumulator = array[++index]; - } - while (++index < length) { - accumulator = iteratee(accumulator, array[index], index, array); - } - return accumulator; -} - -/* harmony default export */ const _arrayReduce = (arrayReduce); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseEach.js + 1 modules -var _baseEach = __webpack_require__(6240); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseIteratee.js + 16 modules -var _baseIteratee = __webpack_require__(49574); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseReduce.js -/** - * The base implementation of `_.reduce` and `_.reduceRight`, without support - * for iteratee shorthands, which iterates over `collection` using `eachFunc`. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {*} accumulator The initial value. - * @param {boolean} initAccum Specify using the first or last element of - * `collection` as the initial value. - * @param {Function} eachFunc The function to iterate over `collection`. - * @returns {*} Returns the accumulated value. - */ -function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { - eachFunc(collection, function(value, index, collection) { - accumulator = initAccum - ? (initAccum = false, value) - : iteratee(accumulator, value, index, collection); - }); - return accumulator; -} - -/* harmony default export */ const _baseReduce = (baseReduce); - -// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js -var isArray = __webpack_require__(92049); -;// CONCATENATED MODULE: ./node_modules/lodash-es/reduce.js - - - - - - -/** - * Reduces `collection` to a value which is the accumulated result of running - * each element in `collection` thru `iteratee`, where each successive - * invocation is supplied the return value of the previous. If `accumulator` - * is not given, the first element of `collection` is used as the initial - * value. The iteratee is invoked with four arguments: - * (accumulator, value, index|key, collection). - * - * Many lodash methods are guarded to work as iteratees for methods like - * `_.reduce`, `_.reduceRight`, and `_.transform`. - * - * The guarded methods are: - * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`, - * and `sortBy` - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @param {*} [accumulator] The initial value. - * @returns {*} Returns the accumulated value. - * @see _.reduceRight - * @example - * - * _.reduce([1, 2], function(sum, n) { - * return sum + n; - * }, 0); - * // => 3 - * - * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { - * (result[value] || (result[value] = [])).push(key); - * return result; - * }, {}); - * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed) - */ -function reduce(collection, iteratee, accumulator) { - var func = (0,isArray/* default */.A)(collection) ? _arrayReduce : _baseReduce, - initAccum = arguments.length < 3; - - return func(collection, (0,_baseIteratee/* default */.A)(iteratee, 4), accumulator, initAccum, _baseEach/* default */.A); -} - -/* harmony default export */ const lodash_es_reduce = (reduce); - - -/***/ }), - -/***/ 13153: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * This method returns a new empty array. - * - * @static - * @memberOf _ - * @since 4.13.0 - * @category Util - * @returns {Array} Returns the new empty array. - * @example - * - * var arrays = _.times(2, _.stubArray); - * - * console.log(arrays); - * // => [[], []] - * - * console.log(arrays[0] === arrays[1]); - * // => false - */ -function stubArray() { - return []; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (stubArray); - - -/***/ }), - -/***/ 74342: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ lodash_es_toFinite) -}); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_trimmedEndIndex.js -/** Used to match a single whitespace character. */ -var reWhitespace = /\s/; - -/** - * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace - * character of `string`. - * - * @private - * @param {string} string The string to inspect. - * @returns {number} Returns the index of the last non-whitespace character. - */ -function trimmedEndIndex(string) { - var index = string.length; - - while (index-- && reWhitespace.test(string.charAt(index))) {} - return index; -} - -/* harmony default export */ const _trimmedEndIndex = (trimmedEndIndex); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseTrim.js - - -/** Used to match leading whitespace. */ -var reTrimStart = /^\s+/; - -/** - * The base implementation of `_.trim`. - * - * @private - * @param {string} string The string to trim. - * @returns {string} Returns the trimmed string. - */ -function baseTrim(string) { - return string - ? string.slice(0, _trimmedEndIndex(string) + 1).replace(reTrimStart, '') - : string; -} - -/* harmony default export */ const _baseTrim = (baseTrim); - -// EXTERNAL MODULE: ./node_modules/lodash-es/isObject.js -var isObject = __webpack_require__(23149); -// EXTERNAL MODULE: ./node_modules/lodash-es/isSymbol.js -var isSymbol = __webpack_require__(61882); -;// CONCATENATED MODULE: ./node_modules/lodash-es/toNumber.js - - - - -/** Used as references for various `Number` constants. */ -var NAN = 0 / 0; - -/** Used to detect bad signed hexadecimal string values. */ -var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; - -/** Used to detect binary string values. */ -var reIsBinary = /^0b[01]+$/i; - -/** Used to detect octal string values. */ -var reIsOctal = /^0o[0-7]+$/i; - -/** Built-in method references without a dependency on `root`. */ -var freeParseInt = parseInt; - -/** - * Converts `value` to a number. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to process. - * @returns {number} Returns the number. - * @example - * - * _.toNumber(3.2); - * // => 3.2 - * - * _.toNumber(Number.MIN_VALUE); - * // => 5e-324 - * - * _.toNumber(Infinity); - * // => Infinity - * - * _.toNumber('3.2'); - * // => 3.2 - */ -function toNumber(value) { - if (typeof value == 'number') { - return value; - } - if ((0,isSymbol/* default */.A)(value)) { - return NAN; - } - if ((0,isObject/* default */.A)(value)) { - var other = typeof value.valueOf == 'function' ? value.valueOf() : value; - value = (0,isObject/* default */.A)(other) ? (other + '') : other; - } - if (typeof value != 'string') { - return value === 0 ? value : +value; - } - value = _baseTrim(value); - var isBinary = reIsBinary.test(value); - return (isBinary || reIsOctal.test(value)) - ? freeParseInt(value.slice(2), isBinary ? 2 : 8) - : (reIsBadHex.test(value) ? NAN : +value); -} - -/* harmony default export */ const lodash_es_toNumber = (toNumber); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/toFinite.js - - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0, - MAX_INTEGER = 1.7976931348623157e+308; - -/** - * Converts `value` to a finite number. - * - * @static - * @memberOf _ - * @since 4.12.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {number} Returns the converted number. - * @example - * - * _.toFinite(3.2); - * // => 3.2 - * - * _.toFinite(Number.MIN_VALUE); - * // => 5e-324 - * - * _.toFinite(Infinity); - * // => 1.7976931348623157e+308 - * - * _.toFinite('3.2'); - * // => 3.2 - */ -function toFinite(value) { - if (!value) { - return value === 0 ? value : 0; - } - value = lodash_es_toNumber(value); - if (value === INFINITY || value === -INFINITY) { - var sign = (value < 0 ? -1 : 1); - return sign * MAX_INTEGER; - } - return value === value ? value : 0; -} - -/* harmony default export */ const lodash_es_toFinite = (toFinite); - - -/***/ }), - -/***/ 28894: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ lodash_es_toString) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_Symbol.js -var _Symbol = __webpack_require__(241); -// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayMap.js -var _arrayMap = __webpack_require__(45572); -// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js -var isArray = __webpack_require__(92049); -// EXTERNAL MODULE: ./node_modules/lodash-es/isSymbol.js -var isSymbol = __webpack_require__(61882); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseToString.js - - - - - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0; - -/** Used to convert symbols to primitives and strings. */ -var symbolProto = _Symbol/* default */.A ? _Symbol/* default */.A.prototype : undefined, - symbolToString = symbolProto ? symbolProto.toString : undefined; - -/** - * The base implementation of `_.toString` which doesn't convert nullish - * values to empty strings. - * - * @private - * @param {*} value The value to process. - * @returns {string} Returns the string. - */ -function baseToString(value) { - // Exit early for strings to avoid a performance hit in some environments. - if (typeof value == 'string') { - return value; - } - if ((0,isArray/* default */.A)(value)) { - // Recursively convert values (susceptible to call stack limits). - return (0,_arrayMap/* default */.A)(value, baseToString) + ''; - } - if ((0,isSymbol/* default */.A)(value)) { - return symbolToString ? symbolToString.call(value) : ''; - } - var result = (value + ''); - return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; -} - -/* harmony default export */ const _baseToString = (baseToString); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/toString.js - - -/** - * Converts `value` to a string. An empty string is returned for `null` - * and `undefined` values. The sign of `-0` is preserved. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {string} Returns the converted string. - * @example - * - * _.toString(null); - * // => '' - * - * _.toString(-0); - * // => '-0' - * - * _.toString([1, 2, 3]); - * // => '1,2,3' - */ -function toString_toString(value) { - return value == null ? '' : _baseToString(value); -} - -/* harmony default export */ const lodash_es_toString = (toString_toString); - - -/***/ }), - -/***/ 5664: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _toString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(28894); - - -/** Used to generate unique IDs. */ -var idCounter = 0; - -/** - * Generates a unique ID. If `prefix` is given, the ID is appended to it. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Util - * @param {string} [prefix=''] The value to prefix the ID with. - * @returns {string} Returns the unique ID. - * @example - * - * _.uniqueId('contact_'); - * // => 'contact_104' - * - * _.uniqueId(); - * // => '105' - */ -function uniqueId(prefix) { - var id = ++idCounter; - return (0,_toString_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(prefix) + id; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (uniqueId); - - -/***/ }), - -/***/ 38207: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ lodash_es_values) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayMap.js -var _arrayMap = __webpack_require__(45572); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseValues.js - - -/** - * The base implementation of `_.values` and `_.valuesIn` which creates an - * array of `object` property values corresponding to the property names - * of `props`. - * - * @private - * @param {Object} object The object to query. - * @param {Array} props The property names to get values for. - * @returns {Object} Returns the array of property values. - */ -function baseValues(object, props) { - return (0,_arrayMap/* default */.A)(props, function(key) { - return object[key]; - }); -} - -/* harmony default export */ const _baseValues = (baseValues); - -// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js -var keys = __webpack_require__(27422); -;// CONCATENATED MODULE: ./node_modules/lodash-es/values.js - - - -/** - * Creates an array of the own enumerable string keyed property values of `object`. - * - * **Note:** Non-object values are coerced to objects. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property values. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.values(new Foo); - * // => [1, 2] (iteration order is not guaranteed) - * - * _.values('hi'); - * // => ['h', 'i'] - */ -function values(object) { - return object == null ? [] : _baseValues(object, (0,keys/* default */.A)(object)); -} - -/* harmony default export */ const lodash_es_values = (values); - - -/***/ }), - -/***/ 85628: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ diagram: () => (/* binding */ diagram) -/* harmony export */ }); -/* harmony import */ var _styles_9a916d00_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(21987); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(26312); -/* harmony import */ var dagre_d3_es_src_graphlib_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(697); -/* harmony import */ var _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(86079); -/* harmony import */ var _index_3862675e_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(8995); -/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(74353); -/* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(16750); -/* harmony import */ var dompurify__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(99418); -/* harmony import */ var dagre_d3_es_src_dagre_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(21176); -/* harmony import */ var dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(14075); - - - - - - - - - - - - - - - - - - - -const sanitizeText = (txt) => _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_7__.e.sanitizeText(txt, (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_7__.c)()); -let conf = { - dividerMargin: 10, - padding: 5, - textHeight: 10, - curve: void 0 -}; -const addNamespaces = function(namespaces, g, _id, diagObj) { - const keys = Object.keys(namespaces); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_7__.l.info("keys:", keys); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_7__.l.info(namespaces); - keys.forEach(function(id) { - var _a, _b; - const vertex = namespaces[id]; - const shape = "rect"; - const node = { - shape, - id: vertex.id, - domId: vertex.domId, - labelText: sanitizeText(vertex.id), - labelStyle: "", - style: "fill: none; stroke: black", - // TODO V10: Flowchart ? Keeping flowchart for backwards compatibility. Remove in next major release - padding: ((_a = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_7__.c)().flowchart) == null ? void 0 : _a.padding) ?? ((_b = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_7__.c)().class) == null ? void 0 : _b.padding) - }; - g.setNode(vertex.id, node); - addClasses(vertex.classes, g, _id, diagObj, vertex.id); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_7__.l.info("setNode", node); - }); -}; -const addClasses = function(classes, g, _id, diagObj, parent) { - const keys = Object.keys(classes); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_7__.l.info("keys:", keys); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_7__.l.info(classes); - keys.filter((id) => classes[id].parent == parent).forEach(function(id) { - var _a, _b; - const vertex = classes[id]; - const cssClassStr = vertex.cssClasses.join(" "); - const styles2 = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_7__.k)(vertex.styles); - const vertexText = vertex.label ?? vertex.id; - const radius = 0; - const shape = "class_box"; - const node = { - labelStyle: styles2.labelStyle, - shape, - labelText: sanitizeText(vertexText), - classData: vertex, - rx: radius, - ry: radius, - class: cssClassStr, - style: styles2.style, - id: vertex.id, - domId: vertex.domId, - tooltip: diagObj.db.getTooltip(vertex.id, parent) || "", - haveCallback: vertex.haveCallback, - link: vertex.link, - width: vertex.type === "group" ? 500 : void 0, - type: vertex.type, - // TODO V10: Flowchart ? Keeping flowchart for backwards compatibility. Remove in next major release - padding: ((_a = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_7__.c)().flowchart) == null ? void 0 : _a.padding) ?? ((_b = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_7__.c)().class) == null ? void 0 : _b.padding) - }; - g.setNode(vertex.id, node); - if (parent) { - g.setParent(vertex.id, parent); - } - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_7__.l.info("setNode", node); - }); -}; -const addNotes = function(notes, g, startEdgeId, classes) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_7__.l.info(notes); - notes.forEach(function(note, i) { - var _a, _b; - const vertex = note; - const cssNoteStr = ""; - const styles2 = { labelStyle: "", style: "" }; - const vertexText = vertex.text; - const radius = 0; - const shape = "note"; - const node = { - labelStyle: styles2.labelStyle, - shape, - labelText: sanitizeText(vertexText), - noteData: vertex, - rx: radius, - ry: radius, - class: cssNoteStr, - style: styles2.style, - id: vertex.id, - domId: vertex.id, - tooltip: "", - type: "note", - // TODO V10: Flowchart ? Keeping flowchart for backwards compatibility. Remove in next major release - padding: ((_a = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_7__.c)().flowchart) == null ? void 0 : _a.padding) ?? ((_b = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_7__.c)().class) == null ? void 0 : _b.padding) - }; - g.setNode(vertex.id, node); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_7__.l.info("setNode", node); - if (!vertex.class || !(vertex.class in classes)) { - return; - } - const edgeId = startEdgeId + i; - const edgeData = { - id: `edgeNote${edgeId}`, - //Set relationship style and line type - classes: "relation", - pattern: "dotted", - // Set link type for rendering - arrowhead: "none", - //Set edge extra labels - startLabelRight: "", - endLabelLeft: "", - //Set relation arrow types - arrowTypeStart: "none", - arrowTypeEnd: "none", - style: "fill:none", - labelStyle: "", - curve: (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_7__.n)(conf.curve, d3__WEBPACK_IMPORTED_MODULE_0__/* .curveLinear */ .lUB) - }; - g.setEdge(vertex.id, vertex.class, edgeData, edgeId); - }); -}; -const addRelations = function(relations, g) { - const conf2 = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_7__.c)().flowchart; - let cnt = 0; - relations.forEach(function(edge) { - var _a; - cnt++; - const edgeData = { - //Set relationship style and line type - classes: "relation", - pattern: edge.relation.lineType == 1 ? "dashed" : "solid", - id: `id_${edge.id1}_${edge.id2}_${cnt}`, - // Set link type for rendering - arrowhead: edge.type === "arrow_open" ? "none" : "normal", - //Set edge extra labels - startLabelRight: edge.relationTitle1 === "none" ? "" : edge.relationTitle1, - endLabelLeft: edge.relationTitle2 === "none" ? "" : edge.relationTitle2, - //Set relation arrow types - arrowTypeStart: getArrowMarker(edge.relation.type1), - arrowTypeEnd: getArrowMarker(edge.relation.type2), - style: "fill:none", - labelStyle: "", - curve: (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_7__.n)(conf2 == null ? void 0 : conf2.curve, d3__WEBPACK_IMPORTED_MODULE_0__/* .curveLinear */ .lUB) - }; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_7__.l.info(edgeData, edge); - if (edge.style !== void 0) { - const styles2 = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_7__.k)(edge.style); - edgeData.style = styles2.style; - edgeData.labelStyle = styles2.labelStyle; - } - edge.text = edge.title; - if (edge.text === void 0) { - if (edge.style !== void 0) { - edgeData.arrowheadStyle = "fill: #333"; - } - } else { - edgeData.arrowheadStyle = "fill: #333"; - edgeData.labelpos = "c"; - if (((_a = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_7__.c)().flowchart) == null ? void 0 : _a.htmlLabels) ?? (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_7__.c)().htmlLabels) { - edgeData.labelType = "html"; - edgeData.label = '' + edge.text + ""; - } else { - edgeData.labelType = "text"; - edgeData.label = edge.text.replace(_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_7__.e.lineBreakRegex, "\n"); - if (edge.style === void 0) { - edgeData.style = edgeData.style || "stroke: #333; stroke-width: 1.5px;fill:none"; - } - edgeData.labelStyle = edgeData.labelStyle.replace("color:", "fill:"); - } - } - g.setEdge(edge.id1, edge.id2, edgeData, cnt); - }); -}; -const setConf = function(cnf) { - conf = { - ...conf, - ...cnf - }; -}; -const draw = async function(text, id, _version, diagObj) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_7__.l.info("Drawing class - ", id); - const conf2 = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_7__.c)().flowchart ?? (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_7__.c)().class; - const securityLevel = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_7__.c)().securityLevel; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_7__.l.info("config:", conf2); - const nodeSpacing = (conf2 == null ? void 0 : conf2.nodeSpacing) ?? 50; - const rankSpacing = (conf2 == null ? void 0 : conf2.rankSpacing) ?? 50; - const g = new dagre_d3_es_src_graphlib_index_js__WEBPACK_IMPORTED_MODULE_1__/* .Graph */ .T({ - multigraph: true, - compound: true - }).setGraph({ - rankdir: diagObj.db.getDirection(), - nodesep: nodeSpacing, - ranksep: rankSpacing, - marginx: 8, - marginy: 8 - }).setDefaultEdgeLabel(function() { - return {}; - }); - const namespaces = diagObj.db.getNamespaces(); - const classes = diagObj.db.getClasses(); - const relations = diagObj.db.getRelations(); - const notes = diagObj.db.getNotes(); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_7__.l.info(relations); - addNamespaces(namespaces, g, id, diagObj); - addClasses(classes, g, id, diagObj); - addRelations(relations, g); - addNotes(notes, g, relations.length + 1, classes); - let sandboxElement; - if (securityLevel === "sandbox") { - sandboxElement = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)("#i" + id); - } - const root = securityLevel === "sandbox" ? (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(sandboxElement.nodes()[0].contentDocument.body) : (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)("body"); - const svg = root.select(`[id="${id}"]`); - const element = root.select("#" + id + " g"); - await (0,_index_3862675e_js__WEBPACK_IMPORTED_MODULE_8__.r)( - element, - g, - ["aggregation", "extension", "composition", "dependency", "lollipop"], - "classDiagram", - id - ); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_7__.u.insertTitle(svg, "classTitleText", (conf2 == null ? void 0 : conf2.titleTopMargin) ?? 5, diagObj.db.getDiagramTitle()); - (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_7__.o)(g, svg, conf2 == null ? void 0 : conf2.diagramPadding, conf2 == null ? void 0 : conf2.useMaxWidth); - if (!(conf2 == null ? void 0 : conf2.htmlLabels)) { - const doc = securityLevel === "sandbox" ? sandboxElement.nodes()[0].contentDocument : document; - const labels = doc.querySelectorAll('[id="' + id + '"] .edgeLabel .label'); - for (const label of labels) { - const dim = label.getBBox(); - const rect = doc.createElementNS("http://www.w3.org/2000/svg", "rect"); - rect.setAttribute("rx", 0); - rect.setAttribute("ry", 0); - rect.setAttribute("width", dim.width); - rect.setAttribute("height", dim.height); - label.insertBefore(rect, label.firstChild); - } - } -}; -function getArrowMarker(type) { - let marker; - switch (type) { - case 0: - marker = "aggregation"; - break; - case 1: - marker = "extension"; - break; - case 2: - marker = "composition"; - break; - case 3: - marker = "dependency"; - break; - case 4: - marker = "lollipop"; - break; - default: - marker = "none"; - } - return marker; -} -const renderer = { - setConf, - draw -}; -const diagram = { - parser: _styles_9a916d00_js__WEBPACK_IMPORTED_MODULE_9__.p, - db: _styles_9a916d00_js__WEBPACK_IMPORTED_MODULE_9__.d, - renderer, - styles: _styles_9a916d00_js__WEBPACK_IMPORTED_MODULE_9__.s, - init: (cnf) => { - if (!cnf.class) { - cnf.class = {}; - } - cnf.class.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute; - _styles_9a916d00_js__WEBPACK_IMPORTED_MODULE_9__.d.clear(); - } -}; - - - -/***/ }), - -/***/ 73743: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - a: () => (/* binding */ createText), - c: () => (/* binding */ computeDimensionOfText) -}); - -// NAMESPACE OBJECT: ./node_modules/mermaid/node_modules/micromark/lib/constructs.js -var constructs_namespaceObject = {}; -__webpack_require__.r(constructs_namespaceObject); -__webpack_require__.d(constructs_namespaceObject, { - attentionMarkers: () => (attentionMarkers), - contentInitial: () => (contentInitial), - disable: () => (disable), - document: () => (constructs_document), - flow: () => (constructs_flow), - flowInitial: () => (flowInitial), - insideSpan: () => (insideSpan), - string: () => (constructs_string), - text: () => (constructs_text) -}); - -// EXTERNAL MODULE: ./node_modules/mermaid/dist/mermaid-b5860b54.js + 8 modules -var mermaid_b5860b54 = __webpack_require__(86079); -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/mdast-util-to-string/lib/index.js -/** - * @typedef {import('mdast').Root|import('mdast').Content} Node - * - * @typedef Options - * Configuration (optional). - * @property {boolean | null | undefined} [includeImageAlt=true] - * Whether to use `alt` for `image`s. - * @property {boolean | null | undefined} [includeHtml=true] - * Whether to use `value` of HTML. - */ - -/** @type {Options} */ -const emptyOptions = {} - -/** - * Get the text content of a node or list of nodes. - * - * Prefers the node’s plain-text fields, otherwise serializes its children, - * and if the given value is an array, serialize the nodes in it. - * - * @param {unknown} value - * Thing to serialize, typically `Node`. - * @param {Options | null | undefined} [options] - * Configuration (optional). - * @returns {string} - * Serialized `value`. - */ -function lib_toString(value, options) { - const settings = options || emptyOptions - const includeImageAlt = - typeof settings.includeImageAlt === 'boolean' - ? settings.includeImageAlt - : true - const includeHtml = - typeof settings.includeHtml === 'boolean' ? settings.includeHtml : true - - return one(value, includeImageAlt, includeHtml) -} - -/** - * One node or several nodes. - * - * @param {unknown} value - * Thing to serialize. - * @param {boolean} includeImageAlt - * Include image `alt`s. - * @param {boolean} includeHtml - * Include HTML. - * @returns {string} - * Serialized node. - */ -function one(value, includeImageAlt, includeHtml) { - if (node(value)) { - if ('value' in value) { - return value.type === 'html' && !includeHtml ? '' : value.value - } - - if (includeImageAlt && 'alt' in value && value.alt) { - return value.alt - } - - if ('children' in value) { - return lib_all(value.children, includeImageAlt, includeHtml) - } - } - - if (Array.isArray(value)) { - return lib_all(value, includeImageAlt, includeHtml) - } - - return '' -} - -/** - * Serialize a list of nodes. - * - * @param {Array} values - * Thing to serialize. - * @param {boolean} includeImageAlt - * Include image `alt`s. - * @param {boolean} includeHtml - * Include HTML. - * @returns {string} - * Serialized nodes. - */ -function lib_all(values, includeImageAlt, includeHtml) { - /** @type {Array} */ - const result = [] - let index = -1 - - while (++index < values.length) { - result[index] = one(values[index], includeImageAlt, includeHtml) - } - - return result.join('') -} - -/** - * Check if `value` looks like a node. - * - * @param {unknown} value - * Thing. - * @returns {value is Node} - * Whether `value` is a node. - */ -function node(value) { - return Boolean(value && typeof value === 'object') -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-chunked/index.js -/** - * Like `Array#splice`, but smarter for giant arrays. - * - * `Array#splice` takes all items to be inserted as individual argument which - * causes a stack overflow in V8 when trying to insert 100k items for instance. - * - * Otherwise, this does not return the removed items, and takes `items` as an - * array instead of rest parameters. - * - * @template {unknown} T - * Item type. - * @param {Array} list - * List to operate on. - * @param {number} start - * Index to remove/insert at (can be negative). - * @param {number} remove - * Number of items to remove. - * @param {Array} items - * Items to inject into `list`. - * @returns {void} - * Nothing. - */ -function splice(list, start, remove, items) { - const end = list.length - let chunkStart = 0 - /** @type {Array} */ - let parameters - - // Make start between zero and `end` (included). - if (start < 0) { - start = -start > end ? 0 : end + start - } else { - start = start > end ? end : start - } - remove = remove > 0 ? remove : 0 - - // No need to chunk the items if there’s only a couple (10k) items. - if (items.length < 10000) { - parameters = Array.from(items) - parameters.unshift(start, remove) - // @ts-expect-error Hush, it’s fine. - list.splice(...parameters) - } else { - // Delete `remove` items starting from `start` - if (remove) list.splice(start, remove) - - // Insert the items in chunks to not cause stack overflows. - while (chunkStart < items.length) { - parameters = items.slice(chunkStart, chunkStart + 10000) - parameters.unshift(start, 0) - // @ts-expect-error Hush, it’s fine. - list.splice(...parameters) - chunkStart += 10000 - start += 10000 - } - } -} - -/** - * Append `items` (an array) at the end of `list` (another array). - * When `list` was empty, returns `items` instead. - * - * This prevents a potentially expensive operation when `list` is empty, - * and adds items in batches to prevent V8 from hanging. - * - * @template {unknown} T - * Item type. - * @param {Array} list - * List to operate on. - * @param {Array} items - * Items to add to `list`. - * @returns {Array} - * Either `list` or `items`. - */ -function push(list, items) { - if (list.length > 0) { - splice(list, list.length, 0, items) - return list - } - return items -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-combine-extensions/index.js -/** - * @typedef {import('micromark-util-types').Extension} Extension - * @typedef {import('micromark-util-types').Handles} Handles - * @typedef {import('micromark-util-types').HtmlExtension} HtmlExtension - * @typedef {import('micromark-util-types').NormalizedExtension} NormalizedExtension - */ - - - -const micromark_util_combine_extensions_hasOwnProperty = {}.hasOwnProperty - -/** - * Combine multiple syntax extensions into one. - * - * @param {Array} extensions - * List of syntax extensions. - * @returns {NormalizedExtension} - * A single combined extension. - */ -function combineExtensions(extensions) { - /** @type {NormalizedExtension} */ - const all = {} - let index = -1 - - while (++index < extensions.length) { - syntaxExtension(all, extensions[index]) - } - - return all -} - -/** - * Merge `extension` into `all`. - * - * @param {NormalizedExtension} all - * Extension to merge into. - * @param {Extension} extension - * Extension to merge. - * @returns {void} - */ -function syntaxExtension(all, extension) { - /** @type {keyof Extension} */ - let hook - - for (hook in extension) { - const maybe = micromark_util_combine_extensions_hasOwnProperty.call(all, hook) ? all[hook] : undefined - /** @type {Record} */ - const left = maybe || (all[hook] = {}) - /** @type {Record | undefined} */ - const right = extension[hook] - /** @type {string} */ - let code - - if (right) { - for (code in right) { - if (!micromark_util_combine_extensions_hasOwnProperty.call(left, code)) left[code] = [] - const value = right[code] - constructs( - // @ts-expect-error Looks like a list. - left[code], - Array.isArray(value) ? value : value ? [value] : [] - ) - } - } - } -} - -/** - * Merge `list` into `existing` (both lists of constructs). - * Mutates `existing`. - * - * @param {Array} existing - * @param {Array} list - * @returns {void} - */ -function constructs(existing, list) { - let index = -1 - /** @type {Array} */ - const before = [] - - while (++index < list.length) { - // @ts-expect-error Looks like an object. - ;(list[index].add === 'after' ? existing : before).push(list[index]) - } - - splice(existing, 0, 0, before) -} - -/** - * Combine multiple HTML extensions into one. - * - * @param {Array} htmlExtensions - * List of HTML extensions. - * @returns {HtmlExtension} - * A single combined HTML extension. - */ -function combineHtmlExtensions(htmlExtensions) { - /** @type {HtmlExtension} */ - const handlers = {} - let index = -1 - - while (++index < htmlExtensions.length) { - htmlExtension(handlers, htmlExtensions[index]) - } - - return handlers -} - -/** - * Merge `extension` into `all`. - * - * @param {HtmlExtension} all - * Extension to merge into. - * @param {HtmlExtension} extension - * Extension to merge. - * @returns {void} - */ -function htmlExtension(all, extension) { - /** @type {keyof HtmlExtension} */ - let hook - - for (hook in extension) { - const maybe = micromark_util_combine_extensions_hasOwnProperty.call(all, hook) ? all[hook] : undefined - const left = maybe || (all[hook] = {}) - const right = extension[hook] - /** @type {keyof Handles} */ - let type - - if (right) { - for (type in right) { - // @ts-expect-error assume document vs regular handler are managed correctly. - left[type] = right[type] - } - } - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-character/lib/unicode-punctuation-regex.js -// This module is generated by `script/`. -// -// CommonMark handles attention (emphasis, strong) markers based on what comes -// before or after them. -// One such difference is if those characters are Unicode punctuation. -// This script is generated from the Unicode data. - -/** - * Regular expression that matches a unicode punctuation character. - */ -const unicodePunctuationRegex = - /[!-\/:-@\[-`\{-~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/ - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-character/index.js -/** - * @typedef {import('micromark-util-types').Code} Code - */ - - - -/** - * Check whether the character code represents an ASCII alpha (`a` through `z`, - * case insensitive). - * - * An **ASCII alpha** is an ASCII upper alpha or ASCII lower alpha. - * - * An **ASCII upper alpha** is a character in the inclusive range U+0041 (`A`) - * to U+005A (`Z`). - * - * An **ASCII lower alpha** is a character in the inclusive range U+0061 (`a`) - * to U+007A (`z`). - * - * @param code - * Code. - * @returns - * Whether it matches. - */ -const asciiAlpha = regexCheck(/[A-Za-z]/) - -/** - * Check whether the character code represents an ASCII alphanumeric (`a` - * through `z`, case insensitive, or `0` through `9`). - * - * An **ASCII alphanumeric** is an ASCII digit (see `asciiDigit`) or ASCII alpha - * (see `asciiAlpha`). - * - * @param code - * Code. - * @returns - * Whether it matches. - */ -const asciiAlphanumeric = regexCheck(/[\dA-Za-z]/) - -/** - * Check whether the character code represents an ASCII atext. - * - * atext is an ASCII alphanumeric (see `asciiAlphanumeric`), or a character in - * the inclusive ranges U+0023 NUMBER SIGN (`#`) to U+0027 APOSTROPHE (`'`), - * U+002A ASTERISK (`*`), U+002B PLUS SIGN (`+`), U+002D DASH (`-`), U+002F - * SLASH (`/`), U+003D EQUALS TO (`=`), U+003F QUESTION MARK (`?`), U+005E - * CARET (`^`) to U+0060 GRAVE ACCENT (`` ` ``), or U+007B LEFT CURLY BRACE - * (`{`) to U+007E TILDE (`~`). - * - * See: - * **\[RFC5322]**: - * [Internet Message Format](https://tools.ietf.org/html/rfc5322). - * P. Resnick. - * IETF. - * - * @param code - * Code. - * @returns - * Whether it matches. - */ -const asciiAtext = regexCheck(/[#-'*+\--9=?A-Z^-~]/) - -/** - * Check whether a character code is an ASCII control character. - * - * An **ASCII control** is a character in the inclusive range U+0000 NULL (NUL) - * to U+001F (US), or U+007F (DEL). - * - * @param {Code} code - * Code. - * @returns {boolean} - * Whether it matches. - */ -function asciiControl(code) { - return ( - // Special whitespace codes (which have negative values), C0 and Control - // character DEL - code !== null && (code < 32 || code === 127) - ) -} - -/** - * Check whether the character code represents an ASCII digit (`0` through `9`). - * - * An **ASCII digit** is a character in the inclusive range U+0030 (`0`) to - * U+0039 (`9`). - * - * @param code - * Code. - * @returns - * Whether it matches. - */ -const asciiDigit = regexCheck(/\d/) - -/** - * Check whether the character code represents an ASCII hex digit (`a` through - * `f`, case insensitive, or `0` through `9`). - * - * An **ASCII hex digit** is an ASCII digit (see `asciiDigit`), ASCII upper hex - * digit, or an ASCII lower hex digit. - * - * An **ASCII upper hex digit** is a character in the inclusive range U+0041 - * (`A`) to U+0046 (`F`). - * - * An **ASCII lower hex digit** is a character in the inclusive range U+0061 - * (`a`) to U+0066 (`f`). - * - * @param code - * Code. - * @returns - * Whether it matches. - */ -const asciiHexDigit = regexCheck(/[\dA-Fa-f]/) - -/** - * Check whether the character code represents ASCII punctuation. - * - * An **ASCII punctuation** is a character in the inclusive ranges U+0021 - * EXCLAMATION MARK (`!`) to U+002F SLASH (`/`), U+003A COLON (`:`) to U+0040 AT - * SIGN (`@`), U+005B LEFT SQUARE BRACKET (`[`) to U+0060 GRAVE ACCENT - * (`` ` ``), or U+007B LEFT CURLY BRACE (`{`) to U+007E TILDE (`~`). - * - * @param code - * Code. - * @returns - * Whether it matches. - */ -const asciiPunctuation = regexCheck(/[!-/:-@[-`{-~]/) - -/** - * Check whether a character code is a markdown line ending. - * - * A **markdown line ending** is the virtual characters M-0003 CARRIAGE RETURN - * LINE FEED (CRLF), M-0004 LINE FEED (LF) and M-0005 CARRIAGE RETURN (CR). - * - * In micromark, the actual character U+000A LINE FEED (LF) and U+000D CARRIAGE - * RETURN (CR) are replaced by these virtual characters depending on whether - * they occurred together. - * - * @param {Code} code - * Code. - * @returns {boolean} - * Whether it matches. - */ -function markdownLineEnding(code) { - return code !== null && code < -2 -} - -/** - * Check whether a character code is a markdown line ending (see - * `markdownLineEnding`) or markdown space (see `markdownSpace`). - * - * @param {Code} code - * Code. - * @returns {boolean} - * Whether it matches. - */ -function markdownLineEndingOrSpace(code) { - return code !== null && (code < 0 || code === 32) -} - -/** - * Check whether a character code is a markdown space. - * - * A **markdown space** is the concrete character U+0020 SPACE (SP) and the - * virtual characters M-0001 VIRTUAL SPACE (VS) and M-0002 HORIZONTAL TAB (HT). - * - * In micromark, the actual character U+0009 CHARACTER TABULATION (HT) is - * replaced by one M-0002 HORIZONTAL TAB (HT) and between 0 and 3 M-0001 VIRTUAL - * SPACE (VS) characters, depending on the column at which the tab occurred. - * - * @param {Code} code - * Code. - * @returns {boolean} - * Whether it matches. - */ -function markdownSpace(code) { - return code === -2 || code === -1 || code === 32 -} - -// Size note: removing ASCII from the regex and using `asciiPunctuation` here -// In fact adds to the bundle size. -/** - * Check whether the character code represents Unicode punctuation. - * - * A **Unicode punctuation** is a character in the Unicode `Pc` (Punctuation, - * Connector), `Pd` (Punctuation, Dash), `Pe` (Punctuation, Close), `Pf` - * (Punctuation, Final quote), `Pi` (Punctuation, Initial quote), `Po` - * (Punctuation, Other), or `Ps` (Punctuation, Open) categories, or an ASCII - * punctuation (see `asciiPunctuation`). - * - * See: - * **\[UNICODE]**: - * [The Unicode Standard](https://www.unicode.org/versions/). - * Unicode Consortium. - * - * @param code - * Code. - * @returns - * Whether it matches. - */ -const unicodePunctuation = regexCheck(unicodePunctuationRegex) - -/** - * Check whether the character code represents Unicode whitespace. - * - * Note that this does handle micromark specific markdown whitespace characters. - * See `markdownLineEndingOrSpace` to check that. - * - * A **Unicode whitespace** is a character in the Unicode `Zs` (Separator, - * Space) category, or U+0009 CHARACTER TABULATION (HT), U+000A LINE FEED (LF), - * U+000C (FF), or U+000D CARRIAGE RETURN (CR) (**\[UNICODE]**). - * - * See: - * **\[UNICODE]**: - * [The Unicode Standard](https://www.unicode.org/versions/). - * Unicode Consortium. - * - * @param code - * Code. - * @returns - * Whether it matches. - */ -const unicodeWhitespace = regexCheck(/\s/) - -/** - * Create a code check from a regex. - * - * @param {RegExp} regex - * @returns {(code: Code) => boolean} - */ -function regexCheck(regex) { - return check - - /** - * Check whether a code matches the bound regex. - * - * @param {Code} code - * Character code. - * @returns {boolean} - * Whether the character code matches the bound regex. - */ - function check(code) { - return code !== null && regex.test(String.fromCharCode(code)) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-space/index.js -/** - * @typedef {import('micromark-util-types').Effects} Effects - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenType} TokenType - */ - - - -// To do: implement `spaceOrTab`, `spaceOrTabMinMax`, `spaceOrTabWithOptions`. - -/** - * Parse spaces and tabs. - * - * There is no `nok` parameter: - * - * * spaces in markdown are often optional, in which case this factory can be - * used and `ok` will be switched to whether spaces were found or not - * * one line ending or space can be detected with `markdownSpace(code)` right - * before using `factorySpace` - * - * ###### Examples - * - * Where `␉` represents a tab (plus how much it expands) and `␠` represents a - * single space. - * - * ```markdown - * ␉ - * ␠␠␠␠ - * ␉␠ - * ``` - * - * @param {Effects} effects - * Context. - * @param {State} ok - * State switched to when successful. - * @param {TokenType} type - * Type (`' \t'`). - * @param {number | undefined} [max=Infinity] - * Max (exclusive). - * @returns - * Start state. - */ -function factorySpace(effects, ok, type, max) { - const limit = max ? max - 1 : Number.POSITIVE_INFINITY - let size = 0 - return start - - /** @type {State} */ - function start(code) { - if (markdownSpace(code)) { - effects.enter(type) - return prefix(code) - } - return ok(code) - } - - /** @type {State} */ - function prefix(code) { - if (markdownSpace(code) && size++ < limit) { - effects.consume(code) - return prefix - } - effects.exit(type) - return ok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/initialize/content.js -/** - * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct - * @typedef {import('micromark-util-types').Initializer} Initializer - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').Token} Token - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - */ - - - -/** @type {InitialConstruct} */ -const content = { - tokenize: initializeContent -} - -/** - * @this {TokenizeContext} - * @type {Initializer} - */ -function initializeContent(effects) { - const contentStart = effects.attempt( - this.parser.constructs.contentInitial, - afterContentStartConstruct, - paragraphInitial - ) - /** @type {Token} */ - let previous - return contentStart - - /** @type {State} */ - function afterContentStartConstruct(code) { - if (code === null) { - effects.consume(code) - return - } - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return factorySpace(effects, contentStart, 'linePrefix') - } - - /** @type {State} */ - function paragraphInitial(code) { - effects.enter('paragraph') - return lineStart(code) - } - - /** @type {State} */ - function lineStart(code) { - const token = effects.enter('chunkText', { - contentType: 'text', - previous - }) - if (previous) { - previous.next = token - } - previous = token - return data(code) - } - - /** @type {State} */ - function data(code) { - if (code === null) { - effects.exit('chunkText') - effects.exit('paragraph') - effects.consume(code) - return - } - if (markdownLineEnding(code)) { - effects.consume(code) - effects.exit('chunkText') - return lineStart - } - - // Data. - effects.consume(code) - return data - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/initialize/document.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').ContainerState} ContainerState - * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct - * @typedef {import('micromark-util-types').Initializer} Initializer - * @typedef {import('micromark-util-types').Point} Point - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').Token} Token - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - -/** - * @typedef {[Construct, ContainerState]} StackItem - */ - - - - -/** @type {InitialConstruct} */ -const document_document = { - tokenize: initializeDocument -} - -/** @type {Construct} */ -const containerConstruct = { - tokenize: tokenizeContainer -} - -/** - * @this {TokenizeContext} - * @type {Initializer} - */ -function initializeDocument(effects) { - const self = this - /** @type {Array} */ - const stack = [] - let continued = 0 - /** @type {TokenizeContext | undefined} */ - let childFlow - /** @type {Token | undefined} */ - let childToken - /** @type {number} */ - let lineStartOffset - return start - - /** @type {State} */ - function start(code) { - // First we iterate through the open blocks, starting with the root - // document, and descending through last children down to the last open - // block. - // Each block imposes a condition that the line must satisfy if the block is - // to remain open. - // For example, a block quote requires a `>` character. - // A paragraph requires a non-blank line. - // In this phase we may match all or just some of the open blocks. - // But we cannot close unmatched blocks yet, because we may have a lazy - // continuation line. - if (continued < stack.length) { - const item = stack[continued] - self.containerState = item[1] - return effects.attempt( - item[0].continuation, - documentContinue, - checkNewContainers - )(code) - } - - // Done. - return checkNewContainers(code) - } - - /** @type {State} */ - function documentContinue(code) { - continued++ - - // Note: this field is called `_closeFlow` but it also closes containers. - // Perhaps a good idea to rename it but it’s already used in the wild by - // extensions. - if (self.containerState._closeFlow) { - self.containerState._closeFlow = undefined - if (childFlow) { - closeFlow() - } - - // Note: this algorithm for moving events around is similar to the - // algorithm when dealing with lazy lines in `writeToChild`. - const indexBeforeExits = self.events.length - let indexBeforeFlow = indexBeforeExits - /** @type {Point | undefined} */ - let point - - // Find the flow chunk. - while (indexBeforeFlow--) { - if ( - self.events[indexBeforeFlow][0] === 'exit' && - self.events[indexBeforeFlow][1].type === 'chunkFlow' - ) { - point = self.events[indexBeforeFlow][1].end - break - } - } - exitContainers(continued) - - // Fix positions. - let index = indexBeforeExits - while (index < self.events.length) { - self.events[index][1].end = Object.assign({}, point) - index++ - } - - // Inject the exits earlier (they’re still also at the end). - splice( - self.events, - indexBeforeFlow + 1, - 0, - self.events.slice(indexBeforeExits) - ) - - // Discard the duplicate exits. - self.events.length = index - return checkNewContainers(code) - } - return start(code) - } - - /** @type {State} */ - function checkNewContainers(code) { - // Next, after consuming the continuation markers for existing blocks, we - // look for new block starts (e.g. `>` for a block quote). - // If we encounter a new block start, we close any blocks unmatched in - // step 1 before creating the new block as a child of the last matched - // block. - if (continued === stack.length) { - // No need to `check` whether there’s a container, of `exitContainers` - // would be moot. - // We can instead immediately `attempt` to parse one. - if (!childFlow) { - return documentContinued(code) - } - - // If we have concrete content, such as block HTML or fenced code, - // we can’t have containers “pierce” into them, so we can immediately - // start. - if (childFlow.currentConstruct && childFlow.currentConstruct.concrete) { - return flowStart(code) - } - - // If we do have flow, it could still be a blank line, - // but we’d be interrupting it w/ a new container if there’s a current - // construct. - // To do: next major: remove `_gfmTableDynamicInterruptHack` (no longer - // needed in micromark-extension-gfm-table@1.0.6). - self.interrupt = Boolean( - childFlow.currentConstruct && !childFlow._gfmTableDynamicInterruptHack - ) - } - - // Check if there is a new container. - self.containerState = {} - return effects.check( - containerConstruct, - thereIsANewContainer, - thereIsNoNewContainer - )(code) - } - - /** @type {State} */ - function thereIsANewContainer(code) { - if (childFlow) closeFlow() - exitContainers(continued) - return documentContinued(code) - } - - /** @type {State} */ - function thereIsNoNewContainer(code) { - self.parser.lazy[self.now().line] = continued !== stack.length - lineStartOffset = self.now().offset - return flowStart(code) - } - - /** @type {State} */ - function documentContinued(code) { - // Try new containers. - self.containerState = {} - return effects.attempt( - containerConstruct, - containerContinue, - flowStart - )(code) - } - - /** @type {State} */ - function containerContinue(code) { - continued++ - stack.push([self.currentConstruct, self.containerState]) - // Try another. - return documentContinued(code) - } - - /** @type {State} */ - function flowStart(code) { - if (code === null) { - if (childFlow) closeFlow() - exitContainers(0) - effects.consume(code) - return - } - childFlow = childFlow || self.parser.flow(self.now()) - effects.enter('chunkFlow', { - contentType: 'flow', - previous: childToken, - _tokenizer: childFlow - }) - return flowContinue(code) - } - - /** @type {State} */ - function flowContinue(code) { - if (code === null) { - writeToChild(effects.exit('chunkFlow'), true) - exitContainers(0) - effects.consume(code) - return - } - if (markdownLineEnding(code)) { - effects.consume(code) - writeToChild(effects.exit('chunkFlow')) - // Get ready for the next line. - continued = 0 - self.interrupt = undefined - return start - } - effects.consume(code) - return flowContinue - } - - /** - * @param {Token} token - * @param {boolean | undefined} [eof] - * @returns {void} - */ - function writeToChild(token, eof) { - const stream = self.sliceStream(token) - if (eof) stream.push(null) - token.previous = childToken - if (childToken) childToken.next = token - childToken = token - childFlow.defineSkip(token.start) - childFlow.write(stream) - - // Alright, so we just added a lazy line: - // - // ```markdown - // > a - // b. - // - // Or: - // - // > ~~~c - // d - // - // Or: - // - // > | e | - // f - // ``` - // - // The construct in the second example (fenced code) does not accept lazy - // lines, so it marked itself as done at the end of its first line, and - // then the content construct parses `d`. - // Most constructs in markdown match on the first line: if the first line - // forms a construct, a non-lazy line can’t “unmake” it. - // - // The construct in the third example is potentially a GFM table, and - // those are *weird*. - // It *could* be a table, from the first line, if the following line - // matches a condition. - // In this case, that second line is lazy, which “unmakes” the first line - // and turns the whole into one content block. - // - // We’ve now parsed the non-lazy and the lazy line, and can figure out - // whether the lazy line started a new flow block. - // If it did, we exit the current containers between the two flow blocks. - if (self.parser.lazy[token.start.line]) { - let index = childFlow.events.length - while (index--) { - if ( - // The token starts before the line ending… - childFlow.events[index][1].start.offset < lineStartOffset && - // …and either is not ended yet… - (!childFlow.events[index][1].end || - // …or ends after it. - childFlow.events[index][1].end.offset > lineStartOffset) - ) { - // Exit: there’s still something open, which means it’s a lazy line - // part of something. - return - } - } - - // Note: this algorithm for moving events around is similar to the - // algorithm when closing flow in `documentContinue`. - const indexBeforeExits = self.events.length - let indexBeforeFlow = indexBeforeExits - /** @type {boolean | undefined} */ - let seen - /** @type {Point | undefined} */ - let point - - // Find the previous chunk (the one before the lazy line). - while (indexBeforeFlow--) { - if ( - self.events[indexBeforeFlow][0] === 'exit' && - self.events[indexBeforeFlow][1].type === 'chunkFlow' - ) { - if (seen) { - point = self.events[indexBeforeFlow][1].end - break - } - seen = true - } - } - exitContainers(continued) - - // Fix positions. - index = indexBeforeExits - while (index < self.events.length) { - self.events[index][1].end = Object.assign({}, point) - index++ - } - - // Inject the exits earlier (they’re still also at the end). - splice( - self.events, - indexBeforeFlow + 1, - 0, - self.events.slice(indexBeforeExits) - ) - - // Discard the duplicate exits. - self.events.length = index - } - } - - /** - * @param {number} size - * @returns {void} - */ - function exitContainers(size) { - let index = stack.length - - // Exit open containers. - while (index-- > size) { - const entry = stack[index] - self.containerState = entry[1] - entry[0].exit.call(self, effects) - } - stack.length = size - } - function closeFlow() { - childFlow.write([null]) - childToken = undefined - childFlow = undefined - self.containerState._closeFlow = undefined - } -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeContainer(effects, ok, nok) { - // Always populated by defaults. - - return factorySpace( - effects, - effects.attempt(this.parser.constructs.document, ok, nok), - 'linePrefix', - this.parser.constructs.disable.null.includes('codeIndented') ? undefined : 4 - ) -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/blank-line.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const blankLine = { - tokenize: tokenizeBlankLine, - partial: true -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeBlankLine(effects, ok, nok) { - return start - - /** - * Start of blank line. - * - * > 👉 **Note**: `␠` represents a space character. - * - * ```markdown - * > | ␠␠␊ - * ^ - * > | ␊ - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - return markdownSpace(code) - ? factorySpace(effects, after, 'linePrefix')(code) - : after(code) - } - - /** - * At eof/eol, after optional whitespace. - * - * > 👉 **Note**: `␠` represents a space character. - * - * ```markdown - * > | ␠␠␊ - * ^ - * > | ␊ - * ^ - * ``` - * - * @type {State} - */ - function after(code) { - return code === null || markdownLineEnding(code) ? ok(code) : nok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/micromark-util-subtokenize/node_modules/micromark-util-chunked/index.js -/** - * Like `Array#splice`, but smarter for giant arrays. - * - * `Array#splice` takes all items to be inserted as individual argument which - * causes a stack overflow in V8 when trying to insert 100k items for instance. - * - * Otherwise, this does not return the removed items, and takes `items` as an - * array instead of rest parameters. - * - * @template {unknown} T - * Item type. - * @param {Array} list - * List to operate on. - * @param {number} start - * Index to remove/insert at (can be negative). - * @param {number} remove - * Number of items to remove. - * @param {Array} items - * Items to inject into `list`. - * @returns {void} - * Nothing. - */ -function micromark_util_chunked_splice(list, start, remove, items) { - const end = list.length - let chunkStart = 0 - /** @type {Array} */ - let parameters - - // Make start between zero and `end` (included). - if (start < 0) { - start = -start > end ? 0 : end + start - } else { - start = start > end ? end : start - } - remove = remove > 0 ? remove : 0 - - // No need to chunk the items if there’s only a couple (10k) items. - if (items.length < 10000) { - parameters = Array.from(items) - parameters.unshift(start, remove) - // @ts-expect-error Hush, it’s fine. - list.splice(...parameters) - } else { - // Delete `remove` items starting from `start` - if (remove) list.splice(start, remove) - - // Insert the items in chunks to not cause stack overflows. - while (chunkStart < items.length) { - parameters = items.slice(chunkStart, chunkStart + 10000) - parameters.unshift(start, 0) - // @ts-expect-error Hush, it’s fine. - list.splice(...parameters) - chunkStart += 10000 - start += 10000 - } - } -} - -/** - * Append `items` (an array) at the end of `list` (another array). - * When `list` was empty, returns `items` instead. - * - * This prevents a potentially expensive operation when `list` is empty, - * and adds items in batches to prevent V8 from hanging. - * - * @template {unknown} T - * Item type. - * @param {Array} list - * List to operate on. - * @param {Array} items - * Items to add to `list`. - * @returns {Array} - * Either `list` or `items`. - */ -function micromark_util_chunked_push(list, items) { - if (list.length > 0) { - micromark_util_chunked_splice(list, list.length, 0, items) - return list - } - return items -} - -;// CONCATENATED MODULE: ./node_modules/micromark-util-subtokenize/index.js -/** - * @typedef {import('micromark-util-types').Chunk} Chunk - * @typedef {import('micromark-util-types').Event} Event - * @typedef {import('micromark-util-types').Token} Token - */ - - -/** - * Tokenize subcontent. - * - * @param {Array} events - * List of events. - * @returns {boolean} - * Whether subtokens were found. - */ -function subtokenize(events) { - /** @type {Record} */ - const jumps = {} - let index = -1 - /** @type {Event} */ - let event - /** @type {number | undefined} */ - let lineIndex - /** @type {number} */ - let otherIndex - /** @type {Event} */ - let otherEvent - /** @type {Array} */ - let parameters - /** @type {Array} */ - let subevents - /** @type {boolean | undefined} */ - let more - while (++index < events.length) { - while (index in jumps) { - index = jumps[index] - } - event = events[index] - - // Add a hook for the GFM tasklist extension, which needs to know if text - // is in the first content of a list item. - if ( - index && - event[1].type === 'chunkFlow' && - events[index - 1][1].type === 'listItemPrefix' - ) { - subevents = event[1]._tokenizer.events - otherIndex = 0 - if ( - otherIndex < subevents.length && - subevents[otherIndex][1].type === 'lineEndingBlank' - ) { - otherIndex += 2 - } - if ( - otherIndex < subevents.length && - subevents[otherIndex][1].type === 'content' - ) { - while (++otherIndex < subevents.length) { - if (subevents[otherIndex][1].type === 'content') { - break - } - if (subevents[otherIndex][1].type === 'chunkText') { - subevents[otherIndex][1]._isInFirstContentOfListItem = true - otherIndex++ - } - } - } - } - - // Enter. - if (event[0] === 'enter') { - if (event[1].contentType) { - Object.assign(jumps, subcontent(events, index)) - index = jumps[index] - more = true - } - } - // Exit. - else if (event[1]._container) { - otherIndex = index - lineIndex = undefined - while (otherIndex--) { - otherEvent = events[otherIndex] - if ( - otherEvent[1].type === 'lineEnding' || - otherEvent[1].type === 'lineEndingBlank' - ) { - if (otherEvent[0] === 'enter') { - if (lineIndex) { - events[lineIndex][1].type = 'lineEndingBlank' - } - otherEvent[1].type = 'lineEnding' - lineIndex = otherIndex - } - } else { - break - } - } - if (lineIndex) { - // Fix position. - event[1].end = Object.assign({}, events[lineIndex][1].start) - - // Switch container exit w/ line endings. - parameters = events.slice(lineIndex, index) - parameters.unshift(event) - micromark_util_chunked_splice(events, lineIndex, index - lineIndex + 1, parameters) - } - } - } - return !more -} - -/** - * Tokenize embedded tokens. - * - * @param {Array} events - * @param {number} eventIndex - * @returns {Record} - */ -function subcontent(events, eventIndex) { - const token = events[eventIndex][1] - const context = events[eventIndex][2] - let startPosition = eventIndex - 1 - /** @type {Array} */ - const startPositions = [] - const tokenizer = - token._tokenizer || context.parser[token.contentType](token.start) - const childEvents = tokenizer.events - /** @type {Array<[number, number]>} */ - const jumps = [] - /** @type {Record} */ - const gaps = {} - /** @type {Array} */ - let stream - /** @type {Token | undefined} */ - let previous - let index = -1 - /** @type {Token | undefined} */ - let current = token - let adjust = 0 - let start = 0 - const breaks = [start] - - // Loop forward through the linked tokens to pass them in order to the - // subtokenizer. - while (current) { - // Find the position of the event for this token. - while (events[++startPosition][1] !== current) { - // Empty. - } - startPositions.push(startPosition) - if (!current._tokenizer) { - stream = context.sliceStream(current) - if (!current.next) { - stream.push(null) - } - if (previous) { - tokenizer.defineSkip(current.start) - } - if (current._isInFirstContentOfListItem) { - tokenizer._gfmTasklistFirstContentOfListItem = true - } - tokenizer.write(stream) - if (current._isInFirstContentOfListItem) { - tokenizer._gfmTasklistFirstContentOfListItem = undefined - } - } - - // Unravel the next token. - previous = current - current = current.next - } - - // Now, loop back through all events (and linked tokens), to figure out which - // parts belong where. - current = token - while (++index < childEvents.length) { - if ( - // Find a void token that includes a break. - childEvents[index][0] === 'exit' && - childEvents[index - 1][0] === 'enter' && - childEvents[index][1].type === childEvents[index - 1][1].type && - childEvents[index][1].start.line !== childEvents[index][1].end.line - ) { - start = index + 1 - breaks.push(start) - // Help GC. - current._tokenizer = undefined - current.previous = undefined - current = current.next - } - } - - // Help GC. - tokenizer.events = [] - - // If there’s one more token (which is the cases for lines that end in an - // EOF), that’s perfect: the last point we found starts it. - // If there isn’t then make sure any remaining content is added to it. - if (current) { - // Help GC. - current._tokenizer = undefined - current.previous = undefined - } else { - breaks.pop() - } - - // Now splice the events from the subtokenizer into the current events, - // moving back to front so that splice indices aren’t affected. - index = breaks.length - while (index--) { - const slice = childEvents.slice(breaks[index], breaks[index + 1]) - const start = startPositions.pop() - jumps.unshift([start, start + slice.length - 1]) - micromark_util_chunked_splice(events, start, 2, slice) - } - index = -1 - while (++index < jumps.length) { - gaps[adjust + jumps[index][0]] = adjust + jumps[index][1] - adjust += jumps[index][1] - jumps[index][0] - 1 - } - return gaps -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/content.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').Resolver} Resolver - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').Token} Token - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - - -/** - * No name because it must not be turned off. - * @type {Construct} - */ -const content_content = { - tokenize: tokenizeContent, - resolve: resolveContent -} - -/** @type {Construct} */ -const continuationConstruct = { - tokenize: tokenizeContinuation, - partial: true -} - -/** - * Content is transparent: it’s parsed right now. That way, definitions are also - * parsed right now: before text in paragraphs (specifically, media) are parsed. - * - * @type {Resolver} - */ -function resolveContent(events) { - subtokenize(events) - return events -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeContent(effects, ok) { - /** @type {Token | undefined} */ - let previous - return chunkStart - - /** - * Before a content chunk. - * - * ```markdown - * > | abc - * ^ - * ``` - * - * @type {State} - */ - function chunkStart(code) { - effects.enter('content') - previous = effects.enter('chunkContent', { - contentType: 'content' - }) - return chunkInside(code) - } - - /** - * In a content chunk. - * - * ```markdown - * > | abc - * ^^^ - * ``` - * - * @type {State} - */ - function chunkInside(code) { - if (code === null) { - return contentEnd(code) - } - - // To do: in `markdown-rs`, each line is parsed on its own, and everything - // is stitched together resolving. - if (markdownLineEnding(code)) { - return effects.check( - continuationConstruct, - contentContinue, - contentEnd - )(code) - } - - // Data. - effects.consume(code) - return chunkInside - } - - /** - * - * - * @type {State} - */ - function contentEnd(code) { - effects.exit('chunkContent') - effects.exit('content') - return ok(code) - } - - /** - * - * - * @type {State} - */ - function contentContinue(code) { - effects.consume(code) - effects.exit('chunkContent') - previous.next = effects.enter('chunkContent', { - contentType: 'content', - previous - }) - previous = previous.next - return chunkInside - } -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeContinuation(effects, ok, nok) { - const self = this - return startLookahead - - /** - * - * - * @type {State} - */ - function startLookahead(code) { - effects.exit('chunkContent') - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return factorySpace(effects, prefixed, 'linePrefix') - } - - /** - * - * - * @type {State} - */ - function prefixed(code) { - if (code === null || markdownLineEnding(code)) { - return nok(code) - } - - // Always populated by defaults. - - const tail = self.events[self.events.length - 1] - if ( - !self.parser.constructs.disable.null.includes('codeIndented') && - tail && - tail[1].type === 'linePrefix' && - tail[2].sliceSerialize(tail[1], true).length >= 4 - ) { - return ok(code) - } - return effects.interrupt(self.parser.constructs.flow, nok, ok)(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/initialize/flow.js -/** - * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct - * @typedef {import('micromark-util-types').Initializer} Initializer - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - */ - - - - -/** @type {InitialConstruct} */ -const flow = { - tokenize: initializeFlow -} - -/** - * @this {TokenizeContext} - * @type {Initializer} - */ -function initializeFlow(effects) { - const self = this - const initial = effects.attempt( - // Try to parse a blank line. - blankLine, - atBlankEnding, - // Try to parse initial flow (essentially, only code). - effects.attempt( - this.parser.constructs.flowInitial, - afterConstruct, - factorySpace( - effects, - effects.attempt( - this.parser.constructs.flow, - afterConstruct, - effects.attempt(content_content, afterConstruct) - ), - 'linePrefix' - ) - ) - ) - return initial - - /** @type {State} */ - function atBlankEnding(code) { - if (code === null) { - effects.consume(code) - return - } - effects.enter('lineEndingBlank') - effects.consume(code) - effects.exit('lineEndingBlank') - self.currentConstruct = undefined - return initial - } - - /** @type {State} */ - function afterConstruct(code) { - if (code === null) { - effects.consume(code) - return - } - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - self.currentConstruct = undefined - return initial - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/initialize/text.js -/** - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct - * @typedef {import('micromark-util-types').Initializer} Initializer - * @typedef {import('micromark-util-types').Resolver} Resolver - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - */ - -const resolver = { - resolveAll: createResolver() -} -const string = initializeFactory('string') -const text_text = initializeFactory('text') - -/** - * @param {'string' | 'text'} field - * @returns {InitialConstruct} - */ -function initializeFactory(field) { - return { - tokenize: initializeText, - resolveAll: createResolver( - field === 'text' ? resolveAllLineSuffixes : undefined - ) - } - - /** - * @this {TokenizeContext} - * @type {Initializer} - */ - function initializeText(effects) { - const self = this - const constructs = this.parser.constructs[field] - const text = effects.attempt(constructs, start, notText) - return start - - /** @type {State} */ - function start(code) { - return atBreak(code) ? text(code) : notText(code) - } - - /** @type {State} */ - function notText(code) { - if (code === null) { - effects.consume(code) - return - } - effects.enter('data') - effects.consume(code) - return data - } - - /** @type {State} */ - function data(code) { - if (atBreak(code)) { - effects.exit('data') - return text(code) - } - - // Data. - effects.consume(code) - return data - } - - /** - * @param {Code} code - * @returns {boolean} - */ - function atBreak(code) { - if (code === null) { - return true - } - const list = constructs[code] - let index = -1 - if (list) { - // Always populated by defaults. - - while (++index < list.length) { - const item = list[index] - if (!item.previous || item.previous.call(self, self.previous)) { - return true - } - } - } - return false - } - } -} - -/** - * @param {Resolver | undefined} [extraResolver] - * @returns {Resolver} - */ -function createResolver(extraResolver) { - return resolveAllText - - /** @type {Resolver} */ - function resolveAllText(events, context) { - let index = -1 - /** @type {number | undefined} */ - let enter - - // A rather boring computation (to merge adjacent `data` events) which - // improves mm performance by 29%. - while (++index <= events.length) { - if (enter === undefined) { - if (events[index] && events[index][1].type === 'data') { - enter = index - index++ - } - } else if (!events[index] || events[index][1].type !== 'data') { - // Don’t do anything if there is one data token. - if (index !== enter + 2) { - events[enter][1].end = events[index - 1][1].end - events.splice(enter + 2, index - enter - 2) - index = enter + 2 - } - enter = undefined - } - } - return extraResolver ? extraResolver(events, context) : events - } -} - -/** - * A rather ugly set of instructions which again looks at chunks in the input - * stream. - * The reason to do this here is that it is *much* faster to parse in reverse. - * And that we can’t hook into `null` to split the line suffix before an EOF. - * To do: figure out if we can make this into a clean utility, or even in core. - * As it will be useful for GFMs literal autolink extension (and maybe even - * tables?) - * - * @type {Resolver} - */ -function resolveAllLineSuffixes(events, context) { - let eventIndex = 0 // Skip first. - - while (++eventIndex <= events.length) { - if ( - (eventIndex === events.length || - events[eventIndex][1].type === 'lineEnding') && - events[eventIndex - 1][1].type === 'data' - ) { - const data = events[eventIndex - 1][1] - const chunks = context.sliceStream(data) - let index = chunks.length - let bufferIndex = -1 - let size = 0 - /** @type {boolean | undefined} */ - let tabs - while (index--) { - const chunk = chunks[index] - if (typeof chunk === 'string') { - bufferIndex = chunk.length - while (chunk.charCodeAt(bufferIndex - 1) === 32) { - size++ - bufferIndex-- - } - if (bufferIndex) break - bufferIndex = -1 - } - // Number - else if (chunk === -2) { - tabs = true - size++ - } else if (chunk === -1) { - // Empty - } else { - // Replacement character, exit. - index++ - break - } - } - if (size) { - const token = { - type: - eventIndex === events.length || tabs || size < 2 - ? 'lineSuffix' - : 'hardBreakTrailing', - start: { - line: data.end.line, - column: data.end.column - size, - offset: data.end.offset - size, - _index: data.start._index + index, - _bufferIndex: index - ? bufferIndex - : data.start._bufferIndex + bufferIndex - }, - end: Object.assign({}, data.end) - } - data.end = Object.assign({}, token.start) - if (data.start.offset === data.end.offset) { - Object.assign(data, token) - } else { - events.splice( - eventIndex, - 0, - ['enter', token, context], - ['exit', token, context] - ) - eventIndex += 2 - } - } - eventIndex++ - } - } - return events -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-resolve-all/index.js -/** - * @typedef {import('micromark-util-types').Event} Event - * @typedef {import('micromark-util-types').Resolver} Resolver - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - */ - -/** - * Call all `resolveAll`s. - * - * @param {Array<{resolveAll?: Resolver | undefined}>} constructs - * List of constructs, optionally with `resolveAll`s. - * @param {Array} events - * List of events. - * @param {TokenizeContext} context - * Context used by `tokenize`. - * @returns {Array} - * Changed events. - */ -function resolveAll(constructs, events, context) { - /** @type {Array} */ - const called = [] - let index = -1 - - while (++index < constructs.length) { - const resolve = constructs[index].resolveAll - - if (resolve && !called.includes(resolve)) { - events = resolve(events, context) - called.push(resolve) - } - } - - return events -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/create-tokenizer.js -/** - * @typedef {import('micromark-util-types').Chunk} Chunk - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').ConstructRecord} ConstructRecord - * @typedef {import('micromark-util-types').Effects} Effects - * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct - * @typedef {import('micromark-util-types').ParseContext} ParseContext - * @typedef {import('micromark-util-types').Point} Point - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').Token} Token - * @typedef {import('micromark-util-types').TokenType} TokenType - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - */ - -/** - * @callback Restore - * @returns {void} - * - * @typedef Info - * @property {Restore} restore - * @property {number} from - * - * @callback ReturnHandle - * Handle a successful run. - * @param {Construct} construct - * @param {Info} info - * @returns {void} - */ - - - - -/** - * Create a tokenizer. - * Tokenizers deal with one type of data (e.g., containers, flow, text). - * The parser is the object dealing with it all. - * `initialize` works like other constructs, except that only its `tokenize` - * function is used, in which case it doesn’t receive an `ok` or `nok`. - * `from` can be given to set the point before the first character, although - * when further lines are indented, they must be set with `defineSkip`. - * - * @param {ParseContext} parser - * @param {InitialConstruct} initialize - * @param {Omit | undefined} [from] - * @returns {TokenizeContext} - */ -function createTokenizer(parser, initialize, from) { - /** @type {Point} */ - let point = Object.assign( - from - ? Object.assign({}, from) - : { - line: 1, - column: 1, - offset: 0 - }, - { - _index: 0, - _bufferIndex: -1 - } - ) - /** @type {Record} */ - const columnStart = {} - /** @type {Array} */ - const resolveAllConstructs = [] - /** @type {Array} */ - let chunks = [] - /** @type {Array} */ - let stack = [] - /** @type {boolean | undefined} */ - let consumed = true - - /** - * Tools used for tokenizing. - * - * @type {Effects} - */ - const effects = { - consume, - enter, - exit, - attempt: constructFactory(onsuccessfulconstruct), - check: constructFactory(onsuccessfulcheck), - interrupt: constructFactory(onsuccessfulcheck, { - interrupt: true - }) - } - - /** - * State and tools for resolving and serializing. - * - * @type {TokenizeContext} - */ - const context = { - previous: null, - code: null, - containerState: {}, - events: [], - parser, - sliceStream, - sliceSerialize, - now, - defineSkip, - write - } - - /** - * The state function. - * - * @type {State | void} - */ - let state = initialize.tokenize.call(context, effects) - - /** - * Track which character we expect to be consumed, to catch bugs. - * - * @type {Code} - */ - let expectedCode - if (initialize.resolveAll) { - resolveAllConstructs.push(initialize) - } - return context - - /** @type {TokenizeContext['write']} */ - function write(slice) { - chunks = push(chunks, slice) - main() - - // Exit if we’re not done, resolve might change stuff. - if (chunks[chunks.length - 1] !== null) { - return [] - } - addResult(initialize, 0) - - // Otherwise, resolve, and exit. - context.events = resolveAll(resolveAllConstructs, context.events, context) - return context.events - } - - // - // Tools. - // - - /** @type {TokenizeContext['sliceSerialize']} */ - function sliceSerialize(token, expandTabs) { - return serializeChunks(sliceStream(token), expandTabs) - } - - /** @type {TokenizeContext['sliceStream']} */ - function sliceStream(token) { - return sliceChunks(chunks, token) - } - - /** @type {TokenizeContext['now']} */ - function now() { - // This is a hot path, so we clone manually instead of `Object.assign({}, point)` - const {line, column, offset, _index, _bufferIndex} = point - return { - line, - column, - offset, - _index, - _bufferIndex - } - } - - /** @type {TokenizeContext['defineSkip']} */ - function defineSkip(value) { - columnStart[value.line] = value.column - accountForPotentialSkip() - } - - // - // State management. - // - - /** - * Main loop (note that `_index` and `_bufferIndex` in `point` are modified by - * `consume`). - * Here is where we walk through the chunks, which either include strings of - * several characters, or numerical character codes. - * The reason to do this in a loop instead of a call is so the stack can - * drain. - * - * @returns {void} - */ - function main() { - /** @type {number} */ - let chunkIndex - while (point._index < chunks.length) { - const chunk = chunks[point._index] - - // If we’re in a buffer chunk, loop through it. - if (typeof chunk === 'string') { - chunkIndex = point._index - if (point._bufferIndex < 0) { - point._bufferIndex = 0 - } - while ( - point._index === chunkIndex && - point._bufferIndex < chunk.length - ) { - go(chunk.charCodeAt(point._bufferIndex)) - } - } else { - go(chunk) - } - } - } - - /** - * Deal with one code. - * - * @param {Code} code - * @returns {void} - */ - function go(code) { - consumed = undefined - expectedCode = code - state = state(code) - } - - /** @type {Effects['consume']} */ - function consume(code) { - if (markdownLineEnding(code)) { - point.line++ - point.column = 1 - point.offset += code === -3 ? 2 : 1 - accountForPotentialSkip() - } else if (code !== -1) { - point.column++ - point.offset++ - } - - // Not in a string chunk. - if (point._bufferIndex < 0) { - point._index++ - } else { - point._bufferIndex++ - - // At end of string chunk. - // @ts-expect-error Points w/ non-negative `_bufferIndex` reference - // strings. - if (point._bufferIndex === chunks[point._index].length) { - point._bufferIndex = -1 - point._index++ - } - } - - // Expose the previous character. - context.previous = code - - // Mark as consumed. - consumed = true - } - - /** @type {Effects['enter']} */ - function enter(type, fields) { - /** @type {Token} */ - // @ts-expect-error Patch instead of assign required fields to help GC. - const token = fields || {} - token.type = type - token.start = now() - context.events.push(['enter', token, context]) - stack.push(token) - return token - } - - /** @type {Effects['exit']} */ - function exit(type) { - const token = stack.pop() - token.end = now() - context.events.push(['exit', token, context]) - return token - } - - /** - * Use results. - * - * @type {ReturnHandle} - */ - function onsuccessfulconstruct(construct, info) { - addResult(construct, info.from) - } - - /** - * Discard results. - * - * @type {ReturnHandle} - */ - function onsuccessfulcheck(_, info) { - info.restore() - } - - /** - * Factory to attempt/check/interrupt. - * - * @param {ReturnHandle} onreturn - * @param {{interrupt?: boolean | undefined} | undefined} [fields] - */ - function constructFactory(onreturn, fields) { - return hook - - /** - * Handle either an object mapping codes to constructs, a list of - * constructs, or a single construct. - * - * @param {Array | Construct | ConstructRecord} constructs - * @param {State} returnState - * @param {State | undefined} [bogusState] - * @returns {State} - */ - function hook(constructs, returnState, bogusState) { - /** @type {Array} */ - let listOfConstructs - /** @type {number} */ - let constructIndex - /** @type {Construct} */ - let currentConstruct - /** @type {Info} */ - let info - return Array.isArray(constructs) /* c8 ignore next 1 */ - ? handleListOfConstructs(constructs) - : 'tokenize' in constructs - ? // @ts-expect-error Looks like a construct. - handleListOfConstructs([constructs]) - : handleMapOfConstructs(constructs) - - /** - * Handle a list of construct. - * - * @param {ConstructRecord} map - * @returns {State} - */ - function handleMapOfConstructs(map) { - return start - - /** @type {State} */ - function start(code) { - const def = code !== null && map[code] - const all = code !== null && map.null - const list = [ - // To do: add more extension tests. - /* c8 ignore next 2 */ - ...(Array.isArray(def) ? def : def ? [def] : []), - ...(Array.isArray(all) ? all : all ? [all] : []) - ] - return handleListOfConstructs(list)(code) - } - } - - /** - * Handle a list of construct. - * - * @param {Array} list - * @returns {State} - */ - function handleListOfConstructs(list) { - listOfConstructs = list - constructIndex = 0 - if (list.length === 0) { - return bogusState - } - return handleConstruct(list[constructIndex]) - } - - /** - * Handle a single construct. - * - * @param {Construct} construct - * @returns {State} - */ - function handleConstruct(construct) { - return start - - /** @type {State} */ - function start(code) { - // To do: not needed to store if there is no bogus state, probably? - // Currently doesn’t work because `inspect` in document does a check - // w/o a bogus, which doesn’t make sense. But it does seem to help perf - // by not storing. - info = store() - currentConstruct = construct - if (!construct.partial) { - context.currentConstruct = construct - } - - // Always populated by defaults. - - if ( - construct.name && - context.parser.constructs.disable.null.includes(construct.name) - ) { - return nok(code) - } - return construct.tokenize.call( - // If we do have fields, create an object w/ `context` as its - // prototype. - // This allows a “live binding”, which is needed for `interrupt`. - fields ? Object.assign(Object.create(context), fields) : context, - effects, - ok, - nok - )(code) - } - } - - /** @type {State} */ - function ok(code) { - consumed = true - onreturn(currentConstruct, info) - return returnState - } - - /** @type {State} */ - function nok(code) { - consumed = true - info.restore() - if (++constructIndex < listOfConstructs.length) { - return handleConstruct(listOfConstructs[constructIndex]) - } - return bogusState - } - } - } - - /** - * @param {Construct} construct - * @param {number} from - * @returns {void} - */ - function addResult(construct, from) { - if (construct.resolveAll && !resolveAllConstructs.includes(construct)) { - resolveAllConstructs.push(construct) - } - if (construct.resolve) { - splice( - context.events, - from, - context.events.length - from, - construct.resolve(context.events.slice(from), context) - ) - } - if (construct.resolveTo) { - context.events = construct.resolveTo(context.events, context) - } - } - - /** - * Store state. - * - * @returns {Info} - */ - function store() { - const startPoint = now() - const startPrevious = context.previous - const startCurrentConstruct = context.currentConstruct - const startEventsIndex = context.events.length - const startStack = Array.from(stack) - return { - restore, - from: startEventsIndex - } - - /** - * Restore state. - * - * @returns {void} - */ - function restore() { - point = startPoint - context.previous = startPrevious - context.currentConstruct = startCurrentConstruct - context.events.length = startEventsIndex - stack = startStack - accountForPotentialSkip() - } - } - - /** - * Move the current point a bit forward in the line when it’s on a column - * skip. - * - * @returns {void} - */ - function accountForPotentialSkip() { - if (point.line in columnStart && point.column < 2) { - point.column = columnStart[point.line] - point.offset += columnStart[point.line] - 1 - } - } -} - -/** - * Get the chunks from a slice of chunks in the range of a token. - * - * @param {Array} chunks - * @param {Pick} token - * @returns {Array} - */ -function sliceChunks(chunks, token) { - const startIndex = token.start._index - const startBufferIndex = token.start._bufferIndex - const endIndex = token.end._index - const endBufferIndex = token.end._bufferIndex - /** @type {Array} */ - let view - if (startIndex === endIndex) { - // @ts-expect-error `_bufferIndex` is used on string chunks. - view = [chunks[startIndex].slice(startBufferIndex, endBufferIndex)] - } else { - view = chunks.slice(startIndex, endIndex) - if (startBufferIndex > -1) { - const head = view[0] - if (typeof head === 'string') { - view[0] = head.slice(startBufferIndex) - } else { - view.shift() - } - } - if (endBufferIndex > 0) { - // @ts-expect-error `_bufferIndex` is used on string chunks. - view.push(chunks[endIndex].slice(0, endBufferIndex)) - } - } - return view -} - -/** - * Get the string value of a slice of chunks. - * - * @param {Array} chunks - * @param {boolean | undefined} [expandTabs=false] - * @returns {string} - */ -function serializeChunks(chunks, expandTabs) { - let index = -1 - /** @type {Array} */ - const result = [] - /** @type {boolean | undefined} */ - let atTab - while (++index < chunks.length) { - const chunk = chunks[index] - /** @type {string} */ - let value - if (typeof chunk === 'string') { - value = chunk - } else - switch (chunk) { - case -5: { - value = '\r' - break - } - case -4: { - value = '\n' - break - } - case -3: { - value = '\r' + '\n' - break - } - case -2: { - value = expandTabs ? ' ' : '\t' - break - } - case -1: { - if (!expandTabs && atTab) continue - value = ' ' - break - } - default: { - // Currently only replacement character. - value = String.fromCharCode(chunk) - } - } - atTab = chunk === -2 - result.push(value) - } - return result.join('') -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/thematic-break.js -/** - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const thematicBreak = { - name: 'thematicBreak', - tokenize: tokenizeThematicBreak -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeThematicBreak(effects, ok, nok) { - let size = 0 - /** @type {NonNullable} */ - let marker - return start - - /** - * Start of thematic break. - * - * ```markdown - * > | *** - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter('thematicBreak') - // To do: parse indent like `markdown-rs`. - return before(code) - } - - /** - * After optional whitespace, at marker. - * - * ```markdown - * > | *** - * ^ - * ``` - * - * @type {State} - */ - function before(code) { - marker = code - return atBreak(code) - } - - /** - * After something, before something else. - * - * ```markdown - * > | *** - * ^ - * ``` - * - * @type {State} - */ - function atBreak(code) { - if (code === marker) { - effects.enter('thematicBreakSequence') - return sequence(code) - } - if (size >= 3 && (code === null || markdownLineEnding(code))) { - effects.exit('thematicBreak') - return ok(code) - } - return nok(code) - } - - /** - * In sequence. - * - * ```markdown - * > | *** - * ^ - * ``` - * - * @type {State} - */ - function sequence(code) { - if (code === marker) { - effects.consume(code) - size++ - return sequence - } - effects.exit('thematicBreakSequence') - return markdownSpace(code) - ? factorySpace(effects, atBreak, 'whitespace')(code) - : atBreak(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/list.js -/** - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').ContainerState} ContainerState - * @typedef {import('micromark-util-types').Exiter} Exiter - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - - - - -/** @type {Construct} */ -const list = { - name: 'list', - tokenize: tokenizeListStart, - continuation: { - tokenize: tokenizeListContinuation - }, - exit: tokenizeListEnd -} - -/** @type {Construct} */ -const listItemPrefixWhitespaceConstruct = { - tokenize: tokenizeListItemPrefixWhitespace, - partial: true -} - -/** @type {Construct} */ -const indentConstruct = { - tokenize: tokenizeIndent, - partial: true -} - -// To do: `markdown-rs` parses list items on their own and later stitches them -// together. - -/** - * @type {Tokenizer} - * @this {TokenizeContext} - */ -function tokenizeListStart(effects, ok, nok) { - const self = this - const tail = self.events[self.events.length - 1] - let initialSize = - tail && tail[1].type === 'linePrefix' - ? tail[2].sliceSerialize(tail[1], true).length - : 0 - let size = 0 - return start - - /** @type {State} */ - function start(code) { - const kind = - self.containerState.type || - (code === 42 || code === 43 || code === 45 - ? 'listUnordered' - : 'listOrdered') - if ( - kind === 'listUnordered' - ? !self.containerState.marker || code === self.containerState.marker - : asciiDigit(code) - ) { - if (!self.containerState.type) { - self.containerState.type = kind - effects.enter(kind, { - _container: true - }) - } - if (kind === 'listUnordered') { - effects.enter('listItemPrefix') - return code === 42 || code === 45 - ? effects.check(thematicBreak, nok, atMarker)(code) - : atMarker(code) - } - if (!self.interrupt || code === 49) { - effects.enter('listItemPrefix') - effects.enter('listItemValue') - return inside(code) - } - } - return nok(code) - } - - /** @type {State} */ - function inside(code) { - if (asciiDigit(code) && ++size < 10) { - effects.consume(code) - return inside - } - if ( - (!self.interrupt || size < 2) && - (self.containerState.marker - ? code === self.containerState.marker - : code === 41 || code === 46) - ) { - effects.exit('listItemValue') - return atMarker(code) - } - return nok(code) - } - - /** - * @type {State} - **/ - function atMarker(code) { - effects.enter('listItemMarker') - effects.consume(code) - effects.exit('listItemMarker') - self.containerState.marker = self.containerState.marker || code - return effects.check( - blankLine, - // Can’t be empty when interrupting. - self.interrupt ? nok : onBlank, - effects.attempt( - listItemPrefixWhitespaceConstruct, - endOfPrefix, - otherPrefix - ) - ) - } - - /** @type {State} */ - function onBlank(code) { - self.containerState.initialBlankLine = true - initialSize++ - return endOfPrefix(code) - } - - /** @type {State} */ - function otherPrefix(code) { - if (markdownSpace(code)) { - effects.enter('listItemPrefixWhitespace') - effects.consume(code) - effects.exit('listItemPrefixWhitespace') - return endOfPrefix - } - return nok(code) - } - - /** @type {State} */ - function endOfPrefix(code) { - self.containerState.size = - initialSize + - self.sliceSerialize(effects.exit('listItemPrefix'), true).length - return ok(code) - } -} - -/** - * @type {Tokenizer} - * @this {TokenizeContext} - */ -function tokenizeListContinuation(effects, ok, nok) { - const self = this - self.containerState._closeFlow = undefined - return effects.check(blankLine, onBlank, notBlank) - - /** @type {State} */ - function onBlank(code) { - self.containerState.furtherBlankLines = - self.containerState.furtherBlankLines || - self.containerState.initialBlankLine - - // We have a blank line. - // Still, try to consume at most the items size. - return factorySpace( - effects, - ok, - 'listItemIndent', - self.containerState.size + 1 - )(code) - } - - /** @type {State} */ - function notBlank(code) { - if (self.containerState.furtherBlankLines || !markdownSpace(code)) { - self.containerState.furtherBlankLines = undefined - self.containerState.initialBlankLine = undefined - return notInCurrentItem(code) - } - self.containerState.furtherBlankLines = undefined - self.containerState.initialBlankLine = undefined - return effects.attempt(indentConstruct, ok, notInCurrentItem)(code) - } - - /** @type {State} */ - function notInCurrentItem(code) { - // While we do continue, we signal that the flow should be closed. - self.containerState._closeFlow = true - // As we’re closing flow, we’re no longer interrupting. - self.interrupt = undefined - // Always populated by defaults. - - return factorySpace( - effects, - effects.attempt(list, ok, nok), - 'linePrefix', - self.parser.constructs.disable.null.includes('codeIndented') - ? undefined - : 4 - )(code) - } -} - -/** - * @type {Tokenizer} - * @this {TokenizeContext} - */ -function tokenizeIndent(effects, ok, nok) { - const self = this - return factorySpace( - effects, - afterPrefix, - 'listItemIndent', - self.containerState.size + 1 - ) - - /** @type {State} */ - function afterPrefix(code) { - const tail = self.events[self.events.length - 1] - return tail && - tail[1].type === 'listItemIndent' && - tail[2].sliceSerialize(tail[1], true).length === self.containerState.size - ? ok(code) - : nok(code) - } -} - -/** - * @type {Exiter} - * @this {TokenizeContext} - */ -function tokenizeListEnd(effects) { - effects.exit(this.containerState.type) -} - -/** - * @type {Tokenizer} - * @this {TokenizeContext} - */ -function tokenizeListItemPrefixWhitespace(effects, ok, nok) { - const self = this - - // Always populated by defaults. - - return factorySpace( - effects, - afterPrefix, - 'listItemPrefixWhitespace', - self.parser.constructs.disable.null.includes('codeIndented') - ? undefined - : 4 + 1 - ) - - /** @type {State} */ - function afterPrefix(code) { - const tail = self.events[self.events.length - 1] - return !markdownSpace(code) && - tail && - tail[1].type === 'listItemPrefixWhitespace' - ? ok(code) - : nok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/block-quote.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').Exiter} Exiter - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const blockQuote = { - name: 'blockQuote', - tokenize: tokenizeBlockQuoteStart, - continuation: { - tokenize: tokenizeBlockQuoteContinuation - }, - exit -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeBlockQuoteStart(effects, ok, nok) { - const self = this - return start - - /** - * Start of block quote. - * - * ```markdown - * > | > a - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - if (code === 62) { - const state = self.containerState - if (!state.open) { - effects.enter('blockQuote', { - _container: true - }) - state.open = true - } - effects.enter('blockQuotePrefix') - effects.enter('blockQuoteMarker') - effects.consume(code) - effects.exit('blockQuoteMarker') - return after - } - return nok(code) - } - - /** - * After `>`, before optional whitespace. - * - * ```markdown - * > | > a - * ^ - * ``` - * - * @type {State} - */ - function after(code) { - if (markdownSpace(code)) { - effects.enter('blockQuotePrefixWhitespace') - effects.consume(code) - effects.exit('blockQuotePrefixWhitespace') - effects.exit('blockQuotePrefix') - return ok - } - effects.exit('blockQuotePrefix') - return ok(code) - } -} - -/** - * Start of block quote continuation. - * - * ```markdown - * | > a - * > | > b - * ^ - * ``` - * - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeBlockQuoteContinuation(effects, ok, nok) { - const self = this - return contStart - - /** - * Start of block quote continuation. - * - * Also used to parse the first block quote opening. - * - * ```markdown - * | > a - * > | > b - * ^ - * ``` - * - * @type {State} - */ - function contStart(code) { - if (markdownSpace(code)) { - // Always populated by defaults. - - return factorySpace( - effects, - contBefore, - 'linePrefix', - self.parser.constructs.disable.null.includes('codeIndented') - ? undefined - : 4 - )(code) - } - return contBefore(code) - } - - /** - * At `>`, after optional whitespace. - * - * Also used to parse the first block quote opening. - * - * ```markdown - * | > a - * > | > b - * ^ - * ``` - * - * @type {State} - */ - function contBefore(code) { - return effects.attempt(blockQuote, ok, nok)(code) - } -} - -/** @type {Exiter} */ -function exit(effects) { - effects.exit('blockQuote') -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-destination/index.js -/** - * @typedef {import('micromark-util-types').Effects} Effects - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenType} TokenType - */ - - -/** - * Parse destinations. - * - * ###### Examples - * - * ```markdown - * - * b> - * - * - * a - * a\)b - * a(b)c - * a(b) - * ``` - * - * @param {Effects} effects - * Context. - * @param {State} ok - * State switched to when successful. - * @param {State} nok - * State switched to when unsuccessful. - * @param {TokenType} type - * Type for whole (`` or `b`). - * @param {TokenType} literalType - * Type when enclosed (``). - * @param {TokenType} literalMarkerType - * Type for enclosing (`<` and `>`). - * @param {TokenType} rawType - * Type when not enclosed (`b`). - * @param {TokenType} stringType - * Type for the value (`a` or `b`). - * @param {number | undefined} [max=Infinity] - * Depth of nested parens (inclusive). - * @returns {State} - * Start state. - */ // eslint-disable-next-line max-params -function factoryDestination( - effects, - ok, - nok, - type, - literalType, - literalMarkerType, - rawType, - stringType, - max -) { - const limit = max || Number.POSITIVE_INFINITY - let balance = 0 - return start - - /** - * Start of destination. - * - * ```markdown - * > | - * ^ - * > | aa - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - if (code === 60) { - effects.enter(type) - effects.enter(literalType) - effects.enter(literalMarkerType) - effects.consume(code) - effects.exit(literalMarkerType) - return enclosedBefore - } - - // ASCII control, space, closing paren. - if (code === null || code === 32 || code === 41 || asciiControl(code)) { - return nok(code) - } - effects.enter(type) - effects.enter(rawType) - effects.enter(stringType) - effects.enter('chunkString', { - contentType: 'string' - }) - return raw(code) - } - - /** - * After `<`, at an enclosed destination. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function enclosedBefore(code) { - if (code === 62) { - effects.enter(literalMarkerType) - effects.consume(code) - effects.exit(literalMarkerType) - effects.exit(literalType) - effects.exit(type) - return ok - } - effects.enter(stringType) - effects.enter('chunkString', { - contentType: 'string' - }) - return enclosed(code) - } - - /** - * In enclosed destination. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function enclosed(code) { - if (code === 62) { - effects.exit('chunkString') - effects.exit(stringType) - return enclosedBefore(code) - } - if (code === null || code === 60 || markdownLineEnding(code)) { - return nok(code) - } - effects.consume(code) - return code === 92 ? enclosedEscape : enclosed - } - - /** - * After `\`, at a special character. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function enclosedEscape(code) { - if (code === 60 || code === 62 || code === 92) { - effects.consume(code) - return enclosed - } - return enclosed(code) - } - - /** - * In raw destination. - * - * ```markdown - * > | aa - * ^ - * ``` - * - * @type {State} - */ - function raw(code) { - if ( - !balance && - (code === null || code === 41 || markdownLineEndingOrSpace(code)) - ) { - effects.exit('chunkString') - effects.exit(stringType) - effects.exit(rawType) - effects.exit(type) - return ok(code) - } - if (balance < limit && code === 40) { - effects.consume(code) - balance++ - return raw - } - if (code === 41) { - effects.consume(code) - balance-- - return raw - } - - // ASCII control (but *not* `\0`) and space and `(`. - // Note: in `markdown-rs`, `\0` exists in codes, in `micromark-js` it - // doesn’t. - if (code === null || code === 32 || code === 40 || asciiControl(code)) { - return nok(code) - } - effects.consume(code) - return code === 92 ? rawEscape : raw - } - - /** - * After `\`, at special character. - * - * ```markdown - * > | a\*a - * ^ - * ``` - * - * @type {State} - */ - function rawEscape(code) { - if (code === 40 || code === 41 || code === 92) { - effects.consume(code) - return raw - } - return raw(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-label/index.js -/** - * @typedef {import('micromark-util-types').Effects} Effects - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').TokenType} TokenType - */ - - -/** - * Parse labels. - * - * > 👉 **Note**: labels in markdown are capped at 999 characters in the string. - * - * ###### Examples - * - * ```markdown - * [a] - * [a - * b] - * [a\]b] - * ``` - * - * @this {TokenizeContext} - * Tokenize context. - * @param {Effects} effects - * Context. - * @param {State} ok - * State switched to when successful. - * @param {State} nok - * State switched to when unsuccessful. - * @param {TokenType} type - * Type of the whole label (`[a]`). - * @param {TokenType} markerType - * Type for the markers (`[` and `]`). - * @param {TokenType} stringType - * Type for the identifier (`a`). - * @returns {State} - * Start state. - */ // eslint-disable-next-line max-params -function factoryLabel(effects, ok, nok, type, markerType, stringType) { - const self = this - let size = 0 - /** @type {boolean} */ - let seen - return start - - /** - * Start of label. - * - * ```markdown - * > | [a] - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter(type) - effects.enter(markerType) - effects.consume(code) - effects.exit(markerType) - effects.enter(stringType) - return atBreak - } - - /** - * In label, at something, before something else. - * - * ```markdown - * > | [a] - * ^ - * ``` - * - * @type {State} - */ - function atBreak(code) { - if ( - size > 999 || - code === null || - code === 91 || - (code === 93 && !seen) || - // To do: remove in the future once we’ve switched from - // `micromark-extension-footnote` to `micromark-extension-gfm-footnote`, - // which doesn’t need this. - // Hidden footnotes hook. - /* c8 ignore next 3 */ - (code === 94 && - !size && - '_hiddenFootnoteSupport' in self.parser.constructs) - ) { - return nok(code) - } - if (code === 93) { - effects.exit(stringType) - effects.enter(markerType) - effects.consume(code) - effects.exit(markerType) - effects.exit(type) - return ok - } - - // To do: indent? Link chunks and EOLs together? - if (markdownLineEnding(code)) { - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return atBreak - } - effects.enter('chunkString', { - contentType: 'string' - }) - return labelInside(code) - } - - /** - * In label, in text. - * - * ```markdown - * > | [a] - * ^ - * ``` - * - * @type {State} - */ - function labelInside(code) { - if ( - code === null || - code === 91 || - code === 93 || - markdownLineEnding(code) || - size++ > 999 - ) { - effects.exit('chunkString') - return atBreak(code) - } - effects.consume(code) - if (!seen) seen = !markdownSpace(code) - return code === 92 ? labelEscape : labelInside - } - - /** - * After `\`, at a special character. - * - * ```markdown - * > | [a\*a] - * ^ - * ``` - * - * @type {State} - */ - function labelEscape(code) { - if (code === 91 || code === 92 || code === 93) { - effects.consume(code) - size++ - return labelInside - } - return labelInside(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-title/index.js -/** - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Effects} Effects - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenType} TokenType - */ - - - -/** - * Parse titles. - * - * ###### Examples - * - * ```markdown - * "a" - * 'b' - * (c) - * "a - * b" - * 'a - * b' - * (a\)b) - * ``` - * - * @param {Effects} effects - * Context. - * @param {State} ok - * State switched to when successful. - * @param {State} nok - * State switched to when unsuccessful. - * @param {TokenType} type - * Type of the whole title (`"a"`, `'b'`, `(c)`). - * @param {TokenType} markerType - * Type for the markers (`"`, `'`, `(`, and `)`). - * @param {TokenType} stringType - * Type for the value (`a`). - * @returns {State} - * Start state. - */ // eslint-disable-next-line max-params -function factoryTitle(effects, ok, nok, type, markerType, stringType) { - /** @type {NonNullable} */ - let marker - return start - - /** - * Start of title. - * - * ```markdown - * > | "a" - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - if (code === 34 || code === 39 || code === 40) { - effects.enter(type) - effects.enter(markerType) - effects.consume(code) - effects.exit(markerType) - marker = code === 40 ? 41 : code - return begin - } - return nok(code) - } - - /** - * After opening marker. - * - * This is also used at the closing marker. - * - * ```markdown - * > | "a" - * ^ - * ``` - * - * @type {State} - */ - function begin(code) { - if (code === marker) { - effects.enter(markerType) - effects.consume(code) - effects.exit(markerType) - effects.exit(type) - return ok - } - effects.enter(stringType) - return atBreak(code) - } - - /** - * At something, before something else. - * - * ```markdown - * > | "a" - * ^ - * ``` - * - * @type {State} - */ - function atBreak(code) { - if (code === marker) { - effects.exit(stringType) - return begin(marker) - } - if (code === null) { - return nok(code) - } - - // Note: blank lines can’t exist in content. - if (markdownLineEnding(code)) { - // To do: use `space_or_tab_eol_with_options`, connect. - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return factorySpace(effects, atBreak, 'linePrefix') - } - effects.enter('chunkString', { - contentType: 'string' - }) - return inside(code) - } - - /** - * - * - * @type {State} - */ - function inside(code) { - if (code === marker || code === null || markdownLineEnding(code)) { - effects.exit('chunkString') - return atBreak(code) - } - effects.consume(code) - return code === 92 ? escape : inside - } - - /** - * After `\`, at a special character. - * - * ```markdown - * > | "a\*b" - * ^ - * ``` - * - * @type {State} - */ - function escape(code) { - if (code === marker || code === 92) { - effects.consume(code) - return inside - } - return inside(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-whitespace/index.js -/** - * @typedef {import('micromark-util-types').Effects} Effects - * @typedef {import('micromark-util-types').State} State - */ - - - -/** - * Parse spaces and tabs. - * - * There is no `nok` parameter: - * - * * line endings or spaces in markdown are often optional, in which case this - * factory can be used and `ok` will be switched to whether spaces were found - * or not - * * one line ending or space can be detected with - * `markdownLineEndingOrSpace(code)` right before using `factoryWhitespace` - * - * @param {Effects} effects - * Context. - * @param {State} ok - * State switched to when successful. - * @returns - * Start state. - */ -function factoryWhitespace(effects, ok) { - /** @type {boolean} */ - let seen - return start - - /** @type {State} */ - function start(code) { - if (markdownLineEnding(code)) { - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - seen = true - return start - } - if (markdownSpace(code)) { - return factorySpace( - effects, - start, - seen ? 'linePrefix' : 'lineSuffix' - )(code) - } - return ok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-normalize-identifier/index.js -/** - * Normalize an identifier (as found in references, definitions). - * - * Collapses markdown whitespace, trim, and then lower- and uppercase. - * - * Some characters are considered “uppercase”, such as U+03F4 (`ϴ`), but if their - * lowercase counterpart (U+03B8 (`θ`)) is uppercased will result in a different - * uppercase character (U+0398 (`Θ`)). - * So, to get a canonical form, we perform both lower- and uppercase. - * - * Using uppercase last makes sure keys will never interact with default - * prototypal values (such as `constructor`): nothing in the prototype of - * `Object` is uppercase. - * - * @param {string} value - * Identifier to normalize. - * @returns {string} - * Normalized identifier. - */ -function normalizeIdentifier(value) { - return ( - value - // Collapse markdown whitespace. - .replace(/[\t\n\r ]+/g, ' ') - // Trim. - .replace(/^ | $/g, '') - // Some characters are considered “uppercase”, but if their lowercase - // counterpart is uppercased will result in a different uppercase - // character. - // Hence, to get that form, we perform both lower- and uppercase. - // Upper case makes sure keys will not interact with default prototypal - // methods: no method is uppercase. - .toLowerCase() - .toUpperCase() - ) -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/definition.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - - - - - - -/** @type {Construct} */ -const definition = { - name: 'definition', - tokenize: tokenizeDefinition -} - -/** @type {Construct} */ -const titleBefore = { - tokenize: tokenizeTitleBefore, - partial: true -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeDefinition(effects, ok, nok) { - const self = this - /** @type {string} */ - let identifier - return start - - /** - * At start of a definition. - * - * ```markdown - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - // Do not interrupt paragraphs (but do follow definitions). - // To do: do `interrupt` the way `markdown-rs` does. - // To do: parse whitespace the way `markdown-rs` does. - effects.enter('definition') - return before(code) - } - - /** - * After optional whitespace, at `[`. - * - * ```markdown - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function before(code) { - // To do: parse whitespace the way `markdown-rs` does. - - return factoryLabel.call( - self, - effects, - labelAfter, - // Note: we don’t need to reset the way `markdown-rs` does. - nok, - 'definitionLabel', - 'definitionLabelMarker', - 'definitionLabelString' - )(code) - } - - /** - * After label. - * - * ```markdown - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function labelAfter(code) { - identifier = normalizeIdentifier( - self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1) - ) - if (code === 58) { - effects.enter('definitionMarker') - effects.consume(code) - effects.exit('definitionMarker') - return markerAfter - } - return nok(code) - } - - /** - * After marker. - * - * ```markdown - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function markerAfter(code) { - // Note: whitespace is optional. - return markdownLineEndingOrSpace(code) - ? factoryWhitespace(effects, destinationBefore)(code) - : destinationBefore(code) - } - - /** - * Before destination. - * - * ```markdown - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function destinationBefore(code) { - return factoryDestination( - effects, - destinationAfter, - // Note: we don’t need to reset the way `markdown-rs` does. - nok, - 'definitionDestination', - 'definitionDestinationLiteral', - 'definitionDestinationLiteralMarker', - 'definitionDestinationRaw', - 'definitionDestinationString' - )(code) - } - - /** - * After destination. - * - * ```markdown - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function destinationAfter(code) { - return effects.attempt(titleBefore, after, after)(code) - } - - /** - * After definition. - * - * ```markdown - * > | [a]: b - * ^ - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function after(code) { - return markdownSpace(code) - ? factorySpace(effects, afterWhitespace, 'whitespace')(code) - : afterWhitespace(code) - } - - /** - * After definition, after optional whitespace. - * - * ```markdown - * > | [a]: b - * ^ - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function afterWhitespace(code) { - if (code === null || markdownLineEnding(code)) { - effects.exit('definition') - - // Note: we don’t care about uniqueness. - // It’s likely that that doesn’t happen very frequently. - // It is more likely that it wastes precious time. - self.parser.defined.push(identifier) - - // To do: `markdown-rs` interrupt. - // // You’d be interrupting. - // tokenizer.interrupt = true - return ok(code) - } - return nok(code) - } -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeTitleBefore(effects, ok, nok) { - return titleBefore - - /** - * After destination, at whitespace. - * - * ```markdown - * > | [a]: b - * ^ - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function titleBefore(code) { - return markdownLineEndingOrSpace(code) - ? factoryWhitespace(effects, beforeMarker)(code) - : nok(code) - } - - /** - * At title. - * - * ```markdown - * | [a]: b - * > | "c" - * ^ - * ``` - * - * @type {State} - */ - function beforeMarker(code) { - return factoryTitle( - effects, - titleAfter, - nok, - 'definitionTitle', - 'definitionTitleMarker', - 'definitionTitleString' - )(code) - } - - /** - * After title. - * - * ```markdown - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function titleAfter(code) { - return markdownSpace(code) - ? factorySpace(effects, titleAfterOptionalWhitespace, 'whitespace')(code) - : titleAfterOptionalWhitespace(code) - } - - /** - * After title, after optional whitespace. - * - * ```markdown - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function titleAfterOptionalWhitespace(code) { - return code === null || markdownLineEnding(code) ? ok(code) : nok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/code-indented.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const codeIndented = { - name: 'codeIndented', - tokenize: tokenizeCodeIndented -} - -/** @type {Construct} */ -const furtherStart = { - tokenize: tokenizeFurtherStart, - partial: true -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeCodeIndented(effects, ok, nok) { - const self = this - return start - - /** - * Start of code (indented). - * - * > **Parsing note**: it is not needed to check if this first line is a - * > filled line (that it has a non-whitespace character), because blank lines - * > are parsed already, so we never run into that. - * - * ```markdown - * > | aaa - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - // To do: manually check if interrupting like `markdown-rs`. - - effects.enter('codeIndented') - // To do: use an improved `space_or_tab` function like `markdown-rs`, - // so that we can drop the next state. - return factorySpace(effects, afterPrefix, 'linePrefix', 4 + 1)(code) - } - - /** - * At start, after 1 or 4 spaces. - * - * ```markdown - * > | aaa - * ^ - * ``` - * - * @type {State} - */ - function afterPrefix(code) { - const tail = self.events[self.events.length - 1] - return tail && - tail[1].type === 'linePrefix' && - tail[2].sliceSerialize(tail[1], true).length >= 4 - ? atBreak(code) - : nok(code) - } - - /** - * At a break. - * - * ```markdown - * > | aaa - * ^ ^ - * ``` - * - * @type {State} - */ - function atBreak(code) { - if (code === null) { - return after(code) - } - if (markdownLineEnding(code)) { - return effects.attempt(furtherStart, atBreak, after)(code) - } - effects.enter('codeFlowValue') - return inside(code) - } - - /** - * In code content. - * - * ```markdown - * > | aaa - * ^^^^ - * ``` - * - * @type {State} - */ - function inside(code) { - if (code === null || markdownLineEnding(code)) { - effects.exit('codeFlowValue') - return atBreak(code) - } - effects.consume(code) - return inside - } - - /** @type {State} */ - function after(code) { - effects.exit('codeIndented') - // To do: allow interrupting like `markdown-rs`. - // Feel free to interrupt. - // tokenizer.interrupt = false - return ok(code) - } -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeFurtherStart(effects, ok, nok) { - const self = this - return furtherStart - - /** - * At eol, trying to parse another indent. - * - * ```markdown - * > | aaa - * ^ - * | bbb - * ``` - * - * @type {State} - */ - function furtherStart(code) { - // To do: improve `lazy` / `pierce` handling. - // If this is a lazy line, it can’t be code. - if (self.parser.lazy[self.now().line]) { - return nok(code) - } - if (markdownLineEnding(code)) { - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return furtherStart - } - - // To do: the code here in `micromark-js` is a bit different from - // `markdown-rs` because there it can attempt spaces. - // We can’t yet. - // - // To do: use an improved `space_or_tab` function like `markdown-rs`, - // so that we can drop the next state. - return factorySpace(effects, afterPrefix, 'linePrefix', 4 + 1)(code) - } - - /** - * At start, after 1 or 4 spaces. - * - * ```markdown - * > | aaa - * ^ - * ``` - * - * @type {State} - */ - function afterPrefix(code) { - const tail = self.events[self.events.length - 1] - return tail && - tail[1].type === 'linePrefix' && - tail[2].sliceSerialize(tail[1], true).length >= 4 - ? ok(code) - : markdownLineEnding(code) - ? furtherStart(code) - : nok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/heading-atx.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').Resolver} Resolver - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').Token} Token - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - - -/** @type {Construct} */ -const headingAtx = { - name: 'headingAtx', - tokenize: tokenizeHeadingAtx, - resolve: resolveHeadingAtx -} - -/** @type {Resolver} */ -function resolveHeadingAtx(events, context) { - let contentEnd = events.length - 2 - let contentStart = 3 - /** @type {Token} */ - let content - /** @type {Token} */ - let text - - // Prefix whitespace, part of the opening. - if (events[contentStart][1].type === 'whitespace') { - contentStart += 2 - } - - // Suffix whitespace, part of the closing. - if ( - contentEnd - 2 > contentStart && - events[contentEnd][1].type === 'whitespace' - ) { - contentEnd -= 2 - } - if ( - events[contentEnd][1].type === 'atxHeadingSequence' && - (contentStart === contentEnd - 1 || - (contentEnd - 4 > contentStart && - events[contentEnd - 2][1].type === 'whitespace')) - ) { - contentEnd -= contentStart + 1 === contentEnd ? 2 : 4 - } - if (contentEnd > contentStart) { - content = { - type: 'atxHeadingText', - start: events[contentStart][1].start, - end: events[contentEnd][1].end - } - text = { - type: 'chunkText', - start: events[contentStart][1].start, - end: events[contentEnd][1].end, - contentType: 'text' - } - splice(events, contentStart, contentEnd - contentStart + 1, [ - ['enter', content, context], - ['enter', text, context], - ['exit', text, context], - ['exit', content, context] - ]) - } - return events -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeHeadingAtx(effects, ok, nok) { - let size = 0 - return start - - /** - * Start of a heading (atx). - * - * ```markdown - * > | ## aa - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - // To do: parse indent like `markdown-rs`. - effects.enter('atxHeading') - return before(code) - } - - /** - * After optional whitespace, at `#`. - * - * ```markdown - * > | ## aa - * ^ - * ``` - * - * @type {State} - */ - function before(code) { - effects.enter('atxHeadingSequence') - return sequenceOpen(code) - } - - /** - * In opening sequence. - * - * ```markdown - * > | ## aa - * ^ - * ``` - * - * @type {State} - */ - function sequenceOpen(code) { - if (code === 35 && size++ < 6) { - effects.consume(code) - return sequenceOpen - } - - // Always at least one `#`. - if (code === null || markdownLineEndingOrSpace(code)) { - effects.exit('atxHeadingSequence') - return atBreak(code) - } - return nok(code) - } - - /** - * After something, before something else. - * - * ```markdown - * > | ## aa - * ^ - * ``` - * - * @type {State} - */ - function atBreak(code) { - if (code === 35) { - effects.enter('atxHeadingSequence') - return sequenceFurther(code) - } - if (code === null || markdownLineEnding(code)) { - effects.exit('atxHeading') - // To do: interrupt like `markdown-rs`. - // // Feel free to interrupt. - // tokenizer.interrupt = false - return ok(code) - } - if (markdownSpace(code)) { - return factorySpace(effects, atBreak, 'whitespace')(code) - } - - // To do: generate `data` tokens, add the `text` token later. - // Needs edit map, see: `markdown.rs`. - effects.enter('atxHeadingText') - return data(code) - } - - /** - * In further sequence (after whitespace). - * - * Could be normal “visible” hashes in the heading or a final sequence. - * - * ```markdown - * > | ## aa ## - * ^ - * ``` - * - * @type {State} - */ - function sequenceFurther(code) { - if (code === 35) { - effects.consume(code) - return sequenceFurther - } - effects.exit('atxHeadingSequence') - return atBreak(code) - } - - /** - * In text. - * - * ```markdown - * > | ## aa - * ^ - * ``` - * - * @type {State} - */ - function data(code) { - if (code === null || code === 35 || markdownLineEndingOrSpace(code)) { - effects.exit('atxHeadingText') - return atBreak(code) - } - effects.consume(code) - return data - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/setext-underline.js -/** - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').Resolver} Resolver - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const setextUnderline = { - name: 'setextUnderline', - tokenize: tokenizeSetextUnderline, - resolveTo: resolveToSetextUnderline -} - -/** @type {Resolver} */ -function resolveToSetextUnderline(events, context) { - // To do: resolve like `markdown-rs`. - let index = events.length - /** @type {number | undefined} */ - let content - /** @type {number | undefined} */ - let text - /** @type {number | undefined} */ - let definition - - // Find the opening of the content. - // It’ll always exist: we don’t tokenize if it isn’t there. - while (index--) { - if (events[index][0] === 'enter') { - if (events[index][1].type === 'content') { - content = index - break - } - if (events[index][1].type === 'paragraph') { - text = index - } - } - // Exit - else { - if (events[index][1].type === 'content') { - // Remove the content end (if needed we’ll add it later) - events.splice(index, 1) - } - if (!definition && events[index][1].type === 'definition') { - definition = index - } - } - } - const heading = { - type: 'setextHeading', - start: Object.assign({}, events[text][1].start), - end: Object.assign({}, events[events.length - 1][1].end) - } - - // Change the paragraph to setext heading text. - events[text][1].type = 'setextHeadingText' - - // If we have definitions in the content, we’ll keep on having content, - // but we need move it. - if (definition) { - events.splice(text, 0, ['enter', heading, context]) - events.splice(definition + 1, 0, ['exit', events[content][1], context]) - events[content][1].end = Object.assign({}, events[definition][1].end) - } else { - events[content][1] = heading - } - - // Add the heading exit at the end. - events.push(['exit', heading, context]) - return events -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeSetextUnderline(effects, ok, nok) { - const self = this - /** @type {NonNullable} */ - let marker - return start - - /** - * At start of heading (setext) underline. - * - * ```markdown - * | aa - * > | == - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - let index = self.events.length - /** @type {boolean | undefined} */ - let paragraph - // Find an opening. - while (index--) { - // Skip enter/exit of line ending, line prefix, and content. - // We can now either have a definition or a paragraph. - if ( - self.events[index][1].type !== 'lineEnding' && - self.events[index][1].type !== 'linePrefix' && - self.events[index][1].type !== 'content' - ) { - paragraph = self.events[index][1].type === 'paragraph' - break - } - } - - // To do: handle lazy/pierce like `markdown-rs`. - // To do: parse indent like `markdown-rs`. - if (!self.parser.lazy[self.now().line] && (self.interrupt || paragraph)) { - effects.enter('setextHeadingLine') - marker = code - return before(code) - } - return nok(code) - } - - /** - * After optional whitespace, at `-` or `=`. - * - * ```markdown - * | aa - * > | == - * ^ - * ``` - * - * @type {State} - */ - function before(code) { - effects.enter('setextHeadingLineSequence') - return inside(code) - } - - /** - * In sequence. - * - * ```markdown - * | aa - * > | == - * ^ - * ``` - * - * @type {State} - */ - function inside(code) { - if (code === marker) { - effects.consume(code) - return inside - } - effects.exit('setextHeadingLineSequence') - return markdownSpace(code) - ? factorySpace(effects, after, 'lineSuffix')(code) - : after(code) - } - - /** - * After sequence, after optional whitespace. - * - * ```markdown - * | aa - * > | == - * ^ - * ``` - * - * @type {State} - */ - function after(code) { - if (code === null || markdownLineEnding(code)) { - effects.exit('setextHeadingLine') - return ok(code) - } - return nok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-html-tag-name/index.js -/** - * List of lowercase HTML “block” tag names. - * - * The list, when parsing HTML (flow), results in more relaxed rules (condition - * 6). - * Because they are known blocks, the HTML-like syntax doesn’t have to be - * strictly parsed. - * For tag names not in this list, a more strict algorithm (condition 7) is used - * to detect whether the HTML-like syntax is seen as HTML (flow) or not. - * - * This is copied from: - * . - * - * > 👉 **Note**: `search` was added in `CommonMark@0.31`. - */ -const htmlBlockNames = [ - 'address', - 'article', - 'aside', - 'base', - 'basefont', - 'blockquote', - 'body', - 'caption', - 'center', - 'col', - 'colgroup', - 'dd', - 'details', - 'dialog', - 'dir', - 'div', - 'dl', - 'dt', - 'fieldset', - 'figcaption', - 'figure', - 'footer', - 'form', - 'frame', - 'frameset', - 'h1', - 'h2', - 'h3', - 'h4', - 'h5', - 'h6', - 'head', - 'header', - 'hr', - 'html', - 'iframe', - 'legend', - 'li', - 'link', - 'main', - 'menu', - 'menuitem', - 'nav', - 'noframes', - 'ol', - 'optgroup', - 'option', - 'p', - 'param', - 'search', - 'section', - 'summary', - 'table', - 'tbody', - 'td', - 'tfoot', - 'th', - 'thead', - 'title', - 'tr', - 'track', - 'ul' -] - -/** - * List of lowercase HTML “raw” tag names. - * - * The list, when parsing HTML (flow), results in HTML that can include lines - * without exiting, until a closing tag also in this list is found (condition - * 1). - * - * This module is copied from: - * . - * - * > 👉 **Note**: `textarea` was added in `CommonMark@0.30`. - */ -const htmlRawNames = ['pre', 'script', 'style', 'textarea'] - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/html-flow.js -/** - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').Resolver} Resolver - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - - - -/** @type {Construct} */ -const htmlFlow = { - name: 'htmlFlow', - tokenize: tokenizeHtmlFlow, - resolveTo: resolveToHtmlFlow, - concrete: true -} - -/** @type {Construct} */ -const blankLineBefore = { - tokenize: tokenizeBlankLineBefore, - partial: true -} -const nonLazyContinuationStart = { - tokenize: tokenizeNonLazyContinuationStart, - partial: true -} - -/** @type {Resolver} */ -function resolveToHtmlFlow(events) { - let index = events.length - while (index--) { - if (events[index][0] === 'enter' && events[index][1].type === 'htmlFlow') { - break - } - } - if (index > 1 && events[index - 2][1].type === 'linePrefix') { - // Add the prefix start to the HTML token. - events[index][1].start = events[index - 2][1].start - // Add the prefix start to the HTML line token. - events[index + 1][1].start = events[index - 2][1].start - // Remove the line prefix. - events.splice(index - 2, 2) - } - return events -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeHtmlFlow(effects, ok, nok) { - const self = this - /** @type {number} */ - let marker - /** @type {boolean} */ - let closingTag - /** @type {string} */ - let buffer - /** @type {number} */ - let index - /** @type {Code} */ - let markerB - return start - - /** - * Start of HTML (flow). - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - // To do: parse indent like `markdown-rs`. - return before(code) - } - - /** - * At `<`, after optional whitespace. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function before(code) { - effects.enter('htmlFlow') - effects.enter('htmlFlowData') - effects.consume(code) - return open - } - - /** - * After `<`, at tag name or other stuff. - * - * ```markdown - * > | - * ^ - * > | - * ^ - * > | - * ^ - * ``` - * - * @type {State} - */ - function open(code) { - if (code === 33) { - effects.consume(code) - return declarationOpen - } - if (code === 47) { - effects.consume(code) - closingTag = true - return tagCloseStart - } - if (code === 63) { - effects.consume(code) - marker = 3 - // To do: - // tokenizer.concrete = true - // To do: use `markdown-rs` style interrupt. - // While we’re in an instruction instead of a declaration, we’re on a `?` - // right now, so we do need to search for `>`, similar to declarations. - return self.interrupt ? ok : continuationDeclarationInside - } - - // ASCII alphabetical. - if (asciiAlpha(code)) { - effects.consume(code) - // @ts-expect-error: not null. - buffer = String.fromCharCode(code) - return tagName - } - return nok(code) - } - - /** - * After ` | - * ^ - * > | - * ^ - * > | &<]]> - * ^ - * ``` - * - * @type {State} - */ - function declarationOpen(code) { - if (code === 45) { - effects.consume(code) - marker = 2 - return commentOpenInside - } - if (code === 91) { - effects.consume(code) - marker = 5 - index = 0 - return cdataOpenInside - } - - // ASCII alphabetical. - if (asciiAlpha(code)) { - effects.consume(code) - marker = 4 - // // Do not form containers. - // tokenizer.concrete = true - return self.interrupt ? ok : continuationDeclarationInside - } - return nok(code) - } - - /** - * After ` | - * ^ - * ``` - * - * @type {State} - */ - function commentOpenInside(code) { - if (code === 45) { - effects.consume(code) - // // Do not form containers. - // tokenizer.concrete = true - return self.interrupt ? ok : continuationDeclarationInside - } - return nok(code) - } - - /** - * After ` | &<]]> - * ^^^^^^ - * ``` - * - * @type {State} - */ - function cdataOpenInside(code) { - const value = 'CDATA[' - if (code === value.charCodeAt(index++)) { - effects.consume(code) - if (index === value.length) { - // // Do not form containers. - // tokenizer.concrete = true - return self.interrupt ? ok : continuation - } - return cdataOpenInside - } - return nok(code) - } - - /** - * After ` | - * ^ - * ``` - * - * @type {State} - */ - function tagCloseStart(code) { - if (asciiAlpha(code)) { - effects.consume(code) - // @ts-expect-error: not null. - buffer = String.fromCharCode(code) - return tagName - } - return nok(code) - } - - /** - * In tag name. - * - * ```markdown - * > | - * ^^ - * > | - * ^^ - * ``` - * - * @type {State} - */ - function tagName(code) { - if ( - code === null || - code === 47 || - code === 62 || - markdownLineEndingOrSpace(code) - ) { - const slash = code === 47 - const name = buffer.toLowerCase() - if (!slash && !closingTag && htmlRawNames.includes(name)) { - marker = 1 - // // Do not form containers. - // tokenizer.concrete = true - return self.interrupt ? ok(code) : continuation(code) - } - if (htmlBlockNames.includes(buffer.toLowerCase())) { - marker = 6 - if (slash) { - effects.consume(code) - return basicSelfClosing - } - - // // Do not form containers. - // tokenizer.concrete = true - return self.interrupt ? ok(code) : continuation(code) - } - marker = 7 - // Do not support complete HTML when interrupting. - return self.interrupt && !self.parser.lazy[self.now().line] - ? nok(code) - : closingTag - ? completeClosingTagAfter(code) - : completeAttributeNameBefore(code) - } - - // ASCII alphanumerical and `-`. - if (code === 45 || asciiAlphanumeric(code)) { - effects.consume(code) - buffer += String.fromCharCode(code) - return tagName - } - return nok(code) - } - - /** - * After closing slash of a basic tag name. - * - * ```markdown - * > |
    - * ^ - * ``` - * - * @type {State} - */ - function basicSelfClosing(code) { - if (code === 62) { - effects.consume(code) - // // Do not form containers. - // tokenizer.concrete = true - return self.interrupt ? ok : continuation - } - return nok(code) - } - - /** - * After closing slash of a complete tag name. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function completeClosingTagAfter(code) { - if (markdownSpace(code)) { - effects.consume(code) - return completeClosingTagAfter - } - return completeEnd(code) - } - - /** - * At an attribute name. - * - * At first, this state is used after a complete tag name, after whitespace, - * where it expects optional attributes or the end of the tag. - * It is also reused after attributes, when expecting more optional - * attributes. - * - * ```markdown - * > | - * ^ - * > | - * ^ - * > | - * ^ - * > | - * ^ - * > | - * ^ - * ``` - * - * @type {State} - */ - function completeAttributeNameBefore(code) { - if (code === 47) { - effects.consume(code) - return completeEnd - } - - // ASCII alphanumerical and `:` and `_`. - if (code === 58 || code === 95 || asciiAlpha(code)) { - effects.consume(code) - return completeAttributeName - } - if (markdownSpace(code)) { - effects.consume(code) - return completeAttributeNameBefore - } - return completeEnd(code) - } - - /** - * In attribute name. - * - * ```markdown - * > | - * ^ - * > | - * ^ - * > | - * ^ - * ``` - * - * @type {State} - */ - function completeAttributeName(code) { - // ASCII alphanumerical and `-`, `.`, `:`, and `_`. - if ( - code === 45 || - code === 46 || - code === 58 || - code === 95 || - asciiAlphanumeric(code) - ) { - effects.consume(code) - return completeAttributeName - } - return completeAttributeNameAfter(code) - } - - /** - * After attribute name, at an optional initializer, the end of the tag, or - * whitespace. - * - * ```markdown - * > | - * ^ - * > | - * ^ - * ``` - * - * @type {State} - */ - function completeAttributeNameAfter(code) { - if (code === 61) { - effects.consume(code) - return completeAttributeValueBefore - } - if (markdownSpace(code)) { - effects.consume(code) - return completeAttributeNameAfter - } - return completeAttributeNameBefore(code) - } - - /** - * Before unquoted, double quoted, or single quoted attribute value, allowing - * whitespace. - * - * ```markdown - * > | - * ^ - * > | - * ^ - * ``` - * - * @type {State} - */ - function completeAttributeValueBefore(code) { - if ( - code === null || - code === 60 || - code === 61 || - code === 62 || - code === 96 - ) { - return nok(code) - } - if (code === 34 || code === 39) { - effects.consume(code) - markerB = code - return completeAttributeValueQuoted - } - if (markdownSpace(code)) { - effects.consume(code) - return completeAttributeValueBefore - } - return completeAttributeValueUnquoted(code) - } - - /** - * In double or single quoted attribute value. - * - * ```markdown - * > | - * ^ - * > | - * ^ - * ``` - * - * @type {State} - */ - function completeAttributeValueQuoted(code) { - if (code === markerB) { - effects.consume(code) - markerB = null - return completeAttributeValueQuotedAfter - } - if (code === null || markdownLineEnding(code)) { - return nok(code) - } - effects.consume(code) - return completeAttributeValueQuoted - } - - /** - * In unquoted attribute value. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function completeAttributeValueUnquoted(code) { - if ( - code === null || - code === 34 || - code === 39 || - code === 47 || - code === 60 || - code === 61 || - code === 62 || - code === 96 || - markdownLineEndingOrSpace(code) - ) { - return completeAttributeNameAfter(code) - } - effects.consume(code) - return completeAttributeValueUnquoted - } - - /** - * After double or single quoted attribute value, before whitespace or the - * end of the tag. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function completeAttributeValueQuotedAfter(code) { - if (code === 47 || code === 62 || markdownSpace(code)) { - return completeAttributeNameBefore(code) - } - return nok(code) - } - - /** - * In certain circumstances of a complete tag where only an `>` is allowed. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function completeEnd(code) { - if (code === 62) { - effects.consume(code) - return completeAfter - } - return nok(code) - } - - /** - * After `>` in a complete tag. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function completeAfter(code) { - if (code === null || markdownLineEnding(code)) { - // // Do not form containers. - // tokenizer.concrete = true - return continuation(code) - } - if (markdownSpace(code)) { - effects.consume(code) - return completeAfter - } - return nok(code) - } - - /** - * In continuation of any HTML kind. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function continuation(code) { - if (code === 45 && marker === 2) { - effects.consume(code) - return continuationCommentInside - } - if (code === 60 && marker === 1) { - effects.consume(code) - return continuationRawTagOpen - } - if (code === 62 && marker === 4) { - effects.consume(code) - return continuationClose - } - if (code === 63 && marker === 3) { - effects.consume(code) - return continuationDeclarationInside - } - if (code === 93 && marker === 5) { - effects.consume(code) - return continuationCdataInside - } - if (markdownLineEnding(code) && (marker === 6 || marker === 7)) { - effects.exit('htmlFlowData') - return effects.check( - blankLineBefore, - continuationAfter, - continuationStart - )(code) - } - if (code === null || markdownLineEnding(code)) { - effects.exit('htmlFlowData') - return continuationStart(code) - } - effects.consume(code) - return continuation - } - - /** - * In continuation, at eol. - * - * ```markdown - * > | - * ^ - * | asd - * ``` - * - * @type {State} - */ - function continuationStart(code) { - return effects.check( - nonLazyContinuationStart, - continuationStartNonLazy, - continuationAfter - )(code) - } - - /** - * In continuation, at eol, before non-lazy content. - * - * ```markdown - * > | - * ^ - * | asd - * ``` - * - * @type {State} - */ - function continuationStartNonLazy(code) { - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return continuationBefore - } - - /** - * In continuation, before non-lazy content. - * - * ```markdown - * | - * > | asd - * ^ - * ``` - * - * @type {State} - */ - function continuationBefore(code) { - if (code === null || markdownLineEnding(code)) { - return continuationStart(code) - } - effects.enter('htmlFlowData') - return continuation(code) - } - - /** - * In comment continuation, after one `-`, expecting another. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function continuationCommentInside(code) { - if (code === 45) { - effects.consume(code) - return continuationDeclarationInside - } - return continuation(code) - } - - /** - * In raw continuation, after `<`, at `/`. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function continuationRawTagOpen(code) { - if (code === 47) { - effects.consume(code) - buffer = '' - return continuationRawEndTag - } - return continuation(code) - } - - /** - * In raw continuation, after ` | - * ^^^^^^ - * ``` - * - * @type {State} - */ - function continuationRawEndTag(code) { - if (code === 62) { - const name = buffer.toLowerCase() - if (htmlRawNames.includes(name)) { - effects.consume(code) - return continuationClose - } - return continuation(code) - } - if (asciiAlpha(code) && buffer.length < 8) { - effects.consume(code) - // @ts-expect-error: not null. - buffer += String.fromCharCode(code) - return continuationRawEndTag - } - return continuation(code) - } - - /** - * In cdata continuation, after `]`, expecting `]>`. - * - * ```markdown - * > | &<]]> - * ^ - * ``` - * - * @type {State} - */ - function continuationCdataInside(code) { - if (code === 93) { - effects.consume(code) - return continuationDeclarationInside - } - return continuation(code) - } - - /** - * In declaration or instruction continuation, at `>`. - * - * ```markdown - * > | - * ^ - * > | - * ^ - * > | - * ^ - * > | - * ^ - * > | &<]]> - * ^ - * ``` - * - * @type {State} - */ - function continuationDeclarationInside(code) { - if (code === 62) { - effects.consume(code) - return continuationClose - } - - // More dashes. - if (code === 45 && marker === 2) { - effects.consume(code) - return continuationDeclarationInside - } - return continuation(code) - } - - /** - * In closed continuation: everything we get until the eol/eof is part of it. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function continuationClose(code) { - if (code === null || markdownLineEnding(code)) { - effects.exit('htmlFlowData') - return continuationAfter(code) - } - effects.consume(code) - return continuationClose - } - - /** - * Done. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function continuationAfter(code) { - effects.exit('htmlFlow') - // // Feel free to interrupt. - // tokenizer.interrupt = false - // // No longer concrete. - // tokenizer.concrete = false - return ok(code) - } -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeNonLazyContinuationStart(effects, ok, nok) { - const self = this - return start - - /** - * At eol, before continuation. - * - * ```markdown - * > | * ```js - * ^ - * | b - * ``` - * - * @type {State} - */ - function start(code) { - if (markdownLineEnding(code)) { - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return after - } - return nok(code) - } - - /** - * A continuation. - * - * ```markdown - * | * ```js - * > | b - * ^ - * ``` - * - * @type {State} - */ - function after(code) { - return self.parser.lazy[self.now().line] ? nok(code) : ok(code) - } -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeBlankLineBefore(effects, ok, nok) { - return start - - /** - * Before eol, expecting blank line. - * - * ```markdown - * > |
    - * ^ - * | - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return effects.attempt(blankLine, ok, nok) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/code-fenced.js -/** - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const nonLazyContinuation = { - tokenize: tokenizeNonLazyContinuation, - partial: true -} - -/** @type {Construct} */ -const codeFenced = { - name: 'codeFenced', - tokenize: tokenizeCodeFenced, - concrete: true -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeCodeFenced(effects, ok, nok) { - const self = this - /** @type {Construct} */ - const closeStart = { - tokenize: tokenizeCloseStart, - partial: true - } - let initialPrefix = 0 - let sizeOpen = 0 - /** @type {NonNullable} */ - let marker - return start - - /** - * Start of code. - * - * ```markdown - * > | ~~~js - * ^ - * | alert(1) - * | ~~~ - * ``` - * - * @type {State} - */ - function start(code) { - // To do: parse whitespace like `markdown-rs`. - return beforeSequenceOpen(code) - } - - /** - * In opening fence, after prefix, at sequence. - * - * ```markdown - * > | ~~~js - * ^ - * | alert(1) - * | ~~~ - * ``` - * - * @type {State} - */ - function beforeSequenceOpen(code) { - const tail = self.events[self.events.length - 1] - initialPrefix = - tail && tail[1].type === 'linePrefix' - ? tail[2].sliceSerialize(tail[1], true).length - : 0 - marker = code - effects.enter('codeFenced') - effects.enter('codeFencedFence') - effects.enter('codeFencedFenceSequence') - return sequenceOpen(code) - } - - /** - * In opening fence sequence. - * - * ```markdown - * > | ~~~js - * ^ - * | alert(1) - * | ~~~ - * ``` - * - * @type {State} - */ - function sequenceOpen(code) { - if (code === marker) { - sizeOpen++ - effects.consume(code) - return sequenceOpen - } - if (sizeOpen < 3) { - return nok(code) - } - effects.exit('codeFencedFenceSequence') - return markdownSpace(code) - ? factorySpace(effects, infoBefore, 'whitespace')(code) - : infoBefore(code) - } - - /** - * In opening fence, after the sequence (and optional whitespace), before info. - * - * ```markdown - * > | ~~~js - * ^ - * | alert(1) - * | ~~~ - * ``` - * - * @type {State} - */ - function infoBefore(code) { - if (code === null || markdownLineEnding(code)) { - effects.exit('codeFencedFence') - return self.interrupt - ? ok(code) - : effects.check(nonLazyContinuation, atNonLazyBreak, after)(code) - } - effects.enter('codeFencedFenceInfo') - effects.enter('chunkString', { - contentType: 'string' - }) - return info(code) - } - - /** - * In info. - * - * ```markdown - * > | ~~~js - * ^ - * | alert(1) - * | ~~~ - * ``` - * - * @type {State} - */ - function info(code) { - if (code === null || markdownLineEnding(code)) { - effects.exit('chunkString') - effects.exit('codeFencedFenceInfo') - return infoBefore(code) - } - if (markdownSpace(code)) { - effects.exit('chunkString') - effects.exit('codeFencedFenceInfo') - return factorySpace(effects, metaBefore, 'whitespace')(code) - } - if (code === 96 && code === marker) { - return nok(code) - } - effects.consume(code) - return info - } - - /** - * In opening fence, after info and whitespace, before meta. - * - * ```markdown - * > | ~~~js eval - * ^ - * | alert(1) - * | ~~~ - * ``` - * - * @type {State} - */ - function metaBefore(code) { - if (code === null || markdownLineEnding(code)) { - return infoBefore(code) - } - effects.enter('codeFencedFenceMeta') - effects.enter('chunkString', { - contentType: 'string' - }) - return meta(code) - } - - /** - * In meta. - * - * ```markdown - * > | ~~~js eval - * ^ - * | alert(1) - * | ~~~ - * ``` - * - * @type {State} - */ - function meta(code) { - if (code === null || markdownLineEnding(code)) { - effects.exit('chunkString') - effects.exit('codeFencedFenceMeta') - return infoBefore(code) - } - if (code === 96 && code === marker) { - return nok(code) - } - effects.consume(code) - return meta - } - - /** - * At eol/eof in code, before a non-lazy closing fence or content. - * - * ```markdown - * > | ~~~js - * ^ - * > | alert(1) - * ^ - * | ~~~ - * ``` - * - * @type {State} - */ - function atNonLazyBreak(code) { - return effects.attempt(closeStart, after, contentBefore)(code) - } - - /** - * Before code content, not a closing fence, at eol. - * - * ```markdown - * | ~~~js - * > | alert(1) - * ^ - * | ~~~ - * ``` - * - * @type {State} - */ - function contentBefore(code) { - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return contentStart - } - - /** - * Before code content, not a closing fence. - * - * ```markdown - * | ~~~js - * > | alert(1) - * ^ - * | ~~~ - * ``` - * - * @type {State} - */ - function contentStart(code) { - return initialPrefix > 0 && markdownSpace(code) - ? factorySpace( - effects, - beforeContentChunk, - 'linePrefix', - initialPrefix + 1 - )(code) - : beforeContentChunk(code) - } - - /** - * Before code content, after optional prefix. - * - * ```markdown - * | ~~~js - * > | alert(1) - * ^ - * | ~~~ - * ``` - * - * @type {State} - */ - function beforeContentChunk(code) { - if (code === null || markdownLineEnding(code)) { - return effects.check(nonLazyContinuation, atNonLazyBreak, after)(code) - } - effects.enter('codeFlowValue') - return contentChunk(code) - } - - /** - * In code content. - * - * ```markdown - * | ~~~js - * > | alert(1) - * ^^^^^^^^ - * | ~~~ - * ``` - * - * @type {State} - */ - function contentChunk(code) { - if (code === null || markdownLineEnding(code)) { - effects.exit('codeFlowValue') - return beforeContentChunk(code) - } - effects.consume(code) - return contentChunk - } - - /** - * After code. - * - * ```markdown - * | ~~~js - * | alert(1) - * > | ~~~ - * ^ - * ``` - * - * @type {State} - */ - function after(code) { - effects.exit('codeFenced') - return ok(code) - } - - /** - * @this {TokenizeContext} - * @type {Tokenizer} - */ - function tokenizeCloseStart(effects, ok, nok) { - let size = 0 - return startBefore - - /** - * - * - * @type {State} - */ - function startBefore(code) { - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return start - } - - /** - * Before closing fence, at optional whitespace. - * - * ```markdown - * | ~~~js - * | alert(1) - * > | ~~~ - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - // Always populated by defaults. - - // To do: `enter` here or in next state? - effects.enter('codeFencedFence') - return markdownSpace(code) - ? factorySpace( - effects, - beforeSequenceClose, - 'linePrefix', - self.parser.constructs.disable.null.includes('codeIndented') - ? undefined - : 4 - )(code) - : beforeSequenceClose(code) - } - - /** - * In closing fence, after optional whitespace, at sequence. - * - * ```markdown - * | ~~~js - * | alert(1) - * > | ~~~ - * ^ - * ``` - * - * @type {State} - */ - function beforeSequenceClose(code) { - if (code === marker) { - effects.enter('codeFencedFenceSequence') - return sequenceClose(code) - } - return nok(code) - } - - /** - * In closing fence sequence. - * - * ```markdown - * | ~~~js - * | alert(1) - * > | ~~~ - * ^ - * ``` - * - * @type {State} - */ - function sequenceClose(code) { - if (code === marker) { - size++ - effects.consume(code) - return sequenceClose - } - if (size >= sizeOpen) { - effects.exit('codeFencedFenceSequence') - return markdownSpace(code) - ? factorySpace(effects, sequenceCloseAfter, 'whitespace')(code) - : sequenceCloseAfter(code) - } - return nok(code) - } - - /** - * After closing fence sequence, after optional whitespace. - * - * ```markdown - * | ~~~js - * | alert(1) - * > | ~~~ - * ^ - * ``` - * - * @type {State} - */ - function sequenceCloseAfter(code) { - if (code === null || markdownLineEnding(code)) { - effects.exit('codeFencedFence') - return ok(code) - } - return nok(code) - } - } -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeNonLazyContinuation(effects, ok, nok) { - const self = this - return start - - /** - * - * - * @type {State} - */ - function start(code) { - if (code === null) { - return nok(code) - } - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return lineStart - } - - /** - * - * - * @type {State} - */ - function lineStart(code) { - return self.parser.lazy[self.now().line] ? nok(code) : ok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/character-entities/index.js -/** - * Map of named character references. - * - * @type {Record} - */ -const characterEntities = { - AElig: 'Æ', - AMP: '&', - Aacute: 'Á', - Abreve: 'Ă', - Acirc: 'Â', - Acy: 'А', - Afr: '𝔄', - Agrave: 'À', - Alpha: 'Α', - Amacr: 'Ā', - And: '⩓', - Aogon: 'Ą', - Aopf: '𝔸', - ApplyFunction: '⁡', - Aring: 'Å', - Ascr: '𝒜', - Assign: '≔', - Atilde: 'Ã', - Auml: 'Ä', - Backslash: '∖', - Barv: '⫧', - Barwed: '⌆', - Bcy: 'Б', - Because: '∵', - Bernoullis: 'ℬ', - Beta: 'Β', - Bfr: '𝔅', - Bopf: '𝔹', - Breve: '˘', - Bscr: 'ℬ', - Bumpeq: '≎', - CHcy: 'Ч', - COPY: '©', - Cacute: 'Ć', - Cap: '⋒', - CapitalDifferentialD: 'ⅅ', - Cayleys: 'ℭ', - Ccaron: 'Č', - Ccedil: 'Ç', - Ccirc: 'Ĉ', - Cconint: '∰', - Cdot: 'Ċ', - Cedilla: '¸', - CenterDot: '·', - Cfr: 'ℭ', - Chi: 'Χ', - CircleDot: '⊙', - CircleMinus: '⊖', - CirclePlus: '⊕', - CircleTimes: '⊗', - ClockwiseContourIntegral: '∲', - CloseCurlyDoubleQuote: '”', - CloseCurlyQuote: '’', - Colon: '∷', - Colone: '⩴', - Congruent: '≡', - Conint: '∯', - ContourIntegral: '∮', - Copf: 'ℂ', - Coproduct: '∐', - CounterClockwiseContourIntegral: '∳', - Cross: '⨯', - Cscr: '𝒞', - Cup: '⋓', - CupCap: '≍', - DD: 'ⅅ', - DDotrahd: '⤑', - DJcy: 'Ђ', - DScy: 'Ѕ', - DZcy: 'Џ', - Dagger: '‡', - Darr: '↡', - Dashv: '⫤', - Dcaron: 'Ď', - Dcy: 'Д', - Del: '∇', - Delta: 'Δ', - Dfr: '𝔇', - DiacriticalAcute: '´', - DiacriticalDot: '˙', - DiacriticalDoubleAcute: '˝', - DiacriticalGrave: '`', - DiacriticalTilde: '˜', - Diamond: '⋄', - DifferentialD: 'ⅆ', - Dopf: '𝔻', - Dot: '¨', - DotDot: '⃜', - DotEqual: '≐', - DoubleContourIntegral: '∯', - DoubleDot: '¨', - DoubleDownArrow: '⇓', - DoubleLeftArrow: '⇐', - DoubleLeftRightArrow: '⇔', - DoubleLeftTee: '⫤', - DoubleLongLeftArrow: '⟸', - DoubleLongLeftRightArrow: '⟺', - DoubleLongRightArrow: '⟹', - DoubleRightArrow: '⇒', - DoubleRightTee: '⊨', - DoubleUpArrow: '⇑', - DoubleUpDownArrow: '⇕', - DoubleVerticalBar: '∥', - DownArrow: '↓', - DownArrowBar: '⤓', - DownArrowUpArrow: '⇵', - DownBreve: '̑', - DownLeftRightVector: '⥐', - DownLeftTeeVector: '⥞', - DownLeftVector: '↽', - DownLeftVectorBar: '⥖', - DownRightTeeVector: '⥟', - DownRightVector: '⇁', - DownRightVectorBar: '⥗', - DownTee: '⊤', - DownTeeArrow: '↧', - Downarrow: '⇓', - Dscr: '𝒟', - Dstrok: 'Đ', - ENG: 'Ŋ', - ETH: 'Ð', - Eacute: 'É', - Ecaron: 'Ě', - Ecirc: 'Ê', - Ecy: 'Э', - Edot: 'Ė', - Efr: '𝔈', - Egrave: 'È', - Element: '∈', - Emacr: 'Ē', - EmptySmallSquare: '◻', - EmptyVerySmallSquare: '▫', - Eogon: 'Ę', - Eopf: '𝔼', - Epsilon: 'Ε', - Equal: '⩵', - EqualTilde: '≂', - Equilibrium: '⇌', - Escr: 'ℰ', - Esim: '⩳', - Eta: 'Η', - Euml: 'Ë', - Exists: '∃', - ExponentialE: 'ⅇ', - Fcy: 'Ф', - Ffr: '𝔉', - FilledSmallSquare: '◼', - FilledVerySmallSquare: '▪', - Fopf: '𝔽', - ForAll: '∀', - Fouriertrf: 'ℱ', - Fscr: 'ℱ', - GJcy: 'Ѓ', - GT: '>', - Gamma: 'Γ', - Gammad: 'Ϝ', - Gbreve: 'Ğ', - Gcedil: 'Ģ', - Gcirc: 'Ĝ', - Gcy: 'Г', - Gdot: 'Ġ', - Gfr: '𝔊', - Gg: '⋙', - Gopf: '𝔾', - GreaterEqual: '≥', - GreaterEqualLess: '⋛', - GreaterFullEqual: '≧', - GreaterGreater: '⪢', - GreaterLess: '≷', - GreaterSlantEqual: '⩾', - GreaterTilde: '≳', - Gscr: '𝒢', - Gt: '≫', - HARDcy: 'Ъ', - Hacek: 'ˇ', - Hat: '^', - Hcirc: 'Ĥ', - Hfr: 'ℌ', - HilbertSpace: 'ℋ', - Hopf: 'ℍ', - HorizontalLine: '─', - Hscr: 'ℋ', - Hstrok: 'Ħ', - HumpDownHump: '≎', - HumpEqual: '≏', - IEcy: 'Е', - IJlig: 'IJ', - IOcy: 'Ё', - Iacute: 'Í', - Icirc: 'Î', - Icy: 'И', - Idot: 'İ', - Ifr: 'ℑ', - Igrave: 'Ì', - Im: 'ℑ', - Imacr: 'Ī', - ImaginaryI: 'ⅈ', - Implies: '⇒', - Int: '∬', - Integral: '∫', - Intersection: '⋂', - InvisibleComma: '⁣', - InvisibleTimes: '⁢', - Iogon: 'Į', - Iopf: '𝕀', - Iota: 'Ι', - Iscr: 'ℐ', - Itilde: 'Ĩ', - Iukcy: 'І', - Iuml: 'Ï', - Jcirc: 'Ĵ', - Jcy: 'Й', - Jfr: '𝔍', - Jopf: '𝕁', - Jscr: '𝒥', - Jsercy: 'Ј', - Jukcy: 'Є', - KHcy: 'Х', - KJcy: 'Ќ', - Kappa: 'Κ', - Kcedil: 'Ķ', - Kcy: 'К', - Kfr: '𝔎', - Kopf: '𝕂', - Kscr: '𝒦', - LJcy: 'Љ', - LT: '<', - Lacute: 'Ĺ', - Lambda: 'Λ', - Lang: '⟪', - Laplacetrf: 'ℒ', - Larr: '↞', - Lcaron: 'Ľ', - Lcedil: 'Ļ', - Lcy: 'Л', - LeftAngleBracket: '⟨', - LeftArrow: '←', - LeftArrowBar: '⇤', - LeftArrowRightArrow: '⇆', - LeftCeiling: '⌈', - LeftDoubleBracket: '⟦', - LeftDownTeeVector: '⥡', - LeftDownVector: '⇃', - LeftDownVectorBar: '⥙', - LeftFloor: '⌊', - LeftRightArrow: '↔', - LeftRightVector: '⥎', - LeftTee: '⊣', - LeftTeeArrow: '↤', - LeftTeeVector: '⥚', - LeftTriangle: '⊲', - LeftTriangleBar: '⧏', - LeftTriangleEqual: '⊴', - LeftUpDownVector: '⥑', - LeftUpTeeVector: '⥠', - LeftUpVector: '↿', - LeftUpVectorBar: '⥘', - LeftVector: '↼', - LeftVectorBar: '⥒', - Leftarrow: '⇐', - Leftrightarrow: '⇔', - LessEqualGreater: '⋚', - LessFullEqual: '≦', - LessGreater: '≶', - LessLess: '⪡', - LessSlantEqual: '⩽', - LessTilde: '≲', - Lfr: '𝔏', - Ll: '⋘', - Lleftarrow: '⇚', - Lmidot: 'Ŀ', - LongLeftArrow: '⟵', - LongLeftRightArrow: '⟷', - LongRightArrow: '⟶', - Longleftarrow: '⟸', - Longleftrightarrow: '⟺', - Longrightarrow: '⟹', - Lopf: '𝕃', - LowerLeftArrow: '↙', - LowerRightArrow: '↘', - Lscr: 'ℒ', - Lsh: '↰', - Lstrok: 'Ł', - Lt: '≪', - Map: '⤅', - Mcy: 'М', - MediumSpace: ' ', - Mellintrf: 'ℳ', - Mfr: '𝔐', - MinusPlus: '∓', - Mopf: '𝕄', - Mscr: 'ℳ', - Mu: 'Μ', - NJcy: 'Њ', - Nacute: 'Ń', - Ncaron: 'Ň', - Ncedil: 'Ņ', - Ncy: 'Н', - NegativeMediumSpace: '​', - NegativeThickSpace: '​', - NegativeThinSpace: '​', - NegativeVeryThinSpace: '​', - NestedGreaterGreater: '≫', - NestedLessLess: '≪', - NewLine: '\n', - Nfr: '𝔑', - NoBreak: '⁠', - NonBreakingSpace: ' ', - Nopf: 'ℕ', - Not: '⫬', - NotCongruent: '≢', - NotCupCap: '≭', - NotDoubleVerticalBar: '∦', - NotElement: '∉', - NotEqual: '≠', - NotEqualTilde: '≂̸', - NotExists: '∄', - NotGreater: '≯', - NotGreaterEqual: '≱', - NotGreaterFullEqual: '≧̸', - NotGreaterGreater: '≫̸', - NotGreaterLess: '≹', - NotGreaterSlantEqual: '⩾̸', - NotGreaterTilde: '≵', - NotHumpDownHump: '≎̸', - NotHumpEqual: '≏̸', - NotLeftTriangle: '⋪', - NotLeftTriangleBar: '⧏̸', - NotLeftTriangleEqual: '⋬', - NotLess: '≮', - NotLessEqual: '≰', - NotLessGreater: '≸', - NotLessLess: '≪̸', - NotLessSlantEqual: '⩽̸', - NotLessTilde: '≴', - NotNestedGreaterGreater: '⪢̸', - NotNestedLessLess: '⪡̸', - NotPrecedes: '⊀', - NotPrecedesEqual: '⪯̸', - NotPrecedesSlantEqual: '⋠', - NotReverseElement: '∌', - NotRightTriangle: '⋫', - NotRightTriangleBar: '⧐̸', - NotRightTriangleEqual: '⋭', - NotSquareSubset: '⊏̸', - NotSquareSubsetEqual: '⋢', - NotSquareSuperset: '⊐̸', - NotSquareSupersetEqual: '⋣', - NotSubset: '⊂⃒', - NotSubsetEqual: '⊈', - NotSucceeds: '⊁', - NotSucceedsEqual: '⪰̸', - NotSucceedsSlantEqual: '⋡', - NotSucceedsTilde: '≿̸', - NotSuperset: '⊃⃒', - NotSupersetEqual: '⊉', - NotTilde: '≁', - NotTildeEqual: '≄', - NotTildeFullEqual: '≇', - NotTildeTilde: '≉', - NotVerticalBar: '∤', - Nscr: '𝒩', - Ntilde: 'Ñ', - Nu: 'Ν', - OElig: 'Œ', - Oacute: 'Ó', - Ocirc: 'Ô', - Ocy: 'О', - Odblac: 'Ő', - Ofr: '𝔒', - Ograve: 'Ò', - Omacr: 'Ō', - Omega: 'Ω', - Omicron: 'Ο', - Oopf: '𝕆', - OpenCurlyDoubleQuote: '“', - OpenCurlyQuote: '‘', - Or: '⩔', - Oscr: '𝒪', - Oslash: 'Ø', - Otilde: 'Õ', - Otimes: '⨷', - Ouml: 'Ö', - OverBar: '‾', - OverBrace: '⏞', - OverBracket: '⎴', - OverParenthesis: '⏜', - PartialD: '∂', - Pcy: 'П', - Pfr: '𝔓', - Phi: 'Φ', - Pi: 'Π', - PlusMinus: '±', - Poincareplane: 'ℌ', - Popf: 'ℙ', - Pr: '⪻', - Precedes: '≺', - PrecedesEqual: '⪯', - PrecedesSlantEqual: '≼', - PrecedesTilde: '≾', - Prime: '″', - Product: '∏', - Proportion: '∷', - Proportional: '∝', - Pscr: '𝒫', - Psi: 'Ψ', - QUOT: '"', - Qfr: '𝔔', - Qopf: 'ℚ', - Qscr: '𝒬', - RBarr: '⤐', - REG: '®', - Racute: 'Ŕ', - Rang: '⟫', - Rarr: '↠', - Rarrtl: '⤖', - Rcaron: 'Ř', - Rcedil: 'Ŗ', - Rcy: 'Р', - Re: 'ℜ', - ReverseElement: '∋', - ReverseEquilibrium: '⇋', - ReverseUpEquilibrium: '⥯', - Rfr: 'ℜ', - Rho: 'Ρ', - RightAngleBracket: '⟩', - RightArrow: '→', - RightArrowBar: '⇥', - RightArrowLeftArrow: '⇄', - RightCeiling: '⌉', - RightDoubleBracket: '⟧', - RightDownTeeVector: '⥝', - RightDownVector: '⇂', - RightDownVectorBar: '⥕', - RightFloor: '⌋', - RightTee: '⊢', - RightTeeArrow: '↦', - RightTeeVector: '⥛', - RightTriangle: '⊳', - RightTriangleBar: '⧐', - RightTriangleEqual: '⊵', - RightUpDownVector: '⥏', - RightUpTeeVector: '⥜', - RightUpVector: '↾', - RightUpVectorBar: '⥔', - RightVector: '⇀', - RightVectorBar: '⥓', - Rightarrow: '⇒', - Ropf: 'ℝ', - RoundImplies: '⥰', - Rrightarrow: '⇛', - Rscr: 'ℛ', - Rsh: '↱', - RuleDelayed: '⧴', - SHCHcy: 'Щ', - SHcy: 'Ш', - SOFTcy: 'Ь', - Sacute: 'Ś', - Sc: '⪼', - Scaron: 'Š', - Scedil: 'Ş', - Scirc: 'Ŝ', - Scy: 'С', - Sfr: '𝔖', - ShortDownArrow: '↓', - ShortLeftArrow: '←', - ShortRightArrow: '→', - ShortUpArrow: '↑', - Sigma: 'Σ', - SmallCircle: '∘', - Sopf: '𝕊', - Sqrt: '√', - Square: '□', - SquareIntersection: '⊓', - SquareSubset: '⊏', - SquareSubsetEqual: '⊑', - SquareSuperset: '⊐', - SquareSupersetEqual: '⊒', - SquareUnion: '⊔', - Sscr: '𝒮', - Star: '⋆', - Sub: '⋐', - Subset: '⋐', - SubsetEqual: '⊆', - Succeeds: '≻', - SucceedsEqual: '⪰', - SucceedsSlantEqual: '≽', - SucceedsTilde: '≿', - SuchThat: '∋', - Sum: '∑', - Sup: '⋑', - Superset: '⊃', - SupersetEqual: '⊇', - Supset: '⋑', - THORN: 'Þ', - TRADE: '™', - TSHcy: 'Ћ', - TScy: 'Ц', - Tab: '\t', - Tau: 'Τ', - Tcaron: 'Ť', - Tcedil: 'Ţ', - Tcy: 'Т', - Tfr: '𝔗', - Therefore: '∴', - Theta: 'Θ', - ThickSpace: '  ', - ThinSpace: ' ', - Tilde: '∼', - TildeEqual: '≃', - TildeFullEqual: '≅', - TildeTilde: '≈', - Topf: '𝕋', - TripleDot: '⃛', - Tscr: '𝒯', - Tstrok: 'Ŧ', - Uacute: 'Ú', - Uarr: '↟', - Uarrocir: '⥉', - Ubrcy: 'Ў', - Ubreve: 'Ŭ', - Ucirc: 'Û', - Ucy: 'У', - Udblac: 'Ű', - Ufr: '𝔘', - Ugrave: 'Ù', - Umacr: 'Ū', - UnderBar: '_', - UnderBrace: '⏟', - UnderBracket: '⎵', - UnderParenthesis: '⏝', - Union: '⋃', - UnionPlus: '⊎', - Uogon: 'Ų', - Uopf: '𝕌', - UpArrow: '↑', - UpArrowBar: '⤒', - UpArrowDownArrow: '⇅', - UpDownArrow: '↕', - UpEquilibrium: '⥮', - UpTee: '⊥', - UpTeeArrow: '↥', - Uparrow: '⇑', - Updownarrow: '⇕', - UpperLeftArrow: '↖', - UpperRightArrow: '↗', - Upsi: 'ϒ', - Upsilon: 'Υ', - Uring: 'Ů', - Uscr: '𝒰', - Utilde: 'Ũ', - Uuml: 'Ü', - VDash: '⊫', - Vbar: '⫫', - Vcy: 'В', - Vdash: '⊩', - Vdashl: '⫦', - Vee: '⋁', - Verbar: '‖', - Vert: '‖', - VerticalBar: '∣', - VerticalLine: '|', - VerticalSeparator: '❘', - VerticalTilde: '≀', - VeryThinSpace: ' ', - Vfr: '𝔙', - Vopf: '𝕍', - Vscr: '𝒱', - Vvdash: '⊪', - Wcirc: 'Ŵ', - Wedge: '⋀', - Wfr: '𝔚', - Wopf: '𝕎', - Wscr: '𝒲', - Xfr: '𝔛', - Xi: 'Ξ', - Xopf: '𝕏', - Xscr: '𝒳', - YAcy: 'Я', - YIcy: 'Ї', - YUcy: 'Ю', - Yacute: 'Ý', - Ycirc: 'Ŷ', - Ycy: 'Ы', - Yfr: '𝔜', - Yopf: '𝕐', - Yscr: '𝒴', - Yuml: 'Ÿ', - ZHcy: 'Ж', - Zacute: 'Ź', - Zcaron: 'Ž', - Zcy: 'З', - Zdot: 'Ż', - ZeroWidthSpace: '​', - Zeta: 'Ζ', - Zfr: 'ℨ', - Zopf: 'ℤ', - Zscr: '𝒵', - aacute: 'á', - abreve: 'ă', - ac: '∾', - acE: '∾̳', - acd: '∿', - acirc: 'â', - acute: '´', - acy: 'а', - aelig: 'æ', - af: '⁡', - afr: '𝔞', - agrave: 'à', - alefsym: 'ℵ', - aleph: 'ℵ', - alpha: 'α', - amacr: 'ā', - amalg: '⨿', - amp: '&', - and: '∧', - andand: '⩕', - andd: '⩜', - andslope: '⩘', - andv: '⩚', - ang: '∠', - ange: '⦤', - angle: '∠', - angmsd: '∡', - angmsdaa: '⦨', - angmsdab: '⦩', - angmsdac: '⦪', - angmsdad: '⦫', - angmsdae: '⦬', - angmsdaf: '⦭', - angmsdag: '⦮', - angmsdah: '⦯', - angrt: '∟', - angrtvb: '⊾', - angrtvbd: '⦝', - angsph: '∢', - angst: 'Å', - angzarr: '⍼', - aogon: 'ą', - aopf: '𝕒', - ap: '≈', - apE: '⩰', - apacir: '⩯', - ape: '≊', - apid: '≋', - apos: "'", - approx: '≈', - approxeq: '≊', - aring: 'å', - ascr: '𝒶', - ast: '*', - asymp: '≈', - asympeq: '≍', - atilde: 'ã', - auml: 'ä', - awconint: '∳', - awint: '⨑', - bNot: '⫭', - backcong: '≌', - backepsilon: '϶', - backprime: '‵', - backsim: '∽', - backsimeq: '⋍', - barvee: '⊽', - barwed: '⌅', - barwedge: '⌅', - bbrk: '⎵', - bbrktbrk: '⎶', - bcong: '≌', - bcy: 'б', - bdquo: '„', - becaus: '∵', - because: '∵', - bemptyv: '⦰', - bepsi: '϶', - bernou: 'ℬ', - beta: 'β', - beth: 'ℶ', - between: '≬', - bfr: '𝔟', - bigcap: '⋂', - bigcirc: '◯', - bigcup: '⋃', - bigodot: '⨀', - bigoplus: '⨁', - bigotimes: '⨂', - bigsqcup: '⨆', - bigstar: '★', - bigtriangledown: '▽', - bigtriangleup: '△', - biguplus: '⨄', - bigvee: '⋁', - bigwedge: '⋀', - bkarow: '⤍', - blacklozenge: '⧫', - blacksquare: '▪', - blacktriangle: '▴', - blacktriangledown: '▾', - blacktriangleleft: '◂', - blacktriangleright: '▸', - blank: '␣', - blk12: '▒', - blk14: '░', - blk34: '▓', - block: '█', - bne: '=⃥', - bnequiv: '≡⃥', - bnot: '⌐', - bopf: '𝕓', - bot: '⊥', - bottom: '⊥', - bowtie: '⋈', - boxDL: '╗', - boxDR: '╔', - boxDl: '╖', - boxDr: '╓', - boxH: '═', - boxHD: '╦', - boxHU: '╩', - boxHd: '╤', - boxHu: '╧', - boxUL: '╝', - boxUR: '╚', - boxUl: '╜', - boxUr: '╙', - boxV: '║', - boxVH: '╬', - boxVL: '╣', - boxVR: '╠', - boxVh: '╫', - boxVl: '╢', - boxVr: '╟', - boxbox: '⧉', - boxdL: '╕', - boxdR: '╒', - boxdl: '┐', - boxdr: '┌', - boxh: '─', - boxhD: '╥', - boxhU: '╨', - boxhd: '┬', - boxhu: '┴', - boxminus: '⊟', - boxplus: '⊞', - boxtimes: '⊠', - boxuL: '╛', - boxuR: '╘', - boxul: '┘', - boxur: '└', - boxv: '│', - boxvH: '╪', - boxvL: '╡', - boxvR: '╞', - boxvh: '┼', - boxvl: '┤', - boxvr: '├', - bprime: '‵', - breve: '˘', - brvbar: '¦', - bscr: '𝒷', - bsemi: '⁏', - bsim: '∽', - bsime: '⋍', - bsol: '\\', - bsolb: '⧅', - bsolhsub: '⟈', - bull: '•', - bullet: '•', - bump: '≎', - bumpE: '⪮', - bumpe: '≏', - bumpeq: '≏', - cacute: 'ć', - cap: '∩', - capand: '⩄', - capbrcup: '⩉', - capcap: '⩋', - capcup: '⩇', - capdot: '⩀', - caps: '∩︀', - caret: '⁁', - caron: 'ˇ', - ccaps: '⩍', - ccaron: 'č', - ccedil: 'ç', - ccirc: 'ĉ', - ccups: '⩌', - ccupssm: '⩐', - cdot: 'ċ', - cedil: '¸', - cemptyv: '⦲', - cent: '¢', - centerdot: '·', - cfr: '𝔠', - chcy: 'ч', - check: '✓', - checkmark: '✓', - chi: 'χ', - cir: '○', - cirE: '⧃', - circ: 'ˆ', - circeq: '≗', - circlearrowleft: '↺', - circlearrowright: '↻', - circledR: '®', - circledS: 'Ⓢ', - circledast: '⊛', - circledcirc: '⊚', - circleddash: '⊝', - cire: '≗', - cirfnint: '⨐', - cirmid: '⫯', - cirscir: '⧂', - clubs: '♣', - clubsuit: '♣', - colon: ':', - colone: '≔', - coloneq: '≔', - comma: ',', - commat: '@', - comp: '∁', - compfn: '∘', - complement: '∁', - complexes: 'ℂ', - cong: '≅', - congdot: '⩭', - conint: '∮', - copf: '𝕔', - coprod: '∐', - copy: '©', - copysr: '℗', - crarr: '↵', - cross: '✗', - cscr: '𝒸', - csub: '⫏', - csube: '⫑', - csup: '⫐', - csupe: '⫒', - ctdot: '⋯', - cudarrl: '⤸', - cudarrr: '⤵', - cuepr: '⋞', - cuesc: '⋟', - cularr: '↶', - cularrp: '⤽', - cup: '∪', - cupbrcap: '⩈', - cupcap: '⩆', - cupcup: '⩊', - cupdot: '⊍', - cupor: '⩅', - cups: '∪︀', - curarr: '↷', - curarrm: '⤼', - curlyeqprec: '⋞', - curlyeqsucc: '⋟', - curlyvee: '⋎', - curlywedge: '⋏', - curren: '¤', - curvearrowleft: '↶', - curvearrowright: '↷', - cuvee: '⋎', - cuwed: '⋏', - cwconint: '∲', - cwint: '∱', - cylcty: '⌭', - dArr: '⇓', - dHar: '⥥', - dagger: '†', - daleth: 'ℸ', - darr: '↓', - dash: '‐', - dashv: '⊣', - dbkarow: '⤏', - dblac: '˝', - dcaron: 'ď', - dcy: 'д', - dd: 'ⅆ', - ddagger: '‡', - ddarr: '⇊', - ddotseq: '⩷', - deg: '°', - delta: 'δ', - demptyv: '⦱', - dfisht: '⥿', - dfr: '𝔡', - dharl: '⇃', - dharr: '⇂', - diam: '⋄', - diamond: '⋄', - diamondsuit: '♦', - diams: '♦', - die: '¨', - digamma: 'ϝ', - disin: '⋲', - div: '÷', - divide: '÷', - divideontimes: '⋇', - divonx: '⋇', - djcy: 'ђ', - dlcorn: '⌞', - dlcrop: '⌍', - dollar: '$', - dopf: '𝕕', - dot: '˙', - doteq: '≐', - doteqdot: '≑', - dotminus: '∸', - dotplus: '∔', - dotsquare: '⊡', - doublebarwedge: '⌆', - downarrow: '↓', - downdownarrows: '⇊', - downharpoonleft: '⇃', - downharpoonright: '⇂', - drbkarow: '⤐', - drcorn: '⌟', - drcrop: '⌌', - dscr: '𝒹', - dscy: 'ѕ', - dsol: '⧶', - dstrok: 'đ', - dtdot: '⋱', - dtri: '▿', - dtrif: '▾', - duarr: '⇵', - duhar: '⥯', - dwangle: '⦦', - dzcy: 'џ', - dzigrarr: '⟿', - eDDot: '⩷', - eDot: '≑', - eacute: 'é', - easter: '⩮', - ecaron: 'ě', - ecir: '≖', - ecirc: 'ê', - ecolon: '≕', - ecy: 'э', - edot: 'ė', - ee: 'ⅇ', - efDot: '≒', - efr: '𝔢', - eg: '⪚', - egrave: 'è', - egs: '⪖', - egsdot: '⪘', - el: '⪙', - elinters: '⏧', - ell: 'ℓ', - els: '⪕', - elsdot: '⪗', - emacr: 'ē', - empty: '∅', - emptyset: '∅', - emptyv: '∅', - emsp13: ' ', - emsp14: ' ', - emsp: ' ', - eng: 'ŋ', - ensp: ' ', - eogon: 'ę', - eopf: '𝕖', - epar: '⋕', - eparsl: '⧣', - eplus: '⩱', - epsi: 'ε', - epsilon: 'ε', - epsiv: 'ϵ', - eqcirc: '≖', - eqcolon: '≕', - eqsim: '≂', - eqslantgtr: '⪖', - eqslantless: '⪕', - equals: '=', - equest: '≟', - equiv: '≡', - equivDD: '⩸', - eqvparsl: '⧥', - erDot: '≓', - erarr: '⥱', - escr: 'ℯ', - esdot: '≐', - esim: '≂', - eta: 'η', - eth: 'ð', - euml: 'ë', - euro: '€', - excl: '!', - exist: '∃', - expectation: 'ℰ', - exponentiale: 'ⅇ', - fallingdotseq: '≒', - fcy: 'ф', - female: '♀', - ffilig: 'ffi', - fflig: 'ff', - ffllig: 'ffl', - ffr: '𝔣', - filig: 'fi', - fjlig: 'fj', - flat: '♭', - fllig: 'fl', - fltns: '▱', - fnof: 'ƒ', - fopf: '𝕗', - forall: '∀', - fork: '⋔', - forkv: '⫙', - fpartint: '⨍', - frac12: '½', - frac13: '⅓', - frac14: '¼', - frac15: '⅕', - frac16: '⅙', - frac18: '⅛', - frac23: '⅔', - frac25: '⅖', - frac34: '¾', - frac35: '⅗', - frac38: '⅜', - frac45: '⅘', - frac56: '⅚', - frac58: '⅝', - frac78: '⅞', - frasl: '⁄', - frown: '⌢', - fscr: '𝒻', - gE: '≧', - gEl: '⪌', - gacute: 'ǵ', - gamma: 'γ', - gammad: 'ϝ', - gap: '⪆', - gbreve: 'ğ', - gcirc: 'ĝ', - gcy: 'г', - gdot: 'ġ', - ge: '≥', - gel: '⋛', - geq: '≥', - geqq: '≧', - geqslant: '⩾', - ges: '⩾', - gescc: '⪩', - gesdot: '⪀', - gesdoto: '⪂', - gesdotol: '⪄', - gesl: '⋛︀', - gesles: '⪔', - gfr: '𝔤', - gg: '≫', - ggg: '⋙', - gimel: 'ℷ', - gjcy: 'ѓ', - gl: '≷', - glE: '⪒', - gla: '⪥', - glj: '⪤', - gnE: '≩', - gnap: '⪊', - gnapprox: '⪊', - gne: '⪈', - gneq: '⪈', - gneqq: '≩', - gnsim: '⋧', - gopf: '𝕘', - grave: '`', - gscr: 'ℊ', - gsim: '≳', - gsime: '⪎', - gsiml: '⪐', - gt: '>', - gtcc: '⪧', - gtcir: '⩺', - gtdot: '⋗', - gtlPar: '⦕', - gtquest: '⩼', - gtrapprox: '⪆', - gtrarr: '⥸', - gtrdot: '⋗', - gtreqless: '⋛', - gtreqqless: '⪌', - gtrless: '≷', - gtrsim: '≳', - gvertneqq: '≩︀', - gvnE: '≩︀', - hArr: '⇔', - hairsp: ' ', - half: '½', - hamilt: 'ℋ', - hardcy: 'ъ', - harr: '↔', - harrcir: '⥈', - harrw: '↭', - hbar: 'ℏ', - hcirc: 'ĥ', - hearts: '♥', - heartsuit: '♥', - hellip: '…', - hercon: '⊹', - hfr: '𝔥', - hksearow: '⤥', - hkswarow: '⤦', - hoarr: '⇿', - homtht: '∻', - hookleftarrow: '↩', - hookrightarrow: '↪', - hopf: '𝕙', - horbar: '―', - hscr: '𝒽', - hslash: 'ℏ', - hstrok: 'ħ', - hybull: '⁃', - hyphen: '‐', - iacute: 'í', - ic: '⁣', - icirc: 'î', - icy: 'и', - iecy: 'е', - iexcl: '¡', - iff: '⇔', - ifr: '𝔦', - igrave: 'ì', - ii: 'ⅈ', - iiiint: '⨌', - iiint: '∭', - iinfin: '⧜', - iiota: '℩', - ijlig: 'ij', - imacr: 'ī', - image: 'ℑ', - imagline: 'ℐ', - imagpart: 'ℑ', - imath: 'ı', - imof: '⊷', - imped: 'Ƶ', - in: '∈', - incare: '℅', - infin: '∞', - infintie: '⧝', - inodot: 'ı', - int: '∫', - intcal: '⊺', - integers: 'ℤ', - intercal: '⊺', - intlarhk: '⨗', - intprod: '⨼', - iocy: 'ё', - iogon: 'į', - iopf: '𝕚', - iota: 'ι', - iprod: '⨼', - iquest: '¿', - iscr: '𝒾', - isin: '∈', - isinE: '⋹', - isindot: '⋵', - isins: '⋴', - isinsv: '⋳', - isinv: '∈', - it: '⁢', - itilde: 'ĩ', - iukcy: 'і', - iuml: 'ï', - jcirc: 'ĵ', - jcy: 'й', - jfr: '𝔧', - jmath: 'ȷ', - jopf: '𝕛', - jscr: '𝒿', - jsercy: 'ј', - jukcy: 'є', - kappa: 'κ', - kappav: 'ϰ', - kcedil: 'ķ', - kcy: 'к', - kfr: '𝔨', - kgreen: 'ĸ', - khcy: 'х', - kjcy: 'ќ', - kopf: '𝕜', - kscr: '𝓀', - lAarr: '⇚', - lArr: '⇐', - lAtail: '⤛', - lBarr: '⤎', - lE: '≦', - lEg: '⪋', - lHar: '⥢', - lacute: 'ĺ', - laemptyv: '⦴', - lagran: 'ℒ', - lambda: 'λ', - lang: '⟨', - langd: '⦑', - langle: '⟨', - lap: '⪅', - laquo: '«', - larr: '←', - larrb: '⇤', - larrbfs: '⤟', - larrfs: '⤝', - larrhk: '↩', - larrlp: '↫', - larrpl: '⤹', - larrsim: '⥳', - larrtl: '↢', - lat: '⪫', - latail: '⤙', - late: '⪭', - lates: '⪭︀', - lbarr: '⤌', - lbbrk: '❲', - lbrace: '{', - lbrack: '[', - lbrke: '⦋', - lbrksld: '⦏', - lbrkslu: '⦍', - lcaron: 'ľ', - lcedil: 'ļ', - lceil: '⌈', - lcub: '{', - lcy: 'л', - ldca: '⤶', - ldquo: '“', - ldquor: '„', - ldrdhar: '⥧', - ldrushar: '⥋', - ldsh: '↲', - le: '≤', - leftarrow: '←', - leftarrowtail: '↢', - leftharpoondown: '↽', - leftharpoonup: '↼', - leftleftarrows: '⇇', - leftrightarrow: '↔', - leftrightarrows: '⇆', - leftrightharpoons: '⇋', - leftrightsquigarrow: '↭', - leftthreetimes: '⋋', - leg: '⋚', - leq: '≤', - leqq: '≦', - leqslant: '⩽', - les: '⩽', - lescc: '⪨', - lesdot: '⩿', - lesdoto: '⪁', - lesdotor: '⪃', - lesg: '⋚︀', - lesges: '⪓', - lessapprox: '⪅', - lessdot: '⋖', - lesseqgtr: '⋚', - lesseqqgtr: '⪋', - lessgtr: '≶', - lesssim: '≲', - lfisht: '⥼', - lfloor: '⌊', - lfr: '𝔩', - lg: '≶', - lgE: '⪑', - lhard: '↽', - lharu: '↼', - lharul: '⥪', - lhblk: '▄', - ljcy: 'љ', - ll: '≪', - llarr: '⇇', - llcorner: '⌞', - llhard: '⥫', - lltri: '◺', - lmidot: 'ŀ', - lmoust: '⎰', - lmoustache: '⎰', - lnE: '≨', - lnap: '⪉', - lnapprox: '⪉', - lne: '⪇', - lneq: '⪇', - lneqq: '≨', - lnsim: '⋦', - loang: '⟬', - loarr: '⇽', - lobrk: '⟦', - longleftarrow: '⟵', - longleftrightarrow: '⟷', - longmapsto: '⟼', - longrightarrow: '⟶', - looparrowleft: '↫', - looparrowright: '↬', - lopar: '⦅', - lopf: '𝕝', - loplus: '⨭', - lotimes: '⨴', - lowast: '∗', - lowbar: '_', - loz: '◊', - lozenge: '◊', - lozf: '⧫', - lpar: '(', - lparlt: '⦓', - lrarr: '⇆', - lrcorner: '⌟', - lrhar: '⇋', - lrhard: '⥭', - lrm: '‎', - lrtri: '⊿', - lsaquo: '‹', - lscr: '𝓁', - lsh: '↰', - lsim: '≲', - lsime: '⪍', - lsimg: '⪏', - lsqb: '[', - lsquo: '‘', - lsquor: '‚', - lstrok: 'ł', - lt: '<', - ltcc: '⪦', - ltcir: '⩹', - ltdot: '⋖', - lthree: '⋋', - ltimes: '⋉', - ltlarr: '⥶', - ltquest: '⩻', - ltrPar: '⦖', - ltri: '◃', - ltrie: '⊴', - ltrif: '◂', - lurdshar: '⥊', - luruhar: '⥦', - lvertneqq: '≨︀', - lvnE: '≨︀', - mDDot: '∺', - macr: '¯', - male: '♂', - malt: '✠', - maltese: '✠', - map: '↦', - mapsto: '↦', - mapstodown: '↧', - mapstoleft: '↤', - mapstoup: '↥', - marker: '▮', - mcomma: '⨩', - mcy: 'м', - mdash: '—', - measuredangle: '∡', - mfr: '𝔪', - mho: '℧', - micro: 'µ', - mid: '∣', - midast: '*', - midcir: '⫰', - middot: '·', - minus: '−', - minusb: '⊟', - minusd: '∸', - minusdu: '⨪', - mlcp: '⫛', - mldr: '…', - mnplus: '∓', - models: '⊧', - mopf: '𝕞', - mp: '∓', - mscr: '𝓂', - mstpos: '∾', - mu: 'μ', - multimap: '⊸', - mumap: '⊸', - nGg: '⋙̸', - nGt: '≫⃒', - nGtv: '≫̸', - nLeftarrow: '⇍', - nLeftrightarrow: '⇎', - nLl: '⋘̸', - nLt: '≪⃒', - nLtv: '≪̸', - nRightarrow: '⇏', - nVDash: '⊯', - nVdash: '⊮', - nabla: '∇', - nacute: 'ń', - nang: '∠⃒', - nap: '≉', - napE: '⩰̸', - napid: '≋̸', - napos: 'ʼn', - napprox: '≉', - natur: '♮', - natural: '♮', - naturals: 'ℕ', - nbsp: ' ', - nbump: '≎̸', - nbumpe: '≏̸', - ncap: '⩃', - ncaron: 'ň', - ncedil: 'ņ', - ncong: '≇', - ncongdot: '⩭̸', - ncup: '⩂', - ncy: 'н', - ndash: '–', - ne: '≠', - neArr: '⇗', - nearhk: '⤤', - nearr: '↗', - nearrow: '↗', - nedot: '≐̸', - nequiv: '≢', - nesear: '⤨', - nesim: '≂̸', - nexist: '∄', - nexists: '∄', - nfr: '𝔫', - ngE: '≧̸', - nge: '≱', - ngeq: '≱', - ngeqq: '≧̸', - ngeqslant: '⩾̸', - nges: '⩾̸', - ngsim: '≵', - ngt: '≯', - ngtr: '≯', - nhArr: '⇎', - nharr: '↮', - nhpar: '⫲', - ni: '∋', - nis: '⋼', - nisd: '⋺', - niv: '∋', - njcy: 'њ', - nlArr: '⇍', - nlE: '≦̸', - nlarr: '↚', - nldr: '‥', - nle: '≰', - nleftarrow: '↚', - nleftrightarrow: '↮', - nleq: '≰', - nleqq: '≦̸', - nleqslant: '⩽̸', - nles: '⩽̸', - nless: '≮', - nlsim: '≴', - nlt: '≮', - nltri: '⋪', - nltrie: '⋬', - nmid: '∤', - nopf: '𝕟', - not: '¬', - notin: '∉', - notinE: '⋹̸', - notindot: '⋵̸', - notinva: '∉', - notinvb: '⋷', - notinvc: '⋶', - notni: '∌', - notniva: '∌', - notnivb: '⋾', - notnivc: '⋽', - npar: '∦', - nparallel: '∦', - nparsl: '⫽⃥', - npart: '∂̸', - npolint: '⨔', - npr: '⊀', - nprcue: '⋠', - npre: '⪯̸', - nprec: '⊀', - npreceq: '⪯̸', - nrArr: '⇏', - nrarr: '↛', - nrarrc: '⤳̸', - nrarrw: '↝̸', - nrightarrow: '↛', - nrtri: '⋫', - nrtrie: '⋭', - nsc: '⊁', - nsccue: '⋡', - nsce: '⪰̸', - nscr: '𝓃', - nshortmid: '∤', - nshortparallel: '∦', - nsim: '≁', - nsime: '≄', - nsimeq: '≄', - nsmid: '∤', - nspar: '∦', - nsqsube: '⋢', - nsqsupe: '⋣', - nsub: '⊄', - nsubE: '⫅̸', - nsube: '⊈', - nsubset: '⊂⃒', - nsubseteq: '⊈', - nsubseteqq: '⫅̸', - nsucc: '⊁', - nsucceq: '⪰̸', - nsup: '⊅', - nsupE: '⫆̸', - nsupe: '⊉', - nsupset: '⊃⃒', - nsupseteq: '⊉', - nsupseteqq: '⫆̸', - ntgl: '≹', - ntilde: 'ñ', - ntlg: '≸', - ntriangleleft: '⋪', - ntrianglelefteq: '⋬', - ntriangleright: '⋫', - ntrianglerighteq: '⋭', - nu: 'ν', - num: '#', - numero: '№', - numsp: ' ', - nvDash: '⊭', - nvHarr: '⤄', - nvap: '≍⃒', - nvdash: '⊬', - nvge: '≥⃒', - nvgt: '>⃒', - nvinfin: '⧞', - nvlArr: '⤂', - nvle: '≤⃒', - nvlt: '<⃒', - nvltrie: '⊴⃒', - nvrArr: '⤃', - nvrtrie: '⊵⃒', - nvsim: '∼⃒', - nwArr: '⇖', - nwarhk: '⤣', - nwarr: '↖', - nwarrow: '↖', - nwnear: '⤧', - oS: 'Ⓢ', - oacute: 'ó', - oast: '⊛', - ocir: '⊚', - ocirc: 'ô', - ocy: 'о', - odash: '⊝', - odblac: 'ő', - odiv: '⨸', - odot: '⊙', - odsold: '⦼', - oelig: 'œ', - ofcir: '⦿', - ofr: '𝔬', - ogon: '˛', - ograve: 'ò', - ogt: '⧁', - ohbar: '⦵', - ohm: 'Ω', - oint: '∮', - olarr: '↺', - olcir: '⦾', - olcross: '⦻', - oline: '‾', - olt: '⧀', - omacr: 'ō', - omega: 'ω', - omicron: 'ο', - omid: '⦶', - ominus: '⊖', - oopf: '𝕠', - opar: '⦷', - operp: '⦹', - oplus: '⊕', - or: '∨', - orarr: '↻', - ord: '⩝', - order: 'ℴ', - orderof: 'ℴ', - ordf: 'ª', - ordm: 'º', - origof: '⊶', - oror: '⩖', - orslope: '⩗', - orv: '⩛', - oscr: 'ℴ', - oslash: 'ø', - osol: '⊘', - otilde: 'õ', - otimes: '⊗', - otimesas: '⨶', - ouml: 'ö', - ovbar: '⌽', - par: '∥', - para: '¶', - parallel: '∥', - parsim: '⫳', - parsl: '⫽', - part: '∂', - pcy: 'п', - percnt: '%', - period: '.', - permil: '‰', - perp: '⊥', - pertenk: '‱', - pfr: '𝔭', - phi: 'φ', - phiv: 'ϕ', - phmmat: 'ℳ', - phone: '☎', - pi: 'π', - pitchfork: '⋔', - piv: 'ϖ', - planck: 'ℏ', - planckh: 'ℎ', - plankv: 'ℏ', - plus: '+', - plusacir: '⨣', - plusb: '⊞', - pluscir: '⨢', - plusdo: '∔', - plusdu: '⨥', - pluse: '⩲', - plusmn: '±', - plussim: '⨦', - plustwo: '⨧', - pm: '±', - pointint: '⨕', - popf: '𝕡', - pound: '£', - pr: '≺', - prE: '⪳', - prap: '⪷', - prcue: '≼', - pre: '⪯', - prec: '≺', - precapprox: '⪷', - preccurlyeq: '≼', - preceq: '⪯', - precnapprox: '⪹', - precneqq: '⪵', - precnsim: '⋨', - precsim: '≾', - prime: '′', - primes: 'ℙ', - prnE: '⪵', - prnap: '⪹', - prnsim: '⋨', - prod: '∏', - profalar: '⌮', - profline: '⌒', - profsurf: '⌓', - prop: '∝', - propto: '∝', - prsim: '≾', - prurel: '⊰', - pscr: '𝓅', - psi: 'ψ', - puncsp: ' ', - qfr: '𝔮', - qint: '⨌', - qopf: '𝕢', - qprime: '⁗', - qscr: '𝓆', - quaternions: 'ℍ', - quatint: '⨖', - quest: '?', - questeq: '≟', - quot: '"', - rAarr: '⇛', - rArr: '⇒', - rAtail: '⤜', - rBarr: '⤏', - rHar: '⥤', - race: '∽̱', - racute: 'ŕ', - radic: '√', - raemptyv: '⦳', - rang: '⟩', - rangd: '⦒', - range: '⦥', - rangle: '⟩', - raquo: '»', - rarr: '→', - rarrap: '⥵', - rarrb: '⇥', - rarrbfs: '⤠', - rarrc: '⤳', - rarrfs: '⤞', - rarrhk: '↪', - rarrlp: '↬', - rarrpl: '⥅', - rarrsim: '⥴', - rarrtl: '↣', - rarrw: '↝', - ratail: '⤚', - ratio: '∶', - rationals: 'ℚ', - rbarr: '⤍', - rbbrk: '❳', - rbrace: '}', - rbrack: ']', - rbrke: '⦌', - rbrksld: '⦎', - rbrkslu: '⦐', - rcaron: 'ř', - rcedil: 'ŗ', - rceil: '⌉', - rcub: '}', - rcy: 'р', - rdca: '⤷', - rdldhar: '⥩', - rdquo: '”', - rdquor: '”', - rdsh: '↳', - real: 'ℜ', - realine: 'ℛ', - realpart: 'ℜ', - reals: 'ℝ', - rect: '▭', - reg: '®', - rfisht: '⥽', - rfloor: '⌋', - rfr: '𝔯', - rhard: '⇁', - rharu: '⇀', - rharul: '⥬', - rho: 'ρ', - rhov: 'ϱ', - rightarrow: '→', - rightarrowtail: '↣', - rightharpoondown: '⇁', - rightharpoonup: '⇀', - rightleftarrows: '⇄', - rightleftharpoons: '⇌', - rightrightarrows: '⇉', - rightsquigarrow: '↝', - rightthreetimes: '⋌', - ring: '˚', - risingdotseq: '≓', - rlarr: '⇄', - rlhar: '⇌', - rlm: '‏', - rmoust: '⎱', - rmoustache: '⎱', - rnmid: '⫮', - roang: '⟭', - roarr: '⇾', - robrk: '⟧', - ropar: '⦆', - ropf: '𝕣', - roplus: '⨮', - rotimes: '⨵', - rpar: ')', - rpargt: '⦔', - rppolint: '⨒', - rrarr: '⇉', - rsaquo: '›', - rscr: '𝓇', - rsh: '↱', - rsqb: ']', - rsquo: '’', - rsquor: '’', - rthree: '⋌', - rtimes: '⋊', - rtri: '▹', - rtrie: '⊵', - rtrif: '▸', - rtriltri: '⧎', - ruluhar: '⥨', - rx: '℞', - sacute: 'ś', - sbquo: '‚', - sc: '≻', - scE: '⪴', - scap: '⪸', - scaron: 'š', - sccue: '≽', - sce: '⪰', - scedil: 'ş', - scirc: 'ŝ', - scnE: '⪶', - scnap: '⪺', - scnsim: '⋩', - scpolint: '⨓', - scsim: '≿', - scy: 'с', - sdot: '⋅', - sdotb: '⊡', - sdote: '⩦', - seArr: '⇘', - searhk: '⤥', - searr: '↘', - searrow: '↘', - sect: '§', - semi: ';', - seswar: '⤩', - setminus: '∖', - setmn: '∖', - sext: '✶', - sfr: '𝔰', - sfrown: '⌢', - sharp: '♯', - shchcy: 'щ', - shcy: 'ш', - shortmid: '∣', - shortparallel: '∥', - shy: '­', - sigma: 'σ', - sigmaf: 'ς', - sigmav: 'ς', - sim: '∼', - simdot: '⩪', - sime: '≃', - simeq: '≃', - simg: '⪞', - simgE: '⪠', - siml: '⪝', - simlE: '⪟', - simne: '≆', - simplus: '⨤', - simrarr: '⥲', - slarr: '←', - smallsetminus: '∖', - smashp: '⨳', - smeparsl: '⧤', - smid: '∣', - smile: '⌣', - smt: '⪪', - smte: '⪬', - smtes: '⪬︀', - softcy: 'ь', - sol: '/', - solb: '⧄', - solbar: '⌿', - sopf: '𝕤', - spades: '♠', - spadesuit: '♠', - spar: '∥', - sqcap: '⊓', - sqcaps: '⊓︀', - sqcup: '⊔', - sqcups: '⊔︀', - sqsub: '⊏', - sqsube: '⊑', - sqsubset: '⊏', - sqsubseteq: '⊑', - sqsup: '⊐', - sqsupe: '⊒', - sqsupset: '⊐', - sqsupseteq: '⊒', - squ: '□', - square: '□', - squarf: '▪', - squf: '▪', - srarr: '→', - sscr: '𝓈', - ssetmn: '∖', - ssmile: '⌣', - sstarf: '⋆', - star: '☆', - starf: '★', - straightepsilon: 'ϵ', - straightphi: 'ϕ', - strns: '¯', - sub: '⊂', - subE: '⫅', - subdot: '⪽', - sube: '⊆', - subedot: '⫃', - submult: '⫁', - subnE: '⫋', - subne: '⊊', - subplus: '⪿', - subrarr: '⥹', - subset: '⊂', - subseteq: '⊆', - subseteqq: '⫅', - subsetneq: '⊊', - subsetneqq: '⫋', - subsim: '⫇', - subsub: '⫕', - subsup: '⫓', - succ: '≻', - succapprox: '⪸', - succcurlyeq: '≽', - succeq: '⪰', - succnapprox: '⪺', - succneqq: '⪶', - succnsim: '⋩', - succsim: '≿', - sum: '∑', - sung: '♪', - sup1: '¹', - sup2: '²', - sup3: '³', - sup: '⊃', - supE: '⫆', - supdot: '⪾', - supdsub: '⫘', - supe: '⊇', - supedot: '⫄', - suphsol: '⟉', - suphsub: '⫗', - suplarr: '⥻', - supmult: '⫂', - supnE: '⫌', - supne: '⊋', - supplus: '⫀', - supset: '⊃', - supseteq: '⊇', - supseteqq: '⫆', - supsetneq: '⊋', - supsetneqq: '⫌', - supsim: '⫈', - supsub: '⫔', - supsup: '⫖', - swArr: '⇙', - swarhk: '⤦', - swarr: '↙', - swarrow: '↙', - swnwar: '⤪', - szlig: 'ß', - target: '⌖', - tau: 'τ', - tbrk: '⎴', - tcaron: 'ť', - tcedil: 'ţ', - tcy: 'т', - tdot: '⃛', - telrec: '⌕', - tfr: '𝔱', - there4: '∴', - therefore: '∴', - theta: 'θ', - thetasym: 'ϑ', - thetav: 'ϑ', - thickapprox: '≈', - thicksim: '∼', - thinsp: ' ', - thkap: '≈', - thksim: '∼', - thorn: 'þ', - tilde: '˜', - times: '×', - timesb: '⊠', - timesbar: '⨱', - timesd: '⨰', - tint: '∭', - toea: '⤨', - top: '⊤', - topbot: '⌶', - topcir: '⫱', - topf: '𝕥', - topfork: '⫚', - tosa: '⤩', - tprime: '‴', - trade: '™', - triangle: '▵', - triangledown: '▿', - triangleleft: '◃', - trianglelefteq: '⊴', - triangleq: '≜', - triangleright: '▹', - trianglerighteq: '⊵', - tridot: '◬', - trie: '≜', - triminus: '⨺', - triplus: '⨹', - trisb: '⧍', - tritime: '⨻', - trpezium: '⏢', - tscr: '𝓉', - tscy: 'ц', - tshcy: 'ћ', - tstrok: 'ŧ', - twixt: '≬', - twoheadleftarrow: '↞', - twoheadrightarrow: '↠', - uArr: '⇑', - uHar: '⥣', - uacute: 'ú', - uarr: '↑', - ubrcy: 'ў', - ubreve: 'ŭ', - ucirc: 'û', - ucy: 'у', - udarr: '⇅', - udblac: 'ű', - udhar: '⥮', - ufisht: '⥾', - ufr: '𝔲', - ugrave: 'ù', - uharl: '↿', - uharr: '↾', - uhblk: '▀', - ulcorn: '⌜', - ulcorner: '⌜', - ulcrop: '⌏', - ultri: '◸', - umacr: 'ū', - uml: '¨', - uogon: 'ų', - uopf: '𝕦', - uparrow: '↑', - updownarrow: '↕', - upharpoonleft: '↿', - upharpoonright: '↾', - uplus: '⊎', - upsi: 'υ', - upsih: 'ϒ', - upsilon: 'υ', - upuparrows: '⇈', - urcorn: '⌝', - urcorner: '⌝', - urcrop: '⌎', - uring: 'ů', - urtri: '◹', - uscr: '𝓊', - utdot: '⋰', - utilde: 'ũ', - utri: '▵', - utrif: '▴', - uuarr: '⇈', - uuml: 'ü', - uwangle: '⦧', - vArr: '⇕', - vBar: '⫨', - vBarv: '⫩', - vDash: '⊨', - vangrt: '⦜', - varepsilon: 'ϵ', - varkappa: 'ϰ', - varnothing: '∅', - varphi: 'ϕ', - varpi: 'ϖ', - varpropto: '∝', - varr: '↕', - varrho: 'ϱ', - varsigma: 'ς', - varsubsetneq: '⊊︀', - varsubsetneqq: '⫋︀', - varsupsetneq: '⊋︀', - varsupsetneqq: '⫌︀', - vartheta: 'ϑ', - vartriangleleft: '⊲', - vartriangleright: '⊳', - vcy: 'в', - vdash: '⊢', - vee: '∨', - veebar: '⊻', - veeeq: '≚', - vellip: '⋮', - verbar: '|', - vert: '|', - vfr: '𝔳', - vltri: '⊲', - vnsub: '⊂⃒', - vnsup: '⊃⃒', - vopf: '𝕧', - vprop: '∝', - vrtri: '⊳', - vscr: '𝓋', - vsubnE: '⫋︀', - vsubne: '⊊︀', - vsupnE: '⫌︀', - vsupne: '⊋︀', - vzigzag: '⦚', - wcirc: 'ŵ', - wedbar: '⩟', - wedge: '∧', - wedgeq: '≙', - weierp: '℘', - wfr: '𝔴', - wopf: '𝕨', - wp: '℘', - wr: '≀', - wreath: '≀', - wscr: '𝓌', - xcap: '⋂', - xcirc: '◯', - xcup: '⋃', - xdtri: '▽', - xfr: '𝔵', - xhArr: '⟺', - xharr: '⟷', - xi: 'ξ', - xlArr: '⟸', - xlarr: '⟵', - xmap: '⟼', - xnis: '⋻', - xodot: '⨀', - xopf: '𝕩', - xoplus: '⨁', - xotime: '⨂', - xrArr: '⟹', - xrarr: '⟶', - xscr: '𝓍', - xsqcup: '⨆', - xuplus: '⨄', - xutri: '△', - xvee: '⋁', - xwedge: '⋀', - yacute: 'ý', - yacy: 'я', - ycirc: 'ŷ', - ycy: 'ы', - yen: '¥', - yfr: '𝔶', - yicy: 'ї', - yopf: '𝕪', - yscr: '𝓎', - yucy: 'ю', - yuml: 'ÿ', - zacute: 'ź', - zcaron: 'ž', - zcy: 'з', - zdot: 'ż', - zeetrf: 'ℨ', - zeta: 'ζ', - zfr: '𝔷', - zhcy: 'ж', - zigrarr: '⇝', - zopf: '𝕫', - zscr: '𝓏', - zwj: '‍', - zwnj: '‌' -} - -;// CONCATENATED MODULE: ./node_modules/decode-named-character-reference/index.js - - -const own = {}.hasOwnProperty - -/** - * Decode a single character reference (without the `&` or `;`). - * You probably only need this when you’re building parsers yourself that follow - * different rules compared to HTML. - * This is optimized to be tiny in browsers. - * - * @param {string} value - * `notin` (named), `#123` (deci), `#x123` (hexa). - * @returns {string|false} - * Decoded reference. - */ -function decodeNamedCharacterReference(value) { - return own.call(characterEntities, value) ? characterEntities[value] : false -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/character-reference.js -/** - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const characterReference = { - name: 'characterReference', - tokenize: tokenizeCharacterReference -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeCharacterReference(effects, ok, nok) { - const self = this - let size = 0 - /** @type {number} */ - let max - /** @type {(code: Code) => boolean} */ - let test - return start - - /** - * Start of character reference. - * - * ```markdown - * > | a&b - * ^ - * > | a{b - * ^ - * > | a b - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter('characterReference') - effects.enter('characterReferenceMarker') - effects.consume(code) - effects.exit('characterReferenceMarker') - return open - } - - /** - * After `&`, at `#` for numeric references or alphanumeric for named - * references. - * - * ```markdown - * > | a&b - * ^ - * > | a{b - * ^ - * > | a b - * ^ - * ``` - * - * @type {State} - */ - function open(code) { - if (code === 35) { - effects.enter('characterReferenceMarkerNumeric') - effects.consume(code) - effects.exit('characterReferenceMarkerNumeric') - return numeric - } - effects.enter('characterReferenceValue') - max = 31 - test = asciiAlphanumeric - return value(code) - } - - /** - * After `#`, at `x` for hexadecimals or digit for decimals. - * - * ```markdown - * > | a{b - * ^ - * > | a b - * ^ - * ``` - * - * @type {State} - */ - function numeric(code) { - if (code === 88 || code === 120) { - effects.enter('characterReferenceMarkerHexadecimal') - effects.consume(code) - effects.exit('characterReferenceMarkerHexadecimal') - effects.enter('characterReferenceValue') - max = 6 - test = asciiHexDigit - return value - } - effects.enter('characterReferenceValue') - max = 7 - test = asciiDigit - return value(code) - } - - /** - * After markers (`&#x`, `&#`, or `&`), in value, before `;`. - * - * The character reference kind defines what and how many characters are - * allowed. - * - * ```markdown - * > | a&b - * ^^^ - * > | a{b - * ^^^ - * > | a b - * ^ - * ``` - * - * @type {State} - */ - function value(code) { - if (code === 59 && size) { - const token = effects.exit('characterReferenceValue') - if ( - test === asciiAlphanumeric && - !decodeNamedCharacterReference(self.sliceSerialize(token)) - ) { - return nok(code) - } - - // To do: `markdown-rs` uses a different name: - // `CharacterReferenceMarkerSemi`. - effects.enter('characterReferenceMarker') - effects.consume(code) - effects.exit('characterReferenceMarker') - effects.exit('characterReference') - return ok - } - if (test(code) && size++ < max) { - effects.consume(code) - return value - } - return nok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/character-escape.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - -/** @type {Construct} */ -const characterEscape = { - name: 'characterEscape', - tokenize: tokenizeCharacterEscape -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeCharacterEscape(effects, ok, nok) { - return start - - /** - * Start of character escape. - * - * ```markdown - * > | a\*b - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter('characterEscape') - effects.enter('escapeMarker') - effects.consume(code) - effects.exit('escapeMarker') - return inside - } - - /** - * After `\`, at punctuation. - * - * ```markdown - * > | a\*b - * ^ - * ``` - * - * @type {State} - */ - function inside(code) { - // ASCII punctuation. - if (asciiPunctuation(code)) { - effects.enter('characterEscapeValue') - effects.consume(code) - effects.exit('characterEscapeValue') - effects.exit('characterEscape') - return ok - } - return nok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/line-ending.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const lineEnding = { - name: 'lineEnding', - tokenize: tokenizeLineEnding -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeLineEnding(effects, ok) { - return start - - /** @type {State} */ - function start(code) { - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return factorySpace(effects, ok, 'linePrefix') - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/label-end.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').Event} Event - * @typedef {import('micromark-util-types').Resolver} Resolver - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').Token} Token - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - - - - - - - -/** @type {Construct} */ -const labelEnd = { - name: 'labelEnd', - tokenize: tokenizeLabelEnd, - resolveTo: resolveToLabelEnd, - resolveAll: resolveAllLabelEnd -} - -/** @type {Construct} */ -const resourceConstruct = { - tokenize: tokenizeResource -} -/** @type {Construct} */ -const referenceFullConstruct = { - tokenize: tokenizeReferenceFull -} -/** @type {Construct} */ -const referenceCollapsedConstruct = { - tokenize: tokenizeReferenceCollapsed -} - -/** @type {Resolver} */ -function resolveAllLabelEnd(events) { - let index = -1 - while (++index < events.length) { - const token = events[index][1] - if ( - token.type === 'labelImage' || - token.type === 'labelLink' || - token.type === 'labelEnd' - ) { - // Remove the marker. - events.splice(index + 1, token.type === 'labelImage' ? 4 : 2) - token.type = 'data' - index++ - } - } - return events -} - -/** @type {Resolver} */ -function resolveToLabelEnd(events, context) { - let index = events.length - let offset = 0 - /** @type {Token} */ - let token - /** @type {number | undefined} */ - let open - /** @type {number | undefined} */ - let close - /** @type {Array} */ - let media - - // Find an opening. - while (index--) { - token = events[index][1] - if (open) { - // If we see another link, or inactive link label, we’ve been here before. - if ( - token.type === 'link' || - (token.type === 'labelLink' && token._inactive) - ) { - break - } - - // Mark other link openings as inactive, as we can’t have links in - // links. - if (events[index][0] === 'enter' && token.type === 'labelLink') { - token._inactive = true - } - } else if (close) { - if ( - events[index][0] === 'enter' && - (token.type === 'labelImage' || token.type === 'labelLink') && - !token._balanced - ) { - open = index - if (token.type !== 'labelLink') { - offset = 2 - break - } - } - } else if (token.type === 'labelEnd') { - close = index - } - } - const group = { - type: events[open][1].type === 'labelLink' ? 'link' : 'image', - start: Object.assign({}, events[open][1].start), - end: Object.assign({}, events[events.length - 1][1].end) - } - const label = { - type: 'label', - start: Object.assign({}, events[open][1].start), - end: Object.assign({}, events[close][1].end) - } - const text = { - type: 'labelText', - start: Object.assign({}, events[open + offset + 2][1].end), - end: Object.assign({}, events[close - 2][1].start) - } - media = [ - ['enter', group, context], - ['enter', label, context] - ] - - // Opening marker. - media = push(media, events.slice(open + 1, open + offset + 3)) - - // Text open. - media = push(media, [['enter', text, context]]) - - // Always populated by defaults. - - // Between. - media = push( - media, - resolveAll( - context.parser.constructs.insideSpan.null, - events.slice(open + offset + 4, close - 3), - context - ) - ) - - // Text close, marker close, label close. - media = push(media, [ - ['exit', text, context], - events[close - 2], - events[close - 1], - ['exit', label, context] - ]) - - // Reference, resource, or so. - media = push(media, events.slice(close + 1)) - - // Media close. - media = push(media, [['exit', group, context]]) - splice(events, open, events.length, media) - return events -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeLabelEnd(effects, ok, nok) { - const self = this - let index = self.events.length - /** @type {Token} */ - let labelStart - /** @type {boolean} */ - let defined - - // Find an opening. - while (index--) { - if ( - (self.events[index][1].type === 'labelImage' || - self.events[index][1].type === 'labelLink') && - !self.events[index][1]._balanced - ) { - labelStart = self.events[index][1] - break - } - } - return start - - /** - * Start of label end. - * - * ```markdown - * > | [a](b) c - * ^ - * > | [a][b] c - * ^ - * > | [a][] b - * ^ - * > | [a] b - * ``` - * - * @type {State} - */ - function start(code) { - // If there is not an okay opening. - if (!labelStart) { - return nok(code) - } - - // If the corresponding label (link) start is marked as inactive, - // it means we’d be wrapping a link, like this: - // - // ```markdown - // > | a [b [c](d) e](f) g. - // ^ - // ``` - // - // We can’t have that, so it’s just balanced brackets. - if (labelStart._inactive) { - return labelEndNok(code) - } - defined = self.parser.defined.includes( - normalizeIdentifier( - self.sliceSerialize({ - start: labelStart.end, - end: self.now() - }) - ) - ) - effects.enter('labelEnd') - effects.enter('labelMarker') - effects.consume(code) - effects.exit('labelMarker') - effects.exit('labelEnd') - return after - } - - /** - * After `]`. - * - * ```markdown - * > | [a](b) c - * ^ - * > | [a][b] c - * ^ - * > | [a][] b - * ^ - * > | [a] b - * ^ - * ``` - * - * @type {State} - */ - function after(code) { - // Note: `markdown-rs` also parses GFM footnotes here, which for us is in - // an extension. - - // Resource (`[asd](fgh)`)? - if (code === 40) { - return effects.attempt( - resourceConstruct, - labelEndOk, - defined ? labelEndOk : labelEndNok - )(code) - } - - // Full (`[asd][fgh]`) or collapsed (`[asd][]`) reference? - if (code === 91) { - return effects.attempt( - referenceFullConstruct, - labelEndOk, - defined ? referenceNotFull : labelEndNok - )(code) - } - - // Shortcut (`[asd]`) reference? - return defined ? labelEndOk(code) : labelEndNok(code) - } - - /** - * After `]`, at `[`, but not at a full reference. - * - * > 👉 **Note**: we only get here if the label is defined. - * - * ```markdown - * > | [a][] b - * ^ - * > | [a] b - * ^ - * ``` - * - * @type {State} - */ - function referenceNotFull(code) { - return effects.attempt( - referenceCollapsedConstruct, - labelEndOk, - labelEndNok - )(code) - } - - /** - * Done, we found something. - * - * ```markdown - * > | [a](b) c - * ^ - * > | [a][b] c - * ^ - * > | [a][] b - * ^ - * > | [a] b - * ^ - * ``` - * - * @type {State} - */ - function labelEndOk(code) { - // Note: `markdown-rs` does a bunch of stuff here. - return ok(code) - } - - /** - * Done, it’s nothing. - * - * There was an okay opening, but we didn’t match anything. - * - * ```markdown - * > | [a](b c - * ^ - * > | [a][b c - * ^ - * > | [a] b - * ^ - * ``` - * - * @type {State} - */ - function labelEndNok(code) { - labelStart._balanced = true - return nok(code) - } -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeResource(effects, ok, nok) { - return resourceStart - - /** - * At a resource. - * - * ```markdown - * > | [a](b) c - * ^ - * ``` - * - * @type {State} - */ - function resourceStart(code) { - effects.enter('resource') - effects.enter('resourceMarker') - effects.consume(code) - effects.exit('resourceMarker') - return resourceBefore - } - - /** - * In resource, after `(`, at optional whitespace. - * - * ```markdown - * > | [a](b) c - * ^ - * ``` - * - * @type {State} - */ - function resourceBefore(code) { - return markdownLineEndingOrSpace(code) - ? factoryWhitespace(effects, resourceOpen)(code) - : resourceOpen(code) - } - - /** - * In resource, after optional whitespace, at `)` or a destination. - * - * ```markdown - * > | [a](b) c - * ^ - * ``` - * - * @type {State} - */ - function resourceOpen(code) { - if (code === 41) { - return resourceEnd(code) - } - return factoryDestination( - effects, - resourceDestinationAfter, - resourceDestinationMissing, - 'resourceDestination', - 'resourceDestinationLiteral', - 'resourceDestinationLiteralMarker', - 'resourceDestinationRaw', - 'resourceDestinationString', - 32 - )(code) - } - - /** - * In resource, after destination, at optional whitespace. - * - * ```markdown - * > | [a](b) c - * ^ - * ``` - * - * @type {State} - */ - function resourceDestinationAfter(code) { - return markdownLineEndingOrSpace(code) - ? factoryWhitespace(effects, resourceBetween)(code) - : resourceEnd(code) - } - - /** - * At invalid destination. - * - * ```markdown - * > | [a](<<) b - * ^ - * ``` - * - * @type {State} - */ - function resourceDestinationMissing(code) { - return nok(code) - } - - /** - * In resource, after destination and whitespace, at `(` or title. - * - * ```markdown - * > | [a](b ) c - * ^ - * ``` - * - * @type {State} - */ - function resourceBetween(code) { - if (code === 34 || code === 39 || code === 40) { - return factoryTitle( - effects, - resourceTitleAfter, - nok, - 'resourceTitle', - 'resourceTitleMarker', - 'resourceTitleString' - )(code) - } - return resourceEnd(code) - } - - /** - * In resource, after title, at optional whitespace. - * - * ```markdown - * > | [a](b "c") d - * ^ - * ``` - * - * @type {State} - */ - function resourceTitleAfter(code) { - return markdownLineEndingOrSpace(code) - ? factoryWhitespace(effects, resourceEnd)(code) - : resourceEnd(code) - } - - /** - * In resource, at `)`. - * - * ```markdown - * > | [a](b) d - * ^ - * ``` - * - * @type {State} - */ - function resourceEnd(code) { - if (code === 41) { - effects.enter('resourceMarker') - effects.consume(code) - effects.exit('resourceMarker') - effects.exit('resource') - return ok - } - return nok(code) - } -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeReferenceFull(effects, ok, nok) { - const self = this - return referenceFull - - /** - * In a reference (full), at the `[`. - * - * ```markdown - * > | [a][b] d - * ^ - * ``` - * - * @type {State} - */ - function referenceFull(code) { - return factoryLabel.call( - self, - effects, - referenceFullAfter, - referenceFullMissing, - 'reference', - 'referenceMarker', - 'referenceString' - )(code) - } - - /** - * In a reference (full), after `]`. - * - * ```markdown - * > | [a][b] d - * ^ - * ``` - * - * @type {State} - */ - function referenceFullAfter(code) { - return self.parser.defined.includes( - normalizeIdentifier( - self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1) - ) - ) - ? ok(code) - : nok(code) - } - - /** - * In reference (full) that was missing. - * - * ```markdown - * > | [a][b d - * ^ - * ``` - * - * @type {State} - */ - function referenceFullMissing(code) { - return nok(code) - } -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeReferenceCollapsed(effects, ok, nok) { - return referenceCollapsedStart - - /** - * In reference (collapsed), at `[`. - * - * > 👉 **Note**: we only get here if the label is defined. - * - * ```markdown - * > | [a][] d - * ^ - * ``` - * - * @type {State} - */ - function referenceCollapsedStart(code) { - // We only attempt a collapsed label if there’s a `[`. - - effects.enter('reference') - effects.enter('referenceMarker') - effects.consume(code) - effects.exit('referenceMarker') - return referenceCollapsedOpen - } - - /** - * In reference (collapsed), at `]`. - * - * > 👉 **Note**: we only get here if the label is defined. - * - * ```markdown - * > | [a][] d - * ^ - * ``` - * - * @type {State} - */ - function referenceCollapsedOpen(code) { - if (code === 93) { - effects.enter('referenceMarker') - effects.consume(code) - effects.exit('referenceMarker') - effects.exit('reference') - return ok - } - return nok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/label-start-image.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const labelStartImage = { - name: 'labelStartImage', - tokenize: tokenizeLabelStartImage, - resolveAll: labelEnd.resolveAll -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeLabelStartImage(effects, ok, nok) { - const self = this - return start - - /** - * Start of label (image) start. - * - * ```markdown - * > | a ![b] c - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter('labelImage') - effects.enter('labelImageMarker') - effects.consume(code) - effects.exit('labelImageMarker') - return open - } - - /** - * After `!`, at `[`. - * - * ```markdown - * > | a ![b] c - * ^ - * ``` - * - * @type {State} - */ - function open(code) { - if (code === 91) { - effects.enter('labelMarker') - effects.consume(code) - effects.exit('labelMarker') - effects.exit('labelImage') - return after - } - return nok(code) - } - - /** - * After `![`. - * - * ```markdown - * > | a ![b] c - * ^ - * ``` - * - * This is needed in because, when GFM footnotes are enabled, images never - * form when started with a `^`. - * Instead, links form: - * - * ```markdown - * ![^a](b) - * - * ![^a][b] - * - * [b]: c - * ``` - * - * ```html - *

    !^a

    - *

    !^a

    - * ``` - * - * @type {State} - */ - function after(code) { - // To do: use a new field to do this, this is still needed for - // `micromark-extension-gfm-footnote`, but the `label-start-link` - // behavior isn’t. - // Hidden footnotes hook. - /* c8 ignore next 3 */ - return code === 94 && '_hiddenFootnoteSupport' in self.parser.constructs - ? nok(code) - : ok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-classify-character/index.js -/** - * @typedef {import('micromark-util-types').Code} Code - */ - - -/** - * Classify whether a code represents whitespace, punctuation, or something - * else. - * - * Used for attention (emphasis, strong), whose sequences can open or close - * based on the class of surrounding characters. - * - * > 👉 **Note**: eof (`null`) is seen as whitespace. - * - * @param {Code} code - * Code. - * @returns {typeof constants.characterGroupWhitespace | typeof constants.characterGroupPunctuation | undefined} - * Group. - */ -function classifyCharacter(code) { - if ( - code === null || - markdownLineEndingOrSpace(code) || - unicodeWhitespace(code) - ) { - return 1 - } - if (unicodePunctuation(code)) { - return 2 - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/attention.js -/** - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').Event} Event - * @typedef {import('micromark-util-types').Point} Point - * @typedef {import('micromark-util-types').Resolver} Resolver - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').Token} Token - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - - -/** @type {Construct} */ -const attention = { - name: 'attention', - tokenize: tokenizeAttention, - resolveAll: resolveAllAttention -} - -/** - * Take all events and resolve attention to emphasis or strong. - * - * @type {Resolver} - */ -function resolveAllAttention(events, context) { - let index = -1 - /** @type {number} */ - let open - /** @type {Token} */ - let group - /** @type {Token} */ - let text - /** @type {Token} */ - let openingSequence - /** @type {Token} */ - let closingSequence - /** @type {number} */ - let use - /** @type {Array} */ - let nextEvents - /** @type {number} */ - let offset - - // Walk through all events. - // - // Note: performance of this is fine on an mb of normal markdown, but it’s - // a bottleneck for malicious stuff. - while (++index < events.length) { - // Find a token that can close. - if ( - events[index][0] === 'enter' && - events[index][1].type === 'attentionSequence' && - events[index][1]._close - ) { - open = index - - // Now walk back to find an opener. - while (open--) { - // Find a token that can open the closer. - if ( - events[open][0] === 'exit' && - events[open][1].type === 'attentionSequence' && - events[open][1]._open && - // If the markers are the same: - context.sliceSerialize(events[open][1]).charCodeAt(0) === - context.sliceSerialize(events[index][1]).charCodeAt(0) - ) { - // If the opening can close or the closing can open, - // and the close size *is not* a multiple of three, - // but the sum of the opening and closing size *is* multiple of three, - // then don’t match. - if ( - (events[open][1]._close || events[index][1]._open) && - (events[index][1].end.offset - events[index][1].start.offset) % 3 && - !( - (events[open][1].end.offset - - events[open][1].start.offset + - events[index][1].end.offset - - events[index][1].start.offset) % - 3 - ) - ) { - continue - } - - // Number of markers to use from the sequence. - use = - events[open][1].end.offset - events[open][1].start.offset > 1 && - events[index][1].end.offset - events[index][1].start.offset > 1 - ? 2 - : 1 - const start = Object.assign({}, events[open][1].end) - const end = Object.assign({}, events[index][1].start) - movePoint(start, -use) - movePoint(end, use) - openingSequence = { - type: use > 1 ? 'strongSequence' : 'emphasisSequence', - start, - end: Object.assign({}, events[open][1].end) - } - closingSequence = { - type: use > 1 ? 'strongSequence' : 'emphasisSequence', - start: Object.assign({}, events[index][1].start), - end - } - text = { - type: use > 1 ? 'strongText' : 'emphasisText', - start: Object.assign({}, events[open][1].end), - end: Object.assign({}, events[index][1].start) - } - group = { - type: use > 1 ? 'strong' : 'emphasis', - start: Object.assign({}, openingSequence.start), - end: Object.assign({}, closingSequence.end) - } - events[open][1].end = Object.assign({}, openingSequence.start) - events[index][1].start = Object.assign({}, closingSequence.end) - nextEvents = [] - - // If there are more markers in the opening, add them before. - if (events[open][1].end.offset - events[open][1].start.offset) { - nextEvents = push(nextEvents, [ - ['enter', events[open][1], context], - ['exit', events[open][1], context] - ]) - } - - // Opening. - nextEvents = push(nextEvents, [ - ['enter', group, context], - ['enter', openingSequence, context], - ['exit', openingSequence, context], - ['enter', text, context] - ]) - - // Always populated by defaults. - - // Between. - nextEvents = push( - nextEvents, - resolveAll( - context.parser.constructs.insideSpan.null, - events.slice(open + 1, index), - context - ) - ) - - // Closing. - nextEvents = push(nextEvents, [ - ['exit', text, context], - ['enter', closingSequence, context], - ['exit', closingSequence, context], - ['exit', group, context] - ]) - - // If there are more markers in the closing, add them after. - if (events[index][1].end.offset - events[index][1].start.offset) { - offset = 2 - nextEvents = push(nextEvents, [ - ['enter', events[index][1], context], - ['exit', events[index][1], context] - ]) - } else { - offset = 0 - } - splice(events, open - 1, index - open + 3, nextEvents) - index = open + nextEvents.length - offset - 2 - break - } - } - } - } - - // Remove remaining sequences. - index = -1 - while (++index < events.length) { - if (events[index][1].type === 'attentionSequence') { - events[index][1].type = 'data' - } - } - return events -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeAttention(effects, ok) { - const attentionMarkers = this.parser.constructs.attentionMarkers.null - const previous = this.previous - const before = classifyCharacter(previous) - - /** @type {NonNullable} */ - let marker - return start - - /** - * Before a sequence. - * - * ```markdown - * > | ** - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - marker = code - effects.enter('attentionSequence') - return inside(code) - } - - /** - * In a sequence. - * - * ```markdown - * > | ** - * ^^ - * ``` - * - * @type {State} - */ - function inside(code) { - if (code === marker) { - effects.consume(code) - return inside - } - const token = effects.exit('attentionSequence') - - // To do: next major: move this to resolver, just like `markdown-rs`. - const after = classifyCharacter(code) - - // Always populated by defaults. - - const open = - !after || (after === 2 && before) || attentionMarkers.includes(code) - const close = - !before || (before === 2 && after) || attentionMarkers.includes(previous) - token._open = Boolean(marker === 42 ? open : open && (before || !close)) - token._close = Boolean(marker === 42 ? close : close && (after || !open)) - return ok(code) - } -} - -/** - * Move a point a bit. - * - * Note: `move` only works inside lines! It’s not possible to move past other - * chunks (replacement characters, tabs, or line endings). - * - * @param {Point} point - * @param {number} offset - * @returns {void} - */ -function movePoint(point, offset) { - point.column += offset - point.offset += offset - point._bufferIndex += offset -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/autolink.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - -/** @type {Construct} */ -const autolink = { - name: 'autolink', - tokenize: tokenizeAutolink -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeAutolink(effects, ok, nok) { - let size = 0 - return start - - /** - * Start of an autolink. - * - * ```markdown - * > | ab - * ^ - * > | ab - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter('autolink') - effects.enter('autolinkMarker') - effects.consume(code) - effects.exit('autolinkMarker') - effects.enter('autolinkProtocol') - return open - } - - /** - * After `<`, at protocol or atext. - * - * ```markdown - * > | ab - * ^ - * > | ab - * ^ - * ``` - * - * @type {State} - */ - function open(code) { - if (asciiAlpha(code)) { - effects.consume(code) - return schemeOrEmailAtext - } - return emailAtext(code) - } - - /** - * At second byte of protocol or atext. - * - * ```markdown - * > | ab - * ^ - * > | ab - * ^ - * ``` - * - * @type {State} - */ - function schemeOrEmailAtext(code) { - // ASCII alphanumeric and `+`, `-`, and `.`. - if (code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code)) { - // Count the previous alphabetical from `open` too. - size = 1 - return schemeInsideOrEmailAtext(code) - } - return emailAtext(code) - } - - /** - * In ambiguous protocol or atext. - * - * ```markdown - * > | ab - * ^ - * > | ab - * ^ - * ``` - * - * @type {State} - */ - function schemeInsideOrEmailAtext(code) { - if (code === 58) { - effects.consume(code) - size = 0 - return urlInside - } - - // ASCII alphanumeric and `+`, `-`, and `.`. - if ( - (code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code)) && - size++ < 32 - ) { - effects.consume(code) - return schemeInsideOrEmailAtext - } - size = 0 - return emailAtext(code) - } - - /** - * After protocol, in URL. - * - * ```markdown - * > | ab - * ^ - * ``` - * - * @type {State} - */ - function urlInside(code) { - if (code === 62) { - effects.exit('autolinkProtocol') - effects.enter('autolinkMarker') - effects.consume(code) - effects.exit('autolinkMarker') - effects.exit('autolink') - return ok - } - - // ASCII control, space, or `<`. - if (code === null || code === 32 || code === 60 || asciiControl(code)) { - return nok(code) - } - effects.consume(code) - return urlInside - } - - /** - * In email atext. - * - * ```markdown - * > | ab - * ^ - * ``` - * - * @type {State} - */ - function emailAtext(code) { - if (code === 64) { - effects.consume(code) - return emailAtSignOrDot - } - if (asciiAtext(code)) { - effects.consume(code) - return emailAtext - } - return nok(code) - } - - /** - * In label, after at-sign or dot. - * - * ```markdown - * > | ab - * ^ ^ - * ``` - * - * @type {State} - */ - function emailAtSignOrDot(code) { - return asciiAlphanumeric(code) ? emailLabel(code) : nok(code) - } - - /** - * In label, where `.` and `>` are allowed. - * - * ```markdown - * > | ab - * ^ - * ``` - * - * @type {State} - */ - function emailLabel(code) { - if (code === 46) { - effects.consume(code) - size = 0 - return emailAtSignOrDot - } - if (code === 62) { - // Exit, then change the token type. - effects.exit('autolinkProtocol').type = 'autolinkEmail' - effects.enter('autolinkMarker') - effects.consume(code) - effects.exit('autolinkMarker') - effects.exit('autolink') - return ok - } - return emailValue(code) - } - - /** - * In label, where `.` and `>` are *not* allowed. - * - * Though, this is also used in `emailLabel` to parse other values. - * - * ```markdown - * > | ab - * ^ - * ``` - * - * @type {State} - */ - function emailValue(code) { - // ASCII alphanumeric or `-`. - if ((code === 45 || asciiAlphanumeric(code)) && size++ < 63) { - const next = code === 45 ? emailValue : emailLabel - effects.consume(code) - return next - } - return nok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/html-text.js -/** - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const htmlText = { - name: 'htmlText', - tokenize: tokenizeHtmlText -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeHtmlText(effects, ok, nok) { - const self = this - /** @type {NonNullable | undefined} */ - let marker - /** @type {number} */ - let index - /** @type {State} */ - let returnState - return start - - /** - * Start of HTML (text). - * - * ```markdown - * > | a c - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter('htmlText') - effects.enter('htmlTextData') - effects.consume(code) - return open - } - - /** - * After `<`, at tag name or other stuff. - * - * ```markdown - * > | a c - * ^ - * > | a c - * ^ - * > | a c - * ^ - * ``` - * - * @type {State} - */ - function open(code) { - if (code === 33) { - effects.consume(code) - return declarationOpen - } - if (code === 47) { - effects.consume(code) - return tagCloseStart - } - if (code === 63) { - effects.consume(code) - return instruction - } - - // ASCII alphabetical. - if (asciiAlpha(code)) { - effects.consume(code) - return tagOpen - } - return nok(code) - } - - /** - * After ` | a c - * ^ - * > | a c - * ^ - * > | a &<]]> c - * ^ - * ``` - * - * @type {State} - */ - function declarationOpen(code) { - if (code === 45) { - effects.consume(code) - return commentOpenInside - } - if (code === 91) { - effects.consume(code) - index = 0 - return cdataOpenInside - } - if (asciiAlpha(code)) { - effects.consume(code) - return declaration - } - return nok(code) - } - - /** - * In a comment, after ` | a c - * ^ - * ``` - * - * @type {State} - */ - function commentOpenInside(code) { - if (code === 45) { - effects.consume(code) - return commentEnd - } - return nok(code) - } - - /** - * In comment. - * - * ```markdown - * > | a c - * ^ - * ``` - * - * @type {State} - */ - function comment(code) { - if (code === null) { - return nok(code) - } - if (code === 45) { - effects.consume(code) - return commentClose - } - if (markdownLineEnding(code)) { - returnState = comment - return lineEndingBefore(code) - } - effects.consume(code) - return comment - } - - /** - * In comment, after `-`. - * - * ```markdown - * > | a c - * ^ - * ``` - * - * @type {State} - */ - function commentClose(code) { - if (code === 45) { - effects.consume(code) - return commentEnd - } - return comment(code) - } - - /** - * In comment, after `--`. - * - * ```markdown - * > | a c - * ^ - * ``` - * - * @type {State} - */ - function commentEnd(code) { - return code === 62 - ? end(code) - : code === 45 - ? commentClose(code) - : comment(code) - } - - /** - * After ` | a &<]]> b - * ^^^^^^ - * ``` - * - * @type {State} - */ - function cdataOpenInside(code) { - const value = 'CDATA[' - if (code === value.charCodeAt(index++)) { - effects.consume(code) - return index === value.length ? cdata : cdataOpenInside - } - return nok(code) - } - - /** - * In CDATA. - * - * ```markdown - * > | a &<]]> b - * ^^^ - * ``` - * - * @type {State} - */ - function cdata(code) { - if (code === null) { - return nok(code) - } - if (code === 93) { - effects.consume(code) - return cdataClose - } - if (markdownLineEnding(code)) { - returnState = cdata - return lineEndingBefore(code) - } - effects.consume(code) - return cdata - } - - /** - * In CDATA, after `]`, at another `]`. - * - * ```markdown - * > | a &<]]> b - * ^ - * ``` - * - * @type {State} - */ - function cdataClose(code) { - if (code === 93) { - effects.consume(code) - return cdataEnd - } - return cdata(code) - } - - /** - * In CDATA, after `]]`, at `>`. - * - * ```markdown - * > | a &<]]> b - * ^ - * ``` - * - * @type {State} - */ - function cdataEnd(code) { - if (code === 62) { - return end(code) - } - if (code === 93) { - effects.consume(code) - return cdataEnd - } - return cdata(code) - } - - /** - * In declaration. - * - * ```markdown - * > | a c - * ^ - * ``` - * - * @type {State} - */ - function declaration(code) { - if (code === null || code === 62) { - return end(code) - } - if (markdownLineEnding(code)) { - returnState = declaration - return lineEndingBefore(code) - } - effects.consume(code) - return declaration - } - - /** - * In instruction. - * - * ```markdown - * > | a c - * ^ - * ``` - * - * @type {State} - */ - function instruction(code) { - if (code === null) { - return nok(code) - } - if (code === 63) { - effects.consume(code) - return instructionClose - } - if (markdownLineEnding(code)) { - returnState = instruction - return lineEndingBefore(code) - } - effects.consume(code) - return instruction - } - - /** - * In instruction, after `?`, at `>`. - * - * ```markdown - * > | a c - * ^ - * ``` - * - * @type {State} - */ - function instructionClose(code) { - return code === 62 ? end(code) : instruction(code) - } - - /** - * After ` | a c - * ^ - * ``` - * - * @type {State} - */ - function tagCloseStart(code) { - // ASCII alphabetical. - if (asciiAlpha(code)) { - effects.consume(code) - return tagClose - } - return nok(code) - } - - /** - * After ` | a c - * ^ - * ``` - * - * @type {State} - */ - function tagClose(code) { - // ASCII alphanumerical and `-`. - if (code === 45 || asciiAlphanumeric(code)) { - effects.consume(code) - return tagClose - } - return tagCloseBetween(code) - } - - /** - * In closing tag, after tag name. - * - * ```markdown - * > | a
    c - * ^ - * ``` - * - * @type {State} - */ - function tagCloseBetween(code) { - if (markdownLineEnding(code)) { - returnState = tagCloseBetween - return lineEndingBefore(code) - } - if (markdownSpace(code)) { - effects.consume(code) - return tagCloseBetween - } - return end(code) - } - - /** - * After ` | a c - * ^ - * ``` - * - * @type {State} - */ - function tagOpen(code) { - // ASCII alphanumerical and `-`. - if (code === 45 || asciiAlphanumeric(code)) { - effects.consume(code) - return tagOpen - } - if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) { - return tagOpenBetween(code) - } - return nok(code) - } - - /** - * In opening tag, after tag name. - * - * ```markdown - * > | a c - * ^ - * ``` - * - * @type {State} - */ - function tagOpenBetween(code) { - if (code === 47) { - effects.consume(code) - return end - } - - // ASCII alphabetical and `:` and `_`. - if (code === 58 || code === 95 || asciiAlpha(code)) { - effects.consume(code) - return tagOpenAttributeName - } - if (markdownLineEnding(code)) { - returnState = tagOpenBetween - return lineEndingBefore(code) - } - if (markdownSpace(code)) { - effects.consume(code) - return tagOpenBetween - } - return end(code) - } - - /** - * In attribute name. - * - * ```markdown - * > | a d - * ^ - * ``` - * - * @type {State} - */ - function tagOpenAttributeName(code) { - // ASCII alphabetical and `-`, `.`, `:`, and `_`. - if ( - code === 45 || - code === 46 || - code === 58 || - code === 95 || - asciiAlphanumeric(code) - ) { - effects.consume(code) - return tagOpenAttributeName - } - return tagOpenAttributeNameAfter(code) - } - - /** - * After attribute name, before initializer, the end of the tag, or - * whitespace. - * - * ```markdown - * > | a d - * ^ - * ``` - * - * @type {State} - */ - function tagOpenAttributeNameAfter(code) { - if (code === 61) { - effects.consume(code) - return tagOpenAttributeValueBefore - } - if (markdownLineEnding(code)) { - returnState = tagOpenAttributeNameAfter - return lineEndingBefore(code) - } - if (markdownSpace(code)) { - effects.consume(code) - return tagOpenAttributeNameAfter - } - return tagOpenBetween(code) - } - - /** - * Before unquoted, double quoted, or single quoted attribute value, allowing - * whitespace. - * - * ```markdown - * > | a e - * ^ - * ``` - * - * @type {State} - */ - function tagOpenAttributeValueBefore(code) { - if ( - code === null || - code === 60 || - code === 61 || - code === 62 || - code === 96 - ) { - return nok(code) - } - if (code === 34 || code === 39) { - effects.consume(code) - marker = code - return tagOpenAttributeValueQuoted - } - if (markdownLineEnding(code)) { - returnState = tagOpenAttributeValueBefore - return lineEndingBefore(code) - } - if (markdownSpace(code)) { - effects.consume(code) - return tagOpenAttributeValueBefore - } - effects.consume(code) - return tagOpenAttributeValueUnquoted - } - - /** - * In double or single quoted attribute value. - * - * ```markdown - * > | a e - * ^ - * ``` - * - * @type {State} - */ - function tagOpenAttributeValueQuoted(code) { - if (code === marker) { - effects.consume(code) - marker = undefined - return tagOpenAttributeValueQuotedAfter - } - if (code === null) { - return nok(code) - } - if (markdownLineEnding(code)) { - returnState = tagOpenAttributeValueQuoted - return lineEndingBefore(code) - } - effects.consume(code) - return tagOpenAttributeValueQuoted - } - - /** - * In unquoted attribute value. - * - * ```markdown - * > | a e - * ^ - * ``` - * - * @type {State} - */ - function tagOpenAttributeValueUnquoted(code) { - if ( - code === null || - code === 34 || - code === 39 || - code === 60 || - code === 61 || - code === 96 - ) { - return nok(code) - } - if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) { - return tagOpenBetween(code) - } - effects.consume(code) - return tagOpenAttributeValueUnquoted - } - - /** - * After double or single quoted attribute value, before whitespace or the end - * of the tag. - * - * ```markdown - * > | a e - * ^ - * ``` - * - * @type {State} - */ - function tagOpenAttributeValueQuotedAfter(code) { - if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) { - return tagOpenBetween(code) - } - return nok(code) - } - - /** - * In certain circumstances of a tag where only an `>` is allowed. - * - * ```markdown - * > | a e - * ^ - * ``` - * - * @type {State} - */ - function end(code) { - if (code === 62) { - effects.consume(code) - effects.exit('htmlTextData') - effects.exit('htmlText') - return ok - } - return nok(code) - } - - /** - * At eol. - * - * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about - * > empty tokens. - * - * ```markdown - * > | a - * ``` - * - * @type {State} - */ - function lineEndingBefore(code) { - effects.exit('htmlTextData') - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return lineEndingAfter - } - - /** - * After eol, at optional whitespace. - * - * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about - * > empty tokens. - * - * ```markdown - * | a - * ^ - * ``` - * - * @type {State} - */ - function lineEndingAfter(code) { - // Always populated by defaults. - - return markdownSpace(code) - ? factorySpace( - effects, - lineEndingAfterPrefix, - 'linePrefix', - self.parser.constructs.disable.null.includes('codeIndented') - ? undefined - : 4 - )(code) - : lineEndingAfterPrefix(code) - } - - /** - * After eol, after optional whitespace. - * - * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about - * > empty tokens. - * - * ```markdown - * | a - * ^ - * ``` - * - * @type {State} - */ - function lineEndingAfterPrefix(code) { - effects.enter('htmlTextData') - return returnState(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/label-start-link.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const labelStartLink = { - name: 'labelStartLink', - tokenize: tokenizeLabelStartLink, - resolveAll: labelEnd.resolveAll -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeLabelStartLink(effects, ok, nok) { - const self = this - return start - - /** - * Start of label (link) start. - * - * ```markdown - * > | a [b] c - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter('labelLink') - effects.enter('labelMarker') - effects.consume(code) - effects.exit('labelMarker') - effects.exit('labelLink') - return after - } - - /** @type {State} */ - function after(code) { - // To do: this isn’t needed in `micromark-extension-gfm-footnote`, - // remove. - // Hidden footnotes hook. - /* c8 ignore next 3 */ - return code === 94 && '_hiddenFootnoteSupport' in self.parser.constructs - ? nok(code) - : ok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/hard-break-escape.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - -/** @type {Construct} */ -const hardBreakEscape = { - name: 'hardBreakEscape', - tokenize: tokenizeHardBreakEscape -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeHardBreakEscape(effects, ok, nok) { - return start - - /** - * Start of a hard break (escape). - * - * ```markdown - * > | a\ - * ^ - * | b - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter('hardBreakEscape') - effects.consume(code) - return after - } - - /** - * After `\`, at eol. - * - * ```markdown - * > | a\ - * ^ - * | b - * ``` - * - * @type {State} - */ - function after(code) { - if (markdownLineEnding(code)) { - effects.exit('hardBreakEscape') - return ok(code) - } - return nok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/code-text.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').Previous} Previous - * @typedef {import('micromark-util-types').Resolver} Resolver - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').Token} Token - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - -/** @type {Construct} */ -const codeText = { - name: 'codeText', - tokenize: tokenizeCodeText, - resolve: resolveCodeText, - previous -} - -// To do: next major: don’t resolve, like `markdown-rs`. -/** @type {Resolver} */ -function resolveCodeText(events) { - let tailExitIndex = events.length - 4 - let headEnterIndex = 3 - /** @type {number} */ - let index - /** @type {number | undefined} */ - let enter - - // If we start and end with an EOL or a space. - if ( - (events[headEnterIndex][1].type === 'lineEnding' || - events[headEnterIndex][1].type === 'space') && - (events[tailExitIndex][1].type === 'lineEnding' || - events[tailExitIndex][1].type === 'space') - ) { - index = headEnterIndex - - // And we have data. - while (++index < tailExitIndex) { - if (events[index][1].type === 'codeTextData') { - // Then we have padding. - events[headEnterIndex][1].type = 'codeTextPadding' - events[tailExitIndex][1].type = 'codeTextPadding' - headEnterIndex += 2 - tailExitIndex -= 2 - break - } - } - } - - // Merge adjacent spaces and data. - index = headEnterIndex - 1 - tailExitIndex++ - while (++index <= tailExitIndex) { - if (enter === undefined) { - if (index !== tailExitIndex && events[index][1].type !== 'lineEnding') { - enter = index - } - } else if ( - index === tailExitIndex || - events[index][1].type === 'lineEnding' - ) { - events[enter][1].type = 'codeTextData' - if (index !== enter + 2) { - events[enter][1].end = events[index - 1][1].end - events.splice(enter + 2, index - enter - 2) - tailExitIndex -= index - enter - 2 - index = enter + 2 - } - enter = undefined - } - } - return events -} - -/** - * @this {TokenizeContext} - * @type {Previous} - */ -function previous(code) { - // If there is a previous code, there will always be a tail. - return ( - code !== 96 || - this.events[this.events.length - 1][1].type === 'characterEscape' - ) -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeCodeText(effects, ok, nok) { - const self = this - let sizeOpen = 0 - /** @type {number} */ - let size - /** @type {Token} */ - let token - return start - - /** - * Start of code (text). - * - * ```markdown - * > | `a` - * ^ - * > | \`a` - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter('codeText') - effects.enter('codeTextSequence') - return sequenceOpen(code) - } - - /** - * In opening sequence. - * - * ```markdown - * > | `a` - * ^ - * ``` - * - * @type {State} - */ - function sequenceOpen(code) { - if (code === 96) { - effects.consume(code) - sizeOpen++ - return sequenceOpen - } - effects.exit('codeTextSequence') - return between(code) - } - - /** - * Between something and something else. - * - * ```markdown - * > | `a` - * ^^ - * ``` - * - * @type {State} - */ - function between(code) { - // EOF. - if (code === null) { - return nok(code) - } - - // To do: next major: don’t do spaces in resolve, but when compiling, - // like `markdown-rs`. - // Tabs don’t work, and virtual spaces don’t make sense. - if (code === 32) { - effects.enter('space') - effects.consume(code) - effects.exit('space') - return between - } - - // Closing fence? Could also be data. - if (code === 96) { - token = effects.enter('codeTextSequence') - size = 0 - return sequenceClose(code) - } - if (markdownLineEnding(code)) { - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return between - } - - // Data. - effects.enter('codeTextData') - return data(code) - } - - /** - * In data. - * - * ```markdown - * > | `a` - * ^ - * ``` - * - * @type {State} - */ - function data(code) { - if ( - code === null || - code === 32 || - code === 96 || - markdownLineEnding(code) - ) { - effects.exit('codeTextData') - return between(code) - } - effects.consume(code) - return data - } - - /** - * In closing sequence. - * - * ```markdown - * > | `a` - * ^ - * ``` - * - * @type {State} - */ - function sequenceClose(code) { - // More. - if (code === 96) { - effects.consume(code) - size++ - return sequenceClose - } - - // Done! - if (size === sizeOpen) { - effects.exit('codeTextSequence') - effects.exit('codeText') - return ok(code) - } - - // More or less accents: mark as data. - token.type = 'codeTextData' - return data(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/constructs.js -/** - * @typedef {import('micromark-util-types').Extension} Extension - */ - - - - -/** @satisfies {Extension['document']} */ -const constructs_document = { - [42]: list, - [43]: list, - [45]: list, - [48]: list, - [49]: list, - [50]: list, - [51]: list, - [52]: list, - [53]: list, - [54]: list, - [55]: list, - [56]: list, - [57]: list, - [62]: blockQuote -} - -/** @satisfies {Extension['contentInitial']} */ -const contentInitial = { - [91]: definition -} - -/** @satisfies {Extension['flowInitial']} */ -const flowInitial = { - [-2]: codeIndented, - [-1]: codeIndented, - [32]: codeIndented -} - -/** @satisfies {Extension['flow']} */ -const constructs_flow = { - [35]: headingAtx, - [42]: thematicBreak, - [45]: [setextUnderline, thematicBreak], - [60]: htmlFlow, - [61]: setextUnderline, - [95]: thematicBreak, - [96]: codeFenced, - [126]: codeFenced -} - -/** @satisfies {Extension['string']} */ -const constructs_string = { - [38]: characterReference, - [92]: characterEscape -} - -/** @satisfies {Extension['text']} */ -const constructs_text = { - [-5]: lineEnding, - [-4]: lineEnding, - [-3]: lineEnding, - [33]: labelStartImage, - [38]: characterReference, - [42]: attention, - [60]: [autolink, htmlText], - [91]: labelStartLink, - [92]: [hardBreakEscape, characterEscape], - [93]: labelEnd, - [95]: attention, - [96]: codeText -} - -/** @satisfies {Extension['insideSpan']} */ -const insideSpan = { - null: [attention, resolver] -} - -/** @satisfies {Extension['attentionMarkers']} */ -const attentionMarkers = { - null: [42, 95] -} - -/** @satisfies {Extension['disable']} */ -const disable = { - null: [] -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/parse.js -/** - * @typedef {import('micromark-util-types').Create} Create - * @typedef {import('micromark-util-types').FullNormalizedExtension} FullNormalizedExtension - * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct - * @typedef {import('micromark-util-types').ParseContext} ParseContext - * @typedef {import('micromark-util-types').ParseOptions} ParseOptions - */ - - - - - - - - - -/** - * @param {ParseOptions | null | undefined} [options] - * @returns {ParseContext} - */ -function parse(options) { - const settings = options || {} - const constructs = - /** @type {FullNormalizedExtension} */ - combineExtensions([constructs_namespaceObject, ...(settings.extensions || [])]) - - /** @type {ParseContext} */ - const parser = { - defined: [], - lazy: {}, - constructs, - content: create(content), - document: create(document_document), - flow: create(flow), - string: create(string), - text: create(text_text) - } - return parser - - /** - * @param {InitialConstruct} initial - */ - function create(initial) { - return creator - /** @type {Create} */ - function creator(from) { - return createTokenizer(parser, initial, from) - } - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/preprocess.js -/** - * @typedef {import('micromark-util-types').Chunk} Chunk - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Encoding} Encoding - * @typedef {import('micromark-util-types').Value} Value - */ - -/** - * @callback Preprocessor - * @param {Value} value - * @param {Encoding | null | undefined} [encoding] - * @param {boolean | null | undefined} [end=false] - * @returns {Array} - */ - -const search = /[\0\t\n\r]/g - -/** - * @returns {Preprocessor} - */ -function preprocess() { - let column = 1 - let buffer = '' - /** @type {boolean | undefined} */ - let start = true - /** @type {boolean | undefined} */ - let atCarriageReturn - return preprocessor - - /** @type {Preprocessor} */ - function preprocessor(value, encoding, end) { - /** @type {Array} */ - const chunks = [] - /** @type {RegExpMatchArray | null} */ - let match - /** @type {number} */ - let next - /** @type {number} */ - let startPosition - /** @type {number} */ - let endPosition - /** @type {Code} */ - let code - - // @ts-expect-error `Buffer` does allow an encoding. - value = buffer + value.toString(encoding) - startPosition = 0 - buffer = '' - if (start) { - // To do: `markdown-rs` actually parses BOMs (byte order mark). - if (value.charCodeAt(0) === 65279) { - startPosition++ - } - start = undefined - } - while (startPosition < value.length) { - search.lastIndex = startPosition - match = search.exec(value) - endPosition = - match && match.index !== undefined ? match.index : value.length - code = value.charCodeAt(endPosition) - if (!match) { - buffer = value.slice(startPosition) - break - } - if (code === 10 && startPosition === endPosition && atCarriageReturn) { - chunks.push(-3) - atCarriageReturn = undefined - } else { - if (atCarriageReturn) { - chunks.push(-5) - atCarriageReturn = undefined - } - if (startPosition < endPosition) { - chunks.push(value.slice(startPosition, endPosition)) - column += endPosition - startPosition - } - switch (code) { - case 0: { - chunks.push(65533) - column++ - break - } - case 9: { - next = Math.ceil(column / 4) * 4 - chunks.push(-2) - while (column++ < next) chunks.push(-1) - break - } - case 10: { - chunks.push(-4) - column = 1 - break - } - default: { - atCarriageReturn = true - column = 1 - } - } - } - startPosition = endPosition + 1 - } - if (end) { - if (atCarriageReturn) chunks.push(-5) - if (buffer) chunks.push(buffer) - chunks.push(null) - } - return chunks - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/postprocess.js -/** - * @typedef {import('micromark-util-types').Event} Event - */ - - - -/** - * @param {Array} events - * @returns {Array} - */ -function postprocess(events) { - while (!subtokenize(events)) { - // Empty - } - return events -} - -;// CONCATENATED MODULE: ./node_modules/micromark-util-decode-numeric-character-reference/index.js -/** - * Turn the number (in string form as either hexa- or plain decimal) coming from - * a numeric character reference into a character. - * - * Sort of like `String.fromCharCode(Number.parseInt(value, base))`, but makes - * non-characters and control characters safe. - * - * @param {string} value - * Value to decode. - * @param {number} base - * Numeric base. - * @returns {string} - * Character. - */ -function decodeNumericCharacterReference(value, base) { - const code = Number.parseInt(value, base) - if ( - // C0 except for HT, LF, FF, CR, space. - code < 9 || - code === 11 || - (code > 13 && code < 32) || - // Control character (DEL) of C0, and C1 controls. - (code > 126 && code < 160) || - // Lone high surrogates and low surrogates. - (code > 55295 && code < 57344) || - // Noncharacters. - (code > 64975 && code < 65008) /* eslint-disable no-bitwise */ || - (code & 65535) === 65535 || - (code & 65535) === 65534 /* eslint-enable no-bitwise */ || - // Out of range - code > 1114111 - ) { - return '\uFFFD' - } - return String.fromCharCode(code) -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-decode-string/index.js - - -const characterEscapeOrReference = - /\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi - -/** - * Decode markdown strings (which occur in places such as fenced code info - * strings, destinations, labels, and titles). - * - * The “string” content type allows character escapes and -references. - * This decodes those. - * - * @param {string} value - * Value to decode. - * @returns {string} - * Decoded value. - */ -function decodeString(value) { - return value.replace(characterEscapeOrReference, decode) -} - -/** - * @param {string} $0 - * @param {string} $1 - * @param {string} $2 - * @returns {string} - */ -function decode($0, $1, $2) { - if ($1) { - // Escape. - return $1 - } - - // Reference. - const head = $2.charCodeAt(0) - if (head === 35) { - const head = $2.charCodeAt(1) - const hex = head === 120 || head === 88 - return decodeNumericCharacterReference($2.slice(hex ? 2 : 1), hex ? 16 : 10) - } - return decodeNamedCharacterReference($2) || $0 -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/unist-util-stringify-position/lib/index.js -/** - * @typedef {import('unist').Node} Node - * @typedef {import('unist').Point} Point - * @typedef {import('unist').Position} Position - */ - -/** - * @typedef NodeLike - * @property {string} type - * @property {PositionLike | null | undefined} [position] - * - * @typedef PositionLike - * @property {PointLike | null | undefined} [start] - * @property {PointLike | null | undefined} [end] - * - * @typedef PointLike - * @property {number | null | undefined} [line] - * @property {number | null | undefined} [column] - * @property {number | null | undefined} [offset] - */ - -/** - * Serialize the positional info of a point, position (start and end points), - * or node. - * - * @param {Node | NodeLike | Position | PositionLike | Point | PointLike | null | undefined} [value] - * Node, position, or point. - * @returns {string} - * Pretty printed positional info of a node (`string`). - * - * In the format of a range `ls:cs-le:ce` (when given `node` or `position`) - * or a point `l:c` (when given `point`), where `l` stands for line, `c` for - * column, `s` for `start`, and `e` for end. - * An empty string (`''`) is returned if the given value is neither `node`, - * `position`, nor `point`. - */ -function stringifyPosition(value) { - // Nothing. - if (!value || typeof value !== 'object') { - return '' - } - - // Node. - if ('position' in value || 'type' in value) { - return position(value.position) - } - - // Position. - if ('start' in value || 'end' in value) { - return position(value) - } - - // Point. - if ('line' in value || 'column' in value) { - return point(value) - } - - // ? - return '' -} - -/** - * @param {Point | PointLike | null | undefined} point - * @returns {string} - */ -function point(point) { - return index(point && point.line) + ':' + index(point && point.column) -} - -/** - * @param {Position | PositionLike | null | undefined} pos - * @returns {string} - */ -function position(pos) { - return point(pos && pos.start) + '-' + point(pos && pos.end) -} - -/** - * @param {number | null | undefined} value - * @returns {number} - */ -function index(value) { - return value && typeof value === 'number' ? value : 1 -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/mdast-util-from-markdown/lib/index.js -/** - * @typedef {import('micromark-util-types').Encoding} Encoding - * @typedef {import('micromark-util-types').Event} Event - * @typedef {import('micromark-util-types').ParseOptions} ParseOptions - * @typedef {import('micromark-util-types').Token} Token - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Value} Value - * - * @typedef {import('unist').Parent} UnistParent - * @typedef {import('unist').Point} Point - * - * @typedef {import('mdast').PhrasingContent} PhrasingContent - * @typedef {import('mdast').StaticPhrasingContent} StaticPhrasingContent - * @typedef {import('mdast').Content} Content - * @typedef {import('mdast').Break} Break - * @typedef {import('mdast').Blockquote} Blockquote - * @typedef {import('mdast').Code} Code - * @typedef {import('mdast').Definition} Definition - * @typedef {import('mdast').Emphasis} Emphasis - * @typedef {import('mdast').Heading} Heading - * @typedef {import('mdast').HTML} HTML - * @typedef {import('mdast').Image} Image - * @typedef {import('mdast').ImageReference} ImageReference - * @typedef {import('mdast').InlineCode} InlineCode - * @typedef {import('mdast').Link} Link - * @typedef {import('mdast').LinkReference} LinkReference - * @typedef {import('mdast').List} List - * @typedef {import('mdast').ListItem} ListItem - * @typedef {import('mdast').Paragraph} Paragraph - * @typedef {import('mdast').Root} Root - * @typedef {import('mdast').Strong} Strong - * @typedef {import('mdast').Text} Text - * @typedef {import('mdast').ThematicBreak} ThematicBreak - * @typedef {import('mdast').ReferenceType} ReferenceType - * @typedef {import('../index.js').CompileData} CompileData - */ - -/** - * @typedef {Root | Content} Node - * @typedef {Extract} Parent - * - * @typedef {Omit & {type: 'fragment', children: Array}} Fragment - */ - -/** - * @callback Transform - * Extra transform, to change the AST afterwards. - * @param {Root} tree - * Tree to transform. - * @returns {Root | undefined | null | void} - * New tree or nothing (in which case the current tree is used). - * - * @callback Handle - * Handle a token. - * @param {CompileContext} this - * Context. - * @param {Token} token - * Current token. - * @returns {void} - * Nothing. - * - * @typedef {Record} Handles - * Token types mapping to handles - * - * @callback OnEnterError - * Handle the case where the `right` token is open, but it is closed (by the - * `left` token) or because we reached the end of the document. - * @param {Omit} this - * Context. - * @param {Token | undefined} left - * Left token. - * @param {Token} right - * Right token. - * @returns {void} - * Nothing. - * - * @callback OnExitError - * Handle the case where the `right` token is open but it is closed by - * exiting the `left` token. - * @param {Omit} this - * Context. - * @param {Token} left - * Left token. - * @param {Token} right - * Right token. - * @returns {void} - * Nothing. - * - * @typedef {[Token, OnEnterError | undefined]} TokenTuple - * Open token on the stack, with an optional error handler for when - * that token isn’t closed properly. - */ - -/** - * @typedef Config - * Configuration. - * - * We have our defaults, but extensions will add more. - * @property {Array} canContainEols - * Token types where line endings are used. - * @property {Handles} enter - * Opening handles. - * @property {Handles} exit - * Closing handles. - * @property {Array} transforms - * Tree transforms. - * - * @typedef {Partial} Extension - * Change how markdown tokens from micromark are turned into mdast. - * - * @typedef CompileContext - * mdast compiler context. - * @property {Array} stack - * Stack of nodes. - * @property {Array} tokenStack - * Stack of tokens. - * @property {(key: Key) => CompileData[Key]} getData - * Get data from the key/value store. - * @property {(key: Key, value?: CompileData[Key]) => void} setData - * Set data into the key/value store. - * @property {(this: CompileContext) => void} buffer - * Capture some of the output data. - * @property {(this: CompileContext) => string} resume - * Stop capturing and access the output data. - * @property {(this: CompileContext, node: Kind, token: Token, onError?: OnEnterError) => Kind} enter - * Enter a token. - * @property {(this: CompileContext, token: Token, onError?: OnExitError) => Node} exit - * Exit a token. - * @property {TokenizeContext['sliceSerialize']} sliceSerialize - * Get the string value of a token. - * @property {Config} config - * Configuration. - * - * @typedef FromMarkdownOptions - * Configuration for how to build mdast. - * @property {Array> | null | undefined} [mdastExtensions] - * Extensions for this utility to change how tokens are turned into a tree. - * - * @typedef {ParseOptions & FromMarkdownOptions} Options - * Configuration. - */ - -// To do: micromark: create a registry of tokens? -// To do: next major: don’t return given `Node` from `enter`. -// To do: next major: remove setter/getter. - - - - - - - - - - -const lib_own = {}.hasOwnProperty - -/** - * @param value - * Markdown to parse. - * @param encoding - * Character encoding for when `value` is `Buffer`. - * @param options - * Configuration. - * @returns - * mdast tree. - */ -const fromMarkdown = - /** - * @type {( - * ((value: Value, encoding: Encoding, options?: Options | null | undefined) => Root) & - * ((value: Value, options?: Options | null | undefined) => Root) - * )} - */ - - /** - * @param {Value} value - * @param {Encoding | Options | null | undefined} [encoding] - * @param {Options | null | undefined} [options] - * @returns {Root} - */ - function (value, encoding, options) { - if (typeof encoding !== 'string') { - options = encoding - encoding = undefined - } - return compiler(options)( - postprocess( - parse(options).document().write(preprocess()(value, encoding, true)) - ) - ) - } - -/** - * Note this compiler only understand complete buffering, not streaming. - * - * @param {Options | null | undefined} [options] - */ -function compiler(options) { - /** @type {Config} */ - const config = { - transforms: [], - canContainEols: ['emphasis', 'fragment', 'heading', 'paragraph', 'strong'], - enter: { - autolink: opener(link), - autolinkProtocol: onenterdata, - autolinkEmail: onenterdata, - atxHeading: opener(heading), - blockQuote: opener(blockQuote), - characterEscape: onenterdata, - characterReference: onenterdata, - codeFenced: opener(codeFlow), - codeFencedFenceInfo: buffer, - codeFencedFenceMeta: buffer, - codeIndented: opener(codeFlow, buffer), - codeText: opener(codeText, buffer), - codeTextData: onenterdata, - data: onenterdata, - codeFlowValue: onenterdata, - definition: opener(definition), - definitionDestinationString: buffer, - definitionLabelString: buffer, - definitionTitleString: buffer, - emphasis: opener(emphasis), - hardBreakEscape: opener(hardBreak), - hardBreakTrailing: opener(hardBreak), - htmlFlow: opener(html, buffer), - htmlFlowData: onenterdata, - htmlText: opener(html, buffer), - htmlTextData: onenterdata, - image: opener(image), - label: buffer, - link: opener(link), - listItem: opener(listItem), - listItemValue: onenterlistitemvalue, - listOrdered: opener(list, onenterlistordered), - listUnordered: opener(list), - paragraph: opener(paragraph), - reference: onenterreference, - referenceString: buffer, - resourceDestinationString: buffer, - resourceTitleString: buffer, - setextHeading: opener(heading), - strong: opener(strong), - thematicBreak: opener(thematicBreak) - }, - exit: { - atxHeading: closer(), - atxHeadingSequence: onexitatxheadingsequence, - autolink: closer(), - autolinkEmail: onexitautolinkemail, - autolinkProtocol: onexitautolinkprotocol, - blockQuote: closer(), - characterEscapeValue: onexitdata, - characterReferenceMarkerHexadecimal: onexitcharacterreferencemarker, - characterReferenceMarkerNumeric: onexitcharacterreferencemarker, - characterReferenceValue: onexitcharacterreferencevalue, - codeFenced: closer(onexitcodefenced), - codeFencedFence: onexitcodefencedfence, - codeFencedFenceInfo: onexitcodefencedfenceinfo, - codeFencedFenceMeta: onexitcodefencedfencemeta, - codeFlowValue: onexitdata, - codeIndented: closer(onexitcodeindented), - codeText: closer(onexitcodetext), - codeTextData: onexitdata, - data: onexitdata, - definition: closer(), - definitionDestinationString: onexitdefinitiondestinationstring, - definitionLabelString: onexitdefinitionlabelstring, - definitionTitleString: onexitdefinitiontitlestring, - emphasis: closer(), - hardBreakEscape: closer(onexithardbreak), - hardBreakTrailing: closer(onexithardbreak), - htmlFlow: closer(onexithtmlflow), - htmlFlowData: onexitdata, - htmlText: closer(onexithtmltext), - htmlTextData: onexitdata, - image: closer(onexitimage), - label: onexitlabel, - labelText: onexitlabeltext, - lineEnding: onexitlineending, - link: closer(onexitlink), - listItem: closer(), - listOrdered: closer(), - listUnordered: closer(), - paragraph: closer(), - referenceString: onexitreferencestring, - resourceDestinationString: onexitresourcedestinationstring, - resourceTitleString: onexitresourcetitlestring, - resource: onexitresource, - setextHeading: closer(onexitsetextheading), - setextHeadingLineSequence: onexitsetextheadinglinesequence, - setextHeadingText: onexitsetextheadingtext, - strong: closer(), - thematicBreak: closer() - } - } - configure(config, (options || {}).mdastExtensions || []) - - /** @type {CompileData} */ - const data = {} - return compile - - /** - * Turn micromark events into an mdast tree. - * - * @param {Array} events - * Events. - * @returns {Root} - * mdast tree. - */ - function compile(events) { - /** @type {Root} */ - let tree = { - type: 'root', - children: [] - } - /** @type {Omit} */ - const context = { - stack: [tree], - tokenStack: [], - config, - enter, - exit, - buffer, - resume, - setData, - getData - } - /** @type {Array} */ - const listStack = [] - let index = -1 - while (++index < events.length) { - // We preprocess lists to add `listItem` tokens, and to infer whether - // items the list itself are spread out. - if ( - events[index][1].type === 'listOrdered' || - events[index][1].type === 'listUnordered' - ) { - if (events[index][0] === 'enter') { - listStack.push(index) - } else { - const tail = listStack.pop() - index = prepareList(events, tail, index) - } - } - } - index = -1 - while (++index < events.length) { - const handler = config[events[index][0]] - if (lib_own.call(handler, events[index][1].type)) { - handler[events[index][1].type].call( - Object.assign( - { - sliceSerialize: events[index][2].sliceSerialize - }, - context - ), - events[index][1] - ) - } - } - - // Handle tokens still being open. - if (context.tokenStack.length > 0) { - const tail = context.tokenStack[context.tokenStack.length - 1] - const handler = tail[1] || defaultOnError - handler.call(context, undefined, tail[0]) - } - - // Figure out `root` position. - tree.position = { - start: lib_point( - events.length > 0 - ? events[0][1].start - : { - line: 1, - column: 1, - offset: 0 - } - ), - end: lib_point( - events.length > 0 - ? events[events.length - 2][1].end - : { - line: 1, - column: 1, - offset: 0 - } - ) - } - - // Call transforms. - index = -1 - while (++index < config.transforms.length) { - tree = config.transforms[index](tree) || tree - } - return tree - } - - /** - * @param {Array} events - * @param {number} start - * @param {number} length - * @returns {number} - */ - function prepareList(events, start, length) { - let index = start - 1 - let containerBalance = -1 - let listSpread = false - /** @type {Token | undefined} */ - let listItem - /** @type {number | undefined} */ - let lineIndex - /** @type {number | undefined} */ - let firstBlankLineIndex - /** @type {boolean | undefined} */ - let atMarker - while (++index <= length) { - const event = events[index] - if ( - event[1].type === 'listUnordered' || - event[1].type === 'listOrdered' || - event[1].type === 'blockQuote' - ) { - if (event[0] === 'enter') { - containerBalance++ - } else { - containerBalance-- - } - atMarker = undefined - } else if (event[1].type === 'lineEndingBlank') { - if (event[0] === 'enter') { - if ( - listItem && - !atMarker && - !containerBalance && - !firstBlankLineIndex - ) { - firstBlankLineIndex = index - } - atMarker = undefined - } - } else if ( - event[1].type === 'linePrefix' || - event[1].type === 'listItemValue' || - event[1].type === 'listItemMarker' || - event[1].type === 'listItemPrefix' || - event[1].type === 'listItemPrefixWhitespace' - ) { - // Empty. - } else { - atMarker = undefined - } - if ( - (!containerBalance && - event[0] === 'enter' && - event[1].type === 'listItemPrefix') || - (containerBalance === -1 && - event[0] === 'exit' && - (event[1].type === 'listUnordered' || - event[1].type === 'listOrdered')) - ) { - if (listItem) { - let tailIndex = index - lineIndex = undefined - while (tailIndex--) { - const tailEvent = events[tailIndex] - if ( - tailEvent[1].type === 'lineEnding' || - tailEvent[1].type === 'lineEndingBlank' - ) { - if (tailEvent[0] === 'exit') continue - if (lineIndex) { - events[lineIndex][1].type = 'lineEndingBlank' - listSpread = true - } - tailEvent[1].type = 'lineEnding' - lineIndex = tailIndex - } else if ( - tailEvent[1].type === 'linePrefix' || - tailEvent[1].type === 'blockQuotePrefix' || - tailEvent[1].type === 'blockQuotePrefixWhitespace' || - tailEvent[1].type === 'blockQuoteMarker' || - tailEvent[1].type === 'listItemIndent' - ) { - // Empty - } else { - break - } - } - if ( - firstBlankLineIndex && - (!lineIndex || firstBlankLineIndex < lineIndex) - ) { - listItem._spread = true - } - - // Fix position. - listItem.end = Object.assign( - {}, - lineIndex ? events[lineIndex][1].start : event[1].end - ) - events.splice(lineIndex || index, 0, ['exit', listItem, event[2]]) - index++ - length++ - } - - // Create a new list item. - if (event[1].type === 'listItemPrefix') { - listItem = { - type: 'listItem', - _spread: false, - start: Object.assign({}, event[1].start), - // @ts-expect-error: we’ll add `end` in a second. - end: undefined - } - // @ts-expect-error: `listItem` is most definitely defined, TS... - events.splice(index, 0, ['enter', listItem, event[2]]) - index++ - length++ - firstBlankLineIndex = undefined - atMarker = true - } - } - } - events[start][1]._spread = listSpread - return length - } - - /** - * Set data. - * - * @template {keyof CompileData} Key - * Field type. - * @param {Key} key - * Key of field. - * @param {CompileData[Key]} [value] - * New value. - * @returns {void} - * Nothing. - */ - function setData(key, value) { - data[key] = value - } - - /** - * Get data. - * - * @template {keyof CompileData} Key - * Field type. - * @param {Key} key - * Key of field. - * @returns {CompileData[Key]} - * Value. - */ - function getData(key) { - return data[key] - } - - /** - * Create an opener handle. - * - * @param {(token: Token) => Node} create - * Create a node. - * @param {Handle} [and] - * Optional function to also run. - * @returns {Handle} - * Handle. - */ - function opener(create, and) { - return open - - /** - * @this {CompileContext} - * @param {Token} token - * @returns {void} - */ - function open(token) { - enter.call(this, create(token), token) - if (and) and.call(this, token) - } - } - - /** - * @this {CompileContext} - * @returns {void} - */ - function buffer() { - this.stack.push({ - type: 'fragment', - children: [] - }) - } - - /** - * @template {Node} Kind - * Node type. - * @this {CompileContext} - * Context. - * @param {Kind} node - * Node to enter. - * @param {Token} token - * Corresponding token. - * @param {OnEnterError | undefined} [errorHandler] - * Handle the case where this token is open, but it is closed by something else. - * @returns {Kind} - * The given node. - */ - function enter(node, token, errorHandler) { - const parent = this.stack[this.stack.length - 1] - // @ts-expect-error: Assume `Node` can exist as a child of `parent`. - parent.children.push(node) - this.stack.push(node) - this.tokenStack.push([token, errorHandler]) - // @ts-expect-error: `end` will be patched later. - node.position = { - start: lib_point(token.start) - } - return node - } - - /** - * Create a closer handle. - * - * @param {Handle} [and] - * Optional function to also run. - * @returns {Handle} - * Handle. - */ - function closer(and) { - return close - - /** - * @this {CompileContext} - * @param {Token} token - * @returns {void} - */ - function close(token) { - if (and) and.call(this, token) - exit.call(this, token) - } - } - - /** - * @this {CompileContext} - * Context. - * @param {Token} token - * Corresponding token. - * @param {OnExitError | undefined} [onExitError] - * Handle the case where another token is open. - * @returns {Node} - * The closed node. - */ - function exit(token, onExitError) { - const node = this.stack.pop() - const open = this.tokenStack.pop() - if (!open) { - throw new Error( - 'Cannot close `' + - token.type + - '` (' + - stringifyPosition({ - start: token.start, - end: token.end - }) + - '): it’s not open' - ) - } else if (open[0].type !== token.type) { - if (onExitError) { - onExitError.call(this, token, open[0]) - } else { - const handler = open[1] || defaultOnError - handler.call(this, token, open[0]) - } - } - node.position.end = lib_point(token.end) - return node - } - - /** - * @this {CompileContext} - * @returns {string} - */ - function resume() { - return lib_toString(this.stack.pop()) - } - - // - // Handlers. - // - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onenterlistordered() { - setData('expectingFirstListItemValue', true) - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onenterlistitemvalue(token) { - if (getData('expectingFirstListItemValue')) { - const ancestor = this.stack[this.stack.length - 2] - ancestor.start = Number.parseInt(this.sliceSerialize(token), 10) - setData('expectingFirstListItemValue') - } - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitcodefencedfenceinfo() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.lang = data - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitcodefencedfencemeta() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.meta = data - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitcodefencedfence() { - // Exit if this is the closing fence. - if (getData('flowCodeInside')) return - this.buffer() - setData('flowCodeInside', true) - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitcodefenced() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.value = data.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g, '') - setData('flowCodeInside') - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitcodeindented() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.value = data.replace(/(\r?\n|\r)$/g, '') - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitdefinitionlabelstring(token) { - const label = this.resume() - const node = this.stack[this.stack.length - 1] - node.label = label - node.identifier = normalizeIdentifier( - this.sliceSerialize(token) - ).toLowerCase() - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitdefinitiontitlestring() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.title = data - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitdefinitiondestinationstring() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.url = data - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitatxheadingsequence(token) { - const node = this.stack[this.stack.length - 1] - if (!node.depth) { - const depth = this.sliceSerialize(token).length - node.depth = depth - } - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitsetextheadingtext() { - setData('setextHeadingSlurpLineEnding', true) - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitsetextheadinglinesequence(token) { - const node = this.stack[this.stack.length - 1] - node.depth = this.sliceSerialize(token).charCodeAt(0) === 61 ? 1 : 2 - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitsetextheading() { - setData('setextHeadingSlurpLineEnding') - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onenterdata(token) { - const node = this.stack[this.stack.length - 1] - let tail = node.children[node.children.length - 1] - if (!tail || tail.type !== 'text') { - // Add a new text node. - tail = text() - // @ts-expect-error: we’ll add `end` later. - tail.position = { - start: lib_point(token.start) - } - // @ts-expect-error: Assume `parent` accepts `text`. - node.children.push(tail) - } - this.stack.push(tail) - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitdata(token) { - const tail = this.stack.pop() - tail.value += this.sliceSerialize(token) - tail.position.end = lib_point(token.end) - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitlineending(token) { - const context = this.stack[this.stack.length - 1] - // If we’re at a hard break, include the line ending in there. - if (getData('atHardBreak')) { - const tail = context.children[context.children.length - 1] - tail.position.end = lib_point(token.end) - setData('atHardBreak') - return - } - if ( - !getData('setextHeadingSlurpLineEnding') && - config.canContainEols.includes(context.type) - ) { - onenterdata.call(this, token) - onexitdata.call(this, token) - } - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexithardbreak() { - setData('atHardBreak', true) - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexithtmlflow() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.value = data - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexithtmltext() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.value = data - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitcodetext() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.value = data - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitlink() { - const node = this.stack[this.stack.length - 1] - // Note: there are also `identifier` and `label` fields on this link node! - // These are used / cleaned here. - // To do: clean. - if (getData('inReference')) { - /** @type {ReferenceType} */ - const referenceType = getData('referenceType') || 'shortcut' - node.type += 'Reference' - // @ts-expect-error: mutate. - node.referenceType = referenceType - // @ts-expect-error: mutate. - delete node.url - delete node.title - } else { - // @ts-expect-error: mutate. - delete node.identifier - // @ts-expect-error: mutate. - delete node.label - } - setData('referenceType') - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitimage() { - const node = this.stack[this.stack.length - 1] - // Note: there are also `identifier` and `label` fields on this link node! - // These are used / cleaned here. - // To do: clean. - if (getData('inReference')) { - /** @type {ReferenceType} */ - const referenceType = getData('referenceType') || 'shortcut' - node.type += 'Reference' - // @ts-expect-error: mutate. - node.referenceType = referenceType - // @ts-expect-error: mutate. - delete node.url - delete node.title - } else { - // @ts-expect-error: mutate. - delete node.identifier - // @ts-expect-error: mutate. - delete node.label - } - setData('referenceType') - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitlabeltext(token) { - const string = this.sliceSerialize(token) - const ancestor = this.stack[this.stack.length - 2] - // @ts-expect-error: stash this on the node, as it might become a reference - // later. - ancestor.label = decodeString(string) - // @ts-expect-error: same as above. - ancestor.identifier = normalizeIdentifier(string).toLowerCase() - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitlabel() { - const fragment = this.stack[this.stack.length - 1] - const value = this.resume() - const node = this.stack[this.stack.length - 1] - // Assume a reference. - setData('inReference', true) - if (node.type === 'link') { - /** @type {Array} */ - // @ts-expect-error: Assume static phrasing content. - const children = fragment.children - node.children = children - } else { - node.alt = value - } - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitresourcedestinationstring() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.url = data - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitresourcetitlestring() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.title = data - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitresource() { - setData('inReference') - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onenterreference() { - setData('referenceType', 'collapsed') - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitreferencestring(token) { - const label = this.resume() - const node = this.stack[this.stack.length - 1] - // @ts-expect-error: stash this on the node, as it might become a reference - // later. - node.label = label - // @ts-expect-error: same as above. - node.identifier = normalizeIdentifier( - this.sliceSerialize(token) - ).toLowerCase() - setData('referenceType', 'full') - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitcharacterreferencemarker(token) { - setData('characterReferenceType', token.type) - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitcharacterreferencevalue(token) { - const data = this.sliceSerialize(token) - const type = getData('characterReferenceType') - /** @type {string} */ - let value - if (type) { - value = decodeNumericCharacterReference( - data, - type === 'characterReferenceMarkerNumeric' ? 10 : 16 - ) - setData('characterReferenceType') - } else { - const result = decodeNamedCharacterReference(data) - value = result - } - const tail = this.stack.pop() - tail.value += value - tail.position.end = lib_point(token.end) - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitautolinkprotocol(token) { - onexitdata.call(this, token) - const node = this.stack[this.stack.length - 1] - node.url = this.sliceSerialize(token) - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitautolinkemail(token) { - onexitdata.call(this, token) - const node = this.stack[this.stack.length - 1] - node.url = 'mailto:' + this.sliceSerialize(token) - } - - // - // Creaters. - // - - /** @returns {Blockquote} */ - function blockQuote() { - return { - type: 'blockquote', - children: [] - } - } - - /** @returns {Code} */ - function codeFlow() { - return { - type: 'code', - lang: null, - meta: null, - value: '' - } - } - - /** @returns {InlineCode} */ - function codeText() { - return { - type: 'inlineCode', - value: '' - } - } - - /** @returns {Definition} */ - function definition() { - return { - type: 'definition', - identifier: '', - label: null, - title: null, - url: '' - } - } - - /** @returns {Emphasis} */ - function emphasis() { - return { - type: 'emphasis', - children: [] - } - } - - /** @returns {Heading} */ - function heading() { - // @ts-expect-error `depth` will be set later. - return { - type: 'heading', - depth: undefined, - children: [] - } - } - - /** @returns {Break} */ - function hardBreak() { - return { - type: 'break' - } - } - - /** @returns {HTML} */ - function html() { - return { - type: 'html', - value: '' - } - } - - /** @returns {Image} */ - function image() { - return { - type: 'image', - title: null, - url: '', - alt: null - } - } - - /** @returns {Link} */ - function link() { - return { - type: 'link', - title: null, - url: '', - children: [] - } - } - - /** - * @param {Token} token - * @returns {List} - */ - function list(token) { - return { - type: 'list', - ordered: token.type === 'listOrdered', - start: null, - spread: token._spread, - children: [] - } - } - - /** - * @param {Token} token - * @returns {ListItem} - */ - function listItem(token) { - return { - type: 'listItem', - spread: token._spread, - checked: null, - children: [] - } - } - - /** @returns {Paragraph} */ - function paragraph() { - return { - type: 'paragraph', - children: [] - } - } - - /** @returns {Strong} */ - function strong() { - return { - type: 'strong', - children: [] - } - } - - /** @returns {Text} */ - function text() { - return { - type: 'text', - value: '' - } - } - - /** @returns {ThematicBreak} */ - function thematicBreak() { - return { - type: 'thematicBreak' - } - } -} - -/** - * Copy a point-like value. - * - * @param {Point} d - * Point-like value. - * @returns {Point} - * unist point. - */ -function lib_point(d) { - return { - line: d.line, - column: d.column, - offset: d.offset - } -} - -/** - * @param {Config} combined - * @param {Array>} extensions - * @returns {void} - */ -function configure(combined, extensions) { - let index = -1 - while (++index < extensions.length) { - const value = extensions[index] - if (Array.isArray(value)) { - configure(combined, value) - } else { - extension(combined, value) - } - } -} - -/** - * @param {Config} combined - * @param {Extension} extension - * @returns {void} - */ -function extension(combined, extension) { - /** @type {keyof Extension} */ - let key - for (key in extension) { - if (lib_own.call(extension, key)) { - if (key === 'canContainEols') { - const right = extension[key] - if (right) { - combined[key].push(...right) - } - } else if (key === 'transforms') { - const right = extension[key] - if (right) { - combined[key].push(...right) - } - } else if (key === 'enter' || key === 'exit') { - const right = extension[key] - if (right) { - Object.assign(combined[key], right) - } - } - } - } -} - -/** @type {OnEnterError} */ -function defaultOnError(left, right) { - if (left) { - throw new Error( - 'Cannot close `' + - left.type + - '` (' + - stringifyPosition({ - start: left.start, - end: left.end - }) + - '): a different token (`' + - right.type + - '`, ' + - stringifyPosition({ - start: right.start, - end: right.end - }) + - ') is open' - ) - } else { - throw new Error( - 'Cannot close document, a token (`' + - right.type + - '`, ' + - stringifyPosition({ - start: right.start, - end: right.end - }) + - ') is still open' - ) - } -} - -// EXTERNAL MODULE: ./node_modules/ts-dedent/esm/index.js -var esm = __webpack_require__(60513); -;// CONCATENATED MODULE: ./node_modules/mermaid/dist/createText-2e5e7dd3.js - - - -function preprocessMarkdown(markdown) { - const withoutMultipleNewlines = markdown.replace(/\n{2,}/g, "\n"); - const withoutExtraSpaces = (0,esm/* dedent */.T)(withoutMultipleNewlines); - return withoutExtraSpaces; -} -function markdownToLines(markdown) { - const preprocessedMarkdown = preprocessMarkdown(markdown); - const { children } = fromMarkdown(preprocessedMarkdown); - const lines = [[]]; - let currentLine = 0; - function processNode(node, parentType = "normal") { - if (node.type === "text") { - const textLines = node.value.split("\n"); - textLines.forEach((textLine, index) => { - if (index !== 0) { - currentLine++; - lines.push([]); - } - textLine.split(" ").forEach((word) => { - if (word) { - lines[currentLine].push({ content: word, type: parentType }); - } - }); - }); - } else if (node.type === "strong" || node.type === "emphasis") { - node.children.forEach((contentNode) => { - processNode(contentNode, node.type); - }); - } - } - children.forEach((treeNode) => { - if (treeNode.type === "paragraph") { - treeNode.children.forEach((contentNode) => { - processNode(contentNode); - }); - } - }); - return lines; -} -function markdownToHTML(markdown) { - const { children } = fromMarkdown(markdown); - function output(node) { - if (node.type === "text") { - return node.value.replace(/\n/g, "
    "); - } else if (node.type === "strong") { - return `${node.children.map(output).join("")}`; - } else if (node.type === "emphasis") { - return `${node.children.map(output).join("")}`; - } else if (node.type === "paragraph") { - return `

    ${node.children.map(output).join("")}

    `; - } - return `Unsupported markdown: ${node.type}`; - } - return children.map(output).join(""); -} -function splitTextToChars(text) { - if (Intl.Segmenter) { - return [...new Intl.Segmenter().segment(text)].map((s) => s.segment); - } - return [...text]; -} -function splitWordToFitWidth(checkFit, word) { - const characters = splitTextToChars(word.content); - return splitWordToFitWidthRecursion(checkFit, [], characters, word.type); -} -function splitWordToFitWidthRecursion(checkFit, usedChars, remainingChars, type) { - if (remainingChars.length === 0) { - return [ - { content: usedChars.join(""), type }, - { content: "", type } - ]; - } - const [nextChar, ...rest] = remainingChars; - const newWord = [...usedChars, nextChar]; - if (checkFit([{ content: newWord.join(""), type }])) { - return splitWordToFitWidthRecursion(checkFit, newWord, rest, type); - } - if (usedChars.length === 0 && nextChar) { - usedChars.push(nextChar); - remainingChars.shift(); - } - return [ - { content: usedChars.join(""), type }, - { content: remainingChars.join(""), type } - ]; -} -function splitLineToFitWidth(line, checkFit) { - if (line.some(({ content }) => content.includes("\n"))) { - throw new Error("splitLineToFitWidth does not support newlines in the line"); - } - return splitLineToFitWidthRecursion(line, checkFit); -} -function splitLineToFitWidthRecursion(words, checkFit, lines = [], newLine = []) { - if (words.length === 0) { - if (newLine.length > 0) { - lines.push(newLine); - } - return lines.length > 0 ? lines : []; - } - let joiner = ""; - if (words[0].content === " ") { - joiner = " "; - words.shift(); - } - const nextWord = words.shift() ?? { content: " ", type: "normal" }; - const lineWithNextWord = [...newLine]; - if (joiner !== "") { - lineWithNextWord.push({ content: joiner, type: "normal" }); - } - lineWithNextWord.push(nextWord); - if (checkFit(lineWithNextWord)) { - return splitLineToFitWidthRecursion(words, checkFit, lines, lineWithNextWord); - } - if (newLine.length > 0) { - lines.push(newLine); - words.unshift(nextWord); - } else if (nextWord.content) { - const [line, rest] = splitWordToFitWidth(checkFit, nextWord); - lines.push([line]); - if (rest.content) { - words.unshift(rest); - } - } - return splitLineToFitWidthRecursion(words, checkFit, lines); -} -function applyStyle(dom, styleFn) { - if (styleFn) { - dom.attr("style", styleFn); - } -} -function addHtmlSpan(element, node, width, classes, addBackground = false) { - const fo = element.append("foreignObject"); - const div = fo.append("xhtml:div"); - const label = node.label; - const labelClass = node.isNode ? "nodeLabel" : "edgeLabel"; - div.html( - ` - " + label + "" - ); - applyStyle(div, node.labelStyle); - div.style("display", "table-cell"); - div.style("white-space", "nowrap"); - div.style("max-width", width + "px"); - div.attr("xmlns", "http://www.w3.org/1999/xhtml"); - if (addBackground) { - div.attr("class", "labelBkg"); - } - let bbox = div.node().getBoundingClientRect(); - if (bbox.width === width) { - div.style("display", "table"); - div.style("white-space", "break-spaces"); - div.style("width", width + "px"); - bbox = div.node().getBoundingClientRect(); - } - fo.style("width", bbox.width); - fo.style("height", bbox.height); - return fo.node(); -} -function createTspan(textElement, lineIndex, lineHeight) { - return textElement.append("tspan").attr("class", "text-outer-tspan").attr("x", 0).attr("y", lineIndex * lineHeight - 0.1 + "em").attr("dy", lineHeight + "em"); -} -function computeWidthOfText(parentNode, lineHeight, line) { - const testElement = parentNode.append("text"); - const testSpan = createTspan(testElement, 1, lineHeight); - updateTextContentAndStyles(testSpan, line); - const textLength = testSpan.node().getComputedTextLength(); - testElement.remove(); - return textLength; -} -function computeDimensionOfText(parentNode, lineHeight, text) { - var _a; - const testElement = parentNode.append("text"); - const testSpan = createTspan(testElement, 1, lineHeight); - updateTextContentAndStyles(testSpan, [{ content: text, type: "normal" }]); - const textDimension = (_a = testSpan.node()) == null ? void 0 : _a.getBoundingClientRect(); - if (textDimension) { - testElement.remove(); - } - return textDimension; -} -function createFormattedText(width, g, structuredText, addBackground = false) { - const lineHeight = 1.1; - const labelGroup = g.append("g"); - const bkg = labelGroup.insert("rect").attr("class", "background"); - const textElement = labelGroup.append("text").attr("y", "-10.1"); - let lineIndex = 0; - for (const line of structuredText) { - const checkWidth = (line2) => computeWidthOfText(labelGroup, lineHeight, line2) <= width; - const linesUnderWidth = checkWidth(line) ? [line] : splitLineToFitWidth(line, checkWidth); - for (const preparedLine of linesUnderWidth) { - const tspan = createTspan(textElement, lineIndex, lineHeight); - updateTextContentAndStyles(tspan, preparedLine); - lineIndex++; - } - } - if (addBackground) { - const bbox = textElement.node().getBBox(); - const padding = 2; - bkg.attr("x", -padding).attr("y", -padding).attr("width", bbox.width + 2 * padding).attr("height", bbox.height + 2 * padding); - return labelGroup.node(); - } else { - return textElement.node(); - } -} -function updateTextContentAndStyles(tspan, wrappedLine) { - tspan.text(""); - wrappedLine.forEach((word, index) => { - const innerTspan = tspan.append("tspan").attr("font-style", word.type === "emphasis" ? "italic" : "normal").attr("class", "text-inner-tspan").attr("font-weight", word.type === "strong" ? "bold" : "normal"); - if (index === 0) { - innerTspan.text(word.content); - } else { - innerTspan.text(" " + word.content); - } - }); -} -const createText = (el, text = "", { - style = "", - isTitle = false, - classes = "", - useHtmlLabels = true, - isNode = true, - width = 200, - addSvgBackground = false -} = {}) => { - mermaid_b5860b54.l.info("createText", text, style, isTitle, classes, useHtmlLabels, isNode, addSvgBackground); - if (useHtmlLabels) { - const htmlText = markdownToHTML(text); - const node = { - isNode, - label: (0,mermaid_b5860b54.M)(htmlText).replace( - /fa[blrs]?:fa-[\w-]+/g, - // cspell: disable-line - (s) => `` - ), - labelStyle: style.replace("fill:", "color:") - }; - const vertexNode = addHtmlSpan(el, node, width, classes, addSvgBackground); - return vertexNode; - } else { - const structuredText = markdownToLines(text); - const svgLabel = createFormattedText(width, el, structuredText, addSvgBackground); - return svgLabel; - } -}; - - - -/***/ }), - -/***/ 88146: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ a: () => (/* binding */ insertMarkers$1), -/* harmony export */ b: () => (/* binding */ clear$1), -/* harmony export */ c: () => (/* binding */ createLabel$1), -/* harmony export */ d: () => (/* binding */ clear), -/* harmony export */ e: () => (/* binding */ insertNode), -/* harmony export */ f: () => (/* binding */ insertEdgeLabel), -/* harmony export */ g: () => (/* binding */ getSubGraphTitleMargins), -/* harmony export */ h: () => (/* binding */ insertEdge), -/* harmony export */ i: () => (/* binding */ intersectRect$1), -/* harmony export */ j: () => (/* binding */ positionEdgeLabel), -/* harmony export */ k: () => (/* binding */ getLineFunctionsWithOffset), -/* harmony export */ l: () => (/* binding */ labelHelper), -/* harmony export */ m: () => (/* binding */ addEdgeMarkers), -/* harmony export */ p: () => (/* binding */ positionNode), -/* harmony export */ s: () => (/* binding */ setNodeElem), -/* harmony export */ u: () => (/* binding */ updateNodeBounds) -/* harmony export */ }); -/* harmony import */ var _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(86079); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(26312); -/* harmony import */ var _createText_2e5e7dd3_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(73743); - - - -const insertMarkers = (elem, markerArray, type, id) => { - markerArray.forEach((markerName) => { - markers[markerName](elem, type, id); - }); -}; -const extension = (elem, type, id) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.trace("Making markers for ", id); - elem.append("defs").append("marker").attr("id", id + "_" + type + "-extensionStart").attr("class", "marker extension " + type).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 1,7 L18,13 V 1 Z"); - elem.append("defs").append("marker").attr("id", id + "_" + type + "-extensionEnd").attr("class", "marker extension " + type).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 1,1 V 13 L18,7 Z"); -}; -const composition = (elem, type, id) => { - elem.append("defs").append("marker").attr("id", id + "_" + type + "-compositionStart").attr("class", "marker composition " + type).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"); - elem.append("defs").append("marker").attr("id", id + "_" + type + "-compositionEnd").attr("class", "marker composition " + type).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"); -}; -const aggregation = (elem, type, id) => { - elem.append("defs").append("marker").attr("id", id + "_" + type + "-aggregationStart").attr("class", "marker aggregation " + type).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"); - elem.append("defs").append("marker").attr("id", id + "_" + type + "-aggregationEnd").attr("class", "marker aggregation " + type).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"); -}; -const dependency = (elem, type, id) => { - elem.append("defs").append("marker").attr("id", id + "_" + type + "-dependencyStart").attr("class", "marker dependency " + type).attr("refX", 6).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 5,7 L9,13 L1,7 L9,1 Z"); - elem.append("defs").append("marker").attr("id", id + "_" + type + "-dependencyEnd").attr("class", "marker dependency " + type).attr("refX", 13).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z"); -}; -const lollipop = (elem, type, id) => { - elem.append("defs").append("marker").attr("id", id + "_" + type + "-lollipopStart").attr("class", "marker lollipop " + type).attr("refX", 13).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("circle").attr("stroke", "black").attr("fill", "transparent").attr("cx", 7).attr("cy", 7).attr("r", 6); - elem.append("defs").append("marker").attr("id", id + "_" + type + "-lollipopEnd").attr("class", "marker lollipop " + type).attr("refX", 1).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("circle").attr("stroke", "black").attr("fill", "transparent").attr("cx", 7).attr("cy", 7).attr("r", 6); -}; -const point = (elem, type, id) => { - elem.append("marker").attr("id", id + "_" + type + "-pointEnd").attr("class", "marker " + type).attr("viewBox", "0 0 10 10").attr("refX", 6).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"); - elem.append("marker").attr("id", id + "_" + type + "-pointStart").attr("class", "marker " + type).attr("viewBox", "0 0 10 10").attr("refX", 4.5).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 5 L 10 10 L 10 0 z").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"); -}; -const circle$1 = (elem, type, id) => { - elem.append("marker").attr("id", id + "_" + type + "-circleEnd").attr("class", "marker " + type).attr("viewBox", "0 0 10 10").attr("refX", 11).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"); - elem.append("marker").attr("id", id + "_" + type + "-circleStart").attr("class", "marker " + type).attr("viewBox", "0 0 10 10").attr("refX", -1).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"); -}; -const cross = (elem, type, id) => { - elem.append("marker").attr("id", id + "_" + type + "-crossEnd").attr("class", "marker cross " + type).attr("viewBox", "0 0 11 11").attr("refX", 12).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0"); - elem.append("marker").attr("id", id + "_" + type + "-crossStart").attr("class", "marker cross " + type).attr("viewBox", "0 0 11 11").attr("refX", -1).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0"); -}; -const barb = (elem, type, id) => { - elem.append("defs").append("marker").attr("id", id + "_" + type + "-barbEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 14).attr("markerUnits", "strokeWidth").attr("orient", "auto").append("path").attr("d", "M 19,7 L9,13 L14,7 L9,1 Z"); -}; -const markers = { - extension, - composition, - aggregation, - dependency, - lollipop, - point, - circle: circle$1, - cross, - barb -}; -const insertMarkers$1 = insertMarkers; -function applyStyle(dom, styleFn) { - if (styleFn) { - dom.attr("style", styleFn); - } -} -function addHtmlLabel(node) { - const fo = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(document.createElementNS("http://www.w3.org/2000/svg", "foreignObject")); - const div = fo.append("xhtml:div"); - const label = node.label; - const labelClass = node.isNode ? "nodeLabel" : "edgeLabel"; - div.html( - '" + label + "" - ); - applyStyle(div, node.labelStyle); - div.style("display", "inline-block"); - div.style("white-space", "nowrap"); - div.attr("xmlns", "http://www.w3.org/1999/xhtml"); - return fo.node(); -} -const createLabel = (_vertexText, style, isTitle, isNode) => { - let vertexText = _vertexText || ""; - if (typeof vertexText === "object") { - vertexText = vertexText[0]; - } - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { - vertexText = vertexText.replace(/\\n|\n/g, "
    "); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("vertexText" + vertexText); - const node = { - isNode, - label: (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.M)(vertexText).replace( - /fa[blrs]?:fa-[\w-]+/g, - // cspell: disable-line - (s) => `` - ), - labelStyle: style.replace("fill:", "color:") - }; - let vertexNode = addHtmlLabel(node); - return vertexNode; - } else { - const svgLabel = document.createElementNS("http://www.w3.org/2000/svg", "text"); - svgLabel.setAttribute("style", style.replace("color:", "fill:")); - let rows = []; - if (typeof vertexText === "string") { - rows = vertexText.split(/\\n|\n|/gi); - } else if (Array.isArray(vertexText)) { - rows = vertexText; - } else { - rows = []; - } - for (const row of rows) { - const tspan = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); - tspan.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"); - tspan.setAttribute("dy", "1em"); - tspan.setAttribute("x", "0"); - if (isTitle) { - tspan.setAttribute("class", "title-row"); - } else { - tspan.setAttribute("class", "row"); - } - tspan.textContent = row.trim(); - svgLabel.appendChild(tspan); - } - return svgLabel; - } -}; -const createLabel$1 = createLabel; -const labelHelper = async (parent, node, _classes, isNode) => { - let classes; - const useHtmlLabels = node.useHtmlLabels || (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels); - if (!_classes) { - classes = "node default"; - } else { - classes = _classes; - } - const shapeSvg = parent.insert("g").attr("class", classes).attr("id", node.domId || node.id); - const label = shapeSvg.insert("g").attr("class", "label").attr("style", node.labelStyle); - let labelText; - if (node.labelText === void 0) { - labelText = ""; - } else { - labelText = typeof node.labelText === "string" ? node.labelText : node.labelText[0]; - } - const textNode = label.node(); - let text; - if (node.labelType === "markdown") { - text = (0,_createText_2e5e7dd3_js__WEBPACK_IMPORTED_MODULE_2__.a)(label, (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.d)((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.M)(labelText), (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)()), { - useHtmlLabels, - width: node.width || (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.wrappingWidth, - classes: "markdown-node-label" - }); - } else { - text = textNode.appendChild( - createLabel$1( - (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.d)((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.M)(labelText), (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)()), - node.labelStyle, - false, - isNode - ) - ); - } - let bbox = text.getBBox(); - const halfPadding = node.padding / 2; - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { - const div = text.children[0]; - const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(text); - const images = div.getElementsByTagName("img"); - if (images) { - const noImgText = labelText.replace(/]*>/g, "").trim() === ""; - await Promise.all( - [...images].map( - (img) => new Promise((res) => { - function setupImage() { - img.style.display = "flex"; - img.style.flexDirection = "column"; - if (noImgText) { - const bodyFontSize = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().fontSize ? (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().fontSize : window.getComputedStyle(document.body).fontSize; - const enlargingFactor = 5; - const width = parseInt(bodyFontSize, 10) * enlargingFactor + "px"; - img.style.minWidth = width; - img.style.maxWidth = width; - } else { - img.style.width = "100%"; - } - res(img); - } - setTimeout(() => { - if (img.complete) { - setupImage(); - } - }); - img.addEventListener("error", setupImage); - img.addEventListener("load", setupImage); - }) - ) - ); - } - bbox = div.getBoundingClientRect(); - dv.attr("width", bbox.width); - dv.attr("height", bbox.height); - } - if (useHtmlLabels) { - label.attr("transform", "translate(" + -bbox.width / 2 + ", " + -bbox.height / 2 + ")"); - } else { - label.attr("transform", "translate(0, " + -bbox.height / 2 + ")"); - } - if (node.centerLabel) { - label.attr("transform", "translate(" + -bbox.width / 2 + ", " + -bbox.height / 2 + ")"); - } - label.insert("rect", ":first-child"); - return { shapeSvg, bbox, halfPadding, label }; -}; -const updateNodeBounds = (node, element) => { - const bbox = element.node().getBBox(); - node.width = bbox.width; - node.height = bbox.height; -}; -function insertPolygonShape(parent, w, h, points) { - return parent.insert("polygon", ":first-child").attr( - "points", - points.map(function(d) { - return d.x + "," + d.y; - }).join(" ") - ).attr("class", "label-container").attr("transform", "translate(" + -w / 2 + "," + h / 2 + ")"); -} -function intersectNode(node, point2) { - return node.intersect(point2); -} -function intersectEllipse(node, rx, ry, point2) { - var cx = node.x; - var cy = node.y; - var px = cx - point2.x; - var py = cy - point2.y; - var det = Math.sqrt(rx * rx * py * py + ry * ry * px * px); - var dx = Math.abs(rx * ry * px / det); - if (point2.x < cx) { - dx = -dx; - } - var dy = Math.abs(rx * ry * py / det); - if (point2.y < cy) { - dy = -dy; - } - return { x: cx + dx, y: cy + dy }; -} -function intersectCircle(node, rx, point2) { - return intersectEllipse(node, rx, rx, point2); -} -function intersectLine(p1, p2, q1, q2) { - var a1, a2, b1, b2, c1, c2; - var r1, r2, r3, r4; - var denom, offset, num; - var x, y; - a1 = p2.y - p1.y; - b1 = p1.x - p2.x; - c1 = p2.x * p1.y - p1.x * p2.y; - r3 = a1 * q1.x + b1 * q1.y + c1; - r4 = a1 * q2.x + b1 * q2.y + c1; - if (r3 !== 0 && r4 !== 0 && sameSign(r3, r4)) { - return; - } - a2 = q2.y - q1.y; - b2 = q1.x - q2.x; - c2 = q2.x * q1.y - q1.x * q2.y; - r1 = a2 * p1.x + b2 * p1.y + c2; - r2 = a2 * p2.x + b2 * p2.y + c2; - if (r1 !== 0 && r2 !== 0 && sameSign(r1, r2)) { - return; - } - denom = a1 * b2 - a2 * b1; - if (denom === 0) { - return; - } - offset = Math.abs(denom / 2); - num = b1 * c2 - b2 * c1; - x = num < 0 ? (num - offset) / denom : (num + offset) / denom; - num = a2 * c1 - a1 * c2; - y = num < 0 ? (num - offset) / denom : (num + offset) / denom; - return { x, y }; -} -function sameSign(r1, r2) { - return r1 * r2 > 0; -} -function intersectPolygon(node, polyPoints, point2) { - var x1 = node.x; - var y1 = node.y; - var intersections = []; - var minX = Number.POSITIVE_INFINITY; - var minY = Number.POSITIVE_INFINITY; - if (typeof polyPoints.forEach === "function") { - polyPoints.forEach(function(entry) { - minX = Math.min(minX, entry.x); - minY = Math.min(minY, entry.y); - }); - } else { - minX = Math.min(minX, polyPoints.x); - minY = Math.min(minY, polyPoints.y); - } - var left = x1 - node.width / 2 - minX; - var top = y1 - node.height / 2 - minY; - for (var i = 0; i < polyPoints.length; i++) { - var p1 = polyPoints[i]; - var p2 = polyPoints[i < polyPoints.length - 1 ? i + 1 : 0]; - var intersect2 = intersectLine( - node, - point2, - { x: left + p1.x, y: top + p1.y }, - { x: left + p2.x, y: top + p2.y } - ); - if (intersect2) { - intersections.push(intersect2); - } - } - if (!intersections.length) { - return node; - } - if (intersections.length > 1) { - intersections.sort(function(p, q) { - var pdx = p.x - point2.x; - var pdy = p.y - point2.y; - var distp = Math.sqrt(pdx * pdx + pdy * pdy); - var qdx = q.x - point2.x; - var qdy = q.y - point2.y; - var distq = Math.sqrt(qdx * qdx + qdy * qdy); - return distp < distq ? -1 : distp === distq ? 0 : 1; - }); - } - return intersections[0]; -} -const intersectRect = (node, point2) => { - var x = node.x; - var y = node.y; - var dx = point2.x - x; - var dy = point2.y - y; - var w = node.width / 2; - var h = node.height / 2; - var sx, sy; - if (Math.abs(dy) * w > Math.abs(dx) * h) { - if (dy < 0) { - h = -h; - } - sx = dy === 0 ? 0 : h * dx / dy; - sy = h; - } else { - if (dx < 0) { - w = -w; - } - sx = w; - sy = dx === 0 ? 0 : w * dy / dx; - } - return { x: x + sx, y: y + sy }; -}; -const intersectRect$1 = intersectRect; -const intersect = { - node: intersectNode, - circle: intersectCircle, - ellipse: intersectEllipse, - polygon: intersectPolygon, - rect: intersectRect$1 -}; -const note = async (parent, node) => { - const useHtmlLabels = node.useHtmlLabels || (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels; - if (!useHtmlLabels) { - node.centerLabel = true; - } - const { shapeSvg, bbox, halfPadding } = await labelHelper( - parent, - node, - "node " + node.classes, - true - ); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Classes = ", node.classes); - const rect2 = shapeSvg.insert("rect", ":first-child"); - rect2.attr("rx", node.rx).attr("ry", node.ry).attr("x", -bbox.width / 2 - halfPadding).attr("y", -bbox.height / 2 - halfPadding).attr("width", bbox.width + node.padding).attr("height", bbox.height + node.padding); - updateNodeBounds(node, rect2); - node.intersect = function(point2) { - return intersect.rect(node, point2); - }; - return shapeSvg; -}; -const note$1 = note; -const expandAndDeduplicateDirections = (directions) => { - const uniqueDirections = /* @__PURE__ */ new Set(); - for (const direction of directions) { - switch (direction) { - case "x": - uniqueDirections.add("right"); - uniqueDirections.add("left"); - break; - case "y": - uniqueDirections.add("up"); - uniqueDirections.add("down"); - break; - default: - uniqueDirections.add(direction); - break; - } - } - return uniqueDirections; -}; -const getArrowPoints = (duplicatedDirections, bbox, node) => { - const directions = expandAndDeduplicateDirections(duplicatedDirections); - const f = 2; - const height = bbox.height + 2 * node.padding; - const midpoint = height / f; - const width = bbox.width + 2 * midpoint + node.padding; - const padding = node.padding / 2; - if (directions.has("right") && directions.has("left") && directions.has("up") && directions.has("down")) { - return [ - // Bottom - { x: 0, y: 0 }, - { x: midpoint, y: 0 }, - { x: width / 2, y: 2 * padding }, - { x: width - midpoint, y: 0 }, - { x: width, y: 0 }, - // Right - { x: width, y: -height / 3 }, - { x: width + 2 * padding, y: -height / 2 }, - { x: width, y: -2 * height / 3 }, - { x: width, y: -height }, - // Top - { x: width - midpoint, y: -height }, - { x: width / 2, y: -height - 2 * padding }, - { x: midpoint, y: -height }, - // Left - { x: 0, y: -height }, - { x: 0, y: -2 * height / 3 }, - { x: -2 * padding, y: -height / 2 }, - { x: 0, y: -height / 3 } - ]; - } - if (directions.has("right") && directions.has("left") && directions.has("up")) { - return [ - { x: midpoint, y: 0 }, - { x: width - midpoint, y: 0 }, - { x: width, y: -height / 2 }, - { x: width - midpoint, y: -height }, - { x: midpoint, y: -height }, - { x: 0, y: -height / 2 } - ]; - } - if (directions.has("right") && directions.has("left") && directions.has("down")) { - return [ - { x: 0, y: 0 }, - { x: midpoint, y: -height }, - { x: width - midpoint, y: -height }, - { x: width, y: 0 } - ]; - } - if (directions.has("right") && directions.has("up") && directions.has("down")) { - return [ - { x: 0, y: 0 }, - { x: width, y: -midpoint }, - { x: width, y: -height + midpoint }, - { x: 0, y: -height } - ]; - } - if (directions.has("left") && directions.has("up") && directions.has("down")) { - return [ - { x: width, y: 0 }, - { x: 0, y: -midpoint }, - { x: 0, y: -height + midpoint }, - { x: width, y: -height } - ]; - } - if (directions.has("right") && directions.has("left")) { - return [ - { x: midpoint, y: 0 }, - { x: midpoint, y: -padding }, - { x: width - midpoint, y: -padding }, - { x: width - midpoint, y: 0 }, - { x: width, y: -height / 2 }, - { x: width - midpoint, y: -height }, - { x: width - midpoint, y: -height + padding }, - { x: midpoint, y: -height + padding }, - { x: midpoint, y: -height }, - { x: 0, y: -height / 2 } - ]; - } - if (directions.has("up") && directions.has("down")) { - return [ - // Bottom center - { x: width / 2, y: 0 }, - // Left pont of bottom arrow - { x: 0, y: -padding }, - { x: midpoint, y: -padding }, - // Left top over vertical section - { x: midpoint, y: -height + padding }, - { x: 0, y: -height + padding }, - // Top of arrow - { x: width / 2, y: -height }, - { x: width, y: -height + padding }, - // Top of right vertical bar - { x: width - midpoint, y: -height + padding }, - { x: width - midpoint, y: -padding }, - { x: width, y: -padding } - ]; - } - if (directions.has("right") && directions.has("up")) { - return [ - { x: 0, y: 0 }, - { x: width, y: -midpoint }, - { x: 0, y: -height } - ]; - } - if (directions.has("right") && directions.has("down")) { - return [ - { x: 0, y: 0 }, - { x: width, y: 0 }, - { x: 0, y: -height } - ]; - } - if (directions.has("left") && directions.has("up")) { - return [ - { x: width, y: 0 }, - { x: 0, y: -midpoint }, - { x: width, y: -height } - ]; - } - if (directions.has("left") && directions.has("down")) { - return [ - { x: width, y: 0 }, - { x: 0, y: 0 }, - { x: width, y: -height } - ]; - } - if (directions.has("right")) { - return [ - { x: midpoint, y: -padding }, - { x: midpoint, y: -padding }, - { x: width - midpoint, y: -padding }, - { x: width - midpoint, y: 0 }, - { x: width, y: -height / 2 }, - { x: width - midpoint, y: -height }, - { x: width - midpoint, y: -height + padding }, - // top left corner of arrow - { x: midpoint, y: -height + padding }, - { x: midpoint, y: -height + padding } - ]; - } - if (directions.has("left")) { - return [ - { x: midpoint, y: 0 }, - { x: midpoint, y: -padding }, - // Two points, the right corners - { x: width - midpoint, y: -padding }, - { x: width - midpoint, y: -height + padding }, - { x: midpoint, y: -height + padding }, - { x: midpoint, y: -height }, - { x: 0, y: -height / 2 } - ]; - } - if (directions.has("up")) { - return [ - // Bottom center - { x: midpoint, y: -padding }, - // Left top over vertical section - { x: midpoint, y: -height + padding }, - { x: 0, y: -height + padding }, - // Top of arrow - { x: width / 2, y: -height }, - { x: width, y: -height + padding }, - // Top of right vertical bar - { x: width - midpoint, y: -height + padding }, - { x: width - midpoint, y: -padding } - ]; - } - if (directions.has("down")) { - return [ - // Bottom center - { x: width / 2, y: 0 }, - // Left pont of bottom arrow - { x: 0, y: -padding }, - { x: midpoint, y: -padding }, - // Left top over vertical section - { x: midpoint, y: -height + padding }, - { x: width - midpoint, y: -height + padding }, - { x: width - midpoint, y: -padding }, - { x: width, y: -padding } - ]; - } - return [{ x: 0, y: 0 }]; -}; -const formatClass = (str) => { - if (str) { - return " " + str; - } - return ""; -}; -const getClassesFromNode = (node, otherClasses) => { - return `${otherClasses ? otherClasses : "node default"}${formatClass(node.classes)} ${formatClass( - node.class - )}`; -}; -const question = async (parent, node) => { - const { shapeSvg, bbox } = await labelHelper( - parent, - node, - getClassesFromNode(node, void 0), - true - ); - const w = bbox.width + node.padding; - const h = bbox.height + node.padding; - const s = w + h; - const points = [ - { x: s / 2, y: 0 }, - { x: s, y: -s / 2 }, - { x: s / 2, y: -s }, - { x: 0, y: -s / 2 } - ]; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Question main (Circle)"); - const questionElem = insertPolygonShape(shapeSvg, s, s, points); - questionElem.attr("style", node.style); - updateNodeBounds(node, questionElem); - node.intersect = function(point2) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.warn("Intersect called"); - return intersect.polygon(node, points, point2); - }; - return shapeSvg; -}; -const choice = (parent, node) => { - const shapeSvg = parent.insert("g").attr("class", "node default").attr("id", node.domId || node.id); - const s = 28; - const points = [ - { x: 0, y: s / 2 }, - { x: s / 2, y: 0 }, - { x: 0, y: -s / 2 }, - { x: -s / 2, y: 0 } - ]; - const choice2 = shapeSvg.insert("polygon", ":first-child").attr( - "points", - points.map(function(d) { - return d.x + "," + d.y; - }).join(" ") - ); - choice2.attr("class", "state-start").attr("r", 7).attr("width", 28).attr("height", 28); - node.width = 28; - node.height = 28; - node.intersect = function(point2) { - return intersect.circle(node, 14, point2); - }; - return shapeSvg; -}; -const hexagon = async (parent, node) => { - const { shapeSvg, bbox } = await labelHelper( - parent, - node, - getClassesFromNode(node, void 0), - true - ); - const f = 4; - const h = bbox.height + node.padding; - const m = h / f; - const w = bbox.width + 2 * m + node.padding; - const points = [ - { x: m, y: 0 }, - { x: w - m, y: 0 }, - { x: w, y: -h / 2 }, - { x: w - m, y: -h }, - { x: m, y: -h }, - { x: 0, y: -h / 2 } - ]; - const hex = insertPolygonShape(shapeSvg, w, h, points); - hex.attr("style", node.style); - updateNodeBounds(node, hex); - node.intersect = function(point2) { - return intersect.polygon(node, points, point2); - }; - return shapeSvg; -}; -const block_arrow = async (parent, node) => { - const { shapeSvg, bbox } = await labelHelper(parent, node, void 0, true); - const f = 2; - const h = bbox.height + 2 * node.padding; - const m = h / f; - const w = bbox.width + 2 * m + node.padding; - const points = getArrowPoints(node.directions, bbox, node); - const blockArrow = insertPolygonShape(shapeSvg, w, h, points); - blockArrow.attr("style", node.style); - updateNodeBounds(node, blockArrow); - node.intersect = function(point2) { - return intersect.polygon(node, points, point2); - }; - return shapeSvg; -}; -const rect_left_inv_arrow = async (parent, node) => { - const { shapeSvg, bbox } = await labelHelper( - parent, - node, - getClassesFromNode(node, void 0), - true - ); - const w = bbox.width + node.padding; - const h = bbox.height + node.padding; - const points = [ - { x: -h / 2, y: 0 }, - { x: w, y: 0 }, - { x: w, y: -h }, - { x: -h / 2, y: -h }, - { x: 0, y: -h / 2 } - ]; - const el = insertPolygonShape(shapeSvg, w, h, points); - el.attr("style", node.style); - node.width = w + h; - node.height = h; - node.intersect = function(point2) { - return intersect.polygon(node, points, point2); - }; - return shapeSvg; -}; -const lean_right = async (parent, node) => { - const { shapeSvg, bbox } = await labelHelper(parent, node, getClassesFromNode(node), true); - const w = bbox.width + node.padding; - const h = bbox.height + node.padding; - const points = [ - { x: -2 * h / 6, y: 0 }, - { x: w - h / 6, y: 0 }, - { x: w + 2 * h / 6, y: -h }, - { x: h / 6, y: -h } - ]; - const el = insertPolygonShape(shapeSvg, w, h, points); - el.attr("style", node.style); - updateNodeBounds(node, el); - node.intersect = function(point2) { - return intersect.polygon(node, points, point2); - }; - return shapeSvg; -}; -const lean_left = async (parent, node) => { - const { shapeSvg, bbox } = await labelHelper( - parent, - node, - getClassesFromNode(node, void 0), - true - ); - const w = bbox.width + node.padding; - const h = bbox.height + node.padding; - const points = [ - { x: 2 * h / 6, y: 0 }, - { x: w + h / 6, y: 0 }, - { x: w - 2 * h / 6, y: -h }, - { x: -h / 6, y: -h } - ]; - const el = insertPolygonShape(shapeSvg, w, h, points); - el.attr("style", node.style); - updateNodeBounds(node, el); - node.intersect = function(point2) { - return intersect.polygon(node, points, point2); - }; - return shapeSvg; -}; -const trapezoid = async (parent, node) => { - const { shapeSvg, bbox } = await labelHelper( - parent, - node, - getClassesFromNode(node, void 0), - true - ); - const w = bbox.width + node.padding; - const h = bbox.height + node.padding; - const points = [ - { x: -2 * h / 6, y: 0 }, - { x: w + 2 * h / 6, y: 0 }, - { x: w - h / 6, y: -h }, - { x: h / 6, y: -h } - ]; - const el = insertPolygonShape(shapeSvg, w, h, points); - el.attr("style", node.style); - updateNodeBounds(node, el); - node.intersect = function(point2) { - return intersect.polygon(node, points, point2); - }; - return shapeSvg; -}; -const inv_trapezoid = async (parent, node) => { - const { shapeSvg, bbox } = await labelHelper( - parent, - node, - getClassesFromNode(node, void 0), - true - ); - const w = bbox.width + node.padding; - const h = bbox.height + node.padding; - const points = [ - { x: h / 6, y: 0 }, - { x: w - h / 6, y: 0 }, - { x: w + 2 * h / 6, y: -h }, - { x: -2 * h / 6, y: -h } - ]; - const el = insertPolygonShape(shapeSvg, w, h, points); - el.attr("style", node.style); - updateNodeBounds(node, el); - node.intersect = function(point2) { - return intersect.polygon(node, points, point2); - }; - return shapeSvg; -}; -const rect_right_inv_arrow = async (parent, node) => { - const { shapeSvg, bbox } = await labelHelper( - parent, - node, - getClassesFromNode(node, void 0), - true - ); - const w = bbox.width + node.padding; - const h = bbox.height + node.padding; - const points = [ - { x: 0, y: 0 }, - { x: w + h / 2, y: 0 }, - { x: w, y: -h / 2 }, - { x: w + h / 2, y: -h }, - { x: 0, y: -h } - ]; - const el = insertPolygonShape(shapeSvg, w, h, points); - el.attr("style", node.style); - updateNodeBounds(node, el); - node.intersect = function(point2) { - return intersect.polygon(node, points, point2); - }; - return shapeSvg; -}; -const cylinder = async (parent, node) => { - const { shapeSvg, bbox } = await labelHelper( - parent, - node, - getClassesFromNode(node, void 0), - true - ); - const w = bbox.width + node.padding; - const rx = w / 2; - const ry = rx / (2.5 + w / 50); - const h = bbox.height + ry + node.padding; - const shape = "M 0," + ry + " a " + rx + "," + ry + " 0,0,0 " + w + " 0 a " + rx + "," + ry + " 0,0,0 " + -w + " 0 l 0," + h + " a " + rx + "," + ry + " 0,0,0 " + w + " 0 l 0," + -h; - const el = shapeSvg.attr("label-offset-y", ry).insert("path", ":first-child").attr("style", node.style).attr("d", shape).attr("transform", "translate(" + -w / 2 + "," + -(h / 2 + ry) + ")"); - updateNodeBounds(node, el); - node.intersect = function(point2) { - const pos = intersect.rect(node, point2); - const x = pos.x - node.x; - if (rx != 0 && (Math.abs(x) < node.width / 2 || Math.abs(x) == node.width / 2 && Math.abs(pos.y - node.y) > node.height / 2 - ry)) { - let y = ry * ry * (1 - x * x / (rx * rx)); - if (y != 0) { - y = Math.sqrt(y); - } - y = ry - y; - if (point2.y - node.y > 0) { - y = -y; - } - pos.y += y; - } - return pos; - }; - return shapeSvg; -}; -const rect = async (parent, node) => { - const { shapeSvg, bbox, halfPadding } = await labelHelper( - parent, - node, - "node " + node.classes + " " + node.class, - true - ); - const rect2 = shapeSvg.insert("rect", ":first-child"); - const totalWidth = node.positioned ? node.width : bbox.width + node.padding; - const totalHeight = node.positioned ? node.height : bbox.height + node.padding; - const x = node.positioned ? -totalWidth / 2 : -bbox.width / 2 - halfPadding; - const y = node.positioned ? -totalHeight / 2 : -bbox.height / 2 - halfPadding; - rect2.attr("class", "basic label-container").attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("x", x).attr("y", y).attr("width", totalWidth).attr("height", totalHeight); - if (node.props) { - const propKeys = new Set(Object.keys(node.props)); - if (node.props.borders) { - applyNodePropertyBorders(rect2, node.props.borders, totalWidth, totalHeight); - propKeys.delete("borders"); - } - propKeys.forEach((propKey) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.warn(`Unknown node property ${propKey}`); - }); - } - updateNodeBounds(node, rect2); - node.intersect = function(point2) { - return intersect.rect(node, point2); - }; - return shapeSvg; -}; -const composite = async (parent, node) => { - const { shapeSvg, bbox, halfPadding } = await labelHelper( - parent, - node, - "node " + node.classes, - true - ); - const rect2 = shapeSvg.insert("rect", ":first-child"); - const totalWidth = node.positioned ? node.width : bbox.width + node.padding; - const totalHeight = node.positioned ? node.height : bbox.height + node.padding; - const x = node.positioned ? -totalWidth / 2 : -bbox.width / 2 - halfPadding; - const y = node.positioned ? -totalHeight / 2 : -bbox.height / 2 - halfPadding; - rect2.attr("class", "basic cluster composite label-container").attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("x", x).attr("y", y).attr("width", totalWidth).attr("height", totalHeight); - if (node.props) { - const propKeys = new Set(Object.keys(node.props)); - if (node.props.borders) { - applyNodePropertyBorders(rect2, node.props.borders, totalWidth, totalHeight); - propKeys.delete("borders"); - } - propKeys.forEach((propKey) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.warn(`Unknown node property ${propKey}`); - }); - } - updateNodeBounds(node, rect2); - node.intersect = function(point2) { - return intersect.rect(node, point2); - }; - return shapeSvg; -}; -const labelRect = async (parent, node) => { - const { shapeSvg } = await labelHelper(parent, node, "label", true); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.trace("Classes = ", node.class); - const rect2 = shapeSvg.insert("rect", ":first-child"); - const totalWidth = 0; - const totalHeight = 0; - rect2.attr("width", totalWidth).attr("height", totalHeight); - shapeSvg.attr("class", "label edgeLabel"); - if (node.props) { - const propKeys = new Set(Object.keys(node.props)); - if (node.props.borders) { - applyNodePropertyBorders(rect2, node.props.borders, totalWidth, totalHeight); - propKeys.delete("borders"); - } - propKeys.forEach((propKey) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.warn(`Unknown node property ${propKey}`); - }); - } - updateNodeBounds(node, rect2); - node.intersect = function(point2) { - return intersect.rect(node, point2); - }; - return shapeSvg; -}; -function applyNodePropertyBorders(rect2, borders, totalWidth, totalHeight) { - const strokeDashArray = []; - const addBorder = (length) => { - strokeDashArray.push(length, 0); - }; - const skipBorder = (length) => { - strokeDashArray.push(0, length); - }; - if (borders.includes("t")) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("add top border"); - addBorder(totalWidth); - } else { - skipBorder(totalWidth); - } - if (borders.includes("r")) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("add right border"); - addBorder(totalHeight); - } else { - skipBorder(totalHeight); - } - if (borders.includes("b")) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("add bottom border"); - addBorder(totalWidth); - } else { - skipBorder(totalWidth); - } - if (borders.includes("l")) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("add left border"); - addBorder(totalHeight); - } else { - skipBorder(totalHeight); - } - rect2.attr("stroke-dasharray", strokeDashArray.join(" ")); -} -const rectWithTitle = (parent, node) => { - let classes; - if (!node.classes) { - classes = "node default"; - } else { - classes = "node " + node.classes; - } - const shapeSvg = parent.insert("g").attr("class", classes).attr("id", node.domId || node.id); - const rect2 = shapeSvg.insert("rect", ":first-child"); - const innerLine = shapeSvg.insert("line"); - const label = shapeSvg.insert("g").attr("class", "label"); - const text2 = node.labelText.flat ? node.labelText.flat() : node.labelText; - let title = ""; - if (typeof text2 === "object") { - title = text2[0]; - } else { - title = text2; - } - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Label text abc79", title, text2, typeof text2 === "object"); - const text = label.node().appendChild(createLabel$1(title, node.labelStyle, true, true)); - let bbox = { width: 0, height: 0 }; - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { - const div = text.children[0]; - const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(text); - bbox = div.getBoundingClientRect(); - dv.attr("width", bbox.width); - dv.attr("height", bbox.height); - } - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Text 2", text2); - const textRows = text2.slice(1, text2.length); - let titleBox = text.getBBox(); - const descr = label.node().appendChild( - createLabel$1(textRows.join ? textRows.join("
    ") : textRows, node.labelStyle, true, true) - ); - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { - const div = descr.children[0]; - const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(descr); - bbox = div.getBoundingClientRect(); - dv.attr("width", bbox.width); - dv.attr("height", bbox.height); - } - const halfPadding = node.padding / 2; - (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(descr).attr( - "transform", - "translate( " + // (titleBox.width - bbox.width) / 2 + - (bbox.width > titleBox.width ? 0 : (titleBox.width - bbox.width) / 2) + ", " + (titleBox.height + halfPadding + 5) + ")" - ); - (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(text).attr( - "transform", - "translate( " + // (titleBox.width - bbox.width) / 2 + - (bbox.width < titleBox.width ? 0 : -(titleBox.width - bbox.width) / 2) + ", 0)" - ); - bbox = label.node().getBBox(); - label.attr( - "transform", - "translate(" + -bbox.width / 2 + ", " + (-bbox.height / 2 - halfPadding + 3) + ")" - ); - rect2.attr("class", "outer title-state").attr("x", -bbox.width / 2 - halfPadding).attr("y", -bbox.height / 2 - halfPadding).attr("width", bbox.width + node.padding).attr("height", bbox.height + node.padding); - innerLine.attr("class", "divider").attr("x1", -bbox.width / 2 - halfPadding).attr("x2", bbox.width / 2 + halfPadding).attr("y1", -bbox.height / 2 - halfPadding + titleBox.height + halfPadding).attr("y2", -bbox.height / 2 - halfPadding + titleBox.height + halfPadding); - updateNodeBounds(node, rect2); - node.intersect = function(point2) { - return intersect.rect(node, point2); - }; - return shapeSvg; -}; -const stadium = async (parent, node) => { - const { shapeSvg, bbox } = await labelHelper( - parent, - node, - getClassesFromNode(node, void 0), - true - ); - const h = bbox.height + node.padding; - const w = bbox.width + h / 4 + node.padding; - const rect2 = shapeSvg.insert("rect", ":first-child").attr("style", node.style).attr("rx", h / 2).attr("ry", h / 2).attr("x", -w / 2).attr("y", -h / 2).attr("width", w).attr("height", h); - updateNodeBounds(node, rect2); - node.intersect = function(point2) { - return intersect.rect(node, point2); - }; - return shapeSvg; -}; -const circle = async (parent, node) => { - const { shapeSvg, bbox, halfPadding } = await labelHelper( - parent, - node, - getClassesFromNode(node, void 0), - true - ); - const circle2 = shapeSvg.insert("circle", ":first-child"); - circle2.attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("r", bbox.width / 2 + halfPadding).attr("width", bbox.width + node.padding).attr("height", bbox.height + node.padding); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Circle main"); - updateNodeBounds(node, circle2); - node.intersect = function(point2) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Circle intersect", node, bbox.width / 2 + halfPadding, point2); - return intersect.circle(node, bbox.width / 2 + halfPadding, point2); - }; - return shapeSvg; -}; -const doublecircle = async (parent, node) => { - const { shapeSvg, bbox, halfPadding } = await labelHelper( - parent, - node, - getClassesFromNode(node, void 0), - true - ); - const gap = 5; - const circleGroup = shapeSvg.insert("g", ":first-child"); - const outerCircle = circleGroup.insert("circle"); - const innerCircle = circleGroup.insert("circle"); - circleGroup.attr("class", node.class); - outerCircle.attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("r", bbox.width / 2 + halfPadding + gap).attr("width", bbox.width + node.padding + gap * 2).attr("height", bbox.height + node.padding + gap * 2); - innerCircle.attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("r", bbox.width / 2 + halfPadding).attr("width", bbox.width + node.padding).attr("height", bbox.height + node.padding); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.info("DoubleCircle main"); - updateNodeBounds(node, outerCircle); - node.intersect = function(point2) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.info("DoubleCircle intersect", node, bbox.width / 2 + halfPadding + gap, point2); - return intersect.circle(node, bbox.width / 2 + halfPadding + gap, point2); - }; - return shapeSvg; -}; -const subroutine = async (parent, node) => { - const { shapeSvg, bbox } = await labelHelper( - parent, - node, - getClassesFromNode(node, void 0), - true - ); - const w = bbox.width + node.padding; - const h = bbox.height + node.padding; - const points = [ - { x: 0, y: 0 }, - { x: w, y: 0 }, - { x: w, y: -h }, - { x: 0, y: -h }, - { x: 0, y: 0 }, - { x: -8, y: 0 }, - { x: w + 8, y: 0 }, - { x: w + 8, y: -h }, - { x: -8, y: -h }, - { x: -8, y: 0 } - ]; - const el = insertPolygonShape(shapeSvg, w, h, points); - el.attr("style", node.style); - updateNodeBounds(node, el); - node.intersect = function(point2) { - return intersect.polygon(node, points, point2); - }; - return shapeSvg; -}; -const start = (parent, node) => { - const shapeSvg = parent.insert("g").attr("class", "node default").attr("id", node.domId || node.id); - const circle2 = shapeSvg.insert("circle", ":first-child"); - circle2.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14); - updateNodeBounds(node, circle2); - node.intersect = function(point2) { - return intersect.circle(node, 7, point2); - }; - return shapeSvg; -}; -const forkJoin = (parent, node, dir) => { - const shapeSvg = parent.insert("g").attr("class", "node default").attr("id", node.domId || node.id); - let width = 70; - let height = 10; - if (dir === "LR") { - width = 10; - height = 70; - } - const shape = shapeSvg.append("rect").attr("x", -1 * width / 2).attr("y", -1 * height / 2).attr("width", width).attr("height", height).attr("class", "fork-join"); - updateNodeBounds(node, shape); - node.height = node.height + node.padding / 2; - node.width = node.width + node.padding / 2; - node.intersect = function(point2) { - return intersect.rect(node, point2); - }; - return shapeSvg; -}; -const end = (parent, node) => { - const shapeSvg = parent.insert("g").attr("class", "node default").attr("id", node.domId || node.id); - const innerCircle = shapeSvg.insert("circle", ":first-child"); - const circle2 = shapeSvg.insert("circle", ":first-child"); - circle2.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14); - innerCircle.attr("class", "state-end").attr("r", 5).attr("width", 10).attr("height", 10); - updateNodeBounds(node, circle2); - node.intersect = function(point2) { - return intersect.circle(node, 7, point2); - }; - return shapeSvg; -}; -const class_box = (parent, node) => { - const halfPadding = node.padding / 2; - const rowPadding = 4; - const lineHeight = 8; - let classes; - if (!node.classes) { - classes = "node default"; - } else { - classes = "node " + node.classes; - } - const shapeSvg = parent.insert("g").attr("class", classes).attr("id", node.domId || node.id); - const rect2 = shapeSvg.insert("rect", ":first-child"); - const topLine = shapeSvg.insert("line"); - const bottomLine = shapeSvg.insert("line"); - let maxWidth = 0; - let maxHeight = rowPadding; - const labelContainer = shapeSvg.insert("g").attr("class", "label"); - let verticalPos = 0; - const hasInterface = node.classData.annotations && node.classData.annotations[0]; - const interfaceLabelText = node.classData.annotations[0] ? "«" + node.classData.annotations[0] + "»" : ""; - const interfaceLabel = labelContainer.node().appendChild(createLabel$1(interfaceLabelText, node.labelStyle, true, true)); - let interfaceBBox = interfaceLabel.getBBox(); - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { - const div = interfaceLabel.children[0]; - const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(interfaceLabel); - interfaceBBox = div.getBoundingClientRect(); - dv.attr("width", interfaceBBox.width); - dv.attr("height", interfaceBBox.height); - } - if (node.classData.annotations[0]) { - maxHeight += interfaceBBox.height + rowPadding; - maxWidth += interfaceBBox.width; - } - let classTitleString = node.classData.label; - if (node.classData.type !== void 0 && node.classData.type !== "") { - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels) { - classTitleString += "<" + node.classData.type + ">"; - } else { - classTitleString += "<" + node.classData.type + ">"; - } - } - const classTitleLabel = labelContainer.node().appendChild(createLabel$1(classTitleString, node.labelStyle, true, true)); - (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(classTitleLabel).attr("class", "classTitle"); - let classTitleBBox = classTitleLabel.getBBox(); - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { - const div = classTitleLabel.children[0]; - const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(classTitleLabel); - classTitleBBox = div.getBoundingClientRect(); - dv.attr("width", classTitleBBox.width); - dv.attr("height", classTitleBBox.height); - } - maxHeight += classTitleBBox.height + rowPadding; - if (classTitleBBox.width > maxWidth) { - maxWidth = classTitleBBox.width; - } - const classAttributes = []; - node.classData.members.forEach((member) => { - const parsedInfo = member.getDisplayDetails(); - let parsedText = parsedInfo.displayText; - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels) { - parsedText = parsedText.replace(//g, ">"); - } - const lbl = labelContainer.node().appendChild( - createLabel$1( - parsedText, - parsedInfo.cssStyle ? parsedInfo.cssStyle : node.labelStyle, - true, - true - ) - ); - let bbox = lbl.getBBox(); - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { - const div = lbl.children[0]; - const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(lbl); - bbox = div.getBoundingClientRect(); - dv.attr("width", bbox.width); - dv.attr("height", bbox.height); - } - if (bbox.width > maxWidth) { - maxWidth = bbox.width; - } - maxHeight += bbox.height + rowPadding; - classAttributes.push(lbl); - }); - maxHeight += lineHeight; - const classMethods = []; - node.classData.methods.forEach((member) => { - const parsedInfo = member.getDisplayDetails(); - let displayText = parsedInfo.displayText; - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels) { - displayText = displayText.replace(//g, ">"); - } - const lbl = labelContainer.node().appendChild( - createLabel$1( - displayText, - parsedInfo.cssStyle ? parsedInfo.cssStyle : node.labelStyle, - true, - true - ) - ); - let bbox = lbl.getBBox(); - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { - const div = lbl.children[0]; - const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(lbl); - bbox = div.getBoundingClientRect(); - dv.attr("width", bbox.width); - dv.attr("height", bbox.height); - } - if (bbox.width > maxWidth) { - maxWidth = bbox.width; - } - maxHeight += bbox.height + rowPadding; - classMethods.push(lbl); - }); - maxHeight += lineHeight; - if (hasInterface) { - let diffX2 = (maxWidth - interfaceBBox.width) / 2; - (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(interfaceLabel).attr( - "transform", - "translate( " + (-1 * maxWidth / 2 + diffX2) + ", " + -1 * maxHeight / 2 + ")" - ); - verticalPos = interfaceBBox.height + rowPadding; - } - let diffX = (maxWidth - classTitleBBox.width) / 2; - (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(classTitleLabel).attr( - "transform", - "translate( " + (-1 * maxWidth / 2 + diffX) + ", " + (-1 * maxHeight / 2 + verticalPos) + ")" - ); - verticalPos += classTitleBBox.height + rowPadding; - topLine.attr("class", "divider").attr("x1", -maxWidth / 2 - halfPadding).attr("x2", maxWidth / 2 + halfPadding).attr("y1", -maxHeight / 2 - halfPadding + lineHeight + verticalPos).attr("y2", -maxHeight / 2 - halfPadding + lineHeight + verticalPos); - verticalPos += lineHeight; - classAttributes.forEach((lbl) => { - (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(lbl).attr( - "transform", - "translate( " + -maxWidth / 2 + ", " + (-1 * maxHeight / 2 + verticalPos + lineHeight / 2) + ")" - ); - const memberBBox = lbl == null ? void 0 : lbl.getBBox(); - verticalPos += ((memberBBox == null ? void 0 : memberBBox.height) ?? 0) + rowPadding; - }); - verticalPos += lineHeight; - bottomLine.attr("class", "divider").attr("x1", -maxWidth / 2 - halfPadding).attr("x2", maxWidth / 2 + halfPadding).attr("y1", -maxHeight / 2 - halfPadding + lineHeight + verticalPos).attr("y2", -maxHeight / 2 - halfPadding + lineHeight + verticalPos); - verticalPos += lineHeight; - classMethods.forEach((lbl) => { - (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(lbl).attr( - "transform", - "translate( " + -maxWidth / 2 + ", " + (-1 * maxHeight / 2 + verticalPos) + ")" - ); - const memberBBox = lbl == null ? void 0 : lbl.getBBox(); - verticalPos += ((memberBBox == null ? void 0 : memberBBox.height) ?? 0) + rowPadding; - }); - rect2.attr("style", node.style).attr("class", "outer title-state").attr("x", -maxWidth / 2 - halfPadding).attr("y", -(maxHeight / 2) - halfPadding).attr("width", maxWidth + node.padding).attr("height", maxHeight + node.padding); - updateNodeBounds(node, rect2); - node.intersect = function(point2) { - return intersect.rect(node, point2); - }; - return shapeSvg; -}; -const shapes = { - rhombus: question, - composite, - question, - rect, - labelRect, - rectWithTitle, - choice, - circle, - doublecircle, - stadium, - hexagon, - block_arrow, - rect_left_inv_arrow, - lean_right, - lean_left, - trapezoid, - inv_trapezoid, - rect_right_inv_arrow, - cylinder, - start, - end, - note: note$1, - subroutine, - fork: forkJoin, - join: forkJoin, - class_box -}; -let nodeElems = {}; -const insertNode = async (elem, node, dir) => { - let newEl; - let el; - if (node.link) { - let target; - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().securityLevel === "sandbox") { - target = "_top"; - } else if (node.linkTarget) { - target = node.linkTarget || "_blank"; - } - newEl = elem.insert("svg:a").attr("xlink:href", node.link).attr("target", target); - el = await shapes[node.shape](newEl, node, dir); - } else { - el = await shapes[node.shape](elem, node, dir); - newEl = el; - } - if (node.tooltip) { - el.attr("title", node.tooltip); - } - if (node.class) { - el.attr("class", "node default " + node.class); - } - newEl.attr("data-node", "true"); - newEl.attr("data-id", node.id); - nodeElems[node.id] = newEl; - if (node.haveCallback) { - nodeElems[node.id].attr("class", nodeElems[node.id].attr("class") + " clickable"); - } - return newEl; -}; -const setNodeElem = (elem, node) => { - nodeElems[node.id] = elem; -}; -const clear$1 = () => { - nodeElems = {}; -}; -const positionNode = (node) => { - const el = nodeElems[node.id]; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.trace( - "Transforming node", - node.diff, - node, - "translate(" + (node.x - node.width / 2 - 5) + ", " + node.width / 2 + ")" - ); - const padding = 8; - const diff = node.diff || 0; - if (node.clusterNode) { - el.attr( - "transform", - "translate(" + (node.x + diff - node.width / 2) + ", " + (node.y - node.height / 2 - padding) + ")" - ); - } else { - el.attr("transform", "translate(" + node.x + ", " + node.y + ")"); - } - return diff; -}; -const getSubGraphTitleMargins = ({ - flowchart -}) => { - var _a, _b; - const subGraphTitleTopMargin = ((_a = flowchart == null ? void 0 : flowchart.subGraphTitleMargin) == null ? void 0 : _a.top) ?? 0; - const subGraphTitleBottomMargin = ((_b = flowchart == null ? void 0 : flowchart.subGraphTitleMargin) == null ? void 0 : _b.bottom) ?? 0; - const subGraphTitleTotalMargin = subGraphTitleTopMargin + subGraphTitleBottomMargin; - return { - subGraphTitleTopMargin, - subGraphTitleBottomMargin, - subGraphTitleTotalMargin - }; -}; -const markerOffsets = { - aggregation: 18, - extension: 18, - composition: 18, - dependency: 6, - lollipop: 13.5, - arrow_point: 5.3 -}; -function calculateDeltaAndAngle(point1, point2) { - if (point1 === void 0 || point2 === void 0) { - return { angle: 0, deltaX: 0, deltaY: 0 }; - } - point1 = pointTransformer(point1); - point2 = pointTransformer(point2); - const [x1, y1] = [point1.x, point1.y]; - const [x2, y2] = [point2.x, point2.y]; - const deltaX = x2 - x1; - const deltaY = y2 - y1; - return { angle: Math.atan(deltaY / deltaX), deltaX, deltaY }; -} -const pointTransformer = (data) => { - if (Array.isArray(data)) { - return { x: data[0], y: data[1] }; - } - return data; -}; -const getLineFunctionsWithOffset = (edge) => { - return { - x: function(d, i, data) { - let offset = 0; - if (i === 0 && Object.hasOwn(markerOffsets, edge.arrowTypeStart)) { - const { angle, deltaX } = calculateDeltaAndAngle(data[0], data[1]); - offset = markerOffsets[edge.arrowTypeStart] * Math.cos(angle) * (deltaX >= 0 ? 1 : -1); - } else if (i === data.length - 1 && Object.hasOwn(markerOffsets, edge.arrowTypeEnd)) { - const { angle, deltaX } = calculateDeltaAndAngle( - data[data.length - 1], - data[data.length - 2] - ); - offset = markerOffsets[edge.arrowTypeEnd] * Math.cos(angle) * (deltaX >= 0 ? 1 : -1); - } - return pointTransformer(d).x + offset; - }, - y: function(d, i, data) { - let offset = 0; - if (i === 0 && Object.hasOwn(markerOffsets, edge.arrowTypeStart)) { - const { angle, deltaY } = calculateDeltaAndAngle(data[0], data[1]); - offset = markerOffsets[edge.arrowTypeStart] * Math.abs(Math.sin(angle)) * (deltaY >= 0 ? 1 : -1); - } else if (i === data.length - 1 && Object.hasOwn(markerOffsets, edge.arrowTypeEnd)) { - const { angle, deltaY } = calculateDeltaAndAngle( - data[data.length - 1], - data[data.length - 2] - ); - offset = markerOffsets[edge.arrowTypeEnd] * Math.abs(Math.sin(angle)) * (deltaY >= 0 ? 1 : -1); - } - return pointTransformer(d).y + offset; - } - }; -}; -const addEdgeMarkers = (svgPath, edge, url, id, diagramType) => { - if (edge.arrowTypeStart) { - addEdgeMarker(svgPath, "start", edge.arrowTypeStart, url, id, diagramType); - } - if (edge.arrowTypeEnd) { - addEdgeMarker(svgPath, "end", edge.arrowTypeEnd, url, id, diagramType); - } -}; -const arrowTypesMap = { - arrow_cross: "cross", - arrow_point: "point", - arrow_barb: "barb", - arrow_circle: "circle", - aggregation: "aggregation", - extension: "extension", - composition: "composition", - dependency: "dependency", - lollipop: "lollipop" -}; -const addEdgeMarker = (svgPath, position, arrowType, url, id, diagramType) => { - const endMarkerType = arrowTypesMap[arrowType]; - if (!endMarkerType) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.warn(`Unknown arrow type: ${arrowType}`); - return; - } - const suffix = position === "start" ? "Start" : "End"; - svgPath.attr(`marker-${position}`, `url(${url}#${id}_${diagramType}-${endMarkerType}${suffix})`); -}; -let edgeLabels = {}; -let terminalLabels = {}; -const clear = () => { - edgeLabels = {}; - terminalLabels = {}; -}; -const insertEdgeLabel = (elem, edge) => { - const useHtmlLabels = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels); - const labelElement = edge.labelType === "markdown" ? (0,_createText_2e5e7dd3_js__WEBPACK_IMPORTED_MODULE_2__.a)(elem, edge.label, { - style: edge.labelStyle, - useHtmlLabels, - addSvgBackground: true - }) : createLabel$1(edge.label, edge.labelStyle); - const edgeLabel = elem.insert("g").attr("class", "edgeLabel"); - const label = edgeLabel.insert("g").attr("class", "label"); - label.node().appendChild(labelElement); - let bbox = labelElement.getBBox(); - if (useHtmlLabels) { - const div = labelElement.children[0]; - const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(labelElement); - bbox = div.getBoundingClientRect(); - dv.attr("width", bbox.width); - dv.attr("height", bbox.height); - } - label.attr("transform", "translate(" + -bbox.width / 2 + ", " + -bbox.height / 2 + ")"); - edgeLabels[edge.id] = edgeLabel; - edge.width = bbox.width; - edge.height = bbox.height; - let fo; - if (edge.startLabelLeft) { - const startLabelElement = createLabel$1(edge.startLabelLeft, edge.labelStyle); - const startEdgeLabelLeft = elem.insert("g").attr("class", "edgeTerminals"); - const inner = startEdgeLabelLeft.insert("g").attr("class", "inner"); - fo = inner.node().appendChild(startLabelElement); - const slBox = startLabelElement.getBBox(); - inner.attr("transform", "translate(" + -slBox.width / 2 + ", " + -slBox.height / 2 + ")"); - if (!terminalLabels[edge.id]) { - terminalLabels[edge.id] = {}; - } - terminalLabels[edge.id].startLeft = startEdgeLabelLeft; - setTerminalWidth(fo, edge.startLabelLeft); - } - if (edge.startLabelRight) { - const startLabelElement = createLabel$1(edge.startLabelRight, edge.labelStyle); - const startEdgeLabelRight = elem.insert("g").attr("class", "edgeTerminals"); - const inner = startEdgeLabelRight.insert("g").attr("class", "inner"); - fo = startEdgeLabelRight.node().appendChild(startLabelElement); - inner.node().appendChild(startLabelElement); - const slBox = startLabelElement.getBBox(); - inner.attr("transform", "translate(" + -slBox.width / 2 + ", " + -slBox.height / 2 + ")"); - if (!terminalLabels[edge.id]) { - terminalLabels[edge.id] = {}; - } - terminalLabels[edge.id].startRight = startEdgeLabelRight; - setTerminalWidth(fo, edge.startLabelRight); - } - if (edge.endLabelLeft) { - const endLabelElement = createLabel$1(edge.endLabelLeft, edge.labelStyle); - const endEdgeLabelLeft = elem.insert("g").attr("class", "edgeTerminals"); - const inner = endEdgeLabelLeft.insert("g").attr("class", "inner"); - fo = inner.node().appendChild(endLabelElement); - const slBox = endLabelElement.getBBox(); - inner.attr("transform", "translate(" + -slBox.width / 2 + ", " + -slBox.height / 2 + ")"); - endEdgeLabelLeft.node().appendChild(endLabelElement); - if (!terminalLabels[edge.id]) { - terminalLabels[edge.id] = {}; - } - terminalLabels[edge.id].endLeft = endEdgeLabelLeft; - setTerminalWidth(fo, edge.endLabelLeft); - } - if (edge.endLabelRight) { - const endLabelElement = createLabel$1(edge.endLabelRight, edge.labelStyle); - const endEdgeLabelRight = elem.insert("g").attr("class", "edgeTerminals"); - const inner = endEdgeLabelRight.insert("g").attr("class", "inner"); - fo = inner.node().appendChild(endLabelElement); - const slBox = endLabelElement.getBBox(); - inner.attr("transform", "translate(" + -slBox.width / 2 + ", " + -slBox.height / 2 + ")"); - endEdgeLabelRight.node().appendChild(endLabelElement); - if (!terminalLabels[edge.id]) { - terminalLabels[edge.id] = {}; - } - terminalLabels[edge.id].endRight = endEdgeLabelRight; - setTerminalWidth(fo, edge.endLabelRight); - } - return labelElement; -}; -function setTerminalWidth(fo, value) { - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels && fo) { - fo.style.width = value.length * 9 + "px"; - fo.style.height = "12px"; - } -} -const positionEdgeLabel = (edge, paths) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("Moving label abc88 ", edge.id, edge.label, edgeLabels[edge.id], paths); - let path = paths.updatedPath ? paths.updatedPath : paths.originalPath; - const siteConfig = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)(); - const { subGraphTitleTotalMargin } = getSubGraphTitleMargins(siteConfig); - if (edge.label) { - const el = edgeLabels[edge.id]; - let x = edge.x; - let y = edge.y; - if (path) { - const pos = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.u.calcLabelPosition(path); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug( - "Moving label " + edge.label + " from (", - x, - ",", - y, - ") to (", - pos.x, - ",", - pos.y, - ") abc88" - ); - if (paths.updatedPath) { - x = pos.x; - y = pos.y; - } - } - el.attr("transform", `translate(${x}, ${y + subGraphTitleTotalMargin / 2})`); - } - if (edge.startLabelLeft) { - const el = terminalLabels[edge.id].startLeft; - let x = edge.x; - let y = edge.y; - if (path) { - const pos = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.u.calcTerminalLabelPosition(edge.arrowTypeStart ? 10 : 0, "start_left", path); - x = pos.x; - y = pos.y; - } - el.attr("transform", `translate(${x}, ${y})`); - } - if (edge.startLabelRight) { - const el = terminalLabels[edge.id].startRight; - let x = edge.x; - let y = edge.y; - if (path) { - const pos = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.u.calcTerminalLabelPosition( - edge.arrowTypeStart ? 10 : 0, - "start_right", - path - ); - x = pos.x; - y = pos.y; - } - el.attr("transform", `translate(${x}, ${y})`); - } - if (edge.endLabelLeft) { - const el = terminalLabels[edge.id].endLeft; - let x = edge.x; - let y = edge.y; - if (path) { - const pos = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.u.calcTerminalLabelPosition(edge.arrowTypeEnd ? 10 : 0, "end_left", path); - x = pos.x; - y = pos.y; - } - el.attr("transform", `translate(${x}, ${y})`); - } - if (edge.endLabelRight) { - const el = terminalLabels[edge.id].endRight; - let x = edge.x; - let y = edge.y; - if (path) { - const pos = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.u.calcTerminalLabelPosition(edge.arrowTypeEnd ? 10 : 0, "end_right", path); - x = pos.x; - y = pos.y; - } - el.attr("transform", `translate(${x}, ${y})`); - } -}; -const outsideNode = (node, point2) => { - const x = node.x; - const y = node.y; - const dx = Math.abs(point2.x - x); - const dy = Math.abs(point2.y - y); - const w = node.width / 2; - const h = node.height / 2; - if (dx >= w || dy >= h) { - return true; - } - return false; -}; -const intersection = (node, outsidePoint, insidePoint) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug(`intersection calc abc89: - outsidePoint: ${JSON.stringify(outsidePoint)} - insidePoint : ${JSON.stringify(insidePoint)} - node : x:${node.x} y:${node.y} w:${node.width} h:${node.height}`); - const x = node.x; - const y = node.y; - const dx = Math.abs(x - insidePoint.x); - const w = node.width / 2; - let r = insidePoint.x < outsidePoint.x ? w - dx : w + dx; - const h = node.height / 2; - const Q = Math.abs(outsidePoint.y - insidePoint.y); - const R = Math.abs(outsidePoint.x - insidePoint.x); - if (Math.abs(y - outsidePoint.y) * w > Math.abs(x - outsidePoint.x) * h) { - let q = insidePoint.y < outsidePoint.y ? outsidePoint.y - h - y : y - h - outsidePoint.y; - r = R * q / Q; - const res = { - x: insidePoint.x < outsidePoint.x ? insidePoint.x + r : insidePoint.x - R + r, - y: insidePoint.y < outsidePoint.y ? insidePoint.y + Q - q : insidePoint.y - Q + q - }; - if (r === 0) { - res.x = outsidePoint.x; - res.y = outsidePoint.y; - } - if (R === 0) { - res.x = outsidePoint.x; - } - if (Q === 0) { - res.y = outsidePoint.y; - } - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug(`abc89 topp/bott calc, Q ${Q}, q ${q}, R ${R}, r ${r}`, res); - return res; - } else { - if (insidePoint.x < outsidePoint.x) { - r = outsidePoint.x - w - x; - } else { - r = x - w - outsidePoint.x; - } - let q = Q * r / R; - let _x = insidePoint.x < outsidePoint.x ? insidePoint.x + R - r : insidePoint.x - R + r; - let _y = insidePoint.y < outsidePoint.y ? insidePoint.y + q : insidePoint.y - q; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug(`sides calc abc89, Q ${Q}, q ${q}, R ${R}, r ${r}`, { _x, _y }); - if (r === 0) { - _x = outsidePoint.x; - _y = outsidePoint.y; - } - if (R === 0) { - _x = outsidePoint.x; - } - if (Q === 0) { - _y = outsidePoint.y; - } - return { x: _x, y: _y }; - } -}; -const cutPathAtIntersect = (_points, boundaryNode) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("abc88 cutPathAtIntersect", _points, boundaryNode); - let points = []; - let lastPointOutside = _points[0]; - let isInside = false; - _points.forEach((point2) => { - if (!outsideNode(boundaryNode, point2) && !isInside) { - const inter = intersection(boundaryNode, lastPointOutside, point2); - let pointPresent = false; - points.forEach((p) => { - pointPresent = pointPresent || p.x === inter.x && p.y === inter.y; - }); - if (!points.some((e) => e.x === inter.x && e.y === inter.y)) { - points.push(inter); - } - isInside = true; - } else { - lastPointOutside = point2; - if (!isInside) { - points.push(point2); - } - } - }); - return points; -}; -const insertEdge = function(elem, e, edge, clusterDb, diagramType, graph, id) { - let points = edge.points; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("abc88 InsertEdge: edge=", edge, "e=", e); - let pointsHasChanged = false; - const tail = graph.node(e.v); - var head = graph.node(e.w); - if ((head == null ? void 0 : head.intersect) && (tail == null ? void 0 : tail.intersect)) { - points = points.slice(1, edge.points.length - 1); - points.unshift(tail.intersect(points[0])); - points.push(head.intersect(points[points.length - 1])); - } - if (edge.toCluster) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("to cluster abc88", clusterDb[edge.toCluster]); - points = cutPathAtIntersect(edge.points, clusterDb[edge.toCluster].node); - pointsHasChanged = true; - } - if (edge.fromCluster) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("from cluster abc88", clusterDb[edge.fromCluster]); - points = cutPathAtIntersect(points.reverse(), clusterDb[edge.fromCluster].node).reverse(); - pointsHasChanged = true; - } - const lineData = points.filter((p) => !Number.isNaN(p.y)); - let curve = d3__WEBPACK_IMPORTED_MODULE_0__/* .curveBasis */ .qrM; - if (edge.curve && (diagramType === "graph" || diagramType === "flowchart")) { - curve = edge.curve; - } - const { x, y } = getLineFunctionsWithOffset(edge); - const lineFunction = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .line */ .n8j)().x(x).y(y).curve(curve); - let strokeClasses; - switch (edge.thickness) { - case "normal": - strokeClasses = "edge-thickness-normal"; - break; - case "thick": - strokeClasses = "edge-thickness-thick"; - break; - case "invisible": - strokeClasses = "edge-thickness-thick"; - break; - default: - strokeClasses = ""; - } - switch (edge.pattern) { - case "solid": - strokeClasses += " edge-pattern-solid"; - break; - case "dotted": - strokeClasses += " edge-pattern-dotted"; - break; - case "dashed": - strokeClasses += " edge-pattern-dashed"; - break; - } - const svgPath = elem.append("path").attr("d", lineFunction(lineData)).attr("id", edge.id).attr("class", " " + strokeClasses + (edge.classes ? " " + edge.classes : "")).attr("style", edge.style); - let url = ""; - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.arrowMarkerAbsolute || (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().state.arrowMarkerAbsolute) { - url = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search; - url = url.replace(/\(/g, "\\("); - url = url.replace(/\)/g, "\\)"); - } - addEdgeMarkers(svgPath, edge, url, id, diagramType); - let paths = {}; - if (pointsHasChanged) { - paths.updatedPath = points; - } - paths.originalPath = edge.points; - return paths; -}; - - - -/***/ }), - -/***/ 8995: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ r: () => (/* binding */ render) -/* harmony export */ }); -/* harmony import */ var dagre_d3_es_src_dagre_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(21176); -/* harmony import */ var dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(14075); -/* harmony import */ var _edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(88146); -/* harmony import */ var _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(86079); -/* harmony import */ var dagre_d3_es_src_graphlib_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(697); -/* harmony import */ var _createText_2e5e7dd3_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(73743); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(26312); - - - - - - - -let clusterDb = {}; -let descendants = {}; -let parents = {}; -const clear$1 = () => { - descendants = {}; - parents = {}; - clusterDb = {}; -}; -const isDescendant = (id, ancestorId) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("In isDescendant", ancestorId, " ", id, " = ", descendants[ancestorId].includes(id)); - if (descendants[ancestorId].includes(id)) { - return true; - } - return false; -}; -const edgeInCluster = (edge, clusterId) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Descendants of ", clusterId, " is ", descendants[clusterId]); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Edge is ", edge); - if (edge.v === clusterId) { - return false; - } - if (edge.w === clusterId) { - return false; - } - if (!descendants[clusterId]) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Tilt, ", clusterId, ",not in descendants"); - return false; - } - return descendants[clusterId].includes(edge.v) || isDescendant(edge.v, clusterId) || isDescendant(edge.w, clusterId) || descendants[clusterId].includes(edge.w); -}; -const copy = (clusterId, graph, newGraph, rootId) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn( - "Copying children of ", - clusterId, - "root", - rootId, - "data", - graph.node(clusterId), - rootId - ); - const nodes = graph.children(clusterId) || []; - if (clusterId !== rootId) { - nodes.push(clusterId); - } - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Copying (nodes) clusterId", clusterId, "nodes", nodes); - nodes.forEach((node) => { - if (graph.children(node).length > 0) { - copy(node, graph, newGraph, rootId); - } else { - const data = graph.node(node); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("cp ", node, " to ", rootId, " with parent ", clusterId); - newGraph.setNode(node, data); - if (rootId !== graph.parent(node)) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Setting parent", node, graph.parent(node)); - newGraph.setParent(node, graph.parent(node)); - } - if (clusterId !== rootId && node !== clusterId) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Setting parent", node, clusterId); - newGraph.setParent(node, clusterId); - } else { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("In copy ", clusterId, "root", rootId, "data", graph.node(clusterId), rootId); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug( - "Not Setting parent for node=", - node, - "cluster!==rootId", - clusterId !== rootId, - "node!==clusterId", - node !== clusterId - ); - } - const edges = graph.edges(node); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Copying Edges", edges); - edges.forEach((edge) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Edge", edge); - const data2 = graph.edge(edge.v, edge.w, edge.name); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Edge data", data2, rootId); - try { - if (edgeInCluster(edge, rootId)) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Copying as ", edge.v, edge.w, data2, edge.name); - newGraph.setEdge(edge.v, edge.w, data2, edge.name); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("newGraph edges ", newGraph.edges(), newGraph.edge(newGraph.edges()[0])); - } else { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info( - "Skipping copy of edge ", - edge.v, - "-->", - edge.w, - " rootId: ", - rootId, - " clusterId:", - clusterId - ); - } - } catch (e) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.error(e); - } - }); - } - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Removing node", node); - graph.removeNode(node); - }); -}; -const extractDescendants = (id, graph) => { - const children = graph.children(id); - let res = [...children]; - for (const child of children) { - parents[child] = id; - res = [...res, ...extractDescendants(child, graph)]; - } - return res; -}; -const findNonClusterChild = (id, graph) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("Searching", id); - const children = graph.children(id); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("Searching children of id ", id, children); - if (children.length < 1) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("This is a valid node", id); - return id; - } - for (const child of children) { - const _id = findNonClusterChild(child, graph); - if (_id) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("Found replacement for", id, " => ", _id); - return _id; - } - } -}; -const getAnchorId = (id) => { - if (!clusterDb[id]) { - return id; - } - if (!clusterDb[id].externalConnections) { - return id; - } - if (clusterDb[id]) { - return clusterDb[id].id; - } - return id; -}; -const adjustClustersAndEdges = (graph, depth) => { - if (!graph || depth > 10) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Opting out, no graph "); - return; - } else { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Opting in, graph "); - } - graph.nodes().forEach(function(id) { - const children = graph.children(id); - if (children.length > 0) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn( - "Cluster identified", - id, - " Replacement id in edges: ", - findNonClusterChild(id, graph) - ); - descendants[id] = extractDescendants(id, graph); - clusterDb[id] = { id: findNonClusterChild(id, graph), clusterData: graph.node(id) }; - } - }); - graph.nodes().forEach(function(id) { - const children = graph.children(id); - const edges = graph.edges(); - if (children.length > 0) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Cluster identified", id, descendants); - edges.forEach((edge) => { - if (edge.v !== id && edge.w !== id) { - const d1 = isDescendant(edge.v, id); - const d2 = isDescendant(edge.w, id); - if (d1 ^ d2) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Edge: ", edge, " leaves cluster ", id); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Descendants of XXX ", id, ": ", descendants[id]); - clusterDb[id].externalConnections = true; - } - } - }); - } else { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Not a cluster ", id, descendants); - } - }); - for (let id of Object.keys(clusterDb)) { - const nonClusterChild = clusterDb[id].id; - const parent = graph.parent(nonClusterChild); - if (parent !== id && clusterDb[parent] && !clusterDb[parent].externalConnections) { - clusterDb[id].id = parent; - } - } - graph.edges().forEach(function(e) { - const edge = graph.edge(e); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(e)); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(graph.edge(e))); - let v = e.v; - let w = e.w; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn( - "Fix XXX", - clusterDb, - "ids:", - e.v, - e.w, - "Translating: ", - clusterDb[e.v], - " --- ", - clusterDb[e.w] - ); - if (clusterDb[e.v] && clusterDb[e.w] && clusterDb[e.v] === clusterDb[e.w]) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Fixing and trixing link to self - removing XXX", e.v, e.w, e.name); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Fixing and trixing - removing XXX", e.v, e.w, e.name); - v = getAnchorId(e.v); - w = getAnchorId(e.w); - graph.removeEdge(e.v, e.w, e.name); - const specialId = e.w + "---" + e.v; - graph.setNode(specialId, { - domId: specialId, - id: specialId, - labelStyle: "", - labelText: edge.label, - padding: 0, - shape: "labelRect", - style: "" - }); - const edge1 = structuredClone(edge); - const edge2 = structuredClone(edge); - edge1.label = ""; - edge1.arrowTypeEnd = "none"; - edge2.label = ""; - edge1.fromCluster = e.v; - edge2.toCluster = e.v; - graph.setEdge(v, specialId, edge1, e.name + "-cyclic-special"); - graph.setEdge(specialId, w, edge2, e.name + "-cyclic-special"); - } else if (clusterDb[e.v] || clusterDb[e.w]) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Fixing and trixing - removing XXX", e.v, e.w, e.name); - v = getAnchorId(e.v); - w = getAnchorId(e.w); - graph.removeEdge(e.v, e.w, e.name); - if (v !== e.v) { - const parent = graph.parent(v); - clusterDb[parent].externalConnections = true; - edge.fromCluster = e.v; - } - if (w !== e.w) { - const parent = graph.parent(w); - clusterDb[parent].externalConnections = true; - edge.toCluster = e.w; - } - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Fix Replacing with XXX", v, w, e.name); - graph.setEdge(v, w, edge, e.name); - } - }); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Adjusted Graph", dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .M(graph)); - extractor(graph, 0); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.trace(clusterDb); -}; -const extractor = (graph, depth) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("extractor - ", depth, dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .M(graph), graph.children("D")); - if (depth > 10) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.error("Bailing out"); - return; - } - let nodes = graph.nodes(); - let hasChildren = false; - for (const node of nodes) { - const children = graph.children(node); - hasChildren = hasChildren || children.length > 0; - } - if (!hasChildren) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Done, no node has children", graph.nodes()); - return; - } - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Nodes = ", nodes, depth); - for (const node of nodes) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug( - "Extracting node", - node, - clusterDb, - clusterDb[node] && !clusterDb[node].externalConnections, - !graph.parent(node), - graph.node(node), - graph.children("D"), - " Depth ", - depth - ); - if (!clusterDb[node]) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Not a cluster", node, depth); - } else if (!clusterDb[node].externalConnections && // !graph.parent(node) && - graph.children(node) && graph.children(node).length > 0) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn( - "Cluster without external connections, without a parent and with children", - node, - depth - ); - const graphSettings = graph.graph(); - let dir = graphSettings.rankdir === "TB" ? "LR" : "TB"; - if (clusterDb[node] && clusterDb[node].clusterData && clusterDb[node].clusterData.dir) { - dir = clusterDb[node].clusterData.dir; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Fixing dir", clusterDb[node].clusterData.dir, dir); - } - const clusterGraph = new dagre_d3_es_src_graphlib_index_js__WEBPACK_IMPORTED_MODULE_2__/* .Graph */ .T({ - multigraph: true, - compound: true - }).setGraph({ - rankdir: dir, - // Todo: set proper spacing - nodesep: 50, - ranksep: 50, - marginx: 8, - marginy: 8 - }).setDefaultEdgeLabel(function() { - return {}; - }); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Old graph before copy", dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .M(graph)); - copy(node, graph, clusterGraph, node); - graph.setNode(node, { - clusterNode: true, - id: node, - clusterData: clusterDb[node].clusterData, - labelText: clusterDb[node].labelText, - graph: clusterGraph - }); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("New graph after copy node: (", node, ")", dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .M(clusterGraph)); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Old graph after copy", dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .M(graph)); - } else { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn( - "Cluster ** ", - node, - " **not meeting the criteria !externalConnections:", - !clusterDb[node].externalConnections, - " no parent: ", - !graph.parent(node), - " children ", - graph.children(node) && graph.children(node).length > 0, - graph.children("D"), - depth - ); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug(clusterDb); - } - } - nodes = graph.nodes(); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("New list of nodes", nodes); - for (const node of nodes) { - const data = graph.node(node); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn(" Now next level", node, data); - if (data.clusterNode) { - extractor(data.graph, depth + 1); - } - } -}; -const sorter = (graph, nodes) => { - if (nodes.length === 0) { - return []; - } - let result = Object.assign(nodes); - nodes.forEach((node) => { - const children = graph.children(node); - const sorted = sorter(graph, children); - result = [...result, ...sorted]; - }); - return result; -}; -const sortNodesByHierarchy = (graph) => sorter(graph, graph.children()); -const rect = (parent, node) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Creating subgraph rect for ", node.id, node); - const siteConfig = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.c)(); - const shapeSvg = parent.insert("g").attr("class", "cluster" + (node.class ? " " + node.class : "")).attr("id", node.id); - const rect2 = shapeSvg.insert("rect", ":first-child"); - const useHtmlLabels = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.m)(siteConfig.flowchart.htmlLabels); - const label = shapeSvg.insert("g").attr("class", "cluster-label"); - const text = node.labelType === "markdown" ? (0,_createText_2e5e7dd3_js__WEBPACK_IMPORTED_MODULE_5__.a)(label, node.labelText, { style: node.labelStyle, useHtmlLabels }) : label.node().appendChild((0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.c)(node.labelText, node.labelStyle, void 0, true)); - let bbox = text.getBBox(); - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.m)(siteConfig.flowchart.htmlLabels)) { - const div = text.children[0]; - const dv = (0,d3__WEBPACK_IMPORTED_MODULE_3__/* .select */ .Ltv)(text); - bbox = div.getBoundingClientRect(); - dv.attr("width", bbox.width); - dv.attr("height", bbox.height); - } - const padding = 0 * node.padding; - const halfPadding = padding / 2; - const width = node.width <= bbox.width + padding ? bbox.width + padding : node.width; - if (node.width <= bbox.width + padding) { - node.diff = (bbox.width - node.width) / 2 - node.padding / 2; - } else { - node.diff = -node.padding / 2; - } - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("Data ", node, JSON.stringify(node)); - rect2.attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("x", node.x - width / 2).attr("y", node.y - node.height / 2 - halfPadding).attr("width", width).attr("height", node.height + padding); - const { subGraphTitleTopMargin } = (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.g)(siteConfig); - if (useHtmlLabels) { - label.attr( - "transform", - // This puts the label on top of the box instead of inside it - `translate(${node.x - bbox.width / 2}, ${node.y - node.height / 2 + subGraphTitleTopMargin})` - ); - } else { - label.attr( - "transform", - // This puts the label on top of the box instead of inside it - `translate(${node.x}, ${node.y - node.height / 2 + subGraphTitleTopMargin})` - ); - } - const rectBox = rect2.node().getBBox(); - node.width = rectBox.width; - node.height = rectBox.height; - node.intersect = function(point) { - return (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.i)(node, point); - }; - return shapeSvg; -}; -const noteGroup = (parent, node) => { - const shapeSvg = parent.insert("g").attr("class", "note-cluster").attr("id", node.id); - const rect2 = shapeSvg.insert("rect", ":first-child"); - const padding = 0 * node.padding; - const halfPadding = padding / 2; - rect2.attr("rx", node.rx).attr("ry", node.ry).attr("x", node.x - node.width / 2 - halfPadding).attr("y", node.y - node.height / 2 - halfPadding).attr("width", node.width + padding).attr("height", node.height + padding).attr("fill", "none"); - const rectBox = rect2.node().getBBox(); - node.width = rectBox.width; - node.height = rectBox.height; - node.intersect = function(point) { - return (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.i)(node, point); - }; - return shapeSvg; -}; -const roundedWithTitle = (parent, node) => { - const siteConfig = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.c)(); - const shapeSvg = parent.insert("g").attr("class", node.classes).attr("id", node.id); - const rect2 = shapeSvg.insert("rect", ":first-child"); - const label = shapeSvg.insert("g").attr("class", "cluster-label"); - const innerRect = shapeSvg.append("rect"); - const text = label.node().appendChild((0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.c)(node.labelText, node.labelStyle, void 0, true)); - let bbox = text.getBBox(); - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.m)(siteConfig.flowchart.htmlLabels)) { - const div = text.children[0]; - const dv = (0,d3__WEBPACK_IMPORTED_MODULE_3__/* .select */ .Ltv)(text); - bbox = div.getBoundingClientRect(); - dv.attr("width", bbox.width); - dv.attr("height", bbox.height); - } - bbox = text.getBBox(); - const padding = 0 * node.padding; - const halfPadding = padding / 2; - const width = node.width <= bbox.width + node.padding ? bbox.width + node.padding : node.width; - if (node.width <= bbox.width + node.padding) { - node.diff = (bbox.width + node.padding * 0 - node.width) / 2; - } else { - node.diff = -node.padding / 2; - } - rect2.attr("class", "outer").attr("x", node.x - width / 2 - halfPadding).attr("y", node.y - node.height / 2 - halfPadding).attr("width", width + padding).attr("height", node.height + padding); - innerRect.attr("class", "inner").attr("x", node.x - width / 2 - halfPadding).attr("y", node.y - node.height / 2 - halfPadding + bbox.height - 1).attr("width", width + padding).attr("height", node.height + padding - bbox.height - 3); - const { subGraphTitleTopMargin } = (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.g)(siteConfig); - label.attr( - "transform", - `translate(${node.x - bbox.width / 2}, ${node.y - node.height / 2 - node.padding / 3 + ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.m)(siteConfig.flowchart.htmlLabels) ? 5 : 3) + subGraphTitleTopMargin})` - ); - const rectBox = rect2.node().getBBox(); - node.height = rectBox.height; - node.intersect = function(point) { - return (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.i)(node, point); - }; - return shapeSvg; -}; -const divider = (parent, node) => { - const shapeSvg = parent.insert("g").attr("class", node.classes).attr("id", node.id); - const rect2 = shapeSvg.insert("rect", ":first-child"); - const padding = 0 * node.padding; - const halfPadding = padding / 2; - rect2.attr("class", "divider").attr("x", node.x - node.width / 2 - halfPadding).attr("y", node.y - node.height / 2).attr("width", node.width + padding).attr("height", node.height + padding); - const rectBox = rect2.node().getBBox(); - node.width = rectBox.width; - node.height = rectBox.height; - node.diff = -node.padding / 2; - node.intersect = function(point) { - return (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.i)(node, point); - }; - return shapeSvg; -}; -const shapes = { rect, roundedWithTitle, noteGroup, divider }; -let clusterElems = {}; -const insertCluster = (elem, node) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("Inserting cluster"); - const shape = node.shape || "rect"; - clusterElems[node.id] = shapes[shape](elem, node); -}; -const clear = () => { - clusterElems = {}; -}; -const recursiveRender = async (_elem, graph, diagramType, id, parentCluster, siteConfig) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Graph in recursive render: XXX", dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .M(graph), parentCluster); - const dir = graph.graph().rankdir; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("Dir in recursive render - dir:", dir); - const elem = _elem.insert("g").attr("class", "root"); - if (!graph.nodes()) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("No nodes found for", graph); - } else { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Recursive render XXX", graph.nodes()); - } - if (graph.edges().length > 0) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("Recursive edges", graph.edge(graph.edges()[0])); - } - const clusters = elem.insert("g").attr("class", "clusters"); - const edgePaths = elem.insert("g").attr("class", "edgePaths"); - const edgeLabels = elem.insert("g").attr("class", "edgeLabels"); - const nodes = elem.insert("g").attr("class", "nodes"); - await Promise.all( - graph.nodes().map(async function(v) { - const node = graph.node(v); - if (parentCluster !== void 0) { - const data = JSON.parse(JSON.stringify(parentCluster.clusterData)); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Setting data for cluster XXX (", v, ") ", data, parentCluster); - graph.setNode(parentCluster.id, data); - if (!graph.parent(v)) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("Setting parent", v, parentCluster.id); - graph.setParent(v, parentCluster.id, data); - } - } - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("(Insert) Node XXX" + v + ": " + JSON.stringify(graph.node(v))); - if (node && node.clusterNode) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Cluster identified", v, node.width, graph.node(v)); - const o = await recursiveRender( - nodes, - node.graph, - diagramType, - id, - graph.node(v), - siteConfig - ); - const newEl = o.elem; - (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.u)(node, newEl); - node.diff = o.diff || 0; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Node bounds (abc123)", v, node, node.width, node.x, node.y); - (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.s)(newEl, node); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Recursive render complete ", newEl, node); - } else { - if (graph.children(v).length > 0) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Cluster - the non recursive path XXX", v, node.id, node, graph); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info(findNonClusterChild(node.id, graph)); - clusterDb[node.id] = { id: findNonClusterChild(node.id, graph), node }; - } else { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Node - the non recursive path", v, node.id, node); - await (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.e)(nodes, graph.node(v), dir); - } - } - }) - ); - graph.edges().forEach(function(e) { - const edge = graph.edge(e.v, e.w, e.name); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(e)); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Edge " + e.v + " -> " + e.w + ": ", e, " ", JSON.stringify(graph.edge(e))); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Fix", clusterDb, "ids:", e.v, e.w, "Translating: ", clusterDb[e.v], clusterDb[e.w]); - (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.f)(edgeLabels, edge); - }); - graph.edges().forEach(function(e) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(e)); - }); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("#############################################"); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("### Layout ###"); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("#############################################"); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info(graph); - (0,dagre_d3_es_src_dagre_index_js__WEBPACK_IMPORTED_MODULE_0__/* .layout */ .Zp)(graph); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Graph after layout:", dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .M(graph)); - let diff = 0; - const { subGraphTitleTotalMargin } = (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.g)(siteConfig); - sortNodesByHierarchy(graph).forEach(function(v) { - const node = graph.node(v); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Position " + v + ": " + JSON.stringify(graph.node(v))); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info( - "Position " + v + ": (" + node.x, - "," + node.y, - ") width: ", - node.width, - " height: ", - node.height - ); - if (node && node.clusterNode) { - node.y += subGraphTitleTotalMargin; - (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.p)(node); - } else { - if (graph.children(v).length > 0) { - node.height += subGraphTitleTotalMargin; - insertCluster(clusters, node); - clusterDb[node.id].node = node; - } else { - node.y += subGraphTitleTotalMargin / 2; - (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.p)(node); - } - } - }); - graph.edges().forEach(function(e) { - const edge = graph.edge(e); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(edge), edge); - edge.points.forEach((point) => point.y += subGraphTitleTotalMargin / 2); - const paths = (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.h)(edgePaths, e, edge, clusterDb, diagramType, graph, id); - (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.j)(edge, paths); - }); - graph.nodes().forEach(function(v) { - const n = graph.node(v); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info(v, n.type, n.diff); - if (n.type === "group") { - diff = n.diff; - } - }); - return { elem, diff }; -}; -const render = async (elem, graph, markers, diagramType, id) => { - (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.a)(elem, markers, diagramType, id); - (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.b)(); - (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.d)(); - clear(); - clear$1(); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Graph at first:", JSON.stringify(dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .M(graph))); - adjustClustersAndEdges(graph); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Graph after:", JSON.stringify(dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .M(graph))); - const siteConfig = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.c)(); - await recursiveRender(elem, graph, diagramType, id, void 0, siteConfig); -}; - - - -/***/ }), - -/***/ 21987: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ d: () => (/* binding */ db), -/* harmony export */ p: () => (/* binding */ parser$1), -/* harmony export */ s: () => (/* binding */ styles) -/* harmony export */ }); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(26312); -/* harmony import */ var _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(86079); - - -var parser = function() { - var o = function(k, v, o2, l) { - for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) - ; - return o2; - }, $V0 = [1, 17], $V1 = [1, 18], $V2 = [1, 19], $V3 = [1, 39], $V4 = [1, 40], $V5 = [1, 25], $V6 = [1, 23], $V7 = [1, 24], $V8 = [1, 31], $V9 = [1, 32], $Va = [1, 33], $Vb = [1, 34], $Vc = [1, 35], $Vd = [1, 36], $Ve = [1, 26], $Vf = [1, 27], $Vg = [1, 28], $Vh = [1, 29], $Vi = [1, 43], $Vj = [1, 30], $Vk = [1, 42], $Vl = [1, 44], $Vm = [1, 41], $Vn = [1, 45], $Vo = [1, 9], $Vp = [1, 8, 9], $Vq = [1, 56], $Vr = [1, 57], $Vs = [1, 58], $Vt = [1, 59], $Vu = [1, 60], $Vv = [1, 61], $Vw = [1, 62], $Vx = [1, 8, 9, 39], $Vy = [1, 74], $Vz = [1, 8, 9, 12, 13, 21, 37, 39, 42, 59, 60, 61, 62, 63, 64, 65, 70, 72], $VA = [1, 8, 9, 12, 13, 19, 21, 37, 39, 42, 46, 59, 60, 61, 62, 63, 64, 65, 70, 72, 74, 80, 95, 97, 98], $VB = [13, 74, 80, 95, 97, 98], $VC = [13, 64, 65, 74, 80, 95, 97, 98], $VD = [13, 59, 60, 61, 62, 63, 74, 80, 95, 97, 98], $VE = [1, 93], $VF = [1, 110], $VG = [1, 108], $VH = [1, 102], $VI = [1, 103], $VJ = [1, 104], $VK = [1, 105], $VL = [1, 106], $VM = [1, 107], $VN = [1, 109], $VO = [1, 8, 9, 37, 39, 42], $VP = [1, 8, 9, 21], $VQ = [1, 8, 9, 78], $VR = [1, 8, 9, 21, 73, 74, 78, 80, 81, 82, 83, 84, 85]; - var parser2 = { - trace: function trace() { - }, - yy: {}, - symbols_: { "error": 2, "start": 3, "mermaidDoc": 4, "statements": 5, "graphConfig": 6, "CLASS_DIAGRAM": 7, "NEWLINE": 8, "EOF": 9, "statement": 10, "classLabel": 11, "SQS": 12, "STR": 13, "SQE": 14, "namespaceName": 15, "alphaNumToken": 16, "className": 17, "classLiteralName": 18, "GENERICTYPE": 19, "relationStatement": 20, "LABEL": 21, "namespaceStatement": 22, "classStatement": 23, "memberStatement": 24, "annotationStatement": 25, "clickStatement": 26, "styleStatement": 27, "cssClassStatement": 28, "noteStatement": 29, "direction": 30, "acc_title": 31, "acc_title_value": 32, "acc_descr": 33, "acc_descr_value": 34, "acc_descr_multiline_value": 35, "namespaceIdentifier": 36, "STRUCT_START": 37, "classStatements": 38, "STRUCT_STOP": 39, "NAMESPACE": 40, "classIdentifier": 41, "STYLE_SEPARATOR": 42, "members": 43, "CLASS": 44, "ANNOTATION_START": 45, "ANNOTATION_END": 46, "MEMBER": 47, "SEPARATOR": 48, "relation": 49, "NOTE_FOR": 50, "noteText": 51, "NOTE": 52, "direction_tb": 53, "direction_bt": 54, "direction_rl": 55, "direction_lr": 56, "relationType": 57, "lineType": 58, "AGGREGATION": 59, "EXTENSION": 60, "COMPOSITION": 61, "DEPENDENCY": 62, "LOLLIPOP": 63, "LINE": 64, "DOTTED_LINE": 65, "CALLBACK": 66, "LINK": 67, "LINK_TARGET": 68, "CLICK": 69, "CALLBACK_NAME": 70, "CALLBACK_ARGS": 71, "HREF": 72, "STYLE": 73, "ALPHA": 74, "stylesOpt": 75, "CSSCLASS": 76, "style": 77, "COMMA": 78, "styleComponent": 79, "NUM": 80, "COLON": 81, "UNIT": 82, "SPACE": 83, "BRKT": 84, "PCT": 85, "commentToken": 86, "textToken": 87, "graphCodeTokens": 88, "textNoTagsToken": 89, "TAGSTART": 90, "TAGEND": 91, "==": 92, "--": 93, "DEFAULT": 94, "MINUS": 95, "keywords": 96, "UNICODE_TEXT": 97, "BQUOTE_STR": 98, "$accept": 0, "$end": 1 }, - terminals_: { 2: "error", 7: "CLASS_DIAGRAM", 8: "NEWLINE", 9: "EOF", 12: "SQS", 13: "STR", 14: "SQE", 19: "GENERICTYPE", 21: "LABEL", 31: "acc_title", 32: "acc_title_value", 33: "acc_descr", 34: "acc_descr_value", 35: "acc_descr_multiline_value", 37: "STRUCT_START", 39: "STRUCT_STOP", 40: "NAMESPACE", 42: "STYLE_SEPARATOR", 44: "CLASS", 45: "ANNOTATION_START", 46: "ANNOTATION_END", 47: "MEMBER", 48: "SEPARATOR", 50: "NOTE_FOR", 52: "NOTE", 53: "direction_tb", 54: "direction_bt", 55: "direction_rl", 56: "direction_lr", 59: "AGGREGATION", 60: "EXTENSION", 61: "COMPOSITION", 62: "DEPENDENCY", 63: "LOLLIPOP", 64: "LINE", 65: "DOTTED_LINE", 66: "CALLBACK", 67: "LINK", 68: "LINK_TARGET", 69: "CLICK", 70: "CALLBACK_NAME", 71: "CALLBACK_ARGS", 72: "HREF", 73: "STYLE", 74: "ALPHA", 76: "CSSCLASS", 78: "COMMA", 80: "NUM", 81: "COLON", 82: "UNIT", 83: "SPACE", 84: "BRKT", 85: "PCT", 88: "graphCodeTokens", 90: "TAGSTART", 91: "TAGEND", 92: "==", 93: "--", 94: "DEFAULT", 95: "MINUS", 96: "keywords", 97: "UNICODE_TEXT", 98: "BQUOTE_STR" }, - productions_: [0, [3, 1], [3, 1], [4, 1], [6, 4], [5, 1], [5, 2], [5, 3], [11, 3], [15, 1], [15, 2], [17, 1], [17, 1], [17, 2], [17, 2], [17, 2], [10, 1], [10, 2], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 2], [10, 2], [10, 1], [22, 4], [22, 5], [36, 2], [38, 1], [38, 2], [38, 3], [23, 1], [23, 3], [23, 4], [23, 6], [41, 2], [41, 3], [25, 4], [43, 1], [43, 2], [24, 1], [24, 2], [24, 1], [24, 1], [20, 3], [20, 4], [20, 4], [20, 5], [29, 3], [29, 2], [30, 1], [30, 1], [30, 1], [30, 1], [49, 3], [49, 2], [49, 2], [49, 1], [57, 1], [57, 1], [57, 1], [57, 1], [57, 1], [58, 1], [58, 1], [26, 3], [26, 4], [26, 3], [26, 4], [26, 4], [26, 5], [26, 3], [26, 4], [26, 4], [26, 5], [26, 4], [26, 5], [26, 5], [26, 6], [27, 3], [28, 3], [75, 1], [75, 3], [77, 1], [77, 2], [79, 1], [79, 1], [79, 1], [79, 1], [79, 1], [79, 1], [79, 1], [79, 1], [79, 1], [86, 1], [86, 1], [87, 1], [87, 1], [87, 1], [87, 1], [87, 1], [87, 1], [87, 1], [89, 1], [89, 1], [89, 1], [89, 1], [16, 1], [16, 1], [16, 1], [16, 1], [18, 1], [51, 1]], - performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { - var $0 = $$.length - 1; - switch (yystate) { - case 8: - this.$ = $$[$0 - 1]; - break; - case 9: - case 11: - case 12: - this.$ = $$[$0]; - break; - case 10: - case 13: - this.$ = $$[$0 - 1] + $$[$0]; - break; - case 14: - case 15: - this.$ = $$[$0 - 1] + "~" + $$[$0] + "~"; - break; - case 16: - yy.addRelation($$[$0]); - break; - case 17: - $$[$0 - 1].title = yy.cleanupLabel($$[$0]); - yy.addRelation($$[$0 - 1]); - break; - case 27: - this.$ = $$[$0].trim(); - yy.setAccTitle(this.$); - break; - case 28: - case 29: - this.$ = $$[$0].trim(); - yy.setAccDescription(this.$); - break; - case 30: - yy.addClassesToNamespace($$[$0 - 3], $$[$0 - 1]); - break; - case 31: - yy.addClassesToNamespace($$[$0 - 4], $$[$0 - 1]); - break; - case 32: - this.$ = $$[$0]; - yy.addNamespace($$[$0]); - break; - case 33: - this.$ = [$$[$0]]; - break; - case 34: - this.$ = [$$[$0 - 1]]; - break; - case 35: - $$[$0].unshift($$[$0 - 2]); - this.$ = $$[$0]; - break; - case 37: - yy.setCssClass($$[$0 - 2], $$[$0]); - break; - case 38: - yy.addMembers($$[$0 - 3], $$[$0 - 1]); - break; - case 39: - yy.setCssClass($$[$0 - 5], $$[$0 - 3]); - yy.addMembers($$[$0 - 5], $$[$0 - 1]); - break; - case 40: - this.$ = $$[$0]; - yy.addClass($$[$0]); - break; - case 41: - this.$ = $$[$0 - 1]; - yy.addClass($$[$0 - 1]); - yy.setClassLabel($$[$0 - 1], $$[$0]); - break; - case 42: - yy.addAnnotation($$[$0], $$[$0 - 2]); - break; - case 43: - this.$ = [$$[$0]]; - break; - case 44: - $$[$0].push($$[$0 - 1]); - this.$ = $$[$0]; - break; - case 45: - break; - case 46: - yy.addMember($$[$0 - 1], yy.cleanupLabel($$[$0])); - break; - case 47: - break; - case 48: - break; - case 49: - this.$ = { "id1": $$[$0 - 2], "id2": $$[$0], relation: $$[$0 - 1], relationTitle1: "none", relationTitle2: "none" }; - break; - case 50: - this.$ = { id1: $$[$0 - 3], id2: $$[$0], relation: $$[$0 - 1], relationTitle1: $$[$0 - 2], relationTitle2: "none" }; - break; - case 51: - this.$ = { id1: $$[$0 - 3], id2: $$[$0], relation: $$[$0 - 2], relationTitle1: "none", relationTitle2: $$[$0 - 1] }; - break; - case 52: - this.$ = { id1: $$[$0 - 4], id2: $$[$0], relation: $$[$0 - 2], relationTitle1: $$[$0 - 3], relationTitle2: $$[$0 - 1] }; - break; - case 53: - yy.addNote($$[$0], $$[$0 - 1]); - break; - case 54: - yy.addNote($$[$0]); - break; - case 55: - yy.setDirection("TB"); - break; - case 56: - yy.setDirection("BT"); - break; - case 57: - yy.setDirection("RL"); - break; - case 58: - yy.setDirection("LR"); - break; - case 59: - this.$ = { type1: $$[$0 - 2], type2: $$[$0], lineType: $$[$0 - 1] }; - break; - case 60: - this.$ = { type1: "none", type2: $$[$0], lineType: $$[$0 - 1] }; - break; - case 61: - this.$ = { type1: $$[$0 - 1], type2: "none", lineType: $$[$0] }; - break; - case 62: - this.$ = { type1: "none", type2: "none", lineType: $$[$0] }; - break; - case 63: - this.$ = yy.relationType.AGGREGATION; - break; - case 64: - this.$ = yy.relationType.EXTENSION; - break; - case 65: - this.$ = yy.relationType.COMPOSITION; - break; - case 66: - this.$ = yy.relationType.DEPENDENCY; - break; - case 67: - this.$ = yy.relationType.LOLLIPOP; - break; - case 68: - this.$ = yy.lineType.LINE; - break; - case 69: - this.$ = yy.lineType.DOTTED_LINE; - break; - case 70: - case 76: - this.$ = $$[$0 - 2]; - yy.setClickEvent($$[$0 - 1], $$[$0]); - break; - case 71: - case 77: - this.$ = $$[$0 - 3]; - yy.setClickEvent($$[$0 - 2], $$[$0 - 1]); - yy.setTooltip($$[$0 - 2], $$[$0]); - break; - case 72: - this.$ = $$[$0 - 2]; - yy.setLink($$[$0 - 1], $$[$0]); - break; - case 73: - this.$ = $$[$0 - 3]; - yy.setLink($$[$0 - 2], $$[$0 - 1], $$[$0]); - break; - case 74: - this.$ = $$[$0 - 3]; - yy.setLink($$[$0 - 2], $$[$0 - 1]); - yy.setTooltip($$[$0 - 2], $$[$0]); - break; - case 75: - this.$ = $$[$0 - 4]; - yy.setLink($$[$0 - 3], $$[$0 - 2], $$[$0]); - yy.setTooltip($$[$0 - 3], $$[$0 - 1]); - break; - case 78: - this.$ = $$[$0 - 3]; - yy.setClickEvent($$[$0 - 2], $$[$0 - 1], $$[$0]); - break; - case 79: - this.$ = $$[$0 - 4]; - yy.setClickEvent($$[$0 - 3], $$[$0 - 2], $$[$0 - 1]); - yy.setTooltip($$[$0 - 3], $$[$0]); - break; - case 80: - this.$ = $$[$0 - 3]; - yy.setLink($$[$0 - 2], $$[$0]); - break; - case 81: - this.$ = $$[$0 - 4]; - yy.setLink($$[$0 - 3], $$[$0 - 1], $$[$0]); - break; - case 82: - this.$ = $$[$0 - 4]; - yy.setLink($$[$0 - 3], $$[$0 - 1]); - yy.setTooltip($$[$0 - 3], $$[$0]); - break; - case 83: - this.$ = $$[$0 - 5]; - yy.setLink($$[$0 - 4], $$[$0 - 2], $$[$0]); - yy.setTooltip($$[$0 - 4], $$[$0 - 1]); - break; - case 84: - this.$ = $$[$0 - 2]; - yy.setCssStyle($$[$0 - 1], $$[$0]); - break; - case 85: - yy.setCssClass($$[$0 - 1], $$[$0]); - break; - case 86: - this.$ = [$$[$0]]; - break; - case 87: - $$[$0 - 2].push($$[$0]); - this.$ = $$[$0 - 2]; - break; - case 89: - this.$ = $$[$0 - 1] + $$[$0]; - break; - } - }, - table: [{ 3: 1, 4: 2, 5: 3, 6: 4, 7: [1, 6], 10: 5, 16: 37, 17: 20, 18: 38, 20: 7, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 27: 13, 28: 14, 29: 15, 30: 16, 31: $V0, 33: $V1, 35: $V2, 36: 21, 40: $V3, 41: 22, 44: $V4, 45: $V5, 47: $V6, 48: $V7, 50: $V8, 52: $V9, 53: $Va, 54: $Vb, 55: $Vc, 56: $Vd, 66: $Ve, 67: $Vf, 69: $Vg, 73: $Vh, 74: $Vi, 76: $Vj, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, { 1: [3] }, { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 3] }, o($Vo, [2, 5], { 8: [1, 46] }), { 8: [1, 47] }, o($Vp, [2, 16], { 21: [1, 48] }), o($Vp, [2, 18]), o($Vp, [2, 19]), o($Vp, [2, 20]), o($Vp, [2, 21]), o($Vp, [2, 22]), o($Vp, [2, 23]), o($Vp, [2, 24]), o($Vp, [2, 25]), o($Vp, [2, 26]), { 32: [1, 49] }, { 34: [1, 50] }, o($Vp, [2, 29]), o($Vp, [2, 45], { 49: 51, 57: 54, 58: 55, 13: [1, 52], 21: [1, 53], 59: $Vq, 60: $Vr, 61: $Vs, 62: $Vt, 63: $Vu, 64: $Vv, 65: $Vw }), { 37: [1, 63] }, o($Vx, [2, 36], { 37: [1, 65], 42: [1, 64] }), o($Vp, [2, 47]), o($Vp, [2, 48]), { 16: 66, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm }, { 16: 37, 17: 67, 18: 38, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, { 16: 37, 17: 68, 18: 38, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, { 16: 37, 17: 69, 18: 38, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, { 74: [1, 70] }, { 13: [1, 71] }, { 16: 37, 17: 72, 18: 38, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, { 13: $Vy, 51: 73 }, o($Vp, [2, 55]), o($Vp, [2, 56]), o($Vp, [2, 57]), o($Vp, [2, 58]), o($Vz, [2, 11], { 16: 37, 18: 38, 17: 75, 19: [1, 76], 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }), o($Vz, [2, 12], { 19: [1, 77] }), { 15: 78, 16: 79, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm }, { 16: 37, 17: 80, 18: 38, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, o($VA, [2, 112]), o($VA, [2, 113]), o($VA, [2, 114]), o($VA, [2, 115]), o([1, 8, 9, 12, 13, 19, 21, 37, 39, 42, 59, 60, 61, 62, 63, 64, 65, 70, 72], [2, 116]), o($Vo, [2, 6], { 10: 5, 20: 7, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 27: 13, 28: 14, 29: 15, 30: 16, 17: 20, 36: 21, 41: 22, 16: 37, 18: 38, 5: 81, 31: $V0, 33: $V1, 35: $V2, 40: $V3, 44: $V4, 45: $V5, 47: $V6, 48: $V7, 50: $V8, 52: $V9, 53: $Va, 54: $Vb, 55: $Vc, 56: $Vd, 66: $Ve, 67: $Vf, 69: $Vg, 73: $Vh, 74: $Vi, 76: $Vj, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }), { 5: 82, 10: 5, 16: 37, 17: 20, 18: 38, 20: 7, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 27: 13, 28: 14, 29: 15, 30: 16, 31: $V0, 33: $V1, 35: $V2, 36: 21, 40: $V3, 41: 22, 44: $V4, 45: $V5, 47: $V6, 48: $V7, 50: $V8, 52: $V9, 53: $Va, 54: $Vb, 55: $Vc, 56: $Vd, 66: $Ve, 67: $Vf, 69: $Vg, 73: $Vh, 74: $Vi, 76: $Vj, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, o($Vp, [2, 17]), o($Vp, [2, 27]), o($Vp, [2, 28]), { 13: [1, 84], 16: 37, 17: 83, 18: 38, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, { 49: 85, 57: 54, 58: 55, 59: $Vq, 60: $Vr, 61: $Vs, 62: $Vt, 63: $Vu, 64: $Vv, 65: $Vw }, o($Vp, [2, 46]), { 58: 86, 64: $Vv, 65: $Vw }, o($VB, [2, 62], { 57: 87, 59: $Vq, 60: $Vr, 61: $Vs, 62: $Vt, 63: $Vu }), o($VC, [2, 63]), o($VC, [2, 64]), o($VC, [2, 65]), o($VC, [2, 66]), o($VC, [2, 67]), o($VD, [2, 68]), o($VD, [2, 69]), { 8: [1, 89], 23: 90, 38: 88, 41: 22, 44: $V4 }, { 16: 91, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm }, { 43: 92, 47: $VE }, { 46: [1, 94] }, { 13: [1, 95] }, { 13: [1, 96] }, { 70: [1, 97], 72: [1, 98] }, { 21: $VF, 73: $VG, 74: $VH, 75: 99, 77: 100, 79: 101, 80: $VI, 81: $VJ, 82: $VK, 83: $VL, 84: $VM, 85: $VN }, { 74: [1, 111] }, { 13: $Vy, 51: 112 }, o($Vp, [2, 54]), o($Vp, [2, 117]), o($Vz, [2, 13]), o($Vz, [2, 14]), o($Vz, [2, 15]), { 37: [2, 32] }, { 15: 113, 16: 79, 37: [2, 9], 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm }, o($VO, [2, 40], { 11: 114, 12: [1, 115] }), o($Vo, [2, 7]), { 9: [1, 116] }, o($VP, [2, 49]), { 16: 37, 17: 117, 18: 38, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, { 13: [1, 119], 16: 37, 17: 118, 18: 38, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, o($VB, [2, 61], { 57: 120, 59: $Vq, 60: $Vr, 61: $Vs, 62: $Vt, 63: $Vu }), o($VB, [2, 60]), { 39: [1, 121] }, { 23: 90, 38: 122, 41: 22, 44: $V4 }, { 8: [1, 123], 39: [2, 33] }, o($Vx, [2, 37], { 37: [1, 124] }), { 39: [1, 125] }, { 39: [2, 43], 43: 126, 47: $VE }, { 16: 37, 17: 127, 18: 38, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, o($Vp, [2, 70], { 13: [1, 128] }), o($Vp, [2, 72], { 13: [1, 130], 68: [1, 129] }), o($Vp, [2, 76], { 13: [1, 131], 71: [1, 132] }), { 13: [1, 133] }, o($Vp, [2, 84], { 78: [1, 134] }), o($VQ, [2, 86], { 79: 135, 21: $VF, 73: $VG, 74: $VH, 80: $VI, 81: $VJ, 82: $VK, 83: $VL, 84: $VM, 85: $VN }), o($VR, [2, 88]), o($VR, [2, 90]), o($VR, [2, 91]), o($VR, [2, 92]), o($VR, [2, 93]), o($VR, [2, 94]), o($VR, [2, 95]), o($VR, [2, 96]), o($VR, [2, 97]), o($VR, [2, 98]), o($Vp, [2, 85]), o($Vp, [2, 53]), { 37: [2, 10] }, o($VO, [2, 41]), { 13: [1, 136] }, { 1: [2, 4] }, o($VP, [2, 51]), o($VP, [2, 50]), { 16: 37, 17: 137, 18: 38, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, o($VB, [2, 59]), o($Vp, [2, 30]), { 39: [1, 138] }, { 23: 90, 38: 139, 39: [2, 34], 41: 22, 44: $V4 }, { 43: 140, 47: $VE }, o($Vx, [2, 38]), { 39: [2, 44] }, o($Vp, [2, 42]), o($Vp, [2, 71]), o($Vp, [2, 73]), o($Vp, [2, 74], { 68: [1, 141] }), o($Vp, [2, 77]), o($Vp, [2, 78], { 13: [1, 142] }), o($Vp, [2, 80], { 13: [1, 144], 68: [1, 143] }), { 21: $VF, 73: $VG, 74: $VH, 77: 145, 79: 101, 80: $VI, 81: $VJ, 82: $VK, 83: $VL, 84: $VM, 85: $VN }, o($VR, [2, 89]), { 14: [1, 146] }, o($VP, [2, 52]), o($Vp, [2, 31]), { 39: [2, 35] }, { 39: [1, 147] }, o($Vp, [2, 75]), o($Vp, [2, 79]), o($Vp, [2, 81]), o($Vp, [2, 82], { 68: [1, 148] }), o($VQ, [2, 87], { 79: 135, 21: $VF, 73: $VG, 74: $VH, 80: $VI, 81: $VJ, 82: $VK, 83: $VL, 84: $VM, 85: $VN }), o($VO, [2, 8]), o($Vx, [2, 39]), o($Vp, [2, 83])], - defaultActions: { 2: [2, 1], 3: [2, 2], 4: [2, 3], 78: [2, 32], 113: [2, 10], 116: [2, 4], 126: [2, 44], 139: [2, 35] }, - parseError: function parseError(str, hash) { - if (hash.recoverable) { - this.trace(str); - } else { - var error = new Error(str); - error.hash = hash; - throw error; - } - }, - parse: function parse(input) { - var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; - var args = lstack.slice.call(arguments, 1); - var lexer2 = Object.create(this.lexer); - var sharedState = { yy: {} }; - for (var k in this.yy) { - if (Object.prototype.hasOwnProperty.call(this.yy, k)) { - sharedState.yy[k] = this.yy[k]; - } - } - lexer2.setInput(input, sharedState.yy); - sharedState.yy.lexer = lexer2; - sharedState.yy.parser = this; - if (typeof lexer2.yylloc == "undefined") { - lexer2.yylloc = {}; - } - var yyloc = lexer2.yylloc; - lstack.push(yyloc); - var ranges = lexer2.options && lexer2.options.ranges; - if (typeof sharedState.yy.parseError === "function") { - this.parseError = sharedState.yy.parseError; - } else { - this.parseError = Object.getPrototypeOf(this).parseError; - } - function lex() { - var token; - token = tstack.pop() || lexer2.lex() || EOF; - if (typeof token !== "number") { - if (token instanceof Array) { - tstack = token; - token = tstack.pop(); - } - token = self.symbols_[token] || token; - } - return token; - } - var symbol, state, action, r, yyval = {}, p, len, newState, expected; - while (true) { - state = stack[stack.length - 1]; - if (this.defaultActions[state]) { - action = this.defaultActions[state]; - } else { - if (symbol === null || typeof symbol == "undefined") { - symbol = lex(); - } - action = table[state] && table[state][symbol]; - } - if (typeof action === "undefined" || !action.length || !action[0]) { - var errStr = ""; - expected = []; - for (p in table[state]) { - if (this.terminals_[p] && p > TERROR) { - expected.push("'" + this.terminals_[p] + "'"); - } - } - if (lexer2.showPosition) { - errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; - } else { - errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); - } - this.parseError(errStr, { - text: lexer2.match, - token: this.terminals_[symbol] || symbol, - line: lexer2.yylineno, - loc: yyloc, - expected - }); - } - if (action[0] instanceof Array && action.length > 1) { - throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); - } - switch (action[0]) { - case 1: - stack.push(symbol); - vstack.push(lexer2.yytext); - lstack.push(lexer2.yylloc); - stack.push(action[1]); - symbol = null; - { - yyleng = lexer2.yyleng; - yytext = lexer2.yytext; - yylineno = lexer2.yylineno; - yyloc = lexer2.yylloc; - } - break; - case 2: - len = this.productions_[action[1]][1]; - yyval.$ = vstack[vstack.length - len]; - yyval._$ = { - first_line: lstack[lstack.length - (len || 1)].first_line, - last_line: lstack[lstack.length - 1].last_line, - first_column: lstack[lstack.length - (len || 1)].first_column, - last_column: lstack[lstack.length - 1].last_column - }; - if (ranges) { - yyval._$.range = [ - lstack[lstack.length - (len || 1)].range[0], - lstack[lstack.length - 1].range[1] - ]; - } - r = this.performAction.apply(yyval, [ - yytext, - yyleng, - yylineno, - sharedState.yy, - action[1], - vstack, - lstack - ].concat(args)); - if (typeof r !== "undefined") { - return r; - } - if (len) { - stack = stack.slice(0, -1 * len * 2); - vstack = vstack.slice(0, -1 * len); - lstack = lstack.slice(0, -1 * len); - } - stack.push(this.productions_[action[1]][0]); - vstack.push(yyval.$); - lstack.push(yyval._$); - newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; - stack.push(newState); - break; - case 3: - return true; - } - } - return true; - } - }; - var lexer = function() { - var lexer2 = { - EOF: 1, - parseError: function parseError(str, hash) { - if (this.yy.parser) { - this.yy.parser.parseError(str, hash); - } else { - throw new Error(str); - } - }, - // resets the lexer, sets new input - setInput: function(input, yy) { - this.yy = yy || this.yy || {}; - this._input = input; - this._more = this._backtrack = this.done = false; - this.yylineno = this.yyleng = 0; - this.yytext = this.matched = this.match = ""; - this.conditionStack = ["INITIAL"]; - this.yylloc = { - first_line: 1, - first_column: 0, - last_line: 1, - last_column: 0 - }; - if (this.options.ranges) { - this.yylloc.range = [0, 0]; - } - this.offset = 0; - return this; - }, - // consumes and returns one char from the input - input: function() { - var ch = this._input[0]; - this.yytext += ch; - this.yyleng++; - this.offset++; - this.match += ch; - this.matched += ch; - var lines = ch.match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno++; - this.yylloc.last_line++; - } else { - this.yylloc.last_column++; - } - if (this.options.ranges) { - this.yylloc.range[1]++; - } - this._input = this._input.slice(1); - return ch; - }, - // unshifts one char (or a string) into the input - unput: function(ch) { - var len = ch.length; - var lines = ch.split(/(?:\r\n?|\n)/g); - this._input = ch + this._input; - this.yytext = this.yytext.substr(0, this.yytext.length - len); - this.offset -= len; - var oldLines = this.match.split(/(?:\r\n?|\n)/g); - this.match = this.match.substr(0, this.match.length - 1); - this.matched = this.matched.substr(0, this.matched.length - 1); - if (lines.length - 1) { - this.yylineno -= lines.length - 1; - } - var r = this.yylloc.range; - this.yylloc = { - first_line: this.yylloc.first_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.first_column, - last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len - }; - if (this.options.ranges) { - this.yylloc.range = [r[0], r[0] + this.yyleng - len]; - } - this.yyleng = this.yytext.length; - return this; - }, - // When called from action, caches matched text and appends it on next action - more: function() { - this._more = true; - return this; - }, - // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. - reject: function() { - if (this.options.backtrack_lexer) { - this._backtrack = true; - } else { - return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), { - text: "", - token: null, - line: this.yylineno - }); - } - return this; - }, - // retain first n characters of the match - less: function(n) { - this.unput(this.match.slice(n)); - }, - // displays already matched input, i.e. for error messages - pastInput: function() { - var past = this.matched.substr(0, this.matched.length - this.match.length); - return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); - }, - // displays upcoming input, i.e. for error messages - upcomingInput: function() { - var next = this.match; - if (next.length < 20) { - next += this._input.substr(0, 20 - next.length); - } - return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); - }, - // displays the character position where the lexing error occurred, i.e. for error messages - showPosition: function() { - var pre = this.pastInput(); - var c = new Array(pre.length + 1).join("-"); - return pre + this.upcomingInput() + "\n" + c + "^"; - }, - // test the lexed token: return FALSE when not a match, otherwise return token - test_match: function(match, indexed_rule) { - var token, lines, backup; - if (this.options.backtrack_lexer) { - backup = { - yylineno: this.yylineno, - yylloc: { - first_line: this.yylloc.first_line, - last_line: this.last_line, - first_column: this.yylloc.first_column, - last_column: this.yylloc.last_column - }, - yytext: this.yytext, - match: this.match, - matches: this.matches, - matched: this.matched, - yyleng: this.yyleng, - offset: this.offset, - _more: this._more, - _input: this._input, - yy: this.yy, - conditionStack: this.conditionStack.slice(0), - done: this.done - }; - if (this.options.ranges) { - backup.yylloc.range = this.yylloc.range.slice(0); - } - } - lines = match[0].match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno += lines.length; - } - this.yylloc = { - first_line: this.yylloc.last_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.last_column, - last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length - }; - this.yytext += match[0]; - this.match += match[0]; - this.matches = match; - this.yyleng = this.yytext.length; - if (this.options.ranges) { - this.yylloc.range = [this.offset, this.offset += this.yyleng]; - } - this._more = false; - this._backtrack = false; - this._input = this._input.slice(match[0].length); - this.matched += match[0]; - token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); - if (this.done && this._input) { - this.done = false; - } - if (token) { - return token; - } else if (this._backtrack) { - for (var k in backup) { - this[k] = backup[k]; - } - return false; - } - return false; - }, - // return next match in input - next: function() { - if (this.done) { - return this.EOF; - } - if (!this._input) { - this.done = true; - } - var token, match, tempMatch, index; - if (!this._more) { - this.yytext = ""; - this.match = ""; - } - var rules = this._currentRules(); - for (var i = 0; i < rules.length; i++) { - tempMatch = this._input.match(this.rules[rules[i]]); - if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { - match = tempMatch; - index = i; - if (this.options.backtrack_lexer) { - token = this.test_match(tempMatch, rules[i]); - if (token !== false) { - return token; - } else if (this._backtrack) { - match = false; - continue; - } else { - return false; - } - } else if (!this.options.flex) { - break; - } - } - } - if (match) { - token = this.test_match(match, rules[index]); - if (token !== false) { - return token; - } - return false; - } - if (this._input === "") { - return this.EOF; - } else { - return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { - text: "", - token: null, - line: this.yylineno - }); - } - }, - // return next match that has a token - lex: function lex() { - var r = this.next(); - if (r) { - return r; - } else { - return this.lex(); - } - }, - // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) - begin: function begin(condition) { - this.conditionStack.push(condition); - }, - // pop the previously active lexer condition state off the condition stack - popState: function popState() { - var n = this.conditionStack.length - 1; - if (n > 0) { - return this.conditionStack.pop(); - } else { - return this.conditionStack[0]; - } - }, - // produce the lexer rule set which is active for the currently active lexer condition state - _currentRules: function _currentRules() { - if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { - return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; - } else { - return this.conditions["INITIAL"].rules; - } - }, - // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available - topState: function topState(n) { - n = this.conditionStack.length - 1 - Math.abs(n || 0); - if (n >= 0) { - return this.conditionStack[n]; - } else { - return "INITIAL"; - } - }, - // alias for begin(condition) - pushState: function pushState(condition) { - this.begin(condition); - }, - // return the number of states currently on the stack - stateStackSize: function stateStackSize() { - return this.conditionStack.length; - }, - options: {}, - performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { - switch ($avoiding_name_collisions) { - case 0: - return 53; - case 1: - return 54; - case 2: - return 55; - case 3: - return 56; - case 4: - break; - case 5: - break; - case 6: - this.begin("acc_title"); - return 31; - case 7: - this.popState(); - return "acc_title_value"; - case 8: - this.begin("acc_descr"); - return 33; - case 9: - this.popState(); - return "acc_descr_value"; - case 10: - this.begin("acc_descr_multiline"); - break; - case 11: - this.popState(); - break; - case 12: - return "acc_descr_multiline_value"; - case 13: - return 8; - case 14: - break; - case 15: - return 7; - case 16: - return 7; - case 17: - return "EDGE_STATE"; - case 18: - this.begin("callback_name"); - break; - case 19: - this.popState(); - break; - case 20: - this.popState(); - this.begin("callback_args"); - break; - case 21: - return 70; - case 22: - this.popState(); - break; - case 23: - return 71; - case 24: - this.popState(); - break; - case 25: - return "STR"; - case 26: - this.begin("string"); - break; - case 27: - return 73; - case 28: - this.begin("namespace"); - return 40; - case 29: - this.popState(); - return 8; - case 30: - break; - case 31: - this.begin("namespace-body"); - return 37; - case 32: - this.popState(); - return 39; - case 33: - return "EOF_IN_STRUCT"; - case 34: - return 8; - case 35: - break; - case 36: - return "EDGE_STATE"; - case 37: - this.begin("class"); - return 44; - case 38: - this.popState(); - return 8; - case 39: - break; - case 40: - this.popState(); - this.popState(); - return 39; - case 41: - this.begin("class-body"); - return 37; - case 42: - this.popState(); - return 39; - case 43: - return "EOF_IN_STRUCT"; - case 44: - return "EDGE_STATE"; - case 45: - return "OPEN_IN_STRUCT"; - case 46: - break; - case 47: - return "MEMBER"; - case 48: - return 76; - case 49: - return 66; - case 50: - return 67; - case 51: - return 69; - case 52: - return 50; - case 53: - return 52; - case 54: - return 45; - case 55: - return 46; - case 56: - return 72; - case 57: - this.popState(); - break; - case 58: - return "GENERICTYPE"; - case 59: - this.begin("generic"); - break; - case 60: - this.popState(); - break; - case 61: - return "BQUOTE_STR"; - case 62: - this.begin("bqstring"); - break; - case 63: - return 68; - case 64: - return 68; - case 65: - return 68; - case 66: - return 68; - case 67: - return 60; - case 68: - return 60; - case 69: - return 62; - case 70: - return 62; - case 71: - return 61; - case 72: - return 59; - case 73: - return 63; - case 74: - return 64; - case 75: - return 65; - case 76: - return 21; - case 77: - return 42; - case 78: - return 95; - case 79: - return "DOT"; - case 80: - return "PLUS"; - case 81: - return 81; - case 82: - return 78; - case 83: - return 84; - case 84: - return 84; - case 85: - return 85; - case 86: - return "EQUALS"; - case 87: - return "EQUALS"; - case 88: - return 74; - case 89: - return 12; - case 90: - return 14; - case 91: - return "PUNCTUATION"; - case 92: - return 80; - case 93: - return 97; - case 94: - return 83; - case 95: - return 83; - case 96: - return 9; - } - }, - rules: [/^(?:.*direction\s+TB[^\n]*)/, /^(?:.*direction\s+BT[^\n]*)/, /^(?:.*direction\s+RL[^\n]*)/, /^(?:.*direction\s+LR[^\n]*)/, /^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/, /^(?:%%[^\n]*(\r?\n)*)/, /^(?:accTitle\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*\{\s*)/, /^(?:[\}])/, /^(?:[^\}]*)/, /^(?:\s*(\r?\n)+)/, /^(?:\s+)/, /^(?:classDiagram-v2\b)/, /^(?:classDiagram\b)/, /^(?:\[\*\])/, /^(?:call[\s]+)/, /^(?:\([\s]*\))/, /^(?:\()/, /^(?:[^(]*)/, /^(?:\))/, /^(?:[^)]*)/, /^(?:["])/, /^(?:[^"]*)/, /^(?:["])/, /^(?:style\b)/, /^(?:namespace\b)/, /^(?:\s*(\r?\n)+)/, /^(?:\s+)/, /^(?:[{])/, /^(?:[}])/, /^(?:$)/, /^(?:\s*(\r?\n)+)/, /^(?:\s+)/, /^(?:\[\*\])/, /^(?:class\b)/, /^(?:\s*(\r?\n)+)/, /^(?:\s+)/, /^(?:[}])/, /^(?:[{])/, /^(?:[}])/, /^(?:$)/, /^(?:\[\*\])/, /^(?:[{])/, /^(?:[\n])/, /^(?:[^{}\n]*)/, /^(?:cssClass\b)/, /^(?:callback\b)/, /^(?:link\b)/, /^(?:click\b)/, /^(?:note for\b)/, /^(?:note\b)/, /^(?:<<)/, /^(?:>>)/, /^(?:href\b)/, /^(?:[~])/, /^(?:[^~]*)/, /^(?:~)/, /^(?:[`])/, /^(?:[^`]+)/, /^(?:[`])/, /^(?:_self\b)/, /^(?:_blank\b)/, /^(?:_parent\b)/, /^(?:_top\b)/, /^(?:\s*<\|)/, /^(?:\s*\|>)/, /^(?:\s*>)/, /^(?:\s*<)/, /^(?:\s*\*)/, /^(?:\s*o\b)/, /^(?:\s*\(\))/, /^(?:--)/, /^(?:\.\.)/, /^(?::{1}[^:\n;]+)/, /^(?::{3})/, /^(?:-)/, /^(?:\.)/, /^(?:\+)/, /^(?::)/, /^(?:,)/, /^(?:#)/, /^(?:#)/, /^(?:%)/, /^(?:=)/, /^(?:=)/, /^(?:\w+)/, /^(?:\[)/, /^(?:\])/, /^(?:[!"#$%&'*+,-.`?\\/])/, /^(?:[0-9]+)/, /^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/, /^(?:\s)/, /^(?:\s)/, /^(?:$)/], - conditions: { "namespace-body": { "rules": [26, 32, 33, 34, 35, 36, 37, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "namespace": { "rules": [26, 28, 29, 30, 31, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "class-body": { "rules": [26, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "class": { "rules": [26, 38, 39, 40, 41, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "acc_descr_multiline": { "rules": [11, 12, 26, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "acc_descr": { "rules": [9, 26, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "acc_title": { "rules": [7, 26, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "callback_args": { "rules": [22, 23, 26, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "callback_name": { "rules": [19, 20, 21, 26, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "href": { "rules": [26, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "struct": { "rules": [26, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "generic": { "rules": [26, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "bqstring": { "rules": [26, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "string": { "rules": [24, 25, 26, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 3, 4, 5, 6, 8, 10, 13, 14, 15, 16, 17, 18, 26, 27, 28, 37, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96], "inclusive": true } } - }; - return lexer2; - }(); - parser2.lexer = lexer; - function Parser() { - this.yy = {}; - } - Parser.prototype = parser2; - parser2.Parser = Parser; - return new Parser(); -}(); -parser.parser = parser; -const parser$1 = parser; -const visibilityValues = ["#", "+", "~", "-", ""]; -class ClassMember { - constructor(input, memberType) { - this.memberType = memberType; - this.visibility = ""; - this.classifier = ""; - const sanitizedInput = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.d)(input, (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)()); - this.parseMember(sanitizedInput); - } - getDisplayDetails() { - let displayText = this.visibility + (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.x)(this.id); - if (this.memberType === "method") { - displayText += `(${(0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.x)(this.parameters.trim())})`; - if (this.returnType) { - displayText += " : " + (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.x)(this.returnType); - } - } - displayText = displayText.trim(); - const cssStyle = this.parseClassifier(); - return { - displayText, - cssStyle - }; - } - parseMember(input) { - let potentialClassifier = ""; - if (this.memberType === "method") { - const methodRegEx = /([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/; - const match = input.match(methodRegEx); - if (match) { - const detectedVisibility = match[1] ? match[1].trim() : ""; - if (visibilityValues.includes(detectedVisibility)) { - this.visibility = detectedVisibility; - } - this.id = match[2].trim(); - this.parameters = match[3] ? match[3].trim() : ""; - potentialClassifier = match[4] ? match[4].trim() : ""; - this.returnType = match[5] ? match[5].trim() : ""; - if (potentialClassifier === "") { - const lastChar = this.returnType.substring(this.returnType.length - 1); - if (lastChar.match(/[$*]/)) { - potentialClassifier = lastChar; - this.returnType = this.returnType.substring(0, this.returnType.length - 1); - } - } - } - } else { - const length = input.length; - const firstChar = input.substring(0, 1); - const lastChar = input.substring(length - 1); - if (visibilityValues.includes(firstChar)) { - this.visibility = firstChar; - } - if (lastChar.match(/[$*]/)) { - potentialClassifier = lastChar; - } - this.id = input.substring( - this.visibility === "" ? 0 : 1, - potentialClassifier === "" ? length : length - 1 - ); - } - this.classifier = potentialClassifier; - } - parseClassifier() { - switch (this.classifier) { - case "*": - return "font-style:italic;"; - case "$": - return "text-decoration:underline;"; - default: - return ""; - } - } -} -const MERMAID_DOM_ID_PREFIX = "classId-"; -let relations = []; -let classes = {}; -let notes = []; -let classCounter = 0; -let namespaces = {}; -let namespaceCounter = 0; -let functions = []; -const sanitizeText = (txt) => _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.e.sanitizeText(txt, (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)()); -const splitClassNameAndType = function(_id) { - const id = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.e.sanitizeText(_id, (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)()); - let genericType = ""; - let className = id; - if (id.indexOf("~") > 0) { - const split = id.split("~"); - className = sanitizeText(split[0]); - genericType = sanitizeText(split[1]); - } - return { className, type: genericType }; -}; -const setClassLabel = function(_id, label) { - const id = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.e.sanitizeText(_id, (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)()); - if (label) { - label = sanitizeText(label); - } - const { className } = splitClassNameAndType(id); - classes[className].label = label; -}; -const addClass = function(_id) { - const id = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.e.sanitizeText(_id, (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)()); - const { className, type } = splitClassNameAndType(id); - if (Object.hasOwn(classes, className)) { - return; - } - const name = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.e.sanitizeText(className, (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)()); - classes[name] = { - id: name, - type, - label: name, - cssClasses: [], - methods: [], - members: [], - annotations: [], - styles: [], - domId: MERMAID_DOM_ID_PREFIX + name + "-" + classCounter - }; - classCounter++; -}; -const lookUpDomId = function(_id) { - const id = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.e.sanitizeText(_id, (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)()); - if (id in classes) { - return classes[id].domId; - } - throw new Error("Class not found: " + id); -}; -const clear = function() { - relations = []; - classes = {}; - notes = []; - functions = []; - functions.push(setupToolTips); - namespaces = {}; - namespaceCounter = 0; - (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.v)(); -}; -const getClass = function(id) { - return classes[id]; -}; -const getClasses = function() { - return classes; -}; -const getRelations = function() { - return relations; -}; -const getNotes = function() { - return notes; -}; -const addRelation = function(relation) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("Adding relation: " + JSON.stringify(relation)); - addClass(relation.id1); - addClass(relation.id2); - relation.id1 = splitClassNameAndType(relation.id1).className; - relation.id2 = splitClassNameAndType(relation.id2).className; - relation.relationTitle1 = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.e.sanitizeText(relation.relationTitle1.trim(), (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)()); - relation.relationTitle2 = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.e.sanitizeText(relation.relationTitle2.trim(), (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)()); - relations.push(relation); -}; -const addAnnotation = function(className, annotation) { - const validatedClassName = splitClassNameAndType(className).className; - classes[validatedClassName].annotations.push(annotation); -}; -const addMember = function(className, member) { - addClass(className); - const validatedClassName = splitClassNameAndType(className).className; - const theClass = classes[validatedClassName]; - if (typeof member === "string") { - const memberString = member.trim(); - if (memberString.startsWith("<<") && memberString.endsWith(">>")) { - theClass.annotations.push(sanitizeText(memberString.substring(2, memberString.length - 2))); - } else if (memberString.indexOf(")") > 0) { - theClass.methods.push(new ClassMember(memberString, "method")); - } else if (memberString) { - theClass.members.push(new ClassMember(memberString, "attribute")); - } - } -}; -const addMembers = function(className, members) { - if (Array.isArray(members)) { - members.reverse(); - members.forEach((member) => addMember(className, member)); - } -}; -const addNote = function(text, className) { - const note = { - id: `note${notes.length}`, - class: className, - text - }; - notes.push(note); -}; -const cleanupLabel = function(label) { - if (label.startsWith(":")) { - label = label.substring(1); - } - return sanitizeText(label.trim()); -}; -const setCssClass = function(ids, className) { - ids.split(",").forEach(function(_id) { - let id = _id; - if (_id[0].match(/\d/)) { - id = MERMAID_DOM_ID_PREFIX + id; - } - if (classes[id] !== void 0) { - classes[id].cssClasses.push(className); - } - }); -}; -const setTooltip = function(ids, tooltip) { - ids.split(",").forEach(function(id) { - if (tooltip !== void 0) { - classes[id].tooltip = sanitizeText(tooltip); - } - }); -}; -const getTooltip = function(id, namespace) { - if (namespace) { - return namespaces[namespace].classes[id].tooltip; - } - return classes[id].tooltip; -}; -const setLink = function(ids, linkStr, target) { - const config = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)(); - ids.split(",").forEach(function(_id) { - let id = _id; - if (_id[0].match(/\d/)) { - id = MERMAID_DOM_ID_PREFIX + id; - } - if (classes[id] !== void 0) { - classes[id].link = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.u.formatUrl(linkStr, config); - if (config.securityLevel === "sandbox") { - classes[id].linkTarget = "_top"; - } else if (typeof target === "string") { - classes[id].linkTarget = sanitizeText(target); - } else { - classes[id].linkTarget = "_blank"; - } - } - }); - setCssClass(ids, "clickable"); -}; -const setClickEvent = function(ids, functionName, functionArgs) { - ids.split(",").forEach(function(id) { - setClickFunc(id, functionName, functionArgs); - classes[id].haveCallback = true; - }); - setCssClass(ids, "clickable"); -}; -const setClickFunc = function(_domId, functionName, functionArgs) { - const domId = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.e.sanitizeText(_domId, (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)()); - const config = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)(); - if (config.securityLevel !== "loose") { - return; - } - if (functionName === void 0) { - return; - } - const id = domId; - if (classes[id] !== void 0) { - const elemId = lookUpDomId(id); - let argList = []; - if (typeof functionArgs === "string") { - argList = functionArgs.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/); - for (let i = 0; i < argList.length; i++) { - let item = argList[i].trim(); - if (item.charAt(0) === '"' && item.charAt(item.length - 1) === '"') { - item = item.substr(1, item.length - 2); - } - argList[i] = item; - } - } - if (argList.length === 0) { - argList.push(elemId); - } - functions.push(function() { - const elem = document.querySelector(`[id="${elemId}"]`); - if (elem !== null) { - elem.addEventListener( - "click", - function() { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.u.runFunc(functionName, ...argList); - }, - false - ); - } - }); - } -}; -const bindFunctions = function(element) { - functions.forEach(function(fun) { - fun(element); - }); -}; -const lineType = { - LINE: 0, - DOTTED_LINE: 1 -}; -const relationType = { - AGGREGATION: 0, - EXTENSION: 1, - COMPOSITION: 2, - DEPENDENCY: 3, - LOLLIPOP: 4 -}; -const setupToolTips = function(element) { - let tooltipElem = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(".mermaidTooltip"); - if ((tooltipElem._groups || tooltipElem)[0][0] === null) { - tooltipElem = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)("body").append("div").attr("class", "mermaidTooltip").style("opacity", 0); - } - const svg = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(element).select("svg"); - const nodes = svg.selectAll("g.node"); - nodes.on("mouseover", function() { - const el = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(this); - const title = el.attr("title"); - if (title === null) { - return; - } - const rect = this.getBoundingClientRect(); - tooltipElem.transition().duration(200).style("opacity", ".9"); - tooltipElem.text(el.attr("title")).style("left", window.scrollX + rect.left + (rect.right - rect.left) / 2 + "px").style("top", window.scrollY + rect.top - 14 + document.body.scrollTop + "px"); - tooltipElem.html(tooltipElem.html().replace(/<br\/>/g, "
    ")); - el.classed("hover", true); - }).on("mouseout", function() { - tooltipElem.transition().duration(500).style("opacity", 0); - const el = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(this); - el.classed("hover", false); - }); -}; -functions.push(setupToolTips); -let direction = "TB"; -const getDirection = () => direction; -const setDirection = (dir) => { - direction = dir; -}; -const addNamespace = function(id) { - if (namespaces[id] !== void 0) { - return; - } - namespaces[id] = { - id, - classes: {}, - children: {}, - domId: MERMAID_DOM_ID_PREFIX + id + "-" + namespaceCounter - }; - namespaceCounter++; -}; -const getNamespace = function(name) { - return namespaces[name]; -}; -const getNamespaces = function() { - return namespaces; -}; -const addClassesToNamespace = function(id, classNames) { - if (namespaces[id] === void 0) { - return; - } - for (const name of classNames) { - const { className } = splitClassNameAndType(name); - classes[className].parent = id; - namespaces[id].classes[className] = classes[className]; - } -}; -const setCssStyle = function(id, styles2) { - const thisClass = classes[id]; - if (!styles2 || !thisClass) { - return; - } - for (const s of styles2) { - if (s.includes(",")) { - thisClass.styles.push(...s.split(",")); - } else { - thisClass.styles.push(s); - } - } -}; -const db = { - setAccTitle: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.s, - getAccTitle: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.g, - getAccDescription: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.a, - setAccDescription: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.b, - getConfig: () => (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().class, - addClass, - bindFunctions, - clear, - getClass, - getClasses, - getNotes, - addAnnotation, - addNote, - getRelations, - addRelation, - getDirection, - setDirection, - addMember, - addMembers, - cleanupLabel, - lineType, - relationType, - setClickEvent, - setCssClass, - setLink, - getTooltip, - setTooltip, - lookUpDomId, - setDiagramTitle: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.q, - getDiagramTitle: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.t, - setClassLabel, - addNamespace, - addClassesToNamespace, - getNamespace, - getNamespaces, - setCssStyle -}; -const getStyles = (options) => `g.classGroup text { - fill: ${options.nodeBorder || options.classText}; - stroke: none; - font-family: ${options.fontFamily}; - font-size: 10px; - - .title { - font-weight: bolder; - } - -} - -.nodeLabel, .edgeLabel { - color: ${options.classText}; -} -.edgeLabel .label rect { - fill: ${options.mainBkg}; -} -.label text { - fill: ${options.classText}; -} -.edgeLabel .label span { - background: ${options.mainBkg}; -} - -.classTitle { - font-weight: bolder; -} -.node rect, - .node circle, - .node ellipse, - .node polygon, - .node path { - fill: ${options.mainBkg}; - stroke: ${options.nodeBorder}; - stroke-width: 1px; - } - - -.divider { - stroke: ${options.nodeBorder}; - stroke-width: 1; -} - -g.clickable { - cursor: pointer; -} - -g.classGroup rect { - fill: ${options.mainBkg}; - stroke: ${options.nodeBorder}; -} - -g.classGroup line { - stroke: ${options.nodeBorder}; - stroke-width: 1; -} - -.classLabel .box { - stroke: none; - stroke-width: 0; - fill: ${options.mainBkg}; - opacity: 0.5; -} - -.classLabel .label { - fill: ${options.nodeBorder}; - font-size: 10px; -} - -.relation { - stroke: ${options.lineColor}; - stroke-width: 1; - fill: none; -} - -.dashed-line{ - stroke-dasharray: 3; -} - -.dotted-line{ - stroke-dasharray: 1 2; -} - -#compositionStart, .composition { - fill: ${options.lineColor} !important; - stroke: ${options.lineColor} !important; - stroke-width: 1; -} - -#compositionEnd, .composition { - fill: ${options.lineColor} !important; - stroke: ${options.lineColor} !important; - stroke-width: 1; -} - -#dependencyStart, .dependency { - fill: ${options.lineColor} !important; - stroke: ${options.lineColor} !important; - stroke-width: 1; -} - -#dependencyStart, .dependency { - fill: ${options.lineColor} !important; - stroke: ${options.lineColor} !important; - stroke-width: 1; -} - -#extensionStart, .extension { - fill: transparent !important; - stroke: ${options.lineColor} !important; - stroke-width: 1; -} - -#extensionEnd, .extension { - fill: transparent !important; - stroke: ${options.lineColor} !important; - stroke-width: 1; -} - -#aggregationStart, .aggregation { - fill: transparent !important; - stroke: ${options.lineColor} !important; - stroke-width: 1; -} - -#aggregationEnd, .aggregation { - fill: transparent !important; - stroke: ${options.lineColor} !important; - stroke-width: 1; -} - -#lollipopStart, .lollipop { - fill: ${options.mainBkg} !important; - stroke: ${options.lineColor} !important; - stroke-width: 1; -} - -#lollipopEnd, .lollipop { - fill: ${options.mainBkg} !important; - stroke: ${options.lineColor} !important; - stroke-width: 1; -} - -.edgeTerminals { - font-size: 11px; - line-height: initial; -} - -.classTitleText { - text-anchor: middle; - font-size: 18px; - fill: ${options.textColor}; -} -`; -const styles = getStyles; - - - -/***/ }) - -}; -; \ No newline at end of file diff --git a/assets/js/6452.320baf33.js b/assets/js/6452.320baf33.js new file mode 100644 index 000000000000..0bfa273577aa --- /dev/null +++ b/assets/js/6452.320baf33.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6452],{6452:(e,c,s)=>{s.d(c,{createPacketServices:()=>a.$});var a=s(71609);s(19369)}}]); \ No newline at end of file diff --git a/assets/js/64c7e1cc.7797545e.js b/assets/js/64c7e1cc.7797545e.js new file mode 100644 index 000000000000..4c9994ebf8c1 --- /dev/null +++ b/assets/js/64c7e1cc.7797545e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8727],{13907:(t,e,n)=>{n.r(e),n.d(e,{assets:()=>d,contentTitle:()=>s,default:()=>u,frontMatter:()=>a,metadata:()=>o,toc:()=>l});const o=JSON.parse('{"id":"build/build-integration","title":"Polkadot Integration Guide","description":"Reference point for the Polkadot integration guides.","source":"@site/../docs/build/build-integration.md","sourceDirName":"build","slug":"/build-integration","permalink":"/docs/build-integration","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/build/build-integration.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1726729589000,"frontMatter":{"id":"build-integration","title":"Polkadot Integration Guide","sidebar_label":"Integration Initiation","description":"Reference point for the Polkadot integration guides.","keywords":["protocol","integration","structure"],"slug":"../build-integration"},"sidebar":"docs","previous":{"title":"Transaction Construction","permalink":"/docs/build-transaction-construction"},"next":{"title":"Node Management","permalink":"/docs/build-node-management"}}');var i=n(74848),r=n(28453);const a={id:"build-integration",title:"Polkadot Integration Guide",sidebar_label:"Integration Initiation",description:"Reference point for the Polkadot integration guides.",keywords:["protocol","integration","structure"],slug:"../build-integration"},s=void 0,d={},l=[{value:"Structure",id:"structure",level:2},{value:"Recommendation",id:"recommendation",level:2}];function c(t){const e={a:"a",h2:"h2",li:"li",ol:"ol",p:"p",...(0,r.R)(),...t.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(e.p,{children:"Welcome to the Polkadot integration guide. This guide will provide all the information you need to\nget started on your integration. The target audiences for this guide are wallets and custodians, but\nit will be useful to any infrastructure provider such as validators or chain indexers."}),"\n",(0,i.jsx)(e.h2,{id:"structure",children:"Structure"}),"\n",(0,i.jsx)(e.p,{children:"The guide focuses on Polkadot and Kusama, but the principles will apply to parachains and other\nSubstrate-based chains. The guide contains four sections:"}),"\n",(0,i.jsxs)(e.ol,{children:["\n",(0,i.jsxs)(e.li,{children:[(0,i.jsx)(e.a,{href:"/docs/build-protocol-info",children:"Protocol Info"}),": The entry point to the guide. Please read it carefully\nas it provides information about Polkadot that differentiates it from other blockchains. Use this\npage to check your assumptions."]}),"\n",(0,i.jsxs)(e.li,{children:[(0,i.jsx)(e.a,{href:"/docs/build-integrate-assets",children:"Assets"}),": The guide to integrating assets on Polkadot into your\nsystems."]}),"\n",(0,i.jsxs)(e.li,{children:[(0,i.jsx)(e.a,{href:"/docs/build-node-management",children:"Node Management"}),": This page will guide you to starting and monitoring\na node."]}),"\n",(0,i.jsxs)(e.li,{children:[(0,i.jsx)(e.a,{href:"/docs/build-node-interaction",children:"Node Interaction"}),": This page will teach you to interact with your\nnode via multiple RPC tooling options."]}),"\n",(0,i.jsxs)(e.li,{children:[(0,i.jsx)(e.a,{href:"/docs/build-transaction-construction",children:"Transaction Construction"}),": A guide to transaction\nconstruction, signing, decoding, and serialization using several available tools."]}),"\n"]}),"\n",(0,i.jsx)(e.h2,{id:"recommendation",children:"Recommendation"}),"\n",(0,i.jsx)(e.p,{children:"Each page in the guide, especially the Node Interaction and Transaction Construction pages, tries to\nlist several options to accomplish the same thing. We want you to know your options and choose the\nsolution that is best for you."}),"\n",(0,i.jsxs)(e.p,{children:["That said, the easiest path to integration is almost always to use\n",(0,i.jsx)(e.a,{href:"https://github.com/paritytech/substrate-api-sidecar",children:"Substrate API Sidecar"})," to interact with your\nnode and ",(0,i.jsx)(e.a,{href:"https://github.com/paritytech/txwrapper-core/",children:"TxWrapper Core"})," to construct and sign\ntransactions. Parity and Web3 Foundation will be able to provide the best support if you use these\ntools."]}),"\n",(0,i.jsxs)(e.p,{children:["If your team would like support, join some of our ",(0,i.jsx)(e.a,{href:"/docs/community",children:"community channels"})," or\ncontact ",(0,i.jsx)(e.a,{href:"mailto:support@polkadot.network",children:"support@polkadot.network"}),"."]})]})}function u(t={}){const{wrapper:e}={...(0,r.R)(),...t.components};return e?(0,i.jsx)(e,{...t,children:(0,i.jsx)(c,{...t})}):c(t)}},28453:(t,e,n)=>{n.d(e,{R:()=>a,x:()=>s});var o=n(96540);const i={},r=o.createContext(i);function a(t){const e=o.useContext(r);return o.useMemo((function(){return"function"==typeof t?t(e):{...e,...t}}),[e,t])}function s(t){let e;return e=t.disableParentContext?"function"==typeof t.components?t.components(i):t.components||i:a(t.components),o.createElement(r.Provider,{value:e},t.children)}}}]); \ No newline at end of file diff --git a/assets/js/64c7e1cc.f47c31fe.js b/assets/js/64c7e1cc.f47c31fe.js deleted file mode 100644 index 2903eddad57d..000000000000 --- a/assets/js/64c7e1cc.f47c31fe.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8727],{23001:(t,e,n)=>{n.r(e),n.d(e,{assets:()=>d,contentTitle:()=>a,default:()=>u,frontMatter:()=>r,metadata:()=>s,toc:()=>l});var i=n(74848),o=n(28453);const r={id:"build-integration",title:"Polkadot Integration Guide",sidebar_label:"Integration Initiation",description:"Reference point for the Polkadot integration guides.",keywords:["protocol","integration","structure"],slug:"../build-integration"},a=void 0,s={id:"build/build-integration",title:"Polkadot Integration Guide",description:"Reference point for the Polkadot integration guides.",source:"@site/../docs/build/build-integration.md",sourceDirName:"build",slug:"/build-integration",permalink:"/docs/build-integration",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/build/build-integration.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1726729589e3,frontMatter:{id:"build-integration",title:"Polkadot Integration Guide",sidebar_label:"Integration Initiation",description:"Reference point for the Polkadot integration guides.",keywords:["protocol","integration","structure"],slug:"../build-integration"},sidebar:"docs",previous:{title:"Transaction Construction",permalink:"/docs/build-transaction-construction"},next:{title:"Node Management",permalink:"/docs/build-node-management"}},d={},l=[{value:"Structure",id:"structure",level:2},{value:"Recommendation",id:"recommendation",level:2}];function c(t){const e={a:"a",h2:"h2",li:"li",ol:"ol",p:"p",...(0,o.R)(),...t.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(e.p,{children:"Welcome to the Polkadot integration guide. This guide will provide all the information you need to\nget started on your integration. The target audiences for this guide are wallets and custodians, but\nit will be useful to any infrastructure provider such as validators or chain indexers."}),"\n",(0,i.jsx)(e.h2,{id:"structure",children:"Structure"}),"\n",(0,i.jsx)(e.p,{children:"The guide focuses on Polkadot and Kusama, but the principles will apply to parachains and other\nSubstrate-based chains. The guide contains four sections:"}),"\n",(0,i.jsxs)(e.ol,{children:["\n",(0,i.jsxs)(e.li,{children:[(0,i.jsx)(e.a,{href:"/docs/build-protocol-info",children:"Protocol Info"}),": The entry point to the guide. Please read it carefully\nas it provides information about Polkadot that differentiates it from other blockchains. Use this\npage to check your assumptions."]}),"\n",(0,i.jsxs)(e.li,{children:[(0,i.jsx)(e.a,{href:"/docs/build-integrate-assets",children:"Assets"}),": The guide to integrating assets on Polkadot into your\nsystems."]}),"\n",(0,i.jsxs)(e.li,{children:[(0,i.jsx)(e.a,{href:"/docs/build-node-management",children:"Node Management"}),": This page will guide you to starting and monitoring\na node."]}),"\n",(0,i.jsxs)(e.li,{children:[(0,i.jsx)(e.a,{href:"/docs/build-node-interaction",children:"Node Interaction"}),": This page will teach you to interact with your\nnode via multiple RPC tooling options."]}),"\n",(0,i.jsxs)(e.li,{children:[(0,i.jsx)(e.a,{href:"/docs/build-transaction-construction",children:"Transaction Construction"}),": A guide to transaction\nconstruction, signing, decoding, and serialization using several available tools."]}),"\n"]}),"\n",(0,i.jsx)(e.h2,{id:"recommendation",children:"Recommendation"}),"\n",(0,i.jsx)(e.p,{children:"Each page in the guide, especially the Node Interaction and Transaction Construction pages, tries to\nlist several options to accomplish the same thing. We want you to know your options and choose the\nsolution that is best for you."}),"\n",(0,i.jsxs)(e.p,{children:["That said, the easiest path to integration is almost always to use\n",(0,i.jsx)(e.a,{href:"https://github.com/paritytech/substrate-api-sidecar",children:"Substrate API Sidecar"})," to interact with your\nnode and ",(0,i.jsx)(e.a,{href:"https://github.com/paritytech/txwrapper-core/",children:"TxWrapper Core"})," to construct and sign\ntransactions. Parity and Web3 Foundation will be able to provide the best support if you use these\ntools."]}),"\n",(0,i.jsxs)(e.p,{children:["If your team would like support, join some of our ",(0,i.jsx)(e.a,{href:"/docs/community",children:"community channels"})," or\ncontact ",(0,i.jsx)(e.a,{href:"mailto:support@polkadot.network",children:"support@polkadot.network"}),"."]})]})}function u(t={}){const{wrapper:e}={...(0,o.R)(),...t.components};return e?(0,i.jsx)(e,{...t,children:(0,i.jsx)(c,{...t})}):c(t)}},28453:(t,e,n)=>{n.d(e,{R:()=>a,x:()=>s});var i=n(96540);const o={},r=i.createContext(o);function a(t){const e=i.useContext(r);return i.useMemo((function(){return"function"==typeof t?t(e):{...e,...t}}),[e,t])}function s(t){let e;return e=t.disableParentContext?"function"==typeof t.components?t.components(o):t.components||o:a(t.components),i.createElement(r.Provider,{value:e},t.children)}}}]); \ No newline at end of file diff --git a/assets/js/6544ec02.5fa324f8.js b/assets/js/6544ec02.5fa324f8.js deleted file mode 100644 index 6d200120fe69..000000000000 --- a/assets/js/6544ec02.5fa324f8.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9786],{49019:(e,o,t)=>{t.r(o),t.d(o,{assets:()=>l,contentTitle:()=>i,default:()=>c,frontMatter:()=>r,metadata:()=>s,toc:()=>p});var a=t(74848),n=t(28453);const r={id:"alpha-program",title:"Polkadot Alpha Program",sidebar_label:"Alpha Program",description:"The Polkadot Alpha Program and How it can Support your Development.",slug:"../alpha-program"},i=void 0,s={id:"general/alpha-program",title:"Polkadot Alpha Program",description:"The Polkadot Alpha Program and How it can Support your Development.",source:"@site/../docs/general/alpha-program.md",sourceDirName:"general",slug:"/alpha-program",permalink:"/docs/alpha-program",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/alpha-program.md",tags:[],version:"current",lastUpdatedBy:"github-actions[bot]",lastUpdatedAt:1727681037e3,frontMatter:{id:"alpha-program",title:"Polkadot Alpha Program",sidebar_label:"Alpha Program",description:"The Polkadot Alpha Program and How it can Support your Development.",slug:"../alpha-program"},sidebar:"docs",previous:{title:"Polkadot Ambassadors",permalink:"/docs/ambassadors"},next:{title:"Thousand Validators",permalink:"/docs/thousand-validators"}},l={},p=[{value:"Who can join the program?",id:"who-can-join-the-program",level:2},{value:"Why join the Polkadot Alpha Program?",id:"why-join-the-polkadot-alpha-program",level:2}];function d(e){const o={a:"a",h2:"h2",li:"li",p:"p",strong:"strong",ul:"ul",...(0,n.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(o.p,{children:["Over 150 projects are using the ",(0,a.jsx)(o.a,{href:"https://github.com/paritytech/polkadot-sdk",children:"Polkadot SDK"})," to create\nthe next generation of blockchain infrastructure and application-specific chains."]}),"\n",(0,a.jsxs)(o.p,{children:["The ",(0,a.jsx)(o.a,{href:"https://polkadot.com/alpha-program",children:"Polkadot Alpha Program"})," is an initiative by Parity\nTechnologies to take your Polkadot SDK-powered project to the next level."]}),"\n",(0,a.jsx)(o.p,{children:"Take your project from idea to market with comprehensive resources and collaborative development\nwhile seizing the opportunity to shape the future of the Polkadot ecosystem."}),"\n",(0,a.jsx)(o.h2,{id:"who-can-join-the-program",children:"Who can join the program?"}),"\n",(0,a.jsx)(o.p,{children:"The Polkadot Alpha Program is for teams with a project they want to take into production and\nbusiness execution. If your team is working on something that\u2019s not yet live, and you are ready to\nexperiment while receiving and providing feedback, get involved now."}),"\n",(0,a.jsxs)(o.ul,{children:["\n",(0,a.jsxs)(o.li,{children:["\n",(0,a.jsxs)(o.p,{children:[(0,a.jsx)(o.strong,{children:"Parachain teams"})," - Focused on developing new chains or products within the Polkadot network,\naiming to transition from prototypes to fully operational parachains and accessing coretime."]}),"\n"]}),"\n",(0,a.jsxs)(o.li,{children:["\n",(0,a.jsxs)(o.p,{children:[(0,a.jsx)(o.strong,{children:"Infrastructure providers"})," - Dedicated to enhancing the ecosystem's underlying architecture,\nincluding node services, security solutions, API interfaces, and testing for robustness and\nintegration."]}),"\n"]}),"\n",(0,a.jsxs)(o.li,{children:["\n",(0,a.jsxs)(o.p,{children:[(0,a.jsx)(o.strong,{children:"Dapp teams"})," - Engaged in exploring and validating innovative blockchain concepts, leveraging\nthe program's resources to refine and scale their ideas into viable projects."]}),"\n"]}),"\n"]}),"\n",(0,a.jsx)(o.h2,{id:"why-join-the-polkadot-alpha-program",children:"Why join the Polkadot Alpha Program?"}),"\n",(0,a.jsx)(o.p,{children:'The term "Alpha" comes from alpha testing, a form of pre-production testing and iteration of product\ndevelopment. The program aims to enable your team to tap into Polkadot\u2019s ecosystem of resources and\nbring your product into production while contributing to feedback for Polkadot\u2019s ecosystem.'}),"\n",(0,a.jsxs)(o.p,{children:["Check out the official ",(0,a.jsx)(o.a,{href:"https://polkadot.com/alpha-program",children:"Polkadot Alpha Program"})," site for more\ninformation and steps on how to apply."]})]})}function c(e={}){const{wrapper:o}={...(0,n.R)(),...e.components};return o?(0,a.jsx)(o,{...e,children:(0,a.jsx)(d,{...e})}):d(e)}},28453:(e,o,t)=>{t.d(o,{R:()=>i,x:()=>s});var a=t(96540);const n={},r=a.createContext(n);function i(e){const o=a.useContext(r);return a.useMemo((function(){return"function"==typeof e?e(o):{...o,...e}}),[o,e])}function s(e){let o;return o=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:i(e.components),a.createElement(r.Provider,{value:o},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/6544ec02.a44dd5c5.js b/assets/js/6544ec02.a44dd5c5.js new file mode 100644 index 000000000000..6ab77ef353a7 --- /dev/null +++ b/assets/js/6544ec02.a44dd5c5.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9786],{88232:(e,o,t)=>{t.r(o),t.d(o,{assets:()=>l,contentTitle:()=>s,default:()=>d,frontMatter:()=>i,metadata:()=>a,toc:()=>p});const a=JSON.parse('{"id":"general/alpha-program","title":"Polkadot Alpha Program","description":"The Polkadot Alpha Program and How it can Support your Development.","source":"@site/../docs/general/alpha-program.md","sourceDirName":"general","slug":"/alpha-program","permalink":"/docs/alpha-program","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/alpha-program.md","tags":[],"version":"current","lastUpdatedBy":"github-actions[bot]","lastUpdatedAt":1727681037000,"frontMatter":{"id":"alpha-program","title":"Polkadot Alpha Program","sidebar_label":"Alpha Program","description":"The Polkadot Alpha Program and How it can Support your Development.","slug":"../alpha-program"},"sidebar":"docs","previous":{"title":"Polkadot Ambassadors","permalink":"/docs/ambassadors"},"next":{"title":"Thousand Validators","permalink":"/docs/thousand-validators"}}');var n=t(74848),r=t(28453);const i={id:"alpha-program",title:"Polkadot Alpha Program",sidebar_label:"Alpha Program",description:"The Polkadot Alpha Program and How it can Support your Development.",slug:"../alpha-program"},s=void 0,l={},p=[{value:"Who can join the program?",id:"who-can-join-the-program",level:2},{value:"Why join the Polkadot Alpha Program?",id:"why-join-the-polkadot-alpha-program",level:2}];function c(e){const o={a:"a",h2:"h2",li:"li",p:"p",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(o.p,{children:["Over 150 projects are using the ",(0,n.jsx)(o.a,{href:"https://github.com/paritytech/polkadot-sdk",children:"Polkadot SDK"})," to create\nthe next generation of blockchain infrastructure and application-specific chains."]}),"\n",(0,n.jsxs)(o.p,{children:["The ",(0,n.jsx)(o.a,{href:"https://polkadot.com/alpha-program",children:"Polkadot Alpha Program"})," is an initiative by Parity\nTechnologies to take your Polkadot SDK-powered project to the next level."]}),"\n",(0,n.jsx)(o.p,{children:"Take your project from idea to market with comprehensive resources and collaborative development\nwhile seizing the opportunity to shape the future of the Polkadot ecosystem."}),"\n",(0,n.jsx)(o.h2,{id:"who-can-join-the-program",children:"Who can join the program?"}),"\n",(0,n.jsx)(o.p,{children:"The Polkadot Alpha Program is for teams with a project they want to take into production and\nbusiness execution. If your team is working on something that\u2019s not yet live, and you are ready to\nexperiment while receiving and providing feedback, get involved now."}),"\n",(0,n.jsxs)(o.ul,{children:["\n",(0,n.jsxs)(o.li,{children:["\n",(0,n.jsxs)(o.p,{children:[(0,n.jsx)(o.strong,{children:"Parachain teams"})," - Focused on developing new chains or products within the Polkadot network,\naiming to transition from prototypes to fully operational parachains and accessing coretime."]}),"\n"]}),"\n",(0,n.jsxs)(o.li,{children:["\n",(0,n.jsxs)(o.p,{children:[(0,n.jsx)(o.strong,{children:"Infrastructure providers"})," - Dedicated to enhancing the ecosystem's underlying architecture,\nincluding node services, security solutions, API interfaces, and testing for robustness and\nintegration."]}),"\n"]}),"\n",(0,n.jsxs)(o.li,{children:["\n",(0,n.jsxs)(o.p,{children:[(0,n.jsx)(o.strong,{children:"Dapp teams"})," - Engaged in exploring and validating innovative blockchain concepts, leveraging\nthe program's resources to refine and scale their ideas into viable projects."]}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(o.h2,{id:"why-join-the-polkadot-alpha-program",children:"Why join the Polkadot Alpha Program?"}),"\n",(0,n.jsx)(o.p,{children:'The term "Alpha" comes from alpha testing, a form of pre-production testing and iteration of product\ndevelopment. The program aims to enable your team to tap into Polkadot\u2019s ecosystem of resources and\nbring your product into production while contributing to feedback for Polkadot\u2019s ecosystem.'}),"\n",(0,n.jsxs)(o.p,{children:["Check out the official ",(0,n.jsx)(o.a,{href:"https://polkadot.com/alpha-program",children:"Polkadot Alpha Program"})," site for more\ninformation and steps on how to apply."]})]})}function d(e={}){const{wrapper:o}={...(0,r.R)(),...e.components};return o?(0,n.jsx)(o,{...e,children:(0,n.jsx)(c,{...e})}):c(e)}},28453:(e,o,t)=>{t.d(o,{R:()=>i,x:()=>s});var a=t(96540);const n={},r=a.createContext(n);function i(e){const o=a.useContext(r);return a.useMemo((function(){return"function"==typeof e?e(o):{...o,...e}}),[o,e])}function s(e){let o;return o=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:i(e.components),a.createElement(r.Provider,{value:o},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/6625.86efcc2f.js b/assets/js/6625.86efcc2f.js deleted file mode 100644 index 3b92950ccd4d..000000000000 --- a/assets/js/6625.86efcc2f.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6625],{75937:(e,t,i)=>{i.d(t,{A:()=>r});var s=i(72453),n=i(74886);const r=(e,t)=>s.A.lang.round(n.A.parse(e)[t])},50053:(e,t,i)=>{i.d(t,{A:()=>n});var s=i(91641);const n=function(e){return(0,s.A)(e,4)}},56625:(e,t,i)=>{i.d(t,{diagram:()=>K});var s,n,r=i(86079),l=i(50053),o=i(75937),a=i(25582),c=i(88146),h=i(697),u=i(26312),d=(i(74353),i(16750),i(42838),function(){var e=function(e,t,i,s){for(i=i||{},s=e.length;s--;i[e[s]]=t);return i},t=[1,7],i=[1,13],s=[1,14],n=[1,15],r=[1,19],l=[1,16],o=[1,17],a=[1,18],c=[8,30],h=[8,21,28,29,30,31,32,40,44,47],u=[1,23],d=[1,24],g=[8,15,16,21,28,29,30,31,32,40,44,47],y=[8,15,16,21,27,28,29,30,31,32,40,44,47],p=[1,49],b={trace:function(){},yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,block:31,NODE_ID:32,nodeShapeNLabel:33,dirList:34,DIR:35,NODE_DSTART:36,NODE_DEND:37,BLOCK_ARROW_START:38,BLOCK_ARROW_END:39,classDef:40,CLASSDEF_ID:41,CLASSDEF_STYLEOPTS:42,DEFAULT:43,class:44,CLASSENTITY_IDS:45,STYLECLASS:46,style:47,STYLE_ENTITY_IDS:48,STYLE_DEFINITION_DATA:49,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"block",32:"NODE_ID",35:"DIR",36:"NODE_DSTART",37:"NODE_DEND",38:"BLOCK_ARROW_START",39:"BLOCK_ARROW_END",40:"classDef",41:"CLASSDEF_ID",42:"CLASSDEF_STYLEOPTS",43:"DEFAULT",44:"class",45:"CLASSENTITY_IDS",46:"STYLECLASS",47:"style",48:"STYLE_ENTITY_IDS",49:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[34,1],[34,2],[33,3],[33,4],[23,3],[23,3],[24,3],[25,3]],performAction:function(e,t,i,s,n,r,l){var o=r.length-1;switch(n){case 4:s.getLogger().debug("Rule: separator (NL) ");break;case 5:s.getLogger().debug("Rule: separator (Space) ");break;case 6:s.getLogger().debug("Rule: separator (EOF) ");break;case 7:s.getLogger().debug("Rule: hierarchy: ",r[o-1]),s.setHierarchy(r[o-1]);break;case 8:s.getLogger().debug("Stop NL ");break;case 9:s.getLogger().debug("Stop EOF ");break;case 10:s.getLogger().debug("Stop NL2 ");break;case 11:s.getLogger().debug("Stop EOF2 ");break;case 12:s.getLogger().debug("Rule: statement: ",r[o]),"number"==typeof r[o].length?this.$=r[o]:this.$=[r[o]];break;case 13:s.getLogger().debug("Rule: statement #2: ",r[o-1]),this.$=[r[o-1]].concat(r[o]);break;case 14:s.getLogger().debug("Rule: link: ",r[o],e),this.$={edgeTypeStr:r[o],label:""};break;case 15:s.getLogger().debug("Rule: LABEL link: ",r[o-3],r[o-1],r[o]),this.$={edgeTypeStr:r[o],label:r[o-1]};break;case 18:const t=parseInt(r[o]),i=s.generateId();this.$={id:i,type:"space",label:"",width:t,children:[]};break;case 23:s.getLogger().debug("Rule: (nodeStatement link node) ",r[o-2],r[o-1],r[o]," typestr: ",r[o-1].edgeTypeStr);const n=s.edgeStrToEdgeData(r[o-1].edgeTypeStr);this.$=[{id:r[o-2].id,label:r[o-2].label,type:r[o-2].type,directions:r[o-2].directions},{id:r[o-2].id+"-"+r[o].id,start:r[o-2].id,end:r[o].id,label:r[o-1].label,type:"edge",directions:r[o].directions,arrowTypeEnd:n,arrowTypeStart:"arrow_open"},{id:r[o].id,label:r[o].label,type:s.typeStr2Type(r[o].typeStr),directions:r[o].directions}];break;case 24:s.getLogger().debug("Rule: nodeStatement (abc88 node size) ",r[o-1],r[o]),this.$={id:r[o-1].id,label:r[o-1].label,type:s.typeStr2Type(r[o-1].typeStr),directions:r[o-1].directions,widthInColumns:parseInt(r[o],10)};break;case 25:s.getLogger().debug("Rule: nodeStatement (node) ",r[o]),this.$={id:r[o].id,label:r[o].label,type:s.typeStr2Type(r[o].typeStr),directions:r[o].directions,widthInColumns:1};break;case 26:s.getLogger().debug("APA123",this?this:"na"),s.getLogger().debug("COLUMNS: ",r[o]),this.$={type:"column-setting",columns:"auto"===r[o]?-1:parseInt(r[o])};break;case 27:s.getLogger().debug("Rule: id-block statement : ",r[o-2],r[o-1]),s.generateId(),this.$={...r[o-2],type:"composite",children:r[o-1]};break;case 28:s.getLogger().debug("Rule: blockStatement : ",r[o-2],r[o-1],r[o]);const l=s.generateId();this.$={id:l,type:"composite",label:"",children:r[o-1]};break;case 29:s.getLogger().debug("Rule: node (NODE_ID separator): ",r[o]),this.$={id:r[o]};break;case 30:s.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",r[o-1],r[o]),this.$={id:r[o-1],label:r[o].label,typeStr:r[o].typeStr,directions:r[o].directions};break;case 31:s.getLogger().debug("Rule: dirList: ",r[o]),this.$=[r[o]];break;case 32:s.getLogger().debug("Rule: dirList: ",r[o-1],r[o]),this.$=[r[o-1]].concat(r[o]);break;case 33:s.getLogger().debug("Rule: nodeShapeNLabel: ",r[o-2],r[o-1],r[o]),this.$={typeStr:r[o-2]+r[o],label:r[o-1]};break;case 34:s.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",r[o-3],r[o-2]," #3:",r[o-1],r[o]),this.$={typeStr:r[o-3]+r[o],label:r[o-2],directions:r[o-1]};break;case 35:case 36:this.$={type:"classDef",id:r[o-1].trim(),css:r[o].trim()};break;case 37:this.$={type:"applyClass",id:r[o-1].trim(),styleClass:r[o].trim()};break;case 38:this.$={type:"applyStyles",id:r[o-1].trim(),stylesStr:r[o].trim()}}},table:[{9:1,10:[1,2]},{1:[3]},{11:3,13:4,19:5,20:6,21:t,22:8,23:9,24:10,25:11,26:12,28:i,29:s,31:n,32:r,40:l,44:o,47:a},{8:[1,20]},e(c,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,21:t,28:i,29:s,31:n,32:r,40:l,44:o,47:a}),e(h,[2,16],{14:22,15:u,16:d}),e(h,[2,17]),e(h,[2,18]),e(h,[2,19]),e(h,[2,20]),e(h,[2,21]),e(h,[2,22]),e(g,[2,25],{27:[1,25]}),e(h,[2,26]),{19:26,26:12,32:r},{11:27,13:4,19:5,20:6,21:t,22:8,23:9,24:10,25:11,26:12,28:i,29:s,31:n,32:r,40:l,44:o,47:a},{41:[1,28],43:[1,29]},{45:[1,30]},{48:[1,31]},e(y,[2,29],{33:32,36:[1,33],38:[1,34]}),{1:[2,7]},e(c,[2,13]),{26:35,32:r},{32:[2,14]},{17:[1,36]},e(g,[2,24]),{11:37,13:4,14:22,15:u,16:d,19:5,20:6,21:t,22:8,23:9,24:10,25:11,26:12,28:i,29:s,31:n,32:r,40:l,44:o,47:a},{30:[1,38]},{42:[1,39]},{42:[1,40]},{46:[1,41]},{49:[1,42]},e(y,[2,30]),{18:[1,43]},{18:[1,44]},e(g,[2,23]),{18:[1,45]},{30:[1,46]},e(h,[2,28]),e(h,[2,35]),e(h,[2,36]),e(h,[2,37]),e(h,[2,38]),{37:[1,47]},{34:48,35:p},{15:[1,50]},e(h,[2,27]),e(y,[2,33]),{39:[1,51]},{34:52,35:p,39:[2,31]},{32:[2,15]},e(y,[2,34]),{39:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:function(e,t){if(!t.recoverable){var i=new Error(e);throw i.hash=t,i}this.trace(e)},parse:function(e){var t=this,i=[0],s=[],n=[null],r=[],l=this.table,o="",a=0,c=0,h=r.slice.call(arguments,1),u=Object.create(this.lexer),d={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(d.yy[g]=this.yy[g]);u.setInput(e,d.yy),d.yy.lexer=u,d.yy.parser=this,void 0===u.yylloc&&(u.yylloc={});var y=u.yylloc;r.push(y);var p=u.options&&u.options.ranges;"function"==typeof d.yy.parseError?this.parseError=d.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var b,x,L,S,f,m,_,k,E,w={};;){if(x=i[i.length-1],this.defaultActions[x]?L=this.defaultActions[x]:(null==b&&(E=void 0,"number"!=typeof(E=s.pop()||u.lex()||1)&&(E instanceof Array&&(E=(s=E).pop()),E=t.symbols_[E]||E),b=E),L=l[x]&&l[x][b]),void 0===L||!L.length||!L[0]){var v="";for(f in k=[],l[x])this.terminals_[f]&&f>2&&k.push("'"+this.terminals_[f]+"'");v=u.showPosition?"Parse error on line "+(a+1)+":\n"+u.showPosition()+"\nExpecting "+k.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(a+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(v,{text:u.match,token:this.terminals_[b]||b,line:u.yylineno,loc:y,expected:k})}if(L[0]instanceof Array&&L.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+b);switch(L[0]){case 1:i.push(b),n.push(u.yytext),r.push(u.yylloc),i.push(L[1]),b=null,c=u.yyleng,o=u.yytext,a=u.yylineno,y=u.yylloc;break;case 2:if(m=this.productions_[L[1]][1],w.$=n[n.length-m],w._$={first_line:r[r.length-(m||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(m||1)].first_column,last_column:r[r.length-1].last_column},p&&(w._$.range=[r[r.length-(m||1)].range[0],r[r.length-1].range[1]]),void 0!==(S=this.performAction.apply(w,[o,c,a,d.yy,L[1],n,r].concat(h))))return S;m&&(i=i.slice(0,-1*m*2),n=n.slice(0,-1*m),r=r.slice(0,-1*m)),i.push(this.productions_[L[1]][0]),n.push(w.$),r.push(w._$),_=l[i[i.length-2]][i[i.length-1]],i.push(_);break;case 3:return!0}}return!0}},x={EOF:1,parseError:function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},setInput:function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},unput:function(e){var t=e.length,i=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var s=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),i.length-1&&(this.yylineno-=i.length-1);var n=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:i?(i.length===s.length?this.yylloc.first_column:0)+s[s.length-i.length].length-i[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(e){this.unput(this.match.slice(e))},pastInput:function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},test_match:function(e,t){var i,s,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(n.yylloc.range=this.yylloc.range.slice(0))),(s=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=s.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:s?s[s.length-1].length-s[s.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],i=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack){for(var r in n)this[r]=n[r];return!1}return!1},next:function(){if(this.done)return this.EOF;var e,t,i,s;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),r=0;rt[0].length)){if(t=i,s=r,this.options.backtrack_lexer){if(!1!==(e=this.test_match(i,n[r])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,n[s]))&&e:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var e=this.next();return e||this.lex()},begin:function(e){this.conditionStack.push(e)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(e){return(e=this.conditionStack.length-1-Math.abs(e||0))>=0?this.conditionStack[e]:"INITIAL"},pushState:function(e){this.begin(e)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(e,t,i,s){switch(i){case 0:return 10;case 1:return e.getLogger().debug("Found space-block"),31;case 2:return e.getLogger().debug("Found nl-block"),31;case 3:return e.getLogger().debug("Found space-block"),29;case 4:e.getLogger().debug(".",t.yytext);break;case 5:e.getLogger().debug("_",t.yytext);break;case 6:return 5;case 7:return t.yytext=-1,28;case 8:return t.yytext=t.yytext.replace(/columns\s+/,""),e.getLogger().debug("COLUMNS (LEX)",t.yytext),28;case 9:case 77:case 78:case 100:this.pushState("md_string");break;case 10:return"MD_STR";case 11:case 35:case 80:this.popState();break;case 12:this.pushState("string");break;case 13:e.getLogger().debug("LEX: POPPING STR:",t.yytext),this.popState();break;case 14:return e.getLogger().debug("LEX: STR end:",t.yytext),"STR";case 15:return t.yytext=t.yytext.replace(/space\:/,""),e.getLogger().debug("SPACE NUM (LEX)",t.yytext),21;case 16:return t.yytext="1",e.getLogger().debug("COLUMNS (LEX)",t.yytext),21;case 17:return 43;case 18:return"LINKSTYLE";case 19:return"INTERPOLATE";case 20:return this.pushState("CLASSDEF"),40;case 21:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 22:return this.popState(),this.pushState("CLASSDEFID"),41;case 23:return this.popState(),42;case 24:return this.pushState("CLASS"),44;case 25:return this.popState(),this.pushState("CLASS_STYLE"),45;case 26:return this.popState(),46;case 27:return this.pushState("STYLE_STMNT"),47;case 28:return this.popState(),this.pushState("STYLE_DEFINITION"),48;case 29:return this.popState(),49;case 30:return this.pushState("acc_title"),"acc_title";case 31:return this.popState(),"acc_title_value";case 32:return this.pushState("acc_descr"),"acc_descr";case 33:return this.popState(),"acc_descr_value";case 34:this.pushState("acc_descr_multiline");break;case 36:return"acc_descr_multiline_value";case 37:return 30;case 38:case 39:case 41:case 42:case 45:return this.popState(),e.getLogger().debug("Lex: (("),"NODE_DEND";case 40:return this.popState(),e.getLogger().debug("Lex: ))"),"NODE_DEND";case 43:return this.popState(),e.getLogger().debug("Lex: (-"),"NODE_DEND";case 44:return this.popState(),e.getLogger().debug("Lex: -)"),"NODE_DEND";case 46:return this.popState(),e.getLogger().debug("Lex: ]]"),"NODE_DEND";case 47:return this.popState(),e.getLogger().debug("Lex: ("),"NODE_DEND";case 48:return this.popState(),e.getLogger().debug("Lex: ])"),"NODE_DEND";case 49:case 50:return this.popState(),e.getLogger().debug("Lex: /]"),"NODE_DEND";case 51:return this.popState(),e.getLogger().debug("Lex: )]"),"NODE_DEND";case 52:return this.popState(),e.getLogger().debug("Lex: )"),"NODE_DEND";case 53:return this.popState(),e.getLogger().debug("Lex: ]>"),"NODE_DEND";case 54:return this.popState(),e.getLogger().debug("Lex: ]"),"NODE_DEND";case 55:return e.getLogger().debug("Lexa: -)"),this.pushState("NODE"),36;case 56:return e.getLogger().debug("Lexa: (-"),this.pushState("NODE"),36;case 57:return e.getLogger().debug("Lexa: ))"),this.pushState("NODE"),36;case 58:case 60:case 61:case 62:case 65:return e.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 59:return e.getLogger().debug("Lex: ((("),this.pushState("NODE"),36;case 63:return e.getLogger().debug("Lexc: >"),this.pushState("NODE"),36;case 64:return e.getLogger().debug("Lexa: (["),this.pushState("NODE"),36;case 66:case 67:case 68:case 69:case 70:case 71:case 72:return this.pushState("NODE"),36;case 73:return e.getLogger().debug("Lexa: ["),this.pushState("NODE"),36;case 74:return this.pushState("BLOCK_ARROW"),e.getLogger().debug("LEX ARR START"),38;case 75:return e.getLogger().debug("Lex: NODE_ID",t.yytext),32;case 76:return e.getLogger().debug("Lex: EOF",t.yytext),8;case 79:return"NODE_DESCR";case 81:e.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 82:e.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 83:return e.getLogger().debug("LEX: NODE_DESCR:",t.yytext),"NODE_DESCR";case 84:e.getLogger().debug("LEX POPPING"),this.popState();break;case 85:e.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 86:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (right): dir:",t.yytext),"DIR";case 87:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (left):",t.yytext),"DIR";case 88:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (x):",t.yytext),"DIR";case 89:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (y):",t.yytext),"DIR";case 90:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (up):",t.yytext),"DIR";case 91:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (down):",t.yytext),"DIR";case 92:return t.yytext="]>",e.getLogger().debug("Lex (ARROW_DIR end):",t.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";case 93:return e.getLogger().debug("Lex: LINK","#"+t.yytext+"#"),15;case 94:case 95:case 96:return e.getLogger().debug("Lex: LINK",t.yytext),15;case 97:case 98:case 99:return e.getLogger().debug("Lex: START_LINK",t.yytext),this.pushState("LLABEL"),16;case 101:return e.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";case 102:return this.popState(),e.getLogger().debug("Lex: LINK","#"+t.yytext+"#"),15;case 103:case 104:return this.popState(),e.getLogger().debug("Lex: LINK",t.yytext),15;case 105:return e.getLogger().debug("Lex: COLON",t.yytext),t.yytext=t.yytext.slice(1),27}},rules:[/^(?:block-beta\b)/,/^(?:block\s+)/,/^(?:block\n+)/,/^(?:block:)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[29],inclusive:!1},STYLE_STMNT:{rules:[28],inclusive:!1},CLASSDEFID:{rules:[23],inclusive:!1},CLASSDEF:{rules:[21,22],inclusive:!1},CLASS_STYLE:{rules:[26],inclusive:!1},CLASS:{rules:[25],inclusive:!1},LLABEL:{rules:[100,101,102,103,104],inclusive:!1},ARROW_DIR:{rules:[86,87,88,89,90,91,92],inclusive:!1},BLOCK_ARROW:{rules:[77,82,85],inclusive:!1},NODE:{rules:[38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,78,81],inclusive:!1},md_string:{rules:[10,11,79,80],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[13,14,83,84],inclusive:!1},acc_descr_multiline:{rules:[35,36],inclusive:!1},acc_descr:{rules:[33],inclusive:!1},acc_title:{rules:[31],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,12,15,16,17,18,19,20,24,27,30,32,34,37,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,93,94,95,96,97,98,99,105],inclusive:!0}}};function L(){this.yy={}}return b.lexer=x,L.prototype=b,b.Parser=L,new L}());d.parser=d;const g=d;let y={},p=[],b={};const x="color",L="fill",S=(0,r.c)();let f={};const m=function(e,t=""){void 0===f[e]&&(f[e]={id:e,styles:[],textStyles:[]});const i=f[e];null!=t&&t.split(",").forEach((e=>{const t=e.replace(/([^;]*);/,"$1").trim();if(e.match(x)){const e=t.replace(L,"bgFill").replace(x,L);i.textStyles.push(e)}i.styles.push(t)}))},_=function(e,t=""){const i=y[e];null!=t&&(i.styles=t.split(","))},k=function(e,t){e.split(",").forEach((function(e){let i=y[e];if(void 0===i){const t=e.trim();y[t]={id:t,type:"na",children:[]},i=y[t]}i.classes||(i.classes=[]),i.classes.push(t)}))},E=(e,t)=>{const i=e.flat(),s=[];for(const o of i)if(o.label&&(o.label=(n=o.label,r.e.sanitizeText(n,S))),"classDef"!==o.type)if("applyClass"!==o.type)if("applyStyles"!==o.type)if("column-setting"===o.type)t.columns=o.columns||-1;else if("edge"===o.type)b[o.id]?b[o.id]++:b[o.id]=1,o.id=b[o.id]+"-"+o.id,p.push(o);else{o.label||("composite"===o.type?o.label="":o.label=o.id);const e=!y[o.id];if(e?y[o.id]=o:("na"!==o.type&&(y[o.id].type=o.type),o.label!==o.id&&(y[o.id].label=o.label)),o.children&&E(o.children,o),"space"===o.type){const e=o.width||1;for(let t=0;t(0,r.F)().block,typeStr2Type:function(e){switch(r.l.debug("typeStr2Type",e),e){case"[]":return"square";case"()":return r.l.debug("we have a round"),"round";case"(())":return"circle";case">]":return"rect_left_inv_arrow";case"{}":return"diamond";case"{{}}":return"hexagon";case"([])":return"stadium";case"[[]]":return"subroutine";case"[()]":return"cylinder";case"((()))":return"doublecircle";case"[//]":return"lean_right";case"[\\\\]":return"lean_left";case"[/\\]":return"trapezoid";case"[\\/]":return"inv_trapezoid";case"<[]>":return"block_arrow";default:return"na"}},edgeTypeStr2Type:function(e){return r.l.debug("typeStr2Type",e),"=="===e?"thick":"normal"},edgeStrToEdgeData:function(e){switch(e.trim()){case"--x":return"arrow_cross";case"--o":return"arrow_circle";default:return"arrow_point"}},getLogger:()=>console,getBlocksFlat:()=>[...Object.values(y)],getBlocks:()=>w||[],getEdges:()=>p,setHierarchy:e=>{v.children=e,E(e,v),w=v.children},getBlock:e=>y[e],setBlock:e=>{y[e.id]=e},getColumns:e=>{const t=y[e];return t?t.columns?t.columns:t.children?t.children.length:-1:-1},getClasses:function(){return f},clear:()=>{r.l.debug("Clear called"),(0,r.v)(),v={id:"root",type:"composite",children:[],columns:-1},y={root:v},w=[],f={},p=[],b={}},generateId:()=>(D++,"id-"+Math.random().toString(36).substr(2,12)+"-"+D)},N=(e,t)=>{const i=o.A,s=i(e,"r"),n=i(e,"g"),r=i(e,"b");return a.A(s,n,r,t)},I=e=>`.label {\n font-family: ${e.fontFamily};\n color: ${e.nodeTextColor||e.textColor};\n }\n .cluster-label text {\n fill: ${e.titleColor};\n }\n .cluster-label span,p {\n color: ${e.titleColor};\n }\n\n\n\n .label text,span,p {\n fill: ${e.nodeTextColor||e.textColor};\n color: ${e.nodeTextColor||e.textColor};\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${e.mainBkg};\n stroke: ${e.nodeBorder};\n stroke-width: 1px;\n }\n .flowchart-label text {\n text-anchor: middle;\n }\n // .flowchart-label .text-outer-tspan {\n // text-anchor: middle;\n // }\n // .flowchart-label .text-inner-tspan {\n // text-anchor: start;\n // }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ${e.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${e.lineColor};\n stroke-width: 2.0px;\n }\n\n .flowchart-link {\n stroke: ${e.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${e.edgeLabelBackground};\n rect {\n opacity: 0.5;\n background-color: ${e.edgeLabelBackground};\n fill: ${e.edgeLabelBackground};\n }\n text-align: center;\n }\n\n /* For html labels only */\n .labelBkg {\n background-color: ${N(e.edgeLabelBackground,.5)};\n // background-color:\n }\n\n .node .cluster {\n // fill: ${N(e.mainBkg,.5)};\n fill: ${N(e.clusterBkg,.5)};\n stroke: ${N(e.clusterBorder,.2)};\n box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ${e.titleColor};\n }\n\n .cluster span,p {\n color: ${e.titleColor};\n }\n /* .cluster div {\n color: ${e.titleColor};\n } */\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ${e.fontFamily};\n font-size: 12px;\n background: ${e.tertiaryColor};\n border: 1px solid ${e.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .flowchartTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${e.textColor};\n }\n`;function T(e,t,i=!1){var s,n,l;const o=e;let a="default";((null==(s=null==o?void 0:o.classes)?void 0:s.length)||0)>0&&(a=((null==o?void 0:o.classes)||[]).join(" ")),a+=" flowchart-label";let c,h=0,u="";switch(o.type){case"round":h=5,u="rect";break;case"composite":h=0,u="composite",c=0;break;case"square":case"group":default:u="rect";break;case"diamond":u="question";break;case"hexagon":u="hexagon";break;case"block_arrow":u="block_arrow";break;case"odd":case"rect_left_inv_arrow":u="rect_left_inv_arrow";break;case"lean_right":u="lean_right";break;case"lean_left":u="lean_left";break;case"trapezoid":u="trapezoid";break;case"inv_trapezoid":u="inv_trapezoid";break;case"circle":u="circle";break;case"ellipse":u="ellipse";break;case"stadium":u="stadium";break;case"subroutine":u="subroutine";break;case"cylinder":u="cylinder";break;case"doublecircle":u="doublecircle"}const d=(0,r.k)((null==o?void 0:o.styles)||[]),g=o.label,y=o.size||{width:0,height:0,x:0,y:0};return{labelStyle:d.labelStyle,shape:u,labelText:g,rx:h,ry:h,class:a,style:d.style,id:o.id,directions:o.directions,width:y.width,height:y.height,x:y.x,y:y.y,positioned:i,intersect:void 0,type:o.type,padding:c??((null==(l=null==(n=(0,r.F)())?void 0:n.block)?void 0:l.padding)||0)}}async function z(e,t,i){const s=T(t,0,!1);if("group"===s.type)return;const n=await(0,c.e)(e,s),r=n.node().getBBox(),l=i.getBlock(s.id);l.size={width:r.width,height:r.height,x:0,y:0,node:n},i.setBlock(l),n.remove()}async function A(e,t,i){const s=T(t,0,!0);"space"!==i.getBlock(s.id).type&&(await(0,c.e)(e,s),t.intersect=null==s?void 0:s.intersect,(0,c.p)(s))}async function C(e,t,i,s){for(const n of t)await s(e,n,i),n.children&&await C(e,n.children,i,s)}const O=(null==(n=null==(s=(0,r.c)())?void 0:s.block)?void 0:n.padding)||8;function R(e,t){if(0===e||!Number.isInteger(e))throw new Error("Columns must be an integer !== 0.");if(t<0||!Number.isInteger(t))throw new Error("Position must be a non-negative integer."+t);if(e<0)return{px:t,py:0};if(1===e)return{px:0,py:t};return{px:t%e,py:Math.floor(t/e)}}function B(e,t,i=0,s=0){var n,l,o,a,c,h,u,d,g,y,p;r.l.debug("setBlockSizes abc95 (start)",e.id,null==(n=null==e?void 0:e.size)?void 0:n.x,"block width =",null==e?void 0:e.size,"sieblingWidth",i),(null==(l=null==e?void 0:e.size)?void 0:l.width)||(e.size={width:i,height:s,x:0,y:0});let b=0,x=0;if((null==(o=e.children)?void 0:o.length)>0){for(const i of e.children)B(i,t);const n=(e=>{let t=0,i=0;for(const s of e.children){const{width:n,height:l,x:o,y:a}=s.size||{width:0,height:0,x:0,y:0};r.l.debug("getMaxChildSize abc95 child:",s.id,"width:",n,"height:",l,"x:",o,"y:",a,s.type),"space"!==s.type&&(n>t&&(t=n/(e.widthInColumns||1)),l>i&&(i=l))}return{width:t,height:i}})(e);b=n.width,x=n.height,r.l.debug("setBlockSizes abc95 maxWidth of",e.id,":s children is ",b,x);for(const t of e.children)t.size&&(r.l.debug(`abc95 Setting size of children of ${e.id} id=${t.id} ${b} ${x} ${t.size}`),t.size.width=b*(t.widthInColumns||1)+O*((t.widthInColumns||1)-1),t.size.height=x,t.size.x=0,t.size.y=0,r.l.debug(`abc95 updating size of ${e.id} children child:${t.id} maxWidth:${b} maxHeight:${x}`));for(const i of e.children)B(i,t,b,x);const l=e.columns||-1;let o=0;for(const t of e.children)o+=t.widthInColumns||1;let d=e.children.length;l>0&&l0?Math.min(e.children.length,l):e.children.length;if(t>0){const i=(y-t*O-O)/t;r.l.debug("abc95 (growing to fit) width",e.id,y,null==(u=e.size)?void 0:u.width,i);for(const t of e.children)t.size&&(t.size.width=i)}}e.size={width:y,height:p,x:0,y:0}}r.l.debug("setBlockSizes abc94 (done)",e.id,null==(d=null==e?void 0:e.size)?void 0:d.x,null==(g=null==e?void 0:e.size)?void 0:g.width,null==(y=null==e?void 0:e.size)?void 0:y.y,null==(p=null==e?void 0:e.size)?void 0:p.height)}function F(e,t){var i,s,n,l,o,a,c,h,u,d,g,y,p,b,x,L,S;r.l.debug(`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${null==(i=null==e?void 0:e.size)?void 0:i.x} y: ${null==(s=null==e?void 0:e.size)?void 0:s.y} width: ${null==(n=null==e?void 0:e.size)?void 0:n.width}`);const f=e.columns||-1;if(r.l.debug("layoutBlocks columns abc95",e.id,"=>",f,e),e.children&&e.children.length>0){const t=(null==(o=null==(l=null==e?void 0:e.children[0])?void 0:l.size)?void 0:o.width)||0,i=e.children.length*t+(e.children.length-1)*O;r.l.debug("widthOfChildren 88",i,"posX");let s=0;r.l.debug("abc91 block?.size?.x",e.id,null==(a=null==e?void 0:e.size)?void 0:a.x);let n=(null==(c=null==e?void 0:e.size)?void 0:c.x)?(null==(h=null==e?void 0:e.size)?void 0:h.x)+(-(null==(u=null==e?void 0:e.size)?void 0:u.width)/2||0):-O,x=0;for(const l of e.children){const t=e;if(!l.size)continue;const{width:i,height:o}=l.size,{px:a,py:c}=R(f,s);if(c!=x&&(x=c,n=(null==(d=null==e?void 0:e.size)?void 0:d.x)?(null==(g=null==e?void 0:e.size)?void 0:g.x)+(-(null==(y=null==e?void 0:e.size)?void 0:y.width)/2||0):-O,r.l.debug("New row in layout for block",e.id," and child ",l.id,x)),r.l.debug(`abc89 layout blocks (child) id: ${l.id} Pos: ${s} (px, py) ${a},${c} (${null==(p=null==t?void 0:t.size)?void 0:p.x},${null==(b=null==t?void 0:t.size)?void 0:b.y}) parent: ${t.id} width: ${i}${O}`),t.size){const e=i/2;l.size.x=n+O+e,r.l.debug(`abc91 layout blocks (calc) px, pyid:${l.id} startingPos=X${n} new startingPosX${l.size.x} ${e} padding=${O} width=${i} halfWidth=${e} => x:${l.size.x} y:${l.size.y} ${l.widthInColumns} (width * (child?.w || 1)) / 2 ${i*((null==l?void 0:l.widthInColumns)||1)/2}`),n=l.size.x+e,l.size.y=t.size.y-t.size.height/2+c*(o+O)+o/2+O,r.l.debug(`abc88 layout blocks (calc) px, pyid:${l.id}startingPosX${n}${O}${e}=>x:${l.size.x}y:${l.size.y}${l.widthInColumns}(width * (child?.w || 1)) / 2${i*((null==l?void 0:l.widthInColumns)||1)/2}`)}l.children&&F(l),s+=(null==l?void 0:l.widthInColumns)||1,r.l.debug("abc88 columnsPos",l,s)}}r.l.debug(`layout blocks (<==layoutBlocks) ${e.id} x: ${null==(x=null==e?void 0:e.size)?void 0:x.x} y: ${null==(L=null==e?void 0:e.size)?void 0:L.y} width: ${null==(S=null==e?void 0:e.size)?void 0:S.width}`)}function P(e,{minX:t,minY:i,maxX:s,maxY:n}={minX:0,minY:0,maxX:0,maxY:0}){if(e.size&&"root"!==e.id){const{x:r,y:l,width:o,height:a}=e.size;r-o/2s&&(s=r+o/2),l+a/2>n&&(n=l+a/2)}if(e.children)for(const r of e.children)({minX:t,minY:i,maxX:s,maxY:n}=P(r,{minX:t,minY:i,maxX:s,maxY:n}));return{minX:t,minY:i,maxX:s,maxY:n}}function Y(e){const t=e.getBlock("root");if(!t)return;B(t,e,0,0),F(t),r.l.debug("getBlocks",JSON.stringify(t,null,2));const{minX:i,minY:s,maxX:n,maxY:l}=P(t);return{x:i,y:s,width:n-i,height:l-s}}const K={parser:g,db:$,renderer:{draw:async function(e,t,i,s){const{securityLevel:n,block:l}=(0,r.F)(),o=s.db;let a;"sandbox"===n&&(a=(0,u.Ltv)("#i"+t));const d="sandbox"===n?(0,u.Ltv)(a.nodes()[0].contentDocument.body):(0,u.Ltv)("body"),g="sandbox"===n?d.select(`[id="${t}"]`):(0,u.Ltv)(`[id="${t}"]`);(0,c.a)(g,["point","circle","cross"],s.type,t);const y=o.getBlocks(),p=o.getBlocksFlat(),b=o.getEdges(),x=g.insert("g").attr("class","block");await async function(e,t,i){await C(e,t,i,z)}(x,y,o);const L=Y(o);if(await async function(e,t,i){await C(e,t,i,A)}(x,y,o),await async function(e,t,i,s,n){const r=new h.T({multigraph:!0,compound:!0});r.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(const l of i)l.size&&r.setNode(l.id,{width:l.size.width,height:l.size.height,intersect:l.intersect});for(const l of t)if(l.start&&l.end){const t=s.getBlock(l.start),i=s.getBlock(l.end);if((null==t?void 0:t.size)&&(null==i?void 0:i.size)){const s=t.size,o=i.size,a=[{x:s.x,y:s.y},{x:s.x+(o.x-s.x)/2,y:s.y+(o.y-s.y)/2},{x:o.x,y:o.y}];await(0,c.h)(e,{v:l.start,w:l.end,name:l.id},{...l,arrowTypeEnd:l.arrowTypeEnd,arrowTypeStart:l.arrowTypeStart,points:a,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"},void 0,"block",r,n),l.label&&(await(0,c.f)(e,{...l,label:l.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:l.arrowTypeEnd,arrowTypeStart:l.arrowTypeStart,points:a,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"}),await(0,c.j)({...l,x:a[1].x,y:a[1].y},{originalPath:a}))}}}(x,b,p,o,t),L){const e=L,t=Math.max(1,Math.round(e.width/e.height*.125)),i=e.height+t+10,s=e.width+10,{useMaxWidth:n}=l;(0,r.i)(g,i,s,!!n),r.l.debug("Here Bounds",L,e),g.attr("viewBox",`${e.x-5} ${e.y-5} ${e.width+10} ${e.height+10}`)}(0,u.UMr)(u.zt)},getClasses:function(e,t){return t.db.getClasses()}},styles:I}}}]); \ No newline at end of file diff --git a/assets/js/6770.3f9a0fc9.js b/assets/js/6770.3f9a0fc9.js deleted file mode 100644 index 65b2067416b7..000000000000 --- a/assets/js/6770.3f9a0fc9.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6770],{86770:(t,e,a)=>{a.d(e,{diagram:()=>y});var r=a(21987),i=a(26312),n=a(21176),d=a(697),o=a(86079);a(74353),a(16750),a(42838);let s=0;const l=function(t){let e=t.id;return t.type&&(e+="<"+(0,o.x)(t.type)+">"),e},p=function(t,e,a,r){const{displayText:i,cssStyle:n}=e.getDisplayDetails(),d=t.append("tspan").attr("x",r.padding).text(i);""!==n&&d.attr("style",e.cssStyle),a||d.attr("dy",r.textHeight)},c=function(t,e,a,r){o.l.debug("Rendering class ",e,a);const i=e.id,n={id:i,label:e.id,width:0,height:0},d=t.append("g").attr("id",r.db.lookUpDomId(i)).attr("class","classGroup");let s;s=e.link?d.append("svg:a").attr("xlink:href",e.link).attr("target",e.linkTarget).append("text").attr("y",a.textHeight+a.padding).attr("x",0):d.append("text").attr("y",a.textHeight+a.padding).attr("x",0);let c=!0;e.annotations.forEach((function(t){const e=s.append("tspan").text("\xab"+t+"\xbb");c||e.attr("dy",a.textHeight),c=!1}));let g=l(e);const h=s.append("tspan").text(g).attr("class","title");c||h.attr("dy",a.textHeight);const f=s.node().getBBox().height;let x,u,y;if(e.members.length>0){x=d.append("line").attr("x1",0).attr("y1",a.padding+f+a.dividerMargin/2).attr("y2",a.padding+f+a.dividerMargin/2);const t=d.append("text").attr("x",a.padding).attr("y",f+a.dividerMargin+a.textHeight).attr("fill","white").attr("class","classText");c=!0,e.members.forEach((function(e){p(t,e,c,a),c=!1})),u=t.node().getBBox()}if(e.methods.length>0){y=d.append("line").attr("x1",0).attr("y1",a.padding+f+a.dividerMargin+u.height).attr("y2",a.padding+f+a.dividerMargin+u.height);const t=d.append("text").attr("x",a.padding).attr("y",f+2*a.dividerMargin+u.height+a.textHeight).attr("fill","white").attr("class","classText");c=!0,e.methods.forEach((function(e){p(t,e,c,a),c=!1}))}const b=d.node().getBBox();var m=" ";e.cssClasses.length>0&&(m+=e.cssClasses.join(" "));const k=d.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",b.width+2*a.padding).attr("height",b.height+a.padding+.5*a.dividerMargin).attr("class",m).node().getBBox().width;return s.node().childNodes.forEach((function(t){t.setAttribute("x",(k-t.getBBox().width)/2)})),e.tooltip&&s.insert("title").text(e.tooltip),x&&x.attr("x2",k),y&&y.attr("x2",k),n.width=k,n.height=b.height+a.padding+.5*a.dividerMargin,n},g=function(t,e,a,r,n){const d=function(t){switch(t){case n.db.relationType.AGGREGATION:return"aggregation";case n.db.relationType.EXTENSION:return"extension";case n.db.relationType.COMPOSITION:return"composition";case n.db.relationType.DEPENDENCY:return"dependency";case n.db.relationType.LOLLIPOP:return"lollipop"}};e.points=e.points.filter((t=>!Number.isNaN(t.y)));const l=e.points,p=(0,i.n8j)().x((function(t){return t.x})).y((function(t){return t.y})).curve(i.qrM),c=t.append("path").attr("d",p(l)).attr("id","edge"+s).attr("class","relation");let g,h,f="";r.arrowMarkerAbsolute&&(f=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,f=f.replace(/\(/g,"\\("),f=f.replace(/\)/g,"\\)")),1==a.relation.lineType&&c.attr("class","relation dashed-line"),10==a.relation.lineType&&c.attr("class","relation dotted-line"),"none"!==a.relation.type1&&c.attr("marker-start","url("+f+"#"+d(a.relation.type1)+"Start)"),"none"!==a.relation.type2&&c.attr("marker-end","url("+f+"#"+d(a.relation.type2)+"End)");const x=e.points.length;let u,y,b,m,k=o.u.calcLabelPosition(e.points);if(g=k.x,h=k.y,x%2!=0&&x>1){let t=o.u.calcCardinalityPosition("none"!==a.relation.type1,e.points,e.points[0]),r=o.u.calcCardinalityPosition("none"!==a.relation.type2,e.points,e.points[x-1]);o.l.debug("cardinality_1_point "+JSON.stringify(t)),o.l.debug("cardinality_2_point "+JSON.stringify(r)),u=t.x,y=t.y,b=r.x,m=r.y}if(void 0!==a.title){const e=t.append("g").attr("class","classLabel"),i=e.append("text").attr("class","label").attr("x",g).attr("y",h).attr("fill","red").attr("text-anchor","middle").text(a.title);window.label=i;const n=i.node().getBBox();e.insert("rect",":first-child").attr("class","box").attr("x",n.x-r.padding/2).attr("y",n.y-r.padding/2).attr("width",n.width+r.padding).attr("height",n.height+r.padding)}if(o.l.info("Rendering relation "+JSON.stringify(a)),void 0!==a.relationTitle1&&"none"!==a.relationTitle1){t.append("g").attr("class","cardinality").append("text").attr("class","type1").attr("x",u).attr("y",y).attr("fill","black").attr("font-size","6").text(a.relationTitle1)}if(void 0!==a.relationTitle2&&"none"!==a.relationTitle2){t.append("g").attr("class","cardinality").append("text").attr("class","type2").attr("x",b).attr("y",m).attr("fill","black").attr("font-size","6").text(a.relationTitle2)}s++},h=function(t,e,a,r){o.l.debug("Rendering note ",e,a);const i=e.id,n={id:i,text:e.text,width:0,height:0},d=t.append("g").attr("id",i).attr("class","classGroup");let s=d.append("text").attr("y",a.textHeight+a.padding).attr("x",0);const l=JSON.parse(`"${e.text}"`).split("\n");l.forEach((function(t){o.l.debug(`Adding line: ${t}`),s.append("tspan").text(t).attr("class","title").attr("dy",a.textHeight)}));const p=d.node().getBBox(),c=d.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",p.width+2*a.padding).attr("height",p.height+l.length*a.textHeight+a.padding+.5*a.dividerMargin).node().getBBox().width;return s.node().childNodes.forEach((function(t){t.setAttribute("x",(c-t.getBBox().width)/2)})),n.width=c,n.height=p.height+l.length*a.textHeight+a.padding+.5*a.dividerMargin,n};let f={};const x=function(t){const e=Object.entries(f).find((e=>e[1].label===t));if(e)return e[0]},u={draw:function(t,e,a,r){const s=(0,o.c)().class;f={},o.l.info("Rendering diagram "+t);const l=(0,o.c)().securityLevel;let p;"sandbox"===l&&(p=(0,i.Ltv)("#i"+e));const u="sandbox"===l?(0,i.Ltv)(p.nodes()[0].contentDocument.body):(0,i.Ltv)("body"),y=u.select(`[id='${e}']`);var b;(b=y).append("defs").append("marker").attr("id","extensionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),b.append("defs").append("marker").attr("id","extensionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),b.append("defs").append("marker").attr("id","compositionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),b.append("defs").append("marker").attr("id","compositionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),b.append("defs").append("marker").attr("id","aggregationStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),b.append("defs").append("marker").attr("id","aggregationEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),b.append("defs").append("marker").attr("id","dependencyStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),b.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z");const m=new d.T({multigraph:!0});m.setGraph({isMultiGraph:!0}),m.setDefaultEdgeLabel((function(){return{}}));const k=r.db.getClasses(),w=Object.keys(k);for(const i of w){const t=k[i],e=c(y,t,s,r);f[e.id]=e,m.setNode(e.id,e),o.l.info("Org height: "+e.height)}r.db.getRelations().forEach((function(t){o.l.info("tjoho"+x(t.id1)+x(t.id2)+JSON.stringify(t)),m.setEdge(x(t.id1),x(t.id2),{relation:t},t.title||"DEFAULT")}));r.db.getNotes().forEach((function(t){o.l.debug(`Adding note: ${JSON.stringify(t)}`);const e=h(y,t,s,r);f[e.id]=e,m.setNode(e.id,e),t.class&&t.class in k&&m.setEdge(t.id,x(t.class),{relation:{id1:t.id,id2:t.class,relation:{type1:"none",type2:"none",lineType:10}}},"DEFAULT")})),(0,n.Zp)(m),m.nodes().forEach((function(t){void 0!==t&&void 0!==m.node(t)&&(o.l.debug("Node "+t+": "+JSON.stringify(m.node(t))),u.select("#"+(r.db.lookUpDomId(t)||t)).attr("transform","translate("+(m.node(t).x-m.node(t).width/2)+","+(m.node(t).y-m.node(t).height/2)+" )"))})),m.edges().forEach((function(t){void 0!==t&&void 0!==m.edge(t)&&(o.l.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(m.edge(t))),g(y,m.edge(t),m.edge(t).relation,s,r))}));const L=y.node().getBBox(),v=L.width+40,E=L.height+40;(0,o.i)(y,E,v,s.useMaxWidth);const M=`${L.x-20} ${L.y-20} ${v} ${E}`;o.l.debug(`viewBox ${M}`),y.attr("viewBox",M)}},y={parser:r.p,db:r.d,renderer:u,styles:r.s,init:t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute,r.d.clear()}}}}]); \ No newline at end of file diff --git a/assets/js/6790.84f788f5.js b/assets/js/6790.84f788f5.js new file mode 100644 index 000000000000..9ff978cd3d6a --- /dev/null +++ b/assets/js/6790.84f788f5.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6790],{96790:(t,e,s)=>{s.d(e,{Lh:()=>ot,_$:()=>l,tM:()=>at,z2:()=>ut});var n=s(79972),i=s(79740),u=s(85039),a=s(45567),r=s(20007),o=function(){var t=(0,a.K2)((function(t,e,s,n){for(s=s||{},n=t.length;n--;s[t[n]]=e);return s}),"o"),e=[1,18],s=[1,19],n=[1,20],i=[1,41],u=[1,42],r=[1,26],o=[1,24],l=[1,25],c=[1,32],h=[1,33],p=[1,34],d=[1,45],A=[1,35],y=[1,36],g=[1,37],m=[1,38],C=[1,27],f=[1,28],E=[1,29],b=[1,30],k=[1,31],T=[1,44],D=[1,46],F=[1,43],B=[1,47],_=[1,9],S=[1,8,9],N=[1,58],L=[1,59],$=[1,60],x=[1,61],O=[1,62],v=[1,63],I=[1,64],K=[1,8,9,41],w=[1,76],R=[1,8,9,12,13,22,39,41,44,66,67,68,69,70,71,72,77,79],P=[1,8,9,12,13,17,20,22,39,41,44,48,58,66,67,68,69,70,71,72,77,79,84,99,101,102],M=[13,58,84,99,101,102],G=[13,58,71,72,84,99,101,102],U=[13,58,66,67,68,69,70,84,99,101,102],Y=[1,98],z=[1,115],Q=[1,107],W=[1,113],X=[1,108],j=[1,109],V=[1,110],q=[1,111],H=[1,112],J=[1,114],Z=[22,58,59,80,84,85,86,87,88,89],tt=[1,8,9,39,41,44],et=[1,8,9,22],st=[1,143],nt=[1,8,9,59],it=[1,8,9,22,58,59,80,84,85,86,87,88,89],ut={trace:(0,a.K2)((function(){}),"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,DOT:17,className:18,classLiteralName:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,classDefStatement:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,namespaceIdentifier:38,STRUCT_START:39,classStatements:40,STRUCT_STOP:41,NAMESPACE:42,classIdentifier:43,STYLE_SEPARATOR:44,members:45,CLASS:46,ANNOTATION_START:47,ANNOTATION_END:48,MEMBER:49,SEPARATOR:50,relation:51,NOTE_FOR:52,noteText:53,NOTE:54,CLASSDEF:55,classList:56,stylesOpt:57,ALPHA:58,COMMA:59,direction_tb:60,direction_bt:61,direction_rl:62,direction_lr:63,relationType:64,lineType:65,AGGREGATION:66,EXTENSION:67,COMPOSITION:68,DEPENDENCY:69,LOLLIPOP:70,LINE:71,DOTTED_LINE:72,CALLBACK:73,LINK:74,LINK_TARGET:75,CLICK:76,CALLBACK_NAME:77,CALLBACK_ARGS:78,HREF:79,STYLE:80,CSSCLASS:81,style:82,styleComponent:83,NUM:84,COLON:85,UNIT:86,SPACE:87,BRKT:88,PCT:89,commentToken:90,textToken:91,graphCodeTokens:92,textNoTagsToken:93,TAGSTART:94,TAGEND:95,"==":96,"--":97,DEFAULT:98,MINUS:99,keywords:100,UNICODE_TEXT:101,BQUOTE_STR:102,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",17:"DOT",20:"GENERICTYPE",22:"LABEL",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",39:"STRUCT_START",41:"STRUCT_STOP",42:"NAMESPACE",44:"STYLE_SEPARATOR",46:"CLASS",47:"ANNOTATION_START",48:"ANNOTATION_END",49:"MEMBER",50:"SEPARATOR",52:"NOTE_FOR",54:"NOTE",55:"CLASSDEF",58:"ALPHA",59:"COMMA",60:"direction_tb",61:"direction_bt",62:"direction_rl",63:"direction_lr",66:"AGGREGATION",67:"EXTENSION",68:"COMPOSITION",69:"DEPENDENCY",70:"LOLLIPOP",71:"LINE",72:"DOTTED_LINE",73:"CALLBACK",74:"LINK",75:"LINK_TARGET",76:"CLICK",77:"CALLBACK_NAME",78:"CALLBACK_ARGS",79:"HREF",80:"STYLE",81:"CSSCLASS",84:"NUM",85:"COLON",86:"UNIT",87:"SPACE",88:"BRKT",89:"PCT",92:"graphCodeTokens",94:"TAGSTART",95:"TAGEND",96:"==",97:"--",98:"DEFAULT",99:"MINUS",100:"keywords",101:"UNICODE_TEXT",102:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,3],[15,2],[18,1],[18,3],[18,1],[18,2],[18,2],[18,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[23,4],[23,5],[38,2],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,6],[43,2],[43,3],[26,4],[45,1],[45,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,3],[56,1],[56,3],[32,1],[32,1],[32,1],[32,1],[51,3],[51,2],[51,2],[51,1],[64,1],[64,1],[64,1],[64,1],[64,1],[65,1],[65,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[57,1],[57,3],[82,1],[82,2],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[90,1],[90,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[93,1],[93,1],[93,1],[93,1],[16,1],[16,1],[16,1],[16,1],[19,1],[53,1]],performAction:(0,a.K2)((function(t,e,s,n,i,u,a){var r=u.length-1;switch(i){case 8:this.$=u[r-1];break;case 9:case 12:case 14:this.$=u[r];break;case 10:case 13:this.$=u[r-2]+"."+u[r];break;case 11:case 15:case 95:this.$=u[r-1]+u[r];break;case 16:case 17:this.$=u[r-1]+"~"+u[r]+"~";break;case 18:n.addRelation(u[r]);break;case 19:u[r-1].title=n.cleanupLabel(u[r]),n.addRelation(u[r-1]);break;case 30:this.$=u[r].trim(),n.setAccTitle(this.$);break;case 31:case 32:this.$=u[r].trim(),n.setAccDescription(this.$);break;case 33:n.addClassesToNamespace(u[r-3],u[r-1]);break;case 34:n.addClassesToNamespace(u[r-4],u[r-1]);break;case 35:this.$=u[r],n.addNamespace(u[r]);break;case 36:case 46:case 59:case 92:this.$=[u[r]];break;case 37:this.$=[u[r-1]];break;case 38:u[r].unshift(u[r-2]),this.$=u[r];break;case 40:n.setCssClass(u[r-2],u[r]);break;case 41:n.addMembers(u[r-3],u[r-1]);break;case 42:n.setCssClass(u[r-5],u[r-3]),n.addMembers(u[r-5],u[r-1]);break;case 43:this.$=u[r],n.addClass(u[r]);break;case 44:this.$=u[r-1],n.addClass(u[r-1]),n.setClassLabel(u[r-1],u[r]);break;case 45:n.addAnnotation(u[r],u[r-2]);break;case 47:u[r].push(u[r-1]),this.$=u[r];break;case 48:case 50:case 51:break;case 49:n.addMember(u[r-1],n.cleanupLabel(u[r]));break;case 52:this.$={id1:u[r-2],id2:u[r],relation:u[r-1],relationTitle1:"none",relationTitle2:"none"};break;case 53:this.$={id1:u[r-3],id2:u[r],relation:u[r-1],relationTitle1:u[r-2],relationTitle2:"none"};break;case 54:this.$={id1:u[r-3],id2:u[r],relation:u[r-2],relationTitle1:"none",relationTitle2:u[r-1]};break;case 55:this.$={id1:u[r-4],id2:u[r],relation:u[r-2],relationTitle1:u[r-3],relationTitle2:u[r-1]};break;case 56:n.addNote(u[r],u[r-1]);break;case 57:n.addNote(u[r]);break;case 58:this.$=u[r-2],n.defineClass(u[r-1],u[r]);break;case 60:this.$=u[r-2].concat([u[r]]);break;case 61:n.setDirection("TB");break;case 62:n.setDirection("BT");break;case 63:n.setDirection("RL");break;case 64:n.setDirection("LR");break;case 65:this.$={type1:u[r-2],type2:u[r],lineType:u[r-1]};break;case 66:this.$={type1:"none",type2:u[r],lineType:u[r-1]};break;case 67:this.$={type1:u[r-1],type2:"none",lineType:u[r]};break;case 68:this.$={type1:"none",type2:"none",lineType:u[r]};break;case 69:this.$=n.relationType.AGGREGATION;break;case 70:this.$=n.relationType.EXTENSION;break;case 71:this.$=n.relationType.COMPOSITION;break;case 72:this.$=n.relationType.DEPENDENCY;break;case 73:this.$=n.relationType.LOLLIPOP;break;case 74:this.$=n.lineType.LINE;break;case 75:this.$=n.lineType.DOTTED_LINE;break;case 76:case 82:this.$=u[r-2],n.setClickEvent(u[r-1],u[r]);break;case 77:case 83:this.$=u[r-3],n.setClickEvent(u[r-2],u[r-1]),n.setTooltip(u[r-2],u[r]);break;case 78:this.$=u[r-2],n.setLink(u[r-1],u[r]);break;case 79:this.$=u[r-3],n.setLink(u[r-2],u[r-1],u[r]);break;case 80:this.$=u[r-3],n.setLink(u[r-2],u[r-1]),n.setTooltip(u[r-2],u[r]);break;case 81:this.$=u[r-4],n.setLink(u[r-3],u[r-2],u[r]),n.setTooltip(u[r-3],u[r-1]);break;case 84:this.$=u[r-3],n.setClickEvent(u[r-2],u[r-1],u[r]);break;case 85:this.$=u[r-4],n.setClickEvent(u[r-3],u[r-2],u[r-1]),n.setTooltip(u[r-3],u[r]);break;case 86:this.$=u[r-3],n.setLink(u[r-2],u[r]);break;case 87:this.$=u[r-4],n.setLink(u[r-3],u[r-1],u[r]);break;case 88:this.$=u[r-4],n.setLink(u[r-3],u[r-1]),n.setTooltip(u[r-3],u[r]);break;case 89:this.$=u[r-5],n.setLink(u[r-4],u[r-2],u[r]),n.setTooltip(u[r-4],u[r-1]);break;case 90:this.$=u[r-2],n.setCssStyle(u[r-1],u[r]);break;case 91:n.setCssClass(u[r-1],u[r]);break;case 93:u[r-2].push(u[r]),this.$=u[r-2]}}),"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,18:21,19:40,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:e,35:s,37:n,38:22,42:i,43:23,46:u,47:r,49:o,50:l,52:c,54:h,55:p,58:d,60:A,61:y,62:g,63:m,73:C,74:f,76:E,80:b,81:k,84:T,99:D,101:F,102:B},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},t(_,[2,5],{8:[1,48]}),{8:[1,49]},t(S,[2,18],{22:[1,50]}),t(S,[2,20]),t(S,[2,21]),t(S,[2,22]),t(S,[2,23]),t(S,[2,24]),t(S,[2,25]),t(S,[2,26]),t(S,[2,27]),t(S,[2,28]),t(S,[2,29]),{34:[1,51]},{36:[1,52]},t(S,[2,32]),t(S,[2,48],{51:53,64:56,65:57,13:[1,54],22:[1,55],66:N,67:L,68:$,69:x,70:O,71:v,72:I}),{39:[1,65]},t(K,[2,39],{39:[1,67],44:[1,66]}),t(S,[2,50]),t(S,[2,51]),{16:68,58:d,84:T,99:D,101:F},{16:39,18:69,19:40,58:d,84:T,99:D,101:F,102:B},{16:39,18:70,19:40,58:d,84:T,99:D,101:F,102:B},{16:39,18:71,19:40,58:d,84:T,99:D,101:F,102:B},{58:[1,72]},{13:[1,73]},{16:39,18:74,19:40,58:d,84:T,99:D,101:F,102:B},{13:w,53:75},{56:77,58:[1,78]},t(S,[2,61]),t(S,[2,62]),t(S,[2,63]),t(S,[2,64]),t(R,[2,12],{16:39,19:40,18:80,17:[1,79],20:[1,81],58:d,84:T,99:D,101:F,102:B}),t(R,[2,14],{20:[1,82]}),{15:83,16:84,58:d,84:T,99:D,101:F},{16:39,18:85,19:40,58:d,84:T,99:D,101:F,102:B},t(P,[2,118]),t(P,[2,119]),t(P,[2,120]),t(P,[2,121]),t([1,8,9,12,13,20,22,39,41,44,66,67,68,69,70,71,72,77,79],[2,122]),t(_,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,18:21,38:22,43:23,16:39,19:40,5:86,33:e,35:s,37:n,42:i,46:u,47:r,49:o,50:l,52:c,54:h,55:p,58:d,60:A,61:y,62:g,63:m,73:C,74:f,76:E,80:b,81:k,84:T,99:D,101:F,102:B}),{5:87,10:5,16:39,18:21,19:40,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:e,35:s,37:n,38:22,42:i,43:23,46:u,47:r,49:o,50:l,52:c,54:h,55:p,58:d,60:A,61:y,62:g,63:m,73:C,74:f,76:E,80:b,81:k,84:T,99:D,101:F,102:B},t(S,[2,19]),t(S,[2,30]),t(S,[2,31]),{13:[1,89],16:39,18:88,19:40,58:d,84:T,99:D,101:F,102:B},{51:90,64:56,65:57,66:N,67:L,68:$,69:x,70:O,71:v,72:I},t(S,[2,49]),{65:91,71:v,72:I},t(M,[2,68],{64:92,66:N,67:L,68:$,69:x,70:O}),t(G,[2,69]),t(G,[2,70]),t(G,[2,71]),t(G,[2,72]),t(G,[2,73]),t(U,[2,74]),t(U,[2,75]),{8:[1,94],24:95,40:93,43:23,46:u},{16:96,58:d,84:T,99:D,101:F},{45:97,49:Y},{48:[1,99]},{13:[1,100]},{13:[1,101]},{77:[1,102],79:[1,103]},{22:z,57:104,58:Q,80:W,82:105,83:106,84:X,85:j,86:V,87:q,88:H,89:J},{58:[1,116]},{13:w,53:117},t(S,[2,57]),t(S,[2,123]),{22:z,57:118,58:Q,59:[1,119],80:W,82:105,83:106,84:X,85:j,86:V,87:q,88:H,89:J},t(Z,[2,59]),{16:39,18:120,19:40,58:d,84:T,99:D,101:F,102:B},t(R,[2,15]),t(R,[2,16]),t(R,[2,17]),{39:[2,35]},{15:122,16:84,17:[1,121],39:[2,9],58:d,84:T,99:D,101:F},t(tt,[2,43],{11:123,12:[1,124]}),t(_,[2,7]),{9:[1,125]},t(et,[2,52]),{16:39,18:126,19:40,58:d,84:T,99:D,101:F,102:B},{13:[1,128],16:39,18:127,19:40,58:d,84:T,99:D,101:F,102:B},t(M,[2,67],{64:129,66:N,67:L,68:$,69:x,70:O}),t(M,[2,66]),{41:[1,130]},{24:95,40:131,43:23,46:u},{8:[1,132],41:[2,36]},t(K,[2,40],{39:[1,133]}),{41:[1,134]},{41:[2,46],45:135,49:Y},{16:39,18:136,19:40,58:d,84:T,99:D,101:F,102:B},t(S,[2,76],{13:[1,137]}),t(S,[2,78],{13:[1,139],75:[1,138]}),t(S,[2,82],{13:[1,140],78:[1,141]}),{13:[1,142]},t(S,[2,90],{59:st}),t(nt,[2,92],{83:144,22:z,58:Q,80:W,84:X,85:j,86:V,87:q,88:H,89:J}),t(it,[2,94]),t(it,[2,96]),t(it,[2,97]),t(it,[2,98]),t(it,[2,99]),t(it,[2,100]),t(it,[2,101]),t(it,[2,102]),t(it,[2,103]),t(it,[2,104]),t(S,[2,91]),t(S,[2,56]),t(S,[2,58],{59:st}),{58:[1,145]},t(R,[2,13]),{15:146,16:84,58:d,84:T,99:D,101:F},{39:[2,11]},t(tt,[2,44]),{13:[1,147]},{1:[2,4]},t(et,[2,54]),t(et,[2,53]),{16:39,18:148,19:40,58:d,84:T,99:D,101:F,102:B},t(M,[2,65]),t(S,[2,33]),{41:[1,149]},{24:95,40:150,41:[2,37],43:23,46:u},{45:151,49:Y},t(K,[2,41]),{41:[2,47]},t(S,[2,45]),t(S,[2,77]),t(S,[2,79]),t(S,[2,80],{75:[1,152]}),t(S,[2,83]),t(S,[2,84],{13:[1,153]}),t(S,[2,86],{13:[1,155],75:[1,154]}),{22:z,58:Q,80:W,82:156,83:106,84:X,85:j,86:V,87:q,88:H,89:J},t(it,[2,95]),t(Z,[2,60]),{39:[2,10]},{14:[1,157]},t(et,[2,55]),t(S,[2,34]),{41:[2,38]},{41:[1,158]},t(S,[2,81]),t(S,[2,85]),t(S,[2,87]),t(S,[2,88],{75:[1,159]}),t(nt,[2,93],{83:144,22:z,58:Q,80:W,84:X,85:j,86:V,87:q,88:H,89:J}),t(tt,[2,8]),t(K,[2,42]),t(S,[2,89])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],83:[2,35],122:[2,11],125:[2,4],135:[2,47],146:[2,10],150:[2,38]},parseError:(0,a.K2)((function(t,e){if(!e.recoverable){var s=new Error(t);throw s.hash=e,s}this.trace(t)}),"parseError"),parse:(0,a.K2)((function(t){var e=this,s=[0],n=[],i=[null],u=[],r=this.table,o="",l=0,c=0,h=0,p=u.slice.call(arguments,1),d=Object.create(this.lexer),A={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(A.yy[y]=this.yy[y]);d.setInput(t,A.yy),A.yy.lexer=d,A.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var g=d.yylloc;u.push(g);var m=d.options&&d.options.ranges;function C(){var t;return"number"!=typeof(t=n.pop()||d.lex()||1)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof A.yy.parseError?this.parseError=A.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,a.K2)((function(t){s.length=s.length-2*t,i.length=i.length-t,u.length=u.length-t}),"popStack"),(0,a.K2)(C,"lex");for(var f,E,b,k,T,D,F,B,_,S={};;){if(b=s[s.length-1],this.defaultActions[b]?k=this.defaultActions[b]:(null==f&&(f=C()),k=r[b]&&r[b][f]),void 0===k||!k.length||!k[0]){var N="";for(D in _=[],r[b])this.terminals_[D]&&D>2&&_.push("'"+this.terminals_[D]+"'");N=d.showPosition?"Parse error on line "+(l+1)+":\n"+d.showPosition()+"\nExpecting "+_.join(", ")+", got '"+(this.terminals_[f]||f)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==f?"end of input":"'"+(this.terminals_[f]||f)+"'"),this.parseError(N,{text:d.match,token:this.terminals_[f]||f,line:d.yylineno,loc:g,expected:_})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+f);switch(k[0]){case 1:s.push(f),i.push(d.yytext),u.push(d.yylloc),s.push(k[1]),f=null,E?(f=E,E=null):(c=d.yyleng,o=d.yytext,l=d.yylineno,g=d.yylloc,h>0&&h--);break;case 2:if(F=this.productions_[k[1]][1],S.$=i[i.length-F],S._$={first_line:u[u.length-(F||1)].first_line,last_line:u[u.length-1].last_line,first_column:u[u.length-(F||1)].first_column,last_column:u[u.length-1].last_column},m&&(S._$.range=[u[u.length-(F||1)].range[0],u[u.length-1].range[1]]),void 0!==(T=this.performAction.apply(S,[o,c,l,A.yy,k[1],i,u].concat(p))))return T;F&&(s=s.slice(0,-1*F*2),i=i.slice(0,-1*F),u=u.slice(0,-1*F)),s.push(this.productions_[k[1]][0]),i.push(S.$),u.push(S._$),B=r[s[s.length-2]][s[s.length-1]],s.push(B);break;case 3:return!0}}return!0}),"parse")},at=function(){return{EOF:1,parseError:(0,a.K2)((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:(0,a.K2)((function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this}),"setInput"),input:(0,a.K2)((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t}),"input"),unput:(0,a.K2)((function(t){var e=t.length,s=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),s.length-1&&(this.yylineno-=s.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:s?(s.length===n.length?this.yylloc.first_column:0)+n[n.length-s.length].length-s[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"unput"),more:(0,a.K2)((function(){return this._more=!0,this}),"more"),reject:(0,a.K2)((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:(0,a.K2)((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:(0,a.K2)((function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:(0,a.K2)((function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:(0,a.K2)((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:(0,a.K2)((function(t,e){var s,n,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],s=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack){for(var u in i)this[u]=i[u];return!1}return!1}),"test_match"),next:(0,a.K2)((function(){if(this.done)return this.EOF;var t,e,s,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),u=0;ue[0].length)){if(e=s,n=u,this.options.backtrack_lexer){if(!1!==(t=this.test_match(s,i[u])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:(0,a.K2)((function(){var t=this.next();return t||this.lex()}),"lex"),begin:(0,a.K2)((function(t){this.conditionStack.push(t)}),"begin"),popState:(0,a.K2)((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:(0,a.K2)((function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules}),"_currentRules"),topState:(0,a.K2)((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:(0,a.K2)((function(t){this.begin(t)}),"pushState"),stateStackSize:(0,a.K2)((function(){return this.conditionStack.length}),"stateStackSize"),options:{},performAction:(0,a.K2)((function(t,e,s,n){switch(s){case 0:return 60;case 1:return 61;case 2:return 62;case 3:return 63;case 4:case 5:case 14:case 31:case 36:case 40:case 47:break;case 6:return this.begin("acc_title"),33;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),35;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:case 19:case 22:case 24:case 58:case 61:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:case 35:return 8;case 15:case 16:return 7;case 17:case 37:case 45:return"EDGE_STATE";case 18:this.begin("callback_name");break;case 20:this.popState(),this.begin("callback_args");break;case 21:return 77;case 23:return 78;case 25:return"STR";case 26:this.begin("string");break;case 27:return 80;case 28:return 55;case 29:return this.begin("namespace"),42;case 30:case 39:return this.popState(),8;case 32:return this.begin("namespace-body"),39;case 33:case 43:return this.popState(),41;case 34:case 44:return"EOF_IN_STRUCT";case 38:return this.begin("class"),46;case 41:return this.popState(),this.popState(),41;case 42:return this.begin("class-body"),39;case 46:return"OPEN_IN_STRUCT";case 48:return"MEMBER";case 49:return 81;case 50:return 73;case 51:return 74;case 52:return 76;case 53:return 52;case 54:return 54;case 55:return 47;case 56:return 48;case 57:return 79;case 59:return"GENERICTYPE";case 60:this.begin("generic");break;case 62:return"BQUOTE_STR";case 63:this.begin("bqstring");break;case 64:case 65:case 66:case 67:return 75;case 68:case 69:return 67;case 70:case 71:return 69;case 72:return 68;case 73:return 66;case 74:return 70;case 75:return 71;case 76:return 72;case 77:return 22;case 78:return 44;case 79:return 99;case 80:return 17;case 81:return"PLUS";case 82:return 85;case 83:return 59;case 84:case 85:return 88;case 86:return 89;case 87:case 88:return"EQUALS";case 89:return 58;case 90:return 12;case 91:return 14;case 92:return"PUNCTUATION";case 93:return 84;case 94:return 101;case 95:case 96:return 87;case 97:return 9}}),"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:classDiagram-v2\b)/,/^(?:classDiagram\b)/,/^(?:\[\*\])/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:["])/,/^(?:[^"]*)/,/^(?:["])/,/^(?:style\b)/,/^(?:classDef\b)/,/^(?:namespace\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:\[\*\])/,/^(?:class\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[}])/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\[\*\])/,/^(?:[{])/,/^(?:[\n])/,/^(?:[^{}\n]*)/,/^(?:cssClass\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:click\b)/,/^(?:note for\b)/,/^(?:note\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:href\b)/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:~)/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:[`])/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:\s*\(\))/,/^(?:--)/,/^(?:\.\.)/,/^(?::{1}[^:\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?::)/,/^(?:,)/,/^(?:#)/,/^(?:#)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\w+)/,/^(?:\[)/,/^(?:\])/,/^(?:[!"#$%&'*+,-.`?\\/])/,/^(?:[0-9]+)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\s)/,/^(?:\s)/,/^(?:$)/],conditions:{"namespace-body":{rules:[26,33,34,35,36,37,38,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},namespace:{rules:[26,29,30,31,32,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},"class-body":{rules:[26,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},class:{rules:[26,39,40,41,42,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_descr_multiline:{rules:[11,12,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_descr:{rules:[9,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_title:{rules:[7,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},callback_args:{rules:[22,23,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},callback_name:{rules:[19,20,21,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},href:{rules:[26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},struct:{rules:[26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},generic:{rules:[26,49,50,51,52,53,54,55,56,57,58,59,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},bqstring:{rules:[26,49,50,51,52,53,54,55,56,57,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},string:{rules:[24,25,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,26,27,28,29,38,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97],inclusive:!0}}}}();function rt(){this.yy={}}return ut.lexer=at,(0,a.K2)(rt,"Parser"),rt.prototype=ut,ut.Parser=rt,new rt}();o.parser=o;var l=o,c=["#","+","~","-",""],h=class{static{(0,a.K2)(this,"ClassMember")}constructor(t,e){this.memberType=e,this.visibility="",this.classifier="",this.text="";const s=(0,a.jZ)(t,(0,a.D7)());this.parseMember(s)}getDisplayDetails(){let t=this.visibility+(0,a.QO)(this.id);"method"===this.memberType&&(t+=`(${(0,a.QO)(this.parameters.trim())})`,this.returnType&&(t+=" : "+(0,a.QO)(this.returnType))),t=t.trim();return{displayText:t,cssStyle:this.parseClassifier()}}parseMember(t){let e="";if("method"===this.memberType){const s=/([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/.exec(t);if(s){const t=s[1]?s[1].trim():"";if(c.includes(t)&&(this.visibility=t),this.id=s[2],this.parameters=s[3]?s[3].trim():"",e=s[4]?s[4].trim():"",this.returnType=s[5]?s[5].trim():"",""===e){const t=this.returnType.substring(this.returnType.length-1);/[$*]/.exec(t)&&(e=t,this.returnType=this.returnType.substring(0,this.returnType.length-1))}}}else{const s=t.length,n=t.substring(0,1),i=t.substring(s-1);c.includes(n)&&(this.visibility=n),/[$*]/.exec(i)&&(e=i),this.id=t.substring(""===this.visibility?0:1,""===e?s:s-1)}this.classifier=e,this.id=this.id.startsWith(" ")?" "+this.id.trim():this.id.trim();const s=`${this.visibility?"\\"+this.visibility:""}${(0,a.QO)(this.id)}${"method"===this.memberType?`(${(0,a.QO)(this.parameters)})${this.returnType?" : "+(0,a.QO)(this.returnType):""}`:""}`;this.text=s.replaceAll("<","<").replaceAll(">",">"),this.text.startsWith("\\<")&&(this.text=this.text.replace("\\<","~"))}parseClassifier(){switch(this.classifier){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}}},p="classId-",d=[],A=new Map,y=new Map,g=[],m=[],C=0,f=new Map,E=0,b=[],k=(0,a.K2)((t=>a.Y2.sanitizeText(t,(0,a.D7)())),"sanitizeText"),T=(0,a.K2)((function(t){const e=a.Y2.sanitizeText(t,(0,a.D7)());let s="",n=e;if(e.indexOf("~")>0){const t=e.split("~");n=k(t[0]),s=k(t[1])}return{className:n,type:s}}),"splitClassNameAndType"),D=(0,a.K2)((function(t,e){const s=a.Y2.sanitizeText(t,(0,a.D7)());e&&(e=k(e));const{className:n}=T(s);A.get(n).label=e,A.get(n).text=`${e}${A.get(n).type?`<${A.get(n).type}>`:""}`}),"setClassLabel"),F=(0,a.K2)((function(t){const e=a.Y2.sanitizeText(t,(0,a.D7)()),{className:s,type:n}=T(e);if(A.has(s))return;const i=a.Y2.sanitizeText(s,(0,a.D7)());A.set(i,{id:i,type:n,label:i,text:`${i}${n?`<${n}>`:""}`,shape:"classBox",cssClasses:"default",methods:[],members:[],annotations:[],styles:[],domId:p+i+"-"+C}),C++}),"addClass"),B=(0,a.K2)((function(t,e){const s={id:`interface${m.length}`,label:t,classId:e};m.push(s)}),"addInterface"),_=(0,a.K2)((function(t){const e=a.Y2.sanitizeText(t,(0,a.D7)());if(A.has(e))return A.get(e).domId;throw new Error("Class not found: "+e)}),"lookUpDomId"),S=(0,a.K2)((function(){d=[],A=new Map,g=[],m=[],(b=[]).push(j),f=new Map,E=0,V="TB",(0,a.IU)()}),"clear"),N=(0,a.K2)((function(t){return A.get(t)}),"getClass"),L=(0,a.K2)((function(){return A}),"getClasses"),$=(0,a.K2)((function(){return d}),"getRelations"),x=(0,a.K2)((function(){return g}),"getNotes"),O=(0,a.K2)((function(t){a.Rm.debug("Adding relation: "+JSON.stringify(t));const e=[X.LOLLIPOP,X.AGGREGATION,X.COMPOSITION,X.DEPENDENCY,X.EXTENSION];t.relation.type1!==X.LOLLIPOP||e.includes(t.relation.type2)?t.relation.type2!==X.LOLLIPOP||e.includes(t.relation.type1)?(F(t.id1),F(t.id2)):(F(t.id1),B(t.id2,t.id1),t.id2="interface"+(m.length-1)):(F(t.id2),B(t.id1,t.id2),t.id1="interface"+(m.length-1)),t.id1=T(t.id1).className,t.id2=T(t.id2).className,t.relationTitle1=a.Y2.sanitizeText(t.relationTitle1.trim(),(0,a.D7)()),t.relationTitle2=a.Y2.sanitizeText(t.relationTitle2.trim(),(0,a.D7)()),d.push(t)}),"addRelation"),v=(0,a.K2)((function(t,e){const s=T(t).className;A.get(s).annotations.push(e)}),"addAnnotation"),I=(0,a.K2)((function(t,e){F(t);const s=T(t).className,n=A.get(s);if("string"==typeof e){const t=e.trim();t.startsWith("<<")&&t.endsWith(">>")?n.annotations.push(k(t.substring(2,t.length-2))):t.indexOf(")")>0?n.methods.push(new h(t,"method")):t&&n.members.push(new h(t,"attribute"))}}),"addMember"),K=(0,a.K2)((function(t,e){Array.isArray(e)&&(e.reverse(),e.forEach((e=>I(t,e))))}),"addMembers"),w=(0,a.K2)((function(t,e){const s={id:`note${g.length}`,class:e,text:t};g.push(s)}),"addNote"),R=(0,a.K2)((function(t){return t.startsWith(":")&&(t=t.substring(1)),k(t.trim())}),"cleanupLabel"),P=(0,a.K2)((function(t,e){t.split(",").forEach((function(t){let s=t;/\d/.exec(t[0])&&(s=p+s);const n=A.get(s);n&&(n.cssClasses+=" "+e)}))}),"setCssClass"),M=(0,a.K2)((function(t,e){for(const s of t){let t=y.get(s);void 0===t&&(t={id:s,styles:[],textStyles:[]},y.set(s,t)),e&&e.forEach((function(e){if(/color/.exec(e)){const s=e.replace("fill","bgFill");t.textStyles.push(s)}t.styles.push(e)})),A.forEach((t=>{t.cssClasses.includes(s)&&t.styles.push(...e.flatMap((t=>t.split(","))))}))}}),"defineClass"),G=(0,a.K2)((function(t,e){t.split(",").forEach((function(t){void 0!==e&&(A.get(t).tooltip=k(e))}))}),"setTooltip"),U=(0,a.K2)((function(t,e){return e&&f.has(e)?f.get(e).classes.get(t).tooltip:A.get(t).tooltip}),"getTooltip"),Y=(0,a.K2)((function(t,e,s){const n=(0,a.D7)();t.split(",").forEach((function(t){let i=t;/\d/.exec(t[0])&&(i=p+i);const a=A.get(i);a&&(a.link=u._K.formatUrl(e,n),"sandbox"===n.securityLevel?a.linkTarget="_top":a.linkTarget="string"==typeof s?k(s):"_blank")})),P(t,"clickable")}),"setLink"),z=(0,a.K2)((function(t,e,s){t.split(",").forEach((function(t){Q(t,e,s),A.get(t).haveCallback=!0})),P(t,"clickable")}),"setClickEvent"),Q=(0,a.K2)((function(t,e,s){const n=a.Y2.sanitizeText(t,(0,a.D7)());if("loose"!==(0,a.D7)().securityLevel)return;if(void 0===e)return;const i=n;if(A.has(i)){const t=_(i);let n=[];if("string"==typeof s){n=s.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let t=0;t")),t.classed("hover",!0)})).on("mouseout",(function(){e.transition().duration(500).style("opacity",0);(0,r.Ltv)(this).classed("hover",!1)}))}),"setupToolTips");b.push(j);var V="TB",q=(0,a.K2)((()=>V),"getDirection"),H=(0,a.K2)((t=>{V=t}),"setDirection"),J=(0,a.K2)((function(t){f.has(t)||(f.set(t,{id:t,classes:new Map,children:{},domId:p+t+"-"+E}),E++)}),"addNamespace"),Z=(0,a.K2)((function(t){return f.get(t)}),"getNamespace"),tt=(0,a.K2)((function(){return f}),"getNamespaces"),et=(0,a.K2)((function(t,e){if(f.has(t))for(const s of e){const{className:e}=T(s);A.get(e).parent=t,f.get(t).classes.set(e,A.get(e))}}),"addClassesToNamespace"),st=(0,a.K2)((function(t,e){const s=A.get(t);if(e&&s)for(const n of e)n.includes(",")?s.styles.push(...n.split(",")):s.styles.push(n)}),"setCssStyle");function nt(t){let e;switch(t){case 0:e="aggregation";break;case 1:e="extension";break;case 2:e="composition";break;case 3:e="dependency";break;case 4:e="lollipop";break;default:e="none"}return e}(0,a.K2)(nt,"getArrowMarker");var it=(0,a.K2)((()=>{const t=[],e=[],s=(0,a.D7)();for(const i of f.keys()){const e=f.get(i);if(e){const n={id:e.id,label:e.id,isGroup:!0,padding:s.class.padding??16,shape:"rect",cssStyles:["fill: none","stroke: black"],look:s.look};t.push(n)}}for(const i of A.keys()){const e=A.get(i);if(e){const n=e;n.parentId=e.parent,n.look=s.look,t.push(n)}}let n=0;for(const i of g){n++;const u={id:i.id,label:i.text,isGroup:!1,shape:"note",padding:s.class.padding??6,cssStyles:["text-align: left","white-space: nowrap",`fill: ${s.themeVariables.noteBkgColor}`,`stroke: ${s.themeVariables.noteBorderColor}`],look:s.look};t.push(u);const a=A.get(i.class)?.id??"";if(a){const t={id:`edgeNote${n}`,start:i.id,end:a,type:"normal",thickness:"normal",classes:"relation",arrowTypeStart:"none",arrowTypeEnd:"none",arrowheadStyle:"",labelStyle:[""],style:["fill: none"],pattern:"dotted",look:s.look};e.push(t)}}for(const i of m){const e={id:i.id,label:i.label,isGroup:!1,shape:"rect",cssStyles:["opacity: 0;"],look:s.look};t.push(e)}n=0;for(const i of d){n++;const t={id:(0,u.rY)(i.id1,i.id2,{prefix:"id",counter:n}),start:i.id1,end:i.id2,type:"normal",label:i.title,labelpos:"c",thickness:"normal",classes:"relation",arrowTypeStart:nt(i.relation.type1),arrowTypeEnd:nt(i.relation.type2),startLabelRight:"none"===i.relationTitle1?"":i.relationTitle1,endLabelLeft:"none"===i.relationTitle2?"":i.relationTitle2,arrowheadStyle:"",labelStyle:["display: inline-block"],style:i.style||"",pattern:1==i.relation.lineType?"dashed":"solid",look:s.look};e.push(t)}return{nodes:t,edges:e,other:{},config:s,direction:q()}}),"getData"),ut={setAccTitle:a.SV,getAccTitle:a.iN,getAccDescription:a.m7,setAccDescription:a.EI,getConfig:(0,a.K2)((()=>(0,a.D7)().class),"getConfig"),addClass:F,bindFunctions:W,clear:S,getClass:N,getClasses:L,getNotes:x,addAnnotation:v,addNote:w,getRelations:$,addRelation:O,getDirection:q,setDirection:H,addMember:I,addMembers:K,cleanupLabel:R,lineType:{LINE:0,DOTTED_LINE:1},relationType:X,setClickEvent:z,setCssClass:P,defineClass:M,setLink:Y,getTooltip:U,setTooltip:G,lookUpDomId:_,setDiagramTitle:a.ke,getDiagramTitle:a.ab,setClassLabel:D,addNamespace:J,addClassesToNamespace:et,getNamespace:Z,getNamespaces:tt,setCssStyle:st,getData:it},at=(0,a.K2)((t=>`g.classGroup text {\n fill: ${t.nodeBorder||t.classText};\n stroke: none;\n font-family: ${t.fontFamily};\n font-size: 10px;\n\n .title {\n font-weight: bolder;\n }\n\n}\n\n.nodeLabel, .edgeLabel {\n color: ${t.classText};\n}\n.edgeLabel .label rect {\n fill: ${t.mainBkg};\n}\n.label text {\n fill: ${t.classText};\n}\n\n.labelBkg {\n background: ${t.mainBkg};\n}\n.edgeLabel .label span {\n background: ${t.mainBkg};\n}\n\n.classTitle {\n font-weight: bolder;\n}\n.node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n stroke-width: 1px;\n }\n\n\n.divider {\n stroke: ${t.nodeBorder};\n stroke-width: 1;\n}\n\ng.clickable {\n cursor: pointer;\n}\n\ng.classGroup rect {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n}\n\ng.classGroup line {\n stroke: ${t.nodeBorder};\n stroke-width: 1;\n}\n\n.classLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: ${t.mainBkg};\n opacity: 0.5;\n}\n\n.classLabel .label {\n fill: ${t.nodeBorder};\n font-size: 10px;\n}\n\n.relation {\n stroke: ${t.lineColor};\n stroke-width: 1;\n fill: none;\n}\n\n.dashed-line{\n stroke-dasharray: 3;\n}\n\n.dotted-line{\n stroke-dasharray: 1 2;\n}\n\n#compositionStart, .composition {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#compositionEnd, .composition {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#dependencyStart, .dependency {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#dependencyStart, .dependency {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#extensionStart, .extension {\n fill: transparent !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#extensionEnd, .extension {\n fill: transparent !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#aggregationStart, .aggregation {\n fill: transparent !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#aggregationEnd, .aggregation {\n fill: transparent !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#lollipopStart, .lollipop {\n fill: ${t.mainBkg} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#lollipopEnd, .lollipop {\n fill: ${t.mainBkg} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n.edgeTerminals {\n font-size: 11px;\n line-height: initial;\n}\n\n.classTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n}\n`),"getStyles"),rt=(0,a.K2)(((t,e="TB")=>{if(!t.doc)return e;let s=e;for(const n of t.doc)"dir"===n.stmt&&(s=n.value);return s}),"getDir"),ot={getClasses:(0,a.K2)((function(t,e){return e.db.getClasses()}),"getClasses"),draw:(0,a.K2)((async function(t,e,s,r){a.Rm.info("REF0:"),a.Rm.info("Drawing class diagram (v3)",e);const{securityLevel:o,state:l,layout:c}=(0,a.D7)(),h=r.db.getData(),p=(0,n.A)(e,o);h.type=r.type,h.layoutAlgorithm=(0,i.q7)(c),h.nodeSpacing=l?.nodeSpacing||50,h.rankSpacing=l?.rankSpacing||50,h.markers=["aggregation","extension","composition","dependency","lollipop"],h.diagramId=e,await(0,i.XX)(h,p);u._K.insertTitle(p,"classDiagramTitleText",l?.titleTopMargin??25,r.db.getDiagramTitle()),(0,n.P)(p,8,"classDiagram",l?.useMaxWidth??!0)}),"draw"),getDir:rt}},79972:(t,e,s)=>{s.d(e,{A:()=>u,P:()=>a});var n=s(45567),i=s(20007),u=(0,n.K2)(((t,e)=>{let s;"sandbox"===e&&(s=(0,i.Ltv)("#i"+t));return("sandbox"===e?(0,i.Ltv)(s.nodes()[0].contentDocument.body):(0,i.Ltv)("body")).select(`[id="${t}"]`)}),"getDiagramElement"),a=(0,n.K2)(((t,e,s,i)=>{t.attr("class",s);const{width:u,height:a,x:l,y:c}=r(t,e);(0,n.a$)(t,a,u,i);const h=o(l,c,u,a,e);t.attr("viewBox",h),n.Rm.debug(`viewBox configured: ${h} with padding: ${e}`)}),"setupViewPortForSVG"),r=(0,n.K2)(((t,e)=>{const s=t.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:s.width+2*e,height:s.height+2*e,x:s.x,y:s.y}}),"calculateDimensionsWithPadding"),o=(0,n.K2)(((t,e,s,n,i)=>`${t-i} ${e-i} ${s} ${n}`),"createViewBox")}}]); \ No newline at end of file diff --git a/assets/js/687.1f45b64b.js b/assets/js/687.1f45b64b.js deleted file mode 100644 index f97841f8dbac..000000000000 --- a/assets/js/687.1f45b64b.js +++ /dev/null @@ -1,3478 +0,0 @@ -"use strict"; -exports.id = 687; -exports.ids = [687]; -exports.modules = { - -/***/ 23687: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ diagram: () => (/* binding */ diagram) -/* harmony export */ }); -/* harmony import */ var _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(86079); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(26312); -/* harmony import */ var _svgDrawCommon_08f97a94_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(79186); -/* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(16750); -/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(74353); -/* harmony import */ var dompurify__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(99418); - - - - - - - - - - - - -var parser = function() { - var o = function(k, v, o2, l) { - for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) - ; - return o2; - }, $V0 = [1, 2], $V1 = [1, 3], $V2 = [1, 4], $V3 = [2, 4], $V4 = [1, 9], $V5 = [1, 11], $V6 = [1, 13], $V7 = [1, 14], $V8 = [1, 16], $V9 = [1, 17], $Va = [1, 18], $Vb = [1, 24], $Vc = [1, 25], $Vd = [1, 26], $Ve = [1, 27], $Vf = [1, 28], $Vg = [1, 29], $Vh = [1, 30], $Vi = [1, 31], $Vj = [1, 32], $Vk = [1, 33], $Vl = [1, 34], $Vm = [1, 35], $Vn = [1, 36], $Vo = [1, 37], $Vp = [1, 38], $Vq = [1, 39], $Vr = [1, 41], $Vs = [1, 42], $Vt = [1, 43], $Vu = [1, 44], $Vv = [1, 45], $Vw = [1, 46], $Vx = [1, 4, 5, 13, 14, 16, 18, 21, 23, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 46, 47, 48, 49, 50, 52, 53, 54, 59, 60, 61, 62, 70], $Vy = [4, 5, 16, 50, 52, 53], $Vz = [4, 5, 13, 14, 16, 18, 21, 23, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 46, 50, 52, 53, 54, 59, 60, 61, 62, 70], $VA = [4, 5, 13, 14, 16, 18, 21, 23, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 46, 49, 50, 52, 53, 54, 59, 60, 61, 62, 70], $VB = [4, 5, 13, 14, 16, 18, 21, 23, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 46, 48, 50, 52, 53, 54, 59, 60, 61, 62, 70], $VC = [4, 5, 13, 14, 16, 18, 21, 23, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 46, 47, 50, 52, 53, 54, 59, 60, 61, 62, 70], $VD = [68, 69, 70], $VE = [1, 120]; - var parser2 = { - trace: function trace() { - }, - yy: {}, - symbols_: { "error": 2, "start": 3, "SPACE": 4, "NEWLINE": 5, "SD": 6, "document": 7, "line": 8, "statement": 9, "box_section": 10, "box_line": 11, "participant_statement": 12, "create": 13, "box": 14, "restOfLine": 15, "end": 16, "signal": 17, "autonumber": 18, "NUM": 19, "off": 20, "activate": 21, "actor": 22, "deactivate": 23, "note_statement": 24, "links_statement": 25, "link_statement": 26, "properties_statement": 27, "details_statement": 28, "title": 29, "legacy_title": 30, "acc_title": 31, "acc_title_value": 32, "acc_descr": 33, "acc_descr_value": 34, "acc_descr_multiline_value": 35, "loop": 36, "rect": 37, "opt": 38, "alt": 39, "else_sections": 40, "par": 41, "par_sections": 42, "par_over": 43, "critical": 44, "option_sections": 45, "break": 46, "option": 47, "and": 48, "else": 49, "participant": 50, "AS": 51, "participant_actor": 52, "destroy": 53, "note": 54, "placement": 55, "text2": 56, "over": 57, "actor_pair": 58, "links": 59, "link": 60, "properties": 61, "details": 62, "spaceList": 63, ",": 64, "left_of": 65, "right_of": 66, "signaltype": 67, "+": 68, "-": 69, "ACTOR": 70, "SOLID_OPEN_ARROW": 71, "DOTTED_OPEN_ARROW": 72, "SOLID_ARROW": 73, "DOTTED_ARROW": 74, "SOLID_CROSS": 75, "DOTTED_CROSS": 76, "SOLID_POINT": 77, "DOTTED_POINT": 78, "TXT": 79, "$accept": 0, "$end": 1 }, - terminals_: { 2: "error", 4: "SPACE", 5: "NEWLINE", 6: "SD", 13: "create", 14: "box", 15: "restOfLine", 16: "end", 18: "autonumber", 19: "NUM", 20: "off", 21: "activate", 23: "deactivate", 29: "title", 30: "legacy_title", 31: "acc_title", 32: "acc_title_value", 33: "acc_descr", 34: "acc_descr_value", 35: "acc_descr_multiline_value", 36: "loop", 37: "rect", 38: "opt", 39: "alt", 41: "par", 43: "par_over", 44: "critical", 46: "break", 47: "option", 48: "and", 49: "else", 50: "participant", 51: "AS", 52: "participant_actor", 53: "destroy", 54: "note", 57: "over", 59: "links", 60: "link", 61: "properties", 62: "details", 64: ",", 65: "left_of", 66: "right_of", 68: "+", 69: "-", 70: "ACTOR", 71: "SOLID_OPEN_ARROW", 72: "DOTTED_OPEN_ARROW", 73: "SOLID_ARROW", 74: "DOTTED_ARROW", 75: "SOLID_CROSS", 76: "DOTTED_CROSS", 77: "SOLID_POINT", 78: "DOTTED_POINT", 79: "TXT" }, - productions_: [0, [3, 2], [3, 2], [3, 2], [7, 0], [7, 2], [8, 2], [8, 1], [8, 1], [10, 0], [10, 2], [11, 2], [11, 1], [11, 1], [9, 1], [9, 2], [9, 4], [9, 2], [9, 4], [9, 3], [9, 3], [9, 2], [9, 3], [9, 3], [9, 2], [9, 2], [9, 2], [9, 2], [9, 2], [9, 1], [9, 1], [9, 2], [9, 2], [9, 1], [9, 4], [9, 4], [9, 4], [9, 4], [9, 4], [9, 4], [9, 4], [9, 4], [45, 1], [45, 4], [42, 1], [42, 4], [40, 1], [40, 4], [12, 5], [12, 3], [12, 5], [12, 3], [12, 3], [24, 4], [24, 4], [25, 3], [26, 3], [27, 3], [28, 3], [63, 2], [63, 1], [58, 3], [58, 1], [55, 1], [55, 1], [17, 5], [17, 5], [17, 4], [22, 1], [67, 1], [67, 1], [67, 1], [67, 1], [67, 1], [67, 1], [67, 1], [67, 1], [56, 1]], - performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { - var $0 = $$.length - 1; - switch (yystate) { - case 3: - yy.apply($$[$0]); - return $$[$0]; - case 4: - case 9: - this.$ = []; - break; - case 5: - case 10: - $$[$0 - 1].push($$[$0]); - this.$ = $$[$0 - 1]; - break; - case 6: - case 7: - case 11: - case 12: - this.$ = $$[$0]; - break; - case 8: - case 13: - this.$ = []; - break; - case 15: - $$[$0].type = "createParticipant"; - this.$ = $$[$0]; - break; - case 16: - $$[$0 - 1].unshift({ type: "boxStart", boxData: yy.parseBoxData($$[$0 - 2]) }); - $$[$0 - 1].push({ type: "boxEnd", boxText: $$[$0 - 2] }); - this.$ = $$[$0 - 1]; - break; - case 18: - this.$ = { type: "sequenceIndex", sequenceIndex: Number($$[$0 - 2]), sequenceIndexStep: Number($$[$0 - 1]), sequenceVisible: true, signalType: yy.LINETYPE.AUTONUMBER }; - break; - case 19: - this.$ = { type: "sequenceIndex", sequenceIndex: Number($$[$0 - 1]), sequenceIndexStep: 1, sequenceVisible: true, signalType: yy.LINETYPE.AUTONUMBER }; - break; - case 20: - this.$ = { type: "sequenceIndex", sequenceVisible: false, signalType: yy.LINETYPE.AUTONUMBER }; - break; - case 21: - this.$ = { type: "sequenceIndex", sequenceVisible: true, signalType: yy.LINETYPE.AUTONUMBER }; - break; - case 22: - this.$ = { type: "activeStart", signalType: yy.LINETYPE.ACTIVE_START, actor: $$[$0 - 1] }; - break; - case 23: - this.$ = { type: "activeEnd", signalType: yy.LINETYPE.ACTIVE_END, actor: $$[$0 - 1] }; - break; - case 29: - yy.setDiagramTitle($$[$0].substring(6)); - this.$ = $$[$0].substring(6); - break; - case 30: - yy.setDiagramTitle($$[$0].substring(7)); - this.$ = $$[$0].substring(7); - break; - case 31: - this.$ = $$[$0].trim(); - yy.setAccTitle(this.$); - break; - case 32: - case 33: - this.$ = $$[$0].trim(); - yy.setAccDescription(this.$); - break; - case 34: - $$[$0 - 1].unshift({ type: "loopStart", loopText: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.LOOP_START }); - $$[$0 - 1].push({ type: "loopEnd", loopText: $$[$0 - 2], signalType: yy.LINETYPE.LOOP_END }); - this.$ = $$[$0 - 1]; - break; - case 35: - $$[$0 - 1].unshift({ type: "rectStart", color: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.RECT_START }); - $$[$0 - 1].push({ type: "rectEnd", color: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.RECT_END }); - this.$ = $$[$0 - 1]; - break; - case 36: - $$[$0 - 1].unshift({ type: "optStart", optText: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.OPT_START }); - $$[$0 - 1].push({ type: "optEnd", optText: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.OPT_END }); - this.$ = $$[$0 - 1]; - break; - case 37: - $$[$0 - 1].unshift({ type: "altStart", altText: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.ALT_START }); - $$[$0 - 1].push({ type: "altEnd", signalType: yy.LINETYPE.ALT_END }); - this.$ = $$[$0 - 1]; - break; - case 38: - $$[$0 - 1].unshift({ type: "parStart", parText: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.PAR_START }); - $$[$0 - 1].push({ type: "parEnd", signalType: yy.LINETYPE.PAR_END }); - this.$ = $$[$0 - 1]; - break; - case 39: - $$[$0 - 1].unshift({ type: "parStart", parText: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.PAR_OVER_START }); - $$[$0 - 1].push({ type: "parEnd", signalType: yy.LINETYPE.PAR_END }); - this.$ = $$[$0 - 1]; - break; - case 40: - $$[$0 - 1].unshift({ type: "criticalStart", criticalText: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.CRITICAL_START }); - $$[$0 - 1].push({ type: "criticalEnd", signalType: yy.LINETYPE.CRITICAL_END }); - this.$ = $$[$0 - 1]; - break; - case 41: - $$[$0 - 1].unshift({ type: "breakStart", breakText: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.BREAK_START }); - $$[$0 - 1].push({ type: "breakEnd", optText: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.BREAK_END }); - this.$ = $$[$0 - 1]; - break; - case 43: - this.$ = $$[$0 - 3].concat([{ type: "option", optionText: yy.parseMessage($$[$0 - 1]), signalType: yy.LINETYPE.CRITICAL_OPTION }, $$[$0]]); - break; - case 45: - this.$ = $$[$0 - 3].concat([{ type: "and", parText: yy.parseMessage($$[$0 - 1]), signalType: yy.LINETYPE.PAR_AND }, $$[$0]]); - break; - case 47: - this.$ = $$[$0 - 3].concat([{ type: "else", altText: yy.parseMessage($$[$0 - 1]), signalType: yy.LINETYPE.ALT_ELSE }, $$[$0]]); - break; - case 48: - $$[$0 - 3].draw = "participant"; - $$[$0 - 3].type = "addParticipant"; - $$[$0 - 3].description = yy.parseMessage($$[$0 - 1]); - this.$ = $$[$0 - 3]; - break; - case 49: - $$[$0 - 1].draw = "participant"; - $$[$0 - 1].type = "addParticipant"; - this.$ = $$[$0 - 1]; - break; - case 50: - $$[$0 - 3].draw = "actor"; - $$[$0 - 3].type = "addParticipant"; - $$[$0 - 3].description = yy.parseMessage($$[$0 - 1]); - this.$ = $$[$0 - 3]; - break; - case 51: - $$[$0 - 1].draw = "actor"; - $$[$0 - 1].type = "addParticipant"; - this.$ = $$[$0 - 1]; - break; - case 52: - $$[$0 - 1].type = "destroyParticipant"; - this.$ = $$[$0 - 1]; - break; - case 53: - this.$ = [$$[$0 - 1], { type: "addNote", placement: $$[$0 - 2], actor: $$[$0 - 1].actor, text: $$[$0] }]; - break; - case 54: - $$[$0 - 2] = [].concat($$[$0 - 1], $$[$0 - 1]).slice(0, 2); - $$[$0 - 2][0] = $$[$0 - 2][0].actor; - $$[$0 - 2][1] = $$[$0 - 2][1].actor; - this.$ = [$$[$0 - 1], { type: "addNote", placement: yy.PLACEMENT.OVER, actor: $$[$0 - 2].slice(0, 2), text: $$[$0] }]; - break; - case 55: - this.$ = [$$[$0 - 1], { type: "addLinks", actor: $$[$0 - 1].actor, text: $$[$0] }]; - break; - case 56: - this.$ = [$$[$0 - 1], { type: "addALink", actor: $$[$0 - 1].actor, text: $$[$0] }]; - break; - case 57: - this.$ = [$$[$0 - 1], { type: "addProperties", actor: $$[$0 - 1].actor, text: $$[$0] }]; - break; - case 58: - this.$ = [$$[$0 - 1], { type: "addDetails", actor: $$[$0 - 1].actor, text: $$[$0] }]; - break; - case 61: - this.$ = [$$[$0 - 2], $$[$0]]; - break; - case 62: - this.$ = $$[$0]; - break; - case 63: - this.$ = yy.PLACEMENT.LEFTOF; - break; - case 64: - this.$ = yy.PLACEMENT.RIGHTOF; - break; - case 65: - this.$ = [ - $$[$0 - 4], - $$[$0 - 1], - { type: "addMessage", from: $$[$0 - 4].actor, to: $$[$0 - 1].actor, signalType: $$[$0 - 3], msg: $$[$0], activate: true }, - { type: "activeStart", signalType: yy.LINETYPE.ACTIVE_START, actor: $$[$0 - 1] } - ]; - break; - case 66: - this.$ = [ - $$[$0 - 4], - $$[$0 - 1], - { type: "addMessage", from: $$[$0 - 4].actor, to: $$[$0 - 1].actor, signalType: $$[$0 - 3], msg: $$[$0] }, - { type: "activeEnd", signalType: yy.LINETYPE.ACTIVE_END, actor: $$[$0 - 4] } - ]; - break; - case 67: - this.$ = [$$[$0 - 3], $$[$0 - 1], { type: "addMessage", from: $$[$0 - 3].actor, to: $$[$0 - 1].actor, signalType: $$[$0 - 2], msg: $$[$0] }]; - break; - case 68: - this.$ = { type: "addParticipant", actor: $$[$0] }; - break; - case 69: - this.$ = yy.LINETYPE.SOLID_OPEN; - break; - case 70: - this.$ = yy.LINETYPE.DOTTED_OPEN; - break; - case 71: - this.$ = yy.LINETYPE.SOLID; - break; - case 72: - this.$ = yy.LINETYPE.DOTTED; - break; - case 73: - this.$ = yy.LINETYPE.SOLID_CROSS; - break; - case 74: - this.$ = yy.LINETYPE.DOTTED_CROSS; - break; - case 75: - this.$ = yy.LINETYPE.SOLID_POINT; - break; - case 76: - this.$ = yy.LINETYPE.DOTTED_POINT; - break; - case 77: - this.$ = yy.parseMessage($$[$0].trim().substring(1)); - break; - } - }, - table: [{ 3: 1, 4: $V0, 5: $V1, 6: $V2 }, { 1: [3] }, { 3: 5, 4: $V0, 5: $V1, 6: $V2 }, { 3: 6, 4: $V0, 5: $V1, 6: $V2 }, o([1, 4, 5, 13, 14, 18, 21, 23, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 46, 50, 52, 53, 54, 59, 60, 61, 62, 70], $V3, { 7: 7 }), { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 3], 4: $V4, 5: $V5, 8: 8, 9: 10, 12: 12, 13: $V6, 14: $V7, 17: 15, 18: $V8, 21: $V9, 22: 40, 23: $Va, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: $Vb, 30: $Vc, 31: $Vd, 33: $Ve, 35: $Vf, 36: $Vg, 37: $Vh, 38: $Vi, 39: $Vj, 41: $Vk, 43: $Vl, 44: $Vm, 46: $Vn, 50: $Vo, 52: $Vp, 53: $Vq, 54: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 70: $Vw }, o($Vx, [2, 5]), { 9: 47, 12: 12, 13: $V6, 14: $V7, 17: 15, 18: $V8, 21: $V9, 22: 40, 23: $Va, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: $Vb, 30: $Vc, 31: $Vd, 33: $Ve, 35: $Vf, 36: $Vg, 37: $Vh, 38: $Vi, 39: $Vj, 41: $Vk, 43: $Vl, 44: $Vm, 46: $Vn, 50: $Vo, 52: $Vp, 53: $Vq, 54: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 70: $Vw }, o($Vx, [2, 7]), o($Vx, [2, 8]), o($Vx, [2, 14]), { 12: 48, 50: $Vo, 52: $Vp, 53: $Vq }, { 15: [1, 49] }, { 5: [1, 50] }, { 5: [1, 53], 19: [1, 51], 20: [1, 52] }, { 22: 54, 70: $Vw }, { 22: 55, 70: $Vw }, { 5: [1, 56] }, { 5: [1, 57] }, { 5: [1, 58] }, { 5: [1, 59] }, { 5: [1, 60] }, o($Vx, [2, 29]), o($Vx, [2, 30]), { 32: [1, 61] }, { 34: [1, 62] }, o($Vx, [2, 33]), { 15: [1, 63] }, { 15: [1, 64] }, { 15: [1, 65] }, { 15: [1, 66] }, { 15: [1, 67] }, { 15: [1, 68] }, { 15: [1, 69] }, { 15: [1, 70] }, { 22: 71, 70: $Vw }, { 22: 72, 70: $Vw }, { 22: 73, 70: $Vw }, { 67: 74, 71: [1, 75], 72: [1, 76], 73: [1, 77], 74: [1, 78], 75: [1, 79], 76: [1, 80], 77: [1, 81], 78: [1, 82] }, { 55: 83, 57: [1, 84], 65: [1, 85], 66: [1, 86] }, { 22: 87, 70: $Vw }, { 22: 88, 70: $Vw }, { 22: 89, 70: $Vw }, { 22: 90, 70: $Vw }, o([5, 51, 64, 71, 72, 73, 74, 75, 76, 77, 78, 79], [2, 68]), o($Vx, [2, 6]), o($Vx, [2, 15]), o($Vy, [2, 9], { 10: 91 }), o($Vx, [2, 17]), { 5: [1, 93], 19: [1, 92] }, { 5: [1, 94] }, o($Vx, [2, 21]), { 5: [1, 95] }, { 5: [1, 96] }, o($Vx, [2, 24]), o($Vx, [2, 25]), o($Vx, [2, 26]), o($Vx, [2, 27]), o($Vx, [2, 28]), o($Vx, [2, 31]), o($Vx, [2, 32]), o($Vz, $V3, { 7: 97 }), o($Vz, $V3, { 7: 98 }), o($Vz, $V3, { 7: 99 }), o($VA, $V3, { 40: 100, 7: 101 }), o($VB, $V3, { 42: 102, 7: 103 }), o($VB, $V3, { 7: 103, 42: 104 }), o($VC, $V3, { 45: 105, 7: 106 }), o($Vz, $V3, { 7: 107 }), { 5: [1, 109], 51: [1, 108] }, { 5: [1, 111], 51: [1, 110] }, { 5: [1, 112] }, { 22: 115, 68: [1, 113], 69: [1, 114], 70: $Vw }, o($VD, [2, 69]), o($VD, [2, 70]), o($VD, [2, 71]), o($VD, [2, 72]), o($VD, [2, 73]), o($VD, [2, 74]), o($VD, [2, 75]), o($VD, [2, 76]), { 22: 116, 70: $Vw }, { 22: 118, 58: 117, 70: $Vw }, { 70: [2, 63] }, { 70: [2, 64] }, { 56: 119, 79: $VE }, { 56: 121, 79: $VE }, { 56: 122, 79: $VE }, { 56: 123, 79: $VE }, { 4: [1, 126], 5: [1, 128], 11: 125, 12: 127, 16: [1, 124], 50: $Vo, 52: $Vp, 53: $Vq }, { 5: [1, 129] }, o($Vx, [2, 19]), o($Vx, [2, 20]), o($Vx, [2, 22]), o($Vx, [2, 23]), { 4: $V4, 5: $V5, 8: 8, 9: 10, 12: 12, 13: $V6, 14: $V7, 16: [1, 130], 17: 15, 18: $V8, 21: $V9, 22: 40, 23: $Va, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: $Vb, 30: $Vc, 31: $Vd, 33: $Ve, 35: $Vf, 36: $Vg, 37: $Vh, 38: $Vi, 39: $Vj, 41: $Vk, 43: $Vl, 44: $Vm, 46: $Vn, 50: $Vo, 52: $Vp, 53: $Vq, 54: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 70: $Vw }, { 4: $V4, 5: $V5, 8: 8, 9: 10, 12: 12, 13: $V6, 14: $V7, 16: [1, 131], 17: 15, 18: $V8, 21: $V9, 22: 40, 23: $Va, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: $Vb, 30: $Vc, 31: $Vd, 33: $Ve, 35: $Vf, 36: $Vg, 37: $Vh, 38: $Vi, 39: $Vj, 41: $Vk, 43: $Vl, 44: $Vm, 46: $Vn, 50: $Vo, 52: $Vp, 53: $Vq, 54: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 70: $Vw }, { 4: $V4, 5: $V5, 8: 8, 9: 10, 12: 12, 13: $V6, 14: $V7, 16: [1, 132], 17: 15, 18: $V8, 21: $V9, 22: 40, 23: $Va, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: $Vb, 30: $Vc, 31: $Vd, 33: $Ve, 35: $Vf, 36: $Vg, 37: $Vh, 38: $Vi, 39: $Vj, 41: $Vk, 43: $Vl, 44: $Vm, 46: $Vn, 50: $Vo, 52: $Vp, 53: $Vq, 54: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 70: $Vw }, { 16: [1, 133] }, { 4: $V4, 5: $V5, 8: 8, 9: 10, 12: 12, 13: $V6, 14: $V7, 16: [2, 46], 17: 15, 18: $V8, 21: $V9, 22: 40, 23: $Va, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: $Vb, 30: $Vc, 31: $Vd, 33: $Ve, 35: $Vf, 36: $Vg, 37: $Vh, 38: $Vi, 39: $Vj, 41: $Vk, 43: $Vl, 44: $Vm, 46: $Vn, 49: [1, 134], 50: $Vo, 52: $Vp, 53: $Vq, 54: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 70: $Vw }, { 16: [1, 135] }, { 4: $V4, 5: $V5, 8: 8, 9: 10, 12: 12, 13: $V6, 14: $V7, 16: [2, 44], 17: 15, 18: $V8, 21: $V9, 22: 40, 23: $Va, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: $Vb, 30: $Vc, 31: $Vd, 33: $Ve, 35: $Vf, 36: $Vg, 37: $Vh, 38: $Vi, 39: $Vj, 41: $Vk, 43: $Vl, 44: $Vm, 46: $Vn, 48: [1, 136], 50: $Vo, 52: $Vp, 53: $Vq, 54: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 70: $Vw }, { 16: [1, 137] }, { 16: [1, 138] }, { 4: $V4, 5: $V5, 8: 8, 9: 10, 12: 12, 13: $V6, 14: $V7, 16: [2, 42], 17: 15, 18: $V8, 21: $V9, 22: 40, 23: $Va, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: $Vb, 30: $Vc, 31: $Vd, 33: $Ve, 35: $Vf, 36: $Vg, 37: $Vh, 38: $Vi, 39: $Vj, 41: $Vk, 43: $Vl, 44: $Vm, 46: $Vn, 47: [1, 139], 50: $Vo, 52: $Vp, 53: $Vq, 54: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 70: $Vw }, { 4: $V4, 5: $V5, 8: 8, 9: 10, 12: 12, 13: $V6, 14: $V7, 16: [1, 140], 17: 15, 18: $V8, 21: $V9, 22: 40, 23: $Va, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: $Vb, 30: $Vc, 31: $Vd, 33: $Ve, 35: $Vf, 36: $Vg, 37: $Vh, 38: $Vi, 39: $Vj, 41: $Vk, 43: $Vl, 44: $Vm, 46: $Vn, 50: $Vo, 52: $Vp, 53: $Vq, 54: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 70: $Vw }, { 15: [1, 141] }, o($Vx, [2, 49]), { 15: [1, 142] }, o($Vx, [2, 51]), o($Vx, [2, 52]), { 22: 143, 70: $Vw }, { 22: 144, 70: $Vw }, { 56: 145, 79: $VE }, { 56: 146, 79: $VE }, { 56: 147, 79: $VE }, { 64: [1, 148], 79: [2, 62] }, { 5: [2, 55] }, { 5: [2, 77] }, { 5: [2, 56] }, { 5: [2, 57] }, { 5: [2, 58] }, o($Vx, [2, 16]), o($Vy, [2, 10]), { 12: 149, 50: $Vo, 52: $Vp, 53: $Vq }, o($Vy, [2, 12]), o($Vy, [2, 13]), o($Vx, [2, 18]), o($Vx, [2, 34]), o($Vx, [2, 35]), o($Vx, [2, 36]), o($Vx, [2, 37]), { 15: [1, 150] }, o($Vx, [2, 38]), { 15: [1, 151] }, o($Vx, [2, 39]), o($Vx, [2, 40]), { 15: [1, 152] }, o($Vx, [2, 41]), { 5: [1, 153] }, { 5: [1, 154] }, { 56: 155, 79: $VE }, { 56: 156, 79: $VE }, { 5: [2, 67] }, { 5: [2, 53] }, { 5: [2, 54] }, { 22: 157, 70: $Vw }, o($Vy, [2, 11]), o($VA, $V3, { 7: 101, 40: 158 }), o($VB, $V3, { 7: 103, 42: 159 }), o($VC, $V3, { 7: 106, 45: 160 }), o($Vx, [2, 48]), o($Vx, [2, 50]), { 5: [2, 65] }, { 5: [2, 66] }, { 79: [2, 61] }, { 16: [2, 47] }, { 16: [2, 45] }, { 16: [2, 43] }], - defaultActions: { 5: [2, 1], 6: [2, 2], 85: [2, 63], 86: [2, 64], 119: [2, 55], 120: [2, 77], 121: [2, 56], 122: [2, 57], 123: [2, 58], 145: [2, 67], 146: [2, 53], 147: [2, 54], 155: [2, 65], 156: [2, 66], 157: [2, 61], 158: [2, 47], 159: [2, 45], 160: [2, 43] }, - parseError: function parseError(str, hash) { - if (hash.recoverable) { - this.trace(str); - } else { - var error = new Error(str); - error.hash = hash; - throw error; - } - }, - parse: function parse(input) { - var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; - var args = lstack.slice.call(arguments, 1); - var lexer2 = Object.create(this.lexer); - var sharedState = { yy: {} }; - for (var k in this.yy) { - if (Object.prototype.hasOwnProperty.call(this.yy, k)) { - sharedState.yy[k] = this.yy[k]; - } - } - lexer2.setInput(input, sharedState.yy); - sharedState.yy.lexer = lexer2; - sharedState.yy.parser = this; - if (typeof lexer2.yylloc == "undefined") { - lexer2.yylloc = {}; - } - var yyloc = lexer2.yylloc; - lstack.push(yyloc); - var ranges = lexer2.options && lexer2.options.ranges; - if (typeof sharedState.yy.parseError === "function") { - this.parseError = sharedState.yy.parseError; - } else { - this.parseError = Object.getPrototypeOf(this).parseError; - } - function lex() { - var token; - token = tstack.pop() || lexer2.lex() || EOF; - if (typeof token !== "number") { - if (token instanceof Array) { - tstack = token; - token = tstack.pop(); - } - token = self.symbols_[token] || token; - } - return token; - } - var symbol, state2, action, r, yyval = {}, p, len, newState, expected; - while (true) { - state2 = stack[stack.length - 1]; - if (this.defaultActions[state2]) { - action = this.defaultActions[state2]; - } else { - if (symbol === null || typeof symbol == "undefined") { - symbol = lex(); - } - action = table[state2] && table[state2][symbol]; - } - if (typeof action === "undefined" || !action.length || !action[0]) { - var errStr = ""; - expected = []; - for (p in table[state2]) { - if (this.terminals_[p] && p > TERROR) { - expected.push("'" + this.terminals_[p] + "'"); - } - } - if (lexer2.showPosition) { - errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; - } else { - errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); - } - this.parseError(errStr, { - text: lexer2.match, - token: this.terminals_[symbol] || symbol, - line: lexer2.yylineno, - loc: yyloc, - expected - }); - } - if (action[0] instanceof Array && action.length > 1) { - throw new Error("Parse Error: multiple actions possible at state: " + state2 + ", token: " + symbol); - } - switch (action[0]) { - case 1: - stack.push(symbol); - vstack.push(lexer2.yytext); - lstack.push(lexer2.yylloc); - stack.push(action[1]); - symbol = null; - { - yyleng = lexer2.yyleng; - yytext = lexer2.yytext; - yylineno = lexer2.yylineno; - yyloc = lexer2.yylloc; - } - break; - case 2: - len = this.productions_[action[1]][1]; - yyval.$ = vstack[vstack.length - len]; - yyval._$ = { - first_line: lstack[lstack.length - (len || 1)].first_line, - last_line: lstack[lstack.length - 1].last_line, - first_column: lstack[lstack.length - (len || 1)].first_column, - last_column: lstack[lstack.length - 1].last_column - }; - if (ranges) { - yyval._$.range = [ - lstack[lstack.length - (len || 1)].range[0], - lstack[lstack.length - 1].range[1] - ]; - } - r = this.performAction.apply(yyval, [ - yytext, - yyleng, - yylineno, - sharedState.yy, - action[1], - vstack, - lstack - ].concat(args)); - if (typeof r !== "undefined") { - return r; - } - if (len) { - stack = stack.slice(0, -1 * len * 2); - vstack = vstack.slice(0, -1 * len); - lstack = lstack.slice(0, -1 * len); - } - stack.push(this.productions_[action[1]][0]); - vstack.push(yyval.$); - lstack.push(yyval._$); - newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; - stack.push(newState); - break; - case 3: - return true; - } - } - return true; - } - }; - var lexer = function() { - var lexer2 = { - EOF: 1, - parseError: function parseError(str, hash) { - if (this.yy.parser) { - this.yy.parser.parseError(str, hash); - } else { - throw new Error(str); - } - }, - // resets the lexer, sets new input - setInput: function(input, yy) { - this.yy = yy || this.yy || {}; - this._input = input; - this._more = this._backtrack = this.done = false; - this.yylineno = this.yyleng = 0; - this.yytext = this.matched = this.match = ""; - this.conditionStack = ["INITIAL"]; - this.yylloc = { - first_line: 1, - first_column: 0, - last_line: 1, - last_column: 0 - }; - if (this.options.ranges) { - this.yylloc.range = [0, 0]; - } - this.offset = 0; - return this; - }, - // consumes and returns one char from the input - input: function() { - var ch = this._input[0]; - this.yytext += ch; - this.yyleng++; - this.offset++; - this.match += ch; - this.matched += ch; - var lines = ch.match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno++; - this.yylloc.last_line++; - } else { - this.yylloc.last_column++; - } - if (this.options.ranges) { - this.yylloc.range[1]++; - } - this._input = this._input.slice(1); - return ch; - }, - // unshifts one char (or a string) into the input - unput: function(ch) { - var len = ch.length; - var lines = ch.split(/(?:\r\n?|\n)/g); - this._input = ch + this._input; - this.yytext = this.yytext.substr(0, this.yytext.length - len); - this.offset -= len; - var oldLines = this.match.split(/(?:\r\n?|\n)/g); - this.match = this.match.substr(0, this.match.length - 1); - this.matched = this.matched.substr(0, this.matched.length - 1); - if (lines.length - 1) { - this.yylineno -= lines.length - 1; - } - var r = this.yylloc.range; - this.yylloc = { - first_line: this.yylloc.first_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.first_column, - last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len - }; - if (this.options.ranges) { - this.yylloc.range = [r[0], r[0] + this.yyleng - len]; - } - this.yyleng = this.yytext.length; - return this; - }, - // When called from action, caches matched text and appends it on next action - more: function() { - this._more = true; - return this; - }, - // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. - reject: function() { - if (this.options.backtrack_lexer) { - this._backtrack = true; - } else { - return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), { - text: "", - token: null, - line: this.yylineno - }); - } - return this; - }, - // retain first n characters of the match - less: function(n) { - this.unput(this.match.slice(n)); - }, - // displays already matched input, i.e. for error messages - pastInput: function() { - var past = this.matched.substr(0, this.matched.length - this.match.length); - return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); - }, - // displays upcoming input, i.e. for error messages - upcomingInput: function() { - var next = this.match; - if (next.length < 20) { - next += this._input.substr(0, 20 - next.length); - } - return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); - }, - // displays the character position where the lexing error occurred, i.e. for error messages - showPosition: function() { - var pre = this.pastInput(); - var c = new Array(pre.length + 1).join("-"); - return pre + this.upcomingInput() + "\n" + c + "^"; - }, - // test the lexed token: return FALSE when not a match, otherwise return token - test_match: function(match, indexed_rule) { - var token, lines, backup; - if (this.options.backtrack_lexer) { - backup = { - yylineno: this.yylineno, - yylloc: { - first_line: this.yylloc.first_line, - last_line: this.last_line, - first_column: this.yylloc.first_column, - last_column: this.yylloc.last_column - }, - yytext: this.yytext, - match: this.match, - matches: this.matches, - matched: this.matched, - yyleng: this.yyleng, - offset: this.offset, - _more: this._more, - _input: this._input, - yy: this.yy, - conditionStack: this.conditionStack.slice(0), - done: this.done - }; - if (this.options.ranges) { - backup.yylloc.range = this.yylloc.range.slice(0); - } - } - lines = match[0].match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno += lines.length; - } - this.yylloc = { - first_line: this.yylloc.last_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.last_column, - last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length - }; - this.yytext += match[0]; - this.match += match[0]; - this.matches = match; - this.yyleng = this.yytext.length; - if (this.options.ranges) { - this.yylloc.range = [this.offset, this.offset += this.yyleng]; - } - this._more = false; - this._backtrack = false; - this._input = this._input.slice(match[0].length); - this.matched += match[0]; - token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); - if (this.done && this._input) { - this.done = false; - } - if (token) { - return token; - } else if (this._backtrack) { - for (var k in backup) { - this[k] = backup[k]; - } - return false; - } - return false; - }, - // return next match in input - next: function() { - if (this.done) { - return this.EOF; - } - if (!this._input) { - this.done = true; - } - var token, match, tempMatch, index; - if (!this._more) { - this.yytext = ""; - this.match = ""; - } - var rules = this._currentRules(); - for (var i = 0; i < rules.length; i++) { - tempMatch = this._input.match(this.rules[rules[i]]); - if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { - match = tempMatch; - index = i; - if (this.options.backtrack_lexer) { - token = this.test_match(tempMatch, rules[i]); - if (token !== false) { - return token; - } else if (this._backtrack) { - match = false; - continue; - } else { - return false; - } - } else if (!this.options.flex) { - break; - } - } - } - if (match) { - token = this.test_match(match, rules[index]); - if (token !== false) { - return token; - } - return false; - } - if (this._input === "") { - return this.EOF; - } else { - return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { - text: "", - token: null, - line: this.yylineno - }); - } - }, - // return next match that has a token - lex: function lex() { - var r = this.next(); - if (r) { - return r; - } else { - return this.lex(); - } - }, - // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) - begin: function begin(condition) { - this.conditionStack.push(condition); - }, - // pop the previously active lexer condition state off the condition stack - popState: function popState() { - var n = this.conditionStack.length - 1; - if (n > 0) { - return this.conditionStack.pop(); - } else { - return this.conditionStack[0]; - } - }, - // produce the lexer rule set which is active for the currently active lexer condition state - _currentRules: function _currentRules() { - if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { - return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; - } else { - return this.conditions["INITIAL"].rules; - } - }, - // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available - topState: function topState(n) { - n = this.conditionStack.length - 1 - Math.abs(n || 0); - if (n >= 0) { - return this.conditionStack[n]; - } else { - return "INITIAL"; - } - }, - // alias for begin(condition) - pushState: function pushState(condition) { - this.begin(condition); - }, - // return the number of states currently on the stack - stateStackSize: function stateStackSize() { - return this.conditionStack.length; - }, - options: { "case-insensitive": true }, - performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { - switch ($avoiding_name_collisions) { - case 0: - return 5; - case 1: - break; - case 2: - break; - case 3: - break; - case 4: - break; - case 5: - break; - case 6: - return 19; - case 7: - this.begin("LINE"); - return 14; - case 8: - this.begin("ID"); - return 50; - case 9: - this.begin("ID"); - return 52; - case 10: - return 13; - case 11: - this.begin("ID"); - return 53; - case 12: - yy_.yytext = yy_.yytext.trim(); - this.begin("ALIAS"); - return 70; - case 13: - this.popState(); - this.popState(); - this.begin("LINE"); - return 51; - case 14: - this.popState(); - this.popState(); - return 5; - case 15: - this.begin("LINE"); - return 36; - case 16: - this.begin("LINE"); - return 37; - case 17: - this.begin("LINE"); - return 38; - case 18: - this.begin("LINE"); - return 39; - case 19: - this.begin("LINE"); - return 49; - case 20: - this.begin("LINE"); - return 41; - case 21: - this.begin("LINE"); - return 43; - case 22: - this.begin("LINE"); - return 48; - case 23: - this.begin("LINE"); - return 44; - case 24: - this.begin("LINE"); - return 47; - case 25: - this.begin("LINE"); - return 46; - case 26: - this.popState(); - return 15; - case 27: - return 16; - case 28: - return 65; - case 29: - return 66; - case 30: - return 59; - case 31: - return 60; - case 32: - return 61; - case 33: - return 62; - case 34: - return 57; - case 35: - return 54; - case 36: - this.begin("ID"); - return 21; - case 37: - this.begin("ID"); - return 23; - case 38: - return 29; - case 39: - return 30; - case 40: - this.begin("acc_title"); - return 31; - case 41: - this.popState(); - return "acc_title_value"; - case 42: - this.begin("acc_descr"); - return 33; - case 43: - this.popState(); - return "acc_descr_value"; - case 44: - this.begin("acc_descr_multiline"); - break; - case 45: - this.popState(); - break; - case 46: - return "acc_descr_multiline_value"; - case 47: - return 6; - case 48: - return 18; - case 49: - return 20; - case 50: - return 64; - case 51: - return 5; - case 52: - yy_.yytext = yy_.yytext.trim(); - return 70; - case 53: - return 73; - case 54: - return 74; - case 55: - return 71; - case 56: - return 72; - case 57: - return 75; - case 58: - return 76; - case 59: - return 77; - case 60: - return 78; - case 61: - return 79; - case 62: - return 68; - case 63: - return 69; - case 64: - return 5; - case 65: - return "INVALID"; - } - }, - rules: [/^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:((?!\n)\s)+)/i, /^(?:#[^\n]*)/i, /^(?:%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[0-9]+(?=[ \n]+))/i, /^(?:box\b)/i, /^(?:participant\b)/i, /^(?:actor\b)/i, /^(?:create\b)/i, /^(?:destroy\b)/i, /^(?:[^\->:\n,;]+?([\-]*[^\->:\n,;]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i, /^(?:as\b)/i, /^(?:(?:))/i, /^(?:loop\b)/i, /^(?:rect\b)/i, /^(?:opt\b)/i, /^(?:alt\b)/i, /^(?:else\b)/i, /^(?:par\b)/i, /^(?:par_over\b)/i, /^(?:and\b)/i, /^(?:critical\b)/i, /^(?:option\b)/i, /^(?:break\b)/i, /^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i, /^(?:end\b)/i, /^(?:left of\b)/i, /^(?:right of\b)/i, /^(?:links\b)/i, /^(?:link\b)/i, /^(?:properties\b)/i, /^(?:details\b)/i, /^(?:over\b)/i, /^(?:note\b)/i, /^(?:activate\b)/i, /^(?:deactivate\b)/i, /^(?:title\s[^#\n;]+)/i, /^(?:title:\s[^#\n;]+)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:sequenceDiagram\b)/i, /^(?:autonumber\b)/i, /^(?:off\b)/i, /^(?:,)/i, /^(?:;)/i, /^(?:[^\+\->:\n,;]+((?!(-x|--x|-\)|--\)))[\-]*[^\+\->:\n,;]+)*)/i, /^(?:->>)/i, /^(?:-->>)/i, /^(?:->)/i, /^(?:-->)/i, /^(?:-[x])/i, /^(?:--[x])/i, /^(?:-[\)])/i, /^(?:--[\)])/i, /^(?::(?:(?:no)?wrap)?[^#\n;]+)/i, /^(?:\+)/i, /^(?:-)/i, /^(?:$)/i, /^(?:.)/i], - conditions: { "acc_descr_multiline": { "rules": [45, 46], "inclusive": false }, "acc_descr": { "rules": [43], "inclusive": false }, "acc_title": { "rules": [41], "inclusive": false }, "ID": { "rules": [2, 3, 12], "inclusive": false }, "ALIAS": { "rules": [2, 3, 13, 14], "inclusive": false }, "LINE": { "rules": [2, 3, 26], "inclusive": false }, "INITIAL": { "rules": [0, 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 42, 44, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65], "inclusive": true } } - }; - return lexer2; - }(); - parser2.lexer = lexer; - function Parser() { - this.yy = {}; - } - Parser.prototype = parser2; - parser2.Parser = Parser; - return new Parser(); -}(); -parser.parser = parser; -const parser$1 = parser; -class ImperativeState { - /** - * @param init - Function that creates the default state. - */ - constructor(init) { - this.init = init; - this.records = this.init(); - } - reset() { - this.records = this.init(); - } -} -const state = new ImperativeState(() => ({ - prevActor: void 0, - actors: {}, - createdActors: {}, - destroyedActors: {}, - boxes: [], - messages: [], - notes: [], - sequenceNumbersEnabled: false, - wrapEnabled: void 0, - currentBox: void 0, - lastCreated: void 0, - lastDestroyed: void 0 -})); -const addBox = function(data) { - state.records.boxes.push({ - name: data.text, - wrap: data.wrap === void 0 && autoWrap() || !!data.wrap, - fill: data.color, - actorKeys: [] - }); - state.records.currentBox = state.records.boxes.slice(-1)[0]; -}; -const addActor = function(id, name, description, type) { - let assignedBox = state.records.currentBox; - const old = state.records.actors[id]; - if (old) { - if (state.records.currentBox && old.box && state.records.currentBox !== old.box) { - throw new Error( - "A same participant should only be defined in one Box: " + old.name + " can't be in '" + old.box.name + "' and in '" + state.records.currentBox.name + "' at the same time." - ); - } - assignedBox = old.box ? old.box : state.records.currentBox; - old.box = assignedBox; - if (old && name === old.name && description == null) { - return; - } - } - if (description == null || description.text == null) { - description = { text: name, wrap: null, type }; - } - if (type == null || description.text == null) { - description = { text: name, wrap: null, type }; - } - state.records.actors[id] = { - box: assignedBox, - name, - description: description.text, - wrap: description.wrap === void 0 && autoWrap() || !!description.wrap, - prevActor: state.records.prevActor, - links: {}, - properties: {}, - actorCnt: null, - rectData: null, - type: type || "participant" - }; - if (state.records.prevActor && state.records.actors[state.records.prevActor]) { - state.records.actors[state.records.prevActor].nextActor = id; - } - if (state.records.currentBox) { - state.records.currentBox.actorKeys.push(id); - } - state.records.prevActor = id; -}; -const activationCount = (part) => { - let i; - let count = 0; - for (i = 0; i < state.records.messages.length; i++) { - if (state.records.messages[i].type === LINETYPE.ACTIVE_START && state.records.messages[i].from.actor === part) { - count++; - } - if (state.records.messages[i].type === LINETYPE.ACTIVE_END && state.records.messages[i].from.actor === part) { - count--; - } - } - return count; -}; -const addMessage = function(idFrom, idTo, message, answer) { - state.records.messages.push({ - from: idFrom, - to: idTo, - message: message.text, - wrap: message.wrap === void 0 && autoWrap() || !!message.wrap, - answer - }); -}; -const addSignal = function(idFrom, idTo, message = { text: void 0, wrap: void 0 }, messageType, activate = false) { - if (messageType === LINETYPE.ACTIVE_END) { - const cnt = activationCount(idFrom.actor); - if (cnt < 1) { - let error = new Error("Trying to inactivate an inactive participant (" + idFrom.actor + ")"); - error.hash = { - text: "->>-", - token: "->>-", - line: "1", - loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, - expected: ["'ACTIVE_PARTICIPANT'"] - }; - throw error; - } - } - state.records.messages.push({ - from: idFrom, - to: idTo, - message: message.text, - wrap: message.wrap === void 0 && autoWrap() || !!message.wrap, - type: messageType, - activate - }); - return true; -}; -const hasAtLeastOneBox = function() { - return state.records.boxes.length > 0; -}; -const hasAtLeastOneBoxWithTitle = function() { - return state.records.boxes.some((b) => b.name); -}; -const getMessages = function() { - return state.records.messages; -}; -const getBoxes = function() { - return state.records.boxes; -}; -const getActors = function() { - return state.records.actors; -}; -const getCreatedActors = function() { - return state.records.createdActors; -}; -const getDestroyedActors = function() { - return state.records.destroyedActors; -}; -const getActor = function(id) { - return state.records.actors[id]; -}; -const getActorKeys = function() { - return Object.keys(state.records.actors); -}; -const enableSequenceNumbers = function() { - state.records.sequenceNumbersEnabled = true; -}; -const disableSequenceNumbers = function() { - state.records.sequenceNumbersEnabled = false; -}; -const showSequenceNumbers = () => state.records.sequenceNumbersEnabled; -const setWrap = function(wrapSetting) { - state.records.wrapEnabled = wrapSetting; -}; -const autoWrap = () => { - if (state.records.wrapEnabled !== void 0) { - return state.records.wrapEnabled; - } - return (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.c)().sequence.wrap; -}; -const clear = function() { - state.reset(); - (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.v)(); -}; -const parseMessage = function(str) { - const _str = str.trim(); - const message = { - text: _str.replace(/^:?(?:no)?wrap:/, "").trim(), - wrap: _str.match(/^:?wrap:/) !== null ? true : _str.match(/^:?nowrap:/) !== null ? false : void 0 - }; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("parseMessage:", message); - return message; -}; -const parseBoxData = function(str) { - const match = str.match(/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/); - let color = match != null && match[1] ? match[1].trim() : "transparent"; - let title = match != null && match[2] ? match[2].trim() : void 0; - if (window && window.CSS) { - if (!window.CSS.supports("color", color)) { - color = "transparent"; - title = str.trim(); - } - } else { - const style = new Option().style; - style.color = color; - if (style.color !== color) { - color = "transparent"; - title = str.trim(); - } - } - return { - color, - text: title !== void 0 ? (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.d)(title.replace(/^:?(?:no)?wrap:/, ""), (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.c)()) : void 0, - wrap: title !== void 0 ? title.match(/^:?wrap:/) !== null ? true : title.match(/^:?nowrap:/) !== null ? false : void 0 : void 0 - }; -}; -const LINETYPE = { - SOLID: 0, - DOTTED: 1, - NOTE: 2, - SOLID_CROSS: 3, - DOTTED_CROSS: 4, - SOLID_OPEN: 5, - DOTTED_OPEN: 6, - LOOP_START: 10, - LOOP_END: 11, - ALT_START: 12, - ALT_ELSE: 13, - ALT_END: 14, - OPT_START: 15, - OPT_END: 16, - ACTIVE_START: 17, - ACTIVE_END: 18, - PAR_START: 19, - PAR_AND: 20, - PAR_END: 21, - RECT_START: 22, - RECT_END: 23, - SOLID_POINT: 24, - DOTTED_POINT: 25, - AUTONUMBER: 26, - CRITICAL_START: 27, - CRITICAL_OPTION: 28, - CRITICAL_END: 29, - BREAK_START: 30, - BREAK_END: 31, - PAR_OVER_START: 32 -}; -const ARROWTYPE = { - FILLED: 0, - OPEN: 1 -}; -const PLACEMENT = { - LEFTOF: 0, - RIGHTOF: 1, - OVER: 2 -}; -const addNote = function(actor, placement, message) { - const note = { - actor, - placement, - message: message.text, - wrap: message.wrap === void 0 && autoWrap() || !!message.wrap - }; - const actors = [].concat(actor, actor); - state.records.notes.push(note); - state.records.messages.push({ - from: actors[0], - to: actors[1], - message: message.text, - wrap: message.wrap === void 0 && autoWrap() || !!message.wrap, - type: LINETYPE.NOTE, - placement - }); -}; -const addLinks = function(actorId, text) { - const actor = getActor(actorId); - try { - let sanitizedText = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.d)(text.text, (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.c)()); - sanitizedText = sanitizedText.replace(/&/g, "&"); - sanitizedText = sanitizedText.replace(/=/g, "="); - const links = JSON.parse(sanitizedText); - insertLinks(actor, links); - } catch (e) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.error("error while parsing actor link text", e); - } -}; -const addALink = function(actorId, text) { - const actor = getActor(actorId); - try { - const links = {}; - let sanitizedText = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.d)(text.text, (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.c)()); - var sep = sanitizedText.indexOf("@"); - sanitizedText = sanitizedText.replace(/&/g, "&"); - sanitizedText = sanitizedText.replace(/=/g, "="); - var label = sanitizedText.slice(0, sep - 1).trim(); - var link = sanitizedText.slice(sep + 1).trim(); - links[label] = link; - insertLinks(actor, links); - } catch (e) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.error("error while parsing actor link text", e); - } -}; -function insertLinks(actor, links) { - if (actor.links == null) { - actor.links = links; - } else { - for (let key in links) { - actor.links[key] = links[key]; - } - } -} -const addProperties = function(actorId, text) { - const actor = getActor(actorId); - try { - let sanitizedText = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.d)(text.text, (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.c)()); - const properties = JSON.parse(sanitizedText); - insertProperties(actor, properties); - } catch (e) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.error("error while parsing actor properties text", e); - } -}; -function insertProperties(actor, properties) { - if (actor.properties == null) { - actor.properties = properties; - } else { - for (let key in properties) { - actor.properties[key] = properties[key]; - } - } -} -function boxEnd() { - state.records.currentBox = void 0; -} -const addDetails = function(actorId, text) { - const actor = getActor(actorId); - const elem = document.getElementById(text.text); - try { - const text2 = elem.innerHTML; - const details = JSON.parse(text2); - if (details["properties"]) { - insertProperties(actor, details["properties"]); - } - if (details["links"]) { - insertLinks(actor, details["links"]); - } - } catch (e) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.error("error while parsing actor details text", e); - } -}; -const getActorProperty = function(actor, key) { - if (actor !== void 0 && actor.properties !== void 0) { - return actor.properties[key]; - } - return void 0; -}; -const apply = function(param) { - if (Array.isArray(param)) { - param.forEach(function(item) { - apply(item); - }); - } else { - switch (param.type) { - case "sequenceIndex": - state.records.messages.push({ - from: void 0, - to: void 0, - message: { - start: param.sequenceIndex, - step: param.sequenceIndexStep, - visible: param.sequenceVisible - }, - wrap: false, - type: param.signalType - }); - break; - case "addParticipant": - addActor(param.actor, param.actor, param.description, param.draw); - break; - case "createParticipant": - if (state.records.actors[param.actor]) { - throw new Error( - "It is not possible to have actors with the same id, even if one is destroyed before the next is created. Use 'AS' aliases to simulate the behavior" - ); - } - state.records.lastCreated = param.actor; - addActor(param.actor, param.actor, param.description, param.draw); - state.records.createdActors[param.actor] = state.records.messages.length; - break; - case "destroyParticipant": - state.records.lastDestroyed = param.actor; - state.records.destroyedActors[param.actor] = state.records.messages.length; - break; - case "activeStart": - addSignal(param.actor, void 0, void 0, param.signalType); - break; - case "activeEnd": - addSignal(param.actor, void 0, void 0, param.signalType); - break; - case "addNote": - addNote(param.actor, param.placement, param.text); - break; - case "addLinks": - addLinks(param.actor, param.text); - break; - case "addALink": - addALink(param.actor, param.text); - break; - case "addProperties": - addProperties(param.actor, param.text); - break; - case "addDetails": - addDetails(param.actor, param.text); - break; - case "addMessage": - if (state.records.lastCreated) { - if (param.to !== state.records.lastCreated) { - throw new Error( - "The created participant " + state.records.lastCreated + " does not have an associated creating message after its declaration. Please check the sequence diagram." - ); - } else { - state.records.lastCreated = void 0; - } - } else if (state.records.lastDestroyed) { - if (param.to !== state.records.lastDestroyed && param.from !== state.records.lastDestroyed) { - throw new Error( - "The destroyed participant " + state.records.lastDestroyed + " does not have an associated destroying message after its declaration. Please check the sequence diagram." - ); - } else { - state.records.lastDestroyed = void 0; - } - } - addSignal(param.from, param.to, param.msg, param.signalType, param.activate); - break; - case "boxStart": - addBox(param.boxData); - break; - case "boxEnd": - boxEnd(); - break; - case "loopStart": - addSignal(void 0, void 0, param.loopText, param.signalType); - break; - case "loopEnd": - addSignal(void 0, void 0, void 0, param.signalType); - break; - case "rectStart": - addSignal(void 0, void 0, param.color, param.signalType); - break; - case "rectEnd": - addSignal(void 0, void 0, void 0, param.signalType); - break; - case "optStart": - addSignal(void 0, void 0, param.optText, param.signalType); - break; - case "optEnd": - addSignal(void 0, void 0, void 0, param.signalType); - break; - case "altStart": - addSignal(void 0, void 0, param.altText, param.signalType); - break; - case "else": - addSignal(void 0, void 0, param.altText, param.signalType); - break; - case "altEnd": - addSignal(void 0, void 0, void 0, param.signalType); - break; - case "setAccTitle": - (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.s)(param.text); - break; - case "parStart": - addSignal(void 0, void 0, param.parText, param.signalType); - break; - case "and": - addSignal(void 0, void 0, param.parText, param.signalType); - break; - case "parEnd": - addSignal(void 0, void 0, void 0, param.signalType); - break; - case "criticalStart": - addSignal(void 0, void 0, param.criticalText, param.signalType); - break; - case "option": - addSignal(void 0, void 0, param.optionText, param.signalType); - break; - case "criticalEnd": - addSignal(void 0, void 0, void 0, param.signalType); - break; - case "breakStart": - addSignal(void 0, void 0, param.breakText, param.signalType); - break; - case "breakEnd": - addSignal(void 0, void 0, void 0, param.signalType); - break; - } - } -}; -const db = { - addActor, - addMessage, - addSignal, - addLinks, - addDetails, - addProperties, - autoWrap, - setWrap, - enableSequenceNumbers, - disableSequenceNumbers, - showSequenceNumbers, - getMessages, - getActors, - getCreatedActors, - getDestroyedActors, - getActor, - getActorKeys, - getActorProperty, - getAccTitle: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.g, - getBoxes, - getDiagramTitle: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.t, - setDiagramTitle: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.q, - getConfig: () => (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.c)().sequence, - clear, - parseMessage, - parseBoxData, - LINETYPE, - ARROWTYPE, - PLACEMENT, - addNote, - setAccTitle: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.s, - apply, - setAccDescription: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.b, - getAccDescription: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.a, - hasAtLeastOneBox, - hasAtLeastOneBoxWithTitle -}; -const getStyles = (options) => `.actor { - stroke: ${options.actorBorder}; - fill: ${options.actorBkg}; - } - - text.actor > tspan { - fill: ${options.actorTextColor}; - stroke: none; - } - - .actor-line { - stroke: ${options.actorLineColor}; - } - - .messageLine0 { - stroke-width: 1.5; - stroke-dasharray: none; - stroke: ${options.signalColor}; - } - - .messageLine1 { - stroke-width: 1.5; - stroke-dasharray: 2, 2; - stroke: ${options.signalColor}; - } - - #arrowhead path { - fill: ${options.signalColor}; - stroke: ${options.signalColor}; - } - - .sequenceNumber { - fill: ${options.sequenceNumberColor}; - } - - #sequencenumber { - fill: ${options.signalColor}; - } - - #crosshead path { - fill: ${options.signalColor}; - stroke: ${options.signalColor}; - } - - .messageText { - fill: ${options.signalTextColor}; - stroke: none; - } - - .labelBox { - stroke: ${options.labelBoxBorderColor}; - fill: ${options.labelBoxBkgColor}; - } - - .labelText, .labelText > tspan { - fill: ${options.labelTextColor}; - stroke: none; - } - - .loopText, .loopText > tspan { - fill: ${options.loopTextColor}; - stroke: none; - } - - .loopLine { - stroke-width: 2px; - stroke-dasharray: 2, 2; - stroke: ${options.labelBoxBorderColor}; - fill: ${options.labelBoxBorderColor}; - } - - .note { - //stroke: #decc93; - stroke: ${options.noteBorderColor}; - fill: ${options.noteBkgColor}; - } - - .noteText, .noteText > tspan { - fill: ${options.noteTextColor}; - stroke: none; - } - - .activation0 { - fill: ${options.activationBkgColor}; - stroke: ${options.activationBorderColor}; - } - - .activation1 { - fill: ${options.activationBkgColor}; - stroke: ${options.activationBorderColor}; - } - - .activation2 { - fill: ${options.activationBkgColor}; - stroke: ${options.activationBorderColor}; - } - - .actorPopupMenu { - position: absolute; - } - - .actorPopupMenuPanel { - position: absolute; - fill: ${options.actorBkg}; - box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); - filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4)); -} - .actor-man line { - stroke: ${options.actorBorder}; - fill: ${options.actorBkg}; - } - .actor-man circle, line { - stroke: ${options.actorBorder}; - fill: ${options.actorBkg}; - stroke-width: 2px; - } -`; -const styles = getStyles; -const ACTOR_TYPE_WIDTH = 18 * 2; -const TOP_ACTOR_CLASS = "actor-top"; -const BOTTOM_ACTOR_CLASS = "actor-bottom"; -const drawRect = function(elem, rectData) { - return (0,_svgDrawCommon_08f97a94_js__WEBPACK_IMPORTED_MODULE_5__.d)(elem, rectData); -}; -const drawPopup = function(elem, actor, minMenuWidth, textAttrs, forceMenus) { - if (actor.links === void 0 || actor.links === null || Object.keys(actor.links).length === 0) { - return { height: 0, width: 0 }; - } - const links = actor.links; - const actorCnt2 = actor.actorCnt; - const rectData = actor.rectData; - var displayValue = "none"; - if (forceMenus) { - displayValue = "block !important"; - } - const g = elem.append("g"); - g.attr("id", "actor" + actorCnt2 + "_popup"); - g.attr("class", "actorPopupMenu"); - g.attr("display", displayValue); - var actorClass = ""; - if (rectData.class !== void 0) { - actorClass = " " + rectData.class; - } - let menuWidth = rectData.width > minMenuWidth ? rectData.width : minMenuWidth; - const rectElem = g.append("rect"); - rectElem.attr("class", "actorPopupMenuPanel" + actorClass); - rectElem.attr("x", rectData.x); - rectElem.attr("y", rectData.height); - rectElem.attr("fill", rectData.fill); - rectElem.attr("stroke", rectData.stroke); - rectElem.attr("width", menuWidth); - rectElem.attr("height", rectData.height); - rectElem.attr("rx", rectData.rx); - rectElem.attr("ry", rectData.ry); - if (links != null) { - var linkY = 20; - for (let key in links) { - var linkElem = g.append("a"); - var sanitizedLink = (0,_braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_1__/* .sanitizeUrl */ .Jf)(links[key]); - linkElem.attr("xlink:href", sanitizedLink); - linkElem.attr("target", "_blank"); - _drawMenuItemTextCandidateFunc(textAttrs)( - key, - linkElem, - rectData.x + 10, - rectData.height + linkY, - menuWidth, - 20, - { class: "actor" }, - textAttrs - ); - linkY += 30; - } - } - rectElem.attr("height", linkY); - return { height: rectData.height + linkY, width: menuWidth }; -}; -const popupMenuToggle = function(popId) { - return "var pu = document.getElementById('" + popId + "'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"; -}; -const drawKatex = async function(elem, textData, msgModel = null) { - let textElem = elem.append("foreignObject"); - const lines = await (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.r)(textData.text, (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.F)()); - const divElem = textElem.append("xhtml:div").attr("style", "width: fit-content;").attr("xmlns", "http://www.w3.org/1999/xhtml").html(lines); - const dim = divElem.node().getBoundingClientRect(); - textElem.attr("height", Math.round(dim.height)).attr("width", Math.round(dim.width)); - if (textData.class === "noteText") { - const rectElem = elem.node().firstChild; - rectElem.setAttribute("height", dim.height + 2 * textData.textMargin); - const rectDim = rectElem.getBBox(); - textElem.attr("x", Math.round(rectDim.x + rectDim.width / 2 - dim.width / 2)).attr("y", Math.round(rectDim.y + rectDim.height / 2 - dim.height / 2)); - } else if (msgModel) { - let { startx, stopx, starty } = msgModel; - if (startx > stopx) { - const temp = startx; - startx = stopx; - stopx = temp; - } - textElem.attr("x", Math.round(startx + Math.abs(startx - stopx) / 2 - dim.width / 2)); - if (textData.class === "loopText") { - textElem.attr("y", Math.round(starty)); - } else { - textElem.attr("y", Math.round(starty - dim.height)); - } - } - return [textElem]; -}; -const drawText = function(elem, textData) { - let prevTextHeight = 0; - let textHeight = 0; - const lines = textData.text.split(_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.e.lineBreakRegex); - const [_textFontSize, _textFontSizePx] = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.D)(textData.fontSize); - let textElems = []; - let dy = 0; - let yfunc = () => textData.y; - if (textData.valign !== void 0 && textData.textMargin !== void 0 && textData.textMargin > 0) { - switch (textData.valign) { - case "top": - case "start": - yfunc = () => Math.round(textData.y + textData.textMargin); - break; - case "middle": - case "center": - yfunc = () => Math.round(textData.y + (prevTextHeight + textHeight + textData.textMargin) / 2); - break; - case "bottom": - case "end": - yfunc = () => Math.round( - textData.y + (prevTextHeight + textHeight + 2 * textData.textMargin) - textData.textMargin - ); - break; - } - } - if (textData.anchor !== void 0 && textData.textMargin !== void 0 && textData.width !== void 0) { - switch (textData.anchor) { - case "left": - case "start": - textData.x = Math.round(textData.x + textData.textMargin); - textData.anchor = "start"; - textData.dominantBaseline = "middle"; - textData.alignmentBaseline = "middle"; - break; - case "middle": - case "center": - textData.x = Math.round(textData.x + textData.width / 2); - textData.anchor = "middle"; - textData.dominantBaseline = "middle"; - textData.alignmentBaseline = "middle"; - break; - case "right": - case "end": - textData.x = Math.round(textData.x + textData.width - textData.textMargin); - textData.anchor = "end"; - textData.dominantBaseline = "middle"; - textData.alignmentBaseline = "middle"; - break; - } - } - for (let [i, line] of lines.entries()) { - if (textData.textMargin !== void 0 && textData.textMargin === 0 && _textFontSize !== void 0) { - dy = i * _textFontSize; - } - const textElem = elem.append("text"); - textElem.attr("x", textData.x); - textElem.attr("y", yfunc()); - if (textData.anchor !== void 0) { - textElem.attr("text-anchor", textData.anchor).attr("dominant-baseline", textData.dominantBaseline).attr("alignment-baseline", textData.alignmentBaseline); - } - if (textData.fontFamily !== void 0) { - textElem.style("font-family", textData.fontFamily); - } - if (_textFontSizePx !== void 0) { - textElem.style("font-size", _textFontSizePx); - } - if (textData.fontWeight !== void 0) { - textElem.style("font-weight", textData.fontWeight); - } - if (textData.fill !== void 0) { - textElem.attr("fill", textData.fill); - } - if (textData.class !== void 0) { - textElem.attr("class", textData.class); - } - if (textData.dy !== void 0) { - textElem.attr("dy", textData.dy); - } else if (dy !== 0) { - textElem.attr("dy", dy); - } - const text = line || _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.Z; - if (textData.tspan) { - const span = textElem.append("tspan"); - span.attr("x", textData.x); - if (textData.fill !== void 0) { - span.attr("fill", textData.fill); - } - span.text(text); - } else { - textElem.text(text); - } - if (textData.valign !== void 0 && textData.textMargin !== void 0 && textData.textMargin > 0) { - textHeight += (textElem._groups || textElem)[0][0].getBBox().height; - prevTextHeight = textHeight; - } - textElems.push(textElem); - } - return textElems; -}; -const drawLabel = function(elem, txtObject) { - function genPoints(x, y, width, height, cut) { - return x + "," + y + " " + (x + width) + "," + y + " " + (x + width) + "," + (y + height - cut) + " " + (x + width - cut * 1.2) + "," + (y + height) + " " + x + "," + (y + height); - } - const polygon = elem.append("polygon"); - polygon.attr("points", genPoints(txtObject.x, txtObject.y, txtObject.width, txtObject.height, 7)); - polygon.attr("class", "labelBox"); - txtObject.y = txtObject.y + txtObject.height / 2; - drawText(elem, txtObject); - return polygon; -}; -let actorCnt = -1; -const fixLifeLineHeights = (diagram2, actors, actorKeys, conf2) => { - if (!diagram2.select) { - return; - } - actorKeys.forEach((actorKey) => { - const actor = actors[actorKey]; - const actorDOM = diagram2.select("#actor" + actor.actorCnt); - if (!conf2.mirrorActors && actor.stopy) { - actorDOM.attr("y2", actor.stopy + actor.height / 2); - } else if (conf2.mirrorActors) { - actorDOM.attr("y2", actor.stopy); - } - }); -}; -const drawActorTypeParticipant = async function(elem, actor, conf2, isFooter) { - const actorY = isFooter ? actor.stopy : actor.starty; - const center = actor.x + actor.width / 2; - const centerY = actorY + 5; - const boxplusLineGroup = elem.append("g").lower(); - var g = boxplusLineGroup; - if (!isFooter) { - actorCnt++; - if (Object.keys(actor.links || {}).length && !conf2.forceMenus) { - g.attr("onclick", popupMenuToggle(`actor${actorCnt}_popup`)).attr("cursor", "pointer"); - } - g.append("line").attr("id", "actor" + actorCnt).attr("x1", center).attr("y1", centerY).attr("x2", center).attr("y2", 2e3).attr("class", "actor-line").attr("class", "200").attr("stroke-width", "0.5px").attr("stroke", "#999"); - g = boxplusLineGroup.append("g"); - actor.actorCnt = actorCnt; - if (actor.links != null) { - g.attr("id", "root-" + actorCnt); - } - } - const rect = (0,_svgDrawCommon_08f97a94_js__WEBPACK_IMPORTED_MODULE_5__.g)(); - var cssclass = "actor"; - if (actor.properties != null && actor.properties["class"]) { - cssclass = actor.properties["class"]; - } else { - rect.fill = "#eaeaea"; - } - if (isFooter) { - cssclass += ` ${BOTTOM_ACTOR_CLASS}`; - } else { - cssclass += ` ${TOP_ACTOR_CLASS}`; - } - rect.x = actor.x; - rect.y = actorY; - rect.width = actor.width; - rect.height = actor.height; - rect.class = cssclass; - rect.rx = 3; - rect.ry = 3; - rect.name = actor.name; - const rectElem = drawRect(g, rect); - actor.rectData = rect; - if (actor.properties != null && actor.properties["icon"]) { - const iconSrc = actor.properties["icon"].trim(); - if (iconSrc.charAt(0) === "@") { - (0,_svgDrawCommon_08f97a94_js__WEBPACK_IMPORTED_MODULE_5__.b)(g, rect.x + rect.width - 20, rect.y + 10, iconSrc.substr(1)); - } else { - (0,_svgDrawCommon_08f97a94_js__WEBPACK_IMPORTED_MODULE_5__.c)(g, rect.x + rect.width - 20, rect.y + 10, iconSrc); - } - } - await _drawTextCandidateFunc(conf2, (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.G)(actor.description))( - actor.description, - g, - rect.x, - rect.y, - rect.width, - rect.height, - { class: "actor" }, - conf2 - ); - let height = actor.height; - if (rectElem.node) { - const bounds2 = rectElem.node().getBBox(); - actor.height = bounds2.height; - height = bounds2.height; - } - return height; -}; -const drawActorTypeActor = async function(elem, actor, conf2, isFooter) { - const actorY = isFooter ? actor.stopy : actor.starty; - const center = actor.x + actor.width / 2; - const centerY = actorY + 80; - elem.lower(); - if (!isFooter) { - actorCnt++; - elem.append("line").attr("id", "actor" + actorCnt).attr("x1", center).attr("y1", centerY).attr("x2", center).attr("y2", 2e3).attr("class", "actor-line").attr("class", "200").attr("stroke-width", "0.5px").attr("stroke", "#999"); - actor.actorCnt = actorCnt; - } - const actElem = elem.append("g"); - let cssClass = "actor-man"; - if (isFooter) { - cssClass += ` ${BOTTOM_ACTOR_CLASS}`; - } else { - cssClass += ` ${TOP_ACTOR_CLASS}`; - } - actElem.attr("class", cssClass); - actElem.attr("name", actor.name); - const rect = (0,_svgDrawCommon_08f97a94_js__WEBPACK_IMPORTED_MODULE_5__.g)(); - rect.x = actor.x; - rect.y = actorY; - rect.fill = "#eaeaea"; - rect.width = actor.width; - rect.height = actor.height; - rect.class = "actor"; - rect.rx = 3; - rect.ry = 3; - actElem.append("line").attr("id", "actor-man-torso" + actorCnt).attr("x1", center).attr("y1", actorY + 25).attr("x2", center).attr("y2", actorY + 45); - actElem.append("line").attr("id", "actor-man-arms" + actorCnt).attr("x1", center - ACTOR_TYPE_WIDTH / 2).attr("y1", actorY + 33).attr("x2", center + ACTOR_TYPE_WIDTH / 2).attr("y2", actorY + 33); - actElem.append("line").attr("x1", center - ACTOR_TYPE_WIDTH / 2).attr("y1", actorY + 60).attr("x2", center).attr("y2", actorY + 45); - actElem.append("line").attr("x1", center).attr("y1", actorY + 45).attr("x2", center + ACTOR_TYPE_WIDTH / 2 - 2).attr("y2", actorY + 60); - const circle = actElem.append("circle"); - circle.attr("cx", actor.x + actor.width / 2); - circle.attr("cy", actorY + 10); - circle.attr("r", 15); - circle.attr("width", actor.width); - circle.attr("height", actor.height); - const bounds2 = actElem.node().getBBox(); - actor.height = bounds2.height; - await _drawTextCandidateFunc(conf2, (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.G)(actor.description))( - actor.description, - actElem, - rect.x, - rect.y + 35, - rect.width, - rect.height, - { class: "actor" }, - conf2 - ); - return actor.height; -}; -const drawActor = async function(elem, actor, conf2, isFooter) { - switch (actor.type) { - case "actor": - return await drawActorTypeActor(elem, actor, conf2, isFooter); - case "participant": - return await drawActorTypeParticipant(elem, actor, conf2, isFooter); - } -}; -const drawBox = async function(elem, box, conf2) { - const boxplusTextGroup = elem.append("g"); - const g = boxplusTextGroup; - drawBackgroundRect(g, box); - if (box.name) { - await _drawTextCandidateFunc(conf2)( - box.name, - g, - box.x, - box.y + (box.textMaxHeight || 0) / 2, - box.width, - 0, - { class: "text" }, - conf2 - ); - } - g.lower(); -}; -const anchorElement = function(elem) { - return elem.append("g"); -}; -const drawActivation = function(elem, bounds2, verticalPos, conf2, actorActivations2) { - const rect = (0,_svgDrawCommon_08f97a94_js__WEBPACK_IMPORTED_MODULE_5__.g)(); - const g = bounds2.anchored; - rect.x = bounds2.startx; - rect.y = bounds2.starty; - rect.class = "activation" + actorActivations2 % 3; - rect.width = bounds2.stopx - bounds2.startx; - rect.height = verticalPos - bounds2.starty; - drawRect(g, rect); -}; -const drawLoop = async function(elem, loopModel, labelText, conf2) { - const { - boxMargin, - boxTextMargin, - labelBoxHeight, - labelBoxWidth, - messageFontFamily: fontFamily, - messageFontSize: fontSize, - messageFontWeight: fontWeight - } = conf2; - const g = elem.append("g"); - const drawLoopLine = function(startx, starty, stopx, stopy) { - return g.append("line").attr("x1", startx).attr("y1", starty).attr("x2", stopx).attr("y2", stopy).attr("class", "loopLine"); - }; - drawLoopLine(loopModel.startx, loopModel.starty, loopModel.stopx, loopModel.starty); - drawLoopLine(loopModel.stopx, loopModel.starty, loopModel.stopx, loopModel.stopy); - drawLoopLine(loopModel.startx, loopModel.stopy, loopModel.stopx, loopModel.stopy); - drawLoopLine(loopModel.startx, loopModel.starty, loopModel.startx, loopModel.stopy); - if (loopModel.sections !== void 0) { - loopModel.sections.forEach(function(item) { - drawLoopLine(loopModel.startx, item.y, loopModel.stopx, item.y).style( - "stroke-dasharray", - "3, 3" - ); - }); - } - let txt = (0,_svgDrawCommon_08f97a94_js__WEBPACK_IMPORTED_MODULE_5__.e)(); - txt.text = labelText; - txt.x = loopModel.startx; - txt.y = loopModel.starty; - txt.fontFamily = fontFamily; - txt.fontSize = fontSize; - txt.fontWeight = fontWeight; - txt.anchor = "middle"; - txt.valign = "middle"; - txt.tspan = false; - txt.width = labelBoxWidth || 50; - txt.height = labelBoxHeight || 20; - txt.textMargin = boxTextMargin; - txt.class = "labelText"; - drawLabel(g, txt); - txt = getTextObj(); - txt.text = loopModel.title; - txt.x = loopModel.startx + labelBoxWidth / 2 + (loopModel.stopx - loopModel.startx) / 2; - txt.y = loopModel.starty + boxMargin + boxTextMargin; - txt.anchor = "middle"; - txt.valign = "middle"; - txt.textMargin = boxTextMargin; - txt.class = "loopText"; - txt.fontFamily = fontFamily; - txt.fontSize = fontSize; - txt.fontWeight = fontWeight; - txt.wrap = true; - let textElem = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.G)(txt.text) ? await drawKatex(g, txt, loopModel) : drawText(g, txt); - if (loopModel.sectionTitles !== void 0) { - for (const [idx, item] of Object.entries(loopModel.sectionTitles)) { - if (item.message) { - txt.text = item.message; - txt.x = loopModel.startx + (loopModel.stopx - loopModel.startx) / 2; - txt.y = loopModel.sections[idx].y + boxMargin + boxTextMargin; - txt.class = "loopText"; - txt.anchor = "middle"; - txt.valign = "middle"; - txt.tspan = false; - txt.fontFamily = fontFamily; - txt.fontSize = fontSize; - txt.fontWeight = fontWeight; - txt.wrap = loopModel.wrap; - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.G)(txt.text)) { - loopModel.starty = loopModel.sections[idx].y; - await drawKatex(g, txt, loopModel); - } else { - drawText(g, txt); - } - let sectionHeight = Math.round( - textElem.map((te) => (te._groups || te)[0][0].getBBox().height).reduce((acc, curr) => acc + curr) - ); - loopModel.sections[idx].height += sectionHeight - (boxMargin + boxTextMargin); - } - } - } - loopModel.height = Math.round(loopModel.stopy - loopModel.starty); - return g; -}; -const drawBackgroundRect = function(elem, bounds2) { - (0,_svgDrawCommon_08f97a94_js__WEBPACK_IMPORTED_MODULE_5__.a)(elem, bounds2); -}; -const insertDatabaseIcon = function(elem) { - elem.append("defs").append("symbol").attr("id", "database").attr("fill-rule", "evenodd").attr("clip-rule", "evenodd").append("path").attr("transform", "scale(.5)").attr( - "d", - "M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z" - ); -}; -const insertComputerIcon = function(elem) { - elem.append("defs").append("symbol").attr("id", "computer").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr( - "d", - "M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z" - ); -}; -const insertClockIcon = function(elem) { - elem.append("defs").append("symbol").attr("id", "clock").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr( - "d", - "M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z" - ); -}; -const insertArrowHead = function(elem) { - elem.append("defs").append("marker").attr("id", "arrowhead").attr("refX", 7.9).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z"); -}; -const insertArrowFilledHead = function(elem) { - elem.append("defs").append("marker").attr("id", "filled-head").attr("refX", 15.5).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z"); -}; -const insertSequenceNumber = function(elem) { - elem.append("defs").append("marker").attr("id", "sequencenumber").attr("refX", 15).attr("refY", 15).attr("markerWidth", 60).attr("markerHeight", 40).attr("orient", "auto").append("circle").attr("cx", 15).attr("cy", 15).attr("r", 6); -}; -const insertArrowCrossHead = function(elem) { - const defs = elem.append("defs"); - const marker = defs.append("marker").attr("id", "crosshead").attr("markerWidth", 15).attr("markerHeight", 8).attr("orient", "auto").attr("refX", 4).attr("refY", 4.5); - marker.append("path").attr("fill", "none").attr("stroke", "#000000").style("stroke-dasharray", "0, 0").attr("stroke-width", "1pt").attr("d", "M 1,2 L 6,7 M 6,2 L 1,7"); -}; -const getTextObj = function() { - return { - x: 0, - y: 0, - fill: void 0, - anchor: void 0, - style: "#666", - width: void 0, - height: void 0, - textMargin: 0, - rx: 0, - ry: 0, - tspan: true, - valign: void 0 - }; -}; -const getNoteRect = function() { - return { - x: 0, - y: 0, - fill: "#EDF2AE", - stroke: "#666", - width: 100, - anchor: "start", - height: 100, - rx: 0, - ry: 0 - }; -}; -const _drawTextCandidateFunc = function() { - function byText(content, g, x, y, width, height, textAttrs) { - const text = g.append("text").attr("x", x + width / 2).attr("y", y + height / 2 + 5).style("text-anchor", "middle").text(content); - _setTextAttrs(text, textAttrs); - } - function byTspan(content, g, x, y, width, height, textAttrs, conf2) { - const { actorFontSize, actorFontFamily, actorFontWeight } = conf2; - const [_actorFontSize, _actorFontSizePx] = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.D)(actorFontSize); - const lines = content.split(_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.e.lineBreakRegex); - for (let i = 0; i < lines.length; i++) { - const dy = i * _actorFontSize - _actorFontSize * (lines.length - 1) / 2; - const text = g.append("text").attr("x", x + width / 2).attr("y", y).style("text-anchor", "middle").style("font-size", _actorFontSizePx).style("font-weight", actorFontWeight).style("font-family", actorFontFamily); - text.append("tspan").attr("x", x + width / 2).attr("dy", dy).text(lines[i]); - text.attr("y", y + height / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"); - _setTextAttrs(text, textAttrs); - } - } - function byFo(content, g, x, y, width, height, textAttrs, conf2) { - const s = g.append("switch"); - const f = s.append("foreignObject").attr("x", x).attr("y", y).attr("width", width).attr("height", height); - const text = f.append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%"); - text.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(content); - byTspan(content, s, x, y, width, height, textAttrs, conf2); - _setTextAttrs(text, textAttrs); - } - async function byKatex(content, g, x, y, width, height, textAttrs, conf2) { - const dim = await (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.H)(content, (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.F)()); - const s = g.append("switch"); - const f = s.append("foreignObject").attr("x", x + width / 2 - dim.width / 2).attr("y", y + height / 2 - dim.height / 2).attr("width", dim.width).attr("height", dim.height); - const text = f.append("xhtml:div").style("height", "100%").style("width", "100%"); - text.append("div").style("text-align", "center").style("vertical-align", "middle").html(await (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.r)(content, (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.F)())); - byTspan(content, s, x, y, width, height, textAttrs, conf2); - _setTextAttrs(text, textAttrs); - } - function _setTextAttrs(toText, fromTextAttrsDict) { - for (const key in fromTextAttrsDict) { - if (fromTextAttrsDict.hasOwnProperty(key)) { - toText.attr(key, fromTextAttrsDict[key]); - } - } - } - return function(conf2, hasKatex2 = false) { - if (hasKatex2) { - return byKatex; - } - return conf2.textPlacement === "fo" ? byFo : conf2.textPlacement === "old" ? byText : byTspan; - }; -}(); -const _drawMenuItemTextCandidateFunc = function() { - function byText(content, g, x, y, width, height, textAttrs) { - const text = g.append("text").attr("x", x).attr("y", y).style("text-anchor", "start").text(content); - _setTextAttrs(text, textAttrs); - } - function byTspan(content, g, x, y, width, height, textAttrs, conf2) { - const { actorFontSize, actorFontFamily, actorFontWeight } = conf2; - const lines = content.split(_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.e.lineBreakRegex); - for (let i = 0; i < lines.length; i++) { - const dy = i * actorFontSize - actorFontSize * (lines.length - 1) / 2; - const text = g.append("text").attr("x", x).attr("y", y).style("text-anchor", "start").style("font-size", actorFontSize).style("font-weight", actorFontWeight).style("font-family", actorFontFamily); - text.append("tspan").attr("x", x).attr("dy", dy).text(lines[i]); - text.attr("y", y + height / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"); - _setTextAttrs(text, textAttrs); - } - } - function byFo(content, g, x, y, width, height, textAttrs, conf2) { - const s = g.append("switch"); - const f = s.append("foreignObject").attr("x", x).attr("y", y).attr("width", width).attr("height", height); - const text = f.append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%"); - text.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(content); - byTspan(content, s, x, y, width, height, textAttrs, conf2); - _setTextAttrs(text, textAttrs); - } - function _setTextAttrs(toText, fromTextAttrsDict) { - for (const key in fromTextAttrsDict) { - if (fromTextAttrsDict.hasOwnProperty(key)) { - toText.attr(key, fromTextAttrsDict[key]); - } - } - } - return function(conf2) { - return conf2.textPlacement === "fo" ? byFo : conf2.textPlacement === "old" ? byText : byTspan; - }; -}(); -const svgDraw = { - drawRect, - drawText, - drawLabel, - drawActor, - drawBox, - drawPopup, - anchorElement, - drawActivation, - drawLoop, - drawBackgroundRect, - insertArrowHead, - insertArrowFilledHead, - insertSequenceNumber, - insertArrowCrossHead, - insertDatabaseIcon, - insertComputerIcon, - insertClockIcon, - getTextObj, - getNoteRect, - fixLifeLineHeights, - sanitizeUrl: _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_1__/* .sanitizeUrl */ .Jf -}; -let conf = {}; -const bounds = { - data: { - startx: void 0, - stopx: void 0, - starty: void 0, - stopy: void 0 - }, - verticalPos: 0, - sequenceItems: [], - activations: [], - models: { - getHeight: function() { - return Math.max.apply( - null, - this.actors.length === 0 ? [0] : this.actors.map((actor) => actor.height || 0) - ) + (this.loops.length === 0 ? 0 : this.loops.map((it) => it.height || 0).reduce((acc, h) => acc + h)) + (this.messages.length === 0 ? 0 : this.messages.map((it) => it.height || 0).reduce((acc, h) => acc + h)) + (this.notes.length === 0 ? 0 : this.notes.map((it) => it.height || 0).reduce((acc, h) => acc + h)); - }, - clear: function() { - this.actors = []; - this.boxes = []; - this.loops = []; - this.messages = []; - this.notes = []; - }, - addBox: function(boxModel) { - this.boxes.push(boxModel); - }, - addActor: function(actorModel) { - this.actors.push(actorModel); - }, - addLoop: function(loopModel) { - this.loops.push(loopModel); - }, - addMessage: function(msgModel) { - this.messages.push(msgModel); - }, - addNote: function(noteModel) { - this.notes.push(noteModel); - }, - lastActor: function() { - return this.actors[this.actors.length - 1]; - }, - lastLoop: function() { - return this.loops[this.loops.length - 1]; - }, - lastMessage: function() { - return this.messages[this.messages.length - 1]; - }, - lastNote: function() { - return this.notes[this.notes.length - 1]; - }, - actors: [], - boxes: [], - loops: [], - messages: [], - notes: [] - }, - init: function() { - this.sequenceItems = []; - this.activations = []; - this.models.clear(); - this.data = { - startx: void 0, - stopx: void 0, - starty: void 0, - stopy: void 0 - }; - this.verticalPos = 0; - setConf((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.c)()); - }, - updateVal: function(obj, key, val, fun) { - if (obj[key] === void 0) { - obj[key] = val; - } else { - obj[key] = fun(val, obj[key]); - } - }, - updateBounds: function(startx, starty, stopx, stopy) { - const _self = this; - let cnt = 0; - function updateFn(type) { - return function updateItemBounds(item) { - cnt++; - const n = _self.sequenceItems.length - cnt + 1; - _self.updateVal(item, "starty", starty - n * conf.boxMargin, Math.min); - _self.updateVal(item, "stopy", stopy + n * conf.boxMargin, Math.max); - _self.updateVal(bounds.data, "startx", startx - n * conf.boxMargin, Math.min); - _self.updateVal(bounds.data, "stopx", stopx + n * conf.boxMargin, Math.max); - if (!(type === "activation")) { - _self.updateVal(item, "startx", startx - n * conf.boxMargin, Math.min); - _self.updateVal(item, "stopx", stopx + n * conf.boxMargin, Math.max); - _self.updateVal(bounds.data, "starty", starty - n * conf.boxMargin, Math.min); - _self.updateVal(bounds.data, "stopy", stopy + n * conf.boxMargin, Math.max); - } - }; - } - this.sequenceItems.forEach(updateFn()); - this.activations.forEach(updateFn("activation")); - }, - insert: function(startx, starty, stopx, stopy) { - const _startx = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.e.getMin(startx, stopx); - const _stopx = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(startx, stopx); - const _starty = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.e.getMin(starty, stopy); - const _stopy = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(starty, stopy); - this.updateVal(bounds.data, "startx", _startx, Math.min); - this.updateVal(bounds.data, "starty", _starty, Math.min); - this.updateVal(bounds.data, "stopx", _stopx, Math.max); - this.updateVal(bounds.data, "stopy", _stopy, Math.max); - this.updateBounds(_startx, _starty, _stopx, _stopy); - }, - newActivation: function(message, diagram2, actors) { - const actorRect = actors[message.from.actor]; - const stackedSize = actorActivations(message.from.actor).length || 0; - const x = actorRect.x + actorRect.width / 2 + (stackedSize - 1) * conf.activationWidth / 2; - this.activations.push({ - startx: x, - starty: this.verticalPos + 2, - stopx: x + conf.activationWidth, - stopy: void 0, - actor: message.from.actor, - anchored: svgDraw.anchorElement(diagram2) - }); - }, - endActivation: function(message) { - const lastActorActivationIdx = this.activations.map(function(activation) { - return activation.actor; - }).lastIndexOf(message.from.actor); - return this.activations.splice(lastActorActivationIdx, 1)[0]; - }, - createLoop: function(title = { message: void 0, wrap: false, width: void 0 }, fill) { - return { - startx: void 0, - starty: this.verticalPos, - stopx: void 0, - stopy: void 0, - title: title.message, - wrap: title.wrap, - width: title.width, - height: 0, - fill - }; - }, - newLoop: function(title = { message: void 0, wrap: false, width: void 0 }, fill) { - this.sequenceItems.push(this.createLoop(title, fill)); - }, - endLoop: function() { - return this.sequenceItems.pop(); - }, - isLoopOverlap: function() { - return this.sequenceItems.length ? this.sequenceItems[this.sequenceItems.length - 1].overlap : false; - }, - addSectionToLoop: function(message) { - const loop = this.sequenceItems.pop(); - loop.sections = loop.sections || []; - loop.sectionTitles = loop.sectionTitles || []; - loop.sections.push({ y: bounds.getVerticalPos(), height: 0 }); - loop.sectionTitles.push(message); - this.sequenceItems.push(loop); - }, - saveVerticalPos: function() { - if (this.isLoopOverlap()) { - this.savedVerticalPos = this.verticalPos; - } - }, - resetVerticalPos: function() { - if (this.isLoopOverlap()) { - this.verticalPos = this.savedVerticalPos; - } - }, - bumpVerticalPos: function(bump) { - this.verticalPos = this.verticalPos + bump; - this.data.stopy = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(this.data.stopy, this.verticalPos); - }, - getVerticalPos: function() { - return this.verticalPos; - }, - getBounds: function() { - return { bounds: this.data, models: this.models }; - } -}; -const drawNote = async function(elem, noteModel) { - bounds.bumpVerticalPos(conf.boxMargin); - noteModel.height = conf.boxMargin; - noteModel.starty = bounds.getVerticalPos(); - const rect = (0,_svgDrawCommon_08f97a94_js__WEBPACK_IMPORTED_MODULE_5__.g)(); - rect.x = noteModel.startx; - rect.y = noteModel.starty; - rect.width = noteModel.width || conf.width; - rect.class = "note"; - const g = elem.append("g"); - const rectElem = svgDraw.drawRect(g, rect); - const textObj = (0,_svgDrawCommon_08f97a94_js__WEBPACK_IMPORTED_MODULE_5__.e)(); - textObj.x = noteModel.startx; - textObj.y = noteModel.starty; - textObj.width = rect.width; - textObj.dy = "1em"; - textObj.text = noteModel.message; - textObj.class = "noteText"; - textObj.fontFamily = conf.noteFontFamily; - textObj.fontSize = conf.noteFontSize; - textObj.fontWeight = conf.noteFontWeight; - textObj.anchor = conf.noteAlign; - textObj.textMargin = conf.noteMargin; - textObj.valign = "center"; - const textElem = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.G)(textObj.text) ? await drawKatex(g, textObj) : drawText(g, textObj); - const textHeight = Math.round( - textElem.map((te) => (te._groups || te)[0][0].getBBox().height).reduce((acc, curr) => acc + curr) - ); - rectElem.attr("height", textHeight + 2 * conf.noteMargin); - noteModel.height += textHeight + 2 * conf.noteMargin; - bounds.bumpVerticalPos(textHeight + 2 * conf.noteMargin); - noteModel.stopy = noteModel.starty + textHeight + 2 * conf.noteMargin; - noteModel.stopx = noteModel.startx + rect.width; - bounds.insert(noteModel.startx, noteModel.starty, noteModel.stopx, noteModel.stopy); - bounds.models.addNote(noteModel); -}; -const messageFont = (cnf) => { - return { - fontFamily: cnf.messageFontFamily, - fontSize: cnf.messageFontSize, - fontWeight: cnf.messageFontWeight - }; -}; -const noteFont = (cnf) => { - return { - fontFamily: cnf.noteFontFamily, - fontSize: cnf.noteFontSize, - fontWeight: cnf.noteFontWeight - }; -}; -const actorFont = (cnf) => { - return { - fontFamily: cnf.actorFontFamily, - fontSize: cnf.actorFontSize, - fontWeight: cnf.actorFontWeight - }; -}; -async function boundMessage(_diagram, msgModel) { - bounds.bumpVerticalPos(10); - const { startx, stopx, message } = msgModel; - const lines = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.e.splitBreaks(message).length; - const isKatexMsg = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.G)(message); - const textDims = isKatexMsg ? await (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.H)(message, (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.c)()) : _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.u.calculateTextDimensions(message, messageFont(conf)); - if (!isKatexMsg) { - const lineHeight = textDims.height / lines; - msgModel.height += lineHeight; - bounds.bumpVerticalPos(lineHeight); - } - let lineStartY; - let totalOffset = textDims.height - 10; - const textWidth = textDims.width; - if (startx === stopx) { - lineStartY = bounds.getVerticalPos() + totalOffset; - if (!conf.rightAngles) { - totalOffset += conf.boxMargin; - lineStartY = bounds.getVerticalPos() + totalOffset; - } - totalOffset += 30; - const dx = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(textWidth / 2, conf.width / 2); - bounds.insert( - startx - dx, - bounds.getVerticalPos() - 10 + totalOffset, - stopx + dx, - bounds.getVerticalPos() + 30 + totalOffset - ); - } else { - totalOffset += conf.boxMargin; - lineStartY = bounds.getVerticalPos() + totalOffset; - bounds.insert(startx, lineStartY - 10, stopx, lineStartY); - } - bounds.bumpVerticalPos(totalOffset); - msgModel.height += totalOffset; - msgModel.stopy = msgModel.starty + msgModel.height; - bounds.insert(msgModel.fromBounds, msgModel.starty, msgModel.toBounds, msgModel.stopy); - return lineStartY; -} -const drawMessage = async function(diagram2, msgModel, lineStartY, diagObj) { - const { startx, stopx, starty, message, type, sequenceIndex, sequenceVisible } = msgModel; - const textDims = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.u.calculateTextDimensions(message, messageFont(conf)); - const textObj = (0,_svgDrawCommon_08f97a94_js__WEBPACK_IMPORTED_MODULE_5__.e)(); - textObj.x = startx; - textObj.y = starty + 10; - textObj.width = stopx - startx; - textObj.class = "messageText"; - textObj.dy = "1em"; - textObj.text = message; - textObj.fontFamily = conf.messageFontFamily; - textObj.fontSize = conf.messageFontSize; - textObj.fontWeight = conf.messageFontWeight; - textObj.anchor = conf.messageAlign; - textObj.valign = "center"; - textObj.textMargin = conf.wrapPadding; - textObj.tspan = false; - (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.G)(textObj.text) ? await drawKatex(diagram2, textObj, { startx, stopx, starty: lineStartY }) : drawText(diagram2, textObj); - const textWidth = textDims.width; - let line; - if (startx === stopx) { - if (conf.rightAngles) { - line = diagram2.append("path").attr( - "d", - `M ${startx},${lineStartY} H ${startx + _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(conf.width / 2, textWidth / 2)} V ${lineStartY + 25} H ${startx}` - ); - } else { - line = diagram2.append("path").attr( - "d", - "M " + startx + "," + lineStartY + " C " + (startx + 60) + "," + (lineStartY - 10) + " " + (startx + 60) + "," + (lineStartY + 30) + " " + startx + "," + (lineStartY + 20) - ); - } - } else { - line = diagram2.append("line"); - line.attr("x1", startx); - line.attr("y1", lineStartY); - line.attr("x2", stopx); - line.attr("y2", lineStartY); - } - if (type === diagObj.db.LINETYPE.DOTTED || type === diagObj.db.LINETYPE.DOTTED_CROSS || type === diagObj.db.LINETYPE.DOTTED_POINT || type === diagObj.db.LINETYPE.DOTTED_OPEN) { - line.style("stroke-dasharray", "3, 3"); - line.attr("class", "messageLine1"); - } else { - line.attr("class", "messageLine0"); - } - let url = ""; - if (conf.arrowMarkerAbsolute) { - url = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search; - url = url.replace(/\(/g, "\\("); - url = url.replace(/\)/g, "\\)"); - } - line.attr("stroke-width", 2); - line.attr("stroke", "none"); - line.style("fill", "none"); - if (type === diagObj.db.LINETYPE.SOLID || type === diagObj.db.LINETYPE.DOTTED) { - line.attr("marker-end", "url(" + url + "#arrowhead)"); - } - if (type === diagObj.db.LINETYPE.SOLID_POINT || type === diagObj.db.LINETYPE.DOTTED_POINT) { - line.attr("marker-end", "url(" + url + "#filled-head)"); - } - if (type === diagObj.db.LINETYPE.SOLID_CROSS || type === diagObj.db.LINETYPE.DOTTED_CROSS) { - line.attr("marker-end", "url(" + url + "#crosshead)"); - } - if (sequenceVisible || conf.showSequenceNumbers) { - line.attr("marker-start", "url(" + url + "#sequencenumber)"); - diagram2.append("text").attr("x", startx).attr("y", lineStartY + 4).attr("font-family", "sans-serif").attr("font-size", "12px").attr("text-anchor", "middle").attr("class", "sequenceNumber").text(sequenceIndex); - } -}; -const addActorRenderingData = async function(diagram2, actors, createdActors, actorKeys, verticalPos, messages, isFooter) { - let prevWidth = 0; - let prevMargin = 0; - let prevBox = void 0; - let maxHeight = 0; - for (const actorKey of actorKeys) { - const actor = actors[actorKey]; - const box = actor.box; - if (prevBox && prevBox != box) { - if (!isFooter) { - bounds.models.addBox(prevBox); - } - prevMargin += conf.boxMargin + prevBox.margin; - } - if (box && box != prevBox) { - if (!isFooter) { - box.x = prevWidth + prevMargin; - box.y = verticalPos; - } - prevMargin += box.margin; - } - actor.width = actor.width || conf.width; - actor.height = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(actor.height || conf.height, conf.height); - actor.margin = actor.margin || conf.actorMargin; - maxHeight = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(maxHeight, actor.height); - if (createdActors[actor.name]) { - prevMargin += actor.width / 2; - } - actor.x = prevWidth + prevMargin; - actor.starty = bounds.getVerticalPos(); - bounds.insert(actor.x, verticalPos, actor.x + actor.width, actor.height); - prevWidth += actor.width + prevMargin; - if (actor.box) { - actor.box.width = prevWidth + box.margin - actor.box.x; - } - prevMargin = actor.margin; - prevBox = actor.box; - bounds.models.addActor(actor); - } - if (prevBox && !isFooter) { - bounds.models.addBox(prevBox); - } - bounds.bumpVerticalPos(maxHeight); -}; -const drawActors = async function(diagram2, actors, actorKeys, isFooter) { - if (!isFooter) { - for (const actorKey of actorKeys) { - const actor = actors[actorKey]; - await svgDraw.drawActor(diagram2, actor, conf, false); - } - } else { - let maxHeight = 0; - bounds.bumpVerticalPos(conf.boxMargin * 2); - for (const actorKey of actorKeys) { - const actor = actors[actorKey]; - if (!actor.stopy) { - actor.stopy = bounds.getVerticalPos(); - } - const height = await svgDraw.drawActor(diagram2, actor, conf, true); - maxHeight = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(maxHeight, height); - } - bounds.bumpVerticalPos(maxHeight + conf.boxMargin); - } -}; -const drawActorsPopup = function(diagram2, actors, actorKeys, doc) { - let maxHeight = 0; - let maxWidth = 0; - for (const actorKey of actorKeys) { - const actor = actors[actorKey]; - const minMenuWidth = getRequiredPopupWidth(actor); - const menuDimensions = svgDraw.drawPopup( - diagram2, - actor, - minMenuWidth, - conf, - conf.forceMenus, - doc - ); - if (menuDimensions.height > maxHeight) { - maxHeight = menuDimensions.height; - } - if (menuDimensions.width + actor.x > maxWidth) { - maxWidth = menuDimensions.width + actor.x; - } - } - return { maxHeight, maxWidth }; -}; -const setConf = function(cnf) { - (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.f)(conf, cnf); - if (cnf.fontFamily) { - conf.actorFontFamily = conf.noteFontFamily = conf.messageFontFamily = cnf.fontFamily; - } - if (cnf.fontSize) { - conf.actorFontSize = conf.noteFontSize = conf.messageFontSize = cnf.fontSize; - } - if (cnf.fontWeight) { - conf.actorFontWeight = conf.noteFontWeight = conf.messageFontWeight = cnf.fontWeight; - } -}; -const actorActivations = function(actor) { - return bounds.activations.filter(function(activation) { - return activation.actor === actor; - }); -}; -const activationBounds = function(actor, actors) { - const actorObj = actors[actor]; - const activations = actorActivations(actor); - const left = activations.reduce(function(acc, activation) { - return _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.e.getMin(acc, activation.startx); - }, actorObj.x + actorObj.width / 2 - 1); - const right = activations.reduce(function(acc, activation) { - return _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(acc, activation.stopx); - }, actorObj.x + actorObj.width / 2 + 1); - return [left, right]; -}; -function adjustLoopHeightForWrap(loopWidths, msg, preMargin, postMargin, addLoopFn) { - bounds.bumpVerticalPos(preMargin); - let heightAdjust = postMargin; - if (msg.id && msg.message && loopWidths[msg.id]) { - const loopWidth = loopWidths[msg.id].width; - const textConf = messageFont(conf); - msg.message = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.u.wrapLabel(`[${msg.message}]`, loopWidth - 2 * conf.wrapPadding, textConf); - msg.width = loopWidth; - msg.wrap = true; - const textDims = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.u.calculateTextDimensions(msg.message, textConf); - const totalOffset = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(textDims.height, conf.labelBoxHeight); - heightAdjust = postMargin + totalOffset; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug(`${totalOffset} - ${msg.message}`); - } - addLoopFn(msg); - bounds.bumpVerticalPos(heightAdjust); -} -function adjustCreatedDestroyedData(msg, msgModel, lineStartY, index, actors, createdActors, destroyedActors) { - function receiverAdjustment(actor, adjustment) { - if (actor.x < actors[msg.from].x) { - bounds.insert( - msgModel.stopx - adjustment, - msgModel.starty, - msgModel.startx, - msgModel.stopy + actor.height / 2 + conf.noteMargin - ); - msgModel.stopx = msgModel.stopx + adjustment; - } else { - bounds.insert( - msgModel.startx, - msgModel.starty, - msgModel.stopx + adjustment, - msgModel.stopy + actor.height / 2 + conf.noteMargin - ); - msgModel.stopx = msgModel.stopx - adjustment; - } - } - function senderAdjustment(actor, adjustment) { - if (actor.x < actors[msg.to].x) { - bounds.insert( - msgModel.startx - adjustment, - msgModel.starty, - msgModel.stopx, - msgModel.stopy + actor.height / 2 + conf.noteMargin - ); - msgModel.startx = msgModel.startx + adjustment; - } else { - bounds.insert( - msgModel.stopx, - msgModel.starty, - msgModel.startx + adjustment, - msgModel.stopy + actor.height / 2 + conf.noteMargin - ); - msgModel.startx = msgModel.startx - adjustment; - } - } - if (createdActors[msg.to] == index) { - const actor = actors[msg.to]; - const adjustment = actor.type == "actor" ? ACTOR_TYPE_WIDTH / 2 + 3 : actor.width / 2 + 3; - receiverAdjustment(actor, adjustment); - actor.starty = lineStartY - actor.height / 2; - bounds.bumpVerticalPos(actor.height / 2); - } else if (destroyedActors[msg.from] == index) { - const actor = actors[msg.from]; - if (conf.mirrorActors) { - const adjustment = actor.type == "actor" ? ACTOR_TYPE_WIDTH / 2 : actor.width / 2; - senderAdjustment(actor, adjustment); - } - actor.stopy = lineStartY - actor.height / 2; - bounds.bumpVerticalPos(actor.height / 2); - } else if (destroyedActors[msg.to] == index) { - const actor = actors[msg.to]; - if (conf.mirrorActors) { - const adjustment = actor.type == "actor" ? ACTOR_TYPE_WIDTH / 2 + 3 : actor.width / 2 + 3; - receiverAdjustment(actor, adjustment); - } - actor.stopy = lineStartY - actor.height / 2; - bounds.bumpVerticalPos(actor.height / 2); - } -} -const draw = async function(_text, id, _version, diagObj) { - const { securityLevel, sequence } = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.c)(); - conf = sequence; - let sandboxElement; - if (securityLevel === "sandbox") { - sandboxElement = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)("#i" + id); - } - const root = securityLevel === "sandbox" ? (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(sandboxElement.nodes()[0].contentDocument.body) : (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)("body"); - const doc = securityLevel === "sandbox" ? sandboxElement.nodes()[0].contentDocument : document; - bounds.init(); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug(diagObj.db); - const diagram2 = securityLevel === "sandbox" ? root.select(`[id="${id}"]`) : (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(`[id="${id}"]`); - const actors = diagObj.db.getActors(); - const createdActors = diagObj.db.getCreatedActors(); - const destroyedActors = diagObj.db.getDestroyedActors(); - const boxes = diagObj.db.getBoxes(); - let actorKeys = diagObj.db.getActorKeys(); - const messages = diagObj.db.getMessages(); - const title = diagObj.db.getDiagramTitle(); - const hasBoxes = diagObj.db.hasAtLeastOneBox(); - const hasBoxTitles = diagObj.db.hasAtLeastOneBoxWithTitle(); - const maxMessageWidthPerActor = await getMaxMessageWidthPerActor(actors, messages, diagObj); - conf.height = await calculateActorMargins(actors, maxMessageWidthPerActor, boxes); - svgDraw.insertComputerIcon(diagram2); - svgDraw.insertDatabaseIcon(diagram2); - svgDraw.insertClockIcon(diagram2); - if (hasBoxes) { - bounds.bumpVerticalPos(conf.boxMargin); - if (hasBoxTitles) { - bounds.bumpVerticalPos(boxes[0].textMaxHeight); - } - } - if (conf.hideUnusedParticipants === true) { - const newActors = /* @__PURE__ */ new Set(); - messages.forEach((message) => { - newActors.add(message.from); - newActors.add(message.to); - }); - actorKeys = actorKeys.filter((actorKey) => newActors.has(actorKey)); - } - await addActorRenderingData(diagram2, actors, createdActors, actorKeys, 0, messages, false); - const loopWidths = await calculateLoopBounds(messages, actors, maxMessageWidthPerActor, diagObj); - svgDraw.insertArrowHead(diagram2); - svgDraw.insertArrowCrossHead(diagram2); - svgDraw.insertArrowFilledHead(diagram2); - svgDraw.insertSequenceNumber(diagram2); - function activeEnd(msg, verticalPos) { - const activationData = bounds.endActivation(msg); - if (activationData.starty + 18 > verticalPos) { - activationData.starty = verticalPos - 6; - verticalPos += 12; - } - svgDraw.drawActivation( - diagram2, - activationData, - verticalPos, - conf, - actorActivations(msg.from.actor).length - ); - bounds.insert(activationData.startx, verticalPos - 10, activationData.stopx, verticalPos); - } - let sequenceIndex = 1; - let sequenceIndexStep = 1; - const messagesToDraw = []; - const backgrounds = []; - let index = 0; - for (const msg of messages) { - let loopModel, noteModel, msgModel; - switch (msg.type) { - case diagObj.db.LINETYPE.NOTE: - bounds.resetVerticalPos(); - noteModel = msg.noteModel; - await drawNote(diagram2, noteModel); - break; - case diagObj.db.LINETYPE.ACTIVE_START: - bounds.newActivation(msg, diagram2, actors); - break; - case diagObj.db.LINETYPE.ACTIVE_END: - activeEnd(msg, bounds.getVerticalPos()); - break; - case diagObj.db.LINETYPE.LOOP_START: - adjustLoopHeightForWrap( - loopWidths, - msg, - conf.boxMargin, - conf.boxMargin + conf.boxTextMargin, - (message) => bounds.newLoop(message) - ); - break; - case diagObj.db.LINETYPE.LOOP_END: - loopModel = bounds.endLoop(); - await svgDraw.drawLoop(diagram2, loopModel, "loop", conf); - bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos()); - bounds.models.addLoop(loopModel); - break; - case diagObj.db.LINETYPE.RECT_START: - adjustLoopHeightForWrap( - loopWidths, - msg, - conf.boxMargin, - conf.boxMargin, - (message) => bounds.newLoop(void 0, message.message) - ); - break; - case diagObj.db.LINETYPE.RECT_END: - loopModel = bounds.endLoop(); - backgrounds.push(loopModel); - bounds.models.addLoop(loopModel); - bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos()); - break; - case diagObj.db.LINETYPE.OPT_START: - adjustLoopHeightForWrap( - loopWidths, - msg, - conf.boxMargin, - conf.boxMargin + conf.boxTextMargin, - (message) => bounds.newLoop(message) - ); - break; - case diagObj.db.LINETYPE.OPT_END: - loopModel = bounds.endLoop(); - await svgDraw.drawLoop(diagram2, loopModel, "opt", conf); - bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos()); - bounds.models.addLoop(loopModel); - break; - case diagObj.db.LINETYPE.ALT_START: - adjustLoopHeightForWrap( - loopWidths, - msg, - conf.boxMargin, - conf.boxMargin + conf.boxTextMargin, - (message) => bounds.newLoop(message) - ); - break; - case diagObj.db.LINETYPE.ALT_ELSE: - adjustLoopHeightForWrap( - loopWidths, - msg, - conf.boxMargin + conf.boxTextMargin, - conf.boxMargin, - (message) => bounds.addSectionToLoop(message) - ); - break; - case diagObj.db.LINETYPE.ALT_END: - loopModel = bounds.endLoop(); - await svgDraw.drawLoop(diagram2, loopModel, "alt", conf); - bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos()); - bounds.models.addLoop(loopModel); - break; - case diagObj.db.LINETYPE.PAR_START: - case diagObj.db.LINETYPE.PAR_OVER_START: - adjustLoopHeightForWrap( - loopWidths, - msg, - conf.boxMargin, - conf.boxMargin + conf.boxTextMargin, - (message) => bounds.newLoop(message) - ); - bounds.saveVerticalPos(); - break; - case diagObj.db.LINETYPE.PAR_AND: - adjustLoopHeightForWrap( - loopWidths, - msg, - conf.boxMargin + conf.boxTextMargin, - conf.boxMargin, - (message) => bounds.addSectionToLoop(message) - ); - break; - case diagObj.db.LINETYPE.PAR_END: - loopModel = bounds.endLoop(); - await svgDraw.drawLoop(diagram2, loopModel, "par", conf); - bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos()); - bounds.models.addLoop(loopModel); - break; - case diagObj.db.LINETYPE.AUTONUMBER: - sequenceIndex = msg.message.start || sequenceIndex; - sequenceIndexStep = msg.message.step || sequenceIndexStep; - if (msg.message.visible) { - diagObj.db.enableSequenceNumbers(); - } else { - diagObj.db.disableSequenceNumbers(); - } - break; - case diagObj.db.LINETYPE.CRITICAL_START: - adjustLoopHeightForWrap( - loopWidths, - msg, - conf.boxMargin, - conf.boxMargin + conf.boxTextMargin, - (message) => bounds.newLoop(message) - ); - break; - case diagObj.db.LINETYPE.CRITICAL_OPTION: - adjustLoopHeightForWrap( - loopWidths, - msg, - conf.boxMargin + conf.boxTextMargin, - conf.boxMargin, - (message) => bounds.addSectionToLoop(message) - ); - break; - case diagObj.db.LINETYPE.CRITICAL_END: - loopModel = bounds.endLoop(); - await svgDraw.drawLoop(diagram2, loopModel, "critical", conf); - bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos()); - bounds.models.addLoop(loopModel); - break; - case diagObj.db.LINETYPE.BREAK_START: - adjustLoopHeightForWrap( - loopWidths, - msg, - conf.boxMargin, - conf.boxMargin + conf.boxTextMargin, - (message) => bounds.newLoop(message) - ); - break; - case diagObj.db.LINETYPE.BREAK_END: - loopModel = bounds.endLoop(); - await svgDraw.drawLoop(diagram2, loopModel, "break", conf); - bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos()); - bounds.models.addLoop(loopModel); - break; - default: - try { - msgModel = msg.msgModel; - msgModel.starty = bounds.getVerticalPos(); - msgModel.sequenceIndex = sequenceIndex; - msgModel.sequenceVisible = diagObj.db.showSequenceNumbers(); - const lineStartY = await boundMessage(diagram2, msgModel); - adjustCreatedDestroyedData( - msg, - msgModel, - lineStartY, - index, - actors, - createdActors, - destroyedActors - ); - messagesToDraw.push({ messageModel: msgModel, lineStartY }); - bounds.models.addMessage(msgModel); - } catch (e) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.error("error while drawing message", e); - } - } - if ([ - diagObj.db.LINETYPE.SOLID_OPEN, - diagObj.db.LINETYPE.DOTTED_OPEN, - diagObj.db.LINETYPE.SOLID, - diagObj.db.LINETYPE.DOTTED, - diagObj.db.LINETYPE.SOLID_CROSS, - diagObj.db.LINETYPE.DOTTED_CROSS, - diagObj.db.LINETYPE.SOLID_POINT, - diagObj.db.LINETYPE.DOTTED_POINT - ].includes(msg.type)) { - sequenceIndex = sequenceIndex + sequenceIndexStep; - } - index++; - } - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("createdActors", createdActors); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("destroyedActors", destroyedActors); - await drawActors(diagram2, actors, actorKeys, false); - for (const e of messagesToDraw) { - await drawMessage(diagram2, e.messageModel, e.lineStartY, diagObj); - } - if (conf.mirrorActors) { - await drawActors(diagram2, actors, actorKeys, true); - } - backgrounds.forEach((e) => svgDraw.drawBackgroundRect(diagram2, e)); - fixLifeLineHeights(diagram2, actors, actorKeys, conf); - for (const box2 of bounds.models.boxes) { - box2.height = bounds.getVerticalPos() - box2.y; - bounds.insert(box2.x, box2.y, box2.x + box2.width, box2.height); - box2.startx = box2.x; - box2.starty = box2.y; - box2.stopx = box2.startx + box2.width; - box2.stopy = box2.starty + box2.height; - box2.stroke = "rgb(0,0,0, 0.5)"; - await svgDraw.drawBox(diagram2, box2, conf); - } - if (hasBoxes) { - bounds.bumpVerticalPos(conf.boxMargin); - } - const requiredBoxSize = drawActorsPopup(diagram2, actors, actorKeys, doc); - const { bounds: box } = bounds.getBounds(); - let boxHeight = box.stopy - box.starty; - if (boxHeight < requiredBoxSize.maxHeight) { - boxHeight = requiredBoxSize.maxHeight; - } - let height = boxHeight + 2 * conf.diagramMarginY; - if (conf.mirrorActors) { - height = height - conf.boxMargin + conf.bottomMarginAdj; - } - let boxWidth = box.stopx - box.startx; - if (boxWidth < requiredBoxSize.maxWidth) { - boxWidth = requiredBoxSize.maxWidth; - } - const width = boxWidth + 2 * conf.diagramMarginX; - if (title) { - diagram2.append("text").text(title).attr("x", (box.stopx - box.startx) / 2 - 2 * conf.diagramMarginX).attr("y", -25); - } - (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.i)(diagram2, height, width, conf.useMaxWidth); - const extraVertForTitle = title ? 40 : 0; - diagram2.attr( - "viewBox", - box.startx - conf.diagramMarginX + " -" + (conf.diagramMarginY + extraVertForTitle) + " " + width + " " + (height + extraVertForTitle) - ); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug(`models:`, bounds.models); -}; -async function getMaxMessageWidthPerActor(actors, messages, diagObj) { - const maxMessageWidthPerActor = {}; - for (const msg of messages) { - if (actors[msg.to] && actors[msg.from]) { - const actor = actors[msg.to]; - if (msg.placement === diagObj.db.PLACEMENT.LEFTOF && !actor.prevActor) { - continue; - } - if (msg.placement === diagObj.db.PLACEMENT.RIGHTOF && !actor.nextActor) { - continue; - } - const isNote = msg.placement !== void 0; - const isMessage = !isNote; - const textFont = isNote ? noteFont(conf) : messageFont(conf); - const wrappedMessage = msg.wrap ? _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.u.wrapLabel(msg.message, conf.width - 2 * conf.wrapPadding, textFont) : msg.message; - const messageDimensions = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.G)(wrappedMessage) ? await (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.H)(msg.message, (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.c)()) : _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.u.calculateTextDimensions(wrappedMessage, textFont); - const messageWidth = messageDimensions.width + 2 * conf.wrapPadding; - if (isMessage && msg.from === actor.nextActor) { - maxMessageWidthPerActor[msg.to] = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax( - maxMessageWidthPerActor[msg.to] || 0, - messageWidth - ); - } else if (isMessage && msg.from === actor.prevActor) { - maxMessageWidthPerActor[msg.from] = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax( - maxMessageWidthPerActor[msg.from] || 0, - messageWidth - ); - } else if (isMessage && msg.from === msg.to) { - maxMessageWidthPerActor[msg.from] = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax( - maxMessageWidthPerActor[msg.from] || 0, - messageWidth / 2 - ); - maxMessageWidthPerActor[msg.to] = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax( - maxMessageWidthPerActor[msg.to] || 0, - messageWidth / 2 - ); - } else if (msg.placement === diagObj.db.PLACEMENT.RIGHTOF) { - maxMessageWidthPerActor[msg.from] = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax( - maxMessageWidthPerActor[msg.from] || 0, - messageWidth - ); - } else if (msg.placement === diagObj.db.PLACEMENT.LEFTOF) { - maxMessageWidthPerActor[actor.prevActor] = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax( - maxMessageWidthPerActor[actor.prevActor] || 0, - messageWidth - ); - } else if (msg.placement === diagObj.db.PLACEMENT.OVER) { - if (actor.prevActor) { - maxMessageWidthPerActor[actor.prevActor] = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax( - maxMessageWidthPerActor[actor.prevActor] || 0, - messageWidth / 2 - ); - } - if (actor.nextActor) { - maxMessageWidthPerActor[msg.from] = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax( - maxMessageWidthPerActor[msg.from] || 0, - messageWidth / 2 - ); - } - } - } - } - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("maxMessageWidthPerActor:", maxMessageWidthPerActor); - return maxMessageWidthPerActor; -} -const getRequiredPopupWidth = function(actor) { - let requiredPopupWidth = 0; - const textFont = actorFont(conf); - for (const key in actor.links) { - const labelDimensions = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.u.calculateTextDimensions(key, textFont); - const labelWidth = labelDimensions.width + 2 * conf.wrapPadding + 2 * conf.boxMargin; - if (requiredPopupWidth < labelWidth) { - requiredPopupWidth = labelWidth; - } - } - return requiredPopupWidth; -}; -async function calculateActorMargins(actors, actorToMessageWidth, boxes) { - let maxHeight = 0; - for (const prop of Object.keys(actors)) { - const actor = actors[prop]; - if (actor.wrap) { - actor.description = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.u.wrapLabel( - actor.description, - conf.width - 2 * conf.wrapPadding, - actorFont(conf) - ); - } - const actDims = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.G)(actor.description) ? await (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.H)(actor.description, (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.c)()) : _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.u.calculateTextDimensions(actor.description, actorFont(conf)); - actor.width = actor.wrap ? conf.width : _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(conf.width, actDims.width + 2 * conf.wrapPadding); - actor.height = actor.wrap ? _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(actDims.height, conf.height) : conf.height; - maxHeight = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(maxHeight, actor.height); - } - for (const actorKey in actorToMessageWidth) { - const actor = actors[actorKey]; - if (!actor) { - continue; - } - const nextActor = actors[actor.nextActor]; - if (!nextActor) { - const messageWidth2 = actorToMessageWidth[actorKey]; - const actorWidth2 = messageWidth2 + conf.actorMargin - actor.width / 2; - actor.margin = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(actorWidth2, conf.actorMargin); - continue; - } - const messageWidth = actorToMessageWidth[actorKey]; - const actorWidth = messageWidth + conf.actorMargin - actor.width / 2 - nextActor.width / 2; - actor.margin = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(actorWidth, conf.actorMargin); - } - let maxBoxHeight = 0; - boxes.forEach((box) => { - const textFont = messageFont(conf); - let totalWidth = box.actorKeys.reduce((total, aKey) => { - return total += actors[aKey].width + (actors[aKey].margin || 0); - }, 0); - totalWidth -= 2 * conf.boxTextMargin; - if (box.wrap) { - box.name = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.u.wrapLabel(box.name, totalWidth - 2 * conf.wrapPadding, textFont); - } - const boxMsgDimensions = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.u.calculateTextDimensions(box.name, textFont); - maxBoxHeight = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(boxMsgDimensions.height, maxBoxHeight); - const minWidth = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(totalWidth, boxMsgDimensions.width + 2 * conf.wrapPadding); - box.margin = conf.boxTextMargin; - if (totalWidth < minWidth) { - const missing = (minWidth - totalWidth) / 2; - box.margin += missing; - } - }); - boxes.forEach((box) => box.textMaxHeight = maxBoxHeight); - return _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(maxHeight, conf.height); -} -const buildNoteModel = async function(msg, actors, diagObj) { - const startx = actors[msg.from].x; - const stopx = actors[msg.to].x; - const shouldWrap = msg.wrap && msg.message; - let textDimensions = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.G)(msg.message) ? await (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.H)(msg.message, (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.c)()) : _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.u.calculateTextDimensions( - shouldWrap ? _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.u.wrapLabel(msg.message, conf.width, noteFont(conf)) : msg.message, - noteFont(conf) - ); - const noteModel = { - width: shouldWrap ? conf.width : _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(conf.width, textDimensions.width + 2 * conf.noteMargin), - height: 0, - startx: actors[msg.from].x, - stopx: 0, - starty: 0, - stopy: 0, - message: msg.message - }; - if (msg.placement === diagObj.db.PLACEMENT.RIGHTOF) { - noteModel.width = shouldWrap ? _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(conf.width, textDimensions.width) : _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax( - actors[msg.from].width / 2 + actors[msg.to].width / 2, - textDimensions.width + 2 * conf.noteMargin - ); - noteModel.startx = startx + (actors[msg.from].width + conf.actorMargin) / 2; - } else if (msg.placement === diagObj.db.PLACEMENT.LEFTOF) { - noteModel.width = shouldWrap ? _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(conf.width, textDimensions.width + 2 * conf.noteMargin) : _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax( - actors[msg.from].width / 2 + actors[msg.to].width / 2, - textDimensions.width + 2 * conf.noteMargin - ); - noteModel.startx = startx - noteModel.width + (actors[msg.from].width - conf.actorMargin) / 2; - } else if (msg.to === msg.from) { - textDimensions = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.u.calculateTextDimensions( - shouldWrap ? _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.u.wrapLabel( - msg.message, - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(conf.width, actors[msg.from].width), - noteFont(conf) - ) : msg.message, - noteFont(conf) - ); - noteModel.width = shouldWrap ? _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(conf.width, actors[msg.from].width) : _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax( - actors[msg.from].width, - conf.width, - textDimensions.width + 2 * conf.noteMargin - ); - noteModel.startx = startx + (actors[msg.from].width - noteModel.width) / 2; - } else { - noteModel.width = Math.abs(startx + actors[msg.from].width / 2 - (stopx + actors[msg.to].width / 2)) + conf.actorMargin; - noteModel.startx = startx < stopx ? startx + actors[msg.from].width / 2 - conf.actorMargin / 2 : stopx + actors[msg.to].width / 2 - conf.actorMargin / 2; - } - if (shouldWrap) { - noteModel.message = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.u.wrapLabel( - msg.message, - noteModel.width - 2 * conf.wrapPadding, - noteFont(conf) - ); - } - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug( - `NM:[${noteModel.startx},${noteModel.stopx},${noteModel.starty},${noteModel.stopy}:${noteModel.width},${noteModel.height}=${msg.message}]` - ); - return noteModel; -}; -const buildMessageModel = function(msg, actors, diagObj) { - if (![ - diagObj.db.LINETYPE.SOLID_OPEN, - diagObj.db.LINETYPE.DOTTED_OPEN, - diagObj.db.LINETYPE.SOLID, - diagObj.db.LINETYPE.DOTTED, - diagObj.db.LINETYPE.SOLID_CROSS, - diagObj.db.LINETYPE.DOTTED_CROSS, - diagObj.db.LINETYPE.SOLID_POINT, - diagObj.db.LINETYPE.DOTTED_POINT - ].includes(msg.type)) { - return {}; - } - const [fromLeft, fromRight] = activationBounds(msg.from, actors); - const [toLeft, toRight] = activationBounds(msg.to, actors); - const isArrowToRight = fromLeft <= toLeft; - const startx = isArrowToRight ? fromRight : fromLeft; - let stopx = isArrowToRight ? toLeft : toRight; - const isArrowToActivation = Math.abs(toLeft - toRight) > 2; - const adjustValue = (value) => { - return isArrowToRight ? -value : value; - }; - if (msg.from === msg.to) { - stopx = startx; - } else { - if (msg.activate && !isArrowToActivation) { - stopx += adjustValue(conf.activationWidth / 2 - 1); - } - if (![diagObj.db.LINETYPE.SOLID_OPEN, diagObj.db.LINETYPE.DOTTED_OPEN].includes(msg.type)) { - stopx += adjustValue(3); - } - } - const allBounds = [fromLeft, fromRight, toLeft, toRight]; - const boundedWidth = Math.abs(startx - stopx); - if (msg.wrap && msg.message) { - msg.message = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.u.wrapLabel( - msg.message, - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(boundedWidth + 2 * conf.wrapPadding, conf.width), - messageFont(conf) - ); - } - const msgDims = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.u.calculateTextDimensions(msg.message, messageFont(conf)); - return { - width: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax( - msg.wrap ? 0 : msgDims.width + 2 * conf.wrapPadding, - boundedWidth + 2 * conf.wrapPadding, - conf.width - ), - height: 0, - startx, - stopx, - starty: 0, - stopy: 0, - message: msg.message, - type: msg.type, - wrap: msg.wrap, - fromBounds: Math.min.apply(null, allBounds), - toBounds: Math.max.apply(null, allBounds) - }; -}; -const calculateLoopBounds = async function(messages, actors, _maxWidthPerActor, diagObj) { - const loops = {}; - const stack = []; - let current, noteModel, msgModel; - for (const msg of messages) { - msg.id = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.u.random({ length: 10 }); - switch (msg.type) { - case diagObj.db.LINETYPE.LOOP_START: - case diagObj.db.LINETYPE.ALT_START: - case diagObj.db.LINETYPE.OPT_START: - case diagObj.db.LINETYPE.PAR_START: - case diagObj.db.LINETYPE.PAR_OVER_START: - case diagObj.db.LINETYPE.CRITICAL_START: - case diagObj.db.LINETYPE.BREAK_START: - stack.push({ - id: msg.id, - msg: msg.message, - from: Number.MAX_SAFE_INTEGER, - to: Number.MIN_SAFE_INTEGER, - width: 0 - }); - break; - case diagObj.db.LINETYPE.ALT_ELSE: - case diagObj.db.LINETYPE.PAR_AND: - case diagObj.db.LINETYPE.CRITICAL_OPTION: - if (msg.message) { - current = stack.pop(); - loops[current.id] = current; - loops[msg.id] = current; - stack.push(current); - } - break; - case diagObj.db.LINETYPE.LOOP_END: - case diagObj.db.LINETYPE.ALT_END: - case diagObj.db.LINETYPE.OPT_END: - case diagObj.db.LINETYPE.PAR_END: - case diagObj.db.LINETYPE.CRITICAL_END: - case diagObj.db.LINETYPE.BREAK_END: - current = stack.pop(); - loops[current.id] = current; - break; - case diagObj.db.LINETYPE.ACTIVE_START: - { - const actorRect = actors[msg.from ? msg.from.actor : msg.to.actor]; - const stackedSize = actorActivations(msg.from ? msg.from.actor : msg.to.actor).length; - const x = actorRect.x + actorRect.width / 2 + (stackedSize - 1) * conf.activationWidth / 2; - const toAdd = { - startx: x, - stopx: x + conf.activationWidth, - actor: msg.from.actor, - enabled: true - }; - bounds.activations.push(toAdd); - } - break; - case diagObj.db.LINETYPE.ACTIVE_END: - { - const lastActorActivationIdx = bounds.activations.map((a) => a.actor).lastIndexOf(msg.from.actor); - delete bounds.activations.splice(lastActorActivationIdx, 1)[0]; - } - break; - } - const isNote = msg.placement !== void 0; - if (isNote) { - noteModel = await buildNoteModel(msg, actors, diagObj); - msg.noteModel = noteModel; - stack.forEach((stk) => { - current = stk; - current.from = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.e.getMin(current.from, noteModel.startx); - current.to = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(current.to, noteModel.startx + noteModel.width); - current.width = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(current.width, Math.abs(current.from - current.to)) - conf.labelBoxWidth; - }); - } else { - msgModel = buildMessageModel(msg, actors, diagObj); - msg.msgModel = msgModel; - if (msgModel.startx && msgModel.stopx && stack.length > 0) { - stack.forEach((stk) => { - current = stk; - if (msgModel.startx === msgModel.stopx) { - const from = actors[msg.from]; - const to = actors[msg.to]; - current.from = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.e.getMin( - from.x - msgModel.width / 2, - from.x - from.width / 2, - current.from - ); - current.to = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax( - to.x + msgModel.width / 2, - to.x + from.width / 2, - current.to - ); - current.width = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(current.width, Math.abs(current.to - current.from)) - conf.labelBoxWidth; - } else { - current.from = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.e.getMin(msgModel.startx, current.from); - current.to = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(msgModel.stopx, current.to); - current.width = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(current.width, msgModel.width) - conf.labelBoxWidth; - } - }); - } - } - } - bounds.activations = []; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Loop type widths:", loops); - return loops; -}; -const renderer = { - bounds, - drawActors, - drawActorsPopup, - setConf, - draw -}; -const diagram = { - parser: parser$1, - db, - renderer, - styles, - init: ({ wrap }) => { - db.setWrap(wrap); - } -}; - - - -/***/ }), - -/***/ 79186: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ a: () => (/* binding */ drawBackgroundRect), -/* harmony export */ b: () => (/* binding */ drawEmbeddedImage), -/* harmony export */ c: () => (/* binding */ drawImage), -/* harmony export */ d: () => (/* binding */ drawRect), -/* harmony export */ e: () => (/* binding */ getTextObj), -/* harmony export */ f: () => (/* binding */ drawText), -/* harmony export */ g: () => (/* binding */ getNoteRect) -/* harmony export */ }); -/* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(16750); -/* harmony import */ var _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(86079); - - -const drawRect = (element, rectData) => { - const rectElement = element.append("rect"); - rectElement.attr("x", rectData.x); - rectElement.attr("y", rectData.y); - rectElement.attr("fill", rectData.fill); - rectElement.attr("stroke", rectData.stroke); - rectElement.attr("width", rectData.width); - rectElement.attr("height", rectData.height); - if (rectData.name) { - rectElement.attr("name", rectData.name); - } - rectData.rx !== void 0 && rectElement.attr("rx", rectData.rx); - rectData.ry !== void 0 && rectElement.attr("ry", rectData.ry); - if (rectData.attrs !== void 0) { - for (const attrKey in rectData.attrs) { - rectElement.attr(attrKey, rectData.attrs[attrKey]); - } - } - rectData.class !== void 0 && rectElement.attr("class", rectData.class); - return rectElement; -}; -const drawBackgroundRect = (element, bounds) => { - const rectData = { - x: bounds.startx, - y: bounds.starty, - width: bounds.stopx - bounds.startx, - height: bounds.stopy - bounds.starty, - fill: bounds.fill, - stroke: bounds.stroke, - class: "rect" - }; - const rectElement = drawRect(element, rectData); - rectElement.lower(); -}; -const drawText = (element, textData) => { - const nText = textData.text.replace(_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.J, " "); - const textElem = element.append("text"); - textElem.attr("x", textData.x); - textElem.attr("y", textData.y); - textElem.attr("class", "legend"); - textElem.style("text-anchor", textData.anchor); - textData.class !== void 0 && textElem.attr("class", textData.class); - const tspan = textElem.append("tspan"); - tspan.attr("x", textData.x + textData.textMargin * 2); - tspan.text(nText); - return textElem; -}; -const drawImage = (elem, x, y, link) => { - const imageElement = elem.append("image"); - imageElement.attr("x", x); - imageElement.attr("y", y); - const sanitizedLink = (0,_braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_0__/* .sanitizeUrl */ .Jf)(link); - imageElement.attr("xlink:href", sanitizedLink); -}; -const drawEmbeddedImage = (element, x, y, link) => { - const imageElement = element.append("use"); - imageElement.attr("x", x); - imageElement.attr("y", y); - const sanitizedLink = (0,_braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_0__/* .sanitizeUrl */ .Jf)(link); - imageElement.attr("xlink:href", `#${sanitizedLink}`); -}; -const getNoteRect = () => { - const noteRectData = { - x: 0, - y: 0, - width: 100, - height: 100, - fill: "#EDF2AE", - stroke: "#666", - anchor: "start", - rx: 0, - ry: 0 - }; - return noteRectData; -}; -const getTextObj = () => { - const testObject = { - x: 0, - y: 0, - width: 100, - height: 100, - "text-anchor": "start", - style: "#666", - textMargin: 0, - rx: 0, - ry: 0, - tspan: true - }; - return testObject; -}; - - - -/***/ }) - -}; -; \ No newline at end of file diff --git a/assets/js/689.d19623f2.js b/assets/js/689.d19623f2.js deleted file mode 100644 index 124940e44e92..000000000000 --- a/assets/js/689.d19623f2.js +++ /dev/null @@ -1,26888 +0,0 @@ -"use strict"; -exports.id = 689; -exports.ids = [689]; -exports.modules = { - -/***/ 10646: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ H: () => (/* binding */ addHtmlLabel) -/* harmony export */ }); -/* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82933); - - - - -function addHtmlLabel(root, node) { - var fo = root.append('foreignObject').attr('width', '100000'); - - var div = fo.append('xhtml:div'); - div.attr('xmlns', 'http://www.w3.org/1999/xhtml'); - - var label = node.label; - switch (typeof label) { - case 'function': - div.insert(label); - break; - case 'object': - // Currently we assume this is a DOM object. - div.insert(function () { - return label; - }); - break; - default: - div.html(label); - } - - _util_js__WEBPACK_IMPORTED_MODULE_0__/* .applyStyle */ .AV(div, node.labelStyle); - div.style('display', 'inline-block'); - // Fix for firefox - div.style('white-space', 'nowrap'); - - var client = div.node().getBoundingClientRect(); - fo.attr('width', client.width).attr('height', client.height); - - return fo; -} - - -/***/ }), - -/***/ 82933: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ AV: () => (/* binding */ applyStyle), -/* harmony export */ De: () => (/* binding */ isSubgraph), -/* harmony export */ c$: () => (/* binding */ applyTransition), -/* harmony export */ gh: () => (/* binding */ edgeToId), -/* harmony export */ nh: () => (/* binding */ applyClass) -/* harmony export */ }); -/* harmony import */ var lodash_es__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(34963); -/* harmony import */ var lodash_es__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(89610); - - -// Public utility functions - - -/* - * Returns true if the specified node in the graph is a subgraph node. A - * subgraph node is one that contains other nodes. - */ -function isSubgraph(g, v) { - return !!g.children(v).length; -} - -function edgeToId(e) { - return escapeId(e.v) + ':' + escapeId(e.w) + ':' + escapeId(e.name); -} - -var ID_DELIM = /:/g; -function escapeId(str) { - return str ? String(str).replace(ID_DELIM, '\\:') : ''; -} - -function applyStyle(dom, styleFn) { - if (styleFn) { - dom.attr('style', styleFn); - } -} - -function applyClass(dom, classFn, otherClasses) { - if (classFn) { - dom.attr('class', classFn).attr('class', otherClasses + ' ' + dom.attr('class')); - } -} - -function applyTransition(selection, g) { - var graph = g.graph(); - - if (lodash_es__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A(graph)) { - var transition = graph.transition; - if (lodash_es__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A(transition)) { - return transition(selection); - } - } - - return selection; -} - - -/***/ }), - -/***/ 21176: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - Zp: () => (/* reexport */ layout) -}); - -// UNUSED EXPORTS: acyclic, normalize, rank - -// EXTERNAL MODULE: ./node_modules/lodash-es/forEach.js -var forEach = __webpack_require__(8058); -// EXTERNAL MODULE: ./node_modules/lodash-es/uniqueId.js -var uniqueId = __webpack_require__(5664); -// EXTERNAL MODULE: ./node_modules/lodash-es/has.js + 1 modules -var has = __webpack_require__(48585); -// EXTERNAL MODULE: ./node_modules/lodash-es/constant.js -var constant = __webpack_require__(39142); -// EXTERNAL MODULE: ./node_modules/lodash-es/flatten.js -var flatten = __webpack_require__(34098); -// EXTERNAL MODULE: ./node_modules/lodash-es/map.js -var map = __webpack_require__(74722); -// EXTERNAL MODULE: ./node_modules/lodash-es/range.js + 2 modules -var range = __webpack_require__(91395); -// EXTERNAL MODULE: ./node_modules/dagre-d3-es/src/graphlib/index.js -var graphlib = __webpack_require__(697); -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/data/list.js -/* - * Simple doubly linked list implementation derived from Cormen, et al., - * "Introduction to Algorithms". - */ - - - -class List { - constructor() { - var sentinel = {}; - sentinel._next = sentinel._prev = sentinel; - this._sentinel = sentinel; - } - dequeue() { - var sentinel = this._sentinel; - var entry = sentinel._prev; - if (entry !== sentinel) { - unlink(entry); - return entry; - } - } - enqueue(entry) { - var sentinel = this._sentinel; - if (entry._prev && entry._next) { - unlink(entry); - } - entry._next = sentinel._next; - sentinel._next._prev = entry; - sentinel._next = entry; - entry._prev = sentinel; - } - toString() { - var strs = []; - var sentinel = this._sentinel; - var curr = sentinel._prev; - while (curr !== sentinel) { - strs.push(JSON.stringify(curr, filterOutLinks)); - curr = curr._prev; - } - return '[' + strs.join(', ') + ']'; - } -} - -function unlink(entry) { - entry._prev._next = entry._next; - entry._next._prev = entry._prev; - delete entry._next; - delete entry._prev; -} - -function filterOutLinks(k, v) { - if (k !== '_next' && k !== '_prev') { - return v; - } -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/greedy-fas.js - - - - -/* - * A greedy heuristic for finding a feedback arc set for a graph. A feedback - * arc set is a set of edges that can be removed to make a graph acyclic. - * The algorithm comes from: P. Eades, X. Lin, and W. F. Smyth, "A fast and - * effective heuristic for the feedback arc set problem." This implementation - * adjusts that from the paper to allow for weighted edges. - */ - - -var DEFAULT_WEIGHT_FN = constant/* default */.A(1); - -function greedyFAS(g, weightFn) { - if (g.nodeCount() <= 1) { - return []; - } - var state = buildState(g, weightFn || DEFAULT_WEIGHT_FN); - var results = doGreedyFAS(state.graph, state.buckets, state.zeroIdx); - - // Expand multi-edges - return flatten/* default */.A( - map/* default */.A(results, function (e) { - return g.outEdges(e.v, e.w); - }) - ); -} - -function doGreedyFAS(g, buckets, zeroIdx) { - var results = []; - var sources = buckets[buckets.length - 1]; - var sinks = buckets[0]; - - var entry; - while (g.nodeCount()) { - while ((entry = sinks.dequeue())) { - removeNode(g, buckets, zeroIdx, entry); - } - while ((entry = sources.dequeue())) { - removeNode(g, buckets, zeroIdx, entry); - } - if (g.nodeCount()) { - for (var i = buckets.length - 2; i > 0; --i) { - entry = buckets[i].dequeue(); - if (entry) { - results = results.concat(removeNode(g, buckets, zeroIdx, entry, true)); - break; - } - } - } - } - - return results; -} - -function removeNode(g, buckets, zeroIdx, entry, collectPredecessors) { - var results = collectPredecessors ? [] : undefined; - - forEach/* default */.A(g.inEdges(entry.v), function (edge) { - var weight = g.edge(edge); - var uEntry = g.node(edge.v); - - if (collectPredecessors) { - results.push({ v: edge.v, w: edge.w }); - } - - uEntry.out -= weight; - assignBucket(buckets, zeroIdx, uEntry); - }); - - forEach/* default */.A(g.outEdges(entry.v), function (edge) { - var weight = g.edge(edge); - var w = edge.w; - var wEntry = g.node(w); - wEntry['in'] -= weight; - assignBucket(buckets, zeroIdx, wEntry); - }); - - g.removeNode(entry.v); - - return results; -} - -function buildState(g, weightFn) { - var fasGraph = new graphlib/* Graph */.T(); - var maxIn = 0; - var maxOut = 0; - - forEach/* default */.A(g.nodes(), function (v) { - fasGraph.setNode(v, { v: v, in: 0, out: 0 }); - }); - - // Aggregate weights on nodes, but also sum the weights across multi-edges - // into a single edge for the fasGraph. - forEach/* default */.A(g.edges(), function (e) { - var prevWeight = fasGraph.edge(e.v, e.w) || 0; - var weight = weightFn(e); - var edgeWeight = prevWeight + weight; - fasGraph.setEdge(e.v, e.w, edgeWeight); - maxOut = Math.max(maxOut, (fasGraph.node(e.v).out += weight)); - maxIn = Math.max(maxIn, (fasGraph.node(e.w)['in'] += weight)); - }); - - var buckets = range/* default */.A(maxOut + maxIn + 3).map(function () { - return new List(); - }); - var zeroIdx = maxIn + 1; - - forEach/* default */.A(fasGraph.nodes(), function (v) { - assignBucket(buckets, zeroIdx, fasGraph.node(v)); - }); - - return { graph: fasGraph, buckets: buckets, zeroIdx: zeroIdx }; -} - -function assignBucket(buckets, zeroIdx, entry) { - if (!entry.out) { - buckets[0].enqueue(entry); - } else if (!entry['in']) { - buckets[buckets.length - 1].enqueue(entry); - } else { - buckets[entry.out - entry['in'] + zeroIdx].enqueue(entry); - } -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/acyclic.js - - - - - -function run(g) { - var fas = g.graph().acyclicer === 'greedy' ? greedyFAS(g, weightFn(g)) : dfsFAS(g); - forEach/* default */.A(fas, function (e) { - var label = g.edge(e); - g.removeEdge(e); - label.forwardName = e.name; - label.reversed = true; - g.setEdge(e.w, e.v, label, uniqueId/* default */.A('rev')); - }); - - function weightFn(g) { - return function (e) { - return g.edge(e).weight; - }; - } -} - -function dfsFAS(g) { - var fas = []; - var stack = {}; - var visited = {}; - - function dfs(v) { - if (has/* default */.A(visited, v)) { - return; - } - visited[v] = true; - stack[v] = true; - forEach/* default */.A(g.outEdges(v), function (e) { - if (has/* default */.A(stack, e.w)) { - fas.push(e); - } else { - dfs(e.w); - } - }); - delete stack[v]; - } - - forEach/* default */.A(g.nodes(), dfs); - return fas; -} - -function undo(g) { - forEach/* default */.A(g.edges(), function (e) { - var label = g.edge(e); - if (label.reversed) { - g.removeEdge(e); - - var forwardName = label.forwardName; - delete label.reversed; - delete label.forwardName; - g.setEdge(e.w, e.v, label, forwardName); - } - }); -} - -// EXTERNAL MODULE: ./node_modules/lodash-es/merge.js + 6 modules -var merge = __webpack_require__(98879); -// EXTERNAL MODULE: ./node_modules/lodash-es/pick.js + 4 modules -var pick = __webpack_require__(81942); -// EXTERNAL MODULE: ./node_modules/lodash-es/defaults.js -var defaults = __webpack_require__(23068); -// EXTERNAL MODULE: ./node_modules/lodash-es/isSymbol.js -var isSymbol = __webpack_require__(61882); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseExtremum.js - - -/** - * The base implementation of methods like `_.max` and `_.min` which accepts a - * `comparator` to determine the extremum value. - * - * @private - * @param {Array} array The array to iterate over. - * @param {Function} iteratee The iteratee invoked per iteration. - * @param {Function} comparator The comparator used to compare values. - * @returns {*} Returns the extremum value. - */ -function baseExtremum(array, iteratee, comparator) { - var index = -1, - length = array.length; - - while (++index < length) { - var value = array[index], - current = iteratee(value); - - if (current != null && (computed === undefined - ? (current === current && !(0,isSymbol/* default */.A)(current)) - : comparator(current, computed) - )) { - var computed = current, - result = value; - } - } - return result; -} - -/* harmony default export */ const _baseExtremum = (baseExtremum); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseGt.js -/** - * The base implementation of `_.gt` which doesn't coerce arguments. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if `value` is greater than `other`, - * else `false`. - */ -function baseGt(value, other) { - return value > other; -} - -/* harmony default export */ const _baseGt = (baseGt); - -// EXTERNAL MODULE: ./node_modules/lodash-es/identity.js -var identity = __webpack_require__(29008); -;// CONCATENATED MODULE: ./node_modules/lodash-es/max.js - - - - -/** - * Computes the maximum value of `array`. If `array` is empty or falsey, - * `undefined` is returned. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Math - * @param {Array} array The array to iterate over. - * @returns {*} Returns the maximum value. - * @example - * - * _.max([4, 2, 8, 6]); - * // => 8 - * - * _.max([]); - * // => undefined - */ -function max(array) { - return (array && array.length) - ? _baseExtremum(array, identity/* default */.A, _baseGt) - : undefined; -} - -/* harmony default export */ const lodash_es_max = (max); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/last.js -/** - * Gets the last element of `array`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to query. - * @returns {*} Returns the last element of `array`. - * @example - * - * _.last([1, 2, 3]); - * // => 3 - */ -function last(array) { - var length = array == null ? 0 : array.length; - return length ? array[length - 1] : undefined; -} - -/* harmony default export */ const lodash_es_last = (last); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseAssignValue.js -var _baseAssignValue = __webpack_require__(52528); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseForOwn.js -var _baseForOwn = __webpack_require__(79841); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseIteratee.js + 16 modules -var _baseIteratee = __webpack_require__(49574); -;// CONCATENATED MODULE: ./node_modules/lodash-es/mapValues.js - - - - -/** - * Creates an object with the same keys as `object` and values generated - * by running each own enumerable string keyed property of `object` thru - * `iteratee`. The iteratee is invoked with three arguments: - * (value, key, object). - * - * @static - * @memberOf _ - * @since 2.4.0 - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Object} Returns the new mapped object. - * @see _.mapKeys - * @example - * - * var users = { - * 'fred': { 'user': 'fred', 'age': 40 }, - * 'pebbles': { 'user': 'pebbles', 'age': 1 } - * }; - * - * _.mapValues(users, function(o) { return o.age; }); - * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) - * - * // The `_.property` iteratee shorthand. - * _.mapValues(users, 'age'); - * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) - */ -function mapValues(object, iteratee) { - var result = {}; - iteratee = (0,_baseIteratee/* default */.A)(iteratee, 3); - - (0,_baseForOwn/* default */.A)(object, function(value, key, object) { - (0,_baseAssignValue/* default */.A)(result, key, iteratee(value, key, object)); - }); - return result; -} - -/* harmony default export */ const lodash_es_mapValues = (mapValues); - -// EXTERNAL MODULE: ./node_modules/lodash-es/isUndefined.js -var isUndefined = __webpack_require__(69592); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseLt.js -/** - * The base implementation of `_.lt` which doesn't coerce arguments. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if `value` is less than `other`, - * else `false`. - */ -function baseLt(value, other) { - return value < other; -} - -/* harmony default export */ const _baseLt = (baseLt); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/min.js - - - - -/** - * Computes the minimum value of `array`. If `array` is empty or falsey, - * `undefined` is returned. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Math - * @param {Array} array The array to iterate over. - * @returns {*} Returns the minimum value. - * @example - * - * _.min([4, 2, 8, 6]); - * // => 2 - * - * _.min([]); - * // => undefined - */ -function min(array) { - return (array && array.length) - ? _baseExtremum(array, identity/* default */.A, _baseLt) - : undefined; -} - -/* harmony default export */ const lodash_es_min = (min); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_root.js -var _root = __webpack_require__(41917); -;// CONCATENATED MODULE: ./node_modules/lodash-es/now.js - - -/** - * Gets the timestamp of the number of milliseconds that have elapsed since - * the Unix epoch (1 January 1970 00:00:00 UTC). - * - * @static - * @memberOf _ - * @since 2.4.0 - * @category Date - * @returns {number} Returns the timestamp. - * @example - * - * _.defer(function(stamp) { - * console.log(_.now() - stamp); - * }, _.now()); - * // => Logs the number of milliseconds it took for the deferred invocation. - */ -var now = function() { - return _root/* default */.A.Date.now(); -}; - -/* harmony default export */ const lodash_es_now = (now); - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/util.js - - - - - -/* - * Adds a dummy node to the graph and return v. - */ -function addDummyNode(g, type, attrs, name) { - var v; - do { - v = uniqueId/* default */.A(name); - } while (g.hasNode(v)); - - attrs.dummy = type; - g.setNode(v, attrs); - return v; -} - -/* - * Returns a new graph with only simple edges. Handles aggregation of data - * associated with multi-edges. - */ -function simplify(g) { - var simplified = new graphlib/* Graph */.T().setGraph(g.graph()); - forEach/* default */.A(g.nodes(), function (v) { - simplified.setNode(v, g.node(v)); - }); - forEach/* default */.A(g.edges(), function (e) { - var simpleLabel = simplified.edge(e.v, e.w) || { weight: 0, minlen: 1 }; - var label = g.edge(e); - simplified.setEdge(e.v, e.w, { - weight: simpleLabel.weight + label.weight, - minlen: Math.max(simpleLabel.minlen, label.minlen), - }); - }); - return simplified; -} - -function asNonCompoundGraph(g) { - var simplified = new graphlib/* Graph */.T({ multigraph: g.isMultigraph() }).setGraph(g.graph()); - forEach/* default */.A(g.nodes(), function (v) { - if (!g.children(v).length) { - simplified.setNode(v, g.node(v)); - } - }); - forEach/* default */.A(g.edges(), function (e) { - simplified.setEdge(e, g.edge(e)); - }); - return simplified; -} - -function successorWeights(g) { - var weightMap = _.map(g.nodes(), function (v) { - var sucs = {}; - _.forEach(g.outEdges(v), function (e) { - sucs[e.w] = (sucs[e.w] || 0) + g.edge(e).weight; - }); - return sucs; - }); - return _.zipObject(g.nodes(), weightMap); -} - -function predecessorWeights(g) { - var weightMap = _.map(g.nodes(), function (v) { - var preds = {}; - _.forEach(g.inEdges(v), function (e) { - preds[e.v] = (preds[e.v] || 0) + g.edge(e).weight; - }); - return preds; - }); - return _.zipObject(g.nodes(), weightMap); -} - -/* - * Finds where a line starting at point ({x, y}) would intersect a rectangle - * ({x, y, width, height}) if it were pointing at the rectangle's center. - */ -function intersectRect(rect, point) { - var x = rect.x; - var y = rect.y; - - // Rectangle intersection algorithm from: - // http://math.stackexchange.com/questions/108113/find-edge-between-two-boxes - var dx = point.x - x; - var dy = point.y - y; - var w = rect.width / 2; - var h = rect.height / 2; - - if (!dx && !dy) { - throw new Error('Not possible to find intersection inside of the rectangle'); - } - - var sx, sy; - if (Math.abs(dy) * w > Math.abs(dx) * h) { - // Intersection is top or bottom of rect. - if (dy < 0) { - h = -h; - } - sx = (h * dx) / dy; - sy = h; - } else { - // Intersection is left or right of rect. - if (dx < 0) { - w = -w; - } - sx = w; - sy = (w * dy) / dx; - } - - return { x: x + sx, y: y + sy }; -} - -/* - * Given a DAG with each node assigned "rank" and "order" properties, this - * function will produce a matrix with the ids of each node. - */ -function buildLayerMatrix(g) { - var layering = map/* default */.A(range/* default */.A(util_maxRank(g) + 1), function () { - return []; - }); - forEach/* default */.A(g.nodes(), function (v) { - var node = g.node(v); - var rank = node.rank; - if (!isUndefined/* default */.A(rank)) { - layering[rank][node.order] = v; - } - }); - return layering; -} - -/* - * Adjusts the ranks for all nodes in the graph such that all nodes v have - * rank(v) >= 0 and at least one node w has rank(w) = 0. - */ -function normalizeRanks(g) { - var min = lodash_es_min( - map/* default */.A(g.nodes(), function (v) { - return g.node(v).rank; - }) - ); - forEach/* default */.A(g.nodes(), function (v) { - var node = g.node(v); - if (has/* default */.A(node, 'rank')) { - node.rank -= min; - } - }); -} - -function removeEmptyRanks(g) { - // Ranks may not start at 0, so we need to offset them - var offset = lodash_es_min( - map/* default */.A(g.nodes(), function (v) { - return g.node(v).rank; - }) - ); - - var layers = []; - forEach/* default */.A(g.nodes(), function (v) { - var rank = g.node(v).rank - offset; - if (!layers[rank]) { - layers[rank] = []; - } - layers[rank].push(v); - }); - - var delta = 0; - var nodeRankFactor = g.graph().nodeRankFactor; - forEach/* default */.A(layers, function (vs, i) { - if (isUndefined/* default */.A(vs) && i % nodeRankFactor !== 0) { - --delta; - } else if (delta) { - forEach/* default */.A(vs, function (v) { - g.node(v).rank += delta; - }); - } - }); -} - -function addBorderNode(g, prefix, rank, order) { - var node = { - width: 0, - height: 0, - }; - if (arguments.length >= 4) { - node.rank = rank; - node.order = order; - } - return addDummyNode(g, 'border', node, prefix); -} - -function util_maxRank(g) { - return lodash_es_max( - map/* default */.A(g.nodes(), function (v) { - var rank = g.node(v).rank; - if (!isUndefined/* default */.A(rank)) { - return rank; - } - }) - ); -} - -/* - * Partition a collection into two groups: `lhs` and `rhs`. If the supplied - * function returns true for an entry it goes into `lhs`. Otherwise it goes - * into `rhs. - */ -function partition(collection, fn) { - var result = { lhs: [], rhs: [] }; - forEach/* default */.A(collection, function (value) { - if (fn(value)) { - result.lhs.push(value); - } else { - result.rhs.push(value); - } - }); - return result; -} - -/* - * Returns a new function that wraps `fn` with a timer. The wrapper logs the - * time it takes to execute the function. - */ -function util_time(name, fn) { - var start = lodash_es_now(); - try { - return fn(); - } finally { - console.log(name + ' time: ' + (lodash_es_now() - start) + 'ms'); - } -} - -function notime(name, fn) { - return fn(); -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/add-border-segments.js - - - - - -function addBorderSegments(g) { - function dfs(v) { - var children = g.children(v); - var node = g.node(v); - if (children.length) { - forEach/* default */.A(children, dfs); - } - - if (has/* default */.A(node, 'minRank')) { - node.borderLeft = []; - node.borderRight = []; - for (var rank = node.minRank, maxRank = node.maxRank + 1; rank < maxRank; ++rank) { - add_border_segments_addBorderNode(g, 'borderLeft', '_bl', v, node, rank); - add_border_segments_addBorderNode(g, 'borderRight', '_br', v, node, rank); - } - } - } - - forEach/* default */.A(g.children(), dfs); -} - -function add_border_segments_addBorderNode(g, prop, prefix, sg, sgNode, rank) { - var label = { width: 0, height: 0, rank: rank, borderType: prop }; - var prev = sgNode[prop][rank - 1]; - var curr = addDummyNode(g, 'border', label, prefix); - sgNode[prop][rank] = curr; - g.setParent(curr, sg); - if (prev) { - g.setEdge(prev, curr, { weight: 1 }); - } -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/coordinate-system.js - - - - -function adjust(g) { - var rankDir = g.graph().rankdir.toLowerCase(); - if (rankDir === 'lr' || rankDir === 'rl') { - swapWidthHeight(g); - } -} - -function coordinate_system_undo(g) { - var rankDir = g.graph().rankdir.toLowerCase(); - if (rankDir === 'bt' || rankDir === 'rl') { - reverseY(g); - } - - if (rankDir === 'lr' || rankDir === 'rl') { - swapXY(g); - swapWidthHeight(g); - } -} - -function swapWidthHeight(g) { - forEach/* default */.A(g.nodes(), function (v) { - swapWidthHeightOne(g.node(v)); - }); - forEach/* default */.A(g.edges(), function (e) { - swapWidthHeightOne(g.edge(e)); - }); -} - -function swapWidthHeightOne(attrs) { - var w = attrs.width; - attrs.width = attrs.height; - attrs.height = w; -} - -function reverseY(g) { - forEach/* default */.A(g.nodes(), function (v) { - reverseYOne(g.node(v)); - }); - - forEach/* default */.A(g.edges(), function (e) { - var edge = g.edge(e); - forEach/* default */.A(edge.points, reverseYOne); - if (has/* default */.A(edge, 'y')) { - reverseYOne(edge); - } - }); -} - -function reverseYOne(attrs) { - attrs.y = -attrs.y; -} - -function swapXY(g) { - forEach/* default */.A(g.nodes(), function (v) { - swapXYOne(g.node(v)); - }); - - forEach/* default */.A(g.edges(), function (e) { - var edge = g.edge(e); - forEach/* default */.A(edge.points, swapXYOne); - if (has/* default */.A(edge, 'x')) { - swapXYOne(edge); - } - }); -} - -function swapXYOne(attrs) { - var x = attrs.x; - attrs.x = attrs.y; - attrs.y = x; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/normalize.js - - - - - -/* - * Breaks any long edges in the graph into short segments that span 1 layer - * each. This operation is undoable with the denormalize function. - * - * Pre-conditions: - * - * 1. The input graph is a DAG. - * 2. Each node in the graph has a "rank" property. - * - * Post-condition: - * - * 1. All edges in the graph have a length of 1. - * 2. Dummy nodes are added where edges have been split into segments. - * 3. The graph is augmented with a "dummyChains" attribute which contains - * the first dummy in each chain of dummy nodes produced. - */ -function normalize_run(g) { - g.graph().dummyChains = []; - forEach/* default */.A(g.edges(), function (edge) { - normalizeEdge(g, edge); - }); -} - -function normalizeEdge(g, e) { - var v = e.v; - var vRank = g.node(v).rank; - var w = e.w; - var wRank = g.node(w).rank; - var name = e.name; - var edgeLabel = g.edge(e); - var labelRank = edgeLabel.labelRank; - - if (wRank === vRank + 1) return; - - g.removeEdge(e); - - var dummy, attrs, i; - for (i = 0, ++vRank; vRank < wRank; ++i, ++vRank) { - edgeLabel.points = []; - attrs = { - width: 0, - height: 0, - edgeLabel: edgeLabel, - edgeObj: e, - rank: vRank, - }; - dummy = addDummyNode(g, 'edge', attrs, '_d'); - if (vRank === labelRank) { - attrs.width = edgeLabel.width; - attrs.height = edgeLabel.height; - // @ts-expect-error - attrs.dummy = 'edge-label'; - // @ts-expect-error - attrs.labelpos = edgeLabel.labelpos; - } - g.setEdge(v, dummy, { weight: edgeLabel.weight }, name); - if (i === 0) { - g.graph().dummyChains.push(dummy); - } - v = dummy; - } - - g.setEdge(v, w, { weight: edgeLabel.weight }, name); -} - -function normalize_undo(g) { - forEach/* default */.A(g.graph().dummyChains, function (v) { - var node = g.node(v); - var origLabel = node.edgeLabel; - var w; - g.setEdge(node.edgeObj, origLabel); - while (node.dummy) { - w = g.successors(v)[0]; - g.removeNode(v); - origLabel.points.push({ x: node.x, y: node.y }); - if (node.dummy === 'edge-label') { - origLabel.x = node.x; - origLabel.y = node.y; - origLabel.width = node.width; - origLabel.height = node.height; - } - v = w; - node = g.node(v); - } - }); -} - -;// CONCATENATED MODULE: ./node_modules/lodash-es/minBy.js - - - - -/** - * This method is like `_.min` except that it accepts `iteratee` which is - * invoked for each element in `array` to generate the criterion by which - * the value is ranked. The iteratee is invoked with one argument: (value). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Math - * @param {Array} array The array to iterate over. - * @param {Function} [iteratee=_.identity] The iteratee invoked per element. - * @returns {*} Returns the minimum value. - * @example - * - * var objects = [{ 'n': 1 }, { 'n': 2 }]; - * - * _.minBy(objects, function(o) { return o.n; }); - * // => { 'n': 1 } - * - * // The `_.property` iteratee shorthand. - * _.minBy(objects, 'n'); - * // => { 'n': 1 } - */ -function minBy(array, iteratee) { - return (array && array.length) - ? _baseExtremum(array, (0,_baseIteratee/* default */.A)(iteratee, 2), _baseLt) - : undefined; -} - -/* harmony default export */ const lodash_es_minBy = (minBy); - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/rank/util.js - - - - -/* - * Initializes ranks for the input graph using the longest path algorithm. This - * algorithm scales well and is fast in practice, it yields rather poor - * solutions. Nodes are pushed to the lowest layer possible, leaving the bottom - * ranks wide and leaving edges longer than necessary. However, due to its - * speed, this algorithm is good for getting an initial ranking that can be fed - * into other algorithms. - * - * This algorithm does not normalize layers because it will be used by other - * algorithms in most cases. If using this algorithm directly, be sure to - * run normalize at the end. - * - * Pre-conditions: - * - * 1. Input graph is a DAG. - * 2. Input graph node labels can be assigned properties. - * - * Post-conditions: - * - * 1. Each node will be assign an (unnormalized) "rank" property. - */ -function longestPath(g) { - var visited = {}; - - function dfs(v) { - var label = g.node(v); - if (has/* default */.A(visited, v)) { - return label.rank; - } - visited[v] = true; - - var rank = lodash_es_min( - map/* default */.A(g.outEdges(v), function (e) { - return dfs(e.w) - g.edge(e).minlen; - }) - ); - - if ( - rank === Number.POSITIVE_INFINITY || // return value of _.map([]) for Lodash 3 - rank === undefined || // return value of _.map([]) for Lodash 4 - rank === null - ) { - // return value of _.map([null]) - rank = 0; - } - - return (label.rank = rank); - } - - forEach/* default */.A(g.sources(), dfs); -} - -/* - * Returns the amount of slack for the given edge. The slack is defined as the - * difference between the length of the edge and its minimum length. - */ -function slack(g, e) { - return g.node(e.w).rank - g.node(e.v).rank - g.edge(e).minlen; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/rank/feasible-tree.js - - - - - - -/* - * Constructs a spanning tree with tight edges and adjusted the input node's - * ranks to achieve this. A tight edge is one that is has a length that matches - * its "minlen" attribute. - * - * The basic structure for this function is derived from Gansner, et al., "A - * Technique for Drawing Directed Graphs." - * - * Pre-conditions: - * - * 1. Graph must be a DAG. - * 2. Graph must be connected. - * 3. Graph must have at least one node. - * 5. Graph nodes must have been previously assigned a "rank" property that - * respects the "minlen" property of incident edges. - * 6. Graph edges must have a "minlen" property. - * - * Post-conditions: - * - * - Graph nodes will have their rank adjusted to ensure that all edges are - * tight. - * - * Returns a tree (undirected graph) that is constructed using only "tight" - * edges. - */ -function feasibleTree(g) { - var t = new graphlib/* Graph */.T({ directed: false }); - - // Choose arbitrary node from which to start our tree - var start = g.nodes()[0]; - var size = g.nodeCount(); - t.setNode(start, {}); - - var edge, delta; - while (tightTree(t, g) < size) { - edge = findMinSlackEdge(t, g); - delta = t.hasNode(edge.v) ? slack(g, edge) : -slack(g, edge); - shiftRanks(t, g, delta); - } - - return t; -} - -/* - * Finds a maximal tree of tight edges and returns the number of nodes in the - * tree. - */ -function tightTree(t, g) { - function dfs(v) { - forEach/* default */.A(g.nodeEdges(v), function (e) { - var edgeV = e.v, - w = v === edgeV ? e.w : edgeV; - if (!t.hasNode(w) && !slack(g, e)) { - t.setNode(w, {}); - t.setEdge(v, w, {}); - dfs(w); - } - }); - } - - forEach/* default */.A(t.nodes(), dfs); - return t.nodeCount(); -} - -/* - * Finds the edge with the smallest slack that is incident on tree and returns - * it. - */ -function findMinSlackEdge(t, g) { - return lodash_es_minBy(g.edges(), function (e) { - if (t.hasNode(e.v) !== t.hasNode(e.w)) { - return slack(g, e); - } - }); -} - -function shiftRanks(t, g, delta) { - forEach/* default */.A(t.nodes(), function (v) { - g.node(v).rank += delta; - }); -} - -// EXTERNAL MODULE: ./node_modules/lodash-es/isArrayLike.js -var isArrayLike = __webpack_require__(38446); -// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js -var keys = __webpack_require__(27422); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_createFind.js - - - - -/** - * Creates a `_.find` or `_.findLast` function. - * - * @private - * @param {Function} findIndexFunc The function to find the collection index. - * @returns {Function} Returns the new find function. - */ -function createFind(findIndexFunc) { - return function(collection, predicate, fromIndex) { - var iterable = Object(collection); - if (!(0,isArrayLike/* default */.A)(collection)) { - var iteratee = (0,_baseIteratee/* default */.A)(predicate, 3); - collection = (0,keys/* default */.A)(collection); - predicate = function(key) { return iteratee(iterable[key], key, iterable); }; - } - var index = findIndexFunc(collection, predicate, fromIndex); - return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined; - }; -} - -/* harmony default export */ const _createFind = (createFind); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFindIndex.js -var _baseFindIndex = __webpack_require__(25707); -// EXTERNAL MODULE: ./node_modules/lodash-es/toFinite.js + 3 modules -var toFinite = __webpack_require__(74342); -;// CONCATENATED MODULE: ./node_modules/lodash-es/toInteger.js - - -/** - * Converts `value` to an integer. - * - * **Note:** This method is loosely based on - * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {number} Returns the converted integer. - * @example - * - * _.toInteger(3.2); - * // => 3 - * - * _.toInteger(Number.MIN_VALUE); - * // => 0 - * - * _.toInteger(Infinity); - * // => 1.7976931348623157e+308 - * - * _.toInteger('3.2'); - * // => 3 - */ -function toInteger(value) { - var result = (0,toFinite/* default */.A)(value), - remainder = result % 1; - - return result === result ? (remainder ? result - remainder : result) : 0; -} - -/* harmony default export */ const lodash_es_toInteger = (toInteger); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/findIndex.js - - - - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max; - -/** - * This method is like `_.find` except that it returns the index of the first - * element `predicate` returns truthy for instead of the element itself. - * - * @static - * @memberOf _ - * @since 1.1.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @param {number} [fromIndex=0] The index to search from. - * @returns {number} Returns the index of the found element, else `-1`. - * @example - * - * var users = [ - * { 'user': 'barney', 'active': false }, - * { 'user': 'fred', 'active': false }, - * { 'user': 'pebbles', 'active': true } - * ]; - * - * _.findIndex(users, function(o) { return o.user == 'barney'; }); - * // => 0 - * - * // The `_.matches` iteratee shorthand. - * _.findIndex(users, { 'user': 'fred', 'active': false }); - * // => 1 - * - * // The `_.matchesProperty` iteratee shorthand. - * _.findIndex(users, ['active', false]); - * // => 0 - * - * // The `_.property` iteratee shorthand. - * _.findIndex(users, 'active'); - * // => 2 - */ -function findIndex(array, predicate, fromIndex) { - var length = array == null ? 0 : array.length; - if (!length) { - return -1; - } - var index = fromIndex == null ? 0 : lodash_es_toInteger(fromIndex); - if (index < 0) { - index = nativeMax(length + index, 0); - } - return (0,_baseFindIndex/* default */.A)(array, (0,_baseIteratee/* default */.A)(predicate, 3), index); -} - -/* harmony default export */ const lodash_es_findIndex = (findIndex); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/find.js - - - -/** - * Iterates over elements of `collection`, returning the first element - * `predicate` returns truthy for. The predicate is invoked with three - * arguments: (value, index|key, collection). - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to inspect. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @param {number} [fromIndex=0] The index to search from. - * @returns {*} Returns the matched element, else `undefined`. - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': true }, - * { 'user': 'fred', 'age': 40, 'active': false }, - * { 'user': 'pebbles', 'age': 1, 'active': true } - * ]; - * - * _.find(users, function(o) { return o.age < 40; }); - * // => object for 'barney' - * - * // The `_.matches` iteratee shorthand. - * _.find(users, { 'age': 1, 'active': true }); - * // => object for 'pebbles' - * - * // The `_.matchesProperty` iteratee shorthand. - * _.find(users, ['active', false]); - * // => object for 'fred' - * - * // The `_.property` iteratee shorthand. - * _.find(users, 'active'); - * // => object for 'barney' - */ -var find = _createFind(lodash_es_findIndex); - -/* harmony default export */ const lodash_es_find = (find); - -// EXTERNAL MODULE: ./node_modules/lodash-es/filter.js + 1 modules -var filter = __webpack_require__(11662); -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/dijkstra.js - - - - - -var DEFAULT_WEIGHT_FUNC = constant/* default */.A(1); - -function dijkstra_dijkstra(g, source, weightFn, edgeFn) { - return runDijkstra( - g, - String(source), - weightFn || DEFAULT_WEIGHT_FUNC, - edgeFn || - function (v) { - return g.outEdges(v); - } - ); -} - -function runDijkstra(g, source, weightFn, edgeFn) { - var results = {}; - var pq = new PriorityQueue(); - var v, vEntry; - - var updateNeighbors = function (edge) { - var w = edge.v !== v ? edge.v : edge.w; - var wEntry = results[w]; - var weight = weightFn(edge); - var distance = vEntry.distance + weight; - - if (weight < 0) { - throw new Error( - 'dijkstra does not allow negative edge weights. ' + - 'Bad edge: ' + - edge + - ' Weight: ' + - weight - ); - } - - if (distance < wEntry.distance) { - wEntry.distance = distance; - wEntry.predecessor = v; - pq.decrease(w, distance); - } - }; - - g.nodes().forEach(function (v) { - var distance = v === source ? 0 : Number.POSITIVE_INFINITY; - results[v] = { distance: distance }; - pq.add(v, distance); - }); - - while (pq.size() > 0) { - v = pq.removeMin(); - vEntry = results[v]; - if (vEntry.distance === Number.POSITIVE_INFINITY) { - break; - } - - edgeFn(v).forEach(updateNeighbors); - } - - return results; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/dijkstra-all.js - - - - - -function dijkstraAll(g, weightFunc, edgeFunc) { - return _.transform( - g.nodes(), - function (acc, v) { - acc[v] = dijkstra(g, v, weightFunc, edgeFunc); - }, - {} - ); -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/floyd-warshall.js - - - - -var floyd_warshall_DEFAULT_WEIGHT_FUNC = constant/* default */.A(1); - -function floydWarshall(g, weightFn, edgeFn) { - return runFloydWarshall( - g, - weightFn || floyd_warshall_DEFAULT_WEIGHT_FUNC, - edgeFn || - function (v) { - return g.outEdges(v); - } - ); -} - -function runFloydWarshall(g, weightFn, edgeFn) { - var results = {}; - var nodes = g.nodes(); - - nodes.forEach(function (v) { - results[v] = {}; - results[v][v] = { distance: 0 }; - nodes.forEach(function (w) { - if (v !== w) { - results[v][w] = { distance: Number.POSITIVE_INFINITY }; - } - }); - edgeFn(v).forEach(function (edge) { - var w = edge.v === v ? edge.w : edge.v; - var d = weightFn(edge); - results[v][w] = { distance: d, predecessor: v }; - }); - }); - - nodes.forEach(function (k) { - var rowK = results[k]; - nodes.forEach(function (i) { - var rowI = results[i]; - nodes.forEach(function (j) { - var ik = rowI[k]; - var kj = rowK[j]; - var ij = rowI[j]; - var altDistance = ik.distance + kj.distance; - if (altDistance < ij.distance) { - ij.distance = altDistance; - ij.predecessor = kj.predecessor; - } - }); - }); - }); - - return results; -} - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseKeys.js + 1 modules -var _baseKeys = __webpack_require__(69471); -// EXTERNAL MODULE: ./node_modules/lodash-es/_getTag.js + 3 modules -var _getTag = __webpack_require__(9779); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGetTag.js + 2 modules -var _baseGetTag = __webpack_require__(88496); -// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js -var isArray = __webpack_require__(92049); -// EXTERNAL MODULE: ./node_modules/lodash-es/isObjectLike.js -var isObjectLike = __webpack_require__(53098); -;// CONCATENATED MODULE: ./node_modules/lodash-es/isString.js - - - - -/** `Object#toString` result references. */ -var stringTag = '[object String]'; - -/** - * Checks if `value` is classified as a `String` primitive or object. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a string, else `false`. - * @example - * - * _.isString('abc'); - * // => true - * - * _.isString(1); - * // => false - */ -function isString(value) { - return typeof value == 'string' || - (!(0,isArray/* default */.A)(value) && (0,isObjectLike/* default */.A)(value) && (0,_baseGetTag/* default */.A)(value) == stringTag); -} - -/* harmony default export */ const lodash_es_isString = (isString); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseProperty.js -var _baseProperty = __webpack_require__(70805); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_asciiSize.js - - -/** - * Gets the size of an ASCII `string`. - * - * @private - * @param {string} string The string inspect. - * @returns {number} Returns the string size. - */ -var asciiSize = (0,_baseProperty/* default */.A)('length'); - -/* harmony default export */ const _asciiSize = (asciiSize); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_hasUnicode.js -/** Used to compose unicode character classes. */ -var rsAstralRange = '\\ud800-\\udfff', - rsComboMarksRange = '\\u0300-\\u036f', - reComboHalfMarksRange = '\\ufe20-\\ufe2f', - rsComboSymbolsRange = '\\u20d0-\\u20ff', - rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, - rsVarRange = '\\ufe0e\\ufe0f'; - -/** Used to compose unicode capture groups. */ -var rsZWJ = '\\u200d'; - -/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ -var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']'); - -/** - * Checks if `string` contains Unicode symbols. - * - * @private - * @param {string} string The string to inspect. - * @returns {boolean} Returns `true` if a symbol is found, else `false`. - */ -function hasUnicode(string) { - return reHasUnicode.test(string); -} - -/* harmony default export */ const _hasUnicode = (hasUnicode); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_unicodeSize.js -/** Used to compose unicode character classes. */ -var _unicodeSize_rsAstralRange = '\\ud800-\\udfff', - _unicodeSize_rsComboMarksRange = '\\u0300-\\u036f', - _unicodeSize_reComboHalfMarksRange = '\\ufe20-\\ufe2f', - _unicodeSize_rsComboSymbolsRange = '\\u20d0-\\u20ff', - _unicodeSize_rsComboRange = _unicodeSize_rsComboMarksRange + _unicodeSize_reComboHalfMarksRange + _unicodeSize_rsComboSymbolsRange, - _unicodeSize_rsVarRange = '\\ufe0e\\ufe0f'; - -/** Used to compose unicode capture groups. */ -var rsAstral = '[' + _unicodeSize_rsAstralRange + ']', - rsCombo = '[' + _unicodeSize_rsComboRange + ']', - rsFitz = '\\ud83c[\\udffb-\\udfff]', - rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', - rsNonAstral = '[^' + _unicodeSize_rsAstralRange + ']', - rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', - rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', - _unicodeSize_rsZWJ = '\\u200d'; - -/** Used to compose unicode regexes. */ -var reOptMod = rsModifier + '?', - rsOptVar = '[' + _unicodeSize_rsVarRange + ']?', - rsOptJoin = '(?:' + _unicodeSize_rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', - rsSeq = rsOptVar + reOptMod + rsOptJoin, - rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; - -/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ -var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); - -/** - * Gets the size of a Unicode `string`. - * - * @private - * @param {string} string The string inspect. - * @returns {number} Returns the string size. - */ -function unicodeSize(string) { - var result = reUnicode.lastIndex = 0; - while (reUnicode.test(string)) { - ++result; - } - return result; -} - -/* harmony default export */ const _unicodeSize = (unicodeSize); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_stringSize.js - - - - -/** - * Gets the number of symbols in `string`. - * - * @private - * @param {string} string The string to inspect. - * @returns {number} Returns the string size. - */ -function stringSize(string) { - return _hasUnicode(string) - ? _unicodeSize(string) - : _asciiSize(string); -} - -/* harmony default export */ const _stringSize = (stringSize); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/size.js - - - - - - -/** `Object#toString` result references. */ -var mapTag = '[object Map]', - setTag = '[object Set]'; - -/** - * Gets the size of `collection` by returning its length for array-like - * values or the number of own enumerable string keyed properties for objects. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object|string} collection The collection to inspect. - * @returns {number} Returns the collection size. - * @example - * - * _.size([1, 2, 3]); - * // => 3 - * - * _.size({ 'a': 1, 'b': 2 }); - * // => 2 - * - * _.size('pebbles'); - * // => 7 - */ -function size(collection) { - if (collection == null) { - return 0; - } - if ((0,isArrayLike/* default */.A)(collection)) { - return lodash_es_isString(collection) ? _stringSize(collection) : collection.length; - } - var tag = (0,_getTag/* default */.A)(collection); - if (tag == mapTag || tag == setTag) { - return collection.size; - } - return (0,_baseKeys/* default */.A)(collection).length; -} - -/* harmony default export */ const lodash_es_size = (size); - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/topsort.js - - - - -topsort_topsort.CycleException = topsort_CycleException; - -function topsort_topsort(g) { - var visited = {}; - var stack = {}; - var results = []; - - function visit(node) { - if (has/* default */.A(stack, node)) { - throw new topsort_CycleException(); - } - - if (!has/* default */.A(visited, node)) { - stack[node] = true; - visited[node] = true; - forEach/* default */.A(g.predecessors(node), visit); - delete stack[node]; - results.push(node); - } - } - - forEach/* default */.A(g.sinks(), visit); - - if (lodash_es_size(visited) !== g.nodeCount()) { - throw new topsort_CycleException(); - } - - return results; -} - -function topsort_CycleException() {} -topsort_CycleException.prototype = new Error(); // must be an instance of Error to pass testing - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/is-acyclic.js - - - - -function isAcyclic(g) { - try { - topsort(g); - } catch (e) { - if (e instanceof CycleException) { - return false; - } - throw e; - } - return true; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/dfs.js - - - - -/* - * A helper that preforms a pre- or post-order traversal on the input graph - * and returns the nodes in the order they were visited. If the graph is - * undirected then this algorithm will navigate using neighbors. If the graph - * is directed then this algorithm will navigate using successors. - * - * Order must be one of "pre" or "post". - */ -function dfs(g, vs, order) { - if (!isArray/* default */.A(vs)) { - vs = [vs]; - } - - var navigation = (g.isDirected() ? g.successors : g.neighbors).bind(g); - - var acc = []; - var visited = {}; - forEach/* default */.A(vs, function (v) { - if (!g.hasNode(v)) { - throw new Error('Graph does not have node: ' + v); - } - - doDfs(g, v, order === 'post', visited, navigation, acc); - }); - return acc; -} - -function doDfs(g, v, postorder, visited, navigation, acc) { - if (!has/* default */.A(visited, v)) { - visited[v] = true; - - if (!postorder) { - acc.push(v); - } - forEach/* default */.A(navigation(v), function (w) { - doDfs(g, w, postorder, visited, navigation, acc); - }); - if (postorder) { - acc.push(v); - } - } -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/postorder.js - - - - -function postorder(g, vs) { - return dfs(g, vs, 'post'); -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/preorder.js - - - - -function preorder(g, vs) { - return dfs(g, vs, 'pre'); -} - -// EXTERNAL MODULE: ./node_modules/dagre-d3-es/src/graphlib/graph.js + 9 modules -var graph = __webpack_require__(73046); -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/prim.js - - - - - - -function prim(g, weightFunc) { - var result = new Graph(); - var parents = {}; - var pq = new PriorityQueue(); - var v; - - function updateNeighbors(edge) { - var w = edge.v === v ? edge.w : edge.v; - var pri = pq.priority(w); - if (pri !== undefined) { - var edgeWeight = weightFunc(edge); - if (edgeWeight < pri) { - parents[w] = v; - pq.decrease(w, edgeWeight); - } - } - } - - if (g.nodeCount() === 0) { - return result; - } - - _.each(g.nodes(), function (v) { - pq.add(v, Number.POSITIVE_INFINITY); - result.setNode(v); - }); - - // Start from an arbitrary node - pq.decrease(g.nodes()[0], 0); - - var init = false; - while (pq.size() > 0) { - v = pq.removeMin(); - if (_.has(parents, v)) { - result.setEdge(v, parents[v]); - } else if (init) { - throw new Error('Input graph is not connected: ' + g); - } else { - init = true; - } - - g.nodeEdges(v).forEach(updateNeighbors); - } - - return result; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/index.js - - - - - - - - - - - - - - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/rank/network-simplex.js - - - - - - - - -// Expose some internals for testing purposes -networkSimplex.initLowLimValues = initLowLimValues; -networkSimplex.initCutValues = initCutValues; -networkSimplex.calcCutValue = calcCutValue; -networkSimplex.leaveEdge = leaveEdge; -networkSimplex.enterEdge = enterEdge; -networkSimplex.exchangeEdges = exchangeEdges; - -/* - * The network simplex algorithm assigns ranks to each node in the input graph - * and iteratively improves the ranking to reduce the length of edges. - * - * Preconditions: - * - * 1. The input graph must be a DAG. - * 2. All nodes in the graph must have an object value. - * 3. All edges in the graph must have "minlen" and "weight" attributes. - * - * Postconditions: - * - * 1. All nodes in the graph will have an assigned "rank" attribute that has - * been optimized by the network simplex algorithm. Ranks start at 0. - * - * - * A rough sketch of the algorithm is as follows: - * - * 1. Assign initial ranks to each node. We use the longest path algorithm, - * which assigns ranks to the lowest position possible. In general this - * leads to very wide bottom ranks and unnecessarily long edges. - * 2. Construct a feasible tight tree. A tight tree is one such that all - * edges in the tree have no slack (difference between length of edge - * and minlen for the edge). This by itself greatly improves the assigned - * rankings by shorting edges. - * 3. Iteratively find edges that have negative cut values. Generally a - * negative cut value indicates that the edge could be removed and a new - * tree edge could be added to produce a more compact graph. - * - * Much of the algorithms here are derived from Gansner, et al., "A Technique - * for Drawing Directed Graphs." The structure of the file roughly follows the - * structure of the overall algorithm. - */ -function networkSimplex(g) { - g = simplify(g); - longestPath(g); - var t = feasibleTree(g); - initLowLimValues(t); - initCutValues(t, g); - - var e, f; - while ((e = leaveEdge(t))) { - f = enterEdge(t, g, e); - exchangeEdges(t, g, e, f); - } -} - -/* - * Initializes cut values for all edges in the tree. - */ -function initCutValues(t, g) { - var vs = postorder(t, t.nodes()); - vs = vs.slice(0, vs.length - 1); - forEach/* default */.A(vs, function (v) { - assignCutValue(t, g, v); - }); -} - -function assignCutValue(t, g, child) { - var childLab = t.node(child); - var parent = childLab.parent; - t.edge(child, parent).cutvalue = calcCutValue(t, g, child); -} - -/* - * Given the tight tree, its graph, and a child in the graph calculate and - * return the cut value for the edge between the child and its parent. - */ -function calcCutValue(t, g, child) { - var childLab = t.node(child); - var parent = childLab.parent; - // True if the child is on the tail end of the edge in the directed graph - var childIsTail = true; - // The graph's view of the tree edge we're inspecting - var graphEdge = g.edge(child, parent); - // The accumulated cut value for the edge between this node and its parent - var cutValue = 0; - - if (!graphEdge) { - childIsTail = false; - graphEdge = g.edge(parent, child); - } - - cutValue = graphEdge.weight; - - forEach/* default */.A(g.nodeEdges(child), function (e) { - var isOutEdge = e.v === child, - other = isOutEdge ? e.w : e.v; - - if (other !== parent) { - var pointsToHead = isOutEdge === childIsTail, - otherWeight = g.edge(e).weight; - - cutValue += pointsToHead ? otherWeight : -otherWeight; - if (isTreeEdge(t, child, other)) { - var otherCutValue = t.edge(child, other).cutvalue; - cutValue += pointsToHead ? -otherCutValue : otherCutValue; - } - } - }); - - return cutValue; -} - -function initLowLimValues(tree, root) { - if (arguments.length < 2) { - root = tree.nodes()[0]; - } - dfsAssignLowLim(tree, {}, 1, root); -} - -function dfsAssignLowLim(tree, visited, nextLim, v, parent) { - var low = nextLim; - var label = tree.node(v); - - visited[v] = true; - forEach/* default */.A(tree.neighbors(v), function (w) { - if (!has/* default */.A(visited, w)) { - nextLim = dfsAssignLowLim(tree, visited, nextLim, w, v); - } - }); - - label.low = low; - label.lim = nextLim++; - if (parent) { - label.parent = parent; - } else { - // TODO should be able to remove this when we incrementally update low lim - delete label.parent; - } - - return nextLim; -} - -function leaveEdge(tree) { - return lodash_es_find(tree.edges(), function (e) { - return tree.edge(e).cutvalue < 0; - }); -} - -function enterEdge(t, g, edge) { - var v = edge.v; - var w = edge.w; - - // For the rest of this function we assume that v is the tail and w is the - // head, so if we don't have this edge in the graph we should flip it to - // match the correct orientation. - if (!g.hasEdge(v, w)) { - v = edge.w; - w = edge.v; - } - - var vLabel = t.node(v); - var wLabel = t.node(w); - var tailLabel = vLabel; - var flip = false; - - // If the root is in the tail of the edge then we need to flip the logic that - // checks for the head and tail nodes in the candidates function below. - if (vLabel.lim > wLabel.lim) { - tailLabel = wLabel; - flip = true; - } - - var candidates = filter/* default */.A(g.edges(), function (edge) { - return ( - flip === isDescendant(t, t.node(edge.v), tailLabel) && - flip !== isDescendant(t, t.node(edge.w), tailLabel) - ); - }); - - return lodash_es_minBy(candidates, function (edge) { - return slack(g, edge); - }); -} - -function exchangeEdges(t, g, e, f) { - var v = e.v; - var w = e.w; - t.removeEdge(v, w); - t.setEdge(f.v, f.w, {}); - initLowLimValues(t); - initCutValues(t, g); - updateRanks(t, g); -} - -function updateRanks(t, g) { - var root = lodash_es_find(t.nodes(), function (v) { - return !g.node(v).parent; - }); - var vs = preorder(t, root); - vs = vs.slice(1); - forEach/* default */.A(vs, function (v) { - var parent = t.node(v).parent, - edge = g.edge(v, parent), - flipped = false; - - if (!edge) { - edge = g.edge(parent, v); - flipped = true; - } - - g.node(v).rank = g.node(parent).rank + (flipped ? edge.minlen : -edge.minlen); - }); -} - -/* - * Returns true if the edge is in the tree. - */ -function isTreeEdge(tree, u, v) { - return tree.hasEdge(u, v); -} - -/* - * Returns true if the specified node is descendant of the root node per the - * assigned low and lim attributes in the tree. - */ -function isDescendant(tree, vLabel, rootLabel) { - return rootLabel.low <= vLabel.lim && vLabel.lim <= rootLabel.lim; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/rank/index.js - - - - - - -/* - * Assigns a rank to each node in the input graph that respects the "minlen" - * constraint specified on edges between nodes. - * - * This basic structure is derived from Gansner, et al., "A Technique for - * Drawing Directed Graphs." - * - * Pre-conditions: - * - * 1. Graph must be a connected DAG - * 2. Graph nodes must be objects - * 3. Graph edges must have "weight" and "minlen" attributes - * - * Post-conditions: - * - * 1. Graph nodes will have a "rank" attribute based on the results of the - * algorithm. Ranks can start at any index (including negative), we'll - * fix them up later. - */ -function rank(g) { - switch (g.graph().ranker) { - case 'network-simplex': - networkSimplexRanker(g); - break; - case 'tight-tree': - tightTreeRanker(g); - break; - case 'longest-path': - longestPathRanker(g); - break; - default: - networkSimplexRanker(g); - } -} - -// A fast and simple ranker, but results are far from optimal. -var longestPathRanker = longestPath; - -function tightTreeRanker(g) { - longestPath(g); - feasibleTree(g); -} - -function networkSimplexRanker(g) { - networkSimplex(g); -} - -// EXTERNAL MODULE: ./node_modules/lodash-es/values.js + 1 modules -var values = __webpack_require__(38207); -// EXTERNAL MODULE: ./node_modules/lodash-es/reduce.js + 2 modules -var reduce = __webpack_require__(89463); -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/nesting-graph.js - - - - - -/* - * A nesting graph creates dummy nodes for the tops and bottoms of subgraphs, - * adds appropriate edges to ensure that all cluster nodes are placed between - * these boundries, and ensures that the graph is connected. - * - * In addition we ensure, through the use of the minlen property, that nodes - * and subgraph border nodes to not end up on the same rank. - * - * Preconditions: - * - * 1. Input graph is a DAG - * 2. Nodes in the input graph has a minlen attribute - * - * Postconditions: - * - * 1. Input graph is connected. - * 2. Dummy nodes are added for the tops and bottoms of subgraphs. - * 3. The minlen attribute for nodes is adjusted to ensure nodes do not - * get placed on the same rank as subgraph border nodes. - * - * The nesting graph idea comes from Sander, "Layout of Compound Directed - * Graphs." - */ -function nesting_graph_run(g) { - var root = addDummyNode(g, 'root', {}, '_root'); - var depths = treeDepths(g); - var height = lodash_es_max(values/* default */.A(depths)) - 1; // Note: depths is an Object not an array - var nodeSep = 2 * height + 1; - - g.graph().nestingRoot = root; - - // Multiply minlen by nodeSep to align nodes on non-border ranks. - forEach/* default */.A(g.edges(), function (e) { - g.edge(e).minlen *= nodeSep; - }); - - // Calculate a weight that is sufficient to keep subgraphs vertically compact - var weight = sumWeights(g) + 1; - - // Create border nodes and link them up - forEach/* default */.A(g.children(), function (child) { - nesting_graph_dfs(g, root, nodeSep, weight, height, depths, child); - }); - - // Save the multiplier for node layers for later removal of empty border - // layers. - g.graph().nodeRankFactor = nodeSep; -} - -function nesting_graph_dfs(g, root, nodeSep, weight, height, depths, v) { - var children = g.children(v); - if (!children.length) { - if (v !== root) { - g.setEdge(root, v, { weight: 0, minlen: nodeSep }); - } - return; - } - - var top = addBorderNode(g, '_bt'); - var bottom = addBorderNode(g, '_bb'); - var label = g.node(v); - - g.setParent(top, v); - label.borderTop = top; - g.setParent(bottom, v); - label.borderBottom = bottom; - - forEach/* default */.A(children, function (child) { - nesting_graph_dfs(g, root, nodeSep, weight, height, depths, child); - - var childNode = g.node(child); - var childTop = childNode.borderTop ? childNode.borderTop : child; - var childBottom = childNode.borderBottom ? childNode.borderBottom : child; - var thisWeight = childNode.borderTop ? weight : 2 * weight; - var minlen = childTop !== childBottom ? 1 : height - depths[v] + 1; - - g.setEdge(top, childTop, { - weight: thisWeight, - minlen: minlen, - nestingEdge: true, - }); - - g.setEdge(childBottom, bottom, { - weight: thisWeight, - minlen: minlen, - nestingEdge: true, - }); - }); - - if (!g.parent(v)) { - g.setEdge(root, top, { weight: 0, minlen: height + depths[v] }); - } -} - -function treeDepths(g) { - var depths = {}; - function dfs(v, depth) { - var children = g.children(v); - if (children && children.length) { - forEach/* default */.A(children, function (child) { - dfs(child, depth + 1); - }); - } - depths[v] = depth; - } - forEach/* default */.A(g.children(), function (v) { - dfs(v, 1); - }); - return depths; -} - -function sumWeights(g) { - return reduce/* default */.A( - g.edges(), - function (acc, e) { - return acc + g.edge(e).weight; - }, - 0 - ); -} - -function cleanup(g) { - var graphLabel = g.graph(); - g.removeNode(graphLabel.nestingRoot); - delete graphLabel.nestingRoot; - forEach/* default */.A(g.edges(), function (e) { - var edge = g.edge(e); - if (edge.nestingEdge) { - g.removeEdge(e); - } - }); -} - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseClone.js + 15 modules -var _baseClone = __webpack_require__(91641); -;// CONCATENATED MODULE: ./node_modules/lodash-es/cloneDeep.js - - -/** Used to compose bitmasks for cloning. */ -var CLONE_DEEP_FLAG = 1, - CLONE_SYMBOLS_FLAG = 4; - -/** - * This method is like `_.clone` except that it recursively clones `value`. - * - * @static - * @memberOf _ - * @since 1.0.0 - * @category Lang - * @param {*} value The value to recursively clone. - * @returns {*} Returns the deep cloned value. - * @see _.clone - * @example - * - * var objects = [{ 'a': 1 }, { 'b': 2 }]; - * - * var deep = _.cloneDeep(objects); - * console.log(deep[0] === objects[0]); - * // => false - */ -function cloneDeep(value) { - return (0,_baseClone/* default */.A)(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); -} - -/* harmony default export */ const lodash_es_cloneDeep = (cloneDeep); - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/add-subgraph-constraints.js - - - - -function addSubgraphConstraints(g, cg, vs) { - var prev = {}, - rootPrev; - - forEach/* default */.A(vs, function (v) { - var child = g.parent(v), - parent, - prevChild; - while (child) { - parent = g.parent(child); - if (parent) { - prevChild = prev[parent]; - prev[parent] = child; - } else { - prevChild = rootPrev; - rootPrev = child; - } - if (prevChild && prevChild !== child) { - cg.setEdge(prevChild, child); - return; - } - child = parent; - } - }); - - /* - function dfs(v) { - var children = v ? g.children(v) : g.children(); - if (children.length) { - var min = Number.POSITIVE_INFINITY, - subgraphs = []; - _.each(children, function(child) { - var childMin = dfs(child); - if (g.children(child).length) { - subgraphs.push({ v: child, order: childMin }); - } - min = Math.min(min, childMin); - }); - _.reduce(_.sortBy(subgraphs, "order"), function(prev, curr) { - cg.setEdge(prev.v, curr.v); - return curr; - }); - return min; - } - return g.node(v).order; - } - dfs(undefined); - */ -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/build-layer-graph.js - - - - - -/* - * Constructs a graph that can be used to sort a layer of nodes. The graph will - * contain all base and subgraph nodes from the request layer in their original - * hierarchy and any edges that are incident on these nodes and are of the type - * requested by the "relationship" parameter. - * - * Nodes from the requested rank that do not have parents are assigned a root - * node in the output graph, which is set in the root graph attribute. This - * makes it easy to walk the hierarchy of movable nodes during ordering. - * - * Pre-conditions: - * - * 1. Input graph is a DAG - * 2. Base nodes in the input graph have a rank attribute - * 3. Subgraph nodes in the input graph has minRank and maxRank attributes - * 4. Edges have an assigned weight - * - * Post-conditions: - * - * 1. Output graph has all nodes in the movable rank with preserved - * hierarchy. - * 2. Root nodes in the movable layer are made children of the node - * indicated by the root attribute of the graph. - * 3. Non-movable nodes incident on movable nodes, selected by the - * relationship parameter, are included in the graph (without hierarchy). - * 4. Edges incident on movable nodes, selected by the relationship - * parameter, are added to the output graph. - * 5. The weights for copied edges are aggregated as need, since the output - * graph is not a multi-graph. - */ -function buildLayerGraph(g, rank, relationship) { - var root = createRootNode(g), - result = new graphlib/* Graph */.T({ compound: true }) - .setGraph({ root: root }) - .setDefaultNodeLabel(function (v) { - return g.node(v); - }); - - forEach/* default */.A(g.nodes(), function (v) { - var node = g.node(v), - parent = g.parent(v); - - if (node.rank === rank || (node.minRank <= rank && rank <= node.maxRank)) { - result.setNode(v); - result.setParent(v, parent || root); - - // This assumes we have only short edges! - forEach/* default */.A(g[relationship](v), function (e) { - var u = e.v === v ? e.w : e.v, - edge = result.edge(u, v), - weight = !isUndefined/* default */.A(edge) ? edge.weight : 0; - result.setEdge(u, v, { weight: g.edge(e).weight + weight }); - }); - - if (has/* default */.A(node, 'minRank')) { - result.setNode(v, { - borderLeft: node.borderLeft[rank], - borderRight: node.borderRight[rank], - }); - } - } - }); - - return result; -} - -function createRootNode(g) { - var v; - while (g.hasNode((v = uniqueId/* default */.A('_root')))); - return v; -} - -// EXTERNAL MODULE: ./node_modules/lodash-es/_assignValue.js -var _assignValue = __webpack_require__(52851); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseZipObject.js -/** - * This base implementation of `_.zipObject` which assigns values using `assignFunc`. - * - * @private - * @param {Array} props The property identifiers. - * @param {Array} values The property values. - * @param {Function} assignFunc The function to assign values. - * @returns {Object} Returns the new object. - */ -function baseZipObject(props, values, assignFunc) { - var index = -1, - length = props.length, - valsLength = values.length, - result = {}; - - while (++index < length) { - var value = index < valsLength ? values[index] : undefined; - assignFunc(result, props[index], value); - } - return result; -} - -/* harmony default export */ const _baseZipObject = (baseZipObject); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/zipObject.js - - - -/** - * This method is like `_.fromPairs` except that it accepts two arrays, - * one of property identifiers and one of corresponding values. - * - * @static - * @memberOf _ - * @since 0.4.0 - * @category Array - * @param {Array} [props=[]] The property identifiers. - * @param {Array} [values=[]] The property values. - * @returns {Object} Returns the new object. - * @example - * - * _.zipObject(['a', 'b'], [1, 2]); - * // => { 'a': 1, 'b': 2 } - */ -function zipObject(props, values) { - return _baseZipObject(props || [], values || [], _assignValue/* default */.A); -} - -/* harmony default export */ const lodash_es_zipObject = (zipObject); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFlatten.js + 1 modules -var _baseFlatten = __webpack_require__(13588); -// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayMap.js -var _arrayMap = __webpack_require__(45572); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGet.js -var _baseGet = __webpack_require__(66318); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseMap.js -var _baseMap = __webpack_require__(52568); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseSortBy.js -/** - * The base implementation of `_.sortBy` which uses `comparer` to define the - * sort order of `array` and replaces criteria objects with their corresponding - * values. - * - * @private - * @param {Array} array The array to sort. - * @param {Function} comparer The function to define sort order. - * @returns {Array} Returns `array`. - */ -function baseSortBy(array, comparer) { - var length = array.length; - - array.sort(comparer); - while (length--) { - array[length] = array[length].value; - } - return array; -} - -/* harmony default export */ const _baseSortBy = (baseSortBy); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseUnary.js -var _baseUnary = __webpack_require__(52789); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_compareAscending.js - - -/** - * Compares values to sort them in ascending order. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {number} Returns the sort order indicator for `value`. - */ -function compareAscending(value, other) { - if (value !== other) { - var valIsDefined = value !== undefined, - valIsNull = value === null, - valIsReflexive = value === value, - valIsSymbol = (0,isSymbol/* default */.A)(value); - - var othIsDefined = other !== undefined, - othIsNull = other === null, - othIsReflexive = other === other, - othIsSymbol = (0,isSymbol/* default */.A)(other); - - if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) || - (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) || - (valIsNull && othIsDefined && othIsReflexive) || - (!valIsDefined && othIsReflexive) || - !valIsReflexive) { - return 1; - } - if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) || - (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) || - (othIsNull && valIsDefined && valIsReflexive) || - (!othIsDefined && valIsReflexive) || - !othIsReflexive) { - return -1; - } - } - return 0; -} - -/* harmony default export */ const _compareAscending = (compareAscending); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_compareMultiple.js - - -/** - * Used by `_.orderBy` to compare multiple properties of a value to another - * and stable sort them. - * - * If `orders` is unspecified, all values are sorted in ascending order. Otherwise, - * specify an order of "desc" for descending or "asc" for ascending sort order - * of corresponding values. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {boolean[]|string[]} orders The order to sort by for each property. - * @returns {number} Returns the sort order indicator for `object`. - */ -function compareMultiple(object, other, orders) { - var index = -1, - objCriteria = object.criteria, - othCriteria = other.criteria, - length = objCriteria.length, - ordersLength = orders.length; - - while (++index < length) { - var result = _compareAscending(objCriteria[index], othCriteria[index]); - if (result) { - if (index >= ordersLength) { - return result; - } - var order = orders[index]; - return result * (order == 'desc' ? -1 : 1); - } - } - // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications - // that causes it, under certain circumstances, to provide the same value for - // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247 - // for more details. - // - // This also ensures a stable sort in V8 and other engines. - // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details. - return object.index - other.index; -} - -/* harmony default export */ const _compareMultiple = (compareMultiple); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseOrderBy.js - - - - - - - - - - -/** - * The base implementation of `_.orderBy` without param guards. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. - * @param {string[]} orders The sort orders of `iteratees`. - * @returns {Array} Returns the new sorted array. - */ -function baseOrderBy(collection, iteratees, orders) { - if (iteratees.length) { - iteratees = (0,_arrayMap/* default */.A)(iteratees, function(iteratee) { - if ((0,isArray/* default */.A)(iteratee)) { - return function(value) { - return (0,_baseGet/* default */.A)(value, iteratee.length === 1 ? iteratee[0] : iteratee); - } - } - return iteratee; - }); - } else { - iteratees = [identity/* default */.A]; - } - - var index = -1; - iteratees = (0,_arrayMap/* default */.A)(iteratees, (0,_baseUnary/* default */.A)(_baseIteratee/* default */.A)); - - var result = (0,_baseMap/* default */.A)(collection, function(value, key, collection) { - var criteria = (0,_arrayMap/* default */.A)(iteratees, function(iteratee) { - return iteratee(value); - }); - return { 'criteria': criteria, 'index': ++index, 'value': value }; - }); - - return _baseSortBy(result, function(object, other) { - return _compareMultiple(object, other, orders); - }); -} - -/* harmony default export */ const _baseOrderBy = (baseOrderBy); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseRest.js -var _baseRest = __webpack_require__(24326); -// EXTERNAL MODULE: ./node_modules/lodash-es/_isIterateeCall.js -var _isIterateeCall = __webpack_require__(6832); -;// CONCATENATED MODULE: ./node_modules/lodash-es/sortBy.js - - - - - -/** - * Creates an array of elements, sorted in ascending order by the results of - * running each element in a collection thru each iteratee. This method - * performs a stable sort, that is, it preserves the original sort order of - * equal elements. The iteratees are invoked with one argument: (value). - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {...(Function|Function[])} [iteratees=[_.identity]] - * The iteratees to sort by. - * @returns {Array} Returns the new sorted array. - * @example - * - * var users = [ - * { 'user': 'fred', 'age': 48 }, - * { 'user': 'barney', 'age': 36 }, - * { 'user': 'fred', 'age': 30 }, - * { 'user': 'barney', 'age': 34 } - * ]; - * - * _.sortBy(users, [function(o) { return o.user; }]); - * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]] - * - * _.sortBy(users, ['user', 'age']); - * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]] - */ -var sortBy = (0,_baseRest/* default */.A)(function(collection, iteratees) { - if (collection == null) { - return []; - } - var length = iteratees.length; - if (length > 1 && (0,_isIterateeCall/* default */.A)(collection, iteratees[0], iteratees[1])) { - iteratees = []; - } else if (length > 2 && (0,_isIterateeCall/* default */.A)(iteratees[0], iteratees[1], iteratees[2])) { - iteratees = [iteratees[0]]; - } - return _baseOrderBy(collection, (0,_baseFlatten/* default */.A)(iteratees, 1), []); -}); - -/* harmony default export */ const lodash_es_sortBy = (sortBy); - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/cross-count.js - - - - -/* - * A function that takes a layering (an array of layers, each with an array of - * ordererd nodes) and a graph and returns a weighted crossing count. - * - * Pre-conditions: - * - * 1. Input graph must be simple (not a multigraph), directed, and include - * only simple edges. - * 2. Edges in the input graph must have assigned weights. - * - * Post-conditions: - * - * 1. The graph and layering matrix are left unchanged. - * - * This algorithm is derived from Barth, et al., "Bilayer Cross Counting." - */ -function crossCount(g, layering) { - var cc = 0; - for (var i = 1; i < layering.length; ++i) { - cc += twoLayerCrossCount(g, layering[i - 1], layering[i]); - } - return cc; -} - -function twoLayerCrossCount(g, northLayer, southLayer) { - // Sort all of the edges between the north and south layers by their position - // in the north layer and then the south. Map these edges to the position of - // their head in the south layer. - var southPos = lodash_es_zipObject( - southLayer, - map/* default */.A(southLayer, function (v, i) { - return i; - }) - ); - var southEntries = flatten/* default */.A( - map/* default */.A(northLayer, function (v) { - return lodash_es_sortBy( - map/* default */.A(g.outEdges(v), function (e) { - return { pos: southPos[e.w], weight: g.edge(e).weight }; - }), - 'pos' - ); - }) - ); - - // Build the accumulator tree - var firstIndex = 1; - while (firstIndex < southLayer.length) firstIndex <<= 1; - var treeSize = 2 * firstIndex - 1; - firstIndex -= 1; - var tree = map/* default */.A(new Array(treeSize), function () { - return 0; - }); - - // Calculate the weighted crossings - var cc = 0; - forEach/* default */.A( - // @ts-expect-error - southEntries.forEach(function (entry) { - var index = entry.pos + firstIndex; - tree[index] += entry.weight; - var weightSum = 0; - // @ts-expect-error - while (index > 0) { - // @ts-expect-error - if (index % 2) { - weightSum += tree[index + 1]; - } - // @ts-expect-error - index = (index - 1) >> 1; - tree[index] += entry.weight; - } - cc += entry.weight * weightSum; - }) - ); - - return cc; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/init-order.js - - - - -/* - * Assigns an initial order value for each node by performing a DFS search - * starting from nodes in the first rank. Nodes are assigned an order in their - * rank as they are first visited. - * - * This approach comes from Gansner, et al., "A Technique for Drawing Directed - * Graphs." - * - * Returns a layering matrix with an array per layer and each layer sorted by - * the order of its nodes. - */ -function initOrder(g) { - var visited = {}; - var simpleNodes = filter/* default */.A(g.nodes(), function (v) { - return !g.children(v).length; - }); - var maxRank = lodash_es_max( - map/* default */.A(simpleNodes, function (v) { - return g.node(v).rank; - }) - ); - var layers = map/* default */.A(range/* default */.A(maxRank + 1), function () { - return []; - }); - - function dfs(v) { - if (has/* default */.A(visited, v)) return; - visited[v] = true; - var node = g.node(v); - layers[node.rank].push(v); - forEach/* default */.A(g.successors(v), dfs); - } - - var orderedVs = lodash_es_sortBy(simpleNodes, function (v) { - return g.node(v).rank; - }); - forEach/* default */.A(orderedVs, dfs); - - return layers; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/barycenter.js - - - - -function barycenter(g, movable) { - return map/* default */.A(movable, function (v) { - var inV = g.inEdges(v); - if (!inV.length) { - return { v: v }; - } else { - var result = reduce/* default */.A( - inV, - function (acc, e) { - var edge = g.edge(e), - nodeU = g.node(e.v); - return { - sum: acc.sum + edge.weight * nodeU.order, - weight: acc.weight + edge.weight, - }; - }, - { sum: 0, weight: 0 } - ); - - return { - v: v, - barycenter: result.sum / result.weight, - weight: result.weight, - }; - } - }); -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/resolve-conflicts.js - - - - -/* - * Given a list of entries of the form {v, barycenter, weight} and a - * constraint graph this function will resolve any conflicts between the - * constraint graph and the barycenters for the entries. If the barycenters for - * an entry would violate a constraint in the constraint graph then we coalesce - * the nodes in the conflict into a new node that respects the contraint and - * aggregates barycenter and weight information. - * - * This implementation is based on the description in Forster, "A Fast and - * Simple Hueristic for Constrained Two-Level Crossing Reduction," thought it - * differs in some specific details. - * - * Pre-conditions: - * - * 1. Each entry has the form {v, barycenter, weight}, or if the node has - * no barycenter, then {v}. - * - * Returns: - * - * A new list of entries of the form {vs, i, barycenter, weight}. The list - * `vs` may either be a singleton or it may be an aggregation of nodes - * ordered such that they do not violate constraints from the constraint - * graph. The property `i` is the lowest original index of any of the - * elements in `vs`. - */ -function resolveConflicts(entries, cg) { - var mappedEntries = {}; - forEach/* default */.A(entries, function (entry, i) { - var tmp = (mappedEntries[entry.v] = { - indegree: 0, - in: [], - out: [], - vs: [entry.v], - i: i, - }); - if (!isUndefined/* default */.A(entry.barycenter)) { - // @ts-expect-error - tmp.barycenter = entry.barycenter; - // @ts-expect-error - tmp.weight = entry.weight; - } - }); - - forEach/* default */.A(cg.edges(), function (e) { - var entryV = mappedEntries[e.v]; - var entryW = mappedEntries[e.w]; - if (!isUndefined/* default */.A(entryV) && !isUndefined/* default */.A(entryW)) { - entryW.indegree++; - entryV.out.push(mappedEntries[e.w]); - } - }); - - var sourceSet = filter/* default */.A(mappedEntries, function (entry) { - // @ts-expect-error - return !entry.indegree; - }); - - return doResolveConflicts(sourceSet); -} - -function doResolveConflicts(sourceSet) { - var entries = []; - - function handleIn(vEntry) { - return function (uEntry) { - if (uEntry.merged) { - return; - } - if ( - isUndefined/* default */.A(uEntry.barycenter) || - isUndefined/* default */.A(vEntry.barycenter) || - uEntry.barycenter >= vEntry.barycenter - ) { - mergeEntries(vEntry, uEntry); - } - }; - } - - function handleOut(vEntry) { - return function (wEntry) { - wEntry['in'].push(vEntry); - if (--wEntry.indegree === 0) { - sourceSet.push(wEntry); - } - }; - } - - while (sourceSet.length) { - var entry = sourceSet.pop(); - entries.push(entry); - forEach/* default */.A(entry['in'].reverse(), handleIn(entry)); - forEach/* default */.A(entry.out, handleOut(entry)); - } - - return map/* default */.A( - filter/* default */.A(entries, function (entry) { - return !entry.merged; - }), - function (entry) { - return pick/* default */.A(entry, ['vs', 'i', 'barycenter', 'weight']); - } - ); -} - -function mergeEntries(target, source) { - var sum = 0; - var weight = 0; - - if (target.weight) { - sum += target.barycenter * target.weight; - weight += target.weight; - } - - if (source.weight) { - sum += source.barycenter * source.weight; - weight += source.weight; - } - - target.vs = source.vs.concat(target.vs); - target.barycenter = sum / weight; - target.weight = weight; - target.i = Math.min(source.i, target.i); - source.merged = true; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/sort.js - - - - - -function sort(entries, biasRight) { - var parts = partition(entries, function (entry) { - return has/* default */.A(entry, 'barycenter'); - }); - var sortable = parts.lhs, - unsortable = lodash_es_sortBy(parts.rhs, function (entry) { - return -entry.i; - }), - vs = [], - sum = 0, - weight = 0, - vsIndex = 0; - - sortable.sort(compareWithBias(!!biasRight)); - - vsIndex = consumeUnsortable(vs, unsortable, vsIndex); - - forEach/* default */.A(sortable, function (entry) { - vsIndex += entry.vs.length; - vs.push(entry.vs); - sum += entry.barycenter * entry.weight; - weight += entry.weight; - vsIndex = consumeUnsortable(vs, unsortable, vsIndex); - }); - - var result = { vs: flatten/* default */.A(vs) }; - if (weight) { - result.barycenter = sum / weight; - result.weight = weight; - } - return result; -} - -function consumeUnsortable(vs, unsortable, index) { - var last; - while (unsortable.length && (last = lodash_es_last(unsortable)).i <= index) { - unsortable.pop(); - vs.push(last.vs); - index++; - } - return index; -} - -function compareWithBias(bias) { - return function (entryV, entryW) { - if (entryV.barycenter < entryW.barycenter) { - return -1; - } else if (entryV.barycenter > entryW.barycenter) { - return 1; - } - - return !bias ? entryV.i - entryW.i : entryW.i - entryV.i; - }; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/sort-subgraph.js - - - - - - - -function sortSubgraph(g, v, cg, biasRight) { - var movable = g.children(v); - var node = g.node(v); - var bl = node ? node.borderLeft : undefined; - var br = node ? node.borderRight : undefined; - var subgraphs = {}; - - if (bl) { - movable = filter/* default */.A(movable, function (w) { - return w !== bl && w !== br; - }); - } - - var barycenters = barycenter(g, movable); - forEach/* default */.A(barycenters, function (entry) { - if (g.children(entry.v).length) { - var subgraphResult = sortSubgraph(g, entry.v, cg, biasRight); - subgraphs[entry.v] = subgraphResult; - if (has/* default */.A(subgraphResult, 'barycenter')) { - mergeBarycenters(entry, subgraphResult); - } - } - }); - - var entries = resolveConflicts(barycenters, cg); - expandSubgraphs(entries, subgraphs); - - var result = sort(entries, biasRight); - - if (bl) { - result.vs = flatten/* default */.A([bl, result.vs, br]); - if (g.predecessors(bl).length) { - var blPred = g.node(g.predecessors(bl)[0]), - brPred = g.node(g.predecessors(br)[0]); - if (!has/* default */.A(result, 'barycenter')) { - result.barycenter = 0; - result.weight = 0; - } - result.barycenter = - (result.barycenter * result.weight + blPred.order + brPred.order) / (result.weight + 2); - result.weight += 2; - } - } - - return result; -} - -function expandSubgraphs(entries, subgraphs) { - forEach/* default */.A(entries, function (entry) { - entry.vs = flatten/* default */.A( - entry.vs.map(function (v) { - if (subgraphs[v]) { - return subgraphs[v].vs; - } - return v; - }) - ); - }); -} - -function mergeBarycenters(target, other) { - if (!isUndefined/* default */.A(target.barycenter)) { - target.barycenter = - (target.barycenter * target.weight + other.barycenter * other.weight) / - (target.weight + other.weight); - target.weight += other.weight; - } else { - target.barycenter = other.barycenter; - target.weight = other.weight; - } -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/index.js - - - - - - - - - - - -/* - * Applies heuristics to minimize edge crossings in the graph and sets the best - * order solution as an order attribute on each node. - * - * Pre-conditions: - * - * 1. Graph must be DAG - * 2. Graph nodes must be objects with a "rank" attribute - * 3. Graph edges must have the "weight" attribute - * - * Post-conditions: - * - * 1. Graph nodes will have an "order" attribute based on the results of the - * algorithm. - */ -function order(g) { - var maxRank = util_maxRank(g), - downLayerGraphs = buildLayerGraphs(g, range/* default */.A(1, maxRank + 1), 'inEdges'), - upLayerGraphs = buildLayerGraphs(g, range/* default */.A(maxRank - 1, -1, -1), 'outEdges'); - - var layering = initOrder(g); - assignOrder(g, layering); - - var bestCC = Number.POSITIVE_INFINITY, - best; - - for (var i = 0, lastBest = 0; lastBest < 4; ++i, ++lastBest) { - sweepLayerGraphs(i % 2 ? downLayerGraphs : upLayerGraphs, i % 4 >= 2); - - layering = buildLayerMatrix(g); - var cc = crossCount(g, layering); - if (cc < bestCC) { - lastBest = 0; - best = lodash_es_cloneDeep(layering); - bestCC = cc; - } - } - - assignOrder(g, best); -} - -function buildLayerGraphs(g, ranks, relationship) { - return map/* default */.A(ranks, function (rank) { - return buildLayerGraph(g, rank, relationship); - }); -} - -function sweepLayerGraphs(layerGraphs, biasRight) { - var cg = new graphlib/* Graph */.T(); - forEach/* default */.A(layerGraphs, function (lg) { - var root = lg.graph().root; - var sorted = sortSubgraph(lg, root, cg, biasRight); - forEach/* default */.A(sorted.vs, function (v, i) { - lg.node(v).order = i; - }); - addSubgraphConstraints(lg, cg, sorted.vs); - }); -} - -function assignOrder(g, layering) { - forEach/* default */.A(layering, function (layer) { - forEach/* default */.A(layer, function (v, i) { - g.node(v).order = i; - }); - }); -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/parent-dummy-chains.js - - - - -function parentDummyChains(g) { - var postorderNums = parent_dummy_chains_postorder(g); - - forEach/* default */.A(g.graph().dummyChains, function (v) { - var node = g.node(v); - var edgeObj = node.edgeObj; - var pathData = findPath(g, postorderNums, edgeObj.v, edgeObj.w); - var path = pathData.path; - var lca = pathData.lca; - var pathIdx = 0; - var pathV = path[pathIdx]; - var ascending = true; - - while (v !== edgeObj.w) { - node = g.node(v); - - if (ascending) { - while ((pathV = path[pathIdx]) !== lca && g.node(pathV).maxRank < node.rank) { - pathIdx++; - } - - if (pathV === lca) { - ascending = false; - } - } - - if (!ascending) { - while ( - pathIdx < path.length - 1 && - g.node((pathV = path[pathIdx + 1])).minRank <= node.rank - ) { - pathIdx++; - } - pathV = path[pathIdx]; - } - - g.setParent(v, pathV); - v = g.successors(v)[0]; - } - }); -} - -// Find a path from v to w through the lowest common ancestor (LCA). Return the -// full path and the LCA. -function findPath(g, postorderNums, v, w) { - var vPath = []; - var wPath = []; - var low = Math.min(postorderNums[v].low, postorderNums[w].low); - var lim = Math.max(postorderNums[v].lim, postorderNums[w].lim); - var parent; - var lca; - - // Traverse up from v to find the LCA - parent = v; - do { - parent = g.parent(parent); - vPath.push(parent); - } while (parent && (postorderNums[parent].low > low || lim > postorderNums[parent].lim)); - lca = parent; - - // Traverse from w to LCA - parent = w; - while ((parent = g.parent(parent)) !== lca) { - wPath.push(parent); - } - - return { path: vPath.concat(wPath.reverse()), lca: lca }; -} - -function parent_dummy_chains_postorder(g) { - var result = {}; - var lim = 0; - - function dfs(v) { - var low = lim; - forEach/* default */.A(g.children(v), dfs); - result[v] = { low: low, lim: lim++ }; - } - forEach/* default */.A(g.children(), dfs); - - return result; -} - -// EXTERNAL MODULE: ./node_modules/lodash-es/_castFunction.js -var _castFunction = __webpack_require__(99922); -;// CONCATENATED MODULE: ./node_modules/lodash-es/forOwn.js - - - -/** - * Iterates over own enumerable string keyed properties of an object and - * invokes `iteratee` for each property. The iteratee is invoked with three - * arguments: (value, key, object). Iteratee functions may exit iteration - * early by explicitly returning `false`. - * - * @static - * @memberOf _ - * @since 0.3.0 - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Object} Returns `object`. - * @see _.forOwnRight - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.forOwn(new Foo, function(value, key) { - * console.log(key); - * }); - * // => Logs 'a' then 'b' (iteration order is not guaranteed). - */ -function forOwn(object, iteratee) { - return object && (0,_baseForOwn/* default */.A)(object, (0,_castFunction/* default */.A)(iteratee)); -} - -/* harmony default export */ const lodash_es_forOwn = (forOwn); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFor.js + 1 modules -var _baseFor = __webpack_require__(4574); -// EXTERNAL MODULE: ./node_modules/lodash-es/keysIn.js + 2 modules -var keysIn = __webpack_require__(55615); -;// CONCATENATED MODULE: ./node_modules/lodash-es/forIn.js - - - - -/** - * Iterates over own and inherited enumerable string keyed properties of an - * object and invokes `iteratee` for each property. The iteratee is invoked - * with three arguments: (value, key, object). Iteratee functions may exit - * iteration early by explicitly returning `false`. - * - * @static - * @memberOf _ - * @since 0.3.0 - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Object} Returns `object`. - * @see _.forInRight - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.forIn(new Foo, function(value, key) { - * console.log(key); - * }); - * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed). - */ -function forIn(object, iteratee) { - return object == null - ? object - : (0,_baseFor/* default */.A)(object, (0,_castFunction/* default */.A)(iteratee), keysIn/* default */.A); -} - -/* harmony default export */ const lodash_es_forIn = (forIn); - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/position/bk.js - - - - -/* - * This module provides coordinate assignment based on Brandes and Köpf, "Fast - * and Simple Horizontal Coordinate Assignment." - */ - - - -/* - * Marks all edges in the graph with a type-1 conflict with the "type1Conflict" - * property. A type-1 conflict is one where a non-inner segment crosses an - * inner segment. An inner segment is an edge with both incident nodes marked - * with the "dummy" property. - * - * This algorithm scans layer by layer, starting with the second, for type-1 - * conflicts between the current layer and the previous layer. For each layer - * it scans the nodes from left to right until it reaches one that is incident - * on an inner segment. It then scans predecessors to determine if they have - * edges that cross that inner segment. At the end a final scan is done for all - * nodes on the current rank to see if they cross the last visited inner - * segment. - * - * This algorithm (safely) assumes that a dummy node will only be incident on a - * single node in the layers being scanned. - */ -function findType1Conflicts(g, layering) { - var conflicts = {}; - - function visitLayer(prevLayer, layer) { - var // last visited node in the previous layer that is incident on an inner - // segment. - k0 = 0, - // Tracks the last node in this layer scanned for crossings with a type-1 - // segment. - scanPos = 0, - prevLayerLength = prevLayer.length, - lastNode = lodash_es_last(layer); - - forEach/* default */.A(layer, function (v, i) { - var w = findOtherInnerSegmentNode(g, v), - k1 = w ? g.node(w).order : prevLayerLength; - - if (w || v === lastNode) { - forEach/* default */.A(layer.slice(scanPos, i + 1), function (scanNode) { - forEach/* default */.A(g.predecessors(scanNode), function (u) { - var uLabel = g.node(u), - uPos = uLabel.order; - if ((uPos < k0 || k1 < uPos) && !(uLabel.dummy && g.node(scanNode).dummy)) { - addConflict(conflicts, u, scanNode); - } - }); - }); - // @ts-expect-error - scanPos = i + 1; - k0 = k1; - } - }); - - return layer; - } - - reduce/* default */.A(layering, visitLayer); - return conflicts; -} - -function findType2Conflicts(g, layering) { - var conflicts = {}; - - function scan(south, southPos, southEnd, prevNorthBorder, nextNorthBorder) { - var v; - forEach/* default */.A(range/* default */.A(southPos, southEnd), function (i) { - v = south[i]; - if (g.node(v).dummy) { - forEach/* default */.A(g.predecessors(v), function (u) { - var uNode = g.node(u); - if (uNode.dummy && (uNode.order < prevNorthBorder || uNode.order > nextNorthBorder)) { - addConflict(conflicts, u, v); - } - }); - } - }); - } - - function visitLayer(north, south) { - var prevNorthPos = -1, - nextNorthPos, - southPos = 0; - - forEach/* default */.A(south, function (v, southLookahead) { - if (g.node(v).dummy === 'border') { - var predecessors = g.predecessors(v); - if (predecessors.length) { - nextNorthPos = g.node(predecessors[0]).order; - scan(south, southPos, southLookahead, prevNorthPos, nextNorthPos); - // @ts-expect-error - southPos = southLookahead; - prevNorthPos = nextNorthPos; - } - } - scan(south, southPos, south.length, nextNorthPos, north.length); - }); - - return south; - } - - reduce/* default */.A(layering, visitLayer); - return conflicts; -} - -function findOtherInnerSegmentNode(g, v) { - if (g.node(v).dummy) { - return lodash_es_find(g.predecessors(v), function (u) { - return g.node(u).dummy; - }); - } -} - -function addConflict(conflicts, v, w) { - if (v > w) { - var tmp = v; - v = w; - w = tmp; - } - - var conflictsV = conflicts[v]; - if (!conflictsV) { - conflicts[v] = conflictsV = {}; - } - conflictsV[w] = true; -} - -function hasConflict(conflicts, v, w) { - if (v > w) { - var tmp = v; - v = w; - w = tmp; - } - return has/* default */.A(conflicts[v], w); -} - -/* - * Try to align nodes into vertical "blocks" where possible. This algorithm - * attempts to align a node with one of its median neighbors. If the edge - * connecting a neighbor is a type-1 conflict then we ignore that possibility. - * If a previous node has already formed a block with a node after the node - * we're trying to form a block with, we also ignore that possibility - our - * blocks would be split in that scenario. - */ -function verticalAlignment(g, layering, conflicts, neighborFn) { - var root = {}, - align = {}, - pos = {}; - - // We cache the position here based on the layering because the graph and - // layering may be out of sync. The layering matrix is manipulated to - // generate different extreme alignments. - forEach/* default */.A(layering, function (layer) { - forEach/* default */.A(layer, function (v, order) { - root[v] = v; - align[v] = v; - pos[v] = order; - }); - }); - - forEach/* default */.A(layering, function (layer) { - var prevIdx = -1; - forEach/* default */.A(layer, function (v) { - var ws = neighborFn(v); - if (ws.length) { - ws = lodash_es_sortBy(ws, function (w) { - return pos[w]; - }); - var mp = (ws.length - 1) / 2; - for (var i = Math.floor(mp), il = Math.ceil(mp); i <= il; ++i) { - var w = ws[i]; - if (align[v] === v && prevIdx < pos[w] && !hasConflict(conflicts, v, w)) { - align[w] = v; - align[v] = root[v] = root[w]; - prevIdx = pos[w]; - } - } - } - }); - }); - - return { root: root, align: align }; -} - -function horizontalCompaction(g, layering, root, align, reverseSep) { - // This portion of the algorithm differs from BK due to a number of problems. - // Instead of their algorithm we construct a new block graph and do two - // sweeps. The first sweep places blocks with the smallest possible - // coordinates. The second sweep removes unused space by moving blocks to the - // greatest coordinates without violating separation. - var xs = {}, - blockG = buildBlockGraph(g, layering, root, reverseSep), - borderType = reverseSep ? 'borderLeft' : 'borderRight'; - - function iterate(setXsFunc, nextNodesFunc) { - var stack = blockG.nodes(); - var elem = stack.pop(); - var visited = {}; - while (elem) { - if (visited[elem]) { - setXsFunc(elem); - } else { - visited[elem] = true; - stack.push(elem); - stack = stack.concat(nextNodesFunc(elem)); - } - - elem = stack.pop(); - } - } - - // First pass, assign smallest coordinates - function pass1(elem) { - xs[elem] = blockG.inEdges(elem).reduce(function (acc, e) { - return Math.max(acc, xs[e.v] + blockG.edge(e)); - }, 0); - } - - // Second pass, assign greatest coordinates - function pass2(elem) { - var min = blockG.outEdges(elem).reduce(function (acc, e) { - return Math.min(acc, xs[e.w] - blockG.edge(e)); - }, Number.POSITIVE_INFINITY); - - var node = g.node(elem); - if (min !== Number.POSITIVE_INFINITY && node.borderType !== borderType) { - xs[elem] = Math.max(xs[elem], min); - } - } - - iterate(pass1, blockG.predecessors.bind(blockG)); - iterate(pass2, blockG.successors.bind(blockG)); - - // Assign x coordinates to all nodes - forEach/* default */.A(align, function (v) { - xs[v] = xs[root[v]]; - }); - - return xs; -} - -function buildBlockGraph(g, layering, root, reverseSep) { - var blockGraph = new graphlib/* Graph */.T(), - graphLabel = g.graph(), - sepFn = sep(graphLabel.nodesep, graphLabel.edgesep, reverseSep); - - forEach/* default */.A(layering, function (layer) { - var u; - forEach/* default */.A(layer, function (v) { - var vRoot = root[v]; - blockGraph.setNode(vRoot); - if (u) { - var uRoot = root[u], - prevMax = blockGraph.edge(uRoot, vRoot); - blockGraph.setEdge(uRoot, vRoot, Math.max(sepFn(g, v, u), prevMax || 0)); - } - u = v; - }); - }); - - return blockGraph; -} - -/* - * Returns the alignment that has the smallest width of the given alignments. - */ -function findSmallestWidthAlignment(g, xss) { - return lodash_es_minBy(values/* default */.A(xss), function (xs) { - var max = Number.NEGATIVE_INFINITY; - var min = Number.POSITIVE_INFINITY; - - lodash_es_forIn(xs, function (x, v) { - var halfWidth = width(g, v) / 2; - - max = Math.max(x + halfWidth, max); - min = Math.min(x - halfWidth, min); - }); - - return max - min; - }); -} - -/* - * Align the coordinates of each of the layout alignments such that - * left-biased alignments have their minimum coordinate at the same point as - * the minimum coordinate of the smallest width alignment and right-biased - * alignments have their maximum coordinate at the same point as the maximum - * coordinate of the smallest width alignment. - */ -function alignCoordinates(xss, alignTo) { - var alignToVals = values/* default */.A(alignTo), - alignToMin = lodash_es_min(alignToVals), - alignToMax = lodash_es_max(alignToVals); - - forEach/* default */.A(['u', 'd'], function (vert) { - forEach/* default */.A(['l', 'r'], function (horiz) { - var alignment = vert + horiz, - xs = xss[alignment], - delta; - if (xs === alignTo) return; - - var xsVals = values/* default */.A(xs); - delta = horiz === 'l' ? alignToMin - lodash_es_min(xsVals) : alignToMax - lodash_es_max(xsVals); - - if (delta) { - xss[alignment] = lodash_es_mapValues(xs, function (x) { - return x + delta; - }); - } - }); - }); -} - -function balance(xss, align) { - return lodash_es_mapValues(xss.ul, function (ignore, v) { - if (align) { - return xss[align.toLowerCase()][v]; - } else { - var xs = lodash_es_sortBy(map/* default */.A(xss, v)); - return (xs[1] + xs[2]) / 2; - } - }); -} - -function positionX(g) { - var layering = buildLayerMatrix(g); - var conflicts = merge/* default */.A(findType1Conflicts(g, layering), findType2Conflicts(g, layering)); - - var xss = {}; - var adjustedLayering; - forEach/* default */.A(['u', 'd'], function (vert) { - adjustedLayering = vert === 'u' ? layering : values/* default */.A(layering).reverse(); - forEach/* default */.A(['l', 'r'], function (horiz) { - if (horiz === 'r') { - adjustedLayering = map/* default */.A(adjustedLayering, function (inner) { - return values/* default */.A(inner).reverse(); - }); - } - - var neighborFn = (vert === 'u' ? g.predecessors : g.successors).bind(g); - var align = verticalAlignment(g, adjustedLayering, conflicts, neighborFn); - var xs = horizontalCompaction(g, adjustedLayering, align.root, align.align, horiz === 'r'); - if (horiz === 'r') { - xs = lodash_es_mapValues(xs, function (x) { - return -x; - }); - } - xss[vert + horiz] = xs; - }); - }); - - var smallestWidth = findSmallestWidthAlignment(g, xss); - alignCoordinates(xss, smallestWidth); - return balance(xss, g.graph().align); -} - -function sep(nodeSep, edgeSep, reverseSep) { - return function (g, v, w) { - var vLabel = g.node(v); - var wLabel = g.node(w); - var sum = 0; - var delta; - - sum += vLabel.width / 2; - if (has/* default */.A(vLabel, 'labelpos')) { - switch (vLabel.labelpos.toLowerCase()) { - case 'l': - delta = -vLabel.width / 2; - break; - case 'r': - delta = vLabel.width / 2; - break; - } - } - if (delta) { - sum += reverseSep ? delta : -delta; - } - delta = 0; - - sum += (vLabel.dummy ? edgeSep : nodeSep) / 2; - sum += (wLabel.dummy ? edgeSep : nodeSep) / 2; - - sum += wLabel.width / 2; - if (has/* default */.A(wLabel, 'labelpos')) { - switch (wLabel.labelpos.toLowerCase()) { - case 'l': - delta = wLabel.width / 2; - break; - case 'r': - delta = -wLabel.width / 2; - break; - } - } - if (delta) { - sum += reverseSep ? delta : -delta; - } - delta = 0; - - return sum; - }; -} - -function width(g, v) { - return g.node(v).width; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/position/index.js - - - - - - -function position(g) { - g = asNonCompoundGraph(g); - - positionY(g); - lodash_es_forOwn(positionX(g), function (x, v) { - g.node(v).x = x; - }); -} - -function positionY(g) { - var layering = buildLayerMatrix(g); - var rankSep = g.graph().ranksep; - var prevY = 0; - forEach/* default */.A(layering, function (layer) { - var maxHeight = lodash_es_max( - map/* default */.A(layer, function (v) { - return g.node(v).height; - }) - ); - forEach/* default */.A(layer, function (v) { - g.node(v).y = prevY + maxHeight / 2; - }); - prevY += maxHeight + rankSep; - }); -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/layout.js - - - - - - - - - - - - - - - -function layout(g, opts) { - var time = opts && opts.debugTiming ? util_time : notime; - time('layout', function () { - var layoutGraph = time(' buildLayoutGraph', function () { - return buildLayoutGraph(g); - }); - time(' runLayout', function () { - runLayout(layoutGraph, time); - }); - time(' updateInputGraph', function () { - updateInputGraph(g, layoutGraph); - }); - }); -} - -function runLayout(g, time) { - time(' makeSpaceForEdgeLabels', function () { - makeSpaceForEdgeLabels(g); - }); - time(' removeSelfEdges', function () { - removeSelfEdges(g); - }); - time(' acyclic', function () { - run(g); - }); - time(' nestingGraph.run', function () { - nesting_graph_run(g); - }); - time(' rank', function () { - rank(asNonCompoundGraph(g)); - }); - time(' injectEdgeLabelProxies', function () { - injectEdgeLabelProxies(g); - }); - time(' removeEmptyRanks', function () { - removeEmptyRanks(g); - }); - time(' nestingGraph.cleanup', function () { - cleanup(g); - }); - time(' normalizeRanks', function () { - normalizeRanks(g); - }); - time(' assignRankMinMax', function () { - assignRankMinMax(g); - }); - time(' removeEdgeLabelProxies', function () { - removeEdgeLabelProxies(g); - }); - time(' normalize.run', function () { - normalize_run(g); - }); - time(' parentDummyChains', function () { - parentDummyChains(g); - }); - time(' addBorderSegments', function () { - addBorderSegments(g); - }); - time(' order', function () { - order(g); - }); - time(' insertSelfEdges', function () { - insertSelfEdges(g); - }); - time(' adjustCoordinateSystem', function () { - adjust(g); - }); - time(' position', function () { - position(g); - }); - time(' positionSelfEdges', function () { - positionSelfEdges(g); - }); - time(' removeBorderNodes', function () { - removeBorderNodes(g); - }); - time(' normalize.undo', function () { - normalize_undo(g); - }); - time(' fixupEdgeLabelCoords', function () { - fixupEdgeLabelCoords(g); - }); - time(' undoCoordinateSystem', function () { - coordinate_system_undo(g); - }); - time(' translateGraph', function () { - translateGraph(g); - }); - time(' assignNodeIntersects', function () { - assignNodeIntersects(g); - }); - time(' reversePoints', function () { - reversePointsForReversedEdges(g); - }); - time(' acyclic.undo', function () { - undo(g); - }); -} - -/* - * Copies final layout information from the layout graph back to the input - * graph. This process only copies whitelisted attributes from the layout graph - * to the input graph, so it serves as a good place to determine what - * attributes can influence layout. - */ -function updateInputGraph(inputGraph, layoutGraph) { - forEach/* default */.A(inputGraph.nodes(), function (v) { - var inputLabel = inputGraph.node(v); - var layoutLabel = layoutGraph.node(v); - - if (inputLabel) { - inputLabel.x = layoutLabel.x; - inputLabel.y = layoutLabel.y; - - if (layoutGraph.children(v).length) { - inputLabel.width = layoutLabel.width; - inputLabel.height = layoutLabel.height; - } - } - }); - - forEach/* default */.A(inputGraph.edges(), function (e) { - var inputLabel = inputGraph.edge(e); - var layoutLabel = layoutGraph.edge(e); - - inputLabel.points = layoutLabel.points; - if (has/* default */.A(layoutLabel, 'x')) { - inputLabel.x = layoutLabel.x; - inputLabel.y = layoutLabel.y; - } - }); - - inputGraph.graph().width = layoutGraph.graph().width; - inputGraph.graph().height = layoutGraph.graph().height; -} - -var graphNumAttrs = ['nodesep', 'edgesep', 'ranksep', 'marginx', 'marginy']; -var graphDefaults = { ranksep: 50, edgesep: 20, nodesep: 50, rankdir: 'tb' }; -var graphAttrs = ['acyclicer', 'ranker', 'rankdir', 'align']; -var nodeNumAttrs = ['width', 'height']; -var nodeDefaults = { width: 0, height: 0 }; -var edgeNumAttrs = ['minlen', 'weight', 'width', 'height', 'labeloffset']; -var edgeDefaults = { - minlen: 1, - weight: 1, - width: 0, - height: 0, - labeloffset: 10, - labelpos: 'r', -}; -var edgeAttrs = ['labelpos']; - -/* - * Constructs a new graph from the input graph, which can be used for layout. - * This process copies only whitelisted attributes from the input graph to the - * layout graph. Thus this function serves as a good place to determine what - * attributes can influence layout. - */ -function buildLayoutGraph(inputGraph) { - var g = new graphlib/* Graph */.T({ multigraph: true, compound: true }); - var graph = canonicalize(inputGraph.graph()); - - g.setGraph( - merge/* default */.A({}, graphDefaults, selectNumberAttrs(graph, graphNumAttrs), pick/* default */.A(graph, graphAttrs)) - ); - - forEach/* default */.A(inputGraph.nodes(), function (v) { - var node = canonicalize(inputGraph.node(v)); - g.setNode(v, defaults/* default */.A(selectNumberAttrs(node, nodeNumAttrs), nodeDefaults)); - g.setParent(v, inputGraph.parent(v)); - }); - - forEach/* default */.A(inputGraph.edges(), function (e) { - var edge = canonicalize(inputGraph.edge(e)); - g.setEdge( - e, - merge/* default */.A({}, edgeDefaults, selectNumberAttrs(edge, edgeNumAttrs), pick/* default */.A(edge, edgeAttrs)) - ); - }); - - return g; -} - -/* - * This idea comes from the Gansner paper: to account for edge labels in our - * layout we split each rank in half by doubling minlen and halving ranksep. - * Then we can place labels at these mid-points between nodes. - * - * We also add some minimal padding to the width to push the label for the edge - * away from the edge itself a bit. - */ -function makeSpaceForEdgeLabels(g) { - var graph = g.graph(); - graph.ranksep /= 2; - forEach/* default */.A(g.edges(), function (e) { - var edge = g.edge(e); - edge.minlen *= 2; - if (edge.labelpos.toLowerCase() !== 'c') { - if (graph.rankdir === 'TB' || graph.rankdir === 'BT') { - edge.width += edge.labeloffset; - } else { - edge.height += edge.labeloffset; - } - } - }); -} - -/* - * Creates temporary dummy nodes that capture the rank in which each edge's - * label is going to, if it has one of non-zero width and height. We do this - * so that we can safely remove empty ranks while preserving balance for the - * label's position. - */ -function injectEdgeLabelProxies(g) { - forEach/* default */.A(g.edges(), function (e) { - var edge = g.edge(e); - if (edge.width && edge.height) { - var v = g.node(e.v); - var w = g.node(e.w); - var label = { rank: (w.rank - v.rank) / 2 + v.rank, e: e }; - addDummyNode(g, 'edge-proxy', label, '_ep'); - } - }); -} - -function assignRankMinMax(g) { - var maxRank = 0; - forEach/* default */.A(g.nodes(), function (v) { - var node = g.node(v); - if (node.borderTop) { - node.minRank = g.node(node.borderTop).rank; - node.maxRank = g.node(node.borderBottom).rank; - // @ts-expect-error - maxRank = lodash_es_max(maxRank, node.maxRank); - } - }); - g.graph().maxRank = maxRank; -} - -function removeEdgeLabelProxies(g) { - forEach/* default */.A(g.nodes(), function (v) { - var node = g.node(v); - if (node.dummy === 'edge-proxy') { - g.edge(node.e).labelRank = node.rank; - g.removeNode(v); - } - }); -} - -function translateGraph(g) { - var minX = Number.POSITIVE_INFINITY; - var maxX = 0; - var minY = Number.POSITIVE_INFINITY; - var maxY = 0; - var graphLabel = g.graph(); - var marginX = graphLabel.marginx || 0; - var marginY = graphLabel.marginy || 0; - - function getExtremes(attrs) { - var x = attrs.x; - var y = attrs.y; - var w = attrs.width; - var h = attrs.height; - minX = Math.min(minX, x - w / 2); - maxX = Math.max(maxX, x + w / 2); - minY = Math.min(minY, y - h / 2); - maxY = Math.max(maxY, y + h / 2); - } - - forEach/* default */.A(g.nodes(), function (v) { - getExtremes(g.node(v)); - }); - forEach/* default */.A(g.edges(), function (e) { - var edge = g.edge(e); - if (has/* default */.A(edge, 'x')) { - getExtremes(edge); - } - }); - - minX -= marginX; - minY -= marginY; - - forEach/* default */.A(g.nodes(), function (v) { - var node = g.node(v); - node.x -= minX; - node.y -= minY; - }); - - forEach/* default */.A(g.edges(), function (e) { - var edge = g.edge(e); - forEach/* default */.A(edge.points, function (p) { - p.x -= minX; - p.y -= minY; - }); - if (has/* default */.A(edge, 'x')) { - edge.x -= minX; - } - if (has/* default */.A(edge, 'y')) { - edge.y -= minY; - } - }); - - graphLabel.width = maxX - minX + marginX; - graphLabel.height = maxY - minY + marginY; -} - -function assignNodeIntersects(g) { - forEach/* default */.A(g.edges(), function (e) { - var edge = g.edge(e); - var nodeV = g.node(e.v); - var nodeW = g.node(e.w); - var p1, p2; - if (!edge.points) { - edge.points = []; - p1 = nodeW; - p2 = nodeV; - } else { - p1 = edge.points[0]; - p2 = edge.points[edge.points.length - 1]; - } - edge.points.unshift(intersectRect(nodeV, p1)); - edge.points.push(intersectRect(nodeW, p2)); - }); -} - -function fixupEdgeLabelCoords(g) { - forEach/* default */.A(g.edges(), function (e) { - var edge = g.edge(e); - if (has/* default */.A(edge, 'x')) { - if (edge.labelpos === 'l' || edge.labelpos === 'r') { - edge.width -= edge.labeloffset; - } - switch (edge.labelpos) { - case 'l': - edge.x -= edge.width / 2 + edge.labeloffset; - break; - case 'r': - edge.x += edge.width / 2 + edge.labeloffset; - break; - } - } - }); -} - -function reversePointsForReversedEdges(g) { - forEach/* default */.A(g.edges(), function (e) { - var edge = g.edge(e); - if (edge.reversed) { - edge.points.reverse(); - } - }); -} - -function removeBorderNodes(g) { - forEach/* default */.A(g.nodes(), function (v) { - if (g.children(v).length) { - var node = g.node(v); - var t = g.node(node.borderTop); - var b = g.node(node.borderBottom); - var l = g.node(lodash_es_last(node.borderLeft)); - var r = g.node(lodash_es_last(node.borderRight)); - - node.width = Math.abs(r.x - l.x); - node.height = Math.abs(b.y - t.y); - node.x = l.x + node.width / 2; - node.y = t.y + node.height / 2; - } - }); - - forEach/* default */.A(g.nodes(), function (v) { - if (g.node(v).dummy === 'border') { - g.removeNode(v); - } - }); -} - -function removeSelfEdges(g) { - forEach/* default */.A(g.edges(), function (e) { - if (e.v === e.w) { - var node = g.node(e.v); - if (!node.selfEdges) { - node.selfEdges = []; - } - node.selfEdges.push({ e: e, label: g.edge(e) }); - g.removeEdge(e); - } - }); -} - -function insertSelfEdges(g) { - var layers = buildLayerMatrix(g); - forEach/* default */.A(layers, function (layer) { - var orderShift = 0; - forEach/* default */.A(layer, function (v, i) { - var node = g.node(v); - node.order = i + orderShift; - forEach/* default */.A(node.selfEdges, function (selfEdge) { - addDummyNode( - g, - 'selfedge', - { - width: selfEdge.label.width, - height: selfEdge.label.height, - rank: node.rank, - order: i + ++orderShift, - e: selfEdge.e, - label: selfEdge.label, - }, - '_se' - ); - }); - delete node.selfEdges; - }); - }); -} - -function positionSelfEdges(g) { - forEach/* default */.A(g.nodes(), function (v) { - var node = g.node(v); - if (node.dummy === 'selfedge') { - var selfNode = g.node(node.e.v); - var x = selfNode.x + selfNode.width / 2; - var y = selfNode.y; - var dx = node.x - x; - var dy = selfNode.height / 2; - g.setEdge(node.e, node.label); - g.removeNode(v); - node.label.points = [ - { x: x + (2 * dx) / 3, y: y - dy }, - { x: x + (5 * dx) / 6, y: y - dy }, - { x: x + dx, y: y }, - { x: x + (5 * dx) / 6, y: y + dy }, - { x: x + (2 * dx) / 3, y: y + dy }, - ]; - node.label.x = node.x; - node.label.y = node.y; - } - }); -} - -function selectNumberAttrs(obj, attrs) { - return lodash_es_mapValues(pick/* default */.A(obj, attrs), Number); -} - -function canonicalize(attrs) { - var newAttrs = {}; - forEach/* default */.A(attrs, function (v, k) { - newAttrs[k.toLowerCase()] = v; - }); - return newAttrs; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/index.js - - - - - - - - -/***/ }), - -/***/ 73046: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - T: () => (/* binding */ Graph) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/has.js + 1 modules -var has = __webpack_require__(48585); -// EXTERNAL MODULE: ./node_modules/lodash-es/constant.js -var constant = __webpack_require__(39142); -// EXTERNAL MODULE: ./node_modules/lodash-es/isFunction.js -var isFunction = __webpack_require__(89610); -// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js -var keys = __webpack_require__(27422); -// EXTERNAL MODULE: ./node_modules/lodash-es/filter.js + 1 modules -var filter = __webpack_require__(11662); -// EXTERNAL MODULE: ./node_modules/lodash-es/isEmpty.js -var isEmpty = __webpack_require__(66401); -// EXTERNAL MODULE: ./node_modules/lodash-es/forEach.js -var forEach = __webpack_require__(8058); -// EXTERNAL MODULE: ./node_modules/lodash-es/isUndefined.js -var isUndefined = __webpack_require__(69592); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFlatten.js + 1 modules -var _baseFlatten = __webpack_require__(13588); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseRest.js -var _baseRest = __webpack_require__(24326); -// EXTERNAL MODULE: ./node_modules/lodash-es/_SetCache.js + 2 modules -var _SetCache = __webpack_require__(62062); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFindIndex.js -var _baseFindIndex = __webpack_require__(25707); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsNaN.js -/** - * The base implementation of `_.isNaN` without support for number objects. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. - */ -function baseIsNaN(value) { - return value !== value; -} - -/* harmony default export */ const _baseIsNaN = (baseIsNaN); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_strictIndexOf.js -/** - * A specialized version of `_.indexOf` which performs strict equality - * comparisons of values, i.e. `===`. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} fromIndex The index to search from. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function strictIndexOf(array, value, fromIndex) { - var index = fromIndex - 1, - length = array.length; - - while (++index < length) { - if (array[index] === value) { - return index; - } - } - return -1; -} - -/* harmony default export */ const _strictIndexOf = (strictIndexOf); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIndexOf.js - - - - -/** - * The base implementation of `_.indexOf` without `fromIndex` bounds checks. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} fromIndex The index to search from. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function baseIndexOf(array, value, fromIndex) { - return value === value - ? _strictIndexOf(array, value, fromIndex) - : (0,_baseFindIndex/* default */.A)(array, _baseIsNaN, fromIndex); -} - -/* harmony default export */ const _baseIndexOf = (baseIndexOf); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_arrayIncludes.js - - -/** - * A specialized version of `_.includes` for arrays without support for - * specifying an index to search from. - * - * @private - * @param {Array} [array] The array to inspect. - * @param {*} target The value to search for. - * @returns {boolean} Returns `true` if `target` is found, else `false`. - */ -function arrayIncludes(array, value) { - var length = array == null ? 0 : array.length; - return !!length && _baseIndexOf(array, value, 0) > -1; -} - -/* harmony default export */ const _arrayIncludes = (arrayIncludes); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_arrayIncludesWith.js -/** - * This function is like `arrayIncludes` except that it accepts a comparator. - * - * @private - * @param {Array} [array] The array to inspect. - * @param {*} target The value to search for. - * @param {Function} comparator The comparator invoked per element. - * @returns {boolean} Returns `true` if `target` is found, else `false`. - */ -function arrayIncludesWith(array, value, comparator) { - var index = -1, - length = array == null ? 0 : array.length; - - while (++index < length) { - if (comparator(value, array[index])) { - return true; - } - } - return false; -} - -/* harmony default export */ const _arrayIncludesWith = (arrayIncludesWith); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_cacheHas.js -var _cacheHas = __webpack_require__(64099); -// EXTERNAL MODULE: ./node_modules/lodash-es/_Set.js -var _Set = __webpack_require__(39857); -;// CONCATENATED MODULE: ./node_modules/lodash-es/noop.js -/** - * This method returns `undefined`. - * - * @static - * @memberOf _ - * @since 2.3.0 - * @category Util - * @example - * - * _.times(2, _.noop); - * // => [undefined, undefined] - */ -function noop() { - // No operation performed. -} - -/* harmony default export */ const lodash_es_noop = (noop); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_setToArray.js -var _setToArray = __webpack_require__(29959); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_createSet.js - - - - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0; - -/** - * Creates a set object of `values`. - * - * @private - * @param {Array} values The values to add to the set. - * @returns {Object} Returns the new set. - */ -var createSet = !(_Set/* default */.A && (1 / (0,_setToArray/* default */.A)(new _Set/* default */.A([,-0]))[1]) == INFINITY) ? lodash_es_noop : function(values) { - return new _Set/* default */.A(values); -}; - -/* harmony default export */ const _createSet = (createSet); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseUniq.js - - - - - - - -/** Used as the size to enable large array optimizations. */ -var LARGE_ARRAY_SIZE = 200; - -/** - * The base implementation of `_.uniqBy` without support for iteratee shorthands. - * - * @private - * @param {Array} array The array to inspect. - * @param {Function} [iteratee] The iteratee invoked per element. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new duplicate free array. - */ -function baseUniq(array, iteratee, comparator) { - var index = -1, - includes = _arrayIncludes, - length = array.length, - isCommon = true, - result = [], - seen = result; - - if (comparator) { - isCommon = false; - includes = _arrayIncludesWith; - } - else if (length >= LARGE_ARRAY_SIZE) { - var set = iteratee ? null : _createSet(array); - if (set) { - return (0,_setToArray/* default */.A)(set); - } - isCommon = false; - includes = _cacheHas/* default */.A; - seen = new _SetCache/* default */.A; - } - else { - seen = iteratee ? [] : result; - } - outer: - while (++index < length) { - var value = array[index], - computed = iteratee ? iteratee(value) : value; - - value = (comparator || value !== 0) ? value : 0; - if (isCommon && computed === computed) { - var seenIndex = seen.length; - while (seenIndex--) { - if (seen[seenIndex] === computed) { - continue outer; - } - } - if (iteratee) { - seen.push(computed); - } - result.push(value); - } - else if (!includes(seen, computed, comparator)) { - if (seen !== result) { - seen.push(computed); - } - result.push(value); - } - } - return result; -} - -/* harmony default export */ const _baseUniq = (baseUniq); - -// EXTERNAL MODULE: ./node_modules/lodash-es/isArrayLikeObject.js -var isArrayLikeObject = __webpack_require__(53533); -;// CONCATENATED MODULE: ./node_modules/lodash-es/union.js - - - - - -/** - * Creates an array of unique values, in order, from all given arrays using - * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @returns {Array} Returns the new array of combined values. - * @example - * - * _.union([2], [1, 2]); - * // => [2, 1] - */ -var union = (0,_baseRest/* default */.A)(function(arrays) { - return _baseUniq((0,_baseFlatten/* default */.A)(arrays, 1, isArrayLikeObject/* default */.A, true)); -}); - -/* harmony default export */ const lodash_es_union = (union); - -// EXTERNAL MODULE: ./node_modules/lodash-es/values.js + 1 modules -var values = __webpack_require__(38207); -// EXTERNAL MODULE: ./node_modules/lodash-es/reduce.js + 2 modules -var reduce = __webpack_require__(89463); -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/graph.js - - -var DEFAULT_EDGE_NAME = '\x00'; -var GRAPH_NODE = '\x00'; -var EDGE_KEY_DELIM = '\x01'; - -// Implementation notes: -// -// * Node id query functions should return string ids for the nodes -// * Edge id query functions should return an "edgeObj", edge object, that is -// composed of enough information to uniquely identify an edge: {v, w, name}. -// * Internally we use an "edgeId", a stringified form of the edgeObj, to -// reference edges. This is because we need a performant way to look these -// edges up and, object properties, which have string keys, are the closest -// we're going to get to a performant hashtable in JavaScript. - -// Implementation notes: -// -// * Node id query functions should return string ids for the nodes -// * Edge id query functions should return an "edgeObj", edge object, that is -// composed of enough information to uniquely identify an edge: {v, w, name}. -// * Internally we use an "edgeId", a stringified form of the edgeObj, to -// reference edges. This is because we need a performant way to look these -// edges up and, object properties, which have string keys, are the closest -// we're going to get to a performant hashtable in JavaScript. -class Graph { - constructor(opts = {}) { - this._isDirected = has/* default */.A(opts, 'directed') ? opts.directed : true; - this._isMultigraph = has/* default */.A(opts, 'multigraph') ? opts.multigraph : false; - this._isCompound = has/* default */.A(opts, 'compound') ? opts.compound : false; - - // Label for the graph itself - this._label = undefined; - - // Defaults to be set when creating a new node - this._defaultNodeLabelFn = constant/* default */.A(undefined); - - // Defaults to be set when creating a new edge - this._defaultEdgeLabelFn = constant/* default */.A(undefined); - - // v -> label - this._nodes = {}; - - if (this._isCompound) { - // v -> parent - this._parent = {}; - - // v -> children - this._children = {}; - this._children[GRAPH_NODE] = {}; - } - - // v -> edgeObj - this._in = {}; - - // u -> v -> Number - this._preds = {}; - - // v -> edgeObj - this._out = {}; - - // v -> w -> Number - this._sucs = {}; - - // e -> edgeObj - this._edgeObjs = {}; - - // e -> label - this._edgeLabels = {}; - } - /* === Graph functions ========= */ - isDirected() { - return this._isDirected; - } - isMultigraph() { - return this._isMultigraph; - } - isCompound() { - return this._isCompound; - } - setGraph(label) { - this._label = label; - return this; - } - graph() { - return this._label; - } - /* === Node functions ========== */ - setDefaultNodeLabel(newDefault) { - if (!isFunction/* default */.A(newDefault)) { - newDefault = constant/* default */.A(newDefault); - } - this._defaultNodeLabelFn = newDefault; - return this; - } - nodeCount() { - return this._nodeCount; - } - nodes() { - return keys/* default */.A(this._nodes); - } - sources() { - var self = this; - return filter/* default */.A(this.nodes(), function (v) { - return isEmpty/* default */.A(self._in[v]); - }); - } - sinks() { - var self = this; - return filter/* default */.A(this.nodes(), function (v) { - return isEmpty/* default */.A(self._out[v]); - }); - } - setNodes(vs, value) { - var args = arguments; - var self = this; - forEach/* default */.A(vs, function (v) { - if (args.length > 1) { - self.setNode(v, value); - } else { - self.setNode(v); - } - }); - return this; - } - setNode(v, value) { - if (has/* default */.A(this._nodes, v)) { - if (arguments.length > 1) { - this._nodes[v] = value; - } - return this; - } - - // @ts-expect-error - this._nodes[v] = arguments.length > 1 ? value : this._defaultNodeLabelFn(v); - if (this._isCompound) { - this._parent[v] = GRAPH_NODE; - this._children[v] = {}; - this._children[GRAPH_NODE][v] = true; - } - this._in[v] = {}; - this._preds[v] = {}; - this._out[v] = {}; - this._sucs[v] = {}; - ++this._nodeCount; - return this; - } - node(v) { - return this._nodes[v]; - } - hasNode(v) { - return has/* default */.A(this._nodes, v); - } - removeNode(v) { - var self = this; - if (has/* default */.A(this._nodes, v)) { - var removeEdge = function (e) { - self.removeEdge(self._edgeObjs[e]); - }; - delete this._nodes[v]; - if (this._isCompound) { - this._removeFromParentsChildList(v); - delete this._parent[v]; - forEach/* default */.A(this.children(v), function (child) { - self.setParent(child); - }); - delete this._children[v]; - } - forEach/* default */.A(keys/* default */.A(this._in[v]), removeEdge); - delete this._in[v]; - delete this._preds[v]; - forEach/* default */.A(keys/* default */.A(this._out[v]), removeEdge); - delete this._out[v]; - delete this._sucs[v]; - --this._nodeCount; - } - return this; - } - setParent(v, parent) { - if (!this._isCompound) { - throw new Error('Cannot set parent in a non-compound graph'); - } - - if (isUndefined/* default */.A(parent)) { - parent = GRAPH_NODE; - } else { - // Coerce parent to string - parent += ''; - for (var ancestor = parent; !isUndefined/* default */.A(ancestor); ancestor = this.parent(ancestor)) { - if (ancestor === v) { - throw new Error('Setting ' + parent + ' as parent of ' + v + ' would create a cycle'); - } - } - - this.setNode(parent); - } - - this.setNode(v); - this._removeFromParentsChildList(v); - this._parent[v] = parent; - this._children[parent][v] = true; - return this; - } - _removeFromParentsChildList(v) { - delete this._children[this._parent[v]][v]; - } - parent(v) { - if (this._isCompound) { - var parent = this._parent[v]; - if (parent !== GRAPH_NODE) { - return parent; - } - } - } - children(v) { - if (isUndefined/* default */.A(v)) { - v = GRAPH_NODE; - } - - if (this._isCompound) { - var children = this._children[v]; - if (children) { - return keys/* default */.A(children); - } - } else if (v === GRAPH_NODE) { - return this.nodes(); - } else if (this.hasNode(v)) { - return []; - } - } - predecessors(v) { - var predsV = this._preds[v]; - if (predsV) { - return keys/* default */.A(predsV); - } - } - successors(v) { - var sucsV = this._sucs[v]; - if (sucsV) { - return keys/* default */.A(sucsV); - } - } - neighbors(v) { - var preds = this.predecessors(v); - if (preds) { - return lodash_es_union(preds, this.successors(v)); - } - } - isLeaf(v) { - var neighbors; - if (this.isDirected()) { - neighbors = this.successors(v); - } else { - neighbors = this.neighbors(v); - } - return neighbors.length === 0; - } - filterNodes(filter) { - // @ts-expect-error - var copy = new this.constructor({ - directed: this._isDirected, - multigraph: this._isMultigraph, - compound: this._isCompound, - }); - - copy.setGraph(this.graph()); - - var self = this; - forEach/* default */.A(this._nodes, function (value, v) { - if (filter(v)) { - copy.setNode(v, value); - } - }); - - forEach/* default */.A(this._edgeObjs, function (e) { - // @ts-expect-error - if (copy.hasNode(e.v) && copy.hasNode(e.w)) { - copy.setEdge(e, self.edge(e)); - } - }); - - var parents = {}; - function findParent(v) { - var parent = self.parent(v); - if (parent === undefined || copy.hasNode(parent)) { - parents[v] = parent; - return parent; - } else if (parent in parents) { - return parents[parent]; - } else { - return findParent(parent); - } - } - - if (this._isCompound) { - forEach/* default */.A(copy.nodes(), function (v) { - copy.setParent(v, findParent(v)); - }); - } - - return copy; - } - /* === Edge functions ========== */ - setDefaultEdgeLabel(newDefault) { - if (!isFunction/* default */.A(newDefault)) { - newDefault = constant/* default */.A(newDefault); - } - this._defaultEdgeLabelFn = newDefault; - return this; - } - edgeCount() { - return this._edgeCount; - } - edges() { - return values/* default */.A(this._edgeObjs); - } - setPath(vs, value) { - var self = this; - var args = arguments; - reduce/* default */.A(vs, function (v, w) { - if (args.length > 1) { - self.setEdge(v, w, value); - } else { - self.setEdge(v, w); - } - return w; - }); - return this; - } - /* - * setEdge(v, w, [value, [name]]) - * setEdge({ v, w, [name] }, [value]) - */ - setEdge() { - var v, w, name, value; - var valueSpecified = false; - var arg0 = arguments[0]; - - if (typeof arg0 === 'object' && arg0 !== null && 'v' in arg0) { - v = arg0.v; - w = arg0.w; - name = arg0.name; - if (arguments.length === 2) { - value = arguments[1]; - valueSpecified = true; - } - } else { - v = arg0; - w = arguments[1]; - name = arguments[3]; - if (arguments.length > 2) { - value = arguments[2]; - valueSpecified = true; - } - } - - v = '' + v; - w = '' + w; - if (!isUndefined/* default */.A(name)) { - name = '' + name; - } - - var e = edgeArgsToId(this._isDirected, v, w, name); - if (has/* default */.A(this._edgeLabels, e)) { - if (valueSpecified) { - this._edgeLabels[e] = value; - } - return this; - } - - if (!isUndefined/* default */.A(name) && !this._isMultigraph) { - throw new Error('Cannot set a named edge when isMultigraph = false'); - } - - // It didn't exist, so we need to create it. - // First ensure the nodes exist. - this.setNode(v); - this.setNode(w); - - // @ts-expect-error - this._edgeLabels[e] = valueSpecified ? value : this._defaultEdgeLabelFn(v, w, name); - - var edgeObj = edgeArgsToObj(this._isDirected, v, w, name); - // Ensure we add undirected edges in a consistent way. - v = edgeObj.v; - w = edgeObj.w; - - Object.freeze(edgeObj); - this._edgeObjs[e] = edgeObj; - incrementOrInitEntry(this._preds[w], v); - incrementOrInitEntry(this._sucs[v], w); - this._in[w][e] = edgeObj; - this._out[v][e] = edgeObj; - this._edgeCount++; - return this; - } - edge(v, w, name) { - var e = - arguments.length === 1 - ? edgeObjToId(this._isDirected, arguments[0]) - : edgeArgsToId(this._isDirected, v, w, name); - return this._edgeLabels[e]; - } - hasEdge(v, w, name) { - var e = - arguments.length === 1 - ? edgeObjToId(this._isDirected, arguments[0]) - : edgeArgsToId(this._isDirected, v, w, name); - return has/* default */.A(this._edgeLabels, e); - } - removeEdge(v, w, name) { - var e = - arguments.length === 1 - ? edgeObjToId(this._isDirected, arguments[0]) - : edgeArgsToId(this._isDirected, v, w, name); - var edge = this._edgeObjs[e]; - if (edge) { - v = edge.v; - w = edge.w; - delete this._edgeLabels[e]; - delete this._edgeObjs[e]; - decrementOrRemoveEntry(this._preds[w], v); - decrementOrRemoveEntry(this._sucs[v], w); - delete this._in[w][e]; - delete this._out[v][e]; - this._edgeCount--; - } - return this; - } - inEdges(v, u) { - var inV = this._in[v]; - if (inV) { - var edges = values/* default */.A(inV); - if (!u) { - return edges; - } - return filter/* default */.A(edges, function (edge) { - return edge.v === u; - }); - } - } - outEdges(v, w) { - var outV = this._out[v]; - if (outV) { - var edges = values/* default */.A(outV); - if (!w) { - return edges; - } - return filter/* default */.A(edges, function (edge) { - return edge.w === w; - }); - } - } - nodeEdges(v, w) { - var inEdges = this.inEdges(v, w); - if (inEdges) { - return inEdges.concat(this.outEdges(v, w)); - } - } -} - -/* Number of nodes in the graph. Should only be changed by the implementation. */ -Graph.prototype._nodeCount = 0; - -/* Number of edges in the graph. Should only be changed by the implementation. */ -Graph.prototype._edgeCount = 0; - -function incrementOrInitEntry(map, k) { - if (map[k]) { - map[k]++; - } else { - map[k] = 1; - } -} - -function decrementOrRemoveEntry(map, k) { - if (!--map[k]) { - delete map[k]; - } -} - -function edgeArgsToId(isDirected, v_, w_, name) { - var v = '' + v_; - var w = '' + w_; - if (!isDirected && v > w) { - var tmp = v; - v = w; - w = tmp; - } - return v + EDGE_KEY_DELIM + w + EDGE_KEY_DELIM + (isUndefined/* default */.A(name) ? DEFAULT_EDGE_NAME : name); -} - -function edgeArgsToObj(isDirected, v_, w_, name) { - var v = '' + v_; - var w = '' + w_; - if (!isDirected && v > w) { - var tmp = v; - v = w; - w = tmp; - } - var edgeObj = { v: v, w: w }; - if (name) { - edgeObj.name = name; - } - return edgeObj; -} - -function edgeObjToId(isDirected, edgeObj) { - return edgeArgsToId(isDirected, edgeObj.v, edgeObj.w, edgeObj.name); -} - - -/***/ }), - -/***/ 697: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ T: () => (/* reexport safe */ _graph_js__WEBPACK_IMPORTED_MODULE_0__.T) -/* harmony export */ }); -/* unused harmony export version */ -/* harmony import */ var _graph_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(73046); -// Includes only the "core" of graphlib - - - -const version = '2.1.9-pre'; - - - - -/***/ }), - -/***/ 14075: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ M: () => (/* binding */ write) -/* harmony export */ }); -/* unused harmony export read */ -/* harmony import */ var lodash_es__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(69592); -/* harmony import */ var lodash_es__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(50053); -/* harmony import */ var lodash_es__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(74722); -/* harmony import */ var _graph_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(73046); - - - - - -function write(g) { - var json = { - options: { - directed: g.isDirected(), - multigraph: g.isMultigraph(), - compound: g.isCompound(), - }, - nodes: writeNodes(g), - edges: writeEdges(g), - }; - if (!lodash_es__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A(g.graph())) { - json.value = lodash_es__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A(g.graph()); - } - return json; -} - -function writeNodes(g) { - return lodash_es__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A(g.nodes(), function (v) { - var nodeValue = g.node(v); - var parent = g.parent(v); - var node = { v: v }; - if (!lodash_es__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A(nodeValue)) { - node.value = nodeValue; - } - if (!lodash_es__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A(parent)) { - node.parent = parent; - } - return node; - }); -} - -function writeEdges(g) { - return lodash_es__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A(g.edges(), function (e) { - var edgeValue = g.edge(e); - var edge = { v: e.v, w: e.w }; - if (!lodash_es__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A(e.name)) { - edge.name = e.name; - } - if (!lodash_es__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A(edgeValue)) { - edge.value = edgeValue; - } - return edge; - }); -} - -function read(json) { - var g = new Graph(json.options).setGraph(json.value); - _.each(json.nodes, function (entry) { - g.setNode(entry.v, entry.value); - if (entry.parent) { - g.setParent(entry.v, entry.parent); - } - }); - _.each(json.edges, function (entry) { - g.setEdge({ v: entry.v, w: entry.w, name: entry.name }, entry.value); - }); - return g; -} - - -/***/ }), - -/***/ 75937: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _utils_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(72453); -/* harmony import */ var _color_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(74886); -/* IMPORT */ - - -/* MAIN */ -const channel = (color, channel) => { - return _utils_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.lang.round(_color_index_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A.parse(color)[channel]); -}; -/* EXPORT */ -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (channel); - - -/***/ }), - -/***/ 62062: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ _SetCache) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_MapCache.js + 14 modules -var _MapCache = __webpack_require__(29471); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_setCacheAdd.js -/** Used to stand-in for `undefined` hash values. */ -var HASH_UNDEFINED = '__lodash_hash_undefined__'; - -/** - * Adds `value` to the array cache. - * - * @private - * @name add - * @memberOf SetCache - * @alias push - * @param {*} value The value to cache. - * @returns {Object} Returns the cache instance. - */ -function setCacheAdd(value) { - this.__data__.set(value, HASH_UNDEFINED); - return this; -} - -/* harmony default export */ const _setCacheAdd = (setCacheAdd); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_setCacheHas.js -/** - * Checks if `value` is in the array cache. - * - * @private - * @name has - * @memberOf SetCache - * @param {*} value The value to search for. - * @returns {number} Returns `true` if `value` is found, else `false`. - */ -function setCacheHas(value) { - return this.__data__.has(value); -} - -/* harmony default export */ const _setCacheHas = (setCacheHas); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_SetCache.js - - - - -/** - * - * Creates an array cache object to store unique values. - * - * @private - * @constructor - * @param {Array} [values] The values to cache. - */ -function SetCache(values) { - var index = -1, - length = values == null ? 0 : values.length; - - this.__data__ = new _MapCache/* default */.A; - while (++index < length) { - this.add(values[index]); - } -} - -// Add methods to `SetCache`. -SetCache.prototype.add = SetCache.prototype.push = _setCacheAdd; -SetCache.prototype.has = _setCacheHas; - -/* harmony default export */ const _SetCache = (SetCache); - - -/***/ }), - -/***/ 72641: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * A specialized version of `_.forEach` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns `array`. - */ -function arrayEach(array, iteratee) { - var index = -1, - length = array == null ? 0 : array.length; - - while (++index < length) { - if (iteratee(array[index], index, array) === false) { - break; - } - } - return array; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (arrayEach); - - -/***/ }), - -/***/ 2634: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * A specialized version of `_.filter` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {Array} Returns the new filtered array. - */ -function arrayFilter(array, predicate) { - var index = -1, - length = array == null ? 0 : array.length, - resIndex = 0, - result = []; - - while (++index < length) { - var value = array[index]; - if (predicate(value, index, array)) { - result[resIndex++] = value; - } - } - return result; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (arrayFilter); - - -/***/ }), - -/***/ 45572: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * A specialized version of `_.map` for arrays without support for iteratee - * shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the new mapped array. - */ -function arrayMap(array, iteratee) { - var index = -1, - length = array == null ? 0 : array.length, - result = Array(length); - - while (++index < length) { - result[index] = iteratee(array[index], index, array); - } - return result; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (arrayMap); - - -/***/ }), - -/***/ 76912: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * Appends the elements of `values` to `array`. - * - * @private - * @param {Array} array The array to modify. - * @param {Array} values The values to append. - * @returns {Array} Returns `array`. - */ -function arrayPush(array, values) { - var index = -1, - length = values.length, - offset = array.length; - - while (++index < length) { - array[offset + index] = values[index]; - } - return array; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (arrayPush); - - -/***/ }), - -/***/ 91641: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ _baseClone) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_Stack.js + 5 modules -var _Stack = __webpack_require__(11754); -// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayEach.js -var _arrayEach = __webpack_require__(72641); -// EXTERNAL MODULE: ./node_modules/lodash-es/_assignValue.js -var _assignValue = __webpack_require__(52851); -// EXTERNAL MODULE: ./node_modules/lodash-es/_copyObject.js -var _copyObject = __webpack_require__(22031); -// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js -var keys = __webpack_require__(27422); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseAssign.js - - - -/** - * The base implementation of `_.assign` without support for multiple sources - * or `customizer` functions. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @returns {Object} Returns `object`. - */ -function baseAssign(object, source) { - return object && (0,_copyObject/* default */.A)(source, (0,keys/* default */.A)(source), object); -} - -/* harmony default export */ const _baseAssign = (baseAssign); - -// EXTERNAL MODULE: ./node_modules/lodash-es/keysIn.js + 2 modules -var keysIn = __webpack_require__(55615); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseAssignIn.js - - - -/** - * The base implementation of `_.assignIn` without support for multiple sources - * or `customizer` functions. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @returns {Object} Returns `object`. - */ -function baseAssignIn(object, source) { - return object && (0,_copyObject/* default */.A)(source, (0,keysIn/* default */.A)(source), object); -} - -/* harmony default export */ const _baseAssignIn = (baseAssignIn); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_cloneBuffer.js -var _cloneBuffer = __webpack_require__(80154); -// EXTERNAL MODULE: ./node_modules/lodash-es/_copyArray.js -var _copyArray = __webpack_require__(39759); -// EXTERNAL MODULE: ./node_modules/lodash-es/_getSymbols.js -var _getSymbols = __webpack_require__(14792); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_copySymbols.js - - - -/** - * Copies own symbols of `source` to `object`. - * - * @private - * @param {Object} source The object to copy symbols from. - * @param {Object} [object={}] The object to copy symbols to. - * @returns {Object} Returns `object`. - */ -function copySymbols(source, object) { - return (0,_copyObject/* default */.A)(source, (0,_getSymbols/* default */.A)(source), object); -} - -/* harmony default export */ const _copySymbols = (copySymbols); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayPush.js -var _arrayPush = __webpack_require__(76912); -// EXTERNAL MODULE: ./node_modules/lodash-es/_getPrototype.js -var _getPrototype = __webpack_require__(15647); -// EXTERNAL MODULE: ./node_modules/lodash-es/stubArray.js -var stubArray = __webpack_require__(13153); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_getSymbolsIn.js - - - - - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeGetSymbols = Object.getOwnPropertySymbols; - -/** - * Creates an array of the own and inherited enumerable symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of symbols. - */ -var getSymbolsIn = !nativeGetSymbols ? stubArray/* default */.A : function(object) { - var result = []; - while (object) { - (0,_arrayPush/* default */.A)(result, (0,_getSymbols/* default */.A)(object)); - object = (0,_getPrototype/* default */.A)(object); - } - return result; -}; - -/* harmony default export */ const _getSymbolsIn = (getSymbolsIn); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_copySymbolsIn.js - - - -/** - * Copies own and inherited symbols of `source` to `object`. - * - * @private - * @param {Object} source The object to copy symbols from. - * @param {Object} [object={}] The object to copy symbols to. - * @returns {Object} Returns `object`. - */ -function copySymbolsIn(source, object) { - return (0,_copyObject/* default */.A)(source, _getSymbolsIn(source), object); -} - -/* harmony default export */ const _copySymbolsIn = (copySymbolsIn); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_getAllKeys.js -var _getAllKeys = __webpack_require__(19042); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGetAllKeys.js -var _baseGetAllKeys = __webpack_require__(33831); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_getAllKeysIn.js - - - - -/** - * Creates an array of own and inherited enumerable property names and - * symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names and symbols. - */ -function getAllKeysIn(object) { - return (0,_baseGetAllKeys/* default */.A)(object, keysIn/* default */.A, _getSymbolsIn); -} - -/* harmony default export */ const _getAllKeysIn = (getAllKeysIn); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_getTag.js + 3 modules -var _getTag = __webpack_require__(9779); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_initCloneArray.js -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var _initCloneArray_hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Initializes an array clone. - * - * @private - * @param {Array} array The array to clone. - * @returns {Array} Returns the initialized clone. - */ -function initCloneArray(array) { - var length = array.length, - result = new array.constructor(length); - - // Add properties assigned by `RegExp#exec`. - if (length && typeof array[0] == 'string' && _initCloneArray_hasOwnProperty.call(array, 'index')) { - result.index = array.index; - result.input = array.input; - } - return result; -} - -/* harmony default export */ const _initCloneArray = (initCloneArray); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_cloneArrayBuffer.js -var _cloneArrayBuffer = __webpack_require__(90565); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_cloneDataView.js - - -/** - * Creates a clone of `dataView`. - * - * @private - * @param {Object} dataView The data view to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the cloned data view. - */ -function cloneDataView(dataView, isDeep) { - var buffer = isDeep ? (0,_cloneArrayBuffer/* default */.A)(dataView.buffer) : dataView.buffer; - return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); -} - -/* harmony default export */ const _cloneDataView = (cloneDataView); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_cloneRegExp.js -/** Used to match `RegExp` flags from their coerced string values. */ -var reFlags = /\w*$/; - -/** - * Creates a clone of `regexp`. - * - * @private - * @param {Object} regexp The regexp to clone. - * @returns {Object} Returns the cloned regexp. - */ -function cloneRegExp(regexp) { - var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); - result.lastIndex = regexp.lastIndex; - return result; -} - -/* harmony default export */ const _cloneRegExp = (cloneRegExp); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_Symbol.js -var _Symbol = __webpack_require__(241); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_cloneSymbol.js - - -/** Used to convert symbols to primitives and strings. */ -var symbolProto = _Symbol/* default */.A ? _Symbol/* default */.A.prototype : undefined, - symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; - -/** - * Creates a clone of the `symbol` object. - * - * @private - * @param {Object} symbol The symbol object to clone. - * @returns {Object} Returns the cloned symbol object. - */ -function cloneSymbol(symbol) { - return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; -} - -/* harmony default export */ const _cloneSymbol = (cloneSymbol); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_cloneTypedArray.js -var _cloneTypedArray = __webpack_require__(1801); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_initCloneByTag.js - - - - - - -/** `Object#toString` result references. */ -var boolTag = '[object Boolean]', - dateTag = '[object Date]', - mapTag = '[object Map]', - numberTag = '[object Number]', - regexpTag = '[object RegExp]', - setTag = '[object Set]', - stringTag = '[object String]', - symbolTag = '[object Symbol]'; - -var arrayBufferTag = '[object ArrayBuffer]', - dataViewTag = '[object DataView]', - float32Tag = '[object Float32Array]', - float64Tag = '[object Float64Array]', - int8Tag = '[object Int8Array]', - int16Tag = '[object Int16Array]', - int32Tag = '[object Int32Array]', - uint8Tag = '[object Uint8Array]', - uint8ClampedTag = '[object Uint8ClampedArray]', - uint16Tag = '[object Uint16Array]', - uint32Tag = '[object Uint32Array]'; - -/** - * Initializes an object clone based on its `toStringTag`. - * - * **Note:** This function only supports cloning values with tags of - * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`. - * - * @private - * @param {Object} object The object to clone. - * @param {string} tag The `toStringTag` of the object to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the initialized clone. - */ -function initCloneByTag(object, tag, isDeep) { - var Ctor = object.constructor; - switch (tag) { - case arrayBufferTag: - return (0,_cloneArrayBuffer/* default */.A)(object); - - case boolTag: - case dateTag: - return new Ctor(+object); - - case dataViewTag: - return _cloneDataView(object, isDeep); - - case float32Tag: case float64Tag: - case int8Tag: case int16Tag: case int32Tag: - case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: - return (0,_cloneTypedArray/* default */.A)(object, isDeep); - - case mapTag: - return new Ctor; - - case numberTag: - case stringTag: - return new Ctor(object); - - case regexpTag: - return _cloneRegExp(object); - - case setTag: - return new Ctor; - - case symbolTag: - return _cloneSymbol(object); - } -} - -/* harmony default export */ const _initCloneByTag = (initCloneByTag); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_initCloneObject.js + 1 modules -var _initCloneObject = __webpack_require__(18598); -// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js -var isArray = __webpack_require__(92049); -// EXTERNAL MODULE: ./node_modules/lodash-es/isBuffer.js + 1 modules -var isBuffer = __webpack_require__(99912); -// EXTERNAL MODULE: ./node_modules/lodash-es/isObjectLike.js -var isObjectLike = __webpack_require__(53098); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsMap.js - - - -/** `Object#toString` result references. */ -var _baseIsMap_mapTag = '[object Map]'; - -/** - * The base implementation of `_.isMap` without Node.js optimizations. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a map, else `false`. - */ -function baseIsMap(value) { - return (0,isObjectLike/* default */.A)(value) && (0,_getTag/* default */.A)(value) == _baseIsMap_mapTag; -} - -/* harmony default export */ const _baseIsMap = (baseIsMap); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseUnary.js -var _baseUnary = __webpack_require__(52789); -// EXTERNAL MODULE: ./node_modules/lodash-es/_nodeUtil.js -var _nodeUtil = __webpack_require__(64841); -;// CONCATENATED MODULE: ./node_modules/lodash-es/isMap.js - - - - -/* Node.js helper references. */ -var nodeIsMap = _nodeUtil/* default */.A && _nodeUtil/* default */.A.isMap; - -/** - * Checks if `value` is classified as a `Map` object. - * - * @static - * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a map, else `false`. - * @example - * - * _.isMap(new Map); - * // => true - * - * _.isMap(new WeakMap); - * // => false - */ -var isMap = nodeIsMap ? (0,_baseUnary/* default */.A)(nodeIsMap) : _baseIsMap; - -/* harmony default export */ const lodash_es_isMap = (isMap); - -// EXTERNAL MODULE: ./node_modules/lodash-es/isObject.js -var isObject = __webpack_require__(23149); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsSet.js - - - -/** `Object#toString` result references. */ -var _baseIsSet_setTag = '[object Set]'; - -/** - * The base implementation of `_.isSet` without Node.js optimizations. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a set, else `false`. - */ -function baseIsSet(value) { - return (0,isObjectLike/* default */.A)(value) && (0,_getTag/* default */.A)(value) == _baseIsSet_setTag; -} - -/* harmony default export */ const _baseIsSet = (baseIsSet); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/isSet.js - - - - -/* Node.js helper references. */ -var nodeIsSet = _nodeUtil/* default */.A && _nodeUtil/* default */.A.isSet; - -/** - * Checks if `value` is classified as a `Set` object. - * - * @static - * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a set, else `false`. - * @example - * - * _.isSet(new Set); - * // => true - * - * _.isSet(new WeakSet); - * // => false - */ -var isSet = nodeIsSet ? (0,_baseUnary/* default */.A)(nodeIsSet) : _baseIsSet; - -/* harmony default export */ const lodash_es_isSet = (isSet); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseClone.js - - - - - - - - - - - - - - - - - - - - - - - -/** Used to compose bitmasks for cloning. */ -var CLONE_DEEP_FLAG = 1, - CLONE_FLAT_FLAG = 2, - CLONE_SYMBOLS_FLAG = 4; - -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - _baseClone_boolTag = '[object Boolean]', - _baseClone_dateTag = '[object Date]', - errorTag = '[object Error]', - funcTag = '[object Function]', - genTag = '[object GeneratorFunction]', - _baseClone_mapTag = '[object Map]', - _baseClone_numberTag = '[object Number]', - objectTag = '[object Object]', - _baseClone_regexpTag = '[object RegExp]', - _baseClone_setTag = '[object Set]', - _baseClone_stringTag = '[object String]', - _baseClone_symbolTag = '[object Symbol]', - weakMapTag = '[object WeakMap]'; - -var _baseClone_arrayBufferTag = '[object ArrayBuffer]', - _baseClone_dataViewTag = '[object DataView]', - _baseClone_float32Tag = '[object Float32Array]', - _baseClone_float64Tag = '[object Float64Array]', - _baseClone_int8Tag = '[object Int8Array]', - _baseClone_int16Tag = '[object Int16Array]', - _baseClone_int32Tag = '[object Int32Array]', - _baseClone_uint8Tag = '[object Uint8Array]', - _baseClone_uint8ClampedTag = '[object Uint8ClampedArray]', - _baseClone_uint16Tag = '[object Uint16Array]', - _baseClone_uint32Tag = '[object Uint32Array]'; - -/** Used to identify `toStringTag` values supported by `_.clone`. */ -var cloneableTags = {}; -cloneableTags[argsTag] = cloneableTags[arrayTag] = -cloneableTags[_baseClone_arrayBufferTag] = cloneableTags[_baseClone_dataViewTag] = -cloneableTags[_baseClone_boolTag] = cloneableTags[_baseClone_dateTag] = -cloneableTags[_baseClone_float32Tag] = cloneableTags[_baseClone_float64Tag] = -cloneableTags[_baseClone_int8Tag] = cloneableTags[_baseClone_int16Tag] = -cloneableTags[_baseClone_int32Tag] = cloneableTags[_baseClone_mapTag] = -cloneableTags[_baseClone_numberTag] = cloneableTags[objectTag] = -cloneableTags[_baseClone_regexpTag] = cloneableTags[_baseClone_setTag] = -cloneableTags[_baseClone_stringTag] = cloneableTags[_baseClone_symbolTag] = -cloneableTags[_baseClone_uint8Tag] = cloneableTags[_baseClone_uint8ClampedTag] = -cloneableTags[_baseClone_uint16Tag] = cloneableTags[_baseClone_uint32Tag] = true; -cloneableTags[errorTag] = cloneableTags[funcTag] = -cloneableTags[weakMapTag] = false; - -/** - * The base implementation of `_.clone` and `_.cloneDeep` which tracks - * traversed objects. - * - * @private - * @param {*} value The value to clone. - * @param {boolean} bitmask The bitmask flags. - * 1 - Deep clone - * 2 - Flatten inherited properties - * 4 - Clone symbols - * @param {Function} [customizer] The function to customize cloning. - * @param {string} [key] The key of `value`. - * @param {Object} [object] The parent object of `value`. - * @param {Object} [stack] Tracks traversed objects and their clone counterparts. - * @returns {*} Returns the cloned value. - */ -function baseClone(value, bitmask, customizer, key, object, stack) { - var result, - isDeep = bitmask & CLONE_DEEP_FLAG, - isFlat = bitmask & CLONE_FLAT_FLAG, - isFull = bitmask & CLONE_SYMBOLS_FLAG; - - if (customizer) { - result = object ? customizer(value, key, object, stack) : customizer(value); - } - if (result !== undefined) { - return result; - } - if (!(0,isObject/* default */.A)(value)) { - return value; - } - var isArr = (0,isArray/* default */.A)(value); - if (isArr) { - result = _initCloneArray(value); - if (!isDeep) { - return (0,_copyArray/* default */.A)(value, result); - } - } else { - var tag = (0,_getTag/* default */.A)(value), - isFunc = tag == funcTag || tag == genTag; - - if ((0,isBuffer/* default */.A)(value)) { - return (0,_cloneBuffer/* default */.A)(value, isDeep); - } - if (tag == objectTag || tag == argsTag || (isFunc && !object)) { - result = (isFlat || isFunc) ? {} : (0,_initCloneObject/* default */.A)(value); - if (!isDeep) { - return isFlat - ? _copySymbolsIn(value, _baseAssignIn(result, value)) - : _copySymbols(value, _baseAssign(result, value)); - } - } else { - if (!cloneableTags[tag]) { - return object ? value : {}; - } - result = _initCloneByTag(value, tag, isDeep); - } - } - // Check for circular references and return its corresponding clone. - stack || (stack = new _Stack/* default */.A); - var stacked = stack.get(value); - if (stacked) { - return stacked; - } - stack.set(value, result); - - if (lodash_es_isSet(value)) { - value.forEach(function(subValue) { - result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack)); - }); - } else if (lodash_es_isMap(value)) { - value.forEach(function(subValue, key) { - result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack)); - }); - } - - var keysFunc = isFull - ? (isFlat ? _getAllKeysIn : _getAllKeys/* default */.A) - : (isFlat ? keysIn/* default */.A : keys/* default */.A); - - var props = isArr ? undefined : keysFunc(value); - (0,_arrayEach/* default */.A)(props || value, function(subValue, key) { - if (props) { - key = subValue; - subValue = value[key]; - } - // Recursively populate clone (susceptible to call stack limits). - (0,_assignValue/* default */.A)(result, key, baseClone(subValue, bitmask, customizer, key, value, stack)); - }); - return result; -} - -/* harmony default export */ const _baseClone = (baseClone); - - -/***/ }), - -/***/ 6240: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ _baseEach) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseForOwn.js -var _baseForOwn = __webpack_require__(79841); -// EXTERNAL MODULE: ./node_modules/lodash-es/isArrayLike.js -var isArrayLike = __webpack_require__(38446); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_createBaseEach.js - - -/** - * Creates a `baseEach` or `baseEachRight` function. - * - * @private - * @param {Function} eachFunc The function to iterate over a collection. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new base function. - */ -function createBaseEach(eachFunc, fromRight) { - return function(collection, iteratee) { - if (collection == null) { - return collection; - } - if (!(0,isArrayLike/* default */.A)(collection)) { - return eachFunc(collection, iteratee); - } - var length = collection.length, - index = fromRight ? length : -1, - iterable = Object(collection); - - while ((fromRight ? index-- : ++index < length)) { - if (iteratee(iterable[index], index, iterable) === false) { - break; - } - } - return collection; - }; -} - -/* harmony default export */ const _createBaseEach = (createBaseEach); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseEach.js - - - -/** - * The base implementation of `_.forEach` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array|Object} Returns `collection`. - */ -var baseEach = _createBaseEach(_baseForOwn/* default */.A); - -/* harmony default export */ const _baseEach = (baseEach); - - -/***/ }), - -/***/ 25707: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * The base implementation of `_.findIndex` and `_.findLastIndex` without - * support for iteratee shorthands. - * - * @private - * @param {Array} array The array to inspect. - * @param {Function} predicate The function invoked per iteration. - * @param {number} fromIndex The index to search from. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function baseFindIndex(array, predicate, fromIndex, fromRight) { - var length = array.length, - index = fromIndex + (fromRight ? 1 : -1); - - while ((fromRight ? index-- : ++index < length)) { - if (predicate(array[index], index, array)) { - return index; - } - } - return -1; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseFindIndex); - - -/***/ }), - -/***/ 13588: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ _baseFlatten) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayPush.js -var _arrayPush = __webpack_require__(76912); -// EXTERNAL MODULE: ./node_modules/lodash-es/_Symbol.js -var _Symbol = __webpack_require__(241); -// EXTERNAL MODULE: ./node_modules/lodash-es/isArguments.js + 1 modules -var isArguments = __webpack_require__(52274); -// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js -var isArray = __webpack_require__(92049); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_isFlattenable.js - - - - -/** Built-in value references. */ -var spreadableSymbol = _Symbol/* default */.A ? _Symbol/* default */.A.isConcatSpreadable : undefined; - -/** - * Checks if `value` is a flattenable `arguments` object or array. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. - */ -function isFlattenable(value) { - return (0,isArray/* default */.A)(value) || (0,isArguments/* default */.A)(value) || - !!(spreadableSymbol && value && value[spreadableSymbol]); -} - -/* harmony default export */ const _isFlattenable = (isFlattenable); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseFlatten.js - - - -/** - * The base implementation of `_.flatten` with support for restricting flattening. - * - * @private - * @param {Array} array The array to flatten. - * @param {number} depth The maximum recursion depth. - * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. - * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. - * @param {Array} [result=[]] The initial result value. - * @returns {Array} Returns the new flattened array. - */ -function baseFlatten(array, depth, predicate, isStrict, result) { - var index = -1, - length = array.length; - - predicate || (predicate = _isFlattenable); - result || (result = []); - - while (++index < length) { - var value = array[index]; - if (depth > 0 && predicate(value)) { - if (depth > 1) { - // Recursively flatten arrays (susceptible to call stack limits). - baseFlatten(value, depth - 1, predicate, isStrict, result); - } else { - (0,_arrayPush/* default */.A)(result, value); - } - } else if (!isStrict) { - result[result.length] = value; - } - } - return result; -} - -/* harmony default export */ const _baseFlatten = (baseFlatten); - - -/***/ }), - -/***/ 79841: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _baseFor_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4574); -/* harmony import */ var _keys_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(27422); - - - -/** - * The base implementation of `_.forOwn` without support for iteratee shorthands. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Object} Returns `object`. - */ -function baseForOwn(object, iteratee) { - return object && (0,_baseFor_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(object, iteratee, _keys_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseForOwn); - - -/***/ }), - -/***/ 66318: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _castPath_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7819); -/* harmony import */ var _toKey_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(30901); - - - -/** - * The base implementation of `_.get` without support for default values. - * - * @private - * @param {Object} object The object to query. - * @param {Array|string} path The path of the property to get. - * @returns {*} Returns the resolved value. - */ -function baseGet(object, path) { - path = (0,_castPath_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(path, object); - - var index = 0, - length = path.length; - - while (object != null && index < length) { - object = object[(0,_toKey_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(path[index++])]; - } - return (index && index == length) ? object : undefined; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseGet); - - -/***/ }), - -/***/ 33831: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _arrayPush_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(76912); -/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(92049); - - - -/** - * The base implementation of `getAllKeys` and `getAllKeysIn` which uses - * `keysFunc` and `symbolsFunc` to get the enumerable property names and - * symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @param {Function} keysFunc The function to get the keys of `object`. - * @param {Function} symbolsFunc The function to get the symbols of `object`. - * @returns {Array} Returns the array of property names and symbols. - */ -function baseGetAllKeys(object, keysFunc, symbolsFunc) { - var result = keysFunc(object); - return (0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(object) ? result : (0,_arrayPush_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(result, symbolsFunc(object)); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseGetAllKeys); - - -/***/ }), - -/***/ 49574: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ _baseIteratee) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_Stack.js + 5 modules -var _Stack = __webpack_require__(11754); -// EXTERNAL MODULE: ./node_modules/lodash-es/_SetCache.js + 2 modules -var _SetCache = __webpack_require__(62062); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_arraySome.js -/** - * A specialized version of `_.some` for arrays without support for iteratee - * shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {boolean} Returns `true` if any element passes the predicate check, - * else `false`. - */ -function arraySome(array, predicate) { - var index = -1, - length = array == null ? 0 : array.length; - - while (++index < length) { - if (predicate(array[index], index, array)) { - return true; - } - } - return false; -} - -/* harmony default export */ const _arraySome = (arraySome); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_cacheHas.js -var _cacheHas = __webpack_require__(64099); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_equalArrays.js - - - - -/** Used to compose bitmasks for value comparisons. */ -var COMPARE_PARTIAL_FLAG = 1, - COMPARE_UNORDERED_FLAG = 2; - -/** - * A specialized version of `baseIsEqualDeep` for arrays with support for - * partial deep comparisons. - * - * @private - * @param {Array} array The array to compare. - * @param {Array} other The other array to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} stack Tracks traversed `array` and `other` objects. - * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. - */ -function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { - var isPartial = bitmask & COMPARE_PARTIAL_FLAG, - arrLength = array.length, - othLength = other.length; - - if (arrLength != othLength && !(isPartial && othLength > arrLength)) { - return false; - } - // Check that cyclic values are equal. - var arrStacked = stack.get(array); - var othStacked = stack.get(other); - if (arrStacked && othStacked) { - return arrStacked == other && othStacked == array; - } - var index = -1, - result = true, - seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new _SetCache/* default */.A : undefined; - - stack.set(array, other); - stack.set(other, array); - - // Ignore non-index properties. - while (++index < arrLength) { - var arrValue = array[index], - othValue = other[index]; - - if (customizer) { - var compared = isPartial - ? customizer(othValue, arrValue, index, other, array, stack) - : customizer(arrValue, othValue, index, array, other, stack); - } - if (compared !== undefined) { - if (compared) { - continue; - } - result = false; - break; - } - // Recursively compare arrays (susceptible to call stack limits). - if (seen) { - if (!_arraySome(other, function(othValue, othIndex) { - if (!(0,_cacheHas/* default */.A)(seen, othIndex) && - (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { - return seen.push(othIndex); - } - })) { - result = false; - break; - } - } else if (!( - arrValue === othValue || - equalFunc(arrValue, othValue, bitmask, customizer, stack) - )) { - result = false; - break; - } - } - stack['delete'](array); - stack['delete'](other); - return result; -} - -/* harmony default export */ const _equalArrays = (equalArrays); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_Symbol.js -var _Symbol = __webpack_require__(241); -// EXTERNAL MODULE: ./node_modules/lodash-es/_Uint8Array.js -var _Uint8Array = __webpack_require__(43988); -// EXTERNAL MODULE: ./node_modules/lodash-es/eq.js -var eq = __webpack_require__(66984); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_mapToArray.js -/** - * Converts `map` to its key-value pairs. - * - * @private - * @param {Object} map The map to convert. - * @returns {Array} Returns the key-value pairs. - */ -function mapToArray(map) { - var index = -1, - result = Array(map.size); - - map.forEach(function(value, key) { - result[++index] = [key, value]; - }); - return result; -} - -/* harmony default export */ const _mapToArray = (mapToArray); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_setToArray.js -var _setToArray = __webpack_require__(29959); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_equalByTag.js - - - - - - - -/** Used to compose bitmasks for value comparisons. */ -var _equalByTag_COMPARE_PARTIAL_FLAG = 1, - _equalByTag_COMPARE_UNORDERED_FLAG = 2; - -/** `Object#toString` result references. */ -var boolTag = '[object Boolean]', - dateTag = '[object Date]', - errorTag = '[object Error]', - mapTag = '[object Map]', - numberTag = '[object Number]', - regexpTag = '[object RegExp]', - setTag = '[object Set]', - stringTag = '[object String]', - symbolTag = '[object Symbol]'; - -var arrayBufferTag = '[object ArrayBuffer]', - dataViewTag = '[object DataView]'; - -/** Used to convert symbols to primitives and strings. */ -var symbolProto = _Symbol/* default */.A ? _Symbol/* default */.A.prototype : undefined, - symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; - -/** - * A specialized version of `baseIsEqualDeep` for comparing objects of - * the same `toStringTag`. - * - * **Note:** This function only supports comparing values with tags of - * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {string} tag The `toStringTag` of the objects to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} stack Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ -function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { - switch (tag) { - case dataViewTag: - if ((object.byteLength != other.byteLength) || - (object.byteOffset != other.byteOffset)) { - return false; - } - object = object.buffer; - other = other.buffer; - - case arrayBufferTag: - if ((object.byteLength != other.byteLength) || - !equalFunc(new _Uint8Array/* default */.A(object), new _Uint8Array/* default */.A(other))) { - return false; - } - return true; - - case boolTag: - case dateTag: - case numberTag: - // Coerce booleans to `1` or `0` and dates to milliseconds. - // Invalid dates are coerced to `NaN`. - return (0,eq/* default */.A)(+object, +other); - - case errorTag: - return object.name == other.name && object.message == other.message; - - case regexpTag: - case stringTag: - // Coerce regexes to strings and treat strings, primitives and objects, - // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring - // for more details. - return object == (other + ''); - - case mapTag: - var convert = _mapToArray; - - case setTag: - var isPartial = bitmask & _equalByTag_COMPARE_PARTIAL_FLAG; - convert || (convert = _setToArray/* default */.A); - - if (object.size != other.size && !isPartial) { - return false; - } - // Assume cyclic values are equal. - var stacked = stack.get(object); - if (stacked) { - return stacked == other; - } - bitmask |= _equalByTag_COMPARE_UNORDERED_FLAG; - - // Recursively compare objects (susceptible to call stack limits). - stack.set(object, other); - var result = _equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); - stack['delete'](object); - return result; - - case symbolTag: - if (symbolValueOf) { - return symbolValueOf.call(object) == symbolValueOf.call(other); - } - } - return false; -} - -/* harmony default export */ const _equalByTag = (equalByTag); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_getAllKeys.js -var _getAllKeys = __webpack_require__(19042); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_equalObjects.js - - -/** Used to compose bitmasks for value comparisons. */ -var _equalObjects_COMPARE_PARTIAL_FLAG = 1; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var _equalObjects_hasOwnProperty = objectProto.hasOwnProperty; - -/** - * A specialized version of `baseIsEqualDeep` for objects with support for - * partial deep comparisons. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} stack Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ -function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { - var isPartial = bitmask & _equalObjects_COMPARE_PARTIAL_FLAG, - objProps = (0,_getAllKeys/* default */.A)(object), - objLength = objProps.length, - othProps = (0,_getAllKeys/* default */.A)(other), - othLength = othProps.length; - - if (objLength != othLength && !isPartial) { - return false; - } - var index = objLength; - while (index--) { - var key = objProps[index]; - if (!(isPartial ? key in other : _equalObjects_hasOwnProperty.call(other, key))) { - return false; - } - } - // Check that cyclic values are equal. - var objStacked = stack.get(object); - var othStacked = stack.get(other); - if (objStacked && othStacked) { - return objStacked == other && othStacked == object; - } - var result = true; - stack.set(object, other); - stack.set(other, object); - - var skipCtor = isPartial; - while (++index < objLength) { - key = objProps[index]; - var objValue = object[key], - othValue = other[key]; - - if (customizer) { - var compared = isPartial - ? customizer(othValue, objValue, key, other, object, stack) - : customizer(objValue, othValue, key, object, other, stack); - } - // Recursively compare objects (susceptible to call stack limits). - if (!(compared === undefined - ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) - : compared - )) { - result = false; - break; - } - skipCtor || (skipCtor = key == 'constructor'); - } - if (result && !skipCtor) { - var objCtor = object.constructor, - othCtor = other.constructor; - - // Non `Object` object instances with different constructors are not equal. - if (objCtor != othCtor && - ('constructor' in object && 'constructor' in other) && - !(typeof objCtor == 'function' && objCtor instanceof objCtor && - typeof othCtor == 'function' && othCtor instanceof othCtor)) { - result = false; - } - } - stack['delete'](object); - stack['delete'](other); - return result; -} - -/* harmony default export */ const _equalObjects = (equalObjects); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_getTag.js + 3 modules -var _getTag = __webpack_require__(9779); -// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js -var isArray = __webpack_require__(92049); -// EXTERNAL MODULE: ./node_modules/lodash-es/isBuffer.js + 1 modules -var isBuffer = __webpack_require__(99912); -// EXTERNAL MODULE: ./node_modules/lodash-es/isTypedArray.js + 1 modules -var isTypedArray = __webpack_require__(33858); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsEqualDeep.js - - - - - - - - - -/** Used to compose bitmasks for value comparisons. */ -var _baseIsEqualDeep_COMPARE_PARTIAL_FLAG = 1; - -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - objectTag = '[object Object]'; - -/** Used for built-in method references. */ -var _baseIsEqualDeep_objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var _baseIsEqualDeep_hasOwnProperty = _baseIsEqualDeep_objectProto.hasOwnProperty; - -/** - * A specialized version of `baseIsEqual` for arrays and objects which performs - * deep comparisons and tracks traversed objects enabling objects with circular - * references to be compared. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} [stack] Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ -function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { - var objIsArr = (0,isArray/* default */.A)(object), - othIsArr = (0,isArray/* default */.A)(other), - objTag = objIsArr ? arrayTag : (0,_getTag/* default */.A)(object), - othTag = othIsArr ? arrayTag : (0,_getTag/* default */.A)(other); - - objTag = objTag == argsTag ? objectTag : objTag; - othTag = othTag == argsTag ? objectTag : othTag; - - var objIsObj = objTag == objectTag, - othIsObj = othTag == objectTag, - isSameTag = objTag == othTag; - - if (isSameTag && (0,isBuffer/* default */.A)(object)) { - if (!(0,isBuffer/* default */.A)(other)) { - return false; - } - objIsArr = true; - objIsObj = false; - } - if (isSameTag && !objIsObj) { - stack || (stack = new _Stack/* default */.A); - return (objIsArr || (0,isTypedArray/* default */.A)(object)) - ? _equalArrays(object, other, bitmask, customizer, equalFunc, stack) - : _equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); - } - if (!(bitmask & _baseIsEqualDeep_COMPARE_PARTIAL_FLAG)) { - var objIsWrapped = objIsObj && _baseIsEqualDeep_hasOwnProperty.call(object, '__wrapped__'), - othIsWrapped = othIsObj && _baseIsEqualDeep_hasOwnProperty.call(other, '__wrapped__'); - - if (objIsWrapped || othIsWrapped) { - var objUnwrapped = objIsWrapped ? object.value() : object, - othUnwrapped = othIsWrapped ? other.value() : other; - - stack || (stack = new _Stack/* default */.A); - return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); - } - } - if (!isSameTag) { - return false; - } - stack || (stack = new _Stack/* default */.A); - return _equalObjects(object, other, bitmask, customizer, equalFunc, stack); -} - -/* harmony default export */ const _baseIsEqualDeep = (baseIsEqualDeep); - -// EXTERNAL MODULE: ./node_modules/lodash-es/isObjectLike.js -var isObjectLike = __webpack_require__(53098); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsEqual.js - - - -/** - * The base implementation of `_.isEqual` which supports partial comparisons - * and tracks traversed objects. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @param {boolean} bitmask The bitmask flags. - * 1 - Unordered comparison - * 2 - Partial comparison - * @param {Function} [customizer] The function to customize comparisons. - * @param {Object} [stack] Tracks traversed `value` and `other` objects. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - */ -function baseIsEqual(value, other, bitmask, customizer, stack) { - if (value === other) { - return true; - } - if (value == null || other == null || (!(0,isObjectLike/* default */.A)(value) && !(0,isObjectLike/* default */.A)(other))) { - return value !== value && other !== other; - } - return _baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); -} - -/* harmony default export */ const _baseIsEqual = (baseIsEqual); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsMatch.js - - - -/** Used to compose bitmasks for value comparisons. */ -var _baseIsMatch_COMPARE_PARTIAL_FLAG = 1, - _baseIsMatch_COMPARE_UNORDERED_FLAG = 2; - -/** - * The base implementation of `_.isMatch` without support for iteratee shorthands. - * - * @private - * @param {Object} object The object to inspect. - * @param {Object} source The object of property values to match. - * @param {Array} matchData The property names, values, and compare flags to match. - * @param {Function} [customizer] The function to customize comparisons. - * @returns {boolean} Returns `true` if `object` is a match, else `false`. - */ -function baseIsMatch(object, source, matchData, customizer) { - var index = matchData.length, - length = index, - noCustomizer = !customizer; - - if (object == null) { - return !length; - } - object = Object(object); - while (index--) { - var data = matchData[index]; - if ((noCustomizer && data[2]) - ? data[1] !== object[data[0]] - : !(data[0] in object) - ) { - return false; - } - } - while (++index < length) { - data = matchData[index]; - var key = data[0], - objValue = object[key], - srcValue = data[1]; - - if (noCustomizer && data[2]) { - if (objValue === undefined && !(key in object)) { - return false; - } - } else { - var stack = new _Stack/* default */.A; - if (customizer) { - var result = customizer(objValue, srcValue, key, object, source, stack); - } - if (!(result === undefined - ? _baseIsEqual(srcValue, objValue, _baseIsMatch_COMPARE_PARTIAL_FLAG | _baseIsMatch_COMPARE_UNORDERED_FLAG, customizer, stack) - : result - )) { - return false; - } - } - } - return true; -} - -/* harmony default export */ const _baseIsMatch = (baseIsMatch); - -// EXTERNAL MODULE: ./node_modules/lodash-es/isObject.js -var isObject = __webpack_require__(23149); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_isStrictComparable.js - - -/** - * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` if suitable for strict - * equality comparisons, else `false`. - */ -function isStrictComparable(value) { - return value === value && !(0,isObject/* default */.A)(value); -} - -/* harmony default export */ const _isStrictComparable = (isStrictComparable); - -// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js -var keys = __webpack_require__(27422); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_getMatchData.js - - - -/** - * Gets the property names, values, and compare flags of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the match data of `object`. - */ -function getMatchData(object) { - var result = (0,keys/* default */.A)(object), - length = result.length; - - while (length--) { - var key = result[length], - value = object[key]; - - result[length] = [key, value, _isStrictComparable(value)]; - } - return result; -} - -/* harmony default export */ const _getMatchData = (getMatchData); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_matchesStrictComparable.js -/** - * A specialized version of `matchesProperty` for source values suitable - * for strict equality comparisons, i.e. `===`. - * - * @private - * @param {string} key The key of the property to get. - * @param {*} srcValue The value to match. - * @returns {Function} Returns the new spec function. - */ -function matchesStrictComparable(key, srcValue) { - return function(object) { - if (object == null) { - return false; - } - return object[key] === srcValue && - (srcValue !== undefined || (key in Object(object))); - }; -} - -/* harmony default export */ const _matchesStrictComparable = (matchesStrictComparable); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseMatches.js - - - - -/** - * The base implementation of `_.matches` which doesn't clone `source`. - * - * @private - * @param {Object} source The object of property values to match. - * @returns {Function} Returns the new spec function. - */ -function baseMatches(source) { - var matchData = _getMatchData(source); - if (matchData.length == 1 && matchData[0][2]) { - return _matchesStrictComparable(matchData[0][0], matchData[0][1]); - } - return function(object) { - return object === source || _baseIsMatch(object, source, matchData); - }; -} - -/* harmony default export */ const _baseMatches = (baseMatches); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGet.js -var _baseGet = __webpack_require__(66318); -;// CONCATENATED MODULE: ./node_modules/lodash-es/get.js - - -/** - * Gets the value at `path` of `object`. If the resolved value is - * `undefined`, the `defaultValue` is returned in its place. - * - * @static - * @memberOf _ - * @since 3.7.0 - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path of the property to get. - * @param {*} [defaultValue] The value returned for `undefined` resolved values. - * @returns {*} Returns the resolved value. - * @example - * - * var object = { 'a': [{ 'b': { 'c': 3 } }] }; - * - * _.get(object, 'a[0].b.c'); - * // => 3 - * - * _.get(object, ['a', '0', 'b', 'c']); - * // => 3 - * - * _.get(object, 'a.b.c', 'default'); - * // => 'default' - */ -function get(object, path, defaultValue) { - var result = object == null ? undefined : (0,_baseGet/* default */.A)(object, path); - return result === undefined ? defaultValue : result; -} - -/* harmony default export */ const lodash_es_get = (get); - -// EXTERNAL MODULE: ./node_modules/lodash-es/hasIn.js + 1 modules -var hasIn = __webpack_require__(39188); -// EXTERNAL MODULE: ./node_modules/lodash-es/_isKey.js -var _isKey = __webpack_require__(86586); -// EXTERNAL MODULE: ./node_modules/lodash-es/_toKey.js -var _toKey = __webpack_require__(30901); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseMatchesProperty.js - - - - - - - - -/** Used to compose bitmasks for value comparisons. */ -var _baseMatchesProperty_COMPARE_PARTIAL_FLAG = 1, - _baseMatchesProperty_COMPARE_UNORDERED_FLAG = 2; - -/** - * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. - * - * @private - * @param {string} path The path of the property to get. - * @param {*} srcValue The value to match. - * @returns {Function} Returns the new spec function. - */ -function baseMatchesProperty(path, srcValue) { - if ((0,_isKey/* default */.A)(path) && _isStrictComparable(srcValue)) { - return _matchesStrictComparable((0,_toKey/* default */.A)(path), srcValue); - } - return function(object) { - var objValue = lodash_es_get(object, path); - return (objValue === undefined && objValue === srcValue) - ? (0,hasIn/* default */.A)(object, path) - : _baseIsEqual(srcValue, objValue, _baseMatchesProperty_COMPARE_PARTIAL_FLAG | _baseMatchesProperty_COMPARE_UNORDERED_FLAG); - }; -} - -/* harmony default export */ const _baseMatchesProperty = (baseMatchesProperty); - -// EXTERNAL MODULE: ./node_modules/lodash-es/identity.js -var identity = __webpack_require__(29008); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseProperty.js -var _baseProperty = __webpack_require__(70805); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_basePropertyDeep.js - - -/** - * A specialized version of `baseProperty` which supports deep paths. - * - * @private - * @param {Array|string} path The path of the property to get. - * @returns {Function} Returns the new accessor function. - */ -function basePropertyDeep(path) { - return function(object) { - return (0,_baseGet/* default */.A)(object, path); - }; -} - -/* harmony default export */ const _basePropertyDeep = (basePropertyDeep); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/property.js - - - - - -/** - * Creates a function that returns the value at `path` of a given object. - * - * @static - * @memberOf _ - * @since 2.4.0 - * @category Util - * @param {Array|string} path The path of the property to get. - * @returns {Function} Returns the new accessor function. - * @example - * - * var objects = [ - * { 'a': { 'b': 2 } }, - * { 'a': { 'b': 1 } } - * ]; - * - * _.map(objects, _.property('a.b')); - * // => [2, 1] - * - * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b'); - * // => [1, 2] - */ -function property(path) { - return (0,_isKey/* default */.A)(path) ? (0,_baseProperty/* default */.A)((0,_toKey/* default */.A)(path)) : _basePropertyDeep(path); -} - -/* harmony default export */ const lodash_es_property = (property); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIteratee.js - - - - - - -/** - * The base implementation of `_.iteratee`. - * - * @private - * @param {*} [value=_.identity] The value to convert to an iteratee. - * @returns {Function} Returns the iteratee. - */ -function baseIteratee(value) { - // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. - // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. - if (typeof value == 'function') { - return value; - } - if (value == null) { - return identity/* default */.A; - } - if (typeof value == 'object') { - return (0,isArray/* default */.A)(value) - ? _baseMatchesProperty(value[0], value[1]) - : _baseMatches(value); - } - return lodash_es_property(value); -} - -/* harmony default export */ const _baseIteratee = (baseIteratee); - - -/***/ }), - -/***/ 52568: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _baseEach_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6240); -/* harmony import */ var _isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(38446); - - - -/** - * The base implementation of `_.map` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the new mapped array. - */ -function baseMap(collection, iteratee) { - var index = -1, - result = (0,_isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(collection) ? Array(collection.length) : []; - - (0,_baseEach_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(collection, function(value, key, collection) { - result[++index] = iteratee(value, key, collection); - }); - return result; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseMap); - - -/***/ }), - -/***/ 70805: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * The base implementation of `_.property` without support for deep paths. - * - * @private - * @param {string} key The key of the property to get. - * @returns {Function} Returns the new accessor function. - */ -function baseProperty(key) { - return function(object) { - return object == null ? undefined : object[key]; - }; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseProperty); - - -/***/ }), - -/***/ 64099: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * Checks if a `cache` value for `key` exists. - * - * @private - * @param {Object} cache The cache to query. - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ -function cacheHas(cache, key) { - return cache.has(key); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (cacheHas); - - -/***/ }), - -/***/ 99922: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(29008); - - -/** - * Casts `value` to `identity` if it's not a function. - * - * @private - * @param {*} value The value to inspect. - * @returns {Function} Returns cast function. - */ -function castFunction(value) { - return typeof value == 'function' ? value : _identity_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (castFunction); - - -/***/ }), - -/***/ 7819: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ _castPath) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js -var isArray = __webpack_require__(92049); -// EXTERNAL MODULE: ./node_modules/lodash-es/_isKey.js -var _isKey = __webpack_require__(86586); -// EXTERNAL MODULE: ./node_modules/lodash-es/memoize.js -var memoize = __webpack_require__(46632); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_memoizeCapped.js - - -/** Used as the maximum memoize cache size. */ -var MAX_MEMOIZE_SIZE = 500; - -/** - * A specialized version of `_.memoize` which clears the memoized function's - * cache when it exceeds `MAX_MEMOIZE_SIZE`. - * - * @private - * @param {Function} func The function to have its output memoized. - * @returns {Function} Returns the new memoized function. - */ -function memoizeCapped(func) { - var result = (0,memoize/* default */.A)(func, function(key) { - if (cache.size === MAX_MEMOIZE_SIZE) { - cache.clear(); - } - return key; - }); - - var cache = result.cache; - return result; -} - -/* harmony default export */ const _memoizeCapped = (memoizeCapped); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_stringToPath.js - - -/** Used to match property names within property paths. */ -var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; - -/** Used to match backslashes in property paths. */ -var reEscapeChar = /\\(\\)?/g; - -/** - * Converts `string` to a property path array. - * - * @private - * @param {string} string The string to convert. - * @returns {Array} Returns the property path array. - */ -var stringToPath = _memoizeCapped(function(string) { - var result = []; - if (string.charCodeAt(0) === 46 /* . */) { - result.push(''); - } - string.replace(rePropName, function(match, number, quote, subString) { - result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match)); - }); - return result; -}); - -/* harmony default export */ const _stringToPath = (stringToPath); - -// EXTERNAL MODULE: ./node_modules/lodash-es/toString.js + 1 modules -var lodash_es_toString = __webpack_require__(28894); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_castPath.js - - - - - -/** - * Casts `value` to a path array if it's not one. - * - * @private - * @param {*} value The value to inspect. - * @param {Object} [object] The object to query keys on. - * @returns {Array} Returns the cast property path array. - */ -function castPath(value, object) { - if ((0,isArray/* default */.A)(value)) { - return value; - } - return (0,_isKey/* default */.A)(value, object) ? [value] : _stringToPath((0,lodash_es_toString/* default */.A)(value)); -} - -/* harmony default export */ const _castPath = (castPath); - - -/***/ }), - -/***/ 19042: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _baseGetAllKeys_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(33831); -/* harmony import */ var _getSymbols_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(14792); -/* harmony import */ var _keys_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(27422); - - - - -/** - * Creates an array of own enumerable property names and symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names and symbols. - */ -function getAllKeys(object) { - return (0,_baseGetAllKeys_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(object, _keys_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A, _getSymbols_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (getAllKeys); - - -/***/ }), - -/***/ 14792: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _arrayFilter_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2634); -/* harmony import */ var _stubArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13153); - - - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Built-in value references. */ -var propertyIsEnumerable = objectProto.propertyIsEnumerable; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeGetSymbols = Object.getOwnPropertySymbols; - -/** - * Creates an array of the own enumerable symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of symbols. - */ -var getSymbols = !nativeGetSymbols ? _stubArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A : function(object) { - if (object == null) { - return []; - } - object = Object(object); - return (0,_arrayFilter_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(nativeGetSymbols(object), function(symbol) { - return propertyIsEnumerable.call(object, symbol); - }); -}; - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (getSymbols); - - -/***/ }), - -/***/ 85054: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _castPath_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7819); -/* harmony import */ var _isArguments_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(52274); -/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(92049); -/* harmony import */ var _isIndex_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(25353); -/* harmony import */ var _isLength_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5254); -/* harmony import */ var _toKey_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(30901); - - - - - - - -/** - * Checks if `path` exists on `object`. - * - * @private - * @param {Object} object The object to query. - * @param {Array|string} path The path to check. - * @param {Function} hasFunc The function to check properties. - * @returns {boolean} Returns `true` if `path` exists, else `false`. - */ -function hasPath(object, path, hasFunc) { - path = (0,_castPath_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(path, object); - - var index = -1, - length = path.length, - result = false; - - while (++index < length) { - var key = (0,_toKey_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(path[index]); - if (!(result = object != null && hasFunc(object, key))) { - break; - } - object = object[key]; - } - if (result || ++index != length) { - return result; - } - length = object == null ? 0 : object.length; - return !!length && (0,_isLength_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)(length) && (0,_isIndex_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(key, length) && - ((0,_isArray_js__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .A)(object) || (0,_isArguments_js__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A)(object)); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (hasPath); - - -/***/ }), - -/***/ 86586: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(92049); -/* harmony import */ var _isSymbol_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(61882); - - - -/** Used to match property names within property paths. */ -var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, - reIsPlainProp = /^\w*$/; - -/** - * Checks if `value` is a property name and not a property path. - * - * @private - * @param {*} value The value to check. - * @param {Object} [object] The object to query keys on. - * @returns {boolean} Returns `true` if `value` is a property name, else `false`. - */ -function isKey(value, object) { - if ((0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(value)) { - return false; - } - var type = typeof value; - if (type == 'number' || type == 'symbol' || type == 'boolean' || - value == null || (0,_isSymbol_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(value)) { - return true; - } - return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || - (object != null && value in Object(object)); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isKey); - - -/***/ }), - -/***/ 29959: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * Converts `set` to an array of its values. - * - * @private - * @param {Object} set The set to convert. - * @returns {Array} Returns the values. - */ -function setToArray(set) { - var index = -1, - result = Array(set.size); - - set.forEach(function(value) { - result[++index] = value; - }); - return result; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (setToArray); - - -/***/ }), - -/***/ 30901: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _isSymbol_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(61882); - - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0; - -/** - * Converts `value` to a string key if it's not a string or symbol. - * - * @private - * @param {*} value The value to inspect. - * @returns {string|symbol} Returns the key. - */ -function toKey(value) { - if (typeof value == 'string' || (0,_isSymbol_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(value)) { - return value; - } - var result = (value + ''); - return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (toKey); - - -/***/ }), - -/***/ 50053: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _baseClone_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(91641); - - -/** Used to compose bitmasks for cloning. */ -var CLONE_SYMBOLS_FLAG = 4; - -/** - * Creates a shallow clone of `value`. - * - * **Note:** This method is loosely based on the - * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm) - * and supports cloning arrays, array buffers, booleans, date objects, maps, - * numbers, `Object` objects, regexes, sets, strings, symbols, and typed - * arrays. The own enumerable properties of `arguments` objects are cloned - * as plain objects. An empty object is returned for uncloneable values such - * as error objects, functions, DOM nodes, and WeakMaps. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to clone. - * @returns {*} Returns the cloned value. - * @see _.cloneDeep - * @example - * - * var objects = [{ 'a': 1 }, { 'b': 2 }]; - * - * var shallow = _.clone(objects); - * console.log(shallow[0] === objects[0]); - * // => true - */ -function clone(value) { - return (0,_baseClone_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(value, CLONE_SYMBOLS_FLAG); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (clone); - - -/***/ }), - -/***/ 23068: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _baseRest_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(24326); -/* harmony import */ var _eq_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(66984); -/* harmony import */ var _isIterateeCall_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6832); -/* harmony import */ var _keysIn_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(55615); - - - - - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Assigns own and inherited enumerable string keyed properties of source - * objects to the destination object for all destination properties that - * resolve to `undefined`. Source objects are applied from left to right. - * Once a property is set, additional values of the same property are ignored. - * - * **Note:** This method mutates `object`. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. - * @see _.defaultsDeep - * @example - * - * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); - * // => { 'a': 1, 'b': 2 } - */ -var defaults = (0,_baseRest_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(function(object, sources) { - object = Object(object); - - var index = -1; - var length = sources.length; - var guard = length > 2 ? sources[2] : undefined; - - if (guard && (0,_isIterateeCall_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(sources[0], sources[1], guard)) { - length = 1; - } - - while (++index < length) { - var source = sources[index]; - var props = (0,_keysIn_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)(source); - var propsIndex = -1; - var propsLength = props.length; - - while (++propsIndex < propsLength) { - var key = props[propsIndex]; - var value = object[key]; - - if (value === undefined || - ((0,_eq_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(value, objectProto[key]) && !hasOwnProperty.call(object, key))) { - object[key] = source[key]; - } - } - } - - return object; -}); - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (defaults); - - -/***/ }), - -/***/ 11662: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ lodash_es_filter) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayFilter.js -var _arrayFilter = __webpack_require__(2634); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseEach.js + 1 modules -var _baseEach = __webpack_require__(6240); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseFilter.js - - -/** - * The base implementation of `_.filter` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {Array} Returns the new filtered array. - */ -function baseFilter(collection, predicate) { - var result = []; - (0,_baseEach/* default */.A)(collection, function(value, index, collection) { - if (predicate(value, index, collection)) { - result.push(value); - } - }); - return result; -} - -/* harmony default export */ const _baseFilter = (baseFilter); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseIteratee.js + 16 modules -var _baseIteratee = __webpack_require__(49574); -// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js -var isArray = __webpack_require__(92049); -;// CONCATENATED MODULE: ./node_modules/lodash-es/filter.js - - - - - -/** - * Iterates over elements of `collection`, returning an array of all elements - * `predicate` returns truthy for. The predicate is invoked with three - * arguments: (value, index|key, collection). - * - * **Note:** Unlike `_.remove`, this method returns a new array. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @returns {Array} Returns the new filtered array. - * @see _.reject - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': true }, - * { 'user': 'fred', 'age': 40, 'active': false } - * ]; - * - * _.filter(users, function(o) { return !o.active; }); - * // => objects for ['fred'] - * - * // The `_.matches` iteratee shorthand. - * _.filter(users, { 'age': 36, 'active': true }); - * // => objects for ['barney'] - * - * // The `_.matchesProperty` iteratee shorthand. - * _.filter(users, ['active', false]); - * // => objects for ['fred'] - * - * // The `_.property` iteratee shorthand. - * _.filter(users, 'active'); - * // => objects for ['barney'] - * - * // Combining several predicates using `_.overEvery` or `_.overSome`. - * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]])); - * // => objects for ['fred', 'barney'] - */ -function filter(collection, predicate) { - var func = (0,isArray/* default */.A)(collection) ? _arrayFilter/* default */.A : _baseFilter; - return func(collection, (0,_baseIteratee/* default */.A)(predicate, 3)); -} - -/* harmony default export */ const lodash_es_filter = (filter); - - -/***/ }), - -/***/ 34098: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _baseFlatten_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13588); - - -/** - * Flattens `array` a single level deep. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to flatten. - * @returns {Array} Returns the new flattened array. - * @example - * - * _.flatten([1, [2, [3, [4]], 5]]); - * // => [1, 2, [3, [4]], 5] - */ -function flatten(array) { - var length = array == null ? 0 : array.length; - return length ? (0,_baseFlatten_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(array, 1) : []; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (flatten); - - -/***/ }), - -/***/ 8058: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _arrayEach_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(72641); -/* harmony import */ var _baseEach_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6240); -/* harmony import */ var _castFunction_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(99922); -/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(92049); - - - - - -/** - * Iterates over elements of `collection` and invokes `iteratee` for each element. - * The iteratee is invoked with three arguments: (value, index|key, collection). - * Iteratee functions may exit iteration early by explicitly returning `false`. - * - * **Note:** As with other "Collections" methods, objects with a "length" - * property are iterated like arrays. To avoid this behavior use `_.forIn` - * or `_.forOwn` for object iteration. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @alias each - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Array|Object} Returns `collection`. - * @see _.forEachRight - * @example - * - * _.forEach([1, 2], function(value) { - * console.log(value); - * }); - * // => Logs `1` then `2`. - * - * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { - * console.log(key); - * }); - * // => Logs 'a' then 'b' (iteration order is not guaranteed). - */ -function forEach(collection, iteratee) { - var func = (0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(collection) ? _arrayEach_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A : _baseEach_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A; - return func(collection, (0,_castFunction_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(iteratee)); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (forEach); - - -/***/ }), - -/***/ 48585: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ lodash_es_has) -}); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseHas.js -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var _baseHas_hasOwnProperty = objectProto.hasOwnProperty; - -/** - * The base implementation of `_.has` without support for deep paths. - * - * @private - * @param {Object} [object] The object to query. - * @param {Array|string} key The key to check. - * @returns {boolean} Returns `true` if `key` exists, else `false`. - */ -function baseHas(object, key) { - return object != null && _baseHas_hasOwnProperty.call(object, key); -} - -/* harmony default export */ const _baseHas = (baseHas); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_hasPath.js -var _hasPath = __webpack_require__(85054); -;// CONCATENATED MODULE: ./node_modules/lodash-es/has.js - - - -/** - * Checks if `path` is a direct property of `object`. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path to check. - * @returns {boolean} Returns `true` if `path` exists, else `false`. - * @example - * - * var object = { 'a': { 'b': 2 } }; - * var other = _.create({ 'a': _.create({ 'b': 2 }) }); - * - * _.has(object, 'a'); - * // => true - * - * _.has(object, 'a.b'); - * // => true - * - * _.has(object, ['a', 'b']); - * // => true - * - * _.has(other, 'a'); - * // => false - */ -function has(object, path) { - return object != null && (0,_hasPath/* default */.A)(object, path, _baseHas); -} - -/* harmony default export */ const lodash_es_has = (has); - - -/***/ }), - -/***/ 39188: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ lodash_es_hasIn) -}); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseHasIn.js -/** - * The base implementation of `_.hasIn` without support for deep paths. - * - * @private - * @param {Object} [object] The object to query. - * @param {Array|string} key The key to check. - * @returns {boolean} Returns `true` if `key` exists, else `false`. - */ -function baseHasIn(object, key) { - return object != null && key in Object(object); -} - -/* harmony default export */ const _baseHasIn = (baseHasIn); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_hasPath.js -var _hasPath = __webpack_require__(85054); -;// CONCATENATED MODULE: ./node_modules/lodash-es/hasIn.js - - - -/** - * Checks if `path` is a direct or inherited property of `object`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path to check. - * @returns {boolean} Returns `true` if `path` exists, else `false`. - * @example - * - * var object = _.create({ 'a': _.create({ 'b': 2 }) }); - * - * _.hasIn(object, 'a'); - * // => true - * - * _.hasIn(object, 'a.b'); - * // => true - * - * _.hasIn(object, ['a', 'b']); - * // => true - * - * _.hasIn(object, 'b'); - * // => false - */ -function hasIn(object, path) { - return object != null && (0,_hasPath/* default */.A)(object, path, _baseHasIn); -} - -/* harmony default export */ const lodash_es_hasIn = (hasIn); - - -/***/ }), - -/***/ 61882: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _baseGetTag_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(88496); -/* harmony import */ var _isObjectLike_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(53098); - - - -/** `Object#toString` result references. */ -var symbolTag = '[object Symbol]'; - -/** - * Checks if `value` is classified as a `Symbol` primitive or object. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. - * @example - * - * _.isSymbol(Symbol.iterator); - * // => true - * - * _.isSymbol('abc'); - * // => false - */ -function isSymbol(value) { - return typeof value == 'symbol' || - ((0,_isObjectLike_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(value) && (0,_baseGetTag_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(value) == symbolTag); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isSymbol); - - -/***/ }), - -/***/ 69592: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * Checks if `value` is `undefined`. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. - * @example - * - * _.isUndefined(void 0); - * // => true - * - * _.isUndefined(null); - * // => false - */ -function isUndefined(value) { - return value === undefined; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isUndefined); - - -/***/ }), - -/***/ 27422: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _arrayLikeKeys_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(83607); -/* harmony import */ var _baseKeys_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(69471); -/* harmony import */ var _isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(38446); - - - - -/** - * Creates an array of the own enumerable property names of `object`. - * - * **Note:** Non-object values are coerced to objects. See the - * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) - * for more details. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.keys(new Foo); - * // => ['a', 'b'] (iteration order is not guaranteed) - * - * _.keys('hi'); - * // => ['0', '1'] - */ -function keys(object) { - return (0,_isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(object) ? (0,_arrayLikeKeys_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(object) : (0,_baseKeys_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)(object); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (keys); - - -/***/ }), - -/***/ 74722: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _arrayMap_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(45572); -/* harmony import */ var _baseIteratee_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(49574); -/* harmony import */ var _baseMap_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(52568); -/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(92049); - - - - - -/** - * Creates an array of values by running each element in `collection` thru - * `iteratee`. The iteratee is invoked with three arguments: - * (value, index|key, collection). - * - * Many lodash methods are guarded to work as iteratees for methods like - * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. - * - * The guarded methods are: - * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, - * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`, - * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`, - * `template`, `trim`, `trimEnd`, `trimStart`, and `words` - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Array} Returns the new mapped array. - * @example - * - * function square(n) { - * return n * n; - * } - * - * _.map([4, 8], square); - * // => [16, 64] - * - * _.map({ 'a': 4, 'b': 8 }, square); - * // => [16, 64] (iteration order is not guaranteed) - * - * var users = [ - * { 'user': 'barney' }, - * { 'user': 'fred' } - * ]; - * - * // The `_.property` iteratee shorthand. - * _.map(users, 'user'); - * // => ['barney', 'fred'] - */ -function map(collection, iteratee) { - var func = (0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(collection) ? _arrayMap_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A : _baseMap_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A; - return func(collection, (0,_baseIteratee_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(iteratee, 3)); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (map); - - -/***/ }), - -/***/ 81942: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ lodash_es_pick) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGet.js -var _baseGet = __webpack_require__(66318); -// EXTERNAL MODULE: ./node_modules/lodash-es/_assignValue.js -var _assignValue = __webpack_require__(52851); -// EXTERNAL MODULE: ./node_modules/lodash-es/_castPath.js + 2 modules -var _castPath = __webpack_require__(7819); -// EXTERNAL MODULE: ./node_modules/lodash-es/_isIndex.js -var _isIndex = __webpack_require__(25353); -// EXTERNAL MODULE: ./node_modules/lodash-es/isObject.js -var isObject = __webpack_require__(23149); -// EXTERNAL MODULE: ./node_modules/lodash-es/_toKey.js -var _toKey = __webpack_require__(30901); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseSet.js - - - - - - -/** - * The base implementation of `_.set`. - * - * @private - * @param {Object} object The object to modify. - * @param {Array|string} path The path of the property to set. - * @param {*} value The value to set. - * @param {Function} [customizer] The function to customize path creation. - * @returns {Object} Returns `object`. - */ -function baseSet(object, path, value, customizer) { - if (!(0,isObject/* default */.A)(object)) { - return object; - } - path = (0,_castPath/* default */.A)(path, object); - - var index = -1, - length = path.length, - lastIndex = length - 1, - nested = object; - - while (nested != null && ++index < length) { - var key = (0,_toKey/* default */.A)(path[index]), - newValue = value; - - if (key === '__proto__' || key === 'constructor' || key === 'prototype') { - return object; - } - - if (index != lastIndex) { - var objValue = nested[key]; - newValue = customizer ? customizer(objValue, key, nested) : undefined; - if (newValue === undefined) { - newValue = (0,isObject/* default */.A)(objValue) - ? objValue - : ((0,_isIndex/* default */.A)(path[index + 1]) ? [] : {}); - } - } - (0,_assignValue/* default */.A)(nested, key, newValue); - nested = nested[key]; - } - return object; -} - -/* harmony default export */ const _baseSet = (baseSet); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_basePickBy.js - - - - -/** - * The base implementation of `_.pickBy` without support for iteratee shorthands. - * - * @private - * @param {Object} object The source object. - * @param {string[]} paths The property paths to pick. - * @param {Function} predicate The function invoked per property. - * @returns {Object} Returns the new object. - */ -function basePickBy(object, paths, predicate) { - var index = -1, - length = paths.length, - result = {}; - - while (++index < length) { - var path = paths[index], - value = (0,_baseGet/* default */.A)(object, path); - - if (predicate(value, path)) { - _baseSet(result, (0,_castPath/* default */.A)(path, object), value); - } - } - return result; -} - -/* harmony default export */ const _basePickBy = (basePickBy); - -// EXTERNAL MODULE: ./node_modules/lodash-es/hasIn.js + 1 modules -var hasIn = __webpack_require__(39188); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_basePick.js - - - -/** - * The base implementation of `_.pick` without support for individual - * property identifiers. - * - * @private - * @param {Object} object The source object. - * @param {string[]} paths The property paths to pick. - * @returns {Object} Returns the new object. - */ -function basePick(object, paths) { - return _basePickBy(object, paths, function(value, path) { - return (0,hasIn/* default */.A)(object, path); - }); -} - -/* harmony default export */ const _basePick = (basePick); - -// EXTERNAL MODULE: ./node_modules/lodash-es/flatten.js -var flatten = __webpack_require__(34098); -// EXTERNAL MODULE: ./node_modules/lodash-es/_overRest.js + 1 modules -var _overRest = __webpack_require__(76875); -// EXTERNAL MODULE: ./node_modules/lodash-es/_setToString.js + 2 modules -var _setToString = __webpack_require__(67525); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_flatRest.js - - - - -/** - * A specialized version of `baseRest` which flattens the rest array. - * - * @private - * @param {Function} func The function to apply a rest parameter to. - * @returns {Function} Returns the new function. - */ -function flatRest(func) { - return (0,_setToString/* default */.A)((0,_overRest/* default */.A)(func, undefined, flatten/* default */.A), func + ''); -} - -/* harmony default export */ const _flatRest = (flatRest); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/pick.js - - - -/** - * Creates an object composed of the picked `object` properties. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The source object. - * @param {...(string|string[])} [paths] The property paths to pick. - * @returns {Object} Returns the new object. - * @example - * - * var object = { 'a': 1, 'b': '2', 'c': 3 }; - * - * _.pick(object, ['a', 'c']); - * // => { 'a': 1, 'c': 3 } - */ -var pick = _flatRest(function(object, paths) { - return object == null ? {} : _basePick(object, paths); -}); - -/* harmony default export */ const lodash_es_pick = (pick); - - -/***/ }), - -/***/ 91395: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ lodash_es_range) -}); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseRange.js -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeCeil = Math.ceil, - nativeMax = Math.max; - -/** - * The base implementation of `_.range` and `_.rangeRight` which doesn't - * coerce arguments. - * - * @private - * @param {number} start The start of the range. - * @param {number} end The end of the range. - * @param {number} step The value to increment or decrement by. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Array} Returns the range of numbers. - */ -function baseRange(start, end, step, fromRight) { - var index = -1, - length = nativeMax(nativeCeil((end - start) / (step || 1)), 0), - result = Array(length); - - while (length--) { - result[fromRight ? length : ++index] = start; - start += step; - } - return result; -} - -/* harmony default export */ const _baseRange = (baseRange); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_isIterateeCall.js -var _isIterateeCall = __webpack_require__(6832); -// EXTERNAL MODULE: ./node_modules/lodash-es/toFinite.js + 3 modules -var toFinite = __webpack_require__(74342); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_createRange.js - - - - -/** - * Creates a `_.range` or `_.rangeRight` function. - * - * @private - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new range function. - */ -function createRange(fromRight) { - return function(start, end, step) { - if (step && typeof step != 'number' && (0,_isIterateeCall/* default */.A)(start, end, step)) { - end = step = undefined; - } - // Ensure the sign of `-0` is preserved. - start = (0,toFinite/* default */.A)(start); - if (end === undefined) { - end = start; - start = 0; - } else { - end = (0,toFinite/* default */.A)(end); - } - step = step === undefined ? (start < end ? 1 : -1) : (0,toFinite/* default */.A)(step); - return _baseRange(start, end, step, fromRight); - }; -} - -/* harmony default export */ const _createRange = (createRange); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/range.js - - -/** - * Creates an array of numbers (positive and/or negative) progressing from - * `start` up to, but not including, `end`. A step of `-1` is used if a negative - * `start` is specified without an `end` or `step`. If `end` is not specified, - * it's set to `start` with `start` then set to `0`. - * - * **Note:** JavaScript follows the IEEE-754 standard for resolving - * floating-point values which can produce unexpected results. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Util - * @param {number} [start=0] The start of the range. - * @param {number} end The end of the range. - * @param {number} [step=1] The value to increment or decrement by. - * @returns {Array} Returns the range of numbers. - * @see _.inRange, _.rangeRight - * @example - * - * _.range(4); - * // => [0, 1, 2, 3] - * - * _.range(-4); - * // => [0, -1, -2, -3] - * - * _.range(1, 5); - * // => [1, 2, 3, 4] - * - * _.range(0, 20, 5); - * // => [0, 5, 10, 15] - * - * _.range(0, -4, -1); - * // => [0, -1, -2, -3] - * - * _.range(1, 4, 0); - * // => [1, 1, 1] - * - * _.range(0); - * // => [] - */ -var range = _createRange(); - -/* harmony default export */ const lodash_es_range = (range); - - -/***/ }), - -/***/ 89463: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ lodash_es_reduce) -}); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_arrayReduce.js -/** - * A specialized version of `_.reduce` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {*} [accumulator] The initial value. - * @param {boolean} [initAccum] Specify using the first element of `array` as - * the initial value. - * @returns {*} Returns the accumulated value. - */ -function arrayReduce(array, iteratee, accumulator, initAccum) { - var index = -1, - length = array == null ? 0 : array.length; - - if (initAccum && length) { - accumulator = array[++index]; - } - while (++index < length) { - accumulator = iteratee(accumulator, array[index], index, array); - } - return accumulator; -} - -/* harmony default export */ const _arrayReduce = (arrayReduce); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseEach.js + 1 modules -var _baseEach = __webpack_require__(6240); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseIteratee.js + 16 modules -var _baseIteratee = __webpack_require__(49574); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseReduce.js -/** - * The base implementation of `_.reduce` and `_.reduceRight`, without support - * for iteratee shorthands, which iterates over `collection` using `eachFunc`. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {*} accumulator The initial value. - * @param {boolean} initAccum Specify using the first or last element of - * `collection` as the initial value. - * @param {Function} eachFunc The function to iterate over `collection`. - * @returns {*} Returns the accumulated value. - */ -function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { - eachFunc(collection, function(value, index, collection) { - accumulator = initAccum - ? (initAccum = false, value) - : iteratee(accumulator, value, index, collection); - }); - return accumulator; -} - -/* harmony default export */ const _baseReduce = (baseReduce); - -// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js -var isArray = __webpack_require__(92049); -;// CONCATENATED MODULE: ./node_modules/lodash-es/reduce.js - - - - - - -/** - * Reduces `collection` to a value which is the accumulated result of running - * each element in `collection` thru `iteratee`, where each successive - * invocation is supplied the return value of the previous. If `accumulator` - * is not given, the first element of `collection` is used as the initial - * value. The iteratee is invoked with four arguments: - * (accumulator, value, index|key, collection). - * - * Many lodash methods are guarded to work as iteratees for methods like - * `_.reduce`, `_.reduceRight`, and `_.transform`. - * - * The guarded methods are: - * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`, - * and `sortBy` - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @param {*} [accumulator] The initial value. - * @returns {*} Returns the accumulated value. - * @see _.reduceRight - * @example - * - * _.reduce([1, 2], function(sum, n) { - * return sum + n; - * }, 0); - * // => 3 - * - * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { - * (result[value] || (result[value] = [])).push(key); - * return result; - * }, {}); - * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed) - */ -function reduce(collection, iteratee, accumulator) { - var func = (0,isArray/* default */.A)(collection) ? _arrayReduce : _baseReduce, - initAccum = arguments.length < 3; - - return func(collection, (0,_baseIteratee/* default */.A)(iteratee, 4), accumulator, initAccum, _baseEach/* default */.A); -} - -/* harmony default export */ const lodash_es_reduce = (reduce); - - -/***/ }), - -/***/ 13153: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * This method returns a new empty array. - * - * @static - * @memberOf _ - * @since 4.13.0 - * @category Util - * @returns {Array} Returns the new empty array. - * @example - * - * var arrays = _.times(2, _.stubArray); - * - * console.log(arrays); - * // => [[], []] - * - * console.log(arrays[0] === arrays[1]); - * // => false - */ -function stubArray() { - return []; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (stubArray); - - -/***/ }), - -/***/ 74342: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ lodash_es_toFinite) -}); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_trimmedEndIndex.js -/** Used to match a single whitespace character. */ -var reWhitespace = /\s/; - -/** - * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace - * character of `string`. - * - * @private - * @param {string} string The string to inspect. - * @returns {number} Returns the index of the last non-whitespace character. - */ -function trimmedEndIndex(string) { - var index = string.length; - - while (index-- && reWhitespace.test(string.charAt(index))) {} - return index; -} - -/* harmony default export */ const _trimmedEndIndex = (trimmedEndIndex); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseTrim.js - - -/** Used to match leading whitespace. */ -var reTrimStart = /^\s+/; - -/** - * The base implementation of `_.trim`. - * - * @private - * @param {string} string The string to trim. - * @returns {string} Returns the trimmed string. - */ -function baseTrim(string) { - return string - ? string.slice(0, _trimmedEndIndex(string) + 1).replace(reTrimStart, '') - : string; -} - -/* harmony default export */ const _baseTrim = (baseTrim); - -// EXTERNAL MODULE: ./node_modules/lodash-es/isObject.js -var isObject = __webpack_require__(23149); -// EXTERNAL MODULE: ./node_modules/lodash-es/isSymbol.js -var isSymbol = __webpack_require__(61882); -;// CONCATENATED MODULE: ./node_modules/lodash-es/toNumber.js - - - - -/** Used as references for various `Number` constants. */ -var NAN = 0 / 0; - -/** Used to detect bad signed hexadecimal string values. */ -var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; - -/** Used to detect binary string values. */ -var reIsBinary = /^0b[01]+$/i; - -/** Used to detect octal string values. */ -var reIsOctal = /^0o[0-7]+$/i; - -/** Built-in method references without a dependency on `root`. */ -var freeParseInt = parseInt; - -/** - * Converts `value` to a number. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to process. - * @returns {number} Returns the number. - * @example - * - * _.toNumber(3.2); - * // => 3.2 - * - * _.toNumber(Number.MIN_VALUE); - * // => 5e-324 - * - * _.toNumber(Infinity); - * // => Infinity - * - * _.toNumber('3.2'); - * // => 3.2 - */ -function toNumber(value) { - if (typeof value == 'number') { - return value; - } - if ((0,isSymbol/* default */.A)(value)) { - return NAN; - } - if ((0,isObject/* default */.A)(value)) { - var other = typeof value.valueOf == 'function' ? value.valueOf() : value; - value = (0,isObject/* default */.A)(other) ? (other + '') : other; - } - if (typeof value != 'string') { - return value === 0 ? value : +value; - } - value = _baseTrim(value); - var isBinary = reIsBinary.test(value); - return (isBinary || reIsOctal.test(value)) - ? freeParseInt(value.slice(2), isBinary ? 2 : 8) - : (reIsBadHex.test(value) ? NAN : +value); -} - -/* harmony default export */ const lodash_es_toNumber = (toNumber); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/toFinite.js - - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0, - MAX_INTEGER = 1.7976931348623157e+308; - -/** - * Converts `value` to a finite number. - * - * @static - * @memberOf _ - * @since 4.12.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {number} Returns the converted number. - * @example - * - * _.toFinite(3.2); - * // => 3.2 - * - * _.toFinite(Number.MIN_VALUE); - * // => 5e-324 - * - * _.toFinite(Infinity); - * // => 1.7976931348623157e+308 - * - * _.toFinite('3.2'); - * // => 3.2 - */ -function toFinite(value) { - if (!value) { - return value === 0 ? value : 0; - } - value = lodash_es_toNumber(value); - if (value === INFINITY || value === -INFINITY) { - var sign = (value < 0 ? -1 : 1); - return sign * MAX_INTEGER; - } - return value === value ? value : 0; -} - -/* harmony default export */ const lodash_es_toFinite = (toFinite); - - -/***/ }), - -/***/ 28894: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ lodash_es_toString) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_Symbol.js -var _Symbol = __webpack_require__(241); -// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayMap.js -var _arrayMap = __webpack_require__(45572); -// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js -var isArray = __webpack_require__(92049); -// EXTERNAL MODULE: ./node_modules/lodash-es/isSymbol.js -var isSymbol = __webpack_require__(61882); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseToString.js - - - - - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0; - -/** Used to convert symbols to primitives and strings. */ -var symbolProto = _Symbol/* default */.A ? _Symbol/* default */.A.prototype : undefined, - symbolToString = symbolProto ? symbolProto.toString : undefined; - -/** - * The base implementation of `_.toString` which doesn't convert nullish - * values to empty strings. - * - * @private - * @param {*} value The value to process. - * @returns {string} Returns the string. - */ -function baseToString(value) { - // Exit early for strings to avoid a performance hit in some environments. - if (typeof value == 'string') { - return value; - } - if ((0,isArray/* default */.A)(value)) { - // Recursively convert values (susceptible to call stack limits). - return (0,_arrayMap/* default */.A)(value, baseToString) + ''; - } - if ((0,isSymbol/* default */.A)(value)) { - return symbolToString ? symbolToString.call(value) : ''; - } - var result = (value + ''); - return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; -} - -/* harmony default export */ const _baseToString = (baseToString); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/toString.js - - -/** - * Converts `value` to a string. An empty string is returned for `null` - * and `undefined` values. The sign of `-0` is preserved. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {string} Returns the converted string. - * @example - * - * _.toString(null); - * // => '' - * - * _.toString(-0); - * // => '-0' - * - * _.toString([1, 2, 3]); - * // => '1,2,3' - */ -function toString_toString(value) { - return value == null ? '' : _baseToString(value); -} - -/* harmony default export */ const lodash_es_toString = (toString_toString); - - -/***/ }), - -/***/ 5664: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _toString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(28894); - - -/** Used to generate unique IDs. */ -var idCounter = 0; - -/** - * Generates a unique ID. If `prefix` is given, the ID is appended to it. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Util - * @param {string} [prefix=''] The value to prefix the ID with. - * @returns {string} Returns the unique ID. - * @example - * - * _.uniqueId('contact_'); - * // => 'contact_104' - * - * _.uniqueId(); - * // => '105' - */ -function uniqueId(prefix) { - var id = ++idCounter; - return (0,_toString_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(prefix) + id; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (uniqueId); - - -/***/ }), - -/***/ 38207: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ lodash_es_values) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayMap.js -var _arrayMap = __webpack_require__(45572); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseValues.js - - -/** - * The base implementation of `_.values` and `_.valuesIn` which creates an - * array of `object` property values corresponding to the property names - * of `props`. - * - * @private - * @param {Object} object The object to query. - * @param {Array} props The property names to get values for. - * @returns {Object} Returns the array of property values. - */ -function baseValues(object, props) { - return (0,_arrayMap/* default */.A)(props, function(key) { - return object[key]; - }); -} - -/* harmony default export */ const _baseValues = (baseValues); - -// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js -var keys = __webpack_require__(27422); -;// CONCATENATED MODULE: ./node_modules/lodash-es/values.js - - - -/** - * Creates an array of the own enumerable string keyed property values of `object`. - * - * **Note:** Non-object values are coerced to objects. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property values. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.values(new Foo); - * // => [1, 2] (iteration order is not guaranteed) - * - * _.values('hi'); - * // => ['h', 'i'] - */ -function values(object) { - return object == null ? [] : _baseValues(object, (0,keys/* default */.A)(object)); -} - -/* harmony default export */ const lodash_es_values = (values); - - -/***/ }), - -/***/ 73743: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - a: () => (/* binding */ createText), - c: () => (/* binding */ computeDimensionOfText) -}); - -// NAMESPACE OBJECT: ./node_modules/mermaid/node_modules/micromark/lib/constructs.js -var constructs_namespaceObject = {}; -__webpack_require__.r(constructs_namespaceObject); -__webpack_require__.d(constructs_namespaceObject, { - attentionMarkers: () => (attentionMarkers), - contentInitial: () => (contentInitial), - disable: () => (disable), - document: () => (constructs_document), - flow: () => (constructs_flow), - flowInitial: () => (flowInitial), - insideSpan: () => (insideSpan), - string: () => (constructs_string), - text: () => (constructs_text) -}); - -// EXTERNAL MODULE: ./node_modules/mermaid/dist/mermaid-b5860b54.js + 8 modules -var mermaid_b5860b54 = __webpack_require__(86079); -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/mdast-util-to-string/lib/index.js -/** - * @typedef {import('mdast').Root|import('mdast').Content} Node - * - * @typedef Options - * Configuration (optional). - * @property {boolean | null | undefined} [includeImageAlt=true] - * Whether to use `alt` for `image`s. - * @property {boolean | null | undefined} [includeHtml=true] - * Whether to use `value` of HTML. - */ - -/** @type {Options} */ -const emptyOptions = {} - -/** - * Get the text content of a node or list of nodes. - * - * Prefers the node’s plain-text fields, otherwise serializes its children, - * and if the given value is an array, serialize the nodes in it. - * - * @param {unknown} value - * Thing to serialize, typically `Node`. - * @param {Options | null | undefined} [options] - * Configuration (optional). - * @returns {string} - * Serialized `value`. - */ -function lib_toString(value, options) { - const settings = options || emptyOptions - const includeImageAlt = - typeof settings.includeImageAlt === 'boolean' - ? settings.includeImageAlt - : true - const includeHtml = - typeof settings.includeHtml === 'boolean' ? settings.includeHtml : true - - return one(value, includeImageAlt, includeHtml) -} - -/** - * One node or several nodes. - * - * @param {unknown} value - * Thing to serialize. - * @param {boolean} includeImageAlt - * Include image `alt`s. - * @param {boolean} includeHtml - * Include HTML. - * @returns {string} - * Serialized node. - */ -function one(value, includeImageAlt, includeHtml) { - if (node(value)) { - if ('value' in value) { - return value.type === 'html' && !includeHtml ? '' : value.value - } - - if (includeImageAlt && 'alt' in value && value.alt) { - return value.alt - } - - if ('children' in value) { - return lib_all(value.children, includeImageAlt, includeHtml) - } - } - - if (Array.isArray(value)) { - return lib_all(value, includeImageAlt, includeHtml) - } - - return '' -} - -/** - * Serialize a list of nodes. - * - * @param {Array} values - * Thing to serialize. - * @param {boolean} includeImageAlt - * Include image `alt`s. - * @param {boolean} includeHtml - * Include HTML. - * @returns {string} - * Serialized nodes. - */ -function lib_all(values, includeImageAlt, includeHtml) { - /** @type {Array} */ - const result = [] - let index = -1 - - while (++index < values.length) { - result[index] = one(values[index], includeImageAlt, includeHtml) - } - - return result.join('') -} - -/** - * Check if `value` looks like a node. - * - * @param {unknown} value - * Thing. - * @returns {value is Node} - * Whether `value` is a node. - */ -function node(value) { - return Boolean(value && typeof value === 'object') -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-chunked/index.js -/** - * Like `Array#splice`, but smarter for giant arrays. - * - * `Array#splice` takes all items to be inserted as individual argument which - * causes a stack overflow in V8 when trying to insert 100k items for instance. - * - * Otherwise, this does not return the removed items, and takes `items` as an - * array instead of rest parameters. - * - * @template {unknown} T - * Item type. - * @param {Array} list - * List to operate on. - * @param {number} start - * Index to remove/insert at (can be negative). - * @param {number} remove - * Number of items to remove. - * @param {Array} items - * Items to inject into `list`. - * @returns {void} - * Nothing. - */ -function splice(list, start, remove, items) { - const end = list.length - let chunkStart = 0 - /** @type {Array} */ - let parameters - - // Make start between zero and `end` (included). - if (start < 0) { - start = -start > end ? 0 : end + start - } else { - start = start > end ? end : start - } - remove = remove > 0 ? remove : 0 - - // No need to chunk the items if there’s only a couple (10k) items. - if (items.length < 10000) { - parameters = Array.from(items) - parameters.unshift(start, remove) - // @ts-expect-error Hush, it’s fine. - list.splice(...parameters) - } else { - // Delete `remove` items starting from `start` - if (remove) list.splice(start, remove) - - // Insert the items in chunks to not cause stack overflows. - while (chunkStart < items.length) { - parameters = items.slice(chunkStart, chunkStart + 10000) - parameters.unshift(start, 0) - // @ts-expect-error Hush, it’s fine. - list.splice(...parameters) - chunkStart += 10000 - start += 10000 - } - } -} - -/** - * Append `items` (an array) at the end of `list` (another array). - * When `list` was empty, returns `items` instead. - * - * This prevents a potentially expensive operation when `list` is empty, - * and adds items in batches to prevent V8 from hanging. - * - * @template {unknown} T - * Item type. - * @param {Array} list - * List to operate on. - * @param {Array} items - * Items to add to `list`. - * @returns {Array} - * Either `list` or `items`. - */ -function push(list, items) { - if (list.length > 0) { - splice(list, list.length, 0, items) - return list - } - return items -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-combine-extensions/index.js -/** - * @typedef {import('micromark-util-types').Extension} Extension - * @typedef {import('micromark-util-types').Handles} Handles - * @typedef {import('micromark-util-types').HtmlExtension} HtmlExtension - * @typedef {import('micromark-util-types').NormalizedExtension} NormalizedExtension - */ - - - -const micromark_util_combine_extensions_hasOwnProperty = {}.hasOwnProperty - -/** - * Combine multiple syntax extensions into one. - * - * @param {Array} extensions - * List of syntax extensions. - * @returns {NormalizedExtension} - * A single combined extension. - */ -function combineExtensions(extensions) { - /** @type {NormalizedExtension} */ - const all = {} - let index = -1 - - while (++index < extensions.length) { - syntaxExtension(all, extensions[index]) - } - - return all -} - -/** - * Merge `extension` into `all`. - * - * @param {NormalizedExtension} all - * Extension to merge into. - * @param {Extension} extension - * Extension to merge. - * @returns {void} - */ -function syntaxExtension(all, extension) { - /** @type {keyof Extension} */ - let hook - - for (hook in extension) { - const maybe = micromark_util_combine_extensions_hasOwnProperty.call(all, hook) ? all[hook] : undefined - /** @type {Record} */ - const left = maybe || (all[hook] = {}) - /** @type {Record | undefined} */ - const right = extension[hook] - /** @type {string} */ - let code - - if (right) { - for (code in right) { - if (!micromark_util_combine_extensions_hasOwnProperty.call(left, code)) left[code] = [] - const value = right[code] - constructs( - // @ts-expect-error Looks like a list. - left[code], - Array.isArray(value) ? value : value ? [value] : [] - ) - } - } - } -} - -/** - * Merge `list` into `existing` (both lists of constructs). - * Mutates `existing`. - * - * @param {Array} existing - * @param {Array} list - * @returns {void} - */ -function constructs(existing, list) { - let index = -1 - /** @type {Array} */ - const before = [] - - while (++index < list.length) { - // @ts-expect-error Looks like an object. - ;(list[index].add === 'after' ? existing : before).push(list[index]) - } - - splice(existing, 0, 0, before) -} - -/** - * Combine multiple HTML extensions into one. - * - * @param {Array} htmlExtensions - * List of HTML extensions. - * @returns {HtmlExtension} - * A single combined HTML extension. - */ -function combineHtmlExtensions(htmlExtensions) { - /** @type {HtmlExtension} */ - const handlers = {} - let index = -1 - - while (++index < htmlExtensions.length) { - htmlExtension(handlers, htmlExtensions[index]) - } - - return handlers -} - -/** - * Merge `extension` into `all`. - * - * @param {HtmlExtension} all - * Extension to merge into. - * @param {HtmlExtension} extension - * Extension to merge. - * @returns {void} - */ -function htmlExtension(all, extension) { - /** @type {keyof HtmlExtension} */ - let hook - - for (hook in extension) { - const maybe = micromark_util_combine_extensions_hasOwnProperty.call(all, hook) ? all[hook] : undefined - const left = maybe || (all[hook] = {}) - const right = extension[hook] - /** @type {keyof Handles} */ - let type - - if (right) { - for (type in right) { - // @ts-expect-error assume document vs regular handler are managed correctly. - left[type] = right[type] - } - } - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-character/lib/unicode-punctuation-regex.js -// This module is generated by `script/`. -// -// CommonMark handles attention (emphasis, strong) markers based on what comes -// before or after them. -// One such difference is if those characters are Unicode punctuation. -// This script is generated from the Unicode data. - -/** - * Regular expression that matches a unicode punctuation character. - */ -const unicodePunctuationRegex = - /[!-\/:-@\[-`\{-~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/ - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-character/index.js -/** - * @typedef {import('micromark-util-types').Code} Code - */ - - - -/** - * Check whether the character code represents an ASCII alpha (`a` through `z`, - * case insensitive). - * - * An **ASCII alpha** is an ASCII upper alpha or ASCII lower alpha. - * - * An **ASCII upper alpha** is a character in the inclusive range U+0041 (`A`) - * to U+005A (`Z`). - * - * An **ASCII lower alpha** is a character in the inclusive range U+0061 (`a`) - * to U+007A (`z`). - * - * @param code - * Code. - * @returns - * Whether it matches. - */ -const asciiAlpha = regexCheck(/[A-Za-z]/) - -/** - * Check whether the character code represents an ASCII alphanumeric (`a` - * through `z`, case insensitive, or `0` through `9`). - * - * An **ASCII alphanumeric** is an ASCII digit (see `asciiDigit`) or ASCII alpha - * (see `asciiAlpha`). - * - * @param code - * Code. - * @returns - * Whether it matches. - */ -const asciiAlphanumeric = regexCheck(/[\dA-Za-z]/) - -/** - * Check whether the character code represents an ASCII atext. - * - * atext is an ASCII alphanumeric (see `asciiAlphanumeric`), or a character in - * the inclusive ranges U+0023 NUMBER SIGN (`#`) to U+0027 APOSTROPHE (`'`), - * U+002A ASTERISK (`*`), U+002B PLUS SIGN (`+`), U+002D DASH (`-`), U+002F - * SLASH (`/`), U+003D EQUALS TO (`=`), U+003F QUESTION MARK (`?`), U+005E - * CARET (`^`) to U+0060 GRAVE ACCENT (`` ` ``), or U+007B LEFT CURLY BRACE - * (`{`) to U+007E TILDE (`~`). - * - * See: - * **\[RFC5322]**: - * [Internet Message Format](https://tools.ietf.org/html/rfc5322). - * P. Resnick. - * IETF. - * - * @param code - * Code. - * @returns - * Whether it matches. - */ -const asciiAtext = regexCheck(/[#-'*+\--9=?A-Z^-~]/) - -/** - * Check whether a character code is an ASCII control character. - * - * An **ASCII control** is a character in the inclusive range U+0000 NULL (NUL) - * to U+001F (US), or U+007F (DEL). - * - * @param {Code} code - * Code. - * @returns {boolean} - * Whether it matches. - */ -function asciiControl(code) { - return ( - // Special whitespace codes (which have negative values), C0 and Control - // character DEL - code !== null && (code < 32 || code === 127) - ) -} - -/** - * Check whether the character code represents an ASCII digit (`0` through `9`). - * - * An **ASCII digit** is a character in the inclusive range U+0030 (`0`) to - * U+0039 (`9`). - * - * @param code - * Code. - * @returns - * Whether it matches. - */ -const asciiDigit = regexCheck(/\d/) - -/** - * Check whether the character code represents an ASCII hex digit (`a` through - * `f`, case insensitive, or `0` through `9`). - * - * An **ASCII hex digit** is an ASCII digit (see `asciiDigit`), ASCII upper hex - * digit, or an ASCII lower hex digit. - * - * An **ASCII upper hex digit** is a character in the inclusive range U+0041 - * (`A`) to U+0046 (`F`). - * - * An **ASCII lower hex digit** is a character in the inclusive range U+0061 - * (`a`) to U+0066 (`f`). - * - * @param code - * Code. - * @returns - * Whether it matches. - */ -const asciiHexDigit = regexCheck(/[\dA-Fa-f]/) - -/** - * Check whether the character code represents ASCII punctuation. - * - * An **ASCII punctuation** is a character in the inclusive ranges U+0021 - * EXCLAMATION MARK (`!`) to U+002F SLASH (`/`), U+003A COLON (`:`) to U+0040 AT - * SIGN (`@`), U+005B LEFT SQUARE BRACKET (`[`) to U+0060 GRAVE ACCENT - * (`` ` ``), or U+007B LEFT CURLY BRACE (`{`) to U+007E TILDE (`~`). - * - * @param code - * Code. - * @returns - * Whether it matches. - */ -const asciiPunctuation = regexCheck(/[!-/:-@[-`{-~]/) - -/** - * Check whether a character code is a markdown line ending. - * - * A **markdown line ending** is the virtual characters M-0003 CARRIAGE RETURN - * LINE FEED (CRLF), M-0004 LINE FEED (LF) and M-0005 CARRIAGE RETURN (CR). - * - * In micromark, the actual character U+000A LINE FEED (LF) and U+000D CARRIAGE - * RETURN (CR) are replaced by these virtual characters depending on whether - * they occurred together. - * - * @param {Code} code - * Code. - * @returns {boolean} - * Whether it matches. - */ -function markdownLineEnding(code) { - return code !== null && code < -2 -} - -/** - * Check whether a character code is a markdown line ending (see - * `markdownLineEnding`) or markdown space (see `markdownSpace`). - * - * @param {Code} code - * Code. - * @returns {boolean} - * Whether it matches. - */ -function markdownLineEndingOrSpace(code) { - return code !== null && (code < 0 || code === 32) -} - -/** - * Check whether a character code is a markdown space. - * - * A **markdown space** is the concrete character U+0020 SPACE (SP) and the - * virtual characters M-0001 VIRTUAL SPACE (VS) and M-0002 HORIZONTAL TAB (HT). - * - * In micromark, the actual character U+0009 CHARACTER TABULATION (HT) is - * replaced by one M-0002 HORIZONTAL TAB (HT) and between 0 and 3 M-0001 VIRTUAL - * SPACE (VS) characters, depending on the column at which the tab occurred. - * - * @param {Code} code - * Code. - * @returns {boolean} - * Whether it matches. - */ -function markdownSpace(code) { - return code === -2 || code === -1 || code === 32 -} - -// Size note: removing ASCII from the regex and using `asciiPunctuation` here -// In fact adds to the bundle size. -/** - * Check whether the character code represents Unicode punctuation. - * - * A **Unicode punctuation** is a character in the Unicode `Pc` (Punctuation, - * Connector), `Pd` (Punctuation, Dash), `Pe` (Punctuation, Close), `Pf` - * (Punctuation, Final quote), `Pi` (Punctuation, Initial quote), `Po` - * (Punctuation, Other), or `Ps` (Punctuation, Open) categories, or an ASCII - * punctuation (see `asciiPunctuation`). - * - * See: - * **\[UNICODE]**: - * [The Unicode Standard](https://www.unicode.org/versions/). - * Unicode Consortium. - * - * @param code - * Code. - * @returns - * Whether it matches. - */ -const unicodePunctuation = regexCheck(unicodePunctuationRegex) - -/** - * Check whether the character code represents Unicode whitespace. - * - * Note that this does handle micromark specific markdown whitespace characters. - * See `markdownLineEndingOrSpace` to check that. - * - * A **Unicode whitespace** is a character in the Unicode `Zs` (Separator, - * Space) category, or U+0009 CHARACTER TABULATION (HT), U+000A LINE FEED (LF), - * U+000C (FF), or U+000D CARRIAGE RETURN (CR) (**\[UNICODE]**). - * - * See: - * **\[UNICODE]**: - * [The Unicode Standard](https://www.unicode.org/versions/). - * Unicode Consortium. - * - * @param code - * Code. - * @returns - * Whether it matches. - */ -const unicodeWhitespace = regexCheck(/\s/) - -/** - * Create a code check from a regex. - * - * @param {RegExp} regex - * @returns {(code: Code) => boolean} - */ -function regexCheck(regex) { - return check - - /** - * Check whether a code matches the bound regex. - * - * @param {Code} code - * Character code. - * @returns {boolean} - * Whether the character code matches the bound regex. - */ - function check(code) { - return code !== null && regex.test(String.fromCharCode(code)) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-space/index.js -/** - * @typedef {import('micromark-util-types').Effects} Effects - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenType} TokenType - */ - - - -// To do: implement `spaceOrTab`, `spaceOrTabMinMax`, `spaceOrTabWithOptions`. - -/** - * Parse spaces and tabs. - * - * There is no `nok` parameter: - * - * * spaces in markdown are often optional, in which case this factory can be - * used and `ok` will be switched to whether spaces were found or not - * * one line ending or space can be detected with `markdownSpace(code)` right - * before using `factorySpace` - * - * ###### Examples - * - * Where `␉` represents a tab (plus how much it expands) and `␠` represents a - * single space. - * - * ```markdown - * ␉ - * ␠␠␠␠ - * ␉␠ - * ``` - * - * @param {Effects} effects - * Context. - * @param {State} ok - * State switched to when successful. - * @param {TokenType} type - * Type (`' \t'`). - * @param {number | undefined} [max=Infinity] - * Max (exclusive). - * @returns - * Start state. - */ -function factorySpace(effects, ok, type, max) { - const limit = max ? max - 1 : Number.POSITIVE_INFINITY - let size = 0 - return start - - /** @type {State} */ - function start(code) { - if (markdownSpace(code)) { - effects.enter(type) - return prefix(code) - } - return ok(code) - } - - /** @type {State} */ - function prefix(code) { - if (markdownSpace(code) && size++ < limit) { - effects.consume(code) - return prefix - } - effects.exit(type) - return ok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/initialize/content.js -/** - * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct - * @typedef {import('micromark-util-types').Initializer} Initializer - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').Token} Token - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - */ - - - -/** @type {InitialConstruct} */ -const content = { - tokenize: initializeContent -} - -/** - * @this {TokenizeContext} - * @type {Initializer} - */ -function initializeContent(effects) { - const contentStart = effects.attempt( - this.parser.constructs.contentInitial, - afterContentStartConstruct, - paragraphInitial - ) - /** @type {Token} */ - let previous - return contentStart - - /** @type {State} */ - function afterContentStartConstruct(code) { - if (code === null) { - effects.consume(code) - return - } - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return factorySpace(effects, contentStart, 'linePrefix') - } - - /** @type {State} */ - function paragraphInitial(code) { - effects.enter('paragraph') - return lineStart(code) - } - - /** @type {State} */ - function lineStart(code) { - const token = effects.enter('chunkText', { - contentType: 'text', - previous - }) - if (previous) { - previous.next = token - } - previous = token - return data(code) - } - - /** @type {State} */ - function data(code) { - if (code === null) { - effects.exit('chunkText') - effects.exit('paragraph') - effects.consume(code) - return - } - if (markdownLineEnding(code)) { - effects.consume(code) - effects.exit('chunkText') - return lineStart - } - - // Data. - effects.consume(code) - return data - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/initialize/document.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').ContainerState} ContainerState - * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct - * @typedef {import('micromark-util-types').Initializer} Initializer - * @typedef {import('micromark-util-types').Point} Point - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').Token} Token - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - -/** - * @typedef {[Construct, ContainerState]} StackItem - */ - - - - -/** @type {InitialConstruct} */ -const document_document = { - tokenize: initializeDocument -} - -/** @type {Construct} */ -const containerConstruct = { - tokenize: tokenizeContainer -} - -/** - * @this {TokenizeContext} - * @type {Initializer} - */ -function initializeDocument(effects) { - const self = this - /** @type {Array} */ - const stack = [] - let continued = 0 - /** @type {TokenizeContext | undefined} */ - let childFlow - /** @type {Token | undefined} */ - let childToken - /** @type {number} */ - let lineStartOffset - return start - - /** @type {State} */ - function start(code) { - // First we iterate through the open blocks, starting with the root - // document, and descending through last children down to the last open - // block. - // Each block imposes a condition that the line must satisfy if the block is - // to remain open. - // For example, a block quote requires a `>` character. - // A paragraph requires a non-blank line. - // In this phase we may match all or just some of the open blocks. - // But we cannot close unmatched blocks yet, because we may have a lazy - // continuation line. - if (continued < stack.length) { - const item = stack[continued] - self.containerState = item[1] - return effects.attempt( - item[0].continuation, - documentContinue, - checkNewContainers - )(code) - } - - // Done. - return checkNewContainers(code) - } - - /** @type {State} */ - function documentContinue(code) { - continued++ - - // Note: this field is called `_closeFlow` but it also closes containers. - // Perhaps a good idea to rename it but it’s already used in the wild by - // extensions. - if (self.containerState._closeFlow) { - self.containerState._closeFlow = undefined - if (childFlow) { - closeFlow() - } - - // Note: this algorithm for moving events around is similar to the - // algorithm when dealing with lazy lines in `writeToChild`. - const indexBeforeExits = self.events.length - let indexBeforeFlow = indexBeforeExits - /** @type {Point | undefined} */ - let point - - // Find the flow chunk. - while (indexBeforeFlow--) { - if ( - self.events[indexBeforeFlow][0] === 'exit' && - self.events[indexBeforeFlow][1].type === 'chunkFlow' - ) { - point = self.events[indexBeforeFlow][1].end - break - } - } - exitContainers(continued) - - // Fix positions. - let index = indexBeforeExits - while (index < self.events.length) { - self.events[index][1].end = Object.assign({}, point) - index++ - } - - // Inject the exits earlier (they’re still also at the end). - splice( - self.events, - indexBeforeFlow + 1, - 0, - self.events.slice(indexBeforeExits) - ) - - // Discard the duplicate exits. - self.events.length = index - return checkNewContainers(code) - } - return start(code) - } - - /** @type {State} */ - function checkNewContainers(code) { - // Next, after consuming the continuation markers for existing blocks, we - // look for new block starts (e.g. `>` for a block quote). - // If we encounter a new block start, we close any blocks unmatched in - // step 1 before creating the new block as a child of the last matched - // block. - if (continued === stack.length) { - // No need to `check` whether there’s a container, of `exitContainers` - // would be moot. - // We can instead immediately `attempt` to parse one. - if (!childFlow) { - return documentContinued(code) - } - - // If we have concrete content, such as block HTML or fenced code, - // we can’t have containers “pierce” into them, so we can immediately - // start. - if (childFlow.currentConstruct && childFlow.currentConstruct.concrete) { - return flowStart(code) - } - - // If we do have flow, it could still be a blank line, - // but we’d be interrupting it w/ a new container if there’s a current - // construct. - // To do: next major: remove `_gfmTableDynamicInterruptHack` (no longer - // needed in micromark-extension-gfm-table@1.0.6). - self.interrupt = Boolean( - childFlow.currentConstruct && !childFlow._gfmTableDynamicInterruptHack - ) - } - - // Check if there is a new container. - self.containerState = {} - return effects.check( - containerConstruct, - thereIsANewContainer, - thereIsNoNewContainer - )(code) - } - - /** @type {State} */ - function thereIsANewContainer(code) { - if (childFlow) closeFlow() - exitContainers(continued) - return documentContinued(code) - } - - /** @type {State} */ - function thereIsNoNewContainer(code) { - self.parser.lazy[self.now().line] = continued !== stack.length - lineStartOffset = self.now().offset - return flowStart(code) - } - - /** @type {State} */ - function documentContinued(code) { - // Try new containers. - self.containerState = {} - return effects.attempt( - containerConstruct, - containerContinue, - flowStart - )(code) - } - - /** @type {State} */ - function containerContinue(code) { - continued++ - stack.push([self.currentConstruct, self.containerState]) - // Try another. - return documentContinued(code) - } - - /** @type {State} */ - function flowStart(code) { - if (code === null) { - if (childFlow) closeFlow() - exitContainers(0) - effects.consume(code) - return - } - childFlow = childFlow || self.parser.flow(self.now()) - effects.enter('chunkFlow', { - contentType: 'flow', - previous: childToken, - _tokenizer: childFlow - }) - return flowContinue(code) - } - - /** @type {State} */ - function flowContinue(code) { - if (code === null) { - writeToChild(effects.exit('chunkFlow'), true) - exitContainers(0) - effects.consume(code) - return - } - if (markdownLineEnding(code)) { - effects.consume(code) - writeToChild(effects.exit('chunkFlow')) - // Get ready for the next line. - continued = 0 - self.interrupt = undefined - return start - } - effects.consume(code) - return flowContinue - } - - /** - * @param {Token} token - * @param {boolean | undefined} [eof] - * @returns {void} - */ - function writeToChild(token, eof) { - const stream = self.sliceStream(token) - if (eof) stream.push(null) - token.previous = childToken - if (childToken) childToken.next = token - childToken = token - childFlow.defineSkip(token.start) - childFlow.write(stream) - - // Alright, so we just added a lazy line: - // - // ```markdown - // > a - // b. - // - // Or: - // - // > ~~~c - // d - // - // Or: - // - // > | e | - // f - // ``` - // - // The construct in the second example (fenced code) does not accept lazy - // lines, so it marked itself as done at the end of its first line, and - // then the content construct parses `d`. - // Most constructs in markdown match on the first line: if the first line - // forms a construct, a non-lazy line can’t “unmake” it. - // - // The construct in the third example is potentially a GFM table, and - // those are *weird*. - // It *could* be a table, from the first line, if the following line - // matches a condition. - // In this case, that second line is lazy, which “unmakes” the first line - // and turns the whole into one content block. - // - // We’ve now parsed the non-lazy and the lazy line, and can figure out - // whether the lazy line started a new flow block. - // If it did, we exit the current containers between the two flow blocks. - if (self.parser.lazy[token.start.line]) { - let index = childFlow.events.length - while (index--) { - if ( - // The token starts before the line ending… - childFlow.events[index][1].start.offset < lineStartOffset && - // …and either is not ended yet… - (!childFlow.events[index][1].end || - // …or ends after it. - childFlow.events[index][1].end.offset > lineStartOffset) - ) { - // Exit: there’s still something open, which means it’s a lazy line - // part of something. - return - } - } - - // Note: this algorithm for moving events around is similar to the - // algorithm when closing flow in `documentContinue`. - const indexBeforeExits = self.events.length - let indexBeforeFlow = indexBeforeExits - /** @type {boolean | undefined} */ - let seen - /** @type {Point | undefined} */ - let point - - // Find the previous chunk (the one before the lazy line). - while (indexBeforeFlow--) { - if ( - self.events[indexBeforeFlow][0] === 'exit' && - self.events[indexBeforeFlow][1].type === 'chunkFlow' - ) { - if (seen) { - point = self.events[indexBeforeFlow][1].end - break - } - seen = true - } - } - exitContainers(continued) - - // Fix positions. - index = indexBeforeExits - while (index < self.events.length) { - self.events[index][1].end = Object.assign({}, point) - index++ - } - - // Inject the exits earlier (they’re still also at the end). - splice( - self.events, - indexBeforeFlow + 1, - 0, - self.events.slice(indexBeforeExits) - ) - - // Discard the duplicate exits. - self.events.length = index - } - } - - /** - * @param {number} size - * @returns {void} - */ - function exitContainers(size) { - let index = stack.length - - // Exit open containers. - while (index-- > size) { - const entry = stack[index] - self.containerState = entry[1] - entry[0].exit.call(self, effects) - } - stack.length = size - } - function closeFlow() { - childFlow.write([null]) - childToken = undefined - childFlow = undefined - self.containerState._closeFlow = undefined - } -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeContainer(effects, ok, nok) { - // Always populated by defaults. - - return factorySpace( - effects, - effects.attempt(this.parser.constructs.document, ok, nok), - 'linePrefix', - this.parser.constructs.disable.null.includes('codeIndented') ? undefined : 4 - ) -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/blank-line.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const blankLine = { - tokenize: tokenizeBlankLine, - partial: true -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeBlankLine(effects, ok, nok) { - return start - - /** - * Start of blank line. - * - * > 👉 **Note**: `␠` represents a space character. - * - * ```markdown - * > | ␠␠␊ - * ^ - * > | ␊ - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - return markdownSpace(code) - ? factorySpace(effects, after, 'linePrefix')(code) - : after(code) - } - - /** - * At eof/eol, after optional whitespace. - * - * > 👉 **Note**: `␠` represents a space character. - * - * ```markdown - * > | ␠␠␊ - * ^ - * > | ␊ - * ^ - * ``` - * - * @type {State} - */ - function after(code) { - return code === null || markdownLineEnding(code) ? ok(code) : nok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/micromark-util-subtokenize/node_modules/micromark-util-chunked/index.js -/** - * Like `Array#splice`, but smarter for giant arrays. - * - * `Array#splice` takes all items to be inserted as individual argument which - * causes a stack overflow in V8 when trying to insert 100k items for instance. - * - * Otherwise, this does not return the removed items, and takes `items` as an - * array instead of rest parameters. - * - * @template {unknown} T - * Item type. - * @param {Array} list - * List to operate on. - * @param {number} start - * Index to remove/insert at (can be negative). - * @param {number} remove - * Number of items to remove. - * @param {Array} items - * Items to inject into `list`. - * @returns {void} - * Nothing. - */ -function micromark_util_chunked_splice(list, start, remove, items) { - const end = list.length - let chunkStart = 0 - /** @type {Array} */ - let parameters - - // Make start between zero and `end` (included). - if (start < 0) { - start = -start > end ? 0 : end + start - } else { - start = start > end ? end : start - } - remove = remove > 0 ? remove : 0 - - // No need to chunk the items if there’s only a couple (10k) items. - if (items.length < 10000) { - parameters = Array.from(items) - parameters.unshift(start, remove) - // @ts-expect-error Hush, it’s fine. - list.splice(...parameters) - } else { - // Delete `remove` items starting from `start` - if (remove) list.splice(start, remove) - - // Insert the items in chunks to not cause stack overflows. - while (chunkStart < items.length) { - parameters = items.slice(chunkStart, chunkStart + 10000) - parameters.unshift(start, 0) - // @ts-expect-error Hush, it’s fine. - list.splice(...parameters) - chunkStart += 10000 - start += 10000 - } - } -} - -/** - * Append `items` (an array) at the end of `list` (another array). - * When `list` was empty, returns `items` instead. - * - * This prevents a potentially expensive operation when `list` is empty, - * and adds items in batches to prevent V8 from hanging. - * - * @template {unknown} T - * Item type. - * @param {Array} list - * List to operate on. - * @param {Array} items - * Items to add to `list`. - * @returns {Array} - * Either `list` or `items`. - */ -function micromark_util_chunked_push(list, items) { - if (list.length > 0) { - micromark_util_chunked_splice(list, list.length, 0, items) - return list - } - return items -} - -;// CONCATENATED MODULE: ./node_modules/micromark-util-subtokenize/index.js -/** - * @typedef {import('micromark-util-types').Chunk} Chunk - * @typedef {import('micromark-util-types').Event} Event - * @typedef {import('micromark-util-types').Token} Token - */ - - -/** - * Tokenize subcontent. - * - * @param {Array} events - * List of events. - * @returns {boolean} - * Whether subtokens were found. - */ -function subtokenize(events) { - /** @type {Record} */ - const jumps = {} - let index = -1 - /** @type {Event} */ - let event - /** @type {number | undefined} */ - let lineIndex - /** @type {number} */ - let otherIndex - /** @type {Event} */ - let otherEvent - /** @type {Array} */ - let parameters - /** @type {Array} */ - let subevents - /** @type {boolean | undefined} */ - let more - while (++index < events.length) { - while (index in jumps) { - index = jumps[index] - } - event = events[index] - - // Add a hook for the GFM tasklist extension, which needs to know if text - // is in the first content of a list item. - if ( - index && - event[1].type === 'chunkFlow' && - events[index - 1][1].type === 'listItemPrefix' - ) { - subevents = event[1]._tokenizer.events - otherIndex = 0 - if ( - otherIndex < subevents.length && - subevents[otherIndex][1].type === 'lineEndingBlank' - ) { - otherIndex += 2 - } - if ( - otherIndex < subevents.length && - subevents[otherIndex][1].type === 'content' - ) { - while (++otherIndex < subevents.length) { - if (subevents[otherIndex][1].type === 'content') { - break - } - if (subevents[otherIndex][1].type === 'chunkText') { - subevents[otherIndex][1]._isInFirstContentOfListItem = true - otherIndex++ - } - } - } - } - - // Enter. - if (event[0] === 'enter') { - if (event[1].contentType) { - Object.assign(jumps, subcontent(events, index)) - index = jumps[index] - more = true - } - } - // Exit. - else if (event[1]._container) { - otherIndex = index - lineIndex = undefined - while (otherIndex--) { - otherEvent = events[otherIndex] - if ( - otherEvent[1].type === 'lineEnding' || - otherEvent[1].type === 'lineEndingBlank' - ) { - if (otherEvent[0] === 'enter') { - if (lineIndex) { - events[lineIndex][1].type = 'lineEndingBlank' - } - otherEvent[1].type = 'lineEnding' - lineIndex = otherIndex - } - } else { - break - } - } - if (lineIndex) { - // Fix position. - event[1].end = Object.assign({}, events[lineIndex][1].start) - - // Switch container exit w/ line endings. - parameters = events.slice(lineIndex, index) - parameters.unshift(event) - micromark_util_chunked_splice(events, lineIndex, index - lineIndex + 1, parameters) - } - } - } - return !more -} - -/** - * Tokenize embedded tokens. - * - * @param {Array} events - * @param {number} eventIndex - * @returns {Record} - */ -function subcontent(events, eventIndex) { - const token = events[eventIndex][1] - const context = events[eventIndex][2] - let startPosition = eventIndex - 1 - /** @type {Array} */ - const startPositions = [] - const tokenizer = - token._tokenizer || context.parser[token.contentType](token.start) - const childEvents = tokenizer.events - /** @type {Array<[number, number]>} */ - const jumps = [] - /** @type {Record} */ - const gaps = {} - /** @type {Array} */ - let stream - /** @type {Token | undefined} */ - let previous - let index = -1 - /** @type {Token | undefined} */ - let current = token - let adjust = 0 - let start = 0 - const breaks = [start] - - // Loop forward through the linked tokens to pass them in order to the - // subtokenizer. - while (current) { - // Find the position of the event for this token. - while (events[++startPosition][1] !== current) { - // Empty. - } - startPositions.push(startPosition) - if (!current._tokenizer) { - stream = context.sliceStream(current) - if (!current.next) { - stream.push(null) - } - if (previous) { - tokenizer.defineSkip(current.start) - } - if (current._isInFirstContentOfListItem) { - tokenizer._gfmTasklistFirstContentOfListItem = true - } - tokenizer.write(stream) - if (current._isInFirstContentOfListItem) { - tokenizer._gfmTasklistFirstContentOfListItem = undefined - } - } - - // Unravel the next token. - previous = current - current = current.next - } - - // Now, loop back through all events (and linked tokens), to figure out which - // parts belong where. - current = token - while (++index < childEvents.length) { - if ( - // Find a void token that includes a break. - childEvents[index][0] === 'exit' && - childEvents[index - 1][0] === 'enter' && - childEvents[index][1].type === childEvents[index - 1][1].type && - childEvents[index][1].start.line !== childEvents[index][1].end.line - ) { - start = index + 1 - breaks.push(start) - // Help GC. - current._tokenizer = undefined - current.previous = undefined - current = current.next - } - } - - // Help GC. - tokenizer.events = [] - - // If there’s one more token (which is the cases for lines that end in an - // EOF), that’s perfect: the last point we found starts it. - // If there isn’t then make sure any remaining content is added to it. - if (current) { - // Help GC. - current._tokenizer = undefined - current.previous = undefined - } else { - breaks.pop() - } - - // Now splice the events from the subtokenizer into the current events, - // moving back to front so that splice indices aren’t affected. - index = breaks.length - while (index--) { - const slice = childEvents.slice(breaks[index], breaks[index + 1]) - const start = startPositions.pop() - jumps.unshift([start, start + slice.length - 1]) - micromark_util_chunked_splice(events, start, 2, slice) - } - index = -1 - while (++index < jumps.length) { - gaps[adjust + jumps[index][0]] = adjust + jumps[index][1] - adjust += jumps[index][1] - jumps[index][0] - 1 - } - return gaps -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/content.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').Resolver} Resolver - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').Token} Token - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - - -/** - * No name because it must not be turned off. - * @type {Construct} - */ -const content_content = { - tokenize: tokenizeContent, - resolve: resolveContent -} - -/** @type {Construct} */ -const continuationConstruct = { - tokenize: tokenizeContinuation, - partial: true -} - -/** - * Content is transparent: it’s parsed right now. That way, definitions are also - * parsed right now: before text in paragraphs (specifically, media) are parsed. - * - * @type {Resolver} - */ -function resolveContent(events) { - subtokenize(events) - return events -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeContent(effects, ok) { - /** @type {Token | undefined} */ - let previous - return chunkStart - - /** - * Before a content chunk. - * - * ```markdown - * > | abc - * ^ - * ``` - * - * @type {State} - */ - function chunkStart(code) { - effects.enter('content') - previous = effects.enter('chunkContent', { - contentType: 'content' - }) - return chunkInside(code) - } - - /** - * In a content chunk. - * - * ```markdown - * > | abc - * ^^^ - * ``` - * - * @type {State} - */ - function chunkInside(code) { - if (code === null) { - return contentEnd(code) - } - - // To do: in `markdown-rs`, each line is parsed on its own, and everything - // is stitched together resolving. - if (markdownLineEnding(code)) { - return effects.check( - continuationConstruct, - contentContinue, - contentEnd - )(code) - } - - // Data. - effects.consume(code) - return chunkInside - } - - /** - * - * - * @type {State} - */ - function contentEnd(code) { - effects.exit('chunkContent') - effects.exit('content') - return ok(code) - } - - /** - * - * - * @type {State} - */ - function contentContinue(code) { - effects.consume(code) - effects.exit('chunkContent') - previous.next = effects.enter('chunkContent', { - contentType: 'content', - previous - }) - previous = previous.next - return chunkInside - } -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeContinuation(effects, ok, nok) { - const self = this - return startLookahead - - /** - * - * - * @type {State} - */ - function startLookahead(code) { - effects.exit('chunkContent') - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return factorySpace(effects, prefixed, 'linePrefix') - } - - /** - * - * - * @type {State} - */ - function prefixed(code) { - if (code === null || markdownLineEnding(code)) { - return nok(code) - } - - // Always populated by defaults. - - const tail = self.events[self.events.length - 1] - if ( - !self.parser.constructs.disable.null.includes('codeIndented') && - tail && - tail[1].type === 'linePrefix' && - tail[2].sliceSerialize(tail[1], true).length >= 4 - ) { - return ok(code) - } - return effects.interrupt(self.parser.constructs.flow, nok, ok)(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/initialize/flow.js -/** - * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct - * @typedef {import('micromark-util-types').Initializer} Initializer - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - */ - - - - -/** @type {InitialConstruct} */ -const flow = { - tokenize: initializeFlow -} - -/** - * @this {TokenizeContext} - * @type {Initializer} - */ -function initializeFlow(effects) { - const self = this - const initial = effects.attempt( - // Try to parse a blank line. - blankLine, - atBlankEnding, - // Try to parse initial flow (essentially, only code). - effects.attempt( - this.parser.constructs.flowInitial, - afterConstruct, - factorySpace( - effects, - effects.attempt( - this.parser.constructs.flow, - afterConstruct, - effects.attempt(content_content, afterConstruct) - ), - 'linePrefix' - ) - ) - ) - return initial - - /** @type {State} */ - function atBlankEnding(code) { - if (code === null) { - effects.consume(code) - return - } - effects.enter('lineEndingBlank') - effects.consume(code) - effects.exit('lineEndingBlank') - self.currentConstruct = undefined - return initial - } - - /** @type {State} */ - function afterConstruct(code) { - if (code === null) { - effects.consume(code) - return - } - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - self.currentConstruct = undefined - return initial - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/initialize/text.js -/** - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct - * @typedef {import('micromark-util-types').Initializer} Initializer - * @typedef {import('micromark-util-types').Resolver} Resolver - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - */ - -const resolver = { - resolveAll: createResolver() -} -const string = initializeFactory('string') -const text_text = initializeFactory('text') - -/** - * @param {'string' | 'text'} field - * @returns {InitialConstruct} - */ -function initializeFactory(field) { - return { - tokenize: initializeText, - resolveAll: createResolver( - field === 'text' ? resolveAllLineSuffixes : undefined - ) - } - - /** - * @this {TokenizeContext} - * @type {Initializer} - */ - function initializeText(effects) { - const self = this - const constructs = this.parser.constructs[field] - const text = effects.attempt(constructs, start, notText) - return start - - /** @type {State} */ - function start(code) { - return atBreak(code) ? text(code) : notText(code) - } - - /** @type {State} */ - function notText(code) { - if (code === null) { - effects.consume(code) - return - } - effects.enter('data') - effects.consume(code) - return data - } - - /** @type {State} */ - function data(code) { - if (atBreak(code)) { - effects.exit('data') - return text(code) - } - - // Data. - effects.consume(code) - return data - } - - /** - * @param {Code} code - * @returns {boolean} - */ - function atBreak(code) { - if (code === null) { - return true - } - const list = constructs[code] - let index = -1 - if (list) { - // Always populated by defaults. - - while (++index < list.length) { - const item = list[index] - if (!item.previous || item.previous.call(self, self.previous)) { - return true - } - } - } - return false - } - } -} - -/** - * @param {Resolver | undefined} [extraResolver] - * @returns {Resolver} - */ -function createResolver(extraResolver) { - return resolveAllText - - /** @type {Resolver} */ - function resolveAllText(events, context) { - let index = -1 - /** @type {number | undefined} */ - let enter - - // A rather boring computation (to merge adjacent `data` events) which - // improves mm performance by 29%. - while (++index <= events.length) { - if (enter === undefined) { - if (events[index] && events[index][1].type === 'data') { - enter = index - index++ - } - } else if (!events[index] || events[index][1].type !== 'data') { - // Don’t do anything if there is one data token. - if (index !== enter + 2) { - events[enter][1].end = events[index - 1][1].end - events.splice(enter + 2, index - enter - 2) - index = enter + 2 - } - enter = undefined - } - } - return extraResolver ? extraResolver(events, context) : events - } -} - -/** - * A rather ugly set of instructions which again looks at chunks in the input - * stream. - * The reason to do this here is that it is *much* faster to parse in reverse. - * And that we can’t hook into `null` to split the line suffix before an EOF. - * To do: figure out if we can make this into a clean utility, or even in core. - * As it will be useful for GFMs literal autolink extension (and maybe even - * tables?) - * - * @type {Resolver} - */ -function resolveAllLineSuffixes(events, context) { - let eventIndex = 0 // Skip first. - - while (++eventIndex <= events.length) { - if ( - (eventIndex === events.length || - events[eventIndex][1].type === 'lineEnding') && - events[eventIndex - 1][1].type === 'data' - ) { - const data = events[eventIndex - 1][1] - const chunks = context.sliceStream(data) - let index = chunks.length - let bufferIndex = -1 - let size = 0 - /** @type {boolean | undefined} */ - let tabs - while (index--) { - const chunk = chunks[index] - if (typeof chunk === 'string') { - bufferIndex = chunk.length - while (chunk.charCodeAt(bufferIndex - 1) === 32) { - size++ - bufferIndex-- - } - if (bufferIndex) break - bufferIndex = -1 - } - // Number - else if (chunk === -2) { - tabs = true - size++ - } else if (chunk === -1) { - // Empty - } else { - // Replacement character, exit. - index++ - break - } - } - if (size) { - const token = { - type: - eventIndex === events.length || tabs || size < 2 - ? 'lineSuffix' - : 'hardBreakTrailing', - start: { - line: data.end.line, - column: data.end.column - size, - offset: data.end.offset - size, - _index: data.start._index + index, - _bufferIndex: index - ? bufferIndex - : data.start._bufferIndex + bufferIndex - }, - end: Object.assign({}, data.end) - } - data.end = Object.assign({}, token.start) - if (data.start.offset === data.end.offset) { - Object.assign(data, token) - } else { - events.splice( - eventIndex, - 0, - ['enter', token, context], - ['exit', token, context] - ) - eventIndex += 2 - } - } - eventIndex++ - } - } - return events -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-resolve-all/index.js -/** - * @typedef {import('micromark-util-types').Event} Event - * @typedef {import('micromark-util-types').Resolver} Resolver - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - */ - -/** - * Call all `resolveAll`s. - * - * @param {Array<{resolveAll?: Resolver | undefined}>} constructs - * List of constructs, optionally with `resolveAll`s. - * @param {Array} events - * List of events. - * @param {TokenizeContext} context - * Context used by `tokenize`. - * @returns {Array} - * Changed events. - */ -function resolveAll(constructs, events, context) { - /** @type {Array} */ - const called = [] - let index = -1 - - while (++index < constructs.length) { - const resolve = constructs[index].resolveAll - - if (resolve && !called.includes(resolve)) { - events = resolve(events, context) - called.push(resolve) - } - } - - return events -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/create-tokenizer.js -/** - * @typedef {import('micromark-util-types').Chunk} Chunk - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').ConstructRecord} ConstructRecord - * @typedef {import('micromark-util-types').Effects} Effects - * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct - * @typedef {import('micromark-util-types').ParseContext} ParseContext - * @typedef {import('micromark-util-types').Point} Point - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').Token} Token - * @typedef {import('micromark-util-types').TokenType} TokenType - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - */ - -/** - * @callback Restore - * @returns {void} - * - * @typedef Info - * @property {Restore} restore - * @property {number} from - * - * @callback ReturnHandle - * Handle a successful run. - * @param {Construct} construct - * @param {Info} info - * @returns {void} - */ - - - - -/** - * Create a tokenizer. - * Tokenizers deal with one type of data (e.g., containers, flow, text). - * The parser is the object dealing with it all. - * `initialize` works like other constructs, except that only its `tokenize` - * function is used, in which case it doesn’t receive an `ok` or `nok`. - * `from` can be given to set the point before the first character, although - * when further lines are indented, they must be set with `defineSkip`. - * - * @param {ParseContext} parser - * @param {InitialConstruct} initialize - * @param {Omit | undefined} [from] - * @returns {TokenizeContext} - */ -function createTokenizer(parser, initialize, from) { - /** @type {Point} */ - let point = Object.assign( - from - ? Object.assign({}, from) - : { - line: 1, - column: 1, - offset: 0 - }, - { - _index: 0, - _bufferIndex: -1 - } - ) - /** @type {Record} */ - const columnStart = {} - /** @type {Array} */ - const resolveAllConstructs = [] - /** @type {Array} */ - let chunks = [] - /** @type {Array} */ - let stack = [] - /** @type {boolean | undefined} */ - let consumed = true - - /** - * Tools used for tokenizing. - * - * @type {Effects} - */ - const effects = { - consume, - enter, - exit, - attempt: constructFactory(onsuccessfulconstruct), - check: constructFactory(onsuccessfulcheck), - interrupt: constructFactory(onsuccessfulcheck, { - interrupt: true - }) - } - - /** - * State and tools for resolving and serializing. - * - * @type {TokenizeContext} - */ - const context = { - previous: null, - code: null, - containerState: {}, - events: [], - parser, - sliceStream, - sliceSerialize, - now, - defineSkip, - write - } - - /** - * The state function. - * - * @type {State | void} - */ - let state = initialize.tokenize.call(context, effects) - - /** - * Track which character we expect to be consumed, to catch bugs. - * - * @type {Code} - */ - let expectedCode - if (initialize.resolveAll) { - resolveAllConstructs.push(initialize) - } - return context - - /** @type {TokenizeContext['write']} */ - function write(slice) { - chunks = push(chunks, slice) - main() - - // Exit if we’re not done, resolve might change stuff. - if (chunks[chunks.length - 1] !== null) { - return [] - } - addResult(initialize, 0) - - // Otherwise, resolve, and exit. - context.events = resolveAll(resolveAllConstructs, context.events, context) - return context.events - } - - // - // Tools. - // - - /** @type {TokenizeContext['sliceSerialize']} */ - function sliceSerialize(token, expandTabs) { - return serializeChunks(sliceStream(token), expandTabs) - } - - /** @type {TokenizeContext['sliceStream']} */ - function sliceStream(token) { - return sliceChunks(chunks, token) - } - - /** @type {TokenizeContext['now']} */ - function now() { - // This is a hot path, so we clone manually instead of `Object.assign({}, point)` - const {line, column, offset, _index, _bufferIndex} = point - return { - line, - column, - offset, - _index, - _bufferIndex - } - } - - /** @type {TokenizeContext['defineSkip']} */ - function defineSkip(value) { - columnStart[value.line] = value.column - accountForPotentialSkip() - } - - // - // State management. - // - - /** - * Main loop (note that `_index` and `_bufferIndex` in `point` are modified by - * `consume`). - * Here is where we walk through the chunks, which either include strings of - * several characters, or numerical character codes. - * The reason to do this in a loop instead of a call is so the stack can - * drain. - * - * @returns {void} - */ - function main() { - /** @type {number} */ - let chunkIndex - while (point._index < chunks.length) { - const chunk = chunks[point._index] - - // If we’re in a buffer chunk, loop through it. - if (typeof chunk === 'string') { - chunkIndex = point._index - if (point._bufferIndex < 0) { - point._bufferIndex = 0 - } - while ( - point._index === chunkIndex && - point._bufferIndex < chunk.length - ) { - go(chunk.charCodeAt(point._bufferIndex)) - } - } else { - go(chunk) - } - } - } - - /** - * Deal with one code. - * - * @param {Code} code - * @returns {void} - */ - function go(code) { - consumed = undefined - expectedCode = code - state = state(code) - } - - /** @type {Effects['consume']} */ - function consume(code) { - if (markdownLineEnding(code)) { - point.line++ - point.column = 1 - point.offset += code === -3 ? 2 : 1 - accountForPotentialSkip() - } else if (code !== -1) { - point.column++ - point.offset++ - } - - // Not in a string chunk. - if (point._bufferIndex < 0) { - point._index++ - } else { - point._bufferIndex++ - - // At end of string chunk. - // @ts-expect-error Points w/ non-negative `_bufferIndex` reference - // strings. - if (point._bufferIndex === chunks[point._index].length) { - point._bufferIndex = -1 - point._index++ - } - } - - // Expose the previous character. - context.previous = code - - // Mark as consumed. - consumed = true - } - - /** @type {Effects['enter']} */ - function enter(type, fields) { - /** @type {Token} */ - // @ts-expect-error Patch instead of assign required fields to help GC. - const token = fields || {} - token.type = type - token.start = now() - context.events.push(['enter', token, context]) - stack.push(token) - return token - } - - /** @type {Effects['exit']} */ - function exit(type) { - const token = stack.pop() - token.end = now() - context.events.push(['exit', token, context]) - return token - } - - /** - * Use results. - * - * @type {ReturnHandle} - */ - function onsuccessfulconstruct(construct, info) { - addResult(construct, info.from) - } - - /** - * Discard results. - * - * @type {ReturnHandle} - */ - function onsuccessfulcheck(_, info) { - info.restore() - } - - /** - * Factory to attempt/check/interrupt. - * - * @param {ReturnHandle} onreturn - * @param {{interrupt?: boolean | undefined} | undefined} [fields] - */ - function constructFactory(onreturn, fields) { - return hook - - /** - * Handle either an object mapping codes to constructs, a list of - * constructs, or a single construct. - * - * @param {Array | Construct | ConstructRecord} constructs - * @param {State} returnState - * @param {State | undefined} [bogusState] - * @returns {State} - */ - function hook(constructs, returnState, bogusState) { - /** @type {Array} */ - let listOfConstructs - /** @type {number} */ - let constructIndex - /** @type {Construct} */ - let currentConstruct - /** @type {Info} */ - let info - return Array.isArray(constructs) /* c8 ignore next 1 */ - ? handleListOfConstructs(constructs) - : 'tokenize' in constructs - ? // @ts-expect-error Looks like a construct. - handleListOfConstructs([constructs]) - : handleMapOfConstructs(constructs) - - /** - * Handle a list of construct. - * - * @param {ConstructRecord} map - * @returns {State} - */ - function handleMapOfConstructs(map) { - return start - - /** @type {State} */ - function start(code) { - const def = code !== null && map[code] - const all = code !== null && map.null - const list = [ - // To do: add more extension tests. - /* c8 ignore next 2 */ - ...(Array.isArray(def) ? def : def ? [def] : []), - ...(Array.isArray(all) ? all : all ? [all] : []) - ] - return handleListOfConstructs(list)(code) - } - } - - /** - * Handle a list of construct. - * - * @param {Array} list - * @returns {State} - */ - function handleListOfConstructs(list) { - listOfConstructs = list - constructIndex = 0 - if (list.length === 0) { - return bogusState - } - return handleConstruct(list[constructIndex]) - } - - /** - * Handle a single construct. - * - * @param {Construct} construct - * @returns {State} - */ - function handleConstruct(construct) { - return start - - /** @type {State} */ - function start(code) { - // To do: not needed to store if there is no bogus state, probably? - // Currently doesn’t work because `inspect` in document does a check - // w/o a bogus, which doesn’t make sense. But it does seem to help perf - // by not storing. - info = store() - currentConstruct = construct - if (!construct.partial) { - context.currentConstruct = construct - } - - // Always populated by defaults. - - if ( - construct.name && - context.parser.constructs.disable.null.includes(construct.name) - ) { - return nok(code) - } - return construct.tokenize.call( - // If we do have fields, create an object w/ `context` as its - // prototype. - // This allows a “live binding”, which is needed for `interrupt`. - fields ? Object.assign(Object.create(context), fields) : context, - effects, - ok, - nok - )(code) - } - } - - /** @type {State} */ - function ok(code) { - consumed = true - onreturn(currentConstruct, info) - return returnState - } - - /** @type {State} */ - function nok(code) { - consumed = true - info.restore() - if (++constructIndex < listOfConstructs.length) { - return handleConstruct(listOfConstructs[constructIndex]) - } - return bogusState - } - } - } - - /** - * @param {Construct} construct - * @param {number} from - * @returns {void} - */ - function addResult(construct, from) { - if (construct.resolveAll && !resolveAllConstructs.includes(construct)) { - resolveAllConstructs.push(construct) - } - if (construct.resolve) { - splice( - context.events, - from, - context.events.length - from, - construct.resolve(context.events.slice(from), context) - ) - } - if (construct.resolveTo) { - context.events = construct.resolveTo(context.events, context) - } - } - - /** - * Store state. - * - * @returns {Info} - */ - function store() { - const startPoint = now() - const startPrevious = context.previous - const startCurrentConstruct = context.currentConstruct - const startEventsIndex = context.events.length - const startStack = Array.from(stack) - return { - restore, - from: startEventsIndex - } - - /** - * Restore state. - * - * @returns {void} - */ - function restore() { - point = startPoint - context.previous = startPrevious - context.currentConstruct = startCurrentConstruct - context.events.length = startEventsIndex - stack = startStack - accountForPotentialSkip() - } - } - - /** - * Move the current point a bit forward in the line when it’s on a column - * skip. - * - * @returns {void} - */ - function accountForPotentialSkip() { - if (point.line in columnStart && point.column < 2) { - point.column = columnStart[point.line] - point.offset += columnStart[point.line] - 1 - } - } -} - -/** - * Get the chunks from a slice of chunks in the range of a token. - * - * @param {Array} chunks - * @param {Pick} token - * @returns {Array} - */ -function sliceChunks(chunks, token) { - const startIndex = token.start._index - const startBufferIndex = token.start._bufferIndex - const endIndex = token.end._index - const endBufferIndex = token.end._bufferIndex - /** @type {Array} */ - let view - if (startIndex === endIndex) { - // @ts-expect-error `_bufferIndex` is used on string chunks. - view = [chunks[startIndex].slice(startBufferIndex, endBufferIndex)] - } else { - view = chunks.slice(startIndex, endIndex) - if (startBufferIndex > -1) { - const head = view[0] - if (typeof head === 'string') { - view[0] = head.slice(startBufferIndex) - } else { - view.shift() - } - } - if (endBufferIndex > 0) { - // @ts-expect-error `_bufferIndex` is used on string chunks. - view.push(chunks[endIndex].slice(0, endBufferIndex)) - } - } - return view -} - -/** - * Get the string value of a slice of chunks. - * - * @param {Array} chunks - * @param {boolean | undefined} [expandTabs=false] - * @returns {string} - */ -function serializeChunks(chunks, expandTabs) { - let index = -1 - /** @type {Array} */ - const result = [] - /** @type {boolean | undefined} */ - let atTab - while (++index < chunks.length) { - const chunk = chunks[index] - /** @type {string} */ - let value - if (typeof chunk === 'string') { - value = chunk - } else - switch (chunk) { - case -5: { - value = '\r' - break - } - case -4: { - value = '\n' - break - } - case -3: { - value = '\r' + '\n' - break - } - case -2: { - value = expandTabs ? ' ' : '\t' - break - } - case -1: { - if (!expandTabs && atTab) continue - value = ' ' - break - } - default: { - // Currently only replacement character. - value = String.fromCharCode(chunk) - } - } - atTab = chunk === -2 - result.push(value) - } - return result.join('') -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/thematic-break.js -/** - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const thematicBreak = { - name: 'thematicBreak', - tokenize: tokenizeThematicBreak -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeThematicBreak(effects, ok, nok) { - let size = 0 - /** @type {NonNullable} */ - let marker - return start - - /** - * Start of thematic break. - * - * ```markdown - * > | *** - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter('thematicBreak') - // To do: parse indent like `markdown-rs`. - return before(code) - } - - /** - * After optional whitespace, at marker. - * - * ```markdown - * > | *** - * ^ - * ``` - * - * @type {State} - */ - function before(code) { - marker = code - return atBreak(code) - } - - /** - * After something, before something else. - * - * ```markdown - * > | *** - * ^ - * ``` - * - * @type {State} - */ - function atBreak(code) { - if (code === marker) { - effects.enter('thematicBreakSequence') - return sequence(code) - } - if (size >= 3 && (code === null || markdownLineEnding(code))) { - effects.exit('thematicBreak') - return ok(code) - } - return nok(code) - } - - /** - * In sequence. - * - * ```markdown - * > | *** - * ^ - * ``` - * - * @type {State} - */ - function sequence(code) { - if (code === marker) { - effects.consume(code) - size++ - return sequence - } - effects.exit('thematicBreakSequence') - return markdownSpace(code) - ? factorySpace(effects, atBreak, 'whitespace')(code) - : atBreak(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/list.js -/** - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').ContainerState} ContainerState - * @typedef {import('micromark-util-types').Exiter} Exiter - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - - - - -/** @type {Construct} */ -const list = { - name: 'list', - tokenize: tokenizeListStart, - continuation: { - tokenize: tokenizeListContinuation - }, - exit: tokenizeListEnd -} - -/** @type {Construct} */ -const listItemPrefixWhitespaceConstruct = { - tokenize: tokenizeListItemPrefixWhitespace, - partial: true -} - -/** @type {Construct} */ -const indentConstruct = { - tokenize: tokenizeIndent, - partial: true -} - -// To do: `markdown-rs` parses list items on their own and later stitches them -// together. - -/** - * @type {Tokenizer} - * @this {TokenizeContext} - */ -function tokenizeListStart(effects, ok, nok) { - const self = this - const tail = self.events[self.events.length - 1] - let initialSize = - tail && tail[1].type === 'linePrefix' - ? tail[2].sliceSerialize(tail[1], true).length - : 0 - let size = 0 - return start - - /** @type {State} */ - function start(code) { - const kind = - self.containerState.type || - (code === 42 || code === 43 || code === 45 - ? 'listUnordered' - : 'listOrdered') - if ( - kind === 'listUnordered' - ? !self.containerState.marker || code === self.containerState.marker - : asciiDigit(code) - ) { - if (!self.containerState.type) { - self.containerState.type = kind - effects.enter(kind, { - _container: true - }) - } - if (kind === 'listUnordered') { - effects.enter('listItemPrefix') - return code === 42 || code === 45 - ? effects.check(thematicBreak, nok, atMarker)(code) - : atMarker(code) - } - if (!self.interrupt || code === 49) { - effects.enter('listItemPrefix') - effects.enter('listItemValue') - return inside(code) - } - } - return nok(code) - } - - /** @type {State} */ - function inside(code) { - if (asciiDigit(code) && ++size < 10) { - effects.consume(code) - return inside - } - if ( - (!self.interrupt || size < 2) && - (self.containerState.marker - ? code === self.containerState.marker - : code === 41 || code === 46) - ) { - effects.exit('listItemValue') - return atMarker(code) - } - return nok(code) - } - - /** - * @type {State} - **/ - function atMarker(code) { - effects.enter('listItemMarker') - effects.consume(code) - effects.exit('listItemMarker') - self.containerState.marker = self.containerState.marker || code - return effects.check( - blankLine, - // Can’t be empty when interrupting. - self.interrupt ? nok : onBlank, - effects.attempt( - listItemPrefixWhitespaceConstruct, - endOfPrefix, - otherPrefix - ) - ) - } - - /** @type {State} */ - function onBlank(code) { - self.containerState.initialBlankLine = true - initialSize++ - return endOfPrefix(code) - } - - /** @type {State} */ - function otherPrefix(code) { - if (markdownSpace(code)) { - effects.enter('listItemPrefixWhitespace') - effects.consume(code) - effects.exit('listItemPrefixWhitespace') - return endOfPrefix - } - return nok(code) - } - - /** @type {State} */ - function endOfPrefix(code) { - self.containerState.size = - initialSize + - self.sliceSerialize(effects.exit('listItemPrefix'), true).length - return ok(code) - } -} - -/** - * @type {Tokenizer} - * @this {TokenizeContext} - */ -function tokenizeListContinuation(effects, ok, nok) { - const self = this - self.containerState._closeFlow = undefined - return effects.check(blankLine, onBlank, notBlank) - - /** @type {State} */ - function onBlank(code) { - self.containerState.furtherBlankLines = - self.containerState.furtherBlankLines || - self.containerState.initialBlankLine - - // We have a blank line. - // Still, try to consume at most the items size. - return factorySpace( - effects, - ok, - 'listItemIndent', - self.containerState.size + 1 - )(code) - } - - /** @type {State} */ - function notBlank(code) { - if (self.containerState.furtherBlankLines || !markdownSpace(code)) { - self.containerState.furtherBlankLines = undefined - self.containerState.initialBlankLine = undefined - return notInCurrentItem(code) - } - self.containerState.furtherBlankLines = undefined - self.containerState.initialBlankLine = undefined - return effects.attempt(indentConstruct, ok, notInCurrentItem)(code) - } - - /** @type {State} */ - function notInCurrentItem(code) { - // While we do continue, we signal that the flow should be closed. - self.containerState._closeFlow = true - // As we’re closing flow, we’re no longer interrupting. - self.interrupt = undefined - // Always populated by defaults. - - return factorySpace( - effects, - effects.attempt(list, ok, nok), - 'linePrefix', - self.parser.constructs.disable.null.includes('codeIndented') - ? undefined - : 4 - )(code) - } -} - -/** - * @type {Tokenizer} - * @this {TokenizeContext} - */ -function tokenizeIndent(effects, ok, nok) { - const self = this - return factorySpace( - effects, - afterPrefix, - 'listItemIndent', - self.containerState.size + 1 - ) - - /** @type {State} */ - function afterPrefix(code) { - const tail = self.events[self.events.length - 1] - return tail && - tail[1].type === 'listItemIndent' && - tail[2].sliceSerialize(tail[1], true).length === self.containerState.size - ? ok(code) - : nok(code) - } -} - -/** - * @type {Exiter} - * @this {TokenizeContext} - */ -function tokenizeListEnd(effects) { - effects.exit(this.containerState.type) -} - -/** - * @type {Tokenizer} - * @this {TokenizeContext} - */ -function tokenizeListItemPrefixWhitespace(effects, ok, nok) { - const self = this - - // Always populated by defaults. - - return factorySpace( - effects, - afterPrefix, - 'listItemPrefixWhitespace', - self.parser.constructs.disable.null.includes('codeIndented') - ? undefined - : 4 + 1 - ) - - /** @type {State} */ - function afterPrefix(code) { - const tail = self.events[self.events.length - 1] - return !markdownSpace(code) && - tail && - tail[1].type === 'listItemPrefixWhitespace' - ? ok(code) - : nok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/block-quote.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').Exiter} Exiter - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const blockQuote = { - name: 'blockQuote', - tokenize: tokenizeBlockQuoteStart, - continuation: { - tokenize: tokenizeBlockQuoteContinuation - }, - exit -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeBlockQuoteStart(effects, ok, nok) { - const self = this - return start - - /** - * Start of block quote. - * - * ```markdown - * > | > a - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - if (code === 62) { - const state = self.containerState - if (!state.open) { - effects.enter('blockQuote', { - _container: true - }) - state.open = true - } - effects.enter('blockQuotePrefix') - effects.enter('blockQuoteMarker') - effects.consume(code) - effects.exit('blockQuoteMarker') - return after - } - return nok(code) - } - - /** - * After `>`, before optional whitespace. - * - * ```markdown - * > | > a - * ^ - * ``` - * - * @type {State} - */ - function after(code) { - if (markdownSpace(code)) { - effects.enter('blockQuotePrefixWhitespace') - effects.consume(code) - effects.exit('blockQuotePrefixWhitespace') - effects.exit('blockQuotePrefix') - return ok - } - effects.exit('blockQuotePrefix') - return ok(code) - } -} - -/** - * Start of block quote continuation. - * - * ```markdown - * | > a - * > | > b - * ^ - * ``` - * - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeBlockQuoteContinuation(effects, ok, nok) { - const self = this - return contStart - - /** - * Start of block quote continuation. - * - * Also used to parse the first block quote opening. - * - * ```markdown - * | > a - * > | > b - * ^ - * ``` - * - * @type {State} - */ - function contStart(code) { - if (markdownSpace(code)) { - // Always populated by defaults. - - return factorySpace( - effects, - contBefore, - 'linePrefix', - self.parser.constructs.disable.null.includes('codeIndented') - ? undefined - : 4 - )(code) - } - return contBefore(code) - } - - /** - * At `>`, after optional whitespace. - * - * Also used to parse the first block quote opening. - * - * ```markdown - * | > a - * > | > b - * ^ - * ``` - * - * @type {State} - */ - function contBefore(code) { - return effects.attempt(blockQuote, ok, nok)(code) - } -} - -/** @type {Exiter} */ -function exit(effects) { - effects.exit('blockQuote') -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-destination/index.js -/** - * @typedef {import('micromark-util-types').Effects} Effects - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenType} TokenType - */ - - -/** - * Parse destinations. - * - * ###### Examples - * - * ```markdown - * - * b> - * - * - * a - * a\)b - * a(b)c - * a(b) - * ``` - * - * @param {Effects} effects - * Context. - * @param {State} ok - * State switched to when successful. - * @param {State} nok - * State switched to when unsuccessful. - * @param {TokenType} type - * Type for whole (`` or `b`). - * @param {TokenType} literalType - * Type when enclosed (``). - * @param {TokenType} literalMarkerType - * Type for enclosing (`<` and `>`). - * @param {TokenType} rawType - * Type when not enclosed (`b`). - * @param {TokenType} stringType - * Type for the value (`a` or `b`). - * @param {number | undefined} [max=Infinity] - * Depth of nested parens (inclusive). - * @returns {State} - * Start state. - */ // eslint-disable-next-line max-params -function factoryDestination( - effects, - ok, - nok, - type, - literalType, - literalMarkerType, - rawType, - stringType, - max -) { - const limit = max || Number.POSITIVE_INFINITY - let balance = 0 - return start - - /** - * Start of destination. - * - * ```markdown - * > | - * ^ - * > | aa - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - if (code === 60) { - effects.enter(type) - effects.enter(literalType) - effects.enter(literalMarkerType) - effects.consume(code) - effects.exit(literalMarkerType) - return enclosedBefore - } - - // ASCII control, space, closing paren. - if (code === null || code === 32 || code === 41 || asciiControl(code)) { - return nok(code) - } - effects.enter(type) - effects.enter(rawType) - effects.enter(stringType) - effects.enter('chunkString', { - contentType: 'string' - }) - return raw(code) - } - - /** - * After `<`, at an enclosed destination. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function enclosedBefore(code) { - if (code === 62) { - effects.enter(literalMarkerType) - effects.consume(code) - effects.exit(literalMarkerType) - effects.exit(literalType) - effects.exit(type) - return ok - } - effects.enter(stringType) - effects.enter('chunkString', { - contentType: 'string' - }) - return enclosed(code) - } - - /** - * In enclosed destination. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function enclosed(code) { - if (code === 62) { - effects.exit('chunkString') - effects.exit(stringType) - return enclosedBefore(code) - } - if (code === null || code === 60 || markdownLineEnding(code)) { - return nok(code) - } - effects.consume(code) - return code === 92 ? enclosedEscape : enclosed - } - - /** - * After `\`, at a special character. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function enclosedEscape(code) { - if (code === 60 || code === 62 || code === 92) { - effects.consume(code) - return enclosed - } - return enclosed(code) - } - - /** - * In raw destination. - * - * ```markdown - * > | aa - * ^ - * ``` - * - * @type {State} - */ - function raw(code) { - if ( - !balance && - (code === null || code === 41 || markdownLineEndingOrSpace(code)) - ) { - effects.exit('chunkString') - effects.exit(stringType) - effects.exit(rawType) - effects.exit(type) - return ok(code) - } - if (balance < limit && code === 40) { - effects.consume(code) - balance++ - return raw - } - if (code === 41) { - effects.consume(code) - balance-- - return raw - } - - // ASCII control (but *not* `\0`) and space and `(`. - // Note: in `markdown-rs`, `\0` exists in codes, in `micromark-js` it - // doesn’t. - if (code === null || code === 32 || code === 40 || asciiControl(code)) { - return nok(code) - } - effects.consume(code) - return code === 92 ? rawEscape : raw - } - - /** - * After `\`, at special character. - * - * ```markdown - * > | a\*a - * ^ - * ``` - * - * @type {State} - */ - function rawEscape(code) { - if (code === 40 || code === 41 || code === 92) { - effects.consume(code) - return raw - } - return raw(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-label/index.js -/** - * @typedef {import('micromark-util-types').Effects} Effects - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').TokenType} TokenType - */ - - -/** - * Parse labels. - * - * > 👉 **Note**: labels in markdown are capped at 999 characters in the string. - * - * ###### Examples - * - * ```markdown - * [a] - * [a - * b] - * [a\]b] - * ``` - * - * @this {TokenizeContext} - * Tokenize context. - * @param {Effects} effects - * Context. - * @param {State} ok - * State switched to when successful. - * @param {State} nok - * State switched to when unsuccessful. - * @param {TokenType} type - * Type of the whole label (`[a]`). - * @param {TokenType} markerType - * Type for the markers (`[` and `]`). - * @param {TokenType} stringType - * Type for the identifier (`a`). - * @returns {State} - * Start state. - */ // eslint-disable-next-line max-params -function factoryLabel(effects, ok, nok, type, markerType, stringType) { - const self = this - let size = 0 - /** @type {boolean} */ - let seen - return start - - /** - * Start of label. - * - * ```markdown - * > | [a] - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter(type) - effects.enter(markerType) - effects.consume(code) - effects.exit(markerType) - effects.enter(stringType) - return atBreak - } - - /** - * In label, at something, before something else. - * - * ```markdown - * > | [a] - * ^ - * ``` - * - * @type {State} - */ - function atBreak(code) { - if ( - size > 999 || - code === null || - code === 91 || - (code === 93 && !seen) || - // To do: remove in the future once we’ve switched from - // `micromark-extension-footnote` to `micromark-extension-gfm-footnote`, - // which doesn’t need this. - // Hidden footnotes hook. - /* c8 ignore next 3 */ - (code === 94 && - !size && - '_hiddenFootnoteSupport' in self.parser.constructs) - ) { - return nok(code) - } - if (code === 93) { - effects.exit(stringType) - effects.enter(markerType) - effects.consume(code) - effects.exit(markerType) - effects.exit(type) - return ok - } - - // To do: indent? Link chunks and EOLs together? - if (markdownLineEnding(code)) { - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return atBreak - } - effects.enter('chunkString', { - contentType: 'string' - }) - return labelInside(code) - } - - /** - * In label, in text. - * - * ```markdown - * > | [a] - * ^ - * ``` - * - * @type {State} - */ - function labelInside(code) { - if ( - code === null || - code === 91 || - code === 93 || - markdownLineEnding(code) || - size++ > 999 - ) { - effects.exit('chunkString') - return atBreak(code) - } - effects.consume(code) - if (!seen) seen = !markdownSpace(code) - return code === 92 ? labelEscape : labelInside - } - - /** - * After `\`, at a special character. - * - * ```markdown - * > | [a\*a] - * ^ - * ``` - * - * @type {State} - */ - function labelEscape(code) { - if (code === 91 || code === 92 || code === 93) { - effects.consume(code) - size++ - return labelInside - } - return labelInside(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-title/index.js -/** - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Effects} Effects - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenType} TokenType - */ - - - -/** - * Parse titles. - * - * ###### Examples - * - * ```markdown - * "a" - * 'b' - * (c) - * "a - * b" - * 'a - * b' - * (a\)b) - * ``` - * - * @param {Effects} effects - * Context. - * @param {State} ok - * State switched to when successful. - * @param {State} nok - * State switched to when unsuccessful. - * @param {TokenType} type - * Type of the whole title (`"a"`, `'b'`, `(c)`). - * @param {TokenType} markerType - * Type for the markers (`"`, `'`, `(`, and `)`). - * @param {TokenType} stringType - * Type for the value (`a`). - * @returns {State} - * Start state. - */ // eslint-disable-next-line max-params -function factoryTitle(effects, ok, nok, type, markerType, stringType) { - /** @type {NonNullable} */ - let marker - return start - - /** - * Start of title. - * - * ```markdown - * > | "a" - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - if (code === 34 || code === 39 || code === 40) { - effects.enter(type) - effects.enter(markerType) - effects.consume(code) - effects.exit(markerType) - marker = code === 40 ? 41 : code - return begin - } - return nok(code) - } - - /** - * After opening marker. - * - * This is also used at the closing marker. - * - * ```markdown - * > | "a" - * ^ - * ``` - * - * @type {State} - */ - function begin(code) { - if (code === marker) { - effects.enter(markerType) - effects.consume(code) - effects.exit(markerType) - effects.exit(type) - return ok - } - effects.enter(stringType) - return atBreak(code) - } - - /** - * At something, before something else. - * - * ```markdown - * > | "a" - * ^ - * ``` - * - * @type {State} - */ - function atBreak(code) { - if (code === marker) { - effects.exit(stringType) - return begin(marker) - } - if (code === null) { - return nok(code) - } - - // Note: blank lines can’t exist in content. - if (markdownLineEnding(code)) { - // To do: use `space_or_tab_eol_with_options`, connect. - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return factorySpace(effects, atBreak, 'linePrefix') - } - effects.enter('chunkString', { - contentType: 'string' - }) - return inside(code) - } - - /** - * - * - * @type {State} - */ - function inside(code) { - if (code === marker || code === null || markdownLineEnding(code)) { - effects.exit('chunkString') - return atBreak(code) - } - effects.consume(code) - return code === 92 ? escape : inside - } - - /** - * After `\`, at a special character. - * - * ```markdown - * > | "a\*b" - * ^ - * ``` - * - * @type {State} - */ - function escape(code) { - if (code === marker || code === 92) { - effects.consume(code) - return inside - } - return inside(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-whitespace/index.js -/** - * @typedef {import('micromark-util-types').Effects} Effects - * @typedef {import('micromark-util-types').State} State - */ - - - -/** - * Parse spaces and tabs. - * - * There is no `nok` parameter: - * - * * line endings or spaces in markdown are often optional, in which case this - * factory can be used and `ok` will be switched to whether spaces were found - * or not - * * one line ending or space can be detected with - * `markdownLineEndingOrSpace(code)` right before using `factoryWhitespace` - * - * @param {Effects} effects - * Context. - * @param {State} ok - * State switched to when successful. - * @returns - * Start state. - */ -function factoryWhitespace(effects, ok) { - /** @type {boolean} */ - let seen - return start - - /** @type {State} */ - function start(code) { - if (markdownLineEnding(code)) { - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - seen = true - return start - } - if (markdownSpace(code)) { - return factorySpace( - effects, - start, - seen ? 'linePrefix' : 'lineSuffix' - )(code) - } - return ok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-normalize-identifier/index.js -/** - * Normalize an identifier (as found in references, definitions). - * - * Collapses markdown whitespace, trim, and then lower- and uppercase. - * - * Some characters are considered “uppercase”, such as U+03F4 (`ϴ`), but if their - * lowercase counterpart (U+03B8 (`θ`)) is uppercased will result in a different - * uppercase character (U+0398 (`Θ`)). - * So, to get a canonical form, we perform both lower- and uppercase. - * - * Using uppercase last makes sure keys will never interact with default - * prototypal values (such as `constructor`): nothing in the prototype of - * `Object` is uppercase. - * - * @param {string} value - * Identifier to normalize. - * @returns {string} - * Normalized identifier. - */ -function normalizeIdentifier(value) { - return ( - value - // Collapse markdown whitespace. - .replace(/[\t\n\r ]+/g, ' ') - // Trim. - .replace(/^ | $/g, '') - // Some characters are considered “uppercase”, but if their lowercase - // counterpart is uppercased will result in a different uppercase - // character. - // Hence, to get that form, we perform both lower- and uppercase. - // Upper case makes sure keys will not interact with default prototypal - // methods: no method is uppercase. - .toLowerCase() - .toUpperCase() - ) -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/definition.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - - - - - - -/** @type {Construct} */ -const definition = { - name: 'definition', - tokenize: tokenizeDefinition -} - -/** @type {Construct} */ -const titleBefore = { - tokenize: tokenizeTitleBefore, - partial: true -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeDefinition(effects, ok, nok) { - const self = this - /** @type {string} */ - let identifier - return start - - /** - * At start of a definition. - * - * ```markdown - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - // Do not interrupt paragraphs (but do follow definitions). - // To do: do `interrupt` the way `markdown-rs` does. - // To do: parse whitespace the way `markdown-rs` does. - effects.enter('definition') - return before(code) - } - - /** - * After optional whitespace, at `[`. - * - * ```markdown - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function before(code) { - // To do: parse whitespace the way `markdown-rs` does. - - return factoryLabel.call( - self, - effects, - labelAfter, - // Note: we don’t need to reset the way `markdown-rs` does. - nok, - 'definitionLabel', - 'definitionLabelMarker', - 'definitionLabelString' - )(code) - } - - /** - * After label. - * - * ```markdown - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function labelAfter(code) { - identifier = normalizeIdentifier( - self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1) - ) - if (code === 58) { - effects.enter('definitionMarker') - effects.consume(code) - effects.exit('definitionMarker') - return markerAfter - } - return nok(code) - } - - /** - * After marker. - * - * ```markdown - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function markerAfter(code) { - // Note: whitespace is optional. - return markdownLineEndingOrSpace(code) - ? factoryWhitespace(effects, destinationBefore)(code) - : destinationBefore(code) - } - - /** - * Before destination. - * - * ```markdown - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function destinationBefore(code) { - return factoryDestination( - effects, - destinationAfter, - // Note: we don’t need to reset the way `markdown-rs` does. - nok, - 'definitionDestination', - 'definitionDestinationLiteral', - 'definitionDestinationLiteralMarker', - 'definitionDestinationRaw', - 'definitionDestinationString' - )(code) - } - - /** - * After destination. - * - * ```markdown - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function destinationAfter(code) { - return effects.attempt(titleBefore, after, after)(code) - } - - /** - * After definition. - * - * ```markdown - * > | [a]: b - * ^ - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function after(code) { - return markdownSpace(code) - ? factorySpace(effects, afterWhitespace, 'whitespace')(code) - : afterWhitespace(code) - } - - /** - * After definition, after optional whitespace. - * - * ```markdown - * > | [a]: b - * ^ - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function afterWhitespace(code) { - if (code === null || markdownLineEnding(code)) { - effects.exit('definition') - - // Note: we don’t care about uniqueness. - // It’s likely that that doesn’t happen very frequently. - // It is more likely that it wastes precious time. - self.parser.defined.push(identifier) - - // To do: `markdown-rs` interrupt. - // // You’d be interrupting. - // tokenizer.interrupt = true - return ok(code) - } - return nok(code) - } -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeTitleBefore(effects, ok, nok) { - return titleBefore - - /** - * After destination, at whitespace. - * - * ```markdown - * > | [a]: b - * ^ - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function titleBefore(code) { - return markdownLineEndingOrSpace(code) - ? factoryWhitespace(effects, beforeMarker)(code) - : nok(code) - } - - /** - * At title. - * - * ```markdown - * | [a]: b - * > | "c" - * ^ - * ``` - * - * @type {State} - */ - function beforeMarker(code) { - return factoryTitle( - effects, - titleAfter, - nok, - 'definitionTitle', - 'definitionTitleMarker', - 'definitionTitleString' - )(code) - } - - /** - * After title. - * - * ```markdown - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function titleAfter(code) { - return markdownSpace(code) - ? factorySpace(effects, titleAfterOptionalWhitespace, 'whitespace')(code) - : titleAfterOptionalWhitespace(code) - } - - /** - * After title, after optional whitespace. - * - * ```markdown - * > | [a]: b "c" - * ^ - * ``` - * - * @type {State} - */ - function titleAfterOptionalWhitespace(code) { - return code === null || markdownLineEnding(code) ? ok(code) : nok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/code-indented.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const codeIndented = { - name: 'codeIndented', - tokenize: tokenizeCodeIndented -} - -/** @type {Construct} */ -const furtherStart = { - tokenize: tokenizeFurtherStart, - partial: true -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeCodeIndented(effects, ok, nok) { - const self = this - return start - - /** - * Start of code (indented). - * - * > **Parsing note**: it is not needed to check if this first line is a - * > filled line (that it has a non-whitespace character), because blank lines - * > are parsed already, so we never run into that. - * - * ```markdown - * > | aaa - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - // To do: manually check if interrupting like `markdown-rs`. - - effects.enter('codeIndented') - // To do: use an improved `space_or_tab` function like `markdown-rs`, - // so that we can drop the next state. - return factorySpace(effects, afterPrefix, 'linePrefix', 4 + 1)(code) - } - - /** - * At start, after 1 or 4 spaces. - * - * ```markdown - * > | aaa - * ^ - * ``` - * - * @type {State} - */ - function afterPrefix(code) { - const tail = self.events[self.events.length - 1] - return tail && - tail[1].type === 'linePrefix' && - tail[2].sliceSerialize(tail[1], true).length >= 4 - ? atBreak(code) - : nok(code) - } - - /** - * At a break. - * - * ```markdown - * > | aaa - * ^ ^ - * ``` - * - * @type {State} - */ - function atBreak(code) { - if (code === null) { - return after(code) - } - if (markdownLineEnding(code)) { - return effects.attempt(furtherStart, atBreak, after)(code) - } - effects.enter('codeFlowValue') - return inside(code) - } - - /** - * In code content. - * - * ```markdown - * > | aaa - * ^^^^ - * ``` - * - * @type {State} - */ - function inside(code) { - if (code === null || markdownLineEnding(code)) { - effects.exit('codeFlowValue') - return atBreak(code) - } - effects.consume(code) - return inside - } - - /** @type {State} */ - function after(code) { - effects.exit('codeIndented') - // To do: allow interrupting like `markdown-rs`. - // Feel free to interrupt. - // tokenizer.interrupt = false - return ok(code) - } -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeFurtherStart(effects, ok, nok) { - const self = this - return furtherStart - - /** - * At eol, trying to parse another indent. - * - * ```markdown - * > | aaa - * ^ - * | bbb - * ``` - * - * @type {State} - */ - function furtherStart(code) { - // To do: improve `lazy` / `pierce` handling. - // If this is a lazy line, it can’t be code. - if (self.parser.lazy[self.now().line]) { - return nok(code) - } - if (markdownLineEnding(code)) { - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return furtherStart - } - - // To do: the code here in `micromark-js` is a bit different from - // `markdown-rs` because there it can attempt spaces. - // We can’t yet. - // - // To do: use an improved `space_or_tab` function like `markdown-rs`, - // so that we can drop the next state. - return factorySpace(effects, afterPrefix, 'linePrefix', 4 + 1)(code) - } - - /** - * At start, after 1 or 4 spaces. - * - * ```markdown - * > | aaa - * ^ - * ``` - * - * @type {State} - */ - function afterPrefix(code) { - const tail = self.events[self.events.length - 1] - return tail && - tail[1].type === 'linePrefix' && - tail[2].sliceSerialize(tail[1], true).length >= 4 - ? ok(code) - : markdownLineEnding(code) - ? furtherStart(code) - : nok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/heading-atx.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').Resolver} Resolver - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').Token} Token - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - - -/** @type {Construct} */ -const headingAtx = { - name: 'headingAtx', - tokenize: tokenizeHeadingAtx, - resolve: resolveHeadingAtx -} - -/** @type {Resolver} */ -function resolveHeadingAtx(events, context) { - let contentEnd = events.length - 2 - let contentStart = 3 - /** @type {Token} */ - let content - /** @type {Token} */ - let text - - // Prefix whitespace, part of the opening. - if (events[contentStart][1].type === 'whitespace') { - contentStart += 2 - } - - // Suffix whitespace, part of the closing. - if ( - contentEnd - 2 > contentStart && - events[contentEnd][1].type === 'whitespace' - ) { - contentEnd -= 2 - } - if ( - events[contentEnd][1].type === 'atxHeadingSequence' && - (contentStart === contentEnd - 1 || - (contentEnd - 4 > contentStart && - events[contentEnd - 2][1].type === 'whitespace')) - ) { - contentEnd -= contentStart + 1 === contentEnd ? 2 : 4 - } - if (contentEnd > contentStart) { - content = { - type: 'atxHeadingText', - start: events[contentStart][1].start, - end: events[contentEnd][1].end - } - text = { - type: 'chunkText', - start: events[contentStart][1].start, - end: events[contentEnd][1].end, - contentType: 'text' - } - splice(events, contentStart, contentEnd - contentStart + 1, [ - ['enter', content, context], - ['enter', text, context], - ['exit', text, context], - ['exit', content, context] - ]) - } - return events -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeHeadingAtx(effects, ok, nok) { - let size = 0 - return start - - /** - * Start of a heading (atx). - * - * ```markdown - * > | ## aa - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - // To do: parse indent like `markdown-rs`. - effects.enter('atxHeading') - return before(code) - } - - /** - * After optional whitespace, at `#`. - * - * ```markdown - * > | ## aa - * ^ - * ``` - * - * @type {State} - */ - function before(code) { - effects.enter('atxHeadingSequence') - return sequenceOpen(code) - } - - /** - * In opening sequence. - * - * ```markdown - * > | ## aa - * ^ - * ``` - * - * @type {State} - */ - function sequenceOpen(code) { - if (code === 35 && size++ < 6) { - effects.consume(code) - return sequenceOpen - } - - // Always at least one `#`. - if (code === null || markdownLineEndingOrSpace(code)) { - effects.exit('atxHeadingSequence') - return atBreak(code) - } - return nok(code) - } - - /** - * After something, before something else. - * - * ```markdown - * > | ## aa - * ^ - * ``` - * - * @type {State} - */ - function atBreak(code) { - if (code === 35) { - effects.enter('atxHeadingSequence') - return sequenceFurther(code) - } - if (code === null || markdownLineEnding(code)) { - effects.exit('atxHeading') - // To do: interrupt like `markdown-rs`. - // // Feel free to interrupt. - // tokenizer.interrupt = false - return ok(code) - } - if (markdownSpace(code)) { - return factorySpace(effects, atBreak, 'whitespace')(code) - } - - // To do: generate `data` tokens, add the `text` token later. - // Needs edit map, see: `markdown.rs`. - effects.enter('atxHeadingText') - return data(code) - } - - /** - * In further sequence (after whitespace). - * - * Could be normal “visible” hashes in the heading or a final sequence. - * - * ```markdown - * > | ## aa ## - * ^ - * ``` - * - * @type {State} - */ - function sequenceFurther(code) { - if (code === 35) { - effects.consume(code) - return sequenceFurther - } - effects.exit('atxHeadingSequence') - return atBreak(code) - } - - /** - * In text. - * - * ```markdown - * > | ## aa - * ^ - * ``` - * - * @type {State} - */ - function data(code) { - if (code === null || code === 35 || markdownLineEndingOrSpace(code)) { - effects.exit('atxHeadingText') - return atBreak(code) - } - effects.consume(code) - return data - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/setext-underline.js -/** - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').Resolver} Resolver - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const setextUnderline = { - name: 'setextUnderline', - tokenize: tokenizeSetextUnderline, - resolveTo: resolveToSetextUnderline -} - -/** @type {Resolver} */ -function resolveToSetextUnderline(events, context) { - // To do: resolve like `markdown-rs`. - let index = events.length - /** @type {number | undefined} */ - let content - /** @type {number | undefined} */ - let text - /** @type {number | undefined} */ - let definition - - // Find the opening of the content. - // It’ll always exist: we don’t tokenize if it isn’t there. - while (index--) { - if (events[index][0] === 'enter') { - if (events[index][1].type === 'content') { - content = index - break - } - if (events[index][1].type === 'paragraph') { - text = index - } - } - // Exit - else { - if (events[index][1].type === 'content') { - // Remove the content end (if needed we’ll add it later) - events.splice(index, 1) - } - if (!definition && events[index][1].type === 'definition') { - definition = index - } - } - } - const heading = { - type: 'setextHeading', - start: Object.assign({}, events[text][1].start), - end: Object.assign({}, events[events.length - 1][1].end) - } - - // Change the paragraph to setext heading text. - events[text][1].type = 'setextHeadingText' - - // If we have definitions in the content, we’ll keep on having content, - // but we need move it. - if (definition) { - events.splice(text, 0, ['enter', heading, context]) - events.splice(definition + 1, 0, ['exit', events[content][1], context]) - events[content][1].end = Object.assign({}, events[definition][1].end) - } else { - events[content][1] = heading - } - - // Add the heading exit at the end. - events.push(['exit', heading, context]) - return events -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeSetextUnderline(effects, ok, nok) { - const self = this - /** @type {NonNullable} */ - let marker - return start - - /** - * At start of heading (setext) underline. - * - * ```markdown - * | aa - * > | == - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - let index = self.events.length - /** @type {boolean | undefined} */ - let paragraph - // Find an opening. - while (index--) { - // Skip enter/exit of line ending, line prefix, and content. - // We can now either have a definition or a paragraph. - if ( - self.events[index][1].type !== 'lineEnding' && - self.events[index][1].type !== 'linePrefix' && - self.events[index][1].type !== 'content' - ) { - paragraph = self.events[index][1].type === 'paragraph' - break - } - } - - // To do: handle lazy/pierce like `markdown-rs`. - // To do: parse indent like `markdown-rs`. - if (!self.parser.lazy[self.now().line] && (self.interrupt || paragraph)) { - effects.enter('setextHeadingLine') - marker = code - return before(code) - } - return nok(code) - } - - /** - * After optional whitespace, at `-` or `=`. - * - * ```markdown - * | aa - * > | == - * ^ - * ``` - * - * @type {State} - */ - function before(code) { - effects.enter('setextHeadingLineSequence') - return inside(code) - } - - /** - * In sequence. - * - * ```markdown - * | aa - * > | == - * ^ - * ``` - * - * @type {State} - */ - function inside(code) { - if (code === marker) { - effects.consume(code) - return inside - } - effects.exit('setextHeadingLineSequence') - return markdownSpace(code) - ? factorySpace(effects, after, 'lineSuffix')(code) - : after(code) - } - - /** - * After sequence, after optional whitespace. - * - * ```markdown - * | aa - * > | == - * ^ - * ``` - * - * @type {State} - */ - function after(code) { - if (code === null || markdownLineEnding(code)) { - effects.exit('setextHeadingLine') - return ok(code) - } - return nok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-html-tag-name/index.js -/** - * List of lowercase HTML “block” tag names. - * - * The list, when parsing HTML (flow), results in more relaxed rules (condition - * 6). - * Because they are known blocks, the HTML-like syntax doesn’t have to be - * strictly parsed. - * For tag names not in this list, a more strict algorithm (condition 7) is used - * to detect whether the HTML-like syntax is seen as HTML (flow) or not. - * - * This is copied from: - * . - * - * > 👉 **Note**: `search` was added in `CommonMark@0.31`. - */ -const htmlBlockNames = [ - 'address', - 'article', - 'aside', - 'base', - 'basefont', - 'blockquote', - 'body', - 'caption', - 'center', - 'col', - 'colgroup', - 'dd', - 'details', - 'dialog', - 'dir', - 'div', - 'dl', - 'dt', - 'fieldset', - 'figcaption', - 'figure', - 'footer', - 'form', - 'frame', - 'frameset', - 'h1', - 'h2', - 'h3', - 'h4', - 'h5', - 'h6', - 'head', - 'header', - 'hr', - 'html', - 'iframe', - 'legend', - 'li', - 'link', - 'main', - 'menu', - 'menuitem', - 'nav', - 'noframes', - 'ol', - 'optgroup', - 'option', - 'p', - 'param', - 'search', - 'section', - 'summary', - 'table', - 'tbody', - 'td', - 'tfoot', - 'th', - 'thead', - 'title', - 'tr', - 'track', - 'ul' -] - -/** - * List of lowercase HTML “raw” tag names. - * - * The list, when parsing HTML (flow), results in HTML that can include lines - * without exiting, until a closing tag also in this list is found (condition - * 1). - * - * This module is copied from: - * . - * - * > 👉 **Note**: `textarea` was added in `CommonMark@0.30`. - */ -const htmlRawNames = ['pre', 'script', 'style', 'textarea'] - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/html-flow.js -/** - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').Resolver} Resolver - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - - - -/** @type {Construct} */ -const htmlFlow = { - name: 'htmlFlow', - tokenize: tokenizeHtmlFlow, - resolveTo: resolveToHtmlFlow, - concrete: true -} - -/** @type {Construct} */ -const blankLineBefore = { - tokenize: tokenizeBlankLineBefore, - partial: true -} -const nonLazyContinuationStart = { - tokenize: tokenizeNonLazyContinuationStart, - partial: true -} - -/** @type {Resolver} */ -function resolveToHtmlFlow(events) { - let index = events.length - while (index--) { - if (events[index][0] === 'enter' && events[index][1].type === 'htmlFlow') { - break - } - } - if (index > 1 && events[index - 2][1].type === 'linePrefix') { - // Add the prefix start to the HTML token. - events[index][1].start = events[index - 2][1].start - // Add the prefix start to the HTML line token. - events[index + 1][1].start = events[index - 2][1].start - // Remove the line prefix. - events.splice(index - 2, 2) - } - return events -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeHtmlFlow(effects, ok, nok) { - const self = this - /** @type {number} */ - let marker - /** @type {boolean} */ - let closingTag - /** @type {string} */ - let buffer - /** @type {number} */ - let index - /** @type {Code} */ - let markerB - return start - - /** - * Start of HTML (flow). - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - // To do: parse indent like `markdown-rs`. - return before(code) - } - - /** - * At `<`, after optional whitespace. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function before(code) { - effects.enter('htmlFlow') - effects.enter('htmlFlowData') - effects.consume(code) - return open - } - - /** - * After `<`, at tag name or other stuff. - * - * ```markdown - * > | - * ^ - * > | - * ^ - * > | - * ^ - * ``` - * - * @type {State} - */ - function open(code) { - if (code === 33) { - effects.consume(code) - return declarationOpen - } - if (code === 47) { - effects.consume(code) - closingTag = true - return tagCloseStart - } - if (code === 63) { - effects.consume(code) - marker = 3 - // To do: - // tokenizer.concrete = true - // To do: use `markdown-rs` style interrupt. - // While we’re in an instruction instead of a declaration, we’re on a `?` - // right now, so we do need to search for `>`, similar to declarations. - return self.interrupt ? ok : continuationDeclarationInside - } - - // ASCII alphabetical. - if (asciiAlpha(code)) { - effects.consume(code) - // @ts-expect-error: not null. - buffer = String.fromCharCode(code) - return tagName - } - return nok(code) - } - - /** - * After ` | - * ^ - * > | - * ^ - * > | &<]]> - * ^ - * ``` - * - * @type {State} - */ - function declarationOpen(code) { - if (code === 45) { - effects.consume(code) - marker = 2 - return commentOpenInside - } - if (code === 91) { - effects.consume(code) - marker = 5 - index = 0 - return cdataOpenInside - } - - // ASCII alphabetical. - if (asciiAlpha(code)) { - effects.consume(code) - marker = 4 - // // Do not form containers. - // tokenizer.concrete = true - return self.interrupt ? ok : continuationDeclarationInside - } - return nok(code) - } - - /** - * After ` | - * ^ - * ``` - * - * @type {State} - */ - function commentOpenInside(code) { - if (code === 45) { - effects.consume(code) - // // Do not form containers. - // tokenizer.concrete = true - return self.interrupt ? ok : continuationDeclarationInside - } - return nok(code) - } - - /** - * After ` | &<]]> - * ^^^^^^ - * ``` - * - * @type {State} - */ - function cdataOpenInside(code) { - const value = 'CDATA[' - if (code === value.charCodeAt(index++)) { - effects.consume(code) - if (index === value.length) { - // // Do not form containers. - // tokenizer.concrete = true - return self.interrupt ? ok : continuation - } - return cdataOpenInside - } - return nok(code) - } - - /** - * After ` | - * ^ - * ``` - * - * @type {State} - */ - function tagCloseStart(code) { - if (asciiAlpha(code)) { - effects.consume(code) - // @ts-expect-error: not null. - buffer = String.fromCharCode(code) - return tagName - } - return nok(code) - } - - /** - * In tag name. - * - * ```markdown - * > | - * ^^ - * > | - * ^^ - * ``` - * - * @type {State} - */ - function tagName(code) { - if ( - code === null || - code === 47 || - code === 62 || - markdownLineEndingOrSpace(code) - ) { - const slash = code === 47 - const name = buffer.toLowerCase() - if (!slash && !closingTag && htmlRawNames.includes(name)) { - marker = 1 - // // Do not form containers. - // tokenizer.concrete = true - return self.interrupt ? ok(code) : continuation(code) - } - if (htmlBlockNames.includes(buffer.toLowerCase())) { - marker = 6 - if (slash) { - effects.consume(code) - return basicSelfClosing - } - - // // Do not form containers. - // tokenizer.concrete = true - return self.interrupt ? ok(code) : continuation(code) - } - marker = 7 - // Do not support complete HTML when interrupting. - return self.interrupt && !self.parser.lazy[self.now().line] - ? nok(code) - : closingTag - ? completeClosingTagAfter(code) - : completeAttributeNameBefore(code) - } - - // ASCII alphanumerical and `-`. - if (code === 45 || asciiAlphanumeric(code)) { - effects.consume(code) - buffer += String.fromCharCode(code) - return tagName - } - return nok(code) - } - - /** - * After closing slash of a basic tag name. - * - * ```markdown - * > |
    - * ^ - * ``` - * - * @type {State} - */ - function basicSelfClosing(code) { - if (code === 62) { - effects.consume(code) - // // Do not form containers. - // tokenizer.concrete = true - return self.interrupt ? ok : continuation - } - return nok(code) - } - - /** - * After closing slash of a complete tag name. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function completeClosingTagAfter(code) { - if (markdownSpace(code)) { - effects.consume(code) - return completeClosingTagAfter - } - return completeEnd(code) - } - - /** - * At an attribute name. - * - * At first, this state is used after a complete tag name, after whitespace, - * where it expects optional attributes or the end of the tag. - * It is also reused after attributes, when expecting more optional - * attributes. - * - * ```markdown - * > | - * ^ - * > | - * ^ - * > | - * ^ - * > | - * ^ - * > | - * ^ - * ``` - * - * @type {State} - */ - function completeAttributeNameBefore(code) { - if (code === 47) { - effects.consume(code) - return completeEnd - } - - // ASCII alphanumerical and `:` and `_`. - if (code === 58 || code === 95 || asciiAlpha(code)) { - effects.consume(code) - return completeAttributeName - } - if (markdownSpace(code)) { - effects.consume(code) - return completeAttributeNameBefore - } - return completeEnd(code) - } - - /** - * In attribute name. - * - * ```markdown - * > | - * ^ - * > | - * ^ - * > | - * ^ - * ``` - * - * @type {State} - */ - function completeAttributeName(code) { - // ASCII alphanumerical and `-`, `.`, `:`, and `_`. - if ( - code === 45 || - code === 46 || - code === 58 || - code === 95 || - asciiAlphanumeric(code) - ) { - effects.consume(code) - return completeAttributeName - } - return completeAttributeNameAfter(code) - } - - /** - * After attribute name, at an optional initializer, the end of the tag, or - * whitespace. - * - * ```markdown - * > | - * ^ - * > | - * ^ - * ``` - * - * @type {State} - */ - function completeAttributeNameAfter(code) { - if (code === 61) { - effects.consume(code) - return completeAttributeValueBefore - } - if (markdownSpace(code)) { - effects.consume(code) - return completeAttributeNameAfter - } - return completeAttributeNameBefore(code) - } - - /** - * Before unquoted, double quoted, or single quoted attribute value, allowing - * whitespace. - * - * ```markdown - * > | - * ^ - * > | - * ^ - * ``` - * - * @type {State} - */ - function completeAttributeValueBefore(code) { - if ( - code === null || - code === 60 || - code === 61 || - code === 62 || - code === 96 - ) { - return nok(code) - } - if (code === 34 || code === 39) { - effects.consume(code) - markerB = code - return completeAttributeValueQuoted - } - if (markdownSpace(code)) { - effects.consume(code) - return completeAttributeValueBefore - } - return completeAttributeValueUnquoted(code) - } - - /** - * In double or single quoted attribute value. - * - * ```markdown - * > | - * ^ - * > | - * ^ - * ``` - * - * @type {State} - */ - function completeAttributeValueQuoted(code) { - if (code === markerB) { - effects.consume(code) - markerB = null - return completeAttributeValueQuotedAfter - } - if (code === null || markdownLineEnding(code)) { - return nok(code) - } - effects.consume(code) - return completeAttributeValueQuoted - } - - /** - * In unquoted attribute value. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function completeAttributeValueUnquoted(code) { - if ( - code === null || - code === 34 || - code === 39 || - code === 47 || - code === 60 || - code === 61 || - code === 62 || - code === 96 || - markdownLineEndingOrSpace(code) - ) { - return completeAttributeNameAfter(code) - } - effects.consume(code) - return completeAttributeValueUnquoted - } - - /** - * After double or single quoted attribute value, before whitespace or the - * end of the tag. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function completeAttributeValueQuotedAfter(code) { - if (code === 47 || code === 62 || markdownSpace(code)) { - return completeAttributeNameBefore(code) - } - return nok(code) - } - - /** - * In certain circumstances of a complete tag where only an `>` is allowed. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function completeEnd(code) { - if (code === 62) { - effects.consume(code) - return completeAfter - } - return nok(code) - } - - /** - * After `>` in a complete tag. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function completeAfter(code) { - if (code === null || markdownLineEnding(code)) { - // // Do not form containers. - // tokenizer.concrete = true - return continuation(code) - } - if (markdownSpace(code)) { - effects.consume(code) - return completeAfter - } - return nok(code) - } - - /** - * In continuation of any HTML kind. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function continuation(code) { - if (code === 45 && marker === 2) { - effects.consume(code) - return continuationCommentInside - } - if (code === 60 && marker === 1) { - effects.consume(code) - return continuationRawTagOpen - } - if (code === 62 && marker === 4) { - effects.consume(code) - return continuationClose - } - if (code === 63 && marker === 3) { - effects.consume(code) - return continuationDeclarationInside - } - if (code === 93 && marker === 5) { - effects.consume(code) - return continuationCdataInside - } - if (markdownLineEnding(code) && (marker === 6 || marker === 7)) { - effects.exit('htmlFlowData') - return effects.check( - blankLineBefore, - continuationAfter, - continuationStart - )(code) - } - if (code === null || markdownLineEnding(code)) { - effects.exit('htmlFlowData') - return continuationStart(code) - } - effects.consume(code) - return continuation - } - - /** - * In continuation, at eol. - * - * ```markdown - * > | - * ^ - * | asd - * ``` - * - * @type {State} - */ - function continuationStart(code) { - return effects.check( - nonLazyContinuationStart, - continuationStartNonLazy, - continuationAfter - )(code) - } - - /** - * In continuation, at eol, before non-lazy content. - * - * ```markdown - * > | - * ^ - * | asd - * ``` - * - * @type {State} - */ - function continuationStartNonLazy(code) { - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return continuationBefore - } - - /** - * In continuation, before non-lazy content. - * - * ```markdown - * | - * > | asd - * ^ - * ``` - * - * @type {State} - */ - function continuationBefore(code) { - if (code === null || markdownLineEnding(code)) { - return continuationStart(code) - } - effects.enter('htmlFlowData') - return continuation(code) - } - - /** - * In comment continuation, after one `-`, expecting another. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function continuationCommentInside(code) { - if (code === 45) { - effects.consume(code) - return continuationDeclarationInside - } - return continuation(code) - } - - /** - * In raw continuation, after `<`, at `/`. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function continuationRawTagOpen(code) { - if (code === 47) { - effects.consume(code) - buffer = '' - return continuationRawEndTag - } - return continuation(code) - } - - /** - * In raw continuation, after ` | - * ^^^^^^ - * ``` - * - * @type {State} - */ - function continuationRawEndTag(code) { - if (code === 62) { - const name = buffer.toLowerCase() - if (htmlRawNames.includes(name)) { - effects.consume(code) - return continuationClose - } - return continuation(code) - } - if (asciiAlpha(code) && buffer.length < 8) { - effects.consume(code) - // @ts-expect-error: not null. - buffer += String.fromCharCode(code) - return continuationRawEndTag - } - return continuation(code) - } - - /** - * In cdata continuation, after `]`, expecting `]>`. - * - * ```markdown - * > | &<]]> - * ^ - * ``` - * - * @type {State} - */ - function continuationCdataInside(code) { - if (code === 93) { - effects.consume(code) - return continuationDeclarationInside - } - return continuation(code) - } - - /** - * In declaration or instruction continuation, at `>`. - * - * ```markdown - * > | - * ^ - * > | - * ^ - * > | - * ^ - * > | - * ^ - * > | &<]]> - * ^ - * ``` - * - * @type {State} - */ - function continuationDeclarationInside(code) { - if (code === 62) { - effects.consume(code) - return continuationClose - } - - // More dashes. - if (code === 45 && marker === 2) { - effects.consume(code) - return continuationDeclarationInside - } - return continuation(code) - } - - /** - * In closed continuation: everything we get until the eol/eof is part of it. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function continuationClose(code) { - if (code === null || markdownLineEnding(code)) { - effects.exit('htmlFlowData') - return continuationAfter(code) - } - effects.consume(code) - return continuationClose - } - - /** - * Done. - * - * ```markdown - * > | - * ^ - * ``` - * - * @type {State} - */ - function continuationAfter(code) { - effects.exit('htmlFlow') - // // Feel free to interrupt. - // tokenizer.interrupt = false - // // No longer concrete. - // tokenizer.concrete = false - return ok(code) - } -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeNonLazyContinuationStart(effects, ok, nok) { - const self = this - return start - - /** - * At eol, before continuation. - * - * ```markdown - * > | * ```js - * ^ - * | b - * ``` - * - * @type {State} - */ - function start(code) { - if (markdownLineEnding(code)) { - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return after - } - return nok(code) - } - - /** - * A continuation. - * - * ```markdown - * | * ```js - * > | b - * ^ - * ``` - * - * @type {State} - */ - function after(code) { - return self.parser.lazy[self.now().line] ? nok(code) : ok(code) - } -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeBlankLineBefore(effects, ok, nok) { - return start - - /** - * Before eol, expecting blank line. - * - * ```markdown - * > |
    - * ^ - * | - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return effects.attempt(blankLine, ok, nok) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/code-fenced.js -/** - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const nonLazyContinuation = { - tokenize: tokenizeNonLazyContinuation, - partial: true -} - -/** @type {Construct} */ -const codeFenced = { - name: 'codeFenced', - tokenize: tokenizeCodeFenced, - concrete: true -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeCodeFenced(effects, ok, nok) { - const self = this - /** @type {Construct} */ - const closeStart = { - tokenize: tokenizeCloseStart, - partial: true - } - let initialPrefix = 0 - let sizeOpen = 0 - /** @type {NonNullable} */ - let marker - return start - - /** - * Start of code. - * - * ```markdown - * > | ~~~js - * ^ - * | alert(1) - * | ~~~ - * ``` - * - * @type {State} - */ - function start(code) { - // To do: parse whitespace like `markdown-rs`. - return beforeSequenceOpen(code) - } - - /** - * In opening fence, after prefix, at sequence. - * - * ```markdown - * > | ~~~js - * ^ - * | alert(1) - * | ~~~ - * ``` - * - * @type {State} - */ - function beforeSequenceOpen(code) { - const tail = self.events[self.events.length - 1] - initialPrefix = - tail && tail[1].type === 'linePrefix' - ? tail[2].sliceSerialize(tail[1], true).length - : 0 - marker = code - effects.enter('codeFenced') - effects.enter('codeFencedFence') - effects.enter('codeFencedFenceSequence') - return sequenceOpen(code) - } - - /** - * In opening fence sequence. - * - * ```markdown - * > | ~~~js - * ^ - * | alert(1) - * | ~~~ - * ``` - * - * @type {State} - */ - function sequenceOpen(code) { - if (code === marker) { - sizeOpen++ - effects.consume(code) - return sequenceOpen - } - if (sizeOpen < 3) { - return nok(code) - } - effects.exit('codeFencedFenceSequence') - return markdownSpace(code) - ? factorySpace(effects, infoBefore, 'whitespace')(code) - : infoBefore(code) - } - - /** - * In opening fence, after the sequence (and optional whitespace), before info. - * - * ```markdown - * > | ~~~js - * ^ - * | alert(1) - * | ~~~ - * ``` - * - * @type {State} - */ - function infoBefore(code) { - if (code === null || markdownLineEnding(code)) { - effects.exit('codeFencedFence') - return self.interrupt - ? ok(code) - : effects.check(nonLazyContinuation, atNonLazyBreak, after)(code) - } - effects.enter('codeFencedFenceInfo') - effects.enter('chunkString', { - contentType: 'string' - }) - return info(code) - } - - /** - * In info. - * - * ```markdown - * > | ~~~js - * ^ - * | alert(1) - * | ~~~ - * ``` - * - * @type {State} - */ - function info(code) { - if (code === null || markdownLineEnding(code)) { - effects.exit('chunkString') - effects.exit('codeFencedFenceInfo') - return infoBefore(code) - } - if (markdownSpace(code)) { - effects.exit('chunkString') - effects.exit('codeFencedFenceInfo') - return factorySpace(effects, metaBefore, 'whitespace')(code) - } - if (code === 96 && code === marker) { - return nok(code) - } - effects.consume(code) - return info - } - - /** - * In opening fence, after info and whitespace, before meta. - * - * ```markdown - * > | ~~~js eval - * ^ - * | alert(1) - * | ~~~ - * ``` - * - * @type {State} - */ - function metaBefore(code) { - if (code === null || markdownLineEnding(code)) { - return infoBefore(code) - } - effects.enter('codeFencedFenceMeta') - effects.enter('chunkString', { - contentType: 'string' - }) - return meta(code) - } - - /** - * In meta. - * - * ```markdown - * > | ~~~js eval - * ^ - * | alert(1) - * | ~~~ - * ``` - * - * @type {State} - */ - function meta(code) { - if (code === null || markdownLineEnding(code)) { - effects.exit('chunkString') - effects.exit('codeFencedFenceMeta') - return infoBefore(code) - } - if (code === 96 && code === marker) { - return nok(code) - } - effects.consume(code) - return meta - } - - /** - * At eol/eof in code, before a non-lazy closing fence or content. - * - * ```markdown - * > | ~~~js - * ^ - * > | alert(1) - * ^ - * | ~~~ - * ``` - * - * @type {State} - */ - function atNonLazyBreak(code) { - return effects.attempt(closeStart, after, contentBefore)(code) - } - - /** - * Before code content, not a closing fence, at eol. - * - * ```markdown - * | ~~~js - * > | alert(1) - * ^ - * | ~~~ - * ``` - * - * @type {State} - */ - function contentBefore(code) { - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return contentStart - } - - /** - * Before code content, not a closing fence. - * - * ```markdown - * | ~~~js - * > | alert(1) - * ^ - * | ~~~ - * ``` - * - * @type {State} - */ - function contentStart(code) { - return initialPrefix > 0 && markdownSpace(code) - ? factorySpace( - effects, - beforeContentChunk, - 'linePrefix', - initialPrefix + 1 - )(code) - : beforeContentChunk(code) - } - - /** - * Before code content, after optional prefix. - * - * ```markdown - * | ~~~js - * > | alert(1) - * ^ - * | ~~~ - * ``` - * - * @type {State} - */ - function beforeContentChunk(code) { - if (code === null || markdownLineEnding(code)) { - return effects.check(nonLazyContinuation, atNonLazyBreak, after)(code) - } - effects.enter('codeFlowValue') - return contentChunk(code) - } - - /** - * In code content. - * - * ```markdown - * | ~~~js - * > | alert(1) - * ^^^^^^^^ - * | ~~~ - * ``` - * - * @type {State} - */ - function contentChunk(code) { - if (code === null || markdownLineEnding(code)) { - effects.exit('codeFlowValue') - return beforeContentChunk(code) - } - effects.consume(code) - return contentChunk - } - - /** - * After code. - * - * ```markdown - * | ~~~js - * | alert(1) - * > | ~~~ - * ^ - * ``` - * - * @type {State} - */ - function after(code) { - effects.exit('codeFenced') - return ok(code) - } - - /** - * @this {TokenizeContext} - * @type {Tokenizer} - */ - function tokenizeCloseStart(effects, ok, nok) { - let size = 0 - return startBefore - - /** - * - * - * @type {State} - */ - function startBefore(code) { - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return start - } - - /** - * Before closing fence, at optional whitespace. - * - * ```markdown - * | ~~~js - * | alert(1) - * > | ~~~ - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - // Always populated by defaults. - - // To do: `enter` here or in next state? - effects.enter('codeFencedFence') - return markdownSpace(code) - ? factorySpace( - effects, - beforeSequenceClose, - 'linePrefix', - self.parser.constructs.disable.null.includes('codeIndented') - ? undefined - : 4 - )(code) - : beforeSequenceClose(code) - } - - /** - * In closing fence, after optional whitespace, at sequence. - * - * ```markdown - * | ~~~js - * | alert(1) - * > | ~~~ - * ^ - * ``` - * - * @type {State} - */ - function beforeSequenceClose(code) { - if (code === marker) { - effects.enter('codeFencedFenceSequence') - return sequenceClose(code) - } - return nok(code) - } - - /** - * In closing fence sequence. - * - * ```markdown - * | ~~~js - * | alert(1) - * > | ~~~ - * ^ - * ``` - * - * @type {State} - */ - function sequenceClose(code) { - if (code === marker) { - size++ - effects.consume(code) - return sequenceClose - } - if (size >= sizeOpen) { - effects.exit('codeFencedFenceSequence') - return markdownSpace(code) - ? factorySpace(effects, sequenceCloseAfter, 'whitespace')(code) - : sequenceCloseAfter(code) - } - return nok(code) - } - - /** - * After closing fence sequence, after optional whitespace. - * - * ```markdown - * | ~~~js - * | alert(1) - * > | ~~~ - * ^ - * ``` - * - * @type {State} - */ - function sequenceCloseAfter(code) { - if (code === null || markdownLineEnding(code)) { - effects.exit('codeFencedFence') - return ok(code) - } - return nok(code) - } - } -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeNonLazyContinuation(effects, ok, nok) { - const self = this - return start - - /** - * - * - * @type {State} - */ - function start(code) { - if (code === null) { - return nok(code) - } - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return lineStart - } - - /** - * - * - * @type {State} - */ - function lineStart(code) { - return self.parser.lazy[self.now().line] ? nok(code) : ok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/character-entities/index.js -/** - * Map of named character references. - * - * @type {Record} - */ -const characterEntities = { - AElig: 'Æ', - AMP: '&', - Aacute: 'Á', - Abreve: 'Ă', - Acirc: 'Â', - Acy: 'А', - Afr: '𝔄', - Agrave: 'À', - Alpha: 'Α', - Amacr: 'Ā', - And: '⩓', - Aogon: 'Ą', - Aopf: '𝔸', - ApplyFunction: '⁡', - Aring: 'Å', - Ascr: '𝒜', - Assign: '≔', - Atilde: 'Ã', - Auml: 'Ä', - Backslash: '∖', - Barv: '⫧', - Barwed: '⌆', - Bcy: 'Б', - Because: '∵', - Bernoullis: 'ℬ', - Beta: 'Β', - Bfr: '𝔅', - Bopf: '𝔹', - Breve: '˘', - Bscr: 'ℬ', - Bumpeq: '≎', - CHcy: 'Ч', - COPY: '©', - Cacute: 'Ć', - Cap: '⋒', - CapitalDifferentialD: 'ⅅ', - Cayleys: 'ℭ', - Ccaron: 'Č', - Ccedil: 'Ç', - Ccirc: 'Ĉ', - Cconint: '∰', - Cdot: 'Ċ', - Cedilla: '¸', - CenterDot: '·', - Cfr: 'ℭ', - Chi: 'Χ', - CircleDot: '⊙', - CircleMinus: '⊖', - CirclePlus: '⊕', - CircleTimes: '⊗', - ClockwiseContourIntegral: '∲', - CloseCurlyDoubleQuote: '”', - CloseCurlyQuote: '’', - Colon: '∷', - Colone: '⩴', - Congruent: '≡', - Conint: '∯', - ContourIntegral: '∮', - Copf: 'ℂ', - Coproduct: '∐', - CounterClockwiseContourIntegral: '∳', - Cross: '⨯', - Cscr: '𝒞', - Cup: '⋓', - CupCap: '≍', - DD: 'ⅅ', - DDotrahd: '⤑', - DJcy: 'Ђ', - DScy: 'Ѕ', - DZcy: 'Џ', - Dagger: '‡', - Darr: '↡', - Dashv: '⫤', - Dcaron: 'Ď', - Dcy: 'Д', - Del: '∇', - Delta: 'Δ', - Dfr: '𝔇', - DiacriticalAcute: '´', - DiacriticalDot: '˙', - DiacriticalDoubleAcute: '˝', - DiacriticalGrave: '`', - DiacriticalTilde: '˜', - Diamond: '⋄', - DifferentialD: 'ⅆ', - Dopf: '𝔻', - Dot: '¨', - DotDot: '⃜', - DotEqual: '≐', - DoubleContourIntegral: '∯', - DoubleDot: '¨', - DoubleDownArrow: '⇓', - DoubleLeftArrow: '⇐', - DoubleLeftRightArrow: '⇔', - DoubleLeftTee: '⫤', - DoubleLongLeftArrow: '⟸', - DoubleLongLeftRightArrow: '⟺', - DoubleLongRightArrow: '⟹', - DoubleRightArrow: '⇒', - DoubleRightTee: '⊨', - DoubleUpArrow: '⇑', - DoubleUpDownArrow: '⇕', - DoubleVerticalBar: '∥', - DownArrow: '↓', - DownArrowBar: '⤓', - DownArrowUpArrow: '⇵', - DownBreve: '̑', - DownLeftRightVector: '⥐', - DownLeftTeeVector: '⥞', - DownLeftVector: '↽', - DownLeftVectorBar: '⥖', - DownRightTeeVector: '⥟', - DownRightVector: '⇁', - DownRightVectorBar: '⥗', - DownTee: '⊤', - DownTeeArrow: '↧', - Downarrow: '⇓', - Dscr: '𝒟', - Dstrok: 'Đ', - ENG: 'Ŋ', - ETH: 'Ð', - Eacute: 'É', - Ecaron: 'Ě', - Ecirc: 'Ê', - Ecy: 'Э', - Edot: 'Ė', - Efr: '𝔈', - Egrave: 'È', - Element: '∈', - Emacr: 'Ē', - EmptySmallSquare: '◻', - EmptyVerySmallSquare: '▫', - Eogon: 'Ę', - Eopf: '𝔼', - Epsilon: 'Ε', - Equal: '⩵', - EqualTilde: '≂', - Equilibrium: '⇌', - Escr: 'ℰ', - Esim: '⩳', - Eta: 'Η', - Euml: 'Ë', - Exists: '∃', - ExponentialE: 'ⅇ', - Fcy: 'Ф', - Ffr: '𝔉', - FilledSmallSquare: '◼', - FilledVerySmallSquare: '▪', - Fopf: '𝔽', - ForAll: '∀', - Fouriertrf: 'ℱ', - Fscr: 'ℱ', - GJcy: 'Ѓ', - GT: '>', - Gamma: 'Γ', - Gammad: 'Ϝ', - Gbreve: 'Ğ', - Gcedil: 'Ģ', - Gcirc: 'Ĝ', - Gcy: 'Г', - Gdot: 'Ġ', - Gfr: '𝔊', - Gg: '⋙', - Gopf: '𝔾', - GreaterEqual: '≥', - GreaterEqualLess: '⋛', - GreaterFullEqual: '≧', - GreaterGreater: '⪢', - GreaterLess: '≷', - GreaterSlantEqual: '⩾', - GreaterTilde: '≳', - Gscr: '𝒢', - Gt: '≫', - HARDcy: 'Ъ', - Hacek: 'ˇ', - Hat: '^', - Hcirc: 'Ĥ', - Hfr: 'ℌ', - HilbertSpace: 'ℋ', - Hopf: 'ℍ', - HorizontalLine: '─', - Hscr: 'ℋ', - Hstrok: 'Ħ', - HumpDownHump: '≎', - HumpEqual: '≏', - IEcy: 'Е', - IJlig: 'IJ', - IOcy: 'Ё', - Iacute: 'Í', - Icirc: 'Î', - Icy: 'И', - Idot: 'İ', - Ifr: 'ℑ', - Igrave: 'Ì', - Im: 'ℑ', - Imacr: 'Ī', - ImaginaryI: 'ⅈ', - Implies: '⇒', - Int: '∬', - Integral: '∫', - Intersection: '⋂', - InvisibleComma: '⁣', - InvisibleTimes: '⁢', - Iogon: 'Į', - Iopf: '𝕀', - Iota: 'Ι', - Iscr: 'ℐ', - Itilde: 'Ĩ', - Iukcy: 'І', - Iuml: 'Ï', - Jcirc: 'Ĵ', - Jcy: 'Й', - Jfr: '𝔍', - Jopf: '𝕁', - Jscr: '𝒥', - Jsercy: 'Ј', - Jukcy: 'Є', - KHcy: 'Х', - KJcy: 'Ќ', - Kappa: 'Κ', - Kcedil: 'Ķ', - Kcy: 'К', - Kfr: '𝔎', - Kopf: '𝕂', - Kscr: '𝒦', - LJcy: 'Љ', - LT: '<', - Lacute: 'Ĺ', - Lambda: 'Λ', - Lang: '⟪', - Laplacetrf: 'ℒ', - Larr: '↞', - Lcaron: 'Ľ', - Lcedil: 'Ļ', - Lcy: 'Л', - LeftAngleBracket: '⟨', - LeftArrow: '←', - LeftArrowBar: '⇤', - LeftArrowRightArrow: '⇆', - LeftCeiling: '⌈', - LeftDoubleBracket: '⟦', - LeftDownTeeVector: '⥡', - LeftDownVector: '⇃', - LeftDownVectorBar: '⥙', - LeftFloor: '⌊', - LeftRightArrow: '↔', - LeftRightVector: '⥎', - LeftTee: '⊣', - LeftTeeArrow: '↤', - LeftTeeVector: '⥚', - LeftTriangle: '⊲', - LeftTriangleBar: '⧏', - LeftTriangleEqual: '⊴', - LeftUpDownVector: '⥑', - LeftUpTeeVector: '⥠', - LeftUpVector: '↿', - LeftUpVectorBar: '⥘', - LeftVector: '↼', - LeftVectorBar: '⥒', - Leftarrow: '⇐', - Leftrightarrow: '⇔', - LessEqualGreater: '⋚', - LessFullEqual: '≦', - LessGreater: '≶', - LessLess: '⪡', - LessSlantEqual: '⩽', - LessTilde: '≲', - Lfr: '𝔏', - Ll: '⋘', - Lleftarrow: '⇚', - Lmidot: 'Ŀ', - LongLeftArrow: '⟵', - LongLeftRightArrow: '⟷', - LongRightArrow: '⟶', - Longleftarrow: '⟸', - Longleftrightarrow: '⟺', - Longrightarrow: '⟹', - Lopf: '𝕃', - LowerLeftArrow: '↙', - LowerRightArrow: '↘', - Lscr: 'ℒ', - Lsh: '↰', - Lstrok: 'Ł', - Lt: '≪', - Map: '⤅', - Mcy: 'М', - MediumSpace: ' ', - Mellintrf: 'ℳ', - Mfr: '𝔐', - MinusPlus: '∓', - Mopf: '𝕄', - Mscr: 'ℳ', - Mu: 'Μ', - NJcy: 'Њ', - Nacute: 'Ń', - Ncaron: 'Ň', - Ncedil: 'Ņ', - Ncy: 'Н', - NegativeMediumSpace: '​', - NegativeThickSpace: '​', - NegativeThinSpace: '​', - NegativeVeryThinSpace: '​', - NestedGreaterGreater: '≫', - NestedLessLess: '≪', - NewLine: '\n', - Nfr: '𝔑', - NoBreak: '⁠', - NonBreakingSpace: ' ', - Nopf: 'ℕ', - Not: '⫬', - NotCongruent: '≢', - NotCupCap: '≭', - NotDoubleVerticalBar: '∦', - NotElement: '∉', - NotEqual: '≠', - NotEqualTilde: '≂̸', - NotExists: '∄', - NotGreater: '≯', - NotGreaterEqual: '≱', - NotGreaterFullEqual: '≧̸', - NotGreaterGreater: '≫̸', - NotGreaterLess: '≹', - NotGreaterSlantEqual: '⩾̸', - NotGreaterTilde: '≵', - NotHumpDownHump: '≎̸', - NotHumpEqual: '≏̸', - NotLeftTriangle: '⋪', - NotLeftTriangleBar: '⧏̸', - NotLeftTriangleEqual: '⋬', - NotLess: '≮', - NotLessEqual: '≰', - NotLessGreater: '≸', - NotLessLess: '≪̸', - NotLessSlantEqual: '⩽̸', - NotLessTilde: '≴', - NotNestedGreaterGreater: '⪢̸', - NotNestedLessLess: '⪡̸', - NotPrecedes: '⊀', - NotPrecedesEqual: '⪯̸', - NotPrecedesSlantEqual: '⋠', - NotReverseElement: '∌', - NotRightTriangle: '⋫', - NotRightTriangleBar: '⧐̸', - NotRightTriangleEqual: '⋭', - NotSquareSubset: '⊏̸', - NotSquareSubsetEqual: '⋢', - NotSquareSuperset: '⊐̸', - NotSquareSupersetEqual: '⋣', - NotSubset: '⊂⃒', - NotSubsetEqual: '⊈', - NotSucceeds: '⊁', - NotSucceedsEqual: '⪰̸', - NotSucceedsSlantEqual: '⋡', - NotSucceedsTilde: '≿̸', - NotSuperset: '⊃⃒', - NotSupersetEqual: '⊉', - NotTilde: '≁', - NotTildeEqual: '≄', - NotTildeFullEqual: '≇', - NotTildeTilde: '≉', - NotVerticalBar: '∤', - Nscr: '𝒩', - Ntilde: 'Ñ', - Nu: 'Ν', - OElig: 'Œ', - Oacute: 'Ó', - Ocirc: 'Ô', - Ocy: 'О', - Odblac: 'Ő', - Ofr: '𝔒', - Ograve: 'Ò', - Omacr: 'Ō', - Omega: 'Ω', - Omicron: 'Ο', - Oopf: '𝕆', - OpenCurlyDoubleQuote: '“', - OpenCurlyQuote: '‘', - Or: '⩔', - Oscr: '𝒪', - Oslash: 'Ø', - Otilde: 'Õ', - Otimes: '⨷', - Ouml: 'Ö', - OverBar: '‾', - OverBrace: '⏞', - OverBracket: '⎴', - OverParenthesis: '⏜', - PartialD: '∂', - Pcy: 'П', - Pfr: '𝔓', - Phi: 'Φ', - Pi: 'Π', - PlusMinus: '±', - Poincareplane: 'ℌ', - Popf: 'ℙ', - Pr: '⪻', - Precedes: '≺', - PrecedesEqual: '⪯', - PrecedesSlantEqual: '≼', - PrecedesTilde: '≾', - Prime: '″', - Product: '∏', - Proportion: '∷', - Proportional: '∝', - Pscr: '𝒫', - Psi: 'Ψ', - QUOT: '"', - Qfr: '𝔔', - Qopf: 'ℚ', - Qscr: '𝒬', - RBarr: '⤐', - REG: '®', - Racute: 'Ŕ', - Rang: '⟫', - Rarr: '↠', - Rarrtl: '⤖', - Rcaron: 'Ř', - Rcedil: 'Ŗ', - Rcy: 'Р', - Re: 'ℜ', - ReverseElement: '∋', - ReverseEquilibrium: '⇋', - ReverseUpEquilibrium: '⥯', - Rfr: 'ℜ', - Rho: 'Ρ', - RightAngleBracket: '⟩', - RightArrow: '→', - RightArrowBar: '⇥', - RightArrowLeftArrow: '⇄', - RightCeiling: '⌉', - RightDoubleBracket: '⟧', - RightDownTeeVector: '⥝', - RightDownVector: '⇂', - RightDownVectorBar: '⥕', - RightFloor: '⌋', - RightTee: '⊢', - RightTeeArrow: '↦', - RightTeeVector: '⥛', - RightTriangle: '⊳', - RightTriangleBar: '⧐', - RightTriangleEqual: '⊵', - RightUpDownVector: '⥏', - RightUpTeeVector: '⥜', - RightUpVector: '↾', - RightUpVectorBar: '⥔', - RightVector: '⇀', - RightVectorBar: '⥓', - Rightarrow: '⇒', - Ropf: 'ℝ', - RoundImplies: '⥰', - Rrightarrow: '⇛', - Rscr: 'ℛ', - Rsh: '↱', - RuleDelayed: '⧴', - SHCHcy: 'Щ', - SHcy: 'Ш', - SOFTcy: 'Ь', - Sacute: 'Ś', - Sc: '⪼', - Scaron: 'Š', - Scedil: 'Ş', - Scirc: 'Ŝ', - Scy: 'С', - Sfr: '𝔖', - ShortDownArrow: '↓', - ShortLeftArrow: '←', - ShortRightArrow: '→', - ShortUpArrow: '↑', - Sigma: 'Σ', - SmallCircle: '∘', - Sopf: '𝕊', - Sqrt: '√', - Square: '□', - SquareIntersection: '⊓', - SquareSubset: '⊏', - SquareSubsetEqual: '⊑', - SquareSuperset: '⊐', - SquareSupersetEqual: '⊒', - SquareUnion: '⊔', - Sscr: '𝒮', - Star: '⋆', - Sub: '⋐', - Subset: '⋐', - SubsetEqual: '⊆', - Succeeds: '≻', - SucceedsEqual: '⪰', - SucceedsSlantEqual: '≽', - SucceedsTilde: '≿', - SuchThat: '∋', - Sum: '∑', - Sup: '⋑', - Superset: '⊃', - SupersetEqual: '⊇', - Supset: '⋑', - THORN: 'Þ', - TRADE: '™', - TSHcy: 'Ћ', - TScy: 'Ц', - Tab: '\t', - Tau: 'Τ', - Tcaron: 'Ť', - Tcedil: 'Ţ', - Tcy: 'Т', - Tfr: '𝔗', - Therefore: '∴', - Theta: 'Θ', - ThickSpace: '  ', - ThinSpace: ' ', - Tilde: '∼', - TildeEqual: '≃', - TildeFullEqual: '≅', - TildeTilde: '≈', - Topf: '𝕋', - TripleDot: '⃛', - Tscr: '𝒯', - Tstrok: 'Ŧ', - Uacute: 'Ú', - Uarr: '↟', - Uarrocir: '⥉', - Ubrcy: 'Ў', - Ubreve: 'Ŭ', - Ucirc: 'Û', - Ucy: 'У', - Udblac: 'Ű', - Ufr: '𝔘', - Ugrave: 'Ù', - Umacr: 'Ū', - UnderBar: '_', - UnderBrace: '⏟', - UnderBracket: '⎵', - UnderParenthesis: '⏝', - Union: '⋃', - UnionPlus: '⊎', - Uogon: 'Ų', - Uopf: '𝕌', - UpArrow: '↑', - UpArrowBar: '⤒', - UpArrowDownArrow: '⇅', - UpDownArrow: '↕', - UpEquilibrium: '⥮', - UpTee: '⊥', - UpTeeArrow: '↥', - Uparrow: '⇑', - Updownarrow: '⇕', - UpperLeftArrow: '↖', - UpperRightArrow: '↗', - Upsi: 'ϒ', - Upsilon: 'Υ', - Uring: 'Ů', - Uscr: '𝒰', - Utilde: 'Ũ', - Uuml: 'Ü', - VDash: '⊫', - Vbar: '⫫', - Vcy: 'В', - Vdash: '⊩', - Vdashl: '⫦', - Vee: '⋁', - Verbar: '‖', - Vert: '‖', - VerticalBar: '∣', - VerticalLine: '|', - VerticalSeparator: '❘', - VerticalTilde: '≀', - VeryThinSpace: ' ', - Vfr: '𝔙', - Vopf: '𝕍', - Vscr: '𝒱', - Vvdash: '⊪', - Wcirc: 'Ŵ', - Wedge: '⋀', - Wfr: '𝔚', - Wopf: '𝕎', - Wscr: '𝒲', - Xfr: '𝔛', - Xi: 'Ξ', - Xopf: '𝕏', - Xscr: '𝒳', - YAcy: 'Я', - YIcy: 'Ї', - YUcy: 'Ю', - Yacute: 'Ý', - Ycirc: 'Ŷ', - Ycy: 'Ы', - Yfr: '𝔜', - Yopf: '𝕐', - Yscr: '𝒴', - Yuml: 'Ÿ', - ZHcy: 'Ж', - Zacute: 'Ź', - Zcaron: 'Ž', - Zcy: 'З', - Zdot: 'Ż', - ZeroWidthSpace: '​', - Zeta: 'Ζ', - Zfr: 'ℨ', - Zopf: 'ℤ', - Zscr: '𝒵', - aacute: 'á', - abreve: 'ă', - ac: '∾', - acE: '∾̳', - acd: '∿', - acirc: 'â', - acute: '´', - acy: 'а', - aelig: 'æ', - af: '⁡', - afr: '𝔞', - agrave: 'à', - alefsym: 'ℵ', - aleph: 'ℵ', - alpha: 'α', - amacr: 'ā', - amalg: '⨿', - amp: '&', - and: '∧', - andand: '⩕', - andd: '⩜', - andslope: '⩘', - andv: '⩚', - ang: '∠', - ange: '⦤', - angle: '∠', - angmsd: '∡', - angmsdaa: '⦨', - angmsdab: '⦩', - angmsdac: '⦪', - angmsdad: '⦫', - angmsdae: '⦬', - angmsdaf: '⦭', - angmsdag: '⦮', - angmsdah: '⦯', - angrt: '∟', - angrtvb: '⊾', - angrtvbd: '⦝', - angsph: '∢', - angst: 'Å', - angzarr: '⍼', - aogon: 'ą', - aopf: '𝕒', - ap: '≈', - apE: '⩰', - apacir: '⩯', - ape: '≊', - apid: '≋', - apos: "'", - approx: '≈', - approxeq: '≊', - aring: 'å', - ascr: '𝒶', - ast: '*', - asymp: '≈', - asympeq: '≍', - atilde: 'ã', - auml: 'ä', - awconint: '∳', - awint: '⨑', - bNot: '⫭', - backcong: '≌', - backepsilon: '϶', - backprime: '‵', - backsim: '∽', - backsimeq: '⋍', - barvee: '⊽', - barwed: '⌅', - barwedge: '⌅', - bbrk: '⎵', - bbrktbrk: '⎶', - bcong: '≌', - bcy: 'б', - bdquo: '„', - becaus: '∵', - because: '∵', - bemptyv: '⦰', - bepsi: '϶', - bernou: 'ℬ', - beta: 'β', - beth: 'ℶ', - between: '≬', - bfr: '𝔟', - bigcap: '⋂', - bigcirc: '◯', - bigcup: '⋃', - bigodot: '⨀', - bigoplus: '⨁', - bigotimes: '⨂', - bigsqcup: '⨆', - bigstar: '★', - bigtriangledown: '▽', - bigtriangleup: '△', - biguplus: '⨄', - bigvee: '⋁', - bigwedge: '⋀', - bkarow: '⤍', - blacklozenge: '⧫', - blacksquare: '▪', - blacktriangle: '▴', - blacktriangledown: '▾', - blacktriangleleft: '◂', - blacktriangleright: '▸', - blank: '␣', - blk12: '▒', - blk14: '░', - blk34: '▓', - block: '█', - bne: '=⃥', - bnequiv: '≡⃥', - bnot: '⌐', - bopf: '𝕓', - bot: '⊥', - bottom: '⊥', - bowtie: '⋈', - boxDL: '╗', - boxDR: '╔', - boxDl: '╖', - boxDr: '╓', - boxH: '═', - boxHD: '╦', - boxHU: '╩', - boxHd: '╤', - boxHu: '╧', - boxUL: '╝', - boxUR: '╚', - boxUl: '╜', - boxUr: '╙', - boxV: '║', - boxVH: '╬', - boxVL: '╣', - boxVR: '╠', - boxVh: '╫', - boxVl: '╢', - boxVr: '╟', - boxbox: '⧉', - boxdL: '╕', - boxdR: '╒', - boxdl: '┐', - boxdr: '┌', - boxh: '─', - boxhD: '╥', - boxhU: '╨', - boxhd: '┬', - boxhu: '┴', - boxminus: '⊟', - boxplus: '⊞', - boxtimes: '⊠', - boxuL: '╛', - boxuR: '╘', - boxul: '┘', - boxur: '└', - boxv: '│', - boxvH: '╪', - boxvL: '╡', - boxvR: '╞', - boxvh: '┼', - boxvl: '┤', - boxvr: '├', - bprime: '‵', - breve: '˘', - brvbar: '¦', - bscr: '𝒷', - bsemi: '⁏', - bsim: '∽', - bsime: '⋍', - bsol: '\\', - bsolb: '⧅', - bsolhsub: '⟈', - bull: '•', - bullet: '•', - bump: '≎', - bumpE: '⪮', - bumpe: '≏', - bumpeq: '≏', - cacute: 'ć', - cap: '∩', - capand: '⩄', - capbrcup: '⩉', - capcap: '⩋', - capcup: '⩇', - capdot: '⩀', - caps: '∩︀', - caret: '⁁', - caron: 'ˇ', - ccaps: '⩍', - ccaron: 'č', - ccedil: 'ç', - ccirc: 'ĉ', - ccups: '⩌', - ccupssm: '⩐', - cdot: 'ċ', - cedil: '¸', - cemptyv: '⦲', - cent: '¢', - centerdot: '·', - cfr: '𝔠', - chcy: 'ч', - check: '✓', - checkmark: '✓', - chi: 'χ', - cir: '○', - cirE: '⧃', - circ: 'ˆ', - circeq: '≗', - circlearrowleft: '↺', - circlearrowright: '↻', - circledR: '®', - circledS: 'Ⓢ', - circledast: '⊛', - circledcirc: '⊚', - circleddash: '⊝', - cire: '≗', - cirfnint: '⨐', - cirmid: '⫯', - cirscir: '⧂', - clubs: '♣', - clubsuit: '♣', - colon: ':', - colone: '≔', - coloneq: '≔', - comma: ',', - commat: '@', - comp: '∁', - compfn: '∘', - complement: '∁', - complexes: 'ℂ', - cong: '≅', - congdot: '⩭', - conint: '∮', - copf: '𝕔', - coprod: '∐', - copy: '©', - copysr: '℗', - crarr: '↵', - cross: '✗', - cscr: '𝒸', - csub: '⫏', - csube: '⫑', - csup: '⫐', - csupe: '⫒', - ctdot: '⋯', - cudarrl: '⤸', - cudarrr: '⤵', - cuepr: '⋞', - cuesc: '⋟', - cularr: '↶', - cularrp: '⤽', - cup: '∪', - cupbrcap: '⩈', - cupcap: '⩆', - cupcup: '⩊', - cupdot: '⊍', - cupor: '⩅', - cups: '∪︀', - curarr: '↷', - curarrm: '⤼', - curlyeqprec: '⋞', - curlyeqsucc: '⋟', - curlyvee: '⋎', - curlywedge: '⋏', - curren: '¤', - curvearrowleft: '↶', - curvearrowright: '↷', - cuvee: '⋎', - cuwed: '⋏', - cwconint: '∲', - cwint: '∱', - cylcty: '⌭', - dArr: '⇓', - dHar: '⥥', - dagger: '†', - daleth: 'ℸ', - darr: '↓', - dash: '‐', - dashv: '⊣', - dbkarow: '⤏', - dblac: '˝', - dcaron: 'ď', - dcy: 'д', - dd: 'ⅆ', - ddagger: '‡', - ddarr: '⇊', - ddotseq: '⩷', - deg: '°', - delta: 'δ', - demptyv: '⦱', - dfisht: '⥿', - dfr: '𝔡', - dharl: '⇃', - dharr: '⇂', - diam: '⋄', - diamond: '⋄', - diamondsuit: '♦', - diams: '♦', - die: '¨', - digamma: 'ϝ', - disin: '⋲', - div: '÷', - divide: '÷', - divideontimes: '⋇', - divonx: '⋇', - djcy: 'ђ', - dlcorn: '⌞', - dlcrop: '⌍', - dollar: '$', - dopf: '𝕕', - dot: '˙', - doteq: '≐', - doteqdot: '≑', - dotminus: '∸', - dotplus: '∔', - dotsquare: '⊡', - doublebarwedge: '⌆', - downarrow: '↓', - downdownarrows: '⇊', - downharpoonleft: '⇃', - downharpoonright: '⇂', - drbkarow: '⤐', - drcorn: '⌟', - drcrop: '⌌', - dscr: '𝒹', - dscy: 'ѕ', - dsol: '⧶', - dstrok: 'đ', - dtdot: '⋱', - dtri: '▿', - dtrif: '▾', - duarr: '⇵', - duhar: '⥯', - dwangle: '⦦', - dzcy: 'џ', - dzigrarr: '⟿', - eDDot: '⩷', - eDot: '≑', - eacute: 'é', - easter: '⩮', - ecaron: 'ě', - ecir: '≖', - ecirc: 'ê', - ecolon: '≕', - ecy: 'э', - edot: 'ė', - ee: 'ⅇ', - efDot: '≒', - efr: '𝔢', - eg: '⪚', - egrave: 'è', - egs: '⪖', - egsdot: '⪘', - el: '⪙', - elinters: '⏧', - ell: 'ℓ', - els: '⪕', - elsdot: '⪗', - emacr: 'ē', - empty: '∅', - emptyset: '∅', - emptyv: '∅', - emsp13: ' ', - emsp14: ' ', - emsp: ' ', - eng: 'ŋ', - ensp: ' ', - eogon: 'ę', - eopf: '𝕖', - epar: '⋕', - eparsl: '⧣', - eplus: '⩱', - epsi: 'ε', - epsilon: 'ε', - epsiv: 'ϵ', - eqcirc: '≖', - eqcolon: '≕', - eqsim: '≂', - eqslantgtr: '⪖', - eqslantless: '⪕', - equals: '=', - equest: '≟', - equiv: '≡', - equivDD: '⩸', - eqvparsl: '⧥', - erDot: '≓', - erarr: '⥱', - escr: 'ℯ', - esdot: '≐', - esim: '≂', - eta: 'η', - eth: 'ð', - euml: 'ë', - euro: '€', - excl: '!', - exist: '∃', - expectation: 'ℰ', - exponentiale: 'ⅇ', - fallingdotseq: '≒', - fcy: 'ф', - female: '♀', - ffilig: 'ffi', - fflig: 'ff', - ffllig: 'ffl', - ffr: '𝔣', - filig: 'fi', - fjlig: 'fj', - flat: '♭', - fllig: 'fl', - fltns: '▱', - fnof: 'ƒ', - fopf: '𝕗', - forall: '∀', - fork: '⋔', - forkv: '⫙', - fpartint: '⨍', - frac12: '½', - frac13: '⅓', - frac14: '¼', - frac15: '⅕', - frac16: '⅙', - frac18: '⅛', - frac23: '⅔', - frac25: '⅖', - frac34: '¾', - frac35: '⅗', - frac38: '⅜', - frac45: '⅘', - frac56: '⅚', - frac58: '⅝', - frac78: '⅞', - frasl: '⁄', - frown: '⌢', - fscr: '𝒻', - gE: '≧', - gEl: '⪌', - gacute: 'ǵ', - gamma: 'γ', - gammad: 'ϝ', - gap: '⪆', - gbreve: 'ğ', - gcirc: 'ĝ', - gcy: 'г', - gdot: 'ġ', - ge: '≥', - gel: '⋛', - geq: '≥', - geqq: '≧', - geqslant: '⩾', - ges: '⩾', - gescc: '⪩', - gesdot: '⪀', - gesdoto: '⪂', - gesdotol: '⪄', - gesl: '⋛︀', - gesles: '⪔', - gfr: '𝔤', - gg: '≫', - ggg: '⋙', - gimel: 'ℷ', - gjcy: 'ѓ', - gl: '≷', - glE: '⪒', - gla: '⪥', - glj: '⪤', - gnE: '≩', - gnap: '⪊', - gnapprox: '⪊', - gne: '⪈', - gneq: '⪈', - gneqq: '≩', - gnsim: '⋧', - gopf: '𝕘', - grave: '`', - gscr: 'ℊ', - gsim: '≳', - gsime: '⪎', - gsiml: '⪐', - gt: '>', - gtcc: '⪧', - gtcir: '⩺', - gtdot: '⋗', - gtlPar: '⦕', - gtquest: '⩼', - gtrapprox: '⪆', - gtrarr: '⥸', - gtrdot: '⋗', - gtreqless: '⋛', - gtreqqless: '⪌', - gtrless: '≷', - gtrsim: '≳', - gvertneqq: '≩︀', - gvnE: '≩︀', - hArr: '⇔', - hairsp: ' ', - half: '½', - hamilt: 'ℋ', - hardcy: 'ъ', - harr: '↔', - harrcir: '⥈', - harrw: '↭', - hbar: 'ℏ', - hcirc: 'ĥ', - hearts: '♥', - heartsuit: '♥', - hellip: '…', - hercon: '⊹', - hfr: '𝔥', - hksearow: '⤥', - hkswarow: '⤦', - hoarr: '⇿', - homtht: '∻', - hookleftarrow: '↩', - hookrightarrow: '↪', - hopf: '𝕙', - horbar: '―', - hscr: '𝒽', - hslash: 'ℏ', - hstrok: 'ħ', - hybull: '⁃', - hyphen: '‐', - iacute: 'í', - ic: '⁣', - icirc: 'î', - icy: 'и', - iecy: 'е', - iexcl: '¡', - iff: '⇔', - ifr: '𝔦', - igrave: 'ì', - ii: 'ⅈ', - iiiint: '⨌', - iiint: '∭', - iinfin: '⧜', - iiota: '℩', - ijlig: 'ij', - imacr: 'ī', - image: 'ℑ', - imagline: 'ℐ', - imagpart: 'ℑ', - imath: 'ı', - imof: '⊷', - imped: 'Ƶ', - in: '∈', - incare: '℅', - infin: '∞', - infintie: '⧝', - inodot: 'ı', - int: '∫', - intcal: '⊺', - integers: 'ℤ', - intercal: '⊺', - intlarhk: '⨗', - intprod: '⨼', - iocy: 'ё', - iogon: 'į', - iopf: '𝕚', - iota: 'ι', - iprod: '⨼', - iquest: '¿', - iscr: '𝒾', - isin: '∈', - isinE: '⋹', - isindot: '⋵', - isins: '⋴', - isinsv: '⋳', - isinv: '∈', - it: '⁢', - itilde: 'ĩ', - iukcy: 'і', - iuml: 'ï', - jcirc: 'ĵ', - jcy: 'й', - jfr: '𝔧', - jmath: 'ȷ', - jopf: '𝕛', - jscr: '𝒿', - jsercy: 'ј', - jukcy: 'є', - kappa: 'κ', - kappav: 'ϰ', - kcedil: 'ķ', - kcy: 'к', - kfr: '𝔨', - kgreen: 'ĸ', - khcy: 'х', - kjcy: 'ќ', - kopf: '𝕜', - kscr: '𝓀', - lAarr: '⇚', - lArr: '⇐', - lAtail: '⤛', - lBarr: '⤎', - lE: '≦', - lEg: '⪋', - lHar: '⥢', - lacute: 'ĺ', - laemptyv: '⦴', - lagran: 'ℒ', - lambda: 'λ', - lang: '⟨', - langd: '⦑', - langle: '⟨', - lap: '⪅', - laquo: '«', - larr: '←', - larrb: '⇤', - larrbfs: '⤟', - larrfs: '⤝', - larrhk: '↩', - larrlp: '↫', - larrpl: '⤹', - larrsim: '⥳', - larrtl: '↢', - lat: '⪫', - latail: '⤙', - late: '⪭', - lates: '⪭︀', - lbarr: '⤌', - lbbrk: '❲', - lbrace: '{', - lbrack: '[', - lbrke: '⦋', - lbrksld: '⦏', - lbrkslu: '⦍', - lcaron: 'ľ', - lcedil: 'ļ', - lceil: '⌈', - lcub: '{', - lcy: 'л', - ldca: '⤶', - ldquo: '“', - ldquor: '„', - ldrdhar: '⥧', - ldrushar: '⥋', - ldsh: '↲', - le: '≤', - leftarrow: '←', - leftarrowtail: '↢', - leftharpoondown: '↽', - leftharpoonup: '↼', - leftleftarrows: '⇇', - leftrightarrow: '↔', - leftrightarrows: '⇆', - leftrightharpoons: '⇋', - leftrightsquigarrow: '↭', - leftthreetimes: '⋋', - leg: '⋚', - leq: '≤', - leqq: '≦', - leqslant: '⩽', - les: '⩽', - lescc: '⪨', - lesdot: '⩿', - lesdoto: '⪁', - lesdotor: '⪃', - lesg: '⋚︀', - lesges: '⪓', - lessapprox: '⪅', - lessdot: '⋖', - lesseqgtr: '⋚', - lesseqqgtr: '⪋', - lessgtr: '≶', - lesssim: '≲', - lfisht: '⥼', - lfloor: '⌊', - lfr: '𝔩', - lg: '≶', - lgE: '⪑', - lhard: '↽', - lharu: '↼', - lharul: '⥪', - lhblk: '▄', - ljcy: 'љ', - ll: '≪', - llarr: '⇇', - llcorner: '⌞', - llhard: '⥫', - lltri: '◺', - lmidot: 'ŀ', - lmoust: '⎰', - lmoustache: '⎰', - lnE: '≨', - lnap: '⪉', - lnapprox: '⪉', - lne: '⪇', - lneq: '⪇', - lneqq: '≨', - lnsim: '⋦', - loang: '⟬', - loarr: '⇽', - lobrk: '⟦', - longleftarrow: '⟵', - longleftrightarrow: '⟷', - longmapsto: '⟼', - longrightarrow: '⟶', - looparrowleft: '↫', - looparrowright: '↬', - lopar: '⦅', - lopf: '𝕝', - loplus: '⨭', - lotimes: '⨴', - lowast: '∗', - lowbar: '_', - loz: '◊', - lozenge: '◊', - lozf: '⧫', - lpar: '(', - lparlt: '⦓', - lrarr: '⇆', - lrcorner: '⌟', - lrhar: '⇋', - lrhard: '⥭', - lrm: '‎', - lrtri: '⊿', - lsaquo: '‹', - lscr: '𝓁', - lsh: '↰', - lsim: '≲', - lsime: '⪍', - lsimg: '⪏', - lsqb: '[', - lsquo: '‘', - lsquor: '‚', - lstrok: 'ł', - lt: '<', - ltcc: '⪦', - ltcir: '⩹', - ltdot: '⋖', - lthree: '⋋', - ltimes: '⋉', - ltlarr: '⥶', - ltquest: '⩻', - ltrPar: '⦖', - ltri: '◃', - ltrie: '⊴', - ltrif: '◂', - lurdshar: '⥊', - luruhar: '⥦', - lvertneqq: '≨︀', - lvnE: '≨︀', - mDDot: '∺', - macr: '¯', - male: '♂', - malt: '✠', - maltese: '✠', - map: '↦', - mapsto: '↦', - mapstodown: '↧', - mapstoleft: '↤', - mapstoup: '↥', - marker: '▮', - mcomma: '⨩', - mcy: 'м', - mdash: '—', - measuredangle: '∡', - mfr: '𝔪', - mho: '℧', - micro: 'µ', - mid: '∣', - midast: '*', - midcir: '⫰', - middot: '·', - minus: '−', - minusb: '⊟', - minusd: '∸', - minusdu: '⨪', - mlcp: '⫛', - mldr: '…', - mnplus: '∓', - models: '⊧', - mopf: '𝕞', - mp: '∓', - mscr: '𝓂', - mstpos: '∾', - mu: 'μ', - multimap: '⊸', - mumap: '⊸', - nGg: '⋙̸', - nGt: '≫⃒', - nGtv: '≫̸', - nLeftarrow: '⇍', - nLeftrightarrow: '⇎', - nLl: '⋘̸', - nLt: '≪⃒', - nLtv: '≪̸', - nRightarrow: '⇏', - nVDash: '⊯', - nVdash: '⊮', - nabla: '∇', - nacute: 'ń', - nang: '∠⃒', - nap: '≉', - napE: '⩰̸', - napid: '≋̸', - napos: 'ʼn', - napprox: '≉', - natur: '♮', - natural: '♮', - naturals: 'ℕ', - nbsp: ' ', - nbump: '≎̸', - nbumpe: '≏̸', - ncap: '⩃', - ncaron: 'ň', - ncedil: 'ņ', - ncong: '≇', - ncongdot: '⩭̸', - ncup: '⩂', - ncy: 'н', - ndash: '–', - ne: '≠', - neArr: '⇗', - nearhk: '⤤', - nearr: '↗', - nearrow: '↗', - nedot: '≐̸', - nequiv: '≢', - nesear: '⤨', - nesim: '≂̸', - nexist: '∄', - nexists: '∄', - nfr: '𝔫', - ngE: '≧̸', - nge: '≱', - ngeq: '≱', - ngeqq: '≧̸', - ngeqslant: '⩾̸', - nges: '⩾̸', - ngsim: '≵', - ngt: '≯', - ngtr: '≯', - nhArr: '⇎', - nharr: '↮', - nhpar: '⫲', - ni: '∋', - nis: '⋼', - nisd: '⋺', - niv: '∋', - njcy: 'њ', - nlArr: '⇍', - nlE: '≦̸', - nlarr: '↚', - nldr: '‥', - nle: '≰', - nleftarrow: '↚', - nleftrightarrow: '↮', - nleq: '≰', - nleqq: '≦̸', - nleqslant: '⩽̸', - nles: '⩽̸', - nless: '≮', - nlsim: '≴', - nlt: '≮', - nltri: '⋪', - nltrie: '⋬', - nmid: '∤', - nopf: '𝕟', - not: '¬', - notin: '∉', - notinE: '⋹̸', - notindot: '⋵̸', - notinva: '∉', - notinvb: '⋷', - notinvc: '⋶', - notni: '∌', - notniva: '∌', - notnivb: '⋾', - notnivc: '⋽', - npar: '∦', - nparallel: '∦', - nparsl: '⫽⃥', - npart: '∂̸', - npolint: '⨔', - npr: '⊀', - nprcue: '⋠', - npre: '⪯̸', - nprec: '⊀', - npreceq: '⪯̸', - nrArr: '⇏', - nrarr: '↛', - nrarrc: '⤳̸', - nrarrw: '↝̸', - nrightarrow: '↛', - nrtri: '⋫', - nrtrie: '⋭', - nsc: '⊁', - nsccue: '⋡', - nsce: '⪰̸', - nscr: '𝓃', - nshortmid: '∤', - nshortparallel: '∦', - nsim: '≁', - nsime: '≄', - nsimeq: '≄', - nsmid: '∤', - nspar: '∦', - nsqsube: '⋢', - nsqsupe: '⋣', - nsub: '⊄', - nsubE: '⫅̸', - nsube: '⊈', - nsubset: '⊂⃒', - nsubseteq: '⊈', - nsubseteqq: '⫅̸', - nsucc: '⊁', - nsucceq: '⪰̸', - nsup: '⊅', - nsupE: '⫆̸', - nsupe: '⊉', - nsupset: '⊃⃒', - nsupseteq: '⊉', - nsupseteqq: '⫆̸', - ntgl: '≹', - ntilde: 'ñ', - ntlg: '≸', - ntriangleleft: '⋪', - ntrianglelefteq: '⋬', - ntriangleright: '⋫', - ntrianglerighteq: '⋭', - nu: 'ν', - num: '#', - numero: '№', - numsp: ' ', - nvDash: '⊭', - nvHarr: '⤄', - nvap: '≍⃒', - nvdash: '⊬', - nvge: '≥⃒', - nvgt: '>⃒', - nvinfin: '⧞', - nvlArr: '⤂', - nvle: '≤⃒', - nvlt: '<⃒', - nvltrie: '⊴⃒', - nvrArr: '⤃', - nvrtrie: '⊵⃒', - nvsim: '∼⃒', - nwArr: '⇖', - nwarhk: '⤣', - nwarr: '↖', - nwarrow: '↖', - nwnear: '⤧', - oS: 'Ⓢ', - oacute: 'ó', - oast: '⊛', - ocir: '⊚', - ocirc: 'ô', - ocy: 'о', - odash: '⊝', - odblac: 'ő', - odiv: '⨸', - odot: '⊙', - odsold: '⦼', - oelig: 'œ', - ofcir: '⦿', - ofr: '𝔬', - ogon: '˛', - ograve: 'ò', - ogt: '⧁', - ohbar: '⦵', - ohm: 'Ω', - oint: '∮', - olarr: '↺', - olcir: '⦾', - olcross: '⦻', - oline: '‾', - olt: '⧀', - omacr: 'ō', - omega: 'ω', - omicron: 'ο', - omid: '⦶', - ominus: '⊖', - oopf: '𝕠', - opar: '⦷', - operp: '⦹', - oplus: '⊕', - or: '∨', - orarr: '↻', - ord: '⩝', - order: 'ℴ', - orderof: 'ℴ', - ordf: 'ª', - ordm: 'º', - origof: '⊶', - oror: '⩖', - orslope: '⩗', - orv: '⩛', - oscr: 'ℴ', - oslash: 'ø', - osol: '⊘', - otilde: 'õ', - otimes: '⊗', - otimesas: '⨶', - ouml: 'ö', - ovbar: '⌽', - par: '∥', - para: '¶', - parallel: '∥', - parsim: '⫳', - parsl: '⫽', - part: '∂', - pcy: 'п', - percnt: '%', - period: '.', - permil: '‰', - perp: '⊥', - pertenk: '‱', - pfr: '𝔭', - phi: 'φ', - phiv: 'ϕ', - phmmat: 'ℳ', - phone: '☎', - pi: 'π', - pitchfork: '⋔', - piv: 'ϖ', - planck: 'ℏ', - planckh: 'ℎ', - plankv: 'ℏ', - plus: '+', - plusacir: '⨣', - plusb: '⊞', - pluscir: '⨢', - plusdo: '∔', - plusdu: '⨥', - pluse: '⩲', - plusmn: '±', - plussim: '⨦', - plustwo: '⨧', - pm: '±', - pointint: '⨕', - popf: '𝕡', - pound: '£', - pr: '≺', - prE: '⪳', - prap: '⪷', - prcue: '≼', - pre: '⪯', - prec: '≺', - precapprox: '⪷', - preccurlyeq: '≼', - preceq: '⪯', - precnapprox: '⪹', - precneqq: '⪵', - precnsim: '⋨', - precsim: '≾', - prime: '′', - primes: 'ℙ', - prnE: '⪵', - prnap: '⪹', - prnsim: '⋨', - prod: '∏', - profalar: '⌮', - profline: '⌒', - profsurf: '⌓', - prop: '∝', - propto: '∝', - prsim: '≾', - prurel: '⊰', - pscr: '𝓅', - psi: 'ψ', - puncsp: ' ', - qfr: '𝔮', - qint: '⨌', - qopf: '𝕢', - qprime: '⁗', - qscr: '𝓆', - quaternions: 'ℍ', - quatint: '⨖', - quest: '?', - questeq: '≟', - quot: '"', - rAarr: '⇛', - rArr: '⇒', - rAtail: '⤜', - rBarr: '⤏', - rHar: '⥤', - race: '∽̱', - racute: 'ŕ', - radic: '√', - raemptyv: '⦳', - rang: '⟩', - rangd: '⦒', - range: '⦥', - rangle: '⟩', - raquo: '»', - rarr: '→', - rarrap: '⥵', - rarrb: '⇥', - rarrbfs: '⤠', - rarrc: '⤳', - rarrfs: '⤞', - rarrhk: '↪', - rarrlp: '↬', - rarrpl: '⥅', - rarrsim: '⥴', - rarrtl: '↣', - rarrw: '↝', - ratail: '⤚', - ratio: '∶', - rationals: 'ℚ', - rbarr: '⤍', - rbbrk: '❳', - rbrace: '}', - rbrack: ']', - rbrke: '⦌', - rbrksld: '⦎', - rbrkslu: '⦐', - rcaron: 'ř', - rcedil: 'ŗ', - rceil: '⌉', - rcub: '}', - rcy: 'р', - rdca: '⤷', - rdldhar: '⥩', - rdquo: '”', - rdquor: '”', - rdsh: '↳', - real: 'ℜ', - realine: 'ℛ', - realpart: 'ℜ', - reals: 'ℝ', - rect: '▭', - reg: '®', - rfisht: '⥽', - rfloor: '⌋', - rfr: '𝔯', - rhard: '⇁', - rharu: '⇀', - rharul: '⥬', - rho: 'ρ', - rhov: 'ϱ', - rightarrow: '→', - rightarrowtail: '↣', - rightharpoondown: '⇁', - rightharpoonup: '⇀', - rightleftarrows: '⇄', - rightleftharpoons: '⇌', - rightrightarrows: '⇉', - rightsquigarrow: '↝', - rightthreetimes: '⋌', - ring: '˚', - risingdotseq: '≓', - rlarr: '⇄', - rlhar: '⇌', - rlm: '‏', - rmoust: '⎱', - rmoustache: '⎱', - rnmid: '⫮', - roang: '⟭', - roarr: '⇾', - robrk: '⟧', - ropar: '⦆', - ropf: '𝕣', - roplus: '⨮', - rotimes: '⨵', - rpar: ')', - rpargt: '⦔', - rppolint: '⨒', - rrarr: '⇉', - rsaquo: '›', - rscr: '𝓇', - rsh: '↱', - rsqb: ']', - rsquo: '’', - rsquor: '’', - rthree: '⋌', - rtimes: '⋊', - rtri: '▹', - rtrie: '⊵', - rtrif: '▸', - rtriltri: '⧎', - ruluhar: '⥨', - rx: '℞', - sacute: 'ś', - sbquo: '‚', - sc: '≻', - scE: '⪴', - scap: '⪸', - scaron: 'š', - sccue: '≽', - sce: '⪰', - scedil: 'ş', - scirc: 'ŝ', - scnE: '⪶', - scnap: '⪺', - scnsim: '⋩', - scpolint: '⨓', - scsim: '≿', - scy: 'с', - sdot: '⋅', - sdotb: '⊡', - sdote: '⩦', - seArr: '⇘', - searhk: '⤥', - searr: '↘', - searrow: '↘', - sect: '§', - semi: ';', - seswar: '⤩', - setminus: '∖', - setmn: '∖', - sext: '✶', - sfr: '𝔰', - sfrown: '⌢', - sharp: '♯', - shchcy: 'щ', - shcy: 'ш', - shortmid: '∣', - shortparallel: '∥', - shy: '­', - sigma: 'σ', - sigmaf: 'ς', - sigmav: 'ς', - sim: '∼', - simdot: '⩪', - sime: '≃', - simeq: '≃', - simg: '⪞', - simgE: '⪠', - siml: '⪝', - simlE: '⪟', - simne: '≆', - simplus: '⨤', - simrarr: '⥲', - slarr: '←', - smallsetminus: '∖', - smashp: '⨳', - smeparsl: '⧤', - smid: '∣', - smile: '⌣', - smt: '⪪', - smte: '⪬', - smtes: '⪬︀', - softcy: 'ь', - sol: '/', - solb: '⧄', - solbar: '⌿', - sopf: '𝕤', - spades: '♠', - spadesuit: '♠', - spar: '∥', - sqcap: '⊓', - sqcaps: '⊓︀', - sqcup: '⊔', - sqcups: '⊔︀', - sqsub: '⊏', - sqsube: '⊑', - sqsubset: '⊏', - sqsubseteq: '⊑', - sqsup: '⊐', - sqsupe: '⊒', - sqsupset: '⊐', - sqsupseteq: '⊒', - squ: '□', - square: '□', - squarf: '▪', - squf: '▪', - srarr: '→', - sscr: '𝓈', - ssetmn: '∖', - ssmile: '⌣', - sstarf: '⋆', - star: '☆', - starf: '★', - straightepsilon: 'ϵ', - straightphi: 'ϕ', - strns: '¯', - sub: '⊂', - subE: '⫅', - subdot: '⪽', - sube: '⊆', - subedot: '⫃', - submult: '⫁', - subnE: '⫋', - subne: '⊊', - subplus: '⪿', - subrarr: '⥹', - subset: '⊂', - subseteq: '⊆', - subseteqq: '⫅', - subsetneq: '⊊', - subsetneqq: '⫋', - subsim: '⫇', - subsub: '⫕', - subsup: '⫓', - succ: '≻', - succapprox: '⪸', - succcurlyeq: '≽', - succeq: '⪰', - succnapprox: '⪺', - succneqq: '⪶', - succnsim: '⋩', - succsim: '≿', - sum: '∑', - sung: '♪', - sup1: '¹', - sup2: '²', - sup3: '³', - sup: '⊃', - supE: '⫆', - supdot: '⪾', - supdsub: '⫘', - supe: '⊇', - supedot: '⫄', - suphsol: '⟉', - suphsub: '⫗', - suplarr: '⥻', - supmult: '⫂', - supnE: '⫌', - supne: '⊋', - supplus: '⫀', - supset: '⊃', - supseteq: '⊇', - supseteqq: '⫆', - supsetneq: '⊋', - supsetneqq: '⫌', - supsim: '⫈', - supsub: '⫔', - supsup: '⫖', - swArr: '⇙', - swarhk: '⤦', - swarr: '↙', - swarrow: '↙', - swnwar: '⤪', - szlig: 'ß', - target: '⌖', - tau: 'τ', - tbrk: '⎴', - tcaron: 'ť', - tcedil: 'ţ', - tcy: 'т', - tdot: '⃛', - telrec: '⌕', - tfr: '𝔱', - there4: '∴', - therefore: '∴', - theta: 'θ', - thetasym: 'ϑ', - thetav: 'ϑ', - thickapprox: '≈', - thicksim: '∼', - thinsp: ' ', - thkap: '≈', - thksim: '∼', - thorn: 'þ', - tilde: '˜', - times: '×', - timesb: '⊠', - timesbar: '⨱', - timesd: '⨰', - tint: '∭', - toea: '⤨', - top: '⊤', - topbot: '⌶', - topcir: '⫱', - topf: '𝕥', - topfork: '⫚', - tosa: '⤩', - tprime: '‴', - trade: '™', - triangle: '▵', - triangledown: '▿', - triangleleft: '◃', - trianglelefteq: '⊴', - triangleq: '≜', - triangleright: '▹', - trianglerighteq: '⊵', - tridot: '◬', - trie: '≜', - triminus: '⨺', - triplus: '⨹', - trisb: '⧍', - tritime: '⨻', - trpezium: '⏢', - tscr: '𝓉', - tscy: 'ц', - tshcy: 'ћ', - tstrok: 'ŧ', - twixt: '≬', - twoheadleftarrow: '↞', - twoheadrightarrow: '↠', - uArr: '⇑', - uHar: '⥣', - uacute: 'ú', - uarr: '↑', - ubrcy: 'ў', - ubreve: 'ŭ', - ucirc: 'û', - ucy: 'у', - udarr: '⇅', - udblac: 'ű', - udhar: '⥮', - ufisht: '⥾', - ufr: '𝔲', - ugrave: 'ù', - uharl: '↿', - uharr: '↾', - uhblk: '▀', - ulcorn: '⌜', - ulcorner: '⌜', - ulcrop: '⌏', - ultri: '◸', - umacr: 'ū', - uml: '¨', - uogon: 'ų', - uopf: '𝕦', - uparrow: '↑', - updownarrow: '↕', - upharpoonleft: '↿', - upharpoonright: '↾', - uplus: '⊎', - upsi: 'υ', - upsih: 'ϒ', - upsilon: 'υ', - upuparrows: '⇈', - urcorn: '⌝', - urcorner: '⌝', - urcrop: '⌎', - uring: 'ů', - urtri: '◹', - uscr: '𝓊', - utdot: '⋰', - utilde: 'ũ', - utri: '▵', - utrif: '▴', - uuarr: '⇈', - uuml: 'ü', - uwangle: '⦧', - vArr: '⇕', - vBar: '⫨', - vBarv: '⫩', - vDash: '⊨', - vangrt: '⦜', - varepsilon: 'ϵ', - varkappa: 'ϰ', - varnothing: '∅', - varphi: 'ϕ', - varpi: 'ϖ', - varpropto: '∝', - varr: '↕', - varrho: 'ϱ', - varsigma: 'ς', - varsubsetneq: '⊊︀', - varsubsetneqq: '⫋︀', - varsupsetneq: '⊋︀', - varsupsetneqq: '⫌︀', - vartheta: 'ϑ', - vartriangleleft: '⊲', - vartriangleright: '⊳', - vcy: 'в', - vdash: '⊢', - vee: '∨', - veebar: '⊻', - veeeq: '≚', - vellip: '⋮', - verbar: '|', - vert: '|', - vfr: '𝔳', - vltri: '⊲', - vnsub: '⊂⃒', - vnsup: '⊃⃒', - vopf: '𝕧', - vprop: '∝', - vrtri: '⊳', - vscr: '𝓋', - vsubnE: '⫋︀', - vsubne: '⊊︀', - vsupnE: '⫌︀', - vsupne: '⊋︀', - vzigzag: '⦚', - wcirc: 'ŵ', - wedbar: '⩟', - wedge: '∧', - wedgeq: '≙', - weierp: '℘', - wfr: '𝔴', - wopf: '𝕨', - wp: '℘', - wr: '≀', - wreath: '≀', - wscr: '𝓌', - xcap: '⋂', - xcirc: '◯', - xcup: '⋃', - xdtri: '▽', - xfr: '𝔵', - xhArr: '⟺', - xharr: '⟷', - xi: 'ξ', - xlArr: '⟸', - xlarr: '⟵', - xmap: '⟼', - xnis: '⋻', - xodot: '⨀', - xopf: '𝕩', - xoplus: '⨁', - xotime: '⨂', - xrArr: '⟹', - xrarr: '⟶', - xscr: '𝓍', - xsqcup: '⨆', - xuplus: '⨄', - xutri: '△', - xvee: '⋁', - xwedge: '⋀', - yacute: 'ý', - yacy: 'я', - ycirc: 'ŷ', - ycy: 'ы', - yen: '¥', - yfr: '𝔶', - yicy: 'ї', - yopf: '𝕪', - yscr: '𝓎', - yucy: 'ю', - yuml: 'ÿ', - zacute: 'ź', - zcaron: 'ž', - zcy: 'з', - zdot: 'ż', - zeetrf: 'ℨ', - zeta: 'ζ', - zfr: '𝔷', - zhcy: 'ж', - zigrarr: '⇝', - zopf: '𝕫', - zscr: '𝓏', - zwj: '‍', - zwnj: '‌' -} - -;// CONCATENATED MODULE: ./node_modules/decode-named-character-reference/index.js - - -const own = {}.hasOwnProperty - -/** - * Decode a single character reference (without the `&` or `;`). - * You probably only need this when you’re building parsers yourself that follow - * different rules compared to HTML. - * This is optimized to be tiny in browsers. - * - * @param {string} value - * `notin` (named), `#123` (deci), `#x123` (hexa). - * @returns {string|false} - * Decoded reference. - */ -function decodeNamedCharacterReference(value) { - return own.call(characterEntities, value) ? characterEntities[value] : false -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/character-reference.js -/** - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const characterReference = { - name: 'characterReference', - tokenize: tokenizeCharacterReference -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeCharacterReference(effects, ok, nok) { - const self = this - let size = 0 - /** @type {number} */ - let max - /** @type {(code: Code) => boolean} */ - let test - return start - - /** - * Start of character reference. - * - * ```markdown - * > | a&b - * ^ - * > | a{b - * ^ - * > | a b - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter('characterReference') - effects.enter('characterReferenceMarker') - effects.consume(code) - effects.exit('characterReferenceMarker') - return open - } - - /** - * After `&`, at `#` for numeric references or alphanumeric for named - * references. - * - * ```markdown - * > | a&b - * ^ - * > | a{b - * ^ - * > | a b - * ^ - * ``` - * - * @type {State} - */ - function open(code) { - if (code === 35) { - effects.enter('characterReferenceMarkerNumeric') - effects.consume(code) - effects.exit('characterReferenceMarkerNumeric') - return numeric - } - effects.enter('characterReferenceValue') - max = 31 - test = asciiAlphanumeric - return value(code) - } - - /** - * After `#`, at `x` for hexadecimals or digit for decimals. - * - * ```markdown - * > | a{b - * ^ - * > | a b - * ^ - * ``` - * - * @type {State} - */ - function numeric(code) { - if (code === 88 || code === 120) { - effects.enter('characterReferenceMarkerHexadecimal') - effects.consume(code) - effects.exit('characterReferenceMarkerHexadecimal') - effects.enter('characterReferenceValue') - max = 6 - test = asciiHexDigit - return value - } - effects.enter('characterReferenceValue') - max = 7 - test = asciiDigit - return value(code) - } - - /** - * After markers (`&#x`, `&#`, or `&`), in value, before `;`. - * - * The character reference kind defines what and how many characters are - * allowed. - * - * ```markdown - * > | a&b - * ^^^ - * > | a{b - * ^^^ - * > | a b - * ^ - * ``` - * - * @type {State} - */ - function value(code) { - if (code === 59 && size) { - const token = effects.exit('characterReferenceValue') - if ( - test === asciiAlphanumeric && - !decodeNamedCharacterReference(self.sliceSerialize(token)) - ) { - return nok(code) - } - - // To do: `markdown-rs` uses a different name: - // `CharacterReferenceMarkerSemi`. - effects.enter('characterReferenceMarker') - effects.consume(code) - effects.exit('characterReferenceMarker') - effects.exit('characterReference') - return ok - } - if (test(code) && size++ < max) { - effects.consume(code) - return value - } - return nok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/character-escape.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - -/** @type {Construct} */ -const characterEscape = { - name: 'characterEscape', - tokenize: tokenizeCharacterEscape -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeCharacterEscape(effects, ok, nok) { - return start - - /** - * Start of character escape. - * - * ```markdown - * > | a\*b - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter('characterEscape') - effects.enter('escapeMarker') - effects.consume(code) - effects.exit('escapeMarker') - return inside - } - - /** - * After `\`, at punctuation. - * - * ```markdown - * > | a\*b - * ^ - * ``` - * - * @type {State} - */ - function inside(code) { - // ASCII punctuation. - if (asciiPunctuation(code)) { - effects.enter('characterEscapeValue') - effects.consume(code) - effects.exit('characterEscapeValue') - effects.exit('characterEscape') - return ok - } - return nok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/line-ending.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const lineEnding = { - name: 'lineEnding', - tokenize: tokenizeLineEnding -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeLineEnding(effects, ok) { - return start - - /** @type {State} */ - function start(code) { - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return factorySpace(effects, ok, 'linePrefix') - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/label-end.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').Event} Event - * @typedef {import('micromark-util-types').Resolver} Resolver - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').Token} Token - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - - - - - - - -/** @type {Construct} */ -const labelEnd = { - name: 'labelEnd', - tokenize: tokenizeLabelEnd, - resolveTo: resolveToLabelEnd, - resolveAll: resolveAllLabelEnd -} - -/** @type {Construct} */ -const resourceConstruct = { - tokenize: tokenizeResource -} -/** @type {Construct} */ -const referenceFullConstruct = { - tokenize: tokenizeReferenceFull -} -/** @type {Construct} */ -const referenceCollapsedConstruct = { - tokenize: tokenizeReferenceCollapsed -} - -/** @type {Resolver} */ -function resolveAllLabelEnd(events) { - let index = -1 - while (++index < events.length) { - const token = events[index][1] - if ( - token.type === 'labelImage' || - token.type === 'labelLink' || - token.type === 'labelEnd' - ) { - // Remove the marker. - events.splice(index + 1, token.type === 'labelImage' ? 4 : 2) - token.type = 'data' - index++ - } - } - return events -} - -/** @type {Resolver} */ -function resolveToLabelEnd(events, context) { - let index = events.length - let offset = 0 - /** @type {Token} */ - let token - /** @type {number | undefined} */ - let open - /** @type {number | undefined} */ - let close - /** @type {Array} */ - let media - - // Find an opening. - while (index--) { - token = events[index][1] - if (open) { - // If we see another link, or inactive link label, we’ve been here before. - if ( - token.type === 'link' || - (token.type === 'labelLink' && token._inactive) - ) { - break - } - - // Mark other link openings as inactive, as we can’t have links in - // links. - if (events[index][0] === 'enter' && token.type === 'labelLink') { - token._inactive = true - } - } else if (close) { - if ( - events[index][0] === 'enter' && - (token.type === 'labelImage' || token.type === 'labelLink') && - !token._balanced - ) { - open = index - if (token.type !== 'labelLink') { - offset = 2 - break - } - } - } else if (token.type === 'labelEnd') { - close = index - } - } - const group = { - type: events[open][1].type === 'labelLink' ? 'link' : 'image', - start: Object.assign({}, events[open][1].start), - end: Object.assign({}, events[events.length - 1][1].end) - } - const label = { - type: 'label', - start: Object.assign({}, events[open][1].start), - end: Object.assign({}, events[close][1].end) - } - const text = { - type: 'labelText', - start: Object.assign({}, events[open + offset + 2][1].end), - end: Object.assign({}, events[close - 2][1].start) - } - media = [ - ['enter', group, context], - ['enter', label, context] - ] - - // Opening marker. - media = push(media, events.slice(open + 1, open + offset + 3)) - - // Text open. - media = push(media, [['enter', text, context]]) - - // Always populated by defaults. - - // Between. - media = push( - media, - resolveAll( - context.parser.constructs.insideSpan.null, - events.slice(open + offset + 4, close - 3), - context - ) - ) - - // Text close, marker close, label close. - media = push(media, [ - ['exit', text, context], - events[close - 2], - events[close - 1], - ['exit', label, context] - ]) - - // Reference, resource, or so. - media = push(media, events.slice(close + 1)) - - // Media close. - media = push(media, [['exit', group, context]]) - splice(events, open, events.length, media) - return events -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeLabelEnd(effects, ok, nok) { - const self = this - let index = self.events.length - /** @type {Token} */ - let labelStart - /** @type {boolean} */ - let defined - - // Find an opening. - while (index--) { - if ( - (self.events[index][1].type === 'labelImage' || - self.events[index][1].type === 'labelLink') && - !self.events[index][1]._balanced - ) { - labelStart = self.events[index][1] - break - } - } - return start - - /** - * Start of label end. - * - * ```markdown - * > | [a](b) c - * ^ - * > | [a][b] c - * ^ - * > | [a][] b - * ^ - * > | [a] b - * ``` - * - * @type {State} - */ - function start(code) { - // If there is not an okay opening. - if (!labelStart) { - return nok(code) - } - - // If the corresponding label (link) start is marked as inactive, - // it means we’d be wrapping a link, like this: - // - // ```markdown - // > | a [b [c](d) e](f) g. - // ^ - // ``` - // - // We can’t have that, so it’s just balanced brackets. - if (labelStart._inactive) { - return labelEndNok(code) - } - defined = self.parser.defined.includes( - normalizeIdentifier( - self.sliceSerialize({ - start: labelStart.end, - end: self.now() - }) - ) - ) - effects.enter('labelEnd') - effects.enter('labelMarker') - effects.consume(code) - effects.exit('labelMarker') - effects.exit('labelEnd') - return after - } - - /** - * After `]`. - * - * ```markdown - * > | [a](b) c - * ^ - * > | [a][b] c - * ^ - * > | [a][] b - * ^ - * > | [a] b - * ^ - * ``` - * - * @type {State} - */ - function after(code) { - // Note: `markdown-rs` also parses GFM footnotes here, which for us is in - // an extension. - - // Resource (`[asd](fgh)`)? - if (code === 40) { - return effects.attempt( - resourceConstruct, - labelEndOk, - defined ? labelEndOk : labelEndNok - )(code) - } - - // Full (`[asd][fgh]`) or collapsed (`[asd][]`) reference? - if (code === 91) { - return effects.attempt( - referenceFullConstruct, - labelEndOk, - defined ? referenceNotFull : labelEndNok - )(code) - } - - // Shortcut (`[asd]`) reference? - return defined ? labelEndOk(code) : labelEndNok(code) - } - - /** - * After `]`, at `[`, but not at a full reference. - * - * > 👉 **Note**: we only get here if the label is defined. - * - * ```markdown - * > | [a][] b - * ^ - * > | [a] b - * ^ - * ``` - * - * @type {State} - */ - function referenceNotFull(code) { - return effects.attempt( - referenceCollapsedConstruct, - labelEndOk, - labelEndNok - )(code) - } - - /** - * Done, we found something. - * - * ```markdown - * > | [a](b) c - * ^ - * > | [a][b] c - * ^ - * > | [a][] b - * ^ - * > | [a] b - * ^ - * ``` - * - * @type {State} - */ - function labelEndOk(code) { - // Note: `markdown-rs` does a bunch of stuff here. - return ok(code) - } - - /** - * Done, it’s nothing. - * - * There was an okay opening, but we didn’t match anything. - * - * ```markdown - * > | [a](b c - * ^ - * > | [a][b c - * ^ - * > | [a] b - * ^ - * ``` - * - * @type {State} - */ - function labelEndNok(code) { - labelStart._balanced = true - return nok(code) - } -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeResource(effects, ok, nok) { - return resourceStart - - /** - * At a resource. - * - * ```markdown - * > | [a](b) c - * ^ - * ``` - * - * @type {State} - */ - function resourceStart(code) { - effects.enter('resource') - effects.enter('resourceMarker') - effects.consume(code) - effects.exit('resourceMarker') - return resourceBefore - } - - /** - * In resource, after `(`, at optional whitespace. - * - * ```markdown - * > | [a](b) c - * ^ - * ``` - * - * @type {State} - */ - function resourceBefore(code) { - return markdownLineEndingOrSpace(code) - ? factoryWhitespace(effects, resourceOpen)(code) - : resourceOpen(code) - } - - /** - * In resource, after optional whitespace, at `)` or a destination. - * - * ```markdown - * > | [a](b) c - * ^ - * ``` - * - * @type {State} - */ - function resourceOpen(code) { - if (code === 41) { - return resourceEnd(code) - } - return factoryDestination( - effects, - resourceDestinationAfter, - resourceDestinationMissing, - 'resourceDestination', - 'resourceDestinationLiteral', - 'resourceDestinationLiteralMarker', - 'resourceDestinationRaw', - 'resourceDestinationString', - 32 - )(code) - } - - /** - * In resource, after destination, at optional whitespace. - * - * ```markdown - * > | [a](b) c - * ^ - * ``` - * - * @type {State} - */ - function resourceDestinationAfter(code) { - return markdownLineEndingOrSpace(code) - ? factoryWhitespace(effects, resourceBetween)(code) - : resourceEnd(code) - } - - /** - * At invalid destination. - * - * ```markdown - * > | [a](<<) b - * ^ - * ``` - * - * @type {State} - */ - function resourceDestinationMissing(code) { - return nok(code) - } - - /** - * In resource, after destination and whitespace, at `(` or title. - * - * ```markdown - * > | [a](b ) c - * ^ - * ``` - * - * @type {State} - */ - function resourceBetween(code) { - if (code === 34 || code === 39 || code === 40) { - return factoryTitle( - effects, - resourceTitleAfter, - nok, - 'resourceTitle', - 'resourceTitleMarker', - 'resourceTitleString' - )(code) - } - return resourceEnd(code) - } - - /** - * In resource, after title, at optional whitespace. - * - * ```markdown - * > | [a](b "c") d - * ^ - * ``` - * - * @type {State} - */ - function resourceTitleAfter(code) { - return markdownLineEndingOrSpace(code) - ? factoryWhitespace(effects, resourceEnd)(code) - : resourceEnd(code) - } - - /** - * In resource, at `)`. - * - * ```markdown - * > | [a](b) d - * ^ - * ``` - * - * @type {State} - */ - function resourceEnd(code) { - if (code === 41) { - effects.enter('resourceMarker') - effects.consume(code) - effects.exit('resourceMarker') - effects.exit('resource') - return ok - } - return nok(code) - } -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeReferenceFull(effects, ok, nok) { - const self = this - return referenceFull - - /** - * In a reference (full), at the `[`. - * - * ```markdown - * > | [a][b] d - * ^ - * ``` - * - * @type {State} - */ - function referenceFull(code) { - return factoryLabel.call( - self, - effects, - referenceFullAfter, - referenceFullMissing, - 'reference', - 'referenceMarker', - 'referenceString' - )(code) - } - - /** - * In a reference (full), after `]`. - * - * ```markdown - * > | [a][b] d - * ^ - * ``` - * - * @type {State} - */ - function referenceFullAfter(code) { - return self.parser.defined.includes( - normalizeIdentifier( - self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1) - ) - ) - ? ok(code) - : nok(code) - } - - /** - * In reference (full) that was missing. - * - * ```markdown - * > | [a][b d - * ^ - * ``` - * - * @type {State} - */ - function referenceFullMissing(code) { - return nok(code) - } -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeReferenceCollapsed(effects, ok, nok) { - return referenceCollapsedStart - - /** - * In reference (collapsed), at `[`. - * - * > 👉 **Note**: we only get here if the label is defined. - * - * ```markdown - * > | [a][] d - * ^ - * ``` - * - * @type {State} - */ - function referenceCollapsedStart(code) { - // We only attempt a collapsed label if there’s a `[`. - - effects.enter('reference') - effects.enter('referenceMarker') - effects.consume(code) - effects.exit('referenceMarker') - return referenceCollapsedOpen - } - - /** - * In reference (collapsed), at `]`. - * - * > 👉 **Note**: we only get here if the label is defined. - * - * ```markdown - * > | [a][] d - * ^ - * ``` - * - * @type {State} - */ - function referenceCollapsedOpen(code) { - if (code === 93) { - effects.enter('referenceMarker') - effects.consume(code) - effects.exit('referenceMarker') - effects.exit('reference') - return ok - } - return nok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/label-start-image.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const labelStartImage = { - name: 'labelStartImage', - tokenize: tokenizeLabelStartImage, - resolveAll: labelEnd.resolveAll -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeLabelStartImage(effects, ok, nok) { - const self = this - return start - - /** - * Start of label (image) start. - * - * ```markdown - * > | a ![b] c - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter('labelImage') - effects.enter('labelImageMarker') - effects.consume(code) - effects.exit('labelImageMarker') - return open - } - - /** - * After `!`, at `[`. - * - * ```markdown - * > | a ![b] c - * ^ - * ``` - * - * @type {State} - */ - function open(code) { - if (code === 91) { - effects.enter('labelMarker') - effects.consume(code) - effects.exit('labelMarker') - effects.exit('labelImage') - return after - } - return nok(code) - } - - /** - * After `![`. - * - * ```markdown - * > | a ![b] c - * ^ - * ``` - * - * This is needed in because, when GFM footnotes are enabled, images never - * form when started with a `^`. - * Instead, links form: - * - * ```markdown - * ![^a](b) - * - * ![^a][b] - * - * [b]: c - * ``` - * - * ```html - *

    !^a

    - *

    !^a

    - * ``` - * - * @type {State} - */ - function after(code) { - // To do: use a new field to do this, this is still needed for - // `micromark-extension-gfm-footnote`, but the `label-start-link` - // behavior isn’t. - // Hidden footnotes hook. - /* c8 ignore next 3 */ - return code === 94 && '_hiddenFootnoteSupport' in self.parser.constructs - ? nok(code) - : ok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-classify-character/index.js -/** - * @typedef {import('micromark-util-types').Code} Code - */ - - -/** - * Classify whether a code represents whitespace, punctuation, or something - * else. - * - * Used for attention (emphasis, strong), whose sequences can open or close - * based on the class of surrounding characters. - * - * > 👉 **Note**: eof (`null`) is seen as whitespace. - * - * @param {Code} code - * Code. - * @returns {typeof constants.characterGroupWhitespace | typeof constants.characterGroupPunctuation | undefined} - * Group. - */ -function classifyCharacter(code) { - if ( - code === null || - markdownLineEndingOrSpace(code) || - unicodeWhitespace(code) - ) { - return 1 - } - if (unicodePunctuation(code)) { - return 2 - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/attention.js -/** - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').Event} Event - * @typedef {import('micromark-util-types').Point} Point - * @typedef {import('micromark-util-types').Resolver} Resolver - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').Token} Token - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - - -/** @type {Construct} */ -const attention = { - name: 'attention', - tokenize: tokenizeAttention, - resolveAll: resolveAllAttention -} - -/** - * Take all events and resolve attention to emphasis or strong. - * - * @type {Resolver} - */ -function resolveAllAttention(events, context) { - let index = -1 - /** @type {number} */ - let open - /** @type {Token} */ - let group - /** @type {Token} */ - let text - /** @type {Token} */ - let openingSequence - /** @type {Token} */ - let closingSequence - /** @type {number} */ - let use - /** @type {Array} */ - let nextEvents - /** @type {number} */ - let offset - - // Walk through all events. - // - // Note: performance of this is fine on an mb of normal markdown, but it’s - // a bottleneck for malicious stuff. - while (++index < events.length) { - // Find a token that can close. - if ( - events[index][0] === 'enter' && - events[index][1].type === 'attentionSequence' && - events[index][1]._close - ) { - open = index - - // Now walk back to find an opener. - while (open--) { - // Find a token that can open the closer. - if ( - events[open][0] === 'exit' && - events[open][1].type === 'attentionSequence' && - events[open][1]._open && - // If the markers are the same: - context.sliceSerialize(events[open][1]).charCodeAt(0) === - context.sliceSerialize(events[index][1]).charCodeAt(0) - ) { - // If the opening can close or the closing can open, - // and the close size *is not* a multiple of three, - // but the sum of the opening and closing size *is* multiple of three, - // then don’t match. - if ( - (events[open][1]._close || events[index][1]._open) && - (events[index][1].end.offset - events[index][1].start.offset) % 3 && - !( - (events[open][1].end.offset - - events[open][1].start.offset + - events[index][1].end.offset - - events[index][1].start.offset) % - 3 - ) - ) { - continue - } - - // Number of markers to use from the sequence. - use = - events[open][1].end.offset - events[open][1].start.offset > 1 && - events[index][1].end.offset - events[index][1].start.offset > 1 - ? 2 - : 1 - const start = Object.assign({}, events[open][1].end) - const end = Object.assign({}, events[index][1].start) - movePoint(start, -use) - movePoint(end, use) - openingSequence = { - type: use > 1 ? 'strongSequence' : 'emphasisSequence', - start, - end: Object.assign({}, events[open][1].end) - } - closingSequence = { - type: use > 1 ? 'strongSequence' : 'emphasisSequence', - start: Object.assign({}, events[index][1].start), - end - } - text = { - type: use > 1 ? 'strongText' : 'emphasisText', - start: Object.assign({}, events[open][1].end), - end: Object.assign({}, events[index][1].start) - } - group = { - type: use > 1 ? 'strong' : 'emphasis', - start: Object.assign({}, openingSequence.start), - end: Object.assign({}, closingSequence.end) - } - events[open][1].end = Object.assign({}, openingSequence.start) - events[index][1].start = Object.assign({}, closingSequence.end) - nextEvents = [] - - // If there are more markers in the opening, add them before. - if (events[open][1].end.offset - events[open][1].start.offset) { - nextEvents = push(nextEvents, [ - ['enter', events[open][1], context], - ['exit', events[open][1], context] - ]) - } - - // Opening. - nextEvents = push(nextEvents, [ - ['enter', group, context], - ['enter', openingSequence, context], - ['exit', openingSequence, context], - ['enter', text, context] - ]) - - // Always populated by defaults. - - // Between. - nextEvents = push( - nextEvents, - resolveAll( - context.parser.constructs.insideSpan.null, - events.slice(open + 1, index), - context - ) - ) - - // Closing. - nextEvents = push(nextEvents, [ - ['exit', text, context], - ['enter', closingSequence, context], - ['exit', closingSequence, context], - ['exit', group, context] - ]) - - // If there are more markers in the closing, add them after. - if (events[index][1].end.offset - events[index][1].start.offset) { - offset = 2 - nextEvents = push(nextEvents, [ - ['enter', events[index][1], context], - ['exit', events[index][1], context] - ]) - } else { - offset = 0 - } - splice(events, open - 1, index - open + 3, nextEvents) - index = open + nextEvents.length - offset - 2 - break - } - } - } - } - - // Remove remaining sequences. - index = -1 - while (++index < events.length) { - if (events[index][1].type === 'attentionSequence') { - events[index][1].type = 'data' - } - } - return events -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeAttention(effects, ok) { - const attentionMarkers = this.parser.constructs.attentionMarkers.null - const previous = this.previous - const before = classifyCharacter(previous) - - /** @type {NonNullable} */ - let marker - return start - - /** - * Before a sequence. - * - * ```markdown - * > | ** - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - marker = code - effects.enter('attentionSequence') - return inside(code) - } - - /** - * In a sequence. - * - * ```markdown - * > | ** - * ^^ - * ``` - * - * @type {State} - */ - function inside(code) { - if (code === marker) { - effects.consume(code) - return inside - } - const token = effects.exit('attentionSequence') - - // To do: next major: move this to resolver, just like `markdown-rs`. - const after = classifyCharacter(code) - - // Always populated by defaults. - - const open = - !after || (after === 2 && before) || attentionMarkers.includes(code) - const close = - !before || (before === 2 && after) || attentionMarkers.includes(previous) - token._open = Boolean(marker === 42 ? open : open && (before || !close)) - token._close = Boolean(marker === 42 ? close : close && (after || !open)) - return ok(code) - } -} - -/** - * Move a point a bit. - * - * Note: `move` only works inside lines! It’s not possible to move past other - * chunks (replacement characters, tabs, or line endings). - * - * @param {Point} point - * @param {number} offset - * @returns {void} - */ -function movePoint(point, offset) { - point.column += offset - point.offset += offset - point._bufferIndex += offset -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/autolink.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - -/** @type {Construct} */ -const autolink = { - name: 'autolink', - tokenize: tokenizeAutolink -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeAutolink(effects, ok, nok) { - let size = 0 - return start - - /** - * Start of an autolink. - * - * ```markdown - * > | ab - * ^ - * > | ab - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter('autolink') - effects.enter('autolinkMarker') - effects.consume(code) - effects.exit('autolinkMarker') - effects.enter('autolinkProtocol') - return open - } - - /** - * After `<`, at protocol or atext. - * - * ```markdown - * > | ab - * ^ - * > | ab - * ^ - * ``` - * - * @type {State} - */ - function open(code) { - if (asciiAlpha(code)) { - effects.consume(code) - return schemeOrEmailAtext - } - return emailAtext(code) - } - - /** - * At second byte of protocol or atext. - * - * ```markdown - * > | ab - * ^ - * > | ab - * ^ - * ``` - * - * @type {State} - */ - function schemeOrEmailAtext(code) { - // ASCII alphanumeric and `+`, `-`, and `.`. - if (code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code)) { - // Count the previous alphabetical from `open` too. - size = 1 - return schemeInsideOrEmailAtext(code) - } - return emailAtext(code) - } - - /** - * In ambiguous protocol or atext. - * - * ```markdown - * > | ab - * ^ - * > | ab - * ^ - * ``` - * - * @type {State} - */ - function schemeInsideOrEmailAtext(code) { - if (code === 58) { - effects.consume(code) - size = 0 - return urlInside - } - - // ASCII alphanumeric and `+`, `-`, and `.`. - if ( - (code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code)) && - size++ < 32 - ) { - effects.consume(code) - return schemeInsideOrEmailAtext - } - size = 0 - return emailAtext(code) - } - - /** - * After protocol, in URL. - * - * ```markdown - * > | ab - * ^ - * ``` - * - * @type {State} - */ - function urlInside(code) { - if (code === 62) { - effects.exit('autolinkProtocol') - effects.enter('autolinkMarker') - effects.consume(code) - effects.exit('autolinkMarker') - effects.exit('autolink') - return ok - } - - // ASCII control, space, or `<`. - if (code === null || code === 32 || code === 60 || asciiControl(code)) { - return nok(code) - } - effects.consume(code) - return urlInside - } - - /** - * In email atext. - * - * ```markdown - * > | ab - * ^ - * ``` - * - * @type {State} - */ - function emailAtext(code) { - if (code === 64) { - effects.consume(code) - return emailAtSignOrDot - } - if (asciiAtext(code)) { - effects.consume(code) - return emailAtext - } - return nok(code) - } - - /** - * In label, after at-sign or dot. - * - * ```markdown - * > | ab - * ^ ^ - * ``` - * - * @type {State} - */ - function emailAtSignOrDot(code) { - return asciiAlphanumeric(code) ? emailLabel(code) : nok(code) - } - - /** - * In label, where `.` and `>` are allowed. - * - * ```markdown - * > | ab - * ^ - * ``` - * - * @type {State} - */ - function emailLabel(code) { - if (code === 46) { - effects.consume(code) - size = 0 - return emailAtSignOrDot - } - if (code === 62) { - // Exit, then change the token type. - effects.exit('autolinkProtocol').type = 'autolinkEmail' - effects.enter('autolinkMarker') - effects.consume(code) - effects.exit('autolinkMarker') - effects.exit('autolink') - return ok - } - return emailValue(code) - } - - /** - * In label, where `.` and `>` are *not* allowed. - * - * Though, this is also used in `emailLabel` to parse other values. - * - * ```markdown - * > | ab - * ^ - * ``` - * - * @type {State} - */ - function emailValue(code) { - // ASCII alphanumeric or `-`. - if ((code === 45 || asciiAlphanumeric(code)) && size++ < 63) { - const next = code === 45 ? emailValue : emailLabel - effects.consume(code) - return next - } - return nok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/html-text.js -/** - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const htmlText = { - name: 'htmlText', - tokenize: tokenizeHtmlText -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeHtmlText(effects, ok, nok) { - const self = this - /** @type {NonNullable | undefined} */ - let marker - /** @type {number} */ - let index - /** @type {State} */ - let returnState - return start - - /** - * Start of HTML (text). - * - * ```markdown - * > | a c - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter('htmlText') - effects.enter('htmlTextData') - effects.consume(code) - return open - } - - /** - * After `<`, at tag name or other stuff. - * - * ```markdown - * > | a c - * ^ - * > | a c - * ^ - * > | a c - * ^ - * ``` - * - * @type {State} - */ - function open(code) { - if (code === 33) { - effects.consume(code) - return declarationOpen - } - if (code === 47) { - effects.consume(code) - return tagCloseStart - } - if (code === 63) { - effects.consume(code) - return instruction - } - - // ASCII alphabetical. - if (asciiAlpha(code)) { - effects.consume(code) - return tagOpen - } - return nok(code) - } - - /** - * After ` | a c - * ^ - * > | a c - * ^ - * > | a &<]]> c - * ^ - * ``` - * - * @type {State} - */ - function declarationOpen(code) { - if (code === 45) { - effects.consume(code) - return commentOpenInside - } - if (code === 91) { - effects.consume(code) - index = 0 - return cdataOpenInside - } - if (asciiAlpha(code)) { - effects.consume(code) - return declaration - } - return nok(code) - } - - /** - * In a comment, after ` | a c - * ^ - * ``` - * - * @type {State} - */ - function commentOpenInside(code) { - if (code === 45) { - effects.consume(code) - return commentEnd - } - return nok(code) - } - - /** - * In comment. - * - * ```markdown - * > | a c - * ^ - * ``` - * - * @type {State} - */ - function comment(code) { - if (code === null) { - return nok(code) - } - if (code === 45) { - effects.consume(code) - return commentClose - } - if (markdownLineEnding(code)) { - returnState = comment - return lineEndingBefore(code) - } - effects.consume(code) - return comment - } - - /** - * In comment, after `-`. - * - * ```markdown - * > | a c - * ^ - * ``` - * - * @type {State} - */ - function commentClose(code) { - if (code === 45) { - effects.consume(code) - return commentEnd - } - return comment(code) - } - - /** - * In comment, after `--`. - * - * ```markdown - * > | a c - * ^ - * ``` - * - * @type {State} - */ - function commentEnd(code) { - return code === 62 - ? end(code) - : code === 45 - ? commentClose(code) - : comment(code) - } - - /** - * After ` | a &<]]> b - * ^^^^^^ - * ``` - * - * @type {State} - */ - function cdataOpenInside(code) { - const value = 'CDATA[' - if (code === value.charCodeAt(index++)) { - effects.consume(code) - return index === value.length ? cdata : cdataOpenInside - } - return nok(code) - } - - /** - * In CDATA. - * - * ```markdown - * > | a &<]]> b - * ^^^ - * ``` - * - * @type {State} - */ - function cdata(code) { - if (code === null) { - return nok(code) - } - if (code === 93) { - effects.consume(code) - return cdataClose - } - if (markdownLineEnding(code)) { - returnState = cdata - return lineEndingBefore(code) - } - effects.consume(code) - return cdata - } - - /** - * In CDATA, after `]`, at another `]`. - * - * ```markdown - * > | a &<]]> b - * ^ - * ``` - * - * @type {State} - */ - function cdataClose(code) { - if (code === 93) { - effects.consume(code) - return cdataEnd - } - return cdata(code) - } - - /** - * In CDATA, after `]]`, at `>`. - * - * ```markdown - * > | a &<]]> b - * ^ - * ``` - * - * @type {State} - */ - function cdataEnd(code) { - if (code === 62) { - return end(code) - } - if (code === 93) { - effects.consume(code) - return cdataEnd - } - return cdata(code) - } - - /** - * In declaration. - * - * ```markdown - * > | a c - * ^ - * ``` - * - * @type {State} - */ - function declaration(code) { - if (code === null || code === 62) { - return end(code) - } - if (markdownLineEnding(code)) { - returnState = declaration - return lineEndingBefore(code) - } - effects.consume(code) - return declaration - } - - /** - * In instruction. - * - * ```markdown - * > | a c - * ^ - * ``` - * - * @type {State} - */ - function instruction(code) { - if (code === null) { - return nok(code) - } - if (code === 63) { - effects.consume(code) - return instructionClose - } - if (markdownLineEnding(code)) { - returnState = instruction - return lineEndingBefore(code) - } - effects.consume(code) - return instruction - } - - /** - * In instruction, after `?`, at `>`. - * - * ```markdown - * > | a c - * ^ - * ``` - * - * @type {State} - */ - function instructionClose(code) { - return code === 62 ? end(code) : instruction(code) - } - - /** - * After ` | a c - * ^ - * ``` - * - * @type {State} - */ - function tagCloseStart(code) { - // ASCII alphabetical. - if (asciiAlpha(code)) { - effects.consume(code) - return tagClose - } - return nok(code) - } - - /** - * After ` | a c - * ^ - * ``` - * - * @type {State} - */ - function tagClose(code) { - // ASCII alphanumerical and `-`. - if (code === 45 || asciiAlphanumeric(code)) { - effects.consume(code) - return tagClose - } - return tagCloseBetween(code) - } - - /** - * In closing tag, after tag name. - * - * ```markdown - * > | a
    c - * ^ - * ``` - * - * @type {State} - */ - function tagCloseBetween(code) { - if (markdownLineEnding(code)) { - returnState = tagCloseBetween - return lineEndingBefore(code) - } - if (markdownSpace(code)) { - effects.consume(code) - return tagCloseBetween - } - return end(code) - } - - /** - * After ` | a c - * ^ - * ``` - * - * @type {State} - */ - function tagOpen(code) { - // ASCII alphanumerical and `-`. - if (code === 45 || asciiAlphanumeric(code)) { - effects.consume(code) - return tagOpen - } - if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) { - return tagOpenBetween(code) - } - return nok(code) - } - - /** - * In opening tag, after tag name. - * - * ```markdown - * > | a c - * ^ - * ``` - * - * @type {State} - */ - function tagOpenBetween(code) { - if (code === 47) { - effects.consume(code) - return end - } - - // ASCII alphabetical and `:` and `_`. - if (code === 58 || code === 95 || asciiAlpha(code)) { - effects.consume(code) - return tagOpenAttributeName - } - if (markdownLineEnding(code)) { - returnState = tagOpenBetween - return lineEndingBefore(code) - } - if (markdownSpace(code)) { - effects.consume(code) - return tagOpenBetween - } - return end(code) - } - - /** - * In attribute name. - * - * ```markdown - * > | a d - * ^ - * ``` - * - * @type {State} - */ - function tagOpenAttributeName(code) { - // ASCII alphabetical and `-`, `.`, `:`, and `_`. - if ( - code === 45 || - code === 46 || - code === 58 || - code === 95 || - asciiAlphanumeric(code) - ) { - effects.consume(code) - return tagOpenAttributeName - } - return tagOpenAttributeNameAfter(code) - } - - /** - * After attribute name, before initializer, the end of the tag, or - * whitespace. - * - * ```markdown - * > | a d - * ^ - * ``` - * - * @type {State} - */ - function tagOpenAttributeNameAfter(code) { - if (code === 61) { - effects.consume(code) - return tagOpenAttributeValueBefore - } - if (markdownLineEnding(code)) { - returnState = tagOpenAttributeNameAfter - return lineEndingBefore(code) - } - if (markdownSpace(code)) { - effects.consume(code) - return tagOpenAttributeNameAfter - } - return tagOpenBetween(code) - } - - /** - * Before unquoted, double quoted, or single quoted attribute value, allowing - * whitespace. - * - * ```markdown - * > | a e - * ^ - * ``` - * - * @type {State} - */ - function tagOpenAttributeValueBefore(code) { - if ( - code === null || - code === 60 || - code === 61 || - code === 62 || - code === 96 - ) { - return nok(code) - } - if (code === 34 || code === 39) { - effects.consume(code) - marker = code - return tagOpenAttributeValueQuoted - } - if (markdownLineEnding(code)) { - returnState = tagOpenAttributeValueBefore - return lineEndingBefore(code) - } - if (markdownSpace(code)) { - effects.consume(code) - return tagOpenAttributeValueBefore - } - effects.consume(code) - return tagOpenAttributeValueUnquoted - } - - /** - * In double or single quoted attribute value. - * - * ```markdown - * > | a e - * ^ - * ``` - * - * @type {State} - */ - function tagOpenAttributeValueQuoted(code) { - if (code === marker) { - effects.consume(code) - marker = undefined - return tagOpenAttributeValueQuotedAfter - } - if (code === null) { - return nok(code) - } - if (markdownLineEnding(code)) { - returnState = tagOpenAttributeValueQuoted - return lineEndingBefore(code) - } - effects.consume(code) - return tagOpenAttributeValueQuoted - } - - /** - * In unquoted attribute value. - * - * ```markdown - * > | a e - * ^ - * ``` - * - * @type {State} - */ - function tagOpenAttributeValueUnquoted(code) { - if ( - code === null || - code === 34 || - code === 39 || - code === 60 || - code === 61 || - code === 96 - ) { - return nok(code) - } - if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) { - return tagOpenBetween(code) - } - effects.consume(code) - return tagOpenAttributeValueUnquoted - } - - /** - * After double or single quoted attribute value, before whitespace or the end - * of the tag. - * - * ```markdown - * > | a e - * ^ - * ``` - * - * @type {State} - */ - function tagOpenAttributeValueQuotedAfter(code) { - if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) { - return tagOpenBetween(code) - } - return nok(code) - } - - /** - * In certain circumstances of a tag where only an `>` is allowed. - * - * ```markdown - * > | a e - * ^ - * ``` - * - * @type {State} - */ - function end(code) { - if (code === 62) { - effects.consume(code) - effects.exit('htmlTextData') - effects.exit('htmlText') - return ok - } - return nok(code) - } - - /** - * At eol. - * - * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about - * > empty tokens. - * - * ```markdown - * > | a - * ``` - * - * @type {State} - */ - function lineEndingBefore(code) { - effects.exit('htmlTextData') - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return lineEndingAfter - } - - /** - * After eol, at optional whitespace. - * - * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about - * > empty tokens. - * - * ```markdown - * | a - * ^ - * ``` - * - * @type {State} - */ - function lineEndingAfter(code) { - // Always populated by defaults. - - return markdownSpace(code) - ? factorySpace( - effects, - lineEndingAfterPrefix, - 'linePrefix', - self.parser.constructs.disable.null.includes('codeIndented') - ? undefined - : 4 - )(code) - : lineEndingAfterPrefix(code) - } - - /** - * After eol, after optional whitespace. - * - * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about - * > empty tokens. - * - * ```markdown - * | a - * ^ - * ``` - * - * @type {State} - */ - function lineEndingAfterPrefix(code) { - effects.enter('htmlTextData') - return returnState(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/label-start-link.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - - -/** @type {Construct} */ -const labelStartLink = { - name: 'labelStartLink', - tokenize: tokenizeLabelStartLink, - resolveAll: labelEnd.resolveAll -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeLabelStartLink(effects, ok, nok) { - const self = this - return start - - /** - * Start of label (link) start. - * - * ```markdown - * > | a [b] c - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter('labelLink') - effects.enter('labelMarker') - effects.consume(code) - effects.exit('labelMarker') - effects.exit('labelLink') - return after - } - - /** @type {State} */ - function after(code) { - // To do: this isn’t needed in `micromark-extension-gfm-footnote`, - // remove. - // Hidden footnotes hook. - /* c8 ignore next 3 */ - return code === 94 && '_hiddenFootnoteSupport' in self.parser.constructs - ? nok(code) - : ok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/hard-break-escape.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - -/** @type {Construct} */ -const hardBreakEscape = { - name: 'hardBreakEscape', - tokenize: tokenizeHardBreakEscape -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeHardBreakEscape(effects, ok, nok) { - return start - - /** - * Start of a hard break (escape). - * - * ```markdown - * > | a\ - * ^ - * | b - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter('hardBreakEscape') - effects.consume(code) - return after - } - - /** - * After `\`, at eol. - * - * ```markdown - * > | a\ - * ^ - * | b - * ``` - * - * @type {State} - */ - function after(code) { - if (markdownLineEnding(code)) { - effects.exit('hardBreakEscape') - return ok(code) - } - return nok(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/code-text.js -/** - * @typedef {import('micromark-util-types').Construct} Construct - * @typedef {import('micromark-util-types').Previous} Previous - * @typedef {import('micromark-util-types').Resolver} Resolver - * @typedef {import('micromark-util-types').State} State - * @typedef {import('micromark-util-types').Token} Token - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Tokenizer} Tokenizer - */ - - -/** @type {Construct} */ -const codeText = { - name: 'codeText', - tokenize: tokenizeCodeText, - resolve: resolveCodeText, - previous -} - -// To do: next major: don’t resolve, like `markdown-rs`. -/** @type {Resolver} */ -function resolveCodeText(events) { - let tailExitIndex = events.length - 4 - let headEnterIndex = 3 - /** @type {number} */ - let index - /** @type {number | undefined} */ - let enter - - // If we start and end with an EOL or a space. - if ( - (events[headEnterIndex][1].type === 'lineEnding' || - events[headEnterIndex][1].type === 'space') && - (events[tailExitIndex][1].type === 'lineEnding' || - events[tailExitIndex][1].type === 'space') - ) { - index = headEnterIndex - - // And we have data. - while (++index < tailExitIndex) { - if (events[index][1].type === 'codeTextData') { - // Then we have padding. - events[headEnterIndex][1].type = 'codeTextPadding' - events[tailExitIndex][1].type = 'codeTextPadding' - headEnterIndex += 2 - tailExitIndex -= 2 - break - } - } - } - - // Merge adjacent spaces and data. - index = headEnterIndex - 1 - tailExitIndex++ - while (++index <= tailExitIndex) { - if (enter === undefined) { - if (index !== tailExitIndex && events[index][1].type !== 'lineEnding') { - enter = index - } - } else if ( - index === tailExitIndex || - events[index][1].type === 'lineEnding' - ) { - events[enter][1].type = 'codeTextData' - if (index !== enter + 2) { - events[enter][1].end = events[index - 1][1].end - events.splice(enter + 2, index - enter - 2) - tailExitIndex -= index - enter - 2 - index = enter + 2 - } - enter = undefined - } - } - return events -} - -/** - * @this {TokenizeContext} - * @type {Previous} - */ -function previous(code) { - // If there is a previous code, there will always be a tail. - return ( - code !== 96 || - this.events[this.events.length - 1][1].type === 'characterEscape' - ) -} - -/** - * @this {TokenizeContext} - * @type {Tokenizer} - */ -function tokenizeCodeText(effects, ok, nok) { - const self = this - let sizeOpen = 0 - /** @type {number} */ - let size - /** @type {Token} */ - let token - return start - - /** - * Start of code (text). - * - * ```markdown - * > | `a` - * ^ - * > | \`a` - * ^ - * ``` - * - * @type {State} - */ - function start(code) { - effects.enter('codeText') - effects.enter('codeTextSequence') - return sequenceOpen(code) - } - - /** - * In opening sequence. - * - * ```markdown - * > | `a` - * ^ - * ``` - * - * @type {State} - */ - function sequenceOpen(code) { - if (code === 96) { - effects.consume(code) - sizeOpen++ - return sequenceOpen - } - effects.exit('codeTextSequence') - return between(code) - } - - /** - * Between something and something else. - * - * ```markdown - * > | `a` - * ^^ - * ``` - * - * @type {State} - */ - function between(code) { - // EOF. - if (code === null) { - return nok(code) - } - - // To do: next major: don’t do spaces in resolve, but when compiling, - // like `markdown-rs`. - // Tabs don’t work, and virtual spaces don’t make sense. - if (code === 32) { - effects.enter('space') - effects.consume(code) - effects.exit('space') - return between - } - - // Closing fence? Could also be data. - if (code === 96) { - token = effects.enter('codeTextSequence') - size = 0 - return sequenceClose(code) - } - if (markdownLineEnding(code)) { - effects.enter('lineEnding') - effects.consume(code) - effects.exit('lineEnding') - return between - } - - // Data. - effects.enter('codeTextData') - return data(code) - } - - /** - * In data. - * - * ```markdown - * > | `a` - * ^ - * ``` - * - * @type {State} - */ - function data(code) { - if ( - code === null || - code === 32 || - code === 96 || - markdownLineEnding(code) - ) { - effects.exit('codeTextData') - return between(code) - } - effects.consume(code) - return data - } - - /** - * In closing sequence. - * - * ```markdown - * > | `a` - * ^ - * ``` - * - * @type {State} - */ - function sequenceClose(code) { - // More. - if (code === 96) { - effects.consume(code) - size++ - return sequenceClose - } - - // Done! - if (size === sizeOpen) { - effects.exit('codeTextSequence') - effects.exit('codeText') - return ok(code) - } - - // More or less accents: mark as data. - token.type = 'codeTextData' - return data(code) - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/constructs.js -/** - * @typedef {import('micromark-util-types').Extension} Extension - */ - - - - -/** @satisfies {Extension['document']} */ -const constructs_document = { - [42]: list, - [43]: list, - [45]: list, - [48]: list, - [49]: list, - [50]: list, - [51]: list, - [52]: list, - [53]: list, - [54]: list, - [55]: list, - [56]: list, - [57]: list, - [62]: blockQuote -} - -/** @satisfies {Extension['contentInitial']} */ -const contentInitial = { - [91]: definition -} - -/** @satisfies {Extension['flowInitial']} */ -const flowInitial = { - [-2]: codeIndented, - [-1]: codeIndented, - [32]: codeIndented -} - -/** @satisfies {Extension['flow']} */ -const constructs_flow = { - [35]: headingAtx, - [42]: thematicBreak, - [45]: [setextUnderline, thematicBreak], - [60]: htmlFlow, - [61]: setextUnderline, - [95]: thematicBreak, - [96]: codeFenced, - [126]: codeFenced -} - -/** @satisfies {Extension['string']} */ -const constructs_string = { - [38]: characterReference, - [92]: characterEscape -} - -/** @satisfies {Extension['text']} */ -const constructs_text = { - [-5]: lineEnding, - [-4]: lineEnding, - [-3]: lineEnding, - [33]: labelStartImage, - [38]: characterReference, - [42]: attention, - [60]: [autolink, htmlText], - [91]: labelStartLink, - [92]: [hardBreakEscape, characterEscape], - [93]: labelEnd, - [95]: attention, - [96]: codeText -} - -/** @satisfies {Extension['insideSpan']} */ -const insideSpan = { - null: [attention, resolver] -} - -/** @satisfies {Extension['attentionMarkers']} */ -const attentionMarkers = { - null: [42, 95] -} - -/** @satisfies {Extension['disable']} */ -const disable = { - null: [] -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/parse.js -/** - * @typedef {import('micromark-util-types').Create} Create - * @typedef {import('micromark-util-types').FullNormalizedExtension} FullNormalizedExtension - * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct - * @typedef {import('micromark-util-types').ParseContext} ParseContext - * @typedef {import('micromark-util-types').ParseOptions} ParseOptions - */ - - - - - - - - - -/** - * @param {ParseOptions | null | undefined} [options] - * @returns {ParseContext} - */ -function parse(options) { - const settings = options || {} - const constructs = - /** @type {FullNormalizedExtension} */ - combineExtensions([constructs_namespaceObject, ...(settings.extensions || [])]) - - /** @type {ParseContext} */ - const parser = { - defined: [], - lazy: {}, - constructs, - content: create(content), - document: create(document_document), - flow: create(flow), - string: create(string), - text: create(text_text) - } - return parser - - /** - * @param {InitialConstruct} initial - */ - function create(initial) { - return creator - /** @type {Create} */ - function creator(from) { - return createTokenizer(parser, initial, from) - } - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/preprocess.js -/** - * @typedef {import('micromark-util-types').Chunk} Chunk - * @typedef {import('micromark-util-types').Code} Code - * @typedef {import('micromark-util-types').Encoding} Encoding - * @typedef {import('micromark-util-types').Value} Value - */ - -/** - * @callback Preprocessor - * @param {Value} value - * @param {Encoding | null | undefined} [encoding] - * @param {boolean | null | undefined} [end=false] - * @returns {Array} - */ - -const search = /[\0\t\n\r]/g - -/** - * @returns {Preprocessor} - */ -function preprocess() { - let column = 1 - let buffer = '' - /** @type {boolean | undefined} */ - let start = true - /** @type {boolean | undefined} */ - let atCarriageReturn - return preprocessor - - /** @type {Preprocessor} */ - function preprocessor(value, encoding, end) { - /** @type {Array} */ - const chunks = [] - /** @type {RegExpMatchArray | null} */ - let match - /** @type {number} */ - let next - /** @type {number} */ - let startPosition - /** @type {number} */ - let endPosition - /** @type {Code} */ - let code - - // @ts-expect-error `Buffer` does allow an encoding. - value = buffer + value.toString(encoding) - startPosition = 0 - buffer = '' - if (start) { - // To do: `markdown-rs` actually parses BOMs (byte order mark). - if (value.charCodeAt(0) === 65279) { - startPosition++ - } - start = undefined - } - while (startPosition < value.length) { - search.lastIndex = startPosition - match = search.exec(value) - endPosition = - match && match.index !== undefined ? match.index : value.length - code = value.charCodeAt(endPosition) - if (!match) { - buffer = value.slice(startPosition) - break - } - if (code === 10 && startPosition === endPosition && atCarriageReturn) { - chunks.push(-3) - atCarriageReturn = undefined - } else { - if (atCarriageReturn) { - chunks.push(-5) - atCarriageReturn = undefined - } - if (startPosition < endPosition) { - chunks.push(value.slice(startPosition, endPosition)) - column += endPosition - startPosition - } - switch (code) { - case 0: { - chunks.push(65533) - column++ - break - } - case 9: { - next = Math.ceil(column / 4) * 4 - chunks.push(-2) - while (column++ < next) chunks.push(-1) - break - } - case 10: { - chunks.push(-4) - column = 1 - break - } - default: { - atCarriageReturn = true - column = 1 - } - } - } - startPosition = endPosition + 1 - } - if (end) { - if (atCarriageReturn) chunks.push(-5) - if (buffer) chunks.push(buffer) - chunks.push(null) - } - return chunks - } -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/postprocess.js -/** - * @typedef {import('micromark-util-types').Event} Event - */ - - - -/** - * @param {Array} events - * @returns {Array} - */ -function postprocess(events) { - while (!subtokenize(events)) { - // Empty - } - return events -} - -;// CONCATENATED MODULE: ./node_modules/micromark-util-decode-numeric-character-reference/index.js -/** - * Turn the number (in string form as either hexa- or plain decimal) coming from - * a numeric character reference into a character. - * - * Sort of like `String.fromCharCode(Number.parseInt(value, base))`, but makes - * non-characters and control characters safe. - * - * @param {string} value - * Value to decode. - * @param {number} base - * Numeric base. - * @returns {string} - * Character. - */ -function decodeNumericCharacterReference(value, base) { - const code = Number.parseInt(value, base) - if ( - // C0 except for HT, LF, FF, CR, space. - code < 9 || - code === 11 || - (code > 13 && code < 32) || - // Control character (DEL) of C0, and C1 controls. - (code > 126 && code < 160) || - // Lone high surrogates and low surrogates. - (code > 55295 && code < 57344) || - // Noncharacters. - (code > 64975 && code < 65008) /* eslint-disable no-bitwise */ || - (code & 65535) === 65535 || - (code & 65535) === 65534 /* eslint-enable no-bitwise */ || - // Out of range - code > 1114111 - ) { - return '\uFFFD' - } - return String.fromCharCode(code) -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-decode-string/index.js - - -const characterEscapeOrReference = - /\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi - -/** - * Decode markdown strings (which occur in places such as fenced code info - * strings, destinations, labels, and titles). - * - * The “string” content type allows character escapes and -references. - * This decodes those. - * - * @param {string} value - * Value to decode. - * @returns {string} - * Decoded value. - */ -function decodeString(value) { - return value.replace(characterEscapeOrReference, decode) -} - -/** - * @param {string} $0 - * @param {string} $1 - * @param {string} $2 - * @returns {string} - */ -function decode($0, $1, $2) { - if ($1) { - // Escape. - return $1 - } - - // Reference. - const head = $2.charCodeAt(0) - if (head === 35) { - const head = $2.charCodeAt(1) - const hex = head === 120 || head === 88 - return decodeNumericCharacterReference($2.slice(hex ? 2 : 1), hex ? 16 : 10) - } - return decodeNamedCharacterReference($2) || $0 -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/unist-util-stringify-position/lib/index.js -/** - * @typedef {import('unist').Node} Node - * @typedef {import('unist').Point} Point - * @typedef {import('unist').Position} Position - */ - -/** - * @typedef NodeLike - * @property {string} type - * @property {PositionLike | null | undefined} [position] - * - * @typedef PositionLike - * @property {PointLike | null | undefined} [start] - * @property {PointLike | null | undefined} [end] - * - * @typedef PointLike - * @property {number | null | undefined} [line] - * @property {number | null | undefined} [column] - * @property {number | null | undefined} [offset] - */ - -/** - * Serialize the positional info of a point, position (start and end points), - * or node. - * - * @param {Node | NodeLike | Position | PositionLike | Point | PointLike | null | undefined} [value] - * Node, position, or point. - * @returns {string} - * Pretty printed positional info of a node (`string`). - * - * In the format of a range `ls:cs-le:ce` (when given `node` or `position`) - * or a point `l:c` (when given `point`), where `l` stands for line, `c` for - * column, `s` for `start`, and `e` for end. - * An empty string (`''`) is returned if the given value is neither `node`, - * `position`, nor `point`. - */ -function stringifyPosition(value) { - // Nothing. - if (!value || typeof value !== 'object') { - return '' - } - - // Node. - if ('position' in value || 'type' in value) { - return position(value.position) - } - - // Position. - if ('start' in value || 'end' in value) { - return position(value) - } - - // Point. - if ('line' in value || 'column' in value) { - return point(value) - } - - // ? - return '' -} - -/** - * @param {Point | PointLike | null | undefined} point - * @returns {string} - */ -function point(point) { - return index(point && point.line) + ':' + index(point && point.column) -} - -/** - * @param {Position | PositionLike | null | undefined} pos - * @returns {string} - */ -function position(pos) { - return point(pos && pos.start) + '-' + point(pos && pos.end) -} - -/** - * @param {number | null | undefined} value - * @returns {number} - */ -function index(value) { - return value && typeof value === 'number' ? value : 1 -} - -;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/mdast-util-from-markdown/lib/index.js -/** - * @typedef {import('micromark-util-types').Encoding} Encoding - * @typedef {import('micromark-util-types').Event} Event - * @typedef {import('micromark-util-types').ParseOptions} ParseOptions - * @typedef {import('micromark-util-types').Token} Token - * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext - * @typedef {import('micromark-util-types').Value} Value - * - * @typedef {import('unist').Parent} UnistParent - * @typedef {import('unist').Point} Point - * - * @typedef {import('mdast').PhrasingContent} PhrasingContent - * @typedef {import('mdast').StaticPhrasingContent} StaticPhrasingContent - * @typedef {import('mdast').Content} Content - * @typedef {import('mdast').Break} Break - * @typedef {import('mdast').Blockquote} Blockquote - * @typedef {import('mdast').Code} Code - * @typedef {import('mdast').Definition} Definition - * @typedef {import('mdast').Emphasis} Emphasis - * @typedef {import('mdast').Heading} Heading - * @typedef {import('mdast').HTML} HTML - * @typedef {import('mdast').Image} Image - * @typedef {import('mdast').ImageReference} ImageReference - * @typedef {import('mdast').InlineCode} InlineCode - * @typedef {import('mdast').Link} Link - * @typedef {import('mdast').LinkReference} LinkReference - * @typedef {import('mdast').List} List - * @typedef {import('mdast').ListItem} ListItem - * @typedef {import('mdast').Paragraph} Paragraph - * @typedef {import('mdast').Root} Root - * @typedef {import('mdast').Strong} Strong - * @typedef {import('mdast').Text} Text - * @typedef {import('mdast').ThematicBreak} ThematicBreak - * @typedef {import('mdast').ReferenceType} ReferenceType - * @typedef {import('../index.js').CompileData} CompileData - */ - -/** - * @typedef {Root | Content} Node - * @typedef {Extract} Parent - * - * @typedef {Omit & {type: 'fragment', children: Array}} Fragment - */ - -/** - * @callback Transform - * Extra transform, to change the AST afterwards. - * @param {Root} tree - * Tree to transform. - * @returns {Root | undefined | null | void} - * New tree or nothing (in which case the current tree is used). - * - * @callback Handle - * Handle a token. - * @param {CompileContext} this - * Context. - * @param {Token} token - * Current token. - * @returns {void} - * Nothing. - * - * @typedef {Record} Handles - * Token types mapping to handles - * - * @callback OnEnterError - * Handle the case where the `right` token is open, but it is closed (by the - * `left` token) or because we reached the end of the document. - * @param {Omit} this - * Context. - * @param {Token | undefined} left - * Left token. - * @param {Token} right - * Right token. - * @returns {void} - * Nothing. - * - * @callback OnExitError - * Handle the case where the `right` token is open but it is closed by - * exiting the `left` token. - * @param {Omit} this - * Context. - * @param {Token} left - * Left token. - * @param {Token} right - * Right token. - * @returns {void} - * Nothing. - * - * @typedef {[Token, OnEnterError | undefined]} TokenTuple - * Open token on the stack, with an optional error handler for when - * that token isn’t closed properly. - */ - -/** - * @typedef Config - * Configuration. - * - * We have our defaults, but extensions will add more. - * @property {Array} canContainEols - * Token types where line endings are used. - * @property {Handles} enter - * Opening handles. - * @property {Handles} exit - * Closing handles. - * @property {Array} transforms - * Tree transforms. - * - * @typedef {Partial} Extension - * Change how markdown tokens from micromark are turned into mdast. - * - * @typedef CompileContext - * mdast compiler context. - * @property {Array} stack - * Stack of nodes. - * @property {Array} tokenStack - * Stack of tokens. - * @property {(key: Key) => CompileData[Key]} getData - * Get data from the key/value store. - * @property {(key: Key, value?: CompileData[Key]) => void} setData - * Set data into the key/value store. - * @property {(this: CompileContext) => void} buffer - * Capture some of the output data. - * @property {(this: CompileContext) => string} resume - * Stop capturing and access the output data. - * @property {(this: CompileContext, node: Kind, token: Token, onError?: OnEnterError) => Kind} enter - * Enter a token. - * @property {(this: CompileContext, token: Token, onError?: OnExitError) => Node} exit - * Exit a token. - * @property {TokenizeContext['sliceSerialize']} sliceSerialize - * Get the string value of a token. - * @property {Config} config - * Configuration. - * - * @typedef FromMarkdownOptions - * Configuration for how to build mdast. - * @property {Array> | null | undefined} [mdastExtensions] - * Extensions for this utility to change how tokens are turned into a tree. - * - * @typedef {ParseOptions & FromMarkdownOptions} Options - * Configuration. - */ - -// To do: micromark: create a registry of tokens? -// To do: next major: don’t return given `Node` from `enter`. -// To do: next major: remove setter/getter. - - - - - - - - - - -const lib_own = {}.hasOwnProperty - -/** - * @param value - * Markdown to parse. - * @param encoding - * Character encoding for when `value` is `Buffer`. - * @param options - * Configuration. - * @returns - * mdast tree. - */ -const fromMarkdown = - /** - * @type {( - * ((value: Value, encoding: Encoding, options?: Options | null | undefined) => Root) & - * ((value: Value, options?: Options | null | undefined) => Root) - * )} - */ - - /** - * @param {Value} value - * @param {Encoding | Options | null | undefined} [encoding] - * @param {Options | null | undefined} [options] - * @returns {Root} - */ - function (value, encoding, options) { - if (typeof encoding !== 'string') { - options = encoding - encoding = undefined - } - return compiler(options)( - postprocess( - parse(options).document().write(preprocess()(value, encoding, true)) - ) - ) - } - -/** - * Note this compiler only understand complete buffering, not streaming. - * - * @param {Options | null | undefined} [options] - */ -function compiler(options) { - /** @type {Config} */ - const config = { - transforms: [], - canContainEols: ['emphasis', 'fragment', 'heading', 'paragraph', 'strong'], - enter: { - autolink: opener(link), - autolinkProtocol: onenterdata, - autolinkEmail: onenterdata, - atxHeading: opener(heading), - blockQuote: opener(blockQuote), - characterEscape: onenterdata, - characterReference: onenterdata, - codeFenced: opener(codeFlow), - codeFencedFenceInfo: buffer, - codeFencedFenceMeta: buffer, - codeIndented: opener(codeFlow, buffer), - codeText: opener(codeText, buffer), - codeTextData: onenterdata, - data: onenterdata, - codeFlowValue: onenterdata, - definition: opener(definition), - definitionDestinationString: buffer, - definitionLabelString: buffer, - definitionTitleString: buffer, - emphasis: opener(emphasis), - hardBreakEscape: opener(hardBreak), - hardBreakTrailing: opener(hardBreak), - htmlFlow: opener(html, buffer), - htmlFlowData: onenterdata, - htmlText: opener(html, buffer), - htmlTextData: onenterdata, - image: opener(image), - label: buffer, - link: opener(link), - listItem: opener(listItem), - listItemValue: onenterlistitemvalue, - listOrdered: opener(list, onenterlistordered), - listUnordered: opener(list), - paragraph: opener(paragraph), - reference: onenterreference, - referenceString: buffer, - resourceDestinationString: buffer, - resourceTitleString: buffer, - setextHeading: opener(heading), - strong: opener(strong), - thematicBreak: opener(thematicBreak) - }, - exit: { - atxHeading: closer(), - atxHeadingSequence: onexitatxheadingsequence, - autolink: closer(), - autolinkEmail: onexitautolinkemail, - autolinkProtocol: onexitautolinkprotocol, - blockQuote: closer(), - characterEscapeValue: onexitdata, - characterReferenceMarkerHexadecimal: onexitcharacterreferencemarker, - characterReferenceMarkerNumeric: onexitcharacterreferencemarker, - characterReferenceValue: onexitcharacterreferencevalue, - codeFenced: closer(onexitcodefenced), - codeFencedFence: onexitcodefencedfence, - codeFencedFenceInfo: onexitcodefencedfenceinfo, - codeFencedFenceMeta: onexitcodefencedfencemeta, - codeFlowValue: onexitdata, - codeIndented: closer(onexitcodeindented), - codeText: closer(onexitcodetext), - codeTextData: onexitdata, - data: onexitdata, - definition: closer(), - definitionDestinationString: onexitdefinitiondestinationstring, - definitionLabelString: onexitdefinitionlabelstring, - definitionTitleString: onexitdefinitiontitlestring, - emphasis: closer(), - hardBreakEscape: closer(onexithardbreak), - hardBreakTrailing: closer(onexithardbreak), - htmlFlow: closer(onexithtmlflow), - htmlFlowData: onexitdata, - htmlText: closer(onexithtmltext), - htmlTextData: onexitdata, - image: closer(onexitimage), - label: onexitlabel, - labelText: onexitlabeltext, - lineEnding: onexitlineending, - link: closer(onexitlink), - listItem: closer(), - listOrdered: closer(), - listUnordered: closer(), - paragraph: closer(), - referenceString: onexitreferencestring, - resourceDestinationString: onexitresourcedestinationstring, - resourceTitleString: onexitresourcetitlestring, - resource: onexitresource, - setextHeading: closer(onexitsetextheading), - setextHeadingLineSequence: onexitsetextheadinglinesequence, - setextHeadingText: onexitsetextheadingtext, - strong: closer(), - thematicBreak: closer() - } - } - configure(config, (options || {}).mdastExtensions || []) - - /** @type {CompileData} */ - const data = {} - return compile - - /** - * Turn micromark events into an mdast tree. - * - * @param {Array} events - * Events. - * @returns {Root} - * mdast tree. - */ - function compile(events) { - /** @type {Root} */ - let tree = { - type: 'root', - children: [] - } - /** @type {Omit} */ - const context = { - stack: [tree], - tokenStack: [], - config, - enter, - exit, - buffer, - resume, - setData, - getData - } - /** @type {Array} */ - const listStack = [] - let index = -1 - while (++index < events.length) { - // We preprocess lists to add `listItem` tokens, and to infer whether - // items the list itself are spread out. - if ( - events[index][1].type === 'listOrdered' || - events[index][1].type === 'listUnordered' - ) { - if (events[index][0] === 'enter') { - listStack.push(index) - } else { - const tail = listStack.pop() - index = prepareList(events, tail, index) - } - } - } - index = -1 - while (++index < events.length) { - const handler = config[events[index][0]] - if (lib_own.call(handler, events[index][1].type)) { - handler[events[index][1].type].call( - Object.assign( - { - sliceSerialize: events[index][2].sliceSerialize - }, - context - ), - events[index][1] - ) - } - } - - // Handle tokens still being open. - if (context.tokenStack.length > 0) { - const tail = context.tokenStack[context.tokenStack.length - 1] - const handler = tail[1] || defaultOnError - handler.call(context, undefined, tail[0]) - } - - // Figure out `root` position. - tree.position = { - start: lib_point( - events.length > 0 - ? events[0][1].start - : { - line: 1, - column: 1, - offset: 0 - } - ), - end: lib_point( - events.length > 0 - ? events[events.length - 2][1].end - : { - line: 1, - column: 1, - offset: 0 - } - ) - } - - // Call transforms. - index = -1 - while (++index < config.transforms.length) { - tree = config.transforms[index](tree) || tree - } - return tree - } - - /** - * @param {Array} events - * @param {number} start - * @param {number} length - * @returns {number} - */ - function prepareList(events, start, length) { - let index = start - 1 - let containerBalance = -1 - let listSpread = false - /** @type {Token | undefined} */ - let listItem - /** @type {number | undefined} */ - let lineIndex - /** @type {number | undefined} */ - let firstBlankLineIndex - /** @type {boolean | undefined} */ - let atMarker - while (++index <= length) { - const event = events[index] - if ( - event[1].type === 'listUnordered' || - event[1].type === 'listOrdered' || - event[1].type === 'blockQuote' - ) { - if (event[0] === 'enter') { - containerBalance++ - } else { - containerBalance-- - } - atMarker = undefined - } else if (event[1].type === 'lineEndingBlank') { - if (event[0] === 'enter') { - if ( - listItem && - !atMarker && - !containerBalance && - !firstBlankLineIndex - ) { - firstBlankLineIndex = index - } - atMarker = undefined - } - } else if ( - event[1].type === 'linePrefix' || - event[1].type === 'listItemValue' || - event[1].type === 'listItemMarker' || - event[1].type === 'listItemPrefix' || - event[1].type === 'listItemPrefixWhitespace' - ) { - // Empty. - } else { - atMarker = undefined - } - if ( - (!containerBalance && - event[0] === 'enter' && - event[1].type === 'listItemPrefix') || - (containerBalance === -1 && - event[0] === 'exit' && - (event[1].type === 'listUnordered' || - event[1].type === 'listOrdered')) - ) { - if (listItem) { - let tailIndex = index - lineIndex = undefined - while (tailIndex--) { - const tailEvent = events[tailIndex] - if ( - tailEvent[1].type === 'lineEnding' || - tailEvent[1].type === 'lineEndingBlank' - ) { - if (tailEvent[0] === 'exit') continue - if (lineIndex) { - events[lineIndex][1].type = 'lineEndingBlank' - listSpread = true - } - tailEvent[1].type = 'lineEnding' - lineIndex = tailIndex - } else if ( - tailEvent[1].type === 'linePrefix' || - tailEvent[1].type === 'blockQuotePrefix' || - tailEvent[1].type === 'blockQuotePrefixWhitespace' || - tailEvent[1].type === 'blockQuoteMarker' || - tailEvent[1].type === 'listItemIndent' - ) { - // Empty - } else { - break - } - } - if ( - firstBlankLineIndex && - (!lineIndex || firstBlankLineIndex < lineIndex) - ) { - listItem._spread = true - } - - // Fix position. - listItem.end = Object.assign( - {}, - lineIndex ? events[lineIndex][1].start : event[1].end - ) - events.splice(lineIndex || index, 0, ['exit', listItem, event[2]]) - index++ - length++ - } - - // Create a new list item. - if (event[1].type === 'listItemPrefix') { - listItem = { - type: 'listItem', - _spread: false, - start: Object.assign({}, event[1].start), - // @ts-expect-error: we’ll add `end` in a second. - end: undefined - } - // @ts-expect-error: `listItem` is most definitely defined, TS... - events.splice(index, 0, ['enter', listItem, event[2]]) - index++ - length++ - firstBlankLineIndex = undefined - atMarker = true - } - } - } - events[start][1]._spread = listSpread - return length - } - - /** - * Set data. - * - * @template {keyof CompileData} Key - * Field type. - * @param {Key} key - * Key of field. - * @param {CompileData[Key]} [value] - * New value. - * @returns {void} - * Nothing. - */ - function setData(key, value) { - data[key] = value - } - - /** - * Get data. - * - * @template {keyof CompileData} Key - * Field type. - * @param {Key} key - * Key of field. - * @returns {CompileData[Key]} - * Value. - */ - function getData(key) { - return data[key] - } - - /** - * Create an opener handle. - * - * @param {(token: Token) => Node} create - * Create a node. - * @param {Handle} [and] - * Optional function to also run. - * @returns {Handle} - * Handle. - */ - function opener(create, and) { - return open - - /** - * @this {CompileContext} - * @param {Token} token - * @returns {void} - */ - function open(token) { - enter.call(this, create(token), token) - if (and) and.call(this, token) - } - } - - /** - * @this {CompileContext} - * @returns {void} - */ - function buffer() { - this.stack.push({ - type: 'fragment', - children: [] - }) - } - - /** - * @template {Node} Kind - * Node type. - * @this {CompileContext} - * Context. - * @param {Kind} node - * Node to enter. - * @param {Token} token - * Corresponding token. - * @param {OnEnterError | undefined} [errorHandler] - * Handle the case where this token is open, but it is closed by something else. - * @returns {Kind} - * The given node. - */ - function enter(node, token, errorHandler) { - const parent = this.stack[this.stack.length - 1] - // @ts-expect-error: Assume `Node` can exist as a child of `parent`. - parent.children.push(node) - this.stack.push(node) - this.tokenStack.push([token, errorHandler]) - // @ts-expect-error: `end` will be patched later. - node.position = { - start: lib_point(token.start) - } - return node - } - - /** - * Create a closer handle. - * - * @param {Handle} [and] - * Optional function to also run. - * @returns {Handle} - * Handle. - */ - function closer(and) { - return close - - /** - * @this {CompileContext} - * @param {Token} token - * @returns {void} - */ - function close(token) { - if (and) and.call(this, token) - exit.call(this, token) - } - } - - /** - * @this {CompileContext} - * Context. - * @param {Token} token - * Corresponding token. - * @param {OnExitError | undefined} [onExitError] - * Handle the case where another token is open. - * @returns {Node} - * The closed node. - */ - function exit(token, onExitError) { - const node = this.stack.pop() - const open = this.tokenStack.pop() - if (!open) { - throw new Error( - 'Cannot close `' + - token.type + - '` (' + - stringifyPosition({ - start: token.start, - end: token.end - }) + - '): it’s not open' - ) - } else if (open[0].type !== token.type) { - if (onExitError) { - onExitError.call(this, token, open[0]) - } else { - const handler = open[1] || defaultOnError - handler.call(this, token, open[0]) - } - } - node.position.end = lib_point(token.end) - return node - } - - /** - * @this {CompileContext} - * @returns {string} - */ - function resume() { - return lib_toString(this.stack.pop()) - } - - // - // Handlers. - // - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onenterlistordered() { - setData('expectingFirstListItemValue', true) - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onenterlistitemvalue(token) { - if (getData('expectingFirstListItemValue')) { - const ancestor = this.stack[this.stack.length - 2] - ancestor.start = Number.parseInt(this.sliceSerialize(token), 10) - setData('expectingFirstListItemValue') - } - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitcodefencedfenceinfo() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.lang = data - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitcodefencedfencemeta() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.meta = data - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitcodefencedfence() { - // Exit if this is the closing fence. - if (getData('flowCodeInside')) return - this.buffer() - setData('flowCodeInside', true) - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitcodefenced() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.value = data.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g, '') - setData('flowCodeInside') - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitcodeindented() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.value = data.replace(/(\r?\n|\r)$/g, '') - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitdefinitionlabelstring(token) { - const label = this.resume() - const node = this.stack[this.stack.length - 1] - node.label = label - node.identifier = normalizeIdentifier( - this.sliceSerialize(token) - ).toLowerCase() - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitdefinitiontitlestring() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.title = data - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitdefinitiondestinationstring() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.url = data - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitatxheadingsequence(token) { - const node = this.stack[this.stack.length - 1] - if (!node.depth) { - const depth = this.sliceSerialize(token).length - node.depth = depth - } - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitsetextheadingtext() { - setData('setextHeadingSlurpLineEnding', true) - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitsetextheadinglinesequence(token) { - const node = this.stack[this.stack.length - 1] - node.depth = this.sliceSerialize(token).charCodeAt(0) === 61 ? 1 : 2 - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitsetextheading() { - setData('setextHeadingSlurpLineEnding') - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onenterdata(token) { - const node = this.stack[this.stack.length - 1] - let tail = node.children[node.children.length - 1] - if (!tail || tail.type !== 'text') { - // Add a new text node. - tail = text() - // @ts-expect-error: we’ll add `end` later. - tail.position = { - start: lib_point(token.start) - } - // @ts-expect-error: Assume `parent` accepts `text`. - node.children.push(tail) - } - this.stack.push(tail) - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitdata(token) { - const tail = this.stack.pop() - tail.value += this.sliceSerialize(token) - tail.position.end = lib_point(token.end) - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitlineending(token) { - const context = this.stack[this.stack.length - 1] - // If we’re at a hard break, include the line ending in there. - if (getData('atHardBreak')) { - const tail = context.children[context.children.length - 1] - tail.position.end = lib_point(token.end) - setData('atHardBreak') - return - } - if ( - !getData('setextHeadingSlurpLineEnding') && - config.canContainEols.includes(context.type) - ) { - onenterdata.call(this, token) - onexitdata.call(this, token) - } - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexithardbreak() { - setData('atHardBreak', true) - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexithtmlflow() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.value = data - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexithtmltext() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.value = data - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitcodetext() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.value = data - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitlink() { - const node = this.stack[this.stack.length - 1] - // Note: there are also `identifier` and `label` fields on this link node! - // These are used / cleaned here. - // To do: clean. - if (getData('inReference')) { - /** @type {ReferenceType} */ - const referenceType = getData('referenceType') || 'shortcut' - node.type += 'Reference' - // @ts-expect-error: mutate. - node.referenceType = referenceType - // @ts-expect-error: mutate. - delete node.url - delete node.title - } else { - // @ts-expect-error: mutate. - delete node.identifier - // @ts-expect-error: mutate. - delete node.label - } - setData('referenceType') - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitimage() { - const node = this.stack[this.stack.length - 1] - // Note: there are also `identifier` and `label` fields on this link node! - // These are used / cleaned here. - // To do: clean. - if (getData('inReference')) { - /** @type {ReferenceType} */ - const referenceType = getData('referenceType') || 'shortcut' - node.type += 'Reference' - // @ts-expect-error: mutate. - node.referenceType = referenceType - // @ts-expect-error: mutate. - delete node.url - delete node.title - } else { - // @ts-expect-error: mutate. - delete node.identifier - // @ts-expect-error: mutate. - delete node.label - } - setData('referenceType') - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitlabeltext(token) { - const string = this.sliceSerialize(token) - const ancestor = this.stack[this.stack.length - 2] - // @ts-expect-error: stash this on the node, as it might become a reference - // later. - ancestor.label = decodeString(string) - // @ts-expect-error: same as above. - ancestor.identifier = normalizeIdentifier(string).toLowerCase() - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitlabel() { - const fragment = this.stack[this.stack.length - 1] - const value = this.resume() - const node = this.stack[this.stack.length - 1] - // Assume a reference. - setData('inReference', true) - if (node.type === 'link') { - /** @type {Array} */ - // @ts-expect-error: Assume static phrasing content. - const children = fragment.children - node.children = children - } else { - node.alt = value - } - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitresourcedestinationstring() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.url = data - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitresourcetitlestring() { - const data = this.resume() - const node = this.stack[this.stack.length - 1] - node.title = data - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitresource() { - setData('inReference') - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onenterreference() { - setData('referenceType', 'collapsed') - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitreferencestring(token) { - const label = this.resume() - const node = this.stack[this.stack.length - 1] - // @ts-expect-error: stash this on the node, as it might become a reference - // later. - node.label = label - // @ts-expect-error: same as above. - node.identifier = normalizeIdentifier( - this.sliceSerialize(token) - ).toLowerCase() - setData('referenceType', 'full') - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - - function onexitcharacterreferencemarker(token) { - setData('characterReferenceType', token.type) - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitcharacterreferencevalue(token) { - const data = this.sliceSerialize(token) - const type = getData('characterReferenceType') - /** @type {string} */ - let value - if (type) { - value = decodeNumericCharacterReference( - data, - type === 'characterReferenceMarkerNumeric' ? 10 : 16 - ) - setData('characterReferenceType') - } else { - const result = decodeNamedCharacterReference(data) - value = result - } - const tail = this.stack.pop() - tail.value += value - tail.position.end = lib_point(token.end) - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitautolinkprotocol(token) { - onexitdata.call(this, token) - const node = this.stack[this.stack.length - 1] - node.url = this.sliceSerialize(token) - } - - /** - * @this {CompileContext} - * @type {Handle} - */ - function onexitautolinkemail(token) { - onexitdata.call(this, token) - const node = this.stack[this.stack.length - 1] - node.url = 'mailto:' + this.sliceSerialize(token) - } - - // - // Creaters. - // - - /** @returns {Blockquote} */ - function blockQuote() { - return { - type: 'blockquote', - children: [] - } - } - - /** @returns {Code} */ - function codeFlow() { - return { - type: 'code', - lang: null, - meta: null, - value: '' - } - } - - /** @returns {InlineCode} */ - function codeText() { - return { - type: 'inlineCode', - value: '' - } - } - - /** @returns {Definition} */ - function definition() { - return { - type: 'definition', - identifier: '', - label: null, - title: null, - url: '' - } - } - - /** @returns {Emphasis} */ - function emphasis() { - return { - type: 'emphasis', - children: [] - } - } - - /** @returns {Heading} */ - function heading() { - // @ts-expect-error `depth` will be set later. - return { - type: 'heading', - depth: undefined, - children: [] - } - } - - /** @returns {Break} */ - function hardBreak() { - return { - type: 'break' - } - } - - /** @returns {HTML} */ - function html() { - return { - type: 'html', - value: '' - } - } - - /** @returns {Image} */ - function image() { - return { - type: 'image', - title: null, - url: '', - alt: null - } - } - - /** @returns {Link} */ - function link() { - return { - type: 'link', - title: null, - url: '', - children: [] - } - } - - /** - * @param {Token} token - * @returns {List} - */ - function list(token) { - return { - type: 'list', - ordered: token.type === 'listOrdered', - start: null, - spread: token._spread, - children: [] - } - } - - /** - * @param {Token} token - * @returns {ListItem} - */ - function listItem(token) { - return { - type: 'listItem', - spread: token._spread, - checked: null, - children: [] - } - } - - /** @returns {Paragraph} */ - function paragraph() { - return { - type: 'paragraph', - children: [] - } - } - - /** @returns {Strong} */ - function strong() { - return { - type: 'strong', - children: [] - } - } - - /** @returns {Text} */ - function text() { - return { - type: 'text', - value: '' - } - } - - /** @returns {ThematicBreak} */ - function thematicBreak() { - return { - type: 'thematicBreak' - } - } -} - -/** - * Copy a point-like value. - * - * @param {Point} d - * Point-like value. - * @returns {Point} - * unist point. - */ -function lib_point(d) { - return { - line: d.line, - column: d.column, - offset: d.offset - } -} - -/** - * @param {Config} combined - * @param {Array>} extensions - * @returns {void} - */ -function configure(combined, extensions) { - let index = -1 - while (++index < extensions.length) { - const value = extensions[index] - if (Array.isArray(value)) { - configure(combined, value) - } else { - extension(combined, value) - } - } -} - -/** - * @param {Config} combined - * @param {Extension} extension - * @returns {void} - */ -function extension(combined, extension) { - /** @type {keyof Extension} */ - let key - for (key in extension) { - if (lib_own.call(extension, key)) { - if (key === 'canContainEols') { - const right = extension[key] - if (right) { - combined[key].push(...right) - } - } else if (key === 'transforms') { - const right = extension[key] - if (right) { - combined[key].push(...right) - } - } else if (key === 'enter' || key === 'exit') { - const right = extension[key] - if (right) { - Object.assign(combined[key], right) - } - } - } - } -} - -/** @type {OnEnterError} */ -function defaultOnError(left, right) { - if (left) { - throw new Error( - 'Cannot close `' + - left.type + - '` (' + - stringifyPosition({ - start: left.start, - end: left.end - }) + - '): a different token (`' + - right.type + - '`, ' + - stringifyPosition({ - start: right.start, - end: right.end - }) + - ') is open' - ) - } else { - throw new Error( - 'Cannot close document, a token (`' + - right.type + - '`, ' + - stringifyPosition({ - start: right.start, - end: right.end - }) + - ') is still open' - ) - } -} - -// EXTERNAL MODULE: ./node_modules/ts-dedent/esm/index.js -var esm = __webpack_require__(60513); -;// CONCATENATED MODULE: ./node_modules/mermaid/dist/createText-2e5e7dd3.js - - - -function preprocessMarkdown(markdown) { - const withoutMultipleNewlines = markdown.replace(/\n{2,}/g, "\n"); - const withoutExtraSpaces = (0,esm/* dedent */.T)(withoutMultipleNewlines); - return withoutExtraSpaces; -} -function markdownToLines(markdown) { - const preprocessedMarkdown = preprocessMarkdown(markdown); - const { children } = fromMarkdown(preprocessedMarkdown); - const lines = [[]]; - let currentLine = 0; - function processNode(node, parentType = "normal") { - if (node.type === "text") { - const textLines = node.value.split("\n"); - textLines.forEach((textLine, index) => { - if (index !== 0) { - currentLine++; - lines.push([]); - } - textLine.split(" ").forEach((word) => { - if (word) { - lines[currentLine].push({ content: word, type: parentType }); - } - }); - }); - } else if (node.type === "strong" || node.type === "emphasis") { - node.children.forEach((contentNode) => { - processNode(contentNode, node.type); - }); - } - } - children.forEach((treeNode) => { - if (treeNode.type === "paragraph") { - treeNode.children.forEach((contentNode) => { - processNode(contentNode); - }); - } - }); - return lines; -} -function markdownToHTML(markdown) { - const { children } = fromMarkdown(markdown); - function output(node) { - if (node.type === "text") { - return node.value.replace(/\n/g, "
    "); - } else if (node.type === "strong") { - return `${node.children.map(output).join("")}`; - } else if (node.type === "emphasis") { - return `${node.children.map(output).join("")}`; - } else if (node.type === "paragraph") { - return `

    ${node.children.map(output).join("")}

    `; - } - return `Unsupported markdown: ${node.type}`; - } - return children.map(output).join(""); -} -function splitTextToChars(text) { - if (Intl.Segmenter) { - return [...new Intl.Segmenter().segment(text)].map((s) => s.segment); - } - return [...text]; -} -function splitWordToFitWidth(checkFit, word) { - const characters = splitTextToChars(word.content); - return splitWordToFitWidthRecursion(checkFit, [], characters, word.type); -} -function splitWordToFitWidthRecursion(checkFit, usedChars, remainingChars, type) { - if (remainingChars.length === 0) { - return [ - { content: usedChars.join(""), type }, - { content: "", type } - ]; - } - const [nextChar, ...rest] = remainingChars; - const newWord = [...usedChars, nextChar]; - if (checkFit([{ content: newWord.join(""), type }])) { - return splitWordToFitWidthRecursion(checkFit, newWord, rest, type); - } - if (usedChars.length === 0 && nextChar) { - usedChars.push(nextChar); - remainingChars.shift(); - } - return [ - { content: usedChars.join(""), type }, - { content: remainingChars.join(""), type } - ]; -} -function splitLineToFitWidth(line, checkFit) { - if (line.some(({ content }) => content.includes("\n"))) { - throw new Error("splitLineToFitWidth does not support newlines in the line"); - } - return splitLineToFitWidthRecursion(line, checkFit); -} -function splitLineToFitWidthRecursion(words, checkFit, lines = [], newLine = []) { - if (words.length === 0) { - if (newLine.length > 0) { - lines.push(newLine); - } - return lines.length > 0 ? lines : []; - } - let joiner = ""; - if (words[0].content === " ") { - joiner = " "; - words.shift(); - } - const nextWord = words.shift() ?? { content: " ", type: "normal" }; - const lineWithNextWord = [...newLine]; - if (joiner !== "") { - lineWithNextWord.push({ content: joiner, type: "normal" }); - } - lineWithNextWord.push(nextWord); - if (checkFit(lineWithNextWord)) { - return splitLineToFitWidthRecursion(words, checkFit, lines, lineWithNextWord); - } - if (newLine.length > 0) { - lines.push(newLine); - words.unshift(nextWord); - } else if (nextWord.content) { - const [line, rest] = splitWordToFitWidth(checkFit, nextWord); - lines.push([line]); - if (rest.content) { - words.unshift(rest); - } - } - return splitLineToFitWidthRecursion(words, checkFit, lines); -} -function applyStyle(dom, styleFn) { - if (styleFn) { - dom.attr("style", styleFn); - } -} -function addHtmlSpan(element, node, width, classes, addBackground = false) { - const fo = element.append("foreignObject"); - const div = fo.append("xhtml:div"); - const label = node.label; - const labelClass = node.isNode ? "nodeLabel" : "edgeLabel"; - div.html( - ` - " + label + "" - ); - applyStyle(div, node.labelStyle); - div.style("display", "table-cell"); - div.style("white-space", "nowrap"); - div.style("max-width", width + "px"); - div.attr("xmlns", "http://www.w3.org/1999/xhtml"); - if (addBackground) { - div.attr("class", "labelBkg"); - } - let bbox = div.node().getBoundingClientRect(); - if (bbox.width === width) { - div.style("display", "table"); - div.style("white-space", "break-spaces"); - div.style("width", width + "px"); - bbox = div.node().getBoundingClientRect(); - } - fo.style("width", bbox.width); - fo.style("height", bbox.height); - return fo.node(); -} -function createTspan(textElement, lineIndex, lineHeight) { - return textElement.append("tspan").attr("class", "text-outer-tspan").attr("x", 0).attr("y", lineIndex * lineHeight - 0.1 + "em").attr("dy", lineHeight + "em"); -} -function computeWidthOfText(parentNode, lineHeight, line) { - const testElement = parentNode.append("text"); - const testSpan = createTspan(testElement, 1, lineHeight); - updateTextContentAndStyles(testSpan, line); - const textLength = testSpan.node().getComputedTextLength(); - testElement.remove(); - return textLength; -} -function computeDimensionOfText(parentNode, lineHeight, text) { - var _a; - const testElement = parentNode.append("text"); - const testSpan = createTspan(testElement, 1, lineHeight); - updateTextContentAndStyles(testSpan, [{ content: text, type: "normal" }]); - const textDimension = (_a = testSpan.node()) == null ? void 0 : _a.getBoundingClientRect(); - if (textDimension) { - testElement.remove(); - } - return textDimension; -} -function createFormattedText(width, g, structuredText, addBackground = false) { - const lineHeight = 1.1; - const labelGroup = g.append("g"); - const bkg = labelGroup.insert("rect").attr("class", "background"); - const textElement = labelGroup.append("text").attr("y", "-10.1"); - let lineIndex = 0; - for (const line of structuredText) { - const checkWidth = (line2) => computeWidthOfText(labelGroup, lineHeight, line2) <= width; - const linesUnderWidth = checkWidth(line) ? [line] : splitLineToFitWidth(line, checkWidth); - for (const preparedLine of linesUnderWidth) { - const tspan = createTspan(textElement, lineIndex, lineHeight); - updateTextContentAndStyles(tspan, preparedLine); - lineIndex++; - } - } - if (addBackground) { - const bbox = textElement.node().getBBox(); - const padding = 2; - bkg.attr("x", -padding).attr("y", -padding).attr("width", bbox.width + 2 * padding).attr("height", bbox.height + 2 * padding); - return labelGroup.node(); - } else { - return textElement.node(); - } -} -function updateTextContentAndStyles(tspan, wrappedLine) { - tspan.text(""); - wrappedLine.forEach((word, index) => { - const innerTspan = tspan.append("tspan").attr("font-style", word.type === "emphasis" ? "italic" : "normal").attr("class", "text-inner-tspan").attr("font-weight", word.type === "strong" ? "bold" : "normal"); - if (index === 0) { - innerTspan.text(word.content); - } else { - innerTspan.text(" " + word.content); - } - }); -} -const createText = (el, text = "", { - style = "", - isTitle = false, - classes = "", - useHtmlLabels = true, - isNode = true, - width = 200, - addSvgBackground = false -} = {}) => { - mermaid_b5860b54.l.info("createText", text, style, isTitle, classes, useHtmlLabels, isNode, addSvgBackground); - if (useHtmlLabels) { - const htmlText = markdownToHTML(text); - const node = { - isNode, - label: (0,mermaid_b5860b54.M)(htmlText).replace( - /fa[blrs]?:fa-[\w-]+/g, - // cspell: disable-line - (s) => `` - ), - labelStyle: style.replace("fill:", "color:") - }; - const vertexNode = addHtmlSpan(el, node, width, classes, addSvgBackground); - return vertexNode; - } else { - const structuredText = markdownToLines(text); - const svgLabel = createFormattedText(width, el, structuredText, addSvgBackground); - return svgLabel; - } -}; - - - -/***/ }), - -/***/ 88146: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ a: () => (/* binding */ insertMarkers$1), -/* harmony export */ b: () => (/* binding */ clear$1), -/* harmony export */ c: () => (/* binding */ createLabel$1), -/* harmony export */ d: () => (/* binding */ clear), -/* harmony export */ e: () => (/* binding */ insertNode), -/* harmony export */ f: () => (/* binding */ insertEdgeLabel), -/* harmony export */ g: () => (/* binding */ getSubGraphTitleMargins), -/* harmony export */ h: () => (/* binding */ insertEdge), -/* harmony export */ i: () => (/* binding */ intersectRect$1), -/* harmony export */ j: () => (/* binding */ positionEdgeLabel), -/* harmony export */ k: () => (/* binding */ getLineFunctionsWithOffset), -/* harmony export */ l: () => (/* binding */ labelHelper), -/* harmony export */ m: () => (/* binding */ addEdgeMarkers), -/* harmony export */ p: () => (/* binding */ positionNode), -/* harmony export */ s: () => (/* binding */ setNodeElem), -/* harmony export */ u: () => (/* binding */ updateNodeBounds) -/* harmony export */ }); -/* harmony import */ var _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(86079); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(26312); -/* harmony import */ var _createText_2e5e7dd3_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(73743); - - - -const insertMarkers = (elem, markerArray, type, id) => { - markerArray.forEach((markerName) => { - markers[markerName](elem, type, id); - }); -}; -const extension = (elem, type, id) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.trace("Making markers for ", id); - elem.append("defs").append("marker").attr("id", id + "_" + type + "-extensionStart").attr("class", "marker extension " + type).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 1,7 L18,13 V 1 Z"); - elem.append("defs").append("marker").attr("id", id + "_" + type + "-extensionEnd").attr("class", "marker extension " + type).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 1,1 V 13 L18,7 Z"); -}; -const composition = (elem, type, id) => { - elem.append("defs").append("marker").attr("id", id + "_" + type + "-compositionStart").attr("class", "marker composition " + type).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"); - elem.append("defs").append("marker").attr("id", id + "_" + type + "-compositionEnd").attr("class", "marker composition " + type).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"); -}; -const aggregation = (elem, type, id) => { - elem.append("defs").append("marker").attr("id", id + "_" + type + "-aggregationStart").attr("class", "marker aggregation " + type).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"); - elem.append("defs").append("marker").attr("id", id + "_" + type + "-aggregationEnd").attr("class", "marker aggregation " + type).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"); -}; -const dependency = (elem, type, id) => { - elem.append("defs").append("marker").attr("id", id + "_" + type + "-dependencyStart").attr("class", "marker dependency " + type).attr("refX", 6).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 5,7 L9,13 L1,7 L9,1 Z"); - elem.append("defs").append("marker").attr("id", id + "_" + type + "-dependencyEnd").attr("class", "marker dependency " + type).attr("refX", 13).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z"); -}; -const lollipop = (elem, type, id) => { - elem.append("defs").append("marker").attr("id", id + "_" + type + "-lollipopStart").attr("class", "marker lollipop " + type).attr("refX", 13).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("circle").attr("stroke", "black").attr("fill", "transparent").attr("cx", 7).attr("cy", 7).attr("r", 6); - elem.append("defs").append("marker").attr("id", id + "_" + type + "-lollipopEnd").attr("class", "marker lollipop " + type).attr("refX", 1).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("circle").attr("stroke", "black").attr("fill", "transparent").attr("cx", 7).attr("cy", 7).attr("r", 6); -}; -const point = (elem, type, id) => { - elem.append("marker").attr("id", id + "_" + type + "-pointEnd").attr("class", "marker " + type).attr("viewBox", "0 0 10 10").attr("refX", 6).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"); - elem.append("marker").attr("id", id + "_" + type + "-pointStart").attr("class", "marker " + type).attr("viewBox", "0 0 10 10").attr("refX", 4.5).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 5 L 10 10 L 10 0 z").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"); -}; -const circle$1 = (elem, type, id) => { - elem.append("marker").attr("id", id + "_" + type + "-circleEnd").attr("class", "marker " + type).attr("viewBox", "0 0 10 10").attr("refX", 11).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"); - elem.append("marker").attr("id", id + "_" + type + "-circleStart").attr("class", "marker " + type).attr("viewBox", "0 0 10 10").attr("refX", -1).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"); -}; -const cross = (elem, type, id) => { - elem.append("marker").attr("id", id + "_" + type + "-crossEnd").attr("class", "marker cross " + type).attr("viewBox", "0 0 11 11").attr("refX", 12).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0"); - elem.append("marker").attr("id", id + "_" + type + "-crossStart").attr("class", "marker cross " + type).attr("viewBox", "0 0 11 11").attr("refX", -1).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0"); -}; -const barb = (elem, type, id) => { - elem.append("defs").append("marker").attr("id", id + "_" + type + "-barbEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 14).attr("markerUnits", "strokeWidth").attr("orient", "auto").append("path").attr("d", "M 19,7 L9,13 L14,7 L9,1 Z"); -}; -const markers = { - extension, - composition, - aggregation, - dependency, - lollipop, - point, - circle: circle$1, - cross, - barb -}; -const insertMarkers$1 = insertMarkers; -function applyStyle(dom, styleFn) { - if (styleFn) { - dom.attr("style", styleFn); - } -} -function addHtmlLabel(node) { - const fo = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(document.createElementNS("http://www.w3.org/2000/svg", "foreignObject")); - const div = fo.append("xhtml:div"); - const label = node.label; - const labelClass = node.isNode ? "nodeLabel" : "edgeLabel"; - div.html( - '" + label + "" - ); - applyStyle(div, node.labelStyle); - div.style("display", "inline-block"); - div.style("white-space", "nowrap"); - div.attr("xmlns", "http://www.w3.org/1999/xhtml"); - return fo.node(); -} -const createLabel = (_vertexText, style, isTitle, isNode) => { - let vertexText = _vertexText || ""; - if (typeof vertexText === "object") { - vertexText = vertexText[0]; - } - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { - vertexText = vertexText.replace(/\\n|\n/g, "
    "); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("vertexText" + vertexText); - const node = { - isNode, - label: (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.M)(vertexText).replace( - /fa[blrs]?:fa-[\w-]+/g, - // cspell: disable-line - (s) => `` - ), - labelStyle: style.replace("fill:", "color:") - }; - let vertexNode = addHtmlLabel(node); - return vertexNode; - } else { - const svgLabel = document.createElementNS("http://www.w3.org/2000/svg", "text"); - svgLabel.setAttribute("style", style.replace("color:", "fill:")); - let rows = []; - if (typeof vertexText === "string") { - rows = vertexText.split(/\\n|\n|/gi); - } else if (Array.isArray(vertexText)) { - rows = vertexText; - } else { - rows = []; - } - for (const row of rows) { - const tspan = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); - tspan.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"); - tspan.setAttribute("dy", "1em"); - tspan.setAttribute("x", "0"); - if (isTitle) { - tspan.setAttribute("class", "title-row"); - } else { - tspan.setAttribute("class", "row"); - } - tspan.textContent = row.trim(); - svgLabel.appendChild(tspan); - } - return svgLabel; - } -}; -const createLabel$1 = createLabel; -const labelHelper = async (parent, node, _classes, isNode) => { - let classes; - const useHtmlLabels = node.useHtmlLabels || (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels); - if (!_classes) { - classes = "node default"; - } else { - classes = _classes; - } - const shapeSvg = parent.insert("g").attr("class", classes).attr("id", node.domId || node.id); - const label = shapeSvg.insert("g").attr("class", "label").attr("style", node.labelStyle); - let labelText; - if (node.labelText === void 0) { - labelText = ""; - } else { - labelText = typeof node.labelText === "string" ? node.labelText : node.labelText[0]; - } - const textNode = label.node(); - let text; - if (node.labelType === "markdown") { - text = (0,_createText_2e5e7dd3_js__WEBPACK_IMPORTED_MODULE_2__.a)(label, (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.d)((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.M)(labelText), (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)()), { - useHtmlLabels, - width: node.width || (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.wrappingWidth, - classes: "markdown-node-label" - }); - } else { - text = textNode.appendChild( - createLabel$1( - (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.d)((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.M)(labelText), (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)()), - node.labelStyle, - false, - isNode - ) - ); - } - let bbox = text.getBBox(); - const halfPadding = node.padding / 2; - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { - const div = text.children[0]; - const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(text); - const images = div.getElementsByTagName("img"); - if (images) { - const noImgText = labelText.replace(/]*>/g, "").trim() === ""; - await Promise.all( - [...images].map( - (img) => new Promise((res) => { - function setupImage() { - img.style.display = "flex"; - img.style.flexDirection = "column"; - if (noImgText) { - const bodyFontSize = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().fontSize ? (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().fontSize : window.getComputedStyle(document.body).fontSize; - const enlargingFactor = 5; - const width = parseInt(bodyFontSize, 10) * enlargingFactor + "px"; - img.style.minWidth = width; - img.style.maxWidth = width; - } else { - img.style.width = "100%"; - } - res(img); - } - setTimeout(() => { - if (img.complete) { - setupImage(); - } - }); - img.addEventListener("error", setupImage); - img.addEventListener("load", setupImage); - }) - ) - ); - } - bbox = div.getBoundingClientRect(); - dv.attr("width", bbox.width); - dv.attr("height", bbox.height); - } - if (useHtmlLabels) { - label.attr("transform", "translate(" + -bbox.width / 2 + ", " + -bbox.height / 2 + ")"); - } else { - label.attr("transform", "translate(0, " + -bbox.height / 2 + ")"); - } - if (node.centerLabel) { - label.attr("transform", "translate(" + -bbox.width / 2 + ", " + -bbox.height / 2 + ")"); - } - label.insert("rect", ":first-child"); - return { shapeSvg, bbox, halfPadding, label }; -}; -const updateNodeBounds = (node, element) => { - const bbox = element.node().getBBox(); - node.width = bbox.width; - node.height = bbox.height; -}; -function insertPolygonShape(parent, w, h, points) { - return parent.insert("polygon", ":first-child").attr( - "points", - points.map(function(d) { - return d.x + "," + d.y; - }).join(" ") - ).attr("class", "label-container").attr("transform", "translate(" + -w / 2 + "," + h / 2 + ")"); -} -function intersectNode(node, point2) { - return node.intersect(point2); -} -function intersectEllipse(node, rx, ry, point2) { - var cx = node.x; - var cy = node.y; - var px = cx - point2.x; - var py = cy - point2.y; - var det = Math.sqrt(rx * rx * py * py + ry * ry * px * px); - var dx = Math.abs(rx * ry * px / det); - if (point2.x < cx) { - dx = -dx; - } - var dy = Math.abs(rx * ry * py / det); - if (point2.y < cy) { - dy = -dy; - } - return { x: cx + dx, y: cy + dy }; -} -function intersectCircle(node, rx, point2) { - return intersectEllipse(node, rx, rx, point2); -} -function intersectLine(p1, p2, q1, q2) { - var a1, a2, b1, b2, c1, c2; - var r1, r2, r3, r4; - var denom, offset, num; - var x, y; - a1 = p2.y - p1.y; - b1 = p1.x - p2.x; - c1 = p2.x * p1.y - p1.x * p2.y; - r3 = a1 * q1.x + b1 * q1.y + c1; - r4 = a1 * q2.x + b1 * q2.y + c1; - if (r3 !== 0 && r4 !== 0 && sameSign(r3, r4)) { - return; - } - a2 = q2.y - q1.y; - b2 = q1.x - q2.x; - c2 = q2.x * q1.y - q1.x * q2.y; - r1 = a2 * p1.x + b2 * p1.y + c2; - r2 = a2 * p2.x + b2 * p2.y + c2; - if (r1 !== 0 && r2 !== 0 && sameSign(r1, r2)) { - return; - } - denom = a1 * b2 - a2 * b1; - if (denom === 0) { - return; - } - offset = Math.abs(denom / 2); - num = b1 * c2 - b2 * c1; - x = num < 0 ? (num - offset) / denom : (num + offset) / denom; - num = a2 * c1 - a1 * c2; - y = num < 0 ? (num - offset) / denom : (num + offset) / denom; - return { x, y }; -} -function sameSign(r1, r2) { - return r1 * r2 > 0; -} -function intersectPolygon(node, polyPoints, point2) { - var x1 = node.x; - var y1 = node.y; - var intersections = []; - var minX = Number.POSITIVE_INFINITY; - var minY = Number.POSITIVE_INFINITY; - if (typeof polyPoints.forEach === "function") { - polyPoints.forEach(function(entry) { - minX = Math.min(minX, entry.x); - minY = Math.min(minY, entry.y); - }); - } else { - minX = Math.min(minX, polyPoints.x); - minY = Math.min(minY, polyPoints.y); - } - var left = x1 - node.width / 2 - minX; - var top = y1 - node.height / 2 - minY; - for (var i = 0; i < polyPoints.length; i++) { - var p1 = polyPoints[i]; - var p2 = polyPoints[i < polyPoints.length - 1 ? i + 1 : 0]; - var intersect2 = intersectLine( - node, - point2, - { x: left + p1.x, y: top + p1.y }, - { x: left + p2.x, y: top + p2.y } - ); - if (intersect2) { - intersections.push(intersect2); - } - } - if (!intersections.length) { - return node; - } - if (intersections.length > 1) { - intersections.sort(function(p, q) { - var pdx = p.x - point2.x; - var pdy = p.y - point2.y; - var distp = Math.sqrt(pdx * pdx + pdy * pdy); - var qdx = q.x - point2.x; - var qdy = q.y - point2.y; - var distq = Math.sqrt(qdx * qdx + qdy * qdy); - return distp < distq ? -1 : distp === distq ? 0 : 1; - }); - } - return intersections[0]; -} -const intersectRect = (node, point2) => { - var x = node.x; - var y = node.y; - var dx = point2.x - x; - var dy = point2.y - y; - var w = node.width / 2; - var h = node.height / 2; - var sx, sy; - if (Math.abs(dy) * w > Math.abs(dx) * h) { - if (dy < 0) { - h = -h; - } - sx = dy === 0 ? 0 : h * dx / dy; - sy = h; - } else { - if (dx < 0) { - w = -w; - } - sx = w; - sy = dx === 0 ? 0 : w * dy / dx; - } - return { x: x + sx, y: y + sy }; -}; -const intersectRect$1 = intersectRect; -const intersect = { - node: intersectNode, - circle: intersectCircle, - ellipse: intersectEllipse, - polygon: intersectPolygon, - rect: intersectRect$1 -}; -const note = async (parent, node) => { - const useHtmlLabels = node.useHtmlLabels || (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels; - if (!useHtmlLabels) { - node.centerLabel = true; - } - const { shapeSvg, bbox, halfPadding } = await labelHelper( - parent, - node, - "node " + node.classes, - true - ); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Classes = ", node.classes); - const rect2 = shapeSvg.insert("rect", ":first-child"); - rect2.attr("rx", node.rx).attr("ry", node.ry).attr("x", -bbox.width / 2 - halfPadding).attr("y", -bbox.height / 2 - halfPadding).attr("width", bbox.width + node.padding).attr("height", bbox.height + node.padding); - updateNodeBounds(node, rect2); - node.intersect = function(point2) { - return intersect.rect(node, point2); - }; - return shapeSvg; -}; -const note$1 = note; -const expandAndDeduplicateDirections = (directions) => { - const uniqueDirections = /* @__PURE__ */ new Set(); - for (const direction of directions) { - switch (direction) { - case "x": - uniqueDirections.add("right"); - uniqueDirections.add("left"); - break; - case "y": - uniqueDirections.add("up"); - uniqueDirections.add("down"); - break; - default: - uniqueDirections.add(direction); - break; - } - } - return uniqueDirections; -}; -const getArrowPoints = (duplicatedDirections, bbox, node) => { - const directions = expandAndDeduplicateDirections(duplicatedDirections); - const f = 2; - const height = bbox.height + 2 * node.padding; - const midpoint = height / f; - const width = bbox.width + 2 * midpoint + node.padding; - const padding = node.padding / 2; - if (directions.has("right") && directions.has("left") && directions.has("up") && directions.has("down")) { - return [ - // Bottom - { x: 0, y: 0 }, - { x: midpoint, y: 0 }, - { x: width / 2, y: 2 * padding }, - { x: width - midpoint, y: 0 }, - { x: width, y: 0 }, - // Right - { x: width, y: -height / 3 }, - { x: width + 2 * padding, y: -height / 2 }, - { x: width, y: -2 * height / 3 }, - { x: width, y: -height }, - // Top - { x: width - midpoint, y: -height }, - { x: width / 2, y: -height - 2 * padding }, - { x: midpoint, y: -height }, - // Left - { x: 0, y: -height }, - { x: 0, y: -2 * height / 3 }, - { x: -2 * padding, y: -height / 2 }, - { x: 0, y: -height / 3 } - ]; - } - if (directions.has("right") && directions.has("left") && directions.has("up")) { - return [ - { x: midpoint, y: 0 }, - { x: width - midpoint, y: 0 }, - { x: width, y: -height / 2 }, - { x: width - midpoint, y: -height }, - { x: midpoint, y: -height }, - { x: 0, y: -height / 2 } - ]; - } - if (directions.has("right") && directions.has("left") && directions.has("down")) { - return [ - { x: 0, y: 0 }, - { x: midpoint, y: -height }, - { x: width - midpoint, y: -height }, - { x: width, y: 0 } - ]; - } - if (directions.has("right") && directions.has("up") && directions.has("down")) { - return [ - { x: 0, y: 0 }, - { x: width, y: -midpoint }, - { x: width, y: -height + midpoint }, - { x: 0, y: -height } - ]; - } - if (directions.has("left") && directions.has("up") && directions.has("down")) { - return [ - { x: width, y: 0 }, - { x: 0, y: -midpoint }, - { x: 0, y: -height + midpoint }, - { x: width, y: -height } - ]; - } - if (directions.has("right") && directions.has("left")) { - return [ - { x: midpoint, y: 0 }, - { x: midpoint, y: -padding }, - { x: width - midpoint, y: -padding }, - { x: width - midpoint, y: 0 }, - { x: width, y: -height / 2 }, - { x: width - midpoint, y: -height }, - { x: width - midpoint, y: -height + padding }, - { x: midpoint, y: -height + padding }, - { x: midpoint, y: -height }, - { x: 0, y: -height / 2 } - ]; - } - if (directions.has("up") && directions.has("down")) { - return [ - // Bottom center - { x: width / 2, y: 0 }, - // Left pont of bottom arrow - { x: 0, y: -padding }, - { x: midpoint, y: -padding }, - // Left top over vertical section - { x: midpoint, y: -height + padding }, - { x: 0, y: -height + padding }, - // Top of arrow - { x: width / 2, y: -height }, - { x: width, y: -height + padding }, - // Top of right vertical bar - { x: width - midpoint, y: -height + padding }, - { x: width - midpoint, y: -padding }, - { x: width, y: -padding } - ]; - } - if (directions.has("right") && directions.has("up")) { - return [ - { x: 0, y: 0 }, - { x: width, y: -midpoint }, - { x: 0, y: -height } - ]; - } - if (directions.has("right") && directions.has("down")) { - return [ - { x: 0, y: 0 }, - { x: width, y: 0 }, - { x: 0, y: -height } - ]; - } - if (directions.has("left") && directions.has("up")) { - return [ - { x: width, y: 0 }, - { x: 0, y: -midpoint }, - { x: width, y: -height } - ]; - } - if (directions.has("left") && directions.has("down")) { - return [ - { x: width, y: 0 }, - { x: 0, y: 0 }, - { x: width, y: -height } - ]; - } - if (directions.has("right")) { - return [ - { x: midpoint, y: -padding }, - { x: midpoint, y: -padding }, - { x: width - midpoint, y: -padding }, - { x: width - midpoint, y: 0 }, - { x: width, y: -height / 2 }, - { x: width - midpoint, y: -height }, - { x: width - midpoint, y: -height + padding }, - // top left corner of arrow - { x: midpoint, y: -height + padding }, - { x: midpoint, y: -height + padding } - ]; - } - if (directions.has("left")) { - return [ - { x: midpoint, y: 0 }, - { x: midpoint, y: -padding }, - // Two points, the right corners - { x: width - midpoint, y: -padding }, - { x: width - midpoint, y: -height + padding }, - { x: midpoint, y: -height + padding }, - { x: midpoint, y: -height }, - { x: 0, y: -height / 2 } - ]; - } - if (directions.has("up")) { - return [ - // Bottom center - { x: midpoint, y: -padding }, - // Left top over vertical section - { x: midpoint, y: -height + padding }, - { x: 0, y: -height + padding }, - // Top of arrow - { x: width / 2, y: -height }, - { x: width, y: -height + padding }, - // Top of right vertical bar - { x: width - midpoint, y: -height + padding }, - { x: width - midpoint, y: -padding } - ]; - } - if (directions.has("down")) { - return [ - // Bottom center - { x: width / 2, y: 0 }, - // Left pont of bottom arrow - { x: 0, y: -padding }, - { x: midpoint, y: -padding }, - // Left top over vertical section - { x: midpoint, y: -height + padding }, - { x: width - midpoint, y: -height + padding }, - { x: width - midpoint, y: -padding }, - { x: width, y: -padding } - ]; - } - return [{ x: 0, y: 0 }]; -}; -const formatClass = (str) => { - if (str) { - return " " + str; - } - return ""; -}; -const getClassesFromNode = (node, otherClasses) => { - return `${otherClasses ? otherClasses : "node default"}${formatClass(node.classes)} ${formatClass( - node.class - )}`; -}; -const question = async (parent, node) => { - const { shapeSvg, bbox } = await labelHelper( - parent, - node, - getClassesFromNode(node, void 0), - true - ); - const w = bbox.width + node.padding; - const h = bbox.height + node.padding; - const s = w + h; - const points = [ - { x: s / 2, y: 0 }, - { x: s, y: -s / 2 }, - { x: s / 2, y: -s }, - { x: 0, y: -s / 2 } - ]; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Question main (Circle)"); - const questionElem = insertPolygonShape(shapeSvg, s, s, points); - questionElem.attr("style", node.style); - updateNodeBounds(node, questionElem); - node.intersect = function(point2) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.warn("Intersect called"); - return intersect.polygon(node, points, point2); - }; - return shapeSvg; -}; -const choice = (parent, node) => { - const shapeSvg = parent.insert("g").attr("class", "node default").attr("id", node.domId || node.id); - const s = 28; - const points = [ - { x: 0, y: s / 2 }, - { x: s / 2, y: 0 }, - { x: 0, y: -s / 2 }, - { x: -s / 2, y: 0 } - ]; - const choice2 = shapeSvg.insert("polygon", ":first-child").attr( - "points", - points.map(function(d) { - return d.x + "," + d.y; - }).join(" ") - ); - choice2.attr("class", "state-start").attr("r", 7).attr("width", 28).attr("height", 28); - node.width = 28; - node.height = 28; - node.intersect = function(point2) { - return intersect.circle(node, 14, point2); - }; - return shapeSvg; -}; -const hexagon = async (parent, node) => { - const { shapeSvg, bbox } = await labelHelper( - parent, - node, - getClassesFromNode(node, void 0), - true - ); - const f = 4; - const h = bbox.height + node.padding; - const m = h / f; - const w = bbox.width + 2 * m + node.padding; - const points = [ - { x: m, y: 0 }, - { x: w - m, y: 0 }, - { x: w, y: -h / 2 }, - { x: w - m, y: -h }, - { x: m, y: -h }, - { x: 0, y: -h / 2 } - ]; - const hex = insertPolygonShape(shapeSvg, w, h, points); - hex.attr("style", node.style); - updateNodeBounds(node, hex); - node.intersect = function(point2) { - return intersect.polygon(node, points, point2); - }; - return shapeSvg; -}; -const block_arrow = async (parent, node) => { - const { shapeSvg, bbox } = await labelHelper(parent, node, void 0, true); - const f = 2; - const h = bbox.height + 2 * node.padding; - const m = h / f; - const w = bbox.width + 2 * m + node.padding; - const points = getArrowPoints(node.directions, bbox, node); - const blockArrow = insertPolygonShape(shapeSvg, w, h, points); - blockArrow.attr("style", node.style); - updateNodeBounds(node, blockArrow); - node.intersect = function(point2) { - return intersect.polygon(node, points, point2); - }; - return shapeSvg; -}; -const rect_left_inv_arrow = async (parent, node) => { - const { shapeSvg, bbox } = await labelHelper( - parent, - node, - getClassesFromNode(node, void 0), - true - ); - const w = bbox.width + node.padding; - const h = bbox.height + node.padding; - const points = [ - { x: -h / 2, y: 0 }, - { x: w, y: 0 }, - { x: w, y: -h }, - { x: -h / 2, y: -h }, - { x: 0, y: -h / 2 } - ]; - const el = insertPolygonShape(shapeSvg, w, h, points); - el.attr("style", node.style); - node.width = w + h; - node.height = h; - node.intersect = function(point2) { - return intersect.polygon(node, points, point2); - }; - return shapeSvg; -}; -const lean_right = async (parent, node) => { - const { shapeSvg, bbox } = await labelHelper(parent, node, getClassesFromNode(node), true); - const w = bbox.width + node.padding; - const h = bbox.height + node.padding; - const points = [ - { x: -2 * h / 6, y: 0 }, - { x: w - h / 6, y: 0 }, - { x: w + 2 * h / 6, y: -h }, - { x: h / 6, y: -h } - ]; - const el = insertPolygonShape(shapeSvg, w, h, points); - el.attr("style", node.style); - updateNodeBounds(node, el); - node.intersect = function(point2) { - return intersect.polygon(node, points, point2); - }; - return shapeSvg; -}; -const lean_left = async (parent, node) => { - const { shapeSvg, bbox } = await labelHelper( - parent, - node, - getClassesFromNode(node, void 0), - true - ); - const w = bbox.width + node.padding; - const h = bbox.height + node.padding; - const points = [ - { x: 2 * h / 6, y: 0 }, - { x: w + h / 6, y: 0 }, - { x: w - 2 * h / 6, y: -h }, - { x: -h / 6, y: -h } - ]; - const el = insertPolygonShape(shapeSvg, w, h, points); - el.attr("style", node.style); - updateNodeBounds(node, el); - node.intersect = function(point2) { - return intersect.polygon(node, points, point2); - }; - return shapeSvg; -}; -const trapezoid = async (parent, node) => { - const { shapeSvg, bbox } = await labelHelper( - parent, - node, - getClassesFromNode(node, void 0), - true - ); - const w = bbox.width + node.padding; - const h = bbox.height + node.padding; - const points = [ - { x: -2 * h / 6, y: 0 }, - { x: w + 2 * h / 6, y: 0 }, - { x: w - h / 6, y: -h }, - { x: h / 6, y: -h } - ]; - const el = insertPolygonShape(shapeSvg, w, h, points); - el.attr("style", node.style); - updateNodeBounds(node, el); - node.intersect = function(point2) { - return intersect.polygon(node, points, point2); - }; - return shapeSvg; -}; -const inv_trapezoid = async (parent, node) => { - const { shapeSvg, bbox } = await labelHelper( - parent, - node, - getClassesFromNode(node, void 0), - true - ); - const w = bbox.width + node.padding; - const h = bbox.height + node.padding; - const points = [ - { x: h / 6, y: 0 }, - { x: w - h / 6, y: 0 }, - { x: w + 2 * h / 6, y: -h }, - { x: -2 * h / 6, y: -h } - ]; - const el = insertPolygonShape(shapeSvg, w, h, points); - el.attr("style", node.style); - updateNodeBounds(node, el); - node.intersect = function(point2) { - return intersect.polygon(node, points, point2); - }; - return shapeSvg; -}; -const rect_right_inv_arrow = async (parent, node) => { - const { shapeSvg, bbox } = await labelHelper( - parent, - node, - getClassesFromNode(node, void 0), - true - ); - const w = bbox.width + node.padding; - const h = bbox.height + node.padding; - const points = [ - { x: 0, y: 0 }, - { x: w + h / 2, y: 0 }, - { x: w, y: -h / 2 }, - { x: w + h / 2, y: -h }, - { x: 0, y: -h } - ]; - const el = insertPolygonShape(shapeSvg, w, h, points); - el.attr("style", node.style); - updateNodeBounds(node, el); - node.intersect = function(point2) { - return intersect.polygon(node, points, point2); - }; - return shapeSvg; -}; -const cylinder = async (parent, node) => { - const { shapeSvg, bbox } = await labelHelper( - parent, - node, - getClassesFromNode(node, void 0), - true - ); - const w = bbox.width + node.padding; - const rx = w / 2; - const ry = rx / (2.5 + w / 50); - const h = bbox.height + ry + node.padding; - const shape = "M 0," + ry + " a " + rx + "," + ry + " 0,0,0 " + w + " 0 a " + rx + "," + ry + " 0,0,0 " + -w + " 0 l 0," + h + " a " + rx + "," + ry + " 0,0,0 " + w + " 0 l 0," + -h; - const el = shapeSvg.attr("label-offset-y", ry).insert("path", ":first-child").attr("style", node.style).attr("d", shape).attr("transform", "translate(" + -w / 2 + "," + -(h / 2 + ry) + ")"); - updateNodeBounds(node, el); - node.intersect = function(point2) { - const pos = intersect.rect(node, point2); - const x = pos.x - node.x; - if (rx != 0 && (Math.abs(x) < node.width / 2 || Math.abs(x) == node.width / 2 && Math.abs(pos.y - node.y) > node.height / 2 - ry)) { - let y = ry * ry * (1 - x * x / (rx * rx)); - if (y != 0) { - y = Math.sqrt(y); - } - y = ry - y; - if (point2.y - node.y > 0) { - y = -y; - } - pos.y += y; - } - return pos; - }; - return shapeSvg; -}; -const rect = async (parent, node) => { - const { shapeSvg, bbox, halfPadding } = await labelHelper( - parent, - node, - "node " + node.classes + " " + node.class, - true - ); - const rect2 = shapeSvg.insert("rect", ":first-child"); - const totalWidth = node.positioned ? node.width : bbox.width + node.padding; - const totalHeight = node.positioned ? node.height : bbox.height + node.padding; - const x = node.positioned ? -totalWidth / 2 : -bbox.width / 2 - halfPadding; - const y = node.positioned ? -totalHeight / 2 : -bbox.height / 2 - halfPadding; - rect2.attr("class", "basic label-container").attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("x", x).attr("y", y).attr("width", totalWidth).attr("height", totalHeight); - if (node.props) { - const propKeys = new Set(Object.keys(node.props)); - if (node.props.borders) { - applyNodePropertyBorders(rect2, node.props.borders, totalWidth, totalHeight); - propKeys.delete("borders"); - } - propKeys.forEach((propKey) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.warn(`Unknown node property ${propKey}`); - }); - } - updateNodeBounds(node, rect2); - node.intersect = function(point2) { - return intersect.rect(node, point2); - }; - return shapeSvg; -}; -const composite = async (parent, node) => { - const { shapeSvg, bbox, halfPadding } = await labelHelper( - parent, - node, - "node " + node.classes, - true - ); - const rect2 = shapeSvg.insert("rect", ":first-child"); - const totalWidth = node.positioned ? node.width : bbox.width + node.padding; - const totalHeight = node.positioned ? node.height : bbox.height + node.padding; - const x = node.positioned ? -totalWidth / 2 : -bbox.width / 2 - halfPadding; - const y = node.positioned ? -totalHeight / 2 : -bbox.height / 2 - halfPadding; - rect2.attr("class", "basic cluster composite label-container").attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("x", x).attr("y", y).attr("width", totalWidth).attr("height", totalHeight); - if (node.props) { - const propKeys = new Set(Object.keys(node.props)); - if (node.props.borders) { - applyNodePropertyBorders(rect2, node.props.borders, totalWidth, totalHeight); - propKeys.delete("borders"); - } - propKeys.forEach((propKey) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.warn(`Unknown node property ${propKey}`); - }); - } - updateNodeBounds(node, rect2); - node.intersect = function(point2) { - return intersect.rect(node, point2); - }; - return shapeSvg; -}; -const labelRect = async (parent, node) => { - const { shapeSvg } = await labelHelper(parent, node, "label", true); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.trace("Classes = ", node.class); - const rect2 = shapeSvg.insert("rect", ":first-child"); - const totalWidth = 0; - const totalHeight = 0; - rect2.attr("width", totalWidth).attr("height", totalHeight); - shapeSvg.attr("class", "label edgeLabel"); - if (node.props) { - const propKeys = new Set(Object.keys(node.props)); - if (node.props.borders) { - applyNodePropertyBorders(rect2, node.props.borders, totalWidth, totalHeight); - propKeys.delete("borders"); - } - propKeys.forEach((propKey) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.warn(`Unknown node property ${propKey}`); - }); - } - updateNodeBounds(node, rect2); - node.intersect = function(point2) { - return intersect.rect(node, point2); - }; - return shapeSvg; -}; -function applyNodePropertyBorders(rect2, borders, totalWidth, totalHeight) { - const strokeDashArray = []; - const addBorder = (length) => { - strokeDashArray.push(length, 0); - }; - const skipBorder = (length) => { - strokeDashArray.push(0, length); - }; - if (borders.includes("t")) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("add top border"); - addBorder(totalWidth); - } else { - skipBorder(totalWidth); - } - if (borders.includes("r")) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("add right border"); - addBorder(totalHeight); - } else { - skipBorder(totalHeight); - } - if (borders.includes("b")) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("add bottom border"); - addBorder(totalWidth); - } else { - skipBorder(totalWidth); - } - if (borders.includes("l")) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("add left border"); - addBorder(totalHeight); - } else { - skipBorder(totalHeight); - } - rect2.attr("stroke-dasharray", strokeDashArray.join(" ")); -} -const rectWithTitle = (parent, node) => { - let classes; - if (!node.classes) { - classes = "node default"; - } else { - classes = "node " + node.classes; - } - const shapeSvg = parent.insert("g").attr("class", classes).attr("id", node.domId || node.id); - const rect2 = shapeSvg.insert("rect", ":first-child"); - const innerLine = shapeSvg.insert("line"); - const label = shapeSvg.insert("g").attr("class", "label"); - const text2 = node.labelText.flat ? node.labelText.flat() : node.labelText; - let title = ""; - if (typeof text2 === "object") { - title = text2[0]; - } else { - title = text2; - } - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Label text abc79", title, text2, typeof text2 === "object"); - const text = label.node().appendChild(createLabel$1(title, node.labelStyle, true, true)); - let bbox = { width: 0, height: 0 }; - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { - const div = text.children[0]; - const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(text); - bbox = div.getBoundingClientRect(); - dv.attr("width", bbox.width); - dv.attr("height", bbox.height); - } - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Text 2", text2); - const textRows = text2.slice(1, text2.length); - let titleBox = text.getBBox(); - const descr = label.node().appendChild( - createLabel$1(textRows.join ? textRows.join("
    ") : textRows, node.labelStyle, true, true) - ); - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { - const div = descr.children[0]; - const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(descr); - bbox = div.getBoundingClientRect(); - dv.attr("width", bbox.width); - dv.attr("height", bbox.height); - } - const halfPadding = node.padding / 2; - (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(descr).attr( - "transform", - "translate( " + // (titleBox.width - bbox.width) / 2 + - (bbox.width > titleBox.width ? 0 : (titleBox.width - bbox.width) / 2) + ", " + (titleBox.height + halfPadding + 5) + ")" - ); - (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(text).attr( - "transform", - "translate( " + // (titleBox.width - bbox.width) / 2 + - (bbox.width < titleBox.width ? 0 : -(titleBox.width - bbox.width) / 2) + ", 0)" - ); - bbox = label.node().getBBox(); - label.attr( - "transform", - "translate(" + -bbox.width / 2 + ", " + (-bbox.height / 2 - halfPadding + 3) + ")" - ); - rect2.attr("class", "outer title-state").attr("x", -bbox.width / 2 - halfPadding).attr("y", -bbox.height / 2 - halfPadding).attr("width", bbox.width + node.padding).attr("height", bbox.height + node.padding); - innerLine.attr("class", "divider").attr("x1", -bbox.width / 2 - halfPadding).attr("x2", bbox.width / 2 + halfPadding).attr("y1", -bbox.height / 2 - halfPadding + titleBox.height + halfPadding).attr("y2", -bbox.height / 2 - halfPadding + titleBox.height + halfPadding); - updateNodeBounds(node, rect2); - node.intersect = function(point2) { - return intersect.rect(node, point2); - }; - return shapeSvg; -}; -const stadium = async (parent, node) => { - const { shapeSvg, bbox } = await labelHelper( - parent, - node, - getClassesFromNode(node, void 0), - true - ); - const h = bbox.height + node.padding; - const w = bbox.width + h / 4 + node.padding; - const rect2 = shapeSvg.insert("rect", ":first-child").attr("style", node.style).attr("rx", h / 2).attr("ry", h / 2).attr("x", -w / 2).attr("y", -h / 2).attr("width", w).attr("height", h); - updateNodeBounds(node, rect2); - node.intersect = function(point2) { - return intersect.rect(node, point2); - }; - return shapeSvg; -}; -const circle = async (parent, node) => { - const { shapeSvg, bbox, halfPadding } = await labelHelper( - parent, - node, - getClassesFromNode(node, void 0), - true - ); - const circle2 = shapeSvg.insert("circle", ":first-child"); - circle2.attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("r", bbox.width / 2 + halfPadding).attr("width", bbox.width + node.padding).attr("height", bbox.height + node.padding); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Circle main"); - updateNodeBounds(node, circle2); - node.intersect = function(point2) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Circle intersect", node, bbox.width / 2 + halfPadding, point2); - return intersect.circle(node, bbox.width / 2 + halfPadding, point2); - }; - return shapeSvg; -}; -const doublecircle = async (parent, node) => { - const { shapeSvg, bbox, halfPadding } = await labelHelper( - parent, - node, - getClassesFromNode(node, void 0), - true - ); - const gap = 5; - const circleGroup = shapeSvg.insert("g", ":first-child"); - const outerCircle = circleGroup.insert("circle"); - const innerCircle = circleGroup.insert("circle"); - circleGroup.attr("class", node.class); - outerCircle.attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("r", bbox.width / 2 + halfPadding + gap).attr("width", bbox.width + node.padding + gap * 2).attr("height", bbox.height + node.padding + gap * 2); - innerCircle.attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("r", bbox.width / 2 + halfPadding).attr("width", bbox.width + node.padding).attr("height", bbox.height + node.padding); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.info("DoubleCircle main"); - updateNodeBounds(node, outerCircle); - node.intersect = function(point2) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.info("DoubleCircle intersect", node, bbox.width / 2 + halfPadding + gap, point2); - return intersect.circle(node, bbox.width / 2 + halfPadding + gap, point2); - }; - return shapeSvg; -}; -const subroutine = async (parent, node) => { - const { shapeSvg, bbox } = await labelHelper( - parent, - node, - getClassesFromNode(node, void 0), - true - ); - const w = bbox.width + node.padding; - const h = bbox.height + node.padding; - const points = [ - { x: 0, y: 0 }, - { x: w, y: 0 }, - { x: w, y: -h }, - { x: 0, y: -h }, - { x: 0, y: 0 }, - { x: -8, y: 0 }, - { x: w + 8, y: 0 }, - { x: w + 8, y: -h }, - { x: -8, y: -h }, - { x: -8, y: 0 } - ]; - const el = insertPolygonShape(shapeSvg, w, h, points); - el.attr("style", node.style); - updateNodeBounds(node, el); - node.intersect = function(point2) { - return intersect.polygon(node, points, point2); - }; - return shapeSvg; -}; -const start = (parent, node) => { - const shapeSvg = parent.insert("g").attr("class", "node default").attr("id", node.domId || node.id); - const circle2 = shapeSvg.insert("circle", ":first-child"); - circle2.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14); - updateNodeBounds(node, circle2); - node.intersect = function(point2) { - return intersect.circle(node, 7, point2); - }; - return shapeSvg; -}; -const forkJoin = (parent, node, dir) => { - const shapeSvg = parent.insert("g").attr("class", "node default").attr("id", node.domId || node.id); - let width = 70; - let height = 10; - if (dir === "LR") { - width = 10; - height = 70; - } - const shape = shapeSvg.append("rect").attr("x", -1 * width / 2).attr("y", -1 * height / 2).attr("width", width).attr("height", height).attr("class", "fork-join"); - updateNodeBounds(node, shape); - node.height = node.height + node.padding / 2; - node.width = node.width + node.padding / 2; - node.intersect = function(point2) { - return intersect.rect(node, point2); - }; - return shapeSvg; -}; -const end = (parent, node) => { - const shapeSvg = parent.insert("g").attr("class", "node default").attr("id", node.domId || node.id); - const innerCircle = shapeSvg.insert("circle", ":first-child"); - const circle2 = shapeSvg.insert("circle", ":first-child"); - circle2.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14); - innerCircle.attr("class", "state-end").attr("r", 5).attr("width", 10).attr("height", 10); - updateNodeBounds(node, circle2); - node.intersect = function(point2) { - return intersect.circle(node, 7, point2); - }; - return shapeSvg; -}; -const class_box = (parent, node) => { - const halfPadding = node.padding / 2; - const rowPadding = 4; - const lineHeight = 8; - let classes; - if (!node.classes) { - classes = "node default"; - } else { - classes = "node " + node.classes; - } - const shapeSvg = parent.insert("g").attr("class", classes).attr("id", node.domId || node.id); - const rect2 = shapeSvg.insert("rect", ":first-child"); - const topLine = shapeSvg.insert("line"); - const bottomLine = shapeSvg.insert("line"); - let maxWidth = 0; - let maxHeight = rowPadding; - const labelContainer = shapeSvg.insert("g").attr("class", "label"); - let verticalPos = 0; - const hasInterface = node.classData.annotations && node.classData.annotations[0]; - const interfaceLabelText = node.classData.annotations[0] ? "«" + node.classData.annotations[0] + "»" : ""; - const interfaceLabel = labelContainer.node().appendChild(createLabel$1(interfaceLabelText, node.labelStyle, true, true)); - let interfaceBBox = interfaceLabel.getBBox(); - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { - const div = interfaceLabel.children[0]; - const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(interfaceLabel); - interfaceBBox = div.getBoundingClientRect(); - dv.attr("width", interfaceBBox.width); - dv.attr("height", interfaceBBox.height); - } - if (node.classData.annotations[0]) { - maxHeight += interfaceBBox.height + rowPadding; - maxWidth += interfaceBBox.width; - } - let classTitleString = node.classData.label; - if (node.classData.type !== void 0 && node.classData.type !== "") { - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels) { - classTitleString += "<" + node.classData.type + ">"; - } else { - classTitleString += "<" + node.classData.type + ">"; - } - } - const classTitleLabel = labelContainer.node().appendChild(createLabel$1(classTitleString, node.labelStyle, true, true)); - (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(classTitleLabel).attr("class", "classTitle"); - let classTitleBBox = classTitleLabel.getBBox(); - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { - const div = classTitleLabel.children[0]; - const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(classTitleLabel); - classTitleBBox = div.getBoundingClientRect(); - dv.attr("width", classTitleBBox.width); - dv.attr("height", classTitleBBox.height); - } - maxHeight += classTitleBBox.height + rowPadding; - if (classTitleBBox.width > maxWidth) { - maxWidth = classTitleBBox.width; - } - const classAttributes = []; - node.classData.members.forEach((member) => { - const parsedInfo = member.getDisplayDetails(); - let parsedText = parsedInfo.displayText; - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels) { - parsedText = parsedText.replace(//g, ">"); - } - const lbl = labelContainer.node().appendChild( - createLabel$1( - parsedText, - parsedInfo.cssStyle ? parsedInfo.cssStyle : node.labelStyle, - true, - true - ) - ); - let bbox = lbl.getBBox(); - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { - const div = lbl.children[0]; - const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(lbl); - bbox = div.getBoundingClientRect(); - dv.attr("width", bbox.width); - dv.attr("height", bbox.height); - } - if (bbox.width > maxWidth) { - maxWidth = bbox.width; - } - maxHeight += bbox.height + rowPadding; - classAttributes.push(lbl); - }); - maxHeight += lineHeight; - const classMethods = []; - node.classData.methods.forEach((member) => { - const parsedInfo = member.getDisplayDetails(); - let displayText = parsedInfo.displayText; - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels) { - displayText = displayText.replace(//g, ">"); - } - const lbl = labelContainer.node().appendChild( - createLabel$1( - displayText, - parsedInfo.cssStyle ? parsedInfo.cssStyle : node.labelStyle, - true, - true - ) - ); - let bbox = lbl.getBBox(); - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { - const div = lbl.children[0]; - const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(lbl); - bbox = div.getBoundingClientRect(); - dv.attr("width", bbox.width); - dv.attr("height", bbox.height); - } - if (bbox.width > maxWidth) { - maxWidth = bbox.width; - } - maxHeight += bbox.height + rowPadding; - classMethods.push(lbl); - }); - maxHeight += lineHeight; - if (hasInterface) { - let diffX2 = (maxWidth - interfaceBBox.width) / 2; - (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(interfaceLabel).attr( - "transform", - "translate( " + (-1 * maxWidth / 2 + diffX2) + ", " + -1 * maxHeight / 2 + ")" - ); - verticalPos = interfaceBBox.height + rowPadding; - } - let diffX = (maxWidth - classTitleBBox.width) / 2; - (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(classTitleLabel).attr( - "transform", - "translate( " + (-1 * maxWidth / 2 + diffX) + ", " + (-1 * maxHeight / 2 + verticalPos) + ")" - ); - verticalPos += classTitleBBox.height + rowPadding; - topLine.attr("class", "divider").attr("x1", -maxWidth / 2 - halfPadding).attr("x2", maxWidth / 2 + halfPadding).attr("y1", -maxHeight / 2 - halfPadding + lineHeight + verticalPos).attr("y2", -maxHeight / 2 - halfPadding + lineHeight + verticalPos); - verticalPos += lineHeight; - classAttributes.forEach((lbl) => { - (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(lbl).attr( - "transform", - "translate( " + -maxWidth / 2 + ", " + (-1 * maxHeight / 2 + verticalPos + lineHeight / 2) + ")" - ); - const memberBBox = lbl == null ? void 0 : lbl.getBBox(); - verticalPos += ((memberBBox == null ? void 0 : memberBBox.height) ?? 0) + rowPadding; - }); - verticalPos += lineHeight; - bottomLine.attr("class", "divider").attr("x1", -maxWidth / 2 - halfPadding).attr("x2", maxWidth / 2 + halfPadding).attr("y1", -maxHeight / 2 - halfPadding + lineHeight + verticalPos).attr("y2", -maxHeight / 2 - halfPadding + lineHeight + verticalPos); - verticalPos += lineHeight; - classMethods.forEach((lbl) => { - (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(lbl).attr( - "transform", - "translate( " + -maxWidth / 2 + ", " + (-1 * maxHeight / 2 + verticalPos) + ")" - ); - const memberBBox = lbl == null ? void 0 : lbl.getBBox(); - verticalPos += ((memberBBox == null ? void 0 : memberBBox.height) ?? 0) + rowPadding; - }); - rect2.attr("style", node.style).attr("class", "outer title-state").attr("x", -maxWidth / 2 - halfPadding).attr("y", -(maxHeight / 2) - halfPadding).attr("width", maxWidth + node.padding).attr("height", maxHeight + node.padding); - updateNodeBounds(node, rect2); - node.intersect = function(point2) { - return intersect.rect(node, point2); - }; - return shapeSvg; -}; -const shapes = { - rhombus: question, - composite, - question, - rect, - labelRect, - rectWithTitle, - choice, - circle, - doublecircle, - stadium, - hexagon, - block_arrow, - rect_left_inv_arrow, - lean_right, - lean_left, - trapezoid, - inv_trapezoid, - rect_right_inv_arrow, - cylinder, - start, - end, - note: note$1, - subroutine, - fork: forkJoin, - join: forkJoin, - class_box -}; -let nodeElems = {}; -const insertNode = async (elem, node, dir) => { - let newEl; - let el; - if (node.link) { - let target; - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().securityLevel === "sandbox") { - target = "_top"; - } else if (node.linkTarget) { - target = node.linkTarget || "_blank"; - } - newEl = elem.insert("svg:a").attr("xlink:href", node.link).attr("target", target); - el = await shapes[node.shape](newEl, node, dir); - } else { - el = await shapes[node.shape](elem, node, dir); - newEl = el; - } - if (node.tooltip) { - el.attr("title", node.tooltip); - } - if (node.class) { - el.attr("class", "node default " + node.class); - } - newEl.attr("data-node", "true"); - newEl.attr("data-id", node.id); - nodeElems[node.id] = newEl; - if (node.haveCallback) { - nodeElems[node.id].attr("class", nodeElems[node.id].attr("class") + " clickable"); - } - return newEl; -}; -const setNodeElem = (elem, node) => { - nodeElems[node.id] = elem; -}; -const clear$1 = () => { - nodeElems = {}; -}; -const positionNode = (node) => { - const el = nodeElems[node.id]; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.trace( - "Transforming node", - node.diff, - node, - "translate(" + (node.x - node.width / 2 - 5) + ", " + node.width / 2 + ")" - ); - const padding = 8; - const diff = node.diff || 0; - if (node.clusterNode) { - el.attr( - "transform", - "translate(" + (node.x + diff - node.width / 2) + ", " + (node.y - node.height / 2 - padding) + ")" - ); - } else { - el.attr("transform", "translate(" + node.x + ", " + node.y + ")"); - } - return diff; -}; -const getSubGraphTitleMargins = ({ - flowchart -}) => { - var _a, _b; - const subGraphTitleTopMargin = ((_a = flowchart == null ? void 0 : flowchart.subGraphTitleMargin) == null ? void 0 : _a.top) ?? 0; - const subGraphTitleBottomMargin = ((_b = flowchart == null ? void 0 : flowchart.subGraphTitleMargin) == null ? void 0 : _b.bottom) ?? 0; - const subGraphTitleTotalMargin = subGraphTitleTopMargin + subGraphTitleBottomMargin; - return { - subGraphTitleTopMargin, - subGraphTitleBottomMargin, - subGraphTitleTotalMargin - }; -}; -const markerOffsets = { - aggregation: 18, - extension: 18, - composition: 18, - dependency: 6, - lollipop: 13.5, - arrow_point: 5.3 -}; -function calculateDeltaAndAngle(point1, point2) { - if (point1 === void 0 || point2 === void 0) { - return { angle: 0, deltaX: 0, deltaY: 0 }; - } - point1 = pointTransformer(point1); - point2 = pointTransformer(point2); - const [x1, y1] = [point1.x, point1.y]; - const [x2, y2] = [point2.x, point2.y]; - const deltaX = x2 - x1; - const deltaY = y2 - y1; - return { angle: Math.atan(deltaY / deltaX), deltaX, deltaY }; -} -const pointTransformer = (data) => { - if (Array.isArray(data)) { - return { x: data[0], y: data[1] }; - } - return data; -}; -const getLineFunctionsWithOffset = (edge) => { - return { - x: function(d, i, data) { - let offset = 0; - if (i === 0 && Object.hasOwn(markerOffsets, edge.arrowTypeStart)) { - const { angle, deltaX } = calculateDeltaAndAngle(data[0], data[1]); - offset = markerOffsets[edge.arrowTypeStart] * Math.cos(angle) * (deltaX >= 0 ? 1 : -1); - } else if (i === data.length - 1 && Object.hasOwn(markerOffsets, edge.arrowTypeEnd)) { - const { angle, deltaX } = calculateDeltaAndAngle( - data[data.length - 1], - data[data.length - 2] - ); - offset = markerOffsets[edge.arrowTypeEnd] * Math.cos(angle) * (deltaX >= 0 ? 1 : -1); - } - return pointTransformer(d).x + offset; - }, - y: function(d, i, data) { - let offset = 0; - if (i === 0 && Object.hasOwn(markerOffsets, edge.arrowTypeStart)) { - const { angle, deltaY } = calculateDeltaAndAngle(data[0], data[1]); - offset = markerOffsets[edge.arrowTypeStart] * Math.abs(Math.sin(angle)) * (deltaY >= 0 ? 1 : -1); - } else if (i === data.length - 1 && Object.hasOwn(markerOffsets, edge.arrowTypeEnd)) { - const { angle, deltaY } = calculateDeltaAndAngle( - data[data.length - 1], - data[data.length - 2] - ); - offset = markerOffsets[edge.arrowTypeEnd] * Math.abs(Math.sin(angle)) * (deltaY >= 0 ? 1 : -1); - } - return pointTransformer(d).y + offset; - } - }; -}; -const addEdgeMarkers = (svgPath, edge, url, id, diagramType) => { - if (edge.arrowTypeStart) { - addEdgeMarker(svgPath, "start", edge.arrowTypeStart, url, id, diagramType); - } - if (edge.arrowTypeEnd) { - addEdgeMarker(svgPath, "end", edge.arrowTypeEnd, url, id, diagramType); - } -}; -const arrowTypesMap = { - arrow_cross: "cross", - arrow_point: "point", - arrow_barb: "barb", - arrow_circle: "circle", - aggregation: "aggregation", - extension: "extension", - composition: "composition", - dependency: "dependency", - lollipop: "lollipop" -}; -const addEdgeMarker = (svgPath, position, arrowType, url, id, diagramType) => { - const endMarkerType = arrowTypesMap[arrowType]; - if (!endMarkerType) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.warn(`Unknown arrow type: ${arrowType}`); - return; - } - const suffix = position === "start" ? "Start" : "End"; - svgPath.attr(`marker-${position}`, `url(${url}#${id}_${diagramType}-${endMarkerType}${suffix})`); -}; -let edgeLabels = {}; -let terminalLabels = {}; -const clear = () => { - edgeLabels = {}; - terminalLabels = {}; -}; -const insertEdgeLabel = (elem, edge) => { - const useHtmlLabels = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels); - const labelElement = edge.labelType === "markdown" ? (0,_createText_2e5e7dd3_js__WEBPACK_IMPORTED_MODULE_2__.a)(elem, edge.label, { - style: edge.labelStyle, - useHtmlLabels, - addSvgBackground: true - }) : createLabel$1(edge.label, edge.labelStyle); - const edgeLabel = elem.insert("g").attr("class", "edgeLabel"); - const label = edgeLabel.insert("g").attr("class", "label"); - label.node().appendChild(labelElement); - let bbox = labelElement.getBBox(); - if (useHtmlLabels) { - const div = labelElement.children[0]; - const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(labelElement); - bbox = div.getBoundingClientRect(); - dv.attr("width", bbox.width); - dv.attr("height", bbox.height); - } - label.attr("transform", "translate(" + -bbox.width / 2 + ", " + -bbox.height / 2 + ")"); - edgeLabels[edge.id] = edgeLabel; - edge.width = bbox.width; - edge.height = bbox.height; - let fo; - if (edge.startLabelLeft) { - const startLabelElement = createLabel$1(edge.startLabelLeft, edge.labelStyle); - const startEdgeLabelLeft = elem.insert("g").attr("class", "edgeTerminals"); - const inner = startEdgeLabelLeft.insert("g").attr("class", "inner"); - fo = inner.node().appendChild(startLabelElement); - const slBox = startLabelElement.getBBox(); - inner.attr("transform", "translate(" + -slBox.width / 2 + ", " + -slBox.height / 2 + ")"); - if (!terminalLabels[edge.id]) { - terminalLabels[edge.id] = {}; - } - terminalLabels[edge.id].startLeft = startEdgeLabelLeft; - setTerminalWidth(fo, edge.startLabelLeft); - } - if (edge.startLabelRight) { - const startLabelElement = createLabel$1(edge.startLabelRight, edge.labelStyle); - const startEdgeLabelRight = elem.insert("g").attr("class", "edgeTerminals"); - const inner = startEdgeLabelRight.insert("g").attr("class", "inner"); - fo = startEdgeLabelRight.node().appendChild(startLabelElement); - inner.node().appendChild(startLabelElement); - const slBox = startLabelElement.getBBox(); - inner.attr("transform", "translate(" + -slBox.width / 2 + ", " + -slBox.height / 2 + ")"); - if (!terminalLabels[edge.id]) { - terminalLabels[edge.id] = {}; - } - terminalLabels[edge.id].startRight = startEdgeLabelRight; - setTerminalWidth(fo, edge.startLabelRight); - } - if (edge.endLabelLeft) { - const endLabelElement = createLabel$1(edge.endLabelLeft, edge.labelStyle); - const endEdgeLabelLeft = elem.insert("g").attr("class", "edgeTerminals"); - const inner = endEdgeLabelLeft.insert("g").attr("class", "inner"); - fo = inner.node().appendChild(endLabelElement); - const slBox = endLabelElement.getBBox(); - inner.attr("transform", "translate(" + -slBox.width / 2 + ", " + -slBox.height / 2 + ")"); - endEdgeLabelLeft.node().appendChild(endLabelElement); - if (!terminalLabels[edge.id]) { - terminalLabels[edge.id] = {}; - } - terminalLabels[edge.id].endLeft = endEdgeLabelLeft; - setTerminalWidth(fo, edge.endLabelLeft); - } - if (edge.endLabelRight) { - const endLabelElement = createLabel$1(edge.endLabelRight, edge.labelStyle); - const endEdgeLabelRight = elem.insert("g").attr("class", "edgeTerminals"); - const inner = endEdgeLabelRight.insert("g").attr("class", "inner"); - fo = inner.node().appendChild(endLabelElement); - const slBox = endLabelElement.getBBox(); - inner.attr("transform", "translate(" + -slBox.width / 2 + ", " + -slBox.height / 2 + ")"); - endEdgeLabelRight.node().appendChild(endLabelElement); - if (!terminalLabels[edge.id]) { - terminalLabels[edge.id] = {}; - } - terminalLabels[edge.id].endRight = endEdgeLabelRight; - setTerminalWidth(fo, edge.endLabelRight); - } - return labelElement; -}; -function setTerminalWidth(fo, value) { - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels && fo) { - fo.style.width = value.length * 9 + "px"; - fo.style.height = "12px"; - } -} -const positionEdgeLabel = (edge, paths) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("Moving label abc88 ", edge.id, edge.label, edgeLabels[edge.id], paths); - let path = paths.updatedPath ? paths.updatedPath : paths.originalPath; - const siteConfig = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)(); - const { subGraphTitleTotalMargin } = getSubGraphTitleMargins(siteConfig); - if (edge.label) { - const el = edgeLabels[edge.id]; - let x = edge.x; - let y = edge.y; - if (path) { - const pos = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.u.calcLabelPosition(path); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug( - "Moving label " + edge.label + " from (", - x, - ",", - y, - ") to (", - pos.x, - ",", - pos.y, - ") abc88" - ); - if (paths.updatedPath) { - x = pos.x; - y = pos.y; - } - } - el.attr("transform", `translate(${x}, ${y + subGraphTitleTotalMargin / 2})`); - } - if (edge.startLabelLeft) { - const el = terminalLabels[edge.id].startLeft; - let x = edge.x; - let y = edge.y; - if (path) { - const pos = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.u.calcTerminalLabelPosition(edge.arrowTypeStart ? 10 : 0, "start_left", path); - x = pos.x; - y = pos.y; - } - el.attr("transform", `translate(${x}, ${y})`); - } - if (edge.startLabelRight) { - const el = terminalLabels[edge.id].startRight; - let x = edge.x; - let y = edge.y; - if (path) { - const pos = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.u.calcTerminalLabelPosition( - edge.arrowTypeStart ? 10 : 0, - "start_right", - path - ); - x = pos.x; - y = pos.y; - } - el.attr("transform", `translate(${x}, ${y})`); - } - if (edge.endLabelLeft) { - const el = terminalLabels[edge.id].endLeft; - let x = edge.x; - let y = edge.y; - if (path) { - const pos = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.u.calcTerminalLabelPosition(edge.arrowTypeEnd ? 10 : 0, "end_left", path); - x = pos.x; - y = pos.y; - } - el.attr("transform", `translate(${x}, ${y})`); - } - if (edge.endLabelRight) { - const el = terminalLabels[edge.id].endRight; - let x = edge.x; - let y = edge.y; - if (path) { - const pos = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.u.calcTerminalLabelPosition(edge.arrowTypeEnd ? 10 : 0, "end_right", path); - x = pos.x; - y = pos.y; - } - el.attr("transform", `translate(${x}, ${y})`); - } -}; -const outsideNode = (node, point2) => { - const x = node.x; - const y = node.y; - const dx = Math.abs(point2.x - x); - const dy = Math.abs(point2.y - y); - const w = node.width / 2; - const h = node.height / 2; - if (dx >= w || dy >= h) { - return true; - } - return false; -}; -const intersection = (node, outsidePoint, insidePoint) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug(`intersection calc abc89: - outsidePoint: ${JSON.stringify(outsidePoint)} - insidePoint : ${JSON.stringify(insidePoint)} - node : x:${node.x} y:${node.y} w:${node.width} h:${node.height}`); - const x = node.x; - const y = node.y; - const dx = Math.abs(x - insidePoint.x); - const w = node.width / 2; - let r = insidePoint.x < outsidePoint.x ? w - dx : w + dx; - const h = node.height / 2; - const Q = Math.abs(outsidePoint.y - insidePoint.y); - const R = Math.abs(outsidePoint.x - insidePoint.x); - if (Math.abs(y - outsidePoint.y) * w > Math.abs(x - outsidePoint.x) * h) { - let q = insidePoint.y < outsidePoint.y ? outsidePoint.y - h - y : y - h - outsidePoint.y; - r = R * q / Q; - const res = { - x: insidePoint.x < outsidePoint.x ? insidePoint.x + r : insidePoint.x - R + r, - y: insidePoint.y < outsidePoint.y ? insidePoint.y + Q - q : insidePoint.y - Q + q - }; - if (r === 0) { - res.x = outsidePoint.x; - res.y = outsidePoint.y; - } - if (R === 0) { - res.x = outsidePoint.x; - } - if (Q === 0) { - res.y = outsidePoint.y; - } - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug(`abc89 topp/bott calc, Q ${Q}, q ${q}, R ${R}, r ${r}`, res); - return res; - } else { - if (insidePoint.x < outsidePoint.x) { - r = outsidePoint.x - w - x; - } else { - r = x - w - outsidePoint.x; - } - let q = Q * r / R; - let _x = insidePoint.x < outsidePoint.x ? insidePoint.x + R - r : insidePoint.x - R + r; - let _y = insidePoint.y < outsidePoint.y ? insidePoint.y + q : insidePoint.y - q; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug(`sides calc abc89, Q ${Q}, q ${q}, R ${R}, r ${r}`, { _x, _y }); - if (r === 0) { - _x = outsidePoint.x; - _y = outsidePoint.y; - } - if (R === 0) { - _x = outsidePoint.x; - } - if (Q === 0) { - _y = outsidePoint.y; - } - return { x: _x, y: _y }; - } -}; -const cutPathAtIntersect = (_points, boundaryNode) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("abc88 cutPathAtIntersect", _points, boundaryNode); - let points = []; - let lastPointOutside = _points[0]; - let isInside = false; - _points.forEach((point2) => { - if (!outsideNode(boundaryNode, point2) && !isInside) { - const inter = intersection(boundaryNode, lastPointOutside, point2); - let pointPresent = false; - points.forEach((p) => { - pointPresent = pointPresent || p.x === inter.x && p.y === inter.y; - }); - if (!points.some((e) => e.x === inter.x && e.y === inter.y)) { - points.push(inter); - } - isInside = true; - } else { - lastPointOutside = point2; - if (!isInside) { - points.push(point2); - } - } - }); - return points; -}; -const insertEdge = function(elem, e, edge, clusterDb, diagramType, graph, id) { - let points = edge.points; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("abc88 InsertEdge: edge=", edge, "e=", e); - let pointsHasChanged = false; - const tail = graph.node(e.v); - var head = graph.node(e.w); - if ((head == null ? void 0 : head.intersect) && (tail == null ? void 0 : tail.intersect)) { - points = points.slice(1, edge.points.length - 1); - points.unshift(tail.intersect(points[0])); - points.push(head.intersect(points[points.length - 1])); - } - if (edge.toCluster) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("to cluster abc88", clusterDb[edge.toCluster]); - points = cutPathAtIntersect(edge.points, clusterDb[edge.toCluster].node); - pointsHasChanged = true; - } - if (edge.fromCluster) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("from cluster abc88", clusterDb[edge.fromCluster]); - points = cutPathAtIntersect(points.reverse(), clusterDb[edge.fromCluster].node).reverse(); - pointsHasChanged = true; - } - const lineData = points.filter((p) => !Number.isNaN(p.y)); - let curve = d3__WEBPACK_IMPORTED_MODULE_0__/* .curveBasis */ .qrM; - if (edge.curve && (diagramType === "graph" || diagramType === "flowchart")) { - curve = edge.curve; - } - const { x, y } = getLineFunctionsWithOffset(edge); - const lineFunction = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .line */ .n8j)().x(x).y(y).curve(curve); - let strokeClasses; - switch (edge.thickness) { - case "normal": - strokeClasses = "edge-thickness-normal"; - break; - case "thick": - strokeClasses = "edge-thickness-thick"; - break; - case "invisible": - strokeClasses = "edge-thickness-thick"; - break; - default: - strokeClasses = ""; - } - switch (edge.pattern) { - case "solid": - strokeClasses += " edge-pattern-solid"; - break; - case "dotted": - strokeClasses += " edge-pattern-dotted"; - break; - case "dashed": - strokeClasses += " edge-pattern-dashed"; - break; - } - const svgPath = elem.append("path").attr("d", lineFunction(lineData)).attr("id", edge.id).attr("class", " " + strokeClasses + (edge.classes ? " " + edge.classes : "")).attr("style", edge.style); - let url = ""; - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.arrowMarkerAbsolute || (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().state.arrowMarkerAbsolute) { - url = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search; - url = url.replace(/\(/g, "\\("); - url = url.replace(/\)/g, "\\)"); - } - addEdgeMarkers(svgPath, edge, url, id, diagramType); - let paths = {}; - if (pointsHasChanged) { - paths.updatedPath = points; - } - paths.originalPath = edge.points; - return paths; -}; - - - -/***/ }), - -/***/ 35860: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ d: () => (/* binding */ db), -/* harmony export */ f: () => (/* binding */ flowDb), -/* harmony export */ p: () => (/* binding */ parser$1) -/* harmony export */ }); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(26312); -/* harmony import */ var _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(86079); - - -var parser = function() { - var o = function(k, v, o2, l) { - for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) - ; - return o2; - }, $V0 = [1, 4], $V1 = [1, 3], $V2 = [1, 5], $V3 = [1, 8, 9, 10, 11, 27, 34, 36, 38, 42, 58, 81, 82, 83, 84, 85, 86, 99, 102, 103, 106, 108, 111, 112, 113, 118, 119, 120, 121], $V4 = [2, 2], $V5 = [1, 13], $V6 = [1, 14], $V7 = [1, 15], $V8 = [1, 16], $V9 = [1, 23], $Va = [1, 25], $Vb = [1, 26], $Vc = [1, 27], $Vd = [1, 49], $Ve = [1, 48], $Vf = [1, 29], $Vg = [1, 30], $Vh = [1, 31], $Vi = [1, 32], $Vj = [1, 33], $Vk = [1, 44], $Vl = [1, 46], $Vm = [1, 42], $Vn = [1, 47], $Vo = [1, 43], $Vp = [1, 50], $Vq = [1, 45], $Vr = [1, 51], $Vs = [1, 52], $Vt = [1, 34], $Vu = [1, 35], $Vv = [1, 36], $Vw = [1, 37], $Vx = [1, 57], $Vy = [1, 8, 9, 10, 11, 27, 32, 34, 36, 38, 42, 58, 81, 82, 83, 84, 85, 86, 99, 102, 103, 106, 108, 111, 112, 113, 118, 119, 120, 121], $Vz = [1, 61], $VA = [1, 60], $VB = [1, 62], $VC = [8, 9, 11, 73, 75], $VD = [1, 88], $VE = [1, 93], $VF = [1, 92], $VG = [1, 89], $VH = [1, 85], $VI = [1, 91], $VJ = [1, 87], $VK = [1, 94], $VL = [1, 90], $VM = [1, 95], $VN = [1, 86], $VO = [8, 9, 10, 11, 73, 75], $VP = [8, 9, 10, 11, 44, 73, 75], $VQ = [8, 9, 10, 11, 29, 42, 44, 46, 48, 50, 52, 54, 56, 58, 61, 63, 65, 66, 68, 73, 75, 86, 99, 102, 103, 106, 108, 111, 112, 113], $VR = [8, 9, 11, 42, 58, 73, 75, 86, 99, 102, 103, 106, 108, 111, 112, 113], $VS = [42, 58, 86, 99, 102, 103, 106, 108, 111, 112, 113], $VT = [1, 121], $VU = [1, 120], $VV = [1, 128], $VW = [1, 142], $VX = [1, 143], $VY = [1, 144], $VZ = [1, 145], $V_ = [1, 130], $V$ = [1, 132], $V01 = [1, 136], $V11 = [1, 137], $V21 = [1, 138], $V31 = [1, 139], $V41 = [1, 140], $V51 = [1, 141], $V61 = [1, 146], $V71 = [1, 147], $V81 = [1, 126], $V91 = [1, 127], $Va1 = [1, 134], $Vb1 = [1, 129], $Vc1 = [1, 133], $Vd1 = [1, 131], $Ve1 = [8, 9, 10, 11, 27, 32, 34, 36, 38, 42, 58, 81, 82, 83, 84, 85, 86, 99, 102, 103, 106, 108, 111, 112, 113, 118, 119, 120, 121], $Vf1 = [1, 149], $Vg1 = [8, 9, 11], $Vh1 = [8, 9, 10, 11, 14, 42, 58, 86, 102, 103, 106, 108, 111, 112, 113], $Vi1 = [1, 169], $Vj1 = [1, 165], $Vk1 = [1, 166], $Vl1 = [1, 170], $Vm1 = [1, 167], $Vn1 = [1, 168], $Vo1 = [75, 113, 116], $Vp1 = [8, 9, 10, 11, 12, 14, 27, 29, 32, 42, 58, 73, 81, 82, 83, 84, 85, 86, 87, 102, 106, 108, 111, 112, 113], $Vq1 = [10, 103], $Vr1 = [31, 47, 49, 51, 53, 55, 60, 62, 64, 65, 67, 69, 113, 114, 115], $Vs1 = [1, 235], $Vt1 = [1, 233], $Vu1 = [1, 237], $Vv1 = [1, 231], $Vw1 = [1, 232], $Vx1 = [1, 234], $Vy1 = [1, 236], $Vz1 = [1, 238], $VA1 = [1, 255], $VB1 = [8, 9, 11, 103], $VC1 = [8, 9, 10, 11, 58, 81, 102, 103, 106, 107, 108, 109]; - var parser2 = { - trace: function trace() { - }, - yy: {}, - symbols_: { "error": 2, "start": 3, "graphConfig": 4, "document": 5, "line": 6, "statement": 7, "SEMI": 8, "NEWLINE": 9, "SPACE": 10, "EOF": 11, "GRAPH": 12, "NODIR": 13, "DIR": 14, "FirstStmtSeparator": 15, "ending": 16, "endToken": 17, "spaceList": 18, "spaceListNewline": 19, "vertexStatement": 20, "separator": 21, "styleStatement": 22, "linkStyleStatement": 23, "classDefStatement": 24, "classStatement": 25, "clickStatement": 26, "subgraph": 27, "textNoTags": 28, "SQS": 29, "text": 30, "SQE": 31, "end": 32, "direction": 33, "acc_title": 34, "acc_title_value": 35, "acc_descr": 36, "acc_descr_value": 37, "acc_descr_multiline_value": 38, "link": 39, "node": 40, "styledVertex": 41, "AMP": 42, "vertex": 43, "STYLE_SEPARATOR": 44, "idString": 45, "DOUBLECIRCLESTART": 46, "DOUBLECIRCLEEND": 47, "PS": 48, "PE": 49, "(-": 50, "-)": 51, "STADIUMSTART": 52, "STADIUMEND": 53, "SUBROUTINESTART": 54, "SUBROUTINEEND": 55, "VERTEX_WITH_PROPS_START": 56, "NODE_STRING[field]": 57, "COLON": 58, "NODE_STRING[value]": 59, "PIPE": 60, "CYLINDERSTART": 61, "CYLINDEREND": 62, "DIAMOND_START": 63, "DIAMOND_STOP": 64, "TAGEND": 65, "TRAPSTART": 66, "TRAPEND": 67, "INVTRAPSTART": 68, "INVTRAPEND": 69, "linkStatement": 70, "arrowText": 71, "TESTSTR": 72, "START_LINK": 73, "edgeText": 74, "LINK": 75, "edgeTextToken": 76, "STR": 77, "MD_STR": 78, "textToken": 79, "keywords": 80, "STYLE": 81, "LINKSTYLE": 82, "CLASSDEF": 83, "CLASS": 84, "CLICK": 85, "DOWN": 86, "UP": 87, "textNoTagsToken": 88, "stylesOpt": 89, "idString[vertex]": 90, "idString[class]": 91, "CALLBACKNAME": 92, "CALLBACKARGS": 93, "HREF": 94, "LINK_TARGET": 95, "STR[link]": 96, "STR[tooltip]": 97, "alphaNum": 98, "DEFAULT": 99, "numList": 100, "INTERPOLATE": 101, "NUM": 102, "COMMA": 103, "style": 104, "styleComponent": 105, "NODE_STRING": 106, "UNIT": 107, "BRKT": 108, "PCT": 109, "idStringToken": 110, "MINUS": 111, "MULT": 112, "UNICODE_TEXT": 113, "TEXT": 114, "TAGSTART": 115, "EDGE_TEXT": 116, "alphaNumToken": 117, "direction_tb": 118, "direction_bt": 119, "direction_rl": 120, "direction_lr": 121, "$accept": 0, "$end": 1 }, - terminals_: { 2: "error", 8: "SEMI", 9: "NEWLINE", 10: "SPACE", 11: "EOF", 12: "GRAPH", 13: "NODIR", 14: "DIR", 27: "subgraph", 29: "SQS", 31: "SQE", 32: "end", 34: "acc_title", 35: "acc_title_value", 36: "acc_descr", 37: "acc_descr_value", 38: "acc_descr_multiline_value", 42: "AMP", 44: "STYLE_SEPARATOR", 46: "DOUBLECIRCLESTART", 47: "DOUBLECIRCLEEND", 48: "PS", 49: "PE", 50: "(-", 51: "-)", 52: "STADIUMSTART", 53: "STADIUMEND", 54: "SUBROUTINESTART", 55: "SUBROUTINEEND", 56: "VERTEX_WITH_PROPS_START", 57: "NODE_STRING[field]", 58: "COLON", 59: "NODE_STRING[value]", 60: "PIPE", 61: "CYLINDERSTART", 62: "CYLINDEREND", 63: "DIAMOND_START", 64: "DIAMOND_STOP", 65: "TAGEND", 66: "TRAPSTART", 67: "TRAPEND", 68: "INVTRAPSTART", 69: "INVTRAPEND", 72: "TESTSTR", 73: "START_LINK", 75: "LINK", 77: "STR", 78: "MD_STR", 81: "STYLE", 82: "LINKSTYLE", 83: "CLASSDEF", 84: "CLASS", 85: "CLICK", 86: "DOWN", 87: "UP", 90: "idString[vertex]", 91: "idString[class]", 92: "CALLBACKNAME", 93: "CALLBACKARGS", 94: "HREF", 95: "LINK_TARGET", 96: "STR[link]", 97: "STR[tooltip]", 99: "DEFAULT", 101: "INTERPOLATE", 102: "NUM", 103: "COMMA", 106: "NODE_STRING", 107: "UNIT", 108: "BRKT", 109: "PCT", 111: "MINUS", 112: "MULT", 113: "UNICODE_TEXT", 114: "TEXT", 115: "TAGSTART", 116: "EDGE_TEXT", 118: "direction_tb", 119: "direction_bt", 120: "direction_rl", 121: "direction_lr" }, - productions_: [0, [3, 2], [5, 0], [5, 2], [6, 1], [6, 1], [6, 1], [6, 1], [6, 1], [4, 2], [4, 2], [4, 2], [4, 3], [16, 2], [16, 1], [17, 1], [17, 1], [17, 1], [15, 1], [15, 1], [15, 2], [19, 2], [19, 2], [19, 1], [19, 1], [18, 2], [18, 1], [7, 2], [7, 2], [7, 2], [7, 2], [7, 2], [7, 2], [7, 9], [7, 6], [7, 4], [7, 1], [7, 2], [7, 2], [7, 1], [21, 1], [21, 1], [21, 1], [20, 3], [20, 4], [20, 2], [20, 1], [40, 1], [40, 5], [41, 1], [41, 3], [43, 4], [43, 4], [43, 6], [43, 4], [43, 4], [43, 4], [43, 8], [43, 4], [43, 4], [43, 4], [43, 6], [43, 4], [43, 4], [43, 4], [43, 4], [43, 4], [43, 1], [39, 2], [39, 3], [39, 3], [39, 1], [39, 3], [74, 1], [74, 2], [74, 1], [74, 1], [70, 1], [71, 3], [30, 1], [30, 2], [30, 1], [30, 1], [80, 1], [80, 1], [80, 1], [80, 1], [80, 1], [80, 1], [80, 1], [80, 1], [80, 1], [80, 1], [80, 1], [28, 1], [28, 2], [28, 1], [28, 1], [24, 5], [25, 5], [26, 2], [26, 4], [26, 3], [26, 5], [26, 3], [26, 5], [26, 5], [26, 7], [26, 2], [26, 4], [26, 2], [26, 4], [26, 4], [26, 6], [22, 5], [23, 5], [23, 5], [23, 9], [23, 9], [23, 7], [23, 7], [100, 1], [100, 3], [89, 1], [89, 3], [104, 1], [104, 2], [105, 1], [105, 1], [105, 1], [105, 1], [105, 1], [105, 1], [105, 1], [105, 1], [110, 1], [110, 1], [110, 1], [110, 1], [110, 1], [110, 1], [110, 1], [110, 1], [110, 1], [110, 1], [110, 1], [79, 1], [79, 1], [79, 1], [79, 1], [88, 1], [88, 1], [88, 1], [88, 1], [88, 1], [88, 1], [88, 1], [88, 1], [88, 1], [88, 1], [88, 1], [76, 1], [76, 1], [117, 1], [117, 1], [117, 1], [117, 1], [117, 1], [117, 1], [117, 1], [117, 1], [117, 1], [117, 1], [117, 1], [45, 1], [45, 2], [98, 1], [98, 2], [33, 1], [33, 1], [33, 1], [33, 1]], - performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { - var $0 = $$.length - 1; - switch (yystate) { - case 2: - this.$ = []; - break; - case 3: - if (!Array.isArray($$[$0]) || $$[$0].length > 0) { - $$[$0 - 1].push($$[$0]); - } - this.$ = $$[$0 - 1]; - break; - case 4: - case 176: - this.$ = $$[$0]; - break; - case 11: - yy.setDirection("TB"); - this.$ = "TB"; - break; - case 12: - yy.setDirection($$[$0 - 1]); - this.$ = $$[$0 - 1]; - break; - case 27: - this.$ = $$[$0 - 1].nodes; - break; - case 28: - case 29: - case 30: - case 31: - case 32: - this.$ = []; - break; - case 33: - this.$ = yy.addSubGraph($$[$0 - 6], $$[$0 - 1], $$[$0 - 4]); - break; - case 34: - this.$ = yy.addSubGraph($$[$0 - 3], $$[$0 - 1], $$[$0 - 3]); - break; - case 35: - this.$ = yy.addSubGraph(void 0, $$[$0 - 1], void 0); - break; - case 37: - this.$ = $$[$0].trim(); - yy.setAccTitle(this.$); - break; - case 38: - case 39: - this.$ = $$[$0].trim(); - yy.setAccDescription(this.$); - break; - case 43: - yy.addLink($$[$0 - 2].stmt, $$[$0], $$[$0 - 1]); - this.$ = { stmt: $$[$0], nodes: $$[$0].concat($$[$0 - 2].nodes) }; - break; - case 44: - yy.addLink($$[$0 - 3].stmt, $$[$0 - 1], $$[$0 - 2]); - this.$ = { stmt: $$[$0 - 1], nodes: $$[$0 - 1].concat($$[$0 - 3].nodes) }; - break; - case 45: - this.$ = { stmt: $$[$0 - 1], nodes: $$[$0 - 1] }; - break; - case 46: - this.$ = { stmt: $$[$0], nodes: $$[$0] }; - break; - case 47: - this.$ = [$$[$0]]; - break; - case 48: - this.$ = $$[$0 - 4].concat($$[$0]); - break; - case 49: - this.$ = $$[$0]; - break; - case 50: - this.$ = $$[$0 - 2]; - yy.setClass($$[$0 - 2], $$[$0]); - break; - case 51: - this.$ = $$[$0 - 3]; - yy.addVertex($$[$0 - 3], $$[$0 - 1], "square"); - break; - case 52: - this.$ = $$[$0 - 3]; - yy.addVertex($$[$0 - 3], $$[$0 - 1], "doublecircle"); - break; - case 53: - this.$ = $$[$0 - 5]; - yy.addVertex($$[$0 - 5], $$[$0 - 2], "circle"); - break; - case 54: - this.$ = $$[$0 - 3]; - yy.addVertex($$[$0 - 3], $$[$0 - 1], "ellipse"); - break; - case 55: - this.$ = $$[$0 - 3]; - yy.addVertex($$[$0 - 3], $$[$0 - 1], "stadium"); - break; - case 56: - this.$ = $$[$0 - 3]; - yy.addVertex($$[$0 - 3], $$[$0 - 1], "subroutine"); - break; - case 57: - this.$ = $$[$0 - 7]; - yy.addVertex($$[$0 - 7], $$[$0 - 1], "rect", void 0, void 0, void 0, Object.fromEntries([[$$[$0 - 5], $$[$0 - 3]]])); - break; - case 58: - this.$ = $$[$0 - 3]; - yy.addVertex($$[$0 - 3], $$[$0 - 1], "cylinder"); - break; - case 59: - this.$ = $$[$0 - 3]; - yy.addVertex($$[$0 - 3], $$[$0 - 1], "round"); - break; - case 60: - this.$ = $$[$0 - 3]; - yy.addVertex($$[$0 - 3], $$[$0 - 1], "diamond"); - break; - case 61: - this.$ = $$[$0 - 5]; - yy.addVertex($$[$0 - 5], $$[$0 - 2], "hexagon"); - break; - case 62: - this.$ = $$[$0 - 3]; - yy.addVertex($$[$0 - 3], $$[$0 - 1], "odd"); - break; - case 63: - this.$ = $$[$0 - 3]; - yy.addVertex($$[$0 - 3], $$[$0 - 1], "trapezoid"); - break; - case 64: - this.$ = $$[$0 - 3]; - yy.addVertex($$[$0 - 3], $$[$0 - 1], "inv_trapezoid"); - break; - case 65: - this.$ = $$[$0 - 3]; - yy.addVertex($$[$0 - 3], $$[$0 - 1], "lean_right"); - break; - case 66: - this.$ = $$[$0 - 3]; - yy.addVertex($$[$0 - 3], $$[$0 - 1], "lean_left"); - break; - case 67: - this.$ = $$[$0]; - yy.addVertex($$[$0]); - break; - case 68: - $$[$0 - 1].text = $$[$0]; - this.$ = $$[$0 - 1]; - break; - case 69: - case 70: - $$[$0 - 2].text = $$[$0 - 1]; - this.$ = $$[$0 - 2]; - break; - case 71: - this.$ = $$[$0]; - break; - case 72: - var inf = yy.destructLink($$[$0], $$[$0 - 2]); - this.$ = { "type": inf.type, "stroke": inf.stroke, "length": inf.length, "text": $$[$0 - 1] }; - break; - case 73: - this.$ = { text: $$[$0], type: "text" }; - break; - case 74: - this.$ = { text: $$[$0 - 1].text + "" + $$[$0], type: $$[$0 - 1].type }; - break; - case 75: - this.$ = { text: $$[$0], type: "string" }; - break; - case 76: - this.$ = { text: $$[$0], type: "markdown" }; - break; - case 77: - var inf = yy.destructLink($$[$0]); - this.$ = { "type": inf.type, "stroke": inf.stroke, "length": inf.length }; - break; - case 78: - this.$ = $$[$0 - 1]; - break; - case 79: - this.$ = { text: $$[$0], type: "text" }; - break; - case 80: - this.$ = { text: $$[$0 - 1].text + "" + $$[$0], type: $$[$0 - 1].type }; - break; - case 81: - this.$ = { text: $$[$0], type: "string" }; - break; - case 82: - case 97: - this.$ = { text: $$[$0], type: "markdown" }; - break; - case 94: - this.$ = { text: $$[$0], type: "text" }; - break; - case 95: - this.$ = { text: $$[$0 - 1].text + "" + $$[$0], type: $$[$0 - 1].type }; - break; - case 96: - this.$ = { text: $$[$0], type: "text" }; - break; - case 98: - this.$ = $$[$0 - 4]; - yy.addClass($$[$0 - 2], $$[$0]); - break; - case 99: - this.$ = $$[$0 - 4]; - yy.setClass($$[$0 - 2], $$[$0]); - break; - case 100: - case 108: - this.$ = $$[$0 - 1]; - yy.setClickEvent($$[$0 - 1], $$[$0]); - break; - case 101: - case 109: - this.$ = $$[$0 - 3]; - yy.setClickEvent($$[$0 - 3], $$[$0 - 2]); - yy.setTooltip($$[$0 - 3], $$[$0]); - break; - case 102: - this.$ = $$[$0 - 2]; - yy.setClickEvent($$[$0 - 2], $$[$0 - 1], $$[$0]); - break; - case 103: - this.$ = $$[$0 - 4]; - yy.setClickEvent($$[$0 - 4], $$[$0 - 3], $$[$0 - 2]); - yy.setTooltip($$[$0 - 4], $$[$0]); - break; - case 104: - this.$ = $$[$0 - 2]; - yy.setLink($$[$0 - 2], $$[$0]); - break; - case 105: - this.$ = $$[$0 - 4]; - yy.setLink($$[$0 - 4], $$[$0 - 2]); - yy.setTooltip($$[$0 - 4], $$[$0]); - break; - case 106: - this.$ = $$[$0 - 4]; - yy.setLink($$[$0 - 4], $$[$0 - 2], $$[$0]); - break; - case 107: - this.$ = $$[$0 - 6]; - yy.setLink($$[$0 - 6], $$[$0 - 4], $$[$0]); - yy.setTooltip($$[$0 - 6], $$[$0 - 2]); - break; - case 110: - this.$ = $$[$0 - 1]; - yy.setLink($$[$0 - 1], $$[$0]); - break; - case 111: - this.$ = $$[$0 - 3]; - yy.setLink($$[$0 - 3], $$[$0 - 2]); - yy.setTooltip($$[$0 - 3], $$[$0]); - break; - case 112: - this.$ = $$[$0 - 3]; - yy.setLink($$[$0 - 3], $$[$0 - 2], $$[$0]); - break; - case 113: - this.$ = $$[$0 - 5]; - yy.setLink($$[$0 - 5], $$[$0 - 4], $$[$0]); - yy.setTooltip($$[$0 - 5], $$[$0 - 2]); - break; - case 114: - this.$ = $$[$0 - 4]; - yy.addVertex($$[$0 - 2], void 0, void 0, $$[$0]); - break; - case 115: - this.$ = $$[$0 - 4]; - yy.updateLink([$$[$0 - 2]], $$[$0]); - break; - case 116: - this.$ = $$[$0 - 4]; - yy.updateLink($$[$0 - 2], $$[$0]); - break; - case 117: - this.$ = $$[$0 - 8]; - yy.updateLinkInterpolate([$$[$0 - 6]], $$[$0 - 2]); - yy.updateLink([$$[$0 - 6]], $$[$0]); - break; - case 118: - this.$ = $$[$0 - 8]; - yy.updateLinkInterpolate($$[$0 - 6], $$[$0 - 2]); - yy.updateLink($$[$0 - 6], $$[$0]); - break; - case 119: - this.$ = $$[$0 - 6]; - yy.updateLinkInterpolate([$$[$0 - 4]], $$[$0]); - break; - case 120: - this.$ = $$[$0 - 6]; - yy.updateLinkInterpolate($$[$0 - 4], $$[$0]); - break; - case 121: - case 123: - this.$ = [$$[$0]]; - break; - case 122: - case 124: - $$[$0 - 2].push($$[$0]); - this.$ = $$[$0 - 2]; - break; - case 126: - this.$ = $$[$0 - 1] + $$[$0]; - break; - case 174: - this.$ = $$[$0]; - break; - case 175: - this.$ = $$[$0 - 1] + "" + $$[$0]; - break; - case 177: - this.$ = $$[$0 - 1] + "" + $$[$0]; - break; - case 178: - this.$ = { stmt: "dir", value: "TB" }; - break; - case 179: - this.$ = { stmt: "dir", value: "BT" }; - break; - case 180: - this.$ = { stmt: "dir", value: "RL" }; - break; - case 181: - this.$ = { stmt: "dir", value: "LR" }; - break; - } - }, - table: [{ 3: 1, 4: 2, 9: $V0, 10: $V1, 12: $V2 }, { 1: [3] }, o($V3, $V4, { 5: 6 }), { 4: 7, 9: $V0, 10: $V1, 12: $V2 }, { 4: 8, 9: $V0, 10: $V1, 12: $V2 }, { 13: [1, 9], 14: [1, 10] }, { 1: [2, 1], 6: 11, 7: 12, 8: $V5, 9: $V6, 10: $V7, 11: $V8, 20: 17, 22: 18, 23: 19, 24: 20, 25: 21, 26: 22, 27: $V9, 33: 24, 34: $Va, 36: $Vb, 38: $Vc, 40: 28, 41: 38, 42: $Vd, 43: 39, 45: 40, 58: $Ve, 81: $Vf, 82: $Vg, 83: $Vh, 84: $Vi, 85: $Vj, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs, 118: $Vt, 119: $Vu, 120: $Vv, 121: $Vw }, o($V3, [2, 9]), o($V3, [2, 10]), o($V3, [2, 11]), { 8: [1, 54], 9: [1, 55], 10: $Vx, 15: 53, 18: 56 }, o($Vy, [2, 3]), o($Vy, [2, 4]), o($Vy, [2, 5]), o($Vy, [2, 6]), o($Vy, [2, 7]), o($Vy, [2, 8]), { 8: $Vz, 9: $VA, 11: $VB, 21: 58, 39: 59, 70: 63, 73: [1, 64], 75: [1, 65] }, { 8: $Vz, 9: $VA, 11: $VB, 21: 66 }, { 8: $Vz, 9: $VA, 11: $VB, 21: 67 }, { 8: $Vz, 9: $VA, 11: $VB, 21: 68 }, { 8: $Vz, 9: $VA, 11: $VB, 21: 69 }, { 8: $Vz, 9: $VA, 11: $VB, 21: 70 }, { 8: $Vz, 9: $VA, 10: [1, 71], 11: $VB, 21: 72 }, o($Vy, [2, 36]), { 35: [1, 73] }, { 37: [1, 74] }, o($Vy, [2, 39]), o($VC, [2, 46], { 18: 75, 10: $Vx }), { 10: [1, 76] }, { 10: [1, 77] }, { 10: [1, 78] }, { 10: [1, 79] }, { 14: $VD, 42: $VE, 58: $VF, 77: [1, 83], 86: $VG, 92: [1, 80], 94: [1, 81], 98: 82, 102: $VH, 103: $VI, 106: $VJ, 108: $VK, 111: $VL, 112: $VM, 113: $VN, 117: 84 }, o($Vy, [2, 178]), o($Vy, [2, 179]), o($Vy, [2, 180]), o($Vy, [2, 181]), o($VO, [2, 47]), o($VO, [2, 49], { 44: [1, 96] }), o($VP, [2, 67], { 110: 109, 29: [1, 97], 42: $Vd, 46: [1, 98], 48: [1, 99], 50: [1, 100], 52: [1, 101], 54: [1, 102], 56: [1, 103], 58: $Ve, 61: [1, 104], 63: [1, 105], 65: [1, 106], 66: [1, 107], 68: [1, 108], 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 111: $Vq, 112: $Vr, 113: $Vs }), o($VQ, [2, 174]), o($VQ, [2, 135]), o($VQ, [2, 136]), o($VQ, [2, 137]), o($VQ, [2, 138]), o($VQ, [2, 139]), o($VQ, [2, 140]), o($VQ, [2, 141]), o($VQ, [2, 142]), o($VQ, [2, 143]), o($VQ, [2, 144]), o($VQ, [2, 145]), o($V3, [2, 12]), o($V3, [2, 18]), o($V3, [2, 19]), { 9: [1, 110] }, o($VR, [2, 26], { 18: 111, 10: $Vx }), o($Vy, [2, 27]), { 40: 112, 41: 38, 42: $Vd, 43: 39, 45: 40, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs }, o($Vy, [2, 40]), o($Vy, [2, 41]), o($Vy, [2, 42]), o($VS, [2, 71], { 71: 113, 60: [1, 115], 72: [1, 114] }), { 74: 116, 76: 117, 77: [1, 118], 78: [1, 119], 113: $VT, 116: $VU }, o([42, 58, 60, 72, 86, 99, 102, 103, 106, 108, 111, 112, 113], [2, 77]), o($Vy, [2, 28]), o($Vy, [2, 29]), o($Vy, [2, 30]), o($Vy, [2, 31]), o($Vy, [2, 32]), { 10: $VV, 12: $VW, 14: $VX, 27: $VY, 28: 122, 32: $VZ, 42: $V_, 58: $V$, 73: $V01, 77: [1, 124], 78: [1, 125], 80: 135, 81: $V11, 82: $V21, 83: $V31, 84: $V41, 85: $V51, 86: $V61, 87: $V71, 88: 123, 102: $V81, 106: $V91, 108: $Va1, 111: $Vb1, 112: $Vc1, 113: $Vd1 }, o($Ve1, $V4, { 5: 148 }), o($Vy, [2, 37]), o($Vy, [2, 38]), o($VC, [2, 45], { 42: $Vf1 }), { 42: $Vd, 45: 150, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs }, { 99: [1, 151], 100: 152, 102: [1, 153] }, { 42: $Vd, 45: 154, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs }, { 42: $Vd, 45: 155, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs }, o($Vg1, [2, 100], { 10: [1, 156], 93: [1, 157] }), { 77: [1, 158] }, o($Vg1, [2, 108], { 117: 160, 10: [1, 159], 14: $VD, 42: $VE, 58: $VF, 86: $VG, 102: $VH, 103: $VI, 106: $VJ, 108: $VK, 111: $VL, 112: $VM, 113: $VN }), o($Vg1, [2, 110], { 10: [1, 161] }), o($Vh1, [2, 176]), o($Vh1, [2, 163]), o($Vh1, [2, 164]), o($Vh1, [2, 165]), o($Vh1, [2, 166]), o($Vh1, [2, 167]), o($Vh1, [2, 168]), o($Vh1, [2, 169]), o($Vh1, [2, 170]), o($Vh1, [2, 171]), o($Vh1, [2, 172]), o($Vh1, [2, 173]), { 42: $Vd, 45: 162, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs }, { 30: 163, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 171, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 173, 48: [1, 172], 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 174, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 175, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 176, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 106: [1, 177] }, { 30: 178, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 179, 63: [1, 180], 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 181, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 182, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 183, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($VQ, [2, 175]), o($V3, [2, 20]), o($VR, [2, 25]), o($VC, [2, 43], { 18: 184, 10: $Vx }), o($VS, [2, 68], { 10: [1, 185] }), { 10: [1, 186] }, { 30: 187, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 75: [1, 188], 76: 189, 113: $VT, 116: $VU }, o($Vo1, [2, 73]), o($Vo1, [2, 75]), o($Vo1, [2, 76]), o($Vo1, [2, 161]), o($Vo1, [2, 162]), { 8: $Vz, 9: $VA, 10: $VV, 11: $VB, 12: $VW, 14: $VX, 21: 191, 27: $VY, 29: [1, 190], 32: $VZ, 42: $V_, 58: $V$, 73: $V01, 80: 135, 81: $V11, 82: $V21, 83: $V31, 84: $V41, 85: $V51, 86: $V61, 87: $V71, 88: 192, 102: $V81, 106: $V91, 108: $Va1, 111: $Vb1, 112: $Vc1, 113: $Vd1 }, o($Vp1, [2, 94]), o($Vp1, [2, 96]), o($Vp1, [2, 97]), o($Vp1, [2, 150]), o($Vp1, [2, 151]), o($Vp1, [2, 152]), o($Vp1, [2, 153]), o($Vp1, [2, 154]), o($Vp1, [2, 155]), o($Vp1, [2, 156]), o($Vp1, [2, 157]), o($Vp1, [2, 158]), o($Vp1, [2, 159]), o($Vp1, [2, 160]), o($Vp1, [2, 83]), o($Vp1, [2, 84]), o($Vp1, [2, 85]), o($Vp1, [2, 86]), o($Vp1, [2, 87]), o($Vp1, [2, 88]), o($Vp1, [2, 89]), o($Vp1, [2, 90]), o($Vp1, [2, 91]), o($Vp1, [2, 92]), o($Vp1, [2, 93]), { 6: 11, 7: 12, 8: $V5, 9: $V6, 10: $V7, 11: $V8, 20: 17, 22: 18, 23: 19, 24: 20, 25: 21, 26: 22, 27: $V9, 32: [1, 193], 33: 24, 34: $Va, 36: $Vb, 38: $Vc, 40: 28, 41: 38, 42: $Vd, 43: 39, 45: 40, 58: $Ve, 81: $Vf, 82: $Vg, 83: $Vh, 84: $Vi, 85: $Vj, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs, 118: $Vt, 119: $Vu, 120: $Vv, 121: $Vw }, { 10: $Vx, 18: 194 }, { 10: [1, 195], 42: $Vd, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 109, 111: $Vq, 112: $Vr, 113: $Vs }, { 10: [1, 196] }, { 10: [1, 197], 103: [1, 198] }, o($Vq1, [2, 121]), { 10: [1, 199], 42: $Vd, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 109, 111: $Vq, 112: $Vr, 113: $Vs }, { 10: [1, 200], 42: $Vd, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 109, 111: $Vq, 112: $Vr, 113: $Vs }, { 77: [1, 201] }, o($Vg1, [2, 102], { 10: [1, 202] }), o($Vg1, [2, 104], { 10: [1, 203] }), { 77: [1, 204] }, o($Vh1, [2, 177]), { 77: [1, 205], 95: [1, 206] }, o($VO, [2, 50], { 110: 109, 42: $Vd, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 111: $Vq, 112: $Vr, 113: $Vs }), { 31: [1, 207], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($Vr1, [2, 79]), o($Vr1, [2, 81]), o($Vr1, [2, 82]), o($Vr1, [2, 146]), o($Vr1, [2, 147]), o($Vr1, [2, 148]), o($Vr1, [2, 149]), { 47: [1, 209], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 210, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 49: [1, 211], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 51: [1, 212], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 53: [1, 213], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 55: [1, 214], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 58: [1, 215] }, { 62: [1, 216], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 64: [1, 217], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 218, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 31: [1, 219], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 65: $Vi1, 67: [1, 220], 69: [1, 221], 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 65: $Vi1, 67: [1, 223], 69: [1, 222], 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($VC, [2, 44], { 42: $Vf1 }), o($VS, [2, 70]), o($VS, [2, 69]), { 60: [1, 224], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($VS, [2, 72]), o($Vo1, [2, 74]), { 30: 225, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($Ve1, $V4, { 5: 226 }), o($Vp1, [2, 95]), o($Vy, [2, 35]), { 41: 227, 42: $Vd, 43: 39, 45: 40, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs }, { 10: $Vs1, 58: $Vt1, 81: $Vu1, 89: 228, 102: $Vv1, 104: 229, 105: 230, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }, { 10: $Vs1, 58: $Vt1, 81: $Vu1, 89: 239, 101: [1, 240], 102: $Vv1, 104: 229, 105: 230, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }, { 10: $Vs1, 58: $Vt1, 81: $Vu1, 89: 241, 101: [1, 242], 102: $Vv1, 104: 229, 105: 230, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }, { 102: [1, 243] }, { 10: $Vs1, 58: $Vt1, 81: $Vu1, 89: 244, 102: $Vv1, 104: 229, 105: 230, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }, { 42: $Vd, 45: 245, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs }, o($Vg1, [2, 101]), { 77: [1, 246] }, { 77: [1, 247], 95: [1, 248] }, o($Vg1, [2, 109]), o($Vg1, [2, 111], { 10: [1, 249] }), o($Vg1, [2, 112]), o($VP, [2, 51]), o($Vr1, [2, 80]), o($VP, [2, 52]), { 49: [1, 250], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($VP, [2, 59]), o($VP, [2, 54]), o($VP, [2, 55]), o($VP, [2, 56]), { 106: [1, 251] }, o($VP, [2, 58]), o($VP, [2, 60]), { 64: [1, 252], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($VP, [2, 62]), o($VP, [2, 63]), o($VP, [2, 65]), o($VP, [2, 64]), o($VP, [2, 66]), o([10, 42, 58, 86, 99, 102, 103, 106, 108, 111, 112, 113], [2, 78]), { 31: [1, 253], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 6: 11, 7: 12, 8: $V5, 9: $V6, 10: $V7, 11: $V8, 20: 17, 22: 18, 23: 19, 24: 20, 25: 21, 26: 22, 27: $V9, 32: [1, 254], 33: 24, 34: $Va, 36: $Vb, 38: $Vc, 40: 28, 41: 38, 42: $Vd, 43: 39, 45: 40, 58: $Ve, 81: $Vf, 82: $Vg, 83: $Vh, 84: $Vi, 85: $Vj, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs, 118: $Vt, 119: $Vu, 120: $Vv, 121: $Vw }, o($VO, [2, 48]), o($Vg1, [2, 114], { 103: $VA1 }), o($VB1, [2, 123], { 105: 256, 10: $Vs1, 58: $Vt1, 81: $Vu1, 102: $Vv1, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }), o($VC1, [2, 125]), o($VC1, [2, 127]), o($VC1, [2, 128]), o($VC1, [2, 129]), o($VC1, [2, 130]), o($VC1, [2, 131]), o($VC1, [2, 132]), o($VC1, [2, 133]), o($VC1, [2, 134]), o($Vg1, [2, 115], { 103: $VA1 }), { 10: [1, 257] }, o($Vg1, [2, 116], { 103: $VA1 }), { 10: [1, 258] }, o($Vq1, [2, 122]), o($Vg1, [2, 98], { 103: $VA1 }), o($Vg1, [2, 99], { 110: 109, 42: $Vd, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 111: $Vq, 112: $Vr, 113: $Vs }), o($Vg1, [2, 103]), o($Vg1, [2, 105], { 10: [1, 259] }), o($Vg1, [2, 106]), { 95: [1, 260] }, { 49: [1, 261] }, { 60: [1, 262] }, { 64: [1, 263] }, { 8: $Vz, 9: $VA, 11: $VB, 21: 264 }, o($Vy, [2, 34]), { 10: $Vs1, 58: $Vt1, 81: $Vu1, 102: $Vv1, 104: 265, 105: 230, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }, o($VC1, [2, 126]), { 14: $VD, 42: $VE, 58: $VF, 86: $VG, 98: 266, 102: $VH, 103: $VI, 106: $VJ, 108: $VK, 111: $VL, 112: $VM, 113: $VN, 117: 84 }, { 14: $VD, 42: $VE, 58: $VF, 86: $VG, 98: 267, 102: $VH, 103: $VI, 106: $VJ, 108: $VK, 111: $VL, 112: $VM, 113: $VN, 117: 84 }, { 95: [1, 268] }, o($Vg1, [2, 113]), o($VP, [2, 53]), { 30: 269, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($VP, [2, 61]), o($Ve1, $V4, { 5: 270 }), o($VB1, [2, 124], { 105: 256, 10: $Vs1, 58: $Vt1, 81: $Vu1, 102: $Vv1, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }), o($Vg1, [2, 119], { 117: 160, 10: [1, 271], 14: $VD, 42: $VE, 58: $VF, 86: $VG, 102: $VH, 103: $VI, 106: $VJ, 108: $VK, 111: $VL, 112: $VM, 113: $VN }), o($Vg1, [2, 120], { 117: 160, 10: [1, 272], 14: $VD, 42: $VE, 58: $VF, 86: $VG, 102: $VH, 103: $VI, 106: $VJ, 108: $VK, 111: $VL, 112: $VM, 113: $VN }), o($Vg1, [2, 107]), { 31: [1, 273], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 6: 11, 7: 12, 8: $V5, 9: $V6, 10: $V7, 11: $V8, 20: 17, 22: 18, 23: 19, 24: 20, 25: 21, 26: 22, 27: $V9, 32: [1, 274], 33: 24, 34: $Va, 36: $Vb, 38: $Vc, 40: 28, 41: 38, 42: $Vd, 43: 39, 45: 40, 58: $Ve, 81: $Vf, 82: $Vg, 83: $Vh, 84: $Vi, 85: $Vj, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs, 118: $Vt, 119: $Vu, 120: $Vv, 121: $Vw }, { 10: $Vs1, 58: $Vt1, 81: $Vu1, 89: 275, 102: $Vv1, 104: 229, 105: 230, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }, { 10: $Vs1, 58: $Vt1, 81: $Vu1, 89: 276, 102: $Vv1, 104: 229, 105: 230, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }, o($VP, [2, 57]), o($Vy, [2, 33]), o($Vg1, [2, 117], { 103: $VA1 }), o($Vg1, [2, 118], { 103: $VA1 })], - defaultActions: {}, - parseError: function parseError(str, hash) { - if (hash.recoverable) { - this.trace(str); - } else { - var error = new Error(str); - error.hash = hash; - throw error; - } - }, - parse: function parse(input) { - var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; - var args = lstack.slice.call(arguments, 1); - var lexer2 = Object.create(this.lexer); - var sharedState = { yy: {} }; - for (var k in this.yy) { - if (Object.prototype.hasOwnProperty.call(this.yy, k)) { - sharedState.yy[k] = this.yy[k]; - } - } - lexer2.setInput(input, sharedState.yy); - sharedState.yy.lexer = lexer2; - sharedState.yy.parser = this; - if (typeof lexer2.yylloc == "undefined") { - lexer2.yylloc = {}; - } - var yyloc = lexer2.yylloc; - lstack.push(yyloc); - var ranges = lexer2.options && lexer2.options.ranges; - if (typeof sharedState.yy.parseError === "function") { - this.parseError = sharedState.yy.parseError; - } else { - this.parseError = Object.getPrototypeOf(this).parseError; - } - function lex2() { - var token; - token = tstack.pop() || lexer2.lex() || EOF; - if (typeof token !== "number") { - if (token instanceof Array) { - tstack = token; - token = tstack.pop(); - } - token = self.symbols_[token] || token; - } - return token; - } - var symbol, state, action, r, yyval = {}, p, len, newState, expected; - while (true) { - state = stack[stack.length - 1]; - if (this.defaultActions[state]) { - action = this.defaultActions[state]; - } else { - if (symbol === null || typeof symbol == "undefined") { - symbol = lex2(); - } - action = table[state] && table[state][symbol]; - } - if (typeof action === "undefined" || !action.length || !action[0]) { - var errStr = ""; - expected = []; - for (p in table[state]) { - if (this.terminals_[p] && p > TERROR) { - expected.push("'" + this.terminals_[p] + "'"); - } - } - if (lexer2.showPosition) { - errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; - } else { - errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); - } - this.parseError(errStr, { - text: lexer2.match, - token: this.terminals_[symbol] || symbol, - line: lexer2.yylineno, - loc: yyloc, - expected - }); - } - if (action[0] instanceof Array && action.length > 1) { - throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); - } - switch (action[0]) { - case 1: - stack.push(symbol); - vstack.push(lexer2.yytext); - lstack.push(lexer2.yylloc); - stack.push(action[1]); - symbol = null; - { - yyleng = lexer2.yyleng; - yytext = lexer2.yytext; - yylineno = lexer2.yylineno; - yyloc = lexer2.yylloc; - } - break; - case 2: - len = this.productions_[action[1]][1]; - yyval.$ = vstack[vstack.length - len]; - yyval._$ = { - first_line: lstack[lstack.length - (len || 1)].first_line, - last_line: lstack[lstack.length - 1].last_line, - first_column: lstack[lstack.length - (len || 1)].first_column, - last_column: lstack[lstack.length - 1].last_column - }; - if (ranges) { - yyval._$.range = [ - lstack[lstack.length - (len || 1)].range[0], - lstack[lstack.length - 1].range[1] - ]; - } - r = this.performAction.apply(yyval, [ - yytext, - yyleng, - yylineno, - sharedState.yy, - action[1], - vstack, - lstack - ].concat(args)); - if (typeof r !== "undefined") { - return r; - } - if (len) { - stack = stack.slice(0, -1 * len * 2); - vstack = vstack.slice(0, -1 * len); - lstack = lstack.slice(0, -1 * len); - } - stack.push(this.productions_[action[1]][0]); - vstack.push(yyval.$); - lstack.push(yyval._$); - newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; - stack.push(newState); - break; - case 3: - return true; - } - } - return true; - } - }; - var lexer = function() { - var lexer2 = { - EOF: 1, - parseError: function parseError(str, hash) { - if (this.yy.parser) { - this.yy.parser.parseError(str, hash); - } else { - throw new Error(str); - } - }, - // resets the lexer, sets new input - setInput: function(input, yy) { - this.yy = yy || this.yy || {}; - this._input = input; - this._more = this._backtrack = this.done = false; - this.yylineno = this.yyleng = 0; - this.yytext = this.matched = this.match = ""; - this.conditionStack = ["INITIAL"]; - this.yylloc = { - first_line: 1, - first_column: 0, - last_line: 1, - last_column: 0 - }; - if (this.options.ranges) { - this.yylloc.range = [0, 0]; - } - this.offset = 0; - return this; - }, - // consumes and returns one char from the input - input: function() { - var ch = this._input[0]; - this.yytext += ch; - this.yyleng++; - this.offset++; - this.match += ch; - this.matched += ch; - var lines = ch.match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno++; - this.yylloc.last_line++; - } else { - this.yylloc.last_column++; - } - if (this.options.ranges) { - this.yylloc.range[1]++; - } - this._input = this._input.slice(1); - return ch; - }, - // unshifts one char (or a string) into the input - unput: function(ch) { - var len = ch.length; - var lines = ch.split(/(?:\r\n?|\n)/g); - this._input = ch + this._input; - this.yytext = this.yytext.substr(0, this.yytext.length - len); - this.offset -= len; - var oldLines = this.match.split(/(?:\r\n?|\n)/g); - this.match = this.match.substr(0, this.match.length - 1); - this.matched = this.matched.substr(0, this.matched.length - 1); - if (lines.length - 1) { - this.yylineno -= lines.length - 1; - } - var r = this.yylloc.range; - this.yylloc = { - first_line: this.yylloc.first_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.first_column, - last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len - }; - if (this.options.ranges) { - this.yylloc.range = [r[0], r[0] + this.yyleng - len]; - } - this.yyleng = this.yytext.length; - return this; - }, - // When called from action, caches matched text and appends it on next action - more: function() { - this._more = true; - return this; - }, - // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. - reject: function() { - if (this.options.backtrack_lexer) { - this._backtrack = true; - } else { - return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), { - text: "", - token: null, - line: this.yylineno - }); - } - return this; - }, - // retain first n characters of the match - less: function(n) { - this.unput(this.match.slice(n)); - }, - // displays already matched input, i.e. for error messages - pastInput: function() { - var past = this.matched.substr(0, this.matched.length - this.match.length); - return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); - }, - // displays upcoming input, i.e. for error messages - upcomingInput: function() { - var next = this.match; - if (next.length < 20) { - next += this._input.substr(0, 20 - next.length); - } - return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); - }, - // displays the character position where the lexing error occurred, i.e. for error messages - showPosition: function() { - var pre = this.pastInput(); - var c = new Array(pre.length + 1).join("-"); - return pre + this.upcomingInput() + "\n" + c + "^"; - }, - // test the lexed token: return FALSE when not a match, otherwise return token - test_match: function(match, indexed_rule) { - var token, lines, backup; - if (this.options.backtrack_lexer) { - backup = { - yylineno: this.yylineno, - yylloc: { - first_line: this.yylloc.first_line, - last_line: this.last_line, - first_column: this.yylloc.first_column, - last_column: this.yylloc.last_column - }, - yytext: this.yytext, - match: this.match, - matches: this.matches, - matched: this.matched, - yyleng: this.yyleng, - offset: this.offset, - _more: this._more, - _input: this._input, - yy: this.yy, - conditionStack: this.conditionStack.slice(0), - done: this.done - }; - if (this.options.ranges) { - backup.yylloc.range = this.yylloc.range.slice(0); - } - } - lines = match[0].match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno += lines.length; - } - this.yylloc = { - first_line: this.yylloc.last_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.last_column, - last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length - }; - this.yytext += match[0]; - this.match += match[0]; - this.matches = match; - this.yyleng = this.yytext.length; - if (this.options.ranges) { - this.yylloc.range = [this.offset, this.offset += this.yyleng]; - } - this._more = false; - this._backtrack = false; - this._input = this._input.slice(match[0].length); - this.matched += match[0]; - token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); - if (this.done && this._input) { - this.done = false; - } - if (token) { - return token; - } else if (this._backtrack) { - for (var k in backup) { - this[k] = backup[k]; - } - return false; - } - return false; - }, - // return next match in input - next: function() { - if (this.done) { - return this.EOF; - } - if (!this._input) { - this.done = true; - } - var token, match, tempMatch, index; - if (!this._more) { - this.yytext = ""; - this.match = ""; - } - var rules = this._currentRules(); - for (var i = 0; i < rules.length; i++) { - tempMatch = this._input.match(this.rules[rules[i]]); - if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { - match = tempMatch; - index = i; - if (this.options.backtrack_lexer) { - token = this.test_match(tempMatch, rules[i]); - if (token !== false) { - return token; - } else if (this._backtrack) { - match = false; - continue; - } else { - return false; - } - } else if (!this.options.flex) { - break; - } - } - } - if (match) { - token = this.test_match(match, rules[index]); - if (token !== false) { - return token; - } - return false; - } - if (this._input === "") { - return this.EOF; - } else { - return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { - text: "", - token: null, - line: this.yylineno - }); - } - }, - // return next match that has a token - lex: function lex2() { - var r = this.next(); - if (r) { - return r; - } else { - return this.lex(); - } - }, - // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) - begin: function begin(condition) { - this.conditionStack.push(condition); - }, - // pop the previously active lexer condition state off the condition stack - popState: function popState() { - var n = this.conditionStack.length - 1; - if (n > 0) { - return this.conditionStack.pop(); - } else { - return this.conditionStack[0]; - } - }, - // produce the lexer rule set which is active for the currently active lexer condition state - _currentRules: function _currentRules() { - if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { - return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; - } else { - return this.conditions["INITIAL"].rules; - } - }, - // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available - topState: function topState(n) { - n = this.conditionStack.length - 1 - Math.abs(n || 0); - if (n >= 0) { - return this.conditionStack[n]; - } else { - return "INITIAL"; - } - }, - // alias for begin(condition) - pushState: function pushState(condition) { - this.begin(condition); - }, - // return the number of states currently on the stack - stateStackSize: function stateStackSize() { - return this.conditionStack.length; - }, - options: {}, - performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { - switch ($avoiding_name_collisions) { - case 0: - this.begin("acc_title"); - return 34; - case 1: - this.popState(); - return "acc_title_value"; - case 2: - this.begin("acc_descr"); - return 36; - case 3: - this.popState(); - return "acc_descr_value"; - case 4: - this.begin("acc_descr_multiline"); - break; - case 5: - this.popState(); - break; - case 6: - return "acc_descr_multiline_value"; - case 7: - this.begin("callbackname"); - break; - case 8: - this.popState(); - break; - case 9: - this.popState(); - this.begin("callbackargs"); - break; - case 10: - return 92; - case 11: - this.popState(); - break; - case 12: - return 93; - case 13: - return "MD_STR"; - case 14: - this.popState(); - break; - case 15: - this.begin("md_string"); - break; - case 16: - return "STR"; - case 17: - this.popState(); - break; - case 18: - this.pushState("string"); - break; - case 19: - return 81; - case 20: - return 99; - case 21: - return 82; - case 22: - return 101; - case 23: - return 83; - case 24: - return 84; - case 25: - return 94; - case 26: - this.begin("click"); - break; - case 27: - this.popState(); - break; - case 28: - return 85; - case 29: - if (yy.lex.firstGraph()) { - this.begin("dir"); - } - return 12; - case 30: - if (yy.lex.firstGraph()) { - this.begin("dir"); - } - return 12; - case 31: - if (yy.lex.firstGraph()) { - this.begin("dir"); - } - return 12; - case 32: - return 27; - case 33: - return 32; - case 34: - return 95; - case 35: - return 95; - case 36: - return 95; - case 37: - return 95; - case 38: - this.popState(); - return 13; - case 39: - this.popState(); - return 14; - case 40: - this.popState(); - return 14; - case 41: - this.popState(); - return 14; - case 42: - this.popState(); - return 14; - case 43: - this.popState(); - return 14; - case 44: - this.popState(); - return 14; - case 45: - this.popState(); - return 14; - case 46: - this.popState(); - return 14; - case 47: - this.popState(); - return 14; - case 48: - this.popState(); - return 14; - case 49: - return 118; - case 50: - return 119; - case 51: - return 120; - case 52: - return 121; - case 53: - return 102; - case 54: - return 108; - case 55: - return 44; - case 56: - return 58; - case 57: - return 42; - case 58: - return 8; - case 59: - return 103; - case 60: - return 112; - case 61: - this.popState(); - return 75; - case 62: - this.pushState("edgeText"); - return 73; - case 63: - return 116; - case 64: - this.popState(); - return 75; - case 65: - this.pushState("thickEdgeText"); - return 73; - case 66: - return 116; - case 67: - this.popState(); - return 75; - case 68: - this.pushState("dottedEdgeText"); - return 73; - case 69: - return 116; - case 70: - return 75; - case 71: - this.popState(); - return 51; - case 72: - return "TEXT"; - case 73: - this.pushState("ellipseText"); - return 50; - case 74: - this.popState(); - return 53; - case 75: - this.pushState("text"); - return 52; - case 76: - this.popState(); - return 55; - case 77: - this.pushState("text"); - return 54; - case 78: - return 56; - case 79: - this.pushState("text"); - return 65; - case 80: - this.popState(); - return 62; - case 81: - this.pushState("text"); - return 61; - case 82: - this.popState(); - return 47; - case 83: - this.pushState("text"); - return 46; - case 84: - this.popState(); - return 67; - case 85: - this.popState(); - return 69; - case 86: - return 114; - case 87: - this.pushState("trapText"); - return 66; - case 88: - this.pushState("trapText"); - return 68; - case 89: - return 115; - case 90: - return 65; - case 91: - return 87; - case 92: - return "SEP"; - case 93: - return 86; - case 94: - return 112; - case 95: - return 108; - case 96: - return 42; - case 97: - return 106; - case 98: - return 111; - case 99: - return 113; - case 100: - this.popState(); - return 60; - case 101: - this.pushState("text"); - return 60; - case 102: - this.popState(); - return 49; - case 103: - this.pushState("text"); - return 48; - case 104: - this.popState(); - return 31; - case 105: - this.pushState("text"); - return 29; - case 106: - this.popState(); - return 64; - case 107: - this.pushState("text"); - return 63; - case 108: - return "TEXT"; - case 109: - return "QUOTE"; - case 110: - return 9; - case 111: - return 10; - case 112: - return 11; - } - }, - rules: [/^(?:accTitle\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*\{\s*)/, /^(?:[\}])/, /^(?:[^\}]*)/, /^(?:call[\s]+)/, /^(?:\([\s]*\))/, /^(?:\()/, /^(?:[^(]*)/, /^(?:\))/, /^(?:[^)]*)/, /^(?:[^`"]+)/, /^(?:[`]["])/, /^(?:["][`])/, /^(?:[^"]+)/, /^(?:["])/, /^(?:["])/, /^(?:style\b)/, /^(?:default\b)/, /^(?:linkStyle\b)/, /^(?:interpolate\b)/, /^(?:classDef\b)/, /^(?:class\b)/, /^(?:href[\s])/, /^(?:click[\s]+)/, /^(?:[\s\n])/, /^(?:[^\s\n]*)/, /^(?:flowchart-elk\b)/, /^(?:graph\b)/, /^(?:flowchart\b)/, /^(?:subgraph\b)/, /^(?:end\b\s*)/, /^(?:_self\b)/, /^(?:_blank\b)/, /^(?:_parent\b)/, /^(?:_top\b)/, /^(?:(\r?\n)*\s*\n)/, /^(?:\s*LR\b)/, /^(?:\s*RL\b)/, /^(?:\s*TB\b)/, /^(?:\s*BT\b)/, /^(?:\s*TD\b)/, /^(?:\s*BR\b)/, /^(?:\s*<)/, /^(?:\s*>)/, /^(?:\s*\^)/, /^(?:\s*v\b)/, /^(?:.*direction\s+TB[^\n]*)/, /^(?:.*direction\s+BT[^\n]*)/, /^(?:.*direction\s+RL[^\n]*)/, /^(?:.*direction\s+LR[^\n]*)/, /^(?:[0-9]+)/, /^(?:#)/, /^(?::::)/, /^(?::)/, /^(?:&)/, /^(?:;)/, /^(?:,)/, /^(?:\*)/, /^(?:\s*[xo<]?--+[-xo>]\s*)/, /^(?:\s*[xo<]?--\s*)/, /^(?:[^-]|-(?!-)+)/, /^(?:\s*[xo<]?==+[=xo>]\s*)/, /^(?:\s*[xo<]?==\s*)/, /^(?:[^=]|=(?!))/, /^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/, /^(?:\s*[xo<]?-\.\s*)/, /^(?:[^\.]|\.(?!))/, /^(?:\s*~~[\~]+\s*)/, /^(?:[-/\)][\)])/, /^(?:[^\(\)\[\]\{\}]|!\)+)/, /^(?:\(-)/, /^(?:\]\))/, /^(?:\(\[)/, /^(?:\]\])/, /^(?:\[\[)/, /^(?:\[\|)/, /^(?:>)/, /^(?:\)\])/, /^(?:\[\()/, /^(?:\)\)\))/, /^(?:\(\(\()/, /^(?:[\\(?=\])][\]])/, /^(?:\/(?=\])\])/, /^(?:\/(?!\])|\\(?!\])|[^\\\[\]\(\)\{\}\/]+)/, /^(?:\[\/)/, /^(?:\[\\)/, /^(?:<)/, /^(?:>)/, /^(?:\^)/, /^(?:\\\|)/, /^(?:v\b)/, /^(?:\*)/, /^(?:#)/, /^(?:&)/, /^(?:([A-Za-z0-9!"\#$%&'*+\.`?\\_\/]|-(?=[^\>\-\.])|(?!))+)/, /^(?:-)/, /^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/, /^(?:\|)/, /^(?:\|)/, /^(?:\))/, /^(?:\()/, /^(?:\])/, /^(?:\[)/, /^(?:(\}))/, /^(?:\{)/, /^(?:[^\[\]\(\)\{\}\|\"]+)/, /^(?:")/, /^(?:(\r?\n)+)/, /^(?:\s)/, /^(?:$)/], - conditions: { "callbackargs": { "rules": [11, 12, 15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "callbackname": { "rules": [8, 9, 10, 15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "href": { "rules": [15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "click": { "rules": [15, 18, 27, 28, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "dottedEdgeText": { "rules": [15, 18, 67, 69, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "thickEdgeText": { "rules": [15, 18, 64, 66, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "edgeText": { "rules": [15, 18, 61, 63, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "trapText": { "rules": [15, 18, 70, 73, 75, 77, 81, 83, 84, 85, 86, 87, 88, 101, 103, 105, 107], "inclusive": false }, "ellipseText": { "rules": [15, 18, 70, 71, 72, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "text": { "rules": [15, 18, 70, 73, 74, 75, 76, 77, 80, 81, 82, 83, 87, 88, 100, 101, 102, 103, 104, 105, 106, 107, 108], "inclusive": false }, "vertex": { "rules": [15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "dir": { "rules": [15, 18, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "acc_descr_multiline": { "rules": [5, 6, 15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "acc_descr": { "rules": [3, 15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "acc_title": { "rules": [1, 15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "md_string": { "rules": [13, 14, 15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "string": { "rules": [15, 16, 17, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "INITIAL": { "rules": [0, 2, 4, 7, 15, 18, 19, 20, 21, 22, 23, 24, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 64, 65, 67, 68, 70, 73, 75, 77, 78, 79, 81, 83, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 101, 103, 105, 107, 109, 110, 111, 112], "inclusive": true } } - }; - return lexer2; - }(); - parser2.lexer = lexer; - function Parser() { - this.yy = {}; - } - Parser.prototype = parser2; - parser2.Parser = Parser; - return new Parser(); -}(); -parser.parser = parser; -const parser$1 = parser; -const MERMAID_DOM_ID_PREFIX = "flowchart-"; -let vertexCounter = 0; -let config = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)(); -let vertices = {}; -let edges = []; -let classes = {}; -let subGraphs = []; -let subGraphLookup = {}; -let tooltips = {}; -let subCount = 0; -let firstGraphFlag = true; -let direction; -let version; -let funs = []; -const sanitizeText = (txt) => _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.e.sanitizeText(txt, config); -const lookUpDomId = function(id) { - const vertexKeys = Object.keys(vertices); - for (const vertexKey of vertexKeys) { - if (vertices[vertexKey].id === id) { - return vertices[vertexKey].domId; - } - } - return id; -}; -const addVertex = function(_id, textObj, type, style, classes2, dir, props = {}) { - let txt; - let id = _id; - if (id === void 0) { - return; - } - if (id.trim().length === 0) { - return; - } - if (vertices[id] === void 0) { - vertices[id] = { - id, - labelType: "text", - domId: MERMAID_DOM_ID_PREFIX + id + "-" + vertexCounter, - styles: [], - classes: [] - }; - } - vertexCounter++; - if (textObj !== void 0) { - config = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)(); - txt = sanitizeText(textObj.text.trim()); - vertices[id].labelType = textObj.type; - if (txt[0] === '"' && txt[txt.length - 1] === '"') { - txt = txt.substring(1, txt.length - 1); - } - vertices[id].text = txt; - } else { - if (vertices[id].text === void 0) { - vertices[id].text = _id; - } - } - if (type !== void 0) { - vertices[id].type = type; - } - if (style !== void 0 && style !== null) { - style.forEach(function(s) { - vertices[id].styles.push(s); - }); - } - if (classes2 !== void 0 && classes2 !== null) { - classes2.forEach(function(s) { - vertices[id].classes.push(s); - }); - } - if (dir !== void 0) { - vertices[id].dir = dir; - } - if (vertices[id].props === void 0) { - vertices[id].props = props; - } else if (props !== void 0) { - Object.assign(vertices[id].props, props); - } -}; -const addSingleLink = function(_start, _end, type) { - let start = _start; - let end = _end; - const edge = { start, end, type: void 0, text: "", labelType: "text" }; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.info("abc78 Got edge...", edge); - const linkTextObj = type.text; - if (linkTextObj !== void 0) { - edge.text = sanitizeText(linkTextObj.text.trim()); - if (edge.text[0] === '"' && edge.text[edge.text.length - 1] === '"') { - edge.text = edge.text.substring(1, edge.text.length - 1); - } - edge.labelType = linkTextObj.type; - } - if (type !== void 0) { - edge.type = type.type; - edge.stroke = type.stroke; - edge.length = type.length; - } - if ((edge == null ? void 0 : edge.length) > 10) { - edge.length = 10; - } - if (edges.length < (config.maxEdges ?? 500)) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.info("abc78 pushing edge..."); - edges.push(edge); - } else { - throw new Error( - `Edge limit exceeded. ${edges.length} edges found, but the limit is ${config.maxEdges}. - -Initialize mermaid with maxEdges set to a higher number to allow more edges. -You cannot set this config via configuration inside the diagram as it is a secure config. -You have to call mermaid.initialize.` - ); - } -}; -const addLink = function(_start, _end, type) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.info("addLink (abc78)", _start, _end, type); - let i, j; - for (i = 0; i < _start.length; i++) { - for (j = 0; j < _end.length; j++) { - addSingleLink(_start[i], _end[j], type); - } - } -}; -const updateLinkInterpolate = function(positions, interp) { - positions.forEach(function(pos) { - if (pos === "default") { - edges.defaultInterpolate = interp; - } else { - edges[pos].interpolate = interp; - } - }); -}; -const updateLink = function(positions, style) { - positions.forEach(function(pos) { - if (pos >= edges.length) { - throw new Error( - `The index ${pos} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${edges.length - 1}. (Help: Ensure that the index is within the range of existing edges.)` - ); - } - if (pos === "default") { - edges.defaultStyle = style; - } else { - if (_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.u.isSubstringInArray("fill", style) === -1) { - style.push("fill:none"); - } - edges[pos].style = style; - } - }); -}; -const addClass = function(ids, style) { - ids.split(",").forEach(function(id) { - if (classes[id] === void 0) { - classes[id] = { id, styles: [], textStyles: [] }; - } - if (style !== void 0 && style !== null) { - style.forEach(function(s) { - if (s.match("color")) { - const newStyle = s.replace("fill", "bgFill").replace("color", "fill"); - classes[id].textStyles.push(newStyle); - } - classes[id].styles.push(s); - }); - } - }); -}; -const setDirection = function(dir) { - direction = dir; - if (direction.match(/.*/)) { - direction = "LR"; - } - if (direction.match(/.*v/)) { - direction = "TB"; - } - if (direction === "TD") { - direction = "TB"; - } -}; -const setClass = function(ids, className) { - ids.split(",").forEach(function(_id) { - let id = _id; - if (vertices[id] !== void 0) { - vertices[id].classes.push(className); - } - if (subGraphLookup[id] !== void 0) { - subGraphLookup[id].classes.push(className); - } - }); -}; -const setTooltip = function(ids, tooltip) { - ids.split(",").forEach(function(id) { - if (tooltip !== void 0) { - tooltips[version === "gen-1" ? lookUpDomId(id) : id] = sanitizeText(tooltip); - } - }); -}; -const setClickFun = function(id, functionName, functionArgs) { - let domId = lookUpDomId(id); - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().securityLevel !== "loose") { - return; - } - if (functionName === void 0) { - return; - } - let argList = []; - if (typeof functionArgs === "string") { - argList = functionArgs.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/); - for (let i = 0; i < argList.length; i++) { - let item = argList[i].trim(); - if (item.charAt(0) === '"' && item.charAt(item.length - 1) === '"') { - item = item.substr(1, item.length - 2); - } - argList[i] = item; - } - } - if (argList.length === 0) { - argList.push(id); - } - if (vertices[id] !== void 0) { - vertices[id].haveCallback = true; - funs.push(function() { - const elem = document.querySelector(`[id="${domId}"]`); - if (elem !== null) { - elem.addEventListener( - "click", - function() { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.u.runFunc(functionName, ...argList); - }, - false - ); - } - }); - } -}; -const setLink = function(ids, linkStr, target) { - ids.split(",").forEach(function(id) { - if (vertices[id] !== void 0) { - vertices[id].link = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.u.formatUrl(linkStr, config); - vertices[id].linkTarget = target; - } - }); - setClass(ids, "clickable"); -}; -const getTooltip = function(id) { - if (tooltips.hasOwnProperty(id)) { - return tooltips[id]; - } - return void 0; -}; -const setClickEvent = function(ids, functionName, functionArgs) { - ids.split(",").forEach(function(id) { - setClickFun(id, functionName, functionArgs); - }); - setClass(ids, "clickable"); -}; -const bindFunctions = function(element) { - funs.forEach(function(fun) { - fun(element); - }); -}; -const getDirection = function() { - return direction.trim(); -}; -const getVertices = function() { - return vertices; -}; -const getEdges = function() { - return edges; -}; -const getClasses = function() { - return classes; -}; -const setupToolTips = function(element) { - let tooltipElem = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(".mermaidTooltip"); - if ((tooltipElem._groups || tooltipElem)[0][0] === null) { - tooltipElem = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)("body").append("div").attr("class", "mermaidTooltip").style("opacity", 0); - } - const svg = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(element).select("svg"); - const nodes = svg.selectAll("g.node"); - nodes.on("mouseover", function() { - const el = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(this); - const title = el.attr("title"); - if (title === null) { - return; - } - const rect = this.getBoundingClientRect(); - tooltipElem.transition().duration(200).style("opacity", ".9"); - tooltipElem.text(el.attr("title")).style("left", window.scrollX + rect.left + (rect.right - rect.left) / 2 + "px").style("top", window.scrollY + rect.bottom + "px"); - tooltipElem.html(tooltipElem.html().replace(/<br\/>/g, "
    ")); - el.classed("hover", true); - }).on("mouseout", function() { - tooltipElem.transition().duration(500).style("opacity", 0); - const el = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(this); - el.classed("hover", false); - }); -}; -funs.push(setupToolTips); -const clear = function(ver = "gen-1") { - vertices = {}; - classes = {}; - edges = []; - funs = [setupToolTips]; - subGraphs = []; - subGraphLookup = {}; - subCount = 0; - tooltips = {}; - firstGraphFlag = true; - version = ver; - config = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)(); - (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.v)(); -}; -const setGen = (ver) => { - version = ver || "gen-2"; -}; -const defaultStyle = function() { - return "fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"; -}; -const addSubGraph = function(_id, list, _title) { - let id = _id.text.trim(); - let title = _title.text; - if (_id === _title && _title.text.match(/\s/)) { - id = void 0; - } - function uniq(a) { - const prims = { boolean: {}, number: {}, string: {} }; - const objs = []; - let dir2; - const nodeList2 = a.filter(function(item) { - const type = typeof item; - if (item.stmt && item.stmt === "dir") { - dir2 = item.value; - return false; - } - if (item.trim() === "") { - return false; - } - if (type in prims) { - return prims[type].hasOwnProperty(item) ? false : prims[type][item] = true; - } else { - return objs.includes(item) ? false : objs.push(item); - } - }); - return { nodeList: nodeList2, dir: dir2 }; - } - let nodeList = []; - const { nodeList: nl, dir } = uniq(nodeList.concat.apply(nodeList, list)); - nodeList = nl; - if (version === "gen-1") { - for (let i = 0; i < nodeList.length; i++) { - nodeList[i] = lookUpDomId(nodeList[i]); - } - } - id = id || "subGraph" + subCount; - title = title || ""; - title = sanitizeText(title); - subCount = subCount + 1; - const subGraph = { - id, - nodes: nodeList, - title: title.trim(), - classes: [], - dir, - labelType: _title.type - }; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Adding", subGraph.id, subGraph.nodes, subGraph.dir); - subGraph.nodes = makeUniq(subGraph, subGraphs).nodes; - subGraphs.push(subGraph); - subGraphLookup[id] = subGraph; - return id; -}; -const getPosForId = function(id) { - for (const [i, subGraph] of subGraphs.entries()) { - if (subGraph.id === id) { - return i; - } - } - return -1; -}; -let secCount = -1; -const posCrossRef = []; -const indexNodes2 = function(id, pos) { - const nodes = subGraphs[pos].nodes; - secCount = secCount + 1; - if (secCount > 2e3) { - return; - } - posCrossRef[secCount] = pos; - if (subGraphs[pos].id === id) { - return { - result: true, - count: 0 - }; - } - let count = 0; - let posCount = 1; - while (count < nodes.length) { - const childPos = getPosForId(nodes[count]); - if (childPos >= 0) { - const res = indexNodes2(id, childPos); - if (res.result) { - return { - result: true, - count: posCount + res.count - }; - } else { - posCount = posCount + res.count; - } - } - count = count + 1; - } - return { - result: false, - count: posCount - }; -}; -const getDepthFirstPos = function(pos) { - return posCrossRef[pos]; -}; -const indexNodes = function() { - secCount = -1; - if (subGraphs.length > 0) { - indexNodes2("none", subGraphs.length - 1); - } -}; -const getSubGraphs = function() { - return subGraphs; -}; -const firstGraph = () => { - if (firstGraphFlag) { - firstGraphFlag = false; - return true; - } - return false; -}; -const destructStartLink = (_str) => { - let str = _str.trim(); - let type = "arrow_open"; - switch (str[0]) { - case "<": - type = "arrow_point"; - str = str.slice(1); - break; - case "x": - type = "arrow_cross"; - str = str.slice(1); - break; - case "o": - type = "arrow_circle"; - str = str.slice(1); - break; - } - let stroke = "normal"; - if (str.includes("=")) { - stroke = "thick"; - } - if (str.includes(".")) { - stroke = "dotted"; - } - return { type, stroke }; -}; -const countChar = (char, str) => { - const length = str.length; - let count = 0; - for (let i = 0; i < length; ++i) { - if (str[i] === char) { - ++count; - } - } - return count; -}; -const destructEndLink = (_str) => { - const str = _str.trim(); - let line = str.slice(0, -1); - let type = "arrow_open"; - switch (str.slice(-1)) { - case "x": - type = "arrow_cross"; - if (str[0] === "x") { - type = "double_" + type; - line = line.slice(1); - } - break; - case ">": - type = "arrow_point"; - if (str[0] === "<") { - type = "double_" + type; - line = line.slice(1); - } - break; - case "o": - type = "arrow_circle"; - if (str[0] === "o") { - type = "double_" + type; - line = line.slice(1); - } - break; - } - let stroke = "normal"; - let length = line.length - 1; - if (line[0] === "=") { - stroke = "thick"; - } - if (line[0] === "~") { - stroke = "invisible"; - } - let dots = countChar(".", line); - if (dots) { - stroke = "dotted"; - length = dots; - } - return { type, stroke, length }; -}; -const destructLink = (_str, _startStr) => { - const info = destructEndLink(_str); - let startInfo; - if (_startStr) { - startInfo = destructStartLink(_startStr); - if (startInfo.stroke !== info.stroke) { - return { type: "INVALID", stroke: "INVALID" }; - } - if (startInfo.type === "arrow_open") { - startInfo.type = info.type; - } else { - if (startInfo.type !== info.type) { - return { type: "INVALID", stroke: "INVALID" }; - } - startInfo.type = "double_" + startInfo.type; - } - if (startInfo.type === "double_arrow") { - startInfo.type = "double_arrow_point"; - } - startInfo.length = info.length; - return startInfo; - } - return info; -}; -const exists = (allSgs, _id) => { - let res = false; - allSgs.forEach((sg) => { - const pos = sg.nodes.indexOf(_id); - if (pos >= 0) { - res = true; - } - }); - return res; -}; -const makeUniq = (sg, allSubgraphs) => { - const res = []; - sg.nodes.forEach((_id, pos) => { - if (!exists(allSubgraphs, _id)) { - res.push(sg.nodes[pos]); - } - }); - return { nodes: res }; -}; -const lex = { - firstGraph -}; -const flowDb = { - defaultConfig: () => _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.K.flowchart, - setAccTitle: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.s, - getAccTitle: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.g, - getAccDescription: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.a, - setAccDescription: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.b, - addVertex, - lookUpDomId, - addLink, - updateLinkInterpolate, - updateLink, - addClass, - setDirection, - setClass, - setTooltip, - getTooltip, - setClickEvent, - setLink, - bindFunctions, - getDirection, - getVertices, - getEdges, - getClasses, - clear, - setGen, - defaultStyle, - addSubGraph, - getDepthFirstPos, - indexNodes, - getSubGraphs, - destructLink, - lex, - exists, - makeUniq, - setDiagramTitle: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.q, - getDiagramTitle: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.t -}; -const db = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ - __proto__: null, - addClass, - addLink, - addSingleLink, - addSubGraph, - addVertex, - bindFunctions, - clear, - default: flowDb, - defaultStyle, - destructLink, - firstGraph, - getClasses, - getDepthFirstPos, - getDirection, - getEdges, - getSubGraphs, - getTooltip, - getVertices, - indexNodes, - lex, - lookUpDomId, - setClass, - setClickEvent, - setDirection, - setGen, - setLink, - updateLink, - updateLinkInterpolate -}, Symbol.toStringTag, { value: "Module" })); - - - -/***/ }), - -/***/ 21689: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ diagram: () => (/* binding */ diagram) -/* harmony export */ }); -/* harmony import */ var _flowDb_956e92f1_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(35860); -/* harmony import */ var _styles_c10674c1_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(35900); -/* harmony import */ var _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(86079); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(26312); -/* harmony import */ var dagre_d3_es_src_graphlib_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(697); -/* harmony import */ var dagre_d3_es_src_dagre_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(21176); -/* harmony import */ var dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(14075); -/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(74353); -/* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(16750); -/* harmony import */ var dompurify__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(99418); - - - - - - - - - - - - - - - - - - - - - -const diagram = { - parser: _flowDb_956e92f1_js__WEBPACK_IMPORTED_MODULE_7__.p, - db: _flowDb_956e92f1_js__WEBPACK_IMPORTED_MODULE_7__.f, - renderer: _styles_c10674c1_js__WEBPACK_IMPORTED_MODULE_8__.f, - styles: _styles_c10674c1_js__WEBPACK_IMPORTED_MODULE_8__.a, - init: (cnf) => { - if (!cnf.flowchart) { - cnf.flowchart = {}; - } - cnf.flowchart.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute; - (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_9__.p)({ flowchart: { arrowMarkerAbsolute: cnf.arrowMarkerAbsolute } }); - _styles_c10674c1_js__WEBPACK_IMPORTED_MODULE_8__.f.setConf(cnf.flowchart); - _flowDb_956e92f1_js__WEBPACK_IMPORTED_MODULE_7__.f.clear(); - _flowDb_956e92f1_js__WEBPACK_IMPORTED_MODULE_7__.f.setGen("gen-2"); - } -}; - - - -/***/ }), - -/***/ 8995: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ r: () => (/* binding */ render) -/* harmony export */ }); -/* harmony import */ var dagre_d3_es_src_dagre_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(21176); -/* harmony import */ var dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(14075); -/* harmony import */ var _edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(88146); -/* harmony import */ var _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(86079); -/* harmony import */ var dagre_d3_es_src_graphlib_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(697); -/* harmony import */ var _createText_2e5e7dd3_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(73743); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(26312); - - - - - - - -let clusterDb = {}; -let descendants = {}; -let parents = {}; -const clear$1 = () => { - descendants = {}; - parents = {}; - clusterDb = {}; -}; -const isDescendant = (id, ancestorId) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("In isDescendant", ancestorId, " ", id, " = ", descendants[ancestorId].includes(id)); - if (descendants[ancestorId].includes(id)) { - return true; - } - return false; -}; -const edgeInCluster = (edge, clusterId) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Descendants of ", clusterId, " is ", descendants[clusterId]); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Edge is ", edge); - if (edge.v === clusterId) { - return false; - } - if (edge.w === clusterId) { - return false; - } - if (!descendants[clusterId]) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Tilt, ", clusterId, ",not in descendants"); - return false; - } - return descendants[clusterId].includes(edge.v) || isDescendant(edge.v, clusterId) || isDescendant(edge.w, clusterId) || descendants[clusterId].includes(edge.w); -}; -const copy = (clusterId, graph, newGraph, rootId) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn( - "Copying children of ", - clusterId, - "root", - rootId, - "data", - graph.node(clusterId), - rootId - ); - const nodes = graph.children(clusterId) || []; - if (clusterId !== rootId) { - nodes.push(clusterId); - } - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Copying (nodes) clusterId", clusterId, "nodes", nodes); - nodes.forEach((node) => { - if (graph.children(node).length > 0) { - copy(node, graph, newGraph, rootId); - } else { - const data = graph.node(node); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("cp ", node, " to ", rootId, " with parent ", clusterId); - newGraph.setNode(node, data); - if (rootId !== graph.parent(node)) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Setting parent", node, graph.parent(node)); - newGraph.setParent(node, graph.parent(node)); - } - if (clusterId !== rootId && node !== clusterId) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Setting parent", node, clusterId); - newGraph.setParent(node, clusterId); - } else { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("In copy ", clusterId, "root", rootId, "data", graph.node(clusterId), rootId); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug( - "Not Setting parent for node=", - node, - "cluster!==rootId", - clusterId !== rootId, - "node!==clusterId", - node !== clusterId - ); - } - const edges = graph.edges(node); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Copying Edges", edges); - edges.forEach((edge) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Edge", edge); - const data2 = graph.edge(edge.v, edge.w, edge.name); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Edge data", data2, rootId); - try { - if (edgeInCluster(edge, rootId)) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Copying as ", edge.v, edge.w, data2, edge.name); - newGraph.setEdge(edge.v, edge.w, data2, edge.name); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("newGraph edges ", newGraph.edges(), newGraph.edge(newGraph.edges()[0])); - } else { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info( - "Skipping copy of edge ", - edge.v, - "-->", - edge.w, - " rootId: ", - rootId, - " clusterId:", - clusterId - ); - } - } catch (e) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.error(e); - } - }); - } - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Removing node", node); - graph.removeNode(node); - }); -}; -const extractDescendants = (id, graph) => { - const children = graph.children(id); - let res = [...children]; - for (const child of children) { - parents[child] = id; - res = [...res, ...extractDescendants(child, graph)]; - } - return res; -}; -const findNonClusterChild = (id, graph) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("Searching", id); - const children = graph.children(id); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("Searching children of id ", id, children); - if (children.length < 1) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("This is a valid node", id); - return id; - } - for (const child of children) { - const _id = findNonClusterChild(child, graph); - if (_id) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("Found replacement for", id, " => ", _id); - return _id; - } - } -}; -const getAnchorId = (id) => { - if (!clusterDb[id]) { - return id; - } - if (!clusterDb[id].externalConnections) { - return id; - } - if (clusterDb[id]) { - return clusterDb[id].id; - } - return id; -}; -const adjustClustersAndEdges = (graph, depth) => { - if (!graph || depth > 10) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Opting out, no graph "); - return; - } else { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Opting in, graph "); - } - graph.nodes().forEach(function(id) { - const children = graph.children(id); - if (children.length > 0) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn( - "Cluster identified", - id, - " Replacement id in edges: ", - findNonClusterChild(id, graph) - ); - descendants[id] = extractDescendants(id, graph); - clusterDb[id] = { id: findNonClusterChild(id, graph), clusterData: graph.node(id) }; - } - }); - graph.nodes().forEach(function(id) { - const children = graph.children(id); - const edges = graph.edges(); - if (children.length > 0) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Cluster identified", id, descendants); - edges.forEach((edge) => { - if (edge.v !== id && edge.w !== id) { - const d1 = isDescendant(edge.v, id); - const d2 = isDescendant(edge.w, id); - if (d1 ^ d2) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Edge: ", edge, " leaves cluster ", id); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Descendants of XXX ", id, ": ", descendants[id]); - clusterDb[id].externalConnections = true; - } - } - }); - } else { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Not a cluster ", id, descendants); - } - }); - for (let id of Object.keys(clusterDb)) { - const nonClusterChild = clusterDb[id].id; - const parent = graph.parent(nonClusterChild); - if (parent !== id && clusterDb[parent] && !clusterDb[parent].externalConnections) { - clusterDb[id].id = parent; - } - } - graph.edges().forEach(function(e) { - const edge = graph.edge(e); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(e)); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(graph.edge(e))); - let v = e.v; - let w = e.w; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn( - "Fix XXX", - clusterDb, - "ids:", - e.v, - e.w, - "Translating: ", - clusterDb[e.v], - " --- ", - clusterDb[e.w] - ); - if (clusterDb[e.v] && clusterDb[e.w] && clusterDb[e.v] === clusterDb[e.w]) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Fixing and trixing link to self - removing XXX", e.v, e.w, e.name); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Fixing and trixing - removing XXX", e.v, e.w, e.name); - v = getAnchorId(e.v); - w = getAnchorId(e.w); - graph.removeEdge(e.v, e.w, e.name); - const specialId = e.w + "---" + e.v; - graph.setNode(specialId, { - domId: specialId, - id: specialId, - labelStyle: "", - labelText: edge.label, - padding: 0, - shape: "labelRect", - style: "" - }); - const edge1 = structuredClone(edge); - const edge2 = structuredClone(edge); - edge1.label = ""; - edge1.arrowTypeEnd = "none"; - edge2.label = ""; - edge1.fromCluster = e.v; - edge2.toCluster = e.v; - graph.setEdge(v, specialId, edge1, e.name + "-cyclic-special"); - graph.setEdge(specialId, w, edge2, e.name + "-cyclic-special"); - } else if (clusterDb[e.v] || clusterDb[e.w]) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Fixing and trixing - removing XXX", e.v, e.w, e.name); - v = getAnchorId(e.v); - w = getAnchorId(e.w); - graph.removeEdge(e.v, e.w, e.name); - if (v !== e.v) { - const parent = graph.parent(v); - clusterDb[parent].externalConnections = true; - edge.fromCluster = e.v; - } - if (w !== e.w) { - const parent = graph.parent(w); - clusterDb[parent].externalConnections = true; - edge.toCluster = e.w; - } - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Fix Replacing with XXX", v, w, e.name); - graph.setEdge(v, w, edge, e.name); - } - }); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Adjusted Graph", dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .M(graph)); - extractor(graph, 0); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.trace(clusterDb); -}; -const extractor = (graph, depth) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("extractor - ", depth, dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .M(graph), graph.children("D")); - if (depth > 10) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.error("Bailing out"); - return; - } - let nodes = graph.nodes(); - let hasChildren = false; - for (const node of nodes) { - const children = graph.children(node); - hasChildren = hasChildren || children.length > 0; - } - if (!hasChildren) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Done, no node has children", graph.nodes()); - return; - } - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Nodes = ", nodes, depth); - for (const node of nodes) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug( - "Extracting node", - node, - clusterDb, - clusterDb[node] && !clusterDb[node].externalConnections, - !graph.parent(node), - graph.node(node), - graph.children("D"), - " Depth ", - depth - ); - if (!clusterDb[node]) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Not a cluster", node, depth); - } else if (!clusterDb[node].externalConnections && // !graph.parent(node) && - graph.children(node) && graph.children(node).length > 0) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn( - "Cluster without external connections, without a parent and with children", - node, - depth - ); - const graphSettings = graph.graph(); - let dir = graphSettings.rankdir === "TB" ? "LR" : "TB"; - if (clusterDb[node] && clusterDb[node].clusterData && clusterDb[node].clusterData.dir) { - dir = clusterDb[node].clusterData.dir; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Fixing dir", clusterDb[node].clusterData.dir, dir); - } - const clusterGraph = new dagre_d3_es_src_graphlib_index_js__WEBPACK_IMPORTED_MODULE_2__/* .Graph */ .T({ - multigraph: true, - compound: true - }).setGraph({ - rankdir: dir, - // Todo: set proper spacing - nodesep: 50, - ranksep: 50, - marginx: 8, - marginy: 8 - }).setDefaultEdgeLabel(function() { - return {}; - }); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Old graph before copy", dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .M(graph)); - copy(node, graph, clusterGraph, node); - graph.setNode(node, { - clusterNode: true, - id: node, - clusterData: clusterDb[node].clusterData, - labelText: clusterDb[node].labelText, - graph: clusterGraph - }); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("New graph after copy node: (", node, ")", dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .M(clusterGraph)); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Old graph after copy", dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .M(graph)); - } else { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn( - "Cluster ** ", - node, - " **not meeting the criteria !externalConnections:", - !clusterDb[node].externalConnections, - " no parent: ", - !graph.parent(node), - " children ", - graph.children(node) && graph.children(node).length > 0, - graph.children("D"), - depth - ); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug(clusterDb); - } - } - nodes = graph.nodes(); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("New list of nodes", nodes); - for (const node of nodes) { - const data = graph.node(node); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn(" Now next level", node, data); - if (data.clusterNode) { - extractor(data.graph, depth + 1); - } - } -}; -const sorter = (graph, nodes) => { - if (nodes.length === 0) { - return []; - } - let result = Object.assign(nodes); - nodes.forEach((node) => { - const children = graph.children(node); - const sorted = sorter(graph, children); - result = [...result, ...sorted]; - }); - return result; -}; -const sortNodesByHierarchy = (graph) => sorter(graph, graph.children()); -const rect = (parent, node) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Creating subgraph rect for ", node.id, node); - const siteConfig = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.c)(); - const shapeSvg = parent.insert("g").attr("class", "cluster" + (node.class ? " " + node.class : "")).attr("id", node.id); - const rect2 = shapeSvg.insert("rect", ":first-child"); - const useHtmlLabels = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.m)(siteConfig.flowchart.htmlLabels); - const label = shapeSvg.insert("g").attr("class", "cluster-label"); - const text = node.labelType === "markdown" ? (0,_createText_2e5e7dd3_js__WEBPACK_IMPORTED_MODULE_5__.a)(label, node.labelText, { style: node.labelStyle, useHtmlLabels }) : label.node().appendChild((0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.c)(node.labelText, node.labelStyle, void 0, true)); - let bbox = text.getBBox(); - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.m)(siteConfig.flowchart.htmlLabels)) { - const div = text.children[0]; - const dv = (0,d3__WEBPACK_IMPORTED_MODULE_3__/* .select */ .Ltv)(text); - bbox = div.getBoundingClientRect(); - dv.attr("width", bbox.width); - dv.attr("height", bbox.height); - } - const padding = 0 * node.padding; - const halfPadding = padding / 2; - const width = node.width <= bbox.width + padding ? bbox.width + padding : node.width; - if (node.width <= bbox.width + padding) { - node.diff = (bbox.width - node.width) / 2 - node.padding / 2; - } else { - node.diff = -node.padding / 2; - } - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("Data ", node, JSON.stringify(node)); - rect2.attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("x", node.x - width / 2).attr("y", node.y - node.height / 2 - halfPadding).attr("width", width).attr("height", node.height + padding); - const { subGraphTitleTopMargin } = (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.g)(siteConfig); - if (useHtmlLabels) { - label.attr( - "transform", - // This puts the label on top of the box instead of inside it - `translate(${node.x - bbox.width / 2}, ${node.y - node.height / 2 + subGraphTitleTopMargin})` - ); - } else { - label.attr( - "transform", - // This puts the label on top of the box instead of inside it - `translate(${node.x}, ${node.y - node.height / 2 + subGraphTitleTopMargin})` - ); - } - const rectBox = rect2.node().getBBox(); - node.width = rectBox.width; - node.height = rectBox.height; - node.intersect = function(point) { - return (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.i)(node, point); - }; - return shapeSvg; -}; -const noteGroup = (parent, node) => { - const shapeSvg = parent.insert("g").attr("class", "note-cluster").attr("id", node.id); - const rect2 = shapeSvg.insert("rect", ":first-child"); - const padding = 0 * node.padding; - const halfPadding = padding / 2; - rect2.attr("rx", node.rx).attr("ry", node.ry).attr("x", node.x - node.width / 2 - halfPadding).attr("y", node.y - node.height / 2 - halfPadding).attr("width", node.width + padding).attr("height", node.height + padding).attr("fill", "none"); - const rectBox = rect2.node().getBBox(); - node.width = rectBox.width; - node.height = rectBox.height; - node.intersect = function(point) { - return (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.i)(node, point); - }; - return shapeSvg; -}; -const roundedWithTitle = (parent, node) => { - const siteConfig = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.c)(); - const shapeSvg = parent.insert("g").attr("class", node.classes).attr("id", node.id); - const rect2 = shapeSvg.insert("rect", ":first-child"); - const label = shapeSvg.insert("g").attr("class", "cluster-label"); - const innerRect = shapeSvg.append("rect"); - const text = label.node().appendChild((0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.c)(node.labelText, node.labelStyle, void 0, true)); - let bbox = text.getBBox(); - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.m)(siteConfig.flowchart.htmlLabels)) { - const div = text.children[0]; - const dv = (0,d3__WEBPACK_IMPORTED_MODULE_3__/* .select */ .Ltv)(text); - bbox = div.getBoundingClientRect(); - dv.attr("width", bbox.width); - dv.attr("height", bbox.height); - } - bbox = text.getBBox(); - const padding = 0 * node.padding; - const halfPadding = padding / 2; - const width = node.width <= bbox.width + node.padding ? bbox.width + node.padding : node.width; - if (node.width <= bbox.width + node.padding) { - node.diff = (bbox.width + node.padding * 0 - node.width) / 2; - } else { - node.diff = -node.padding / 2; - } - rect2.attr("class", "outer").attr("x", node.x - width / 2 - halfPadding).attr("y", node.y - node.height / 2 - halfPadding).attr("width", width + padding).attr("height", node.height + padding); - innerRect.attr("class", "inner").attr("x", node.x - width / 2 - halfPadding).attr("y", node.y - node.height / 2 - halfPadding + bbox.height - 1).attr("width", width + padding).attr("height", node.height + padding - bbox.height - 3); - const { subGraphTitleTopMargin } = (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.g)(siteConfig); - label.attr( - "transform", - `translate(${node.x - bbox.width / 2}, ${node.y - node.height / 2 - node.padding / 3 + ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.m)(siteConfig.flowchart.htmlLabels) ? 5 : 3) + subGraphTitleTopMargin})` - ); - const rectBox = rect2.node().getBBox(); - node.height = rectBox.height; - node.intersect = function(point) { - return (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.i)(node, point); - }; - return shapeSvg; -}; -const divider = (parent, node) => { - const shapeSvg = parent.insert("g").attr("class", node.classes).attr("id", node.id); - const rect2 = shapeSvg.insert("rect", ":first-child"); - const padding = 0 * node.padding; - const halfPadding = padding / 2; - rect2.attr("class", "divider").attr("x", node.x - node.width / 2 - halfPadding).attr("y", node.y - node.height / 2).attr("width", node.width + padding).attr("height", node.height + padding); - const rectBox = rect2.node().getBBox(); - node.width = rectBox.width; - node.height = rectBox.height; - node.diff = -node.padding / 2; - node.intersect = function(point) { - return (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.i)(node, point); - }; - return shapeSvg; -}; -const shapes = { rect, roundedWithTitle, noteGroup, divider }; -let clusterElems = {}; -const insertCluster = (elem, node) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("Inserting cluster"); - const shape = node.shape || "rect"; - clusterElems[node.id] = shapes[shape](elem, node); -}; -const clear = () => { - clusterElems = {}; -}; -const recursiveRender = async (_elem, graph, diagramType, id, parentCluster, siteConfig) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Graph in recursive render: XXX", dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .M(graph), parentCluster); - const dir = graph.graph().rankdir; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("Dir in recursive render - dir:", dir); - const elem = _elem.insert("g").attr("class", "root"); - if (!graph.nodes()) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("No nodes found for", graph); - } else { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Recursive render XXX", graph.nodes()); - } - if (graph.edges().length > 0) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("Recursive edges", graph.edge(graph.edges()[0])); - } - const clusters = elem.insert("g").attr("class", "clusters"); - const edgePaths = elem.insert("g").attr("class", "edgePaths"); - const edgeLabels = elem.insert("g").attr("class", "edgeLabels"); - const nodes = elem.insert("g").attr("class", "nodes"); - await Promise.all( - graph.nodes().map(async function(v) { - const node = graph.node(v); - if (parentCluster !== void 0) { - const data = JSON.parse(JSON.stringify(parentCluster.clusterData)); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Setting data for cluster XXX (", v, ") ", data, parentCluster); - graph.setNode(parentCluster.id, data); - if (!graph.parent(v)) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("Setting parent", v, parentCluster.id); - graph.setParent(v, parentCluster.id, data); - } - } - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("(Insert) Node XXX" + v + ": " + JSON.stringify(graph.node(v))); - if (node && node.clusterNode) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Cluster identified", v, node.width, graph.node(v)); - const o = await recursiveRender( - nodes, - node.graph, - diagramType, - id, - graph.node(v), - siteConfig - ); - const newEl = o.elem; - (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.u)(node, newEl); - node.diff = o.diff || 0; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Node bounds (abc123)", v, node, node.width, node.x, node.y); - (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.s)(newEl, node); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Recursive render complete ", newEl, node); - } else { - if (graph.children(v).length > 0) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Cluster - the non recursive path XXX", v, node.id, node, graph); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info(findNonClusterChild(node.id, graph)); - clusterDb[node.id] = { id: findNonClusterChild(node.id, graph), node }; - } else { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Node - the non recursive path", v, node.id, node); - await (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.e)(nodes, graph.node(v), dir); - } - } - }) - ); - graph.edges().forEach(function(e) { - const edge = graph.edge(e.v, e.w, e.name); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(e)); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Edge " + e.v + " -> " + e.w + ": ", e, " ", JSON.stringify(graph.edge(e))); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Fix", clusterDb, "ids:", e.v, e.w, "Translating: ", clusterDb[e.v], clusterDb[e.w]); - (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.f)(edgeLabels, edge); - }); - graph.edges().forEach(function(e) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(e)); - }); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("#############################################"); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("### Layout ###"); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("#############################################"); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info(graph); - (0,dagre_d3_es_src_dagre_index_js__WEBPACK_IMPORTED_MODULE_0__/* .layout */ .Zp)(graph); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Graph after layout:", dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .M(graph)); - let diff = 0; - const { subGraphTitleTotalMargin } = (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.g)(siteConfig); - sortNodesByHierarchy(graph).forEach(function(v) { - const node = graph.node(v); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Position " + v + ": " + JSON.stringify(graph.node(v))); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info( - "Position " + v + ": (" + node.x, - "," + node.y, - ") width: ", - node.width, - " height: ", - node.height - ); - if (node && node.clusterNode) { - node.y += subGraphTitleTotalMargin; - (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.p)(node); - } else { - if (graph.children(v).length > 0) { - node.height += subGraphTitleTotalMargin; - insertCluster(clusters, node); - clusterDb[node.id].node = node; - } else { - node.y += subGraphTitleTotalMargin / 2; - (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.p)(node); - } - } - }); - graph.edges().forEach(function(e) { - const edge = graph.edge(e); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(edge), edge); - edge.points.forEach((point) => point.y += subGraphTitleTotalMargin / 2); - const paths = (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.h)(edgePaths, e, edge, clusterDb, diagramType, graph, id); - (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.j)(edge, paths); - }); - graph.nodes().forEach(function(v) { - const n = graph.node(v); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.info(v, n.type, n.diff); - if (n.type === "group") { - diff = n.diff; - } - }); - return { elem, diff }; -}; -const render = async (elem, graph, markers, diagramType, id) => { - (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.a)(elem, markers, diagramType, id); - (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.b)(); - (0,_edges_e0da2a9e_js__WEBPACK_IMPORTED_MODULE_6__.d)(); - clear(); - clear$1(); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Graph at first:", JSON.stringify(dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .M(graph))); - adjustClustersAndEdges(graph); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Graph after:", JSON.stringify(dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .M(graph))); - const siteConfig = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.c)(); - await recursiveRender(elem, graph, diagramType, id, void 0, siteConfig); -}; - - - -/***/ }), - -/***/ 35900: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ a: () => (/* binding */ flowStyles), -/* harmony export */ f: () => (/* binding */ flowRendererV2) -/* harmony export */ }); -/* harmony import */ var dagre_d3_es_src_graphlib_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(697); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(26312); -/* harmony import */ var _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(86079); -/* harmony import */ var _index_3862675e_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(8995); -/* harmony import */ var dagre_d3_es_src_dagre_js_label_add_html_label_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(10646); -/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(75937); -/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(25582); - - - - - - -const conf = {}; -const setConf = function(cnf) { - const keys = Object.keys(cnf); - for (const key of keys) { - conf[key] = cnf[key]; - } -}; -const addVertices = async function(vert, g, svgId, root, doc, diagObj) { - const svg = root.select(`[id="${svgId}"]`); - const keys = Object.keys(vert); - for (const id of keys) { - const vertex = vert[id]; - let classStr = "default"; - if (vertex.classes.length > 0) { - classStr = vertex.classes.join(" "); - } - classStr = classStr + " flowchart-label"; - const styles = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_2__.k)(vertex.styles); - let vertexText = vertex.text !== void 0 ? vertex.text : vertex.id; - let vertexNode; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_2__.l.info("vertex", vertex, vertex.labelType); - if (vertex.labelType === "markdown") { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_2__.l.info("vertex", vertex, vertex.labelType); - } else { - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_2__.m)((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_2__.c)().flowchart.htmlLabels)) { - const node = { - label: vertexText - }; - vertexNode = (0,dagre_d3_es_src_dagre_js_label_add_html_label_js__WEBPACK_IMPORTED_MODULE_3__/* .addHtmlLabel */ .H)(svg, node).node(); - vertexNode.parentNode.removeChild(vertexNode); - } else { - const svgLabel = doc.createElementNS("http://www.w3.org/2000/svg", "text"); - svgLabel.setAttribute("style", styles.labelStyle.replace("color:", "fill:")); - const rows = vertexText.split(_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_2__.e.lineBreakRegex); - for (const row of rows) { - const tspan = doc.createElementNS("http://www.w3.org/2000/svg", "tspan"); - tspan.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"); - tspan.setAttribute("dy", "1em"); - tspan.setAttribute("x", "1"); - tspan.textContent = row; - svgLabel.appendChild(tspan); - } - vertexNode = svgLabel; - } - } - let radius = 0; - let _shape = ""; - switch (vertex.type) { - case "round": - radius = 5; - _shape = "rect"; - break; - case "square": - _shape = "rect"; - break; - case "diamond": - _shape = "question"; - break; - case "hexagon": - _shape = "hexagon"; - break; - case "odd": - _shape = "rect_left_inv_arrow"; - break; - case "lean_right": - _shape = "lean_right"; - break; - case "lean_left": - _shape = "lean_left"; - break; - case "trapezoid": - _shape = "trapezoid"; - break; - case "inv_trapezoid": - _shape = "inv_trapezoid"; - break; - case "odd_right": - _shape = "rect_left_inv_arrow"; - break; - case "circle": - _shape = "circle"; - break; - case "ellipse": - _shape = "ellipse"; - break; - case "stadium": - _shape = "stadium"; - break; - case "subroutine": - _shape = "subroutine"; - break; - case "cylinder": - _shape = "cylinder"; - break; - case "group": - _shape = "rect"; - break; - case "doublecircle": - _shape = "doublecircle"; - break; - default: - _shape = "rect"; - } - const labelText = await (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_2__.r)(vertexText, (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_2__.c)()); - g.setNode(vertex.id, { - labelStyle: styles.labelStyle, - shape: _shape, - labelText, - labelType: vertex.labelType, - rx: radius, - ry: radius, - class: classStr, - style: styles.style, - id: vertex.id, - link: vertex.link, - linkTarget: vertex.linkTarget, - tooltip: diagObj.db.getTooltip(vertex.id) || "", - domId: diagObj.db.lookUpDomId(vertex.id), - haveCallback: vertex.haveCallback, - width: vertex.type === "group" ? 500 : void 0, - dir: vertex.dir, - type: vertex.type, - props: vertex.props, - padding: (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_2__.c)().flowchart.padding - }); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_2__.l.info("setNode", { - labelStyle: styles.labelStyle, - labelType: vertex.labelType, - shape: _shape, - labelText, - rx: radius, - ry: radius, - class: classStr, - style: styles.style, - id: vertex.id, - domId: diagObj.db.lookUpDomId(vertex.id), - width: vertex.type === "group" ? 500 : void 0, - type: vertex.type, - dir: vertex.dir, - props: vertex.props, - padding: (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_2__.c)().flowchart.padding - }); - } -}; -const addEdges = async function(edges, g, diagObj) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_2__.l.info("abc78 edges = ", edges); - let cnt = 0; - let linkIdCnt = {}; - let defaultStyle; - let defaultLabelStyle; - if (edges.defaultStyle !== void 0) { - const defaultStyles = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_2__.k)(edges.defaultStyle); - defaultStyle = defaultStyles.style; - defaultLabelStyle = defaultStyles.labelStyle; - } - for (const edge of edges) { - cnt++; - const linkIdBase = "L-" + edge.start + "-" + edge.end; - if (linkIdCnt[linkIdBase] === void 0) { - linkIdCnt[linkIdBase] = 0; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_2__.l.info("abc78 new entry", linkIdBase, linkIdCnt[linkIdBase]); - } else { - linkIdCnt[linkIdBase]++; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_2__.l.info("abc78 new entry", linkIdBase, linkIdCnt[linkIdBase]); - } - let linkId = linkIdBase + "-" + linkIdCnt[linkIdBase]; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_2__.l.info("abc78 new link id to be used is", linkIdBase, linkId, linkIdCnt[linkIdBase]); - const linkNameStart = "LS-" + edge.start; - const linkNameEnd = "LE-" + edge.end; - const edgeData = { style: "", labelStyle: "" }; - edgeData.minlen = edge.length || 1; - if (edge.type === "arrow_open") { - edgeData.arrowhead = "none"; - } else { - edgeData.arrowhead = "normal"; - } - edgeData.arrowTypeStart = "arrow_open"; - edgeData.arrowTypeEnd = "arrow_open"; - switch (edge.type) { - case "double_arrow_cross": - edgeData.arrowTypeStart = "arrow_cross"; - case "arrow_cross": - edgeData.arrowTypeEnd = "arrow_cross"; - break; - case "double_arrow_point": - edgeData.arrowTypeStart = "arrow_point"; - case "arrow_point": - edgeData.arrowTypeEnd = "arrow_point"; - break; - case "double_arrow_circle": - edgeData.arrowTypeStart = "arrow_circle"; - case "arrow_circle": - edgeData.arrowTypeEnd = "arrow_circle"; - break; - } - let style = ""; - let labelStyle = ""; - switch (edge.stroke) { - case "normal": - style = "fill:none;"; - if (defaultStyle !== void 0) { - style = defaultStyle; - } - if (defaultLabelStyle !== void 0) { - labelStyle = defaultLabelStyle; - } - edgeData.thickness = "normal"; - edgeData.pattern = "solid"; - break; - case "dotted": - edgeData.thickness = "normal"; - edgeData.pattern = "dotted"; - edgeData.style = "fill:none;stroke-width:2px;stroke-dasharray:3;"; - break; - case "thick": - edgeData.thickness = "thick"; - edgeData.pattern = "solid"; - edgeData.style = "stroke-width: 3.5px;fill:none;"; - break; - case "invisible": - edgeData.thickness = "invisible"; - edgeData.pattern = "solid"; - edgeData.style = "stroke-width: 0;fill:none;"; - break; - } - if (edge.style !== void 0) { - const styles = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_2__.k)(edge.style); - style = styles.style; - labelStyle = styles.labelStyle; - } - edgeData.style = edgeData.style += style; - edgeData.labelStyle = edgeData.labelStyle += labelStyle; - if (edge.interpolate !== void 0) { - edgeData.curve = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_2__.n)(edge.interpolate, d3__WEBPACK_IMPORTED_MODULE_1__/* .curveLinear */ .lUB); - } else if (edges.defaultInterpolate !== void 0) { - edgeData.curve = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_2__.n)(edges.defaultInterpolate, d3__WEBPACK_IMPORTED_MODULE_1__/* .curveLinear */ .lUB); - } else { - edgeData.curve = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_2__.n)(conf.curve, d3__WEBPACK_IMPORTED_MODULE_1__/* .curveLinear */ .lUB); - } - if (edge.text === void 0) { - if (edge.style !== void 0) { - edgeData.arrowheadStyle = "fill: #333"; - } - } else { - edgeData.arrowheadStyle = "fill: #333"; - edgeData.labelpos = "c"; - } - edgeData.labelType = edge.labelType; - edgeData.label = await (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_2__.r)(edge.text.replace(_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_2__.e.lineBreakRegex, "\n"), (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_2__.c)()); - if (edge.style === void 0) { - edgeData.style = edgeData.style || "stroke: #333; stroke-width: 1.5px;fill:none;"; - } - edgeData.labelStyle = edgeData.labelStyle.replace("color:", "fill:"); - edgeData.id = linkId; - edgeData.classes = "flowchart-link " + linkNameStart + " " + linkNameEnd; - g.setEdge(edge.start, edge.end, edgeData, cnt); - } -}; -const getClasses = function(text, diagObj) { - return diagObj.db.getClasses(); -}; -const draw = async function(text, id, _version, diagObj) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_2__.l.info("Drawing flowchart"); - let dir = diagObj.db.getDirection(); - if (dir === void 0) { - dir = "TD"; - } - const { securityLevel, flowchart: conf2 } = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_2__.c)(); - const nodeSpacing = conf2.nodeSpacing || 50; - const rankSpacing = conf2.rankSpacing || 50; - let sandboxElement; - if (securityLevel === "sandbox") { - sandboxElement = (0,d3__WEBPACK_IMPORTED_MODULE_1__/* .select */ .Ltv)("#i" + id); - } - const root = securityLevel === "sandbox" ? (0,d3__WEBPACK_IMPORTED_MODULE_1__/* .select */ .Ltv)(sandboxElement.nodes()[0].contentDocument.body) : (0,d3__WEBPACK_IMPORTED_MODULE_1__/* .select */ .Ltv)("body"); - const doc = securityLevel === "sandbox" ? sandboxElement.nodes()[0].contentDocument : document; - const g = new dagre_d3_es_src_graphlib_index_js__WEBPACK_IMPORTED_MODULE_0__/* .Graph */ .T({ - multigraph: true, - compound: true - }).setGraph({ - rankdir: dir, - nodesep: nodeSpacing, - ranksep: rankSpacing, - marginx: 0, - marginy: 0 - }).setDefaultEdgeLabel(function() { - return {}; - }); - let subG; - const subGraphs = diagObj.db.getSubGraphs(); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_2__.l.info("Subgraphs - ", subGraphs); - for (let i2 = subGraphs.length - 1; i2 >= 0; i2--) { - subG = subGraphs[i2]; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_2__.l.info("Subgraph - ", subG); - diagObj.db.addVertex( - subG.id, - { text: subG.title, type: subG.labelType }, - "group", - void 0, - subG.classes, - subG.dir - ); - } - const vert = diagObj.db.getVertices(); - const edges = diagObj.db.getEdges(); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_2__.l.info("Edges", edges); - let i = 0; - for (i = subGraphs.length - 1; i >= 0; i--) { - subG = subGraphs[i]; - (0,d3__WEBPACK_IMPORTED_MODULE_1__/* .selectAll */ .Ubm)("cluster").append("text"); - for (let j = 0; j < subG.nodes.length; j++) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_2__.l.info("Setting up subgraphs", subG.nodes[j], subG.id); - g.setParent(subG.nodes[j], subG.id); - } - } - await addVertices(vert, g, id, root, doc, diagObj); - await addEdges(edges, g); - const svg = root.select(`[id="${id}"]`); - const element = root.select("#" + id + " g"); - await (0,_index_3862675e_js__WEBPACK_IMPORTED_MODULE_4__.r)(element, g, ["point", "circle", "cross"], "flowchart", id); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_2__.u.insertTitle(svg, "flowchartTitleText", conf2.titleTopMargin, diagObj.db.getDiagramTitle()); - (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_2__.o)(g, svg, conf2.diagramPadding, conf2.useMaxWidth); - diagObj.db.indexNodes("subGraph" + i); - if (!conf2.htmlLabels) { - const labels = doc.querySelectorAll('[id="' + id + '"] .edgeLabel .label'); - for (const label of labels) { - const dim = label.getBBox(); - const rect = doc.createElementNS("http://www.w3.org/2000/svg", "rect"); - rect.setAttribute("rx", 0); - rect.setAttribute("ry", 0); - rect.setAttribute("width", dim.width); - rect.setAttribute("height", dim.height); - label.insertBefore(rect, label.firstChild); - } - } - const keys = Object.keys(vert); - keys.forEach(function(key) { - const vertex = vert[key]; - if (vertex.link) { - const node = (0,d3__WEBPACK_IMPORTED_MODULE_1__/* .select */ .Ltv)("#" + id + ' [id="' + key + '"]'); - if (node) { - const link = doc.createElementNS("http://www.w3.org/2000/svg", "a"); - link.setAttributeNS("http://www.w3.org/2000/svg", "class", vertex.classes.join(" ")); - link.setAttributeNS("http://www.w3.org/2000/svg", "href", vertex.link); - link.setAttributeNS("http://www.w3.org/2000/svg", "rel", "noopener"); - if (securityLevel === "sandbox") { - link.setAttributeNS("http://www.w3.org/2000/svg", "target", "_top"); - } else if (vertex.linkTarget) { - link.setAttributeNS("http://www.w3.org/2000/svg", "target", vertex.linkTarget); - } - const linkNode = node.insert(function() { - return link; - }, ":first-child"); - const shape = node.select(".label-container"); - if (shape) { - linkNode.append(function() { - return shape.node(); - }); - } - const label = node.select(".label"); - if (label) { - linkNode.append(function() { - return label.node(); - }); - } - } - } - }); -}; -const flowRendererV2 = { - setConf, - addVertices, - addEdges, - getClasses, - draw -}; -const fade = (color, opacity) => { - const channel = khroma__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A; - const r = channel(color, "r"); - const g = channel(color, "g"); - const b = channel(color, "b"); - return khroma__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .A(r, g, b, opacity); -}; -const getStyles = (options) => `.label { - font-family: ${options.fontFamily}; - color: ${options.nodeTextColor || options.textColor}; - } - .cluster-label text { - fill: ${options.titleColor}; - } - .cluster-label span,p { - color: ${options.titleColor}; - } - - .label text,span,p { - fill: ${options.nodeTextColor || options.textColor}; - color: ${options.nodeTextColor || options.textColor}; - } - - .node rect, - .node circle, - .node ellipse, - .node polygon, - .node path { - fill: ${options.mainBkg}; - stroke: ${options.nodeBorder}; - stroke-width: 1px; - } - .flowchart-label text { - text-anchor: middle; - } - // .flowchart-label .text-outer-tspan { - // text-anchor: middle; - // } - // .flowchart-label .text-inner-tspan { - // text-anchor: start; - // } - - .node .katex path { - fill: #000; - stroke: #000; - stroke-width: 1px; - } - - .node .label { - text-align: center; - } - .node.clickable { - cursor: pointer; - } - - .arrowheadPath { - fill: ${options.arrowheadColor}; - } - - .edgePath .path { - stroke: ${options.lineColor}; - stroke-width: 2.0px; - } - - .flowchart-link { - stroke: ${options.lineColor}; - fill: none; - } - - .edgeLabel { - background-color: ${options.edgeLabelBackground}; - rect { - opacity: 0.5; - background-color: ${options.edgeLabelBackground}; - fill: ${options.edgeLabelBackground}; - } - text-align: center; - } - - /* For html labels only */ - .labelBkg { - background-color: ${fade(options.edgeLabelBackground, 0.5)}; - // background-color: - } - - .cluster rect { - fill: ${options.clusterBkg}; - stroke: ${options.clusterBorder}; - stroke-width: 1px; - } - - .cluster text { - fill: ${options.titleColor}; - } - - .cluster span,p { - color: ${options.titleColor}; - } - /* .cluster div { - color: ${options.titleColor}; - } */ - - div.mermaidTooltip { - position: absolute; - text-align: center; - max-width: 200px; - padding: 2px; - font-family: ${options.fontFamily}; - font-size: 12px; - background: ${options.tertiaryColor}; - border: 1px solid ${options.border2}; - border-radius: 2px; - pointer-events: none; - z-index: 100; - } - - .flowchartTitleText { - text-anchor: middle; - font-size: 18px; - fill: ${options.textColor}; - } -`; -const flowStyles = getStyles; - - - -/***/ }) - -}; -; \ No newline at end of file diff --git a/assets/js/694672cd.0afcb662.js b/assets/js/694672cd.0afcb662.js new file mode 100644 index 000000000000..27a855dd70ee --- /dev/null +++ b/assets/js/694672cd.0afcb662.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1004],{29488:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>u,contentTitle:()=>c,default:()=>p,frontMatter:()=>l,metadata:()=>r,toc:()=>d});const r=JSON.parse('{"id":"learn/learn-guides-staking","title":"Polkadot-JS Guides about Staking","description":"Polkadot-JS Guides about Staking.","source":"@site/../docs/learn/learn-guides-staking.md","sourceDirName":"learn","slug":"/learn-guides-staking","permalink":"/docs/learn-guides-staking","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-staking.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1729847256000,"frontMatter":{"id":"learn-guides-staking","title":"Polkadot-JS Guides about Staking","sidebar_label":"Staking Guides","description":"Polkadot-JS Guides about Staking.","keyword":["nominate","stake","staking","claim","rewards","polkadot-js","pools"],"slug":"../learn-guides-staking"},"sidebar":"docs","previous":{"title":"Transfer Guides","permalink":"/docs/learn-guides-transfers"},"next":{"title":"Nominator Guides","permalink":"/docs/learn-guides-nominator"}}');var s=n(74848),a=n(28453),o=n(67141),i=n(3514);const l={id:"learn-guides-staking",title:"Polkadot-JS Guides about Staking",sidebar_label:"Staking Guides",description:"Polkadot-JS Guides about Staking.",keyword:["nominate","stake","staking","claim","rewards","polkadot-js","pools"],slug:"../learn-guides-staking"},c=void 0,u={},d=[];function m(e){return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(o.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the Polkadot-JS UI, you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,s.jsx)(i.A,{})]})}function p(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(m,{...e})}):m()}},67141:(e,t,n)=>{n.d(t,{A:()=>a});var r=n(96540),s=n(74848);const a=function(e){var t,n=e.message,a=(0,r.useState)(!0),o=a[0],i=a[1];return(0,s.jsx)(s.Fragment,{children:o&&(0,s.jsxs)("div",{className:"message-box",children:[(0,s.jsx)("button",{className:"close-button",onClick:function(){i(!1)},children:"\u2716 "}),(0,s.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(t=n,t.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},3514:(e,t,n)=>{n.d(t,{A:()=>x});n(96540);var r=n(34164),s=n(26972),a=n(28774),o=n(53465),i=n(16654),l=n(21312),c=n(51107);const u={cardContainer:"cardContainer_fWXF",cardTitle:"cardTitle_rnsV",cardDescription:"cardDescription_PWke"};var d=n(74848);function m(e){var t=e.href,n=e.children;return(0,d.jsx)(a.A,{href:t,className:(0,r.A)("card padding--lg",u.cardContainer),children:n})}function p(e){var t=e.href,n=e.icon,s=e.title,a=e.description;return(0,d.jsxs)(m,{href:t,children:[(0,d.jsxs)(c.A,{as:"h2",className:(0,r.A)("text--truncate",u.cardTitle),title:s,children:[n," ",s]}),a&&(0,d.jsx)("p",{className:(0,r.A)("text--truncate",u.cardDescription),title:a,children:a})]})}function g(e){var t,n,r=e.item,a=(0,s.Nr)(r),i=(n=(0,o.W)().selectMessage,function(e){return n(e,(0,l.T)({message:"1 item|{count} items",id:"theme.docs.DocCard.categoryDescription.plurals",description:"The default description for a category card in the generated index about how many items this category includes"},{count:e}))});return a?(0,d.jsx)(p,{href:a,icon:"\ud83d\uddc3\ufe0f",title:r.label,description:null!=(t=r.description)?t:i(r.items.length)}):null}function f(e){var t,n,r=e.item,a=(0,i.A)(r.href)?"\ud83d\udcc4\ufe0f":"\ud83d\udd17",o=(0,s.cC)(null!=(t=r.docId)?t:void 0);return(0,d.jsx)(p,{href:r.href,icon:a,title:r.label,description:null!=(n=r.description)?n:null==o?void 0:o.description})}function h(e){var t=e.item;switch(t.type){case"link":return(0,d.jsx)(f,{item:t});case"category":return(0,d.jsx)(g,{item:t});default:throw new Error("unknown item type "+JSON.stringify(t))}}function k(e){var t=e.className,n=(0,s.$S)();return(0,d.jsx)(x,{items:n.items,className:t})}function x(e){var t=e.items,n=e.className;if(!t)return(0,d.jsx)(k,Object.assign({},e));var a=(0,s.d1)(t);return(0,d.jsx)("section",{className:(0,r.A)("row",n),children:a.map((function(e,t){return(0,d.jsx)("article",{className:"col col--6 margin-bottom--lg",children:(0,d.jsx)(h,{item:e})},t)}))})}},53465:(e,t,n)=>{n.d(t,{W:()=>c});var r=n(96540),s=n(44586),a=["zero","one","two","few","many","other"];function o(e){return a.filter((function(t){return e.includes(t)}))}var i={locale:"en",pluralForms:o(["one","other"]),select:function(e){return 1===e?"one":"other"}};function l(){var e=(0,s.A)().i18n.currentLocale;return(0,r.useMemo)((function(){try{return t=e,n=new Intl.PluralRules(t),{locale:t,pluralForms:o(n.resolvedOptions().pluralCategories),select:function(e){return n.select(e)}}}catch(r){return console.error('Failed to use Intl.PluralRules for locale "'+e+'".\nDocusaurus will fallback to the default (English) implementation.\nError: '+r.message+"\n"),i}var t,n}),[e])}function c(){var e=l();return{selectMessage:function(t,n){return function(e,t,n){var r=e.split("|");if(1===r.length)return r[0];r.length>n.pluralForms.length&&console.error("For locale="+n.locale+", a maximum of "+n.pluralForms.length+" plural forms are expected ("+n.pluralForms.join(",")+"), but the message contains "+r.length+": "+e);var s=n.select(t),a=n.pluralForms.indexOf(s);return r[Math.min(a,r.length-1)]}(n,t,e)}}}},28453:(e,t,n)=>{n.d(t,{R:()=>o,x:()=>i});var r=n(96540);const s={},a=r.createContext(s);function o(e){const t=r.useContext(a);return r.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:o(e.components),r.createElement(a.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/694672cd.b233c3e5.js b/assets/js/694672cd.b233c3e5.js deleted file mode 100644 index 7b8230e0a717..000000000000 --- a/assets/js/694672cd.b233c3e5.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1004],{59458:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>u,contentTitle:()=>l,default:()=>p,frontMatter:()=>i,metadata:()=>c,toc:()=>d});var r=n(74848),s=n(28453),a=n(67141),o=n(3514);const i={id:"learn-guides-staking",title:"Polkadot-JS Guides about Staking",sidebar_label:"Staking Guides",description:"Polkadot-JS Guides about Staking.",keyword:["nominate","stake","staking","claim","rewards","polkadot-js","pools"],slug:"../learn-guides-staking"},l=void 0,c={id:"learn/learn-guides-staking",title:"Polkadot-JS Guides about Staking",description:"Polkadot-JS Guides about Staking.",source:"@site/../docs/learn/learn-guides-staking.md",sourceDirName:"learn",slug:"/learn-guides-staking",permalink:"/docs/learn-guides-staking",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-staking.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1729847256e3,frontMatter:{id:"learn-guides-staking",title:"Polkadot-JS Guides about Staking",sidebar_label:"Staking Guides",description:"Polkadot-JS Guides about Staking.",keyword:["nominate","stake","staking","claim","rewards","polkadot-js","pools"],slug:"../learn-guides-staking"},sidebar:"docs",previous:{title:"Transfer Guides",permalink:"/docs/learn-guides-transfers"},next:{title:"Nominator Guides",permalink:"/docs/learn-guides-nominator"}},u={},d=[];function m(e){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(a.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the Polkadot-JS UI, you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,r.jsx)(o.A,{})]})}function p(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(m,{...e})}):m()}},67141:(e,t,n)=>{n.d(t,{A:()=>a});var r=n(96540),s=n(74848);const a=function(e){var t,n=e.message,a=(0,r.useState)(!0),o=a[0],i=a[1];return(0,s.jsx)(s.Fragment,{children:o&&(0,s.jsxs)("div",{className:"message-box",children:[(0,s.jsx)("button",{className:"close-button",onClick:function(){i(!1)},children:"\u2716 "}),(0,s.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(t=n,t.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},3514:(e,t,n)=>{n.d(t,{A:()=>x});n(96540);var r=n(34164),s=n(26972),a=n(28774),o=n(53465),i=n(16654),l=n(21312),c=n(51107);const u={cardContainer:"cardContainer_fWXF",cardTitle:"cardTitle_rnsV",cardDescription:"cardDescription_PWke"};var d=n(74848);function m(e){var t=e.href,n=e.children;return(0,d.jsx)(a.A,{href:t,className:(0,r.A)("card padding--lg",u.cardContainer),children:n})}function p(e){var t=e.href,n=e.icon,s=e.title,a=e.description;return(0,d.jsxs)(m,{href:t,children:[(0,d.jsxs)(c.A,{as:"h2",className:(0,r.A)("text--truncate",u.cardTitle),title:s,children:[n," ",s]}),a&&(0,d.jsx)("p",{className:(0,r.A)("text--truncate",u.cardDescription),title:a,children:a})]})}function g(e){var t,n,r=e.item,a=(0,s.Nr)(r),i=(n=(0,o.W)().selectMessage,function(e){return n(e,(0,l.T)({message:"1 item|{count} items",id:"theme.docs.DocCard.categoryDescription.plurals",description:"The default description for a category card in the generated index about how many items this category includes"},{count:e}))});return a?(0,d.jsx)(p,{href:a,icon:"\ud83d\uddc3\ufe0f",title:r.label,description:null!=(t=r.description)?t:i(r.items.length)}):null}function f(e){var t,n,r=e.item,a=(0,i.A)(r.href)?"\ud83d\udcc4\ufe0f":"\ud83d\udd17",o=(0,s.cC)(null!=(t=r.docId)?t:void 0);return(0,d.jsx)(p,{href:r.href,icon:a,title:r.label,description:null!=(n=r.description)?n:null==o?void 0:o.description})}function h(e){var t=e.item;switch(t.type){case"link":return(0,d.jsx)(f,{item:t});case"category":return(0,d.jsx)(g,{item:t});default:throw new Error("unknown item type "+JSON.stringify(t))}}function k(e){var t=e.className,n=(0,s.$S)();return(0,d.jsx)(x,{items:n.items,className:t})}function x(e){var t=e.items,n=e.className;if(!t)return(0,d.jsx)(k,Object.assign({},e));var a=(0,s.d1)(t);return(0,d.jsx)("section",{className:(0,r.A)("row",n),children:a.map((function(e,t){return(0,d.jsx)("article",{className:"col col--6 margin-bottom--lg",children:(0,d.jsx)(h,{item:e})},t)}))})}},53465:(e,t,n)=>{n.d(t,{W:()=>c});var r=n(96540),s=n(44586),a=["zero","one","two","few","many","other"];function o(e){return a.filter((function(t){return e.includes(t)}))}var i={locale:"en",pluralForms:o(["one","other"]),select:function(e){return 1===e?"one":"other"}};function l(){var e=(0,s.A)().i18n.currentLocale;return(0,r.useMemo)((function(){try{return t=e,n=new Intl.PluralRules(t),{locale:t,pluralForms:o(n.resolvedOptions().pluralCategories),select:function(e){return n.select(e)}}}catch(r){return console.error('Failed to use Intl.PluralRules for locale "'+e+'".\nDocusaurus will fallback to the default (English) implementation.\nError: '+r.message+"\n"),i}var t,n}),[e])}function c(){var e=l();return{selectMessage:function(t,n){return function(e,t,n){var r=e.split("|");if(1===r.length)return r[0];r.length>n.pluralForms.length&&console.error("For locale="+n.locale+", a maximum of "+n.pluralForms.length+" plural forms are expected ("+n.pluralForms.join(",")+"), but the message contains "+r.length+": "+e);var s=n.select(t),a=n.pluralForms.indexOf(s);return r[Math.min(a,r.length-1)]}(n,t,e)}}}},28453:(e,t,n)=>{n.d(t,{R:()=>o,x:()=>i});var r=n(96540);const s={},a=r.createContext(s);function o(e){const t=r.useContext(a);return r.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:o(e.components),r.createElement(a.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/69b97ecd.4e0131ef.js b/assets/js/69b97ecd.4e0131ef.js new file mode 100644 index 000000000000..9c9d0870cfe9 --- /dev/null +++ b/assets/js/69b97ecd.4e0131ef.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[866],{75429:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>r,default:()=>c,frontMatter:()=>s,metadata:()=>o,toc:()=>d});const o=JSON.parse('{"id":"learn/learn-implementations","title":"Polkadot Implementations","description":"Learn about the different Polkadot implementations.","source":"@site/../docs/learn/learn-implementations.md","sourceDirName":"learn","slug":"/learn-implementations","permalink":"/docs/learn-implementations","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-implementations.md","tags":[],"version":"current","lastUpdatedBy":"Snoppy","lastUpdatedAt":1712558907000,"frontMatter":{"id":"learn-implementations","title":"Polkadot Implementations","sidebar_label":"Polkadot Implementations","description":"Learn about the different Polkadot implementations.","keywords":["implementations","wasm","meta protocol"],"slug":"../learn-implementations"}}');var a=n(74848),i=n(28453);const s={id:"learn-implementations",title:"Polkadot Implementations",sidebar_label:"Polkadot Implementations",description:"Learn about the different Polkadot implementations.",keywords:["implementations","wasm","meta protocol"],slug:"../learn-implementations"},r=void 0,l={},d=[{value:"A Wasm-based Meta Protocol",id:"a-wasm-based-meta-protocol",level:2},{value:"Parity Technologies: A Rustic Vision for Polkadot",id:"parity-technologies-a-rustic-vision-for-polkadot",level:3},{value:"Alternative Implementations",id:"alternative-implementations",level:2},{value:"ChainSafe Systems: Gossamer",id:"chainsafe-systems-gossamer",level:3},{value:"SORAMITSU: Kagome",id:"soramitsu-kagome",level:3},{value:"Polkadot-JS Project: Polkadot-JS",id:"polkadot-js-project-polkadot-js",level:3},{value:"Other implementations that have received grants",id:"other-implementations-that-have-received-grants",level:3}];function h(e){const t={a:"a",blockquote:"blockquote",em:"em",h2:"h2",h3:"h3",li:"li",p:"p",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(t.p,{children:["Polkadot is the flagship protocol of the ",(0,a.jsx)(t.a,{href:"https://web3.foundation/",children:"Web3 Foundation"}),", and while\nPolkadot can be defined as a protocol, a network, or, a type of infrastructure, it best serves to be\nan ecosystem. For true decentralization, there should be multiple implementations of Polkadot. Even\nbeing a ",(0,a.jsx)(t.em,{children:"layer 0"})," protocol that attempts to build an interconnected, interoperable and secure Web3\necosystem, Polkadot is a complex piece of software, and its formal implementation depends on being\nbuilt on top of a tech stack."]}),"\n",(0,a.jsxs)(t.blockquote,{children:["\n",(0,a.jsxs)(t.p,{children:["This page will focus on implementations of ",(0,a.jsx)(t.strong,{children:"Polkadot's underlying infrastructure"})," (i.e. runtime,\nhost)."]}),"\n"]}),"\n",(0,a.jsx)(t.h2,{id:"a-wasm-based-meta-protocol",children:"A Wasm-based Meta Protocol"}),"\n",(0,a.jsxs)(t.p,{children:["Polkadot uses WebAssembly (",(0,a.jsx)(t.a,{href:"/docs/learn-wasm",children:"Wasm"}),') as a "meta-protocol". This allows for the use of\nany programming language that can be interpreted or compiled into Wasm - being the driver for\nPolkadot\'s multiple implementations.']}),"\n",(0,a.jsxs)(t.h3,{id:"parity-technologies-a-rustic-vision-for-polkadot",children:["Parity Technologies: A ",(0,a.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/polkadot",children:"Rustic Vision for Polkadot"})]}),"\n",(0,a.jsxs)(t.p,{children:[(0,a.jsx)(t.a,{href:"https://www.parity.io/",children:"Parity Technologies"})," is often in the spotlight for its core development of\nPolkadot, and while this is true, Parity Polkadot also serves to be the\n",(0,a.jsx)(t.a,{href:"https://www.rust-lang.org/",children:"Rust"})," client. Parity Tech has a rustic vision for Polkadot through the\nuse of their main product, ",(0,a.jsx)(t.a,{href:"https://www.substrate.io/",children:"Substrate"}),". Substrate can also be used for\ndifferent chains and different networks, but in the case of Polkadot, Substrate acts as the tech\nstack that is used to implement Polkadot's sharded heterogeneous multi-chain model."]}),"\n",(0,a.jsxs)(t.blockquote,{children:["\n",(0,a.jsx)(t.p,{children:"Parity Tech focuses on blockchain infrastructure for the decentralised web, where they initially\noffered an Ethereum client (Parity Ethereum). Parity Tech was hired by the Web3 Foundation to\nfoster the development of the first implementation of Polkadot."}),"\n"]}),"\n",(0,a.jsx)(t.p,{children:"Polkadot can support parachains that are not built on Substrate, In particular, as long as the state\ntransition function (STF) of a shard is abstracted into Wasm, the validators on the network can\nexecute the STF within a Wasm environment."}),"\n",(0,a.jsxs)(t.blockquote,{children:["\n",(0,a.jsxs)(t.p,{children:["Note: chains can also be built on Substrate and are not required to be deployed onto Polkadot.\nMore on Polkadot's architecture is available on the ",(0,a.jsx)(t.a,{href:"/docs/learn-architecture",children:"Architecture"})," page."]}),"\n"]}),"\n",(0,a.jsxs)(t.p,{children:["With this in mind, we can point to some other implementations of Polkadot. Having different\nimplementations inherently promotes the decentralization of the technology and progresses it in a\nmeaningful way. Other implementations of Polkadot that exist, many of whom have received a\n",(0,a.jsx)(t.a,{href:"/docs/grants",children:"grant"})," from the Web3 Foundation, are in programming languages like Go, C++,\nand JavaScript, which are all languages that can be compiled in Wasm."]}),"\n",(0,a.jsx)(t.p,{children:"As stated in the Soramitsu grant announcement:"}),"\n",(0,a.jsx)(t.p,{children:"It is critically important to have multiple implementations of the Polkadot protocol for a number\nof reasons, including decentralization, knowledge dispersion, and better definitions of the\nprotocol... Multiple implementations of Polkadot improves network resilience and adds to the\ndecentralization of the network. The governance of the network is more democratized when multiple\nteams build clients that run the nodes in the network."}),"\n",(0,a.jsx)(t.h2,{id:"alternative-implementations",children:"Alternative Implementations"}),"\n",(0,a.jsxs)(t.h3,{id:"chainsafe-systems-gossamer",children:["ChainSafe Systems: ",(0,a.jsx)(t.a,{href:"https://github.com/ChainSafe/gossamer#a-go-implementation-of-the-polkadot-host",children:"Gossamer"})]}),"\n",(0,a.jsxs)(t.p,{children:[(0,a.jsx)(t.strong,{children:"Gossamer"})," is a Go implementation being built by\n",(0,a.jsx)(t.a,{href:"https://github.com/ChainSafeSystems",children:"ChainSafe Systems"}),", a blockchain R&D firm based in Toronto,\nCanada that is also building an Eth2.0 Serenity client. They were awarded a grant from the Web3\nFoundation."]}),"\n",(0,a.jsxs)(t.h3,{id:"soramitsu-kagome",children:["SORAMITSU: ",(0,a.jsx)(t.a,{href:"https://github.com/soramitsu/kagome#intro",children:"Kagome"})]}),"\n",(0,a.jsxs)(t.p,{children:[(0,a.jsx)(t.strong,{children:"Kagome"})," is a C++ implementation of the Polkadot Host being built by\n",(0,a.jsx)(t.a,{href:"https://soramitsu.co.jp/",children:"Soramitsu"}),", a Japanese digital identity company that previously developed\n",(0,a.jsx)(t.a,{href:"https://iroha.tech",children:"Hyperledger Iroha"}),". They were awarded a grant from the Web3 Foundation and\nreleased the first version of Kagome in April 2020. As part of the process, they also released a\n",(0,a.jsx)(t.a,{href:"https://github.com/soramitsu/libp2p-grpc",children:"libp2p"})," networking layer in C++."]}),"\n",(0,a.jsxs)(t.h3,{id:"polkadot-js-project-polkadot-js",children:["Polkadot-JS Project: ",(0,a.jsx)(t.a,{href:"https://github.com/polkadot-js",children:"Polkadot-JS"})]}),"\n",(0,a.jsxs)(t.p,{children:[(0,a.jsx)(t.strong,{children:"Polkadot-JS"})," is a ",(0,a.jsx)(t.a,{href:"https://github.com/polkadot-js/client",children:"JavaScript client"})," and offers a\ncollection of tools, interfaces, and libraries for Polkadot and Substrate."]}),"\n",(0,a.jsx)(t.h3,{id:"other-implementations-that-have-received-grants",children:"Other implementations that have received grants"}),"\n",(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsx)(t.li,{children:(0,a.jsx)(t.a,{href:"https://github.com/opennetsys/golkadot",children:"Golkadot"})}),"\n",(0,a.jsx)(t.li,{children:(0,a.jsx)(t.a,{href:"https://github.com/polkadot-java",children:"Polkadot in Java"})}),"\n"]}),"\n",(0,a.jsxs)(t.p,{children:["While the ecosystem continues to grow rapidly, the continued development of alternative\nimplementations will only make Polkadot stronger. Consider becoming a contributor to the ecosystem,\nand learn about the how you can receive a ",(0,a.jsx)(t.a,{href:"/docs/grants",children:"grant"})," for your development."]})]})}function c(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,a.jsx)(t,{...e,children:(0,a.jsx)(h,{...e})}):h(e)}},28453:(e,t,n)=>{n.d(t,{R:()=>s,x:()=>r});var o=n(96540);const a={},i=o.createContext(a);function s(e){const t=o.useContext(i);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:s(e.components),o.createElement(i.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/69b97ecd.bf2aef0f.js b/assets/js/69b97ecd.bf2aef0f.js deleted file mode 100644 index 3f874da04804..000000000000 --- a/assets/js/69b97ecd.bf2aef0f.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[866],{21324:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>s,default:()=>c,frontMatter:()=>i,metadata:()=>r,toc:()=>d});var o=n(74848),a=n(28453);const i={id:"learn-implementations",title:"Polkadot Implementations",sidebar_label:"Polkadot Implementations",description:"Learn about the different Polkadot implementations.",keywords:["implementations","wasm","meta protocol"],slug:"../learn-implementations"},s=void 0,r={id:"learn/learn-implementations",title:"Polkadot Implementations",description:"Learn about the different Polkadot implementations.",source:"@site/../docs/learn/learn-implementations.md",sourceDirName:"learn",slug:"/learn-implementations",permalink:"/docs/learn-implementations",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-implementations.md",tags:[],version:"current",lastUpdatedBy:"Snoppy",lastUpdatedAt:1712558907e3,frontMatter:{id:"learn-implementations",title:"Polkadot Implementations",sidebar_label:"Polkadot Implementations",description:"Learn about the different Polkadot implementations.",keywords:["implementations","wasm","meta protocol"],slug:"../learn-implementations"}},l={},d=[{value:"A Wasm-based Meta Protocol",id:"a-wasm-based-meta-protocol",level:2},{value:"Parity Technologies: A Rustic Vision for Polkadot",id:"parity-technologies-a-rustic-vision-for-polkadot",level:3},{value:"Alternative Implementations",id:"alternative-implementations",level:2},{value:"ChainSafe Systems: Gossamer",id:"chainsafe-systems-gossamer",level:3},{value:"SORAMITSU: Kagome",id:"soramitsu-kagome",level:3},{value:"Polkadot-JS Project: Polkadot-JS",id:"polkadot-js-project-polkadot-js",level:3},{value:"Other implementations that have received grants",id:"other-implementations-that-have-received-grants",level:3}];function h(e){const t={a:"a",blockquote:"blockquote",em:"em",h2:"h2",h3:"h3",li:"li",p:"p",strong:"strong",ul:"ul",...(0,a.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(t.p,{children:["Polkadot is the flagship protocol of the ",(0,o.jsx)(t.a,{href:"https://web3.foundation/",children:"Web3 Foundation"}),", and while\nPolkadot can be defined as a protocol, a network, or, a type of infrastructure, it best serves to be\nan ecosystem. For true decentralization, there should be multiple implementations of Polkadot. Even\nbeing a ",(0,o.jsx)(t.em,{children:"layer 0"})," protocol that attempts to build an interconnected, interoperable and secure Web3\necosystem, Polkadot is a complex piece of software, and its formal implementation depends on being\nbuilt on top of a tech stack."]}),"\n",(0,o.jsxs)(t.blockquote,{children:["\n",(0,o.jsxs)(t.p,{children:["This page will focus on implementations of ",(0,o.jsx)(t.strong,{children:"Polkadot's underlying infrastructure"})," (i.e. runtime,\nhost)."]}),"\n"]}),"\n",(0,o.jsx)(t.h2,{id:"a-wasm-based-meta-protocol",children:"A Wasm-based Meta Protocol"}),"\n",(0,o.jsxs)(t.p,{children:["Polkadot uses WebAssembly (",(0,o.jsx)(t.a,{href:"/docs/learn-wasm",children:"Wasm"}),') as a "meta-protocol". This allows for the use of\nany programming language that can be interpreted or compiled into Wasm - being the driver for\nPolkadot\'s multiple implementations.']}),"\n",(0,o.jsxs)(t.h3,{id:"parity-technologies-a-rustic-vision-for-polkadot",children:["Parity Technologies: A ",(0,o.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/polkadot",children:"Rustic Vision for Polkadot"})]}),"\n",(0,o.jsxs)(t.p,{children:[(0,o.jsx)(t.a,{href:"https://www.parity.io/",children:"Parity Technologies"})," is often in the spotlight for its core development of\nPolkadot, and while this is true, Parity Polkadot also serves to be the\n",(0,o.jsx)(t.a,{href:"https://www.rust-lang.org/",children:"Rust"})," client. Parity Tech has a rustic vision for Polkadot through the\nuse of their main product, ",(0,o.jsx)(t.a,{href:"https://www.substrate.io/",children:"Substrate"}),". Substrate can also be used for\ndifferent chains and different networks, but in the case of Polkadot, Substrate acts as the tech\nstack that is used to implement Polkadot's sharded heterogeneous multi-chain model."]}),"\n",(0,o.jsxs)(t.blockquote,{children:["\n",(0,o.jsx)(t.p,{children:"Parity Tech focuses on blockchain infrastructure for the decentralised web, where they initially\noffered an Ethereum client (Parity Ethereum). Parity Tech was hired by the Web3 Foundation to\nfoster the development of the first implementation of Polkadot."}),"\n"]}),"\n",(0,o.jsx)(t.p,{children:"Polkadot can support parachains that are not built on Substrate, In particular, as long as the state\ntransition function (STF) of a shard is abstracted into Wasm, the validators on the network can\nexecute the STF within a Wasm environment."}),"\n",(0,o.jsxs)(t.blockquote,{children:["\n",(0,o.jsxs)(t.p,{children:["Note: chains can also be built on Substrate and are not required to be deployed onto Polkadot.\nMore on Polkadot's architecture is available on the ",(0,o.jsx)(t.a,{href:"/docs/learn-architecture",children:"Architecture"})," page."]}),"\n"]}),"\n",(0,o.jsxs)(t.p,{children:["With this in mind, we can point to some other implementations of Polkadot. Having different\nimplementations inherently promotes the decentralization of the technology and progresses it in a\nmeaningful way. Other implementations of Polkadot that exist, many of whom have received a\n",(0,o.jsx)(t.a,{href:"/docs/grants",children:"grant"})," from the Web3 Foundation, are in programming languages like Go, C++,\nand JavaScript, which are all languages that can be compiled in Wasm."]}),"\n",(0,o.jsx)(t.p,{children:"As stated in the Soramitsu grant announcement:"}),"\n",(0,o.jsx)(t.p,{children:"It is critically important to have multiple implementations of the Polkadot protocol for a number\nof reasons, including decentralization, knowledge dispersion, and better definitions of the\nprotocol... Multiple implementations of Polkadot improves network resilience and adds to the\ndecentralization of the network. The governance of the network is more democratized when multiple\nteams build clients that run the nodes in the network."}),"\n",(0,o.jsx)(t.h2,{id:"alternative-implementations",children:"Alternative Implementations"}),"\n",(0,o.jsxs)(t.h3,{id:"chainsafe-systems-gossamer",children:["ChainSafe Systems: ",(0,o.jsx)(t.a,{href:"https://github.com/ChainSafe/gossamer#a-go-implementation-of-the-polkadot-host",children:"Gossamer"})]}),"\n",(0,o.jsxs)(t.p,{children:[(0,o.jsx)(t.strong,{children:"Gossamer"})," is a Go implementation being built by\n",(0,o.jsx)(t.a,{href:"https://github.com/ChainSafeSystems",children:"ChainSafe Systems"}),", a blockchain R&D firm based in Toronto,\nCanada that is also building an Eth2.0 Serenity client. They were awarded a grant from the Web3\nFoundation."]}),"\n",(0,o.jsxs)(t.h3,{id:"soramitsu-kagome",children:["SORAMITSU: ",(0,o.jsx)(t.a,{href:"https://github.com/soramitsu/kagome#intro",children:"Kagome"})]}),"\n",(0,o.jsxs)(t.p,{children:[(0,o.jsx)(t.strong,{children:"Kagome"})," is a C++ implementation of the Polkadot Host being built by\n",(0,o.jsx)(t.a,{href:"https://soramitsu.co.jp/",children:"Soramitsu"}),", a Japanese digital identity company that previously developed\n",(0,o.jsx)(t.a,{href:"https://iroha.tech",children:"Hyperledger Iroha"}),". They were awarded a grant from the Web3 Foundation and\nreleased the first version of Kagome in April 2020. As part of the process, they also released a\n",(0,o.jsx)(t.a,{href:"https://github.com/soramitsu/libp2p-grpc",children:"libp2p"})," networking layer in C++."]}),"\n",(0,o.jsxs)(t.h3,{id:"polkadot-js-project-polkadot-js",children:["Polkadot-JS Project: ",(0,o.jsx)(t.a,{href:"https://github.com/polkadot-js",children:"Polkadot-JS"})]}),"\n",(0,o.jsxs)(t.p,{children:[(0,o.jsx)(t.strong,{children:"Polkadot-JS"})," is a ",(0,o.jsx)(t.a,{href:"https://github.com/polkadot-js/client",children:"JavaScript client"})," and offers a\ncollection of tools, interfaces, and libraries for Polkadot and Substrate."]}),"\n",(0,o.jsx)(t.h3,{id:"other-implementations-that-have-received-grants",children:"Other implementations that have received grants"}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsx)(t.li,{children:(0,o.jsx)(t.a,{href:"https://github.com/opennetsys/golkadot",children:"Golkadot"})}),"\n",(0,o.jsx)(t.li,{children:(0,o.jsx)(t.a,{href:"https://github.com/polkadot-java",children:"Polkadot in Java"})}),"\n"]}),"\n",(0,o.jsxs)(t.p,{children:["While the ecosystem continues to grow rapidly, the continued development of alternative\nimplementations will only make Polkadot stronger. Consider becoming a contributor to the ecosystem,\nand learn about the how you can receive a ",(0,o.jsx)(t.a,{href:"/docs/grants",children:"grant"})," for your development."]})]})}function c(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(h,{...e})}):h(e)}},28453:(e,t,n)=>{n.d(t,{R:()=>s,x:()=>r});var o=n(96540);const a={},i=o.createContext(a);function s(e){const t=o.useContext(i);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:s(e.components),o.createElement(i.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/6bfbfa77.6b196d64.js b/assets/js/6bfbfa77.6b196d64.js deleted file mode 100644 index 1c691ef211b8..000000000000 --- a/assets/js/6bfbfa77.6b196d64.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2858],{7723:(e,n,a)=>{a.r(n),a.d(n,{assets:()=>l,contentTitle:()=>r,default:()=>u,frontMatter:()=>s,metadata:()=>h,toc:()=>d});var t=a(74848),i=a(28453),o=a(67141);const s={id:"learn-auction",title:"Parachain Slot Auctions",sidebar_label:"Parachain Slot Auctions",description:"Polkadot's Parachain Slot Auction Mechanism.",keywords:["auction","slot auctions","parachain","bidding"],slug:"../learn-auction"},r=void 0,h={id:"learn/archive/learn-auction",title:"Parachain Slot Auctions",description:"Polkadot's Parachain Slot Auction Mechanism.",source:"@site/../docs/learn/archive/learn-auction.md",sourceDirName:"learn/archive",slug:"/learn/learn-auction",permalink:"/docs/learn/learn-auction",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/archive/learn-auction.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1729847256e3,frontMatter:{id:"learn-auction",title:"Parachain Slot Auctions",sidebar_label:"Parachain Slot Auctions",description:"Polkadot's Parachain Slot Auction Mechanism.",keywords:["auction","slot auctions","parachain","bidding"],slug:"../learn-auction"},sidebar:"docs",previous:{title:"Controller Accounts",permalink:"/docs/learn/learn-controller"},next:{title:"Parachain Crowdloans",permalink:"/docs/learn/learn-crowdloans"}},l={},d=[{value:"Mechanics of a Candle Auction",id:"mechanics-of-a-candle-auction",level:2},{value:"Randomness in action",id:"randomness-in-action",level:3},{value:"Rationale",id:"rationale",level:2},{value:"Network Implementation",id:"network-implementation",level:2},{value:"Bidding",id:"bidding",level:2},{value:"Examples",id:"examples",level:3},{value:"Parachain Lease Extension",id:"parachain-lease-extension",level:2},{value:"Lease Extension with Overlapping Slots",id:"lease-extension-with-overlapping-slots",level:3},{value:"Lease Extension with Non-Overlapping Slots",id:"lease-extension-with-non-overlapping-slots",level:3},{value:"Slot Auctions FAQ",id:"slot-auctions-faq",level:2},{value:"Why doesn't everyone bid for the max length?",id:"why-doesnt-everyone-bid-for-the-max-length",level:3},{value:"How does this mechanism help ensure parachain diversity?",id:"how-does-this-mechanism-help-ensure-parachain-diversity",level:3},{value:"Why is randomness difficult on blockchains?",id:"why-is-randomness-difficult-on-blockchains",level:3},{value:"Are there other ways of acquiring a slot besides the candle auction?",id:"are-there-other-ways-of-acquiring-a-slot-besides-the-candle-auction",level:3},{value:"How are auctions scheduled?",id:"how-are-auctions-scheduled",level:3},{value:"Resources",id:"resources",level:2}];function c(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",li:"li",mdxAdmonitionTitle:"mdxAdmonitionTitle",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o.A,{message:"The content on this page is archived. [Agile Coretime](../learn-agile-coretime) is activated on the network, and parachain slot auctions have been deprecated. For existing parachains, the remainder of the lease is automatically converted to coretime. See more information [here](../learn-agile-coretime#implementation)."}),"\n",(0,t.jsxs)(n.p,{children:["For a ",(0,t.jsx)(n.a,{href:"/docs/learn-parachains",children:"parachain"})," to be added to the relay chain it must inhabit one of the\navailable parachain slots. The number of parachain slots is not unbounded, as only a limited number\nare available. A limited number of slots are unlocked every few months through on-chain governance.\nIf a parachain wants to have guaranteed block inclusion at every relay chain block, it must acquire\na parachain slot. The development of\n",(0,t.jsx)(n.a,{href:"https://forum.polkadot.network/t/on-demand-parachains/2208",children:"on-demand parachains"})," is complete, and\nthey can be deployed after Agile Coretime is live on the network."]}),"\n",(0,t.jsxs)(n.p,{children:["The parachain slots will be leased according to an unpermissioned\n",(0,t.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/Candle_auction",children:"candle auction"}),", with several alterations related to\nimproving security while operating on a blockchain. See ",(0,t.jsx)(n.a,{href:"#rationale",children:"Rationale"})," for additional\ndetails."]}),"\n",(0,t.jsx)("div",{className:"row",children:(0,t.jsxs)("div",{className:"col text--center",children:[(0,t.jsx)("a",{href:"https://youtu.be/i5-Rw2Sf7-w",children:(0,t.jsx)("img",{src:"https://img.youtube.com/vi/i5-Rw2Sf7-w/0.jpg",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,t.jsx)("p",{children:(0,t.jsx)("a",{href:"https://youtu.be/i5-Rw2Sf7-w",children:"A Beginner's guide to Parachain Slot Auctions"})})]})}),"\n",(0,t.jsx)(n.h2,{id:"mechanics-of-a-candle-auction",children:"Mechanics of a Candle Auction"}),"\n",(0,t.jsx)(n.p,{children:"Candle auctions are a variant of open auctions where bidders submit bids that are increasingly\nhigher. The highest bidder at the conclusion of the auction is considered the winner."}),"\n",(0,t.jsx)(n.p,{children:'Candle auctions were originally employed in the 16th century for the sale of ships. The name is\nderived from the system by which the auction length was determined. The phrase "inch of a candle"\nrefers to the length of time required for a candle to burn down 1 inch. When the flame extinguishes\nand the candle goes out, the auction terminates and the standing bid at that point in time prevails\nthe winner.'}),"\n",(0,t.jsx)(n.p,{children:"When candle auctions are used online, they require a random number to decide the moment of\ntermination. Parachain slot auctions differ slightly from a normal candle auction in that they do\nnot randomly terminate the auction. Instead, they run for an entire fixed duration and the winner is\nrandomly chosen retroactively."}),"\n",(0,t.jsx)(n.p,{children:"The candle auction is split into two parts:"}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.em,{children:"opening period"})," which is in effect immediately after the auction starts. This period lasts\nfor one day and eighteen hours and serves as a buffer time for parachain candidates to setup\ntheir initial bids, and likely start executing their strategy on how to win the slot auction.\nDuring the opening phase, bids will continue to be accepted, but they do not have any effect on\nthe outcome of the auction."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.em,{children:"ending period"})," follows the opening period for five additional days, where the auction is\nsubject to end based on the candle auction mechanism."]}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["The auction\u2019s ending time can occur any time within the ending period. This time is automatically\nand randomly chosen by the ",(0,t.jsx)(n.a,{href:"/docs/learn-cryptography#vrf",children:"Verifiable Random Function (VRF)"}),". The\nprobability of winning the auction is equal to the number of blocks that contain a winning bid,\ndivided by the total number of blocks in the ending period. The random ending is managed by\npropagating through the entire ending period, where a snapshot is taken at each block within the\nending period to capture the winners for that given block. At the end of the period, one of the\nsnapshots is randomly selected to determine the winner of the auction."]}),"\n",(0,t.jsx)(n.admonition,{title:"The parachain candidate with the highest bid at the ending time chosen by the Verifiable",type:"info",children:(0,t.jsx)(n.p,{children:"Random Function wins the slot auction."})}),"\n",(0,t.jsxs)(n.p,{children:["A parachain auction lasts exactly one week from the starting period (1 day and 18 hours) to\n",(0,t.jsx)(n.a,{href:"/docs/chain-state-values#auction-ending-period",children:"ending period"})," (candle auction phase)\nand finally 6 hours for determining the auction winner."]}),"\n",(0,t.jsx)(n.admonition,{type:"info",children:(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.a,{href:"/docs/learn/learn-crowdloans##supporting-a-crowdloan-campaign",children:"Crowdloan contributions"})," cannot be made\nduring these six hours when the winning block for the auction is being determined on-chain."]})}),"\n",(0,t.jsxs)(n.p,{children:["More details on this are available in the ",(0,t.jsx)(n.a,{href:"#network-implementation",children:"Network Implementation"})," section."]}),"\n",(0,t.jsxs)(n.h3,{id:"randomness-in-action",children:[(0,t.jsx)(n.a,{href:"/docs/learn-cryptography#randomness",children:"Randomness"})," in action"]}),"\n",(0,t.jsx)(n.p,{children:"The following example will showcase the randomness mechanics of the candle auction for the ninth\nauction on Kusama. Keep in mind that the candle phase has a uniform termination profile and has an\nequal probability of ending at any given block, and the termination block cannot be predicted before\nor during the auction."}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["The ending period of auction 9 starts at ",(0,t.jsx)(n.a,{href:"https://kusama.subscan.io/auction/9",children:(0,t.jsx)(n.code,{children:"block 9362014"})}),"."]}),"\n",(0,t.jsxs)(n.admonition,{type:"note",children:[(0,t.jsxs)(n.mdxAdmonitionTitle,{children:["The auction has a full duration equal to ",(0,t.jsx)(n.code,{children:"block 9362014"})," + ",(0,t.jsx)(n.code,{children:"72000"})]}),(0,t.jsxs)(n.p,{children:["Here, ",(0,t.jsx)(n.code,{children:"block 72000"}),' is the "ending period", which is divided into ',(0,t.jsx)(n.strong,{children:"3600 samples of 20 blocks"}),".\nFiguratively, the candle is lit, and the candle phase lasts for 72,000 blocks."]})]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["The winning sample during the ending period had the ",(0,t.jsx)(n.code,{children:"index 1078"}),"."]}),"\n",(0,t.jsx)(n.admonition,{title:"Sample 1078 is the winner",type:"note",children:(0,t.jsxs)(n.p,{children:["Sample 1078 refers to the winner as of ",(0,t.jsx)(n.code,{children:"block 9362014 + 21560"}),", which equals\n",(0,t.jsx)(n.a,{href:"https://kusama.subscan.io/block/9383574",children:(0,t.jsx)(n.code,{children:"block 9383574"})}),"."]})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["The parent block was a new BABE session in the ",(0,t.jsx)(n.code,{children:"Logs"}),", which updated the randomness that was used\nto select that ",(0,t.jsx)(n.a,{href:"https://kusama.subscan.io/block/9434277",children:"sample index"}),"."]}),"\n",(0,t.jsx)(n.admonition,{title:"Inspecting the block state",type:"note",children:(0,t.jsxs)(n.p,{children:["You can inspect the state at the end of ",(0,t.jsx)(n.code,{children:"block 9434277"})," to see the sample indices with an\n",(0,t.jsx)(n.a,{href:"/docs/maintain-sync####types-of-nodes",children:"archive node"}),". The digest in the ",(0,t.jsx)(n.code,{children:"Logs"})," of\n",(0,t.jsx)(n.code,{children:"9434277"})," is decodable and contains the random value as well as the BABE authorities."]})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"As a result, the winner of this auction was not the highest bid during the full duration."}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"rationale",children:"Rationale"}),"\n",(0,t.jsxs)(n.p,{children:["The open and transparent nature of blockchain systems opens attack vectors that are non-existent in\ntraditional auction formats. Normal open auctions in particular can be vulnerable to ",(0,t.jsx)(n.em,{children:"auction\nsniping"})," when implemented over the internet or on a blockchain."]}),"\n",(0,t.jsx)(n.p,{children:"Auction sniping takes place when the end of an auction is known and bidders are hesitant to bid\ntheir true price early, in hopes of paying less than they actually value the item."}),"\n",(0,t.jsx)(n.p,{children:"For example, Alice may value an item at auction for 30 USD. She submits an initial bid of 10 USD in\nhopes of acquiring the items at a lower price. Alice's strategy is to place incrementally higher\nbids until her true value of 30 USD is exceeded. Another bidder Eve values the same item at 11 USD.\nEve's strategy is to watch the auction and submit a bid of 11 USD at the last second. Alice will\nhave no time to respond to this bid before the close of the auction and will lose the item. The\nauction mechanism is sub-optimal because it has not discovered the true price of the item and the\nitem has not gone to the actor who valued it the most."}),"\n",(0,t.jsxs)(n.p,{children:["On blockchains this problem may be even worse, since it potentially gives the producer of the block\nan opportunity to snipe any auction at the last concluding block by adding it themselves while\nignoring other bids. There is also the possibility of a malicious bidder or a block producer trying\nto ",(0,t.jsx)(n.em,{children:"grief"})," honest bidders by sniping auctions."]}),"\n",(0,t.jsxs)(n.p,{children:["For this reason, ",(0,t.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/Vickrey_auction",children:"Vickrey auctions"}),", a type of\nsealed-bid auction where bids are hidden and only revealed at a later phase, have emerged as a\nwell-regarded mechanic. For example, this mechanism is leveraged to auction human readable names on\nthe ",(0,t.jsx)(n.a,{href:"/docs/learn-account-advanced",children:"ENS"}),". The Candle auction is another solution that does not\nrequire a two-step commit and reveal schemes (a main component of Vickrey auctions), which allows\nsmart contracts to participate."]}),"\n",(0,t.jsx)(n.p,{children:"Candle auctions allow everyone to always know the states of the bid, but they do not reveal when the\nauction has officially ended. This helps to ensure that bidders are willing to make their true bids\nearly. Otherwise, they may find themselves in a situation where the auction was determined to have\nended before having an opportunity to bid."}),"\n",(0,t.jsx)(n.h2,{id:"network-implementation",children:"Network Implementation"}),"\n",(0,t.jsxs)(n.p,{children:["The relay chain will use a ",(0,t.jsx)(n.em,{children:"random beacon"})," based on the\n",(0,t.jsx)(n.a,{href:"/docs/learn-cryptography#vrf",children:"Verifiable Random Function (VRF)"}),". The VRF will provide the base of\nthe randomness, which will retroactively determine the end-time of the auction."]}),"\n",(0,t.jsx)(n.p,{children:"Polkadot's slot durations are capped to 2 years and are divided into 3-month periods (1 year divided\ninto 6-week periods for Kusama). Parachains may lease a slot for any combination of periods of the\nslot duration. Parachains may lease more than one slot over time, meaning that they could extend\ntheir lease to the network past the maximum duration by leasing a contiguous slot."}),"\n",(0,t.jsx)(n.admonition,{title:"Individual parachain slots are fungible",type:"note",children:(0,t.jsx)(n.p,{children:"This means that parachains do not need to always inhabit the same slot, however they always must\nmaintain a slot to remain a parachain."})}),"\n",(0,t.jsx)(n.h2,{id:"bidding",children:"Bidding"}),"\n",(0,t.jsxs)(n.p,{children:["Parachains or parachain teams, bid in the auction by specifying the slot range that they want to\nlease and the number of tokens they are willing to reserve. Bidders can be either ordinary accounts,\nor use the ",(0,t.jsx)(n.a,{href:"/docs/learn/learn-crowdloans",children:"crowdloan functionality"})," to source tokens from the community. For\na more in-depth comparison between both of these options for gaining a parachain slot, check out\nthis section on\n",(0,t.jsx)(n.a,{href:"/docs/learn/learn-crowdloans#crowdloan-campaigns-vs-parachain-auctions",children:"Crowdloan Campaigns vs Parachain Auctions"}),"."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"Parachain slots at genesis\n\n --3 months--\n v v\nSlot A | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |...\nSlot B | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |...\nSlot C |__________| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |...\nSlot D |__________| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |...\nSlot E |__________|___________| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |...\n ^ ^\n ---------------------------------------------max lease-----------------------------------------\n\n"})}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.em,{children:"Each period of the range 1 - 4 represents a 3-month duration for a total of 2 years for Polkadot\n(or 6-week duration for a total of 1 year for Kusama)."})}),"\n",(0,t.jsxs)(n.p,{children:["Bidders will submit a configuration of bids specifying the token amount they are willing to bond and\nfor which periods. The slot ranges may be any of the periods 1 - ",(0,t.jsx)(n.code,{children:"n"}),", where ",(0,t.jsx)(n.code,{children:"n"})," is the number of\n",(0,t.jsx)(n.a,{href:"/docs/chain-state-values#period-per-slot-auction",children:"periods available for a slot"}),"."]}),"\n",(0,t.jsx)(n.admonition,{title:"If you bond tokens with a parachain slot, you cannot stake with those tokens. In this way,",type:"note",children:(0,t.jsx)(n.p,{children:"you pay for the parachain slot by forfeiting the opportunity to earn staking rewards."})}),"\n",(0,t.jsx)(n.p,{children:"A bidder configuration for a single bidder may look like the following pseudocode example:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-js",children:"const bids = [\n {\n range: [1, 2, 3, 4, 5, 6, 7, 8],\n bond_amount: 300,\n },\n {\n range: [1, 2, 3, 4],\n bond_amount: 777,\n },\n {\n range: [2, 3, 4, 5, 6, 7],\n bond_amount: 450,\n },\n];\n"})}),"\n",(0,t.jsxs)(n.p,{children:["The important concept to understand from this example is that bidders may submit different\nconfigurations at different prices (",(0,t.jsx)(n.code,{children:"bond_amount"}),"). However, only one of these bids would be\neligible to win exclusive of the others."]}),"\n",(0,t.jsxs)(n.p,{children:["The winner selection algorithm will pick bids that may be non-overlapping in order to maximize the\namount of tokens held over the entire lease duration of the parachain slot. This means that the\nhighest bidder for any given slot lease period might not always win (see the\n",(0,t.jsx)(n.a,{href:"#examples",children:"example below"}),")."]}),"\n",(0,t.jsxs)(n.p,{children:["A random number, which is based on the ",(0,t.jsx)(n.a,{href:"/docs/learn-cryptography#vrf",children:"VRF"})," used by the relay chain,\nis determined at each block. Additionally, each auction will have a threshold that starts at 0 and\nincreases to 1. The random number produced by the VRF is examined next to the threshold to determine\nif that block is the end of the auction within the so-called ",(0,t.jsx)(n.em,{children:"ending period"}),". Additionally, the VRF\nwill pick a block from the last epoch to access the state of bids which can help aid in mitigating\nsome types of attacks from malicious validators."]}),"\n",(0,t.jsx)(n.h3,{id:"examples",children:"Examples"}),"\n",(0,t.jsx)(n.p,{children:"There is one parachain slot available."}),"\n",(0,t.jsxs)(n.p,{children:["Charlie bids ",(0,t.jsx)(n.code,{children:"75"})," for the range 1 - 8."]}),"\n",(0,t.jsxs)(n.p,{children:["Dave bids ",(0,t.jsx)(n.code,{children:"100"})," for the range 5 - 8."]}),"\n",(0,t.jsxs)(n.p,{children:["Emily bids ",(0,t.jsx)(n.code,{children:"40"})," for the range 1 - 4."]}),"\n",(0,t.jsx)(n.p,{children:"Let's calculate each bidder's valuation according to the algorithm. We do this by multiplying the\nbond amount by the number of periods in the specified range of the bid."}),"\n",(0,t.jsx)(n.p,{children:"Charlie - 75 * 8 = 600 for range 1 - 8"}),"\n",(0,t.jsx)(n.p,{children:"Dave - 100 * 4 = 400 for range 5 - 8"}),"\n",(0,t.jsx)(n.p,{children:"Emily - 40 * 4 = 160 for range 1 - 4"}),"\n",(0,t.jsxs)(n.p,{children:["Although Dave had the highest bid in accordance to token amount per period, when we do the\ncalculations we see that since he only bid for a range of 4, he would need to share the slot with\nEmily who bid much less. Together Dave and Emily's bids only equals a valuation of ",(0,t.jsx)(n.code,{children:"560"}),". Charlie's\nvaluation for the entire range is ",(0,t.jsx)(n.code,{children:"600"}),". Therefore Charlie is awarded the complete range of the\nparachain slot."]}),"\n",(0,t.jsx)(n.h2,{id:"parachain-lease-extension",children:"Parachain Lease Extension"}),"\n",(0,t.jsx)(n.p,{children:"Before the slot lease expires, parachains have to bid and win another auction for continuity of the\nlease. To avoid any downtime in connectivity and minimize the risk of losing a subsequent auction,\nparachain teams need to plan ahead to bid for the lease extension before their current lease period\nends. Explained in the section above, each auction lets you bid for 8 LPs (Lease Periods) which\nenables two scenarios for the parachain's lease extension."}),"\n",(0,t.jsx)(n.h3,{id:"lease-extension-with-overlapping-slots",children:"Lease Extension with Overlapping Slots"}),"\n",(0,t.jsx)(n.p,{children:"Acquire a slot where the first lease period is before the last lease period of the current slot."}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["Register a new ",(0,t.jsx)(n.code,{children:"paraId"})]}),"\n",(0,t.jsxs)(n.li,{children:["Win a slot auction with the new ",(0,t.jsx)(n.code,{children:"paraId"})]}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"The parachain team has access to two slots:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"one that will end soon"}),"\n",(0,t.jsx)(n.li,{children:"one that just started"}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["Both slots have at least one LP in common. When the old slot transitions to their last LP, the\nparachain can ",(0,t.jsx)(n.a,{href:"https://github.com/paritytech/polkadot/pull/4772",children:"swap"})," the slots. This can be done\nvia ",(0,t.jsx)(n.a,{href:"https://kusama.polkassembly.io/post/1491",children:"on-chain governance"}),". The ",(0,t.jsx)(n.code,{children:"swap"})," call is available in\nthe ",(0,t.jsx)(n.code,{children:"registrar"})," pallet."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"Parachain Slot Swap",src:a(28836).A+"",width:"1286",height:"896"})}),"\n",(0,t.jsx)(n.admonition,{title:"Any two parachains can swap their slots via XCM",type:"note",children:(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.a,{href:"https://github.com/paritytech/polkadot/pull/4772",children:"slot swap via XCM"})," requires two live\nparachains to send an XCM message to the relay chain to approve the swap. A parachain team with\naccess to two overlapping slots can start a shell parachain on the new slot and swap it with their\nactual parachain on the old slot, thus ensuring continuity of the lease."]})}),"\n",(0,t.jsx)(n.h3,{id:"lease-extension-with-non-overlapping-slots",children:"Lease Extension with Non-Overlapping Slots"}),"\n",(0,t.jsxs)(n.p,{children:["Acquire a slot where the first LP starts right after the end of the last LP of the current slot. In\nthis case, the parachain can bid directly with their current ",(0,t.jsx)(n.code,{children:"paraId"}),", and it will be automatically\nextended without the need of swapping. This method has the advantage of not having superfluous LP's\non different slots owned by the same team, however it has the disadvantage of losing flexibility on\nwhen to win a new slot: if the team does not win the exact slot, then it will suffer some downtime\nuntil it wins a new slot."]}),"\n",(0,t.jsx)(n.h2,{id:"slot-auctions-faq",children:"Slot Auctions FAQ"}),"\n",(0,t.jsx)(n.h3,{id:"why-doesnt-everyone-bid-for-the-max-length",children:"Why doesn't everyone bid for the max length?"}),"\n",(0,t.jsx)(n.p,{children:"For the duration of the slot, the tokens used for bidding in the auction are locked up. This\nsuggests there is an opportunity cost associated with bidding, as the tokens could have been\nleveraged for something else."}),"\n",(0,t.jsx)(n.h3,{id:"how-does-this-mechanism-help-ensure-parachain-diversity",children:"How does this mechanism help ensure parachain diversity?"}),"\n",(0,t.jsx)(n.p,{children:"The method for dividing the parachain slots into intervals was partly inspired by the desire to\nallow for a greater amount of parachain diversity, while preventing particularly large and\nwell-funded parachains from hoarding slots. By making each period a three-month duration but the\noverall slot a 2-year duration (and 6-week duration but the overall slot a 1-year duration on\nKusama), the mechanism can cope with well-funded parachains, ensuring they secure a slot at the end\nof their lease, while gradually allowing other parachains to enter the ecosystem to occupy the\ndurations that are not filled. For example, if a large, well-funded parachain has already acquired a\nslot for range 1 - 8, they would be very interested in getting the next slot that would open for\n2 - 9. Under this mechanism, that parachain could acquire just period 9 (since that is the only one\nrequired) and allow the 2 - 8 range of the second parachain slot to be occupied by another party."}),"\n",(0,t.jsx)(n.h3,{id:"why-is-randomness-difficult-on-blockchains",children:"Why is randomness difficult on blockchains?"}),"\n",(0,t.jsxs)(n.p,{children:["Generating a random number trustlessly on a transparent and open network opens up the possibility\nfor bad actors to attempt to alter or manipulate the randomness. There have been a few solutions\nthat have been proposed, including hash-onions like ",(0,t.jsx)(n.a,{href:"https://github.com/randao/randao",children:"RANDAO"})," and\n",(0,t.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/Verifiable_random_function",children:"verifiable random functions"})," (VRFs). The\nlatter is what the relay chain uses as a base for its randomness."]}),"\n",(0,t.jsx)(n.h3,{id:"are-there-other-ways-of-acquiring-a-slot-besides-the-candle-auction",children:"Are there other ways of acquiring a slot besides the candle auction?"}),"\n",(0,t.jsx)(n.p,{children:"Aa parachain slot can also be acquired through a secondary market where a 3rd party has already won\na parachain slot and has the ability to resell the slot along with the associated deposit of tokens\nthat are locked up to another buyer. This would allow the seller to get liquid tokens in exchange\nfor the parachain slot and the buyer to acquire the slot as well as the deposited tokens."}),"\n",(0,t.jsxs)(n.p,{children:["A number of system or common-good parachains may be granted slots by the\n",(0,t.jsx)(n.a,{href:"/docs/learn-polkadot-opengov",children:"governance"})," of the relay chain. System parachains can be recognized\nby a parachain ID lower than 1_000, and common-good parachains by a parachain ID between 1_000 and\n1_999. Other parachains will have IDs 2_000 or higher. Such parachains would not have to bid for or\nrenew their slots as they would be considered essential to the ecosystem's future."]}),"\n",(0,t.jsx)(n.h3,{id:"how-are-auctions-scheduled",children:"How are auctions scheduled?"}),"\n",(0,t.jsxs)(n.p,{children:["The parachain slot auctions are scheduled through the governance. At least 2/3 of the Council can\ninitiate an auction, however, Root origin (via referendum) is needed to cancel an auction. Here is a\nproposal that gives a glimpse of what goes into planning auctions schedule -\n",(0,t.jsx)(n.a,{href:"https://polkadot.polkassembly.io/post/863",children:"Proposed Polkadot Auction Schedule 2022"}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"resources",children:"Resources"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000182287-how-does-a-parachain-slots-auction-work-",children:"How do Parachain Slot Auctions Work"})}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"https://research.web3.foundation/Polkadot/overview/parachain-allocation",children:"Parachain Allocation"})," -\nW3F research page on parachain allocation that goes more in depth to the mechanism"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"https://polkadot.network/blog/research-update-the-case-for-candle-auctions/",children:"Research Update: The Case for Candle Auctions"})," -\nW3F breakdown and research update about candle auctions"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"https://papers.ssrn.com/sol3/papers.cfm?abstract_id=3846363",children:"Front-Running, Smart Contracts, and Candle Auctions"}),"\nW3F Research team discusses how to remedy current blockchain auction setbacks with candle auctions"]}),"\n"]})]})}function u(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(c,{...e})}):c(e)}},67141:(e,n,a)=>{a.d(n,{A:()=>o});var t=a(96540),i=a(74848);const o=function(e){var n,a=e.message,o=(0,t.useState)(!0),s=o[0],r=o[1];return(0,i.jsx)(i.Fragment,{children:s&&(0,i.jsxs)("div",{className:"message-box",children:[(0,i.jsx)("button",{className:"close-button",onClick:function(){r(!1)},children:"\u2716 "}),(0,i.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(n=a,n.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},28836:(e,n,a)=>{a.d(n,{A:()=>t});const t=a.p+"assets/images/para-swap-3c765fb9e6860c7d7489a758af065cb0.png"},28453:(e,n,a)=>{a.d(n,{R:()=>s,x:()=>r});var t=a(96540);const i={},o=t.createContext(i);function s(e){const n=t.useContext(o);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:s(e.components),t.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/6bfbfa77.fdc15d92.js b/assets/js/6bfbfa77.fdc15d92.js new file mode 100644 index 000000000000..4faf1b61b5e7 --- /dev/null +++ b/assets/js/6bfbfa77.fdc15d92.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2858],{94133:(e,n,a)=>{a.r(n),a.d(n,{assets:()=>l,contentTitle:()=>h,default:()=>u,frontMatter:()=>r,metadata:()=>t,toc:()=>d});const t=JSON.parse('{"id":"learn/archive/learn-auction","title":"Parachain Slot Auctions","description":"Polkadot\'s Parachain Slot Auction Mechanism.","source":"@site/../docs/learn/archive/learn-auction.md","sourceDirName":"learn/archive","slug":"/learn/learn-auction","permalink":"/docs/learn/learn-auction","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/archive/learn-auction.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1729847256000,"frontMatter":{"id":"learn-auction","title":"Parachain Slot Auctions","sidebar_label":"Parachain Slot Auctions","description":"Polkadot\'s Parachain Slot Auction Mechanism.","keywords":["auction","slot auctions","parachain","bidding"],"slug":"../learn-auction"},"sidebar":"docs","previous":{"title":"Controller Accounts","permalink":"/docs/learn/learn-controller"},"next":{"title":"Parachain Crowdloans","permalink":"/docs/learn/learn-crowdloans"}}');var i=a(74848),o=a(28453),s=a(67141);const r={id:"learn-auction",title:"Parachain Slot Auctions",sidebar_label:"Parachain Slot Auctions",description:"Polkadot's Parachain Slot Auction Mechanism.",keywords:["auction","slot auctions","parachain","bidding"],slug:"../learn-auction"},h=void 0,l={},d=[{value:"Mechanics of a Candle Auction",id:"mechanics-of-a-candle-auction",level:2},{value:"Randomness in action",id:"randomness-in-action",level:3},{value:"Rationale",id:"rationale",level:2},{value:"Network Implementation",id:"network-implementation",level:2},{value:"Bidding",id:"bidding",level:2},{value:"Examples",id:"examples",level:3},{value:"Parachain Lease Extension",id:"parachain-lease-extension",level:2},{value:"Lease Extension with Overlapping Slots",id:"lease-extension-with-overlapping-slots",level:3},{value:"Lease Extension with Non-Overlapping Slots",id:"lease-extension-with-non-overlapping-slots",level:3},{value:"Slot Auctions FAQ",id:"slot-auctions-faq",level:2},{value:"Why doesn't everyone bid for the max length?",id:"why-doesnt-everyone-bid-for-the-max-length",level:3},{value:"How does this mechanism help ensure parachain diversity?",id:"how-does-this-mechanism-help-ensure-parachain-diversity",level:3},{value:"Why is randomness difficult on blockchains?",id:"why-is-randomness-difficult-on-blockchains",level:3},{value:"Are there other ways of acquiring a slot besides the candle auction?",id:"are-there-other-ways-of-acquiring-a-slot-besides-the-candle-auction",level:3},{value:"How are auctions scheduled?",id:"how-are-auctions-scheduled",level:3},{value:"Resources",id:"resources",level:2}];function c(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",li:"li",mdxAdmonitionTitle:"mdxAdmonitionTitle",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,o.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(s.A,{message:"The content on this page is archived. [Agile Coretime](../learn-agile-coretime) is activated on the network, and parachain slot auctions have been deprecated. For existing parachains, the remainder of the lease is automatically converted to coretime. See more information [here](../learn-agile-coretime#implementation)."}),"\n",(0,i.jsxs)(n.p,{children:["For a ",(0,i.jsx)(n.a,{href:"/docs/learn-parachains",children:"parachain"})," to be added to the relay chain it must inhabit one of the\navailable parachain slots. The number of parachain slots is not unbounded, as only a limited number\nare available. A limited number of slots are unlocked every few months through on-chain governance.\nIf a parachain wants to have guaranteed block inclusion at every relay chain block, it must acquire\na parachain slot. The development of\n",(0,i.jsx)(n.a,{href:"https://forum.polkadot.network/t/on-demand-parachains/2208",children:"on-demand parachains"})," is complete, and\nthey can be deployed after Agile Coretime is live on the network."]}),"\n",(0,i.jsxs)(n.p,{children:["The parachain slots will be leased according to an unpermissioned\n",(0,i.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/Candle_auction",children:"candle auction"}),", with several alterations related to\nimproving security while operating on a blockchain. See ",(0,i.jsx)(n.a,{href:"#rationale",children:"Rationale"})," for additional\ndetails."]}),"\n",(0,i.jsx)("div",{className:"row",children:(0,i.jsxs)("div",{className:"col text--center",children:[(0,i.jsx)("a",{href:"https://youtu.be/i5-Rw2Sf7-w",children:(0,i.jsx)("img",{src:"https://img.youtube.com/vi/i5-Rw2Sf7-w/0.jpg",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,i.jsx)("p",{children:(0,i.jsx)("a",{href:"https://youtu.be/i5-Rw2Sf7-w",children:"A Beginner's guide to Parachain Slot Auctions"})})]})}),"\n",(0,i.jsx)(n.h2,{id:"mechanics-of-a-candle-auction",children:"Mechanics of a Candle Auction"}),"\n",(0,i.jsx)(n.p,{children:"Candle auctions are a variant of open auctions where bidders submit bids that are increasingly\nhigher. The highest bidder at the conclusion of the auction is considered the winner."}),"\n",(0,i.jsx)(n.p,{children:'Candle auctions were originally employed in the 16th century for the sale of ships. The name is\nderived from the system by which the auction length was determined. The phrase "inch of a candle"\nrefers to the length of time required for a candle to burn down 1 inch. When the flame extinguishes\nand the candle goes out, the auction terminates and the standing bid at that point in time prevails\nthe winner.'}),"\n",(0,i.jsx)(n.p,{children:"When candle auctions are used online, they require a random number to decide the moment of\ntermination. Parachain slot auctions differ slightly from a normal candle auction in that they do\nnot randomly terminate the auction. Instead, they run for an entire fixed duration and the winner is\nrandomly chosen retroactively."}),"\n",(0,i.jsx)(n.p,{children:"The candle auction is split into two parts:"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.em,{children:"opening period"})," which is in effect immediately after the auction starts. This period lasts\nfor one day and eighteen hours and serves as a buffer time for parachain candidates to setup\ntheir initial bids, and likely start executing their strategy on how to win the slot auction.\nDuring the opening phase, bids will continue to be accepted, but they do not have any effect on\nthe outcome of the auction."]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.em,{children:"ending period"})," follows the opening period for five additional days, where the auction is\nsubject to end based on the candle auction mechanism."]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["The auction\u2019s ending time can occur any time within the ending period. This time is automatically\nand randomly chosen by the ",(0,i.jsx)(n.a,{href:"/docs/learn-cryptography#vrf",children:"Verifiable Random Function (VRF)"}),". The\nprobability of winning the auction is equal to the number of blocks that contain a winning bid,\ndivided by the total number of blocks in the ending period. The random ending is managed by\npropagating through the entire ending period, where a snapshot is taken at each block within the\nending period to capture the winners for that given block. At the end of the period, one of the\nsnapshots is randomly selected to determine the winner of the auction."]}),"\n",(0,i.jsx)(n.admonition,{title:"The parachain candidate with the highest bid at the ending time chosen by the Verifiable",type:"info",children:(0,i.jsx)(n.p,{children:"Random Function wins the slot auction."})}),"\n",(0,i.jsxs)(n.p,{children:["A parachain auction lasts exactly one week from the starting period (1 day and 18 hours) to\n",(0,i.jsx)(n.a,{href:"/docs/chain-state-values#auction-ending-period",children:"ending period"})," (candle auction phase)\nand finally 6 hours for determining the auction winner."]}),"\n",(0,i.jsx)(n.admonition,{type:"info",children:(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.a,{href:"/docs/learn/learn-crowdloans##supporting-a-crowdloan-campaign",children:"Crowdloan contributions"})," cannot be made\nduring these six hours when the winning block for the auction is being determined on-chain."]})}),"\n",(0,i.jsxs)(n.p,{children:["More details on this are available in the ",(0,i.jsx)(n.a,{href:"#network-implementation",children:"Network Implementation"})," section."]}),"\n",(0,i.jsxs)(n.h3,{id:"randomness-in-action",children:[(0,i.jsx)(n.a,{href:"/docs/learn-cryptography#randomness",children:"Randomness"})," in action"]}),"\n",(0,i.jsx)(n.p,{children:"The following example will showcase the randomness mechanics of the candle auction for the ninth\nauction on Kusama. Keep in mind that the candle phase has a uniform termination profile and has an\nequal probability of ending at any given block, and the termination block cannot be predicted before\nor during the auction."}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:["The ending period of auction 9 starts at ",(0,i.jsx)(n.a,{href:"https://kusama.subscan.io/auction/9",children:(0,i.jsx)(n.code,{children:"block 9362014"})}),"."]}),"\n",(0,i.jsxs)(n.admonition,{type:"note",children:[(0,i.jsxs)(n.mdxAdmonitionTitle,{children:["The auction has a full duration equal to ",(0,i.jsx)(n.code,{children:"block 9362014"})," + ",(0,i.jsx)(n.code,{children:"72000"})]}),(0,i.jsxs)(n.p,{children:["Here, ",(0,i.jsx)(n.code,{children:"block 72000"}),' is the "ending period", which is divided into ',(0,i.jsx)(n.strong,{children:"3600 samples of 20 blocks"}),".\nFiguratively, the candle is lit, and the candle phase lasts for 72,000 blocks."]})]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:["The winning sample during the ending period had the ",(0,i.jsx)(n.code,{children:"index 1078"}),"."]}),"\n",(0,i.jsx)(n.admonition,{title:"Sample 1078 is the winner",type:"note",children:(0,i.jsxs)(n.p,{children:["Sample 1078 refers to the winner as of ",(0,i.jsx)(n.code,{children:"block 9362014 + 21560"}),", which equals\n",(0,i.jsx)(n.a,{href:"https://kusama.subscan.io/block/9383574",children:(0,i.jsx)(n.code,{children:"block 9383574"})}),"."]})}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:["The parent block was a new BABE session in the ",(0,i.jsx)(n.code,{children:"Logs"}),", which updated the randomness that was used\nto select that ",(0,i.jsx)(n.a,{href:"https://kusama.subscan.io/block/9434277",children:"sample index"}),"."]}),"\n",(0,i.jsx)(n.admonition,{title:"Inspecting the block state",type:"note",children:(0,i.jsxs)(n.p,{children:["You can inspect the state at the end of ",(0,i.jsx)(n.code,{children:"block 9434277"})," to see the sample indices with an\n",(0,i.jsx)(n.a,{href:"/docs/maintain-sync####types-of-nodes",children:"archive node"}),". The digest in the ",(0,i.jsx)(n.code,{children:"Logs"})," of\n",(0,i.jsx)(n.code,{children:"9434277"})," is decodable and contains the random value as well as the BABE authorities."]})}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:"As a result, the winner of this auction was not the highest bid during the full duration."}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"rationale",children:"Rationale"}),"\n",(0,i.jsxs)(n.p,{children:["The open and transparent nature of blockchain systems opens attack vectors that are non-existent in\ntraditional auction formats. Normal open auctions in particular can be vulnerable to ",(0,i.jsx)(n.em,{children:"auction\nsniping"})," when implemented over the internet or on a blockchain."]}),"\n",(0,i.jsx)(n.p,{children:"Auction sniping takes place when the end of an auction is known and bidders are hesitant to bid\ntheir true price early, in hopes of paying less than they actually value the item."}),"\n",(0,i.jsx)(n.p,{children:"For example, Alice may value an item at auction for 30 USD. She submits an initial bid of 10 USD in\nhopes of acquiring the items at a lower price. Alice's strategy is to place incrementally higher\nbids until her true value of 30 USD is exceeded. Another bidder Eve values the same item at 11 USD.\nEve's strategy is to watch the auction and submit a bid of 11 USD at the last second. Alice will\nhave no time to respond to this bid before the close of the auction and will lose the item. The\nauction mechanism is sub-optimal because it has not discovered the true price of the item and the\nitem has not gone to the actor who valued it the most."}),"\n",(0,i.jsxs)(n.p,{children:["On blockchains this problem may be even worse, since it potentially gives the producer of the block\nan opportunity to snipe any auction at the last concluding block by adding it themselves while\nignoring other bids. There is also the possibility of a malicious bidder or a block producer trying\nto ",(0,i.jsx)(n.em,{children:"grief"})," honest bidders by sniping auctions."]}),"\n",(0,i.jsxs)(n.p,{children:["For this reason, ",(0,i.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/Vickrey_auction",children:"Vickrey auctions"}),", a type of\nsealed-bid auction where bids are hidden and only revealed at a later phase, have emerged as a\nwell-regarded mechanic. For example, this mechanism is leveraged to auction human readable names on\nthe ",(0,i.jsx)(n.a,{href:"/docs/learn-account-advanced",children:"ENS"}),". The Candle auction is another solution that does not\nrequire a two-step commit and reveal schemes (a main component of Vickrey auctions), which allows\nsmart contracts to participate."]}),"\n",(0,i.jsx)(n.p,{children:"Candle auctions allow everyone to always know the states of the bid, but they do not reveal when the\nauction has officially ended. This helps to ensure that bidders are willing to make their true bids\nearly. Otherwise, they may find themselves in a situation where the auction was determined to have\nended before having an opportunity to bid."}),"\n",(0,i.jsx)(n.h2,{id:"network-implementation",children:"Network Implementation"}),"\n",(0,i.jsxs)(n.p,{children:["The relay chain will use a ",(0,i.jsx)(n.em,{children:"random beacon"})," based on the\n",(0,i.jsx)(n.a,{href:"/docs/learn-cryptography#vrf",children:"Verifiable Random Function (VRF)"}),". The VRF will provide the base of\nthe randomness, which will retroactively determine the end-time of the auction."]}),"\n",(0,i.jsx)(n.p,{children:"Polkadot's slot durations are capped to 2 years and are divided into 3-month periods (1 year divided\ninto 6-week periods for Kusama). Parachains may lease a slot for any combination of periods of the\nslot duration. Parachains may lease more than one slot over time, meaning that they could extend\ntheir lease to the network past the maximum duration by leasing a contiguous slot."}),"\n",(0,i.jsx)(n.admonition,{title:"Individual parachain slots are fungible",type:"note",children:(0,i.jsx)(n.p,{children:"This means that parachains do not need to always inhabit the same slot, however they always must\nmaintain a slot to remain a parachain."})}),"\n",(0,i.jsx)(n.h2,{id:"bidding",children:"Bidding"}),"\n",(0,i.jsxs)(n.p,{children:["Parachains or parachain teams, bid in the auction by specifying the slot range that they want to\nlease and the number of tokens they are willing to reserve. Bidders can be either ordinary accounts,\nor use the ",(0,i.jsx)(n.a,{href:"/docs/learn/learn-crowdloans",children:"crowdloan functionality"})," to source tokens from the community. For\na more in-depth comparison between both of these options for gaining a parachain slot, check out\nthis section on\n",(0,i.jsx)(n.a,{href:"/docs/learn/learn-crowdloans#crowdloan-campaigns-vs-parachain-auctions",children:"Crowdloan Campaigns vs Parachain Auctions"}),"."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"Parachain slots at genesis\n\n --3 months--\n v v\nSlot A | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |...\nSlot B | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |...\nSlot C |__________| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |...\nSlot D |__________| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |...\nSlot E |__________|___________| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |...\n ^ ^\n ---------------------------------------------max lease-----------------------------------------\n\n"})}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.em,{children:"Each period of the range 1 - 4 represents a 3-month duration for a total of 2 years for Polkadot\n(or 6-week duration for a total of 1 year for Kusama)."})}),"\n",(0,i.jsxs)(n.p,{children:["Bidders will submit a configuration of bids specifying the token amount they are willing to bond and\nfor which periods. The slot ranges may be any of the periods 1 - ",(0,i.jsx)(n.code,{children:"n"}),", where ",(0,i.jsx)(n.code,{children:"n"})," is the number of\n",(0,i.jsx)(n.a,{href:"/docs/chain-state-values#period-per-slot-auction",children:"periods available for a slot"}),"."]}),"\n",(0,i.jsx)(n.admonition,{title:"If you bond tokens with a parachain slot, you cannot stake with those tokens. In this way,",type:"note",children:(0,i.jsx)(n.p,{children:"you pay for the parachain slot by forfeiting the opportunity to earn staking rewards."})}),"\n",(0,i.jsx)(n.p,{children:"A bidder configuration for a single bidder may look like the following pseudocode example:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-js",children:"const bids = [\n {\n range: [1, 2, 3, 4, 5, 6, 7, 8],\n bond_amount: 300,\n },\n {\n range: [1, 2, 3, 4],\n bond_amount: 777,\n },\n {\n range: [2, 3, 4, 5, 6, 7],\n bond_amount: 450,\n },\n];\n"})}),"\n",(0,i.jsxs)(n.p,{children:["The important concept to understand from this example is that bidders may submit different\nconfigurations at different prices (",(0,i.jsx)(n.code,{children:"bond_amount"}),"). However, only one of these bids would be\neligible to win exclusive of the others."]}),"\n",(0,i.jsxs)(n.p,{children:["The winner selection algorithm will pick bids that may be non-overlapping in order to maximize the\namount of tokens held over the entire lease duration of the parachain slot. This means that the\nhighest bidder for any given slot lease period might not always win (see the\n",(0,i.jsx)(n.a,{href:"#examples",children:"example below"}),")."]}),"\n",(0,i.jsxs)(n.p,{children:["A random number, which is based on the ",(0,i.jsx)(n.a,{href:"/docs/learn-cryptography#vrf",children:"VRF"})," used by the relay chain,\nis determined at each block. Additionally, each auction will have a threshold that starts at 0 and\nincreases to 1. The random number produced by the VRF is examined next to the threshold to determine\nif that block is the end of the auction within the so-called ",(0,i.jsx)(n.em,{children:"ending period"}),". Additionally, the VRF\nwill pick a block from the last epoch to access the state of bids which can help aid in mitigating\nsome types of attacks from malicious validators."]}),"\n",(0,i.jsx)(n.h3,{id:"examples",children:"Examples"}),"\n",(0,i.jsx)(n.p,{children:"There is one parachain slot available."}),"\n",(0,i.jsxs)(n.p,{children:["Charlie bids ",(0,i.jsx)(n.code,{children:"75"})," for the range 1 - 8."]}),"\n",(0,i.jsxs)(n.p,{children:["Dave bids ",(0,i.jsx)(n.code,{children:"100"})," for the range 5 - 8."]}),"\n",(0,i.jsxs)(n.p,{children:["Emily bids ",(0,i.jsx)(n.code,{children:"40"})," for the range 1 - 4."]}),"\n",(0,i.jsx)(n.p,{children:"Let's calculate each bidder's valuation according to the algorithm. We do this by multiplying the\nbond amount by the number of periods in the specified range of the bid."}),"\n",(0,i.jsx)(n.p,{children:"Charlie - 75 * 8 = 600 for range 1 - 8"}),"\n",(0,i.jsx)(n.p,{children:"Dave - 100 * 4 = 400 for range 5 - 8"}),"\n",(0,i.jsx)(n.p,{children:"Emily - 40 * 4 = 160 for range 1 - 4"}),"\n",(0,i.jsxs)(n.p,{children:["Although Dave had the highest bid in accordance to token amount per period, when we do the\ncalculations we see that since he only bid for a range of 4, he would need to share the slot with\nEmily who bid much less. Together Dave and Emily's bids only equals a valuation of ",(0,i.jsx)(n.code,{children:"560"}),". Charlie's\nvaluation for the entire range is ",(0,i.jsx)(n.code,{children:"600"}),". Therefore Charlie is awarded the complete range of the\nparachain slot."]}),"\n",(0,i.jsx)(n.h2,{id:"parachain-lease-extension",children:"Parachain Lease Extension"}),"\n",(0,i.jsx)(n.p,{children:"Before the slot lease expires, parachains have to bid and win another auction for continuity of the\nlease. To avoid any downtime in connectivity and minimize the risk of losing a subsequent auction,\nparachain teams need to plan ahead to bid for the lease extension before their current lease period\nends. Explained in the section above, each auction lets you bid for 8 LPs (Lease Periods) which\nenables two scenarios for the parachain's lease extension."}),"\n",(0,i.jsx)(n.h3,{id:"lease-extension-with-overlapping-slots",children:"Lease Extension with Overlapping Slots"}),"\n",(0,i.jsx)(n.p,{children:"Acquire a slot where the first lease period is before the last lease period of the current slot."}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["Register a new ",(0,i.jsx)(n.code,{children:"paraId"})]}),"\n",(0,i.jsxs)(n.li,{children:["Win a slot auction with the new ",(0,i.jsx)(n.code,{children:"paraId"})]}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"The parachain team has access to two slots:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"one that will end soon"}),"\n",(0,i.jsx)(n.li,{children:"one that just started"}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["Both slots have at least one LP in common. When the old slot transitions to their last LP, the\nparachain can ",(0,i.jsx)(n.a,{href:"https://github.com/paritytech/polkadot/pull/4772",children:"swap"})," the slots. This can be done\nvia ",(0,i.jsx)(n.a,{href:"https://kusama.polkassembly.io/post/1491",children:"on-chain governance"}),". The ",(0,i.jsx)(n.code,{children:"swap"})," call is available in\nthe ",(0,i.jsx)(n.code,{children:"registrar"})," pallet."]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"Parachain Slot Swap",src:a(28836).A+"",width:"1286",height:"896"})}),"\n",(0,i.jsx)(n.admonition,{title:"Any two parachains can swap their slots via XCM",type:"note",children:(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.a,{href:"https://github.com/paritytech/polkadot/pull/4772",children:"slot swap via XCM"})," requires two live\nparachains to send an XCM message to the relay chain to approve the swap. A parachain team with\naccess to two overlapping slots can start a shell parachain on the new slot and swap it with their\nactual parachain on the old slot, thus ensuring continuity of the lease."]})}),"\n",(0,i.jsx)(n.h3,{id:"lease-extension-with-non-overlapping-slots",children:"Lease Extension with Non-Overlapping Slots"}),"\n",(0,i.jsxs)(n.p,{children:["Acquire a slot where the first LP starts right after the end of the last LP of the current slot. In\nthis case, the parachain can bid directly with their current ",(0,i.jsx)(n.code,{children:"paraId"}),", and it will be automatically\nextended without the need of swapping. This method has the advantage of not having superfluous LP's\non different slots owned by the same team, however it has the disadvantage of losing flexibility on\nwhen to win a new slot: if the team does not win the exact slot, then it will suffer some downtime\nuntil it wins a new slot."]}),"\n",(0,i.jsx)(n.h2,{id:"slot-auctions-faq",children:"Slot Auctions FAQ"}),"\n",(0,i.jsx)(n.h3,{id:"why-doesnt-everyone-bid-for-the-max-length",children:"Why doesn't everyone bid for the max length?"}),"\n",(0,i.jsx)(n.p,{children:"For the duration of the slot, the tokens used for bidding in the auction are locked up. This\nsuggests there is an opportunity cost associated with bidding, as the tokens could have been\nleveraged for something else."}),"\n",(0,i.jsx)(n.h3,{id:"how-does-this-mechanism-help-ensure-parachain-diversity",children:"How does this mechanism help ensure parachain diversity?"}),"\n",(0,i.jsx)(n.p,{children:"The method for dividing the parachain slots into intervals was partly inspired by the desire to\nallow for a greater amount of parachain diversity, while preventing particularly large and\nwell-funded parachains from hoarding slots. By making each period a three-month duration but the\noverall slot a 2-year duration (and 6-week duration but the overall slot a 1-year duration on\nKusama), the mechanism can cope with well-funded parachains, ensuring they secure a slot at the end\nof their lease, while gradually allowing other parachains to enter the ecosystem to occupy the\ndurations that are not filled. For example, if a large, well-funded parachain has already acquired a\nslot for range 1 - 8, they would be very interested in getting the next slot that would open for\n2 - 9. Under this mechanism, that parachain could acquire just period 9 (since that is the only one\nrequired) and allow the 2 - 8 range of the second parachain slot to be occupied by another party."}),"\n",(0,i.jsx)(n.h3,{id:"why-is-randomness-difficult-on-blockchains",children:"Why is randomness difficult on blockchains?"}),"\n",(0,i.jsxs)(n.p,{children:["Generating a random number trustlessly on a transparent and open network opens up the possibility\nfor bad actors to attempt to alter or manipulate the randomness. There have been a few solutions\nthat have been proposed, including hash-onions like ",(0,i.jsx)(n.a,{href:"https://github.com/randao/randao",children:"RANDAO"})," and\n",(0,i.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/Verifiable_random_function",children:"verifiable random functions"})," (VRFs). The\nlatter is what the relay chain uses as a base for its randomness."]}),"\n",(0,i.jsx)(n.h3,{id:"are-there-other-ways-of-acquiring-a-slot-besides-the-candle-auction",children:"Are there other ways of acquiring a slot besides the candle auction?"}),"\n",(0,i.jsx)(n.p,{children:"Aa parachain slot can also be acquired through a secondary market where a 3rd party has already won\na parachain slot and has the ability to resell the slot along with the associated deposit of tokens\nthat are locked up to another buyer. This would allow the seller to get liquid tokens in exchange\nfor the parachain slot and the buyer to acquire the slot as well as the deposited tokens."}),"\n",(0,i.jsxs)(n.p,{children:["A number of system or common-good parachains may be granted slots by the\n",(0,i.jsx)(n.a,{href:"/docs/learn-polkadot-opengov",children:"governance"})," of the relay chain. System parachains can be recognized\nby a parachain ID lower than 1_000, and common-good parachains by a parachain ID between 1_000 and\n1_999. Other parachains will have IDs 2_000 or higher. Such parachains would not have to bid for or\nrenew their slots as they would be considered essential to the ecosystem's future."]}),"\n",(0,i.jsx)(n.h3,{id:"how-are-auctions-scheduled",children:"How are auctions scheduled?"}),"\n",(0,i.jsxs)(n.p,{children:["The parachain slot auctions are scheduled through the governance. At least 2/3 of the Council can\ninitiate an auction, however, Root origin (via referendum) is needed to cancel an auction. Here is a\nproposal that gives a glimpse of what goes into planning auctions schedule -\n",(0,i.jsx)(n.a,{href:"https://polkadot.polkassembly.io/post/863",children:"Proposed Polkadot Auction Schedule 2022"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"resources",children:"Resources"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000182287-how-does-a-parachain-slots-auction-work-",children:"How do Parachain Slot Auctions Work"})}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.a,{href:"https://research.web3.foundation/Polkadot/overview/parachain-allocation",children:"Parachain Allocation"})," -\nW3F research page on parachain allocation that goes more in depth to the mechanism"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.a,{href:"https://polkadot.network/blog/research-update-the-case-for-candle-auctions/",children:"Research Update: The Case for Candle Auctions"})," -\nW3F breakdown and research update about candle auctions"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.a,{href:"https://papers.ssrn.com/sol3/papers.cfm?abstract_id=3846363",children:"Front-Running, Smart Contracts, and Candle Auctions"}),"\nW3F Research team discusses how to remedy current blockchain auction setbacks with candle auctions"]}),"\n"]})]})}function u(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(c,{...e})}):c(e)}},67141:(e,n,a)=>{a.d(n,{A:()=>o});var t=a(96540),i=a(74848);const o=function(e){var n,a=e.message,o=(0,t.useState)(!0),s=o[0],r=o[1];return(0,i.jsx)(i.Fragment,{children:s&&(0,i.jsxs)("div",{className:"message-box",children:[(0,i.jsx)("button",{className:"close-button",onClick:function(){r(!1)},children:"\u2716 "}),(0,i.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(n=a,n.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},28836:(e,n,a)=>{a.d(n,{A:()=>t});const t=a.p+"assets/images/para-swap-3c765fb9e6860c7d7489a758af065cb0.png"},28453:(e,n,a)=>{a.d(n,{R:()=>s,x:()=>r});var t=a(96540);const i={},o=t.createContext(i);function s(e){const n=t.useContext(o);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:s(e.components),t.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/6d2ffbf3.16721087.js b/assets/js/6d2ffbf3.16721087.js deleted file mode 100644 index 357bc89d9e8b..000000000000 --- a/assets/js/6d2ffbf3.16721087.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4168],{31395:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>r,default:()=>l,frontMatter:()=>o,metadata:()=>a,toc:()=>h});var s=n(74848),i=n(28453);const o={id:"learn-xcm-docs-quickstart-first-look",title:"First Look at an XCM",sidebar_label:"First Look at an XCM",description:"First Look at an XCM.",keywords:["xcm","cross-consensus messaging"],slug:"../quickstart-first-look"},r="First Look",a={id:"learn/xcm/quickstart/learn-xcm-docs-quickstart-first-look",title:"First Look at an XCM",description:"First Look at an XCM.",source:"@site/../docs/learn/xcm/quickstart/first-look.md",sourceDirName:"learn/xcm/quickstart",slug:"/learn/xcm/quickstart-first-look",permalink:"/docs/learn/xcm/quickstart-first-look",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/xcm/quickstart/first-look.md",tags:[],version:"current",lastUpdatedBy:"bader y",lastUpdatedAt:1694099593e3,frontMatter:{id:"learn-xcm-docs-quickstart-first-look",title:"First Look at an XCM",sidebar_label:"First Look at an XCM",description:"First Look at an XCM.",keywords:["xcm","cross-consensus messaging"],slug:"../quickstart-first-look"},sidebar:"docs",previous:{title:"XCM Simulator",permalink:"/docs/learn/xcm/quickstart-simulator"},next:{title:"Fundamentals",permalink:"/docs/learn/xcm/fundamentals"}},c={},h=[{value:"Message",id:"message",level:2},{value:"WithdrawAsset",id:"withdrawasset",level:3},{value:"BuyExecution",id:"buyexecution",level:3},{value:"DepositAsset",id:"depositasset",level:3},{value:"What next?",id:"what-next",level:2}];function d(e){const t={a:"a",code:"code",em:"em",h1:"h1",h2:"h2",h3:"h3",header:"header",p:"p",pre:"pre",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.header,{children:(0,s.jsx)(t.h1,{id:"first-look",children:"First Look"})}),"\n",(0,s.jsxs)(t.p,{children:["In this section, we take you through a simple example of an XCM. In this example, we withdraw the\nnative token from the account of Alice and deposit this token in the account of Bob. This message\nsimulates a transfer between two accounts in the same consensus system (",(0,s.jsx)(t.code,{children:"ParaA"}),"). You can find the\ncomplete code example ",(0,s.jsx)(t.a,{href:"https://github.com/paritytech/xcm-docs/tree/main/examples",children:"in the repo"}),"."]}),"\n",(0,s.jsx)(t.h2,{id:"message",children:"Message"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-rust",children:" let message = Xcm(vec![\n WithdrawAsset((Here, amount).into()),\n BuyExecution{ fees: (Here, amount).into(), weight_limit: WeightLimit::Unlimited },\n DepositAsset {\n assets: All.into(),\n beneficiary: MultiLocation {\n parents: 0,\n interior: Junction::AccountId32 {\n network: None,\n id: BOB.clone().into()\n }.into(),\n }.into()\n }\n]);\n"})}),"\n",(0,s.jsxs)(t.p,{children:["The message consists of three instructions: ",(0,s.jsx)(t.code,{children:"WithdrawAsset"}),", ",(0,s.jsx)(t.code,{children:"BuyExecution"}),", and ",(0,s.jsx)(t.code,{children:"DepositAsset"}),". In\nthe following sections we will go over each instruction."]}),"\n",(0,s.jsx)(t.h3,{id:"withdrawasset",children:"WithdrawAsset"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-rust",children:"WithdrawAsset((Here, amount).into())\n"})}),"\n",(0,s.jsxs)(t.p,{children:["The first instruction takes as an input the MultiAsset that should be withdrawn. The MultiAsset\ndescribes the native parachain token with the ",(0,s.jsx)(t.code,{children:"Here"})," keyword. The ",(0,s.jsx)(t.code,{children:"amount"})," parameter is the number\nof tokens that are transferred. The withdrawal account depends on the origin of the message. In this\nexample the origin of the message is Alice. The WithdrawAsset instruction moves ",(0,s.jsx)(t.code,{children:"amount"})," number of\nnative tokens from Alice's account into the ",(0,s.jsx)(t.em,{children:"holding register"}),"."]}),"\n",(0,s.jsx)(t.h3,{id:"buyexecution",children:"BuyExecution"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-rust",children:"BuyExecution{fees: (Here, amount).into(), weight_limit: WeightLimit::Unlimited}\n"})}),"\n",(0,s.jsxs)(t.p,{children:["To execute XCM instructions, weight (some amount of resources) has to be bought. The amount of\nweight needed to execute an XCM depends on the number and type of instructions in the XCM. The\n",(0,s.jsx)(t.code,{children:"BuyExecution"})," instruction pays for the weight using the ",(0,s.jsx)(t.code,{children:"fees"}),". The ",(0,s.jsx)(t.code,{children:"fees"})," parameter describes the\nasset in the ",(0,s.jsx)(t.em,{children:"holding register"})," that should be used for paying for the weight. The ",(0,s.jsx)(t.code,{children:"weight_limit"}),"\nparameter defines the maximum amount of fees that can be used for buying weight. There are special\noccasions where it is not necessary to buy weight. See the chapter on\n",(0,s.jsx)(t.a,{href:"/docs/learn/xcm/fundamentals-fees",children:"weight and fees"})," for more information about the fees in XCM."]}),"\n",(0,s.jsx)(t.h3,{id:"depositasset",children:"DepositAsset"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-rust",children:"DepositAsset {\n assets: All.into(),\n beneficiary: MultiLocation {\n parents: 0,\n interior: Junction::AccountId32 {\n network: None,\n id: BOB.clone().into()\n }.into(),\n }.into()\n}\n"})}),"\n",(0,s.jsxs)(t.p,{children:["The DepositAsset instruction is used to deposit funds from the holding register into the account of\nthe ",(0,s.jsx)(t.em,{children:"beneficiary"}),". We don\u2019t actually know how much is remaining in the holding register after the\n",(0,s.jsx)(t.code,{children:"BuyExecution"})," instruction, but that doesn\u2019t matter since we specify a wildcard for the asset(s)\nwhich should be deposited. In this case, the wildcard is ",(0,s.jsx)(t.code,{children:"All"}),", meaning that all assets in the\nholding register at that point in the execution should be deposited. The ",(0,s.jsx)(t.em,{children:"beneficiary"})," in this case\nis the account of Bob in the current consensus system."]}),"\n",(0,s.jsxs)(t.p,{children:["When the three instructions are combined, we withdraw ",(0,s.jsx)(t.code,{children:"amount"})," native tokens from the account of\nAlice, pay for the execution of these instructions, and deposit the remaining tokens in the account\nof Bob."]}),"\n",(0,s.jsx)(t.h2,{id:"what-next",children:"What next?"}),"\n",(0,s.jsxs)(t.p,{children:["Now that we have taken a first look at an XCM, we can dive deeper into all the XCM instructions, to\nbe able to build more complex XCVM programs. For an overview of the instructions check out the\n",(0,s.jsx)(t.a,{href:"https://github.com/paritytech/xcm-format#5-the-xcvm-instruction-set",children:"xcm-format repo"}),". We'll show\nexamples for every instruction in the ",(0,s.jsx)(t.a,{href:"/docs/learn/xcm/journey-summary",children:"journey through XCM"})," chapter. First,\nit's important to learn the fundamentals, ",(0,s.jsx)(t.code,{children:"MultiLocation"}),", ",(0,s.jsx)(t.code,{children:"MultiAsset"}),", and other concepts in XCM.\nWe'll talk about those next."]})]})}function l(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},28453:(e,t,n)=>{n.d(t,{R:()=>r,x:()=>a});var s=n(96540);const i={},o=s.createContext(i);function r(e){const t=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),s.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/6d2ffbf3.5e9b96fd.js b/assets/js/6d2ffbf3.5e9b96fd.js new file mode 100644 index 000000000000..52a1c4968b7b --- /dev/null +++ b/assets/js/6d2ffbf3.5e9b96fd.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4168],{53158:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>a,default:()=>l,frontMatter:()=>r,metadata:()=>s,toc:()=>h});const s=JSON.parse('{"id":"learn/xcm/quickstart/learn-xcm-docs-quickstart-first-look","title":"First Look at an XCM","description":"First Look at an XCM.","source":"@site/../docs/learn/xcm/quickstart/first-look.md","sourceDirName":"learn/xcm/quickstart","slug":"/learn/xcm/quickstart-first-look","permalink":"/docs/learn/xcm/quickstart-first-look","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/xcm/quickstart/first-look.md","tags":[],"version":"current","lastUpdatedBy":"bader y","lastUpdatedAt":1694099593000,"frontMatter":{"id":"learn-xcm-docs-quickstart-first-look","title":"First Look at an XCM","sidebar_label":"First Look at an XCM","description":"First Look at an XCM.","keywords":["xcm","cross-consensus messaging"],"slug":"../quickstart-first-look"},"sidebar":"docs","previous":{"title":"XCM Simulator","permalink":"/docs/learn/xcm/quickstart-simulator"},"next":{"title":"Fundamentals","permalink":"/docs/learn/xcm/fundamentals"}}');var i=n(74848),o=n(28453);const r={id:"learn-xcm-docs-quickstart-first-look",title:"First Look at an XCM",sidebar_label:"First Look at an XCM",description:"First Look at an XCM.",keywords:["xcm","cross-consensus messaging"],slug:"../quickstart-first-look"},a="First Look",c={},h=[{value:"Message",id:"message",level:2},{value:"WithdrawAsset",id:"withdrawasset",level:3},{value:"BuyExecution",id:"buyexecution",level:3},{value:"DepositAsset",id:"depositasset",level:3},{value:"What next?",id:"what-next",level:2}];function d(e){const t={a:"a",code:"code",em:"em",h1:"h1",h2:"h2",h3:"h3",header:"header",p:"p",pre:"pre",...(0,o.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.header,{children:(0,i.jsx)(t.h1,{id:"first-look",children:"First Look"})}),"\n",(0,i.jsxs)(t.p,{children:["In this section, we take you through a simple example of an XCM. In this example, we withdraw the\nnative token from the account of Alice and deposit this token in the account of Bob. This message\nsimulates a transfer between two accounts in the same consensus system (",(0,i.jsx)(t.code,{children:"ParaA"}),"). You can find the\ncomplete code example ",(0,i.jsx)(t.a,{href:"https://github.com/paritytech/xcm-docs/tree/main/examples",children:"in the repo"}),"."]}),"\n",(0,i.jsx)(t.h2,{id:"message",children:"Message"}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-rust",children:" let message = Xcm(vec![\n WithdrawAsset((Here, amount).into()),\n BuyExecution{ fees: (Here, amount).into(), weight_limit: WeightLimit::Unlimited },\n DepositAsset {\n assets: All.into(),\n beneficiary: MultiLocation {\n parents: 0,\n interior: Junction::AccountId32 {\n network: None,\n id: BOB.clone().into()\n }.into(),\n }.into()\n }\n]);\n"})}),"\n",(0,i.jsxs)(t.p,{children:["The message consists of three instructions: ",(0,i.jsx)(t.code,{children:"WithdrawAsset"}),", ",(0,i.jsx)(t.code,{children:"BuyExecution"}),", and ",(0,i.jsx)(t.code,{children:"DepositAsset"}),". In\nthe following sections we will go over each instruction."]}),"\n",(0,i.jsx)(t.h3,{id:"withdrawasset",children:"WithdrawAsset"}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-rust",children:"WithdrawAsset((Here, amount).into())\n"})}),"\n",(0,i.jsxs)(t.p,{children:["The first instruction takes as an input the MultiAsset that should be withdrawn. The MultiAsset\ndescribes the native parachain token with the ",(0,i.jsx)(t.code,{children:"Here"})," keyword. The ",(0,i.jsx)(t.code,{children:"amount"})," parameter is the number\nof tokens that are transferred. The withdrawal account depends on the origin of the message. In this\nexample the origin of the message is Alice. The WithdrawAsset instruction moves ",(0,i.jsx)(t.code,{children:"amount"})," number of\nnative tokens from Alice's account into the ",(0,i.jsx)(t.em,{children:"holding register"}),"."]}),"\n",(0,i.jsx)(t.h3,{id:"buyexecution",children:"BuyExecution"}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-rust",children:"BuyExecution{fees: (Here, amount).into(), weight_limit: WeightLimit::Unlimited}\n"})}),"\n",(0,i.jsxs)(t.p,{children:["To execute XCM instructions, weight (some amount of resources) has to be bought. The amount of\nweight needed to execute an XCM depends on the number and type of instructions in the XCM. The\n",(0,i.jsx)(t.code,{children:"BuyExecution"})," instruction pays for the weight using the ",(0,i.jsx)(t.code,{children:"fees"}),". The ",(0,i.jsx)(t.code,{children:"fees"})," parameter describes the\nasset in the ",(0,i.jsx)(t.em,{children:"holding register"})," that should be used for paying for the weight. The ",(0,i.jsx)(t.code,{children:"weight_limit"}),"\nparameter defines the maximum amount of fees that can be used for buying weight. There are special\noccasions where it is not necessary to buy weight. See the chapter on\n",(0,i.jsx)(t.a,{href:"/docs/learn/xcm/fundamentals-fees",children:"weight and fees"})," for more information about the fees in XCM."]}),"\n",(0,i.jsx)(t.h3,{id:"depositasset",children:"DepositAsset"}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-rust",children:"DepositAsset {\n assets: All.into(),\n beneficiary: MultiLocation {\n parents: 0,\n interior: Junction::AccountId32 {\n network: None,\n id: BOB.clone().into()\n }.into(),\n }.into()\n}\n"})}),"\n",(0,i.jsxs)(t.p,{children:["The DepositAsset instruction is used to deposit funds from the holding register into the account of\nthe ",(0,i.jsx)(t.em,{children:"beneficiary"}),". We don\u2019t actually know how much is remaining in the holding register after the\n",(0,i.jsx)(t.code,{children:"BuyExecution"})," instruction, but that doesn\u2019t matter since we specify a wildcard for the asset(s)\nwhich should be deposited. In this case, the wildcard is ",(0,i.jsx)(t.code,{children:"All"}),", meaning that all assets in the\nholding register at that point in the execution should be deposited. The ",(0,i.jsx)(t.em,{children:"beneficiary"})," in this case\nis the account of Bob in the current consensus system."]}),"\n",(0,i.jsxs)(t.p,{children:["When the three instructions are combined, we withdraw ",(0,i.jsx)(t.code,{children:"amount"})," native tokens from the account of\nAlice, pay for the execution of these instructions, and deposit the remaining tokens in the account\nof Bob."]}),"\n",(0,i.jsx)(t.h2,{id:"what-next",children:"What next?"}),"\n",(0,i.jsxs)(t.p,{children:["Now that we have taken a first look at an XCM, we can dive deeper into all the XCM instructions, to\nbe able to build more complex XCVM programs. For an overview of the instructions check out the\n",(0,i.jsx)(t.a,{href:"https://github.com/paritytech/xcm-format#5-the-xcvm-instruction-set",children:"xcm-format repo"}),". We'll show\nexamples for every instruction in the ",(0,i.jsx)(t.a,{href:"/docs/learn/xcm/journey-summary",children:"journey through XCM"})," chapter. First,\nit's important to learn the fundamentals, ",(0,i.jsx)(t.code,{children:"MultiLocation"}),", ",(0,i.jsx)(t.code,{children:"MultiAsset"}),", and other concepts in XCM.\nWe'll talk about those next."]})]})}function l(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}},28453:(e,t,n)=>{n.d(t,{R:()=>r,x:()=>a});var s=n(96540);const i={},o=s.createContext(i);function r(e){const t=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),s.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/6d5c9a28.014191a9.js b/assets/js/6d5c9a28.014191a9.js new file mode 100644 index 000000000000..739833ca1b0f --- /dev/null +++ b/assets/js/6d5c9a28.014191a9.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[417],{82315:(e,a,s)=>{s.r(a),s.d(a,{assets:()=>l,contentTitle:()=>r,default:()=>c,frontMatter:()=>o,metadata:()=>t,toc:()=>d});const t=JSON.parse('{"id":"general/staking-apps","title":"Polkadot Staking Apps","description":"Staking Apps in the Polkadot Ecosystem.","source":"@site/../docs/general/staking-apps.md","sourceDirName":"general","slug":"/staking-apps","permalink":"/docs/staking-apps","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/staking-apps.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1726730833000,"frontMatter":{"id":"staking-apps","title":"Polkadot Staking Apps","sidebar_label":"Staking Apps","description":"Staking Apps in the Polkadot Ecosystem.","keywords":["staking","stake","nominate","nominating","NPoS","staking dashboard"],"slug":"../staking-apps"},"sidebar":"docs","previous":{"title":"Apps","permalink":"/docs/apps-index"},"next":{"title":"Governance Apps","permalink":"/docs/governance-apps"}}');var n=s(74848),i=s(28453);const o={id:"staking-apps",title:"Polkadot Staking Apps",sidebar_label:"Staking Apps",description:"Staking Apps in the Polkadot Ecosystem.",keywords:["staking","stake","nominate","nominating","NPoS","staking dashboard"],slug:"../staking-apps"},r=void 0,l={},d=[{value:"Polkadot Staking Dashboard",id:"polkadot-staking-dashboard",level:2},{value:"Sub.ID",id:"subid",level:2},{value:"NOMI",id:"nomi",level:2},{value:"SubWallet Earning",id:"subwallet-earning",level:2}];function h(e){const a={a:"a",admonition:"admonition",h2:"h2",img:"img",li:"li",p:"p",ul:"ul",...(0,i.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(a.admonition,{title:"Community Page",type:"info",children:(0,n.jsxs)(a.p,{children:["This page is open to contributions from the community. Please follow the\n",(0,n.jsx)(a.a,{href:"https://github.com/w3f/polkadot-wiki#contributing-to-documentation",children:"Wiki contribution guidelines"}),"\nand add your protocol native, permissionless, non-custodial NPoS Staking app to this page."]})}),"\n",(0,n.jsxs)(a.ul,{children:["\n",(0,n.jsx)(a.li,{children:(0,n.jsx)(a.a,{href:"#polkadot-staking-dashboard",children:"Polkadot Staking Dashboard"})}),"\n",(0,n.jsx)(a.li,{children:(0,n.jsx)(a.a,{href:"#subid",children:"Sub.ID"})}),"\n",(0,n.jsx)(a.li,{children:(0,n.jsx)(a.a,{href:"#nomi",children:"NOMI"})}),"\n",(0,n.jsx)(a.li,{children:(0,n.jsx)(a.a,{href:"#subwallet-earning",children:"SubWallet Earning"})}),"\n"]}),"\n",(0,n.jsx)(a.h2,{id:"polkadot-staking-dashboard",children:"Polkadot Staking Dashboard"}),"\n",(0,n.jsxs)(a.p,{children:["The ",(0,n.jsx)(a.a,{href:"https://staking.polkadot.cloud/#/overview",children:"Polkadot Staking Dashboard"})," is a web3 application\ndedicated to native non-custodial ",(0,n.jsx)(a.a,{href:"/docs/learn-staking",children:"staking"})," on the relay chain. The\ndashboard allows to stake as a solo nominator or as a\n",(0,n.jsx)(a.a,{href:"/docs/learn-nomination-pools",children:"nomination pool"})," member. Users can also create their nomination\npools. The dashboard supports ",(0,n.jsx)(a.a,{href:"/docs/ledger",children:"Ledger"}),",\n",(0,n.jsx)(a.a,{href:"/docs/polkadot-vault",children:"Polkadot Vault"}),",\n",(0,n.jsx)(a.a,{href:"/docs/wallets-and-extensions#subwallet",children:"SubWallet"}),",\n",(0,n.jsx)(a.a,{href:"/docs/wallets-and-extensions#talisman",children:"Talisman"}),", WalletConnect, Fearless Wallet,\nPolkaGate, and Enkrypt. The dashboard also supports\n",(0,n.jsx)(a.a,{href:"/docs/learn-proxies#staking-proxy",children:"staking proxies"}),"."]}),"\n",(0,n.jsxs)(a.p,{children:["You can find more information about the Polkadot staking dashboard on the dedicated\n",(0,n.jsx)(a.a,{href:"/docs/staking-dashboard",children:"wiki page"})," and\n",(0,n.jsx)(a.a,{href:"https://support.polkadot.network/support/solutions/folders/65000157523",children:"support articles"}),"."]}),"\n",(0,n.jsx)(a.p,{children:"Below a list of video tutorial about the Polkadot Staking Dashboard."}),"\n",(0,n.jsxs)("div",{className:"row",children:[(0,n.jsxs)("div",{className:"col text--center",children:[(0,n.jsx)("a",{href:"https://youtu.be/F59N3YKYCRs?feature=shared",children:(0,n.jsx)("img",{src:"https://img.youtube.com/vi/F59N3YKYCRs/0.jpg",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,n.jsx)("p",{children:(0,n.jsx)("a",{href:"https://youtu.be/F59N3YKYCRs?feature=shared",children:"Stake your DOT"})})]}),(0,n.jsxs)("div",{className:"col text--center",children:[(0,n.jsx)("a",{href:"https://youtu.be/dDIG7QAApig?feature=shared",children:(0,n.jsx)("img",{src:"https://img.youtube.com/vi/dDIG7QAApig/0.jpg",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,n.jsx)("p",{children:(0,n.jsx)("a",{href:"https://youtu.be/dDIG7QAApig?feature=shared",children:"Join a Nomination Pool"})})]}),(0,n.jsxs)("div",{className:"col text--center",children:[(0,n.jsx)("a",{href:"https://youtu.be/hvXLc4H7rA4?feature=shared",children:(0,n.jsx)("img",{src:"https://img.youtube.com/vi/hvXLc4H7rA4/0.jpg",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,n.jsx)("p",{children:(0,n.jsx)("a",{href:"https://youtu.be/hvXLc4H7rA4?feature=shared",children:"Staking Dashboard Walkthrough"})})]})]}),"\n",(0,n.jsxs)("div",{className:"row",children:[(0,n.jsxs)("div",{className:"col text--center",children:[(0,n.jsx)("a",{href:"https://youtu.be/58pIe8tt2o4?feature=shared",children:(0,n.jsx)("img",{src:"https://img.youtube.com/vi/58pIe8tt2o4/0.jpg",width:"300",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,n.jsx)("p",{children:(0,n.jsx)("a",{href:"https://youtu.be/58pIe8tt2o4?feature=shared",children:"After Staking"})})]}),(0,n.jsxs)("div",{className:"col text--center",children:[(0,n.jsx)("a",{href:"https://youtu.be/aTFWhwy_Mxg?feature=shared",children:(0,n.jsx)("img",{src:"https://img.youtube.com/vi/aTFWhwy_Mxg/0.jpg",width:"300",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,n.jsx)("p",{children:(0,n.jsx)("a",{href:"https://youtu.be/aTFWhwy_Mxg?feature=shared",children:"Create, Manage & Destroy Pools"})})]})]}),"\n",(0,n.jsx)(a.h2,{id:"subid",children:"Sub.ID"}),"\n",(0,n.jsxs)(a.p,{children:[(0,n.jsx)(a.a,{href:"https://sub.id/",children:"Sub.ID"})," is a one-stop-shop for managing your Polkadot accounts, viewing your\naddresses and balances, and looking at other accounts. It features a Polkadot\n",(0,n.jsx)(a.a,{href:"https://sub.id/validator/polkadot",children:"staking page"}),", where you can easily start staking. Stakers can\nchoose their preferred validators or stake with the recommended validator set."]}),"\n",(0,n.jsx)(a.h2,{id:"nomi",children:"NOMI"}),"\n",(0,n.jsxs)(a.p,{children:[(0,n.jsx)(a.a,{href:"https://apps.turboflakes.io/?app=nomi",children:"NOMI"})," is designed to actively involve nominators in native\nstaking on the relay chain. It aims to offer a unique and enhanced nomination experience, using\n",(0,n.jsx)(a.a,{href:"https://en.wikipedia.org/wiki/Multiple-criteria_decision_analysis",children:"Multiple-Criteria Decision Analysis"}),"\n(MCDA) as a base for the analytical research. MCDA is an open and transparent approach for\nevaluating numerous conflicting traits in the decision-making process. For the analysis, validator\ndata is collected at the last block of every session."]}),"\n",(0,n.jsx)(a.p,{children:(0,n.jsx)(a.a,{href:"https://turboflakes.io/",children:(0,n.jsx)(a.img,{src:"https://github.com/turboflakes/apps/blob/main/src/assets/nomi_dashboard.webp?raw=true",alt:""})})}),"\n",(0,n.jsxs)(a.p,{children:["source: ",(0,n.jsx)(a.a,{href:"https://github.com/turboflakes/apps",children:"https://github.com/turboflakes/apps"})]}),"\n",(0,n.jsx)(a.h2,{id:"subwallet-earning",children:"SubWallet Earning"}),"\n",(0,n.jsxs)(a.p,{children:[(0,n.jsx)(a.a,{href:"https://web.subwallet.app/",children:"SubWallet Web Dashboard"})," is the all-in-one solution to manage assets\nand stake on multiple networks in the Polkadot, Kusama and Polkadot SDK (Substrate) ecosystems."]}),"\n",(0,n.jsx)(a.p,{children:"The Web Dashboard features an Earning tab which allows users to stake DOT easily via native\nnomination pools, as well as in liquid staking and lending protocols, without having to manage\nmultiple applications with different interfaces and experiences."})]})}function c(e={}){const{wrapper:a}={...(0,i.R)(),...e.components};return a?(0,n.jsx)(a,{...e,children:(0,n.jsx)(h,{...e})}):h(e)}},28453:(e,a,s)=>{s.d(a,{R:()=>o,x:()=>r});var t=s(96540);const n={},i=t.createContext(n);function o(e){const a=t.useContext(i);return t.useMemo((function(){return"function"==typeof e?e(a):{...a,...e}}),[a,e])}function r(e){let a;return a=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:o(e.components),t.createElement(i.Provider,{value:a},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/6d5c9a28.4639e96e.js b/assets/js/6d5c9a28.4639e96e.js deleted file mode 100644 index 3bb86040af5a..000000000000 --- a/assets/js/6d5c9a28.4639e96e.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[417],{55868:(e,a,t)=>{t.r(a),t.d(a,{assets:()=>l,contentTitle:()=>o,default:()=>c,frontMatter:()=>i,metadata:()=>r,toc:()=>d});var s=t(74848),n=t(28453);const i={id:"staking-apps",title:"Polkadot Staking Apps",sidebar_label:"Staking Apps",description:"Staking Apps in the Polkadot Ecosystem.",keywords:["staking","stake","nominate","nominating","NPoS","staking dashboard"],slug:"../staking-apps"},o=void 0,r={id:"general/staking-apps",title:"Polkadot Staking Apps",description:"Staking Apps in the Polkadot Ecosystem.",source:"@site/../docs/general/staking-apps.md",sourceDirName:"general",slug:"/staking-apps",permalink:"/docs/staking-apps",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/staking-apps.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1726730833e3,frontMatter:{id:"staking-apps",title:"Polkadot Staking Apps",sidebar_label:"Staking Apps",description:"Staking Apps in the Polkadot Ecosystem.",keywords:["staking","stake","nominate","nominating","NPoS","staking dashboard"],slug:"../staking-apps"},sidebar:"docs",previous:{title:"Apps",permalink:"/docs/apps-index"},next:{title:"Governance Apps",permalink:"/docs/governance-apps"}},l={},d=[{value:"Polkadot Staking Dashboard",id:"polkadot-staking-dashboard",level:2},{value:"Sub.ID",id:"subid",level:2},{value:"NOMI",id:"nomi",level:2},{value:"SubWallet Earning",id:"subwallet-earning",level:2}];function h(e){const a={a:"a",admonition:"admonition",h2:"h2",img:"img",li:"li",p:"p",ul:"ul",...(0,n.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a.admonition,{title:"Community Page",type:"info",children:(0,s.jsxs)(a.p,{children:["This page is open to contributions from the community. Please follow the\n",(0,s.jsx)(a.a,{href:"https://github.com/w3f/polkadot-wiki#contributing-to-documentation",children:"Wiki contribution guidelines"}),"\nand add your protocol native, permissionless, non-custodial NPoS Staking app to this page."]})}),"\n",(0,s.jsxs)(a.ul,{children:["\n",(0,s.jsx)(a.li,{children:(0,s.jsx)(a.a,{href:"#polkadot-staking-dashboard",children:"Polkadot Staking Dashboard"})}),"\n",(0,s.jsx)(a.li,{children:(0,s.jsx)(a.a,{href:"#subid",children:"Sub.ID"})}),"\n",(0,s.jsx)(a.li,{children:(0,s.jsx)(a.a,{href:"#nomi",children:"NOMI"})}),"\n",(0,s.jsx)(a.li,{children:(0,s.jsx)(a.a,{href:"#subwallet-earning",children:"SubWallet Earning"})}),"\n"]}),"\n",(0,s.jsx)(a.h2,{id:"polkadot-staking-dashboard",children:"Polkadot Staking Dashboard"}),"\n",(0,s.jsxs)(a.p,{children:["The ",(0,s.jsx)(a.a,{href:"https://staking.polkadot.cloud/#/overview",children:"Polkadot Staking Dashboard"})," is a web3 application\ndedicated to native non-custodial ",(0,s.jsx)(a.a,{href:"/docs/learn-staking",children:"staking"})," on the relay chain. The\ndashboard allows to stake as a solo nominator or as a\n",(0,s.jsx)(a.a,{href:"/docs/learn-nomination-pools",children:"nomination pool"})," member. Users can also create their nomination\npools. The dashboard supports ",(0,s.jsx)(a.a,{href:"/docs/ledger",children:"Ledger"}),",\n",(0,s.jsx)(a.a,{href:"/docs/polkadot-vault",children:"Polkadot Vault"}),",\n",(0,s.jsx)(a.a,{href:"/docs/wallets-and-extensions#subwallet",children:"SubWallet"}),",\n",(0,s.jsx)(a.a,{href:"/docs/wallets-and-extensions#talisman",children:"Talisman"}),", WalletConnect, Fearless Wallet,\nPolkaGate, and Enkrypt. The dashboard also supports\n",(0,s.jsx)(a.a,{href:"/docs/learn-proxies#staking-proxy",children:"staking proxies"}),"."]}),"\n",(0,s.jsxs)(a.p,{children:["You can find more information about the Polkadot staking dashboard on the dedicated\n",(0,s.jsx)(a.a,{href:"/docs/staking-dashboard",children:"wiki page"})," and\n",(0,s.jsx)(a.a,{href:"https://support.polkadot.network/support/solutions/folders/65000157523",children:"support articles"}),"."]}),"\n",(0,s.jsx)(a.p,{children:"Below a list of video tutorial about the Polkadot Staking Dashboard."}),"\n",(0,s.jsxs)("div",{className:"row",children:[(0,s.jsxs)("div",{className:"col text--center",children:[(0,s.jsx)("a",{href:"https://youtu.be/F59N3YKYCRs?feature=shared",children:(0,s.jsx)("img",{src:"https://img.youtube.com/vi/F59N3YKYCRs/0.jpg",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,s.jsx)("p",{children:(0,s.jsx)("a",{href:"https://youtu.be/F59N3YKYCRs?feature=shared",children:"Stake your DOT"})})]}),(0,s.jsxs)("div",{className:"col text--center",children:[(0,s.jsx)("a",{href:"https://youtu.be/dDIG7QAApig?feature=shared",children:(0,s.jsx)("img",{src:"https://img.youtube.com/vi/dDIG7QAApig/0.jpg",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,s.jsx)("p",{children:(0,s.jsx)("a",{href:"https://youtu.be/dDIG7QAApig?feature=shared",children:"Join a Nomination Pool"})})]}),(0,s.jsxs)("div",{className:"col text--center",children:[(0,s.jsx)("a",{href:"https://youtu.be/hvXLc4H7rA4?feature=shared",children:(0,s.jsx)("img",{src:"https://img.youtube.com/vi/hvXLc4H7rA4/0.jpg",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,s.jsx)("p",{children:(0,s.jsx)("a",{href:"https://youtu.be/hvXLc4H7rA4?feature=shared",children:"Staking Dashboard Walkthrough"})})]})]}),"\n",(0,s.jsxs)("div",{className:"row",children:[(0,s.jsxs)("div",{className:"col text--center",children:[(0,s.jsx)("a",{href:"https://youtu.be/58pIe8tt2o4?feature=shared",children:(0,s.jsx)("img",{src:"https://img.youtube.com/vi/58pIe8tt2o4/0.jpg",width:"300",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,s.jsx)("p",{children:(0,s.jsx)("a",{href:"https://youtu.be/58pIe8tt2o4?feature=shared",children:"After Staking"})})]}),(0,s.jsxs)("div",{className:"col text--center",children:[(0,s.jsx)("a",{href:"https://youtu.be/aTFWhwy_Mxg?feature=shared",children:(0,s.jsx)("img",{src:"https://img.youtube.com/vi/aTFWhwy_Mxg/0.jpg",width:"300",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,s.jsx)("p",{children:(0,s.jsx)("a",{href:"https://youtu.be/aTFWhwy_Mxg?feature=shared",children:"Create, Manage & Destroy Pools"})})]})]}),"\n",(0,s.jsx)(a.h2,{id:"subid",children:"Sub.ID"}),"\n",(0,s.jsxs)(a.p,{children:[(0,s.jsx)(a.a,{href:"https://sub.id/",children:"Sub.ID"})," is a one-stop-shop for managing your Polkadot accounts, viewing your\naddresses and balances, and looking at other accounts. It features a Polkadot\n",(0,s.jsx)(a.a,{href:"https://sub.id/validator/polkadot",children:"staking page"}),", where you can easily start staking. Stakers can\nchoose their preferred validators or stake with the recommended validator set."]}),"\n",(0,s.jsx)(a.h2,{id:"nomi",children:"NOMI"}),"\n",(0,s.jsxs)(a.p,{children:[(0,s.jsx)(a.a,{href:"https://apps.turboflakes.io/?app=nomi",children:"NOMI"})," is designed to actively involve nominators in native\nstaking on the relay chain. It aims to offer a unique and enhanced nomination experience, using\n",(0,s.jsx)(a.a,{href:"https://en.wikipedia.org/wiki/Multiple-criteria_decision_analysis",children:"Multiple-Criteria Decision Analysis"}),"\n(MCDA) as a base for the analytical research. MCDA is an open and transparent approach for\nevaluating numerous conflicting traits in the decision-making process. For the analysis, validator\ndata is collected at the last block of every session."]}),"\n",(0,s.jsx)(a.p,{children:(0,s.jsx)(a.a,{href:"https://turboflakes.io/",children:(0,s.jsx)(a.img,{src:"https://github.com/turboflakes/apps/blob/main/src/assets/nomi_dashboard.webp?raw=true",alt:""})})}),"\n",(0,s.jsxs)(a.p,{children:["source: ",(0,s.jsx)(a.a,{href:"https://github.com/turboflakes/apps",children:"https://github.com/turboflakes/apps"})]}),"\n",(0,s.jsx)(a.h2,{id:"subwallet-earning",children:"SubWallet Earning"}),"\n",(0,s.jsxs)(a.p,{children:[(0,s.jsx)(a.a,{href:"https://web.subwallet.app/",children:"SubWallet Web Dashboard"})," is the all-in-one solution to manage assets\nand stake on multiple networks in the Polkadot, Kusama and Polkadot SDK (Substrate) ecosystems."]}),"\n",(0,s.jsx)(a.p,{children:"The Web Dashboard features an Earning tab which allows users to stake DOT easily via native\nnomination pools, as well as in liquid staking and lending protocols, without having to manage\nmultiple applications with different interfaces and experiences."})]})}function c(e={}){const{wrapper:a}={...(0,n.R)(),...e.components};return a?(0,s.jsx)(a,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}},28453:(e,a,t)=>{t.d(a,{R:()=>o,x:()=>r});var s=t(96540);const n={},i=s.createContext(n);function o(e){const a=s.useContext(i);return s.useMemo((function(){return"function"==typeof e?e(a):{...a,...e}}),[a,e])}function r(e){let a;return a=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:o(e.components),s.createElement(i.Provider,{value:a},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/6f1a81b8.56218815.js b/assets/js/6f1a81b8.56218815.js new file mode 100644 index 000000000000..e65f2e787a5e --- /dev/null +++ b/assets/js/6f1a81b8.56218815.js @@ -0,0 +1 @@ +(self.webpackChunk=self.webpackChunk||[]).push([[2802],{73534:(e,t,n)=>{"use strict";n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>r,default:()=>h,frontMatter:()=>s,metadata:()=>i,toc:()=>c});const i=JSON.parse('{"id":"maintain/maintain-guides-how-to-chill","title":"How to Chill","description":"Steps on chilling as a network participant.","source":"@site/../docs/maintain/maintain-guides-how-to-chill.md","sourceDirName":"maintain","slug":"/maintain-guides-how-to-chill","permalink":"/docs/maintain-guides-how-to-chill","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/maintain/maintain-guides-how-to-chill.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1725464514000,"frontMatter":{"id":"maintain-guides-how-to-chill","title":"How to Chill","sidebar_label":"How to Chill","description":"Steps on chilling as a network participant.","keywords":["chill","chilling","pause"],"slug":"../maintain-guides-how-to-chill"},"sidebar":"docs","previous":{"title":"Monitor your node","permalink":"/docs/maintain-guides-how-to-monitor-your-node"},"next":{"title":"How to Stop Validating","permalink":"/docs/maintain-guides-how-to-stop-validating"}}');var o=n(74848),a=n(28453);n(47379);const s={id:"maintain-guides-how-to-chill",title:"How to Chill",sidebar_label:"How to Chill",description:"Steps on chilling as a network participant.",keywords:["chill","chilling","pause"],slug:"../maintain-guides-how-to-chill"},r=void 0,l={},c=[{value:"Consideration for Staking Election",id:"consideration-for-staking-election",level:2},{value:"Chilling as a Nominator",id:"chilling-as-a-nominator",level:2},{value:"Chilling as a Validator",id:"chilling-as-a-validator",level:2},{value:"Chill Other",id:"chill-other",level:2}];function d(e){const t={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",img:"img",p:"p",...(0,a.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.p,{children:'Staking bonds can be in any of the three states: validating, nominating, or chilled (neither\nvalidating nor nominating). When a staker wants to temporarily pause their active engagement in\nstaking but does not want to unbond their funds, they can choose to "chill" their involvement and\nkeep their funds bonded.'}),"\n",(0,o.jsxs)(t.p,{children:['An account can step back from participating in active staking by clicking "Stop" under the Network >\nStaking > Account actions page in ',(0,o.jsx)(t.a,{href:"https://polkadot.js.org/apps",children:"PolkadotJS Apps"})," or by calling the\n",(0,o.jsx)(t.code,{children:"chill"})," extrinsic in the\n",(0,o.jsx)(t.a,{href:"https://paritytech.github.io/substrate/master/pallet_staking/pallet/enum.Call.html#variant.chill",children:"staking pallet"}),".\nWhen an account chooses to chill, it becomes inactive in the next era. The call must be signed by\nthe ",(0,o.jsx)(t.em,{children:"staking proxy"})," account, not the ",(0,o.jsx)(t.em,{children:"stash"}),"."]}),"\n",(0,o.jsx)(t.admonition,{title:"Primer on stash and staking proxy accounts",type:"note",children:(0,o.jsxs)(t.p,{children:["If you need a refresher on the different responsibilities of the stash and staking proxy account\nwhen staking, take a look at the ",(0,o.jsx)(t.a,{href:"/docs/learn-staking#accounts",children:"accounts"})," section in the\ngeneral staking guide."]})}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{alt:"staking",src:n(32226).A+"",width:"1920",height:"800"})}),"\n",(0,o.jsx)(t.h2,{id:"consideration-for-staking-election",children:"Consideration for Staking Election"}),"\n",(0,o.jsx)(t.p,{children:"A bond that is actively participating in staking but chilled would continue to participate in\nstaking for the rest of the current era. If the bond was chilled in sessions 1 through 4 and\ncontinues to be chilled for the rest of the era, it would NOT be selected for election in the next\nera. If a bond was chilled for the entire session 5, it would not be considered in the next\nelection. If the bond was chilled in session 6, its participation in the next era's election would\ndepend on its state in session 5."}),"\n",(0,o.jsx)(t.h2,{id:"chilling-as-a-nominator",children:"Chilling as a Nominator"}),"\n",(0,o.jsx)(t.p,{children:"When you chill after being a nominator, your nominations will be reset. This means that when you\ndecide to start nominating again you will need to select validators to nominate once again. These\ncan be the same validators if you prefer, or, a completely new set. Just be aware - your nominations\nwill not persist across chills."}),"\n",(0,o.jsx)(t.p,{children:"Your nominator will remain bonded when it is chilled. When you are ready to nominate again, you will\nnot need to go through the whole process of bonding again, rather, you will issue a new nominate\ncall that specifies the new validators to nominate."}),"\n",(0,o.jsx)(t.h2,{id:"chilling-as-a-validator",children:"Chilling as a Validator"}),"\n",(0,o.jsx)(t.p,{children:"When you voluntarily chill after being a validator, your nominators will remain. As long as your\nnominators make no action, you will still have the nominations when you choose to become an active\nvalidator once again. You bond however would not be listed as a nominable validator thus any\nnominators issuing new or revisions to existing nominations would not be able to select your bond."}),"\n",(0,o.jsx)(t.p,{children:"When you become an active validator, you will also need to reset your validator preferences\n(commission, etc.). These can be configured as the same values set previously or something\ndifferent."}),"\n",(0,o.jsx)(t.h2,{id:"chill-other",children:"Chill Other"}),"\n",(0,o.jsxs)(t.p,{children:["An unbounded and unlimited number of nominators and validators in Polkadot's NPoS is not possible\ndue to constraints in the runtime. As a result, multiple checks are incorporated to keep the size of\nstaking system manageable, like mandating minimum active bond requirements for both nominators and\nvalidators. When these requirements are modified through on-chain governance, they can be enforced\nonly on the accounts that newly call ",(0,o.jsx)(t.code,{children:"nominate"})," or ",(0,o.jsx)(t.code,{children:"validate"})," after the update. The changes to the\nbonding parameters would not automatically chill the active accounts on-chain which do not meet the\nrequirements."]}),"\n",(0,o.jsx)(t.admonition,{title:"Chill Threshold",type:"note",children:(0,o.jsxs)(t.p,{children:[(0,o.jsx)(t.code,{children:"ChillThreshold"})," defines how close to the max nominators or validators we must reach before users\ncan start chilling one another."]})}),"\n",(0,o.jsxs)(t.p,{children:["For instance, let us consider a scenario where the minimum staking requirement for nominators is\nchanged from 80 DOTs to 120 DOTs. An account that was actively nominating with 80 DOTs before this\nupdate would still keep receiving staking rewards. To handle this corner case, the ",(0,o.jsx)(t.code,{children:"chillOther"}),"\nextrinsic was incorporated which also helps to keep things backwards compatible and safe. The\n",(0,o.jsx)(t.code,{children:"chillOther"})," extrinsic is permissionless and any third party user can target it on an account where\nthe minimum active bond is not satisfied, and chill that account. The list of addresses of all the\nactive validators and their nominators can be viewed by running\n",(0,o.jsx)(t.a,{href:"https://github.com/w3f/validator-stats",children:"validator stats"})," script."]}),"\n",(0,o.jsx)(t.admonition,{title:"Chill Other on Polkadot Network",type:"info",children:(0,o.jsxs)(t.p,{children:["Through ",(0,o.jsx)(t.a,{href:"https://polkadot.polkassembly.io/referendum/90",children:"Referendum 90"}),", ",(0,o.jsx)(t.code,{children:"maxNominatorCount"})," on\nPolkadot is set to ",(0,o.jsx)(t.code,{children:"None"})," eliminating the upper bound on the number of nominators on the network.\nDue to this, the ",(0,o.jsx)(t.code,{children:"chillOther"})," extrinsic on Polkadot network has no effect as the chill threshold\nwill never be met."]})})]})}function h(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},47379:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var i=n(90675),o=n(10467),a=n(96540),s=n(19588),r=n(2026),l=n(11135);function c(e,t,n){return d.apply(this,arguments)}function d(){return(d=(0,o.A)((0,i.A)().mark((function e(t,n,o){var a,l,c,d,h;return(0,i.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a=void 0,l=void 0,e.t0=t,e.next="polkadot"===e.t0?5:"kusama"===e.t0?7:"statemine"===e.t0?9:"statemint"===e.t0?11:"polkadotpeople"===e.t0?13:"kusamapeople"===e.t0?15:17;break;case 5:return a="wss://rpc.polkadot.io",e.abrupt("break",18);case 7:return a="wss://kusama-rpc.polkadot.io/",e.abrupt("break",18);case 9:return a="wss://statemine-rpc.polkadot.io/",e.abrupt("break",18);case 11:return a="wss://statemint-rpc.polkadot.io/",e.abrupt("break",18);case 13:return a="wss://polkadot-people-rpc.polkadot.io/",e.abrupt("break",18);case 15:return a="wss://kusama-people-rpc.polkadot.io/",e.abrupt("break",18);case 17:console.log("Unknown socket url provided, no connection made.");case 18:if(void 0!==a){e.next=22;break}return e.abrupt("return");case 22:return c=new s.E(a),e.next=25,r.G.create({provider:c});case 25:d=e.sent,(h=n.split(".")).forEach((function(e){e in d&&(d=d[e])})),e.t1=h[0],e.next="consts"===e.t1?31:"query"===e.t1?33:38;break;case 31:return l=d.toString(),e.abrupt("break",39);case 33:return e.next=35,d();case 35:return l=(l=e.sent).toString(),e.abrupt("break",39);case 38:console.log("Unknown path prefix ("+h[0]+") in "+n);case 39:return e.abrupt("return",l);case 40:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function h(e,t,n,i){switch(t){case"humanReadable":(0,l.HumanReadable)(e,n,i);break;case"precise":(0,l.Precise)(e,n,i);break;case"blocksToDays":(0,l.BlocksToDays)(e,i);break;case"erasToDays":(0,l.ErasToDays)(e,i,n);break;case"percentage":(0,l.Percentage)(e,i);break;case"permillToPercent":(0,l.PermillToPercent)(e,i);break;case"arrayLength":(0,l.ArrayLength)(e,i);break;default:return void console.log("Ignoring unknown filter type")}}const u=function(e){var t=e.network,n=e.path,s=e.defaultValue,r=e.filter,l=void 0===r?void 0:r,d=(0,a.useState)(""),u=d[0],p=d[1];return t=t.toLowerCase(),(0,a.useEffect)((function(){void 0!==l?h(s.toString(),l,t,p):p(s.toString());var e=void 0;switch(t){case"polkadot":e="wss://rpc.polkadot.io";break;case"kusama":e="wss://kusama-rpc.polkadot.io/";break;case"statemine":e="wss://kusama-asset-hub-rpc.polkadot.io/";break;case"statemint":e="wss://polkadot-asset-hub-rpc.polkadot.io/";break;case"kusamapeople":e="wss://kusama-people-rpc.polkadot.io";break;case"polkadotpeople":e="wss://polkadot-people-rpc.polkadot.io";break;default:console.log("Unknown network provided, "+t)}if(void 0===e)console.log("Failed to connect to a valid websocket, applying default");else{var a=function(){var e=(0,o.A)((0,i.A)().mark((function e(){var o;return(0,i.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,c(t,n,p);case 2:if(void 0!==(o=e.sent)){e.next=7;break}return e.abrupt("return");case 7:void 0!==l?h(o,l,t,p):p(o);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();try{a()}catch(r){console.log(r)}}}),[]),u}},11135:e=>{var t="polkadot",n="kusama",i="statemine",o="statemint",a="polkadotpeople",s="kusamapeople",r={polkadot:{precision:1e10,symbol:"DOT"},kusama:{precision:1e12,symbol:"KSM"},statemint:{precision:1e10,symbol:"DOT"},statemine:{precision:1e12,symbol:"KSM"},polkadotpeople:{precision:1e10,symbol:"DOT"},kusamapeople:{precision:1e12,symbol:"KSM"}};e.exports={HumanReadable:function(e,l,c){var d=void 0;if(l===t||l===o)d=3;else if(l===n||l===i||l===a)d=6;else{if(l!=s)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");d=8}e=parseFloat(e),c((e=Number.isInteger(e/r[l].precision)?e/r[l].precision+" "+r[l].symbol:(e/r[l].precision).toFixed(d)+" "+r[l].symbol).toString())},Precise:function(e,t,n){n(e=(e=parseFloat(e))/r[t].precision+" "+r[t].symbol)},BlocksToDays:function(e,t){t((e=6*e/86400).toString())},ErasToDays:function(e,r,l){var c=void 0;if(l===t||l===o||l==a)c=1;else{if(l!==n&&l!==i&&l!=s)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");c=4}r((e/=c).toString())},Percentage:function(e,t){t((e/=1e7).toString())},PermillToPercent:function(e,t){t((e/=1e4).toString())},ArrayLength:function(e,t){t((e=e.split(",").length).toString())}}},32226:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});const i=n.p+"assets/images/staking-keys-stash-proxy-503c2b8b6c40b269a16576dd7fe805b8.png"},47790:()=>{}}]); \ No newline at end of file diff --git a/assets/js/6f1a81b8.81d495d0.js b/assets/js/6f1a81b8.81d495d0.js deleted file mode 100644 index f46e2de7480d..000000000000 --- a/assets/js/6f1a81b8.81d495d0.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk=self.webpackChunk||[]).push([[2802],{19576:(e,t,n)=>{"use strict";n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>s,default:()=>h,frontMatter:()=>a,metadata:()=>r,toc:()=>c});var i=n(74848),o=n(28453);n(47379);const a={id:"maintain-guides-how-to-chill",title:"How to Chill",sidebar_label:"How to Chill",description:"Steps on chilling as a network participant.",keywords:["chill","chilling","pause"],slug:"../maintain-guides-how-to-chill"},s=void 0,r={id:"maintain/maintain-guides-how-to-chill",title:"How to Chill",description:"Steps on chilling as a network participant.",source:"@site/../docs/maintain/maintain-guides-how-to-chill.md",sourceDirName:"maintain",slug:"/maintain-guides-how-to-chill",permalink:"/docs/maintain-guides-how-to-chill",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/maintain/maintain-guides-how-to-chill.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1725464514e3,frontMatter:{id:"maintain-guides-how-to-chill",title:"How to Chill",sidebar_label:"How to Chill",description:"Steps on chilling as a network participant.",keywords:["chill","chilling","pause"],slug:"../maintain-guides-how-to-chill"},sidebar:"docs",previous:{title:"Monitor your node",permalink:"/docs/maintain-guides-how-to-monitor-your-node"},next:{title:"How to Stop Validating",permalink:"/docs/maintain-guides-how-to-stop-validating"}},l={},c=[{value:"Consideration for Staking Election",id:"consideration-for-staking-election",level:2},{value:"Chilling as a Nominator",id:"chilling-as-a-nominator",level:2},{value:"Chilling as a Validator",id:"chilling-as-a-validator",level:2},{value:"Chill Other",id:"chill-other",level:2}];function d(e){const t={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",img:"img",p:"p",...(0,o.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.p,{children:'Staking bonds can be in any of the three states: validating, nominating, or chilled (neither\nvalidating nor nominating). When a staker wants to temporarily pause their active engagement in\nstaking but does not want to unbond their funds, they can choose to "chill" their involvement and\nkeep their funds bonded.'}),"\n",(0,i.jsxs)(t.p,{children:['An account can step back from participating in active staking by clicking "Stop" under the Network >\nStaking > Account actions page in ',(0,i.jsx)(t.a,{href:"https://polkadot.js.org/apps",children:"PolkadotJS Apps"})," or by calling the\n",(0,i.jsx)(t.code,{children:"chill"})," extrinsic in the\n",(0,i.jsx)(t.a,{href:"https://paritytech.github.io/substrate/master/pallet_staking/pallet/enum.Call.html#variant.chill",children:"staking pallet"}),".\nWhen an account chooses to chill, it becomes inactive in the next era. The call must be signed by\nthe ",(0,i.jsx)(t.em,{children:"staking proxy"})," account, not the ",(0,i.jsx)(t.em,{children:"stash"}),"."]}),"\n",(0,i.jsx)(t.admonition,{title:"Primer on stash and staking proxy accounts",type:"note",children:(0,i.jsxs)(t.p,{children:["If you need a refresher on the different responsibilities of the stash and staking proxy account\nwhen staking, take a look at the ",(0,i.jsx)(t.a,{href:"/docs/learn-staking#accounts",children:"accounts"})," section in the\ngeneral staking guide."]})}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"staking",src:n(32226).A+"",width:"1920",height:"800"})}),"\n",(0,i.jsx)(t.h2,{id:"consideration-for-staking-election",children:"Consideration for Staking Election"}),"\n",(0,i.jsx)(t.p,{children:"A bond that is actively participating in staking but chilled would continue to participate in\nstaking for the rest of the current era. If the bond was chilled in sessions 1 through 4 and\ncontinues to be chilled for the rest of the era, it would NOT be selected for election in the next\nera. If a bond was chilled for the entire session 5, it would not be considered in the next\nelection. If the bond was chilled in session 6, its participation in the next era's election would\ndepend on its state in session 5."}),"\n",(0,i.jsx)(t.h2,{id:"chilling-as-a-nominator",children:"Chilling as a Nominator"}),"\n",(0,i.jsx)(t.p,{children:"When you chill after being a nominator, your nominations will be reset. This means that when you\ndecide to start nominating again you will need to select validators to nominate once again. These\ncan be the same validators if you prefer, or, a completely new set. Just be aware - your nominations\nwill not persist across chills."}),"\n",(0,i.jsx)(t.p,{children:"Your nominator will remain bonded when it is chilled. When you are ready to nominate again, you will\nnot need to go through the whole process of bonding again, rather, you will issue a new nominate\ncall that specifies the new validators to nominate."}),"\n",(0,i.jsx)(t.h2,{id:"chilling-as-a-validator",children:"Chilling as a Validator"}),"\n",(0,i.jsx)(t.p,{children:"When you voluntarily chill after being a validator, your nominators will remain. As long as your\nnominators make no action, you will still have the nominations when you choose to become an active\nvalidator once again. You bond however would not be listed as a nominable validator thus any\nnominators issuing new or revisions to existing nominations would not be able to select your bond."}),"\n",(0,i.jsx)(t.p,{children:"When you become an active validator, you will also need to reset your validator preferences\n(commission, etc.). These can be configured as the same values set previously or something\ndifferent."}),"\n",(0,i.jsx)(t.h2,{id:"chill-other",children:"Chill Other"}),"\n",(0,i.jsxs)(t.p,{children:["An unbounded and unlimited number of nominators and validators in Polkadot's NPoS is not possible\ndue to constraints in the runtime. As a result, multiple checks are incorporated to keep the size of\nstaking system manageable, like mandating minimum active bond requirements for both nominators and\nvalidators. When these requirements are modified through on-chain governance, they can be enforced\nonly on the accounts that newly call ",(0,i.jsx)(t.code,{children:"nominate"})," or ",(0,i.jsx)(t.code,{children:"validate"})," after the update. The changes to the\nbonding parameters would not automatically chill the active accounts on-chain which do not meet the\nrequirements."]}),"\n",(0,i.jsx)(t.admonition,{title:"Chill Threshold",type:"note",children:(0,i.jsxs)(t.p,{children:[(0,i.jsx)(t.code,{children:"ChillThreshold"})," defines how close to the max nominators or validators we must reach before users\ncan start chilling one another."]})}),"\n",(0,i.jsxs)(t.p,{children:["For instance, let us consider a scenario where the minimum staking requirement for nominators is\nchanged from 80 DOTs to 120 DOTs. An account that was actively nominating with 80 DOTs before this\nupdate would still keep receiving staking rewards. To handle this corner case, the ",(0,i.jsx)(t.code,{children:"chillOther"}),"\nextrinsic was incorporated which also helps to keep things backwards compatible and safe. The\n",(0,i.jsx)(t.code,{children:"chillOther"})," extrinsic is permissionless and any third party user can target it on an account where\nthe minimum active bond is not satisfied, and chill that account. The list of addresses of all the\nactive validators and their nominators can be viewed by running\n",(0,i.jsx)(t.a,{href:"https://github.com/w3f/validator-stats",children:"validator stats"})," script."]}),"\n",(0,i.jsx)(t.admonition,{title:"Chill Other on Polkadot Network",type:"info",children:(0,i.jsxs)(t.p,{children:["Through ",(0,i.jsx)(t.a,{href:"https://polkadot.polkassembly.io/referendum/90",children:"Referendum 90"}),", ",(0,i.jsx)(t.code,{children:"maxNominatorCount"})," on\nPolkadot is set to ",(0,i.jsx)(t.code,{children:"None"})," eliminating the upper bound on the number of nominators on the network.\nDue to this, the ",(0,i.jsx)(t.code,{children:"chillOther"})," extrinsic on Polkadot network has no effect as the chill threshold\nwill never be met."]})})]})}function h(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}},47379:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var i=n(90675),o=n(10467),a=n(96540),s=n(19588),r=n(2026),l=n(11135);function c(e,t,n){return d.apply(this,arguments)}function d(){return(d=(0,o.A)((0,i.A)().mark((function e(t,n,o){var a,l,c,d,h;return(0,i.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a=void 0,l=void 0,e.t0=t,e.next="polkadot"===e.t0?5:"kusama"===e.t0?7:"statemine"===e.t0?9:"statemint"===e.t0?11:"polkadotpeople"===e.t0?13:"kusamapeople"===e.t0?15:17;break;case 5:return a="wss://rpc.polkadot.io",e.abrupt("break",18);case 7:return a="wss://kusama-rpc.polkadot.io/",e.abrupt("break",18);case 9:return a="wss://statemine-rpc.polkadot.io/",e.abrupt("break",18);case 11:return a="wss://statemint-rpc.polkadot.io/",e.abrupt("break",18);case 13:return a="wss://polkadot-people-rpc.polkadot.io/",e.abrupt("break",18);case 15:return a="wss://kusama-people-rpc.polkadot.io/",e.abrupt("break",18);case 17:console.log("Unknown socket url provided, no connection made.");case 18:if(void 0!==a){e.next=22;break}return e.abrupt("return");case 22:return c=new s.E(a),e.next=25,r.G.create({provider:c});case 25:d=e.sent,(h=n.split(".")).forEach((function(e){e in d&&(d=d[e])})),e.t1=h[0],e.next="consts"===e.t1?31:"query"===e.t1?33:38;break;case 31:return l=d.toString(),e.abrupt("break",39);case 33:return e.next=35,d();case 35:return l=(l=e.sent).toString(),e.abrupt("break",39);case 38:console.log("Unknown path prefix ("+h[0]+") in "+n);case 39:return e.abrupt("return",l);case 40:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function h(e,t,n,i){switch(t){case"humanReadable":(0,l.HumanReadable)(e,n,i);break;case"precise":(0,l.Precise)(e,n,i);break;case"blocksToDays":(0,l.BlocksToDays)(e,i);break;case"erasToDays":(0,l.ErasToDays)(e,i,n);break;case"percentage":(0,l.Percentage)(e,i);break;case"permillToPercent":(0,l.PermillToPercent)(e,i);break;case"arrayLength":(0,l.ArrayLength)(e,i);break;default:return void console.log("Ignoring unknown filter type")}}const u=function(e){var t=e.network,n=e.path,s=e.defaultValue,r=e.filter,l=void 0===r?void 0:r,d=(0,a.useState)(""),u=d[0],p=d[1];return t=t.toLowerCase(),(0,a.useEffect)((function(){void 0!==l?h(s.toString(),l,t,p):p(s.toString());var e=void 0;switch(t){case"polkadot":e="wss://rpc.polkadot.io";break;case"kusama":e="wss://kusama-rpc.polkadot.io/";break;case"statemine":e="wss://kusama-asset-hub-rpc.polkadot.io/";break;case"statemint":e="wss://polkadot-asset-hub-rpc.polkadot.io/";break;case"kusamapeople":e="wss://kusama-people-rpc.polkadot.io";break;case"polkadotpeople":e="wss://polkadot-people-rpc.polkadot.io";break;default:console.log("Unknown network provided, "+t)}if(void 0===e)console.log("Failed to connect to a valid websocket, applying default");else{var a=function(){var e=(0,o.A)((0,i.A)().mark((function e(){var o;return(0,i.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,c(t,n,p);case 2:if(void 0!==(o=e.sent)){e.next=7;break}return e.abrupt("return");case 7:void 0!==l?h(o,l,t,p):p(o);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();try{a()}catch(r){console.log(r)}}}),[]),u}},11135:e=>{var t="polkadot",n="kusama",i="statemine",o="statemint",a="polkadotpeople",s="kusamapeople",r={polkadot:{precision:1e10,symbol:"DOT"},kusama:{precision:1e12,symbol:"KSM"},statemint:{precision:1e10,symbol:"DOT"},statemine:{precision:1e12,symbol:"KSM"},polkadotpeople:{precision:1e10,symbol:"DOT"},kusamapeople:{precision:1e12,symbol:"KSM"}};e.exports={HumanReadable:function(e,l,c){var d=void 0;if(l===t||l===o)d=3;else if(l===n||l===i||l===a)d=6;else{if(l!=s)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");d=8}e=parseFloat(e),c((e=Number.isInteger(e/r[l].precision)?e/r[l].precision+" "+r[l].symbol:(e/r[l].precision).toFixed(d)+" "+r[l].symbol).toString())},Precise:function(e,t,n){n(e=(e=parseFloat(e))/r[t].precision+" "+r[t].symbol)},BlocksToDays:function(e,t){t((e=6*e/86400).toString())},ErasToDays:function(e,r,l){var c=void 0;if(l===t||l===o||l==a)c=1;else{if(l!==n&&l!==i&&l!=s)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");c=4}r((e/=c).toString())},Percentage:function(e,t){t((e/=1e7).toString())},PermillToPercent:function(e,t){t((e/=1e4).toString())},ArrayLength:function(e,t){t((e=e.split(",").length).toString())}}},32226:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});const i=n.p+"assets/images/staking-keys-stash-proxy-503c2b8b6c40b269a16576dd7fe805b8.png"},47790:()=>{}}]); \ No newline at end of file diff --git a/assets/js/7032.96562fc2.js b/assets/js/7032.96562fc2.js new file mode 100644 index 000000000000..04977158c8fe --- /dev/null +++ b/assets/js/7032.96562fc2.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7032],{39676:(t,e,a)=>{a.d(e,{m:()=>s});var r=a(45567),s=class{constructor(t){this.init=t,this.records=this.init()}static{(0,r.K2)(this,"ImperativeState")}reset(){this.records=this.init()}}},59347:(t,e,a)=>{a.d(e,{CP:()=>l,HT:()=>h,PB:()=>d,aC:()=>c,lC:()=>n,m:()=>o,tk:()=>i});var r=a(45567),s=a(16750),i=(0,r.K2)(((t,e)=>{const a=t.append("rect");if(a.attr("x",e.x),a.attr("y",e.y),a.attr("fill",e.fill),a.attr("stroke",e.stroke),a.attr("width",e.width),a.attr("height",e.height),e.name&&a.attr("name",e.name),e.rx&&a.attr("rx",e.rx),e.ry&&a.attr("ry",e.ry),void 0!==e.attrs)for(const r in e.attrs)a.attr(r,e.attrs[r]);return e.class&&a.attr("class",e.class),a}),"drawRect"),n=(0,r.K2)(((t,e)=>{const a={x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"};i(t,a).lower()}),"drawBackgroundRect"),o=(0,r.K2)(((t,e)=>{const a=e.text.replace(r.H1," "),s=t.append("text");s.attr("x",e.x),s.attr("y",e.y),s.attr("class","legend"),s.style("text-anchor",e.anchor),e.class&&s.attr("class",e.class);const i=s.append("tspan");return i.attr("x",e.x+2*e.textMargin),i.text(a),s}),"drawText"),c=(0,r.K2)(((t,e,a,r)=>{const i=t.append("image");i.attr("x",e),i.attr("y",a);const n=(0,s.J)(r);i.attr("xlink:href",n)}),"drawImage"),l=(0,r.K2)(((t,e,a,r)=>{const i=t.append("use");i.attr("x",e),i.attr("y",a);const n=(0,s.J)(r);i.attr("xlink:href",`#${n}`)}),"drawEmbeddedImage"),d=(0,r.K2)((()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0})),"getNoteRect"),h=(0,r.K2)((()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0})),"getTextObj")},7032:(t,e,a)=>{a.d(e,{diagram:()=>Ut});var r=a(59347),s=a(39676),i=a(85039),n=a(45567),o=a(20007),c=a(16750),l=function(){var t=(0,n.K2)((function(t,e,a,r){for(a=a||{},r=t.length;r--;a[t[r]]=e);return a}),"o"),e=[1,2],a=[1,3],r=[1,4],s=[2,4],i=[1,9],o=[1,11],c=[1,13],l=[1,14],d=[1,16],h=[1,17],p=[1,18],g=[1,24],u=[1,25],x=[1,26],y=[1,27],m=[1,28],b=[1,29],T=[1,30],f=[1,31],E=[1,32],w=[1,33],I=[1,34],L=[1,35],_=[1,36],P=[1,37],k=[1,38],A=[1,39],v=[1,41],N=[1,42],M=[1,43],D=[1,44],O=[1,45],S=[1,46],K=[1,4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,48,49,50,52,53,54,59,60,61,62,70],R=[4,5,16,50,52,53],Y=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,54,59,60,61,62,70],C=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,49,50,52,53,54,59,60,61,62,70],B=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,48,50,52,53,54,59,60,61,62,70],$=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,50,52,53,54,59,60,61,62,70],V=[68,69,70],F=[1,122],W={trace:(0,n.K2)((function(){}),"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,box_section:10,box_line:11,participant_statement:12,create:13,box:14,restOfLine:15,end:16,signal:17,autonumber:18,NUM:19,off:20,activate:21,actor:22,deactivate:23,note_statement:24,links_statement:25,link_statement:26,properties_statement:27,details_statement:28,title:29,legacy_title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,loop:36,rect:37,opt:38,alt:39,else_sections:40,par:41,par_sections:42,par_over:43,critical:44,option_sections:45,break:46,option:47,and:48,else:49,participant:50,AS:51,participant_actor:52,destroy:53,note:54,placement:55,text2:56,over:57,actor_pair:58,links:59,link:60,properties:61,details:62,spaceList:63,",":64,left_of:65,right_of:66,signaltype:67,"+":68,"-":69,ACTOR:70,SOLID_OPEN_ARROW:71,DOTTED_OPEN_ARROW:72,SOLID_ARROW:73,BIDIRECTIONAL_SOLID_ARROW:74,DOTTED_ARROW:75,BIDIRECTIONAL_DOTTED_ARROW:76,SOLID_CROSS:77,DOTTED_CROSS:78,SOLID_POINT:79,DOTTED_POINT:80,TXT:81,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",13:"create",14:"box",15:"restOfLine",16:"end",18:"autonumber",19:"NUM",20:"off",21:"activate",23:"deactivate",29:"title",30:"legacy_title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"loop",37:"rect",38:"opt",39:"alt",41:"par",43:"par_over",44:"critical",46:"break",47:"option",48:"and",49:"else",50:"participant",51:"AS",52:"participant_actor",53:"destroy",54:"note",57:"over",59:"links",60:"link",61:"properties",62:"details",64:",",65:"left_of",66:"right_of",68:"+",69:"-",70:"ACTOR",71:"SOLID_OPEN_ARROW",72:"DOTTED_OPEN_ARROW",73:"SOLID_ARROW",74:"BIDIRECTIONAL_SOLID_ARROW",75:"DOTTED_ARROW",76:"BIDIRECTIONAL_DOTTED_ARROW",77:"SOLID_CROSS",78:"DOTTED_CROSS",79:"SOLID_POINT",80:"DOTTED_POINT",81:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[10,0],[10,2],[11,2],[11,1],[11,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[45,1],[45,4],[42,1],[42,4],[40,1],[40,4],[12,5],[12,3],[12,5],[12,3],[12,3],[24,4],[24,4],[25,3],[26,3],[27,3],[28,3],[63,2],[63,1],[58,3],[58,1],[55,1],[55,1],[17,5],[17,5],[17,4],[22,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[56,1]],performAction:(0,n.K2)((function(t,e,a,r,s,i,n){var o=i.length-1;switch(s){case 3:return r.apply(i[o]),i[o];case 4:case 9:case 8:case 13:this.$=[];break;case 5:case 10:i[o-1].push(i[o]),this.$=i[o-1];break;case 6:case 7:case 11:case 12:case 62:this.$=i[o];break;case 15:i[o].type="createParticipant",this.$=i[o];break;case 16:i[o-1].unshift({type:"boxStart",boxData:r.parseBoxData(i[o-2])}),i[o-1].push({type:"boxEnd",boxText:i[o-2]}),this.$=i[o-1];break;case 18:this.$={type:"sequenceIndex",sequenceIndex:Number(i[o-2]),sequenceIndexStep:Number(i[o-1]),sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(i[o-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:r.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"activeStart",signalType:r.LINETYPE.ACTIVE_START,actor:i[o-1].actor};break;case 23:this.$={type:"activeEnd",signalType:r.LINETYPE.ACTIVE_END,actor:i[o-1].actor};break;case 29:r.setDiagramTitle(i[o].substring(6)),this.$=i[o].substring(6);break;case 30:r.setDiagramTitle(i[o].substring(7)),this.$=i[o].substring(7);break;case 31:this.$=i[o].trim(),r.setAccTitle(this.$);break;case 32:case 33:this.$=i[o].trim(),r.setAccDescription(this.$);break;case 34:i[o-1].unshift({type:"loopStart",loopText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.LOOP_START}),i[o-1].push({type:"loopEnd",loopText:i[o-2],signalType:r.LINETYPE.LOOP_END}),this.$=i[o-1];break;case 35:i[o-1].unshift({type:"rectStart",color:r.parseMessage(i[o-2]),signalType:r.LINETYPE.RECT_START}),i[o-1].push({type:"rectEnd",color:r.parseMessage(i[o-2]),signalType:r.LINETYPE.RECT_END}),this.$=i[o-1];break;case 36:i[o-1].unshift({type:"optStart",optText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.OPT_START}),i[o-1].push({type:"optEnd",optText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.OPT_END}),this.$=i[o-1];break;case 37:i[o-1].unshift({type:"altStart",altText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.ALT_START}),i[o-1].push({type:"altEnd",signalType:r.LINETYPE.ALT_END}),this.$=i[o-1];break;case 38:i[o-1].unshift({type:"parStart",parText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.PAR_START}),i[o-1].push({type:"parEnd",signalType:r.LINETYPE.PAR_END}),this.$=i[o-1];break;case 39:i[o-1].unshift({type:"parStart",parText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.PAR_OVER_START}),i[o-1].push({type:"parEnd",signalType:r.LINETYPE.PAR_END}),this.$=i[o-1];break;case 40:i[o-1].unshift({type:"criticalStart",criticalText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.CRITICAL_START}),i[o-1].push({type:"criticalEnd",signalType:r.LINETYPE.CRITICAL_END}),this.$=i[o-1];break;case 41:i[o-1].unshift({type:"breakStart",breakText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.BREAK_START}),i[o-1].push({type:"breakEnd",optText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.BREAK_END}),this.$=i[o-1];break;case 43:this.$=i[o-3].concat([{type:"option",optionText:r.parseMessage(i[o-1]),signalType:r.LINETYPE.CRITICAL_OPTION},i[o]]);break;case 45:this.$=i[o-3].concat([{type:"and",parText:r.parseMessage(i[o-1]),signalType:r.LINETYPE.PAR_AND},i[o]]);break;case 47:this.$=i[o-3].concat([{type:"else",altText:r.parseMessage(i[o-1]),signalType:r.LINETYPE.ALT_ELSE},i[o]]);break;case 48:i[o-3].draw="participant",i[o-3].type="addParticipant",i[o-3].description=r.parseMessage(i[o-1]),this.$=i[o-3];break;case 49:i[o-1].draw="participant",i[o-1].type="addParticipant",this.$=i[o-1];break;case 50:i[o-3].draw="actor",i[o-3].type="addParticipant",i[o-3].description=r.parseMessage(i[o-1]),this.$=i[o-3];break;case 51:i[o-1].draw="actor",i[o-1].type="addParticipant",this.$=i[o-1];break;case 52:i[o-1].type="destroyParticipant",this.$=i[o-1];break;case 53:this.$=[i[o-1],{type:"addNote",placement:i[o-2],actor:i[o-1].actor,text:i[o]}];break;case 54:i[o-2]=[].concat(i[o-1],i[o-1]).slice(0,2),i[o-2][0]=i[o-2][0].actor,i[o-2][1]=i[o-2][1].actor,this.$=[i[o-1],{type:"addNote",placement:r.PLACEMENT.OVER,actor:i[o-2].slice(0,2),text:i[o]}];break;case 55:this.$=[i[o-1],{type:"addLinks",actor:i[o-1].actor,text:i[o]}];break;case 56:this.$=[i[o-1],{type:"addALink",actor:i[o-1].actor,text:i[o]}];break;case 57:this.$=[i[o-1],{type:"addProperties",actor:i[o-1].actor,text:i[o]}];break;case 58:this.$=[i[o-1],{type:"addDetails",actor:i[o-1].actor,text:i[o]}];break;case 61:this.$=[i[o-2],i[o]];break;case 63:this.$=r.PLACEMENT.LEFTOF;break;case 64:this.$=r.PLACEMENT.RIGHTOF;break;case 65:this.$=[i[o-4],i[o-1],{type:"addMessage",from:i[o-4].actor,to:i[o-1].actor,signalType:i[o-3],msg:i[o],activate:!0},{type:"activeStart",signalType:r.LINETYPE.ACTIVE_START,actor:i[o-1].actor}];break;case 66:this.$=[i[o-4],i[o-1],{type:"addMessage",from:i[o-4].actor,to:i[o-1].actor,signalType:i[o-3],msg:i[o]},{type:"activeEnd",signalType:r.LINETYPE.ACTIVE_END,actor:i[o-4].actor}];break;case 67:this.$=[i[o-3],i[o-1],{type:"addMessage",from:i[o-3].actor,to:i[o-1].actor,signalType:i[o-2],msg:i[o]}];break;case 68:this.$={type:"addParticipant",actor:i[o]};break;case 69:this.$=r.LINETYPE.SOLID_OPEN;break;case 70:this.$=r.LINETYPE.DOTTED_OPEN;break;case 71:this.$=r.LINETYPE.SOLID;break;case 72:this.$=r.LINETYPE.BIDIRECTIONAL_SOLID;break;case 73:this.$=r.LINETYPE.DOTTED;break;case 74:this.$=r.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 75:this.$=r.LINETYPE.SOLID_CROSS;break;case 76:this.$=r.LINETYPE.DOTTED_CROSS;break;case 77:this.$=r.LINETYPE.SOLID_POINT;break;case 78:this.$=r.LINETYPE.DOTTED_POINT;break;case 79:this.$=r.parseMessage(i[o].trim().substring(1))}}),"anonymous"),table:[{3:1,4:e,5:a,6:r},{1:[3]},{3:5,4:e,5:a,6:r},{3:6,4:e,5:a,6:r},t([1,4,5,13,14,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,54,59,60,61,62,70],s,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:i,5:o,8:8,9:10,12:12,13:c,14:l,17:15,18:d,21:h,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:f,39:E,41:w,43:I,44:L,46:_,50:P,52:k,53:A,54:v,59:N,60:M,61:D,62:O,70:S},t(K,[2,5]),{9:47,12:12,13:c,14:l,17:15,18:d,21:h,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:f,39:E,41:w,43:I,44:L,46:_,50:P,52:k,53:A,54:v,59:N,60:M,61:D,62:O,70:S},t(K,[2,7]),t(K,[2,8]),t(K,[2,14]),{12:48,50:P,52:k,53:A},{15:[1,49]},{5:[1,50]},{5:[1,53],19:[1,51],20:[1,52]},{22:54,70:S},{22:55,70:S},{5:[1,56]},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},t(K,[2,29]),t(K,[2,30]),{32:[1,61]},{34:[1,62]},t(K,[2,33]),{15:[1,63]},{15:[1,64]},{15:[1,65]},{15:[1,66]},{15:[1,67]},{15:[1,68]},{15:[1,69]},{15:[1,70]},{22:71,70:S},{22:72,70:S},{22:73,70:S},{67:74,71:[1,75],72:[1,76],73:[1,77],74:[1,78],75:[1,79],76:[1,80],77:[1,81],78:[1,82],79:[1,83],80:[1,84]},{55:85,57:[1,86],65:[1,87],66:[1,88]},{22:89,70:S},{22:90,70:S},{22:91,70:S},{22:92,70:S},t([5,51,64,71,72,73,74,75,76,77,78,79,80,81],[2,68]),t(K,[2,6]),t(K,[2,15]),t(R,[2,9],{10:93}),t(K,[2,17]),{5:[1,95],19:[1,94]},{5:[1,96]},t(K,[2,21]),{5:[1,97]},{5:[1,98]},t(K,[2,24]),t(K,[2,25]),t(K,[2,26]),t(K,[2,27]),t(K,[2,28]),t(K,[2,31]),t(K,[2,32]),t(Y,s,{7:99}),t(Y,s,{7:100}),t(Y,s,{7:101}),t(C,s,{40:102,7:103}),t(B,s,{42:104,7:105}),t(B,s,{7:105,42:106}),t($,s,{45:107,7:108}),t(Y,s,{7:109}),{5:[1,111],51:[1,110]},{5:[1,113],51:[1,112]},{5:[1,114]},{22:117,68:[1,115],69:[1,116],70:S},t(V,[2,69]),t(V,[2,70]),t(V,[2,71]),t(V,[2,72]),t(V,[2,73]),t(V,[2,74]),t(V,[2,75]),t(V,[2,76]),t(V,[2,77]),t(V,[2,78]),{22:118,70:S},{22:120,58:119,70:S},{70:[2,63]},{70:[2,64]},{56:121,81:F},{56:123,81:F},{56:124,81:F},{56:125,81:F},{4:[1,128],5:[1,130],11:127,12:129,16:[1,126],50:P,52:k,53:A},{5:[1,131]},t(K,[2,19]),t(K,[2,20]),t(K,[2,22]),t(K,[2,23]),{4:i,5:o,8:8,9:10,12:12,13:c,14:l,16:[1,132],17:15,18:d,21:h,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:f,39:E,41:w,43:I,44:L,46:_,50:P,52:k,53:A,54:v,59:N,60:M,61:D,62:O,70:S},{4:i,5:o,8:8,9:10,12:12,13:c,14:l,16:[1,133],17:15,18:d,21:h,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:f,39:E,41:w,43:I,44:L,46:_,50:P,52:k,53:A,54:v,59:N,60:M,61:D,62:O,70:S},{4:i,5:o,8:8,9:10,12:12,13:c,14:l,16:[1,134],17:15,18:d,21:h,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:f,39:E,41:w,43:I,44:L,46:_,50:P,52:k,53:A,54:v,59:N,60:M,61:D,62:O,70:S},{16:[1,135]},{4:i,5:o,8:8,9:10,12:12,13:c,14:l,16:[2,46],17:15,18:d,21:h,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:f,39:E,41:w,43:I,44:L,46:_,49:[1,136],50:P,52:k,53:A,54:v,59:N,60:M,61:D,62:O,70:S},{16:[1,137]},{4:i,5:o,8:8,9:10,12:12,13:c,14:l,16:[2,44],17:15,18:d,21:h,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:f,39:E,41:w,43:I,44:L,46:_,48:[1,138],50:P,52:k,53:A,54:v,59:N,60:M,61:D,62:O,70:S},{16:[1,139]},{16:[1,140]},{4:i,5:o,8:8,9:10,12:12,13:c,14:l,16:[2,42],17:15,18:d,21:h,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:f,39:E,41:w,43:I,44:L,46:_,47:[1,141],50:P,52:k,53:A,54:v,59:N,60:M,61:D,62:O,70:S},{4:i,5:o,8:8,9:10,12:12,13:c,14:l,16:[1,142],17:15,18:d,21:h,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:f,39:E,41:w,43:I,44:L,46:_,50:P,52:k,53:A,54:v,59:N,60:M,61:D,62:O,70:S},{15:[1,143]},t(K,[2,49]),{15:[1,144]},t(K,[2,51]),t(K,[2,52]),{22:145,70:S},{22:146,70:S},{56:147,81:F},{56:148,81:F},{56:149,81:F},{64:[1,150],81:[2,62]},{5:[2,55]},{5:[2,79]},{5:[2,56]},{5:[2,57]},{5:[2,58]},t(K,[2,16]),t(R,[2,10]),{12:151,50:P,52:k,53:A},t(R,[2,12]),t(R,[2,13]),t(K,[2,18]),t(K,[2,34]),t(K,[2,35]),t(K,[2,36]),t(K,[2,37]),{15:[1,152]},t(K,[2,38]),{15:[1,153]},t(K,[2,39]),t(K,[2,40]),{15:[1,154]},t(K,[2,41]),{5:[1,155]},{5:[1,156]},{56:157,81:F},{56:158,81:F},{5:[2,67]},{5:[2,53]},{5:[2,54]},{22:159,70:S},t(R,[2,11]),t(C,s,{7:103,40:160}),t(B,s,{7:105,42:161}),t($,s,{7:108,45:162}),t(K,[2,48]),t(K,[2,50]),{5:[2,65]},{5:[2,66]},{81:[2,61]},{16:[2,47]},{16:[2,45]},{16:[2,43]}],defaultActions:{5:[2,1],6:[2,2],87:[2,63],88:[2,64],121:[2,55],122:[2,79],123:[2,56],124:[2,57],125:[2,58],147:[2,67],148:[2,53],149:[2,54],157:[2,65],158:[2,66],159:[2,61],160:[2,47],161:[2,45],162:[2,43]},parseError:(0,n.K2)((function(t,e){if(!e.recoverable){var a=new Error(t);throw a.hash=e,a}this.trace(t)}),"parseError"),parse:(0,n.K2)((function(t){var e=this,a=[0],r=[],s=[null],i=[],o=this.table,c="",l=0,d=0,h=0,p=i.slice.call(arguments,1),g=Object.create(this.lexer),u={yy:{}};for(var x in this.yy)Object.prototype.hasOwnProperty.call(this.yy,x)&&(u.yy[x]=this.yy[x]);g.setInput(t,u.yy),u.yy.lexer=g,u.yy.parser=this,void 0===g.yylloc&&(g.yylloc={});var y=g.yylloc;i.push(y);var m=g.options&&g.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||g.lex()||1)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof u.yy.parseError?this.parseError=u.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,n.K2)((function(t){a.length=a.length-2*t,s.length=s.length-t,i.length=i.length-t}),"popStack"),(0,n.K2)(b,"lex");for(var T,f,E,w,I,L,_,P,k,A={};;){if(E=a[a.length-1],this.defaultActions[E]?w=this.defaultActions[E]:(null==T&&(T=b()),w=o[E]&&o[E][T]),void 0===w||!w.length||!w[0]){var v="";for(L in k=[],o[E])this.terminals_[L]&&L>2&&k.push("'"+this.terminals_[L]+"'");v=g.showPosition?"Parse error on line "+(l+1)+":\n"+g.showPosition()+"\nExpecting "+k.join(", ")+", got '"+(this.terminals_[T]||T)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==T?"end of input":"'"+(this.terminals_[T]||T)+"'"),this.parseError(v,{text:g.match,token:this.terminals_[T]||T,line:g.yylineno,loc:y,expected:k})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+E+", token: "+T);switch(w[0]){case 1:a.push(T),s.push(g.yytext),i.push(g.yylloc),a.push(w[1]),T=null,f?(T=f,f=null):(d=g.yyleng,c=g.yytext,l=g.yylineno,y=g.yylloc,h>0&&h--);break;case 2:if(_=this.productions_[w[1]][1],A.$=s[s.length-_],A._$={first_line:i[i.length-(_||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(_||1)].first_column,last_column:i[i.length-1].last_column},m&&(A._$.range=[i[i.length-(_||1)].range[0],i[i.length-1].range[1]]),void 0!==(I=this.performAction.apply(A,[c,d,l,u.yy,w[1],s,i].concat(p))))return I;_&&(a=a.slice(0,-1*_*2),s=s.slice(0,-1*_),i=i.slice(0,-1*_)),a.push(this.productions_[w[1]][0]),s.push(A.$),i.push(A._$),P=o[a[a.length-2]][a[a.length-1]],a.push(P);break;case 3:return!0}}return!0}),"parse")},q=function(){return{EOF:1,parseError:(0,n.K2)((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:(0,n.K2)((function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this}),"setInput"),input:(0,n.K2)((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t}),"input"),unput:(0,n.K2)((function(t){var e=t.length,a=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),a.length-1&&(this.yylineno-=a.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:a?(a.length===r.length?this.yylloc.first_column:0)+r[r.length-a.length].length-a[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"unput"),more:(0,n.K2)((function(){return this._more=!0,this}),"more"),reject:(0,n.K2)((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:(0,n.K2)((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:(0,n.K2)((function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:(0,n.K2)((function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:(0,n.K2)((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:(0,n.K2)((function(t,e){var a,r,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],a=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a)return a;if(this._backtrack){for(var i in s)this[i]=s[i];return!1}return!1}),"test_match"),next:(0,n.K2)((function(){if(this.done)return this.EOF;var t,e,a,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),i=0;ie[0].length)){if(e=a,r=i,this.options.backtrack_lexer){if(!1!==(t=this.test_match(a,s[i])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:(0,n.K2)((function(){var t=this.next();return t||this.lex()}),"lex"),begin:(0,n.K2)((function(t){this.conditionStack.push(t)}),"begin"),popState:(0,n.K2)((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:(0,n.K2)((function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules}),"_currentRules"),topState:(0,n.K2)((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:(0,n.K2)((function(t){this.begin(t)}),"pushState"),stateStackSize:(0,n.K2)((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,n.K2)((function(t,e,a,r){switch(a){case 0:case 51:case 66:return 5;case 1:case 2:case 3:case 4:case 5:break;case 6:return 19;case 7:return this.begin("LINE"),14;case 8:return this.begin("ID"),50;case 9:return this.begin("ID"),52;case 10:return 13;case 11:return this.begin("ID"),53;case 12:return e.yytext=e.yytext.trim(),this.begin("ALIAS"),70;case 13:return this.popState(),this.popState(),this.begin("LINE"),51;case 14:return this.popState(),this.popState(),5;case 15:return this.begin("LINE"),36;case 16:return this.begin("LINE"),37;case 17:return this.begin("LINE"),38;case 18:return this.begin("LINE"),39;case 19:return this.begin("LINE"),49;case 20:return this.begin("LINE"),41;case 21:return this.begin("LINE"),43;case 22:return this.begin("LINE"),48;case 23:return this.begin("LINE"),44;case 24:return this.begin("LINE"),47;case 25:return this.begin("LINE"),46;case 26:return this.popState(),15;case 27:return 16;case 28:return 65;case 29:return 66;case 30:return 59;case 31:return 60;case 32:return 61;case 33:return 62;case 34:return 57;case 35:return 54;case 36:return this.begin("ID"),21;case 37:return this.begin("ID"),23;case 38:return 29;case 39:return 30;case 40:return this.begin("acc_title"),31;case 41:return this.popState(),"acc_title_value";case 42:return this.begin("acc_descr"),33;case 43:return this.popState(),"acc_descr_value";case 44:this.begin("acc_descr_multiline");break;case 45:this.popState();break;case 46:return"acc_descr_multiline_value";case 47:return 6;case 48:return 18;case 49:return 20;case 50:return 64;case 52:return e.yytext=e.yytext.trim(),70;case 53:return 73;case 54:return 74;case 55:return 75;case 56:return 76;case 57:return 71;case 58:return 72;case 59:return 77;case 60:return 78;case 61:return 79;case 62:return 80;case 63:return 81;case 64:return 68;case 65:return 69;case 67:return"INVALID"}}),"anonymous"),rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[0-9]+(?=[ \n]+))/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:create\b)/i,/^(?:destroy\b)/i,/^(?:[^\<->\->:\n,;]+?([\-]*[^\<->\->:\n,;]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:par_over\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\+\<->\->:\n,;]+((?!(-x|--x|-\)|--\)))[\-]*[^\+\<->\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:<<->>)/i,/^(?:-->>)/i,/^(?:<<-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?::(?:(?:no)?wrap)?[^#\n;]+)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[45,46],inclusive:!1},acc_descr:{rules:[43],inclusive:!1},acc_title:{rules:[41],inclusive:!1},ID:{rules:[2,3,12],inclusive:!1},ALIAS:{rules:[2,3,13,14],inclusive:!1},LINE:{rules:[2,3,26],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,6,7,8,9,10,11,15,16,17,18,19,20,21,22,23,24,25,27,28,29,30,31,32,33,34,35,36,37,38,39,40,42,44,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67],inclusive:!0}}}}();function z(){this.yy={}}return W.lexer=q,(0,n.K2)(z,"Parser"),z.prototype=W,W.Parser=z,new z}();l.parser=l;var d=l,h=new s.m((()=>({prevActor:void 0,actors:new Map,createdActors:new Map,destroyedActors:new Map,boxes:[],messages:[],notes:[],sequenceNumbersEnabled:!1,wrapEnabled:void 0,currentBox:void 0,lastCreated:void 0,lastDestroyed:void 0}))),p=(0,n.K2)((function(t){h.records.boxes.push({name:t.text,wrap:t.wrap??M(),fill:t.color,actorKeys:[]}),h.records.currentBox=h.records.boxes.slice(-1)[0]}),"addBox"),g=(0,n.K2)((function(t,e,a,r){let s=h.records.currentBox;const i=h.records.actors.get(t);if(i){if(h.records.currentBox&&i.box&&h.records.currentBox!==i.box)throw new Error(`A same participant should only be defined in one Box: ${i.name} can't be in '${i.box.name}' and in '${h.records.currentBox.name}' at the same time.`);if(s=i.box?i.box:h.records.currentBox,i.box=s,i&&e===i.name&&null==a)return}if(null==a?.text&&(a={text:e,type:r}),null!=r&&null!=a.text||(a={text:e,type:r}),h.records.actors.set(t,{box:s,name:e,description:a.text,wrap:a.wrap??M(),prevActor:h.records.prevActor,links:{},properties:{},actorCnt:null,rectData:null,type:r??"participant"}),h.records.prevActor){const e=h.records.actors.get(h.records.prevActor);e&&(e.nextActor=t)}h.records.currentBox&&h.records.currentBox.actorKeys.push(t),h.records.prevActor=t}),"addActor"),u=(0,n.K2)((t=>{let e,a=0;if(!t)return 0;for(e=0;e>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},e}}return h.records.messages.push({from:t,to:e,message:a?.text??"",wrap:a?.wrap??M(),type:r,activate:s}),!0}),"addSignal"),m=(0,n.K2)((function(){return h.records.boxes.length>0}),"hasAtLeastOneBox"),b=(0,n.K2)((function(){return h.records.boxes.some((t=>t.name))}),"hasAtLeastOneBoxWithTitle"),T=(0,n.K2)((function(){return h.records.messages}),"getMessages"),f=(0,n.K2)((function(){return h.records.boxes}),"getBoxes"),E=(0,n.K2)((function(){return h.records.actors}),"getActors"),w=(0,n.K2)((function(){return h.records.createdActors}),"getCreatedActors"),I=(0,n.K2)((function(){return h.records.destroyedActors}),"getDestroyedActors"),L=(0,n.K2)((function(t){return h.records.actors.get(t)}),"getActor"),_=(0,n.K2)((function(){return[...h.records.actors.keys()]}),"getActorKeys"),P=(0,n.K2)((function(){h.records.sequenceNumbersEnabled=!0}),"enableSequenceNumbers"),k=(0,n.K2)((function(){h.records.sequenceNumbersEnabled=!1}),"disableSequenceNumbers"),A=(0,n.K2)((()=>h.records.sequenceNumbersEnabled),"showSequenceNumbers"),v=(0,n.K2)((function(t){h.records.wrapEnabled=t}),"setWrap"),N=(0,n.K2)((t=>{if(void 0===t)return{};t=t.trim();const e=null!==/^:?wrap:/.exec(t)||null===/^:?nowrap:/.exec(t)&&void 0;return{cleanedText:(void 0===e?t:t.replace(/^:?(?:no)?wrap:/,"")).trim(),wrap:e}}),"extractWrap"),M=(0,n.K2)((()=>void 0!==h.records.wrapEnabled?h.records.wrapEnabled:(0,n.D7)().sequence?.wrap??!1),"autoWrap"),D=(0,n.K2)((function(){h.reset(),(0,n.IU)()}),"clear"),O=(0,n.K2)((function(t){const e=t.trim(),{wrap:a,cleanedText:r}=N(e),s={text:r,wrap:a};return n.Rm.debug(`parseMessage: ${JSON.stringify(s)}`),s}),"parseMessage"),S=(0,n.K2)((function(t){const e=/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(t);let a=e?.[1]?e[1].trim():"transparent",r=e?.[2]?e[2].trim():void 0;if(window?.CSS)window.CSS.supports("color",a)||(a="transparent",r=t.trim());else{const e=(new Option).style;e.color=a,e.color!==a&&(a="transparent",r=t.trim())}const{wrap:s,cleanedText:i}=N(r);return{text:i?(0,n.jZ)(i,(0,n.D7)()):void 0,color:a,wrap:s}}),"parseBoxData"),K={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25,AUTONUMBER:26,CRITICAL_START:27,CRITICAL_OPTION:28,CRITICAL_END:29,BREAK_START:30,BREAK_END:31,PAR_OVER_START:32,BIDIRECTIONAL_SOLID:33,BIDIRECTIONAL_DOTTED:34},R=(0,n.K2)((function(t,e,a){const r={actor:t,placement:e,message:a.text,wrap:a.wrap??M()},s=[].concat(t,t);h.records.notes.push(r),h.records.messages.push({from:s[0],to:s[1],message:a.text,wrap:a.wrap??M(),type:K.NOTE,placement:e})}),"addNote"),Y=(0,n.K2)((function(t,e){const a=L(t);try{let t=(0,n.jZ)(e.text,(0,n.D7)());t=t.replace(/&/g,"&"),t=t.replace(/=/g,"=");B(a,JSON.parse(t))}catch(r){n.Rm.error("error while parsing actor link text",r)}}),"addLinks"),C=(0,n.K2)((function(t,e){const a=L(t);try{const t={};let r=(0,n.jZ)(e.text,(0,n.D7)());const s=r.indexOf("@");r=r.replace(/&/g,"&"),r=r.replace(/=/g,"=");const i=r.slice(0,s-1).trim(),o=r.slice(s+1).trim();t[i]=o,B(a,t)}catch(r){n.Rm.error("error while parsing actor link text",r)}}),"addALink");function B(t,e){if(null==t.links)t.links=e;else for(const a in e)t.links[a]=e[a]}(0,n.K2)(B,"insertLinks");var $=(0,n.K2)((function(t,e){const a=L(t);try{const t=(0,n.jZ)(e.text,(0,n.D7)());V(a,JSON.parse(t))}catch(r){n.Rm.error("error while parsing actor properties text",r)}}),"addProperties");function V(t,e){if(null==t.properties)t.properties=e;else for(const a in e)t.properties[a]=e[a]}function F(){h.records.currentBox=void 0}(0,n.K2)(V,"insertProperties"),(0,n.K2)(F,"boxEnd");var W=(0,n.K2)((function(t,e){const a=L(t),r=document.getElementById(e.text);try{const t=r.innerHTML,e=JSON.parse(t);e.properties&&V(a,e.properties),e.links&&B(a,e.links)}catch(s){n.Rm.error("error while parsing actor details text",s)}}),"addDetails"),q=(0,n.K2)((function(t,e){if(void 0!==t?.properties)return t.properties[e]}),"getActorProperty"),z=(0,n.K2)((function(t){if(Array.isArray(t))t.forEach((function(t){z(t)}));else switch(t.type){case"sequenceIndex":h.records.messages.push({from:void 0,to:void 0,message:{start:t.sequenceIndex,step:t.sequenceIndexStep,visible:t.sequenceVisible},wrap:!1,type:t.signalType});break;case"addParticipant":g(t.actor,t.actor,t.description,t.draw);break;case"createParticipant":if(h.records.actors.has(t.actor))throw new Error("It is not possible to have actors with the same id, even if one is destroyed before the next is created. Use 'AS' aliases to simulate the behavior");h.records.lastCreated=t.actor,g(t.actor,t.actor,t.description,t.draw),h.records.createdActors.set(t.actor,h.records.messages.length);break;case"destroyParticipant":h.records.lastDestroyed=t.actor,h.records.destroyedActors.set(t.actor,h.records.messages.length);break;case"activeStart":case"activeEnd":y(t.actor,void 0,void 0,t.signalType);break;case"addNote":R(t.actor,t.placement,t.text);break;case"addLinks":Y(t.actor,t.text);break;case"addALink":C(t.actor,t.text);break;case"addProperties":$(t.actor,t.text);break;case"addDetails":W(t.actor,t.text);break;case"addMessage":if(h.records.lastCreated){if(t.to!==h.records.lastCreated)throw new Error("The created participant "+h.records.lastCreated.name+" does not have an associated creating message after its declaration. Please check the sequence diagram.");h.records.lastCreated=void 0}else if(h.records.lastDestroyed){if(t.to!==h.records.lastDestroyed&&t.from!==h.records.lastDestroyed)throw new Error("The destroyed participant "+h.records.lastDestroyed.name+" does not have an associated destroying message after its declaration. Please check the sequence diagram.");h.records.lastDestroyed=void 0}y(t.from,t.to,t.msg,t.signalType,t.activate);break;case"boxStart":p(t.boxData);break;case"boxEnd":F();break;case"loopStart":y(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":case"rectEnd":case"optEnd":case"altEnd":case"parEnd":case"criticalEnd":case"breakEnd":y(void 0,void 0,void 0,t.signalType);break;case"rectStart":y(void 0,void 0,t.color,t.signalType);break;case"optStart":y(void 0,void 0,t.optText,t.signalType);break;case"altStart":case"else":y(void 0,void 0,t.altText,t.signalType);break;case"setAccTitle":(0,n.SV)(t.text);break;case"parStart":case"and":y(void 0,void 0,t.parText,t.signalType);break;case"criticalStart":y(void 0,void 0,t.criticalText,t.signalType);break;case"option":y(void 0,void 0,t.optionText,t.signalType);break;case"breakStart":y(void 0,void 0,t.breakText,t.signalType)}}),"apply"),H={addActor:g,addMessage:x,addSignal:y,addLinks:Y,addDetails:W,addProperties:$,autoWrap:M,setWrap:v,enableSequenceNumbers:P,disableSequenceNumbers:k,showSequenceNumbers:A,getMessages:T,getActors:E,getCreatedActors:w,getDestroyedActors:I,getActor:L,getActorKeys:_,getActorProperty:q,getAccTitle:n.iN,getBoxes:f,getDiagramTitle:n.ab,setDiagramTitle:n.ke,getConfig:(0,n.K2)((()=>(0,n.D7)().sequence),"getConfig"),clear:D,parseMessage:O,parseBoxData:S,LINETYPE:K,ARROWTYPE:{FILLED:0,OPEN:1},PLACEMENT:{LEFTOF:0,RIGHTOF:1,OVER:2},addNote:R,setAccTitle:n.SV,apply:z,setAccDescription:n.EI,getAccDescription:n.m7,hasAtLeastOneBox:m,hasAtLeastOneBoxWithTitle:b},j=(0,n.K2)((t=>`.actor {\n stroke: ${t.actorBorder};\n fill: ${t.actorBkg};\n }\n\n text.actor > tspan {\n fill: ${t.actorTextColor};\n stroke: none;\n }\n\n .actor-line {\n stroke: ${t.actorLineColor};\n }\n\n .messageLine0 {\n stroke-width: 1.5;\n stroke-dasharray: none;\n stroke: ${t.signalColor};\n }\n\n .messageLine1 {\n stroke-width: 1.5;\n stroke-dasharray: 2, 2;\n stroke: ${t.signalColor};\n }\n\n #arrowhead path {\n fill: ${t.signalColor};\n stroke: ${t.signalColor};\n }\n\n .sequenceNumber {\n fill: ${t.sequenceNumberColor};\n }\n\n #sequencenumber {\n fill: ${t.signalColor};\n }\n\n #crosshead path {\n fill: ${t.signalColor};\n stroke: ${t.signalColor};\n }\n\n .messageText {\n fill: ${t.signalTextColor};\n stroke: none;\n }\n\n .labelBox {\n stroke: ${t.labelBoxBorderColor};\n fill: ${t.labelBoxBkgColor};\n }\n\n .labelText, .labelText > tspan {\n fill: ${t.labelTextColor};\n stroke: none;\n }\n\n .loopText, .loopText > tspan {\n fill: ${t.loopTextColor};\n stroke: none;\n }\n\n .loopLine {\n stroke-width: 2px;\n stroke-dasharray: 2, 2;\n stroke: ${t.labelBoxBorderColor};\n fill: ${t.labelBoxBorderColor};\n }\n\n .note {\n //stroke: #decc93;\n stroke: ${t.noteBorderColor};\n fill: ${t.noteBkgColor};\n }\n\n .noteText, .noteText > tspan {\n fill: ${t.noteTextColor};\n stroke: none;\n }\n\n .activation0 {\n fill: ${t.activationBkgColor};\n stroke: ${t.activationBorderColor};\n }\n\n .activation1 {\n fill: ${t.activationBkgColor};\n stroke: ${t.activationBorderColor};\n }\n\n .activation2 {\n fill: ${t.activationBkgColor};\n stroke: ${t.activationBorderColor};\n }\n\n .actorPopupMenu {\n position: absolute;\n }\n\n .actorPopupMenuPanel {\n position: absolute;\n fill: ${t.actorBkg};\n box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);\n filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));\n}\n .actor-man line {\n stroke: ${t.actorBorder};\n fill: ${t.actorBkg};\n }\n .actor-man circle, line {\n stroke: ${t.actorBorder};\n fill: ${t.actorBkg};\n stroke-width: 2px;\n }\n`),"getStyles"),U="actor-top",J="actor-bottom",X="actor-man",G=(0,n.K2)((function(t,e){return(0,r.tk)(t,e)}),"drawRect"),Z=(0,n.K2)((function(t,e,a,r,s){if(void 0===e.links||null===e.links||0===Object.keys(e.links).length)return{height:0,width:0};const i=e.links,n=e.actorCnt,o=e.rectData;var l="none";s&&(l="block !important");const d=t.append("g");d.attr("id","actor"+n+"_popup"),d.attr("class","actorPopupMenu"),d.attr("display",l);var h="";void 0!==o.class&&(h=" "+o.class);let p=o.width>a?o.width:a;const g=d.append("rect");if(g.attr("class","actorPopupMenuPanel"+h),g.attr("x",o.x),g.attr("y",o.height),g.attr("fill",o.fill),g.attr("stroke",o.stroke),g.attr("width",p),g.attr("height",o.height),g.attr("rx",o.rx),g.attr("ry",o.ry),null!=i){var u=20;for(let t in i){var x=d.append("a"),y=(0,c.J)(i[t]);x.attr("xlink:href",y),x.attr("target","_blank"),It(r)(t,x,o.x+10,o.height+u,p,20,{class:"actor"},r),u+=30}}return g.attr("height",u),{height:o.height+u,width:p}}),"drawPopup"),Q=(0,n.K2)((function(t){return"var pu = document.getElementById('"+t+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"}),"popupMenuToggle"),tt=(0,n.K2)((async function(t,e,a=null){let r=t.append("foreignObject");const s=await(0,n.VJ)(e.text,(0,n.zj)()),i=r.append("xhtml:div").attr("style","width: fit-content;").attr("xmlns","http://www.w3.org/1999/xhtml").html(s).node().getBoundingClientRect();if(r.attr("height",Math.round(i.height)).attr("width",Math.round(i.width)),"noteText"===e.class){const a=t.node().firstChild;a.setAttribute("height",i.height+2*e.textMargin);const s=a.getBBox();r.attr("x",Math.round(s.x+s.width/2-i.width/2)).attr("y",Math.round(s.y+s.height/2-i.height/2))}else if(a){let{startx:t,stopx:s,starty:n}=a;if(t>s){const e=t;t=s,s=e}r.attr("x",Math.round(t+Math.abs(t-s)/2-i.width/2)),"loopText"===e.class?r.attr("y",Math.round(n)):r.attr("y",Math.round(n-i.height))}return[r]}),"drawKatex"),et=(0,n.K2)((function(t,e){let a=0,r=0;const s=e.text.split(n.Y2.lineBreakRegex),[o,c]=(0,i.I5)(e.fontSize);let l=[],d=0,h=(0,n.K2)((()=>e.y),"yfunc");if(void 0!==e.valign&&void 0!==e.textMargin&&e.textMargin>0)switch(e.valign){case"top":case"start":h=(0,n.K2)((()=>Math.round(e.y+e.textMargin)),"yfunc");break;case"middle":case"center":h=(0,n.K2)((()=>Math.round(e.y+(a+r+e.textMargin)/2)),"yfunc");break;case"bottom":case"end":h=(0,n.K2)((()=>Math.round(e.y+(a+r+2*e.textMargin)-e.textMargin)),"yfunc")}if(void 0!==e.anchor&&void 0!==e.textMargin&&void 0!==e.width)switch(e.anchor){case"left":case"start":e.x=Math.round(e.x+e.textMargin),e.anchor="start",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"middle":case"center":e.x=Math.round(e.x+e.width/2),e.anchor="middle",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"right":case"end":e.x=Math.round(e.x+e.width-e.textMargin),e.anchor="end",e.dominantBaseline="middle",e.alignmentBaseline="middle"}for(let[n,p]of s.entries()){void 0!==e.textMargin&&0===e.textMargin&&void 0!==o&&(d=n*o);const s=t.append("text");s.attr("x",e.x),s.attr("y",h()),void 0!==e.anchor&&s.attr("text-anchor",e.anchor).attr("dominant-baseline",e.dominantBaseline).attr("alignment-baseline",e.alignmentBaseline),void 0!==e.fontFamily&&s.style("font-family",e.fontFamily),void 0!==c&&s.style("font-size",c),void 0!==e.fontWeight&&s.style("font-weight",e.fontWeight),void 0!==e.fill&&s.attr("fill",e.fill),void 0!==e.class&&s.attr("class",e.class),void 0!==e.dy?s.attr("dy",e.dy):0!==d&&s.attr("dy",d);const g=p||i.pe;if(e.tspan){const t=s.append("tspan");t.attr("x",e.x),void 0!==e.fill&&t.attr("fill",e.fill),t.text(g)}else s.text(g);void 0!==e.valign&&void 0!==e.textMargin&&e.textMargin>0&&(r+=(s._groups||s)[0][0].getBBox().height,a=r),l.push(s)}return l}),"drawText"),at=(0,n.K2)((function(t,e){function a(t,e,a,r,s){return t+","+e+" "+(t+a)+","+e+" "+(t+a)+","+(e+r-s)+" "+(t+a-1.2*s)+","+(e+r)+" "+t+","+(e+r)}(0,n.K2)(a,"genPoints");const r=t.append("polygon");return r.attr("points",a(e.x,e.y,e.width,e.height,7)),r.attr("class","labelBox"),e.y=e.y+e.height/2,et(t,e),r}),"drawLabel"),rt=-1,st=(0,n.K2)(((t,e,a,r)=>{t.select&&a.forEach((a=>{const s=e.get(a),i=t.select("#actor"+s.actorCnt);!r.mirrorActors&&s.stopy?i.attr("y2",s.stopy+s.height/2):r.mirrorActors&&i.attr("y2",s.stopy)}))}),"fixLifeLineHeights"),it=(0,n.K2)((function(t,e,a,s){const i=s?e.stopy:e.starty,o=e.x+e.width/2,c=i+e.height,l=t.append("g").lower();var d=l;s||(rt++,Object.keys(e.links||{}).length&&!a.forceMenus&&d.attr("onclick",Q(`actor${rt}_popup`)).attr("cursor","pointer"),d.append("line").attr("id","actor"+rt).attr("x1",o).attr("y1",c).attr("x2",o).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),d=l.append("g"),e.actorCnt=rt,null!=e.links&&d.attr("id","root-"+rt));const h=(0,r.PB)();var p="actor";e.properties?.class?p=e.properties.class:h.fill="#eaeaea",p+=s?` ${J}`:` ${U}`,h.x=e.x,h.y=i,h.width=e.width,h.height=e.height,h.class=p,h.rx=3,h.ry=3,h.name=e.name;const g=G(d,h);if(e.rectData=h,e.properties?.icon){const t=e.properties.icon.trim();"@"===t.charAt(0)?(0,r.CP)(d,h.x+h.width-20,h.y+10,t.substr(1)):(0,r.aC)(d,h.x+h.width-20,h.y+10,t)}wt(a,(0,n.Wi)(e.description))(e.description,d,h.x,h.y,h.width,h.height,{class:"actor actor-box"},a);let u=e.height;if(g.node){const t=g.node().getBBox();e.height=t.height,u=t.height}return u}),"drawActorTypeParticipant"),nt=(0,n.K2)((function(t,e,a,s){const i=s?e.stopy:e.starty,o=e.x+e.width/2,c=i+80,l=t.append("g").lower();s||(rt++,l.append("line").attr("id","actor"+rt).attr("x1",o).attr("y1",c).attr("x2",o).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),e.actorCnt=rt);const d=t.append("g");let h=X;h+=s?` ${J}`:` ${U}`,d.attr("class",h),d.attr("name",e.name);const p=(0,r.PB)();p.x=e.x,p.y=i,p.fill="#eaeaea",p.width=e.width,p.height=e.height,p.class="actor",p.rx=3,p.ry=3,d.append("line").attr("id","actor-man-torso"+rt).attr("x1",o).attr("y1",i+25).attr("x2",o).attr("y2",i+45),d.append("line").attr("id","actor-man-arms"+rt).attr("x1",o-18).attr("y1",i+33).attr("x2",o+18).attr("y2",i+33),d.append("line").attr("x1",o-18).attr("y1",i+60).attr("x2",o).attr("y2",i+45),d.append("line").attr("x1",o).attr("y1",i+45).attr("x2",o+18-2).attr("y2",i+60);const g=d.append("circle");g.attr("cx",e.x+e.width/2),g.attr("cy",i+10),g.attr("r",15),g.attr("width",e.width),g.attr("height",e.height);const u=d.node().getBBox();return e.height=u.height,wt(a,(0,n.Wi)(e.description))(e.description,d,p.x,p.y+35,p.width,p.height,{class:`actor ${X}`},a),e.height}),"drawActorTypeActor"),ot=(0,n.K2)((async function(t,e,a,r){switch(e.type){case"actor":return await nt(t,e,a,r);case"participant":return await it(t,e,a,r)}}),"drawActor"),ct=(0,n.K2)((function(t,e,a){const r=t.append("g");pt(r,e),e.name&&wt(a)(e.name,r,e.x,e.y+(e.textMaxHeight||0)/2,e.width,0,{class:"text"},a),r.lower()}),"drawBox"),lt=(0,n.K2)((function(t){return t.append("g")}),"anchorElement"),dt=(0,n.K2)((function(t,e,a,s,i){const n=(0,r.PB)(),o=e.anchored;n.x=e.startx,n.y=e.starty,n.class="activation"+i%3,n.width=e.stopx-e.startx,n.height=a-e.starty,G(o,n)}),"drawActivation"),ht=(0,n.K2)((async function(t,e,a,s){const{boxMargin:i,boxTextMargin:o,labelBoxHeight:c,labelBoxWidth:l,messageFontFamily:d,messageFontSize:h,messageFontWeight:p}=s,g=t.append("g"),u=(0,n.K2)((function(t,e,a,r){return g.append("line").attr("x1",t).attr("y1",e).attr("x2",a).attr("y2",r).attr("class","loopLine")}),"drawLoopLine");u(e.startx,e.starty,e.stopx,e.starty),u(e.stopx,e.starty,e.stopx,e.stopy),u(e.startx,e.stopy,e.stopx,e.stopy),u(e.startx,e.starty,e.startx,e.stopy),void 0!==e.sections&&e.sections.forEach((function(t){u(e.startx,t.y,e.stopx,t.y).style("stroke-dasharray","3, 3")}));let x=(0,r.HT)();x.text=a,x.x=e.startx,x.y=e.starty,x.fontFamily=d,x.fontSize=h,x.fontWeight=p,x.anchor="middle",x.valign="middle",x.tspan=!1,x.width=l||50,x.height=c||20,x.textMargin=o,x.class="labelText",at(g,x),x=ft(),x.text=e.title,x.x=e.startx+l/2+(e.stopx-e.startx)/2,x.y=e.starty+i+o,x.anchor="middle",x.valign="middle",x.textMargin=o,x.class="loopText",x.fontFamily=d,x.fontSize=h,x.fontWeight=p,x.wrap=!0;let y=(0,n.Wi)(x.text)?await tt(g,x,e):et(g,x);if(void 0!==e.sectionTitles)for(const[r,m]of Object.entries(e.sectionTitles))if(m.message){x.text=m.message,x.x=e.startx+(e.stopx-e.startx)/2,x.y=e.sections[r].y+i+o,x.class="loopText",x.anchor="middle",x.valign="middle",x.tspan=!1,x.fontFamily=d,x.fontSize=h,x.fontWeight=p,x.wrap=e.wrap,(0,n.Wi)(x.text)?(e.starty=e.sections[r].y,await tt(g,x,e)):et(g,x);let t=Math.round(y.map((t=>(t._groups||t)[0][0].getBBox().height)).reduce(((t,e)=>t+e)));e.sections[r].height+=t-(i+o)}return e.height=Math.round(e.stopy-e.starty),g}),"drawLoop"),pt=(0,n.K2)((function(t,e){(0,r.lC)(t,e)}),"drawBackgroundRect"),gt=(0,n.K2)((function(t){t.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")}),"insertDatabaseIcon"),ut=(0,n.K2)((function(t){t.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")}),"insertComputerIcon"),xt=(0,n.K2)((function(t){t.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")}),"insertClockIcon"),yt=(0,n.K2)((function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",7.9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M -1 0 L 10 5 L 0 10 z")}),"insertArrowHead"),mt=(0,n.K2)((function(t){t.append("defs").append("marker").attr("id","filled-head").attr("refX",15.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")}),"insertArrowFilledHead"),bt=(0,n.K2)((function(t){t.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)}),"insertSequenceNumber"),Tt=(0,n.K2)((function(t){t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",4).attr("refY",4.5).append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1pt").attr("d","M 1,2 L 6,7 M 6,2 L 1,7")}),"insertArrowCrossHead"),ft=(0,n.K2)((function(){return{x:0,y:0,fill:void 0,anchor:void 0,style:"#666",width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0}}),"getTextObj"),Et=(0,n.K2)((function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}}),"getNoteRect"),wt=function(){function t(t,e,a,r,i,n,o){s(e.append("text").attr("x",a+i/2).attr("y",r+n/2+5).style("text-anchor","middle").text(t),o)}function e(t,e,a,r,o,c,l,d){const{actorFontSize:h,actorFontFamily:p,actorFontWeight:g}=d,[u,x]=(0,i.I5)(h),y=t.split(n.Y2.lineBreakRegex);for(let i=0;it.height||0)))+(0===this.loops.length?0:this.loops.map((t=>t.height||0)).reduce(((t,e)=>t+e)))+(0===this.messages.length?0:this.messages.map((t=>t.height||0)).reduce(((t,e)=>t+e)))+(0===this.notes.length?0:this.notes.map((t=>t.height||0)).reduce(((t,e)=>t+e)))}),"getHeight"),clear:(0,n.K2)((function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]}),"clear"),addBox:(0,n.K2)((function(t){this.boxes.push(t)}),"addBox"),addActor:(0,n.K2)((function(t){this.actors.push(t)}),"addActor"),addLoop:(0,n.K2)((function(t){this.loops.push(t)}),"addLoop"),addMessage:(0,n.K2)((function(t){this.messages.push(t)}),"addMessage"),addNote:(0,n.K2)((function(t){this.notes.push(t)}),"addNote"),lastActor:(0,n.K2)((function(){return this.actors[this.actors.length-1]}),"lastActor"),lastLoop:(0,n.K2)((function(){return this.loops[this.loops.length-1]}),"lastLoop"),lastMessage:(0,n.K2)((function(){return this.messages[this.messages.length-1]}),"lastMessage"),lastNote:(0,n.K2)((function(){return this.notes[this.notes.length-1]}),"lastNote"),actors:[],boxes:[],loops:[],messages:[],notes:[]},init:(0,n.K2)((function(){this.sequenceItems=[],this.activations=[],this.models.clear(),this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0,Rt((0,n.D7)())}),"init"),updateVal:(0,n.K2)((function(t,e,a,r){void 0===t[e]?t[e]=a:t[e]=r(a,t[e])}),"updateVal"),updateBounds:(0,n.K2)((function(t,e,a,r){const s=this;let i=0;function o(o){return(0,n.K2)((function(n){i++;const c=s.sequenceItems.length-i+1;s.updateVal(n,"starty",e-c*_t.boxMargin,Math.min),s.updateVal(n,"stopy",r+c*_t.boxMargin,Math.max),s.updateVal(Pt.data,"startx",t-c*_t.boxMargin,Math.min),s.updateVal(Pt.data,"stopx",a+c*_t.boxMargin,Math.max),"activation"!==o&&(s.updateVal(n,"startx",t-c*_t.boxMargin,Math.min),s.updateVal(n,"stopx",a+c*_t.boxMargin,Math.max),s.updateVal(Pt.data,"starty",e-c*_t.boxMargin,Math.min),s.updateVal(Pt.data,"stopy",r+c*_t.boxMargin,Math.max))}),"updateItemBounds")}(0,n.K2)(o,"updateFn"),this.sequenceItems.forEach(o()),this.activations.forEach(o("activation"))}),"updateBounds"),insert:(0,n.K2)((function(t,e,a,r){const s=n.Y2.getMin(t,a),i=n.Y2.getMax(t,a),o=n.Y2.getMin(e,r),c=n.Y2.getMax(e,r);this.updateVal(Pt.data,"startx",s,Math.min),this.updateVal(Pt.data,"starty",o,Math.min),this.updateVal(Pt.data,"stopx",i,Math.max),this.updateVal(Pt.data,"stopy",c,Math.max),this.updateBounds(s,o,i,c)}),"insert"),newActivation:(0,n.K2)((function(t,e,a){const r=a.get(t.from),s=Yt(t.from).length||0,i=r.x+r.width/2+(s-1)*_t.activationWidth/2;this.activations.push({startx:i,starty:this.verticalPos+2,stopx:i+_t.activationWidth,stopy:void 0,actor:t.from,anchored:Lt.anchorElement(e)})}),"newActivation"),endActivation:(0,n.K2)((function(t){const e=this.activations.map((function(t){return t.actor})).lastIndexOf(t.from);return this.activations.splice(e,1)[0]}),"endActivation"),createLoop:(0,n.K2)((function(t={message:void 0,wrap:!1,width:void 0},e){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t.message,wrap:t.wrap,width:t.width,height:0,fill:e}}),"createLoop"),newLoop:(0,n.K2)((function(t={message:void 0,wrap:!1,width:void 0},e){this.sequenceItems.push(this.createLoop(t,e))}),"newLoop"),endLoop:(0,n.K2)((function(){return this.sequenceItems.pop()}),"endLoop"),isLoopOverlap:(0,n.K2)((function(){return!!this.sequenceItems.length&&this.sequenceItems[this.sequenceItems.length-1].overlap}),"isLoopOverlap"),addSectionToLoop:(0,n.K2)((function(t){const e=this.sequenceItems.pop();e.sections=e.sections||[],e.sectionTitles=e.sectionTitles||[],e.sections.push({y:Pt.getVerticalPos(),height:0}),e.sectionTitles.push(t),this.sequenceItems.push(e)}),"addSectionToLoop"),saveVerticalPos:(0,n.K2)((function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)}),"saveVerticalPos"),resetVerticalPos:(0,n.K2)((function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)}),"resetVerticalPos"),bumpVerticalPos:(0,n.K2)((function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=n.Y2.getMax(this.data.stopy,this.verticalPos)}),"bumpVerticalPos"),getVerticalPos:(0,n.K2)((function(){return this.verticalPos}),"getVerticalPos"),getBounds:(0,n.K2)((function(){return{bounds:this.data,models:this.models}}),"getBounds")},kt=(0,n.K2)((async function(t,e){Pt.bumpVerticalPos(_t.boxMargin),e.height=_t.boxMargin,e.starty=Pt.getVerticalPos();const a=(0,r.PB)();a.x=e.startx,a.y=e.starty,a.width=e.width||_t.width,a.class="note";const s=t.append("g"),i=Lt.drawRect(s,a),o=(0,r.HT)();o.x=e.startx,o.y=e.starty,o.width=a.width,o.dy="1em",o.text=e.message,o.class="noteText",o.fontFamily=_t.noteFontFamily,o.fontSize=_t.noteFontSize,o.fontWeight=_t.noteFontWeight,o.anchor=_t.noteAlign,o.textMargin=_t.noteMargin,o.valign="center";const c=(0,n.Wi)(o.text)?await tt(s,o):et(s,o),l=Math.round(c.map((t=>(t._groups||t)[0][0].getBBox().height)).reduce(((t,e)=>t+e)));i.attr("height",l+2*_t.noteMargin),e.height+=l+2*_t.noteMargin,Pt.bumpVerticalPos(l+2*_t.noteMargin),e.stopy=e.starty+l+2*_t.noteMargin,e.stopx=e.startx+a.width,Pt.insert(e.startx,e.starty,e.stopx,e.stopy),Pt.models.addNote(e)}),"drawNote"),At=(0,n.K2)((t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight})),"messageFont"),vt=(0,n.K2)((t=>({fontFamily:t.noteFontFamily,fontSize:t.noteFontSize,fontWeight:t.noteFontWeight})),"noteFont"),Nt=(0,n.K2)((t=>({fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight})),"actorFont");async function Mt(t,e){Pt.bumpVerticalPos(10);const{startx:a,stopx:r,message:s}=e,o=n.Y2.splitBreaks(s).length,c=(0,n.Wi)(s),l=c?await(0,n.Dl)(s,(0,n.D7)()):i._K.calculateTextDimensions(s,At(_t));if(!c){const t=l.height/o;e.height+=t,Pt.bumpVerticalPos(t)}let d,h=l.height-10;const p=l.width;if(a===r){d=Pt.getVerticalPos()+h,_t.rightAngles||(h+=_t.boxMargin,d=Pt.getVerticalPos()+h),h+=30;const t=n.Y2.getMax(p/2,_t.width/2);Pt.insert(a-t,Pt.getVerticalPos()-10+h,r+t,Pt.getVerticalPos()+30+h)}else h+=_t.boxMargin,d=Pt.getVerticalPos()+h,Pt.insert(a,d-10,r,d);return Pt.bumpVerticalPos(h),e.height+=h,e.stopy=e.starty+e.height,Pt.insert(e.fromBounds,e.starty,e.toBounds,e.stopy),d}(0,n.K2)(Mt,"boundMessage");var Dt=(0,n.K2)((async function(t,e,a,s){const{startx:o,stopx:c,starty:l,message:d,type:h,sequenceIndex:p,sequenceVisible:g}=e,u=i._K.calculateTextDimensions(d,At(_t)),x=(0,r.HT)();x.x=o,x.y=l+10,x.width=c-o,x.class="messageText",x.dy="1em",x.text=d,x.fontFamily=_t.messageFontFamily,x.fontSize=_t.messageFontSize,x.fontWeight=_t.messageFontWeight,x.anchor=_t.messageAlign,x.valign="center",x.textMargin=_t.wrapPadding,x.tspan=!1,(0,n.Wi)(x.text)?await tt(t,x,{startx:o,stopx:c,starty:a}):et(t,x);const y=u.width;let m;o===c?m=_t.rightAngles?t.append("path").attr("d",`M ${o},${a} H ${o+n.Y2.getMax(_t.width/2,y/2)} V ${a+25} H ${o}`):t.append("path").attr("d","M "+o+","+a+" C "+(o+60)+","+(a-10)+" "+(o+60)+","+(a+30)+" "+o+","+(a+20)):(m=t.append("line"),m.attr("x1",o),m.attr("y1",a),m.attr("x2",c),m.attr("y2",a)),h===s.db.LINETYPE.DOTTED||h===s.db.LINETYPE.DOTTED_CROSS||h===s.db.LINETYPE.DOTTED_POINT||h===s.db.LINETYPE.DOTTED_OPEN||h===s.db.LINETYPE.BIDIRECTIONAL_DOTTED?(m.style("stroke-dasharray","3, 3"),m.attr("class","messageLine1")):m.attr("class","messageLine0");let b="";_t.arrowMarkerAbsolute&&(b=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,b=b.replace(/\(/g,"\\("),b=b.replace(/\)/g,"\\)")),m.attr("stroke-width",2),m.attr("stroke","none"),m.style("fill","none"),h!==s.db.LINETYPE.SOLID&&h!==s.db.LINETYPE.DOTTED||m.attr("marker-end","url("+b+"#arrowhead)"),h!==s.db.LINETYPE.BIDIRECTIONAL_SOLID&&h!==s.db.LINETYPE.BIDIRECTIONAL_DOTTED||(m.attr("marker-start","url("+b+"#arrowhead)"),m.attr("marker-end","url("+b+"#arrowhead)")),h!==s.db.LINETYPE.SOLID_POINT&&h!==s.db.LINETYPE.DOTTED_POINT||m.attr("marker-end","url("+b+"#filled-head)"),h!==s.db.LINETYPE.SOLID_CROSS&&h!==s.db.LINETYPE.DOTTED_CROSS||m.attr("marker-end","url("+b+"#crosshead)"),(g||_t.showSequenceNumbers)&&(m.attr("marker-start","url("+b+"#sequencenumber)"),t.append("text").attr("x",o).attr("y",a+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("class","sequenceNumber").text(p))}),"drawMessage"),Ot=(0,n.K2)((function(t,e,a,r,s,i,o){let c,l=0,d=0,h=0;for(const p of r){const t=e.get(p),r=t.box;c&&c!=r&&(o||Pt.models.addBox(c),d+=_t.boxMargin+c.margin),r&&r!=c&&(o||(r.x=l+d,r.y=s),d+=r.margin),t.width=t.width||_t.width,t.height=n.Y2.getMax(t.height||_t.height,_t.height),t.margin=t.margin||_t.actorMargin,h=n.Y2.getMax(h,t.height),a.get(t.name)&&(d+=t.width/2),t.x=l+d,t.starty=Pt.getVerticalPos(),Pt.insert(t.x,s,t.x+t.width,t.height),l+=t.width+d,t.box&&(t.box.width=l+r.margin-t.box.x),d=t.margin,c=t.box,Pt.models.addActor(t)}c&&!o&&Pt.models.addBox(c),Pt.bumpVerticalPos(h)}),"addActorRenderingData"),St=(0,n.K2)((async function(t,e,a,r){if(r){let r=0;Pt.bumpVerticalPos(2*_t.boxMargin);for(const s of a){const a=e.get(s);a.stopy||(a.stopy=Pt.getVerticalPos());const i=await Lt.drawActor(t,a,_t,!0);r=n.Y2.getMax(r,i)}Pt.bumpVerticalPos(r+_t.boxMargin)}else for(const s of a){const a=e.get(s);await Lt.drawActor(t,a,_t,!1)}}),"drawActors"),Kt=(0,n.K2)((function(t,e,a,r){let s=0,i=0;for(const n of a){const a=e.get(n),o=Wt(a),c=Lt.drawPopup(t,a,o,_t,_t.forceMenus,r);c.height>s&&(s=c.height),c.width+a.x>i&&(i=c.width+a.x)}return{maxHeight:s,maxWidth:i}}),"drawActorsPopup"),Rt=(0,n.K2)((function(t){(0,n.hH)(_t,t),t.fontFamily&&(_t.actorFontFamily=_t.noteFontFamily=_t.messageFontFamily=t.fontFamily),t.fontSize&&(_t.actorFontSize=_t.noteFontSize=_t.messageFontSize=t.fontSize),t.fontWeight&&(_t.actorFontWeight=_t.noteFontWeight=_t.messageFontWeight=t.fontWeight)}),"setConf"),Yt=(0,n.K2)((function(t){return Pt.activations.filter((function(e){return e.actor===t}))}),"actorActivations"),Ct=(0,n.K2)((function(t,e){const a=e.get(t),r=Yt(t);return[r.reduce((function(t,e){return n.Y2.getMin(t,e.startx)}),a.x+a.width/2-1),r.reduce((function(t,e){return n.Y2.getMax(t,e.stopx)}),a.x+a.width/2+1)]}),"activationBounds");function Bt(t,e,a,r,s){Pt.bumpVerticalPos(a);let o=r;if(e.id&&e.message&&t[e.id]){const a=t[e.id].width,s=At(_t);e.message=i._K.wrapLabel(`[${e.message}]`,a-2*_t.wrapPadding,s),e.width=a,e.wrap=!0;const c=i._K.calculateTextDimensions(e.message,s),l=n.Y2.getMax(c.height,_t.labelBoxHeight);o=r+l,n.Rm.debug(`${l} - ${e.message}`)}s(e),Pt.bumpVerticalPos(o)}function $t(t,e,a,r,s,i,o){function c(a,r){a.x{t.add(e.from),t.add(e.to)})),y=y.filter((e=>t.has(e)))}Ot(h,p,g,y,0,m,!1);const w=await jt(m,p,E,r);function I(t,e){const a=Pt.endActivation(t);a.starty+18>e&&(a.starty=e-6,e+=12),Lt.drawActivation(h,a,e,_t,Yt(t.from).length),Pt.insert(a.startx,e-10,a.stopx,e)}Lt.insertArrowHead(h),Lt.insertArrowCrossHead(h),Lt.insertArrowFilledHead(h),Lt.insertSequenceNumber(h),(0,n.K2)(I,"activeEnd");let L=1,_=1;const P=[],k=[];let A=0;for(const o of m){let t,e,a;switch(o.type){case r.db.LINETYPE.NOTE:Pt.resetVerticalPos(),e=o.noteModel,await kt(h,e);break;case r.db.LINETYPE.ACTIVE_START:Pt.newActivation(o,h,p);break;case r.db.LINETYPE.ACTIVE_END:I(o,Pt.getVerticalPos());break;case r.db.LINETYPE.LOOP_START:Bt(w,o,_t.boxMargin,_t.boxMargin+_t.boxTextMargin,(t=>Pt.newLoop(t)));break;case r.db.LINETYPE.LOOP_END:t=Pt.endLoop(),await Lt.drawLoop(h,t,"loop",_t),Pt.bumpVerticalPos(t.stopy-Pt.getVerticalPos()),Pt.models.addLoop(t);break;case r.db.LINETYPE.RECT_START:Bt(w,o,_t.boxMargin,_t.boxMargin,(t=>Pt.newLoop(void 0,t.message)));break;case r.db.LINETYPE.RECT_END:t=Pt.endLoop(),k.push(t),Pt.models.addLoop(t),Pt.bumpVerticalPos(t.stopy-Pt.getVerticalPos());break;case r.db.LINETYPE.OPT_START:Bt(w,o,_t.boxMargin,_t.boxMargin+_t.boxTextMargin,(t=>Pt.newLoop(t)));break;case r.db.LINETYPE.OPT_END:t=Pt.endLoop(),await Lt.drawLoop(h,t,"opt",_t),Pt.bumpVerticalPos(t.stopy-Pt.getVerticalPos()),Pt.models.addLoop(t);break;case r.db.LINETYPE.ALT_START:Bt(w,o,_t.boxMargin,_t.boxMargin+_t.boxTextMargin,(t=>Pt.newLoop(t)));break;case r.db.LINETYPE.ALT_ELSE:Bt(w,o,_t.boxMargin+_t.boxTextMargin,_t.boxMargin,(t=>Pt.addSectionToLoop(t)));break;case r.db.LINETYPE.ALT_END:t=Pt.endLoop(),await Lt.drawLoop(h,t,"alt",_t),Pt.bumpVerticalPos(t.stopy-Pt.getVerticalPos()),Pt.models.addLoop(t);break;case r.db.LINETYPE.PAR_START:case r.db.LINETYPE.PAR_OVER_START:Bt(w,o,_t.boxMargin,_t.boxMargin+_t.boxTextMargin,(t=>Pt.newLoop(t))),Pt.saveVerticalPos();break;case r.db.LINETYPE.PAR_AND:Bt(w,o,_t.boxMargin+_t.boxTextMargin,_t.boxMargin,(t=>Pt.addSectionToLoop(t)));break;case r.db.LINETYPE.PAR_END:t=Pt.endLoop(),await Lt.drawLoop(h,t,"par",_t),Pt.bumpVerticalPos(t.stopy-Pt.getVerticalPos()),Pt.models.addLoop(t);break;case r.db.LINETYPE.AUTONUMBER:L=o.message.start||L,_=o.message.step||_,o.message.visible?r.db.enableSequenceNumbers():r.db.disableSequenceNumbers();break;case r.db.LINETYPE.CRITICAL_START:Bt(w,o,_t.boxMargin,_t.boxMargin+_t.boxTextMargin,(t=>Pt.newLoop(t)));break;case r.db.LINETYPE.CRITICAL_OPTION:Bt(w,o,_t.boxMargin+_t.boxTextMargin,_t.boxMargin,(t=>Pt.addSectionToLoop(t)));break;case r.db.LINETYPE.CRITICAL_END:t=Pt.endLoop(),await Lt.drawLoop(h,t,"critical",_t),Pt.bumpVerticalPos(t.stopy-Pt.getVerticalPos()),Pt.models.addLoop(t);break;case r.db.LINETYPE.BREAK_START:Bt(w,o,_t.boxMargin,_t.boxMargin+_t.boxTextMargin,(t=>Pt.newLoop(t)));break;case r.db.LINETYPE.BREAK_END:t=Pt.endLoop(),await Lt.drawLoop(h,t,"break",_t),Pt.bumpVerticalPos(t.stopy-Pt.getVerticalPos()),Pt.models.addLoop(t);break;default:try{a=o.msgModel,a.starty=Pt.getVerticalPos(),a.sequenceIndex=L,a.sequenceVisible=r.db.showSequenceNumbers();const t=await Mt(0,a);$t(o,a,t,A,p,g,u),P.push({messageModel:a,lineStartY:t}),Pt.models.addMessage(a)}catch(R){n.Rm.error("error while drawing message",R)}}[r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN,r.db.LINETYPE.SOLID,r.db.LINETYPE.DOTTED,r.db.LINETYPE.SOLID_CROSS,r.db.LINETYPE.DOTTED_CROSS,r.db.LINETYPE.SOLID_POINT,r.db.LINETYPE.DOTTED_POINT,r.db.LINETYPE.BIDIRECTIONAL_SOLID,r.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(o.type)&&(L+=_),A++}n.Rm.debug("createdActors",g),n.Rm.debug("destroyedActors",u),await St(h,p,y,!1);for(const n of P)await Dt(h,n.messageModel,n.lineStartY,r);_t.mirrorActors&&await St(h,p,y,!0),k.forEach((t=>Lt.drawBackgroundRect(h,t))),st(h,p,y,_t);for(const n of Pt.models.boxes)n.height=Pt.getVerticalPos()-n.y,Pt.insert(n.x,n.y,n.x+n.width,n.height),n.startx=n.x,n.starty=n.y,n.stopx=n.startx+n.width,n.stopy=n.starty+n.height,n.stroke="rgb(0,0,0, 0.5)",Lt.drawBox(h,n,_t);T&&Pt.bumpVerticalPos(_t.boxMargin);const v=Kt(h,p,y,d),{bounds:N}=Pt.getBounds();void 0===N.startx&&(N.startx=0),void 0===N.starty&&(N.starty=0),void 0===N.stopx&&(N.stopx=0),void 0===N.stopy&&(N.stopy=0);let M=N.stopy-N.starty;M{const a=At(_t);let r=e.actorKeys.reduce(((e,a)=>e+(t.get(a).width+(t.get(a).margin||0))),0);r-=2*_t.boxTextMargin,e.wrap&&(e.name=i._K.wrapLabel(e.name,r-2*_t.wrapPadding,a));const o=i._K.calculateTextDimensions(e.name,a);s=n.Y2.getMax(o.height,s);const c=n.Y2.getMax(r,o.width+2*_t.wrapPadding);if(e.margin=_t.boxTextMargin,rt.textMaxHeight=s)),n.Y2.getMax(r,_t.height)}(0,n.K2)(qt,"calculateActorMargins");var zt=(0,n.K2)((async function(t,e,a){const r=e.get(t.from),s=e.get(t.to),o=r.x,c=s.x,l=t.wrap&&t.message;let d=(0,n.Wi)(t.message)?await(0,n.Dl)(t.message,(0,n.D7)()):i._K.calculateTextDimensions(l?i._K.wrapLabel(t.message,_t.width,vt(_t)):t.message,vt(_t));const h={width:l?_t.width:n.Y2.getMax(_t.width,d.width+2*_t.noteMargin),height:0,startx:r.x,stopx:0,starty:0,stopy:0,message:t.message};return t.placement===a.db.PLACEMENT.RIGHTOF?(h.width=l?n.Y2.getMax(_t.width,d.width):n.Y2.getMax(r.width/2+s.width/2,d.width+2*_t.noteMargin),h.startx=o+(r.width+_t.actorMargin)/2):t.placement===a.db.PLACEMENT.LEFTOF?(h.width=l?n.Y2.getMax(_t.width,d.width+2*_t.noteMargin):n.Y2.getMax(r.width/2+s.width/2,d.width+2*_t.noteMargin),h.startx=o-h.width+(r.width-_t.actorMargin)/2):t.to===t.from?(d=i._K.calculateTextDimensions(l?i._K.wrapLabel(t.message,n.Y2.getMax(_t.width,r.width),vt(_t)):t.message,vt(_t)),h.width=l?n.Y2.getMax(_t.width,r.width):n.Y2.getMax(r.width,_t.width,d.width+2*_t.noteMargin),h.startx=o+(r.width-h.width)/2):(h.width=Math.abs(o+r.width/2-(c+s.width/2))+_t.actorMargin,h.startx=o2,g=(0,n.K2)((t=>l?-t:t),"adjustValue");t.from===t.to?h=d:(t.activate&&!p&&(h+=g(_t.activationWidth/2-1)),[a.db.LINETYPE.SOLID_OPEN,a.db.LINETYPE.DOTTED_OPEN].includes(t.type)||(h+=g(3)),[a.db.LINETYPE.BIDIRECTIONAL_SOLID,a.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(t.type)&&(d-=g(3)));const u=[r,s,o,c],x=Math.abs(d-h);t.wrap&&t.message&&(t.message=i._K.wrapLabel(t.message,n.Y2.getMax(x+2*_t.wrapPadding,_t.width),At(_t)));const y=i._K.calculateTextDimensions(t.message,At(_t));return{width:n.Y2.getMax(t.wrap?0:y.width+2*_t.wrapPadding,x+2*_t.wrapPadding,_t.width),height:0,startx:d,stopx:h,starty:0,stopy:0,message:t.message,type:t.type,wrap:t.wrap,fromBounds:Math.min.apply(null,u),toBounds:Math.max.apply(null,u)}}),"buildMessageModel"),jt=(0,n.K2)((async function(t,e,a,r){const s={},o=[];let c,l,d;for(const h of t){switch(h.id=i._K.random({length:10}),h.type){case r.db.LINETYPE.LOOP_START:case r.db.LINETYPE.ALT_START:case r.db.LINETYPE.OPT_START:case r.db.LINETYPE.PAR_START:case r.db.LINETYPE.PAR_OVER_START:case r.db.LINETYPE.CRITICAL_START:case r.db.LINETYPE.BREAK_START:o.push({id:h.id,msg:h.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case r.db.LINETYPE.ALT_ELSE:case r.db.LINETYPE.PAR_AND:case r.db.LINETYPE.CRITICAL_OPTION:h.message&&(c=o.pop(),s[c.id]=c,s[h.id]=c,o.push(c));break;case r.db.LINETYPE.LOOP_END:case r.db.LINETYPE.ALT_END:case r.db.LINETYPE.OPT_END:case r.db.LINETYPE.PAR_END:case r.db.LINETYPE.CRITICAL_END:case r.db.LINETYPE.BREAK_END:c=o.pop(),s[c.id]=c;break;case r.db.LINETYPE.ACTIVE_START:{const t=e.get(h.from?h.from:h.to.actor),a=Yt(h.from?h.from:h.to.actor).length,r=t.x+t.width/2+(a-1)*_t.activationWidth/2,s={startx:r,stopx:r+_t.activationWidth,actor:h.from,enabled:!0};Pt.activations.push(s)}break;case r.db.LINETYPE.ACTIVE_END:{const t=Pt.activations.map((t=>t.actor)).lastIndexOf(h.from);Pt.activations.splice(t,1).splice(0,1)}}void 0!==h.placement?(l=await zt(h,e,r),h.noteModel=l,o.forEach((t=>{c=t,c.from=n.Y2.getMin(c.from,l.startx),c.to=n.Y2.getMax(c.to,l.startx+l.width),c.width=n.Y2.getMax(c.width,Math.abs(c.from-c.to))-_t.labelBoxWidth}))):(d=Ht(h,e,r),h.msgModel=d,d.startx&&d.stopx&&o.length>0&&o.forEach((t=>{if(c=t,d.startx===d.stopx){const t=e.get(h.from),a=e.get(h.to);c.from=n.Y2.getMin(t.x-d.width/2,t.x-t.width/2,c.from),c.to=n.Y2.getMax(a.x+d.width/2,a.x+t.width/2,c.to),c.width=n.Y2.getMax(c.width,Math.abs(c.to-c.from))-_t.labelBoxWidth}else c.from=n.Y2.getMin(d.startx,c.from),c.to=n.Y2.getMax(d.stopx,c.to),c.width=n.Y2.getMax(c.width,d.width)-_t.labelBoxWidth})))}return Pt.activations=[],n.Rm.debug("Loop type widths:",s),s}),"calculateLoopBounds"),Ut={parser:d,db:H,renderer:{bounds:Pt,drawActors:St,drawActorsPopup:Kt,setConf:Rt,draw:Vt},styles:j,init:(0,n.K2)((({wrap:t})=>{H.setWrap(t)}),"init")}}}]); \ No newline at end of file diff --git a/assets/js/7060.40da23a6.js b/assets/js/7060.40da23a6.js new file mode 100644 index 000000000000..80c8c03e52b2 --- /dev/null +++ b/assets/js/7060.40da23a6.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7060],{27060:(t,n,e)=>{e.d(n,{diagram:()=>rt});var i=e(45567),s=e(20007);function r(t,n){let e;if(void 0===n)for(const i of t)null!=i&&(e>i||void 0===e&&i>=i)&&(e=i);else{let i=-1;for(let s of t)null!=(s=n(s,++i,t))&&(e>s||void 0===e&&s>=s)&&(e=s)}return e}function o(t){return t.target.depth}function c(t,n){return t.sourceLinks.length?t.depth:n-1}function a(t,n){let e=0;if(void 0===n)for(let i of t)(i=+i)&&(e+=i);else{let i=-1;for(let s of t)(s=+n(s,++i,t))&&(e+=s)}return e}function l(t,n){let e;if(void 0===n)for(const i of t)null!=i&&(e=i)&&(e=i);else{let i=-1;for(let s of t)null!=(s=n(s,++i,t))&&(e=s)&&(e=s)}return e}function h(t){return function(){return t}}function u(t,n){return y(t.source,n.source)||t.index-n.index}function f(t,n){return y(t.target,n.target)||t.index-n.index}function y(t,n){return t.y0-n.y0}function d(t){return t.value}function p(t){return t.index}function g(t){return t.nodes}function _(t){return t.links}function k(t,n){const e=t.get(n);if(!e)throw new Error("missing: "+n);return e}function x({nodes:t}){for(const n of t){let t=n.y0,e=t;for(const i of n.sourceLinks)i.y0=t+i.width/2,t+=i.width;for(const i of n.targetLinks)i.y1=e+i.width/2,e+=i.width}}function m(){let t,n,e,i=0,s=0,o=1,m=1,v=24,b=8,w=p,L=c,S=g,E=_,A=6;function K(){const c={nodes:S.apply(null,arguments),links:E.apply(null,arguments)};return function({nodes:t,links:n}){for(const[e,s]of t.entries())s.index=e,s.sourceLinks=[],s.targetLinks=[];const i=new Map(t.map(((n,e)=>[w(n,e,t),n])));for(const[e,s]of n.entries()){s.index=e;let{source:t,target:n}=s;"object"!=typeof t&&(t=s.source=k(i,t)),"object"!=typeof n&&(n=s.target=k(i,n)),t.sourceLinks.push(s),n.targetLinks.push(s)}if(null!=e)for(const{sourceLinks:s,targetLinks:r}of t)s.sort(e),r.sort(e)}(c),function({nodes:t}){for(const n of t)n.value=void 0===n.fixedValue?Math.max(a(n.sourceLinks,d),a(n.targetLinks,d)):n.fixedValue}(c),function({nodes:t}){const n=t.length;let e=new Set(t),i=new Set,s=0;for(;e.size;){for(const t of e){t.depth=s;for(const{target:n}of t.sourceLinks)i.add(n)}if(++s>n)throw new Error("circular link");e=i,i=new Set}}(c),function({nodes:t}){const n=t.length;let e=new Set(t),i=new Set,s=0;for(;e.size;){for(const t of e){t.height=s;for(const{source:n}of t.targetLinks)i.add(n)}if(++s>n)throw new Error("circular link");e=i,i=new Set}}(c),function(e){const c=function({nodes:t}){const e=l(t,(t=>t.depth))+1,s=(o-i-v)/(e-1),r=new Array(e);for(const n of t){const t=Math.max(0,Math.min(e-1,Math.floor(L.call(null,n,e))));n.layer=t,n.x0=i+t*s,n.x1=n.x0+v,r[t]?r[t].push(n):r[t]=[n]}if(n)for(const i of r)i.sort(n);return r}(e);t=Math.min(b,(m-s)/(l(c,(t=>t.length))-1)),function(n){const e=r(n,(n=>(m-s-(n.length-1)*t)/a(n,d)));for(const i of n){let n=s;for(const s of i){s.y0=n,s.y1=n+s.value*e,n=s.y1+t;for(const t of s.sourceLinks)t.width=t.value*e}n=(m-n+t)/(i.length+1);for(let t=0;t0))continue;let s=(n/i-t.y0)*e;t.y0+=s,t.y1+=s,P(t)}void 0===n&&r.sort(y),T(r,i)}}function I(t,e,i){for(let s=t.length-2;s>=0;--s){const r=t[s];for(const t of r){let n=0,i=0;for(const{target:e,value:r}of t.sourceLinks){let s=r*(e.layer-t.layer);n+=$(t,e)*s,i+=s}if(!(i>0))continue;let s=(n/i-t.y0)*e;t.y0+=s,t.y1+=s,P(t)}void 0===n&&r.sort(y),T(r,i)}}function T(n,e){const i=n.length>>1,r=n[i];N(n,r.y0-t,i-1,e),D(n,r.y1+t,i+1,e),N(n,m,n.length-1,e),D(n,s,0,e)}function D(n,e,i,s){for(;i1e-6&&(r.y0+=o,r.y1+=o),e=r.y1+t}}function N(n,e,i,s){for(;i>=0;--i){const r=n[i],o=(r.y1-e)*s;o>1e-6&&(r.y0-=o,r.y1-=o),e=r.y0-t}}function P({sourceLinks:t,targetLinks:n}){if(void 0===e){for(const{source:{sourceLinks:t}}of n)t.sort(f);for(const{target:{targetLinks:n}}of t)n.sort(u)}}function C(t){if(void 0===e)for(const{sourceLinks:n,targetLinks:e}of t)n.sort(f),e.sort(u)}function O(n,e){let i=n.y0-(n.sourceLinks.length-1)*t/2;for(const{target:s,width:r}of n.sourceLinks){if(s===e)break;i+=r+t}for(const{source:t,width:s}of e.targetLinks){if(t===n)break;i-=s}return i}function $(n,e){let i=e.y0-(e.targetLinks.length-1)*t/2;for(const{source:s,width:r}of e.targetLinks){if(s===n)break;i+=r+t}for(const{target:t,width:s}of n.sourceLinks){if(t===e)break;i-=s}return i}return K.update=function(t){return x(t),t},K.nodeId=function(t){return arguments.length?(w="function"==typeof t?t:h(t),K):w},K.nodeAlign=function(t){return arguments.length?(L="function"==typeof t?t:h(t),K):L},K.nodeSort=function(t){return arguments.length?(n=t,K):n},K.nodeWidth=function(t){return arguments.length?(v=+t,K):v},K.nodePadding=function(n){return arguments.length?(b=t=+n,K):b},K.nodes=function(t){return arguments.length?(S="function"==typeof t?t:h(t),K):S},K.links=function(t){return arguments.length?(E="function"==typeof t?t:h(t),K):E},K.linkSort=function(t){return arguments.length?(e=t,K):e},K.size=function(t){return arguments.length?(i=s=0,o=+t[0],m=+t[1],K):[o-i,m-s]},K.extent=function(t){return arguments.length?(i=+t[0][0],o=+t[1][0],s=+t[0][1],m=+t[1][1],K):[[i,s],[o,m]]},K.iterations=function(t){return arguments.length?(A=+t,K):A},K}var v=Math.PI,b=2*v,w=1e-6,L=b-w;function S(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function E(){return new S}S.prototype=E.prototype={constructor:S,moveTo:function(t,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,n){this._+="L"+(this._x1=+t)+","+(this._y1=+n)},quadraticCurveTo:function(t,n,e,i){this._+="Q"+ +t+","+ +n+","+(this._x1=+e)+","+(this._y1=+i)},bezierCurveTo:function(t,n,e,i,s,r){this._+="C"+ +t+","+ +n+","+ +e+","+ +i+","+(this._x1=+s)+","+(this._y1=+r)},arcTo:function(t,n,e,i,s){t=+t,n=+n,e=+e,i=+i,s=+s;var r=this._x1,o=this._y1,c=e-t,a=i-n,l=r-t,h=o-n,u=l*l+h*h;if(s<0)throw new Error("negative radius: "+s);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=n);else if(u>w)if(Math.abs(h*c-a*l)>w&&s){var f=e-r,y=i-o,d=c*c+a*a,p=f*f+y*y,g=Math.sqrt(d),_=Math.sqrt(u),k=s*Math.tan((v-Math.acos((d+u-p)/(2*g*_)))/2),x=k/_,m=k/g;Math.abs(x-1)>w&&(this._+="L"+(t+x*l)+","+(n+x*h)),this._+="A"+s+","+s+",0,0,"+ +(h*f>l*y)+","+(this._x1=t+m*c)+","+(this._y1=n+m*a)}else this._+="L"+(this._x1=t)+","+(this._y1=n);else;},arc:function(t,n,e,i,s,r){t=+t,n=+n,r=!!r;var o=(e=+e)*Math.cos(i),c=e*Math.sin(i),a=t+o,l=n+c,h=1^r,u=r?i-s:s-i;if(e<0)throw new Error("negative radius: "+e);null===this._x1?this._+="M"+a+","+l:(Math.abs(this._x1-a)>w||Math.abs(this._y1-l)>w)&&(this._+="L"+a+","+l),e&&(u<0&&(u=u%b+b),u>L?this._+="A"+e+","+e+",0,1,"+h+","+(t-o)+","+(n-c)+"A"+e+","+e+",0,1,"+h+","+(this._x1=a)+","+(this._y1=l):u>w&&(this._+="A"+e+","+e+",0,"+ +(u>=v)+","+h+","+(this._x1=t+e*Math.cos(s))+","+(this._y1=n+e*Math.sin(s))))},rect:function(t,n,e,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +e+"v"+ +i+"h"+-e+"Z"},toString:function(){return this._}};const A=E;var K=Array.prototype.slice;function M(t){return function(){return t}}function I(t){return t[0]}function T(t){return t[1]}function D(t){return t.source}function N(t){return t.target}function P(t){var n=D,e=N,i=I,s=T,r=null;function o(){var o,c=K.call(arguments),a=n.apply(this,c),l=e.apply(this,c);if(r||(r=o=A()),t(r,+i.apply(this,(c[0]=a,c)),+s.apply(this,c),+i.apply(this,(c[0]=l,c)),+s.apply(this,c)),o)return r=null,o+""||null}return o.source=function(t){return arguments.length?(n=t,o):n},o.target=function(t){return arguments.length?(e=t,o):e},o.x=function(t){return arguments.length?(i="function"==typeof t?t:M(+t),o):i},o.y=function(t){return arguments.length?(s="function"==typeof t?t:M(+t),o):s},o.context=function(t){return arguments.length?(r=null==t?null:t,o):r},o}function C(t,n,e,i,s){t.moveTo(n,e),t.bezierCurveTo(n=(n+i)/2,e,n,s,i,s)}function O(t){return[t.source.x1,t.y0]}function $(t){return[t.target.x0,t.y1]}function j(){return P(C).source(O).target($)}var z=function(){var t=(0,i.K2)((function(t,n,e,i){for(e=e||{},i=t.length;i--;e[t[i]]=n);return e}),"o"),n=[1,9],e=[1,10],s=[1,5,10,12],r={trace:(0,i.K2)((function(){}),"trace"),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:(0,i.K2)((function(t,n,e,i,s,r,o){var c=r.length-1;switch(s){case 7:const t=i.findOrCreateNode(r[c-4].trim().replaceAll('""','"')),n=i.findOrCreateNode(r[c-2].trim().replaceAll('""','"')),e=parseFloat(r[c].trim());i.addLink(t,n,e);break;case 8:case 9:case 11:this.$=r[c];break;case 10:this.$=r[c-1]}}),"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:n,20:e},{1:[2,6],7:11,10:[1,12]},t(e,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(s,[2,8]),t(s,[2,9]),{19:[1,16]},t(s,[2,11]),{1:[2,1]},{1:[2,5]},t(e,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:n,20:e},{15:18,16:7,17:8,18:n,20:e},{18:[1,19]},t(e,[2,3]),{12:[1,20]},t(s,[2,10]),{15:21,16:7,17:8,18:n,20:e},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:(0,i.K2)((function(t,n){if(!n.recoverable){var e=new Error(t);throw e.hash=n,e}this.trace(t)}),"parseError"),parse:(0,i.K2)((function(t){var n=this,e=[0],s=[],r=[null],o=[],c=this.table,a="",l=0,h=0,u=0,f=o.slice.call(arguments,1),y=Object.create(this.lexer),d={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(d.yy[p]=this.yy[p]);y.setInput(t,d.yy),d.yy.lexer=y,d.yy.parser=this,void 0===y.yylloc&&(y.yylloc={});var g=y.yylloc;o.push(g);var _=y.options&&y.options.ranges;function k(){var t;return"number"!=typeof(t=s.pop()||y.lex()||1)&&(t instanceof Array&&(t=(s=t).pop()),t=n.symbols_[t]||t),t}"function"==typeof d.yy.parseError?this.parseError=d.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,i.K2)((function(t){e.length=e.length-2*t,r.length=r.length-t,o.length=o.length-t}),"popStack"),(0,i.K2)(k,"lex");for(var x,m,v,b,w,L,S,E,A,K={};;){if(v=e[e.length-1],this.defaultActions[v]?b=this.defaultActions[v]:(null==x&&(x=k()),b=c[v]&&c[v][x]),void 0===b||!b.length||!b[0]){var M="";for(L in A=[],c[v])this.terminals_[L]&&L>2&&A.push("'"+this.terminals_[L]+"'");M=y.showPosition?"Parse error on line "+(l+1)+":\n"+y.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==x?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(M,{text:y.match,token:this.terminals_[x]||x,line:y.yylineno,loc:g,expected:A})}if(b[0]instanceof Array&&b.length>1)throw new Error("Parse Error: multiple actions possible at state: "+v+", token: "+x);switch(b[0]){case 1:e.push(x),r.push(y.yytext),o.push(y.yylloc),e.push(b[1]),x=null,m?(x=m,m=null):(h=y.yyleng,a=y.yytext,l=y.yylineno,g=y.yylloc,u>0&&u--);break;case 2:if(S=this.productions_[b[1]][1],K.$=r[r.length-S],K._$={first_line:o[o.length-(S||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(S||1)].first_column,last_column:o[o.length-1].last_column},_&&(K._$.range=[o[o.length-(S||1)].range[0],o[o.length-1].range[1]]),void 0!==(w=this.performAction.apply(K,[a,h,l,d.yy,b[1],r,o].concat(f))))return w;S&&(e=e.slice(0,-1*S*2),r=r.slice(0,-1*S),o=o.slice(0,-1*S)),e.push(this.productions_[b[1]][0]),r.push(K.$),o.push(K._$),E=c[e[e.length-2]][e[e.length-1]],e.push(E);break;case 3:return!0}}return!0}),"parse")},o=function(){return{EOF:1,parseError:(0,i.K2)((function(t,n){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,n)}),"parseError"),setInput:(0,i.K2)((function(t,n){return this.yy=n||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this}),"setInput"),input:(0,i.K2)((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t}),"input"),unput:(0,i.K2)((function(t){var n=t.length,e=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),e.length-1&&(this.yylineno-=e.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:e?(e.length===i.length?this.yylloc.first_column:0)+i[i.length-e.length].length-e[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this}),"unput"),more:(0,i.K2)((function(){return this._more=!0,this}),"more"),reject:(0,i.K2)((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:(0,i.K2)((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:(0,i.K2)((function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:(0,i.K2)((function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:(0,i.K2)((function(){var t=this.pastInput(),n=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+n+"^"}),"showPosition"),test_match:(0,i.K2)((function(t,n){var e,i,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],e=this.performAction.call(this,this.yy,this,n,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e)return e;if(this._backtrack){for(var r in s)this[r]=s[r];return!1}return!1}),"test_match"),next:(0,i.K2)((function(){if(this.done)return this.EOF;var t,n,e,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),r=0;rn[0].length)){if(n=e,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(e,s[r])))return t;if(this._backtrack){n=!1;continue}return!1}if(!this.options.flex)break}return n?!1!==(t=this.test_match(n,s[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:(0,i.K2)((function(){var t=this.next();return t||this.lex()}),"lex"),begin:(0,i.K2)((function(t){this.conditionStack.push(t)}),"begin"),popState:(0,i.K2)((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:(0,i.K2)((function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules}),"_currentRules"),topState:(0,i.K2)((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:(0,i.K2)((function(t){this.begin(t)}),"pushState"),stateStackSize:(0,i.K2)((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,i.K2)((function(t,n,e,i){switch(e){case 0:return this.pushState("csv"),4;case 1:return 10;case 2:return 5;case 3:return 12;case 4:return this.pushState("escaped_text"),18;case 5:return 20;case 6:return this.popState("escaped_text"),18;case 7:return 19}}),"anonymous"),rules:[/^(?:sankey-beta\b)/i,/^(?:$)/i,/^(?:((\u000D\u000A)|(\u000A)))/i,/^(?:(\u002C))/i,/^(?:(\u0022))/i,/^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i,/^(?:(\u0022)(?!(\u0022)))/i,/^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],conditions:{csv:{rules:[1,2,3,4,5,6,7],inclusive:!1},escaped_text:{rules:[6,7],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7],inclusive:!0}}}}();function c(){this.yy={}}return r.lexer=o,(0,i.K2)(c,"Parser"),c.prototype=r,r.Parser=c,new c}();z.parser=z;var U=z,F=[],W=[],G=new Map,V=(0,i.K2)((()=>{F=[],W=[],G=new Map,(0,i.IU)()}),"clear"),X=class{constructor(t,n,e=0){this.source=t,this.target=n,this.value=e}static{(0,i.K2)(this,"SankeyLink")}},Y=(0,i.K2)(((t,n,e)=>{F.push(new X(t,n,e))}),"addLink"),q=class{constructor(t){this.ID=t}static{(0,i.K2)(this,"SankeyNode")}},Q=(0,i.K2)((t=>{t=i.Y2.sanitizeText(t,(0,i.D7)());let n=G.get(t);return void 0===n&&(n=new q(t),G.set(t,n),W.push(n)),n}),"findOrCreateNode"),R=(0,i.K2)((()=>W),"getNodes"),B=(0,i.K2)((()=>F),"getLinks"),Z=(0,i.K2)((()=>({nodes:W.map((t=>({id:t.ID}))),links:F.map((t=>({source:t.source.ID,target:t.target.ID,value:t.value})))})),"getGraph"),H={nodesMap:G,getConfig:(0,i.K2)((()=>(0,i.D7)().sankey),"getConfig"),getNodes:R,getLinks:B,getGraph:Z,addLink:Y,findOrCreateNode:Q,getAccTitle:i.iN,setAccTitle:i.SV,getAccDescription:i.m7,setAccDescription:i.EI,getDiagramTitle:i.ab,setDiagramTitle:i.ke,clear:V},J=class t{static{(0,i.K2)(this,"Uid")}static{this.count=0}static next(n){return new t(n+ ++t.count)}constructor(t){this.id=t,this.href=`#${t}`}toString(){return"url("+this.href+")"}},tt={left:function(t){return t.depth},right:function(t,n){return n-1-t.height},center:function(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?r(t.sourceLinks,o)-1:0},justify:c},nt=(0,i.K2)((function(t,n,e,r){const{securityLevel:o,sankey:c}=(0,i.D7)(),a=i.ME.sankey;let l;"sandbox"===o&&(l=(0,s.Ltv)("#i"+n));const h="sandbox"===o?(0,s.Ltv)(l.nodes()[0].contentDocument.body):(0,s.Ltv)("body"),u="sandbox"===o?h.select(`[id="${n}"]`):(0,s.Ltv)(`[id="${n}"]`),f=c?.width??a.width,y=c?.height??a.width,d=c?.useMaxWidth??a.useMaxWidth,p=c?.nodeAlignment??a.nodeAlignment,g=c?.prefix??a.prefix,_=c?.suffix??a.suffix,k=c?.showValues??a.showValues,x=r.db.getGraph(),v=tt[p];m().nodeId((t=>t.id)).nodeWidth(10).nodePadding(10+(k?15:0)).nodeAlign(v).extent([[0,0],[f,y]])(x);const b=(0,s.UMr)(s.zt);u.append("g").attr("class","nodes").selectAll(".node").data(x.nodes).join("g").attr("class","node").attr("id",(t=>(t.uid=J.next("node-")).id)).attr("transform",(function(t){return"translate("+t.x0+","+t.y0+")"})).attr("x",(t=>t.x0)).attr("y",(t=>t.y0)).append("rect").attr("height",(t=>t.y1-t.y0)).attr("width",(t=>t.x1-t.x0)).attr("fill",(t=>b(t.id)));const w=(0,i.K2)((({id:t,value:n})=>k?`${t}\n${g}${Math.round(100*n)/100}${_}`:t),"getText");u.append("g").attr("class","node-labels").attr("font-family","sans-serif").attr("font-size",14).selectAll("text").data(x.nodes).join("text").attr("x",(t=>t.x0(t.y1+t.y0)/2)).attr("dy",(k?"0":"0.35")+"em").attr("text-anchor",(t=>t.x0(t.uid=J.next("linearGradient-")).id)).attr("gradientUnits","userSpaceOnUse").attr("x1",(t=>t.source.x1)).attr("x2",(t=>t.target.x0));t.append("stop").attr("offset","0%").attr("stop-color",(t=>b(t.source.id))),t.append("stop").attr("offset","100%").attr("stop-color",(t=>b(t.target.id)))}let E;switch(S){case"gradient":E=(0,i.K2)((t=>t.uid),"coloring");break;case"source":E=(0,i.K2)((t=>b(t.source.id)),"coloring");break;case"target":E=(0,i.K2)((t=>b(t.target.id)),"coloring");break;default:E=S}L.append("path").attr("d",j()).attr("stroke",E).attr("stroke-width",(t=>Math.max(1,t.width))),(0,i.ot)(void 0,u,0,d)}),"draw"),et={draw:nt},it=(0,i.K2)((t=>t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,"\n").trim()),"prepareTextForParsing"),st=U.parse.bind(U);U.parse=t=>st(it(t));var rt={parser:U,db:H,renderer:et}}}]); \ No newline at end of file diff --git a/assets/js/706277b1.57d54ea6.js b/assets/js/706277b1.57d54ea6.js deleted file mode 100644 index ed11766f0857..000000000000 --- a/assets/js/706277b1.57d54ea6.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3487],{25834:(a,t,e)=>{e.r(t),e.d(t,{assets:()=>i,contentTitle:()=>r,default:()=>c,frontMatter:()=>s,metadata:()=>n,toc:()=>l});var d=e(74848),o=e(28453);const s={id:"polkadot-staking-dashboard-validators",title:"Polkadot Staking Dashboard (Validators)",sidebar_label:"Staking Dashboard (Validators)",description:"Polkadot Staking Dashboard (Validators) descriptions",keywords:["polkadot","governance","dashboard","dune"],slug:"../polkadot-staking-dashboard-validators"},r="Polkadot Staking Dashboard (Validators)",n={id:"general/dune-analytics/polkadot-dashboards/legacy/polkadot-staking-dashboard-validators",title:"Polkadot Staking Dashboard (Validators)",description:"Polkadot Staking Dashboard (Validators) descriptions",source:"@site/../docs/general/dune-analytics/polkadot-dashboards/legacy/polkadot-staking-dashboard-validators.md",sourceDirName:"general/dune-analytics/polkadot-dashboards/legacy",slug:"/general/dune-analytics/polkadot-dashboards/polkadot-staking-dashboard-validators",permalink:"/docs/general/dune-analytics/polkadot-dashboards/polkadot-staking-dashboard-validators",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/polkadot-dashboards/legacy/polkadot-staking-dashboard-validators.md",tags:[],version:"current",lastUpdatedBy:"MK",lastUpdatedAt:1717658873e3,frontMatter:{id:"polkadot-staking-dashboard-validators",title:"Polkadot Staking Dashboard (Validators)",sidebar_label:"Staking Dashboard (Validators)",description:"Polkadot Staking Dashboard (Validators) descriptions",keywords:["polkadot","governance","dashboard","dune"],slug:"../polkadot-staking-dashboard-validators"}},i={},l=[{value:"View On Dune: Polkadot Staking Dashboard",id:"view-on-dune-polkadot-staking-dashboard",level:2},{value:"Polkadot Staking Rewards",id:"polkadot-staking-rewards",level:2}];function h(a){const t={a:"a",em:"em",h1:"h1",h2:"h2",header:"header",p:"p",strong:"strong",...(0,o.R)(),...a.components};return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(t.header,{children:(0,d.jsx)(t.h1,{id:"polkadot-staking-dashboard-validators",children:"Polkadot Staking Dashboard (Validators)"})}),"\n",(0,d.jsxs)(t.h2,{id:"view-on-dune-polkadot-staking-dashboard",children:["View On Dune: ",(0,d.jsx)(t.a,{href:"https://dune.com/substrate/polkadot-staking-validators",children:"Polkadot Staking Dashboard"})]}),"\n",(0,d.jsx)(t.h2,{id:"polkadot-staking-rewards",children:"Polkadot Staking Rewards"}),"\n",(0,d.jsxs)(t.p,{children:[(0,d.jsx)(t.strong,{children:"Reward Rate"})," - computed as (validator_erasRewardPoints/erasRewardPoints_total) *\nErasValidatorReward / validator_total_stake."]}),"\n",(0,d.jsxs)(t.p,{children:[(0,d.jsx)(t.strong,{children:"Effective Reward Rate"})," - computed as (1-validator",(0,d.jsx)(t.em,{children:"commision) *\n(validator"}),"erasRewardPoints/erasRewardPoints_total) * ErasValidatorReward / validator_total_stake -\nIn other words, (1-validator_commision) *Reward Rate, after considering validator_commision"]}),"\n",(0,d.jsxs)(t.p,{children:[(0,d.jsx)(t.strong,{children:"Normalized Reward Rate"})," - computed as total_era_rewards / number_of_validators * (1 -\ncommission) / validator_total_stake. This metric nomoralized the reward rate across active validator\nsets"]}),"\n",(0,d.jsxs)(t.p,{children:["Source Table: ",(0,d.jsx)(t.strong,{children:"polkadot.stakings"})," , MaterializedView:\n",(0,d.jsx)(t.a,{href:"https://dune.com/queries/3302709",children:(0,d.jsx)(t.strong,{children:"dune.substrate.result_polkadot_validators"})})]}),"\n",(0,d.jsxs)(t.p,{children:["Go back to ",(0,d.jsx)(t.a,{href:"https://dune.com/substrate/polkadot-staking",children:(0,d.jsx)(t.strong,{children:"Polkadot Staking Home"})})]}),"\n",(0,d.jsx)("iframe",{src:"https://dune.com/embeds/3459458/5813993/",height:"350",width:"100%"}),"\n",(0,d.jsx)("iframe",{src:"https://dune.com/embeds/3459458/5814228/",height:"350",width:"100%"}),"\n",(0,d.jsx)("iframe",{src:"https://dune.com/embeds/3459458/5814232/",height:"350",width:"100%"}),"\n",(0,d.jsx)("iframe",{src:"https://dune.com/embeds/3459458/5814240/",height:"350",width:"100%"}),"\n",(0,d.jsx)("iframe",{src:"https://dune.com/embeds/3459458/5814241/",height:"350",width:"100%"}),"\n",(0,d.jsx)("iframe",{src:"https://dune.com/embeds/3459458/5814242/",height:"350",width:"100%"}),"\n",(0,d.jsx)("iframe",{src:"https://dune.com/embeds/3459458/5814243/",height:"350",width:"100%"}),"\n",(0,d.jsx)("iframe",{src:"https://dune.com/embeds/3459458/5814244/",height:"350",width:"100%"}),"\n",(0,d.jsx)("iframe",{src:"https://dune.com/embeds/3459613/5814194/",height:"350",width:"100%"})]})}function c(a={}){const{wrapper:t}={...(0,o.R)(),...a.components};return t?(0,d.jsx)(t,{...a,children:(0,d.jsx)(h,{...a})}):h(a)}},28453:(a,t,e)=>{e.d(t,{R:()=>r,x:()=>n});var d=e(96540);const o={},s=d.createContext(o);function r(a){const t=d.useContext(s);return d.useMemo((function(){return"function"==typeof a?a(t):{...t,...a}}),[t,a])}function n(a){let t;return t=a.disableParentContext?"function"==typeof a.components?a.components(o):a.components||o:r(a.components),d.createElement(s.Provider,{value:t},a.children)}}}]); \ No newline at end of file diff --git a/assets/js/706277b1.a32cd946.js b/assets/js/706277b1.a32cd946.js new file mode 100644 index 000000000000..34ffd4659493 --- /dev/null +++ b/assets/js/706277b1.a32cd946.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3487],{1731:(a,t,s)=>{s.r(t),s.d(t,{assets:()=>i,contentTitle:()=>n,default:()=>c,frontMatter:()=>r,metadata:()=>e,toc:()=>l});const e=JSON.parse('{"id":"general/dune-analytics/polkadot-dashboards/legacy/polkadot-staking-dashboard-validators","title":"Polkadot Staking Dashboard (Validators)","description":"Polkadot Staking Dashboard (Validators) descriptions","source":"@site/../docs/general/dune-analytics/polkadot-dashboards/legacy/polkadot-staking-dashboard-validators.md","sourceDirName":"general/dune-analytics/polkadot-dashboards/legacy","slug":"/general/dune-analytics/polkadot-dashboards/polkadot-staking-dashboard-validators","permalink":"/docs/general/dune-analytics/polkadot-dashboards/polkadot-staking-dashboard-validators","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/polkadot-dashboards/legacy/polkadot-staking-dashboard-validators.md","tags":[],"version":"current","lastUpdatedBy":"MK","lastUpdatedAt":1717658873000,"frontMatter":{"id":"polkadot-staking-dashboard-validators","title":"Polkadot Staking Dashboard (Validators)","sidebar_label":"Staking Dashboard (Validators)","description":"Polkadot Staking Dashboard (Validators) descriptions","keywords":["polkadot","governance","dashboard","dune"],"slug":"../polkadot-staking-dashboard-validators"}}');var o=s(74848),d=s(28453);const r={id:"polkadot-staking-dashboard-validators",title:"Polkadot Staking Dashboard (Validators)",sidebar_label:"Staking Dashboard (Validators)",description:"Polkadot Staking Dashboard (Validators) descriptions",keywords:["polkadot","governance","dashboard","dune"],slug:"../polkadot-staking-dashboard-validators"},n="Polkadot Staking Dashboard (Validators)",i={},l=[{value:"View On Dune: Polkadot Staking Dashboard",id:"view-on-dune-polkadot-staking-dashboard",level:2},{value:"Polkadot Staking Rewards",id:"polkadot-staking-rewards",level:2}];function h(a){const t={a:"a",em:"em",h1:"h1",h2:"h2",header:"header",p:"p",strong:"strong",...(0,d.R)(),...a.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.header,{children:(0,o.jsx)(t.h1,{id:"polkadot-staking-dashboard-validators",children:"Polkadot Staking Dashboard (Validators)"})}),"\n",(0,o.jsxs)(t.h2,{id:"view-on-dune-polkadot-staking-dashboard",children:["View On Dune: ",(0,o.jsx)(t.a,{href:"https://dune.com/substrate/polkadot-staking-validators",children:"Polkadot Staking Dashboard"})]}),"\n",(0,o.jsx)(t.h2,{id:"polkadot-staking-rewards",children:"Polkadot Staking Rewards"}),"\n",(0,o.jsxs)(t.p,{children:[(0,o.jsx)(t.strong,{children:"Reward Rate"})," - computed as (validator_erasRewardPoints/erasRewardPoints_total) *\nErasValidatorReward / validator_total_stake."]}),"\n",(0,o.jsxs)(t.p,{children:[(0,o.jsx)(t.strong,{children:"Effective Reward Rate"})," - computed as (1-validator",(0,o.jsx)(t.em,{children:"commision) *\n(validator"}),"erasRewardPoints/erasRewardPoints_total) * ErasValidatorReward / validator_total_stake -\nIn other words, (1-validator_commision) *Reward Rate, after considering validator_commision"]}),"\n",(0,o.jsxs)(t.p,{children:[(0,o.jsx)(t.strong,{children:"Normalized Reward Rate"})," - computed as total_era_rewards / number_of_validators * (1 -\ncommission) / validator_total_stake. This metric nomoralized the reward rate across active validator\nsets"]}),"\n",(0,o.jsxs)(t.p,{children:["Source Table: ",(0,o.jsx)(t.strong,{children:"polkadot.stakings"})," , MaterializedView:\n",(0,o.jsx)(t.a,{href:"https://dune.com/queries/3302709",children:(0,o.jsx)(t.strong,{children:"dune.substrate.result_polkadot_validators"})})]}),"\n",(0,o.jsxs)(t.p,{children:["Go back to ",(0,o.jsx)(t.a,{href:"https://dune.com/substrate/polkadot-staking",children:(0,o.jsx)(t.strong,{children:"Polkadot Staking Home"})})]}),"\n",(0,o.jsx)("iframe",{src:"https://dune.com/embeds/3459458/5813993/",height:"350",width:"100%"}),"\n",(0,o.jsx)("iframe",{src:"https://dune.com/embeds/3459458/5814228/",height:"350",width:"100%"}),"\n",(0,o.jsx)("iframe",{src:"https://dune.com/embeds/3459458/5814232/",height:"350",width:"100%"}),"\n",(0,o.jsx)("iframe",{src:"https://dune.com/embeds/3459458/5814240/",height:"350",width:"100%"}),"\n",(0,o.jsx)("iframe",{src:"https://dune.com/embeds/3459458/5814241/",height:"350",width:"100%"}),"\n",(0,o.jsx)("iframe",{src:"https://dune.com/embeds/3459458/5814242/",height:"350",width:"100%"}),"\n",(0,o.jsx)("iframe",{src:"https://dune.com/embeds/3459458/5814243/",height:"350",width:"100%"}),"\n",(0,o.jsx)("iframe",{src:"https://dune.com/embeds/3459458/5814244/",height:"350",width:"100%"}),"\n",(0,o.jsx)("iframe",{src:"https://dune.com/embeds/3459613/5814194/",height:"350",width:"100%"})]})}function c(a={}){const{wrapper:t}={...(0,d.R)(),...a.components};return t?(0,o.jsx)(t,{...a,children:(0,o.jsx)(h,{...a})}):h(a)}},28453:(a,t,s)=>{s.d(t,{R:()=>r,x:()=>n});var e=s(96540);const o={},d=e.createContext(o);function r(a){const t=e.useContext(d);return e.useMemo((function(){return"function"==typeof a?a(t):{...t,...a}}),[t,a])}function n(a){let t;return t=a.disableParentContext?"function"==typeof a.components?a.components(o):a.components||o:r(a.components),e.createElement(d.Provider,{value:t},a.children)}}}]); \ No newline at end of file diff --git a/assets/js/71ed82b9.0b4ee1cd.js b/assets/js/71ed82b9.0b4ee1cd.js new file mode 100644 index 000000000000..f91274f12cc9 --- /dev/null +++ b/assets/js/71ed82b9.0b4ee1cd.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1369],{61987:(e,t,o)=>{o.r(t),o.d(t,{assets:()=>a,contentTitle:()=>l,default:()=>c,frontMatter:()=>r,metadata:()=>n,toc:()=>d});const n=JSON.parse('{"id":"general/start-building","title":"Build on Polkadot","description":"Start Building with the Polkadot SDK.","source":"@site/../docs/general/start-building.md","sourceDirName":"general","slug":"/start-building","permalink":"/docs/start-building","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/start-building.md","tags":[],"version":"current","lastUpdatedBy":"bader y","lastUpdatedAt":1715065584000,"frontMatter":{"id":"start-building","title":"Build on Polkadot","sidebar_label":"Build on Polkadot","description":"Start Building with the Polkadot SDK.","slug":"../start-building"},"sidebar":"docs","previous":{"title":"Transaction Verification","permalink":"/docs/transaction-attacks"},"next":{"title":"FAQ","permalink":"/docs/faq"}}');var s=o(74848),i=o(28453);const r={id:"start-building",title:"Build on Polkadot",sidebar_label:"Build on Polkadot",description:"Start Building with the Polkadot SDK.",slug:"../start-building"},l=void 0,a={},d=[{value:"Polkadot SDK",id:"polkadot-sdk",level:2},{value:"Requests for Comment (RFCs)",id:"requests-for-comment-rfcs",level:2}];function h(e){const t={a:"a",admonition:"admonition",code:"code",h2:"h2",li:"li",p:"p",ul:"ul",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.h2,{id:"polkadot-sdk",children:"Polkadot SDK"}),"\n",(0,s.jsxs)(t.p,{children:["The ",(0,s.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk",children:"Polkadot SDK"})," repository provides all the resources\nneeded to start building on the Polkadot network, a multi-chain blockchain platform that enables\ndifferent blockchains to interoperate and share information in a secure and scalable way. The\nPolkadot SDK comprises three main pieces of software:"]}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/polkadot",children:"Polkadot Node"})}),"\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/substrate",children:"Substrate Blockchain SDK"})}),"\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/cumulus",children:"Cumulus Tool Suite for Parachains"})}),"\n"]}),"\n",(0,s.jsxs)(t.p,{children:["The programming language used for development is ",(0,s.jsx)(t.a,{href:"https://www.rust-lang.org/",children:"Rust"}),"."]}),"\n",(0,s.jsx)(t.admonition,{type:"info",children:(0,s.jsxs)(t.p,{children:["For more information about building on Polkadot, see ",(0,s.jsx)(t.a,{href:"/docs/build-guide",children:"the Builder's Guide"}),"."]})}),"\n",(0,s.jsx)(t.h2,{id:"requests-for-comment-rfcs",children:"Requests for Comment (RFCs)"}),"\n",(0,s.jsxs)(t.p,{children:["With the release of ",(0,s.jsx)(t.a,{href:"/docs/polkadot-v1",children:"Polkadot runtime 1.0"}),", Polkadot's codebase is in the hands of\nthe community. Anyone can open a\n",(0,s.jsx)(t.a,{href:"https://github.com/polkadot-fellows/RFCs",children:"Request for Comment (RFC)"})," to propose and discuss changes\nto the network protocol, runtime logic, public interfaces, and other technical matters."]}),"\n",(0,s.jsxs)(t.p,{children:["To submit an RFC, follow the instructions ",(0,s.jsx)(t.a,{href:"https://github.com/polkadot-fellows/RFCs#process",children:"here"}),"."]}),"\n",(0,s.jsxs)(t.p,{children:["RFCs can only be approved and merged by III-Dan members of\n",(0,s.jsx)(t.a,{href:"/docs/learn-polkadot-technical-fellowship",children:"Polkadot Technical Fellowship"})," via on-chain voting\nmechanism. Definitive approval or rejection is done by issuing the ",(0,s.jsx)(t.code,{children:"RFC_APPROVE(xxxx, h)"})," or\n",(0,s.jsx)(t.code,{children:"RFC_REJECT(xxxx, h)"})," on-chain remark from the Fellowship origin on the Polkadot Collectives\nparachain, where ",(0,s.jsx)(t.code,{children:"xxxx"})," is the RFC number and ",(0,s.jsx)(t.code,{children:"h"})," is the hash of the raw proposal text."]}),"\n",(0,s.jsxs)(t.p,{children:["For example, the first RFC ",(0,s.jsx)(t.a,{href:"https://github.com/polkadot-fellows/RFCs/pull/1",children:"RFC-1"})," about Agile\nCoretime was proposed by Gavin Wood on the 30th of June 2023 and merged on the 12th of August 2023.\nSubsequently, the\n",(0,s.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/substrate/pull/14568",children:"code for the Agile Coretime Broker pallet"}),"\nwas added to the Substrate FRAME system."]}),"\n",(0,s.jsx)(t.p,{children:"In general, the workflow from RFC write-up submission to its implementation follows the timeline\nbelow:"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:["RFC submitted by following the ",(0,s.jsx)(t.a,{href:"https://github.com/polkadot-fellows/RFCs#process",children:"instructions"}),"."]}),"\n",(0,s.jsxs)(t.li,{children:["RFC review by the Technical Fellowship ",(0,s.jsx)(t.a,{href:"https://github.com/polkadot-fellows/RFCs",children:"via GitHub"})]}),"\n",(0,s.jsxs)(t.li,{children:["Polkadot Technical Fellowship Referendum of the RFC submitted to the Track ",(0,s.jsx)(t.code,{children:"3 / Fellows"})," by\nmembers with a rank greater than or equal to 3."]}),"\n",(0,s.jsx)(t.li,{children:"If the Referendum is approved through on-chain vote by the Technical Fellowship, changes discussed\nin the RFC will be implemented."}),"\n",(0,s.jsxs)(t.li,{children:["If the changes requested through the RFC require a broader consensus of DOT holders, an OpenGov\nreferendum may be created. For instance,\n",(0,s.jsx)(t.a,{href:"https://github.com/polkadot-fellows/RFCs/blob/main/text/0012-process-for-adding-new-collectives.md",children:"adding a new system collective"}),"\nor making changes to network parameters like inflation rate, treasury inflow etc."]}),"\n"]}),"\n",(0,s.jsx)(t.admonition,{title:"Polkadot Runtime Code Changes through Root track",type:"note",children:(0,s.jsxs)(t.p,{children:["Although the Technical Fellowship maintains the\n",(0,s.jsx)(t.a,{href:"https://github.com/polkadot-fellows/runtimes",children:"runtimes of Polkadot and Kusama"}),", changes to the\nnetwork protocol are not gated by the fellowship. Any DOT holder can submit a referendum on\n",(0,s.jsx)(t.a,{href:"/docs/learn-polkadot-opengov-origins#root",children:"the Polkadot OpenGov Root track"})," to set the\nruntime code with the proposed changes."]})}),"\n",(0,s.jsxs)(t.p,{children:["For more information about the adoption of RFCs within the Polkadot ecosystem, see\n",(0,s.jsx)(t.a,{href:"https://www.polkadotphilosophy.com/polkadots-strategic-adoption-of-rfcs-pioneering-a-collaborative-future-in-blockchain-3330843cfd4f",children:"this Medium article"}),"\nand the\n",(0,s.jsx)(t.a,{href:"https://forum.polkadot.network/t/polkadot-protocol-proposals-rfc-process/1421/1",children:"original Polkadot Forum post"}),"."]})]})}function c(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}},28453:(e,t,o)=>{o.d(t,{R:()=>r,x:()=>l});var n=o(96540);const s={},i=n.createContext(s);function r(e){const t=n.useContext(i);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function l(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:r(e.components),n.createElement(i.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/71ed82b9.16583df4.js b/assets/js/71ed82b9.16583df4.js deleted file mode 100644 index aecc97a20e5a..000000000000 --- a/assets/js/71ed82b9.16583df4.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1369],{77371:(e,t,o)=>{o.r(t),o.d(t,{assets:()=>a,contentTitle:()=>r,default:()=>c,frontMatter:()=>s,metadata:()=>l,toc:()=>d});var n=o(74848),i=o(28453);const s={id:"start-building",title:"Build on Polkadot",sidebar_label:"Build on Polkadot",description:"Start Building with the Polkadot SDK.",slug:"../start-building"},r=void 0,l={id:"general/start-building",title:"Build on Polkadot",description:"Start Building with the Polkadot SDK.",source:"@site/../docs/general/start-building.md",sourceDirName:"general",slug:"/start-building",permalink:"/docs/start-building",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/start-building.md",tags:[],version:"current",lastUpdatedBy:"bader y",lastUpdatedAt:1715065584e3,frontMatter:{id:"start-building",title:"Build on Polkadot",sidebar_label:"Build on Polkadot",description:"Start Building with the Polkadot SDK.",slug:"../start-building"},sidebar:"docs",previous:{title:"Transaction Verification",permalink:"/docs/transaction-attacks"},next:{title:"FAQ",permalink:"/docs/faq"}},a={},d=[{value:"Polkadot SDK",id:"polkadot-sdk",level:2},{value:"Requests for Comment (RFCs)",id:"requests-for-comment-rfcs",level:2}];function h(e){const t={a:"a",admonition:"admonition",code:"code",h2:"h2",li:"li",p:"p",ul:"ul",...(0,i.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.h2,{id:"polkadot-sdk",children:"Polkadot SDK"}),"\n",(0,n.jsxs)(t.p,{children:["The ",(0,n.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk",children:"Polkadot SDK"})," repository provides all the resources\nneeded to start building on the Polkadot network, a multi-chain blockchain platform that enables\ndifferent blockchains to interoperate and share information in a secure and scalable way. The\nPolkadot SDK comprises three main pieces of software:"]}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsx)(t.li,{children:(0,n.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/polkadot",children:"Polkadot Node"})}),"\n",(0,n.jsx)(t.li,{children:(0,n.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/substrate",children:"Substrate Blockchain SDK"})}),"\n",(0,n.jsx)(t.li,{children:(0,n.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/cumulus",children:"Cumulus Tool Suite for Parachains"})}),"\n"]}),"\n",(0,n.jsxs)(t.p,{children:["The programming language used for development is ",(0,n.jsx)(t.a,{href:"https://www.rust-lang.org/",children:"Rust"}),"."]}),"\n",(0,n.jsx)(t.admonition,{type:"info",children:(0,n.jsxs)(t.p,{children:["For more information about building on Polkadot, see ",(0,n.jsx)(t.a,{href:"/docs/build-guide",children:"the Builder's Guide"}),"."]})}),"\n",(0,n.jsx)(t.h2,{id:"requests-for-comment-rfcs",children:"Requests for Comment (RFCs)"}),"\n",(0,n.jsxs)(t.p,{children:["With the release of ",(0,n.jsx)(t.a,{href:"/docs/polkadot-v1",children:"Polkadot runtime 1.0"}),", Polkadot's codebase is in the hands of\nthe community. Anyone can open a\n",(0,n.jsx)(t.a,{href:"https://github.com/polkadot-fellows/RFCs",children:"Request for Comment (RFC)"})," to propose and discuss changes\nto the network protocol, runtime logic, public interfaces, and other technical matters."]}),"\n",(0,n.jsxs)(t.p,{children:["To submit an RFC, follow the instructions ",(0,n.jsx)(t.a,{href:"https://github.com/polkadot-fellows/RFCs#process",children:"here"}),"."]}),"\n",(0,n.jsxs)(t.p,{children:["RFCs can only be approved and merged by III-Dan members of\n",(0,n.jsx)(t.a,{href:"/docs/learn-polkadot-technical-fellowship",children:"Polkadot Technical Fellowship"})," via on-chain voting\nmechanism. Definitive approval or rejection is done by issuing the ",(0,n.jsx)(t.code,{children:"RFC_APPROVE(xxxx, h)"})," or\n",(0,n.jsx)(t.code,{children:"RFC_REJECT(xxxx, h)"})," on-chain remark from the Fellowship origin on the Polkadot Collectives\nparachain, where ",(0,n.jsx)(t.code,{children:"xxxx"})," is the RFC number and ",(0,n.jsx)(t.code,{children:"h"})," is the hash of the raw proposal text."]}),"\n",(0,n.jsxs)(t.p,{children:["For example, the first RFC ",(0,n.jsx)(t.a,{href:"https://github.com/polkadot-fellows/RFCs/pull/1",children:"RFC-1"})," about Agile\nCoretime was proposed by Gavin Wood on the 30th of June 2023 and merged on the 12th of August 2023.\nSubsequently, the\n",(0,n.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/substrate/pull/14568",children:"code for the Agile Coretime Broker pallet"}),"\nwas added to the Substrate FRAME system."]}),"\n",(0,n.jsx)(t.p,{children:"In general, the workflow from RFC write-up submission to its implementation follows the timeline\nbelow:"}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:["RFC submitted by following the ",(0,n.jsx)(t.a,{href:"https://github.com/polkadot-fellows/RFCs#process",children:"instructions"}),"."]}),"\n",(0,n.jsxs)(t.li,{children:["RFC review by the Technical Fellowship ",(0,n.jsx)(t.a,{href:"https://github.com/polkadot-fellows/RFCs",children:"via GitHub"})]}),"\n",(0,n.jsxs)(t.li,{children:["Polkadot Technical Fellowship Referendum of the RFC submitted to the Track ",(0,n.jsx)(t.code,{children:"3 / Fellows"})," by\nmembers with a rank greater than or equal to 3."]}),"\n",(0,n.jsx)(t.li,{children:"If the Referendum is approved through on-chain vote by the Technical Fellowship, changes discussed\nin the RFC will be implemented."}),"\n",(0,n.jsxs)(t.li,{children:["If the changes requested through the RFC require a broader consensus of DOT holders, an OpenGov\nreferendum may be created. For instance,\n",(0,n.jsx)(t.a,{href:"https://github.com/polkadot-fellows/RFCs/blob/main/text/0012-process-for-adding-new-collectives.md",children:"adding a new system collective"}),"\nor making changes to network parameters like inflation rate, treasury inflow etc."]}),"\n"]}),"\n",(0,n.jsx)(t.admonition,{title:"Polkadot Runtime Code Changes through Root track",type:"note",children:(0,n.jsxs)(t.p,{children:["Although the Technical Fellowship maintains the\n",(0,n.jsx)(t.a,{href:"https://github.com/polkadot-fellows/runtimes",children:"runtimes of Polkadot and Kusama"}),", changes to the\nnetwork protocol are not gated by the fellowship. Any DOT holder can submit a referendum on\n",(0,n.jsx)(t.a,{href:"/docs/learn-polkadot-opengov-origins#root",children:"the Polkadot OpenGov Root track"})," to set the\nruntime code with the proposed changes."]})}),"\n",(0,n.jsxs)(t.p,{children:["For more information about the adoption of RFCs within the Polkadot ecosystem, see\n",(0,n.jsx)(t.a,{href:"https://www.polkadotphilosophy.com/polkadots-strategic-adoption-of-rfcs-pioneering-a-collaborative-future-in-blockchain-3330843cfd4f",children:"this Medium article"}),"\nand the\n",(0,n.jsx)(t.a,{href:"https://forum.polkadot.network/t/polkadot-protocol-proposals-rfc-process/1421/1",children:"original Polkadot Forum post"}),"."]})]})}function c(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(h,{...e})}):h(e)}},28453:(e,t,o)=>{o.d(t,{R:()=>r,x:()=>l});var n=o(96540);const i={},s=n.createContext(i);function r(e){const t=n.useContext(s);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function l(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),n.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/72b78d4a.30285b87.js b/assets/js/72b78d4a.30285b87.js deleted file mode 100644 index b34ea13f5043..000000000000 --- a/assets/js/72b78d4a.30285b87.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1772],{13109:(e,n,o)=>{o.r(n),o.d(n,{assets:()=>d,contentTitle:()=>a,default:()=>h,frontMatter:()=>i,metadata:()=>r,toc:()=>l});var t=o(74848),s=o(28453);const i={id:"polkadot-opengov-referendum-voting-analysis",title:"Polkadot Opengov - Referendum Voting Analysis",sidebar_label:"Referendum Voting Analysis",description:"Polkadot Opengov - Referendum Voting Analysis descriptions",keywords:["polkadot","governance","dashboard","dune"],slug:"../polkadot-opengov-referendum-voting-analysis"},a="Polkadot Opengov - Referendum Voting Analysis",r={id:"general/dune-analytics/polkadot-dashboards/legacy/polkadot-opengov-referendum-voting-analysis",title:"Polkadot Opengov - Referendum Voting Analysis",description:"Polkadot Opengov - Referendum Voting Analysis descriptions",source:"@site/../docs/general/dune-analytics/polkadot-dashboards/legacy/polkadot-opengov-referendum-voting-analysis.md",sourceDirName:"general/dune-analytics/polkadot-dashboards/legacy",slug:"/general/dune-analytics/polkadot-dashboards/polkadot-opengov-referendum-voting-analysis",permalink:"/docs/general/dune-analytics/polkadot-dashboards/polkadot-opengov-referendum-voting-analysis",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/polkadot-dashboards/legacy/polkadot-opengov-referendum-voting-analysis.md",tags:[],version:"current",lastUpdatedBy:"MK",lastUpdatedAt:1717658873e3,frontMatter:{id:"polkadot-opengov-referendum-voting-analysis",title:"Polkadot Opengov - Referendum Voting Analysis",sidebar_label:"Referendum Voting Analysis",description:"Polkadot Opengov - Referendum Voting Analysis descriptions",keywords:["polkadot","governance","dashboard","dune"],slug:"../polkadot-opengov-referendum-voting-analysis"}},d={},l=[{value:"View On Dune: Polkadot Opengov - Referendum Voting Analysis",id:"view-on-dune-polkadot-opengov---referendum-voting-analysis",level:2},{value:"Voting Power Daily Accumulation",id:"voting-power-daily-accumulation",level:2},{value:"Aye vs Nay",id:"aye-vs-nay",level:2},{value:"Aye votes analysis",id:"aye-votes-analysis",level:2},{value:"Nay votes analysis",id:"nay-votes-analysis",level:2},{value:"Abstain votes analysis",id:"abstain-votes-analysis",level:2},{value:"First time voter analysis",id:"first-time-voter-analysis",level:2},{value:"Voter conviction adjustment",id:"voter-conviction-adjustment",level:2},{value:"Methodology",id:"methodology",level:2},{value:"Awakened Voters",id:"awakened-voters",level:2}];function c(e){const n={a:"a",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.header,{children:(0,t.jsx)(n.h1,{id:"polkadot-opengov---referendum-voting-analysis",children:"Polkadot Opengov - Referendum Voting Analysis"})}),"\n",(0,t.jsxs)(n.h2,{id:"view-on-dune-polkadot-opengov---referendum-voting-analysis",children:["View On Dune: ",(0,t.jsx)(n.a,{href:"https://dune.com/substrate/polkadot-referendum",children:"Polkadot Opengov - Referendum Voting Analysis"})]}),"\n",(0,t.jsxs)(n.p,{children:["We're using ",(0,t.jsx)(n.strong,{children:"default parameters"})," for all of the following parameterized charts. Visit our\ndashboard on Dune to use the ",(0,t.jsx)(n.strong,{children:"referendum_id"})," parameter and analyze a specific referendum."]}),"\n",(0,t.jsxs)(n.p,{children:["Source table: ",(0,t.jsx)(n.strong,{children:"polkadot.events"}),", ",(0,t.jsx)(n.strong,{children:"polkadot.calls"})]}),"\n",(0,t.jsxs)(n.p,{children:["Authored by ",(0,t.jsx)(n.a,{href:"https://x.com/colorfulnotion",children:(0,t.jsx)(n.strong,{children:"@ colorfulnotion"})})]}),"\n",(0,t.jsx)(n.h2,{id:"voting-power-daily-accumulation",children:"Voting Power Daily Accumulation"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:'Daily cumulative "Aye" and "Nay" voting powers, along with approval and support rates for a\nspecific referendum.'}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Approval Rate"})," - (Conviction _ Aye token) / ((Conviction _ Aye token) + (Conviction * Nay\ntoken))"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Support Rate"})," - (Aye token + Abstain token) / Total Issuance"]}),"\n",(0,t.jsxs)(n.li,{children:["Learn more about\n",(0,t.jsx)(n.a,{href:"https://wiki.polkadot.network/docs/learn-polkadot-opengov-origins#origins-and-tracks-info",children:(0,t.jsx)(n.strong,{children:"Opengov Support & Approval"})})]}),"\n"]}),"\n",(0,t.jsx)("iframe",{src:"https://dune.com/embeds/3394377/5695923/",height:"350",width:"100%"}),"\n",(0,t.jsx)(n.h2,{id:"aye-vs-nay",children:"Aye vs Nay"}),"\n",(0,t.jsx)(n.p,{children:'"Aye Power" (Conviction _ Aye Token) vs "Nay Power" (Conviction _ Nay Token)'}),"\n",(0,t.jsx)("iframe",{src:"https://dune.com/embeds/3394358/5695887/",height:"350",width:"100%"}),"\n",(0,t.jsx)(n.h2,{id:"aye-votes-analysis",children:"Aye votes analysis"}),"\n",(0,t.jsxs)(n.p,{children:["All voters who voted ",(0,t.jsx)(n.strong,{children:"AYE"}),' for the referendum, sorted by "Voting Power" (Conviction * Token),\nincluding split Aye']}),"\n",(0,t.jsx)("iframe",{src:"https://dune.com/embeds/3394729/5696475/",height:"350",width:"100%"}),"\n",(0,t.jsx)("iframe",{src:"https://dune.com/embeds/3394729/5697343/",height:"350",width:"100%"}),"\n",(0,t.jsx)("iframe",{src:"https://dune.com/embeds/3394729/5701237/",height:"350",width:"100%"}),"\n",(0,t.jsx)(n.h2,{id:"nay-votes-analysis",children:"Nay votes analysis"}),"\n",(0,t.jsxs)(n.p,{children:["All voters who voted ",(0,t.jsx)(n.strong,{children:"NAY"}),' for the referendum, sorted by "Voting Power" (Conviction * Token),\nincluding Split NAY']}),"\n",(0,t.jsx)("iframe",{src:"https://dune.com/embeds/3394774/5696554/",height:"350",width:"100%"}),"\n",(0,t.jsx)("iframe",{src:"https://dune.com/embeds/3394774/5697365/",height:"350",width:"100%"}),"\n",(0,t.jsx)("iframe",{src:"https://dune.com/embeds/3394774/5701248/",height:"350",width:"100%"}),"\n",(0,t.jsx)(n.h2,{id:"abstain-votes-analysis",children:"Abstain votes analysis"}),"\n",(0,t.jsxs)(n.p,{children:["All voters who ",(0,t.jsx)(n.strong,{children:"Abstain"}),' themselves for the referendum, sorted by "Voting Power" (0.1X * Token)']}),"\n",(0,t.jsx)("iframe",{src:"https://dune.com/embeds/3394782/5696570/",height:"350",width:"100%"}),"\n",(0,t.jsx)("iframe",{src:"https://dune.com/embeds/3394782/5697378/",height:"350",width:"100%"}),"\n",(0,t.jsx)(n.h2,{id:"first-time-voter-analysis",children:"First time voter analysis"}),"\n",(0,t.jsxs)(n.p,{children:["A Referendum is considered hot or controversital if it has high turnout or high ",(0,t.jsx)(n.strong,{children:"First-time Voting\nRate"})]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"First-time voters who voted \u201cAye\u201d or \u201cNay\u201d in a specific referendum."}),"\n",(0,t.jsx)(n.li,{children:"First-time Voting Rate: first-time voters / total voters"}),"\n"]}),"\n",(0,t.jsx)("iframe",{src:"https://dune.com/embeds/3395256/5697453/",height:"350",width:"100%"}),"\n",(0,t.jsx)(n.h2,{id:"voter-conviction-adjustment",children:"Voter conviction adjustment"}),"\n",(0,t.jsx)(n.p,{children:"Analyze the change in voter's voting conviction for a specific referendum which offers insights into\nhow voter convictions shift across referenda."}),"\n",(0,t.jsx)(n.h2,{id:"methodology",children:"Methodology"}),"\n",(0,t.jsx)(n.p,{children:"Calculates each voter's previous average conviction, compares it to their current conviction in the\nreferendum, and categorizes the change as Increase \ud83d\udd3c, Maintain \ud83d\udd01, or Decrease \ud83d\udd3d. Finally, it\nprovides counts and percentages for each category"}),"\n",(0,t.jsx)("iframe",{src:"https://dune.com/embeds/3397420/5701499/",height:"350",width:"100%"}),"\n",(0,t.jsx)("iframe",{src:"https://dune.com/embeds/3397420/5703298/",height:"350",width:"100%"}),"\n",(0,t.jsx)(n.h2,{id:"awakened-voters",children:"Awakened Voters"}),"\n",(0,t.jsx)(n.p,{children:'Enumerate the "Aye" and "Nay" voters who have not voted in the last 90 days'}),"\n",(0,t.jsx)("iframe",{src:"https://dune.com/embeds/3399552/5705369/",height:"350",width:"100%"}),"\n",(0,t.jsx)("iframe",{src:"https://dune.com/embeds/3401113/5707996/",height:"350",width:"100%"})]})}function h(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(c,{...e})}):c(e)}},28453:(e,n,o)=>{o.d(n,{R:()=>a,x:()=>r});var t=o(96540);const s={},i=t.createContext(s);function a(e){const n=t.useContext(i);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:a(e.components),t.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/72b78d4a.8324409f.js b/assets/js/72b78d4a.8324409f.js new file mode 100644 index 000000000000..4516bc4feac2 --- /dev/null +++ b/assets/js/72b78d4a.8324409f.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1772],{9627:(e,n,o)=>{o.r(n),o.d(n,{assets:()=>d,contentTitle:()=>r,default:()=>h,frontMatter:()=>a,metadata:()=>t,toc:()=>l});const t=JSON.parse('{"id":"general/dune-analytics/polkadot-dashboards/legacy/polkadot-opengov-referendum-voting-analysis","title":"Polkadot Opengov - Referendum Voting Analysis","description":"Polkadot Opengov - Referendum Voting Analysis descriptions","source":"@site/../docs/general/dune-analytics/polkadot-dashboards/legacy/polkadot-opengov-referendum-voting-analysis.md","sourceDirName":"general/dune-analytics/polkadot-dashboards/legacy","slug":"/general/dune-analytics/polkadot-dashboards/polkadot-opengov-referendum-voting-analysis","permalink":"/docs/general/dune-analytics/polkadot-dashboards/polkadot-opengov-referendum-voting-analysis","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/polkadot-dashboards/legacy/polkadot-opengov-referendum-voting-analysis.md","tags":[],"version":"current","lastUpdatedBy":"MK","lastUpdatedAt":1717658873000,"frontMatter":{"id":"polkadot-opengov-referendum-voting-analysis","title":"Polkadot Opengov - Referendum Voting Analysis","sidebar_label":"Referendum Voting Analysis","description":"Polkadot Opengov - Referendum Voting Analysis descriptions","keywords":["polkadot","governance","dashboard","dune"],"slug":"../polkadot-opengov-referendum-voting-analysis"}}');var s=o(74848),i=o(28453);const a={id:"polkadot-opengov-referendum-voting-analysis",title:"Polkadot Opengov - Referendum Voting Analysis",sidebar_label:"Referendum Voting Analysis",description:"Polkadot Opengov - Referendum Voting Analysis descriptions",keywords:["polkadot","governance","dashboard","dune"],slug:"../polkadot-opengov-referendum-voting-analysis"},r="Polkadot Opengov - Referendum Voting Analysis",d={},l=[{value:"View On Dune: Polkadot Opengov - Referendum Voting Analysis",id:"view-on-dune-polkadot-opengov---referendum-voting-analysis",level:2},{value:"Voting Power Daily Accumulation",id:"voting-power-daily-accumulation",level:2},{value:"Aye vs Nay",id:"aye-vs-nay",level:2},{value:"Aye votes analysis",id:"aye-votes-analysis",level:2},{value:"Nay votes analysis",id:"nay-votes-analysis",level:2},{value:"Abstain votes analysis",id:"abstain-votes-analysis",level:2},{value:"First time voter analysis",id:"first-time-voter-analysis",level:2},{value:"Voter conviction adjustment",id:"voter-conviction-adjustment",level:2},{value:"Methodology",id:"methodology",level:2},{value:"Awakened Voters",id:"awakened-voters",level:2}];function c(e){const n={a:"a",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"polkadot-opengov---referendum-voting-analysis",children:"Polkadot Opengov - Referendum Voting Analysis"})}),"\n",(0,s.jsxs)(n.h2,{id:"view-on-dune-polkadot-opengov---referendum-voting-analysis",children:["View On Dune: ",(0,s.jsx)(n.a,{href:"https://dune.com/substrate/polkadot-referendum",children:"Polkadot Opengov - Referendum Voting Analysis"})]}),"\n",(0,s.jsxs)(n.p,{children:["We're using ",(0,s.jsx)(n.strong,{children:"default parameters"})," for all of the following parameterized charts. Visit our\ndashboard on Dune to use the ",(0,s.jsx)(n.strong,{children:"referendum_id"})," parameter and analyze a specific referendum."]}),"\n",(0,s.jsxs)(n.p,{children:["Source table: ",(0,s.jsx)(n.strong,{children:"polkadot.events"}),", ",(0,s.jsx)(n.strong,{children:"polkadot.calls"})]}),"\n",(0,s.jsxs)(n.p,{children:["Authored by ",(0,s.jsx)(n.a,{href:"https://x.com/colorfulnotion",children:(0,s.jsx)(n.strong,{children:"@ colorfulnotion"})})]}),"\n",(0,s.jsx)(n.h2,{id:"voting-power-daily-accumulation",children:"Voting Power Daily Accumulation"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:'Daily cumulative "Aye" and "Nay" voting powers, along with approval and support rates for a\nspecific referendum.'}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Approval Rate"})," - (Conviction _ Aye token) / ((Conviction _ Aye token) + (Conviction * Nay\ntoken))"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Support Rate"})," - (Aye token + Abstain token) / Total Issuance"]}),"\n",(0,s.jsxs)(n.li,{children:["Learn more about\n",(0,s.jsx)(n.a,{href:"https://wiki.polkadot.network/docs/learn-polkadot-opengov-origins#origins-and-tracks-info",children:(0,s.jsx)(n.strong,{children:"Opengov Support & Approval"})})]}),"\n"]}),"\n",(0,s.jsx)("iframe",{src:"https://dune.com/embeds/3394377/5695923/",height:"350",width:"100%"}),"\n",(0,s.jsx)(n.h2,{id:"aye-vs-nay",children:"Aye vs Nay"}),"\n",(0,s.jsx)(n.p,{children:'"Aye Power" (Conviction _ Aye Token) vs "Nay Power" (Conviction _ Nay Token)'}),"\n",(0,s.jsx)("iframe",{src:"https://dune.com/embeds/3394358/5695887/",height:"350",width:"100%"}),"\n",(0,s.jsx)(n.h2,{id:"aye-votes-analysis",children:"Aye votes analysis"}),"\n",(0,s.jsxs)(n.p,{children:["All voters who voted ",(0,s.jsx)(n.strong,{children:"AYE"}),' for the referendum, sorted by "Voting Power" (Conviction * Token),\nincluding split Aye']}),"\n",(0,s.jsx)("iframe",{src:"https://dune.com/embeds/3394729/5696475/",height:"350",width:"100%"}),"\n",(0,s.jsx)("iframe",{src:"https://dune.com/embeds/3394729/5697343/",height:"350",width:"100%"}),"\n",(0,s.jsx)("iframe",{src:"https://dune.com/embeds/3394729/5701237/",height:"350",width:"100%"}),"\n",(0,s.jsx)(n.h2,{id:"nay-votes-analysis",children:"Nay votes analysis"}),"\n",(0,s.jsxs)(n.p,{children:["All voters who voted ",(0,s.jsx)(n.strong,{children:"NAY"}),' for the referendum, sorted by "Voting Power" (Conviction * Token),\nincluding Split NAY']}),"\n",(0,s.jsx)("iframe",{src:"https://dune.com/embeds/3394774/5696554/",height:"350",width:"100%"}),"\n",(0,s.jsx)("iframe",{src:"https://dune.com/embeds/3394774/5697365/",height:"350",width:"100%"}),"\n",(0,s.jsx)("iframe",{src:"https://dune.com/embeds/3394774/5701248/",height:"350",width:"100%"}),"\n",(0,s.jsx)(n.h2,{id:"abstain-votes-analysis",children:"Abstain votes analysis"}),"\n",(0,s.jsxs)(n.p,{children:["All voters who ",(0,s.jsx)(n.strong,{children:"Abstain"}),' themselves for the referendum, sorted by "Voting Power" (0.1X * Token)']}),"\n",(0,s.jsx)("iframe",{src:"https://dune.com/embeds/3394782/5696570/",height:"350",width:"100%"}),"\n",(0,s.jsx)("iframe",{src:"https://dune.com/embeds/3394782/5697378/",height:"350",width:"100%"}),"\n",(0,s.jsx)(n.h2,{id:"first-time-voter-analysis",children:"First time voter analysis"}),"\n",(0,s.jsxs)(n.p,{children:["A Referendum is considered hot or controversital if it has high turnout or high ",(0,s.jsx)(n.strong,{children:"First-time Voting\nRate"})]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"First-time voters who voted \u201cAye\u201d or \u201cNay\u201d in a specific referendum."}),"\n",(0,s.jsx)(n.li,{children:"First-time Voting Rate: first-time voters / total voters"}),"\n"]}),"\n",(0,s.jsx)("iframe",{src:"https://dune.com/embeds/3395256/5697453/",height:"350",width:"100%"}),"\n",(0,s.jsx)(n.h2,{id:"voter-conviction-adjustment",children:"Voter conviction adjustment"}),"\n",(0,s.jsx)(n.p,{children:"Analyze the change in voter's voting conviction for a specific referendum which offers insights into\nhow voter convictions shift across referenda."}),"\n",(0,s.jsx)(n.h2,{id:"methodology",children:"Methodology"}),"\n",(0,s.jsx)(n.p,{children:"Calculates each voter's previous average conviction, compares it to their current conviction in the\nreferendum, and categorizes the change as Increase \ud83d\udd3c, Maintain \ud83d\udd01, or Decrease \ud83d\udd3d. Finally, it\nprovides counts and percentages for each category"}),"\n",(0,s.jsx)("iframe",{src:"https://dune.com/embeds/3397420/5701499/",height:"350",width:"100%"}),"\n",(0,s.jsx)("iframe",{src:"https://dune.com/embeds/3397420/5703298/",height:"350",width:"100%"}),"\n",(0,s.jsx)(n.h2,{id:"awakened-voters",children:"Awakened Voters"}),"\n",(0,s.jsx)(n.p,{children:'Enumerate the "Aye" and "Nay" voters who have not voted in the last 90 days'}),"\n",(0,s.jsx)("iframe",{src:"https://dune.com/embeds/3399552/5705369/",height:"350",width:"100%"}),"\n",(0,s.jsx)("iframe",{src:"https://dune.com/embeds/3401113/5707996/",height:"350",width:"100%"})]})}function h(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(c,{...e})}):c(e)}},28453:(e,n,o)=>{o.d(n,{R:()=>a,x:()=>r});var t=o(96540);const s={},i=t.createContext(s);function a(e){const n=t.useContext(i);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:a(e.components),t.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/73.5c54446f.js b/assets/js/73.5c54446f.js deleted file mode 100644 index ce102c8f06cd..000000000000 --- a/assets/js/73.5c54446f.js +++ /dev/null @@ -1,1820 +0,0 @@ -"use strict"; -exports.id = 73; -exports.ids = [73]; -exports.modules = { - -/***/ 24073: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ diagram: () => (/* binding */ diagram) -/* harmony export */ }); -/* harmony import */ var _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(86079); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(26312); -/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(74353); -/* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(16750); -/* harmony import */ var dompurify__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(99418); - - - - - - - - - - - -var parser = function() { - var o = function(k, v, o2, l) { - for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) - ; - return o2; - }, $V0 = [1, 3], $V1 = [1, 6], $V2 = [1, 4], $V3 = [1, 5], $V4 = [2, 5], $V5 = [1, 12], $V6 = [5, 7, 13, 19, 21, 23, 24, 26, 28, 31, 37, 40, 47], $V7 = [7, 13, 19, 21, 23, 24, 26, 28, 31, 37, 40], $V8 = [7, 12, 13, 19, 21, 23, 24, 26, 28, 31, 37, 40], $V9 = [7, 13, 47], $Va = [1, 42], $Vb = [1, 41], $Vc = [7, 13, 29, 32, 35, 38, 47], $Vd = [1, 55], $Ve = [1, 56], $Vf = [1, 57], $Vg = [7, 13, 32, 35, 42, 47]; - var parser2 = { - trace: function trace() { - }, - yy: {}, - symbols_: { "error": 2, "start": 3, "eol": 4, "GG": 5, "document": 6, "EOF": 7, ":": 8, "DIR": 9, "options": 10, "body": 11, "OPT": 12, "NL": 13, "line": 14, "statement": 15, "commitStatement": 16, "mergeStatement": 17, "cherryPickStatement": 18, "acc_title": 19, "acc_title_value": 20, "acc_descr": 21, "acc_descr_value": 22, "acc_descr_multiline_value": 23, "section": 24, "branchStatement": 25, "CHECKOUT": 26, "ref": 27, "BRANCH": 28, "ORDER": 29, "NUM": 30, "CHERRY_PICK": 31, "COMMIT_ID": 32, "STR": 33, "PARENT_COMMIT": 34, "COMMIT_TAG": 35, "EMPTYSTR": 36, "MERGE": 37, "COMMIT_TYPE": 38, "commitType": 39, "COMMIT": 40, "commit_arg": 41, "COMMIT_MSG": 42, "NORMAL": 43, "REVERSE": 44, "HIGHLIGHT": 45, "ID": 46, ";": 47, "$accept": 0, "$end": 1 }, - terminals_: { 2: "error", 5: "GG", 7: "EOF", 8: ":", 9: "DIR", 12: "OPT", 13: "NL", 19: "acc_title", 20: "acc_title_value", 21: "acc_descr", 22: "acc_descr_value", 23: "acc_descr_multiline_value", 24: "section", 26: "CHECKOUT", 28: "BRANCH", 29: "ORDER", 30: "NUM", 31: "CHERRY_PICK", 32: "COMMIT_ID", 33: "STR", 34: "PARENT_COMMIT", 35: "COMMIT_TAG", 36: "EMPTYSTR", 37: "MERGE", 38: "COMMIT_TYPE", 40: "COMMIT", 42: "COMMIT_MSG", 43: "NORMAL", 44: "REVERSE", 45: "HIGHLIGHT", 46: "ID", 47: ";" }, - productions_: [0, [3, 2], [3, 3], [3, 4], [3, 5], [6, 0], [6, 2], [10, 2], [10, 1], [11, 0], [11, 2], [14, 2], [14, 1], [15, 1], [15, 1], [15, 1], [15, 2], [15, 2], [15, 1], [15, 1], [15, 1], [15, 2], [25, 2], [25, 4], [18, 3], [18, 5], [18, 5], [18, 7], [18, 7], [18, 5], [18, 5], [18, 5], [18, 7], [18, 7], [18, 7], [18, 7], [17, 2], [17, 4], [17, 4], [17, 4], [17, 6], [17, 6], [17, 6], [17, 6], [17, 6], [17, 6], [17, 8], [17, 8], [17, 8], [17, 8], [17, 8], [17, 8], [16, 2], [16, 3], [16, 3], [16, 5], [16, 5], [16, 3], [16, 5], [16, 5], [16, 5], [16, 5], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 3], [16, 5], [16, 5], [16, 5], [16, 5], [16, 5], [16, 5], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [41, 0], [41, 1], [39, 1], [39, 1], [39, 1], [27, 1], [27, 1], [4, 1], [4, 1], [4, 1]], - performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { - var $0 = $$.length - 1; - switch (yystate) { - case 2: - return $$[$0]; - case 3: - return $$[$0 - 1]; - case 4: - yy.setDirection($$[$0 - 3]); - return $$[$0 - 1]; - case 6: - yy.setOptions($$[$0 - 1]); - this.$ = $$[$0]; - break; - case 7: - $$[$0 - 1] += $$[$0]; - this.$ = $$[$0 - 1]; - break; - case 9: - this.$ = []; - break; - case 10: - $$[$0 - 1].push($$[$0]); - this.$ = $$[$0 - 1]; - break; - case 11: - this.$ = $$[$0 - 1]; - break; - case 16: - this.$ = $$[$0].trim(); - yy.setAccTitle(this.$); - break; - case 17: - case 18: - this.$ = $$[$0].trim(); - yy.setAccDescription(this.$); - break; - case 19: - yy.addSection($$[$0].substr(8)); - this.$ = $$[$0].substr(8); - break; - case 21: - yy.checkout($$[$0]); - break; - case 22: - yy.branch($$[$0]); - break; - case 23: - yy.branch($$[$0 - 2], $$[$0]); - break; - case 24: - yy.cherryPick($$[$0], "", void 0); - break; - case 25: - yy.cherryPick($$[$0 - 2], "", void 0, $$[$0]); - break; - case 26: - yy.cherryPick($$[$0 - 2], "", $$[$0]); - break; - case 27: - yy.cherryPick($$[$0 - 4], "", $$[$0], $$[$0 - 2]); - break; - case 28: - yy.cherryPick($$[$0 - 4], "", $$[$0 - 2], $$[$0]); - break; - case 29: - yy.cherryPick($$[$0], "", $$[$0 - 2]); - break; - case 30: - yy.cherryPick($$[$0], "", ""); - break; - case 31: - yy.cherryPick($$[$0 - 2], "", ""); - break; - case 32: - yy.cherryPick($$[$0 - 4], "", "", $$[$0 - 2]); - break; - case 33: - yy.cherryPick($$[$0 - 4], "", "", $$[$0]); - break; - case 34: - yy.cherryPick($$[$0 - 2], "", $$[$0 - 4], $$[$0]); - break; - case 35: - yy.cherryPick($$[$0 - 2], "", "", $$[$0]); - break; - case 36: - yy.merge($$[$0], "", "", ""); - break; - case 37: - yy.merge($$[$0 - 2], $$[$0], "", ""); - break; - case 38: - yy.merge($$[$0 - 2], "", $$[$0], ""); - break; - case 39: - yy.merge($$[$0 - 2], "", "", $$[$0]); - break; - case 40: - yy.merge($$[$0 - 4], $$[$0], "", $$[$0 - 2]); - break; - case 41: - yy.merge($$[$0 - 4], "", $$[$0], $$[$0 - 2]); - break; - case 42: - yy.merge($$[$0 - 4], "", $$[$0 - 2], $$[$0]); - break; - case 43: - yy.merge($$[$0 - 4], $$[$0 - 2], $$[$0], ""); - break; - case 44: - yy.merge($$[$0 - 4], $$[$0 - 2], "", $$[$0]); - break; - case 45: - yy.merge($$[$0 - 4], $$[$0], $$[$0 - 2], ""); - break; - case 46: - yy.merge($$[$0 - 6], $$[$0 - 4], $$[$0 - 2], $$[$0]); - break; - case 47: - yy.merge($$[$0 - 6], $$[$0], $$[$0 - 4], $$[$0 - 2]); - break; - case 48: - yy.merge($$[$0 - 6], $$[$0 - 4], $$[$0], $$[$0 - 2]); - break; - case 49: - yy.merge($$[$0 - 6], $$[$0 - 2], $$[$0 - 4], $$[$0]); - break; - case 50: - yy.merge($$[$0 - 6], $$[$0], $$[$0 - 2], $$[$0 - 4]); - break; - case 51: - yy.merge($$[$0 - 6], $$[$0 - 2], $$[$0], $$[$0 - 4]); - break; - case 52: - yy.commit($$[$0]); - break; - case 53: - yy.commit("", "", yy.commitType.NORMAL, $$[$0]); - break; - case 54: - yy.commit("", "", $$[$0], ""); - break; - case 55: - yy.commit("", "", $$[$0], $$[$0 - 2]); - break; - case 56: - yy.commit("", "", $$[$0 - 2], $$[$0]); - break; - case 57: - yy.commit("", $$[$0], yy.commitType.NORMAL, ""); - break; - case 58: - yy.commit("", $$[$0 - 2], yy.commitType.NORMAL, $$[$0]); - break; - case 59: - yy.commit("", $$[$0], yy.commitType.NORMAL, $$[$0 - 2]); - break; - case 60: - yy.commit("", $$[$0 - 2], $$[$0], ""); - break; - case 61: - yy.commit("", $$[$0], $$[$0 - 2], ""); - break; - case 62: - yy.commit("", $$[$0 - 4], $$[$0 - 2], $$[$0]); - break; - case 63: - yy.commit("", $$[$0 - 4], $$[$0], $$[$0 - 2]); - break; - case 64: - yy.commit("", $$[$0 - 2], $$[$0 - 4], $$[$0]); - break; - case 65: - yy.commit("", $$[$0], $$[$0 - 4], $$[$0 - 2]); - break; - case 66: - yy.commit("", $$[$0], $$[$0 - 2], $$[$0 - 4]); - break; - case 67: - yy.commit("", $$[$0 - 2], $$[$0], $$[$0 - 4]); - break; - case 68: - yy.commit($$[$0], "", yy.commitType.NORMAL, ""); - break; - case 69: - yy.commit($$[$0], "", yy.commitType.NORMAL, $$[$0 - 2]); - break; - case 70: - yy.commit($$[$0 - 2], "", yy.commitType.NORMAL, $$[$0]); - break; - case 71: - yy.commit($$[$0 - 2], "", $$[$0], ""); - break; - case 72: - yy.commit($$[$0], "", $$[$0 - 2], ""); - break; - case 73: - yy.commit($$[$0], $$[$0 - 2], yy.commitType.NORMAL, ""); - break; - case 74: - yy.commit($$[$0 - 2], $$[$0], yy.commitType.NORMAL, ""); - break; - case 75: - yy.commit($$[$0 - 4], "", $$[$0 - 2], $$[$0]); - break; - case 76: - yy.commit($$[$0 - 4], "", $$[$0], $$[$0 - 2]); - break; - case 77: - yy.commit($$[$0 - 2], "", $$[$0 - 4], $$[$0]); - break; - case 78: - yy.commit($$[$0], "", $$[$0 - 4], $$[$0 - 2]); - break; - case 79: - yy.commit($$[$0], "", $$[$0 - 2], $$[$0 - 4]); - break; - case 80: - yy.commit($$[$0 - 2], "", $$[$0], $$[$0 - 4]); - break; - case 81: - yy.commit($$[$0 - 4], $$[$0], $$[$0 - 2], ""); - break; - case 82: - yy.commit($$[$0 - 4], $$[$0 - 2], $$[$0], ""); - break; - case 83: - yy.commit($$[$0 - 2], $$[$0], $$[$0 - 4], ""); - break; - case 84: - yy.commit($$[$0], $$[$0 - 2], $$[$0 - 4], ""); - break; - case 85: - yy.commit($$[$0], $$[$0 - 4], $$[$0 - 2], ""); - break; - case 86: - yy.commit($$[$0 - 2], $$[$0 - 4], $$[$0], ""); - break; - case 87: - yy.commit($$[$0 - 4], $$[$0], yy.commitType.NORMAL, $$[$0 - 2]); - break; - case 88: - yy.commit($$[$0 - 4], $$[$0 - 2], yy.commitType.NORMAL, $$[$0]); - break; - case 89: - yy.commit($$[$0 - 2], $$[$0], yy.commitType.NORMAL, $$[$0 - 4]); - break; - case 90: - yy.commit($$[$0], $$[$0 - 2], yy.commitType.NORMAL, $$[$0 - 4]); - break; - case 91: - yy.commit($$[$0], $$[$0 - 4], yy.commitType.NORMAL, $$[$0 - 2]); - break; - case 92: - yy.commit($$[$0 - 2], $$[$0 - 4], yy.commitType.NORMAL, $$[$0]); - break; - case 93: - yy.commit($$[$0 - 6], $$[$0 - 4], $$[$0 - 2], $$[$0]); - break; - case 94: - yy.commit($$[$0 - 6], $$[$0 - 4], $$[$0], $$[$0 - 2]); - break; - case 95: - yy.commit($$[$0 - 6], $$[$0 - 2], $$[$0 - 4], $$[$0]); - break; - case 96: - yy.commit($$[$0 - 6], $$[$0], $$[$0 - 4], $$[$0 - 2]); - break; - case 97: - yy.commit($$[$0 - 6], $$[$0 - 2], $$[$0], $$[$0 - 4]); - break; - case 98: - yy.commit($$[$0 - 6], $$[$0], $$[$0 - 2], $$[$0 - 4]); - break; - case 99: - yy.commit($$[$0 - 4], $$[$0 - 6], $$[$0 - 2], $$[$0]); - break; - case 100: - yy.commit($$[$0 - 4], $$[$0 - 6], $$[$0], $$[$0 - 2]); - break; - case 101: - yy.commit($$[$0 - 2], $$[$0 - 6], $$[$0 - 4], $$[$0]); - break; - case 102: - yy.commit($$[$0], $$[$0 - 6], $$[$0 - 4], $$[$0 - 2]); - break; - case 103: - yy.commit($$[$0 - 2], $$[$0 - 6], $$[$0], $$[$0 - 4]); - break; - case 104: - yy.commit($$[$0], $$[$0 - 6], $$[$0 - 2], $$[$0 - 4]); - break; - case 105: - yy.commit($$[$0], $$[$0 - 4], $$[$0 - 2], $$[$0 - 6]); - break; - case 106: - yy.commit($$[$0 - 2], $$[$0 - 4], $$[$0], $$[$0 - 6]); - break; - case 107: - yy.commit($$[$0], $$[$0 - 2], $$[$0 - 4], $$[$0 - 6]); - break; - case 108: - yy.commit($$[$0 - 2], $$[$0], $$[$0 - 4], $$[$0 - 6]); - break; - case 109: - yy.commit($$[$0 - 4], $$[$0 - 2], $$[$0], $$[$0 - 6]); - break; - case 110: - yy.commit($$[$0 - 4], $$[$0], $$[$0 - 2], $$[$0 - 6]); - break; - case 111: - yy.commit($$[$0 - 2], $$[$0 - 4], $$[$0 - 6], $$[$0]); - break; - case 112: - yy.commit($$[$0], $$[$0 - 4], $$[$0 - 6], $$[$0 - 2]); - break; - case 113: - yy.commit($$[$0 - 2], $$[$0], $$[$0 - 6], $$[$0 - 4]); - break; - case 114: - yy.commit($$[$0], $$[$0 - 2], $$[$0 - 6], $$[$0 - 4]); - break; - case 115: - yy.commit($$[$0 - 4], $$[$0 - 2], $$[$0 - 6], $$[$0]); - break; - case 116: - yy.commit($$[$0 - 4], $$[$0], $$[$0 - 6], $$[$0 - 2]); - break; - case 117: - this.$ = ""; - break; - case 118: - this.$ = $$[$0]; - break; - case 119: - this.$ = yy.commitType.NORMAL; - break; - case 120: - this.$ = yy.commitType.REVERSE; - break; - case 121: - this.$ = yy.commitType.HIGHLIGHT; - break; - } - }, - table: [{ 3: 1, 4: 2, 5: $V0, 7: $V1, 13: $V2, 47: $V3 }, { 1: [3] }, { 3: 7, 4: 2, 5: $V0, 7: $V1, 13: $V2, 47: $V3 }, { 6: 8, 7: $V4, 8: [1, 9], 9: [1, 10], 10: 11, 13: $V5 }, o($V6, [2, 124]), o($V6, [2, 125]), o($V6, [2, 126]), { 1: [2, 1] }, { 7: [1, 13] }, { 6: 14, 7: $V4, 10: 11, 13: $V5 }, { 8: [1, 15] }, o($V7, [2, 9], { 11: 16, 12: [1, 17] }), o($V8, [2, 8]), { 1: [2, 2] }, { 7: [1, 18] }, { 6: 19, 7: $V4, 10: 11, 13: $V5 }, { 7: [2, 6], 13: [1, 22], 14: 20, 15: 21, 16: 23, 17: 24, 18: 25, 19: [1, 26], 21: [1, 27], 23: [1, 28], 24: [1, 29], 25: 30, 26: [1, 31], 28: [1, 35], 31: [1, 34], 37: [1, 33], 40: [1, 32] }, o($V8, [2, 7]), { 1: [2, 3] }, { 7: [1, 36] }, o($V7, [2, 10]), { 4: 37, 7: $V1, 13: $V2, 47: $V3 }, o($V7, [2, 12]), o($V9, [2, 13]), o($V9, [2, 14]), o($V9, [2, 15]), { 20: [1, 38] }, { 22: [1, 39] }, o($V9, [2, 18]), o($V9, [2, 19]), o($V9, [2, 20]), { 27: 40, 33: $Va, 46: $Vb }, o($V9, [2, 117], { 41: 43, 32: [1, 46], 33: [1, 48], 35: [1, 44], 38: [1, 45], 42: [1, 47] }), { 27: 49, 33: $Va, 46: $Vb }, { 32: [1, 50], 35: [1, 51] }, { 27: 52, 33: $Va, 46: $Vb }, { 1: [2, 4] }, o($V7, [2, 11]), o($V9, [2, 16]), o($V9, [2, 17]), o($V9, [2, 21]), o($Vc, [2, 122]), o($Vc, [2, 123]), o($V9, [2, 52]), { 33: [1, 53] }, { 39: 54, 43: $Vd, 44: $Ve, 45: $Vf }, { 33: [1, 58] }, { 33: [1, 59] }, o($V9, [2, 118]), o($V9, [2, 36], { 32: [1, 60], 35: [1, 62], 38: [1, 61] }), { 33: [1, 63] }, { 33: [1, 64], 36: [1, 65] }, o($V9, [2, 22], { 29: [1, 66] }), o($V9, [2, 53], { 32: [1, 68], 38: [1, 67], 42: [1, 69] }), o($V9, [2, 54], { 32: [1, 71], 35: [1, 70], 42: [1, 72] }), o($Vg, [2, 119]), o($Vg, [2, 120]), o($Vg, [2, 121]), o($V9, [2, 57], { 35: [1, 73], 38: [1, 74], 42: [1, 75] }), o($V9, [2, 68], { 32: [1, 78], 35: [1, 76], 38: [1, 77] }), { 33: [1, 79] }, { 39: 80, 43: $Vd, 44: $Ve, 45: $Vf }, { 33: [1, 81] }, o($V9, [2, 24], { 34: [1, 82], 35: [1, 83] }), { 32: [1, 84] }, { 32: [1, 85] }, { 30: [1, 86] }, { 39: 87, 43: $Vd, 44: $Ve, 45: $Vf }, { 33: [1, 88] }, { 33: [1, 89] }, { 33: [1, 90] }, { 33: [1, 91] }, { 33: [1, 92] }, { 33: [1, 93] }, { 39: 94, 43: $Vd, 44: $Ve, 45: $Vf }, { 33: [1, 95] }, { 33: [1, 96] }, { 39: 97, 43: $Vd, 44: $Ve, 45: $Vf }, { 33: [1, 98] }, o($V9, [2, 37], { 35: [1, 100], 38: [1, 99] }), o($V9, [2, 38], { 32: [1, 102], 35: [1, 101] }), o($V9, [2, 39], { 32: [1, 103], 38: [1, 104] }), { 33: [1, 105] }, { 33: [1, 106], 36: [1, 107] }, { 33: [1, 108] }, { 33: [1, 109] }, o($V9, [2, 23]), o($V9, [2, 55], { 32: [1, 110], 42: [1, 111] }), o($V9, [2, 59], { 38: [1, 112], 42: [1, 113] }), o($V9, [2, 69], { 32: [1, 115], 38: [1, 114] }), o($V9, [2, 56], { 32: [1, 116], 42: [1, 117] }), o($V9, [2, 61], { 35: [1, 118], 42: [1, 119] }), o($V9, [2, 72], { 32: [1, 121], 35: [1, 120] }), o($V9, [2, 58], { 38: [1, 122], 42: [1, 123] }), o($V9, [2, 60], { 35: [1, 124], 42: [1, 125] }), o($V9, [2, 73], { 35: [1, 127], 38: [1, 126] }), o($V9, [2, 70], { 32: [1, 129], 38: [1, 128] }), o($V9, [2, 71], { 32: [1, 131], 35: [1, 130] }), o($V9, [2, 74], { 35: [1, 133], 38: [1, 132] }), { 39: 134, 43: $Vd, 44: $Ve, 45: $Vf }, { 33: [1, 135] }, { 33: [1, 136] }, { 33: [1, 137] }, { 33: [1, 138] }, { 39: 139, 43: $Vd, 44: $Ve, 45: $Vf }, o($V9, [2, 25], { 35: [1, 140] }), o($V9, [2, 26], { 34: [1, 141] }), o($V9, [2, 31], { 34: [1, 142] }), o($V9, [2, 29], { 34: [1, 143] }), o($V9, [2, 30], { 34: [1, 144] }), { 33: [1, 145] }, { 33: [1, 146] }, { 39: 147, 43: $Vd, 44: $Ve, 45: $Vf }, { 33: [1, 148] }, { 39: 149, 43: $Vd, 44: $Ve, 45: $Vf }, { 33: [1, 150] }, { 33: [1, 151] }, { 33: [1, 152] }, { 33: [1, 153] }, { 33: [1, 154] }, { 33: [1, 155] }, { 33: [1, 156] }, { 39: 157, 43: $Vd, 44: $Ve, 45: $Vf }, { 33: [1, 158] }, { 33: [1, 159] }, { 33: [1, 160] }, { 39: 161, 43: $Vd, 44: $Ve, 45: $Vf }, { 33: [1, 162] }, { 39: 163, 43: $Vd, 44: $Ve, 45: $Vf }, { 33: [1, 164] }, { 33: [1, 165] }, { 33: [1, 166] }, { 39: 167, 43: $Vd, 44: $Ve, 45: $Vf }, { 33: [1, 168] }, o($V9, [2, 43], { 35: [1, 169] }), o($V9, [2, 44], { 38: [1, 170] }), o($V9, [2, 42], { 32: [1, 171] }), o($V9, [2, 45], { 35: [1, 172] }), o($V9, [2, 40], { 38: [1, 173] }), o($V9, [2, 41], { 32: [1, 174] }), { 33: [1, 175], 36: [1, 176] }, { 33: [1, 177] }, { 33: [1, 178] }, { 33: [1, 179] }, { 33: [1, 180] }, o($V9, [2, 66], { 42: [1, 181] }), o($V9, [2, 79], { 32: [1, 182] }), o($V9, [2, 67], { 42: [1, 183] }), o($V9, [2, 90], { 38: [1, 184] }), o($V9, [2, 80], { 32: [1, 185] }), o($V9, [2, 89], { 38: [1, 186] }), o($V9, [2, 65], { 42: [1, 187] }), o($V9, [2, 78], { 32: [1, 188] }), o($V9, [2, 64], { 42: [1, 189] }), o($V9, [2, 84], { 35: [1, 190] }), o($V9, [2, 77], { 32: [1, 191] }), o($V9, [2, 83], { 35: [1, 192] }), o($V9, [2, 63], { 42: [1, 193] }), o($V9, [2, 91], { 38: [1, 194] }), o($V9, [2, 62], { 42: [1, 195] }), o($V9, [2, 85], { 35: [1, 196] }), o($V9, [2, 86], { 35: [1, 197] }), o($V9, [2, 92], { 38: [1, 198] }), o($V9, [2, 76], { 32: [1, 199] }), o($V9, [2, 87], { 38: [1, 200] }), o($V9, [2, 75], { 32: [1, 201] }), o($V9, [2, 81], { 35: [1, 202] }), o($V9, [2, 82], { 35: [1, 203] }), o($V9, [2, 88], { 38: [1, 204] }), { 33: [1, 205] }, { 39: 206, 43: $Vd, 44: $Ve, 45: $Vf }, { 33: [1, 207] }, { 33: [1, 208] }, { 39: 209, 43: $Vd, 44: $Ve, 45: $Vf }, { 33: [1, 210] }, o($V9, [2, 27]), o($V9, [2, 32]), o($V9, [2, 28]), o($V9, [2, 33]), o($V9, [2, 34]), o($V9, [2, 35]), { 33: [1, 211] }, { 33: [1, 212] }, { 33: [1, 213] }, { 39: 214, 43: $Vd, 44: $Ve, 45: $Vf }, { 33: [1, 215] }, { 39: 216, 43: $Vd, 44: $Ve, 45: $Vf }, { 33: [1, 217] }, { 33: [1, 218] }, { 33: [1, 219] }, { 33: [1, 220] }, { 33: [1, 221] }, { 33: [1, 222] }, { 33: [1, 223] }, { 39: 224, 43: $Vd, 44: $Ve, 45: $Vf }, { 33: [1, 225] }, { 33: [1, 226] }, { 33: [1, 227] }, { 39: 228, 43: $Vd, 44: $Ve, 45: $Vf }, { 33: [1, 229] }, { 39: 230, 43: $Vd, 44: $Ve, 45: $Vf }, { 33: [1, 231] }, { 33: [1, 232] }, { 33: [1, 233] }, { 39: 234, 43: $Vd, 44: $Ve, 45: $Vf }, o($V9, [2, 46]), o($V9, [2, 48]), o($V9, [2, 47]), o($V9, [2, 49]), o($V9, [2, 51]), o($V9, [2, 50]), o($V9, [2, 107]), o($V9, [2, 108]), o($V9, [2, 105]), o($V9, [2, 106]), o($V9, [2, 110]), o($V9, [2, 109]), o($V9, [2, 114]), o($V9, [2, 113]), o($V9, [2, 112]), o($V9, [2, 111]), o($V9, [2, 116]), o($V9, [2, 115]), o($V9, [2, 104]), o($V9, [2, 103]), o($V9, [2, 102]), o($V9, [2, 101]), o($V9, [2, 99]), o($V9, [2, 100]), o($V9, [2, 98]), o($V9, [2, 97]), o($V9, [2, 96]), o($V9, [2, 95]), o($V9, [2, 93]), o($V9, [2, 94])], - defaultActions: { 7: [2, 1], 13: [2, 2], 18: [2, 3], 36: [2, 4] }, - parseError: function parseError(str, hash) { - if (hash.recoverable) { - this.trace(str); - } else { - var error = new Error(str); - error.hash = hash; - throw error; - } - }, - parse: function parse(input) { - var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; - var args = lstack.slice.call(arguments, 1); - var lexer2 = Object.create(this.lexer); - var sharedState = { yy: {} }; - for (var k in this.yy) { - if (Object.prototype.hasOwnProperty.call(this.yy, k)) { - sharedState.yy[k] = this.yy[k]; - } - } - lexer2.setInput(input, sharedState.yy); - sharedState.yy.lexer = lexer2; - sharedState.yy.parser = this; - if (typeof lexer2.yylloc == "undefined") { - lexer2.yylloc = {}; - } - var yyloc = lexer2.yylloc; - lstack.push(yyloc); - var ranges = lexer2.options && lexer2.options.ranges; - if (typeof sharedState.yy.parseError === "function") { - this.parseError = sharedState.yy.parseError; - } else { - this.parseError = Object.getPrototypeOf(this).parseError; - } - function lex() { - var token; - token = tstack.pop() || lexer2.lex() || EOF; - if (typeof token !== "number") { - if (token instanceof Array) { - tstack = token; - token = tstack.pop(); - } - token = self.symbols_[token] || token; - } - return token; - } - var symbol, state, action, r, yyval = {}, p, len, newState, expected; - while (true) { - state = stack[stack.length - 1]; - if (this.defaultActions[state]) { - action = this.defaultActions[state]; - } else { - if (symbol === null || typeof symbol == "undefined") { - symbol = lex(); - } - action = table[state] && table[state][symbol]; - } - if (typeof action === "undefined" || !action.length || !action[0]) { - var errStr = ""; - expected = []; - for (p in table[state]) { - if (this.terminals_[p] && p > TERROR) { - expected.push("'" + this.terminals_[p] + "'"); - } - } - if (lexer2.showPosition) { - errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; - } else { - errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); - } - this.parseError(errStr, { - text: lexer2.match, - token: this.terminals_[symbol] || symbol, - line: lexer2.yylineno, - loc: yyloc, - expected - }); - } - if (action[0] instanceof Array && action.length > 1) { - throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); - } - switch (action[0]) { - case 1: - stack.push(symbol); - vstack.push(lexer2.yytext); - lstack.push(lexer2.yylloc); - stack.push(action[1]); - symbol = null; - { - yyleng = lexer2.yyleng; - yytext = lexer2.yytext; - yylineno = lexer2.yylineno; - yyloc = lexer2.yylloc; - } - break; - case 2: - len = this.productions_[action[1]][1]; - yyval.$ = vstack[vstack.length - len]; - yyval._$ = { - first_line: lstack[lstack.length - (len || 1)].first_line, - last_line: lstack[lstack.length - 1].last_line, - first_column: lstack[lstack.length - (len || 1)].first_column, - last_column: lstack[lstack.length - 1].last_column - }; - if (ranges) { - yyval._$.range = [ - lstack[lstack.length - (len || 1)].range[0], - lstack[lstack.length - 1].range[1] - ]; - } - r = this.performAction.apply(yyval, [ - yytext, - yyleng, - yylineno, - sharedState.yy, - action[1], - vstack, - lstack - ].concat(args)); - if (typeof r !== "undefined") { - return r; - } - if (len) { - stack = stack.slice(0, -1 * len * 2); - vstack = vstack.slice(0, -1 * len); - lstack = lstack.slice(0, -1 * len); - } - stack.push(this.productions_[action[1]][0]); - vstack.push(yyval.$); - lstack.push(yyval._$); - newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; - stack.push(newState); - break; - case 3: - return true; - } - } - return true; - } - }; - var lexer = function() { - var lexer2 = { - EOF: 1, - parseError: function parseError(str, hash) { - if (this.yy.parser) { - this.yy.parser.parseError(str, hash); - } else { - throw new Error(str); - } - }, - // resets the lexer, sets new input - setInput: function(input, yy) { - this.yy = yy || this.yy || {}; - this._input = input; - this._more = this._backtrack = this.done = false; - this.yylineno = this.yyleng = 0; - this.yytext = this.matched = this.match = ""; - this.conditionStack = ["INITIAL"]; - this.yylloc = { - first_line: 1, - first_column: 0, - last_line: 1, - last_column: 0 - }; - if (this.options.ranges) { - this.yylloc.range = [0, 0]; - } - this.offset = 0; - return this; - }, - // consumes and returns one char from the input - input: function() { - var ch = this._input[0]; - this.yytext += ch; - this.yyleng++; - this.offset++; - this.match += ch; - this.matched += ch; - var lines = ch.match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno++; - this.yylloc.last_line++; - } else { - this.yylloc.last_column++; - } - if (this.options.ranges) { - this.yylloc.range[1]++; - } - this._input = this._input.slice(1); - return ch; - }, - // unshifts one char (or a string) into the input - unput: function(ch) { - var len = ch.length; - var lines = ch.split(/(?:\r\n?|\n)/g); - this._input = ch + this._input; - this.yytext = this.yytext.substr(0, this.yytext.length - len); - this.offset -= len; - var oldLines = this.match.split(/(?:\r\n?|\n)/g); - this.match = this.match.substr(0, this.match.length - 1); - this.matched = this.matched.substr(0, this.matched.length - 1); - if (lines.length - 1) { - this.yylineno -= lines.length - 1; - } - var r = this.yylloc.range; - this.yylloc = { - first_line: this.yylloc.first_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.first_column, - last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len - }; - if (this.options.ranges) { - this.yylloc.range = [r[0], r[0] + this.yyleng - len]; - } - this.yyleng = this.yytext.length; - return this; - }, - // When called from action, caches matched text and appends it on next action - more: function() { - this._more = true; - return this; - }, - // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. - reject: function() { - if (this.options.backtrack_lexer) { - this._backtrack = true; - } else { - return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), { - text: "", - token: null, - line: this.yylineno - }); - } - return this; - }, - // retain first n characters of the match - less: function(n) { - this.unput(this.match.slice(n)); - }, - // displays already matched input, i.e. for error messages - pastInput: function() { - var past = this.matched.substr(0, this.matched.length - this.match.length); - return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); - }, - // displays upcoming input, i.e. for error messages - upcomingInput: function() { - var next = this.match; - if (next.length < 20) { - next += this._input.substr(0, 20 - next.length); - } - return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); - }, - // displays the character position where the lexing error occurred, i.e. for error messages - showPosition: function() { - var pre = this.pastInput(); - var c = new Array(pre.length + 1).join("-"); - return pre + this.upcomingInput() + "\n" + c + "^"; - }, - // test the lexed token: return FALSE when not a match, otherwise return token - test_match: function(match, indexed_rule) { - var token, lines, backup; - if (this.options.backtrack_lexer) { - backup = { - yylineno: this.yylineno, - yylloc: { - first_line: this.yylloc.first_line, - last_line: this.last_line, - first_column: this.yylloc.first_column, - last_column: this.yylloc.last_column - }, - yytext: this.yytext, - match: this.match, - matches: this.matches, - matched: this.matched, - yyleng: this.yyleng, - offset: this.offset, - _more: this._more, - _input: this._input, - yy: this.yy, - conditionStack: this.conditionStack.slice(0), - done: this.done - }; - if (this.options.ranges) { - backup.yylloc.range = this.yylloc.range.slice(0); - } - } - lines = match[0].match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno += lines.length; - } - this.yylloc = { - first_line: this.yylloc.last_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.last_column, - last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length - }; - this.yytext += match[0]; - this.match += match[0]; - this.matches = match; - this.yyleng = this.yytext.length; - if (this.options.ranges) { - this.yylloc.range = [this.offset, this.offset += this.yyleng]; - } - this._more = false; - this._backtrack = false; - this._input = this._input.slice(match[0].length); - this.matched += match[0]; - token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); - if (this.done && this._input) { - this.done = false; - } - if (token) { - return token; - } else if (this._backtrack) { - for (var k in backup) { - this[k] = backup[k]; - } - return false; - } - return false; - }, - // return next match in input - next: function() { - if (this.done) { - return this.EOF; - } - if (!this._input) { - this.done = true; - } - var token, match, tempMatch, index; - if (!this._more) { - this.yytext = ""; - this.match = ""; - } - var rules = this._currentRules(); - for (var i = 0; i < rules.length; i++) { - tempMatch = this._input.match(this.rules[rules[i]]); - if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { - match = tempMatch; - index = i; - if (this.options.backtrack_lexer) { - token = this.test_match(tempMatch, rules[i]); - if (token !== false) { - return token; - } else if (this._backtrack) { - match = false; - continue; - } else { - return false; - } - } else if (!this.options.flex) { - break; - } - } - } - if (match) { - token = this.test_match(match, rules[index]); - if (token !== false) { - return token; - } - return false; - } - if (this._input === "") { - return this.EOF; - } else { - return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { - text: "", - token: null, - line: this.yylineno - }); - } - }, - // return next match that has a token - lex: function lex() { - var r = this.next(); - if (r) { - return r; - } else { - return this.lex(); - } - }, - // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) - begin: function begin(condition) { - this.conditionStack.push(condition); - }, - // pop the previously active lexer condition state off the condition stack - popState: function popState() { - var n = this.conditionStack.length - 1; - if (n > 0) { - return this.conditionStack.pop(); - } else { - return this.conditionStack[0]; - } - }, - // produce the lexer rule set which is active for the currently active lexer condition state - _currentRules: function _currentRules() { - if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { - return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; - } else { - return this.conditions["INITIAL"].rules; - } - }, - // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available - topState: function topState(n) { - n = this.conditionStack.length - 1 - Math.abs(n || 0); - if (n >= 0) { - return this.conditionStack[n]; - } else { - return "INITIAL"; - } - }, - // alias for begin(condition) - pushState: function pushState(condition) { - this.begin(condition); - }, - // return the number of states currently on the stack - stateStackSize: function stateStackSize() { - return this.conditionStack.length; - }, - options: { "case-insensitive": true }, - performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { - switch ($avoiding_name_collisions) { - case 0: - this.begin("acc_title"); - return 19; - case 1: - this.popState(); - return "acc_title_value"; - case 2: - this.begin("acc_descr"); - return 21; - case 3: - this.popState(); - return "acc_descr_value"; - case 4: - this.begin("acc_descr_multiline"); - break; - case 5: - this.popState(); - break; - case 6: - return "acc_descr_multiline_value"; - case 7: - return 13; - case 8: - break; - case 9: - break; - case 10: - return 5; - case 11: - return 40; - case 12: - return 32; - case 13: - return 38; - case 14: - return 42; - case 15: - return 43; - case 16: - return 44; - case 17: - return 45; - case 18: - return 35; - case 19: - return 28; - case 20: - return 29; - case 21: - return 37; - case 22: - return 31; - case 23: - return 34; - case 24: - return 26; - case 25: - return 9; - case 26: - return 9; - case 27: - return 8; - case 28: - return "CARET"; - case 29: - this.begin("options"); - break; - case 30: - this.popState(); - break; - case 31: - return 12; - case 32: - return 36; - case 33: - this.begin("string"); - break; - case 34: - this.popState(); - break; - case 35: - return 33; - case 36: - return 30; - case 37: - return 46; - case 38: - return 7; - } - }, - rules: [/^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:(\r?\n)+)/i, /^(?:#[^\n]*)/i, /^(?:%[^\n]*)/i, /^(?:gitGraph\b)/i, /^(?:commit(?=\s|$))/i, /^(?:id:)/i, /^(?:type:)/i, /^(?:msg:)/i, /^(?:NORMAL\b)/i, /^(?:REVERSE\b)/i, /^(?:HIGHLIGHT\b)/i, /^(?:tag:)/i, /^(?:branch(?=\s|$))/i, /^(?:order:)/i, /^(?:merge(?=\s|$))/i, /^(?:cherry-pick(?=\s|$))/i, /^(?:parent:)/i, /^(?:checkout(?=\s|$))/i, /^(?:LR\b)/i, /^(?:TB\b)/i, /^(?::)/i, /^(?:\^)/i, /^(?:options\r?\n)/i, /^(?:[ \r\n\t]+end\b)/i, /^(?:[\s\S]+(?=[ \r\n\t]+end))/i, /^(?:["]["])/i, /^(?:["])/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:[0-9]+(?=\s|$))/i, /^(?:\w([-\./\w]*[-\w])?)/i, /^(?:$)/i, /^(?:\s+)/i], - conditions: { "acc_descr_multiline": { "rules": [5, 6], "inclusive": false }, "acc_descr": { "rules": [3], "inclusive": false }, "acc_title": { "rules": [1], "inclusive": false }, "options": { "rules": [30, 31], "inclusive": false }, "string": { "rules": [34, 35], "inclusive": false }, "INITIAL": { "rules": [0, 2, 4, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 32, 33, 36, 37, 38, 39], "inclusive": true } } - }; - return lexer2; - }(); - parser2.lexer = lexer; - function Parser() { - this.yy = {}; - } - Parser.prototype = parser2; - parser2.Parser = Parser; - return new Parser(); -}(); -parser.parser = parser; -const gitGraphParser = parser; -let mainBranchName = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.c)().gitGraph.mainBranchName; -let mainBranchOrder = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.c)().gitGraph.mainBranchOrder; -let commits = {}; -let head = null; -let branchesConfig = {}; -branchesConfig[mainBranchName] = { name: mainBranchName, order: mainBranchOrder }; -let branches = {}; -branches[mainBranchName] = head; -let curBranch = mainBranchName; -let direction = "LR"; -let seq = 0; -function getId() { - return (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.y)({ length: 7 }); -} -function uniqBy(list, fn) { - const recordMap = /* @__PURE__ */ Object.create(null); - return list.reduce((out, item) => { - const key = fn(item); - if (!recordMap[key]) { - recordMap[key] = true; - out.push(item); - } - return out; - }, []); -} -const setDirection = function(dir2) { - direction = dir2; -}; -let options = {}; -const setOptions = function(rawOptString) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("options str", rawOptString); - rawOptString = rawOptString && rawOptString.trim(); - rawOptString = rawOptString || "{}"; - try { - options = JSON.parse(rawOptString); - } catch (e) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.error("error while parsing gitGraph options", e.message); - } -}; -const getOptions = function() { - return options; -}; -const commit = function(msg, id, type, tag) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Entering commit:", msg, id, type, tag); - id = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.e.sanitizeText(id, (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.c)()); - msg = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.e.sanitizeText(msg, (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.c)()); - tag = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.e.sanitizeText(tag, (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.c)()); - const commit2 = { - id: id ? id : seq + "-" + getId(), - message: msg, - seq: seq++, - type: type ? type : commitType$1.NORMAL, - tag: tag ? tag : "", - parents: head == null ? [] : [head.id], - branch: curBranch - }; - head = commit2; - commits[commit2.id] = commit2; - branches[curBranch] = commit2.id; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("in pushCommit " + commit2.id); -}; -const branch = function(name, order) { - name = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.e.sanitizeText(name, (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.c)()); - if (branches[name] === void 0) { - branches[name] = head != null ? head.id : null; - branchesConfig[name] = { name, order: order ? parseInt(order, 10) : null }; - checkout(name); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("in createBranch"); - } else { - let error = new Error( - 'Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ' + name + '")' - ); - error.hash = { - text: "branch " + name, - token: "branch " + name, - line: "1", - loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, - expected: ['"checkout ' + name + '"'] - }; - throw error; - } -}; -const merge = function(otherBranch, custom_id, override_type, custom_tag) { - otherBranch = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.e.sanitizeText(otherBranch, (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.c)()); - custom_id = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.e.sanitizeText(custom_id, (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.c)()); - const currentCommit = commits[branches[curBranch]]; - const otherCommit = commits[branches[otherBranch]]; - if (curBranch === otherBranch) { - let error = new Error('Incorrect usage of "merge". Cannot merge a branch to itself'); - error.hash = { - text: "merge " + otherBranch, - token: "merge " + otherBranch, - line: "1", - loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, - expected: ["branch abc"] - }; - throw error; - } else if (currentCommit === void 0 || !currentCommit) { - let error = new Error( - 'Incorrect usage of "merge". Current branch (' + curBranch + ")has no commits" - ); - error.hash = { - text: "merge " + otherBranch, - token: "merge " + otherBranch, - line: "1", - loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, - expected: ["commit"] - }; - throw error; - } else if (branches[otherBranch] === void 0) { - let error = new Error( - 'Incorrect usage of "merge". Branch to be merged (' + otherBranch + ") does not exist" - ); - error.hash = { - text: "merge " + otherBranch, - token: "merge " + otherBranch, - line: "1", - loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, - expected: ["branch " + otherBranch] - }; - throw error; - } else if (otherCommit === void 0 || !otherCommit) { - let error = new Error( - 'Incorrect usage of "merge". Branch to be merged (' + otherBranch + ") has no commits" - ); - error.hash = { - text: "merge " + otherBranch, - token: "merge " + otherBranch, - line: "1", - loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, - expected: ['"commit"'] - }; - throw error; - } else if (currentCommit === otherCommit) { - let error = new Error('Incorrect usage of "merge". Both branches have same head'); - error.hash = { - text: "merge " + otherBranch, - token: "merge " + otherBranch, - line: "1", - loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, - expected: ["branch abc"] - }; - throw error; - } else if (custom_id && commits[custom_id] !== void 0) { - let error = new Error( - 'Incorrect usage of "merge". Commit with id:' + custom_id + " already exists, use different custom Id" - ); - error.hash = { - text: "merge " + otherBranch + custom_id + override_type + custom_tag, - token: "merge " + otherBranch + custom_id + override_type + custom_tag, - line: "1", - loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, - expected: [ - "merge " + otherBranch + " " + custom_id + "_UNIQUE " + override_type + " " + custom_tag - ] - }; - throw error; - } - const commit2 = { - id: custom_id ? custom_id : seq + "-" + getId(), - message: "merged branch " + otherBranch + " into " + curBranch, - seq: seq++, - parents: [head == null ? null : head.id, branches[otherBranch]], - branch: curBranch, - type: commitType$1.MERGE, - customType: override_type, - customId: custom_id ? true : false, - tag: custom_tag ? custom_tag : "" - }; - head = commit2; - commits[commit2.id] = commit2; - branches[curBranch] = commit2.id; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug(branches); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("in mergeBranch"); -}; -const cherryPick = function(sourceId, targetId, tag, parentCommitId) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Entering cherryPick:", sourceId, targetId, tag); - sourceId = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.e.sanitizeText(sourceId, (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.c)()); - targetId = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.e.sanitizeText(targetId, (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.c)()); - tag = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.e.sanitizeText(tag, (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.c)()); - parentCommitId = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.e.sanitizeText(parentCommitId, (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.c)()); - if (!sourceId || commits[sourceId] === void 0) { - let error = new Error( - 'Incorrect usage of "cherryPick". Source commit id should exist and provided' - ); - error.hash = { - text: "cherryPick " + sourceId + " " + targetId, - token: "cherryPick " + sourceId + " " + targetId, - line: "1", - loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, - expected: ["cherry-pick abc"] - }; - throw error; - } - let sourceCommit = commits[sourceId]; - let sourceCommitBranch = sourceCommit.branch; - if (parentCommitId && !(Array.isArray(sourceCommit.parents) && sourceCommit.parents.includes(parentCommitId))) { - let error = new Error( - "Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit." - ); - throw error; - } - if (sourceCommit.type === commitType$1.MERGE && !parentCommitId) { - let error = new Error( - "Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified." - ); - throw error; - } - if (!targetId || commits[targetId] === void 0) { - if (sourceCommitBranch === curBranch) { - let error = new Error( - 'Incorrect usage of "cherryPick". Source commit is already on current branch' - ); - error.hash = { - text: "cherryPick " + sourceId + " " + targetId, - token: "cherryPick " + sourceId + " " + targetId, - line: "1", - loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, - expected: ["cherry-pick abc"] - }; - throw error; - } - const currentCommit = commits[branches[curBranch]]; - if (currentCommit === void 0 || !currentCommit) { - let error = new Error( - 'Incorrect usage of "cherry-pick". Current branch (' + curBranch + ")has no commits" - ); - error.hash = { - text: "cherryPick " + sourceId + " " + targetId, - token: "cherryPick " + sourceId + " " + targetId, - line: "1", - loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, - expected: ["cherry-pick abc"] - }; - throw error; - } - const commit2 = { - id: seq + "-" + getId(), - message: "cherry-picked " + sourceCommit + " into " + curBranch, - seq: seq++, - parents: [head == null ? null : head.id, sourceCommit.id], - branch: curBranch, - type: commitType$1.CHERRY_PICK, - tag: tag ?? `cherry-pick:${sourceCommit.id}${sourceCommit.type === commitType$1.MERGE ? `|parent:${parentCommitId}` : ""}` - }; - head = commit2; - commits[commit2.id] = commit2; - branches[curBranch] = commit2.id; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug(branches); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("in cherryPick"); - } -}; -const checkout = function(branch2) { - branch2 = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.e.sanitizeText(branch2, (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.c)()); - if (branches[branch2] === void 0) { - let error = new Error( - 'Trying to checkout branch which is not yet created. (Help try using "branch ' + branch2 + '")' - ); - error.hash = { - text: "checkout " + branch2, - token: "checkout " + branch2, - line: "1", - loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, - expected: ['"branch ' + branch2 + '"'] - }; - throw error; - } else { - curBranch = branch2; - const id = branches[curBranch]; - head = commits[id]; - } -}; -function upsert(arr, key, newVal) { - const index = arr.indexOf(key); - if (index === -1) { - arr.push(newVal); - } else { - arr.splice(index, 1, newVal); - } -} -function prettyPrintCommitHistory(commitArr) { - const commit2 = commitArr.reduce((out, commit3) => { - if (out.seq > commit3.seq) { - return out; - } - return commit3; - }, commitArr[0]); - let line = ""; - commitArr.forEach(function(c) { - if (c === commit2) { - line += " *"; - } else { - line += " |"; - } - }); - const label = [line, commit2.id, commit2.seq]; - for (let branch2 in branches) { - if (branches[branch2] === commit2.id) { - label.push(branch2); - } - } - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug(label.join(" ")); - if (commit2.parents && commit2.parents.length == 2) { - const newCommit = commits[commit2.parents[0]]; - upsert(commitArr, commit2, newCommit); - commitArr.push(commits[commit2.parents[1]]); - } else if (commit2.parents.length == 0) { - return; - } else { - const nextCommit = commits[commit2.parents]; - upsert(commitArr, commit2, nextCommit); - } - commitArr = uniqBy(commitArr, (c) => c.id); - prettyPrintCommitHistory(commitArr); -} -const prettyPrint = function() { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug(commits); - const node = getCommitsArray()[0]; - prettyPrintCommitHistory([node]); -}; -const clear$1 = function() { - commits = {}; - head = null; - let mainBranch = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.c)().gitGraph.mainBranchName; - let mainBranchOrder2 = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.c)().gitGraph.mainBranchOrder; - branches = {}; - branches[mainBranch] = null; - branchesConfig = {}; - branchesConfig[mainBranch] = { name: mainBranch, order: mainBranchOrder2 }; - curBranch = mainBranch; - seq = 0; - (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.v)(); -}; -const getBranchesAsObjArray = function() { - const branchesArray = Object.values(branchesConfig).map((branchConfig, i) => { - if (branchConfig.order !== null) { - return branchConfig; - } - return { - ...branchConfig, - order: parseFloat(`0.${i}`, 10) - }; - }).sort((a, b) => a.order - b.order).map(({ name }) => ({ name })); - return branchesArray; -}; -const getBranches = function() { - return branches; -}; -const getCommits = function() { - return commits; -}; -const getCommitsArray = function() { - const commitArr = Object.keys(commits).map(function(key) { - return commits[key]; - }); - commitArr.forEach(function(o) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug(o.id); - }); - commitArr.sort((a, b) => a.seq - b.seq); - return commitArr; -}; -const getCurrentBranch = function() { - return curBranch; -}; -const getDirection = function() { - return direction; -}; -const getHead = function() { - return head; -}; -const commitType$1 = { - NORMAL: 0, - REVERSE: 1, - HIGHLIGHT: 2, - MERGE: 3, - CHERRY_PICK: 4 -}; -const gitGraphDb = { - getConfig: () => (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.c)().gitGraph, - setDirection, - setOptions, - getOptions, - commit, - branch, - merge, - cherryPick, - checkout, - //reset, - prettyPrint, - clear: clear$1, - getBranchesAsObjArray, - getBranches, - getCommits, - getCommitsArray, - getCurrentBranch, - getDirection, - getHead, - setAccTitle: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.s, - getAccTitle: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.g, - getAccDescription: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.a, - setAccDescription: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.b, - setDiagramTitle: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.q, - getDiagramTitle: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.t, - commitType: commitType$1 -}; -let allCommitsDict = {}; -const commitType = { - NORMAL: 0, - REVERSE: 1, - HIGHLIGHT: 2, - MERGE: 3, - CHERRY_PICK: 4 -}; -const THEME_COLOR_LIMIT = 8; -let branchPos = {}; -let commitPos = {}; -let lanes = []; -let maxPos = 0; -let dir = "LR"; -const clear = () => { - branchPos = {}; - commitPos = {}; - allCommitsDict = {}; - maxPos = 0; - lanes = []; - dir = "LR"; -}; -const drawText = (txt) => { - const svgLabel = document.createElementNS("http://www.w3.org/2000/svg", "text"); - let rows = []; - if (typeof txt === "string") { - rows = txt.split(/\\n|\n|/gi); - } else if (Array.isArray(txt)) { - rows = txt; - } else { - rows = []; - } - for (const row of rows) { - const tspan = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); - tspan.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"); - tspan.setAttribute("dy", "1em"); - tspan.setAttribute("x", "0"); - tspan.setAttribute("class", "row"); - tspan.textContent = row.trim(); - svgLabel.appendChild(tspan); - } - return svgLabel; -}; -const findClosestParent = (parents) => { - let closestParent = ""; - let maxPosition = 0; - parents.forEach((parent) => { - const parentPosition = dir === "TB" ? commitPos[parent].y : commitPos[parent].x; - if (parentPosition >= maxPosition) { - closestParent = parent; - maxPosition = parentPosition; - } - }); - return closestParent || void 0; -}; -const drawCommits = (svg, commits2, modifyGraph) => { - const gitGraphConfig = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.c)().gitGraph; - const gBullets = svg.append("g").attr("class", "commit-bullets"); - const gLabels = svg.append("g").attr("class", "commit-labels"); - let pos = 0; - if (dir === "TB") { - pos = 30; - } - const keys = Object.keys(commits2); - const sortedKeys = keys.sort((a, b) => { - return commits2[a].seq - commits2[b].seq; - }); - const isParallelCommits = gitGraphConfig.parallelCommits; - const layoutOffset = 10; - const commitStep = 40; - sortedKeys.forEach((key) => { - const commit2 = commits2[key]; - if (isParallelCommits) { - if (commit2.parents.length) { - const closestParent = findClosestParent(commit2.parents); - pos = dir === "TB" ? commitPos[closestParent].y + commitStep : commitPos[closestParent].x + commitStep; - } else { - pos = 0; - if (dir === "TB") { - pos = 30; - } - } - } - const posWithOffset = pos + layoutOffset; - const y = dir === "TB" ? posWithOffset : branchPos[commit2.branch].pos; - const x = dir === "TB" ? branchPos[commit2.branch].pos : posWithOffset; - if (modifyGraph) { - let typeClass; - let commitSymbolType = commit2.customType !== void 0 && commit2.customType !== "" ? commit2.customType : commit2.type; - switch (commitSymbolType) { - case commitType.NORMAL: - typeClass = "commit-normal"; - break; - case commitType.REVERSE: - typeClass = "commit-reverse"; - break; - case commitType.HIGHLIGHT: - typeClass = "commit-highlight"; - break; - case commitType.MERGE: - typeClass = "commit-merge"; - break; - case commitType.CHERRY_PICK: - typeClass = "commit-cherry-pick"; - break; - default: - typeClass = "commit-normal"; - } - if (commitSymbolType === commitType.HIGHLIGHT) { - const circle = gBullets.append("rect"); - circle.attr("x", x - 10); - circle.attr("y", y - 10); - circle.attr("height", 20); - circle.attr("width", 20); - circle.attr( - "class", - `commit ${commit2.id} commit-highlight${branchPos[commit2.branch].index % THEME_COLOR_LIMIT} ${typeClass}-outer` - ); - gBullets.append("rect").attr("x", x - 6).attr("y", y - 6).attr("height", 12).attr("width", 12).attr( - "class", - `commit ${commit2.id} commit${branchPos[commit2.branch].index % THEME_COLOR_LIMIT} ${typeClass}-inner` - ); - } else if (commitSymbolType === commitType.CHERRY_PICK) { - gBullets.append("circle").attr("cx", x).attr("cy", y).attr("r", 10).attr("class", `commit ${commit2.id} ${typeClass}`); - gBullets.append("circle").attr("cx", x - 3).attr("cy", y + 2).attr("r", 2.75).attr("fill", "#fff").attr("class", `commit ${commit2.id} ${typeClass}`); - gBullets.append("circle").attr("cx", x + 3).attr("cy", y + 2).attr("r", 2.75).attr("fill", "#fff").attr("class", `commit ${commit2.id} ${typeClass}`); - gBullets.append("line").attr("x1", x + 3).attr("y1", y + 1).attr("x2", x).attr("y2", y - 5).attr("stroke", "#fff").attr("class", `commit ${commit2.id} ${typeClass}`); - gBullets.append("line").attr("x1", x - 3).attr("y1", y + 1).attr("x2", x).attr("y2", y - 5).attr("stroke", "#fff").attr("class", `commit ${commit2.id} ${typeClass}`); - } else { - const circle = gBullets.append("circle"); - circle.attr("cx", x); - circle.attr("cy", y); - circle.attr("r", commit2.type === commitType.MERGE ? 9 : 10); - circle.attr( - "class", - `commit ${commit2.id} commit${branchPos[commit2.branch].index % THEME_COLOR_LIMIT}` - ); - if (commitSymbolType === commitType.MERGE) { - const circle2 = gBullets.append("circle"); - circle2.attr("cx", x); - circle2.attr("cy", y); - circle2.attr("r", 6); - circle2.attr( - "class", - `commit ${typeClass} ${commit2.id} commit${branchPos[commit2.branch].index % THEME_COLOR_LIMIT}` - ); - } - if (commitSymbolType === commitType.REVERSE) { - const cross = gBullets.append("path"); - cross.attr("d", `M ${x - 5},${y - 5}L${x + 5},${y + 5}M${x - 5},${y + 5}L${x + 5},${y - 5}`).attr( - "class", - `commit ${typeClass} ${commit2.id} commit${branchPos[commit2.branch].index % THEME_COLOR_LIMIT}` - ); - } - } - } - if (dir === "TB") { - commitPos[commit2.id] = { x, y: posWithOffset }; - } else { - commitPos[commit2.id] = { x: posWithOffset, y }; - } - if (modifyGraph) { - const px = 4; - const py = 2; - if (commit2.type !== commitType.CHERRY_PICK && (commit2.customId && commit2.type === commitType.MERGE || commit2.type !== commitType.MERGE) && gitGraphConfig.showCommitLabel) { - const wrapper = gLabels.append("g"); - const labelBkg = wrapper.insert("rect").attr("class", "commit-label-bkg"); - const text = wrapper.append("text").attr("x", pos).attr("y", y + 25).attr("class", "commit-label").text(commit2.id); - let bbox = text.node().getBBox(); - labelBkg.attr("x", posWithOffset - bbox.width / 2 - py).attr("y", y + 13.5).attr("width", bbox.width + 2 * py).attr("height", bbox.height + 2 * py); - if (dir === "TB") { - labelBkg.attr("x", x - (bbox.width + 4 * px + 5)).attr("y", y - 12); - text.attr("x", x - (bbox.width + 4 * px)).attr("y", y + bbox.height - 12); - } - if (dir !== "TB") { - text.attr("x", posWithOffset - bbox.width / 2); - } - if (gitGraphConfig.rotateCommitLabel) { - if (dir === "TB") { - text.attr("transform", "rotate(-45, " + x + ", " + y + ")"); - labelBkg.attr("transform", "rotate(-45, " + x + ", " + y + ")"); - } else { - let r_x = -7.5 - (bbox.width + 10) / 25 * 9.5; - let r_y = 10 + bbox.width / 25 * 8.5; - wrapper.attr( - "transform", - "translate(" + r_x + ", " + r_y + ") rotate(-45, " + pos + ", " + y + ")" - ); - } - } - } - if (commit2.tag) { - const rect = gLabels.insert("polygon"); - const hole = gLabels.append("circle"); - const tag = gLabels.append("text").attr("y", y - 16).attr("class", "tag-label").text(commit2.tag); - let tagBbox = tag.node().getBBox(); - tag.attr("x", posWithOffset - tagBbox.width / 2); - const h2 = tagBbox.height / 2; - const ly = y - 19.2; - rect.attr("class", "tag-label-bkg").attr( - "points", - ` - ${pos - tagBbox.width / 2 - px / 2},${ly + py} - ${pos - tagBbox.width / 2 - px / 2},${ly - py} - ${posWithOffset - tagBbox.width / 2 - px},${ly - h2 - py} - ${posWithOffset + tagBbox.width / 2 + px},${ly - h2 - py} - ${posWithOffset + tagBbox.width / 2 + px},${ly + h2 + py} - ${posWithOffset - tagBbox.width / 2 - px},${ly + h2 + py}` - ); - hole.attr("cx", pos - tagBbox.width / 2 + px / 2).attr("cy", ly).attr("r", 1.5).attr("class", "tag-hole"); - if (dir === "TB") { - rect.attr("class", "tag-label-bkg").attr( - "points", - ` - ${x},${pos + py} - ${x},${pos - py} - ${x + layoutOffset},${pos - h2 - py} - ${x + layoutOffset + tagBbox.width + px},${pos - h2 - py} - ${x + layoutOffset + tagBbox.width + px},${pos + h2 + py} - ${x + layoutOffset},${pos + h2 + py}` - ).attr("transform", "translate(12,12) rotate(45, " + x + "," + pos + ")"); - hole.attr("cx", x + px / 2).attr("cy", pos).attr("transform", "translate(12,12) rotate(45, " + x + "," + pos + ")"); - tag.attr("x", x + 5).attr("y", pos + 3).attr("transform", "translate(14,14) rotate(45, " + x + "," + pos + ")"); - } - } - } - pos += commitStep + layoutOffset; - if (pos > maxPos) { - maxPos = pos; - } - }); -}; -const shouldRerouteArrow = (commitA, commitB, p1, p2, allCommits) => { - const commitBIsFurthest = dir === "TB" ? p1.x < p2.x : p1.y < p2.y; - const branchToGetCurve = commitBIsFurthest ? commitB.branch : commitA.branch; - const isOnBranchToGetCurve = (x) => x.branch === branchToGetCurve; - const isBetweenCommits = (x) => x.seq > commitA.seq && x.seq < commitB.seq; - return Object.values(allCommits).some((commitX) => { - return isBetweenCommits(commitX) && isOnBranchToGetCurve(commitX); - }); -}; -const findLane = (y1, y2, depth = 0) => { - const candidate = y1 + Math.abs(y1 - y2) / 2; - if (depth > 5) { - return candidate; - } - let ok = lanes.every((lane) => Math.abs(lane - candidate) >= 10); - if (ok) { - lanes.push(candidate); - return candidate; - } - const diff = Math.abs(y1 - y2); - return findLane(y1, y2 - diff / 5, depth + 1); -}; -const drawArrow = (svg, commitA, commitB, allCommits) => { - const p1 = commitPos[commitA.id]; - const p2 = commitPos[commitB.id]; - const arrowNeedsRerouting = shouldRerouteArrow(commitA, commitB, p1, p2, allCommits); - let arc = ""; - let arc2 = ""; - let radius = 0; - let offset = 0; - let colorClassNum = branchPos[commitB.branch].index; - if (commitB.type === commitType.MERGE && commitA.id !== commitB.parents[0]) { - colorClassNum = branchPos[commitA.branch].index; - } - let lineDef; - if (arrowNeedsRerouting) { - arc = "A 10 10, 0, 0, 0,"; - arc2 = "A 10 10, 0, 0, 1,"; - radius = 10; - offset = 10; - const lineY = p1.y < p2.y ? findLane(p1.y, p2.y) : findLane(p2.y, p1.y); - const lineX = p1.x < p2.x ? findLane(p1.x, p2.x) : findLane(p2.x, p1.x); - if (dir === "TB") { - if (p1.x < p2.x) { - lineDef = `M ${p1.x} ${p1.y} L ${lineX - radius} ${p1.y} ${arc2} ${lineX} ${p1.y + offset} L ${lineX} ${p2.y - radius} ${arc} ${lineX + offset} ${p2.y} L ${p2.x} ${p2.y}`; - } else { - colorClassNum = branchPos[commitA.branch].index; - lineDef = `M ${p1.x} ${p1.y} L ${lineX + radius} ${p1.y} ${arc} ${lineX} ${p1.y + offset} L ${lineX} ${p2.y - radius} ${arc2} ${lineX - offset} ${p2.y} L ${p2.x} ${p2.y}`; - } - } else { - if (p1.y < p2.y) { - lineDef = `M ${p1.x} ${p1.y} L ${p1.x} ${lineY - radius} ${arc} ${p1.x + offset} ${lineY} L ${p2.x - radius} ${lineY} ${arc2} ${p2.x} ${lineY + offset} L ${p2.x} ${p2.y}`; - } else { - colorClassNum = branchPos[commitA.branch].index; - lineDef = `M ${p1.x} ${p1.y} L ${p1.x} ${lineY + radius} ${arc2} ${p1.x + offset} ${lineY} L ${p2.x - radius} ${lineY} ${arc} ${p2.x} ${lineY - offset} L ${p2.x} ${p2.y}`; - } - } - } else { - arc = "A 20 20, 0, 0, 0,"; - arc2 = "A 20 20, 0, 0, 1,"; - radius = 20; - offset = 20; - if (dir === "TB") { - if (p1.x < p2.x) { - if (commitB.type === commitType.MERGE && commitA.id !== commitB.parents[0]) { - lineDef = `M ${p1.x} ${p1.y} L ${p1.x} ${p2.y - radius} ${arc} ${p1.x + offset} ${p2.y} L ${p2.x} ${p2.y}`; - } else { - lineDef = `M ${p1.x} ${p1.y} L ${p2.x - radius} ${p1.y} ${arc2} ${p2.x} ${p1.y + offset} L ${p2.x} ${p2.y}`; - } - } - if (p1.x > p2.x) { - arc = "A 20 20, 0, 0, 0,"; - arc2 = "A 20 20, 0, 0, 1,"; - radius = 20; - offset = 20; - if (commitB.type === commitType.MERGE && commitA.id !== commitB.parents[0]) { - lineDef = `M ${p1.x} ${p1.y} L ${p1.x} ${p2.y - radius} ${arc2} ${p1.x - offset} ${p2.y} L ${p2.x} ${p2.y}`; - } else { - lineDef = `M ${p1.x} ${p1.y} L ${p2.x + radius} ${p1.y} ${arc} ${p2.x} ${p1.y + offset} L ${p2.x} ${p2.y}`; - } - } - if (p1.x === p2.x) { - lineDef = `M ${p1.x} ${p1.y} L ${p2.x} ${p2.y}`; - } - } else { - if (p1.y < p2.y) { - if (commitB.type === commitType.MERGE && commitA.id !== commitB.parents[0]) { - lineDef = `M ${p1.x} ${p1.y} L ${p2.x - radius} ${p1.y} ${arc2} ${p2.x} ${p1.y + offset} L ${p2.x} ${p2.y}`; - } else { - lineDef = `M ${p1.x} ${p1.y} L ${p1.x} ${p2.y - radius} ${arc} ${p1.x + offset} ${p2.y} L ${p2.x} ${p2.y}`; - } - } - if (p1.y > p2.y) { - if (commitB.type === commitType.MERGE && commitA.id !== commitB.parents[0]) { - lineDef = `M ${p1.x} ${p1.y} L ${p2.x - radius} ${p1.y} ${arc} ${p2.x} ${p1.y - offset} L ${p2.x} ${p2.y}`; - } else { - lineDef = `M ${p1.x} ${p1.y} L ${p1.x} ${p2.y + radius} ${arc2} ${p1.x + offset} ${p2.y} L ${p2.x} ${p2.y}`; - } - } - if (p1.y === p2.y) { - lineDef = `M ${p1.x} ${p1.y} L ${p2.x} ${p2.y}`; - } - } - } - svg.append("path").attr("d", lineDef).attr("class", "arrow arrow" + colorClassNum % THEME_COLOR_LIMIT); -}; -const drawArrows = (svg, commits2) => { - const gArrows = svg.append("g").attr("class", "commit-arrows"); - Object.keys(commits2).forEach((key) => { - const commit2 = commits2[key]; - if (commit2.parents && commit2.parents.length > 0) { - commit2.parents.forEach((parent) => { - drawArrow(gArrows, commits2[parent], commit2, commits2); - }); - } - }); -}; -const drawBranches = (svg, branches2) => { - const gitGraphConfig = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.c)().gitGraph; - const g = svg.append("g"); - branches2.forEach((branch2, index) => { - const adjustIndexForTheme = index % THEME_COLOR_LIMIT; - const pos = branchPos[branch2.name].pos; - const line = g.append("line"); - line.attr("x1", 0); - line.attr("y1", pos); - line.attr("x2", maxPos); - line.attr("y2", pos); - line.attr("class", "branch branch" + adjustIndexForTheme); - if (dir === "TB") { - line.attr("y1", 30); - line.attr("x1", pos); - line.attr("y2", maxPos); - line.attr("x2", pos); - } - lanes.push(pos); - let name = branch2.name; - const labelElement = drawText(name); - const bkg = g.insert("rect"); - const branchLabel = g.insert("g").attr("class", "branchLabel"); - const label = branchLabel.insert("g").attr("class", "label branch-label" + adjustIndexForTheme); - label.node().appendChild(labelElement); - let bbox = labelElement.getBBox(); - bkg.attr("class", "branchLabelBkg label" + adjustIndexForTheme).attr("rx", 4).attr("ry", 4).attr("x", -bbox.width - 4 - (gitGraphConfig.rotateCommitLabel === true ? 30 : 0)).attr("y", -bbox.height / 2 + 8).attr("width", bbox.width + 18).attr("height", bbox.height + 4); - label.attr( - "transform", - "translate(" + (-bbox.width - 14 - (gitGraphConfig.rotateCommitLabel === true ? 30 : 0)) + ", " + (pos - bbox.height / 2 - 1) + ")" - ); - if (dir === "TB") { - bkg.attr("x", pos - bbox.width / 2 - 10).attr("y", 0); - label.attr("transform", "translate(" + (pos - bbox.width / 2 - 5) + ", 0)"); - } - if (dir !== "TB") { - bkg.attr("transform", "translate(-19, " + (pos - bbox.height / 2) + ")"); - } - }); -}; -const draw = function(txt, id, ver, diagObj) { - clear(); - const conf = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.c)(); - const gitGraphConfig = conf.gitGraph; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("in gitgraph renderer", txt + "\n", "id:", id, ver); - allCommitsDict = diagObj.db.getCommits(); - const branches2 = diagObj.db.getBranchesAsObjArray(); - dir = diagObj.db.getDirection(); - const diagram2 = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(`[id="${id}"]`); - let pos = 0; - branches2.forEach((branch2, index) => { - const labelElement = drawText(branch2.name); - const g = diagram2.append("g"); - const branchLabel = g.insert("g").attr("class", "branchLabel"); - const label = branchLabel.insert("g").attr("class", "label branch-label"); - label.node().appendChild(labelElement); - let bbox = labelElement.getBBox(); - branchPos[branch2.name] = { pos, index }; - pos += 50 + (gitGraphConfig.rotateCommitLabel ? 40 : 0) + (dir === "TB" ? bbox.width / 2 : 0); - label.remove(); - branchLabel.remove(); - g.remove(); - }); - drawCommits(diagram2, allCommitsDict, false); - if (gitGraphConfig.showBranches) { - drawBranches(diagram2, branches2); - } - drawArrows(diagram2, allCommitsDict); - drawCommits(diagram2, allCommitsDict, true); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.u.insertTitle( - diagram2, - "gitTitleText", - gitGraphConfig.titleTopMargin, - diagObj.db.getDiagramTitle() - ); - (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.z)( - void 0, - diagram2, - gitGraphConfig.diagramPadding, - gitGraphConfig.useMaxWidth ?? conf.useMaxWidth - ); -}; -const gitGraphRenderer = { - draw -}; -const getStyles = (options2) => ` - .commit-id, - .commit-msg, - .branch-label { - fill: lightgrey; - color: lightgrey; - font-family: 'trebuchet ms', verdana, arial, sans-serif; - font-family: var(--mermaid-font-family); - } - ${[0, 1, 2, 3, 4, 5, 6, 7].map( - (i) => ` - .branch-label${i} { fill: ${options2["gitBranchLabel" + i]}; } - .commit${i} { stroke: ${options2["git" + i]}; fill: ${options2["git" + i]}; } - .commit-highlight${i} { stroke: ${options2["gitInv" + i]}; fill: ${options2["gitInv" + i]}; } - .label${i} { fill: ${options2["git" + i]}; } - .arrow${i} { stroke: ${options2["git" + i]}; } - ` -).join("\n")} - - .branch { - stroke-width: 1; - stroke: ${options2.lineColor}; - stroke-dasharray: 2; - } - .commit-label { font-size: ${options2.commitLabelFontSize}; fill: ${options2.commitLabelColor};} - .commit-label-bkg { font-size: ${options2.commitLabelFontSize}; fill: ${options2.commitLabelBackground}; opacity: 0.5; } - .tag-label { font-size: ${options2.tagLabelFontSize}; fill: ${options2.tagLabelColor};} - .tag-label-bkg { fill: ${options2.tagLabelBackground}; stroke: ${options2.tagLabelBorder}; } - .tag-hole { fill: ${options2.textColor}; } - - .commit-merge { - stroke: ${options2.primaryColor}; - fill: ${options2.primaryColor}; - } - .commit-reverse { - stroke: ${options2.primaryColor}; - fill: ${options2.primaryColor}; - stroke-width: 3; - } - .commit-highlight-outer { - } - .commit-highlight-inner { - stroke: ${options2.primaryColor}; - fill: ${options2.primaryColor}; - } - - .arrow { stroke-width: 8; stroke-linecap: round; fill: none} - .gitTitleText { - text-anchor: middle; - font-size: 18px; - fill: ${options2.textColor}; - } -`; -const gitGraphStyles = getStyles; -const diagram = { - parser: gitGraphParser, - db: gitGraphDb, - renderer: gitGraphRenderer, - styles: gitGraphStyles -}; - - - -/***/ }) - -}; -; \ No newline at end of file diff --git a/assets/js/7357.f2abeec1.js b/assets/js/7357.f2abeec1.js new file mode 100644 index 000000000000..155ab3a11fd4 --- /dev/null +++ b/assets/js/7357.f2abeec1.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7357],{77357:(t,e,n)=>{n.d(e,{diagram:()=>J});var i=n(45567),s=n(20007),r=n(3219),a=n(78041),o=n(75263),c=function(){var t=(0,i.K2)((function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n}),"o"),e=[6,8,10,11,12,14,16,17,20,21],n=[1,9],s=[1,10],r=[1,11],a=[1,12],o=[1,13],c=[1,16],l=[1,17],h={trace:(0,i.K2)((function(){}),"trace"),yy:{},symbols_:{error:2,start:3,timeline:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,period_statement:18,event_statement:19,period:20,event:21,$accept:0,$end:1},terminals_:{2:"error",4:"timeline",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",20:"period",21:"event"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[18,1],[19,1]],performAction:(0,i.K2)((function(t,e,n,i,s,r,a){var o=r.length-1;switch(s){case 1:return r[o-1];case 2:case 6:case 7:this.$=[];break;case 3:r[o-1].push(r[o]),this.$=r[o-1];break;case 4:case 5:this.$=r[o];break;case 8:i.getCommonDb().setDiagramTitle(r[o].substr(6)),this.$=r[o].substr(6);break;case 9:this.$=r[o].trim(),i.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=r[o].trim(),i.getCommonDb().setAccDescription(this.$);break;case 12:i.addSection(r[o].substr(8)),this.$=r[o].substr(8);break;case 15:i.addTask(r[o],0,""),this.$=r[o];break;case 16:i.addEvent(r[o].substr(2)),this.$=r[o]}}),"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:n,12:s,14:r,16:a,17:o,18:14,19:15,20:c,21:l},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:18,11:n,12:s,14:r,16:a,17:o,18:14,19:15,20:c,21:l},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,19]},{15:[1,20]},t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),t(e,[2,4]),t(e,[2,9]),t(e,[2,10])],defaultActions:{},parseError:(0,i.K2)((function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)}),"parseError"),parse:(0,i.K2)((function(t){var e=this,n=[0],s=[],r=[null],a=[],o=this.table,c="",l=0,h=0,d=0,u=a.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y.yy[g]=this.yy[g]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var f=p.yylloc;a.push(f);var m=p.options&&p.options.ranges;function x(){var t;return"number"!=typeof(t=s.pop()||p.lex()||1)&&(t instanceof Array&&(t=(s=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,i.K2)((function(t){n.length=n.length-2*t,r.length=r.length-t,a.length=a.length-t}),"popStack"),(0,i.K2)(x,"lex");for(var b,k,_,w,v,K,S,$,E,T={};;){if(_=n[n.length-1],this.defaultActions[_]?w=this.defaultActions[_]:(null==b&&(b=x()),w=o[_]&&o[_][b]),void 0===w||!w.length||!w[0]){var I="";for(K in E=[],o[_])this.terminals_[K]&&K>2&&E.push("'"+this.terminals_[K]+"'");I=p.showPosition?"Parse error on line "+(l+1)+":\n"+p.showPosition()+"\nExpecting "+E.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(I,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:f,expected:E})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_+", token: "+b);switch(w[0]){case 1:n.push(b),r.push(p.yytext),a.push(p.yylloc),n.push(w[1]),b=null,k?(b=k,k=null):(h=p.yyleng,c=p.yytext,l=p.yylineno,f=p.yylloc,d>0&&d--);break;case 2:if(S=this.productions_[w[1]][1],T.$=r[r.length-S],T._$={first_line:a[a.length-(S||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(S||1)].first_column,last_column:a[a.length-1].last_column},m&&(T._$.range=[a[a.length-(S||1)].range[0],a[a.length-1].range[1]]),void 0!==(v=this.performAction.apply(T,[c,h,l,y.yy,w[1],r,a].concat(u))))return v;S&&(n=n.slice(0,-1*S*2),r=r.slice(0,-1*S),a=a.slice(0,-1*S)),n.push(this.productions_[w[1]][0]),r.push(T.$),a.push(T._$),$=o[n[n.length-2]][n[n.length-1]],n.push($);break;case 3:return!0}}return!0}),"parse")},d=function(){return{EOF:1,parseError:(0,i.K2)((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:(0,i.K2)((function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this}),"setInput"),input:(0,i.K2)((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t}),"input"),unput:(0,i.K2)((function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"unput"),more:(0,i.K2)((function(){return this._more=!0,this}),"more"),reject:(0,i.K2)((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:(0,i.K2)((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:(0,i.K2)((function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:(0,i.K2)((function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:(0,i.K2)((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:(0,i.K2)((function(t,e){var n,i,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var r in s)this[r]=s[r];return!1}return!1}),"test_match"),next:(0,i.K2)((function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),r=0;re[0].length)){if(e=n,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,s[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:(0,i.K2)((function(){var t=this.next();return t||this.lex()}),"lex"),begin:(0,i.K2)((function(t){this.conditionStack.push(t)}),"begin"),popState:(0,i.K2)((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:(0,i.K2)((function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules}),"_currentRules"),topState:(0,i.K2)((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:(0,i.K2)((function(t){this.begin(t)}),"pushState"),stateStackSize:(0,i.K2)((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,i.K2)((function(t,e,n,i){switch(n){case 0:case 1:case 3:case 4:break;case 2:return 10;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 21;case 16:return 20;case 17:return 6;case 18:return"INVALID"}}),"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:timeline\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^:\n]+)/i,/^(?::\s[^:\n]+)/i,/^(?:[^#:\n]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18],inclusive:!0}}}}();function u(){this.yy={}}return h.lexer=d,(0,i.K2)(u,"Parser"),u.prototype=h,h.Parser=u,new u}();c.parser=c;var l=c,h={};(0,i.VA)(h,{addEvent:()=>w,addSection:()=>x,addTask:()=>_,addTaskOrg:()=>v,clear:()=>m,default:()=>S,getCommonDb:()=>f,getSections:()=>b,getTasks:()=>k});var d="",u=0,p=[],y=[],g=[],f=(0,i.K2)((()=>i.Wt),"getCommonDb"),m=(0,i.K2)((function(){p.length=0,y.length=0,d="",g.length=0,(0,i.IU)()}),"clear"),x=(0,i.K2)((function(t){d=t,p.push(t)}),"addSection"),b=(0,i.K2)((function(){return p}),"getSections"),k=(0,i.K2)((function(){let t=K();let e=0;for(;!t&&e<100;)t=K(),e++;return y.push(...g),y}),"getTasks"),_=(0,i.K2)((function(t,e,n){const i={id:u++,section:d,type:d,task:t,score:e||0,events:n?[n]:[]};g.push(i)}),"addTask"),w=(0,i.K2)((function(t){g.find((t=>t.id===u-1)).events.push(t)}),"addEvent"),v=(0,i.K2)((function(t){const e={section:d,type:d,description:t,task:t,classes:[]};y.push(e)}),"addTaskOrg"),K=(0,i.K2)((function(){const t=(0,i.K2)((function(t){return g[t].processed}),"compileTask");let e=!0;for(const[n,i]of g.entries())t(n),e=e&&i.processed;return e}),"compileTasks"),S={clear:m,getCommonDb:f,addSection:x,getSections:b,getTasks:k,addTask:_,addTaskOrg:v,addEvent:w},$=(0,i.K2)((function(t,e){const n=t.append("rect");return n.attr("x",e.x),n.attr("y",e.y),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("width",e.width),n.attr("height",e.height),n.attr("rx",e.rx),n.attr("ry",e.ry),void 0!==e.class&&n.attr("class",e.class),n}),"drawRect"),E=(0,i.K2)((function(t,e){const n=15,r=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",n).attr("stroke-width",2).attr("overflow","visible"),a=t.append("g");function o(t){const i=(0,s.JLW)().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(n/2.2);t.append("path").attr("class","mouth").attr("d",i).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}function c(t){const i=(0,s.JLW)().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(n/2.2);t.append("path").attr("class","mouth").attr("d",i).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}function l(t){t.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return a.append("circle").attr("cx",e.cx-5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),a.append("circle").attr("cx",e.cx+5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),(0,i.K2)(o,"smile"),(0,i.K2)(c,"sad"),(0,i.K2)(l,"ambivalent"),e.score>3?o(a):e.score<3?c(a):l(a),r}),"drawFace"),T=(0,i.K2)((function(t,e){const n=t.append("circle");return n.attr("cx",e.cx),n.attr("cy",e.cy),n.attr("class","actor-"+e.pos),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("r",e.r),void 0!==n.class&&n.attr("class",n.class),void 0!==e.title&&n.append("title").text(e.title),n}),"drawCircle"),I=(0,i.K2)((function(t,e){const n=e.text.replace(//gi," "),i=t.append("text");i.attr("x",e.x),i.attr("y",e.y),i.attr("class","legend"),i.style("text-anchor",e.anchor),void 0!==e.class&&i.attr("class",e.class);const s=i.append("tspan");return s.attr("x",e.x+2*e.textMargin),s.text(n),i}),"drawText"),R=(0,i.K2)((function(t,e){function n(t,e,n,i,s){return t+","+e+" "+(t+n)+","+e+" "+(t+n)+","+(e+i-s)+" "+(t+n-1.2*s)+","+(e+i)+" "+t+","+(e+i)}(0,i.K2)(n,"genPoints");const s=t.append("polygon");s.attr("points",n(e.x,e.y,50,20,7)),s.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,I(t,e)}),"drawLabel"),A=(0,i.K2)((function(t,e,n){const i=t.append("g"),s=P();s.x=e.x,s.y=e.y,s.fill=e.fill,s.width=n.width,s.height=n.height,s.class="journey-section section-type-"+e.num,s.rx=3,s.ry=3,$(i,s),H(n)(e.text,i,s.x,s.y,s.width,s.height,{class:"journey-section section-type-"+e.num},n,e.colour)}),"drawSection"),L=-1,M=(0,i.K2)((function(t,e,n){const i=e.x+n.width/2,s=t.append("g");L++;s.append("line").attr("id","task"+L).attr("x1",i).attr("y1",e.y).attr("x2",i).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),E(s,{cx:i,cy:300+30*(5-e.score),score:e.score});const r=P();r.x=e.x,r.y=e.y,r.fill=e.fill,r.width=n.width,r.height=n.height,r.class="task task-type-"+e.num,r.rx=3,r.ry=3,$(s,r),H(n)(e.task,s,r.x,r.y,r.width,r.height,{class:"task"},n,e.colour)}),"drawTask"),C=(0,i.K2)((function(t,e){$(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,class:"rect"}).lower()}),"drawBackgroundRect"),N=(0,i.K2)((function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}}),"getTextObj"),P=(0,i.K2)((function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}}),"getNoteRect"),H=function(){function t(t,e,n,i,r,a,o,c){s(e.append("text").attr("x",n+r/2).attr("y",i+a/2+5).style("font-color",c).style("text-anchor","middle").text(t),o)}function e(t,e,n,i,r,a,o,c,l){const{taskFontSize:h,taskFontFamily:d}=c,u=t.split(//gi);for(let p=0;p)/).reverse(),r=[],a=n.attr("y"),o=parseFloat(n.attr("dy")),c=n.text(null).append("tspan").attr("x",0).attr("y",a).attr("dy",o+"em");for(let s=0;se||"
    "===t)&&(r.pop(),c.text(r.join(" ").trim()),r="
    "===t?[""]:[t],c=n.append("tspan").attr("x",0).attr("y",a).attr("dy","1.1em").text(t))}))}(0,i.K2)(j,"wrap");var D=(0,i.K2)((function(t,e,n,i){const s=n%12-1,r=t.append("g");e.section=s,r.attr("class",(e.class?e.class+" ":"")+"timeline-node section-"+s);const a=r.append("g"),o=r.append("g"),c=o.append("text").text(e.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(j,e.width).node().getBBox(),l=i.fontSize?.replace?i.fontSize.replace("px",""):i.fontSize;return e.height=c.height+1.1*l*.5+e.padding,e.height=Math.max(e.height,e.maxHeight),e.width=e.width+2*e.padding,o.attr("transform","translate("+e.width/2+", "+e.padding/2+")"),W(a,e,s,i),e}),"drawNode"),z=(0,i.K2)((function(t,e,n){const i=t.append("g"),s=i.append("text").text(e.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(j,e.width).node().getBBox(),r=n.fontSize?.replace?n.fontSize.replace("px",""):n.fontSize;return i.remove(),s.height+1.1*r*.5+e.padding}),"getVirtualNodeHeight"),W=(0,i.K2)((function(t,e,n){t.append("path").attr("id","node-"+e.id).attr("class","node-bkg node-"+e.type).attr("d",`M0 ${e.height-5} v${10-e.height} q0,-5 5,-5 h${e.width-10} q5,0 5,5 v${e.height-5} H0 Z`),t.append("line").attr("class","node-line-"+n).attr("x1",0).attr("y1",e.height).attr("x2",e.width).attr("y2",e.height)}),"defaultBkg"),B={drawRect:$,drawCircle:T,drawSection:A,drawText:I,drawLabel:R,drawTask:M,drawBackgroundRect:C,getTextObj:N,getNoteRect:P,initGraphics:O,drawNode:D,getVirtualNodeHeight:z},F=(0,i.K2)((function(t,e,n,r){const a=(0,i.D7)(),o=a.leftMargin??50;i.Rm.debug("timeline",r.db);const c=a.securityLevel;let l;"sandbox"===c&&(l=(0,s.Ltv)("#i"+e));const h=("sandbox"===c?(0,s.Ltv)(l.nodes()[0].contentDocument.body):(0,s.Ltv)("body")).select("#"+e);h.append("g");const d=r.db.getTasks(),u=r.db.getCommonDb().getDiagramTitle();i.Rm.debug("task",d),B.initGraphics(h);const p=r.db.getSections();i.Rm.debug("sections",p);let y=0,g=0,f=0,m=0,x=50+o,b=50;m=50;let k=0,_=!0;p.forEach((function(t){const e={number:k,descr:t,section:k,width:150,padding:20,maxHeight:y},n=B.getVirtualNodeHeight(h,e,a);i.Rm.debug("sectionHeight before draw",n),y=Math.max(y,n+20)}));let w=0,v=0;i.Rm.debug("tasks.length",d.length);for(const[s,S]of d.entries()){const t={number:s,descr:S,section:S.section,width:150,padding:20,maxHeight:g},e=B.getVirtualNodeHeight(h,t,a);i.Rm.debug("taskHeight before draw",e),g=Math.max(g,e+20),w=Math.max(w,S.events.length);let n=0;for(const i of S.events){const t={descr:i,section:S.section,number:S.section,width:150,padding:20,maxHeight:50};n+=B.getVirtualNodeHeight(h,t,a)}v=Math.max(v,n)}i.Rm.debug("maxSectionHeight before draw",y),i.Rm.debug("maxTaskHeight before draw",g),p&&p.length>0?p.forEach((t=>{const e=d.filter((e=>e.section===t)),n={number:k,descr:t,section:k,width:200*Math.max(e.length,1)-50,padding:20,maxHeight:y};i.Rm.debug("sectionNode",n);const s=h.append("g"),r=B.drawNode(s,n,k,a);i.Rm.debug("sectionNode output",r),s.attr("transform",`translate(${x}, 50)`),b+=y+50,e.length>0&&V(h,e,k,x,b,g,a,w,v,y,!1),x+=200*Math.max(e.length,1),b=50,k++})):(_=!1,V(h,d,k,x,b,g,a,w,v,y,!0));const K=h.node().getBBox();i.Rm.debug("bounds",K),u&&h.append("text").text(u).attr("x",K.width/2-o).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),f=_?y+g+150:g+100;h.append("g").attr("class","lineWrapper").append("line").attr("x1",o).attr("y1",f).attr("x2",K.width+3*o).attr("y2",f).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),(0,i.ot)(void 0,h,a.timeline?.padding??50,a.timeline?.useMaxWidth??!1)}),"draw"),V=(0,i.K2)((function(t,e,n,s,r,a,o,c,l,h,d){for(const u of e){const e={descr:u.task,section:n,number:n,width:150,padding:20,maxHeight:a};i.Rm.debug("taskNode",e);const c=t.append("g").attr("class","taskWrapper"),p=B.drawNode(c,e,n,o).height;if(i.Rm.debug("taskHeight after draw",p),c.attr("transform",`translate(${s}, ${r})`),a=Math.max(a,p),u.events){const e=t.append("g").attr("class","lineWrapper");let i=a;r+=100,i+=G(t,u.events,n,s,r,o),r-=100,e.append("line").attr("x1",s+95).attr("y1",r+a).attr("x2",s+95).attr("y2",r+a+(d?a:h)+l+120).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5")}s+=200,d&&!o.timeline?.disableMulticolor&&n++}r-=10}),"drawTasks"),G=(0,i.K2)((function(t,e,n,s,r,a){let o=0;const c=r;r+=100;for(const l of e){const e={descr:l,section:n,number:n,width:150,padding:20,maxHeight:50};i.Rm.debug("eventNode",e);const c=t.append("g").attr("class","eventWrapper"),h=B.drawNode(c,e,n,a).height;o+=h,c.attr("transform",`translate(${s}, ${r})`),r=r+10+h}return r=c,o}),"drawEvents"),U={setConf:(0,i.K2)((()=>{}),"setConf"),draw:F},q=(0,i.K2)((t=>{let e="";for(let n=0;n`\n .edge {\n stroke-width: 3;\n }\n ${q(t)}\n .section-root rect, .section-root path, .section-root circle {\n fill: ${t.git0};\n }\n .section-root text {\n fill: ${t.gitBranchLabel0};\n }\n .icon-container {\n height:100%;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .edge {\n fill: none;\n }\n .eventWrapper {\n filter: brightness(120%);\n }\n`),"getStyles")}}}]); \ No newline at end of file diff --git a/assets/js/73617284.32b88a87.js b/assets/js/73617284.32b88a87.js new file mode 100644 index 000000000000..6e090f327853 --- /dev/null +++ b/assets/js/73617284.32b88a87.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[981],{76231:(e,n,o)=>{o.r(n),o.d(n,{assets:()=>c,contentTitle:()=>a,default:()=>d,frontMatter:()=>s,metadata:()=>r,toc:()=>l});const r=JSON.parse('{"id":"learn/learn-hyperbridge","title":"Hyperbridge","description":"Polkadot\'s Bridge to Ethereum.","source":"@site/../docs/learn/learn-hyperbridge.md","sourceDirName":"learn","slug":"/learn-hyperbridge","permalink":"/docs/learn-hyperbridge","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-hyperbridge.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1726760224000,"frontMatter":{"id":"learn-hyperbridge","title":"Hyperbridge","sidebar_label":"Hyperbridge","description":"Polkadot\'s Bridge to Ethereum.","keywords":["bridge","polkadot","ethereum"],"slug":"../learn-hyperbridge"},"sidebar":"docs","previous":{"title":"Snowbridge","permalink":"/docs/learn-snowbridge"},"next":{"title":"DOT <> KSM Bridge","permalink":"/docs/learn-dot-ksm-bridge"}}');var t=o(74848),i=o(28453);const s={id:"learn-hyperbridge",title:"Hyperbridge",sidebar_label:"Hyperbridge",description:"Polkadot's Bridge to Ethereum.",keywords:["bridge","polkadot","ethereum"],slug:"../learn-hyperbridge"},a=void 0,c={},l=[{value:"Coprocessor Model",id:"coprocessor-model",level:2},{value:"Parachain as Coprocessors",id:"parachain-as-coprocessors",level:3},{value:"Interoperable State Machine Protocol (ISMP)",id:"interoperable-state-machine-protocol-ismp",level:3},{value:"Underlying technologies",id:"underlying-technologies",level:3},{value:"Terminology",id:"terminology",level:2},{value:"State Proofs",id:"state-proofs",level:3},{value:"Consensus Proofs",id:"consensus-proofs",level:3},{value:"Resources",id:"resources",level:2}];function h(e){const n={a:"a",admonition:"admonition",blockquote:"blockquote",h2:"h2",h3:"h3",li:"li",p:"p",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.admonition,{title:"Learn about Parachain and Bridges",type:"info",children:(0,t.jsxs)(n.p,{children:["To follow the material on this page, it is recommended to be familiar with the concepts of\n",(0,t.jsx)(n.a,{href:"./learn-parachains",children:"Parachains"})," and ",(0,t.jsx)(n.a,{href:"/docs/learn-bridges",children:"Bridges"}),"."]})}),"\n",(0,t.jsxs)(n.p,{children:["Interoperability is the core vision of the Polkadot technology. Through years of blockchain\ndevelopment, much effort has been put into making a secure interoperability solution between\nblockchains. Polkadot provides secure interoperability between parachains through its\n",(0,t.jsx)(n.a,{href:"/docs/learn-xcm",children:"Cross-Consensus Messaging (XCM)"}),", and\n",(0,t.jsx)(n.a,{href:"/docs/learn-xcm-transport#xcmp-cross-chain-message-passing",children:"Cross-Chain Message Passing (XCMP)"}),"\nprotocol. However, these solutions work when there is a shared security. In the case of interaction\nbetween chains that do not belong to the same Polkadot's shared security, bridges are needed."]}),"\n",(0,t.jsx)(n.p,{children:"Hyperbridge (short for hyper-scalable bridge) is innovated as a cross-chain solution built as an\ninteroperability coprocessor. Hyperbridge is crafted to scale cryptographically secure, consensus,\nand state-proof-based interoperability across all blockchains."}),"\n",(0,t.jsx)(n.h2,{id:"coprocessor-model",children:"Coprocessor Model"}),"\n",(0,t.jsxs)(n.p,{children:["Ensuring secure cross-chain communication involves the meticulous verification of various aspects,\nincluding: ",(0,t.jsx)(n.a,{href:"https://wiki.polkadot.network/docs/learn-consensus",children:"Consensus Mechanisms"}),",\n",(0,t.jsx)(n.a,{href:"https://research.polytope.technology/consensus-proofs",children:"Consensus Faults"}),",\n",(0,t.jsx)(n.a,{href:"https://research.polytope.technology/state-machine-proofs",children:"State Proofs"})," and\n",(0,t.jsx)(n.a,{href:"https://wiki.polkadot.network/docs/learn-parachains#state-transitions",children:"State Transitions"}),"."]}),"\n",(0,t.jsxs)(n.blockquote,{children:["\n",(0,t.jsx)(n.p,{children:"What is a coprocessor?"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Coprocessor"}),", in the context of hardware, can be referred to as a microprocessor designed to\nsupplement the capabilities of the primary processor. For example, a GPU is a coprocessor of the\nCPU to be optimized for graphical and simultaneous computation."]}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"Due to the complexity and expensiveness of the onchain verification process, in the coprocessor\nmodel, the computation is performed off-chain. The execution outcomes and cryptographic proofs\nvalidating their accuracy are subsequently presented on-chain."}),"\n",(0,t.jsxs)(n.p,{children:["Expanding more about the coprocessor model, it has been applied in other solutions of offloading\ncryptographic computation as well, particularly\n",(0,t.jsx)(n.a,{href:"https://orochi.network/blog/Exploring-ZK-Coprocessor-What-Comes-Next",children:(0,t.jsx)(n.strong,{children:"Zero-knowledge (ZK) coprocessor"})}),"\nor ",(0,t.jsx)(n.a,{href:"https://www.di.ens.fr/~nitulesc/files/Survey-SNARKs.pdf",children:"SNARK circuit"}),"."]}),"\n",(0,t.jsx)(n.h3,{id:"parachain-as-coprocessors",children:"Parachain as Coprocessors"}),"\n",(0,t.jsxs)(n.p,{children:["By leveraging the cost-effective consensus proofs facilitated by\n",(0,t.jsx)(n.a,{href:"https://spec.polkadot.network/sect-finality#sect-grandpa-beefy",children:"BEEFY"}),", Hyperbridge affirms the\nlegitimacy of all parachain state transitions safeguarded by the network."]}),"\n",(0,t.jsxs)(n.p,{children:["This capability enables the distribution of the validation workload for consensus, state proofs, and\nstate transition re-execution across various designated\n",(0,t.jsx)(n.a,{href:"/docs/polkadot-direction#polkadot-as-a-computational-resource",children:"Parachain Cores"}),". Hence,\nPolkadot is utilized by Hyperbridge as a verifiable computation layer to provide the\n",(0,t.jsx)(n.a,{href:"https://blog.polytope.technology/introducing-hyperbridge-interoperability-coprocessor#full-node-level-security",children:'"Full Node Security"'}),"\nin cross-chain bridges."]}),"\n",(0,t.jsxs)(n.p,{children:["Hence, an additional layer of security is provided, allowing Hyperbridge to detect and prevent\n",(0,t.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/Byzantine_fault",children:"Byzantine"})," behaviors across connected chains."]}),"\n",(0,t.jsx)(n.h3,{id:"interoperable-state-machine-protocol-ismp",children:"Interoperable State Machine Protocol (ISMP)"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.a,{href:"https://blog.polytope.technology/introducing-hyperbridge-interoperability-coprocessor",children:"Interoperable State Machine Protocol (ISMP)"}),"\nprovides a familiar HTTP-like API for developers who want to make cross-chain requests to trigger\ncertain logic on the counterparty chain. It allows POST requests to send arbitrary data to connected\nchains and GET requests to read the storage (verified through state proofs) of applications on\nconnected chains."]}),"\n",(0,t.jsx)(n.p,{children:"In addition to facilitating cross-chain message passing among connected chains, ISMP also serves as\na synchronization primitive across Hyperbridge's internal state machines. This enables its parachain\ncores to communicate with each other and delegate tasks."}),"\n",(0,t.jsx)(n.h3,{id:"underlying-technologies",children:"Underlying technologies"}),"\n",(0,t.jsx)(n.p,{children:"The underlying technologies of the Hyperbridge are integrated with:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"https://eprint.iacr.org/2019/953.pdf",children:"PLONK verifier"}),": The PLONK Verifier within Hyperbridge can\nbe likened to a sophisticated security apparatus. It operates like an expert detective,\nmeticulously ensuring the legitimacy of every transaction without compromising private details.\nContinuously enhancing its capabilities, particularly with advancements like UltraPLONK, this\nintegral component is pivotal in maintaining the utmost integrity and confidentiality of\ncross-chain communications."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"https://spec.polkadot.network/sect-finality#sect-grandpa-beefy",children:"BEEFY consensus"}),": The BEEFY\n(Bridge Efficiency Enabling Finality Yielder) protocol functions as a complementary system to\nGRANDPA, specifically designed to facilitate efficient bridging between the Polkadot network's\nrelay chain and external, isolated blockchains like Ethereum. Notably, BEEFY addresses the\ninteroperability challenge with blockchains not initially constructed to integrate seamlessly with\nthe Polkadot interchain framework."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"https://github.com/AztecProtocol/barretenberg",children:"The Barretenberg backend"}),": Within the realm of\nHyperbridge, Barretenberg functions as a powerhouse engine, adeptly managing intricate\nmathematical computations. As the backend infrastructure, it guarantees the swift, secure, and\nreliable execution of all cryptographic operations within the Hyperbridge ecosystem."]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"terminology",children:"Terminology"}),"\n",(0,t.jsx)(n.h3,{id:"state-proofs",children:"State Proofs"}),"\n",(0,t.jsx)(n.p,{children:"State proofs are a critical primitive of the blockchain stack that enables things like trustless\nbridges. These off-chain light clients can access on-chain data in a permissionless and secure\nmanner and modular blockchain architectures where the execution layer can be decoupled from the\nconsensus layer."}),"\n",(0,t.jsx)(n.h3,{id:"consensus-proofs",children:"Consensus Proofs"}),"\n",(0,t.jsx)(n.p,{children:"Consensus Proofs in a blockchain system denote the mechanism by which participants, often nodes or\nvalidators, collectively agree on the validity of new transactions or blocks. The nature of\nconsensus proofs varies across different blockchain architectures, such as Proof-of-Work,\nProof-of-Stake, or other consensus algorithms."}),"\n",(0,t.jsx)(n.p,{children:"The ultimate goal is to ensure a widespread and verifiable agreement among network participants,\nenhancing the security and reliability of the distributed ledger."}),"\n",(0,t.jsx)(n.p,{children:"For example, Consensus Proofs in a proof of stake system are given as the signatures over the latest\nblock header in the chain from a supermajority (two-thirds plus one) subset of the full authority\nset."}),"\n",(0,t.jsx)(n.h2,{id:"resources",children:"Resources"}),"\n",(0,t.jsx)(n.p,{children:"To learn more about Hyperbridge, see the resources below."}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"https://blog.polytope.technology/introducing-hyperbridge-interoperability-coprocessor",children:"Introducing Hyperbridge: An Interoperability Coprocessor"})," -\nArticle by Seun Lanlege, Polytope Lab founder."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"https://medium.com/simplystaking/hyperbridge-the-new-interoperability-coprocessor-on-polkadot-b532ae622d8e",children:"Hyperbridge: The New Interoperability Coprocessor on Polkadot"})," -\nArticle by Erik from Simply Staking"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"https://polkadot-blockchain-academy.github.io/pba-book/blockchain-contracts/services-as-state-machines/page.html",children:"Digital Services as State Machines"})," -\nLecture about state machine from Polkadot Blockchain Academy"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"https://github.com/polytope-labs/hyperbridge",children:"Hyperbridge Source Code"})," - Public codebase\nrepository of hyperbridge."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"https://ismp.polytope.technology/",children:"Interoperable State Machine Protocol (ISMP) Book"})," - Guidebook\nof the ISMP"]}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://twitter.com/stakenode_dev/status/1744653040764817675",children:"The Puzzle of Blockchain Interoperability"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://www.youtube.com/watch?v=MCOAwooWecs",children:"ISMP, The Endgame for Parachain Interoperability | Sub0 2023"})}),"\n"]})]})}function d(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(h,{...e})}):h(e)}},28453:(e,n,o)=>{o.d(n,{R:()=>s,x:()=>a});var r=o(96540);const t={},i=r.createContext(t);function s(e){const n=r.useContext(i);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:s(e.components),r.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/73617284.f51c3860.js b/assets/js/73617284.f51c3860.js deleted file mode 100644 index da9491f917c2..000000000000 --- a/assets/js/73617284.f51c3860.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[981],{26620:(e,n,o)=>{o.r(n),o.d(n,{assets:()=>c,contentTitle:()=>s,default:()=>d,frontMatter:()=>i,metadata:()=>a,toc:()=>l});var r=o(74848),t=o(28453);const i={id:"learn-hyperbridge",title:"Hyperbridge",sidebar_label:"Hyperbridge",description:"Polkadot's Bridge to Ethereum.",keywords:["bridge","polkadot","ethereum"],slug:"../learn-hyperbridge"},s=void 0,a={id:"learn/learn-hyperbridge",title:"Hyperbridge",description:"Polkadot's Bridge to Ethereum.",source:"@site/../docs/learn/learn-hyperbridge.md",sourceDirName:"learn",slug:"/learn-hyperbridge",permalink:"/docs/learn-hyperbridge",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-hyperbridge.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1726760224e3,frontMatter:{id:"learn-hyperbridge",title:"Hyperbridge",sidebar_label:"Hyperbridge",description:"Polkadot's Bridge to Ethereum.",keywords:["bridge","polkadot","ethereum"],slug:"../learn-hyperbridge"},sidebar:"docs",previous:{title:"Snowbridge",permalink:"/docs/learn-snowbridge"},next:{title:"DOT <> KSM Bridge",permalink:"/docs/learn-dot-ksm-bridge"}},c={},l=[{value:"Coprocessor Model",id:"coprocessor-model",level:2},{value:"Parachain as Coprocessors",id:"parachain-as-coprocessors",level:3},{value:"Interoperable State Machine Protocol (ISMP)",id:"interoperable-state-machine-protocol-ismp",level:3},{value:"Underlying technologies",id:"underlying-technologies",level:3},{value:"Terminology",id:"terminology",level:2},{value:"State Proofs",id:"state-proofs",level:3},{value:"Consensus Proofs",id:"consensus-proofs",level:3},{value:"Resources",id:"resources",level:2}];function h(e){const n={a:"a",admonition:"admonition",blockquote:"blockquote",h2:"h2",h3:"h3",li:"li",p:"p",strong:"strong",ul:"ul",...(0,t.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.admonition,{title:"Learn about Parachain and Bridges",type:"info",children:(0,r.jsxs)(n.p,{children:["To follow the material on this page, it is recommended to be familiar with the concepts of\n",(0,r.jsx)(n.a,{href:"./learn-parachains",children:"Parachains"})," and ",(0,r.jsx)(n.a,{href:"/docs/learn-bridges",children:"Bridges"}),"."]})}),"\n",(0,r.jsxs)(n.p,{children:["Interoperability is the core vision of the Polkadot technology. Through years of blockchain\ndevelopment, much effort has been put into making a secure interoperability solution between\nblockchains. Polkadot provides secure interoperability between parachains through its\n",(0,r.jsx)(n.a,{href:"/docs/learn-xcm",children:"Cross-Consensus Messaging (XCM)"}),", and\n",(0,r.jsx)(n.a,{href:"/docs/learn-xcm-transport#xcmp-cross-chain-message-passing",children:"Cross-Chain Message Passing (XCMP)"}),"\nprotocol. However, these solutions work when there is a shared security. In the case of interaction\nbetween chains that do not belong to the same Polkadot's shared security, bridges are needed."]}),"\n",(0,r.jsx)(n.p,{children:"Hyperbridge (short for hyper-scalable bridge) is innovated as a cross-chain solution built as an\ninteroperability coprocessor. Hyperbridge is crafted to scale cryptographically secure, consensus,\nand state-proof-based interoperability across all blockchains."}),"\n",(0,r.jsx)(n.h2,{id:"coprocessor-model",children:"Coprocessor Model"}),"\n",(0,r.jsxs)(n.p,{children:["Ensuring secure cross-chain communication involves the meticulous verification of various aspects,\nincluding: ",(0,r.jsx)(n.a,{href:"https://wiki.polkadot.network/docs/learn-consensus",children:"Consensus Mechanisms"}),",\n",(0,r.jsx)(n.a,{href:"https://research.polytope.technology/consensus-proofs",children:"Consensus Faults"}),",\n",(0,r.jsx)(n.a,{href:"https://research.polytope.technology/state-machine-proofs",children:"State Proofs"})," and\n",(0,r.jsx)(n.a,{href:"https://wiki.polkadot.network/docs/learn-parachains#state-transitions",children:"State Transitions"}),"."]}),"\n",(0,r.jsxs)(n.blockquote,{children:["\n",(0,r.jsx)(n.p,{children:"What is a coprocessor?"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Coprocessor"}),", in the context of hardware, can be referred to as a microprocessor designed to\nsupplement the capabilities of the primary processor. For example, a GPU is a coprocessor of the\nCPU to be optimized for graphical and simultaneous computation."]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"Due to the complexity and expensiveness of the onchain verification process, in the coprocessor\nmodel, the computation is performed off-chain. The execution outcomes and cryptographic proofs\nvalidating their accuracy are subsequently presented on-chain."}),"\n",(0,r.jsxs)(n.p,{children:["Expanding more about the coprocessor model, it has been applied in other solutions of offloading\ncryptographic computation as well, particularly\n",(0,r.jsx)(n.a,{href:"https://orochi.network/blog/Exploring-ZK-Coprocessor-What-Comes-Next",children:(0,r.jsx)(n.strong,{children:"Zero-knowledge (ZK) coprocessor"})}),"\nor ",(0,r.jsx)(n.a,{href:"https://www.di.ens.fr/~nitulesc/files/Survey-SNARKs.pdf",children:"SNARK circuit"}),"."]}),"\n",(0,r.jsx)(n.h3,{id:"parachain-as-coprocessors",children:"Parachain as Coprocessors"}),"\n",(0,r.jsxs)(n.p,{children:["By leveraging the cost-effective consensus proofs facilitated by\n",(0,r.jsx)(n.a,{href:"https://spec.polkadot.network/sect-finality#sect-grandpa-beefy",children:"BEEFY"}),", Hyperbridge affirms the\nlegitimacy of all parachain state transitions safeguarded by the network."]}),"\n",(0,r.jsxs)(n.p,{children:["This capability enables the distribution of the validation workload for consensus, state proofs, and\nstate transition re-execution across various designated\n",(0,r.jsx)(n.a,{href:"/docs/polkadot-direction#polkadot-as-a-computational-resource",children:"Parachain Cores"}),". Hence,\nPolkadot is utilized by Hyperbridge as a verifiable computation layer to provide the\n",(0,r.jsx)(n.a,{href:"https://blog.polytope.technology/introducing-hyperbridge-interoperability-coprocessor#full-node-level-security",children:'"Full Node Security"'}),"\nin cross-chain bridges."]}),"\n",(0,r.jsxs)(n.p,{children:["Hence, an additional layer of security is provided, allowing Hyperbridge to detect and prevent\n",(0,r.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/Byzantine_fault",children:"Byzantine"})," behaviors across connected chains."]}),"\n",(0,r.jsx)(n.h3,{id:"interoperable-state-machine-protocol-ismp",children:"Interoperable State Machine Protocol (ISMP)"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"https://blog.polytope.technology/introducing-hyperbridge-interoperability-coprocessor",children:"Interoperable State Machine Protocol (ISMP)"}),"\nprovides a familiar HTTP-like API for developers who want to make cross-chain requests to trigger\ncertain logic on the counterparty chain. It allows POST requests to send arbitrary data to connected\nchains and GET requests to read the storage (verified through state proofs) of applications on\nconnected chains."]}),"\n",(0,r.jsx)(n.p,{children:"In addition to facilitating cross-chain message passing among connected chains, ISMP also serves as\na synchronization primitive across Hyperbridge's internal state machines. This enables its parachain\ncores to communicate with each other and delegate tasks."}),"\n",(0,r.jsx)(n.h3,{id:"underlying-technologies",children:"Underlying technologies"}),"\n",(0,r.jsx)(n.p,{children:"The underlying technologies of the Hyperbridge are integrated with:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"https://eprint.iacr.org/2019/953.pdf",children:"PLONK verifier"}),": The PLONK Verifier within Hyperbridge can\nbe likened to a sophisticated security apparatus. It operates like an expert detective,\nmeticulously ensuring the legitimacy of every transaction without compromising private details.\nContinuously enhancing its capabilities, particularly with advancements like UltraPLONK, this\nintegral component is pivotal in maintaining the utmost integrity and confidentiality of\ncross-chain communications."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"https://spec.polkadot.network/sect-finality#sect-grandpa-beefy",children:"BEEFY consensus"}),": The BEEFY\n(Bridge Efficiency Enabling Finality Yielder) protocol functions as a complementary system to\nGRANDPA, specifically designed to facilitate efficient bridging between the Polkadot network's\nrelay chain and external, isolated blockchains like Ethereum. Notably, BEEFY addresses the\ninteroperability challenge with blockchains not initially constructed to integrate seamlessly with\nthe Polkadot interchain framework."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"https://github.com/AztecProtocol/barretenberg",children:"The Barretenberg backend"}),": Within the realm of\nHyperbridge, Barretenberg functions as a powerhouse engine, adeptly managing intricate\nmathematical computations. As the backend infrastructure, it guarantees the swift, secure, and\nreliable execution of all cryptographic operations within the Hyperbridge ecosystem."]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"terminology",children:"Terminology"}),"\n",(0,r.jsx)(n.h3,{id:"state-proofs",children:"State Proofs"}),"\n",(0,r.jsx)(n.p,{children:"State proofs are a critical primitive of the blockchain stack that enables things like trustless\nbridges. These off-chain light clients can access on-chain data in a permissionless and secure\nmanner and modular blockchain architectures where the execution layer can be decoupled from the\nconsensus layer."}),"\n",(0,r.jsx)(n.h3,{id:"consensus-proofs",children:"Consensus Proofs"}),"\n",(0,r.jsx)(n.p,{children:"Consensus Proofs in a blockchain system denote the mechanism by which participants, often nodes or\nvalidators, collectively agree on the validity of new transactions or blocks. The nature of\nconsensus proofs varies across different blockchain architectures, such as Proof-of-Work,\nProof-of-Stake, or other consensus algorithms."}),"\n",(0,r.jsx)(n.p,{children:"The ultimate goal is to ensure a widespread and verifiable agreement among network participants,\nenhancing the security and reliability of the distributed ledger."}),"\n",(0,r.jsx)(n.p,{children:"For example, Consensus Proofs in a proof of stake system are given as the signatures over the latest\nblock header in the chain from a supermajority (two-thirds plus one) subset of the full authority\nset."}),"\n",(0,r.jsx)(n.h2,{id:"resources",children:"Resources"}),"\n",(0,r.jsx)(n.p,{children:"To learn more about Hyperbridge, see the resources below."}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"https://blog.polytope.technology/introducing-hyperbridge-interoperability-coprocessor",children:"Introducing Hyperbridge: An Interoperability Coprocessor"})," -\nArticle by Seun Lanlege, Polytope Lab founder."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"https://medium.com/simplystaking/hyperbridge-the-new-interoperability-coprocessor-on-polkadot-b532ae622d8e",children:"Hyperbridge: The New Interoperability Coprocessor on Polkadot"})," -\nArticle by Erik from Simply Staking"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"https://polkadot-blockchain-academy.github.io/pba-book/blockchain-contracts/services-as-state-machines/page.html",children:"Digital Services as State Machines"})," -\nLecture about state machine from Polkadot Blockchain Academy"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"https://github.com/polytope-labs/hyperbridge",children:"Hyperbridge Source Code"})," - Public codebase\nrepository of hyperbridge."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"https://ismp.polytope.technology/",children:"Interoperable State Machine Protocol (ISMP) Book"})," - Guidebook\nof the ISMP"]}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"https://twitter.com/stakenode_dev/status/1744653040764817675",children:"The Puzzle of Blockchain Interoperability"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"https://www.youtube.com/watch?v=MCOAwooWecs",children:"ISMP, The Endgame for Parachain Interoperability | Sub0 2023"})}),"\n"]})]})}function d(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(h,{...e})}):h(e)}},28453:(e,n,o)=>{o.d(n,{R:()=>s,x:()=>a});var r=o(96540);const t={},i=r.createContext(t);function s(e){const n=r.useContext(i);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:s(e.components),r.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/73a7060c.5920387a.js b/assets/js/73a7060c.5920387a.js new file mode 100644 index 000000000000..71928e220df3 --- /dev/null +++ b/assets/js/73a7060c.5920387a.js @@ -0,0 +1 @@ +(self.webpackChunk=self.webpackChunk||[]).push([[5208],{46406:(e,t,n)=>{"use strict";n.r(t),n.d(t,{assets:()=>a,contentTitle:()=>r,default:()=>d,frontMatter:()=>i,metadata:()=>o,toc:()=>c});const o=JSON.parse('{"id":"learn/learn-polkadot-technical-fellowship","title":"Polkadot Technical Fellowship","description":"Self-governing body of experts and developers of the Polkadot protocol.","source":"@site/../docs/learn/learn-polkadot-technical-fellowship.md","sourceDirName":"learn","slug":"/learn-polkadot-technical-fellowship","permalink":"/docs/learn-polkadot-technical-fellowship","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-polkadot-technical-fellowship.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1725265186000,"frontMatter":{"id":"learn-polkadot-technical-fellowship","title":"Polkadot Technical Fellowship","sidebar_label":"Technical Fellowship","description":"Self-governing body of experts and developers of the Polkadot protocol.","keywords":["governance","referenda","proposal","voting","whitelist","fellowship","opengov","rank"],"slug":"../learn-polkadot-technical-fellowship"},"sidebar":"docs","previous":{"title":"OpenGov Origins","permalink":"/docs/learn-polkadot-opengov-origins"},"next":{"title":"Tokens and Assets","permalink":"/docs/learn-assets-index"}}');var l=n(74848),s=n(28453);n(47379);const i={id:"learn-polkadot-technical-fellowship",title:"Polkadot Technical Fellowship",sidebar_label:"Technical Fellowship",description:"Self-governing body of experts and developers of the Polkadot protocol.",keywords:["governance","referenda","proposal","voting","whitelist","fellowship","opengov","rank"],slug:"../learn-polkadot-technical-fellowship"},r=void 0,a={},c=[{value:"Technical Fellowship Referenda",id:"technical-fellowship-referenda",level:2},{value:"Whitelisting",id:"whitelisting",level:3},{value:"Technical Fellowship Ranking and Salary",id:"technical-fellowship-ranking-and-salary",level:2},{value:"Membership Management",id:"membership-management",level:2},{value:"Becoming a Member",id:"becoming-a-member",level:3},{value:"Rank Updates",id:"rank-updates",level:3}];function h(e){const t={a:"a",admonition:"admonition",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,s.R)(),...e.components};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(t.p,{children:["The Technical Fellowship is a self-governing body of experts and developers of Polkadot and Kusama\nnetworks protocols. It operates on-chain through the Polkadot\n",(0,l.jsx)(t.a,{href:"https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fpolkadot-collectives-rpc.polkadot.io#/fellowship/referenda",children:"Collectives"}),"\nsystem chain and off-chain through the ",(0,l.jsx)(t.a,{href:"https://github.com/polkadot-fellows",children:"Polkadot Fellows"}),"\nrepository."]}),"\n",(0,l.jsx)(t.admonition,{title:"Historical Context",type:"info",children:(0,l.jsxs)(t.p,{children:["The Polkadot Technical Fellowship was established in 2022 and plays an important role in the\nPolkadot OpenGov. This fellowship replaced the\n",(0,l.jsx)(t.a,{href:"/docs/learn/learn-governance#technical-committee",children:"Technical Committee"})," from Polkadot's first\niteration of governance, and will be serving both the Polkadot and Kusama networks. This Fellowship\nis designed to be far broader in membership (i.e. to work well with even tens of thousands of\nmembers) and with far lower barriers to entry both in terms of administrative process flow and\nlevels of expertise. For more information, read through the\n",(0,l.jsx)(t.a,{href:"https://github.com/polkadot-fellows/manifesto/blob/0c3df46d76625980b8b48742cb86f4d8fa6dda8d/manifesto.pdf",children:"Fellowship Manifesto"}),"."]})}),"\n",(0,l.jsxs)(t.p,{children:["Apart from the collectives system chain and the GitHub repository, the Polkadot Technical Fellowship\nalso uses multiple public avenues to discuss updates related to the Polkadot protocol. Their public\ndiscussions can be viewed on ",(0,l.jsx)(t.a,{href:"https://matrix.to/#/#fellowship-members:parity.io",children:"this chatroom"})," and\ntheir monthly meetings are posted to this OpenDev - Polkadot Fellowship Core Dev Call\n",(0,l.jsx)(t.a,{href:"https://www.youtube.com/watch?v=5P6Axm4JrmQ&list=PLtyd7v_I7PGlDJCCCLGLjJ0yv33JAEE_-",children:"YouTube playlist."})]}),"\n",(0,l.jsx)(t.h2,{id:"technical-fellowship-referenda",children:"Technical Fellowship Referenda"}),"\n",(0,l.jsxs)(t.p,{children:["The fellowship's governance model has multiple tracks with their own approval and support\nparameters, where the votes are weighted by the rank of the member. Members of the Fellowship can\nvote on any given Fellowship proposal and the aggregated opinion of the members (weighted by their\nrank) constitutes the Fellowship's collective opinion. The list of current and historic fellowship\nreferenda can be viewed on ",(0,l.jsx)(t.a,{href:"https://collectives.polkassembly.io/",children:"Polkassembly"})," or\n",(0,l.jsx)(t.a,{href:"https://collectives.subsquare.io/",children:"Subsquare."})," The fellowship governance is primarily used for its\nmembership management, ",(0,l.jsx)(t.a,{href:"https://github.com/polkadot-fellows/RFCs",children:"approving RFCs"})," and whitelisting\nPolkadot OpenGov proposals created on the whitelist track."]}),"\n",(0,l.jsx)(t.h3,{id:"whitelisting",children:"Whitelisting"}),"\n",(0,l.jsx)(t.p,{children:'Polkadot OpenGov allows the Technical Fellowship to authorize an origin known as\n"Whitelisted-Caller" to execute with Root-level privileges for calls approved by the Fellowship\n(currently only level-three fellows and above can vote for whitelist calls). Note that the\nfellowship cannot unanimously change the network parameters, conduct rescues or move assets. The\nwhitelisted proposals still have to go through the whole life cycle of an OpenGov referendum and can\nonly be enacted when the referendum passes successfully.'}),"\n",(0,l.jsxs)(t.p,{children:["The whitelisting process starts as a fellowship referenda with embedded XCM call from the\ncollectives system chain to the Polkadot relay chain. For instance,\n",(0,l.jsx)(t.a,{href:"https://collectives.polkassembly.io/referenda/68",children:"the Polkadot Fellowship referenda 68"})," was used to\n",(0,l.jsx)(t.strong,{children:"whitelist"})," ",(0,l.jsx)(t.a,{href:"https://polkadot.polkassembly.io/referenda/440",children:"the Polkadot OpenGov referenda 440"}),"."]}),"\n",(0,l.jsx)(t.p,{children:(0,l.jsx)(t.img,{alt:"whitelist-xcm",src:n(93796).A+"",width:"2880",height:"374"})}),"\n",(0,l.jsx)(t.admonition,{title:"Submitting Whitelisted Proposals",type:"info",children:(0,l.jsxs)(t.p,{children:["For more information about how to submit a whitelisted proposal see the\n",(0,l.jsx)(t.a,{href:"/docs/learn-guides-polkadot-opengov#submitting-a-referendum-on-the-whitelisted-caller-track",children:"dedicated advanced how-to guides"}),"."]})}),"\n",(0,l.jsx)(t.h2,{id:"technical-fellowship-ranking-and-salary",children:"Technical Fellowship Ranking and Salary"}),"\n",(0,l.jsxs)(t.p,{children:["The Fellowship ",(0,l.jsx)(t.a,{href:"https://github.com/polkadot-fellows/manifesto",children:"manifesto"})," outlines the requirements\nand expectations for individuals to attain and retain any given rank, ranging between 0 to 9. By\ndefault, an active account on the collectives system chain has no assigned rank and can be inducted\ninto the Polkadot Technical Fellowship starting with rank 0. The Fellowship Manifesto states that\nmembers should receive a monthly allowance on par with gross income in OECD countries. A\n",(0,l.jsx)(t.a,{href:"https://github.com/polkadot-fellows/RFCs/pull/50",children:"fellowship RFC"})," was proposed with concrete\namounts for each ranked members."]}),"\n",(0,l.jsxs)(t.table,{children:[(0,l.jsx)(t.thead,{children:(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.th,{style:{textAlign:"center"},children:"Dan"}),(0,l.jsx)(t.th,{style:{textAlign:"center"},children:"Title"}),(0,l.jsx)(t.th,{style:{textAlign:"center"},children:"Annual Salary"})]})}),(0,l.jsxs)(t.tbody,{children:[(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{style:{textAlign:"center"},children:"I"}),(0,l.jsx)(t.td,{style:{textAlign:"center"},children:"Member"}),(0,l.jsx)(t.td,{style:{textAlign:"center"},children:"$10,000"})]}),(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{style:{textAlign:"center"},children:"II"}),(0,l.jsx)(t.td,{style:{textAlign:"center"},children:"Proficient"}),(0,l.jsx)(t.td,{style:{textAlign:"center"},children:"$20,000"})]}),(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{style:{textAlign:"center"},children:"III"}),(0,l.jsx)(t.td,{style:{textAlign:"center"},children:"Fellow"}),(0,l.jsx)(t.td,{style:{textAlign:"center"},children:"$80,000"})]}),(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{style:{textAlign:"center"},children:"IV"}),(0,l.jsx)(t.td,{style:{textAlign:"center"},children:"Architect"}),(0,l.jsx)(t.td,{style:{textAlign:"center"},children:"$120,000"})]}),(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{style:{textAlign:"center"},children:"V"}),(0,l.jsx)(t.td,{style:{textAlign:"center"},children:"Architect Adept"}),(0,l.jsx)(t.td,{style:{textAlign:"center"},children:"$160,000"})]}),(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{style:{textAlign:"center"},children:"VI"}),(0,l.jsx)(t.td,{style:{textAlign:"center"},children:"Grand Architect"}),(0,l.jsx)(t.td,{style:{textAlign:"center"},children:"$200,000"})]}),(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{style:{textAlign:"center"},children:"VII"}),(0,l.jsx)(t.td,{style:{textAlign:"center"},children:"Free Master"}),(0,l.jsx)(t.td,{style:{textAlign:"center"},children:"$200,000"})]}),(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{style:{textAlign:"center"},children:"VIII"}),(0,l.jsx)(t.td,{style:{textAlign:"center"},children:"Master Constant"}),(0,l.jsx)(t.td,{style:{textAlign:"center"},children:"$200,000"})]}),(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{style:{textAlign:"center"},children:"IX"}),(0,l.jsx)(t.td,{style:{textAlign:"center"},children:"Grand Master"}),(0,l.jsx)(t.td,{style:{textAlign:"center"},children:"$200,000"})]})]})]}),"\n",(0,l.jsx)(t.h2,{id:"membership-management",children:"Membership Management"}),"\n",(0,l.jsxs)(t.p,{children:["The Polkadot technical Fellowship was initially\n",(0,l.jsx)(t.a,{href:"https://github.com/polkadot-fellows/seeding",children:"seeded"})," with its members and their corresponding\nranks, and got ",(0,l.jsx)(t.a,{href:"https://polkadot.polkassembly.io/motion/403",children:"added on to Polkadot's Collectives"}),"\nsystem chain. All new membership requests will go through the fellowship governance and the\nprocedure is outlined in the section below."]}),"\n",(0,l.jsx)(t.h3,{id:"becoming-a-member",children:"Becoming a Member"}),"\n",(0,l.jsx)(t.p,{children:"As a member of the Polkadot Technical Fellowship, you are expected to faithfully uphold the below\ntenets:"}),"\n",(0,l.jsxs)(t.ul,{children:["\n",(0,l.jsx)(t.li,{children:"Sincerely uphold the interests of Polkadot and avoid actions which clearly work against it."}),"\n",(0,l.jsx)(t.li,{children:"Respect the philosophy and principles of Polkadot."}),"\n",(0,l.jsx)(t.li,{children:"Respect the operational procedures, norms and voting conventions of the Fellowship."}),"\n",(0,l.jsx)(t.li,{children:"Respect fellow Members and the wider community."}),"\n"]}),"\n",(0,l.jsx)(t.admonition,{title:"Register your interest",type:"tip",children:(0,l.jsxs)(t.p,{children:["For new fellowship inductions, Polkassembly has created an interface (still in beta) to\n",(0,l.jsx)(t.a,{href:"https://collectives.polkassembly.io/join-fellowship?network=collectives",children:"apply for the Polkadot Technical Fellowship."}),"\nThis initiative is funded by Polkadot treasury through\n",(0,l.jsx)(t.a,{href:"https://polkadot.polkassembly.io/treasury/574",children:"OpenGov referendum 373"})]})}),"\n",(0,l.jsxs)(t.p,{children:["The full set of instructions to be inducted to the Polkadot Technical Fellowship are available on\n",(0,l.jsx)(t.a,{href:"https://polkadot-fellows.xyz/#/membership",children:"the fellowship dasboard"}),"."]}),"\n",(0,l.jsx)(t.h3,{id:"rank-updates",children:"Rank Updates"}),"\n",(0,l.jsxs)(t.p,{children:["The Polkadot Technical Fellowship members are expected to provide a periodic evidence to request for\nretaining their rank or to get promoted to a higher rank. Any fellowship member upto rank 4 can be\npromoted to the next rank through a fellowship referenda that can be voted by the members who are 2\nranks higher. For instance, the fellowship\n",(0,l.jsx)(t.a,{href:"https://collectives.subsquare.io/fellowship/referenda/64",children:"referenda 64"})," which promotes a member\nfrom rank 1 to rank 2 can only be voted by members whose ranks are greater than or equal to 3.\nPromotion of the Polkadot Fellowship members from rank 5 needs to be done through an OpenGov\nreferendum. For more information, check the rank updates section on\n",(0,l.jsx)(t.a,{href:"https://polkadot-fellows.xyz/#/membership",children:"the fellowship dashboard"}),"."]})]})}function d(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,l.jsx)(t,{...e,children:(0,l.jsx)(h,{...e})}):h(e)}},47379:(e,t,n)=>{"use strict";n.d(t,{A:()=>p});var o=n(90675),l=n(10467),s=n(96540),i=n(19588),r=n(2026),a=n(11135);function c(e,t,n){return h.apply(this,arguments)}function h(){return(h=(0,l.A)((0,o.A)().mark((function e(t,n,l){var s,a,c,h,d;return(0,o.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s=void 0,a=void 0,e.t0=t,e.next="polkadot"===e.t0?5:"kusama"===e.t0?7:"statemine"===e.t0?9:"statemint"===e.t0?11:"polkadotpeople"===e.t0?13:"kusamapeople"===e.t0?15:17;break;case 5:return s="wss://rpc.polkadot.io",e.abrupt("break",18);case 7:return s="wss://kusama-rpc.polkadot.io/",e.abrupt("break",18);case 9:return s="wss://statemine-rpc.polkadot.io/",e.abrupt("break",18);case 11:return s="wss://statemint-rpc.polkadot.io/",e.abrupt("break",18);case 13:return s="wss://polkadot-people-rpc.polkadot.io/",e.abrupt("break",18);case 15:return s="wss://kusama-people-rpc.polkadot.io/",e.abrupt("break",18);case 17:console.log("Unknown socket url provided, no connection made.");case 18:if(void 0!==s){e.next=22;break}return e.abrupt("return");case 22:return c=new i.E(s),e.next=25,r.G.create({provider:c});case 25:h=e.sent,(d=n.split(".")).forEach((function(e){e in h&&(h=h[e])})),e.t1=d[0],e.next="consts"===e.t1?31:"query"===e.t1?33:38;break;case 31:return a=h.toString(),e.abrupt("break",39);case 33:return e.next=35,h();case 35:return a=(a=e.sent).toString(),e.abrupt("break",39);case 38:console.log("Unknown path prefix ("+d[0]+") in "+n);case 39:return e.abrupt("return",a);case 40:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function d(e,t,n,o){switch(t){case"humanReadable":(0,a.HumanReadable)(e,n,o);break;case"precise":(0,a.Precise)(e,n,o);break;case"blocksToDays":(0,a.BlocksToDays)(e,o);break;case"erasToDays":(0,a.ErasToDays)(e,o,n);break;case"percentage":(0,a.Percentage)(e,o);break;case"permillToPercent":(0,a.PermillToPercent)(e,o);break;case"arrayLength":(0,a.ArrayLength)(e,o);break;default:return void console.log("Ignoring unknown filter type")}}const p=function(e){var t=e.network,n=e.path,i=e.defaultValue,r=e.filter,a=void 0===r?void 0:r,h=(0,s.useState)(""),p=h[0],u=h[1];return t=t.toLowerCase(),(0,s.useEffect)((function(){void 0!==a?d(i.toString(),a,t,u):u(i.toString());var e=void 0;switch(t){case"polkadot":e="wss://rpc.polkadot.io";break;case"kusama":e="wss://kusama-rpc.polkadot.io/";break;case"statemine":e="wss://kusama-asset-hub-rpc.polkadot.io/";break;case"statemint":e="wss://polkadot-asset-hub-rpc.polkadot.io/";break;case"kusamapeople":e="wss://kusama-people-rpc.polkadot.io";break;case"polkadotpeople":e="wss://polkadot-people-rpc.polkadot.io";break;default:console.log("Unknown network provided, "+t)}if(void 0===e)console.log("Failed to connect to a valid websocket, applying default");else{var s=function(){var e=(0,l.A)((0,o.A)().mark((function e(){var l;return(0,o.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,c(t,n,u);case 2:if(void 0!==(l=e.sent)){e.next=7;break}return e.abrupt("return");case 7:void 0!==a?d(l,a,t,u):u(l);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();try{s()}catch(r){console.log(r)}}}),[]),p}},11135:e=>{var t="polkadot",n="kusama",o="statemine",l="statemint",s="polkadotpeople",i="kusamapeople",r={polkadot:{precision:1e10,symbol:"DOT"},kusama:{precision:1e12,symbol:"KSM"},statemint:{precision:1e10,symbol:"DOT"},statemine:{precision:1e12,symbol:"KSM"},polkadotpeople:{precision:1e10,symbol:"DOT"},kusamapeople:{precision:1e12,symbol:"KSM"}};e.exports={HumanReadable:function(e,a,c){var h=void 0;if(a===t||a===l)h=3;else if(a===n||a===o||a===s)h=6;else{if(a!=i)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");h=8}e=parseFloat(e),c((e=Number.isInteger(e/r[a].precision)?e/r[a].precision+" "+r[a].symbol:(e/r[a].precision).toFixed(h)+" "+r[a].symbol).toString())},Precise:function(e,t,n){n(e=(e=parseFloat(e))/r[t].precision+" "+r[t].symbol)},BlocksToDays:function(e,t){t((e=6*e/86400).toString())},ErasToDays:function(e,r,a){var c=void 0;if(a===t||a===l||a==s)c=1;else{if(a!==n&&a!==o&&a!=i)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");c=4}r((e/=c).toString())},Percentage:function(e,t){t((e/=1e7).toString())},PermillToPercent:function(e,t){t((e/=1e4).toString())},ArrayLength:function(e,t){t((e=e.split(",").length).toString())}}},93796:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const o=n.p+"assets/images/fellowship-whitelist-xcm-02a3e8aa5ac0c678b739738f383a6e57.png"},47790:()=>{}}]); \ No newline at end of file diff --git a/assets/js/73a7060c.cd375ec9.js b/assets/js/73a7060c.cd375ec9.js deleted file mode 100644 index 3ebf43bfd467..000000000000 --- a/assets/js/73a7060c.cd375ec9.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk=self.webpackChunk||[]).push([[5208],{78741:(e,t,n)=>{"use strict";n.r(t),n.d(t,{assets:()=>a,contentTitle:()=>i,default:()=>d,frontMatter:()=>s,metadata:()=>r,toc:()=>c});var o=n(74848),l=n(28453);n(47379);const s={id:"learn-polkadot-technical-fellowship",title:"Polkadot Technical Fellowship",sidebar_label:"Technical Fellowship",description:"Self-governing body of experts and developers of the Polkadot protocol.",keywords:["governance","referenda","proposal","voting","whitelist","fellowship","opengov","rank"],slug:"../learn-polkadot-technical-fellowship"},i=void 0,r={id:"learn/learn-polkadot-technical-fellowship",title:"Polkadot Technical Fellowship",description:"Self-governing body of experts and developers of the Polkadot protocol.",source:"@site/../docs/learn/learn-polkadot-technical-fellowship.md",sourceDirName:"learn",slug:"/learn-polkadot-technical-fellowship",permalink:"/docs/learn-polkadot-technical-fellowship",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-polkadot-technical-fellowship.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1725265186e3,frontMatter:{id:"learn-polkadot-technical-fellowship",title:"Polkadot Technical Fellowship",sidebar_label:"Technical Fellowship",description:"Self-governing body of experts and developers of the Polkadot protocol.",keywords:["governance","referenda","proposal","voting","whitelist","fellowship","opengov","rank"],slug:"../learn-polkadot-technical-fellowship"},sidebar:"docs",previous:{title:"OpenGov Origins",permalink:"/docs/learn-polkadot-opengov-origins"},next:{title:"Tokens and Assets",permalink:"/docs/learn-assets-index"}},a={},c=[{value:"Technical Fellowship Referenda",id:"technical-fellowship-referenda",level:2},{value:"Whitelisting",id:"whitelisting",level:3},{value:"Technical Fellowship Ranking and Salary",id:"technical-fellowship-ranking-and-salary",level:2},{value:"Membership Management",id:"membership-management",level:2},{value:"Becoming a Member",id:"becoming-a-member",level:3},{value:"Rank Updates",id:"rank-updates",level:3}];function h(e){const t={a:"a",admonition:"admonition",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,l.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(t.p,{children:["The Technical Fellowship is a self-governing body of experts and developers of Polkadot and Kusama\nnetworks protocols. It operates on-chain through the Polkadot\n",(0,o.jsx)(t.a,{href:"https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fpolkadot-collectives-rpc.polkadot.io#/fellowship/referenda",children:"Collectives"}),"\nsystem chain and off-chain through the ",(0,o.jsx)(t.a,{href:"https://github.com/polkadot-fellows",children:"Polkadot Fellows"}),"\nrepository."]}),"\n",(0,o.jsx)(t.admonition,{title:"Historical Context",type:"info",children:(0,o.jsxs)(t.p,{children:["The Polkadot Technical Fellowship was established in 2022 and plays an important role in the\nPolkadot OpenGov. This fellowship replaced the\n",(0,o.jsx)(t.a,{href:"/docs/learn/learn-governance#technical-committee",children:"Technical Committee"})," from Polkadot's first\niteration of governance, and will be serving both the Polkadot and Kusama networks. This Fellowship\nis designed to be far broader in membership (i.e. to work well with even tens of thousands of\nmembers) and with far lower barriers to entry both in terms of administrative process flow and\nlevels of expertise. For more information, read through the\n",(0,o.jsx)(t.a,{href:"https://github.com/polkadot-fellows/manifesto/blob/0c3df46d76625980b8b48742cb86f4d8fa6dda8d/manifesto.pdf",children:"Fellowship Manifesto"}),"."]})}),"\n",(0,o.jsxs)(t.p,{children:["Apart from the collectives system chain and the GitHub repository, the Polkadot Technical Fellowship\nalso uses multiple public avenues to discuss updates related to the Polkadot protocol. Their public\ndiscussions can be viewed on ",(0,o.jsx)(t.a,{href:"https://matrix.to/#/#fellowship-members:parity.io",children:"this chatroom"})," and\ntheir monthly meetings are posted to this OpenDev - Polkadot Fellowship Core Dev Call\n",(0,o.jsx)(t.a,{href:"https://www.youtube.com/watch?v=5P6Axm4JrmQ&list=PLtyd7v_I7PGlDJCCCLGLjJ0yv33JAEE_-",children:"YouTube playlist."})]}),"\n",(0,o.jsx)(t.h2,{id:"technical-fellowship-referenda",children:"Technical Fellowship Referenda"}),"\n",(0,o.jsxs)(t.p,{children:["The fellowship's governance model has multiple tracks with their own approval and support\nparameters, where the votes are weighted by the rank of the member. Members of the Fellowship can\nvote on any given Fellowship proposal and the aggregated opinion of the members (weighted by their\nrank) constitutes the Fellowship's collective opinion. The list of current and historic fellowship\nreferenda can be viewed on ",(0,o.jsx)(t.a,{href:"https://collectives.polkassembly.io/",children:"Polkassembly"})," or\n",(0,o.jsx)(t.a,{href:"https://collectives.subsquare.io/",children:"Subsquare."})," The fellowship governance is primarily used for its\nmembership management, ",(0,o.jsx)(t.a,{href:"https://github.com/polkadot-fellows/RFCs",children:"approving RFCs"})," and whitelisting\nPolkadot OpenGov proposals created on the whitelist track."]}),"\n",(0,o.jsx)(t.h3,{id:"whitelisting",children:"Whitelisting"}),"\n",(0,o.jsx)(t.p,{children:'Polkadot OpenGov allows the Technical Fellowship to authorize an origin known as\n"Whitelisted-Caller" to execute with Root-level privileges for calls approved by the Fellowship\n(currently only level-three fellows and above can vote for whitelist calls). Note that the\nfellowship cannot unanimously change the network parameters, conduct rescues or move assets. The\nwhitelisted proposals still have to go through the whole life cycle of an OpenGov referendum and can\nonly be enacted when the referendum passes successfully.'}),"\n",(0,o.jsxs)(t.p,{children:["The whitelisting process starts as a fellowship referenda with embedded XCM call from the\ncollectives system chain to the Polkadot relay chain. For instance,\n",(0,o.jsx)(t.a,{href:"https://collectives.polkassembly.io/referenda/68",children:"the Polkadot Fellowship referenda 68"})," was used to\n",(0,o.jsx)(t.strong,{children:"whitelist"})," ",(0,o.jsx)(t.a,{href:"https://polkadot.polkassembly.io/referenda/440",children:"the Polkadot OpenGov referenda 440"}),"."]}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{alt:"whitelist-xcm",src:n(93796).A+"",width:"2880",height:"374"})}),"\n",(0,o.jsx)(t.admonition,{title:"Submitting Whitelisted Proposals",type:"info",children:(0,o.jsxs)(t.p,{children:["For more information about how to submit a whitelisted proposal see the\n",(0,o.jsx)(t.a,{href:"/docs/learn-guides-polkadot-opengov#submitting-a-referendum-on-the-whitelisted-caller-track",children:"dedicated advanced how-to guides"}),"."]})}),"\n",(0,o.jsx)(t.h2,{id:"technical-fellowship-ranking-and-salary",children:"Technical Fellowship Ranking and Salary"}),"\n",(0,o.jsxs)(t.p,{children:["The Fellowship ",(0,o.jsx)(t.a,{href:"https://github.com/polkadot-fellows/manifesto",children:"manifesto"})," outlines the requirements\nand expectations for individuals to attain and retain any given rank, ranging between 0 to 9. By\ndefault, an active account on the collectives system chain has no assigned rank and can be inducted\ninto the Polkadot Technical Fellowship starting with rank 0. The Fellowship Manifesto states that\nmembers should receive a monthly allowance on par with gross income in OECD countries. A\n",(0,o.jsx)(t.a,{href:"https://github.com/polkadot-fellows/RFCs/pull/50",children:"fellowship RFC"})," was proposed with concrete\namounts for each ranked members."]}),"\n",(0,o.jsxs)(t.table,{children:[(0,o.jsx)(t.thead,{children:(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.th,{style:{textAlign:"center"},children:"Dan"}),(0,o.jsx)(t.th,{style:{textAlign:"center"},children:"Title"}),(0,o.jsx)(t.th,{style:{textAlign:"center"},children:"Annual Salary"})]})}),(0,o.jsxs)(t.tbody,{children:[(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"I"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"Member"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"$10,000"})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"II"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"Proficient"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"$20,000"})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"III"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"Fellow"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"$80,000"})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"IV"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"Architect"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"$120,000"})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"V"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"Architect Adept"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"$160,000"})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"VI"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"Grand Architect"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"$200,000"})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"VII"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"Free Master"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"$200,000"})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"VIII"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"Master Constant"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"$200,000"})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"IX"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"Grand Master"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"$200,000"})]})]})]}),"\n",(0,o.jsx)(t.h2,{id:"membership-management",children:"Membership Management"}),"\n",(0,o.jsxs)(t.p,{children:["The Polkadot technical Fellowship was initially\n",(0,o.jsx)(t.a,{href:"https://github.com/polkadot-fellows/seeding",children:"seeded"})," with its members and their corresponding\nranks, and got ",(0,o.jsx)(t.a,{href:"https://polkadot.polkassembly.io/motion/403",children:"added on to Polkadot's Collectives"}),"\nsystem chain. All new membership requests will go through the fellowship governance and the\nprocedure is outlined in the section below."]}),"\n",(0,o.jsx)(t.h3,{id:"becoming-a-member",children:"Becoming a Member"}),"\n",(0,o.jsx)(t.p,{children:"As a member of the Polkadot Technical Fellowship, you are expected to faithfully uphold the below\ntenets:"}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsx)(t.li,{children:"Sincerely uphold the interests of Polkadot and avoid actions which clearly work against it."}),"\n",(0,o.jsx)(t.li,{children:"Respect the philosophy and principles of Polkadot."}),"\n",(0,o.jsx)(t.li,{children:"Respect the operational procedures, norms and voting conventions of the Fellowship."}),"\n",(0,o.jsx)(t.li,{children:"Respect fellow Members and the wider community."}),"\n"]}),"\n",(0,o.jsx)(t.admonition,{title:"Register your interest",type:"tip",children:(0,o.jsxs)(t.p,{children:["For new fellowship inductions, Polkassembly has created an interface (still in beta) to\n",(0,o.jsx)(t.a,{href:"https://collectives.polkassembly.io/join-fellowship?network=collectives",children:"apply for the Polkadot Technical Fellowship."}),"\nThis initiative is funded by Polkadot treasury through\n",(0,o.jsx)(t.a,{href:"https://polkadot.polkassembly.io/treasury/574",children:"OpenGov referendum 373"})]})}),"\n",(0,o.jsxs)(t.p,{children:["The full set of instructions to be inducted to the Polkadot Technical Fellowship are available on\n",(0,o.jsx)(t.a,{href:"https://polkadot-fellows.xyz/#/membership",children:"the fellowship dasboard"}),"."]}),"\n",(0,o.jsx)(t.h3,{id:"rank-updates",children:"Rank Updates"}),"\n",(0,o.jsxs)(t.p,{children:["The Polkadot Technical Fellowship members are expected to provide a periodic evidence to request for\nretaining their rank or to get promoted to a higher rank. Any fellowship member upto rank 4 can be\npromoted to the next rank through a fellowship referenda that can be voted by the members who are 2\nranks higher. For instance, the fellowship\n",(0,o.jsx)(t.a,{href:"https://collectives.subsquare.io/fellowship/referenda/64",children:"referenda 64"})," which promotes a member\nfrom rank 1 to rank 2 can only be voted by members whose ranks are greater than or equal to 3.\nPromotion of the Polkadot Fellowship members from rank 5 needs to be done through an OpenGov\nreferendum. For more information, check the rank updates section on\n",(0,o.jsx)(t.a,{href:"https://polkadot-fellows.xyz/#/membership",children:"the fellowship dashboard"}),"."]})]})}function d(e={}){const{wrapper:t}={...(0,l.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(h,{...e})}):h(e)}},47379:(e,t,n)=>{"use strict";n.d(t,{A:()=>p});var o=n(90675),l=n(10467),s=n(96540),i=n(19588),r=n(2026),a=n(11135);function c(e,t,n){return h.apply(this,arguments)}function h(){return(h=(0,l.A)((0,o.A)().mark((function e(t,n,l){var s,a,c,h,d;return(0,o.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s=void 0,a=void 0,e.t0=t,e.next="polkadot"===e.t0?5:"kusama"===e.t0?7:"statemine"===e.t0?9:"statemint"===e.t0?11:"polkadotpeople"===e.t0?13:"kusamapeople"===e.t0?15:17;break;case 5:return s="wss://rpc.polkadot.io",e.abrupt("break",18);case 7:return s="wss://kusama-rpc.polkadot.io/",e.abrupt("break",18);case 9:return s="wss://statemine-rpc.polkadot.io/",e.abrupt("break",18);case 11:return s="wss://statemint-rpc.polkadot.io/",e.abrupt("break",18);case 13:return s="wss://polkadot-people-rpc.polkadot.io/",e.abrupt("break",18);case 15:return s="wss://kusama-people-rpc.polkadot.io/",e.abrupt("break",18);case 17:console.log("Unknown socket url provided, no connection made.");case 18:if(void 0!==s){e.next=22;break}return e.abrupt("return");case 22:return c=new i.E(s),e.next=25,r.G.create({provider:c});case 25:h=e.sent,(d=n.split(".")).forEach((function(e){e in h&&(h=h[e])})),e.t1=d[0],e.next="consts"===e.t1?31:"query"===e.t1?33:38;break;case 31:return a=h.toString(),e.abrupt("break",39);case 33:return e.next=35,h();case 35:return a=(a=e.sent).toString(),e.abrupt("break",39);case 38:console.log("Unknown path prefix ("+d[0]+") in "+n);case 39:return e.abrupt("return",a);case 40:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function d(e,t,n,o){switch(t){case"humanReadable":(0,a.HumanReadable)(e,n,o);break;case"precise":(0,a.Precise)(e,n,o);break;case"blocksToDays":(0,a.BlocksToDays)(e,o);break;case"erasToDays":(0,a.ErasToDays)(e,o,n);break;case"percentage":(0,a.Percentage)(e,o);break;case"permillToPercent":(0,a.PermillToPercent)(e,o);break;case"arrayLength":(0,a.ArrayLength)(e,o);break;default:return void console.log("Ignoring unknown filter type")}}const p=function(e){var t=e.network,n=e.path,i=e.defaultValue,r=e.filter,a=void 0===r?void 0:r,h=(0,s.useState)(""),p=h[0],u=h[1];return t=t.toLowerCase(),(0,s.useEffect)((function(){void 0!==a?d(i.toString(),a,t,u):u(i.toString());var e=void 0;switch(t){case"polkadot":e="wss://rpc.polkadot.io";break;case"kusama":e="wss://kusama-rpc.polkadot.io/";break;case"statemine":e="wss://kusama-asset-hub-rpc.polkadot.io/";break;case"statemint":e="wss://polkadot-asset-hub-rpc.polkadot.io/";break;case"kusamapeople":e="wss://kusama-people-rpc.polkadot.io";break;case"polkadotpeople":e="wss://polkadot-people-rpc.polkadot.io";break;default:console.log("Unknown network provided, "+t)}if(void 0===e)console.log("Failed to connect to a valid websocket, applying default");else{var s=function(){var e=(0,l.A)((0,o.A)().mark((function e(){var l;return(0,o.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,c(t,n,u);case 2:if(void 0!==(l=e.sent)){e.next=7;break}return e.abrupt("return");case 7:void 0!==a?d(l,a,t,u):u(l);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();try{s()}catch(r){console.log(r)}}}),[]),p}},11135:e=>{var t="polkadot",n="kusama",o="statemine",l="statemint",s="polkadotpeople",i="kusamapeople",r={polkadot:{precision:1e10,symbol:"DOT"},kusama:{precision:1e12,symbol:"KSM"},statemint:{precision:1e10,symbol:"DOT"},statemine:{precision:1e12,symbol:"KSM"},polkadotpeople:{precision:1e10,symbol:"DOT"},kusamapeople:{precision:1e12,symbol:"KSM"}};e.exports={HumanReadable:function(e,a,c){var h=void 0;if(a===t||a===l)h=3;else if(a===n||a===o||a===s)h=6;else{if(a!=i)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");h=8}e=parseFloat(e),c((e=Number.isInteger(e/r[a].precision)?e/r[a].precision+" "+r[a].symbol:(e/r[a].precision).toFixed(h)+" "+r[a].symbol).toString())},Precise:function(e,t,n){n(e=(e=parseFloat(e))/r[t].precision+" "+r[t].symbol)},BlocksToDays:function(e,t){t((e=6*e/86400).toString())},ErasToDays:function(e,r,a){var c=void 0;if(a===t||a===l||a==s)c=1;else{if(a!==n&&a!==o&&a!=i)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");c=4}r((e/=c).toString())},Percentage:function(e,t){t((e/=1e7).toString())},PermillToPercent:function(e,t){t((e/=1e4).toString())},ArrayLength:function(e,t){t((e=e.split(",").length).toString())}}},93796:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const o=n.p+"assets/images/fellowship-whitelist-xcm-02a3e8aa5ac0c678b739738f383a6e57.png"},47790:()=>{}}]); \ No newline at end of file diff --git a/assets/js/73d1b372.56c2d5de.js b/assets/js/73d1b372.56c2d5de.js deleted file mode 100644 index 21c7061bb736..000000000000 --- a/assets/js/73d1b372.56c2d5de.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1498],{1874:(e,i,n)=>{n.r(i),n.d(i,{assets:()=>l,contentTitle:()=>r,default:()=>d,frontMatter:()=>o,metadata:()=>s,toc:()=>c});var t=n(74848),a=n(28453);const o={id:"learn-agile-coretime",title:"Introduction to Agile Coretime",sidebar_label:"Agile Coretime Intro",description:"Introduction to Agile Coretime and its terminology",keywords:["coretime","blockspace","parachain","on-demand","cores"],slug:"../learn-agile-coretime"},r=void 0,s={id:"learn/learn-agile-coretime",title:"Introduction to Agile Coretime",description:"Introduction to Agile Coretime and its terminology",source:"@site/../docs/learn/learn-agile-coretime.md",sourceDirName:"learn",slug:"/learn-agile-coretime",permalink:"/docs/learn-agile-coretime",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-agile-coretime.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1729152709e3,frontMatter:{id:"learn-agile-coretime",title:"Introduction to Agile Coretime",sidebar_label:"Agile Coretime Intro",description:"Introduction to Agile Coretime and its terminology",keywords:["coretime","blockspace","parachain","on-demand","cores"],slug:"../learn-agile-coretime"},sidebar:"docs",previous:{title:"Agile Coretime",permalink:"/docs/learn-agile-coretime-index"},next:{title:"Coretime Marketplaces",permalink:"/docs/learn-guides-coretime-marketplaces"}},l={},c=[{value:"Agile Coretime Terminology",id:"agile-coretime-terminology",level:2},{value:"Core",id:"core",level:3},{value:"Coretime",id:"coretime",level:3},{value:"Bulk Coretime",id:"bulk-coretime",level:3},{value:"Region",id:"region",level:3},{value:"On-demand Coretime",id:"on-demand-coretime",level:3},{value:"On-demand Coretime Pool",id:"on-demand-coretime-pool",level:3},{value:"Coretime Chain",id:"coretime-chain",level:3},{value:"Timeslice",id:"timeslice",level:3},{value:"Task",id:"task",level:3},{value:"Agile Coretime Implementation",id:"agile-coretime-implementation",level:2},{value:"Coretime Sales",id:"coretime-sales",level:3},{value:"Splitting and Interlacing",id:"splitting-and-interlacing",level:3},{value:"Elastic Scaling",id:"elastic-scaling",level:3},{value:"Agile Coretime FAQ",id:"agile-coretime-faq",level:2},{value:"Roadmap",id:"roadmap",level:3},{value:"Where can we track Agile Coretime Progress",id:"where-can-we-track-agile-coretime-progress",level:4},{value:"Is all of RFC-1 coming at once or in parts?",id:"is-all-of-rfc-1-coming-at-once-or-in-parts",level:4},{value:"What is currently being developed in the ecosystem to support Agile Coretime?",id:"what-is-currently-being-developed-in-the-ecosystem-to-support-agile-coretime",level:4},{value:"Will all the current leaseholder parachains migrate and when?",id:"will-all-the-current-leaseholder-parachains-migrate-and-when",level:4},{value:"Product",id:"product",level:3},{value:"Where will coretime be maintained?",id:"where-will-coretime-be-maintained",level:4},{value:"Is the Broker Chain the same as the Coretime Chain?",id:"is-the-broker-chain-the-same-as-the-coretime-chain",level:4},{value:"Can cores be shared at the same time?",id:"can-cores-be-shared-at-the-same-time",level:4},{value:"What limits are there to the number of cores?",id:"what-limits-are-there-to-the-number-of-cores",level:4},{value:"Is there a UI for the Coretime Chain?",id:"is-there-a-ui-for-the-coretime-chain",level:4},{value:"Coretime Pricing and Purchasing",id:"coretime-pricing-and-purchasing",level:3},{value:"How is the price for bulk coretime calculated?",id:"how-is-the-price-for-bulk-coretime-calculated",level:4},{value:"How do sale periods work on the Coretime Chain?",id:"how-do-sale-periods-work-on-the-coretime-chain",level:4},{value:"How does the pricing mechanism for on-demand coretime work?",id:"how-does-the-pricing-mechanism-for-on-demand-coretime-work",level:4},{value:"Do I need to pay a deposit to register for coretime?",id:"do-i-need-to-pay-a-deposit-to-register-for-coretime",level:4},{value:"How does the price change over time?",id:"how-does-the-price-change-over-time",level:4},{value:"Can the renewal price be different per taskID (Parachain)? Or will each sale cycle have a fix renewal price?",id:"can-the-renewal-price-be-different-per-taskid-parachain-or-will-each-sale-cycle-have-a-fix-renewal-price",level:4},{value:"If purchased in bulk, do you then have \u201cone core\u201d or \u201cone bucket of coretime\u201d that you can use in your own time? Or is there a specific slot?",id:"if-purchased-in-bulk-do-you-then-have-one-core-or-one-bucket-of-coretime-that-you-can-use-in-your-own-time-or-is-there-a-specific-slot",level:4},{value:"What happens to purchased coretime if I don't use it?",id:"what-happens-to-purchased-coretime-if-i-dont-use-it",level:4},{value:"Can I buy coretime in advance and start using it when I'm ready?",id:"can-i-buy-coretime-in-advance-and-start-using-it-when-im-ready",level:4},{value:"Concepts",id:"concepts",level:3},{value:"Is it \u201con-demand coretime\u201d or \u201cInstantaneous coretime\u201d?",id:"is-it-on-demand-coretime-or-instantaneous-coretime",level:4},{value:"What's the correct spelling and its usage?",id:"whats-the-correct-spelling-and-its-usage",level:4},{value:"What\u2019s the connection between blockspace and coretime?",id:"whats-the-connection-between-blockspace-and-coretime",level:4},{value:"Value Proposition",id:"value-proposition",level:3},{value:"What are the benefits of Agile Coretime, and how do the on-demand and bulk models suit different customers?",id:"what-are-the-benefits-of-agile-coretime-and-how-do-the-on-demand-and-bulk-models-suit-different-customers",level:4},{value:"What makes the coretime model on Polkadot competitive?",id:"what-makes-the-coretime-model-on-polkadot-competitive",level:4},{value:"How close do we get to Web2 scale for Web3?",id:"how-close-do-we-get-to-web2-scale-for-web3",level:4},{value:"Implementation",id:"implementation",level:3},{value:"What do I need to do for my parachain to continue working in the switch to coretime?",id:"what-do-i-need-to-do-for-my-parachain-to-continue-working-in-the-switch-to-coretime",level:4},{value:"When does the last auction take place?",id:"when-does-the-last-auction-take-place",level:4},{value:"When and how can I renew my legacy lease?",id:"when-and-how-can-i-renew-my-legacy-lease",level:4},{value:"Will all leases be migrated to Agile Coretime?",id:"will-all-leases-be-migrated-to-agile-coretime",level:4},{value:"Will I be able to still swap my lease with another project?",id:"will-i-be-able-to-still-swap-my-lease-with-another-project",level:4},{value:"My lease is about to end, what do I need to do?",id:"my-lease-is-about-to-end-what-do-i-need-to-do",level:4},{value:"Can any account renew coretime on behalf of a parachain or does this need to be from the parachain sovereign account?",id:"can-any-account-renew-coretime-on-behalf-of-a-parachain-or-does-this-need-to-be-from-the-parachain-sovereign-account",level:4},{value:"How is the coretime price determined in practice?",id:"how-is-the-coretime-price-determined-in-practice",level:4},{value:"How is coretime measured and allocated technically?",id:"how-is-coretime-measured-and-allocated-technically",level:4},{value:"Why are sales of on-demand coretime happening on the relay chain?",id:"why-are-sales-of-on-demand-coretime-happening-on-the-relay-chain",level:4},{value:"What's the best way for on-demand tasks (previously known as on-demand parachains) to regularly send extrinsics to the relay chain for allowing a block to be validate?",id:"whats-the-best-way-for-on-demand-tasks-previously-known-as-on-demand-parachains-to-regularly-send-extrinsics-to-the-relay-chain-for-allowing-a-block-to-be-validate",level:4},{value:"How many cores will be configured for on-demand coretime?",id:"how-many-cores-will-be-configured-for-on-demand-coretime",level:4},{value:"What happens if my chain runs out of coretime?",id:"what-happens-if-my-chain-runs-out-of-coretime",level:4},{value:"What does splitting and interlacing mean?",id:"what-does-splitting-and-interlacing-mean",level:4}];function h(e){const i={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",h4:"h4",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,a.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(i.p,{children:["Agile Coretime enables efficient utilization of Polkadot network resources and provides economic\nflexibility for builders, generalizing Polkadot beyond what was initially proposed and envisioned in\nits ",(0,t.jsx)(i.a,{href:"https://polkadot.network/whitepaper/",children:"whitepaper"}),"."]}),"\n",(0,t.jsxs)(i.p,{children:["In Polkadot 1.0, the only way for a parachain to be secured by Polkadot was to rent a lease through\nan ",(0,t.jsx)(i.a,{href:"/docs/learn/learn-auction",children:"auction"}),", which guaranteed parachain block validation for up-to two\nyears. This involved locking significant amount of DOT, leading to a high barrier of entry for small\nand medium scale blockchain projects. The parachains produced blocks at a regular interval of 12\nseconds, irrespective of the network activity. This led to inefficient resource allocation and\nmisplaced economic incentives while producing almost empty blocks under lighter traffic and being\nunable to accommodate heavier traffic when it exceeded block limits. Agile Coretime resolves all of\nthese drawbacks."]}),"\n",(0,t.jsx)(i.p,{children:"The figure below shows the core usage for Polkadot 1.0, where the horizontal axis is time, and each\nrow represents a core. Colors show different parachains, each using one core (i.e., one parachain,\none core)."}),"\n",(0,t.jsx)(i.p,{children:(0,t.jsx)(i.img,{alt:"core-usage-dumb",src:n(32550).A+"",width:"1920",height:"800"})}),"\n",(0,t.jsxs)(i.p,{children:["Agile Coretime allows for the purchase of ",(0,t.jsx)(i.a,{href:"#coretime",children:"coretime"})," in \u201cbulk\u201d with an allocation for one\nmonth. Heavy duty parachains which need to author a block every 12 seconds (or every 6s through\n",(0,t.jsx)(i.a,{href:"/docs/learn-async-backing",children:"Asynchronous Backing"}),"), can seamlessly \u201crenew\u201d the ",(0,t.jsx)(i.a,{href:"#core",children:"core"})," each\nmonth. Coretime renewal orders take precedence over new orders and provide protection against price\nfluctuations, allowing parachains to plan their project budget and costs more effectively."]}),"\n",(0,t.jsxs)(i.p,{children:["The purchased coretime can also be split up and sold in parts, down to a single block per month,\nallowing for secondary markets to thrive and improve the allocation efficiency of coretime.\nFurthermore, Agile Coretime offers ",(0,t.jsx)(i.a,{href:"#on-demand-coretime",children:"on-demand coretime"})," functionality that\nenables the authoring of a parachain block on-demand."]}),"\n",(0,t.jsx)(i.p,{children:(0,t.jsx)(i.img,{alt:"core-usage-agile-rangeSplit",src:n(67150).A+"",width:"1920",height:"800"})}),"\n",(0,t.jsx)(i.admonition,{title:"Agile Coretime is under active development",type:"info",children:(0,t.jsxs)(i.p,{children:["The progress of Agile Coretime development can be tracked\n",(0,t.jsx)(i.a,{href:"https://github.com/orgs/paritytech/projects/119/views/20",children:"here."})]})}),"\n",(0,t.jsx)(i.h2,{id:"agile-coretime-terminology",children:"Agile Coretime Terminology"}),"\n",(0,t.jsx)(i.h3,{id:"core",children:"Core"}),"\n",(0,t.jsx)(i.p,{children:'The term "Core" captures the virtual abstraction of computational resources provided by the relay\nchain to secure the blocks of a parachain, which involves a randomized set of the relay chain\nvalidators.'}),"\n",(0,t.jsx)(i.h3,{id:"coretime",children:"Coretime"}),"\n",(0,t.jsx)(i.p,{children:"The time allocated for utilizing a core, measured in relay chain blocks."}),"\n",(0,t.jsx)(i.h3,{id:"bulk-coretime",children:"Bulk Coretime"}),"\n",(0,t.jsx)(i.p,{children:"A fixed duration of continuous coretime represented by an NFT that can be split, shared, or resold.\nCurrently, the duration of bulk coretime is set to 28 days."}),"\n",(0,t.jsx)(i.h3,{id:"region",children:"Region"}),"\n",(0,t.jsx)(i.p,{children:"The NFT representing a single unit of bulk coretime."}),"\n",(0,t.jsx)(i.h3,{id:"on-demand-coretime",children:"On-demand Coretime"}),"\n",(0,t.jsx)(i.p,{children:"Previously known as instantaneous coretime, the on-demand coretime refers to coretime acquired\nthrough bidding in near real-time for the validation of a single parachain block on one of the cores\nreserved specifically for on-demand orders."}),"\n",(0,t.jsx)(i.admonition,{title:"Parathreads are renamed to on-demand parachains",type:"info",children:(0,t.jsx)(i.p,{children:"On-demand parachains (previously called parathreads) are parachains that buy on-demand coretime and\nuse it to access the relay chain through the on-demand coretime pool."})}),"\n",(0,t.jsx)(i.h3,{id:"on-demand-coretime-pool",children:"On-demand Coretime Pool"}),"\n",(0,t.jsx)(i.p,{children:"Set of cores that are available on-demand. Cores reserved through bulk coretime could also be made\navailable in the on-demand coretime pool, in parts or in entirety."}),"\n",(0,t.jsx)(i.h3,{id:"coretime-chain",children:"Coretime Chain"}),"\n",(0,t.jsx)(i.p,{children:"A system parachain that is responsible for the sale, manipulation of bulk coretime and eventually\nthe purchase of on-demand coretime credits. It is also responsible for scheduling the respective\ncores on the relay chain to the parachains."}),"\n",(0,t.jsx)(i.h3,{id:"timeslice",children:"Timeslice"}),"\n",(0,t.jsx)(i.p,{children:"A timeslice represents the granularity the Coretime Chain schedules cores on the relay chain. The\nCoretime Chain announces a schedule for each core, comprising the next 80 relay chain blocks in\nadvance. 5,040 timeslices corresponds to the region length of 28 days (which is the initial\nconfiguration set for bulk coretime)."}),"\n",(0,t.jsx)(i.h3,{id:"task",children:"Task"}),"\n",(0,t.jsx)(i.p,{children:'The term "Task" captures the abstraction of utility of the core. Tasks on the cores are not just\nlimited to securing parachains.'}),"\n",(0,t.jsx)(i.h2,{id:"agile-coretime-implementation",children:"Agile Coretime Implementation"}),"\n",(0,t.jsxs)(i.p,{children:["Coretime is managed through the\n",(0,t.jsx)(i.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/eefd5fe4499515da66d088505093f75b5aa22550/substrate/frame/broker/src/lib.rs",children:"broker pallet"}),"\nwhich is deployed on the Coretime Chain. In theory, the Polkadot relay chain can support around a\nhundred cores seamlessly and can support over a few hundred cores through optimizations. Preliminary\ntests ran successfully with 80 cores with 12-second block times."]}),"\n",(0,t.jsx)(i.h3,{id:"coretime-sales",children:"Coretime Sales"}),"\n",(0,t.jsxs)(i.p,{children:["Sales on the Coretime Chain are of ",(0,t.jsx)(i.code,{children:"timeslice"})," length. These sales are divided into two main\nperiods: the Renewal period and the Sale period."]}),"\n",(0,t.jsx)(i.p,{children:(0,t.jsx)(i.img,{alt:"coretime-sale-timeline",src:n(60409).A+"",width:"2000",height:"1015"})}),"\n",(0,t.jsxs)(i.ul,{children:["\n",(0,t.jsxs)(i.li,{children:["Renewal periods are of ",(0,t.jsx)(i.code,{children:"interlude_length"})," blocks long, and it\u2019s where bulk coretime can be\nrenewed."]}),"\n",(0,t.jsxs)(i.li,{children:["Sale periods are as well divided into two periods: a Price Discovery period and a Fixed Price\nperiod. After the Renewal period, a new ",(0,t.jsx)(i.code,{children:"start_price"})," will be set by the Coretime Chain and a\ndutch auction of ",(0,t.jsx)(i.code,{children:"leading_length"})," blocks will start, putting downward pressure on price to find\nthe right equilibrium. This process will set the ",(0,t.jsx)(i.code,{children:"regular_price"})," which will be the one offered at\nthe Fixed Price period."]}),"\n"]}),"\n",(0,t.jsxs)(i.p,{children:["This discussion on initial coretime pricing can be viewed\n",(0,t.jsx)(i.a,{href:"https://forum.polkadot.network/t/initial-coretime-pricing/5187",children:"here"})]}),"\n",(0,t.jsx)(i.h3,{id:"splitting-and-interlacing",children:"Splitting and Interlacing"}),"\n",(0,t.jsx)(i.p,{children:"Splitting and interlacing are actions that can be performed within a region. Performing either of\nthese actions makes you lose the right to a price-capped renewal."}),"\n",(0,t.jsxs)(i.ul,{children:["\n",(0,t.jsxs)(i.li,{children:[(0,t.jsx)(i.strong,{children:"Splitting"}),": the action of dividing a region into several regions with different start and end\ntimeslices."]}),"\n",(0,t.jsxs)(i.li,{children:[(0,t.jsx)(i.strong,{children:"Interlacing:"})," the action of dividing a region into the execution of different tasks for each\nblock of a timeslice. The result regions will have the same start and end timeslice as the parent\nregion, but different tasks will be executed at different blocks."]}),"\n"]}),"\n",(0,t.jsx)(i.h3,{id:"elastic-scaling",children:"Elastic Scaling"}),"\n",(0,t.jsx)(i.p,{children:"With elastic scaling (still under development) projects can scale seamlessly and without being\nlimited to previously allocated resources. Elastic scaling is the process of getting multiple cores\nfor one task. This allows parachains to include more blocks per unit time (relay chain-side), and\nproduce more blocks per unit time (async backing on the parachain side). Elastic scaling can be\npaired with on-demand coretime to increase your bandwidth seamlessly."}),"\n",(0,t.jsx)(i.h2,{id:"agile-coretime-faq",children:"Agile Coretime FAQ"}),"\n",(0,t.jsx)(i.h3,{id:"roadmap",children:"Roadmap"}),"\n",(0,t.jsx)(i.h4,{id:"where-can-we-track-agile-coretime-progress",children:"Where can we track Agile Coretime Progress"}),"\n",(0,t.jsxs)(i.p,{children:["Agile Coretime project logistics can be tracked on the\n",(0,t.jsx)(i.a,{href:"https://github.com/orgs/paritytech/projects/119/views/20",children:"Parachains Team GitHub Dashboard"})]}),"\n",(0,t.jsx)(i.h4,{id:"is-all-of-rfc-1-coming-at-once-or-in-parts",children:"Is all of RFC-1 coming at once or in parts?"}),"\n",(0,t.jsxs)(i.p,{children:["No, with the initial Kusama launch, the following features mentioned in\n",(0,t.jsx)(i.a,{href:"https://polkadot-fellows.github.io/RFCs/approved/0001-agile-coretime.html",children:"RFC-1"})," are rolled out:"]}),"\n",(0,t.jsxs)(i.ul,{children:["\n",(0,t.jsx)(i.li,{children:"The purchase of bulk coretime and placement of on-demand orders"}),"\n",(0,t.jsx)(i.li,{children:"Renewing leases"}),"\n",(0,t.jsx)(i.li,{children:"Splitting and interlacing regions"}),"\n"]}),"\n",(0,t.jsx)(i.p,{children:"These features are still under development and will be rolled out in later releases:"}),"\n",(0,t.jsxs)(i.ul,{children:["\n",(0,t.jsx)(i.li,{children:"Getting rewards for adding your region to the on-demand pool"}),"\n",(0,t.jsx)(i.li,{children:"Credits for on-demand coretime (currently you are able to buy with native tokens of relay chain)"}),"\n"]}),"\n",(0,t.jsx)(i.h4,{id:"what-is-currently-being-developed-in-the-ecosystem-to-support-agile-coretime",children:"What is currently being developed in the ecosystem to support Agile Coretime?"}),"\n",(0,t.jsxs)(i.p,{children:["There are several ecosystem projects in the making, such as the secondary markets for coretime,\n",(0,t.jsx)(i.a,{href:"https://www.lastic.xyz/",children:"Lastic"}),", and\xa0",(0,t.jsx)(i.a,{href:"https://app.regionx.tech/",children:"RegionX"}),"."]}),"\n",(0,t.jsxs)(i.p,{children:["Always do your own research. If you feel your project should be listed on the Wiki, please follow\nthe ",(0,t.jsx)(i.a,{href:"/docs/contributing",children:"contributor's guide"}),"."]}),"\n",(0,t.jsx)(i.h4,{id:"will-all-the-current-leaseholder-parachains-migrate-and-when",children:"Will all the current leaseholder parachains migrate and when?"}),"\n",(0,t.jsx)(i.p,{children:"They will migrate when the runtime upgrade with Agile Coretime is performed on the relay chain. Any\nparachains with existing lease periods will be automatically credited bulk coretime for the\nremainder of their lease period."}),"\n",(0,t.jsx)(i.h3,{id:"product",children:"Product"}),"\n",(0,t.jsx)(i.h4,{id:"where-will-coretime-be-maintained",children:"Where will coretime be maintained?"}),"\n",(0,t.jsx)(i.p,{children:"Coretime will be managed by the broker pallet which is deployed on the Coretime Chain."}),"\n",(0,t.jsx)(i.h4,{id:"is-the-broker-chain-the-same-as-the-coretime-chain",children:"Is the Broker Chain the same as the Coretime Chain?"}),"\n",(0,t.jsx)(i.p,{children:"Yes, the broker pallet runs on the Coretime Chain."}),"\n",(0,t.jsx)(i.h4,{id:"can-cores-be-shared-at-the-same-time",children:"Can cores be shared at the same time?"}),"\n",(0,t.jsx)(i.p,{children:"Currently not. Cores can be shared, but only in time. For example, you get a core at block X,\nanother one gets it at block Y. This may change in future."}),"\n",(0,t.jsx)(i.h4,{id:"what-limits-are-there-to-the-number-of-cores",children:"What limits are there to the number of cores?"}),"\n",(0,t.jsx)(i.p,{children:"Successful tests were made with around 80 cores and 12-second block times for parachains. A single\ntest validator set is able to validate 80 blockchains simultaneously. In theory a single relay chain\nshould be able to support a few hundred cores. Optimizations to get closer to this theoretical limit\nwill be developed and deployed continuously."}),"\n",(0,t.jsxs)(i.p,{children:["Once that theoretical limit is reached, ideas for further scaling are already on the table. The goal\nis not to scale by ",(0,t.jsx)(i.a,{href:"https://www.youtube.com/watch?v=O9QZveTdW5I",children:"lowering security guarantees"}),"\n(similarly to optimistic rollups) but to optimize and improve allocation efficiency (by making\nbetter use of the existing cores)."]}),"\n",(0,t.jsx)(i.h4,{id:"is-there-a-ui-for-the-coretime-chain",children:"Is there a UI for the Coretime Chain?"}),"\n",(0,t.jsxs)(i.p,{children:["Teams in the ecosystem are working on a UI. RegionX has released an app for testing on\nPaseo:\xa0",(0,t.jsx)(i.a,{href:"https://app.regionx.tech/",children:"https://app.regionx.tech/"}),". Without the UI, this would be automated from the parachains\u2019\nruntimes or manually with Coretime Chain extrinsics via polkadot.js."]}),"\n",(0,t.jsx)(i.h3,{id:"coretime-pricing-and-purchasing",children:"Coretime Pricing and Purchasing"}),"\n",(0,t.jsx)(i.h4,{id:"how-is-the-price-for-bulk-coretime-calculated",children:"How is the price for bulk coretime calculated?"}),"\n",(0,t.jsx)(i.p,{children:"The pricing for bulk coretime depends on factors from several sources:"}),"\n",(0,t.jsxs)(i.ol,{children:["\n",(0,t.jsx)(i.li,{children:"The first source is the implementation directly in the pallet, which is not exposed as a\nconfiguration"}),"\n",(0,t.jsx)(i.li,{children:"The second source is configurable in the runtime of the Coretime Chain"}),"\n",(0,t.jsx)(i.li,{children:"Configurable parameters, such as the starting sales price, ideal bulk ration and the number of\ncores offered per sale, which are set through governance"}),"\n",(0,t.jsx)(i.li,{children:"Market forces, such as the demand and perceived true market price of a core - the impact of which\ncan be increased or decreased through the configuration set by governance"}),"\n"]}),"\n",(0,t.jsxs)(i.p,{children:["A more detailed description of the elements that have an influence on the bulk coretime price can be\nfound ",(0,t.jsx)(i.a,{href:"https://hackmd.io/@seadanda/Sk9pLYm3a",children:"here"}),"."]}),"\n",(0,t.jsxs)(i.p,{children:["After a\n",(0,t.jsx)(i.a,{href:"https://forum.polkadot.network/t/initial-coretime-pricing/5187/7?u=joyce",children:"thorough analysis"})," it was\ndecided to open a governance proposal for an initial price ~5 KSM. The price will be set with the\n\u201cstart sales\u201d call, which will go through governance after runtime upgrade. Keep an eye on the post\nto be informed and decide with us upon the initial price for Agile Coretime on KSM. The price for\nPolkadot is still under discussion."]}),"\n",(0,t.jsx)(i.h4,{id:"how-do-sale-periods-work-on-the-coretime-chain",children:"How do sale periods work on the Coretime Chain?"}),"\n",(0,t.jsx)(i.p,{children:(0,t.jsx)(i.img,{alt:"coretime-sale-timeline",src:n(60409).A+"",width:"2000",height:"1015"})}),"\n",(0,t.jsx)(i.p,{children:"Sales on the Coretime Chain are of region length. These sales are divided into two main periods: the\nRenewal period and the Sale period."}),"\n",(0,t.jsxs)(i.ul,{children:["\n",(0,t.jsx)(i.li,{children:"Renewal periods are of the length of the interlude, which is defined as a number of blocks in the\nbroker pallet configuration, and it\u2019s where bulk coretime can be renewed."}),"\n",(0,t.jsx)(i.li,{children:"Sale periods are as well divided into two periods: a Price Discovery period and a Fixed Price\nperiod. After the Renewal period, a new start price will be set by the Coretime Chain and a dutch\nauction of lead-in length blocks will start, putting downward pressure on price to find the right\nequilibrium. This process will set the base price which will be the one offered at the Fixed Price\nperiod."}),"\n"]}),"\n",(0,t.jsx)(i.h4,{id:"how-does-the-pricing-mechanism-for-on-demand-coretime-work",children:"How does the pricing mechanism for on-demand coretime work?"}),"\n",(0,t.jsx)(i.p,{children:"There will be a minimum price configured, the rest is based on demand via a price function: the\nlonger the queue, the higher the price."}),"\n",(0,t.jsx)(i.h4,{id:"do-i-need-to-pay-a-deposit-to-register-for-coretime",children:"Do I need to pay a deposit to register for coretime?"}),"\n",(0,t.jsxs)(i.p,{children:["All newly registered parachains must\n",(0,t.jsx)(i.a,{href:"https://github.com/paritytech/polkadot-sdk/pull/3020",children:"place a deposit"})," equivalent to the cost of\nregistering the maximum size of runtime (business logic) code. After a successful registration,\nparachains are allowed to be assigned to regions. The runtime of these parachains can then be\nupgraded without any additional costs. The maximum size is pre-defined and equal to everyone on the\nnetwork. This way, every registration will cost the same independent of the size of the registered\nruntime code (Wasm blob)."]}),"\n",(0,t.jsxs)(i.p,{children:[(0,t.jsx)(i.a,{href:"https://github.com/polkadot-fellows/RFCs/pull/44",children:"RFC-44"})," is proposing a new rent-based\nregistration price model, which will become an alternative (if it gets approved)."]}),"\n",(0,t.jsx)(i.h4,{id:"how-does-the-price-change-over-time",children:"How does the price change over time?"}),"\n",(0,t.jsx)(i.p,{children:"On-demand coretime will always be subject to market conditions. The price of bulk coretime changes\nbased on the outcome of the previous sale. Factors such as the number of cores sold, the target\n(from the ideal bulk ratio) and the number of cores offered in the sale are used in combination with\nthe price for which the last core was sold. Bulk renewals are capped within a percentage of the\nprevious purchase price. The algorithm that is used is implemented in each runtime and can differ\nbetween chains."}),"\n",(0,t.jsx)(i.p,{children:"The bulk price in Kusama might vary between a 50% decrease in case no cores were sold in the\nprevious sales and can increase by 5x depending on the number of cores sold and when they sell.\nThese numbers represent extreme cases though."}),"\n",(0,t.jsx)(i.h4,{id:"can-the-renewal-price-be-different-per-taskid-parachain-or-will-each-sale-cycle-have-a-fix-renewal-price",children:"Can the renewal price be different per taskID (Parachain)? Or will each sale cycle have a fix renewal price?"}),"\n",(0,t.jsx)(i.p,{children:"It is in general different per task if they hit their caps."}),"\n",(0,t.jsx)(i.p,{children:"With the current configuration on Kusama, if the price is going up, every renewal pays a maximum of\n3% more than they paid for the sale before. That keeps going back to the sale cycle they first\nbought their coretime (or the sale cycle they renewed their lease). And because people buy in\ndifferent sale cycles, or even at different times in each sale cycle, their prices can be wildly\ndifferent from one another. There\u2019s a special case for leaseholders at the end of their lease. They\npay the base price in the sale in which they expire."}),"\n",(0,t.jsx)(i.p,{children:"The story is different if the prices are decreasing, since the caps are irrelevant. If it drops far\nenough it could mean that all parachains renew at the same price."}),"\n",(0,t.jsx)(i.h4,{id:"if-purchased-in-bulk-do-you-then-have-one-core-or-one-bucket-of-coretime-that-you-can-use-in-your-own-time-or-is-there-a-specific-slot",children:"If purchased in bulk, do you then have \u201cone core\u201d or \u201cone bucket of coretime\u201d that you can use in your own time? Or is there a specific slot?"}),"\n",(0,t.jsx)(i.p,{children:"You have a specific core for the duration of four weeks, and have the ability to split the region\nup. Splitting or interlacing the region makes you lose the right to a price-capped renewal."}),"\n",(0,t.jsx)(i.h4,{id:"what-happens-to-purchased-coretime-if-i-dont-use-it",children:"What happens to purchased coretime if I don't use it?"}),"\n",(0,t.jsx)(i.p,{children:"Unused coretime can't be carried over. If the coretime within the time allocation (timeslice) is not\nused, then it is lost. If previously purchased coretime is no longer needed, it be sold on secondary\nmarkets."}),"\n",(0,t.jsx)(i.h4,{id:"can-i-buy-coretime-in-advance-and-start-using-it-when-im-ready",children:"Can I buy coretime in advance and start using it when I'm ready?"}),"\n",(0,t.jsx)(i.p,{children:"Coretime can be purchased up to 28 days in advance. Later, \u201cfutures\u201d markets to hedge against price\nfluctuations could be a possible solution to increase predictability further."}),"\n",(0,t.jsx)(i.h3,{id:"concepts",children:"Concepts"}),"\n",(0,t.jsx)(i.h4,{id:"is-it-on-demand-coretime-or-instantaneous-coretime",children:"Is it \u201con-demand coretime\u201d or \u201cInstantaneous coretime\u201d?"}),"\n",(0,t.jsx)(i.p,{children:'It was decided to stick with the term "on-demand".'}),"\n",(0,t.jsx)(i.h4,{id:"whats-the-correct-spelling-and-its-usage",children:"What's the correct spelling and its usage?"}),"\n",(0,t.jsx)(i.p,{children:"Other than Agile Coretime and the Coretime Chain, do not capitalize coretime or blockspace."}),"\n",(0,t.jsx)(i.h4,{id:"whats-the-connection-between-blockspace-and-coretime",children:"What\u2019s the connection between blockspace and coretime?"}),"\n",(0,t.jsx)(i.p,{children:"(Secure) blockspace is the resource Polkadot provides, which is measured in and allocated through\ncoretime."}),"\n",(0,t.jsx)(i.h3,{id:"value-proposition",children:"Value Proposition"}),"\n",(0,t.jsx)(i.h4,{id:"what-are-the-benefits-of-agile-coretime-and-how-do-the-on-demand-and-bulk-models-suit-different-customers",children:"What are the benefits of Agile Coretime, and how do the on-demand and bulk models suit different customers?"}),"\n",(0,t.jsxs)(i.ul,{children:["\n",(0,t.jsx)(i.li,{children:"On a high level, Agile Coretime brings a new era of scaling to Web3 with optimal resource\nallocation across the entire network."}),"\n",(0,t.jsx)(i.li,{children:"The on-demand model democratizes blockchain access by opening the door to everyone building a\ncustom, sovereign Web3 application; the bulk model brings a new level of cost-predictability for\nteams and projects."}),"\n"]}),"\n",(0,t.jsx)(i.p,{children:"Specific benefits for decision makers and developers:"}),"\n",(0,t.jsxs)(i.ul,{children:["\n",(0,t.jsx)(i.li,{children:"Agile Coretime brings efficient utilization of resources, enabling scale and agility for better\nUX, without compromising security or decentralisation."}),"\n",(0,t.jsx)(i.li,{children:"More flexible economic models for every stage of growth enable builders to innovate without\nboundaries."}),"\n",(0,t.jsx)(i.li,{children:"Developers benefit from streamlined development through simplified resource management, as well as\nfrom a consistent development environment through flexible and predictable cost modelling over\ntime."}),"\n",(0,t.jsx)(i.li,{children:"On-demand coretime removes barriers to entry: spin up your proof of concept quickly with full\naccess to Polkadot\u2019s entire ecosystem."}),"\n",(0,t.jsx)(i.li,{children:"Cost effectiveness: Remove inefficiencies by buying coretime on-demand only, or sell access to\ncoretime on secondary marketplaces."}),"\n",(0,t.jsx)(i.li,{children:"With elastic scaling (not supported yet) projects can scale seamlessly and without being limited\nto previously allocated resources. Elastic scaling is the process of getting multiple cores for\none task. This allows parachains to include more blocks per unit time (relay chain-side), and\nproduce more blocks per unit time (async backing on the parachain side). With elastic scaling, add\non-demand coretime to increase your bandwidth seamlessly."}),"\n",(0,t.jsx)(i.li,{children:"Bulk coretime enables strategic resource planning: secure bulk coretime at a fixed price to\nprevent spiking fees during high demand. This helps you future-proof your projects. Bulk coretime\nprovides a solid foundation for your long-term business plans, allowing for sustainable growth."}),"\n"]}),"\n",(0,t.jsx)(i.h4,{id:"what-makes-the-coretime-model-on-polkadot-competitive",children:"What makes the coretime model on Polkadot competitive?"}),"\n",(0,t.jsx)(i.p,{children:"The on-demand option removes barriers to entry and enables builders to start and innovate quickly.\nCombined with the bulk model, builders also mitigate risks of spiking fees during times of high\ndemand."}),"\n",(0,t.jsx)(i.p,{children:"However, as compared to running on an L1 or a scaling solution, builders still have the benefits of\nrunning on a purpose-made parachain, which is more efficient and thus cheaper than running a smart\ncontract on a generic L1. In addition, you are connected to and secured by the entire Polkadot\nnetwork."}),"\n",(0,t.jsx)(i.p,{children:"Polkadot thus offers all the benefits of building high-performing, purpose-made, and composable\nappchains, combined with the most flexible economics."}),"\n",(0,t.jsx)(i.h4,{id:"how-close-do-we-get-to-web2-scale-for-web3",children:"How close do we get to Web2 scale for Web3?"}),"\n",(0,t.jsxs)(i.p,{children:["Agile Coretime mainly improves allocation efficiency. With\n",(0,t.jsx)(i.a,{href:"https://github.com/paritytech/polkadot-sdk/issues/1829",children:"elastic scaling"}),", we take a big step\ntowards enabling Web2 scale in Web3 by reducing parachain block production below 6 seconds.\nTheoretically, parachains will be able to produce blocks very fast and the limitations will lie on\nthe relay chain side\u2019s cores and how many cores a parachain uses."]}),"\n",(0,t.jsx)(i.h3,{id:"implementation",children:"Implementation"}),"\n",(0,t.jsx)(i.admonition,{title:"Unable to use multiple cores!",type:"caution",children:(0,t.jsxs)(i.p,{children:["The coretime chain does not prohibit ordering multiple cores and assigning them to the same\nparachain. However, elastic scaling is still in the works ",(0,t.jsx)(i.strong,{children:"so don't do this, you will not be able\nto use those cores."})]})}),"\n",(0,t.jsx)(i.h4,{id:"what-do-i-need-to-do-for-my-parachain-to-continue-working-in-the-switch-to-coretime",children:"What do I need to do for my parachain to continue working in the switch to coretime?"}),"\n",(0,t.jsx)(i.p,{children:"Current parachain slots will be converted to legacy leases automatically in the runtime upgrade\nthrough a migration, with no intervention needed. The lease will grant your parachain a core until\nthe end of the region in which its slot would have expired."}),"\n",(0,t.jsx)(i.h4,{id:"when-does-the-last-auction-take-place",children:"When does the last auction take place?"}),"\n",(0,t.jsx)(i.p,{children:"Auctions took place until the launch of Agile Coretime with Polkadot runtime upgrade on the 19th of\nSeptember 2024. Ongoing auctions were canceled and existing active leases of previous auctions were\nmigrated to Agile Coretime. In case you had a lease secured, you automatically got corresponding\ncoretime, with renewal right."}),"\n",(0,t.jsx)(i.p,{children:(0,t.jsxs)(i.em,{children:["Note: if your team secured a lease with a new paraID, please\n",(0,t.jsx)(i.a,{href:"#will-i-be-able-to-still-swap-my-lease-with-another-project",children:"read the question about swapping"}),"."]})}),"\n",(0,t.jsx)(i.h4,{id:"when-and-how-can-i-renew-my-legacy-lease",children:"When and how can I renew my legacy lease?"}),"\n",(0,t.jsxs)(i.p,{children:["The ",(0,t.jsx)(i.code,{children:"slots.leases"})," are migrated to ",(0,t.jsx)(i.code,{children:"leases"})," in the broker pallet with an expiry ",(0,t.jsx)(i.code,{children:"timeslice"})," that\ncorresponds to your original expiry block. When the lease expires, the parachain has a core until\nthe end of the sales period that it expired in. After that, the ",(0,t.jsx)(i.code,{children:"interlude"})," period starts. In that\nsale period you can renew your bulk coretime by calling\xa0",(0,t.jsx)(i.code,{children:"renew"}),"\xa0on the lease's core. The price will\nbe charged and will be equal to the market price of a bulk core in that sale."]}),"\n",(0,t.jsxs)(i.p,{children:["For more details, check out our\n",(0,t.jsx)(i.a,{href:"https://polkadot-public.notion.site/Implementation-reference-Coretime-from-Trappist-c930796e8c884011adb1fa24ef22f77c?pvs=4",children:"technical guide"}),"."]}),"\n",(0,t.jsx)(i.h4,{id:"will-all-leases-be-migrated-to-agile-coretime",children:"Will all leases be migrated to Agile Coretime?"}),"\n",(0,t.jsxs)(i.p,{children:["If your team has a lease secured by the time Agile Coretime launches, they will also have a lease on\nAgile Coretime and the right for renewal when the lease expires. If the lease of your project would\nonly start ",(0,t.jsx)(i.em,{children:"after"})," Agile Coretime launch (not yet active at launch time), the lease will be\ncancelled and your locked KSM refunded. You will need to purchase and assign coretime."]}),"\n",(0,t.jsx)(i.p,{children:(0,t.jsx)(i.em,{children:"Note: Your lease will also be canceled and refunded, in case it is not continuous, as leases with\n\u201choles\u201d are not supported by Agile Coretime."})}),"\n",(0,t.jsx)(i.h4,{id:"will-i-be-able-to-still-swap-my-lease-with-another-project",children:"Will I be able to still swap my lease with another project?"}),"\n",(0,t.jsxs)(i.p,{children:["Unfortunately you won\u2019t be able for the current Kusama release, and it\u2019s advisable to avoid doing it\non Polkadot too, as swapping is not something that will exist with Agile Coretime. Yet to ensure a\nsmooth migration, we\u2019re implementing a solution for Polkadot. Once we release Agile Coretime on\nPolkadot, you should be able to call the\n",(0,t.jsx)(i.a,{href:"https://github.com/paritytech/polkadot-sdk/issues/3552",children:"swap extrinsic"})," to swap your lease with\nanother project and the change will be reflected on Agile Coretime as well."]}),"\n",(0,t.jsx)(i.h4,{id:"my-lease-is-about-to-end-what-do-i-need-to-do",children:"My lease is about to end, what do I need to do?"}),"\n",(0,t.jsx)(i.p,{children:"If your lease is about to expire, your core is added to the allowed renewals and you are able to\nrenew your core for a fixed percentage increase before the rest of the market is able to bid on it.\nPlease, make sure to renew your lease within the period defined by the broker chain to avoid\ndowntime for your chain and potentially losing your fixed renewal cost."}),"\n",(0,t.jsx)(i.h4,{id:"can-any-account-renew-coretime-on-behalf-of-a-parachain-or-does-this-need-to-be-from-the-parachain-sovereign-account",children:"Can any account renew coretime on behalf of a parachain or does this need to be from the parachain sovereign account?"}),"\n",(0,t.jsx)(i.p,{children:"Yes, any account with enough funds can renew it for any given parachain on a core which qualifies\nfor renewal."}),"\n",(0,t.jsx)(i.h4,{id:"how-is-the-coretime-price-determined-in-practice",children:"How is the coretime price determined in practice?"}),"\n",(0,t.jsx)(i.p,{children:"The starting price is initially configured by a referendum. In subsequent sales, it depends on the\nnumber of cores which were sold vs those which were for sale. If the ideal ratio was sold (the ratio\nis configured by referendum, too) then the price remains the same. If fewer cores than the ideal\nwere sold, then the price decreases. If more cores are sold than ideal, then the price increases. In\nthis way the price is sensitive to market conditions, the initial configuration, and the number of\ncores offered in the sales."}),"\n",(0,t.jsx)(i.h4,{id:"how-is-coretime-measured-and-allocated-technically",children:"How is coretime measured and allocated technically?"}),"\n",(0,t.jsx)(i.p,{children:"The Coretime Chain is a proposed new system parachain within the Polkadot network that is\nresponsible for the management of coretime. It is designed to handle the allocation of bulk coretime\nand track ownership of coretime as non-fungible assets (NFTs). The Coretime Chain provides\ninformation to the relay chain regarding the number of cores available, the tasks running on each\ncore, and accounting information for on-demand coretime credit. Additionally, it processes renewals\nand allows for various manipulations of bulk coretime, such as transfers, partitioning, interlacing,\nassignment to tasks, and pooling for on-demand coretime."}),"\n",(0,t.jsx)(i.h4,{id:"why-are-sales-of-on-demand-coretime-happening-on-the-relay-chain",children:"Why are sales of on-demand coretime happening on the relay chain?"}),"\n",(0,t.jsx)(i.p,{children:"In the beginning, sales are executed on the relay chain, but they could move to the Coretime Chain.\nLatency is the only drawback: at low demand, the buyer would receive the coretime instantly when via\nthe relay chain, but there\u2019ll be a delay when executed on the Coretime Chain. At times of high\ndemand, there will be a queue anyway and this delay matters less."}),"\n",(0,t.jsx)(i.h4,{id:"whats-the-best-way-for-on-demand-tasks-previously-known-as-on-demand-parachains-to-regularly-send-extrinsics-to-the-relay-chain-for-allowing-a-block-to-be-validate",children:"What's the best way for on-demand tasks (previously known as on-demand parachains) to regularly send extrinsics to the relay chain for allowing a block to be validate?"}),"\n",(0,t.jsxs)(i.p,{children:["A ready-to-use automated and decentralized method for ordering on-demand coretime is\ncurrently\xa0",(0,t.jsx)(i.a,{href:"https://github.com/paritytech/polkadot-sdk/issues/1487",children:"being implemented"}),". Some teams\nalready implemented a simplified\xa0",(0,t.jsx)(i.a,{href:"https://github.com/Magport/Magnet/issues/4",children:"variant"}),'. What works\nin any case is ordering on-demand coretime "by hand", by sending the\xa0',(0,t.jsx)(i.code,{children:"placeOrderKeepAlive"}),"\xa0extrinsic\nof the\xa0",(0,t.jsx)(i.code,{children:"onDemandAssignmentProvider"}),", via polkadot js for example. You can find an easy step-by-step\nguide\n",(0,t.jsx)(i.a,{href:"https://forum.polkadot.network/t/parachain-consensus-updates-coretime-asynchronous-backing-scalability/4396/8?u=kianenigma",children:"here"}),"."]}),"\n",(0,t.jsx)(i.h4,{id:"how-many-cores-will-be-configured-for-on-demand-coretime",children:"How many cores will be configured for on-demand coretime?"}),"\n",(0,t.jsx)(i.p,{children:"We will certainly start with one core on Kusama and one on Polkadot, and then see if this is\nsufficient initially."}),"\n",(0,t.jsx)(i.h4,{id:"what-happens-if-my-chain-runs-out-of-coretime",children:"What happens if my chain runs out of coretime?"}),"\n",(0,t.jsx)(i.p,{children:"Your chain won\u2019t be able to validate further blocks and will halt."}),"\n",(0,t.jsx)(i.h4,{id:"what-does-splitting-and-interlacing-mean",children:"What does splitting and interlacing mean?"}),"\n",(0,t.jsx)(i.p,{children:"Splitting and interlacing are actions anyone can make within its own region. Performing any of these\nwill result in a new region with new characteristics, and will make the owner of the original region\nunable to renew it."}),"\n",(0,t.jsxs)(i.ul,{children:["\n",(0,t.jsxs)(i.li,{children:[(0,t.jsx)(i.strong,{children:"Splitting"}),": the action of dividing a region into several regions with different start and end\ntimeslices."]}),"\n",(0,t.jsxs)(i.li,{children:[(0,t.jsx)(i.strong,{children:"Interlacing:"})," the action of dividing a region into the execution of different tasks for each\nblock of a timeslice. The result regions will have the same start and end timeslice as the parent\nregion, but different tasks will be executed at different blocks."]}),"\n"]})]})}function d(e={}){const{wrapper:i}={...(0,a.R)(),...e.components};return i?(0,t.jsx)(i,{...e,children:(0,t.jsx)(h,{...e})}):h(e)}},67150:(e,i,n)=>{n.d(i,{A:()=>t});const t=n.p+"assets/images/core-usage-agile-rangeSplit-d8511cbb8658052ac0a639bd6a722982.png"},32550:(e,i,n)=>{n.d(i,{A:()=>t});const t=n.p+"assets/images/core-usage-dumb-6419ee60a3606e10d89a1c91dbf24e20.png"},60409:(e,i,n)=>{n.d(i,{A:()=>t});const t=n.p+"assets/images/Coretime-Sale-Timeline-d621574ae5a430c8e80861693985631d.png"},28453:(e,i,n)=>{n.d(i,{R:()=>r,x:()=>s});var t=n(96540);const a={},o=t.createContext(a);function r(e){const i=t.useContext(o);return t.useMemo((function(){return"function"==typeof e?e(i):{...i,...e}}),[i,e])}function s(e){let i;return i=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:r(e.components),t.createElement(o.Provider,{value:i},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/73d1b372.e0825463.js b/assets/js/73d1b372.e0825463.js new file mode 100644 index 000000000000..d5217fa6bb56 --- /dev/null +++ b/assets/js/73d1b372.e0825463.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1498],{15735:(e,i,n)=>{n.r(i),n.d(i,{assets:()=>l,contentTitle:()=>s,default:()=>d,frontMatter:()=>r,metadata:()=>t,toc:()=>c});const t=JSON.parse('{"id":"learn/learn-agile-coretime","title":"Introduction to Agile Coretime","description":"Introduction to Agile Coretime and its terminology","source":"@site/../docs/learn/learn-agile-coretime.md","sourceDirName":"learn","slug":"/learn-agile-coretime","permalink":"/docs/learn-agile-coretime","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-agile-coretime.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1729152709000,"frontMatter":{"id":"learn-agile-coretime","title":"Introduction to Agile Coretime","sidebar_label":"Agile Coretime Intro","description":"Introduction to Agile Coretime and its terminology","keywords":["coretime","blockspace","parachain","on-demand","cores"],"slug":"../learn-agile-coretime"},"sidebar":"docs","previous":{"title":"Agile Coretime","permalink":"/docs/learn-agile-coretime-index"},"next":{"title":"Coretime Marketplaces","permalink":"/docs/learn-guides-coretime-marketplaces"}}');var a=n(74848),o=n(28453);const r={id:"learn-agile-coretime",title:"Introduction to Agile Coretime",sidebar_label:"Agile Coretime Intro",description:"Introduction to Agile Coretime and its terminology",keywords:["coretime","blockspace","parachain","on-demand","cores"],slug:"../learn-agile-coretime"},s=void 0,l={},c=[{value:"Agile Coretime Terminology",id:"agile-coretime-terminology",level:2},{value:"Core",id:"core",level:3},{value:"Coretime",id:"coretime",level:3},{value:"Bulk Coretime",id:"bulk-coretime",level:3},{value:"Region",id:"region",level:3},{value:"On-demand Coretime",id:"on-demand-coretime",level:3},{value:"On-demand Coretime Pool",id:"on-demand-coretime-pool",level:3},{value:"Coretime Chain",id:"coretime-chain",level:3},{value:"Timeslice",id:"timeslice",level:3},{value:"Task",id:"task",level:3},{value:"Agile Coretime Implementation",id:"agile-coretime-implementation",level:2},{value:"Coretime Sales",id:"coretime-sales",level:3},{value:"Splitting and Interlacing",id:"splitting-and-interlacing",level:3},{value:"Elastic Scaling",id:"elastic-scaling",level:3},{value:"Agile Coretime FAQ",id:"agile-coretime-faq",level:2},{value:"Roadmap",id:"roadmap",level:3},{value:"Where can we track Agile Coretime Progress",id:"where-can-we-track-agile-coretime-progress",level:4},{value:"Is all of RFC-1 coming at once or in parts?",id:"is-all-of-rfc-1-coming-at-once-or-in-parts",level:4},{value:"What is currently being developed in the ecosystem to support Agile Coretime?",id:"what-is-currently-being-developed-in-the-ecosystem-to-support-agile-coretime",level:4},{value:"Will all the current leaseholder parachains migrate and when?",id:"will-all-the-current-leaseholder-parachains-migrate-and-when",level:4},{value:"Product",id:"product",level:3},{value:"Where will coretime be maintained?",id:"where-will-coretime-be-maintained",level:4},{value:"Is the Broker Chain the same as the Coretime Chain?",id:"is-the-broker-chain-the-same-as-the-coretime-chain",level:4},{value:"Can cores be shared at the same time?",id:"can-cores-be-shared-at-the-same-time",level:4},{value:"What limits are there to the number of cores?",id:"what-limits-are-there-to-the-number-of-cores",level:4},{value:"Is there a UI for the Coretime Chain?",id:"is-there-a-ui-for-the-coretime-chain",level:4},{value:"Coretime Pricing and Purchasing",id:"coretime-pricing-and-purchasing",level:3},{value:"How is the price for bulk coretime calculated?",id:"how-is-the-price-for-bulk-coretime-calculated",level:4},{value:"How do sale periods work on the Coretime Chain?",id:"how-do-sale-periods-work-on-the-coretime-chain",level:4},{value:"How does the pricing mechanism for on-demand coretime work?",id:"how-does-the-pricing-mechanism-for-on-demand-coretime-work",level:4},{value:"Do I need to pay a deposit to register for coretime?",id:"do-i-need-to-pay-a-deposit-to-register-for-coretime",level:4},{value:"How does the price change over time?",id:"how-does-the-price-change-over-time",level:4},{value:"Can the renewal price be different per taskID (Parachain)? Or will each sale cycle have a fix renewal price?",id:"can-the-renewal-price-be-different-per-taskid-parachain-or-will-each-sale-cycle-have-a-fix-renewal-price",level:4},{value:"If purchased in bulk, do you then have \u201cone core\u201d or \u201cone bucket of coretime\u201d that you can use in your own time? Or is there a specific slot?",id:"if-purchased-in-bulk-do-you-then-have-one-core-or-one-bucket-of-coretime-that-you-can-use-in-your-own-time-or-is-there-a-specific-slot",level:4},{value:"What happens to purchased coretime if I don't use it?",id:"what-happens-to-purchased-coretime-if-i-dont-use-it",level:4},{value:"Can I buy coretime in advance and start using it when I'm ready?",id:"can-i-buy-coretime-in-advance-and-start-using-it-when-im-ready",level:4},{value:"Concepts",id:"concepts",level:3},{value:"Is it \u201con-demand coretime\u201d or \u201cInstantaneous coretime\u201d?",id:"is-it-on-demand-coretime-or-instantaneous-coretime",level:4},{value:"What's the correct spelling and its usage?",id:"whats-the-correct-spelling-and-its-usage",level:4},{value:"What\u2019s the connection between blockspace and coretime?",id:"whats-the-connection-between-blockspace-and-coretime",level:4},{value:"Value Proposition",id:"value-proposition",level:3},{value:"What are the benefits of Agile Coretime, and how do the on-demand and bulk models suit different customers?",id:"what-are-the-benefits-of-agile-coretime-and-how-do-the-on-demand-and-bulk-models-suit-different-customers",level:4},{value:"What makes the coretime model on Polkadot competitive?",id:"what-makes-the-coretime-model-on-polkadot-competitive",level:4},{value:"How close do we get to Web2 scale for Web3?",id:"how-close-do-we-get-to-web2-scale-for-web3",level:4},{value:"Implementation",id:"implementation",level:3},{value:"What do I need to do for my parachain to continue working in the switch to coretime?",id:"what-do-i-need-to-do-for-my-parachain-to-continue-working-in-the-switch-to-coretime",level:4},{value:"When does the last auction take place?",id:"when-does-the-last-auction-take-place",level:4},{value:"When and how can I renew my legacy lease?",id:"when-and-how-can-i-renew-my-legacy-lease",level:4},{value:"Will all leases be migrated to Agile Coretime?",id:"will-all-leases-be-migrated-to-agile-coretime",level:4},{value:"Will I be able to still swap my lease with another project?",id:"will-i-be-able-to-still-swap-my-lease-with-another-project",level:4},{value:"My lease is about to end, what do I need to do?",id:"my-lease-is-about-to-end-what-do-i-need-to-do",level:4},{value:"Can any account renew coretime on behalf of a parachain or does this need to be from the parachain sovereign account?",id:"can-any-account-renew-coretime-on-behalf-of-a-parachain-or-does-this-need-to-be-from-the-parachain-sovereign-account",level:4},{value:"How is the coretime price determined in practice?",id:"how-is-the-coretime-price-determined-in-practice",level:4},{value:"How is coretime measured and allocated technically?",id:"how-is-coretime-measured-and-allocated-technically",level:4},{value:"Why are sales of on-demand coretime happening on the relay chain?",id:"why-are-sales-of-on-demand-coretime-happening-on-the-relay-chain",level:4},{value:"What's the best way for on-demand tasks (previously known as on-demand parachains) to regularly send extrinsics to the relay chain for allowing a block to be validate?",id:"whats-the-best-way-for-on-demand-tasks-previously-known-as-on-demand-parachains-to-regularly-send-extrinsics-to-the-relay-chain-for-allowing-a-block-to-be-validate",level:4},{value:"How many cores will be configured for on-demand coretime?",id:"how-many-cores-will-be-configured-for-on-demand-coretime",level:4},{value:"What happens if my chain runs out of coretime?",id:"what-happens-if-my-chain-runs-out-of-coretime",level:4},{value:"What does splitting and interlacing mean?",id:"what-does-splitting-and-interlacing-mean",level:4}];function h(e){const i={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",h4:"h4",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,o.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(i.p,{children:["Agile Coretime enables efficient utilization of Polkadot network resources and provides economic\nflexibility for builders, generalizing Polkadot beyond what was initially proposed and envisioned in\nits ",(0,a.jsx)(i.a,{href:"https://polkadot.network/whitepaper/",children:"whitepaper"}),"."]}),"\n",(0,a.jsxs)(i.p,{children:["In Polkadot 1.0, the only way for a parachain to be secured by Polkadot was to rent a lease through\nan ",(0,a.jsx)(i.a,{href:"/docs/learn/learn-auction",children:"auction"}),", which guaranteed parachain block validation for up-to two\nyears. This involved locking significant amount of DOT, leading to a high barrier of entry for small\nand medium scale blockchain projects. The parachains produced blocks at a regular interval of 12\nseconds, irrespective of the network activity. This led to inefficient resource allocation and\nmisplaced economic incentives while producing almost empty blocks under lighter traffic and being\nunable to accommodate heavier traffic when it exceeded block limits. Agile Coretime resolves all of\nthese drawbacks."]}),"\n",(0,a.jsx)(i.p,{children:"The figure below shows the core usage for Polkadot 1.0, where the horizontal axis is time, and each\nrow represents a core. Colors show different parachains, each using one core (i.e., one parachain,\none core)."}),"\n",(0,a.jsx)(i.p,{children:(0,a.jsx)(i.img,{alt:"core-usage-dumb",src:n(32550).A+"",width:"1920",height:"800"})}),"\n",(0,a.jsxs)(i.p,{children:["Agile Coretime allows for the purchase of ",(0,a.jsx)(i.a,{href:"#coretime",children:"coretime"})," in \u201cbulk\u201d with an allocation for one\nmonth. Heavy duty parachains which need to author a block every 12 seconds (or every 6s through\n",(0,a.jsx)(i.a,{href:"/docs/learn-async-backing",children:"Asynchronous Backing"}),"), can seamlessly \u201crenew\u201d the ",(0,a.jsx)(i.a,{href:"#core",children:"core"})," each\nmonth. Coretime renewal orders take precedence over new orders and provide protection against price\nfluctuations, allowing parachains to plan their project budget and costs more effectively."]}),"\n",(0,a.jsxs)(i.p,{children:["The purchased coretime can also be split up and sold in parts, down to a single block per month,\nallowing for secondary markets to thrive and improve the allocation efficiency of coretime.\nFurthermore, Agile Coretime offers ",(0,a.jsx)(i.a,{href:"#on-demand-coretime",children:"on-demand coretime"})," functionality that\nenables the authoring of a parachain block on-demand."]}),"\n",(0,a.jsx)(i.p,{children:(0,a.jsx)(i.img,{alt:"core-usage-agile-rangeSplit",src:n(67150).A+"",width:"1920",height:"800"})}),"\n",(0,a.jsx)(i.admonition,{title:"Agile Coretime is under active development",type:"info",children:(0,a.jsxs)(i.p,{children:["The progress of Agile Coretime development can be tracked\n",(0,a.jsx)(i.a,{href:"https://github.com/orgs/paritytech/projects/119/views/20",children:"here."})]})}),"\n",(0,a.jsx)(i.h2,{id:"agile-coretime-terminology",children:"Agile Coretime Terminology"}),"\n",(0,a.jsx)(i.h3,{id:"core",children:"Core"}),"\n",(0,a.jsx)(i.p,{children:'The term "Core" captures the virtual abstraction of computational resources provided by the relay\nchain to secure the blocks of a parachain, which involves a randomized set of the relay chain\nvalidators.'}),"\n",(0,a.jsx)(i.h3,{id:"coretime",children:"Coretime"}),"\n",(0,a.jsx)(i.p,{children:"The time allocated for utilizing a core, measured in relay chain blocks."}),"\n",(0,a.jsx)(i.h3,{id:"bulk-coretime",children:"Bulk Coretime"}),"\n",(0,a.jsx)(i.p,{children:"A fixed duration of continuous coretime represented by an NFT that can be split, shared, or resold.\nCurrently, the duration of bulk coretime is set to 28 days."}),"\n",(0,a.jsx)(i.h3,{id:"region",children:"Region"}),"\n",(0,a.jsx)(i.p,{children:"The NFT representing a single unit of bulk coretime."}),"\n",(0,a.jsx)(i.h3,{id:"on-demand-coretime",children:"On-demand Coretime"}),"\n",(0,a.jsx)(i.p,{children:"Previously known as instantaneous coretime, the on-demand coretime refers to coretime acquired\nthrough bidding in near real-time for the validation of a single parachain block on one of the cores\nreserved specifically for on-demand orders."}),"\n",(0,a.jsx)(i.admonition,{title:"Parathreads are renamed to on-demand parachains",type:"info",children:(0,a.jsx)(i.p,{children:"On-demand parachains (previously called parathreads) are parachains that buy on-demand coretime and\nuse it to access the relay chain through the on-demand coretime pool."})}),"\n",(0,a.jsx)(i.h3,{id:"on-demand-coretime-pool",children:"On-demand Coretime Pool"}),"\n",(0,a.jsx)(i.p,{children:"Set of cores that are available on-demand. Cores reserved through bulk coretime could also be made\navailable in the on-demand coretime pool, in parts or in entirety."}),"\n",(0,a.jsx)(i.h3,{id:"coretime-chain",children:"Coretime Chain"}),"\n",(0,a.jsx)(i.p,{children:"A system parachain that is responsible for the sale, manipulation of bulk coretime and eventually\nthe purchase of on-demand coretime credits. It is also responsible for scheduling the respective\ncores on the relay chain to the parachains."}),"\n",(0,a.jsx)(i.h3,{id:"timeslice",children:"Timeslice"}),"\n",(0,a.jsx)(i.p,{children:"A timeslice represents the granularity the Coretime Chain schedules cores on the relay chain. The\nCoretime Chain announces a schedule for each core, comprising the next 80 relay chain blocks in\nadvance. 5,040 timeslices corresponds to the region length of 28 days (which is the initial\nconfiguration set for bulk coretime)."}),"\n",(0,a.jsx)(i.h3,{id:"task",children:"Task"}),"\n",(0,a.jsx)(i.p,{children:'The term "Task" captures the abstraction of utility of the core. Tasks on the cores are not just\nlimited to securing parachains.'}),"\n",(0,a.jsx)(i.h2,{id:"agile-coretime-implementation",children:"Agile Coretime Implementation"}),"\n",(0,a.jsxs)(i.p,{children:["Coretime is managed through the\n",(0,a.jsx)(i.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/eefd5fe4499515da66d088505093f75b5aa22550/substrate/frame/broker/src/lib.rs",children:"broker pallet"}),"\nwhich is deployed on the Coretime Chain. In theory, the Polkadot relay chain can support around a\nhundred cores seamlessly and can support over a few hundred cores through optimizations. Preliminary\ntests ran successfully with 80 cores with 12-second block times."]}),"\n",(0,a.jsx)(i.h3,{id:"coretime-sales",children:"Coretime Sales"}),"\n",(0,a.jsxs)(i.p,{children:["Sales on the Coretime Chain are of ",(0,a.jsx)(i.code,{children:"timeslice"})," length. These sales are divided into two main\nperiods: the Renewal period and the Sale period."]}),"\n",(0,a.jsx)(i.p,{children:(0,a.jsx)(i.img,{alt:"coretime-sale-timeline",src:n(60409).A+"",width:"2000",height:"1015"})}),"\n",(0,a.jsxs)(i.ul,{children:["\n",(0,a.jsxs)(i.li,{children:["Renewal periods are of ",(0,a.jsx)(i.code,{children:"interlude_length"})," blocks long, and it\u2019s where bulk coretime can be\nrenewed."]}),"\n",(0,a.jsxs)(i.li,{children:["Sale periods are as well divided into two periods: a Price Discovery period and a Fixed Price\nperiod. After the Renewal period, a new ",(0,a.jsx)(i.code,{children:"start_price"})," will be set by the Coretime Chain and a\ndutch auction of ",(0,a.jsx)(i.code,{children:"leading_length"})," blocks will start, putting downward pressure on price to find\nthe right equilibrium. This process will set the ",(0,a.jsx)(i.code,{children:"regular_price"})," which will be the one offered at\nthe Fixed Price period."]}),"\n"]}),"\n",(0,a.jsxs)(i.p,{children:["This discussion on initial coretime pricing can be viewed\n",(0,a.jsx)(i.a,{href:"https://forum.polkadot.network/t/initial-coretime-pricing/5187",children:"here"})]}),"\n",(0,a.jsx)(i.h3,{id:"splitting-and-interlacing",children:"Splitting and Interlacing"}),"\n",(0,a.jsx)(i.p,{children:"Splitting and interlacing are actions that can be performed within a region. Performing either of\nthese actions makes you lose the right to a price-capped renewal."}),"\n",(0,a.jsxs)(i.ul,{children:["\n",(0,a.jsxs)(i.li,{children:[(0,a.jsx)(i.strong,{children:"Splitting"}),": the action of dividing a region into several regions with different start and end\ntimeslices."]}),"\n",(0,a.jsxs)(i.li,{children:[(0,a.jsx)(i.strong,{children:"Interlacing:"})," the action of dividing a region into the execution of different tasks for each\nblock of a timeslice. The result regions will have the same start and end timeslice as the parent\nregion, but different tasks will be executed at different blocks."]}),"\n"]}),"\n",(0,a.jsx)(i.h3,{id:"elastic-scaling",children:"Elastic Scaling"}),"\n",(0,a.jsx)(i.p,{children:"With elastic scaling (still under development) projects can scale seamlessly and without being\nlimited to previously allocated resources. Elastic scaling is the process of getting multiple cores\nfor one task. This allows parachains to include more blocks per unit time (relay chain-side), and\nproduce more blocks per unit time (async backing on the parachain side). Elastic scaling can be\npaired with on-demand coretime to increase your bandwidth seamlessly."}),"\n",(0,a.jsx)(i.h2,{id:"agile-coretime-faq",children:"Agile Coretime FAQ"}),"\n",(0,a.jsx)(i.h3,{id:"roadmap",children:"Roadmap"}),"\n",(0,a.jsx)(i.h4,{id:"where-can-we-track-agile-coretime-progress",children:"Where can we track Agile Coretime Progress"}),"\n",(0,a.jsxs)(i.p,{children:["Agile Coretime project logistics can be tracked on the\n",(0,a.jsx)(i.a,{href:"https://github.com/orgs/paritytech/projects/119/views/20",children:"Parachains Team GitHub Dashboard"})]}),"\n",(0,a.jsx)(i.h4,{id:"is-all-of-rfc-1-coming-at-once-or-in-parts",children:"Is all of RFC-1 coming at once or in parts?"}),"\n",(0,a.jsxs)(i.p,{children:["No, with the initial Kusama launch, the following features mentioned in\n",(0,a.jsx)(i.a,{href:"https://polkadot-fellows.github.io/RFCs/approved/0001-agile-coretime.html",children:"RFC-1"})," are rolled out:"]}),"\n",(0,a.jsxs)(i.ul,{children:["\n",(0,a.jsx)(i.li,{children:"The purchase of bulk coretime and placement of on-demand orders"}),"\n",(0,a.jsx)(i.li,{children:"Renewing leases"}),"\n",(0,a.jsx)(i.li,{children:"Splitting and interlacing regions"}),"\n"]}),"\n",(0,a.jsx)(i.p,{children:"These features are still under development and will be rolled out in later releases:"}),"\n",(0,a.jsxs)(i.ul,{children:["\n",(0,a.jsx)(i.li,{children:"Getting rewards for adding your region to the on-demand pool"}),"\n",(0,a.jsx)(i.li,{children:"Credits for on-demand coretime (currently you are able to buy with native tokens of relay chain)"}),"\n"]}),"\n",(0,a.jsx)(i.h4,{id:"what-is-currently-being-developed-in-the-ecosystem-to-support-agile-coretime",children:"What is currently being developed in the ecosystem to support Agile Coretime?"}),"\n",(0,a.jsxs)(i.p,{children:["There are several ecosystem projects in the making, such as the secondary markets for coretime,\n",(0,a.jsx)(i.a,{href:"https://www.lastic.xyz/",children:"Lastic"}),", and\xa0",(0,a.jsx)(i.a,{href:"https://app.regionx.tech/",children:"RegionX"}),"."]}),"\n",(0,a.jsxs)(i.p,{children:["Always do your own research. If you feel your project should be listed on the Wiki, please follow\nthe ",(0,a.jsx)(i.a,{href:"/docs/contributing",children:"contributor's guide"}),"."]}),"\n",(0,a.jsx)(i.h4,{id:"will-all-the-current-leaseholder-parachains-migrate-and-when",children:"Will all the current leaseholder parachains migrate and when?"}),"\n",(0,a.jsx)(i.p,{children:"They will migrate when the runtime upgrade with Agile Coretime is performed on the relay chain. Any\nparachains with existing lease periods will be automatically credited bulk coretime for the\nremainder of their lease period."}),"\n",(0,a.jsx)(i.h3,{id:"product",children:"Product"}),"\n",(0,a.jsx)(i.h4,{id:"where-will-coretime-be-maintained",children:"Where will coretime be maintained?"}),"\n",(0,a.jsx)(i.p,{children:"Coretime will be managed by the broker pallet which is deployed on the Coretime Chain."}),"\n",(0,a.jsx)(i.h4,{id:"is-the-broker-chain-the-same-as-the-coretime-chain",children:"Is the Broker Chain the same as the Coretime Chain?"}),"\n",(0,a.jsx)(i.p,{children:"Yes, the broker pallet runs on the Coretime Chain."}),"\n",(0,a.jsx)(i.h4,{id:"can-cores-be-shared-at-the-same-time",children:"Can cores be shared at the same time?"}),"\n",(0,a.jsx)(i.p,{children:"Currently not. Cores can be shared, but only in time. For example, you get a core at block X,\nanother one gets it at block Y. This may change in future."}),"\n",(0,a.jsx)(i.h4,{id:"what-limits-are-there-to-the-number-of-cores",children:"What limits are there to the number of cores?"}),"\n",(0,a.jsx)(i.p,{children:"Successful tests were made with around 80 cores and 12-second block times for parachains. A single\ntest validator set is able to validate 80 blockchains simultaneously. In theory a single relay chain\nshould be able to support a few hundred cores. Optimizations to get closer to this theoretical limit\nwill be developed and deployed continuously."}),"\n",(0,a.jsxs)(i.p,{children:["Once that theoretical limit is reached, ideas for further scaling are already on the table. The goal\nis not to scale by ",(0,a.jsx)(i.a,{href:"https://www.youtube.com/watch?v=O9QZveTdW5I",children:"lowering security guarantees"}),"\n(similarly to optimistic rollups) but to optimize and improve allocation efficiency (by making\nbetter use of the existing cores)."]}),"\n",(0,a.jsx)(i.h4,{id:"is-there-a-ui-for-the-coretime-chain",children:"Is there a UI for the Coretime Chain?"}),"\n",(0,a.jsxs)(i.p,{children:["Teams in the ecosystem are working on a UI. RegionX has released an app for testing on\nPaseo:\xa0",(0,a.jsx)(i.a,{href:"https://app.regionx.tech/",children:"https://app.regionx.tech/"}),". Without the UI, this would be automated from the parachains\u2019\nruntimes or manually with Coretime Chain extrinsics via polkadot.js."]}),"\n",(0,a.jsx)(i.h3,{id:"coretime-pricing-and-purchasing",children:"Coretime Pricing and Purchasing"}),"\n",(0,a.jsx)(i.h4,{id:"how-is-the-price-for-bulk-coretime-calculated",children:"How is the price for bulk coretime calculated?"}),"\n",(0,a.jsx)(i.p,{children:"The pricing for bulk coretime depends on factors from several sources:"}),"\n",(0,a.jsxs)(i.ol,{children:["\n",(0,a.jsx)(i.li,{children:"The first source is the implementation directly in the pallet, which is not exposed as a\nconfiguration"}),"\n",(0,a.jsx)(i.li,{children:"The second source is configurable in the runtime of the Coretime Chain"}),"\n",(0,a.jsx)(i.li,{children:"Configurable parameters, such as the starting sales price, ideal bulk ration and the number of\ncores offered per sale, which are set through governance"}),"\n",(0,a.jsx)(i.li,{children:"Market forces, such as the demand and perceived true market price of a core - the impact of which\ncan be increased or decreased through the configuration set by governance"}),"\n"]}),"\n",(0,a.jsxs)(i.p,{children:["A more detailed description of the elements that have an influence on the bulk coretime price can be\nfound ",(0,a.jsx)(i.a,{href:"https://hackmd.io/@seadanda/Sk9pLYm3a",children:"here"}),"."]}),"\n",(0,a.jsxs)(i.p,{children:["After a\n",(0,a.jsx)(i.a,{href:"https://forum.polkadot.network/t/initial-coretime-pricing/5187/7?u=joyce",children:"thorough analysis"})," it was\ndecided to open a governance proposal for an initial price ~5 KSM. The price will be set with the\n\u201cstart sales\u201d call, which will go through governance after runtime upgrade. Keep an eye on the post\nto be informed and decide with us upon the initial price for Agile Coretime on KSM. The price for\nPolkadot is still under discussion."]}),"\n",(0,a.jsx)(i.h4,{id:"how-do-sale-periods-work-on-the-coretime-chain",children:"How do sale periods work on the Coretime Chain?"}),"\n",(0,a.jsx)(i.p,{children:(0,a.jsx)(i.img,{alt:"coretime-sale-timeline",src:n(60409).A+"",width:"2000",height:"1015"})}),"\n",(0,a.jsx)(i.p,{children:"Sales on the Coretime Chain are of region length. These sales are divided into two main periods: the\nRenewal period and the Sale period."}),"\n",(0,a.jsxs)(i.ul,{children:["\n",(0,a.jsx)(i.li,{children:"Renewal periods are of the length of the interlude, which is defined as a number of blocks in the\nbroker pallet configuration, and it\u2019s where bulk coretime can be renewed."}),"\n",(0,a.jsx)(i.li,{children:"Sale periods are as well divided into two periods: a Price Discovery period and a Fixed Price\nperiod. After the Renewal period, a new start price will be set by the Coretime Chain and a dutch\nauction of lead-in length blocks will start, putting downward pressure on price to find the right\nequilibrium. This process will set the base price which will be the one offered at the Fixed Price\nperiod."}),"\n"]}),"\n",(0,a.jsx)(i.h4,{id:"how-does-the-pricing-mechanism-for-on-demand-coretime-work",children:"How does the pricing mechanism for on-demand coretime work?"}),"\n",(0,a.jsx)(i.p,{children:"There will be a minimum price configured, the rest is based on demand via a price function: the\nlonger the queue, the higher the price."}),"\n",(0,a.jsx)(i.h4,{id:"do-i-need-to-pay-a-deposit-to-register-for-coretime",children:"Do I need to pay a deposit to register for coretime?"}),"\n",(0,a.jsxs)(i.p,{children:["All newly registered parachains must\n",(0,a.jsx)(i.a,{href:"https://github.com/paritytech/polkadot-sdk/pull/3020",children:"place a deposit"})," equivalent to the cost of\nregistering the maximum size of runtime (business logic) code. After a successful registration,\nparachains are allowed to be assigned to regions. The runtime of these parachains can then be\nupgraded without any additional costs. The maximum size is pre-defined and equal to everyone on the\nnetwork. This way, every registration will cost the same independent of the size of the registered\nruntime code (Wasm blob)."]}),"\n",(0,a.jsxs)(i.p,{children:[(0,a.jsx)(i.a,{href:"https://github.com/polkadot-fellows/RFCs/pull/44",children:"RFC-44"})," is proposing a new rent-based\nregistration price model, which will become an alternative (if it gets approved)."]}),"\n",(0,a.jsx)(i.h4,{id:"how-does-the-price-change-over-time",children:"How does the price change over time?"}),"\n",(0,a.jsx)(i.p,{children:"On-demand coretime will always be subject to market conditions. The price of bulk coretime changes\nbased on the outcome of the previous sale. Factors such as the number of cores sold, the target\n(from the ideal bulk ratio) and the number of cores offered in the sale are used in combination with\nthe price for which the last core was sold. Bulk renewals are capped within a percentage of the\nprevious purchase price. The algorithm that is used is implemented in each runtime and can differ\nbetween chains."}),"\n",(0,a.jsx)(i.p,{children:"The bulk price in Kusama might vary between a 50% decrease in case no cores were sold in the\nprevious sales and can increase by 5x depending on the number of cores sold and when they sell.\nThese numbers represent extreme cases though."}),"\n",(0,a.jsx)(i.h4,{id:"can-the-renewal-price-be-different-per-taskid-parachain-or-will-each-sale-cycle-have-a-fix-renewal-price",children:"Can the renewal price be different per taskID (Parachain)? Or will each sale cycle have a fix renewal price?"}),"\n",(0,a.jsx)(i.p,{children:"It is in general different per task if they hit their caps."}),"\n",(0,a.jsx)(i.p,{children:"With the current configuration on Kusama, if the price is going up, every renewal pays a maximum of\n3% more than they paid for the sale before. That keeps going back to the sale cycle they first\nbought their coretime (or the sale cycle they renewed their lease). And because people buy in\ndifferent sale cycles, or even at different times in each sale cycle, their prices can be wildly\ndifferent from one another. There\u2019s a special case for leaseholders at the end of their lease. They\npay the base price in the sale in which they expire."}),"\n",(0,a.jsx)(i.p,{children:"The story is different if the prices are decreasing, since the caps are irrelevant. If it drops far\nenough it could mean that all parachains renew at the same price."}),"\n",(0,a.jsx)(i.h4,{id:"if-purchased-in-bulk-do-you-then-have-one-core-or-one-bucket-of-coretime-that-you-can-use-in-your-own-time-or-is-there-a-specific-slot",children:"If purchased in bulk, do you then have \u201cone core\u201d or \u201cone bucket of coretime\u201d that you can use in your own time? Or is there a specific slot?"}),"\n",(0,a.jsx)(i.p,{children:"You have a specific core for the duration of four weeks, and have the ability to split the region\nup. Splitting or interlacing the region makes you lose the right to a price-capped renewal."}),"\n",(0,a.jsx)(i.h4,{id:"what-happens-to-purchased-coretime-if-i-dont-use-it",children:"What happens to purchased coretime if I don't use it?"}),"\n",(0,a.jsx)(i.p,{children:"Unused coretime can't be carried over. If the coretime within the time allocation (timeslice) is not\nused, then it is lost. If previously purchased coretime is no longer needed, it be sold on secondary\nmarkets."}),"\n",(0,a.jsx)(i.h4,{id:"can-i-buy-coretime-in-advance-and-start-using-it-when-im-ready",children:"Can I buy coretime in advance and start using it when I'm ready?"}),"\n",(0,a.jsx)(i.p,{children:"Coretime can be purchased up to 28 days in advance. Later, \u201cfutures\u201d markets to hedge against price\nfluctuations could be a possible solution to increase predictability further."}),"\n",(0,a.jsx)(i.h3,{id:"concepts",children:"Concepts"}),"\n",(0,a.jsx)(i.h4,{id:"is-it-on-demand-coretime-or-instantaneous-coretime",children:"Is it \u201con-demand coretime\u201d or \u201cInstantaneous coretime\u201d?"}),"\n",(0,a.jsx)(i.p,{children:'It was decided to stick with the term "on-demand".'}),"\n",(0,a.jsx)(i.h4,{id:"whats-the-correct-spelling-and-its-usage",children:"What's the correct spelling and its usage?"}),"\n",(0,a.jsx)(i.p,{children:"Other than Agile Coretime and the Coretime Chain, do not capitalize coretime or blockspace."}),"\n",(0,a.jsx)(i.h4,{id:"whats-the-connection-between-blockspace-and-coretime",children:"What\u2019s the connection between blockspace and coretime?"}),"\n",(0,a.jsx)(i.p,{children:"(Secure) blockspace is the resource Polkadot provides, which is measured in and allocated through\ncoretime."}),"\n",(0,a.jsx)(i.h3,{id:"value-proposition",children:"Value Proposition"}),"\n",(0,a.jsx)(i.h4,{id:"what-are-the-benefits-of-agile-coretime-and-how-do-the-on-demand-and-bulk-models-suit-different-customers",children:"What are the benefits of Agile Coretime, and how do the on-demand and bulk models suit different customers?"}),"\n",(0,a.jsxs)(i.ul,{children:["\n",(0,a.jsx)(i.li,{children:"On a high level, Agile Coretime brings a new era of scaling to Web3 with optimal resource\nallocation across the entire network."}),"\n",(0,a.jsx)(i.li,{children:"The on-demand model democratizes blockchain access by opening the door to everyone building a\ncustom, sovereign Web3 application; the bulk model brings a new level of cost-predictability for\nteams and projects."}),"\n"]}),"\n",(0,a.jsx)(i.p,{children:"Specific benefits for decision makers and developers:"}),"\n",(0,a.jsxs)(i.ul,{children:["\n",(0,a.jsx)(i.li,{children:"Agile Coretime brings efficient utilization of resources, enabling scale and agility for better\nUX, without compromising security or decentralisation."}),"\n",(0,a.jsx)(i.li,{children:"More flexible economic models for every stage of growth enable builders to innovate without\nboundaries."}),"\n",(0,a.jsx)(i.li,{children:"Developers benefit from streamlined development through simplified resource management, as well as\nfrom a consistent development environment through flexible and predictable cost modelling over\ntime."}),"\n",(0,a.jsx)(i.li,{children:"On-demand coretime removes barriers to entry: spin up your proof of concept quickly with full\naccess to Polkadot\u2019s entire ecosystem."}),"\n",(0,a.jsx)(i.li,{children:"Cost effectiveness: Remove inefficiencies by buying coretime on-demand only, or sell access to\ncoretime on secondary marketplaces."}),"\n",(0,a.jsx)(i.li,{children:"With elastic scaling (not supported yet) projects can scale seamlessly and without being limited\nto previously allocated resources. Elastic scaling is the process of getting multiple cores for\none task. This allows parachains to include more blocks per unit time (relay chain-side), and\nproduce more blocks per unit time (async backing on the parachain side). With elastic scaling, add\non-demand coretime to increase your bandwidth seamlessly."}),"\n",(0,a.jsx)(i.li,{children:"Bulk coretime enables strategic resource planning: secure bulk coretime at a fixed price to\nprevent spiking fees during high demand. This helps you future-proof your projects. Bulk coretime\nprovides a solid foundation for your long-term business plans, allowing for sustainable growth."}),"\n"]}),"\n",(0,a.jsx)(i.h4,{id:"what-makes-the-coretime-model-on-polkadot-competitive",children:"What makes the coretime model on Polkadot competitive?"}),"\n",(0,a.jsx)(i.p,{children:"The on-demand option removes barriers to entry and enables builders to start and innovate quickly.\nCombined with the bulk model, builders also mitigate risks of spiking fees during times of high\ndemand."}),"\n",(0,a.jsx)(i.p,{children:"However, as compared to running on an L1 or a scaling solution, builders still have the benefits of\nrunning on a purpose-made parachain, which is more efficient and thus cheaper than running a smart\ncontract on a generic L1. In addition, you are connected to and secured by the entire Polkadot\nnetwork."}),"\n",(0,a.jsx)(i.p,{children:"Polkadot thus offers all the benefits of building high-performing, purpose-made, and composable\nappchains, combined with the most flexible economics."}),"\n",(0,a.jsx)(i.h4,{id:"how-close-do-we-get-to-web2-scale-for-web3",children:"How close do we get to Web2 scale for Web3?"}),"\n",(0,a.jsxs)(i.p,{children:["Agile Coretime mainly improves allocation efficiency. With\n",(0,a.jsx)(i.a,{href:"https://github.com/paritytech/polkadot-sdk/issues/1829",children:"elastic scaling"}),", we take a big step\ntowards enabling Web2 scale in Web3 by reducing parachain block production below 6 seconds.\nTheoretically, parachains will be able to produce blocks very fast and the limitations will lie on\nthe relay chain side\u2019s cores and how many cores a parachain uses."]}),"\n",(0,a.jsx)(i.h3,{id:"implementation",children:"Implementation"}),"\n",(0,a.jsx)(i.admonition,{title:"Unable to use multiple cores!",type:"caution",children:(0,a.jsxs)(i.p,{children:["The coretime chain does not prohibit ordering multiple cores and assigning them to the same\nparachain. However, elastic scaling is still in the works ",(0,a.jsx)(i.strong,{children:"so don't do this, you will not be able\nto use those cores."})]})}),"\n",(0,a.jsx)(i.h4,{id:"what-do-i-need-to-do-for-my-parachain-to-continue-working-in-the-switch-to-coretime",children:"What do I need to do for my parachain to continue working in the switch to coretime?"}),"\n",(0,a.jsx)(i.p,{children:"Current parachain slots will be converted to legacy leases automatically in the runtime upgrade\nthrough a migration, with no intervention needed. The lease will grant your parachain a core until\nthe end of the region in which its slot would have expired."}),"\n",(0,a.jsx)(i.h4,{id:"when-does-the-last-auction-take-place",children:"When does the last auction take place?"}),"\n",(0,a.jsx)(i.p,{children:"Auctions took place until the launch of Agile Coretime with Polkadot runtime upgrade on the 19th of\nSeptember 2024. Ongoing auctions were canceled and existing active leases of previous auctions were\nmigrated to Agile Coretime. In case you had a lease secured, you automatically got corresponding\ncoretime, with renewal right."}),"\n",(0,a.jsx)(i.p,{children:(0,a.jsxs)(i.em,{children:["Note: if your team secured a lease with a new paraID, please\n",(0,a.jsx)(i.a,{href:"#will-i-be-able-to-still-swap-my-lease-with-another-project",children:"read the question about swapping"}),"."]})}),"\n",(0,a.jsx)(i.h4,{id:"when-and-how-can-i-renew-my-legacy-lease",children:"When and how can I renew my legacy lease?"}),"\n",(0,a.jsxs)(i.p,{children:["The ",(0,a.jsx)(i.code,{children:"slots.leases"})," are migrated to ",(0,a.jsx)(i.code,{children:"leases"})," in the broker pallet with an expiry ",(0,a.jsx)(i.code,{children:"timeslice"})," that\ncorresponds to your original expiry block. When the lease expires, the parachain has a core until\nthe end of the sales period that it expired in. After that, the ",(0,a.jsx)(i.code,{children:"interlude"})," period starts. In that\nsale period you can renew your bulk coretime by calling\xa0",(0,a.jsx)(i.code,{children:"renew"}),"\xa0on the lease's core. The price will\nbe charged and will be equal to the market price of a bulk core in that sale."]}),"\n",(0,a.jsxs)(i.p,{children:["For more details, check out our\n",(0,a.jsx)(i.a,{href:"https://polkadot-public.notion.site/Implementation-reference-Coretime-from-Trappist-c930796e8c884011adb1fa24ef22f77c?pvs=4",children:"technical guide"}),"."]}),"\n",(0,a.jsx)(i.h4,{id:"will-all-leases-be-migrated-to-agile-coretime",children:"Will all leases be migrated to Agile Coretime?"}),"\n",(0,a.jsxs)(i.p,{children:["If your team has a lease secured by the time Agile Coretime launches, they will also have a lease on\nAgile Coretime and the right for renewal when the lease expires. If the lease of your project would\nonly start ",(0,a.jsx)(i.em,{children:"after"})," Agile Coretime launch (not yet active at launch time), the lease will be\ncancelled and your locked KSM refunded. You will need to purchase and assign coretime."]}),"\n",(0,a.jsx)(i.p,{children:(0,a.jsx)(i.em,{children:"Note: Your lease will also be canceled and refunded, in case it is not continuous, as leases with\n\u201choles\u201d are not supported by Agile Coretime."})}),"\n",(0,a.jsx)(i.h4,{id:"will-i-be-able-to-still-swap-my-lease-with-another-project",children:"Will I be able to still swap my lease with another project?"}),"\n",(0,a.jsxs)(i.p,{children:["Unfortunately you won\u2019t be able for the current Kusama release, and it\u2019s advisable to avoid doing it\non Polkadot too, as swapping is not something that will exist with Agile Coretime. Yet to ensure a\nsmooth migration, we\u2019re implementing a solution for Polkadot. Once we release Agile Coretime on\nPolkadot, you should be able to call the\n",(0,a.jsx)(i.a,{href:"https://github.com/paritytech/polkadot-sdk/issues/3552",children:"swap extrinsic"})," to swap your lease with\nanother project and the change will be reflected on Agile Coretime as well."]}),"\n",(0,a.jsx)(i.h4,{id:"my-lease-is-about-to-end-what-do-i-need-to-do",children:"My lease is about to end, what do I need to do?"}),"\n",(0,a.jsx)(i.p,{children:"If your lease is about to expire, your core is added to the allowed renewals and you are able to\nrenew your core for a fixed percentage increase before the rest of the market is able to bid on it.\nPlease, make sure to renew your lease within the period defined by the broker chain to avoid\ndowntime for your chain and potentially losing your fixed renewal cost."}),"\n",(0,a.jsx)(i.h4,{id:"can-any-account-renew-coretime-on-behalf-of-a-parachain-or-does-this-need-to-be-from-the-parachain-sovereign-account",children:"Can any account renew coretime on behalf of a parachain or does this need to be from the parachain sovereign account?"}),"\n",(0,a.jsx)(i.p,{children:"Yes, any account with enough funds can renew it for any given parachain on a core which qualifies\nfor renewal."}),"\n",(0,a.jsx)(i.h4,{id:"how-is-the-coretime-price-determined-in-practice",children:"How is the coretime price determined in practice?"}),"\n",(0,a.jsx)(i.p,{children:"The starting price is initially configured by a referendum. In subsequent sales, it depends on the\nnumber of cores which were sold vs those which were for sale. If the ideal ratio was sold (the ratio\nis configured by referendum, too) then the price remains the same. If fewer cores than the ideal\nwere sold, then the price decreases. If more cores are sold than ideal, then the price increases. In\nthis way the price is sensitive to market conditions, the initial configuration, and the number of\ncores offered in the sales."}),"\n",(0,a.jsx)(i.h4,{id:"how-is-coretime-measured-and-allocated-technically",children:"How is coretime measured and allocated technically?"}),"\n",(0,a.jsx)(i.p,{children:"The Coretime Chain is a proposed new system parachain within the Polkadot network that is\nresponsible for the management of coretime. It is designed to handle the allocation of bulk coretime\nand track ownership of coretime as non-fungible assets (NFTs). The Coretime Chain provides\ninformation to the relay chain regarding the number of cores available, the tasks running on each\ncore, and accounting information for on-demand coretime credit. Additionally, it processes renewals\nand allows for various manipulations of bulk coretime, such as transfers, partitioning, interlacing,\nassignment to tasks, and pooling for on-demand coretime."}),"\n",(0,a.jsx)(i.h4,{id:"why-are-sales-of-on-demand-coretime-happening-on-the-relay-chain",children:"Why are sales of on-demand coretime happening on the relay chain?"}),"\n",(0,a.jsx)(i.p,{children:"In the beginning, sales are executed on the relay chain, but they could move to the Coretime Chain.\nLatency is the only drawback: at low demand, the buyer would receive the coretime instantly when via\nthe relay chain, but there\u2019ll be a delay when executed on the Coretime Chain. At times of high\ndemand, there will be a queue anyway and this delay matters less."}),"\n",(0,a.jsx)(i.h4,{id:"whats-the-best-way-for-on-demand-tasks-previously-known-as-on-demand-parachains-to-regularly-send-extrinsics-to-the-relay-chain-for-allowing-a-block-to-be-validate",children:"What's the best way for on-demand tasks (previously known as on-demand parachains) to regularly send extrinsics to the relay chain for allowing a block to be validate?"}),"\n",(0,a.jsxs)(i.p,{children:["A ready-to-use automated and decentralized method for ordering on-demand coretime is\ncurrently\xa0",(0,a.jsx)(i.a,{href:"https://github.com/paritytech/polkadot-sdk/issues/1487",children:"being implemented"}),". Some teams\nalready implemented a simplified\xa0",(0,a.jsx)(i.a,{href:"https://github.com/Magport/Magnet/issues/4",children:"variant"}),'. What works\nin any case is ordering on-demand coretime "by hand", by sending the\xa0',(0,a.jsx)(i.code,{children:"placeOrderKeepAlive"}),"\xa0extrinsic\nof the\xa0",(0,a.jsx)(i.code,{children:"onDemandAssignmentProvider"}),", via polkadot js for example. You can find an easy step-by-step\nguide\n",(0,a.jsx)(i.a,{href:"https://forum.polkadot.network/t/parachain-consensus-updates-coretime-asynchronous-backing-scalability/4396/8?u=kianenigma",children:"here"}),"."]}),"\n",(0,a.jsx)(i.h4,{id:"how-many-cores-will-be-configured-for-on-demand-coretime",children:"How many cores will be configured for on-demand coretime?"}),"\n",(0,a.jsx)(i.p,{children:"We will certainly start with one core on Kusama and one on Polkadot, and then see if this is\nsufficient initially."}),"\n",(0,a.jsx)(i.h4,{id:"what-happens-if-my-chain-runs-out-of-coretime",children:"What happens if my chain runs out of coretime?"}),"\n",(0,a.jsx)(i.p,{children:"Your chain won\u2019t be able to validate further blocks and will halt."}),"\n",(0,a.jsx)(i.h4,{id:"what-does-splitting-and-interlacing-mean",children:"What does splitting and interlacing mean?"}),"\n",(0,a.jsx)(i.p,{children:"Splitting and interlacing are actions anyone can make within its own region. Performing any of these\nwill result in a new region with new characteristics, and will make the owner of the original region\nunable to renew it."}),"\n",(0,a.jsxs)(i.ul,{children:["\n",(0,a.jsxs)(i.li,{children:[(0,a.jsx)(i.strong,{children:"Splitting"}),": the action of dividing a region into several regions with different start and end\ntimeslices."]}),"\n",(0,a.jsxs)(i.li,{children:[(0,a.jsx)(i.strong,{children:"Interlacing:"})," the action of dividing a region into the execution of different tasks for each\nblock of a timeslice. The result regions will have the same start and end timeslice as the parent\nregion, but different tasks will be executed at different blocks."]}),"\n"]})]})}function d(e={}){const{wrapper:i}={...(0,o.R)(),...e.components};return i?(0,a.jsx)(i,{...e,children:(0,a.jsx)(h,{...e})}):h(e)}},67150:(e,i,n)=>{n.d(i,{A:()=>t});const t=n.p+"assets/images/core-usage-agile-rangeSplit-d8511cbb8658052ac0a639bd6a722982.png"},32550:(e,i,n)=>{n.d(i,{A:()=>t});const t=n.p+"assets/images/core-usage-dumb-6419ee60a3606e10d89a1c91dbf24e20.png"},60409:(e,i,n)=>{n.d(i,{A:()=>t});const t=n.p+"assets/images/Coretime-Sale-Timeline-d621574ae5a430c8e80861693985631d.png"},28453:(e,i,n)=>{n.d(i,{R:()=>r,x:()=>s});var t=n(96540);const a={},o=t.createContext(a);function r(e){const i=t.useContext(o);return t.useMemo((function(){return"function"==typeof e?e(i):{...i,...e}}),[i,e])}function s(e){let i;return i=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:r(e.components),t.createElement(o.Provider,{value:i},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/74df6a22.dcf98dae.js b/assets/js/74df6a22.dcf98dae.js new file mode 100644 index 000000000000..8c88d141a9c4 --- /dev/null +++ b/assets/js/74df6a22.dcf98dae.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7227],{77408:(e,n,o)=>{o.r(n),o.d(n,{assets:()=>c,contentTitle:()=>i,default:()=>h,frontMatter:()=>a,metadata:()=>t,toc:()=>d});const t=JSON.parse('{"id":"maintain/maintain-rpc","title":"Set up a RPC node","description":"Steps on setting up a RPC node.","source":"@site/../docs/maintain/maintain-rpc.md","sourceDirName":"maintain","slug":"/maintain-rpc","permalink":"/docs/maintain-rpc","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/maintain/maintain-rpc.md","tags":[],"version":"current","lastUpdatedBy":"Dominique","lastUpdatedAt":1694979058000,"frontMatter":{"id":"maintain-rpc","title":"Set up a RPC node","sidebar_label":"Set up a RPC node","description":"Steps on setting up a RPC node.","keywords":["rpc","rpc node","web socket","remote","connection","secure websocket"],"slug":"../maintain-rpc"},"sidebar":"docs","previous":{"title":"Set up a Boot Node","permalink":"/docs/maintain-bootnode"},"next":{"title":"Secure the WebSocket","permalink":"/docs/maintain-wss"}}');var s=o(74848),r=o(28453);const a={id:"maintain-rpc",title:"Set up a RPC node",sidebar_label:"Set up a RPC node",description:"Steps on setting up a RPC node.",keywords:["rpc","rpc node","web socket","remote","connection","secure websocket"],slug:"../maintain-rpc"},i=void 0,c={},d=[{value:"Set up a Node",id:"set-up-a-node",level:2},{value:"Archive Node vs. Pruned Node",id:"archive-node-vs-pruned-node",level:3},{value:"Secure the RPC server",id:"secure-the-rpc-server",level:3},{value:"Secure the ws port",id:"secure-the-ws-port",level:3},{value:"Connecting to the Node",id:"connecting-to-the-node",level:2}];function l(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",p:"p",pre:"pre",strong:"strong",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(n.p,{children:["The substrate node RPC server can be accessed over the WebSocket protocol, which can be used to\naccess the underlying network and/or validator node. By default, you can access your node's RPC\nserver from localhost (for example, to rotate keys or do other maintenance). To access it from\nanother server or an applications UI (such as ",(0,s.jsx)(n.a,{href:"https://polkadot.js.org/apps",children:"Polkadot-JS UI"}),") it is\nrecommended to enable access to the RPC node over an SSL connection and encrypt the connection\nbetween the end user and the RPC server. This can be achieved by setting up a secure proxy. Many\nbrowsers, such as Google Chrome, will block non-secure ws endpoints if they come from a different\norigin."]}),"\n",(0,s.jsx)(n.admonition,{type:"note",children:(0,s.jsx)(n.p,{children:"Enabling remote access to your validator node should not be necessary and is not suggested, as it\ncan often lead to security problems"})}),"\n",(0,s.jsx)(n.h2,{id:"set-up-a-node",children:"Set up a Node"}),"\n",(0,s.jsxs)(n.p,{children:["Setting up any Substrate-based node relies on a similar process. For example, by default, they will\nall share the same WebSocket connection at port 9944 on localhost. In this example, we'll set up a\nPolkadot sync node on a Debian-flavoured server (such as Ubuntu 22.04). Create a new server on your\nprovider of choice or locally at home. See ",(0,s.jsx)(n.a,{href:"./maintain-sync",children:"Set up a Full Node"})," for additional\ninstructions. You can install from the default apt repository or build from scratch. The startup\noptions in the setup process provide various settings that can be modified."]}),"\n",(0,s.jsx)(n.p,{children:"A typical setting for an externally accessible polkadot archive RPC node would be:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-config",children:"polkadot --chain polkadot --name myrpc --state-pruning archive --blocks-pruning archive --rpc-max-connections 100 --rpc-cors all --rpc-methods Safe --rpc-port 9944\n"})}),"\n",(0,s.jsx)(n.p,{children:"Or for a Polkadot pruned RPC node:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-config",children:"polkadot --chain polkadot --name myrpc --state-pruning 1000 --blocks-pruning archive --rpc-max-connections 100 --rpc-cors all --rpc-methods Safe --rpc-port 9944\n"})}),"\n",(0,s.jsx)(n.p,{children:"The specified flag options are outlined in greater detail below."}),"\n",(0,s.jsx)(n.h3,{id:"archive-node-vs-pruned-node",children:"Archive Node vs. Pruned Node"}),"\n",(0,s.jsx)(n.p,{children:"A pruned node only keeps a limited number of finalized blocks of the network, not its full history.\nMost frequently required actions can be completed with a pruned node, such as displaying account\nbalances, making transfers, setting up session keys, staking, etc. An archive node has the full\nhistory (database) of the network. It can be queried in various ways, such as providing historical\ninformation regarding transfers, balance histories, and more advanced queries involving past events."}),"\n",(0,s.jsxs)(n.p,{children:["An archive node requires a lot more disk space. At the start of April 2023, Polkadot disk usage was\n160 GB for a pruned node and 1 TB for an archive node. This value will increase with time. For an\narchive node, you need the options ",(0,s.jsx)(n.code,{children:"--state-pruning archive --blocks-pruning archive"})," in your\nstartup settings."]}),"\n",(0,s.jsx)(n.admonition,{type:"tip",children:(0,s.jsx)(n.p,{children:"Inclusion in the Polkadot.js UI requires an archive node."})}),"\n",(0,s.jsx)(n.h3,{id:"secure-the-rpc-server",children:"Secure the RPC server"}),"\n",(0,s.jsxs)(n.p,{children:["The node startup settings allow you to choose ",(0,s.jsx)(n.strong,{children:"what"})," to expose, ",(0,s.jsx)(n.strong,{children:"how many"})," connections to expose\nand ",(0,s.jsx)(n.strong,{children:"from where"})," access should be granted through the RPC server."]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.em,{children:"How many"}),": You can set your maximum connections through ",(0,s.jsx)(n.code,{children:"--rpc-max-connections"}),", for example\n",(0,s.jsx)(n.code,{children:"--rpc-max-connections 100"})]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.em,{children:"From where"}),": by default localhost and the polkadot.js are allowed to access the RPC server; you can\nchange this by setting ",(0,s.jsx)(n.code,{children:"--rpc-cors"}),", to allow access from everywhere you need ",(0,s.jsx)(n.code,{children:"--rpc-cors all"})]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.em,{children:"What"}),": you can limit the methods to use with ",(0,s.jsx)(n.code,{children:"--rpc-methods"}),", an easy way to set this to a safe\nmode is ",(0,s.jsx)(n.code,{children:"--rpc-methods Safe"})]}),"\n",(0,s.jsx)(n.h3,{id:"secure-the-ws-port",children:"Secure the ws port"}),"\n",(0,s.jsxs)(n.p,{children:["To safely access your ws connection over an SSL-enabled connection (needed for polkadot.js), you\nhave to convert the ws connection to a secure (wss) connection by using a proxy and an SSL\ncertificate, you can find instructions on securing the ws port ",(0,s.jsx)(n.a,{href:"/docs/maintain-wss",children:"here"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"connecting-to-the-node",children:"Connecting to the Node"}),"\n",(0,s.jsxs)(n.p,{children:["Open ",(0,s.jsx)(n.a,{href:"https://polkadot.js.org/apps",children:"Polkadot-JS UI"}),' and click the logo in the top left to switch the\nnode. Activate the "Development" toggle and input your node\'s address - either the domain or the IP\naddress. Remember to prefix with ',(0,s.jsx)(n.code,{children:"wss://"}),", and if you're using the 443 port, append ",(0,s.jsx)(n.code,{children:":443"})," like so:\n",(0,s.jsx)(n.code,{children:"wss://example.com:443"}),"."]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"A sync-in-progress chain connected to Polkadot-JS UI",src:o(61189).A+"",width:"2876",height:"1626"})}),"\n",(0,s.jsx)(n.p,{children:"Now you have a secure remote connect setup for your Substrate node."})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},61189:(e,n,o)=>{o.d(n,{A:()=>t});const t=o.p+"assets/images/maintain-wss-image-0fe72147f38d8b6766328dd834a517a6.png"},28453:(e,n,o)=>{o.d(n,{R:()=>a,x:()=>i});var t=o(96540);const s={},r=t.createContext(s);function a(e){const n=t.useContext(r);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:a(e.components),t.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/74df6a22.fcd83bc4.js b/assets/js/74df6a22.fcd83bc4.js deleted file mode 100644 index cc3501b8b732..000000000000 --- a/assets/js/74df6a22.fcd83bc4.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7227],{74064:(e,n,o)=>{o.r(n),o.d(n,{assets:()=>c,contentTitle:()=>a,default:()=>h,frontMatter:()=>r,metadata:()=>i,toc:()=>d});var t=o(74848),s=o(28453);const r={id:"maintain-rpc",title:"Set up a RPC node",sidebar_label:"Set up a RPC node",description:"Steps on setting up a RPC node.",keywords:["rpc","rpc node","web socket","remote","connection","secure websocket"],slug:"../maintain-rpc"},a=void 0,i={id:"maintain/maintain-rpc",title:"Set up a RPC node",description:"Steps on setting up a RPC node.",source:"@site/../docs/maintain/maintain-rpc.md",sourceDirName:"maintain",slug:"/maintain-rpc",permalink:"/docs/maintain-rpc",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/maintain/maintain-rpc.md",tags:[],version:"current",lastUpdatedBy:"Dominique",lastUpdatedAt:1694979058e3,frontMatter:{id:"maintain-rpc",title:"Set up a RPC node",sidebar_label:"Set up a RPC node",description:"Steps on setting up a RPC node.",keywords:["rpc","rpc node","web socket","remote","connection","secure websocket"],slug:"../maintain-rpc"},sidebar:"docs",previous:{title:"Set up a Boot Node",permalink:"/docs/maintain-bootnode"},next:{title:"Secure the WebSocket",permalink:"/docs/maintain-wss"}},c={},d=[{value:"Set up a Node",id:"set-up-a-node",level:2},{value:"Archive Node vs. Pruned Node",id:"archive-node-vs-pruned-node",level:3},{value:"Secure the RPC server",id:"secure-the-rpc-server",level:3},{value:"Secure the ws port",id:"secure-the-ws-port",level:3},{value:"Connecting to the Node",id:"connecting-to-the-node",level:2}];function l(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",p:"p",pre:"pre",strong:"strong",...(0,s.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(n.p,{children:["The substrate node RPC server can be accessed over the WebSocket protocol, which can be used to\naccess the underlying network and/or validator node. By default, you can access your node's RPC\nserver from localhost (for example, to rotate keys or do other maintenance). To access it from\nanother server or an applications UI (such as ",(0,t.jsx)(n.a,{href:"https://polkadot.js.org/apps",children:"Polkadot-JS UI"}),") it is\nrecommended to enable access to the RPC node over an SSL connection and encrypt the connection\nbetween the end user and the RPC server. This can be achieved by setting up a secure proxy. Many\nbrowsers, such as Google Chrome, will block non-secure ws endpoints if they come from a different\norigin."]}),"\n",(0,t.jsx)(n.admonition,{type:"note",children:(0,t.jsx)(n.p,{children:"Enabling remote access to your validator node should not be necessary and is not suggested, as it\ncan often lead to security problems"})}),"\n",(0,t.jsx)(n.h2,{id:"set-up-a-node",children:"Set up a Node"}),"\n",(0,t.jsxs)(n.p,{children:["Setting up any Substrate-based node relies on a similar process. For example, by default, they will\nall share the same WebSocket connection at port 9944 on localhost. In this example, we'll set up a\nPolkadot sync node on a Debian-flavoured server (such as Ubuntu 22.04). Create a new server on your\nprovider of choice or locally at home. See ",(0,t.jsx)(n.a,{href:"./maintain-sync",children:"Set up a Full Node"})," for additional\ninstructions. You can install from the default apt repository or build from scratch. The startup\noptions in the setup process provide various settings that can be modified."]}),"\n",(0,t.jsx)(n.p,{children:"A typical setting for an externally accessible polkadot archive RPC node would be:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-config",children:"polkadot --chain polkadot --name myrpc --state-pruning archive --blocks-pruning archive --rpc-max-connections 100 --rpc-cors all --rpc-methods Safe --rpc-port 9944\n"})}),"\n",(0,t.jsx)(n.p,{children:"Or for a Polkadot pruned RPC node:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-config",children:"polkadot --chain polkadot --name myrpc --state-pruning 1000 --blocks-pruning archive --rpc-max-connections 100 --rpc-cors all --rpc-methods Safe --rpc-port 9944\n"})}),"\n",(0,t.jsx)(n.p,{children:"The specified flag options are outlined in greater detail below."}),"\n",(0,t.jsx)(n.h3,{id:"archive-node-vs-pruned-node",children:"Archive Node vs. Pruned Node"}),"\n",(0,t.jsx)(n.p,{children:"A pruned node only keeps a limited number of finalized blocks of the network, not its full history.\nMost frequently required actions can be completed with a pruned node, such as displaying account\nbalances, making transfers, setting up session keys, staking, etc. An archive node has the full\nhistory (database) of the network. It can be queried in various ways, such as providing historical\ninformation regarding transfers, balance histories, and more advanced queries involving past events."}),"\n",(0,t.jsxs)(n.p,{children:["An archive node requires a lot more disk space. At the start of April 2023, Polkadot disk usage was\n160 GB for a pruned node and 1 TB for an archive node. This value will increase with time. For an\narchive node, you need the options ",(0,t.jsx)(n.code,{children:"--state-pruning archive --blocks-pruning archive"})," in your\nstartup settings."]}),"\n",(0,t.jsx)(n.admonition,{type:"tip",children:(0,t.jsx)(n.p,{children:"Inclusion in the Polkadot.js UI requires an archive node."})}),"\n",(0,t.jsx)(n.h3,{id:"secure-the-rpc-server",children:"Secure the RPC server"}),"\n",(0,t.jsxs)(n.p,{children:["The node startup settings allow you to choose ",(0,t.jsx)(n.strong,{children:"what"})," to expose, ",(0,t.jsx)(n.strong,{children:"how many"})," connections to expose\nand ",(0,t.jsx)(n.strong,{children:"from where"})," access should be granted through the RPC server."]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.em,{children:"How many"}),": You can set your maximum connections through ",(0,t.jsx)(n.code,{children:"--rpc-max-connections"}),", for example\n",(0,t.jsx)(n.code,{children:"--rpc-max-connections 100"})]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.em,{children:"From where"}),": by default localhost and the polkadot.js are allowed to access the RPC server; you can\nchange this by setting ",(0,t.jsx)(n.code,{children:"--rpc-cors"}),", to allow access from everywhere you need ",(0,t.jsx)(n.code,{children:"--rpc-cors all"})]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.em,{children:"What"}),": you can limit the methods to use with ",(0,t.jsx)(n.code,{children:"--rpc-methods"}),", an easy way to set this to a safe\nmode is ",(0,t.jsx)(n.code,{children:"--rpc-methods Safe"})]}),"\n",(0,t.jsx)(n.h3,{id:"secure-the-ws-port",children:"Secure the ws port"}),"\n",(0,t.jsxs)(n.p,{children:["To safely access your ws connection over an SSL-enabled connection (needed for polkadot.js), you\nhave to convert the ws connection to a secure (wss) connection by using a proxy and an SSL\ncertificate, you can find instructions on securing the ws port ",(0,t.jsx)(n.a,{href:"/docs/maintain-wss",children:"here"}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"connecting-to-the-node",children:"Connecting to the Node"}),"\n",(0,t.jsxs)(n.p,{children:["Open ",(0,t.jsx)(n.a,{href:"https://polkadot.js.org/apps",children:"Polkadot-JS UI"}),' and click the logo in the top left to switch the\nnode. Activate the "Development" toggle and input your node\'s address - either the domain or the IP\naddress. Remember to prefix with ',(0,t.jsx)(n.code,{children:"wss://"}),", and if you're using the 443 port, append ",(0,t.jsx)(n.code,{children:":443"})," like so:\n",(0,t.jsx)(n.code,{children:"wss://example.com:443"}),"."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"A sync-in-progress chain connected to Polkadot-JS UI",src:o(61189).A+"",width:"2876",height:"1626"})}),"\n",(0,t.jsx)(n.p,{children:"Now you have a secure remote connect setup for your Substrate node."})]})}function h(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(l,{...e})}):l(e)}},61189:(e,n,o)=>{o.d(n,{A:()=>t});const t=o.p+"assets/images/maintain-wss-image-0fe72147f38d8b6766328dd834a517a6.png"},28453:(e,n,o)=>{o.d(n,{R:()=>a,x:()=>i});var t=o(96540);const s={},r=t.createContext(s);function a(e){const n=t.useContext(r);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:a(e.components),t.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/766a10e1.170d5a5f.js b/assets/js/766a10e1.170d5a5f.js new file mode 100644 index 000000000000..52d44caef989 --- /dev/null +++ b/assets/js/766a10e1.170d5a5f.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6118],{16078:(e,n,a)=>{a.r(n),a.d(n,{assets:()=>c,contentTitle:()=>r,default:()=>d,frontMatter:()=>i,metadata:()=>s,toc:()=>l});const s=JSON.parse('{"id":"learn/learn-comparisons-avalanche","title":"Polkadot vs. Avalanche","description":"Comparison between Polkadot and Avalanche.","source":"@site/../docs/learn/learn-comparisons-avalanche.md","sourceDirName":"learn","slug":"/learn-comparisons-avalanche","permalink":"/docs/learn-comparisons-avalanche","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-comparisons-avalanche.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1727991122000,"frontMatter":{"id":"learn-comparisons-avalanche","title":"Polkadot vs. Avalanche","sidebar_label":"Avalanche","description":"Comparison between Polkadot and Avalanche.","keywords":["avalance","proof of stake","comparison"],"slug":"../learn-comparisons-avalanche"},"sidebar":"docs","previous":{"title":"Cosmos","permalink":"/docs/learn-comparisons-cosmos"},"next":{"title":"Other Comparisons","permalink":"/docs/learn-comparisons"}}');var t=a(74848),o=a(28453);const i={id:"learn-comparisons-avalanche",title:"Polkadot vs. Avalanche",sidebar_label:"Avalanche",description:"Comparison between Polkadot and Avalanche.",keywords:["avalance","proof of stake","comparison"],slug:"../learn-comparisons-avalanche"},r=void 0,c={},l=[{value:"Architecture",id:"architecture",level:2},{value:"P-chain (Platform)",id:"p-chain-platform",level:4},{value:"X-chain (Exchange)",id:"x-chain-exchange",level:4},{value:"C-chain (Contracts)",id:"c-chain-contracts",level:4},{value:"Subnets or sub-networks",id:"subnets-or-sub-networks",level:4},{value:"Consensus",id:"consensus",level:2},{value:"Snowball",id:"snowball",level:3},{value:"DAG(Directed Acyclic Graph)",id:"dagdirected-acyclic-graph",level:3},{value:"Staking Mechanics",id:"staking-mechanics",level:2},{value:"Message Passing",id:"message-passing",level:2},{value:"Governance",id:"governance",level:2},{value:"Upgrades",id:"upgrades",level:2},{value:"Conclusion",id:"conclusion",level:2},{value:"References",id:"references",level:2}];function h(e){const n={a:"a",admonition:"admonition",em:"em",h2:"h2",h3:"h3",h4:"h4",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,o.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.admonition,{type:"info",children:(0,t.jsxs)(n.p,{children:["To keep the content on this page factually correct and up-to-date,\n",(0,t.jsx)(n.a,{href:"https://github.com/w3f/polkadot-wiki#contributing-to-documentation",children:"contributions"})," are welcome."]})}),"\n",(0,t.jsxs)(n.p,{children:["Polkadot and Avalanche both have an architecture that allows for application-specific blockchains to\nbe designed and connected to a primary network. In Polkadot, the primary network is the relay chain\nand Avalanche does this with 3 main chains - the P-chain, X-chain, and C-chain. Similar to how\nPolkadot has its Parachains that connect to the relay chain, Avalanche has what\u2019s called\n",(0,t.jsx)(n.a,{href:"https://docs.avax.network/subnets",children:"subnets"}),". Similar to Polkadot, Avalanche also uses a PoS\nmechanism for achieving consensus. The validators stake their AVAX tokens in order to participate in\nthe PoS system and secure the network."]}),"\n",(0,t.jsx)(n.h2,{id:"architecture",children:"Architecture"}),"\n",(0,t.jsxs)(n.p,{children:["Avalanche's architecture separates the responsibility of a layer-1 smart contract platform into\nthree chains. This allows for a separation of concern over validators and consensus, transactions,\nand smart contract execution. Avalanche uses a DAG (Directed Acyclic Graph) structure for one of its\nchains which is non-linear. Polkadot uses the linear chain structure similar to Bitcoin and\nEthereum. Smart contracts in Polkadot are implemented on\n",(0,t.jsx)(n.a,{href:"build-smart-contracts#parachains",children:"parachains"}),". Polkadot being a layer-0 blockchain, is not a smart\ncontract platform and does not have plans to support them natively."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"avalanche-network",src:a(70013).A+"",width:"841",height:"479"})}),"\n",(0,t.jsxs)(n.p,{children:["Image source: ",(0,t.jsx)(n.a,{href:"https://docs.avax.network/",children:"Avalanche docs"}),"."]}),"\n",(0,t.jsx)(n.h4,{id:"p-chain-platform",children:"P-chain (Platform)"}),"\n",(0,t.jsx)(n.p,{children:"The P-chain is responsible for maintaining the validator set and securing the network. AVAX token\nholders can spin up their own nodes and become validators by staking their tokens. Similar to the\nNPoS system that Polkadot uses, Avalanche uses a Delegated PoS which allows token holders to also\ndelegate their token stake to existing validators instead of running their own nodes."}),"\n",(0,t.jsx)(n.h4,{id:"x-chain-exchange",children:"X-chain (Exchange)"}),"\n",(0,t.jsx)(n.p,{children:"The X-chain is responsible for the transaction layer of the Avalanche blockchain. It uses a UTXO\nmodel like Bitcoin whereas Polkadot uses an account model like Ethereum. This is the only chain that\nimplements the DAG (Directed Acyclic Graph) model for its blockchain, making this the fastest chain\non the Avalanche network. This chain does not support smart contract execution."}),"\n",(0,t.jsx)(n.h4,{id:"c-chain-contracts",children:"C-chain (Contracts)"}),"\n",(0,t.jsx)(n.p,{children:"The C-chain is where the most activity will happen on the Avalanche network. It allows for different\nvirtual machines to execute smart contract code. Out of the box, it has support for EVM and AVM\n(Avalanche VM). C-Chain runs a fork of go-ethereum called coreth that has the networking and\nconsensus portions replaced with Avalanche equivalents."}),"\n",(0,t.jsx)(n.p,{children:"As Polkadot does not have a smart contract layer out of the box, the EVM and WASM smart contract\nabilities lie in the Parachain layers. This is a major difference between Polkadot and Avalanche.\nThe smart-contract abilities of Avalanche are baked into its three-chain model."}),"\n",(0,t.jsx)(n.h4,{id:"subnets-or-sub-networks",children:"Subnets or sub-networks"}),"\n",(0,t.jsx)(n.p,{children:"Avalanche defines a subnet as a dynamic set of validators that achieve consensus on a set of\nblockchains. In Polkadot's terminology, Subnets can be viewed as public or private blockchain\nruntimes that can be built on top of the primary network and allow a subset of the validators to\nvalidate these runtimes. Similar to the Parachains on Polkadot, Subnets provide the freedom to\nchoose the transaction fee model, tokenomics, and custom compile rules. One or many validators can\nstart validating a subnet runtime, effectively becoming a subset of the overall validator set of the\nPrimary Network."}),"\n",(0,t.jsx)(n.h2,{id:"consensus",children:"Consensus"}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"avalanche-consensus-protocols",src:a(59366).A+"",width:"744",height:"453"})}),"\n",(0,t.jsxs)(n.p,{children:["Image source:\n",(0,t.jsx)(n.a,{href:"https://gyuho.dev/nakamoto-bitcoin-vs-snow-avalanche-consensus.html#snow-family-protocols",children:"gyuho.dev"}),"."]}),"\n",(0,t.jsx)(n.p,{children:"Avalanche consensus uses a family of protocols to achieve security, liveness, and finality. These\nare known as the Snow* protocols. This group of protocols composed together uses both classical and\nNakamoto consensus as well as a Delegated Proof-of-Stake system for its block creators."}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.a,{href:"https://docs.avax.network/overview/getting-started/avalanche-consensus",children:"Snow family"})," is a\nhierarchical collection of systems used to reach finality on Avalanche:"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Slush"}),"\n",(0,t.jsx)(n.li,{children:"Snowflake"}),"\n",(0,t.jsx)(n.li,{children:"Snowball"}),"\n",(0,t.jsx)(n.li,{children:"Avalanche"}),"\n",(0,t.jsx)(n.li,{children:"Snowman"}),"\n",(0,t.jsx)(n.li,{children:"Slushie"}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["Compared to Polkadot, Avalanche uses an asynchronous hybrid system that is based on a classical and\nNakomoto approach. Polkadot uses a synchronous hybrid model that combines\n",(0,t.jsx)(n.a,{href:"learn-consensus#block-production-babe",children:"BABE"})," and\n",(0,t.jsx)(n.a,{href:"learn-consensus#finality-gadget-grandpa",children:"GRANDPA"}),", where BABE is the algorithm used to build blocks\nin a probabilistic way, and GRANDPA is a finality mechanism that uses a deterministic approach to\nadding blocks to the longest chain. In the end, validators agree to whole chains, rather than single\nnew blocks."]}),"\n",(0,t.jsx)(n.h3,{id:"snowball",children:"Snowball"}),"\n",(0,t.jsx)(n.p,{children:"The snowball protocol is an algorithm that nodes use to come to a consensus. Each node continuously\nqueries x number of validators and takes the majority consensus and adopts it as its own. This\nmethod, in normal circumstances, will lead to the network reaching a consensus. The scalability of\nSnowball is promising, as the number of participants in the network grows, the number of consensus\nmessages being passed around remains the same. Nodes will query no more than 20 nodes at a given\ntime."}),"\n",(0,t.jsx)(n.h3,{id:"dagdirected-acyclic-graph",children:"DAG(Directed Acyclic Graph)"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/Directed_acyclic_graph",children:"DAGs"})," are graphs consisting of vertices and\nedges. In Avalanche they are used for ",(0,t.jsx)(n.strong,{children:"partial ordering"})," of decisions, such as transactions.\nVertices point to each other using edges, and when ordered topologically vertices and edges create a\nsequence. Edges in the case of Avalanche can be conflicting, and nodes will use the snowball\nalgorithm to make decisions about which edges to keep and which to not."]}),"\n",(0,t.jsx)(n.h2,{id:"staking-mechanics",children:"Staking Mechanics"}),"\n",(0,t.jsxs)(n.p,{children:["Avalanche uses a Delegated Proof-of-Stake mechanism without any ",(0,t.jsx)(n.a,{href:"/docs/learn-offenses",children:"slashing"}),". The\nbarrier to entry for staking as a full node validator is 2500 AVAX, and 25 AVAX to become a\ndelegator. With a minimum stake period being two weeks and a maximum period being a year, for both\nvalidators and delegators. It is not clear from the Avalanche documentation what happens after a\nyear, it is likely that validators will have to re-stake and start a new period. Validators acquire\npoints for uptime and correctness of their work, and the remuneration of rewards depends on that."]}),"\n",(0,t.jsxs)(n.p,{children:["In Polkadot the minimum stake needed to be a validator is variable, same for being a nominator. The\ntrue minimum need to be competitive enough to be included in the active set for validators, or\nsuccessfully being chosen as a nominator depends on the minimum staked amounts on the network at a\ngiven time. Read more about this in the ",(0,t.jsx)(n.a,{href:"learn-staking",children:"staking page"}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"message-passing",children:"Message Passing"}),"\n",(0,t.jsxs)(n.p,{children:["Avalanche does not have a native trustless message-passing mechanism. Instead, it relies on bridges.\nThough, because it is an EVM-compatible protocol, it's able to interoperate at a token level.\nHowever, subnets do not have a messaging layer out of the box. Polkadot, with its ",(0,t.jsx)(n.a,{href:"learn-xcm",children:"XCM"}),"\nand ",(0,t.jsx)(n.a,{href:"learn-xcm#xcmp-cross-chain-message-passing",children:"XCMP"})," messaging protocols, allows for a native and\ntrustless messaging scheme, thus supporting the composability of chains and enabling the development\nof powerful cross-chain applications."]}),"\n",(0,t.jsx)(n.h2,{id:"governance",children:"Governance"}),"\n",(0,t.jsx)(n.p,{children:"According to its whitepaper, Avalanche plans to have an on-chain governance mechanism. It currently\ndoes not have an on-chain or off-chain system in production. Its governance system will limited to\nupdating only a few key protocol parameters which include:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Staking amount:"})," This value defines the minimal stake required to be placed as bond before\nparticipating in the system."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Minimum staking time for a node:"})," The minimal amount of time required for a node to stake into\nthe system."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Maximum staking time for a node:"})," The maximal amount of time a node can stake."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Minting rate:"})," Reward rate function, also referred to as minting rate, determines the reward a\nparticipant can claim as a function of their staking amount given some number of x publicly\ndisclosed nodes under its ownership, over a period of t consecutive ",(0,t.jsx)(n.em,{children:"minimal staking time"}),"\ntimeframes, such that t",(0,t.jsx)(n.em,{children:"minimal staking time"})," \u2264 ",(0,t.jsx)(n.em,{children:"maximum staking time"}),"."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Transaction fee amount:"})," The fee structure, which is a set of governable fees parameters that\nspecify costs to various transactions."]}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"Limiting the governance functionality is a design choice to increase predictability and safety."}),"\n",(0,t.jsx)(n.p,{children:"Polkadot's governance mechanism has been in production from the very beginning and was used to\nslowly release functionality and decentralize the initial network. It is also not limited to a few\nparameters and in fact, the whole runtime is subject to change via protocol making Polkadot a\nmeta-protocol."}),"\n",(0,t.jsx)(n.h2,{id:"upgrades",children:"Upgrades"}),"\n",(0,t.jsxs)(n.p,{children:["The upgrades to Avalanche are administered by the protocol developers at\n",(0,t.jsx)(n.a,{href:"https://www.avalabs.org/",children:"Ava Labs"}),". On Polkadot, the forkless upgrades are administered and\ndeployed through the on-chain governance. When performing upgrades, every single validator on the\nSubnet will need to perform the identical upgrade. This requires a co-ordination effort among the\nValidators of the Subnet. On Polkadot, upgrades to Parachains can be deployed automatically without\nany coordination with the Validators on the relaychain."]}),"\n",(0,t.jsx)(n.h2,{id:"conclusion",children:"Conclusion"}),"\n",(0,t.jsxs)(n.p,{children:["Avalanche has made some design decisions that allow for an improved smart-contract development\nenvironment in which protocol engineers can have the freedom to create their own blockchains and\ninclude them in the Avalanche ecosystem via subnets. The trade-offs are that the autonomy of design\nis limited and blockchains have to buy into the design decisions of Avalanche's main chains. Unlike\nparachains on Polkadot, Subnets are not able to share the security of the main chains. In addition\nto utilizing block finality and security of the relay chain, parachains on Polkadot use\n",(0,t.jsx)(n.a,{href:"learn-xcm",children:"XCM"})," to pass native trustless messages, instead of having to rely on multiple bridging\nsolutions. However, Subnets are easy to launch when compared to parachains, given that they only\nneed a recommended minimum of 5 validators, which make the costs of launch predictable. Avalanche\nhas plans to implement shared security, interoperability, composability and on-chain governance\nfeatures which are already offered by Polkadot."]}),"\n",(0,t.jsx)(n.h2,{id:"references",children:"References"}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://assets.website-files.com/5d80307810123f5ffbb34d6e/6008d7bbf8b10d1eb01e7e16_Avalanche%20Platform%20Whitepaper.pdf",children:"The Avalanche Platform Whitepaper"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://assets.website-files.com/5d80307810123f5ffbb34d6e/6009805681b416f34dcae012_Avalanche%20Consensus%20Whitepaper.pdf",children:"The Avalanche Consensus Whitepaper"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://assets.website-files.com/5d80307810123f5ffbb34d6e/6008d7bc56430d6b8792b8d1_Avalanche%20Native%20Token%20Dynamics.pdf",children:"The AVAX Token Dynamics Paper"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://gyuho.dev/nakamoto-bitcoin-vs-snow-avalanche-consensus.html#what-is-snow-consensus",children:"Nakomoto vs Snow consensus"})}),"\n"]})]})}function d(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(h,{...e})}):h(e)}},59366:(e,n,a)=>{a.d(n,{A:()=>s});const s=a.p+"assets/images/avalanche-consensus-protocols-5e520b603bd2f9234af02d86ab695cd3.png"},70013:(e,n,a)=>{a.d(n,{A:()=>s});const s=a.p+"assets/images/avalanche-network-175669932c1264549c67806669b3d84d.png"},28453:(e,n,a)=>{a.d(n,{R:()=>i,x:()=>r});var s=a(96540);const t={},o=s.createContext(t);function i(e){const n=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:i(e.components),s.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/766a10e1.cc4f48bd.js b/assets/js/766a10e1.cc4f48bd.js deleted file mode 100644 index 38233b41774e..000000000000 --- a/assets/js/766a10e1.cc4f48bd.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6118],{15869:(e,n,a)=>{a.r(n),a.d(n,{assets:()=>c,contentTitle:()=>i,default:()=>d,frontMatter:()=>o,metadata:()=>r,toc:()=>l});var s=a(74848),t=a(28453);const o={id:"learn-comparisons-avalanche",title:"Polkadot vs. Avalanche",sidebar_label:"Avalanche",description:"Comparison between Polkadot and Avalanche.",keywords:["avalance","proof of stake","comparison"],slug:"../learn-comparisons-avalanche"},i=void 0,r={id:"learn/learn-comparisons-avalanche",title:"Polkadot vs. Avalanche",description:"Comparison between Polkadot and Avalanche.",source:"@site/../docs/learn/learn-comparisons-avalanche.md",sourceDirName:"learn",slug:"/learn-comparisons-avalanche",permalink:"/docs/learn-comparisons-avalanche",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-comparisons-avalanche.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1727991122e3,frontMatter:{id:"learn-comparisons-avalanche",title:"Polkadot vs. Avalanche",sidebar_label:"Avalanche",description:"Comparison between Polkadot and Avalanche.",keywords:["avalance","proof of stake","comparison"],slug:"../learn-comparisons-avalanche"},sidebar:"docs",previous:{title:"Cosmos",permalink:"/docs/learn-comparisons-cosmos"},next:{title:"Other Comparisons",permalink:"/docs/learn-comparisons"}},c={},l=[{value:"Architecture",id:"architecture",level:2},{value:"P-chain (Platform)",id:"p-chain-platform",level:4},{value:"X-chain (Exchange)",id:"x-chain-exchange",level:4},{value:"C-chain (Contracts)",id:"c-chain-contracts",level:4},{value:"Subnets or sub-networks",id:"subnets-or-sub-networks",level:4},{value:"Consensus",id:"consensus",level:2},{value:"Snowball",id:"snowball",level:3},{value:"DAG(Directed Acyclic Graph)",id:"dagdirected-acyclic-graph",level:3},{value:"Staking Mechanics",id:"staking-mechanics",level:2},{value:"Message Passing",id:"message-passing",level:2},{value:"Governance",id:"governance",level:2},{value:"Upgrades",id:"upgrades",level:2},{value:"Conclusion",id:"conclusion",level:2},{value:"References",id:"references",level:2}];function h(e){const n={a:"a",admonition:"admonition",em:"em",h2:"h2",h3:"h3",h4:"h4",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,t.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.admonition,{type:"info",children:(0,s.jsxs)(n.p,{children:["To keep the content on this page factually correct and up-to-date,\n",(0,s.jsx)(n.a,{href:"https://github.com/w3f/polkadot-wiki#contributing-to-documentation",children:"contributions"})," are welcome."]})}),"\n",(0,s.jsxs)(n.p,{children:["Polkadot and Avalanche both have an architecture that allows for application-specific blockchains to\nbe designed and connected to a primary network. In Polkadot, the primary network is the relay chain\nand Avalanche does this with 3 main chains - the P-chain, X-chain, and C-chain. Similar to how\nPolkadot has its Parachains that connect to the relay chain, Avalanche has what\u2019s called\n",(0,s.jsx)(n.a,{href:"https://docs.avax.network/subnets",children:"subnets"}),". Similar to Polkadot, Avalanche also uses a PoS\nmechanism for achieving consensus. The validators stake their AVAX tokens in order to participate in\nthe PoS system and secure the network."]}),"\n",(0,s.jsx)(n.h2,{id:"architecture",children:"Architecture"}),"\n",(0,s.jsxs)(n.p,{children:["Avalanche's architecture separates the responsibility of a layer-1 smart contract platform into\nthree chains. This allows for a separation of concern over validators and consensus, transactions,\nand smart contract execution. Avalanche uses a DAG (Directed Acyclic Graph) structure for one of its\nchains which is non-linear. Polkadot uses the linear chain structure similar to Bitcoin and\nEthereum. Smart contracts in Polkadot are implemented on\n",(0,s.jsx)(n.a,{href:"build-smart-contracts#parachains",children:"parachains"}),". Polkadot being a layer-0 blockchain, is not a smart\ncontract platform and does not have plans to support them natively."]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"avalanche-network",src:a(70013).A+"",width:"841",height:"479"})}),"\n",(0,s.jsxs)(n.p,{children:["Image source: ",(0,s.jsx)(n.a,{href:"https://docs.avax.network/",children:"Avalanche docs"}),"."]}),"\n",(0,s.jsx)(n.h4,{id:"p-chain-platform",children:"P-chain (Platform)"}),"\n",(0,s.jsx)(n.p,{children:"The P-chain is responsible for maintaining the validator set and securing the network. AVAX token\nholders can spin up their own nodes and become validators by staking their tokens. Similar to the\nNPoS system that Polkadot uses, Avalanche uses a Delegated PoS which allows token holders to also\ndelegate their token stake to existing validators instead of running their own nodes."}),"\n",(0,s.jsx)(n.h4,{id:"x-chain-exchange",children:"X-chain (Exchange)"}),"\n",(0,s.jsx)(n.p,{children:"The X-chain is responsible for the transaction layer of the Avalanche blockchain. It uses a UTXO\nmodel like Bitcoin whereas Polkadot uses an account model like Ethereum. This is the only chain that\nimplements the DAG (Directed Acyclic Graph) model for its blockchain, making this the fastest chain\non the Avalanche network. This chain does not support smart contract execution."}),"\n",(0,s.jsx)(n.h4,{id:"c-chain-contracts",children:"C-chain (Contracts)"}),"\n",(0,s.jsx)(n.p,{children:"The C-chain is where the most activity will happen on the Avalanche network. It allows for different\nvirtual machines to execute smart contract code. Out of the box, it has support for EVM and AVM\n(Avalanche VM). C-Chain runs a fork of go-ethereum called coreth that has the networking and\nconsensus portions replaced with Avalanche equivalents."}),"\n",(0,s.jsx)(n.p,{children:"As Polkadot does not have a smart contract layer out of the box, the EVM and WASM smart contract\nabilities lie in the Parachain layers. This is a major difference between Polkadot and Avalanche.\nThe smart-contract abilities of Avalanche are baked into its three-chain model."}),"\n",(0,s.jsx)(n.h4,{id:"subnets-or-sub-networks",children:"Subnets or sub-networks"}),"\n",(0,s.jsx)(n.p,{children:"Avalanche defines a subnet as a dynamic set of validators that achieve consensus on a set of\nblockchains. In Polkadot's terminology, Subnets can be viewed as public or private blockchain\nruntimes that can be built on top of the primary network and allow a subset of the validators to\nvalidate these runtimes. Similar to the Parachains on Polkadot, Subnets provide the freedom to\nchoose the transaction fee model, tokenomics, and custom compile rules. One or many validators can\nstart validating a subnet runtime, effectively becoming a subset of the overall validator set of the\nPrimary Network."}),"\n",(0,s.jsx)(n.h2,{id:"consensus",children:"Consensus"}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"avalanche-consensus-protocols",src:a(59366).A+"",width:"744",height:"453"})}),"\n",(0,s.jsxs)(n.p,{children:["Image source:\n",(0,s.jsx)(n.a,{href:"https://gyuho.dev/nakamoto-bitcoin-vs-snow-avalanche-consensus.html#snow-family-protocols",children:"gyuho.dev"}),"."]}),"\n",(0,s.jsx)(n.p,{children:"Avalanche consensus uses a family of protocols to achieve security, liveness, and finality. These\nare known as the Snow* protocols. This group of protocols composed together uses both classical and\nNakamoto consensus as well as a Delegated Proof-of-Stake system for its block creators."}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.a,{href:"https://docs.avax.network/overview/getting-started/avalanche-consensus",children:"Snow family"})," is a\nhierarchical collection of systems used to reach finality on Avalanche:"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Slush"}),"\n",(0,s.jsx)(n.li,{children:"Snowflake"}),"\n",(0,s.jsx)(n.li,{children:"Snowball"}),"\n",(0,s.jsx)(n.li,{children:"Avalanche"}),"\n",(0,s.jsx)(n.li,{children:"Snowman"}),"\n",(0,s.jsx)(n.li,{children:"Slushie"}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["Compared to Polkadot, Avalanche uses an asynchronous hybrid system that is based on a classical and\nNakomoto approach. Polkadot uses a synchronous hybrid model that combines\n",(0,s.jsx)(n.a,{href:"learn-consensus#block-production-babe",children:"BABE"})," and\n",(0,s.jsx)(n.a,{href:"learn-consensus#finality-gadget-grandpa",children:"GRANDPA"}),", where BABE is the algorithm used to build blocks\nin a probabilistic way, and GRANDPA is a finality mechanism that uses a deterministic approach to\nadding blocks to the longest chain. In the end, validators agree to whole chains, rather than single\nnew blocks."]}),"\n",(0,s.jsx)(n.h3,{id:"snowball",children:"Snowball"}),"\n",(0,s.jsx)(n.p,{children:"The snowball protocol is an algorithm that nodes use to come to a consensus. Each node continuously\nqueries x number of validators and takes the majority consensus and adopts it as its own. This\nmethod, in normal circumstances, will lead to the network reaching a consensus. The scalability of\nSnowball is promising, as the number of participants in the network grows, the number of consensus\nmessages being passed around remains the same. Nodes will query no more than 20 nodes at a given\ntime."}),"\n",(0,s.jsx)(n.h3,{id:"dagdirected-acyclic-graph",children:"DAG(Directed Acyclic Graph)"}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/Directed_acyclic_graph",children:"DAGs"})," are graphs consisting of vertices and\nedges. In Avalanche they are used for ",(0,s.jsx)(n.strong,{children:"partial ordering"})," of decisions, such as transactions.\nVertices point to each other using edges, and when ordered topologically vertices and edges create a\nsequence. Edges in the case of Avalanche can be conflicting, and nodes will use the snowball\nalgorithm to make decisions about which edges to keep and which to not."]}),"\n",(0,s.jsx)(n.h2,{id:"staking-mechanics",children:"Staking Mechanics"}),"\n",(0,s.jsxs)(n.p,{children:["Avalanche uses a Delegated Proof-of-Stake mechanism without any ",(0,s.jsx)(n.a,{href:"/docs/learn-offenses",children:"slashing"}),". The\nbarrier to entry for staking as a full node validator is 2500 AVAX, and 25 AVAX to become a\ndelegator. With a minimum stake period being two weeks and a maximum period being a year, for both\nvalidators and delegators. It is not clear from the Avalanche documentation what happens after a\nyear, it is likely that validators will have to re-stake and start a new period. Validators acquire\npoints for uptime and correctness of their work, and the remuneration of rewards depends on that."]}),"\n",(0,s.jsxs)(n.p,{children:["In Polkadot the minimum stake needed to be a validator is variable, same for being a nominator. The\ntrue minimum need to be competitive enough to be included in the active set for validators, or\nsuccessfully being chosen as a nominator depends on the minimum staked amounts on the network at a\ngiven time. Read more about this in the ",(0,s.jsx)(n.a,{href:"learn-staking",children:"staking page"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"message-passing",children:"Message Passing"}),"\n",(0,s.jsxs)(n.p,{children:["Avalanche does not have a native trustless message-passing mechanism. Instead, it relies on bridges.\nThough, because it is an EVM-compatible protocol, it's able to interoperate at a token level.\nHowever, subnets do not have a messaging layer out of the box. Polkadot, with its ",(0,s.jsx)(n.a,{href:"learn-xcm",children:"XCM"}),"\nand ",(0,s.jsx)(n.a,{href:"learn-xcm#xcmp-cross-chain-message-passing",children:"XCMP"})," messaging protocols, allows for a native and\ntrustless messaging scheme, thus supporting the composability of chains and enabling the development\nof powerful cross-chain applications."]}),"\n",(0,s.jsx)(n.h2,{id:"governance",children:"Governance"}),"\n",(0,s.jsx)(n.p,{children:"According to its whitepaper, Avalanche plans to have an on-chain governance mechanism. It currently\ndoes not have an on-chain or off-chain system in production. Its governance system will limited to\nupdating only a few key protocol parameters which include:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Staking amount:"})," This value defines the minimal stake required to be placed as bond before\nparticipating in the system."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Minimum staking time for a node:"})," The minimal amount of time required for a node to stake into\nthe system."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Maximum staking time for a node:"})," The maximal amount of time a node can stake."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Minting rate:"})," Reward rate function, also referred to as minting rate, determines the reward a\nparticipant can claim as a function of their staking amount given some number of x publicly\ndisclosed nodes under its ownership, over a period of t consecutive ",(0,s.jsx)(n.em,{children:"minimal staking time"}),"\ntimeframes, such that t",(0,s.jsx)(n.em,{children:"minimal staking time"})," \u2264 ",(0,s.jsx)(n.em,{children:"maximum staking time"}),"."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Transaction fee amount:"})," The fee structure, which is a set of governable fees parameters that\nspecify costs to various transactions."]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"Limiting the governance functionality is a design choice to increase predictability and safety."}),"\n",(0,s.jsx)(n.p,{children:"Polkadot's governance mechanism has been in production from the very beginning and was used to\nslowly release functionality and decentralize the initial network. It is also not limited to a few\nparameters and in fact, the whole runtime is subject to change via protocol making Polkadot a\nmeta-protocol."}),"\n",(0,s.jsx)(n.h2,{id:"upgrades",children:"Upgrades"}),"\n",(0,s.jsxs)(n.p,{children:["The upgrades to Avalanche are administered by the protocol developers at\n",(0,s.jsx)(n.a,{href:"https://www.avalabs.org/",children:"Ava Labs"}),". On Polkadot, the forkless upgrades are administered and\ndeployed through the on-chain governance. When performing upgrades, every single validator on the\nSubnet will need to perform the identical upgrade. This requires a co-ordination effort among the\nValidators of the Subnet. On Polkadot, upgrades to Parachains can be deployed automatically without\nany coordination with the Validators on the relaychain."]}),"\n",(0,s.jsx)(n.h2,{id:"conclusion",children:"Conclusion"}),"\n",(0,s.jsxs)(n.p,{children:["Avalanche has made some design decisions that allow for an improved smart-contract development\nenvironment in which protocol engineers can have the freedom to create their own blockchains and\ninclude them in the Avalanche ecosystem via subnets. The trade-offs are that the autonomy of design\nis limited and blockchains have to buy into the design decisions of Avalanche's main chains. Unlike\nparachains on Polkadot, Subnets are not able to share the security of the main chains. In addition\nto utilizing block finality and security of the relay chain, parachains on Polkadot use\n",(0,s.jsx)(n.a,{href:"learn-xcm",children:"XCM"})," to pass native trustless messages, instead of having to rely on multiple bridging\nsolutions. However, Subnets are easy to launch when compared to parachains, given that they only\nneed a recommended minimum of 5 validators, which make the costs of launch predictable. Avalanche\nhas plans to implement shared security, interoperability, composability and on-chain governance\nfeatures which are already offered by Polkadot."]}),"\n",(0,s.jsx)(n.h2,{id:"references",children:"References"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"https://assets.website-files.com/5d80307810123f5ffbb34d6e/6008d7bbf8b10d1eb01e7e16_Avalanche%20Platform%20Whitepaper.pdf",children:"The Avalanche Platform Whitepaper"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"https://assets.website-files.com/5d80307810123f5ffbb34d6e/6009805681b416f34dcae012_Avalanche%20Consensus%20Whitepaper.pdf",children:"The Avalanche Consensus Whitepaper"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"https://assets.website-files.com/5d80307810123f5ffbb34d6e/6008d7bc56430d6b8792b8d1_Avalanche%20Native%20Token%20Dynamics.pdf",children:"The AVAX Token Dynamics Paper"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"https://gyuho.dev/nakamoto-bitcoin-vs-snow-avalanche-consensus.html#what-is-snow-consensus",children:"Nakomoto vs Snow consensus"})}),"\n"]})]})}function d(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}},59366:(e,n,a)=>{a.d(n,{A:()=>s});const s=a.p+"assets/images/avalanche-consensus-protocols-5e520b603bd2f9234af02d86ab695cd3.png"},70013:(e,n,a)=>{a.d(n,{A:()=>s});const s=a.p+"assets/images/avalanche-network-175669932c1264549c67806669b3d84d.png"},28453:(e,n,a)=>{a.d(n,{R:()=>i,x:()=>r});var s=a(96540);const t={},o=s.createContext(t);function i(e){const n=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:i(e.components),s.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/770.a7b4eb83.js b/assets/js/770.a7b4eb83.js deleted file mode 100644 index da77ac3c83a1..000000000000 --- a/assets/js/770.a7b4eb83.js +++ /dev/null @@ -1,10825 +0,0 @@ -"use strict"; -exports.id = 770; -exports.ids = [770]; -exports.modules = { - -/***/ 21176: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - Zp: () => (/* reexport */ layout) -}); - -// UNUSED EXPORTS: acyclic, normalize, rank - -// EXTERNAL MODULE: ./node_modules/lodash-es/forEach.js -var forEach = __webpack_require__(8058); -// EXTERNAL MODULE: ./node_modules/lodash-es/uniqueId.js -var uniqueId = __webpack_require__(5664); -// EXTERNAL MODULE: ./node_modules/lodash-es/has.js + 1 modules -var has = __webpack_require__(48585); -// EXTERNAL MODULE: ./node_modules/lodash-es/constant.js -var constant = __webpack_require__(39142); -// EXTERNAL MODULE: ./node_modules/lodash-es/flatten.js -var flatten = __webpack_require__(34098); -// EXTERNAL MODULE: ./node_modules/lodash-es/map.js -var map = __webpack_require__(74722); -// EXTERNAL MODULE: ./node_modules/lodash-es/range.js + 2 modules -var range = __webpack_require__(91395); -// EXTERNAL MODULE: ./node_modules/dagre-d3-es/src/graphlib/index.js -var graphlib = __webpack_require__(697); -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/data/list.js -/* - * Simple doubly linked list implementation derived from Cormen, et al., - * "Introduction to Algorithms". - */ - - - -class List { - constructor() { - var sentinel = {}; - sentinel._next = sentinel._prev = sentinel; - this._sentinel = sentinel; - } - dequeue() { - var sentinel = this._sentinel; - var entry = sentinel._prev; - if (entry !== sentinel) { - unlink(entry); - return entry; - } - } - enqueue(entry) { - var sentinel = this._sentinel; - if (entry._prev && entry._next) { - unlink(entry); - } - entry._next = sentinel._next; - sentinel._next._prev = entry; - sentinel._next = entry; - entry._prev = sentinel; - } - toString() { - var strs = []; - var sentinel = this._sentinel; - var curr = sentinel._prev; - while (curr !== sentinel) { - strs.push(JSON.stringify(curr, filterOutLinks)); - curr = curr._prev; - } - return '[' + strs.join(', ') + ']'; - } -} - -function unlink(entry) { - entry._prev._next = entry._next; - entry._next._prev = entry._prev; - delete entry._next; - delete entry._prev; -} - -function filterOutLinks(k, v) { - if (k !== '_next' && k !== '_prev') { - return v; - } -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/greedy-fas.js - - - - -/* - * A greedy heuristic for finding a feedback arc set for a graph. A feedback - * arc set is a set of edges that can be removed to make a graph acyclic. - * The algorithm comes from: P. Eades, X. Lin, and W. F. Smyth, "A fast and - * effective heuristic for the feedback arc set problem." This implementation - * adjusts that from the paper to allow for weighted edges. - */ - - -var DEFAULT_WEIGHT_FN = constant/* default */.A(1); - -function greedyFAS(g, weightFn) { - if (g.nodeCount() <= 1) { - return []; - } - var state = buildState(g, weightFn || DEFAULT_WEIGHT_FN); - var results = doGreedyFAS(state.graph, state.buckets, state.zeroIdx); - - // Expand multi-edges - return flatten/* default */.A( - map/* default */.A(results, function (e) { - return g.outEdges(e.v, e.w); - }) - ); -} - -function doGreedyFAS(g, buckets, zeroIdx) { - var results = []; - var sources = buckets[buckets.length - 1]; - var sinks = buckets[0]; - - var entry; - while (g.nodeCount()) { - while ((entry = sinks.dequeue())) { - removeNode(g, buckets, zeroIdx, entry); - } - while ((entry = sources.dequeue())) { - removeNode(g, buckets, zeroIdx, entry); - } - if (g.nodeCount()) { - for (var i = buckets.length - 2; i > 0; --i) { - entry = buckets[i].dequeue(); - if (entry) { - results = results.concat(removeNode(g, buckets, zeroIdx, entry, true)); - break; - } - } - } - } - - return results; -} - -function removeNode(g, buckets, zeroIdx, entry, collectPredecessors) { - var results = collectPredecessors ? [] : undefined; - - forEach/* default */.A(g.inEdges(entry.v), function (edge) { - var weight = g.edge(edge); - var uEntry = g.node(edge.v); - - if (collectPredecessors) { - results.push({ v: edge.v, w: edge.w }); - } - - uEntry.out -= weight; - assignBucket(buckets, zeroIdx, uEntry); - }); - - forEach/* default */.A(g.outEdges(entry.v), function (edge) { - var weight = g.edge(edge); - var w = edge.w; - var wEntry = g.node(w); - wEntry['in'] -= weight; - assignBucket(buckets, zeroIdx, wEntry); - }); - - g.removeNode(entry.v); - - return results; -} - -function buildState(g, weightFn) { - var fasGraph = new graphlib/* Graph */.T(); - var maxIn = 0; - var maxOut = 0; - - forEach/* default */.A(g.nodes(), function (v) { - fasGraph.setNode(v, { v: v, in: 0, out: 0 }); - }); - - // Aggregate weights on nodes, but also sum the weights across multi-edges - // into a single edge for the fasGraph. - forEach/* default */.A(g.edges(), function (e) { - var prevWeight = fasGraph.edge(e.v, e.w) || 0; - var weight = weightFn(e); - var edgeWeight = prevWeight + weight; - fasGraph.setEdge(e.v, e.w, edgeWeight); - maxOut = Math.max(maxOut, (fasGraph.node(e.v).out += weight)); - maxIn = Math.max(maxIn, (fasGraph.node(e.w)['in'] += weight)); - }); - - var buckets = range/* default */.A(maxOut + maxIn + 3).map(function () { - return new List(); - }); - var zeroIdx = maxIn + 1; - - forEach/* default */.A(fasGraph.nodes(), function (v) { - assignBucket(buckets, zeroIdx, fasGraph.node(v)); - }); - - return { graph: fasGraph, buckets: buckets, zeroIdx: zeroIdx }; -} - -function assignBucket(buckets, zeroIdx, entry) { - if (!entry.out) { - buckets[0].enqueue(entry); - } else if (!entry['in']) { - buckets[buckets.length - 1].enqueue(entry); - } else { - buckets[entry.out - entry['in'] + zeroIdx].enqueue(entry); - } -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/acyclic.js - - - - - -function run(g) { - var fas = g.graph().acyclicer === 'greedy' ? greedyFAS(g, weightFn(g)) : dfsFAS(g); - forEach/* default */.A(fas, function (e) { - var label = g.edge(e); - g.removeEdge(e); - label.forwardName = e.name; - label.reversed = true; - g.setEdge(e.w, e.v, label, uniqueId/* default */.A('rev')); - }); - - function weightFn(g) { - return function (e) { - return g.edge(e).weight; - }; - } -} - -function dfsFAS(g) { - var fas = []; - var stack = {}; - var visited = {}; - - function dfs(v) { - if (has/* default */.A(visited, v)) { - return; - } - visited[v] = true; - stack[v] = true; - forEach/* default */.A(g.outEdges(v), function (e) { - if (has/* default */.A(stack, e.w)) { - fas.push(e); - } else { - dfs(e.w); - } - }); - delete stack[v]; - } - - forEach/* default */.A(g.nodes(), dfs); - return fas; -} - -function undo(g) { - forEach/* default */.A(g.edges(), function (e) { - var label = g.edge(e); - if (label.reversed) { - g.removeEdge(e); - - var forwardName = label.forwardName; - delete label.reversed; - delete label.forwardName; - g.setEdge(e.w, e.v, label, forwardName); - } - }); -} - -// EXTERNAL MODULE: ./node_modules/lodash-es/merge.js + 6 modules -var merge = __webpack_require__(98879); -// EXTERNAL MODULE: ./node_modules/lodash-es/pick.js + 4 modules -var pick = __webpack_require__(81942); -// EXTERNAL MODULE: ./node_modules/lodash-es/defaults.js -var defaults = __webpack_require__(23068); -// EXTERNAL MODULE: ./node_modules/lodash-es/isSymbol.js -var isSymbol = __webpack_require__(61882); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseExtremum.js - - -/** - * The base implementation of methods like `_.max` and `_.min` which accepts a - * `comparator` to determine the extremum value. - * - * @private - * @param {Array} array The array to iterate over. - * @param {Function} iteratee The iteratee invoked per iteration. - * @param {Function} comparator The comparator used to compare values. - * @returns {*} Returns the extremum value. - */ -function baseExtremum(array, iteratee, comparator) { - var index = -1, - length = array.length; - - while (++index < length) { - var value = array[index], - current = iteratee(value); - - if (current != null && (computed === undefined - ? (current === current && !(0,isSymbol/* default */.A)(current)) - : comparator(current, computed) - )) { - var computed = current, - result = value; - } - } - return result; -} - -/* harmony default export */ const _baseExtremum = (baseExtremum); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseGt.js -/** - * The base implementation of `_.gt` which doesn't coerce arguments. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if `value` is greater than `other`, - * else `false`. - */ -function baseGt(value, other) { - return value > other; -} - -/* harmony default export */ const _baseGt = (baseGt); - -// EXTERNAL MODULE: ./node_modules/lodash-es/identity.js -var identity = __webpack_require__(29008); -;// CONCATENATED MODULE: ./node_modules/lodash-es/max.js - - - - -/** - * Computes the maximum value of `array`. If `array` is empty or falsey, - * `undefined` is returned. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Math - * @param {Array} array The array to iterate over. - * @returns {*} Returns the maximum value. - * @example - * - * _.max([4, 2, 8, 6]); - * // => 8 - * - * _.max([]); - * // => undefined - */ -function max(array) { - return (array && array.length) - ? _baseExtremum(array, identity/* default */.A, _baseGt) - : undefined; -} - -/* harmony default export */ const lodash_es_max = (max); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/last.js -/** - * Gets the last element of `array`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to query. - * @returns {*} Returns the last element of `array`. - * @example - * - * _.last([1, 2, 3]); - * // => 3 - */ -function last(array) { - var length = array == null ? 0 : array.length; - return length ? array[length - 1] : undefined; -} - -/* harmony default export */ const lodash_es_last = (last); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseAssignValue.js -var _baseAssignValue = __webpack_require__(52528); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseForOwn.js -var _baseForOwn = __webpack_require__(79841); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseIteratee.js + 16 modules -var _baseIteratee = __webpack_require__(49574); -;// CONCATENATED MODULE: ./node_modules/lodash-es/mapValues.js - - - - -/** - * Creates an object with the same keys as `object` and values generated - * by running each own enumerable string keyed property of `object` thru - * `iteratee`. The iteratee is invoked with three arguments: - * (value, key, object). - * - * @static - * @memberOf _ - * @since 2.4.0 - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Object} Returns the new mapped object. - * @see _.mapKeys - * @example - * - * var users = { - * 'fred': { 'user': 'fred', 'age': 40 }, - * 'pebbles': { 'user': 'pebbles', 'age': 1 } - * }; - * - * _.mapValues(users, function(o) { return o.age; }); - * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) - * - * // The `_.property` iteratee shorthand. - * _.mapValues(users, 'age'); - * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) - */ -function mapValues(object, iteratee) { - var result = {}; - iteratee = (0,_baseIteratee/* default */.A)(iteratee, 3); - - (0,_baseForOwn/* default */.A)(object, function(value, key, object) { - (0,_baseAssignValue/* default */.A)(result, key, iteratee(value, key, object)); - }); - return result; -} - -/* harmony default export */ const lodash_es_mapValues = (mapValues); - -// EXTERNAL MODULE: ./node_modules/lodash-es/isUndefined.js -var isUndefined = __webpack_require__(69592); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseLt.js -/** - * The base implementation of `_.lt` which doesn't coerce arguments. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if `value` is less than `other`, - * else `false`. - */ -function baseLt(value, other) { - return value < other; -} - -/* harmony default export */ const _baseLt = (baseLt); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/min.js - - - - -/** - * Computes the minimum value of `array`. If `array` is empty or falsey, - * `undefined` is returned. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Math - * @param {Array} array The array to iterate over. - * @returns {*} Returns the minimum value. - * @example - * - * _.min([4, 2, 8, 6]); - * // => 2 - * - * _.min([]); - * // => undefined - */ -function min(array) { - return (array && array.length) - ? _baseExtremum(array, identity/* default */.A, _baseLt) - : undefined; -} - -/* harmony default export */ const lodash_es_min = (min); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_root.js -var _root = __webpack_require__(41917); -;// CONCATENATED MODULE: ./node_modules/lodash-es/now.js - - -/** - * Gets the timestamp of the number of milliseconds that have elapsed since - * the Unix epoch (1 January 1970 00:00:00 UTC). - * - * @static - * @memberOf _ - * @since 2.4.0 - * @category Date - * @returns {number} Returns the timestamp. - * @example - * - * _.defer(function(stamp) { - * console.log(_.now() - stamp); - * }, _.now()); - * // => Logs the number of milliseconds it took for the deferred invocation. - */ -var now = function() { - return _root/* default */.A.Date.now(); -}; - -/* harmony default export */ const lodash_es_now = (now); - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/util.js - - - - - -/* - * Adds a dummy node to the graph and return v. - */ -function addDummyNode(g, type, attrs, name) { - var v; - do { - v = uniqueId/* default */.A(name); - } while (g.hasNode(v)); - - attrs.dummy = type; - g.setNode(v, attrs); - return v; -} - -/* - * Returns a new graph with only simple edges. Handles aggregation of data - * associated with multi-edges. - */ -function simplify(g) { - var simplified = new graphlib/* Graph */.T().setGraph(g.graph()); - forEach/* default */.A(g.nodes(), function (v) { - simplified.setNode(v, g.node(v)); - }); - forEach/* default */.A(g.edges(), function (e) { - var simpleLabel = simplified.edge(e.v, e.w) || { weight: 0, minlen: 1 }; - var label = g.edge(e); - simplified.setEdge(e.v, e.w, { - weight: simpleLabel.weight + label.weight, - minlen: Math.max(simpleLabel.minlen, label.minlen), - }); - }); - return simplified; -} - -function asNonCompoundGraph(g) { - var simplified = new graphlib/* Graph */.T({ multigraph: g.isMultigraph() }).setGraph(g.graph()); - forEach/* default */.A(g.nodes(), function (v) { - if (!g.children(v).length) { - simplified.setNode(v, g.node(v)); - } - }); - forEach/* default */.A(g.edges(), function (e) { - simplified.setEdge(e, g.edge(e)); - }); - return simplified; -} - -function successorWeights(g) { - var weightMap = _.map(g.nodes(), function (v) { - var sucs = {}; - _.forEach(g.outEdges(v), function (e) { - sucs[e.w] = (sucs[e.w] || 0) + g.edge(e).weight; - }); - return sucs; - }); - return _.zipObject(g.nodes(), weightMap); -} - -function predecessorWeights(g) { - var weightMap = _.map(g.nodes(), function (v) { - var preds = {}; - _.forEach(g.inEdges(v), function (e) { - preds[e.v] = (preds[e.v] || 0) + g.edge(e).weight; - }); - return preds; - }); - return _.zipObject(g.nodes(), weightMap); -} - -/* - * Finds where a line starting at point ({x, y}) would intersect a rectangle - * ({x, y, width, height}) if it were pointing at the rectangle's center. - */ -function intersectRect(rect, point) { - var x = rect.x; - var y = rect.y; - - // Rectangle intersection algorithm from: - // http://math.stackexchange.com/questions/108113/find-edge-between-two-boxes - var dx = point.x - x; - var dy = point.y - y; - var w = rect.width / 2; - var h = rect.height / 2; - - if (!dx && !dy) { - throw new Error('Not possible to find intersection inside of the rectangle'); - } - - var sx, sy; - if (Math.abs(dy) * w > Math.abs(dx) * h) { - // Intersection is top or bottom of rect. - if (dy < 0) { - h = -h; - } - sx = (h * dx) / dy; - sy = h; - } else { - // Intersection is left or right of rect. - if (dx < 0) { - w = -w; - } - sx = w; - sy = (w * dy) / dx; - } - - return { x: x + sx, y: y + sy }; -} - -/* - * Given a DAG with each node assigned "rank" and "order" properties, this - * function will produce a matrix with the ids of each node. - */ -function buildLayerMatrix(g) { - var layering = map/* default */.A(range/* default */.A(util_maxRank(g) + 1), function () { - return []; - }); - forEach/* default */.A(g.nodes(), function (v) { - var node = g.node(v); - var rank = node.rank; - if (!isUndefined/* default */.A(rank)) { - layering[rank][node.order] = v; - } - }); - return layering; -} - -/* - * Adjusts the ranks for all nodes in the graph such that all nodes v have - * rank(v) >= 0 and at least one node w has rank(w) = 0. - */ -function normalizeRanks(g) { - var min = lodash_es_min( - map/* default */.A(g.nodes(), function (v) { - return g.node(v).rank; - }) - ); - forEach/* default */.A(g.nodes(), function (v) { - var node = g.node(v); - if (has/* default */.A(node, 'rank')) { - node.rank -= min; - } - }); -} - -function removeEmptyRanks(g) { - // Ranks may not start at 0, so we need to offset them - var offset = lodash_es_min( - map/* default */.A(g.nodes(), function (v) { - return g.node(v).rank; - }) - ); - - var layers = []; - forEach/* default */.A(g.nodes(), function (v) { - var rank = g.node(v).rank - offset; - if (!layers[rank]) { - layers[rank] = []; - } - layers[rank].push(v); - }); - - var delta = 0; - var nodeRankFactor = g.graph().nodeRankFactor; - forEach/* default */.A(layers, function (vs, i) { - if (isUndefined/* default */.A(vs) && i % nodeRankFactor !== 0) { - --delta; - } else if (delta) { - forEach/* default */.A(vs, function (v) { - g.node(v).rank += delta; - }); - } - }); -} - -function addBorderNode(g, prefix, rank, order) { - var node = { - width: 0, - height: 0, - }; - if (arguments.length >= 4) { - node.rank = rank; - node.order = order; - } - return addDummyNode(g, 'border', node, prefix); -} - -function util_maxRank(g) { - return lodash_es_max( - map/* default */.A(g.nodes(), function (v) { - var rank = g.node(v).rank; - if (!isUndefined/* default */.A(rank)) { - return rank; - } - }) - ); -} - -/* - * Partition a collection into two groups: `lhs` and `rhs`. If the supplied - * function returns true for an entry it goes into `lhs`. Otherwise it goes - * into `rhs. - */ -function partition(collection, fn) { - var result = { lhs: [], rhs: [] }; - forEach/* default */.A(collection, function (value) { - if (fn(value)) { - result.lhs.push(value); - } else { - result.rhs.push(value); - } - }); - return result; -} - -/* - * Returns a new function that wraps `fn` with a timer. The wrapper logs the - * time it takes to execute the function. - */ -function util_time(name, fn) { - var start = lodash_es_now(); - try { - return fn(); - } finally { - console.log(name + ' time: ' + (lodash_es_now() - start) + 'ms'); - } -} - -function notime(name, fn) { - return fn(); -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/add-border-segments.js - - - - - -function addBorderSegments(g) { - function dfs(v) { - var children = g.children(v); - var node = g.node(v); - if (children.length) { - forEach/* default */.A(children, dfs); - } - - if (has/* default */.A(node, 'minRank')) { - node.borderLeft = []; - node.borderRight = []; - for (var rank = node.minRank, maxRank = node.maxRank + 1; rank < maxRank; ++rank) { - add_border_segments_addBorderNode(g, 'borderLeft', '_bl', v, node, rank); - add_border_segments_addBorderNode(g, 'borderRight', '_br', v, node, rank); - } - } - } - - forEach/* default */.A(g.children(), dfs); -} - -function add_border_segments_addBorderNode(g, prop, prefix, sg, sgNode, rank) { - var label = { width: 0, height: 0, rank: rank, borderType: prop }; - var prev = sgNode[prop][rank - 1]; - var curr = addDummyNode(g, 'border', label, prefix); - sgNode[prop][rank] = curr; - g.setParent(curr, sg); - if (prev) { - g.setEdge(prev, curr, { weight: 1 }); - } -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/coordinate-system.js - - - - -function adjust(g) { - var rankDir = g.graph().rankdir.toLowerCase(); - if (rankDir === 'lr' || rankDir === 'rl') { - swapWidthHeight(g); - } -} - -function coordinate_system_undo(g) { - var rankDir = g.graph().rankdir.toLowerCase(); - if (rankDir === 'bt' || rankDir === 'rl') { - reverseY(g); - } - - if (rankDir === 'lr' || rankDir === 'rl') { - swapXY(g); - swapWidthHeight(g); - } -} - -function swapWidthHeight(g) { - forEach/* default */.A(g.nodes(), function (v) { - swapWidthHeightOne(g.node(v)); - }); - forEach/* default */.A(g.edges(), function (e) { - swapWidthHeightOne(g.edge(e)); - }); -} - -function swapWidthHeightOne(attrs) { - var w = attrs.width; - attrs.width = attrs.height; - attrs.height = w; -} - -function reverseY(g) { - forEach/* default */.A(g.nodes(), function (v) { - reverseYOne(g.node(v)); - }); - - forEach/* default */.A(g.edges(), function (e) { - var edge = g.edge(e); - forEach/* default */.A(edge.points, reverseYOne); - if (has/* default */.A(edge, 'y')) { - reverseYOne(edge); - } - }); -} - -function reverseYOne(attrs) { - attrs.y = -attrs.y; -} - -function swapXY(g) { - forEach/* default */.A(g.nodes(), function (v) { - swapXYOne(g.node(v)); - }); - - forEach/* default */.A(g.edges(), function (e) { - var edge = g.edge(e); - forEach/* default */.A(edge.points, swapXYOne); - if (has/* default */.A(edge, 'x')) { - swapXYOne(edge); - } - }); -} - -function swapXYOne(attrs) { - var x = attrs.x; - attrs.x = attrs.y; - attrs.y = x; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/normalize.js - - - - - -/* - * Breaks any long edges in the graph into short segments that span 1 layer - * each. This operation is undoable with the denormalize function. - * - * Pre-conditions: - * - * 1. The input graph is a DAG. - * 2. Each node in the graph has a "rank" property. - * - * Post-condition: - * - * 1. All edges in the graph have a length of 1. - * 2. Dummy nodes are added where edges have been split into segments. - * 3. The graph is augmented with a "dummyChains" attribute which contains - * the first dummy in each chain of dummy nodes produced. - */ -function normalize_run(g) { - g.graph().dummyChains = []; - forEach/* default */.A(g.edges(), function (edge) { - normalizeEdge(g, edge); - }); -} - -function normalizeEdge(g, e) { - var v = e.v; - var vRank = g.node(v).rank; - var w = e.w; - var wRank = g.node(w).rank; - var name = e.name; - var edgeLabel = g.edge(e); - var labelRank = edgeLabel.labelRank; - - if (wRank === vRank + 1) return; - - g.removeEdge(e); - - var dummy, attrs, i; - for (i = 0, ++vRank; vRank < wRank; ++i, ++vRank) { - edgeLabel.points = []; - attrs = { - width: 0, - height: 0, - edgeLabel: edgeLabel, - edgeObj: e, - rank: vRank, - }; - dummy = addDummyNode(g, 'edge', attrs, '_d'); - if (vRank === labelRank) { - attrs.width = edgeLabel.width; - attrs.height = edgeLabel.height; - // @ts-expect-error - attrs.dummy = 'edge-label'; - // @ts-expect-error - attrs.labelpos = edgeLabel.labelpos; - } - g.setEdge(v, dummy, { weight: edgeLabel.weight }, name); - if (i === 0) { - g.graph().dummyChains.push(dummy); - } - v = dummy; - } - - g.setEdge(v, w, { weight: edgeLabel.weight }, name); -} - -function normalize_undo(g) { - forEach/* default */.A(g.graph().dummyChains, function (v) { - var node = g.node(v); - var origLabel = node.edgeLabel; - var w; - g.setEdge(node.edgeObj, origLabel); - while (node.dummy) { - w = g.successors(v)[0]; - g.removeNode(v); - origLabel.points.push({ x: node.x, y: node.y }); - if (node.dummy === 'edge-label') { - origLabel.x = node.x; - origLabel.y = node.y; - origLabel.width = node.width; - origLabel.height = node.height; - } - v = w; - node = g.node(v); - } - }); -} - -;// CONCATENATED MODULE: ./node_modules/lodash-es/minBy.js - - - - -/** - * This method is like `_.min` except that it accepts `iteratee` which is - * invoked for each element in `array` to generate the criterion by which - * the value is ranked. The iteratee is invoked with one argument: (value). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Math - * @param {Array} array The array to iterate over. - * @param {Function} [iteratee=_.identity] The iteratee invoked per element. - * @returns {*} Returns the minimum value. - * @example - * - * var objects = [{ 'n': 1 }, { 'n': 2 }]; - * - * _.minBy(objects, function(o) { return o.n; }); - * // => { 'n': 1 } - * - * // The `_.property` iteratee shorthand. - * _.minBy(objects, 'n'); - * // => { 'n': 1 } - */ -function minBy(array, iteratee) { - return (array && array.length) - ? _baseExtremum(array, (0,_baseIteratee/* default */.A)(iteratee, 2), _baseLt) - : undefined; -} - -/* harmony default export */ const lodash_es_minBy = (minBy); - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/rank/util.js - - - - -/* - * Initializes ranks for the input graph using the longest path algorithm. This - * algorithm scales well and is fast in practice, it yields rather poor - * solutions. Nodes are pushed to the lowest layer possible, leaving the bottom - * ranks wide and leaving edges longer than necessary. However, due to its - * speed, this algorithm is good for getting an initial ranking that can be fed - * into other algorithms. - * - * This algorithm does not normalize layers because it will be used by other - * algorithms in most cases. If using this algorithm directly, be sure to - * run normalize at the end. - * - * Pre-conditions: - * - * 1. Input graph is a DAG. - * 2. Input graph node labels can be assigned properties. - * - * Post-conditions: - * - * 1. Each node will be assign an (unnormalized) "rank" property. - */ -function longestPath(g) { - var visited = {}; - - function dfs(v) { - var label = g.node(v); - if (has/* default */.A(visited, v)) { - return label.rank; - } - visited[v] = true; - - var rank = lodash_es_min( - map/* default */.A(g.outEdges(v), function (e) { - return dfs(e.w) - g.edge(e).minlen; - }) - ); - - if ( - rank === Number.POSITIVE_INFINITY || // return value of _.map([]) for Lodash 3 - rank === undefined || // return value of _.map([]) for Lodash 4 - rank === null - ) { - // return value of _.map([null]) - rank = 0; - } - - return (label.rank = rank); - } - - forEach/* default */.A(g.sources(), dfs); -} - -/* - * Returns the amount of slack for the given edge. The slack is defined as the - * difference between the length of the edge and its minimum length. - */ -function slack(g, e) { - return g.node(e.w).rank - g.node(e.v).rank - g.edge(e).minlen; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/rank/feasible-tree.js - - - - - - -/* - * Constructs a spanning tree with tight edges and adjusted the input node's - * ranks to achieve this. A tight edge is one that is has a length that matches - * its "minlen" attribute. - * - * The basic structure for this function is derived from Gansner, et al., "A - * Technique for Drawing Directed Graphs." - * - * Pre-conditions: - * - * 1. Graph must be a DAG. - * 2. Graph must be connected. - * 3. Graph must have at least one node. - * 5. Graph nodes must have been previously assigned a "rank" property that - * respects the "minlen" property of incident edges. - * 6. Graph edges must have a "minlen" property. - * - * Post-conditions: - * - * - Graph nodes will have their rank adjusted to ensure that all edges are - * tight. - * - * Returns a tree (undirected graph) that is constructed using only "tight" - * edges. - */ -function feasibleTree(g) { - var t = new graphlib/* Graph */.T({ directed: false }); - - // Choose arbitrary node from which to start our tree - var start = g.nodes()[0]; - var size = g.nodeCount(); - t.setNode(start, {}); - - var edge, delta; - while (tightTree(t, g) < size) { - edge = findMinSlackEdge(t, g); - delta = t.hasNode(edge.v) ? slack(g, edge) : -slack(g, edge); - shiftRanks(t, g, delta); - } - - return t; -} - -/* - * Finds a maximal tree of tight edges and returns the number of nodes in the - * tree. - */ -function tightTree(t, g) { - function dfs(v) { - forEach/* default */.A(g.nodeEdges(v), function (e) { - var edgeV = e.v, - w = v === edgeV ? e.w : edgeV; - if (!t.hasNode(w) && !slack(g, e)) { - t.setNode(w, {}); - t.setEdge(v, w, {}); - dfs(w); - } - }); - } - - forEach/* default */.A(t.nodes(), dfs); - return t.nodeCount(); -} - -/* - * Finds the edge with the smallest slack that is incident on tree and returns - * it. - */ -function findMinSlackEdge(t, g) { - return lodash_es_minBy(g.edges(), function (e) { - if (t.hasNode(e.v) !== t.hasNode(e.w)) { - return slack(g, e); - } - }); -} - -function shiftRanks(t, g, delta) { - forEach/* default */.A(t.nodes(), function (v) { - g.node(v).rank += delta; - }); -} - -// EXTERNAL MODULE: ./node_modules/lodash-es/isArrayLike.js -var isArrayLike = __webpack_require__(38446); -// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js -var keys = __webpack_require__(27422); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_createFind.js - - - - -/** - * Creates a `_.find` or `_.findLast` function. - * - * @private - * @param {Function} findIndexFunc The function to find the collection index. - * @returns {Function} Returns the new find function. - */ -function createFind(findIndexFunc) { - return function(collection, predicate, fromIndex) { - var iterable = Object(collection); - if (!(0,isArrayLike/* default */.A)(collection)) { - var iteratee = (0,_baseIteratee/* default */.A)(predicate, 3); - collection = (0,keys/* default */.A)(collection); - predicate = function(key) { return iteratee(iterable[key], key, iterable); }; - } - var index = findIndexFunc(collection, predicate, fromIndex); - return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined; - }; -} - -/* harmony default export */ const _createFind = (createFind); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFindIndex.js -var _baseFindIndex = __webpack_require__(25707); -// EXTERNAL MODULE: ./node_modules/lodash-es/toFinite.js + 3 modules -var toFinite = __webpack_require__(74342); -;// CONCATENATED MODULE: ./node_modules/lodash-es/toInteger.js - - -/** - * Converts `value` to an integer. - * - * **Note:** This method is loosely based on - * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {number} Returns the converted integer. - * @example - * - * _.toInteger(3.2); - * // => 3 - * - * _.toInteger(Number.MIN_VALUE); - * // => 0 - * - * _.toInteger(Infinity); - * // => 1.7976931348623157e+308 - * - * _.toInteger('3.2'); - * // => 3 - */ -function toInteger(value) { - var result = (0,toFinite/* default */.A)(value), - remainder = result % 1; - - return result === result ? (remainder ? result - remainder : result) : 0; -} - -/* harmony default export */ const lodash_es_toInteger = (toInteger); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/findIndex.js - - - - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max; - -/** - * This method is like `_.find` except that it returns the index of the first - * element `predicate` returns truthy for instead of the element itself. - * - * @static - * @memberOf _ - * @since 1.1.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @param {number} [fromIndex=0] The index to search from. - * @returns {number} Returns the index of the found element, else `-1`. - * @example - * - * var users = [ - * { 'user': 'barney', 'active': false }, - * { 'user': 'fred', 'active': false }, - * { 'user': 'pebbles', 'active': true } - * ]; - * - * _.findIndex(users, function(o) { return o.user == 'barney'; }); - * // => 0 - * - * // The `_.matches` iteratee shorthand. - * _.findIndex(users, { 'user': 'fred', 'active': false }); - * // => 1 - * - * // The `_.matchesProperty` iteratee shorthand. - * _.findIndex(users, ['active', false]); - * // => 0 - * - * // The `_.property` iteratee shorthand. - * _.findIndex(users, 'active'); - * // => 2 - */ -function findIndex(array, predicate, fromIndex) { - var length = array == null ? 0 : array.length; - if (!length) { - return -1; - } - var index = fromIndex == null ? 0 : lodash_es_toInteger(fromIndex); - if (index < 0) { - index = nativeMax(length + index, 0); - } - return (0,_baseFindIndex/* default */.A)(array, (0,_baseIteratee/* default */.A)(predicate, 3), index); -} - -/* harmony default export */ const lodash_es_findIndex = (findIndex); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/find.js - - - -/** - * Iterates over elements of `collection`, returning the first element - * `predicate` returns truthy for. The predicate is invoked with three - * arguments: (value, index|key, collection). - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to inspect. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @param {number} [fromIndex=0] The index to search from. - * @returns {*} Returns the matched element, else `undefined`. - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': true }, - * { 'user': 'fred', 'age': 40, 'active': false }, - * { 'user': 'pebbles', 'age': 1, 'active': true } - * ]; - * - * _.find(users, function(o) { return o.age < 40; }); - * // => object for 'barney' - * - * // The `_.matches` iteratee shorthand. - * _.find(users, { 'age': 1, 'active': true }); - * // => object for 'pebbles' - * - * // The `_.matchesProperty` iteratee shorthand. - * _.find(users, ['active', false]); - * // => object for 'fred' - * - * // The `_.property` iteratee shorthand. - * _.find(users, 'active'); - * // => object for 'barney' - */ -var find = _createFind(lodash_es_findIndex); - -/* harmony default export */ const lodash_es_find = (find); - -// EXTERNAL MODULE: ./node_modules/lodash-es/filter.js + 1 modules -var filter = __webpack_require__(11662); -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/dijkstra.js - - - - - -var DEFAULT_WEIGHT_FUNC = constant/* default */.A(1); - -function dijkstra_dijkstra(g, source, weightFn, edgeFn) { - return runDijkstra( - g, - String(source), - weightFn || DEFAULT_WEIGHT_FUNC, - edgeFn || - function (v) { - return g.outEdges(v); - } - ); -} - -function runDijkstra(g, source, weightFn, edgeFn) { - var results = {}; - var pq = new PriorityQueue(); - var v, vEntry; - - var updateNeighbors = function (edge) { - var w = edge.v !== v ? edge.v : edge.w; - var wEntry = results[w]; - var weight = weightFn(edge); - var distance = vEntry.distance + weight; - - if (weight < 0) { - throw new Error( - 'dijkstra does not allow negative edge weights. ' + - 'Bad edge: ' + - edge + - ' Weight: ' + - weight - ); - } - - if (distance < wEntry.distance) { - wEntry.distance = distance; - wEntry.predecessor = v; - pq.decrease(w, distance); - } - }; - - g.nodes().forEach(function (v) { - var distance = v === source ? 0 : Number.POSITIVE_INFINITY; - results[v] = { distance: distance }; - pq.add(v, distance); - }); - - while (pq.size() > 0) { - v = pq.removeMin(); - vEntry = results[v]; - if (vEntry.distance === Number.POSITIVE_INFINITY) { - break; - } - - edgeFn(v).forEach(updateNeighbors); - } - - return results; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/dijkstra-all.js - - - - - -function dijkstraAll(g, weightFunc, edgeFunc) { - return _.transform( - g.nodes(), - function (acc, v) { - acc[v] = dijkstra(g, v, weightFunc, edgeFunc); - }, - {} - ); -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/floyd-warshall.js - - - - -var floyd_warshall_DEFAULT_WEIGHT_FUNC = constant/* default */.A(1); - -function floydWarshall(g, weightFn, edgeFn) { - return runFloydWarshall( - g, - weightFn || floyd_warshall_DEFAULT_WEIGHT_FUNC, - edgeFn || - function (v) { - return g.outEdges(v); - } - ); -} - -function runFloydWarshall(g, weightFn, edgeFn) { - var results = {}; - var nodes = g.nodes(); - - nodes.forEach(function (v) { - results[v] = {}; - results[v][v] = { distance: 0 }; - nodes.forEach(function (w) { - if (v !== w) { - results[v][w] = { distance: Number.POSITIVE_INFINITY }; - } - }); - edgeFn(v).forEach(function (edge) { - var w = edge.v === v ? edge.w : edge.v; - var d = weightFn(edge); - results[v][w] = { distance: d, predecessor: v }; - }); - }); - - nodes.forEach(function (k) { - var rowK = results[k]; - nodes.forEach(function (i) { - var rowI = results[i]; - nodes.forEach(function (j) { - var ik = rowI[k]; - var kj = rowK[j]; - var ij = rowI[j]; - var altDistance = ik.distance + kj.distance; - if (altDistance < ij.distance) { - ij.distance = altDistance; - ij.predecessor = kj.predecessor; - } - }); - }); - }); - - return results; -} - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseKeys.js + 1 modules -var _baseKeys = __webpack_require__(69471); -// EXTERNAL MODULE: ./node_modules/lodash-es/_getTag.js + 3 modules -var _getTag = __webpack_require__(9779); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGetTag.js + 2 modules -var _baseGetTag = __webpack_require__(88496); -// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js -var isArray = __webpack_require__(92049); -// EXTERNAL MODULE: ./node_modules/lodash-es/isObjectLike.js -var isObjectLike = __webpack_require__(53098); -;// CONCATENATED MODULE: ./node_modules/lodash-es/isString.js - - - - -/** `Object#toString` result references. */ -var stringTag = '[object String]'; - -/** - * Checks if `value` is classified as a `String` primitive or object. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a string, else `false`. - * @example - * - * _.isString('abc'); - * // => true - * - * _.isString(1); - * // => false - */ -function isString(value) { - return typeof value == 'string' || - (!(0,isArray/* default */.A)(value) && (0,isObjectLike/* default */.A)(value) && (0,_baseGetTag/* default */.A)(value) == stringTag); -} - -/* harmony default export */ const lodash_es_isString = (isString); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseProperty.js -var _baseProperty = __webpack_require__(70805); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_asciiSize.js - - -/** - * Gets the size of an ASCII `string`. - * - * @private - * @param {string} string The string inspect. - * @returns {number} Returns the string size. - */ -var asciiSize = (0,_baseProperty/* default */.A)('length'); - -/* harmony default export */ const _asciiSize = (asciiSize); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_hasUnicode.js -/** Used to compose unicode character classes. */ -var rsAstralRange = '\\ud800-\\udfff', - rsComboMarksRange = '\\u0300-\\u036f', - reComboHalfMarksRange = '\\ufe20-\\ufe2f', - rsComboSymbolsRange = '\\u20d0-\\u20ff', - rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, - rsVarRange = '\\ufe0e\\ufe0f'; - -/** Used to compose unicode capture groups. */ -var rsZWJ = '\\u200d'; - -/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ -var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']'); - -/** - * Checks if `string` contains Unicode symbols. - * - * @private - * @param {string} string The string to inspect. - * @returns {boolean} Returns `true` if a symbol is found, else `false`. - */ -function hasUnicode(string) { - return reHasUnicode.test(string); -} - -/* harmony default export */ const _hasUnicode = (hasUnicode); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_unicodeSize.js -/** Used to compose unicode character classes. */ -var _unicodeSize_rsAstralRange = '\\ud800-\\udfff', - _unicodeSize_rsComboMarksRange = '\\u0300-\\u036f', - _unicodeSize_reComboHalfMarksRange = '\\ufe20-\\ufe2f', - _unicodeSize_rsComboSymbolsRange = '\\u20d0-\\u20ff', - _unicodeSize_rsComboRange = _unicodeSize_rsComboMarksRange + _unicodeSize_reComboHalfMarksRange + _unicodeSize_rsComboSymbolsRange, - _unicodeSize_rsVarRange = '\\ufe0e\\ufe0f'; - -/** Used to compose unicode capture groups. */ -var rsAstral = '[' + _unicodeSize_rsAstralRange + ']', - rsCombo = '[' + _unicodeSize_rsComboRange + ']', - rsFitz = '\\ud83c[\\udffb-\\udfff]', - rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', - rsNonAstral = '[^' + _unicodeSize_rsAstralRange + ']', - rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', - rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', - _unicodeSize_rsZWJ = '\\u200d'; - -/** Used to compose unicode regexes. */ -var reOptMod = rsModifier + '?', - rsOptVar = '[' + _unicodeSize_rsVarRange + ']?', - rsOptJoin = '(?:' + _unicodeSize_rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', - rsSeq = rsOptVar + reOptMod + rsOptJoin, - rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; - -/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ -var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); - -/** - * Gets the size of a Unicode `string`. - * - * @private - * @param {string} string The string inspect. - * @returns {number} Returns the string size. - */ -function unicodeSize(string) { - var result = reUnicode.lastIndex = 0; - while (reUnicode.test(string)) { - ++result; - } - return result; -} - -/* harmony default export */ const _unicodeSize = (unicodeSize); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_stringSize.js - - - - -/** - * Gets the number of symbols in `string`. - * - * @private - * @param {string} string The string to inspect. - * @returns {number} Returns the string size. - */ -function stringSize(string) { - return _hasUnicode(string) - ? _unicodeSize(string) - : _asciiSize(string); -} - -/* harmony default export */ const _stringSize = (stringSize); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/size.js - - - - - - -/** `Object#toString` result references. */ -var mapTag = '[object Map]', - setTag = '[object Set]'; - -/** - * Gets the size of `collection` by returning its length for array-like - * values or the number of own enumerable string keyed properties for objects. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object|string} collection The collection to inspect. - * @returns {number} Returns the collection size. - * @example - * - * _.size([1, 2, 3]); - * // => 3 - * - * _.size({ 'a': 1, 'b': 2 }); - * // => 2 - * - * _.size('pebbles'); - * // => 7 - */ -function size(collection) { - if (collection == null) { - return 0; - } - if ((0,isArrayLike/* default */.A)(collection)) { - return lodash_es_isString(collection) ? _stringSize(collection) : collection.length; - } - var tag = (0,_getTag/* default */.A)(collection); - if (tag == mapTag || tag == setTag) { - return collection.size; - } - return (0,_baseKeys/* default */.A)(collection).length; -} - -/* harmony default export */ const lodash_es_size = (size); - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/topsort.js - - - - -topsort_topsort.CycleException = topsort_CycleException; - -function topsort_topsort(g) { - var visited = {}; - var stack = {}; - var results = []; - - function visit(node) { - if (has/* default */.A(stack, node)) { - throw new topsort_CycleException(); - } - - if (!has/* default */.A(visited, node)) { - stack[node] = true; - visited[node] = true; - forEach/* default */.A(g.predecessors(node), visit); - delete stack[node]; - results.push(node); - } - } - - forEach/* default */.A(g.sinks(), visit); - - if (lodash_es_size(visited) !== g.nodeCount()) { - throw new topsort_CycleException(); - } - - return results; -} - -function topsort_CycleException() {} -topsort_CycleException.prototype = new Error(); // must be an instance of Error to pass testing - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/is-acyclic.js - - - - -function isAcyclic(g) { - try { - topsort(g); - } catch (e) { - if (e instanceof CycleException) { - return false; - } - throw e; - } - return true; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/dfs.js - - - - -/* - * A helper that preforms a pre- or post-order traversal on the input graph - * and returns the nodes in the order they were visited. If the graph is - * undirected then this algorithm will navigate using neighbors. If the graph - * is directed then this algorithm will navigate using successors. - * - * Order must be one of "pre" or "post". - */ -function dfs(g, vs, order) { - if (!isArray/* default */.A(vs)) { - vs = [vs]; - } - - var navigation = (g.isDirected() ? g.successors : g.neighbors).bind(g); - - var acc = []; - var visited = {}; - forEach/* default */.A(vs, function (v) { - if (!g.hasNode(v)) { - throw new Error('Graph does not have node: ' + v); - } - - doDfs(g, v, order === 'post', visited, navigation, acc); - }); - return acc; -} - -function doDfs(g, v, postorder, visited, navigation, acc) { - if (!has/* default */.A(visited, v)) { - visited[v] = true; - - if (!postorder) { - acc.push(v); - } - forEach/* default */.A(navigation(v), function (w) { - doDfs(g, w, postorder, visited, navigation, acc); - }); - if (postorder) { - acc.push(v); - } - } -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/postorder.js - - - - -function postorder(g, vs) { - return dfs(g, vs, 'post'); -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/preorder.js - - - - -function preorder(g, vs) { - return dfs(g, vs, 'pre'); -} - -// EXTERNAL MODULE: ./node_modules/dagre-d3-es/src/graphlib/graph.js + 9 modules -var graph = __webpack_require__(73046); -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/prim.js - - - - - - -function prim(g, weightFunc) { - var result = new Graph(); - var parents = {}; - var pq = new PriorityQueue(); - var v; - - function updateNeighbors(edge) { - var w = edge.v === v ? edge.w : edge.v; - var pri = pq.priority(w); - if (pri !== undefined) { - var edgeWeight = weightFunc(edge); - if (edgeWeight < pri) { - parents[w] = v; - pq.decrease(w, edgeWeight); - } - } - } - - if (g.nodeCount() === 0) { - return result; - } - - _.each(g.nodes(), function (v) { - pq.add(v, Number.POSITIVE_INFINITY); - result.setNode(v); - }); - - // Start from an arbitrary node - pq.decrease(g.nodes()[0], 0); - - var init = false; - while (pq.size() > 0) { - v = pq.removeMin(); - if (_.has(parents, v)) { - result.setEdge(v, parents[v]); - } else if (init) { - throw new Error('Input graph is not connected: ' + g); - } else { - init = true; - } - - g.nodeEdges(v).forEach(updateNeighbors); - } - - return result; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/index.js - - - - - - - - - - - - - - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/rank/network-simplex.js - - - - - - - - -// Expose some internals for testing purposes -networkSimplex.initLowLimValues = initLowLimValues; -networkSimplex.initCutValues = initCutValues; -networkSimplex.calcCutValue = calcCutValue; -networkSimplex.leaveEdge = leaveEdge; -networkSimplex.enterEdge = enterEdge; -networkSimplex.exchangeEdges = exchangeEdges; - -/* - * The network simplex algorithm assigns ranks to each node in the input graph - * and iteratively improves the ranking to reduce the length of edges. - * - * Preconditions: - * - * 1. The input graph must be a DAG. - * 2. All nodes in the graph must have an object value. - * 3. All edges in the graph must have "minlen" and "weight" attributes. - * - * Postconditions: - * - * 1. All nodes in the graph will have an assigned "rank" attribute that has - * been optimized by the network simplex algorithm. Ranks start at 0. - * - * - * A rough sketch of the algorithm is as follows: - * - * 1. Assign initial ranks to each node. We use the longest path algorithm, - * which assigns ranks to the lowest position possible. In general this - * leads to very wide bottom ranks and unnecessarily long edges. - * 2. Construct a feasible tight tree. A tight tree is one such that all - * edges in the tree have no slack (difference between length of edge - * and minlen for the edge). This by itself greatly improves the assigned - * rankings by shorting edges. - * 3. Iteratively find edges that have negative cut values. Generally a - * negative cut value indicates that the edge could be removed and a new - * tree edge could be added to produce a more compact graph. - * - * Much of the algorithms here are derived from Gansner, et al., "A Technique - * for Drawing Directed Graphs." The structure of the file roughly follows the - * structure of the overall algorithm. - */ -function networkSimplex(g) { - g = simplify(g); - longestPath(g); - var t = feasibleTree(g); - initLowLimValues(t); - initCutValues(t, g); - - var e, f; - while ((e = leaveEdge(t))) { - f = enterEdge(t, g, e); - exchangeEdges(t, g, e, f); - } -} - -/* - * Initializes cut values for all edges in the tree. - */ -function initCutValues(t, g) { - var vs = postorder(t, t.nodes()); - vs = vs.slice(0, vs.length - 1); - forEach/* default */.A(vs, function (v) { - assignCutValue(t, g, v); - }); -} - -function assignCutValue(t, g, child) { - var childLab = t.node(child); - var parent = childLab.parent; - t.edge(child, parent).cutvalue = calcCutValue(t, g, child); -} - -/* - * Given the tight tree, its graph, and a child in the graph calculate and - * return the cut value for the edge between the child and its parent. - */ -function calcCutValue(t, g, child) { - var childLab = t.node(child); - var parent = childLab.parent; - // True if the child is on the tail end of the edge in the directed graph - var childIsTail = true; - // The graph's view of the tree edge we're inspecting - var graphEdge = g.edge(child, parent); - // The accumulated cut value for the edge between this node and its parent - var cutValue = 0; - - if (!graphEdge) { - childIsTail = false; - graphEdge = g.edge(parent, child); - } - - cutValue = graphEdge.weight; - - forEach/* default */.A(g.nodeEdges(child), function (e) { - var isOutEdge = e.v === child, - other = isOutEdge ? e.w : e.v; - - if (other !== parent) { - var pointsToHead = isOutEdge === childIsTail, - otherWeight = g.edge(e).weight; - - cutValue += pointsToHead ? otherWeight : -otherWeight; - if (isTreeEdge(t, child, other)) { - var otherCutValue = t.edge(child, other).cutvalue; - cutValue += pointsToHead ? -otherCutValue : otherCutValue; - } - } - }); - - return cutValue; -} - -function initLowLimValues(tree, root) { - if (arguments.length < 2) { - root = tree.nodes()[0]; - } - dfsAssignLowLim(tree, {}, 1, root); -} - -function dfsAssignLowLim(tree, visited, nextLim, v, parent) { - var low = nextLim; - var label = tree.node(v); - - visited[v] = true; - forEach/* default */.A(tree.neighbors(v), function (w) { - if (!has/* default */.A(visited, w)) { - nextLim = dfsAssignLowLim(tree, visited, nextLim, w, v); - } - }); - - label.low = low; - label.lim = nextLim++; - if (parent) { - label.parent = parent; - } else { - // TODO should be able to remove this when we incrementally update low lim - delete label.parent; - } - - return nextLim; -} - -function leaveEdge(tree) { - return lodash_es_find(tree.edges(), function (e) { - return tree.edge(e).cutvalue < 0; - }); -} - -function enterEdge(t, g, edge) { - var v = edge.v; - var w = edge.w; - - // For the rest of this function we assume that v is the tail and w is the - // head, so if we don't have this edge in the graph we should flip it to - // match the correct orientation. - if (!g.hasEdge(v, w)) { - v = edge.w; - w = edge.v; - } - - var vLabel = t.node(v); - var wLabel = t.node(w); - var tailLabel = vLabel; - var flip = false; - - // If the root is in the tail of the edge then we need to flip the logic that - // checks for the head and tail nodes in the candidates function below. - if (vLabel.lim > wLabel.lim) { - tailLabel = wLabel; - flip = true; - } - - var candidates = filter/* default */.A(g.edges(), function (edge) { - return ( - flip === isDescendant(t, t.node(edge.v), tailLabel) && - flip !== isDescendant(t, t.node(edge.w), tailLabel) - ); - }); - - return lodash_es_minBy(candidates, function (edge) { - return slack(g, edge); - }); -} - -function exchangeEdges(t, g, e, f) { - var v = e.v; - var w = e.w; - t.removeEdge(v, w); - t.setEdge(f.v, f.w, {}); - initLowLimValues(t); - initCutValues(t, g); - updateRanks(t, g); -} - -function updateRanks(t, g) { - var root = lodash_es_find(t.nodes(), function (v) { - return !g.node(v).parent; - }); - var vs = preorder(t, root); - vs = vs.slice(1); - forEach/* default */.A(vs, function (v) { - var parent = t.node(v).parent, - edge = g.edge(v, parent), - flipped = false; - - if (!edge) { - edge = g.edge(parent, v); - flipped = true; - } - - g.node(v).rank = g.node(parent).rank + (flipped ? edge.minlen : -edge.minlen); - }); -} - -/* - * Returns true if the edge is in the tree. - */ -function isTreeEdge(tree, u, v) { - return tree.hasEdge(u, v); -} - -/* - * Returns true if the specified node is descendant of the root node per the - * assigned low and lim attributes in the tree. - */ -function isDescendant(tree, vLabel, rootLabel) { - return rootLabel.low <= vLabel.lim && vLabel.lim <= rootLabel.lim; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/rank/index.js - - - - - - -/* - * Assigns a rank to each node in the input graph that respects the "minlen" - * constraint specified on edges between nodes. - * - * This basic structure is derived from Gansner, et al., "A Technique for - * Drawing Directed Graphs." - * - * Pre-conditions: - * - * 1. Graph must be a connected DAG - * 2. Graph nodes must be objects - * 3. Graph edges must have "weight" and "minlen" attributes - * - * Post-conditions: - * - * 1. Graph nodes will have a "rank" attribute based on the results of the - * algorithm. Ranks can start at any index (including negative), we'll - * fix them up later. - */ -function rank(g) { - switch (g.graph().ranker) { - case 'network-simplex': - networkSimplexRanker(g); - break; - case 'tight-tree': - tightTreeRanker(g); - break; - case 'longest-path': - longestPathRanker(g); - break; - default: - networkSimplexRanker(g); - } -} - -// A fast and simple ranker, but results are far from optimal. -var longestPathRanker = longestPath; - -function tightTreeRanker(g) { - longestPath(g); - feasibleTree(g); -} - -function networkSimplexRanker(g) { - networkSimplex(g); -} - -// EXTERNAL MODULE: ./node_modules/lodash-es/values.js + 1 modules -var values = __webpack_require__(38207); -// EXTERNAL MODULE: ./node_modules/lodash-es/reduce.js + 2 modules -var reduce = __webpack_require__(89463); -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/nesting-graph.js - - - - - -/* - * A nesting graph creates dummy nodes for the tops and bottoms of subgraphs, - * adds appropriate edges to ensure that all cluster nodes are placed between - * these boundries, and ensures that the graph is connected. - * - * In addition we ensure, through the use of the minlen property, that nodes - * and subgraph border nodes to not end up on the same rank. - * - * Preconditions: - * - * 1. Input graph is a DAG - * 2. Nodes in the input graph has a minlen attribute - * - * Postconditions: - * - * 1. Input graph is connected. - * 2. Dummy nodes are added for the tops and bottoms of subgraphs. - * 3. The minlen attribute for nodes is adjusted to ensure nodes do not - * get placed on the same rank as subgraph border nodes. - * - * The nesting graph idea comes from Sander, "Layout of Compound Directed - * Graphs." - */ -function nesting_graph_run(g) { - var root = addDummyNode(g, 'root', {}, '_root'); - var depths = treeDepths(g); - var height = lodash_es_max(values/* default */.A(depths)) - 1; // Note: depths is an Object not an array - var nodeSep = 2 * height + 1; - - g.graph().nestingRoot = root; - - // Multiply minlen by nodeSep to align nodes on non-border ranks. - forEach/* default */.A(g.edges(), function (e) { - g.edge(e).minlen *= nodeSep; - }); - - // Calculate a weight that is sufficient to keep subgraphs vertically compact - var weight = sumWeights(g) + 1; - - // Create border nodes and link them up - forEach/* default */.A(g.children(), function (child) { - nesting_graph_dfs(g, root, nodeSep, weight, height, depths, child); - }); - - // Save the multiplier for node layers for later removal of empty border - // layers. - g.graph().nodeRankFactor = nodeSep; -} - -function nesting_graph_dfs(g, root, nodeSep, weight, height, depths, v) { - var children = g.children(v); - if (!children.length) { - if (v !== root) { - g.setEdge(root, v, { weight: 0, minlen: nodeSep }); - } - return; - } - - var top = addBorderNode(g, '_bt'); - var bottom = addBorderNode(g, '_bb'); - var label = g.node(v); - - g.setParent(top, v); - label.borderTop = top; - g.setParent(bottom, v); - label.borderBottom = bottom; - - forEach/* default */.A(children, function (child) { - nesting_graph_dfs(g, root, nodeSep, weight, height, depths, child); - - var childNode = g.node(child); - var childTop = childNode.borderTop ? childNode.borderTop : child; - var childBottom = childNode.borderBottom ? childNode.borderBottom : child; - var thisWeight = childNode.borderTop ? weight : 2 * weight; - var minlen = childTop !== childBottom ? 1 : height - depths[v] + 1; - - g.setEdge(top, childTop, { - weight: thisWeight, - minlen: minlen, - nestingEdge: true, - }); - - g.setEdge(childBottom, bottom, { - weight: thisWeight, - minlen: minlen, - nestingEdge: true, - }); - }); - - if (!g.parent(v)) { - g.setEdge(root, top, { weight: 0, minlen: height + depths[v] }); - } -} - -function treeDepths(g) { - var depths = {}; - function dfs(v, depth) { - var children = g.children(v); - if (children && children.length) { - forEach/* default */.A(children, function (child) { - dfs(child, depth + 1); - }); - } - depths[v] = depth; - } - forEach/* default */.A(g.children(), function (v) { - dfs(v, 1); - }); - return depths; -} - -function sumWeights(g) { - return reduce/* default */.A( - g.edges(), - function (acc, e) { - return acc + g.edge(e).weight; - }, - 0 - ); -} - -function cleanup(g) { - var graphLabel = g.graph(); - g.removeNode(graphLabel.nestingRoot); - delete graphLabel.nestingRoot; - forEach/* default */.A(g.edges(), function (e) { - var edge = g.edge(e); - if (edge.nestingEdge) { - g.removeEdge(e); - } - }); -} - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseClone.js + 15 modules -var _baseClone = __webpack_require__(91641); -;// CONCATENATED MODULE: ./node_modules/lodash-es/cloneDeep.js - - -/** Used to compose bitmasks for cloning. */ -var CLONE_DEEP_FLAG = 1, - CLONE_SYMBOLS_FLAG = 4; - -/** - * This method is like `_.clone` except that it recursively clones `value`. - * - * @static - * @memberOf _ - * @since 1.0.0 - * @category Lang - * @param {*} value The value to recursively clone. - * @returns {*} Returns the deep cloned value. - * @see _.clone - * @example - * - * var objects = [{ 'a': 1 }, { 'b': 2 }]; - * - * var deep = _.cloneDeep(objects); - * console.log(deep[0] === objects[0]); - * // => false - */ -function cloneDeep(value) { - return (0,_baseClone/* default */.A)(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); -} - -/* harmony default export */ const lodash_es_cloneDeep = (cloneDeep); - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/add-subgraph-constraints.js - - - - -function addSubgraphConstraints(g, cg, vs) { - var prev = {}, - rootPrev; - - forEach/* default */.A(vs, function (v) { - var child = g.parent(v), - parent, - prevChild; - while (child) { - parent = g.parent(child); - if (parent) { - prevChild = prev[parent]; - prev[parent] = child; - } else { - prevChild = rootPrev; - rootPrev = child; - } - if (prevChild && prevChild !== child) { - cg.setEdge(prevChild, child); - return; - } - child = parent; - } - }); - - /* - function dfs(v) { - var children = v ? g.children(v) : g.children(); - if (children.length) { - var min = Number.POSITIVE_INFINITY, - subgraphs = []; - _.each(children, function(child) { - var childMin = dfs(child); - if (g.children(child).length) { - subgraphs.push({ v: child, order: childMin }); - } - min = Math.min(min, childMin); - }); - _.reduce(_.sortBy(subgraphs, "order"), function(prev, curr) { - cg.setEdge(prev.v, curr.v); - return curr; - }); - return min; - } - return g.node(v).order; - } - dfs(undefined); - */ -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/build-layer-graph.js - - - - - -/* - * Constructs a graph that can be used to sort a layer of nodes. The graph will - * contain all base and subgraph nodes from the request layer in their original - * hierarchy and any edges that are incident on these nodes and are of the type - * requested by the "relationship" parameter. - * - * Nodes from the requested rank that do not have parents are assigned a root - * node in the output graph, which is set in the root graph attribute. This - * makes it easy to walk the hierarchy of movable nodes during ordering. - * - * Pre-conditions: - * - * 1. Input graph is a DAG - * 2. Base nodes in the input graph have a rank attribute - * 3. Subgraph nodes in the input graph has minRank and maxRank attributes - * 4. Edges have an assigned weight - * - * Post-conditions: - * - * 1. Output graph has all nodes in the movable rank with preserved - * hierarchy. - * 2. Root nodes in the movable layer are made children of the node - * indicated by the root attribute of the graph. - * 3. Non-movable nodes incident on movable nodes, selected by the - * relationship parameter, are included in the graph (without hierarchy). - * 4. Edges incident on movable nodes, selected by the relationship - * parameter, are added to the output graph. - * 5. The weights for copied edges are aggregated as need, since the output - * graph is not a multi-graph. - */ -function buildLayerGraph(g, rank, relationship) { - var root = createRootNode(g), - result = new graphlib/* Graph */.T({ compound: true }) - .setGraph({ root: root }) - .setDefaultNodeLabel(function (v) { - return g.node(v); - }); - - forEach/* default */.A(g.nodes(), function (v) { - var node = g.node(v), - parent = g.parent(v); - - if (node.rank === rank || (node.minRank <= rank && rank <= node.maxRank)) { - result.setNode(v); - result.setParent(v, parent || root); - - // This assumes we have only short edges! - forEach/* default */.A(g[relationship](v), function (e) { - var u = e.v === v ? e.w : e.v, - edge = result.edge(u, v), - weight = !isUndefined/* default */.A(edge) ? edge.weight : 0; - result.setEdge(u, v, { weight: g.edge(e).weight + weight }); - }); - - if (has/* default */.A(node, 'minRank')) { - result.setNode(v, { - borderLeft: node.borderLeft[rank], - borderRight: node.borderRight[rank], - }); - } - } - }); - - return result; -} - -function createRootNode(g) { - var v; - while (g.hasNode((v = uniqueId/* default */.A('_root')))); - return v; -} - -// EXTERNAL MODULE: ./node_modules/lodash-es/_assignValue.js -var _assignValue = __webpack_require__(52851); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseZipObject.js -/** - * This base implementation of `_.zipObject` which assigns values using `assignFunc`. - * - * @private - * @param {Array} props The property identifiers. - * @param {Array} values The property values. - * @param {Function} assignFunc The function to assign values. - * @returns {Object} Returns the new object. - */ -function baseZipObject(props, values, assignFunc) { - var index = -1, - length = props.length, - valsLength = values.length, - result = {}; - - while (++index < length) { - var value = index < valsLength ? values[index] : undefined; - assignFunc(result, props[index], value); - } - return result; -} - -/* harmony default export */ const _baseZipObject = (baseZipObject); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/zipObject.js - - - -/** - * This method is like `_.fromPairs` except that it accepts two arrays, - * one of property identifiers and one of corresponding values. - * - * @static - * @memberOf _ - * @since 0.4.0 - * @category Array - * @param {Array} [props=[]] The property identifiers. - * @param {Array} [values=[]] The property values. - * @returns {Object} Returns the new object. - * @example - * - * _.zipObject(['a', 'b'], [1, 2]); - * // => { 'a': 1, 'b': 2 } - */ -function zipObject(props, values) { - return _baseZipObject(props || [], values || [], _assignValue/* default */.A); -} - -/* harmony default export */ const lodash_es_zipObject = (zipObject); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFlatten.js + 1 modules -var _baseFlatten = __webpack_require__(13588); -// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayMap.js -var _arrayMap = __webpack_require__(45572); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGet.js -var _baseGet = __webpack_require__(66318); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseMap.js -var _baseMap = __webpack_require__(52568); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseSortBy.js -/** - * The base implementation of `_.sortBy` which uses `comparer` to define the - * sort order of `array` and replaces criteria objects with their corresponding - * values. - * - * @private - * @param {Array} array The array to sort. - * @param {Function} comparer The function to define sort order. - * @returns {Array} Returns `array`. - */ -function baseSortBy(array, comparer) { - var length = array.length; - - array.sort(comparer); - while (length--) { - array[length] = array[length].value; - } - return array; -} - -/* harmony default export */ const _baseSortBy = (baseSortBy); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseUnary.js -var _baseUnary = __webpack_require__(52789); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_compareAscending.js - - -/** - * Compares values to sort them in ascending order. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {number} Returns the sort order indicator for `value`. - */ -function compareAscending(value, other) { - if (value !== other) { - var valIsDefined = value !== undefined, - valIsNull = value === null, - valIsReflexive = value === value, - valIsSymbol = (0,isSymbol/* default */.A)(value); - - var othIsDefined = other !== undefined, - othIsNull = other === null, - othIsReflexive = other === other, - othIsSymbol = (0,isSymbol/* default */.A)(other); - - if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) || - (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) || - (valIsNull && othIsDefined && othIsReflexive) || - (!valIsDefined && othIsReflexive) || - !valIsReflexive) { - return 1; - } - if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) || - (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) || - (othIsNull && valIsDefined && valIsReflexive) || - (!othIsDefined && valIsReflexive) || - !othIsReflexive) { - return -1; - } - } - return 0; -} - -/* harmony default export */ const _compareAscending = (compareAscending); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_compareMultiple.js - - -/** - * Used by `_.orderBy` to compare multiple properties of a value to another - * and stable sort them. - * - * If `orders` is unspecified, all values are sorted in ascending order. Otherwise, - * specify an order of "desc" for descending or "asc" for ascending sort order - * of corresponding values. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {boolean[]|string[]} orders The order to sort by for each property. - * @returns {number} Returns the sort order indicator for `object`. - */ -function compareMultiple(object, other, orders) { - var index = -1, - objCriteria = object.criteria, - othCriteria = other.criteria, - length = objCriteria.length, - ordersLength = orders.length; - - while (++index < length) { - var result = _compareAscending(objCriteria[index], othCriteria[index]); - if (result) { - if (index >= ordersLength) { - return result; - } - var order = orders[index]; - return result * (order == 'desc' ? -1 : 1); - } - } - // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications - // that causes it, under certain circumstances, to provide the same value for - // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247 - // for more details. - // - // This also ensures a stable sort in V8 and other engines. - // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details. - return object.index - other.index; -} - -/* harmony default export */ const _compareMultiple = (compareMultiple); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseOrderBy.js - - - - - - - - - - -/** - * The base implementation of `_.orderBy` without param guards. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. - * @param {string[]} orders The sort orders of `iteratees`. - * @returns {Array} Returns the new sorted array. - */ -function baseOrderBy(collection, iteratees, orders) { - if (iteratees.length) { - iteratees = (0,_arrayMap/* default */.A)(iteratees, function(iteratee) { - if ((0,isArray/* default */.A)(iteratee)) { - return function(value) { - return (0,_baseGet/* default */.A)(value, iteratee.length === 1 ? iteratee[0] : iteratee); - } - } - return iteratee; - }); - } else { - iteratees = [identity/* default */.A]; - } - - var index = -1; - iteratees = (0,_arrayMap/* default */.A)(iteratees, (0,_baseUnary/* default */.A)(_baseIteratee/* default */.A)); - - var result = (0,_baseMap/* default */.A)(collection, function(value, key, collection) { - var criteria = (0,_arrayMap/* default */.A)(iteratees, function(iteratee) { - return iteratee(value); - }); - return { 'criteria': criteria, 'index': ++index, 'value': value }; - }); - - return _baseSortBy(result, function(object, other) { - return _compareMultiple(object, other, orders); - }); -} - -/* harmony default export */ const _baseOrderBy = (baseOrderBy); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseRest.js -var _baseRest = __webpack_require__(24326); -// EXTERNAL MODULE: ./node_modules/lodash-es/_isIterateeCall.js -var _isIterateeCall = __webpack_require__(6832); -;// CONCATENATED MODULE: ./node_modules/lodash-es/sortBy.js - - - - - -/** - * Creates an array of elements, sorted in ascending order by the results of - * running each element in a collection thru each iteratee. This method - * performs a stable sort, that is, it preserves the original sort order of - * equal elements. The iteratees are invoked with one argument: (value). - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {...(Function|Function[])} [iteratees=[_.identity]] - * The iteratees to sort by. - * @returns {Array} Returns the new sorted array. - * @example - * - * var users = [ - * { 'user': 'fred', 'age': 48 }, - * { 'user': 'barney', 'age': 36 }, - * { 'user': 'fred', 'age': 30 }, - * { 'user': 'barney', 'age': 34 } - * ]; - * - * _.sortBy(users, [function(o) { return o.user; }]); - * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]] - * - * _.sortBy(users, ['user', 'age']); - * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]] - */ -var sortBy = (0,_baseRest/* default */.A)(function(collection, iteratees) { - if (collection == null) { - return []; - } - var length = iteratees.length; - if (length > 1 && (0,_isIterateeCall/* default */.A)(collection, iteratees[0], iteratees[1])) { - iteratees = []; - } else if (length > 2 && (0,_isIterateeCall/* default */.A)(iteratees[0], iteratees[1], iteratees[2])) { - iteratees = [iteratees[0]]; - } - return _baseOrderBy(collection, (0,_baseFlatten/* default */.A)(iteratees, 1), []); -}); - -/* harmony default export */ const lodash_es_sortBy = (sortBy); - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/cross-count.js - - - - -/* - * A function that takes a layering (an array of layers, each with an array of - * ordererd nodes) and a graph and returns a weighted crossing count. - * - * Pre-conditions: - * - * 1. Input graph must be simple (not a multigraph), directed, and include - * only simple edges. - * 2. Edges in the input graph must have assigned weights. - * - * Post-conditions: - * - * 1. The graph and layering matrix are left unchanged. - * - * This algorithm is derived from Barth, et al., "Bilayer Cross Counting." - */ -function crossCount(g, layering) { - var cc = 0; - for (var i = 1; i < layering.length; ++i) { - cc += twoLayerCrossCount(g, layering[i - 1], layering[i]); - } - return cc; -} - -function twoLayerCrossCount(g, northLayer, southLayer) { - // Sort all of the edges between the north and south layers by their position - // in the north layer and then the south. Map these edges to the position of - // their head in the south layer. - var southPos = lodash_es_zipObject( - southLayer, - map/* default */.A(southLayer, function (v, i) { - return i; - }) - ); - var southEntries = flatten/* default */.A( - map/* default */.A(northLayer, function (v) { - return lodash_es_sortBy( - map/* default */.A(g.outEdges(v), function (e) { - return { pos: southPos[e.w], weight: g.edge(e).weight }; - }), - 'pos' - ); - }) - ); - - // Build the accumulator tree - var firstIndex = 1; - while (firstIndex < southLayer.length) firstIndex <<= 1; - var treeSize = 2 * firstIndex - 1; - firstIndex -= 1; - var tree = map/* default */.A(new Array(treeSize), function () { - return 0; - }); - - // Calculate the weighted crossings - var cc = 0; - forEach/* default */.A( - // @ts-expect-error - southEntries.forEach(function (entry) { - var index = entry.pos + firstIndex; - tree[index] += entry.weight; - var weightSum = 0; - // @ts-expect-error - while (index > 0) { - // @ts-expect-error - if (index % 2) { - weightSum += tree[index + 1]; - } - // @ts-expect-error - index = (index - 1) >> 1; - tree[index] += entry.weight; - } - cc += entry.weight * weightSum; - }) - ); - - return cc; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/init-order.js - - - - -/* - * Assigns an initial order value for each node by performing a DFS search - * starting from nodes in the first rank. Nodes are assigned an order in their - * rank as they are first visited. - * - * This approach comes from Gansner, et al., "A Technique for Drawing Directed - * Graphs." - * - * Returns a layering matrix with an array per layer and each layer sorted by - * the order of its nodes. - */ -function initOrder(g) { - var visited = {}; - var simpleNodes = filter/* default */.A(g.nodes(), function (v) { - return !g.children(v).length; - }); - var maxRank = lodash_es_max( - map/* default */.A(simpleNodes, function (v) { - return g.node(v).rank; - }) - ); - var layers = map/* default */.A(range/* default */.A(maxRank + 1), function () { - return []; - }); - - function dfs(v) { - if (has/* default */.A(visited, v)) return; - visited[v] = true; - var node = g.node(v); - layers[node.rank].push(v); - forEach/* default */.A(g.successors(v), dfs); - } - - var orderedVs = lodash_es_sortBy(simpleNodes, function (v) { - return g.node(v).rank; - }); - forEach/* default */.A(orderedVs, dfs); - - return layers; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/barycenter.js - - - - -function barycenter(g, movable) { - return map/* default */.A(movable, function (v) { - var inV = g.inEdges(v); - if (!inV.length) { - return { v: v }; - } else { - var result = reduce/* default */.A( - inV, - function (acc, e) { - var edge = g.edge(e), - nodeU = g.node(e.v); - return { - sum: acc.sum + edge.weight * nodeU.order, - weight: acc.weight + edge.weight, - }; - }, - { sum: 0, weight: 0 } - ); - - return { - v: v, - barycenter: result.sum / result.weight, - weight: result.weight, - }; - } - }); -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/resolve-conflicts.js - - - - -/* - * Given a list of entries of the form {v, barycenter, weight} and a - * constraint graph this function will resolve any conflicts between the - * constraint graph and the barycenters for the entries. If the barycenters for - * an entry would violate a constraint in the constraint graph then we coalesce - * the nodes in the conflict into a new node that respects the contraint and - * aggregates barycenter and weight information. - * - * This implementation is based on the description in Forster, "A Fast and - * Simple Hueristic for Constrained Two-Level Crossing Reduction," thought it - * differs in some specific details. - * - * Pre-conditions: - * - * 1. Each entry has the form {v, barycenter, weight}, or if the node has - * no barycenter, then {v}. - * - * Returns: - * - * A new list of entries of the form {vs, i, barycenter, weight}. The list - * `vs` may either be a singleton or it may be an aggregation of nodes - * ordered such that they do not violate constraints from the constraint - * graph. The property `i` is the lowest original index of any of the - * elements in `vs`. - */ -function resolveConflicts(entries, cg) { - var mappedEntries = {}; - forEach/* default */.A(entries, function (entry, i) { - var tmp = (mappedEntries[entry.v] = { - indegree: 0, - in: [], - out: [], - vs: [entry.v], - i: i, - }); - if (!isUndefined/* default */.A(entry.barycenter)) { - // @ts-expect-error - tmp.barycenter = entry.barycenter; - // @ts-expect-error - tmp.weight = entry.weight; - } - }); - - forEach/* default */.A(cg.edges(), function (e) { - var entryV = mappedEntries[e.v]; - var entryW = mappedEntries[e.w]; - if (!isUndefined/* default */.A(entryV) && !isUndefined/* default */.A(entryW)) { - entryW.indegree++; - entryV.out.push(mappedEntries[e.w]); - } - }); - - var sourceSet = filter/* default */.A(mappedEntries, function (entry) { - // @ts-expect-error - return !entry.indegree; - }); - - return doResolveConflicts(sourceSet); -} - -function doResolveConflicts(sourceSet) { - var entries = []; - - function handleIn(vEntry) { - return function (uEntry) { - if (uEntry.merged) { - return; - } - if ( - isUndefined/* default */.A(uEntry.barycenter) || - isUndefined/* default */.A(vEntry.barycenter) || - uEntry.barycenter >= vEntry.barycenter - ) { - mergeEntries(vEntry, uEntry); - } - }; - } - - function handleOut(vEntry) { - return function (wEntry) { - wEntry['in'].push(vEntry); - if (--wEntry.indegree === 0) { - sourceSet.push(wEntry); - } - }; - } - - while (sourceSet.length) { - var entry = sourceSet.pop(); - entries.push(entry); - forEach/* default */.A(entry['in'].reverse(), handleIn(entry)); - forEach/* default */.A(entry.out, handleOut(entry)); - } - - return map/* default */.A( - filter/* default */.A(entries, function (entry) { - return !entry.merged; - }), - function (entry) { - return pick/* default */.A(entry, ['vs', 'i', 'barycenter', 'weight']); - } - ); -} - -function mergeEntries(target, source) { - var sum = 0; - var weight = 0; - - if (target.weight) { - sum += target.barycenter * target.weight; - weight += target.weight; - } - - if (source.weight) { - sum += source.barycenter * source.weight; - weight += source.weight; - } - - target.vs = source.vs.concat(target.vs); - target.barycenter = sum / weight; - target.weight = weight; - target.i = Math.min(source.i, target.i); - source.merged = true; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/sort.js - - - - - -function sort(entries, biasRight) { - var parts = partition(entries, function (entry) { - return has/* default */.A(entry, 'barycenter'); - }); - var sortable = parts.lhs, - unsortable = lodash_es_sortBy(parts.rhs, function (entry) { - return -entry.i; - }), - vs = [], - sum = 0, - weight = 0, - vsIndex = 0; - - sortable.sort(compareWithBias(!!biasRight)); - - vsIndex = consumeUnsortable(vs, unsortable, vsIndex); - - forEach/* default */.A(sortable, function (entry) { - vsIndex += entry.vs.length; - vs.push(entry.vs); - sum += entry.barycenter * entry.weight; - weight += entry.weight; - vsIndex = consumeUnsortable(vs, unsortable, vsIndex); - }); - - var result = { vs: flatten/* default */.A(vs) }; - if (weight) { - result.barycenter = sum / weight; - result.weight = weight; - } - return result; -} - -function consumeUnsortable(vs, unsortable, index) { - var last; - while (unsortable.length && (last = lodash_es_last(unsortable)).i <= index) { - unsortable.pop(); - vs.push(last.vs); - index++; - } - return index; -} - -function compareWithBias(bias) { - return function (entryV, entryW) { - if (entryV.barycenter < entryW.barycenter) { - return -1; - } else if (entryV.barycenter > entryW.barycenter) { - return 1; - } - - return !bias ? entryV.i - entryW.i : entryW.i - entryV.i; - }; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/sort-subgraph.js - - - - - - - -function sortSubgraph(g, v, cg, biasRight) { - var movable = g.children(v); - var node = g.node(v); - var bl = node ? node.borderLeft : undefined; - var br = node ? node.borderRight : undefined; - var subgraphs = {}; - - if (bl) { - movable = filter/* default */.A(movable, function (w) { - return w !== bl && w !== br; - }); - } - - var barycenters = barycenter(g, movable); - forEach/* default */.A(barycenters, function (entry) { - if (g.children(entry.v).length) { - var subgraphResult = sortSubgraph(g, entry.v, cg, biasRight); - subgraphs[entry.v] = subgraphResult; - if (has/* default */.A(subgraphResult, 'barycenter')) { - mergeBarycenters(entry, subgraphResult); - } - } - }); - - var entries = resolveConflicts(barycenters, cg); - expandSubgraphs(entries, subgraphs); - - var result = sort(entries, biasRight); - - if (bl) { - result.vs = flatten/* default */.A([bl, result.vs, br]); - if (g.predecessors(bl).length) { - var blPred = g.node(g.predecessors(bl)[0]), - brPred = g.node(g.predecessors(br)[0]); - if (!has/* default */.A(result, 'barycenter')) { - result.barycenter = 0; - result.weight = 0; - } - result.barycenter = - (result.barycenter * result.weight + blPred.order + brPred.order) / (result.weight + 2); - result.weight += 2; - } - } - - return result; -} - -function expandSubgraphs(entries, subgraphs) { - forEach/* default */.A(entries, function (entry) { - entry.vs = flatten/* default */.A( - entry.vs.map(function (v) { - if (subgraphs[v]) { - return subgraphs[v].vs; - } - return v; - }) - ); - }); -} - -function mergeBarycenters(target, other) { - if (!isUndefined/* default */.A(target.barycenter)) { - target.barycenter = - (target.barycenter * target.weight + other.barycenter * other.weight) / - (target.weight + other.weight); - target.weight += other.weight; - } else { - target.barycenter = other.barycenter; - target.weight = other.weight; - } -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/index.js - - - - - - - - - - - -/* - * Applies heuristics to minimize edge crossings in the graph and sets the best - * order solution as an order attribute on each node. - * - * Pre-conditions: - * - * 1. Graph must be DAG - * 2. Graph nodes must be objects with a "rank" attribute - * 3. Graph edges must have the "weight" attribute - * - * Post-conditions: - * - * 1. Graph nodes will have an "order" attribute based on the results of the - * algorithm. - */ -function order(g) { - var maxRank = util_maxRank(g), - downLayerGraphs = buildLayerGraphs(g, range/* default */.A(1, maxRank + 1), 'inEdges'), - upLayerGraphs = buildLayerGraphs(g, range/* default */.A(maxRank - 1, -1, -1), 'outEdges'); - - var layering = initOrder(g); - assignOrder(g, layering); - - var bestCC = Number.POSITIVE_INFINITY, - best; - - for (var i = 0, lastBest = 0; lastBest < 4; ++i, ++lastBest) { - sweepLayerGraphs(i % 2 ? downLayerGraphs : upLayerGraphs, i % 4 >= 2); - - layering = buildLayerMatrix(g); - var cc = crossCount(g, layering); - if (cc < bestCC) { - lastBest = 0; - best = lodash_es_cloneDeep(layering); - bestCC = cc; - } - } - - assignOrder(g, best); -} - -function buildLayerGraphs(g, ranks, relationship) { - return map/* default */.A(ranks, function (rank) { - return buildLayerGraph(g, rank, relationship); - }); -} - -function sweepLayerGraphs(layerGraphs, biasRight) { - var cg = new graphlib/* Graph */.T(); - forEach/* default */.A(layerGraphs, function (lg) { - var root = lg.graph().root; - var sorted = sortSubgraph(lg, root, cg, biasRight); - forEach/* default */.A(sorted.vs, function (v, i) { - lg.node(v).order = i; - }); - addSubgraphConstraints(lg, cg, sorted.vs); - }); -} - -function assignOrder(g, layering) { - forEach/* default */.A(layering, function (layer) { - forEach/* default */.A(layer, function (v, i) { - g.node(v).order = i; - }); - }); -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/parent-dummy-chains.js - - - - -function parentDummyChains(g) { - var postorderNums = parent_dummy_chains_postorder(g); - - forEach/* default */.A(g.graph().dummyChains, function (v) { - var node = g.node(v); - var edgeObj = node.edgeObj; - var pathData = findPath(g, postorderNums, edgeObj.v, edgeObj.w); - var path = pathData.path; - var lca = pathData.lca; - var pathIdx = 0; - var pathV = path[pathIdx]; - var ascending = true; - - while (v !== edgeObj.w) { - node = g.node(v); - - if (ascending) { - while ((pathV = path[pathIdx]) !== lca && g.node(pathV).maxRank < node.rank) { - pathIdx++; - } - - if (pathV === lca) { - ascending = false; - } - } - - if (!ascending) { - while ( - pathIdx < path.length - 1 && - g.node((pathV = path[pathIdx + 1])).minRank <= node.rank - ) { - pathIdx++; - } - pathV = path[pathIdx]; - } - - g.setParent(v, pathV); - v = g.successors(v)[0]; - } - }); -} - -// Find a path from v to w through the lowest common ancestor (LCA). Return the -// full path and the LCA. -function findPath(g, postorderNums, v, w) { - var vPath = []; - var wPath = []; - var low = Math.min(postorderNums[v].low, postorderNums[w].low); - var lim = Math.max(postorderNums[v].lim, postorderNums[w].lim); - var parent; - var lca; - - // Traverse up from v to find the LCA - parent = v; - do { - parent = g.parent(parent); - vPath.push(parent); - } while (parent && (postorderNums[parent].low > low || lim > postorderNums[parent].lim)); - lca = parent; - - // Traverse from w to LCA - parent = w; - while ((parent = g.parent(parent)) !== lca) { - wPath.push(parent); - } - - return { path: vPath.concat(wPath.reverse()), lca: lca }; -} - -function parent_dummy_chains_postorder(g) { - var result = {}; - var lim = 0; - - function dfs(v) { - var low = lim; - forEach/* default */.A(g.children(v), dfs); - result[v] = { low: low, lim: lim++ }; - } - forEach/* default */.A(g.children(), dfs); - - return result; -} - -// EXTERNAL MODULE: ./node_modules/lodash-es/_castFunction.js -var _castFunction = __webpack_require__(99922); -;// CONCATENATED MODULE: ./node_modules/lodash-es/forOwn.js - - - -/** - * Iterates over own enumerable string keyed properties of an object and - * invokes `iteratee` for each property. The iteratee is invoked with three - * arguments: (value, key, object). Iteratee functions may exit iteration - * early by explicitly returning `false`. - * - * @static - * @memberOf _ - * @since 0.3.0 - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Object} Returns `object`. - * @see _.forOwnRight - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.forOwn(new Foo, function(value, key) { - * console.log(key); - * }); - * // => Logs 'a' then 'b' (iteration order is not guaranteed). - */ -function forOwn(object, iteratee) { - return object && (0,_baseForOwn/* default */.A)(object, (0,_castFunction/* default */.A)(iteratee)); -} - -/* harmony default export */ const lodash_es_forOwn = (forOwn); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFor.js + 1 modules -var _baseFor = __webpack_require__(4574); -// EXTERNAL MODULE: ./node_modules/lodash-es/keysIn.js + 2 modules -var keysIn = __webpack_require__(55615); -;// CONCATENATED MODULE: ./node_modules/lodash-es/forIn.js - - - - -/** - * Iterates over own and inherited enumerable string keyed properties of an - * object and invokes `iteratee` for each property. The iteratee is invoked - * with three arguments: (value, key, object). Iteratee functions may exit - * iteration early by explicitly returning `false`. - * - * @static - * @memberOf _ - * @since 0.3.0 - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Object} Returns `object`. - * @see _.forInRight - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.forIn(new Foo, function(value, key) { - * console.log(key); - * }); - * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed). - */ -function forIn(object, iteratee) { - return object == null - ? object - : (0,_baseFor/* default */.A)(object, (0,_castFunction/* default */.A)(iteratee), keysIn/* default */.A); -} - -/* harmony default export */ const lodash_es_forIn = (forIn); - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/position/bk.js - - - - -/* - * This module provides coordinate assignment based on Brandes and Köpf, "Fast - * and Simple Horizontal Coordinate Assignment." - */ - - - -/* - * Marks all edges in the graph with a type-1 conflict with the "type1Conflict" - * property. A type-1 conflict is one where a non-inner segment crosses an - * inner segment. An inner segment is an edge with both incident nodes marked - * with the "dummy" property. - * - * This algorithm scans layer by layer, starting with the second, for type-1 - * conflicts between the current layer and the previous layer. For each layer - * it scans the nodes from left to right until it reaches one that is incident - * on an inner segment. It then scans predecessors to determine if they have - * edges that cross that inner segment. At the end a final scan is done for all - * nodes on the current rank to see if they cross the last visited inner - * segment. - * - * This algorithm (safely) assumes that a dummy node will only be incident on a - * single node in the layers being scanned. - */ -function findType1Conflicts(g, layering) { - var conflicts = {}; - - function visitLayer(prevLayer, layer) { - var // last visited node in the previous layer that is incident on an inner - // segment. - k0 = 0, - // Tracks the last node in this layer scanned for crossings with a type-1 - // segment. - scanPos = 0, - prevLayerLength = prevLayer.length, - lastNode = lodash_es_last(layer); - - forEach/* default */.A(layer, function (v, i) { - var w = findOtherInnerSegmentNode(g, v), - k1 = w ? g.node(w).order : prevLayerLength; - - if (w || v === lastNode) { - forEach/* default */.A(layer.slice(scanPos, i + 1), function (scanNode) { - forEach/* default */.A(g.predecessors(scanNode), function (u) { - var uLabel = g.node(u), - uPos = uLabel.order; - if ((uPos < k0 || k1 < uPos) && !(uLabel.dummy && g.node(scanNode).dummy)) { - addConflict(conflicts, u, scanNode); - } - }); - }); - // @ts-expect-error - scanPos = i + 1; - k0 = k1; - } - }); - - return layer; - } - - reduce/* default */.A(layering, visitLayer); - return conflicts; -} - -function findType2Conflicts(g, layering) { - var conflicts = {}; - - function scan(south, southPos, southEnd, prevNorthBorder, nextNorthBorder) { - var v; - forEach/* default */.A(range/* default */.A(southPos, southEnd), function (i) { - v = south[i]; - if (g.node(v).dummy) { - forEach/* default */.A(g.predecessors(v), function (u) { - var uNode = g.node(u); - if (uNode.dummy && (uNode.order < prevNorthBorder || uNode.order > nextNorthBorder)) { - addConflict(conflicts, u, v); - } - }); - } - }); - } - - function visitLayer(north, south) { - var prevNorthPos = -1, - nextNorthPos, - southPos = 0; - - forEach/* default */.A(south, function (v, southLookahead) { - if (g.node(v).dummy === 'border') { - var predecessors = g.predecessors(v); - if (predecessors.length) { - nextNorthPos = g.node(predecessors[0]).order; - scan(south, southPos, southLookahead, prevNorthPos, nextNorthPos); - // @ts-expect-error - southPos = southLookahead; - prevNorthPos = nextNorthPos; - } - } - scan(south, southPos, south.length, nextNorthPos, north.length); - }); - - return south; - } - - reduce/* default */.A(layering, visitLayer); - return conflicts; -} - -function findOtherInnerSegmentNode(g, v) { - if (g.node(v).dummy) { - return lodash_es_find(g.predecessors(v), function (u) { - return g.node(u).dummy; - }); - } -} - -function addConflict(conflicts, v, w) { - if (v > w) { - var tmp = v; - v = w; - w = tmp; - } - - var conflictsV = conflicts[v]; - if (!conflictsV) { - conflicts[v] = conflictsV = {}; - } - conflictsV[w] = true; -} - -function hasConflict(conflicts, v, w) { - if (v > w) { - var tmp = v; - v = w; - w = tmp; - } - return has/* default */.A(conflicts[v], w); -} - -/* - * Try to align nodes into vertical "blocks" where possible. This algorithm - * attempts to align a node with one of its median neighbors. If the edge - * connecting a neighbor is a type-1 conflict then we ignore that possibility. - * If a previous node has already formed a block with a node after the node - * we're trying to form a block with, we also ignore that possibility - our - * blocks would be split in that scenario. - */ -function verticalAlignment(g, layering, conflicts, neighborFn) { - var root = {}, - align = {}, - pos = {}; - - // We cache the position here based on the layering because the graph and - // layering may be out of sync. The layering matrix is manipulated to - // generate different extreme alignments. - forEach/* default */.A(layering, function (layer) { - forEach/* default */.A(layer, function (v, order) { - root[v] = v; - align[v] = v; - pos[v] = order; - }); - }); - - forEach/* default */.A(layering, function (layer) { - var prevIdx = -1; - forEach/* default */.A(layer, function (v) { - var ws = neighborFn(v); - if (ws.length) { - ws = lodash_es_sortBy(ws, function (w) { - return pos[w]; - }); - var mp = (ws.length - 1) / 2; - for (var i = Math.floor(mp), il = Math.ceil(mp); i <= il; ++i) { - var w = ws[i]; - if (align[v] === v && prevIdx < pos[w] && !hasConflict(conflicts, v, w)) { - align[w] = v; - align[v] = root[v] = root[w]; - prevIdx = pos[w]; - } - } - } - }); - }); - - return { root: root, align: align }; -} - -function horizontalCompaction(g, layering, root, align, reverseSep) { - // This portion of the algorithm differs from BK due to a number of problems. - // Instead of their algorithm we construct a new block graph and do two - // sweeps. The first sweep places blocks with the smallest possible - // coordinates. The second sweep removes unused space by moving blocks to the - // greatest coordinates without violating separation. - var xs = {}, - blockG = buildBlockGraph(g, layering, root, reverseSep), - borderType = reverseSep ? 'borderLeft' : 'borderRight'; - - function iterate(setXsFunc, nextNodesFunc) { - var stack = blockG.nodes(); - var elem = stack.pop(); - var visited = {}; - while (elem) { - if (visited[elem]) { - setXsFunc(elem); - } else { - visited[elem] = true; - stack.push(elem); - stack = stack.concat(nextNodesFunc(elem)); - } - - elem = stack.pop(); - } - } - - // First pass, assign smallest coordinates - function pass1(elem) { - xs[elem] = blockG.inEdges(elem).reduce(function (acc, e) { - return Math.max(acc, xs[e.v] + blockG.edge(e)); - }, 0); - } - - // Second pass, assign greatest coordinates - function pass2(elem) { - var min = blockG.outEdges(elem).reduce(function (acc, e) { - return Math.min(acc, xs[e.w] - blockG.edge(e)); - }, Number.POSITIVE_INFINITY); - - var node = g.node(elem); - if (min !== Number.POSITIVE_INFINITY && node.borderType !== borderType) { - xs[elem] = Math.max(xs[elem], min); - } - } - - iterate(pass1, blockG.predecessors.bind(blockG)); - iterate(pass2, blockG.successors.bind(blockG)); - - // Assign x coordinates to all nodes - forEach/* default */.A(align, function (v) { - xs[v] = xs[root[v]]; - }); - - return xs; -} - -function buildBlockGraph(g, layering, root, reverseSep) { - var blockGraph = new graphlib/* Graph */.T(), - graphLabel = g.graph(), - sepFn = sep(graphLabel.nodesep, graphLabel.edgesep, reverseSep); - - forEach/* default */.A(layering, function (layer) { - var u; - forEach/* default */.A(layer, function (v) { - var vRoot = root[v]; - blockGraph.setNode(vRoot); - if (u) { - var uRoot = root[u], - prevMax = blockGraph.edge(uRoot, vRoot); - blockGraph.setEdge(uRoot, vRoot, Math.max(sepFn(g, v, u), prevMax || 0)); - } - u = v; - }); - }); - - return blockGraph; -} - -/* - * Returns the alignment that has the smallest width of the given alignments. - */ -function findSmallestWidthAlignment(g, xss) { - return lodash_es_minBy(values/* default */.A(xss), function (xs) { - var max = Number.NEGATIVE_INFINITY; - var min = Number.POSITIVE_INFINITY; - - lodash_es_forIn(xs, function (x, v) { - var halfWidth = width(g, v) / 2; - - max = Math.max(x + halfWidth, max); - min = Math.min(x - halfWidth, min); - }); - - return max - min; - }); -} - -/* - * Align the coordinates of each of the layout alignments such that - * left-biased alignments have their minimum coordinate at the same point as - * the minimum coordinate of the smallest width alignment and right-biased - * alignments have their maximum coordinate at the same point as the maximum - * coordinate of the smallest width alignment. - */ -function alignCoordinates(xss, alignTo) { - var alignToVals = values/* default */.A(alignTo), - alignToMin = lodash_es_min(alignToVals), - alignToMax = lodash_es_max(alignToVals); - - forEach/* default */.A(['u', 'd'], function (vert) { - forEach/* default */.A(['l', 'r'], function (horiz) { - var alignment = vert + horiz, - xs = xss[alignment], - delta; - if (xs === alignTo) return; - - var xsVals = values/* default */.A(xs); - delta = horiz === 'l' ? alignToMin - lodash_es_min(xsVals) : alignToMax - lodash_es_max(xsVals); - - if (delta) { - xss[alignment] = lodash_es_mapValues(xs, function (x) { - return x + delta; - }); - } - }); - }); -} - -function balance(xss, align) { - return lodash_es_mapValues(xss.ul, function (ignore, v) { - if (align) { - return xss[align.toLowerCase()][v]; - } else { - var xs = lodash_es_sortBy(map/* default */.A(xss, v)); - return (xs[1] + xs[2]) / 2; - } - }); -} - -function positionX(g) { - var layering = buildLayerMatrix(g); - var conflicts = merge/* default */.A(findType1Conflicts(g, layering), findType2Conflicts(g, layering)); - - var xss = {}; - var adjustedLayering; - forEach/* default */.A(['u', 'd'], function (vert) { - adjustedLayering = vert === 'u' ? layering : values/* default */.A(layering).reverse(); - forEach/* default */.A(['l', 'r'], function (horiz) { - if (horiz === 'r') { - adjustedLayering = map/* default */.A(adjustedLayering, function (inner) { - return values/* default */.A(inner).reverse(); - }); - } - - var neighborFn = (vert === 'u' ? g.predecessors : g.successors).bind(g); - var align = verticalAlignment(g, adjustedLayering, conflicts, neighborFn); - var xs = horizontalCompaction(g, adjustedLayering, align.root, align.align, horiz === 'r'); - if (horiz === 'r') { - xs = lodash_es_mapValues(xs, function (x) { - return -x; - }); - } - xss[vert + horiz] = xs; - }); - }); - - var smallestWidth = findSmallestWidthAlignment(g, xss); - alignCoordinates(xss, smallestWidth); - return balance(xss, g.graph().align); -} - -function sep(nodeSep, edgeSep, reverseSep) { - return function (g, v, w) { - var vLabel = g.node(v); - var wLabel = g.node(w); - var sum = 0; - var delta; - - sum += vLabel.width / 2; - if (has/* default */.A(vLabel, 'labelpos')) { - switch (vLabel.labelpos.toLowerCase()) { - case 'l': - delta = -vLabel.width / 2; - break; - case 'r': - delta = vLabel.width / 2; - break; - } - } - if (delta) { - sum += reverseSep ? delta : -delta; - } - delta = 0; - - sum += (vLabel.dummy ? edgeSep : nodeSep) / 2; - sum += (wLabel.dummy ? edgeSep : nodeSep) / 2; - - sum += wLabel.width / 2; - if (has/* default */.A(wLabel, 'labelpos')) { - switch (wLabel.labelpos.toLowerCase()) { - case 'l': - delta = wLabel.width / 2; - break; - case 'r': - delta = -wLabel.width / 2; - break; - } - } - if (delta) { - sum += reverseSep ? delta : -delta; - } - delta = 0; - - return sum; - }; -} - -function width(g, v) { - return g.node(v).width; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/position/index.js - - - - - - -function position(g) { - g = asNonCompoundGraph(g); - - positionY(g); - lodash_es_forOwn(positionX(g), function (x, v) { - g.node(v).x = x; - }); -} - -function positionY(g) { - var layering = buildLayerMatrix(g); - var rankSep = g.graph().ranksep; - var prevY = 0; - forEach/* default */.A(layering, function (layer) { - var maxHeight = lodash_es_max( - map/* default */.A(layer, function (v) { - return g.node(v).height; - }) - ); - forEach/* default */.A(layer, function (v) { - g.node(v).y = prevY + maxHeight / 2; - }); - prevY += maxHeight + rankSep; - }); -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/layout.js - - - - - - - - - - - - - - - -function layout(g, opts) { - var time = opts && opts.debugTiming ? util_time : notime; - time('layout', function () { - var layoutGraph = time(' buildLayoutGraph', function () { - return buildLayoutGraph(g); - }); - time(' runLayout', function () { - runLayout(layoutGraph, time); - }); - time(' updateInputGraph', function () { - updateInputGraph(g, layoutGraph); - }); - }); -} - -function runLayout(g, time) { - time(' makeSpaceForEdgeLabels', function () { - makeSpaceForEdgeLabels(g); - }); - time(' removeSelfEdges', function () { - removeSelfEdges(g); - }); - time(' acyclic', function () { - run(g); - }); - time(' nestingGraph.run', function () { - nesting_graph_run(g); - }); - time(' rank', function () { - rank(asNonCompoundGraph(g)); - }); - time(' injectEdgeLabelProxies', function () { - injectEdgeLabelProxies(g); - }); - time(' removeEmptyRanks', function () { - removeEmptyRanks(g); - }); - time(' nestingGraph.cleanup', function () { - cleanup(g); - }); - time(' normalizeRanks', function () { - normalizeRanks(g); - }); - time(' assignRankMinMax', function () { - assignRankMinMax(g); - }); - time(' removeEdgeLabelProxies', function () { - removeEdgeLabelProxies(g); - }); - time(' normalize.run', function () { - normalize_run(g); - }); - time(' parentDummyChains', function () { - parentDummyChains(g); - }); - time(' addBorderSegments', function () { - addBorderSegments(g); - }); - time(' order', function () { - order(g); - }); - time(' insertSelfEdges', function () { - insertSelfEdges(g); - }); - time(' adjustCoordinateSystem', function () { - adjust(g); - }); - time(' position', function () { - position(g); - }); - time(' positionSelfEdges', function () { - positionSelfEdges(g); - }); - time(' removeBorderNodes', function () { - removeBorderNodes(g); - }); - time(' normalize.undo', function () { - normalize_undo(g); - }); - time(' fixupEdgeLabelCoords', function () { - fixupEdgeLabelCoords(g); - }); - time(' undoCoordinateSystem', function () { - coordinate_system_undo(g); - }); - time(' translateGraph', function () { - translateGraph(g); - }); - time(' assignNodeIntersects', function () { - assignNodeIntersects(g); - }); - time(' reversePoints', function () { - reversePointsForReversedEdges(g); - }); - time(' acyclic.undo', function () { - undo(g); - }); -} - -/* - * Copies final layout information from the layout graph back to the input - * graph. This process only copies whitelisted attributes from the layout graph - * to the input graph, so it serves as a good place to determine what - * attributes can influence layout. - */ -function updateInputGraph(inputGraph, layoutGraph) { - forEach/* default */.A(inputGraph.nodes(), function (v) { - var inputLabel = inputGraph.node(v); - var layoutLabel = layoutGraph.node(v); - - if (inputLabel) { - inputLabel.x = layoutLabel.x; - inputLabel.y = layoutLabel.y; - - if (layoutGraph.children(v).length) { - inputLabel.width = layoutLabel.width; - inputLabel.height = layoutLabel.height; - } - } - }); - - forEach/* default */.A(inputGraph.edges(), function (e) { - var inputLabel = inputGraph.edge(e); - var layoutLabel = layoutGraph.edge(e); - - inputLabel.points = layoutLabel.points; - if (has/* default */.A(layoutLabel, 'x')) { - inputLabel.x = layoutLabel.x; - inputLabel.y = layoutLabel.y; - } - }); - - inputGraph.graph().width = layoutGraph.graph().width; - inputGraph.graph().height = layoutGraph.graph().height; -} - -var graphNumAttrs = ['nodesep', 'edgesep', 'ranksep', 'marginx', 'marginy']; -var graphDefaults = { ranksep: 50, edgesep: 20, nodesep: 50, rankdir: 'tb' }; -var graphAttrs = ['acyclicer', 'ranker', 'rankdir', 'align']; -var nodeNumAttrs = ['width', 'height']; -var nodeDefaults = { width: 0, height: 0 }; -var edgeNumAttrs = ['minlen', 'weight', 'width', 'height', 'labeloffset']; -var edgeDefaults = { - minlen: 1, - weight: 1, - width: 0, - height: 0, - labeloffset: 10, - labelpos: 'r', -}; -var edgeAttrs = ['labelpos']; - -/* - * Constructs a new graph from the input graph, which can be used for layout. - * This process copies only whitelisted attributes from the input graph to the - * layout graph. Thus this function serves as a good place to determine what - * attributes can influence layout. - */ -function buildLayoutGraph(inputGraph) { - var g = new graphlib/* Graph */.T({ multigraph: true, compound: true }); - var graph = canonicalize(inputGraph.graph()); - - g.setGraph( - merge/* default */.A({}, graphDefaults, selectNumberAttrs(graph, graphNumAttrs), pick/* default */.A(graph, graphAttrs)) - ); - - forEach/* default */.A(inputGraph.nodes(), function (v) { - var node = canonicalize(inputGraph.node(v)); - g.setNode(v, defaults/* default */.A(selectNumberAttrs(node, nodeNumAttrs), nodeDefaults)); - g.setParent(v, inputGraph.parent(v)); - }); - - forEach/* default */.A(inputGraph.edges(), function (e) { - var edge = canonicalize(inputGraph.edge(e)); - g.setEdge( - e, - merge/* default */.A({}, edgeDefaults, selectNumberAttrs(edge, edgeNumAttrs), pick/* default */.A(edge, edgeAttrs)) - ); - }); - - return g; -} - -/* - * This idea comes from the Gansner paper: to account for edge labels in our - * layout we split each rank in half by doubling minlen and halving ranksep. - * Then we can place labels at these mid-points between nodes. - * - * We also add some minimal padding to the width to push the label for the edge - * away from the edge itself a bit. - */ -function makeSpaceForEdgeLabels(g) { - var graph = g.graph(); - graph.ranksep /= 2; - forEach/* default */.A(g.edges(), function (e) { - var edge = g.edge(e); - edge.minlen *= 2; - if (edge.labelpos.toLowerCase() !== 'c') { - if (graph.rankdir === 'TB' || graph.rankdir === 'BT') { - edge.width += edge.labeloffset; - } else { - edge.height += edge.labeloffset; - } - } - }); -} - -/* - * Creates temporary dummy nodes that capture the rank in which each edge's - * label is going to, if it has one of non-zero width and height. We do this - * so that we can safely remove empty ranks while preserving balance for the - * label's position. - */ -function injectEdgeLabelProxies(g) { - forEach/* default */.A(g.edges(), function (e) { - var edge = g.edge(e); - if (edge.width && edge.height) { - var v = g.node(e.v); - var w = g.node(e.w); - var label = { rank: (w.rank - v.rank) / 2 + v.rank, e: e }; - addDummyNode(g, 'edge-proxy', label, '_ep'); - } - }); -} - -function assignRankMinMax(g) { - var maxRank = 0; - forEach/* default */.A(g.nodes(), function (v) { - var node = g.node(v); - if (node.borderTop) { - node.minRank = g.node(node.borderTop).rank; - node.maxRank = g.node(node.borderBottom).rank; - // @ts-expect-error - maxRank = lodash_es_max(maxRank, node.maxRank); - } - }); - g.graph().maxRank = maxRank; -} - -function removeEdgeLabelProxies(g) { - forEach/* default */.A(g.nodes(), function (v) { - var node = g.node(v); - if (node.dummy === 'edge-proxy') { - g.edge(node.e).labelRank = node.rank; - g.removeNode(v); - } - }); -} - -function translateGraph(g) { - var minX = Number.POSITIVE_INFINITY; - var maxX = 0; - var minY = Number.POSITIVE_INFINITY; - var maxY = 0; - var graphLabel = g.graph(); - var marginX = graphLabel.marginx || 0; - var marginY = graphLabel.marginy || 0; - - function getExtremes(attrs) { - var x = attrs.x; - var y = attrs.y; - var w = attrs.width; - var h = attrs.height; - minX = Math.min(minX, x - w / 2); - maxX = Math.max(maxX, x + w / 2); - minY = Math.min(minY, y - h / 2); - maxY = Math.max(maxY, y + h / 2); - } - - forEach/* default */.A(g.nodes(), function (v) { - getExtremes(g.node(v)); - }); - forEach/* default */.A(g.edges(), function (e) { - var edge = g.edge(e); - if (has/* default */.A(edge, 'x')) { - getExtremes(edge); - } - }); - - minX -= marginX; - minY -= marginY; - - forEach/* default */.A(g.nodes(), function (v) { - var node = g.node(v); - node.x -= minX; - node.y -= minY; - }); - - forEach/* default */.A(g.edges(), function (e) { - var edge = g.edge(e); - forEach/* default */.A(edge.points, function (p) { - p.x -= minX; - p.y -= minY; - }); - if (has/* default */.A(edge, 'x')) { - edge.x -= minX; - } - if (has/* default */.A(edge, 'y')) { - edge.y -= minY; - } - }); - - graphLabel.width = maxX - minX + marginX; - graphLabel.height = maxY - minY + marginY; -} - -function assignNodeIntersects(g) { - forEach/* default */.A(g.edges(), function (e) { - var edge = g.edge(e); - var nodeV = g.node(e.v); - var nodeW = g.node(e.w); - var p1, p2; - if (!edge.points) { - edge.points = []; - p1 = nodeW; - p2 = nodeV; - } else { - p1 = edge.points[0]; - p2 = edge.points[edge.points.length - 1]; - } - edge.points.unshift(intersectRect(nodeV, p1)); - edge.points.push(intersectRect(nodeW, p2)); - }); -} - -function fixupEdgeLabelCoords(g) { - forEach/* default */.A(g.edges(), function (e) { - var edge = g.edge(e); - if (has/* default */.A(edge, 'x')) { - if (edge.labelpos === 'l' || edge.labelpos === 'r') { - edge.width -= edge.labeloffset; - } - switch (edge.labelpos) { - case 'l': - edge.x -= edge.width / 2 + edge.labeloffset; - break; - case 'r': - edge.x += edge.width / 2 + edge.labeloffset; - break; - } - } - }); -} - -function reversePointsForReversedEdges(g) { - forEach/* default */.A(g.edges(), function (e) { - var edge = g.edge(e); - if (edge.reversed) { - edge.points.reverse(); - } - }); -} - -function removeBorderNodes(g) { - forEach/* default */.A(g.nodes(), function (v) { - if (g.children(v).length) { - var node = g.node(v); - var t = g.node(node.borderTop); - var b = g.node(node.borderBottom); - var l = g.node(lodash_es_last(node.borderLeft)); - var r = g.node(lodash_es_last(node.borderRight)); - - node.width = Math.abs(r.x - l.x); - node.height = Math.abs(b.y - t.y); - node.x = l.x + node.width / 2; - node.y = t.y + node.height / 2; - } - }); - - forEach/* default */.A(g.nodes(), function (v) { - if (g.node(v).dummy === 'border') { - g.removeNode(v); - } - }); -} - -function removeSelfEdges(g) { - forEach/* default */.A(g.edges(), function (e) { - if (e.v === e.w) { - var node = g.node(e.v); - if (!node.selfEdges) { - node.selfEdges = []; - } - node.selfEdges.push({ e: e, label: g.edge(e) }); - g.removeEdge(e); - } - }); -} - -function insertSelfEdges(g) { - var layers = buildLayerMatrix(g); - forEach/* default */.A(layers, function (layer) { - var orderShift = 0; - forEach/* default */.A(layer, function (v, i) { - var node = g.node(v); - node.order = i + orderShift; - forEach/* default */.A(node.selfEdges, function (selfEdge) { - addDummyNode( - g, - 'selfedge', - { - width: selfEdge.label.width, - height: selfEdge.label.height, - rank: node.rank, - order: i + ++orderShift, - e: selfEdge.e, - label: selfEdge.label, - }, - '_se' - ); - }); - delete node.selfEdges; - }); - }); -} - -function positionSelfEdges(g) { - forEach/* default */.A(g.nodes(), function (v) { - var node = g.node(v); - if (node.dummy === 'selfedge') { - var selfNode = g.node(node.e.v); - var x = selfNode.x + selfNode.width / 2; - var y = selfNode.y; - var dx = node.x - x; - var dy = selfNode.height / 2; - g.setEdge(node.e, node.label); - g.removeNode(v); - node.label.points = [ - { x: x + (2 * dx) / 3, y: y - dy }, - { x: x + (5 * dx) / 6, y: y - dy }, - { x: x + dx, y: y }, - { x: x + (5 * dx) / 6, y: y + dy }, - { x: x + (2 * dx) / 3, y: y + dy }, - ]; - node.label.x = node.x; - node.label.y = node.y; - } - }); -} - -function selectNumberAttrs(obj, attrs) { - return lodash_es_mapValues(pick/* default */.A(obj, attrs), Number); -} - -function canonicalize(attrs) { - var newAttrs = {}; - forEach/* default */.A(attrs, function (v, k) { - newAttrs[k.toLowerCase()] = v; - }); - return newAttrs; -} - -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/index.js - - - - - - - - -/***/ }), - -/***/ 73046: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - T: () => (/* binding */ Graph) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/has.js + 1 modules -var has = __webpack_require__(48585); -// EXTERNAL MODULE: ./node_modules/lodash-es/constant.js -var constant = __webpack_require__(39142); -// EXTERNAL MODULE: ./node_modules/lodash-es/isFunction.js -var isFunction = __webpack_require__(89610); -// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js -var keys = __webpack_require__(27422); -// EXTERNAL MODULE: ./node_modules/lodash-es/filter.js + 1 modules -var filter = __webpack_require__(11662); -// EXTERNAL MODULE: ./node_modules/lodash-es/isEmpty.js -var isEmpty = __webpack_require__(66401); -// EXTERNAL MODULE: ./node_modules/lodash-es/forEach.js -var forEach = __webpack_require__(8058); -// EXTERNAL MODULE: ./node_modules/lodash-es/isUndefined.js -var isUndefined = __webpack_require__(69592); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFlatten.js + 1 modules -var _baseFlatten = __webpack_require__(13588); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseRest.js -var _baseRest = __webpack_require__(24326); -// EXTERNAL MODULE: ./node_modules/lodash-es/_SetCache.js + 2 modules -var _SetCache = __webpack_require__(62062); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFindIndex.js -var _baseFindIndex = __webpack_require__(25707); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsNaN.js -/** - * The base implementation of `_.isNaN` without support for number objects. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. - */ -function baseIsNaN(value) { - return value !== value; -} - -/* harmony default export */ const _baseIsNaN = (baseIsNaN); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_strictIndexOf.js -/** - * A specialized version of `_.indexOf` which performs strict equality - * comparisons of values, i.e. `===`. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} fromIndex The index to search from. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function strictIndexOf(array, value, fromIndex) { - var index = fromIndex - 1, - length = array.length; - - while (++index < length) { - if (array[index] === value) { - return index; - } - } - return -1; -} - -/* harmony default export */ const _strictIndexOf = (strictIndexOf); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIndexOf.js - - - - -/** - * The base implementation of `_.indexOf` without `fromIndex` bounds checks. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} fromIndex The index to search from. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function baseIndexOf(array, value, fromIndex) { - return value === value - ? _strictIndexOf(array, value, fromIndex) - : (0,_baseFindIndex/* default */.A)(array, _baseIsNaN, fromIndex); -} - -/* harmony default export */ const _baseIndexOf = (baseIndexOf); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_arrayIncludes.js - - -/** - * A specialized version of `_.includes` for arrays without support for - * specifying an index to search from. - * - * @private - * @param {Array} [array] The array to inspect. - * @param {*} target The value to search for. - * @returns {boolean} Returns `true` if `target` is found, else `false`. - */ -function arrayIncludes(array, value) { - var length = array == null ? 0 : array.length; - return !!length && _baseIndexOf(array, value, 0) > -1; -} - -/* harmony default export */ const _arrayIncludes = (arrayIncludes); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_arrayIncludesWith.js -/** - * This function is like `arrayIncludes` except that it accepts a comparator. - * - * @private - * @param {Array} [array] The array to inspect. - * @param {*} target The value to search for. - * @param {Function} comparator The comparator invoked per element. - * @returns {boolean} Returns `true` if `target` is found, else `false`. - */ -function arrayIncludesWith(array, value, comparator) { - var index = -1, - length = array == null ? 0 : array.length; - - while (++index < length) { - if (comparator(value, array[index])) { - return true; - } - } - return false; -} - -/* harmony default export */ const _arrayIncludesWith = (arrayIncludesWith); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_cacheHas.js -var _cacheHas = __webpack_require__(64099); -// EXTERNAL MODULE: ./node_modules/lodash-es/_Set.js -var _Set = __webpack_require__(39857); -;// CONCATENATED MODULE: ./node_modules/lodash-es/noop.js -/** - * This method returns `undefined`. - * - * @static - * @memberOf _ - * @since 2.3.0 - * @category Util - * @example - * - * _.times(2, _.noop); - * // => [undefined, undefined] - */ -function noop() { - // No operation performed. -} - -/* harmony default export */ const lodash_es_noop = (noop); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_setToArray.js -var _setToArray = __webpack_require__(29959); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_createSet.js - - - - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0; - -/** - * Creates a set object of `values`. - * - * @private - * @param {Array} values The values to add to the set. - * @returns {Object} Returns the new set. - */ -var createSet = !(_Set/* default */.A && (1 / (0,_setToArray/* default */.A)(new _Set/* default */.A([,-0]))[1]) == INFINITY) ? lodash_es_noop : function(values) { - return new _Set/* default */.A(values); -}; - -/* harmony default export */ const _createSet = (createSet); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseUniq.js - - - - - - - -/** Used as the size to enable large array optimizations. */ -var LARGE_ARRAY_SIZE = 200; - -/** - * The base implementation of `_.uniqBy` without support for iteratee shorthands. - * - * @private - * @param {Array} array The array to inspect. - * @param {Function} [iteratee] The iteratee invoked per element. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new duplicate free array. - */ -function baseUniq(array, iteratee, comparator) { - var index = -1, - includes = _arrayIncludes, - length = array.length, - isCommon = true, - result = [], - seen = result; - - if (comparator) { - isCommon = false; - includes = _arrayIncludesWith; - } - else if (length >= LARGE_ARRAY_SIZE) { - var set = iteratee ? null : _createSet(array); - if (set) { - return (0,_setToArray/* default */.A)(set); - } - isCommon = false; - includes = _cacheHas/* default */.A; - seen = new _SetCache/* default */.A; - } - else { - seen = iteratee ? [] : result; - } - outer: - while (++index < length) { - var value = array[index], - computed = iteratee ? iteratee(value) : value; - - value = (comparator || value !== 0) ? value : 0; - if (isCommon && computed === computed) { - var seenIndex = seen.length; - while (seenIndex--) { - if (seen[seenIndex] === computed) { - continue outer; - } - } - if (iteratee) { - seen.push(computed); - } - result.push(value); - } - else if (!includes(seen, computed, comparator)) { - if (seen !== result) { - seen.push(computed); - } - result.push(value); - } - } - return result; -} - -/* harmony default export */ const _baseUniq = (baseUniq); - -// EXTERNAL MODULE: ./node_modules/lodash-es/isArrayLikeObject.js -var isArrayLikeObject = __webpack_require__(53533); -;// CONCATENATED MODULE: ./node_modules/lodash-es/union.js - - - - - -/** - * Creates an array of unique values, in order, from all given arrays using - * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @returns {Array} Returns the new array of combined values. - * @example - * - * _.union([2], [1, 2]); - * // => [2, 1] - */ -var union = (0,_baseRest/* default */.A)(function(arrays) { - return _baseUniq((0,_baseFlatten/* default */.A)(arrays, 1, isArrayLikeObject/* default */.A, true)); -}); - -/* harmony default export */ const lodash_es_union = (union); - -// EXTERNAL MODULE: ./node_modules/lodash-es/values.js + 1 modules -var values = __webpack_require__(38207); -// EXTERNAL MODULE: ./node_modules/lodash-es/reduce.js + 2 modules -var reduce = __webpack_require__(89463); -;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/graph.js - - -var DEFAULT_EDGE_NAME = '\x00'; -var GRAPH_NODE = '\x00'; -var EDGE_KEY_DELIM = '\x01'; - -// Implementation notes: -// -// * Node id query functions should return string ids for the nodes -// * Edge id query functions should return an "edgeObj", edge object, that is -// composed of enough information to uniquely identify an edge: {v, w, name}. -// * Internally we use an "edgeId", a stringified form of the edgeObj, to -// reference edges. This is because we need a performant way to look these -// edges up and, object properties, which have string keys, are the closest -// we're going to get to a performant hashtable in JavaScript. - -// Implementation notes: -// -// * Node id query functions should return string ids for the nodes -// * Edge id query functions should return an "edgeObj", edge object, that is -// composed of enough information to uniquely identify an edge: {v, w, name}. -// * Internally we use an "edgeId", a stringified form of the edgeObj, to -// reference edges. This is because we need a performant way to look these -// edges up and, object properties, which have string keys, are the closest -// we're going to get to a performant hashtable in JavaScript. -class Graph { - constructor(opts = {}) { - this._isDirected = has/* default */.A(opts, 'directed') ? opts.directed : true; - this._isMultigraph = has/* default */.A(opts, 'multigraph') ? opts.multigraph : false; - this._isCompound = has/* default */.A(opts, 'compound') ? opts.compound : false; - - // Label for the graph itself - this._label = undefined; - - // Defaults to be set when creating a new node - this._defaultNodeLabelFn = constant/* default */.A(undefined); - - // Defaults to be set when creating a new edge - this._defaultEdgeLabelFn = constant/* default */.A(undefined); - - // v -> label - this._nodes = {}; - - if (this._isCompound) { - // v -> parent - this._parent = {}; - - // v -> children - this._children = {}; - this._children[GRAPH_NODE] = {}; - } - - // v -> edgeObj - this._in = {}; - - // u -> v -> Number - this._preds = {}; - - // v -> edgeObj - this._out = {}; - - // v -> w -> Number - this._sucs = {}; - - // e -> edgeObj - this._edgeObjs = {}; - - // e -> label - this._edgeLabels = {}; - } - /* === Graph functions ========= */ - isDirected() { - return this._isDirected; - } - isMultigraph() { - return this._isMultigraph; - } - isCompound() { - return this._isCompound; - } - setGraph(label) { - this._label = label; - return this; - } - graph() { - return this._label; - } - /* === Node functions ========== */ - setDefaultNodeLabel(newDefault) { - if (!isFunction/* default */.A(newDefault)) { - newDefault = constant/* default */.A(newDefault); - } - this._defaultNodeLabelFn = newDefault; - return this; - } - nodeCount() { - return this._nodeCount; - } - nodes() { - return keys/* default */.A(this._nodes); - } - sources() { - var self = this; - return filter/* default */.A(this.nodes(), function (v) { - return isEmpty/* default */.A(self._in[v]); - }); - } - sinks() { - var self = this; - return filter/* default */.A(this.nodes(), function (v) { - return isEmpty/* default */.A(self._out[v]); - }); - } - setNodes(vs, value) { - var args = arguments; - var self = this; - forEach/* default */.A(vs, function (v) { - if (args.length > 1) { - self.setNode(v, value); - } else { - self.setNode(v); - } - }); - return this; - } - setNode(v, value) { - if (has/* default */.A(this._nodes, v)) { - if (arguments.length > 1) { - this._nodes[v] = value; - } - return this; - } - - // @ts-expect-error - this._nodes[v] = arguments.length > 1 ? value : this._defaultNodeLabelFn(v); - if (this._isCompound) { - this._parent[v] = GRAPH_NODE; - this._children[v] = {}; - this._children[GRAPH_NODE][v] = true; - } - this._in[v] = {}; - this._preds[v] = {}; - this._out[v] = {}; - this._sucs[v] = {}; - ++this._nodeCount; - return this; - } - node(v) { - return this._nodes[v]; - } - hasNode(v) { - return has/* default */.A(this._nodes, v); - } - removeNode(v) { - var self = this; - if (has/* default */.A(this._nodes, v)) { - var removeEdge = function (e) { - self.removeEdge(self._edgeObjs[e]); - }; - delete this._nodes[v]; - if (this._isCompound) { - this._removeFromParentsChildList(v); - delete this._parent[v]; - forEach/* default */.A(this.children(v), function (child) { - self.setParent(child); - }); - delete this._children[v]; - } - forEach/* default */.A(keys/* default */.A(this._in[v]), removeEdge); - delete this._in[v]; - delete this._preds[v]; - forEach/* default */.A(keys/* default */.A(this._out[v]), removeEdge); - delete this._out[v]; - delete this._sucs[v]; - --this._nodeCount; - } - return this; - } - setParent(v, parent) { - if (!this._isCompound) { - throw new Error('Cannot set parent in a non-compound graph'); - } - - if (isUndefined/* default */.A(parent)) { - parent = GRAPH_NODE; - } else { - // Coerce parent to string - parent += ''; - for (var ancestor = parent; !isUndefined/* default */.A(ancestor); ancestor = this.parent(ancestor)) { - if (ancestor === v) { - throw new Error('Setting ' + parent + ' as parent of ' + v + ' would create a cycle'); - } - } - - this.setNode(parent); - } - - this.setNode(v); - this._removeFromParentsChildList(v); - this._parent[v] = parent; - this._children[parent][v] = true; - return this; - } - _removeFromParentsChildList(v) { - delete this._children[this._parent[v]][v]; - } - parent(v) { - if (this._isCompound) { - var parent = this._parent[v]; - if (parent !== GRAPH_NODE) { - return parent; - } - } - } - children(v) { - if (isUndefined/* default */.A(v)) { - v = GRAPH_NODE; - } - - if (this._isCompound) { - var children = this._children[v]; - if (children) { - return keys/* default */.A(children); - } - } else if (v === GRAPH_NODE) { - return this.nodes(); - } else if (this.hasNode(v)) { - return []; - } - } - predecessors(v) { - var predsV = this._preds[v]; - if (predsV) { - return keys/* default */.A(predsV); - } - } - successors(v) { - var sucsV = this._sucs[v]; - if (sucsV) { - return keys/* default */.A(sucsV); - } - } - neighbors(v) { - var preds = this.predecessors(v); - if (preds) { - return lodash_es_union(preds, this.successors(v)); - } - } - isLeaf(v) { - var neighbors; - if (this.isDirected()) { - neighbors = this.successors(v); - } else { - neighbors = this.neighbors(v); - } - return neighbors.length === 0; - } - filterNodes(filter) { - // @ts-expect-error - var copy = new this.constructor({ - directed: this._isDirected, - multigraph: this._isMultigraph, - compound: this._isCompound, - }); - - copy.setGraph(this.graph()); - - var self = this; - forEach/* default */.A(this._nodes, function (value, v) { - if (filter(v)) { - copy.setNode(v, value); - } - }); - - forEach/* default */.A(this._edgeObjs, function (e) { - // @ts-expect-error - if (copy.hasNode(e.v) && copy.hasNode(e.w)) { - copy.setEdge(e, self.edge(e)); - } - }); - - var parents = {}; - function findParent(v) { - var parent = self.parent(v); - if (parent === undefined || copy.hasNode(parent)) { - parents[v] = parent; - return parent; - } else if (parent in parents) { - return parents[parent]; - } else { - return findParent(parent); - } - } - - if (this._isCompound) { - forEach/* default */.A(copy.nodes(), function (v) { - copy.setParent(v, findParent(v)); - }); - } - - return copy; - } - /* === Edge functions ========== */ - setDefaultEdgeLabel(newDefault) { - if (!isFunction/* default */.A(newDefault)) { - newDefault = constant/* default */.A(newDefault); - } - this._defaultEdgeLabelFn = newDefault; - return this; - } - edgeCount() { - return this._edgeCount; - } - edges() { - return values/* default */.A(this._edgeObjs); - } - setPath(vs, value) { - var self = this; - var args = arguments; - reduce/* default */.A(vs, function (v, w) { - if (args.length > 1) { - self.setEdge(v, w, value); - } else { - self.setEdge(v, w); - } - return w; - }); - return this; - } - /* - * setEdge(v, w, [value, [name]]) - * setEdge({ v, w, [name] }, [value]) - */ - setEdge() { - var v, w, name, value; - var valueSpecified = false; - var arg0 = arguments[0]; - - if (typeof arg0 === 'object' && arg0 !== null && 'v' in arg0) { - v = arg0.v; - w = arg0.w; - name = arg0.name; - if (arguments.length === 2) { - value = arguments[1]; - valueSpecified = true; - } - } else { - v = arg0; - w = arguments[1]; - name = arguments[3]; - if (arguments.length > 2) { - value = arguments[2]; - valueSpecified = true; - } - } - - v = '' + v; - w = '' + w; - if (!isUndefined/* default */.A(name)) { - name = '' + name; - } - - var e = edgeArgsToId(this._isDirected, v, w, name); - if (has/* default */.A(this._edgeLabels, e)) { - if (valueSpecified) { - this._edgeLabels[e] = value; - } - return this; - } - - if (!isUndefined/* default */.A(name) && !this._isMultigraph) { - throw new Error('Cannot set a named edge when isMultigraph = false'); - } - - // It didn't exist, so we need to create it. - // First ensure the nodes exist. - this.setNode(v); - this.setNode(w); - - // @ts-expect-error - this._edgeLabels[e] = valueSpecified ? value : this._defaultEdgeLabelFn(v, w, name); - - var edgeObj = edgeArgsToObj(this._isDirected, v, w, name); - // Ensure we add undirected edges in a consistent way. - v = edgeObj.v; - w = edgeObj.w; - - Object.freeze(edgeObj); - this._edgeObjs[e] = edgeObj; - incrementOrInitEntry(this._preds[w], v); - incrementOrInitEntry(this._sucs[v], w); - this._in[w][e] = edgeObj; - this._out[v][e] = edgeObj; - this._edgeCount++; - return this; - } - edge(v, w, name) { - var e = - arguments.length === 1 - ? edgeObjToId(this._isDirected, arguments[0]) - : edgeArgsToId(this._isDirected, v, w, name); - return this._edgeLabels[e]; - } - hasEdge(v, w, name) { - var e = - arguments.length === 1 - ? edgeObjToId(this._isDirected, arguments[0]) - : edgeArgsToId(this._isDirected, v, w, name); - return has/* default */.A(this._edgeLabels, e); - } - removeEdge(v, w, name) { - var e = - arguments.length === 1 - ? edgeObjToId(this._isDirected, arguments[0]) - : edgeArgsToId(this._isDirected, v, w, name); - var edge = this._edgeObjs[e]; - if (edge) { - v = edge.v; - w = edge.w; - delete this._edgeLabels[e]; - delete this._edgeObjs[e]; - decrementOrRemoveEntry(this._preds[w], v); - decrementOrRemoveEntry(this._sucs[v], w); - delete this._in[w][e]; - delete this._out[v][e]; - this._edgeCount--; - } - return this; - } - inEdges(v, u) { - var inV = this._in[v]; - if (inV) { - var edges = values/* default */.A(inV); - if (!u) { - return edges; - } - return filter/* default */.A(edges, function (edge) { - return edge.v === u; - }); - } - } - outEdges(v, w) { - var outV = this._out[v]; - if (outV) { - var edges = values/* default */.A(outV); - if (!w) { - return edges; - } - return filter/* default */.A(edges, function (edge) { - return edge.w === w; - }); - } - } - nodeEdges(v, w) { - var inEdges = this.inEdges(v, w); - if (inEdges) { - return inEdges.concat(this.outEdges(v, w)); - } - } -} - -/* Number of nodes in the graph. Should only be changed by the implementation. */ -Graph.prototype._nodeCount = 0; - -/* Number of edges in the graph. Should only be changed by the implementation. */ -Graph.prototype._edgeCount = 0; - -function incrementOrInitEntry(map, k) { - if (map[k]) { - map[k]++; - } else { - map[k] = 1; - } -} - -function decrementOrRemoveEntry(map, k) { - if (!--map[k]) { - delete map[k]; - } -} - -function edgeArgsToId(isDirected, v_, w_, name) { - var v = '' + v_; - var w = '' + w_; - if (!isDirected && v > w) { - var tmp = v; - v = w; - w = tmp; - } - return v + EDGE_KEY_DELIM + w + EDGE_KEY_DELIM + (isUndefined/* default */.A(name) ? DEFAULT_EDGE_NAME : name); -} - -function edgeArgsToObj(isDirected, v_, w_, name) { - var v = '' + v_; - var w = '' + w_; - if (!isDirected && v > w) { - var tmp = v; - v = w; - w = tmp; - } - var edgeObj = { v: v, w: w }; - if (name) { - edgeObj.name = name; - } - return edgeObj; -} - -function edgeObjToId(isDirected, edgeObj) { - return edgeArgsToId(isDirected, edgeObj.v, edgeObj.w, edgeObj.name); -} - - -/***/ }), - -/***/ 697: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ T: () => (/* reexport safe */ _graph_js__WEBPACK_IMPORTED_MODULE_0__.T) -/* harmony export */ }); -/* unused harmony export version */ -/* harmony import */ var _graph_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(73046); -// Includes only the "core" of graphlib - - - -const version = '2.1.9-pre'; - - - - -/***/ }), - -/***/ 62062: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ _SetCache) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_MapCache.js + 14 modules -var _MapCache = __webpack_require__(29471); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_setCacheAdd.js -/** Used to stand-in for `undefined` hash values. */ -var HASH_UNDEFINED = '__lodash_hash_undefined__'; - -/** - * Adds `value` to the array cache. - * - * @private - * @name add - * @memberOf SetCache - * @alias push - * @param {*} value The value to cache. - * @returns {Object} Returns the cache instance. - */ -function setCacheAdd(value) { - this.__data__.set(value, HASH_UNDEFINED); - return this; -} - -/* harmony default export */ const _setCacheAdd = (setCacheAdd); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_setCacheHas.js -/** - * Checks if `value` is in the array cache. - * - * @private - * @name has - * @memberOf SetCache - * @param {*} value The value to search for. - * @returns {number} Returns `true` if `value` is found, else `false`. - */ -function setCacheHas(value) { - return this.__data__.has(value); -} - -/* harmony default export */ const _setCacheHas = (setCacheHas); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_SetCache.js - - - - -/** - * - * Creates an array cache object to store unique values. - * - * @private - * @constructor - * @param {Array} [values] The values to cache. - */ -function SetCache(values) { - var index = -1, - length = values == null ? 0 : values.length; - - this.__data__ = new _MapCache/* default */.A; - while (++index < length) { - this.add(values[index]); - } -} - -// Add methods to `SetCache`. -SetCache.prototype.add = SetCache.prototype.push = _setCacheAdd; -SetCache.prototype.has = _setCacheHas; - -/* harmony default export */ const _SetCache = (SetCache); - - -/***/ }), - -/***/ 72641: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * A specialized version of `_.forEach` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns `array`. - */ -function arrayEach(array, iteratee) { - var index = -1, - length = array == null ? 0 : array.length; - - while (++index < length) { - if (iteratee(array[index], index, array) === false) { - break; - } - } - return array; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (arrayEach); - - -/***/ }), - -/***/ 2634: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * A specialized version of `_.filter` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {Array} Returns the new filtered array. - */ -function arrayFilter(array, predicate) { - var index = -1, - length = array == null ? 0 : array.length, - resIndex = 0, - result = []; - - while (++index < length) { - var value = array[index]; - if (predicate(value, index, array)) { - result[resIndex++] = value; - } - } - return result; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (arrayFilter); - - -/***/ }), - -/***/ 45572: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * A specialized version of `_.map` for arrays without support for iteratee - * shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the new mapped array. - */ -function arrayMap(array, iteratee) { - var index = -1, - length = array == null ? 0 : array.length, - result = Array(length); - - while (++index < length) { - result[index] = iteratee(array[index], index, array); - } - return result; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (arrayMap); - - -/***/ }), - -/***/ 76912: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * Appends the elements of `values` to `array`. - * - * @private - * @param {Array} array The array to modify. - * @param {Array} values The values to append. - * @returns {Array} Returns `array`. - */ -function arrayPush(array, values) { - var index = -1, - length = values.length, - offset = array.length; - - while (++index < length) { - array[offset + index] = values[index]; - } - return array; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (arrayPush); - - -/***/ }), - -/***/ 91641: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ _baseClone) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_Stack.js + 5 modules -var _Stack = __webpack_require__(11754); -// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayEach.js -var _arrayEach = __webpack_require__(72641); -// EXTERNAL MODULE: ./node_modules/lodash-es/_assignValue.js -var _assignValue = __webpack_require__(52851); -// EXTERNAL MODULE: ./node_modules/lodash-es/_copyObject.js -var _copyObject = __webpack_require__(22031); -// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js -var keys = __webpack_require__(27422); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseAssign.js - - - -/** - * The base implementation of `_.assign` without support for multiple sources - * or `customizer` functions. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @returns {Object} Returns `object`. - */ -function baseAssign(object, source) { - return object && (0,_copyObject/* default */.A)(source, (0,keys/* default */.A)(source), object); -} - -/* harmony default export */ const _baseAssign = (baseAssign); - -// EXTERNAL MODULE: ./node_modules/lodash-es/keysIn.js + 2 modules -var keysIn = __webpack_require__(55615); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseAssignIn.js - - - -/** - * The base implementation of `_.assignIn` without support for multiple sources - * or `customizer` functions. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @returns {Object} Returns `object`. - */ -function baseAssignIn(object, source) { - return object && (0,_copyObject/* default */.A)(source, (0,keysIn/* default */.A)(source), object); -} - -/* harmony default export */ const _baseAssignIn = (baseAssignIn); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_cloneBuffer.js -var _cloneBuffer = __webpack_require__(80154); -// EXTERNAL MODULE: ./node_modules/lodash-es/_copyArray.js -var _copyArray = __webpack_require__(39759); -// EXTERNAL MODULE: ./node_modules/lodash-es/_getSymbols.js -var _getSymbols = __webpack_require__(14792); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_copySymbols.js - - - -/** - * Copies own symbols of `source` to `object`. - * - * @private - * @param {Object} source The object to copy symbols from. - * @param {Object} [object={}] The object to copy symbols to. - * @returns {Object} Returns `object`. - */ -function copySymbols(source, object) { - return (0,_copyObject/* default */.A)(source, (0,_getSymbols/* default */.A)(source), object); -} - -/* harmony default export */ const _copySymbols = (copySymbols); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayPush.js -var _arrayPush = __webpack_require__(76912); -// EXTERNAL MODULE: ./node_modules/lodash-es/_getPrototype.js -var _getPrototype = __webpack_require__(15647); -// EXTERNAL MODULE: ./node_modules/lodash-es/stubArray.js -var stubArray = __webpack_require__(13153); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_getSymbolsIn.js - - - - - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeGetSymbols = Object.getOwnPropertySymbols; - -/** - * Creates an array of the own and inherited enumerable symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of symbols. - */ -var getSymbolsIn = !nativeGetSymbols ? stubArray/* default */.A : function(object) { - var result = []; - while (object) { - (0,_arrayPush/* default */.A)(result, (0,_getSymbols/* default */.A)(object)); - object = (0,_getPrototype/* default */.A)(object); - } - return result; -}; - -/* harmony default export */ const _getSymbolsIn = (getSymbolsIn); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_copySymbolsIn.js - - - -/** - * Copies own and inherited symbols of `source` to `object`. - * - * @private - * @param {Object} source The object to copy symbols from. - * @param {Object} [object={}] The object to copy symbols to. - * @returns {Object} Returns `object`. - */ -function copySymbolsIn(source, object) { - return (0,_copyObject/* default */.A)(source, _getSymbolsIn(source), object); -} - -/* harmony default export */ const _copySymbolsIn = (copySymbolsIn); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_getAllKeys.js -var _getAllKeys = __webpack_require__(19042); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGetAllKeys.js -var _baseGetAllKeys = __webpack_require__(33831); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_getAllKeysIn.js - - - - -/** - * Creates an array of own and inherited enumerable property names and - * symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names and symbols. - */ -function getAllKeysIn(object) { - return (0,_baseGetAllKeys/* default */.A)(object, keysIn/* default */.A, _getSymbolsIn); -} - -/* harmony default export */ const _getAllKeysIn = (getAllKeysIn); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_getTag.js + 3 modules -var _getTag = __webpack_require__(9779); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_initCloneArray.js -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var _initCloneArray_hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Initializes an array clone. - * - * @private - * @param {Array} array The array to clone. - * @returns {Array} Returns the initialized clone. - */ -function initCloneArray(array) { - var length = array.length, - result = new array.constructor(length); - - // Add properties assigned by `RegExp#exec`. - if (length && typeof array[0] == 'string' && _initCloneArray_hasOwnProperty.call(array, 'index')) { - result.index = array.index; - result.input = array.input; - } - return result; -} - -/* harmony default export */ const _initCloneArray = (initCloneArray); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_cloneArrayBuffer.js -var _cloneArrayBuffer = __webpack_require__(90565); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_cloneDataView.js - - -/** - * Creates a clone of `dataView`. - * - * @private - * @param {Object} dataView The data view to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the cloned data view. - */ -function cloneDataView(dataView, isDeep) { - var buffer = isDeep ? (0,_cloneArrayBuffer/* default */.A)(dataView.buffer) : dataView.buffer; - return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); -} - -/* harmony default export */ const _cloneDataView = (cloneDataView); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_cloneRegExp.js -/** Used to match `RegExp` flags from their coerced string values. */ -var reFlags = /\w*$/; - -/** - * Creates a clone of `regexp`. - * - * @private - * @param {Object} regexp The regexp to clone. - * @returns {Object} Returns the cloned regexp. - */ -function cloneRegExp(regexp) { - var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); - result.lastIndex = regexp.lastIndex; - return result; -} - -/* harmony default export */ const _cloneRegExp = (cloneRegExp); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_Symbol.js -var _Symbol = __webpack_require__(241); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_cloneSymbol.js - - -/** Used to convert symbols to primitives and strings. */ -var symbolProto = _Symbol/* default */.A ? _Symbol/* default */.A.prototype : undefined, - symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; - -/** - * Creates a clone of the `symbol` object. - * - * @private - * @param {Object} symbol The symbol object to clone. - * @returns {Object} Returns the cloned symbol object. - */ -function cloneSymbol(symbol) { - return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; -} - -/* harmony default export */ const _cloneSymbol = (cloneSymbol); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_cloneTypedArray.js -var _cloneTypedArray = __webpack_require__(1801); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_initCloneByTag.js - - - - - - -/** `Object#toString` result references. */ -var boolTag = '[object Boolean]', - dateTag = '[object Date]', - mapTag = '[object Map]', - numberTag = '[object Number]', - regexpTag = '[object RegExp]', - setTag = '[object Set]', - stringTag = '[object String]', - symbolTag = '[object Symbol]'; - -var arrayBufferTag = '[object ArrayBuffer]', - dataViewTag = '[object DataView]', - float32Tag = '[object Float32Array]', - float64Tag = '[object Float64Array]', - int8Tag = '[object Int8Array]', - int16Tag = '[object Int16Array]', - int32Tag = '[object Int32Array]', - uint8Tag = '[object Uint8Array]', - uint8ClampedTag = '[object Uint8ClampedArray]', - uint16Tag = '[object Uint16Array]', - uint32Tag = '[object Uint32Array]'; - -/** - * Initializes an object clone based on its `toStringTag`. - * - * **Note:** This function only supports cloning values with tags of - * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`. - * - * @private - * @param {Object} object The object to clone. - * @param {string} tag The `toStringTag` of the object to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the initialized clone. - */ -function initCloneByTag(object, tag, isDeep) { - var Ctor = object.constructor; - switch (tag) { - case arrayBufferTag: - return (0,_cloneArrayBuffer/* default */.A)(object); - - case boolTag: - case dateTag: - return new Ctor(+object); - - case dataViewTag: - return _cloneDataView(object, isDeep); - - case float32Tag: case float64Tag: - case int8Tag: case int16Tag: case int32Tag: - case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: - return (0,_cloneTypedArray/* default */.A)(object, isDeep); - - case mapTag: - return new Ctor; - - case numberTag: - case stringTag: - return new Ctor(object); - - case regexpTag: - return _cloneRegExp(object); - - case setTag: - return new Ctor; - - case symbolTag: - return _cloneSymbol(object); - } -} - -/* harmony default export */ const _initCloneByTag = (initCloneByTag); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_initCloneObject.js + 1 modules -var _initCloneObject = __webpack_require__(18598); -// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js -var isArray = __webpack_require__(92049); -// EXTERNAL MODULE: ./node_modules/lodash-es/isBuffer.js + 1 modules -var isBuffer = __webpack_require__(99912); -// EXTERNAL MODULE: ./node_modules/lodash-es/isObjectLike.js -var isObjectLike = __webpack_require__(53098); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsMap.js - - - -/** `Object#toString` result references. */ -var _baseIsMap_mapTag = '[object Map]'; - -/** - * The base implementation of `_.isMap` without Node.js optimizations. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a map, else `false`. - */ -function baseIsMap(value) { - return (0,isObjectLike/* default */.A)(value) && (0,_getTag/* default */.A)(value) == _baseIsMap_mapTag; -} - -/* harmony default export */ const _baseIsMap = (baseIsMap); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseUnary.js -var _baseUnary = __webpack_require__(52789); -// EXTERNAL MODULE: ./node_modules/lodash-es/_nodeUtil.js -var _nodeUtil = __webpack_require__(64841); -;// CONCATENATED MODULE: ./node_modules/lodash-es/isMap.js - - - - -/* Node.js helper references. */ -var nodeIsMap = _nodeUtil/* default */.A && _nodeUtil/* default */.A.isMap; - -/** - * Checks if `value` is classified as a `Map` object. - * - * @static - * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a map, else `false`. - * @example - * - * _.isMap(new Map); - * // => true - * - * _.isMap(new WeakMap); - * // => false - */ -var isMap = nodeIsMap ? (0,_baseUnary/* default */.A)(nodeIsMap) : _baseIsMap; - -/* harmony default export */ const lodash_es_isMap = (isMap); - -// EXTERNAL MODULE: ./node_modules/lodash-es/isObject.js -var isObject = __webpack_require__(23149); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsSet.js - - - -/** `Object#toString` result references. */ -var _baseIsSet_setTag = '[object Set]'; - -/** - * The base implementation of `_.isSet` without Node.js optimizations. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a set, else `false`. - */ -function baseIsSet(value) { - return (0,isObjectLike/* default */.A)(value) && (0,_getTag/* default */.A)(value) == _baseIsSet_setTag; -} - -/* harmony default export */ const _baseIsSet = (baseIsSet); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/isSet.js - - - - -/* Node.js helper references. */ -var nodeIsSet = _nodeUtil/* default */.A && _nodeUtil/* default */.A.isSet; - -/** - * Checks if `value` is classified as a `Set` object. - * - * @static - * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a set, else `false`. - * @example - * - * _.isSet(new Set); - * // => true - * - * _.isSet(new WeakSet); - * // => false - */ -var isSet = nodeIsSet ? (0,_baseUnary/* default */.A)(nodeIsSet) : _baseIsSet; - -/* harmony default export */ const lodash_es_isSet = (isSet); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseClone.js - - - - - - - - - - - - - - - - - - - - - - - -/** Used to compose bitmasks for cloning. */ -var CLONE_DEEP_FLAG = 1, - CLONE_FLAT_FLAG = 2, - CLONE_SYMBOLS_FLAG = 4; - -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - _baseClone_boolTag = '[object Boolean]', - _baseClone_dateTag = '[object Date]', - errorTag = '[object Error]', - funcTag = '[object Function]', - genTag = '[object GeneratorFunction]', - _baseClone_mapTag = '[object Map]', - _baseClone_numberTag = '[object Number]', - objectTag = '[object Object]', - _baseClone_regexpTag = '[object RegExp]', - _baseClone_setTag = '[object Set]', - _baseClone_stringTag = '[object String]', - _baseClone_symbolTag = '[object Symbol]', - weakMapTag = '[object WeakMap]'; - -var _baseClone_arrayBufferTag = '[object ArrayBuffer]', - _baseClone_dataViewTag = '[object DataView]', - _baseClone_float32Tag = '[object Float32Array]', - _baseClone_float64Tag = '[object Float64Array]', - _baseClone_int8Tag = '[object Int8Array]', - _baseClone_int16Tag = '[object Int16Array]', - _baseClone_int32Tag = '[object Int32Array]', - _baseClone_uint8Tag = '[object Uint8Array]', - _baseClone_uint8ClampedTag = '[object Uint8ClampedArray]', - _baseClone_uint16Tag = '[object Uint16Array]', - _baseClone_uint32Tag = '[object Uint32Array]'; - -/** Used to identify `toStringTag` values supported by `_.clone`. */ -var cloneableTags = {}; -cloneableTags[argsTag] = cloneableTags[arrayTag] = -cloneableTags[_baseClone_arrayBufferTag] = cloneableTags[_baseClone_dataViewTag] = -cloneableTags[_baseClone_boolTag] = cloneableTags[_baseClone_dateTag] = -cloneableTags[_baseClone_float32Tag] = cloneableTags[_baseClone_float64Tag] = -cloneableTags[_baseClone_int8Tag] = cloneableTags[_baseClone_int16Tag] = -cloneableTags[_baseClone_int32Tag] = cloneableTags[_baseClone_mapTag] = -cloneableTags[_baseClone_numberTag] = cloneableTags[objectTag] = -cloneableTags[_baseClone_regexpTag] = cloneableTags[_baseClone_setTag] = -cloneableTags[_baseClone_stringTag] = cloneableTags[_baseClone_symbolTag] = -cloneableTags[_baseClone_uint8Tag] = cloneableTags[_baseClone_uint8ClampedTag] = -cloneableTags[_baseClone_uint16Tag] = cloneableTags[_baseClone_uint32Tag] = true; -cloneableTags[errorTag] = cloneableTags[funcTag] = -cloneableTags[weakMapTag] = false; - -/** - * The base implementation of `_.clone` and `_.cloneDeep` which tracks - * traversed objects. - * - * @private - * @param {*} value The value to clone. - * @param {boolean} bitmask The bitmask flags. - * 1 - Deep clone - * 2 - Flatten inherited properties - * 4 - Clone symbols - * @param {Function} [customizer] The function to customize cloning. - * @param {string} [key] The key of `value`. - * @param {Object} [object] The parent object of `value`. - * @param {Object} [stack] Tracks traversed objects and their clone counterparts. - * @returns {*} Returns the cloned value. - */ -function baseClone(value, bitmask, customizer, key, object, stack) { - var result, - isDeep = bitmask & CLONE_DEEP_FLAG, - isFlat = bitmask & CLONE_FLAT_FLAG, - isFull = bitmask & CLONE_SYMBOLS_FLAG; - - if (customizer) { - result = object ? customizer(value, key, object, stack) : customizer(value); - } - if (result !== undefined) { - return result; - } - if (!(0,isObject/* default */.A)(value)) { - return value; - } - var isArr = (0,isArray/* default */.A)(value); - if (isArr) { - result = _initCloneArray(value); - if (!isDeep) { - return (0,_copyArray/* default */.A)(value, result); - } - } else { - var tag = (0,_getTag/* default */.A)(value), - isFunc = tag == funcTag || tag == genTag; - - if ((0,isBuffer/* default */.A)(value)) { - return (0,_cloneBuffer/* default */.A)(value, isDeep); - } - if (tag == objectTag || tag == argsTag || (isFunc && !object)) { - result = (isFlat || isFunc) ? {} : (0,_initCloneObject/* default */.A)(value); - if (!isDeep) { - return isFlat - ? _copySymbolsIn(value, _baseAssignIn(result, value)) - : _copySymbols(value, _baseAssign(result, value)); - } - } else { - if (!cloneableTags[tag]) { - return object ? value : {}; - } - result = _initCloneByTag(value, tag, isDeep); - } - } - // Check for circular references and return its corresponding clone. - stack || (stack = new _Stack/* default */.A); - var stacked = stack.get(value); - if (stacked) { - return stacked; - } - stack.set(value, result); - - if (lodash_es_isSet(value)) { - value.forEach(function(subValue) { - result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack)); - }); - } else if (lodash_es_isMap(value)) { - value.forEach(function(subValue, key) { - result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack)); - }); - } - - var keysFunc = isFull - ? (isFlat ? _getAllKeysIn : _getAllKeys/* default */.A) - : (isFlat ? keysIn/* default */.A : keys/* default */.A); - - var props = isArr ? undefined : keysFunc(value); - (0,_arrayEach/* default */.A)(props || value, function(subValue, key) { - if (props) { - key = subValue; - subValue = value[key]; - } - // Recursively populate clone (susceptible to call stack limits). - (0,_assignValue/* default */.A)(result, key, baseClone(subValue, bitmask, customizer, key, value, stack)); - }); - return result; -} - -/* harmony default export */ const _baseClone = (baseClone); - - -/***/ }), - -/***/ 6240: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ _baseEach) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseForOwn.js -var _baseForOwn = __webpack_require__(79841); -// EXTERNAL MODULE: ./node_modules/lodash-es/isArrayLike.js -var isArrayLike = __webpack_require__(38446); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_createBaseEach.js - - -/** - * Creates a `baseEach` or `baseEachRight` function. - * - * @private - * @param {Function} eachFunc The function to iterate over a collection. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new base function. - */ -function createBaseEach(eachFunc, fromRight) { - return function(collection, iteratee) { - if (collection == null) { - return collection; - } - if (!(0,isArrayLike/* default */.A)(collection)) { - return eachFunc(collection, iteratee); - } - var length = collection.length, - index = fromRight ? length : -1, - iterable = Object(collection); - - while ((fromRight ? index-- : ++index < length)) { - if (iteratee(iterable[index], index, iterable) === false) { - break; - } - } - return collection; - }; -} - -/* harmony default export */ const _createBaseEach = (createBaseEach); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseEach.js - - - -/** - * The base implementation of `_.forEach` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array|Object} Returns `collection`. - */ -var baseEach = _createBaseEach(_baseForOwn/* default */.A); - -/* harmony default export */ const _baseEach = (baseEach); - - -/***/ }), - -/***/ 25707: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * The base implementation of `_.findIndex` and `_.findLastIndex` without - * support for iteratee shorthands. - * - * @private - * @param {Array} array The array to inspect. - * @param {Function} predicate The function invoked per iteration. - * @param {number} fromIndex The index to search from. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function baseFindIndex(array, predicate, fromIndex, fromRight) { - var length = array.length, - index = fromIndex + (fromRight ? 1 : -1); - - while ((fromRight ? index-- : ++index < length)) { - if (predicate(array[index], index, array)) { - return index; - } - } - return -1; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseFindIndex); - - -/***/ }), - -/***/ 13588: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ _baseFlatten) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayPush.js -var _arrayPush = __webpack_require__(76912); -// EXTERNAL MODULE: ./node_modules/lodash-es/_Symbol.js -var _Symbol = __webpack_require__(241); -// EXTERNAL MODULE: ./node_modules/lodash-es/isArguments.js + 1 modules -var isArguments = __webpack_require__(52274); -// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js -var isArray = __webpack_require__(92049); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_isFlattenable.js - - - - -/** Built-in value references. */ -var spreadableSymbol = _Symbol/* default */.A ? _Symbol/* default */.A.isConcatSpreadable : undefined; - -/** - * Checks if `value` is a flattenable `arguments` object or array. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. - */ -function isFlattenable(value) { - return (0,isArray/* default */.A)(value) || (0,isArguments/* default */.A)(value) || - !!(spreadableSymbol && value && value[spreadableSymbol]); -} - -/* harmony default export */ const _isFlattenable = (isFlattenable); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseFlatten.js - - - -/** - * The base implementation of `_.flatten` with support for restricting flattening. - * - * @private - * @param {Array} array The array to flatten. - * @param {number} depth The maximum recursion depth. - * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. - * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. - * @param {Array} [result=[]] The initial result value. - * @returns {Array} Returns the new flattened array. - */ -function baseFlatten(array, depth, predicate, isStrict, result) { - var index = -1, - length = array.length; - - predicate || (predicate = _isFlattenable); - result || (result = []); - - while (++index < length) { - var value = array[index]; - if (depth > 0 && predicate(value)) { - if (depth > 1) { - // Recursively flatten arrays (susceptible to call stack limits). - baseFlatten(value, depth - 1, predicate, isStrict, result); - } else { - (0,_arrayPush/* default */.A)(result, value); - } - } else if (!isStrict) { - result[result.length] = value; - } - } - return result; -} - -/* harmony default export */ const _baseFlatten = (baseFlatten); - - -/***/ }), - -/***/ 79841: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _baseFor_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4574); -/* harmony import */ var _keys_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(27422); - - - -/** - * The base implementation of `_.forOwn` without support for iteratee shorthands. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Object} Returns `object`. - */ -function baseForOwn(object, iteratee) { - return object && (0,_baseFor_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(object, iteratee, _keys_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseForOwn); - - -/***/ }), - -/***/ 66318: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _castPath_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7819); -/* harmony import */ var _toKey_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(30901); - - - -/** - * The base implementation of `_.get` without support for default values. - * - * @private - * @param {Object} object The object to query. - * @param {Array|string} path The path of the property to get. - * @returns {*} Returns the resolved value. - */ -function baseGet(object, path) { - path = (0,_castPath_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(path, object); - - var index = 0, - length = path.length; - - while (object != null && index < length) { - object = object[(0,_toKey_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(path[index++])]; - } - return (index && index == length) ? object : undefined; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseGet); - - -/***/ }), - -/***/ 33831: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _arrayPush_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(76912); -/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(92049); - - - -/** - * The base implementation of `getAllKeys` and `getAllKeysIn` which uses - * `keysFunc` and `symbolsFunc` to get the enumerable property names and - * symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @param {Function} keysFunc The function to get the keys of `object`. - * @param {Function} symbolsFunc The function to get the symbols of `object`. - * @returns {Array} Returns the array of property names and symbols. - */ -function baseGetAllKeys(object, keysFunc, symbolsFunc) { - var result = keysFunc(object); - return (0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(object) ? result : (0,_arrayPush_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(result, symbolsFunc(object)); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseGetAllKeys); - - -/***/ }), - -/***/ 49574: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ _baseIteratee) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_Stack.js + 5 modules -var _Stack = __webpack_require__(11754); -// EXTERNAL MODULE: ./node_modules/lodash-es/_SetCache.js + 2 modules -var _SetCache = __webpack_require__(62062); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_arraySome.js -/** - * A specialized version of `_.some` for arrays without support for iteratee - * shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {boolean} Returns `true` if any element passes the predicate check, - * else `false`. - */ -function arraySome(array, predicate) { - var index = -1, - length = array == null ? 0 : array.length; - - while (++index < length) { - if (predicate(array[index], index, array)) { - return true; - } - } - return false; -} - -/* harmony default export */ const _arraySome = (arraySome); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_cacheHas.js -var _cacheHas = __webpack_require__(64099); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_equalArrays.js - - - - -/** Used to compose bitmasks for value comparisons. */ -var COMPARE_PARTIAL_FLAG = 1, - COMPARE_UNORDERED_FLAG = 2; - -/** - * A specialized version of `baseIsEqualDeep` for arrays with support for - * partial deep comparisons. - * - * @private - * @param {Array} array The array to compare. - * @param {Array} other The other array to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} stack Tracks traversed `array` and `other` objects. - * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. - */ -function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { - var isPartial = bitmask & COMPARE_PARTIAL_FLAG, - arrLength = array.length, - othLength = other.length; - - if (arrLength != othLength && !(isPartial && othLength > arrLength)) { - return false; - } - // Check that cyclic values are equal. - var arrStacked = stack.get(array); - var othStacked = stack.get(other); - if (arrStacked && othStacked) { - return arrStacked == other && othStacked == array; - } - var index = -1, - result = true, - seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new _SetCache/* default */.A : undefined; - - stack.set(array, other); - stack.set(other, array); - - // Ignore non-index properties. - while (++index < arrLength) { - var arrValue = array[index], - othValue = other[index]; - - if (customizer) { - var compared = isPartial - ? customizer(othValue, arrValue, index, other, array, stack) - : customizer(arrValue, othValue, index, array, other, stack); - } - if (compared !== undefined) { - if (compared) { - continue; - } - result = false; - break; - } - // Recursively compare arrays (susceptible to call stack limits). - if (seen) { - if (!_arraySome(other, function(othValue, othIndex) { - if (!(0,_cacheHas/* default */.A)(seen, othIndex) && - (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { - return seen.push(othIndex); - } - })) { - result = false; - break; - } - } else if (!( - arrValue === othValue || - equalFunc(arrValue, othValue, bitmask, customizer, stack) - )) { - result = false; - break; - } - } - stack['delete'](array); - stack['delete'](other); - return result; -} - -/* harmony default export */ const _equalArrays = (equalArrays); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_Symbol.js -var _Symbol = __webpack_require__(241); -// EXTERNAL MODULE: ./node_modules/lodash-es/_Uint8Array.js -var _Uint8Array = __webpack_require__(43988); -// EXTERNAL MODULE: ./node_modules/lodash-es/eq.js -var eq = __webpack_require__(66984); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_mapToArray.js -/** - * Converts `map` to its key-value pairs. - * - * @private - * @param {Object} map The map to convert. - * @returns {Array} Returns the key-value pairs. - */ -function mapToArray(map) { - var index = -1, - result = Array(map.size); - - map.forEach(function(value, key) { - result[++index] = [key, value]; - }); - return result; -} - -/* harmony default export */ const _mapToArray = (mapToArray); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_setToArray.js -var _setToArray = __webpack_require__(29959); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_equalByTag.js - - - - - - - -/** Used to compose bitmasks for value comparisons. */ -var _equalByTag_COMPARE_PARTIAL_FLAG = 1, - _equalByTag_COMPARE_UNORDERED_FLAG = 2; - -/** `Object#toString` result references. */ -var boolTag = '[object Boolean]', - dateTag = '[object Date]', - errorTag = '[object Error]', - mapTag = '[object Map]', - numberTag = '[object Number]', - regexpTag = '[object RegExp]', - setTag = '[object Set]', - stringTag = '[object String]', - symbolTag = '[object Symbol]'; - -var arrayBufferTag = '[object ArrayBuffer]', - dataViewTag = '[object DataView]'; - -/** Used to convert symbols to primitives and strings. */ -var symbolProto = _Symbol/* default */.A ? _Symbol/* default */.A.prototype : undefined, - symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; - -/** - * A specialized version of `baseIsEqualDeep` for comparing objects of - * the same `toStringTag`. - * - * **Note:** This function only supports comparing values with tags of - * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {string} tag The `toStringTag` of the objects to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} stack Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ -function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { - switch (tag) { - case dataViewTag: - if ((object.byteLength != other.byteLength) || - (object.byteOffset != other.byteOffset)) { - return false; - } - object = object.buffer; - other = other.buffer; - - case arrayBufferTag: - if ((object.byteLength != other.byteLength) || - !equalFunc(new _Uint8Array/* default */.A(object), new _Uint8Array/* default */.A(other))) { - return false; - } - return true; - - case boolTag: - case dateTag: - case numberTag: - // Coerce booleans to `1` or `0` and dates to milliseconds. - // Invalid dates are coerced to `NaN`. - return (0,eq/* default */.A)(+object, +other); - - case errorTag: - return object.name == other.name && object.message == other.message; - - case regexpTag: - case stringTag: - // Coerce regexes to strings and treat strings, primitives and objects, - // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring - // for more details. - return object == (other + ''); - - case mapTag: - var convert = _mapToArray; - - case setTag: - var isPartial = bitmask & _equalByTag_COMPARE_PARTIAL_FLAG; - convert || (convert = _setToArray/* default */.A); - - if (object.size != other.size && !isPartial) { - return false; - } - // Assume cyclic values are equal. - var stacked = stack.get(object); - if (stacked) { - return stacked == other; - } - bitmask |= _equalByTag_COMPARE_UNORDERED_FLAG; - - // Recursively compare objects (susceptible to call stack limits). - stack.set(object, other); - var result = _equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); - stack['delete'](object); - return result; - - case symbolTag: - if (symbolValueOf) { - return symbolValueOf.call(object) == symbolValueOf.call(other); - } - } - return false; -} - -/* harmony default export */ const _equalByTag = (equalByTag); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_getAllKeys.js -var _getAllKeys = __webpack_require__(19042); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_equalObjects.js - - -/** Used to compose bitmasks for value comparisons. */ -var _equalObjects_COMPARE_PARTIAL_FLAG = 1; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var _equalObjects_hasOwnProperty = objectProto.hasOwnProperty; - -/** - * A specialized version of `baseIsEqualDeep` for objects with support for - * partial deep comparisons. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} stack Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ -function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { - var isPartial = bitmask & _equalObjects_COMPARE_PARTIAL_FLAG, - objProps = (0,_getAllKeys/* default */.A)(object), - objLength = objProps.length, - othProps = (0,_getAllKeys/* default */.A)(other), - othLength = othProps.length; - - if (objLength != othLength && !isPartial) { - return false; - } - var index = objLength; - while (index--) { - var key = objProps[index]; - if (!(isPartial ? key in other : _equalObjects_hasOwnProperty.call(other, key))) { - return false; - } - } - // Check that cyclic values are equal. - var objStacked = stack.get(object); - var othStacked = stack.get(other); - if (objStacked && othStacked) { - return objStacked == other && othStacked == object; - } - var result = true; - stack.set(object, other); - stack.set(other, object); - - var skipCtor = isPartial; - while (++index < objLength) { - key = objProps[index]; - var objValue = object[key], - othValue = other[key]; - - if (customizer) { - var compared = isPartial - ? customizer(othValue, objValue, key, other, object, stack) - : customizer(objValue, othValue, key, object, other, stack); - } - // Recursively compare objects (susceptible to call stack limits). - if (!(compared === undefined - ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) - : compared - )) { - result = false; - break; - } - skipCtor || (skipCtor = key == 'constructor'); - } - if (result && !skipCtor) { - var objCtor = object.constructor, - othCtor = other.constructor; - - // Non `Object` object instances with different constructors are not equal. - if (objCtor != othCtor && - ('constructor' in object && 'constructor' in other) && - !(typeof objCtor == 'function' && objCtor instanceof objCtor && - typeof othCtor == 'function' && othCtor instanceof othCtor)) { - result = false; - } - } - stack['delete'](object); - stack['delete'](other); - return result; -} - -/* harmony default export */ const _equalObjects = (equalObjects); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_getTag.js + 3 modules -var _getTag = __webpack_require__(9779); -// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js -var isArray = __webpack_require__(92049); -// EXTERNAL MODULE: ./node_modules/lodash-es/isBuffer.js + 1 modules -var isBuffer = __webpack_require__(99912); -// EXTERNAL MODULE: ./node_modules/lodash-es/isTypedArray.js + 1 modules -var isTypedArray = __webpack_require__(33858); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsEqualDeep.js - - - - - - - - - -/** Used to compose bitmasks for value comparisons. */ -var _baseIsEqualDeep_COMPARE_PARTIAL_FLAG = 1; - -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - objectTag = '[object Object]'; - -/** Used for built-in method references. */ -var _baseIsEqualDeep_objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var _baseIsEqualDeep_hasOwnProperty = _baseIsEqualDeep_objectProto.hasOwnProperty; - -/** - * A specialized version of `baseIsEqual` for arrays and objects which performs - * deep comparisons and tracks traversed objects enabling objects with circular - * references to be compared. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} [stack] Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ -function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { - var objIsArr = (0,isArray/* default */.A)(object), - othIsArr = (0,isArray/* default */.A)(other), - objTag = objIsArr ? arrayTag : (0,_getTag/* default */.A)(object), - othTag = othIsArr ? arrayTag : (0,_getTag/* default */.A)(other); - - objTag = objTag == argsTag ? objectTag : objTag; - othTag = othTag == argsTag ? objectTag : othTag; - - var objIsObj = objTag == objectTag, - othIsObj = othTag == objectTag, - isSameTag = objTag == othTag; - - if (isSameTag && (0,isBuffer/* default */.A)(object)) { - if (!(0,isBuffer/* default */.A)(other)) { - return false; - } - objIsArr = true; - objIsObj = false; - } - if (isSameTag && !objIsObj) { - stack || (stack = new _Stack/* default */.A); - return (objIsArr || (0,isTypedArray/* default */.A)(object)) - ? _equalArrays(object, other, bitmask, customizer, equalFunc, stack) - : _equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); - } - if (!(bitmask & _baseIsEqualDeep_COMPARE_PARTIAL_FLAG)) { - var objIsWrapped = objIsObj && _baseIsEqualDeep_hasOwnProperty.call(object, '__wrapped__'), - othIsWrapped = othIsObj && _baseIsEqualDeep_hasOwnProperty.call(other, '__wrapped__'); - - if (objIsWrapped || othIsWrapped) { - var objUnwrapped = objIsWrapped ? object.value() : object, - othUnwrapped = othIsWrapped ? other.value() : other; - - stack || (stack = new _Stack/* default */.A); - return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); - } - } - if (!isSameTag) { - return false; - } - stack || (stack = new _Stack/* default */.A); - return _equalObjects(object, other, bitmask, customizer, equalFunc, stack); -} - -/* harmony default export */ const _baseIsEqualDeep = (baseIsEqualDeep); - -// EXTERNAL MODULE: ./node_modules/lodash-es/isObjectLike.js -var isObjectLike = __webpack_require__(53098); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsEqual.js - - - -/** - * The base implementation of `_.isEqual` which supports partial comparisons - * and tracks traversed objects. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @param {boolean} bitmask The bitmask flags. - * 1 - Unordered comparison - * 2 - Partial comparison - * @param {Function} [customizer] The function to customize comparisons. - * @param {Object} [stack] Tracks traversed `value` and `other` objects. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - */ -function baseIsEqual(value, other, bitmask, customizer, stack) { - if (value === other) { - return true; - } - if (value == null || other == null || (!(0,isObjectLike/* default */.A)(value) && !(0,isObjectLike/* default */.A)(other))) { - return value !== value && other !== other; - } - return _baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); -} - -/* harmony default export */ const _baseIsEqual = (baseIsEqual); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsMatch.js - - - -/** Used to compose bitmasks for value comparisons. */ -var _baseIsMatch_COMPARE_PARTIAL_FLAG = 1, - _baseIsMatch_COMPARE_UNORDERED_FLAG = 2; - -/** - * The base implementation of `_.isMatch` without support for iteratee shorthands. - * - * @private - * @param {Object} object The object to inspect. - * @param {Object} source The object of property values to match. - * @param {Array} matchData The property names, values, and compare flags to match. - * @param {Function} [customizer] The function to customize comparisons. - * @returns {boolean} Returns `true` if `object` is a match, else `false`. - */ -function baseIsMatch(object, source, matchData, customizer) { - var index = matchData.length, - length = index, - noCustomizer = !customizer; - - if (object == null) { - return !length; - } - object = Object(object); - while (index--) { - var data = matchData[index]; - if ((noCustomizer && data[2]) - ? data[1] !== object[data[0]] - : !(data[0] in object) - ) { - return false; - } - } - while (++index < length) { - data = matchData[index]; - var key = data[0], - objValue = object[key], - srcValue = data[1]; - - if (noCustomizer && data[2]) { - if (objValue === undefined && !(key in object)) { - return false; - } - } else { - var stack = new _Stack/* default */.A; - if (customizer) { - var result = customizer(objValue, srcValue, key, object, source, stack); - } - if (!(result === undefined - ? _baseIsEqual(srcValue, objValue, _baseIsMatch_COMPARE_PARTIAL_FLAG | _baseIsMatch_COMPARE_UNORDERED_FLAG, customizer, stack) - : result - )) { - return false; - } - } - } - return true; -} - -/* harmony default export */ const _baseIsMatch = (baseIsMatch); - -// EXTERNAL MODULE: ./node_modules/lodash-es/isObject.js -var isObject = __webpack_require__(23149); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_isStrictComparable.js - - -/** - * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` if suitable for strict - * equality comparisons, else `false`. - */ -function isStrictComparable(value) { - return value === value && !(0,isObject/* default */.A)(value); -} - -/* harmony default export */ const _isStrictComparable = (isStrictComparable); - -// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js -var keys = __webpack_require__(27422); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_getMatchData.js - - - -/** - * Gets the property names, values, and compare flags of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the match data of `object`. - */ -function getMatchData(object) { - var result = (0,keys/* default */.A)(object), - length = result.length; - - while (length--) { - var key = result[length], - value = object[key]; - - result[length] = [key, value, _isStrictComparable(value)]; - } - return result; -} - -/* harmony default export */ const _getMatchData = (getMatchData); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_matchesStrictComparable.js -/** - * A specialized version of `matchesProperty` for source values suitable - * for strict equality comparisons, i.e. `===`. - * - * @private - * @param {string} key The key of the property to get. - * @param {*} srcValue The value to match. - * @returns {Function} Returns the new spec function. - */ -function matchesStrictComparable(key, srcValue) { - return function(object) { - if (object == null) { - return false; - } - return object[key] === srcValue && - (srcValue !== undefined || (key in Object(object))); - }; -} - -/* harmony default export */ const _matchesStrictComparable = (matchesStrictComparable); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseMatches.js - - - - -/** - * The base implementation of `_.matches` which doesn't clone `source`. - * - * @private - * @param {Object} source The object of property values to match. - * @returns {Function} Returns the new spec function. - */ -function baseMatches(source) { - var matchData = _getMatchData(source); - if (matchData.length == 1 && matchData[0][2]) { - return _matchesStrictComparable(matchData[0][0], matchData[0][1]); - } - return function(object) { - return object === source || _baseIsMatch(object, source, matchData); - }; -} - -/* harmony default export */ const _baseMatches = (baseMatches); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGet.js -var _baseGet = __webpack_require__(66318); -;// CONCATENATED MODULE: ./node_modules/lodash-es/get.js - - -/** - * Gets the value at `path` of `object`. If the resolved value is - * `undefined`, the `defaultValue` is returned in its place. - * - * @static - * @memberOf _ - * @since 3.7.0 - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path of the property to get. - * @param {*} [defaultValue] The value returned for `undefined` resolved values. - * @returns {*} Returns the resolved value. - * @example - * - * var object = { 'a': [{ 'b': { 'c': 3 } }] }; - * - * _.get(object, 'a[0].b.c'); - * // => 3 - * - * _.get(object, ['a', '0', 'b', 'c']); - * // => 3 - * - * _.get(object, 'a.b.c', 'default'); - * // => 'default' - */ -function get(object, path, defaultValue) { - var result = object == null ? undefined : (0,_baseGet/* default */.A)(object, path); - return result === undefined ? defaultValue : result; -} - -/* harmony default export */ const lodash_es_get = (get); - -// EXTERNAL MODULE: ./node_modules/lodash-es/hasIn.js + 1 modules -var hasIn = __webpack_require__(39188); -// EXTERNAL MODULE: ./node_modules/lodash-es/_isKey.js -var _isKey = __webpack_require__(86586); -// EXTERNAL MODULE: ./node_modules/lodash-es/_toKey.js -var _toKey = __webpack_require__(30901); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseMatchesProperty.js - - - - - - - - -/** Used to compose bitmasks for value comparisons. */ -var _baseMatchesProperty_COMPARE_PARTIAL_FLAG = 1, - _baseMatchesProperty_COMPARE_UNORDERED_FLAG = 2; - -/** - * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. - * - * @private - * @param {string} path The path of the property to get. - * @param {*} srcValue The value to match. - * @returns {Function} Returns the new spec function. - */ -function baseMatchesProperty(path, srcValue) { - if ((0,_isKey/* default */.A)(path) && _isStrictComparable(srcValue)) { - return _matchesStrictComparable((0,_toKey/* default */.A)(path), srcValue); - } - return function(object) { - var objValue = lodash_es_get(object, path); - return (objValue === undefined && objValue === srcValue) - ? (0,hasIn/* default */.A)(object, path) - : _baseIsEqual(srcValue, objValue, _baseMatchesProperty_COMPARE_PARTIAL_FLAG | _baseMatchesProperty_COMPARE_UNORDERED_FLAG); - }; -} - -/* harmony default export */ const _baseMatchesProperty = (baseMatchesProperty); - -// EXTERNAL MODULE: ./node_modules/lodash-es/identity.js -var identity = __webpack_require__(29008); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseProperty.js -var _baseProperty = __webpack_require__(70805); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_basePropertyDeep.js - - -/** - * A specialized version of `baseProperty` which supports deep paths. - * - * @private - * @param {Array|string} path The path of the property to get. - * @returns {Function} Returns the new accessor function. - */ -function basePropertyDeep(path) { - return function(object) { - return (0,_baseGet/* default */.A)(object, path); - }; -} - -/* harmony default export */ const _basePropertyDeep = (basePropertyDeep); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/property.js - - - - - -/** - * Creates a function that returns the value at `path` of a given object. - * - * @static - * @memberOf _ - * @since 2.4.0 - * @category Util - * @param {Array|string} path The path of the property to get. - * @returns {Function} Returns the new accessor function. - * @example - * - * var objects = [ - * { 'a': { 'b': 2 } }, - * { 'a': { 'b': 1 } } - * ]; - * - * _.map(objects, _.property('a.b')); - * // => [2, 1] - * - * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b'); - * // => [1, 2] - */ -function property(path) { - return (0,_isKey/* default */.A)(path) ? (0,_baseProperty/* default */.A)((0,_toKey/* default */.A)(path)) : _basePropertyDeep(path); -} - -/* harmony default export */ const lodash_es_property = (property); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIteratee.js - - - - - - -/** - * The base implementation of `_.iteratee`. - * - * @private - * @param {*} [value=_.identity] The value to convert to an iteratee. - * @returns {Function} Returns the iteratee. - */ -function baseIteratee(value) { - // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. - // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. - if (typeof value == 'function') { - return value; - } - if (value == null) { - return identity/* default */.A; - } - if (typeof value == 'object') { - return (0,isArray/* default */.A)(value) - ? _baseMatchesProperty(value[0], value[1]) - : _baseMatches(value); - } - return lodash_es_property(value); -} - -/* harmony default export */ const _baseIteratee = (baseIteratee); - - -/***/ }), - -/***/ 52568: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _baseEach_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6240); -/* harmony import */ var _isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(38446); - - - -/** - * The base implementation of `_.map` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the new mapped array. - */ -function baseMap(collection, iteratee) { - var index = -1, - result = (0,_isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(collection) ? Array(collection.length) : []; - - (0,_baseEach_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(collection, function(value, key, collection) { - result[++index] = iteratee(value, key, collection); - }); - return result; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseMap); - - -/***/ }), - -/***/ 70805: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * The base implementation of `_.property` without support for deep paths. - * - * @private - * @param {string} key The key of the property to get. - * @returns {Function} Returns the new accessor function. - */ -function baseProperty(key) { - return function(object) { - return object == null ? undefined : object[key]; - }; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseProperty); - - -/***/ }), - -/***/ 64099: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * Checks if a `cache` value for `key` exists. - * - * @private - * @param {Object} cache The cache to query. - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ -function cacheHas(cache, key) { - return cache.has(key); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (cacheHas); - - -/***/ }), - -/***/ 99922: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(29008); - - -/** - * Casts `value` to `identity` if it's not a function. - * - * @private - * @param {*} value The value to inspect. - * @returns {Function} Returns cast function. - */ -function castFunction(value) { - return typeof value == 'function' ? value : _identity_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (castFunction); - - -/***/ }), - -/***/ 7819: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ _castPath) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js -var isArray = __webpack_require__(92049); -// EXTERNAL MODULE: ./node_modules/lodash-es/_isKey.js -var _isKey = __webpack_require__(86586); -// EXTERNAL MODULE: ./node_modules/lodash-es/memoize.js -var memoize = __webpack_require__(46632); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_memoizeCapped.js - - -/** Used as the maximum memoize cache size. */ -var MAX_MEMOIZE_SIZE = 500; - -/** - * A specialized version of `_.memoize` which clears the memoized function's - * cache when it exceeds `MAX_MEMOIZE_SIZE`. - * - * @private - * @param {Function} func The function to have its output memoized. - * @returns {Function} Returns the new memoized function. - */ -function memoizeCapped(func) { - var result = (0,memoize/* default */.A)(func, function(key) { - if (cache.size === MAX_MEMOIZE_SIZE) { - cache.clear(); - } - return key; - }); - - var cache = result.cache; - return result; -} - -/* harmony default export */ const _memoizeCapped = (memoizeCapped); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_stringToPath.js - - -/** Used to match property names within property paths. */ -var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; - -/** Used to match backslashes in property paths. */ -var reEscapeChar = /\\(\\)?/g; - -/** - * Converts `string` to a property path array. - * - * @private - * @param {string} string The string to convert. - * @returns {Array} Returns the property path array. - */ -var stringToPath = _memoizeCapped(function(string) { - var result = []; - if (string.charCodeAt(0) === 46 /* . */) { - result.push(''); - } - string.replace(rePropName, function(match, number, quote, subString) { - result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match)); - }); - return result; -}); - -/* harmony default export */ const _stringToPath = (stringToPath); - -// EXTERNAL MODULE: ./node_modules/lodash-es/toString.js + 1 modules -var lodash_es_toString = __webpack_require__(28894); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_castPath.js - - - - - -/** - * Casts `value` to a path array if it's not one. - * - * @private - * @param {*} value The value to inspect. - * @param {Object} [object] The object to query keys on. - * @returns {Array} Returns the cast property path array. - */ -function castPath(value, object) { - if ((0,isArray/* default */.A)(value)) { - return value; - } - return (0,_isKey/* default */.A)(value, object) ? [value] : _stringToPath((0,lodash_es_toString/* default */.A)(value)); -} - -/* harmony default export */ const _castPath = (castPath); - - -/***/ }), - -/***/ 19042: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _baseGetAllKeys_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(33831); -/* harmony import */ var _getSymbols_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(14792); -/* harmony import */ var _keys_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(27422); - - - - -/** - * Creates an array of own enumerable property names and symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names and symbols. - */ -function getAllKeys(object) { - return (0,_baseGetAllKeys_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(object, _keys_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A, _getSymbols_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (getAllKeys); - - -/***/ }), - -/***/ 14792: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _arrayFilter_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2634); -/* harmony import */ var _stubArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13153); - - - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Built-in value references. */ -var propertyIsEnumerable = objectProto.propertyIsEnumerable; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeGetSymbols = Object.getOwnPropertySymbols; - -/** - * Creates an array of the own enumerable symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of symbols. - */ -var getSymbols = !nativeGetSymbols ? _stubArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A : function(object) { - if (object == null) { - return []; - } - object = Object(object); - return (0,_arrayFilter_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(nativeGetSymbols(object), function(symbol) { - return propertyIsEnumerable.call(object, symbol); - }); -}; - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (getSymbols); - - -/***/ }), - -/***/ 85054: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _castPath_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7819); -/* harmony import */ var _isArguments_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(52274); -/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(92049); -/* harmony import */ var _isIndex_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(25353); -/* harmony import */ var _isLength_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5254); -/* harmony import */ var _toKey_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(30901); - - - - - - - -/** - * Checks if `path` exists on `object`. - * - * @private - * @param {Object} object The object to query. - * @param {Array|string} path The path to check. - * @param {Function} hasFunc The function to check properties. - * @returns {boolean} Returns `true` if `path` exists, else `false`. - */ -function hasPath(object, path, hasFunc) { - path = (0,_castPath_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(path, object); - - var index = -1, - length = path.length, - result = false; - - while (++index < length) { - var key = (0,_toKey_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(path[index]); - if (!(result = object != null && hasFunc(object, key))) { - break; - } - object = object[key]; - } - if (result || ++index != length) { - return result; - } - length = object == null ? 0 : object.length; - return !!length && (0,_isLength_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)(length) && (0,_isIndex_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(key, length) && - ((0,_isArray_js__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .A)(object) || (0,_isArguments_js__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A)(object)); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (hasPath); - - -/***/ }), - -/***/ 86586: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(92049); -/* harmony import */ var _isSymbol_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(61882); - - - -/** Used to match property names within property paths. */ -var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, - reIsPlainProp = /^\w*$/; - -/** - * Checks if `value` is a property name and not a property path. - * - * @private - * @param {*} value The value to check. - * @param {Object} [object] The object to query keys on. - * @returns {boolean} Returns `true` if `value` is a property name, else `false`. - */ -function isKey(value, object) { - if ((0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(value)) { - return false; - } - var type = typeof value; - if (type == 'number' || type == 'symbol' || type == 'boolean' || - value == null || (0,_isSymbol_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(value)) { - return true; - } - return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || - (object != null && value in Object(object)); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isKey); - - -/***/ }), - -/***/ 29959: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * Converts `set` to an array of its values. - * - * @private - * @param {Object} set The set to convert. - * @returns {Array} Returns the values. - */ -function setToArray(set) { - var index = -1, - result = Array(set.size); - - set.forEach(function(value) { - result[++index] = value; - }); - return result; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (setToArray); - - -/***/ }), - -/***/ 30901: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _isSymbol_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(61882); - - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0; - -/** - * Converts `value` to a string key if it's not a string or symbol. - * - * @private - * @param {*} value The value to inspect. - * @returns {string|symbol} Returns the key. - */ -function toKey(value) { - if (typeof value == 'string' || (0,_isSymbol_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(value)) { - return value; - } - var result = (value + ''); - return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (toKey); - - -/***/ }), - -/***/ 23068: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _baseRest_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(24326); -/* harmony import */ var _eq_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(66984); -/* harmony import */ var _isIterateeCall_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6832); -/* harmony import */ var _keysIn_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(55615); - - - - - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Assigns own and inherited enumerable string keyed properties of source - * objects to the destination object for all destination properties that - * resolve to `undefined`. Source objects are applied from left to right. - * Once a property is set, additional values of the same property are ignored. - * - * **Note:** This method mutates `object`. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. - * @see _.defaultsDeep - * @example - * - * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); - * // => { 'a': 1, 'b': 2 } - */ -var defaults = (0,_baseRest_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(function(object, sources) { - object = Object(object); - - var index = -1; - var length = sources.length; - var guard = length > 2 ? sources[2] : undefined; - - if (guard && (0,_isIterateeCall_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(sources[0], sources[1], guard)) { - length = 1; - } - - while (++index < length) { - var source = sources[index]; - var props = (0,_keysIn_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)(source); - var propsIndex = -1; - var propsLength = props.length; - - while (++propsIndex < propsLength) { - var key = props[propsIndex]; - var value = object[key]; - - if (value === undefined || - ((0,_eq_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(value, objectProto[key]) && !hasOwnProperty.call(object, key))) { - object[key] = source[key]; - } - } - } - - return object; -}); - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (defaults); - - -/***/ }), - -/***/ 11662: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ lodash_es_filter) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayFilter.js -var _arrayFilter = __webpack_require__(2634); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseEach.js + 1 modules -var _baseEach = __webpack_require__(6240); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseFilter.js - - -/** - * The base implementation of `_.filter` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {Array} Returns the new filtered array. - */ -function baseFilter(collection, predicate) { - var result = []; - (0,_baseEach/* default */.A)(collection, function(value, index, collection) { - if (predicate(value, index, collection)) { - result.push(value); - } - }); - return result; -} - -/* harmony default export */ const _baseFilter = (baseFilter); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseIteratee.js + 16 modules -var _baseIteratee = __webpack_require__(49574); -// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js -var isArray = __webpack_require__(92049); -;// CONCATENATED MODULE: ./node_modules/lodash-es/filter.js - - - - - -/** - * Iterates over elements of `collection`, returning an array of all elements - * `predicate` returns truthy for. The predicate is invoked with three - * arguments: (value, index|key, collection). - * - * **Note:** Unlike `_.remove`, this method returns a new array. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @returns {Array} Returns the new filtered array. - * @see _.reject - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': true }, - * { 'user': 'fred', 'age': 40, 'active': false } - * ]; - * - * _.filter(users, function(o) { return !o.active; }); - * // => objects for ['fred'] - * - * // The `_.matches` iteratee shorthand. - * _.filter(users, { 'age': 36, 'active': true }); - * // => objects for ['barney'] - * - * // The `_.matchesProperty` iteratee shorthand. - * _.filter(users, ['active', false]); - * // => objects for ['fred'] - * - * // The `_.property` iteratee shorthand. - * _.filter(users, 'active'); - * // => objects for ['barney'] - * - * // Combining several predicates using `_.overEvery` or `_.overSome`. - * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]])); - * // => objects for ['fred', 'barney'] - */ -function filter(collection, predicate) { - var func = (0,isArray/* default */.A)(collection) ? _arrayFilter/* default */.A : _baseFilter; - return func(collection, (0,_baseIteratee/* default */.A)(predicate, 3)); -} - -/* harmony default export */ const lodash_es_filter = (filter); - - -/***/ }), - -/***/ 34098: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _baseFlatten_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13588); - - -/** - * Flattens `array` a single level deep. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to flatten. - * @returns {Array} Returns the new flattened array. - * @example - * - * _.flatten([1, [2, [3, [4]], 5]]); - * // => [1, 2, [3, [4]], 5] - */ -function flatten(array) { - var length = array == null ? 0 : array.length; - return length ? (0,_baseFlatten_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(array, 1) : []; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (flatten); - - -/***/ }), - -/***/ 8058: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _arrayEach_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(72641); -/* harmony import */ var _baseEach_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6240); -/* harmony import */ var _castFunction_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(99922); -/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(92049); - - - - - -/** - * Iterates over elements of `collection` and invokes `iteratee` for each element. - * The iteratee is invoked with three arguments: (value, index|key, collection). - * Iteratee functions may exit iteration early by explicitly returning `false`. - * - * **Note:** As with other "Collections" methods, objects with a "length" - * property are iterated like arrays. To avoid this behavior use `_.forIn` - * or `_.forOwn` for object iteration. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @alias each - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Array|Object} Returns `collection`. - * @see _.forEachRight - * @example - * - * _.forEach([1, 2], function(value) { - * console.log(value); - * }); - * // => Logs `1` then `2`. - * - * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { - * console.log(key); - * }); - * // => Logs 'a' then 'b' (iteration order is not guaranteed). - */ -function forEach(collection, iteratee) { - var func = (0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(collection) ? _arrayEach_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A : _baseEach_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A; - return func(collection, (0,_castFunction_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(iteratee)); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (forEach); - - -/***/ }), - -/***/ 48585: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ lodash_es_has) -}); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseHas.js -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var _baseHas_hasOwnProperty = objectProto.hasOwnProperty; - -/** - * The base implementation of `_.has` without support for deep paths. - * - * @private - * @param {Object} [object] The object to query. - * @param {Array|string} key The key to check. - * @returns {boolean} Returns `true` if `key` exists, else `false`. - */ -function baseHas(object, key) { - return object != null && _baseHas_hasOwnProperty.call(object, key); -} - -/* harmony default export */ const _baseHas = (baseHas); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_hasPath.js -var _hasPath = __webpack_require__(85054); -;// CONCATENATED MODULE: ./node_modules/lodash-es/has.js - - - -/** - * Checks if `path` is a direct property of `object`. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path to check. - * @returns {boolean} Returns `true` if `path` exists, else `false`. - * @example - * - * var object = { 'a': { 'b': 2 } }; - * var other = _.create({ 'a': _.create({ 'b': 2 }) }); - * - * _.has(object, 'a'); - * // => true - * - * _.has(object, 'a.b'); - * // => true - * - * _.has(object, ['a', 'b']); - * // => true - * - * _.has(other, 'a'); - * // => false - */ -function has(object, path) { - return object != null && (0,_hasPath/* default */.A)(object, path, _baseHas); -} - -/* harmony default export */ const lodash_es_has = (has); - - -/***/ }), - -/***/ 39188: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ lodash_es_hasIn) -}); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseHasIn.js -/** - * The base implementation of `_.hasIn` without support for deep paths. - * - * @private - * @param {Object} [object] The object to query. - * @param {Array|string} key The key to check. - * @returns {boolean} Returns `true` if `key` exists, else `false`. - */ -function baseHasIn(object, key) { - return object != null && key in Object(object); -} - -/* harmony default export */ const _baseHasIn = (baseHasIn); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_hasPath.js -var _hasPath = __webpack_require__(85054); -;// CONCATENATED MODULE: ./node_modules/lodash-es/hasIn.js - - - -/** - * Checks if `path` is a direct or inherited property of `object`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path to check. - * @returns {boolean} Returns `true` if `path` exists, else `false`. - * @example - * - * var object = _.create({ 'a': _.create({ 'b': 2 }) }); - * - * _.hasIn(object, 'a'); - * // => true - * - * _.hasIn(object, 'a.b'); - * // => true - * - * _.hasIn(object, ['a', 'b']); - * // => true - * - * _.hasIn(object, 'b'); - * // => false - */ -function hasIn(object, path) { - return object != null && (0,_hasPath/* default */.A)(object, path, _baseHasIn); -} - -/* harmony default export */ const lodash_es_hasIn = (hasIn); - - -/***/ }), - -/***/ 61882: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _baseGetTag_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(88496); -/* harmony import */ var _isObjectLike_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(53098); - - - -/** `Object#toString` result references. */ -var symbolTag = '[object Symbol]'; - -/** - * Checks if `value` is classified as a `Symbol` primitive or object. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. - * @example - * - * _.isSymbol(Symbol.iterator); - * // => true - * - * _.isSymbol('abc'); - * // => false - */ -function isSymbol(value) { - return typeof value == 'symbol' || - ((0,_isObjectLike_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(value) && (0,_baseGetTag_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(value) == symbolTag); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isSymbol); - - -/***/ }), - -/***/ 69592: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * Checks if `value` is `undefined`. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. - * @example - * - * _.isUndefined(void 0); - * // => true - * - * _.isUndefined(null); - * // => false - */ -function isUndefined(value) { - return value === undefined; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isUndefined); - - -/***/ }), - -/***/ 27422: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _arrayLikeKeys_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(83607); -/* harmony import */ var _baseKeys_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(69471); -/* harmony import */ var _isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(38446); - - - - -/** - * Creates an array of the own enumerable property names of `object`. - * - * **Note:** Non-object values are coerced to objects. See the - * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) - * for more details. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.keys(new Foo); - * // => ['a', 'b'] (iteration order is not guaranteed) - * - * _.keys('hi'); - * // => ['0', '1'] - */ -function keys(object) { - return (0,_isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(object) ? (0,_arrayLikeKeys_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(object) : (0,_baseKeys_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)(object); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (keys); - - -/***/ }), - -/***/ 74722: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _arrayMap_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(45572); -/* harmony import */ var _baseIteratee_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(49574); -/* harmony import */ var _baseMap_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(52568); -/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(92049); - - - - - -/** - * Creates an array of values by running each element in `collection` thru - * `iteratee`. The iteratee is invoked with three arguments: - * (value, index|key, collection). - * - * Many lodash methods are guarded to work as iteratees for methods like - * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. - * - * The guarded methods are: - * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, - * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`, - * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`, - * `template`, `trim`, `trimEnd`, `trimStart`, and `words` - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Array} Returns the new mapped array. - * @example - * - * function square(n) { - * return n * n; - * } - * - * _.map([4, 8], square); - * // => [16, 64] - * - * _.map({ 'a': 4, 'b': 8 }, square); - * // => [16, 64] (iteration order is not guaranteed) - * - * var users = [ - * { 'user': 'barney' }, - * { 'user': 'fred' } - * ]; - * - * // The `_.property` iteratee shorthand. - * _.map(users, 'user'); - * // => ['barney', 'fred'] - */ -function map(collection, iteratee) { - var func = (0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(collection) ? _arrayMap_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A : _baseMap_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A; - return func(collection, (0,_baseIteratee_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(iteratee, 3)); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (map); - - -/***/ }), - -/***/ 81942: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ lodash_es_pick) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGet.js -var _baseGet = __webpack_require__(66318); -// EXTERNAL MODULE: ./node_modules/lodash-es/_assignValue.js -var _assignValue = __webpack_require__(52851); -// EXTERNAL MODULE: ./node_modules/lodash-es/_castPath.js + 2 modules -var _castPath = __webpack_require__(7819); -// EXTERNAL MODULE: ./node_modules/lodash-es/_isIndex.js -var _isIndex = __webpack_require__(25353); -// EXTERNAL MODULE: ./node_modules/lodash-es/isObject.js -var isObject = __webpack_require__(23149); -// EXTERNAL MODULE: ./node_modules/lodash-es/_toKey.js -var _toKey = __webpack_require__(30901); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseSet.js - - - - - - -/** - * The base implementation of `_.set`. - * - * @private - * @param {Object} object The object to modify. - * @param {Array|string} path The path of the property to set. - * @param {*} value The value to set. - * @param {Function} [customizer] The function to customize path creation. - * @returns {Object} Returns `object`. - */ -function baseSet(object, path, value, customizer) { - if (!(0,isObject/* default */.A)(object)) { - return object; - } - path = (0,_castPath/* default */.A)(path, object); - - var index = -1, - length = path.length, - lastIndex = length - 1, - nested = object; - - while (nested != null && ++index < length) { - var key = (0,_toKey/* default */.A)(path[index]), - newValue = value; - - if (key === '__proto__' || key === 'constructor' || key === 'prototype') { - return object; - } - - if (index != lastIndex) { - var objValue = nested[key]; - newValue = customizer ? customizer(objValue, key, nested) : undefined; - if (newValue === undefined) { - newValue = (0,isObject/* default */.A)(objValue) - ? objValue - : ((0,_isIndex/* default */.A)(path[index + 1]) ? [] : {}); - } - } - (0,_assignValue/* default */.A)(nested, key, newValue); - nested = nested[key]; - } - return object; -} - -/* harmony default export */ const _baseSet = (baseSet); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_basePickBy.js - - - - -/** - * The base implementation of `_.pickBy` without support for iteratee shorthands. - * - * @private - * @param {Object} object The source object. - * @param {string[]} paths The property paths to pick. - * @param {Function} predicate The function invoked per property. - * @returns {Object} Returns the new object. - */ -function basePickBy(object, paths, predicate) { - var index = -1, - length = paths.length, - result = {}; - - while (++index < length) { - var path = paths[index], - value = (0,_baseGet/* default */.A)(object, path); - - if (predicate(value, path)) { - _baseSet(result, (0,_castPath/* default */.A)(path, object), value); - } - } - return result; -} - -/* harmony default export */ const _basePickBy = (basePickBy); - -// EXTERNAL MODULE: ./node_modules/lodash-es/hasIn.js + 1 modules -var hasIn = __webpack_require__(39188); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_basePick.js - - - -/** - * The base implementation of `_.pick` without support for individual - * property identifiers. - * - * @private - * @param {Object} object The source object. - * @param {string[]} paths The property paths to pick. - * @returns {Object} Returns the new object. - */ -function basePick(object, paths) { - return _basePickBy(object, paths, function(value, path) { - return (0,hasIn/* default */.A)(object, path); - }); -} - -/* harmony default export */ const _basePick = (basePick); - -// EXTERNAL MODULE: ./node_modules/lodash-es/flatten.js -var flatten = __webpack_require__(34098); -// EXTERNAL MODULE: ./node_modules/lodash-es/_overRest.js + 1 modules -var _overRest = __webpack_require__(76875); -// EXTERNAL MODULE: ./node_modules/lodash-es/_setToString.js + 2 modules -var _setToString = __webpack_require__(67525); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_flatRest.js - - - - -/** - * A specialized version of `baseRest` which flattens the rest array. - * - * @private - * @param {Function} func The function to apply a rest parameter to. - * @returns {Function} Returns the new function. - */ -function flatRest(func) { - return (0,_setToString/* default */.A)((0,_overRest/* default */.A)(func, undefined, flatten/* default */.A), func + ''); -} - -/* harmony default export */ const _flatRest = (flatRest); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/pick.js - - - -/** - * Creates an object composed of the picked `object` properties. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The source object. - * @param {...(string|string[])} [paths] The property paths to pick. - * @returns {Object} Returns the new object. - * @example - * - * var object = { 'a': 1, 'b': '2', 'c': 3 }; - * - * _.pick(object, ['a', 'c']); - * // => { 'a': 1, 'c': 3 } - */ -var pick = _flatRest(function(object, paths) { - return object == null ? {} : _basePick(object, paths); -}); - -/* harmony default export */ const lodash_es_pick = (pick); - - -/***/ }), - -/***/ 91395: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ lodash_es_range) -}); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseRange.js -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeCeil = Math.ceil, - nativeMax = Math.max; - -/** - * The base implementation of `_.range` and `_.rangeRight` which doesn't - * coerce arguments. - * - * @private - * @param {number} start The start of the range. - * @param {number} end The end of the range. - * @param {number} step The value to increment or decrement by. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Array} Returns the range of numbers. - */ -function baseRange(start, end, step, fromRight) { - var index = -1, - length = nativeMax(nativeCeil((end - start) / (step || 1)), 0), - result = Array(length); - - while (length--) { - result[fromRight ? length : ++index] = start; - start += step; - } - return result; -} - -/* harmony default export */ const _baseRange = (baseRange); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_isIterateeCall.js -var _isIterateeCall = __webpack_require__(6832); -// EXTERNAL MODULE: ./node_modules/lodash-es/toFinite.js + 3 modules -var toFinite = __webpack_require__(74342); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_createRange.js - - - - -/** - * Creates a `_.range` or `_.rangeRight` function. - * - * @private - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new range function. - */ -function createRange(fromRight) { - return function(start, end, step) { - if (step && typeof step != 'number' && (0,_isIterateeCall/* default */.A)(start, end, step)) { - end = step = undefined; - } - // Ensure the sign of `-0` is preserved. - start = (0,toFinite/* default */.A)(start); - if (end === undefined) { - end = start; - start = 0; - } else { - end = (0,toFinite/* default */.A)(end); - } - step = step === undefined ? (start < end ? 1 : -1) : (0,toFinite/* default */.A)(step); - return _baseRange(start, end, step, fromRight); - }; -} - -/* harmony default export */ const _createRange = (createRange); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/range.js - - -/** - * Creates an array of numbers (positive and/or negative) progressing from - * `start` up to, but not including, `end`. A step of `-1` is used if a negative - * `start` is specified without an `end` or `step`. If `end` is not specified, - * it's set to `start` with `start` then set to `0`. - * - * **Note:** JavaScript follows the IEEE-754 standard for resolving - * floating-point values which can produce unexpected results. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Util - * @param {number} [start=0] The start of the range. - * @param {number} end The end of the range. - * @param {number} [step=1] The value to increment or decrement by. - * @returns {Array} Returns the range of numbers. - * @see _.inRange, _.rangeRight - * @example - * - * _.range(4); - * // => [0, 1, 2, 3] - * - * _.range(-4); - * // => [0, -1, -2, -3] - * - * _.range(1, 5); - * // => [1, 2, 3, 4] - * - * _.range(0, 20, 5); - * // => [0, 5, 10, 15] - * - * _.range(0, -4, -1); - * // => [0, -1, -2, -3] - * - * _.range(1, 4, 0); - * // => [1, 1, 1] - * - * _.range(0); - * // => [] - */ -var range = _createRange(); - -/* harmony default export */ const lodash_es_range = (range); - - -/***/ }), - -/***/ 89463: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ lodash_es_reduce) -}); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_arrayReduce.js -/** - * A specialized version of `_.reduce` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {*} [accumulator] The initial value. - * @param {boolean} [initAccum] Specify using the first element of `array` as - * the initial value. - * @returns {*} Returns the accumulated value. - */ -function arrayReduce(array, iteratee, accumulator, initAccum) { - var index = -1, - length = array == null ? 0 : array.length; - - if (initAccum && length) { - accumulator = array[++index]; - } - while (++index < length) { - accumulator = iteratee(accumulator, array[index], index, array); - } - return accumulator; -} - -/* harmony default export */ const _arrayReduce = (arrayReduce); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseEach.js + 1 modules -var _baseEach = __webpack_require__(6240); -// EXTERNAL MODULE: ./node_modules/lodash-es/_baseIteratee.js + 16 modules -var _baseIteratee = __webpack_require__(49574); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseReduce.js -/** - * The base implementation of `_.reduce` and `_.reduceRight`, without support - * for iteratee shorthands, which iterates over `collection` using `eachFunc`. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {*} accumulator The initial value. - * @param {boolean} initAccum Specify using the first or last element of - * `collection` as the initial value. - * @param {Function} eachFunc The function to iterate over `collection`. - * @returns {*} Returns the accumulated value. - */ -function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { - eachFunc(collection, function(value, index, collection) { - accumulator = initAccum - ? (initAccum = false, value) - : iteratee(accumulator, value, index, collection); - }); - return accumulator; -} - -/* harmony default export */ const _baseReduce = (baseReduce); - -// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js -var isArray = __webpack_require__(92049); -;// CONCATENATED MODULE: ./node_modules/lodash-es/reduce.js - - - - - - -/** - * Reduces `collection` to a value which is the accumulated result of running - * each element in `collection` thru `iteratee`, where each successive - * invocation is supplied the return value of the previous. If `accumulator` - * is not given, the first element of `collection` is used as the initial - * value. The iteratee is invoked with four arguments: - * (accumulator, value, index|key, collection). - * - * Many lodash methods are guarded to work as iteratees for methods like - * `_.reduce`, `_.reduceRight`, and `_.transform`. - * - * The guarded methods are: - * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`, - * and `sortBy` - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @param {*} [accumulator] The initial value. - * @returns {*} Returns the accumulated value. - * @see _.reduceRight - * @example - * - * _.reduce([1, 2], function(sum, n) { - * return sum + n; - * }, 0); - * // => 3 - * - * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { - * (result[value] || (result[value] = [])).push(key); - * return result; - * }, {}); - * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed) - */ -function reduce(collection, iteratee, accumulator) { - var func = (0,isArray/* default */.A)(collection) ? _arrayReduce : _baseReduce, - initAccum = arguments.length < 3; - - return func(collection, (0,_baseIteratee/* default */.A)(iteratee, 4), accumulator, initAccum, _baseEach/* default */.A); -} - -/* harmony default export */ const lodash_es_reduce = (reduce); - - -/***/ }), - -/***/ 13153: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * This method returns a new empty array. - * - * @static - * @memberOf _ - * @since 4.13.0 - * @category Util - * @returns {Array} Returns the new empty array. - * @example - * - * var arrays = _.times(2, _.stubArray); - * - * console.log(arrays); - * // => [[], []] - * - * console.log(arrays[0] === arrays[1]); - * // => false - */ -function stubArray() { - return []; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (stubArray); - - -/***/ }), - -/***/ 74342: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ lodash_es_toFinite) -}); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_trimmedEndIndex.js -/** Used to match a single whitespace character. */ -var reWhitespace = /\s/; - -/** - * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace - * character of `string`. - * - * @private - * @param {string} string The string to inspect. - * @returns {number} Returns the index of the last non-whitespace character. - */ -function trimmedEndIndex(string) { - var index = string.length; - - while (index-- && reWhitespace.test(string.charAt(index))) {} - return index; -} - -/* harmony default export */ const _trimmedEndIndex = (trimmedEndIndex); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseTrim.js - - -/** Used to match leading whitespace. */ -var reTrimStart = /^\s+/; - -/** - * The base implementation of `_.trim`. - * - * @private - * @param {string} string The string to trim. - * @returns {string} Returns the trimmed string. - */ -function baseTrim(string) { - return string - ? string.slice(0, _trimmedEndIndex(string) + 1).replace(reTrimStart, '') - : string; -} - -/* harmony default export */ const _baseTrim = (baseTrim); - -// EXTERNAL MODULE: ./node_modules/lodash-es/isObject.js -var isObject = __webpack_require__(23149); -// EXTERNAL MODULE: ./node_modules/lodash-es/isSymbol.js -var isSymbol = __webpack_require__(61882); -;// CONCATENATED MODULE: ./node_modules/lodash-es/toNumber.js - - - - -/** Used as references for various `Number` constants. */ -var NAN = 0 / 0; - -/** Used to detect bad signed hexadecimal string values. */ -var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; - -/** Used to detect binary string values. */ -var reIsBinary = /^0b[01]+$/i; - -/** Used to detect octal string values. */ -var reIsOctal = /^0o[0-7]+$/i; - -/** Built-in method references without a dependency on `root`. */ -var freeParseInt = parseInt; - -/** - * Converts `value` to a number. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to process. - * @returns {number} Returns the number. - * @example - * - * _.toNumber(3.2); - * // => 3.2 - * - * _.toNumber(Number.MIN_VALUE); - * // => 5e-324 - * - * _.toNumber(Infinity); - * // => Infinity - * - * _.toNumber('3.2'); - * // => 3.2 - */ -function toNumber(value) { - if (typeof value == 'number') { - return value; - } - if ((0,isSymbol/* default */.A)(value)) { - return NAN; - } - if ((0,isObject/* default */.A)(value)) { - var other = typeof value.valueOf == 'function' ? value.valueOf() : value; - value = (0,isObject/* default */.A)(other) ? (other + '') : other; - } - if (typeof value != 'string') { - return value === 0 ? value : +value; - } - value = _baseTrim(value); - var isBinary = reIsBinary.test(value); - return (isBinary || reIsOctal.test(value)) - ? freeParseInt(value.slice(2), isBinary ? 2 : 8) - : (reIsBadHex.test(value) ? NAN : +value); -} - -/* harmony default export */ const lodash_es_toNumber = (toNumber); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/toFinite.js - - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0, - MAX_INTEGER = 1.7976931348623157e+308; - -/** - * Converts `value` to a finite number. - * - * @static - * @memberOf _ - * @since 4.12.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {number} Returns the converted number. - * @example - * - * _.toFinite(3.2); - * // => 3.2 - * - * _.toFinite(Number.MIN_VALUE); - * // => 5e-324 - * - * _.toFinite(Infinity); - * // => 1.7976931348623157e+308 - * - * _.toFinite('3.2'); - * // => 3.2 - */ -function toFinite(value) { - if (!value) { - return value === 0 ? value : 0; - } - value = lodash_es_toNumber(value); - if (value === INFINITY || value === -INFINITY) { - var sign = (value < 0 ? -1 : 1); - return sign * MAX_INTEGER; - } - return value === value ? value : 0; -} - -/* harmony default export */ const lodash_es_toFinite = (toFinite); - - -/***/ }), - -/***/ 28894: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ lodash_es_toString) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_Symbol.js -var _Symbol = __webpack_require__(241); -// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayMap.js -var _arrayMap = __webpack_require__(45572); -// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js -var isArray = __webpack_require__(92049); -// EXTERNAL MODULE: ./node_modules/lodash-es/isSymbol.js -var isSymbol = __webpack_require__(61882); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseToString.js - - - - - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0; - -/** Used to convert symbols to primitives and strings. */ -var symbolProto = _Symbol/* default */.A ? _Symbol/* default */.A.prototype : undefined, - symbolToString = symbolProto ? symbolProto.toString : undefined; - -/** - * The base implementation of `_.toString` which doesn't convert nullish - * values to empty strings. - * - * @private - * @param {*} value The value to process. - * @returns {string} Returns the string. - */ -function baseToString(value) { - // Exit early for strings to avoid a performance hit in some environments. - if (typeof value == 'string') { - return value; - } - if ((0,isArray/* default */.A)(value)) { - // Recursively convert values (susceptible to call stack limits). - return (0,_arrayMap/* default */.A)(value, baseToString) + ''; - } - if ((0,isSymbol/* default */.A)(value)) { - return symbolToString ? symbolToString.call(value) : ''; - } - var result = (value + ''); - return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; -} - -/* harmony default export */ const _baseToString = (baseToString); - -;// CONCATENATED MODULE: ./node_modules/lodash-es/toString.js - - -/** - * Converts `value` to a string. An empty string is returned for `null` - * and `undefined` values. The sign of `-0` is preserved. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {string} Returns the converted string. - * @example - * - * _.toString(null); - * // => '' - * - * _.toString(-0); - * // => '-0' - * - * _.toString([1, 2, 3]); - * // => '1,2,3' - */ -function toString_toString(value) { - return value == null ? '' : _baseToString(value); -} - -/* harmony default export */ const lodash_es_toString = (toString_toString); - - -/***/ }), - -/***/ 5664: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _toString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(28894); - - -/** Used to generate unique IDs. */ -var idCounter = 0; - -/** - * Generates a unique ID. If `prefix` is given, the ID is appended to it. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Util - * @param {string} [prefix=''] The value to prefix the ID with. - * @returns {string} Returns the unique ID. - * @example - * - * _.uniqueId('contact_'); - * // => 'contact_104' - * - * _.uniqueId(); - * // => '105' - */ -function uniqueId(prefix) { - var id = ++idCounter; - return (0,_toString_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(prefix) + id; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (uniqueId); - - -/***/ }), - -/***/ 38207: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - A: () => (/* binding */ lodash_es_values) -}); - -// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayMap.js -var _arrayMap = __webpack_require__(45572); -;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseValues.js - - -/** - * The base implementation of `_.values` and `_.valuesIn` which creates an - * array of `object` property values corresponding to the property names - * of `props`. - * - * @private - * @param {Object} object The object to query. - * @param {Array} props The property names to get values for. - * @returns {Object} Returns the array of property values. - */ -function baseValues(object, props) { - return (0,_arrayMap/* default */.A)(props, function(key) { - return object[key]; - }); -} - -/* harmony default export */ const _baseValues = (baseValues); - -// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js -var keys = __webpack_require__(27422); -;// CONCATENATED MODULE: ./node_modules/lodash-es/values.js - - - -/** - * Creates an array of the own enumerable string keyed property values of `object`. - * - * **Note:** Non-object values are coerced to objects. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property values. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.values(new Foo); - * // => [1, 2] (iteration order is not guaranteed) - * - * _.values('hi'); - * // => ['h', 'i'] - */ -function values(object) { - return object == null ? [] : _baseValues(object, (0,keys/* default */.A)(object)); -} - -/* harmony default export */ const lodash_es_values = (values); - - -/***/ }), - -/***/ 86770: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ diagram: () => (/* binding */ diagram) -/* harmony export */ }); -/* harmony import */ var _styles_9a916d00_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(21987); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(26312); -/* harmony import */ var dagre_d3_es_src_dagre_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(21176); -/* harmony import */ var dagre_d3_es_src_graphlib_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(697); -/* harmony import */ var _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(86079); -/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(74353); -/* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(16750); -/* harmony import */ var dompurify__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(99418); - - - - - - - - - - - - - - -let edgeCount = 0; -const drawEdge = function(elem, path, relation, conf, diagObj) { - const getRelationType = function(type) { - switch (type) { - case diagObj.db.relationType.AGGREGATION: - return "aggregation"; - case diagObj.db.relationType.EXTENSION: - return "extension"; - case diagObj.db.relationType.COMPOSITION: - return "composition"; - case diagObj.db.relationType.DEPENDENCY: - return "dependency"; - case diagObj.db.relationType.LOLLIPOP: - return "lollipop"; - } - }; - path.points = path.points.filter((p) => !Number.isNaN(p.y)); - const lineData = path.points; - const lineFunction = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .line */ .n8j)().x(function(d) { - return d.x; - }).y(function(d) { - return d.y; - }).curve(d3__WEBPACK_IMPORTED_MODULE_0__/* .curveBasis */ .qrM); - const svgPath = elem.append("path").attr("d", lineFunction(lineData)).attr("id", "edge" + edgeCount).attr("class", "relation"); - let url = ""; - if (conf.arrowMarkerAbsolute) { - url = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search; - url = url.replace(/\(/g, "\\("); - url = url.replace(/\)/g, "\\)"); - } - if (relation.relation.lineType == 1) { - svgPath.attr("class", "relation dashed-line"); - } - if (relation.relation.lineType == 10) { - svgPath.attr("class", "relation dotted-line"); - } - if (relation.relation.type1 !== "none") { - svgPath.attr( - "marker-start", - "url(" + url + "#" + getRelationType(relation.relation.type1) + "Start)" - ); - } - if (relation.relation.type2 !== "none") { - svgPath.attr( - "marker-end", - "url(" + url + "#" + getRelationType(relation.relation.type2) + "End)" - ); - } - let x, y; - const l = path.points.length; - let labelPosition = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.u.calcLabelPosition(path.points); - x = labelPosition.x; - y = labelPosition.y; - let p1_card_x, p1_card_y; - let p2_card_x, p2_card_y; - if (l % 2 !== 0 && l > 1) { - let cardinality_1_point = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.u.calcCardinalityPosition( - relation.relation.type1 !== "none", - path.points, - path.points[0] - ); - let cardinality_2_point = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.u.calcCardinalityPosition( - relation.relation.type2 !== "none", - path.points, - path.points[l - 1] - ); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.l.debug("cardinality_1_point " + JSON.stringify(cardinality_1_point)); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.l.debug("cardinality_2_point " + JSON.stringify(cardinality_2_point)); - p1_card_x = cardinality_1_point.x; - p1_card_y = cardinality_1_point.y; - p2_card_x = cardinality_2_point.x; - p2_card_y = cardinality_2_point.y; - } - if (relation.title !== void 0) { - const g = elem.append("g").attr("class", "classLabel"); - const label = g.append("text").attr("class", "label").attr("x", x).attr("y", y).attr("fill", "red").attr("text-anchor", "middle").text(relation.title); - window.label = label; - const bounds = label.node().getBBox(); - g.insert("rect", ":first-child").attr("class", "box").attr("x", bounds.x - conf.padding / 2).attr("y", bounds.y - conf.padding / 2).attr("width", bounds.width + conf.padding).attr("height", bounds.height + conf.padding); - } - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.l.info("Rendering relation " + JSON.stringify(relation)); - if (relation.relationTitle1 !== void 0 && relation.relationTitle1 !== "none") { - const g = elem.append("g").attr("class", "cardinality"); - g.append("text").attr("class", "type1").attr("x", p1_card_x).attr("y", p1_card_y).attr("fill", "black").attr("font-size", "6").text(relation.relationTitle1); - } - if (relation.relationTitle2 !== void 0 && relation.relationTitle2 !== "none") { - const g = elem.append("g").attr("class", "cardinality"); - g.append("text").attr("class", "type2").attr("x", p2_card_x).attr("y", p2_card_y).attr("fill", "black").attr("font-size", "6").text(relation.relationTitle2); - } - edgeCount++; -}; -const drawClass = function(elem, classDef, conf, diagObj) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.l.debug("Rendering class ", classDef, conf); - const id = classDef.id; - const classInfo = { - id, - label: classDef.id, - width: 0, - height: 0 - }; - const g = elem.append("g").attr("id", diagObj.db.lookUpDomId(id)).attr("class", "classGroup"); - let title; - if (classDef.link) { - title = g.append("svg:a").attr("xlink:href", classDef.link).attr("target", classDef.linkTarget).append("text").attr("y", conf.textHeight + conf.padding).attr("x", 0); - } else { - title = g.append("text").attr("y", conf.textHeight + conf.padding).attr("x", 0); - } - let isFirst = true; - classDef.annotations.forEach(function(member) { - const titleText2 = title.append("tspan").text("«" + member + "»"); - if (!isFirst) { - titleText2.attr("dy", conf.textHeight); - } - isFirst = false; - }); - let classTitleString = getClassTitleString(classDef); - const classTitle = title.append("tspan").text(classTitleString).attr("class", "title"); - if (!isFirst) { - classTitle.attr("dy", conf.textHeight); - } - const titleHeight = title.node().getBBox().height; - let membersLine; - let membersBox; - let methodsLine; - if (classDef.members.length > 0) { - membersLine = g.append("line").attr("x1", 0).attr("y1", conf.padding + titleHeight + conf.dividerMargin / 2).attr("y2", conf.padding + titleHeight + conf.dividerMargin / 2); - const members = g.append("text").attr("x", conf.padding).attr("y", titleHeight + conf.dividerMargin + conf.textHeight).attr("fill", "white").attr("class", "classText"); - isFirst = true; - classDef.members.forEach(function(member) { - addTspan(members, member, isFirst, conf); - isFirst = false; - }); - membersBox = members.node().getBBox(); - } - if (classDef.methods.length > 0) { - methodsLine = g.append("line").attr("x1", 0).attr("y1", conf.padding + titleHeight + conf.dividerMargin + membersBox.height).attr("y2", conf.padding + titleHeight + conf.dividerMargin + membersBox.height); - const methods = g.append("text").attr("x", conf.padding).attr("y", titleHeight + 2 * conf.dividerMargin + membersBox.height + conf.textHeight).attr("fill", "white").attr("class", "classText"); - isFirst = true; - classDef.methods.forEach(function(method) { - addTspan(methods, method, isFirst, conf); - isFirst = false; - }); - } - const classBox = g.node().getBBox(); - var cssClassStr = " "; - if (classDef.cssClasses.length > 0) { - cssClassStr = cssClassStr + classDef.cssClasses.join(" "); - } - const rect = g.insert("rect", ":first-child").attr("x", 0).attr("y", 0).attr("width", classBox.width + 2 * conf.padding).attr("height", classBox.height + conf.padding + 0.5 * conf.dividerMargin).attr("class", cssClassStr); - const rectWidth = rect.node().getBBox().width; - title.node().childNodes.forEach(function(x) { - x.setAttribute("x", (rectWidth - x.getBBox().width) / 2); - }); - if (classDef.tooltip) { - title.insert("title").text(classDef.tooltip); - } - if (membersLine) { - membersLine.attr("x2", rectWidth); - } - if (methodsLine) { - methodsLine.attr("x2", rectWidth); - } - classInfo.width = rectWidth; - classInfo.height = classBox.height + conf.padding + 0.5 * conf.dividerMargin; - return classInfo; -}; -const getClassTitleString = function(classDef) { - let classTitleString = classDef.id; - if (classDef.type) { - classTitleString += "<" + (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.x)(classDef.type) + ">"; - } - return classTitleString; -}; -const drawNote = function(elem, note, conf, diagObj) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.l.debug("Rendering note ", note, conf); - const id = note.id; - const noteInfo = { - id, - text: note.text, - width: 0, - height: 0 - }; - const g = elem.append("g").attr("id", id).attr("class", "classGroup"); - let text = g.append("text").attr("y", conf.textHeight + conf.padding).attr("x", 0); - const lines = JSON.parse(`"${note.text}"`).split("\n"); - lines.forEach(function(line2) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.l.debug(`Adding line: ${line2}`); - text.append("tspan").text(line2).attr("class", "title").attr("dy", conf.textHeight); - }); - const noteBox = g.node().getBBox(); - const rect = g.insert("rect", ":first-child").attr("x", 0).attr("y", 0).attr("width", noteBox.width + 2 * conf.padding).attr( - "height", - noteBox.height + lines.length * conf.textHeight + conf.padding + 0.5 * conf.dividerMargin - ); - const rectWidth = rect.node().getBBox().width; - text.node().childNodes.forEach(function(x) { - x.setAttribute("x", (rectWidth - x.getBBox().width) / 2); - }); - noteInfo.width = rectWidth; - noteInfo.height = noteBox.height + lines.length * conf.textHeight + conf.padding + 0.5 * conf.dividerMargin; - return noteInfo; -}; -const addTspan = function(textEl, member, isFirst, conf) { - const { displayText, cssStyle } = member.getDisplayDetails(); - const tSpan = textEl.append("tspan").attr("x", conf.padding).text(displayText); - if (cssStyle !== "") { - tSpan.attr("style", member.cssStyle); - } - if (!isFirst) { - tSpan.attr("dy", conf.textHeight); - } -}; -const svgDraw = { - getClassTitleString, - drawClass, - drawEdge, - drawNote -}; -let idCache = {}; -const padding = 20; -const getGraphId = function(label) { - const foundEntry = Object.entries(idCache).find((entry) => entry[1].label === label); - if (foundEntry) { - return foundEntry[0]; - } -}; -const insertMarkers = function(elem) { - elem.append("defs").append("marker").attr("id", "extensionStart").attr("class", "extension").attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 1,7 L18,13 V 1 Z"); - elem.append("defs").append("marker").attr("id", "extensionEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 1,1 V 13 L18,7 Z"); - elem.append("defs").append("marker").attr("id", "compositionStart").attr("class", "extension").attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"); - elem.append("defs").append("marker").attr("id", "compositionEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"); - elem.append("defs").append("marker").attr("id", "aggregationStart").attr("class", "extension").attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"); - elem.append("defs").append("marker").attr("id", "aggregationEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"); - elem.append("defs").append("marker").attr("id", "dependencyStart").attr("class", "extension").attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 5,7 L9,13 L1,7 L9,1 Z"); - elem.append("defs").append("marker").attr("id", "dependencyEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z"); -}; -const draw = function(text, id, _version, diagObj) { - const conf = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().class; - idCache = {}; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.l.info("Rendering diagram " + text); - const securityLevel = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.c)().securityLevel; - let sandboxElement; - if (securityLevel === "sandbox") { - sandboxElement = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)("#i" + id); - } - const root = securityLevel === "sandbox" ? (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(sandboxElement.nodes()[0].contentDocument.body) : (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)("body"); - const diagram2 = root.select(`[id='${id}']`); - insertMarkers(diagram2); - const g = new dagre_d3_es_src_graphlib_index_js__WEBPACK_IMPORTED_MODULE_2__/* .Graph */ .T({ - multigraph: true - }); - g.setGraph({ - isMultiGraph: true - }); - g.setDefaultEdgeLabel(function() { - return {}; - }); - const classes = diagObj.db.getClasses(); - const keys = Object.keys(classes); - for (const key of keys) { - const classDef = classes[key]; - const node = svgDraw.drawClass(diagram2, classDef, conf, diagObj); - idCache[node.id] = node; - g.setNode(node.id, node); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.l.info("Org height: " + node.height); - } - const relations = diagObj.db.getRelations(); - relations.forEach(function(relation) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.l.info( - // cspell:ignore tjoho - "tjoho" + getGraphId(relation.id1) + getGraphId(relation.id2) + JSON.stringify(relation) - ); - g.setEdge( - getGraphId(relation.id1), - getGraphId(relation.id2), - { - relation - }, - relation.title || "DEFAULT" - ); - }); - const notes = diagObj.db.getNotes(); - notes.forEach(function(note) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.l.debug(`Adding note: ${JSON.stringify(note)}`); - const node = svgDraw.drawNote(diagram2, note, conf, diagObj); - idCache[node.id] = node; - g.setNode(node.id, node); - if (note.class && note.class in classes) { - g.setEdge( - note.id, - getGraphId(note.class), - { - relation: { - id1: note.id, - id2: note.class, - relation: { - type1: "none", - type2: "none", - lineType: 10 - } - } - }, - "DEFAULT" - ); - } - }); - (0,dagre_d3_es_src_dagre_index_js__WEBPACK_IMPORTED_MODULE_1__/* .layout */ .Zp)(g); - g.nodes().forEach(function(v) { - if (v !== void 0 && g.node(v) !== void 0) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.l.debug("Node " + v + ": " + JSON.stringify(g.node(v))); - root.select("#" + (diagObj.db.lookUpDomId(v) || v)).attr( - "transform", - "translate(" + (g.node(v).x - g.node(v).width / 2) + "," + (g.node(v).y - g.node(v).height / 2) + " )" - ); - } - }); - g.edges().forEach(function(e) { - if (e !== void 0 && g.edge(e) !== void 0) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.l.debug("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(g.edge(e))); - svgDraw.drawEdge(diagram2, g.edge(e), g.edge(e).relation, conf, diagObj); - } - }); - const svgBounds = diagram2.node().getBBox(); - const width = svgBounds.width + padding * 2; - const height = svgBounds.height + padding * 2; - (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.i)(diagram2, height, width, conf.useMaxWidth); - const vBox = `${svgBounds.x - padding} ${svgBounds.y - padding} ${width} ${height}`; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_6__.l.debug(`viewBox ${vBox}`); - diagram2.attr("viewBox", vBox); -}; -const renderer = { - draw -}; -const diagram = { - parser: _styles_9a916d00_js__WEBPACK_IMPORTED_MODULE_7__.p, - db: _styles_9a916d00_js__WEBPACK_IMPORTED_MODULE_7__.d, - renderer, - styles: _styles_9a916d00_js__WEBPACK_IMPORTED_MODULE_7__.s, - init: (cnf) => { - if (!cnf.class) { - cnf.class = {}; - } - cnf.class.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute; - _styles_9a916d00_js__WEBPACK_IMPORTED_MODULE_7__.d.clear(); - } -}; - - - -/***/ }), - -/***/ 21987: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ d: () => (/* binding */ db), -/* harmony export */ p: () => (/* binding */ parser$1), -/* harmony export */ s: () => (/* binding */ styles) -/* harmony export */ }); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(26312); -/* harmony import */ var _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(86079); - - -var parser = function() { - var o = function(k, v, o2, l) { - for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) - ; - return o2; - }, $V0 = [1, 17], $V1 = [1, 18], $V2 = [1, 19], $V3 = [1, 39], $V4 = [1, 40], $V5 = [1, 25], $V6 = [1, 23], $V7 = [1, 24], $V8 = [1, 31], $V9 = [1, 32], $Va = [1, 33], $Vb = [1, 34], $Vc = [1, 35], $Vd = [1, 36], $Ve = [1, 26], $Vf = [1, 27], $Vg = [1, 28], $Vh = [1, 29], $Vi = [1, 43], $Vj = [1, 30], $Vk = [1, 42], $Vl = [1, 44], $Vm = [1, 41], $Vn = [1, 45], $Vo = [1, 9], $Vp = [1, 8, 9], $Vq = [1, 56], $Vr = [1, 57], $Vs = [1, 58], $Vt = [1, 59], $Vu = [1, 60], $Vv = [1, 61], $Vw = [1, 62], $Vx = [1, 8, 9, 39], $Vy = [1, 74], $Vz = [1, 8, 9, 12, 13, 21, 37, 39, 42, 59, 60, 61, 62, 63, 64, 65, 70, 72], $VA = [1, 8, 9, 12, 13, 19, 21, 37, 39, 42, 46, 59, 60, 61, 62, 63, 64, 65, 70, 72, 74, 80, 95, 97, 98], $VB = [13, 74, 80, 95, 97, 98], $VC = [13, 64, 65, 74, 80, 95, 97, 98], $VD = [13, 59, 60, 61, 62, 63, 74, 80, 95, 97, 98], $VE = [1, 93], $VF = [1, 110], $VG = [1, 108], $VH = [1, 102], $VI = [1, 103], $VJ = [1, 104], $VK = [1, 105], $VL = [1, 106], $VM = [1, 107], $VN = [1, 109], $VO = [1, 8, 9, 37, 39, 42], $VP = [1, 8, 9, 21], $VQ = [1, 8, 9, 78], $VR = [1, 8, 9, 21, 73, 74, 78, 80, 81, 82, 83, 84, 85]; - var parser2 = { - trace: function trace() { - }, - yy: {}, - symbols_: { "error": 2, "start": 3, "mermaidDoc": 4, "statements": 5, "graphConfig": 6, "CLASS_DIAGRAM": 7, "NEWLINE": 8, "EOF": 9, "statement": 10, "classLabel": 11, "SQS": 12, "STR": 13, "SQE": 14, "namespaceName": 15, "alphaNumToken": 16, "className": 17, "classLiteralName": 18, "GENERICTYPE": 19, "relationStatement": 20, "LABEL": 21, "namespaceStatement": 22, "classStatement": 23, "memberStatement": 24, "annotationStatement": 25, "clickStatement": 26, "styleStatement": 27, "cssClassStatement": 28, "noteStatement": 29, "direction": 30, "acc_title": 31, "acc_title_value": 32, "acc_descr": 33, "acc_descr_value": 34, "acc_descr_multiline_value": 35, "namespaceIdentifier": 36, "STRUCT_START": 37, "classStatements": 38, "STRUCT_STOP": 39, "NAMESPACE": 40, "classIdentifier": 41, "STYLE_SEPARATOR": 42, "members": 43, "CLASS": 44, "ANNOTATION_START": 45, "ANNOTATION_END": 46, "MEMBER": 47, "SEPARATOR": 48, "relation": 49, "NOTE_FOR": 50, "noteText": 51, "NOTE": 52, "direction_tb": 53, "direction_bt": 54, "direction_rl": 55, "direction_lr": 56, "relationType": 57, "lineType": 58, "AGGREGATION": 59, "EXTENSION": 60, "COMPOSITION": 61, "DEPENDENCY": 62, "LOLLIPOP": 63, "LINE": 64, "DOTTED_LINE": 65, "CALLBACK": 66, "LINK": 67, "LINK_TARGET": 68, "CLICK": 69, "CALLBACK_NAME": 70, "CALLBACK_ARGS": 71, "HREF": 72, "STYLE": 73, "ALPHA": 74, "stylesOpt": 75, "CSSCLASS": 76, "style": 77, "COMMA": 78, "styleComponent": 79, "NUM": 80, "COLON": 81, "UNIT": 82, "SPACE": 83, "BRKT": 84, "PCT": 85, "commentToken": 86, "textToken": 87, "graphCodeTokens": 88, "textNoTagsToken": 89, "TAGSTART": 90, "TAGEND": 91, "==": 92, "--": 93, "DEFAULT": 94, "MINUS": 95, "keywords": 96, "UNICODE_TEXT": 97, "BQUOTE_STR": 98, "$accept": 0, "$end": 1 }, - terminals_: { 2: "error", 7: "CLASS_DIAGRAM", 8: "NEWLINE", 9: "EOF", 12: "SQS", 13: "STR", 14: "SQE", 19: "GENERICTYPE", 21: "LABEL", 31: "acc_title", 32: "acc_title_value", 33: "acc_descr", 34: "acc_descr_value", 35: "acc_descr_multiline_value", 37: "STRUCT_START", 39: "STRUCT_STOP", 40: "NAMESPACE", 42: "STYLE_SEPARATOR", 44: "CLASS", 45: "ANNOTATION_START", 46: "ANNOTATION_END", 47: "MEMBER", 48: "SEPARATOR", 50: "NOTE_FOR", 52: "NOTE", 53: "direction_tb", 54: "direction_bt", 55: "direction_rl", 56: "direction_lr", 59: "AGGREGATION", 60: "EXTENSION", 61: "COMPOSITION", 62: "DEPENDENCY", 63: "LOLLIPOP", 64: "LINE", 65: "DOTTED_LINE", 66: "CALLBACK", 67: "LINK", 68: "LINK_TARGET", 69: "CLICK", 70: "CALLBACK_NAME", 71: "CALLBACK_ARGS", 72: "HREF", 73: "STYLE", 74: "ALPHA", 76: "CSSCLASS", 78: "COMMA", 80: "NUM", 81: "COLON", 82: "UNIT", 83: "SPACE", 84: "BRKT", 85: "PCT", 88: "graphCodeTokens", 90: "TAGSTART", 91: "TAGEND", 92: "==", 93: "--", 94: "DEFAULT", 95: "MINUS", 96: "keywords", 97: "UNICODE_TEXT", 98: "BQUOTE_STR" }, - productions_: [0, [3, 1], [3, 1], [4, 1], [6, 4], [5, 1], [5, 2], [5, 3], [11, 3], [15, 1], [15, 2], [17, 1], [17, 1], [17, 2], [17, 2], [17, 2], [10, 1], [10, 2], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 2], [10, 2], [10, 1], [22, 4], [22, 5], [36, 2], [38, 1], [38, 2], [38, 3], [23, 1], [23, 3], [23, 4], [23, 6], [41, 2], [41, 3], [25, 4], [43, 1], [43, 2], [24, 1], [24, 2], [24, 1], [24, 1], [20, 3], [20, 4], [20, 4], [20, 5], [29, 3], [29, 2], [30, 1], [30, 1], [30, 1], [30, 1], [49, 3], [49, 2], [49, 2], [49, 1], [57, 1], [57, 1], [57, 1], [57, 1], [57, 1], [58, 1], [58, 1], [26, 3], [26, 4], [26, 3], [26, 4], [26, 4], [26, 5], [26, 3], [26, 4], [26, 4], [26, 5], [26, 4], [26, 5], [26, 5], [26, 6], [27, 3], [28, 3], [75, 1], [75, 3], [77, 1], [77, 2], [79, 1], [79, 1], [79, 1], [79, 1], [79, 1], [79, 1], [79, 1], [79, 1], [79, 1], [86, 1], [86, 1], [87, 1], [87, 1], [87, 1], [87, 1], [87, 1], [87, 1], [87, 1], [89, 1], [89, 1], [89, 1], [89, 1], [16, 1], [16, 1], [16, 1], [16, 1], [18, 1], [51, 1]], - performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { - var $0 = $$.length - 1; - switch (yystate) { - case 8: - this.$ = $$[$0 - 1]; - break; - case 9: - case 11: - case 12: - this.$ = $$[$0]; - break; - case 10: - case 13: - this.$ = $$[$0 - 1] + $$[$0]; - break; - case 14: - case 15: - this.$ = $$[$0 - 1] + "~" + $$[$0] + "~"; - break; - case 16: - yy.addRelation($$[$0]); - break; - case 17: - $$[$0 - 1].title = yy.cleanupLabel($$[$0]); - yy.addRelation($$[$0 - 1]); - break; - case 27: - this.$ = $$[$0].trim(); - yy.setAccTitle(this.$); - break; - case 28: - case 29: - this.$ = $$[$0].trim(); - yy.setAccDescription(this.$); - break; - case 30: - yy.addClassesToNamespace($$[$0 - 3], $$[$0 - 1]); - break; - case 31: - yy.addClassesToNamespace($$[$0 - 4], $$[$0 - 1]); - break; - case 32: - this.$ = $$[$0]; - yy.addNamespace($$[$0]); - break; - case 33: - this.$ = [$$[$0]]; - break; - case 34: - this.$ = [$$[$0 - 1]]; - break; - case 35: - $$[$0].unshift($$[$0 - 2]); - this.$ = $$[$0]; - break; - case 37: - yy.setCssClass($$[$0 - 2], $$[$0]); - break; - case 38: - yy.addMembers($$[$0 - 3], $$[$0 - 1]); - break; - case 39: - yy.setCssClass($$[$0 - 5], $$[$0 - 3]); - yy.addMembers($$[$0 - 5], $$[$0 - 1]); - break; - case 40: - this.$ = $$[$0]; - yy.addClass($$[$0]); - break; - case 41: - this.$ = $$[$0 - 1]; - yy.addClass($$[$0 - 1]); - yy.setClassLabel($$[$0 - 1], $$[$0]); - break; - case 42: - yy.addAnnotation($$[$0], $$[$0 - 2]); - break; - case 43: - this.$ = [$$[$0]]; - break; - case 44: - $$[$0].push($$[$0 - 1]); - this.$ = $$[$0]; - break; - case 45: - break; - case 46: - yy.addMember($$[$0 - 1], yy.cleanupLabel($$[$0])); - break; - case 47: - break; - case 48: - break; - case 49: - this.$ = { "id1": $$[$0 - 2], "id2": $$[$0], relation: $$[$0 - 1], relationTitle1: "none", relationTitle2: "none" }; - break; - case 50: - this.$ = { id1: $$[$0 - 3], id2: $$[$0], relation: $$[$0 - 1], relationTitle1: $$[$0 - 2], relationTitle2: "none" }; - break; - case 51: - this.$ = { id1: $$[$0 - 3], id2: $$[$0], relation: $$[$0 - 2], relationTitle1: "none", relationTitle2: $$[$0 - 1] }; - break; - case 52: - this.$ = { id1: $$[$0 - 4], id2: $$[$0], relation: $$[$0 - 2], relationTitle1: $$[$0 - 3], relationTitle2: $$[$0 - 1] }; - break; - case 53: - yy.addNote($$[$0], $$[$0 - 1]); - break; - case 54: - yy.addNote($$[$0]); - break; - case 55: - yy.setDirection("TB"); - break; - case 56: - yy.setDirection("BT"); - break; - case 57: - yy.setDirection("RL"); - break; - case 58: - yy.setDirection("LR"); - break; - case 59: - this.$ = { type1: $$[$0 - 2], type2: $$[$0], lineType: $$[$0 - 1] }; - break; - case 60: - this.$ = { type1: "none", type2: $$[$0], lineType: $$[$0 - 1] }; - break; - case 61: - this.$ = { type1: $$[$0 - 1], type2: "none", lineType: $$[$0] }; - break; - case 62: - this.$ = { type1: "none", type2: "none", lineType: $$[$0] }; - break; - case 63: - this.$ = yy.relationType.AGGREGATION; - break; - case 64: - this.$ = yy.relationType.EXTENSION; - break; - case 65: - this.$ = yy.relationType.COMPOSITION; - break; - case 66: - this.$ = yy.relationType.DEPENDENCY; - break; - case 67: - this.$ = yy.relationType.LOLLIPOP; - break; - case 68: - this.$ = yy.lineType.LINE; - break; - case 69: - this.$ = yy.lineType.DOTTED_LINE; - break; - case 70: - case 76: - this.$ = $$[$0 - 2]; - yy.setClickEvent($$[$0 - 1], $$[$0]); - break; - case 71: - case 77: - this.$ = $$[$0 - 3]; - yy.setClickEvent($$[$0 - 2], $$[$0 - 1]); - yy.setTooltip($$[$0 - 2], $$[$0]); - break; - case 72: - this.$ = $$[$0 - 2]; - yy.setLink($$[$0 - 1], $$[$0]); - break; - case 73: - this.$ = $$[$0 - 3]; - yy.setLink($$[$0 - 2], $$[$0 - 1], $$[$0]); - break; - case 74: - this.$ = $$[$0 - 3]; - yy.setLink($$[$0 - 2], $$[$0 - 1]); - yy.setTooltip($$[$0 - 2], $$[$0]); - break; - case 75: - this.$ = $$[$0 - 4]; - yy.setLink($$[$0 - 3], $$[$0 - 2], $$[$0]); - yy.setTooltip($$[$0 - 3], $$[$0 - 1]); - break; - case 78: - this.$ = $$[$0 - 3]; - yy.setClickEvent($$[$0 - 2], $$[$0 - 1], $$[$0]); - break; - case 79: - this.$ = $$[$0 - 4]; - yy.setClickEvent($$[$0 - 3], $$[$0 - 2], $$[$0 - 1]); - yy.setTooltip($$[$0 - 3], $$[$0]); - break; - case 80: - this.$ = $$[$0 - 3]; - yy.setLink($$[$0 - 2], $$[$0]); - break; - case 81: - this.$ = $$[$0 - 4]; - yy.setLink($$[$0 - 3], $$[$0 - 1], $$[$0]); - break; - case 82: - this.$ = $$[$0 - 4]; - yy.setLink($$[$0 - 3], $$[$0 - 1]); - yy.setTooltip($$[$0 - 3], $$[$0]); - break; - case 83: - this.$ = $$[$0 - 5]; - yy.setLink($$[$0 - 4], $$[$0 - 2], $$[$0]); - yy.setTooltip($$[$0 - 4], $$[$0 - 1]); - break; - case 84: - this.$ = $$[$0 - 2]; - yy.setCssStyle($$[$0 - 1], $$[$0]); - break; - case 85: - yy.setCssClass($$[$0 - 1], $$[$0]); - break; - case 86: - this.$ = [$$[$0]]; - break; - case 87: - $$[$0 - 2].push($$[$0]); - this.$ = $$[$0 - 2]; - break; - case 89: - this.$ = $$[$0 - 1] + $$[$0]; - break; - } - }, - table: [{ 3: 1, 4: 2, 5: 3, 6: 4, 7: [1, 6], 10: 5, 16: 37, 17: 20, 18: 38, 20: 7, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 27: 13, 28: 14, 29: 15, 30: 16, 31: $V0, 33: $V1, 35: $V2, 36: 21, 40: $V3, 41: 22, 44: $V4, 45: $V5, 47: $V6, 48: $V7, 50: $V8, 52: $V9, 53: $Va, 54: $Vb, 55: $Vc, 56: $Vd, 66: $Ve, 67: $Vf, 69: $Vg, 73: $Vh, 74: $Vi, 76: $Vj, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, { 1: [3] }, { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 3] }, o($Vo, [2, 5], { 8: [1, 46] }), { 8: [1, 47] }, o($Vp, [2, 16], { 21: [1, 48] }), o($Vp, [2, 18]), o($Vp, [2, 19]), o($Vp, [2, 20]), o($Vp, [2, 21]), o($Vp, [2, 22]), o($Vp, [2, 23]), o($Vp, [2, 24]), o($Vp, [2, 25]), o($Vp, [2, 26]), { 32: [1, 49] }, { 34: [1, 50] }, o($Vp, [2, 29]), o($Vp, [2, 45], { 49: 51, 57: 54, 58: 55, 13: [1, 52], 21: [1, 53], 59: $Vq, 60: $Vr, 61: $Vs, 62: $Vt, 63: $Vu, 64: $Vv, 65: $Vw }), { 37: [1, 63] }, o($Vx, [2, 36], { 37: [1, 65], 42: [1, 64] }), o($Vp, [2, 47]), o($Vp, [2, 48]), { 16: 66, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm }, { 16: 37, 17: 67, 18: 38, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, { 16: 37, 17: 68, 18: 38, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, { 16: 37, 17: 69, 18: 38, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, { 74: [1, 70] }, { 13: [1, 71] }, { 16: 37, 17: 72, 18: 38, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, { 13: $Vy, 51: 73 }, o($Vp, [2, 55]), o($Vp, [2, 56]), o($Vp, [2, 57]), o($Vp, [2, 58]), o($Vz, [2, 11], { 16: 37, 18: 38, 17: 75, 19: [1, 76], 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }), o($Vz, [2, 12], { 19: [1, 77] }), { 15: 78, 16: 79, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm }, { 16: 37, 17: 80, 18: 38, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, o($VA, [2, 112]), o($VA, [2, 113]), o($VA, [2, 114]), o($VA, [2, 115]), o([1, 8, 9, 12, 13, 19, 21, 37, 39, 42, 59, 60, 61, 62, 63, 64, 65, 70, 72], [2, 116]), o($Vo, [2, 6], { 10: 5, 20: 7, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 27: 13, 28: 14, 29: 15, 30: 16, 17: 20, 36: 21, 41: 22, 16: 37, 18: 38, 5: 81, 31: $V0, 33: $V1, 35: $V2, 40: $V3, 44: $V4, 45: $V5, 47: $V6, 48: $V7, 50: $V8, 52: $V9, 53: $Va, 54: $Vb, 55: $Vc, 56: $Vd, 66: $Ve, 67: $Vf, 69: $Vg, 73: $Vh, 74: $Vi, 76: $Vj, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }), { 5: 82, 10: 5, 16: 37, 17: 20, 18: 38, 20: 7, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 27: 13, 28: 14, 29: 15, 30: 16, 31: $V0, 33: $V1, 35: $V2, 36: 21, 40: $V3, 41: 22, 44: $V4, 45: $V5, 47: $V6, 48: $V7, 50: $V8, 52: $V9, 53: $Va, 54: $Vb, 55: $Vc, 56: $Vd, 66: $Ve, 67: $Vf, 69: $Vg, 73: $Vh, 74: $Vi, 76: $Vj, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, o($Vp, [2, 17]), o($Vp, [2, 27]), o($Vp, [2, 28]), { 13: [1, 84], 16: 37, 17: 83, 18: 38, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, { 49: 85, 57: 54, 58: 55, 59: $Vq, 60: $Vr, 61: $Vs, 62: $Vt, 63: $Vu, 64: $Vv, 65: $Vw }, o($Vp, [2, 46]), { 58: 86, 64: $Vv, 65: $Vw }, o($VB, [2, 62], { 57: 87, 59: $Vq, 60: $Vr, 61: $Vs, 62: $Vt, 63: $Vu }), o($VC, [2, 63]), o($VC, [2, 64]), o($VC, [2, 65]), o($VC, [2, 66]), o($VC, [2, 67]), o($VD, [2, 68]), o($VD, [2, 69]), { 8: [1, 89], 23: 90, 38: 88, 41: 22, 44: $V4 }, { 16: 91, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm }, { 43: 92, 47: $VE }, { 46: [1, 94] }, { 13: [1, 95] }, { 13: [1, 96] }, { 70: [1, 97], 72: [1, 98] }, { 21: $VF, 73: $VG, 74: $VH, 75: 99, 77: 100, 79: 101, 80: $VI, 81: $VJ, 82: $VK, 83: $VL, 84: $VM, 85: $VN }, { 74: [1, 111] }, { 13: $Vy, 51: 112 }, o($Vp, [2, 54]), o($Vp, [2, 117]), o($Vz, [2, 13]), o($Vz, [2, 14]), o($Vz, [2, 15]), { 37: [2, 32] }, { 15: 113, 16: 79, 37: [2, 9], 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm }, o($VO, [2, 40], { 11: 114, 12: [1, 115] }), o($Vo, [2, 7]), { 9: [1, 116] }, o($VP, [2, 49]), { 16: 37, 17: 117, 18: 38, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, { 13: [1, 119], 16: 37, 17: 118, 18: 38, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, o($VB, [2, 61], { 57: 120, 59: $Vq, 60: $Vr, 61: $Vs, 62: $Vt, 63: $Vu }), o($VB, [2, 60]), { 39: [1, 121] }, { 23: 90, 38: 122, 41: 22, 44: $V4 }, { 8: [1, 123], 39: [2, 33] }, o($Vx, [2, 37], { 37: [1, 124] }), { 39: [1, 125] }, { 39: [2, 43], 43: 126, 47: $VE }, { 16: 37, 17: 127, 18: 38, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, o($Vp, [2, 70], { 13: [1, 128] }), o($Vp, [2, 72], { 13: [1, 130], 68: [1, 129] }), o($Vp, [2, 76], { 13: [1, 131], 71: [1, 132] }), { 13: [1, 133] }, o($Vp, [2, 84], { 78: [1, 134] }), o($VQ, [2, 86], { 79: 135, 21: $VF, 73: $VG, 74: $VH, 80: $VI, 81: $VJ, 82: $VK, 83: $VL, 84: $VM, 85: $VN }), o($VR, [2, 88]), o($VR, [2, 90]), o($VR, [2, 91]), o($VR, [2, 92]), o($VR, [2, 93]), o($VR, [2, 94]), o($VR, [2, 95]), o($VR, [2, 96]), o($VR, [2, 97]), o($VR, [2, 98]), o($Vp, [2, 85]), o($Vp, [2, 53]), { 37: [2, 10] }, o($VO, [2, 41]), { 13: [1, 136] }, { 1: [2, 4] }, o($VP, [2, 51]), o($VP, [2, 50]), { 16: 37, 17: 137, 18: 38, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, o($VB, [2, 59]), o($Vp, [2, 30]), { 39: [1, 138] }, { 23: 90, 38: 139, 39: [2, 34], 41: 22, 44: $V4 }, { 43: 140, 47: $VE }, o($Vx, [2, 38]), { 39: [2, 44] }, o($Vp, [2, 42]), o($Vp, [2, 71]), o($Vp, [2, 73]), o($Vp, [2, 74], { 68: [1, 141] }), o($Vp, [2, 77]), o($Vp, [2, 78], { 13: [1, 142] }), o($Vp, [2, 80], { 13: [1, 144], 68: [1, 143] }), { 21: $VF, 73: $VG, 74: $VH, 77: 145, 79: 101, 80: $VI, 81: $VJ, 82: $VK, 83: $VL, 84: $VM, 85: $VN }, o($VR, [2, 89]), { 14: [1, 146] }, o($VP, [2, 52]), o($Vp, [2, 31]), { 39: [2, 35] }, { 39: [1, 147] }, o($Vp, [2, 75]), o($Vp, [2, 79]), o($Vp, [2, 81]), o($Vp, [2, 82], { 68: [1, 148] }), o($VQ, [2, 87], { 79: 135, 21: $VF, 73: $VG, 74: $VH, 80: $VI, 81: $VJ, 82: $VK, 83: $VL, 84: $VM, 85: $VN }), o($VO, [2, 8]), o($Vx, [2, 39]), o($Vp, [2, 83])], - defaultActions: { 2: [2, 1], 3: [2, 2], 4: [2, 3], 78: [2, 32], 113: [2, 10], 116: [2, 4], 126: [2, 44], 139: [2, 35] }, - parseError: function parseError(str, hash) { - if (hash.recoverable) { - this.trace(str); - } else { - var error = new Error(str); - error.hash = hash; - throw error; - } - }, - parse: function parse(input) { - var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; - var args = lstack.slice.call(arguments, 1); - var lexer2 = Object.create(this.lexer); - var sharedState = { yy: {} }; - for (var k in this.yy) { - if (Object.prototype.hasOwnProperty.call(this.yy, k)) { - sharedState.yy[k] = this.yy[k]; - } - } - lexer2.setInput(input, sharedState.yy); - sharedState.yy.lexer = lexer2; - sharedState.yy.parser = this; - if (typeof lexer2.yylloc == "undefined") { - lexer2.yylloc = {}; - } - var yyloc = lexer2.yylloc; - lstack.push(yyloc); - var ranges = lexer2.options && lexer2.options.ranges; - if (typeof sharedState.yy.parseError === "function") { - this.parseError = sharedState.yy.parseError; - } else { - this.parseError = Object.getPrototypeOf(this).parseError; - } - function lex() { - var token; - token = tstack.pop() || lexer2.lex() || EOF; - if (typeof token !== "number") { - if (token instanceof Array) { - tstack = token; - token = tstack.pop(); - } - token = self.symbols_[token] || token; - } - return token; - } - var symbol, state, action, r, yyval = {}, p, len, newState, expected; - while (true) { - state = stack[stack.length - 1]; - if (this.defaultActions[state]) { - action = this.defaultActions[state]; - } else { - if (symbol === null || typeof symbol == "undefined") { - symbol = lex(); - } - action = table[state] && table[state][symbol]; - } - if (typeof action === "undefined" || !action.length || !action[0]) { - var errStr = ""; - expected = []; - for (p in table[state]) { - if (this.terminals_[p] && p > TERROR) { - expected.push("'" + this.terminals_[p] + "'"); - } - } - if (lexer2.showPosition) { - errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; - } else { - errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); - } - this.parseError(errStr, { - text: lexer2.match, - token: this.terminals_[symbol] || symbol, - line: lexer2.yylineno, - loc: yyloc, - expected - }); - } - if (action[0] instanceof Array && action.length > 1) { - throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); - } - switch (action[0]) { - case 1: - stack.push(symbol); - vstack.push(lexer2.yytext); - lstack.push(lexer2.yylloc); - stack.push(action[1]); - symbol = null; - { - yyleng = lexer2.yyleng; - yytext = lexer2.yytext; - yylineno = lexer2.yylineno; - yyloc = lexer2.yylloc; - } - break; - case 2: - len = this.productions_[action[1]][1]; - yyval.$ = vstack[vstack.length - len]; - yyval._$ = { - first_line: lstack[lstack.length - (len || 1)].first_line, - last_line: lstack[lstack.length - 1].last_line, - first_column: lstack[lstack.length - (len || 1)].first_column, - last_column: lstack[lstack.length - 1].last_column - }; - if (ranges) { - yyval._$.range = [ - lstack[lstack.length - (len || 1)].range[0], - lstack[lstack.length - 1].range[1] - ]; - } - r = this.performAction.apply(yyval, [ - yytext, - yyleng, - yylineno, - sharedState.yy, - action[1], - vstack, - lstack - ].concat(args)); - if (typeof r !== "undefined") { - return r; - } - if (len) { - stack = stack.slice(0, -1 * len * 2); - vstack = vstack.slice(0, -1 * len); - lstack = lstack.slice(0, -1 * len); - } - stack.push(this.productions_[action[1]][0]); - vstack.push(yyval.$); - lstack.push(yyval._$); - newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; - stack.push(newState); - break; - case 3: - return true; - } - } - return true; - } - }; - var lexer = function() { - var lexer2 = { - EOF: 1, - parseError: function parseError(str, hash) { - if (this.yy.parser) { - this.yy.parser.parseError(str, hash); - } else { - throw new Error(str); - } - }, - // resets the lexer, sets new input - setInput: function(input, yy) { - this.yy = yy || this.yy || {}; - this._input = input; - this._more = this._backtrack = this.done = false; - this.yylineno = this.yyleng = 0; - this.yytext = this.matched = this.match = ""; - this.conditionStack = ["INITIAL"]; - this.yylloc = { - first_line: 1, - first_column: 0, - last_line: 1, - last_column: 0 - }; - if (this.options.ranges) { - this.yylloc.range = [0, 0]; - } - this.offset = 0; - return this; - }, - // consumes and returns one char from the input - input: function() { - var ch = this._input[0]; - this.yytext += ch; - this.yyleng++; - this.offset++; - this.match += ch; - this.matched += ch; - var lines = ch.match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno++; - this.yylloc.last_line++; - } else { - this.yylloc.last_column++; - } - if (this.options.ranges) { - this.yylloc.range[1]++; - } - this._input = this._input.slice(1); - return ch; - }, - // unshifts one char (or a string) into the input - unput: function(ch) { - var len = ch.length; - var lines = ch.split(/(?:\r\n?|\n)/g); - this._input = ch + this._input; - this.yytext = this.yytext.substr(0, this.yytext.length - len); - this.offset -= len; - var oldLines = this.match.split(/(?:\r\n?|\n)/g); - this.match = this.match.substr(0, this.match.length - 1); - this.matched = this.matched.substr(0, this.matched.length - 1); - if (lines.length - 1) { - this.yylineno -= lines.length - 1; - } - var r = this.yylloc.range; - this.yylloc = { - first_line: this.yylloc.first_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.first_column, - last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len - }; - if (this.options.ranges) { - this.yylloc.range = [r[0], r[0] + this.yyleng - len]; - } - this.yyleng = this.yytext.length; - return this; - }, - // When called from action, caches matched text and appends it on next action - more: function() { - this._more = true; - return this; - }, - // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. - reject: function() { - if (this.options.backtrack_lexer) { - this._backtrack = true; - } else { - return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), { - text: "", - token: null, - line: this.yylineno - }); - } - return this; - }, - // retain first n characters of the match - less: function(n) { - this.unput(this.match.slice(n)); - }, - // displays already matched input, i.e. for error messages - pastInput: function() { - var past = this.matched.substr(0, this.matched.length - this.match.length); - return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); - }, - // displays upcoming input, i.e. for error messages - upcomingInput: function() { - var next = this.match; - if (next.length < 20) { - next += this._input.substr(0, 20 - next.length); - } - return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); - }, - // displays the character position where the lexing error occurred, i.e. for error messages - showPosition: function() { - var pre = this.pastInput(); - var c = new Array(pre.length + 1).join("-"); - return pre + this.upcomingInput() + "\n" + c + "^"; - }, - // test the lexed token: return FALSE when not a match, otherwise return token - test_match: function(match, indexed_rule) { - var token, lines, backup; - if (this.options.backtrack_lexer) { - backup = { - yylineno: this.yylineno, - yylloc: { - first_line: this.yylloc.first_line, - last_line: this.last_line, - first_column: this.yylloc.first_column, - last_column: this.yylloc.last_column - }, - yytext: this.yytext, - match: this.match, - matches: this.matches, - matched: this.matched, - yyleng: this.yyleng, - offset: this.offset, - _more: this._more, - _input: this._input, - yy: this.yy, - conditionStack: this.conditionStack.slice(0), - done: this.done - }; - if (this.options.ranges) { - backup.yylloc.range = this.yylloc.range.slice(0); - } - } - lines = match[0].match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno += lines.length; - } - this.yylloc = { - first_line: this.yylloc.last_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.last_column, - last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length - }; - this.yytext += match[0]; - this.match += match[0]; - this.matches = match; - this.yyleng = this.yytext.length; - if (this.options.ranges) { - this.yylloc.range = [this.offset, this.offset += this.yyleng]; - } - this._more = false; - this._backtrack = false; - this._input = this._input.slice(match[0].length); - this.matched += match[0]; - token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); - if (this.done && this._input) { - this.done = false; - } - if (token) { - return token; - } else if (this._backtrack) { - for (var k in backup) { - this[k] = backup[k]; - } - return false; - } - return false; - }, - // return next match in input - next: function() { - if (this.done) { - return this.EOF; - } - if (!this._input) { - this.done = true; - } - var token, match, tempMatch, index; - if (!this._more) { - this.yytext = ""; - this.match = ""; - } - var rules = this._currentRules(); - for (var i = 0; i < rules.length; i++) { - tempMatch = this._input.match(this.rules[rules[i]]); - if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { - match = tempMatch; - index = i; - if (this.options.backtrack_lexer) { - token = this.test_match(tempMatch, rules[i]); - if (token !== false) { - return token; - } else if (this._backtrack) { - match = false; - continue; - } else { - return false; - } - } else if (!this.options.flex) { - break; - } - } - } - if (match) { - token = this.test_match(match, rules[index]); - if (token !== false) { - return token; - } - return false; - } - if (this._input === "") { - return this.EOF; - } else { - return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { - text: "", - token: null, - line: this.yylineno - }); - } - }, - // return next match that has a token - lex: function lex() { - var r = this.next(); - if (r) { - return r; - } else { - return this.lex(); - } - }, - // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) - begin: function begin(condition) { - this.conditionStack.push(condition); - }, - // pop the previously active lexer condition state off the condition stack - popState: function popState() { - var n = this.conditionStack.length - 1; - if (n > 0) { - return this.conditionStack.pop(); - } else { - return this.conditionStack[0]; - } - }, - // produce the lexer rule set which is active for the currently active lexer condition state - _currentRules: function _currentRules() { - if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { - return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; - } else { - return this.conditions["INITIAL"].rules; - } - }, - // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available - topState: function topState(n) { - n = this.conditionStack.length - 1 - Math.abs(n || 0); - if (n >= 0) { - return this.conditionStack[n]; - } else { - return "INITIAL"; - } - }, - // alias for begin(condition) - pushState: function pushState(condition) { - this.begin(condition); - }, - // return the number of states currently on the stack - stateStackSize: function stateStackSize() { - return this.conditionStack.length; - }, - options: {}, - performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { - switch ($avoiding_name_collisions) { - case 0: - return 53; - case 1: - return 54; - case 2: - return 55; - case 3: - return 56; - case 4: - break; - case 5: - break; - case 6: - this.begin("acc_title"); - return 31; - case 7: - this.popState(); - return "acc_title_value"; - case 8: - this.begin("acc_descr"); - return 33; - case 9: - this.popState(); - return "acc_descr_value"; - case 10: - this.begin("acc_descr_multiline"); - break; - case 11: - this.popState(); - break; - case 12: - return "acc_descr_multiline_value"; - case 13: - return 8; - case 14: - break; - case 15: - return 7; - case 16: - return 7; - case 17: - return "EDGE_STATE"; - case 18: - this.begin("callback_name"); - break; - case 19: - this.popState(); - break; - case 20: - this.popState(); - this.begin("callback_args"); - break; - case 21: - return 70; - case 22: - this.popState(); - break; - case 23: - return 71; - case 24: - this.popState(); - break; - case 25: - return "STR"; - case 26: - this.begin("string"); - break; - case 27: - return 73; - case 28: - this.begin("namespace"); - return 40; - case 29: - this.popState(); - return 8; - case 30: - break; - case 31: - this.begin("namespace-body"); - return 37; - case 32: - this.popState(); - return 39; - case 33: - return "EOF_IN_STRUCT"; - case 34: - return 8; - case 35: - break; - case 36: - return "EDGE_STATE"; - case 37: - this.begin("class"); - return 44; - case 38: - this.popState(); - return 8; - case 39: - break; - case 40: - this.popState(); - this.popState(); - return 39; - case 41: - this.begin("class-body"); - return 37; - case 42: - this.popState(); - return 39; - case 43: - return "EOF_IN_STRUCT"; - case 44: - return "EDGE_STATE"; - case 45: - return "OPEN_IN_STRUCT"; - case 46: - break; - case 47: - return "MEMBER"; - case 48: - return 76; - case 49: - return 66; - case 50: - return 67; - case 51: - return 69; - case 52: - return 50; - case 53: - return 52; - case 54: - return 45; - case 55: - return 46; - case 56: - return 72; - case 57: - this.popState(); - break; - case 58: - return "GENERICTYPE"; - case 59: - this.begin("generic"); - break; - case 60: - this.popState(); - break; - case 61: - return "BQUOTE_STR"; - case 62: - this.begin("bqstring"); - break; - case 63: - return 68; - case 64: - return 68; - case 65: - return 68; - case 66: - return 68; - case 67: - return 60; - case 68: - return 60; - case 69: - return 62; - case 70: - return 62; - case 71: - return 61; - case 72: - return 59; - case 73: - return 63; - case 74: - return 64; - case 75: - return 65; - case 76: - return 21; - case 77: - return 42; - case 78: - return 95; - case 79: - return "DOT"; - case 80: - return "PLUS"; - case 81: - return 81; - case 82: - return 78; - case 83: - return 84; - case 84: - return 84; - case 85: - return 85; - case 86: - return "EQUALS"; - case 87: - return "EQUALS"; - case 88: - return 74; - case 89: - return 12; - case 90: - return 14; - case 91: - return "PUNCTUATION"; - case 92: - return 80; - case 93: - return 97; - case 94: - return 83; - case 95: - return 83; - case 96: - return 9; - } - }, - rules: [/^(?:.*direction\s+TB[^\n]*)/, /^(?:.*direction\s+BT[^\n]*)/, /^(?:.*direction\s+RL[^\n]*)/, /^(?:.*direction\s+LR[^\n]*)/, /^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/, /^(?:%%[^\n]*(\r?\n)*)/, /^(?:accTitle\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*\{\s*)/, /^(?:[\}])/, /^(?:[^\}]*)/, /^(?:\s*(\r?\n)+)/, /^(?:\s+)/, /^(?:classDiagram-v2\b)/, /^(?:classDiagram\b)/, /^(?:\[\*\])/, /^(?:call[\s]+)/, /^(?:\([\s]*\))/, /^(?:\()/, /^(?:[^(]*)/, /^(?:\))/, /^(?:[^)]*)/, /^(?:["])/, /^(?:[^"]*)/, /^(?:["])/, /^(?:style\b)/, /^(?:namespace\b)/, /^(?:\s*(\r?\n)+)/, /^(?:\s+)/, /^(?:[{])/, /^(?:[}])/, /^(?:$)/, /^(?:\s*(\r?\n)+)/, /^(?:\s+)/, /^(?:\[\*\])/, /^(?:class\b)/, /^(?:\s*(\r?\n)+)/, /^(?:\s+)/, /^(?:[}])/, /^(?:[{])/, /^(?:[}])/, /^(?:$)/, /^(?:\[\*\])/, /^(?:[{])/, /^(?:[\n])/, /^(?:[^{}\n]*)/, /^(?:cssClass\b)/, /^(?:callback\b)/, /^(?:link\b)/, /^(?:click\b)/, /^(?:note for\b)/, /^(?:note\b)/, /^(?:<<)/, /^(?:>>)/, /^(?:href\b)/, /^(?:[~])/, /^(?:[^~]*)/, /^(?:~)/, /^(?:[`])/, /^(?:[^`]+)/, /^(?:[`])/, /^(?:_self\b)/, /^(?:_blank\b)/, /^(?:_parent\b)/, /^(?:_top\b)/, /^(?:\s*<\|)/, /^(?:\s*\|>)/, /^(?:\s*>)/, /^(?:\s*<)/, /^(?:\s*\*)/, /^(?:\s*o\b)/, /^(?:\s*\(\))/, /^(?:--)/, /^(?:\.\.)/, /^(?::{1}[^:\n;]+)/, /^(?::{3})/, /^(?:-)/, /^(?:\.)/, /^(?:\+)/, /^(?::)/, /^(?:,)/, /^(?:#)/, /^(?:#)/, /^(?:%)/, /^(?:=)/, /^(?:=)/, /^(?:\w+)/, /^(?:\[)/, /^(?:\])/, /^(?:[!"#$%&'*+,-.`?\\/])/, /^(?:[0-9]+)/, /^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/, /^(?:\s)/, /^(?:\s)/, /^(?:$)/], - conditions: { "namespace-body": { "rules": [26, 32, 33, 34, 35, 36, 37, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "namespace": { "rules": [26, 28, 29, 30, 31, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "class-body": { "rules": [26, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "class": { "rules": [26, 38, 39, 40, 41, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "acc_descr_multiline": { "rules": [11, 12, 26, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "acc_descr": { "rules": [9, 26, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "acc_title": { "rules": [7, 26, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "callback_args": { "rules": [22, 23, 26, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "callback_name": { "rules": [19, 20, 21, 26, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "href": { "rules": [26, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "struct": { "rules": [26, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "generic": { "rules": [26, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "bqstring": { "rules": [26, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "string": { "rules": [24, 25, 26, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 3, 4, 5, 6, 8, 10, 13, 14, 15, 16, 17, 18, 26, 27, 28, 37, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96], "inclusive": true } } - }; - return lexer2; - }(); - parser2.lexer = lexer; - function Parser() { - this.yy = {}; - } - Parser.prototype = parser2; - parser2.Parser = Parser; - return new Parser(); -}(); -parser.parser = parser; -const parser$1 = parser; -const visibilityValues = ["#", "+", "~", "-", ""]; -class ClassMember { - constructor(input, memberType) { - this.memberType = memberType; - this.visibility = ""; - this.classifier = ""; - const sanitizedInput = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.d)(input, (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)()); - this.parseMember(sanitizedInput); - } - getDisplayDetails() { - let displayText = this.visibility + (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.x)(this.id); - if (this.memberType === "method") { - displayText += `(${(0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.x)(this.parameters.trim())})`; - if (this.returnType) { - displayText += " : " + (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.x)(this.returnType); - } - } - displayText = displayText.trim(); - const cssStyle = this.parseClassifier(); - return { - displayText, - cssStyle - }; - } - parseMember(input) { - let potentialClassifier = ""; - if (this.memberType === "method") { - const methodRegEx = /([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/; - const match = input.match(methodRegEx); - if (match) { - const detectedVisibility = match[1] ? match[1].trim() : ""; - if (visibilityValues.includes(detectedVisibility)) { - this.visibility = detectedVisibility; - } - this.id = match[2].trim(); - this.parameters = match[3] ? match[3].trim() : ""; - potentialClassifier = match[4] ? match[4].trim() : ""; - this.returnType = match[5] ? match[5].trim() : ""; - if (potentialClassifier === "") { - const lastChar = this.returnType.substring(this.returnType.length - 1); - if (lastChar.match(/[$*]/)) { - potentialClassifier = lastChar; - this.returnType = this.returnType.substring(0, this.returnType.length - 1); - } - } - } - } else { - const length = input.length; - const firstChar = input.substring(0, 1); - const lastChar = input.substring(length - 1); - if (visibilityValues.includes(firstChar)) { - this.visibility = firstChar; - } - if (lastChar.match(/[$*]/)) { - potentialClassifier = lastChar; - } - this.id = input.substring( - this.visibility === "" ? 0 : 1, - potentialClassifier === "" ? length : length - 1 - ); - } - this.classifier = potentialClassifier; - } - parseClassifier() { - switch (this.classifier) { - case "*": - return "font-style:italic;"; - case "$": - return "text-decoration:underline;"; - default: - return ""; - } - } -} -const MERMAID_DOM_ID_PREFIX = "classId-"; -let relations = []; -let classes = {}; -let notes = []; -let classCounter = 0; -let namespaces = {}; -let namespaceCounter = 0; -let functions = []; -const sanitizeText = (txt) => _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.e.sanitizeText(txt, (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)()); -const splitClassNameAndType = function(_id) { - const id = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.e.sanitizeText(_id, (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)()); - let genericType = ""; - let className = id; - if (id.indexOf("~") > 0) { - const split = id.split("~"); - className = sanitizeText(split[0]); - genericType = sanitizeText(split[1]); - } - return { className, type: genericType }; -}; -const setClassLabel = function(_id, label) { - const id = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.e.sanitizeText(_id, (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)()); - if (label) { - label = sanitizeText(label); - } - const { className } = splitClassNameAndType(id); - classes[className].label = label; -}; -const addClass = function(_id) { - const id = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.e.sanitizeText(_id, (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)()); - const { className, type } = splitClassNameAndType(id); - if (Object.hasOwn(classes, className)) { - return; - } - const name = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.e.sanitizeText(className, (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)()); - classes[name] = { - id: name, - type, - label: name, - cssClasses: [], - methods: [], - members: [], - annotations: [], - styles: [], - domId: MERMAID_DOM_ID_PREFIX + name + "-" + classCounter - }; - classCounter++; -}; -const lookUpDomId = function(_id) { - const id = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.e.sanitizeText(_id, (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)()); - if (id in classes) { - return classes[id].domId; - } - throw new Error("Class not found: " + id); -}; -const clear = function() { - relations = []; - classes = {}; - notes = []; - functions = []; - functions.push(setupToolTips); - namespaces = {}; - namespaceCounter = 0; - (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.v)(); -}; -const getClass = function(id) { - return classes[id]; -}; -const getClasses = function() { - return classes; -}; -const getRelations = function() { - return relations; -}; -const getNotes = function() { - return notes; -}; -const addRelation = function(relation) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("Adding relation: " + JSON.stringify(relation)); - addClass(relation.id1); - addClass(relation.id2); - relation.id1 = splitClassNameAndType(relation.id1).className; - relation.id2 = splitClassNameAndType(relation.id2).className; - relation.relationTitle1 = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.e.sanitizeText(relation.relationTitle1.trim(), (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)()); - relation.relationTitle2 = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.e.sanitizeText(relation.relationTitle2.trim(), (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)()); - relations.push(relation); -}; -const addAnnotation = function(className, annotation) { - const validatedClassName = splitClassNameAndType(className).className; - classes[validatedClassName].annotations.push(annotation); -}; -const addMember = function(className, member) { - addClass(className); - const validatedClassName = splitClassNameAndType(className).className; - const theClass = classes[validatedClassName]; - if (typeof member === "string") { - const memberString = member.trim(); - if (memberString.startsWith("<<") && memberString.endsWith(">>")) { - theClass.annotations.push(sanitizeText(memberString.substring(2, memberString.length - 2))); - } else if (memberString.indexOf(")") > 0) { - theClass.methods.push(new ClassMember(memberString, "method")); - } else if (memberString) { - theClass.members.push(new ClassMember(memberString, "attribute")); - } - } -}; -const addMembers = function(className, members) { - if (Array.isArray(members)) { - members.reverse(); - members.forEach((member) => addMember(className, member)); - } -}; -const addNote = function(text, className) { - const note = { - id: `note${notes.length}`, - class: className, - text - }; - notes.push(note); -}; -const cleanupLabel = function(label) { - if (label.startsWith(":")) { - label = label.substring(1); - } - return sanitizeText(label.trim()); -}; -const setCssClass = function(ids, className) { - ids.split(",").forEach(function(_id) { - let id = _id; - if (_id[0].match(/\d/)) { - id = MERMAID_DOM_ID_PREFIX + id; - } - if (classes[id] !== void 0) { - classes[id].cssClasses.push(className); - } - }); -}; -const setTooltip = function(ids, tooltip) { - ids.split(",").forEach(function(id) { - if (tooltip !== void 0) { - classes[id].tooltip = sanitizeText(tooltip); - } - }); -}; -const getTooltip = function(id, namespace) { - if (namespace) { - return namespaces[namespace].classes[id].tooltip; - } - return classes[id].tooltip; -}; -const setLink = function(ids, linkStr, target) { - const config = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)(); - ids.split(",").forEach(function(_id) { - let id = _id; - if (_id[0].match(/\d/)) { - id = MERMAID_DOM_ID_PREFIX + id; - } - if (classes[id] !== void 0) { - classes[id].link = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.u.formatUrl(linkStr, config); - if (config.securityLevel === "sandbox") { - classes[id].linkTarget = "_top"; - } else if (typeof target === "string") { - classes[id].linkTarget = sanitizeText(target); - } else { - classes[id].linkTarget = "_blank"; - } - } - }); - setCssClass(ids, "clickable"); -}; -const setClickEvent = function(ids, functionName, functionArgs) { - ids.split(",").forEach(function(id) { - setClickFunc(id, functionName, functionArgs); - classes[id].haveCallback = true; - }); - setCssClass(ids, "clickable"); -}; -const setClickFunc = function(_domId, functionName, functionArgs) { - const domId = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.e.sanitizeText(_domId, (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)()); - const config = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)(); - if (config.securityLevel !== "loose") { - return; - } - if (functionName === void 0) { - return; - } - const id = domId; - if (classes[id] !== void 0) { - const elemId = lookUpDomId(id); - let argList = []; - if (typeof functionArgs === "string") { - argList = functionArgs.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/); - for (let i = 0; i < argList.length; i++) { - let item = argList[i].trim(); - if (item.charAt(0) === '"' && item.charAt(item.length - 1) === '"') { - item = item.substr(1, item.length - 2); - } - argList[i] = item; - } - } - if (argList.length === 0) { - argList.push(elemId); - } - functions.push(function() { - const elem = document.querySelector(`[id="${elemId}"]`); - if (elem !== null) { - elem.addEventListener( - "click", - function() { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.u.runFunc(functionName, ...argList); - }, - false - ); - } - }); - } -}; -const bindFunctions = function(element) { - functions.forEach(function(fun) { - fun(element); - }); -}; -const lineType = { - LINE: 0, - DOTTED_LINE: 1 -}; -const relationType = { - AGGREGATION: 0, - EXTENSION: 1, - COMPOSITION: 2, - DEPENDENCY: 3, - LOLLIPOP: 4 -}; -const setupToolTips = function(element) { - let tooltipElem = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(".mermaidTooltip"); - if ((tooltipElem._groups || tooltipElem)[0][0] === null) { - tooltipElem = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)("body").append("div").attr("class", "mermaidTooltip").style("opacity", 0); - } - const svg = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(element).select("svg"); - const nodes = svg.selectAll("g.node"); - nodes.on("mouseover", function() { - const el = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(this); - const title = el.attr("title"); - if (title === null) { - return; - } - const rect = this.getBoundingClientRect(); - tooltipElem.transition().duration(200).style("opacity", ".9"); - tooltipElem.text(el.attr("title")).style("left", window.scrollX + rect.left + (rect.right - rect.left) / 2 + "px").style("top", window.scrollY + rect.top - 14 + document.body.scrollTop + "px"); - tooltipElem.html(tooltipElem.html().replace(/<br\/>/g, "
    ")); - el.classed("hover", true); - }).on("mouseout", function() { - tooltipElem.transition().duration(500).style("opacity", 0); - const el = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(this); - el.classed("hover", false); - }); -}; -functions.push(setupToolTips); -let direction = "TB"; -const getDirection = () => direction; -const setDirection = (dir) => { - direction = dir; -}; -const addNamespace = function(id) { - if (namespaces[id] !== void 0) { - return; - } - namespaces[id] = { - id, - classes: {}, - children: {}, - domId: MERMAID_DOM_ID_PREFIX + id + "-" + namespaceCounter - }; - namespaceCounter++; -}; -const getNamespace = function(name) { - return namespaces[name]; -}; -const getNamespaces = function() { - return namespaces; -}; -const addClassesToNamespace = function(id, classNames) { - if (namespaces[id] === void 0) { - return; - } - for (const name of classNames) { - const { className } = splitClassNameAndType(name); - classes[className].parent = id; - namespaces[id].classes[className] = classes[className]; - } -}; -const setCssStyle = function(id, styles2) { - const thisClass = classes[id]; - if (!styles2 || !thisClass) { - return; - } - for (const s of styles2) { - if (s.includes(",")) { - thisClass.styles.push(...s.split(",")); - } else { - thisClass.styles.push(s); - } - } -}; -const db = { - setAccTitle: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.s, - getAccTitle: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.g, - getAccDescription: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.a, - setAccDescription: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.b, - getConfig: () => (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.c)().class, - addClass, - bindFunctions, - clear, - getClass, - getClasses, - getNotes, - addAnnotation, - addNote, - getRelations, - addRelation, - getDirection, - setDirection, - addMember, - addMembers, - cleanupLabel, - lineType, - relationType, - setClickEvent, - setCssClass, - setLink, - getTooltip, - setTooltip, - lookUpDomId, - setDiagramTitle: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.q, - getDiagramTitle: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_1__.t, - setClassLabel, - addNamespace, - addClassesToNamespace, - getNamespace, - getNamespaces, - setCssStyle -}; -const getStyles = (options) => `g.classGroup text { - fill: ${options.nodeBorder || options.classText}; - stroke: none; - font-family: ${options.fontFamily}; - font-size: 10px; - - .title { - font-weight: bolder; - } - -} - -.nodeLabel, .edgeLabel { - color: ${options.classText}; -} -.edgeLabel .label rect { - fill: ${options.mainBkg}; -} -.label text { - fill: ${options.classText}; -} -.edgeLabel .label span { - background: ${options.mainBkg}; -} - -.classTitle { - font-weight: bolder; -} -.node rect, - .node circle, - .node ellipse, - .node polygon, - .node path { - fill: ${options.mainBkg}; - stroke: ${options.nodeBorder}; - stroke-width: 1px; - } - - -.divider { - stroke: ${options.nodeBorder}; - stroke-width: 1; -} - -g.clickable { - cursor: pointer; -} - -g.classGroup rect { - fill: ${options.mainBkg}; - stroke: ${options.nodeBorder}; -} - -g.classGroup line { - stroke: ${options.nodeBorder}; - stroke-width: 1; -} - -.classLabel .box { - stroke: none; - stroke-width: 0; - fill: ${options.mainBkg}; - opacity: 0.5; -} - -.classLabel .label { - fill: ${options.nodeBorder}; - font-size: 10px; -} - -.relation { - stroke: ${options.lineColor}; - stroke-width: 1; - fill: none; -} - -.dashed-line{ - stroke-dasharray: 3; -} - -.dotted-line{ - stroke-dasharray: 1 2; -} - -#compositionStart, .composition { - fill: ${options.lineColor} !important; - stroke: ${options.lineColor} !important; - stroke-width: 1; -} - -#compositionEnd, .composition { - fill: ${options.lineColor} !important; - stroke: ${options.lineColor} !important; - stroke-width: 1; -} - -#dependencyStart, .dependency { - fill: ${options.lineColor} !important; - stroke: ${options.lineColor} !important; - stroke-width: 1; -} - -#dependencyStart, .dependency { - fill: ${options.lineColor} !important; - stroke: ${options.lineColor} !important; - stroke-width: 1; -} - -#extensionStart, .extension { - fill: transparent !important; - stroke: ${options.lineColor} !important; - stroke-width: 1; -} - -#extensionEnd, .extension { - fill: transparent !important; - stroke: ${options.lineColor} !important; - stroke-width: 1; -} - -#aggregationStart, .aggregation { - fill: transparent !important; - stroke: ${options.lineColor} !important; - stroke-width: 1; -} - -#aggregationEnd, .aggregation { - fill: transparent !important; - stroke: ${options.lineColor} !important; - stroke-width: 1; -} - -#lollipopStart, .lollipop { - fill: ${options.mainBkg} !important; - stroke: ${options.lineColor} !important; - stroke-width: 1; -} - -#lollipopEnd, .lollipop { - fill: ${options.mainBkg} !important; - stroke: ${options.lineColor} !important; - stroke-width: 1; -} - -.edgeTerminals { - font-size: 11px; - line-height: initial; -} - -.classTitleText { - text-anchor: middle; - font-size: 18px; - fill: ${options.textColor}; -} -`; -const styles = getStyles; - - - -/***/ }) - -}; -; \ No newline at end of file diff --git a/assets/js/7723.e4345420.js b/assets/js/7723.e4345420.js new file mode 100644 index 000000000000..ca46e01f62c0 --- /dev/null +++ b/assets/js/7723.e4345420.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7723],{57723:(e,s,c)=>{c.d(s,{createPieServices:()=>a.f});var a=c(88685);c(19369)}}]); \ No newline at end of file diff --git a/assets/js/77c23c97.49faf324.js b/assets/js/77c23c97.49faf324.js deleted file mode 100644 index 21dc6c9f974d..000000000000 --- a/assets/js/77c23c97.49faf324.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk=self.webpackChunk||[]).push([[3536],{90830:(e,n,t)=>{"use strict";t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>i,default:()=>u,frontMatter:()=>s,metadata:()=>o,toc:()=>c});var a=t(74848),r=t(28453);t(47379),t(11470),t(19365),t(3514);const s={id:"learn-transactions",title:"Types of Transactions (a.k.a. Extrinsics)",sidebar_label:"Transactions",description:"Types of Transactions on Polkadot.",keywords:["transaction","transfer","DOT","extrinsics"],slug:"../learn-transactions"},i=void 0,o={id:"learn/learn-transactions",title:"Types of Transactions (a.k.a. Extrinsics)",description:"Types of Transactions on Polkadot.",source:"@site/../docs/learn/learn-transactions.md",sourceDirName:"learn",slug:"/learn-transactions",permalink:"/docs/learn-transactions",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-transactions.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1727943421e3,frontMatter:{id:"learn-transactions",title:"Types of Transactions (a.k.a. Extrinsics)",sidebar_label:"Transactions",description:"Types of Transactions on Polkadot.",keywords:["transaction","transfer","DOT","extrinsics"],slug:"../learn-transactions"},sidebar:"docs",previous:{title:"Pure Proxy Accounts",permalink:"/docs/learn-proxies-pure"},next:{title:"Staking",permalink:"/docs/learn-staking-index"}},l={},c=[{value:"Pallets and Extrinsics",id:"pallets-and-extrinsics",level:2},{value:"Types of Extrinsics",id:"types-of-extrinsics",level:2},{value:"Mortal and Immortal Extrinsics",id:"mortal-and-immortal-extrinsics",level:3},{value:"Balance Transfers",id:"balance-transfers",level:3},{value:"Vested Transfers",id:"vested-transfers",level:3},{value:"Verifying Extrinsics",id:"verifying-extrinsics",level:2},{value:"Transaction Fees",id:"transaction-fees",level:2},{value:"Fee Multiplier",id:"fee-multiplier",level:3},{value:"Other Resource Limitation Strategies",id:"other-resource-limitation-strategies",level:3},{value:"Parachain Transactions",id:"parachain-transactions",level:2},{value:"Block Limits and Transaction Priority",id:"block-limits-and-transaction-priority",level:2}];function d(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",hr:"hr",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.h2,{id:"pallets-and-extrinsics",children:"Pallets and Extrinsics"}),"\n",(0,a.jsxs)(n.p,{children:["Polkadot is built using ",(0,a.jsx)(n.a,{href:"https://substrate.io/",children:"Substrate"}),", a modular framework to efficiently build\nblockchains. Substrate's FRAME development environment provides modules called pallets and support\nlibraries that you can use, modify, and extend to build the runtime logic to suit the needs of your\nblockchain. You can explore Substrate's FRAME pallets on\n",(0,a.jsx)(n.a,{href:"https://docs.substrate.io/reference/frame-pallets/",children:"this dedicated page"}),"."]}),"\n",(0,a.jsxs)(n.p,{children:["Within each functional ",(0,a.jsx)(n.strong,{children:"pallet"})," on the blockchain, one can ",(0,a.jsx)(n.strong,{children:"call"})," its functions and execute them\nsuccessfully, provided they have the permission to do so. Because these calls originate outside of\nthe blockchain runtime, such transactions are referred to as ",(0,a.jsx)(n.strong,{children:"extrinsics"}),". Extrinsics normally\ncontain a signature, some data to describe if the extrinsic has passed some validity checks and a\nreference to the pallet and call that it is intended for. For example, the Staking pallet contains\nall functions related to staking. A nominator can bond funds and nominate validators by issuing the\nrespective extrinsics. Some extrinsics might also trigger an event on the chain such as a reward\npayout to the nominators."]}),"\n",(0,a.jsx)(n.h2,{id:"types-of-extrinsics",children:"Types of Extrinsics"}),"\n",(0,a.jsxs)(n.p,{children:["Now that we introduced the term ",(0,a.jsx)(n.em,{children:"extrinsic"}),", let us dive deeper and understand what extrinsics\nreally are. Extrinsics can be one of 3 distinct types:"]}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.strong,{children:"Signed transactions:"})," these must contain the signature of the account sending the inbound\nrequest to the runtime. With signed transactions, the account used to submit the request typically\npays the transaction fee and must sign it using the account's private key."]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.strong,{children:"Unsigned transactions:"})," these don't carry any information about who submitted the transaction,\nsince the format of this type of transaction doesn't require a signature. You can define what\nconditions must be met for such a transaction to be valid."]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.strong,{children:"Inherents:"})," are a special type of unsigned transaction made by block authors which carry\ninformation required to build a block such as timestamps, storage proofs and uncle blocks."]}),"\n"]}),"\n",(0,a.jsx)(n.p,{children:"Signed transactions is the way that most users will interact with Polkadot. Signed transactions come\nfrom an account that has funds, and therefore Polkadot can charge a transaction fee as a way to\nprevent spam."}),"\n",(0,a.jsxs)(n.p,{children:["Unsigned transactions are for special cases where a user needs to submit an extrinsic from a key\npair that does not control funds. For example, validator's ",(0,a.jsx)(n.a,{href:"/docs/learn-cryptography",children:"session keys"}),"\nnever control funds. Unsigned transactions are only used in special cases because, since Polkadot\ncannot charge a fee for them, each one needs its own, custom validation logic."]}),"\n",(0,a.jsx)(n.p,{children:'Inherents are pieces of information that are not signed or included in the transaction queue. As\nsuch, only the block author can add inherents to a block. Inherents are assumed to be "true" simply\nbecause a sufficiently large number of validators have agreed on them being reasonable. For example,\nthe relay chain blocks include a timestamp inherent. There is no way to prove that a timestamp is\ntrue the way one proves the desire to send funds with a signature. Rather, validators accept or\nreject the block based on how reasonable they find the timestamp. In Polkadot, it must be within\nsome acceptable range of their own system clocks.'}),"\n",(0,a.jsx)(n.p,{children:"Here are some key differences between the different types of extrinsics:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:"Contrary to signed transactions, unsigned transaction types require implementing custom validation\nlogic which can consume more resources for checking validity compared to signed transactions."}),"\n",(0,a.jsx)(n.li,{children:"Unsigned transactions have no economic deterrent to prevent spam or replay attacks, so custom\nlogic must account for protecting the network from these types of transactions being misused."}),"\n",(0,a.jsx)(n.li,{children:"Inherents exist to address the need of adding some data to a block, whereas signed or unsigned\ntransactions exist to potentially change the state of the blockchain."}),"\n"]}),"\n",(0,a.jsx)(n.h3,{id:"mortal-and-immortal-extrinsics",children:"Mortal and Immortal Extrinsics"}),"\n",(0,a.jsxs)(n.p,{children:["Transactions are generally irreversible once confirmed and added to the blockchain, an immutable\nledger of all transactions. This means users must exercise caution, as mistakes such as sending DOT\nto the wrong address cannot be reverted. The permanence of transactions highlights the importance of\ncareful verification before signing any transaction on a blockchain network. It is usually a\n",(0,a.jsx)(n.a,{href:"/docs/transaction-attacks",children:"good practice not to blind sign transactions"})," to avoid being\nvictim of an attack."]}),"\n",(0,a.jsxs)(n.p,{children:["In blockchain terms, transactions can be ",(0,a.jsx)(n.strong,{children:"mortal"})," extrinsics (i.e. valid within a defined block\ninterval, usually short), or ",(0,a.jsx)(n.strong,{children:"immortal"})," extrinsics (i.e. always valid). It is possible to make\nimmortal transactions on Polkadot. However,\n",(0,a.jsx)(n.a,{href:"/docs/transaction-attacks#replay-attack",children:"for security reasons"}),", it is highly recommended\nnot to do so and most wallet software will not allow you to make an immortal extrinsic."]}),"\n",(0,a.jsx)(n.h3,{id:"balance-transfers",children:"Balance Transfers"}),"\n",(0,a.jsx)(n.p,{children:"Balance transfers are transfers of token balances between accounts. This is the most well-known type\nof transfer."}),"\n",(0,a.jsx)(n.h3,{id:"vested-transfers",children:"Vested Transfers"}),"\n",(0,a.jsxs)(n.p,{children:["DOT may have a lock to account for vesting funds. Like other types of\n",(0,a.jsx)(n.a,{href:"/docs/learn-account-balances#locks",children:"locks"}),", these funds cannot be transferred but can be used in\nother parts of the protocol such as voting in governance or being staked as a validator or\nnominator."]}),"\n",(0,a.jsxs)(n.p,{children:["Vesting funds are on a release schedule that unlocks a constant number of tokens at each block\n(",(0,a.jsx)(n.strong,{children:"linear vesting"}),") or the full amount after a specific block number (",(0,a.jsx)(n.strong,{children:"cliff vesting"}),"). In all\nvesting cases, the lock decreases over time until all the funds are transferable."]}),"\n",(0,a.jsx)(n.h2,{id:"verifying-extrinsics",children:"Verifying Extrinsics"}),"\n",(0,a.jsx)(n.admonition,{type:"danger",children:(0,a.jsx)(n.p,{children:"Do not sign a transaction if you can't verify what you are signing or you suspect you might be\nsigning a different extrinsic than the one intended."})}),"\n",(0,a.jsxs)(n.p,{children:["Verifying the extrinsic you are signing can take some more time before signing for a transaction but\nit allows you to add an extra security step. There are\n",(0,a.jsx)(n.a,{href:"/docs/transaction-attacks",children:"a multitude of possible attacks"})," that will prevent you to send\nfunds to the desired destination account."]}),"\n",(0,a.jsx)(n.h2,{id:"transaction-fees",children:"Transaction Fees"}),"\n",(0,a.jsxs)(n.p,{children:["Storage and computation are limited resources in a blockchain network. Transaction fees prevent\nindividual users from consuming too many resources. Polkadot uses a ",(0,a.jsx)(n.strong,{children:"weight-based fee model"})," as\nopposed to a gas-metering model. As such, fees are charged before transaction execution. Once the\nfee is paid, nodes will execute the transaction."]}),"\n",(0,a.jsx)(n.p,{children:"Polkadot fees consist of three parts:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.code,{children:"Base fee"}),": a fixed fee applied to every transaction and set by the runtime."]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.code,{children:"Length fee"}),": a fee that gets multiplied by the length of the transaction in bytes."]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.code,{children:"Weight fee"}),": a fee for each varying runtime function. Runtime implementers must implement a\nconversion mechanism that determines the corresponding currency amount for the calculated weight."]}),"\n"]}),"\n",(0,a.jsx)(n.p,{children:"The final fee can be summarized as:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"fee = base_fee + length_of_transaction_in_bytes * length_fee + weight_fee\n"})}),"\n",(0,a.jsx)(n.p,{children:"where:"}),"\n",(0,a.jsx)(n.p,{children:"Base fee: 1 milliDOT"}),"\n",(0,a.jsx)(n.p,{children:"Length fee: 0.1 DOT per byte"}),"\n",(0,a.jsx)(n.p,{children:"The weight-to-fee conversion is calculated as follows:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"weight_fee = weight/1.26 * (10\u22128)\n"})}),"\n",(0,a.jsx)(n.p,{children:"A weight of 126,000 nS is mapped to 1 mDOT. This fee will always be, at most, the max size of an\nunsigned 128-bit integer."}),"\n",(0,a.jsxs)(n.p,{children:["See\n",(0,a.jsx)(n.a,{href:"https://spec.polkadot.network/id-weights#id-definitions-in-polkadot",children:"the Polkadot specification"}),"\nand ",(0,a.jsx)(n.a,{href:"https://docs.substrate.io/build/tx-weights-fees/",children:"the Substrate documentation"})," for more\ndetails."]}),"\n",(0,a.jsx)(n.h3,{id:"fee-multiplier",children:"Fee Multiplier"}),"\n",(0,a.jsxs)(n.p,{children:["Polkadot can add an additional fee to transactions if the network becomes too busy and starts to\ndecelerate the system. This additional fee is known as the ",(0,a.jsx)(n.code,{children:"Fee Multiplier"})," and its value is defined\nby the runtime. The multiplier compares the saturation of blocks; if the previous block is less\nsaturated than the current block (implying an uptrend in usage), the fee is slightly increased.\nSimilarly, the fee is decreased if the previous block is more saturated than the current block\n(implying a downtrend in usage)."]}),"\n",(0,a.jsx)(n.p,{children:"The multiplier can create an incentive to avoid the production of low-priority or insignificant\ntransactions. In contrast, those additional fees will decrease if the network calms down and\ntransactions can be executed without overheads."}),"\n",(0,a.jsx)(n.p,{children:"The final fee is calculated as follows:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"final_fee = fee * fee_multiplier\n"})}),"\n",(0,a.jsxs)(n.p,{children:["See\n",(0,a.jsx)(n.a,{href:"https://spec.polkadot.network/id-weights#id-fee-multiplier",children:"the documentation about the Polkadot specifications"}),"\nfor more details."]}),"\n",(0,a.jsx)(n.h3,{id:"other-resource-limitation-strategies",children:"Other Resource Limitation Strategies"}),"\n",(0,a.jsx)(n.p,{children:"Transaction weight must be computable before execution and can only represent fixed logic. Some\ntransactions warrant limiting resources with other strategies. For example:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["Bonds: Some transactions, like voting, may require a bond that will be returned or\n",(0,a.jsx)(n.a,{href:"/docs/learn-offenses",children:"slashed"})," after an on-chain event. In the voting example, returned at the end\nof the election or slashed if the voter tried anything malicious."]}),"\n",(0,a.jsxs)(n.li,{children:["Deposits: Some transactions, like setting an ",(0,a.jsx)(n.a,{href:"/docs/learn-identity",children:"identity"})," or claiming an index,\nuse storage space indefinitely. These require a deposit to be returned if the user decides to\nclear their identity and free the storage."]}),"\n",(0,a.jsx)(n.li,{children:"Burns: A transaction may burn funds internally based on its logic. For example, a transaction may\nburn funds from the sender if it creates new storage entries, thus increasing the state size."}),"\n",(0,a.jsxs)(n.li,{children:["Limits: Some limits are part of the protocol. For example, nominators can only nominate 16\nvalidators. This limits the complexity of ",(0,a.jsx)(n.a,{href:"/docs/learn-phragmen",children:"Phragm\xe9n"}),"."]}),"\n"]}),"\n",(0,a.jsx)(n.h2,{id:"parachain-transactions",children:"Parachain Transactions"}),"\n",(0,a.jsx)(n.p,{children:"The transactions that take place within parachains do not incur relay chain transaction fees. Users\nof shard applications do not even need to hold DOT tokens, as each shard has its own economic model\nand may or may not have a token. There are, however, situations where shards themselves make\ntransactions on the relay chain."}),"\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.a,{href:"/docs/learn-parachains",children:"Parachains"})," have a dedicated core on the relay chain for execution, so their\ncollators do not need to own DOT in order to include blocks. The parachain will make some\ntransactions itself, for example, opening or closing an ",(0,a.jsx)(n.a,{href:"/docs/learn-xcm",children:"XCM"})," channel, renew its time\non a core, or upgrading its runtime. Parachains have their own accounts on the relay chain and will\nneed to use those funds to issue transactions on the parachain's behalf."]}),"\n",(0,a.jsx)(n.h2,{id:"block-limits-and-transaction-priority",children:"Block Limits and Transaction Priority"}),"\n",(0,a.jsx)(n.p,{children:"Relay chain blocks have both a maximum length (in bytes) and a maximum weight. Block producers will\nfill blocks with transactions up to these limits. A portion of each block - currently 25% - is\nreserved for critical transactions that are related to the chain's operation. Block producers will\nonly fill up to 75% of a block with normal transactions. Some examples of operational transactions:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:"Misbehavior reports"}),"\n",(0,a.jsx)(n.li,{children:"Council operations"}),"\n",(0,a.jsx)(n.li,{children:"Member operations in an election (e.g. renouncing candidacy)"}),"\n"]}),"\n",(0,a.jsx)(n.p,{children:"Block producers prioritize transactions based on each transaction's total fee. Since a portion of\nthe fee will go to the block producer, producers will include the transactions with the highest fees\nto maximize their reward."}),"\n",(0,a.jsx)(n.hr,{}),"\n",(0,a.jsx)(n.admonition,{title:"Polkadot-JS Guides",type:"info",children:(0,a.jsxs)(n.p,{children:["If you are an advanced user, see the\n",(0,a.jsx)(n.a,{href:"/docs/learn-guides-transfers",children:"Polkadot-JS guides about transfers"}),"."]})})]})}function u(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(d,{...e})}):d(e)}},47379:(e,n,t)=>{"use strict";t.d(n,{A:()=>h});var a=t(90675),r=t(10467),s=t(96540),i=t(19588),o=t(2026),l=t(11135);function c(e,n,t){return d.apply(this,arguments)}function d(){return(d=(0,r.A)((0,a.A)().mark((function e(n,t,r){var s,l,c,d,u;return(0,a.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s=void 0,l=void 0,e.t0=n,e.next="polkadot"===e.t0?5:"kusama"===e.t0?7:"statemine"===e.t0?9:"statemint"===e.t0?11:"polkadotpeople"===e.t0?13:"kusamapeople"===e.t0?15:17;break;case 5:return s="wss://rpc.polkadot.io",e.abrupt("break",18);case 7:return s="wss://kusama-rpc.polkadot.io/",e.abrupt("break",18);case 9:return s="wss://statemine-rpc.polkadot.io/",e.abrupt("break",18);case 11:return s="wss://statemint-rpc.polkadot.io/",e.abrupt("break",18);case 13:return s="wss://polkadot-people-rpc.polkadot.io/",e.abrupt("break",18);case 15:return s="wss://kusama-people-rpc.polkadot.io/",e.abrupt("break",18);case 17:console.log("Unknown socket url provided, no connection made.");case 18:if(void 0!==s){e.next=22;break}return e.abrupt("return");case 22:return c=new i.E(s),e.next=25,o.G.create({provider:c});case 25:d=e.sent,(u=t.split(".")).forEach((function(e){e in d&&(d=d[e])})),e.t1=u[0],e.next="consts"===e.t1?31:"query"===e.t1?33:38;break;case 31:return l=d.toString(),e.abrupt("break",39);case 33:return e.next=35,d();case 35:return l=(l=e.sent).toString(),e.abrupt("break",39);case 38:console.log("Unknown path prefix ("+u[0]+") in "+t);case 39:return e.abrupt("return",l);case 40:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function u(e,n,t,a){switch(n){case"humanReadable":(0,l.HumanReadable)(e,t,a);break;case"precise":(0,l.Precise)(e,t,a);break;case"blocksToDays":(0,l.BlocksToDays)(e,a);break;case"erasToDays":(0,l.ErasToDays)(e,a,t);break;case"percentage":(0,l.Percentage)(e,a);break;case"permillToPercent":(0,l.PermillToPercent)(e,a);break;case"arrayLength":(0,l.ArrayLength)(e,a);break;default:return void console.log("Ignoring unknown filter type")}}const h=function(e){var n=e.network,t=e.path,i=e.defaultValue,o=e.filter,l=void 0===o?void 0:o,d=(0,s.useState)(""),h=d[0],p=d[1];return n=n.toLowerCase(),(0,s.useEffect)((function(){void 0!==l?u(i.toString(),l,n,p):p(i.toString());var e=void 0;switch(n){case"polkadot":e="wss://rpc.polkadot.io";break;case"kusama":e="wss://kusama-rpc.polkadot.io/";break;case"statemine":e="wss://kusama-asset-hub-rpc.polkadot.io/";break;case"statemint":e="wss://polkadot-asset-hub-rpc.polkadot.io/";break;case"kusamapeople":e="wss://kusama-people-rpc.polkadot.io";break;case"polkadotpeople":e="wss://polkadot-people-rpc.polkadot.io";break;default:console.log("Unknown network provided, "+n)}if(void 0===e)console.log("Failed to connect to a valid websocket, applying default");else{var s=function(){var e=(0,r.A)((0,a.A)().mark((function e(){var r;return(0,a.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,c(n,t,p);case 2:if(void 0!==(r=e.sent)){e.next=7;break}return e.abrupt("return");case 7:void 0!==l?u(r,l,n,p):p(r);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();try{s()}catch(o){console.log(o)}}}),[]),h}},11135:e=>{var n="polkadot",t="kusama",a="statemine",r="statemint",s="polkadotpeople",i="kusamapeople",o={polkadot:{precision:1e10,symbol:"DOT"},kusama:{precision:1e12,symbol:"KSM"},statemint:{precision:1e10,symbol:"DOT"},statemine:{precision:1e12,symbol:"KSM"},polkadotpeople:{precision:1e10,symbol:"DOT"},kusamapeople:{precision:1e12,symbol:"KSM"}};e.exports={HumanReadable:function(e,l,c){var d=void 0;if(l===n||l===r)d=3;else if(l===t||l===a||l===s)d=6;else{if(l!=i)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");d=8}e=parseFloat(e),c((e=Number.isInteger(e/o[l].precision)?e/o[l].precision+" "+o[l].symbol:(e/o[l].precision).toFixed(d)+" "+o[l].symbol).toString())},Precise:function(e,n,t){t(e=(e=parseFloat(e))/o[n].precision+" "+o[n].symbol)},BlocksToDays:function(e,n){n((e=6*e/86400).toString())},ErasToDays:function(e,o,l){var c=void 0;if(l===n||l===r||l==s)c=1;else{if(l!==t&&l!==a&&l!=i)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");c=4}o((e/=c).toString())},Percentage:function(e,n){n((e/=1e7).toString())},PermillToPercent:function(e,n){n((e/=1e4).toString())},ArrayLength:function(e,n){n((e=e.split(",").length).toString())}}},3514:(e,n,t)=>{"use strict";t.d(n,{A:()=>x});t(96540);var a=t(34164),r=t(26972),s=t(28774),i=t(53465),o=t(16654),l=t(21312),c=t(51107);const d={cardContainer:"cardContainer_fWXF",cardTitle:"cardTitle_rnsV",cardDescription:"cardDescription_PWke"};var u=t(74848);function h(e){var n=e.href,t=e.children;return(0,u.jsx)(s.A,{href:n,className:(0,a.A)("card padding--lg",d.cardContainer),children:t})}function p(e){var n=e.href,t=e.icon,r=e.title,s=e.description;return(0,u.jsxs)(h,{href:n,children:[(0,u.jsxs)(c.A,{as:"h2",className:(0,a.A)("text--truncate",d.cardTitle),title:r,children:[t," ",r]}),s&&(0,u.jsx)("p",{className:(0,a.A)("text--truncate",d.cardDescription),title:s,children:s})]})}function f(e){var n,t,a=e.item,s=(0,r.Nr)(a),o=(t=(0,i.W)().selectMessage,function(e){return t(e,(0,l.T)({message:"1 item|{count} items",id:"theme.docs.DocCard.categoryDescription.plurals",description:"The default description for a category card in the generated index about how many items this category includes"},{count:e}))});return s?(0,u.jsx)(p,{href:s,icon:"\ud83d\uddc3\ufe0f",title:a.label,description:null!=(n=a.description)?n:o(a.items.length)}):null}function m(e){var n,t,a=e.item,s=(0,o.A)(a.href)?"\ud83d\udcc4\ufe0f":"\ud83d\udd17",i=(0,r.cC)(null!=(n=a.docId)?n:void 0);return(0,u.jsx)(p,{href:a.href,icon:s,title:a.label,description:null!=(t=a.description)?t:null==i?void 0:i.description})}function b(e){var n=e.item;switch(n.type){case"link":return(0,u.jsx)(m,{item:n});case"category":return(0,u.jsx)(f,{item:n});default:throw new Error("unknown item type "+JSON.stringify(n))}}function g(e){var n=e.className,t=(0,r.$S)();return(0,u.jsx)(x,{items:t.items,className:n})}function x(e){var n=e.items,t=e.className;if(!n)return(0,u.jsx)(g,Object.assign({},e));var s=(0,r.d1)(n);return(0,u.jsx)("section",{className:(0,a.A)("row",t),children:s.map((function(e,n){return(0,u.jsx)("article",{className:"col col--6 margin-bottom--lg",children:(0,u.jsx)(b,{item:e})},n)}))})}},19365:(e,n,t)=>{"use strict";t.d(n,{A:()=>i});t(96540);var a=t(34164);const r={tabItem:"tabItem_Ymn6"};var s=t(74848);function i(e){var n=e.children,t=e.hidden,i=e.className;return(0,s.jsx)("div",{role:"tabpanel",className:(0,a.A)(r.tabItem,i),hidden:t,children:n})}},11470:(e,n,t)=>{"use strict";t.d(n,{A:()=>w});var a=t(96540),r=t(34164),s=t(23104),i=t(56347),o=t(205),l=t(57485),c=t(31682),d=t(75376);function u(e){var n,t;return null!=(n=null==(t=a.Children.toArray(e).filter((function(e){return"\n"!==e})).map((function(e){if(!e||(0,a.isValidElement)(e)&&((n=e.props)&&"object"==typeof n&&"value"in n))return e;var n;throw new Error("Docusaurus error: Bad child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:t.filter(Boolean))?n:[]}function h(e){var n=e.values,t=e.children;return(0,a.useMemo)((function(){var e=null!=n?n:function(e){return u(e).map((function(e){var n=e.props;return{value:n.value,label:n.label,attributes:n.attributes,default:n.default}}))}(t);return function(e){var n=(0,c.XI)(e,(function(e,n){return e.value===n.value}));if(n.length>0)throw new Error('Docusaurus error: Duplicate values "'+n.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[n,t])}function p(e){var n=e.value;return e.tabValues.some((function(e){return e.value===n}))}function f(e){var n=e.queryString,t=void 0!==n&&n,r=e.groupId,s=(0,i.W6)(),o=function(e){var n=e.queryString,t=void 0!==n&&n,a=e.groupId;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=a?a:null}({queryString:t,groupId:r});return[(0,l.aZ)(o),(0,a.useCallback)((function(e){if(o){var n=new URLSearchParams(s.location.search);n.set(o,e),s.replace(Object.assign({},s.location,{search:n.toString()}))}}),[o,s])]}function m(e){var n,t,r,s,i=e.defaultValue,l=e.queryString,c=void 0!==l&&l,u=e.groupId,m=h(e),b=(0,a.useState)((function(){return function(e){var n,t=e.defaultValue,a=e.tabValues;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!p({value:t,tabValues:a}))throw new Error('Docusaurus error: The has a defaultValue "'+t+'" but none of its children has the corresponding value. Available values are: '+a.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return t}var r=null!=(n=a.find((function(e){return e.default})))?n:a[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:i,tabValues:m})})),g=b[0],x=b[1],v=f({queryString:c,groupId:u}),k=v[0],y=v[1],w=(n=function(e){return e?"docusaurus.tab."+e:null}({groupId:u}.groupId),t=(0,d.Dv)(n),r=t[0],s=t[1],[r,(0,a.useCallback)((function(e){n&&s.set(e)}),[n,s])]),j=w[0],T=w[1],S=function(){var e=null!=k?k:j;return p({value:e,tabValues:m})?e:null}();return(0,o.A)((function(){S&&x(S)}),[S]),{selectedValue:g,selectValue:(0,a.useCallback)((function(e){if(!p({value:e,tabValues:m}))throw new Error("Can't select invalid tab value="+e);x(e),y(e),T(e)}),[y,T,m]),tabValues:m}}var b=t(92303);const g={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var x=t(74848);function v(e){var n=e.className,t=e.block,a=e.selectedValue,i=e.selectValue,o=e.tabValues,l=[],c=(0,s.a_)().blockElementScrollPositionUntilNextRender,d=function(e){var n=e.currentTarget,t=l.indexOf(n),r=o[t].value;r!==a&&(c(n),i(r))},u=function(e){var n,t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":var a,r=l.indexOf(e.currentTarget)+1;t=null!=(a=l[r])?a:l[0];break;case"ArrowLeft":var s,i=l.indexOf(e.currentTarget)-1;t=null!=(s=l[i])?s:l[l.length-1]}null==(n=t)||n.focus()};return(0,x.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,r.A)("tabs",{"tabs--block":t},n),children:o.map((function(e){var n=e.value,t=e.label,s=e.attributes;return(0,x.jsx)("li",Object.assign({role:"tab",tabIndex:a===n?0:-1,"aria-selected":a===n,ref:function(e){return l.push(e)},onKeyDown:u,onClick:d},s,{className:(0,r.A)("tabs__item",g.tabItem,null==s?void 0:s.className,{"tabs__item--active":a===n}),children:null!=t?t:n}),n)}))})}function k(e){var n=e.lazy,t=e.children,s=e.selectedValue,i=(Array.isArray(t)?t:[t]).filter(Boolean);if(n){var o=i.find((function(e){return e.props.value===s}));return o?(0,a.cloneElement)(o,{className:(0,r.A)("margin-top--md",o.props.className)}):null}return(0,x.jsx)("div",{className:"margin-top--md",children:i.map((function(e,n){return(0,a.cloneElement)(e,{key:n,hidden:e.props.value!==s})}))})}function y(e){var n=m(e);return(0,x.jsxs)("div",{className:(0,r.A)("tabs-container",g.tabList),children:[(0,x.jsx)(v,Object.assign({},n,e)),(0,x.jsx)(k,Object.assign({},n,e))]})}function w(e){var n=(0,b.A)();return(0,x.jsx)(y,Object.assign({},e,{children:u(e.children)}),String(n))}},53465:(e,n,t)=>{"use strict";t.d(n,{W:()=>c});var a=t(96540),r=t(44586),s=["zero","one","two","few","many","other"];function i(e){return s.filter((function(n){return e.includes(n)}))}var o={locale:"en",pluralForms:i(["one","other"]),select:function(e){return 1===e?"one":"other"}};function l(){var e=(0,r.A)().i18n.currentLocale;return(0,a.useMemo)((function(){try{return n=e,t=new Intl.PluralRules(n),{locale:n,pluralForms:i(t.resolvedOptions().pluralCategories),select:function(e){return t.select(e)}}}catch(a){return console.error('Failed to use Intl.PluralRules for locale "'+e+'".\nDocusaurus will fallback to the default (English) implementation.\nError: '+a.message+"\n"),o}var n,t}),[e])}function c(){var e=l();return{selectMessage:function(n,t){return function(e,n,t){var a=e.split("|");if(1===a.length)return a[0];a.length>t.pluralForms.length&&console.error("For locale="+t.locale+", a maximum of "+t.pluralForms.length+" plural forms are expected ("+t.pluralForms.join(",")+"), but the message contains "+a.length+": "+e);var r=t.select(n),s=t.pluralForms.indexOf(r);return a[Math.min(s,a.length-1)]}(t,n,e)}}}},47790:()=>{}}]); \ No newline at end of file diff --git a/assets/js/77c23c97.6572f5a9.js b/assets/js/77c23c97.6572f5a9.js new file mode 100644 index 000000000000..b2d63bf97a3f --- /dev/null +++ b/assets/js/77c23c97.6572f5a9.js @@ -0,0 +1 @@ +(self.webpackChunk=self.webpackChunk||[]).push([[3536],{73554:(e,n,t)=>{"use strict";t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>o,default:()=>u,frontMatter:()=>i,metadata:()=>a,toc:()=>c});const a=JSON.parse('{"id":"learn/learn-transactions","title":"Types of Transactions (a.k.a. Extrinsics)","description":"Types of Transactions on Polkadot.","source":"@site/../docs/learn/learn-transactions.md","sourceDirName":"learn","slug":"/learn-transactions","permalink":"/docs/learn-transactions","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-transactions.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1727943421000,"frontMatter":{"id":"learn-transactions","title":"Types of Transactions (a.k.a. Extrinsics)","sidebar_label":"Transactions","description":"Types of Transactions on Polkadot.","keywords":["transaction","transfer","DOT","extrinsics"],"slug":"../learn-transactions"},"sidebar":"docs","previous":{"title":"Pure Proxy Accounts","permalink":"/docs/learn-proxies-pure"},"next":{"title":"Staking","permalink":"/docs/learn-staking-index"}}');var r=t(74848),s=t(28453);t(47379),t(11470),t(19365),t(3514);const i={id:"learn-transactions",title:"Types of Transactions (a.k.a. Extrinsics)",sidebar_label:"Transactions",description:"Types of Transactions on Polkadot.",keywords:["transaction","transfer","DOT","extrinsics"],slug:"../learn-transactions"},o=void 0,l={},c=[{value:"Pallets and Extrinsics",id:"pallets-and-extrinsics",level:2},{value:"Types of Extrinsics",id:"types-of-extrinsics",level:2},{value:"Mortal and Immortal Extrinsics",id:"mortal-and-immortal-extrinsics",level:3},{value:"Balance Transfers",id:"balance-transfers",level:3},{value:"Vested Transfers",id:"vested-transfers",level:3},{value:"Verifying Extrinsics",id:"verifying-extrinsics",level:2},{value:"Transaction Fees",id:"transaction-fees",level:2},{value:"Fee Multiplier",id:"fee-multiplier",level:3},{value:"Other Resource Limitation Strategies",id:"other-resource-limitation-strategies",level:3},{value:"Parachain Transactions",id:"parachain-transactions",level:2},{value:"Block Limits and Transaction Priority",id:"block-limits-and-transaction-priority",level:2}];function d(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",hr:"hr",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h2,{id:"pallets-and-extrinsics",children:"Pallets and Extrinsics"}),"\n",(0,r.jsxs)(n.p,{children:["Polkadot is built using ",(0,r.jsx)(n.a,{href:"https://substrate.io/",children:"Substrate"}),", a modular framework to efficiently build\nblockchains. Substrate's FRAME development environment provides modules called pallets and support\nlibraries that you can use, modify, and extend to build the runtime logic to suit the needs of your\nblockchain. You can explore Substrate's FRAME pallets on\n",(0,r.jsx)(n.a,{href:"https://docs.substrate.io/reference/frame-pallets/",children:"this dedicated page"}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["Within each functional ",(0,r.jsx)(n.strong,{children:"pallet"})," on the blockchain, one can ",(0,r.jsx)(n.strong,{children:"call"})," its functions and execute them\nsuccessfully, provided they have the permission to do so. Because these calls originate outside of\nthe blockchain runtime, such transactions are referred to as ",(0,r.jsx)(n.strong,{children:"extrinsics"}),". Extrinsics normally\ncontain a signature, some data to describe if the extrinsic has passed some validity checks and a\nreference to the pallet and call that it is intended for. For example, the Staking pallet contains\nall functions related to staking. A nominator can bond funds and nominate validators by issuing the\nrespective extrinsics. Some extrinsics might also trigger an event on the chain such as a reward\npayout to the nominators."]}),"\n",(0,r.jsx)(n.h2,{id:"types-of-extrinsics",children:"Types of Extrinsics"}),"\n",(0,r.jsxs)(n.p,{children:["Now that we introduced the term ",(0,r.jsx)(n.em,{children:"extrinsic"}),", let us dive deeper and understand what extrinsics\nreally are. Extrinsics can be one of 3 distinct types:"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Signed transactions:"})," these must contain the signature of the account sending the inbound\nrequest to the runtime. With signed transactions, the account used to submit the request typically\npays the transaction fee and must sign it using the account's private key."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Unsigned transactions:"})," these don't carry any information about who submitted the transaction,\nsince the format of this type of transaction doesn't require a signature. You can define what\nconditions must be met for such a transaction to be valid."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Inherents:"})," are a special type of unsigned transaction made by block authors which carry\ninformation required to build a block such as timestamps, storage proofs and uncle blocks."]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"Signed transactions is the way that most users will interact with Polkadot. Signed transactions come\nfrom an account that has funds, and therefore Polkadot can charge a transaction fee as a way to\nprevent spam."}),"\n",(0,r.jsxs)(n.p,{children:["Unsigned transactions are for special cases where a user needs to submit an extrinsic from a key\npair that does not control funds. For example, validator's ",(0,r.jsx)(n.a,{href:"/docs/learn-cryptography",children:"session keys"}),"\nnever control funds. Unsigned transactions are only used in special cases because, since Polkadot\ncannot charge a fee for them, each one needs its own, custom validation logic."]}),"\n",(0,r.jsx)(n.p,{children:'Inherents are pieces of information that are not signed or included in the transaction queue. As\nsuch, only the block author can add inherents to a block. Inherents are assumed to be "true" simply\nbecause a sufficiently large number of validators have agreed on them being reasonable. For example,\nthe relay chain blocks include a timestamp inherent. There is no way to prove that a timestamp is\ntrue the way one proves the desire to send funds with a signature. Rather, validators accept or\nreject the block based on how reasonable they find the timestamp. In Polkadot, it must be within\nsome acceptable range of their own system clocks.'}),"\n",(0,r.jsx)(n.p,{children:"Here are some key differences between the different types of extrinsics:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Contrary to signed transactions, unsigned transaction types require implementing custom validation\nlogic which can consume more resources for checking validity compared to signed transactions."}),"\n",(0,r.jsx)(n.li,{children:"Unsigned transactions have no economic deterrent to prevent spam or replay attacks, so custom\nlogic must account for protecting the network from these types of transactions being misused."}),"\n",(0,r.jsx)(n.li,{children:"Inherents exist to address the need of adding some data to a block, whereas signed or unsigned\ntransactions exist to potentially change the state of the blockchain."}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"mortal-and-immortal-extrinsics",children:"Mortal and Immortal Extrinsics"}),"\n",(0,r.jsxs)(n.p,{children:["Transactions are generally irreversible once confirmed and added to the blockchain, an immutable\nledger of all transactions. This means users must exercise caution, as mistakes such as sending DOT\nto the wrong address cannot be reverted. The permanence of transactions highlights the importance of\ncareful verification before signing any transaction on a blockchain network. It is usually a\n",(0,r.jsx)(n.a,{href:"/docs/transaction-attacks",children:"good practice not to blind sign transactions"})," to avoid being\nvictim of an attack."]}),"\n",(0,r.jsxs)(n.p,{children:["In blockchain terms, transactions can be ",(0,r.jsx)(n.strong,{children:"mortal"})," extrinsics (i.e. valid within a defined block\ninterval, usually short), or ",(0,r.jsx)(n.strong,{children:"immortal"})," extrinsics (i.e. always valid). It is possible to make\nimmortal transactions on Polkadot. However,\n",(0,r.jsx)(n.a,{href:"/docs/transaction-attacks#replay-attack",children:"for security reasons"}),", it is highly recommended\nnot to do so and most wallet software will not allow you to make an immortal extrinsic."]}),"\n",(0,r.jsx)(n.h3,{id:"balance-transfers",children:"Balance Transfers"}),"\n",(0,r.jsx)(n.p,{children:"Balance transfers are transfers of token balances between accounts. This is the most well-known type\nof transfer."}),"\n",(0,r.jsx)(n.h3,{id:"vested-transfers",children:"Vested Transfers"}),"\n",(0,r.jsxs)(n.p,{children:["DOT may have a lock to account for vesting funds. Like other types of\n",(0,r.jsx)(n.a,{href:"/docs/learn-account-balances#locks",children:"locks"}),", these funds cannot be transferred but can be used in\nother parts of the protocol such as voting in governance or being staked as a validator or\nnominator."]}),"\n",(0,r.jsxs)(n.p,{children:["Vesting funds are on a release schedule that unlocks a constant number of tokens at each block\n(",(0,r.jsx)(n.strong,{children:"linear vesting"}),") or the full amount after a specific block number (",(0,r.jsx)(n.strong,{children:"cliff vesting"}),"). In all\nvesting cases, the lock decreases over time until all the funds are transferable."]}),"\n",(0,r.jsx)(n.h2,{id:"verifying-extrinsics",children:"Verifying Extrinsics"}),"\n",(0,r.jsx)(n.admonition,{type:"danger",children:(0,r.jsx)(n.p,{children:"Do not sign a transaction if you can't verify what you are signing or you suspect you might be\nsigning a different extrinsic than the one intended."})}),"\n",(0,r.jsxs)(n.p,{children:["Verifying the extrinsic you are signing can take some more time before signing for a transaction but\nit allows you to add an extra security step. There are\n",(0,r.jsx)(n.a,{href:"/docs/transaction-attacks",children:"a multitude of possible attacks"})," that will prevent you to send\nfunds to the desired destination account."]}),"\n",(0,r.jsx)(n.h2,{id:"transaction-fees",children:"Transaction Fees"}),"\n",(0,r.jsxs)(n.p,{children:["Storage and computation are limited resources in a blockchain network. Transaction fees prevent\nindividual users from consuming too many resources. Polkadot uses a ",(0,r.jsx)(n.strong,{children:"weight-based fee model"})," as\nopposed to a gas-metering model. As such, fees are charged before transaction execution. Once the\nfee is paid, nodes will execute the transaction."]}),"\n",(0,r.jsx)(n.p,{children:"Polkadot fees consist of three parts:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"Base fee"}),": a fixed fee applied to every transaction and set by the runtime."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"Length fee"}),": a fee that gets multiplied by the length of the transaction in bytes."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"Weight fee"}),": a fee for each varying runtime function. Runtime implementers must implement a\nconversion mechanism that determines the corresponding currency amount for the calculated weight."]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"The final fee can be summarized as:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"fee = base_fee + length_of_transaction_in_bytes * length_fee + weight_fee\n"})}),"\n",(0,r.jsx)(n.p,{children:"where:"}),"\n",(0,r.jsx)(n.p,{children:"Base fee: 1 milliDOT"}),"\n",(0,r.jsx)(n.p,{children:"Length fee: 0.1 DOT per byte"}),"\n",(0,r.jsx)(n.p,{children:"The weight-to-fee conversion is calculated as follows:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"weight_fee = weight/1.26 * (10\u22128)\n"})}),"\n",(0,r.jsx)(n.p,{children:"A weight of 126,000 nS is mapped to 1 mDOT. This fee will always be, at most, the max size of an\nunsigned 128-bit integer."}),"\n",(0,r.jsxs)(n.p,{children:["See\n",(0,r.jsx)(n.a,{href:"https://spec.polkadot.network/id-weights#id-definitions-in-polkadot",children:"the Polkadot specification"}),"\nand ",(0,r.jsx)(n.a,{href:"https://docs.substrate.io/build/tx-weights-fees/",children:"the Substrate documentation"})," for more\ndetails."]}),"\n",(0,r.jsx)(n.h3,{id:"fee-multiplier",children:"Fee Multiplier"}),"\n",(0,r.jsxs)(n.p,{children:["Polkadot can add an additional fee to transactions if the network becomes too busy and starts to\ndecelerate the system. This additional fee is known as the ",(0,r.jsx)(n.code,{children:"Fee Multiplier"})," and its value is defined\nby the runtime. The multiplier compares the saturation of blocks; if the previous block is less\nsaturated than the current block (implying an uptrend in usage), the fee is slightly increased.\nSimilarly, the fee is decreased if the previous block is more saturated than the current block\n(implying a downtrend in usage)."]}),"\n",(0,r.jsx)(n.p,{children:"The multiplier can create an incentive to avoid the production of low-priority or insignificant\ntransactions. In contrast, those additional fees will decrease if the network calms down and\ntransactions can be executed without overheads."}),"\n",(0,r.jsx)(n.p,{children:"The final fee is calculated as follows:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"final_fee = fee * fee_multiplier\n"})}),"\n",(0,r.jsxs)(n.p,{children:["See\n",(0,r.jsx)(n.a,{href:"https://spec.polkadot.network/id-weights#id-fee-multiplier",children:"the documentation about the Polkadot specifications"}),"\nfor more details."]}),"\n",(0,r.jsx)(n.h3,{id:"other-resource-limitation-strategies",children:"Other Resource Limitation Strategies"}),"\n",(0,r.jsx)(n.p,{children:"Transaction weight must be computable before execution and can only represent fixed logic. Some\ntransactions warrant limiting resources with other strategies. For example:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Bonds: Some transactions, like voting, may require a bond that will be returned or\n",(0,r.jsx)(n.a,{href:"/docs/learn-offenses",children:"slashed"})," after an on-chain event. In the voting example, returned at the end\nof the election or slashed if the voter tried anything malicious."]}),"\n",(0,r.jsxs)(n.li,{children:["Deposits: Some transactions, like setting an ",(0,r.jsx)(n.a,{href:"/docs/learn-identity",children:"identity"})," or claiming an index,\nuse storage space indefinitely. These require a deposit to be returned if the user decides to\nclear their identity and free the storage."]}),"\n",(0,r.jsx)(n.li,{children:"Burns: A transaction may burn funds internally based on its logic. For example, a transaction may\nburn funds from the sender if it creates new storage entries, thus increasing the state size."}),"\n",(0,r.jsxs)(n.li,{children:["Limits: Some limits are part of the protocol. For example, nominators can only nominate 16\nvalidators. This limits the complexity of ",(0,r.jsx)(n.a,{href:"/docs/learn-phragmen",children:"Phragm\xe9n"}),"."]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"parachain-transactions",children:"Parachain Transactions"}),"\n",(0,r.jsx)(n.p,{children:"The transactions that take place within parachains do not incur relay chain transaction fees. Users\nof shard applications do not even need to hold DOT tokens, as each shard has its own economic model\nand may or may not have a token. There are, however, situations where shards themselves make\ntransactions on the relay chain."}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"/docs/learn-parachains",children:"Parachains"})," have a dedicated core on the relay chain for execution, so their\ncollators do not need to own DOT in order to include blocks. The parachain will make some\ntransactions itself, for example, opening or closing an ",(0,r.jsx)(n.a,{href:"/docs/learn-xcm",children:"XCM"})," channel, renew its time\non a core, or upgrading its runtime. Parachains have their own accounts on the relay chain and will\nneed to use those funds to issue transactions on the parachain's behalf."]}),"\n",(0,r.jsx)(n.h2,{id:"block-limits-and-transaction-priority",children:"Block Limits and Transaction Priority"}),"\n",(0,r.jsx)(n.p,{children:"Relay chain blocks have both a maximum length (in bytes) and a maximum weight. Block producers will\nfill blocks with transactions up to these limits. A portion of each block - currently 25% - is\nreserved for critical transactions that are related to the chain's operation. Block producers will\nonly fill up to 75% of a block with normal transactions. Some examples of operational transactions:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Misbehavior reports"}),"\n",(0,r.jsx)(n.li,{children:"Council operations"}),"\n",(0,r.jsx)(n.li,{children:"Member operations in an election (e.g. renouncing candidacy)"}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"Block producers prioritize transactions based on each transaction's total fee. Since a portion of\nthe fee will go to the block producer, producers will include the transactions with the highest fees\nto maximize their reward."}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsx)(n.admonition,{title:"Polkadot-JS Guides",type:"info",children:(0,r.jsxs)(n.p,{children:["If you are an advanced user, see the\n",(0,r.jsx)(n.a,{href:"/docs/learn-guides-transfers",children:"Polkadot-JS guides about transfers"}),"."]})})]})}function u(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(d,{...e})}):d(e)}},47379:(e,n,t)=>{"use strict";t.d(n,{A:()=>h});var a=t(90675),r=t(10467),s=t(96540),i=t(19588),o=t(2026),l=t(11135);function c(e,n,t){return d.apply(this,arguments)}function d(){return(d=(0,r.A)((0,a.A)().mark((function e(n,t,r){var s,l,c,d,u;return(0,a.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s=void 0,l=void 0,e.t0=n,e.next="polkadot"===e.t0?5:"kusama"===e.t0?7:"statemine"===e.t0?9:"statemint"===e.t0?11:"polkadotpeople"===e.t0?13:"kusamapeople"===e.t0?15:17;break;case 5:return s="wss://rpc.polkadot.io",e.abrupt("break",18);case 7:return s="wss://kusama-rpc.polkadot.io/",e.abrupt("break",18);case 9:return s="wss://statemine-rpc.polkadot.io/",e.abrupt("break",18);case 11:return s="wss://statemint-rpc.polkadot.io/",e.abrupt("break",18);case 13:return s="wss://polkadot-people-rpc.polkadot.io/",e.abrupt("break",18);case 15:return s="wss://kusama-people-rpc.polkadot.io/",e.abrupt("break",18);case 17:console.log("Unknown socket url provided, no connection made.");case 18:if(void 0!==s){e.next=22;break}return e.abrupt("return");case 22:return c=new i.E(s),e.next=25,o.G.create({provider:c});case 25:d=e.sent,(u=t.split(".")).forEach((function(e){e in d&&(d=d[e])})),e.t1=u[0],e.next="consts"===e.t1?31:"query"===e.t1?33:38;break;case 31:return l=d.toString(),e.abrupt("break",39);case 33:return e.next=35,d();case 35:return l=(l=e.sent).toString(),e.abrupt("break",39);case 38:console.log("Unknown path prefix ("+u[0]+") in "+t);case 39:return e.abrupt("return",l);case 40:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function u(e,n,t,a){switch(n){case"humanReadable":(0,l.HumanReadable)(e,t,a);break;case"precise":(0,l.Precise)(e,t,a);break;case"blocksToDays":(0,l.BlocksToDays)(e,a);break;case"erasToDays":(0,l.ErasToDays)(e,a,t);break;case"percentage":(0,l.Percentage)(e,a);break;case"permillToPercent":(0,l.PermillToPercent)(e,a);break;case"arrayLength":(0,l.ArrayLength)(e,a);break;default:return void console.log("Ignoring unknown filter type")}}const h=function(e){var n=e.network,t=e.path,i=e.defaultValue,o=e.filter,l=void 0===o?void 0:o,d=(0,s.useState)(""),h=d[0],p=d[1];return n=n.toLowerCase(),(0,s.useEffect)((function(){void 0!==l?u(i.toString(),l,n,p):p(i.toString());var e=void 0;switch(n){case"polkadot":e="wss://rpc.polkadot.io";break;case"kusama":e="wss://kusama-rpc.polkadot.io/";break;case"statemine":e="wss://kusama-asset-hub-rpc.polkadot.io/";break;case"statemint":e="wss://polkadot-asset-hub-rpc.polkadot.io/";break;case"kusamapeople":e="wss://kusama-people-rpc.polkadot.io";break;case"polkadotpeople":e="wss://polkadot-people-rpc.polkadot.io";break;default:console.log("Unknown network provided, "+n)}if(void 0===e)console.log("Failed to connect to a valid websocket, applying default");else{var s=function(){var e=(0,r.A)((0,a.A)().mark((function e(){var r;return(0,a.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,c(n,t,p);case 2:if(void 0!==(r=e.sent)){e.next=7;break}return e.abrupt("return");case 7:void 0!==l?u(r,l,n,p):p(r);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();try{s()}catch(o){console.log(o)}}}),[]),h}},11135:e=>{var n="polkadot",t="kusama",a="statemine",r="statemint",s="polkadotpeople",i="kusamapeople",o={polkadot:{precision:1e10,symbol:"DOT"},kusama:{precision:1e12,symbol:"KSM"},statemint:{precision:1e10,symbol:"DOT"},statemine:{precision:1e12,symbol:"KSM"},polkadotpeople:{precision:1e10,symbol:"DOT"},kusamapeople:{precision:1e12,symbol:"KSM"}};e.exports={HumanReadable:function(e,l,c){var d=void 0;if(l===n||l===r)d=3;else if(l===t||l===a||l===s)d=6;else{if(l!=i)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");d=8}e=parseFloat(e),c((e=Number.isInteger(e/o[l].precision)?e/o[l].precision+" "+o[l].symbol:(e/o[l].precision).toFixed(d)+" "+o[l].symbol).toString())},Precise:function(e,n,t){t(e=(e=parseFloat(e))/o[n].precision+" "+o[n].symbol)},BlocksToDays:function(e,n){n((e=6*e/86400).toString())},ErasToDays:function(e,o,l){var c=void 0;if(l===n||l===r||l==s)c=1;else{if(l!==t&&l!==a&&l!=i)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");c=4}o((e/=c).toString())},Percentage:function(e,n){n((e/=1e7).toString())},PermillToPercent:function(e,n){n((e/=1e4).toString())},ArrayLength:function(e,n){n((e=e.split(",").length).toString())}}},3514:(e,n,t)=>{"use strict";t.d(n,{A:()=>x});t(96540);var a=t(34164),r=t(26972),s=t(28774),i=t(53465),o=t(16654),l=t(21312),c=t(51107);const d={cardContainer:"cardContainer_fWXF",cardTitle:"cardTitle_rnsV",cardDescription:"cardDescription_PWke"};var u=t(74848);function h(e){var n=e.href,t=e.children;return(0,u.jsx)(s.A,{href:n,className:(0,a.A)("card padding--lg",d.cardContainer),children:t})}function p(e){var n=e.href,t=e.icon,r=e.title,s=e.description;return(0,u.jsxs)(h,{href:n,children:[(0,u.jsxs)(c.A,{as:"h2",className:(0,a.A)("text--truncate",d.cardTitle),title:r,children:[t," ",r]}),s&&(0,u.jsx)("p",{className:(0,a.A)("text--truncate",d.cardDescription),title:s,children:s})]})}function f(e){var n,t,a=e.item,s=(0,r.Nr)(a),o=(t=(0,i.W)().selectMessage,function(e){return t(e,(0,l.T)({message:"1 item|{count} items",id:"theme.docs.DocCard.categoryDescription.plurals",description:"The default description for a category card in the generated index about how many items this category includes"},{count:e}))});return s?(0,u.jsx)(p,{href:s,icon:"\ud83d\uddc3\ufe0f",title:a.label,description:null!=(n=a.description)?n:o(a.items.length)}):null}function m(e){var n,t,a=e.item,s=(0,o.A)(a.href)?"\ud83d\udcc4\ufe0f":"\ud83d\udd17",i=(0,r.cC)(null!=(n=a.docId)?n:void 0);return(0,u.jsx)(p,{href:a.href,icon:s,title:a.label,description:null!=(t=a.description)?t:null==i?void 0:i.description})}function b(e){var n=e.item;switch(n.type){case"link":return(0,u.jsx)(m,{item:n});case"category":return(0,u.jsx)(f,{item:n});default:throw new Error("unknown item type "+JSON.stringify(n))}}function g(e){var n=e.className,t=(0,r.$S)();return(0,u.jsx)(x,{items:t.items,className:n})}function x(e){var n=e.items,t=e.className;if(!n)return(0,u.jsx)(g,Object.assign({},e));var s=(0,r.d1)(n);return(0,u.jsx)("section",{className:(0,a.A)("row",t),children:s.map((function(e,n){return(0,u.jsx)("article",{className:"col col--6 margin-bottom--lg",children:(0,u.jsx)(b,{item:e})},n)}))})}},19365:(e,n,t)=>{"use strict";t.d(n,{A:()=>i});t(96540);var a=t(34164);const r={tabItem:"tabItem_Ymn6"};var s=t(74848);function i(e){var n=e.children,t=e.hidden,i=e.className;return(0,s.jsx)("div",{role:"tabpanel",className:(0,a.A)(r.tabItem,i),hidden:t,children:n})}},11470:(e,n,t)=>{"use strict";t.d(n,{A:()=>w});var a=t(96540),r=t(34164),s=t(23104),i=t(56347),o=t(205),l=t(57485),c=t(31682),d=t(75376);function u(e){var n,t;return null!=(n=null==(t=a.Children.toArray(e).filter((function(e){return"\n"!==e})).map((function(e){if(!e||(0,a.isValidElement)(e)&&((n=e.props)&&"object"==typeof n&&"value"in n))return e;var n;throw new Error("Docusaurus error: Bad child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:t.filter(Boolean))?n:[]}function h(e){var n=e.values,t=e.children;return(0,a.useMemo)((function(){var e=null!=n?n:function(e){return u(e).map((function(e){var n=e.props;return{value:n.value,label:n.label,attributes:n.attributes,default:n.default}}))}(t);return function(e){var n=(0,c.XI)(e,(function(e,n){return e.value===n.value}));if(n.length>0)throw new Error('Docusaurus error: Duplicate values "'+n.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[n,t])}function p(e){var n=e.value;return e.tabValues.some((function(e){return e.value===n}))}function f(e){var n=e.queryString,t=void 0!==n&&n,r=e.groupId,s=(0,i.W6)(),o=function(e){var n=e.queryString,t=void 0!==n&&n,a=e.groupId;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=a?a:null}({queryString:t,groupId:r});return[(0,l.aZ)(o),(0,a.useCallback)((function(e){if(o){var n=new URLSearchParams(s.location.search);n.set(o,e),s.replace(Object.assign({},s.location,{search:n.toString()}))}}),[o,s])]}function m(e){var n,t,r,s,i=e.defaultValue,l=e.queryString,c=void 0!==l&&l,u=e.groupId,m=h(e),b=(0,a.useState)((function(){return function(e){var n,t=e.defaultValue,a=e.tabValues;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!p({value:t,tabValues:a}))throw new Error('Docusaurus error: The has a defaultValue "'+t+'" but none of its children has the corresponding value. Available values are: '+a.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return t}var r=null!=(n=a.find((function(e){return e.default})))?n:a[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:i,tabValues:m})})),g=b[0],x=b[1],v=f({queryString:c,groupId:u}),k=v[0],y=v[1],w=(n=function(e){return e?"docusaurus.tab."+e:null}({groupId:u}.groupId),t=(0,d.Dv)(n),r=t[0],s=t[1],[r,(0,a.useCallback)((function(e){n&&s.set(e)}),[n,s])]),j=w[0],T=w[1],S=function(){var e=null!=k?k:j;return p({value:e,tabValues:m})?e:null}();return(0,o.A)((function(){S&&x(S)}),[S]),{selectedValue:g,selectValue:(0,a.useCallback)((function(e){if(!p({value:e,tabValues:m}))throw new Error("Can't select invalid tab value="+e);x(e),y(e),T(e)}),[y,T,m]),tabValues:m}}var b=t(92303);const g={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var x=t(74848);function v(e){var n=e.className,t=e.block,a=e.selectedValue,i=e.selectValue,o=e.tabValues,l=[],c=(0,s.a_)().blockElementScrollPositionUntilNextRender,d=function(e){var n=e.currentTarget,t=l.indexOf(n),r=o[t].value;r!==a&&(c(n),i(r))},u=function(e){var n,t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":var a,r=l.indexOf(e.currentTarget)+1;t=null!=(a=l[r])?a:l[0];break;case"ArrowLeft":var s,i=l.indexOf(e.currentTarget)-1;t=null!=(s=l[i])?s:l[l.length-1]}null==(n=t)||n.focus()};return(0,x.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,r.A)("tabs",{"tabs--block":t},n),children:o.map((function(e){var n=e.value,t=e.label,s=e.attributes;return(0,x.jsx)("li",Object.assign({role:"tab",tabIndex:a===n?0:-1,"aria-selected":a===n,ref:function(e){return l.push(e)},onKeyDown:u,onClick:d},s,{className:(0,r.A)("tabs__item",g.tabItem,null==s?void 0:s.className,{"tabs__item--active":a===n}),children:null!=t?t:n}),n)}))})}function k(e){var n=e.lazy,t=e.children,s=e.selectedValue,i=(Array.isArray(t)?t:[t]).filter(Boolean);if(n){var o=i.find((function(e){return e.props.value===s}));return o?(0,a.cloneElement)(o,{className:(0,r.A)("margin-top--md",o.props.className)}):null}return(0,x.jsx)("div",{className:"margin-top--md",children:i.map((function(e,n){return(0,a.cloneElement)(e,{key:n,hidden:e.props.value!==s})}))})}function y(e){var n=m(e);return(0,x.jsxs)("div",{className:(0,r.A)("tabs-container",g.tabList),children:[(0,x.jsx)(v,Object.assign({},n,e)),(0,x.jsx)(k,Object.assign({},n,e))]})}function w(e){var n=(0,b.A)();return(0,x.jsx)(y,Object.assign({},e,{children:u(e.children)}),String(n))}},53465:(e,n,t)=>{"use strict";t.d(n,{W:()=>c});var a=t(96540),r=t(44586),s=["zero","one","two","few","many","other"];function i(e){return s.filter((function(n){return e.includes(n)}))}var o={locale:"en",pluralForms:i(["one","other"]),select:function(e){return 1===e?"one":"other"}};function l(){var e=(0,r.A)().i18n.currentLocale;return(0,a.useMemo)((function(){try{return n=e,t=new Intl.PluralRules(n),{locale:n,pluralForms:i(t.resolvedOptions().pluralCategories),select:function(e){return t.select(e)}}}catch(a){return console.error('Failed to use Intl.PluralRules for locale "'+e+'".\nDocusaurus will fallback to the default (English) implementation.\nError: '+a.message+"\n"),o}var n,t}),[e])}function c(){var e=l();return{selectMessage:function(n,t){return function(e,n,t){var a=e.split("|");if(1===a.length)return a[0];a.length>t.pluralForms.length&&console.error("For locale="+t.locale+", a maximum of "+t.pluralForms.length+" plural forms are expected ("+t.pluralForms.join(",")+"), but the message contains "+a.length+": "+e);var r=t.select(n),s=t.pluralForms.indexOf(r);return a[Math.min(s,a.length-1)]}(t,n,e)}}}},47790:()=>{}}]); \ No newline at end of file diff --git a/assets/js/78868b16.231856a2.js b/assets/js/78868b16.231856a2.js new file mode 100644 index 000000000000..cee3faf838b2 --- /dev/null +++ b/assets/js/78868b16.231856a2.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1539],{48626:(e,o,t)=>{t.r(o),t.d(o,{assets:()=>i,contentTitle:()=>r,default:()=>d,frontMatter:()=>s,metadata:()=>c,toc:()=>l});const c=JSON.parse('{"id":"general/kusama/kusama-social-recovery","title":"Social Recovery","description":"Steps on how to perform account recovery on Kusama.","source":"@site/../docs/general/kusama/kusama-social-recovery.md","sourceDirName":"general/kusama","slug":"/kusama-social-recovery","permalink":"/docs/kusama-social-recovery","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/kusama/kusama-social-recovery.md","tags":[],"version":"current","lastUpdatedBy":"gui","lastUpdatedAt":1712067554000,"frontMatter":{"id":"kusama-social-recovery","title":"Social Recovery","sidebar_label":"Account Recovery","description":"Steps on how to perform account recovery on Kusama.","keywords":["recovery","social recovery","account","kusama"],"slug":"../../kusama-social-recovery"},"sidebar":"docs","previous":{"title":"Bug Bounty","permalink":"/docs/kusama-bug-bounty"},"next":{"title":"Adversarial Cheatsheet","permalink":"/docs/kusama-adversarial-cheatsheet"}}');var a=t(74848),n=t(28453);const s={id:"kusama-social-recovery",title:"Social Recovery",sidebar_label:"Account Recovery",description:"Steps on how to perform account recovery on Kusama.",keywords:["recovery","social recovery","account","kusama"],slug:"../../kusama-social-recovery"},r=void 0,i={},l=[{value:"Create a Recoverable Account",id:"create-a-recoverable-account",level:2},{value:"Recover your Account",id:"recover-your-account",level:2},{value:"Further Reading",id:"further-reading",level:2}];function h(e){const o={a:"a",admonition:"admonition",code:"code",h2:"h2",img:"img",li:"li",mdxAdmonitionTitle:"mdxAdmonitionTitle",p:"p",ul:"ul",...(0,n.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(o.p,{children:"Managing an account is not an easy task. Many people have lost their private keys due to improper\nkey management over the past few years. Kusama provides a method that allows users to recover their\naccounts by setting up a social recovery. It is an M-of-N recovery tool based on the multi-signature\nwallet to get back access to your lost account."}),"\n",(0,a.jsx)(o.admonition,{title:"There is no way to get back your private key by using this method",type:"caution",children:(0,a.jsx)(o.p,{children:"This is just a way of performing transactions on behalf of the lost account, so you can think of it\nas a proxy instead."})}),"\n",(0,a.jsx)(o.p,{children:"In this guide, you will learn how to create a recoverable account, how to recover it, and what you\nneed to be aware of when using it."}),"\n",(0,a.jsx)(o.h2,{id:"create-a-recoverable-account",children:"Create a Recoverable Account"}),"\n",(0,a.jsxs)(o.p,{children:["You will use your existing account to call ",(0,a.jsx)(o.code,{children:"createRecovery"})," to select a list of accounts you trust\nto help you recover the account when you lose the private key. To create a recoverable account, you\nwill be required to set a ",(0,a.jsx)(o.code,{children:"threshold"})," that is the number of your friends who need to approve the\nrecovery process to recover your account."]}),"\n",(0,a.jsx)(o.p,{children:(0,a.jsx)(o.img,{alt:"social-recovery-diag-1",src:t(96721).A+"",width:"1700",height:"1070"})}),"\n",(0,a.jsx)(o.admonition,{title:"Account Recovery",type:"note",children:(0,a.jsx)(o.p,{children:"If you are recovering an account, ensure that your network is set to Kusama. You can do this by\nselecting the network from the top right corner in the Polkadot-JS UI."})}),"\n",(0,a.jsxs)(o.p,{children:["First, see the ",(0,a.jsx)(o.a,{href:"https://polkadot.js.org/apps/#/accounts",children:"Accounts"})," page on Polkadot-JS Apps that\nshows all available accounts on your browser's local storage and Polkadot-JS extension. To create a\nrecoverable account, make sure you have some KSM to pay the transaction fees. You You will also need\nsome for the reserve required by the account recovery setup."]}),"\n",(0,a.jsx)(o.p,{children:(0,a.jsx)(o.img,{alt:"kusama accounts page",src:t(97990).A+"",width:"2870",height:"1638"})}),"\n",(0,a.jsx)(o.p,{children:'Then, click the menu beside the "send" button, and choose "Make recoverable".'}),"\n",(0,a.jsx)(o.p,{children:(0,a.jsx)(o.img,{alt:"kusama accounts make recoverable",src:t(94557).A+"",width:"2878",height:"1022"})}),"\n",(0,a.jsx)(o.p,{children:"Now you need to provide the following information:"}),"\n",(0,a.jsxs)(o.p,{children:[(0,a.jsx)(o.code,{children:"trusted social recovery helpers"})," - A list of accounts that you trust. These can help you if you\nlose the private key. Since setting up a recoverable account requires you to lock up KSM, ensure\nyour account has enough transferable balance to cover it. As you select additional recovery helpers,\nmore KSM will be required."]}),"\n",(0,a.jsxs)(o.p,{children:[(0,a.jsx)(o.code,{children:"recovery threshold"})," - The number of friends required to submit a ",(0,a.jsx)(o.code,{children:"vouchRecovery"})," transaction in\norder to recover the account."]}),"\n",(0,a.jsx)(o.admonition,{type:"info",children:(0,a.jsx)(o.p,{children:"1 is the minimum, but it is not recommended to set a small number. If you set 1, that means any of\nyour recovery helpers would be able to recover your account."})}),"\n",(0,a.jsxs)(o.p,{children:[(0,a.jsx)(o.code,{children:"recovery block delay"})," - Once the threshold is reached, you will need to wait until the block delay\nhas passed until you can claim the recovery. This is a protection mechanism to allow the account\nowner to have enough time to check and react in case someone pretends to be you and initiates a\nrecovery process."]}),"\n",(0,a.jsx)(o.admonition,{type:"info",children:(0,a.jsx)(o.p,{children:"Setting the block delay to be a little longer would be better since even if an attacker acquired\nenough signatures to recover your account, they would still have to wait until the block delay is\npassed to control your account."})}),"\n",(0,a.jsx)(o.p,{children:(0,a.jsx)(o.img,{alt:"kusama accounts page2",src:t(18545).A+"",width:"2194",height:"1232"})}),"\n",(0,a.jsx)(o.h2,{id:"recover-your-account",children:"Recover your Account"}),"\n",(0,a.jsx)(o.p,{children:"This section would be showing you how to initiate a recovery process and get back the balance that\nheld in the lost account to the new account."}),"\n",(0,a.jsx)(o.p,{children:(0,a.jsx)(o.img,{alt:"social-recovery-diag-2",src:t(75610).A+"",width:"2675",height:"1705"})}),"\n",(0,a.jsx)(o.p,{children:"The above diagram shows the whole process of recovering an account."}),"\n",(0,a.jsx)(o.admonition,{type:"info",children:(0,a.jsx)(o.p,{children:"Ensure that your new account has enough KSM to pay for the transaction fees and the amount that is\nused for reserve when making a recovery."})}),"\n",(0,a.jsx)(o.p,{children:'Navigate to the menu beside the send button in the row of your new account and click the "Initiate\nrecover for another" option.'}),"\n",(0,a.jsx)(o.p,{children:(0,a.jsx)(o.img,{alt:"kusama accounts initial recoverable",src:t(94557).A+"",width:"2878",height:"1022"})}),"\n",(0,a.jsx)(o.p,{children:'Then input the address you would like to recover in the "recover this account" field and click\n"Start recovery".'}),"\n",(0,a.jsx)(o.p,{children:(0,a.jsx)(o.img,{alt:"kusama accounts initial recoverable2",src:t(91637).A+"",width:"1832",height:"544"})}),"\n",(0,a.jsx)(o.p,{children:"Once the transaction went through, some KSM will be locked to prevent malicious behavior."}),"\n",(0,a.jsx)(o.p,{children:(0,a.jsx)(o.img,{alt:"social-recovery-6",src:t(13794).A+"",width:"2802",height:"180"})}),"\n",(0,a.jsxs)(o.p,{children:['Now call your friends that you have set in the first section, but heading over to "Developer" >\n"Extrinsics" and using the recovery pallet. They are required to submit a ',(0,a.jsx)(o.code,{children:"vouchRecovery"}),"\ntransaction."]}),"\n",(0,a.jsx)(o.p,{children:(0,a.jsx)(o.img,{alt:"social-recovery-7",src:t(4299).A+"",width:"2874",height:"890"})}),"\n",(0,a.jsxs)(o.p,{children:["Once the threshold is reached and the block delay is passed, use the new account to submit a\n",(0,a.jsx)(o.code,{children:"claimRecovery"})," transaction that would set a proxy on behalf of your lost account. It means that you\ncan still indirectly use the lost account to interact with the network."]}),"\n",(0,a.jsx)(o.p,{children:(0,a.jsx)(o.img,{alt:"social-recovery-8",src:t(82908).A+"",width:"2886",height:"850"})}),"\n",(0,a.jsxs)(o.p,{children:['To see the proxy information, use your new account by calling the "recovery->proxy(Accountid)"\nfunction at the ',(0,a.jsx)(o.a,{href:"https://polkadot.js.org/apps/#/chainstate",children:"Chain state"})," page. It should point to\nyour lost account."]}),"\n",(0,a.jsx)(o.p,{children:(0,a.jsx)(o.img,{alt:"social-recovery-9",src:t(35173).A+"",width:"2868",height:"670"})}),"\n",(0,a.jsx)(o.p,{children:'Next, in order to call the "closeRecovery" transaction, you can make use of the "asRecovered"\nfunction as your lost account to get the locked KSM.'}),"\n",(0,a.jsx)(o.p,{children:(0,a.jsx)(o.img,{alt:"social-recovery-10",src:t(46281).A+"",width:"2866",height:"1044"})}),"\n",(0,a.jsx)(o.p,{children:'Once the transaction goes through, the reserved KSM from the "NEW-ACC" will have been moved to the\nlost account. This is a way of preventing someone from recovering other accounts maliciously.\nImagine if someone tried to initiate recovery on your account; you can do this to slash their locked\nKSM.'}),"\n",(0,a.jsx)(o.p,{children:(0,a.jsx)(o.img,{alt:"social-recovery-11",src:t(68160).A+"",width:"2852",height:"380"})}),"\n",(0,a.jsxs)(o.p,{children:["Moving on, we use the ",(0,a.jsx)(o.code,{children:"asRecovered"})," function to submit the ",(0,a.jsx)(o.code,{children:"removeRecovery"})," transaction on behalf of\nthe lost account to release the reserved KSM from your lost account."]}),"\n",(0,a.jsx)(o.p,{children:(0,a.jsx)(o.img,{alt:"social-recovery-12",src:t(46491).A+"",width:"2864",height:"828"})}),"\n",(0,a.jsx)(o.p,{children:"Now your account balance should be transferable."}),"\n",(0,a.jsx)(o.p,{children:(0,a.jsx)(o.img,{alt:"social-recovery-13",src:t(31666).A+"",width:"2866",height:"324"})}),"\n",(0,a.jsx)(o.p,{children:"Finally, transfer all of your available balance from the lost account to the new account."}),"\n",(0,a.jsx)(o.p,{children:(0,a.jsx)(o.img,{alt:"social-recovery-14",src:t(36525).A+"",width:"2860",height:"1068"})}),"\n",(0,a.jsx)(o.p,{children:"The recovery process is now complete and successful."}),"\n",(0,a.jsx)(o.p,{children:(0,a.jsx)(o.img,{alt:"social-recovery-15",src:t(82628).A+"",width:"2892",height:"348"})}),"\n",(0,a.jsxs)(o.admonition,{type:"tip",children:[(0,a.jsxs)(o.mdxAdmonitionTitle,{children:["Using ",(0,a.jsx)(o.code,{children:"Root"})," origin"]}),(0,a.jsxs)(o.p,{children:["There is still one possible way to recover the account without going through the recovery process.\nThat is by using the ",(0,a.jsx)(o.code,{children:"Root"})," origin. However, in order to use root permissions, you will need to\neither go through ",(0,a.jsx)(o.a,{href:"/docs/learn-polkadot-opengov",children:"governance"}),"."]})]}),"\n",(0,a.jsx)(o.h2,{id:"further-reading",children:"Further Reading"}),"\n",(0,a.jsxs)(o.ul,{children:["\n",(0,a.jsxs)(o.li,{children:[(0,a.jsx)(o.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/recovery/src/lib.rs",children:"Substrate's Recovery Pallet"})," -\nThe Rust implementation of the recovery pallet."]}),"\n"]})]})}function d(e={}){const{wrapper:o}={...(0,n.R)(),...e.components};return o?(0,a.jsx)(o,{...e,children:(0,a.jsx)(h,{...e})}):h(e)}},91637:(e,o,t)=>{t.d(o,{A:()=>c});const c=t.p+"assets/images/kusama_make_account_initial-3061c821ee7789052080f87088e04e91.png"},18545:(e,o,t)=>{t.d(o,{A:()=>c});const c=t.p+"assets/images/kusama_make_account_recoverable-62d204d0f94bee69417a9eed0923a8ab.png"},94557:(e,o,t)=>{t.d(o,{A:()=>c});const c=t.p+"assets/images/kusama_make_recoverable-cf8cc2b88a20470cc7b9b475fe74b2b4.png"},97990:(e,o,t)=>{t.d(o,{A:()=>c});const c=t.p+"assets/images/kusama_social_recovery_accounts_page-9a2106084803cc8bb9c3d33251d9fda4.png"},46281:(e,o,t)=>{t.d(o,{A:()=>c});const c=t.p+"assets/images/social-recovery-10-c5174d9c34444108a0f9b65c8709a088.png"},68160:(e,o,t)=>{t.d(o,{A:()=>c});const c=t.p+"assets/images/social-recovery-11-8d65e3b3645c8d577a04ce5711a23da1.png"},46491:(e,o,t)=>{t.d(o,{A:()=>c});const c=t.p+"assets/images/social-recovery-12-d6d627497f4bf3b1f4af8cd69c86ac33.png"},31666:(e,o,t)=>{t.d(o,{A:()=>c});const c=t.p+"assets/images/social-recovery-13-48311acc0e472c4d1d8995fc58a1e661.png"},36525:(e,o,t)=>{t.d(o,{A:()=>c});const c=t.p+"assets/images/social-recovery-14-b80cf0a40d80b3c845a23d0817f9634e.png"},82628:(e,o,t)=>{t.d(o,{A:()=>c});const c=t.p+"assets/images/social-recovery-15-20dbcbcf49e1f513b798b1b05e01543c.png"},13794:(e,o,t)=>{t.d(o,{A:()=>c});const c=t.p+"assets/images/social-recovery-6-474cafc1a1ef60b8cd79b4e48bef24e2.png"},4299:(e,o,t)=>{t.d(o,{A:()=>c});const c=t.p+"assets/images/social-recovery-7-23c91290b58d407c23fc2ac389626e6a.png"},82908:(e,o,t)=>{t.d(o,{A:()=>c});const c=t.p+"assets/images/social-recovery-8-8062fe4c4c20f3da45f1460b1cc3a5fa.png"},35173:(e,o,t)=>{t.d(o,{A:()=>c});const c=t.p+"assets/images/social-recovery-9-c6a6920959523fadb5942449ccc17441.png"},96721:(e,o,t)=>{t.d(o,{A:()=>c});const c=t.p+"assets/images/social-recovery-diag-1-7d7432fe88f494dfa884b1268204e77f.png"},75610:(e,o,t)=>{t.d(o,{A:()=>c});const c=t.p+"assets/images/social-recovery-diag-2-872bb7e71e872580fb1be0d523775c3a.png"},28453:(e,o,t)=>{t.d(o,{R:()=>s,x:()=>r});var c=t(96540);const a={},n=c.createContext(a);function s(e){const o=c.useContext(n);return c.useMemo((function(){return"function"==typeof e?e(o):{...o,...e}}),[o,e])}function r(e){let o;return o=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:s(e.components),c.createElement(n.Provider,{value:o},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/78868b16.90417bb7.js b/assets/js/78868b16.90417bb7.js deleted file mode 100644 index 8c97248a7b87..000000000000 --- a/assets/js/78868b16.90417bb7.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1539],{97131:(e,o,t)=>{t.r(o),t.d(o,{assets:()=>i,contentTitle:()=>s,default:()=>d,frontMatter:()=>n,metadata:()=>r,toc:()=>l});var c=t(74848),a=t(28453);const n={id:"kusama-social-recovery",title:"Social Recovery",sidebar_label:"Account Recovery",description:"Steps on how to perform account recovery on Kusama.",keywords:["recovery","social recovery","account","kusama"],slug:"../../kusama-social-recovery"},s=void 0,r={id:"general/kusama/kusama-social-recovery",title:"Social Recovery",description:"Steps on how to perform account recovery on Kusama.",source:"@site/../docs/general/kusama/kusama-social-recovery.md",sourceDirName:"general/kusama",slug:"/kusama-social-recovery",permalink:"/docs/kusama-social-recovery",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/kusama/kusama-social-recovery.md",tags:[],version:"current",lastUpdatedBy:"gui",lastUpdatedAt:1712067554e3,frontMatter:{id:"kusama-social-recovery",title:"Social Recovery",sidebar_label:"Account Recovery",description:"Steps on how to perform account recovery on Kusama.",keywords:["recovery","social recovery","account","kusama"],slug:"../../kusama-social-recovery"},sidebar:"docs",previous:{title:"Bug Bounty",permalink:"/docs/kusama-bug-bounty"},next:{title:"Adversarial Cheatsheet",permalink:"/docs/kusama-adversarial-cheatsheet"}},i={},l=[{value:"Create a Recoverable Account",id:"create-a-recoverable-account",level:2},{value:"Recover your Account",id:"recover-your-account",level:2},{value:"Further Reading",id:"further-reading",level:2}];function h(e){const o={a:"a",admonition:"admonition",code:"code",h2:"h2",img:"img",li:"li",mdxAdmonitionTitle:"mdxAdmonitionTitle",p:"p",ul:"ul",...(0,a.R)(),...e.components};return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(o.p,{children:"Managing an account is not an easy task. Many people have lost their private keys due to improper\nkey management over the past few years. Kusama provides a method that allows users to recover their\naccounts by setting up a social recovery. It is an M-of-N recovery tool based on the multi-signature\nwallet to get back access to your lost account."}),"\n",(0,c.jsx)(o.admonition,{title:"There is no way to get back your private key by using this method",type:"caution",children:(0,c.jsx)(o.p,{children:"This is just a way of performing transactions on behalf of the lost account, so you can think of it\nas a proxy instead."})}),"\n",(0,c.jsx)(o.p,{children:"In this guide, you will learn how to create a recoverable account, how to recover it, and what you\nneed to be aware of when using it."}),"\n",(0,c.jsx)(o.h2,{id:"create-a-recoverable-account",children:"Create a Recoverable Account"}),"\n",(0,c.jsxs)(o.p,{children:["You will use your existing account to call ",(0,c.jsx)(o.code,{children:"createRecovery"})," to select a list of accounts you trust\nto help you recover the account when you lose the private key. To create a recoverable account, you\nwill be required to set a ",(0,c.jsx)(o.code,{children:"threshold"})," that is the number of your friends who need to approve the\nrecovery process to recover your account."]}),"\n",(0,c.jsx)(o.p,{children:(0,c.jsx)(o.img,{alt:"social-recovery-diag-1",src:t(96721).A+"",width:"1700",height:"1070"})}),"\n",(0,c.jsx)(o.admonition,{title:"Account Recovery",type:"note",children:(0,c.jsx)(o.p,{children:"If you are recovering an account, ensure that your network is set to Kusama. You can do this by\nselecting the network from the top right corner in the Polkadot-JS UI."})}),"\n",(0,c.jsxs)(o.p,{children:["First, see the ",(0,c.jsx)(o.a,{href:"https://polkadot.js.org/apps/#/accounts",children:"Accounts"})," page on Polkadot-JS Apps that\nshows all available accounts on your browser's local storage and Polkadot-JS extension. To create a\nrecoverable account, make sure you have some KSM to pay the transaction fees. You You will also need\nsome for the reserve required by the account recovery setup."]}),"\n",(0,c.jsx)(o.p,{children:(0,c.jsx)(o.img,{alt:"kusama accounts page",src:t(97990).A+"",width:"2870",height:"1638"})}),"\n",(0,c.jsx)(o.p,{children:'Then, click the menu beside the "send" button, and choose "Make recoverable".'}),"\n",(0,c.jsx)(o.p,{children:(0,c.jsx)(o.img,{alt:"kusama accounts make recoverable",src:t(94557).A+"",width:"2878",height:"1022"})}),"\n",(0,c.jsx)(o.p,{children:"Now you need to provide the following information:"}),"\n",(0,c.jsxs)(o.p,{children:[(0,c.jsx)(o.code,{children:"trusted social recovery helpers"})," - A list of accounts that you trust. These can help you if you\nlose the private key. Since setting up a recoverable account requires you to lock up KSM, ensure\nyour account has enough transferable balance to cover it. As you select additional recovery helpers,\nmore KSM will be required."]}),"\n",(0,c.jsxs)(o.p,{children:[(0,c.jsx)(o.code,{children:"recovery threshold"})," - The number of friends required to submit a ",(0,c.jsx)(o.code,{children:"vouchRecovery"})," transaction in\norder to recover the account."]}),"\n",(0,c.jsx)(o.admonition,{type:"info",children:(0,c.jsx)(o.p,{children:"1 is the minimum, but it is not recommended to set a small number. If you set 1, that means any of\nyour recovery helpers would be able to recover your account."})}),"\n",(0,c.jsxs)(o.p,{children:[(0,c.jsx)(o.code,{children:"recovery block delay"})," - Once the threshold is reached, you will need to wait until the block delay\nhas passed until you can claim the recovery. This is a protection mechanism to allow the account\nowner to have enough time to check and react in case someone pretends to be you and initiates a\nrecovery process."]}),"\n",(0,c.jsx)(o.admonition,{type:"info",children:(0,c.jsx)(o.p,{children:"Setting the block delay to be a little longer would be better since even if an attacker acquired\nenough signatures to recover your account, they would still have to wait until the block delay is\npassed to control your account."})}),"\n",(0,c.jsx)(o.p,{children:(0,c.jsx)(o.img,{alt:"kusama accounts page2",src:t(18545).A+"",width:"2194",height:"1232"})}),"\n",(0,c.jsx)(o.h2,{id:"recover-your-account",children:"Recover your Account"}),"\n",(0,c.jsx)(o.p,{children:"This section would be showing you how to initiate a recovery process and get back the balance that\nheld in the lost account to the new account."}),"\n",(0,c.jsx)(o.p,{children:(0,c.jsx)(o.img,{alt:"social-recovery-diag-2",src:t(75610).A+"",width:"2675",height:"1705"})}),"\n",(0,c.jsx)(o.p,{children:"The above diagram shows the whole process of recovering an account."}),"\n",(0,c.jsx)(o.admonition,{type:"info",children:(0,c.jsx)(o.p,{children:"Ensure that your new account has enough KSM to pay for the transaction fees and the amount that is\nused for reserve when making a recovery."})}),"\n",(0,c.jsx)(o.p,{children:'Navigate to the menu beside the send button in the row of your new account and click the "Initiate\nrecover for another" option.'}),"\n",(0,c.jsx)(o.p,{children:(0,c.jsx)(o.img,{alt:"kusama accounts initial recoverable",src:t(94557).A+"",width:"2878",height:"1022"})}),"\n",(0,c.jsx)(o.p,{children:'Then input the address you would like to recover in the "recover this account" field and click\n"Start recovery".'}),"\n",(0,c.jsx)(o.p,{children:(0,c.jsx)(o.img,{alt:"kusama accounts initial recoverable2",src:t(91637).A+"",width:"1832",height:"544"})}),"\n",(0,c.jsx)(o.p,{children:"Once the transaction went through, some KSM will be locked to prevent malicious behavior."}),"\n",(0,c.jsx)(o.p,{children:(0,c.jsx)(o.img,{alt:"social-recovery-6",src:t(13794).A+"",width:"2802",height:"180"})}),"\n",(0,c.jsxs)(o.p,{children:['Now call your friends that you have set in the first section, but heading over to "Developer" >\n"Extrinsics" and using the recovery pallet. They are required to submit a ',(0,c.jsx)(o.code,{children:"vouchRecovery"}),"\ntransaction."]}),"\n",(0,c.jsx)(o.p,{children:(0,c.jsx)(o.img,{alt:"social-recovery-7",src:t(4299).A+"",width:"2874",height:"890"})}),"\n",(0,c.jsxs)(o.p,{children:["Once the threshold is reached and the block delay is passed, use the new account to submit a\n",(0,c.jsx)(o.code,{children:"claimRecovery"})," transaction that would set a proxy on behalf of your lost account. It means that you\ncan still indirectly use the lost account to interact with the network."]}),"\n",(0,c.jsx)(o.p,{children:(0,c.jsx)(o.img,{alt:"social-recovery-8",src:t(82908).A+"",width:"2886",height:"850"})}),"\n",(0,c.jsxs)(o.p,{children:['To see the proxy information, use your new account by calling the "recovery->proxy(Accountid)"\nfunction at the ',(0,c.jsx)(o.a,{href:"https://polkadot.js.org/apps/#/chainstate",children:"Chain state"})," page. It should point to\nyour lost account."]}),"\n",(0,c.jsx)(o.p,{children:(0,c.jsx)(o.img,{alt:"social-recovery-9",src:t(35173).A+"",width:"2868",height:"670"})}),"\n",(0,c.jsx)(o.p,{children:'Next, in order to call the "closeRecovery" transaction, you can make use of the "asRecovered"\nfunction as your lost account to get the locked KSM.'}),"\n",(0,c.jsx)(o.p,{children:(0,c.jsx)(o.img,{alt:"social-recovery-10",src:t(46281).A+"",width:"2866",height:"1044"})}),"\n",(0,c.jsx)(o.p,{children:'Once the transaction goes through, the reserved KSM from the "NEW-ACC" will have been moved to the\nlost account. This is a way of preventing someone from recovering other accounts maliciously.\nImagine if someone tried to initiate recovery on your account; you can do this to slash their locked\nKSM.'}),"\n",(0,c.jsx)(o.p,{children:(0,c.jsx)(o.img,{alt:"social-recovery-11",src:t(68160).A+"",width:"2852",height:"380"})}),"\n",(0,c.jsxs)(o.p,{children:["Moving on, we use the ",(0,c.jsx)(o.code,{children:"asRecovered"})," function to submit the ",(0,c.jsx)(o.code,{children:"removeRecovery"})," transaction on behalf of\nthe lost account to release the reserved KSM from your lost account."]}),"\n",(0,c.jsx)(o.p,{children:(0,c.jsx)(o.img,{alt:"social-recovery-12",src:t(46491).A+"",width:"2864",height:"828"})}),"\n",(0,c.jsx)(o.p,{children:"Now your account balance should be transferable."}),"\n",(0,c.jsx)(o.p,{children:(0,c.jsx)(o.img,{alt:"social-recovery-13",src:t(31666).A+"",width:"2866",height:"324"})}),"\n",(0,c.jsx)(o.p,{children:"Finally, transfer all of your available balance from the lost account to the new account."}),"\n",(0,c.jsx)(o.p,{children:(0,c.jsx)(o.img,{alt:"social-recovery-14",src:t(36525).A+"",width:"2860",height:"1068"})}),"\n",(0,c.jsx)(o.p,{children:"The recovery process is now complete and successful."}),"\n",(0,c.jsx)(o.p,{children:(0,c.jsx)(o.img,{alt:"social-recovery-15",src:t(82628).A+"",width:"2892",height:"348"})}),"\n",(0,c.jsxs)(o.admonition,{type:"tip",children:[(0,c.jsxs)(o.mdxAdmonitionTitle,{children:["Using ",(0,c.jsx)(o.code,{children:"Root"})," origin"]}),(0,c.jsxs)(o.p,{children:["There is still one possible way to recover the account without going through the recovery process.\nThat is by using the ",(0,c.jsx)(o.code,{children:"Root"})," origin. However, in order to use root permissions, you will need to\neither go through ",(0,c.jsx)(o.a,{href:"/docs/learn-polkadot-opengov",children:"governance"}),"."]})]}),"\n",(0,c.jsx)(o.h2,{id:"further-reading",children:"Further Reading"}),"\n",(0,c.jsxs)(o.ul,{children:["\n",(0,c.jsxs)(o.li,{children:[(0,c.jsx)(o.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/recovery/src/lib.rs",children:"Substrate's Recovery Pallet"})," -\nThe Rust implementation of the recovery pallet."]}),"\n"]})]})}function d(e={}){const{wrapper:o}={...(0,a.R)(),...e.components};return o?(0,c.jsx)(o,{...e,children:(0,c.jsx)(h,{...e})}):h(e)}},91637:(e,o,t)=>{t.d(o,{A:()=>c});const c=t.p+"assets/images/kusama_make_account_initial-3061c821ee7789052080f87088e04e91.png"},18545:(e,o,t)=>{t.d(o,{A:()=>c});const c=t.p+"assets/images/kusama_make_account_recoverable-62d204d0f94bee69417a9eed0923a8ab.png"},94557:(e,o,t)=>{t.d(o,{A:()=>c});const c=t.p+"assets/images/kusama_make_recoverable-cf8cc2b88a20470cc7b9b475fe74b2b4.png"},97990:(e,o,t)=>{t.d(o,{A:()=>c});const c=t.p+"assets/images/kusama_social_recovery_accounts_page-9a2106084803cc8bb9c3d33251d9fda4.png"},46281:(e,o,t)=>{t.d(o,{A:()=>c});const c=t.p+"assets/images/social-recovery-10-c5174d9c34444108a0f9b65c8709a088.png"},68160:(e,o,t)=>{t.d(o,{A:()=>c});const c=t.p+"assets/images/social-recovery-11-8d65e3b3645c8d577a04ce5711a23da1.png"},46491:(e,o,t)=>{t.d(o,{A:()=>c});const c=t.p+"assets/images/social-recovery-12-d6d627497f4bf3b1f4af8cd69c86ac33.png"},31666:(e,o,t)=>{t.d(o,{A:()=>c});const c=t.p+"assets/images/social-recovery-13-48311acc0e472c4d1d8995fc58a1e661.png"},36525:(e,o,t)=>{t.d(o,{A:()=>c});const c=t.p+"assets/images/social-recovery-14-b80cf0a40d80b3c845a23d0817f9634e.png"},82628:(e,o,t)=>{t.d(o,{A:()=>c});const c=t.p+"assets/images/social-recovery-15-20dbcbcf49e1f513b798b1b05e01543c.png"},13794:(e,o,t)=>{t.d(o,{A:()=>c});const c=t.p+"assets/images/social-recovery-6-474cafc1a1ef60b8cd79b4e48bef24e2.png"},4299:(e,o,t)=>{t.d(o,{A:()=>c});const c=t.p+"assets/images/social-recovery-7-23c91290b58d407c23fc2ac389626e6a.png"},82908:(e,o,t)=>{t.d(o,{A:()=>c});const c=t.p+"assets/images/social-recovery-8-8062fe4c4c20f3da45f1460b1cc3a5fa.png"},35173:(e,o,t)=>{t.d(o,{A:()=>c});const c=t.p+"assets/images/social-recovery-9-c6a6920959523fadb5942449ccc17441.png"},96721:(e,o,t)=>{t.d(o,{A:()=>c});const c=t.p+"assets/images/social-recovery-diag-1-7d7432fe88f494dfa884b1268204e77f.png"},75610:(e,o,t)=>{t.d(o,{A:()=>c});const c=t.p+"assets/images/social-recovery-diag-2-872bb7e71e872580fb1be0d523775c3a.png"},28453:(e,o,t)=>{t.d(o,{R:()=>s,x:()=>r});var c=t(96540);const a={},n=c.createContext(a);function s(e){const o=c.useContext(n);return c.useMemo((function(){return"function"==typeof e?e(o):{...o,...e}}),[o,e])}function r(e){let o;return o=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:s(e.components),c.createElement(n.Provider,{value:o},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/7899.c7110eb6.js b/assets/js/7899.c7110eb6.js deleted file mode 100644 index e64ea9368ac9..000000000000 --- a/assets/js/7899.c7110eb6.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7899],{27899:(t,e,s)=>{s.d(e,{D:()=>l,S:()=>c,a:()=>h,b:()=>a,c:()=>o,d:()=>B,p:()=>r,s:()=>P});var i=s(86079),n=function(){var t=function(t,e,s,i){for(s=s||{},i=t.length;i--;s[t[i]]=e);return s},e=[1,2],s=[1,3],i=[1,4],n=[2,4],r=[1,9],o=[1,11],a=[1,15],c=[1,16],l=[1,17],h=[1,18],u=[1,30],d=[1,19],p=[1,20],y=[1,21],f=[1,22],m=[1,23],g=[1,25],S=[1,26],_=[1,27],k=[1,28],T=[1,29],b=[1,32],E=[1,33],x=[1,34],C=[1,35],$=[1,31],v=[1,4,5,15,16,18,20,21,23,24,25,26,27,28,32,34,36,37,41,44,45,46,47,50],D=[1,4,5,13,14,15,16,18,20,21,23,24,25,26,27,28,32,34,36,37,41,44,45,46,47,50],A=[4,5,15,16,18,20,21,23,24,25,26,27,28,32,34,36,37,41,44,45,46,47,50],L={trace:function(){},yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,cssClassStatement:11,idStatement:12,DESCR:13,"--\x3e":14,HIDE_EMPTY:15,scale:16,WIDTH:17,COMPOSIT_STATE:18,STRUCT_START:19,STRUCT_STOP:20,STATE_DESCR:21,AS:22,ID:23,FORK:24,JOIN:25,CHOICE:26,CONCURRENT:27,note:28,notePosition:29,NOTE_TEXT:30,direction:31,acc_title:32,acc_title_value:33,acc_descr:34,acc_descr_value:35,acc_descr_multiline_value:36,classDef:37,CLASSDEF_ID:38,CLASSDEF_STYLEOPTS:39,DEFAULT:40,class:41,CLASSENTITY_IDS:42,STYLECLASS:43,direction_tb:44,direction_bt:45,direction_rl:46,direction_lr:47,eol:48,";":49,EDGE_STATE:50,STYLE_SEPARATOR:51,left_of:52,right_of:53,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",13:"DESCR",14:"--\x3e",15:"HIDE_EMPTY",16:"scale",17:"WIDTH",18:"COMPOSIT_STATE",19:"STRUCT_START",20:"STRUCT_STOP",21:"STATE_DESCR",22:"AS",23:"ID",24:"FORK",25:"JOIN",26:"CHOICE",27:"CONCURRENT",28:"note",30:"NOTE_TEXT",32:"acc_title",33:"acc_title_value",34:"acc_descr",35:"acc_descr_value",36:"acc_descr_multiline_value",37:"classDef",38:"CLASSDEF_ID",39:"CLASSDEF_STYLEOPTS",40:"DEFAULT",41:"class",42:"CLASSENTITY_IDS",43:"STYLECLASS",44:"direction_tb",45:"direction_bt",46:"direction_rl",47:"direction_lr",49:";",50:"EDGE_STATE",51:"STYLE_SEPARATOR",52:"left_of",53:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[10,3],[10,3],[11,3],[31,1],[31,1],[31,1],[31,1],[48,1],[48,1],[12,1],[12,1],[12,3],[12,3],[29,1],[29,1]],performAction:function(t,e,s,i,n,r,o){var a=r.length-1;switch(n){case 3:return i.setRootDoc(r[a]),r[a];case 4:this.$=[];break;case 5:"nl"!=r[a]&&(r[a-1].push(r[a]),this.$=r[a-1]);break;case 6:case 7:case 11:this.$=r[a];break;case 8:this.$="nl";break;case 12:const t=r[a-1];t.description=i.trimColon(r[a]),this.$=t;break;case 13:this.$={stmt:"relation",state1:r[a-2],state2:r[a]};break;case 14:const e=i.trimColon(r[a]);this.$={stmt:"relation",state1:r[a-3],state2:r[a-1],description:e};break;case 18:this.$={stmt:"state",id:r[a-3],type:"default",description:"",doc:r[a-1]};break;case 19:var c=r[a],l=r[a-2].trim();if(r[a].match(":")){var h=r[a].split(":");c=h[0],l=[l,h[1]]}this.$={stmt:"state",id:c,type:"default",description:l};break;case 20:this.$={stmt:"state",id:r[a-3],type:"default",description:r[a-5],doc:r[a-1]};break;case 21:this.$={stmt:"state",id:r[a],type:"fork"};break;case 22:this.$={stmt:"state",id:r[a],type:"join"};break;case 23:this.$={stmt:"state",id:r[a],type:"choice"};break;case 24:this.$={stmt:"state",id:i.getDividerId(),type:"divider"};break;case 25:this.$={stmt:"state",id:r[a-1].trim(),note:{position:r[a-2].trim(),text:r[a].trim()}};break;case 28:this.$=r[a].trim(),i.setAccTitle(this.$);break;case 29:case 30:this.$=r[a].trim(),i.setAccDescription(this.$);break;case 31:case 32:this.$={stmt:"classDef",id:r[a-1].trim(),classes:r[a].trim()};break;case 33:this.$={stmt:"applyClass",id:r[a-1].trim(),styleClass:r[a].trim()};break;case 34:i.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 35:i.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 36:i.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 37:i.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 40:case 41:this.$={stmt:"state",id:r[a].trim(),type:"default",description:""};break;case 42:case 43:this.$={stmt:"state",id:r[a-2].trim(),classes:[r[a].trim()],type:"default",description:""}}},table:[{3:1,4:e,5:s,6:i},{1:[3]},{3:5,4:e,5:s,6:i},{3:6,4:e,5:s,6:i},t([1,4,5,15,16,18,21,23,24,25,26,27,28,32,34,36,37,41,44,45,46,47,50],n,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:r,5:o,8:8,9:10,10:12,11:13,12:14,15:a,16:c,18:l,21:h,23:u,24:d,25:p,26:y,27:f,28:m,31:24,32:g,34:S,36:_,37:k,41:T,44:b,45:E,46:x,47:C,50:$},t(v,[2,5]),{9:36,10:12,11:13,12:14,15:a,16:c,18:l,21:h,23:u,24:d,25:p,26:y,27:f,28:m,31:24,32:g,34:S,36:_,37:k,41:T,44:b,45:E,46:x,47:C,50:$},t(v,[2,7]),t(v,[2,8]),t(v,[2,9]),t(v,[2,10]),t(v,[2,11],{13:[1,37],14:[1,38]}),t(v,[2,15]),{17:[1,39]},t(v,[2,17],{19:[1,40]}),{22:[1,41]},t(v,[2,21]),t(v,[2,22]),t(v,[2,23]),t(v,[2,24]),{29:42,30:[1,43],52:[1,44],53:[1,45]},t(v,[2,27]),{33:[1,46]},{35:[1,47]},t(v,[2,30]),{38:[1,48],40:[1,49]},{42:[1,50]},t(D,[2,40],{51:[1,51]}),t(D,[2,41],{51:[1,52]}),t(v,[2,34]),t(v,[2,35]),t(v,[2,36]),t(v,[2,37]),t(v,[2,6]),t(v,[2,12]),{12:53,23:u,50:$},t(v,[2,16]),t(A,n,{7:54}),{23:[1,55]},{23:[1,56]},{22:[1,57]},{23:[2,44]},{23:[2,45]},t(v,[2,28]),t(v,[2,29]),{39:[1,58]},{39:[1,59]},{43:[1,60]},{23:[1,61]},{23:[1,62]},t(v,[2,13],{13:[1,63]}),{4:r,5:o,8:8,9:10,10:12,11:13,12:14,15:a,16:c,18:l,20:[1,64],21:h,23:u,24:d,25:p,26:y,27:f,28:m,31:24,32:g,34:S,36:_,37:k,41:T,44:b,45:E,46:x,47:C,50:$},t(v,[2,19],{19:[1,65]}),{30:[1,66]},{23:[1,67]},t(v,[2,31]),t(v,[2,32]),t(v,[2,33]),t(D,[2,42]),t(D,[2,43]),t(v,[2,14]),t(v,[2,18]),t(A,n,{7:68}),t(v,[2,25]),t(v,[2,26]),{4:r,5:o,8:8,9:10,10:12,11:13,12:14,15:a,16:c,18:l,20:[1,69],21:h,23:u,24:d,25:p,26:y,27:f,28:m,31:24,32:g,34:S,36:_,37:k,41:T,44:b,45:E,46:x,47:C,50:$},t(v,[2,20])],defaultActions:{5:[2,1],6:[2,2],44:[2,44],45:[2,45]},parseError:function(t,e){if(!e.recoverable){var s=new Error(t);throw s.hash=e,s}this.trace(t)},parse:function(t){var e=this,s=[0],i=[],n=[null],r=[],o=this.table,a="",c=0,l=0,h=r.slice.call(arguments,1),u=Object.create(this.lexer),d={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(d.yy[p]=this.yy[p]);u.setInput(t,d.yy),d.yy.lexer=u,d.yy.parser=this,void 0===u.yylloc&&(u.yylloc={});var y=u.yylloc;r.push(y);var f=u.options&&u.options.ranges;"function"==typeof d.yy.parseError?this.parseError=d.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var m,g,S,_,k,T,b,E,x,C={};;){if(g=s[s.length-1],this.defaultActions[g]?S=this.defaultActions[g]:(null==m&&(x=void 0,"number"!=typeof(x=i.pop()||u.lex()||1)&&(x instanceof Array&&(x=(i=x).pop()),x=e.symbols_[x]||x),m=x),S=o[g]&&o[g][m]),void 0===S||!S.length||!S[0]){var $="";for(k in E=[],o[g])this.terminals_[k]&&k>2&&E.push("'"+this.terminals_[k]+"'");$=u.showPosition?"Parse error on line "+(c+1)+":\n"+u.showPosition()+"\nExpecting "+E.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError($,{text:u.match,token:this.terminals_[m]||m,line:u.yylineno,loc:y,expected:E})}if(S[0]instanceof Array&&S.length>1)throw new Error("Parse Error: multiple actions possible at state: "+g+", token: "+m);switch(S[0]){case 1:s.push(m),n.push(u.yytext),r.push(u.yylloc),s.push(S[1]),m=null,l=u.yyleng,a=u.yytext,c=u.yylineno,y=u.yylloc;break;case 2:if(T=this.productions_[S[1]][1],C.$=n[n.length-T],C._$={first_line:r[r.length-(T||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(T||1)].first_column,last_column:r[r.length-1].last_column},f&&(C._$.range=[r[r.length-(T||1)].range[0],r[r.length-1].range[1]]),void 0!==(_=this.performAction.apply(C,[a,l,c,d.yy,S[1],n,r].concat(h))))return _;T&&(s=s.slice(0,-1*T*2),n=n.slice(0,-1*T),r=r.slice(0,-1*T)),s.push(this.productions_[S[1]][0]),n.push(C.$),r.push(C._$),b=o[s[s.length-2]][s[s.length-1]],s.push(b);break;case 3:return!0}}return!0}},I={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,s=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),s.length-1&&(this.yylineno-=s.length-1);var n=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:s?(s.length===i.length?this.yylloc.first_column:0)+i[i.length-s.length].length-s[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var s,i,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(n.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],s=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack){for(var r in n)this[r]=n[r];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,s,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),r=0;re[0].length)){if(e=s,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(s,n[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,s,i){switch(s){case 0:return 40;case 1:case 39:return 44;case 2:case 40:return 45;case 3:case 41:return 46;case 4:case 42:return 47;case 5:case 6:case 8:case 9:case 10:case 11:case 51:case 53:case 59:break;case 7:case 74:return 5;case 12:case 29:return this.pushState("SCALE"),16;case 13:case 30:return 17;case 14:case 20:case 31:case 46:case 49:this.popState();break;case 15:return this.begin("acc_title"),32;case 16:return this.popState(),"acc_title_value";case 17:return this.begin("acc_descr"),34;case 18:return this.popState(),"acc_descr_value";case 19:this.begin("acc_descr_multiline");break;case 21:return"acc_descr_multiline_value";case 22:return this.pushState("CLASSDEF"),37;case 23:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 24:return this.popState(),this.pushState("CLASSDEFID"),38;case 25:return this.popState(),39;case 26:return this.pushState("CLASS"),41;case 27:return this.popState(),this.pushState("CLASS_STYLE"),42;case 28:return this.popState(),43;case 32:this.pushState("STATE");break;case 33:case 36:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),24;case 34:case 37:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),25;case 35:case 38:return this.popState(),e.yytext=e.yytext.slice(0,-10).trim(),26;case 43:this.pushState("STATE_STRING");break;case 44:return this.pushState("STATE_ID"),"AS";case 45:case 61:return this.popState(),"ID";case 47:return"STATE_DESCR";case 48:return 18;case 50:return this.popState(),this.pushState("struct"),19;case 52:return this.popState(),20;case 54:return this.begin("NOTE"),28;case 55:return this.popState(),this.pushState("NOTE_ID"),52;case 56:return this.popState(),this.pushState("NOTE_ID"),53;case 57:this.popState(),this.pushState("FLOATING_NOTE");break;case 58:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 60:return"NOTE_TEXT";case 62:return this.popState(),this.pushState("NOTE_TEXT"),23;case 63:return this.popState(),e.yytext=e.yytext.substr(2).trim(),30;case 64:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),30;case 65:case 66:return 6;case 67:return 15;case 68:return 50;case 69:return 23;case 70:return e.yytext=e.yytext.trim(),13;case 71:return 14;case 72:return 27;case 73:return 51;case 75:return"INVALID"}},rules:[/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[9,10],inclusive:!1},struct:{rules:[9,10,22,26,32,39,40,41,42,51,52,53,54,68,69,70,71,72],inclusive:!1},FLOATING_NOTE_ID:{rules:[61],inclusive:!1},FLOATING_NOTE:{rules:[58,59,60],inclusive:!1},NOTE_TEXT:{rules:[63,64],inclusive:!1},NOTE_ID:{rules:[62],inclusive:!1},NOTE:{rules:[55,56,57],inclusive:!1},CLASS_STYLE:{rules:[28],inclusive:!1},CLASS:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[25],inclusive:!1},CLASSDEF:{rules:[23,24],inclusive:!1},acc_descr_multiline:{rules:[20,21],inclusive:!1},acc_descr:{rules:[18],inclusive:!1},acc_title:{rules:[16],inclusive:!1},SCALE:{rules:[13,14,30,31],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[45],inclusive:!1},STATE_STRING:{rules:[46,47],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[9,10,33,34,35,36,37,38,43,44,48,49,50],inclusive:!1},ID:{rules:[9,10],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,10,11,12,15,17,19,22,26,29,32,50,54,65,66,67,68,69,70,71,73,74,75],inclusive:!0}}};function O(){this.yy={}}return L.lexer=I,O.prototype=L,L.Parser=O,new O}();n.parser=n;const r=n,o="TB",a="state",c="relation",l="default",h="divider",u="[*]",d="start",p=u,y="color",f="fill";let m="LR",g=[],S={};let _={root:{relations:[],states:{},documents:{}}},k=_.root,T=0,b=0;const E=t=>JSON.parse(JSON.stringify(t)),x=(t,e,s)=>{if(e.stmt===c)x(t,e.state1,!0),x(t,e.state2,!1);else if(e.stmt===a&&("[*]"===e.id?(e.id=s?t.id+"_start":t.id+"_end",e.start=s):e.id=e.id.trim()),e.doc){const t=[];let s,n=[];for(s=0;s0&&n.length>0){const s={stmt:a,id:(0,i.I)(),type:"divider",doc:E(n)};t.push(E(s)),e.doc=t}e.doc.forEach((t=>x(e,t,!0)))}},C=function(t,e=l,s=null,n=null,r=null,o=null,a=null,c=null){const h=null==t?void 0:t.trim();if(void 0===k.states[h]?(i.l.info("Adding state ",h,n),k.states[h]={id:h,descriptions:[],type:e,doc:s,note:r,classes:[],styles:[],textStyles:[]}):(k.states[h].doc||(k.states[h].doc=s),k.states[h].type||(k.states[h].type=e)),n&&(i.l.info("Setting state description",h,n),"string"==typeof n&&I(h,n.trim()),"object"==typeof n&&n.forEach((t=>I(h,t.trim())))),r&&(k.states[h].note=r,k.states[h].note.text=i.e.sanitizeText(k.states[h].note.text,(0,i.c)())),o){i.l.info("Setting state classes",h,o);("string"==typeof o?[o]:o).forEach((t=>N(h,t.trim())))}if(a){i.l.info("Setting state styles",h,a);("string"==typeof a?[a]:a).forEach((t=>R(h,t.trim())))}if(c){i.l.info("Setting state styles",h,a);("string"==typeof c?[c]:c).forEach((t=>w(h,t.trim())))}},$=function(t){_={root:{relations:[],states:{},documents:{}}},k=_.root,T=0,S={},t||(0,i.v)()},v=function(t){return k.states[t]};function D(t=""){let e=t;return t===u&&(T++,e=`${d}${T}`),e}function A(t="",e=l){return t===u?d:e}const L=function(t,e,s){if("object"==typeof t)!function(t,e,s){let n=D(t.id.trim()),r=A(t.id.trim(),t.type),o=D(e.id.trim()),a=A(e.id.trim(),e.type);C(n,r,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),C(o,a,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),k.relations.push({id1:n,id2:o,relationTitle:i.e.sanitizeText(s,(0,i.c)())})}(t,e,s);else{const n=D(t.trim()),r=A(t),o=function(t=""){let e=t;return t===p&&(T++,e=`end${T}`),e}(e.trim()),a=function(t="",e=l){return t===p?"end":e}(e);C(n,r),C(o,a),k.relations.push({id1:n,id2:o,title:i.e.sanitizeText(s,(0,i.c)())})}},I=function(t,e){const s=k.states[t],n=e.startsWith(":")?e.replace(":","").trim():e;s.descriptions.push(i.e.sanitizeText(n,(0,i.c)()))},O=function(t,e=""){void 0===S[t]&&(S[t]={id:t,styles:[],textStyles:[]});const s=S[t];null!=e&&e.split(",").forEach((t=>{const e=t.replace(/([^;]*);/,"$1").trim();if(t.match(y)){const t=e.replace(f,"bgFill").replace(y,f);s.textStyles.push(t)}s.styles.push(e)}))},N=function(t,e){t.split(",").forEach((function(t){let s=v(t);if(void 0===s){const e=t.trim();C(e),s=v(e)}s.classes.push(e)}))},R=function(t,e){const s=v(t);void 0!==s&&s.textStyles.push(e)},w=function(t,e){const s=v(t);void 0!==s&&s.textStyles.push(e)},B={getConfig:()=>(0,i.c)().state,addState:C,clear:$,getState:v,getStates:function(){return k.states},getRelations:function(){return k.relations},getClasses:function(){return S},getDirection:()=>m,addRelation:L,getDividerId:()=>(b++,"divider-id-"+b),setDirection:t=>{m=t},cleanupLabel:function(t){return":"===t.substring(0,1)?t.substr(2).trim():t.trim()},lineType:{LINE:0,DOTTED_LINE:1},relationType:{AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},logDocuments:function(){i.l.info("Documents = ",_)},getRootDoc:()=>g,setRootDoc:t=>{i.l.info("Setting root doc",t),g=t},getRootDocV2:()=>(x({id:"root"},{id:"root",doc:g},!0),{id:"root",doc:g}),extract:t=>{let e;e=t.doc?t.doc:t,i.l.info(e),$(!0),i.l.info("Extract",e),e.forEach((t=>{switch(t.stmt){case a:C(t.id.trim(),t.type,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles);break;case c:L(t.state1,t.state2,t.description);break;case"classDef":O(t.id.trim(),t.classes);break;case"applyClass":N(t.id.trim(),t.styleClass)}}))},trimColon:t=>t&&":"===t[0]?t.substr(1).trim():t.trim(),getAccTitle:i.g,setAccTitle:i.s,getAccDescription:i.a,setAccDescription:i.b,addStyleClass:O,setCssClass:N,addDescription:I,setDiagramTitle:i.q,getDiagramTitle:i.t},P=t=>`\ndefs #statediagram-barbEnd {\n fill: ${t.transitionColor};\n stroke: ${t.transitionColor};\n }\ng.stateGroup text {\n fill: ${t.nodeBorder};\n stroke: none;\n font-size: 10px;\n}\ng.stateGroup text {\n fill: ${t.textColor};\n stroke: none;\n font-size: 10px;\n\n}\ng.stateGroup .state-title {\n font-weight: bolder;\n fill: ${t.stateLabelColor};\n}\n\ng.stateGroup rect {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n}\n\ng.stateGroup line {\n stroke: ${t.lineColor};\n stroke-width: 1;\n}\n\n.transition {\n stroke: ${t.transitionColor};\n stroke-width: 1;\n fill: none;\n}\n\n.stateGroup .composit {\n fill: ${t.background};\n border-bottom: 1px\n}\n\n.stateGroup .alt-composit {\n fill: #e0e0e0;\n border-bottom: 1px\n}\n\n.state-note {\n stroke: ${t.noteBorderColor};\n fill: ${t.noteBkgColor};\n\n text {\n fill: ${t.noteTextColor};\n stroke: none;\n font-size: 10px;\n }\n}\n\n.stateLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: ${t.mainBkg};\n opacity: 0.5;\n}\n\n.edgeLabel .label rect {\n fill: ${t.labelBackgroundColor};\n opacity: 0.5;\n}\n.edgeLabel .label text {\n fill: ${t.transitionLabelColor||t.tertiaryTextColor};\n}\n.label div .edgeLabel {\n color: ${t.transitionLabelColor||t.tertiaryTextColor};\n}\n\n.stateLabel text {\n fill: ${t.stateLabelColor};\n font-size: 10px;\n font-weight: bold;\n}\n\n.node circle.state-start {\n fill: ${t.specialStateColor};\n stroke: ${t.specialStateColor};\n}\n\n.node .fork-join {\n fill: ${t.specialStateColor};\n stroke: ${t.specialStateColor};\n}\n\n.node circle.state-end {\n fill: ${t.innerEndBackground};\n stroke: ${t.background};\n stroke-width: 1.5\n}\n.end-state-inner {\n fill: ${t.compositeBackground||t.background};\n // stroke: ${t.background};\n stroke-width: 1.5\n}\n\n.node rect {\n fill: ${t.stateBkg||t.mainBkg};\n stroke: ${t.stateBorder||t.nodeBorder};\n stroke-width: 1px;\n}\n.node polygon {\n fill: ${t.mainBkg};\n stroke: ${t.stateBorder||t.nodeBorder};;\n stroke-width: 1px;\n}\n#statediagram-barbEnd {\n fill: ${t.lineColor};\n}\n\n.statediagram-cluster rect {\n fill: ${t.compositeTitleBackground};\n stroke: ${t.stateBorder||t.nodeBorder};\n stroke-width: 1px;\n}\n\n.cluster-label, .nodeLabel {\n color: ${t.stateLabelColor};\n}\n\n.statediagram-cluster rect.outer {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-state .divider {\n stroke: ${t.stateBorder||t.nodeBorder};\n}\n\n.statediagram-state .title-state {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-cluster.statediagram-cluster .inner {\n fill: ${t.compositeBackground||t.background};\n}\n.statediagram-cluster.statediagram-cluster-alt .inner {\n fill: ${t.altBackground?t.altBackground:"#efefef"};\n}\n\n.statediagram-cluster .inner {\n rx:0;\n ry:0;\n}\n\n.statediagram-state rect.basic {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-state rect.divider {\n stroke-dasharray: 10,10;\n fill: ${t.altBackground?t.altBackground:"#efefef"};\n}\n\n.note-edge {\n stroke-dasharray: 5;\n}\n\n.statediagram-note rect {\n fill: ${t.noteBkgColor};\n stroke: ${t.noteBorderColor};\n stroke-width: 1px;\n rx: 0;\n ry: 0;\n}\n.statediagram-note rect {\n fill: ${t.noteBkgColor};\n stroke: ${t.noteBorderColor};\n stroke-width: 1px;\n rx: 0;\n ry: 0;\n}\n\n.statediagram-note text {\n fill: ${t.noteTextColor};\n}\n\n.statediagram-note .nodeLabel {\n color: ${t.noteTextColor};\n}\n.statediagram .edgeLabel {\n color: red; // ${t.noteTextColor};\n}\n\n#dependencyStart, #dependencyEnd {\n fill: ${t.lineColor};\n stroke: ${t.lineColor};\n stroke-width: 1;\n}\n\n.statediagramTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n}\n`}}]); \ No newline at end of file diff --git a/assets/js/78e1e977.492a2f2c.js b/assets/js/78e1e977.492a2f2c.js deleted file mode 100644 index 21740bc158d9..000000000000 --- a/assets/js/78e1e977.492a2f2c.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5884],{90616:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>l,contentTitle:()=>o,default:()=>h,frontMatter:()=>r,metadata:()=>a,toc:()=>c});var t=s(74848),i=s(28453);const r={id:"learn-xcm-docs-journey-holding",title:"More Holding Modifiers",sidebar_label:"More Holding Modifiers",description:"More Instructions to Alter the Holding Register.",keywords:["xcm","cross-consensus messaging","transfers","holding"],slug:"../journey-holding"},o="Holding Register Modifiers",a={id:"learn/xcm/journey/learn-xcm-docs-journey-holding",title:"More Holding Modifiers",description:"More Instructions to Alter the Holding Register.",source:"@site/../docs/learn/xcm/journey/holding-modifiers.md",sourceDirName:"learn/xcm/journey",slug:"/learn/xcm/journey-holding",permalink:"/docs/learn/xcm/journey-holding",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/xcm/journey/holding-modifiers.md",tags:[],version:"current",lastUpdatedBy:"divdeploy",lastUpdatedAt:1712340071e3,frontMatter:{id:"learn-xcm-docs-journey-holding",title:"More Holding Modifiers",sidebar_label:"More Holding Modifiers",description:"More Instructions to Alter the Holding Register.",keywords:["xcm","cross-consensus messaging","transfers","holding"],slug:"../journey-holding"},sidebar:"docs",previous:{title:"More Register Modifiers",permalink:"/docs/learn/xcm/journey-register"},next:{title:"Trap and Claim Assets",permalink:"/docs/learn/xcm/journey-assets"}},l={},c=[{value:"BurnAsset",id:"burnasset",level:2},{value:"Example",id:"example",level:3},{value:"ExchangeAsset",id:"exchangeasset",level:2},{value:"Example",id:"example-1",level:3}];function d(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,i.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.header,{children:(0,t.jsx)(n.h1,{id:"holding-register-modifiers",children:"Holding Register Modifiers"})}),"\n",(0,t.jsxs)(n.p,{children:["Most of the XCM instructions alter the Holding Register. We already have seen instructions that\nalter the Holding Register, like the ",(0,t.jsx)(n.code,{children:"WithdrawAsset"})," or ",(0,t.jsx)(n.code,{children:"DepositAsset"})," instructions. In this chapter\nwe go over more instructions that alter the holding register, namely:"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"BurnAsset"}),"\n",(0,t.jsx)(n.li,{children:"ExchangeAsset"}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"burnasset",children:"BurnAsset"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-rust",children:"BurnAsset(MultiAssets)\n"})}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"BurnAsset"})," instruction allows for the reduction of assets in the Holding Register by up to the\nspecified assets. The execution of the instruction does not throw an error if the Holding Register\ndoes not contain the assets (to make this an error, use ",(0,t.jsx)(n.code,{children:"ExpectAsset"})," prior)."]}),"\n",(0,t.jsx)(n.h3,{id:"example",children:"Example"}),"\n",(0,t.jsxs)(n.p,{children:["For the full example, check ",(0,t.jsx)(n.a,{href:"https://github.com/paritytech/xcm-docs/tree/main/examples",children:"the repo"}),".\nThe Scenario of the example is as follows: Parachain A withdraws 10 units from its sovereign account\non the relay chain and burns 4 of them. The relay chain then reports back the status of the Holding\nRegister to Parachain A. We expect the Holding Register to hold 6 units. Note: If we would have\nadded more then 10 units worth of assets in the ",(0,t.jsx)(n.code,{children:"BurnAsset"})," instruction, we would have burned all\nassets in the Holding Register and the execution would succeed."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-rust",children:"let message = Xcm(vec![\n WithdrawAsset((Here, 10 * CENTS).into()),\n BuyExecution { fees: (Here, CENTS).into(), weight_limit: WeightLimit::Unlimited },\n BurnAsset((Here, 4 * CENTS).into()),\n ReportHolding {\n response_info: QueryResponseInfo {\n destination: Parachain(1).into(),\n query_id: QUERY_ID,\n max_weight: Weight::from_parts(1_000_000_000, 64*64) },\n assets: All.into()\n }\n]);\n"})}),"\n",(0,t.jsx)(n.p,{children:"We expect the following response:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-rust",children:"Response::Assets((Parent, 6 * CENTS).into())\n"})}),"\n",(0,t.jsx)(n.h2,{id:"exchangeasset",children:"ExchangeAsset"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-rust",children:"ExchangeAsset { give: MultiAssetFilter, want: MultiAssets, maximal: bool }\n"})}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"ExchangeAsset"})," instruction allows us to remove asset(s) (",(0,t.jsx)(n.code,{children:"give"}),") from the Holding Register and\nreplace them with alternative assets (",(0,t.jsx)(n.code,{children:"want"}),"). The ",(0,t.jsx)(n.code,{children:"ExchangeAsset"})," instruction has three fields."]}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"give"})," field indicates the maximum number of assets that can be removed from the Holding\nregister."]}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"want"})," field indicates the minimum amount of assets which ",(0,t.jsx)(n.code,{children:"give"})," should be exchanged for. We\nshould at a minimum get the assets in ",(0,t.jsx)(n.code,{children:"want"})," for the execution of the instruction not to fail."]}),"\n",(0,t.jsxs)(n.p,{children:["If the ",(0,t.jsx)(n.code,{children:"maximal"})," field is ",(0,t.jsx)(n.code,{children:"true"}),", then we prefer to give as much as possible up to the limit of\n",(0,t.jsx)(n.code,{children:"give"})," and receive accordingly more assets then stated in ",(0,t.jsx)(n.code,{children:"want"}),". If the ",(0,t.jsx)(n.code,{children:"maximal"})," field is ",(0,t.jsx)(n.code,{children:"false"}),",\nthen we prefer to give as little as possible in order to receive as little as possible while\nreceiving at least ",(0,t.jsx)(n.code,{children:"want"}),"."]}),"\n",(0,t.jsx)(n.h3,{id:"example-1",children:"Example"}),"\n",(0,t.jsxs)(n.p,{children:["The full example can be found in\n",(0,t.jsx)(n.a,{href:"https://github.com/paritytech/xcm-docs/tree/main/examples",children:"the repo"}),"."]}),"\n",(0,t.jsx)(n.p,{children:"The scenario for the example is this: Scenario: The relay chain sends an XCM to Parachain A that: .1\nWithdraws some native assets .2 Exchanges these assets for relay chain derivative tokens, with\nmaximal set to true. .3 Deposit all the assets that are in the Holding in the account of Alice."}),"\n",(0,t.jsxs)(n.p,{children:["NOTE: The implementation of the AssetExchanger is simple and in this case swaps all the assets in\nthe exchange for the assets in ",(0,t.jsx)(n.code,{children:"give"}),". Depending on the implementation of AssetExchanger, the test\nresults could differ."]}),"\n",(0,t.jsx)(n.p,{children:"The Assets in the exchange in Parachain(1). This is a custom exchange implementation just for\ntesting purposes."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-rust",children:"let assets_in_exchange = vec![(Parent, 10 * CENTS).into()];\nparachain::set_exchange_assets(assets_in_exchange);\n"})}),"\n",(0,t.jsx)(n.p,{children:"The message that is send:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-rust",children:"let message = Xcm(vec![\n WithdrawAsset((Here, 10 * CENTS).into()),\n BuyExecution { fees: (Here, CENTS).into(), weight_limit: WeightLimit::Unlimited },\n // Maximal field set to true.\n ExchangeAsset {\n give: Definite((Here, 5 * CENTS).into()),\n want: (Parent, 5 * CENTS).into(),\n maximal: true,\n },\n DepositAsset {\n assets: AllCounted(2).into(),\n beneficiary: AccountId32 {\n network: Some(parachain::RelayNetwork::get()),\n id: ALICE.into(),\n }\n .into(),\n },\n]);\n"})}),"\n",(0,t.jsxs)(n.p,{children:["Alice receives ",(0,t.jsx)(n.code,{children:"5 CENTS"})," worth of native assets (",(0,t.jsx)(n.code,{children:"Here"}),") and ",(0,t.jsx)(n.code,{children:"5 CENTS"})," worth of relay chain\nderivative assets (",(0,t.jsx)(n.code,{children:"Parent"}),")."]})]})}function h(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(d,{...e})}):d(e)}},28453:(e,n,s)=>{s.d(n,{R:()=>o,x:()=>a});var t=s(96540);const i={},r=t.createContext(i);function o(e){const n=t.useContext(r);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:o(e.components),t.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/78e1e977.baf22118.js b/assets/js/78e1e977.baf22118.js new file mode 100644 index 000000000000..8cc1aea5c97f --- /dev/null +++ b/assets/js/78e1e977.baf22118.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5884],{97501:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>l,contentTitle:()=>a,default:()=>h,frontMatter:()=>o,metadata:()=>t,toc:()=>c});const t=JSON.parse('{"id":"learn/xcm/journey/learn-xcm-docs-journey-holding","title":"More Holding Modifiers","description":"More Instructions to Alter the Holding Register.","source":"@site/../docs/learn/xcm/journey/holding-modifiers.md","sourceDirName":"learn/xcm/journey","slug":"/learn/xcm/journey-holding","permalink":"/docs/learn/xcm/journey-holding","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/xcm/journey/holding-modifiers.md","tags":[],"version":"current","lastUpdatedBy":"divdeploy","lastUpdatedAt":1712340071000,"frontMatter":{"id":"learn-xcm-docs-journey-holding","title":"More Holding Modifiers","sidebar_label":"More Holding Modifiers","description":"More Instructions to Alter the Holding Register.","keywords":["xcm","cross-consensus messaging","transfers","holding"],"slug":"../journey-holding"},"sidebar":"docs","previous":{"title":"More Register Modifiers","permalink":"/docs/learn/xcm/journey-register"},"next":{"title":"Trap and Claim Assets","permalink":"/docs/learn/xcm/journey-assets"}}');var i=s(74848),r=s(28453);const o={id:"learn-xcm-docs-journey-holding",title:"More Holding Modifiers",sidebar_label:"More Holding Modifiers",description:"More Instructions to Alter the Holding Register.",keywords:["xcm","cross-consensus messaging","transfers","holding"],slug:"../journey-holding"},a="Holding Register Modifiers",l={},c=[{value:"BurnAsset",id:"burnasset",level:2},{value:"Example",id:"example",level:3},{value:"ExchangeAsset",id:"exchangeasset",level:2},{value:"Example",id:"example-1",level:3}];function d(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,r.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.header,{children:(0,i.jsx)(n.h1,{id:"holding-register-modifiers",children:"Holding Register Modifiers"})}),"\n",(0,i.jsxs)(n.p,{children:["Most of the XCM instructions alter the Holding Register. We already have seen instructions that\nalter the Holding Register, like the ",(0,i.jsx)(n.code,{children:"WithdrawAsset"})," or ",(0,i.jsx)(n.code,{children:"DepositAsset"})," instructions. In this chapter\nwe go over more instructions that alter the holding register, namely:"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"BurnAsset"}),"\n",(0,i.jsx)(n.li,{children:"ExchangeAsset"}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"burnasset",children:"BurnAsset"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-rust",children:"BurnAsset(MultiAssets)\n"})}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.code,{children:"BurnAsset"})," instruction allows for the reduction of assets in the Holding Register by up to the\nspecified assets. The execution of the instruction does not throw an error if the Holding Register\ndoes not contain the assets (to make this an error, use ",(0,i.jsx)(n.code,{children:"ExpectAsset"})," prior)."]}),"\n",(0,i.jsx)(n.h3,{id:"example",children:"Example"}),"\n",(0,i.jsxs)(n.p,{children:["For the full example, check ",(0,i.jsx)(n.a,{href:"https://github.com/paritytech/xcm-docs/tree/main/examples",children:"the repo"}),".\nThe Scenario of the example is as follows: Parachain A withdraws 10 units from its sovereign account\non the relay chain and burns 4 of them. The relay chain then reports back the status of the Holding\nRegister to Parachain A. We expect the Holding Register to hold 6 units. Note: If we would have\nadded more then 10 units worth of assets in the ",(0,i.jsx)(n.code,{children:"BurnAsset"})," instruction, we would have burned all\nassets in the Holding Register and the execution would succeed."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-rust",children:"let message = Xcm(vec![\n WithdrawAsset((Here, 10 * CENTS).into()),\n BuyExecution { fees: (Here, CENTS).into(), weight_limit: WeightLimit::Unlimited },\n BurnAsset((Here, 4 * CENTS).into()),\n ReportHolding {\n response_info: QueryResponseInfo {\n destination: Parachain(1).into(),\n query_id: QUERY_ID,\n max_weight: Weight::from_parts(1_000_000_000, 64*64) },\n assets: All.into()\n }\n]);\n"})}),"\n",(0,i.jsx)(n.p,{children:"We expect the following response:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-rust",children:"Response::Assets((Parent, 6 * CENTS).into())\n"})}),"\n",(0,i.jsx)(n.h2,{id:"exchangeasset",children:"ExchangeAsset"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-rust",children:"ExchangeAsset { give: MultiAssetFilter, want: MultiAssets, maximal: bool }\n"})}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.code,{children:"ExchangeAsset"})," instruction allows us to remove asset(s) (",(0,i.jsx)(n.code,{children:"give"}),") from the Holding Register and\nreplace them with alternative assets (",(0,i.jsx)(n.code,{children:"want"}),"). The ",(0,i.jsx)(n.code,{children:"ExchangeAsset"})," instruction has three fields."]}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.code,{children:"give"})," field indicates the maximum number of assets that can be removed from the Holding\nregister."]}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.code,{children:"want"})," field indicates the minimum amount of assets which ",(0,i.jsx)(n.code,{children:"give"})," should be exchanged for. We\nshould at a minimum get the assets in ",(0,i.jsx)(n.code,{children:"want"})," for the execution of the instruction not to fail."]}),"\n",(0,i.jsxs)(n.p,{children:["If the ",(0,i.jsx)(n.code,{children:"maximal"})," field is ",(0,i.jsx)(n.code,{children:"true"}),", then we prefer to give as much as possible up to the limit of\n",(0,i.jsx)(n.code,{children:"give"})," and receive accordingly more assets then stated in ",(0,i.jsx)(n.code,{children:"want"}),". If the ",(0,i.jsx)(n.code,{children:"maximal"})," field is ",(0,i.jsx)(n.code,{children:"false"}),",\nthen we prefer to give as little as possible in order to receive as little as possible while\nreceiving at least ",(0,i.jsx)(n.code,{children:"want"}),"."]}),"\n",(0,i.jsx)(n.h3,{id:"example-1",children:"Example"}),"\n",(0,i.jsxs)(n.p,{children:["The full example can be found in\n",(0,i.jsx)(n.a,{href:"https://github.com/paritytech/xcm-docs/tree/main/examples",children:"the repo"}),"."]}),"\n",(0,i.jsx)(n.p,{children:"The scenario for the example is this: Scenario: The relay chain sends an XCM to Parachain A that: .1\nWithdraws some native assets .2 Exchanges these assets for relay chain derivative tokens, with\nmaximal set to true. .3 Deposit all the assets that are in the Holding in the account of Alice."}),"\n",(0,i.jsxs)(n.p,{children:["NOTE: The implementation of the AssetExchanger is simple and in this case swaps all the assets in\nthe exchange for the assets in ",(0,i.jsx)(n.code,{children:"give"}),". Depending on the implementation of AssetExchanger, the test\nresults could differ."]}),"\n",(0,i.jsx)(n.p,{children:"The Assets in the exchange in Parachain(1). This is a custom exchange implementation just for\ntesting purposes."}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-rust",children:"let assets_in_exchange = vec![(Parent, 10 * CENTS).into()];\nparachain::set_exchange_assets(assets_in_exchange);\n"})}),"\n",(0,i.jsx)(n.p,{children:"The message that is send:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-rust",children:"let message = Xcm(vec![\n WithdrawAsset((Here, 10 * CENTS).into()),\n BuyExecution { fees: (Here, CENTS).into(), weight_limit: WeightLimit::Unlimited },\n // Maximal field set to true.\n ExchangeAsset {\n give: Definite((Here, 5 * CENTS).into()),\n want: (Parent, 5 * CENTS).into(),\n maximal: true,\n },\n DepositAsset {\n assets: AllCounted(2).into(),\n beneficiary: AccountId32 {\n network: Some(parachain::RelayNetwork::get()),\n id: ALICE.into(),\n }\n .into(),\n },\n]);\n"})}),"\n",(0,i.jsxs)(n.p,{children:["Alice receives ",(0,i.jsx)(n.code,{children:"5 CENTS"})," worth of native assets (",(0,i.jsx)(n.code,{children:"Here"}),") and ",(0,i.jsx)(n.code,{children:"5 CENTS"})," worth of relay chain\nderivative assets (",(0,i.jsx)(n.code,{children:"Parent"}),")."]})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}},28453:(e,n,s)=>{s.d(n,{R:()=>o,x:()=>a});var t=s(96540);const i={},r=t.createContext(i);function o(e){const n=t.useContext(r);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:o(e.components),t.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/7c138549.3dfbc9e9.js b/assets/js/7c138549.3dfbc9e9.js new file mode 100644 index 000000000000..73b9df89fb6b --- /dev/null +++ b/assets/js/7c138549.3dfbc9e9.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7473],{24358:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>i,contentTitle:()=>d,default:()=>h,frontMatter:()=>t,metadata:()=>s,toc:()=>l});const s=JSON.parse('{"id":"general/dune-analytics/parachain-dashboards/neuroweb-dashboards","title":"Neuroweb Dashboards","description":"Neuroweb is a decentralized AI blockchain that rewards knowledge creation and sharing.","source":"@site/../docs/general/dune-analytics/parachain-dashboards/neuroweb-dashboards.md","sourceDirName":"general/dune-analytics/parachain-dashboards","slug":"/general/dune-analytics/neuroweb-dashboards","permalink":"/docs/general/dune-analytics/neuroweb-dashboards","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/parachain-dashboards/neuroweb-dashboards.md","tags":[],"version":"current","lastUpdatedBy":"MK","lastUpdatedAt":1719215716000,"frontMatter":{"id":"neuroweb-dashboards","title":"Neuroweb Dashboards","sidebar_label":"Neuroweb","description":"Neuroweb is a decentralized AI blockchain that rewards knowledge creation and sharing.","keywords":["polkadot","dashboard","dune","neuroweb","DKG","OTP","knowledgeasset"],"slug":"../neuroweb-dashboards"},"sidebar":"docs","previous":{"title":"Moonbeam","permalink":"/docs/general/dune-analytics/moonbeam-dashboards"},"next":{"title":"Nodle","permalink":"/docs/general/dune-analytics/nodle-dashboards"}}');var a=r(74848),o=r(28453);const t={id:"neuroweb-dashboards",title:"Neuroweb Dashboards",sidebar_label:"Neuroweb",description:"Neuroweb is a decentralized AI blockchain that rewards knowledge creation and sharing.",keywords:["polkadot","dashboard","dune","neuroweb","DKG","OTP","knowledgeasset"],slug:"../neuroweb-dashboards"},d="Neuroweb Dashboards",i={},l=[{value:"Overview",id:"overview",level:2},{value:"Featured Dashboards on Dune",id:"featured-dashboards-on-dune",level:2},{value:"Key Tables",id:"key-tables",level:2},{value:"Useful Queries",id:"useful-queries",level:2},{value:"Getting Started with Queries",id:"getting-started-with-queries",level:2}];function c(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,o.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.header,{children:(0,a.jsx)(n.h1,{id:"neuroweb-dashboards",children:"Neuroweb Dashboards"})}),"\n",(0,a.jsx)(n.h2,{id:"overview",children:"Overview"}),"\n",(0,a.jsx)(n.p,{children:"NeuroWeb is a decentralized AI blockchain that rewards knowledge creation and sharing. Its NEURO\ntoken supports the AI economy by incentivizing contributions to the OriginTrail Decentralized\nKnowledge Graph (DKG). NeuroWeb builds upon the groundwork established by its predecessor, the\nOriginTrail Parachain (OTP). This transformation into NeuroWeb was facilitated through a community\ngovernance vote on OTP in December 2023."}),"\n",(0,a.jsx)(n.h2,{id:"featured-dashboards-on-dune",children:"Featured Dashboards on Dune"}),"\n",(0,a.jsx)(n.p,{children:"Here you will find a variety of dashboards that help visualize data from the Neuroweb parachain:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.a,{href:"https://dune.com/substrate/neuroweb",children:"Neuroweb"}),": A comprehensive analysis of NeuroWeb, including:\nDKG, knowledge asset, asset, and XCM analysis."]}),"\n"]}),"\n",(0,a.jsx)(n.h2,{id:"key-tables",children:"Key Tables"}),"\n",(0,a.jsx)(n.p,{children:"Data from the NeuroWeb parachain is organized into several key tables:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.code,{children:"neuroweb.balances"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.code,{children:"neuroweb.blocks"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.code,{children:"neuroweb.calls"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.code,{children:"neuroweb.events"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.code,{children:"neuroweb.extrinsics"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.code,{children:"neuroweb.transfers"})}),"\n"]}),"\n",(0,a.jsxs)(n.p,{children:["Start building your own queries using granular data on Dune\n",(0,a.jsx)(n.a,{href:"https://dune.com/queries?category=canonical&namespace=neuroweb",children:"here"}),"."]}),"\n",(0,a.jsx)(n.h2,{id:"useful-queries",children:"Useful Queries"}),"\n",(0,a.jsx)(n.p,{children:"Some useful queries for Neuroweb are provided:"}),"\n",(0,a.jsxs)(n.table,{children:[(0,a.jsx)(n.thead,{children:(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.th,{children:"Title"}),(0,a.jsx)(n.th,{children:"Query"}),(0,a.jsx)(n.th,{children:"Description"})]})}),(0,a.jsx)(n.tbody,{children:(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:"Neuroweb Knowledge Asset"}),(0,a.jsx)(n.td,{children:(0,a.jsx)(n.a,{href:"https://dune.com/queries/3695045",children:"query_3695045"})}),(0,a.jsx)(n.td,{children:"Find all transfer records of knowledge assets on Neuroweb"})]})})]}),"\n",(0,a.jsx)(n.h2,{id:"getting-started-with-queries",children:"Getting Started with Queries"}),"\n",(0,a.jsx)(n.p,{children:"To get started with querying data from Unique, you are welcome to use the mentioned materialized\nqueries. You can use the following DuneSQL queries as examples:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-sql",metastring:'title="Neuroweb Knowledge Asset Distribution" showLineNumbers',children:"SELECT DISTINCT\n get_href(\n 'https://dkg.origintrail.io/profile?wallet=' || CAST(To AS VARCHAR),\n CONCAT(\n SUBSTR(To, 1, 4),\n '...',\n SUBSTR(To, LENGTH(To) - 3)\n )\n ) AS Holder_URL,\n CONCAT(\n SUBSTR(To, 1, 4),\n '...',\n SUBSTR(To, LENGTH(To) - 3)\n ) AS Holder,\n COUNT(\"Token ID\") AS \"# of Tokens\"\nFROM\n query_3695045\nGROUP BY\n To\nORDER BY\n \"# of Tokens\" DESC;\n"})}),"\n",(0,a.jsx)(n.p,{children:"Query result:"}),"\n",(0,a.jsx)("iframe",{src:"https://dune.com/embeds/3696553/6219067",height:"350",width:"100%"}),"\n",(0,a.jsx)(n.admonition,{title:"DuneSQL Referece",type:"info",children:(0,a.jsxs)(n.p,{children:["For more information on DuneSQL, please refer to the ",(0,a.jsx)(n.a,{href:"/docs/general/dunesql-cheatsheet",children:"DuneSQL Cheatsheet"}),"\nand\n",(0,a.jsx)(n.a,{href:"https://docs.dune.com/query-engine/Functions-and-operators/index",children:"DuneSQL Official Documentation"}),"."]})})]})}function h(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(c,{...e})}):c(e)}},28453:(e,n,r)=>{r.d(n,{R:()=>t,x:()=>d});var s=r(96540);const a={},o=s.createContext(a);function t(e){const n=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:t(e.components),s.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/7c138549.68a78c71.js b/assets/js/7c138549.68a78c71.js deleted file mode 100644 index 4e76392ffcb3..000000000000 --- a/assets/js/7c138549.68a78c71.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7473],{76173:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>i,contentTitle:()=>d,default:()=>c,frontMatter:()=>o,metadata:()=>t,toc:()=>l});var s=r(74848),a=r(28453);const o={id:"neuroweb-dashboards",title:"Neuroweb Dashboards",sidebar_label:"Neuroweb",description:"Neuroweb is a decentralized AI blockchain that rewards knowledge creation and sharing.",keywords:["polkadot","dashboard","dune","neuroweb","DKG","OTP","knowledgeasset"],slug:"../neuroweb-dashboards"},d="Neuroweb Dashboards",t={id:"general/dune-analytics/parachain-dashboards/neuroweb-dashboards",title:"Neuroweb Dashboards",description:"Neuroweb is a decentralized AI blockchain that rewards knowledge creation and sharing.",source:"@site/../docs/general/dune-analytics/parachain-dashboards/neuroweb-dashboards.md",sourceDirName:"general/dune-analytics/parachain-dashboards",slug:"/general/dune-analytics/neuroweb-dashboards",permalink:"/docs/general/dune-analytics/neuroweb-dashboards",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/parachain-dashboards/neuroweb-dashboards.md",tags:[],version:"current",lastUpdatedBy:"MK",lastUpdatedAt:1719215716e3,frontMatter:{id:"neuroweb-dashboards",title:"Neuroweb Dashboards",sidebar_label:"Neuroweb",description:"Neuroweb is a decentralized AI blockchain that rewards knowledge creation and sharing.",keywords:["polkadot","dashboard","dune","neuroweb","DKG","OTP","knowledgeasset"],slug:"../neuroweb-dashboards"},sidebar:"docs",previous:{title:"Moonbeam",permalink:"/docs/general/dune-analytics/moonbeam-dashboards"},next:{title:"Nodle",permalink:"/docs/general/dune-analytics/nodle-dashboards"}},i={},l=[{value:"Overview",id:"overview",level:2},{value:"Featured Dashboards on Dune",id:"featured-dashboards-on-dune",level:2},{value:"Key Tables",id:"key-tables",level:2},{value:"Useful Queries",id:"useful-queries",level:2},{value:"Getting Started with Queries",id:"getting-started-with-queries",level:2}];function h(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,a.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"neuroweb-dashboards",children:"Neuroweb Dashboards"})}),"\n",(0,s.jsx)(n.h2,{id:"overview",children:"Overview"}),"\n",(0,s.jsx)(n.p,{children:"NeuroWeb is a decentralized AI blockchain that rewards knowledge creation and sharing. Its NEURO\ntoken supports the AI economy by incentivizing contributions to the OriginTrail Decentralized\nKnowledge Graph (DKG). NeuroWeb builds upon the groundwork established by its predecessor, the\nOriginTrail Parachain (OTP). This transformation into NeuroWeb was facilitated through a community\ngovernance vote on OTP in December 2023."}),"\n",(0,s.jsx)(n.h2,{id:"featured-dashboards-on-dune",children:"Featured Dashboards on Dune"}),"\n",(0,s.jsx)(n.p,{children:"Here you will find a variety of dashboards that help visualize data from the Neuroweb parachain:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"https://dune.com/substrate/neuroweb",children:"Neuroweb"}),": A comprehensive analysis of NeuroWeb, including:\nDKG, knowledge asset, asset, and XCM analysis."]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"key-tables",children:"Key Tables"}),"\n",(0,s.jsx)(n.p,{children:"Data from the NeuroWeb parachain is organized into several key tables:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"neuroweb.balances"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"neuroweb.blocks"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"neuroweb.calls"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"neuroweb.events"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"neuroweb.extrinsics"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"neuroweb.transfers"})}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["Start building your own queries using granular data on Dune\n",(0,s.jsx)(n.a,{href:"https://dune.com/queries?category=canonical&namespace=neuroweb",children:"here"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"useful-queries",children:"Useful Queries"}),"\n",(0,s.jsx)(n.p,{children:"Some useful queries for Neuroweb are provided:"}),"\n",(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Title"}),(0,s.jsx)(n.th,{children:"Query"}),(0,s.jsx)(n.th,{children:"Description"})]})}),(0,s.jsx)(n.tbody,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Neuroweb Knowledge Asset"}),(0,s.jsx)(n.td,{children:(0,s.jsx)(n.a,{href:"https://dune.com/queries/3695045",children:"query_3695045"})}),(0,s.jsx)(n.td,{children:"Find all transfer records of knowledge assets on Neuroweb"})]})})]}),"\n",(0,s.jsx)(n.h2,{id:"getting-started-with-queries",children:"Getting Started with Queries"}),"\n",(0,s.jsx)(n.p,{children:"To get started with querying data from Unique, you are welcome to use the mentioned materialized\nqueries. You can use the following DuneSQL queries as examples:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-sql",metastring:'title="Neuroweb Knowledge Asset Distribution" showLineNumbers',children:"SELECT DISTINCT\n get_href(\n 'https://dkg.origintrail.io/profile?wallet=' || CAST(To AS VARCHAR),\n CONCAT(\n SUBSTR(To, 1, 4),\n '...',\n SUBSTR(To, LENGTH(To) - 3)\n )\n ) AS Holder_URL,\n CONCAT(\n SUBSTR(To, 1, 4),\n '...',\n SUBSTR(To, LENGTH(To) - 3)\n ) AS Holder,\n COUNT(\"Token ID\") AS \"# of Tokens\"\nFROM\n query_3695045\nGROUP BY\n To\nORDER BY\n \"# of Tokens\" DESC;\n"})}),"\n",(0,s.jsx)(n.p,{children:"Query result:"}),"\n",(0,s.jsx)("iframe",{src:"https://dune.com/embeds/3696553/6219067",height:"350",width:"100%"}),"\n",(0,s.jsx)(n.admonition,{title:"DuneSQL Referece",type:"info",children:(0,s.jsxs)(n.p,{children:["For more information on DuneSQL, please refer to the ",(0,s.jsx)(n.a,{href:"/docs/general/dunesql-cheatsheet",children:"DuneSQL Cheatsheet"}),"\nand\n",(0,s.jsx)(n.a,{href:"https://docs.dune.com/query-engine/Functions-and-operators/index",children:"DuneSQL Official Documentation"}),"."]})})]})}function c(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}},28453:(e,n,r)=>{r.d(n,{R:()=>d,x:()=>t});var s=r(96540);const a={},o=s.createContext(a);function d(e){const n=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function t(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:d(e.components),s.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/7dcec981.f1cb5bd3.js b/assets/js/7dcec981.f1cb5bd3.js deleted file mode 100644 index bfdf63d818e8..000000000000 --- a/assets/js/7dcec981.f1cb5bd3.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4271],{11714:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>d,contentTitle:()=>o,default:()=>p,frontMatter:()=>l,metadata:()=>c,toc:()=>u});var n=a(74848),r=a(28453),i=a(11470),s=a(19365);const l={id:"build-client-side",title:"Building Client-side Apps",sidebar_label:"Building Client-side Apps",description:"An overview about building clients that use Polkadot",keywords:["data","index","query","explorer","dashboard","dapp","uapp","app","frontend","client"],slug:"../build-client-side"},o=void 0,c={id:"build/build-client-side",title:"Building Client-side Apps",description:"An overview about building clients that use Polkadot",source:"@site/../docs/build/build-client-side.md",sourceDirName:"build",slug:"/build-client-side",permalink:"/docs/build-client-side",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/build/build-client-side.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1727178265e3,frontMatter:{id:"build-client-side",title:"Building Client-side Apps",sidebar_label:"Building Client-side Apps",description:"An overview about building clients that use Polkadot",keywords:["data","index","query","explorer","dashboard","dapp","uapp","app","frontend","client"],slug:"../build-client-side"},sidebar:"docs",previous:{title:"Client-side Development",permalink:"/docs/build-client-index"},next:{title:"Using Light Clients",permalink:"/docs/build-light-clients"}},d={},u=[{value:"SDKS & Libraries",id:"sdks--libraries",level:2},{value:"Frameworks & Toolkits",id:"frameworks--toolkits",level:2},{value:"Oracle Options",id:"oracle-options",level:2},{value:"Decentralized Storage Options",id:"decentralized-storage-options",level:2},{value:"DCS (Decentralized Cloud Storage)",id:"dcs-decentralized-cloud-storage",level:2}];function h(e){const t={a:"a",admonition:"admonition",em:"em",h2:"h2",p:"p",strong:"strong",...(0,r.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.p,{children:"As with any blockchain, building decentralized applications (dApps) is a significant part of how a\ndeveloper can build on Polkadot."}),"\n",(0,n.jsx)(t.p,{children:"As an application developer, you can compose your front-end apps in a few different ways. Because\nthe relay chain and its parachains are all built using the Polkadot SDK. You can often use the same\nSDK to communicate with the relay chain, a parachain, or any other Substrate-based chain."}),"\n",(0,n.jsx)(t.admonition,{title:"Substrate-based chains use an SS58 encoding for their address formats.",type:"note",children:(0,n.jsxs)(t.p,{children:["Please see the ",(0,n.jsx)(t.a,{href:"https://github.com/paritytech/ss58-registry/",children:"SS58 registry"})," to see which\n",(0,n.jsx)(t.a,{href:"https://github.com/paritytech/ss58-registry/blob/main/ss58-registry.json",children:"chain corresponds to a given prefix"}),",\nand which prefixes are available."]})}),"\n",(0,n.jsx)(t.h2,{id:"sdks--libraries",children:"SDKS & Libraries"}),"\n",(0,n.jsxs)(t.p,{children:["If one aims to develop a ",(0,n.jsx)(t.strong,{children:"dApp"})," (Decentralized App), the Polkadot ecosystem contains various SDKs\nto tap into the relay chain and parachains. There are several languages already supported -\n",(0,n.jsx)(t.a,{href:"/docs/build-tools-index",children:"see the tooling page for a detailed overview of different SDKs and libraries that are available."})]}),"\n",(0,n.jsx)(t.h2,{id:"frameworks--toolkits",children:"Frameworks & Toolkits"}),"\n",(0,n.jsx)(t.p,{children:"For front-end applications, several options exist for interfacing with Substrate-based chains\n(parachains, relay chains, etc.) and smart contracts. These will often interact with the RPC of a\nSubstrate node:"}),"\n",(0,n.jsxs)(i.A,{groupId:"clients",values:[{label:"Polkadot.js",value:"pjs"},{label:"Polkadot-API",value:"papi"},{label:"Reactive DOT",value:"reactive-dot"},{label:"Subxt",value:"subxt"},{label:"React Hooks for ink!",value:"useink"},{label:"ink!athon Boilerplate",value:"inkathon"},{label:"Polkadot Cloud",value:"pcloud"}],children:[(0,n.jsx)(s.A,{value:"pjs",children:(0,n.jsxs)(t.p,{children:["Promise and RxJS APIs around Polkadot, Kusama, and other Substrate-based chains via RPC calls. It is\ndynamically generated based on what the Substrate runtime provides regarding metadata. Full\ndocumentation & examples\navailable\xa0",(0,n.jsx)("a",{href:"https://polkadot.js.org/docs",target:"_blank",children:"here"}),"."]})}),(0,n.jsx)(s.A,{value:"papi",children:(0,n.jsxs)(t.p,{children:["Polkadot-API will serve as a replacement for Polkadot JS. Full documentation & examples\navailable\xa0",(0,n.jsx)("a",{href:"https://papi.how/",target:"_blank",children:"here"}),"."]})}),(0,n.jsx)(s.A,{value:"reactive-dot",children:(0,n.jsxs)(t.p,{children:["A reactive library for building Substrate front-ends. Full documentation & examples\navailable\xa0",(0,n.jsx)("a",{href:"https://reactivedot.dev/",target:"_blank",children:"here"}),"."]})}),(0,n.jsx)(s.A,{value:"subxt",children:(0,n.jsxs)(t.p,{children:["Query and submit extrinsics (transactions) to a Substrate node via RPC using Rust. Also referred to\nas Rust Parity. Full documentation & examples\navailable\xa0",(0,n.jsx)("a",{href:"https://github.com/paritytech/subxt",target:"_blank",children:"here"}),"."]})}),(0,n.jsx)(s.A,{value:"useink",children:(0,n.jsxs)(t.p,{children:["React hooks library for ink! smart contracts that abstract the functionality of polkadot.js. Full\ndocumentation & examples available\xa0",(0,n.jsx)("a",{href:"https://use.ink",target:"_blank",children:"here"}),"."]})}),(0,n.jsx)(s.A,{value:"inkathon",children:(0,n.jsxs)(t.p,{children:["ink!athon is a starter kit for full-stack dApp development with ink! smart contracts and a\nReact-based frontend in one place. With convenient helper scripts and a pre-configured project\nsetup, you can quickly scaffold any dApp. Live example & full documentation\navailable\xa0",(0,n.jsx)("a",{href:"https://inkathon.xyz",target:"_blank",children:"here"}),"."]})}),(0,n.jsx)(s.A,{value:"pcloud",children:(0,n.jsxs)(t.p,{children:["Polkadot Cloud hosts a library of assets, ranging from data sources, graphical elements, to fully\nfunctional components, for app developers to plug and play into their codebases.\n\xa0",(0,n.jsx)("a",{href:"https://polkadot.cloud/",target:"_blank",children:"Learn more here"}),"."]})})]}),"\n",(0,n.jsx)(t.h2,{id:"oracle-options",children:"Oracle Options"}),"\n",(0,n.jsxs)(t.p,{children:["In the blockchain context, an ",(0,n.jsx)(t.em,{children:"oracle"})," is a way to bring real-world data onto the blockchain so that\nit can be used by a decentralized application."]}),"\n",(0,n.jsx)(t.p,{children:"Oracles serve many purposes for application builder, as they allow for outside data (price feeds,\nthe ability to make HTTP requests, etc) to enter the decentralized world."}),"\n",(0,n.jsxs)(t.p,{children:["Oracle solutions range from centralized and trusted to decentralized and game-theory based. On the\ncentralized end of the spectrum, an oracle could be a single account that has the authority to\ndictate the real-world data on-chain. On the decentralized end, a\n",(0,n.jsx)(t.a,{href:"https://blog.ethereum.org/2014/03/28/schellingcoin-a-minimal-trust-universal-data-feed/",children:'complex game of "chicken"'}),"\ncan be played among various staked actors who risk getting ",(0,n.jsx)(t.a,{href:"/docs/learn-offenses",children:"slashed"})," if\nthey don't submit the same data as everyone else."]}),"\n",(0,n.jsxs)(i.A,{groupId:"clients",values:[{label:"Chainlink",value:"chainlink"},{label:"Acurast",value:"acurast"}],children:[(0,n.jsx)(s.A,{value:"chainlink",children:(0,n.jsxs)(t.p,{children:["Solutions such as\n",(0,n.jsx)("a",{href:"https://polkadot.network/chainlink-reaches-milestone-with-polkadot/",target:"_blank",rel:"noopener noreferrer",children:"Chainlink"}),"\nfit somewhere in the middle, where the amount of trust you put into the reporting oracles can be\nadjusted based on your preferences. A Chainlink\n",(0,n.jsx)("a",{href:"https://github.com/smartcontractkit/chainlink-polkadot/blob/master/pallet-chainlink-feed/README.md",target:"_blank",rel:"noopener noreferrer",children:"Feed\nPallet"})," is available to allow smart contracts across smart contract-enabled parachains to access\nprice reference data and is available as a Substrate oracle pallet."]})}),(0,n.jsx)(s.A,{value:"acurast",children:(0,n.jsxs)(t.p,{children:["Solutions such as ",(0,n.jsx)("a",{href:"https://acurast.com",target:"_blank",children:"Acurast"})," enables developers to\ndelegate oracle requests to their network of phones, which provide off-chain data and computation to\nthe ",(0,n.jsx)("a",{href:"https://docs.acurast.com/integrations/substrate",target:"_blank",children:"Acurast Pallet"}),".\nAcurast supports both Substrate (WASM) and EVM environments."]})})]}),"\n",(0,n.jsx)(t.p,{children:"When using an oracle in your application you should be aware of the benefits and risks that are\nbaked into its specific model."}),"\n",(0,n.jsx)(t.h2,{id:"decentralized-storage-options",children:"Decentralized Storage Options"}),"\n",(0,n.jsx)(t.p,{children:"Storage is an integral part of modern computer systems, and the same is true for distributed and\ndecentralized systems like a blockchain. When interacting with the Polkadot ecosystem, it will be\nhelpful if you familiarize yourself with the current Web3 approach towards decentralized storage."}),"\n",(0,n.jsx)(t.h2,{id:"dcs-decentralized-cloud-storage",children:"DCS (Decentralized Cloud Storage)"}),"\n",(0,n.jsxs)(t.p,{children:["The key attribute that characterizes centralized cloud storage is the location of data. In\ndecentralized cloud storage, the key attribute becomes the data itself instead of the data's\nlocation. This can be viewed as the shift from the centralized ",(0,n.jsx)(t.em,{children:"location-centric"})," storage approach\nto the decentralized ",(0,n.jsx)(t.em,{children:"content-centric"})," approach."]}),"\n",(0,n.jsxs)(i.A,{groupId:"clients",values:[{label:"IPFS (Interplanetary File System)",value:"ipfs"},{label:"Crust Storage",value:"crust"},{label:"Filebase",value:"filebase"}],children:[(0,n.jsx)(s.A,{value:"ipfs",children:(0,n.jsxs)(t.p,{children:[(0,n.jsx)(t.a,{href:"https://ipfs.io/",children:"IPFS"})," is a peer-to-peer distributed file system that seeks to connect all\ncomputing devices with the same system of files, by utilizing features such as content-addressing,\ncontent-signing, and enhanced security methods through encryption. IPFS aims to address the current\nhurdles of the HTTP-based Internet."]})}),(0,n.jsxs)(s.A,{value:"crust",children:[(0,n.jsxs)(t.p,{children:[(0,n.jsx)(t.a,{href:"https://crust.network",children:"Crust Network"})," provides a Web3.0 decentralized storage network for the\nMetaverse. It is designed to realize core values of decentralization, privacy, and assurance. Crust\nsupports multiple storage-layer protocols such as ",(0,n.jsx)(t.a,{href:"#ipfs-interplanetary-file-system",children:"IPFS"}),", and\nexposes instant accessible on-chain storage functions to users. Crust\u02bcs technical stack is also\ncapable of supporting data manipulating and computing."]}),(0,n.jsxs)(t.p,{children:["Crust provides a native cross-chain communication pallet based on\n",(0,n.jsx)(t.a,{href:"https://wiki.polkadot.network/docs/learn-xcm",children:"XCMP"}),", called\n",(0,n.jsx)(t.a,{href:"https://github.com/crustio/crust/tree/parachain/shadow/crust-collator/pallets/xstorage",children:"xStorage"}),"."]}),(0,n.jsxs)(t.p,{children:["The protocol also supports most smart contract platforms, including Ethereum, with its\n",(0,n.jsx)(t.a,{href:"https://wiki.crust.network/docs/en/buildCrossChainSolution",children:"cross-chain dStorage solution"}),"."]}),(0,n.jsxs)(t.p,{children:["To learn more about Crust, check out the ",(0,n.jsx)(t.a,{href:"https://wiki.crust.network/en",children:"Crust Network Wiki"}),". Try\nintegrating with Crust by following their\n",(0,n.jsx)(t.a,{href:"https://wiki.crust.network/docs/en/build101",children:"Crust Storage 101"})," guide."]})]}),(0,n.jsxs)(s.A,{value:"filebase",children:[(0,n.jsxs)(t.p,{children:[(0,n.jsx)(t.a,{href:"https://filebase.com",children:"Filebase"})," is the first S3-compatible object storage platform that allows you\nto store data in a secure, redundant, and performant manner across multiple decentralized storage\nnetworks."]}),(0,n.jsx)(t.p,{children:"Filebase offers a geo-redundant IPFS pinning service that allows you to pin files to IPFS across\nmultiple diverse geographic locations. All files uploaded to IPFS through Filebase are automatically\npinned to the Filebase infrastructure with 3x replication across the globe. This ensures that your\ndata is globally available and redundant at all times."}),(0,n.jsx)(t.p,{children:"Filebase acts as an easy on-ramp to IPFS and decentralized storage by offering a user-friendly web\nconsole dashboard, making drag-and-dropping files onto Web3 simple and easy. Filebase also provides\nan S3-compatible API for widespread integrations and configurations in current workflows."}),(0,n.jsxs)(t.p,{children:["To learn more about Filebase, check out the ",(0,n.jsx)(t.a,{href:"https://docs.filebase.com",children:"Filebase Documentation"}),", and\nspecifically the documentation on\n",(0,n.jsx)(t.a,{href:"https://docs.filebase.com/web3-education/web3-tutorials/polkadot/polkadot-deploy-a-polkadot-dapp-on-decentralized-storage",children:"deploying Polkadot dApp on decentralized storage."}),"\nYou can get started with Filebase by signing up ",(0,n.jsx)(t.a,{href:"https://filebase.com/signup",children:"here."})]})]})]})]})}function p(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(h,{...e})}):h(e)}},19365:(e,t,a)=>{a.d(t,{A:()=>s});a(96540);var n=a(34164);const r={tabItem:"tabItem_Ymn6"};var i=a(74848);function s(e){var t=e.children,a=e.hidden,s=e.className;return(0,i.jsx)("div",{role:"tabpanel",className:(0,n.A)(r.tabItem,s),hidden:a,children:t})}},11470:(e,t,a)=>{a.d(t,{A:()=>j});var n=a(96540),r=a(34164),i=a(23104),s=a(56347),l=a(205),o=a(57485),c=a(31682),d=a(75376);function u(e){var t,a;return null!=(t=null==(a=n.Children.toArray(e).filter((function(e){return"\n"!==e})).map((function(e){if(!e||(0,n.isValidElement)(e)&&((t=e.props)&&"object"==typeof t&&"value"in t))return e;var t;throw new Error("Docusaurus error: Bad child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:a.filter(Boolean))?t:[]}function h(e){var t=e.values,a=e.children;return(0,n.useMemo)((function(){var e=null!=t?t:function(e){return u(e).map((function(e){var t=e.props;return{value:t.value,label:t.label,attributes:t.attributes,default:t.default}}))}(a);return function(e){var t=(0,c.XI)(e,(function(e,t){return e.value===t.value}));if(t.length>0)throw new Error('Docusaurus error: Duplicate values "'+t.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[t,a])}function p(e){var t=e.value;return e.tabValues.some((function(e){return e.value===t}))}function b(e){var t=e.queryString,a=void 0!==t&&t,r=e.groupId,i=(0,s.W6)(),l=function(e){var t=e.queryString,a=void 0!==t&&t,n=e.groupId;if("string"==typeof a)return a;if(!1===a)return null;if(!0===a&&!n)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=n?n:null}({queryString:a,groupId:r});return[(0,o.aZ)(l),(0,n.useCallback)((function(e){if(l){var t=new URLSearchParams(i.location.search);t.set(l,e),i.replace(Object.assign({},i.location,{search:t.toString()}))}}),[l,i])]}function f(e){var t,a,r,i,s=e.defaultValue,o=e.queryString,c=void 0!==o&&o,u=e.groupId,f=h(e),m=(0,n.useState)((function(){return function(e){var t,a=e.defaultValue,n=e.tabValues;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(a){if(!p({value:a,tabValues:n}))throw new Error('Docusaurus error: The has a defaultValue "'+a+'" but none of its children has the corresponding value. Available values are: '+n.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return a}var r=null!=(t=n.find((function(e){return e.default})))?t:n[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:s,tabValues:f})})),v=m[0],g=m[1],x=b({queryString:c,groupId:u}),k=x[0],y=x[1],j=(t=function(e){return e?"docusaurus.tab."+e:null}({groupId:u}.groupId),a=(0,d.Dv)(t),r=a[0],i=a[1],[r,(0,n.useCallback)((function(e){t&&i.set(e)}),[t,i])]),w=j[0],S=j[1],A=function(){var e=null!=k?k:w;return p({value:e,tabValues:f})?e:null}();return(0,l.A)((function(){A&&g(A)}),[A]),{selectedValue:v,selectValue:(0,n.useCallback)((function(e){if(!p({value:e,tabValues:f}))throw new Error("Can't select invalid tab value="+e);g(e),y(e),S(e)}),[y,S,f]),tabValues:f}}var m=a(92303);const v={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var g=a(74848);function x(e){var t=e.className,a=e.block,n=e.selectedValue,s=e.selectValue,l=e.tabValues,o=[],c=(0,i.a_)().blockElementScrollPositionUntilNextRender,d=function(e){var t=e.currentTarget,a=o.indexOf(t),r=l[a].value;r!==n&&(c(t),s(r))},u=function(e){var t,a=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":var n,r=o.indexOf(e.currentTarget)+1;a=null!=(n=o[r])?n:o[0];break;case"ArrowLeft":var i,s=o.indexOf(e.currentTarget)-1;a=null!=(i=o[s])?i:o[o.length-1]}null==(t=a)||t.focus()};return(0,g.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,r.A)("tabs",{"tabs--block":a},t),children:l.map((function(e){var t=e.value,a=e.label,i=e.attributes;return(0,g.jsx)("li",Object.assign({role:"tab",tabIndex:n===t?0:-1,"aria-selected":n===t,ref:function(e){return o.push(e)},onKeyDown:u,onClick:d},i,{className:(0,r.A)("tabs__item",v.tabItem,null==i?void 0:i.className,{"tabs__item--active":n===t}),children:null!=a?a:t}),t)}))})}function k(e){var t=e.lazy,a=e.children,i=e.selectedValue,s=(Array.isArray(a)?a:[a]).filter(Boolean);if(t){var l=s.find((function(e){return e.props.value===i}));return l?(0,n.cloneElement)(l,{className:(0,r.A)("margin-top--md",l.props.className)}):null}return(0,g.jsx)("div",{className:"margin-top--md",children:s.map((function(e,t){return(0,n.cloneElement)(e,{key:t,hidden:e.props.value!==i})}))})}function y(e){var t=f(e);return(0,g.jsxs)("div",{className:(0,r.A)("tabs-container",v.tabList),children:[(0,g.jsx)(x,Object.assign({},t,e)),(0,g.jsx)(k,Object.assign({},t,e))]})}function j(e){var t=(0,m.A)();return(0,g.jsx)(y,Object.assign({},e,{children:u(e.children)}),String(t))}},28453:(e,t,a)=>{a.d(t,{R:()=>s,x:()=>l});var n=a(96540);const r={},i=n.createContext(r);function s(e){const t=n.useContext(i);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function l(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:s(e.components),n.createElement(i.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/7dcec981.f66a630d.js b/assets/js/7dcec981.f66a630d.js new file mode 100644 index 000000000000..022e06c082d7 --- /dev/null +++ b/assets/js/7dcec981.f66a630d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4271],{37304:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>d,contentTitle:()=>c,default:()=>p,frontMatter:()=>o,metadata:()=>n,toc:()=>u});const n=JSON.parse('{"id":"build/build-client-side","title":"Building Client-side Apps","description":"An overview about building clients that use Polkadot","source":"@site/../docs/build/build-client-side.md","sourceDirName":"build","slug":"/build-client-side","permalink":"/docs/build-client-side","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/build/build-client-side.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1727178265000,"frontMatter":{"id":"build-client-side","title":"Building Client-side Apps","sidebar_label":"Building Client-side Apps","description":"An overview about building clients that use Polkadot","keywords":["data","index","query","explorer","dashboard","dapp","uapp","app","frontend","client"],"slug":"../build-client-side"},"sidebar":"docs","previous":{"title":"Client-side Development","permalink":"/docs/build-client-index"},"next":{"title":"Using Light Clients","permalink":"/docs/build-light-clients"}}');var r=a(74848),s=a(28453),i=a(11470),l=a(19365);const o={id:"build-client-side",title:"Building Client-side Apps",sidebar_label:"Building Client-side Apps",description:"An overview about building clients that use Polkadot",keywords:["data","index","query","explorer","dashboard","dapp","uapp","app","frontend","client"],slug:"../build-client-side"},c=void 0,d={},u=[{value:"SDKS & Libraries",id:"sdks--libraries",level:2},{value:"Frameworks & Toolkits",id:"frameworks--toolkits",level:2},{value:"Oracle Options",id:"oracle-options",level:2},{value:"Decentralized Storage Options",id:"decentralized-storage-options",level:2},{value:"DCS (Decentralized Cloud Storage)",id:"dcs-decentralized-cloud-storage",level:2}];function h(e){const t={a:"a",admonition:"admonition",em:"em",h2:"h2",p:"p",strong:"strong",...(0,s.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.p,{children:"As with any blockchain, building decentralized applications (dApps) is a significant part of how a\ndeveloper can build on Polkadot."}),"\n",(0,r.jsx)(t.p,{children:"As an application developer, you can compose your front-end apps in a few different ways. Because\nthe relay chain and its parachains are all built using the Polkadot SDK. You can often use the same\nSDK to communicate with the relay chain, a parachain, or any other Substrate-based chain."}),"\n",(0,r.jsx)(t.admonition,{title:"Substrate-based chains use an SS58 encoding for their address formats.",type:"note",children:(0,r.jsxs)(t.p,{children:["Please see the ",(0,r.jsx)(t.a,{href:"https://github.com/paritytech/ss58-registry/",children:"SS58 registry"})," to see which\n",(0,r.jsx)(t.a,{href:"https://github.com/paritytech/ss58-registry/blob/main/ss58-registry.json",children:"chain corresponds to a given prefix"}),",\nand which prefixes are available."]})}),"\n",(0,r.jsx)(t.h2,{id:"sdks--libraries",children:"SDKS & Libraries"}),"\n",(0,r.jsxs)(t.p,{children:["If one aims to develop a ",(0,r.jsx)(t.strong,{children:"dApp"})," (Decentralized App), the Polkadot ecosystem contains various SDKs\nto tap into the relay chain and parachains. There are several languages already supported -\n",(0,r.jsx)(t.a,{href:"/docs/build-tools-index",children:"see the tooling page for a detailed overview of different SDKs and libraries that are available."})]}),"\n",(0,r.jsx)(t.h2,{id:"frameworks--toolkits",children:"Frameworks & Toolkits"}),"\n",(0,r.jsx)(t.p,{children:"For front-end applications, several options exist for interfacing with Substrate-based chains\n(parachains, relay chains, etc.) and smart contracts. These will often interact with the RPC of a\nSubstrate node:"}),"\n",(0,r.jsxs)(i.A,{groupId:"clients",values:[{label:"Polkadot.js",value:"pjs"},{label:"Polkadot-API",value:"papi"},{label:"Reactive DOT",value:"reactive-dot"},{label:"Subxt",value:"subxt"},{label:"React Hooks for ink!",value:"useink"},{label:"ink!athon Boilerplate",value:"inkathon"},{label:"Polkadot Cloud",value:"pcloud"}],children:[(0,r.jsx)(l.A,{value:"pjs",children:(0,r.jsxs)(t.p,{children:["Promise and RxJS APIs around Polkadot, Kusama, and other Substrate-based chains via RPC calls. It is\ndynamically generated based on what the Substrate runtime provides regarding metadata. Full\ndocumentation & examples\navailable\xa0",(0,r.jsx)("a",{href:"https://polkadot.js.org/docs",target:"_blank",children:"here"}),"."]})}),(0,r.jsx)(l.A,{value:"papi",children:(0,r.jsxs)(t.p,{children:["Polkadot-API will serve as a replacement for Polkadot JS. Full documentation & examples\navailable\xa0",(0,r.jsx)("a",{href:"https://papi.how/",target:"_blank",children:"here"}),"."]})}),(0,r.jsx)(l.A,{value:"reactive-dot",children:(0,r.jsxs)(t.p,{children:["A reactive library for building Substrate front-ends. Full documentation & examples\navailable\xa0",(0,r.jsx)("a",{href:"https://reactivedot.dev/",target:"_blank",children:"here"}),"."]})}),(0,r.jsx)(l.A,{value:"subxt",children:(0,r.jsxs)(t.p,{children:["Query and submit extrinsics (transactions) to a Substrate node via RPC using Rust. Also referred to\nas Rust Parity. Full documentation & examples\navailable\xa0",(0,r.jsx)("a",{href:"https://github.com/paritytech/subxt",target:"_blank",children:"here"}),"."]})}),(0,r.jsx)(l.A,{value:"useink",children:(0,r.jsxs)(t.p,{children:["React hooks library for ink! smart contracts that abstract the functionality of polkadot.js. Full\ndocumentation & examples available\xa0",(0,r.jsx)("a",{href:"https://use.ink",target:"_blank",children:"here"}),"."]})}),(0,r.jsx)(l.A,{value:"inkathon",children:(0,r.jsxs)(t.p,{children:["ink!athon is a starter kit for full-stack dApp development with ink! smart contracts and a\nReact-based frontend in one place. With convenient helper scripts and a pre-configured project\nsetup, you can quickly scaffold any dApp. Live example & full documentation\navailable\xa0",(0,r.jsx)("a",{href:"https://inkathon.xyz",target:"_blank",children:"here"}),"."]})}),(0,r.jsx)(l.A,{value:"pcloud",children:(0,r.jsxs)(t.p,{children:["Polkadot Cloud hosts a library of assets, ranging from data sources, graphical elements, to fully\nfunctional components, for app developers to plug and play into their codebases.\n\xa0",(0,r.jsx)("a",{href:"https://polkadot.cloud/",target:"_blank",children:"Learn more here"}),"."]})})]}),"\n",(0,r.jsx)(t.h2,{id:"oracle-options",children:"Oracle Options"}),"\n",(0,r.jsxs)(t.p,{children:["In the blockchain context, an ",(0,r.jsx)(t.em,{children:"oracle"})," is a way to bring real-world data onto the blockchain so that\nit can be used by a decentralized application."]}),"\n",(0,r.jsx)(t.p,{children:"Oracles serve many purposes for application builder, as they allow for outside data (price feeds,\nthe ability to make HTTP requests, etc) to enter the decentralized world."}),"\n",(0,r.jsxs)(t.p,{children:["Oracle solutions range from centralized and trusted to decentralized and game-theory based. On the\ncentralized end of the spectrum, an oracle could be a single account that has the authority to\ndictate the real-world data on-chain. On the decentralized end, a\n",(0,r.jsx)(t.a,{href:"https://blog.ethereum.org/2014/03/28/schellingcoin-a-minimal-trust-universal-data-feed/",children:'complex game of "chicken"'}),"\ncan be played among various staked actors who risk getting ",(0,r.jsx)(t.a,{href:"/docs/learn-offenses",children:"slashed"})," if\nthey don't submit the same data as everyone else."]}),"\n",(0,r.jsxs)(i.A,{groupId:"clients",values:[{label:"Chainlink",value:"chainlink"},{label:"Acurast",value:"acurast"}],children:[(0,r.jsx)(l.A,{value:"chainlink",children:(0,r.jsxs)(t.p,{children:["Solutions such as\n",(0,r.jsx)("a",{href:"https://polkadot.network/chainlink-reaches-milestone-with-polkadot/",target:"_blank",rel:"noopener noreferrer",children:"Chainlink"}),"\nfit somewhere in the middle, where the amount of trust you put into the reporting oracles can be\nadjusted based on your preferences. A Chainlink\n",(0,r.jsx)("a",{href:"https://github.com/smartcontractkit/chainlink-polkadot/blob/master/pallet-chainlink-feed/README.md",target:"_blank",rel:"noopener noreferrer",children:"Feed\nPallet"})," is available to allow smart contracts across smart contract-enabled parachains to access\nprice reference data and is available as a Substrate oracle pallet."]})}),(0,r.jsx)(l.A,{value:"acurast",children:(0,r.jsxs)(t.p,{children:["Solutions such as ",(0,r.jsx)("a",{href:"https://acurast.com",target:"_blank",children:"Acurast"})," enables developers to\ndelegate oracle requests to their network of phones, which provide off-chain data and computation to\nthe ",(0,r.jsx)("a",{href:"https://docs.acurast.com/integrations/substrate",target:"_blank",children:"Acurast Pallet"}),".\nAcurast supports both Substrate (WASM) and EVM environments."]})})]}),"\n",(0,r.jsx)(t.p,{children:"When using an oracle in your application you should be aware of the benefits and risks that are\nbaked into its specific model."}),"\n",(0,r.jsx)(t.h2,{id:"decentralized-storage-options",children:"Decentralized Storage Options"}),"\n",(0,r.jsx)(t.p,{children:"Storage is an integral part of modern computer systems, and the same is true for distributed and\ndecentralized systems like a blockchain. When interacting with the Polkadot ecosystem, it will be\nhelpful if you familiarize yourself with the current Web3 approach towards decentralized storage."}),"\n",(0,r.jsx)(t.h2,{id:"dcs-decentralized-cloud-storage",children:"DCS (Decentralized Cloud Storage)"}),"\n",(0,r.jsxs)(t.p,{children:["The key attribute that characterizes centralized cloud storage is the location of data. In\ndecentralized cloud storage, the key attribute becomes the data itself instead of the data's\nlocation. This can be viewed as the shift from the centralized ",(0,r.jsx)(t.em,{children:"location-centric"})," storage approach\nto the decentralized ",(0,r.jsx)(t.em,{children:"content-centric"})," approach."]}),"\n",(0,r.jsxs)(i.A,{groupId:"clients",values:[{label:"IPFS (Interplanetary File System)",value:"ipfs"},{label:"Crust Storage",value:"crust"},{label:"Filebase",value:"filebase"}],children:[(0,r.jsx)(l.A,{value:"ipfs",children:(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.a,{href:"https://ipfs.io/",children:"IPFS"})," is a peer-to-peer distributed file system that seeks to connect all\ncomputing devices with the same system of files, by utilizing features such as content-addressing,\ncontent-signing, and enhanced security methods through encryption. IPFS aims to address the current\nhurdles of the HTTP-based Internet."]})}),(0,r.jsxs)(l.A,{value:"crust",children:[(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.a,{href:"https://crust.network",children:"Crust Network"})," provides a Web3.0 decentralized storage network for the\nMetaverse. It is designed to realize core values of decentralization, privacy, and assurance. Crust\nsupports multiple storage-layer protocols such as ",(0,r.jsx)(t.a,{href:"#ipfs-interplanetary-file-system",children:"IPFS"}),", and\nexposes instant accessible on-chain storage functions to users. Crust\u02bcs technical stack is also\ncapable of supporting data manipulating and computing."]}),(0,r.jsxs)(t.p,{children:["Crust provides a native cross-chain communication pallet based on\n",(0,r.jsx)(t.a,{href:"https://wiki.polkadot.network/docs/learn-xcm",children:"XCMP"}),", called\n",(0,r.jsx)(t.a,{href:"https://github.com/crustio/crust/tree/parachain/shadow/crust-collator/pallets/xstorage",children:"xStorage"}),"."]}),(0,r.jsxs)(t.p,{children:["The protocol also supports most smart contract platforms, including Ethereum, with its\n",(0,r.jsx)(t.a,{href:"https://wiki.crust.network/docs/en/buildCrossChainSolution",children:"cross-chain dStorage solution"}),"."]}),(0,r.jsxs)(t.p,{children:["To learn more about Crust, check out the ",(0,r.jsx)(t.a,{href:"https://wiki.crust.network/en",children:"Crust Network Wiki"}),". Try\nintegrating with Crust by following their\n",(0,r.jsx)(t.a,{href:"https://wiki.crust.network/docs/en/build101",children:"Crust Storage 101"})," guide."]})]}),(0,r.jsxs)(l.A,{value:"filebase",children:[(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.a,{href:"https://filebase.com",children:"Filebase"})," is the first S3-compatible object storage platform that allows you\nto store data in a secure, redundant, and performant manner across multiple decentralized storage\nnetworks."]}),(0,r.jsx)(t.p,{children:"Filebase offers a geo-redundant IPFS pinning service that allows you to pin files to IPFS across\nmultiple diverse geographic locations. All files uploaded to IPFS through Filebase are automatically\npinned to the Filebase infrastructure with 3x replication across the globe. This ensures that your\ndata is globally available and redundant at all times."}),(0,r.jsx)(t.p,{children:"Filebase acts as an easy on-ramp to IPFS and decentralized storage by offering a user-friendly web\nconsole dashboard, making drag-and-dropping files onto Web3 simple and easy. Filebase also provides\nan S3-compatible API for widespread integrations and configurations in current workflows."}),(0,r.jsxs)(t.p,{children:["To learn more about Filebase, check out the ",(0,r.jsx)(t.a,{href:"https://docs.filebase.com",children:"Filebase Documentation"}),", and\nspecifically the documentation on\n",(0,r.jsx)(t.a,{href:"https://docs.filebase.com/web3-education/web3-tutorials/polkadot/polkadot-deploy-a-polkadot-dapp-on-decentralized-storage",children:"deploying Polkadot dApp on decentralized storage."}),"\nYou can get started with Filebase by signing up ",(0,r.jsx)(t.a,{href:"https://filebase.com/signup",children:"here."})]})]})]})]})}function p(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(h,{...e})}):h(e)}},19365:(e,t,a)=>{a.d(t,{A:()=>i});a(96540);var n=a(34164);const r={tabItem:"tabItem_Ymn6"};var s=a(74848);function i(e){var t=e.children,a=e.hidden,i=e.className;return(0,s.jsx)("div",{role:"tabpanel",className:(0,n.A)(r.tabItem,i),hidden:a,children:t})}},11470:(e,t,a)=>{a.d(t,{A:()=>j});var n=a(96540),r=a(34164),s=a(23104),i=a(56347),l=a(205),o=a(57485),c=a(31682),d=a(75376);function u(e){var t,a;return null!=(t=null==(a=n.Children.toArray(e).filter((function(e){return"\n"!==e})).map((function(e){if(!e||(0,n.isValidElement)(e)&&((t=e.props)&&"object"==typeof t&&"value"in t))return e;var t;throw new Error("Docusaurus error: Bad child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:a.filter(Boolean))?t:[]}function h(e){var t=e.values,a=e.children;return(0,n.useMemo)((function(){var e=null!=t?t:function(e){return u(e).map((function(e){var t=e.props;return{value:t.value,label:t.label,attributes:t.attributes,default:t.default}}))}(a);return function(e){var t=(0,c.XI)(e,(function(e,t){return e.value===t.value}));if(t.length>0)throw new Error('Docusaurus error: Duplicate values "'+t.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[t,a])}function p(e){var t=e.value;return e.tabValues.some((function(e){return e.value===t}))}function b(e){var t=e.queryString,a=void 0!==t&&t,r=e.groupId,s=(0,i.W6)(),l=function(e){var t=e.queryString,a=void 0!==t&&t,n=e.groupId;if("string"==typeof a)return a;if(!1===a)return null;if(!0===a&&!n)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=n?n:null}({queryString:a,groupId:r});return[(0,o.aZ)(l),(0,n.useCallback)((function(e){if(l){var t=new URLSearchParams(s.location.search);t.set(l,e),s.replace(Object.assign({},s.location,{search:t.toString()}))}}),[l,s])]}function f(e){var t,a,r,s,i=e.defaultValue,o=e.queryString,c=void 0!==o&&o,u=e.groupId,f=h(e),m=(0,n.useState)((function(){return function(e){var t,a=e.defaultValue,n=e.tabValues;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(a){if(!p({value:a,tabValues:n}))throw new Error('Docusaurus error: The has a defaultValue "'+a+'" but none of its children has the corresponding value. Available values are: '+n.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return a}var r=null!=(t=n.find((function(e){return e.default})))?t:n[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:i,tabValues:f})})),v=m[0],g=m[1],x=b({queryString:c,groupId:u}),k=x[0],y=x[1],j=(t=function(e){return e?"docusaurus.tab."+e:null}({groupId:u}.groupId),a=(0,d.Dv)(t),r=a[0],s=a[1],[r,(0,n.useCallback)((function(e){t&&s.set(e)}),[t,s])]),w=j[0],S=j[1],A=function(){var e=null!=k?k:w;return p({value:e,tabValues:f})?e:null}();return(0,l.A)((function(){A&&g(A)}),[A]),{selectedValue:v,selectValue:(0,n.useCallback)((function(e){if(!p({value:e,tabValues:f}))throw new Error("Can't select invalid tab value="+e);g(e),y(e),S(e)}),[y,S,f]),tabValues:f}}var m=a(92303);const v={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var g=a(74848);function x(e){var t=e.className,a=e.block,n=e.selectedValue,i=e.selectValue,l=e.tabValues,o=[],c=(0,s.a_)().blockElementScrollPositionUntilNextRender,d=function(e){var t=e.currentTarget,a=o.indexOf(t),r=l[a].value;r!==n&&(c(t),i(r))},u=function(e){var t,a=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":var n,r=o.indexOf(e.currentTarget)+1;a=null!=(n=o[r])?n:o[0];break;case"ArrowLeft":var s,i=o.indexOf(e.currentTarget)-1;a=null!=(s=o[i])?s:o[o.length-1]}null==(t=a)||t.focus()};return(0,g.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,r.A)("tabs",{"tabs--block":a},t),children:l.map((function(e){var t=e.value,a=e.label,s=e.attributes;return(0,g.jsx)("li",Object.assign({role:"tab",tabIndex:n===t?0:-1,"aria-selected":n===t,ref:function(e){return o.push(e)},onKeyDown:u,onClick:d},s,{className:(0,r.A)("tabs__item",v.tabItem,null==s?void 0:s.className,{"tabs__item--active":n===t}),children:null!=a?a:t}),t)}))})}function k(e){var t=e.lazy,a=e.children,s=e.selectedValue,i=(Array.isArray(a)?a:[a]).filter(Boolean);if(t){var l=i.find((function(e){return e.props.value===s}));return l?(0,n.cloneElement)(l,{className:(0,r.A)("margin-top--md",l.props.className)}):null}return(0,g.jsx)("div",{className:"margin-top--md",children:i.map((function(e,t){return(0,n.cloneElement)(e,{key:t,hidden:e.props.value!==s})}))})}function y(e){var t=f(e);return(0,g.jsxs)("div",{className:(0,r.A)("tabs-container",v.tabList),children:[(0,g.jsx)(x,Object.assign({},t,e)),(0,g.jsx)(k,Object.assign({},t,e))]})}function j(e){var t=(0,m.A)();return(0,g.jsx)(y,Object.assign({},e,{children:u(e.children)}),String(t))}},28453:(e,t,a)=>{a.d(t,{R:()=>i,x:()=>l});var n=a(96540);const r={},s=n.createContext(r);function i(e){const t=n.useContext(s);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function l(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),n.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/7fbac68a.533366b4.js b/assets/js/7fbac68a.533366b4.js deleted file mode 100644 index bd6fcb8ba1d4..000000000000 --- a/assets/js/7fbac68a.533366b4.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2757],{89032:(o,a,e)=>{e.r(a),e.d(a,{assets:()=>d,contentTitle:()=>r,default:()=>m,frontMatter:()=>s,metadata:()=>i,toc:()=>l});var t=e(74848),n=e(28453);const s={id:"ambassadors",title:"Polkadot Ambassador Program",sidebar_label:"Polkadot Ambassadors",description:"The Polkadot's Ambassador Program and How you can Participate in It.",keywords:["ambassadors","contribute","contributions","program"],slug:"../ambassadors"},r=void 0,i={id:"general/ambassadors",title:"Polkadot Ambassador Program",description:"The Polkadot's Ambassador Program and How you can Participate in It.",source:"@site/../docs/general/ambassadors.md",sourceDirName:"general",slug:"/ambassadors",permalink:"/docs/ambassadors",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/ambassadors.md",tags:[],version:"current",lastUpdatedBy:"github-actions[bot]",lastUpdatedAt:1714978178e3,frontMatter:{id:"ambassadors",title:"Polkadot Ambassador Program",sidebar_label:"Polkadot Ambassadors",description:"The Polkadot's Ambassador Program and How you can Participate in It.",keywords:["ambassadors","contribute","contributions","program"],slug:"../ambassadors"},sidebar:"docs",previous:{title:"Bug Bounty",permalink:"/docs/bug-bounty"},next:{title:"Alpha Program",permalink:"/docs/alpha-program"}},d={},l=[];function c(o){const a={a:"a",admonition:"admonition",li:"li",p:"p",ul:"ul",...(0,n.R)(),...o.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(a.admonition,{title:"Polkadot Ambassador On-chain Collective",type:"info",children:(0,t.jsxs)(a.p,{children:["Polkadot Ambassador Program is transitioning into an on-chain, rank-based, system collective after\nthe approval of ",(0,t.jsx)(a.a,{href:"https://polkadot.polkassembly.io/referenda/487",children:"Polkadot OpenGov referenda 487"}),"."]})}),"\n",(0,t.jsxs)(a.p,{children:["If you are enthusiastic about ",(0,t.jsx)(a.a,{href:"/docs/web3-and-polkadot",children:"Polkadot and Web3"})," and are willing to help\nthe community grow, you can join the program and receive funding for hosting events, gain access to\ncommunication channels of core team members, and gain access to Polkadot events."]}),"\n",(0,t.jsx)(a.p,{children:"There are many ways you can get involved in expanding Polkadot\u2019s ecosystem, such as:"}),"\n",(0,t.jsxs)(a.ul,{children:["\n",(0,t.jsx)(a.li,{children:"Contributing code and documentation related to the ecosystem"}),"\n",(0,t.jsx)(a.li,{children:"Speaking about Polkadot at events, workshops, and meetups"}),"\n",(0,t.jsx)(a.li,{children:"Writing blog posts"}),"\n",(0,t.jsx)(a.li,{children:"Representing Polkadot in your region"}),"\n",(0,t.jsx)(a.li,{children:"Mentoring and onboarding newcomers"}),"\n",(0,t.jsx)(a.li,{children:"Identifying partnerships and opportunities for the Polkadot ecosystem"}),"\n",(0,t.jsx)(a.li,{children:"Participating in calls and tasks that help drive the ecosystem forward"}),"\n"]})]})}function m(o={}){const{wrapper:a}={...(0,n.R)(),...o.components};return a?(0,t.jsx)(a,{...o,children:(0,t.jsx)(c,{...o})}):c(o)}},28453:(o,a,e)=>{e.d(a,{R:()=>r,x:()=>i});var t=e(96540);const n={},s=t.createContext(n);function r(o){const a=t.useContext(s);return t.useMemo((function(){return"function"==typeof o?o(a):{...a,...o}}),[a,o])}function i(o){let a;return a=o.disableParentContext?"function"==typeof o.components?o.components(n):o.components||n:r(o.components),t.createElement(s.Provider,{value:a},o.children)}}}]); \ No newline at end of file diff --git a/assets/js/7fbac68a.878602d5.js b/assets/js/7fbac68a.878602d5.js new file mode 100644 index 000000000000..8cdbb10adf8f --- /dev/null +++ b/assets/js/7fbac68a.878602d5.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2757],{98939:(a,o,e)=>{e.r(o),e.d(o,{assets:()=>d,contentTitle:()=>i,default:()=>m,frontMatter:()=>r,metadata:()=>t,toc:()=>l});const t=JSON.parse('{"id":"general/ambassadors","title":"Polkadot Ambassador Program","description":"The Polkadot\'s Ambassador Program and How you can Participate in It.","source":"@site/../docs/general/ambassadors.md","sourceDirName":"general","slug":"/ambassadors","permalink":"/docs/ambassadors","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/ambassadors.md","tags":[],"version":"current","lastUpdatedBy":"github-actions[bot]","lastUpdatedAt":1714978178000,"frontMatter":{"id":"ambassadors","title":"Polkadot Ambassador Program","sidebar_label":"Polkadot Ambassadors","description":"The Polkadot\'s Ambassador Program and How you can Participate in It.","keywords":["ambassadors","contribute","contributions","program"],"slug":"../ambassadors"},"sidebar":"docs","previous":{"title":"Bug Bounty","permalink":"/docs/bug-bounty"},"next":{"title":"Alpha Program","permalink":"/docs/alpha-program"}}');var n=e(74848),s=e(28453);const r={id:"ambassadors",title:"Polkadot Ambassador Program",sidebar_label:"Polkadot Ambassadors",description:"The Polkadot's Ambassador Program and How you can Participate in It.",keywords:["ambassadors","contribute","contributions","program"],slug:"../ambassadors"},i=void 0,d={},l=[];function c(a){const o={a:"a",admonition:"admonition",li:"li",p:"p",ul:"ul",...(0,s.R)(),...a.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(o.admonition,{title:"Polkadot Ambassador On-chain Collective",type:"info",children:(0,n.jsxs)(o.p,{children:["Polkadot Ambassador Program is transitioning into an on-chain, rank-based, system collective after\nthe approval of ",(0,n.jsx)(o.a,{href:"https://polkadot.polkassembly.io/referenda/487",children:"Polkadot OpenGov referenda 487"}),"."]})}),"\n",(0,n.jsxs)(o.p,{children:["If you are enthusiastic about ",(0,n.jsx)(o.a,{href:"/docs/web3-and-polkadot",children:"Polkadot and Web3"})," and are willing to help\nthe community grow, you can join the program and receive funding for hosting events, gain access to\ncommunication channels of core team members, and gain access to Polkadot events."]}),"\n",(0,n.jsx)(o.p,{children:"There are many ways you can get involved in expanding Polkadot\u2019s ecosystem, such as:"}),"\n",(0,n.jsxs)(o.ul,{children:["\n",(0,n.jsx)(o.li,{children:"Contributing code and documentation related to the ecosystem"}),"\n",(0,n.jsx)(o.li,{children:"Speaking about Polkadot at events, workshops, and meetups"}),"\n",(0,n.jsx)(o.li,{children:"Writing blog posts"}),"\n",(0,n.jsx)(o.li,{children:"Representing Polkadot in your region"}),"\n",(0,n.jsx)(o.li,{children:"Mentoring and onboarding newcomers"}),"\n",(0,n.jsx)(o.li,{children:"Identifying partnerships and opportunities for the Polkadot ecosystem"}),"\n",(0,n.jsx)(o.li,{children:"Participating in calls and tasks that help drive the ecosystem forward"}),"\n"]})]})}function m(a={}){const{wrapper:o}={...(0,s.R)(),...a.components};return o?(0,n.jsx)(o,{...a,children:(0,n.jsx)(c,{...a})}):c(a)}},28453:(a,o,e)=>{e.d(o,{R:()=>r,x:()=>i});var t=e(96540);const n={},s=t.createContext(n);function r(a){const o=t.useContext(s);return t.useMemo((function(){return"function"==typeof a?a(o):{...o,...a}}),[o,a])}function i(a){let o;return o=a.disableParentContext?"function"==typeof a.components?a.components(n):a.components||n:r(a.components),t.createElement(s.Provider,{value:o},a.children)}}}]); \ No newline at end of file diff --git a/assets/js/7ffd66a6.25e0f747.js b/assets/js/7ffd66a6.25e0f747.js new file mode 100644 index 000000000000..219a1dc023c9 --- /dev/null +++ b/assets/js/7ffd66a6.25e0f747.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6547],{49263:(e,a,s)=>{s.r(a),s.d(a,{assets:()=>l,contentTitle:()=>d,default:()=>h,frontMatter:()=>t,metadata:()=>n,toc:()=>c});const n=JSON.parse('{"id":"general/dune-analytics/parachain-dashboards/acala-dashboards","title":"Acala Dashboards","description":"Acala is a decentralized finance hub and stablecoin platform powering cross-blockchain","source":"@site/../docs/general/dune-analytics/parachain-dashboards/acala-dashboards.md","sourceDirName":"general/dune-analytics/parachain-dashboards","slug":"/general/dune-analytics/acala-dashboards","permalink":"/docs/general/dune-analytics/acala-dashboards","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/parachain-dashboards/acala-dashboards.md","tags":[],"version":"current","lastUpdatedBy":"MK","lastUpdatedAt":1719215716000,"frontMatter":{"id":"acala-dashboards","title":"Acala Dashboards","sidebar_label":"Acala","description":"Acala is a decentralized finance hub and stablecoin platform powering cross-blockchain","keywords":["polkadot","dashboard","dune","acala","DeFi"],"slug":"../acala-dashboards"},"sidebar":"docs","previous":{"title":"Parachain Dashboards","permalink":"/docs/general/dune-analytics/parachain-dashboards"},"next":{"title":"Asset Hub","permalink":"/docs/general/dune-analytics/assethub-dashboards"}}');var r=s(74848),i=s(28453);const t={id:"acala-dashboards",title:"Acala Dashboards",sidebar_label:"Acala",description:"Acala is a decentralized finance hub and stablecoin platform powering cross-blockchain",keywords:["polkadot","dashboard","dune","acala","DeFi"],slug:"../acala-dashboards"},d="Acala Dashboards",l={},c=[{value:"Overview",id:"overview",level:2},{value:"Featured Dashboards on Dune",id:"featured-dashboards-on-dune",level:2},{value:"Key Tables",id:"key-tables",level:2},{value:"Useful Queries",id:"useful-queries",level:2},{value:"Getting Started with Queries",id:"getting-started-with-queries",level:2}];function o(e){const a={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,i.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(a.header,{children:(0,r.jsx)(a.h1,{id:"acala-dashboards",children:"Acala Dashboards"})}),"\n",(0,r.jsx)(a.h2,{id:"overview",children:"Overview"}),"\n",(0,r.jsx)(a.p,{children:"Acala is a decentralized finance hub and stablecoin platform powering cross-blockchain liquidity and\napplications. It serves as a critical infrastructure layer for the Polkadot ecosystem."}),"\n",(0,r.jsx)(a.h2,{id:"featured-dashboards-on-dune",children:"Featured Dashboards on Dune"}),"\n",(0,r.jsx)(a.p,{children:"Here you will find a variety of dashboards that help visualize data from the Acala parachain:"}),"\n",(0,r.jsxs)(a.ul,{children:["\n",(0,r.jsxs)(a.li,{children:[(0,r.jsx)(a.a,{href:"https://dune.com/substrate/acala",children:"Acala on Polkadot"}),": This dashboard provides a comprehensive\nview of financial activities and token dynamics within the Acala network."]}),"\n"]}),"\n",(0,r.jsx)(a.h2,{id:"key-tables",children:"Key Tables"}),"\n",(0,r.jsx)(a.p,{children:"Data from the Acala parachain is organized into several key tables:"}),"\n",(0,r.jsxs)(a.ul,{children:["\n",(0,r.jsx)(a.li,{children:(0,r.jsx)(a.code,{children:"acala.balances"})}),"\n",(0,r.jsx)(a.li,{children:(0,r.jsx)(a.code,{children:"acala.blocks"})}),"\n",(0,r.jsx)(a.li,{children:(0,r.jsx)(a.code,{children:"acala.calls"})}),"\n",(0,r.jsx)(a.li,{children:(0,r.jsx)(a.code,{children:"acala.events"})}),"\n",(0,r.jsx)(a.li,{children:(0,r.jsx)(a.code,{children:"acala.extrinsics"})}),"\n",(0,r.jsx)(a.li,{children:(0,r.jsx)(a.code,{children:"acala.transfers"})}),"\n"]}),"\n",(0,r.jsxs)(a.p,{children:["Start building your own queries using granular data on Dune\n",(0,r.jsx)(a.a,{href:"https://dune.com/queries?category=canonical&namespace=acala",children:"here"}),"."]}),"\n",(0,r.jsx)(a.h2,{id:"useful-queries",children:"Useful Queries"}),"\n",(0,r.jsx)(a.p,{children:"Some useful queries for Acala are provided:"}),"\n",(0,r.jsxs)(a.table,{children:[(0,r.jsx)(a.thead,{children:(0,r.jsxs)(a.tr,{children:[(0,r.jsx)(a.th,{children:"Title"}),(0,r.jsx)(a.th,{children:"Query"}),(0,r.jsx)(a.th,{children:"Description"})]})}),(0,r.jsxs)(a.tbody,{children:[(0,r.jsxs)(a.tr,{children:[(0,r.jsx)(a.td,{children:"Acala Asset Exchange Rate by Date"}),(0,r.jsx)(a.td,{children:(0,r.jsx)(a.a,{href:"https://dune.com/queries/3672976",children:"query_3672976"})}),(0,r.jsx)(a.td,{children:"Retrieves historical exchange rates for Acala assets, date-wise breakdown"})]}),(0,r.jsxs)(a.tr,{children:[(0,r.jsx)(a.td,{children:"Acala Assets Most Frequently Subject to Swapping"}),(0,r.jsx)(a.td,{children:(0,r.jsx)(a.a,{href:"https://dune.com/queries/3673478",children:"query_3673478"})}),(0,r.jsx)(a.td,{children:"This query identifies which Acala assets are swapped the most frequently on the platform."})]})]})]}),"\n",(0,r.jsx)(a.p,{children:"These descriptions aim to provide more context and details about what each query does and the\ninsights they offer."}),"\n",(0,r.jsx)(a.h2,{id:"getting-started-with-queries",children:"Getting Started with Queries"}),"\n",(0,r.jsx)(a.p,{children:"To get started with querying data from Unique, you are welcome to use the mentioned materialized\nqueries. You can use the following DuneSQL queries as examples:"}),"\n",(0,r.jsx)(a.pre,{children:(0,r.jsx)(a.code,{className:"language-sql",metastring:'title="Acala List of Assets" showLineNumbers',children:"WITH\n decimals_for_each_symbol AS (\n SELECT\n symbol,\n MAX(decimals) AS decimals\n FROM\n acala.transfers\n WHERE\n symbol IS NOT NULL\n GROUP BY\n symbol\n )\nSELECT\n b.asset,\n b.symbol,\n d.decimals\nFROM\n acala.balances b\nLEFT JOIN decimals_for_each_symbol d ON b.symbol = d.symbol\nGROUP BY\n b.asset,\n b.symbol,\n d.decimals\nORDER BY\n SUM(b.free + b.reserved + b.misc_frozen + b.frozen) DESC\n"})}),"\n",(0,r.jsx)(a.p,{children:"Query result:"}),"\n",(0,r.jsx)("iframe",{src:"https://dune.com/embeds/3670410/6172755/",height:"350",width:"100%"}),"\n",(0,r.jsx)(a.admonition,{title:"DuneSQL Referece",type:"info",children:(0,r.jsxs)(a.p,{children:["For more information on DuneSQL, please refer to the ",(0,r.jsx)(a.a,{href:"/docs/general/dunesql-cheatsheet",children:"DuneSQL Cheatsheet"}),"\nand\n",(0,r.jsx)(a.a,{href:"https://docs.dune.com/query-engine/Functions-and-operators/index",children:"DuneSQL Official Documentation"}),"."]})})]})}function h(e={}){const{wrapper:a}={...(0,i.R)(),...e.components};return a?(0,r.jsx)(a,{...e,children:(0,r.jsx)(o,{...e})}):o(e)}},28453:(e,a,s)=>{s.d(a,{R:()=>t,x:()=>d});var n=s(96540);const r={},i=n.createContext(r);function t(e){const a=n.useContext(i);return n.useMemo((function(){return"function"==typeof e?e(a):{...a,...e}}),[a,e])}function d(e){let a;return a=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:t(e.components),n.createElement(i.Provider,{value:a},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/7ffd66a6.a74553c8.js b/assets/js/7ffd66a6.a74553c8.js deleted file mode 100644 index 263958e9dd37..000000000000 --- a/assets/js/7ffd66a6.a74553c8.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6547],{38246:(e,a,s)=>{s.r(a),s.d(a,{assets:()=>l,contentTitle:()=>t,default:()=>h,frontMatter:()=>i,metadata:()=>d,toc:()=>c});var n=s(74848),r=s(28453);const i={id:"acala-dashboards",title:"Acala Dashboards",sidebar_label:"Acala",description:"Acala is a decentralized finance hub and stablecoin platform powering cross-blockchain",keywords:["polkadot","dashboard","dune","acala","DeFi"],slug:"../acala-dashboards"},t="Acala Dashboards",d={id:"general/dune-analytics/parachain-dashboards/acala-dashboards",title:"Acala Dashboards",description:"Acala is a decentralized finance hub and stablecoin platform powering cross-blockchain",source:"@site/../docs/general/dune-analytics/parachain-dashboards/acala-dashboards.md",sourceDirName:"general/dune-analytics/parachain-dashboards",slug:"/general/dune-analytics/acala-dashboards",permalink:"/docs/general/dune-analytics/acala-dashboards",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/parachain-dashboards/acala-dashboards.md",tags:[],version:"current",lastUpdatedBy:"MK",lastUpdatedAt:1719215716e3,frontMatter:{id:"acala-dashboards",title:"Acala Dashboards",sidebar_label:"Acala",description:"Acala is a decentralized finance hub and stablecoin platform powering cross-blockchain",keywords:["polkadot","dashboard","dune","acala","DeFi"],slug:"../acala-dashboards"},sidebar:"docs",previous:{title:"Parachain Dashboards",permalink:"/docs/general/dune-analytics/parachain-dashboards"},next:{title:"Asset Hub",permalink:"/docs/general/dune-analytics/assethub-dashboards"}},l={},c=[{value:"Overview",id:"overview",level:2},{value:"Featured Dashboards on Dune",id:"featured-dashboards-on-dune",level:2},{value:"Key Tables",id:"key-tables",level:2},{value:"Useful Queries",id:"useful-queries",level:2},{value:"Getting Started with Queries",id:"getting-started-with-queries",level:2}];function o(e){const a={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,r.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(a.header,{children:(0,n.jsx)(a.h1,{id:"acala-dashboards",children:"Acala Dashboards"})}),"\n",(0,n.jsx)(a.h2,{id:"overview",children:"Overview"}),"\n",(0,n.jsx)(a.p,{children:"Acala is a decentralized finance hub and stablecoin platform powering cross-blockchain liquidity and\napplications. It serves as a critical infrastructure layer for the Polkadot ecosystem."}),"\n",(0,n.jsx)(a.h2,{id:"featured-dashboards-on-dune",children:"Featured Dashboards on Dune"}),"\n",(0,n.jsx)(a.p,{children:"Here you will find a variety of dashboards that help visualize data from the Acala parachain:"}),"\n",(0,n.jsxs)(a.ul,{children:["\n",(0,n.jsxs)(a.li,{children:[(0,n.jsx)(a.a,{href:"https://dune.com/substrate/acala",children:"Acala on Polkadot"}),": This dashboard provides a comprehensive\nview of financial activities and token dynamics within the Acala network."]}),"\n"]}),"\n",(0,n.jsx)(a.h2,{id:"key-tables",children:"Key Tables"}),"\n",(0,n.jsx)(a.p,{children:"Data from the Acala parachain is organized into several key tables:"}),"\n",(0,n.jsxs)(a.ul,{children:["\n",(0,n.jsx)(a.li,{children:(0,n.jsx)(a.code,{children:"acala.balances"})}),"\n",(0,n.jsx)(a.li,{children:(0,n.jsx)(a.code,{children:"acala.blocks"})}),"\n",(0,n.jsx)(a.li,{children:(0,n.jsx)(a.code,{children:"acala.calls"})}),"\n",(0,n.jsx)(a.li,{children:(0,n.jsx)(a.code,{children:"acala.events"})}),"\n",(0,n.jsx)(a.li,{children:(0,n.jsx)(a.code,{children:"acala.extrinsics"})}),"\n",(0,n.jsx)(a.li,{children:(0,n.jsx)(a.code,{children:"acala.transfers"})}),"\n"]}),"\n",(0,n.jsxs)(a.p,{children:["Start building your own queries using granular data on Dune\n",(0,n.jsx)(a.a,{href:"https://dune.com/queries?category=canonical&namespace=acala",children:"here"}),"."]}),"\n",(0,n.jsx)(a.h2,{id:"useful-queries",children:"Useful Queries"}),"\n",(0,n.jsx)(a.p,{children:"Some useful queries for Acala are provided:"}),"\n",(0,n.jsxs)(a.table,{children:[(0,n.jsx)(a.thead,{children:(0,n.jsxs)(a.tr,{children:[(0,n.jsx)(a.th,{children:"Title"}),(0,n.jsx)(a.th,{children:"Query"}),(0,n.jsx)(a.th,{children:"Description"})]})}),(0,n.jsxs)(a.tbody,{children:[(0,n.jsxs)(a.tr,{children:[(0,n.jsx)(a.td,{children:"Acala Asset Exchange Rate by Date"}),(0,n.jsx)(a.td,{children:(0,n.jsx)(a.a,{href:"https://dune.com/queries/3672976",children:"query_3672976"})}),(0,n.jsx)(a.td,{children:"Retrieves historical exchange rates for Acala assets, date-wise breakdown"})]}),(0,n.jsxs)(a.tr,{children:[(0,n.jsx)(a.td,{children:"Acala Assets Most Frequently Subject to Swapping"}),(0,n.jsx)(a.td,{children:(0,n.jsx)(a.a,{href:"https://dune.com/queries/3673478",children:"query_3673478"})}),(0,n.jsx)(a.td,{children:"This query identifies which Acala assets are swapped the most frequently on the platform."})]})]})]}),"\n",(0,n.jsx)(a.p,{children:"These descriptions aim to provide more context and details about what each query does and the\ninsights they offer."}),"\n",(0,n.jsx)(a.h2,{id:"getting-started-with-queries",children:"Getting Started with Queries"}),"\n",(0,n.jsx)(a.p,{children:"To get started with querying data from Unique, you are welcome to use the mentioned materialized\nqueries. You can use the following DuneSQL queries as examples:"}),"\n",(0,n.jsx)(a.pre,{children:(0,n.jsx)(a.code,{className:"language-sql",metastring:'title="Acala List of Assets" showLineNumbers',children:"WITH\n decimals_for_each_symbol AS (\n SELECT\n symbol,\n MAX(decimals) AS decimals\n FROM\n acala.transfers\n WHERE\n symbol IS NOT NULL\n GROUP BY\n symbol\n )\nSELECT\n b.asset,\n b.symbol,\n d.decimals\nFROM\n acala.balances b\nLEFT JOIN decimals_for_each_symbol d ON b.symbol = d.symbol\nGROUP BY\n b.asset,\n b.symbol,\n d.decimals\nORDER BY\n SUM(b.free + b.reserved + b.misc_frozen + b.frozen) DESC\n"})}),"\n",(0,n.jsx)(a.p,{children:"Query result:"}),"\n",(0,n.jsx)("iframe",{src:"https://dune.com/embeds/3670410/6172755/",height:"350",width:"100%"}),"\n",(0,n.jsx)(a.admonition,{title:"DuneSQL Referece",type:"info",children:(0,n.jsxs)(a.p,{children:["For more information on DuneSQL, please refer to the ",(0,n.jsx)(a.a,{href:"/docs/general/dunesql-cheatsheet",children:"DuneSQL Cheatsheet"}),"\nand\n",(0,n.jsx)(a.a,{href:"https://docs.dune.com/query-engine/Functions-and-operators/index",children:"DuneSQL Official Documentation"}),"."]})})]})}function h(e={}){const{wrapper:a}={...(0,r.R)(),...e.components};return a?(0,n.jsx)(a,{...e,children:(0,n.jsx)(o,{...e})}):o(e)}},28453:(e,a,s)=>{s.d(a,{R:()=>t,x:()=>d});var n=s(96540);const r={},i=n.createContext(r);function t(e){const a=n.useContext(i);return n.useMemo((function(){return"function"==typeof e?e(a):{...a,...e}}),[a,e])}function d(e){let a;return a=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:t(e.components),n.createElement(i.Provider,{value:a},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/804b1e9f.33cc02c9.js b/assets/js/804b1e9f.33cc02c9.js deleted file mode 100644 index 4fe567f409f2..000000000000 --- a/assets/js/804b1e9f.33cc02c9.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk=self.webpackChunk||[]).push([[1062],{98362:(e,t,n)=>{"use strict";n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>r,default:()=>h,frontMatter:()=>i,metadata:()=>l,toc:()=>d});var a=n(74848),o=n(28453),s=(n(47379),n(67141));n(3514);const i={id:"learn-guides-nominator",title:"Polkadot-JS Guides For Nominators",sidebar_label:"Nominator Guides",description:"Polkadot-JS Guides for Nominators.",keyword:["nominate","stake","staking","claim","rewards","polkadot-js"],slug:"../learn-guides-nominator"},r=void 0,l={id:"learn/learn-guides-nominator",title:"Polkadot-JS Guides For Nominators",description:"Polkadot-JS Guides for Nominators.",source:"@site/../docs/learn/learn-guides-nominator.md",sourceDirName:"learn",slug:"/learn-guides-nominator",permalink:"/docs/learn-guides-nominator",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-nominator.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1729847256e3,frontMatter:{id:"learn-guides-nominator",title:"Polkadot-JS Guides For Nominators",sidebar_label:"Nominator Guides",description:"Polkadot-JS Guides for Nominators.",keyword:["nominate","stake","staking","claim","rewards","polkadot-js"],slug:"../learn-guides-nominator"},sidebar:"docs",previous:{title:"Staking Guides",permalink:"/docs/learn-guides-staking"},next:{title:"Nomination Pool Guides",permalink:"/docs/learn-guides-staking-pools"}},c={},d=[{value:"Nominate Using Polkadot-JS",id:"nominate-using-polkadot-js",level:2},{value:"Bond your tokens",id:"bond-your-tokens",level:3},{value:"Nominate a validator",id:"nominate-a-validator",level:3},{value:"Stop nominating",id:"stop-nominating",level:3},{value:"Claiming Rewards with Polkadot-JS",id:"claiming-rewards-with-polkadot-js",level:2},{value:"Using Command-Line Interface (CLI)",id:"using-command-line-interface-cli",level:2},{value:"Step 1: Install @polkadot/api-cli",id:"step-1-install-polkadotapi-cli",level:3},{value:"Step 2: Bond Tokens",id:"step-2-bond-tokens",level:3},{value:"Step 3: Nominate a validator",id:"step-3-nominate-a-validator",level:3}];function u(e){const t={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,o.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(s.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the Polkadot-JS UI, you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,a.jsxs)(t.p,{children:["See ",(0,a.jsx)(t.a,{href:"/docs/learn-staking",children:"this page"})," to learn about staking."]}),"\n",(0,a.jsx)(t.h2,{id:"nominate-using-polkadot-js",children:"Nominate Using Polkadot-JS"}),"\n",(0,a.jsx)(t.admonition,{title:"Video Tutorials",type:"info",children:(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsx)(t.li,{children:(0,a.jsx)(t.a,{href:"https://youtu.be/FCXC0CDhyS4?t=219",children:"How to Nominate/Stake"})}),"\n",(0,a.jsx)(t.li,{children:(0,a.jsx)(t.a,{href:"https://youtu.be/7VlTncHCGPc",children:"Staking with a Ledger device and Polkadot-JS"})}),"\n",(0,a.jsx)(t.li,{children:(0,a.jsx)(t.a,{href:"https://www.youtube.com/watch?v=jL-N_IWiYVA",children:"Staking with a Ledger device and Ledger Live"})}),"\n"]})}),"\n",(0,a.jsx)(t.h3,{id:"bond-your-tokens",children:"Bond your tokens"}),"\n",(0,a.jsx)(t.admonition,{title:"Support Article",type:"info",children:(0,a.jsxs)(t.p,{children:["Read the support article about\n",(0,a.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000168057-polkadot-js-ui-how-do-i-stake-nominate-on-polkadot-",children:"How to Bond Tokens and Nominate"}),"."]})}),"\n",(0,a.jsxs)(t.p,{children:["On the ",(0,a.jsx)(t.a,{href:"https://polkadot.js.org/apps",children:"Polkadot-JS UI"}),' navigate to the "Staking" tab (within the\n"Network" menu).']}),"\n",(0,a.jsxs)(t.p,{children:['The "Staking Overview" subsection will show you all the active validators and their information -\ntheir identities, the amount of KSM that are staking for them, amount that is their own provided\nstake, how much they charge in commission, the era points they\'ve earned in the current era, and the\nlast block number that they produced. If you click on the chart button it will take you to the\n"Validator Stats" page for that validator that shows you more detailed and historical information\nabout the validator\'s stake, rewards and ',(0,a.jsx)(t.a,{href:"/docs/learn-offenses",children:"slashes"}),"."]}),"\n",(0,a.jsxs)(t.p,{children:['The "Account actions" subsection (',(0,a.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/staking/actions",children:"link"}),") allows you\nto stake and nominate."]}),"\n",(0,a.jsxs)(t.p,{children:['The "Payouts" subsection (',(0,a.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/staking/payouts",children:"link"}),") allows you to\nclaim rewards from staking."]}),"\n",(0,a.jsxs)(t.p,{children:['The "Targets" subsection (',(0,a.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/staking/targets",children:"link"}),") will help you\nestimate your earnings and this is where it's good to start picking favorites."]}),"\n",(0,a.jsxs)(t.p,{children:['The "Waiting" subsection (',(0,a.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/staking/waiting",children:"link"}),") lists all pending\nvalidators that are awaiting more nominations to enter the active validator set. Validators will\nstay in the waiting queue until they have enough KSM backing them (as allocated through the\n",(0,a.jsx)(t.a,{href:"/docs/learn-phragmen",children:"Phragm\xe9n election mechanism"}),"). It is possible validator can remain in the\nqueue for a very long time if they never get enough backing."]}),"\n",(0,a.jsxs)(t.p,{children:['The "Validator Stats" subsection (',(0,a.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/staking/query",children:"link"}),") allows you\nto query a validator's stash address and see historical charts on era points, elected stake,\nrewards, and ",(0,a.jsx)(t.a,{href:"/docs/learn-offenses",children:"slashes"}),"."]}),"\n",(0,a.jsx)(t.p,{children:'Pick "Account actions" underneath "Network" > "Staking", then click the "+ Nominator" button.'}),"\n",(0,a.jsx)(t.p,{children:"You will see a modal window that looks like the below:"}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"nominator-update-1",src:n(59300).A+"",width:"2194",height:"1170"})}),"\n",(0,a.jsxs)(t.p,{children:['Select a "value bonded" that is ',(0,a.jsx)(t.strong,{children:"less"})," than the total amount of KSM you have, so you have some\nleft over to pay transaction fees. Transaction fees are currently at least 0.01 KSM, but they are\ndynamic based on a variety of factors including the load of recent blocks."]}),"\n",(0,a.jsx)(t.p,{children:"Also be mindful of the reaping threshold - the amount that must remain in an account lest it be\nburned. That amount is 0.01 in Kusama, so it's recommended to keep at least 0.1 KSM in your account\nto be on the safe side."}),"\n",(0,a.jsx)(t.p,{children:"Choose whatever payment destination that makes sense to you. If you're unsure, you can choose \"Stash\naccount (increase amount at stake)\" to simply accrue the rewards into the amount you're staking and\nearn compound interest."}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"Payout account selection dropdown with the custom account option highlighted",src:n(15070).A+"",width:"742",height:"245"})}),"\n",(0,a.jsx)(t.h3,{id:"nominate-a-validator",children:"Nominate a validator"}),"\n",(0,a.jsx)(t.admonition,{title:"Support Article",type:"info",children:(0,a.jsxs)(t.p,{children:["Read the support article about\n",(0,a.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000150130-how-do-i-know-which-validators-to-choose-",children:"How to Select Validators"}),"."]})}),"\n",(0,a.jsxs)(t.p,{children:["You are now bonded. Being bonded means your tokens are locked and could be\n",(0,a.jsx)(t.a,{href:"/docs/learn-offenses",children:"slashed"})," if the validators you nominate misbehave. All bonded funds can be\ndistributed to ",(0,a.jsx)(t.a,{href:"/docs/chain-state-values#maximum-votes-per-nominator",children:"multiple validators"}),".\nBe careful about the validators you choose since you will be slashed if your validator commits an\n",(0,a.jsx)(t.a,{href:"/docs/learn-offenses",children:"offence"}),"."]}),"\n",(0,a.jsx)(t.p,{children:'Click on "Nominate" on an account you\'ve bonded and you will be presented with another popup asking\nyou to select some validators.'}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"Nominating validators",src:n(20412).A+"",width:"2208",height:"982"})}),"\n",(0,a.jsxs)(t.p,{children:["Select them, confirm the transaction, and you're done - you are now nominating. Your nominations\nwill become active in the next era. Eras last six hours on Kusama - depending on when you do this,\nyour nominations may become active almost immediately, or you may have to wait almost the entire six\nhours before your nominations are active. You can check how far along Kusama is in the current era\non the ",(0,a.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/staking",children:"Staking page"}),"."]}),"\n",(0,a.jsxs)(t.p,{children:["Assuming at least one of your nominations ends up in the active validator set, you will start to get\nrewards allocated to you. In order to claim them (i.e., add them to your account), you must manually\nclaim them. To initiate a claim, you can do it yourself or have the validator that you staked for\ninitiate a claim. This is to help optimize the effectiveness and storage of payouts on Kusama. See\nthe ",(0,a.jsx)(t.a,{href:"/docs/learn-staking#claiming-rewards",children:"Claiming Rewards"})," section of the Staking wiki page for\nmore details."]}),"\n",(0,a.jsx)(t.h3,{id:"stop-nominating",children:"Stop nominating"}),"\n",(0,a.jsx)(t.admonition,{title:"Support Article",type:"info",children:(0,a.jsxs)(t.p,{children:["Read the support article about\n",(0,a.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000167902-how-can-i-unstake-my-tokens-again-",children:"How to Stop Nominating & Unbond Tokens"}),".\nSee also the support article about\n",(0,a.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000170241-polkadot-js-ui-how-to-rebond-tokens-during-the-unbonding-period",children:"How to Rebond Tokens"}),"."]})}),"\n",(0,a.jsx)(t.p,{children:"At some point, you might decide to stop nominating one or more validators. You can always change who\nyou're nominating, but you cannot withdraw your tokens unless you unbond them."}),"\n",(0,a.jsx)(t.h2,{id:"claiming-rewards-with-polkadot-js",children:"Claiming Rewards with Polkadot-JS"}),"\n",(0,a.jsx)(t.p,{children:"Anyone can trigger a payout for any validator, as long as they are willing to pay the transaction\nfee. Someone must submit a transaction with a validator ID and an era index. Polkadot will\nautomatically calculate that validator's reward and distribute the rewards pro rata."}),"\n",(0,a.jsxs)(t.p,{children:["These details are handled for you automatically if you use the\n",(0,a.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/staking/payout",children:"Polkadot-JS UI"}),", which also allows you to submit\nbatches of eras at once."]}),"\n",(0,a.jsx)(t.p,{children:'To claim rewards on Polkadot-JS UI, you will need to be in the "Payouts" tab underneath "Staking",\nwhich will list all the pending payouts for your stashes.'}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"pending-payouts",src:n(32630).A+"",width:"2876",height:"600"})}),"\n",(0,a.jsx)(t.p,{children:'To then claim your reward, select the "Payout all" button. This will prompt you to select your stash\naccounts for payout.'}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"select-payouts",src:n(43233).A+"",width:"2192",height:"624"})}),"\n",(0,a.jsx)(t.p,{children:"Once you are done with payout, another screen will appear asking for you to sign and submit the\ntransaction."}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"transaction-payouts",src:n(30626).A+"",width:"2878",height:"818"})}),"\n",(0,a.jsx)(t.h2,{id:"using-command-line-interface-cli",children:"Using Command-Line Interface (CLI)"}),"\n",(0,a.jsx)(t.p,{children:"Apart from using the Polkadot-JS UI to participate in the staking, you can do all these things in\nCLI instead. The CLI approach allows you to interact with the network without using Polkadot-JS."}),"\n",(0,a.jsx)(t.h3,{id:"step-1-install-polkadotapi-cli",children:"Step 1: Install @polkadot/api-cli"}),"\n",(0,a.jsxs)(t.p,{children:["We assume you have installed ",(0,a.jsx)(t.a,{href:"https://nodejs.org",children:"NodeJS with npm"}),". Run the following command to\ninstall the ",(0,a.jsx)(t.code,{children:"@polkadot/api-cli"})," globally:"]}),"\n",(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-bash",children:"npm install -g @polkadot/api-cli\n"})}),"\n",(0,a.jsx)(t.h3,{id:"step-2-bond-tokens",children:"Step 2: Bond Tokens"}),"\n",(0,a.jsx)(t.admonition,{title:"Controller accounts are deprecated",type:"info",children:(0,a.jsxs)(t.p,{children:["Controller accounts are deprecated. For more information, see\n",(0,a.jsx)(t.a,{href:"https://forum.polkadot.network/t/staking-controller-deprecation-plan-staking-ui-leads-comms/2748",children:"this discussion"}),"."]})}),"\n",(0,a.jsx)(t.p,{children:"Executing the following command:"}),"\n",(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-bash",children:'polkadot-js-api --seed "MNEMONIC_PHRASE" tx.staking.bond CONTROLLER_ADDRESS NUMBER_OF_TOKENS REWARD_DESTINATION --ws WEBSOCKET_ENDPOINT\n'})}),"\n",(0,a.jsxs)(t.p,{children:[(0,a.jsx)(t.code,{children:"CONTROLLER_ADDRESS"}),": An address you would like to bond to the stash account. (Controller accounts\nare now deprecated. Refer to\n",(0,a.jsx)(t.a,{href:"https://forum.polkadot.network/t/staking-controller-deprecation-plan-staking-ui-leads-comms/2748",children:"this discussion"}),"\nfor additional context)"]}),"\n",(0,a.jsxs)(t.p,{children:[(0,a.jsx)(t.code,{children:"NUMBER_OF_TOKENS"}),": The number of native tokens (in Plancks) you would like to stake to the network.\nFor more information, see ",(0,a.jsx)(t.a,{href:"/docs/learn-DOT",children:"this page"}),"."]}),"\n",(0,a.jsxs)(t.p,{children:[(0,a.jsx)(t.code,{children:"REWARD_DESTINATION"}),":"]}),"\n",(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.code,{children:"Staked"})," - Pay into the stash account, increasing the amount at stake accordingly."]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.code,{children:"Stash"})," - Pay into the stash account, not increasing the amount at stake."]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.code,{children:"Account"})," - Pay into a custom account that is not the stash (can be a proxy or another type of\naccount)."]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.code,{children:"Controller"})," - Pay into the controller account."]}),"\n"]}),"\n",(0,a.jsx)(t.p,{children:"Example for Kusama:"}),"\n",(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-bash",children:'polkadot-js-api --seed "xxxx xxxxx xxxx xxxxx" tx.staking.bond DMTHrNcmA8QbqRS4rBq8LXn8ipyczFoNMb1X4cY2WD9tdBX 1000000000000 Staked --ws wss://kusama-rpc.polkadot.io\n'})}),"\n",(0,a.jsxs)(t.p,{children:["For wss endpoints see ",(0,a.jsx)(t.a,{href:"/docs/maintain-endpoints",children:"this page"}),"."]}),"\n",(0,a.jsx)(t.p,{children:"Result:"}),"\n",(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-bash",children:'...\n...\n "status": {\n "InBlock": "0x0ed1ec0ba69564e8f98958d69f826adef895b5617366a32a3aa384290e98514e"\n }\n'})}),"\n",(0,a.jsxs)(t.p,{children:["You can check the transaction status by using the value of the ",(0,a.jsx)(t.code,{children:"InBlock"})," in\n",(0,a.jsx)(t.a,{href:"https://www.subscan.io/",children:"Subscan"}),". Also, you can verify the bonding state under the\n",(0,a.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/staking/actions",children:"Staking"})," page on the Polkadot-JS UI."]}),"\n",(0,a.jsx)(t.h3,{id:"step-3-nominate-a-validator",children:"Step 3: Nominate a validator"}),"\n",(0,a.jsx)(t.p,{children:"To nominate a validator, you can execute the following command:"}),"\n",(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-bash",children:'polkadot-js-api --seed "MNEMONIC_PHRASE" tx.staking.nominate \'["VALIDATOR_ADDRESS"]\' --ws WS_ENDPOINT\n'})}),"\n",(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-bash",children:'polkadot-js-api --seed "xxxx xxxxx xxxx xxxxx" tx.staking.nominate \'["CmD9vaMYoiKe7HiFnfkftwvhKbxN9bhyjcDrfFRGbifJEG8","E457XaKbj2yTB2URy8N4UuzmyuFRkcdxYs67UvSgVr7HyFb"]\' --ws wss://kusama-rpc.polkadot.io\n'})}),"\n",(0,a.jsx)(t.p,{children:"After a few seconds, you should see the hash of the transaction, and if you would like to verify the\nnomination status, you can check that on the Polkadot-JS UI as well."})]})}function h(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,a.jsx)(t,{...e,children:(0,a.jsx)(u,{...e})}):u(e)}},67141:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var a=n(96540),o=n(74848);const s=function(e){var t,n=e.message,s=(0,a.useState)(!0),i=s[0],r=s[1];return(0,o.jsx)(o.Fragment,{children:i&&(0,o.jsxs)("div",{className:"message-box",children:[(0,o.jsx)("button",{className:"close-button",onClick:function(){r(!1)},children:"\u2716 "}),(0,o.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(t=n,t.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},47379:(e,t,n)=>{"use strict";n.d(t,{A:()=>h});var a=n(90675),o=n(10467),s=n(96540),i=n(19588),r=n(2026),l=n(11135);function c(e,t,n){return d.apply(this,arguments)}function d(){return(d=(0,o.A)((0,a.A)().mark((function e(t,n,o){var s,l,c,d,u;return(0,a.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s=void 0,l=void 0,e.t0=t,e.next="polkadot"===e.t0?5:"kusama"===e.t0?7:"statemine"===e.t0?9:"statemint"===e.t0?11:"polkadotpeople"===e.t0?13:"kusamapeople"===e.t0?15:17;break;case 5:return s="wss://rpc.polkadot.io",e.abrupt("break",18);case 7:return s="wss://kusama-rpc.polkadot.io/",e.abrupt("break",18);case 9:return s="wss://statemine-rpc.polkadot.io/",e.abrupt("break",18);case 11:return s="wss://statemint-rpc.polkadot.io/",e.abrupt("break",18);case 13:return s="wss://polkadot-people-rpc.polkadot.io/",e.abrupt("break",18);case 15:return s="wss://kusama-people-rpc.polkadot.io/",e.abrupt("break",18);case 17:console.log("Unknown socket url provided, no connection made.");case 18:if(void 0!==s){e.next=22;break}return e.abrupt("return");case 22:return c=new i.E(s),e.next=25,r.G.create({provider:c});case 25:d=e.sent,(u=n.split(".")).forEach((function(e){e in d&&(d=d[e])})),e.t1=u[0],e.next="consts"===e.t1?31:"query"===e.t1?33:38;break;case 31:return l=d.toString(),e.abrupt("break",39);case 33:return e.next=35,d();case 35:return l=(l=e.sent).toString(),e.abrupt("break",39);case 38:console.log("Unknown path prefix ("+u[0]+") in "+n);case 39:return e.abrupt("return",l);case 40:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function u(e,t,n,a){switch(t){case"humanReadable":(0,l.HumanReadable)(e,n,a);break;case"precise":(0,l.Precise)(e,n,a);break;case"blocksToDays":(0,l.BlocksToDays)(e,a);break;case"erasToDays":(0,l.ErasToDays)(e,a,n);break;case"percentage":(0,l.Percentage)(e,a);break;case"permillToPercent":(0,l.PermillToPercent)(e,a);break;case"arrayLength":(0,l.ArrayLength)(e,a);break;default:return void console.log("Ignoring unknown filter type")}}const h=function(e){var t=e.network,n=e.path,i=e.defaultValue,r=e.filter,l=void 0===r?void 0:r,d=(0,s.useState)(""),h=d[0],p=d[1];return t=t.toLowerCase(),(0,s.useEffect)((function(){void 0!==l?u(i.toString(),l,t,p):p(i.toString());var e=void 0;switch(t){case"polkadot":e="wss://rpc.polkadot.io";break;case"kusama":e="wss://kusama-rpc.polkadot.io/";break;case"statemine":e="wss://kusama-asset-hub-rpc.polkadot.io/";break;case"statemint":e="wss://polkadot-asset-hub-rpc.polkadot.io/";break;case"kusamapeople":e="wss://kusama-people-rpc.polkadot.io";break;case"polkadotpeople":e="wss://polkadot-people-rpc.polkadot.io";break;default:console.log("Unknown network provided, "+t)}if(void 0===e)console.log("Failed to connect to a valid websocket, applying default");else{var s=function(){var e=(0,o.A)((0,a.A)().mark((function e(){var o;return(0,a.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,c(t,n,p);case 2:if(void 0!==(o=e.sent)){e.next=7;break}return e.abrupt("return");case 7:void 0!==l?u(o,l,t,p):p(o);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();try{s()}catch(r){console.log(r)}}}),[]),h}},11135:e=>{var t="polkadot",n="kusama",a="statemine",o="statemint",s="polkadotpeople",i="kusamapeople",r={polkadot:{precision:1e10,symbol:"DOT"},kusama:{precision:1e12,symbol:"KSM"},statemint:{precision:1e10,symbol:"DOT"},statemine:{precision:1e12,symbol:"KSM"},polkadotpeople:{precision:1e10,symbol:"DOT"},kusamapeople:{precision:1e12,symbol:"KSM"}};e.exports={HumanReadable:function(e,l,c){var d=void 0;if(l===t||l===o)d=3;else if(l===n||l===a||l===s)d=6;else{if(l!=i)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");d=8}e=parseFloat(e),c((e=Number.isInteger(e/r[l].precision)?e/r[l].precision+" "+r[l].symbol:(e/r[l].precision).toFixed(d)+" "+r[l].symbol).toString())},Precise:function(e,t,n){n(e=(e=parseFloat(e))/r[t].precision+" "+r[t].symbol)},BlocksToDays:function(e,t){t((e=6*e/86400).toString())},ErasToDays:function(e,r,l){var c=void 0;if(l===t||l===o||l==s)c=1;else{if(l!==n&&l!==a&&l!=i)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");c=4}r((e/=c).toString())},Percentage:function(e,t){t((e/=1e7).toString())},PermillToPercent:function(e,t){t((e/=1e4).toString())},ArrayLength:function(e,t){t((e=e.split(",").length).toString())}}},3514:(e,t,n)=>{"use strict";n.d(t,{A:()=>x});n(96540);var a=n(34164),o=n(26972),s=n(28774),i=n(53465),r=n(16654),l=n(21312),c=n(51107);const d={cardContainer:"cardContainer_fWXF",cardTitle:"cardTitle_rnsV",cardDescription:"cardDescription_PWke"};var u=n(74848);function h(e){var t=e.href,n=e.children;return(0,u.jsx)(s.A,{href:t,className:(0,a.A)("card padding--lg",d.cardContainer),children:n})}function p(e){var t=e.href,n=e.icon,o=e.title,s=e.description;return(0,u.jsxs)(h,{href:t,children:[(0,u.jsxs)(c.A,{as:"h2",className:(0,a.A)("text--truncate",d.cardTitle),title:o,children:[n," ",o]}),s&&(0,u.jsx)("p",{className:(0,a.A)("text--truncate",d.cardDescription),title:s,children:s})]})}function m(e){var t,n,a=e.item,s=(0,o.Nr)(a),r=(n=(0,i.W)().selectMessage,function(e){return n(e,(0,l.T)({message:"1 item|{count} items",id:"theme.docs.DocCard.categoryDescription.plurals",description:"The default description for a category card in the generated index about how many items this category includes"},{count:e}))});return s?(0,u.jsx)(p,{href:s,icon:"\ud83d\uddc3\ufe0f",title:a.label,description:null!=(t=a.description)?t:r(a.items.length)}):null}function k(e){var t,n,a=e.item,s=(0,r.A)(a.href)?"\ud83d\udcc4\ufe0f":"\ud83d\udd17",i=(0,o.cC)(null!=(t=a.docId)?t:void 0);return(0,u.jsx)(p,{href:a.href,icon:s,title:a.label,description:null!=(n=a.description)?n:null==i?void 0:i.description})}function g(e){var t=e.item;switch(t.type){case"link":return(0,u.jsx)(k,{item:t});case"category":return(0,u.jsx)(m,{item:t});default:throw new Error("unknown item type "+JSON.stringify(t))}}function f(e){var t=e.className,n=(0,o.$S)();return(0,u.jsx)(x,{items:n.items,className:t})}function x(e){var t=e.items,n=e.className;if(!t)return(0,u.jsx)(f,Object.assign({},e));var s=(0,o.d1)(t);return(0,u.jsx)("section",{className:(0,a.A)("row",n),children:s.map((function(e,t){return(0,u.jsx)("article",{className:"col col--6 margin-bottom--lg",children:(0,u.jsx)(g,{item:e})},t)}))})}},53465:(e,t,n)=>{"use strict";n.d(t,{W:()=>c});var a=n(96540),o=n(44586),s=["zero","one","two","few","many","other"];function i(e){return s.filter((function(t){return e.includes(t)}))}var r={locale:"en",pluralForms:i(["one","other"]),select:function(e){return 1===e?"one":"other"}};function l(){var e=(0,o.A)().i18n.currentLocale;return(0,a.useMemo)((function(){try{return t=e,n=new Intl.PluralRules(t),{locale:t,pluralForms:i(n.resolvedOptions().pluralCategories),select:function(e){return n.select(e)}}}catch(a){return console.error('Failed to use Intl.PluralRules for locale "'+e+'".\nDocusaurus will fallback to the default (English) implementation.\nError: '+a.message+"\n"),r}var t,n}),[e])}function c(){var e=l();return{selectMessage:function(t,n){return function(e,t,n){var a=e.split("|");if(1===a.length)return a[0];a.length>n.pluralForms.length&&console.error("For locale="+n.locale+", a maximum of "+n.pluralForms.length+" plural forms are expected ("+n.pluralForms.join(",")+"), but the message contains "+a.length+": "+e);var o=n.select(t),s=n.pluralForms.indexOf(o);return a[Math.min(s,a.length-1)]}(n,t,e)}}}},59300:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const a=n.p+"assets/images/kusama_nominator_popup-633f75e8b404699f33b7d78f5ad7fd34.png"},20412:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const a=n.p+"assets/images/kusama_nominator_selection-8e7c4058648339294ebce2e1ce0c58e8.png"},15070:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const a=n.p+"assets/images/01-cc60f0cb7494041501c0ed80e5dca352.png"},30626:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const a=n.p+"assets/images/polkadotjs_payout_complete-87ad124d5d70e50c16f1434074562d70.png"},32630:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const a=n.p+"assets/images/polkadotjs_payout_page-fc4f62399f71b542e9eaac01405ef528.png"},43233:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const a=n.p+"assets/images/polkadotjs_payout_popup-feb847cdfae64f3fa247cdb2beea4ba6.png"},47790:()=>{}}]); \ No newline at end of file diff --git a/assets/js/804b1e9f.a3183d88.js b/assets/js/804b1e9f.a3183d88.js new file mode 100644 index 000000000000..0a4a419e02ba --- /dev/null +++ b/assets/js/804b1e9f.a3183d88.js @@ -0,0 +1 @@ +(self.webpackChunk=self.webpackChunk||[]).push([[1062],{7210:(e,t,n)=>{"use strict";n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>l,default:()=>h,frontMatter:()=>r,metadata:()=>a,toc:()=>d});const a=JSON.parse('{"id":"learn/learn-guides-nominator","title":"Polkadot-JS Guides For Nominators","description":"Polkadot-JS Guides for Nominators.","source":"@site/../docs/learn/learn-guides-nominator.md","sourceDirName":"learn","slug":"/learn-guides-nominator","permalink":"/docs/learn-guides-nominator","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-nominator.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1729847256000,"frontMatter":{"id":"learn-guides-nominator","title":"Polkadot-JS Guides For Nominators","sidebar_label":"Nominator Guides","description":"Polkadot-JS Guides for Nominators.","keyword":["nominate","stake","staking","claim","rewards","polkadot-js"],"slug":"../learn-guides-nominator"},"sidebar":"docs","previous":{"title":"Staking Guides","permalink":"/docs/learn-guides-staking"},"next":{"title":"Nomination Pool Guides","permalink":"/docs/learn-guides-staking-pools"}}');var o=n(74848),s=n(28453),i=(n(47379),n(67141));n(3514);const r={id:"learn-guides-nominator",title:"Polkadot-JS Guides For Nominators",sidebar_label:"Nominator Guides",description:"Polkadot-JS Guides for Nominators.",keyword:["nominate","stake","staking","claim","rewards","polkadot-js"],slug:"../learn-guides-nominator"},l=void 0,c={},d=[{value:"Nominate Using Polkadot-JS",id:"nominate-using-polkadot-js",level:2},{value:"Bond your tokens",id:"bond-your-tokens",level:3},{value:"Nominate a validator",id:"nominate-a-validator",level:3},{value:"Stop nominating",id:"stop-nominating",level:3},{value:"Claiming Rewards with Polkadot-JS",id:"claiming-rewards-with-polkadot-js",level:2},{value:"Using Command-Line Interface (CLI)",id:"using-command-line-interface-cli",level:2},{value:"Step 1: Install @polkadot/api-cli",id:"step-1-install-polkadotapi-cli",level:3},{value:"Step 2: Bond Tokens",id:"step-2-bond-tokens",level:3},{value:"Step 3: Nominate a validator",id:"step-3-nominate-a-validator",level:3}];function u(e){const t={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(i.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the Polkadot-JS UI, you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,o.jsxs)(t.p,{children:["See ",(0,o.jsx)(t.a,{href:"/docs/learn-staking",children:"this page"})," to learn about staking."]}),"\n",(0,o.jsx)(t.h2,{id:"nominate-using-polkadot-js",children:"Nominate Using Polkadot-JS"}),"\n",(0,o.jsx)(t.admonition,{title:"Video Tutorials",type:"info",children:(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsx)(t.li,{children:(0,o.jsx)(t.a,{href:"https://youtu.be/FCXC0CDhyS4?t=219",children:"How to Nominate/Stake"})}),"\n",(0,o.jsx)(t.li,{children:(0,o.jsx)(t.a,{href:"https://youtu.be/7VlTncHCGPc",children:"Staking with a Ledger device and Polkadot-JS"})}),"\n",(0,o.jsx)(t.li,{children:(0,o.jsx)(t.a,{href:"https://www.youtube.com/watch?v=jL-N_IWiYVA",children:"Staking with a Ledger device and Ledger Live"})}),"\n"]})}),"\n",(0,o.jsx)(t.h3,{id:"bond-your-tokens",children:"Bond your tokens"}),"\n",(0,o.jsx)(t.admonition,{title:"Support Article",type:"info",children:(0,o.jsxs)(t.p,{children:["Read the support article about\n",(0,o.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000168057-polkadot-js-ui-how-do-i-stake-nominate-on-polkadot-",children:"How to Bond Tokens and Nominate"}),"."]})}),"\n",(0,o.jsxs)(t.p,{children:["On the ",(0,o.jsx)(t.a,{href:"https://polkadot.js.org/apps",children:"Polkadot-JS UI"}),' navigate to the "Staking" tab (within the\n"Network" menu).']}),"\n",(0,o.jsxs)(t.p,{children:['The "Staking Overview" subsection will show you all the active validators and their information -\ntheir identities, the amount of KSM that are staking for them, amount that is their own provided\nstake, how much they charge in commission, the era points they\'ve earned in the current era, and the\nlast block number that they produced. If you click on the chart button it will take you to the\n"Validator Stats" page for that validator that shows you more detailed and historical information\nabout the validator\'s stake, rewards and ',(0,o.jsx)(t.a,{href:"/docs/learn-offenses",children:"slashes"}),"."]}),"\n",(0,o.jsxs)(t.p,{children:['The "Account actions" subsection (',(0,o.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/staking/actions",children:"link"}),") allows you\nto stake and nominate."]}),"\n",(0,o.jsxs)(t.p,{children:['The "Payouts" subsection (',(0,o.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/staking/payouts",children:"link"}),") allows you to\nclaim rewards from staking."]}),"\n",(0,o.jsxs)(t.p,{children:['The "Targets" subsection (',(0,o.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/staking/targets",children:"link"}),") will help you\nestimate your earnings and this is where it's good to start picking favorites."]}),"\n",(0,o.jsxs)(t.p,{children:['The "Waiting" subsection (',(0,o.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/staking/waiting",children:"link"}),") lists all pending\nvalidators that are awaiting more nominations to enter the active validator set. Validators will\nstay in the waiting queue until they have enough KSM backing them (as allocated through the\n",(0,o.jsx)(t.a,{href:"/docs/learn-phragmen",children:"Phragm\xe9n election mechanism"}),"). It is possible validator can remain in the\nqueue for a very long time if they never get enough backing."]}),"\n",(0,o.jsxs)(t.p,{children:['The "Validator Stats" subsection (',(0,o.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/staking/query",children:"link"}),") allows you\nto query a validator's stash address and see historical charts on era points, elected stake,\nrewards, and ",(0,o.jsx)(t.a,{href:"/docs/learn-offenses",children:"slashes"}),"."]}),"\n",(0,o.jsx)(t.p,{children:'Pick "Account actions" underneath "Network" > "Staking", then click the "+ Nominator" button.'}),"\n",(0,o.jsx)(t.p,{children:"You will see a modal window that looks like the below:"}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{alt:"nominator-update-1",src:n(59300).A+"",width:"2194",height:"1170"})}),"\n",(0,o.jsxs)(t.p,{children:['Select a "value bonded" that is ',(0,o.jsx)(t.strong,{children:"less"})," than the total amount of KSM you have, so you have some\nleft over to pay transaction fees. Transaction fees are currently at least 0.01 KSM, but they are\ndynamic based on a variety of factors including the load of recent blocks."]}),"\n",(0,o.jsx)(t.p,{children:"Also be mindful of the reaping threshold - the amount that must remain in an account lest it be\nburned. That amount is 0.01 in Kusama, so it's recommended to keep at least 0.1 KSM in your account\nto be on the safe side."}),"\n",(0,o.jsx)(t.p,{children:"Choose whatever payment destination that makes sense to you. If you're unsure, you can choose \"Stash\naccount (increase amount at stake)\" to simply accrue the rewards into the amount you're staking and\nearn compound interest."}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{alt:"Payout account selection dropdown with the custom account option highlighted",src:n(15070).A+"",width:"742",height:"245"})}),"\n",(0,o.jsx)(t.h3,{id:"nominate-a-validator",children:"Nominate a validator"}),"\n",(0,o.jsx)(t.admonition,{title:"Support Article",type:"info",children:(0,o.jsxs)(t.p,{children:["Read the support article about\n",(0,o.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000150130-how-do-i-know-which-validators-to-choose-",children:"How to Select Validators"}),"."]})}),"\n",(0,o.jsxs)(t.p,{children:["You are now bonded. Being bonded means your tokens are locked and could be\n",(0,o.jsx)(t.a,{href:"/docs/learn-offenses",children:"slashed"})," if the validators you nominate misbehave. All bonded funds can be\ndistributed to ",(0,o.jsx)(t.a,{href:"/docs/chain-state-values#maximum-votes-per-nominator",children:"multiple validators"}),".\nBe careful about the validators you choose since you will be slashed if your validator commits an\n",(0,o.jsx)(t.a,{href:"/docs/learn-offenses",children:"offence"}),"."]}),"\n",(0,o.jsx)(t.p,{children:'Click on "Nominate" on an account you\'ve bonded and you will be presented with another popup asking\nyou to select some validators.'}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{alt:"Nominating validators",src:n(20412).A+"",width:"2208",height:"982"})}),"\n",(0,o.jsxs)(t.p,{children:["Select them, confirm the transaction, and you're done - you are now nominating. Your nominations\nwill become active in the next era. Eras last six hours on Kusama - depending on when you do this,\nyour nominations may become active almost immediately, or you may have to wait almost the entire six\nhours before your nominations are active. You can check how far along Kusama is in the current era\non the ",(0,o.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/staking",children:"Staking page"}),"."]}),"\n",(0,o.jsxs)(t.p,{children:["Assuming at least one of your nominations ends up in the active validator set, you will start to get\nrewards allocated to you. In order to claim them (i.e., add them to your account), you must manually\nclaim them. To initiate a claim, you can do it yourself or have the validator that you staked for\ninitiate a claim. This is to help optimize the effectiveness and storage of payouts on Kusama. See\nthe ",(0,o.jsx)(t.a,{href:"/docs/learn-staking#claiming-rewards",children:"Claiming Rewards"})," section of the Staking wiki page for\nmore details."]}),"\n",(0,o.jsx)(t.h3,{id:"stop-nominating",children:"Stop nominating"}),"\n",(0,o.jsx)(t.admonition,{title:"Support Article",type:"info",children:(0,o.jsxs)(t.p,{children:["Read the support article about\n",(0,o.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000167902-how-can-i-unstake-my-tokens-again-",children:"How to Stop Nominating & Unbond Tokens"}),".\nSee also the support article about\n",(0,o.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000170241-polkadot-js-ui-how-to-rebond-tokens-during-the-unbonding-period",children:"How to Rebond Tokens"}),"."]})}),"\n",(0,o.jsx)(t.p,{children:"At some point, you might decide to stop nominating one or more validators. You can always change who\nyou're nominating, but you cannot withdraw your tokens unless you unbond them."}),"\n",(0,o.jsx)(t.h2,{id:"claiming-rewards-with-polkadot-js",children:"Claiming Rewards with Polkadot-JS"}),"\n",(0,o.jsx)(t.p,{children:"Anyone can trigger a payout for any validator, as long as they are willing to pay the transaction\nfee. Someone must submit a transaction with a validator ID and an era index. Polkadot will\nautomatically calculate that validator's reward and distribute the rewards pro rata."}),"\n",(0,o.jsxs)(t.p,{children:["These details are handled for you automatically if you use the\n",(0,o.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/staking/payout",children:"Polkadot-JS UI"}),", which also allows you to submit\nbatches of eras at once."]}),"\n",(0,o.jsx)(t.p,{children:'To claim rewards on Polkadot-JS UI, you will need to be in the "Payouts" tab underneath "Staking",\nwhich will list all the pending payouts for your stashes.'}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{alt:"pending-payouts",src:n(32630).A+"",width:"2876",height:"600"})}),"\n",(0,o.jsx)(t.p,{children:'To then claim your reward, select the "Payout all" button. This will prompt you to select your stash\naccounts for payout.'}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{alt:"select-payouts",src:n(43233).A+"",width:"2192",height:"624"})}),"\n",(0,o.jsx)(t.p,{children:"Once you are done with payout, another screen will appear asking for you to sign and submit the\ntransaction."}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{alt:"transaction-payouts",src:n(30626).A+"",width:"2878",height:"818"})}),"\n",(0,o.jsx)(t.h2,{id:"using-command-line-interface-cli",children:"Using Command-Line Interface (CLI)"}),"\n",(0,o.jsx)(t.p,{children:"Apart from using the Polkadot-JS UI to participate in the staking, you can do all these things in\nCLI instead. The CLI approach allows you to interact with the network without using Polkadot-JS."}),"\n",(0,o.jsx)(t.h3,{id:"step-1-install-polkadotapi-cli",children:"Step 1: Install @polkadot/api-cli"}),"\n",(0,o.jsxs)(t.p,{children:["We assume you have installed ",(0,o.jsx)(t.a,{href:"https://nodejs.org",children:"NodeJS with npm"}),". Run the following command to\ninstall the ",(0,o.jsx)(t.code,{children:"@polkadot/api-cli"})," globally:"]}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-bash",children:"npm install -g @polkadot/api-cli\n"})}),"\n",(0,o.jsx)(t.h3,{id:"step-2-bond-tokens",children:"Step 2: Bond Tokens"}),"\n",(0,o.jsx)(t.admonition,{title:"Controller accounts are deprecated",type:"info",children:(0,o.jsxs)(t.p,{children:["Controller accounts are deprecated. For more information, see\n",(0,o.jsx)(t.a,{href:"https://forum.polkadot.network/t/staking-controller-deprecation-plan-staking-ui-leads-comms/2748",children:"this discussion"}),"."]})}),"\n",(0,o.jsx)(t.p,{children:"Executing the following command:"}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-bash",children:'polkadot-js-api --seed "MNEMONIC_PHRASE" tx.staking.bond CONTROLLER_ADDRESS NUMBER_OF_TOKENS REWARD_DESTINATION --ws WEBSOCKET_ENDPOINT\n'})}),"\n",(0,o.jsxs)(t.p,{children:[(0,o.jsx)(t.code,{children:"CONTROLLER_ADDRESS"}),": An address you would like to bond to the stash account. (Controller accounts\nare now deprecated. Refer to\n",(0,o.jsx)(t.a,{href:"https://forum.polkadot.network/t/staking-controller-deprecation-plan-staking-ui-leads-comms/2748",children:"this discussion"}),"\nfor additional context)"]}),"\n",(0,o.jsxs)(t.p,{children:[(0,o.jsx)(t.code,{children:"NUMBER_OF_TOKENS"}),": The number of native tokens (in Plancks) you would like to stake to the network.\nFor more information, see ",(0,o.jsx)(t.a,{href:"/docs/learn-DOT",children:"this page"}),"."]}),"\n",(0,o.jsxs)(t.p,{children:[(0,o.jsx)(t.code,{children:"REWARD_DESTINATION"}),":"]}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.code,{children:"Staked"})," - Pay into the stash account, increasing the amount at stake accordingly."]}),"\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.code,{children:"Stash"})," - Pay into the stash account, not increasing the amount at stake."]}),"\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.code,{children:"Account"})," - Pay into a custom account that is not the stash (can be a proxy or another type of\naccount)."]}),"\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.code,{children:"Controller"})," - Pay into the controller account."]}),"\n"]}),"\n",(0,o.jsx)(t.p,{children:"Example for Kusama:"}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-bash",children:'polkadot-js-api --seed "xxxx xxxxx xxxx xxxxx" tx.staking.bond DMTHrNcmA8QbqRS4rBq8LXn8ipyczFoNMb1X4cY2WD9tdBX 1000000000000 Staked --ws wss://kusama-rpc.polkadot.io\n'})}),"\n",(0,o.jsxs)(t.p,{children:["For wss endpoints see ",(0,o.jsx)(t.a,{href:"/docs/maintain-endpoints",children:"this page"}),"."]}),"\n",(0,o.jsx)(t.p,{children:"Result:"}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-bash",children:'...\n...\n "status": {\n "InBlock": "0x0ed1ec0ba69564e8f98958d69f826adef895b5617366a32a3aa384290e98514e"\n }\n'})}),"\n",(0,o.jsxs)(t.p,{children:["You can check the transaction status by using the value of the ",(0,o.jsx)(t.code,{children:"InBlock"})," in\n",(0,o.jsx)(t.a,{href:"https://www.subscan.io/",children:"Subscan"}),". Also, you can verify the bonding state under the\n",(0,o.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/staking/actions",children:"Staking"})," page on the Polkadot-JS UI."]}),"\n",(0,o.jsx)(t.h3,{id:"step-3-nominate-a-validator",children:"Step 3: Nominate a validator"}),"\n",(0,o.jsx)(t.p,{children:"To nominate a validator, you can execute the following command:"}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-bash",children:'polkadot-js-api --seed "MNEMONIC_PHRASE" tx.staking.nominate \'["VALIDATOR_ADDRESS"]\' --ws WS_ENDPOINT\n'})}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-bash",children:'polkadot-js-api --seed "xxxx xxxxx xxxx xxxxx" tx.staking.nominate \'["CmD9vaMYoiKe7HiFnfkftwvhKbxN9bhyjcDrfFRGbifJEG8","E457XaKbj2yTB2URy8N4UuzmyuFRkcdxYs67UvSgVr7HyFb"]\' --ws wss://kusama-rpc.polkadot.io\n'})}),"\n",(0,o.jsx)(t.p,{children:"After a few seconds, you should see the hash of the transaction, and if you would like to verify the\nnomination status, you can check that on the Polkadot-JS UI as well."})]})}function h(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(u,{...e})}):u(e)}},67141:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var a=n(96540),o=n(74848);const s=function(e){var t,n=e.message,s=(0,a.useState)(!0),i=s[0],r=s[1];return(0,o.jsx)(o.Fragment,{children:i&&(0,o.jsxs)("div",{className:"message-box",children:[(0,o.jsx)("button",{className:"close-button",onClick:function(){r(!1)},children:"\u2716 "}),(0,o.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(t=n,t.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},47379:(e,t,n)=>{"use strict";n.d(t,{A:()=>h});var a=n(90675),o=n(10467),s=n(96540),i=n(19588),r=n(2026),l=n(11135);function c(e,t,n){return d.apply(this,arguments)}function d(){return(d=(0,o.A)((0,a.A)().mark((function e(t,n,o){var s,l,c,d,u;return(0,a.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s=void 0,l=void 0,e.t0=t,e.next="polkadot"===e.t0?5:"kusama"===e.t0?7:"statemine"===e.t0?9:"statemint"===e.t0?11:"polkadotpeople"===e.t0?13:"kusamapeople"===e.t0?15:17;break;case 5:return s="wss://rpc.polkadot.io",e.abrupt("break",18);case 7:return s="wss://kusama-rpc.polkadot.io/",e.abrupt("break",18);case 9:return s="wss://statemine-rpc.polkadot.io/",e.abrupt("break",18);case 11:return s="wss://statemint-rpc.polkadot.io/",e.abrupt("break",18);case 13:return s="wss://polkadot-people-rpc.polkadot.io/",e.abrupt("break",18);case 15:return s="wss://kusama-people-rpc.polkadot.io/",e.abrupt("break",18);case 17:console.log("Unknown socket url provided, no connection made.");case 18:if(void 0!==s){e.next=22;break}return e.abrupt("return");case 22:return c=new i.E(s),e.next=25,r.G.create({provider:c});case 25:d=e.sent,(u=n.split(".")).forEach((function(e){e in d&&(d=d[e])})),e.t1=u[0],e.next="consts"===e.t1?31:"query"===e.t1?33:38;break;case 31:return l=d.toString(),e.abrupt("break",39);case 33:return e.next=35,d();case 35:return l=(l=e.sent).toString(),e.abrupt("break",39);case 38:console.log("Unknown path prefix ("+u[0]+") in "+n);case 39:return e.abrupt("return",l);case 40:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function u(e,t,n,a){switch(t){case"humanReadable":(0,l.HumanReadable)(e,n,a);break;case"precise":(0,l.Precise)(e,n,a);break;case"blocksToDays":(0,l.BlocksToDays)(e,a);break;case"erasToDays":(0,l.ErasToDays)(e,a,n);break;case"percentage":(0,l.Percentage)(e,a);break;case"permillToPercent":(0,l.PermillToPercent)(e,a);break;case"arrayLength":(0,l.ArrayLength)(e,a);break;default:return void console.log("Ignoring unknown filter type")}}const h=function(e){var t=e.network,n=e.path,i=e.defaultValue,r=e.filter,l=void 0===r?void 0:r,d=(0,s.useState)(""),h=d[0],p=d[1];return t=t.toLowerCase(),(0,s.useEffect)((function(){void 0!==l?u(i.toString(),l,t,p):p(i.toString());var e=void 0;switch(t){case"polkadot":e="wss://rpc.polkadot.io";break;case"kusama":e="wss://kusama-rpc.polkadot.io/";break;case"statemine":e="wss://kusama-asset-hub-rpc.polkadot.io/";break;case"statemint":e="wss://polkadot-asset-hub-rpc.polkadot.io/";break;case"kusamapeople":e="wss://kusama-people-rpc.polkadot.io";break;case"polkadotpeople":e="wss://polkadot-people-rpc.polkadot.io";break;default:console.log("Unknown network provided, "+t)}if(void 0===e)console.log("Failed to connect to a valid websocket, applying default");else{var s=function(){var e=(0,o.A)((0,a.A)().mark((function e(){var o;return(0,a.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,c(t,n,p);case 2:if(void 0!==(o=e.sent)){e.next=7;break}return e.abrupt("return");case 7:void 0!==l?u(o,l,t,p):p(o);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();try{s()}catch(r){console.log(r)}}}),[]),h}},11135:e=>{var t="polkadot",n="kusama",a="statemine",o="statemint",s="polkadotpeople",i="kusamapeople",r={polkadot:{precision:1e10,symbol:"DOT"},kusama:{precision:1e12,symbol:"KSM"},statemint:{precision:1e10,symbol:"DOT"},statemine:{precision:1e12,symbol:"KSM"},polkadotpeople:{precision:1e10,symbol:"DOT"},kusamapeople:{precision:1e12,symbol:"KSM"}};e.exports={HumanReadable:function(e,l,c){var d=void 0;if(l===t||l===o)d=3;else if(l===n||l===a||l===s)d=6;else{if(l!=i)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");d=8}e=parseFloat(e),c((e=Number.isInteger(e/r[l].precision)?e/r[l].precision+" "+r[l].symbol:(e/r[l].precision).toFixed(d)+" "+r[l].symbol).toString())},Precise:function(e,t,n){n(e=(e=parseFloat(e))/r[t].precision+" "+r[t].symbol)},BlocksToDays:function(e,t){t((e=6*e/86400).toString())},ErasToDays:function(e,r,l){var c=void 0;if(l===t||l===o||l==s)c=1;else{if(l!==n&&l!==a&&l!=i)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");c=4}r((e/=c).toString())},Percentage:function(e,t){t((e/=1e7).toString())},PermillToPercent:function(e,t){t((e/=1e4).toString())},ArrayLength:function(e,t){t((e=e.split(",").length).toString())}}},3514:(e,t,n)=>{"use strict";n.d(t,{A:()=>x});n(96540);var a=n(34164),o=n(26972),s=n(28774),i=n(53465),r=n(16654),l=n(21312),c=n(51107);const d={cardContainer:"cardContainer_fWXF",cardTitle:"cardTitle_rnsV",cardDescription:"cardDescription_PWke"};var u=n(74848);function h(e){var t=e.href,n=e.children;return(0,u.jsx)(s.A,{href:t,className:(0,a.A)("card padding--lg",d.cardContainer),children:n})}function p(e){var t=e.href,n=e.icon,o=e.title,s=e.description;return(0,u.jsxs)(h,{href:t,children:[(0,u.jsxs)(c.A,{as:"h2",className:(0,a.A)("text--truncate",d.cardTitle),title:o,children:[n," ",o]}),s&&(0,u.jsx)("p",{className:(0,a.A)("text--truncate",d.cardDescription),title:s,children:s})]})}function m(e){var t,n,a=e.item,s=(0,o.Nr)(a),r=(n=(0,i.W)().selectMessage,function(e){return n(e,(0,l.T)({message:"1 item|{count} items",id:"theme.docs.DocCard.categoryDescription.plurals",description:"The default description for a category card in the generated index about how many items this category includes"},{count:e}))});return s?(0,u.jsx)(p,{href:s,icon:"\ud83d\uddc3\ufe0f",title:a.label,description:null!=(t=a.description)?t:r(a.items.length)}):null}function k(e){var t,n,a=e.item,s=(0,r.A)(a.href)?"\ud83d\udcc4\ufe0f":"\ud83d\udd17",i=(0,o.cC)(null!=(t=a.docId)?t:void 0);return(0,u.jsx)(p,{href:a.href,icon:s,title:a.label,description:null!=(n=a.description)?n:null==i?void 0:i.description})}function g(e){var t=e.item;switch(t.type){case"link":return(0,u.jsx)(k,{item:t});case"category":return(0,u.jsx)(m,{item:t});default:throw new Error("unknown item type "+JSON.stringify(t))}}function f(e){var t=e.className,n=(0,o.$S)();return(0,u.jsx)(x,{items:n.items,className:t})}function x(e){var t=e.items,n=e.className;if(!t)return(0,u.jsx)(f,Object.assign({},e));var s=(0,o.d1)(t);return(0,u.jsx)("section",{className:(0,a.A)("row",n),children:s.map((function(e,t){return(0,u.jsx)("article",{className:"col col--6 margin-bottom--lg",children:(0,u.jsx)(g,{item:e})},t)}))})}},53465:(e,t,n)=>{"use strict";n.d(t,{W:()=>c});var a=n(96540),o=n(44586),s=["zero","one","two","few","many","other"];function i(e){return s.filter((function(t){return e.includes(t)}))}var r={locale:"en",pluralForms:i(["one","other"]),select:function(e){return 1===e?"one":"other"}};function l(){var e=(0,o.A)().i18n.currentLocale;return(0,a.useMemo)((function(){try{return t=e,n=new Intl.PluralRules(t),{locale:t,pluralForms:i(n.resolvedOptions().pluralCategories),select:function(e){return n.select(e)}}}catch(a){return console.error('Failed to use Intl.PluralRules for locale "'+e+'".\nDocusaurus will fallback to the default (English) implementation.\nError: '+a.message+"\n"),r}var t,n}),[e])}function c(){var e=l();return{selectMessage:function(t,n){return function(e,t,n){var a=e.split("|");if(1===a.length)return a[0];a.length>n.pluralForms.length&&console.error("For locale="+n.locale+", a maximum of "+n.pluralForms.length+" plural forms are expected ("+n.pluralForms.join(",")+"), but the message contains "+a.length+": "+e);var o=n.select(t),s=n.pluralForms.indexOf(o);return a[Math.min(s,a.length-1)]}(n,t,e)}}}},59300:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const a=n.p+"assets/images/kusama_nominator_popup-633f75e8b404699f33b7d78f5ad7fd34.png"},20412:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const a=n.p+"assets/images/kusama_nominator_selection-8e7c4058648339294ebce2e1ce0c58e8.png"},15070:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const a=n.p+"assets/images/01-cc60f0cb7494041501c0ed80e5dca352.png"},30626:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const a=n.p+"assets/images/polkadotjs_payout_complete-87ad124d5d70e50c16f1434074562d70.png"},32630:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const a=n.p+"assets/images/polkadotjs_payout_page-fc4f62399f71b542e9eaac01405ef528.png"},43233:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const a=n.p+"assets/images/polkadotjs_payout_popup-feb847cdfae64f3fa247cdb2beea4ba6.png"},47790:()=>{}}]); \ No newline at end of file diff --git a/assets/js/8081c0c6.85228e70.js b/assets/js/8081c0c6.85228e70.js deleted file mode 100644 index 7b8c92820028..000000000000 --- a/assets/js/8081c0c6.85228e70.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8568],{77206:(a,e,t)=>{t.r(e),t.d(e,{assets:()=>d,contentTitle:()=>o,default:()=>c,frontMatter:()=>i,metadata:()=>r,toc:()=>h});var s=t(74848),n=t(28453);const i={id:"parity-data-dashboards",title:"Parity Data Dashboards",sidebar_label:"Parity Data Dashboards",description:"Data dashboards maintained by the Parity Data team",keywords:["data","data-analytics","polkadot","dashboard","dashboards"],slug:"../parity-data-dashboards"},o=void 0,r={id:"general/parity-data-dashboards",title:"Parity Data Dashboards",description:"Data dashboards maintained by the Parity Data team",source:"@site/../docs/general/parity-data-dashboards.md",sourceDirName:"general",slug:"/parity-data-dashboards",permalink:"/docs/parity-data-dashboards",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/parity-data-dashboards.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1726730833e3,frontMatter:{id:"parity-data-dashboards",title:"Parity Data Dashboards",sidebar_label:"Parity Data Dashboards",description:"Data dashboards maintained by the Parity Data team",keywords:["data","data-analytics","polkadot","dashboard","dashboards"],slug:"../parity-data-dashboards"},sidebar:"docs",previous:{title:"DuneSQL Cheatsheet",permalink:"/docs/general/dunesql-cheatsheet"},next:{title:"Staking Dashboard",permalink:"/docs/staking-dashboard"}},d={},h=[{value:"Accessing Polkadot Ecosystem Dashboards",id:"accessing-polkadot-ecosystem-dashboards",level:2},{value:"Notes on How to Use the Interactive Charts",id:"notes-on-how-to-use-the-interactive-charts",level:2},{value:"Where the Data Comes From",id:"where-the-data-comes-from",level:2},{value:"Support: Data Requests, Collaborations, Parachain Onboarding etc.",id:"support-data-requests-collaborations-parachain-onboarding-etc",level:2}];function l(a){const e={a:"a",h2:"h2",img:"img",li:"li",p:"p",strong:"strong",ul:"ul",...(0,n.R)(),...a.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(e.h2,{id:"accessing-polkadot-ecosystem-dashboards",children:"Accessing Polkadot Ecosystem Dashboards"}),"\n",(0,s.jsxs)(e.p,{children:["The Parity Data Team has made publicly available a ",(0,s.jsx)(e.a,{href:"https://dashboards.data.paritytech.io/",children:"website"}),"\nthat displays a number of dashboards relating to Polkadot Ecosystem On-Chain data. The graphs\nprovided are grouped into the following sections:"]}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.a,{href:"https://dashboards.data.paritytech.io/stablecoins.html",children:"Stablecoins"})," - metrics around stablecoins\nin Polkadot AssetHub."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.a,{href:"https://dashboards.data.paritytech.io/treasuries.html",children:"Treasury"})," - metrics around treasuries in\nthe ecosystem."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.a,{href:"https://dashboards.data.paritytech.io/staking.html",children:"Staking"})," - metrics pertaining to staking,\nnomination pools and more."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.a,{href:"https://dashboards.data.paritytech.io/parachains.html",children:"Ecosystem"})," - high level activity metrics\nfor relay chains and Parachains."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.a,{href:"https://dashboards.data.paritytech.io/eoyr.html",children:"Monthly Report"})," - an updated version of the\n",(0,s.jsx)(e.a,{href:"https://dashboards.data.paritytech.io/reports/2023/index.html",children:"Polkadot in Numbers: Annual Report 2023"}),"."]}),"\n"]}),"\n",(0,s.jsx)(e.h2,{id:"notes-on-how-to-use-the-interactive-charts",children:"Notes on How to Use the Interactive Charts"}),"\n",(0,s.jsxs)(e.p,{children:["The ",(0,s.jsx)(e.a,{href:"https://dashboards.data.paritytech.io/parachains.html",children:"Ecosystem Tab"})," shows a number of\nuniversally applicable metrics (Active Accounts, Unique Accounts, Transactions, Events) across both\nPolkadot & Kusama Relay/Parachains. Users can select whether they want to view:"]}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsx)(e.li,{children:"Polkadot or Kusama"}),"\n",(0,s.jsx)(e.li,{children:"Daily or monthly figures"}),"\n",(0,s.jsx)(e.li,{children:"Substrate Only, EVM Only or Substrate + EVM numbers."}),"\n"]}),"\n",(0,s.jsx)(e.p,{children:"The default view is set to Polkadot,Monthly, Substrate + EVM."}),"\n",(0,s.jsx)(e.p,{children:(0,s.jsx)(e.img,{alt:"Default Selection",src:t(92081).A+"",width:"2436",height:"1568"})}),"\n",(0,s.jsx)(e.p,{children:"Here is an example of selecting Polkadot, Daily, Substrate Only for Transactions."}),"\n",(0,s.jsx)(e.p,{children:(0,s.jsx)(e.img,{alt:"Daily Substrate Transactions Selection",src:t(91523).A+"",width:"2476",height:"1244"})}),"\n",(0,s.jsx)(e.p,{children:"Users can also specify which chains they would like to view metrics for. The default view is set to\nthe entire Relay & Parachain grouping. Below is an example of selecting data for only Polkadot\nRelay, Moonbeam and Nodle chains. Users can hit invert selection for convenience to de-select all\noptions before selecting their desired chains."}),"\n",(0,s.jsx)(e.p,{children:(0,s.jsx)(e.img,{alt:"Chain Selection",src:t(3415).A+"",width:"2488",height:"1582"})}),"\n",(0,s.jsxs)(e.p,{children:["Also, for all graphs on the website, in the top right users can toggle between chart types: choosing\nbar, line or stacked and a combination of those. See below for an example from the\n",(0,s.jsx)(e.a,{href:"https://dashboards.data.paritytech.io/stablecoins.html",children:"Stablecoins"})," tab."]}),"\n",(0,s.jsx)(e.p,{children:(0,s.jsx)(e.img,{alt:"Stablecoin USDC Example",src:t(47088).A+"",width:"2198",height:"818"})}),"\n",(0,s.jsx)(e.h2,{id:"where-the-data-comes-from",children:"Where the Data Comes From"}),"\n",(0,s.jsxs)(e.p,{children:["The data displayed on the website comes from DotLake, which is a scalable and cost-efficient data\nplatform built on Google Cloud Platform (GCP) by the Data Team at\n",(0,s.jsx)(e.a,{href:"https://www.parity.io/",children:"Parity Technologies"}),". It's designed to store all blocks, events,\nextrinsics, and more for all the chains in the Polkadot ecosystem. The platform uses a range of\nexisting technologies, keeping the architecture simple with low operational overhead. This includes\ntools like Terraform, the Substrate Sidecar, Rust & Python programming languages, and various GCP\nservices like Cloud Storage, BigQuery, Cloud Run & Jobs, and Workflows & Functions."]}),"\n",(0,s.jsx)(e.p,{children:"The approach allows the processing of data from block number N to M, storing the raw results as JSON\nin Google Cloud Storage. This method not only provides a convenient abstraction, but also avoids the\npitfalls of custom block parsing strategies in the ever-evolving Substrate Framework. The key to the\nplatform's efficiency is the Block Compressor, which optimizes and reduces the data size\nsignificantly, making it more manageable for analytical purposes."}),"\n",(0,s.jsx)(e.p,{children:"DotLake has evolved from it's origins as a data warehouse built to serve Parity's internal data\nneeds. Since then, the scope has been broadened to share data intitiatives and learnings with the\nwider community. The plan is to progressively make datasets available to the public, alongside\ndashboards, metrics, code, and best practices employed to ingest and decode Substrate data."}),"\n",(0,s.jsx)(e.p,{children:"DotLake currently consists of 80+ Polkadot, Kusama, solo-chains and test-nets with their full\nhistory and is continuously expanding."}),"\n",(0,s.jsx)(e.p,{children:(0,s.jsx)(e.strong,{children:"DotLake Batch Architecture"})}),"\n",(0,s.jsx)(e.p,{children:(0,s.jsx)(e.img,{alt:"DotLake Batch Architecture",src:t(27240).A+"",width:"1999",height:"1175"})}),"\n",(0,s.jsx)(e.p,{children:(0,s.jsx)(e.strong,{children:"Real-Time Architecture"})}),"\n",(0,s.jsx)(e.p,{children:(0,s.jsx)(e.img,{alt:"Real-Time Architecture",src:t(6536).A+"",width:"1999",height:"1071"})}),"\n",(0,s.jsx)(e.h2,{id:"support-data-requests-collaborations-parachain-onboarding-etc",children:"Support: Data Requests, Collaborations, Parachain Onboarding etc."}),"\n",(0,s.jsxs)(e.p,{children:["The Parity Data Team is very eager to collaborate with the Ecosystem. If you have any questions,\ndata requests that you need help with, interest in partnerships or you are a Parachain team and want\nyour chain onboarded to the platform - please get in contact with ",(0,s.jsx)(e.a,{href:"mailto:data-team@parity.io",children:"data-team@parity.io"}),"."]})]})}function c(a={}){const{wrapper:e}={...(0,n.R)(),...a.components};return e?(0,s.jsx)(e,{...a,children:(0,s.jsx)(l,{...a})}):l(a)}},27240:(a,e,t)=>{t.d(e,{A:()=>s});const s=t.p+"assets/images/dotlake-batch-faf8cffceeafe58fffe1130238cd4efd.png"},6536:(a,e,t)=>{t.d(e,{A:()=>s});const s=t.p+"assets/images/dotlake-rt-27bf74fd16b4c6e348e7132b7124eae7.png"},3415:(a,e,t)=>{t.d(e,{A:()=>s});const s=t.p+"assets/images/ecosystem-chain-selection-example-a76c465ade1ad0a26cabd744346155b6.png"},92081:(a,e,t)=>{t.d(e,{A:()=>s});const s=t.p+"assets/images/ecosystem-chart-default-selection-f6144245cd32be99b964e56aa1b1c36d.png"},91523:(a,e,t)=>{t.d(e,{A:()=>s});const s=t.p+"assets/images/ecosystem-polkadot-daily-substrate-transactions-selection-d2fab579bc6f4845d00ec4720cc10264.png"},47088:(a,e,t)=>{t.d(e,{A:()=>s});const s=t.p+"assets/images/stablecoins-usdc-toggle-chart-type-example-37f2f6aa33e5a49b26adca7f2980773a.png"},28453:(a,e,t)=>{t.d(e,{R:()=>o,x:()=>r});var s=t(96540);const n={},i=s.createContext(n);function o(a){const e=s.useContext(i);return s.useMemo((function(){return"function"==typeof a?a(e):{...e,...a}}),[e,a])}function r(a){let e;return e=a.disableParentContext?"function"==typeof a.components?a.components(n):a.components||n:o(a.components),s.createElement(i.Provider,{value:e},a.children)}}}]); \ No newline at end of file diff --git a/assets/js/8081c0c6.d4e69038.js b/assets/js/8081c0c6.d4e69038.js new file mode 100644 index 000000000000..495a5ca113b4 --- /dev/null +++ b/assets/js/8081c0c6.d4e69038.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8568],{90339:(a,e,t)=>{t.r(e),t.d(e,{assets:()=>d,contentTitle:()=>r,default:()=>c,frontMatter:()=>o,metadata:()=>s,toc:()=>l});const s=JSON.parse('{"id":"general/parity-data-dashboards","title":"Parity Data Dashboards","description":"Data dashboards maintained by the Parity Data team","source":"@site/../docs/general/parity-data-dashboards.md","sourceDirName":"general","slug":"/parity-data-dashboards","permalink":"/docs/parity-data-dashboards","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/parity-data-dashboards.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1726730833000,"frontMatter":{"id":"parity-data-dashboards","title":"Parity Data Dashboards","sidebar_label":"Parity Data Dashboards","description":"Data dashboards maintained by the Parity Data team","keywords":["data","data-analytics","polkadot","dashboard","dashboards"],"slug":"../parity-data-dashboards"},"sidebar":"docs","previous":{"title":"DuneSQL Cheatsheet","permalink":"/docs/general/dunesql-cheatsheet"},"next":{"title":"Staking Dashboard","permalink":"/docs/staking-dashboard"}}');var n=t(74848),i=t(28453);const o={id:"parity-data-dashboards",title:"Parity Data Dashboards",sidebar_label:"Parity Data Dashboards",description:"Data dashboards maintained by the Parity Data team",keywords:["data","data-analytics","polkadot","dashboard","dashboards"],slug:"../parity-data-dashboards"},r=void 0,d={},l=[{value:"Accessing Polkadot Ecosystem Dashboards",id:"accessing-polkadot-ecosystem-dashboards",level:2},{value:"Notes on How to Use the Interactive Charts",id:"notes-on-how-to-use-the-interactive-charts",level:2},{value:"Where the Data Comes From",id:"where-the-data-comes-from",level:2},{value:"Support: Data Requests, Collaborations, Parachain Onboarding etc.",id:"support-data-requests-collaborations-parachain-onboarding-etc",level:2}];function h(a){const e={a:"a",h2:"h2",img:"img",li:"li",p:"p",strong:"strong",ul:"ul",...(0,i.R)(),...a.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(e.h2,{id:"accessing-polkadot-ecosystem-dashboards",children:"Accessing Polkadot Ecosystem Dashboards"}),"\n",(0,n.jsxs)(e.p,{children:["The Parity Data Team has made publicly available a ",(0,n.jsx)(e.a,{href:"https://dashboards.data.paritytech.io/",children:"website"}),"\nthat displays a number of dashboards relating to Polkadot Ecosystem On-Chain data. The graphs\nprovided are grouped into the following sections:"]}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:[(0,n.jsx)(e.a,{href:"https://dashboards.data.paritytech.io/stablecoins.html",children:"Stablecoins"})," - metrics around stablecoins\nin Polkadot AssetHub."]}),"\n",(0,n.jsxs)(e.li,{children:[(0,n.jsx)(e.a,{href:"https://dashboards.data.paritytech.io/treasuries.html",children:"Treasury"})," - metrics around treasuries in\nthe ecosystem."]}),"\n",(0,n.jsxs)(e.li,{children:[(0,n.jsx)(e.a,{href:"https://dashboards.data.paritytech.io/staking.html",children:"Staking"})," - metrics pertaining to staking,\nnomination pools and more."]}),"\n",(0,n.jsxs)(e.li,{children:[(0,n.jsx)(e.a,{href:"https://dashboards.data.paritytech.io/parachains.html",children:"Ecosystem"})," - high level activity metrics\nfor relay chains and Parachains."]}),"\n",(0,n.jsxs)(e.li,{children:[(0,n.jsx)(e.a,{href:"https://dashboards.data.paritytech.io/eoyr.html",children:"Monthly Report"})," - an updated version of the\n",(0,n.jsx)(e.a,{href:"https://dashboards.data.paritytech.io/reports/2023/index.html",children:"Polkadot in Numbers: Annual Report 2023"}),"."]}),"\n"]}),"\n",(0,n.jsx)(e.h2,{id:"notes-on-how-to-use-the-interactive-charts",children:"Notes on How to Use the Interactive Charts"}),"\n",(0,n.jsxs)(e.p,{children:["The ",(0,n.jsx)(e.a,{href:"https://dashboards.data.paritytech.io/parachains.html",children:"Ecosystem Tab"})," shows a number of\nuniversally applicable metrics (Active Accounts, Unique Accounts, Transactions, Events) across both\nPolkadot & Kusama Relay/Parachains. Users can select whether they want to view:"]}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsx)(e.li,{children:"Polkadot or Kusama"}),"\n",(0,n.jsx)(e.li,{children:"Daily or monthly figures"}),"\n",(0,n.jsx)(e.li,{children:"Substrate Only, EVM Only or Substrate + EVM numbers."}),"\n"]}),"\n",(0,n.jsx)(e.p,{children:"The default view is set to Polkadot,Monthly, Substrate + EVM."}),"\n",(0,n.jsx)(e.p,{children:(0,n.jsx)(e.img,{alt:"Default Selection",src:t(92081).A+"",width:"2436",height:"1568"})}),"\n",(0,n.jsx)(e.p,{children:"Here is an example of selecting Polkadot, Daily, Substrate Only for Transactions."}),"\n",(0,n.jsx)(e.p,{children:(0,n.jsx)(e.img,{alt:"Daily Substrate Transactions Selection",src:t(91523).A+"",width:"2476",height:"1244"})}),"\n",(0,n.jsx)(e.p,{children:"Users can also specify which chains they would like to view metrics for. The default view is set to\nthe entire Relay & Parachain grouping. Below is an example of selecting data for only Polkadot\nRelay, Moonbeam and Nodle chains. Users can hit invert selection for convenience to de-select all\noptions before selecting their desired chains."}),"\n",(0,n.jsx)(e.p,{children:(0,n.jsx)(e.img,{alt:"Chain Selection",src:t(3415).A+"",width:"2488",height:"1582"})}),"\n",(0,n.jsxs)(e.p,{children:["Also, for all graphs on the website, in the top right users can toggle between chart types: choosing\nbar, line or stacked and a combination of those. See below for an example from the\n",(0,n.jsx)(e.a,{href:"https://dashboards.data.paritytech.io/stablecoins.html",children:"Stablecoins"})," tab."]}),"\n",(0,n.jsx)(e.p,{children:(0,n.jsx)(e.img,{alt:"Stablecoin USDC Example",src:t(47088).A+"",width:"2198",height:"818"})}),"\n",(0,n.jsx)(e.h2,{id:"where-the-data-comes-from",children:"Where the Data Comes From"}),"\n",(0,n.jsxs)(e.p,{children:["The data displayed on the website comes from DotLake, which is a scalable and cost-efficient data\nplatform built on Google Cloud Platform (GCP) by the Data Team at\n",(0,n.jsx)(e.a,{href:"https://www.parity.io/",children:"Parity Technologies"}),". It's designed to store all blocks, events,\nextrinsics, and more for all the chains in the Polkadot ecosystem. The platform uses a range of\nexisting technologies, keeping the architecture simple with low operational overhead. This includes\ntools like Terraform, the Substrate Sidecar, Rust & Python programming languages, and various GCP\nservices like Cloud Storage, BigQuery, Cloud Run & Jobs, and Workflows & Functions."]}),"\n",(0,n.jsx)(e.p,{children:"The approach allows the processing of data from block number N to M, storing the raw results as JSON\nin Google Cloud Storage. This method not only provides a convenient abstraction, but also avoids the\npitfalls of custom block parsing strategies in the ever-evolving Substrate Framework. The key to the\nplatform's efficiency is the Block Compressor, which optimizes and reduces the data size\nsignificantly, making it more manageable for analytical purposes."}),"\n",(0,n.jsx)(e.p,{children:"DotLake has evolved from it's origins as a data warehouse built to serve Parity's internal data\nneeds. Since then, the scope has been broadened to share data intitiatives and learnings with the\nwider community. The plan is to progressively make datasets available to the public, alongside\ndashboards, metrics, code, and best practices employed to ingest and decode Substrate data."}),"\n",(0,n.jsx)(e.p,{children:"DotLake currently consists of 80+ Polkadot, Kusama, solo-chains and test-nets with their full\nhistory and is continuously expanding."}),"\n",(0,n.jsx)(e.p,{children:(0,n.jsx)(e.strong,{children:"DotLake Batch Architecture"})}),"\n",(0,n.jsx)(e.p,{children:(0,n.jsx)(e.img,{alt:"DotLake Batch Architecture",src:t(27240).A+"",width:"1999",height:"1175"})}),"\n",(0,n.jsx)(e.p,{children:(0,n.jsx)(e.strong,{children:"Real-Time Architecture"})}),"\n",(0,n.jsx)(e.p,{children:(0,n.jsx)(e.img,{alt:"Real-Time Architecture",src:t(6536).A+"",width:"1999",height:"1071"})}),"\n",(0,n.jsx)(e.h2,{id:"support-data-requests-collaborations-parachain-onboarding-etc",children:"Support: Data Requests, Collaborations, Parachain Onboarding etc."}),"\n",(0,n.jsxs)(e.p,{children:["The Parity Data Team is very eager to collaborate with the Ecosystem. If you have any questions,\ndata requests that you need help with, interest in partnerships or you are a Parachain team and want\nyour chain onboarded to the platform - please get in contact with ",(0,n.jsx)(e.a,{href:"mailto:data-team@parity.io",children:"data-team@parity.io"}),"."]})]})}function c(a={}){const{wrapper:e}={...(0,i.R)(),...a.components};return e?(0,n.jsx)(e,{...a,children:(0,n.jsx)(h,{...a})}):h(a)}},27240:(a,e,t)=>{t.d(e,{A:()=>s});const s=t.p+"assets/images/dotlake-batch-faf8cffceeafe58fffe1130238cd4efd.png"},6536:(a,e,t)=>{t.d(e,{A:()=>s});const s=t.p+"assets/images/dotlake-rt-27bf74fd16b4c6e348e7132b7124eae7.png"},3415:(a,e,t)=>{t.d(e,{A:()=>s});const s=t.p+"assets/images/ecosystem-chain-selection-example-a76c465ade1ad0a26cabd744346155b6.png"},92081:(a,e,t)=>{t.d(e,{A:()=>s});const s=t.p+"assets/images/ecosystem-chart-default-selection-f6144245cd32be99b964e56aa1b1c36d.png"},91523:(a,e,t)=>{t.d(e,{A:()=>s});const s=t.p+"assets/images/ecosystem-polkadot-daily-substrate-transactions-selection-d2fab579bc6f4845d00ec4720cc10264.png"},47088:(a,e,t)=>{t.d(e,{A:()=>s});const s=t.p+"assets/images/stablecoins-usdc-toggle-chart-type-example-37f2f6aa33e5a49b26adca7f2980773a.png"},28453:(a,e,t)=>{t.d(e,{R:()=>o,x:()=>r});var s=t(96540);const n={},i=s.createContext(n);function o(a){const e=s.useContext(i);return s.useMemo((function(){return"function"==typeof a?a(e):{...e,...a}}),[e,a])}function r(a){let e;return e=a.disableParentContext?"function"==typeof a.components?a.components(n):a.components||n:o(a.components),s.createElement(i.Provider,{value:e},a.children)}}}]); \ No newline at end of file diff --git a/assets/js/8146.f495adbb.js b/assets/js/8146.f495adbb.js deleted file mode 100644 index 33d7d1a131d9..000000000000 --- a/assets/js/8146.f495adbb.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8146],{88146:(t,e,a)=>{a.d(e,{a:()=>l,b:()=>B,c:()=>d,d:()=>I,e:()=>M,f:()=>j,g:()=>C,h:()=>A,i:()=>x,j:()=>N,k:()=>R,l:()=>o,m:()=>Y,p:()=>_,s:()=>T,u:()=>h});var r=a(86079),n=a(26312),i=a(22519);const s={extension:(t,e,a)=>{r.l.trace("Making markers for ",a),t.append("defs").append("marker").attr("id",a+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",a+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},composition:(t,e,a)=>{t.append("defs").append("marker").attr("id",a+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",a+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},aggregation:(t,e,a)=>{t.append("defs").append("marker").attr("id",a+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",a+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},dependency:(t,e,a)=>{t.append("defs").append("marker").attr("id",a+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",a+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},lollipop:(t,e,a)=>{t.append("defs").append("marker").attr("id",a+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",a+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},point:(t,e,a)=>{t.append("marker").attr("id",a+"_"+e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",6).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",a+"_"+e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},circle:(t,e,a)=>{t.append("marker").attr("id",a+"_"+e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",a+"_"+e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},cross:(t,e,a)=>{t.append("marker").attr("id",a+"_"+e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",a+"_"+e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},barb:(t,e,a)=>{t.append("defs").append("marker").attr("id",a+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")}},l=(t,e,a,r)=>{e.forEach((e=>{s[e](t,a,r)}))};const d=(t,e,a,i)=>{let s=t||"";if("object"==typeof s&&(s=s[0]),(0,r.m)((0,r.c)().flowchart.htmlLabels)){s=s.replace(/\\n|\n/g,"
    "),r.l.debug("vertexText"+s);let t=function(t){const e=(0,n.Ltv)(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),a=e.append("xhtml:div"),r=t.label,i=t.isNode?"nodeLabel":"edgeLabel";var s,l;return a.html('"+r+""),s=a,(l=t.labelStyle)&&s.attr("style",l),a.style("display","inline-block"),a.style("white-space","nowrap"),a.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}({isNode:i,label:(0,r.M)(s).replace(/fa[blrs]?:fa-[\w-]+/g,(t=>``)),labelStyle:e.replace("fill:","color:")});return t}{const t=document.createElementNS("http://www.w3.org/2000/svg","text");t.setAttribute("style",e.replace("color:","fill:"));let r=[];r="string"==typeof s?s.split(/\\n|\n|/gi):Array.isArray(s)?s:[];for(const e of r){const r=document.createElementNS("http://www.w3.org/2000/svg","tspan");r.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),r.setAttribute("dy","1em"),r.setAttribute("x","0"),a?r.setAttribute("class","title-row"):r.setAttribute("class","row"),r.textContent=e.trim(),t.appendChild(r)}return t}},o=async(t,e,a,s)=>{let l;const o=e.useHtmlLabels||(0,r.m)((0,r.c)().flowchart.htmlLabels);l=a||"node default";const h=t.insert("g").attr("class",l).attr("id",e.domId||e.id),c=h.insert("g").attr("class","label").attr("style",e.labelStyle);let y;y=void 0===e.labelText?"":"string"==typeof e.labelText?e.labelText:e.labelText[0];const p=c.node();let g;g="markdown"===e.labelType?(0,i.a)(c,(0,r.d)((0,r.M)(y),(0,r.c)()),{useHtmlLabels:o,width:e.width||(0,r.c)().flowchart.wrappingWidth,classes:"markdown-node-label"}):p.appendChild(d((0,r.d)((0,r.M)(y),(0,r.c)()),e.labelStyle,!1,s));let x=g.getBBox();const f=e.padding/2;if((0,r.m)((0,r.c)().flowchart.htmlLabels)){const t=g.children[0],e=(0,n.Ltv)(g),a=t.getElementsByTagName("img");if(a){const t=""===y.replace(/]*>/g,"").trim();await Promise.all([...a].map((e=>new Promise((a=>{function n(){if(e.style.display="flex",e.style.flexDirection="column",t){const t=(0,r.c)().fontSize?(0,r.c)().fontSize:window.getComputedStyle(document.body).fontSize,a=5,n=parseInt(t,10)*a+"px";e.style.minWidth=n,e.style.maxWidth=n}else e.style.width="100%";a(e)}setTimeout((()=>{e.complete&&n()})),e.addEventListener("error",n),e.addEventListener("load",n)})))))}x=t.getBoundingClientRect(),e.attr("width",x.width),e.attr("height",x.height)}return o?c.attr("transform","translate("+-x.width/2+", "+-x.height/2+")"):c.attr("transform","translate(0, "+-x.height/2+")"),e.centerLabel&&c.attr("transform","translate("+-x.width/2+", "+-x.height/2+")"),c.insert("rect",":first-child"),{shapeSvg:h,bbox:x,halfPadding:f,label:c}},h=(t,e)=>{const a=e.node().getBBox();t.width=a.width,t.height=a.height};function c(t,e,a,r){return t.insert("polygon",":first-child").attr("points",r.map((function(t){return t.x+","+t.y})).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+a/2+")")}function y(t,e,a,r){var n=t.x,i=t.y,s=n-r.x,l=i-r.y,d=Math.sqrt(e*e*l*l+a*a*s*s),o=Math.abs(e*a*s/d);r.x0}const x=(t,e)=>{var a,r,n=t.x,i=t.y,s=e.x-n,l=e.y-i,d=t.width/2,o=t.height/2;return Math.abs(l)*d>Math.abs(s)*o?(l<0&&(o=-o),a=0===l?0:o*s/l,r=o):(s<0&&(d=-d),a=d,r=0===s?0:d*l/s),{x:n+a,y:i+r}},f={node:function(t,e){return t.intersect(e)},circle:function(t,e,a){return y(t,e,e,a)},ellipse:y,polygon:function(t,e,a){var r=t.x,n=t.y,i=[],s=Number.POSITIVE_INFINITY,l=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach((function(t){s=Math.min(s,t.x),l=Math.min(l,t.y)})):(s=Math.min(s,e.x),l=Math.min(l,e.y));for(var d=r-t.width/2-s,o=n-t.height/2-l,h=0;h1&&i.sort((function(t,e){var r=t.x-a.x,n=t.y-a.y,i=Math.sqrt(r*r+n*n),s=e.x-a.x,l=e.y-a.y,d=Math.sqrt(s*s+l*l);return i{const r=(t=>{const e=new Set;for(const a of t)switch(a){case"x":e.add("right"),e.add("left");break;case"y":e.add("up"),e.add("down");break;default:e.add(a)}return e})(t),n=e.height+2*a.padding,i=n/2,s=e.width+2*i+a.padding,l=a.padding/2;return r.has("right")&&r.has("left")&&r.has("up")&&r.has("down")?[{x:0,y:0},{x:i,y:0},{x:s/2,y:2*l},{x:s-i,y:0},{x:s,y:0},{x:s,y:-n/3},{x:s+2*l,y:-n/2},{x:s,y:-2*n/3},{x:s,y:-n},{x:s-i,y:-n},{x:s/2,y:-n-2*l},{x:i,y:-n},{x:0,y:-n},{x:0,y:-2*n/3},{x:-2*l,y:-n/2},{x:0,y:-n/3}]:r.has("right")&&r.has("left")&&r.has("up")?[{x:i,y:0},{x:s-i,y:0},{x:s,y:-n/2},{x:s-i,y:-n},{x:i,y:-n},{x:0,y:-n/2}]:r.has("right")&&r.has("left")&&r.has("down")?[{x:0,y:0},{x:i,y:-n},{x:s-i,y:-n},{x:s,y:0}]:r.has("right")&&r.has("up")&&r.has("down")?[{x:0,y:0},{x:s,y:-i},{x:s,y:-n+i},{x:0,y:-n}]:r.has("left")&&r.has("up")&&r.has("down")?[{x:s,y:0},{x:0,y:-i},{x:0,y:-n+i},{x:s,y:-n}]:r.has("right")&&r.has("left")?[{x:i,y:0},{x:i,y:-l},{x:s-i,y:-l},{x:s-i,y:0},{x:s,y:-n/2},{x:s-i,y:-n},{x:s-i,y:-n+l},{x:i,y:-n+l},{x:i,y:-n},{x:0,y:-n/2}]:r.has("up")&&r.has("down")?[{x:s/2,y:0},{x:0,y:-l},{x:i,y:-l},{x:i,y:-n+l},{x:0,y:-n+l},{x:s/2,y:-n},{x:s,y:-n+l},{x:s-i,y:-n+l},{x:s-i,y:-l},{x:s,y:-l}]:r.has("right")&&r.has("up")?[{x:0,y:0},{x:s,y:-i},{x:0,y:-n}]:r.has("right")&&r.has("down")?[{x:0,y:0},{x:s,y:0},{x:0,y:-n}]:r.has("left")&&r.has("up")?[{x:s,y:0},{x:0,y:-i},{x:s,y:-n}]:r.has("left")&&r.has("down")?[{x:s,y:0},{x:0,y:0},{x:s,y:-n}]:r.has("right")?[{x:i,y:-l},{x:i,y:-l},{x:s-i,y:-l},{x:s-i,y:0},{x:s,y:-n/2},{x:s-i,y:-n},{x:s-i,y:-n+l},{x:i,y:-n+l},{x:i,y:-n+l}]:r.has("left")?[{x:i,y:0},{x:i,y:-l},{x:s-i,y:-l},{x:s-i,y:-n+l},{x:i,y:-n+l},{x:i,y:-n},{x:0,y:-n/2}]:r.has("up")?[{x:i,y:-l},{x:i,y:-n+l},{x:0,y:-n+l},{x:s/2,y:-n},{x:s,y:-n+l},{x:s-i,y:-n+l},{x:s-i,y:-l}]:r.has("down")?[{x:s/2,y:0},{x:0,y:-l},{x:i,y:-l},{x:i,y:-n+l},{x:s-i,y:-n+l},{x:s-i,y:-l},{x:s,y:-l}]:[{x:0,y:0}]},w=t=>t?" "+t:"",b=(t,e)=>`${e||"node default"}${w(t.classes)} ${w(t.class)}`,m=async(t,e)=>{const{shapeSvg:a,bbox:n}=await o(t,e,b(e,void 0),!0),i=n.width+e.padding+(n.height+e.padding),s=[{x:i/2,y:0},{x:i,y:-i/2},{x:i/2,y:-i},{x:0,y:-i/2}];r.l.info("Question main (Circle)");const l=c(a,i,i,s);return l.attr("style",e.style),h(e,l),e.intersect=function(t){return r.l.warn("Intersect called"),f.polygon(e,s,t)},a};function k(t,e,a,n){const i=[],s=t=>{i.push(t,0)},l=t=>{i.push(0,t)};e.includes("t")?(r.l.debug("add top border"),s(a)):l(a),e.includes("r")?(r.l.debug("add right border"),s(n)):l(n),e.includes("b")?(r.l.debug("add bottom border"),s(a)):l(a),e.includes("l")?(r.l.debug("add left border"),s(n)):l(n),t.attr("stroke-dasharray",i.join(" "))}const v=(t,e,a)=>{const r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);let n=70,i=10;"LR"===a&&(n=10,i=70);const s=r.append("rect").attr("x",-1*n/2).attr("y",-1*i/2).attr("width",n).attr("height",i).attr("class","fork-join");return h(e,s),e.height=e.height+e.padding/2,e.width=e.width+e.padding/2,e.intersect=function(t){return f.rect(e,t)},r},L={rhombus:m,composite:async(t,e)=>{const{shapeSvg:a,bbox:n,halfPadding:i}=await o(t,e,"node "+e.classes,!0),s=a.insert("rect",":first-child"),l=e.positioned?e.width:n.width+e.padding,d=e.positioned?e.height:n.height+e.padding,c=e.positioned?-l/2:-n.width/2-i,y=e.positioned?-d/2:-n.height/2-i;if(s.attr("class","basic cluster composite label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",c).attr("y",y).attr("width",l).attr("height",d),e.props){const t=new Set(Object.keys(e.props));e.props.borders&&(k(s,e.props.borders,l,d),t.delete("borders")),t.forEach((t=>{r.l.warn(`Unknown node property ${t}`)}))}return h(e,s),e.intersect=function(t){return f.rect(e,t)},a},question:m,rect:async(t,e)=>{const{shapeSvg:a,bbox:n,halfPadding:i}=await o(t,e,"node "+e.classes+" "+e.class,!0),s=a.insert("rect",":first-child"),l=e.positioned?e.width:n.width+e.padding,d=e.positioned?e.height:n.height+e.padding,c=e.positioned?-l/2:-n.width/2-i,y=e.positioned?-d/2:-n.height/2-i;if(s.attr("class","basic label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",c).attr("y",y).attr("width",l).attr("height",d),e.props){const t=new Set(Object.keys(e.props));e.props.borders&&(k(s,e.props.borders,l,d),t.delete("borders")),t.forEach((t=>{r.l.warn(`Unknown node property ${t}`)}))}return h(e,s),e.intersect=function(t){return f.rect(e,t)},a},labelRect:async(t,e)=>{const{shapeSvg:a}=await o(t,e,"label",!0);r.l.trace("Classes = ",e.class);const n=a.insert("rect",":first-child");if(n.attr("width",0).attr("height",0),a.attr("class","label edgeLabel"),e.props){const t=new Set(Object.keys(e.props));e.props.borders&&(k(n,e.props.borders,0,0),t.delete("borders")),t.forEach((t=>{r.l.warn(`Unknown node property ${t}`)}))}return h(e,n),e.intersect=function(t){return f.rect(e,t)},a},rectWithTitle:(t,e)=>{let a;a=e.classes?"node "+e.classes:"node default";const i=t.insert("g").attr("class",a).attr("id",e.domId||e.id),s=i.insert("rect",":first-child"),l=i.insert("line"),o=i.insert("g").attr("class","label"),c=e.labelText.flat?e.labelText.flat():e.labelText;let y="";y="object"==typeof c?c[0]:c,r.l.info("Label text abc79",y,c,"object"==typeof c);const p=o.node().appendChild(d(y,e.labelStyle,!0,!0));let g={width:0,height:0};if((0,r.m)((0,r.c)().flowchart.htmlLabels)){const t=p.children[0],e=(0,n.Ltv)(p);g=t.getBoundingClientRect(),e.attr("width",g.width),e.attr("height",g.height)}r.l.info("Text 2",c);const x=c.slice(1,c.length);let u=p.getBBox();const w=o.node().appendChild(d(x.join?x.join("
    "):x,e.labelStyle,!0,!0));if((0,r.m)((0,r.c)().flowchart.htmlLabels)){const t=w.children[0],e=(0,n.Ltv)(w);g=t.getBoundingClientRect(),e.attr("width",g.width),e.attr("height",g.height)}const b=e.padding/2;return(0,n.Ltv)(w).attr("transform","translate( "+(g.width>u.width?0:(u.width-g.width)/2)+", "+(u.height+b+5)+")"),(0,n.Ltv)(p).attr("transform","translate( "+(g.width{const a=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),r=[{x:0,y:14},{x:14,y:0},{x:0,y:-14},{x:-14,y:0}];return a.insert("polygon",":first-child").attr("points",r.map((function(t){return t.x+","+t.y})).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),e.width=28,e.height=28,e.intersect=function(t){return f.circle(e,14,t)},a},circle:async(t,e)=>{const{shapeSvg:a,bbox:n,halfPadding:i}=await o(t,e,b(e,void 0),!0),s=a.insert("circle",":first-child");return s.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",n.width/2+i).attr("width",n.width+e.padding).attr("height",n.height+e.padding),r.l.info("Circle main"),h(e,s),e.intersect=function(t){return r.l.info("Circle intersect",e,n.width/2+i,t),f.circle(e,n.width/2+i,t)},a},doublecircle:async(t,e)=>{const{shapeSvg:a,bbox:n,halfPadding:i}=await o(t,e,b(e,void 0),!0),s=a.insert("g",":first-child"),l=s.insert("circle"),d=s.insert("circle");return s.attr("class",e.class),l.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",n.width/2+i+5).attr("width",n.width+e.padding+10).attr("height",n.height+e.padding+10),d.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",n.width/2+i).attr("width",n.width+e.padding).attr("height",n.height+e.padding),r.l.info("DoubleCircle main"),h(e,l),e.intersect=function(t){return r.l.info("DoubleCircle intersect",e,n.width/2+i+5,t),f.circle(e,n.width/2+i+5,t)},a},stadium:async(t,e)=>{const{shapeSvg:a,bbox:r}=await o(t,e,b(e,void 0),!0),n=r.height+e.padding,i=r.width+n/4+e.padding,s=a.insert("rect",":first-child").attr("style",e.style).attr("rx",n/2).attr("ry",n/2).attr("x",-i/2).attr("y",-n/2).attr("width",i).attr("height",n);return h(e,s),e.intersect=function(t){return f.rect(e,t)},a},hexagon:async(t,e)=>{const{shapeSvg:a,bbox:r}=await o(t,e,b(e,void 0),!0),n=r.height+e.padding,i=n/4,s=r.width+2*i+e.padding,l=[{x:i,y:0},{x:s-i,y:0},{x:s,y:-n/2},{x:s-i,y:-n},{x:i,y:-n},{x:0,y:-n/2}],d=c(a,s,n,l);return d.attr("style",e.style),h(e,d),e.intersect=function(t){return f.polygon(e,l,t)},a},block_arrow:async(t,e)=>{const{shapeSvg:a,bbox:r}=await o(t,e,void 0,!0),n=r.height+2*e.padding,i=n/2,s=r.width+2*i+e.padding,l=u(e.directions,r,e),d=c(a,s,n,l);return d.attr("style",e.style),h(e,d),e.intersect=function(t){return f.polygon(e,l,t)},a},rect_left_inv_arrow:async(t,e)=>{const{shapeSvg:a,bbox:r}=await o(t,e,b(e,void 0),!0),n=r.width+e.padding,i=r.height+e.padding,s=[{x:-i/2,y:0},{x:n,y:0},{x:n,y:-i},{x:-i/2,y:-i},{x:0,y:-i/2}];return c(a,n,i,s).attr("style",e.style),e.width=n+i,e.height=i,e.intersect=function(t){return f.polygon(e,s,t)},a},lean_right:async(t,e)=>{const{shapeSvg:a,bbox:r}=await o(t,e,b(e),!0),n=r.width+e.padding,i=r.height+e.padding,s=[{x:-2*i/6,y:0},{x:n-i/6,y:0},{x:n+2*i/6,y:-i},{x:i/6,y:-i}],l=c(a,n,i,s);return l.attr("style",e.style),h(e,l),e.intersect=function(t){return f.polygon(e,s,t)},a},lean_left:async(t,e)=>{const{shapeSvg:a,bbox:r}=await o(t,e,b(e,void 0),!0),n=r.width+e.padding,i=r.height+e.padding,s=[{x:2*i/6,y:0},{x:n+i/6,y:0},{x:n-2*i/6,y:-i},{x:-i/6,y:-i}],l=c(a,n,i,s);return l.attr("style",e.style),h(e,l),e.intersect=function(t){return f.polygon(e,s,t)},a},trapezoid:async(t,e)=>{const{shapeSvg:a,bbox:r}=await o(t,e,b(e,void 0),!0),n=r.width+e.padding,i=r.height+e.padding,s=[{x:-2*i/6,y:0},{x:n+2*i/6,y:0},{x:n-i/6,y:-i},{x:i/6,y:-i}],l=c(a,n,i,s);return l.attr("style",e.style),h(e,l),e.intersect=function(t){return f.polygon(e,s,t)},a},inv_trapezoid:async(t,e)=>{const{shapeSvg:a,bbox:r}=await o(t,e,b(e,void 0),!0),n=r.width+e.padding,i=r.height+e.padding,s=[{x:i/6,y:0},{x:n-i/6,y:0},{x:n+2*i/6,y:-i},{x:-2*i/6,y:-i}],l=c(a,n,i,s);return l.attr("style",e.style),h(e,l),e.intersect=function(t){return f.polygon(e,s,t)},a},rect_right_inv_arrow:async(t,e)=>{const{shapeSvg:a,bbox:r}=await o(t,e,b(e,void 0),!0),n=r.width+e.padding,i=r.height+e.padding,s=[{x:0,y:0},{x:n+i/2,y:0},{x:n,y:-i/2},{x:n+i/2,y:-i},{x:0,y:-i}],l=c(a,n,i,s);return l.attr("style",e.style),h(e,l),e.intersect=function(t){return f.polygon(e,s,t)},a},cylinder:async(t,e)=>{const{shapeSvg:a,bbox:r}=await o(t,e,b(e,void 0),!0),n=r.width+e.padding,i=n/2,s=i/(2.5+n/50),l=r.height+s+e.padding,d="M 0,"+s+" a "+i+","+s+" 0,0,0 "+n+" 0 a "+i+","+s+" 0,0,0 "+-n+" 0 l 0,"+l+" a "+i+","+s+" 0,0,0 "+n+" 0 l 0,"+-l,c=a.attr("label-offset-y",s).insert("path",":first-child").attr("style",e.style).attr("d",d).attr("transform","translate("+-n/2+","+-(l/2+s)+")");return h(e,c),e.intersect=function(t){const a=f.rect(e,t),r=a.x-e.x;if(0!=i&&(Math.abs(r)e.height/2-s)){let n=s*s*(1-r*r/(i*i));0!=n&&(n=Math.sqrt(n)),n=s-n,t.y-e.y>0&&(n=-n),a.y+=n}return a},a},start:(t,e)=>{const a=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),r=a.insert("circle",":first-child");return r.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),h(e,r),e.intersect=function(t){return f.circle(e,7,t)},a},end:(t,e)=>{const a=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),r=a.insert("circle",":first-child"),n=a.insert("circle",":first-child");return n.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),r.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),h(e,n),e.intersect=function(t){return f.circle(e,7,t)},a},note:async(t,e)=>{e.useHtmlLabels||(0,r.c)().flowchart.htmlLabels||(e.centerLabel=!0);const{shapeSvg:a,bbox:n,halfPadding:i}=await o(t,e,"node "+e.classes,!0);r.l.info("Classes = ",e.classes);const s=a.insert("rect",":first-child");return s.attr("rx",e.rx).attr("ry",e.ry).attr("x",-n.width/2-i).attr("y",-n.height/2-i).attr("width",n.width+e.padding).attr("height",n.height+e.padding),h(e,s),e.intersect=function(t){return f.rect(e,t)},a},subroutine:async(t,e)=>{const{shapeSvg:a,bbox:r}=await o(t,e,b(e,void 0),!0),n=r.width+e.padding,i=r.height+e.padding,s=[{x:0,y:0},{x:n,y:0},{x:n,y:-i},{x:0,y:-i},{x:0,y:0},{x:-8,y:0},{x:n+8,y:0},{x:n+8,y:-i},{x:-8,y:-i},{x:-8,y:0}],l=c(a,n,i,s);return l.attr("style",e.style),h(e,l),e.intersect=function(t){return f.polygon(e,s,t)},a},fork:v,join:v,class_box:(t,e)=>{const a=e.padding/2;let i;i=e.classes?"node "+e.classes:"node default";const s=t.insert("g").attr("class",i).attr("id",e.domId||e.id),l=s.insert("rect",":first-child"),o=s.insert("line"),c=s.insert("line");let y=0,p=4;const g=s.insert("g").attr("class","label");let x=0;const u=e.classData.annotations&&e.classData.annotations[0],w=e.classData.annotations[0]?"\xab"+e.classData.annotations[0]+"\xbb":"",b=g.node().appendChild(d(w,e.labelStyle,!0,!0));let m=b.getBBox();if((0,r.m)((0,r.c)().flowchart.htmlLabels)){const t=b.children[0],e=(0,n.Ltv)(b);m=t.getBoundingClientRect(),e.attr("width",m.width),e.attr("height",m.height)}e.classData.annotations[0]&&(p+=m.height+4,y+=m.width);let k=e.classData.label;void 0!==e.classData.type&&""!==e.classData.type&&((0,r.c)().flowchart.htmlLabels?k+="<"+e.classData.type+">":k+="<"+e.classData.type+">");const v=g.node().appendChild(d(k,e.labelStyle,!0,!0));(0,n.Ltv)(v).attr("class","classTitle");let L=v.getBBox();if((0,r.m)((0,r.c)().flowchart.htmlLabels)){const t=v.children[0],e=(0,n.Ltv)(v);L=t.getBoundingClientRect(),e.attr("width",L.width),e.attr("height",L.height)}p+=L.height+4,L.width>y&&(y=L.width);const S=[];e.classData.members.forEach((t=>{const a=t.getDisplayDetails();let i=a.displayText;(0,r.c)().flowchart.htmlLabels&&(i=i.replace(//g,">"));const s=g.node().appendChild(d(i,a.cssStyle?a.cssStyle:e.labelStyle,!0,!0));let l=s.getBBox();if((0,r.m)((0,r.c)().flowchart.htmlLabels)){const t=s.children[0],e=(0,n.Ltv)(s);l=t.getBoundingClientRect(),e.attr("width",l.width),e.attr("height",l.height)}l.width>y&&(y=l.width),p+=l.height+4,S.push(s)})),p+=8;const M=[];if(e.classData.methods.forEach((t=>{const a=t.getDisplayDetails();let i=a.displayText;(0,r.c)().flowchart.htmlLabels&&(i=i.replace(//g,">"));const s=g.node().appendChild(d(i,a.cssStyle?a.cssStyle:e.labelStyle,!0,!0));let l=s.getBBox();if((0,r.m)((0,r.c)().flowchart.htmlLabels)){const t=s.children[0],e=(0,n.Ltv)(s);l=t.getBoundingClientRect(),e.attr("width",l.width),e.attr("height",l.height)}l.width>y&&(y=l.width),p+=l.height+4,M.push(s)})),p+=8,u){let t=(y-m.width)/2;(0,n.Ltv)(b).attr("transform","translate( "+(-1*y/2+t)+", "+-1*p/2+")"),x=m.height+4}let T=(y-L.width)/2;return(0,n.Ltv)(v).attr("transform","translate( "+(-1*y/2+T)+", "+(-1*p/2+x)+")"),x+=L.height+4,o.attr("class","divider").attr("x1",-y/2-a).attr("x2",y/2+a).attr("y1",-p/2-a+8+x).attr("y2",-p/2-a+8+x),x+=8,S.forEach((t=>{(0,n.Ltv)(t).attr("transform","translate( "+-y/2+", "+(-1*p/2+x+4)+")");const e=null==t?void 0:t.getBBox();x+=((null==e?void 0:e.height)??0)+4})),x+=8,c.attr("class","divider").attr("x1",-y/2-a).attr("x2",y/2+a).attr("y1",-p/2-a+8+x).attr("y2",-p/2-a+8+x),x+=8,M.forEach((t=>{(0,n.Ltv)(t).attr("transform","translate( "+-y/2+", "+(-1*p/2+x)+")");const e=null==t?void 0:t.getBBox();x+=((null==e?void 0:e.height)??0)+4})),l.attr("style",e.style).attr("class","outer title-state").attr("x",-y/2-a).attr("y",-p/2-a).attr("width",y+e.padding).attr("height",p+e.padding),h(e,l),e.intersect=function(t){return f.rect(e,t)},s}};let S={};const M=async(t,e,a)=>{let n,i;if(e.link){let s;"sandbox"===(0,r.c)().securityLevel?s="_top":e.linkTarget&&(s=e.linkTarget||"_blank"),n=t.insert("svg:a").attr("xlink:href",e.link).attr("target",s),i=await L[e.shape](n,e,a)}else i=await L[e.shape](t,e,a),n=i;return e.tooltip&&i.attr("title",e.tooltip),e.class&&i.attr("class","node default "+e.class),n.attr("data-node","true"),n.attr("data-id",e.id),S[e.id]=n,e.haveCallback&&S[e.id].attr("class",S[e.id].attr("class")+" clickable"),n},T=(t,e)=>{S[e.id]=t},B=()=>{S={}},_=t=>{const e=S[t.id];r.l.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");const a=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+a-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),a},C=({flowchart:t})=>{var e,a;const r=(null==(e=null==t?void 0:t.subGraphTitleMargin)?void 0:e.top)??0,n=(null==(a=null==t?void 0:t.subGraphTitleMargin)?void 0:a.bottom)??0;return{subGraphTitleTopMargin:r,subGraphTitleBottomMargin:n,subGraphTitleTotalMargin:r+n}},E={aggregation:18,extension:18,composition:18,dependency:6,lollipop:13.5,arrow_point:5.3};function $(t,e){if(void 0===t||void 0===e)return{angle:0,deltaX:0,deltaY:0};t=P(t),e=P(e);const[a,r]=[t.x,t.y],[n,i]=[e.x,e.y],s=n-a,l=i-r;return{angle:Math.atan(l/s),deltaX:s,deltaY:l}}const P=t=>Array.isArray(t)?{x:t[0],y:t[1]}:t,R=t=>({x:function(e,a,r){let n=0;if(0===a&&Object.hasOwn(E,t.arrowTypeStart)){const{angle:e,deltaX:a}=$(r[0],r[1]);n=E[t.arrowTypeStart]*Math.cos(e)*(a>=0?1:-1)}else if(a===r.length-1&&Object.hasOwn(E,t.arrowTypeEnd)){const{angle:e,deltaX:a}=$(r[r.length-1],r[r.length-2]);n=E[t.arrowTypeEnd]*Math.cos(e)*(a>=0?1:-1)}return P(e).x+n},y:function(e,a,r){let n=0;if(0===a&&Object.hasOwn(E,t.arrowTypeStart)){const{angle:e,deltaY:a}=$(r[0],r[1]);n=E[t.arrowTypeStart]*Math.abs(Math.sin(e))*(a>=0?1:-1)}else if(a===r.length-1&&Object.hasOwn(E,t.arrowTypeEnd)){const{angle:e,deltaY:a}=$(r[r.length-1],r[r.length-2]);n=E[t.arrowTypeEnd]*Math.abs(Math.sin(e))*(a>=0?1:-1)}return P(e).y+n}}),Y=(t,e,a,r,n)=>{e.arrowTypeStart&&W(t,"start",e.arrowTypeStart,a,r,n),e.arrowTypeEnd&&W(t,"end",e.arrowTypeEnd,a,r,n)},O={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},W=(t,e,a,n,i,s)=>{const l=O[a];if(!l)return void r.l.warn(`Unknown arrow type: ${a}`);const d="start"===e?"Start":"End";t.attr(`marker-${e}`,`url(${n}#${i}_${s}-${l}${d})`)};let X={},H={};const I=()=>{X={},H={}},j=(t,e)=>{const a=(0,r.m)((0,r.c)().flowchart.htmlLabels),s="markdown"===e.labelType?(0,i.a)(t,e.label,{style:e.labelStyle,useHtmlLabels:a,addSvgBackground:!0}):d(e.label,e.labelStyle),l=t.insert("g").attr("class","edgeLabel"),o=l.insert("g").attr("class","label");o.node().appendChild(s);let h,c=s.getBBox();if(a){const t=s.children[0],e=(0,n.Ltv)(s);c=t.getBoundingClientRect(),e.attr("width",c.width),e.attr("height",c.height)}if(o.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"),X[e.id]=l,e.width=c.width,e.height=c.height,e.startLabelLeft){const a=d(e.startLabelLeft,e.labelStyle),r=t.insert("g").attr("class","edgeTerminals"),n=r.insert("g").attr("class","inner");h=n.node().appendChild(a);const i=a.getBBox();n.attr("transform","translate("+-i.width/2+", "+-i.height/2+")"),H[e.id]||(H[e.id]={}),H[e.id].startLeft=r,D(h,e.startLabelLeft)}if(e.startLabelRight){const a=d(e.startLabelRight,e.labelStyle),r=t.insert("g").attr("class","edgeTerminals"),n=r.insert("g").attr("class","inner");h=r.node().appendChild(a),n.node().appendChild(a);const i=a.getBBox();n.attr("transform","translate("+-i.width/2+", "+-i.height/2+")"),H[e.id]||(H[e.id]={}),H[e.id].startRight=r,D(h,e.startLabelRight)}if(e.endLabelLeft){const a=d(e.endLabelLeft,e.labelStyle),r=t.insert("g").attr("class","edgeTerminals"),n=r.insert("g").attr("class","inner");h=n.node().appendChild(a);const i=a.getBBox();n.attr("transform","translate("+-i.width/2+", "+-i.height/2+")"),r.node().appendChild(a),H[e.id]||(H[e.id]={}),H[e.id].endLeft=r,D(h,e.endLabelLeft)}if(e.endLabelRight){const a=d(e.endLabelRight,e.labelStyle),r=t.insert("g").attr("class","edgeTerminals"),n=r.insert("g").attr("class","inner");h=n.node().appendChild(a);const i=a.getBBox();n.attr("transform","translate("+-i.width/2+", "+-i.height/2+")"),r.node().appendChild(a),H[e.id]||(H[e.id]={}),H[e.id].endRight=r,D(h,e.endLabelRight)}return s};function D(t,e){(0,r.c)().flowchart.htmlLabels&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}const N=(t,e)=>{r.l.debug("Moving label abc88 ",t.id,t.label,X[t.id],e);let a=e.updatedPath?e.updatedPath:e.originalPath;const n=(0,r.c)(),{subGraphTitleTotalMargin:i}=C(n);if(t.label){const n=X[t.id];let s=t.x,l=t.y;if(a){const n=r.u.calcLabelPosition(a);r.l.debug("Moving label "+t.label+" from (",s,",",l,") to (",n.x,",",n.y,") abc88"),e.updatedPath&&(s=n.x,l=n.y)}n.attr("transform",`translate(${s}, ${l+i/2})`)}if(t.startLabelLeft){const e=H[t.id].startLeft;let n=t.x,i=t.y;if(a){const e=r.u.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",a);n=e.x,i=e.y}e.attr("transform",`translate(${n}, ${i})`)}if(t.startLabelRight){const e=H[t.id].startRight;let n=t.x,i=t.y;if(a){const e=r.u.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",a);n=e.x,i=e.y}e.attr("transform",`translate(${n}, ${i})`)}if(t.endLabelLeft){const e=H[t.id].endLeft;let n=t.x,i=t.y;if(a){const e=r.u.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",a);n=e.x,i=e.y}e.attr("transform",`translate(${n}, ${i})`)}if(t.endLabelRight){const e=H[t.id].endRight;let n=t.x,i=t.y;if(a){const e=r.u.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",a);n=e.x,i=e.y}e.attr("transform",`translate(${n}, ${i})`)}},U=(t,e)=>{r.l.debug("abc88 cutPathAtIntersect",t,e);let a=[],n=t[0],i=!1;return t.forEach((t=>{if(((t,e)=>{const a=t.x,r=t.y,n=Math.abs(e.x-a),i=Math.abs(e.y-r),s=t.width/2,l=t.height/2;return n>=s||i>=l})(e,t)||i)n=t,i||a.push(t);else{const s=((t,e,a)=>{r.l.debug(`intersection calc abc89:\n outsidePoint: ${JSON.stringify(e)}\n insidePoint : ${JSON.stringify(a)}\n node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);const n=t.x,i=t.y,s=Math.abs(n-a.x),l=t.width/2;let d=a.xMath.abs(n-e.x)*o){let t=a.y{l=l||t.x===s.x&&t.y===s.y})),a.some((t=>t.x===s.x&&t.y===s.y))||a.push(s),i=!0}})),a},A=function(t,e,a,i,s,l,d){let o=a.points;r.l.debug("abc88 InsertEdge: edge=",a,"e=",e);let h=!1;const c=l.node(e.v);var y=l.node(e.w);(null==y?void 0:y.intersect)&&(null==c?void 0:c.intersect)&&(o=o.slice(1,a.points.length-1),o.unshift(c.intersect(o[0])),o.push(y.intersect(o[o.length-1]))),a.toCluster&&(r.l.debug("to cluster abc88",i[a.toCluster]),o=U(a.points,i[a.toCluster].node),h=!0),a.fromCluster&&(r.l.debug("from cluster abc88",i[a.fromCluster]),o=U(o.reverse(),i[a.fromCluster].node).reverse(),h=!0);const p=o.filter((t=>!Number.isNaN(t.y)));let g=n.qrM;!a.curve||"graph"!==s&&"flowchart"!==s||(g=a.curve);const{x:x,y:f}=R(a),u=(0,n.n8j)().x(x).y(f).curve(g);let w;switch(a.thickness){case"normal":w="edge-thickness-normal";break;case"thick":case"invisible":w="edge-thickness-thick";break;default:w=""}switch(a.pattern){case"solid":w+=" edge-pattern-solid";break;case"dotted":w+=" edge-pattern-dotted";break;case"dashed":w+=" edge-pattern-dashed"}const b=t.append("path").attr("d",u(p)).attr("id",a.id).attr("class"," "+w+(a.classes?" "+a.classes:"")).attr("style",a.style);let m="";((0,r.c)().flowchart.arrowMarkerAbsolute||(0,r.c)().state.arrowMarkerAbsolute)&&(m=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,m=m.replace(/\(/g,"\\("),m=m.replace(/\)/g,"\\)")),Y(b,a,m,d,s);let k={};return h&&(k.updatedPath=o),k.originalPath=a.points,k}}}]); \ No newline at end of file diff --git a/assets/js/8174.8ff219dd.js b/assets/js/8174.8ff219dd.js new file mode 100644 index 000000000000..f607abc874c2 --- /dev/null +++ b/assets/js/8174.8ff219dd.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8174],{86022:(t,r,e)=>{function n(t,r){t.accDescr&&r.setAccDescription?.(t.accDescr),t.accTitle&&r.setAccTitle?.(t.accTitle),t.title&&r.setDiagramTitle?.(t.title)}e.d(r,{S:()=>n}),(0,e(45567).K2)(n,"populateCommonDb")},39676:(t,r,e)=>{e.d(r,{m:()=>o});var n=e(45567),o=class{constructor(t){this.init=t,this.records=this.init()}static{(0,n.K2)(this,"ImperativeState")}reset(){this.records=this.init()}}},78174:(t,r,e)=>{e.d(r,{diagram:()=>ft});var n=e(86022),o=e(39676),a=e(85039),c=e(45567),s=e(78731),i=e(20007),h={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},d=c.UI.gitGraph,m=(0,c.K2)((()=>(0,a.$t)({...d,...(0,c.zj)().gitGraph})),"getConfig"),$=new o.m((()=>{const t=m(),r=t.mainBranchName,e=t.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:e}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}}));function l(){return(0,a.yT)({length:7})}function y(t,r){const e=Object.create(null);return t.reduce(((t,n)=>{const o=r(n);return e[o]||(e[o]=!0,t.push(n)),t}),[])}(0,c.K2)(l,"getID"),(0,c.K2)(y,"uniqBy");var g=(0,c.K2)((function(t){$.records.direction=t}),"setDirection"),p=(0,c.K2)((function(t){c.Rm.debug("options str",t),t=t?.trim(),t=t||"{}";try{$.records.options=JSON.parse(t)}catch(r){c.Rm.error("error while parsing gitGraph options",r.message)}}),"setOptions"),x=(0,c.K2)((function(){return $.records.options}),"getOptions"),f=(0,c.K2)((function(t){let r=t.msg,e=t.id;const n=t.type;let o=t.tags;c.Rm.info("commit",r,e,n,o),c.Rm.debug("Entering commit:",r,e,n,o);const a=m();e=c.Y2.sanitizeText(e,a),r=c.Y2.sanitizeText(r,a),o=o?.map((t=>c.Y2.sanitizeText(t,a)));const s={id:e||$.records.seq+"-"+l(),message:r,seq:$.records.seq++,type:n??h.NORMAL,tags:o??[],parents:null==$.records.head?[]:[$.records.head.id],branch:$.records.currBranch};$.records.head=s,c.Rm.info("main branch",a.mainBranchName),$.records.commits.set(s.id,s),$.records.branches.set($.records.currBranch,s.id),c.Rm.debug("in pushCommit "+s.id)}),"commit"),u=(0,c.K2)((function(t){let r=t.name;const e=t.order;if(r=c.Y2.sanitizeText(r,m()),$.records.branches.has(r))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);$.records.branches.set(r,null!=$.records.head?$.records.head.id:null),$.records.branchConfig.set(r,{name:r,order:e}),B(r),c.Rm.debug("in createBranch")}),"branch"),b=(0,c.K2)((t=>{let r=t.branch,e=t.id;const n=t.type,o=t.tags,a=m();r=c.Y2.sanitizeText(r,a),e&&(e=c.Y2.sanitizeText(e,a));const s=$.records.branches.get($.records.currBranch),i=$.records.branches.get(r),d=s?$.records.commits.get(s):void 0,y=i?$.records.commits.get(i):void 0;if(d&&y&&d.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if($.records.currBranch===r){const t=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw t.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},t}if(void 0===d||!d){const t=new Error(`Incorrect usage of "merge". Current branch (${$.records.currBranch})has no commits`);throw t.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},t}if(!$.records.branches.has(r)){const t=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw t.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},t}if(void 0===y||!y){const t=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw t.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},t}if(d===y){const t=new Error('Incorrect usage of "merge". Both branches have same head');throw t.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},t}if(e&&$.records.commits.has(e)){const t=new Error('Incorrect usage of "merge". Commit with id:'+e+" already exists, use different custom Id");throw t.hash={text:`merge ${r} ${e} ${n} ${o?.join(" ")}`,token:`merge ${r} ${e} ${n} ${o?.join(" ")}`,expected:[`merge ${r} ${e}_UNIQUE ${n} ${o?.join(" ")}`]},t}const g=i||"",p={id:e||`${$.records.seq}-${l()}`,message:`merged branch ${r} into ${$.records.currBranch}`,seq:$.records.seq++,parents:null==$.records.head?[]:[$.records.head.id,g],branch:$.records.currBranch,type:h.MERGE,customType:n,customId:!!e,tags:o??[]};$.records.head=p,$.records.commits.set(p.id,p),$.records.branches.set($.records.currBranch,p.id),c.Rm.debug($.records.branches),c.Rm.debug("in mergeBranch")}),"merge"),w=(0,c.K2)((function(t){let r=t.id,e=t.targetId,n=t.tags,o=t.parent;c.Rm.debug("Entering cherryPick:",r,e,n);const a=m();if(r=c.Y2.sanitizeText(r,a),e=c.Y2.sanitizeText(e,a),n=n?.map((t=>c.Y2.sanitizeText(t,a))),o=c.Y2.sanitizeText(o,a),!r||!$.records.commits.has(r)){const t=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw t.hash={text:`cherryPick ${r} ${e}`,token:`cherryPick ${r} ${e}`,expected:["cherry-pick abc"]},t}const s=$.records.commits.get(r);if(void 0===s||!s)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(o&&(!Array.isArray(s.parents)||!s.parents.includes(o))){throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.")}const i=s.branch;if(s.type===h.MERGE&&!o){throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.")}if(!e||!$.records.commits.has(e)){if(i===$.records.currBranch){const t=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw t.hash={text:`cherryPick ${r} ${e}`,token:`cherryPick ${r} ${e}`,expected:["cherry-pick abc"]},t}const t=$.records.branches.get($.records.currBranch);if(void 0===t||!t){const t=new Error(`Incorrect usage of "cherry-pick". Current branch (${$.records.currBranch})has no commits`);throw t.hash={text:`cherryPick ${r} ${e}`,token:`cherryPick ${r} ${e}`,expected:["cherry-pick abc"]},t}const a=$.records.commits.get(t);if(void 0===a||!a){const t=new Error(`Incorrect usage of "cherry-pick". Current branch (${$.records.currBranch})has no commits`);throw t.hash={text:`cherryPick ${r} ${e}`,token:`cherryPick ${r} ${e}`,expected:["cherry-pick abc"]},t}const d={id:$.records.seq+"-"+l(),message:`cherry-picked ${s?.message} into ${$.records.currBranch}`,seq:$.records.seq++,parents:null==$.records.head?[]:[$.records.head.id,s.id],branch:$.records.currBranch,type:h.CHERRY_PICK,tags:n?n.filter(Boolean):[`cherry-pick:${s.id}${s.type===h.MERGE?`|parent:${o}`:""}`]};$.records.head=d,$.records.commits.set(d.id,d),$.records.branches.set($.records.currBranch,d.id),c.Rm.debug($.records.branches),c.Rm.debug("in cherryPick")}}),"cherryPick"),B=(0,c.K2)((function(t){if(t=c.Y2.sanitizeText(t,m()),!$.records.branches.has(t)){const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${t}")`);throw r.hash={text:`checkout ${t}`,token:`checkout ${t}`,expected:[`branch ${t}`]},r}{$.records.currBranch=t;const r=$.records.branches.get($.records.currBranch);$.records.head=void 0!==r&&r?$.records.commits.get(r)??null:null}}),"checkout");function E(t,r,e){const n=t.indexOf(r);-1===n?t.push(e):t.splice(n,1,e)}function k(t){const r=t.reduce(((t,r)=>t.seq>r.seq?t:r),t[0]);let e="";t.forEach((function(t){e+=t===r?"\t*":"\t|"}));const n=[e,r.id,r.seq];for(const o in $.records.branches)$.records.branches.get(o)===r.id&&n.push(o);if(c.Rm.debug(n.join(" ")),r.parents&&2==r.parents.length&&r.parents[0]&&r.parents[1]){const e=$.records.commits.get(r.parents[0]);E(t,r,e),r.parents[1]&&t.push($.records.commits.get(r.parents[1]))}else{if(0==r.parents.length)return;if(r.parents[0]){const e=$.records.commits.get(r.parents[0]);E(t,r,e)}}k(t=y(t,(t=>t.id)))}(0,c.K2)(E,"upsert"),(0,c.K2)(k,"prettyPrintCommitHistory");var C=(0,c.K2)((function(){c.Rm.debug($.records.commits);k([R()[0]])}),"prettyPrint"),T=(0,c.K2)((function(){$.reset(),(0,c.IU)()}),"clear"),L=(0,c.K2)((function(){return[...$.records.branchConfig.values()].map(((t,r)=>null!==t.order&&void 0!==t.order?t:{...t,order:parseFloat(`0.${r}`)})).sort(((t,r)=>(t.order??0)-(r.order??0))).map((({name:t})=>({name:t})))}),"getBranchesAsObjArray"),K=(0,c.K2)((function(){return $.records.branches}),"getBranches"),M=(0,c.K2)((function(){return $.records.commits}),"getCommits"),R=(0,c.K2)((function(){const t=[...$.records.commits.values()];return t.forEach((function(t){c.Rm.debug(t.id)})),t.sort(((t,r)=>t.seq-r.seq)),t}),"getCommitsArray"),v={commitType:h,getConfig:m,setDirection:g,setOptions:p,getOptions:x,commit:f,branch:u,merge:b,cherryPick:w,checkout:B,prettyPrint:C,clear:T,getBranchesAsObjArray:L,getBranches:K,getCommits:M,getCommitsArray:R,getCurrentBranch:(0,c.K2)((function(){return $.records.currBranch}),"getCurrentBranch"),getDirection:(0,c.K2)((function(){return $.records.direction}),"getDirection"),getHead:(0,c.K2)((function(){return $.records.head}),"getHead"),setAccTitle:c.SV,getAccTitle:c.iN,getAccDescription:c.m7,setAccDescription:c.EI,setDiagramTitle:c.ke,getDiagramTitle:c.ab},P=(0,c.K2)(((t,r)=>{(0,n.S)(t,r),t.dir&&r.setDirection(t.dir);for(const e of t.statements)I(e,r)}),"populate"),I=(0,c.K2)(((t,r)=>{const e={Commit:(0,c.K2)((t=>r.commit(A(t))),"Commit"),Branch:(0,c.K2)((t=>r.branch(G(t))),"Branch"),Merge:(0,c.K2)((t=>r.merge(O(t))),"Merge"),Checkout:(0,c.K2)((t=>r.checkout(q(t))),"Checkout"),CherryPicking:(0,c.K2)((t=>r.cherryPick(z(t))),"CherryPicking")}[t.$type];e?e(t):c.Rm.error(`Unknown statement type: ${t.$type}`)}),"parseStatement"),A=(0,c.K2)((t=>({id:t.id,msg:t.message??"",type:void 0!==t.type?h[t.type]:h.NORMAL,tags:t.tags??void 0})),"parseCommit"),G=(0,c.K2)((t=>({name:t.name,order:t.order??0})),"parseBranch"),O=(0,c.K2)((t=>({branch:t.branch,id:t.id??"",type:void 0!==t.type?h[t.type]:void 0,tags:t.tags??void 0})),"parseMerge"),q=(0,c.K2)((t=>t.branch),"parseCheckout"),z=(0,c.K2)((t=>({id:t.id,targetId:"",tags:0===t.tags?.length?void 0:t.tags,parent:t.parent})),"parseCherryPicking"),H={parse:(0,c.K2)((async t=>{const r=await(0,s.qg)("gitGraph",t);c.Rm.debug(r),P(r,v)}),"parse")};var S=(0,c.D7)(),D=S?.gitGraph,Y=10,N=40,j=new Map,W=new Map,_=new Map,F=[],U=0,V="LR",J=(0,c.K2)((()=>{j.clear(),W.clear(),_.clear(),U=0,F=[],V="LR"}),"clear"),Q=(0,c.K2)((t=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return("string"==typeof t?t.split(/\\n|\n|/gi):t).forEach((t=>{const e=document.createElementNS("http://www.w3.org/2000/svg","tspan");e.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),e.setAttribute("dy","1em"),e.setAttribute("x","0"),e.setAttribute("class","row"),e.textContent=t.trim(),r.appendChild(e)})),r}),"drawText"),X=(0,c.K2)((t=>{let r,e,n;return"BT"===V?(e=(0,c.K2)(((t,r)=>t<=r),"comparisonFunc"),n=1/0):(e=(0,c.K2)(((t,r)=>t>=r),"comparisonFunc"),n=0),t.forEach((t=>{const o="TB"===V||"BT"==V?W.get(t)?.y:W.get(t)?.x;void 0!==o&&e(o,n)&&(r=t,n=o)})),r}),"findClosestParent"),Z=(0,c.K2)((t=>{let r="",e=1/0;return t.forEach((t=>{const n=W.get(t).y;n<=e&&(r=t,e=n)})),r||void 0}),"findClosestParentBT"),tt=(0,c.K2)(((t,r,e)=>{let n=e,o=e;const a=[];t.forEach((t=>{const e=r.get(t);if(!e)throw new Error(`Commit not found for key ${t}`);e.parents.length?(n=et(e),o=Math.max(n,o)):a.push(e),nt(e,n)})),n=o,a.forEach((t=>{ot(t,n,e)})),t.forEach((t=>{const e=r.get(t);if(e?.parents.length){const t=Z(e.parents);n=W.get(t).y-N,n<=o&&(o=n);const r=j.get(e.branch).pos,a=n-Y;W.set(e.id,{x:r,y:a})}}))}),"setParallelBTPos"),rt=(0,c.K2)((t=>{const r=X(t.parents.filter((t=>null!==t)));if(!r)throw new Error(`Closest parent not found for commit ${t.id}`);const e=W.get(r)?.y;if(void 0===e)throw new Error(`Closest parent position not found for commit ${t.id}`);return e}),"findClosestParentPos"),et=(0,c.K2)((t=>rt(t)+N),"calculateCommitPosition"),nt=(0,c.K2)(((t,r)=>{const e=j.get(t.branch);if(!e)throw new Error(`Branch not found for commit ${t.id}`);const n=e.pos,o=r+Y;return W.set(t.id,{x:n,y:o}),{x:n,y:o}}),"setCommitPosition"),ot=(0,c.K2)(((t,r,e)=>{const n=j.get(t.branch);if(!n)throw new Error(`Branch not found for commit ${t.id}`);const o=r+e,a=n.pos;W.set(t.id,{x:a,y:o})}),"setRootPosition"),at=(0,c.K2)(((t,r,e,n,o,a)=>{if(a===h.HIGHLIGHT)t.append("rect").attr("x",e.x-10).attr("y",e.y-10).attr("width",20).attr("height",20).attr("class",`commit ${r.id} commit-highlight${o%8} ${n}-outer`),t.append("rect").attr("x",e.x-6).attr("y",e.y-6).attr("width",12).attr("height",12).attr("class",`commit ${r.id} commit${o%8} ${n}-inner`);else if(a===h.CHERRY_PICK)t.append("circle").attr("cx",e.x).attr("cy",e.y).attr("r",10).attr("class",`commit ${r.id} ${n}`),t.append("circle").attr("cx",e.x-3).attr("cy",e.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${r.id} ${n}`),t.append("circle").attr("cx",e.x+3).attr("cy",e.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${r.id} ${n}`),t.append("line").attr("x1",e.x+3).attr("y1",e.y+1).attr("x2",e.x).attr("y2",e.y-5).attr("stroke","#fff").attr("class",`commit ${r.id} ${n}`),t.append("line").attr("x1",e.x-3).attr("y1",e.y+1).attr("x2",e.x).attr("y2",e.y-5).attr("stroke","#fff").attr("class",`commit ${r.id} ${n}`);else{const c=t.append("circle");if(c.attr("cx",e.x),c.attr("cy",e.y),c.attr("r",r.type===h.MERGE?9:10),c.attr("class",`commit ${r.id} commit${o%8}`),a===h.MERGE){const a=t.append("circle");a.attr("cx",e.x),a.attr("cy",e.y),a.attr("r",6),a.attr("class",`commit ${n} ${r.id} commit${o%8}`)}if(a===h.REVERSE){t.append("path").attr("d",`M ${e.x-5},${e.y-5}L${e.x+5},${e.y+5}M${e.x-5},${e.y+5}L${e.x+5},${e.y-5}`).attr("class",`commit ${n} ${r.id} commit${o%8}`)}}}),"drawCommitBullet"),ct=(0,c.K2)(((t,r,e,n)=>{if(r.type!==h.CHERRY_PICK&&(r.customId&&r.type===h.MERGE||r.type!==h.MERGE)&&D?.showCommitLabel){const o=t.append("g"),a=o.insert("rect").attr("class","commit-label-bkg"),c=o.append("text").attr("x",n).attr("y",e.y+25).attr("class","commit-label").text(r.id),s=c.node()?.getBBox();if(s&&(a.attr("x",e.posWithOffset-s.width/2-2).attr("y",e.y+13.5).attr("width",s.width+4).attr("height",s.height+4),"TB"===V||"BT"===V?(a.attr("x",e.x-(s.width+16+5)).attr("y",e.y-12),c.attr("x",e.x-(s.width+16)).attr("y",e.y+s.height-12)):c.attr("x",e.posWithOffset-s.width/2),D.rotateCommitLabel))if("TB"===V||"BT"===V)c.attr("transform","rotate(-45, "+e.x+", "+e.y+")"),a.attr("transform","rotate(-45, "+e.x+", "+e.y+")");else{const t=-7.5-(s.width+10)/25*9.5,r=10+s.width/25*8.5;o.attr("transform","translate("+t+", "+r+") rotate(-45, "+n+", "+e.y+")")}}}),"drawCommitLabel"),st=(0,c.K2)(((t,r,e,n)=>{if(r.tags.length>0){let o=0,a=0,c=0;const s=[];for(const n of r.tags.reverse()){const r=t.insert("polygon"),i=t.append("circle"),h=t.append("text").attr("y",e.y-16-o).attr("class","tag-label").text(n),d=h.node()?.getBBox();if(!d)throw new Error("Tag bbox not found");a=Math.max(a,d.width),c=Math.max(c,d.height),h.attr("x",e.posWithOffset-d.width/2),s.push({tag:h,hole:i,rect:r,yOffset:o}),o+=20}for(const{tag:t,hole:r,rect:i,yOffset:h}of s){const o=c/2,s=e.y-19.2-h;if(i.attr("class","tag-label-bkg").attr("points",`\n ${n-a/2-2},${s+2} \n ${n-a/2-2},${s-2}\n ${e.posWithOffset-a/2-4},${s-o-2}\n ${e.posWithOffset+a/2+4},${s-o-2}\n ${e.posWithOffset+a/2+4},${s+o+2}\n ${e.posWithOffset-a/2-4},${s+o+2}`),r.attr("cy",s).attr("cx",n-a/2+2).attr("r",1.5).attr("class","tag-hole"),"TB"===V||"BT"===V){const c=n+h;i.attr("class","tag-label-bkg").attr("points",`\n ${e.x},${c+2}\n ${e.x},${c-2}\n ${e.x+Y},${c-o-2}\n ${e.x+Y+a+4},${c-o-2}\n ${e.x+Y+a+4},${c+o+2}\n ${e.x+Y},${c+o+2}`).attr("transform","translate(12,12) rotate(45, "+e.x+","+n+")"),r.attr("cx",e.x+2).attr("cy",c).attr("transform","translate(12,12) rotate(45, "+e.x+","+n+")"),t.attr("x",e.x+5).attr("y",c+3).attr("transform","translate(14,14) rotate(45, "+e.x+","+n+")")}}}}),"drawCommitTags"),it=(0,c.K2)((t=>{switch(t.customType??t.type){case h.NORMAL:return"commit-normal";case h.REVERSE:return"commit-reverse";case h.HIGHLIGHT:return"commit-highlight";case h.MERGE:return"commit-merge";case h.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}}),"getCommitClassType"),ht=(0,c.K2)(((t,r,e,n)=>{const o={x:0,y:0};if(!(t.parents.length>0)){if("TB"===r)return 30;if("BT"===r){return(n.get(t.id)??o).y-N}return 0}{const e=X(t.parents);if(e){const a=n.get(e)??o;if("TB"===r)return a.y+N;if("BT"===r){return(n.get(t.id)??o).y-N}return a.x+N}}return 0}),"calculatePosition"),dt=(0,c.K2)(((t,r,e)=>{const n="BT"===V&&e?r:r+Y,o="TB"===V||"BT"===V?n:j.get(t.branch)?.pos,a="TB"===V||"BT"===V?j.get(t.branch)?.pos:n;if(void 0===a||void 0===o)throw new Error(`Position were undefined for commit ${t.id}`);return{x:a,y:o,posWithOffset:n}}),"getCommitPosition"),mt=(0,c.K2)(((t,r,e)=>{if(!D)throw new Error("GitGraph config not found");const n=t.append("g").attr("class","commit-bullets"),o=t.append("g").attr("class","commit-labels");let a="TB"===V||"BT"===V?30:0;const s=[...r.keys()],i=D?.parallelCommits??!1,h=(0,c.K2)(((t,e)=>{const n=r.get(t)?.seq,o=r.get(e)?.seq;return void 0!==n&&void 0!==o?n-o:0}),"sortKeys");let d=s.sort(h);"BT"===V&&(i&&tt(d,r,a),d=d.reverse()),d.forEach((t=>{const c=r.get(t);if(!c)throw new Error(`Commit not found for key ${t}`);i&&(a=ht(c,V,a,W));const s=dt(c,a,i);if(e){const t=it(c),r=c.customType??c.type,e=j.get(c.branch)?.index??0;at(n,c,s,t,e,r),ct(o,c,s,a),st(o,c,s,a)}"TB"===V||"BT"===V?W.set(c.id,{x:s.x,y:s.posWithOffset}):W.set(c.id,{x:s.posWithOffset,y:s.y}),a="BT"===V&&i?a+N:a+N+Y,a>U&&(U=a)}))}),"drawCommits"),$t=(0,c.K2)(((t,r,e,n,o)=>{const a=("TB"===V||"BT"===V?e.xt.branch===a),"isOnBranchToGetCurve"),i=(0,c.K2)((e=>e.seq>t.seq&&e.seqi(t)&&s(t)))}),"shouldRerouteArrow"),lt=(0,c.K2)(((t,r,e=0)=>{const n=t+Math.abs(t-r)/2;if(e>5)return n;if(F.every((t=>Math.abs(t-n)>=10)))return F.push(n),n;const o=Math.abs(t-r);return lt(t,r-o/5,e+1)}),"findLane"),yt=(0,c.K2)(((t,r,e,n)=>{const o=W.get(r.id),a=W.get(e.id);if(void 0===o||void 0===a)throw new Error(`Commit positions not found for commits ${r.id} and ${e.id}`);const c=$t(r,e,o,a,n);let s,i="",d="",m=0,$=0,l=j.get(e.branch)?.index;if(e.type===h.MERGE&&r.id!==e.parents[0]&&(l=j.get(r.branch)?.index),c){i="A 10 10, 0, 0, 0,",d="A 10 10, 0, 0, 1,",m=10,$=10;const t=o.ya.x&&(i="A 20 20, 0, 0, 0,",d="A 20 20, 0, 0, 1,",m=20,$=20,s=e.type===h.MERGE&&r.id!==e.parents[0]?`M ${o.x} ${o.y} L ${o.x} ${a.y-m} ${d} ${o.x-$} ${a.y} L ${a.x} ${a.y}`:`M ${o.x} ${o.y} L ${a.x+m} ${o.y} ${i} ${a.x} ${o.y+$} L ${a.x} ${a.y}`),o.x===a.x&&(s=`M ${o.x} ${o.y} L ${a.x} ${a.y}`)):"BT"===V?(o.xa.x&&(i="A 20 20, 0, 0, 0,",d="A 20 20, 0, 0, 1,",m=20,$=20,s=e.type===h.MERGE&&r.id!==e.parents[0]?`M ${o.x} ${o.y} L ${o.x} ${a.y+m} ${i} ${o.x-$} ${a.y} L ${a.x} ${a.y}`:`M ${o.x} ${o.y} L ${a.x-m} ${o.y} ${i} ${a.x} ${o.y-$} L ${a.x} ${a.y}`),o.x===a.x&&(s=`M ${o.x} ${o.y} L ${a.x} ${a.y}`)):(o.ya.y&&(s=e.type===h.MERGE&&r.id!==e.parents[0]?`M ${o.x} ${o.y} L ${a.x-m} ${o.y} ${i} ${a.x} ${o.y-$} L ${a.x} ${a.y}`:`M ${o.x} ${o.y} L ${o.x} ${a.y+m} ${d} ${o.x+$} ${a.y} L ${a.x} ${a.y}`),o.y===a.y&&(s=`M ${o.x} ${o.y} L ${a.x} ${a.y}`));if(void 0===s)throw new Error("Line definition not found");t.append("path").attr("d",s).attr("class","arrow arrow"+l%8)}),"drawArrow"),gt=(0,c.K2)(((t,r)=>{const e=t.append("g").attr("class","commit-arrows");[...r.keys()].forEach((t=>{const n=r.get(t);n.parents&&n.parents.length>0&&n.parents.forEach((t=>{yt(e,r.get(t),n,r)}))}))}),"drawArrows"),pt=(0,c.K2)(((t,r)=>{const e=t.append("g");r.forEach(((t,r)=>{const n=r%8,o=j.get(t.name)?.pos;if(void 0===o)throw new Error(`Position not found for branch ${t.name}`);const a=e.append("line");a.attr("x1",0),a.attr("y1",o),a.attr("x2",U),a.attr("y2",o),a.attr("class","branch branch"+n),"TB"===V?(a.attr("y1",30),a.attr("x1",o),a.attr("y2",U),a.attr("x2",o)):"BT"===V&&(a.attr("y1",U),a.attr("x1",o),a.attr("y2",30),a.attr("x2",o)),F.push(o);const c=t.name,s=Q(c),i=e.insert("rect"),h=e.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+n);h.node().appendChild(s);const d=s.getBBox();i.attr("class","branchLabelBkg label"+n).attr("rx",4).attr("ry",4).attr("x",-d.width-4-(!0===D?.rotateCommitLabel?30:0)).attr("y",-d.height/2+8).attr("width",d.width+18).attr("height",d.height+4),h.attr("transform","translate("+(-d.width-14-(!0===D?.rotateCommitLabel?30:0))+", "+(o-d.height/2-1)+")"),"TB"===V?(i.attr("x",o-d.width/2-10).attr("y",0),h.attr("transform","translate("+(o-d.width/2-5)+", 0)")):"BT"===V?(i.attr("x",o-d.width/2-10).attr("y",U),h.attr("transform","translate("+(o-d.width/2-5)+", "+U+")")):i.attr("transform","translate(-19, "+(o-d.height/2)+")")}))}),"drawBranches"),xt=(0,c.K2)((function(t,r,e,n,o){return j.set(t,{pos:r,index:e}),r+=50+(o?40:0)+("TB"===V||"BT"===V?n.width/2:0)}),"setBranchPosition");var ft={parser:H,db:v,renderer:{draw:(0,c.K2)((function(t,r,e,n){if(J(),c.Rm.debug("in gitgraph renderer",t+"\n","id:",r,e),!D)throw new Error("GitGraph config not found");const o=D.rotateCommitLabel??!1,s=n.db;_=s.getCommits();const h=s.getBranchesAsObjArray();V=s.getDirection();const d=(0,i.Ltv)(`[id="${r}"]`);let m=0;h.forEach(((t,r)=>{const e=Q(t.name),n=d.append("g"),a=n.insert("g").attr("class","branchLabel"),c=a.insert("g").attr("class","label branch-label");c.node()?.appendChild(e);const s=e.getBBox();m=xt(t.name,m,r,s,o),c.remove(),a.remove(),n.remove()})),mt(d,_,!1),D.showBranches&&pt(d,h),gt(d,_),mt(d,_,!0),a._K.insertTitle(d,"gitTitleText",D.titleTopMargin??0,s.getDiagramTitle()),(0,c.mj)(void 0,d,D.diagramPadding,D.useMaxWidth)}),"draw")},styles:(0,c.K2)((t=>`\n .commit-id,\n .commit-msg,\n .branch-label {\n fill: lightgrey;\n color: lightgrey;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n ${[0,1,2,3,4,5,6,7].map((r=>`\n .branch-label${r} { fill: ${t["gitBranchLabel"+r]}; }\n .commit${r} { stroke: ${t["git"+r]}; fill: ${t["git"+r]}; }\n .commit-highlight${r} { stroke: ${t["gitInv"+r]}; fill: ${t["gitInv"+r]}; }\n .label${r} { fill: ${t["git"+r]}; }\n .arrow${r} { stroke: ${t["git"+r]}; }\n `)).join("\n")}\n\n .branch {\n stroke-width: 1;\n stroke: ${t.lineColor};\n stroke-dasharray: 2;\n }\n .commit-label { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelColor};}\n .commit-label-bkg { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelBackground}; opacity: 0.5; }\n .tag-label { font-size: ${t.tagLabelFontSize}; fill: ${t.tagLabelColor};}\n .tag-label-bkg { fill: ${t.tagLabelBackground}; stroke: ${t.tagLabelBorder}; }\n .tag-hole { fill: ${t.textColor}; }\n\n .commit-merge {\n stroke: ${t.primaryColor};\n fill: ${t.primaryColor};\n }\n .commit-reverse {\n stroke: ${t.primaryColor};\n fill: ${t.primaryColor};\n stroke-width: 3;\n }\n .commit-highlight-outer {\n }\n .commit-highlight-inner {\n stroke: ${t.primaryColor};\n fill: ${t.primaryColor};\n }\n\n .arrow { stroke-width: 8; stroke-linecap: round; fill: none}\n .gitTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n }\n`),"getStyles")}}}]); \ No newline at end of file diff --git a/assets/js/824749c6.267489c0.js b/assets/js/824749c6.267489c0.js deleted file mode 100644 index fefa57ec4558..000000000000 --- a/assets/js/824749c6.267489c0.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8800],{68498:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>r,default:()=>h,frontMatter:()=>i,metadata:()=>o,toc:()=>d});var a=t(74848),s=t(28453);const i={id:"build-node-interaction",title:"Node Interaction",sidebar_label:"Node Interaction",description:"Tools for node interaction.",keywords:["RPC","api","integration"],slug:"../build-node-interaction"},r=void 0,o={id:"build/build-node-interaction",title:"Node Interaction",description:"Tools for node interaction.",source:"@site/../docs/build/build-node-interaction.md",sourceDirName:"build",slug:"/build-node-interaction",permalink:"/docs/build-node-interaction",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/build/build-node-interaction.md",tags:[],version:"current",lastUpdatedBy:"Keith Alfaro",lastUpdatedAt:166556615e4,frontMatter:{id:"build-node-interaction",title:"Node Interaction",sidebar_label:"Node Interaction",description:"Tools for node interaction.",keywords:["RPC","api","integration"],slug:"../build-node-interaction"},sidebar:"docs",previous:{title:"Using Light Clients",permalink:"/docs/build-light-clients"},next:{title:"Smart Contracts",permalink:"/docs/build-smart-contracts"}},c={},d=[{value:"Polkadot RPC",id:"polkadot-rpc",level:2},{value:"Tracking the Chain Head",id:"tracking-the-chain-head",level:3},{value:"Substrate API Sidecar",id:"substrate-api-sidecar",level:2},{value:"Fetching a Block",id:"fetching-a-block",level:3},{value:"Submitting a Transaction",id:"submitting-a-transaction",level:3}];function l(e){const n={a:"a",admonition:"admonition",br:"br",code:"code",em:"em",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(n.p,{children:["This page will guide you through some basic interactions with your node. This guide should ",(0,a.jsx)(n.em,{children:"guide\nyou to the proper tools,"})," not be seen as canonical reference. Always refer to the proper\ndocumentation for the tool you are using:"]}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"https://paritytech.github.io/substrate/master/sc_rpc_api/index.html",children:"Substrate RPC API"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"https://polkadot.js.org/docs/substrate/rpc",children:"Polkadot-JS RPC"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"https://github.com/paritytech/substrate-api-sidecar",children:"Substrate API Sidecar"})}),"\n"]}),"\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.strong,{children:"Polkadot-JS RPC"})," is a JavaScript library for interacting with the ",(0,a.jsx)(n.strong,{children:"Substrate RPC API"})," endpoint,\ndistributed as ",(0,a.jsx)(n.code,{children:"@polkadot/api"})," Node.js package.",(0,a.jsx)(n.br,{}),"\n",(0,a.jsx)(n.strong,{children:"Substrate API Sidecar"})," is using the ",(0,a.jsx)(n.strong,{children:"Polkadot-JS RPC"})," to provide separately runnable REST\nservices."]}),"\n",(0,a.jsx)(n.h2,{id:"polkadot-rpc",children:"Polkadot RPC"}),"\n",(0,a.jsx)(n.p,{children:"The Parity Polkadot client exposes HTTP and WS endpoints for RPC connections. The default ports are\n9933 for HTTP and 9944 for WS."}),"\n",(0,a.jsxs)(n.p,{children:["To get a list of all RPC methods, the node has an RPC endpoint called ",(0,a.jsx)(n.code,{children:"rpc_methods"}),"."]}),"\n",(0,a.jsxs)(n.p,{children:["For example, using ",(0,a.jsx)(n.a,{href:"https://github.com/vi/websocat#installation",children:"websocat"}),":"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'echo \'{"id":1,"jsonrpc":"2.0","method":"rpc_methods","params":[]}\' | websocat -n1 -B 99999999 ws://127.0.0.1:9944\n\n{"jsonrpc":"2.0","result":{"methods":["account_nextIndex","author_hasKey","author_hasSessionKeys","author_insertKey","author_pendingExtrinsics","author_removeExtrinsic","author_rotateKeys","author_submitAndWatchExtrinsic","author_submitExtrinsic","author_unwatchExtrinsic","babe_epochAuthorship","beefy_getFinalizedHead","beefy_subscribeJustifications","beefy_unsubscribeJustifications","chain_getBlock","chain_getBlockHash","chain_getFinalisedHead","chain_getFinalizedHead","chain_getHead","chain_getHeader","chain_getRuntimeVersion","chain_subscribeAllHeads","chain_subscribeFinalisedHeads","chain_subscribeFinalizedHeads","chain_subscribeNewHead","chain_subscribeNewHeads","chain_subscribeRuntimeVersion","chain_unsubscribeAllHeads","chain_unsubscribeFinalisedHeads","chain_unsubscribeFinalizedHeads","chain_unsubscribeNewHead","chain_unsubscribeNewHeads","chain_unsubscribeRuntimeVersion","childstate_getKeys","childstate_getKeysPaged","childstate_getKeysPagedAt","childstate_getStorage","childstate_getStorageEntries","childstate_getStorageHash","childstate_getStorageSize","grandpa_proveFinality","grandpa_roundState","grandpa_subscribeJustifications","grandpa_unsubscribeJustifications","mmr_generateBatchProof","mmr_generateProof","offchain_localStorageGet","offchain_localStorageSet","payment_queryFeeDetails","payment_queryInfo","state_call","state_callAt","state_getChildReadProof","state_getKeys","state_getKeysPaged","state_getKeysPagedAt","state_getMetadata","state_getPairs","state_getReadProof","state_getRuntimeVersion","state_getStorage","state_getStorageAt","state_getStorageHash","state_getStorageHashAt","state_getStorageSize","state_getStorageSizeAt","state_queryStorage","state_queryStorageAt","state_subscribeRuntimeVersion","state_subscribeStorage","state_traceBlock","state_trieMigrationStatus","state_unsubscribeRuntimeVersion","state_unsubscribeStorage","subscribe_newHead","sync_state_genSyncSpec","system_accountNextIndex","system_addLogFilter","system_addReservedPeer","system_chain","system_chainType","system_dryRun","system_dryRunAt","system_health","system_localListenAddresses","system_localPeerId","system_name","system_nodeRoles","system_peers","system_properties","system_removeReservedPeer","system_reservedPeers","system_resetLogFilter","system_syncState","system_unstable_networkState","system_version","unsubscribe_newHead"],"version":1},"id":1}\n\n'})}),"\n",(0,a.jsxs)(n.p,{children:["Note that this call will show even those RPC methods which are disabled by a safety flag like\n",(0,a.jsx)(n.code,{children:"--rpc-methods Safe"}),". This is\n",(0,a.jsx)(n.a,{href:"https://github.com/paritytech/substrate/issues/7024",children:"being worked on"}),"."]}),"\n",(0,a.jsx)(n.p,{children:"Add parameters in the call, for example get a block by its hash value:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'echo \'{"id":1,"jsonrpc":"2.0","method":"chain_getBlock","params":["0x7d4ef171d483d37aa2339877524f0731af98e367c38f8fa27f133193ed2b5615"]}\' | websocat -n1 -B 99999999 ws://127.0.0.1:9944\n\n{"jsonrpc":"2.0","result":{"block":{"header":{"parentHash":"0xb5e10293122a3c706dfcf5c0e89d5fb90929e7ee580c5167e439afa330fae2c7","number":"0xbb07fe","stateRoot":"0x872dfbb3516a6e3b9becf01bb2192e53a1d77ef6c37e426f03ebf64b33a68ede","extrinsicsRoot":"0xe131e6af57c503ca6c6a151b2e621d05f65ef7be07e24abc2444fa1eb67c444a","digest":{"logs":["0x0642414245b50103b9000000ebdf8810000000002621c85fe312c4b8b9db111b9311a2857e265a62c7bd5a9b08f3e0989e51ea619481408decdc83f0f1322b706b50904f692f3c2dd505e7633dc029ca38a3f40072e7378760cf44e83566ec92ee330042d916684e957399badba91ed342a3270d","0x0542414245010190e94b9f1af95ae7645f85dc3d49f4c73dcce31083c9e1f712523a9b132aff798f89e0e6146429a869dde4ee060e7630831890f15942d5889ac4dfa24150368a"]}},"extrinsics":["0x280403000bd61300888301","..."]},"justifications":null},"id":1}\n'})}),"\n",(0,a.jsxs)(n.p,{children:["Some return values may not appear meaningful at first glance. Polkadot uses\n",(0,a.jsx)(n.a,{href:"https://docs.substrate.io/reference/scale-codec/",children:"SCALE encoding"})," as a format that is suitable for\nresource-constrained execution environments. You will need to decode the information and use the\nchain ",(0,a.jsx)(n.a,{href:"https://docs.substrate.io/reference/command-line-tools/subxt/#metadata",children:"metadata"}),"\n(",(0,a.jsx)(n.code,{children:"state_getMetadata"}),") to obtain human-readable information."]}),"\n",(0,a.jsx)(n.h3,{id:"tracking-the-chain-head",children:"Tracking the Chain Head"}),"\n",(0,a.jsxs)(n.p,{children:["Use the RPC endpoint ",(0,a.jsx)(n.code,{children:"chain_subscribeFinalizedHeads"})," to subscribe to a stream of hashes of finalized\nheaders, or ",(0,a.jsx)(n.code,{children:"chain_FinalizedHeads"})," to fetch the latest hash of the finalized header. Use\n",(0,a.jsx)(n.code,{children:"chain_getBlock"})," to get the block associated with a given hash. ",(0,a.jsx)(n.code,{children:"chain_getBlock"})," only accepts block\nhashes, so if you need to query intermediate blocks, use ",(0,a.jsx)(n.code,{children:"chain_getBlockHash"})," to get the block hash\nfrom a block number."]}),"\n",(0,a.jsx)(n.h2,{id:"substrate-api-sidecar",children:"Substrate API Sidecar"}),"\n",(0,a.jsx)(n.p,{children:"Parity maintains an RPC client, written in TypeScript, that exposes a limited set of endpoints. It\nhandles the metadata and codec logic so that you are always dealing with decoded information. It\nalso aggregates information that an infrastructure business may need for accounting and auditing,\ne.g. transaction fees."}),"\n",(0,a.jsxs)(n.p,{children:["The sidecar can fetch blocks, get the balance of an address atomically (i.e., with a corresponding\nblock number), get the chain's metadata, get a transaction fee prediction, calculate outstanding\nstaking rewards for an address, submit transactions to a node's transaction queue, and\n",(0,a.jsx)(n.a,{href:"https://paritytech.github.io/substrate-api-sidecar/dist/",children:"much more"}),"."]}),"\n",(0,a.jsxs)(n.p,{children:["The client runs on an HTTP host. The following examples use python3, but you can query any way you\nprefer at ",(0,a.jsx)(n.code,{children:"http://HOST:PORT/"}),". The default is ",(0,a.jsx)(n.code,{children:"http://127.0.0.1:8080"}),"."]}),"\n",(0,a.jsx)(n.h3,{id:"fetching-a-block",children:"Fetching a Block"}),"\n",(0,a.jsxs)(n.p,{children:["Fetch a block using the ",(0,a.jsx)(n.code,{children:"block/number"})," endpoint. To get the chain tip, omit the block number."]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-python",children:"import requests\nimport json\n\nurl = 'http://127.0.0.1:8080/blocks/7409038'\nresponse = requests.get(url)\nif response.ok:\n\tblock_info = json.loads(response.text)\n\tprint(block_info)\n"})}),"\n",(0,a.jsx)(n.p,{children:"This returns a fully decoded block."}),"\n",(0,a.jsxs)(n.p,{children:["In the ",(0,a.jsx)(n.code,{children:"balances.transfer"})," extrinsic, the ",(0,a.jsx)(n.code,{children:"partialFee"}),' item is the transaction fee. It is called\n"partial fee" because the ',(0,a.jsx)(n.a,{href:"/docs/build-protocol-info#fees",children:"total fee"})," would include the ",(0,a.jsx)(n.code,{children:"tip"})," field.\nNotice that some extrinsics do not have a signature. These are\n",(0,a.jsx)(n.a,{href:"/docs/build-protocol-info#extrinsics",children:"inherents"}),"."]}),"\n",(0,a.jsx)(n.admonition,{title:"Tracking transaction fees",type:"info",children:(0,a.jsxs)(n.p,{children:["When tracking transaction fees, the ",(0,a.jsx)(n.code,{children:"extrinsics.paysFee"})," value is not sufficient for determining if\nthe extrinsic had a fee. This field only means that it would require a fee if submitted as a\ntransaction. In order to charge a fee, a transaction also needs to be signed. So in the following\nexample, the ",(0,a.jsx)(n.code,{children:"timestamp.set"})," extrinsic does not pay a fee because it is an ",(0,a.jsx)(n.em,{children:"inherent,"})," put in the\nblock by the block author."]})}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-python",children:'{\n "number":"7409038",\n "hash":"0x0e9610f3c89fac046ef83aa625ad414d5403031faa026b7ab2a918184e389968",\n "parentHash":"0xba308541eb207bc639f36d392706309a031c21622f883fb07411060389c5ffdd",\n "stateRoot":"0x4426383b64a944ad7222a4019aefd558c749da0c6920cfcdfd587741d54abbe2",\n "extrinsicsRoot":"0x74749e5f5aeb610bc23fd6d8d79fd8bbf5e4b6053f70ba94ea6b3cc271df4b3a",\n "authorId":"Fvvz6Ej1D5ZR5ZTK1vE1dCjBvkbxE1VncptEtmFaecXe4PF",\n "logs":[\n {\n "type":"PreRuntime",\n "index":"6",\n "value":[\n "BABE",\n "0x023a0200009c7d191000000000"\n ]\n },\n {\n "type":"Seal",\n "index":"5",\n "value":[\n "BABE",\n "0x2296a50fa4fea3a46a95ad5b1f09de76d22c6ed3dc6755718c976e2d14c63e4dd3c6257813d9bdc03bb180b1e20393f1558ae1204982e5c7570df393e11f908b"\n ]\n }\n ],\n "onInitialize":{\n "events":[\n\n ]\n },\n "extrinsics":[\n {\n "method":{\n "pallet":"timestamp",\n "method":"set"\n },\n "signature":null,\n "nonce":null,\n "args":{\n "now":"1620636072000"\n },\n "tip":null,\n "hash":"0x8b853f49b6543e4fcbc796ad3574ea5601d2869d80629e080e501da4cb7b74b4",\n "info":{\n\n },\n "events":[\n {\n "method":{\n "pallet":"system",\n "method":"ExtrinsicSuccess"\n },\n "data":[\n {\n "weight":"185253000",\n "class":"Mandatory",\n "paysFee":"Yes"\n }\n ]\n }\n ],\n "success":true,\n "paysFee":false\n },\n {\n "method":{\n "pallet":"balances",\n "method":"transfer"\n },\n "signature":{\n "signature":"0x94b63112648e8e692f0076fa1ccab3a04510c269d1392c1df2560503865e144e3afd578f1e37e98063b64b98a77a89a9cdc8ade579dcac0984e78d90646a052001",\n "signer":{\n "id":"Gr5sBB1EgdmQ7FG3Ud2BdECWQTMDXNgGPfdHMMtDsmT4Dj3"\n }\n },\n "nonce":"12",\n "args":{\n "dest":{\n "id":"J6ksma2jVeHRcRoYPZBkJRzRbckys7oSmgvjKLrVbj1U8bE"\n },\n "value":"100000000"\n },\n "tip":"0",\n "hash":"0xfbc5e5de75d64abe5aa3ee9272a3112b3ce53710664f6f2b9416b2ffda8799c2",\n "info":{\n "weight":"201217000",\n "class":"Normal",\n "partialFee":"2583332634"\n },\n "events":[\n {\n "method":{\n "pallet":"balances",\n "method":"Transfer"\n },\n "data":[\n "Gr5sBB1EgdmQ7FG3Ud2BdECWQTMDXNgGPfdHMMtDsmT4Dj3",\n "J6ksma2jVeHRcRoYPZBkJRzRbckys7oSmgvjKLrVbj1U8bE",\n "100000000"\n ]\n },\n {\n "method":{\n "pallet":"balances",\n "method":"Deposit"\n },\n "data":[\n "Fvvz6Ej1D5ZR5ZTK1vE1dCjBvkbxE1VncptEtmFaecXe4PF",\n "2583332634"\n ]\n },\n {\n "method":{\n "pallet":"system",\n "method":"ExtrinsicSuccess"\n },\n "data":[\n {\n "weight":"201217000",\n "class":"Normal",\n "paysFee":"Yes"\n }\n ]\n }\n ],\n "success":true,\n "paysFee":true\n },\n {\n "method":{\n "pallet":"utility",\n "method":"batch"\n },\n "signature":{\n "signature":"0x8aa2fc3f0cff52533745679523705720cff42d0e7258b9797feed193deb0ca73474726e148af0a0b096d44c07f20e5292819ec92279cffb2897e95cc337e638e",\n "signer":{\n "id":"F4gmSZGiM9pMYPsKW7xnGktDr4zRmN2jqy5Ze678y9YWR7F"\n }\n },\n "nonce":"687",\n "args":{\n "calls":[\n {\n "method":{\n "pallet":"staking",\n "method":"payoutStakers"\n },\n "args":{\n "validator_stash":"Cfish3zJiFnTvR9jscCap7imeA9ep3cH1wZfcZwAp2gdZHo",\n "era":"2229"\n }\n },\n {\n "method":{\n "pallet":"staking",\n "method":"payoutStakers"\n },\n "args":{\n "validator_stash":"Cfish3zJiFnTvR9jscCap7imeA9ep3cH1wZfcZwAp2gdZHo",\n "era":"2230"\n }\n },\n {\n "method":{\n "pallet":"staking",\n "method":"payoutStakers"\n },\n "args":{\n "validator_stash":"Cfish3zJiFnTvR9jscCap7imeA9ep3cH1wZfcZwAp2gdZHo",\n "era":"2231"\n }\n },\n {\n "method":{\n "pallet":"staking",\n "method":"payoutStakers"\n },\n "args":{\n "validator_stash":"DifishR4auphofhzxsy2aupgYo4NaUECH7qgt71CgiB2o6P",\n "era":"2231"\n }\n },\n {\n "method":{\n "pallet":"staking",\n "method":"payoutStakers"\n },\n "args":{\n "validator_stash":"J1fishfH94nFZLNScHgC2HorWpFD2xdPxd96wtTCHLvKxfa",\n "era":"2231"\n }\n }\n ]\n },\n "tip":"0",\n "hash":"0x69171ec3f4e5e4dfd27f4d1c5b5dbc884932c5d9a078c84495bb7ab875c8785f",\n "info":{\n "weight":"629782467000",\n "class":"Normal",\n "partialFee":"5150837715"\n },\n "events":[\n {\n "method":{\n "pallet":"staking",\n "method":"Reward"\n },\n "data":[\n "Cfish3zJiFnTvR9jscCap7imeA9ep3cH1wZfcZwAp2gdZHo",\n "40730624074"\n ]\n },\n {\n "method":{\n "pallet":"staking",\n "method":"Reward"\n },\n "data":[\n "FhLcXuFkTwyc3o9K82VBahpain1YHWyGeNMDTTyeDJKfm5b",\n "4296071738"\n ]\n },\n {\n "method":{\n "pallet":"staking",\n "method":"Reward"\n },\n "data":[\n "F1NyXFUayqmVMdjNK45hcaTCE3JiqdU83sEGhQ3HQXn2Rpq",\n "1770904403"\n ]\n },\n\n // ...\n\n {\n "method":{\n "pallet":"utility",\n "method":"BatchCompleted"\n },\n "data":[\n\n ]\n },\n {\n "method":{\n "pallet":"balances",\n "method":"Deposit"\n },\n "data":[\n "Fvvz6Ej1D5ZR5ZTK1vE1dCjBvkbxE1VncptEtmFaecXe4PF",\n "5150837715"\n ]\n },\n {\n "method":{\n "pallet":"system",\n "method":"ExtrinsicSuccess"\n },\n "data":[\n {\n "weight":"629782467000",\n "class":"Normal",\n "paysFee":"Yes"\n }\n ]\n }\n ],\n "success":true,\n "paysFee":true\n }\n ],\n "onFinalize":{\n "events":[\n\n ]\n },\n "finalized":true\n}\n'})}),"\n",(0,a.jsx)(n.admonition,{title:"The JS number type is a 53 bit precision float",type:"info",children:(0,a.jsxs)(n.p,{children:["There is no guarantee that the numerical values in the response will have a numerical type. Any\nnumbers larger than ",(0,a.jsx)(n.code,{children:"2**53-1"})," will have a string type."]})}),"\n",(0,a.jsx)(n.h3,{id:"submitting-a-transaction",children:"Submitting a Transaction"}),"\n",(0,a.jsxs)(n.p,{children:["Submit a serialized transaction using the ",(0,a.jsx)(n.code,{children:"transaction"})," endpoint with an HTTP POST request."]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-python",children:"import requests\nimport json\n\nurl = 'http://127.0.0.1:8080/transaction/'\ntx_headers = {'Content-type' : 'application/json', 'Accept' : 'text/plain'}\nresponse = requests.post(\n\turl,\n\tdata='{\"tx\": \"0xed0...000\"}', # A serialized tx.\n\theaders=tx_headers\n)\ntx_response = json.loads(response.text)\n"})}),"\n",(0,a.jsx)(n.p,{children:"If successful, this endpoint returns a JSON with the transaction hash. In case of error, it will\nreturn an error report, e.g.:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:'{\n "error": "Failed to parse a tx" | "Failed to submit a tx",\n "cause": "Upstream error description"\n}\n'})})]})}function h(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(l,{...e})}):l(e)}},28453:(e,n,t)=>{t.d(n,{R:()=>r,x:()=>o});var a=t(96540);const s={},i=a.createContext(s);function r(e){const n=a.useContext(i);return a.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:r(e.components),a.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/824749c6.e7bfe139.js b/assets/js/824749c6.e7bfe139.js new file mode 100644 index 000000000000..6d4625e760fd --- /dev/null +++ b/assets/js/824749c6.e7bfe139.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8800],{84316:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>o,default:()=>h,frontMatter:()=>r,metadata:()=>a,toc:()=>d});const a=JSON.parse('{"id":"build/build-node-interaction","title":"Node Interaction","description":"Tools for node interaction.","source":"@site/../docs/build/build-node-interaction.md","sourceDirName":"build","slug":"/build-node-interaction","permalink":"/docs/build-node-interaction","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/build/build-node-interaction.md","tags":[],"version":"current","lastUpdatedBy":"Keith Alfaro","lastUpdatedAt":1665566150000,"frontMatter":{"id":"build-node-interaction","title":"Node Interaction","sidebar_label":"Node Interaction","description":"Tools for node interaction.","keywords":["RPC","api","integration"],"slug":"../build-node-interaction"},"sidebar":"docs","previous":{"title":"Using Light Clients","permalink":"/docs/build-light-clients"},"next":{"title":"Smart Contracts","permalink":"/docs/build-smart-contracts"}}');var s=t(74848),i=t(28453);const r={id:"build-node-interaction",title:"Node Interaction",sidebar_label:"Node Interaction",description:"Tools for node interaction.",keywords:["RPC","api","integration"],slug:"../build-node-interaction"},o=void 0,c={},d=[{value:"Polkadot RPC",id:"polkadot-rpc",level:2},{value:"Tracking the Chain Head",id:"tracking-the-chain-head",level:3},{value:"Substrate API Sidecar",id:"substrate-api-sidecar",level:2},{value:"Fetching a Block",id:"fetching-a-block",level:3},{value:"Submitting a Transaction",id:"submitting-a-transaction",level:3}];function l(e){const n={a:"a",admonition:"admonition",br:"br",code:"code",em:"em",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(n.p,{children:["This page will guide you through some basic interactions with your node. This guide should ",(0,s.jsx)(n.em,{children:"guide\nyou to the proper tools,"})," not be seen as canonical reference. Always refer to the proper\ndocumentation for the tool you are using:"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"https://paritytech.github.io/substrate/master/sc_rpc_api/index.html",children:"Substrate RPC API"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"https://polkadot.js.org/docs/substrate/rpc",children:"Polkadot-JS RPC"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"https://github.com/paritytech/substrate-api-sidecar",children:"Substrate API Sidecar"})}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Polkadot-JS RPC"})," is a JavaScript library for interacting with the ",(0,s.jsx)(n.strong,{children:"Substrate RPC API"})," endpoint,\ndistributed as ",(0,s.jsx)(n.code,{children:"@polkadot/api"})," Node.js package.",(0,s.jsx)(n.br,{}),"\n",(0,s.jsx)(n.strong,{children:"Substrate API Sidecar"})," is using the ",(0,s.jsx)(n.strong,{children:"Polkadot-JS RPC"})," to provide separately runnable REST\nservices."]}),"\n",(0,s.jsx)(n.h2,{id:"polkadot-rpc",children:"Polkadot RPC"}),"\n",(0,s.jsx)(n.p,{children:"The Parity Polkadot client exposes HTTP and WS endpoints for RPC connections. The default ports are\n9933 for HTTP and 9944 for WS."}),"\n",(0,s.jsxs)(n.p,{children:["To get a list of all RPC methods, the node has an RPC endpoint called ",(0,s.jsx)(n.code,{children:"rpc_methods"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["For example, using ",(0,s.jsx)(n.a,{href:"https://github.com/vi/websocat#installation",children:"websocat"}),":"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:'echo \'{"id":1,"jsonrpc":"2.0","method":"rpc_methods","params":[]}\' | websocat -n1 -B 99999999 ws://127.0.0.1:9944\n\n{"jsonrpc":"2.0","result":{"methods":["account_nextIndex","author_hasKey","author_hasSessionKeys","author_insertKey","author_pendingExtrinsics","author_removeExtrinsic","author_rotateKeys","author_submitAndWatchExtrinsic","author_submitExtrinsic","author_unwatchExtrinsic","babe_epochAuthorship","beefy_getFinalizedHead","beefy_subscribeJustifications","beefy_unsubscribeJustifications","chain_getBlock","chain_getBlockHash","chain_getFinalisedHead","chain_getFinalizedHead","chain_getHead","chain_getHeader","chain_getRuntimeVersion","chain_subscribeAllHeads","chain_subscribeFinalisedHeads","chain_subscribeFinalizedHeads","chain_subscribeNewHead","chain_subscribeNewHeads","chain_subscribeRuntimeVersion","chain_unsubscribeAllHeads","chain_unsubscribeFinalisedHeads","chain_unsubscribeFinalizedHeads","chain_unsubscribeNewHead","chain_unsubscribeNewHeads","chain_unsubscribeRuntimeVersion","childstate_getKeys","childstate_getKeysPaged","childstate_getKeysPagedAt","childstate_getStorage","childstate_getStorageEntries","childstate_getStorageHash","childstate_getStorageSize","grandpa_proveFinality","grandpa_roundState","grandpa_subscribeJustifications","grandpa_unsubscribeJustifications","mmr_generateBatchProof","mmr_generateProof","offchain_localStorageGet","offchain_localStorageSet","payment_queryFeeDetails","payment_queryInfo","state_call","state_callAt","state_getChildReadProof","state_getKeys","state_getKeysPaged","state_getKeysPagedAt","state_getMetadata","state_getPairs","state_getReadProof","state_getRuntimeVersion","state_getStorage","state_getStorageAt","state_getStorageHash","state_getStorageHashAt","state_getStorageSize","state_getStorageSizeAt","state_queryStorage","state_queryStorageAt","state_subscribeRuntimeVersion","state_subscribeStorage","state_traceBlock","state_trieMigrationStatus","state_unsubscribeRuntimeVersion","state_unsubscribeStorage","subscribe_newHead","sync_state_genSyncSpec","system_accountNextIndex","system_addLogFilter","system_addReservedPeer","system_chain","system_chainType","system_dryRun","system_dryRunAt","system_health","system_localListenAddresses","system_localPeerId","system_name","system_nodeRoles","system_peers","system_properties","system_removeReservedPeer","system_reservedPeers","system_resetLogFilter","system_syncState","system_unstable_networkState","system_version","unsubscribe_newHead"],"version":1},"id":1}\n\n'})}),"\n",(0,s.jsxs)(n.p,{children:["Note that this call will show even those RPC methods which are disabled by a safety flag like\n",(0,s.jsx)(n.code,{children:"--rpc-methods Safe"}),". This is\n",(0,s.jsx)(n.a,{href:"https://github.com/paritytech/substrate/issues/7024",children:"being worked on"}),"."]}),"\n",(0,s.jsx)(n.p,{children:"Add parameters in the call, for example get a block by its hash value:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:'echo \'{"id":1,"jsonrpc":"2.0","method":"chain_getBlock","params":["0x7d4ef171d483d37aa2339877524f0731af98e367c38f8fa27f133193ed2b5615"]}\' | websocat -n1 -B 99999999 ws://127.0.0.1:9944\n\n{"jsonrpc":"2.0","result":{"block":{"header":{"parentHash":"0xb5e10293122a3c706dfcf5c0e89d5fb90929e7ee580c5167e439afa330fae2c7","number":"0xbb07fe","stateRoot":"0x872dfbb3516a6e3b9becf01bb2192e53a1d77ef6c37e426f03ebf64b33a68ede","extrinsicsRoot":"0xe131e6af57c503ca6c6a151b2e621d05f65ef7be07e24abc2444fa1eb67c444a","digest":{"logs":["0x0642414245b50103b9000000ebdf8810000000002621c85fe312c4b8b9db111b9311a2857e265a62c7bd5a9b08f3e0989e51ea619481408decdc83f0f1322b706b50904f692f3c2dd505e7633dc029ca38a3f40072e7378760cf44e83566ec92ee330042d916684e957399badba91ed342a3270d","0x0542414245010190e94b9f1af95ae7645f85dc3d49f4c73dcce31083c9e1f712523a9b132aff798f89e0e6146429a869dde4ee060e7630831890f15942d5889ac4dfa24150368a"]}},"extrinsics":["0x280403000bd61300888301","..."]},"justifications":null},"id":1}\n'})}),"\n",(0,s.jsxs)(n.p,{children:["Some return values may not appear meaningful at first glance. Polkadot uses\n",(0,s.jsx)(n.a,{href:"https://docs.substrate.io/reference/scale-codec/",children:"SCALE encoding"})," as a format that is suitable for\nresource-constrained execution environments. You will need to decode the information and use the\nchain ",(0,s.jsx)(n.a,{href:"https://docs.substrate.io/reference/command-line-tools/subxt/#metadata",children:"metadata"}),"\n(",(0,s.jsx)(n.code,{children:"state_getMetadata"}),") to obtain human-readable information."]}),"\n",(0,s.jsx)(n.h3,{id:"tracking-the-chain-head",children:"Tracking the Chain Head"}),"\n",(0,s.jsxs)(n.p,{children:["Use the RPC endpoint ",(0,s.jsx)(n.code,{children:"chain_subscribeFinalizedHeads"})," to subscribe to a stream of hashes of finalized\nheaders, or ",(0,s.jsx)(n.code,{children:"chain_FinalizedHeads"})," to fetch the latest hash of the finalized header. Use\n",(0,s.jsx)(n.code,{children:"chain_getBlock"})," to get the block associated with a given hash. ",(0,s.jsx)(n.code,{children:"chain_getBlock"})," only accepts block\nhashes, so if you need to query intermediate blocks, use ",(0,s.jsx)(n.code,{children:"chain_getBlockHash"})," to get the block hash\nfrom a block number."]}),"\n",(0,s.jsx)(n.h2,{id:"substrate-api-sidecar",children:"Substrate API Sidecar"}),"\n",(0,s.jsx)(n.p,{children:"Parity maintains an RPC client, written in TypeScript, that exposes a limited set of endpoints. It\nhandles the metadata and codec logic so that you are always dealing with decoded information. It\nalso aggregates information that an infrastructure business may need for accounting and auditing,\ne.g. transaction fees."}),"\n",(0,s.jsxs)(n.p,{children:["The sidecar can fetch blocks, get the balance of an address atomically (i.e., with a corresponding\nblock number), get the chain's metadata, get a transaction fee prediction, calculate outstanding\nstaking rewards for an address, submit transactions to a node's transaction queue, and\n",(0,s.jsx)(n.a,{href:"https://paritytech.github.io/substrate-api-sidecar/dist/",children:"much more"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["The client runs on an HTTP host. The following examples use python3, but you can query any way you\nprefer at ",(0,s.jsx)(n.code,{children:"http://HOST:PORT/"}),". The default is ",(0,s.jsx)(n.code,{children:"http://127.0.0.1:8080"}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"fetching-a-block",children:"Fetching a Block"}),"\n",(0,s.jsxs)(n.p,{children:["Fetch a block using the ",(0,s.jsx)(n.code,{children:"block/number"})," endpoint. To get the chain tip, omit the block number."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"import requests\nimport json\n\nurl = 'http://127.0.0.1:8080/blocks/7409038'\nresponse = requests.get(url)\nif response.ok:\n\tblock_info = json.loads(response.text)\n\tprint(block_info)\n"})}),"\n",(0,s.jsx)(n.p,{children:"This returns a fully decoded block."}),"\n",(0,s.jsxs)(n.p,{children:["In the ",(0,s.jsx)(n.code,{children:"balances.transfer"})," extrinsic, the ",(0,s.jsx)(n.code,{children:"partialFee"}),' item is the transaction fee. It is called\n"partial fee" because the ',(0,s.jsx)(n.a,{href:"/docs/build-protocol-info#fees",children:"total fee"})," would include the ",(0,s.jsx)(n.code,{children:"tip"})," field.\nNotice that some extrinsics do not have a signature. These are\n",(0,s.jsx)(n.a,{href:"/docs/build-protocol-info#extrinsics",children:"inherents"}),"."]}),"\n",(0,s.jsx)(n.admonition,{title:"Tracking transaction fees",type:"info",children:(0,s.jsxs)(n.p,{children:["When tracking transaction fees, the ",(0,s.jsx)(n.code,{children:"extrinsics.paysFee"})," value is not sufficient for determining if\nthe extrinsic had a fee. This field only means that it would require a fee if submitted as a\ntransaction. In order to charge a fee, a transaction also needs to be signed. So in the following\nexample, the ",(0,s.jsx)(n.code,{children:"timestamp.set"})," extrinsic does not pay a fee because it is an ",(0,s.jsx)(n.em,{children:"inherent,"})," put in the\nblock by the block author."]})}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:'{\n "number":"7409038",\n "hash":"0x0e9610f3c89fac046ef83aa625ad414d5403031faa026b7ab2a918184e389968",\n "parentHash":"0xba308541eb207bc639f36d392706309a031c21622f883fb07411060389c5ffdd",\n "stateRoot":"0x4426383b64a944ad7222a4019aefd558c749da0c6920cfcdfd587741d54abbe2",\n "extrinsicsRoot":"0x74749e5f5aeb610bc23fd6d8d79fd8bbf5e4b6053f70ba94ea6b3cc271df4b3a",\n "authorId":"Fvvz6Ej1D5ZR5ZTK1vE1dCjBvkbxE1VncptEtmFaecXe4PF",\n "logs":[\n {\n "type":"PreRuntime",\n "index":"6",\n "value":[\n "BABE",\n "0x023a0200009c7d191000000000"\n ]\n },\n {\n "type":"Seal",\n "index":"5",\n "value":[\n "BABE",\n "0x2296a50fa4fea3a46a95ad5b1f09de76d22c6ed3dc6755718c976e2d14c63e4dd3c6257813d9bdc03bb180b1e20393f1558ae1204982e5c7570df393e11f908b"\n ]\n }\n ],\n "onInitialize":{\n "events":[\n\n ]\n },\n "extrinsics":[\n {\n "method":{\n "pallet":"timestamp",\n "method":"set"\n },\n "signature":null,\n "nonce":null,\n "args":{\n "now":"1620636072000"\n },\n "tip":null,\n "hash":"0x8b853f49b6543e4fcbc796ad3574ea5601d2869d80629e080e501da4cb7b74b4",\n "info":{\n\n },\n "events":[\n {\n "method":{\n "pallet":"system",\n "method":"ExtrinsicSuccess"\n },\n "data":[\n {\n "weight":"185253000",\n "class":"Mandatory",\n "paysFee":"Yes"\n }\n ]\n }\n ],\n "success":true,\n "paysFee":false\n },\n {\n "method":{\n "pallet":"balances",\n "method":"transfer"\n },\n "signature":{\n "signature":"0x94b63112648e8e692f0076fa1ccab3a04510c269d1392c1df2560503865e144e3afd578f1e37e98063b64b98a77a89a9cdc8ade579dcac0984e78d90646a052001",\n "signer":{\n "id":"Gr5sBB1EgdmQ7FG3Ud2BdECWQTMDXNgGPfdHMMtDsmT4Dj3"\n }\n },\n "nonce":"12",\n "args":{\n "dest":{\n "id":"J6ksma2jVeHRcRoYPZBkJRzRbckys7oSmgvjKLrVbj1U8bE"\n },\n "value":"100000000"\n },\n "tip":"0",\n "hash":"0xfbc5e5de75d64abe5aa3ee9272a3112b3ce53710664f6f2b9416b2ffda8799c2",\n "info":{\n "weight":"201217000",\n "class":"Normal",\n "partialFee":"2583332634"\n },\n "events":[\n {\n "method":{\n "pallet":"balances",\n "method":"Transfer"\n },\n "data":[\n "Gr5sBB1EgdmQ7FG3Ud2BdECWQTMDXNgGPfdHMMtDsmT4Dj3",\n "J6ksma2jVeHRcRoYPZBkJRzRbckys7oSmgvjKLrVbj1U8bE",\n "100000000"\n ]\n },\n {\n "method":{\n "pallet":"balances",\n "method":"Deposit"\n },\n "data":[\n "Fvvz6Ej1D5ZR5ZTK1vE1dCjBvkbxE1VncptEtmFaecXe4PF",\n "2583332634"\n ]\n },\n {\n "method":{\n "pallet":"system",\n "method":"ExtrinsicSuccess"\n },\n "data":[\n {\n "weight":"201217000",\n "class":"Normal",\n "paysFee":"Yes"\n }\n ]\n }\n ],\n "success":true,\n "paysFee":true\n },\n {\n "method":{\n "pallet":"utility",\n "method":"batch"\n },\n "signature":{\n "signature":"0x8aa2fc3f0cff52533745679523705720cff42d0e7258b9797feed193deb0ca73474726e148af0a0b096d44c07f20e5292819ec92279cffb2897e95cc337e638e",\n "signer":{\n "id":"F4gmSZGiM9pMYPsKW7xnGktDr4zRmN2jqy5Ze678y9YWR7F"\n }\n },\n "nonce":"687",\n "args":{\n "calls":[\n {\n "method":{\n "pallet":"staking",\n "method":"payoutStakers"\n },\n "args":{\n "validator_stash":"Cfish3zJiFnTvR9jscCap7imeA9ep3cH1wZfcZwAp2gdZHo",\n "era":"2229"\n }\n },\n {\n "method":{\n "pallet":"staking",\n "method":"payoutStakers"\n },\n "args":{\n "validator_stash":"Cfish3zJiFnTvR9jscCap7imeA9ep3cH1wZfcZwAp2gdZHo",\n "era":"2230"\n }\n },\n {\n "method":{\n "pallet":"staking",\n "method":"payoutStakers"\n },\n "args":{\n "validator_stash":"Cfish3zJiFnTvR9jscCap7imeA9ep3cH1wZfcZwAp2gdZHo",\n "era":"2231"\n }\n },\n {\n "method":{\n "pallet":"staking",\n "method":"payoutStakers"\n },\n "args":{\n "validator_stash":"DifishR4auphofhzxsy2aupgYo4NaUECH7qgt71CgiB2o6P",\n "era":"2231"\n }\n },\n {\n "method":{\n "pallet":"staking",\n "method":"payoutStakers"\n },\n "args":{\n "validator_stash":"J1fishfH94nFZLNScHgC2HorWpFD2xdPxd96wtTCHLvKxfa",\n "era":"2231"\n }\n }\n ]\n },\n "tip":"0",\n "hash":"0x69171ec3f4e5e4dfd27f4d1c5b5dbc884932c5d9a078c84495bb7ab875c8785f",\n "info":{\n "weight":"629782467000",\n "class":"Normal",\n "partialFee":"5150837715"\n },\n "events":[\n {\n "method":{\n "pallet":"staking",\n "method":"Reward"\n },\n "data":[\n "Cfish3zJiFnTvR9jscCap7imeA9ep3cH1wZfcZwAp2gdZHo",\n "40730624074"\n ]\n },\n {\n "method":{\n "pallet":"staking",\n "method":"Reward"\n },\n "data":[\n "FhLcXuFkTwyc3o9K82VBahpain1YHWyGeNMDTTyeDJKfm5b",\n "4296071738"\n ]\n },\n {\n "method":{\n "pallet":"staking",\n "method":"Reward"\n },\n "data":[\n "F1NyXFUayqmVMdjNK45hcaTCE3JiqdU83sEGhQ3HQXn2Rpq",\n "1770904403"\n ]\n },\n\n // ...\n\n {\n "method":{\n "pallet":"utility",\n "method":"BatchCompleted"\n },\n "data":[\n\n ]\n },\n {\n "method":{\n "pallet":"balances",\n "method":"Deposit"\n },\n "data":[\n "Fvvz6Ej1D5ZR5ZTK1vE1dCjBvkbxE1VncptEtmFaecXe4PF",\n "5150837715"\n ]\n },\n {\n "method":{\n "pallet":"system",\n "method":"ExtrinsicSuccess"\n },\n "data":[\n {\n "weight":"629782467000",\n "class":"Normal",\n "paysFee":"Yes"\n }\n ]\n }\n ],\n "success":true,\n "paysFee":true\n }\n ],\n "onFinalize":{\n "events":[\n\n ]\n },\n "finalized":true\n}\n'})}),"\n",(0,s.jsx)(n.admonition,{title:"The JS number type is a 53 bit precision float",type:"info",children:(0,s.jsxs)(n.p,{children:["There is no guarantee that the numerical values in the response will have a numerical type. Any\nnumbers larger than ",(0,s.jsx)(n.code,{children:"2**53-1"})," will have a string type."]})}),"\n",(0,s.jsx)(n.h3,{id:"submitting-a-transaction",children:"Submitting a Transaction"}),"\n",(0,s.jsxs)(n.p,{children:["Submit a serialized transaction using the ",(0,s.jsx)(n.code,{children:"transaction"})," endpoint with an HTTP POST request."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"import requests\nimport json\n\nurl = 'http://127.0.0.1:8080/transaction/'\ntx_headers = {'Content-type' : 'application/json', 'Accept' : 'text/plain'}\nresponse = requests.post(\n\turl,\n\tdata='{\"tx\": \"0xed0...000\"}', # A serialized tx.\n\theaders=tx_headers\n)\ntx_response = json.loads(response.text)\n"})}),"\n",(0,s.jsx)(n.p,{children:"If successful, this endpoint returns a JSON with the transaction hash. In case of error, it will\nreturn an error report, e.g.:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:'{\n "error": "Failed to parse a tx" | "Failed to submit a tx",\n "cause": "Upstream error description"\n}\n'})})]})}function h(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},28453:(e,n,t)=>{t.d(n,{R:()=>r,x:()=>o});var a=t(96540);const s={},i=a.createContext(s);function r(e){const n=a.useContext(i);return a.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:r(e.components),a.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/8247eba8.213a9e31.js b/assets/js/8247eba8.213a9e31.js new file mode 100644 index 000000000000..a38ab8b881ea --- /dev/null +++ b/assets/js/8247eba8.213a9e31.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7044],{8380:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>l,contentTitle:()=>a,default:()=>h,frontMatter:()=>o,metadata:()=>n,toc:()=>c});const n=JSON.parse('{"id":"learn/xcm/journey/transfers/learn-xcm-docs-transfers-teleport","title":"Asset Teleportation","description":"Teleportation: Sending Assets Across Chains.","source":"@site/../docs/learn/xcm/journey/transfers/teleports.md","sourceDirName":"learn/xcm/journey/transfers","slug":"/learn/xcm/journey/transfers-teleport","permalink":"/docs/learn/xcm/journey/transfers-teleport","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/xcm/journey/transfers/teleports.md","tags":[],"version":"current","lastUpdatedBy":"bader y","lastUpdatedAt":1694099593000,"frontMatter":{"id":"learn-xcm-docs-transfers-teleport","title":"Asset Teleportation","sidebar_label":"Asset Teleportation","description":"Teleportation: Sending Assets Across Chains.","keywords":["xcm","cross-consensus messaging","transfers","teleport"],"slug":"../transfers-teleport"},"sidebar":"docs","previous":{"title":"Summary","permalink":"/docs/learn/xcm/journey/transfers-summary"},"next":{"title":"Reserve-backed Transfers","permalink":"/docs/learn/xcm/journey/transfers-reserve"}}');var i=s(74848),r=s(28453);const o={id:"learn-xcm-docs-transfers-teleport",title:"Asset Teleportation",sidebar_label:"Asset Teleportation",description:"Teleportation: Sending Assets Across Chains.",keywords:["xcm","cross-consensus messaging","transfers","teleport"],slug:"../transfers-teleport"},a="Asset teleportation",l={},c=[{value:"Process",id:"process",level:2},{value:"1. InitiateTeleport",id:"1-initiateteleport",level:3},{value:"2. ReceiveTeleportedAssets",id:"2-receiveteleportedassets",level:3},{value:"3. DepositAsset",id:"3-depositasset",level:3},{value:"Thoughts",id:"thoughts",level:3},{value:"Example",id:"example",level:2},{value:"InitiateTeleport",id:"initiateteleport",level:3},{value:"ReceiveTeleportedAsset",id:"receiveteleportedasset",level:3},{value:"ClearOrigin",id:"clearorigin",level:3},{value:"Another example",id:"another-example",level:2},{value:"Next steps",id:"next-steps",level:2}];function d(e){const t={a:"a",code:"code",em:"em",h1:"h1",h2:"h2",h3:"h3",header:"header",img:"img",li:"li",ol:"ol",p:"p",pre:"pre",...(0,r.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.header,{children:(0,i.jsx)(t.h1,{id:"asset-teleportation",children:"Asset teleportation"})}),"\n",(0,i.jsx)(t.p,{children:"Asset teleportation is the simpler method of the two for sending assets from one chain to another.\nIt has only two actors, the source and the destination."}),"\n",(0,i.jsx)(t.h2,{id:"process",children:"Process"}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"Asset Teleportation diagram",src:s(73248).A+"",width:"700",height:"311"})}),"\n",(0,i.jsx)(t.p,{children:"The way in which we transfer assets between the source and the destination are briefly summarized in\nthe numbered labels on the diagram, and are explained in more detail below:"}),"\n",(0,i.jsx)(t.h3,{id:"1-initiateteleport",children:"1. InitiateTeleport"}),"\n",(0,i.jsxs)(t.p,{children:["The source gathers the assets to be teleported from the sending account and ",(0,i.jsx)(t.em,{children:"takes them out of the\ncirculating supply"}),", taking note of the total amount of assets that were taken out."]}),"\n",(0,i.jsx)(t.h3,{id:"2-receiveteleportedassets",children:"2. ReceiveTeleportedAssets"}),"\n",(0,i.jsxs)(t.p,{children:["The source then creates an XCM instruction called ",(0,i.jsx)(t.code,{children:"ReceiveTeleportedAssets"})," and puts the amount of\nassets taken out of circulation and the receiving account as parameters to this instruction. It then\nsends this instruction over to the destination, where it gets processed and new assets are ",(0,i.jsx)(t.em,{children:"put back\ninto the circulating supply"})," accordingly."]}),"\n",(0,i.jsx)(t.h3,{id:"3-depositasset",children:"3. DepositAsset"}),"\n",(0,i.jsx)(t.p,{children:"The destination then deposits the assets to the receiving account of the asset."}),"\n",(0,i.jsx)(t.h3,{id:"thoughts",children:"Thoughts"}),"\n",(0,i.jsx)(t.p,{children:'The phrases "taken out of circulating supply" and "put back into circulating supply" are highlighted\nabove to give an indication of how much flexibility an XCM executor has in implementing the\nsemantics of taking an asset out of and putting it back into its circulating supply. The\nstraightforward answer is to burn the assets to take them out of circulation, but there are multiple\nmethods of achieving the same goal, such as transferring the assets locally to an inaccessible\naccount. Likewise for putting assets back to circulation, the receiving consensus system can freely\nchoose to implement such semantics by releasing assets from a pre-filled and inaccessible treasury\nof the assets transferred, or perform a mint of the assets.'}),"\n",(0,i.jsx)(t.p,{children:"The above also gives a hint on the disadvantages of this model, it requires both the source and\ndestination to have a high level of mutual trust. The destination must trust that the source has\nappropriately removed the assets that were sent over from the circulating supply, and the source\nmust also trust the destination to put the assets back into circulation. An asset teleportation\nshould result in the same circulating supply of the asset. Failing to uphold either of these two\nconditions will result in a change in the asset's total issuance (in the case of fungible tokens) or\na complete loss/duplication of an NFT."}),"\n",(0,i.jsx)(t.h2,{id:"example",children:"Example"}),"\n",(0,i.jsx)(t.p,{children:"The following is an example XCM program that achieves the process described above."}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-rust",children:"let message = Xcm(vec![\n WithdrawAsset((Here, teleport_amount).into()),\n InitiateTeleport {\n assets: All.into(),\n dest: Parachain(1).into(),\n xcm: Xcm(vec![DepositAsset {\n assets: All.into(),\n beneficiary: Junction::AccountId32 {\n network: None,\n id: ALICE.into(),\n }\n }]),\n },\n]);\n"})}),"\n",(0,i.jsx)(t.p,{children:"Let's discuss how the new instructions work."}),"\n",(0,i.jsx)(t.h3,{id:"initiateteleport",children:"InitiateTeleport"}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-rust",children:"InitiateTeleport { assets: MultiAssetFilter, dest: MultiLocation, xcm: Xcm<()> }\n"})}),"\n",(0,i.jsxs)(t.p,{children:["This instruction is intended to be executed from the source system. It takes the assets to be\nteleported (that match the ",(0,i.jsx)(t.code,{children:"MultiAssetFilter"}),") from the holding register, which needs to have been\npopulated, usually with a ",(0,i.jsx)(t.code,{children:"WithdrawAsset"})," instruction. It then sends an XCM to the destination\nsystem given by ",(0,i.jsx)(t.code,{children:"dest"})," with the following instructions:"]}),"\n",(0,i.jsxs)(t.ol,{children:["\n",(0,i.jsx)(t.li,{children:"ReceiveTeleportedAsset"}),"\n",(0,i.jsx)(t.li,{children:"ClearOrigin"}),"\n",(0,i.jsxs)(t.li,{children:["All the instructions from the ",(0,i.jsx)(t.code,{children:"xcm"})," operand, in this case ",(0,i.jsx)(t.code,{children:"DepositAsset"})]}),"\n"]}),"\n",(0,i.jsx)(t.p,{children:"As we see in the example, instructions 1. and 2. are always added by the executor, no need to\nspecify them."}),"\n",(0,i.jsx)(t.h3,{id:"receiveteleportedasset",children:"ReceiveTeleportedAsset"}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-rust",children:"ReceiveTeleportedAssets(MultiAssets)\n"})}),"\n",(0,i.jsxs)(t.p,{children:["This instruction is a ",(0,i.jsx)(t.em,{children:"trusted indication"}),". It should only be executed if the origin of the XCM is\ntrusted for this purpose. This level of care must be taken because this instruction will ",(0,i.jsx)(t.em,{children:"put assets\ninto the circulating supply"}),", usually minting them. As specified earlier, this can result in an\nincrease/decrease in circulating supply of an asset, or a duplication/loss of an NFT, if the source\nis not trusted for this purpose."]}),"\n",(0,i.jsxs)(t.p,{children:["You can set which origins are allowed to act as teleporters by configuring the\n",(0,i.jsx)(t.a,{href:"/docs/learn/xcm/config-deep-dive#isteleporter",children:"IsTeleporter"})," type in the XCM executor. If the origin\nis not allowed to teleport assets to this system, an ",(0,i.jsx)(t.code,{children:"UntrustedTeleportLocation"})," error is returned."]}),"\n",(0,i.jsxs)(t.p,{children:["This instruction will populate the holding register with the teleported assets, which can be used by\nfurther instructions. In our example, the ",(0,i.jsx)(t.code,{children:"DepositAsset"})," instruction will deposit these assets to\nthe receiving account."]}),"\n",(0,i.jsx)(t.h3,{id:"clearorigin",children:"ClearOrigin"}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-rust",children:"ClearOrigin\n"})}),"\n",(0,i.jsxs)(t.p,{children:["This instruction clears the origin register of the XCVM. It's mainly used to not allow further\ninstructions to act on behalf of the previous origin. The ",(0,i.jsx)(t.code,{children:"InitiateTeleport"})," instruction sends a XCM\nto the destination system with freshly minted assets and immediately clears the origin."]}),"\n",(0,i.jsx)(t.h2,{id:"another-example",children:"Another example"}),"\n",(0,i.jsx)(t.p,{children:"Let's say we want to teleport an NFT (Non-Fungible Token) this time, instead of a fungible token, to\nanother system. We could do so with the following program:"}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-rust",children:"let message = Xcm(vec![\n WithdrawAsset((GeneralIndex(1), 42u32).into()),\n InitiateTeleport {\n assets: All.into(),\n dest: Parachain(1).into(),\n xcm: Xcm(vec![DepositAsset {\n assets: All.into(),\n beneficiary: Junction::AccountId32 {\n id: ALICE.into(),\n network: None,\n }.into()\n }]),\n },\n]);\n"})}),"\n",(0,i.jsxs)(t.p,{children:["Very little changes, in fact, only the ",(0,i.jsx)(t.code,{children:"MultiAsset"})," we're referencing changes, like we would expect.\nAll the teleportation logic stays the same. The example assumes an NFT with index 42 inside a\ncollection with index 1."]}),"\n",(0,i.jsx)(t.h2,{id:"next-steps",children:"Next steps"}),"\n",(0,i.jsxs)(t.p,{children:["We'll look at reserve-backed transfers ",(0,i.jsx)(t.a,{href:"/docs/learn/xcm/journey/transfers-reserve",children:"next"}),"."]})]})}function h(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}},73248:(e,t,s)=>{s.d(t,{A:()=>n});const n="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAArwAAAE3CAAAAABtTs0ZAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QA/4ePzL8AAAAJcEhZcwAAGJsAABibAUl1g5QAAAAHdElNRQfmAgkCAhQgaSxEAAAlRElEQVR42u2dfXBT573nP4mVoWoJWNGGYUW05ZZzSadmXPVilPgODglvEkvjIZSMlQxpArXjIXQyTmNvOoO6vb2Rdy4DCZ5MCaOEhuSSCWJCHMZZFgvzEgJ3DSem1/XiZsMesmQM2gyeExlfJoq38nb/kGzLxgYdvT/i+fxhS0fnPPr9zver5zznec45zx1/RSIRkzvzHYBEkirSvBJhkeaVCIs0r0RYpHklwiLNKxEWaV6JsEjzSoRFmlciLNK8EmGR5pUIizSvRFikeSXCIs0rERZpXomwSPNKhEWaVyIs0rwSYZHmlQiLNK9EWKR5JcIizSsRFmleibBI80qERZpXIizSvBJhkeaVCIs0r0RYpHklwiLNKxEWaV6JsEjzSoRFmlciLNK8EmGR5pUIizSvRFikeSXCIs0rERZpXomwSPNKhMWUxbIjJym3xV6GelhiNrSx8S0ktxtpmVfbQ3lNwvst49+GvfhsRK9azPR4aUu0Yjgyy5S43Qhj20/c4mZEr5otedh3kjyThnmjLQEg0a3B8W8tPsrhg20+N+U+xtlrk9ZmG7fdCDWkwPlaV3MO95mkQEjDvL8NWvWpPouYAbMb4EMA24hVwxaAsDZuxTagGqcXzCOLJhQ18WV43E/haF53oSRfpHPC5jk0ycJQRUV7dH/Vc92xl6EKDW9FqL2iIgTalooVnv1RtqyA6goI73dVvRkGm81mA4vNZrNETz9X5ekeLS3S7qnaEgK2VLhoXxP7JLLfs6LCE4p9wXbXvooAwYr2fO9JSc5Jo+b1TtoktcD5tzVU9dQNH0c8YNW2zXTH32sewO9vSmwqrNaxarVKIL5FFRAMehoB3RPW9VpPI921YNW16g4L8LaG5HYljZrXPNXSwDNn6uEcALY28HXFGg07wRd08TbNPmjr4gTW3WessXZFHE2n/lATWij29hxW3xkngShAxaE2hQ44itIW3A1HMIPmaVnTBa4uN5LbjWz08ypu03o4fMPyxq6u5aG5o87kAPO+OlqBFhlb5QTYjwI9sbfvYeHoD+ASwC9MtsfQw9EAFTYcTj7EAmxeLDvUbley0c+7bKpaeUsw8V1IR1UBPneMLjsGXoBTboCIiuYFOKcAFpgJXwILgJ+oWtgCTmnd25dsmNc+xfLTQTzLjwZG3lrAWQ0wa2yVe8A39s5s1ZVnAGYDRE0As76JfXYNIhaQ/bu3MRkxb4hxgwR9Ez6+FvsXeRlnI2+MLjY7VYub6L8lbvqkyhLzWEfYOr/mHu0Xu6RwHmaZrPopN3SBDUlBketR0TTM2w5wsZ1yWzXjBgkuJa5lgQ+rZgHcpaOe/kyF9xpmw3tP2paowbmPeDU6xuxbBr4NBwPEeyAW+dm+5lWVgAJs3vp5AKeJdf7g3Ef2aHhGt7LqwQ1zZPshVcJHTl5c8eDCxB24vwewLCifZcgfsVHRSDi2VXg7bE6igoletaSoXTpdZQCaF99NAzS3NGjVbQAmT4AGJfCqGljgdgUDga7qk6rfDy0JVa+l3h8MgjPee7bAFQwEoF4BWFcL1mdh3THN7wfn5tGtdnrw+GR3Q4pEVgCBQH1dwrKe+NmJs9lIuyw2jvqiGhs9PRCEuXW33uqDbalql4Z5XfH/s3FRHl9SHv+Di3LMLmbDYh9YZrsws/nBw1Vums9Sjrd8JphfDx+4VF5lG9sW6jacOTx30QKY7cKMqdnb1lO+cC4AdavfW7DcBJZA+EjPqoXmsY0UH/EIJMbZCc6f+PGvH1//+bj2oaZ69tgAoglGGR3njP5l9FWs7WezARE1vvAAVt2/Ib5d+O6RAsYGR+MFfUiq3PHXfO+75NgSpCvfMRQn0ZawpcG0PUDL4rGF8d39ph9XM4QOHWDdejNU4FuyM+DabAO0E37wbDaD9qqKdcUvLLR7adsZBOgCzUNLA7sdQOTdAzrOajeE/9Ch43zWAdHz7weVZ5ab2r0AbSmdv8jreW93TI3NjSa+gIU3flbnJAj7q/06/qpugLerOghWa7Dd48dKYANENqsoemBLdPy2B7EudvI+wLt+3WpVvd2wPaArqLUheL42SNi7OpxO6NK8EsKeChXfZGdNP4EwJ1HaAvHLn7SW4G44RzSA69ShJrQw7+rsDrS4LFcBRkZPiQZYx5MEIxDx4zp00OP6nHAQV6DD4+ohouI69Rv0XnfCEKxRRDFvY1tbvkMoXiIaeB6Y7BM7RCIq83rOOukAUBbjgJOchw1m00o4wmp46fQPmpvHG/A8PMJCOAdmJ8GWK5uba7jbSXC/3tDs5nOYe/K6lTPpxJ3NOykyiUWORmQPi48dgcCpSare88A5CAYBPWyBZYArqHIU5sT6QWtsPq/egPLM+C6DN2APwHuL4bXVeiCA5xcWU7NH3wb1681HwQ/Q0ZhG3KKYV5I9orhRPLTdeCNAtANs34CrCuA7xAacwliZCd+aicI94J5+pkPXvOWJVW9Ejd9joIYtmAJHTqoEaMSy59SHGn7q7FBvTya4m5EJ8w79kcoc7ONO/m5aDr7mdiNUjTVgscIg4cj4UcvIizoe5kK5m0jsepWORlBZwSN+vrRwFSwQXri48XQDhxL7dE/GzNnn50gN0UhNTXS1HthsjlBTE6niQN1CeEQZ6UC7lmLomTDv4K6cmHcXr9ybg6+53bBZdd2z8UNYzfbE/sh2zgeAzZg8gbdmTn9Ztx4ygb7l8TdgAYpVf+k30/8JNvCcSv26K7Aotl1s9PRt2GACjmkf1nTXoviw6Ip5/zacv7quaBUoVt3768+34WqODcGm5MNM9PP2v8g/52Av/1yaNyuEPTqA8/WEzvQtiSNsoV9pAG02KvB0aeDymmnfoQPWjTUJ27d7abOxJQgdK/A0AuzfRkB500+8gHi5p8ycflkHrIdMtHtT7eeVbd7bHkvg7PmwZY2SOEpZDjDXHmvG2gKh98KryiwACxpPn3nSBrjd3UdZvsAEloMnz3ctW3R/fFQUb/lMvnTxJAAre7jOhkWfn7RUldvgd49/+q+WqgfMsPjQ+fcty+83gfvazBQvDpQ1ryR5KiioS0hE6eeVSG5AmldihFP5DiAR2eaVJE8bBXXVtDSvJHkK7N4V2WyQCIuseSXj6Nes87P+JRd0JRMdR7LmlYxD23Us+19ybFdGHnQkzSsRFmleibBI80qERZpXIizSvBJhkeaVCIs0r0RYpHklwiLNKxEWaV6JsEjzSoRFmlciLNK8EmGR5pUIizSvRFikeSXCIs0rERZpXomwSPNKhEWaVyIs0rwSYZHmlQiLNK9EWKR5JcIizSsRFmleibBI80qERZpXIizSvBJhkeaVCIs0r0RYpHklwiLNKxEWaV6JsEjzSoRFTqgiySkdGjD4t2e6gZ/a0ysr1+bt59vLANeZDnDfd0hmWpgtfQC8CPD7GTkOWTIFqWnZOfZyY5oB5My8g9cudycGnkAljvtm3tSSD+8dfWmX3s076Wj5wJiUZdPSjCMX5h0OXe7uvMnnnXQClY77bCW3znhRDgKWTEnaWs6w9428THsC+aybd7D3k97xS8pmJHyYkHYnlD1UNumvNiHjhdkOWDIlGdFy7Cj6w3Tjya55B89+NDCW6Jx5Vss9E3+Qw1+H9YtX4on39lL66AOT5DyacWmabXxJqmRKy9GjaNqthmyad+iTj0fqS/uiH82eoiFUcu+9VMLgV3/+tA9gYO9e+8MPTcxrNOOl2YtXMjUZ1HL0KJp2qyF75r1wLN40KnU6v3/r39iMGfPXDH2pqgNA3969lcvGT4A7mrFsNeSBzGo5chRNu9WQJfMOq/sGYtkuXZp878C0+fPXDx4/PgB0dpY+4Uw8KsUzlq2GnJNxLeNHUXvarYasmHfo8PFYumsXGvbajDVr+s61AgO79i1dNZZfPGPZasgxWdAyfhR9OP3gMm/ekV+q/el5JSkVYLc/evGdPhhoPT72i51ROgCy1ZBjsqPloj6AB9IPL9PmHUm3cl0yoy1TUDK/uf9AJwzs2jea8tJWZKsht2RLy4WtZGawKcPmvfBOH8DaVek2aO7dtPFwKwzs+q9Pzx/L2JnZaCU3I2ta2ksHMtJqyKx5h97qBFj5ePptcZi2ZtX7R6DPV7lx2kjG0rw5I5taLm3NSKsho5dEdtZ1ApWvrM9EvsC09a9UjhbLUmBeBqOV3IysarkwQ5eoZK7mHdzVC9ifnp92SWPcu2nZO32w65NNM1jYysrUzhokRsmylvbSgYczUWTGat4//bIXeOofM5kvMP8fnwJ6f/kn7KWy1ZAjsq7l0oy0GjJV8w6/0QmUbUzjtHQKSlY43uqFVyqfXdoqWw3Z5y/8311Z1/I/Hs/Iha0l/5B+Gd/879JjvcBTP/9exvMFvrd4eg9c/uMysyMbxUvGEeqKfk62tdSW3J+J0jLSbPg/X/RB6SsrspEuwIpXSqHvv8zNVvmSMb6hPwdavn8hE2VlouY9/D+Ayi3Ts5UvfG/l1ctw7o70r+WQ3JyDAXKi5SeZ0DJ98w63HQQ2PZbV+5DvXDS7Cz6742/l3c7ZZLitFYG0vOOv6ea7vRdKm7I/btu3bQDKGmVvWfYQTct0zRvL15eLuyIHvRnJWDIVwmmZpnmHWnpzZ6jh7b1Q1pChMR/JBMTTMj3zDjUN5LIyjFUN26R7s4GAWqbVaB5uyWm+lDSWwUDLcK6+73ZCRC3T6W0Y3t4La2tz2AFw5+I7PqNfq5R9DplGSC3T2DTWbFmTu3QB1pRB73ZZ92YYMbVMo+Zt+wTKGnNdCVZq/fSXyNGKzCKmlqmb92BrXjqu7qzU+vlMjrVlFEG1TPnHdqEVSvPR6VrSWAqtGRkbl8QQVctUu8oGf5mr/uxJvts7IJ90mkGE1TLFmnd4K9CUJ//MaAK2ypO2DCGulima940+2JS3+9Dtm6DvjcyVF9VOh8cvCcUI33rb9oqK0GTLw6FRbrlu0oQqKtpH4otkKntxtUztToo/dUJlZb7yhcruTjr//scZKm17AFB8SsKi6vh/5ZeLUy00OPqyK5Xto78tr5nyw0g1OF9Ps5A4AmuZUs07+AqUPpu/fOHZUnhlMDNldQfAivbqZJ9pDdottnZ3ddkmW17ucrms4HK5XClFdT7YM/WH5wA1iar3poXEEFnLlLrKWvqhOYvXK9+aOyuOwJep1orjafia3bX/LXLlp3ePLXsDup59duPc45j+Hgi3XZ4b+5mH/uX6/zPfCaB9UDIbCP2LNqe3W5tzV+zlXUR7Pvr3d8OCZcuW/c+L7F+2bBmEAiWzAe04T9wNaB/MvCe2qUK7Fi+5+93Br2x3Qrv2XdPZr7vfu3LH9O/eDeF3+2MrRI989R/+bR9LFeA/fe26yDwFINrz0R9LppmBSO9HfyyZeRdA5Ni5eXdB+0ghAHTOnOxCApG1TKW3oXMXPJW1+0SSpGMvbMrI0S6E2cKbfgIJ7YaK2ME++iB0EfKpYN34MxMRXxBwNcPp32uxRkW7l7artfjc8JzKqbv2HNDBtdkGsCVIF/F1rS+4affSZmP/Wzoov3bQ7mX3P2lYtzqI7jmgA8oeMxU4L+quIIDPrXk1sL6w3ET7Dh3lGS8+N4RXsPtoQAkA0dU6QEAhUhXbLxbC24NA/XpzRayQeE4/p3TpDU/LE1rLFJoNQ7ugLN/5sqIMdg1loiSbzULYD3Nv+CT6PHjAp+Ly6NuOwpog9U6Cp4k2aNQ7tYbY+dcCaIOIisd8ya9bmwhuSCzmZY16l+6Nn6tFtun4rFptFKB2WT16LZz360qLC60NQNUp9ykovnK8Gi6P7j1PxKvjm+eNFXEEFixHCwNHdepbrGyOsBOafLApyoEgzib87+IDxVc+FshA65bnD/Ylhia2limcsL1F+pMQZYCNL8JbmzJTVnQLNE3YFVvgogbLiaq0LI52aafcYR2fO9oSPrP4EnRYwivosQGYPAE1Yj4HyzmB8zXTTK8etowWpOm02cLB+Lqcg1NmxcMlBWiqwe4lZDuKNcBigh/WALQshlPaPDdhjd2OaIf+qeNzCCjuuf64Ah7TAjhQB22wyHEwjJkOrCstS8JmEweor+OkeqzO7WXehOePD7S2Jta/Ymtp3LwXOuGpzN/Tb5h7n9pL57KMPBcj7NGpn3haHoRYH8R5aADo4iyUY2oETsAKgPMxbywP8LnjDFYHB1AfBOgda8OdiHdenIqt+x5UAZxTgCqYDV/MClABlAe1sIWEB7n2Qi3AsbpPwQox02k69hBO9UAdNHv0WqViuQP2VOsrlGWrLYR0/H5Ai5gnzXagtZWVznklCK+lYfMOvwP2gnjG89KP+9jz07vSHaxQ7g17dOrrJi73cW0b9yjwVXyBHj4/+uGl+P+ORgAcVv3oggDriOjxDz5bfMO6wWYALsbf9tQAFpgF169COTATzrrBOWq6z+L/tcgluBtmA3ACtm0DdE3BsrUWTQu4mrHtrkXT/J7GL0a2/twBMPTHSZI+coSVznkUlJbv/KPRAWrD5lX74OmCuI+s5GkfVw7c87/SLGaTaVLv4oaeoNruRoHdDgCWB/gGwhFmVQU5lVivrfMHlsM6zE71hv7XVUE6LImrJnT8XlH4AhSbVe+pgb6Yh8dWXjR6GlkV5Kot9juK+kc+PtgIjq5Qzw49uNmGoyt06i09sHlhwkkaMLhr8ryPHGFNQWnZpxo9ZzNq3uF9UJnhZ1ilyvzKTob+5t+lWYr1DzrO1SGwmPf30Jz4kbdL9y4xK1b96AL2YHcvgIMNeHTroQfgpDv8B/v9jtiaq/28hGKBJaoatmgHF5SPdf4uhLPuyE77nFhlvMhPtyO0s2q2A9jzOw7DXNb5g5ttkWOJxqUraloAJ5Tonhkz3Qocqou8DXA+bs7n1EDDX06eqlrunl3LVfORnqrlNWzjW4tTbVvO0T77EjN0RaeNWGLC3H8rnXMbC0vLfU6DPySj5lUHYF2+Mx1hXSfX56XdXdYBajXgc/cEx5vX/IIXXzPr/IGusE4Tpnp/oAudrSaLonnbVAjE17Qpms4vgZXbWOFUsR5KKEXRvG+HdXbH3i6AWqdKVwCgazU6iolH/FQ7VfCNVudVQf35JTWuoP9YWKeFueA/FtYBjsISgCdVzjtOBYM7KoIojuhJNfj2vCAuC0tUdbVFw+PG59WfXzJyIpRo3pXOeSV0FpiWA0arXoNdZUP7YGUBtPBj3LsS9qXbXTbaTJ0Et0LwNBt2OzXdWl8DG1oUTVOaHLDHp6goLaNdw48RO8+ytNWj4gwkVgp7fIqmKz5H7J3pVJNVRdlqATi4Trf63gUlUG9V8QTGDvduJ2oPv2tRNN3atBhThwuNFiASiDeKF8Ib/M6DHsTpw/SKEy2IsxFqdrt0DU/DSCETKF3b/M/r55cUgZYGBykOtsKbhXP37lAdrF2TXhnRq/EXFnM4QvxoHyL2KhLGbAHCo8fzsVchizm2xiwTRK/GVgSiV2fFrZtQntkytu7Ipu1eugh/xzx+s1C8oJG+gtEvDGOJXsVy11Us5sTiQ9/Mia8a+mZu/Jsj4dgXJ3Y4/BxIHKcQX0tj5h1+YSBts2SUg62U7iiIU44UaPemds1OikwYYSsCLY01G9QBWJXvJBNZBQNqvoNIg/SukDTGU79/bU3C6HARaGnMvPugsnAONMC0StiX7yBSZbbLZU6/lKRZMf568yLQ0lBvw4WBAjo9jbGuk4ELBdLdYxSHI49fXgxaGqp5j4G9YE5PY9xrh2P5DkJEikFLI+Yd6oSn853hRJ6GzoxcXHZ7URRaGjHvJxTgTGjz4oFJDFEUWhox78ewtuC6pUrWwsf5DkI8Pi4GLQ2Yd7CvIGddXwh9Gbqb7fahOLQ0YN6zhTnrur0UzuY7CNEoDi0NmPej2Py/BcdS+CjfMYhGcWiZvHkHBwo34QHZbjBEkWiZvHl7obQgnw82oxR68x2EWBSJlsmb9xMKdeJqp+wsM0iRaJm0eYd7CznhXvnYPQMUi5ZJmzcEfD/fqU3O98nt5VnCUyxaJm3ey2AvqIuQxphmh8v5DkIkikXLpM3bDYvyndlULILufMcgEt1FomXS5u2EH+U7san40Q23xkpuRrFomax5Bxl55EUBMjseoCQpikbLZM17DSjInkHigV3LdxDiUDRaJmvey1CW77ympkyesRmgaLRM1rzdMCffaU3NHHnGZoDuDGkZau++9Xe1G+3ENKClgXvYjF27HD1/NOCCDYqhrVKk4C6rLnSm2mH7ewCqlLnJ+KLH63Lcap33gz5bEkUlEdokJGveTrAaCUHbrEOXTtDlzcEdslbozNCjem8DbqJlTxAgCE7vTT233V4D5b6bnfZFfI874PGqcoxhQEsDNa8l+VXhVd3pnWWKfP5SsCtoZLvUMBSa5GY7rH41XD3aoVbHn4w5KdGAqwZsN/X3lWAV4MAoBrRMss3bD9xjIIKQitdmwuzYih6bTyfUHZ85LBz7Hw2FIBoKQyQ+rU04Gt84rGkGJxm7Jx6iJAlurqXdZrM5Gg85qd0fWxDqDo0IE4lPKhc+QzgUIhIKx+UMdY9uH+6OaRc6QV8oPKI2YU0Lx8uIQFiLThmAAS0N1LxGbnn6AmusteCIPZq2+yUdUHZZYHvQ5wauVtPF1WrXhs26z030t0FwNluA0IbRVbMSmoRb7zDTa8+r235mgtMNAK7fmSDyrh+wrqtjexC1mq6TXlczB/y+6S/rsflmYHuHDspjNVANfr+rOaa2tlkHrHtscNLrm/2SjnXdBlNqoSWQZM37rcGd86BV98R+XDHv1urUu9BW3FCjdnl1ZhNeH6TJpa7ohlC17vT5rJrH6Fmq0RBvW5LaUSYvnIH2Bjy+JoLrgXf91iZfPf7TPO5C8fliK9ppa6DJqW87A7QHqPc5tW0a+BRcvsdj62genfp69OoQwI5ampy6/4N0Q0zavEa7Bk1b0dfvHzk4RF/Cc6quuU3h3Ykr6nR0OdiieU7VNPuojbIT52tu9yGXfsjI98mO3uRJTksbXCe6g/pGd02HonUTPcCeGnfdTg7jqGKee/RprGrToZrXmzgMkR1srXO/3sRBcM+jyu2IreHFdaqursPJTgC9/lDN6z5OTvXNyWuZ/MXoxsZkHB60bZ4HnzsdAa7qPGkG2zP4b1jxGQtEVZ40w3Kf7y+RIF4TmDZMsmrGgrvtSWZ3OenjjE4dYHmM9wEOAUpX88Q1q01wP0EwB9ocwMLRZ27HCGlsMIPlydgkNawzQfnUM3gmr2Vqcw8nQWOjduKYpqoEFL6IP+12sj7fJcDV2OcmN4Sgpwe4BmHZh5BfZnAdpR2gj4uYXvD6ry2//8aOT6cZmAWA5e7QF9fpu7GoOQA/iGmqWGLrh9PuQ82aeUFR6iJXNuveANfj1+1bITSxe8UM9Ixd138V4jPlEZHmzScqcziPFldDg+XnA4EAzmcXTPDMT8Zenn55ssfMj5y9z4ppOg8y5LssmhcwKzs9WrcDvgYgMkUv3vTR+Z2YDvEzAdl5m1dC8ANmojwzusTUuPncmYCq+ibMS3hp9JXWgHXnd826Z/wK04lZ+i+ZjjFJ8143mvoXD8ZKVpzq+w4FLWoCvohVtNcAEqdK+AF6NB7Id6Hc4HhiiiHetiS1o6I+rDbsaIlONS9e3PC8+rZ7qo1OwE4FjkxYPCveBLySdIWUpJYpzD2cBJENDb+NvQqrrMIKVwGuYIXymG/bxmd3FYhUVIRnxW0d7Y4a+0pJRtmjshVmx28oC2sQPh0CTM1oU3ZiXqJeAU7COPEs8CWANtL5nymSNK/BOe3NWwm+GQJCW+BBLC5+1U20/S22QhVBjcibiQ9wN9Wz4TTRnbgspnp2tEfht7XPG8zEYIi3L7feUdqbHj9OBzgUfN0Q8Xj2ozdsCANnUWzMJjhZX0EVx6KEtqhwCebydnyxuZ6XThNt38ELGQsRyFqb11Hv9/txqmD9jQkau7RaRQOnA2xW3aNo1Cd2ha0/pjUoGmyG9f+qendUBFFey05kkpvjjZ+hxVq2vs2qqqBRX4PStG2FMu+ixq/BoWhVk0wGswRt9TyV3Z/6PU016/1ahSvWrbb+mNaghHWcyzMba7ZO2OoeOfehpmJ9YbkJsBzc2aXhqnIDHDz5tuZaVXYJMLtia5vfbenSlMdWWsD82gcn1aCrakl2TyUlkxK/BGyufUnsAK8c3NmlWT0PPgjUzDzfEbTWL3IAr+4EZrvK43/iSpoDJw5c9KxR7r8EmFsOU045s+Py4lzyM9Po+rhIvwmR5FRWnbuoLORrDnd1sintqTBvE9LRMpKD61uT19LAg/ayH3bqFHRwhUfKuysXsxdl/EF79xX4s+x64b58xyAKxaNlkub9Tr4zKooQCwMBdlSSIRro5y3gZ9kVcGiFSQHvMAOhJWneexkZ4i1Ivo6HKEmC4tHSQM0bzndaQoZWmBTwDjMQWrLmrQQ9yVXzgA6yoyxpikZLAzXvxeRXzTUFHFphUsA7zEBoyZrXAVfyndbUXEnlHuvbFkexaJmseQu7c1B28xqhaLRM1rwzKeBhrMF4gJKkKBotkzXvDOCrfCc2FV8hb8E0QNFomfQJWyX8Od+JTcWfZWeDIYpFy6TN64BP853YVHwqz9cM4SgSLZM2733QN5TvzCZnqE+erxmiWLRM2rw24nciFR5fxsOTJEmxaJm0eUvKQE125dyiQpl81J4BikXL5EfYHirkhB/KdwxiUSRaJm/eMkOzyeeQwYGCniCkECkSLQ08aK8Ujuc7uck4DqWyl9cQRaKlgQtzHi3chB/NdwyiURxaGjDvAzDQl/zquaJvAB7IdxCiURxaGjDvDDucy3d6N3IO7LLVYJDi0NLIs8oehtaCu/lpuBUezncQ4vFwMWhpxLwPUYBXMV9EdpSlQFFoacS80yrhnXwnOJF3oHJavoMQj6LQ0tAjTpdBX4FNd9bfB8vyHYSIFIOWhsw7vxQO5DvF8RyA0vn5DkJEikFLYw+XfgI6C+pypKFOeCLfQYhJEWhpzLzOUjic7yQTOQylzvSLuR0pAi2NmbdkKbQW0M91qBWWygvKUqIItDQ4J8WqUmLzyRUG70PpqnwHISria2nQvNOegCMFc5LafwSekP1kKSK+lkZnA3KWFtBJ6gHZ4k0H4bU0at6SJ6DzQr4zjXGhE56QLd6UEV5Lw/OwOe3wTkGMig+/A3ZZ8aaB6FoaNm/J09BXENeCHu+Dp2XFmwaia2l8Bsz5lbC3ANr5/XuhUg6upYXgWqYwfetG4K18pxsLYWO+gxAdsbVMwbzTNkFvR77z7eiFTbKbLE3E1jKVibMry/J/sOnfC2XyAWVpI7SWKc36vgl4Oa9nqcMvx8OQpInIWqZk3hkvwsAb+Uz4jQF4Ud65lgFE1jIl8/LjSujszF++nZ1Q+eP8fX8xIbCWqZmXZ+2wK2/3TvftAvuz+fr2YkNcLVM0b8lLwLY8PTFocBvwkhyeyBDiapmieZnhhQFvXhr6w94B8MoGb8YQVstUzcv8tTCwPQ8ZD28fgLVyaC2DiKplyT+kuuUP7/iMfq0yZfennG8vrF2T428tcgTVMo14Hy2D3u05zpftvVAmH6yXYcTUMvWalzsrtX767/hhTvM9+AmUNcqTtQwjppZ3/DWNbx/e3ptbK+X8C28fRNQyrWZOSUMp9OaupT+8vRdKG6R3s4CIWqbRbABMS7/oz11LP/Zb/c/yUrKsIKCWaTUbRoIo9eWi13XQOyDbDNlEOC3Tq3njLf1v//uC7M9b3efLRL6SqRFOy3RrXhj+qBXYlO1razt3AWsfld7NJoJpmW7NC3f+8I7PoOurv8tmY2nY/yGwdk2uu9FvMwTTMv2aF7jgA0p/c2/W8u1/eQDwyjHh7COSlhkxL4Nb+4CnVmQp3469gP0leS1OLhBIy8yYl+E3OoGyjdn4wfa/1QtUPiubu7lBHC0zZF740ysAT2X8gaPDx/cCvCjvm8gdomiZMfMyuKsXsD+d2YbphXf6gLJNssmQSwTRMnPmjfeAULkuc8eb/gOdkIO+G8lEhNAyk+Zl6K1OgJWPZ2YEd+j9IwCVG+WAcO4RQcuMmnfkyMDaVenHOHS4FTJ/7JIkS+FrmWHzMqzuG4D0Dzjxg0zpE07ZyZAvCl7LTJt3LGX70/NSjXX4YuxHL62bZwpcy8ybF4YOHx8AYO1Cewqb951rBaB0aQYOWJL0KGgts2HesV8spUuXGusYGTwe31my1i0QCljL7JgXuHAs/gihUqfz+8n96oa+VNVYtlQuk6dphUOhapk188LQJx+PPETIvuhHs2/+qx386s+fjq798EOyvVBYFKaWWTQvMHj2o4HRN2Vz5lkt90w8fgx/HdYvXukdfV/66ANyNK0QKUAts2teYLD3k97xS8pmJHw44aOHyqRzC5dC0zLr5gWGQ5e7b/0MzUrHfTZ5ilboFJSWuTAvAIPXLnczedqVOO6bKWtccSgULXNm3jj9fHsZ4DrTAe77Dtm7Zl+SXfKuZa7NK5FkDHlHo0RYpHklwiLNKxEWaV6JsEjzSoRFmlciLNK8EmGR5pUIizSvRFikeSXCIs0rERZpXomwSPNKhEWaVyIs0rwSYZHmlQiLNK9EWKR5JcIizSsRFmleibBI80qERZpXIizSvBJhkeaVCIs0r0RYpHklwiLNKxEWaV6JsEjzSoRFmlciLNK8EmGR5pUIizSvRFikeSXCIs0rERZpXomwSPNKhOX/A0SFdbcV7QCgAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDIyLTAyLTA5VDAyOjAyOjIwKzAwOjAwrY/FVgAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyMi0wMi0wOVQwMjowMjoyMCswMDowMNzSfeoAAAAASUVORK5CYII="},28453:(e,t,s)=>{s.d(t,{R:()=>o,x:()=>a});var n=s(96540);const i={},r=n.createContext(i);function o(e){const t=n.useContext(r);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:o(e.components),n.createElement(r.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/8247eba8.fdfa29cf.js b/assets/js/8247eba8.fdfa29cf.js deleted file mode 100644 index 122988988476..000000000000 --- a/assets/js/8247eba8.fdfa29cf.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7044],{53935:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>h,frontMatter:()=>r,metadata:()=>a,toc:()=>c});var n=s(74848),i=s(28453);const r={id:"learn-xcm-docs-transfers-teleport",title:"Asset Teleportation",sidebar_label:"Asset Teleportation",description:"Teleportation: Sending Assets Across Chains.",keywords:["xcm","cross-consensus messaging","transfers","teleport"],slug:"../transfers-teleport"},o="Asset teleportation",a={id:"learn/xcm/journey/transfers/learn-xcm-docs-transfers-teleport",title:"Asset Teleportation",description:"Teleportation: Sending Assets Across Chains.",source:"@site/../docs/learn/xcm/journey/transfers/teleports.md",sourceDirName:"learn/xcm/journey/transfers",slug:"/learn/xcm/journey/transfers-teleport",permalink:"/docs/learn/xcm/journey/transfers-teleport",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/xcm/journey/transfers/teleports.md",tags:[],version:"current",lastUpdatedBy:"bader y",lastUpdatedAt:1694099593e3,frontMatter:{id:"learn-xcm-docs-transfers-teleport",title:"Asset Teleportation",sidebar_label:"Asset Teleportation",description:"Teleportation: Sending Assets Across Chains.",keywords:["xcm","cross-consensus messaging","transfers","teleport"],slug:"../transfers-teleport"},sidebar:"docs",previous:{title:"Summary",permalink:"/docs/learn/xcm/journey/transfers-summary"},next:{title:"Reserve-backed Transfers",permalink:"/docs/learn/xcm/journey/transfers-reserve"}},l={},c=[{value:"Process",id:"process",level:2},{value:"1. InitiateTeleport",id:"1-initiateteleport",level:3},{value:"2. ReceiveTeleportedAssets",id:"2-receiveteleportedassets",level:3},{value:"3. DepositAsset",id:"3-depositasset",level:3},{value:"Thoughts",id:"thoughts",level:3},{value:"Example",id:"example",level:2},{value:"InitiateTeleport",id:"initiateteleport",level:3},{value:"ReceiveTeleportedAsset",id:"receiveteleportedasset",level:3},{value:"ClearOrigin",id:"clearorigin",level:3},{value:"Another example",id:"another-example",level:2},{value:"Next steps",id:"next-steps",level:2}];function d(e){const t={a:"a",code:"code",em:"em",h1:"h1",h2:"h2",h3:"h3",header:"header",img:"img",li:"li",ol:"ol",p:"p",pre:"pre",...(0,i.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.header,{children:(0,n.jsx)(t.h1,{id:"asset-teleportation",children:"Asset teleportation"})}),"\n",(0,n.jsx)(t.p,{children:"Asset teleportation is the simpler method of the two for sending assets from one chain to another.\nIt has only two actors, the source and the destination."}),"\n",(0,n.jsx)(t.h2,{id:"process",children:"Process"}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"Asset Teleportation diagram",src:s(73248).A+"",width:"700",height:"311"})}),"\n",(0,n.jsx)(t.p,{children:"The way in which we transfer assets between the source and the destination are briefly summarized in\nthe numbered labels on the diagram, and are explained in more detail below:"}),"\n",(0,n.jsx)(t.h3,{id:"1-initiateteleport",children:"1. InitiateTeleport"}),"\n",(0,n.jsxs)(t.p,{children:["The source gathers the assets to be teleported from the sending account and ",(0,n.jsx)(t.em,{children:"takes them out of the\ncirculating supply"}),", taking note of the total amount of assets that were taken out."]}),"\n",(0,n.jsx)(t.h3,{id:"2-receiveteleportedassets",children:"2. ReceiveTeleportedAssets"}),"\n",(0,n.jsxs)(t.p,{children:["The source then creates an XCM instruction called ",(0,n.jsx)(t.code,{children:"ReceiveTeleportedAssets"})," and puts the amount of\nassets taken out of circulation and the receiving account as parameters to this instruction. It then\nsends this instruction over to the destination, where it gets processed and new assets are ",(0,n.jsx)(t.em,{children:"put back\ninto the circulating supply"})," accordingly."]}),"\n",(0,n.jsx)(t.h3,{id:"3-depositasset",children:"3. DepositAsset"}),"\n",(0,n.jsx)(t.p,{children:"The destination then deposits the assets to the receiving account of the asset."}),"\n",(0,n.jsx)(t.h3,{id:"thoughts",children:"Thoughts"}),"\n",(0,n.jsx)(t.p,{children:'The phrases "taken out of circulating supply" and "put back into circulating supply" are highlighted\nabove to give an indication of how much flexibility an XCM executor has in implementing the\nsemantics of taking an asset out of and putting it back into its circulating supply. The\nstraightforward answer is to burn the assets to take them out of circulation, but there are multiple\nmethods of achieving the same goal, such as transferring the assets locally to an inaccessible\naccount. Likewise for putting assets back to circulation, the receiving consensus system can freely\nchoose to implement such semantics by releasing assets from a pre-filled and inaccessible treasury\nof the assets transferred, or perform a mint of the assets.'}),"\n",(0,n.jsx)(t.p,{children:"The above also gives a hint on the disadvantages of this model, it requires both the source and\ndestination to have a high level of mutual trust. The destination must trust that the source has\nappropriately removed the assets that were sent over from the circulating supply, and the source\nmust also trust the destination to put the assets back into circulation. An asset teleportation\nshould result in the same circulating supply of the asset. Failing to uphold either of these two\nconditions will result in a change in the asset's total issuance (in the case of fungible tokens) or\na complete loss/duplication of an NFT."}),"\n",(0,n.jsx)(t.h2,{id:"example",children:"Example"}),"\n",(0,n.jsx)(t.p,{children:"The following is an example XCM program that achieves the process described above."}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-rust",children:"let message = Xcm(vec![\n WithdrawAsset((Here, teleport_amount).into()),\n InitiateTeleport {\n assets: All.into(),\n dest: Parachain(1).into(),\n xcm: Xcm(vec![DepositAsset {\n assets: All.into(),\n beneficiary: Junction::AccountId32 {\n network: None,\n id: ALICE.into(),\n }\n }]),\n },\n]);\n"})}),"\n",(0,n.jsx)(t.p,{children:"Let's discuss how the new instructions work."}),"\n",(0,n.jsx)(t.h3,{id:"initiateteleport",children:"InitiateTeleport"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-rust",children:"InitiateTeleport { assets: MultiAssetFilter, dest: MultiLocation, xcm: Xcm<()> }\n"})}),"\n",(0,n.jsxs)(t.p,{children:["This instruction is intended to be executed from the source system. It takes the assets to be\nteleported (that match the ",(0,n.jsx)(t.code,{children:"MultiAssetFilter"}),") from the holding register, which needs to have been\npopulated, usually with a ",(0,n.jsx)(t.code,{children:"WithdrawAsset"})," instruction. It then sends an XCM to the destination\nsystem given by ",(0,n.jsx)(t.code,{children:"dest"})," with the following instructions:"]}),"\n",(0,n.jsxs)(t.ol,{children:["\n",(0,n.jsx)(t.li,{children:"ReceiveTeleportedAsset"}),"\n",(0,n.jsx)(t.li,{children:"ClearOrigin"}),"\n",(0,n.jsxs)(t.li,{children:["All the instructions from the ",(0,n.jsx)(t.code,{children:"xcm"})," operand, in this case ",(0,n.jsx)(t.code,{children:"DepositAsset"})]}),"\n"]}),"\n",(0,n.jsx)(t.p,{children:"As we see in the example, instructions 1. and 2. are always added by the executor, no need to\nspecify them."}),"\n",(0,n.jsx)(t.h3,{id:"receiveteleportedasset",children:"ReceiveTeleportedAsset"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-rust",children:"ReceiveTeleportedAssets(MultiAssets)\n"})}),"\n",(0,n.jsxs)(t.p,{children:["This instruction is a ",(0,n.jsx)(t.em,{children:"trusted indication"}),". It should only be executed if the origin of the XCM is\ntrusted for this purpose. This level of care must be taken because this instruction will ",(0,n.jsx)(t.em,{children:"put assets\ninto the circulating supply"}),", usually minting them. As specified earlier, this can result in an\nincrease/decrease in circulating supply of an asset, or a duplication/loss of an NFT, if the source\nis not trusted for this purpose."]}),"\n",(0,n.jsxs)(t.p,{children:["You can set which origins are allowed to act as teleporters by configuring the\n",(0,n.jsx)(t.a,{href:"/docs/learn/xcm/config-deep-dive#isteleporter",children:"IsTeleporter"})," type in the XCM executor. If the origin\nis not allowed to teleport assets to this system, an ",(0,n.jsx)(t.code,{children:"UntrustedTeleportLocation"})," error is returned."]}),"\n",(0,n.jsxs)(t.p,{children:["This instruction will populate the holding register with the teleported assets, which can be used by\nfurther instructions. In our example, the ",(0,n.jsx)(t.code,{children:"DepositAsset"})," instruction will deposit these assets to\nthe receiving account."]}),"\n",(0,n.jsx)(t.h3,{id:"clearorigin",children:"ClearOrigin"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-rust",children:"ClearOrigin\n"})}),"\n",(0,n.jsxs)(t.p,{children:["This instruction clears the origin register of the XCVM. It's mainly used to not allow further\ninstructions to act on behalf of the previous origin. The ",(0,n.jsx)(t.code,{children:"InitiateTeleport"})," instruction sends a XCM\nto the destination system with freshly minted assets and immediately clears the origin."]}),"\n",(0,n.jsx)(t.h2,{id:"another-example",children:"Another example"}),"\n",(0,n.jsx)(t.p,{children:"Let's say we want to teleport an NFT (Non-Fungible Token) this time, instead of a fungible token, to\nanother system. We could do so with the following program:"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-rust",children:"let message = Xcm(vec![\n WithdrawAsset((GeneralIndex(1), 42u32).into()),\n InitiateTeleport {\n assets: All.into(),\n dest: Parachain(1).into(),\n xcm: Xcm(vec![DepositAsset {\n assets: All.into(),\n beneficiary: Junction::AccountId32 {\n id: ALICE.into(),\n network: None,\n }.into()\n }]),\n },\n]);\n"})}),"\n",(0,n.jsxs)(t.p,{children:["Very little changes, in fact, only the ",(0,n.jsx)(t.code,{children:"MultiAsset"})," we're referencing changes, like we would expect.\nAll the teleportation logic stays the same. The example assumes an NFT with index 42 inside a\ncollection with index 1."]}),"\n",(0,n.jsx)(t.h2,{id:"next-steps",children:"Next steps"}),"\n",(0,n.jsxs)(t.p,{children:["We'll look at reserve-backed transfers ",(0,n.jsx)(t.a,{href:"/docs/learn/xcm/journey/transfers-reserve",children:"next"}),"."]})]})}function h(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(d,{...e})}):d(e)}},73248:(e,t,s)=>{s.d(t,{A:()=>n});const n="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAArwAAAE3CAAAAABtTs0ZAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QA/4ePzL8AAAAJcEhZcwAAGJsAABibAUl1g5QAAAAHdElNRQfmAgkCAhQgaSxEAAAlRElEQVR42u2dfXBT573nP4mVoWoJWNGGYUW05ZZzSadmXPVilPgODglvEkvjIZSMlQxpArXjIXQyTmNvOoO6vb2Rdy4DCZ5MCaOEhuSSCWJCHMZZFgvzEgJ3DSem1/XiZsMesmQM2gyeExlfJoq38nb/kGzLxgYdvT/i+fxhS0fnPPr9zver5zznec45zx1/RSIRkzvzHYBEkirSvBJhkeaVCIs0r0RYpHklwiLNKxEWaV6JsEjzSoRFmlciLNK8EmGR5pUIizSvRFikeSXCIs0rERZpXomwSPNKhEWaVyIs0rwSYZHmlQiLNK9EWKR5JcIizSsRFmleibBI80qERZpXIizSvBJhkeaVCIs0r0RYpHklwiLNKxEWaV6JsEjzSoRFmlciLNK8EmGR5pUIizSvRFikeSXCIs0rERZpXomwSPNKhMWUxbIjJym3xV6GelhiNrSx8S0ktxtpmVfbQ3lNwvst49+GvfhsRK9azPR4aUu0Yjgyy5S43Qhj20/c4mZEr5otedh3kjyThnmjLQEg0a3B8W8tPsrhg20+N+U+xtlrk9ZmG7fdCDWkwPlaV3MO95mkQEjDvL8NWvWpPouYAbMb4EMA24hVwxaAsDZuxTagGqcXzCOLJhQ18WV43E/haF53oSRfpHPC5jk0ycJQRUV7dH/Vc92xl6EKDW9FqL2iIgTalooVnv1RtqyA6goI73dVvRkGm81mA4vNZrNETz9X5ekeLS3S7qnaEgK2VLhoXxP7JLLfs6LCE4p9wXbXvooAwYr2fO9JSc5Jo+b1TtoktcD5tzVU9dQNH0c8YNW2zXTH32sewO9vSmwqrNaxarVKIL5FFRAMehoB3RPW9VpPI921YNW16g4L8LaG5HYljZrXPNXSwDNn6uEcALY28HXFGg07wRd08TbNPmjr4gTW3WessXZFHE2n/lATWij29hxW3xkngShAxaE2hQ44itIW3A1HMIPmaVnTBa4uN5LbjWz08ypu03o4fMPyxq6u5aG5o87kAPO+OlqBFhlb5QTYjwI9sbfvYeHoD+ASwC9MtsfQw9EAFTYcTj7EAmxeLDvUbley0c+7bKpaeUsw8V1IR1UBPneMLjsGXoBTboCIiuYFOKcAFpgJXwILgJ+oWtgCTmnd25dsmNc+xfLTQTzLjwZG3lrAWQ0wa2yVe8A39s5s1ZVnAGYDRE0As76JfXYNIhaQ/bu3MRkxb4hxgwR9Ez6+FvsXeRlnI2+MLjY7VYub6L8lbvqkyhLzWEfYOr/mHu0Xu6RwHmaZrPopN3SBDUlBketR0TTM2w5wsZ1yWzXjBgkuJa5lgQ+rZgHcpaOe/kyF9xpmw3tP2paowbmPeDU6xuxbBr4NBwPEeyAW+dm+5lWVgAJs3vp5AKeJdf7g3Ef2aHhGt7LqwQ1zZPshVcJHTl5c8eDCxB24vwewLCifZcgfsVHRSDi2VXg7bE6igoletaSoXTpdZQCaF99NAzS3NGjVbQAmT4AGJfCqGljgdgUDga7qk6rfDy0JVa+l3h8MgjPee7bAFQwEoF4BWFcL1mdh3THN7wfn5tGtdnrw+GR3Q4pEVgCBQH1dwrKe+NmJs9lIuyw2jvqiGhs9PRCEuXW33uqDbalql4Z5XfH/s3FRHl9SHv+Di3LMLmbDYh9YZrsws/nBw1Vums9Sjrd8JphfDx+4VF5lG9sW6jacOTx30QKY7cKMqdnb1lO+cC4AdavfW7DcBJZA+EjPqoXmsY0UH/EIJMbZCc6f+PGvH1//+bj2oaZ69tgAoglGGR3njP5l9FWs7WezARE1vvAAVt2/Ib5d+O6RAsYGR+MFfUiq3PHXfO+75NgSpCvfMRQn0ZawpcG0PUDL4rGF8d39ph9XM4QOHWDdejNU4FuyM+DabAO0E37wbDaD9qqKdcUvLLR7adsZBOgCzUNLA7sdQOTdAzrOajeE/9Ch43zWAdHz7weVZ5ab2r0AbSmdv8jreW93TI3NjSa+gIU3flbnJAj7q/06/qpugLerOghWa7Dd48dKYANENqsoemBLdPy2B7EudvI+wLt+3WpVvd2wPaArqLUheL42SNi7OpxO6NK8EsKeChXfZGdNP4EwJ1HaAvHLn7SW4G44RzSA69ShJrQw7+rsDrS4LFcBRkZPiQZYx5MEIxDx4zp00OP6nHAQV6DD4+ohouI69Rv0XnfCEKxRRDFvY1tbvkMoXiIaeB6Y7BM7RCIq83rOOukAUBbjgJOchw1m00o4wmp46fQPmpvHG/A8PMJCOAdmJ8GWK5uba7jbSXC/3tDs5nOYe/K6lTPpxJ3NOykyiUWORmQPi48dgcCpSare88A5CAYBPWyBZYArqHIU5sT6QWtsPq/egPLM+C6DN2APwHuL4bXVeiCA5xcWU7NH3wb1681HwQ/Q0ZhG3KKYV5I9orhRPLTdeCNAtANs34CrCuA7xAacwliZCd+aicI94J5+pkPXvOWJVW9Ejd9joIYtmAJHTqoEaMSy59SHGn7q7FBvTya4m5EJ8w79kcoc7ONO/m5aDr7mdiNUjTVgscIg4cj4UcvIizoe5kK5m0jsepWORlBZwSN+vrRwFSwQXri48XQDhxL7dE/GzNnn50gN0UhNTXS1HthsjlBTE6niQN1CeEQZ6UC7lmLomTDv4K6cmHcXr9ybg6+53bBZdd2z8UNYzfbE/sh2zgeAzZg8gbdmTn9Ztx4ygb7l8TdgAYpVf+k30/8JNvCcSv26K7Aotl1s9PRt2GACjmkf1nTXoviw6Ip5/zacv7quaBUoVt3768+34WqODcGm5MNM9PP2v8g/52Av/1yaNyuEPTqA8/WEzvQtiSNsoV9pAG02KvB0aeDymmnfoQPWjTUJ27d7abOxJQgdK/A0AuzfRkB500+8gHi5p8ycflkHrIdMtHtT7eeVbd7bHkvg7PmwZY2SOEpZDjDXHmvG2gKh98KryiwACxpPn3nSBrjd3UdZvsAEloMnz3ctW3R/fFQUb/lMvnTxJAAre7jOhkWfn7RUldvgd49/+q+WqgfMsPjQ+fcty+83gfvazBQvDpQ1ryR5KiioS0hE6eeVSG5AmldihFP5DiAR2eaVJE8bBXXVtDSvJHkK7N4V2WyQCIuseSXj6Nes87P+JRd0JRMdR7LmlYxD23Us+19ybFdGHnQkzSsRFmleibBI80qERZpXIizSvBJhkeaVCIs0r0RYpHklwiLNKxEWaV6JsEjzSoRFmlciLNK8EmGR5pUIizSvRFikeSXCIs0rERZpXomwSPNKhEWaVyIs0rwSYZHmlQiLNK9EWKR5JcIizSsRFmleibBI80qERZpXIizSvBJhkeaVCIs0r0RYpHklwiLNKxEWaV6JsEjzSoRFTqgiySkdGjD4t2e6gZ/a0ysr1+bt59vLANeZDnDfd0hmWpgtfQC8CPD7GTkOWTIFqWnZOfZyY5oB5My8g9cudycGnkAljvtm3tSSD+8dfWmX3s076Wj5wJiUZdPSjCMX5h0OXe7uvMnnnXQClY77bCW3znhRDgKWTEnaWs6w9428THsC+aybd7D3k97xS8pmJHyYkHYnlD1UNumvNiHjhdkOWDIlGdFy7Cj6w3Tjya55B89+NDCW6Jx5Vss9E3+Qw1+H9YtX4on39lL66AOT5DyacWmabXxJqmRKy9GjaNqthmyad+iTj0fqS/uiH82eoiFUcu+9VMLgV3/+tA9gYO9e+8MPTcxrNOOl2YtXMjUZ1HL0KJp2qyF75r1wLN40KnU6v3/r39iMGfPXDH2pqgNA3969lcvGT4A7mrFsNeSBzGo5chRNu9WQJfMOq/sGYtkuXZp878C0+fPXDx4/PgB0dpY+4Uw8KsUzlq2GnJNxLeNHUXvarYasmHfo8PFYumsXGvbajDVr+s61AgO79i1dNZZfPGPZasgxWdAyfhR9OP3gMm/ekV+q/el5JSkVYLc/evGdPhhoPT72i51ROgCy1ZBjsqPloj6AB9IPL9PmHUm3cl0yoy1TUDK/uf9AJwzs2jea8tJWZKsht2RLy4WtZGawKcPmvfBOH8DaVek2aO7dtPFwKwzs+q9Pzx/L2JnZaCU3I2ta2ksHMtJqyKx5h97qBFj5ePptcZi2ZtX7R6DPV7lx2kjG0rw5I5taLm3NSKsho5dEdtZ1ApWvrM9EvsC09a9UjhbLUmBeBqOV3IysarkwQ5eoZK7mHdzVC9ifnp92SWPcu2nZO32w65NNM1jYysrUzhokRsmylvbSgYczUWTGat4//bIXeOofM5kvMP8fnwJ6f/kn7KWy1ZAjsq7l0oy0GjJV8w6/0QmUbUzjtHQKSlY43uqFVyqfXdoqWw3Z5y/8311Z1/I/Hs/Iha0l/5B+Gd/879JjvcBTP/9exvMFvrd4eg9c/uMysyMbxUvGEeqKfk62tdSW3J+J0jLSbPg/X/RB6SsrspEuwIpXSqHvv8zNVvmSMb6hPwdavn8hE2VlouY9/D+Ayi3Ts5UvfG/l1ctw7o70r+WQ3JyDAXKi5SeZ0DJ98w63HQQ2PZbV+5DvXDS7Cz6742/l3c7ZZLitFYG0vOOv6ea7vRdKm7I/btu3bQDKGmVvWfYQTct0zRvL15eLuyIHvRnJWDIVwmmZpnmHWnpzZ6jh7b1Q1pChMR/JBMTTMj3zDjUN5LIyjFUN26R7s4GAWqbVaB5uyWm+lDSWwUDLcK6+73ZCRC3T6W0Y3t4La2tz2AFw5+I7PqNfq5R9DplGSC3T2DTWbFmTu3QB1pRB73ZZ92YYMbVMo+Zt+wTKGnNdCVZq/fSXyNGKzCKmlqmb92BrXjqu7qzU+vlMjrVlFEG1TPnHdqEVSvPR6VrSWAqtGRkbl8QQVctUu8oGf5mr/uxJvts7IJ90mkGE1TLFmnd4K9CUJ//MaAK2ypO2DCGulima940+2JS3+9Dtm6DvjcyVF9VOh8cvCcUI33rb9oqK0GTLw6FRbrlu0oQqKtpH4otkKntxtUztToo/dUJlZb7yhcruTjr//scZKm17AFB8SsKi6vh/5ZeLUy00OPqyK5Xto78tr5nyw0g1OF9Ps5A4AmuZUs07+AqUPpu/fOHZUnhlMDNldQfAivbqZJ9pDdottnZ3ddkmW17ucrms4HK5XClFdT7YM/WH5wA1iar3poXEEFnLlLrKWvqhOYvXK9+aOyuOwJep1orjafia3bX/LXLlp3ePLXsDup59duPc45j+Hgi3XZ4b+5mH/uX6/zPfCaB9UDIbCP2LNqe3W5tzV+zlXUR7Pvr3d8OCZcuW/c+L7F+2bBmEAiWzAe04T9wNaB/MvCe2qUK7Fi+5+93Br2x3Qrv2XdPZr7vfu3LH9O/eDeF3+2MrRI989R/+bR9LFeA/fe26yDwFINrz0R9LppmBSO9HfyyZeRdA5Ni5eXdB+0ghAHTOnOxCApG1TKW3oXMXPJW1+0SSpGMvbMrI0S6E2cKbfgIJ7YaK2ME++iB0EfKpYN34MxMRXxBwNcPp32uxRkW7l7artfjc8JzKqbv2HNDBtdkGsCVIF/F1rS+4affSZmP/Wzoov3bQ7mX3P2lYtzqI7jmgA8oeMxU4L+quIIDPrXk1sL6w3ET7Dh3lGS8+N4RXsPtoQAkA0dU6QEAhUhXbLxbC24NA/XpzRayQeE4/p3TpDU/LE1rLFJoNQ7ugLN/5sqIMdg1loiSbzULYD3Nv+CT6PHjAp+Ly6NuOwpog9U6Cp4k2aNQ7tYbY+dcCaIOIisd8ya9bmwhuSCzmZY16l+6Nn6tFtun4rFptFKB2WT16LZz360qLC60NQNUp9ykovnK8Gi6P7j1PxKvjm+eNFXEEFixHCwNHdepbrGyOsBOafLApyoEgzib87+IDxVc+FshA65bnD/Ylhia2limcsL1F+pMQZYCNL8JbmzJTVnQLNE3YFVvgogbLiaq0LI52aafcYR2fO9oSPrP4EnRYwivosQGYPAE1Yj4HyzmB8zXTTK8etowWpOm02cLB+Lqcg1NmxcMlBWiqwe4lZDuKNcBigh/WALQshlPaPDdhjd2OaIf+qeNzCCjuuf64Ah7TAjhQB22wyHEwjJkOrCstS8JmEweor+OkeqzO7WXehOePD7S2Jta/Ymtp3LwXOuGpzN/Tb5h7n9pL57KMPBcj7NGpn3haHoRYH8R5aADo4iyUY2oETsAKgPMxbywP8LnjDFYHB1AfBOgda8OdiHdenIqt+x5UAZxTgCqYDV/MClABlAe1sIWEB7n2Qi3AsbpPwQox02k69hBO9UAdNHv0WqViuQP2VOsrlGWrLYR0/H5Ai5gnzXagtZWVznklCK+lYfMOvwP2gnjG89KP+9jz07vSHaxQ7g17dOrrJi73cW0b9yjwVXyBHj4/+uGl+P+ORgAcVv3oggDriOjxDz5bfMO6wWYALsbf9tQAFpgF169COTATzrrBOWq6z+L/tcgluBtmA3ACtm0DdE3BsrUWTQu4mrHtrkXT/J7GL0a2/twBMPTHSZI+coSVznkUlJbv/KPRAWrD5lX74OmCuI+s5GkfVw7c87/SLGaTaVLv4oaeoNruRoHdDgCWB/gGwhFmVQU5lVivrfMHlsM6zE71hv7XVUE6LImrJnT8XlH4AhSbVe+pgb6Yh8dWXjR6GlkV5Kot9juK+kc+PtgIjq5Qzw49uNmGoyt06i09sHlhwkkaMLhr8ryPHGFNQWnZpxo9ZzNq3uF9UJnhZ1ilyvzKTob+5t+lWYr1DzrO1SGwmPf30Jz4kbdL9y4xK1b96AL2YHcvgIMNeHTroQfgpDv8B/v9jtiaq/28hGKBJaoatmgHF5SPdf4uhLPuyE77nFhlvMhPtyO0s2q2A9jzOw7DXNb5g5ttkWOJxqUraloAJ5Tonhkz3Qocqou8DXA+bs7n1EDDX06eqlrunl3LVfORnqrlNWzjW4tTbVvO0T77EjN0RaeNWGLC3H8rnXMbC0vLfU6DPySj5lUHYF2+Mx1hXSfX56XdXdYBajXgc/cEx5vX/IIXXzPr/IGusE4Tpnp/oAudrSaLonnbVAjE17Qpms4vgZXbWOFUsR5KKEXRvG+HdXbH3i6AWqdKVwCgazU6iolH/FQ7VfCNVudVQf35JTWuoP9YWKeFueA/FtYBjsISgCdVzjtOBYM7KoIojuhJNfj2vCAuC0tUdbVFw+PG59WfXzJyIpRo3pXOeSV0FpiWA0arXoNdZUP7YGUBtPBj3LsS9qXbXTbaTJ0Et0LwNBt2OzXdWl8DG1oUTVOaHLDHp6goLaNdw48RO8+ytNWj4gwkVgp7fIqmKz5H7J3pVJNVRdlqATi4Trf63gUlUG9V8QTGDvduJ2oPv2tRNN3atBhThwuNFiASiDeKF8Ib/M6DHsTpw/SKEy2IsxFqdrt0DU/DSCETKF3b/M/r55cUgZYGBykOtsKbhXP37lAdrF2TXhnRq/EXFnM4QvxoHyL2KhLGbAHCo8fzsVchizm2xiwTRK/GVgSiV2fFrZtQntkytu7Ipu1eugh/xzx+s1C8oJG+gtEvDGOJXsVy11Us5sTiQ9/Mia8a+mZu/Jsj4dgXJ3Y4/BxIHKcQX0tj5h1+YSBts2SUg62U7iiIU44UaPemds1OikwYYSsCLY01G9QBWJXvJBNZBQNqvoNIg/SukDTGU79/bU3C6HARaGnMvPugsnAONMC0StiX7yBSZbbLZU6/lKRZMf568yLQ0lBvw4WBAjo9jbGuk4ELBdLdYxSHI49fXgxaGqp5j4G9YE5PY9xrh2P5DkJEikFLI+Yd6oSn853hRJ6GzoxcXHZ7URRaGjHvJxTgTGjz4oFJDFEUWhox78ewtuC6pUrWwsf5DkI8Pi4GLQ2Yd7CvIGddXwh9Gbqb7fahOLQ0YN6zhTnrur0UzuY7CNEoDi0NmPej2Py/BcdS+CjfMYhGcWiZvHkHBwo34QHZbjBEkWiZvHl7obQgnw82oxR68x2EWBSJlsmb9xMKdeJqp+wsM0iRaJm0eYd7CznhXvnYPQMUi5ZJmzcEfD/fqU3O98nt5VnCUyxaJm3ey2AvqIuQxphmh8v5DkIkikXLpM3bDYvyndlULILufMcgEt1FomXS5u2EH+U7san40Q23xkpuRrFomax5Bxl55EUBMjseoCQpikbLZM17DSjInkHigV3LdxDiUDRaJmvey1CW77ympkyesRmgaLRM1rzdMCffaU3NHHnGZoDuDGkZau++9Xe1G+3ENKClgXvYjF27HD1/NOCCDYqhrVKk4C6rLnSm2mH7ewCqlLnJ+KLH63Lcap33gz5bEkUlEdokJGveTrAaCUHbrEOXTtDlzcEdslbozNCjem8DbqJlTxAgCE7vTT233V4D5b6bnfZFfI874PGqcoxhQEsDNa8l+VXhVd3pnWWKfP5SsCtoZLvUMBSa5GY7rH41XD3aoVbHn4w5KdGAqwZsN/X3lWAV4MAoBrRMss3bD9xjIIKQitdmwuzYih6bTyfUHZ85LBz7Hw2FIBoKQyQ+rU04Gt84rGkGJxm7Jx6iJAlurqXdZrM5Gg85qd0fWxDqDo0IE4lPKhc+QzgUIhIKx+UMdY9uH+6OaRc6QV8oPKI2YU0Lx8uIQFiLThmAAS0N1LxGbnn6AmusteCIPZq2+yUdUHZZYHvQ5wauVtPF1WrXhs26z030t0FwNluA0IbRVbMSmoRb7zDTa8+r235mgtMNAK7fmSDyrh+wrqtjexC1mq6TXlczB/y+6S/rsflmYHuHDspjNVANfr+rOaa2tlkHrHtscNLrm/2SjnXdBlNqoSWQZM37rcGd86BV98R+XDHv1urUu9BW3FCjdnl1ZhNeH6TJpa7ohlC17vT5rJrH6Fmq0RBvW5LaUSYvnIH2Bjy+JoLrgXf91iZfPf7TPO5C8fliK9ppa6DJqW87A7QHqPc5tW0a+BRcvsdj62genfp69OoQwI5ampy6/4N0Q0zavEa7Bk1b0dfvHzk4RF/Cc6quuU3h3Ykr6nR0OdiieU7VNPuojbIT52tu9yGXfsjI98mO3uRJTksbXCe6g/pGd02HonUTPcCeGnfdTg7jqGKee/RprGrToZrXmzgMkR1srXO/3sRBcM+jyu2IreHFdaqursPJTgC9/lDN6z5OTvXNyWuZ/MXoxsZkHB60bZ4HnzsdAa7qPGkG2zP4b1jxGQtEVZ40w3Kf7y+RIF4TmDZMsmrGgrvtSWZ3OenjjE4dYHmM9wEOAUpX88Q1q01wP0EwB9ocwMLRZ27HCGlsMIPlydgkNawzQfnUM3gmr2Vqcw8nQWOjduKYpqoEFL6IP+12sj7fJcDV2OcmN4Sgpwe4BmHZh5BfZnAdpR2gj4uYXvD6ry2//8aOT6cZmAWA5e7QF9fpu7GoOQA/iGmqWGLrh9PuQ82aeUFR6iJXNuveANfj1+1bITSxe8UM9Ixd138V4jPlEZHmzScqcziPFldDg+XnA4EAzmcXTPDMT8Zenn55ssfMj5y9z4ppOg8y5LssmhcwKzs9WrcDvgYgMkUv3vTR+Z2YDvEzAdl5m1dC8ANmojwzusTUuPncmYCq+ibMS3hp9JXWgHXnd826Z/wK04lZ+i+ZjjFJ8143mvoXD8ZKVpzq+w4FLWoCvohVtNcAEqdK+AF6NB7Id6Hc4HhiiiHetiS1o6I+rDbsaIlONS9e3PC8+rZ7qo1OwE4FjkxYPCveBLySdIWUpJYpzD2cBJENDb+NvQqrrMIKVwGuYIXymG/bxmd3FYhUVIRnxW0d7Y4a+0pJRtmjshVmx28oC2sQPh0CTM1oU3ZiXqJeAU7COPEs8CWANtL5nymSNK/BOe3NWwm+GQJCW+BBLC5+1U20/S22QhVBjcibiQ9wN9Wz4TTRnbgspnp2tEfht7XPG8zEYIi3L7feUdqbHj9OBzgUfN0Q8Xj2ozdsCANnUWzMJjhZX0EVx6KEtqhwCebydnyxuZ6XThNt38ELGQsRyFqb11Hv9/txqmD9jQkau7RaRQOnA2xW3aNo1Cd2ha0/pjUoGmyG9f+qendUBFFey05kkpvjjZ+hxVq2vs2qqqBRX4PStG2FMu+ixq/BoWhVk0wGswRt9TyV3Z/6PU016/1ahSvWrbb+mNaghHWcyzMba7ZO2OoeOfehpmJ9YbkJsBzc2aXhqnIDHDz5tuZaVXYJMLtia5vfbenSlMdWWsD82gcn1aCrakl2TyUlkxK/BGyufUnsAK8c3NmlWT0PPgjUzDzfEbTWL3IAr+4EZrvK43/iSpoDJw5c9KxR7r8EmFsOU045s+Py4lzyM9Po+rhIvwmR5FRWnbuoLORrDnd1sintqTBvE9LRMpKD61uT19LAg/ayH3bqFHRwhUfKuysXsxdl/EF79xX4s+x64b58xyAKxaNlkub9Tr4zKooQCwMBdlSSIRro5y3gZ9kVcGiFSQHvMAOhJWneexkZ4i1Ivo6HKEmC4tHSQM0bzndaQoZWmBTwDjMQWrLmrQQ9yVXzgA6yoyxpikZLAzXvxeRXzTUFHFphUsA7zEBoyZrXAVfyndbUXEnlHuvbFkexaJmseQu7c1B28xqhaLRM1rwzKeBhrMF4gJKkKBotkzXvDOCrfCc2FV8hb8E0QNFomfQJWyX8Od+JTcWfZWeDIYpFy6TN64BP853YVHwqz9cM4SgSLZM2733QN5TvzCZnqE+erxmiWLRM2rw24nciFR5fxsOTJEmxaJm0eUvKQE125dyiQpl81J4BikXL5EfYHirkhB/KdwxiUSRaJm/eMkOzyeeQwYGCniCkECkSLQ08aK8Ujuc7uck4DqWyl9cQRaKlgQtzHi3chB/NdwyiURxaGjDvAzDQl/zquaJvAB7IdxCiURxaGjDvDDucy3d6N3IO7LLVYJDi0NLIs8oehtaCu/lpuBUezncQ4vFwMWhpxLwPUYBXMV9EdpSlQFFoacS80yrhnXwnOJF3oHJavoMQj6LQ0tAjTpdBX4FNd9bfB8vyHYSIFIOWhsw7vxQO5DvF8RyA0vn5DkJEikFLYw+XfgI6C+pypKFOeCLfQYhJEWhpzLzOUjic7yQTOQylzvSLuR0pAi2NmbdkKbQW0M91qBWWygvKUqIItDQ4J8WqUmLzyRUG70PpqnwHISria2nQvNOegCMFc5LafwSekP1kKSK+lkZnA3KWFtBJ6gHZ4k0H4bU0at6SJ6DzQr4zjXGhE56QLd6UEV5Lw/OwOe3wTkGMig+/A3ZZ8aaB6FoaNm/J09BXENeCHu+Dp2XFmwaia2l8Bsz5lbC3ANr5/XuhUg6upYXgWqYwfetG4K18pxsLYWO+gxAdsbVMwbzTNkFvR77z7eiFTbKbLE3E1jKVibMry/J/sOnfC2XyAWVpI7SWKc36vgl4Oa9nqcMvx8OQpInIWqZk3hkvwsAb+Uz4jQF4Ud65lgFE1jIl8/LjSujszF++nZ1Q+eP8fX8xIbCWqZmXZ+2wK2/3TvftAvuz+fr2YkNcLVM0b8lLwLY8PTFocBvwkhyeyBDiapmieZnhhQFvXhr6w94B8MoGb8YQVstUzcv8tTCwPQ8ZD28fgLVyaC2DiKplyT+kuuUP7/iMfq0yZfennG8vrF2T428tcgTVMo14Hy2D3u05zpftvVAmH6yXYcTUMvWalzsrtX767/hhTvM9+AmUNcqTtQwjppZ3/DWNbx/e3ptbK+X8C28fRNQyrWZOSUMp9OaupT+8vRdKG6R3s4CIWqbRbABMS7/oz11LP/Zb/c/yUrKsIKCWaTUbRoIo9eWi13XQOyDbDNlEOC3Tq3njLf1v//uC7M9b3efLRL6SqRFOy3RrXhj+qBXYlO1razt3AWsfld7NJoJpmW7NC3f+8I7PoOurv8tmY2nY/yGwdk2uu9FvMwTTMv2aF7jgA0p/c2/W8u1/eQDwyjHh7COSlhkxL4Nb+4CnVmQp3469gP0leS1OLhBIy8yYl+E3OoGyjdn4wfa/1QtUPiubu7lBHC0zZF740ysAT2X8gaPDx/cCvCjvm8gdomiZMfMyuKsXsD+d2YbphXf6gLJNssmQSwTRMnPmjfeAULkuc8eb/gOdkIO+G8lEhNAyk+Zl6K1OgJWPZ2YEd+j9IwCVG+WAcO4RQcuMmnfkyMDaVenHOHS4FTJ/7JIkS+FrmWHzMqzuG4D0Dzjxg0zpE07ZyZAvCl7LTJt3LGX70/NSjXX4YuxHL62bZwpcy8ybF4YOHx8AYO1Cewqb951rBaB0aQYOWJL0KGgts2HesV8spUuXGusYGTwe31my1i0QCljL7JgXuHAs/gihUqfz+8n96oa+VNVYtlQuk6dphUOhapk188LQJx+PPETIvuhHs2/+qx386s+fjq798EOyvVBYFKaWWTQvMHj2o4HRN2Vz5lkt90w8fgx/HdYvXukdfV/66ANyNK0QKUAts2teYLD3k97xS8pmJHw44aOHyqRzC5dC0zLr5gWGQ5e7b/0MzUrHfTZ5ilboFJSWuTAvAIPXLnczedqVOO6bKWtccSgULXNm3jj9fHsZ4DrTAe77Dtm7Zl+SXfKuZa7NK5FkDHlHo0RYpHklwiLNKxEWaV6JsEjzSoRFmlciLNK8EmGR5pUIizSvRFikeSXCIs0rERZpXomwSPNKhEWaVyIs0rwSYZHmlQiLNK9EWKR5JcIizSsRFmleibBI80qERZpXIizSvBJhkeaVCIs0r0RYpHklwiLNKxEWaV6JsEjzSoRFmlciLNK8EmGR5pUIizSvRFikeSXCIs0rERZpXomwSPNKhOX/A0SFdbcV7QCgAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDIyLTAyLTA5VDAyOjAyOjIwKzAwOjAwrY/FVgAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyMi0wMi0wOVQwMjowMjoyMCswMDowMNzSfeoAAAAASUVORK5CYII="},28453:(e,t,s)=>{s.d(t,{R:()=>o,x:()=>a});var n=s(96540);const i={},r=n.createContext(i);function o(e){const t=n.useContext(r);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:o(e.components),n.createElement(r.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/8379.eb768314.js b/assets/js/8379.eb768314.js new file mode 100644 index 000000000000..bfd66f762c33 --- /dev/null +++ b/assets/js/8379.eb768314.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8379],{59347:(t,e,n)=>{n.d(e,{CP:()=>l,HT:()=>u,PB:()=>h,aC:()=>c,lC:()=>a,m:()=>o,tk:()=>r});var i=n(45567),s=n(16750),r=(0,i.K2)(((t,e)=>{const n=t.append("rect");if(n.attr("x",e.x),n.attr("y",e.y),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("width",e.width),n.attr("height",e.height),e.name&&n.attr("name",e.name),e.rx&&n.attr("rx",e.rx),e.ry&&n.attr("ry",e.ry),void 0!==e.attrs)for(const i in e.attrs)n.attr(i,e.attrs[i]);return e.class&&n.attr("class",e.class),n}),"drawRect"),a=(0,i.K2)(((t,e)=>{const n={x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"};r(t,n).lower()}),"drawBackgroundRect"),o=(0,i.K2)(((t,e)=>{const n=e.text.replace(i.H1," "),s=t.append("text");s.attr("x",e.x),s.attr("y",e.y),s.attr("class","legend"),s.style("text-anchor",e.anchor),e.class&&s.attr("class",e.class);const r=s.append("tspan");return r.attr("x",e.x+2*e.textMargin),r.text(n),s}),"drawText"),c=(0,i.K2)(((t,e,n,i)=>{const r=t.append("image");r.attr("x",e),r.attr("y",n);const a=(0,s.J)(i);r.attr("xlink:href",a)}),"drawImage"),l=(0,i.K2)(((t,e,n,i)=>{const r=t.append("use");r.attr("x",e),r.attr("y",n);const a=(0,s.J)(i);r.attr("xlink:href",`#${a}`)}),"drawEmbeddedImage"),h=(0,i.K2)((()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0})),"getNoteRect"),u=(0,i.K2)((()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0})),"getTextObj")},18379:(t,e,n)=>{n.d(e,{diagram:()=>Y});var i=n(59347),s=n(45567),r=n(20007),a=function(){var t=(0,s.K2)((function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n}),"o"),e=[6,8,10,11,12,14,16,17,18],n=[1,9],i=[1,10],r=[1,11],a=[1,12],o=[1,13],c=[1,14],l={trace:(0,s.K2)((function(){}),"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:(0,s.K2)((function(t,e,n,i,s,r,a){var o=r.length-1;switch(s){case 1:return r[o-1];case 2:case 6:case 7:this.$=[];break;case 3:r[o-1].push(r[o]),this.$=r[o-1];break;case 4:case 5:this.$=r[o];break;case 8:i.setDiagramTitle(r[o].substr(6)),this.$=r[o].substr(6);break;case 9:this.$=r[o].trim(),i.setAccTitle(this.$);break;case 10:case 11:this.$=r[o].trim(),i.setAccDescription(this.$);break;case 12:i.addSection(r[o].substr(8)),this.$=r[o].substr(8);break;case 13:i.addTask(r[o-1],r[o]),this.$="task"}}),"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:n,12:i,14:r,16:a,17:o,18:c},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:n,12:i,14:r,16:a,17:o,18:c},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:(0,s.K2)((function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)}),"parseError"),parse:(0,s.K2)((function(t){var e=this,n=[0],i=[],r=[null],a=[],o=this.table,c="",l=0,h=0,u=0,y=a.slice.call(arguments,1),p=Object.create(this.lexer),d={yy:{}};for(var f in this.yy)Object.prototype.hasOwnProperty.call(this.yy,f)&&(d.yy[f]=this.yy[f]);p.setInput(t,d.yy),d.yy.lexer=p,d.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var g=p.yylloc;a.push(g);var x=p.options&&p.options.ranges;function m(){var t;return"number"!=typeof(t=i.pop()||p.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof d.yy.parseError?this.parseError=d.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,s.K2)((function(t){n.length=n.length-2*t,r.length=r.length-t,a.length=a.length-t}),"popStack"),(0,s.K2)(m,"lex");for(var k,_,b,w,v,K,$,T,M,S={};;){if(b=n[n.length-1],this.defaultActions[b]?w=this.defaultActions[b]:(null==k&&(k=m()),w=o[b]&&o[b][k]),void 0===w||!w.length||!w[0]){var E="";for(K in M=[],o[b])this.terminals_[K]&&K>2&&M.push("'"+this.terminals_[K]+"'");E=p.showPosition?"Parse error on line "+(l+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[k]||k)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==k?"end of input":"'"+(this.terminals_[k]||k)+"'"),this.parseError(E,{text:p.match,token:this.terminals_[k]||k,line:p.yylineno,loc:g,expected:M})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+k);switch(w[0]){case 1:n.push(k),r.push(p.yytext),a.push(p.yylloc),n.push(w[1]),k=null,_?(k=_,_=null):(h=p.yyleng,c=p.yytext,l=p.yylineno,g=p.yylloc,u>0&&u--);break;case 2:if($=this.productions_[w[1]][1],S.$=r[r.length-$],S._$={first_line:a[a.length-($||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-($||1)].first_column,last_column:a[a.length-1].last_column},x&&(S._$.range=[a[a.length-($||1)].range[0],a[a.length-1].range[1]]),void 0!==(v=this.performAction.apply(S,[c,h,l,d.yy,w[1],r,a].concat(y))))return v;$&&(n=n.slice(0,-1*$*2),r=r.slice(0,-1*$),a=a.slice(0,-1*$)),n.push(this.productions_[w[1]][0]),r.push(S.$),a.push(S._$),T=o[n[n.length-2]][n[n.length-1]],n.push(T);break;case 3:return!0}}return!0}),"parse")},h=function(){return{EOF:1,parseError:(0,s.K2)((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:(0,s.K2)((function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this}),"setInput"),input:(0,s.K2)((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t}),"input"),unput:(0,s.K2)((function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"unput"),more:(0,s.K2)((function(){return this._more=!0,this}),"more"),reject:(0,s.K2)((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:(0,s.K2)((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:(0,s.K2)((function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:(0,s.K2)((function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:(0,s.K2)((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:(0,s.K2)((function(t,e){var n,i,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var r in s)this[r]=s[r];return!1}return!1}),"test_match"),next:(0,s.K2)((function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),r=0;re[0].length)){if(e=n,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,s[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:(0,s.K2)((function(){var t=this.next();return t||this.lex()}),"lex"),begin:(0,s.K2)((function(t){this.conditionStack.push(t)}),"begin"),popState:(0,s.K2)((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:(0,s.K2)((function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules}),"_currentRules"),topState:(0,s.K2)((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:(0,s.K2)((function(t){this.begin(t)}),"pushState"),stateStackSize:(0,s.K2)((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,s.K2)((function(t,e,n,i){switch(n){case 0:case 1:case 3:case 4:break;case 2:return 10;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 18;case 16:return 19;case 17:return":";case 18:return 6;case 19:return"INVALID"}}),"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18,19],inclusive:!0}}}}();function u(){this.yy={}}return l.lexer=h,(0,s.K2)(u,"Parser"),u.prototype=l,l.Parser=u,new u}();a.parser=a;var o=a,c="",l=[],h=[],u=[],y=(0,s.K2)((function(){l.length=0,h.length=0,c="",u.length=0,(0,s.IU)()}),"clear"),p=(0,s.K2)((function(t){c=t,l.push(t)}),"addSection"),d=(0,s.K2)((function(){return l}),"getSections"),f=(0,s.K2)((function(){let t=k();let e=0;for(;!t&&e<100;)t=k(),e++;return h.push(...u),h}),"getTasks"),g=(0,s.K2)((function(){const t=[];h.forEach((e=>{e.people&&t.push(...e.people)}));return[...new Set(t)].sort()}),"updateActors"),x=(0,s.K2)((function(t,e){const n=e.substr(1).split(":");let i=0,s=[];1===n.length?(i=Number(n[0]),s=[]):(i=Number(n[0]),s=n[1].split(","));const r=s.map((t=>t.trim())),a={section:c,type:c,people:r,task:t,score:i};u.push(a)}),"addTask"),m=(0,s.K2)((function(t){const e={section:c,type:c,description:t,task:t,classes:[]};h.push(e)}),"addTaskOrg"),k=(0,s.K2)((function(){const t=(0,s.K2)((function(t){return u[t].processed}),"compileTask");let e=!0;for(const[n,i]of u.entries())t(n),e=e&&i.processed;return e}),"compileTasks"),_=(0,s.K2)((function(){return g()}),"getActors"),b={getConfig:(0,s.K2)((()=>(0,s.D7)().journey),"getConfig"),clear:y,setDiagramTitle:s.ke,getDiagramTitle:s.ab,setAccTitle:s.SV,getAccTitle:s.iN,setAccDescription:s.EI,getAccDescription:s.m7,addSection:p,getSections:d,getTasks:f,addTask:x,addTaskOrg:m,getActors:_},w=(0,s.K2)((t=>`.label {\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n color: ${t.textColor};\n }\n .mouth {\n stroke: #666;\n }\n\n line {\n stroke: ${t.textColor}\n }\n\n .legend {\n fill: ${t.textColor};\n }\n\n .label text {\n fill: #333;\n }\n .label {\n color: ${t.textColor}\n }\n\n .face {\n ${t.faceColor?`fill: ${t.faceColor}`:"fill: #FFF8DC"};\n stroke: #999;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n stroke-width: 1px;\n }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ${t.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${t.lineColor};\n stroke-width: 1.5px;\n }\n\n .flowchart-link {\n stroke: ${t.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${t.edgeLabelBackground};\n rect {\n opacity: 0.5;\n }\n text-align: center;\n }\n\n .cluster rect {\n }\n\n .cluster text {\n fill: ${t.titleColor};\n }\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n font-size: 12px;\n background: ${t.tertiaryColor};\n border: 1px solid ${t.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .task-type-0, .section-type-0 {\n ${t.fillType0?`fill: ${t.fillType0}`:""};\n }\n .task-type-1, .section-type-1 {\n ${t.fillType0?`fill: ${t.fillType1}`:""};\n }\n .task-type-2, .section-type-2 {\n ${t.fillType0?`fill: ${t.fillType2}`:""};\n }\n .task-type-3, .section-type-3 {\n ${t.fillType0?`fill: ${t.fillType3}`:""};\n }\n .task-type-4, .section-type-4 {\n ${t.fillType0?`fill: ${t.fillType4}`:""};\n }\n .task-type-5, .section-type-5 {\n ${t.fillType0?`fill: ${t.fillType5}`:""};\n }\n .task-type-6, .section-type-6 {\n ${t.fillType0?`fill: ${t.fillType6}`:""};\n }\n .task-type-7, .section-type-7 {\n ${t.fillType0?`fill: ${t.fillType7}`:""};\n }\n\n .actor-0 {\n ${t.actor0?`fill: ${t.actor0}`:""};\n }\n .actor-1 {\n ${t.actor1?`fill: ${t.actor1}`:""};\n }\n .actor-2 {\n ${t.actor2?`fill: ${t.actor2}`:""};\n }\n .actor-3 {\n ${t.actor3?`fill: ${t.actor3}`:""};\n }\n .actor-4 {\n ${t.actor4?`fill: ${t.actor4}`:""};\n }\n .actor-5 {\n ${t.actor5?`fill: ${t.actor5}`:""};\n }\n`),"getStyles"),v=(0,s.K2)((function(t,e){return(0,i.tk)(t,e)}),"drawRect"),K=(0,s.K2)((function(t,e){const n=15,i=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",n).attr("stroke-width",2).attr("overflow","visible"),a=t.append("g");function o(t){const i=(0,r.JLW)().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(n/2.2);t.append("path").attr("class","mouth").attr("d",i).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}function c(t){const i=(0,r.JLW)().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(n/2.2);t.append("path").attr("class","mouth").attr("d",i).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}function l(t){t.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return a.append("circle").attr("cx",e.cx-5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),a.append("circle").attr("cx",e.cx+5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),(0,s.K2)(o,"smile"),(0,s.K2)(c,"sad"),(0,s.K2)(l,"ambivalent"),e.score>3?o(a):e.score<3?c(a):l(a),i}),"drawFace"),$=(0,s.K2)((function(t,e){const n=t.append("circle");return n.attr("cx",e.cx),n.attr("cy",e.cy),n.attr("class","actor-"+e.pos),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("r",e.r),void 0!==n.class&&n.attr("class",n.class),void 0!==e.title&&n.append("title").text(e.title),n}),"drawCircle"),T=(0,s.K2)((function(t,e){return(0,i.m)(t,e)}),"drawText"),M=(0,s.K2)((function(t,e){function n(t,e,n,i,s){return t+","+e+" "+(t+n)+","+e+" "+(t+n)+","+(e+i-s)+" "+(t+n-1.2*s)+","+(e+i)+" "+t+","+(e+i)}(0,s.K2)(n,"genPoints");const i=t.append("polygon");i.attr("points",n(e.x,e.y,50,20,7)),i.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,T(t,e)}),"drawLabel"),S=(0,s.K2)((function(t,e,n){const s=t.append("g"),r=(0,i.PB)();r.x=e.x,r.y=e.y,r.fill=e.fill,r.width=n.width*e.taskCount+n.diagramMarginX*(e.taskCount-1),r.height=n.height,r.class="journey-section section-type-"+e.num,r.rx=3,r.ry=3,v(s,r),C(n)(e.text,s,r.x,r.y,r.width,r.height,{class:"journey-section section-type-"+e.num},n,e.colour)}),"drawSection"),E=-1,I=(0,s.K2)((function(t,e,n){const s=e.x+n.width/2,r=t.append("g");E++;r.append("line").attr("id","task"+E).attr("x1",s).attr("y1",e.y).attr("x2",s).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),K(r,{cx:s,cy:300+30*(5-e.score),score:e.score});const a=(0,i.PB)();a.x=e.x,a.y=e.y,a.fill=e.fill,a.width=n.width,a.height=n.height,a.class="task task-type-"+e.num,a.rx=3,a.ry=3,v(r,a);let o=e.x+14;e.people.forEach((t=>{const n=e.actors[t].color,i={cx:o,cy:e.y,r:7,fill:n,stroke:"#000",title:t,pos:e.actors[t].position};$(r,i),o+=10})),C(n)(e.task,r,a.x,a.y,a.width,a.height,{class:"task"},n,e.colour)}),"drawTask"),P=(0,s.K2)((function(t,e){(0,i.lC)(t,e)}),"drawBackgroundRect"),C=function(){function t(t,e,n,s,r,a,o,c){i(e.append("text").attr("x",n+r/2).attr("y",s+a/2+5).style("font-color",c).style("text-anchor","middle").text(t),o)}function e(t,e,n,s,r,a,o,c,l){const{taskFontSize:h,taskFontFamily:u}=c,y=t.split(//gi);for(let p=0;p{const s=D[i].color,r={cx:20,cy:n,r:7,fill:s,stroke:"#000",pos:D[i].position};A.drawCircle(t,r);const a={x:40,y:n+7,fill:"#666",text:i,textMargin:5|e.boxTextMargin};A.drawText(t,a),n+=20}))}(0,s.K2)(L,"drawActorLegend");var V=(0,s.D7)().journey,B=V.leftMargin,O=(0,s.K2)((function(t,e,n,i){const a=(0,s.D7)().journey,o=(0,s.D7)().securityLevel;let c;"sandbox"===o&&(c=(0,r.Ltv)("#i"+e));const l="sandbox"===o?(0,r.Ltv)(c.nodes()[0].contentDocument.body):(0,r.Ltv)("body");F.init();const h=l.select("#"+e);A.initGraphics(h);const u=i.db.getTasks(),y=i.db.getDiagramTitle(),p=i.db.getActors();for(const s in D)delete D[s];let d=0;p.forEach((t=>{D[t]={color:a.actorColours[d%a.actorColours.length],position:d},d++})),L(h),F.insert(0,0,B,50*Object.keys(D).length),z(h,u,0);const f=F.getBounds();y&&h.append("text").text(y).attr("x",B).attr("font-size","4ex").attr("font-weight","bold").attr("y",25);const g=f.stopy-f.starty+2*a.diagramMarginY,x=B+f.stopx+2*a.diagramMarginX;(0,s.a$)(h,g,x,a.useMaxWidth),h.append("line").attr("x1",B).attr("y1",4*a.height).attr("x2",x-B-4).attr("y2",4*a.height).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)");const m=y?70:0;h.attr("viewBox",`${f.startx} -25 ${x} ${g+m}`),h.attr("preserveAspectRatio","xMinYMin meet"),h.attr("height",g+m+25)}),"draw"),F={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:(0,s.K2)((function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0}),"init"),updateVal:(0,s.K2)((function(t,e,n,i){void 0===t[e]?t[e]=n:t[e]=i(n,t[e])}),"updateVal"),updateBounds:(0,s.K2)((function(t,e,n,i){const r=(0,s.D7)().journey,a=this;let o=0;function c(c){return(0,s.K2)((function(s){o++;const l=a.sequenceItems.length-o+1;a.updateVal(s,"starty",e-l*r.boxMargin,Math.min),a.updateVal(s,"stopy",i+l*r.boxMargin,Math.max),a.updateVal(F.data,"startx",t-l*r.boxMargin,Math.min),a.updateVal(F.data,"stopx",n+l*r.boxMargin,Math.max),"activation"!==c&&(a.updateVal(s,"startx",t-l*r.boxMargin,Math.min),a.updateVal(s,"stopx",n+l*r.boxMargin,Math.max),a.updateVal(F.data,"starty",e-l*r.boxMargin,Math.min),a.updateVal(F.data,"stopy",i+l*r.boxMargin,Math.max))}),"updateItemBounds")}(0,s.K2)(c,"updateFn"),this.sequenceItems.forEach(c())}),"updateBounds"),insert:(0,s.K2)((function(t,e,n,i){const s=Math.min(t,n),r=Math.max(t,n),a=Math.min(e,i),o=Math.max(e,i);this.updateVal(F.data,"startx",s,Math.min),this.updateVal(F.data,"starty",a,Math.min),this.updateVal(F.data,"stopx",r,Math.max),this.updateVal(F.data,"stopy",o,Math.max),this.updateBounds(s,a,r,o)}),"insert"),bumpVerticalPos:(0,s.K2)((function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos}),"bumpVerticalPos"),getVerticalPos:(0,s.K2)((function(){return this.verticalPos}),"getVerticalPos"),getBounds:(0,s.K2)((function(){return this.data}),"getBounds")},N=V.sectionFills,R=V.sectionColours,z=(0,s.K2)((function(t,e,n){const i=(0,s.D7)().journey;let r="";const a=n+(2*i.height+i.diagramMarginY);let o=0,c="#CCC",l="black",h=0;for(const[s,u]of e.entries()){if(r!==u.section){c=N[o%N.length],h=o%N.length,l=R[o%R.length];let n=0;const a=u.section;for(let t=s;t(D[e]&&(t[e]=D[e]),t)),{});u.x=s*i.taskMargin+s*i.width+B,u.y=a,u.width=i.diagramMarginX,u.height=i.diagramMarginY,u.colour=l,u.fill=c,u.num=h,u.actors=n,A.drawTask(t,u,i),F.insert(u.x,u.y,u.x+u.width+i.taskMargin,450)}}),"drawTasks"),W={setConf:j,draw:O},Y={parser:o,db:b,renderer:W,styles:w,init:(0,s.K2)((t=>{W.setConf(t.journey),b.clear()}),"init")}}}]); \ No newline at end of file diff --git a/assets/js/83d4859f.d682cef9.js b/assets/js/83d4859f.d682cef9.js deleted file mode 100644 index fba1a7877dea..000000000000 --- a/assets/js/83d4859f.d682cef9.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2808],{3299:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>c,contentTitle:()=>i,default:()=>u,frontMatter:()=>a,metadata:()=>o,toc:()=>l});var n=t(74848),r=t(28453);const a={id:"learn-xcm-docs-transfers-summary",title:"Transfers",sidebar_label:"Summary",description:"Summary about XCM Transfers.",keywords:["xcm","cross-consensus messaging","transfers"],slug:"../transfers-summary"},i="Transfers",o={id:"learn/xcm/journey/transfers/learn-xcm-docs-transfers-summary",title:"Transfers",description:"Summary about XCM Transfers.",source:"@site/../docs/learn/xcm/journey/transfers/summary.md",sourceDirName:"learn/xcm/journey/transfers",slug:"/learn/xcm/journey/transfers-summary",permalink:"/docs/learn/xcm/journey/transfers-summary",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/xcm/journey/transfers/summary.md",tags:[],version:"current",lastUpdatedBy:"bader y",lastUpdatedAt:1694099593e3,frontMatter:{id:"learn-xcm-docs-transfers-summary",title:"Transfers",sidebar_label:"Summary",description:"Summary about XCM Transfers.",keywords:["xcm","cross-consensus messaging","transfers"],slug:"../transfers-summary"},sidebar:"docs",previous:{title:"Transfers",permalink:"/docs/learn/xcm/journey/transfers"},next:{title:"Asset Teleportation",permalink:"/docs/learn/xcm/journey/transfers-teleport"}},c={},l=[{value:"WithdrawAsset",id:"withdrawasset",level:2},{value:"BuyExecution",id:"buyexecution",level:2},{value:"DepositAsset",id:"depositasset",level:2},{value:"Example",id:"example",level:2},{value:"Transferring between systems",id:"transferring-between-systems",level:2}];function d(e){const s={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,r.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.header,{children:(0,n.jsx)(s.h1,{id:"transfers",children:"Transfers"})}),"\n",(0,n.jsxs)(s.p,{children:["The first feature you'll be interested in when dealing with XCM is being able to transfer assets\nbetween consensus systems. In the ",(0,n.jsx)(s.a,{href:"/docs/learn/xcm/quickstart-summary",children:"quickstart"})," chapter, we saw a simple\nXCM that when executed, would send assets between two accounts on the same consensus system. Now\nthat we've learnt the ",(0,n.jsx)(s.a,{href:"/docs/learn/xcm/fundamentals-summary",children:"fundamentals"}),", let's go over those same\ninstructions once again."]}),"\n",(0,n.jsx)(s.h2,{id:"withdrawasset",children:"WithdrawAsset"}),"\n",(0,n.jsx)(s.pre,{children:(0,n.jsx)(s.code,{className:"language-rust",children:"WithdrawAsset(MultiAssets),\n"})}),"\n",(0,n.jsxs)(s.p,{children:["This instruction is the most common way to get assets to the holding register of the XCVM. The\n",(0,n.jsx)(s.code,{children:"MultiAssets"})," in the operand will be stored in the holding register to be later used for other\ninstructions. As we've seen, we can use the expression ",(0,n.jsx)(s.code,{children:"(Here, amount).into()"})," to take a certain\n",(0,n.jsx)(s.code,{children:"amount"})," of the native token."]}),"\n",(0,n.jsx)(s.h2,{id:"buyexecution",children:"BuyExecution"}),"\n",(0,n.jsx)(s.pre,{children:(0,n.jsx)(s.code,{className:"language-rust",children:"BuyExecution { fees: MultiAssets, weight_limit: WeightLimit },\n"})}),"\n",(0,n.jsxs)(s.p,{children:["Because XCM is designed to be agnostic to the underlying consensus system, it doesn't have fee\npayment baked in. This instruction lets you pay for the execution of the XCM using the assets in the\nholding register. Most XCMs are not allowed to be executed (blocked by the\n",(0,n.jsx)(s.a,{href:"/docs/learn/xcm/config-deep-dive#barrier",children:"barrier"}),") if they don't contain this instruction as one of\nthe first ones to pay for all future ones."]}),"\n",(0,n.jsx)(s.h2,{id:"depositasset",children:"DepositAsset"}),"\n",(0,n.jsx)(s.pre,{children:(0,n.jsx)(s.code,{className:"language-rust",children:"DepositAsset { assets: MultiAssetFilter, beneficiary: MultiLocation },\n"})}),"\n",(0,n.jsxs)(s.p,{children:["This instruction will put assets from the holding register that match the\n",(0,n.jsx)(s.a,{href:"/docs/learn/xcm/fundamentals-multiasset#multiassetfilter",children:"MultiAssetFilter"})," into the ",(0,n.jsx)(s.code,{children:"beneficiary"}),". Note\nthat ",(0,n.jsx)(s.code,{children:"beneficiary"})," must be a location where the local consensus system can actually deposit assets\nto, e.g. it doesn't make sense to deposit assets to ",(0,n.jsx)(s.code,{children:"../AccountId32(0x0)"}),"."]}),"\n",(0,n.jsx)(s.h2,{id:"example",children:"Example"}),"\n",(0,n.jsx)(s.pre,{children:(0,n.jsx)(s.code,{className:"language-rust",children:"let message = Xcm(vec![\n WithdrawAsset((Here, amount).into()),\n BuyExecution { fees: (Here, amount).into(), weight_limit: Unlimited },\n DepositAsset {\n assets: All.into(),\n beneficiary: AccountId32 { id: ALICE.into(), network: None }.into()\n },\n]);\n"})}),"\n",(0,n.jsxs)(s.p,{children:["As we've seen, the above message results in withdrawing assets from the origin of the message,\npaying for execution and depositing the rest to another account on the same system. The full example\ncan be seen in ",(0,n.jsx)(s.a,{href:"https://github.com/paritytech/xcm-docs/tree/main/examples",children:"the repo"}),"."]}),"\n",(0,n.jsx)(s.h2,{id:"transferring-between-systems",children:"Transferring between systems"}),"\n",(0,n.jsx)(s.p,{children:"But what if you want to make a transfer from one system to another? There are two ways of doing\nthis:"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsx)(s.li,{children:"Asset teleportation"}),"\n",(0,n.jsx)(s.li,{children:"Reserve-backed transfers"}),"\n"]}),"\n",(0,n.jsx)(s.p,{children:"We'll be discussing both in the following chapters."})]})}function u(e={}){const{wrapper:s}={...(0,r.R)(),...e.components};return s?(0,n.jsx)(s,{...e,children:(0,n.jsx)(d,{...e})}):d(e)}},28453:(e,s,t)=>{t.d(s,{R:()=>i,x:()=>o});var n=t(96540);const r={},a=n.createContext(r);function i(e){const s=n.useContext(a);return n.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function o(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),n.createElement(a.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/83d4859f.e432179d.js b/assets/js/83d4859f.e432179d.js new file mode 100644 index 000000000000..9db18ebc53af --- /dev/null +++ b/assets/js/83d4859f.e432179d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2808],{84890:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>c,contentTitle:()=>o,default:()=>u,frontMatter:()=>i,metadata:()=>n,toc:()=>l});const n=JSON.parse('{"id":"learn/xcm/journey/transfers/learn-xcm-docs-transfers-summary","title":"Transfers","description":"Summary about XCM Transfers.","source":"@site/../docs/learn/xcm/journey/transfers/summary.md","sourceDirName":"learn/xcm/journey/transfers","slug":"/learn/xcm/journey/transfers-summary","permalink":"/docs/learn/xcm/journey/transfers-summary","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/xcm/journey/transfers/summary.md","tags":[],"version":"current","lastUpdatedBy":"bader y","lastUpdatedAt":1694099593000,"frontMatter":{"id":"learn-xcm-docs-transfers-summary","title":"Transfers","sidebar_label":"Summary","description":"Summary about XCM Transfers.","keywords":["xcm","cross-consensus messaging","transfers"],"slug":"../transfers-summary"},"sidebar":"docs","previous":{"title":"Transfers","permalink":"/docs/learn/xcm/journey/transfers"},"next":{"title":"Asset Teleportation","permalink":"/docs/learn/xcm/journey/transfers-teleport"}}');var r=t(74848),a=t(28453);const i={id:"learn-xcm-docs-transfers-summary",title:"Transfers",sidebar_label:"Summary",description:"Summary about XCM Transfers.",keywords:["xcm","cross-consensus messaging","transfers"],slug:"../transfers-summary"},o="Transfers",c={},l=[{value:"WithdrawAsset",id:"withdrawasset",level:2},{value:"BuyExecution",id:"buyexecution",level:2},{value:"DepositAsset",id:"depositasset",level:2},{value:"Example",id:"example",level:2},{value:"Transferring between systems",id:"transferring-between-systems",level:2}];function d(e){const s={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,a.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.header,{children:(0,r.jsx)(s.h1,{id:"transfers",children:"Transfers"})}),"\n",(0,r.jsxs)(s.p,{children:["The first feature you'll be interested in when dealing with XCM is being able to transfer assets\nbetween consensus systems. In the ",(0,r.jsx)(s.a,{href:"/docs/learn/xcm/quickstart-summary",children:"quickstart"})," chapter, we saw a simple\nXCM that when executed, would send assets between two accounts on the same consensus system. Now\nthat we've learnt the ",(0,r.jsx)(s.a,{href:"/docs/learn/xcm/fundamentals-summary",children:"fundamentals"}),", let's go over those same\ninstructions once again."]}),"\n",(0,r.jsx)(s.h2,{id:"withdrawasset",children:"WithdrawAsset"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-rust",children:"WithdrawAsset(MultiAssets),\n"})}),"\n",(0,r.jsxs)(s.p,{children:["This instruction is the most common way to get assets to the holding register of the XCVM. The\n",(0,r.jsx)(s.code,{children:"MultiAssets"})," in the operand will be stored in the holding register to be later used for other\ninstructions. As we've seen, we can use the expression ",(0,r.jsx)(s.code,{children:"(Here, amount).into()"})," to take a certain\n",(0,r.jsx)(s.code,{children:"amount"})," of the native token."]}),"\n",(0,r.jsx)(s.h2,{id:"buyexecution",children:"BuyExecution"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-rust",children:"BuyExecution { fees: MultiAssets, weight_limit: WeightLimit },\n"})}),"\n",(0,r.jsxs)(s.p,{children:["Because XCM is designed to be agnostic to the underlying consensus system, it doesn't have fee\npayment baked in. This instruction lets you pay for the execution of the XCM using the assets in the\nholding register. Most XCMs are not allowed to be executed (blocked by the\n",(0,r.jsx)(s.a,{href:"/docs/learn/xcm/config-deep-dive#barrier",children:"barrier"}),") if they don't contain this instruction as one of\nthe first ones to pay for all future ones."]}),"\n",(0,r.jsx)(s.h2,{id:"depositasset",children:"DepositAsset"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-rust",children:"DepositAsset { assets: MultiAssetFilter, beneficiary: MultiLocation },\n"})}),"\n",(0,r.jsxs)(s.p,{children:["This instruction will put assets from the holding register that match the\n",(0,r.jsx)(s.a,{href:"/docs/learn/xcm/fundamentals-multiasset#multiassetfilter",children:"MultiAssetFilter"})," into the ",(0,r.jsx)(s.code,{children:"beneficiary"}),". Note\nthat ",(0,r.jsx)(s.code,{children:"beneficiary"})," must be a location where the local consensus system can actually deposit assets\nto, e.g. it doesn't make sense to deposit assets to ",(0,r.jsx)(s.code,{children:"../AccountId32(0x0)"}),"."]}),"\n",(0,r.jsx)(s.h2,{id:"example",children:"Example"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-rust",children:"let message = Xcm(vec![\n WithdrawAsset((Here, amount).into()),\n BuyExecution { fees: (Here, amount).into(), weight_limit: Unlimited },\n DepositAsset {\n assets: All.into(),\n beneficiary: AccountId32 { id: ALICE.into(), network: None }.into()\n },\n]);\n"})}),"\n",(0,r.jsxs)(s.p,{children:["As we've seen, the above message results in withdrawing assets from the origin of the message,\npaying for execution and depositing the rest to another account on the same system. The full example\ncan be seen in ",(0,r.jsx)(s.a,{href:"https://github.com/paritytech/xcm-docs/tree/main/examples",children:"the repo"}),"."]}),"\n",(0,r.jsx)(s.h2,{id:"transferring-between-systems",children:"Transferring between systems"}),"\n",(0,r.jsx)(s.p,{children:"But what if you want to make a transfer from one system to another? There are two ways of doing\nthis:"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsx)(s.li,{children:"Asset teleportation"}),"\n",(0,r.jsx)(s.li,{children:"Reserve-backed transfers"}),"\n"]}),"\n",(0,r.jsx)(s.p,{children:"We'll be discussing both in the following chapters."})]})}function u(e={}){const{wrapper:s}={...(0,a.R)(),...e.components};return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(d,{...e})}):d(e)}},28453:(e,s,t)=>{t.d(s,{R:()=>i,x:()=>o});var n=t(96540);const r={},a=n.createContext(r);function i(e){const s=n.useContext(a);return n.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function o(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),n.createElement(a.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/846.7ce979e9.js b/assets/js/846.7ce979e9.js deleted file mode 100644 index 3a9f2caa2342..000000000000 --- a/assets/js/846.7ce979e9.js +++ /dev/null @@ -1,742 +0,0 @@ -"use strict"; -exports.id = 846; -exports.ids = [846]; -exports.modules = { - -/***/ 48846: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ diagram: () => (/* binding */ diagram) -/* harmony export */ }); -/* harmony import */ var _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(86079); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(26312); -/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(74353); -/* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(16750); -/* harmony import */ var dompurify__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(99418); - - - - - - - - - - - -var parser = function() { - var o = function(k, v, o2, l) { - for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) - ; - return o2; - }, $V0 = [1, 3], $V1 = [1, 4], $V2 = [1, 5], $V3 = [1, 6], $V4 = [1, 10, 12, 14, 16, 18, 19, 20, 21, 22], $V5 = [2, 4], $V6 = [1, 5, 10, 12, 14, 16, 18, 19, 20, 21, 22], $V7 = [20, 21, 22], $V8 = [2, 7], $V9 = [1, 12], $Va = [1, 13], $Vb = [1, 14], $Vc = [1, 15], $Vd = [1, 16], $Ve = [1, 17]; - var parser2 = { - trace: function trace() { - }, - yy: {}, - symbols_: { "error": 2, "start": 3, "eol": 4, "PIE": 5, "document": 6, "showData": 7, "line": 8, "statement": 9, "txt": 10, "value": 11, "title": 12, "title_value": 13, "acc_title": 14, "acc_title_value": 15, "acc_descr": 16, "acc_descr_value": 17, "acc_descr_multiline_value": 18, "section": 19, "NEWLINE": 20, ";": 21, "EOF": 22, "$accept": 0, "$end": 1 }, - terminals_: { 2: "error", 5: "PIE", 7: "showData", 10: "txt", 11: "value", 12: "title", 13: "title_value", 14: "acc_title", 15: "acc_title_value", 16: "acc_descr", 17: "acc_descr_value", 18: "acc_descr_multiline_value", 19: "section", 20: "NEWLINE", 21: ";", 22: "EOF" }, - productions_: [0, [3, 2], [3, 2], [3, 3], [6, 0], [6, 2], [8, 2], [9, 0], [9, 2], [9, 2], [9, 2], [9, 2], [9, 1], [9, 1], [4, 1], [4, 1], [4, 1]], - performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { - var $0 = $$.length - 1; - switch (yystate) { - case 3: - yy.setShowData(true); - break; - case 6: - this.$ = $$[$0 - 1]; - break; - case 8: - yy.addSection($$[$0 - 1], yy.cleanupValue($$[$0])); - break; - case 9: - this.$ = $$[$0].trim(); - yy.setDiagramTitle(this.$); - break; - case 10: - this.$ = $$[$0].trim(); - yy.setAccTitle(this.$); - break; - case 11: - case 12: - this.$ = $$[$0].trim(); - yy.setAccDescription(this.$); - break; - case 13: - yy.addSection($$[$0].substr(8)); - this.$ = $$[$0].substr(8); - break; - } - }, - table: [{ 3: 1, 4: 2, 5: $V0, 20: $V1, 21: $V2, 22: $V3 }, { 1: [3] }, { 3: 7, 4: 2, 5: $V0, 20: $V1, 21: $V2, 22: $V3 }, o($V4, $V5, { 6: 8, 7: [1, 9] }), o($V6, [2, 14]), o($V6, [2, 15]), o($V6, [2, 16]), { 1: [2, 1] }, o($V7, $V8, { 8: 10, 9: 11, 1: [2, 2], 10: $V9, 12: $Va, 14: $Vb, 16: $Vc, 18: $Vd, 19: $Ve }), o($V4, $V5, { 6: 18 }), o($V4, [2, 5]), { 4: 19, 20: $V1, 21: $V2, 22: $V3 }, { 11: [1, 20] }, { 13: [1, 21] }, { 15: [1, 22] }, { 17: [1, 23] }, o($V7, [2, 12]), o($V7, [2, 13]), o($V7, $V8, { 8: 10, 9: 11, 1: [2, 3], 10: $V9, 12: $Va, 14: $Vb, 16: $Vc, 18: $Vd, 19: $Ve }), o($V4, [2, 6]), o($V7, [2, 8]), o($V7, [2, 9]), o($V7, [2, 10]), o($V7, [2, 11])], - defaultActions: { 7: [2, 1] }, - parseError: function parseError(str, hash) { - if (hash.recoverable) { - this.trace(str); - } else { - var error = new Error(str); - error.hash = hash; - throw error; - } - }, - parse: function parse(input) { - var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; - var args = lstack.slice.call(arguments, 1); - var lexer2 = Object.create(this.lexer); - var sharedState = { yy: {} }; - for (var k in this.yy) { - if (Object.prototype.hasOwnProperty.call(this.yy, k)) { - sharedState.yy[k] = this.yy[k]; - } - } - lexer2.setInput(input, sharedState.yy); - sharedState.yy.lexer = lexer2; - sharedState.yy.parser = this; - if (typeof lexer2.yylloc == "undefined") { - lexer2.yylloc = {}; - } - var yyloc = lexer2.yylloc; - lstack.push(yyloc); - var ranges = lexer2.options && lexer2.options.ranges; - if (typeof sharedState.yy.parseError === "function") { - this.parseError = sharedState.yy.parseError; - } else { - this.parseError = Object.getPrototypeOf(this).parseError; - } - function lex() { - var token; - token = tstack.pop() || lexer2.lex() || EOF; - if (typeof token !== "number") { - if (token instanceof Array) { - tstack = token; - token = tstack.pop(); - } - token = self.symbols_[token] || token; - } - return token; - } - var symbol, state, action, r, yyval = {}, p, len, newState, expected; - while (true) { - state = stack[stack.length - 1]; - if (this.defaultActions[state]) { - action = this.defaultActions[state]; - } else { - if (symbol === null || typeof symbol == "undefined") { - symbol = lex(); - } - action = table[state] && table[state][symbol]; - } - if (typeof action === "undefined" || !action.length || !action[0]) { - var errStr = ""; - expected = []; - for (p in table[state]) { - if (this.terminals_[p] && p > TERROR) { - expected.push("'" + this.terminals_[p] + "'"); - } - } - if (lexer2.showPosition) { - errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; - } else { - errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); - } - this.parseError(errStr, { - text: lexer2.match, - token: this.terminals_[symbol] || symbol, - line: lexer2.yylineno, - loc: yyloc, - expected - }); - } - if (action[0] instanceof Array && action.length > 1) { - throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); - } - switch (action[0]) { - case 1: - stack.push(symbol); - vstack.push(lexer2.yytext); - lstack.push(lexer2.yylloc); - stack.push(action[1]); - symbol = null; - { - yyleng = lexer2.yyleng; - yytext = lexer2.yytext; - yylineno = lexer2.yylineno; - yyloc = lexer2.yylloc; - } - break; - case 2: - len = this.productions_[action[1]][1]; - yyval.$ = vstack[vstack.length - len]; - yyval._$ = { - first_line: lstack[lstack.length - (len || 1)].first_line, - last_line: lstack[lstack.length - 1].last_line, - first_column: lstack[lstack.length - (len || 1)].first_column, - last_column: lstack[lstack.length - 1].last_column - }; - if (ranges) { - yyval._$.range = [ - lstack[lstack.length - (len || 1)].range[0], - lstack[lstack.length - 1].range[1] - ]; - } - r = this.performAction.apply(yyval, [ - yytext, - yyleng, - yylineno, - sharedState.yy, - action[1], - vstack, - lstack - ].concat(args)); - if (typeof r !== "undefined") { - return r; - } - if (len) { - stack = stack.slice(0, -1 * len * 2); - vstack = vstack.slice(0, -1 * len); - lstack = lstack.slice(0, -1 * len); - } - stack.push(this.productions_[action[1]][0]); - vstack.push(yyval.$); - lstack.push(yyval._$); - newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; - stack.push(newState); - break; - case 3: - return true; - } - } - return true; - } - }; - var lexer = function() { - var lexer2 = { - EOF: 1, - parseError: function parseError(str, hash) { - if (this.yy.parser) { - this.yy.parser.parseError(str, hash); - } else { - throw new Error(str); - } - }, - // resets the lexer, sets new input - setInput: function(input, yy) { - this.yy = yy || this.yy || {}; - this._input = input; - this._more = this._backtrack = this.done = false; - this.yylineno = this.yyleng = 0; - this.yytext = this.matched = this.match = ""; - this.conditionStack = ["INITIAL"]; - this.yylloc = { - first_line: 1, - first_column: 0, - last_line: 1, - last_column: 0 - }; - if (this.options.ranges) { - this.yylloc.range = [0, 0]; - } - this.offset = 0; - return this; - }, - // consumes and returns one char from the input - input: function() { - var ch = this._input[0]; - this.yytext += ch; - this.yyleng++; - this.offset++; - this.match += ch; - this.matched += ch; - var lines = ch.match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno++; - this.yylloc.last_line++; - } else { - this.yylloc.last_column++; - } - if (this.options.ranges) { - this.yylloc.range[1]++; - } - this._input = this._input.slice(1); - return ch; - }, - // unshifts one char (or a string) into the input - unput: function(ch) { - var len = ch.length; - var lines = ch.split(/(?:\r\n?|\n)/g); - this._input = ch + this._input; - this.yytext = this.yytext.substr(0, this.yytext.length - len); - this.offset -= len; - var oldLines = this.match.split(/(?:\r\n?|\n)/g); - this.match = this.match.substr(0, this.match.length - 1); - this.matched = this.matched.substr(0, this.matched.length - 1); - if (lines.length - 1) { - this.yylineno -= lines.length - 1; - } - var r = this.yylloc.range; - this.yylloc = { - first_line: this.yylloc.first_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.first_column, - last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len - }; - if (this.options.ranges) { - this.yylloc.range = [r[0], r[0] + this.yyleng - len]; - } - this.yyleng = this.yytext.length; - return this; - }, - // When called from action, caches matched text and appends it on next action - more: function() { - this._more = true; - return this; - }, - // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. - reject: function() { - if (this.options.backtrack_lexer) { - this._backtrack = true; - } else { - return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), { - text: "", - token: null, - line: this.yylineno - }); - } - return this; - }, - // retain first n characters of the match - less: function(n) { - this.unput(this.match.slice(n)); - }, - // displays already matched input, i.e. for error messages - pastInput: function() { - var past = this.matched.substr(0, this.matched.length - this.match.length); - return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); - }, - // displays upcoming input, i.e. for error messages - upcomingInput: function() { - var next = this.match; - if (next.length < 20) { - next += this._input.substr(0, 20 - next.length); - } - return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); - }, - // displays the character position where the lexing error occurred, i.e. for error messages - showPosition: function() { - var pre = this.pastInput(); - var c = new Array(pre.length + 1).join("-"); - return pre + this.upcomingInput() + "\n" + c + "^"; - }, - // test the lexed token: return FALSE when not a match, otherwise return token - test_match: function(match, indexed_rule) { - var token, lines, backup; - if (this.options.backtrack_lexer) { - backup = { - yylineno: this.yylineno, - yylloc: { - first_line: this.yylloc.first_line, - last_line: this.last_line, - first_column: this.yylloc.first_column, - last_column: this.yylloc.last_column - }, - yytext: this.yytext, - match: this.match, - matches: this.matches, - matched: this.matched, - yyleng: this.yyleng, - offset: this.offset, - _more: this._more, - _input: this._input, - yy: this.yy, - conditionStack: this.conditionStack.slice(0), - done: this.done - }; - if (this.options.ranges) { - backup.yylloc.range = this.yylloc.range.slice(0); - } - } - lines = match[0].match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno += lines.length; - } - this.yylloc = { - first_line: this.yylloc.last_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.last_column, - last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length - }; - this.yytext += match[0]; - this.match += match[0]; - this.matches = match; - this.yyleng = this.yytext.length; - if (this.options.ranges) { - this.yylloc.range = [this.offset, this.offset += this.yyleng]; - } - this._more = false; - this._backtrack = false; - this._input = this._input.slice(match[0].length); - this.matched += match[0]; - token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); - if (this.done && this._input) { - this.done = false; - } - if (token) { - return token; - } else if (this._backtrack) { - for (var k in backup) { - this[k] = backup[k]; - } - return false; - } - return false; - }, - // return next match in input - next: function() { - if (this.done) { - return this.EOF; - } - if (!this._input) { - this.done = true; - } - var token, match, tempMatch, index; - if (!this._more) { - this.yytext = ""; - this.match = ""; - } - var rules = this._currentRules(); - for (var i = 0; i < rules.length; i++) { - tempMatch = this._input.match(this.rules[rules[i]]); - if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { - match = tempMatch; - index = i; - if (this.options.backtrack_lexer) { - token = this.test_match(tempMatch, rules[i]); - if (token !== false) { - return token; - } else if (this._backtrack) { - match = false; - continue; - } else { - return false; - } - } else if (!this.options.flex) { - break; - } - } - } - if (match) { - token = this.test_match(match, rules[index]); - if (token !== false) { - return token; - } - return false; - } - if (this._input === "") { - return this.EOF; - } else { - return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { - text: "", - token: null, - line: this.yylineno - }); - } - }, - // return next match that has a token - lex: function lex() { - var r = this.next(); - if (r) { - return r; - } else { - return this.lex(); - } - }, - // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) - begin: function begin(condition) { - this.conditionStack.push(condition); - }, - // pop the previously active lexer condition state off the condition stack - popState: function popState() { - var n = this.conditionStack.length - 1; - if (n > 0) { - return this.conditionStack.pop(); - } else { - return this.conditionStack[0]; - } - }, - // produce the lexer rule set which is active for the currently active lexer condition state - _currentRules: function _currentRules() { - if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { - return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; - } else { - return this.conditions["INITIAL"].rules; - } - }, - // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available - topState: function topState(n) { - n = this.conditionStack.length - 1 - Math.abs(n || 0); - if (n >= 0) { - return this.conditionStack[n]; - } else { - return "INITIAL"; - } - }, - // alias for begin(condition) - pushState: function pushState(condition) { - this.begin(condition); - }, - // return the number of states currently on the stack - stateStackSize: function stateStackSize() { - return this.conditionStack.length; - }, - options: { "case-insensitive": true }, - performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { - switch ($avoiding_name_collisions) { - case 0: - break; - case 1: - break; - case 2: - return 20; - case 3: - break; - case 4: - break; - case 5: - this.begin("title"); - return 12; - case 6: - this.popState(); - return "title_value"; - case 7: - this.begin("acc_title"); - return 14; - case 8: - this.popState(); - return "acc_title_value"; - case 9: - this.begin("acc_descr"); - return 16; - case 10: - this.popState(); - return "acc_descr_value"; - case 11: - this.begin("acc_descr_multiline"); - break; - case 12: - this.popState(); - break; - case 13: - return "acc_descr_multiline_value"; - case 14: - this.begin("string"); - break; - case 15: - this.popState(); - break; - case 16: - return "txt"; - case 17: - return 5; - case 18: - return 7; - case 19: - return "value"; - case 20: - return 22; - } - }, - rules: [/^(?:%%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[\n\r]+)/i, /^(?:%%[^\n]*)/i, /^(?:[\s]+)/i, /^(?:title\b)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:["])/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:pie\b)/i, /^(?:showData\b)/i, /^(?::[\s]*[\d]+(?:\.[\d]+)?)/i, /^(?:$)/i], - conditions: { "acc_descr_multiline": { "rules": [12, 13], "inclusive": false }, "acc_descr": { "rules": [10], "inclusive": false }, "acc_title": { "rules": [8], "inclusive": false }, "title": { "rules": [6], "inclusive": false }, "string": { "rules": [15, 16], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 3, 4, 5, 7, 9, 11, 14, 17, 18, 19, 20], "inclusive": true } } - }; - return lexer2; - }(); - parser2.lexer = lexer; - function Parser() { - this.yy = {}; - } - Parser.prototype = parser2; - parser2.Parser = Parser; - return new Parser(); -}(); -parser.parser = parser; -const parser$1 = parser; -const DEFAULT_PIE_CONFIG = _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.B.pie; -const DEFAULT_PIE_DB = { - sections: {}, - showData: false, - config: DEFAULT_PIE_CONFIG -}; -let sections = DEFAULT_PIE_DB.sections; -let showData = DEFAULT_PIE_DB.showData; -const config = structuredClone(DEFAULT_PIE_CONFIG); -const getConfig = () => structuredClone(config); -const clear = () => { - sections = structuredClone(DEFAULT_PIE_DB.sections); - showData = DEFAULT_PIE_DB.showData; - (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.v)(); -}; -const addSection = (label, value) => { - label = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.d)(label, (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.c)()); - if (sections[label] === void 0) { - sections[label] = value; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug(`added new section: ${label}, with value: ${value}`); - } -}; -const getSections = () => sections; -const cleanupValue = (value) => { - if (value.substring(0, 1) === ":") { - value = value.substring(1).trim(); - } - return Number(value.trim()); -}; -const setShowData = (toggle) => { - showData = toggle; -}; -const getShowData = () => showData; -const db = { - getConfig, - clear, - setDiagramTitle: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.q, - getDiagramTitle: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.t, - setAccTitle: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.s, - getAccTitle: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.g, - setAccDescription: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.b, - getAccDescription: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.a, - addSection, - getSections, - cleanupValue, - setShowData, - getShowData -}; -const getStyles = (options) => ` - .pieCircle{ - stroke: ${options.pieStrokeColor}; - stroke-width : ${options.pieStrokeWidth}; - opacity : ${options.pieOpacity}; - } - .pieOuterCircle{ - stroke: ${options.pieOuterStrokeColor}; - stroke-width: ${options.pieOuterStrokeWidth}; - fill: none; - } - .pieTitleText { - text-anchor: middle; - font-size: ${options.pieTitleTextSize}; - fill: ${options.pieTitleTextColor}; - font-family: ${options.fontFamily}; - } - .slice { - font-family: ${options.fontFamily}; - fill: ${options.pieSectionTextColor}; - font-size:${options.pieSectionTextSize}; - // fill: white; - } - .legend text { - fill: ${options.pieLegendTextColor}; - font-family: ${options.fontFamily}; - font-size: ${options.pieLegendTextSize}; - } -`; -const styles = getStyles; -const createPieArcs = (sections2) => { - const pieData = Object.entries(sections2).map((element) => { - return { - label: element[0], - value: element[1] - }; - }).sort((a, b) => { - return b.value - a.value; - }); - const pie$1 = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .pie */ .rLf)().value( - (d3Section) => d3Section.value - ); - return pie$1(pieData); -}; -const draw = (text, id, _version, diagObj) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("rendering pie chart\n" + text); - const db2 = diagObj.db; - const globalConfig = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.c)(); - const pieConfig = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.C)(db2.getConfig(), globalConfig.pie); - const MARGIN = 40; - const LEGEND_RECT_SIZE = 18; - const LEGEND_SPACING = 4; - const height = 450; - const pieWidth = height; - const svg = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.A)(id); - const group = svg.append("g"); - const sections2 = db2.getSections(); - group.attr("transform", "translate(" + pieWidth / 2 + "," + height / 2 + ")"); - const { themeVariables } = globalConfig; - let [outerStrokeWidth] = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.D)(themeVariables.pieOuterStrokeWidth); - outerStrokeWidth ?? (outerStrokeWidth = 2); - const textPosition = pieConfig.textPosition; - const radius = Math.min(pieWidth, height) / 2 - MARGIN; - const arcGenerator = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .arc */ .JLW)().innerRadius(0).outerRadius(radius); - const labelArcGenerator = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .arc */ .JLW)().innerRadius(radius * textPosition).outerRadius(radius * textPosition); - group.append("circle").attr("cx", 0).attr("cy", 0).attr("r", radius + outerStrokeWidth / 2).attr("class", "pieOuterCircle"); - const arcs = createPieArcs(sections2); - const myGeneratedColors = [ - themeVariables.pie1, - themeVariables.pie2, - themeVariables.pie3, - themeVariables.pie4, - themeVariables.pie5, - themeVariables.pie6, - themeVariables.pie7, - themeVariables.pie8, - themeVariables.pie9, - themeVariables.pie10, - themeVariables.pie11, - themeVariables.pie12 - ]; - const color = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .scaleOrdinal */ .UMr)(myGeneratedColors); - group.selectAll("mySlices").data(arcs).enter().append("path").attr("d", arcGenerator).attr("fill", (datum) => { - return color(datum.data.label); - }).attr("class", "pieCircle"); - let sum = 0; - Object.keys(sections2).forEach((key) => { - sum += sections2[key]; - }); - group.selectAll("mySlices").data(arcs).enter().append("text").text((datum) => { - return (datum.data.value / sum * 100).toFixed(0) + "%"; - }).attr("transform", (datum) => { - return "translate(" + labelArcGenerator.centroid(datum) + ")"; - }).style("text-anchor", "middle").attr("class", "slice"); - group.append("text").text(db2.getDiagramTitle()).attr("x", 0).attr("y", -(height - 50) / 2).attr("class", "pieTitleText"); - const legend = group.selectAll(".legend").data(color.domain()).enter().append("g").attr("class", "legend").attr("transform", (_datum, index) => { - const height2 = LEGEND_RECT_SIZE + LEGEND_SPACING; - const offset = height2 * color.domain().length / 2; - const horizontal = 12 * LEGEND_RECT_SIZE; - const vertical = index * height2 - offset; - return "translate(" + horizontal + "," + vertical + ")"; - }); - legend.append("rect").attr("width", LEGEND_RECT_SIZE).attr("height", LEGEND_RECT_SIZE).style("fill", color).style("stroke", color); - legend.data(arcs).append("text").attr("x", LEGEND_RECT_SIZE + LEGEND_SPACING).attr("y", LEGEND_RECT_SIZE - LEGEND_SPACING).text((datum) => { - const { label, value } = datum.data; - if (db2.getShowData()) { - return `${label} [${value}]`; - } - return label; - }); - const longestTextWidth = Math.max( - ...legend.selectAll("text").nodes().map((node) => (node == null ? void 0 : node.getBoundingClientRect().width) ?? 0) - ); - const totalWidth = pieWidth + MARGIN + LEGEND_RECT_SIZE + LEGEND_SPACING + longestTextWidth; - svg.attr("viewBox", `0 0 ${totalWidth} ${height}`); - (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.i)(svg, height, totalWidth, pieConfig.useMaxWidth); -}; -const renderer = { draw }; -const diagram = { - parser: parser$1, - db, - renderer, - styles -}; - - - -/***/ }) - -}; -; \ No newline at end of file diff --git a/assets/js/8496.2500355a.js b/assets/js/8496.2500355a.js new file mode 100644 index 000000000000..98364cfc413b --- /dev/null +++ b/assets/js/8496.2500355a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8496],{8496:(e,t,i)=>{i.d(t,{diagram:()=>Y});var n=i(45567),r=i(20007),s=i(62334),a=i(697),l=function(){var e=(0,n.K2)((function(e,t,i,n){for(i=i||{},n=e.length;n--;i[e[n]]=t);return i}),"o"),t=[1,3],i=[1,4],r=[1,5],s=[1,6],a=[5,6,8,9,11,13,31,32,33,34,35,36,44,62,63],l=[1,18],o=[2,7],h=[1,22],c=[1,23],u=[1,24],d=[1,25],y=[1,26],p=[1,27],_=[1,20],g=[1,28],E=[1,29],R=[62,63],m=[5,8,9,11,13,31,32,33,34,35,36,44,51,53,62,63],f=[1,47],I=[1,48],S=[1,49],N=[1,50],b=[1,51],k=[1,52],T=[1,53],x=[53,54],w=[1,64],A=[1,60],q=[1,61],v=[1,62],K=[1,63],$=[1,65],O=[1,69],L=[1,70],C=[1,67],M=[1,68],F=[5,8,9,11,13,31,32,33,34,35,36,44,62,63],D={trace:(0,n.K2)((function(){}),"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,requirementType:17,requirementName:18,STRUCT_START:19,requirementBody:20,ID:21,COLONSEP:22,id:23,TEXT:24,text:25,RISK:26,riskLevel:27,VERIFYMTHD:28,verifyType:29,STRUCT_STOP:30,REQUIREMENT:31,FUNCTIONAL_REQUIREMENT:32,INTERFACE_REQUIREMENT:33,PERFORMANCE_REQUIREMENT:34,PHYSICAL_REQUIREMENT:35,DESIGN_CONSTRAINT:36,LOW_RISK:37,MED_RISK:38,HIGH_RISK:39,VERIFY_ANALYSIS:40,VERIFY_DEMONSTRATION:41,VERIFY_INSPECTION:42,VERIFY_TEST:43,ELEMENT:44,elementName:45,elementBody:46,TYPE:47,type:48,DOCREF:49,ref:50,END_ARROW_L:51,relationship:52,LINE:53,END_ARROW_R:54,CONTAINS:55,COPIES:56,DERIVES:57,SATISFIES:58,VERIFIES:59,REFINES:60,TRACES:61,unqString:62,qString:63,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",19:"STRUCT_START",21:"ID",22:"COLONSEP",24:"TEXT",26:"RISK",28:"VERIFYMTHD",30:"STRUCT_STOP",31:"REQUIREMENT",32:"FUNCTIONAL_REQUIREMENT",33:"INTERFACE_REQUIREMENT",34:"PERFORMANCE_REQUIREMENT",35:"PHYSICAL_REQUIREMENT",36:"DESIGN_CONSTRAINT",37:"LOW_RISK",38:"MED_RISK",39:"HIGH_RISK",40:"VERIFY_ANALYSIS",41:"VERIFY_DEMONSTRATION",42:"VERIFY_INSPECTION",43:"VERIFY_TEST",44:"ELEMENT",47:"TYPE",49:"DOCREF",51:"END_ARROW_L",53:"LINE",54:"END_ARROW_R",55:"CONTAINS",56:"COPIES",57:"DERIVES",58:"SATISFIES",59:"VERIFIES",60:"REFINES",61:"TRACES",62:"unqString",63:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[14,5],[20,5],[20,5],[20,5],[20,5],[20,2],[20,1],[17,1],[17,1],[17,1],[17,1],[17,1],[17,1],[27,1],[27,1],[27,1],[29,1],[29,1],[29,1],[29,1],[15,5],[46,5],[46,5],[46,2],[46,1],[16,5],[16,5],[52,1],[52,1],[52,1],[52,1],[52,1],[52,1],[52,1],[18,1],[18,1],[23,1],[23,1],[25,1],[25,1],[45,1],[45,1],[48,1],[48,1],[50,1],[50,1]],performAction:(0,n.K2)((function(e,t,i,n,r,s,a){var l=s.length-1;switch(r){case 4:this.$=s[l].trim(),n.setAccTitle(this.$);break;case 5:case 6:this.$=s[l].trim(),n.setAccDescription(this.$);break;case 7:this.$=[];break;case 13:n.addRequirement(s[l-3],s[l-4]);break;case 14:n.setNewReqId(s[l-2]);break;case 15:n.setNewReqText(s[l-2]);break;case 16:n.setNewReqRisk(s[l-2]);break;case 17:n.setNewReqVerifyMethod(s[l-2]);break;case 20:this.$=n.RequirementType.REQUIREMENT;break;case 21:this.$=n.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 22:this.$=n.RequirementType.INTERFACE_REQUIREMENT;break;case 23:this.$=n.RequirementType.PERFORMANCE_REQUIREMENT;break;case 24:this.$=n.RequirementType.PHYSICAL_REQUIREMENT;break;case 25:this.$=n.RequirementType.DESIGN_CONSTRAINT;break;case 26:this.$=n.RiskLevel.LOW_RISK;break;case 27:this.$=n.RiskLevel.MED_RISK;break;case 28:this.$=n.RiskLevel.HIGH_RISK;break;case 29:this.$=n.VerifyType.VERIFY_ANALYSIS;break;case 30:this.$=n.VerifyType.VERIFY_DEMONSTRATION;break;case 31:this.$=n.VerifyType.VERIFY_INSPECTION;break;case 32:this.$=n.VerifyType.VERIFY_TEST;break;case 33:n.addElement(s[l-3]);break;case 34:n.setNewElementType(s[l-2]);break;case 35:n.setNewElementDocRef(s[l-2]);break;case 38:n.addRelationship(s[l-2],s[l],s[l-4]);break;case 39:n.addRelationship(s[l-2],s[l-4],s[l]);break;case 40:this.$=n.Relationships.CONTAINS;break;case 41:this.$=n.Relationships.COPIES;break;case 42:this.$=n.Relationships.DERIVES;break;case 43:this.$=n.Relationships.SATISFIES;break;case 44:this.$=n.Relationships.VERIFIES;break;case 45:this.$=n.Relationships.REFINES;break;case 46:this.$=n.Relationships.TRACES}}),"anonymous"),table:[{3:1,4:2,6:t,9:i,11:r,13:s},{1:[3]},{3:8,4:2,5:[1,7],6:t,9:i,11:r,13:s},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(a,[2,6]),{3:12,4:2,6:t,9:i,11:r,13:s},{1:[2,2]},{4:17,5:l,7:13,8:o,9:i,11:r,13:s,14:14,15:15,16:16,17:19,23:21,31:h,32:c,33:u,34:d,35:y,36:p,44:_,62:g,63:E},e(a,[2,4]),e(a,[2,5]),{1:[2,1]},{8:[1,30]},{4:17,5:l,7:31,8:o,9:i,11:r,13:s,14:14,15:15,16:16,17:19,23:21,31:h,32:c,33:u,34:d,35:y,36:p,44:_,62:g,63:E},{4:17,5:l,7:32,8:o,9:i,11:r,13:s,14:14,15:15,16:16,17:19,23:21,31:h,32:c,33:u,34:d,35:y,36:p,44:_,62:g,63:E},{4:17,5:l,7:33,8:o,9:i,11:r,13:s,14:14,15:15,16:16,17:19,23:21,31:h,32:c,33:u,34:d,35:y,36:p,44:_,62:g,63:E},{4:17,5:l,7:34,8:o,9:i,11:r,13:s,14:14,15:15,16:16,17:19,23:21,31:h,32:c,33:u,34:d,35:y,36:p,44:_,62:g,63:E},{4:17,5:l,7:35,8:o,9:i,11:r,13:s,14:14,15:15,16:16,17:19,23:21,31:h,32:c,33:u,34:d,35:y,36:p,44:_,62:g,63:E},{18:36,62:[1,37],63:[1,38]},{45:39,62:[1,40],63:[1,41]},{51:[1,42],53:[1,43]},e(R,[2,20]),e(R,[2,21]),e(R,[2,22]),e(R,[2,23]),e(R,[2,24]),e(R,[2,25]),e(m,[2,49]),e(m,[2,50]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{19:[1,44]},{19:[2,47]},{19:[2,48]},{19:[1,45]},{19:[2,53]},{19:[2,54]},{52:46,55:f,56:I,57:S,58:N,59:b,60:k,61:T},{52:54,55:f,56:I,57:S,58:N,59:b,60:k,61:T},{5:[1,55]},{5:[1,56]},{53:[1,57]},e(x,[2,40]),e(x,[2,41]),e(x,[2,42]),e(x,[2,43]),e(x,[2,44]),e(x,[2,45]),e(x,[2,46]),{54:[1,58]},{5:w,20:59,21:A,24:q,26:v,28:K,30:$},{5:O,30:L,46:66,47:C,49:M},{23:71,62:g,63:E},{23:72,62:g,63:E},e(F,[2,13]),{22:[1,73]},{22:[1,74]},{22:[1,75]},{22:[1,76]},{5:w,20:77,21:A,24:q,26:v,28:K,30:$},e(F,[2,19]),e(F,[2,33]),{22:[1,78]},{22:[1,79]},{5:O,30:L,46:80,47:C,49:M},e(F,[2,37]),e(F,[2,38]),e(F,[2,39]),{23:81,62:g,63:E},{25:82,62:[1,83],63:[1,84]},{27:85,37:[1,86],38:[1,87],39:[1,88]},{29:89,40:[1,90],41:[1,91],42:[1,92],43:[1,93]},e(F,[2,18]),{48:94,62:[1,95],63:[1,96]},{50:97,62:[1,98],63:[1,99]},e(F,[2,36]),{5:[1,100]},{5:[1,101]},{5:[2,51]},{5:[2,52]},{5:[1,102]},{5:[2,26]},{5:[2,27]},{5:[2,28]},{5:[1,103]},{5:[2,29]},{5:[2,30]},{5:[2,31]},{5:[2,32]},{5:[1,104]},{5:[2,55]},{5:[2,56]},{5:[1,105]},{5:[2,57]},{5:[2,58]},{5:w,20:106,21:A,24:q,26:v,28:K,30:$},{5:w,20:107,21:A,24:q,26:v,28:K,30:$},{5:w,20:108,21:A,24:q,26:v,28:K,30:$},{5:w,20:109,21:A,24:q,26:v,28:K,30:$},{5:O,30:L,46:110,47:C,49:M},{5:O,30:L,46:111,47:C,49:M},e(F,[2,14]),e(F,[2,15]),e(F,[2,16]),e(F,[2,17]),e(F,[2,34]),e(F,[2,35])],defaultActions:{8:[2,2],12:[2,1],30:[2,3],31:[2,8],32:[2,9],33:[2,10],34:[2,11],35:[2,12],37:[2,47],38:[2,48],40:[2,53],41:[2,54],83:[2,51],84:[2,52],86:[2,26],87:[2,27],88:[2,28],90:[2,29],91:[2,30],92:[2,31],93:[2,32],95:[2,55],96:[2,56],98:[2,57],99:[2,58]},parseError:(0,n.K2)((function(e,t){if(!t.recoverable){var i=new Error(e);throw i.hash=t,i}this.trace(e)}),"parseError"),parse:(0,n.K2)((function(e){var t=this,i=[0],r=[],s=[null],a=[],l=this.table,o="",h=0,c=0,u=0,d=a.slice.call(arguments,1),y=Object.create(this.lexer),p={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(p.yy[_]=this.yy[_]);y.setInput(e,p.yy),p.yy.lexer=y,p.yy.parser=this,void 0===y.yylloc&&(y.yylloc={});var g=y.yylloc;a.push(g);var E=y.options&&y.options.ranges;function R(){var e;return"number"!=typeof(e=r.pop()||y.lex()||1)&&(e instanceof Array&&(e=(r=e).pop()),e=t.symbols_[e]||e),e}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,n.K2)((function(e){i.length=i.length-2*e,s.length=s.length-e,a.length=a.length-e}),"popStack"),(0,n.K2)(R,"lex");for(var m,f,I,S,N,b,k,T,x,w={};;){if(I=i[i.length-1],this.defaultActions[I]?S=this.defaultActions[I]:(null==m&&(m=R()),S=l[I]&&l[I][m]),void 0===S||!S.length||!S[0]){var A="";for(b in x=[],l[I])this.terminals_[b]&&b>2&&x.push("'"+this.terminals_[b]+"'");A=y.showPosition?"Parse error on line "+(h+1)+":\n"+y.showPosition()+"\nExpecting "+x.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(h+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(A,{text:y.match,token:this.terminals_[m]||m,line:y.yylineno,loc:g,expected:x})}if(S[0]instanceof Array&&S.length>1)throw new Error("Parse Error: multiple actions possible at state: "+I+", token: "+m);switch(S[0]){case 1:i.push(m),s.push(y.yytext),a.push(y.yylloc),i.push(S[1]),m=null,f?(m=f,f=null):(c=y.yyleng,o=y.yytext,h=y.yylineno,g=y.yylloc,u>0&&u--);break;case 2:if(k=this.productions_[S[1]][1],w.$=s[s.length-k],w._$={first_line:a[a.length-(k||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(k||1)].first_column,last_column:a[a.length-1].last_column},E&&(w._$.range=[a[a.length-(k||1)].range[0],a[a.length-1].range[1]]),void 0!==(N=this.performAction.apply(w,[o,c,h,p.yy,S[1],s,a].concat(d))))return N;k&&(i=i.slice(0,-1*k*2),s=s.slice(0,-1*k),a=a.slice(0,-1*k)),i.push(this.productions_[S[1]][0]),s.push(w.$),a.push(w._$),T=l[i[i.length-2]][i[i.length-1]],i.push(T);break;case 3:return!0}}return!0}),"parse")},P=function(){return{EOF:1,parseError:(0,n.K2)((function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)}),"parseError"),setInput:(0,n.K2)((function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this}),"setInput"),input:(0,n.K2)((function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e}),"input"),unput:(0,n.K2)((function(e){var t=e.length,i=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),i.length-1&&(this.yylineno-=i.length-1);var r=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:i?(i.length===n.length?this.yylloc.first_column:0)+n[n.length-i.length].length-i[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this}),"unput"),more:(0,n.K2)((function(){return this._more=!0,this}),"more"),reject:(0,n.K2)((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:(0,n.K2)((function(e){this.unput(this.match.slice(e))}),"less"),pastInput:(0,n.K2)((function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:(0,n.K2)((function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:(0,n.K2)((function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"}),"showPosition"),test_match:(0,n.K2)((function(e,t){var i,n,r;if(this.options.backtrack_lexer&&(r={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(r.yylloc.range=this.yylloc.range.slice(0))),(n=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],i=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack){for(var s in r)this[s]=r[s];return!1}return!1}),"test_match"),next:(0,n.K2)((function(){if(this.done)return this.EOF;var e,t,i,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),s=0;st[0].length)){if(t=i,n=s,this.options.backtrack_lexer){if(!1!==(e=this.test_match(i,r[s])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,r[n]))&&e:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:(0,n.K2)((function(){var e=this.next();return e||this.lex()}),"lex"),begin:(0,n.K2)((function(e){this.conditionStack.push(e)}),"begin"),popState:(0,n.K2)((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:(0,n.K2)((function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules}),"_currentRules"),topState:(0,n.K2)((function(e){return(e=this.conditionStack.length-1-Math.abs(e||0))>=0?this.conditionStack[e]:"INITIAL"}),"topState"),pushState:(0,n.K2)((function(e){this.begin(e)}),"pushState"),stateStackSize:(0,n.K2)((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,n.K2)((function(e,t,i,n){switch(i){case 0:return"title";case 1:return this.begin("acc_title"),9;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),11;case 4:return this.popState(),"acc_descr_value";case 5:this.begin("acc_descr_multiline");break;case 6:case 48:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:return 5;case 9:case 10:case 11:break;case 12:return 8;case 13:return 6;case 14:return 19;case 15:return 30;case 16:return 22;case 17:return 21;case 18:return 24;case 19:return 26;case 20:return 28;case 21:return 31;case 22:return 32;case 23:return 33;case 24:return 34;case 25:return 35;case 26:return 36;case 27:return 37;case 28:return 38;case 29:return 39;case 30:return 40;case 31:return 41;case 32:return 42;case 33:return 43;case 34:return 44;case 35:return 55;case 36:return 56;case 37:return 57;case 38:return 58;case 39:return 59;case 40:return 60;case 41:return 61;case 42:return 47;case 43:return 49;case 44:return 51;case 45:return 54;case 46:return 53;case 47:this.begin("string");break;case 49:return"qString";case 50:return t.yytext=t.yytext.trim(),62}}),"anonymous"),rules:[/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^\r\n\{\<\>\-\=]*)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},unqString:{rules:[],inclusive:!1},token:{rules:[],inclusive:!1},string:{rules:[48,49],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,50],inclusive:!0}}}}();function V(){this.yy={}}return D.lexer=P,(0,n.K2)(V,"Parser"),V.prototype=D,D.Parser=V,new V}();l.parser=l;var o=l,h=[],c={},u=new Map,d={},y=new Map,p=(0,n.K2)(((e,t)=>(u.has(e)||u.set(e,{name:e,type:t,id:c.id,text:c.text,risk:c.risk,verifyMethod:c.verifyMethod}),c={},u.get(e))),"addRequirement"),_=(0,n.K2)((()=>u),"getRequirements"),g=(0,n.K2)((e=>{void 0!==c&&(c.id=e)}),"setNewReqId"),E=(0,n.K2)((e=>{void 0!==c&&(c.text=e)}),"setNewReqText"),R=(0,n.K2)((e=>{void 0!==c&&(c.risk=e)}),"setNewReqRisk"),m=(0,n.K2)((e=>{void 0!==c&&(c.verifyMethod=e)}),"setNewReqVerifyMethod"),f=(0,n.K2)((e=>(y.has(e)||(y.set(e,{name:e,type:d.type,docRef:d.docRef}),n.Rm.info("Added new requirement: ",e)),d={},y.get(e))),"addElement"),I=(0,n.K2)((()=>y),"getElements"),S=(0,n.K2)((e=>{void 0!==d&&(d.type=e)}),"setNewElementType"),N=(0,n.K2)((e=>{void 0!==d&&(d.docRef=e)}),"setNewElementDocRef"),b=(0,n.K2)(((e,t,i)=>{h.push({type:e,src:t,dst:i})}),"addRelationship"),k=(0,n.K2)((()=>h),"getRelationships"),T=(0,n.K2)((()=>{h=[],c={},u=new Map,d={},y=new Map,(0,n.IU)()}),"clear"),x={RequirementType:{REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},RiskLevel:{LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},VerifyType:{VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},Relationships:{CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},getConfig:(0,n.K2)((()=>(0,n.D7)().req),"getConfig"),addRequirement:p,getRequirements:_,setNewReqId:g,setNewReqText:E,setNewReqRisk:R,setNewReqVerifyMethod:m,setAccTitle:n.SV,getAccTitle:n.iN,setAccDescription:n.EI,getAccDescription:n.m7,addElement:f,getElements:I,setNewElementType:S,setNewElementDocRef:N,addRelationship:b,getRelationships:k,clear:T},w=(0,n.K2)((e=>`\n\n marker {\n fill: ${e.relationColor};\n stroke: ${e.relationColor};\n }\n\n marker.cross {\n stroke: ${e.lineColor};\n }\n\n svg {\n font-family: ${e.fontFamily};\n font-size: ${e.fontSize};\n }\n\n .reqBox {\n fill: ${e.requirementBackground};\n fill-opacity: 1.0;\n stroke: ${e.requirementBorderColor};\n stroke-width: ${e.requirementBorderSize};\n }\n \n .reqTitle, .reqLabel{\n fill: ${e.requirementTextColor};\n }\n .reqLabelBox {\n fill: ${e.relationLabelBackground};\n fill-opacity: 1.0;\n }\n\n .req-title-line {\n stroke: ${e.requirementBorderColor};\n stroke-width: ${e.requirementBorderSize};\n }\n .relationshipLine {\n stroke: ${e.relationColor};\n stroke-width: 1;\n }\n .relationshipLabel {\n fill: ${e.relationLabelColor};\n }\n\n`),"getStyles"),A={CONTAINS:"contains",ARROW:"arrow"},q={ReqMarkers:A,insertLineEndings:(0,n.K2)(((e,t)=>{let i=e.append("defs").append("marker").attr("id",A.CONTAINS+"_line_ending").attr("refX",0).attr("refY",t.line_height/2).attr("markerWidth",t.line_height).attr("markerHeight",t.line_height).attr("orient","auto").append("g");i.append("circle").attr("cx",t.line_height/2).attr("cy",t.line_height/2).attr("r",t.line_height/2).attr("fill","none"),i.append("line").attr("x1",0).attr("x2",t.line_height).attr("y1",t.line_height/2).attr("y2",t.line_height/2).attr("stroke-width",1),i.append("line").attr("y1",0).attr("y2",t.line_height).attr("x1",t.line_height/2).attr("x2",t.line_height/2).attr("stroke-width",1),e.append("defs").append("marker").attr("id",A.ARROW+"_line_ending").attr("refX",t.line_height).attr("refY",.5*t.line_height).attr("markerWidth",t.line_height).attr("markerHeight",t.line_height).attr("orient","auto").append("path").attr("d",`M0,0\n L${t.line_height},${t.line_height/2}\n M${t.line_height},${t.line_height/2}\n L0,${t.line_height}`).attr("stroke-width",1)}),"insertLineEndings")},v={},K=0,$=(0,n.K2)(((e,t)=>e.insert("rect","#"+t).attr("class","req reqBox").attr("x",0).attr("y",0).attr("width",v.rect_min_width+"px").attr("height",v.rect_min_height+"px")),"newRectNode"),O=(0,n.K2)(((e,t,i)=>{let n=v.rect_min_width/2,r=e.append("text").attr("class","req reqLabel reqTitle").attr("id",t).attr("x",n).attr("y",v.rect_padding).attr("dominant-baseline","hanging"),s=0;i.forEach((e=>{0==s?r.append("tspan").attr("text-anchor","middle").attr("x",v.rect_min_width/2).attr("dy",0).text(e):r.append("tspan").attr("text-anchor","middle").attr("x",v.rect_min_width/2).attr("dy",.75*v.line_height).text(e),s++}));let a=1.5*v.rect_padding+s*v.line_height*.75;return e.append("line").attr("class","req-title-line").attr("x1","0").attr("x2",v.rect_min_width).attr("y1",a).attr("y2",a),{titleNode:r,y:a}}),"newTitleNode"),L=(0,n.K2)(((e,t,i,n)=>{let r=e.append("text").attr("class","req reqLabel").attr("id",t).attr("x",v.rect_padding).attr("y",n).attr("dominant-baseline","hanging"),s=0;let a=[];return i.forEach((e=>{let t=e.length;for(;t>30&&s<3;){let i=e.substring(0,30);t=(e=e.substring(30,e.length)).length,a[a.length]=i,s++}if(3==s){let e=a[a.length-1];a[a.length-1]=e.substring(0,e.length-4)+"..."}else a[a.length]=e;s=0})),a.forEach((e=>{r.append("tspan").attr("x",v.rect_padding).attr("dy",v.line_height).text(e)})),r}),"newBodyNode"),C=(0,n.K2)(((e,t,i,n)=>{const r=t.node().getTotalLength(),s=t.node().getPointAtLength(.5*r),a="rel"+K;K++;const l=e.append("text").attr("class","req relationshipLabel").attr("id",a).attr("x",s.x).attr("y",s.y).attr("text-anchor","middle").attr("dominant-baseline","middle").text(n).node().getBBox();e.insert("rect","#"+a).attr("class","req reqLabelBox").attr("x",s.x-l.width/2).attr("y",s.y-l.height/2).attr("width",l.width).attr("height",l.height).attr("fill","white").attr("fill-opacity","85%")}),"addEdgeLabel"),M=(0,n.K2)((function(e,t,i,s,a){const l=i.edge(U(t.src),U(t.dst)),o=(0,r.n8j)().x((function(e){return e.x})).y((function(e){return e.y})),h=e.insert("path","#"+s).attr("class","er relationshipLine").attr("d",o(l.points)).attr("fill","none");t.type==a.db.Relationships.CONTAINS?h.attr("marker-start","url("+n.Y2.getUrl(v.arrowMarkerAbsolute)+"#"+t.type+"_line_ending)"):(h.attr("stroke-dasharray","10,7"),h.attr("marker-end","url("+n.Y2.getUrl(v.arrowMarkerAbsolute)+"#"+q.ReqMarkers.ARROW+"_line_ending)")),C(e,h,v,`<<${t.type}>>`)}),"drawRelationshipFromLayout"),F=(0,n.K2)(((e,t,i)=>{e.forEach(((e,r)=>{r=U(r),n.Rm.info("Added new requirement: ",r);const s=i.append("g").attr("id",r),a=$(s,"req-"+r);let l=[],o=O(s,r+"_title",[`<<${e.type}>>`,`${e.name}`]);l.push(o.titleNode);let h=L(s,r+"_body",[`Id: ${e.id}`,`Text: ${e.text}`,`Risk: ${e.risk}`,`Verification: ${e.verifyMethod}`],o.y);l.push(h);const c=a.node().getBBox();t.setNode(r,{width:c.width,height:c.height,shape:"rect",id:r})}))}),"drawReqs"),D=(0,n.K2)(((e,t,i)=>{e.forEach(((e,n)=>{const r=U(n),s=i.append("g").attr("id",r),a="element-"+r,l=$(s,a);let o=[],h=O(s,a+"_title",["<>",`${n}`]);o.push(h.titleNode);let c=L(s,a+"_body",[`Type: ${e.type||"Not Specified"}`,`Doc Ref: ${e.docRef||"None"}`],h.y);o.push(c);const u=l.node().getBBox();t.setNode(r,{width:u.width,height:u.height,shape:"rect",id:r})}))}),"drawElements"),P=(0,n.K2)(((e,t)=>(e.forEach((function(e){let i=U(e.src),n=U(e.dst);t.setEdge(i,n,{relationship:e})})),e)),"addRelationships"),V=(0,n.K2)((function(e,t){t.nodes().forEach((function(i){void 0!==i&&void 0!==t.node(i)&&(e.select("#"+i),e.select("#"+i).attr("transform","translate("+(t.node(i).x-t.node(i).width/2)+","+(t.node(i).y-t.node(i).height/2)+" )"))}))}),"adjustEntities"),U=(0,n.K2)((e=>e.replace(/\s/g,"").replace(/\./g,"_")),"elementString"),Y={parser:o,db:x,renderer:{draw:(0,n.K2)(((e,t,i,l)=>{const o=(v=(0,n.D7)().requirement).securityLevel;let h;"sandbox"===o&&(h=(0,r.Ltv)("#i"+t));const c=("sandbox"===o?(0,r.Ltv)(h.nodes()[0].contentDocument.body):(0,r.Ltv)("body")).select(`[id='${t}']`);q.insertLineEndings(c,v);const u=new a.T({multigraph:!1,compound:!1,directed:!0}).setGraph({rankdir:v.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel((function(){return{}}));let d=l.db.getRequirements(),y=l.db.getElements(),p=l.db.getRelationships();F(d,u,c),D(y,u,c),P(p,u),(0,s.Zp)(u),V(c,u),p.forEach((function(e){M(c,e,u,t,l)}));const _=v.rect_padding,g=c.node().getBBox(),E=g.width+2*_,R=g.height+2*_;(0,n.a$)(c,R,E,v.useMaxWidth),c.attr("viewBox",`${g.x-_} ${g.y-_} ${E} ${R}`)}),"draw")},styles:w}}}]); \ No newline at end of file diff --git a/assets/js/84ede15a.3947595e.js b/assets/js/84ede15a.3947595e.js deleted file mode 100644 index 3cf88568f364..000000000000 --- a/assets/js/84ede15a.3947595e.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6124],{88779:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>r,default:()=>u,frontMatter:()=>i,metadata:()=>l,toc:()=>d});var s=n(74848),a=n(28453),o=(n(11470),n(19365),n(67141));const i={id:"learn-guides-transfers",title:"Polkadot-JS Guides about Transfers",sidebar_label:"Transfer Guides",description:"Polkadot-JS Guides about Balances Transfers.",keywords:["gides","advanced","polkadot-js","transfers"],slug:"../learn-guides-transfers"},r=void 0,l={id:"learn/learn-guides-transfers",title:"Polkadot-JS Guides about Transfers",description:"Polkadot-JS Guides about Balances Transfers.",source:"@site/../docs/learn/learn-guides-transfers.md",sourceDirName:"learn",slug:"/learn-guides-transfers",permalink:"/docs/learn-guides-transfers",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-transfers.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1729847256e3,frontMatter:{id:"learn-guides-transfers",title:"Polkadot-JS Guides about Transfers",sidebar_label:"Transfer Guides",description:"Polkadot-JS Guides about Balances Transfers.",keywords:["gides","advanced","polkadot-js","transfers"],slug:"../learn-guides-transfers"},sidebar:"docs",previous:{title:"Pure Proxy Guides",permalink:"/docs/learn-guides-accounts-proxy-pure"},next:{title:"Staking Guides",permalink:"/docs/learn-guides-staking"}},c={},d=[{value:"Metadata Updates with the Polkadot-JS Browser Extension",id:"metadata-updates-with-the-polkadot-js-browser-extension",level:2},{value:"Transfers using the Polkadot-JS UI and Browser Extension",id:"transfers-using-the-polkadot-js-ui-and-browser-extension",level:2},{value:"Verify Extrinsics with the Polkadot-JS Browser Extension",id:"verify-extrinsics-with-the-polkadot-js-browser-extension",level:3},{value:"Verify Extrinsics with the Polkadot-JS UI",id:"verify-extrinsics-with-the-polkadot-js-ui",level:3},{value:"Keep-Alive Checks with the Polkadot-JS UI",id:"keep-alive-checks-with-the-polkadot-js-ui",level:3},{value:"Vested Transfers with the Polkadot-JS UI",id:"vested-transfers-with-the-polkadot-js-ui",level:3},{value:"Lazy Vesting",id:"lazy-vesting",level:4},{value:"Calculating When Vesting DOT Will Be Available",id:"calculating-when-vesting-dot-will-be-available",level:4},{value:"Batch Transfers with the Polkadot-JS UI",id:"batch-transfers-with-the-polkadot-js-ui",level:3},{value:"Teleporting Tokens using the Polkadot-JS UI",id:"teleporting-tokens-using-the-polkadot-js-ui",level:3},{value:"Calculating Fees with Polkadot-JS",id:"calculating-fees-with-polkadot-js",level:2},{value:"Existing Reference Error",id:"existing-reference-error",level:2},{value:"Bonded Tokens",id:"bonded-tokens",level:3},{value:"Checking for Locks",id:"checking-for-locks",level:3},{value:"Purging Session Keys",id:"purging-session-keys",level:3},{value:"Existing Recovery Info",id:"existing-recovery-info",level:3},{value:"Existing Non-Native Assets",id:"existing-non-native-assets",level:3}];function h(e){const t={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",h4:"h4",img:"img",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,a.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(o.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the Polkadot-JS UI, you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,s.jsx)(t.h2,{id:"metadata-updates-with-the-polkadot-js-browser-extension",children:"Metadata Updates with the Polkadot-JS Browser Extension"}),"\n",(0,s.jsxs)(t.p,{children:["Before signing extrinsics with the Polkadot-JS Browser Extension, always check for metadata updates.\n",(0,s.jsx)(t.a,{href:"https://youtu.be/gbvrHzr4EDY?t=84",children:(0,s.jsx)(t.strong,{children:"This video tutorial"})})," will explain how to do it."]}),"\n",(0,s.jsx)(t.admonition,{title:"Polkadot Vault vs Polkadot-JS Browser Extension",type:"info",children:(0,s.jsx)(t.p,{children:"The Polkadot Vault app updates the full metadata through the QR fountain while the extension updates\nthe metadata index (the metadata is not loaded into it). As a consequence the process of updating\nmetadata is different in this two cases (you will notice that on the Vault app the update takes\nlonger for example). Having outdated metadata on the Vault app will prevent you from signing, while\non the extension you will be able to click the sign button but the extrinsic will likely fail\n(similarly of having an outdated Ledger app). In general, failing to update metadata will most\nlikely result in you not being able to sign extrinsics."})}),"\n",(0,s.jsx)(t.h2,{id:"transfers-using-the-polkadot-js-ui-and-browser-extension",children:"Transfers using the Polkadot-JS UI and Browser Extension"}),"\n",(0,s.jsxs)(t.p,{children:["See ",(0,s.jsx)(t.a,{href:"https://www.youtube.com/watch?v=gbvrHzr4EDY",children:"this video tutorial"})," to learn how to send funds\nusing the Polkadot-JS UI and Browser Extension. See also the Polkadot Support pages for detailed\ninformation about signing transactions using\n",(0,s.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181993-how-to-sign-a-transaction-directly-on-polkadot-js-ui",children:"the Polkadot-JS UI"}),"\nand\n",(0,s.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181989",children:"the Polkadot-JS browser extension"}),"."]}),"\n",(0,s.jsx)(t.h3,{id:"verify-extrinsics-with-the-polkadot-js-browser-extension",children:"Verify Extrinsics with the Polkadot-JS Browser Extension"}),"\n",(0,s.jsxs)(t.p,{children:["Visit the\n",(0,s.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000179161-how-can-i-verify-what-extrinsic-i-m-signing-#Verify-an-extrinsic-in-the-Polkadot-extension",children:(0,s.jsx)(t.strong,{children:"dedicated support page"})}),"\nand see ",(0,s.jsx)(t.a,{href:"https://youtu.be/bxMs-9fBtFk?t=261",children:(0,s.jsx)(t.strong,{children:"this video tutorial"})})," tutorial to learn about how to\nverify extrinsics before signing them. The video will also mention potential attacks that can happen\nto you while signing for transactions."]}),"\n",(0,s.jsx)(t.h3,{id:"verify-extrinsics-with-the-polkadot-js-ui",children:"Verify Extrinsics with the Polkadot-JS UI"}),"\n",(0,s.jsxs)(t.p,{children:["Visit the\n",(0,s.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000179161-how-can-i-verify-what-extrinsic-i-m-signing-#Verify-an-extrinsic-in-the-Polkadot-JS-UI",children:(0,s.jsx)(t.strong,{children:"dedicated support page"})}),"\nand see ",(0,s.jsx)(t.a,{href:"https://youtu.be/bxMs-9fBtFk?t=163",children:(0,s.jsx)(t.strong,{children:"this video tutorial"})})," tutorial to learn about how to\nverify extrinsics before signing them. The video will also mention potential attacks that can happen\nto you while signing for transactions."]}),"\n",(0,s.jsx)(t.h3,{id:"keep-alive-checks-with-the-polkadot-js-ui",children:"Keep-Alive Checks with the Polkadot-JS UI"}),"\n",(0,s.jsx)(t.admonition,{type:"info",children:(0,s.jsxs)(t.p,{children:["See ",(0,s.jsx)(t.a,{href:"https://youtu.be/mgPHVztHJWk",children:(0,s.jsx)(t.strong,{children:"this video tutorial"})})," and\n",(0,s.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000168651-what-is-the-existential-deposit-",children:(0,s.jsx)(t.strong,{children:"this support page"})}),"\nto learn about keep-alive checks and existential deposit."]})}),"\n",(0,s.jsx)(t.p,{children:"In Polkadot there are two main ways to transfer funds from one account to another:"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"transfer keep-alive"})," (default option) will not allow you to send an amount that would allow the\nsending account to be removed due to it going below the\n",(0,s.jsx)(t.a,{href:"/docs/chain-state-values#existential-deposit",children:"existential deposit"}),"."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"transfer allow-death"})," will allow you to send tokens regardless of the consequence. If the balance\ndrops below the existential deposit your account will be reaped. It may be that you do not want to\nkeep the account alive (for example, because you are moving all of your funds to a different\naddress). To switch the keep-alive check off visit\n",(0,s.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000169248",children:"this support article"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(t.admonition,{type:"info",children:[(0,s.jsxs)(t.p,{children:["Attempting to send less than the\n",(0,s.jsx)(t.a,{href:"/docs/chain-state-values#existential-deposit",children:"existential deposit"})," to an account with zero\nbalance will always fail, no matter if the keep-alive check is on or not."]}),(0,s.jsx)(t.p,{children:"Even if the transfer fails due to a keep-alive check, the transaction fee will be deducted from the\nsending account if you attempt to transfer."})]}),"\n",(0,s.jsx)(t.h3,{id:"vested-transfers-with-the-polkadot-js-ui",children:"Vested Transfers with the Polkadot-JS UI"}),"\n",(0,s.jsxs)(t.p,{children:["You can watch ",(0,s.jsx)(t.a,{href:"https://youtu.be/JVlwTQBwNGc",children:(0,s.jsx)(t.strong,{children:"this video tutorial"})})," to understand how to do vested\ntransfers using the Polkadot-JS UI, including linear and cliff vesting. Note the tutorial uses the\nWestend Testnet, but the same applies to Polkadot and Kusama."]}),"\n",(0,s.jsx)(t.p,{children:"There are two ways that vesting schedules can be created."}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:["One way is through an extrinsic type available in the Vesting pallet, ",(0,s.jsx)(t.code,{children:"vested_transfer"}),". The\nvested transfer function allows anyone to create a vesting schedule with a transfer of funds, as\nlong as the account for which the vesting schedule will be created does not already have one and\nthe transfer moves at least ",(0,s.jsx)(t.code,{children:"MinVestedTransfer"})," funds, which is specified as a chain constant."]}),"\n",(0,s.jsx)(t.li,{children:"A second way is as part of the genesis configuration of the chain. In the case of Polkadot, the\nchain specification genesis script reads the state of the Claims contract that exists on the\nEthereum blockchain and creates vesting schedules in genesis for all the allocations registered as\nbeing vested."}),"\n"]}),"\n",(0,s.jsx)(t.p,{children:"Vesting schedules have three parameters:"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.strong,{children:"locked"}),", the amount of tokens to be transferred in\n",(0,s.jsx)(t.a,{href:"../learn/learn-DOT#the-planck-unit",children:"Planck units"}),")"]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.strong,{children:"per block"}),", the number of tokens that are released per block"]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.strong,{children:"starting block"}),", the block number after which the vesting schedule starts"]}),"\n"]}),"\n",(0,s.jsx)(t.p,{children:"The configuration of these three fields dictates the amount of funds that are originally locked, the\nslope of the unlock line and the block number for when the unlocking begins."}),"\n",(0,s.jsx)(t.h4,{id:"lazy-vesting",children:"Lazy Vesting"}),"\n",(0,s.jsxs)(t.p,{children:["Like ",(0,s.jsx)(t.a,{href:"/docs/learn-staking-advanced",children:"simple payouts"}),", vesting is ",(0,s.jsx)(t.em,{children:"lazy"}),", which means that someone must\nexplicitly call an extrinsic to update the lock that is placed on an account."]}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:["The ",(0,s.jsx)(t.code,{children:"vest"})," extrinsic will update the lock that is placed on the caller."]}),"\n",(0,s.jsxs)(t.li,{children:["The ",(0,s.jsx)(t.code,{children:"vest_other"}),' will update the lock that is placed on another "target" account\'s funds.']}),"\n"]}),"\n",(0,s.jsx)(t.p,{children:"These extrinsics are exposed from the Vesting pallet."}),"\n",(0,s.jsxs)(t.p,{children:["If you are using ",(0,s.jsx)(t.a,{href:"/docs/learn-polkadotjs",children:"the Polkadot-JS UI"}),", when there are tokens available to\nvest for an account, you can unlock tokens that have already been vested from the\n",(0,s.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/accounts",children:"Accounts"})," page."]}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{alt:"unbond",src:n(52697).A+"",width:"241",height:"301"})}),"\n",(0,s.jsx)(t.h4,{id:"calculating-when-vesting-dot-will-be-available",children:"Calculating When Vesting DOT Will Be Available"}),"\n",(0,s.jsxs)(t.p,{children:["Generally, you should be able to see from the ",(0,s.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/accounts",children:"Accounts"}),' by\nlooking at your accounts and seeing when the vesting will finish. However, some DOT vest with\n"cliffs" - a single block where all the DOT are released, instead of vesting over time. In this\ncase, you will have to query the chain state directly to see when they will be available (since\ntechnically, the vesting has not yet started - all of the vesting will occur in a single block in\nthe future).']}),"\n",(0,s.jsxs)(t.ol,{children:["\n",(0,s.jsxs)(t.li,{children:["Navigate to the\n",(0,s.jsx)(t.a,{href:"https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc.polkadot.io#/chainstate",children:"Chain State"})," page on\nPolkadot-JS."]}),"\n",(0,s.jsxs)(t.li,{children:["Query chain state for ",(0,s.jsx)(t.code,{children:"vesting.vesting(ACCOUNT_ID)"})]}),"\n",(0,s.jsxs)(t.li,{children:["Note the ",(0,s.jsx)(t.code,{children:"startingBlock"})," where the unlock starts, and how much DOT is unlocked per block\n(",(0,s.jsx)(t.code,{children:"perBlock"}),")."]}),"\n",(0,s.jsxs)(t.li,{children:['You will have to calculate the result into \u201chuman time". To do this, remember that there are\napproximately 14\u2019400 blocks per day, and you can see what the latest block is shown on the\n',(0,s.jsx)(t.a,{href:"https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc.polkadot.io#/explorer",children:"Explorer"})," page."]}),"\n"]}),"\n",(0,s.jsx)(t.h3,{id:"batch-transfers-with-the-polkadot-js-ui",children:"Batch Transfers with the Polkadot-JS UI"}),"\n",(0,s.jsx)(t.p,{children:"Batch transfers are balances transfers to multiple accounts executed by one account. In order to\nconstruct a batch transfer you need to:"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:["Create a ",(0,s.jsx)(t.code,{children:"utility.batch(calls)"})," extrinsic using the\n",(0,s.jsx)(t.a,{href:"https://paritytech.github.io/substrate/master/pallet_utility/index.html",children:"utility pallet"}),", and"]}),"\n",(0,s.jsxs)(t.li,{children:["Within the batch call you can create multiple ",(0,s.jsx)(t.code,{children:"balances.transferKeepAlive"})," extrinsics using the\n",(0,s.jsx)(t.a,{href:"https://paritytech.github.io/substrate/master/pallet_balances/index.html",children:"balances pallet"}),". You\ncan specify as many receivers as you desire."]}),"\n"]}),"\n",(0,s.jsx)(t.admonition,{type:"info",children:(0,s.jsxs)(t.p,{children:["You can watch ",(0,s.jsx)(t.a,{href:"https://youtu.be/uoUC2K8muvw",children:(0,s.jsx)(t.strong,{children:"this video tutorial"})})," to learn how to do batch\ntransfers. Note the tutorial uses the Westend Testnet, but the same applies to both Polkadot and\nKusama."]})}),"\n",(0,s.jsx)(t.h3,{id:"teleporting-tokens-using-the-polkadot-js-ui",children:"Teleporting Tokens using the Polkadot-JS UI"}),"\n",(0,s.jsxs)(t.p,{children:["See ",(0,s.jsx)(t.a,{href:"https://youtu.be/3tE9ouub5Tg",children:"this video tutorial"})," and\n",(0,s.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181119-how-to-teleport-dot-or-ksm-between-statemint-or-statemine",children:"this additional support article"}),"\nto learn more about how to teleport tokens."]}),"\n",(0,s.jsx)(t.admonition,{type:"info",children:(0,s.jsx)(t.p,{children:'If you do not see "Accounts > Teleport" in the Polkadot-JS UI, the source chain that you have\nselected does not support teleportation yet.'})}),"\n",(0,s.jsx)(t.h2,{id:"calculating-fees-with-polkadot-js",children:"Calculating Fees with Polkadot-JS"}),"\n",(0,s.jsx)(t.p,{children:"To calculate fees you can go to Developer > Runtime Calls and select the following extrinsics:"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.code,{children:"transactionPaymentApi.queryInfo"})}),"\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.code,{children:"transactionPaymentApi.queryFeeDetails"})}),"\n"]}),"\n",(0,s.jsxs)(t.p,{children:["and specify the ",(0,s.jsx)(t.code,{children:"0x"})," prefixed hex call data and its length."]}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{alt:"Fee details",src:n(76379).A+"",width:"1161",height:"668"})}),"\n",(0,s.jsxs)(t.p,{children:["The sum of ",(0,s.jsx)(t.code,{children:"baseFee"}),", ",(0,s.jsx)(t.code,{children:"lenFee"})," and ",(0,s.jsx)(t.code,{children:"adjustedWeightFee"})," will yield the ",(0,s.jsx)(t.code,{children:"partialFee"}),"."]}),"\n",(0,s.jsxs)(t.p,{children:["One useful utility for estimating transaction fees programmatically is the via the\n",(0,s.jsx)(t.a,{href:"https://www.npmjs.com/package/@polkadot/api",children:"@polkadot/api"}),". Check out the following script that\nlogs some relevant fee information:"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-js",children:"// Estimate the fees as RuntimeDispatchInfo using the signer\nconst info = await api.tx.balances.transfer(recipient, 123).paymentInfo(sender);\n\n// Log relevant info, partialFee is Balance, estimated for current\nconsole.log(`\n class=${info.class.toString()},\n weight=${info.weight.toString()},\n partialFee=${info.partialFee.toHuman()}\n`);\n"})}),"\n",(0,s.jsxs)(t.p,{children:["For additional information on interacting with the API, checkout\n",(0,s.jsx)(t.a,{href:"/docs/polkadotjs",children:"Polkadot-JS"}),"."]}),"\n",(0,s.jsx)(t.h2,{id:"existing-reference-error",children:"Existing Reference Error"}),"\n",(0,s.jsxs)(t.p,{children:["If you are trying to reap an account and you receive an error similar to\n",(0,s.jsx)(t.code,{children:'"There is an existing reference count on the sender account. As such the account cannot be reaped from the state"'}),",\nthen you have existing references to this account that must be first removed before it can be\nreaped. References may still exist from:"]}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:"Bonded tokens (most likely)"}),"\n",(0,s.jsx)(t.li,{children:"Unpurged session keys (if you were previously a validator)"}),"\n",(0,s.jsx)(t.li,{children:"Token locks"}),"\n",(0,s.jsx)(t.li,{children:"Existing recovery info"}),"\n",(0,s.jsx)(t.li,{children:"Existing assets"}),"\n"]}),"\n",(0,s.jsx)(t.h3,{id:"bonded-tokens",children:"Bonded Tokens"}),"\n",(0,s.jsxs)(t.p,{children:["If you have tokens that are bonded, you will need to unbond them before you can reap your account.\nFollow the instructions at ",(0,s.jsx)(t.a,{href:"/docs/learn-guides-nominator#bond-your-tokens",children:"Unbonding and Rebonding"}),"\nto check if you have bonded tokens, stop nominating (if necessary) and unbond your tokens."]}),"\n",(0,s.jsx)(t.h3,{id:"checking-for-locks",children:"Checking for Locks"}),"\n",(0,s.jsx)(t.admonition,{type:"info",children:(0,s.jsxs)(t.p,{children:["See ",(0,s.jsx)(t.a,{href:"https://youtu.be/LHgY7ds_bZ0",children:"this video tutorial"})," and\n",(0,s.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000169437-why-can-t-i-transfer-tokens-",children:"this support page"}),"\nto learn how to check for locks and remove them."]})}),"\n",(0,s.jsxs)(t.p,{children:["You can also check for locks by querying ",(0,s.jsx)(t.code,{children:"system.account(AccountId)"})," in\n",(0,s.jsxs)(t.a,{href:"https://polkadot.js.org/apps/#/chainstate",children:[(0,s.jsx)(t.code,{children:"Chain state"})," tab under the ",(0,s.jsx)(t.code,{children:"Developer"})," drop-down menu in the Polkadot-JS UI"]}),'.\nSelect your account, then click the "+" button next to the dropdowns, and check the relative ',(0,s.jsx)(t.code,{children:"data"}),"\nJSON object. If you see a non-zero value for anything other than ",(0,s.jsx)(t.code,{children:"free"}),", you have locks on your\naccount that need to get resolved."]}),"\n",(0,s.jsx)(t.h3,{id:"purging-session-keys",children:"Purging Session Keys"}),"\n",(0,s.jsxs)(t.p,{children:["If you used this account to set up a validator and you did not purge your keys before unbonding your\ntokens, you need to purge your keys. You can do this by seeing the\n",(0,s.jsx)(t.a,{href:"/docs/maintain-guides-how-to-stop-validating",children:"How to Stop Validating"})," page. This can also\nbe checked by checking ",(0,s.jsx)(t.code,{children:"session.nextKeys"})," in the chain state for an existing key."]}),"\n",(0,s.jsx)(t.h3,{id:"existing-recovery-info",children:"Existing Recovery Info"}),"\n",(0,s.jsxs)(t.p,{children:["Currently, Polkadot does not use the\n",(0,s.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/recovery/",children:"Recovery Pallet"}),",\nso this is probably not the reason for your tokens having existing references."]}),"\n",(0,s.jsxs)(t.p,{children:["On Kusama, you can check if recovery has been set up by checking the\n",(0,s.jsx)(t.code,{children:"recovery.recoverable(AccountId)"})," chain state. This can be found under ",(0,s.jsx)(t.code,{children:"Developer > Chain state"})," in\n",(0,s.jsx)(t.a,{href:"https://polkadot.js.org/apps/",children:"PolkadotJS Apps"}),"."]}),"\n",(0,s.jsx)(t.h3,{id:"existing-non-native-assets",children:"Existing Non-Native Assets"}),"\n",(0,s.jsxs)(t.p,{children:["Currently, Polkadot does not use the\n",(0,s.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/substrate/frame/assets",children:"Assets Pallet"}),", so\nthis is probably not the reason for your tokens having existing references."]})]})}function u(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}},67141:(e,t,n)=>{n.d(t,{A:()=>o});var s=n(96540),a=n(74848);const o=function(e){var t,n=e.message,o=(0,s.useState)(!0),i=o[0],r=o[1];return(0,a.jsx)(a.Fragment,{children:i&&(0,a.jsxs)("div",{className:"message-box",children:[(0,a.jsx)("button",{className:"close-button",onClick:function(){r(!1)},children:"\u2716 "}),(0,a.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(t=n,t.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},19365:(e,t,n)=>{n.d(t,{A:()=>i});n(96540);var s=n(34164);const a={tabItem:"tabItem_Ymn6"};var o=n(74848);function i(e){var t=e.children,n=e.hidden,i=e.className;return(0,o.jsx)("div",{role:"tabpanel",className:(0,s.A)(a.tabItem,i),hidden:n,children:t})}},11470:(e,t,n)=>{n.d(t,{A:()=>y});var s=n(96540),a=n(34164),o=n(23104),i=n(56347),r=n(205),l=n(57485),c=n(31682),d=n(75376);function h(e){var t,n;return null!=(t=null==(n=s.Children.toArray(e).filter((function(e){return"\n"!==e})).map((function(e){if(!e||(0,s.isValidElement)(e)&&((t=e.props)&&"object"==typeof t&&"value"in t))return e;var t;throw new Error("Docusaurus error: Bad child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:n.filter(Boolean))?t:[]}function u(e){var t=e.values,n=e.children;return(0,s.useMemo)((function(){var e=null!=t?t:function(e){return h(e).map((function(e){var t=e.props;return{value:t.value,label:t.label,attributes:t.attributes,default:t.default}}))}(n);return function(e){var t=(0,c.XI)(e,(function(e,t){return e.value===t.value}));if(t.length>0)throw new Error('Docusaurus error: Duplicate values "'+t.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[t,n])}function p(e){var t=e.value;return e.tabValues.some((function(e){return e.value===t}))}function f(e){var t=e.queryString,n=void 0!==t&&t,a=e.groupId,o=(0,i.W6)(),r=function(e){var t=e.queryString,n=void 0!==t&&t,s=e.groupId;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!s)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=s?s:null}({queryString:n,groupId:a});return[(0,l.aZ)(r),(0,s.useCallback)((function(e){if(r){var t=new URLSearchParams(o.location.search);t.set(r,e),o.replace(Object.assign({},o.location,{search:t.toString()}))}}),[r,o])]}function x(e){var t,n,a,o,i=e.defaultValue,l=e.queryString,c=void 0!==l&&l,h=e.groupId,x=u(e),g=(0,s.useState)((function(){return function(e){var t,n=e.defaultValue,s=e.tabValues;if(0===s.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!p({value:n,tabValues:s}))throw new Error('Docusaurus error: The has a defaultValue "'+n+'" but none of its children has the corresponding value. Available values are: '+s.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return n}var a=null!=(t=s.find((function(e){return e.default})))?t:s[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:i,tabValues:x})})),v=g[0],k=g[1],j=f({queryString:c,groupId:h}),b=j[0],m=j[1],y=(t=function(e){return e?"docusaurus.tab."+e:null}({groupId:h}.groupId),n=(0,d.Dv)(t),a=n[0],o=n[1],[a,(0,s.useCallback)((function(e){t&&o.set(e)}),[t,o])]),w=y[0],S=y[1],T=function(){var e=null!=b?b:w;return p({value:e,tabValues:x})?e:null}();return(0,r.A)((function(){T&&k(T)}),[T]),{selectedValue:v,selectValue:(0,s.useCallback)((function(e){if(!p({value:e,tabValues:x}))throw new Error("Can't select invalid tab value="+e);k(e),m(e),S(e)}),[m,S,x]),tabValues:x}}var g=n(92303);const v={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var k=n(74848);function j(e){var t=e.className,n=e.block,s=e.selectedValue,i=e.selectValue,r=e.tabValues,l=[],c=(0,o.a_)().blockElementScrollPositionUntilNextRender,d=function(e){var t=e.currentTarget,n=l.indexOf(t),a=r[n].value;a!==s&&(c(t),i(a))},h=function(e){var t,n=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":var s,a=l.indexOf(e.currentTarget)+1;n=null!=(s=l[a])?s:l[0];break;case"ArrowLeft":var o,i=l.indexOf(e.currentTarget)-1;n=null!=(o=l[i])?o:l[l.length-1]}null==(t=n)||t.focus()};return(0,k.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,a.A)("tabs",{"tabs--block":n},t),children:r.map((function(e){var t=e.value,n=e.label,o=e.attributes;return(0,k.jsx)("li",Object.assign({role:"tab",tabIndex:s===t?0:-1,"aria-selected":s===t,ref:function(e){return l.push(e)},onKeyDown:h,onClick:d},o,{className:(0,a.A)("tabs__item",v.tabItem,null==o?void 0:o.className,{"tabs__item--active":s===t}),children:null!=n?n:t}),t)}))})}function b(e){var t=e.lazy,n=e.children,o=e.selectedValue,i=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){var r=i.find((function(e){return e.props.value===o}));return r?(0,s.cloneElement)(r,{className:(0,a.A)("margin-top--md",r.props.className)}):null}return(0,k.jsx)("div",{className:"margin-top--md",children:i.map((function(e,t){return(0,s.cloneElement)(e,{key:t,hidden:e.props.value!==o})}))})}function m(e){var t=x(e);return(0,k.jsxs)("div",{className:(0,a.A)("tabs-container",v.tabList),children:[(0,k.jsx)(j,Object.assign({},t,e)),(0,k.jsx)(b,Object.assign({},t,e))]})}function y(e){var t=(0,g.A)();return(0,k.jsx)(m,Object.assign({},e,{children:h(e.children)}),String(t))}},76379:(e,t,n)=>{n.d(t,{A:()=>s});const s=n.p+"assets/images/fee-details-e61cb9c6939a0364802da2b98129d80d.png"},52697:(e,t,n)=>{n.d(t,{A:()=>s});const s=n.p+"assets/images/unlock-vesting-deefc0d6d9a08a91af1490a82e01069b.png"},28453:(e,t,n)=>{n.d(t,{R:()=>i,x:()=>r});var s=n(96540);const a={},o=s.createContext(a);function i(e){const t=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:i(e.components),s.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/84ede15a.a6573f70.js b/assets/js/84ede15a.a6573f70.js new file mode 100644 index 000000000000..8d5c744fa746 --- /dev/null +++ b/assets/js/84ede15a.a6573f70.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6124],{41209:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>l,default:()=>u,frontMatter:()=>r,metadata:()=>s,toc:()=>d});const s=JSON.parse('{"id":"learn/learn-guides-transfers","title":"Polkadot-JS Guides about Transfers","description":"Polkadot-JS Guides about Balances Transfers.","source":"@site/../docs/learn/learn-guides-transfers.md","sourceDirName":"learn","slug":"/learn-guides-transfers","permalink":"/docs/learn-guides-transfers","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-transfers.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1729847256000,"frontMatter":{"id":"learn-guides-transfers","title":"Polkadot-JS Guides about Transfers","sidebar_label":"Transfer Guides","description":"Polkadot-JS Guides about Balances Transfers.","keywords":["gides","advanced","polkadot-js","transfers"],"slug":"../learn-guides-transfers"},"sidebar":"docs","previous":{"title":"Pure Proxy Guides","permalink":"/docs/learn-guides-accounts-proxy-pure"},"next":{"title":"Staking Guides","permalink":"/docs/learn-guides-staking"}}');var a=n(74848),o=n(28453),i=(n(11470),n(19365),n(67141));const r={id:"learn-guides-transfers",title:"Polkadot-JS Guides about Transfers",sidebar_label:"Transfer Guides",description:"Polkadot-JS Guides about Balances Transfers.",keywords:["gides","advanced","polkadot-js","transfers"],slug:"../learn-guides-transfers"},l=void 0,c={},d=[{value:"Metadata Updates with the Polkadot-JS Browser Extension",id:"metadata-updates-with-the-polkadot-js-browser-extension",level:2},{value:"Transfers using the Polkadot-JS UI and Browser Extension",id:"transfers-using-the-polkadot-js-ui-and-browser-extension",level:2},{value:"Verify Extrinsics with the Polkadot-JS Browser Extension",id:"verify-extrinsics-with-the-polkadot-js-browser-extension",level:3},{value:"Verify Extrinsics with the Polkadot-JS UI",id:"verify-extrinsics-with-the-polkadot-js-ui",level:3},{value:"Keep-Alive Checks with the Polkadot-JS UI",id:"keep-alive-checks-with-the-polkadot-js-ui",level:3},{value:"Vested Transfers with the Polkadot-JS UI",id:"vested-transfers-with-the-polkadot-js-ui",level:3},{value:"Lazy Vesting",id:"lazy-vesting",level:4},{value:"Calculating When Vesting DOT Will Be Available",id:"calculating-when-vesting-dot-will-be-available",level:4},{value:"Batch Transfers with the Polkadot-JS UI",id:"batch-transfers-with-the-polkadot-js-ui",level:3},{value:"Teleporting Tokens using the Polkadot-JS UI",id:"teleporting-tokens-using-the-polkadot-js-ui",level:3},{value:"Calculating Fees with Polkadot-JS",id:"calculating-fees-with-polkadot-js",level:2},{value:"Existing Reference Error",id:"existing-reference-error",level:2},{value:"Bonded Tokens",id:"bonded-tokens",level:3},{value:"Checking for Locks",id:"checking-for-locks",level:3},{value:"Purging Session Keys",id:"purging-session-keys",level:3},{value:"Existing Recovery Info",id:"existing-recovery-info",level:3},{value:"Existing Non-Native Assets",id:"existing-non-native-assets",level:3}];function h(e){const t={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",h4:"h4",img:"img",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,o.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the Polkadot-JS UI, you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,a.jsx)(t.h2,{id:"metadata-updates-with-the-polkadot-js-browser-extension",children:"Metadata Updates with the Polkadot-JS Browser Extension"}),"\n",(0,a.jsxs)(t.p,{children:["Before signing extrinsics with the Polkadot-JS Browser Extension, always check for metadata updates.\n",(0,a.jsx)(t.a,{href:"https://youtu.be/gbvrHzr4EDY?t=84",children:(0,a.jsx)(t.strong,{children:"This video tutorial"})})," will explain how to do it."]}),"\n",(0,a.jsx)(t.admonition,{title:"Polkadot Vault vs Polkadot-JS Browser Extension",type:"info",children:(0,a.jsx)(t.p,{children:"The Polkadot Vault app updates the full metadata through the QR fountain while the extension updates\nthe metadata index (the metadata is not loaded into it). As a consequence the process of updating\nmetadata is different in this two cases (you will notice that on the Vault app the update takes\nlonger for example). Having outdated metadata on the Vault app will prevent you from signing, while\non the extension you will be able to click the sign button but the extrinsic will likely fail\n(similarly of having an outdated Ledger app). In general, failing to update metadata will most\nlikely result in you not being able to sign extrinsics."})}),"\n",(0,a.jsx)(t.h2,{id:"transfers-using-the-polkadot-js-ui-and-browser-extension",children:"Transfers using the Polkadot-JS UI and Browser Extension"}),"\n",(0,a.jsxs)(t.p,{children:["See ",(0,a.jsx)(t.a,{href:"https://www.youtube.com/watch?v=gbvrHzr4EDY",children:"this video tutorial"})," to learn how to send funds\nusing the Polkadot-JS UI and Browser Extension. See also the Polkadot Support pages for detailed\ninformation about signing transactions using\n",(0,a.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181993-how-to-sign-a-transaction-directly-on-polkadot-js-ui",children:"the Polkadot-JS UI"}),"\nand\n",(0,a.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181989",children:"the Polkadot-JS browser extension"}),"."]}),"\n",(0,a.jsx)(t.h3,{id:"verify-extrinsics-with-the-polkadot-js-browser-extension",children:"Verify Extrinsics with the Polkadot-JS Browser Extension"}),"\n",(0,a.jsxs)(t.p,{children:["Visit the\n",(0,a.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000179161-how-can-i-verify-what-extrinsic-i-m-signing-#Verify-an-extrinsic-in-the-Polkadot-extension",children:(0,a.jsx)(t.strong,{children:"dedicated support page"})}),"\nand see ",(0,a.jsx)(t.a,{href:"https://youtu.be/bxMs-9fBtFk?t=261",children:(0,a.jsx)(t.strong,{children:"this video tutorial"})})," tutorial to learn about how to\nverify extrinsics before signing them. The video will also mention potential attacks that can happen\nto you while signing for transactions."]}),"\n",(0,a.jsx)(t.h3,{id:"verify-extrinsics-with-the-polkadot-js-ui",children:"Verify Extrinsics with the Polkadot-JS UI"}),"\n",(0,a.jsxs)(t.p,{children:["Visit the\n",(0,a.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000179161-how-can-i-verify-what-extrinsic-i-m-signing-#Verify-an-extrinsic-in-the-Polkadot-JS-UI",children:(0,a.jsx)(t.strong,{children:"dedicated support page"})}),"\nand see ",(0,a.jsx)(t.a,{href:"https://youtu.be/bxMs-9fBtFk?t=163",children:(0,a.jsx)(t.strong,{children:"this video tutorial"})})," tutorial to learn about how to\nverify extrinsics before signing them. The video will also mention potential attacks that can happen\nto you while signing for transactions."]}),"\n",(0,a.jsx)(t.h3,{id:"keep-alive-checks-with-the-polkadot-js-ui",children:"Keep-Alive Checks with the Polkadot-JS UI"}),"\n",(0,a.jsx)(t.admonition,{type:"info",children:(0,a.jsxs)(t.p,{children:["See ",(0,a.jsx)(t.a,{href:"https://youtu.be/mgPHVztHJWk",children:(0,a.jsx)(t.strong,{children:"this video tutorial"})})," and\n",(0,a.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000168651-what-is-the-existential-deposit-",children:(0,a.jsx)(t.strong,{children:"this support page"})}),"\nto learn about keep-alive checks and existential deposit."]})}),"\n",(0,a.jsx)(t.p,{children:"In Polkadot there are two main ways to transfer funds from one account to another:"}),"\n",(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.code,{children:"transfer keep-alive"})," (default option) will not allow you to send an amount that would allow the\nsending account to be removed due to it going below the\n",(0,a.jsx)(t.a,{href:"/docs/chain-state-values#existential-deposit",children:"existential deposit"}),"."]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.code,{children:"transfer allow-death"})," will allow you to send tokens regardless of the consequence. If the balance\ndrops below the existential deposit your account will be reaped. It may be that you do not want to\nkeep the account alive (for example, because you are moving all of your funds to a different\naddress). To switch the keep-alive check off visit\n",(0,a.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000169248",children:"this support article"}),"."]}),"\n"]}),"\n",(0,a.jsxs)(t.admonition,{type:"info",children:[(0,a.jsxs)(t.p,{children:["Attempting to send less than the\n",(0,a.jsx)(t.a,{href:"/docs/chain-state-values#existential-deposit",children:"existential deposit"})," to an account with zero\nbalance will always fail, no matter if the keep-alive check is on or not."]}),(0,a.jsx)(t.p,{children:"Even if the transfer fails due to a keep-alive check, the transaction fee will be deducted from the\nsending account if you attempt to transfer."})]}),"\n",(0,a.jsx)(t.h3,{id:"vested-transfers-with-the-polkadot-js-ui",children:"Vested Transfers with the Polkadot-JS UI"}),"\n",(0,a.jsxs)(t.p,{children:["You can watch ",(0,a.jsx)(t.a,{href:"https://youtu.be/JVlwTQBwNGc",children:(0,a.jsx)(t.strong,{children:"this video tutorial"})})," to understand how to do vested\ntransfers using the Polkadot-JS UI, including linear and cliff vesting. Note the tutorial uses the\nWestend Testnet, but the same applies to Polkadot and Kusama."]}),"\n",(0,a.jsx)(t.p,{children:"There are two ways that vesting schedules can be created."}),"\n",(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsxs)(t.li,{children:["One way is through an extrinsic type available in the Vesting pallet, ",(0,a.jsx)(t.code,{children:"vested_transfer"}),". The\nvested transfer function allows anyone to create a vesting schedule with a transfer of funds, as\nlong as the account for which the vesting schedule will be created does not already have one and\nthe transfer moves at least ",(0,a.jsx)(t.code,{children:"MinVestedTransfer"})," funds, which is specified as a chain constant."]}),"\n",(0,a.jsx)(t.li,{children:"A second way is as part of the genesis configuration of the chain. In the case of Polkadot, the\nchain specification genesis script reads the state of the Claims contract that exists on the\nEthereum blockchain and creates vesting schedules in genesis for all the allocations registered as\nbeing vested."}),"\n"]}),"\n",(0,a.jsx)(t.p,{children:"Vesting schedules have three parameters:"}),"\n",(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.strong,{children:"locked"}),", the amount of tokens to be transferred in\n",(0,a.jsx)(t.a,{href:"../learn/learn-DOT#the-planck-unit",children:"Planck units"}),")"]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.strong,{children:"per block"}),", the number of tokens that are released per block"]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.strong,{children:"starting block"}),", the block number after which the vesting schedule starts"]}),"\n"]}),"\n",(0,a.jsx)(t.p,{children:"The configuration of these three fields dictates the amount of funds that are originally locked, the\nslope of the unlock line and the block number for when the unlocking begins."}),"\n",(0,a.jsx)(t.h4,{id:"lazy-vesting",children:"Lazy Vesting"}),"\n",(0,a.jsxs)(t.p,{children:["Like ",(0,a.jsx)(t.a,{href:"/docs/learn-staking-advanced",children:"simple payouts"}),", vesting is ",(0,a.jsx)(t.em,{children:"lazy"}),", which means that someone must\nexplicitly call an extrinsic to update the lock that is placed on an account."]}),"\n",(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsxs)(t.li,{children:["The ",(0,a.jsx)(t.code,{children:"vest"})," extrinsic will update the lock that is placed on the caller."]}),"\n",(0,a.jsxs)(t.li,{children:["The ",(0,a.jsx)(t.code,{children:"vest_other"}),' will update the lock that is placed on another "target" account\'s funds.']}),"\n"]}),"\n",(0,a.jsx)(t.p,{children:"These extrinsics are exposed from the Vesting pallet."}),"\n",(0,a.jsxs)(t.p,{children:["If you are using ",(0,a.jsx)(t.a,{href:"/docs/learn-polkadotjs",children:"the Polkadot-JS UI"}),", when there are tokens available to\nvest for an account, you can unlock tokens that have already been vested from the\n",(0,a.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/accounts",children:"Accounts"})," page."]}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"unbond",src:n(52697).A+"",width:"241",height:"301"})}),"\n",(0,a.jsx)(t.h4,{id:"calculating-when-vesting-dot-will-be-available",children:"Calculating When Vesting DOT Will Be Available"}),"\n",(0,a.jsxs)(t.p,{children:["Generally, you should be able to see from the ",(0,a.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/accounts",children:"Accounts"}),' by\nlooking at your accounts and seeing when the vesting will finish. However, some DOT vest with\n"cliffs" - a single block where all the DOT are released, instead of vesting over time. In this\ncase, you will have to query the chain state directly to see when they will be available (since\ntechnically, the vesting has not yet started - all of the vesting will occur in a single block in\nthe future).']}),"\n",(0,a.jsxs)(t.ol,{children:["\n",(0,a.jsxs)(t.li,{children:["Navigate to the\n",(0,a.jsx)(t.a,{href:"https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc.polkadot.io#/chainstate",children:"Chain State"})," page on\nPolkadot-JS."]}),"\n",(0,a.jsxs)(t.li,{children:["Query chain state for ",(0,a.jsx)(t.code,{children:"vesting.vesting(ACCOUNT_ID)"})]}),"\n",(0,a.jsxs)(t.li,{children:["Note the ",(0,a.jsx)(t.code,{children:"startingBlock"})," where the unlock starts, and how much DOT is unlocked per block\n(",(0,a.jsx)(t.code,{children:"perBlock"}),")."]}),"\n",(0,a.jsxs)(t.li,{children:['You will have to calculate the result into \u201chuman time". To do this, remember that there are\napproximately 14\u2019400 blocks per day, and you can see what the latest block is shown on the\n',(0,a.jsx)(t.a,{href:"https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc.polkadot.io#/explorer",children:"Explorer"})," page."]}),"\n"]}),"\n",(0,a.jsx)(t.h3,{id:"batch-transfers-with-the-polkadot-js-ui",children:"Batch Transfers with the Polkadot-JS UI"}),"\n",(0,a.jsx)(t.p,{children:"Batch transfers are balances transfers to multiple accounts executed by one account. In order to\nconstruct a batch transfer you need to:"}),"\n",(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsxs)(t.li,{children:["Create a ",(0,a.jsx)(t.code,{children:"utility.batch(calls)"})," extrinsic using the\n",(0,a.jsx)(t.a,{href:"https://paritytech.github.io/substrate/master/pallet_utility/index.html",children:"utility pallet"}),", and"]}),"\n",(0,a.jsxs)(t.li,{children:["Within the batch call you can create multiple ",(0,a.jsx)(t.code,{children:"balances.transferKeepAlive"})," extrinsics using the\n",(0,a.jsx)(t.a,{href:"https://paritytech.github.io/substrate/master/pallet_balances/index.html",children:"balances pallet"}),". You\ncan specify as many receivers as you desire."]}),"\n"]}),"\n",(0,a.jsx)(t.admonition,{type:"info",children:(0,a.jsxs)(t.p,{children:["You can watch ",(0,a.jsx)(t.a,{href:"https://youtu.be/uoUC2K8muvw",children:(0,a.jsx)(t.strong,{children:"this video tutorial"})})," to learn how to do batch\ntransfers. Note the tutorial uses the Westend Testnet, but the same applies to both Polkadot and\nKusama."]})}),"\n",(0,a.jsx)(t.h3,{id:"teleporting-tokens-using-the-polkadot-js-ui",children:"Teleporting Tokens using the Polkadot-JS UI"}),"\n",(0,a.jsxs)(t.p,{children:["See ",(0,a.jsx)(t.a,{href:"https://youtu.be/3tE9ouub5Tg",children:"this video tutorial"})," and\n",(0,a.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181119-how-to-teleport-dot-or-ksm-between-statemint-or-statemine",children:"this additional support article"}),"\nto learn more about how to teleport tokens."]}),"\n",(0,a.jsx)(t.admonition,{type:"info",children:(0,a.jsx)(t.p,{children:'If you do not see "Accounts > Teleport" in the Polkadot-JS UI, the source chain that you have\nselected does not support teleportation yet.'})}),"\n",(0,a.jsx)(t.h2,{id:"calculating-fees-with-polkadot-js",children:"Calculating Fees with Polkadot-JS"}),"\n",(0,a.jsx)(t.p,{children:"To calculate fees you can go to Developer > Runtime Calls and select the following extrinsics:"}),"\n",(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsx)(t.li,{children:(0,a.jsx)(t.code,{children:"transactionPaymentApi.queryInfo"})}),"\n",(0,a.jsx)(t.li,{children:(0,a.jsx)(t.code,{children:"transactionPaymentApi.queryFeeDetails"})}),"\n"]}),"\n",(0,a.jsxs)(t.p,{children:["and specify the ",(0,a.jsx)(t.code,{children:"0x"})," prefixed hex call data and its length."]}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"Fee details",src:n(76379).A+"",width:"1161",height:"668"})}),"\n",(0,a.jsxs)(t.p,{children:["The sum of ",(0,a.jsx)(t.code,{children:"baseFee"}),", ",(0,a.jsx)(t.code,{children:"lenFee"})," and ",(0,a.jsx)(t.code,{children:"adjustedWeightFee"})," will yield the ",(0,a.jsx)(t.code,{children:"partialFee"}),"."]}),"\n",(0,a.jsxs)(t.p,{children:["One useful utility for estimating transaction fees programmatically is the via the\n",(0,a.jsx)(t.a,{href:"https://www.npmjs.com/package/@polkadot/api",children:"@polkadot/api"}),". Check out the following script that\nlogs some relevant fee information:"]}),"\n",(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-js",children:"// Estimate the fees as RuntimeDispatchInfo using the signer\nconst info = await api.tx.balances.transfer(recipient, 123).paymentInfo(sender);\n\n// Log relevant info, partialFee is Balance, estimated for current\nconsole.log(`\n class=${info.class.toString()},\n weight=${info.weight.toString()},\n partialFee=${info.partialFee.toHuman()}\n`);\n"})}),"\n",(0,a.jsxs)(t.p,{children:["For additional information on interacting with the API, checkout\n",(0,a.jsx)(t.a,{href:"/docs/polkadotjs",children:"Polkadot-JS"}),"."]}),"\n",(0,a.jsx)(t.h2,{id:"existing-reference-error",children:"Existing Reference Error"}),"\n",(0,a.jsxs)(t.p,{children:["If you are trying to reap an account and you receive an error similar to\n",(0,a.jsx)(t.code,{children:'"There is an existing reference count on the sender account. As such the account cannot be reaped from the state"'}),",\nthen you have existing references to this account that must be first removed before it can be\nreaped. References may still exist from:"]}),"\n",(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsx)(t.li,{children:"Bonded tokens (most likely)"}),"\n",(0,a.jsx)(t.li,{children:"Unpurged session keys (if you were previously a validator)"}),"\n",(0,a.jsx)(t.li,{children:"Token locks"}),"\n",(0,a.jsx)(t.li,{children:"Existing recovery info"}),"\n",(0,a.jsx)(t.li,{children:"Existing assets"}),"\n"]}),"\n",(0,a.jsx)(t.h3,{id:"bonded-tokens",children:"Bonded Tokens"}),"\n",(0,a.jsxs)(t.p,{children:["If you have tokens that are bonded, you will need to unbond them before you can reap your account.\nFollow the instructions at ",(0,a.jsx)(t.a,{href:"/docs/learn-guides-nominator#bond-your-tokens",children:"Unbonding and Rebonding"}),"\nto check if you have bonded tokens, stop nominating (if necessary) and unbond your tokens."]}),"\n",(0,a.jsx)(t.h3,{id:"checking-for-locks",children:"Checking for Locks"}),"\n",(0,a.jsx)(t.admonition,{type:"info",children:(0,a.jsxs)(t.p,{children:["See ",(0,a.jsx)(t.a,{href:"https://youtu.be/LHgY7ds_bZ0",children:"this video tutorial"})," and\n",(0,a.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000169437-why-can-t-i-transfer-tokens-",children:"this support page"}),"\nto learn how to check for locks and remove them."]})}),"\n",(0,a.jsxs)(t.p,{children:["You can also check for locks by querying ",(0,a.jsx)(t.code,{children:"system.account(AccountId)"})," in\n",(0,a.jsxs)(t.a,{href:"https://polkadot.js.org/apps/#/chainstate",children:[(0,a.jsx)(t.code,{children:"Chain state"})," tab under the ",(0,a.jsx)(t.code,{children:"Developer"})," drop-down menu in the Polkadot-JS UI"]}),'.\nSelect your account, then click the "+" button next to the dropdowns, and check the relative ',(0,a.jsx)(t.code,{children:"data"}),"\nJSON object. If you see a non-zero value for anything other than ",(0,a.jsx)(t.code,{children:"free"}),", you have locks on your\naccount that need to get resolved."]}),"\n",(0,a.jsx)(t.h3,{id:"purging-session-keys",children:"Purging Session Keys"}),"\n",(0,a.jsxs)(t.p,{children:["If you used this account to set up a validator and you did not purge your keys before unbonding your\ntokens, you need to purge your keys. You can do this by seeing the\n",(0,a.jsx)(t.a,{href:"/docs/maintain-guides-how-to-stop-validating",children:"How to Stop Validating"})," page. This can also\nbe checked by checking ",(0,a.jsx)(t.code,{children:"session.nextKeys"})," in the chain state for an existing key."]}),"\n",(0,a.jsx)(t.h3,{id:"existing-recovery-info",children:"Existing Recovery Info"}),"\n",(0,a.jsxs)(t.p,{children:["Currently, Polkadot does not use the\n",(0,a.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/recovery/",children:"Recovery Pallet"}),",\nso this is probably not the reason for your tokens having existing references."]}),"\n",(0,a.jsxs)(t.p,{children:["On Kusama, you can check if recovery has been set up by checking the\n",(0,a.jsx)(t.code,{children:"recovery.recoverable(AccountId)"})," chain state. This can be found under ",(0,a.jsx)(t.code,{children:"Developer > Chain state"})," in\n",(0,a.jsx)(t.a,{href:"https://polkadot.js.org/apps/",children:"PolkadotJS Apps"}),"."]}),"\n",(0,a.jsx)(t.h3,{id:"existing-non-native-assets",children:"Existing Non-Native Assets"}),"\n",(0,a.jsxs)(t.p,{children:["Currently, Polkadot does not use the\n",(0,a.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/substrate/frame/assets",children:"Assets Pallet"}),", so\nthis is probably not the reason for your tokens having existing references."]})]})}function u(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,a.jsx)(t,{...e,children:(0,a.jsx)(h,{...e})}):h(e)}},67141:(e,t,n)=>{n.d(t,{A:()=>o});var s=n(96540),a=n(74848);const o=function(e){var t,n=e.message,o=(0,s.useState)(!0),i=o[0],r=o[1];return(0,a.jsx)(a.Fragment,{children:i&&(0,a.jsxs)("div",{className:"message-box",children:[(0,a.jsx)("button",{className:"close-button",onClick:function(){r(!1)},children:"\u2716 "}),(0,a.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(t=n,t.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},19365:(e,t,n)=>{n.d(t,{A:()=>i});n(96540);var s=n(34164);const a={tabItem:"tabItem_Ymn6"};var o=n(74848);function i(e){var t=e.children,n=e.hidden,i=e.className;return(0,o.jsx)("div",{role:"tabpanel",className:(0,s.A)(a.tabItem,i),hidden:n,children:t})}},11470:(e,t,n)=>{n.d(t,{A:()=>y});var s=n(96540),a=n(34164),o=n(23104),i=n(56347),r=n(205),l=n(57485),c=n(31682),d=n(75376);function h(e){var t,n;return null!=(t=null==(n=s.Children.toArray(e).filter((function(e){return"\n"!==e})).map((function(e){if(!e||(0,s.isValidElement)(e)&&((t=e.props)&&"object"==typeof t&&"value"in t))return e;var t;throw new Error("Docusaurus error: Bad child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:n.filter(Boolean))?t:[]}function u(e){var t=e.values,n=e.children;return(0,s.useMemo)((function(){var e=null!=t?t:function(e){return h(e).map((function(e){var t=e.props;return{value:t.value,label:t.label,attributes:t.attributes,default:t.default}}))}(n);return function(e){var t=(0,c.XI)(e,(function(e,t){return e.value===t.value}));if(t.length>0)throw new Error('Docusaurus error: Duplicate values "'+t.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[t,n])}function p(e){var t=e.value;return e.tabValues.some((function(e){return e.value===t}))}function f(e){var t=e.queryString,n=void 0!==t&&t,a=e.groupId,o=(0,i.W6)(),r=function(e){var t=e.queryString,n=void 0!==t&&t,s=e.groupId;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!s)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=s?s:null}({queryString:n,groupId:a});return[(0,l.aZ)(r),(0,s.useCallback)((function(e){if(r){var t=new URLSearchParams(o.location.search);t.set(r,e),o.replace(Object.assign({},o.location,{search:t.toString()}))}}),[r,o])]}function x(e){var t,n,a,o,i=e.defaultValue,l=e.queryString,c=void 0!==l&&l,h=e.groupId,x=u(e),g=(0,s.useState)((function(){return function(e){var t,n=e.defaultValue,s=e.tabValues;if(0===s.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!p({value:n,tabValues:s}))throw new Error('Docusaurus error: The has a defaultValue "'+n+'" but none of its children has the corresponding value. Available values are: '+s.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return n}var a=null!=(t=s.find((function(e){return e.default})))?t:s[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:i,tabValues:x})})),v=g[0],k=g[1],j=f({queryString:c,groupId:h}),b=j[0],m=j[1],y=(t=function(e){return e?"docusaurus.tab."+e:null}({groupId:h}.groupId),n=(0,d.Dv)(t),a=n[0],o=n[1],[a,(0,s.useCallback)((function(e){t&&o.set(e)}),[t,o])]),w=y[0],S=y[1],T=function(){var e=null!=b?b:w;return p({value:e,tabValues:x})?e:null}();return(0,r.A)((function(){T&&k(T)}),[T]),{selectedValue:v,selectValue:(0,s.useCallback)((function(e){if(!p({value:e,tabValues:x}))throw new Error("Can't select invalid tab value="+e);k(e),m(e),S(e)}),[m,S,x]),tabValues:x}}var g=n(92303);const v={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var k=n(74848);function j(e){var t=e.className,n=e.block,s=e.selectedValue,i=e.selectValue,r=e.tabValues,l=[],c=(0,o.a_)().blockElementScrollPositionUntilNextRender,d=function(e){var t=e.currentTarget,n=l.indexOf(t),a=r[n].value;a!==s&&(c(t),i(a))},h=function(e){var t,n=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":var s,a=l.indexOf(e.currentTarget)+1;n=null!=(s=l[a])?s:l[0];break;case"ArrowLeft":var o,i=l.indexOf(e.currentTarget)-1;n=null!=(o=l[i])?o:l[l.length-1]}null==(t=n)||t.focus()};return(0,k.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,a.A)("tabs",{"tabs--block":n},t),children:r.map((function(e){var t=e.value,n=e.label,o=e.attributes;return(0,k.jsx)("li",Object.assign({role:"tab",tabIndex:s===t?0:-1,"aria-selected":s===t,ref:function(e){return l.push(e)},onKeyDown:h,onClick:d},o,{className:(0,a.A)("tabs__item",v.tabItem,null==o?void 0:o.className,{"tabs__item--active":s===t}),children:null!=n?n:t}),t)}))})}function b(e){var t=e.lazy,n=e.children,o=e.selectedValue,i=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){var r=i.find((function(e){return e.props.value===o}));return r?(0,s.cloneElement)(r,{className:(0,a.A)("margin-top--md",r.props.className)}):null}return(0,k.jsx)("div",{className:"margin-top--md",children:i.map((function(e,t){return(0,s.cloneElement)(e,{key:t,hidden:e.props.value!==o})}))})}function m(e){var t=x(e);return(0,k.jsxs)("div",{className:(0,a.A)("tabs-container",v.tabList),children:[(0,k.jsx)(j,Object.assign({},t,e)),(0,k.jsx)(b,Object.assign({},t,e))]})}function y(e){var t=(0,g.A)();return(0,k.jsx)(m,Object.assign({},e,{children:h(e.children)}),String(t))}},76379:(e,t,n)=>{n.d(t,{A:()=>s});const s=n.p+"assets/images/fee-details-e61cb9c6939a0364802da2b98129d80d.png"},52697:(e,t,n)=>{n.d(t,{A:()=>s});const s=n.p+"assets/images/unlock-vesting-deefc0d6d9a08a91af1490a82e01069b.png"},28453:(e,t,n)=>{n.d(t,{R:()=>i,x:()=>r});var s=n(96540);const a={},o=s.createContext(a);function i(e){const t=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:i(e.components),s.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/857.4dc6b3f4.js b/assets/js/857.4dc6b3f4.js deleted file mode 100644 index 24c85156ad30..000000000000 --- a/assets/js/857.4dc6b3f4.js +++ /dev/null @@ -1,540 +0,0 @@ -"use strict"; -exports.id = 857; -exports.ids = [857]; -exports.modules = { - -/***/ 15857: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ diagram: () => (/* binding */ diagram) -/* harmony export */ }); -/* harmony import */ var _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(86079); -/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(74353); -/* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(16750); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(26312); -/* harmony import */ var dompurify__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(99418); - - - - - - - - - - - -var parser = function() { - var o = function(k, v, o2, l) { - for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) - ; - return o2; - }, $V0 = [6, 9, 10]; - var parser2 = { - trace: function trace() { - }, - yy: {}, - symbols_: { "error": 2, "start": 3, "info": 4, "document": 5, "EOF": 6, "line": 7, "statement": 8, "NL": 9, "showInfo": 10, "$accept": 0, "$end": 1 }, - terminals_: { 2: "error", 4: "info", 6: "EOF", 9: "NL", 10: "showInfo" }, - productions_: [0, [3, 3], [5, 0], [5, 2], [7, 1], [7, 1], [8, 1]], - performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { - $$.length - 1; - switch (yystate) { - case 1: - return yy; - case 4: - break; - case 6: - yy.setInfo(true); - break; - } - }, - table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, o($V0, [2, 2], { 5: 3 }), { 6: [1, 4], 7: 5, 8: 6, 9: [1, 7], 10: [1, 8] }, { 1: [2, 1] }, o($V0, [2, 3]), o($V0, [2, 4]), o($V0, [2, 5]), o($V0, [2, 6])], - defaultActions: { 4: [2, 1] }, - parseError: function parseError(str, hash) { - if (hash.recoverable) { - this.trace(str); - } else { - var error = new Error(str); - error.hash = hash; - throw error; - } - }, - parse: function parse(input) { - var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; - var args = lstack.slice.call(arguments, 1); - var lexer2 = Object.create(this.lexer); - var sharedState = { yy: {} }; - for (var k in this.yy) { - if (Object.prototype.hasOwnProperty.call(this.yy, k)) { - sharedState.yy[k] = this.yy[k]; - } - } - lexer2.setInput(input, sharedState.yy); - sharedState.yy.lexer = lexer2; - sharedState.yy.parser = this; - if (typeof lexer2.yylloc == "undefined") { - lexer2.yylloc = {}; - } - var yyloc = lexer2.yylloc; - lstack.push(yyloc); - var ranges = lexer2.options && lexer2.options.ranges; - if (typeof sharedState.yy.parseError === "function") { - this.parseError = sharedState.yy.parseError; - } else { - this.parseError = Object.getPrototypeOf(this).parseError; - } - function lex() { - var token; - token = tstack.pop() || lexer2.lex() || EOF; - if (typeof token !== "number") { - if (token instanceof Array) { - tstack = token; - token = tstack.pop(); - } - token = self.symbols_[token] || token; - } - return token; - } - var symbol, state, action, r, yyval = {}, p, len, newState, expected; - while (true) { - state = stack[stack.length - 1]; - if (this.defaultActions[state]) { - action = this.defaultActions[state]; - } else { - if (symbol === null || typeof symbol == "undefined") { - symbol = lex(); - } - action = table[state] && table[state][symbol]; - } - if (typeof action === "undefined" || !action.length || !action[0]) { - var errStr = ""; - expected = []; - for (p in table[state]) { - if (this.terminals_[p] && p > TERROR) { - expected.push("'" + this.terminals_[p] + "'"); - } - } - if (lexer2.showPosition) { - errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; - } else { - errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); - } - this.parseError(errStr, { - text: lexer2.match, - token: this.terminals_[symbol] || symbol, - line: lexer2.yylineno, - loc: yyloc, - expected - }); - } - if (action[0] instanceof Array && action.length > 1) { - throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); - } - switch (action[0]) { - case 1: - stack.push(symbol); - vstack.push(lexer2.yytext); - lstack.push(lexer2.yylloc); - stack.push(action[1]); - symbol = null; - { - yyleng = lexer2.yyleng; - yytext = lexer2.yytext; - yylineno = lexer2.yylineno; - yyloc = lexer2.yylloc; - } - break; - case 2: - len = this.productions_[action[1]][1]; - yyval.$ = vstack[vstack.length - len]; - yyval._$ = { - first_line: lstack[lstack.length - (len || 1)].first_line, - last_line: lstack[lstack.length - 1].last_line, - first_column: lstack[lstack.length - (len || 1)].first_column, - last_column: lstack[lstack.length - 1].last_column - }; - if (ranges) { - yyval._$.range = [ - lstack[lstack.length - (len || 1)].range[0], - lstack[lstack.length - 1].range[1] - ]; - } - r = this.performAction.apply(yyval, [ - yytext, - yyleng, - yylineno, - sharedState.yy, - action[1], - vstack, - lstack - ].concat(args)); - if (typeof r !== "undefined") { - return r; - } - if (len) { - stack = stack.slice(0, -1 * len * 2); - vstack = vstack.slice(0, -1 * len); - lstack = lstack.slice(0, -1 * len); - } - stack.push(this.productions_[action[1]][0]); - vstack.push(yyval.$); - lstack.push(yyval._$); - newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; - stack.push(newState); - break; - case 3: - return true; - } - } - return true; - } - }; - var lexer = function() { - var lexer2 = { - EOF: 1, - parseError: function parseError(str, hash) { - if (this.yy.parser) { - this.yy.parser.parseError(str, hash); - } else { - throw new Error(str); - } - }, - // resets the lexer, sets new input - setInput: function(input, yy) { - this.yy = yy || this.yy || {}; - this._input = input; - this._more = this._backtrack = this.done = false; - this.yylineno = this.yyleng = 0; - this.yytext = this.matched = this.match = ""; - this.conditionStack = ["INITIAL"]; - this.yylloc = { - first_line: 1, - first_column: 0, - last_line: 1, - last_column: 0 - }; - if (this.options.ranges) { - this.yylloc.range = [0, 0]; - } - this.offset = 0; - return this; - }, - // consumes and returns one char from the input - input: function() { - var ch = this._input[0]; - this.yytext += ch; - this.yyleng++; - this.offset++; - this.match += ch; - this.matched += ch; - var lines = ch.match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno++; - this.yylloc.last_line++; - } else { - this.yylloc.last_column++; - } - if (this.options.ranges) { - this.yylloc.range[1]++; - } - this._input = this._input.slice(1); - return ch; - }, - // unshifts one char (or a string) into the input - unput: function(ch) { - var len = ch.length; - var lines = ch.split(/(?:\r\n?|\n)/g); - this._input = ch + this._input; - this.yytext = this.yytext.substr(0, this.yytext.length - len); - this.offset -= len; - var oldLines = this.match.split(/(?:\r\n?|\n)/g); - this.match = this.match.substr(0, this.match.length - 1); - this.matched = this.matched.substr(0, this.matched.length - 1); - if (lines.length - 1) { - this.yylineno -= lines.length - 1; - } - var r = this.yylloc.range; - this.yylloc = { - first_line: this.yylloc.first_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.first_column, - last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len - }; - if (this.options.ranges) { - this.yylloc.range = [r[0], r[0] + this.yyleng - len]; - } - this.yyleng = this.yytext.length; - return this; - }, - // When called from action, caches matched text and appends it on next action - more: function() { - this._more = true; - return this; - }, - // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. - reject: function() { - if (this.options.backtrack_lexer) { - this._backtrack = true; - } else { - return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), { - text: "", - token: null, - line: this.yylineno - }); - } - return this; - }, - // retain first n characters of the match - less: function(n) { - this.unput(this.match.slice(n)); - }, - // displays already matched input, i.e. for error messages - pastInput: function() { - var past = this.matched.substr(0, this.matched.length - this.match.length); - return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); - }, - // displays upcoming input, i.e. for error messages - upcomingInput: function() { - var next = this.match; - if (next.length < 20) { - next += this._input.substr(0, 20 - next.length); - } - return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); - }, - // displays the character position where the lexing error occurred, i.e. for error messages - showPosition: function() { - var pre = this.pastInput(); - var c = new Array(pre.length + 1).join("-"); - return pre + this.upcomingInput() + "\n" + c + "^"; - }, - // test the lexed token: return FALSE when not a match, otherwise return token - test_match: function(match, indexed_rule) { - var token, lines, backup; - if (this.options.backtrack_lexer) { - backup = { - yylineno: this.yylineno, - yylloc: { - first_line: this.yylloc.first_line, - last_line: this.last_line, - first_column: this.yylloc.first_column, - last_column: this.yylloc.last_column - }, - yytext: this.yytext, - match: this.match, - matches: this.matches, - matched: this.matched, - yyleng: this.yyleng, - offset: this.offset, - _more: this._more, - _input: this._input, - yy: this.yy, - conditionStack: this.conditionStack.slice(0), - done: this.done - }; - if (this.options.ranges) { - backup.yylloc.range = this.yylloc.range.slice(0); - } - } - lines = match[0].match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno += lines.length; - } - this.yylloc = { - first_line: this.yylloc.last_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.last_column, - last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length - }; - this.yytext += match[0]; - this.match += match[0]; - this.matches = match; - this.yyleng = this.yytext.length; - if (this.options.ranges) { - this.yylloc.range = [this.offset, this.offset += this.yyleng]; - } - this._more = false; - this._backtrack = false; - this._input = this._input.slice(match[0].length); - this.matched += match[0]; - token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); - if (this.done && this._input) { - this.done = false; - } - if (token) { - return token; - } else if (this._backtrack) { - for (var k in backup) { - this[k] = backup[k]; - } - return false; - } - return false; - }, - // return next match in input - next: function() { - if (this.done) { - return this.EOF; - } - if (!this._input) { - this.done = true; - } - var token, match, tempMatch, index; - if (!this._more) { - this.yytext = ""; - this.match = ""; - } - var rules = this._currentRules(); - for (var i = 0; i < rules.length; i++) { - tempMatch = this._input.match(this.rules[rules[i]]); - if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { - match = tempMatch; - index = i; - if (this.options.backtrack_lexer) { - token = this.test_match(tempMatch, rules[i]); - if (token !== false) { - return token; - } else if (this._backtrack) { - match = false; - continue; - } else { - return false; - } - } else if (!this.options.flex) { - break; - } - } - } - if (match) { - token = this.test_match(match, rules[index]); - if (token !== false) { - return token; - } - return false; - } - if (this._input === "") { - return this.EOF; - } else { - return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { - text: "", - token: null, - line: this.yylineno - }); - } - }, - // return next match that has a token - lex: function lex() { - var r = this.next(); - if (r) { - return r; - } else { - return this.lex(); - } - }, - // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) - begin: function begin(condition) { - this.conditionStack.push(condition); - }, - // pop the previously active lexer condition state off the condition stack - popState: function popState() { - var n = this.conditionStack.length - 1; - if (n > 0) { - return this.conditionStack.pop(); - } else { - return this.conditionStack[0]; - } - }, - // produce the lexer rule set which is active for the currently active lexer condition state - _currentRules: function _currentRules() { - if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { - return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; - } else { - return this.conditions["INITIAL"].rules; - } - }, - // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available - topState: function topState(n) { - n = this.conditionStack.length - 1 - Math.abs(n || 0); - if (n >= 0) { - return this.conditionStack[n]; - } else { - return "INITIAL"; - } - }, - // alias for begin(condition) - pushState: function pushState(condition) { - this.begin(condition); - }, - // return the number of states currently on the stack - stateStackSize: function stateStackSize() { - return this.conditionStack.length; - }, - options: { "case-insensitive": true }, - performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { - switch ($avoiding_name_collisions) { - case 0: - return 4; - case 1: - return 9; - case 2: - return "space"; - case 3: - return 10; - case 4: - return 6; - case 5: - return "TXT"; - } - }, - rules: [/^(?:info\b)/i, /^(?:[\s\n\r]+)/i, /^(?:[\s]+)/i, /^(?:showInfo\b)/i, /^(?:$)/i, /^(?:.)/i], - conditions: { "INITIAL": { "rules": [0, 1, 2, 3, 4, 5], "inclusive": true } } - }; - return lexer2; - }(); - parser2.lexer = lexer; - function Parser() { - this.yy = {}; - } - Parser.prototype = parser2; - parser2.Parser = Parser; - return new Parser(); -}(); -parser.parser = parser; -const parser$1 = parser; -const DEFAULT_INFO_DB = { - info: false -}; -let info = DEFAULT_INFO_DB.info; -const setInfo = (toggle) => { - info = toggle; -}; -const getInfo = () => info; -const clear = () => { - info = DEFAULT_INFO_DB.info; -}; -const db = { - clear, - setInfo, - getInfo -}; -const draw = (text, id, version) => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("rendering info diagram\n" + text); - const svg = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.A)(id); - (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.i)(svg, 100, 400, true); - const group = svg.append("g"); - group.append("text").attr("x", 100).attr("y", 40).attr("class", "version").attr("font-size", 32).style("text-anchor", "middle").text(`v${version}`); -}; -const renderer = { draw }; -const diagram = { - parser: parser$1, - db, - renderer -}; - - - -/***/ }) - -}; -; \ No newline at end of file diff --git a/assets/js/85afe03a.2d31399c.js b/assets/js/85afe03a.2d31399c.js deleted file mode 100644 index 981ea2f7fea1..000000000000 --- a/assets/js/85afe03a.2d31399c.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1628],{80396:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>o,contentTitle:()=>i,default:()=>a,frontMatter:()=>r,metadata:()=>l,toc:()=>c});var d=s(74848),n=s(28453);const r={id:"maintain-errors",title:"Errors and How to Resolve Them",sidebar_label:"Resolving Errors",description:"Common errors you might encounter and how they can be resolved.",keywords:["errors","common errors","fix errors"],slug:"../maintain-errors"},i=void 0,l={id:"maintain/maintain-errors",title:"Errors and How to Resolve Them",description:"Common errors you might encounter and how they can be resolved.",source:"@site/../docs/maintain/maintain-errors.md",sourceDirName:"maintain",slug:"/maintain-errors",permalink:"/docs/maintain-errors",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/maintain/maintain-errors.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1729504323e3,frontMatter:{id:"maintain-errors",title:"Errors and How to Resolve Them",sidebar_label:"Resolving Errors",description:"Common errors you might encounter and how they can be resolved.",keywords:["errors","common errors","fix errors"],slug:"../maintain-errors"},sidebar:"docs",previous:{title:"Networks",permalink:"/docs/maintain-networks"},next:{title:"Collator Guides",permalink:"/docs/maintain-collator-index"}},o={},c=[{value:"Polkadot-JS Apps Explorer",id:"polkadot-js-apps-explorer",level:2},{value:"Subscan",id:"subscan",level:2},{value:"Common Errors",id:"common-errors",level:2},{value:"Error Table",id:"error-table",level:2},{value:"Errors from Current Pallets on Polkadot",id:"errors-from-current-pallets-on-polkadot",level:3},{value:"Errors from Deprecated Pallets on Polkadot",id:"errors-from-deprecated-pallets-on-polkadot",level:3}];function h(e){const t={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,n.R)(),...e.components};return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(t.p,{children:["Errors in Substrate-based chains are usually accompanied by descriptive messages. However, to read\nthese messages, a tool parsing the blockchain data needs to request ",(0,d.jsx)(t.em,{children:"chain metadata"})," from a node.\nThat metadata explains how to read the messages. One such tool with a built-in parser for chain\nmetadata is the ",(0,d.jsx)(t.a,{href:"https://polkadot.js.org/apps",children:"Polkadot-JS Apps UI"}),"."]}),"\n",(0,d.jsxs)(t.p,{children:["If this page does not answer your question, try searching for your problem at the\n",(0,d.jsx)(t.a,{href:"https://support.polkadot.network/",children:"Polkadot Knowledge Base"})," for more information on troubleshooting\nyour issue."]}),"\n",(0,d.jsx)(t.h2,{id:"polkadot-js-apps-explorer",children:"Polkadot-JS Apps Explorer"}),"\n",(0,d.jsx)(t.p,{children:"Here's how to find out the detailed error description through Polkadot-JS Apps."}),"\n",(0,d.jsx)(t.p,{children:"A typical failed transactions looks something like this:"}),"\n",(0,d.jsx)(t.p,{children:(0,d.jsx)(t.img,{alt:"Error while sending a transaction",src:s(58691).A+"",width:"347",height:"291"})}),"\n",(0,d.jsx)(t.p,{children:"The image displays only the error name as defined in the code, not its error message. Despite this\nerror being rather self-explanatory, let's find its details."}),"\n",(0,d.jsxs)(t.p,{children:["In the ",(0,d.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/explorer",children:"explorer tab"}),", find the block in which this failure\noccurred. Then, expand the ",(0,d.jsx)(t.code,{children:"system.ExtrinsicFailed"})," frame:"]}),"\n",(0,d.jsx)(t.p,{children:(0,d.jsx)(t.img,{alt:"Error described",src:s(64212).A+"",width:"627",height:"362"})}),"\n",(0,d.jsxs)(t.p,{children:["Notice how the ",(0,d.jsx)(t.code,{children:"details"})," field contains a human-readable description of the error. Most errors will\nhave this, if looked up this way."]}),"\n",(0,d.jsxs)(t.p,{children:[(0,d.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/explorer/query/0xa10104ed21dfe409c7871a975155766c5dd97e1e2ac7faf3c90f1f8dca89104b",children:"This block"}),"\nis a live example of the above."]}),"\n",(0,d.jsxs)(t.p,{children:["If you cannot look up the error this way, or there is no message in the ",(0,d.jsx)(t.code,{children:"details"})," field, consult the\ntable below."]}),"\n",(0,d.jsx)(t.h2,{id:"subscan",children:"Subscan"}),"\n",(0,d.jsxs)(t.p,{children:["The ",(0,d.jsx)(t.code,{children:"ExtrinsicFailed"})," event indicates when a transaction does not succeed\n(",(0,d.jsx)(t.a,{href:"https://polkadot.subscan.io/extrinsic/19983878-2?event=19983878-53",children:"example"}),"). This event gives us\nthe ",(0,d.jsx)(t.code,{children:"error"})," and ",(0,d.jsx)(t.code,{children:"index"})," (as seen in the table of the event, in the ",(0,d.jsx)(t.code,{children:"dispatch_error"})," row) indices of\nthe error but does not give us a nice message to understand what it means. We will look up the error\nin the codebase ourselves to understand what went wrong."]}),"\n",(0,d.jsxs)(t.p,{children:["First, we should understand that the ",(0,d.jsx)(t.code,{children:"index"})," number is the index of the pallet in the runtime from\nwhich the error originated. The ",(0,d.jsx)(t.code,{children:"error"})," is likewise the index of that pallet's errors which is the\nexact one we're looking for. Both of these indices start counting from 0."]}),"\n",(0,d.jsxs)(t.p,{children:["For example, if ",(0,d.jsx)(t.code,{children:"index"})," is 5 and ",(0,d.jsx)(t.code,{children:"error"})," is 3, as in the example linked above, we need to look at\nthe runtime for the fourth error (index 3) in the sixth pallet (index 5)."]}),"\n",(0,d.jsxs)(t.p,{children:["By looking at the\n",(0,d.jsx)(t.a,{href:"https://github.com/polkadot-fellows/runtimes/blob/main/relay/polkadot/src/lib.rs",children:"runtime code"})," we\nsee that the pallet at index 5 is ",(0,d.jsx)(t.code,{children:"Balances"}),". Now we will check the Balances pallet's code which is\nhosted in the Substrate repository, and look for the fourth error in the ",(0,d.jsx)(t.code,{children:"Error enum"}),". According to\nits source the error that we got is ",(0,d.jsx)(t.code,{children:"InsufficientBalance"}),', or in other words, "Balance too low to\nsend value".']}),"\n",(0,d.jsx)(t.h2,{id:"common-errors",children:"Common Errors"}),"\n",(0,d.jsx)(t.p,{children:"The table below lists the most commonly encountered errors and ways to resolve them."}),"\n",(0,d.jsxs)(t.table,{children:[(0,d.jsx)(t.thead,{children:(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.th,{children:"Error"}),(0,d.jsx)(t.th,{children:"Description"}),(0,d.jsx)(t.th,{children:"Solution"})]})}),(0,d.jsxs)(t.tbody,{children:[(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{children:"BadOrigin"}),(0,d.jsx)(t.td,{children:"You are not allowed to do this operation, e.g. trying to create a council motion with a non-council account."}),(0,d.jsxs)(t.td,{children:["Either switch to an account that has the necessary permissions, or check if the operation you're trying to execute is permitted at all (e.g. calling ",(0,d.jsx)(t.code,{children:"system.setCode"})," to do a runtime upgrade directly, without voting)."]})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{children:"BadProof"}),(0,d.jsx)(t.td,{children:"The transaction's signature seems invalid."}),(0,d.jsx)(t.td,{children:"It's possible that the node you're connected to is following an obsolete fork - trying again after it catches up usually resolves the issue. To check for bigger problems, inspect the last finalized and current best block of the node you're connected to and compare the values to chain stats exposed by other nodes - are they in sync? If not, try connecting to a different node."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{children:"Future"}),(0,d.jsxs)(t.td,{children:['Transaction nonce too high, i.e. it\'s "from the future", ',(0,d.jsx)(t.strong,{children:"see note below"}),"."]}),(0,d.jsx)(t.td,{children:"Reduce the nonce to +1 of current nonce. Check current nonce by inspecting the address you're using to send the transaction."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{children:"Stale"}),(0,d.jsx)(t.td,{children:"Transaction nonce too low."}),(0,d.jsx)(t.td,{children:"Increase the nonce to +1 of current nonce. Check current nonce by inspecting the address you're using to send the transaction."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{children:"ExhaustsResources"}),(0,d.jsx)(t.td,{children:"There aren't enough resources left in the current block to submit this transaction."}),(0,d.jsx)(t.td,{children:"Try again in the next block."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{children:"Payment"}),(0,d.jsx)(t.td,{children:"Unable to pay for TX fee."}),(0,d.jsx)(t.td,{children:"You might not have enough free balance to cover the fee this transaction would incur."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{children:"Temporarily banned"}),(0,d.jsx)(t.td,{children:"The transaction is temporarily banned."}),(0,d.jsx)(t.td,{children:"The tx is already in pool. Either try on a different node, or wait to see if the initial transaction goes through."})]})]})]}),"\n",(0,d.jsx)(t.admonition,{title:"Future Error",type:"note",children:(0,d.jsxs)(t.p,{children:["This error will not cause the TX to be discarded immediately. Instead, it will be sent to the\n",(0,d.jsx)(t.a,{href:"https://docs.substrate.io/main-docs/fundamentals/transaction-lifecycle/",children:"futures queue"}),", where it\nwill wait to be executed at the correct place in the nonce sequence OR it will get discarded due to\nsome other error (ex. the validity period expires).*"]})}),"\n",(0,d.jsx)(t.h2,{id:"error-table",children:"Error Table"}),"\n",(0,d.jsx)(t.p,{children:"The below table is a reference to the errors that exists in Polkadot. It is generated from the\nruntime's metadata."}),"\n",(0,d.jsx)(t.h3,{id:"errors-from-current-pallets-on-polkadot",children:"Errors from Current Pallets on Polkadot"}),"\n",(0,d.jsxs)(t.table,{children:[(0,d.jsx)(t.thead,{children:(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.th,{children:"Pallet"}),(0,d.jsx)(t.th,{children:"Error"}),(0,d.jsx)(t.th,{children:"Documentation"})]})}),(0,d.jsxs)(t.tbody,{children:[(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{children:"System (0)"}),(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"InvalidSpecName (0)"}),(0,d.jsx)(t.td,{children:"The name of specification does not match between the current runtime and the new runtime."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"SpecVersionNeedsToIncrease (1)"}),(0,d.jsx)(t.td,{children:"The specification version is not allowed to decrease between the current runtime and the new runtime."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"FailedToExtractRuntimeVersion (2)"}),(0,d.jsxs)(t.td,{children:["Failed to extract the runtime version from the new runtime. Either calling ",(0,d.jsx)(t.code,{children:"Core_version"})," or decoding ",(0,d.jsx)(t.code,{children:"RuntimeVersion"})," failed."]})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"NonDefaultComposite (3)"}),(0,d.jsx)(t.td,{children:"Suicide called when the account has non-default composite data."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"NonZeroRefCount (4)"}),(0,d.jsx)(t.td,{children:"There is a non-zero reference count preventing the account from being purged."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{children:"Scheduler (1)"}),(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"FailedToSchedule (0)"}),(0,d.jsx)(t.td,{children:"Failed to schedule a call"})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"NotFound (1)"}),(0,d.jsx)(t.td,{children:"Cannot find the scheduled call."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"TargetBlockNumberInPast (2)"}),(0,d.jsx)(t.td,{children:"Given target block number is in the past."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"RescheduleNoChange (3)"}),(0,d.jsx)(t.td,{children:"Reschedule failed because it does not change scheduled time."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{children:"Balances (5)"}),(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"VestingBalance (0)"}),(0,d.jsx)(t.td,{children:"Vesting balance too high to send value"})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"LiquidityRestrictions (1)"}),(0,d.jsx)(t.td,{children:"Account liquidity restrictions prevent withdrawal"})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"Overflow (2)"}),(0,d.jsx)(t.td,{children:"Got an overflow after adding"})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"InsufficientBalance (3)"}),(0,d.jsx)(t.td,{children:"Balance too low to send value"})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"ExistentialDeposit (4)"}),(0,d.jsx)(t.td,{children:"Value too low to create account due to existential deposit"})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"KeepAlive (5)"}),(0,d.jsx)(t.td,{children:"Transfer/payment would kill account"})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"ExistingVestingSchedule (6)"}),(0,d.jsx)(t.td,{children:"A vesting schedule already exists for this account"})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"DeadAccount (7)"}),(0,d.jsx)(t.td,{children:"Beneficiary account must pre-exist"})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{children:"Authorship (6)"}),(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"InvalidUncleParent (0)"}),(0,d.jsx)(t.td,{children:"The uncle parent not in the chain."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"UnclesAlreadySet (1)"}),(0,d.jsx)(t.td,{children:"Uncles already set in the block."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"TooManyUncles (2)"}),(0,d.jsx)(t.td,{children:"Too many uncles."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"GenesisUncle (3)"}),(0,d.jsx)(t.td,{children:"The uncle is genesis."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"TooHighUncle (4)"}),(0,d.jsx)(t.td,{children:"The uncle is too high in chain."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"UncleAlreadyIncluded (5)"}),(0,d.jsx)(t.td,{children:"The uncle is already included."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"OldUncle (6)"}),(0,d.jsx)(t.td,{children:"The uncle isn't recent enough to be included."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{children:"Staking (7)"}),(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"NotController (0)"}),(0,d.jsx)(t.td,{children:"Not a controller account."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"NotStash (1)"}),(0,d.jsx)(t.td,{children:"Not a stash account."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"AlreadyBonded (2)"}),(0,d.jsx)(t.td,{children:"Stash is already bonded."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"AlreadyPaired (3)"}),(0,d.jsx)(t.td,{children:"Controller is already paired."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"EmptyTargets (4)"}),(0,d.jsx)(t.td,{children:"Targets cannot be empty."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"DuplicateIndex (5)"}),(0,d.jsx)(t.td,{children:"Duplicate index."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"InvalidSlashIndex (6)"}),(0,d.jsx)(t.td,{children:"Slash record index out of bounds."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"InsufficientValue (7)"}),(0,d.jsx)(t.td,{children:"Can not bond with value less than minimum balance."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"NoMoreChunks (8)"}),(0,d.jsx)(t.td,{children:"Can not schedule more unlock chunks."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"NoUnlockChunk (9)"}),(0,d.jsx)(t.td,{children:"Can not rebond without unlocking chunks."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"FundedTarget (10)"}),(0,d.jsx)(t.td,{children:"Attempting to target a stash that still has funds."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"InvalidEraToReward (11)"}),(0,d.jsx)(t.td,{children:"Invalid era to reward."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"InvalidNumberOfNominations (12)"}),(0,d.jsx)(t.td,{children:"Invalid number of nominations."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"NotSortedAndUnique (13)"}),(0,d.jsx)(t.td,{children:"Items are not sorted and unique."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"AlreadyClaimed (14)"}),(0,d.jsx)(t.td,{children:"Rewards for this era have already been claimed for this validator."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"OffchainElectionEarlySubmission (15)"}),(0,d.jsx)(t.td,{children:"The submitted result is received out of the open window."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"OffchainElectionWeakSubmission (16)"}),(0,d.jsx)(t.td,{children:"The submitted result is not as good as the one stored on chain."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"SnapshotUnavailable (17)"}),(0,d.jsx)(t.td,{children:"The snapshot data of the current window is missing."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"OffchainElectionBogusWinnerCount (18)"}),(0,d.jsx)(t.td,{children:"Incorrect number of winners were presented."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"OffchainElectionBogusWinner (19)"}),(0,d.jsx)(t.td,{children:"One of the submitted winners is not an active candidate on chain (index is out of range in snapshot)."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"OffchainElectionBogusCompact (20)"}),(0,d.jsxs)(t.td,{children:["Error while building the assignment type from the compact. This can happen if an index is invalid, or if the weights ",(0,d.jsx)(t.em,{children:"overflow"}),"."]})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"OffchainElectionBogusNominator (21)"}),(0,d.jsx)(t.td,{children:"One of the submitted nominators is not an active nominator on chain."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"OffchainElectionBogusNomination (22)"}),(0,d.jsx)(t.td,{children:"One of the submitted nominators has an edge to which they have not voted on chain."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"OffchainElectionSlashedNomination (23)"}),(0,d.jsx)(t.td,{children:"One of the submitted nominators has an edge which is submitted before the last non-zero slash of the target."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"OffchainElectionBogusSelfVote (24)"}),(0,d.jsx)(t.td,{children:"A self vote must only be originated from a validator to ONLY themselves."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"OffchainElectionBogusEdge (25)"}),(0,d.jsx)(t.td,{children:"The submitted result has unknown edges that are not among the presented winners."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"OffchainElectionBogusScore (26)"}),(0,d.jsx)(t.td,{children:"The claimed score does not match with the one computed from the data."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"OffchainElectionBogusElectionSize (27)"}),(0,d.jsx)(t.td,{children:"The election size is invalid."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"CallNotAllowed (28)"}),(0,d.jsx)(t.td,{children:"The call is not allowed at the given time due to restrictions of election period."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"IncorrectHistoryDepth (29)"}),(0,d.jsx)(t.td,{children:"Incorrect previous history depth input provided."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"IncorrectSlashingSpans (30)"}),(0,d.jsx)(t.td,{children:"Incorrect number of slashing spans provided."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{children:"Session (9)"}),(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"InvalidProof (0)"}),(0,d.jsx)(t.td,{children:"Invalid ownership proof."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"NoAssociatedValidatorId (1)"}),(0,d.jsx)(t.td,{children:"No associated validator ID for account."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"DuplicatedKey (2)"}),(0,d.jsx)(t.td,{children:"Registered duplicate key."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"NoKeys (3)"}),(0,d.jsx)(t.td,{children:"No keys are associated with this account."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{children:"Grandpa (11)"}),(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"PauseFailed (0)"}),(0,d.jsx)(t.td,{children:"Attempt to signal GRANDPA pause when the authority set isn't live (either paused or already pending pause)."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"ResumeFailed (1)"}),(0,d.jsx)(t.td,{children:"Attempt to signal GRANDPA resume when the authority set isn't paused (either live or already pending resume)."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"ChangePending (2)"}),(0,d.jsx)(t.td,{children:"Attempt to signal GRANDPA change with one already pending."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"TooSoon (3)"}),(0,d.jsx)(t.td,{children:"Cannot signal forced change so soon after last."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"InvalidKeyOwnershipProof (4)"}),(0,d.jsx)(t.td,{children:"A key ownership proof provided as part of an equivocation report is invalid."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"InvalidEquivocationProof (5)"}),(0,d.jsx)(t.td,{children:"An equivocation proof provided as part of an equivocation report is invalid."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"DuplicateOffenceReport (6)"}),(0,d.jsx)(t.td,{children:"A given equivocation report is valid but already previously reported."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{children:"ElectionsPhragmen (17)"}),(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"UnableToVote (0)"}),(0,d.jsx)(t.td,{children:"Cannot vote when no candidates or members exist."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"NoVotes (1)"}),(0,d.jsx)(t.td,{children:"Must vote for at least one candidate."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"TooManyVotes (2)"}),(0,d.jsx)(t.td,{children:"Cannot vote more than candidates."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"MaximumVotesExceeded (3)"}),(0,d.jsx)(t.td,{children:"Cannot vote more than maximum allowed."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"LowBalance (4)"}),(0,d.jsx)(t.td,{children:"Cannot vote with stake less than minimum balance."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"UnableToPayBond (5)"}),(0,d.jsx)(t.td,{children:"Voter can not pay voting bond."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"MustBeVoter (6)"}),(0,d.jsx)(t.td,{children:"Must be a voter."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"ReportSelf (7)"}),(0,d.jsx)(t.td,{children:"Cannot report self."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"DuplicatedCandidate (8)"}),(0,d.jsx)(t.td,{children:"Duplicated candidate submission."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"MemberSubmit (9)"}),(0,d.jsx)(t.td,{children:"Member cannot re-submit candidacy."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"RunnerSubmit (10)"}),(0,d.jsx)(t.td,{children:"Runner cannot re-submit candidacy."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"InsufficientCandidateFunds (11)"}),(0,d.jsx)(t.td,{children:"Candidate does not have enough funds."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"NotMember (12)"}),(0,d.jsx)(t.td,{children:"Not a member."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"InvalidCandidateCount (13)"}),(0,d.jsx)(t.td,{children:"The provided count of number of candidates is incorrect."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"InvalidVoteCount (14)"}),(0,d.jsx)(t.td,{children:"The provided count of number of votes is incorrect."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"InvalidRenouncing (15)"}),(0,d.jsxs)(t.td,{children:["The renouncing origin presented a wrong ",(0,d.jsx)(t.code,{children:"Renouncing"})," parameter."]})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"InvalidReplacement (16)"}),(0,d.jsx)(t.td,{children:"Prediction regarding replacement after member removal is wrong."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{children:"Treasury (19)"}),(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"InsufficientProposersBalance (0)"}),(0,d.jsx)(t.td,{children:"Proposer's balance is too low."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"InvalidIndex (1)"}),(0,d.jsx)(t.td,{children:"No proposal or bounty at that index."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"ReasonTooBig (2)"}),(0,d.jsx)(t.td,{children:"The reason given is just too big."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"AlreadyKnown (3)"}),(0,d.jsx)(t.td,{children:"The tip was already found/started."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"UnknownTip (4)"}),(0,d.jsx)(t.td,{children:"The tip hash is unknown."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"NotFinder (5)"}),(0,d.jsx)(t.td,{children:"The account attempting to retract the tip is not the finder of the tip."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"StillOpen (6)"}),(0,d.jsx)(t.td,{children:"The tip cannot be claimed/closed because there are not enough tippers yet."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"Premature (7)"}),(0,d.jsx)(t.td,{children:"The tip cannot be claimed/closed because it's still in the countdown period."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"UnexpectedStatus (8)"}),(0,d.jsx)(t.td,{children:"The bounty status is unexpected."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"RequireCurator (9)"}),(0,d.jsx)(t.td,{children:"Require bounty curator."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"InvalidValue (10)"}),(0,d.jsx)(t.td,{children:"Invalid bounty value."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"InvalidFee (11)"}),(0,d.jsx)(t.td,{children:"Invalid bounty fee."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"PendingPayout (12)"}),(0,d.jsx)(t.td,{children:"A bounty payout is pending. To cancel the bounty, you must unassign and slash the curator."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{children:"Claims (24)"}),(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"InvalidEthereumSignature (0)"}),(0,d.jsx)(t.td,{children:"Invalid Ethereum signature."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"SignerHasNoClaim (1)"}),(0,d.jsx)(t.td,{children:"Ethereum address has no claim."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"SenderHasNoClaim (2)"}),(0,d.jsx)(t.td,{children:"Account ID sending tx has no claim."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"PotUnderflow (3)"}),(0,d.jsx)(t.td,{children:"There's not enough in the pot to pay out some unvested amount. Generally implies a logic error."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"InvalidStatement (4)"}),(0,d.jsx)(t.td,{children:"A needed statement was not included."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"VestedBalanceExists (5)"}),(0,d.jsx)(t.td,{children:"The account already has a vested balance."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{children:"Vesting (25)"}),(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"NotVesting (0)"}),(0,d.jsx)(t.td,{children:"The account given is not vesting."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"ExistingVestingSchedule (1)"}),(0,d.jsx)(t.td,{children:"An existing vesting schedule already exists for this account that cannot be clobbered."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"AmountLow (2)"}),(0,d.jsx)(t.td,{children:"Amount being transferred is too low to create a vesting schedule."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{children:"Identity (28)"}),(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"TooManySubAccounts (0)"}),(0,d.jsx)(t.td,{children:"Too many subs-accounts."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"NotFound (1)"}),(0,d.jsx)(t.td,{children:"Account isn't found."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"NotNamed (2)"}),(0,d.jsx)(t.td,{children:"Account isn't named."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"EmptyIndex (3)"}),(0,d.jsx)(t.td,{children:"Empty index."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"FeeChanged (4)"}),(0,d.jsx)(t.td,{children:"Fee is changed."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"NoIdentity (5)"}),(0,d.jsx)(t.td,{children:"No identity found."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"StickyJudgement (6)"}),(0,d.jsx)(t.td,{children:"Sticky judgement."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"JudgementGiven (7)"}),(0,d.jsx)(t.td,{children:"Judgement given."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"InvalidJudgement (8)"}),(0,d.jsx)(t.td,{children:"Invalid judgement."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"InvalidIndex (9)"}),(0,d.jsx)(t.td,{children:"The index is invalid."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"InvalidTarget (10)"}),(0,d.jsx)(t.td,{children:"The target is invalid."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"TooManyFields (11)"}),(0,d.jsx)(t.td,{children:"Too many additional fields."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"TooManyRegistrars (12)"}),(0,d.jsx)(t.td,{children:"Maximum amount of registrars reached. Cannot add any more."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"AlreadyClaimed (13)"}),(0,d.jsx)(t.td,{children:"Account ID is already named."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"NotSub (14)"}),(0,d.jsx)(t.td,{children:"Sender is not a sub-account."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"NotOwned (15)"}),(0,d.jsx)(t.td,{children:"Sub-account isn't owned by sender."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{children:"Proxy (29)"}),(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"TooMany (0)"}),(0,d.jsx)(t.td,{children:"There are too many proxies registered or too many announcements pending."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"NotFound (1)"}),(0,d.jsx)(t.td,{children:"Proxy registration not found."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"NotProxy (2)"}),(0,d.jsx)(t.td,{children:"Sender is not a proxy of the account to be proxied."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"Unproxyable (3)"}),(0,d.jsx)(t.td,{children:"A call which is incompatible with the proxy type's filter was attempted."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"Duplicate (4)"}),(0,d.jsx)(t.td,{children:"Account is already a proxy."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"NoPermission (5)"}),(0,d.jsx)(t.td,{children:"Call may not be made by proxy because it may escalate its privileges."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"Unannounced (6)"}),(0,d.jsx)(t.td,{children:"Announcement, if made at all, was made too recently."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{children:"Multisig (30)"}),(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"MinimumThreshold (0)"}),(0,d.jsx)(t.td,{children:"Threshold must be 2 or greater."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"AlreadyApproved (1)"}),(0,d.jsx)(t.td,{children:"Call is already approved by this signatory."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"NoApprovalsNeeded (2)"}),(0,d.jsx)(t.td,{children:"Call doesn't need any (more) approvals."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"TooFewSignatories (3)"}),(0,d.jsx)(t.td,{children:"There are too few signatories in the list."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"TooManySignatories (4)"}),(0,d.jsx)(t.td,{children:"There are too many signatories in the list."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"SignatoriesOutOfOrder (5)"}),(0,d.jsx)(t.td,{children:"The signatories were provided out of order; they should be ordered."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"SenderInSignatories (6)"}),(0,d.jsx)(t.td,{children:"The sender was contained in the other signatories; it shouldn't be."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"NotFound (7)"}),(0,d.jsx)(t.td,{children:"Multisig operation not found when attempting to cancel."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"NotOwner (8)"}),(0,d.jsx)(t.td,{children:"Only the account that originally created the multisig is able to cancel it."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"NoTimepoint (9)"}),(0,d.jsx)(t.td,{children:"No timepoint was given, yet the multisig operation is already underway."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"WrongTimepoint (10)"}),(0,d.jsx)(t.td,{children:"A different timepoint was given to the multisig operation that is underway."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"UnexpectedTimepoint (11)"}),(0,d.jsx)(t.td,{children:"A timepoint was given, yet no multisig operation is underway."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"WeightTooLow (12)"}),(0,d.jsx)(t.td,{children:"The maximum weight information provided was too low."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"AlreadyStored (13)"}),(0,d.jsx)(t.td,{children:"The data to be stored is already stored."})]})]})]}),"\n",(0,d.jsx)(t.h3,{id:"errors-from-deprecated-pallets-on-polkadot",children:"Errors from Deprecated Pallets on Polkadot"}),"\n",(0,d.jsxs)(t.table,{children:[(0,d.jsx)(t.thead,{children:(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.th,{children:"Pallet"}),(0,d.jsx)(t.th,{children:"Error"}),(0,d.jsx)(t.th,{children:"Documentation"})]})}),(0,d.jsxs)(t.tbody,{children:[(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{children:"Council (15)"}),(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"NotMember (0)"}),(0,d.jsx)(t.td,{children:"Account is not a member"})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"DuplicateProposal (1)"}),(0,d.jsx)(t.td,{children:"Duplicate proposals not allowed"})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"ProposalMissing (2)"}),(0,d.jsx)(t.td,{children:"Proposal must exist"})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"WrongIndex (3)"}),(0,d.jsx)(t.td,{children:"Mismatched index"})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"DuplicateVote (4)"}),(0,d.jsx)(t.td,{children:"Duplicate vote ignored"})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"AlreadyInitialized (5)"}),(0,d.jsx)(t.td,{children:"Members are already initialized!"})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"TooEarly (6)"}),(0,d.jsx)(t.td,{children:"The close call was made too early, before the end of the voting."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"TooManyProposals (7)"}),(0,d.jsxs)(t.td,{children:["There can only be a maximum of ",(0,d.jsx)(t.code,{children:"MaxProposals"})," active proposals."]})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"WrongProposalWeight (8)"}),(0,d.jsx)(t.td,{children:"The given weight bound for the proposal was too low."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"WrongProposalLength (9)"}),(0,d.jsx)(t.td,{children:"The given length bound for the proposal was too low."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{children:"TechnicalCommittee (16)"}),(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"NotMember (0)"}),(0,d.jsx)(t.td,{children:"Account is not a member"})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"DuplicateProposal (1)"}),(0,d.jsx)(t.td,{children:"Duplicate proposals not allowed"})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"ProposalMissing (2)"}),(0,d.jsx)(t.td,{children:"Proposal must exist"})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"WrongIndex (3)"}),(0,d.jsx)(t.td,{children:"Mismatched index"})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"DuplicateVote (4)"}),(0,d.jsx)(t.td,{children:"Duplicate vote ignored"})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"AlreadyInitialized (5)"}),(0,d.jsx)(t.td,{children:"Members are already initialized!"})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"TooEarly (6)"}),(0,d.jsx)(t.td,{children:"The close call was made too early, before the end of the voting."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"TooManyProposals (7)"}),(0,d.jsxs)(t.td,{children:["There can only be a maximum of ",(0,d.jsx)(t.code,{children:"MaxProposals"})," active proposals."]})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"WrongProposalWeight (8)"}),(0,d.jsx)(t.td,{children:"The given weight bound for the proposal was too low."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"WrongProposalLength (9)"}),(0,d.jsx)(t.td,{children:"The given length bound for the proposal was too low."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{children:"Democracy (14)"}),(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"ValueLow (0)"}),(0,d.jsx)(t.td,{children:"Value too low"})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"ProposalMissing (1)"}),(0,d.jsx)(t.td,{children:"Proposal does not exist"})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"BadIndex (2)"}),(0,d.jsx)(t.td,{children:"Unknown index"})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"AlreadyCanceled (3)"}),(0,d.jsx)(t.td,{children:"Cannot cancel the same proposal twice"})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"DuplicateProposal (4)"}),(0,d.jsx)(t.td,{children:"Proposal already made"})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"ProposalBlacklisted (5)"}),(0,d.jsx)(t.td,{children:"Proposal still blacklisted"})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"NotSimpleMajority (6)"}),(0,d.jsx)(t.td,{children:"Next external proposal not simple majority"})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"InvalidHash (7)"}),(0,d.jsx)(t.td,{children:"Invalid hash"})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"NoProposal (8)"}),(0,d.jsx)(t.td,{children:"No external proposal"})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"AlreadyVetoed (9)"}),(0,d.jsx)(t.td,{children:"Identity may not veto a proposal twice"})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"NotDelegated (10)"}),(0,d.jsx)(t.td,{children:"Not delegated"})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"DuplicatePreimage (11)"}),(0,d.jsx)(t.td,{children:"Preimage already noted"})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"NotImminent (12)"}),(0,d.jsx)(t.td,{children:"Not imminent"})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"TooEarly (13)"}),(0,d.jsx)(t.td,{children:"Too early"})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"Imminent (14)"}),(0,d.jsx)(t.td,{children:"Imminent"})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"PreimageMissing (15)"}),(0,d.jsx)(t.td,{children:"Preimage not found"})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"ReferendumInvalid (16)"}),(0,d.jsx)(t.td,{children:"Vote given for invalid referendum"})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"PreimageInvalid (17)"}),(0,d.jsx)(t.td,{children:"Invalid preimage"})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"NoneWaiting (18)"}),(0,d.jsx)(t.td,{children:"No proposals waiting"})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"NotLocked (19)"}),(0,d.jsx)(t.td,{children:"The target account does not have a lock."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"NotExpired (20)"}),(0,d.jsx)(t.td,{children:"The lock on the account to be unlocked has not yet expired."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"NotVoter (21)"}),(0,d.jsx)(t.td,{children:"The given account did not vote on the referendum."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"NoPermission (22)"}),(0,d.jsx)(t.td,{children:"The actor has no permission to conduct the action."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"AlreadyDelegating (23)"}),(0,d.jsx)(t.td,{children:"The account is already delegating."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"Overflow (24)"}),(0,d.jsx)(t.td,{children:"An unexpected integer overflow occurred."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"Underflow (25)"}),(0,d.jsx)(t.td,{children:"An unexpected integer underflow occurred."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"InsufficientFunds (26)"}),(0,d.jsx)(t.td,{children:"Too high a balance was provided that the account cannot afford."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"NotDelegating (27)"}),(0,d.jsx)(t.td,{children:"The account is not currently delegating."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"VotesExist (28)"}),(0,d.jsxs)(t.td,{children:["The account currently has votes attached to it and the operation cannot succeed until these are removed, either through ",(0,d.jsx)(t.code,{children:"unvote"})," or ",(0,d.jsx)(t.code,{children:"reap_vote"}),"."]})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"InstantNotAllowed (29)"}),(0,d.jsx)(t.td,{children:"The instant referendum origin is currently disallowed."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"Nonsense (30)"}),(0,d.jsx)(t.td,{children:"Delegation to oneself makes no sense."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"WrongUpperBound (31)"}),(0,d.jsx)(t.td,{children:"Invalid upper bound."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"MaxVotesReached (32)"}),(0,d.jsx)(t.td,{children:"Maximum number of votes reached."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"InvalidWitness (33)"}),(0,d.jsx)(t.td,{children:"The provided witness data is wrong."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{}),(0,d.jsx)(t.td,{children:"TooManyProposals (34)"}),(0,d.jsx)(t.td,{children:"Maximum number of proposals reached."})]})]})]})]})}function a(e={}){const{wrapper:t}={...(0,n.R)(),...e.components};return t?(0,d.jsx)(t,{...e,children:(0,d.jsx)(h,{...e})}):h(e)}},58691:(e,t,s)=>{s.d(t,{A:()=>d});const d=s.p+"assets/images/01-44e982847dc13a68b04abbc5757fae86.jpg"},64212:(e,t,s)=>{s.d(t,{A:()=>d});const d=s.p+"assets/images/02-eb569cd528fa9b5a6d990c6a10ec2b43.jpg"},28453:(e,t,s)=>{s.d(t,{R:()=>i,x:()=>l});var d=s(96540);const n={},r=d.createContext(n);function i(e){const t=d.useContext(r);return d.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function l(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:i(e.components),d.createElement(r.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/85afe03a.c61674f1.js b/assets/js/85afe03a.c61674f1.js new file mode 100644 index 000000000000..0db40eeacaef --- /dev/null +++ b/assets/js/85afe03a.c61674f1.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1628],{42692:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>o,contentTitle:()=>l,default:()=>a,frontMatter:()=>i,metadata:()=>d,toc:()=>c});const d=JSON.parse('{"id":"maintain/maintain-errors","title":"Errors and How to Resolve Them","description":"Common errors you might encounter and how they can be resolved.","source":"@site/../docs/maintain/maintain-errors.md","sourceDirName":"maintain","slug":"/maintain-errors","permalink":"/docs/maintain-errors","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/maintain/maintain-errors.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1729504323000,"frontMatter":{"id":"maintain-errors","title":"Errors and How to Resolve Them","sidebar_label":"Resolving Errors","description":"Common errors you might encounter and how they can be resolved.","keywords":["errors","common errors","fix errors"],"slug":"../maintain-errors"},"sidebar":"docs","previous":{"title":"Networks","permalink":"/docs/maintain-networks"},"next":{"title":"Collator Guides","permalink":"/docs/maintain-collator-index"}}');var n=s(74848),r=s(28453);const i={id:"maintain-errors",title:"Errors and How to Resolve Them",sidebar_label:"Resolving Errors",description:"Common errors you might encounter and how they can be resolved.",keywords:["errors","common errors","fix errors"],slug:"../maintain-errors"},l=void 0,o={},c=[{value:"Polkadot-JS Apps Explorer",id:"polkadot-js-apps-explorer",level:2},{value:"Subscan",id:"subscan",level:2},{value:"Common Errors",id:"common-errors",level:2},{value:"Error Table",id:"error-table",level:2},{value:"Errors from Current Pallets on Polkadot",id:"errors-from-current-pallets-on-polkadot",level:3},{value:"Errors from Deprecated Pallets on Polkadot",id:"errors-from-deprecated-pallets-on-polkadot",level:3}];function h(e){const t={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,r.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(t.p,{children:["Errors in Substrate-based chains are usually accompanied by descriptive messages. However, to read\nthese messages, a tool parsing the blockchain data needs to request ",(0,n.jsx)(t.em,{children:"chain metadata"})," from a node.\nThat metadata explains how to read the messages. One such tool with a built-in parser for chain\nmetadata is the ",(0,n.jsx)(t.a,{href:"https://polkadot.js.org/apps",children:"Polkadot-JS Apps UI"}),"."]}),"\n",(0,n.jsxs)(t.p,{children:["If this page does not answer your question, try searching for your problem at the\n",(0,n.jsx)(t.a,{href:"https://support.polkadot.network/",children:"Polkadot Knowledge Base"})," for more information on troubleshooting\nyour issue."]}),"\n",(0,n.jsx)(t.h2,{id:"polkadot-js-apps-explorer",children:"Polkadot-JS Apps Explorer"}),"\n",(0,n.jsx)(t.p,{children:"Here's how to find out the detailed error description through Polkadot-JS Apps."}),"\n",(0,n.jsx)(t.p,{children:"A typical failed transactions looks something like this:"}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"Error while sending a transaction",src:s(58691).A+"",width:"347",height:"291"})}),"\n",(0,n.jsx)(t.p,{children:"The image displays only the error name as defined in the code, not its error message. Despite this\nerror being rather self-explanatory, let's find its details."}),"\n",(0,n.jsxs)(t.p,{children:["In the ",(0,n.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/explorer",children:"explorer tab"}),", find the block in which this failure\noccurred. Then, expand the ",(0,n.jsx)(t.code,{children:"system.ExtrinsicFailed"})," frame:"]}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"Error described",src:s(64212).A+"",width:"627",height:"362"})}),"\n",(0,n.jsxs)(t.p,{children:["Notice how the ",(0,n.jsx)(t.code,{children:"details"})," field contains a human-readable description of the error. Most errors will\nhave this, if looked up this way."]}),"\n",(0,n.jsxs)(t.p,{children:[(0,n.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/explorer/query/0xa10104ed21dfe409c7871a975155766c5dd97e1e2ac7faf3c90f1f8dca89104b",children:"This block"}),"\nis a live example of the above."]}),"\n",(0,n.jsxs)(t.p,{children:["If you cannot look up the error this way, or there is no message in the ",(0,n.jsx)(t.code,{children:"details"})," field, consult the\ntable below."]}),"\n",(0,n.jsx)(t.h2,{id:"subscan",children:"Subscan"}),"\n",(0,n.jsxs)(t.p,{children:["The ",(0,n.jsx)(t.code,{children:"ExtrinsicFailed"})," event indicates when a transaction does not succeed\n(",(0,n.jsx)(t.a,{href:"https://polkadot.subscan.io/extrinsic/19983878-2?event=19983878-53",children:"example"}),"). This event gives us\nthe ",(0,n.jsx)(t.code,{children:"error"})," and ",(0,n.jsx)(t.code,{children:"index"})," (as seen in the table of the event, in the ",(0,n.jsx)(t.code,{children:"dispatch_error"})," row) indices of\nthe error but does not give us a nice message to understand what it means. We will look up the error\nin the codebase ourselves to understand what went wrong."]}),"\n",(0,n.jsxs)(t.p,{children:["First, we should understand that the ",(0,n.jsx)(t.code,{children:"index"})," number is the index of the pallet in the runtime from\nwhich the error originated. The ",(0,n.jsx)(t.code,{children:"error"})," is likewise the index of that pallet's errors which is the\nexact one we're looking for. Both of these indices start counting from 0."]}),"\n",(0,n.jsxs)(t.p,{children:["For example, if ",(0,n.jsx)(t.code,{children:"index"})," is 5 and ",(0,n.jsx)(t.code,{children:"error"})," is 3, as in the example linked above, we need to look at\nthe runtime for the fourth error (index 3) in the sixth pallet (index 5)."]}),"\n",(0,n.jsxs)(t.p,{children:["By looking at the\n",(0,n.jsx)(t.a,{href:"https://github.com/polkadot-fellows/runtimes/blob/main/relay/polkadot/src/lib.rs",children:"runtime code"})," we\nsee that the pallet at index 5 is ",(0,n.jsx)(t.code,{children:"Balances"}),". Now we will check the Balances pallet's code which is\nhosted in the Substrate repository, and look for the fourth error in the ",(0,n.jsx)(t.code,{children:"Error enum"}),". According to\nits source the error that we got is ",(0,n.jsx)(t.code,{children:"InsufficientBalance"}),', or in other words, "Balance too low to\nsend value".']}),"\n",(0,n.jsx)(t.h2,{id:"common-errors",children:"Common Errors"}),"\n",(0,n.jsx)(t.p,{children:"The table below lists the most commonly encountered errors and ways to resolve them."}),"\n",(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Error"}),(0,n.jsx)(t.th,{children:"Description"}),(0,n.jsx)(t.th,{children:"Solution"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"BadOrigin"}),(0,n.jsx)(t.td,{children:"You are not allowed to do this operation, e.g. trying to create a council motion with a non-council account."}),(0,n.jsxs)(t.td,{children:["Either switch to an account that has the necessary permissions, or check if the operation you're trying to execute is permitted at all (e.g. calling ",(0,n.jsx)(t.code,{children:"system.setCode"})," to do a runtime upgrade directly, without voting)."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"BadProof"}),(0,n.jsx)(t.td,{children:"The transaction's signature seems invalid."}),(0,n.jsx)(t.td,{children:"It's possible that the node you're connected to is following an obsolete fork - trying again after it catches up usually resolves the issue. To check for bigger problems, inspect the last finalized and current best block of the node you're connected to and compare the values to chain stats exposed by other nodes - are they in sync? If not, try connecting to a different node."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Future"}),(0,n.jsxs)(t.td,{children:['Transaction nonce too high, i.e. it\'s "from the future", ',(0,n.jsx)(t.strong,{children:"see note below"}),"."]}),(0,n.jsx)(t.td,{children:"Reduce the nonce to +1 of current nonce. Check current nonce by inspecting the address you're using to send the transaction."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Stale"}),(0,n.jsx)(t.td,{children:"Transaction nonce too low."}),(0,n.jsx)(t.td,{children:"Increase the nonce to +1 of current nonce. Check current nonce by inspecting the address you're using to send the transaction."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"ExhaustsResources"}),(0,n.jsx)(t.td,{children:"There aren't enough resources left in the current block to submit this transaction."}),(0,n.jsx)(t.td,{children:"Try again in the next block."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Payment"}),(0,n.jsx)(t.td,{children:"Unable to pay for TX fee."}),(0,n.jsx)(t.td,{children:"You might not have enough free balance to cover the fee this transaction would incur."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Temporarily banned"}),(0,n.jsx)(t.td,{children:"The transaction is temporarily banned."}),(0,n.jsx)(t.td,{children:"The tx is already in pool. Either try on a different node, or wait to see if the initial transaction goes through."})]})]})]}),"\n",(0,n.jsx)(t.admonition,{title:"Future Error",type:"note",children:(0,n.jsxs)(t.p,{children:["This error will not cause the TX to be discarded immediately. Instead, it will be sent to the\n",(0,n.jsx)(t.a,{href:"https://docs.substrate.io/main-docs/fundamentals/transaction-lifecycle/",children:"futures queue"}),", where it\nwill wait to be executed at the correct place in the nonce sequence OR it will get discarded due to\nsome other error (ex. the validity period expires).*"]})}),"\n",(0,n.jsx)(t.h2,{id:"error-table",children:"Error Table"}),"\n",(0,n.jsx)(t.p,{children:"The below table is a reference to the errors that exists in Polkadot. It is generated from the\nruntime's metadata."}),"\n",(0,n.jsx)(t.h3,{id:"errors-from-current-pallets-on-polkadot",children:"Errors from Current Pallets on Polkadot"}),"\n",(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Pallet"}),(0,n.jsx)(t.th,{children:"Error"}),(0,n.jsx)(t.th,{children:"Documentation"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"System (0)"}),(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"InvalidSpecName (0)"}),(0,n.jsx)(t.td,{children:"The name of specification does not match between the current runtime and the new runtime."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"SpecVersionNeedsToIncrease (1)"}),(0,n.jsx)(t.td,{children:"The specification version is not allowed to decrease between the current runtime and the new runtime."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"FailedToExtractRuntimeVersion (2)"}),(0,n.jsxs)(t.td,{children:["Failed to extract the runtime version from the new runtime. Either calling ",(0,n.jsx)(t.code,{children:"Core_version"})," or decoding ",(0,n.jsx)(t.code,{children:"RuntimeVersion"})," failed."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"NonDefaultComposite (3)"}),(0,n.jsx)(t.td,{children:"Suicide called when the account has non-default composite data."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"NonZeroRefCount (4)"}),(0,n.jsx)(t.td,{children:"There is a non-zero reference count preventing the account from being purged."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Scheduler (1)"}),(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"FailedToSchedule (0)"}),(0,n.jsx)(t.td,{children:"Failed to schedule a call"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"NotFound (1)"}),(0,n.jsx)(t.td,{children:"Cannot find the scheduled call."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"TargetBlockNumberInPast (2)"}),(0,n.jsx)(t.td,{children:"Given target block number is in the past."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"RescheduleNoChange (3)"}),(0,n.jsx)(t.td,{children:"Reschedule failed because it does not change scheduled time."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Balances (5)"}),(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"VestingBalance (0)"}),(0,n.jsx)(t.td,{children:"Vesting balance too high to send value"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"LiquidityRestrictions (1)"}),(0,n.jsx)(t.td,{children:"Account liquidity restrictions prevent withdrawal"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"Overflow (2)"}),(0,n.jsx)(t.td,{children:"Got an overflow after adding"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"InsufficientBalance (3)"}),(0,n.jsx)(t.td,{children:"Balance too low to send value"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"ExistentialDeposit (4)"}),(0,n.jsx)(t.td,{children:"Value too low to create account due to existential deposit"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"KeepAlive (5)"}),(0,n.jsx)(t.td,{children:"Transfer/payment would kill account"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"ExistingVestingSchedule (6)"}),(0,n.jsx)(t.td,{children:"A vesting schedule already exists for this account"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"DeadAccount (7)"}),(0,n.jsx)(t.td,{children:"Beneficiary account must pre-exist"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Authorship (6)"}),(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"InvalidUncleParent (0)"}),(0,n.jsx)(t.td,{children:"The uncle parent not in the chain."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"UnclesAlreadySet (1)"}),(0,n.jsx)(t.td,{children:"Uncles already set in the block."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"TooManyUncles (2)"}),(0,n.jsx)(t.td,{children:"Too many uncles."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"GenesisUncle (3)"}),(0,n.jsx)(t.td,{children:"The uncle is genesis."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"TooHighUncle (4)"}),(0,n.jsx)(t.td,{children:"The uncle is too high in chain."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"UncleAlreadyIncluded (5)"}),(0,n.jsx)(t.td,{children:"The uncle is already included."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"OldUncle (6)"}),(0,n.jsx)(t.td,{children:"The uncle isn't recent enough to be included."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Staking (7)"}),(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"NotController (0)"}),(0,n.jsx)(t.td,{children:"Not a controller account."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"NotStash (1)"}),(0,n.jsx)(t.td,{children:"Not a stash account."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"AlreadyBonded (2)"}),(0,n.jsx)(t.td,{children:"Stash is already bonded."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"AlreadyPaired (3)"}),(0,n.jsx)(t.td,{children:"Controller is already paired."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"EmptyTargets (4)"}),(0,n.jsx)(t.td,{children:"Targets cannot be empty."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"DuplicateIndex (5)"}),(0,n.jsx)(t.td,{children:"Duplicate index."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"InvalidSlashIndex (6)"}),(0,n.jsx)(t.td,{children:"Slash record index out of bounds."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"InsufficientValue (7)"}),(0,n.jsx)(t.td,{children:"Can not bond with value less than minimum balance."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"NoMoreChunks (8)"}),(0,n.jsx)(t.td,{children:"Can not schedule more unlock chunks."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"NoUnlockChunk (9)"}),(0,n.jsx)(t.td,{children:"Can not rebond without unlocking chunks."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"FundedTarget (10)"}),(0,n.jsx)(t.td,{children:"Attempting to target a stash that still has funds."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"InvalidEraToReward (11)"}),(0,n.jsx)(t.td,{children:"Invalid era to reward."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"InvalidNumberOfNominations (12)"}),(0,n.jsx)(t.td,{children:"Invalid number of nominations."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"NotSortedAndUnique (13)"}),(0,n.jsx)(t.td,{children:"Items are not sorted and unique."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"AlreadyClaimed (14)"}),(0,n.jsx)(t.td,{children:"Rewards for this era have already been claimed for this validator."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"OffchainElectionEarlySubmission (15)"}),(0,n.jsx)(t.td,{children:"The submitted result is received out of the open window."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"OffchainElectionWeakSubmission (16)"}),(0,n.jsx)(t.td,{children:"The submitted result is not as good as the one stored on chain."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"SnapshotUnavailable (17)"}),(0,n.jsx)(t.td,{children:"The snapshot data of the current window is missing."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"OffchainElectionBogusWinnerCount (18)"}),(0,n.jsx)(t.td,{children:"Incorrect number of winners were presented."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"OffchainElectionBogusWinner (19)"}),(0,n.jsx)(t.td,{children:"One of the submitted winners is not an active candidate on chain (index is out of range in snapshot)."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"OffchainElectionBogusCompact (20)"}),(0,n.jsxs)(t.td,{children:["Error while building the assignment type from the compact. This can happen if an index is invalid, or if the weights ",(0,n.jsx)(t.em,{children:"overflow"}),"."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"OffchainElectionBogusNominator (21)"}),(0,n.jsx)(t.td,{children:"One of the submitted nominators is not an active nominator on chain."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"OffchainElectionBogusNomination (22)"}),(0,n.jsx)(t.td,{children:"One of the submitted nominators has an edge to which they have not voted on chain."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"OffchainElectionSlashedNomination (23)"}),(0,n.jsx)(t.td,{children:"One of the submitted nominators has an edge which is submitted before the last non-zero slash of the target."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"OffchainElectionBogusSelfVote (24)"}),(0,n.jsx)(t.td,{children:"A self vote must only be originated from a validator to ONLY themselves."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"OffchainElectionBogusEdge (25)"}),(0,n.jsx)(t.td,{children:"The submitted result has unknown edges that are not among the presented winners."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"OffchainElectionBogusScore (26)"}),(0,n.jsx)(t.td,{children:"The claimed score does not match with the one computed from the data."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"OffchainElectionBogusElectionSize (27)"}),(0,n.jsx)(t.td,{children:"The election size is invalid."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"CallNotAllowed (28)"}),(0,n.jsx)(t.td,{children:"The call is not allowed at the given time due to restrictions of election period."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"IncorrectHistoryDepth (29)"}),(0,n.jsx)(t.td,{children:"Incorrect previous history depth input provided."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"IncorrectSlashingSpans (30)"}),(0,n.jsx)(t.td,{children:"Incorrect number of slashing spans provided."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Session (9)"}),(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"InvalidProof (0)"}),(0,n.jsx)(t.td,{children:"Invalid ownership proof."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"NoAssociatedValidatorId (1)"}),(0,n.jsx)(t.td,{children:"No associated validator ID for account."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"DuplicatedKey (2)"}),(0,n.jsx)(t.td,{children:"Registered duplicate key."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"NoKeys (3)"}),(0,n.jsx)(t.td,{children:"No keys are associated with this account."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Grandpa (11)"}),(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"PauseFailed (0)"}),(0,n.jsx)(t.td,{children:"Attempt to signal GRANDPA pause when the authority set isn't live (either paused or already pending pause)."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"ResumeFailed (1)"}),(0,n.jsx)(t.td,{children:"Attempt to signal GRANDPA resume when the authority set isn't paused (either live or already pending resume)."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"ChangePending (2)"}),(0,n.jsx)(t.td,{children:"Attempt to signal GRANDPA change with one already pending."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"TooSoon (3)"}),(0,n.jsx)(t.td,{children:"Cannot signal forced change so soon after last."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"InvalidKeyOwnershipProof (4)"}),(0,n.jsx)(t.td,{children:"A key ownership proof provided as part of an equivocation report is invalid."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"InvalidEquivocationProof (5)"}),(0,n.jsx)(t.td,{children:"An equivocation proof provided as part of an equivocation report is invalid."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"DuplicateOffenceReport (6)"}),(0,n.jsx)(t.td,{children:"A given equivocation report is valid but already previously reported."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"ElectionsPhragmen (17)"}),(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"UnableToVote (0)"}),(0,n.jsx)(t.td,{children:"Cannot vote when no candidates or members exist."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"NoVotes (1)"}),(0,n.jsx)(t.td,{children:"Must vote for at least one candidate."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"TooManyVotes (2)"}),(0,n.jsx)(t.td,{children:"Cannot vote more than candidates."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"MaximumVotesExceeded (3)"}),(0,n.jsx)(t.td,{children:"Cannot vote more than maximum allowed."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"LowBalance (4)"}),(0,n.jsx)(t.td,{children:"Cannot vote with stake less than minimum balance."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"UnableToPayBond (5)"}),(0,n.jsx)(t.td,{children:"Voter can not pay voting bond."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"MustBeVoter (6)"}),(0,n.jsx)(t.td,{children:"Must be a voter."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"ReportSelf (7)"}),(0,n.jsx)(t.td,{children:"Cannot report self."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"DuplicatedCandidate (8)"}),(0,n.jsx)(t.td,{children:"Duplicated candidate submission."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"MemberSubmit (9)"}),(0,n.jsx)(t.td,{children:"Member cannot re-submit candidacy."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"RunnerSubmit (10)"}),(0,n.jsx)(t.td,{children:"Runner cannot re-submit candidacy."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"InsufficientCandidateFunds (11)"}),(0,n.jsx)(t.td,{children:"Candidate does not have enough funds."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"NotMember (12)"}),(0,n.jsx)(t.td,{children:"Not a member."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"InvalidCandidateCount (13)"}),(0,n.jsx)(t.td,{children:"The provided count of number of candidates is incorrect."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"InvalidVoteCount (14)"}),(0,n.jsx)(t.td,{children:"The provided count of number of votes is incorrect."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"InvalidRenouncing (15)"}),(0,n.jsxs)(t.td,{children:["The renouncing origin presented a wrong ",(0,n.jsx)(t.code,{children:"Renouncing"})," parameter."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"InvalidReplacement (16)"}),(0,n.jsx)(t.td,{children:"Prediction regarding replacement after member removal is wrong."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Treasury (19)"}),(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"InsufficientProposersBalance (0)"}),(0,n.jsx)(t.td,{children:"Proposer's balance is too low."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"InvalidIndex (1)"}),(0,n.jsx)(t.td,{children:"No proposal or bounty at that index."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"ReasonTooBig (2)"}),(0,n.jsx)(t.td,{children:"The reason given is just too big."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"AlreadyKnown (3)"}),(0,n.jsx)(t.td,{children:"The tip was already found/started."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"UnknownTip (4)"}),(0,n.jsx)(t.td,{children:"The tip hash is unknown."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"NotFinder (5)"}),(0,n.jsx)(t.td,{children:"The account attempting to retract the tip is not the finder of the tip."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"StillOpen (6)"}),(0,n.jsx)(t.td,{children:"The tip cannot be claimed/closed because there are not enough tippers yet."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"Premature (7)"}),(0,n.jsx)(t.td,{children:"The tip cannot be claimed/closed because it's still in the countdown period."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"UnexpectedStatus (8)"}),(0,n.jsx)(t.td,{children:"The bounty status is unexpected."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"RequireCurator (9)"}),(0,n.jsx)(t.td,{children:"Require bounty curator."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"InvalidValue (10)"}),(0,n.jsx)(t.td,{children:"Invalid bounty value."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"InvalidFee (11)"}),(0,n.jsx)(t.td,{children:"Invalid bounty fee."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"PendingPayout (12)"}),(0,n.jsx)(t.td,{children:"A bounty payout is pending. To cancel the bounty, you must unassign and slash the curator."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Claims (24)"}),(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"InvalidEthereumSignature (0)"}),(0,n.jsx)(t.td,{children:"Invalid Ethereum signature."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"SignerHasNoClaim (1)"}),(0,n.jsx)(t.td,{children:"Ethereum address has no claim."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"SenderHasNoClaim (2)"}),(0,n.jsx)(t.td,{children:"Account ID sending tx has no claim."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"PotUnderflow (3)"}),(0,n.jsx)(t.td,{children:"There's not enough in the pot to pay out some unvested amount. Generally implies a logic error."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"InvalidStatement (4)"}),(0,n.jsx)(t.td,{children:"A needed statement was not included."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"VestedBalanceExists (5)"}),(0,n.jsx)(t.td,{children:"The account already has a vested balance."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Vesting (25)"}),(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"NotVesting (0)"}),(0,n.jsx)(t.td,{children:"The account given is not vesting."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"ExistingVestingSchedule (1)"}),(0,n.jsx)(t.td,{children:"An existing vesting schedule already exists for this account that cannot be clobbered."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"AmountLow (2)"}),(0,n.jsx)(t.td,{children:"Amount being transferred is too low to create a vesting schedule."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Identity (28)"}),(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"TooManySubAccounts (0)"}),(0,n.jsx)(t.td,{children:"Too many subs-accounts."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"NotFound (1)"}),(0,n.jsx)(t.td,{children:"Account isn't found."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"NotNamed (2)"}),(0,n.jsx)(t.td,{children:"Account isn't named."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"EmptyIndex (3)"}),(0,n.jsx)(t.td,{children:"Empty index."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"FeeChanged (4)"}),(0,n.jsx)(t.td,{children:"Fee is changed."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"NoIdentity (5)"}),(0,n.jsx)(t.td,{children:"No identity found."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"StickyJudgement (6)"}),(0,n.jsx)(t.td,{children:"Sticky judgement."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"JudgementGiven (7)"}),(0,n.jsx)(t.td,{children:"Judgement given."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"InvalidJudgement (8)"}),(0,n.jsx)(t.td,{children:"Invalid judgement."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"InvalidIndex (9)"}),(0,n.jsx)(t.td,{children:"The index is invalid."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"InvalidTarget (10)"}),(0,n.jsx)(t.td,{children:"The target is invalid."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"TooManyFields (11)"}),(0,n.jsx)(t.td,{children:"Too many additional fields."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"TooManyRegistrars (12)"}),(0,n.jsx)(t.td,{children:"Maximum amount of registrars reached. Cannot add any more."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"AlreadyClaimed (13)"}),(0,n.jsx)(t.td,{children:"Account ID is already named."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"NotSub (14)"}),(0,n.jsx)(t.td,{children:"Sender is not a sub-account."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"NotOwned (15)"}),(0,n.jsx)(t.td,{children:"Sub-account isn't owned by sender."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Proxy (29)"}),(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"TooMany (0)"}),(0,n.jsx)(t.td,{children:"There are too many proxies registered or too many announcements pending."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"NotFound (1)"}),(0,n.jsx)(t.td,{children:"Proxy registration not found."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"NotProxy (2)"}),(0,n.jsx)(t.td,{children:"Sender is not a proxy of the account to be proxied."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"Unproxyable (3)"}),(0,n.jsx)(t.td,{children:"A call which is incompatible with the proxy type's filter was attempted."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"Duplicate (4)"}),(0,n.jsx)(t.td,{children:"Account is already a proxy."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"NoPermission (5)"}),(0,n.jsx)(t.td,{children:"Call may not be made by proxy because it may escalate its privileges."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"Unannounced (6)"}),(0,n.jsx)(t.td,{children:"Announcement, if made at all, was made too recently."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Multisig (30)"}),(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"MinimumThreshold (0)"}),(0,n.jsx)(t.td,{children:"Threshold must be 2 or greater."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"AlreadyApproved (1)"}),(0,n.jsx)(t.td,{children:"Call is already approved by this signatory."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"NoApprovalsNeeded (2)"}),(0,n.jsx)(t.td,{children:"Call doesn't need any (more) approvals."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"TooFewSignatories (3)"}),(0,n.jsx)(t.td,{children:"There are too few signatories in the list."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"TooManySignatories (4)"}),(0,n.jsx)(t.td,{children:"There are too many signatories in the list."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"SignatoriesOutOfOrder (5)"}),(0,n.jsx)(t.td,{children:"The signatories were provided out of order; they should be ordered."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"SenderInSignatories (6)"}),(0,n.jsx)(t.td,{children:"The sender was contained in the other signatories; it shouldn't be."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"NotFound (7)"}),(0,n.jsx)(t.td,{children:"Multisig operation not found when attempting to cancel."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"NotOwner (8)"}),(0,n.jsx)(t.td,{children:"Only the account that originally created the multisig is able to cancel it."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"NoTimepoint (9)"}),(0,n.jsx)(t.td,{children:"No timepoint was given, yet the multisig operation is already underway."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"WrongTimepoint (10)"}),(0,n.jsx)(t.td,{children:"A different timepoint was given to the multisig operation that is underway."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"UnexpectedTimepoint (11)"}),(0,n.jsx)(t.td,{children:"A timepoint was given, yet no multisig operation is underway."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"WeightTooLow (12)"}),(0,n.jsx)(t.td,{children:"The maximum weight information provided was too low."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"AlreadyStored (13)"}),(0,n.jsx)(t.td,{children:"The data to be stored is already stored."})]})]})]}),"\n",(0,n.jsx)(t.h3,{id:"errors-from-deprecated-pallets-on-polkadot",children:"Errors from Deprecated Pallets on Polkadot"}),"\n",(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Pallet"}),(0,n.jsx)(t.th,{children:"Error"}),(0,n.jsx)(t.th,{children:"Documentation"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Council (15)"}),(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"NotMember (0)"}),(0,n.jsx)(t.td,{children:"Account is not a member"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"DuplicateProposal (1)"}),(0,n.jsx)(t.td,{children:"Duplicate proposals not allowed"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"ProposalMissing (2)"}),(0,n.jsx)(t.td,{children:"Proposal must exist"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"WrongIndex (3)"}),(0,n.jsx)(t.td,{children:"Mismatched index"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"DuplicateVote (4)"}),(0,n.jsx)(t.td,{children:"Duplicate vote ignored"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"AlreadyInitialized (5)"}),(0,n.jsx)(t.td,{children:"Members are already initialized!"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"TooEarly (6)"}),(0,n.jsx)(t.td,{children:"The close call was made too early, before the end of the voting."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"TooManyProposals (7)"}),(0,n.jsxs)(t.td,{children:["There can only be a maximum of ",(0,n.jsx)(t.code,{children:"MaxProposals"})," active proposals."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"WrongProposalWeight (8)"}),(0,n.jsx)(t.td,{children:"The given weight bound for the proposal was too low."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"WrongProposalLength (9)"}),(0,n.jsx)(t.td,{children:"The given length bound for the proposal was too low."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"TechnicalCommittee (16)"}),(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"NotMember (0)"}),(0,n.jsx)(t.td,{children:"Account is not a member"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"DuplicateProposal (1)"}),(0,n.jsx)(t.td,{children:"Duplicate proposals not allowed"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"ProposalMissing (2)"}),(0,n.jsx)(t.td,{children:"Proposal must exist"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"WrongIndex (3)"}),(0,n.jsx)(t.td,{children:"Mismatched index"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"DuplicateVote (4)"}),(0,n.jsx)(t.td,{children:"Duplicate vote ignored"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"AlreadyInitialized (5)"}),(0,n.jsx)(t.td,{children:"Members are already initialized!"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"TooEarly (6)"}),(0,n.jsx)(t.td,{children:"The close call was made too early, before the end of the voting."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"TooManyProposals (7)"}),(0,n.jsxs)(t.td,{children:["There can only be a maximum of ",(0,n.jsx)(t.code,{children:"MaxProposals"})," active proposals."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"WrongProposalWeight (8)"}),(0,n.jsx)(t.td,{children:"The given weight bound for the proposal was too low."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"WrongProposalLength (9)"}),(0,n.jsx)(t.td,{children:"The given length bound for the proposal was too low."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Democracy (14)"}),(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"ValueLow (0)"}),(0,n.jsx)(t.td,{children:"Value too low"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"ProposalMissing (1)"}),(0,n.jsx)(t.td,{children:"Proposal does not exist"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"BadIndex (2)"}),(0,n.jsx)(t.td,{children:"Unknown index"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"AlreadyCanceled (3)"}),(0,n.jsx)(t.td,{children:"Cannot cancel the same proposal twice"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"DuplicateProposal (4)"}),(0,n.jsx)(t.td,{children:"Proposal already made"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"ProposalBlacklisted (5)"}),(0,n.jsx)(t.td,{children:"Proposal still blacklisted"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"NotSimpleMajority (6)"}),(0,n.jsx)(t.td,{children:"Next external proposal not simple majority"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"InvalidHash (7)"}),(0,n.jsx)(t.td,{children:"Invalid hash"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"NoProposal (8)"}),(0,n.jsx)(t.td,{children:"No external proposal"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"AlreadyVetoed (9)"}),(0,n.jsx)(t.td,{children:"Identity may not veto a proposal twice"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"NotDelegated (10)"}),(0,n.jsx)(t.td,{children:"Not delegated"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"DuplicatePreimage (11)"}),(0,n.jsx)(t.td,{children:"Preimage already noted"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"NotImminent (12)"}),(0,n.jsx)(t.td,{children:"Not imminent"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"TooEarly (13)"}),(0,n.jsx)(t.td,{children:"Too early"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"Imminent (14)"}),(0,n.jsx)(t.td,{children:"Imminent"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"PreimageMissing (15)"}),(0,n.jsx)(t.td,{children:"Preimage not found"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"ReferendumInvalid (16)"}),(0,n.jsx)(t.td,{children:"Vote given for invalid referendum"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"PreimageInvalid (17)"}),(0,n.jsx)(t.td,{children:"Invalid preimage"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"NoneWaiting (18)"}),(0,n.jsx)(t.td,{children:"No proposals waiting"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"NotLocked (19)"}),(0,n.jsx)(t.td,{children:"The target account does not have a lock."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"NotExpired (20)"}),(0,n.jsx)(t.td,{children:"The lock on the account to be unlocked has not yet expired."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"NotVoter (21)"}),(0,n.jsx)(t.td,{children:"The given account did not vote on the referendum."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"NoPermission (22)"}),(0,n.jsx)(t.td,{children:"The actor has no permission to conduct the action."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"AlreadyDelegating (23)"}),(0,n.jsx)(t.td,{children:"The account is already delegating."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"Overflow (24)"}),(0,n.jsx)(t.td,{children:"An unexpected integer overflow occurred."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"Underflow (25)"}),(0,n.jsx)(t.td,{children:"An unexpected integer underflow occurred."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"InsufficientFunds (26)"}),(0,n.jsx)(t.td,{children:"Too high a balance was provided that the account cannot afford."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"NotDelegating (27)"}),(0,n.jsx)(t.td,{children:"The account is not currently delegating."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"VotesExist (28)"}),(0,n.jsxs)(t.td,{children:["The account currently has votes attached to it and the operation cannot succeed until these are removed, either through ",(0,n.jsx)(t.code,{children:"unvote"})," or ",(0,n.jsx)(t.code,{children:"reap_vote"}),"."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"InstantNotAllowed (29)"}),(0,n.jsx)(t.td,{children:"The instant referendum origin is currently disallowed."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"Nonsense (30)"}),(0,n.jsx)(t.td,{children:"Delegation to oneself makes no sense."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"WrongUpperBound (31)"}),(0,n.jsx)(t.td,{children:"Invalid upper bound."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"MaxVotesReached (32)"}),(0,n.jsx)(t.td,{children:"Maximum number of votes reached."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"InvalidWitness (33)"}),(0,n.jsx)(t.td,{children:"The provided witness data is wrong."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsx)(t.td,{children:"TooManyProposals (34)"}),(0,n.jsx)(t.td,{children:"Maximum number of proposals reached."})]})]})]})]})}function a(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(h,{...e})}):h(e)}},58691:(e,t,s)=>{s.d(t,{A:()=>d});const d=s.p+"assets/images/01-44e982847dc13a68b04abbc5757fae86.jpg"},64212:(e,t,s)=>{s.d(t,{A:()=>d});const d=s.p+"assets/images/02-eb569cd528fa9b5a6d990c6a10ec2b43.jpg"},28453:(e,t,s)=>{s.d(t,{R:()=>i,x:()=>l});var d=s(96540);const n={},r=d.createContext(n);function i(e){const t=d.useContext(r);return d.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function l(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:i(e.components),d.createElement(r.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/863c4753.13a77072.js b/assets/js/863c4753.13a77072.js deleted file mode 100644 index 840023113d1a..000000000000 --- a/assets/js/863c4753.13a77072.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6076],{51376:(e,r,s)=>{s.r(r),s.d(r,{assets:()=>o,contentTitle:()=>c,default:()=>h,frontMatter:()=>i,metadata:()=>l,toc:()=>a});var n=s(74848),t=s(28453);const i={id:"learn-xcm-docs-journey-register",title:"Register Modifiers",sidebar_label:"More Register Modifiers",description:"More Instructions to Change the XCVM Registers.",keywords:["xcm","cross-consensus messaging","register"],slug:"../journey-register"},c="Register Modifiers",l={id:"learn/xcm/journey/learn-xcm-docs-journey-register",title:"Register Modifiers",description:"More Instructions to Change the XCVM Registers.",source:"@site/../docs/learn/xcm/journey/register-modifiers.md",sourceDirName:"learn/xcm/journey",slug:"/learn/xcm/journey-register",permalink:"/docs/learn/xcm/journey-register",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/xcm/journey/register-modifiers.md",tags:[],version:"current",lastUpdatedBy:"Radha",lastUpdatedAt:1694074887e3,frontMatter:{id:"learn-xcm-docs-journey-register",title:"Register Modifiers",sidebar_label:"More Register Modifiers",description:"More Instructions to Change the XCVM Registers.",keywords:["xcm","cross-consensus messaging","register"],slug:"../journey-register"},sidebar:"docs",previous:{title:"Origin Manipulation",permalink:"/docs/learn/xcm/journey-origin"},next:{title:"More Holding Modifiers",permalink:"/docs/learn/xcm/journey-holding"}},o={},a=[{value:"SetErrorHandler",id:"seterrorhandler",level:2},{value:"SetAppendix",id:"setappendix",level:2},{value:"ClearError",id:"clearerror",level:2},{value:"ClearTransactStatus",id:"cleartransactstatus",level:2},{value:"SetTopic",id:"settopic",level:2},{value:"ClearTopic",id:"cleartopic",level:2}];function d(e){const r={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,t.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.header,{children:(0,n.jsx)(r.h1,{id:"register-modifiers",children:"Register Modifiers"})}),"\n",(0,n.jsx)(r.p,{children:"In the previous chapters we already saw instructions that modified the XCVM registers. This chapter\ncontains more instructions that change the XCVM registers. We will discuss the following\ninstructions:"}),"\n",(0,n.jsxs)(r.ul,{children:["\n",(0,n.jsx)(r.li,{children:(0,n.jsx)(r.code,{children:"SetErrorHandler"})}),"\n",(0,n.jsx)(r.li,{children:(0,n.jsx)(r.code,{children:"SetAppendixHandler"})}),"\n",(0,n.jsx)(r.li,{children:(0,n.jsx)(r.code,{children:"ClearError"})}),"\n",(0,n.jsx)(r.li,{children:(0,n.jsx)(r.code,{children:"ClearTransactStatus"})}),"\n",(0,n.jsx)(r.li,{children:(0,n.jsx)(r.code,{children:"SetTopic"})}),"\n",(0,n.jsx)(r.li,{children:(0,n.jsx)(r.code,{children:"ClearTopic"})}),"\n"]}),"\n",(0,n.jsx)(r.h2,{id:"seterrorhandler",children:"SetErrorHandler"}),"\n",(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-rust",children:"SetErrorHandler(Xcm)\n"})}),"\n",(0,n.jsxs)(r.p,{children:["The ",(0,n.jsx)(r.code,{children:"SetErrorHandler"})," instructions is used to set the Error Handler Register. As discussed in the\n",(0,n.jsx)(r.a,{href:"/docs/learn/xcm/fundamentals-xcvm",children:"XCVM chapter"}),", the Error Handler is executed when an error is thrown\nduring the regular instruction execution."]}),"\n",(0,n.jsx)(r.h2,{id:"setappendix",children:"SetAppendix"}),"\n",(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-rust",children:"SetAppendix(Xcm)\n"})}),"\n",(0,n.jsxs)(r.p,{children:["The ",(0,n.jsx)(r.code,{children:"SetAppendix"})," instruction is used to set the Appendix Register. As discussed in the\n",(0,n.jsx)(r.a,{href:"/docs/learn/xcm/fundamentals-xcvm",children:"XCVM chapter"}),", the Appendix instructions are executed after the regular\nand error handler instruction are executed. These instructions are executed regardless of whether an\nerror occurred."]}),"\n",(0,n.jsx)(r.h2,{id:"clearerror",children:"ClearError"}),"\n",(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-rust",children:"ClearError\n"})}),"\n",(0,n.jsxs)(r.p,{children:["The ",(0,n.jsx)(r.code,{children:"ClearError"})," instruction clears the Error Register by setting it to None."]}),"\n",(0,n.jsx)(r.h2,{id:"cleartransactstatus",children:"ClearTransactStatus"}),"\n",(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-rust",children:"ClearTransactStatus\n"})}),"\n",(0,n.jsxs)(r.p,{children:["The ",(0,n.jsx)(r.code,{children:"ClearTransactStatus"})," instruction sets the Transact Status Register to its default, cleared,\nvalue."]}),"\n",(0,n.jsx)(r.h2,{id:"settopic",children:"SetTopic"}),"\n",(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-rust",children:"SetTopic([u8; 32])\n"})}),"\n",(0,n.jsxs)(r.p,{children:["The ",(0,n.jsx)(r.code,{children:"SetTopic"})," instruction sets the Topic Register."]}),"\n",(0,n.jsx)(r.h2,{id:"cleartopic",children:"ClearTopic"}),"\n",(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-rust",children:"ClearTopic\n"})}),"\n",(0,n.jsxs)(r.p,{children:["The ",(0,n.jsx)(r.code,{children:"ClearTopic"})," instruction clears the Topic Register."]})]})}function h(e={}){const{wrapper:r}={...(0,t.R)(),...e.components};return r?(0,n.jsx)(r,{...e,children:(0,n.jsx)(d,{...e})}):d(e)}},28453:(e,r,s)=>{s.d(r,{R:()=>c,x:()=>l});var n=s(96540);const t={},i=n.createContext(t);function c(e){const r=n.useContext(i);return n.useMemo((function(){return"function"==typeof e?e(r):{...r,...e}}),[r,e])}function l(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:c(e.components),n.createElement(i.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/863c4753.964cb204.js b/assets/js/863c4753.964cb204.js new file mode 100644 index 000000000000..0c504bb121e4 --- /dev/null +++ b/assets/js/863c4753.964cb204.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6076],{95697:(e,r,s)=>{s.r(r),s.d(r,{assets:()=>a,contentTitle:()=>l,default:()=>h,frontMatter:()=>c,metadata:()=>n,toc:()=>o});const n=JSON.parse('{"id":"learn/xcm/journey/learn-xcm-docs-journey-register","title":"Register Modifiers","description":"More Instructions to Change the XCVM Registers.","source":"@site/../docs/learn/xcm/journey/register-modifiers.md","sourceDirName":"learn/xcm/journey","slug":"/learn/xcm/journey-register","permalink":"/docs/learn/xcm/journey-register","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/xcm/journey/register-modifiers.md","tags":[],"version":"current","lastUpdatedBy":"Radha","lastUpdatedAt":1694074887000,"frontMatter":{"id":"learn-xcm-docs-journey-register","title":"Register Modifiers","sidebar_label":"More Register Modifiers","description":"More Instructions to Change the XCVM Registers.","keywords":["xcm","cross-consensus messaging","register"],"slug":"../journey-register"},"sidebar":"docs","previous":{"title":"Origin Manipulation","permalink":"/docs/learn/xcm/journey-origin"},"next":{"title":"More Holding Modifiers","permalink":"/docs/learn/xcm/journey-holding"}}');var t=s(74848),i=s(28453);const c={id:"learn-xcm-docs-journey-register",title:"Register Modifiers",sidebar_label:"More Register Modifiers",description:"More Instructions to Change the XCVM Registers.",keywords:["xcm","cross-consensus messaging","register"],slug:"../journey-register"},l="Register Modifiers",a={},o=[{value:"SetErrorHandler",id:"seterrorhandler",level:2},{value:"SetAppendix",id:"setappendix",level:2},{value:"ClearError",id:"clearerror",level:2},{value:"ClearTransactStatus",id:"cleartransactstatus",level:2},{value:"SetTopic",id:"settopic",level:2},{value:"ClearTopic",id:"cleartopic",level:2}];function d(e){const r={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,i.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.header,{children:(0,t.jsx)(r.h1,{id:"register-modifiers",children:"Register Modifiers"})}),"\n",(0,t.jsx)(r.p,{children:"In the previous chapters we already saw instructions that modified the XCVM registers. This chapter\ncontains more instructions that change the XCVM registers. We will discuss the following\ninstructions:"}),"\n",(0,t.jsxs)(r.ul,{children:["\n",(0,t.jsx)(r.li,{children:(0,t.jsx)(r.code,{children:"SetErrorHandler"})}),"\n",(0,t.jsx)(r.li,{children:(0,t.jsx)(r.code,{children:"SetAppendixHandler"})}),"\n",(0,t.jsx)(r.li,{children:(0,t.jsx)(r.code,{children:"ClearError"})}),"\n",(0,t.jsx)(r.li,{children:(0,t.jsx)(r.code,{children:"ClearTransactStatus"})}),"\n",(0,t.jsx)(r.li,{children:(0,t.jsx)(r.code,{children:"SetTopic"})}),"\n",(0,t.jsx)(r.li,{children:(0,t.jsx)(r.code,{children:"ClearTopic"})}),"\n"]}),"\n",(0,t.jsx)(r.h2,{id:"seterrorhandler",children:"SetErrorHandler"}),"\n",(0,t.jsx)(r.pre,{children:(0,t.jsx)(r.code,{className:"language-rust",children:"SetErrorHandler(Xcm)\n"})}),"\n",(0,t.jsxs)(r.p,{children:["The ",(0,t.jsx)(r.code,{children:"SetErrorHandler"})," instructions is used to set the Error Handler Register. As discussed in the\n",(0,t.jsx)(r.a,{href:"/docs/learn/xcm/fundamentals-xcvm",children:"XCVM chapter"}),", the Error Handler is executed when an error is thrown\nduring the regular instruction execution."]}),"\n",(0,t.jsx)(r.h2,{id:"setappendix",children:"SetAppendix"}),"\n",(0,t.jsx)(r.pre,{children:(0,t.jsx)(r.code,{className:"language-rust",children:"SetAppendix(Xcm)\n"})}),"\n",(0,t.jsxs)(r.p,{children:["The ",(0,t.jsx)(r.code,{children:"SetAppendix"})," instruction is used to set the Appendix Register. As discussed in the\n",(0,t.jsx)(r.a,{href:"/docs/learn/xcm/fundamentals-xcvm",children:"XCVM chapter"}),", the Appendix instructions are executed after the regular\nand error handler instruction are executed. These instructions are executed regardless of whether an\nerror occurred."]}),"\n",(0,t.jsx)(r.h2,{id:"clearerror",children:"ClearError"}),"\n",(0,t.jsx)(r.pre,{children:(0,t.jsx)(r.code,{className:"language-rust",children:"ClearError\n"})}),"\n",(0,t.jsxs)(r.p,{children:["The ",(0,t.jsx)(r.code,{children:"ClearError"})," instruction clears the Error Register by setting it to None."]}),"\n",(0,t.jsx)(r.h2,{id:"cleartransactstatus",children:"ClearTransactStatus"}),"\n",(0,t.jsx)(r.pre,{children:(0,t.jsx)(r.code,{className:"language-rust",children:"ClearTransactStatus\n"})}),"\n",(0,t.jsxs)(r.p,{children:["The ",(0,t.jsx)(r.code,{children:"ClearTransactStatus"})," instruction sets the Transact Status Register to its default, cleared,\nvalue."]}),"\n",(0,t.jsx)(r.h2,{id:"settopic",children:"SetTopic"}),"\n",(0,t.jsx)(r.pre,{children:(0,t.jsx)(r.code,{className:"language-rust",children:"SetTopic([u8; 32])\n"})}),"\n",(0,t.jsxs)(r.p,{children:["The ",(0,t.jsx)(r.code,{children:"SetTopic"})," instruction sets the Topic Register."]}),"\n",(0,t.jsx)(r.h2,{id:"cleartopic",children:"ClearTopic"}),"\n",(0,t.jsx)(r.pre,{children:(0,t.jsx)(r.code,{className:"language-rust",children:"ClearTopic\n"})}),"\n",(0,t.jsxs)(r.p,{children:["The ",(0,t.jsx)(r.code,{children:"ClearTopic"})," instruction clears the Topic Register."]})]})}function h(e={}){const{wrapper:r}={...(0,i.R)(),...e.components};return r?(0,t.jsx)(r,{...e,children:(0,t.jsx)(d,{...e})}):d(e)}},28453:(e,r,s)=>{s.d(r,{R:()=>c,x:()=>l});var n=s(96540);const t={},i=n.createContext(t);function c(e){const r=n.useContext(i);return n.useMemo((function(){return"function"==typeof e?e(r):{...r,...e}}),[r,e])}function l(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:c(e.components),n.createElement(i.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/8731.cb33cbbe.js b/assets/js/8731.cb33cbbe.js new file mode 100644 index 000000000000..3e528573975b --- /dev/null +++ b/assets/js/8731.cb33cbbe.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8731],{59850:(e,t,n)=>{t.Qi=t.XO=void 0;const r=n(69590),i=n(78585),s=n(62676);var o;!function(e){e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:s.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:s.Event.None}),e.is=function(t){const n=t;return n&&(n===e.None||n===e.Cancelled||i.boolean(n.isCancellationRequested)&&!!n.onCancellationRequested)}}(o||(t.XO=o={}));const a=Object.freeze((function(e,t){const n=(0,r.default)().timer.setTimeout(e.bind(t),0);return{dispose(){n.dispose()}}}));class c{constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?a:(this._emitter||(this._emitter=new s.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}}t.Qi=class{get token(){return this._token||(this._token=new c),this._token}cancel(){this._token?this._token.cancel():this._token=o.Cancelled}dispose(){this._token?this._token instanceof c&&this._token.dispose():this._token=o.None}}},62676:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Emitter=t.Event=void 0;const r=n(69590);var i;!function(e){const t={dispose(){}};e.None=function(){return t}}(i||(t.Event=i={}));class s{add(e,t=null,n){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(n)&&n.push({dispose:()=>this.remove(e,t)})}remove(e,t=null){if(!this._callbacks)return;let n=!1;for(let r=0,i=this._callbacks.length;r{this._callbacks||(this._callbacks=new s),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,t);const r={dispose:()=>{this._callbacks&&(this._callbacks.remove(e,t),r.dispose=o._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(n)&&n.push(r),r}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}}t.Emitter=o,o._noop=function(){}},78585:(e,t)=>{function n(e){return"string"==typeof e||e instanceof String}function r(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0,t.boolean=function(e){return!0===e||!1===e},t.string=n,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=function(e){return"function"==typeof e},t.array=r,t.stringArray=function(e){return r(e)&&e.every((e=>n(e)))}},69590:(e,t)=>{let n;function r(){if(void 0===n)throw new Error("No runtime abstraction layer installed");return n}Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.install=function(e){if(void 0===e)throw new Error("No runtime abstraction layer provided");n=e}}(r||(r={})),t.default=r},97021:(e,t,n)=>{n.d(t,{v:()=>a});var r=n(19369),i=n(33394),s=class extends r.mR{static{(0,r.K2)(this,"InfoTokenBuilder")}constructor(){super(["info","showInfo"])}},o={parser:{TokenBuilder:(0,r.K2)((()=>new s),"TokenBuilder"),ValueConverter:(0,r.K2)((()=>new r.Tm),"ValueConverter")}};function a(e=i.DD){const t=(0,i.WQ)((0,i.uM)(e),r.sr),n=(0,i.WQ)((0,i.tG)({shared:t}),r.e5,o);return t.ServiceRegistry.register(n),{shared:t,Info:n}}(0,r.K2)(a,"createInfoServices")},88685:(e,t,n)=>{n.d(t,{f:()=>c});var r=n(19369),i=n(33394),s=class extends r.mR{static{(0,r.K2)(this,"PieTokenBuilder")}constructor(){super(["pie","showData"])}},o=class extends r.dg{static{(0,r.K2)(this,"PieValueConverter")}runCustomConverter(e,t,n){if("PIE_SECTION_LABEL"===e.name)return t.replace(/"/g,"").trim()}},a={parser:{TokenBuilder:(0,r.K2)((()=>new s),"TokenBuilder"),ValueConverter:(0,r.K2)((()=>new o),"ValueConverter")}};function c(e=i.DD){const t=(0,i.WQ)((0,i.uM)(e),r.sr),n=(0,i.WQ)((0,i.tG)({shared:t}),r.KX,a);return t.ServiceRegistry.register(n),{shared:t,Pie:n}}(0,r.K2)(c,"createPieServices")},71609:(e,t,n)=>{n.d(t,{$:()=>a});var r=n(19369),i=n(33394),s=class extends r.mR{static{(0,r.K2)(this,"PacketTokenBuilder")}constructor(){super(["packet-beta"])}},o={parser:{TokenBuilder:(0,r.K2)((()=>new s),"TokenBuilder"),ValueConverter:(0,r.K2)((()=>new r.Tm),"ValueConverter")}};function a(e=i.DD){const t=(0,i.WQ)((0,i.uM)(e),r.sr),n=(0,i.WQ)((0,i.tG)({shared:t}),r.AM,o);return t.ServiceRegistry.register(n),{shared:t,Packet:n}}(0,r.K2)(a,"createPacketServices")},49936:(e,t,n)=>{n.d(t,{S:()=>c});var r=n(19369),i=n(33394),s=class extends r.mR{static{(0,r.K2)(this,"ArchitectureTokenBuilder")}constructor(){super(["architecture"])}},o=class extends r.dg{static{(0,r.K2)(this,"ArchitectureValueConverter")}runCustomConverter(e,t,n){return"ARCH_ICON"===e.name?t.replace(/[()]/g,"").trim():"ARCH_TEXT_ICON"===e.name?t.replace(/["()]/g,""):"ARCH_TITLE"===e.name?t.replace(/[[\]]/g,"").trim():void 0}},a={parser:{TokenBuilder:(0,r.K2)((()=>new s),"TokenBuilder"),ValueConverter:(0,r.K2)((()=>new o),"ValueConverter")}};function c(e=i.DD){const t=(0,i.WQ)((0,i.uM)(e),r.sr),n=(0,i.WQ)((0,i.tG)({shared:t}),r.jE,a);return t.ServiceRegistry.register(n),{shared:t,Architecture:n}}(0,r.K2)(c,"createArchitectureServices")},82785:(e,t,n)=>{n.d(t,{b:()=>a});var r=n(19369),i=n(33394),s=class extends r.mR{static{(0,r.K2)(this,"GitGraphTokenBuilder")}constructor(){super(["gitGraph"])}},o={parser:{TokenBuilder:(0,r.K2)((()=>new s),"TokenBuilder"),ValueConverter:(0,r.K2)((()=>new r.Tm),"ValueConverter")}};function a(e=i.DD){const t=(0,i.WQ)((0,i.uM)(e),r.sr),n=(0,i.WQ)((0,i.tG)({shared:t}),r.eZ,o);return t.ServiceRegistry.register(n),{shared:t,GitGraph:n}}(0,r.K2)(a,"createGitGraphServices")},19369:(e,t,n)=>{n.d(t,{AM:()=>$,K2:()=>s,KX:()=>w,Tm:()=>P,dg:()=>_,e5:()=>C,eZ:()=>O,jE:()=>L,mR:()=>M,sr:()=>N});var r=n(33394),i=Object.defineProperty,s=(e,t)=>i(e,"name",{value:t,configurable:!0});s((function(e){return g.isInstance(e,"Architecture")}),"isArchitecture");var o="Branch";s((function(e){return g.isInstance(e,o)}),"isBranch");var a="Commit";s((function(e){return g.isInstance(e,a)}),"isCommit");s((function(e){return g.isInstance(e,"Common")}),"isCommon");var c="GitGraph";s((function(e){return g.isInstance(e,c)}),"isGitGraph");s((function(e){return g.isInstance(e,"Info")}),"isInfo");var l="Merge";s((function(e){return g.isInstance(e,l)}),"isMerge");s((function(e){return g.isInstance(e,"Packet")}),"isPacket");s((function(e){return g.isInstance(e,"PacketBlock")}),"isPacketBlock");s((function(e){return g.isInstance(e,"Pie")}),"isPie");s((function(e){return g.isInstance(e,"PieSection")}),"isPieSection");var u,d,h,f,p,m=class extends r.kD{static{s(this,"MermaidAstReflection")}getAllTypes(){return["Architecture","Branch","Checkout","CherryPicking","Commit","Common","Direction","Edge","GitGraph","Group","Info","Junction","Merge","Packet","PacketBlock","Pie","PieSection","Service","Statement"]}computeIsSubtype(e,t){switch(e){case o:case"Checkout":case"CherryPicking":case a:case l:return this.isSubtype("Statement",t);case"Direction":return this.isSubtype(c,t);default:return!1}}getReferenceType(e){const t=`${e.container.$type}:${e.property}`;throw new Error(`${t} is not a valid reference id.`)}getTypeMetaData(e){switch(e){case"Architecture":return{name:"Architecture",properties:[{name:"accDescr"},{name:"accTitle"},{name:"edges",defaultValue:[]},{name:"groups",defaultValue:[]},{name:"junctions",defaultValue:[]},{name:"services",defaultValue:[]},{name:"title"}]};case"Branch":return{name:"Branch",properties:[{name:"name"},{name:"order"}]};case"Checkout":return{name:"Checkout",properties:[{name:"branch"}]};case"CherryPicking":return{name:"CherryPicking",properties:[{name:"id"},{name:"parent"},{name:"tags",defaultValue:[]}]};case"Commit":return{name:"Commit",properties:[{name:"id"},{name:"message"},{name:"tags",defaultValue:[]},{name:"type"}]};case"Common":return{name:"Common",properties:[{name:"accDescr"},{name:"accTitle"},{name:"title"}]};case"Edge":return{name:"Edge",properties:[{name:"lhsDir"},{name:"lhsGroup",defaultValue:!1},{name:"lhsId"},{name:"lhsInto",defaultValue:!1},{name:"rhsDir"},{name:"rhsGroup",defaultValue:!1},{name:"rhsId"},{name:"rhsInto",defaultValue:!1},{name:"title"}]};case"GitGraph":return{name:"GitGraph",properties:[{name:"accDescr"},{name:"accTitle"},{name:"statements",defaultValue:[]},{name:"title"}]};case"Group":return{name:"Group",properties:[{name:"icon"},{name:"id"},{name:"in"},{name:"title"}]};case"Info":return{name:"Info",properties:[{name:"accDescr"},{name:"accTitle"},{name:"title"}]};case"Junction":return{name:"Junction",properties:[{name:"id"},{name:"in"}]};case"Merge":return{name:"Merge",properties:[{name:"branch"},{name:"id"},{name:"tags",defaultValue:[]},{name:"type"}]};case"Packet":return{name:"Packet",properties:[{name:"accDescr"},{name:"accTitle"},{name:"blocks",defaultValue:[]},{name:"title"}]};case"PacketBlock":return{name:"PacketBlock",properties:[{name:"end"},{name:"label"},{name:"start"}]};case"Pie":return{name:"Pie",properties:[{name:"accDescr"},{name:"accTitle"},{name:"sections",defaultValue:[]},{name:"showData",defaultValue:!1},{name:"title"}]};case"PieSection":return{name:"PieSection",properties:[{name:"label"},{name:"value"}]};case"Service":return{name:"Service",properties:[{name:"icon"},{name:"iconText"},{name:"id"},{name:"in"},{name:"title"}]};case"Direction":return{name:"Direction",properties:[{name:"accDescr"},{name:"accTitle"},{name:"dir"},{name:"statements",defaultValue:[]},{name:"title"}]};default:return{name:e,properties:[]}}}},g=new m,y=s((()=>u??(u=(0,r.y0)('{"$type":"Grammar","isDeclared":true,"name":"Info","imports":[],"rules":[{"$type":"ParserRule","name":"Info","entry":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"info"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"showInfo"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"*"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"TitleAndAccessibilities","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"EOL","fragment":true,"dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"types":[],"usedGrammars":[]}'))),"InfoGrammar"),A=s((()=>d??(d=(0,r.y0)('{"$type":"Grammar","isDeclared":true,"name":"Packet","imports":[],"rules":[{"$type":"ParserRule","name":"Packet","entry":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"packet-beta"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"blocks","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"Assignment","feature":"blocks","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"+"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"}]}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"PacketBlock","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"start","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"end","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"?"},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|\'[^\']*\'/"},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"TitleAndAccessibilities","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"EOL","fragment":true,"dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"types":[],"usedGrammars":[]}'))),"PacketGrammar"),T=s((()=>h??(h=(0,r.y0)('{"$type":"Grammar","isDeclared":true,"name":"Pie","imports":[],"rules":[{"$type":"ParserRule","name":"Pie","entry":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"pie"},{"$type":"Assignment","feature":"showData","operator":"?=","terminal":{"$type":"Keyword","value":"showData"},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"sections","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"Assignment","feature":"sections","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"+"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"}]}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"PieSection","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"PIE_SECTION_LABEL","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]+\\"/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"PIE_SECTION_VALUE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/(0|[1-9][0-9]*)(\\\\.[0-9]+)?/"},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"TitleAndAccessibilities","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"EOL","fragment":true,"dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"types":[],"usedGrammars":[]}'))),"PieGrammar"),v=s((()=>f??(f=(0,r.y0)('{"$type":"Grammar","isDeclared":true,"name":"Architecture","imports":[],"rules":[{"$type":"ParserRule","name":"Architecture","entry":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"architecture-beta"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"*"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"*"}]}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Statement","fragment":true,"definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"groups","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"services","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"junctions","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"edges","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"LeftPort","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"lhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"RightPort","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"rhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Keyword","value":":"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Arrow","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]},{"$type":"Assignment","feature":"lhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"--"},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Keyword","value":"-"}]}]},{"$type":"Assignment","feature":"rhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Group","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"group"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Service","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"service"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"iconText","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}}],"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Junction","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"junction"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Edge","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"lhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"lhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"rhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"rhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"ARROW_DIRECTION","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"L"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"R"}}]},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"T"}}]},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"B"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_ID","definition":{"$type":"RegexToken","regex":"/[\\\\w]+/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_TEXT_ICON","definition":{"$type":"RegexToken","regex":"/\\\\(\\"[^\\"]+\\"\\\\)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_ICON","definition":{"$type":"RegexToken","regex":"/\\\\([\\\\w-:]+\\\\)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_TITLE","definition":{"$type":"RegexToken","regex":"/\\\\[[\\\\w ]+\\\\]/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_GROUP","definition":{"$type":"RegexToken","regex":"/\\\\{group\\\\}/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_INTO","definition":{"$type":"RegexToken","regex":"/<|>/"},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"TitleAndAccessibilities","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"EOL","fragment":true,"dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"types":[],"usedGrammars":[]}'))),"ArchitectureGrammar"),R=s((()=>p??(p=(0,r.y0)('{"$type":"Grammar","isDeclared":true,"name":"GitGraph","interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"rules":[{"$type":"ParserRule","name":"TitleAndAccessibilities","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"EOL","fragment":true,"dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false},{"$type":"ParserRule","name":"GitGraph","entry":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Keyword","value":":"}]},{"$type":"Keyword","value":"gitGraph:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]},{"$type":"Keyword","value":":"}]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]},{"$type":"Assignment","feature":"statements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}],"cardinality":"*"}]}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Direction","definition":{"$type":"Assignment","feature":"dir","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"LR"},{"$type":"Keyword","value":"TB"},{"$type":"Keyword","value":"BT"}]}},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Commit","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"commit"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"msg:","cardinality":"?"},{"$type":"Assignment","feature":"message","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Branch","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"branch"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"order:"},{"$type":"Assignment","feature":"order","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Merge","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"merge"},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]}},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Checkout","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"checkout"},{"$type":"Keyword","value":"switch"}]},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"CherryPicking","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"cherry-pick"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"parent:"},{"$type":"Assignment","feature":"parent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+(?=\\\\s)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\\\w([-\\\\./\\\\w]*[-\\\\w])?/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|\'[^\']*\'/"},"fragment":false,"hidden":false}],"definesHiddenTokens":false,"hiddenTokens":[],"imports":[],"types":[],"usedGrammars":[]}'))),"GitGraphGrammar"),E={languageId:"info",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1},k={languageId:"packet",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1},x={languageId:"pie",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1},I={languageId:"architecture",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1},S={languageId:"gitGraph",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1},N={AstReflection:s((()=>new m),"AstReflection")},C={Grammar:s((()=>y()),"Grammar"),LanguageMetaData:s((()=>E),"LanguageMetaData"),parser:{}},$={Grammar:s((()=>A()),"Grammar"),LanguageMetaData:s((()=>k),"LanguageMetaData"),parser:{}},w={Grammar:s((()=>T()),"Grammar"),LanguageMetaData:s((()=>x),"LanguageMetaData"),parser:{}},L={Grammar:s((()=>v()),"Grammar"),LanguageMetaData:s((()=>I),"LanguageMetaData"),parser:{}},O={Grammar:s((()=>R()),"Grammar"),LanguageMetaData:s((()=>S),"LanguageMetaData"),parser:{}},b={ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/accTitle[\t ]*:([^\n\r]*)/,TITLE:/title([\t ][^\n\r]*|)/},_=class extends r.dM{static{s(this,"AbstractMermaidValueConverter")}runConverter(e,t,n){let r=this.runCommonConverter(e,t,n);return void 0===r&&(r=this.runCustomConverter(e,t,n)),void 0===r?super.runConverter(e,t,n):r}runCommonConverter(e,t,n){const r=b[e.name];if(void 0===r)return;const i=r.exec(t);return null!==i?void 0!==i[1]?i[1].trim().replace(/[\t ]{2,}/gm," "):void 0!==i[2]?i[2].replace(/^\s*/gm,"").replace(/\s+$/gm,"").replace(/[\t ]{2,}/gm," ").replace(/[\n\r]{2,}/gm,"\n"):void 0:void 0}},P=class extends _{static{s(this,"CommonValueConverter")}runCustomConverter(e,t,n){}},M=class extends r.QU{static{s(this,"AbstractMermaidTokenBuilder")}constructor(e){super(),this.keywords=new Set(e)}buildKeywordTokens(e,t,n){const r=super.buildKeywordTokens(e,t,n);return r.forEach((e=>{this.keywords.has(e.name)&&void 0!==e.PATTERN&&(e.PATTERN=new RegExp(e.PATTERN.toString()+"(?:(?=%%)|(?!\\S))"))})),r}};(class extends M{static{s(this,"CommonTokenBuilder")}})},78731:(e,t,n)=>{n.d(t,{qg:()=>o});n(82785),n(97021),n(71609),n(88685),n(49936);var r=n(19369),i={},s={info:(0,r.K2)((async()=>{const{createInfoServices:e}=await n.e(890).then(n.bind(n,10890)),t=e().Info.parser.LangiumParser;i.info=t}),"info"),packet:(0,r.K2)((async()=>{const{createPacketServices:e}=await n.e(6452).then(n.bind(n,6452)),t=e().Packet.parser.LangiumParser;i.packet=t}),"packet"),pie:(0,r.K2)((async()=>{const{createPieServices:e}=await n.e(7723).then(n.bind(n,57723)),t=e().Pie.parser.LangiumParser;i.pie=t}),"pie"),architecture:(0,r.K2)((async()=>{const{createArchitectureServices:e}=await n.e(9720).then(n.bind(n,39720)),t=e().Architecture.parser.LangiumParser;i.architecture=t}),"architecture"),gitGraph:(0,r.K2)((async()=>{const{createGitGraphServices:e}=await n.e(2387).then(n.bind(n,82387)),t=e().GitGraph.parser.LangiumParser;i.gitGraph=t}),"gitGraph")};async function o(e,t){const n=s[e];if(!n)throw new Error(`Unknown diagram type: ${e}`);i[e]||await n();const r=i[e].parse(t);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new a(r);return r.value}(0,r.K2)(o,"parse");var a=class extends Error{constructor(e){super(`Parsing failed: ${e.lexerErrors.map((e=>e.message)).join("\n")} ${e.parserErrors.map((e=>e.message)).join("\n")}`),this.result=e}static{(0,r.K2)(this,"MermaidParseError")}}},33394:(e,t,n)=>{function r(e){return"object"==typeof e&&null!==e&&"string"==typeof e.$type}function i(e){return"object"==typeof e&&null!==e&&"string"==typeof e.$refText}function s(e){return"object"==typeof e&&null!==e&&r(e.container)&&i(e.reference)&&"string"==typeof e.message}n.d(t,{kD:()=>o,QU:()=>Hc,dM:()=>Wc,DD:()=>Lu,tG:()=>Eu,uM:()=>ku,WQ:()=>xu,y0:()=>_u});class o{constructor(){this.subtypes={},this.allSubtypes={}}isInstance(e,t){return r(e)&&this.isSubtype(e.$type,t)}isSubtype(e,t){if(e===t)return!0;let n=this.subtypes[e];n||(n=this.subtypes[e]={});const r=n[t];if(void 0!==r)return r;{const r=this.computeIsSubtype(e,t);return n[t]=r,r}}getAllSubTypes(e){const t=this.allSubtypes[e];if(t)return t;{const t=this.getAllTypes(),n=[];for(const r of t)this.isSubtype(r,e)&&n.push(r);return this.allSubtypes[e]=n,n}}}function a(e){return"object"==typeof e&&null!==e&&Array.isArray(e.content)}function c(e){return"object"==typeof e&&null!==e&&"object"==typeof e.tokenType}function l(e){return a(e)&&"string"==typeof e.fullText}class u{constructor(e,t){this.startFn=e,this.nextFn=t}iterator(){const e={state:this.startFn(),next:()=>this.nextFn(e.state),[Symbol.iterator]:()=>e};return e}[Symbol.iterator](){return this.iterator()}isEmpty(){const e=this.iterator();return Boolean(e.next().done)}count(){const e=this.iterator();let t=0,n=e.next();for(;!n.done;)t++,n=e.next();return t}toArray(){const e=[],t=this.iterator();let n;do{n=t.next(),void 0!==n.value&&e.push(n.value)}while(!n.done);return e}toSet(){return new Set(this)}toMap(e,t){const n=this.map((n=>[e?e(n):n,t?t(n):n]));return new Map(n)}toString(){return this.join()}concat(e){const t=e[Symbol.iterator]();return new u((()=>({first:this.startFn(),firstDone:!1})),(e=>{let n;if(!e.firstDone){do{if(n=this.nextFn(e.first),!n.done)return n}while(!n.done);e.firstDone=!0}do{if(n=t.next(),!n.done)return n}while(!n.done);return p}))}join(e=","){const t=this.iterator();let n,r="",i=!1;do{n=t.next(),n.done||(i&&(r+=e),r+=d(n.value)),i=!0}while(!n.done);return r}indexOf(e,t=0){const n=this.iterator();let r=0,i=n.next();for(;!i.done;){if(r>=t&&i.value===e)return r;i=n.next(),r++}return-1}every(e){const t=this.iterator();let n=t.next();for(;!n.done;){if(!e(n.value))return!1;n=t.next()}return!0}some(e){const t=this.iterator();let n=t.next();for(;!n.done;){if(e(n.value))return!0;n=t.next()}return!1}forEach(e){const t=this.iterator();let n=0,r=t.next();for(;!r.done;)e(r.value,n),r=t.next(),n++}map(e){return new u(this.startFn,(t=>{const{done:n,value:r}=this.nextFn(t);return n?p:{done:!1,value:e(r)}}))}filter(e){return new u(this.startFn,(t=>{let n;do{if(n=this.nextFn(t),!n.done&&e(n.value))return n}while(!n.done);return p}))}nonNullable(){return this.filter((e=>null!=e))}reduce(e,t){const n=this.iterator();let r=t,i=n.next();for(;!i.done;)r=void 0===r?i.value:e(r,i.value),i=n.next();return r}reduceRight(e,t){return this.recursiveReduce(this.iterator(),e,t)}recursiveReduce(e,t,n){const r=e.next();if(r.done)return n;const i=this.recursiveReduce(e,t,n);return void 0===i?r.value:t(i,r.value)}find(e){const t=this.iterator();let n=t.next();for(;!n.done;){if(e(n.value))return n.value;n=t.next()}}findIndex(e){const t=this.iterator();let n=0,r=t.next();for(;!r.done;){if(e(r.value))return n;r=t.next(),n++}return-1}includes(e){const t=this.iterator();let n=t.next();for(;!n.done;){if(n.value===e)return!0;n=t.next()}return!1}flatMap(e){return new u((()=>({this:this.startFn()})),(t=>{do{if(t.iterator){const e=t.iterator.next();if(!e.done)return e;t.iterator=void 0}const{done:n,value:r}=this.nextFn(t.this);if(!n){const n=e(r);if(!h(n))return{done:!1,value:n};t.iterator=n[Symbol.iterator]()}}while(t.iterator);return p}))}flat(e){if(void 0===e&&(e=1),e<=0)return this;const t=e>1?this.flat(e-1):this;return new u((()=>({this:t.startFn()})),(e=>{do{if(e.iterator){const t=e.iterator.next();if(!t.done)return t;e.iterator=void 0}const{done:n,value:r}=t.nextFn(e.this);if(!n){if(!h(r))return{done:!1,value:r};e.iterator=r[Symbol.iterator]()}}while(e.iterator);return p}))}head(){const e=this.iterator().next();if(!e.done)return e.value}tail(e=1){return new u((()=>{const t=this.startFn();for(let n=0;n({size:0,state:this.startFn()})),(t=>(t.size++,t.size>e?p:this.nextFn(t.state))))}distinct(e){const t=new Set;return this.filter((n=>{const r=e?e(n):n;return!t.has(r)&&(t.add(r),!0)}))}exclude(e,t){const n=new Set;for(const r of e){const e=t?t(r):r;n.add(e)}return this.filter((e=>{const r=t?t(e):e;return!n.has(r)}))}}function d(e){return"string"==typeof e?e:void 0===e?"undefined":"function"==typeof e.toString?e.toString():Object.prototype.toString.call(e)}function h(e){return!!e&&"function"==typeof e[Symbol.iterator]}const f=new u((()=>{}),(()=>p)),p=Object.freeze({done:!0,value:void 0});function m(...e){if(1===e.length){const t=e[0];if(t instanceof u)return t;if(h(t))return new u((()=>t[Symbol.iterator]()),(e=>e.next()));if("number"==typeof t.length)return new u((()=>({index:0})),(e=>e.index1?new u((()=>({collIndex:0,arrIndex:0})),(t=>{do{if(t.iterator){const e=t.iterator.next();if(!e.done)return e;t.iterator=void 0}if(t.array){if(t.arrIndex({iterators:(null==n?void 0:n.includeRoot)?[[e][Symbol.iterator]()]:[t(e)[Symbol.iterator]()],pruned:!1})),(e=>{for(e.pruned&&(e.iterators.pop(),e.pruned=!1);e.iterators.length>0;){const n=e.iterators[e.iterators.length-1].next();if(!n.done)return e.iterators.push(t(n.value)[Symbol.iterator]()),n;e.iterators.pop()}return p}))}iterator(){const e={state:this.startFn(),next:()=>this.nextFn(e.state),prune:()=>{e.state.pruned=!0},[Symbol.iterator]:()=>e};return e}}var y,A;function T(e){return new g(e,(e=>a(e)?e.content:[]),{includeRoot:!0})}function v(e){return{start:{character:e.startColumn-1,line:e.startLine-1},end:{character:e.endColumn,line:e.endLine-1}}}function R(e){if(!e)return;const{offset:t,end:n,range:r}=e;return{range:r,offset:t,end:n,length:n-t}}function E(e,t){const n=function(e,t){if(e.end.linet.end.line||e.start.line===t.end.line&&e.start.character>t.end.character)return A.After;const n=e.start.line>t.start.line||e.start.line===t.start.line&&e.start.character>=t.start.character,r=e.end.lineA.After}!function(e){e.sum=function(e){return e.reduce(((e,t)=>e+t),0)},e.product=function(e){return e.reduce(((e,t)=>e*t),0)},e.min=function(e){return e.reduce(((e,t)=>Math.min(e,t)))},e.max=function(e){return e.reduce(((e,t)=>Math.max(e,t)))}}(y||(y={})),function(e){e[e.Before=0]="Before",e[e.After=1]="After",e[e.OverlapFront=2]="OverlapFront",e[e.OverlapBack=3]="OverlapBack",e[e.Inside=4]="Inside"}(A||(A={}));const k=/^[\w\p{L}]$/u;function x(e,t){if(e){const n=function(e,t=!0){for(;e.container;){const n=e.container;let r=n.content.indexOf(e);for(;r>0;){r--;const e=n.content[r];if(t||!e.hidden)return e}e=n}return}(e,!0);if(n&&I(n,t))return n;if(l(e)){for(let n=e.content.findIndex((e=>!e.hidden))-1;n>=0;n--){const r=e.content[n];if(I(r,t))return r}}}}function I(e,t){return c(e)&&t.includes(e.tokenType.name)}class S extends Error{constructor(e,t){super(e?`${t} at ${e.range.start.line}:${e.range.start.character}`:t)}}function N(e){throw new Error("Error! The input value was not handled.")}const C="AbstractRule";const $="AbstractType";const w="Condition";const L="TypeDefinition";const O="ValueLiteral";const b="AbstractElement";const _="ArrayLiteral";const P="ArrayType";const M="BooleanLiteral";const D="Conjunction";const U="Disjunction";const F="Grammar";const G="InferredType";function K(e){return Oe.isInstance(e,G)}const B="Interface";function j(e){return Oe.isInstance(e,B)}const V="Negation";const H="NumberLiteral";const W="Parameter";const z="ParameterReference";const Y="ParserRule";function X(e){return Oe.isInstance(e,Y)}const q="ReferenceType";const Q="ReturnType";const J="SimpleType";const Z="StringLiteral";const ee="TerminalRule";function te(e){return Oe.isInstance(e,ee)}const ne="Type";function re(e){return Oe.isInstance(e,ne)}const ie="UnionType";const se="Action";function oe(e){return Oe.isInstance(e,se)}const ae="Alternatives";function ce(e){return Oe.isInstance(e,ae)}const le="Assignment";function ue(e){return Oe.isInstance(e,le)}const de="CharacterRange";const he="CrossReference";function fe(e){return Oe.isInstance(e,he)}const pe="EndOfFile";const me="Group";function ge(e){return Oe.isInstance(e,me)}const ye="Keyword";function Ae(e){return Oe.isInstance(e,ye)}const Te="NegatedToken";const ve="RegexToken";const Re="RuleCall";function Ee(e){return Oe.isInstance(e,Re)}const ke="TerminalAlternatives";const xe="TerminalGroup";const Ie="TerminalRuleCall";function Se(e){return Oe.isInstance(e,Ie)}const Ne="UnorderedGroup";function Ce(e){return Oe.isInstance(e,Ne)}const $e="UntilToken";const we="Wildcard";class Le extends o{getAllTypes(){return["AbstractElement","AbstractRule","AbstractType","Action","Alternatives","ArrayLiteral","ArrayType","Assignment","BooleanLiteral","CharacterRange","Condition","Conjunction","CrossReference","Disjunction","EndOfFile","Grammar","GrammarImport","Group","InferredType","Interface","Keyword","NamedArgument","NegatedToken","Negation","NumberLiteral","Parameter","ParameterReference","ParserRule","ReferenceType","RegexToken","ReturnType","RuleCall","SimpleType","StringLiteral","TerminalAlternatives","TerminalGroup","TerminalRule","TerminalRuleCall","Type","TypeAttribute","TypeDefinition","UnionType","UnorderedGroup","UntilToken","ValueLiteral","Wildcard"]}computeIsSubtype(e,t){switch(e){case se:case ae:case le:case de:case he:case pe:case me:case ye:case Te:case ve:case Re:case ke:case xe:case Ie:case Ne:case $e:case we:return this.isSubtype(b,t);case _:case H:case Z:return this.isSubtype(O,t);case P:case q:case J:case ie:return this.isSubtype(L,t);case M:return this.isSubtype(w,t)||this.isSubtype(O,t);case D:case U:case V:case z:return this.isSubtype(w,t);case G:case B:case ne:return this.isSubtype($,t);case Y:return this.isSubtype(C,t)||this.isSubtype($,t);case ee:return this.isSubtype(C,t);default:return!1}}getReferenceType(e){const t=`${e.container.$type}:${e.property}`;switch(t){case"Action:type":case"CrossReference:type":case"Interface:superTypes":case"ParserRule:returnType":case"SimpleType:typeRef":return $;case"Grammar:hiddenTokens":case"ParserRule:hiddenTokens":case"RuleCall:rule":return C;case"Grammar:usedGrammars":return F;case"NamedArgument:parameter":case"ParameterReference:parameter":return W;case"TerminalRuleCall:rule":return ee;default:throw new Error(`${t} is not a valid reference id.`)}}getTypeMetaData(e){switch(e){case"AbstractElement":return{name:"AbstractElement",properties:[{name:"cardinality"},{name:"lookahead"}]};case"ArrayLiteral":return{name:"ArrayLiteral",properties:[{name:"elements",defaultValue:[]}]};case"ArrayType":return{name:"ArrayType",properties:[{name:"elementType"}]};case"BooleanLiteral":return{name:"BooleanLiteral",properties:[{name:"true",defaultValue:!1}]};case"Conjunction":return{name:"Conjunction",properties:[{name:"left"},{name:"right"}]};case"Disjunction":return{name:"Disjunction",properties:[{name:"left"},{name:"right"}]};case"Grammar":return{name:"Grammar",properties:[{name:"definesHiddenTokens",defaultValue:!1},{name:"hiddenTokens",defaultValue:[]},{name:"imports",defaultValue:[]},{name:"interfaces",defaultValue:[]},{name:"isDeclared",defaultValue:!1},{name:"name"},{name:"rules",defaultValue:[]},{name:"types",defaultValue:[]},{name:"usedGrammars",defaultValue:[]}]};case"GrammarImport":return{name:"GrammarImport",properties:[{name:"path"}]};case"InferredType":return{name:"InferredType",properties:[{name:"name"}]};case"Interface":return{name:"Interface",properties:[{name:"attributes",defaultValue:[]},{name:"name"},{name:"superTypes",defaultValue:[]}]};case"NamedArgument":return{name:"NamedArgument",properties:[{name:"calledByName",defaultValue:!1},{name:"parameter"},{name:"value"}]};case"Negation":return{name:"Negation",properties:[{name:"value"}]};case"NumberLiteral":return{name:"NumberLiteral",properties:[{name:"value"}]};case"Parameter":return{name:"Parameter",properties:[{name:"name"}]};case"ParameterReference":return{name:"ParameterReference",properties:[{name:"parameter"}]};case"ParserRule":return{name:"ParserRule",properties:[{name:"dataType"},{name:"definesHiddenTokens",defaultValue:!1},{name:"definition"},{name:"entry",defaultValue:!1},{name:"fragment",defaultValue:!1},{name:"hiddenTokens",defaultValue:[]},{name:"inferredType"},{name:"name"},{name:"parameters",defaultValue:[]},{name:"returnType"},{name:"wildcard",defaultValue:!1}]};case"ReferenceType":return{name:"ReferenceType",properties:[{name:"referenceType"}]};case"ReturnType":return{name:"ReturnType",properties:[{name:"name"}]};case"SimpleType":return{name:"SimpleType",properties:[{name:"primitiveType"},{name:"stringType"},{name:"typeRef"}]};case"StringLiteral":return{name:"StringLiteral",properties:[{name:"value"}]};case"TerminalRule":return{name:"TerminalRule",properties:[{name:"definition"},{name:"fragment",defaultValue:!1},{name:"hidden",defaultValue:!1},{name:"name"},{name:"type"}]};case"Type":return{name:"Type",properties:[{name:"name"},{name:"type"}]};case"TypeAttribute":return{name:"TypeAttribute",properties:[{name:"defaultValue"},{name:"isOptional",defaultValue:!1},{name:"name"},{name:"type"}]};case"UnionType":return{name:"UnionType",properties:[{name:"types",defaultValue:[]}]};case"Action":return{name:"Action",properties:[{name:"cardinality"},{name:"feature"},{name:"inferredType"},{name:"lookahead"},{name:"operator"},{name:"type"}]};case"Alternatives":return{name:"Alternatives",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case"Assignment":return{name:"Assignment",properties:[{name:"cardinality"},{name:"feature"},{name:"lookahead"},{name:"operator"},{name:"terminal"}]};case"CharacterRange":return{name:"CharacterRange",properties:[{name:"cardinality"},{name:"left"},{name:"lookahead"},{name:"right"}]};case"CrossReference":return{name:"CrossReference",properties:[{name:"cardinality"},{name:"deprecatedSyntax",defaultValue:!1},{name:"lookahead"},{name:"terminal"},{name:"type"}]};case"EndOfFile":return{name:"EndOfFile",properties:[{name:"cardinality"},{name:"lookahead"}]};case"Group":return{name:"Group",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"guardCondition"},{name:"lookahead"}]};case"Keyword":return{name:"Keyword",properties:[{name:"cardinality"},{name:"lookahead"},{name:"value"}]};case"NegatedToken":return{name:"NegatedToken",properties:[{name:"cardinality"},{name:"lookahead"},{name:"terminal"}]};case"RegexToken":return{name:"RegexToken",properties:[{name:"cardinality"},{name:"lookahead"},{name:"regex"}]};case"RuleCall":return{name:"RuleCall",properties:[{name:"arguments",defaultValue:[]},{name:"cardinality"},{name:"lookahead"},{name:"rule"}]};case"TerminalAlternatives":return{name:"TerminalAlternatives",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case"TerminalGroup":return{name:"TerminalGroup",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case"TerminalRuleCall":return{name:"TerminalRuleCall",properties:[{name:"cardinality"},{name:"lookahead"},{name:"rule"}]};case"UnorderedGroup":return{name:"UnorderedGroup",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case"UntilToken":return{name:"UntilToken",properties:[{name:"cardinality"},{name:"lookahead"},{name:"terminal"}]};case"Wildcard":return{name:"Wildcard",properties:[{name:"cardinality"},{name:"lookahead"}]};default:return{name:e,properties:[]}}}}const Oe=new Le;function be(e){for(const[t,n]of Object.entries(e))t.startsWith("$")||(Array.isArray(n)?n.forEach(((n,i)=>{r(n)&&(n.$container=e,n.$containerProperty=t,n.$containerIndex=i)})):r(n)&&(n.$container=e,n.$containerProperty=t))}function _e(e,t){let n=e;for(;n;){if(t(n))return n;n=n.$container}}function Pe(e){const t=function(e){for(;e.$container;)e=e.$container;return e}(e),n=t.$document;if(!n)throw new Error("AST node has no document.");return n}function Me(e,t){if(!e)throw new Error("Node must be an AstNode.");const n=null==t?void 0:t.range;return new u((()=>({keys:Object.keys(e),keyIndex:0,arrayIndex:0})),(t=>{for(;t.keyIndexMe(e,t)))}function Ue(e,t){if(!e)throw new Error("Root node must be an AstNode.");return(null==t?void 0:t.range)&&!Fe(e,t.range)?new g(e,(()=>[])):new g(e,(e=>Me(e,t)),{includeRoot:!0})}function Fe(e,t){var n;if(!t)return!0;const r=null===(n=e.$cstNode)||void 0===n?void 0:n.range;return!!r&&E(r,t)}function Ge(e){return new u((()=>({keys:Object.keys(e),keyIndex:0,arrayIndex:0})),(t=>{for(;t.keyIndex=this.input.length)throw Error("Unexpected end of input");this.idx++}loc(e){return{begin:e,end:this.idx}}}class tt{visitChildren(e){for(const t in e){const n=e[t];e.hasOwnProperty(t)&&(void 0!==n.type?this.visit(n):Array.isArray(n)&&n.forEach((e=>{this.visit(e)}),this))}}visit(e){switch(e.type){case"Pattern":this.visitPattern(e);break;case"Flags":this.visitFlags(e);break;case"Disjunction":this.visitDisjunction(e);break;case"Alternative":this.visitAlternative(e);break;case"StartAnchor":this.visitStartAnchor(e);break;case"EndAnchor":this.visitEndAnchor(e);break;case"WordBoundary":this.visitWordBoundary(e);break;case"NonWordBoundary":this.visitNonWordBoundary(e);break;case"Lookahead":this.visitLookahead(e);break;case"NegativeLookahead":this.visitNegativeLookahead(e);break;case"Character":this.visitCharacter(e);break;case"Set":this.visitSet(e);break;case"Group":this.visitGroup(e);break;case"GroupBackReference":this.visitGroupBackReference(e);break;case"Quantifier":this.visitQuantifier(e)}this.visitChildren(e)}visitPattern(e){}visitFlags(e){}visitDisjunction(e){}visitAlternative(e){}visitStartAnchor(e){}visitEndAnchor(e){}visitWordBoundary(e){}visitNonWordBoundary(e){}visitLookahead(e){}visitNegativeLookahead(e){}visitCharacter(e){}visitSet(e){}visitGroup(e){}visitGroupBackReference(e){}visitQuantifier(e){}}const nt=/\r?\n/gm,rt=new et;const it=new class extends tt{constructor(){super(...arguments),this.isStarting=!0,this.endRegexpStack=[],this.multiline=!1}get endRegex(){return this.endRegexpStack.join("")}reset(e){this.multiline=!1,this.regex=e,this.startRegexp="",this.isStarting=!0,this.endRegexpStack=[]}visitGroup(e){e.quantifier&&(this.isStarting=!1,this.endRegexpStack=[])}visitCharacter(e){const t=String.fromCharCode(e.value);if(this.multiline||"\n"!==t||(this.multiline=!0),e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{const e=at(t);this.endRegexpStack.push(e),this.isStarting&&(this.startRegexp+=e)}}visitSet(e){if(!this.multiline){const t=this.regex.substring(e.loc.begin,e.loc.end),n=new RegExp(t);this.multiline=Boolean("\n".match(n))}if(e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{const t=this.regex.substring(e.loc.begin,e.loc.end);this.endRegexpStack.push(t),this.isStarting&&(this.startRegexp+=t)}}visitChildren(e){if("Group"===e.type){if(e.quantifier)return}super.visitChildren(e)}};function st(e){try{return"string"==typeof e&&(e=new RegExp(e)),e=e.toString(),it.reset(e),it.visit(rt.pattern(e)),it.multiline}catch(t){return!1}}function ot(e){return("string"==typeof e?new RegExp(e):e).test(" ")}function at(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ct(e,t){const n=function(e){"string"==typeof e&&(e=new RegExp(e));const t=e,n=e.source;let r=0;function i(){let e,s="";function o(e){s+=n.substr(r,e),r+=e}function a(e){s+="(?:"+n.substr(r,e)+"|$)",r+=e}for(;r",r)-r+1);break;default:a(2)}break;case"[":e=/\[(?:\\.|.)*?\]/g,e.lastIndex=r,e=e.exec(n)||[],a(e[0].length);break;case"|":case"^":case"$":case"*":case"+":case"?":o(1);break;case"{":e=/\{\d+,?\d*\}/g,e.lastIndex=r,e=e.exec(n),e?o(e[0].length):a(1);break;case"(":if("?"===n[r+1])switch(n[r+2]){case":":s+="(?:",r+=3,s+=i()+"|$)";break;case"=":s+="(?=",r+=3,s+=i()+")";break;case"!":e=r,r+=3,i(),s+=n.substr(e,r-e);break;case"<":switch(n[r+3]){case"=":case"!":e=r,r+=4,i(),s+=n.substr(e,r-e);break;default:o(n.indexOf(">",r)-r+1),s+=i()+"|$)"}}else o(1),s+=i()+"|$)";break;case")":return++r,s;default:a(1)}return s}return new RegExp(i(),e.flags)}(e),r=t.match(n);return!!r&&r[0].length>0}function lt(e,t){const n=new Set,r=function(e){return e.rules.find((e=>X(e)&&e.entry))}(e);if(!r)return new Set(e.rules);const i=[r].concat(function(e){return e.rules.filter((e=>te(e)&&e.hidden))}(e));for(const o of i)ut(o,n,t);const s=new Set;for(const o of e.rules)(n.has(o.name)||te(o)&&o.hidden)&&s.add(o);return s}function ut(e,t,n){t.add(e.name),De(e).forEach((e=>{if(Ee(e)||n&&Se(e)){const r=e.rule.ref;r&&!t.has(r.name)&&ut(r,t,n)}}))}function dt(e,t,n){if(!e||!t)return;const r=ht(e,t,e.astNode,!0);return 0!==r.length?r[n=void 0!==n?Math.max(0,Math.min(n,r.length-1)):0]:void 0}function ht(e,t,n,r){if(!r){const n=_e(e.grammarSource,ue);if(n&&n.feature===t)return[e]}return a(e)&&e.astNode===n?e.content.flatMap((e=>ht(e,t,n,!1))):[]}function ft(e,t,n){if(e.astNode!==n)return[];if(Ae(e.grammarSource)&&e.grammarSource.value===t)return[e];const r=T(e).iterator();let i;const s=[];do{if(i=r.next(),!i.done){const e=i.value;e.astNode===n?Ae(e.grammarSource)&&e.grammarSource.value===t&&s.push(e):r.prune()}}while(!i.done);return s}function pt(e){let t=e;return K(t)&&(oe(t.$container)?t=t.$container.$container:X(t.$container)?t=t.$container:N(t.$container)),mt(e,t,new Map)}function mt(e,t,n){var r,i;function s(t,r){let i;return _e(t,ue)||(i=mt(r,r,n)),n.set(e,i),i}if(n.has(e))return n.get(e);n.set(e,void 0);for(const o of De(t)){if(ue(o)&&"name"===o.feature.toLowerCase())return n.set(e,o),o;if(Ee(o)&&X(o.rule.ref))return s(o,o.rule.ref);if(i=o,Oe.isInstance(i,J)&&(null===(r=o.typeRef)||void 0===r?void 0:r.ref))return s(o,o.typeRef.ref)}}function gt(e){return yt(e,new Set)}function yt(e,t){if(t.has(e))return!0;t.add(e);for(const n of De(e))if(Ee(n)){if(!n.rule.ref)return!1;if(X(n.rule.ref)&&!yt(n.rule.ref,t))return!1}else{if(ue(n))return!1;if(oe(n))return!1}return Boolean(e.definition)}function At(e){if(e.inferredType)return e.inferredType.name;if(e.dataType)return e.dataType;if(e.returnType){const t=e.returnType.ref;if(t){if(X(t))return t.name;if(j(t)||re(t))return t.name}}}function Tt(e){var t,n;if(X(e))return gt(e)?e.name:null!==(t=At(e))&&void 0!==t?t:e.name;if(j(e)||re(e)||(n=e,Oe.isInstance(n,Q)))return e.name;if(oe(e)){const t=function(e){var t;if(e.inferredType)return e.inferredType.name;if(null===(t=e.type)||void 0===t?void 0:t.ref)return Tt(e.type.ref);return}(e);if(t)return t}else if(K(e))return e.name;throw new Error("Cannot get name of Unknown Type")}function vt(e){const t={s:!1,i:!1,u:!1},n=Et(e.definition,t),r=Object.entries(t).filter((([,e])=>e)).map((([e])=>e)).join("");return new RegExp(n,r)}const Rt=/[\s\S]/.source;function Et(e,t){if(s=e,Oe.isInstance(s,ke))return xt((i=e).elements.map((e=>Et(e))).join("|"),{cardinality:i.cardinality,lookahead:i.lookahead});if(function(e){return Oe.isInstance(e,xe)}(e))return xt((r=e).elements.map((e=>Et(e))).join(""),{cardinality:r.cardinality,lookahead:r.lookahead});if(function(e){return Oe.isInstance(e,de)}(e))return function(e){if(e.right)return xt(`[${kt(e.left)}-${kt(e.right)}]`,{cardinality:e.cardinality,lookahead:e.lookahead,wrap:!1});return xt(kt(e.left),{cardinality:e.cardinality,lookahead:e.lookahead,wrap:!1})}(e);if(Se(e)){const t=e.rule.ref;if(!t)throw new Error("Missing rule reference.");return xt(Et(t.definition),{cardinality:e.cardinality,lookahead:e.lookahead})}if(function(e){return Oe.isInstance(e,Te)}(e))return function(e){return xt(`(?!${Et(e.terminal)})${Rt}*?`,{cardinality:e.cardinality,lookahead:e.lookahead})}(e);if(function(e){return Oe.isInstance(e,$e)}(e))return xt(`${Rt}*?${Et((n=e).terminal)}`,{cardinality:n.cardinality,lookahead:n.lookahead});if(function(e){return Oe.isInstance(e,ve)}(e)){const n=e.regex.lastIndexOf("/"),r=e.regex.substring(1,n),i=e.regex.substring(n+1);return t&&(t.i=i.includes("i"),t.s=i.includes("s"),t.u=i.includes("u")),xt(r,{cardinality:e.cardinality,lookahead:e.lookahead,wrap:!1})}if(function(e){return Oe.isInstance(e,we)}(e))return xt(Rt,{cardinality:e.cardinality,lookahead:e.lookahead});throw new Error(`Invalid terminal element: ${null==e?void 0:e.$type}`);var n,r,i,s}function kt(e){return at(e.value)}function xt(e,t){var n;return(!1!==t.wrap||t.lookahead)&&(e=`(${null!==(n=t.lookahead)&&void 0!==n?n:""}${e})`),t.cardinality?`${e}${t.cardinality}`:e}var It=n(8058),St=n(38207),Nt=n(66401),Ct=n(74722),$t=n(48585),wt=n(50053);function Lt(e){function t(){}t.prototype=e;const n=new t;function r(){return typeof n.bar}return r(),r(),e}const Ot=function(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var s=Array(i);++r{t.accept(e)}))}}class sn extends rn{constructor(e){super([]),this.idx=1,jt(this,Yt(e,(e=>void 0!==e)))}set definition(e){}get definition(){return void 0!==this.referencedRule?this.referencedRule.definition:[]}accept(e){e.visit(this)}}class on extends rn{constructor(e){super(e.definition),this.orgText="",jt(this,Yt(e,(e=>void 0!==e)))}}class an extends rn{constructor(e){super(e.definition),this.ignoreAmbiguities=!1,jt(this,Yt(e,(e=>void 0!==e)))}}class cn extends rn{constructor(e){super(e.definition),this.idx=1,jt(this,Yt(e,(e=>void 0!==e)))}}class ln extends rn{constructor(e){super(e.definition),this.idx=1,jt(this,Yt(e,(e=>void 0!==e)))}}class un extends rn{constructor(e){super(e.definition),this.idx=1,jt(this,Yt(e,(e=>void 0!==e)))}}class dn extends rn{constructor(e){super(e.definition),this.idx=1,jt(this,Yt(e,(e=>void 0!==e)))}}class hn extends rn{constructor(e){super(e.definition),this.idx=1,jt(this,Yt(e,(e=>void 0!==e)))}}class fn extends rn{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){super(e.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,jt(this,Yt(e,(e=>void 0!==e)))}}class pn{constructor(e){this.idx=1,jt(this,Yt(e,(e=>void 0!==e)))}accept(e){e.visit(this)}}function mn(e){function t(e){return(0,Ct.A)(e,mn)}if(e instanceof sn){const t={type:"NonTerminal",name:e.nonTerminalName,idx:e.idx};return(0,Pt.A)(e.label)&&(t.label=e.label),t}if(e instanceof an)return{type:"Alternative",definition:t(e.definition)};if(e instanceof cn)return{type:"Option",idx:e.idx,definition:t(e.definition)};if(e instanceof ln)return{type:"RepetitionMandatory",idx:e.idx,definition:t(e.definition)};if(e instanceof un)return{type:"RepetitionMandatoryWithSeparator",idx:e.idx,separator:mn(new pn({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof hn)return{type:"RepetitionWithSeparator",idx:e.idx,separator:mn(new pn({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof dn)return{type:"Repetition",idx:e.idx,definition:t(e.definition)};if(e instanceof fn)return{type:"Alternation",idx:e.idx,definition:t(e.definition)};if(e instanceof pn){const t={type:"Terminal",name:e.terminalType.name,label:nn(e.terminalType),idx:e.idx};(0,Pt.A)(e.label)&&(t.terminalLabel=e.label);const n=e.terminalType.PATTERN;return e.terminalType.PATTERN&&(t.pattern=tn(n)?n.source:n),t}if(e instanceof on)return{type:"Rule",name:e.name,orgText:e.orgText,definition:t(e.definition)};throw Error("non exhaustive match")}class gn{visit(e){const t=e;switch(t.constructor){case sn:return this.visitNonTerminal(t);case an:return this.visitAlternative(t);case cn:return this.visitOption(t);case ln:return this.visitRepetitionMandatory(t);case un:return this.visitRepetitionMandatoryWithSeparator(t);case hn:return this.visitRepetitionWithSeparator(t);case dn:return this.visitRepetition(t);case fn:return this.visitAlternation(t);case pn:return this.visitTerminal(t);case on:return this.visitRule(t);default:throw Error("non exhaustive match")}}visitNonTerminal(e){}visitAlternative(e){}visitOption(e){}visitRepetition(e){}visitRepetitionMandatory(e){}visitRepetitionMandatoryWithSeparator(e){}visitRepetitionWithSeparator(e){}visitAlternation(e){}visitTerminal(e){}visitRule(e){}}var yn=n(63736),An=n(6240);const Tn=function(e,t){var n;return(0,An.A)(e,(function(e,r,i){return!(n=t(e,r,i))})),!!n};var vn=n(92049),Rn=n(6832);const En=function(e,t,n){var r=(0,vn.A)(e)?yn.A:Tn;return n&&(0,Rn.A)(e,t,n)&&(t=void 0),r(e,(0,Ht.A)(t,3))};var kn=n(60818),xn=Math.max;const In=function(e,t,n,r){e=(0,Ft.A)(e)?e:(0,St.A)(e),n=n&&!r?(0,bt.A)(n):0;var i=e.length;return n<0&&(n=xn(i+n,0)),(0,Pt.A)(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&(0,kn.A)(e,t,n)>-1};const Sn=function(e,t){for(var n=-1,r=null==e?0:e.length;++n$n(e,t))):!(e instanceof sn&&In(t,e))&&(e instanceof rn&&(e instanceof sn&&t.push(e),Cn(e.definition,(e=>$n(e,t))))))}function wn(e){if(e instanceof sn)return"SUBRULE";if(e instanceof cn)return"OPTION";if(e instanceof fn)return"OR";if(e instanceof ln)return"AT_LEAST_ONE";if(e instanceof un)return"AT_LEAST_ONE_SEP";if(e instanceof hn)return"MANY_SEP";if(e instanceof dn)return"MANY";if(e instanceof pn)return"CONSUME";throw Error("non exhaustive match")}class Ln{walk(e,t=[]){(0,It.A)(e.definition,((n,r)=>{const i=_t(e.definition,r+1);if(n instanceof sn)this.walkProdRef(n,i,t);else if(n instanceof pn)this.walkTerminal(n,i,t);else if(n instanceof an)this.walkFlat(n,i,t);else if(n instanceof cn)this.walkOption(n,i,t);else if(n instanceof ln)this.walkAtLeastOne(n,i,t);else if(n instanceof un)this.walkAtLeastOneSep(n,i,t);else if(n instanceof hn)this.walkManySep(n,i,t);else if(n instanceof dn)this.walkMany(n,i,t);else{if(!(n instanceof fn))throw Error("non exhaustive match");this.walkOr(n,i,t)}}))}walkTerminal(e,t,n){}walkProdRef(e,t,n){}walkFlat(e,t,n){const r=t.concat(n);this.walk(e,r)}walkOption(e,t,n){const r=t.concat(n);this.walk(e,r)}walkAtLeastOne(e,t,n){const r=[new cn({definition:e.definition})].concat(t,n);this.walk(e,r)}walkAtLeastOneSep(e,t,n){const r=On(e,t,n);this.walk(e,r)}walkMany(e,t,n){const r=[new cn({definition:e.definition})].concat(t,n);this.walk(e,r)}walkManySep(e,t,n){const r=On(e,t,n);this.walk(e,r)}walkOr(e,t,n){const r=t.concat(n);(0,It.A)(e.definition,(e=>{const t=new an({definition:[e]});this.walk(t,r)}))}}function On(e,t,n){return[new cn({definition:[new pn({terminalType:e.separator})].concat(e.definition)})].concat(t,n)}var bn=n(99902);const _n=function(e){return e&&e.length?(0,bn.A)(e):[]};var Pn=n(34098);function Mn(e){if(e instanceof sn)return Mn(e.referencedRule);if(e instanceof pn)return[e.terminalType];if(function(e){return e instanceof an||e instanceof cn||e instanceof dn||e instanceof ln||e instanceof un||e instanceof hn||e instanceof pn||e instanceof on}(e))return function(e){let t=[];const n=e.definition;let r,i=0,s=n.length>i,o=!0;for(;s&&o;)r=n[i],o=$n(r),t=t.concat(Mn(r)),i+=1,s=n.length>i;return _n(t)}(e);if(function(e){return e instanceof fn}(e))return function(e){const t=(0,Ct.A)(e.definition,(e=>Mn(e)));return _n((0,Pn.A)(t))}(e);throw Error("non exhaustive match")}const Dn="_~IN~_";class Un extends Ln{constructor(e){super(),this.topProd=e,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(e,t,n){}walkProdRef(e,t,n){const r=(i=e.referencedRule,s=e.idx,i.name+s+Dn+this.topProd.name);var i,s;const o=t.concat(n),a=Mn(new an({definition:o}));this.follows[r]=a}}var Fn=n(69592),Gn=n(23068),Kn=n(2634),Bn=n(51790);const jn=function(e){if("function"!=typeof e)throw new TypeError("Expected a function");return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}};const Vn=function(e,t){return((0,vn.A)(e)?Kn.A:Bn.A)(e,jn((0,Ht.A)(t,3)))};var Hn=n(89610),Wn=Math.max;const zn=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:(0,bt.A)(n);return i<0&&(i=Wn(r+i,0)),(0,kn.A)(e,t,i)};var Yn=n(89463),Xn=n(94092),qn=n(62062),Qn=n(83149),Jn=n(87809),Zn=n(64099);const er=function(e,t,n,r){var i=-1,s=Qn.A,o=!0,a=e.length,c=[],l=t.length;if(!a)return c;n&&(t=(0,Vt.A)(t,(0,Jt.A)(n))),r?(s=Jn.A,o=!1):t.length>=200&&(s=Zn.A,o=!1,t=new qn.A(t));e:for(;++i\n\tComplement Sets cannot be automatically optimized.\n\tThis will disable the lexer's first char optimizations.\n\tSee: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.`);else{let n="";t&&(n="\n\tThis will disable the lexer's first char optimizations.\n\tSee: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details."),cr(`${pr}\n\tFailed parsing: < ${e.toString()} >\n\tUsing the @chevrotain/regexp-to-ast library\n\tPlease open an issue at: https://github.com/chevrotain/chevrotain/issues`+n)}}return[]}function gr(e,t,n){switch(e.type){case"Disjunction":for(let i=0;i{if("number"==typeof e)yr(e,t,n);else{const r=e;if(!0===n)for(let e=r.from;e<=r.to;e++)yr(e,t,n);else{for(let e=r.from;e<=r.to&&e=Fr){const e=r.from>=Fr?r.from:Fr,n=r.to,i=Kr(e),s=Kr(n);for(let r=i;r<=s;r++)t[r]=r}}}}));break;case"Group":gr(s.value,t,n);break;default:throw Error("Non Exhaustive Match")}const o=void 0!==s.quantifier&&0===s.quantifier.atLeast;if("Group"===s.type&&!1===Tr(s)||"Group"!==s.type&&!1===o)break}break;default:throw Error("non exhaustive match!")}return(0,St.A)(t)}function yr(e,t,n){const r=Kr(e);t[r]=r,!0===n&&function(e,t){const n=String.fromCharCode(e),r=n.toUpperCase();if(r!==n){const e=Kr(r.charCodeAt(0));t[e]=e}else{const e=n.toLowerCase();if(e!==n){const n=Kr(e.charCodeAt(0));t[n]=n}}}(e,t)}function Ar(e,t){return(0,ar.A)(e.value,(e=>{if("number"==typeof e)return In(t,e);{const n=e;return void 0!==(0,ar.A)(t,(e=>n.from<=e&&e<=n.to))}}))}function Tr(e){const t=e.quantifier;return!(!t||0!==t.atLeast)||!!e.value&&((0,vn.A)(e.value)?Cn(e.value,Tr):Tr(e.value))}class vr extends tt{constructor(e){super(),this.targetCharCodes=e,this.found=!1}visitChildren(e){if(!0!==this.found){switch(e.type){case"Lookahead":return void this.visitLookahead(e);case"NegativeLookahead":return void this.visitNegativeLookahead(e)}super.visitChildren(e)}}visitCharacter(e){In(this.targetCharCodes,e.value)&&(this.found=!0)}visitSet(e){e.complement?void 0===Ar(e,this.targetCharCodes)&&(this.found=!0):void 0!==Ar(e,this.targetCharCodes)&&(this.found=!0)}}function Rr(e,t){if(t instanceof RegExp){const n=hr(t),r=new vr(e);return r.visit(n),r.found}return void 0!==(0,ar.A)(t,(t=>In(e,t.charCodeAt(0))))}const Er="PATTERN",kr="defaultMode",xr="modes";let Ir="boolean"==typeof new RegExp("(?:)").sticky;function Sr(e,t){const n=(t=(0,Gn.A)(t,{useSticky:Ir,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r","\n"],tracer:(e,t)=>t()})).tracer;let r;n("initCharCodeToOptimizedIndexMap",(()=>{!function(){if((0,Nt.A)(Gr)){Gr=new Array(65536);for(let e=0;e<65536;e++)Gr[e]=e>255?255+~~(e/255):e}}()})),n("Reject Lexer.NA",(()=>{r=Vn(e,(e=>e[Er]===ii.NA))}));let i,s,o,a,c,l,u,d,h,f,p,m=!1;n("Transform Patterns",(()=>{m=!1,i=(0,Ct.A)(r,(e=>{const n=e[Er];if(tn(n)){const e=n.source;return 1!==e.length||"^"===e||"$"===e||"."===e||n.ignoreCase?2!==e.length||"\\"!==e[0]||In(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],e[1])?t.useSticky?Lr(n):wr(n):e[1]:e}if((0,Hn.A)(n))return m=!0,{exec:n};if("object"==typeof n)return m=!0,n;if("string"==typeof n){if(1===n.length)return n;{const e=n.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),r=new RegExp(e);return t.useSticky?Lr(r):wr(r)}}throw Error("non exhaustive match")}))})),n("misc mapping",(()=>{s=(0,Ct.A)(r,(e=>e.tokenTypeIdx)),o=(0,Ct.A)(r,(e=>{const t=e.GROUP;if(t!==ii.SKIPPED){if((0,Pt.A)(t))return t;if((0,Fn.A)(t))return!1;throw Error("non exhaustive match")}})),a=(0,Ct.A)(r,(e=>{const t=e.LONGER_ALT;if(t){return(0,vn.A)(t)?(0,Ct.A)(t,(e=>zn(r,e))):[zn(r,t)]}})),c=(0,Ct.A)(r,(e=>e.PUSH_MODE)),l=(0,Ct.A)(r,(e=>(0,$t.A)(e,"POP_MODE")))})),n("Line Terminator Handling",(()=>{const e=Dr(t.lineTerminatorCharacters);u=(0,Ct.A)(r,(e=>!1)),"onlyOffset"!==t.positionTracking&&(u=(0,Ct.A)(r,(t=>(0,$t.A)(t,"LINE_BREAKS")?!!t.LINE_BREAKS:!1===Mr(t,e)&&Rr(e,t.PATTERN))))})),n("Misc Mapping #2",(()=>{d=(0,Ct.A)(r,br),h=(0,Ct.A)(i,_r),f=(0,Yn.A)(r,((e,t)=>{const n=t.GROUP;return(0,Pt.A)(n)&&n!==ii.SKIPPED&&(e[n]=[]),e}),{}),p=(0,Ct.A)(i,((e,t)=>({pattern:i[t],longerAlt:a[t],canLineTerminator:u[t],isCustom:d[t],short:h[t],group:o[t],push:c[t],pop:l[t],tokenTypeIdx:s[t],tokenType:r[t]})))}));let g=!0,y=[];return t.safeMode||n("First Char Optimization",(()=>{y=(0,Yn.A)(r,((e,n,r)=>{if("string"==typeof n.PATTERN){const t=Kr(n.PATTERN.charCodeAt(0));Ur(e,t,p[r])}else if((0,vn.A)(n.START_CHARS_HINT)){let t;(0,It.A)(n.START_CHARS_HINT,(n=>{const i=Kr("string"==typeof n?n.charCodeAt(0):n);t!==i&&(t=i,Ur(e,i,p[r]))}))}else if(tn(n.PATTERN))if(n.PATTERN.unicode)g=!1,t.ensureOptimizations&&cr(`${pr}\tUnable to analyze < ${n.PATTERN.toString()} > pattern.\n\tThe regexp unicode flag is not currently supported by the regexp-to-ast library.\n\tThis will disable the lexer's first char optimizations.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);else{const i=mr(n.PATTERN,t.ensureOptimizations);(0,Nt.A)(i)&&(g=!1),(0,It.A)(i,(t=>{Ur(e,t,p[r])}))}else t.ensureOptimizations&&cr(`${pr}\tTokenType: <${n.name}> is using a custom token pattern without providing parameter.\n\tThis will disable the lexer's first char optimizations.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),g=!1;return e}),[])})),{emptyGroups:f,patternIdxToConfig:p,charCodeToPatternIdxToConfig:y,hasCustom:m,canBeOptimized:g}}function Nr(e,t){let n=[];const r=function(e){const t=(0,Xn.A)(e,(e=>!(0,$t.A)(e,Er))),n=(0,Ct.A)(t,(e=>({message:"Token Type: ->"+e.name+"<- missing static 'PATTERN' property",type:ni.MISSING_PATTERN,tokenTypes:[e]}))),r=ir(e,t);return{errors:n,valid:r}}(e);n=n.concat(r.errors);const i=function(e){const t=(0,Xn.A)(e,(e=>{const t=e[Er];return!(tn(t)||(0,Hn.A)(t)||(0,$t.A)(t,"exec")||(0,Pt.A)(t))})),n=(0,Ct.A)(t,(e=>({message:"Token Type: ->"+e.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:ni.INVALID_PATTERN,tokenTypes:[e]}))),r=ir(e,t);return{errors:n,valid:r}}(r.valid),s=i.valid;return n=n.concat(i.errors),n=n.concat(function(e){let t=[];const n=(0,Xn.A)(e,(e=>tn(e[Er])));return t=t.concat(function(e){class t extends tt{constructor(){super(...arguments),this.found=!1}visitEndAnchor(e){this.found=!0}}const n=(0,Xn.A)(e,(e=>{const n=e.PATTERN;try{const e=hr(n),r=new t;return r.visit(e),r.found}catch(r){return Cr.test(n.source)}})),r=(0,Ct.A)(n,(e=>({message:"Unexpected RegExp Anchor Error:\n\tToken Type: ->"+e.name+"<- static 'PATTERN' cannot contain end of input anchor '$'\n\tSee chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS\tfor details.",type:ni.EOI_ANCHOR_FOUND,tokenTypes:[e]})));return r}(n)),t=t.concat(function(e){class t extends tt{constructor(){super(...arguments),this.found=!1}visitStartAnchor(e){this.found=!0}}const n=(0,Xn.A)(e,(e=>{const n=e.PATTERN;try{const e=hr(n),r=new t;return r.visit(e),r.found}catch(r){return $r.test(n.source)}})),r=(0,Ct.A)(n,(e=>({message:"Unexpected RegExp Anchor Error:\n\tToken Type: ->"+e.name+"<- static 'PATTERN' cannot contain start of input anchor '^'\n\tSee https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS\tfor details.",type:ni.SOI_ANCHOR_FOUND,tokenTypes:[e]})));return r}(n)),t=t.concat(function(e){const t=(0,Xn.A)(e,(e=>{const t=e[Er];return t instanceof RegExp&&(t.multiline||t.global)})),n=(0,Ct.A)(t,(e=>({message:"Token Type: ->"+e.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:ni.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[e]})));return n}(n)),t=t.concat(function(e){const t=[];let n=(0,Ct.A)(e,(n=>(0,Yn.A)(e,((e,r)=>(n.PATTERN.source!==r.PATTERN.source||In(t,r)||r.PATTERN===ii.NA||(t.push(r),e.push(r)),e)),[])));n=sr(n);const r=(0,Xn.A)(n,(e=>e.length>1)),i=(0,Ct.A)(r,(e=>{const t=(0,Ct.A)(e,(e=>e.name));return{message:`The same RegExp pattern ->${or(e).PATTERN}<-has been used in all of the following Token Types: ${t.join(", ")} <-`,type:ni.DUPLICATE_PATTERNS_FOUND,tokenTypes:e}}));return i}(n)),t=t.concat(function(e){const t=(0,Xn.A)(e,(e=>e.PATTERN.test(""))),n=(0,Ct.A)(t,(e=>({message:"Token Type: ->"+e.name+"<- static 'PATTERN' must not match an empty string",type:ni.EMPTY_MATCH_PATTERN,tokenTypes:[e]})));return n}(n)),t}(s)),n=n.concat(function(e){const t=(0,Xn.A)(e,(e=>{if(!(0,$t.A)(e,"GROUP"))return!1;const t=e.GROUP;return t!==ii.SKIPPED&&t!==ii.NA&&!(0,Pt.A)(t)})),n=(0,Ct.A)(t,(e=>({message:"Token Type: ->"+e.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:ni.INVALID_GROUP_TYPE_FOUND,tokenTypes:[e]})));return n}(s)),n=n.concat(function(e,t){const n=(0,Xn.A)(e,(e=>void 0!==e.PUSH_MODE&&!In(t,e.PUSH_MODE))),r=(0,Ct.A)(n,(e=>({message:`Token Type: ->${e.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${e.PUSH_MODE}<-which does not exist`,type:ni.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[e]})));return r}(s,t)),n=n.concat(function(e){const t=[],n=(0,Yn.A)(e,((e,t,n)=>{const r=t.PATTERN;return r===ii.NA||((0,Pt.A)(r)?e.push({str:r,idx:n,tokenType:t}):tn(r)&&function(e){const t=[".","\\","[","]","|","^","$","(",")","?","*","+","{"];return void 0===(0,ar.A)(t,(t=>-1!==e.source.indexOf(t)))}(r)&&e.push({str:r.source,idx:n,tokenType:t})),e}),[]);return(0,It.A)(e,((e,r)=>{(0,It.A)(n,(({str:n,idx:i,tokenType:s})=>{if(r${s.name}<- can never be matched.\nBecause it appears AFTER the Token Type ->${e.name}<-in the lexer's definition.\nSee https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;t.push({message:n,type:ni.UNREACHABLE_PATTERN,tokenTypes:[e,s]})}}))})),t}(s)),n}const Cr=/[^\\][$]/;const $r=/[^\\[][\^]|^\^/;function wr(e){const t=e.ignoreCase?"i":"";return new RegExp(`^(?:${e.source})`,t)}function Lr(e){const t=e.ignoreCase?"iy":"y";return new RegExp(`${e.source}`,t)}function Or(e,t,n){const r=[];let i=!1;const s=sr((0,Pn.A)((0,St.A)(e.modes))),o=Vn(s,(e=>e[Er]===ii.NA)),a=Dr(n);return t&&(0,It.A)(o,(e=>{const t=Mr(e,a);if(!1!==t){const n=function(e,t){if(t.issue===ni.IDENTIFY_TERMINATOR)return`Warning: unable to identify line terminator usage in pattern.\n\tThe problem is in the <${e.name}> Token Type\n\t Root cause: ${t.errMsg}.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(t.issue===ni.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the option.\n\tThe problem is in the <${e.name}> Token Type\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error("non exhaustive match")}(e,t),i={message:n,type:t.issue,tokenType:e};r.push(i)}else(0,$t.A)(e,"LINE_BREAKS")?!0===e.LINE_BREAKS&&(i=!0):Rr(a,e.PATTERN)&&(i=!0)})),t&&!i&&r.push({message:"Warning: No LINE_BREAKS Found.\n\tThis Lexer has been defined to track line and column information,\n\tBut none of the Token Types can be identified as matching a line terminator.\n\tSee https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS \n\tfor details.",type:ni.NO_LINE_BREAKS_FLAGS}),r}function br(e){const t=e.PATTERN;if(tn(t))return!1;if((0,Hn.A)(t))return!0;if((0,$t.A)(t,"exec"))return!0;if((0,Pt.A)(t))return!1;throw Error("non exhaustive match")}function _r(e){return!(!(0,Pt.A)(e)||1!==e.length)&&e.charCodeAt(0)}const Pr={test:function(e){const t=e.length;for(let n=this.lastIndex;n(0,Pt.A)(e)?e.charCodeAt(0):e))}function Ur(e,t,n){void 0===e[t]?e[t]=[n]:e[t].push(n)}const Fr=256;let Gr=[];function Kr(e){return ee.CATEGORIES))));const e=ir(n,t);t=t.concat(e),(0,Nt.A)(e)?r=!1:n=e}return t}(e);!function(e){(0,It.A)(e,(e=>{var t;Jr(e)||(Xr[Yr]=e,e.tokenTypeIdx=Yr++),Zr(e)&&!(0,vn.A)(e.CATEGORIES)&&(e.CATEGORIES=[e.CATEGORIES]),Zr(e)||(e.CATEGORIES=[]),t=e,(0,$t.A)(t,"categoryMatches")||(e.categoryMatches=[]),function(e){return(0,$t.A)(e,"categoryMatchesMap")}(e)||(e.categoryMatchesMap={})}))}(t),function(e){(0,It.A)(e,(e=>{Qr([],e)}))}(t),function(e){(0,It.A)(e,(e=>{e.categoryMatches=[],(0,It.A)(e.categoryMatchesMap,((t,n)=>{e.categoryMatches.push(Xr[n].tokenTypeIdx)}))}))}(t),(0,It.A)(t,(e=>{e.isParent=e.categoryMatches.length>0}))}function Qr(e,t){(0,It.A)(e,(e=>{t.categoryMatchesMap[e.tokenTypeIdx]=!0})),(0,It.A)(t.CATEGORIES,(n=>{const r=e.concat(t);In(r,n)||Qr(r,n)}))}function Jr(e){return(0,$t.A)(e,"tokenTypeIdx")}function Zr(e){return(0,$t.A)(e,"CATEGORIES")}function ei(e){return(0,$t.A)(e,"tokenTypeIdx")}const ti={buildUnableToPopLexerModeMessage:e=>`Unable to pop Lexer Mode after encountering Token ->${e.image}<- The Mode Stack is empty`,buildUnexpectedCharactersMessage:(e,t,n,r,i)=>`unexpected character: ->${e.charAt(t)}<- at offset: ${t}, skipped ${n} characters.`};var ni;!function(e){e[e.MISSING_PATTERN=0]="MISSING_PATTERN",e[e.INVALID_PATTERN=1]="INVALID_PATTERN",e[e.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",e[e.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",e[e.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",e[e.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",e[e.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",e[e.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",e[e.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",e[e.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",e[e.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",e[e.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",e[e.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",e[e.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",e[e.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",e[e.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",e[e.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK",e[e.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE=17]="MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE"}(ni||(ni={}));const ri={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:["\n","\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:ti,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0};Object.freeze(ri);class ii{constructor(e,t=ri){if(this.lexerDefinition=e,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},this.TRACE_INIT=(e,t)=>{if(!0===this.traceInitPerf){this.traceInitIndent++;const n=new Array(this.traceInitIndent+1).join("\t");this.traceInitIndent`);const{time:r,value:i}=Hr(t),s=r>10?console.warn:console.log;return this.traceInitIndent time: ${r}ms`),this.traceInitIndent--,i}return t()},"boolean"==typeof t)throw Error("The second argument to the Lexer constructor is now an ILexerConfig Object.\na boolean 2nd argument is no longer supported");this.config=jt({},ri,t);const n=this.config.traceInitPerf;!0===n?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):"number"==typeof n&&(this.traceInitMaxIdent=n,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",(()=>{let n,r=!0;this.TRACE_INIT("Lexer Config handling",(()=>{if(this.config.lineTerminatorsPattern===ri.lineTerminatorsPattern)this.config.lineTerminatorsPattern=Pr;else if(this.config.lineTerminatorCharacters===ri.lineTerminatorCharacters)throw Error("Error: Missing property on the Lexer config.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS");if(t.safeMode&&t.ensureOptimizations)throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');this.trackStartLines=/full|onlyStart/i.test(this.config.positionTracking),this.trackEndLines=/full/i.test(this.config.positionTracking),(0,vn.A)(e)?n={modes:{defaultMode:(0,wt.A)(e)},defaultMode:kr}:(r=!1,n=(0,wt.A)(e))})),!1===this.config.skipValidations&&(this.TRACE_INIT("performRuntimeChecks",(()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(function(e){const t=[];return(0,$t.A)(e,kr)||t.push({message:"A MultiMode Lexer cannot be initialized without a <"+kr+"> property in its definition\n",type:ni.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),(0,$t.A)(e,xr)||t.push({message:"A MultiMode Lexer cannot be initialized without a property in its definition\n",type:ni.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),(0,$t.A)(e,xr)&&(0,$t.A)(e,kr)&&!(0,$t.A)(e.modes,e.defaultMode)&&t.push({message:`A MultiMode Lexer cannot be initialized with a ${kr}: <${e.defaultMode}>which does not exist\n`,type:ni.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),(0,$t.A)(e,xr)&&(0,It.A)(e.modes,((e,n)=>{(0,It.A)(e,((r,i)=>{if((0,Fn.A)(r))t.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${n}> at index: <${i}>\n`,type:ni.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED});else if((0,$t.A)(r,"LONGER_ALT")){const i=(0,vn.A)(r.LONGER_ALT)?r.LONGER_ALT:[r.LONGER_ALT];(0,It.A)(i,(i=>{(0,Fn.A)(i)||In(e,i)||t.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${i.name}> on token <${r.name}> outside of mode <${n}>\n`,type:ni.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})}))}}))})),t}(n,this.trackStartLines,this.config.lineTerminatorCharacters))})),this.TRACE_INIT("performWarningRuntimeChecks",(()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(Or(n,this.trackStartLines,this.config.lineTerminatorCharacters))}))),n.modes=n.modes?n.modes:{},(0,It.A)(n.modes,((e,t)=>{n.modes[t]=Vn(e,(e=>(0,Fn.A)(e)))}));const i=(0,Kt.A)(n.modes);if((0,It.A)(n.modes,((e,n)=>{this.TRACE_INIT(`Mode: <${n}> processing`,(()=>{if(this.modes.push(n),!1===this.config.skipValidations&&this.TRACE_INIT("validatePatterns",(()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(Nr(e,i))})),(0,Nt.A)(this.lexerDefinitionErrors)){let r;qr(e),this.TRACE_INIT("analyzeTokenTypes",(()=>{r=Sr(e,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:t.positionTracking,ensureOptimizations:t.ensureOptimizations,safeMode:t.safeMode,tracer:this.TRACE_INIT})})),this.patternIdxToConfig[n]=r.patternIdxToConfig,this.charCodeToPatternIdxToConfig[n]=r.charCodeToPatternIdxToConfig,this.emptyGroups=jt({},this.emptyGroups,r.emptyGroups),this.hasCustom=r.hasCustom||this.hasCustom,this.canModeBeOptimized[n]=r.canBeOptimized}}))})),this.defaultMode=n.defaultMode,!(0,Nt.A)(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling){const e=(0,Ct.A)(this.lexerDefinitionErrors,(e=>e.message)).join("-----------------------\n");throw new Error("Errors detected in definition of Lexer:\n"+e)}(0,It.A)(this.lexerDefinitionWarning,(e=>{lr(e.message)})),this.TRACE_INIT("Choosing sub-methods implementations",(()=>{if(Ir?(this.chopInput=Br.A,this.match=this.matchWithTest):(this.updateLastIndex=jr.A,this.match=this.matchWithExec),r&&(this.handleModes=jr.A),!1===this.trackStartLines&&(this.computeNewColumn=Br.A),!1===this.trackEndLines&&(this.updateTokenEndLineColumnLocation=jr.A),/full/i.test(this.config.positionTracking))this.createTokenInstance=this.createFullToken;else if(/onlyStart/i.test(this.config.positionTracking))this.createTokenInstance=this.createStartOnlyToken;else{if(!/onlyOffset/i.test(this.config.positionTracking))throw Error(`Invalid config option: "${this.config.positionTracking}"`);this.createTokenInstance=this.createOffsetOnlyToken}this.hasCustom?(this.addToken=this.addTokenUsingPush,this.handlePayload=this.handlePayloadWithCustom):(this.addToken=this.addTokenUsingMemberAccess,this.handlePayload=this.handlePayloadNoCustom)})),this.TRACE_INIT("Failed Optimization Warnings",(()=>{const e=(0,Yn.A)(this.canModeBeOptimized,((e,t,n)=>(!1===t&&e.push(n),e)),[]);if(t.ensureOptimizations&&!(0,Nt.A)(e))throw Error(`Lexer Modes: < ${e.join(", ")} > cannot be optimized.\n\t Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode.\n\t Or inspect the console log for details on how to resolve these issues.`)})),this.TRACE_INIT("clearRegExpParserCache",(()=>{ur={}})),this.TRACE_INIT("toFastProperties",(()=>{Lt(this)}))}))}tokenize(e,t=this.defaultMode){if(!(0,Nt.A)(this.lexerDefinitionErrors)){const e=(0,Ct.A)(this.lexerDefinitionErrors,(e=>e.message)).join("-----------------------\n");throw new Error("Unable to Tokenize because Errors detected in definition of Lexer:\n"+e)}return this.tokenizeInternal(e,t)}tokenizeInternal(e,t){let n,r,i,s,o,a,c,l,u,d,h,f,p,m,g;const y=e,A=y.length;let T=0,v=0;const R=this.hasCustom?0:Math.floor(e.length/10),E=new Array(R),k=[];let x=this.trackStartLines?1:void 0,I=this.trackStartLines?1:void 0;const S=function(e){const t={},n=(0,Kt.A)(e);return(0,It.A)(n,(n=>{const r=e[n];if(!(0,vn.A)(r))throw Error("non exhaustive match");t[n]=[]})),t}(this.emptyGroups),N=this.trackStartLines,C=this.config.lineTerminatorsPattern;let $=0,w=[],L=[];const O=[],b=[];let _;function P(){return w}function M(e){const t=Kr(e),n=L[t];return void 0===n?b:n}Object.freeze(b);const D=e=>{if(1===O.length&&void 0===e.tokenType.PUSH_MODE){const t=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(e);k.push({offset:e.startOffset,line:e.startLine,column:e.startColumn,length:e.image.length,message:t})}else{O.pop();const e=(0,Vr.A)(O);w=this.patternIdxToConfig[e],L=this.charCodeToPatternIdxToConfig[e],$=w.length;const t=this.canModeBeOptimized[e]&&!1===this.config.safeMode;_=L&&t?M:P}};function U(e){O.push(e),L=this.charCodeToPatternIdxToConfig[e],w=this.patternIdxToConfig[e],$=w.length,$=w.length;const t=this.canModeBeOptimized[e]&&!1===this.config.safeMode;_=L&&t?M:P}let F;U.call(this,t);const G=this.config.recoveryEnabled;for(;Ta.length){a=s,c=l,F=t;break}}}break}}if(null!==a){if(u=a.length,d=F.group,void 0!==d&&(h=F.tokenTypeIdx,f=this.createTokenInstance(a,T,h,F.tokenType,x,I,u),this.handlePayload(f,c),!1===d?v=this.addToken(E,v,f):S[d].push(f)),e=this.chopInput(e,u),T+=u,I=this.computeNewColumn(I,u),!0===N&&!0===F.canLineTerminator){let e,t,n=0;C.lastIndex=0;do{e=C.test(a),!0===e&&(t=C.lastIndex-1,n++)}while(!0===e);0!==n&&(x+=n,I=u-t,this.updateTokenEndLineColumnLocation(f,d,t,n,x,I,u))}this.handleModes(F,D,U,f)}else{const t=T,n=x,i=I;let s=!1===G;for(;!1===s&&T`Expecting ${oi(e)?`--\x3e ${si(e)} <--`:`token of type --\x3e ${e.name} <--`} but found --\x3e '${t.image}' <--`,buildNotAllInputParsedMessage:({firstRedundant:e,ruleName:t})=>"Redundant input, expecting EOF but found: "+e.image,buildNoViableAltMessage({expectedPathsPerAlt:e,actual:t,previous:n,customUserDescription:r,ruleName:i}){const s="Expecting: ",o="\nbut found: '"+or(t).image+"'";if(r)return s+r+o;{const t=(0,Yn.A)(e,((e,t)=>e.concat(t)),[]),n=(0,Ct.A)(t,(e=>`[${(0,Ct.A)(e,(e=>si(e))).join(", ")}]`));return s+`one of these possible Token sequences:\n${(0,Ct.A)(n,((e,t)=>` ${t+1}. ${e}`)).join("\n")}`+o}},buildEarlyExitMessage({expectedIterationPaths:e,actual:t,customUserDescription:n,ruleName:r}){const i="Expecting: ",s="\nbut found: '"+or(t).image+"'";if(n)return i+n+s;return i+`expecting at least one iteration which starts with one of these possible Token sequences::\n <${(0,Ct.A)(e,(e=>`[${(0,Ct.A)(e,(e=>si(e))).join(",")}]`)).join(" ,")}>`+s}};Object.freeze(vi);const Ri={buildRuleNotFoundError:(e,t)=>"Invalid grammar, reference to a rule which is not defined: ->"+t.nonTerminalName+"<-\ninside top level rule: ->"+e.name+"<-"},Ei={buildDuplicateFoundError(e,t){const n=e.name,r=or(t),i=r.idx,s=wn(r),o=(a=r)instanceof pn?a.terminalType.name:a instanceof sn?a.nonTerminalName:"";var a;let c=`->${s}${i>0?i:""}<- ${o?`with argument: ->${o}<-`:""}\n appears more than once (${t.length} times) in the top level rule: ->${n}<-. \n For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES \n `;return c=c.replace(/[ \t]+/g," "),c=c.replace(/\s\s+/g,"\n"),c},buildNamespaceConflictError:e=>`Namespace conflict found in grammar.\nThe grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <${e.name}>.\nTo resolve this make sure each Terminal and Non-Terminal names are unique\nThis is easy to accomplish by using the convention that Terminal names start with an uppercase letter\nand Non-Terminal names start with a lower case letter.`,buildAlternationPrefixAmbiguityError(e){const t=(0,Ct.A)(e.prefixPath,(e=>si(e))).join(", "),n=0===e.alternation.idx?"":e.alternation.idx;return`Ambiguous alternatives: <${e.ambiguityIndices.join(" ,")}> due to common lookahead prefix\nin inside <${e.topLevelRule.name}> Rule,\n<${t}> may appears as a prefix path in all these alternatives.\nSee: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX\nFor Further details.`},buildAlternationAmbiguityError(e){const t=(0,Ct.A)(e.prefixPath,(e=>si(e))).join(", "),n=0===e.alternation.idx?"":e.alternation.idx;let r=`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(" ,")}> in inside <${e.topLevelRule.name}> Rule,\n<${t}> may appears as a prefix path in all these alternatives.\n`;return r+="See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES\nFor Further details.",r},buildEmptyRepetitionError(e){let t=wn(e.repetition);0!==e.repetition.idx&&(t+=e.repetition.idx);return`The repetition <${t}> within Rule <${e.topLevelRule.name}> can never consume any tokens.\nThis could lead to an infinite loop.`},buildTokenNameError:e=>"deprecated",buildEmptyAlternationError:e=>`Ambiguous empty alternative: <${e.emptyChoiceIdx+1}> in inside <${e.topLevelRule.name}> Rule.\nOnly the last alternative may be an empty alternative.`,buildTooManyAlternativesError:e=>`An Alternation cannot have more than 256 alternatives:\n inside <${e.topLevelRule.name}> Rule.\n has ${e.alternation.definition.length+1} alternatives.`,buildLeftRecursionError(e){const t=e.topLevelRule.name;return`Left Recursion found in grammar.\nrule: <${t}> can be invoked from itself (directly or indirectly)\nwithout consuming any Tokens. The grammar path that causes this is: \n ${`${t} --\x3e ${(0,Ct.A)(e.leftRecursionPath,(e=>e.name)).concat([t]).join(" --\x3e ")}`}\n To fix this refactor your grammar to remove the left recursion.\nsee: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`},buildInvalidRuleNameError:e=>"deprecated",buildDuplicateRuleNameError(e){let t;t=e.topLevelRule instanceof on?e.topLevelRule.name:e.topLevelRule;return`Duplicate definition, rule: ->${t}<- is already defined in the grammar: ->${e.grammarName}<-`}};class ki extends gn{constructor(e,t){super(),this.nameToTopRule=e,this.errMsgProvider=t,this.errors=[]}resolveRefs(){(0,It.A)((0,St.A)(this.nameToTopRule),(e=>{this.currTopLevel=e,e.accept(this)}))}visitNonTerminal(e){const t=this.nameToTopRule[e.nonTerminalName];if(t)e.referencedRule=t;else{const t=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,e);this.errors.push({message:t,type:eo.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName})}}}const xi=function(e,t){return(0,tr.A)((0,Ct.A)(e,t),1)};var Ii=n(52528);const Si=function(e,t,n,r){for(var i=-1,s=null==e?0:e.length;++i{!1===(0,Nt.A)(e.definition)&&(r=s(e.definition))})),r;if(!(t instanceof pn))throw Error("non exhaustive match");n.push(t.terminalType)}}i++}return r.push({partialPath:n,suffixDef:_t(e,i)}),r}function Gi(e,t,n,r){const i="EXIT_NONE_TERMINAL",s=[i],o="EXIT_ALTERNATIVE";let a=!1;const c=t.length,l=c-r-1,u=[],d=[];for(d.push({idx:-1,def:e,ruleStack:[],occurrenceStack:[]});!(0,Nt.A)(d);){const e=d.pop();if(e===o){a&&(0,Vr.A)(d).idx<=l&&d.pop();continue}const r=e.def,h=e.idx,f=e.ruleStack,p=e.occurrenceStack;if((0,Nt.A)(r))continue;const m=r[0];if(m===i){const e={idx:h,def:_t(r),ruleStack:Li(f),occurrenceStack:Li(p)};d.push(e)}else if(m instanceof pn)if(h=0;t--){const e={idx:h,def:m.definition[t].definition.concat(_t(r)),ruleStack:f,occurrenceStack:p};d.push(e),d.push(o)}else if(m instanceof an)d.push({idx:h,def:m.definition.concat(_t(r)),ruleStack:f,occurrenceStack:p});else{if(!(m instanceof on))throw Error("non exhaustive match");d.push(Ki(m,h,f,p))}}return u}function Ki(e,t,n,r){const i=(0,wt.A)(n);i.push(e.name);const s=(0,wt.A)(r);return s.push(1),{idx:t,def:e.definition,ruleStack:i,occurrenceStack:s}}var Bi;function ji(e){if(e instanceof cn||"Option"===e)return Bi.OPTION;if(e instanceof dn||"Repetition"===e)return Bi.REPETITION;if(e instanceof ln||"RepetitionMandatory"===e)return Bi.REPETITION_MANDATORY;if(e instanceof un||"RepetitionMandatoryWithSeparator"===e)return Bi.REPETITION_MANDATORY_WITH_SEPARATOR;if(e instanceof hn||"RepetitionWithSeparator"===e)return Bi.REPETITION_WITH_SEPARATOR;if(e instanceof fn||"Alternation"===e)return Bi.ALTERNATION;throw Error("non exhaustive match")}function Vi(e){const{occurrence:t,rule:n,prodType:r,maxLookahead:i}=e,s=ji(r);return s===Bi.ALTERNATION?Zi(t,n,i):es(t,n,s,i)}function Hi(e,t,n,r){const i=e.length,s=Cn(e,(e=>Cn(e,(e=>1===e.length))));if(t)return function(t){const r=(0,Ct.A)(t,(e=>e.GATE));for(let s=0;s(0,Pn.A)(e))),n=(0,Yn.A)(t,((e,t,n)=>((0,It.A)(t,(t=>{(0,$t.A)(e,t.tokenTypeIdx)||(e[t.tokenTypeIdx]=n),(0,It.A)(t.categoryMatches,(t=>{(0,$t.A)(e,t)||(e[t]=n)}))})),e)),{});return function(){const e=this.LA(1);return n[e.tokenTypeIdx]}}return function(){for(let t=0;t1===e.length)),i=e.length;if(r&&!n){const t=(0,Pn.A)(e);if(1===t.length&&(0,Nt.A)(t[0].categoryMatches)){const e=t[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===e}}{const e=(0,Yn.A)(t,((e,t,n)=>(e[t.tokenTypeIdx]=!0,(0,It.A)(t.categoryMatches,(t=>{e[t]=!0})),e)),[]);return function(){const t=this.LA(1);return!0===e[t.tokenTypeIdx]}}}return function(){e:for(let n=0;nFi([e],1))),r=Xi(n.length),i=(0,Ct.A)(n,(e=>{const t={};return(0,It.A)(e,(e=>{const n=qi(e.partialPath);(0,It.A)(n,(e=>{t[e]=!0}))})),t}));let s=n;for(let o=1;o<=t;o++){const e=s;s=Xi(e.length);for(let n=0;n{const t=qi(e.partialPath);(0,It.A)(t,(e=>{i[n][e]=!0}))}))}}}}return r}function Zi(e,t,n,r){const i=new Yi(e,Bi.ALTERNATION,r);return t.accept(i),Ji(i.result,n)}function es(e,t,n,r){const i=new Yi(e,n);t.accept(i);const s=i.result,o=new zi(t,e,n).startWalking();return Ji([new an({definition:s}),new an({definition:o})],r)}function ts(e,t){e:for(let n=0;nCn(e,(e=>Cn(e,(e=>(0,Nt.A)(e.categoryMatches)))))))}function rs(e,t,n,r){const i=xi(e,(e=>function(e,t){const n=new os;e.accept(n);const r=n.allProductions,i=wi(r,is),s=Yt(i,(e=>e.length>1)),o=(0,Ct.A)((0,St.A)(s),(n=>{const r=or(n),i=t.buildDuplicateFoundError(e,n),s=wn(r),o={message:i,type:eo.DUPLICATE_PRODUCTIONS,ruleName:e.name,dslName:s,occurrence:r.idx},a=ss(r);return a&&(o.parameter=a),o}));return o}(e,n))),s=function(e,t,n){const r=[],i=(0,Ct.A)(t,(e=>e.name));return(0,It.A)(e,(e=>{const t=e.name;if(In(i,t)){const i=n.buildNamespaceConflictError(e);r.push({message:i,type:eo.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:t})}})),r}(e,t,n),o=xi(e,(e=>function(e,t){const n=new ls;e.accept(n);const r=n.alternations,i=xi(r,(n=>n.definition.length>255?[{message:t.buildTooManyAlternativesError({topLevelRule:e,alternation:n}),type:eo.TOO_MANY_ALTS,ruleName:e.name,occurrence:n.idx}]:[]));return i}(e,n))),a=xi(e,(t=>function(e,t,n,r){const i=[],s=(0,Yn.A)(t,((t,n)=>n.name===e.name?t+1:t),0);if(s>1){const t=r.buildDuplicateRuleNameError({topLevelRule:e,grammarName:n});i.push({message:t,type:eo.DUPLICATE_RULE_NAME,ruleName:e.name})}return i}(t,e,r,n)));return i.concat(s,o,a)}function is(e){return`${wn(e)}_#_${e.idx}_#_${ss(e)}`}function ss(e){return e instanceof pn?e.terminalType.name:e instanceof sn?e.nonTerminalName:""}class os extends gn{constructor(){super(...arguments),this.allProductions=[]}visitNonTerminal(e){this.allProductions.push(e)}visitOption(e){this.allProductions.push(e)}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}visitAlternation(e){this.allProductions.push(e)}visitTerminal(e){this.allProductions.push(e)}}function as(e,t,n,r=[]){const i=[],s=cs(t.definition);if((0,Nt.A)(s))return[];{const t=e.name;In(s,e)&&i.push({message:n.buildLeftRecursionError({topLevelRule:e,leftRecursionPath:r}),type:eo.LEFT_RECURSION,ruleName:t});const o=ir(s,r.concat([e])),a=xi(o,(t=>{const i=(0,wt.A)(r);return i.push(t),as(e,t,n,i)}));return i.concat(a)}}function cs(e){let t=[];if((0,Nt.A)(e))return t;const n=or(e);if(n instanceof sn)t.push(n.referencedRule);else if(n instanceof an||n instanceof cn||n instanceof ln||n instanceof un||n instanceof hn||n instanceof dn)t=t.concat(cs(n.definition));else if(n instanceof fn)t=(0,Pn.A)((0,Ct.A)(n.definition,(e=>cs(e.definition))));else if(!(n instanceof pn))throw Error("non exhaustive match");const r=$n(n),i=e.length>1;if(r&&i){const n=_t(e);return t.concat(cs(n))}return t}class ls extends gn{constructor(){super(...arguments),this.alternations=[]}visitAlternation(e){this.alternations.push(e)}}function us(e,t,n){const r=new ls;e.accept(r);let i=r.alternations;i=Vn(i,(e=>!0===e.ignoreAmbiguities));const s=xi(i,(r=>{const i=r.idx,s=r.maxLookahead||t,o=Zi(i,e,s,r),a=function(e,t,n,r){const i=[],s=(0,Yn.A)(e,((n,r,s)=>(!0===t.definition[s].ignoreAmbiguities||(0,It.A)(r,(r=>{const o=[s];(0,It.A)(e,((e,n)=>{s!==n&&ts(e,r)&&!0!==t.definition[n].ignoreAmbiguities&&o.push(n)})),o.length>1&&!ts(i,r)&&(i.push(r),n.push({alts:o,path:r}))})),n)),[]),o=(0,Ct.A)(s,(e=>{const i=(0,Ct.A)(e.alts,(e=>e+1));return{message:r.buildAlternationAmbiguityError({topLevelRule:n,alternation:t,ambiguityIndices:i,prefixPath:e.path}),type:eo.AMBIGUOUS_ALTS,ruleName:n.name,occurrence:t.idx,alternatives:e.alts}}));return o}(o,r,e,n),c=function(e,t,n,r){const i=(0,Yn.A)(e,((e,t,n)=>{const r=(0,Ct.A)(t,(e=>({idx:n,path:e})));return e.concat(r)}),[]),s=sr(xi(i,(e=>{if(!0===t.definition[e.idx].ignoreAmbiguities)return[];const s=e.idx,o=e.path,a=(0,Xn.A)(i,(e=>{return!0!==t.definition[e.idx].ignoreAmbiguities&&e.idx{const n=r[t];return e===n||n.categoryMatchesMap[e.tokenTypeIdx]})));var n,r}));return(0,Ct.A)(a,(e=>{const i=[e.idx+1,s+1],o=0===t.idx?"":t.idx;return{message:r.buildAlternationPrefixAmbiguityError({topLevelRule:n,alternation:t,ambiguityIndices:i,prefixPath:e.path}),type:eo.AMBIGUOUS_PREFIX_ALTS,ruleName:n.name,occurrence:o,alternatives:i}}))})));return s}(o,r,e,n);return a.concat(c)}));return s}class ds extends gn{constructor(){super(...arguments),this.allProductions=[]}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}}function hs(e){const t=(0,Gn.A)(e,{errMsgProvider:Ri}),n={};return(0,It.A)(e.rules,(e=>{n[e.name]=e})),function(e,t){const n=new ki(e,t);return n.resolveRefs(),n.errors}(n,t.errMsgProvider)}const fs="MismatchedTokenException",ps="NoViableAltException",ms="EarlyExitException",gs="NotAllInputParsedException",ys=[fs,ps,ms,gs];function As(e){return In(ys,e.name)}Object.freeze(ys);class Ts extends Error{constructor(e,t){super(e),this.token=t,this.resyncedTokens=[],Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}}class vs extends Ts{constructor(e,t,n){super(e,t),this.previousToken=n,this.name=fs}}class Rs extends Ts{constructor(e,t,n){super(e,t),this.previousToken=n,this.name=ps}}class Es extends Ts{constructor(e,t){super(e,t),this.name=gs}}class ks extends Ts{constructor(e,t,n){super(e,t),this.previousToken=n,this.name=ms}}const xs={},Is="InRuleRecoveryException";class Ss extends Error{constructor(e){super(e),this.name=Is}}function Ns(e,t,n,r,i,s,o){const a=this.getKeyForAutomaticLookahead(r,i);let c=this.firstAfterRepMap[a];if(void 0===c){const e=this.getCurrRuleFullName();c=new s(this.getGAstProductions()[e],i).startWalking(),this.firstAfterRepMap[a]=c}let l=c.token,u=c.occurrence;const d=c.isEndOfRule;1===this.RULE_STACK.length&&d&&void 0===l&&(l=yi,u=1),void 0!==l&&void 0!==u&&this.shouldInRepetitionRecoveryBeTried(l,u,o)&&this.tryInRepetitionRecovery(e,t,n,l)}const Cs=1024,$s=1280,ws=1536;function Ls(e,t,n){return n|t|e}class Os{constructor(e){var t;this.maxLookahead=null!==(t=null==e?void 0:e.maxLookahead)&&void 0!==t?t:Js.maxLookahead}validate(e){const t=this.validateNoLeftRecursion(e.rules);if((0,Nt.A)(t)){const n=this.validateEmptyOrAlternatives(e.rules),r=this.validateAmbiguousAlternationAlternatives(e.rules,this.maxLookahead),i=this.validateSomeNonEmptyLookaheadPath(e.rules,this.maxLookahead);return[...t,...n,...r,...i]}return t}validateNoLeftRecursion(e){return xi(e,(e=>as(e,e,Ei)))}validateEmptyOrAlternatives(e){return xi(e,(e=>function(e,t){const n=new ls;e.accept(n);const r=n.alternations;return xi(r,(n=>{const r=Li(n.definition);return xi(r,((r,i)=>{const s=Gi([r],[],Wr,1);return(0,Nt.A)(s)?[{message:t.buildEmptyAlternationError({topLevelRule:e,alternation:n,emptyChoiceIdx:i}),type:eo.NONE_LAST_EMPTY_ALT,ruleName:e.name,occurrence:n.idx,alternative:i+1}]:[]}))}))}(e,Ei)))}validateAmbiguousAlternationAlternatives(e,t){return xi(e,(e=>us(e,t,Ei)))}validateSomeNonEmptyLookaheadPath(e,t){return function(e,t,n){const r=[];return(0,It.A)(e,(e=>{const i=new ds;e.accept(i);const s=i.allProductions;(0,It.A)(s,(i=>{const s=ji(i),o=i.maxLookahead||t,a=es(i.idx,e,s,o)[0];if((0,Nt.A)((0,Pn.A)(a))){const t=n.buildEmptyRepetitionError({topLevelRule:e,repetition:i});r.push({message:t,type:eo.NO_NON_EMPTY_LOOKAHEAD,ruleName:e.name})}}))})),r}(e,t,Ei)}buildLookaheadForAlternation(e){return function(e,t,n,r,i,s){const o=Zi(e,t,n);return s(o,r,ns(o)?zr:Wr,i)}(e.prodOccurrence,e.rule,e.maxLookahead,e.hasPredicates,e.dynamicTokensEnabled,Hi)}buildLookaheadForOptional(e){return function(e,t,n,r,i,s){const o=es(e,t,i,n),a=ns(o)?zr:Wr;return s(o[0],a,r)}(e.prodOccurrence,e.rule,e.maxLookahead,e.dynamicTokensEnabled,ji(e.prodType),Wi)}}const bs=new class extends gn{constructor(){super(...arguments),this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}reset(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}visitOption(e){this.dslMethods.option.push(e)}visitRepetitionWithSeparator(e){this.dslMethods.repetitionWithSeparator.push(e)}visitRepetitionMandatory(e){this.dslMethods.repetitionMandatory.push(e)}visitRepetitionMandatoryWithSeparator(e){this.dslMethods.repetitionMandatoryWithSeparator.push(e)}visitRepetition(e){this.dslMethods.repetition.push(e)}visitAlternation(e){this.dslMethods.alternation.push(e)}};function _s(e,t){!0===isNaN(e.startOffset)?(e.startOffset=t.startOffset,e.endOffset=t.endOffset):e.endOffset!1===(0,Hn.A)(e[t]))),r=(0,Ct.A)(n,(t=>({msg:`Missing visitor method: <${t}> on ${e.constructor.name} CST Visitor.`,type:Fs.MISSING_METHOD,methodName:t})));return sr(r)}(e,t);return n}(this,t);if(!(0,Nt.A)(e)){const t=(0,Ct.A)(e,(e=>e.msg));throw Error(`Errors Detected in CST Visitor <${this.constructor.name}>:\n\t${t.join("\n\n").replace(/\n/g,"\n\t")}`)}}};return(n.prototype=r).constructor=n,n._RULE_NAMES=t,n}var Fs;!function(e){e[e.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",e[e.MISSING_METHOD=1]="MISSING_METHOD"}(Fs||(Fs={}));var Gs=n(23149);const Ks={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(Ks);const Bs=!0,js=Math.pow(2,8)-1,Vs=gi({name:"RECORDING_PHASE_TOKEN",pattern:ii.NA});qr([Vs]);const Hs=Ai(Vs,"This IToken indicates the Parser is in Recording Phase\n\tSee: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details",-1,-1,-1,-1,-1,-1);Object.freeze(Hs);const Ws={name:"This CSTNode indicates the Parser is in Recording Phase\n\tSee: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details",children:{}};function zs(e,t,n,r=!1){qs(n);const i=(0,Vr.A)(this.recordingProdStack),s=(0,Hn.A)(t)?t:t.DEF,o=new e({definition:[],idx:n});return r&&(o.separator=t.SEP),(0,$t.A)(t,"MAX_LOOKAHEAD")&&(o.maxLookahead=t.MAX_LOOKAHEAD),this.recordingProdStack.push(o),s.call(this),i.definition.push(o),this.recordingProdStack.pop(),Ks}function Ys(e,t){qs(t);const n=(0,Vr.A)(this.recordingProdStack),r=!1===(0,vn.A)(e),i=!1===r?e:e.DEF,s=new fn({definition:[],idx:t,ignoreAmbiguities:r&&!0===e.IGNORE_AMBIGUITIES});(0,$t.A)(e,"MAX_LOOKAHEAD")&&(s.maxLookahead=e.MAX_LOOKAHEAD);const o=En(i,(e=>(0,Hn.A)(e.GATE)));return s.hasPredicates=o,n.definition.push(s),(0,It.A)(i,(e=>{const t=new an({definition:[]});s.definition.push(t),(0,$t.A)(e,"IGNORE_AMBIGUITIES")?t.ignoreAmbiguities=e.IGNORE_AMBIGUITIES:(0,$t.A)(e,"GATE")&&(t.ignoreAmbiguities=!0),this.recordingProdStack.push(t),e.ALT.call(this),this.recordingProdStack.pop()})),Ks}function Xs(e){return 0===e?"":`${e}`}function qs(e){if(e<0||e>js){const t=new Error(`Invalid DSL Method idx value: <${e}>\n\tIdx value must be a none negative value smaller than ${js+1}`);throw t.KNOWN_RECORDER_ERROR=!0,t}}const Qs=Ai(yi,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(Qs);const Js=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:vi,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),Zs=Object.freeze({recoveryValueFunc:()=>{},resyncEnabled:!0});var eo,to,no;function ro(e=void 0){return function(){return e}}!function(e){e[e.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",e[e.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",e[e.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",e[e.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",e[e.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",e[e.LEFT_RECURSION=5]="LEFT_RECURSION",e[e.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",e[e.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",e[e.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",e[e.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",e[e.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",e[e.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",e[e.TOO_MANY_ALTS=12]="TOO_MANY_ALTS",e[e.CUSTOM_LOOKAHEAD_VALIDATION=13]="CUSTOM_LOOKAHEAD_VALIDATION"}(eo||(eo={}));class io{static performSelfAnalysis(e){throw Error("The **static** `performSelfAnalysis` method has been deprecated.\t\nUse the **instance** method with the same name instead.")}performSelfAnalysis(){this.TRACE_INIT("performSelfAnalysis",(()=>{let e;this.selfAnalysisDone=!0;const t=this.className;this.TRACE_INIT("toFastProps",(()=>{Lt(this)})),this.TRACE_INIT("Grammar Recording",(()=>{try{this.enableRecording(),(0,It.A)(this.definedRulesNames,(e=>{const t=this[e].originalGrammarAction;let n;this.TRACE_INIT(`${e} Rule`,(()=>{n=this.topLevelRuleRecord(e,t)})),this.gastProductionsCache[e]=n}))}finally{this.disableRecording()}}));let n=[];if(this.TRACE_INIT("Grammar Resolving",(()=>{n=hs({rules:(0,St.A)(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(n)})),this.TRACE_INIT("Grammar Validations",(()=>{if((0,Nt.A)(n)&&!1===this.skipValidations){const n=(e={rules:(0,St.A)(this.gastProductionsCache),tokenTypes:(0,St.A)(this.tokensMap),errMsgProvider:Ei,grammarName:t},rs((e=(0,Gn.A)(e,{errMsgProvider:Ei})).rules,e.tokenTypes,e.errMsgProvider,e.grammarName)),r=function(e){const t=e.lookaheadStrategy.validate({rules:e.rules,tokenTypes:e.tokenTypes,grammarName:e.grammarName});return(0,Ct.A)(t,(e=>Object.assign({type:eo.CUSTOM_LOOKAHEAD_VALIDATION},e)))}({lookaheadStrategy:this.lookaheadStrategy,rules:(0,St.A)(this.gastProductionsCache),tokenTypes:(0,St.A)(this.tokensMap),grammarName:t});this.definitionErrors=this.definitionErrors.concat(n,r)}var e})),(0,Nt.A)(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",(()=>{const e=function(e){const t={};return(0,It.A)(e,(e=>{const n=new Un(e).startWalking();jt(t,n)})),t}((0,St.A)(this.gastProductionsCache));this.resyncFollows=e})),this.TRACE_INIT("ComputeLookaheadFunctions",(()=>{var e,t;null===(t=(e=this.lookaheadStrategy).initialize)||void 0===t||t.call(e,{rules:(0,St.A)(this.gastProductionsCache)}),this.preComputeLookaheadFunctions((0,St.A)(this.gastProductionsCache))}))),!io.DEFER_DEFINITION_ERRORS_HANDLING&&!(0,Nt.A)(this.definitionErrors))throw e=(0,Ct.A)(this.definitionErrors,(e=>e.message)),new Error(`Parser Definition Errors detected:\n ${e.join("\n-------------------------------\n")}`)}))}constructor(e,t){this.definitionErrors=[],this.selfAnalysisDone=!1;const n=this;if(n.initErrorHandler(t),n.initLexerAdapter(),n.initLooksAhead(t),n.initRecognizerEngine(e,t),n.initRecoverable(t),n.initTreeBuilder(t),n.initContentAssist(),n.initGastRecorder(t),n.initPerformanceTracer(t),(0,$t.A)(t,"ignoredIssues"))throw new Error("The IParserConfig property has been deprecated.\n\tPlease use the flag on the relevant DSL method instead.\n\tSee: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES\n\tFor further details.");this.skipValidations=(0,$t.A)(t,"skipValidations")?t.skipValidations:Js.skipValidations}}io.DEFER_DEFINITION_ERRORS_HANDLING=!1,to=io,no=[class{initRecoverable(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=(0,$t.A)(e,"recoveryEnabled")?e.recoveryEnabled:Js.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=Ns)}getTokenToInsert(e){const t=Ai(e,"",NaN,NaN,NaN,NaN,NaN,NaN);return t.isInsertedInRecovery=!0,t}canTokenTypeBeInsertedInRecovery(e){return!0}canTokenTypeBeDeletedInRecovery(e){return!0}tryInRepetitionRecovery(e,t,n,r){const i=this.findReSyncTokenType(),s=this.exportLexerState(),o=[];let a=!1;const c=this.LA(1);let l=this.LA(1);const u=()=>{const e=this.LA(0),t=this.errorMessageProvider.buildMismatchTokenMessage({expected:r,actual:c,previous:e,ruleName:this.getCurrRuleFullName()}),n=new vs(t,c,this.LA(0));n.resyncedTokens=Li(o),this.SAVE_ERROR(n)};for(;!a;){if(this.tokenMatcher(l,r))return void u();if(n.call(this))return u(),void e.apply(this,t);this.tokenMatcher(l,i)?a=!0:(l=this.SKIP_TOKEN(),this.addToResyncTokens(l,o))}this.importLexerState(s)}shouldInRepetitionRecoveryBeTried(e,t,n){return!1!==n&&!this.tokenMatcher(this.LA(1),e)&&!this.isBackTracking()&&!this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,t))}getFollowsForInRuleRecovery(e,t){const n=this.getCurrentGrammarPath(e,t);return this.getNextPossibleTokenTypes(n)}tryInRuleRecovery(e,t){if(this.canRecoverWithSingleTokenInsertion(e,t))return this.getTokenToInsert(e);if(this.canRecoverWithSingleTokenDeletion(e)){const e=this.SKIP_TOKEN();return this.consumeToken(),e}throw new Ss("sad sad panda")}canPerformInRuleRecovery(e,t){return this.canRecoverWithSingleTokenInsertion(e,t)||this.canRecoverWithSingleTokenDeletion(e)}canRecoverWithSingleTokenInsertion(e,t){if(!this.canTokenTypeBeInsertedInRecovery(e))return!1;if((0,Nt.A)(t))return!1;const n=this.LA(1);return void 0!==(0,ar.A)(t,(e=>this.tokenMatcher(n,e)))}canRecoverWithSingleTokenDeletion(e){return!!this.canTokenTypeBeDeletedInRecovery(e)&&this.tokenMatcher(this.LA(2),e)}isInCurrentRuleReSyncSet(e){const t=this.getCurrFollowKey(),n=this.getFollowSetFromFollowKey(t);return In(n,e)}findReSyncTokenType(){const e=this.flattenFollowSet();let t=this.LA(1),n=2;for(;;){const r=(0,ar.A)(e,(e=>Ti(t,e)));if(void 0!==r)return r;t=this.LA(n),n++}}getCurrFollowKey(){if(1===this.RULE_STACK.length)return xs;const e=this.getLastExplicitRuleShortName(),t=this.getLastExplicitRuleOccurrenceIndex(),n=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:t,inRule:this.shortRuleNameToFullName(n)}}buildFullFollowKeyStack(){const e=this.RULE_STACK,t=this.RULE_OCCURRENCE_STACK;return(0,Ct.A)(e,((n,r)=>0===r?xs:{ruleName:this.shortRuleNameToFullName(n),idxInCallingRule:t[r],inRule:this.shortRuleNameToFullName(e[r-1])}))}flattenFollowSet(){const e=(0,Ct.A)(this.buildFullFollowKeyStack(),(e=>this.getFollowSetFromFollowKey(e)));return(0,Pn.A)(e)}getFollowSetFromFollowKey(e){if(e===xs)return[yi];const t=e.ruleName+e.idxInCallingRule+Dn+e.inRule;return this.resyncFollows[t]}addToResyncTokens(e,t){return this.tokenMatcher(e,yi)||t.push(e),t}reSyncTo(e){const t=[];let n=this.LA(1);for(;!1===this.tokenMatcher(n,e);)n=this.SKIP_TOKEN(),this.addToResyncTokens(n,t);return Li(t)}attemptInRepetitionRecovery(e,t,n,r,i,s,o){}getCurrentGrammarPath(e,t){return{ruleStack:this.getHumanReadableRuleStack(),occurrenceStack:(0,wt.A)(this.RULE_OCCURRENCE_STACK),lastTok:e,lastTokOccurrence:t}}getHumanReadableRuleStack(){return(0,Ct.A)(this.RULE_STACK,(e=>this.shortRuleNameToFullName(e)))}},class{initLooksAhead(e){this.dynamicTokensEnabled=(0,$t.A)(e,"dynamicTokensEnabled")?e.dynamicTokensEnabled:Js.dynamicTokensEnabled,this.maxLookahead=(0,$t.A)(e,"maxLookahead")?e.maxLookahead:Js.maxLookahead,this.lookaheadStrategy=(0,$t.A)(e,"lookaheadStrategy")?e.lookaheadStrategy:new Os({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(e){(0,It.A)(e,(e=>{this.TRACE_INIT(`${e.name} Rule Lookahead`,(()=>{const{alternation:t,repetition:n,option:r,repetitionMandatory:i,repetitionMandatoryWithSeparator:s,repetitionWithSeparator:o}=function(e){bs.reset(),e.accept(bs);const t=bs.dslMethods;return bs.reset(),t}(e);(0,It.A)(t,(t=>{const n=0===t.idx?"":t.idx;this.TRACE_INIT(`${wn(t)}${n}`,(()=>{const n=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:t.idx,rule:e,maxLookahead:t.maxLookahead||this.maxLookahead,hasPredicates:t.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),r=Ls(this.fullRuleNameToShort[e.name],256,t.idx);this.setLaFuncCache(r,n)}))})),(0,It.A)(n,(t=>{this.computeLookaheadFunc(e,t.idx,768,"Repetition",t.maxLookahead,wn(t))})),(0,It.A)(r,(t=>{this.computeLookaheadFunc(e,t.idx,512,"Option",t.maxLookahead,wn(t))})),(0,It.A)(i,(t=>{this.computeLookaheadFunc(e,t.idx,Cs,"RepetitionMandatory",t.maxLookahead,wn(t))})),(0,It.A)(s,(t=>{this.computeLookaheadFunc(e,t.idx,ws,"RepetitionMandatoryWithSeparator",t.maxLookahead,wn(t))})),(0,It.A)(o,(t=>{this.computeLookaheadFunc(e,t.idx,$s,"RepetitionWithSeparator",t.maxLookahead,wn(t))}))}))}))}computeLookaheadFunc(e,t,n,r,i,s){this.TRACE_INIT(`${s}${0===t?"":t}`,(()=>{const s=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:t,rule:e,maxLookahead:i||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:r}),o=Ls(this.fullRuleNameToShort[e.name],n,t);this.setLaFuncCache(o,s)}))}getKeyForAutomaticLookahead(e,t){return Ls(this.getLastExplicitRuleShortName(),e,t)}getLaFuncFromCache(e){return this.lookAheadFuncsCache.get(e)}setLaFuncCache(e,t){this.lookAheadFuncsCache.set(e,t)}},class{initTreeBuilder(e){if(this.CST_STACK=[],this.outputCst=e.outputCst,this.nodeLocationTracking=(0,$t.A)(e,"nodeLocationTracking")?e.nodeLocationTracking:Js.nodeLocationTracking,this.outputCst)if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=Ps,this.setNodeLocationFromNode=Ps,this.cstPostRule=jr.A,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=jr.A,this.setNodeLocationFromNode=jr.A,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=_s,this.setNodeLocationFromNode=_s,this.cstPostRule=jr.A,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=jr.A,this.setNodeLocationFromNode=jr.A,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else{if(!/none/i.test(this.nodeLocationTracking))throw Error(`Invalid config option: "${e.nodeLocationTracking}"`);this.setNodeLocationFromToken=jr.A,this.setNodeLocationFromNode=jr.A,this.cstPostRule=jr.A,this.setInitialNodeLocation=jr.A}else this.cstInvocationStateUpdate=jr.A,this.cstFinallyStateUpdate=jr.A,this.cstPostTerminal=jr.A,this.cstPostNonTerminal=jr.A,this.cstPostRule=jr.A}setInitialNodeLocationOnlyOffsetRecovery(e){e.location={startOffset:NaN,endOffset:NaN}}setInitialNodeLocationOnlyOffsetRegular(e){e.location={startOffset:this.LA(1).startOffset,endOffset:NaN}}setInitialNodeLocationFullRecovery(e){e.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}}setInitialNodeLocationFullRegular(e){const t=this.LA(1);e.location={startOffset:t.startOffset,startLine:t.startLine,startColumn:t.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}}cstInvocationStateUpdate(e){const t={name:e,children:Object.create(null)};this.setInitialNodeLocation(t),this.CST_STACK.push(t)}cstFinallyStateUpdate(){this.CST_STACK.pop()}cstPostRuleFull(e){const t=this.LA(0),n=e.location;n.startOffset<=t.startOffset==1?(n.endOffset=t.endOffset,n.endLine=t.endLine,n.endColumn=t.endColumn):(n.startOffset=NaN,n.startLine=NaN,n.startColumn=NaN)}cstPostRuleOnlyOffset(e){const t=this.LA(0),n=e.location;n.startOffset<=t.startOffset==1?n.endOffset=t.endOffset:n.startOffset=NaN}cstPostTerminal(e,t){const n=this.CST_STACK[this.CST_STACK.length-1];var r,i,s;i=t,s=e,void 0===(r=n).children[s]?r.children[s]=[i]:r.children[s].push(i),this.setNodeLocationFromToken(n.location,t)}cstPostNonTerminal(e,t){const n=this.CST_STACK[this.CST_STACK.length-1];!function(e,t,n){void 0===e.children[t]?e.children[t]=[n]:e.children[t].push(n)}(n,t,e),this.setNodeLocationFromNode(n.location,e.location)}getBaseCstVisitorConstructor(){if((0,Fn.A)(this.baseCstVisitorConstructor)){const e=Us(this.className,(0,Kt.A)(this.gastProductionsCache));return this.baseCstVisitorConstructor=e,e}return this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){if((0,Fn.A)(this.baseCstVisitorWithDefaultsConstructor)){const e=function(e,t,n){const r=function(){};Ms(r,e+"BaseSemanticsWithDefaults");const i=Object.create(n.prototype);return(0,It.A)(t,(e=>{i[e]=Ds})),(r.prototype=i).constructor=r,r}(this.className,(0,Kt.A)(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=e,e}return this.baseCstVisitorWithDefaultsConstructor}getLastExplicitRuleShortName(){const e=this.RULE_STACK;return e[e.length-1]}getPreviousExplicitRuleShortName(){const e=this.RULE_STACK;return e[e.length-2]}getLastExplicitRuleOccurrenceIndex(){const e=this.RULE_OCCURRENCE_STACK;return e[e.length-1]}},class{initLexerAdapter(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1}set input(e){if(!0!==this.selfAnalysisDone)throw Error("Missing invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=e,this.tokVectorLength=e.length}get input(){return this.tokVector}SKIP_TOKEN(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):Qs}LA(e){const t=this.currIdx+e;return t<0||this.tokVectorLength<=t?Qs:this.tokVector[t]}consumeToken(){this.currIdx++}exportLexerState(){return this.currIdx}importLexerState(e){this.currIdx=e}resetLexerState(){this.currIdx=-1}moveToTerminatedState(){this.currIdx=this.tokVector.length-1}getLexerPosition(){return this.exportLexerState()}},class{initRecognizerEngine(e,t){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=zr,this.subruleIdx=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},(0,$t.A)(t,"serializedGrammar"))throw Error("The Parser's configuration can no longer contain a property.\n\tSee: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0\n\tFor Further details.");if((0,vn.A)(e)){if((0,Nt.A)(e))throw Error("A Token Vocabulary cannot be empty.\n\tNote that the first argument for the parser constructor\n\tis no longer a Token vector (since v4.0).");if("number"==typeof e[0].startOffset)throw Error("The Parser constructor no longer accepts a token vector as the first argument.\n\tSee: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0\n\tFor Further details.")}if((0,vn.A)(e))this.tokensMap=(0,Yn.A)(e,((e,t)=>(e[t.name]=t,e)),{});else if((0,$t.A)(e,"modes")&&Cn((0,Pn.A)((0,St.A)(e.modes)),ei)){const t=(0,Pn.A)((0,St.A)(e.modes)),n=_n(t);this.tokensMap=(0,Yn.A)(n,((e,t)=>(e[t.name]=t,e)),{})}else{if(!(0,Gs.A)(e))throw new Error(" argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap=(0,wt.A)(e)}this.tokensMap.EOF=yi;const n=(0,$t.A)(e,"modes")?(0,Pn.A)((0,St.A)(e.modes)):(0,St.A)(e),r=Cn(n,(e=>(0,Nt.A)(e.categoryMatches)));this.tokenMatcher=r?zr:Wr,qr((0,St.A)(this.tokensMap))}defineRule(e,t,n){if(this.selfAnalysisDone)throw Error(`Grammar rule <${e}> may not be defined after the 'performSelfAnalysis' method has been called'\nMake sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);const r=(0,$t.A)(n,"resyncEnabled")?n.resyncEnabled:Zs.resyncEnabled,i=(0,$t.A)(n,"recoveryValueFunc")?n.recoveryValueFunc:Zs.recoveryValueFunc,s=this.ruleShortNameIdx<<12;let o;return this.ruleShortNameIdx++,this.shortRuleNameToFull[s]=e,this.fullRuleNameToShort[e]=s,o=!0===this.outputCst?function(...n){try{this.ruleInvocationStateUpdate(s,e,this.subruleIdx),t.apply(this,n);const r=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(r),r}catch(o){return this.invokeRuleCatch(o,r,i)}finally{this.ruleFinallyStateUpdate()}}:function(...n){try{return this.ruleInvocationStateUpdate(s,e,this.subruleIdx),t.apply(this,n)}catch(o){return this.invokeRuleCatch(o,r,i)}finally{this.ruleFinallyStateUpdate()}},Object.assign(o,{ruleName:e,originalGrammarAction:t})}invokeRuleCatch(e,t,n){const r=1===this.RULE_STACK.length,i=t&&!this.isBackTracking()&&this.recoveryEnabled;if(As(e)){const t=e;if(i){const r=this.findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(r)){if(t.resyncedTokens=this.reSyncTo(r),this.outputCst){const e=this.CST_STACK[this.CST_STACK.length-1];return e.recoveredNode=!0,e}return n(e)}if(this.outputCst){const e=this.CST_STACK[this.CST_STACK.length-1];e.recoveredNode=!0,t.partialCstResult=e}throw t}if(r)return this.moveToTerminatedState(),n(e);throw t}throw e}optionInternal(e,t){const n=this.getKeyForAutomaticLookahead(512,t);return this.optionInternalLogic(e,t,n)}optionInternalLogic(e,t,n){let r,i=this.getLaFuncFromCache(n);if("function"!=typeof e){r=e.DEF;const t=e.GATE;if(void 0!==t){const e=i;i=()=>t.call(this)&&e.call(this)}}else r=e;if(!0===i.call(this))return r.call(this)}atLeastOneInternal(e,t){const n=this.getKeyForAutomaticLookahead(Cs,e);return this.atLeastOneInternalLogic(e,t,n)}atLeastOneInternalLogic(e,t,n){let r,i=this.getLaFuncFromCache(n);if("function"!=typeof t){r=t.DEF;const e=t.GATE;if(void 0!==e){const t=i;i=()=>e.call(this)&&t.call(this)}}else r=t;if(!0!==i.call(this))throw this.raiseEarlyExitException(e,Bi.REPETITION_MANDATORY,t.ERR_MSG);{let e=this.doSingleRepetition(r);for(;!0===i.call(this)&&!0===e;)e=this.doSingleRepetition(r)}this.attemptInRepetitionRecovery(this.atLeastOneInternal,[e,t],i,Cs,e,Di)}atLeastOneSepFirstInternal(e,t){const n=this.getKeyForAutomaticLookahead(ws,e);this.atLeastOneSepFirstInternalLogic(e,t,n)}atLeastOneSepFirstInternalLogic(e,t,n){const r=t.DEF,i=t.SEP;if(!0!==this.getLaFuncFromCache(n).call(this))throw this.raiseEarlyExitException(e,Bi.REPETITION_MANDATORY_WITH_SEPARATOR,t.ERR_MSG);{r.call(this);const t=()=>this.tokenMatcher(this.LA(1),i);for(;!0===this.tokenMatcher(this.LA(1),i);)this.CONSUME(i),r.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,i,t,r,Ui],t,ws,e,Ui)}}manyInternal(e,t){const n=this.getKeyForAutomaticLookahead(768,e);return this.manyInternalLogic(e,t,n)}manyInternalLogic(e,t,n){let r,i=this.getLaFuncFromCache(n);if("function"!=typeof t){r=t.DEF;const e=t.GATE;if(void 0!==e){const t=i;i=()=>e.call(this)&&t.call(this)}}else r=t;let s=!0;for(;!0===i.call(this)&&!0===s;)s=this.doSingleRepetition(r);this.attemptInRepetitionRecovery(this.manyInternal,[e,t],i,768,e,Pi,s)}manySepFirstInternal(e,t){const n=this.getKeyForAutomaticLookahead($s,e);this.manySepFirstInternalLogic(e,t,n)}manySepFirstInternalLogic(e,t,n){const r=t.DEF,i=t.SEP;if(!0===this.getLaFuncFromCache(n).call(this)){r.call(this);const t=()=>this.tokenMatcher(this.LA(1),i);for(;!0===this.tokenMatcher(this.LA(1),i);)this.CONSUME(i),r.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,i,t,r,Mi],t,$s,e,Mi)}}repetitionSepSecondInternal(e,t,n,r,i){for(;n();)this.CONSUME(t),r.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,t,n,r,i],n,ws,e,i)}doSingleRepetition(e){const t=this.getLexerPosition();return e.call(this),this.getLexerPosition()>t}orInternal(e,t){const n=this.getKeyForAutomaticLookahead(256,t),r=(0,vn.A)(e)?e:e.DEF,i=this.getLaFuncFromCache(n).call(this,r);if(void 0!==i)return r[i].ALT.call(this);this.raiseNoAltException(t,e.ERR_MSG)}ruleFinallyStateUpdate(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),0===this.RULE_STACK.length&&!1===this.isAtEndOfInput()){const e=this.LA(1),t=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:e,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new Es(t,e))}}subruleInternal(e,t,n){let r;try{const i=void 0!==n?n.ARGS:void 0;return this.subruleIdx=t,r=e.apply(this,i),this.cstPostNonTerminal(r,void 0!==n&&void 0!==n.LABEL?n.LABEL:e.ruleName),r}catch(i){throw this.subruleInternalError(i,n,e.ruleName)}}subruleInternalError(e,t,n){throw As(e)&&void 0!==e.partialCstResult&&(this.cstPostNonTerminal(e.partialCstResult,void 0!==t&&void 0!==t.LABEL?t.LABEL:n),delete e.partialCstResult),e}consumeInternal(e,t,n){let r;try{const t=this.LA(1);!0===this.tokenMatcher(t,e)?(this.consumeToken(),r=t):this.consumeInternalError(e,t,n)}catch(i){r=this.consumeInternalRecovery(e,t,i)}return this.cstPostTerminal(void 0!==n&&void 0!==n.LABEL?n.LABEL:e.name,r),r}consumeInternalError(e,t,n){let r;const i=this.LA(0);throw r=void 0!==n&&n.ERR_MSG?n.ERR_MSG:this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:t,previous:i,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new vs(r,t,i))}consumeInternalRecovery(e,t,n){if(!this.recoveryEnabled||"MismatchedTokenException"!==n.name||this.isBackTracking())throw n;{const i=this.getFollowsForInRuleRecovery(e,t);try{return this.tryInRuleRecovery(e,i)}catch(r){throw r.name===Is?n:r}}}saveRecogState(){const e=this.errors,t=(0,wt.A)(this.RULE_STACK);return{errors:e,lexerState:this.exportLexerState(),RULE_STACK:t,CST_STACK:this.CST_STACK}}reloadRecogState(e){this.errors=e.errors,this.importLexerState(e.lexerState),this.RULE_STACK=e.RULE_STACK}ruleInvocationStateUpdate(e,t,n){this.RULE_OCCURRENCE_STACK.push(n),this.RULE_STACK.push(e),this.cstInvocationStateUpdate(t)}isBackTracking(){return 0!==this.isBackTrackingStack.length}getCurrRuleFullName(){const e=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[e]}shortRuleNameToFullName(e){return this.shortRuleNameToFull[e]}isAtEndOfInput(){return this.tokenMatcher(this.LA(1),yi)}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]}},class{ACTION(e){return e.call(this)}consume(e,t,n){return this.consumeInternal(t,e,n)}subrule(e,t,n){return this.subruleInternal(t,e,n)}option(e,t){return this.optionInternal(t,e)}or(e,t){return this.orInternal(t,e)}many(e,t){return this.manyInternal(e,t)}atLeastOne(e,t){return this.atLeastOneInternal(e,t)}CONSUME(e,t){return this.consumeInternal(e,0,t)}CONSUME1(e,t){return this.consumeInternal(e,1,t)}CONSUME2(e,t){return this.consumeInternal(e,2,t)}CONSUME3(e,t){return this.consumeInternal(e,3,t)}CONSUME4(e,t){return this.consumeInternal(e,4,t)}CONSUME5(e,t){return this.consumeInternal(e,5,t)}CONSUME6(e,t){return this.consumeInternal(e,6,t)}CONSUME7(e,t){return this.consumeInternal(e,7,t)}CONSUME8(e,t){return this.consumeInternal(e,8,t)}CONSUME9(e,t){return this.consumeInternal(e,9,t)}SUBRULE(e,t){return this.subruleInternal(e,0,t)}SUBRULE1(e,t){return this.subruleInternal(e,1,t)}SUBRULE2(e,t){return this.subruleInternal(e,2,t)}SUBRULE3(e,t){return this.subruleInternal(e,3,t)}SUBRULE4(e,t){return this.subruleInternal(e,4,t)}SUBRULE5(e,t){return this.subruleInternal(e,5,t)}SUBRULE6(e,t){return this.subruleInternal(e,6,t)}SUBRULE7(e,t){return this.subruleInternal(e,7,t)}SUBRULE8(e,t){return this.subruleInternal(e,8,t)}SUBRULE9(e,t){return this.subruleInternal(e,9,t)}OPTION(e){return this.optionInternal(e,0)}OPTION1(e){return this.optionInternal(e,1)}OPTION2(e){return this.optionInternal(e,2)}OPTION3(e){return this.optionInternal(e,3)}OPTION4(e){return this.optionInternal(e,4)}OPTION5(e){return this.optionInternal(e,5)}OPTION6(e){return this.optionInternal(e,6)}OPTION7(e){return this.optionInternal(e,7)}OPTION8(e){return this.optionInternal(e,8)}OPTION9(e){return this.optionInternal(e,9)}OR(e){return this.orInternal(e,0)}OR1(e){return this.orInternal(e,1)}OR2(e){return this.orInternal(e,2)}OR3(e){return this.orInternal(e,3)}OR4(e){return this.orInternal(e,4)}OR5(e){return this.orInternal(e,5)}OR6(e){return this.orInternal(e,6)}OR7(e){return this.orInternal(e,7)}OR8(e){return this.orInternal(e,8)}OR9(e){return this.orInternal(e,9)}MANY(e){this.manyInternal(0,e)}MANY1(e){this.manyInternal(1,e)}MANY2(e){this.manyInternal(2,e)}MANY3(e){this.manyInternal(3,e)}MANY4(e){this.manyInternal(4,e)}MANY5(e){this.manyInternal(5,e)}MANY6(e){this.manyInternal(6,e)}MANY7(e){this.manyInternal(7,e)}MANY8(e){this.manyInternal(8,e)}MANY9(e){this.manyInternal(9,e)}MANY_SEP(e){this.manySepFirstInternal(0,e)}MANY_SEP1(e){this.manySepFirstInternal(1,e)}MANY_SEP2(e){this.manySepFirstInternal(2,e)}MANY_SEP3(e){this.manySepFirstInternal(3,e)}MANY_SEP4(e){this.manySepFirstInternal(4,e)}MANY_SEP5(e){this.manySepFirstInternal(5,e)}MANY_SEP6(e){this.manySepFirstInternal(6,e)}MANY_SEP7(e){this.manySepFirstInternal(7,e)}MANY_SEP8(e){this.manySepFirstInternal(8,e)}MANY_SEP9(e){this.manySepFirstInternal(9,e)}AT_LEAST_ONE(e){this.atLeastOneInternal(0,e)}AT_LEAST_ONE1(e){return this.atLeastOneInternal(1,e)}AT_LEAST_ONE2(e){this.atLeastOneInternal(2,e)}AT_LEAST_ONE3(e){this.atLeastOneInternal(3,e)}AT_LEAST_ONE4(e){this.atLeastOneInternal(4,e)}AT_LEAST_ONE5(e){this.atLeastOneInternal(5,e)}AT_LEAST_ONE6(e){this.atLeastOneInternal(6,e)}AT_LEAST_ONE7(e){this.atLeastOneInternal(7,e)}AT_LEAST_ONE8(e){this.atLeastOneInternal(8,e)}AT_LEAST_ONE9(e){this.atLeastOneInternal(9,e)}AT_LEAST_ONE_SEP(e){this.atLeastOneSepFirstInternal(0,e)}AT_LEAST_ONE_SEP1(e){this.atLeastOneSepFirstInternal(1,e)}AT_LEAST_ONE_SEP2(e){this.atLeastOneSepFirstInternal(2,e)}AT_LEAST_ONE_SEP3(e){this.atLeastOneSepFirstInternal(3,e)}AT_LEAST_ONE_SEP4(e){this.atLeastOneSepFirstInternal(4,e)}AT_LEAST_ONE_SEP5(e){this.atLeastOneSepFirstInternal(5,e)}AT_LEAST_ONE_SEP6(e){this.atLeastOneSepFirstInternal(6,e)}AT_LEAST_ONE_SEP7(e){this.atLeastOneSepFirstInternal(7,e)}AT_LEAST_ONE_SEP8(e){this.atLeastOneSepFirstInternal(8,e)}AT_LEAST_ONE_SEP9(e){this.atLeastOneSepFirstInternal(9,e)}RULE(e,t,n=Zs){if(In(this.definedRulesNames,e)){const t={message:Ei.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),type:eo.DUPLICATE_RULE_NAME,ruleName:e};this.definitionErrors.push(t)}this.definedRulesNames.push(e);const r=this.defineRule(e,t,n);return this[e]=r,r}OVERRIDE_RULE(e,t,n=Zs){const r=function(e,t,n){const r=[];let i;return In(t,e)||(i=`Invalid rule override, rule: ->${e}<- cannot be overridden in the grammar: ->${n}<-as it is not defined in any of the super grammars `,r.push({message:i,type:eo.INVALID_RULE_OVERRIDE,ruleName:e})),r}(e,this.definedRulesNames,this.className);this.definitionErrors=this.definitionErrors.concat(r);const i=this.defineRule(e,t,n);return this[e]=i,i}BACKTRACK(e,t){return function(){this.isBackTrackingStack.push(1);const n=this.saveRecogState();try{return e.apply(this,t),!0}catch(r){if(As(r))return!1;throw r}finally{this.reloadRecogState(n),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return e=(0,St.A)(this.gastProductionsCache),(0,Ct.A)(e,mn);var e}},class{initErrorHandler(e){this._errors=[],this.errorMessageProvider=(0,$t.A)(e,"errorMessageProvider")?e.errorMessageProvider:Js.errorMessageProvider}SAVE_ERROR(e){if(As(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:(0,wt.A)(this.RULE_OCCURRENCE_STACK)},this._errors.push(e),e;throw Error("Trying to save an Error which is not a RecognitionException")}get errors(){return(0,wt.A)(this._errors)}set errors(e){this._errors=e}raiseEarlyExitException(e,t,n){const r=this.getCurrRuleFullName(),i=es(e,this.getGAstProductions()[r],t,this.maxLookahead)[0],s=[];for(let a=1;a<=this.maxLookahead;a++)s.push(this.LA(a));const o=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:i,actual:s,previous:this.LA(0),customUserDescription:n,ruleName:r});throw this.SAVE_ERROR(new ks(o,this.LA(1),this.LA(0)))}raiseNoAltException(e,t){const n=this.getCurrRuleFullName(),r=Zi(e,this.getGAstProductions()[n],this.maxLookahead),i=[];for(let a=1;a<=this.maxLookahead;a++)i.push(this.LA(a));const s=this.LA(0),o=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:r,actual:i,previous:s,customUserDescription:t,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new Rs(o,this.LA(1),s))}},class{initContentAssist(){}computeContentAssist(e,t){const n=this.gastProductionsCache[e];if((0,Fn.A)(n))throw Error(`Rule ->${e}<- does not exist in this grammar.`);return Gi([n],t,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(e){const t=or(e.ruleStack),n=this.getGAstProductions()[t];return new bi(n,e).startWalking()}},class{initGastRecorder(e){this.recordingProdStack=[],this.RECORDING_PHASE=!1}enableRecording(){this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",(()=>{for(let e=0;e<10;e++){const t=e>0?e:"";this[`CONSUME${t}`]=function(t,n){return this.consumeInternalRecord(t,e,n)},this[`SUBRULE${t}`]=function(t,n){return this.subruleInternalRecord(t,e,n)},this[`OPTION${t}`]=function(t){return this.optionInternalRecord(t,e)},this[`OR${t}`]=function(t){return this.orInternalRecord(t,e)},this[`MANY${t}`]=function(t){this.manyInternalRecord(e,t)},this[`MANY_SEP${t}`]=function(t){this.manySepFirstInternalRecord(e,t)},this[`AT_LEAST_ONE${t}`]=function(t){this.atLeastOneInternalRecord(e,t)},this[`AT_LEAST_ONE_SEP${t}`]=function(t){this.atLeastOneSepFirstInternalRecord(e,t)}}this.consume=function(e,t,n){return this.consumeInternalRecord(t,e,n)},this.subrule=function(e,t,n){return this.subruleInternalRecord(t,e,n)},this.option=function(e,t){return this.optionInternalRecord(t,e)},this.or=function(e,t){return this.orInternalRecord(t,e)},this.many=function(e,t){this.manyInternalRecord(e,t)},this.atLeastOne=function(e,t){this.atLeastOneInternalRecord(e,t)},this.ACTION=this.ACTION_RECORD,this.BACKTRACK=this.BACKTRACK_RECORD,this.LA=this.LA_RECORD}))}disableRecording(){this.RECORDING_PHASE=!1,this.TRACE_INIT("Deleting Recording methods",(()=>{const e=this;for(let t=0;t<10;t++){const n=t>0?t:"";delete e[`CONSUME${n}`],delete e[`SUBRULE${n}`],delete e[`OPTION${n}`],delete e[`OR${n}`],delete e[`MANY${n}`],delete e[`MANY_SEP${n}`],delete e[`AT_LEAST_ONE${n}`],delete e[`AT_LEAST_ONE_SEP${n}`]}delete e.consume,delete e.subrule,delete e.option,delete e.or,delete e.many,delete e.atLeastOne,delete e.ACTION,delete e.BACKTRACK,delete e.LA}))}ACTION_RECORD(e){}BACKTRACK_RECORD(e,t){return()=>!0}LA_RECORD(e){return Qs}topLevelRuleRecord(e,t){try{const n=new on({definition:[],name:e});return n.name=e,this.recordingProdStack.push(n),t.call(this),this.recordingProdStack.pop(),n}catch(n){if(!0!==n.KNOWN_RECORDER_ERROR)try{n.message=n.message+'\n\t This error was thrown during the "grammar recording phase" For more info see:\n\thttps://chevrotain.io/docs/guide/internals.html#grammar-recording'}catch(r){throw n}throw n}}optionInternalRecord(e,t){return zs.call(this,cn,e,t)}atLeastOneInternalRecord(e,t){zs.call(this,ln,t,e)}atLeastOneSepFirstInternalRecord(e,t){zs.call(this,un,t,e,Bs)}manyInternalRecord(e,t){zs.call(this,dn,t,e)}manySepFirstInternalRecord(e,t){zs.call(this,hn,t,e,Bs)}orInternalRecord(e,t){return Ys.call(this,e,t)}subruleInternalRecord(e,t,n){if(qs(t),!e||!1===(0,$t.A)(e,"ruleName")){const n=new Error(` argument is invalid expecting a Parser method reference but got: <${JSON.stringify(e)}>\n inside top level rule: <${this.recordingProdStack[0].name}>`);throw n.KNOWN_RECORDER_ERROR=!0,n}const r=(0,Vr.A)(this.recordingProdStack),i=e.ruleName,s=new sn({idx:t,nonTerminalName:i,label:null==n?void 0:n.LABEL,referencedRule:void 0});return r.definition.push(s),this.outputCst?Ws:Ks}consumeInternalRecord(e,t,n){if(qs(t),!Jr(e)){const n=new Error(` argument is invalid expecting a TokenType reference but got: <${JSON.stringify(e)}>\n inside top level rule: <${this.recordingProdStack[0].name}>`);throw n.KNOWN_RECORDER_ERROR=!0,n}const r=(0,Vr.A)(this.recordingProdStack),i=new pn({idx:t,terminalType:e,label:null==n?void 0:n.LABEL});return r.definition.push(i),Hs}},class{initPerformanceTracer(e){if((0,$t.A)(e,"traceInitPerf")){const t=e.traceInitPerf,n="number"==typeof t;this.traceInitMaxIdent=n?t:1/0,this.traceInitPerf=n?t>0:t}else this.traceInitMaxIdent=0,this.traceInitPerf=Js.traceInitPerf;this.traceInitIndent=-1}TRACE_INIT(e,t){if(!0===this.traceInitPerf){this.traceInitIndent++;const n=new Array(this.traceInitIndent+1).join("\t");this.traceInitIndent`);const{time:r,value:i}=Hr(t),s=r>10?console.warn:console.log;return this.traceInitIndent time: ${r}ms`),this.traceInitIndent--,i}return t()}}],no.forEach((e=>{const t=e.prototype;Object.getOwnPropertyNames(t).forEach((n=>{if("constructor"===n)return;const r=Object.getOwnPropertyDescriptor(t,n);r&&(r.get||r.set)?Object.defineProperty(to.prototype,n,r):to.prototype[n]=e.prototype[n]}))}));class so extends io{constructor(e,t=Js){const n=(0,wt.A)(t);n.outputCst=!1,super(e,n)}}function oo(e,t,n){return`${e.name}_${t}_${n}`}class ao{constructor(e){this.target=e}isEpsilon(){return!1}}class co extends ao{constructor(e,t){super(e),this.tokenType=t}}class lo extends ao{constructor(e){super(e)}isEpsilon(){return!0}}class uo extends ao{constructor(e,t,n){super(e),this.rule=t,this.followState=n}isEpsilon(){return!0}}function ho(e){const t={decisionMap:{},decisionStates:[],ruleToStartState:new Map,ruleToStopState:new Map,states:[]};!function(e,t){const n=t.length;for(let r=0;rfo(e,t,n))),s=Ao(e,t,r,n,...i);return s}(e,t,n):n instanceof cn?function(e,t,n){const r=Eo(e,t,n,{type:1});yo(e,r);const i=Ao(e,t,r,n,po(e,t,n));return function(e,t,n,r){const i=r.left,s=r.right;return Ro(i,s),e.decisionMap[oo(t,"Option",n.idx)]=i,r}(e,t,n,i)}(e,t,n):n instanceof dn?function(e,t,n){const r=Eo(e,t,n,{type:5});yo(e,r);const i=Ao(e,t,r,n,po(e,t,n));return go(e,t,n,i)}(e,t,n):n instanceof hn?function(e,t,n){const r=Eo(e,t,n,{type:5});yo(e,r);const i=Ao(e,t,r,n,po(e,t,n)),s=To(e,t,n.separator,n);return go(e,t,n,i,s)}(e,t,n):n instanceof ln?function(e,t,n){const r=Eo(e,t,n,{type:4});yo(e,r);const i=Ao(e,t,r,n,po(e,t,n));return mo(e,t,n,i)}(e,t,n):n instanceof un?function(e,t,n){const r=Eo(e,t,n,{type:4});yo(e,r);const i=Ao(e,t,r,n,po(e,t,n)),s=To(e,t,n.separator,n);return mo(e,t,n,i,s)}(e,t,n):po(e,t,n)}function po(e,t,n){const r=(0,Xn.A)((0,Ct.A)(n.definition,(n=>fo(e,t,n))),(e=>void 0!==e));return 1===r.length?r[0]:0===r.length?void 0:function(e,t){const n=t.length;for(let s=0;se.alt))}get key(){let e="";for(const t in this.map)e+=t+":";return e}}function No(e,t=!0){return`${t?`a${e.alt}`:""}s${e.state.stateNumber}:${e.stack.map((e=>e.stateNumber.toString())).join("_")}`}var Co=n(86452);const $o=function(e,t){return e&&e.length?(0,bn.A)(e,(0,Ht.A)(t,2)):[]};function wo(e,t){const n={};return r=>{const i=r.toString();let s=n[i];return void 0!==s||(s={atnStartState:e,decision:t,states:{}},n[i]=s),s}}class Lo{constructor(){this.predicates=[]}is(e){return e>=this.predicates.length||this.predicates[e]}set(e,t){this.predicates[e]=t}toString(){let e="";const t=this.predicates.length;for(let n=0;nconsole.log(e)}initialize(e){this.atn=ho(e.rules),this.dfas=function(e){const t=e.decisionStates.length,n=Array(t);for(let r=0;r(0,Ct.A)(e,(e=>e[0]))));if(_o(l,!1)&&!i){const e=(0,Yn.A)(l,((e,t,n)=>((0,It.A)(t,(t=>{t&&(e[t.tokenTypeIdx]=n,(0,It.A)(t.categoryMatches,(t=>{e[t]=n})))})),e)),{});return r?function(t){var n;const r=this.LA(1),i=e[r.tokenTypeIdx];if(void 0!==t&&void 0!==i){const e=null===(n=t[i])||void 0===n?void 0:n.GATE;if(void 0!==e&&!1===e.call(this))return}return i}:function(){const t=this.LA(1);return e[t.tokenTypeIdx]}}return r?function(e){const t=new Lo,n=void 0===e?0:e.length;for(let i=0;i(0,Ct.A)(e,(e=>e[0]))));if(_o(l)&&l[0][0]&&!i){const e=l[0],t=(0,Pn.A)(e);if(1===t.length&&(0,Nt.A)(t[0].categoryMatches)){const e=t[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===e}}{const e=(0,Yn.A)(t,((e,t)=>(void 0!==t&&(e[t.tokenTypeIdx]=!0,(0,It.A)(t.categoryMatches,(t=>{e[t]=!0}))),e)),{});return function(){const t=this.LA(1);return!0===e[t.tokenTypeIdx]}}}return function(){const e=Po.call(this,s,c,Oo,o);return"object"!=typeof e&&0===e}}}function _o(e,t=!0){const n=new Set;for(const r of e){const e=new Set;for(const i of r){if(void 0===i){if(t)break;return!1}const r=[i.tokenTypeIdx].concat(i.categoryMatches);for(const t of r)if(n.has(t)){if(!e.has(t))return!1}else n.add(t),e.add(t)}}return!0}function Po(e,t,n,r){const i=e[t](n);let s=i.start;if(void 0===s){s=jo(i,Ko(Vo(i.atnStartState))),i.start=s}return Mo.apply(this,[i,s,n,r])}function Mo(e,t,n,r){let i=t,s=1;const o=[];let a=this.LA(s++);for(;;){let t=(c=a,i.edges[c.tokenTypeIdx]);if(void 0===t&&(t=Do.apply(this,[e,i,a,s,n,r])),t===Io)return Fo(o,i,a);if(!0===t.isAcceptState)return t.prediction;i=t,o.push(a),a=this.LA(s++)}var c}function Do(e,t,n,r,i,s){const o=function(e,t,n){const r=new So,i=[];for(const o of e.elements){if(!1===n.is(o.alt))continue;if(7===o.state.type){i.push(o);continue}const e=o.state.transitions.length;for(let n=0;n0&&!function(e){for(const t of e.elements)if(7===t.state.type)return!0;return!1}(s))for(const o of i)s.add(o);return s}(t.configs,n,i);if(0===o.size)return Bo(e,t,n,Io),Io;let a=Ko(o);const c=function(e,t){let n;for(const r of e.elements)if(!0===t.is(r.alt))if(void 0===n)n=r.alt;else if(n!==r.alt)return;return n}(o,i);if(void 0!==c)a.isAcceptState=!0,a.prediction=c,a.configs.uniqueAlt=c;else if(function(e){if(function(e){for(const t of e.elements)if(7!==t.state.type)return!1;return!0}(e))return!0;const t=function(e){const t=new Map;for(const n of e){const e=No(n,!1);let r=t.get(e);void 0===r&&(r={},t.set(e,r)),r[n.alt]=!0}return t}(e.elements);return function(e){for(const t of Array.from(e.values()))if(Object.keys(t).length>1)return!0;return!1}(t)&&!function(e){for(const t of Array.from(e.values()))if(1===Object.keys(t).length)return!0;return!1}(t)}(o)){const t=(0,Co.A)(o.alts);a.isAcceptState=!0,a.prediction=t,a.configs.uniqueAlt=t,Uo.apply(this,[e,r,o.alts,s])}return a=Bo(e,t,n,a),a}function Uo(e,t,n,r){const i=[];for(let o=1;o<=t;o++)i.push(this.LA(o).tokenType);const s=e.atnStartState;r(function(e){const t=(0,Ct.A)(e.prefixPath,(e=>si(e))).join(", "),n=0===e.production.idx?"":e.production.idx;let r=`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(", ")}> in <${function(e){if(e instanceof sn)return"SUBRULE";if(e instanceof cn)return"OPTION";if(e instanceof fn)return"OR";if(e instanceof ln)return"AT_LEAST_ONE";if(e instanceof un)return"AT_LEAST_ONE_SEP";if(e instanceof hn)return"MANY_SEP";if(e instanceof dn)return"MANY";if(e instanceof pn)return"CONSUME";throw Error("non exhaustive match")}(e.production)}${n}> inside <${e.topLevelRule.name}> Rule,\n<${t}> may appears as a prefix path in all these alternatives.\n`;return r+="See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES\nFor Further details.",r}({topLevelRule:s.rule,ambiguityIndices:n,production:s.production,prefixPath:i}))}function Fo(e,t,n){const r=xi(t.configs.elements,(e=>e.state.transitions));return{actualToken:n,possibleTokenTypes:$o(r.filter((e=>e instanceof co)).map((e=>e.tokenType)),(e=>e.tokenTypeIdx)),tokenPath:e}}function Go(e,t){if(e instanceof co&&Ti(t,e.tokenType))return e.target}function Ko(e){return{configs:e,edges:{},isAcceptState:!1,prediction:-1}}function Bo(e,t,n,r){return r=jo(e,r),t.edges[n.tokenTypeIdx]=r,r}function jo(e,t){if(t===Io)return t;const n=t.configs.key,r=e.states[n];return void 0!==r?r:(t.configs.finalize(),e.states[n]=t,t)}function Vo(e){const t=new So,n=e.transitions.length;for(let r=0;r0){const n=[...e.stack];Ho({state:n.pop(),alt:e.alt,stack:n},t)}else t.add(e);return}n.epsilonOnlyTransitions||t.add(e);const r=n.transitions.length;for(let i=0;i0&&(r.arguments=n),r},e.is=function(e){let t=e;return Ac.defined(t)&&Ac.string(t.title)&&Ac.string(t.command)}}(da||(da={})),function(e){e.replace=function(e,t){return{range:e,newText:t}},e.insert=function(e,t){return{range:{start:e,end:e},newText:t}},e.del=function(e){return{range:e,newText:""}},e.is=function(e){const t=e;return Ac.objectLiteral(t)&&Ac.string(t.newText)&&Jo.is(t.range)}}(ha||(ha={})),function(e){e.create=function(e,t,n){const r={label:e};return void 0!==t&&(r.needsConfirmation=t),void 0!==n&&(r.description=n),r},e.is=function(e){const t=e;return Ac.objectLiteral(t)&&Ac.string(t.label)&&(Ac.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(Ac.string(t.description)||void 0===t.description)}}(fa||(fa={})),function(e){e.is=function(e){const t=e;return Ac.string(t)}}(pa||(pa={})),function(e){e.replace=function(e,t,n){return{range:e,newText:t,annotationId:n}},e.insert=function(e,t,n){return{range:{start:e,end:e},newText:t,annotationId:n}},e.del=function(e,t){return{range:e,newText:"",annotationId:t}},e.is=function(e){const t=e;return ha.is(t)&&(fa.is(t.annotationId)||pa.is(t.annotationId))}}(ma||(ma={})),function(e){e.create=function(e,t){return{textDocument:e,edits:t}},e.is=function(e){let t=e;return Ac.defined(t)&&ka.is(t.textDocument)&&Array.isArray(t.edits)}}(ga||(ga={})),function(e){e.create=function(e,t,n){let r={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(r.options=t),void 0!==n&&(r.annotationId=n),r},e.is=function(e){let t=e;return t&&"create"===t.kind&&Ac.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||Ac.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Ac.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||pa.is(t.annotationId))}}(ya||(ya={})),function(e){e.create=function(e,t,n,r){let i={kind:"rename",oldUri:e,newUri:t};return void 0===n||void 0===n.overwrite&&void 0===n.ignoreIfExists||(i.options=n),void 0!==r&&(i.annotationId=r),i},e.is=function(e){let t=e;return t&&"rename"===t.kind&&Ac.string(t.oldUri)&&Ac.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||Ac.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Ac.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||pa.is(t.annotationId))}}(Aa||(Aa={})),function(e){e.create=function(e,t,n){let r={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(r.options=t),void 0!==n&&(r.annotationId=n),r},e.is=function(e){let t=e;return t&&"delete"===t.kind&&Ac.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||Ac.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||Ac.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||pa.is(t.annotationId))}}(Ta||(Ta={})),function(e){e.is=function(e){let t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every((e=>Ac.string(e.kind)?ya.is(e)||Aa.is(e)||Ta.is(e):ga.is(e))))}}(va||(va={}));!function(e){e.create=function(e){return{uri:e}},e.is=function(e){let t=e;return Ac.defined(t)&&Ac.string(t.uri)}}(Ra||(Ra={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){let t=e;return Ac.defined(t)&&Ac.string(t.uri)&&Ac.integer(t.version)}}(Ea||(Ea={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){let t=e;return Ac.defined(t)&&Ac.string(t.uri)&&(null===t.version||Ac.integer(t.version))}}(ka||(ka={})),function(e){e.create=function(e,t,n,r){return{uri:e,languageId:t,version:n,text:r}},e.is=function(e){let t=e;return Ac.defined(t)&&Ac.string(t.uri)&&Ac.string(t.languageId)&&Ac.integer(t.version)&&Ac.string(t.text)}}(xa||(xa={})),function(e){e.PlainText="plaintext",e.Markdown="markdown",e.is=function(t){const n=t;return n===e.PlainText||n===e.Markdown}}(Ia||(Ia={})),function(e){e.is=function(e){const t=e;return Ac.objectLiteral(e)&&Ia.is(t.kind)&&Ac.string(t.value)}}(Sa||(Sa={})),function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25}(Na||(Na={})),function(e){e.PlainText=1,e.Snippet=2}(Ca||(Ca={})),function(e){e.Deprecated=1}($a||($a={})),function(e){e.create=function(e,t,n){return{newText:e,insert:t,replace:n}},e.is=function(e){const t=e;return t&&Ac.string(t.newText)&&Jo.is(t.insert)&&Jo.is(t.replace)}}(wa||(wa={})),function(e){e.asIs=1,e.adjustIndentation=2}(La||(La={})),function(e){e.is=function(e){const t=e;return t&&(Ac.string(t.detail)||void 0===t.detail)&&(Ac.string(t.description)||void 0===t.description)}}(Oa||(Oa={})),function(e){e.create=function(e){return{label:e}}}(ba||(ba={})),function(e){e.create=function(e,t){return{items:e||[],isIncomplete:!!t}}}(_a||(_a={})),function(e){e.fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},e.is=function(e){const t=e;return Ac.string(t)||Ac.objectLiteral(t)&&Ac.string(t.language)&&Ac.string(t.value)}}(Pa||(Pa={})),function(e){e.is=function(e){let t=e;return!!t&&Ac.objectLiteral(t)&&(Sa.is(t.contents)||Pa.is(t.contents)||Ac.typedArray(t.contents,Pa.is))&&(void 0===e.range||Jo.is(e.range))}}(Ma||(Ma={})),function(e){e.create=function(e,t){return t?{label:e,documentation:t}:{label:e}}}(Da||(Da={})),function(e){e.create=function(e,t,...n){let r={label:e};return Ac.defined(t)&&(r.documentation=t),Ac.defined(n)?r.parameters=n:r.parameters=[],r}}(Ua||(Ua={})),function(e){e.Text=1,e.Read=2,e.Write=3}(Fa||(Fa={})),function(e){e.create=function(e,t){let n={range:e};return Ac.number(t)&&(n.kind=t),n}}(Ga||(Ga={})),function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26}(Ka||(Ka={})),function(e){e.Deprecated=1}(Ba||(Ba={})),function(e){e.create=function(e,t,n,r,i){let s={name:e,kind:t,location:{uri:r,range:n}};return i&&(s.containerName=i),s}}(ja||(ja={})),function(e){e.create=function(e,t,n,r){return void 0!==r?{name:e,kind:t,location:{uri:n,range:r}}:{name:e,kind:t,location:{uri:n}}}}(Va||(Va={})),function(e){e.create=function(e,t,n,r,i,s){let o={name:e,detail:t,kind:n,range:r,selectionRange:i};return void 0!==s&&(o.children=s),o},e.is=function(e){let t=e;return t&&Ac.string(t.name)&&Ac.number(t.kind)&&Jo.is(t.range)&&Jo.is(t.selectionRange)&&(void 0===t.detail||Ac.string(t.detail))&&(void 0===t.deprecated||Ac.boolean(t.deprecated))&&(void 0===t.children||Array.isArray(t.children))&&(void 0===t.tags||Array.isArray(t.tags))}}(Ha||(Ha={})),function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"}(Wa||(Wa={})),function(e){e.Invoked=1,e.Automatic=2}(za||(za={})),function(e){e.create=function(e,t,n){let r={diagnostics:e};return null!=t&&(r.only=t),null!=n&&(r.triggerKind=n),r},e.is=function(e){let t=e;return Ac.defined(t)&&Ac.typedArray(t.diagnostics,ua.is)&&(void 0===t.only||Ac.typedArray(t.only,Ac.string))&&(void 0===t.triggerKind||t.triggerKind===za.Invoked||t.triggerKind===za.Automatic)}}(Ya||(Ya={})),function(e){e.create=function(e,t,n){let r={title:e},i=!0;return"string"==typeof t?(i=!1,r.kind=t):da.is(t)?r.command=t:r.edit=t,i&&void 0!==n&&(r.kind=n),r},e.is=function(e){let t=e;return t&&Ac.string(t.title)&&(void 0===t.diagnostics||Ac.typedArray(t.diagnostics,ua.is))&&(void 0===t.kind||Ac.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||da.is(t.command))&&(void 0===t.isPreferred||Ac.boolean(t.isPreferred))&&(void 0===t.edit||va.is(t.edit))}}(Xa||(Xa={})),function(e){e.create=function(e,t){let n={range:e};return Ac.defined(t)&&(n.data=t),n},e.is=function(e){let t=e;return Ac.defined(t)&&Jo.is(t.range)&&(Ac.undefined(t.command)||da.is(t.command))}}(qa||(qa={})),function(e){e.create=function(e,t){return{tabSize:e,insertSpaces:t}},e.is=function(e){let t=e;return Ac.defined(t)&&Ac.uinteger(t.tabSize)&&Ac.boolean(t.insertSpaces)}}(Qa||(Qa={})),function(e){e.create=function(e,t,n){return{range:e,target:t,data:n}},e.is=function(e){let t=e;return Ac.defined(t)&&Jo.is(t.range)&&(Ac.undefined(t.target)||Ac.string(t.target))}}(Ja||(Ja={})),function(e){e.create=function(e,t){return{range:e,parent:t}},e.is=function(t){let n=t;return Ac.objectLiteral(n)&&Jo.is(n.range)&&(void 0===n.parent||e.is(n.parent))}}(Za||(Za={})),function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator"}(ec||(ec={})),function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"}(tc||(tc={})),function(e){e.is=function(e){const t=e;return Ac.objectLiteral(t)&&(void 0===t.resultId||"string"==typeof t.resultId)&&Array.isArray(t.data)&&(0===t.data.length||"number"==typeof t.data[0])}}(nc||(nc={})),function(e){e.create=function(e,t){return{range:e,text:t}},e.is=function(e){const t=e;return null!=t&&Jo.is(t.range)&&Ac.string(t.text)}}(rc||(rc={})),function(e){e.create=function(e,t,n){return{range:e,variableName:t,caseSensitiveLookup:n}},e.is=function(e){const t=e;return null!=t&&Jo.is(t.range)&&Ac.boolean(t.caseSensitiveLookup)&&(Ac.string(t.variableName)||void 0===t.variableName)}}(ic||(ic={})),function(e){e.create=function(e,t){return{range:e,expression:t}},e.is=function(e){const t=e;return null!=t&&Jo.is(t.range)&&(Ac.string(t.expression)||void 0===t.expression)}}(sc||(sc={})),function(e){e.create=function(e,t){return{frameId:e,stoppedLocation:t}},e.is=function(e){const t=e;return Ac.defined(t)&&Jo.is(e.stoppedLocation)}}(oc||(oc={})),function(e){e.Type=1,e.Parameter=2,e.is=function(e){return 1===e||2===e}}(ac||(ac={})),function(e){e.create=function(e){return{value:e}},e.is=function(e){const t=e;return Ac.objectLiteral(t)&&(void 0===t.tooltip||Ac.string(t.tooltip)||Sa.is(t.tooltip))&&(void 0===t.location||Zo.is(t.location))&&(void 0===t.command||da.is(t.command))}}(cc||(cc={})),function(e){e.create=function(e,t,n){const r={position:e,label:t};return void 0!==n&&(r.kind=n),r},e.is=function(e){const t=e;return Ac.objectLiteral(t)&&Qo.is(t.position)&&(Ac.string(t.label)||Ac.typedArray(t.label,cc.is))&&(void 0===t.kind||ac.is(t.kind))&&void 0===t.textEdits||Ac.typedArray(t.textEdits,ha.is)&&(void 0===t.tooltip||Ac.string(t.tooltip)||Sa.is(t.tooltip))&&(void 0===t.paddingLeft||Ac.boolean(t.paddingLeft))&&(void 0===t.paddingRight||Ac.boolean(t.paddingRight))}}(lc||(lc={})),function(e){e.createSnippet=function(e){return{kind:"snippet",value:e}}}(uc||(uc={})),function(e){e.create=function(e,t,n,r){return{insertText:e,filterText:t,range:n,command:r}}}(dc||(dc={})),function(e){e.create=function(e){return{items:e}}}(hc||(hc={})),function(e){e.Invoked=0,e.Automatic=1}(fc||(fc={})),function(e){e.create=function(e,t){return{range:e,text:t}}}(pc||(pc={})),function(e){e.create=function(e,t){return{triggerKind:e,selectedCompletionInfo:t}}}(mc||(mc={})),function(e){e.is=function(e){const t=e;return Ac.objectLiteral(t)&&Yo.is(t.uri)&&Ac.string(t.name)}}(gc||(gc={}));var yc,Ac;!function(e){function t(e,n){if(e.length<=1)return e;const r=e.length/2|0,i=e.slice(0,r),s=e.slice(r);t(i,n),t(s,n);let o=0,a=0,c=0;for(;o{let n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n})),s=r.length;for(let t=i.length-1;t>=0;t--){let n=i[t],o=e.offsetAt(n.range.start),a=e.offsetAt(n.range.end);if(!(a<=s))throw new Error("Overlapping edit");r=r.substring(0,o)+n.newText+r.substring(a,r.length),s=o}return r}}(yc||(yc={}));class Tc{constructor(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content}update(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0}getLineOffsets(){if(void 0===this._lineOffsets){let e=[],t=this._content,n=!0;for(let r=0;r0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),n=0,r=t.length;if(0===r)return Qo.create(0,e);for(;ne?r=i:n=i+1}let i=n-1;return Qo.create(i,e-t[i])}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let n=t[e.line],r=e.line+1=0&&t.content.splice(n,1)}}construct(e){const t=this.current;"string"==typeof e.$type&&(this.current.astNode=e),e.$cstNode=t;const n=this.nodeStack.pop();0===(null==n?void 0:n.content.length)&&this.removeNode(n)}addHiddenTokens(e){for(const t of e){const e=new Ec(t.startOffset,t.image.length,v(t),t.tokenType,!0);e.root=this.rootNode,this.addHiddenToken(this.rootNode,e)}}addHiddenToken(e,t){const{offset:n,end:r}=t;for(let i=0;io&&r=0;e--){const t=this.content[e];if(!t.hidden)return t}return this.content[this.content.length-1]}}class xc extends Array{constructor(e){super(),this.parent=e,Object.setPrototypeOf(this,xc.prototype)}push(...e){return this.addParents(e),super.push(...e)}unshift(...e){return this.addParents(e),super.unshift(...e)}splice(e,t,...n){return this.addParents(n),super.splice(e,t,...n)}addParents(e){for(const t of e)t.container=this.parent}}class Ic extends kc{get text(){return this._text.substring(this.offset,this.end)}get fullText(){return this._text}constructor(e){super(),this._text="",this._text=null!=e?e:""}}const Sc=Symbol("Datatype");function Nc(e){return e.$type===Sc}const Cc=e=>e.endsWith("\u200b")?e:e+"\u200b";class $c{constructor(e){this._unorderedGroups=new Map,this.lexer=e.parser.Lexer;const t=this.lexer.definition;this.wrapper=new Pc(t,Object.assign(Object.assign({},e.parser.ParserConfig),{errorMessageProvider:e.parser.ParserErrorMessageProvider}))}alternatives(e,t){this.wrapper.wrapOr(e,t)}optional(e,t){this.wrapper.wrapOption(e,t)}many(e,t){this.wrapper.wrapMany(e,t)}atLeastOne(e,t){this.wrapper.wrapAtLeastOne(e,t)}isRecording(){return this.wrapper.IS_RECORDING}get unorderedGroups(){return this._unorderedGroups}getRuleStack(){return this.wrapper.RULE_STACK}finalize(){this.wrapper.wrapSelfAnalysis()}}class wc extends $c{get current(){return this.stack[this.stack.length-1]}constructor(e){super(e),this.nodeBuilder=new vc,this.stack=[],this.assignmentMap=new Map,this.linker=e.references.Linker,this.converter=e.parser.ValueConverter,this.astReflection=e.shared.AstReflection}rule(e,t){const n=e.fragment?void 0:gt(e)?Sc:Tt(e),r=this.wrapper.DEFINE_RULE(Cc(e.name),this.startImplementation(n,t).bind(this));return e.entry&&(this.mainRule=r),r}parse(e){this.nodeBuilder.buildRootNode(e);const t=this.lexer.tokenize(e);this.wrapper.input=t.tokens;const n=this.mainRule.call(this.wrapper,{});return this.nodeBuilder.addHiddenTokens(t.hidden),this.unorderedGroups.clear(),{value:n,lexerErrors:t.errors,parserErrors:this.wrapper.errors}}startImplementation(e,t){return n=>{if(!this.isRecording()){const t={$type:e};this.stack.push(t),e===Sc&&(t.value="")}let r;try{r=t(n)}catch(i){r=void 0}return this.isRecording()||void 0!==r||(r=this.construct()),r}}consume(e,t,n){const r=this.wrapper.wrapConsume(e,t);if(!this.isRecording()&&this.isValidToken(r)){const e=this.nodeBuilder.buildLeafNode(r,n),{assignment:t,isCrossRef:i}=this.getAssignment(n),s=this.current;if(t){const s=Ae(n)?r.image:this.converter.convert(r.image,e);this.assign(t.operator,t.feature,s,e,i)}else if(Nc(s)){let t=r.image;Ae(n)||(t=this.converter.convert(t,e).toString()),s.value+=t}}}isValidToken(e){return!e.isInsertedInRecovery&&!isNaN(e.startOffset)&&"number"==typeof e.endOffset&&!isNaN(e.endOffset)}subrule(e,t,n,r){let i;this.isRecording()||(i=this.nodeBuilder.buildCompositeNode(n));const s=this.wrapper.wrapSubrule(e,t,r);!this.isRecording()&&i&&i.length>0&&this.performSubruleAssignment(s,n,i)}performSubruleAssignment(e,t,n){const{assignment:r,isCrossRef:i}=this.getAssignment(t);if(r)this.assign(r.operator,r.feature,e,n,i);else if(!r){const t=this.current;if(Nc(t))t.value+=e.toString();else if("object"==typeof e&&e){const n=e.$type,r=this.assignWithoutOverride(e,t);n&&(r.$type=n);const i=r;this.stack.pop(),this.stack.push(i)}}}action(e,t){if(!this.isRecording()){let n=this.current;if(!n.$cstNode&&t.feature&&t.operator){n=this.construct(!1);const e=n.$cstNode.feature;this.nodeBuilder.buildCompositeNode(e)}const r={$type:e};this.stack.pop(),this.stack.push(r),t.feature&&t.operator&&this.assign(t.operator,t.feature,n,n.$cstNode,!1)}}construct(e=!0){if(this.isRecording())return;const t=this.current;return be(t),this.nodeBuilder.construct(t),e&&this.stack.pop(),Nc(t)?this.converter.convert(t.value,t.$cstNode):(function(e,t){const n=e.getTypeMetaData(t.$type),r=t;for(const i of n.properties)void 0!==i.defaultValue&&void 0===r[i.name]&&(r[i.name]=Ke(i.defaultValue))}(this.astReflection,t),t)}getAssignment(e){if(!this.assignmentMap.has(e)){const t=_e(e,ue);this.assignmentMap.set(e,{assignment:t,isCrossRef:!!t&&fe(t.terminal)})}return this.assignmentMap.get(e)}assign(e,t,n,r,i){const s=this.current;let o;switch(o=i&&"string"==typeof n?this.linker.buildReference(s,t,r,n):n,e){case"=":s[t]=o;break;case"?=":s[t]=!0;break;case"+=":Array.isArray(s[t])||(s[t]=[]),s[t].push(o)}}assignWithoutOverride(e,t){for(const[n,r]of Object.entries(t)){const t=e[n];void 0===t?e[n]=r:Array.isArray(t)&&Array.isArray(r)&&(r.push(...t),e[n]=r)}return e}get definitionErrors(){return this.wrapper.definitionErrors}}class Lc{buildMismatchTokenMessage(e){return vi.buildMismatchTokenMessage(e)}buildNotAllInputParsedMessage(e){return vi.buildNotAllInputParsedMessage(e)}buildNoViableAltMessage(e){return vi.buildNoViableAltMessage(e)}buildEarlyExitMessage(e){return vi.buildEarlyExitMessage(e)}}class Oc extends Lc{buildMismatchTokenMessage({expected:e,actual:t}){return`Expecting ${e.LABEL?"`"+e.LABEL+"`":e.name.endsWith(":KW")?`keyword '${e.name.substring(0,e.name.length-3)}'`:`token of type '${e.name}'`} but found \`${t.image}\`.`}buildNotAllInputParsedMessage({firstRedundant:e}){return`Expecting end of file but found \`${e.image}\`.`}}class bc extends $c{constructor(){super(...arguments),this.tokens=[],this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}action(){}construct(){}parse(e){this.resetState();const t=this.lexer.tokenize(e);return this.tokens=t.tokens,this.wrapper.input=[...this.tokens],this.mainRule.call(this.wrapper,{}),this.unorderedGroups.clear(),{tokens:this.tokens,elementStack:[...this.lastElementStack],tokenIndex:this.nextTokenIndex}}rule(e,t){const n=this.wrapper.DEFINE_RULE(Cc(e.name),this.startImplementation(t).bind(this));return e.entry&&(this.mainRule=n),n}resetState(){this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}startImplementation(e){return t=>{const n=this.keepStackSize();try{e(t)}finally{this.resetStackSize(n)}}}removeUnexpectedElements(){this.elementStack.splice(this.stackSize)}keepStackSize(){const e=this.elementStack.length;return this.stackSize=e,e}resetStackSize(e){this.removeUnexpectedElements(),this.stackSize=e}consume(e,t,n){this.wrapper.wrapConsume(e,t),this.isRecording()||(this.lastElementStack=[...this.elementStack,n],this.nextTokenIndex=this.currIdx+1)}subrule(e,t,n,r){this.before(n),this.wrapper.wrapSubrule(e,t,r),this.after(n)}before(e){this.isRecording()||this.elementStack.push(e)}after(e){if(!this.isRecording()){const t=this.elementStack.lastIndexOf(e);t>=0&&this.elementStack.splice(t)}}get currIdx(){return this.wrapper.currIdx}}const _c={recoveryEnabled:!0,nodeLocationTracking:"full",skipValidations:!0,errorMessageProvider:new Oc};class Pc extends so{constructor(e,t){const n=t&&"maxLookahead"in t;super(e,Object.assign(Object.assign(Object.assign({},_c),{lookaheadStrategy:n?new Os({maxLookahead:t.maxLookahead}):new bo}),t))}get IS_RECORDING(){return this.RECORDING_PHASE}DEFINE_RULE(e,t){return this.RULE(e,t)}wrapSelfAnalysis(){this.performSelfAnalysis()}wrapConsume(e,t){return this.consume(e,t)}wrapSubrule(e,t,n){return this.subrule(e,t,{ARGS:[n]})}wrapOr(e,t){this.or(e,t)}wrapOption(e,t){this.option(e,t)}wrapMany(e,t){this.many(e,t)}wrapAtLeastOne(e,t){this.atLeastOne(e,t)}}function Mc(e,t,n){return function(e,t){const n=lt(t,!1),r=m(t.rules).filter(X).filter((e=>n.has(e)));for(const i of r){const t=Object.assign(Object.assign({},e),{consume:1,optional:1,subrule:1,many:1,or:1});t.rules.set(i.name,e.parser.rule(i,Dc(t,i.definition)))}}({parser:t,tokens:n,rules:new Map,ruleNames:new Map},e),t}function Dc(e,t,n=!1){let r;if(Ae(t))r=function(e,t){const n=e.consume++,r=e.tokens[t.value];if(!r)throw new Error("Could not find token for keyword: "+t.value);return()=>e.parser.consume(n,r,t)}(e,t);else if(oe(t))r=function(e,t){const n=Tt(t);return()=>e.parser.action(n,t)}(e,t);else if(ue(t))r=Dc(e,t.terminal);else if(fe(t))r=Gc(e,t);else if(Ee(t))r=function(e,t){const n=t.rule.ref;if(X(n)){const r=e.subrule++,i=t.arguments.length>0?function(e,t){const n=t.map((e=>Uc(e.value)));return t=>{const r={};for(let i=0;i({});return s=>e.parser.subrule(r,Bc(e,n),t,i(s))}if(te(n)){const r=e.consume++,i=jc(e,n.name);return()=>e.parser.consume(r,i,t)}if(!n)throw new S(t.$cstNode,`Undefined rule type: ${t.$type}`);N()}(e,t);else if(ce(t))r=function(e,t){if(1===t.elements.length)return Dc(e,t.elements[0]);{const n=[];for(const i of t.elements){const t={ALT:Dc(e,i,!0)},r=Fc(i);r&&(t.GATE=Uc(r)),n.push(t)}const r=e.or++;return t=>e.parser.alternatives(r,n.map((e=>{const n={ALT:()=>e.ALT(t)},r=e.GATE;return r&&(n.GATE=()=>r(t)),n})))}}(e,t);else if(Ce(t))r=function(e,t){if(1===t.elements.length)return Dc(e,t.elements[0]);const n=[];for(const a of t.elements){const t={ALT:Dc(e,a,!0)},r=Fc(a);r&&(t.GATE=Uc(r)),n.push(t)}const r=e.or++,i=(e,t)=>`uGroup_${e}_${t.getRuleStack().join("-")}`,s=t=>e.parser.alternatives(r,n.map(((n,s)=>{const o={ALT:()=>!0},a=e.parser;o.ALT=()=>{if(n.ALT(t),!a.isRecording()){const e=i(r,a);a.unorderedGroups.get(e)||a.unorderedGroups.set(e,[]);const t=a.unorderedGroups.get(e);void 0===(null==t?void 0:t[s])&&(t[s]=!0)}};const c=n.GATE;return o.GATE=c?()=>c(t):()=>{const e=a.unorderedGroups.get(i(r,a));return!(null==e?void 0:e[s])},o}))),o=Kc(e,Fc(t),s,"*");return t=>{o(t),e.parser.isRecording()||e.parser.unorderedGroups.delete(i(r,e.parser))}}(e,t);else if(ge(t))r=function(e,t){const n=t.elements.map((t=>Dc(e,t)));return e=>n.forEach((t=>t(e)))}(e,t);else{if(i=t,!Oe.isInstance(i,pe))throw new S(t.$cstNode,`Unexpected element type: ${t.$type}`);{const n=e.consume++;r=()=>e.parser.consume(n,yi,t)}}var i;return Kc(e,n?void 0:Fc(t),r,t.cardinality)}function Uc(e){if(t=e,Oe.isInstance(t,U)){const t=Uc(e.left),n=Uc(e.right);return e=>t(e)||n(e)}if(function(e){return Oe.isInstance(e,D)}(e)){const t=Uc(e.left),n=Uc(e.right);return e=>t(e)&&n(e)}if(function(e){return Oe.isInstance(e,V)}(e)){const t=Uc(e.value);return e=>!t(e)}if(function(e){return Oe.isInstance(e,z)}(e)){const t=e.parameter.ref.name;return e=>void 0!==e&&!0===e[t]}if(function(e){return Oe.isInstance(e,M)}(e)){const t=Boolean(e.true);return()=>t}var t;N()}function Fc(e){if(ge(e))return e.guardCondition}function Gc(e,t,n=t.terminal){if(n){if(Ee(n)&&X(n.rule.ref)){const r=e.subrule++;return i=>e.parser.subrule(r,Bc(e,n.rule.ref),t,i)}if(Ee(n)&&te(n.rule.ref)){const r=e.consume++,i=jc(e,n.rule.ref.name);return()=>e.parser.consume(r,i,t)}if(Ae(n)){const r=e.consume++,i=jc(e,n.value);return()=>e.parser.consume(r,i,t)}throw new Error("Could not build cross reference parser")}{if(!t.type.ref)throw new Error("Could not resolve reference to type: "+t.type.$refText);const n=pt(t.type.ref),r=null==n?void 0:n.terminal;if(!r)throw new Error("Could not find name assignment for type: "+Tt(t.type.ref));return Gc(e,t,r)}}function Kc(e,t,n,r){const i=t&&Uc(t);if(!r){if(i){const t=e.or++;return r=>e.parser.alternatives(t,[{ALT:()=>n(r),GATE:()=>i(r)},{ALT:ro(),GATE:()=>!i(r)}])}return n}if("*"===r){const t=e.many++;return r=>e.parser.many(t,{DEF:()=>n(r),GATE:i?()=>i(r):void 0})}if("+"===r){const t=e.many++;if(i){const r=e.or++;return s=>e.parser.alternatives(r,[{ALT:()=>e.parser.atLeastOne(t,{DEF:()=>n(s)}),GATE:()=>i(s)},{ALT:ro(),GATE:()=>!i(s)}])}return r=>e.parser.atLeastOne(t,{DEF:()=>n(r)})}if("?"===r){const t=e.optional++;return r=>e.parser.optional(t,{DEF:()=>n(r),GATE:i?()=>i(r):void 0})}N()}function Bc(e,t){const n=function(e,t){if(X(t))return t.name;if(e.ruleNames.has(t))return e.ruleNames.get(t);{let n=t,r=n.$container,i=t.$type;for(;!X(r);){if(ge(r)||ce(r)||Ce(r)){i=r.elements.indexOf(n).toString()+":"+i}n=r,r=r.$container}return i=r.name+":"+i,e.ruleNames.set(t,i),i}}(e,t),r=e.rules.get(n);if(!r)throw new Error(`Rule "${n}" not found."`);return r}function jc(e,t){const n=e.tokens[t];if(!n)throw new Error(`Token "${t}" not found."`);return n}function Vc(e){const t=function(e){const t=e.Grammar,n=e.parser.Lexer,r=new wc(e);return Mc(t,r,n.definition)}(e);return t.finalize(),t}class Hc{buildTokens(e,t){const n=m(lt(e,!1)),r=this.buildTerminalTokens(n),i=this.buildKeywordTokens(n,r,t);return r.forEach((e=>{const t=e.PATTERN;"object"==typeof t&&t&&"test"in t&&ot(t)?i.unshift(e):i.push(e)})),i}buildTerminalTokens(e){return e.filter(te).filter((e=>!e.fragment)).map((e=>this.buildTerminalToken(e))).toArray()}buildTerminalToken(e){const t=vt(e),n=this.requiresCustomPattern(t)?this.regexPatternFunction(t):t,r={name:e.name,PATTERN:n,LINE_BREAKS:!0};return e.hidden&&(r.GROUP=ot(t)?ii.SKIPPED:"hidden"),r}requiresCustomPattern(e){return!!e.flags.includes("u")||!(!e.source.includes("?<=")&&!e.source.includes("?{t.lastIndex=n;return t.exec(e)}}buildKeywordTokens(e,t,n){return e.filter(X).flatMap((e=>De(e).filter(Ae))).distinct((e=>e.value)).toArray().sort(((e,t)=>t.value.length-e.value.length)).map((e=>this.buildKeywordToken(e,t,Boolean(null==n?void 0:n.caseInsensitive))))}buildKeywordToken(e,t,n){return{name:e.value,PATTERN:this.buildKeywordPattern(e,n),LONGER_ALT:this.findLongerAlt(e,t)}}buildKeywordPattern(e,t){return t?new RegExp(function(e){return Array.prototype.map.call(e,(e=>/\w/.test(e)?`[${e.toLowerCase()}${e.toUpperCase()}]`:at(e))).join("")}(e.value)):e.value}findLongerAlt(e,t){return t.reduce(((t,n)=>{const r=null==n?void 0:n.PATTERN;return(null==r?void 0:r.source)&&ct("^"+r.source+"$",e.value)&&t.push(n),t}),[])}}class Wc{convert(e,t){let n=t.grammarSource;if(fe(n)&&(n=function(e){if(e.terminal)return e.terminal;if(e.type.ref){const t=pt(e.type.ref);return null==t?void 0:t.terminal}}(n)),Ee(n)){const r=n.rule.ref;if(!r)throw new Error("This cst node was not parsed by a rule.");return this.runConverter(r,e,t)}return e}runConverter(e,t,n){var r;switch(e.name.toUpperCase()){case"INT":return zc.convertInt(t);case"STRING":return zc.convertString(t);case"ID":return zc.convertID(t)}switch(null===(r=function(e){var t,n,r;return te(e)?null!==(n=null===(t=e.type)||void 0===t?void 0:t.name)&&void 0!==n?n:"string":gt(e)?e.name:null!==(r=At(e))&&void 0!==r?r:e.name}(e))||void 0===r?void 0:r.toLowerCase()){case"number":return zc.convertNumber(t);case"boolean":return zc.convertBoolean(t);case"bigint":return zc.convertBigint(t);case"date":return zc.convertDate(t);default:return t}}}var zc;!function(e){function t(e){switch(e){case"b":return"\b";case"f":return"\f";case"n":return"\n";case"r":return"\r";case"t":return"\t";case"v":return"\v";case"0":return"\0";default:return e}}e.convertString=function(e){let n="";for(let r=1;r=qc&&(Xc=t,await new Promise((e=>{"undefined"==typeof setImmediate?setTimeout(e,0):setImmediate(e)}))),e.isCancellationRequested)throw Qc}class el{constructor(){this.promise=new Promise(((e,t)=>{this.resolve=t=>(e(t),this),this.reject=e=>(t(e),this)}))}}class tl{constructor(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){const t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content}update(e,t){for(const n of e)if(tl.isIncremental(n)){const e=al(n.range),t=this.offsetAt(e.start),r=this.offsetAt(e.end);this._content=this._content.substring(0,t)+n.text+this._content.substring(r,this._content.length);const i=Math.max(e.start.line,0),s=Math.max(e.end.line,0);let o=this._lineOffsets;const a=sl(n.text,!1,t);if(s-i===a.length)for(let n=0,l=a.length;ne?r=i:n=i+1}const i=n-1;return{line:i,character:(e=this.ensureBeforeEOL(e,t[i]))-t[i]}}offsetAt(e){const t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;const n=t[e.line];if(e.character<=0)return n;const r=e.line+1t&&ol(this._content.charCodeAt(e-1));)e--;return e}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){const t=e;return null!=t&&"string"==typeof t.text&&void 0!==t.range&&(void 0===t.rangeLength||"number"==typeof t.rangeLength)}static isFull(e){const t=e;return null!=t&&"string"==typeof t.text&&void 0===t.range&&void 0===t.rangeLength}}var nl,rl;function il(e,t){if(e.length<=1)return e;const n=e.length/2|0,r=e.slice(0,n),i=e.slice(n);il(r,t),il(i,t);let s=0,o=0,a=0;for(;sn.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}function cl(e){const t=al(e.range);return t!==e.range?{newText:e.newText,range:t}:e}!function(e){e.create=function(e,t,n,r){return new tl(e,t,n,r)},e.update=function(e,t,n){if(e instanceof tl)return e.update(t,n),e;throw new Error("TextDocument.update: document must be created by TextDocument.create")},e.applyEdits=function(e,t){const n=e.getText(),r=il(t.map(cl),((e,t)=>{const n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n}));let i=0;const s=[];for(const o of r){const t=e.offsetAt(o.range.start);if(ti&&s.push(n.substring(i,t)),o.newText.length&&s.push(o.newText),i=e.offsetAt(o.range.end)}return s.push(n.substr(i)),s.join("")}}(nl||(nl={})),(()=>{var e={470:e=>{function t(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function n(e,t){for(var n,r="",i=0,s=-1,o=0,a=0;a<=e.length;++a){if(a2){var c=r.lastIndexOf("/");if(c!==r.length-1){-1===c?(r="",i=0):i=(r=r.slice(0,c)).length-1-r.lastIndexOf("/"),s=a,o=0;continue}}else if(2===r.length||1===r.length){r="",i=0,s=a,o=0;continue}t&&(r.length>0?r+="/..":r="..",i=2)}else r.length>0?r+="/"+e.slice(s+1,a):r=e.slice(s+1,a),i=a-s-1;s=a,o=0}else 46===n&&-1!==o?++o:o=-1}return r}var r={resolve:function(){for(var e,r="",i=!1,s=arguments.length-1;s>=-1&&!i;s--){var o;s>=0?o=arguments[s]:(void 0===e&&(e=process.cwd()),o=e),t(o),0!==o.length&&(r=o+"/"+r,i=47===o.charCodeAt(0))}return r=n(r,!i),i?r.length>0?"/"+r:"/":r.length>0?r:"."},normalize:function(e){if(t(e),0===e.length)return".";var r=47===e.charCodeAt(0),i=47===e.charCodeAt(e.length-1);return 0!==(e=n(e,!r)).length||r||(e="."),e.length>0&&i&&(e+="/"),r?"/"+e:e},isAbsolute:function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,n=0;n0&&(void 0===e?e=i:e+="/"+i)}return void 0===e?".":r.normalize(e)},relative:function(e,n){if(t(e),t(n),e===n)return"";if((e=r.resolve(e))===(n=r.resolve(n)))return"";for(var i=1;il){if(47===n.charCodeAt(a+d))return n.slice(a+d+1);if(0===d)return n.slice(a+d)}else o>l&&(47===e.charCodeAt(i+d)?u=d:0===d&&(u=0));break}var h=e.charCodeAt(i+d);if(h!==n.charCodeAt(a+d))break;47===h&&(u=d)}var f="";for(d=i+u+1;d<=s;++d)d!==s&&47!==e.charCodeAt(d)||(0===f.length?f+="..":f+="/..");return f.length>0?f+n.slice(a+u):(a+=u,47===n.charCodeAt(a)&&++a,n.slice(a))},_makeLong:function(e){return e},dirname:function(e){if(t(e),0===e.length)return".";for(var n=e.charCodeAt(0),r=47===n,i=-1,s=!0,o=e.length-1;o>=1;--o)if(47===(n=e.charCodeAt(o))){if(!s){i=o;break}}else s=!1;return-1===i?r?"/":".":r&&1===i?"//":e.slice(0,i)},basename:function(e,n){if(void 0!==n&&"string"!=typeof n)throw new TypeError('"ext" argument must be a string');t(e);var r,i=0,s=-1,o=!0;if(void 0!==n&&n.length>0&&n.length<=e.length){if(n.length===e.length&&n===e)return"";var a=n.length-1,c=-1;for(r=e.length-1;r>=0;--r){var l=e.charCodeAt(r);if(47===l){if(!o){i=r+1;break}}else-1===c&&(o=!1,c=r+1),a>=0&&(l===n.charCodeAt(a)?-1==--a&&(s=r):(a=-1,s=c))}return i===s?s=c:-1===s&&(s=e.length),e.slice(i,s)}for(r=e.length-1;r>=0;--r)if(47===e.charCodeAt(r)){if(!o){i=r+1;break}}else-1===s&&(o=!1,s=r+1);return-1===s?"":e.slice(i,s)},extname:function(e){t(e);for(var n=-1,r=0,i=-1,s=!0,o=0,a=e.length-1;a>=0;--a){var c=e.charCodeAt(a);if(47!==c)-1===i&&(s=!1,i=a+1),46===c?-1===n?n=a:1!==o&&(o=1):-1!==n&&(o=-1);else if(!s){r=a+1;break}}return-1===n||-1===i||0===o||1===o&&n===i-1&&n===r+1?"":e.slice(n,i)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var n=t.dir||t.root,r=t.base||(t.name||"")+(t.ext||"");return n?n===t.root?n+r:n+"/"+r:r}(0,e)},parse:function(e){t(e);var n={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return n;var r,i=e.charCodeAt(0),s=47===i;s?(n.root="/",r=1):r=0;for(var o=-1,a=0,c=-1,l=!0,u=e.length-1,d=0;u>=r;--u)if(47!==(i=e.charCodeAt(u)))-1===c&&(l=!1,c=u+1),46===i?-1===o?o=u:1!==d&&(d=1):-1!==o&&(d=-1);else if(!l){a=u+1;break}return-1===o||-1===c||0===d||1===d&&o===c-1&&o===a+1?-1!==c&&(n.base=n.name=0===a&&s?e.slice(1,c):e.slice(a,c)):(0===a&&s?(n.name=e.slice(1,o),n.base=e.slice(1,c)):(n.name=e.slice(a,o),n.base=e.slice(a,c)),n.ext=e.slice(o,c)),a>0?n.dir=e.slice(0,a-1):s&&(n.dir="/"),n},sep:"/",delimiter:":",win32:null,posix:null};r.posix=r,e.exports=r}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var s=t[r]={exports:{}};return e[r](s,s.exports,n),s.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};(()=>{let e;if(n.r(r),n.d(r,{URI:()=>u,Utils:()=>x}),"object"==typeof process)e="win32"===process.platform;else if("object"==typeof navigator){let t=navigator.userAgent;e=t.indexOf("Windows")>=0}const t=/^\w[\w\d+.-]*$/,i=/^\//,s=/^\/\//;function o(e,n){if(!e.scheme&&n)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!t.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!i.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(s.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}const a="",c="/",l=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class u{static isUri(e){return e instanceof u||!!e&&"string"==typeof e.authority&&"string"==typeof e.fragment&&"string"==typeof e.path&&"string"==typeof e.query&&"string"==typeof e.scheme&&"string"==typeof e.fsPath&&"function"==typeof e.with&&"function"==typeof e.toString}scheme;authority;path;query;fragment;constructor(e,t,n,r,i,s=!1){"object"==typeof e?(this.scheme=e.scheme||a,this.authority=e.authority||a,this.path=e.path||a,this.query=e.query||a,this.fragment=e.fragment||a):(this.scheme=function(e,t){return e||t?e:"file"}(e,s),this.authority=t||a,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==c&&(t=c+t):t=c}return t}(this.scheme,n||a),this.query=r||a,this.fragment=i||a,o(this,s))}get fsPath(){return g(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:n,path:r,query:i,fragment:s}=e;return void 0===t?t=this.scheme:null===t&&(t=a),void 0===n?n=this.authority:null===n&&(n=a),void 0===r?r=this.path:null===r&&(r=a),void 0===i?i=this.query:null===i&&(i=a),void 0===s?s=this.fragment:null===s&&(s=a),t===this.scheme&&n===this.authority&&r===this.path&&i===this.query&&s===this.fragment?this:new h(t,n,r,i,s)}static parse(e,t=!1){const n=l.exec(e);return n?new h(n[2]||a,v(n[4]||a),v(n[5]||a),v(n[7]||a),v(n[9]||a),t):new h(a,a,a,a,a)}static file(t){let n=a;if(e&&(t=t.replace(/\\/g,c)),t[0]===c&&t[1]===c){const e=t.indexOf(c,2);-1===e?(n=t.substring(2),t=c):(n=t.substring(2,e),t=t.substring(e)||c)}return new h("file",n,t,a,a)}static from(e){const t=new h(e.scheme,e.authority,e.path,e.query,e.fragment);return o(t,!0),t}toString(e=!1){return y(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof u)return e;{const t=new h(e);return t._formatted=e.external,t._fsPath=e._sep===d?e.fsPath:null,t}}return e}}const d=e?1:void 0;class h extends u{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=g(this,!1)),this._fsPath}toString(e=!1){return e?y(this,!0):(this._formatted||(this._formatted=y(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=d),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}const f={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function p(e,t,n){let r,i=-1;for(let s=0;s=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||45===o||46===o||95===o||126===o||t&&47===o||n&&91===o||n&&93===o||n&&58===o)-1!==i&&(r+=encodeURIComponent(e.substring(i,s)),i=-1),void 0!==r&&(r+=e.charAt(s));else{void 0===r&&(r=e.substr(0,s));const t=f[o];void 0!==t?(-1!==i&&(r+=encodeURIComponent(e.substring(i,s)),i=-1),r+=t):-1===i&&(i=s)}}return-1!==i&&(r+=encodeURIComponent(e.substring(i))),void 0!==r?r:e}function m(e){let t;for(let n=0;n1&&"file"===t.scheme?`//${t.authority}${t.path}`:47===t.path.charCodeAt(0)&&(t.path.charCodeAt(1)>=65&&t.path.charCodeAt(1)<=90||t.path.charCodeAt(1)>=97&&t.path.charCodeAt(1)<=122)&&58===t.path.charCodeAt(2)?n?t.path.substr(1):t.path[1].toLowerCase()+t.path.substr(2):t.path,e&&(r=r.replace(/\//g,"\\")),r}function y(e,t){const n=t?m:p;let r="",{scheme:i,authority:s,path:o,query:a,fragment:l}=e;if(i&&(r+=i,r+=":"),(s||"file"===i)&&(r+=c,r+=c),s){let e=s.indexOf("@");if(-1!==e){const t=s.substr(0,e);s=s.substr(e+1),e=t.lastIndexOf(":"),-1===e?r+=n(t,!1,!1):(r+=n(t.substr(0,e),!1,!1),r+=":",r+=n(t.substr(e+1),!1,!0)),r+="@"}s=s.toLowerCase(),e=s.lastIndexOf(":"),-1===e?r+=n(s,!1,!0):(r+=n(s.substr(0,e),!1,!0),r+=s.substr(e))}if(o){if(o.length>=3&&47===o.charCodeAt(0)&&58===o.charCodeAt(2)){const e=o.charCodeAt(1);e>=65&&e<=90&&(o=`/${String.fromCharCode(e+32)}:${o.substr(3)}`)}else if(o.length>=2&&58===o.charCodeAt(1)){const e=o.charCodeAt(0);e>=65&&e<=90&&(o=`${String.fromCharCode(e+32)}:${o.substr(2)}`)}r+=n(o,!0,!1)}return a&&(r+="?",r+=n(a,!1,!1)),l&&(r+="#",r+=t?l:p(l,!1,!1)),r}function A(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+A(e.substr(3)):e}}const T=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function v(e){return e.match(T)?e.replace(T,(e=>A(e))):e}var R=n(470);const E=R.posix||R,k="/";var x;!function(e){e.joinPath=function(e,...t){return e.with({path:E.join(e.path,...t)})},e.resolvePath=function(e,...t){let n=e.path,r=!1;n[0]!==k&&(n=k+n,r=!0);let i=E.resolve(n,...t);return r&&i[0]===k&&!e.authority&&(i=i.substring(1)),e.with({path:i})},e.dirname=function(e){if(0===e.path.length||e.path===k)return e;let t=E.dirname(e.path);return 1===t.length&&46===t.charCodeAt(0)&&(t=""),e.with({path:t})},e.basename=function(e){return E.basename(e.path)},e.extname=function(e){return E.extname(e.path)}}(x||(x={}))})(),rl=r})();const{URI:ll,Utils:ul}=rl;var dl,hl;!function(e){e.basename=ul.basename,e.dirname=ul.dirname,e.extname=ul.extname,e.joinPath=ul.joinPath,e.resolvePath=ul.resolvePath,e.equals=function(e,t){return(null==e?void 0:e.toString())===(null==t?void 0:t.toString())},e.relative=function(e,t){const n="string"==typeof e?e:e.path,r="string"==typeof t?t:t.path,i=n.split("/").filter((e=>e.length>0)),s=r.split("/").filter((e=>e.length>0));let o=0;for(;onull!=r?r:r=nl.create(e.toString(),n.getServices(e).LanguageMetaData.languageId,0,null!=t?t:"")}}class pl{constructor(e){this.documentMap=new Map,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory}get all(){return m(this.documentMap.values())}addDocument(e){const t=e.uri.toString();if(this.documentMap.has(t))throw new Error(`A document with the URI '${t}' is already present.`);this.documentMap.set(t,e)}getDocument(e){const t=e.toString();return this.documentMap.get(t)}async getOrCreateDocument(e,t){let n=this.getDocument(e);return n||(n=await this.langiumDocumentFactory.fromUri(e,t),this.addDocument(n),n)}createDocument(e,t,n){if(n)return this.langiumDocumentFactory.fromString(t,e,n).then((e=>(this.addDocument(e),e)));{const n=this.langiumDocumentFactory.fromString(t,e);return this.addDocument(n),n}}hasDocument(e){return this.documentMap.has(e.toString())}invalidateDocument(e){const t=e.toString(),n=this.documentMap.get(t);return n&&(n.state=hl.Changed,n.precomputedScopes=void 0,n.references=[],n.diagnostics=void 0),n}deleteDocument(e){const t=e.toString(),n=this.documentMap.get(t);return n&&(n.state=hl.Changed,this.documentMap.delete(t)),n}}class ml{constructor(e){this.reflection=e.shared.AstReflection,this.langiumDocuments=()=>e.shared.workspace.LangiumDocuments,this.scopeProvider=e.references.ScopeProvider,this.astNodeLocator=e.workspace.AstNodeLocator}async link(e,t=Yc.XO.None){for(const n of Ue(e.parseResult.value))await Zc(t),Ge(n).forEach((t=>this.doLink(t,e)))}doLink(e,t){const n=e.reference;if(void 0===n._ref)try{const t=this.getCandidate(e);if(s(t))n._ref=t;else if(n._nodeDescription=t,this.langiumDocuments().hasDocument(t.documentUri)){const r=this.loadAstNode(t);n._ref=null!=r?r:this.createLinkingError(e,t)}}catch(r){n._ref=Object.assign(Object.assign({},e),{message:`An error occurred while resolving reference to '${n.$refText}': ${r}`})}t.references.push(n)}unlink(e){for(const t of e.references)delete t._ref,delete t._nodeDescription;e.references=[]}getCandidate(e){const t=this.scopeProvider.getScope(e).getElement(e.reference.$refText);return null!=t?t:this.createLinkingError(e)}buildReference(e,t,n,i){const o=this,a={$refNode:n,$refText:i,get ref(){var n,i;if(r(this._ref))return this._ref;if("object"==typeof(i=this._nodeDescription)&&null!==i&&"string"==typeof i.name&&"string"==typeof i.type&&"string"==typeof i.path){const n=o.loadAstNode(this._nodeDescription);this._ref=null!=n?n:o.createLinkingError({reference:a,container:e,property:t},this._nodeDescription)}else if(void 0===this._ref){const r=o.getLinkedNode({reference:a,container:e,property:t});if(r.error&&Pe(e).state=e.end)return t.ref}if(n){const t=this.nameProvider.getNameNode(n);if(t&&(t===e||function(e,t){for(;e.container;)if((e=e.container)===t)return!0;return!1}(e,t)))return n}}}findDeclarationNode(e){const t=this.findDeclaration(e);if(null==t?void 0:t.$cstNode){const e=this.nameProvider.getNameNode(t);return null!=e?e:t.$cstNode}}findReferences(e,t){const n=[];if(t.includeDeclaration){const t=this.getReferenceToSelf(e);t&&n.push(t)}let r=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e));return t.documentUri&&(r=r.filter((e=>dl.equals(e.sourceUri,t.documentUri)))),n.push(...r),m(n)}getReferenceToSelf(e){const t=this.nameProvider.getNameNode(e);if(t){const n=Pe(e),r=this.nodeLocator.getAstNodePath(e);return{sourceUri:n.uri,sourcePath:r,targetUri:n.uri,targetPath:r,segment:R(t),local:!0}}}}class Al{constructor(e){if(this.map=new Map,e)for(const[t,n]of e)this.add(t,n)}get size(){return y.sum(m(this.map.values()).map((e=>e.length)))}clear(){this.map.clear()}delete(e,t){if(void 0===t)return this.map.delete(e);{const n=this.map.get(e);if(n){const r=n.indexOf(t);if(r>=0)return 1===n.length?this.map.delete(e):n.splice(r,1),!0}return!1}}get(e){var t;return null!==(t=this.map.get(e))&&void 0!==t?t:[]}has(e,t){if(void 0===t)return this.map.has(e);{const n=this.map.get(e);return!!n&&n.indexOf(t)>=0}}add(e,t){return this.map.has(e)?this.map.get(e).push(t):this.map.set(e,[t]),this}addAll(e,t){return this.map.has(e)?this.map.get(e).push(...t):this.map.set(e,Array.from(t)),this}forEach(e){this.map.forEach(((t,n)=>t.forEach((t=>e(t,n,this)))))}[Symbol.iterator](){return this.entries().iterator()}entries(){return m(this.map.entries()).flatMap((([e,t])=>t.map((t=>[e,t]))))}keys(){return m(this.map.keys())}values(){return m(this.map.values()).flat()}entriesGroupedByKey(){return m(this.map.entries())}}class Tl{get size(){return this.map.size}constructor(e){if(this.map=new Map,this.inverse=new Map,e)for(const[t,n]of e)this.set(t,n)}clear(){this.map.clear(),this.inverse.clear()}set(e,t){return this.map.set(e,t),this.inverse.set(t,e),this}get(e){return this.map.get(e)}getKey(e){return this.inverse.get(e)}delete(e){const t=this.map.get(e);return void 0!==t&&(this.map.delete(e),this.inverse.delete(t),!0)}}class vl{constructor(e){this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider}async computeExports(e,t=Yc.XO.None){return this.computeExportsForNode(e.parseResult.value,e,void 0,t)}async computeExportsForNode(e,t,n=Me,r=Yc.XO.None){const i=[];this.exportNode(e,i,t);for(const s of n(e))await Zc(r),this.exportNode(s,i,t);return i}exportNode(e,t,n){const r=this.nameProvider.getName(e);r&&t.push(this.descriptions.createDescription(e,r,n))}async computeLocalScopes(e,t=Yc.XO.None){const n=e.parseResult.value,r=new Al;for(const i of De(n))await Zc(t),this.processNode(i,e,r);return r}processNode(e,t,n){const r=e.$container;if(r){const i=this.nameProvider.getName(e);i&&n.add(r,this.descriptions.createDescription(e,i,t))}}}class Rl{constructor(e,t,n){var r;this.elements=e,this.outerScope=t,this.caseInsensitive=null!==(r=null==n?void 0:n.caseInsensitive)&&void 0!==r&&r}getAllElements(){return this.outerScope?this.elements.concat(this.outerScope.getAllElements()):this.elements}getElement(e){const t=this.caseInsensitive?this.elements.find((t=>t.name.toLowerCase()===e.toLowerCase())):this.elements.find((t=>t.name===e));return t||(this.outerScope?this.outerScope.getElement(e):void 0)}}class El{constructor(e,t,n){var r;this.elements=new Map,this.caseInsensitive=null!==(r=null==n?void 0:n.caseInsensitive)&&void 0!==r&&r;for(const i of e){const e=this.caseInsensitive?i.name.toLowerCase():i.name;this.elements.set(e,i)}this.outerScope=t}getElement(e){const t=this.caseInsensitive?e.toLowerCase():e,n=this.elements.get(t);return n||(this.outerScope?this.outerScope.getElement(e):void 0)}getAllElements(){let e=m(this.elements.values());return this.outerScope&&(e=e.concat(this.outerScope.getAllElements())),e}}class kl{constructor(){this.toDispose=[],this.isDisposed=!1}onDispose(e){this.toDispose.push(e)}dispose(){this.throwIfDisposed(),this.clear(),this.isDisposed=!0,this.toDispose.forEach((e=>e.dispose()))}throwIfDisposed(){if(this.isDisposed)throw new Error("This cache has already been disposed")}}class xl extends kl{constructor(){super(...arguments),this.cache=new Map}has(e){return this.throwIfDisposed(),this.cache.has(e)}set(e,t){this.throwIfDisposed(),this.cache.set(e,t)}get(e,t){if(this.throwIfDisposed(),this.cache.has(e))return this.cache.get(e);if(t){const n=t();return this.cache.set(e,n),n}}delete(e){return this.throwIfDisposed(),this.cache.delete(e)}clear(){this.throwIfDisposed(),this.cache.clear()}}class Il extends kl{constructor(e){super(),this.cache=new Map,this.converter=null!=e?e:e=>e}has(e,t){return this.throwIfDisposed(),this.cacheForContext(e).has(t)}set(e,t,n){this.throwIfDisposed(),this.cacheForContext(e).set(t,n)}get(e,t,n){this.throwIfDisposed();const r=this.cacheForContext(e);if(r.has(t))return r.get(t);if(n){const e=n();return r.set(t,e),e}}delete(e,t){return this.throwIfDisposed(),this.cacheForContext(e).delete(t)}clear(e){if(this.throwIfDisposed(),e){const t=this.converter(e);this.cache.delete(t)}else this.cache.clear()}cacheForContext(e){const t=this.converter(e);let n=this.cache.get(t);return n||(n=new Map,this.cache.set(t,n)),n}}class Sl extends xl{constructor(e){super(),this.onDispose(e.workspace.DocumentBuilder.onUpdate((()=>{this.clear()})))}}class Nl{constructor(e){this.reflection=e.shared.AstReflection,this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider,this.indexManager=e.shared.workspace.IndexManager,this.globalScopeCache=new Sl(e.shared)}getScope(e){const t=[],n=this.reflection.getReferenceType(e),r=Pe(e.container).precomputedScopes;if(r){let i=e.container;do{const e=r.get(i);e.length>0&&t.push(m(e).filter((e=>this.reflection.isSubtype(e.type,n)))),i=i.$container}while(i)}let i=this.getGlobalScope(n,e);for(let s=t.length-1;s>=0;s--)i=this.createScope(t[s],i);return i}createScope(e,t,n){return new Rl(m(e),t,n)}createScopeForNodes(e,t,n){const r=m(e).map((e=>{const t=this.nameProvider.getName(e);if(t)return this.descriptions.createDescription(e,t)})).nonNullable();return new Rl(r,t,n)}getGlobalScope(e,t){return this.globalScopeCache.get(e,(()=>new El(this.indexManager.allElements(e))))}}function Cl(e){return"object"==typeof e&&!!e&&("$ref"in e||"$error"in e)}class $l{constructor(e){this.ignoreProperties=new Set(["$container","$containerProperty","$containerIndex","$document","$cstNode"]),this.langiumDocuments=e.shared.workspace.LangiumDocuments,this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider,this.commentProvider=e.documentation.CommentProvider}serialize(e,t={}){const n=null==t?void 0:t.replacer,r=(e,n)=>this.replacer(e,n,t),i=n?(e,t)=>n(e,t,r):r;try{return this.currentDocument=Pe(e),JSON.stringify(e,i,null==t?void 0:t.space)}finally{this.currentDocument=void 0}}deserialize(e,t={}){const n=JSON.parse(e);return this.linkNode(n,n,t),n}replacer(e,t,{refText:n,sourceText:s,textRegions:o,comments:a,uriConverter:c}){var l,u,d,h;if(!this.ignoreProperties.has(e)){if(i(t)){const e=t.ref,r=n?t.$refText:void 0;if(e){const n=Pe(e);let i="";this.currentDocument&&this.currentDocument!==n&&(i=c?c(n.uri,t):n.uri.toString());return{$ref:`${i}#${this.astNodeLocator.getAstNodePath(e)}`,$refText:r}}return{$error:null!==(u=null===(l=t.error)||void 0===l?void 0:l.message)&&void 0!==u?u:"Could not resolve reference",$refText:r}}if(r(t)){let n;if(o&&(n=this.addAstNodeRegionWithAssignmentsTo(Object.assign({},t)),e&&!t.$document||!(null==n?void 0:n.$textRegion)||(n.$textRegion.documentURI=null===(d=this.currentDocument)||void 0===d?void 0:d.uri.toString())),s&&!e&&(null!=n||(n=Object.assign({},t)),n.$sourceText=null===(h=t.$cstNode)||void 0===h?void 0:h.text),a){null!=n||(n=Object.assign({},t));const e=this.commentProvider.getComment(t);e&&(n.$comment=e.replace(/\r/g,""))}return null!=n?n:t}return t}}addAstNodeRegionWithAssignmentsTo(e){const t=e=>({offset:e.offset,end:e.end,length:e.length,range:e.range});if(e.$cstNode){const n=(e.$textRegion=t(e.$cstNode)).assignments={};return Object.keys(e).filter((e=>!e.startsWith("$"))).forEach((r=>{const i=function(e,t){return e&&t?ht(e,t,e.astNode,!0):[]}(e.$cstNode,r).map(t);0!==i.length&&(n[r]=i)})),e}}linkNode(e,t,n,i,s,o){for(const[c,l]of Object.entries(e))if(Array.isArray(l))for(let i=0;i{try{await e.call(t,n,r,i)}catch(s){if(Jc(s))throw s;console.error("An error occurred during validation:",s);const e=s instanceof Error?s.message:String(s);s instanceof Error&&s.stack&&console.error(s.stack),r("error","An error occurred during validation: "+e,{node:n})}}}addEntry(e,t){if("AstNode"!==e)for(const n of this.reflection.getAllSubTypes(e))this.entries.add(n,t);else this.entries.add("AstNode",t)}getChecks(e,t){let n=m(this.entries.get(e)).concat(this.entries.get("AstNode"));return t&&(n=n.filter((e=>t.includes(e.category)))),n.map((e=>e.check))}}class Ml{constructor(e){this.validationRegistry=e.validation.ValidationRegistry,this.metadata=e.LanguageMetaData}async validateDocument(e,t={},n=Yc.XO.None){const r=e.parseResult,i=[];if(await Zc(n),!t.categories||t.categories.includes("built-in")){if(this.processLexingErrors(r,i,t),t.stopAfterLexingErrors&&i.some((e=>{var t;return(null===(t=e.data)||void 0===t?void 0:t.code)===bl.LexingError})))return i;if(this.processParsingErrors(r,i,t),t.stopAfterParsingErrors&&i.some((e=>{var t;return(null===(t=e.data)||void 0===t?void 0:t.code)===bl.ParsingError})))return i;if(this.processLinkingErrors(e,i,t),t.stopAfterLinkingErrors&&i.some((e=>{var t;return(null===(t=e.data)||void 0===t?void 0:t.code)===bl.LinkingError})))return i}try{i.push(...await this.validateAst(r.value,t,n))}catch(s){if(Jc(s))throw s;console.error("An error occurred during validation:",s)}return await Zc(n),i}processLexingErrors(e,t,n){for(const r of e.lexerErrors){const e={severity:Ul("error"),range:{start:{line:r.line-1,character:r.column-1},end:{line:r.line-1,character:r.column+r.length-1}},message:r.message,data:Ll(bl.LexingError),source:this.getSource()};t.push(e)}}processParsingErrors(e,t,n){for(const r of e.parserErrors){let e;if(isNaN(r.token.startOffset)){if("previousToken"in r){const t=r.previousToken;if(isNaN(t.startOffset)){const t={line:0,character:0};e={start:t,end:t}}else{const n={line:t.endLine-1,character:t.endColumn};e={start:n,end:n}}}}else e=v(r.token);if(e){const n={severity:Ul("error"),range:e,message:r.message,data:Ll(bl.ParsingError),source:this.getSource()};t.push(n)}}}processLinkingErrors(e,t,n){for(const r of e.references){const e=r.error;if(e){const n={node:e.container,property:e.property,index:e.index,data:{code:bl.LinkingError,containerType:e.container.$type,property:e.property,refText:e.reference.$refText}};t.push(this.toDiagnostic("error",e.message,n))}}}async validateAst(e,t,n=Yc.XO.None){const r=[],i=(e,t,n)=>{r.push(this.toDiagnostic(e,t,n))};return await Promise.all(Ue(e).map((async e=>{await Zc(n);const r=this.validationRegistry.getChecks(e.$type,t.categories);for(const t of r)await t(e,i,n)}))),r}toDiagnostic(e,t,n){return{message:t,range:Dl(n),severity:Ul(e),code:n.code,codeDescription:n.codeDescription,tags:n.tags,relatedInformation:n.relatedInformation,data:n.data,source:this.getSource()}}getSource(){return this.metadata.languageId}}function Dl(e){if(e.range)return e.range;let t;return"string"==typeof e.property?t=dt(e.node.$cstNode,e.property,e.index):"string"==typeof e.keyword&&(t=function(e,t,n){if(!e)return;const r=ft(e,t,null==e?void 0:e.astNode);return 0!==r.length?r[n=void 0!==n?Math.max(0,Math.min(n,r.length-1)):0]:void 0}(e.node.$cstNode,e.keyword,e.index)),null!=t||(t=e.node.$cstNode),t?t.range:{start:{line:0,character:0},end:{line:0,character:0}}}function Ul(e){switch(e){case"error":return 1;case"warning":return 2;case"info":return 3;case"hint":return 4;default:throw new Error("Invalid diagnostic severity: "+e)}}!function(e){e.LexingError="lexing-error",e.ParsingError="parsing-error",e.LinkingError="linking-error"}(bl||(bl={}));class Fl{constructor(e){this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider}createDescription(e,t,n=Pe(e)){null!=t||(t=this.nameProvider.getName(e));const r=this.astNodeLocator.getAstNodePath(e);if(!t)throw new Error(`Node at path ${r} has no name.`);let i;const s=()=>{var t;return null!=i?i:i=R(null!==(t=this.nameProvider.getNameNode(e))&&void 0!==t?t:e.$cstNode)};return{node:e,name:t,get nameSegment(){return s()},selectionSegment:R(e.$cstNode),type:e.$type,documentUri:n.uri,path:r}}}class Gl{constructor(e){this.nodeLocator=e.workspace.AstNodeLocator}async createDescriptions(e,t=Yc.XO.None){const n=[],r=e.parseResult.value;for(const i of Ue(r))await Zc(t),Ge(i).filter((e=>!s(e))).forEach((e=>{const t=this.createDescription(e);t&&n.push(t)}));return n}createDescription(e){const t=e.reference.$nodeDescription,n=e.reference.$refNode;if(!t||!n)return;const r=Pe(e.container).uri;return{sourceUri:r,sourcePath:this.nodeLocator.getAstNodePath(e.container),targetUri:t.documentUri,targetPath:t.path,segment:R(n),local:dl.equals(t.documentUri,r)}}}class Kl{constructor(){this.segmentSeparator="/",this.indexSeparator="@"}getAstNodePath(e){if(e.$container){const t=this.getAstNodePath(e.$container),n=this.getPathSegment(e);return t+this.segmentSeparator+n}return""}getPathSegment({$containerProperty:e,$containerIndex:t}){if(!e)throw new Error("Missing '$containerProperty' in AST node.");return void 0!==t?e+this.indexSeparator+t:e}getAstNode(e,t){return t.split(this.segmentSeparator).reduce(((e,t)=>{if(!e||0===t.length)return e;const n=t.indexOf(this.indexSeparator);if(n>0){const r=t.substring(0,n),i=parseInt(t.substring(n+1)),s=e[r];return null==s?void 0:s[i]}return e[t]}),e)}}class Bl{constructor(e){this._ready=new el,this.settings={},this.workspaceConfig=!1,this.serviceRegistry=e.ServiceRegistry}get ready(){return this._ready.promise}initialize(e){var t,n;this.workspaceConfig=null!==(n=null===(t=e.capabilities.workspace)||void 0===t?void 0:t.configuration)&&void 0!==n&&n}async initialized(e){if(this.workspaceConfig){if(e.register){const t=this.serviceRegistry.all;e.register({section:t.map((e=>this.toSectionName(e.LanguageMetaData.languageId)))})}if(e.fetchConfiguration){const t=this.serviceRegistry.all.map((e=>({section:this.toSectionName(e.LanguageMetaData.languageId)}))),n=await e.fetchConfiguration(t);t.forEach(((e,t)=>{this.updateSectionConfiguration(e.section,n[t])}))}}this._ready.resolve()}updateConfiguration(e){e.settings&&Object.keys(e.settings).forEach((t=>{this.updateSectionConfiguration(t,e.settings[t])}))}updateSectionConfiguration(e,t){this.settings[e]=t}async getConfiguration(e,t){await this.ready;const n=this.toSectionName(e);if(this.settings[n])return this.settings[n][t]}toSectionName(e){return`${e}`}}!function(e){e.create=function(e){return{dispose:async()=>await e()}}}(_l||(_l={}));class jl{constructor(e){this.updateBuildOptions={validation:{categories:["built-in","fast"]}},this.updateListeners=[],this.buildPhaseListeners=new Al,this.buildState=new Map,this.documentBuildWaiters=new Map,this.currentState=hl.Changed,this.langiumDocuments=e.workspace.LangiumDocuments,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.indexManager=e.workspace.IndexManager,this.serviceRegistry=e.ServiceRegistry}async build(e,t={},n=Yc.XO.None){var r,i;for(const s of e){const e=s.uri.toString();if(s.state===hl.Validated){if("boolean"==typeof t.validation&&t.validation)s.state=hl.IndexedReferences,s.diagnostics=void 0,this.buildState.delete(e);else if("object"==typeof t.validation){const n=this.buildState.get(e),o=null===(r=null==n?void 0:n.result)||void 0===r?void 0:r.validationChecks;if(o){const r=(null!==(i=t.validation.categories)&&void 0!==i?i:Ol.all).filter((e=>!o.includes(e)));r.length>0&&(this.buildState.set(e,{completed:!1,options:{validation:Object.assign(Object.assign({},t.validation),{categories:r})},result:n.result}),s.state=hl.IndexedReferences)}}}else this.buildState.delete(e)}this.currentState=hl.Changed,await this.emitUpdate(e.map((e=>e.uri)),[]),await this.buildDocuments(e,t,n)}async update(e,t,n=Yc.XO.None){this.currentState=hl.Changed;for(const s of t)this.langiumDocuments.deleteDocument(s),this.buildState.delete(s.toString()),this.indexManager.remove(s);for(const s of e){if(!this.langiumDocuments.invalidateDocument(s)){const e=this.langiumDocumentFactory.fromModel({$type:"INVALID"},s);e.state=hl.Changed,this.langiumDocuments.addDocument(e)}this.buildState.delete(s.toString())}const r=m(e).concat(t).map((e=>e.toString())).toSet();this.langiumDocuments.all.filter((e=>!r.has(e.uri.toString())&&this.shouldRelink(e,r))).forEach((e=>{this.serviceRegistry.getServices(e.uri).references.Linker.unlink(e),e.state=Math.min(e.state,hl.ComputedScopes),e.diagnostics=void 0})),await this.emitUpdate(e,t),await Zc(n);const i=this.langiumDocuments.all.filter((e=>{var t;return e.staten(e,t))))}shouldRelink(e,t){return!!e.references.some((e=>void 0!==e.error))||this.indexManager.isAffected(e,t)}onUpdate(e){return this.updateListeners.push(e),_l.create((()=>{const t=this.updateListeners.indexOf(e);t>=0&&this.updateListeners.splice(t,1)}))}async buildDocuments(e,t,n){this.prepareBuild(e,t),await this.runCancelable(e,hl.Parsed,n,(e=>this.langiumDocumentFactory.update(e,n))),await this.runCancelable(e,hl.IndexedContent,n,(e=>this.indexManager.updateContent(e,n))),await this.runCancelable(e,hl.ComputedScopes,n,(async e=>{const t=this.serviceRegistry.getServices(e.uri).references.ScopeComputation;e.precomputedScopes=await t.computeLocalScopes(e,n)})),await this.runCancelable(e,hl.Linked,n,(e=>this.serviceRegistry.getServices(e.uri).references.Linker.link(e,n))),await this.runCancelable(e,hl.IndexedReferences,n,(e=>this.indexManager.updateReferences(e,n)));const r=e.filter((e=>this.shouldValidate(e)));await this.runCancelable(r,hl.Validated,n,(e=>this.validate(e,n)));for(const i of e){const e=this.buildState.get(i.uri.toString());e&&(e.completed=!0)}}prepareBuild(e,t){for(const n of e){const e=n.uri.toString(),r=this.buildState.get(e);r&&!r.completed||this.buildState.set(e,{completed:!1,options:t,result:null==r?void 0:r.result})}}async runCancelable(e,t,n,r){const i=e.filter((e=>e.state{this.buildPhaseListeners.delete(e,t)}))}waitUntil(e,t,n){let r;if(t&&"path"in t?r=t:n=t,null!=n||(n=Yc.XO.None),r){const t=this.langiumDocuments.getDocument(r);if(t&&t.state>e)return Promise.resolve(r)}return this.currentState>=e?Promise.resolve(void 0):n.isCancellationRequested?Promise.reject(Qc):new Promise(((t,i)=>{const s=this.onBuildPhase(e,(()=>{if(s.dispose(),o.dispose(),r){const e=this.langiumDocuments.getDocument(r);t(null==e?void 0:e.uri)}else t(void 0)})),o=n.onCancellationRequested((()=>{s.dispose(),o.dispose(),i(Qc)}))}))}async notifyBuildPhase(e,t,n){if(0===e.length)return;const r=this.buildPhaseListeners.get(t);for(const i of r)await Zc(n),await i(e,n)}shouldValidate(e){return Boolean(this.getBuildOptions(e).validation)}async validate(e,t){var n,r;const i=this.serviceRegistry.getServices(e.uri).validation.DocumentValidator,s=this.getBuildOptions(e).validation,o="object"==typeof s?s:void 0,a=await i.validateDocument(e,o,t);e.diagnostics?e.diagnostics.push(...a):e.diagnostics=a;const c=this.buildState.get(e.uri.toString());if(c){null!==(n=c.result)&&void 0!==n||(c.result={});const e=null!==(r=null==o?void 0:o.categories)&&void 0!==r?r:Ol.all;c.result.validationChecks?c.result.validationChecks.push(...e):c.result.validationChecks=[...e]}}getBuildOptions(e){var t,n;return null!==(n=null===(t=this.buildState.get(e.uri.toString()))||void 0===t?void 0:t.options)&&void 0!==n?n:{}}}class Vl{constructor(e){this.symbolIndex=new Map,this.symbolByTypeIndex=new Il,this.referenceIndex=new Map,this.documents=e.workspace.LangiumDocuments,this.serviceRegistry=e.ServiceRegistry,this.astReflection=e.AstReflection}findAllReferences(e,t){const n=Pe(e).uri,r=[];return this.referenceIndex.forEach((e=>{e.forEach((e=>{dl.equals(e.targetUri,n)&&e.targetPath===t&&r.push(e)}))})),m(r)}allElements(e,t){let n=m(this.symbolIndex.keys());return t&&(n=n.filter((e=>!t||t.has(e)))),n.map((t=>this.getFileDescriptions(t,e))).flat()}getFileDescriptions(e,t){var n;if(!t)return null!==(n=this.symbolIndex.get(e))&&void 0!==n?n:[];const r=this.symbolByTypeIndex.get(e,t,(()=>{var n;return(null!==(n=this.symbolIndex.get(e))&&void 0!==n?n:[]).filter((e=>this.astReflection.isSubtype(e.type,t)))}));return r}remove(e){const t=e.toString();this.symbolIndex.delete(t),this.symbolByTypeIndex.clear(t),this.referenceIndex.delete(t)}async updateContent(e,t=Yc.XO.None){const n=this.serviceRegistry.getServices(e.uri),r=await n.references.ScopeComputation.computeExports(e,t),i=e.uri.toString();this.symbolIndex.set(i,r),this.symbolByTypeIndex.clear(i)}async updateReferences(e,t=Yc.XO.None){const n=this.serviceRegistry.getServices(e.uri),r=await n.workspace.ReferenceDescriptionProvider.createDescriptions(e,t);this.referenceIndex.set(e.uri.toString(),r)}isAffected(e,t){const n=this.referenceIndex.get(e.uri.toString());return!!n&&n.some((e=>!e.local&&t.has(e.targetUri.toString())))}}class Hl{constructor(e){this.initialBuildOptions={},this._ready=new el,this.serviceRegistry=e.ServiceRegistry,this.langiumDocuments=e.workspace.LangiumDocuments,this.documentBuilder=e.workspace.DocumentBuilder,this.fileSystemProvider=e.workspace.FileSystemProvider,this.mutex=e.workspace.WorkspaceLock}get ready(){return this._ready.promise}initialize(e){var t;this.folders=null!==(t=e.workspaceFolders)&&void 0!==t?t:void 0}initialized(e){return this.mutex.write((e=>{var t;return this.initializeWorkspace(null!==(t=this.folders)&&void 0!==t?t:[],e)}))}async initializeWorkspace(e,t=Yc.XO.None){const n=await this.performStartup(e);await Zc(t),await this.documentBuilder.build(n,this.initialBuildOptions,t)}async performStartup(e){const t=this.serviceRegistry.all.flatMap((e=>e.LanguageMetaData.fileExtensions)),n=[],r=e=>{n.push(e),this.langiumDocuments.hasDocument(e.uri)||this.langiumDocuments.addDocument(e)};return await this.loadAdditionalDocuments(e,r),await Promise.all(e.map((e=>[e,this.getRootFolder(e)])).map((async e=>this.traverseFolder(...e,t,r)))),this._ready.resolve(),n}loadAdditionalDocuments(e,t){return Promise.resolve()}getRootFolder(e){return ll.parse(e.uri)}async traverseFolder(e,t,n,r){const i=await this.fileSystemProvider.readDirectory(t);await Promise.all(i.map((async t=>{if(this.includeEntry(e,t,n))if(t.isDirectory)await this.traverseFolder(e,t.uri,n,r);else if(t.isFile){const e=await this.langiumDocuments.getOrCreateDocument(t.uri);r(e)}})))}includeEntry(e,t,n){const r=dl.basename(t.uri);if(r.startsWith("."))return!1;if(t.isDirectory)return"node_modules"!==r&&"out"!==r;if(t.isFile){const e=dl.extname(t.uri);return n.includes(e)}return!1}}class Wl{constructor(e){const t=e.parser.TokenBuilder.buildTokens(e.Grammar,{caseInsensitive:e.LanguageMetaData.caseInsensitive});this.tokenTypes=this.toTokenTypeDictionary(t);const n=Yl(t)?Object.values(t):t;this.chevrotainLexer=new ii(n,{positionTracking:"full"})}get definition(){return this.tokenTypes}tokenize(e){var t;const n=this.chevrotainLexer.tokenize(e);return{tokens:n.tokens,errors:n.errors,hidden:null!==(t=n.groups.hidden)&&void 0!==t?t:[]}}toTokenTypeDictionary(e){if(Yl(e))return e;const t=zl(e)?Object.values(e.modes).flat():e,n={};return t.forEach((e=>n[e.name]=e)),n}}function zl(e){return e&&"modes"in e&&"defaultMode"in e}function Yl(e){return!function(e){return Array.isArray(e)&&(0===e.length||"name"in e[0])}(e)&&!zl(e)}function Xl(e,t,n){let r,i;"string"==typeof e?(i=t,r=n):(i=e.range.start,r=t),i||(i=Qo.create(0,0));const s=function(e){var t,n,r;const i=[];let s=e.position.line,o=e.position.character;for(let a=0;a=u.length){if(i.length>0){const e=Qo.create(s,o);i.push({type:"break",content:"",range:Jo.create(e,e)})}}else{Ql.lastIndex=d;const e=Ql.exec(u);if(e){const t=e[0],n=e[1],r=Qo.create(s,o+d),a=Qo.create(s,o+d+t.length);i.push({type:"tag",content:n,range:Jo.create(r,a)}),d+=t.length,d=nu(u,d)}if(d0&&"break"===i[i.length-1].type)return i.slice(0,-1);return i}({lines:ql(e),position:i,options:lu(r)});return function(e){var t,n,r,i;const s=Qo.create(e.position.line,e.position.character);if(0===e.tokens.length)return new du([],Jo.create(s,s));const o=[];for(;e.index0&&i.push({type:"text",content:t.substring(s,e),range:Jo.create(Qo.create(n,s+r),Qo.create(n,e+r))});let c=o.length+1;const l=a[1];if(i.push({type:"inline-tag",content:l,range:Jo.create(Qo.create(n,s+c+r),Qo.create(n,s+c+l.length+r))}),c+=l.length,4===a.length){c+=a[2].length;const e=a[3];i.push({type:"text",content:e,range:Jo.create(Qo.create(n,s+c+r),Qo.create(n,s+c+e.length+r))})}else i.push({type:"text",content:"",range:Jo.create(Qo.create(n,s+c+r),Qo.create(n,s+c+r))});s=e+a[0].length}const o=t.substring(s);o.length>0&&i.push({type:"text",content:o,range:Jo.create(Qo.create(n,s+r),Qo.create(n,s+r+o.length))})}return i}const eu=/\S/,tu=/\s*$/;function nu(e,t){const n=e.substring(t).match(eu);return n?t+n.index:e.length}function ru(e){const t=e.match(tu);if(t&&"number"==typeof t.index)return t.index}function iu(e,t){const n=e.tokens[e.index];return"tag"===n.type?au(e,!1):"text"===n.type||"inline-tag"===n.type?su(e):(function(e,t){if(t){const n=new pu("",e.range);"inlines"in t?t.inlines.push(n):t.content.inlines.push(n)}}(n,t),void e.index++)}function su(e){let t=e.tokens[e.index];const n=t;let r=t;const i=[];for(;t&&"break"!==t.type&&"tag"!==t.type;)i.push(ou(e)),r=t,t=e.tokens[e.index];return new fu(i,Jo.create(n.range.start,r.range.end))}function ou(e){return"inline-tag"===e.tokens[e.index].type?au(e,!0):cu(e)}function au(e,t){const n=e.tokens[e.index++],r=n.content.substring(1),i=e.tokens[e.index];if("text"===(null==i?void 0:i.type)){if(t){const i=cu(e);return new hu(r,new fu([i],i.range),t,Jo.create(n.range.start,i.range.end))}{const i=su(e);return new hu(r,i,t,Jo.create(n.range.start,i.range.end))}}{const e=n.range;return new hu(r,new fu([],e),t,e)}}function cu(e){const t=e.tokens[e.index++];return new pu(t.content,t.range)}function lu(e){if(!e)return lu({start:"/**",end:"*/",line:"*"});const{start:t,end:n,line:r}=e;return{start:uu(t,!0),end:uu(n,!1),line:uu(r,!0)}}function uu(e,t){if("string"==typeof e||"object"==typeof e){const n="string"==typeof e?at(e):e.source;return t?new RegExp(`^\\s*${n}`):new RegExp(`\\s*${n}\\s*$`)}return e}class du{constructor(e,t){this.elements=e,this.range=t}getTag(e){return this.getAllTags().find((t=>t.name===e))}getTags(e){return this.getAllTags().filter((t=>t.name===e))}getAllTags(){return this.elements.filter((e=>"name"in e))}toString(){let e="";for(const t of this.elements)if(0===e.length)e=t.toString();else{const n=t.toString();e+=mu(e)+n}return e.trim()}toMarkdown(e){let t="";for(const n of this.elements)if(0===t.length)t=n.toMarkdown(e);else{const r=n.toMarkdown(e);t+=mu(t)+r}return t.trim()}}class hu{constructor(e,t,n,r){this.name=e,this.content=t,this.inline=n,this.range=r}toString(){let e=`@${this.name}`;const t=this.content.toString();return 1===this.content.inlines.length?e=`${e} ${t}`:this.content.inlines.length>1&&(e=`${e}\n${t}`),this.inline?`{${e}}`:e}toMarkdown(e){var t,n;return null!==(n=null===(t=null==e?void 0:e.renderTag)||void 0===t?void 0:t.call(e,this))&&void 0!==n?n:this.toMarkdownDefault(e)}toMarkdownDefault(e){const t=this.content.toMarkdown(e);if(this.inline){const n=function(e,t,n){var r,i;if("linkplain"===e||"linkcode"===e||"link"===e){const s=t.indexOf(" ");let o=t;if(s>0){const e=nu(t,s);o=t.substring(e),t=t.substring(0,s)}("linkcode"===e||"link"===e&&"code"===n.link)&&(o=`\`${o}\``);const a=null!==(i=null===(r=n.renderLink)||void 0===r?void 0:r.call(n,t,o))&&void 0!==i?i:function(e,t){try{return ll.parse(e,!0),`[${t}](${e})`}catch(r){return e}}(t,o);return a}return}(this.name,t,null!=e?e:{});if("string"==typeof n)return n}let n="";"italic"===(null==e?void 0:e.tag)||void 0===(null==e?void 0:e.tag)?n="*":"bold"===(null==e?void 0:e.tag)?n="**":"bold-italic"===(null==e?void 0:e.tag)&&(n="***");let r=`${n}@${this.name}${n}`;return 1===this.content.inlines.length?r=`${r} \u2014 ${t}`:this.content.inlines.length>1&&(r=`${r}\n${t}`),this.inline?`{${r}}`:r}}class fu{constructor(e,t){this.inlines=e,this.range=t}toString(){let e="";for(let t=0;tn.range.start.line&&(e+="\n")}return e}toMarkdown(e){let t="";for(let n=0;nr.range.start.line&&(t+="\n")}return t}}class pu{constructor(e,t){this.text=e,this.range=t}toString(){return this.text}toMarkdown(){return this.text}}function mu(e){return e.endsWith("\n")?"\n":"\n\n"}class gu{constructor(e){this.indexManager=e.shared.workspace.IndexManager,this.commentProvider=e.documentation.CommentProvider}getDocumentation(e){const t=this.commentProvider.getComment(e);if(t&&function(e,t){const n=lu(t),r=ql(e);if(0===r.length)return!1;const i=r[0],s=r[r.length-1],o=n.start,a=n.end;return Boolean(null==o?void 0:o.exec(i))&&Boolean(null==a?void 0:a.exec(s))}(t)){return Xl(t).toMarkdown({renderLink:(t,n)=>this.documentationLinkRenderer(e,t,n),renderTag:t=>this.documentationTagRenderer(e,t)})}}documentationLinkRenderer(e,t,n){var r;const i=null!==(r=this.findNameInPrecomputedScopes(e,t))&&void 0!==r?r:this.findNameInGlobalScope(e,t);if(i&&i.nameSegment){const e=i.nameSegment.range.start.line+1,t=i.nameSegment.range.start.character+1;return`[${n}](${i.documentUri.with({fragment:`L${e},${t}`}).toString()})`}}documentationTagRenderer(e,t){}findNameInPrecomputedScopes(e,t){const n=Pe(e).precomputedScopes;if(!n)return;let r=e;do{const e=n.get(r).find((e=>e.name===t));if(e)return e;r=r.$container}while(r)}findNameInGlobalScope(e,t){return this.indexManager.allElements().find((e=>e.name===t))}}class yu{constructor(e){this.grammarConfig=()=>e.parser.GrammarConfig}getComment(e){var t;return function(e){return"string"==typeof e.$comment}(e)?e.$comment:null===(t=x(e.$cstNode,this.grammarConfig().multilineCommentRules))||void 0===t?void 0:t.text}}var Au;n(62676);class Tu{constructor(e){this.syncParser=e.parser.LangiumParser}parse(e){return Promise.resolve(this.syncParser.parse(e))}}class vu{constructor(){this.previousTokenSource=new Yc.Qi,this.writeQueue=[],this.readQueue=[],this.done=!0}write(e){this.cancelWrite();const t=new Yc.Qi;return this.previousTokenSource=t,this.enqueue(this.writeQueue,e,t.token)}read(e){return this.enqueue(this.readQueue,e)}enqueue(e,t,n){const r=new el,i={action:t,deferred:r,cancellationToken:null!=n?n:Yc.XO.None};return e.push(i),this.performNextOperation(),r.promise}async performNextOperation(){if(!this.done)return;const e=[];if(this.writeQueue.length>0)e.push(this.writeQueue.shift());else{if(!(this.readQueue.length>0))return;e.push(...this.readQueue.splice(0,this.readQueue.length))}this.done=!1,await Promise.all(e.map((async({action:e,deferred:t,cancellationToken:n})=>{try{const r=await Promise.resolve().then((()=>e(n)));t.resolve(r)}catch(r){Jc(r)?t.resolve(void 0):t.reject(r)}}))),this.done=!0,this.performNextOperation()}cancelWrite(){this.previousTokenSource.cancel()}}class Ru{constructor(e){this.grammarElementIdMap=new Tl,this.tokenTypeIdMap=new Tl,this.grammar=e.Grammar,this.lexer=e.parser.Lexer,this.linker=e.references.Linker}dehydrate(e){return{lexerErrors:e.lexerErrors.map((e=>Object.assign({},e))),parserErrors:e.parserErrors.map((e=>Object.assign({},e))),value:this.dehydrateAstNode(e.value,this.createDehyrationContext(e.value))}}createDehyrationContext(e){const t=new Map,n=new Map;for(const r of Ue(e))t.set(r,{});if(e.$cstNode)for(const r of T(e.$cstNode))n.set(r,{});return{astNodes:t,cstNodes:n}}dehydrateAstNode(e,t){const n=t.astNodes.get(e);n.$type=e.$type,n.$containerIndex=e.$containerIndex,n.$containerProperty=e.$containerProperty,void 0!==e.$cstNode&&(n.$cstNode=this.dehydrateCstNode(e.$cstNode,t));for(const[s,o]of Object.entries(e))if(!s.startsWith("$"))if(Array.isArray(o)){const e=[];n[s]=e;for(const n of o)r(n)?e.push(this.dehydrateAstNode(n,t)):i(n)?e.push(this.dehydrateReference(n,t)):e.push(n)}else r(o)?n[s]=this.dehydrateAstNode(o,t):i(o)?n[s]=this.dehydrateReference(o,t):void 0!==o&&(n[s]=o);return n}dehydrateReference(e,t){const n={};return n.$refText=e.$refText,e.$refNode&&(n.$refNode=t.cstNodes.get(e.$refNode)),n}dehydrateCstNode(e,t){const n=t.cstNodes.get(e);return l(e)?n.fullText=e.fullText:n.grammarSource=this.getGrammarElementId(e.grammarSource),n.hidden=e.hidden,n.astNode=t.astNodes.get(e.astNode),a(e)?n.content=e.content.map((e=>this.dehydrateCstNode(e,t))):c(e)&&(n.tokenType=e.tokenType.name,n.offset=e.offset,n.length=e.length,n.startLine=e.range.start.line,n.startColumn=e.range.start.character,n.endLine=e.range.end.line,n.endColumn=e.range.end.character),n}hydrate(e){const t=e.value,n=this.createHydrationContext(t);return"$cstNode"in t&&this.hydrateCstNode(t.$cstNode,n),{lexerErrors:e.lexerErrors,parserErrors:e.parserErrors,value:this.hydrateAstNode(t,n)}}createHydrationContext(e){const t=new Map,n=new Map;for(const i of Ue(e))t.set(i,{});let r;if(e.$cstNode)for(const i of T(e.$cstNode)){let e;"fullText"in i?(e=new Ic(i.fullText),r=e):"content"in i?e=new kc:"tokenType"in i&&(e=this.hydrateCstLeafNode(i)),e&&(n.set(i,e),e.root=r)}return{astNodes:t,cstNodes:n}}hydrateAstNode(e,t){const n=t.astNodes.get(e);n.$type=e.$type,n.$containerIndex=e.$containerIndex,n.$containerProperty=e.$containerProperty,e.$cstNode&&(n.$cstNode=t.cstNodes.get(e.$cstNode));for(const[s,o]of Object.entries(e))if(!s.startsWith("$"))if(Array.isArray(o)){const e=[];n[s]=e;for(const a of o)r(a)?e.push(this.setParent(this.hydrateAstNode(a,t),n)):i(a)?e.push(this.hydrateReference(a,n,s,t)):e.push(a)}else r(o)?n[s]=this.setParent(this.hydrateAstNode(o,t),n):i(o)?n[s]=this.hydrateReference(o,n,s,t):void 0!==o&&(n[s]=o);return n}setParent(e,t){return e.$container=t,e}hydrateReference(e,t,n,r){return this.linker.buildReference(t,n,r.cstNodes.get(e.$refNode),e.$refText)}hydrateCstNode(e,t,n=0){const r=t.cstNodes.get(e);if("number"==typeof e.grammarSource&&(r.grammarSource=this.getGrammarElement(e.grammarSource)),r.astNode=t.astNodes.get(e.astNode),a(r))for(const i of e.content){const e=this.hydrateCstNode(i,t,n++);r.content.push(e)}return r}hydrateCstLeafNode(e){const t=this.getTokenType(e.tokenType),n=e.offset,r=e.length,i=e.startLine,s=e.startColumn,o=e.endLine,a=e.endColumn,c=e.hidden;return new Ec(n,r,{start:{line:i,character:s},end:{line:o,character:a}},t,c)}getTokenType(e){return this.lexer.definition[e]}getGrammarElementId(e){return 0===this.grammarElementIdMap.size&&this.createGrammarElementIdMap(),this.grammarElementIdMap.get(e)}getGrammarElement(e){0===this.grammarElementIdMap.size&&this.createGrammarElementIdMap();const t=this.grammarElementIdMap.getKey(e);if(t)return t;throw new Error("Invalid grammar element id: "+e)}createGrammarElementIdMap(){let e=0;for(const n of Ue(this.grammar))t=n,Oe.isInstance(t,b)&&this.grammarElementIdMap.set(n,e++);var t}}function Eu(e){return{documentation:{CommentProvider:e=>new yu(e),DocumentationProvider:e=>new gu(e)},parser:{AsyncParser:e=>new Tu(e),GrammarConfig:e=>function(e){const t=[],n=e.Grammar;for(const i of n.rules)te(i)&&(r=i).hidden&&!vt(r).test(" ")&&st(vt(i))&&t.push(i.name);var r;return{multilineCommentRules:t,nameRegexp:k}}(e),LangiumParser:e=>Vc(e),CompletionParser:e=>function(e){const t=e.Grammar,n=e.parser.Lexer,r=new bc(e);return Mc(t,r,n.definition),r.finalize(),r}(e),ValueConverter:()=>new Wc,TokenBuilder:()=>new Hc,Lexer:e=>new Wl(e),ParserErrorMessageProvider:()=>new Oc},workspace:{AstNodeLocator:()=>new Kl,AstNodeDescriptionProvider:e=>new Fl(e),ReferenceDescriptionProvider:e=>new Gl(e)},references:{Linker:e=>new ml(e),NameProvider:()=>new gl,ScopeProvider:e=>new Nl(e),ScopeComputation:e=>new vl(e),References:e=>new yl(e)},serializer:{Hydrator:e=>new Ru(e),JsonSerializer:e=>new $l(e)},validation:{DocumentValidator:e=>new Ml(e),ValidationRegistry:e=>new Pl(e)},shared:()=>e.shared}}function ku(e){return{ServiceRegistry:()=>new wl,workspace:{LangiumDocuments:e=>new pl(e),LangiumDocumentFactory:e=>new fl(e),DocumentBuilder:e=>new jl(e),IndexManager:e=>new Vl(e),WorkspaceManager:e=>new Hl(e),FileSystemProvider:t=>e.fileSystemProvider(t),WorkspaceLock:()=>new vu,ConfigurationProvider:e=>new Bl(e)}}}function xu(e,t,n,r,i,s,o,a,c){return Su([e,t,n,r,i,s,o,a,c].reduce($u,{}))}!function(e){e.merge=(e,t)=>$u($u({},e),t)}(Au||(Au={}));const Iu=Symbol("isProxy");function Su(e,t){const n=new Proxy({},{deleteProperty:()=>!1,get:(r,i)=>Cu(r,i,e,t||n),getOwnPropertyDescriptor:(r,i)=>(Cu(r,i,e,t||n),Object.getOwnPropertyDescriptor(r,i)),has:(t,n)=>n in e,ownKeys:()=>[...Reflect.ownKeys(e),Iu]});return n[Iu]=!0,n}const Nu=Symbol();function Cu(e,t,n,r){if(t in e){if(e[t]instanceof Error)throw new Error("Construction failure. Please make sure that your dependencies are constructable.",{cause:e[t]});if(e[t]===Nu)throw new Error('Cycle detected. Please make "'+String(t)+'" lazy. See https://langium.org/docs/configuration-services/#resolving-cyclic-dependencies');return e[t]}if(t in n){const s=n[t];e[t]=Nu;try{e[t]="function"==typeof s?s(r):Su(s,r)}catch(i){throw e[t]=i instanceof Error?i:void 0,i}return e[t]}}function $u(e,t){if(t)for(const[n,r]of Object.entries(t))if(void 0!==r){const t=e[n];e[n]=null!==t&&null!==r&&"object"==typeof t&&"object"==typeof r?$u(t,r):r}return e}class wu{readFile(){throw new Error("No file system is available.")}async readDirectory(){return[]}}const Lu={fileSystemProvider:()=>new wu},Ou={Grammar:()=>{},LanguageMetaData:()=>({caseInsensitive:!1,fileExtensions:[".langium"],languageId:"langium"})},bu={AstReflection:()=>new Le};function _u(e){var t;const n=function(){const e=xu(ku(Lu),bu),t=xu(Eu({shared:e}),Ou);return e.ServiceRegistry.register(t),t}(),r=n.serializer.JsonSerializer.deserialize(e);return n.shared.workspace.LangiumDocumentFactory.fromModel(r,ll.parse(`memory://${null!==(t=r.name)&&void 0!==t?t:"grammar"}.langium`)),r}},72559:(e,t,n)=>{n.d(t,{A:()=>i});var r=n(61882);const i=function(e,t,n){for(var i=-1,s=e.length;++i{n.d(t,{A:()=>r});const r=function(e,t){return e{n.d(t,{A:()=>s});var r=n(6240),i=n(38446);const s=function(e,t){var n=-1,s=(0,i.A)(e)?Array(e.length):[];return(0,r.A)(e,(function(e,r,i){s[++n]=t(e,r,i)})),s}},99354:(e,t,n)=>{n.d(t,{A:()=>u});var r=n(66318),i=n(52851),s=n(7819),o=n(25353),a=n(23149),c=n(30901);const l=function(e,t,n,r){if(!(0,a.A)(e))return e;for(var l=-1,u=(t=(0,s.A)(t,e)).length,d=u-1,h=e;null!=h&&++l{n.d(t,{A:()=>i});var r=n(68675);const i=function(e){return(0,r.A)(e,4)}},23068:(e,t,n)=>{n.d(t,{A:()=>l});var r=n(24326),i=n(66984),s=n(6832),o=n(55615),a=Object.prototype,c=a.hasOwnProperty;const l=(0,r.A)((function(e,t){e=Object(e);var n=-1,r=t.length,l=r>2?t[2]:void 0;for(l&&(0,s.A)(t[0],t[1],l)&&(r=1);++n{n.d(t,{A:()=>u});var r=n(23958),i=n(38446),s=n(27422);const o=function(e){return function(t,n,o){var a=Object(t);if(!(0,i.A)(t)){var c=(0,r.A)(n,3);t=(0,s.A)(t),n=function(e){return c(a[e],e,a)}}var l=e(t,n,o);return l>-1?a[c?t[l]:l]:void 0}};var a=n(25707),c=n(18593),l=Math.max;const u=o((function(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var s=null==n?0:(0,c.A)(n);return s<0&&(s=l(i+s,0)),(0,a.A)(e,(0,r.A)(t,3),s)}))},34098:(e,t,n)=>{n.d(t,{A:()=>i});var r=n(13588);const i=function(e){return(null==e?0:e.length)?(0,r.A)(e,1):[]}},48585:(e,t,n)=>{n.d(t,{A:()=>o});var r=Object.prototype.hasOwnProperty;const i=function(e,t){return null!=e&&r.call(e,t)};var s=n(85054);const o=function(e,t){return null!=e&&(0,s.A)(e,t,i)}},9703:(e,t,n)=>{n.d(t,{A:()=>o});var r=n(88496),i=n(92049),s=n(53098);const o=function(e){return"string"==typeof e||!(0,i.A)(e)&&(0,s.A)(e)&&"[object String]"==(0,r.A)(e)}},26666:(e,t,n)=>{n.d(t,{A:()=>r});const r=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}},74722:(e,t,n)=>{n.d(t,{A:()=>a});var r=n(45572),i=n(23958),s=n(52568),o=n(92049);const a=function(e,t){return((0,o.A)(e)?r.A:s.A)(e,(0,i.A)(t,3))}},86452:(e,t,n)=>{n.d(t,{A:()=>o});var r=n(72559),i=n(36224),s=n(29008);const o=function(e){return e&&e.length?(0,r.A)(e,s.A,i.A):void 0}},74342:(e,t,n)=>{n.d(t,{A:()=>m});var r=/\s/;const i=function(e){for(var t=e.length;t--&&r.test(e.charAt(t)););return t};var s=/^\s+/;const o=function(e){return e?e.slice(0,i(e)+1).replace(s,""):e};var a=n(23149),c=n(61882),l=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,d=/^0o[0-7]+$/i,h=parseInt;const f=function(e){if("number"==typeof e)return e;if((0,c.A)(e))return NaN;if((0,a.A)(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=(0,a.A)(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=o(e);var n=u.test(e);return n||d.test(e)?h(e.slice(2),n?2:8):l.test(e)?NaN:+e};var p=1/0;const m=function(e){return e?(e=f(e))===p||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}},18593:(e,t,n)=>{n.d(t,{A:()=>i});var r=n(74342);const i=function(e){var t=(0,r.A)(e),n=t%1;return t==t?n?t-n:t:0}}}]); \ No newline at end of file diff --git a/assets/js/879e564b.252604a0.js b/assets/js/879e564b.252604a0.js new file mode 100644 index 000000000000..e036ad372d11 --- /dev/null +++ b/assets/js/879e564b.252604a0.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8789],{73538:(a,e,s)=>{s.r(e),s.d(e,{assets:()=>i,contentTitle:()=>r,default:()=>u,frontMatter:()=>d,metadata:()=>t,toc:()=>l});const t=JSON.parse('{"id":"general/dune-analytics/onboarding-status-and-key-dashboards","title":"Onboarding Status & Key Dashboards","description":"Polkadot & Parachains Onbording status","source":"@site/../docs/general/dune-analytics/onboarding-status-and-key-dashboards.md","sourceDirName":"general/dune-analytics","slug":"/general/onboarding-status-and-key-dashboards","permalink":"/docs/general/onboarding-status-and-key-dashboards","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/onboarding-status-and-key-dashboards.md","tags":[],"version":"current","lastUpdatedBy":"MK","lastUpdatedAt":1719215716000,"frontMatter":{"id":"onboarding-status-and-key-dashboards","title":"Onboarding Status & Key Dashboards","sidebar_label":"Onbording Status & Key Dashboards","description":"Polkadot & Parachains Onbording status","keywords":["dashboard","dune","sql","dunesql"],"slug":"../onboarding-status-and-key-dashboards"},"sidebar":"docs","previous":{"title":"Polkadot Ecosystem Overview","permalink":"/docs/general/polkadot-ecosystem-overview"},"next":{"title":"Polkadot Dashboards","permalink":"/docs/general/dune-analytics/polkadot-dashboards"}}');var n=s(74848),o=s(28453);const d={id:"onboarding-status-and-key-dashboards",title:"Onboarding Status & Key Dashboards",sidebar_label:"Onbording Status & Key Dashboards",description:"Polkadot & Parachains Onbording status",keywords:["dashboard","dune","sql","dunesql"],slug:"../onboarding-status-and-key-dashboards"},r="Onboarding Status & Key Dashboards",i={},l=[];function c(a){const e={a:"a",em:"em",h1:"h1",header:"header",p:"p",...(0,o.R)(),...a.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(e.header,{children:(0,n.jsx)(e.h1,{id:"onboarding-status--key-dashboards",children:"Onboarding Status & Key Dashboards"})}),"\n",(0,n.jsxs)(e.p,{children:["The table below displays the onboarding status of various parachains into Dune Analytics. To date,\nover 40 publicly accessible parachains and more than 30 key dashboards have been created by\nColorfulNotion to demonstrate the\n",(0,n.jsx)(e.a,{href:"https://polkadot.network/blog/polkadot-kusama-analytics-dune",children:"powerful Dune Integration"}),"."]}),"\n",(0,n.jsxs)(e.p,{children:[(0,n.jsx)(e.em,{children:"The data must flow"}),". As dashboard catalysts, we are looking forward to seeing more impressive\ndashboards developed by the community, leveraging this rich dataset to unlock new possibilities and\ninsights."]}),"\n",(0,n.jsx)("iframe",{src:"https://dune.com/embeds/3523887/6457482/",width:"100%",height:"950"})]})}function u(a={}){const{wrapper:e}={...(0,o.R)(),...a.components};return e?(0,n.jsx)(e,{...a,children:(0,n.jsx)(c,{...a})}):c(a)}},28453:(a,e,s)=>{s.d(e,{R:()=>d,x:()=>r});var t=s(96540);const n={},o=t.createContext(n);function d(a){const e=t.useContext(o);return t.useMemo((function(){return"function"==typeof a?a(e):{...e,...a}}),[e,a])}function r(a){let e;return e=a.disableParentContext?"function"==typeof a.components?a.components(n):a.components||n:d(a.components),t.createElement(o.Provider,{value:e},a.children)}}}]); \ No newline at end of file diff --git a/assets/js/879e564b.66ea23eb.js b/assets/js/879e564b.66ea23eb.js deleted file mode 100644 index f8ccb34a6d37..000000000000 --- a/assets/js/879e564b.66ea23eb.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8789],{70272:(a,e,s)=>{s.r(e),s.d(e,{assets:()=>i,contentTitle:()=>d,default:()=>u,frontMatter:()=>o,metadata:()=>r,toc:()=>l});var t=s(74848),n=s(28453);const o={id:"onboarding-status-and-key-dashboards",title:"Onboarding Status & Key Dashboards",sidebar_label:"Onbording Status & Key Dashboards",description:"Polkadot & Parachains Onbording status",keywords:["dashboard","dune","sql","dunesql"],slug:"../onboarding-status-and-key-dashboards"},d="Onboarding Status & Key Dashboards",r={id:"general/dune-analytics/onboarding-status-and-key-dashboards",title:"Onboarding Status & Key Dashboards",description:"Polkadot & Parachains Onbording status",source:"@site/../docs/general/dune-analytics/onboarding-status-and-key-dashboards.md",sourceDirName:"general/dune-analytics",slug:"/general/onboarding-status-and-key-dashboards",permalink:"/docs/general/onboarding-status-and-key-dashboards",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/onboarding-status-and-key-dashboards.md",tags:[],version:"current",lastUpdatedBy:"MK",lastUpdatedAt:1719215716e3,frontMatter:{id:"onboarding-status-and-key-dashboards",title:"Onboarding Status & Key Dashboards",sidebar_label:"Onbording Status & Key Dashboards",description:"Polkadot & Parachains Onbording status",keywords:["dashboard","dune","sql","dunesql"],slug:"../onboarding-status-and-key-dashboards"},sidebar:"docs",previous:{title:"Polkadot Ecosystem Overview",permalink:"/docs/general/polkadot-ecosystem-overview"},next:{title:"Polkadot Dashboards",permalink:"/docs/general/dune-analytics/polkadot-dashboards"}},i={},l=[];function c(a){const e={a:"a",em:"em",h1:"h1",header:"header",p:"p",...(0,n.R)(),...a.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(e.header,{children:(0,t.jsx)(e.h1,{id:"onboarding-status--key-dashboards",children:"Onboarding Status & Key Dashboards"})}),"\n",(0,t.jsxs)(e.p,{children:["The table below displays the onboarding status of various parachains into Dune Analytics. To date,\nover 40 publicly accessible parachains and more than 30 key dashboards have been created by\nColorfulNotion to demonstrate the\n",(0,t.jsx)(e.a,{href:"https://polkadot.network/blog/polkadot-kusama-analytics-dune",children:"powerful Dune Integration"}),"."]}),"\n",(0,t.jsxs)(e.p,{children:[(0,t.jsx)(e.em,{children:"The data must flow"}),". As dashboard catalysts, we are looking forward to seeing more impressive\ndashboards developed by the community, leveraging this rich dataset to unlock new possibilities and\ninsights."]}),"\n",(0,t.jsx)("iframe",{src:"https://dune.com/embeds/3523887/6457482/",width:"100%",height:"950"})]})}function u(a={}){const{wrapper:e}={...(0,n.R)(),...a.components};return e?(0,t.jsx)(e,{...a,children:(0,t.jsx)(c,{...a})}):c(a)}},28453:(a,e,s)=>{s.d(e,{R:()=>d,x:()=>r});var t=s(96540);const n={},o=t.createContext(n);function d(a){const e=t.useContext(o);return t.useMemo((function(){return"function"==typeof a?a(e):{...e,...a}}),[e,a])}function r(a){let e;return e=a.disableParentContext?"function"==typeof a.components?a.components(n):a.components||n:d(a.components),t.createElement(o.Provider,{value:e},a.children)}}}]); \ No newline at end of file diff --git a/assets/js/8846.319ad8c0.js b/assets/js/8846.319ad8c0.js deleted file mode 100644 index 3882cb9b95da..000000000000 --- a/assets/js/8846.319ad8c0.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8846],{48846:(t,e,i)=>{i.d(e,{diagram:()=>d});var n=i(86079),s=i(26312),r=(i(74353),i(16750),i(42838),function(){var t=function(t,e,i,n){for(i=i||{},n=t.length;n--;i[t[n]]=e);return i},e=[1,3],i=[1,4],n=[1,5],s=[1,6],r=[1,10,12,14,16,18,19,20,21,22],l=[2,4],a=[1,5,10,12,14,16,18,19,20,21,22],c=[20,21,22],o=[2,7],h=[1,12],u=[1,13],y=[1,14],p=[1,15],d=[1,16],g=[1,17],f={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,PIE:5,document:6,showData:7,line:8,statement:9,txt:10,value:11,title:12,title_value:13,acc_title:14,acc_title_value:15,acc_descr:16,acc_descr_value:17,acc_descr_multiline_value:18,section:19,NEWLINE:20,";":21,EOF:22,$accept:0,$end:1},terminals_:{2:"error",5:"PIE",7:"showData",10:"txt",11:"value",12:"title",13:"title_value",14:"acc_title",15:"acc_title_value",16:"acc_descr",17:"acc_descr_value",18:"acc_descr_multiline_value",19:"section",20:"NEWLINE",21:";",22:"EOF"},productions_:[0,[3,2],[3,2],[3,3],[6,0],[6,2],[8,2],[9,0],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[4,1],[4,1],[4,1]],performAction:function(t,e,i,n,s,r,l){var a=r.length-1;switch(s){case 3:n.setShowData(!0);break;case 6:this.$=r[a-1];break;case 8:n.addSection(r[a-1],n.cleanupValue(r[a]));break;case 9:this.$=r[a].trim(),n.setDiagramTitle(this.$);break;case 10:this.$=r[a].trim(),n.setAccTitle(this.$);break;case 11:case 12:this.$=r[a].trim(),n.setAccDescription(this.$);break;case 13:n.addSection(r[a].substr(8)),this.$=r[a].substr(8)}},table:[{3:1,4:2,5:e,20:i,21:n,22:s},{1:[3]},{3:7,4:2,5:e,20:i,21:n,22:s},t(r,l,{6:8,7:[1,9]}),t(a,[2,14]),t(a,[2,15]),t(a,[2,16]),{1:[2,1]},t(c,o,{8:10,9:11,1:[2,2],10:h,12:u,14:y,16:p,18:d,19:g}),t(r,l,{6:18}),t(r,[2,5]),{4:19,20:i,21:n,22:s},{11:[1,20]},{13:[1,21]},{15:[1,22]},{17:[1,23]},t(c,[2,12]),t(c,[2,13]),t(c,o,{8:10,9:11,1:[2,3],10:h,12:u,14:y,16:p,18:d,19:g}),t(r,[2,6]),t(c,[2,8]),t(c,[2,9]),t(c,[2,10]),t(c,[2,11])],defaultActions:{7:[2,1]},parseError:function(t,e){if(!e.recoverable){var i=new Error(t);throw i.hash=e,i}this.trace(t)},parse:function(t){var e=this,i=[0],n=[],s=[null],r=[],l=this.table,a="",c=0,o=0,h=r.slice.call(arguments,1),u=Object.create(this.lexer),y={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(y.yy[p]=this.yy[p]);u.setInput(t,y.yy),y.yy.lexer=u,y.yy.parser=this,void 0===u.yylloc&&(u.yylloc={});var d=u.yylloc;r.push(d);var g=u.options&&u.options.ranges;"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var f,_,m,k,b,x,v,S,w,$={};;){if(_=i[i.length-1],this.defaultActions[_]?m=this.defaultActions[_]:(null==f&&(w=void 0,"number"!=typeof(w=n.pop()||u.lex()||1)&&(w instanceof Array&&(w=(n=w).pop()),w=e.symbols_[w]||w),f=w),m=l[_]&&l[_][f]),void 0===m||!m.length||!m[0]){var E="";for(b in S=[],l[_])this.terminals_[b]&&b>2&&S.push("'"+this.terminals_[b]+"'");E=u.showPosition?"Parse error on line "+(c+1)+":\n"+u.showPosition()+"\nExpecting "+S.join(", ")+", got '"+(this.terminals_[f]||f)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==f?"end of input":"'"+(this.terminals_[f]||f)+"'"),this.parseError(E,{text:u.match,token:this.terminals_[f]||f,line:u.yylineno,loc:d,expected:S})}if(m[0]instanceof Array&&m.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_+", token: "+f);switch(m[0]){case 1:i.push(f),s.push(u.yytext),r.push(u.yylloc),i.push(m[1]),f=null,o=u.yyleng,a=u.yytext,c=u.yylineno,d=u.yylloc;break;case 2:if(x=this.productions_[m[1]][1],$.$=s[s.length-x],$._$={first_line:r[r.length-(x||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(x||1)].first_column,last_column:r[r.length-1].last_column},g&&($._$.range=[r[r.length-(x||1)].range[0],r[r.length-1].range[1]]),void 0!==(k=this.performAction.apply($,[a,o,c,y.yy,m[1],s,r].concat(h))))return k;x&&(i=i.slice(0,-1*x*2),s=s.slice(0,-1*x),r=r.slice(0,-1*x)),i.push(this.productions_[m[1]][0]),s.push($.$),r.push($._$),v=l[i[i.length-2]][i[i.length-1]],i.push(v);break;case 3:return!0}}return!0}},_={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,i=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),i.length-1&&(this.yylineno-=i.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:i?(i.length===n.length?this.yylloc.first_column:0)+n[n.length-i.length].length-i[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var i,n,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],i=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack){for(var r in s)this[r]=s[r];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,i,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),r=0;re[0].length)){if(e=i,n=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(i,s[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,i,n){switch(i){case 0:case 1:case 3:case 4:break;case 2:return 20;case 5:return this.begin("title"),12;case 6:return this.popState(),"title_value";case 7:return this.begin("acc_title"),14;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),16;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:case 15:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:this.begin("string");break;case 16:return"txt";case 17:return 5;case 18:return 7;case 19:return"value";case 20:return 22}},rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:[\s]+)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:pie\b)/i,/^(?:showData\b)/i,/^(?::[\s]*[\d]+(?:\.[\d]+)?)/i,/^(?:$)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[6],inclusive:!1},string:{rules:[15,16],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,7,9,11,14,17,18,19,20],inclusive:!0}}};function m(){this.yy={}}return f.lexer=_,m.prototype=f,f.Parser=m,new m}());r.parser=r;const l=r,a=n.B.pie,c={},o=!1;let h=c,u=o;const y=structuredClone(a),p={getConfig:()=>structuredClone(y),clear:()=>{h=structuredClone(c),u=o,(0,n.v)()},setDiagramTitle:n.q,getDiagramTitle:n.t,setAccTitle:n.s,getAccTitle:n.g,setAccDescription:n.b,getAccDescription:n.a,addSection:(t,e)=>{t=(0,n.d)(t,(0,n.c)()),void 0===h[t]&&(h[t]=e,n.l.debug(`added new section: ${t}, with value: ${e}`))},getSections:()=>h,cleanupValue:t=>(":"===t.substring(0,1)&&(t=t.substring(1).trim()),Number(t.trim())),setShowData:t=>{u=t},getShowData:()=>u},d={parser:l,db:p,renderer:{draw:(t,e,i,r)=>{n.l.debug("rendering pie chart\n"+t);const l=r.db,a=(0,n.c)(),c=(0,n.C)(l.getConfig(),a.pie),o=18,h=450,u=h,y=(0,n.A)(e),p=y.append("g"),d=l.getSections();p.attr("transform","translate(225,225)");const{themeVariables:g}=a;let[f]=(0,n.D)(g.pieOuterStrokeWidth);f??(f=2);const _=c.textPosition,m=Math.min(u,h)/2-40,k=(0,s.JLW)().innerRadius(0).outerRadius(m),b=(0,s.JLW)().innerRadius(m*_).outerRadius(m*_);p.append("circle").attr("cx",0).attr("cy",0).attr("r",m+f/2).attr("class","pieOuterCircle");const x=(t=>{const e=Object.entries(t).map((t=>({label:t[0],value:t[1]}))).sort(((t,e)=>e.value-t.value));return(0,s.rLf)().value((t=>t.value))(e)})(d),v=[g.pie1,g.pie2,g.pie3,g.pie4,g.pie5,g.pie6,g.pie7,g.pie8,g.pie9,g.pie10,g.pie11,g.pie12],S=(0,s.UMr)(v);p.selectAll("mySlices").data(x).enter().append("path").attr("d",k).attr("fill",(t=>S(t.data.label))).attr("class","pieCircle");let w=0;Object.keys(d).forEach((t=>{w+=d[t]})),p.selectAll("mySlices").data(x).enter().append("text").text((t=>(t.data.value/w*100).toFixed(0)+"%")).attr("transform",(t=>"translate("+b.centroid(t)+")")).style("text-anchor","middle").attr("class","slice"),p.append("text").text(l.getDiagramTitle()).attr("x",0).attr("y",-200).attr("class","pieTitleText");const $=p.selectAll(".legend").data(S.domain()).enter().append("g").attr("class","legend").attr("transform",((t,e)=>"translate(216,"+(22*e-22*S.domain().length/2)+")"));$.append("rect").attr("width",o).attr("height",o).style("fill",S).style("stroke",S),$.data(x).append("text").attr("x",22).attr("y",14).text((t=>{const{label:e,value:i}=t.data;return l.getShowData()?`${e} [${i}]`:e}));const E=512+Math.max(...$.selectAll("text").nodes().map((t=>(null==t?void 0:t.getBoundingClientRect().width)??0)));y.attr("viewBox",`0 0 ${E} 450`),(0,n.i)(y,h,E,c.useMaxWidth)}},styles:t=>`\n .pieCircle{\n stroke: ${t.pieStrokeColor};\n stroke-width : ${t.pieStrokeWidth};\n opacity : ${t.pieOpacity};\n }\n .pieOuterCircle{\n stroke: ${t.pieOuterStrokeColor};\n stroke-width: ${t.pieOuterStrokeWidth};\n fill: none;\n }\n .pieTitleText {\n text-anchor: middle;\n font-size: ${t.pieTitleTextSize};\n fill: ${t.pieTitleTextColor};\n font-family: ${t.fontFamily};\n }\n .slice {\n font-family: ${t.fontFamily};\n fill: ${t.pieSectionTextColor};\n font-size:${t.pieSectionTextSize};\n // fill: white;\n }\n .legend text {\n fill: ${t.pieLegendTextColor};\n font-family: ${t.fontFamily};\n font-size: ${t.pieLegendTextSize};\n }\n`}}}]); \ No newline at end of file diff --git a/assets/js/890.4f267731.js b/assets/js/890.4f267731.js new file mode 100644 index 000000000000..46c57ca450f3 --- /dev/null +++ b/assets/js/890.4f267731.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[890],{10890:(e,s,c)=>{c.d(s,{createInfoServices:()=>a.v});var a=c(97021);c(19369)}}]); \ No newline at end of file diff --git a/assets/js/8989.9ca08b70.js b/assets/js/8989.9ca08b70.js deleted file mode 100644 index bec7b488f23e..000000000000 --- a/assets/js/8989.9ca08b70.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk=self.webpackChunk||[]).push([[8989],{97375:function(t){t.exports=function(){"use strict";return function(t,e){var n=e.prototype,i=n.format;n.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return i.bind(this)(t);var s=this.$utils(),r=(t||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(t){switch(t){case"Q":return Math.ceil((e.$M+1)/3);case"Do":return n.ordinal(e.$D);case"gggg":return e.weekYear();case"GGGG":return e.isoWeekYear();case"wo":return n.ordinal(e.week(),"W");case"w":case"ww":return s.s(e.week(),"w"===t?1:2,"0");case"W":case"WW":return s.s(e.isoWeek(),"W"===t?1:2,"0");case"k":case"kk":return s.s(String(0===e.$H?24:e.$H),"k"===t?1:2,"0");case"X":return Math.floor(e.$d.getTime()/1e3);case"x":return e.$d.getTime();case"z":return"["+e.offsetName()+"]";case"zzz":return"["+e.offsetName("long")+"]";default:return t}}));return i.bind(this)(r)}}}()},90445:function(t){t.exports=function(){"use strict";var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},e=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,i=/\d\d/,s=/\d\d?/,r=/\d*[^-_:/,()\s\d]+/,a={},o=function(t){return(t=+t)+(t>68?1900:2e3)},c=function(t){return function(e){this[t]=+e}},l=[/[+-]\d\d:?(\d\d)?|Z/,function(t){(this.zone||(this.zone={})).offset=function(t){if(!t)return 0;if("Z"===t)return 0;var e=t.match(/([+-]|\d\d)/g),n=60*e[1]+(+e[2]||0);return 0===n?0:"+"===e[0]?-n:n}(t)}],d=function(t){var e=a[t];return e&&(e.indexOf?e:e.s.concat(e.f))},u=function(t,e){var n,i=a.meridiem;if(i){for(var s=1;s<=24;s+=1)if(t.indexOf(i(s,0,e))>-1){n=s>12;break}}else n=t===(e?"pm":"PM");return n},h={A:[r,function(t){this.afternoon=u(t,!1)}],a:[r,function(t){this.afternoon=u(t,!0)}],Q:[n,function(t){this.month=3*(t-1)+1}],S:[n,function(t){this.milliseconds=100*+t}],SS:[i,function(t){this.milliseconds=10*+t}],SSS:[/\d{3}/,function(t){this.milliseconds=+t}],s:[s,c("seconds")],ss:[s,c("seconds")],m:[s,c("minutes")],mm:[s,c("minutes")],H:[s,c("hours")],h:[s,c("hours")],HH:[s,c("hours")],hh:[s,c("hours")],D:[s,c("day")],DD:[i,c("day")],Do:[r,function(t){var e=a.ordinal,n=t.match(/\d+/);if(this.day=n[0],e)for(var i=1;i<=31;i+=1)e(i).replace(/\[|\]/g,"")===t&&(this.day=i)}],w:[s,c("week")],ww:[i,c("week")],M:[s,c("month")],MM:[i,c("month")],MMM:[r,function(t){var e=d("months"),n=(d("monthsShort")||e.map((function(t){return t.slice(0,3)}))).indexOf(t)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[r,function(t){var e=d("months").indexOf(t)+1;if(e<1)throw new Error;this.month=e%12||e}],Y:[/[+-]?\d+/,c("year")],YY:[i,function(t){this.year=o(t)}],YYYY:[/\d{4}/,c("year")],Z:l,ZZ:l};function f(n){var i,s;i=n,s=a&&a.formats;for(var r=(n=i.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(e,n,i){var r=i&&i.toUpperCase();return n||s[i]||t[i]||s[r].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(t,e,n){return e||n.slice(1)}))}))).match(e),o=r.length,c=0;c-1)return new Date(("X"===e?1e3:1)*t);var s=f(e)(t),r=s.year,a=s.month,o=s.day,c=s.hours,l=s.minutes,d=s.seconds,u=s.milliseconds,h=s.zone,y=s.week,m=new Date,k=o||(r||a?1:m.getDate()),p=r||m.getFullYear(),g=0;r&&!a||(g=a>0?a-1:m.getMonth());var b,v=c||0,T=l||0,x=d||0,w=u||0;return h?new Date(Date.UTC(p,g,k,v,T,x,w+60*h.offset*1e3)):n?new Date(Date.UTC(p,g,k,v,T,x,w)):(b=new Date(p,g,k,v,T,x,w),y&&(b=i(b).week(y).toDate()),b)}catch(t){return new Date("")}}(e,o,i,n),this.init(),u&&!0!==u&&(this.$L=this.locale(u).$L),d&&e!=this.format(o)&&(this.$d=new Date("")),a={}}else if(o instanceof Array)for(var h=o.length,y=1;y<=h;y+=1){r[1]=o[y-1];var m=n.apply(this,r);if(m.isValid()){this.$d=m.$d,this.$L=m.$L,this.init();break}y===h&&(this.$d=new Date(""))}else s.call(this,t)}}}()},68313:function(t){t.exports=function(){"use strict";var t="day";return function(e,n,i){var s=function(e){return e.add(4-e.isoWeekday(),t)},r=n.prototype;r.isoWeekYear=function(){return s(this).year()},r.isoWeek=function(e){if(!this.$utils().u(e))return this.add(7*(e-this.isoWeek()),t);var n,r,a,o=s(this),c=(n=this.isoWeekYear(),a=4-(r=(this.$u?i.utc:i)().year(n).startOf("year")).isoWeekday(),r.isoWeekday()>4&&(a+=7),r.add(a,t));return o.diff(c,"week")+1},r.isoWeekday=function(t){return this.$utils().u(t)?this.day()||7:this.day(this.day()%7?t:t-7)};var a=r.startOf;r.startOf=function(t,e){var n=this.$utils(),i=!!n.u(e)||e;return"isoweek"===n.p(t)?i?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):a.bind(this)(t,e)}}}()},8989:(t,e,n)=>{"use strict";n.d(e,{diagram:()=>q});var i=n(16750),s=n(74353),r=n(68313),a=n(90445),o=n(97375),c=n(86079),l=n(26312),d=(n(42838),function(){var t=function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n},e=[6,8,10,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,30,32,33,35,37],n=[1,25],i=[1,26],s=[1,27],r=[1,28],a=[1,29],o=[1,30],c=[1,31],l=[1,9],d=[1,10],u=[1,11],h=[1,12],f=[1,13],y=[1,14],m=[1,15],k=[1,16],p=[1,18],g=[1,19],b=[1,20],v=[1,21],T=[1,22],x=[1,24],w=[1,32],_={trace:function(){},yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,dateFormat:19,inclusiveEndDates:20,topAxis:21,axisFormat:22,tickInterval:23,excludes:24,includes:25,todayMarker:26,title:27,acc_title:28,acc_title_value:29,acc_descr:30,acc_descr_value:31,acc_descr_multiline_value:32,section:33,clickStatement:34,taskTxt:35,taskData:36,click:37,callbackname:38,callbackargs:39,href:40,clickStatementDebug:41,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",19:"dateFormat",20:"inclusiveEndDates",21:"topAxis",22:"axisFormat",23:"tickInterval",24:"excludes",25:"includes",26:"todayMarker",27:"title",28:"acc_title",29:"acc_title_value",30:"acc_descr",31:"acc_descr_value",32:"acc_descr_multiline_value",33:"section",35:"taskTxt",36:"taskData",37:"click",38:"callbackname",39:"callbackargs",40:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[34,2],[34,3],[34,3],[34,4],[34,3],[34,4],[34,2],[41,2],[41,3],[41,3],[41,4],[41,3],[41,4],[41,2]],performAction:function(t,e,n,i,s,r,a){var o=r.length-1;switch(s){case 1:return r[o-1];case 2:case 6:case 7:this.$=[];break;case 3:r[o-1].push(r[o]),this.$=r[o-1];break;case 4:case 5:this.$=r[o];break;case 8:i.setWeekday("monday");break;case 9:i.setWeekday("tuesday");break;case 10:i.setWeekday("wednesday");break;case 11:i.setWeekday("thursday");break;case 12:i.setWeekday("friday");break;case 13:i.setWeekday("saturday");break;case 14:i.setWeekday("sunday");break;case 15:i.setDateFormat(r[o].substr(11)),this.$=r[o].substr(11);break;case 16:i.enableInclusiveEndDates(),this.$=r[o].substr(18);break;case 17:i.TopAxis(),this.$=r[o].substr(8);break;case 18:i.setAxisFormat(r[o].substr(11)),this.$=r[o].substr(11);break;case 19:i.setTickInterval(r[o].substr(13)),this.$=r[o].substr(13);break;case 20:i.setExcludes(r[o].substr(9)),this.$=r[o].substr(9);break;case 21:i.setIncludes(r[o].substr(9)),this.$=r[o].substr(9);break;case 22:i.setTodayMarker(r[o].substr(12)),this.$=r[o].substr(12);break;case 24:i.setDiagramTitle(r[o].substr(6)),this.$=r[o].substr(6);break;case 25:this.$=r[o].trim(),i.setAccTitle(this.$);break;case 26:case 27:this.$=r[o].trim(),i.setAccDescription(this.$);break;case 28:i.addSection(r[o].substr(8)),this.$=r[o].substr(8);break;case 30:i.addTask(r[o-1],r[o]),this.$="task";break;case 31:this.$=r[o-1],i.setClickEvent(r[o-1],r[o],null);break;case 32:this.$=r[o-2],i.setClickEvent(r[o-2],r[o-1],r[o]);break;case 33:this.$=r[o-2],i.setClickEvent(r[o-2],r[o-1],null),i.setLink(r[o-2],r[o]);break;case 34:this.$=r[o-3],i.setClickEvent(r[o-3],r[o-2],r[o-1]),i.setLink(r[o-3],r[o]);break;case 35:this.$=r[o-2],i.setClickEvent(r[o-2],r[o],null),i.setLink(r[o-2],r[o-1]);break;case 36:this.$=r[o-3],i.setClickEvent(r[o-3],r[o-1],r[o]),i.setLink(r[o-3],r[o-2]);break;case 37:this.$=r[o-1],i.setLink(r[o-1],r[o]);break;case 38:case 44:this.$=r[o-1]+" "+r[o];break;case 39:case 40:case 42:this.$=r[o-2]+" "+r[o-1]+" "+r[o];break;case 41:case 43:this.$=r[o-3]+" "+r[o-2]+" "+r[o-1]+" "+r[o]}},table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:n,13:i,14:s,15:r,16:a,17:o,18:c,19:l,20:d,21:u,22:h,23:f,24:y,25:m,26:k,27:p,28:g,30:b,32:v,33:T,34:23,35:x,37:w},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:33,11:17,12:n,13:i,14:s,15:r,16:a,17:o,18:c,19:l,20:d,21:u,22:h,23:f,24:y,25:m,26:k,27:p,28:g,30:b,32:v,33:T,34:23,35:x,37:w},t(e,[2,5]),t(e,[2,6]),t(e,[2,15]),t(e,[2,16]),t(e,[2,17]),t(e,[2,18]),t(e,[2,19]),t(e,[2,20]),t(e,[2,21]),t(e,[2,22]),t(e,[2,23]),t(e,[2,24]),{29:[1,34]},{31:[1,35]},t(e,[2,27]),t(e,[2,28]),t(e,[2,29]),{36:[1,36]},t(e,[2,8]),t(e,[2,9]),t(e,[2,10]),t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),{38:[1,37],40:[1,38]},t(e,[2,4]),t(e,[2,25]),t(e,[2,26]),t(e,[2,30]),t(e,[2,31],{39:[1,39],40:[1,40]}),t(e,[2,37],{38:[1,41]}),t(e,[2,32],{40:[1,42]}),t(e,[2,33]),t(e,[2,35],{39:[1,43]}),t(e,[2,34]),t(e,[2,36])],defaultActions:{},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],i=[],s=[null],r=[],a=this.table,o="",c=0,l=0,d=r.slice.call(arguments,1),u=Object.create(this.lexer),h={yy:{}};for(var f in this.yy)Object.prototype.hasOwnProperty.call(this.yy,f)&&(h.yy[f]=this.yy[f]);u.setInput(t,h.yy),h.yy.lexer=u,h.yy.parser=this,void 0===u.yylloc&&(u.yylloc={});var y=u.yylloc;r.push(y);var m=u.options&&u.options.ranges;"function"==typeof h.yy.parseError?this.parseError=h.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var k,p,g,b,v,T,x,w,_,$={};;){if(p=n[n.length-1],this.defaultActions[p]?g=this.defaultActions[p]:(null==k&&(_=void 0,"number"!=typeof(_=i.pop()||u.lex()||1)&&(_ instanceof Array&&(_=(i=_).pop()),_=e.symbols_[_]||_),k=_),g=a[p]&&a[p][k]),void 0===g||!g.length||!g[0]){var D="";for(v in w=[],a[p])this.terminals_[v]&&v>2&&w.push("'"+this.terminals_[v]+"'");D=u.showPosition?"Parse error on line "+(c+1)+":\n"+u.showPosition()+"\nExpecting "+w.join(", ")+", got '"+(this.terminals_[k]||k)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==k?"end of input":"'"+(this.terminals_[k]||k)+"'"),this.parseError(D,{text:u.match,token:this.terminals_[k]||k,line:u.yylineno,loc:y,expected:w})}if(g[0]instanceof Array&&g.length>1)throw new Error("Parse Error: multiple actions possible at state: "+p+", token: "+k);switch(g[0]){case 1:n.push(k),s.push(u.yytext),r.push(u.yylloc),n.push(g[1]),k=null,l=u.yyleng,o=u.yytext,c=u.yylineno,y=u.yylloc;break;case 2:if(T=this.productions_[g[1]][1],$.$=s[s.length-T],$._$={first_line:r[r.length-(T||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(T||1)].first_column,last_column:r[r.length-1].last_column},m&&($._$.range=[r[r.length-(T||1)].range[0],r[r.length-1].range[1]]),void 0!==(b=this.performAction.apply($,[o,l,c,h.yy,g[1],s,r].concat(d))))return b;T&&(n=n.slice(0,-1*T*2),s=s.slice(0,-1*T),r=r.slice(0,-1*T)),n.push(this.productions_[g[1]][0]),s.push($.$),r.push($._$),x=a[n[n.length-2]][n[n.length-1]],n.push(x);break;case 3:return!0}}return!0}},$={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,i,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var r in s)this[r]=s[r];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),r=0;re[0].length)){if(e=n,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,s[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,i){switch(n){case 0:return this.begin("open_directive"),"open_directive";case 1:return this.begin("acc_title"),28;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),30;case 4:return this.popState(),"acc_descr_value";case 5:this.begin("acc_descr_multiline");break;case 6:case 15:case 18:case 21:case 24:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:case 9:case 10:case 12:case 13:break;case 11:return 10;case 14:this.begin("href");break;case 16:return 40;case 17:this.begin("callbackname");break;case 19:this.popState(),this.begin("callbackargs");break;case 20:return 38;case 22:return 39;case 23:this.begin("click");break;case 25:return 37;case 26:return 4;case 27:return 19;case 28:return 20;case 29:return 21;case 30:return 22;case 31:return 23;case 32:return 25;case 33:return 24;case 34:return 26;case 35:return 12;case 36:return 13;case 37:return 14;case 38:return 15;case 39:return 16;case 40:return 17;case 41:return 18;case 42:return"date";case 43:return 27;case 44:return"accDescription";case 45:return 33;case 46:return 35;case 47:return 36;case 48:return":";case 49:return 6;case 50:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:tickInterval\s[^#\n;]+)/i,/^(?:includes\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:weekday\s+monday\b)/i,/^(?:weekday\s+tuesday\b)/i,/^(?:weekday\s+wednesday\b)/i,/^(?:weekday\s+thursday\b)/i,/^(?:weekday\s+friday\b)/i,/^(?:weekday\s+saturday\b)/i,/^(?:weekday\s+sunday\b)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accDescription\s[^#\n;]+)/i,/^(?:section\s[^\n]+)/i,/^(?:[^:\n]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},callbackargs:{rules:[21,22],inclusive:!1},callbackname:{rules:[18,19,20],inclusive:!1},href:{rules:[15,16],inclusive:!1},click:{rules:[24,25],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,17,23,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50],inclusive:!0}}};function D(){this.yy={}}return _.lexer=$,D.prototype=_,_.Parser=D,new D}());d.parser=d;const u=d;s.extend(r),s.extend(a),s.extend(o);let h,f="",y="",m="",k=[],p=[],g={},b=[],v=[],T="",x="";const w=["active","done","crit","milestone"];let _=[],$=!1,D=!1,C="sunday",S=0;const E=function(t,e,n,i){return!i.includes(t.format(e.trim()))&&(!!(t.isoWeekday()>=6&&n.includes("weekends"))||(!!n.includes(t.format("dddd").toLowerCase())||n.includes(t.format(e.trim()))))},A=function(t,e,n,i){if(!n.length||t.manualEndTime)return;let r,a;r=t.startTime instanceof Date?s(t.startTime):s(t.startTime,e,!0),r=r.add(1,"d"),a=t.endTime instanceof Date?s(t.endTime):s(t.endTime,e,!0);const[o,c]=M(r,a,e,n,i);t.endTime=o.toDate(),t.renderEndTime=c},M=function(t,e,n,i,s){let r=!1,a=null;for(;t<=e;)r||(a=e.toDate()),r=E(t,n,i,s),r&&(e=e.add(1,"d")),t=t.add(1,"d");return[e,a]},Y=function(t,e,n){n=n.trim();const i=/^after\s+(?[\d\w- ]+)/.exec(n);if(null!==i){let t=null;for(const n of i.groups.ids.split(" ")){let e=N(n);void 0!==e&&(!t||e.endTime>t.endTime)&&(t=e)}if(t)return t.endTime;const e=new Date;return e.setHours(0,0,0,0),e}let r=s(n,e.trim(),!0);if(r.isValid())return r.toDate();{c.l.debug("Invalid date:"+n),c.l.debug("With date format:"+e.trim());const t=new Date(n);if(void 0===t||isNaN(t.getTime())||t.getFullYear()<-1e4||t.getFullYear()>1e4)throw new Error("Invalid date:"+n);return t}},L=function(t){const e=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(t.trim());return null!==e?[Number.parseFloat(e[1]),e[2]]:[NaN,"ms"]},I=function(t,e,n,i=!1){n=n.trim();const r=/^until\s+(?[\d\w- ]+)/.exec(n);if(null!==r){let t=null;for(const n of r.groups.ids.split(" ")){let e=N(n);void 0!==e&&(!t||e.startTime(0,c.c)().gantt,clear:function(){b=[],v=[],T="",_=[],O=0,F=void 0,P=void 0,B=[],f="",y="",x="",h=void 0,m="",k=[],p=[],$=!1,D=!1,S=0,g={},(0,c.v)(),C="sunday"},setDateFormat:function(t){f=t},getDateFormat:function(){return f},enableInclusiveEndDates:function(){$=!0},endDatesAreInclusive:function(){return $},enableTopAxis:function(){D=!0},topAxisEnabled:function(){return D},setAxisFormat:function(t){y=t},getAxisFormat:function(){return y},setTickInterval:function(t){h=t},getTickInterval:function(){return h},setTodayMarker:function(t){m=t},getTodayMarker:function(){return m},setAccTitle:c.s,getAccTitle:c.g,setDiagramTitle:c.q,getDiagramTitle:c.t,setDisplayMode:function(t){x=t},getDisplayMode:function(){return x},setAccDescription:c.b,getAccDescription:c.a,addSection:function(t){T=t,b.push(t)},getSections:function(){return b},getTasks:function(){let t=G();let e=0;for(;!t&&e<10;)t=G(),e++;return v=B,v},addTask:function(t,e){const n={section:T,type:T,processed:!1,manualEndTime:!1,renderEndTime:null,raw:{data:e},task:t,classes:[]},i=function(t,e){let n;n=":"===e.substr(0,1)?e.substr(1,e.length):e;const i=n.split(","),s={};R(i,s,w);for(let r=0;r{c.u.runFunc(e,...i)}))}(t,e,n)})),H(t,"clickable")},setLink:function(t,e){let n=e;"loose"!==(0,c.c)().securityLevel&&(n=(0,i.Jf)(e)),t.split(",").forEach((function(t){void 0!==N(t)&&(j(t,(()=>{window.open(n,"_self")})),g[t]=n)})),H(t,"clickable")},getLinks:function(){return g},bindFunctions:function(t){_.forEach((function(e){e(t)}))},parseDuration:L,isInvalidDate:E,setWeekday:function(t){C=t},getWeekday:function(){return C}};function R(t,e,n){let i=!0;for(;i;)i=!1,n.forEach((function(n){const s=new RegExp("^\\s*"+n+"\\s*$");t[0].match(s)&&(e[n]=!0,t.shift(1),i=!0)}))}const V={monday:l.ABi,tuesday:l.PGu,wednesday:l.GuW,thursday:l.Mol,friday:l.TUC,saturday:l.rGn,sunday:l.YPH},Z=(t,e)=>{let n=[...t].map((()=>-1/0)),i=[...t].sort(((t,e)=>t.startTime-e.startTime||t.order-e.order)),s=0;for(const r of i)for(let t=0;t=n[t]){n[t]=r.endTime,r.order=t+e,t>s&&(s=t);break}return s};let X;const q={parser:u,db:U,renderer:{setConf:function(){c.l.debug("Something is calling, setConf, remove the call")},draw:function(t,e,n,i){const r=(0,c.c)().gantt,a=(0,c.c)().securityLevel;let o;"sandbox"===a&&(o=(0,l.Ltv)("#i"+e));const d="sandbox"===a?(0,l.Ltv)(o.nodes()[0].contentDocument.body):(0,l.Ltv)("body"),u="sandbox"===a?o.nodes()[0].contentDocument:document,h=u.getElementById(e);X=h.parentElement.offsetWidth,void 0===X&&(X=1200),void 0!==r.useWidth&&(X=r.useWidth);const f=i.db.getTasks();let y=[];for(const s of f)y.push(s.type);y=function(t){const e={},n=[];for(let i=0,s=t.length;ie.type===t)).length}h.setAttribute("viewBox","0 0 "+X+" "+k);const p=d.select(`[id="${e}"]`),g=(0,l.w7C)().domain([(0,l.jkA)(f,(function(t){return t.startTime})),(0,l.T9B)(f,(function(t){return t.endTime}))]).rangeRound([0,X-r.leftPadding-r.rightPadding]);f.sort((function(t,e){const n=t.startTime,i=e.startTime;let s=0;return n>i?s=1:nf)&&(f=s);if(!h||!f)return;if(s(f).diff(s(h),"year")>5)return void c.l.warn("The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days.");const y=i.db.getDateFormat(),m=[];let k=null,b=s(h);for(;b.valueOf()<=f;)i.db.isInvalidDate(b,y,d,u)?k?k.end=b:k={start:b,end:b}:k&&(m.push(k),k=null),b=b.add(1,"d");p.append("g").selectAll("rect").data(m).enter().append("rect").attr("id",(function(t){return"exclude-"+t.start.format("YYYY-MM-DD")})).attr("x",(function(t){return g(t.start)+n})).attr("y",r.gridLineStartPadding).attr("width",(function(t){const e=t.end.add(1,"day");return g(e)-g(t.start)})).attr("height",o-e-r.gridLineStartPadding).attr("transform-origin",(function(e,i){return(g(e.start)+n+.5*(g(e.end)-g(e.start))).toString()+"px "+(i*t+.5*o).toString()+"px"})).attr("class","exclude-range")})(d,h,f,0,a,t,i.db.getExcludes(),i.db.getIncludes()),function(t,e,n,s){let a=(0,l.l78)(g).tickSize(-s+e+r.gridLineStartPadding).tickFormat((0,l.DCK)(i.db.getAxisFormat()||r.axisFormat||"%Y-%m-%d"));const o=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(i.db.getTickInterval()||r.tickInterval);if(null!==o){const t=o[1],e=o[2],n=i.db.getWeekday()||r.weekday;switch(e){case"millisecond":a.ticks(l.t6C.every(t));break;case"second":a.ticks(l.ucG.every(t));break;case"minute":a.ticks(l.wXd.every(t));break;case"hour":a.ticks(l.Agd.every(t));break;case"day":a.ticks(l.UAC.every(t));break;case"week":a.ticks(V[n].every(t));break;case"month":a.ticks(l.Ui6.every(t))}}if(p.append("g").attr("class","grid").attr("transform","translate("+t+", "+(s-50)+")").call(a).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),i.db.topAxisEnabled()||r.topAxis){let n=(0,l.tlR)(g).tickSize(-s+e+r.gridLineStartPadding).tickFormat((0,l.DCK)(i.db.getAxisFormat()||r.axisFormat||"%Y-%m-%d"));if(null!==o){const t=o[1],e=o[2],s=i.db.getWeekday()||r.weekday;switch(e){case"millisecond":n.ticks(l.t6C.every(t));break;case"second":n.ticks(l.ucG.every(t));break;case"minute":n.ticks(l.wXd.every(t));break;case"hour":n.ticks(l.Agd.every(t));break;case"day":n.ticks(l.UAC.every(t));break;case"week":n.ticks(V[s].every(t));break;case"month":n.ticks(l.Ui6.every(t))}}p.append("g").attr("class","grid").attr("transform","translate("+t+", "+e+")").call(n).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}(f,h,0,a),function(t,n,s,a,o,d,u){const h=[...new Set(t.map((t=>t.order)))].map((e=>t.find((t=>t.order===e))));p.append("g").selectAll("rect").data(h).enter().append("rect").attr("x",0).attr("y",(function(t,e){return t.order*n+s-2})).attr("width",(function(){return u-r.rightPadding/2})).attr("height",n).attr("class",(function(t){for(const[e,n]of y.entries())if(t.type===n)return"section section"+e%r.numberSectionStyles;return"section section0"}));const f=p.append("g").selectAll("rect").data(t).enter(),m=i.db.getLinks();f.append("rect").attr("id",(function(t){return t.id})).attr("rx",3).attr("ry",3).attr("x",(function(t){return t.milestone?g(t.startTime)+a+.5*(g(t.endTime)-g(t.startTime))-.5*o:g(t.startTime)+a})).attr("y",(function(t,e){return t.order*n+s})).attr("width",(function(t){return t.milestone?o:g(t.renderEndTime||t.endTime)-g(t.startTime)})).attr("height",o).attr("transform-origin",(function(t,e){return e=t.order,(g(t.startTime)+a+.5*(g(t.endTime)-g(t.startTime))).toString()+"px "+(e*n+s+.5*o).toString()+"px"})).attr("class",(function(t){const e="task";let n="";t.classes.length>0&&(n=t.classes.join(" "));let i=0;for(const[a,o]of y.entries())t.type===o&&(i=a%r.numberSectionStyles);let s="";return t.active?t.crit?s+=" activeCrit":s=" active":t.done?s=t.crit?" doneCrit":" done":t.crit&&(s+=" crit"),0===s.length&&(s=" task"),t.milestone&&(s=" milestone "+s),s+=i,s+=" "+n,e+s})),f.append("text").attr("id",(function(t){return t.id+"-text"})).text((function(t){return t.task})).attr("font-size",r.fontSize).attr("x",(function(t){let e=g(t.startTime),n=g(t.renderEndTime||t.endTime);t.milestone&&(e+=.5*(g(t.endTime)-g(t.startTime))-.5*o),t.milestone&&(n=e+o);const i=this.getBBox().width;return i>n-e?n+i+1.5*r.leftPadding>u?e+a-5:n+a+5:(n-e)/2+e+a})).attr("y",(function(t,e){return t.order*n+r.barHeight/2+(r.fontSize/2-2)+s})).attr("text-height",o).attr("class",(function(t){const e=g(t.startTime);let n=g(t.endTime);t.milestone&&(n=e+o);const i=this.getBBox().width;let s="";t.classes.length>0&&(s=t.classes.join(" "));let a=0;for(const[o,l]of y.entries())t.type===l&&(a=o%r.numberSectionStyles);let c="";return t.active&&(c=t.crit?"activeCritText"+a:"activeText"+a),t.done?c=t.crit?c+" doneCritText"+a:c+" doneText"+a:t.crit&&(c=c+" critText"+a),t.milestone&&(c+=" milestoneText"),i>n-e?n+i+1.5*r.leftPadding>u?s+" taskTextOutsideLeft taskTextOutside"+a+" "+c:s+" taskTextOutsideRight taskTextOutside"+a+" "+c+" width-"+i:s+" taskText taskText"+a+" "+c+" width-"+i}));if("sandbox"===(0,c.c)().securityLevel){let t;t=(0,l.Ltv)("#i"+e);const n=t.nodes()[0].contentDocument;f.filter((function(t){return void 0!==m[t.id]})).each((function(t){var e=n.querySelector("#"+t.id),i=n.querySelector("#"+t.id+"-text");const s=e.parentNode;var r=n.createElement("a");r.setAttribute("xlink:href",m[t.id]),r.setAttribute("target","_top"),s.appendChild(r),r.appendChild(e),r.appendChild(i)}))}}(t,d,h,f,o,0,n),function(t,e){let n=0;const i=Object.keys(m).map((t=>[t,m[t]]));p.append("g").selectAll("text").data(i).enter().append((function(t){const e=t[0].split(c.e.lineBreakRegex),n=-(e.length-1)/2,i=u.createElementNS("http://www.w3.org/2000/svg","text");i.setAttribute("dy",n+"em");for(const[s,r]of e.entries()){const t=u.createElementNS("http://www.w3.org/2000/svg","tspan");t.setAttribute("alignment-baseline","central"),t.setAttribute("x","10"),s>0&&t.setAttribute("dy","1em"),t.textContent=r,i.appendChild(t)}return i})).attr("x",10).attr("y",(function(s,r){if(!(r>0))return s[1]*t/2+e;for(let a=0;a`\n .mermaid-main-font {\n font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);\n }\n\n .exclude-range {\n fill: ${t.excludeBkgColor};\n }\n\n .section {\n stroke: none;\n opacity: 0.2;\n }\n\n .section0 {\n fill: ${t.sectionBkgColor};\n }\n\n .section2 {\n fill: ${t.sectionBkgColor2};\n }\n\n .section1,\n .section3 {\n fill: ${t.altSectionBkgColor};\n opacity: 0.2;\n }\n\n .sectionTitle0 {\n fill: ${t.titleColor};\n }\n\n .sectionTitle1 {\n fill: ${t.titleColor};\n }\n\n .sectionTitle2 {\n fill: ${t.titleColor};\n }\n\n .sectionTitle3 {\n fill: ${t.titleColor};\n }\n\n .sectionTitle {\n text-anchor: start;\n font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);\n }\n\n\n /* Grid and axis */\n\n .grid .tick {\n stroke: ${t.gridColor};\n opacity: 0.8;\n shape-rendering: crispEdges;\n }\n\n .grid .tick text {\n font-family: ${t.fontFamily};\n fill: ${t.textColor};\n }\n\n .grid path {\n stroke-width: 0;\n }\n\n\n /* Today line */\n\n .today {\n fill: none;\n stroke: ${t.todayLineColor};\n stroke-width: 2px;\n }\n\n\n /* Task styling */\n\n /* Default task */\n\n .task {\n stroke-width: 2;\n }\n\n .taskText {\n text-anchor: middle;\n font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);\n }\n\n .taskTextOutsideRight {\n fill: ${t.taskTextDarkColor};\n text-anchor: start;\n font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);\n }\n\n .taskTextOutsideLeft {\n fill: ${t.taskTextDarkColor};\n text-anchor: end;\n }\n\n\n /* Special case clickable */\n\n .task.clickable {\n cursor: pointer;\n }\n\n .taskText.clickable {\n cursor: pointer;\n fill: ${t.taskTextClickableColor} !important;\n font-weight: bold;\n }\n\n .taskTextOutsideLeft.clickable {\n cursor: pointer;\n fill: ${t.taskTextClickableColor} !important;\n font-weight: bold;\n }\n\n .taskTextOutsideRight.clickable {\n cursor: pointer;\n fill: ${t.taskTextClickableColor} !important;\n font-weight: bold;\n }\n\n\n /* Specific task settings for the sections*/\n\n .taskText0,\n .taskText1,\n .taskText2,\n .taskText3 {\n fill: ${t.taskTextColor};\n }\n\n .task0,\n .task1,\n .task2,\n .task3 {\n fill: ${t.taskBkgColor};\n stroke: ${t.taskBorderColor};\n }\n\n .taskTextOutside0,\n .taskTextOutside2\n {\n fill: ${t.taskTextOutsideColor};\n }\n\n .taskTextOutside1,\n .taskTextOutside3 {\n fill: ${t.taskTextOutsideColor};\n }\n\n\n /* Active task */\n\n .active0,\n .active1,\n .active2,\n .active3 {\n fill: ${t.activeTaskBkgColor};\n stroke: ${t.activeTaskBorderColor};\n }\n\n .activeText0,\n .activeText1,\n .activeText2,\n .activeText3 {\n fill: ${t.taskTextDarkColor} !important;\n }\n\n\n /* Completed task */\n\n .done0,\n .done1,\n .done2,\n .done3 {\n stroke: ${t.doneTaskBorderColor};\n fill: ${t.doneTaskBkgColor};\n stroke-width: 2;\n }\n\n .doneText0,\n .doneText1,\n .doneText2,\n .doneText3 {\n fill: ${t.taskTextDarkColor} !important;\n }\n\n\n /* Tasks on the critical line */\n\n .crit0,\n .crit1,\n .crit2,\n .crit3 {\n stroke: ${t.critBorderColor};\n fill: ${t.critBkgColor};\n stroke-width: 2;\n }\n\n .activeCrit0,\n .activeCrit1,\n .activeCrit2,\n .activeCrit3 {\n stroke: ${t.critBorderColor};\n fill: ${t.activeTaskBkgColor};\n stroke-width: 2;\n }\n\n .doneCrit0,\n .doneCrit1,\n .doneCrit2,\n .doneCrit3 {\n stroke: ${t.critBorderColor};\n fill: ${t.doneTaskBkgColor};\n stroke-width: 2;\n cursor: pointer;\n shape-rendering: crispEdges;\n }\n\n .milestone {\n transform: rotate(45deg) scale(0.8,0.8);\n }\n\n .milestoneText {\n font-style: italic;\n }\n .doneCritText0,\n .doneCritText1,\n .doneCritText2,\n .doneCritText3 {\n fill: ${t.taskTextDarkColor} !important;\n }\n\n .activeCritText0,\n .activeCritText1,\n .activeCritText2,\n .activeCritText3 {\n fill: ${t.taskTextDarkColor} !important;\n }\n\n .titleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.titleColor||t.textColor};\n font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);\n }\n`}}}]); \ No newline at end of file diff --git a/assets/js/8995.277ce130.js b/assets/js/8995.277ce130.js deleted file mode 100644 index a987159adaf0..000000000000 --- a/assets/js/8995.277ce130.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8995],{14075:(e,t,n)=>{n.d(t,{M:()=>d});var r=n(69592),i=n(50053),a=n(74722);n(73046);function d(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:o(e),edges:l(e)};return r.A(e.graph())||(t.value=i.A(e.graph())),t}function o(e){return a.A(e.nodes(),(function(t){var n=e.node(t),i=e.parent(t),a={v:t};return r.A(n)||(a.value=n),r.A(i)||(a.parent=i),a}))}function l(e){return a.A(e.edges(),(function(t){var n=e.edge(t),i={v:t.v,w:t.w};return r.A(t.name)||(i.name=t.name),r.A(n)||(i.value=n),i}))}},50053:(e,t,n)=>{n.d(t,{A:()=>i});var r=n(91641);const i=function(e){return(0,r.A)(e,4)}},8995:(e,t,n)=>{n.d(t,{r:()=>E});var r=n(21176),i=n(14075),a=n(88146),d=n(86079),o=n(697),l=n(22519),s=n(26312);let c={},h={},g={};const f=(e,t)=>(d.l.trace("In isDescendant",t," ",e," = ",h[t].includes(e)),!!h[t].includes(e)),u=(e,t,n,r)=>{d.l.warn("Copying children of ",e,"root",r,"data",t.node(e),r);const i=t.children(e)||[];e!==r&&i.push(e),d.l.warn("Copying (nodes) clusterId",e,"nodes",i),i.forEach((i=>{if(t.children(i).length>0)u(i,t,n,r);else{const a=t.node(i);d.l.info("cp ",i," to ",r," with parent ",e),n.setNode(i,a),r!==t.parent(i)&&(d.l.warn("Setting parent",i,t.parent(i)),n.setParent(i,t.parent(i))),e!==r&&i!==e?(d.l.debug("Setting parent",i,e),n.setParent(i,e)):(d.l.info("In copy ",e,"root",r,"data",t.node(e),r),d.l.debug("Not Setting parent for node=",i,"cluster!==rootId",e!==r,"node!==clusterId",i!==e));const o=t.edges(i);d.l.debug("Copying Edges",o),o.forEach((i=>{d.l.info("Edge",i);const a=t.edge(i.v,i.w,i.name);d.l.info("Edge data",a,r);try{((e,t)=>(d.l.info("Descendants of ",t," is ",h[t]),d.l.info("Edge is ",e),e.v!==t&&e.w!==t&&(h[t]?h[t].includes(e.v)||f(e.v,t)||f(e.w,t)||h[t].includes(e.w):(d.l.debug("Tilt, ",t,",not in descendants"),!1))))(i,r)?(d.l.info("Copying as ",i.v,i.w,a,i.name),n.setEdge(i.v,i.w,a,i.name),d.l.info("newGraph edges ",n.edges(),n.edge(n.edges()[0]))):d.l.info("Skipping copy of edge ",i.v,"--\x3e",i.w," rootId: ",r," clusterId:",e)}catch(o){d.l.error(o)}}))}d.l.debug("Removing node",i),t.removeNode(i)}))},w=(e,t)=>{const n=t.children(e);let r=[...n];for(const i of n)g[i]=e,r=[...r,...w(i,t)];return r},p=(e,t)=>{d.l.trace("Searching",e);const n=t.children(e);if(d.l.trace("Searching children of id ",e,n),n.length<1)return d.l.trace("This is a valid node",e),e;for(const r of n){const n=p(r,t);if(n)return d.l.trace("Found replacement for",e," => ",n),n}},v=e=>c[e]&&c[e].externalConnections&&c[e]?c[e].id:e,y=(e,t)=>{if(d.l.warn("extractor - ",t,i.M(e),e.children("D")),t>10)return void d.l.error("Bailing out");let n=e.nodes(),r=!1;for(const i of n){const t=e.children(i);r=r||t.length>0}if(r){d.l.debug("Nodes = ",n,t);for(const r of n)if(d.l.debug("Extracting node",r,c,c[r]&&!c[r].externalConnections,!e.parent(r),e.node(r),e.children("D")," Depth ",t),c[r])if(!c[r].externalConnections&&e.children(r)&&e.children(r).length>0){d.l.warn("Cluster without external connections, without a parent and with children",r,t);let n="TB"===e.graph().rankdir?"LR":"TB";c[r]&&c[r].clusterData&&c[r].clusterData.dir&&(n=c[r].clusterData.dir,d.l.warn("Fixing dir",c[r].clusterData.dir,n));const a=new o.T({multigraph:!0,compound:!0}).setGraph({rankdir:n,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}}));d.l.warn("Old graph before copy",i.M(e)),u(r,e,a,r),e.setNode(r,{clusterNode:!0,id:r,clusterData:c[r].clusterData,labelText:c[r].labelText,graph:a}),d.l.warn("New graph after copy node: (",r,")",i.M(a)),d.l.debug("Old graph after copy",i.M(e))}else d.l.warn("Cluster ** ",r," **not meeting the criteria !externalConnections:",!c[r].externalConnections," no parent: ",!e.parent(r)," children ",e.children(r)&&e.children(r).length>0,e.children("D"),t),d.l.debug(c);else d.l.debug("Not a cluster",r,t);n=e.nodes(),d.l.warn("New list of nodes",n);for(const r of n){const n=e.node(r);d.l.warn(" Now next level",r,n),n.clusterNode&&y(n.graph,t+1)}}else d.l.debug("Done, no node has children",e.nodes())},x=(e,t)=>{if(0===t.length)return[];let n=Object.assign(t);return t.forEach((t=>{const r=e.children(t),i=x(e,r);n=[...n,...i]})),n},m={rect:(e,t)=>{d.l.info("Creating subgraph rect for ",t.id,t);const n=(0,d.c)(),r=e.insert("g").attr("class","cluster"+(t.class?" "+t.class:"")).attr("id",t.id),i=r.insert("rect",":first-child"),o=(0,d.m)(n.flowchart.htmlLabels),c=r.insert("g").attr("class","cluster-label"),h="markdown"===t.labelType?(0,l.a)(c,t.labelText,{style:t.labelStyle,useHtmlLabels:o}):c.node().appendChild((0,a.c)(t.labelText,t.labelStyle,void 0,!0));let g=h.getBBox();if((0,d.m)(n.flowchart.htmlLabels)){const e=h.children[0],t=(0,s.Ltv)(h);g=e.getBoundingClientRect(),t.attr("width",g.width),t.attr("height",g.height)}const f=0*t.padding,u=f/2,w=t.width<=g.width+f?g.width+f:t.width;t.width<=g.width+f?t.diff=(g.width-t.width)/2-t.padding/2:t.diff=-t.padding/2,d.l.trace("Data ",t,JSON.stringify(t)),i.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-w/2).attr("y",t.y-t.height/2-u).attr("width",w).attr("height",t.height+f);const{subGraphTitleTopMargin:p}=(0,a.g)(n);o?c.attr("transform",`translate(${t.x-g.width/2}, ${t.y-t.height/2+p})`):c.attr("transform",`translate(${t.x}, ${t.y-t.height/2+p})`);const v=i.node().getBBox();return t.width=v.width,t.height=v.height,t.intersect=function(e){return(0,a.i)(t,e)},r},roundedWithTitle:(e,t)=>{const n=(0,d.c)(),r=e.insert("g").attr("class",t.classes).attr("id",t.id),i=r.insert("rect",":first-child"),o=r.insert("g").attr("class","cluster-label"),l=r.append("rect"),c=o.node().appendChild((0,a.c)(t.labelText,t.labelStyle,void 0,!0));let h=c.getBBox();if((0,d.m)(n.flowchart.htmlLabels)){const e=c.children[0],t=(0,s.Ltv)(c);h=e.getBoundingClientRect(),t.attr("width",h.width),t.attr("height",h.height)}h=c.getBBox();const g=0*t.padding,f=g/2,u=t.width<=h.width+t.padding?h.width+t.padding:t.width;t.width<=h.width+t.padding?t.diff=(h.width+0*t.padding-t.width)/2:t.diff=-t.padding/2,i.attr("class","outer").attr("x",t.x-u/2-f).attr("y",t.y-t.height/2-f).attr("width",u+g).attr("height",t.height+g),l.attr("class","inner").attr("x",t.x-u/2-f).attr("y",t.y-t.height/2-f+h.height-1).attr("width",u+g).attr("height",t.height+g-h.height-3);const{subGraphTitleTopMargin:w}=(0,a.g)(n);o.attr("transform",`translate(${t.x-h.width/2}, ${t.y-t.height/2-t.padding/3+((0,d.m)(n.flowchart.htmlLabels)?5:3)+w})`);const p=i.node().getBBox();return t.height=p.height,t.intersect=function(e){return(0,a.i)(t,e)},r},noteGroup:(e,t)=>{const n=e.insert("g").attr("class","note-cluster").attr("id",t.id),r=n.insert("rect",":first-child"),i=0*t.padding,d=i/2;r.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-d).attr("y",t.y-t.height/2-d).attr("width",t.width+i).attr("height",t.height+i).attr("fill","none");const o=r.node().getBBox();return t.width=o.width,t.height=o.height,t.intersect=function(e){return(0,a.i)(t,e)},n},divider:(e,t)=>{const n=e.insert("g").attr("class",t.classes).attr("id",t.id),r=n.insert("rect",":first-child"),i=0*t.padding,d=i/2;r.attr("class","divider").attr("x",t.x-t.width/2-d).attr("y",t.y-t.height/2).attr("width",t.width+i).attr("height",t.height+i);const o=r.node().getBBox();return t.width=o.width,t.height=o.height,t.diff=-t.padding/2,t.intersect=function(e){return(0,a.i)(t,e)},n}};let b={};const C=async(e,t,n,o,l,s)=>{d.l.info("Graph in recursive render: XXX",i.M(t),l);const h=t.graph().rankdir;d.l.trace("Dir in recursive render - dir:",h);const g=e.insert("g").attr("class","root");t.nodes()?d.l.info("Recursive render XXX",t.nodes()):d.l.info("No nodes found for",t),t.edges().length>0&&d.l.trace("Recursive edges",t.edge(t.edges()[0]));const f=g.insert("g").attr("class","clusters"),u=g.insert("g").attr("class","edgePaths"),w=g.insert("g").attr("class","edgeLabels"),v=g.insert("g").attr("class","nodes");await Promise.all(t.nodes().map((async function(e){const r=t.node(e);if(void 0!==l){const n=JSON.parse(JSON.stringify(l.clusterData));d.l.info("Setting data for cluster XXX (",e,") ",n,l),t.setNode(l.id,n),t.parent(e)||(d.l.trace("Setting parent",e,l.id),t.setParent(e,l.id,n))}if(d.l.info("(Insert) Node XXX"+e+": "+JSON.stringify(t.node(e))),r&&r.clusterNode){d.l.info("Cluster identified",e,r.width,t.node(e));const i=await C(v,r.graph,n,o,t.node(e),s),l=i.elem;(0,a.u)(r,l),r.diff=i.diff||0,d.l.info("Node bounds (abc123)",e,r,r.width,r.x,r.y),(0,a.s)(l,r),d.l.warn("Recursive render complete ",l,r)}else t.children(e).length>0?(d.l.info("Cluster - the non recursive path XXX",e,r.id,r,t),d.l.info(p(r.id,t)),c[r.id]={id:p(r.id,t),node:r}):(d.l.info("Node - the non recursive path",e,r.id,r),await(0,a.e)(v,t.node(e),h))}))),t.edges().forEach((function(e){const n=t.edge(e.v,e.w,e.name);d.l.info("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(e)),d.l.info("Edge "+e.v+" -> "+e.w+": ",e," ",JSON.stringify(t.edge(e))),d.l.info("Fix",c,"ids:",e.v,e.w,"Translating: ",c[e.v],c[e.w]),(0,a.f)(w,n)})),t.edges().forEach((function(e){d.l.info("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(e))})),d.l.info("#############################################"),d.l.info("### Layout ###"),d.l.info("#############################################"),d.l.info(t),(0,r.Zp)(t),d.l.info("Graph after layout:",i.M(t));let y=0;const{subGraphTitleTotalMargin:E}=(0,a.g)(s);return(e=>x(e,e.children()))(t).forEach((function(e){const n=t.node(e);d.l.info("Position "+e+": "+JSON.stringify(t.node(e))),d.l.info("Position "+e+": ("+n.x,","+n.y,") width: ",n.width," height: ",n.height),n&&n.clusterNode?(n.y+=E,(0,a.p)(n)):t.children(e).length>0?(n.height+=E,((e,t)=>{d.l.trace("Inserting cluster");const n=t.shape||"rect";b[t.id]=m[n](e,t)})(f,n),c[n.id].node=n):(n.y+=E/2,(0,a.p)(n))})),t.edges().forEach((function(e){const r=t.edge(e);d.l.info("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(r),r),r.points.forEach((e=>e.y+=E/2));const i=(0,a.h)(u,e,r,c,n,t,o);(0,a.j)(r,i)})),t.nodes().forEach((function(e){const n=t.node(e);d.l.info(e,n.type,n.diff),"group"===n.type&&(y=n.diff)})),{elem:g,diff:y}},E=async(e,t,n,r,o)=>{(0,a.a)(e,n,r,o),(0,a.b)(),(0,a.d)(),b={},h={},g={},c={},d.l.warn("Graph at first:",JSON.stringify(i.M(t))),((e,t)=>{if(!e||t>10)d.l.debug("Opting out, no graph ");else{d.l.debug("Opting in, graph "),e.nodes().forEach((function(t){e.children(t).length>0&&(d.l.warn("Cluster identified",t," Replacement id in edges: ",p(t,e)),h[t]=w(t,e),c[t]={id:p(t,e),clusterData:e.node(t)})})),e.nodes().forEach((function(t){const n=e.children(t),r=e.edges();n.length>0?(d.l.debug("Cluster identified",t,h),r.forEach((e=>{e.v!==t&&e.w!==t&&f(e.v,t)^f(e.w,t)&&(d.l.warn("Edge: ",e," leaves cluster ",t),d.l.warn("Descendants of XXX ",t,": ",h[t]),c[t].externalConnections=!0)}))):d.l.debug("Not a cluster ",t,h)}));for(let t of Object.keys(c)){const n=c[t].id,r=e.parent(n);r!==t&&c[r]&&!c[r].externalConnections&&(c[t].id=r)}e.edges().forEach((function(t){const n=e.edge(t);d.l.warn("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t)),d.l.warn("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(e.edge(t)));let r=t.v,i=t.w;if(d.l.warn("Fix XXX",c,"ids:",t.v,t.w,"Translating: ",c[t.v]," --- ",c[t.w]),c[t.v]&&c[t.w]&&c[t.v]===c[t.w]){d.l.warn("Fixing and trixing link to self - removing XXX",t.v,t.w,t.name),d.l.warn("Fixing and trixing - removing XXX",t.v,t.w,t.name),r=v(t.v),i=v(t.w),e.removeEdge(t.v,t.w,t.name);const a=t.w+"---"+t.v;e.setNode(a,{domId:a,id:a,labelStyle:"",labelText:n.label,padding:0,shape:"labelRect",style:""});const o=structuredClone(n),l=structuredClone(n);o.label="",o.arrowTypeEnd="none",l.label="",o.fromCluster=t.v,l.toCluster=t.v,e.setEdge(r,a,o,t.name+"-cyclic-special"),e.setEdge(a,i,l,t.name+"-cyclic-special")}else if(c[t.v]||c[t.w]){if(d.l.warn("Fixing and trixing - removing XXX",t.v,t.w,t.name),r=v(t.v),i=v(t.w),e.removeEdge(t.v,t.w,t.name),r!==t.v){const i=e.parent(r);c[i].externalConnections=!0,n.fromCluster=t.v}if(i!==t.w){const r=e.parent(i);c[r].externalConnections=!0,n.toCluster=t.w}d.l.warn("Fix Replacing with XXX",r,i,t.name),e.setEdge(r,i,n,t.name)}})),d.l.warn("Adjusted Graph",i.M(e)),y(e,0),d.l.trace(c)}})(t),d.l.warn("Graph after:",JSON.stringify(i.M(t)));const l=(0,d.c)();await C(e,t,r,o,void 0,l)}}}]); \ No newline at end of file diff --git a/assets/js/8998.a98c8a12.js b/assets/js/8998.a98c8a12.js new file mode 100644 index 000000000000..a47ba0a64cec --- /dev/null +++ b/assets/js/8998.a98c8a12.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8998],{68998:(e,r,a)=>{a.d(r,{diagram:()=>p});var t=a(29196),n=a(61021),s=a(45567),d=a(78731),i={parse:(0,s.K2)((async e=>{const r=await(0,d.qg)("info",e);s.Rm.debug(r)}),"parse")},o={version:t.r},p={parser:i,db:{getVersion:(0,s.K2)((()=>o.version),"getVersion")},renderer:{draw:(0,s.K2)(((e,r,a)=>{s.Rm.debug("rendering info diagram\n"+e);const t=(0,n.D)(r);(0,s.a$)(t,100,400,!0);t.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${a}`)}),"draw")}}}}]); \ No newline at end of file diff --git a/assets/js/899aadcc.2cd36872.js b/assets/js/899aadcc.2cd36872.js new file mode 100644 index 000000000000..8b85ddcda479 --- /dev/null +++ b/assets/js/899aadcc.2cd36872.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6993],{53044:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>a,contentTitle:()=>o,default:()=>d,frontMatter:()=>c,metadata:()=>s,toc:()=>l});const s=JSON.parse('{"id":"learn/xcm/overview/learn-xcm-docs-overview-architecture","title":"The XCM Architecture","description":"The XCM Architecture.","source":"@site/../docs/learn/xcm/overview/architecture.md","sourceDirName":"learn/xcm/overview","slug":"/learn/xcm/overview-architecture","permalink":"/docs/learn/xcm/overview-architecture","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/xcm/overview/architecture.md","tags":[],"version":"current","lastUpdatedBy":"github-actions[bot]","lastUpdatedAt":1712558849000,"frontMatter":{"id":"learn-xcm-docs-overview-architecture","title":"The XCM Architecture","sidebar_label":"Architecture","description":"The XCM Architecture.","keywords":["xcm","cross-consensus messaging","xcvm","architecture"],"slug":"../overview-architecture"},"sidebar":"docs","previous":{"title":"The XCVM","permalink":"/docs/learn/xcm/overview-xcvm"},"next":{"title":"Quickstart","permalink":"/docs/learn/xcm/quickstart"}}');var i=r(74848),n=r(28453);const c={id:"learn-xcm-docs-overview-architecture",title:"The XCM Architecture",sidebar_label:"Architecture",description:"The XCM Architecture.",keywords:["xcm","cross-consensus messaging","xcvm","architecture"],slug:"../overview-architecture"},o="Architecture",a={},l=[{value:"Executor",id:"executor",level:2},{value:"Builder",id:"builder",level:2},{value:"Pallet",id:"pallet",level:2},{value:"Simulator",id:"simulator",level:2}];function h(e){const t={a:"a",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",ul:"ul",...(0,n.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.header,{children:(0,i.jsx)(t.h1,{id:"architecture",children:"Architecture"})}),"\n",(0,i.jsxs)(t.p,{children:["XCM is a ",(0,i.jsx)(t.a,{href:"https://github.com/paritytech/xcm-format",children:"format"}),". Anyone can create an implementation of\nthe XCVM to interpret said format."]}),"\n",(0,i.jsxs)(t.p,{children:["Parity Technologies maintains a Rust implementation, primarily for\n",(0,i.jsx)(t.a,{href:"https://substrate.io/",children:"Substrate"}),"-based chains in the ",(0,i.jsx)(t.a,{href:"https://polkadot.network/",children:"Polkadot"}),"\necosystem. It is this implementation that we use throughout this documentation."]}),"\n",(0,i.jsxs)(t.p,{children:["All the code lives in the\n",(0,i.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/polkadot/xcm",children:"Polkadot repo"}),". The main\nstructure is as follows:"]}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/polkadot/xcm/src",children:"XCM"}),": Defines the\nfundamental constructs used in XCM and an enum with all the instructions available."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/polkadot/xcm/xcm-executor/src",children:"Executor"}),":\nImplements the XCVM, capable of executing XCMs. Highly configurable."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/polkadot/xcm/xcm-builder/src",children:"Builder"}),":\nOffers common configuration building blocks for the executor."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/polkadot/xcm/pallet-xcm/src",children:"Pallet"}),":\nFRAME pallet that provides extrinsics for interacting with the XCM executor, as well as specific\nXCM programs, such as teleports and reserve asset transfers."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/polkadot/xcm/xcm-simulator/example/src",children:"Simulator"}),":\nAllows for testing of XCM programs."]}),"\n"]}),"\n",(0,i.jsx)(t.h2,{id:"executor",children:"Executor"}),"\n",(0,i.jsx)(t.p,{children:"The XCM executor is responsible for interpreting and executing XCM messages. It is the core engine\nthat processes and handles XCM instructions, ensuring that they are carried out accurately and in\nthe correct order. The XCM executor follows the Cross-Consensus Virtual Machine (XCVM) specification\nand can be extended, customized, or even replaced with an alternative construct that adheres to the\nXCVM spec."}),"\n",(0,i.jsx)(t.h2,{id:"builder",children:"Builder"}),"\n",(0,i.jsxs)(t.p,{children:["The XCM executor is highly configurable. XCM builder provides building blocks people can use to\nconfigure their executor according to their needs. Many of these building blocks will be explained\nin the ",(0,i.jsx)(t.a,{href:"/docs/learn/xcm/config-deep-dive",children:"Config Deep Dive"})," chapter. They cover common use-cases but are\nnot meant to be exhaustive. It's very easy to build your own building blocks for your specific\nconfiguration when needed, using these as examples."]}),"\n",(0,i.jsx)(t.h2,{id:"pallet",children:"Pallet"}),"\n",(0,i.jsxs)(t.p,{children:["The XCM pallet is a ",(0,i.jsx)(t.a,{href:"https://docs.substrate.io/quick-start/substrate-at-a-glance/",children:"FRAME"})," pallet\nthat can be used to execute XCMs locally or send them to a different system. It also has extrinsics\nfor specific use cases such as teleporting assets or doing reserve asset transfers, which we'll talk\nabout later. It's the glue between XCM and FRAME, which is highly used in the Polkadot ecosystem."]}),"\n",(0,i.jsx)(t.h2,{id:"simulator",children:"Simulator"}),"\n",(0,i.jsx)(t.p,{children:"The simulator allows for testing XCMs fast, without needing to boot up several different nodes in a\nnetwork, or test in production. It's a very useful tool which we'll use throughout this document to\nbuild and test different XCMs."})]})}function d(e={}){const{wrapper:t}={...(0,n.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(h,{...e})}):h(e)}},28453:(e,t,r)=>{r.d(t,{R:()=>c,x:()=>o});var s=r(96540);const i={},n=s.createContext(i);function c(e){const t=s.useContext(n);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:c(e.components),s.createElement(n.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/899aadcc.560fceee.js b/assets/js/899aadcc.560fceee.js deleted file mode 100644 index 5ac0e39a7fe0..000000000000 --- a/assets/js/899aadcc.560fceee.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6993],{5596:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>a,contentTitle:()=>c,default:()=>d,frontMatter:()=>n,metadata:()=>o,toc:()=>l});var s=r(74848),i=r(28453);const n={id:"learn-xcm-docs-overview-architecture",title:"The XCM Architecture",sidebar_label:"Architecture",description:"The XCM Architecture.",keywords:["xcm","cross-consensus messaging","xcvm","architecture"],slug:"../overview-architecture"},c="Architecture",o={id:"learn/xcm/overview/learn-xcm-docs-overview-architecture",title:"The XCM Architecture",description:"The XCM Architecture.",source:"@site/../docs/learn/xcm/overview/architecture.md",sourceDirName:"learn/xcm/overview",slug:"/learn/xcm/overview-architecture",permalink:"/docs/learn/xcm/overview-architecture",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/xcm/overview/architecture.md",tags:[],version:"current",lastUpdatedBy:"github-actions[bot]",lastUpdatedAt:1712558849e3,frontMatter:{id:"learn-xcm-docs-overview-architecture",title:"The XCM Architecture",sidebar_label:"Architecture",description:"The XCM Architecture.",keywords:["xcm","cross-consensus messaging","xcvm","architecture"],slug:"../overview-architecture"},sidebar:"docs",previous:{title:"The XCVM",permalink:"/docs/learn/xcm/overview-xcvm"},next:{title:"Quickstart",permalink:"/docs/learn/xcm/quickstart"}},a={},l=[{value:"Executor",id:"executor",level:2},{value:"Builder",id:"builder",level:2},{value:"Pallet",id:"pallet",level:2},{value:"Simulator",id:"simulator",level:2}];function h(e){const t={a:"a",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",ul:"ul",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.header,{children:(0,s.jsx)(t.h1,{id:"architecture",children:"Architecture"})}),"\n",(0,s.jsxs)(t.p,{children:["XCM is a ",(0,s.jsx)(t.a,{href:"https://github.com/paritytech/xcm-format",children:"format"}),". Anyone can create an implementation of\nthe XCVM to interpret said format."]}),"\n",(0,s.jsxs)(t.p,{children:["Parity Technologies maintains a Rust implementation, primarily for\n",(0,s.jsx)(t.a,{href:"https://substrate.io/",children:"Substrate"}),"-based chains in the ",(0,s.jsx)(t.a,{href:"https://polkadot.network/",children:"Polkadot"}),"\necosystem. It is this implementation that we use throughout this documentation."]}),"\n",(0,s.jsxs)(t.p,{children:["All the code lives in the\n",(0,s.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/polkadot/xcm",children:"Polkadot repo"}),". The main\nstructure is as follows:"]}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/polkadot/xcm/src",children:"XCM"}),": Defines the\nfundamental constructs used in XCM and an enum with all the instructions available."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/polkadot/xcm/xcm-executor/src",children:"Executor"}),":\nImplements the XCVM, capable of executing XCMs. Highly configurable."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/polkadot/xcm/xcm-builder/src",children:"Builder"}),":\nOffers common configuration building blocks for the executor."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/polkadot/xcm/pallet-xcm/src",children:"Pallet"}),":\nFRAME pallet that provides extrinsics for interacting with the XCM executor, as well as specific\nXCM programs, such as teleports and reserve asset transfers."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/polkadot/xcm/xcm-simulator/example/src",children:"Simulator"}),":\nAllows for testing of XCM programs."]}),"\n"]}),"\n",(0,s.jsx)(t.h2,{id:"executor",children:"Executor"}),"\n",(0,s.jsx)(t.p,{children:"The XCM executor is responsible for interpreting and executing XCM messages. It is the core engine\nthat processes and handles XCM instructions, ensuring that they are carried out accurately and in\nthe correct order. The XCM executor follows the Cross-Consensus Virtual Machine (XCVM) specification\nand can be extended, customized, or even replaced with an alternative construct that adheres to the\nXCVM spec."}),"\n",(0,s.jsx)(t.h2,{id:"builder",children:"Builder"}),"\n",(0,s.jsxs)(t.p,{children:["The XCM executor is highly configurable. XCM builder provides building blocks people can use to\nconfigure their executor according to their needs. Many of these building blocks will be explained\nin the ",(0,s.jsx)(t.a,{href:"/docs/learn/xcm/config-deep-dive",children:"Config Deep Dive"})," chapter. They cover common use-cases but are\nnot meant to be exhaustive. It's very easy to build your own building blocks for your specific\nconfiguration when needed, using these as examples."]}),"\n",(0,s.jsx)(t.h2,{id:"pallet",children:"Pallet"}),"\n",(0,s.jsxs)(t.p,{children:["The XCM pallet is a ",(0,s.jsx)(t.a,{href:"https://docs.substrate.io/quick-start/substrate-at-a-glance/",children:"FRAME"})," pallet\nthat can be used to execute XCMs locally or send them to a different system. It also has extrinsics\nfor specific use cases such as teleporting assets or doing reserve asset transfers, which we'll talk\nabout later. It's the glue between XCM and FRAME, which is highly used in the Polkadot ecosystem."]}),"\n",(0,s.jsx)(t.h2,{id:"simulator",children:"Simulator"}),"\n",(0,s.jsx)(t.p,{children:"The simulator allows for testing XCMs fast, without needing to boot up several different nodes in a\nnetwork, or test in production. It's a very useful tool which we'll use throughout this document to\nbuild and test different XCMs."})]})}function d(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}},28453:(e,t,r)=>{r.d(t,{R:()=>c,x:()=>o});var s=r(96540);const i={},n=s.createContext(i);function c(e){const t=s.useContext(n);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:c(e.components),s.createElement(n.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/89a76fd2.79ee4a94.js b/assets/js/89a76fd2.79ee4a94.js deleted file mode 100644 index aae227c770a3..000000000000 --- a/assets/js/89a76fd2.79ee4a94.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2204],{4552:(e,n,o)=>{o.r(n),o.d(n,{assets:()=>d,contentTitle:()=>r,default:()=>m,frontMatter:()=>s,metadata:()=>l,toc:()=>h});var t=o(74848),a=o(28453),i=o(67141);const s={id:"learn-redenomination",title:"Redenomination of DOT",sidebar_label:"Redenomination of DOT",description:"Everything about the DOT Token Redenomination.",keywords:["DOT","redenomination"],slug:"../learn-redenomination"},r=void 0,l={id:"learn/archive/learn-redenomination",title:"Redenomination of DOT",description:"Everything about the DOT Token Redenomination.",source:"@site/../docs/learn/archive/learn-redenomination.md",sourceDirName:"learn/archive",slug:"/learn/learn-redenomination",permalink:"/docs/learn/learn-redenomination",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/archive/learn-redenomination.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1714545713e3,frontMatter:{id:"learn-redenomination",title:"Redenomination of DOT",sidebar_label:"Redenomination of DOT",description:"Everything about the DOT Token Redenomination.",keywords:["DOT","redenomination"],slug:"../learn-redenomination"},sidebar:"docs",previous:{title:"Polkadot Launch Phases",permalink:"/docs/learn/learn-launch"},next:{title:"Controller Accounts",permalink:"/docs/learn/learn-controller"}},d={},h=[{value:"Origins",id:"origins",level:2},{value:"The Vote",id:"the-vote",level:2},{value:"The Outcome",id:"the-outcome",level:2},{value:"What This Means for the Community",id:"what-this-means-for-the-community",level:3},{value:"What This Means for Builders of Tools",id:"what-this-means-for-builders-of-tools",level:3}];function c(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,a.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i.A,{message:"The content on this page is archived."}),"\n",(0,t.jsx)(n.p,{children:"On August 21, 2020, the redenomination of DOT, the native token on Polkadot, occurred. From this\ndate, one DOT (old) equals 100 new DOT."}),"\n",(0,t.jsx)(n.admonition,{title:"Denomination Day",type:"info",children:(0,t.jsx)(n.p,{children:"The DOT redenomination took place on 21 August 2020, known as Denomination Day, at block number\n1_248_328."})}),"\n",(0,t.jsxs)(n.p,{children:["While ",(0,t.jsx)(n.a,{href:"/docs/learn-DOT",children:"DOT"}),' is the unit of currency on Polkadot that most people use when\ninteracting with the system, the smallest unit of account is the Planck. A Planck\'s relation to DOT\nis like the relation of a Satoshi to Bitcoin. Before 21 August, the DOT was denominated as 1e12\nPlancks, that is, twelve decimal places. After Denomination Day, DOT is denominated as 1e10 Plancks,\nas in, ten decimal places. DOT denominated to twelve decimal places is referred to as "DOT (old)"\nand DOT denominated to ten decimal places is generally referred to as "DOT". When the difference\nmust be made explicit, the current ten-decimal-denominated DOT is referred to as "',(0,t.jsx)(n.em,{children:"New DOT"}),'".']}),"\n",(0,t.jsx)(n.admonition,{title:"Redenomination Explainer",type:"note",children:(0,t.jsxs)(n.p,{children:["Check out our\n",(0,t.jsx)(n.a,{href:"https://www.youtube.com/watch?v=xXIcnBV4uUE&list=PLOyWqupZ-WGuAuS00rK-pebTMAOxW41W8&index=22&ab_channel=Polkadot",children:"technical explainer video that explains more of Redenomination"}),"."]})}),"\n",(0,t.jsxs)(n.p,{children:["The change in denomination, henceforth referred to as the ",(0,t.jsx)(n.em,{children:"redenomination"}),", was voted on by the\ncommunity of DOT holders. The community decided between four options, to change the DOT denomination\nby a factor of ten, one hundred, one thousand, or not at all. The end result was to change the\ndenomination by a factor of one hundred."]}),"\n",(0,t.jsx)(n.p,{children:"The overall effect of this change was that the number of Polkadot's smallest unit, the Planck,\nremained constant, while the DOT balance for all holders was increased by a factor of one hundred.\nAs one can see from the example below, the number of Plancks a user has does not change, only the\nnumber of Plancks that constitute a single DOT. A user with 1_000_000_000_000 Plancks still has the\nsame number of Plancks but will have 100 DOT under the new denomination, as opposed to one DOT under\nthe old denomination."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:" Before the change the decimal was here\n v\n 1.000000000000 DOT\n\n 100.0000000000 DOT\n ^\n After the change the decimal is here\n"})}),"\n",(0,t.jsx)(n.admonition,{type:"note",children:(0,t.jsx)(n.p,{children:"There are no state changes with redenomination. There are no transfers. The real change regards the\nsocial consensus around where to put the decimal place when we talk about what constitutes a DOT."})}),"\n",(0,t.jsx)(n.h2,{id:"origins",children:"Origins"}),"\n",(0,t.jsxs)(n.p,{children:["The initial vote for redenomination occurred as a\n",(0,t.jsx)(n.a,{href:"https://kusama.polkassembly.io/referendum/52",children:"referendum"})," on the Kusama blockchain. The referendum\nwas summarized as having four effects if approved by KSM holders."]}),"\n",(0,t.jsx)(n.admonition,{title:"Referendum Summary",type:"info",children:(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"The total allocations of DOT will increase one hundred times from 10 million to 1 billion."}),"\n",(0,t.jsx)(n.li,{children:"DOT allocation balances will increase by a factor of one hundred, such that 1 DOT will be 100 DOT."}),"\n",(0,t.jsx)(n.li,{children:"The distribution of DOT does not change, and holders of DOT still own an equal share of the\nnetwork as before the change."}),"\n",(0,t.jsx)(n.li,{children:"The precision of DOT will change from 12 decimal places to 10 decimal places."}),"\n",(0,t.jsx)(n.li,{children:"The main benefit of this change is to avoid using small decimals when dealing with DOT and to\nachieve an easier calculation system."}),"\n"]})}),"\n",(0,t.jsxs)(n.p,{children:["The initial referendum was proposed before the Polkadot genesis block, assuming that making a\nredenomination would be simpler before the Polkadot chain was live. However, many in the community\npointed out the disconnect between the two networks and how it was unfair for holders of DOT to be\nimpacted by a vote by a different token holder set. For this reason, Web3 Foundation\n",(0,t.jsx)(n.a,{href:"https://polkadot.network/results-of-dot-redenomination-referendum/",children:"decided to make a new vote on Polkadot"}),"\nwhen it went live, although the Kusama vote ended with a majority in favor of the redenomination\nchange."]}),"\n",(0,t.jsx)(n.p,{children:"Web3 Foundation summarized the decision not to change:"}),"\n",(0,t.jsx)(n.admonition,{type:"note",children:(0,t.jsxs)(n.p,{children:["However, given the non-negligible amount of opposition, including from some within the ranks of Web3\nFoundation and Parity, ",(0,t.jsx)(n.strong,{children:"the Foundation decided that we cannot, in good faith, sponsor the\nredenomination."})]})}),"\n",(0,t.jsx)(n.h2,{id:"the-vote",children:"The Vote"}),"\n",(0,t.jsx)(n.p,{children:"After the genesis block of Polkadot was created and the network was running with a decentralized\ncommunity of validators securing the network, Web3 Foundation decided to put the redenomination\ntopic up for a vote again. This time, the vote was explicitly binding \u2014 meaning that it would\nbe executed if voted through. In comparison, the vote on Kusama was non-binding to capture a signal\nwithout a direct way to affect the Polkadot chain."}),"\n",(0,t.jsxs)(n.p,{children:["Based on the feedback received during the Kusama referendum, the\n",(0,t.jsx)(n.a,{href:"https://polkadot.network/the-first-polkadot-vote/",children:"Polkadot vote"})," was held as an approval vote,\nwith four available options. DOT holders could issue votes for any configuration of the four\noptions: no change, a change of 10x, a change of 100x, or a change of 1000x. The voting logic was\ncontained in a specially-built Substrate pallet included in Polkadot's runtime for this poll."]}),"\n",(0,t.jsx)(n.admonition,{title:"Summary of the Vote",type:"info",children:(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Any combination of the four options may have been approved by the voter. There was no need to\nselect only one option."}),"\n",(0,t.jsx)(n.li,{children:"Approving all or none of the options was equivalent and did not affect the outcome."}),"\n",(0,t.jsx)(n.li,{children:"All voters could alter their votes any number of times before the close of the poll."}),"\n",(0,t.jsx)(n.li,{children:"No discretionary lock-voting was in place; all DOT used to vote counts the same."}),"\n",(0,t.jsx)(n.li,{children:"Voting was made on a per-account basis; a single account must have voted the same way and could\nnot split its vote."}),"\n",(0,t.jsx)(n.li,{children:"This vote did not affect any economics of the Polkadot platform. As in, staking rewards,\ninflation, effective market capitalization, and the underlying balances of every account remained\ncompletely unchanged. It was \u201cmerely\u201d about what units the network uses to denominate the balances\ninto \u201cDOT\u201d."}),"\n"]})}),"\n",(0,t.jsx)(n.p,{children:"With a voting period of two weeks set, the redenomination was now in the hands of the Polkadot\ncommunity for a final, binding decision."}),"\n",(0,t.jsx)(n.h2,{id:"the-outcome",children:"The Outcome"}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"redenomination",src:o(33664).A+"",width:"2000",height:"1000"})}),"\n",(0,t.jsxs)(n.p,{children:["After two weeks of voting, the ",(0,t.jsx)(n.a,{href:"https://polkadot.network/the-results-are-in/",children:"results"})," of the\nredenomination vote were tallied. About one-third of the total DOT in the network participated in\nthe vote. The redenomination proposal passed with 86% of the voters favoring a 100x factor increase\n(or two decimal places of precision loss)."]}),"\n",(0,t.jsx)(n.p,{children:"Polkadot's redenomination then took place on 21 August, now known as Denomination Day, at block\n#1_248_328."}),"\n",(0,t.jsx)(n.h3,{id:"what-this-means-for-the-community",children:"What This Means for the Community"}),"\n",(0,t.jsx)(n.p,{children:"If you are a DOT holder or user of the network, then you do not need to take any action. The DOT\nredenomination was a purely front-end change. You still hold the same amount of Plancks after the\nchange, but now it will appear that you hold 100x more DOT. This change applies proportionally to\nevery account."}),"\n",(0,t.jsx)(n.h3,{id:"what-this-means-for-builders-of-tools",children:"What This Means for Builders of Tools"}),"\n",(0,t.jsxs)(n.p,{children:["If you are the builder of a tool that consumes the\n",(0,t.jsx)(n.a,{href:"https://yarnpkg.com/package/@polkadot/api",children:(0,t.jsx)(n.code,{children:"@polkadot/api"})})," package \u2014 then there should be no\nreal changes to be made in your application. The denomination is technically a cosmetic change, and\nevery value remains a constant amount of Plancks."]}),"\n",(0,t.jsx)(n.p,{children:"However \u2014 if you are a builder of a tool that displays DOT balances to users (e.g. a wallet)\nor handles DOT balances in an off-chain or custodial way, then you will need to ensure that you\ndisplay the correct denomination of DOT to users."}),"\n",(0,t.jsxs)(n.p,{children:["Please see our\n",(0,t.jsx)(n.a,{href:"https://docs.google.com/document/d/1yAzoDh99PgR_7dYAKTWLMVu2Fy5Ga-J6t9lof4f4JUw/edit#",children:"Ecosystem Redenomination Guide"}),"\nfor recommendations."]}),"\n",(0,t.jsxs)(n.p,{children:["Please reach out to ",(0,t.jsx)(n.a,{href:"mailto:support@polkadot.network",children:"support@polkadot.network"})," if you need any\nassistance in making sure your software is compatible with the redenomination."]})]})}function m(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(c,{...e})}):c(e)}},67141:(e,n,o)=>{o.d(n,{A:()=>i});var t=o(96540),a=o(74848);const i=function(e){var n,o=e.message,i=(0,t.useState)(!0),s=i[0],r=i[1];return(0,a.jsx)(a.Fragment,{children:s&&(0,a.jsxs)("div",{className:"message-box",children:[(0,a.jsx)("button",{className:"close-button",onClick:function(){r(!1)},children:"\u2716 "}),(0,a.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(n=o,n.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},33664:(e,n,o)=>{o.d(n,{A:()=>t});const t=o.p+"assets/images/redenomination-49b0f06a8bd85c8944fb35b6fd864759.png"},28453:(e,n,o)=>{o.d(n,{R:()=>s,x:()=>r});var t=o(96540);const a={},i=t.createContext(a);function s(e){const n=t.useContext(i);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:s(e.components),t.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/89a76fd2.b93e365e.js b/assets/js/89a76fd2.b93e365e.js new file mode 100644 index 000000000000..ad7f2e57286d --- /dev/null +++ b/assets/js/89a76fd2.b93e365e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2204],{78076:(e,n,o)=>{o.r(n),o.d(n,{assets:()=>d,contentTitle:()=>l,default:()=>m,frontMatter:()=>r,metadata:()=>t,toc:()=>h});const t=JSON.parse('{"id":"learn/archive/learn-redenomination","title":"Redenomination of DOT","description":"Everything about the DOT Token Redenomination.","source":"@site/../docs/learn/archive/learn-redenomination.md","sourceDirName":"learn/archive","slug":"/learn/learn-redenomination","permalink":"/docs/learn/learn-redenomination","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/archive/learn-redenomination.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1714545713000,"frontMatter":{"id":"learn-redenomination","title":"Redenomination of DOT","sidebar_label":"Redenomination of DOT","description":"Everything about the DOT Token Redenomination.","keywords":["DOT","redenomination"],"slug":"../learn-redenomination"},"sidebar":"docs","previous":{"title":"Polkadot Launch Phases","permalink":"/docs/learn/learn-launch"},"next":{"title":"Controller Accounts","permalink":"/docs/learn/learn-controller"}}');var a=o(74848),i=o(28453),s=o(67141);const r={id:"learn-redenomination",title:"Redenomination of DOT",sidebar_label:"Redenomination of DOT",description:"Everything about the DOT Token Redenomination.",keywords:["DOT","redenomination"],slug:"../learn-redenomination"},l=void 0,d={},h=[{value:"Origins",id:"origins",level:2},{value:"The Vote",id:"the-vote",level:2},{value:"The Outcome",id:"the-outcome",level:2},{value:"What This Means for the Community",id:"what-this-means-for-the-community",level:3},{value:"What This Means for Builders of Tools",id:"what-this-means-for-builders-of-tools",level:3}];function c(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(s.A,{message:"The content on this page is archived."}),"\n",(0,a.jsx)(n.p,{children:"On August 21, 2020, the redenomination of DOT, the native token on Polkadot, occurred. From this\ndate, one DOT (old) equals 100 new DOT."}),"\n",(0,a.jsx)(n.admonition,{title:"Denomination Day",type:"info",children:(0,a.jsx)(n.p,{children:"The DOT redenomination took place on 21 August 2020, known as Denomination Day, at block number\n1_248_328."})}),"\n",(0,a.jsxs)(n.p,{children:["While ",(0,a.jsx)(n.a,{href:"/docs/learn-DOT",children:"DOT"}),' is the unit of currency on Polkadot that most people use when\ninteracting with the system, the smallest unit of account is the Planck. A Planck\'s relation to DOT\nis like the relation of a Satoshi to Bitcoin. Before 21 August, the DOT was denominated as 1e12\nPlancks, that is, twelve decimal places. After Denomination Day, DOT is denominated as 1e10 Plancks,\nas in, ten decimal places. DOT denominated to twelve decimal places is referred to as "DOT (old)"\nand DOT denominated to ten decimal places is generally referred to as "DOT". When the difference\nmust be made explicit, the current ten-decimal-denominated DOT is referred to as "',(0,a.jsx)(n.em,{children:"New DOT"}),'".']}),"\n",(0,a.jsx)(n.admonition,{title:"Redenomination Explainer",type:"note",children:(0,a.jsxs)(n.p,{children:["Check out our\n",(0,a.jsx)(n.a,{href:"https://www.youtube.com/watch?v=xXIcnBV4uUE&list=PLOyWqupZ-WGuAuS00rK-pebTMAOxW41W8&index=22&ab_channel=Polkadot",children:"technical explainer video that explains more of Redenomination"}),"."]})}),"\n",(0,a.jsxs)(n.p,{children:["The change in denomination, henceforth referred to as the ",(0,a.jsx)(n.em,{children:"redenomination"}),", was voted on by the\ncommunity of DOT holders. The community decided between four options, to change the DOT denomination\nby a factor of ten, one hundred, one thousand, or not at all. The end result was to change the\ndenomination by a factor of one hundred."]}),"\n",(0,a.jsx)(n.p,{children:"The overall effect of this change was that the number of Polkadot's smallest unit, the Planck,\nremained constant, while the DOT balance for all holders was increased by a factor of one hundred.\nAs one can see from the example below, the number of Plancks a user has does not change, only the\nnumber of Plancks that constitute a single DOT. A user with 1_000_000_000_000 Plancks still has the\nsame number of Plancks but will have 100 DOT under the new denomination, as opposed to one DOT under\nthe old denomination."}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:" Before the change the decimal was here\n v\n 1.000000000000 DOT\n\n 100.0000000000 DOT\n ^\n After the change the decimal is here\n"})}),"\n",(0,a.jsx)(n.admonition,{type:"note",children:(0,a.jsx)(n.p,{children:"There are no state changes with redenomination. There are no transfers. The real change regards the\nsocial consensus around where to put the decimal place when we talk about what constitutes a DOT."})}),"\n",(0,a.jsx)(n.h2,{id:"origins",children:"Origins"}),"\n",(0,a.jsxs)(n.p,{children:["The initial vote for redenomination occurred as a\n",(0,a.jsx)(n.a,{href:"https://kusama.polkassembly.io/referendum/52",children:"referendum"})," on the Kusama blockchain. The referendum\nwas summarized as having four effects if approved by KSM holders."]}),"\n",(0,a.jsx)(n.admonition,{title:"Referendum Summary",type:"info",children:(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:"The total allocations of DOT will increase one hundred times from 10 million to 1 billion."}),"\n",(0,a.jsx)(n.li,{children:"DOT allocation balances will increase by a factor of one hundred, such that 1 DOT will be 100 DOT."}),"\n",(0,a.jsx)(n.li,{children:"The distribution of DOT does not change, and holders of DOT still own an equal share of the\nnetwork as before the change."}),"\n",(0,a.jsx)(n.li,{children:"The precision of DOT will change from 12 decimal places to 10 decimal places."}),"\n",(0,a.jsx)(n.li,{children:"The main benefit of this change is to avoid using small decimals when dealing with DOT and to\nachieve an easier calculation system."}),"\n"]})}),"\n",(0,a.jsxs)(n.p,{children:["The initial referendum was proposed before the Polkadot genesis block, assuming that making a\nredenomination would be simpler before the Polkadot chain was live. However, many in the community\npointed out the disconnect between the two networks and how it was unfair for holders of DOT to be\nimpacted by a vote by a different token holder set. For this reason, Web3 Foundation\n",(0,a.jsx)(n.a,{href:"https://polkadot.network/results-of-dot-redenomination-referendum/",children:"decided to make a new vote on Polkadot"}),"\nwhen it went live, although the Kusama vote ended with a majority in favor of the redenomination\nchange."]}),"\n",(0,a.jsx)(n.p,{children:"Web3 Foundation summarized the decision not to change:"}),"\n",(0,a.jsx)(n.admonition,{type:"note",children:(0,a.jsxs)(n.p,{children:["However, given the non-negligible amount of opposition, including from some within the ranks of Web3\nFoundation and Parity, ",(0,a.jsx)(n.strong,{children:"the Foundation decided that we cannot, in good faith, sponsor the\nredenomination."})]})}),"\n",(0,a.jsx)(n.h2,{id:"the-vote",children:"The Vote"}),"\n",(0,a.jsx)(n.p,{children:"After the genesis block of Polkadot was created and the network was running with a decentralized\ncommunity of validators securing the network, Web3 Foundation decided to put the redenomination\ntopic up for a vote again. This time, the vote was explicitly binding \u2014 meaning that it would\nbe executed if voted through. In comparison, the vote on Kusama was non-binding to capture a signal\nwithout a direct way to affect the Polkadot chain."}),"\n",(0,a.jsxs)(n.p,{children:["Based on the feedback received during the Kusama referendum, the\n",(0,a.jsx)(n.a,{href:"https://polkadot.network/the-first-polkadot-vote/",children:"Polkadot vote"})," was held as an approval vote,\nwith four available options. DOT holders could issue votes for any configuration of the four\noptions: no change, a change of 10x, a change of 100x, or a change of 1000x. The voting logic was\ncontained in a specially-built Substrate pallet included in Polkadot's runtime for this poll."]}),"\n",(0,a.jsx)(n.admonition,{title:"Summary of the Vote",type:"info",children:(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:"Any combination of the four options may have been approved by the voter. There was no need to\nselect only one option."}),"\n",(0,a.jsx)(n.li,{children:"Approving all or none of the options was equivalent and did not affect the outcome."}),"\n",(0,a.jsx)(n.li,{children:"All voters could alter their votes any number of times before the close of the poll."}),"\n",(0,a.jsx)(n.li,{children:"No discretionary lock-voting was in place; all DOT used to vote counts the same."}),"\n",(0,a.jsx)(n.li,{children:"Voting was made on a per-account basis; a single account must have voted the same way and could\nnot split its vote."}),"\n",(0,a.jsx)(n.li,{children:"This vote did not affect any economics of the Polkadot platform. As in, staking rewards,\ninflation, effective market capitalization, and the underlying balances of every account remained\ncompletely unchanged. It was \u201cmerely\u201d about what units the network uses to denominate the balances\ninto \u201cDOT\u201d."}),"\n"]})}),"\n",(0,a.jsx)(n.p,{children:"With a voting period of two weeks set, the redenomination was now in the hands of the Polkadot\ncommunity for a final, binding decision."}),"\n",(0,a.jsx)(n.h2,{id:"the-outcome",children:"The Outcome"}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.img,{alt:"redenomination",src:o(33664).A+"",width:"2000",height:"1000"})}),"\n",(0,a.jsxs)(n.p,{children:["After two weeks of voting, the ",(0,a.jsx)(n.a,{href:"https://polkadot.network/the-results-are-in/",children:"results"})," of the\nredenomination vote were tallied. About one-third of the total DOT in the network participated in\nthe vote. The redenomination proposal passed with 86% of the voters favoring a 100x factor increase\n(or two decimal places of precision loss)."]}),"\n",(0,a.jsx)(n.p,{children:"Polkadot's redenomination then took place on 21 August, now known as Denomination Day, at block\n#1_248_328."}),"\n",(0,a.jsx)(n.h3,{id:"what-this-means-for-the-community",children:"What This Means for the Community"}),"\n",(0,a.jsx)(n.p,{children:"If you are a DOT holder or user of the network, then you do not need to take any action. The DOT\nredenomination was a purely front-end change. You still hold the same amount of Plancks after the\nchange, but now it will appear that you hold 100x more DOT. This change applies proportionally to\nevery account."}),"\n",(0,a.jsx)(n.h3,{id:"what-this-means-for-builders-of-tools",children:"What This Means for Builders of Tools"}),"\n",(0,a.jsxs)(n.p,{children:["If you are the builder of a tool that consumes the\n",(0,a.jsx)(n.a,{href:"https://yarnpkg.com/package/@polkadot/api",children:(0,a.jsx)(n.code,{children:"@polkadot/api"})})," package \u2014 then there should be no\nreal changes to be made in your application. The denomination is technically a cosmetic change, and\nevery value remains a constant amount of Plancks."]}),"\n",(0,a.jsx)(n.p,{children:"However \u2014 if you are a builder of a tool that displays DOT balances to users (e.g. a wallet)\nor handles DOT balances in an off-chain or custodial way, then you will need to ensure that you\ndisplay the correct denomination of DOT to users."}),"\n",(0,a.jsxs)(n.p,{children:["Please see our\n",(0,a.jsx)(n.a,{href:"https://docs.google.com/document/d/1yAzoDh99PgR_7dYAKTWLMVu2Fy5Ga-J6t9lof4f4JUw/edit#",children:"Ecosystem Redenomination Guide"}),"\nfor recommendations."]}),"\n",(0,a.jsxs)(n.p,{children:["Please reach out to ",(0,a.jsx)(n.a,{href:"mailto:support@polkadot.network",children:"support@polkadot.network"})," if you need any\nassistance in making sure your software is compatible with the redenomination."]})]})}function m(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(c,{...e})}):c(e)}},67141:(e,n,o)=>{o.d(n,{A:()=>i});var t=o(96540),a=o(74848);const i=function(e){var n,o=e.message,i=(0,t.useState)(!0),s=i[0],r=i[1];return(0,a.jsx)(a.Fragment,{children:s&&(0,a.jsxs)("div",{className:"message-box",children:[(0,a.jsx)("button",{className:"close-button",onClick:function(){r(!1)},children:"\u2716 "}),(0,a.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(n=o,n.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},33664:(e,n,o)=>{o.d(n,{A:()=>t});const t=o.p+"assets/images/redenomination-49b0f06a8bd85c8944fb35b6fd864759.png"},28453:(e,n,o)=>{o.d(n,{R:()=>s,x:()=>r});var t=o(96540);const a={},i=t.createContext(a);function s(e){const n=t.useContext(i);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:s(e.components),t.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/8a8a7d05.da30f093.js b/assets/js/8a8a7d05.da30f093.js deleted file mode 100644 index eecfe2c9dcde..000000000000 --- a/assets/js/8a8a7d05.da30f093.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4791],{95827:(e,a,n)=>{n.r(a),n.d(a,{assets:()=>l,contentTitle:()=>s,default:()=>d,frontMatter:()=>o,metadata:()=>r,toc:()=>c});var t=n(74848),i=n(28453);const o={id:"build-parachains",title:"Parachain Development",sidebar_label:"Parachain Development",description:"A guide on what it means to become a Parachain and the steps to do so.",keywords:["build","parachain","develop","implement","PDK"],slug:"../build-pdk"},s=void 0,r={id:"build/build-parachains",title:"Parachain Development",description:"A guide on what it means to become a Parachain and the steps to do so.",source:"@site/../docs/build/build-parachains.md",sourceDirName:"build",slug:"/build-pdk",permalink:"/docs/build-pdk",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/build/build-parachains.md",tags:[],version:"current",lastUpdatedBy:"bader y",lastUpdatedAt:1729243924e3,frontMatter:{id:"build-parachains",title:"Parachain Development",sidebar_label:"Parachain Development",description:"A guide on what it means to become a Parachain and the steps to do so.",keywords:["build","parachain","develop","implement","PDK"],slug:"../build-pdk"},sidebar:"docs",previous:{title:"Node Management",permalink:"/docs/build-node-management"},next:{title:"Network Maintainers",permalink:"/docs/maintain-index"}},l={},c=[{value:"What are the Benefits of Deploying a Parachain?",id:"what-are-the-benefits-of-deploying-a-parachain",level:3},{value:"Shared Security (Pooled Security)",id:"shared-security-pooled-security",level:4},{value:"On-Chain Governance (Thought-through Governance)",id:"on-chain-governance-thought-through-governance",level:4},{value:"Scalability",id:"scalability",level:4},{value:"Interoperability",id:"interoperability",level:4},{value:"Things to Consider",id:"things-to-consider",level:2},{value:"Para-nomics",id:"para-nomics",level:3},{value:"Digital Nation States",id:"digital-nation-states",level:4},{value:"Connecting Digital Economies",id:"connecting-digital-economies",level:4},{value:"Para-objects",id:"para-objects",level:3},{value:"Migration",id:"migration",level:3},{value:"Implement a Parachain",id:"implement-a-parachain",level:2},{value:"Parachain Development Kit",id:"parachain-development-kit",level:3},{value:"Key Components",id:"key-components",level:4},{value:"What PDKs Exist?",id:"what-pdks-exist",level:4},{value:"Cumulus",id:"cumulus",level:4},{value:"How to set up your parachain",id:"how-to-set-up-your-parachain",level:3},{value:"Future PDKs",id:"future-pdks",level:3},{value:"Testing a Parachain",id:"testing-a-parachain",level:2},{value:"Paseo Testnet",id:"paseo-testnet",level:3},{value:"What Parachains are on Paseo Now?",id:"what-parachains-are-on-paseo-now",level:3},{value:"Obtaining PAS",id:"obtaining-pas",level:3},{value:"How to Connect to a Parachain",id:"how-to-connect-to-a-parachain",level:3},{value:"Parachain Playground",id:"parachain-playground",level:3},{value:"Deploy",id:"deploy",level:2},{value:"Parachain",id:"parachain",level:3},{value:"Resources",id:"resources",level:2}];function h(e){const a={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",h4:"h4",img:"img",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(a.p,{children:["Parachains are connected to and secured by the relay chain. They benefit from the ",(0,t.jsx)(a.em,{children:"pooled security"}),",\n",(0,t.jsx)(a.em,{children:"thought-through governance"}),", and overall ",(0,t.jsx)(a.em,{children:"scalability"})," of the heterogeneous sharding approach of\nthe network. Creating a parachain can be seen as creating a ",(0,t.jsx)(a.strong,{children:"Layer-1 blockchain"}),", which has its\nown logic and runs in parallel within the Polkadot ecosystem."]}),"\n",(0,t.jsx)(a.p,{children:"Developers can focus on creating state-of-the-art chains that take advantage of Polkadot's\nnext-generation approach. Some examples of what a parachain could be are:"}),"\n",(0,t.jsxs)(a.ul,{children:["\n",(0,t.jsx)(a.li,{children:"DeFi (Decentralized Finance) Applications"}),"\n",(0,t.jsx)(a.li,{children:"Digital Wallets"}),"\n",(0,t.jsx)(a.li,{children:"IoT (Internet of Things) Applications"}),"\n",(0,t.jsx)(a.li,{children:"Gaming"}),"\n",(0,t.jsx)(a.li,{children:"Web 3.0 Infrastructure"}),"\n"]}),"\n",(0,t.jsx)(a.p,{children:"and more."}),"\n",(0,t.jsx)(a.p,{children:"Polkadot aims to be a bet against blockchain maximalism, where the success of Polkadot's\nheterogeneous multi-chain approach will play a key part in the overall advancement of Web 3.0 and\ndecentralized systems. As a result, Polkadot's parachain model was designed with the belief that the\ninternet of the future will have many different types of blockchains working together."}),"\n",(0,t.jsx)(a.h3,{id:"what-are-the-benefits-of-deploying-a-parachain",children:"What are the Benefits of Deploying a Parachain?"}),"\n",(0,t.jsxs)(a.p,{children:["The parachain model attempts to alleviate five key ",(0,t.jsx)(a.em,{children:"build"})," failures of present technology stacks, as\ndescribed in the ",(0,t.jsx)(a.a,{href:"https://polkadot.network/PolkaDotPaper.pdf",children:"Polkadot Whitepaper"}),":"]}),"\n",(0,t.jsxs)(a.ul,{children:["\n",(0,t.jsxs)(a.li,{children:[(0,t.jsx)(a.strong,{children:"Scalability"}),": How much is spent on resources and will the network be subject to bottlenecks?"]}),"\n",(0,t.jsxs)(a.li,{children:[(0,t.jsx)(a.strong,{children:"Isolatability"}),": Are the needs of many accounted for under the same framework?"]}),"\n",(0,t.jsxs)(a.li,{children:[(0,t.jsx)(a.strong,{children:"Developability"}),": Is the system tooling, system support, and overall system integrity\ndependable?"]}),"\n",(0,t.jsxs)(a.li,{children:[(0,t.jsx)(a.strong,{children:"Governance"}),": Can the network remain flexible to evolve and adapt over time? Can decisions be\nmade with sufficient inclusivity, legitimacy, and transparency to provide effective leadership of\na decentralised system?"]}),"\n",(0,t.jsxs)(a.li,{children:[(0,t.jsx)(a.strong,{children:"Applicability"}),": Does the technology address a burning need on its own? Is other \u201cmiddleware\u201d\nrequired to bridge the gap to actual applications?"]}),"\n"]}),"\n",(0,t.jsxs)(a.h4,{id:"shared-security-pooled-security",children:[(0,t.jsx)(a.a,{href:"/docs/learn-parachains",children:"Shared Security"})," (Pooled Security)"]}),"\n",(0,t.jsxs)(a.p,{children:["Parachains can lease the security and interoperability of the Polkadot network purchasing coretime\nwith ",(0,t.jsx)(a.a,{href:"/docs/learn-DOT",children:"DOT"}),". This means that the social costs of building a community around\nyour project and convincing validators to participate in your network security are reduced. Polkadot\nhas strong security, and decentralised application projects wishing to benefit from this security\nwould want to become a parachain to share in that pooled security."]}),"\n",(0,t.jsxs)(a.h4,{id:"on-chain-governance-thought-through-governance",children:[(0,t.jsx)(a.a,{href:"/docs/learn-polkadot-opengov",children:"On-Chain Governance"})," (Thought-through Governance)"]}),"\n",(0,t.jsxs)(a.p,{children:["Most governance systems in blockchains use an off-chain governance mechanism. Polkadot's on-chain\ngovernance encourages maximum participation of token holders and is frictionless and transparent. It\nalso enables ",(0,t.jsx)(a.a,{href:"/docs/learn-runtime-upgrades",children:"forkless upgrades"}),"."]}),"\n",(0,t.jsx)(a.h4,{id:"scalability",children:"Scalability"}),"\n",(0,t.jsx)(a.p,{children:"The sharded multichain network approach allows for what is essentially parallel computation\n(processing power) that can process several transactions in parallel. Isolated blockchains are often\nfaced with the network constraint of processing transactions in sequence, causing bottlenecks."}),"\n",(0,t.jsx)(a.h4,{id:"interoperability",children:"Interoperability"}),"\n",(0,t.jsx)(a.p,{children:"Any decentralised application or chain that wants to enable trustless messaging to other parachains\nalready connected to the relay chain would want to become a parachain. Interoperability between\nsovereign chains involves certain constraints and complex protocols to enable across a wide breadth\nof chains."}),"\n",(0,t.jsxs)(a.p,{children:["With Polkadot, you will get this feature out of the box if you build your application as a\nparachain. The ",(0,t.jsx)(a.a,{href:"/docs/learn-xcm",children:"XCM format"})," allows any parachains to communicate by passing\nmessages between them. Furthermore, as ",(0,t.jsx)(a.a,{href:"/docs/learn-bridges",children:"bridges"})," to other chains are\nconnected (such as those to Bitcoin or Ethereum), Polkadot's parachains will be able to communicate\nwith these as well."]}),"\n",(0,t.jsx)(a.admonition,{type:"note",children:(0,t.jsx)(a.p,{children:"Despite the benefits of becoming a parachain, developers should be conscious of the challenges in\nbecoming a parachain, and whether building a blockchain with an end goal of becoming a parachain is\na viable one for their project."})}),"\n",(0,t.jsxs)(a.p,{children:["On Polkadot, you are able to put your blockchain\u2019s latest block head onto the relay chain. As a\nparachain, the blocks you submit are verified by validators with a Wasm runtime, which can be stored\non the relay chain. You also get the ability to communicate with other parachains using the\n",(0,t.jsx)(a.a,{href:"/docs/learn-xcm",children:"XCM"})," format: an abstract message passing system. Message passing is tracked\non the relay chain - as such, you can prove the delivery of messages and facilitate trustless\ninteractions."]}),"\n",(0,t.jsx)(a.p,{children:"As you can place your blockchain\u2019s latest block head, you can achieve deterministic finalization for\nyour chain. The hard part of reaching finalization for blockchains tends to be the consensus, where,\nin the parachain model, a blockchain can offload consensus to the overall shared network, and focus\non block production. Since the validators have the Wasm runtime for all the parachains, your\nparachain shares the security of the validator pool with everyone on the relay chain."}),"\n",(0,t.jsx)(a.p,{children:"Any validator in the validator pool can help validate your blockchain."}),"\n",(0,t.jsx)(a.h2,{id:"things-to-consider",children:"Things to Consider"}),"\n",(0,t.jsx)(a.h3,{id:"para-nomics",children:(0,t.jsx)(a.a,{href:"/docs/learn-parachains#parachain-economies",children:"Para-nomics"})}),"\n",(0,t.jsx)(a.h4,{id:"digital-nation-states",children:"Digital Nation States"}),"\n",(0,t.jsx)(a.p,{children:"Parachains can be seen as autonomous agents; networks that act as decentralised digital nation\nstates. Parachains have their own communities, rules, economies, governance, treasuries, and\nrelationships with external chains. As a result, the economic policies within parachain ecosystems\nare subject to the developers and overall community of that parachain ecosystem; there isn't\nnecessarily a go-to economic model a parachain should follow."}),"\n",(0,t.jsxs)(a.p,{children:["Moreover, ",(0,t.jsx)(a.em,{children:"becoming a parachain"})," has an opportunity cost associated. Ideally, you can increase the\nvalue of the network by participating in the parachain selection process, and this should serve as a\ngood return on investment."]}),"\n",(0,t.jsx)(a.h4,{id:"connecting-digital-economies",children:"Connecting Digital Economies"}),"\n",(0,t.jsxs)(a.p,{children:[(0,t.jsx)(a.a,{href:"/docs/learn-collator",children:"Collators"})," act as network maintainers and maintain a full node of a\nparachain. They can be incentivized with a native token payout from:"]}),"\n",(0,t.jsxs)(a.ul,{children:["\n",(0,t.jsx)(a.li,{children:"Transaction fees collected"}),"\n",(0,t.jsx)(a.li,{children:"Parachain token sponsorship"}),"\n"]}),"\n",(0,t.jsx)(a.h3,{id:"para-objects",children:"Para-objects"}),"\n",(0,t.jsxs)(a.admonition,{title:"The relay chain can host arbitrary state machines, not just blockchains.",type:"info",children:[(0,t.jsxs)(a.p,{children:["The Polkadot network will encourage the connection and interoperability between different\n",(0,t.jsx)(a.em,{children:"para-objects"}),"."]}),(0,t.jsx)(a.p,{children:"Here, para-objects are referring to objects on the network that operate in parallel, generally,\nparallelizable objects."})]}),"\n",(0,t.jsx)(a.p,{children:"These could be in the form of:"}),"\n",(0,t.jsxs)(a.ul,{children:["\n",(0,t.jsx)(a.li,{children:"System level chains (permanent chains)"}),"\n",(0,t.jsxs)(a.li,{children:[(0,t.jsx)(a.a,{href:"/docs/learn-bridges",children:"Bridge"})," Hubs"]}),"\n",(0,t.jsx)(a.li,{children:"Nested relay chains"}),"\n"]}),"\n",(0,t.jsx)(a.h3,{id:"migration",children:"Migration"}),"\n",(0,t.jsx)(a.p,{children:'Projects that are already functioning as "solochains" or in isolated environments may be interested\nin migrating onto the relay chain as a para-object. While the parachain model has its benefits, it\nmay not be the go-to strategy for some projects.'}),"\n",(0,t.jsx)(a.p,{children:"As a path for migration onto Polkadot, it may be more viable to migrate to one of the chains in one\nof the reserved cores."}),"\n",(0,t.jsxs)(a.p,{children:["For instance, there are currently options for ",(0,t.jsx)(a.a,{href:"/docs/build-smart-contracts",children:"smart contract deployment"}),"\non Kusama through the networks that have secured ",(0,t.jsx)(a.a,{href:"/docs/learn-agile-coretime",children:"coretime"}),"."]}),"\n",(0,t.jsx)(a.h2,{id:"implement-a-parachain",children:"Implement a Parachain"}),"\n",(0,t.jsxs)(a.p,{children:["The Parachain Implementer's Guide is a significant work in progress and maintained by Parity Tech.\n",(0,t.jsx)(a.a,{href:"https://w3f.github.io/parachain-implementers-guide/",children:(0,t.jsx)(a.strong,{children:"The live version"})})," is built from the source\nlocated in the official\n",(0,t.jsx)(a.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/polkadot/roadmap/implementers-guide",children:"Polkadot repository"}),"."]}),"\n",(0,t.jsx)(a.h3,{id:"parachain-development-kit",children:"Parachain Development Kit"}),"\n",(0,t.jsxs)(a.p,{children:["The Parachain Development Kit or ",(0,t.jsx)(a.strong,{children:"PDK"})," is a set of tools that allows developers to easily create a\nparachain. In practice, the PDK will consist of the following key components:"]}),"\n",(0,t.jsxs)(a.ul,{children:["\n",(0,t.jsxs)(a.li,{children:[(0,t.jsx)(a.em,{children:"State transition function"})," : a way for your application to move from one state to another state."]}),"\n",(0,t.jsxs)(a.li,{children:[(0,t.jsx)(a.em,{children:"Collator node"})," : a type of peer-to-peer node in the Polkadot network with certain\nresponsibilities regarding parachains."]}),"\n"]}),"\n",(0,t.jsx)(a.h4,{id:"key-components",children:"Key Components"}),"\n",(0,t.jsxs)(a.p,{children:["The state transition function (STF) can be an abstract way for an application to go from one state\nto another state. The only constraint that Polkadot places on this STF is that it must be easily\nverifiable -- usually through what we call a ",(0,t.jsx)(a.em,{children:"witness"})," or ",(0,t.jsx)(a.em,{children:"proof"}),". It must be so because the Relay\nChain validators will need to check that each state it receives from the collator node is correct\nwithout actually running through the entire computation. Some examples of these proofs include the\nProof-of-Validity blocks or zk-SNARKs, which require less computational resources to verify than\nthey do to generate. The verification asymmetry in the proof generation of the STF is one of the\nintegral insights that allows Polkadot to scale while keeping high-security guarantees."]}),"\n",(0,t.jsxs)(a.p,{children:["A collator node is one of the types of network maintainers in the protocol. They are responsible for\n",(0,t.jsx)(a.strong,{children:"keeping availability"})," of the state of the parachain and the new states returned from the\niteration of the state transition function. They must remain online to keep track of the state and\nalso of the XCMP messages that it will route between itself and other parachains. Collator nodes are\nresponsible for passing the succinct proofs to the relay chain's validators and tracking the latest\nblocks from the relay chain. In essence, a collator node also acts as a light client for the relay\nchain. For more on collator nodes, see the ",(0,t.jsx)(a.a,{href:"/docs/learn-collator",children:"collator page"}),"."]}),"\n",(0,t.jsx)(a.h4,{id:"what-pdks-exist",children:"What PDKs Exist?"}),"\n",(0,t.jsxs)(a.p,{children:["Currently, the only PDK is\n",(0,t.jsx)(a.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/substrate",children:"the Polkadot SDK"})," and\n",(0,t.jsx)(a.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/cumulus",children:"Cumulus"}),"."]}),"\n",(0,t.jsxs)(a.p,{children:[(0,t.jsx)(a.strong,{children:(0,t.jsx)(a.a,{href:"https://substrate.io/",children:"Substrate"})})," is a blockchain framework that provides the basic building\nblocks of a blockchain (things like the networking layer, consensus, a Wasm interpreter) while\nproviding an intuitive way to construct your runtime. Substrate is made to ease the process of\ncreating a new chain, but it does not provide support for relay chain compatibility directly. For\nthis reason, ",(0,t.jsx)(a.code,{children:"Cumulus"}),", an added ",(0,t.jsx)(a.em,{children:"library"})," contains all of the Polkadot compatibility glue code."]}),"\n",(0,t.jsx)(a.h4,{id:"cumulus",children:"Cumulus"}),"\n",(0,t.jsx)(a.admonition,{type:"info",children:(0,t.jsx)(a.p,{children:"Cumulus clouds are shaped sort of like dots. Together, they form an intricate system that is\nbeautiful and functional."})}),"\n",(0,t.jsxs)(a.p,{children:[(0,t.jsx)(a.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/cumulus",children:"Cumulus"})," is an extension to\nSubstrate that makes it easy to make any Substrate-built runtime into a Polkadot-compatible\nparachain."]}),"\n",(0,t.jsx)(a.p,{children:"Cumulus Consensus is a consensus engine for Substrate that follows a relay chain. This runs a Relay\nChain node internally, and dictates to the client and synchronization algorithms which chain to\nfollow, finalize, and treat as correct."}),"\n",(0,t.jsxs)(a.p,{children:["See the\n",(0,t.jsx)(a.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/master/cumulus/docs/overview.md",children:"Cumulus overview"}),"\nfor a more detailed description of Cumulus."]}),"\n",(0,t.jsxs)(a.p,{children:["Cumulus is still in development, but the idea is that it should be simple to take a Substrate chain\nand add the parachain code by importing the crates and adding a single line of code. Keep up-to-date\nwith the latest Cumulus developments from the ",(0,t.jsx)(a.a,{href:"###cumulus",children:"Cumulus section"}),"."]}),"\n",(0,t.jsxs)(a.admonition,{type:"info",children:[(0,t.jsxs)(a.p,{children:["Substrate and Cumulus provide a PDK from the abstraction of the blockchain format, but it is ",(0,t.jsx)(a.strong,{children:"not\nnecessary"})," that a parachain even needs to be a blockchain. For example, a parachain just needs to\nsatisfy the two constraints listed above: ",(0,t.jsx)(a.em,{children:"state transition function"})," and ",(0,t.jsx)(a.em,{children:"collator node"}),"."]}),(0,t.jsx)(a.p,{children:"Everything else is up to the implementer of the PDK."})]}),"\n",(0,t.jsx)(a.p,{children:"Cumulus handles the network compatibility overhead that any parachain would need to implement to be\nconnected to the relay chain. This includes:"}),"\n",(0,t.jsxs)(a.ul,{children:["\n",(0,t.jsx)(a.li,{children:"Cross-chain message passing (XCMP)"}),"\n",(0,t.jsx)(a.li,{children:"Out-of-the-box Collator node setup"}),"\n",(0,t.jsx)(a.li,{children:"An embedded full client of the relay chain"}),"\n",(0,t.jsx)(a.li,{children:"Block authorship compatibility"}),"\n"]}),"\n",(0,t.jsxs)(a.p,{children:["Are you interested in building a PDK? See the ",(0,t.jsx)(a.a,{href:"#future-pdks",children:"future PDKs"})," section for details."]}),"\n",(0,t.jsx)(a.h3,{id:"how-to-set-up-your-parachain",children:"How to set up your parachain"}),"\n",(0,t.jsx)(a.p,{children:"After creating your chain runtime logic with Substrate, you will be able to compile it down to a\nWasm executable. This Wasm code blob will contain the entire state transition function of your\nchain, and is what you will need to deploy your project to the relay chain as a parachain."}),"\n",(0,t.jsx)(a.p,{children:"Validators on the relay chain will use the submitted Wasm code to validate the state transitions of\nyour chain or thread, but doing this requires some additional infrastructure. A validator needs some\nway to stay up to date with the most recent state transitions, since relay chain nodes will not be\nrequired to also be nodes of your chain."}),"\n",(0,t.jsx)(a.p,{children:"This is where the collator node comes into play. A collator is a maintainer of your parachain and\nperforms the critical action of producing new block candidates for your chain and passing them to\nrelay chain validators for inclusion in the relay chain."}),"\n",(0,t.jsx)(a.p,{children:"Substrate comes with its own networking layer built-in but unfortunately only supports solo chains\n(that is, chains that do not connect to the relay chain). However, there is the Cumulus extension\nthat includes a collator node and allows for your Substrate-built logic to be compatible with the\nrelay chain as a parachain."}),"\n",(0,t.jsx)(a.h3,{id:"future-pdks",children:"Future PDKs"}),"\n",(0,t.jsx)(a.admonition,{title:"Call to action",type:"info",children:(0,t.jsxs)(a.p,{children:["Do you want to build a Parachain Development Kit from scratch? The Web3 Foundation is giving grants\nto teams who are doing this, learn more and apply on the\n",(0,t.jsx)(a.a,{href:"https://grants.web3.foundation",children:"W3F grants page"}),"."]})}),"\n",(0,t.jsxs)(a.p,{children:["One example of a PDK W3F is interested in supporting is a\n",(0,t.jsx)(a.a,{href:"https://ethresear.ch/t/roll-up-roll-back-snark-side-chain-17000-tps/3675",children:"roll-up"})," kit that allowed\ndevelopers to create SNARK-based parachains. If we review the roll-up write-up, we see that the\nsystem uses two roles: users that update ",(0,t.jsx)(a.strong,{children:"state"})," and an operator that ",(0,t.jsx)(a.strong,{children:"aggregates the state\nupdates"})," into a single on-chain update. It should be straightforward to see how we can translate\nthis to the parachain terms. The state transition function for a roll-up-like parachain would be\nupdating the state (in practice, most likely a Merkle tree, which would be easily verifiable) from\nthe user inputs. The operator would act as the collator node, which would aggregate the state and\ncreate the zk-SNARK proof that it would hand to a relay chain's validators for verification."]}),"\n",(0,t.jsxs)(a.p,{children:["If you or your team are interested in developing a PDK feel free to apply for a grant on the\n",(0,t.jsx)(a.a,{href:"https://github.com/w3f/Grants-Program",children:"W3F Grants Program repository"}),". There may be grants\navailable for this type of work."]}),"\n",(0,t.jsx)(a.h2,{id:"testing-a-parachain",children:"Testing a Parachain"}),"\n",(0,t.jsx)(a.h3,{id:"paseo-testnet",children:"Paseo Testnet"}),"\n",(0,t.jsxs)(a.p,{children:[(0,t.jsx)(a.a,{href:"https://github.com/paseo-network",children:"Paseo"})," is a testnet built for testing parachains. Paseo utilizes\nCumulus and ",(0,t.jsx)(a.a,{href:"/docs/learn-xcm-transport#hrmp-xcmp-lite",children:"HRMP"})," (Horizontal Relay-routed Message\nPassing) in order to send transfers and messages between parachains."]}),"\n",(0,t.jsxs)(a.p,{children:["Paseo runs a few test ",(0,t.jsx)(a.a,{href:"/docs/learn-system-chains",children:"system parachains"})," and externally developed\nparachains."]}),"\n",(0,t.jsxs)(a.p,{children:["If you would like to start deploying a parachain and trying out Coretime on Paseo, refer to the\n",(0,t.jsx)(a.a,{href:"/docs/build-guides-coretime-start",children:"Coretime Guides"}),"."]}),"\n",(0,t.jsx)(a.h3,{id:"what-parachains-are-on-paseo-now",children:"What Parachains are on Paseo Now?"}),"\n",(0,t.jsxs)(a.p,{children:["You can see the list of included parachains\n",(0,t.jsx)(a.a,{href:"https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fpaseo-rpc.dwellir.com#/parachains",children:"here"}),"."]}),"\n",(0,t.jsx)(a.h3,{id:"obtaining-pas",children:"Obtaining PAS"}),"\n",(0,t.jsxs)(a.p,{children:["Follow the instructions ",(0,t.jsx)(a.a,{href:"/docs/learn-DOT#getting-tokens-on-the-paseo-testnet",children:"here"})," to get PAS\ntokens."]}),"\n",(0,t.jsx)(a.h3,{id:"how-to-connect-to-a-parachain",children:"How to Connect to a Parachain"}),"\n",(0,t.jsxs)(a.p,{children:["If you would like to connect to a parachain via ",(0,t.jsx)(a.a,{href:"https://polkadot.js.org/apps/",children:"Polkadot-JS Apps"}),",\nyou may do so by clicking on the network selection at the top left-hand corner of the navigation and\nselecting any parachain of choice."]}),"\n",(0,t.jsx)(a.p,{children:(0,t.jsx)(a.img,{alt:"paseo parachains",src:n(34027).A+"",width:"622",height:"762"})}),"\n",(0,t.jsxs)(a.p,{children:['For the purpose of these following examples, we will be using the Paseo testnet "Custom Node"\nunderneath "Development", following the\n',(0,t.jsx)(a.a,{href:"/docs/build-guides-coretime-start",children:"parachain and coretime tutorials"}),"."]}),"\n",(0,t.jsx)(a.h3,{id:"parachain-playground",children:"Parachain Playground"}),"\n",(0,t.jsx)(a.p,{children:"You can also take advantage of the account functions offered on Polkadot-JS Apps to test the entire\nParachain onboarding process (e.g. registration and coretime purchase)."}),"\n",(0,t.jsxs)(a.p,{children:["Start a local node on ",(0,t.jsx)(a.a,{href:"/docs/maintain-networks###westend-test-network",children:"Westend"})," by running:"]}),"\n",(0,t.jsx)(a.pre,{children:(0,t.jsx)(a.code,{className:"language-bash",children:"polkadot --chain=westend-dev --alice\n"})}),"\n",(0,t.jsx)(a.p,{children:"Then, connect your local node with Polkadot-JS Apps."}),"\n",(0,t.jsx)(a.p,{children:(0,t.jsx)(a.img,{alt:"parachains playground",src:n(78353).A+"",width:"2528",height:"668"})}),"\n",(0,t.jsx)(a.h2,{id:"deploy",children:"Deploy"}),"\n",(0,t.jsxs)(a.p,{children:["Substrate-based chains, including the Polkadot and Kusama relay chains, use an\n",(0,t.jsx)(a.a,{href:"/docs/learn-account-advanced#address-format",children:"SS58 encoding"})," for their address formats.\n",(0,t.jsx)(a.a,{href:"https://github.com/paritytech/ss58-registry/blob/main/ss58-registry.json",children:"This page"})," serves as the\ncanonical registry for teams to see which chain corresponds to a given prefix, and which prefixes\nare available."]}),"\n",(0,t.jsx)(a.h3,{id:"parachain",children:"Parachain"}),"\n",(0,t.jsx)(a.p,{children:"To include your parachain into the Polkadot network, you will need to reserve a core on the relay\nchain."}),"\n",(0,t.jsxs)(a.p,{children:[(0,t.jsx)(a.a,{href:"/docs/learn-agile-coretime",children:"Coretime"})," can be purchased with DOT to produce blocks\n",(0,t.jsx)(a.a,{href:"/docs/learn-parachains#parachains-vs-on-demand-parachains",children:"continuously or on-demand"})," while\nbenefiting from Polkadot's security. See\n",(0,t.jsx)(a.a,{href:"/docs/learn-guides-coretime-marketplaces",children:"these guides"})," to learn how to purchase coretime."]}),"\n",(0,t.jsx)(a.h2,{id:"resources",children:"Resources"}),"\n",(0,t.jsxs)(a.ul,{children:["\n",(0,t.jsx)(a.li,{children:(0,t.jsx)(a.a,{href:"/docs/build-guides-coretime-start",children:"Getting started with the Polkadot SDK for parachain development"})}),"\n",(0,t.jsx)(a.li,{children:(0,t.jsx)(a.a,{href:"/docs/learn-bridges",children:"Polkadot Bridges"})}),"\n",(0,t.jsx)(a.li,{children:(0,t.jsx)(a.a,{href:"https://polkadot.network/blog/the-path-of-a-parachain-block/",children:"The Path of a Parachain Block"})}),"\n",(0,t.jsx)(a.li,{children:(0,t.jsx)(a.a,{href:"/docs/learn-parachains-protocol",children:"The Path of a Parachain Block (Parachain Protocol page)"})}),"\n",(0,t.jsx)(a.li,{children:(0,t.jsx)(a.a,{href:"https://www.youtube.com/watch?v=fYc1yolanoE",children:"How to become a parachain on Polkadot (Video)"})}),"\n",(0,t.jsx)(a.li,{children:(0,t.jsx)(a.a,{href:"https://polkadot.network/blog/trusted-execution-environments-and-the-polkadot-ecosystem/",children:"Trusted Execution Environments and the Polkadot Ecosystem"})}),"\n"]})]})}function d(e={}){const{wrapper:a}={...(0,i.R)(),...e.components};return a?(0,t.jsx)(a,{...e,children:(0,t.jsx)(h,{...e})}):h(e)}},78353:(e,a,n)=>{n.d(a,{A:()=>t});const t=n.p+"assets/images/parachain-playground-7873519d5357d27cd254133f7c6ae79f.png"},34027:(e,a,n)=>{n.d(a,{A:()=>t});const t=n.p+"assets/images/paseo-chains-febadd33d972479c1ec023bccbec22ac.png"},28453:(e,a,n)=>{n.d(a,{R:()=>s,x:()=>r});var t=n(96540);const i={},o=t.createContext(i);function s(e){const a=t.useContext(o);return t.useMemo((function(){return"function"==typeof e?e(a):{...a,...e}}),[a,e])}function r(e){let a;return a=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:s(e.components),t.createElement(o.Provider,{value:a},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/8a8a7d05.e0ec9e98.js b/assets/js/8a8a7d05.e0ec9e98.js new file mode 100644 index 000000000000..94b75dc0c4ef --- /dev/null +++ b/assets/js/8a8a7d05.e0ec9e98.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4791],{11659:(e,a,n)=>{n.r(a),n.d(a,{assets:()=>l,contentTitle:()=>r,default:()=>d,frontMatter:()=>s,metadata:()=>t,toc:()=>c});const t=JSON.parse('{"id":"build/build-parachains","title":"Parachain Development","description":"A guide on what it means to become a Parachain and the steps to do so.","source":"@site/../docs/build/build-parachains.md","sourceDirName":"build","slug":"/build-pdk","permalink":"/docs/build-pdk","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/build/build-parachains.md","tags":[],"version":"current","lastUpdatedBy":"bader y","lastUpdatedAt":1729243924000,"frontMatter":{"id":"build-parachains","title":"Parachain Development","sidebar_label":"Parachain Development","description":"A guide on what it means to become a Parachain and the steps to do so.","keywords":["build","parachain","develop","implement","PDK"],"slug":"../build-pdk"},"sidebar":"docs","previous":{"title":"Node Management","permalink":"/docs/build-node-management"},"next":{"title":"Network Maintainers","permalink":"/docs/maintain-index"}}');var i=n(74848),o=n(28453);const s={id:"build-parachains",title:"Parachain Development",sidebar_label:"Parachain Development",description:"A guide on what it means to become a Parachain and the steps to do so.",keywords:["build","parachain","develop","implement","PDK"],slug:"../build-pdk"},r=void 0,l={},c=[{value:"What are the Benefits of Deploying a Parachain?",id:"what-are-the-benefits-of-deploying-a-parachain",level:3},{value:"Shared Security (Pooled Security)",id:"shared-security-pooled-security",level:4},{value:"On-Chain Governance (Thought-through Governance)",id:"on-chain-governance-thought-through-governance",level:4},{value:"Scalability",id:"scalability",level:4},{value:"Interoperability",id:"interoperability",level:4},{value:"Things to Consider",id:"things-to-consider",level:2},{value:"Para-nomics",id:"para-nomics",level:3},{value:"Digital Nation States",id:"digital-nation-states",level:4},{value:"Connecting Digital Economies",id:"connecting-digital-economies",level:4},{value:"Para-objects",id:"para-objects",level:3},{value:"Migration",id:"migration",level:3},{value:"Implement a Parachain",id:"implement-a-parachain",level:2},{value:"Parachain Development Kit",id:"parachain-development-kit",level:3},{value:"Key Components",id:"key-components",level:4},{value:"What PDKs Exist?",id:"what-pdks-exist",level:4},{value:"Cumulus",id:"cumulus",level:4},{value:"How to set up your parachain",id:"how-to-set-up-your-parachain",level:3},{value:"Future PDKs",id:"future-pdks",level:3},{value:"Testing a Parachain",id:"testing-a-parachain",level:2},{value:"Paseo Testnet",id:"paseo-testnet",level:3},{value:"What Parachains are on Paseo Now?",id:"what-parachains-are-on-paseo-now",level:3},{value:"Obtaining PAS",id:"obtaining-pas",level:3},{value:"How to Connect to a Parachain",id:"how-to-connect-to-a-parachain",level:3},{value:"Parachain Playground",id:"parachain-playground",level:3},{value:"Deploy",id:"deploy",level:2},{value:"Parachain",id:"parachain",level:3},{value:"Resources",id:"resources",level:2}];function h(e){const a={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",h4:"h4",img:"img",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,o.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(a.p,{children:["Parachains are connected to and secured by the relay chain. They benefit from the ",(0,i.jsx)(a.em,{children:"pooled security"}),",\n",(0,i.jsx)(a.em,{children:"thought-through governance"}),", and overall ",(0,i.jsx)(a.em,{children:"scalability"})," of the heterogeneous sharding approach of\nthe network. Creating a parachain can be seen as creating a ",(0,i.jsx)(a.strong,{children:"Layer-1 blockchain"}),", which has its\nown logic and runs in parallel within the Polkadot ecosystem."]}),"\n",(0,i.jsx)(a.p,{children:"Developers can focus on creating state-of-the-art chains that take advantage of Polkadot's\nnext-generation approach. Some examples of what a parachain could be are:"}),"\n",(0,i.jsxs)(a.ul,{children:["\n",(0,i.jsx)(a.li,{children:"DeFi (Decentralized Finance) Applications"}),"\n",(0,i.jsx)(a.li,{children:"Digital Wallets"}),"\n",(0,i.jsx)(a.li,{children:"IoT (Internet of Things) Applications"}),"\n",(0,i.jsx)(a.li,{children:"Gaming"}),"\n",(0,i.jsx)(a.li,{children:"Web 3.0 Infrastructure"}),"\n"]}),"\n",(0,i.jsx)(a.p,{children:"and more."}),"\n",(0,i.jsx)(a.p,{children:"Polkadot aims to be a bet against blockchain maximalism, where the success of Polkadot's\nheterogeneous multi-chain approach will play a key part in the overall advancement of Web 3.0 and\ndecentralized systems. As a result, Polkadot's parachain model was designed with the belief that the\ninternet of the future will have many different types of blockchains working together."}),"\n",(0,i.jsx)(a.h3,{id:"what-are-the-benefits-of-deploying-a-parachain",children:"What are the Benefits of Deploying a Parachain?"}),"\n",(0,i.jsxs)(a.p,{children:["The parachain model attempts to alleviate five key ",(0,i.jsx)(a.em,{children:"build"})," failures of present technology stacks, as\ndescribed in the ",(0,i.jsx)(a.a,{href:"https://polkadot.network/PolkaDotPaper.pdf",children:"Polkadot Whitepaper"}),":"]}),"\n",(0,i.jsxs)(a.ul,{children:["\n",(0,i.jsxs)(a.li,{children:[(0,i.jsx)(a.strong,{children:"Scalability"}),": How much is spent on resources and will the network be subject to bottlenecks?"]}),"\n",(0,i.jsxs)(a.li,{children:[(0,i.jsx)(a.strong,{children:"Isolatability"}),": Are the needs of many accounted for under the same framework?"]}),"\n",(0,i.jsxs)(a.li,{children:[(0,i.jsx)(a.strong,{children:"Developability"}),": Is the system tooling, system support, and overall system integrity\ndependable?"]}),"\n",(0,i.jsxs)(a.li,{children:[(0,i.jsx)(a.strong,{children:"Governance"}),": Can the network remain flexible to evolve and adapt over time? Can decisions be\nmade with sufficient inclusivity, legitimacy, and transparency to provide effective leadership of\na decentralised system?"]}),"\n",(0,i.jsxs)(a.li,{children:[(0,i.jsx)(a.strong,{children:"Applicability"}),": Does the technology address a burning need on its own? Is other \u201cmiddleware\u201d\nrequired to bridge the gap to actual applications?"]}),"\n"]}),"\n",(0,i.jsxs)(a.h4,{id:"shared-security-pooled-security",children:[(0,i.jsx)(a.a,{href:"/docs/learn-parachains",children:"Shared Security"})," (Pooled Security)"]}),"\n",(0,i.jsxs)(a.p,{children:["Parachains can lease the security and interoperability of the Polkadot network purchasing coretime\nwith ",(0,i.jsx)(a.a,{href:"/docs/learn-DOT",children:"DOT"}),". This means that the social costs of building a community around\nyour project and convincing validators to participate in your network security are reduced. Polkadot\nhas strong security, and decentralised application projects wishing to benefit from this security\nwould want to become a parachain to share in that pooled security."]}),"\n",(0,i.jsxs)(a.h4,{id:"on-chain-governance-thought-through-governance",children:[(0,i.jsx)(a.a,{href:"/docs/learn-polkadot-opengov",children:"On-Chain Governance"})," (Thought-through Governance)"]}),"\n",(0,i.jsxs)(a.p,{children:["Most governance systems in blockchains use an off-chain governance mechanism. Polkadot's on-chain\ngovernance encourages maximum participation of token holders and is frictionless and transparent. It\nalso enables ",(0,i.jsx)(a.a,{href:"/docs/learn-runtime-upgrades",children:"forkless upgrades"}),"."]}),"\n",(0,i.jsx)(a.h4,{id:"scalability",children:"Scalability"}),"\n",(0,i.jsx)(a.p,{children:"The sharded multichain network approach allows for what is essentially parallel computation\n(processing power) that can process several transactions in parallel. Isolated blockchains are often\nfaced with the network constraint of processing transactions in sequence, causing bottlenecks."}),"\n",(0,i.jsx)(a.h4,{id:"interoperability",children:"Interoperability"}),"\n",(0,i.jsx)(a.p,{children:"Any decentralised application or chain that wants to enable trustless messaging to other parachains\nalready connected to the relay chain would want to become a parachain. Interoperability between\nsovereign chains involves certain constraints and complex protocols to enable across a wide breadth\nof chains."}),"\n",(0,i.jsxs)(a.p,{children:["With Polkadot, you will get this feature out of the box if you build your application as a\nparachain. The ",(0,i.jsx)(a.a,{href:"/docs/learn-xcm",children:"XCM format"})," allows any parachains to communicate by passing\nmessages between them. Furthermore, as ",(0,i.jsx)(a.a,{href:"/docs/learn-bridges",children:"bridges"})," to other chains are\nconnected (such as those to Bitcoin or Ethereum), Polkadot's parachains will be able to communicate\nwith these as well."]}),"\n",(0,i.jsx)(a.admonition,{type:"note",children:(0,i.jsx)(a.p,{children:"Despite the benefits of becoming a parachain, developers should be conscious of the challenges in\nbecoming a parachain, and whether building a blockchain with an end goal of becoming a parachain is\na viable one for their project."})}),"\n",(0,i.jsxs)(a.p,{children:["On Polkadot, you are able to put your blockchain\u2019s latest block head onto the relay chain. As a\nparachain, the blocks you submit are verified by validators with a Wasm runtime, which can be stored\non the relay chain. You also get the ability to communicate with other parachains using the\n",(0,i.jsx)(a.a,{href:"/docs/learn-xcm",children:"XCM"})," format: an abstract message passing system. Message passing is tracked\non the relay chain - as such, you can prove the delivery of messages and facilitate trustless\ninteractions."]}),"\n",(0,i.jsx)(a.p,{children:"As you can place your blockchain\u2019s latest block head, you can achieve deterministic finalization for\nyour chain. The hard part of reaching finalization for blockchains tends to be the consensus, where,\nin the parachain model, a blockchain can offload consensus to the overall shared network, and focus\non block production. Since the validators have the Wasm runtime for all the parachains, your\nparachain shares the security of the validator pool with everyone on the relay chain."}),"\n",(0,i.jsx)(a.p,{children:"Any validator in the validator pool can help validate your blockchain."}),"\n",(0,i.jsx)(a.h2,{id:"things-to-consider",children:"Things to Consider"}),"\n",(0,i.jsx)(a.h3,{id:"para-nomics",children:(0,i.jsx)(a.a,{href:"/docs/learn-parachains#parachain-economies",children:"Para-nomics"})}),"\n",(0,i.jsx)(a.h4,{id:"digital-nation-states",children:"Digital Nation States"}),"\n",(0,i.jsx)(a.p,{children:"Parachains can be seen as autonomous agents; networks that act as decentralised digital nation\nstates. Parachains have their own communities, rules, economies, governance, treasuries, and\nrelationships with external chains. As a result, the economic policies within parachain ecosystems\nare subject to the developers and overall community of that parachain ecosystem; there isn't\nnecessarily a go-to economic model a parachain should follow."}),"\n",(0,i.jsxs)(a.p,{children:["Moreover, ",(0,i.jsx)(a.em,{children:"becoming a parachain"})," has an opportunity cost associated. Ideally, you can increase the\nvalue of the network by participating in the parachain selection process, and this should serve as a\ngood return on investment."]}),"\n",(0,i.jsx)(a.h4,{id:"connecting-digital-economies",children:"Connecting Digital Economies"}),"\n",(0,i.jsxs)(a.p,{children:[(0,i.jsx)(a.a,{href:"/docs/learn-collator",children:"Collators"})," act as network maintainers and maintain a full node of a\nparachain. They can be incentivized with a native token payout from:"]}),"\n",(0,i.jsxs)(a.ul,{children:["\n",(0,i.jsx)(a.li,{children:"Transaction fees collected"}),"\n",(0,i.jsx)(a.li,{children:"Parachain token sponsorship"}),"\n"]}),"\n",(0,i.jsx)(a.h3,{id:"para-objects",children:"Para-objects"}),"\n",(0,i.jsxs)(a.admonition,{title:"The relay chain can host arbitrary state machines, not just blockchains.",type:"info",children:[(0,i.jsxs)(a.p,{children:["The Polkadot network will encourage the connection and interoperability between different\n",(0,i.jsx)(a.em,{children:"para-objects"}),"."]}),(0,i.jsx)(a.p,{children:"Here, para-objects are referring to objects on the network that operate in parallel, generally,\nparallelizable objects."})]}),"\n",(0,i.jsx)(a.p,{children:"These could be in the form of:"}),"\n",(0,i.jsxs)(a.ul,{children:["\n",(0,i.jsx)(a.li,{children:"System level chains (permanent chains)"}),"\n",(0,i.jsxs)(a.li,{children:[(0,i.jsx)(a.a,{href:"/docs/learn-bridges",children:"Bridge"})," Hubs"]}),"\n",(0,i.jsx)(a.li,{children:"Nested relay chains"}),"\n"]}),"\n",(0,i.jsx)(a.h3,{id:"migration",children:"Migration"}),"\n",(0,i.jsx)(a.p,{children:'Projects that are already functioning as "solochains" or in isolated environments may be interested\nin migrating onto the relay chain as a para-object. While the parachain model has its benefits, it\nmay not be the go-to strategy for some projects.'}),"\n",(0,i.jsx)(a.p,{children:"As a path for migration onto Polkadot, it may be more viable to migrate to one of the chains in one\nof the reserved cores."}),"\n",(0,i.jsxs)(a.p,{children:["For instance, there are currently options for ",(0,i.jsx)(a.a,{href:"/docs/build-smart-contracts",children:"smart contract deployment"}),"\non Kusama through the networks that have secured ",(0,i.jsx)(a.a,{href:"/docs/learn-agile-coretime",children:"coretime"}),"."]}),"\n",(0,i.jsx)(a.h2,{id:"implement-a-parachain",children:"Implement a Parachain"}),"\n",(0,i.jsxs)(a.p,{children:["The Parachain Implementer's Guide is a significant work in progress and maintained by Parity Tech.\n",(0,i.jsx)(a.a,{href:"https://w3f.github.io/parachain-implementers-guide/",children:(0,i.jsx)(a.strong,{children:"The live version"})})," is built from the source\nlocated in the official\n",(0,i.jsx)(a.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/polkadot/roadmap/implementers-guide",children:"Polkadot repository"}),"."]}),"\n",(0,i.jsx)(a.h3,{id:"parachain-development-kit",children:"Parachain Development Kit"}),"\n",(0,i.jsxs)(a.p,{children:["The Parachain Development Kit or ",(0,i.jsx)(a.strong,{children:"PDK"})," is a set of tools that allows developers to easily create a\nparachain. In practice, the PDK will consist of the following key components:"]}),"\n",(0,i.jsxs)(a.ul,{children:["\n",(0,i.jsxs)(a.li,{children:[(0,i.jsx)(a.em,{children:"State transition function"})," : a way for your application to move from one state to another state."]}),"\n",(0,i.jsxs)(a.li,{children:[(0,i.jsx)(a.em,{children:"Collator node"})," : a type of peer-to-peer node in the Polkadot network with certain\nresponsibilities regarding parachains."]}),"\n"]}),"\n",(0,i.jsx)(a.h4,{id:"key-components",children:"Key Components"}),"\n",(0,i.jsxs)(a.p,{children:["The state transition function (STF) can be an abstract way for an application to go from one state\nto another state. The only constraint that Polkadot places on this STF is that it must be easily\nverifiable -- usually through what we call a ",(0,i.jsx)(a.em,{children:"witness"})," or ",(0,i.jsx)(a.em,{children:"proof"}),". It must be so because the Relay\nChain validators will need to check that each state it receives from the collator node is correct\nwithout actually running through the entire computation. Some examples of these proofs include the\nProof-of-Validity blocks or zk-SNARKs, which require less computational resources to verify than\nthey do to generate. The verification asymmetry in the proof generation of the STF is one of the\nintegral insights that allows Polkadot to scale while keeping high-security guarantees."]}),"\n",(0,i.jsxs)(a.p,{children:["A collator node is one of the types of network maintainers in the protocol. They are responsible for\n",(0,i.jsx)(a.strong,{children:"keeping availability"})," of the state of the parachain and the new states returned from the\niteration of the state transition function. They must remain online to keep track of the state and\nalso of the XCMP messages that it will route between itself and other parachains. Collator nodes are\nresponsible for passing the succinct proofs to the relay chain's validators and tracking the latest\nblocks from the relay chain. In essence, a collator node also acts as a light client for the relay\nchain. For more on collator nodes, see the ",(0,i.jsx)(a.a,{href:"/docs/learn-collator",children:"collator page"}),"."]}),"\n",(0,i.jsx)(a.h4,{id:"what-pdks-exist",children:"What PDKs Exist?"}),"\n",(0,i.jsxs)(a.p,{children:["Currently, the only PDK is\n",(0,i.jsx)(a.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/substrate",children:"the Polkadot SDK"})," and\n",(0,i.jsx)(a.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/cumulus",children:"Cumulus"}),"."]}),"\n",(0,i.jsxs)(a.p,{children:[(0,i.jsx)(a.strong,{children:(0,i.jsx)(a.a,{href:"https://substrate.io/",children:"Substrate"})})," is a blockchain framework that provides the basic building\nblocks of a blockchain (things like the networking layer, consensus, a Wasm interpreter) while\nproviding an intuitive way to construct your runtime. Substrate is made to ease the process of\ncreating a new chain, but it does not provide support for relay chain compatibility directly. For\nthis reason, ",(0,i.jsx)(a.code,{children:"Cumulus"}),", an added ",(0,i.jsx)(a.em,{children:"library"})," contains all of the Polkadot compatibility glue code."]}),"\n",(0,i.jsx)(a.h4,{id:"cumulus",children:"Cumulus"}),"\n",(0,i.jsx)(a.admonition,{type:"info",children:(0,i.jsx)(a.p,{children:"Cumulus clouds are shaped sort of like dots. Together, they form an intricate system that is\nbeautiful and functional."})}),"\n",(0,i.jsxs)(a.p,{children:[(0,i.jsx)(a.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/cumulus",children:"Cumulus"})," is an extension to\nSubstrate that makes it easy to make any Substrate-built runtime into a Polkadot-compatible\nparachain."]}),"\n",(0,i.jsx)(a.p,{children:"Cumulus Consensus is a consensus engine for Substrate that follows a relay chain. This runs a Relay\nChain node internally, and dictates to the client and synchronization algorithms which chain to\nfollow, finalize, and treat as correct."}),"\n",(0,i.jsxs)(a.p,{children:["See the\n",(0,i.jsx)(a.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/master/cumulus/docs/overview.md",children:"Cumulus overview"}),"\nfor a more detailed description of Cumulus."]}),"\n",(0,i.jsxs)(a.p,{children:["Cumulus is still in development, but the idea is that it should be simple to take a Substrate chain\nand add the parachain code by importing the crates and adding a single line of code. Keep up-to-date\nwith the latest Cumulus developments from the ",(0,i.jsx)(a.a,{href:"###cumulus",children:"Cumulus section"}),"."]}),"\n",(0,i.jsxs)(a.admonition,{type:"info",children:[(0,i.jsxs)(a.p,{children:["Substrate and Cumulus provide a PDK from the abstraction of the blockchain format, but it is ",(0,i.jsx)(a.strong,{children:"not\nnecessary"})," that a parachain even needs to be a blockchain. For example, a parachain just needs to\nsatisfy the two constraints listed above: ",(0,i.jsx)(a.em,{children:"state transition function"})," and ",(0,i.jsx)(a.em,{children:"collator node"}),"."]}),(0,i.jsx)(a.p,{children:"Everything else is up to the implementer of the PDK."})]}),"\n",(0,i.jsx)(a.p,{children:"Cumulus handles the network compatibility overhead that any parachain would need to implement to be\nconnected to the relay chain. This includes:"}),"\n",(0,i.jsxs)(a.ul,{children:["\n",(0,i.jsx)(a.li,{children:"Cross-chain message passing (XCMP)"}),"\n",(0,i.jsx)(a.li,{children:"Out-of-the-box Collator node setup"}),"\n",(0,i.jsx)(a.li,{children:"An embedded full client of the relay chain"}),"\n",(0,i.jsx)(a.li,{children:"Block authorship compatibility"}),"\n"]}),"\n",(0,i.jsxs)(a.p,{children:["Are you interested in building a PDK? See the ",(0,i.jsx)(a.a,{href:"#future-pdks",children:"future PDKs"})," section for details."]}),"\n",(0,i.jsx)(a.h3,{id:"how-to-set-up-your-parachain",children:"How to set up your parachain"}),"\n",(0,i.jsx)(a.p,{children:"After creating your chain runtime logic with Substrate, you will be able to compile it down to a\nWasm executable. This Wasm code blob will contain the entire state transition function of your\nchain, and is what you will need to deploy your project to the relay chain as a parachain."}),"\n",(0,i.jsx)(a.p,{children:"Validators on the relay chain will use the submitted Wasm code to validate the state transitions of\nyour chain or thread, but doing this requires some additional infrastructure. A validator needs some\nway to stay up to date with the most recent state transitions, since relay chain nodes will not be\nrequired to also be nodes of your chain."}),"\n",(0,i.jsx)(a.p,{children:"This is where the collator node comes into play. A collator is a maintainer of your parachain and\nperforms the critical action of producing new block candidates for your chain and passing them to\nrelay chain validators for inclusion in the relay chain."}),"\n",(0,i.jsx)(a.p,{children:"Substrate comes with its own networking layer built-in but unfortunately only supports solo chains\n(that is, chains that do not connect to the relay chain). However, there is the Cumulus extension\nthat includes a collator node and allows for your Substrate-built logic to be compatible with the\nrelay chain as a parachain."}),"\n",(0,i.jsx)(a.h3,{id:"future-pdks",children:"Future PDKs"}),"\n",(0,i.jsx)(a.admonition,{title:"Call to action",type:"info",children:(0,i.jsxs)(a.p,{children:["Do you want to build a Parachain Development Kit from scratch? The Web3 Foundation is giving grants\nto teams who are doing this, learn more and apply on the\n",(0,i.jsx)(a.a,{href:"https://grants.web3.foundation",children:"W3F grants page"}),"."]})}),"\n",(0,i.jsxs)(a.p,{children:["One example of a PDK W3F is interested in supporting is a\n",(0,i.jsx)(a.a,{href:"https://ethresear.ch/t/roll-up-roll-back-snark-side-chain-17000-tps/3675",children:"roll-up"})," kit that allowed\ndevelopers to create SNARK-based parachains. If we review the roll-up write-up, we see that the\nsystem uses two roles: users that update ",(0,i.jsx)(a.strong,{children:"state"})," and an operator that ",(0,i.jsx)(a.strong,{children:"aggregates the state\nupdates"})," into a single on-chain update. It should be straightforward to see how we can translate\nthis to the parachain terms. The state transition function for a roll-up-like parachain would be\nupdating the state (in practice, most likely a Merkle tree, which would be easily verifiable) from\nthe user inputs. The operator would act as the collator node, which would aggregate the state and\ncreate the zk-SNARK proof that it would hand to a relay chain's validators for verification."]}),"\n",(0,i.jsxs)(a.p,{children:["If you or your team are interested in developing a PDK feel free to apply for a grant on the\n",(0,i.jsx)(a.a,{href:"https://github.com/w3f/Grants-Program",children:"W3F Grants Program repository"}),". There may be grants\navailable for this type of work."]}),"\n",(0,i.jsx)(a.h2,{id:"testing-a-parachain",children:"Testing a Parachain"}),"\n",(0,i.jsx)(a.h3,{id:"paseo-testnet",children:"Paseo Testnet"}),"\n",(0,i.jsxs)(a.p,{children:[(0,i.jsx)(a.a,{href:"https://github.com/paseo-network",children:"Paseo"})," is a testnet built for testing parachains. Paseo utilizes\nCumulus and ",(0,i.jsx)(a.a,{href:"/docs/learn-xcm-transport#hrmp-xcmp-lite",children:"HRMP"})," (Horizontal Relay-routed Message\nPassing) in order to send transfers and messages between parachains."]}),"\n",(0,i.jsxs)(a.p,{children:["Paseo runs a few test ",(0,i.jsx)(a.a,{href:"/docs/learn-system-chains",children:"system parachains"})," and externally developed\nparachains."]}),"\n",(0,i.jsxs)(a.p,{children:["If you would like to start deploying a parachain and trying out Coretime on Paseo, refer to the\n",(0,i.jsx)(a.a,{href:"/docs/build-guides-coretime-start",children:"Coretime Guides"}),"."]}),"\n",(0,i.jsx)(a.h3,{id:"what-parachains-are-on-paseo-now",children:"What Parachains are on Paseo Now?"}),"\n",(0,i.jsxs)(a.p,{children:["You can see the list of included parachains\n",(0,i.jsx)(a.a,{href:"https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fpaseo-rpc.dwellir.com#/parachains",children:"here"}),"."]}),"\n",(0,i.jsx)(a.h3,{id:"obtaining-pas",children:"Obtaining PAS"}),"\n",(0,i.jsxs)(a.p,{children:["Follow the instructions ",(0,i.jsx)(a.a,{href:"/docs/learn-DOT#getting-tokens-on-the-paseo-testnet",children:"here"})," to get PAS\ntokens."]}),"\n",(0,i.jsx)(a.h3,{id:"how-to-connect-to-a-parachain",children:"How to Connect to a Parachain"}),"\n",(0,i.jsxs)(a.p,{children:["If you would like to connect to a parachain via ",(0,i.jsx)(a.a,{href:"https://polkadot.js.org/apps/",children:"Polkadot-JS Apps"}),",\nyou may do so by clicking on the network selection at the top left-hand corner of the navigation and\nselecting any parachain of choice."]}),"\n",(0,i.jsx)(a.p,{children:(0,i.jsx)(a.img,{alt:"paseo parachains",src:n(34027).A+"",width:"622",height:"762"})}),"\n",(0,i.jsxs)(a.p,{children:['For the purpose of these following examples, we will be using the Paseo testnet "Custom Node"\nunderneath "Development", following the\n',(0,i.jsx)(a.a,{href:"/docs/build-guides-coretime-start",children:"parachain and coretime tutorials"}),"."]}),"\n",(0,i.jsx)(a.h3,{id:"parachain-playground",children:"Parachain Playground"}),"\n",(0,i.jsx)(a.p,{children:"You can also take advantage of the account functions offered on Polkadot-JS Apps to test the entire\nParachain onboarding process (e.g. registration and coretime purchase)."}),"\n",(0,i.jsxs)(a.p,{children:["Start a local node on ",(0,i.jsx)(a.a,{href:"/docs/maintain-networks###westend-test-network",children:"Westend"})," by running:"]}),"\n",(0,i.jsx)(a.pre,{children:(0,i.jsx)(a.code,{className:"language-bash",children:"polkadot --chain=westend-dev --alice\n"})}),"\n",(0,i.jsx)(a.p,{children:"Then, connect your local node with Polkadot-JS Apps."}),"\n",(0,i.jsx)(a.p,{children:(0,i.jsx)(a.img,{alt:"parachains playground",src:n(78353).A+"",width:"2528",height:"668"})}),"\n",(0,i.jsx)(a.h2,{id:"deploy",children:"Deploy"}),"\n",(0,i.jsxs)(a.p,{children:["Substrate-based chains, including the Polkadot and Kusama relay chains, use an\n",(0,i.jsx)(a.a,{href:"/docs/learn-account-advanced#address-format",children:"SS58 encoding"})," for their address formats.\n",(0,i.jsx)(a.a,{href:"https://github.com/paritytech/ss58-registry/blob/main/ss58-registry.json",children:"This page"})," serves as the\ncanonical registry for teams to see which chain corresponds to a given prefix, and which prefixes\nare available."]}),"\n",(0,i.jsx)(a.h3,{id:"parachain",children:"Parachain"}),"\n",(0,i.jsx)(a.p,{children:"To include your parachain into the Polkadot network, you will need to reserve a core on the relay\nchain."}),"\n",(0,i.jsxs)(a.p,{children:[(0,i.jsx)(a.a,{href:"/docs/learn-agile-coretime",children:"Coretime"})," can be purchased with DOT to produce blocks\n",(0,i.jsx)(a.a,{href:"/docs/learn-parachains#parachains-vs-on-demand-parachains",children:"continuously or on-demand"})," while\nbenefiting from Polkadot's security. See\n",(0,i.jsx)(a.a,{href:"/docs/learn-guides-coretime-marketplaces",children:"these guides"})," to learn how to purchase coretime."]}),"\n",(0,i.jsx)(a.h2,{id:"resources",children:"Resources"}),"\n",(0,i.jsxs)(a.ul,{children:["\n",(0,i.jsx)(a.li,{children:(0,i.jsx)(a.a,{href:"/docs/build-guides-coretime-start",children:"Getting started with the Polkadot SDK for parachain development"})}),"\n",(0,i.jsx)(a.li,{children:(0,i.jsx)(a.a,{href:"/docs/learn-bridges",children:"Polkadot Bridges"})}),"\n",(0,i.jsx)(a.li,{children:(0,i.jsx)(a.a,{href:"https://polkadot.network/blog/the-path-of-a-parachain-block/",children:"The Path of a Parachain Block"})}),"\n",(0,i.jsx)(a.li,{children:(0,i.jsx)(a.a,{href:"/docs/learn-parachains-protocol",children:"The Path of a Parachain Block (Parachain Protocol page)"})}),"\n",(0,i.jsx)(a.li,{children:(0,i.jsx)(a.a,{href:"https://www.youtube.com/watch?v=fYc1yolanoE",children:"How to become a parachain on Polkadot (Video)"})}),"\n",(0,i.jsx)(a.li,{children:(0,i.jsx)(a.a,{href:"https://polkadot.network/blog/trusted-execution-environments-and-the-polkadot-ecosystem/",children:"Trusted Execution Environments and the Polkadot Ecosystem"})}),"\n"]})]})}function d(e={}){const{wrapper:a}={...(0,o.R)(),...e.components};return a?(0,i.jsx)(a,{...e,children:(0,i.jsx)(h,{...e})}):h(e)}},78353:(e,a,n)=>{n.d(a,{A:()=>t});const t=n.p+"assets/images/parachain-playground-7873519d5357d27cd254133f7c6ae79f.png"},34027:(e,a,n)=>{n.d(a,{A:()=>t});const t=n.p+"assets/images/paseo-chains-febadd33d972479c1ec023bccbec22ac.png"},28453:(e,a,n)=>{n.d(a,{R:()=>s,x:()=>r});var t=n(96540);const i={},o=t.createContext(i);function s(e){const a=t.useContext(o);return t.useMemo((function(){return"function"==typeof e?e(a):{...a,...e}}),[a,e])}function r(e){let a;return a=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:s(e.components),t.createElement(o.Provider,{value:a},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/8b670b2b.a821cdb2.js b/assets/js/8b670b2b.a821cdb2.js new file mode 100644 index 000000000000..2b5c5592ab73 --- /dev/null +++ b/assets/js/8b670b2b.a821cdb2.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[954],{6705:(e,s,n)=>{n.r(s),n.d(s,{assets:()=>d,contentTitle:()=>l,default:()=>u,frontMatter:()=>r,metadata:()=>o,toc:()=>a});const o=JSON.parse('{"id":"build/build-index","title":"Builder\'s Guides","description":"Reference point for the Polkadot builder guides.","source":"@site/../docs/build/build-index.md","sourceDirName":"build","slug":"/build-index","permalink":"/docs/build-index","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/build/build-index.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1726729589000,"frontMatter":{"id":"build-index","title":"Builder\'s Guides","sidebar_label":"Builder\'s Guides","description":"Reference point for the Polkadot builder guides.","keywords":["build","index","tools","resources"],"slug":"../build-index"}}');var i=n(74848),t=n(28453);const r={id:"build-index",title:"Builder's Guides",sidebar_label:"Builder's Guides",description:"Reference point for the Polkadot builder guides.",keywords:["build","index","tools","resources"],slug:"../build-index"},l=void 0,d={},a=[{value:"Development Guide",id:"development-guide",level:2},{value:"Tools & Resources",id:"tools--resources",level:2},{value:"Grants",id:"grants",level:3},{value:"PCPs",id:"pcps",level:3},{value:"Hackathon",id:"hackathon",level:3}];function c(e){const s={a:"a",h2:"h2",h3:"h3",li:"li",p:"p",ul:"ul",...(0,t.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(s.p,{children:"Welcome to the builder's section of the Polkadot Wiki."}),"\n",(0,i.jsxs)(s.p,{children:["Here, you will discover many development tools and resources in the Polkadot ecosystem. We are\nalways adding new tools and frameworks as we learn about them, so if you are working on something\nthat should be included, please reach out to us on\n",(0,i.jsx)(s.a,{href:"https://matrix.to/#/#polkadot-watercooler:matrix.org",children:"Element"}),"."]}),"\n",(0,i.jsx)(s.h2,{id:"development-guide",children:"Development Guide"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.a,{href:"/docs/build-guide",children:"Starter's Guide"})," - High-level overview on choosing a parachain or smart contract\nfor your project and how to get started."]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.a,{href:"/docs/build-pdk",children:"Parachain Development"})," - Tools for building parachains."]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.a,{href:"/docs/build-smart-contracts",children:"Smart Contracts"})," - Tools to deploy contracts to a parachain."]}),"\n"]}),"\n",(0,i.jsx)(s.h2,{id:"tools--resources",children:"Tools & Resources"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.a,{href:"/docs/build-tools-index",children:"Tools"})," - Maintained list of tools."]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.a,{href:"https://docs.substrate.io/reference/command-line-tools/subkey/",children:"Subkey"})," - Command line utility\nfor generating and inspecting key pairs."]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.a,{href:"https://github.com/polkadot-js/tools",children:"JS tools"})," - TypeScript tools for offline signing of\ntransactions, RPC calls, and more."]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.a,{href:"/docs/build-open-source",children:"Examples"})," - Example projects sourced from the community -- see what others\nare building."]}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"grants",children:"Grants"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.a,{href:"/docs/grants",children:"Grants"})," - Information regarding grants and funding sources available in the\nPolkadot ecosystem."]}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"pcps",children:"PCPs"}),"\n",(0,i.jsx)(s.p,{children:"Polkadot Contracts Proposals (PCPs) are standards for smart contracts in the Polkadot ecosystem."}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.a,{href:"https://github.com/w3f/PCPs",children:"PCP GitHub Repository"})," - Read, create, or discuss standards and\nproposals."]}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"hackathon",children:"Hackathon"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:(0,i.jsx)(s.a,{href:"/docs/build-hackathon",children:"Resources For Running a Hackathon"})}),"\n"]})]})}function u(e={}){const{wrapper:s}={...(0,t.R)(),...e.components};return s?(0,i.jsx)(s,{...e,children:(0,i.jsx)(c,{...e})}):c(e)}},28453:(e,s,n)=>{n.d(s,{R:()=>r,x:()=>l});var o=n(96540);const i={},t=o.createContext(i);function r(e){const s=o.useContext(t);return o.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function l(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),o.createElement(t.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/8b670b2b.f9012647.js b/assets/js/8b670b2b.f9012647.js deleted file mode 100644 index 9c04e593f8d0..000000000000 --- a/assets/js/8b670b2b.f9012647.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[954],{62871:(e,s,n)=>{n.r(s),n.d(s,{assets:()=>d,contentTitle:()=>r,default:()=>u,frontMatter:()=>t,metadata:()=>l,toc:()=>a});var o=n(74848),i=n(28453);const t={id:"build-index",title:"Builder's Guides",sidebar_label:"Builder's Guides",description:"Reference point for the Polkadot builder guides.",keywords:["build","index","tools","resources"],slug:"../build-index"},r=void 0,l={id:"build/build-index",title:"Builder's Guides",description:"Reference point for the Polkadot builder guides.",source:"@site/../docs/build/build-index.md",sourceDirName:"build",slug:"/build-index",permalink:"/docs/build-index",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/build/build-index.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1726729589e3,frontMatter:{id:"build-index",title:"Builder's Guides",sidebar_label:"Builder's Guides",description:"Reference point for the Polkadot builder guides.",keywords:["build","index","tools","resources"],slug:"../build-index"}},d={},a=[{value:"Development Guide",id:"development-guide",level:2},{value:"Tools & Resources",id:"tools--resources",level:2},{value:"Grants",id:"grants",level:3},{value:"PCPs",id:"pcps",level:3},{value:"Hackathon",id:"hackathon",level:3}];function c(e){const s={a:"a",h2:"h2",h3:"h3",li:"li",p:"p",ul:"ul",...(0,i.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(s.p,{children:"Welcome to the builder's section of the Polkadot Wiki."}),"\n",(0,o.jsxs)(s.p,{children:["Here, you will discover many development tools and resources in the Polkadot ecosystem. We are\nalways adding new tools and frameworks as we learn about them, so if you are working on something\nthat should be included, please reach out to us on\n",(0,o.jsx)(s.a,{href:"https://matrix.to/#/#polkadot-watercooler:matrix.org",children:"Element"}),"."]}),"\n",(0,o.jsx)(s.h2,{id:"development-guide",children:"Development Guide"}),"\n",(0,o.jsxs)(s.ul,{children:["\n",(0,o.jsxs)(s.li,{children:[(0,o.jsx)(s.a,{href:"/docs/build-guide",children:"Starter's Guide"})," - High-level overview on choosing a parachain or smart contract\nfor your project and how to get started."]}),"\n",(0,o.jsxs)(s.li,{children:[(0,o.jsx)(s.a,{href:"/docs/build-pdk",children:"Parachain Development"})," - Tools for building parachains."]}),"\n",(0,o.jsxs)(s.li,{children:[(0,o.jsx)(s.a,{href:"/docs/build-smart-contracts",children:"Smart Contracts"})," - Tools to deploy contracts to a parachain."]}),"\n"]}),"\n",(0,o.jsx)(s.h2,{id:"tools--resources",children:"Tools & Resources"}),"\n",(0,o.jsxs)(s.ul,{children:["\n",(0,o.jsxs)(s.li,{children:[(0,o.jsx)(s.a,{href:"/docs/build-tools-index",children:"Tools"})," - Maintained list of tools."]}),"\n",(0,o.jsxs)(s.li,{children:[(0,o.jsx)(s.a,{href:"https://docs.substrate.io/reference/command-line-tools/subkey/",children:"Subkey"})," - Command line utility\nfor generating and inspecting key pairs."]}),"\n",(0,o.jsxs)(s.li,{children:[(0,o.jsx)(s.a,{href:"https://github.com/polkadot-js/tools",children:"JS tools"})," - TypeScript tools for offline signing of\ntransactions, RPC calls, and more."]}),"\n",(0,o.jsxs)(s.li,{children:[(0,o.jsx)(s.a,{href:"/docs/build-open-source",children:"Examples"})," - Example projects sourced from the community -- see what others\nare building."]}),"\n"]}),"\n",(0,o.jsx)(s.h3,{id:"grants",children:"Grants"}),"\n",(0,o.jsxs)(s.ul,{children:["\n",(0,o.jsxs)(s.li,{children:[(0,o.jsx)(s.a,{href:"/docs/grants",children:"Grants"})," - Information regarding grants and funding sources available in the\nPolkadot ecosystem."]}),"\n"]}),"\n",(0,o.jsx)(s.h3,{id:"pcps",children:"PCPs"}),"\n",(0,o.jsx)(s.p,{children:"Polkadot Contracts Proposals (PCPs) are standards for smart contracts in the Polkadot ecosystem."}),"\n",(0,o.jsxs)(s.ul,{children:["\n",(0,o.jsxs)(s.li,{children:[(0,o.jsx)(s.a,{href:"https://github.com/w3f/PCPs",children:"PCP GitHub Repository"})," - Read, create, or discuss standards and\nproposals."]}),"\n"]}),"\n",(0,o.jsx)(s.h3,{id:"hackathon",children:"Hackathon"}),"\n",(0,o.jsxs)(s.ul,{children:["\n",(0,o.jsx)(s.li,{children:(0,o.jsx)(s.a,{href:"/docs/build-hackathon",children:"Resources For Running a Hackathon"})}),"\n"]})]})}function u(e={}){const{wrapper:s}={...(0,i.R)(),...e.components};return s?(0,o.jsx)(s,{...e,children:(0,o.jsx)(c,{...e})}):c(e)}},28453:(e,s,n)=>{n.d(s,{R:()=>r,x:()=>l});var o=n(96540);const i={},t=o.createContext(i);function r(e){const s=o.useContext(t);return o.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function l(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),o.createElement(t.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/8d3a1bf8.92748ace.js b/assets/js/8d3a1bf8.92748ace.js deleted file mode 100644 index 33118ac173d4..000000000000 --- a/assets/js/8d3a1bf8.92748ace.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk=self.webpackChunk||[]).push([[5588],{50373:(e,t,n)=>{"use strict";n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>s,default:()=>p,frontMatter:()=>r,metadata:()=>l,toc:()=>d});var a=n(74848),o=n(28453),i=(n(47379),n(67141));const r={id:"learn-inflation",title:"Token Inflation",sidebar_label:"Token Inflation",description:"Explanation of Token's Inflation in the Polkadot Ecosystem.",keywords:["token","DOT","KSM","inflation"],slug:"../learn-inflation"},s=void 0,l={id:"learn/learn-inflation",title:"Token Inflation",description:"Explanation of Token's Inflation in the Polkadot Ecosystem.",source:"@site/../docs/learn/learn-inflation.md",sourceDirName:"learn",slug:"/learn-inflation",permalink:"/docs/learn-inflation",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-inflation.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1727943421e3,frontMatter:{id:"learn-inflation",title:"Token Inflation",sidebar_label:"Token Inflation",description:"Explanation of Token's Inflation in the Polkadot Ecosystem.",keywords:["token","DOT","KSM","inflation"],slug:"../learn-inflation"},sidebar:"docs",previous:{title:"DOT",permalink:"/docs/learn-DOT"},next:{title:"Asset Hub",permalink:"/docs/learn-assets"}},c={},d=[{value:"Inflation Model",id:"inflation-model",level:2},{value:"Ideal Staking Rate",id:"ideal-staking-rate",level:2}];function h(e){const t={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",img:"img",li:"li",p:"p",strong:"strong",ul:"ul",...(0,o.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.A,{message:"[A simpler inflation model modifiable by OpenGov and a reduction in DOT inflation are currently being discussed.](https://forum.polkadot.network/t/proposal-for-adjusting-polkadots-inflation-system-reducing-issuance-and-complexity/9157)"}),"\n",(0,a.jsxs)(t.p,{children:["DOT (and KSM) is an inflationary token. Inflation is\n",(0,a.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/756ccc35e93d1a78e3c71a0e67ae4da5f1d09f69/runtime/polkadot/src/lib.rs#L576",children:"set to be 10% annually"}),"\non Polkadot (same on Kusama, see\n",(0,a.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/756ccc35e93d1a78e3c71a0e67ae4da5f1d09f69/runtime/kusama/src/lib.rs#L535",children:"here"}),").\nDepending on the supply staked and the ideal staking rate (more about this below), part of the\ninflation is distributed to the stakers and part to the\n",(0,a.jsx)(t.a,{href:"/docs/learn-polkadot-opengov-treasury",children:"treasury"}),"."]}),"\n",(0,a.jsxs)(t.admonition,{type:"info",children:[(0,a.jsxs)(t.p,{children:["DOT went through ",(0,a.jsx)(t.a,{href:"/docs/learn/learn-redenomination",children:"redenomination"})," in 2020 that saw the DOT token\nsupply increase by 100 times."]}),(0,a.jsxs)(t.p,{children:["The current token supply can be seen ",(0,a.jsx)(t.a,{href:"/docs/chain-state-values#total-issuance",children:"here"}),"."]})]}),"\n",(0,a.jsxs)(t.p,{children:["It is essential to understand that the primary objective of inflation is to incentivize network\nparticipants through\n",(0,a.jsx)(t.a,{href:"/docs/learn-consensus#nominated-proof-of-stake",children:"Nominated Proof of Stake (NPoS)"})," and to grow the\nnetwork through funding the on-chain treasury. There is an opportunity cost of keeping the number of\ntokens idle with the current inflation model as the tokens get diluted over time. Economics and game\ntheory suggest that setting an ideal inflation rate is essential for incentivizing the network\nparticipants as well as the growth of the network, and any deviation from it can have adverse\neffects. Reducing the inflation rate could limit growth, while increasing the inflation rate could\nbreak the incentive model of the token. Hence, ",(0,a.jsxs)(t.strong,{children:["token inflation rate is not a forever fixed value,\nand inflation can be updated in the future through\n",(0,a.jsx)(t.a,{href:"/docs/learn-polkadot-opengov",children:"on-chain governance"})]})," based on thorough tokenomics research."]}),"\n",(0,a.jsx)(t.h2,{id:"inflation-model",children:"Inflation Model"}),"\n",(0,a.jsx)(t.p,{children:"The chart below shows the inflation model of the network. Depending on the number of staked tokens,\nthe distribution of the inflation to validators and nominators versus the treasury will change\ndynamically to provide incentives to participate (or not participate) in staking."}),"\n",(0,a.jsxs)(t.p,{children:["There is a ",(0,a.jsxs)(t.a,{href:"#ideal-staking-rate",children:["dynamic ",(0,a.jsx)(t.em,{children:"ideal staking rate"})]})," (in the figure set to 0.6 or 60%)\nthat the network tries to maintain. The inflation model will incentivize network participants to\nstake when the ",(0,a.jsx)(t.em,{children:"current staking rate"})," < ",(0,a.jsx)(t.em,{children:"ideal staking rate"})," and disincentivize staking when\n",(0,a.jsx)(t.em,{children:"current staking rate"})," > ",(0,a.jsx)(t.em,{children:"ideal staking rate"}),". The goal is to have the staking rate meet the ideal\nstaking rate. The current staking rate would be the total amount staked in the current era over the\ntotal token supply, where the total amount staked is the stake of all validators and nominators on\nthe network. The ideal staking rate accounts for having sufficient backing of tokens to prevent the\npossible compromise of security while keeping the native token liquid."]}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"staking",src:n(96991).A+"",width:"1089",height:"762"})}),"\n",(0,a.jsxs)("p",{style:{textAlign:"center"},children:["Source: ",(0,a.jsx)("a",{href:"https://research.web3.foundation/Polkadot/overview/token-economics",children:"Research - Web3 Foundation"})]}),"\n",(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.strong,{children:"x-axis"}),": Proportion of staked tokens"]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.strong,{children:"y-axis"}),": Annualized percentage (inflation and staking rewards, see below)"]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.strong,{children:"Blue line"}),": Annual inflation rate diverted to NPoS, i.e., the total amount of tokens minted to\npay validators and nominators. For instance, 0.1 corresponds to 10% of token inflation diverted to\nstakers. Since annual token inflation is 10%, all inflation is used to pay validators and\nnominators, and 0% of token inflation is diverted to the treasury."]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.strong,{children:"Green line"}),": Annual rewards rate for stakers. For instance, 0.2 corresponds to 20% of annual\nreturns on the staked tokens. You can determine the current annual staking rewards rate by looking\nat the top bar of the staking overview on\n",(0,a.jsx)(t.a,{href:"https://staking.polkadot.cloud/#/overview",children:"the Polkadot Staking Dashboard"}),"."]}),"\n"]}),"\n",(0,a.jsxs)(t.p,{children:["Assuming that the ideal staking rate is 60%, all of the inflation would go to the validators and\nnominators if 60% of all tokens are staked. Any deviation from the 60% - positive or negative -\nsends the proportional remainder to the treasury. Deviations from the ideal staking rate are\nreferred to as ",(0,a.jsx)(t.em,{children:"staking inefficiencies"}),". Thus, the treasury does not receive an inflow of funds from\ninflation when the system staking rate equals the ideal staking rate. See\n",(0,a.jsx)(t.a,{href:"/docs/learn-polkadot-opengov-treasury",children:"this page"})," for more information about treasury inflow\nsources."]}),"\n",(0,a.jsxs)(t.p,{children:["For those who are interested in knowing more about the design of the inflation model for the\nnetwork, please see ",(0,a.jsx)(t.a,{href:"https://research.web3.foundation/Polkadot/overview/token-economics",children:"here"}),"."]}),"\n",(0,a.jsx)(t.h2,{id:"ideal-staking-rate",children:"Ideal Staking Rate"}),"\n",(0,a.jsxs)(t.p,{children:["The ideal staking rate can vary between 45% to 75% based on the number of parachains that occupied a\ncore (this excludes the system parachains), based on the implementation\n",(0,a.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/cd901764a52edc04a6d22bea3a526def593ab2a7/polkadot/runtime/common/src/impls.rs#L80",children:"here"}),"."]}),"\n",(0,a.jsx)(t.p,{children:"Briefly, the ideal staking rate can be calculated as follows:"}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.code,{children:"0.75 - auction_proportion"})}),"\n",(0,a.jsxs)(t.p,{children:["where ",(0,a.jsx)(t.code,{children:"auction_proportion"})," is obtained by computing ",(0,a.jsx)(t.code,{children:"min(auctioned_slots, 60) / 300"}),". The\n",(0,a.jsx)(t.code,{children:"auctioned_slots"})," are all the auctioned slots (or cores) without the cores for system parachains."]}),"\n",(0,a.jsxs)(t.p,{children:["Assuming there are 50 filled cores, of which five are dedicated to\n",(0,a.jsx)(t.a,{href:"/docs/learn-system-chains",children:"system parachains"}),", there are 45 auctioned cores. The\n",(0,a.jsx)(t.code,{children:"auction_proportion"})," is thus ",(0,a.jsx)(t.code,{children:"45 / 300 = 0.15"}),". The ideal staking rate is ",(0,a.jsx)(t.code,{children:"0.75 - 0.15 = 0.6"}),"."]}),"\n",(0,a.jsx)(t.p,{children:"If the amount of tokens staked goes below 60%, then staking rewards for nominators increase,\nincentivizing them to stake more tokens on the network. On the contrary, staking rewards drop if\nstaked tokens exceed the ideal staking rate. This results from the change in the percentage of\nstaking rewards that go to the Treasury."})]})}function p(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,a.jsx)(t,{...e,children:(0,a.jsx)(h,{...e})}):h(e)}},67141:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var a=n(96540),o=n(74848);const i=function(e){var t,n=e.message,i=(0,a.useState)(!0),r=i[0],s=i[1];return(0,o.jsx)(o.Fragment,{children:r&&(0,o.jsxs)("div",{className:"message-box",children:[(0,o.jsx)("button",{className:"close-button",onClick:function(){s(!1)},children:"\u2716 "}),(0,o.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(t=n,t.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},47379:(e,t,n)=>{"use strict";n.d(t,{A:()=>p});var a=n(90675),o=n(10467),i=n(96540),r=n(19588),s=n(2026),l=n(11135);function c(e,t,n){return d.apply(this,arguments)}function d(){return(d=(0,o.A)((0,a.A)().mark((function e(t,n,o){var i,l,c,d,h;return(0,a.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=void 0,l=void 0,e.t0=t,e.next="polkadot"===e.t0?5:"kusama"===e.t0?7:"statemine"===e.t0?9:"statemint"===e.t0?11:"polkadotpeople"===e.t0?13:"kusamapeople"===e.t0?15:17;break;case 5:return i="wss://rpc.polkadot.io",e.abrupt("break",18);case 7:return i="wss://kusama-rpc.polkadot.io/",e.abrupt("break",18);case 9:return i="wss://statemine-rpc.polkadot.io/",e.abrupt("break",18);case 11:return i="wss://statemint-rpc.polkadot.io/",e.abrupt("break",18);case 13:return i="wss://polkadot-people-rpc.polkadot.io/",e.abrupt("break",18);case 15:return i="wss://kusama-people-rpc.polkadot.io/",e.abrupt("break",18);case 17:console.log("Unknown socket url provided, no connection made.");case 18:if(void 0!==i){e.next=22;break}return e.abrupt("return");case 22:return c=new r.E(i),e.next=25,s.G.create({provider:c});case 25:d=e.sent,(h=n.split(".")).forEach((function(e){e in d&&(d=d[e])})),e.t1=h[0],e.next="consts"===e.t1?31:"query"===e.t1?33:38;break;case 31:return l=d.toString(),e.abrupt("break",39);case 33:return e.next=35,d();case 35:return l=(l=e.sent).toString(),e.abrupt("break",39);case 38:console.log("Unknown path prefix ("+h[0]+") in "+n);case 39:return e.abrupt("return",l);case 40:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function h(e,t,n,a){switch(t){case"humanReadable":(0,l.HumanReadable)(e,n,a);break;case"precise":(0,l.Precise)(e,n,a);break;case"blocksToDays":(0,l.BlocksToDays)(e,a);break;case"erasToDays":(0,l.ErasToDays)(e,a,n);break;case"percentage":(0,l.Percentage)(e,a);break;case"permillToPercent":(0,l.PermillToPercent)(e,a);break;case"arrayLength":(0,l.ArrayLength)(e,a);break;default:return void console.log("Ignoring unknown filter type")}}const p=function(e){var t=e.network,n=e.path,r=e.defaultValue,s=e.filter,l=void 0===s?void 0:s,d=(0,i.useState)(""),p=d[0],u=d[1];return t=t.toLowerCase(),(0,i.useEffect)((function(){void 0!==l?h(r.toString(),l,t,u):u(r.toString());var e=void 0;switch(t){case"polkadot":e="wss://rpc.polkadot.io";break;case"kusama":e="wss://kusama-rpc.polkadot.io/";break;case"statemine":e="wss://kusama-asset-hub-rpc.polkadot.io/";break;case"statemint":e="wss://polkadot-asset-hub-rpc.polkadot.io/";break;case"kusamapeople":e="wss://kusama-people-rpc.polkadot.io";break;case"polkadotpeople":e="wss://polkadot-people-rpc.polkadot.io";break;default:console.log("Unknown network provided, "+t)}if(void 0===e)console.log("Failed to connect to a valid websocket, applying default");else{var i=function(){var e=(0,o.A)((0,a.A)().mark((function e(){var o;return(0,a.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,c(t,n,u);case 2:if(void 0!==(o=e.sent)){e.next=7;break}return e.abrupt("return");case 7:void 0!==l?h(o,l,t,u):u(o);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();try{i()}catch(s){console.log(s)}}}),[]),p}},11135:e=>{var t="polkadot",n="kusama",a="statemine",o="statemint",i="polkadotpeople",r="kusamapeople",s={polkadot:{precision:1e10,symbol:"DOT"},kusama:{precision:1e12,symbol:"KSM"},statemint:{precision:1e10,symbol:"DOT"},statemine:{precision:1e12,symbol:"KSM"},polkadotpeople:{precision:1e10,symbol:"DOT"},kusamapeople:{precision:1e12,symbol:"KSM"}};e.exports={HumanReadable:function(e,l,c){var d=void 0;if(l===t||l===o)d=3;else if(l===n||l===a||l===i)d=6;else{if(l!=r)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");d=8}e=parseFloat(e),c((e=Number.isInteger(e/s[l].precision)?e/s[l].precision+" "+s[l].symbol:(e/s[l].precision).toFixed(d)+" "+s[l].symbol).toString())},Precise:function(e,t,n){n(e=(e=parseFloat(e))/s[t].precision+" "+s[t].symbol)},BlocksToDays:function(e,t){t((e=6*e/86400).toString())},ErasToDays:function(e,s,l){var c=void 0;if(l===t||l===o||l==i)c=1;else{if(l!==n&&l!==a&&l!=r)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");c=4}s((e/=c).toString())},Percentage:function(e,t){t((e/=1e7).toString())},PermillToPercent:function(e,t){t((e/=1e4).toString())},ArrayLength:function(e,t){t((e=e.split(",").length).toString())}}},96991:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const a=n.p+"assets/images/rewards-inflation-180df2fa3a0b109245394270a57f7aa2.png"},47790:()=>{}}]); \ No newline at end of file diff --git a/assets/js/8d3a1bf8.d95d2f7f.js b/assets/js/8d3a1bf8.d95d2f7f.js new file mode 100644 index 000000000000..3ca99e06e50e --- /dev/null +++ b/assets/js/8d3a1bf8.d95d2f7f.js @@ -0,0 +1 @@ +(self.webpackChunk=self.webpackChunk||[]).push([[5588],{2203:(e,t,n)=>{"use strict";n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>l,default:()=>p,frontMatter:()=>r,metadata:()=>a,toc:()=>d});const a=JSON.parse('{"id":"learn/learn-inflation","title":"Token Inflation","description":"Explanation of Token\'s Inflation in the Polkadot Ecosystem.","source":"@site/../docs/learn/learn-inflation.md","sourceDirName":"learn","slug":"/learn-inflation","permalink":"/docs/learn-inflation","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-inflation.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1727943421000,"frontMatter":{"id":"learn-inflation","title":"Token Inflation","sidebar_label":"Token Inflation","description":"Explanation of Token\'s Inflation in the Polkadot Ecosystem.","keywords":["token","DOT","KSM","inflation"],"slug":"../learn-inflation"},"sidebar":"docs","previous":{"title":"DOT","permalink":"/docs/learn-DOT"},"next":{"title":"Asset Hub","permalink":"/docs/learn-assets"}}');var o=n(74848),i=n(28453),s=(n(47379),n(67141));const r={id:"learn-inflation",title:"Token Inflation",sidebar_label:"Token Inflation",description:"Explanation of Token's Inflation in the Polkadot Ecosystem.",keywords:["token","DOT","KSM","inflation"],slug:"../learn-inflation"},l=void 0,c={},d=[{value:"Inflation Model",id:"inflation-model",level:2},{value:"Ideal Staking Rate",id:"ideal-staking-rate",level:2}];function h(e){const t={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",img:"img",li:"li",p:"p",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(s.A,{message:"[A simpler inflation model modifiable by OpenGov and a reduction in DOT inflation are currently being discussed.](https://forum.polkadot.network/t/proposal-for-adjusting-polkadots-inflation-system-reducing-issuance-and-complexity/9157)"}),"\n",(0,o.jsxs)(t.p,{children:["DOT (and KSM) is an inflationary token. Inflation is\n",(0,o.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/756ccc35e93d1a78e3c71a0e67ae4da5f1d09f69/runtime/polkadot/src/lib.rs#L576",children:"set to be 10% annually"}),"\non Polkadot (same on Kusama, see\n",(0,o.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/756ccc35e93d1a78e3c71a0e67ae4da5f1d09f69/runtime/kusama/src/lib.rs#L535",children:"here"}),").\nDepending on the supply staked and the ideal staking rate (more about this below), part of the\ninflation is distributed to the stakers and part to the\n",(0,o.jsx)(t.a,{href:"/docs/learn-polkadot-opengov-treasury",children:"treasury"}),"."]}),"\n",(0,o.jsxs)(t.admonition,{type:"info",children:[(0,o.jsxs)(t.p,{children:["DOT went through ",(0,o.jsx)(t.a,{href:"/docs/learn/learn-redenomination",children:"redenomination"})," in 2020 that saw the DOT token\nsupply increase by 100 times."]}),(0,o.jsxs)(t.p,{children:["The current token supply can be seen ",(0,o.jsx)(t.a,{href:"/docs/chain-state-values#total-issuance",children:"here"}),"."]})]}),"\n",(0,o.jsxs)(t.p,{children:["It is essential to understand that the primary objective of inflation is to incentivize network\nparticipants through\n",(0,o.jsx)(t.a,{href:"/docs/learn-consensus#nominated-proof-of-stake",children:"Nominated Proof of Stake (NPoS)"})," and to grow the\nnetwork through funding the on-chain treasury. There is an opportunity cost of keeping the number of\ntokens idle with the current inflation model as the tokens get diluted over time. Economics and game\ntheory suggest that setting an ideal inflation rate is essential for incentivizing the network\nparticipants as well as the growth of the network, and any deviation from it can have adverse\neffects. Reducing the inflation rate could limit growth, while increasing the inflation rate could\nbreak the incentive model of the token. Hence, ",(0,o.jsxs)(t.strong,{children:["token inflation rate is not a forever fixed value,\nand inflation can be updated in the future through\n",(0,o.jsx)(t.a,{href:"/docs/learn-polkadot-opengov",children:"on-chain governance"})]})," based on thorough tokenomics research."]}),"\n",(0,o.jsx)(t.h2,{id:"inflation-model",children:"Inflation Model"}),"\n",(0,o.jsx)(t.p,{children:"The chart below shows the inflation model of the network. Depending on the number of staked tokens,\nthe distribution of the inflation to validators and nominators versus the treasury will change\ndynamically to provide incentives to participate (or not participate) in staking."}),"\n",(0,o.jsxs)(t.p,{children:["There is a ",(0,o.jsxs)(t.a,{href:"#ideal-staking-rate",children:["dynamic ",(0,o.jsx)(t.em,{children:"ideal staking rate"})]})," (in the figure set to 0.6 or 60%)\nthat the network tries to maintain. The inflation model will incentivize network participants to\nstake when the ",(0,o.jsx)(t.em,{children:"current staking rate"})," < ",(0,o.jsx)(t.em,{children:"ideal staking rate"})," and disincentivize staking when\n",(0,o.jsx)(t.em,{children:"current staking rate"})," > ",(0,o.jsx)(t.em,{children:"ideal staking rate"}),". The goal is to have the staking rate meet the ideal\nstaking rate. The current staking rate would be the total amount staked in the current era over the\ntotal token supply, where the total amount staked is the stake of all validators and nominators on\nthe network. The ideal staking rate accounts for having sufficient backing of tokens to prevent the\npossible compromise of security while keeping the native token liquid."]}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{alt:"staking",src:n(96991).A+"",width:"1089",height:"762"})}),"\n",(0,o.jsxs)("p",{style:{textAlign:"center"},children:["Source: ",(0,o.jsx)("a",{href:"https://research.web3.foundation/Polkadot/overview/token-economics",children:"Research - Web3 Foundation"})]}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.strong,{children:"x-axis"}),": Proportion of staked tokens"]}),"\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.strong,{children:"y-axis"}),": Annualized percentage (inflation and staking rewards, see below)"]}),"\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.strong,{children:"Blue line"}),": Annual inflation rate diverted to NPoS, i.e., the total amount of tokens minted to\npay validators and nominators. For instance, 0.1 corresponds to 10% of token inflation diverted to\nstakers. Since annual token inflation is 10%, all inflation is used to pay validators and\nnominators, and 0% of token inflation is diverted to the treasury."]}),"\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.strong,{children:"Green line"}),": Annual rewards rate for stakers. For instance, 0.2 corresponds to 20% of annual\nreturns on the staked tokens. You can determine the current annual staking rewards rate by looking\nat the top bar of the staking overview on\n",(0,o.jsx)(t.a,{href:"https://staking.polkadot.cloud/#/overview",children:"the Polkadot Staking Dashboard"}),"."]}),"\n"]}),"\n",(0,o.jsxs)(t.p,{children:["Assuming that the ideal staking rate is 60%, all of the inflation would go to the validators and\nnominators if 60% of all tokens are staked. Any deviation from the 60% - positive or negative -\nsends the proportional remainder to the treasury. Deviations from the ideal staking rate are\nreferred to as ",(0,o.jsx)(t.em,{children:"staking inefficiencies"}),". Thus, the treasury does not receive an inflow of funds from\ninflation when the system staking rate equals the ideal staking rate. See\n",(0,o.jsx)(t.a,{href:"/docs/learn-polkadot-opengov-treasury",children:"this page"})," for more information about treasury inflow\nsources."]}),"\n",(0,o.jsxs)(t.p,{children:["For those who are interested in knowing more about the design of the inflation model for the\nnetwork, please see ",(0,o.jsx)(t.a,{href:"https://research.web3.foundation/Polkadot/overview/token-economics",children:"here"}),"."]}),"\n",(0,o.jsx)(t.h2,{id:"ideal-staking-rate",children:"Ideal Staking Rate"}),"\n",(0,o.jsxs)(t.p,{children:["The ideal staking rate can vary between 45% to 75% based on the number of parachains that occupied a\ncore (this excludes the system parachains), based on the implementation\n",(0,o.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/cd901764a52edc04a6d22bea3a526def593ab2a7/polkadot/runtime/common/src/impls.rs#L80",children:"here"}),"."]}),"\n",(0,o.jsx)(t.p,{children:"Briefly, the ideal staking rate can be calculated as follows:"}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.code,{children:"0.75 - auction_proportion"})}),"\n",(0,o.jsxs)(t.p,{children:["where ",(0,o.jsx)(t.code,{children:"auction_proportion"})," is obtained by computing ",(0,o.jsx)(t.code,{children:"min(auctioned_slots, 60) / 300"}),". The\n",(0,o.jsx)(t.code,{children:"auctioned_slots"})," are all the auctioned slots (or cores) without the cores for system parachains."]}),"\n",(0,o.jsxs)(t.p,{children:["Assuming there are 50 filled cores, of which five are dedicated to\n",(0,o.jsx)(t.a,{href:"/docs/learn-system-chains",children:"system parachains"}),", there are 45 auctioned cores. The\n",(0,o.jsx)(t.code,{children:"auction_proportion"})," is thus ",(0,o.jsx)(t.code,{children:"45 / 300 = 0.15"}),". The ideal staking rate is ",(0,o.jsx)(t.code,{children:"0.75 - 0.15 = 0.6"}),"."]}),"\n",(0,o.jsx)(t.p,{children:"If the amount of tokens staked goes below 60%, then staking rewards for nominators increase,\nincentivizing them to stake more tokens on the network. On the contrary, staking rewards drop if\nstaked tokens exceed the ideal staking rate. This results from the change in the percentage of\nstaking rewards that go to the Treasury."})]})}function p(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(h,{...e})}):h(e)}},67141:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var a=n(96540),o=n(74848);const i=function(e){var t,n=e.message,i=(0,a.useState)(!0),s=i[0],r=i[1];return(0,o.jsx)(o.Fragment,{children:s&&(0,o.jsxs)("div",{className:"message-box",children:[(0,o.jsx)("button",{className:"close-button",onClick:function(){r(!1)},children:"\u2716 "}),(0,o.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(t=n,t.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},47379:(e,t,n)=>{"use strict";n.d(t,{A:()=>p});var a=n(90675),o=n(10467),i=n(96540),s=n(19588),r=n(2026),l=n(11135);function c(e,t,n){return d.apply(this,arguments)}function d(){return(d=(0,o.A)((0,a.A)().mark((function e(t,n,o){var i,l,c,d,h;return(0,a.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=void 0,l=void 0,e.t0=t,e.next="polkadot"===e.t0?5:"kusama"===e.t0?7:"statemine"===e.t0?9:"statemint"===e.t0?11:"polkadotpeople"===e.t0?13:"kusamapeople"===e.t0?15:17;break;case 5:return i="wss://rpc.polkadot.io",e.abrupt("break",18);case 7:return i="wss://kusama-rpc.polkadot.io/",e.abrupt("break",18);case 9:return i="wss://statemine-rpc.polkadot.io/",e.abrupt("break",18);case 11:return i="wss://statemint-rpc.polkadot.io/",e.abrupt("break",18);case 13:return i="wss://polkadot-people-rpc.polkadot.io/",e.abrupt("break",18);case 15:return i="wss://kusama-people-rpc.polkadot.io/",e.abrupt("break",18);case 17:console.log("Unknown socket url provided, no connection made.");case 18:if(void 0!==i){e.next=22;break}return e.abrupt("return");case 22:return c=new s.E(i),e.next=25,r.G.create({provider:c});case 25:d=e.sent,(h=n.split(".")).forEach((function(e){e in d&&(d=d[e])})),e.t1=h[0],e.next="consts"===e.t1?31:"query"===e.t1?33:38;break;case 31:return l=d.toString(),e.abrupt("break",39);case 33:return e.next=35,d();case 35:return l=(l=e.sent).toString(),e.abrupt("break",39);case 38:console.log("Unknown path prefix ("+h[0]+") in "+n);case 39:return e.abrupt("return",l);case 40:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function h(e,t,n,a){switch(t){case"humanReadable":(0,l.HumanReadable)(e,n,a);break;case"precise":(0,l.Precise)(e,n,a);break;case"blocksToDays":(0,l.BlocksToDays)(e,a);break;case"erasToDays":(0,l.ErasToDays)(e,a,n);break;case"percentage":(0,l.Percentage)(e,a);break;case"permillToPercent":(0,l.PermillToPercent)(e,a);break;case"arrayLength":(0,l.ArrayLength)(e,a);break;default:return void console.log("Ignoring unknown filter type")}}const p=function(e){var t=e.network,n=e.path,s=e.defaultValue,r=e.filter,l=void 0===r?void 0:r,d=(0,i.useState)(""),p=d[0],u=d[1];return t=t.toLowerCase(),(0,i.useEffect)((function(){void 0!==l?h(s.toString(),l,t,u):u(s.toString());var e=void 0;switch(t){case"polkadot":e="wss://rpc.polkadot.io";break;case"kusama":e="wss://kusama-rpc.polkadot.io/";break;case"statemine":e="wss://kusama-asset-hub-rpc.polkadot.io/";break;case"statemint":e="wss://polkadot-asset-hub-rpc.polkadot.io/";break;case"kusamapeople":e="wss://kusama-people-rpc.polkadot.io";break;case"polkadotpeople":e="wss://polkadot-people-rpc.polkadot.io";break;default:console.log("Unknown network provided, "+t)}if(void 0===e)console.log("Failed to connect to a valid websocket, applying default");else{var i=function(){var e=(0,o.A)((0,a.A)().mark((function e(){var o;return(0,a.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,c(t,n,u);case 2:if(void 0!==(o=e.sent)){e.next=7;break}return e.abrupt("return");case 7:void 0!==l?h(o,l,t,u):u(o);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();try{i()}catch(r){console.log(r)}}}),[]),p}},11135:e=>{var t="polkadot",n="kusama",a="statemine",o="statemint",i="polkadotpeople",s="kusamapeople",r={polkadot:{precision:1e10,symbol:"DOT"},kusama:{precision:1e12,symbol:"KSM"},statemint:{precision:1e10,symbol:"DOT"},statemine:{precision:1e12,symbol:"KSM"},polkadotpeople:{precision:1e10,symbol:"DOT"},kusamapeople:{precision:1e12,symbol:"KSM"}};e.exports={HumanReadable:function(e,l,c){var d=void 0;if(l===t||l===o)d=3;else if(l===n||l===a||l===i)d=6;else{if(l!=s)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");d=8}e=parseFloat(e),c((e=Number.isInteger(e/r[l].precision)?e/r[l].precision+" "+r[l].symbol:(e/r[l].precision).toFixed(d)+" "+r[l].symbol).toString())},Precise:function(e,t,n){n(e=(e=parseFloat(e))/r[t].precision+" "+r[t].symbol)},BlocksToDays:function(e,t){t((e=6*e/86400).toString())},ErasToDays:function(e,r,l){var c=void 0;if(l===t||l===o||l==i)c=1;else{if(l!==n&&l!==a&&l!=s)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");c=4}r((e/=c).toString())},Percentage:function(e,t){t((e/=1e7).toString())},PermillToPercent:function(e,t){t((e/=1e4).toString())},ArrayLength:function(e,t){t((e=e.split(",").length).toString())}}},96991:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const a=n.p+"assets/images/rewards-inflation-180df2fa3a0b109245394270a57f7aa2.png"},47790:()=>{}}]); \ No newline at end of file diff --git a/assets/js/8d48ec84.06b5e7e1.js b/assets/js/8d48ec84.06b5e7e1.js deleted file mode 100644 index 8191f40dc26d..000000000000 --- a/assets/js/8d48ec84.06b5e7e1.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2615],{90640:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>c,contentTitle:()=>t,default:()=>h,frontMatter:()=>i,metadata:()=>d,toc:()=>o});var r=s(74848),a=s(28453);const i={id:"frequency-dashboards",title:"Frequency Dashboards",sidebar_label:"Frequency",description:"Frequency is a parachain on Polkadot focusing on decentralized communication solutions.",keywords:["polkadot","dashboard","dune","frequency","communication"],slug:"../frequency-dashboards"},t="Frequency Dashboards",d={id:"general/dune-analytics/parachain-dashboards/frequency-dashboards",title:"Frequency Dashboards",description:"Frequency is a parachain on Polkadot focusing on decentralized communication solutions.",source:"@site/../docs/general/dune-analytics/parachain-dashboards/frequency-dashboards.md",sourceDirName:"general/dune-analytics/parachain-dashboards",slug:"/general/dune-analytics/frequency-dashboards",permalink:"/docs/general/dune-analytics/frequency-dashboards",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/parachain-dashboards/frequency-dashboards.md",tags:[],version:"current",lastUpdatedBy:"MK",lastUpdatedAt:1719215716e3,frontMatter:{id:"frequency-dashboards",title:"Frequency Dashboards",sidebar_label:"Frequency",description:"Frequency is a parachain on Polkadot focusing on decentralized communication solutions.",keywords:["polkadot","dashboard","dune","frequency","communication"],slug:"../frequency-dashboards"},sidebar:"docs",previous:{title:"EnergyWebX",permalink:"/docs/general/dune-analytics/energywebx-dashboards"},next:{title:"Hydration",permalink:"/docs/general/dune-analytics/hydration-dashboards"}},c={},o=[{value:"Overview",id:"overview",level:2},{value:"Featured Dashboards on Dune",id:"featured-dashboards-on-dune",level:2},{value:"Key Tables",id:"key-tables",level:2},{value:"Useful Queries",id:"useful-queries",level:2},{value:"Getting Started with Queries",id:"getting-started-with-queries",level:2}];function l(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,a.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.header,{children:(0,r.jsx)(n.h1,{id:"frequency-dashboards",children:"Frequency Dashboards"})}),"\n",(0,r.jsx)(n.h2,{id:"overview",children:"Overview"}),"\n",(0,r.jsx)(n.p,{children:"Frequency is a parachain on Polkadot focusing on decentralized communication solutions. It allows\nthe creation and management of decentralized networks for various applications, enhancing data\nprivacy and security."}),"\n",(0,r.jsx)(n.h2,{id:"featured-dashboards-on-dune",children:"Featured Dashboards on Dune"}),"\n",(0,r.jsx)(n.p,{children:"Here you will find a variety of dashboards that help visualize data from the Frequency parachain:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"https://dune.com/substrate/frequency",children:"Frequency Dashboard"}),": A comprehensive view of the\nactivities within the Frequency parachain."]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:["Please also visit our dashboards for Frequency on\n",(0,r.jsx)(n.a,{href:"https://dune.com/discover/content/relevant?q=title:Frequency%20author:substrate",children:"Dune Analytics"}),"."]}),"\n",(0,r.jsx)(n.h2,{id:"key-tables",children:"Key Tables"}),"\n",(0,r.jsx)(n.p,{children:"Data from the Frequency parachain is organized into several key tables:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"frequency.balances"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"frequency.blocks"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"frequency.calls"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"frequency.events"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"frequency.extrinsics"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"frequency.transfers"})}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:["Start building your own queries using granular data on Dune\n",(0,r.jsx)(n.a,{href:"https://dune.com/queries?category=canonical&namespace=frequency",children:"here"}),"."]}),"\n",(0,r.jsx)(n.h2,{id:"useful-queries",children:"Useful Queries"}),"\n",(0,r.jsx)(n.p,{children:"Some useful queries for Frequency are provided:"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"https://dune.com/queries/3781175",children:"Frequency Schema List (Off-chain Payload)"}),"\n",(0,r.jsx)(n.a,{href:"https://dune.com/queries/3760992",children:"Frequency Schema List"}),"\n",(0,r.jsx)(n.a,{href:"https://dune.com/queries/3820268",children:"Frequency MSA Count"})]}),"\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Title"}),(0,r.jsx)(n.th,{children:"Query"}),(0,r.jsx)(n.th,{children:"Description"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Frequency Schema List (Off-chain Payload)"}),(0,r.jsx)(n.td,{children:(0,r.jsx)(n.a,{href:"https://dune.com/queries/3781175",children:"query_3781175"})}),(0,r.jsx)(n.td,{children:"Provides a list of schemas used in the off-chain payload of Frequency."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Frequency Schema List"}),(0,r.jsx)(n.td,{children:(0,r.jsx)(n.a,{href:"https://dune.com/queries/3760992",children:"query_3760992"})}),(0,r.jsx)(n.td,{children:"Lists the schemas used in Frequency."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Frequency MSA Count"}),(0,r.jsx)(n.td,{children:(0,r.jsx)(n.a,{href:"https://dune.com/queries/3820268",children:"query_3820268"})}),(0,r.jsx)(n.td,{children:"Displays the count of Message Source Accounts (MSAs) extrinsics in Frequency."})]})]})]}),"\n",(0,r.jsx)(n.h2,{id:"getting-started-with-queries",children:"Getting Started with Queries"}),"\n",(0,r.jsx)(n.p,{children:"To get started with querying data from Unique, you are welcome to use the mentioned materialized\nqueries. You can use the following DuneSQL queries as examples:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-sql",metastring:'title="Frequency Extrinsics by Day" showLineNumbers',children:"SELECT\n DATE_TRUNC('day', block_time) AS day,\n section || '_' || method AS section_method,\n COUNT(*) AS cnt\nFROM\n frequency.extrinsics\nWHERE\n section || '_' || method IN (\n SELECT section_method\n FROM unnest(SPLIT('{{section_method}}', ',')) AS c(section_method)\n )\nGROUP BY\n DATE_TRUNC('day', block_time),\n section || '_' || method;\n"})}),"\n",(0,r.jsx)(n.p,{children:"Query result:"}),"\n",(0,r.jsx)("iframe",{src:"https://dune.com/embeds/3760873/6325506/d2393c18-9438-4199-bbd9-27cc28324e6f",height:"350",width:"100%"}),"\n",(0,r.jsx)(n.admonition,{title:"DuneSQL Referece",type:"info",children:(0,r.jsxs)(n.p,{children:["For more information on DuneSQL, please refer to the ",(0,r.jsx)(n.a,{href:"/docs/general/dunesql-cheatsheet",children:"DuneSQL Cheatsheet"}),"\nand\n",(0,r.jsx)(n.a,{href:"https://docs.dune.com/query-engine/Functions-and-operators/index",children:"DuneSQL Official Documentation"}),"."]})})]})}function h(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(l,{...e})}):l(e)}},28453:(e,n,s)=>{s.d(n,{R:()=>t,x:()=>d});var r=s(96540);const a={},i=r.createContext(a);function t(e){const n=r.useContext(i);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:t(e.components),r.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/8d48ec84.85896a28.js b/assets/js/8d48ec84.85896a28.js new file mode 100644 index 000000000000..49c4995dce33 --- /dev/null +++ b/assets/js/8d48ec84.85896a28.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2615],{43996:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>c,contentTitle:()=>d,default:()=>h,frontMatter:()=>i,metadata:()=>r,toc:()=>o});const r=JSON.parse('{"id":"general/dune-analytics/parachain-dashboards/frequency-dashboards","title":"Frequency Dashboards","description":"Frequency is a parachain on Polkadot focusing on decentralized communication solutions.","source":"@site/../docs/general/dune-analytics/parachain-dashboards/frequency-dashboards.md","sourceDirName":"general/dune-analytics/parachain-dashboards","slug":"/general/dune-analytics/frequency-dashboards","permalink":"/docs/general/dune-analytics/frequency-dashboards","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/parachain-dashboards/frequency-dashboards.md","tags":[],"version":"current","lastUpdatedBy":"MK","lastUpdatedAt":1719215716000,"frontMatter":{"id":"frequency-dashboards","title":"Frequency Dashboards","sidebar_label":"Frequency","description":"Frequency is a parachain on Polkadot focusing on decentralized communication solutions.","keywords":["polkadot","dashboard","dune","frequency","communication"],"slug":"../frequency-dashboards"},"sidebar":"docs","previous":{"title":"EnergyWebX","permalink":"/docs/general/dune-analytics/energywebx-dashboards"},"next":{"title":"Hydration","permalink":"/docs/general/dune-analytics/hydration-dashboards"}}');var a=s(74848),t=s(28453);const i={id:"frequency-dashboards",title:"Frequency Dashboards",sidebar_label:"Frequency",description:"Frequency is a parachain on Polkadot focusing on decentralized communication solutions.",keywords:["polkadot","dashboard","dune","frequency","communication"],slug:"../frequency-dashboards"},d="Frequency Dashboards",c={},o=[{value:"Overview",id:"overview",level:2},{value:"Featured Dashboards on Dune",id:"featured-dashboards-on-dune",level:2},{value:"Key Tables",id:"key-tables",level:2},{value:"Useful Queries",id:"useful-queries",level:2},{value:"Getting Started with Queries",id:"getting-started-with-queries",level:2}];function l(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,t.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.header,{children:(0,a.jsx)(n.h1,{id:"frequency-dashboards",children:"Frequency Dashboards"})}),"\n",(0,a.jsx)(n.h2,{id:"overview",children:"Overview"}),"\n",(0,a.jsx)(n.p,{children:"Frequency is a parachain on Polkadot focusing on decentralized communication solutions. It allows\nthe creation and management of decentralized networks for various applications, enhancing data\nprivacy and security."}),"\n",(0,a.jsx)(n.h2,{id:"featured-dashboards-on-dune",children:"Featured Dashboards on Dune"}),"\n",(0,a.jsx)(n.p,{children:"Here you will find a variety of dashboards that help visualize data from the Frequency parachain:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.a,{href:"https://dune.com/substrate/frequency",children:"Frequency Dashboard"}),": A comprehensive view of the\nactivities within the Frequency parachain."]}),"\n"]}),"\n",(0,a.jsxs)(n.p,{children:["Please also visit our dashboards for Frequency on\n",(0,a.jsx)(n.a,{href:"https://dune.com/discover/content/relevant?q=title:Frequency%20author:substrate",children:"Dune Analytics"}),"."]}),"\n",(0,a.jsx)(n.h2,{id:"key-tables",children:"Key Tables"}),"\n",(0,a.jsx)(n.p,{children:"Data from the Frequency parachain is organized into several key tables:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.code,{children:"frequency.balances"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.code,{children:"frequency.blocks"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.code,{children:"frequency.calls"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.code,{children:"frequency.events"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.code,{children:"frequency.extrinsics"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.code,{children:"frequency.transfers"})}),"\n"]}),"\n",(0,a.jsxs)(n.p,{children:["Start building your own queries using granular data on Dune\n",(0,a.jsx)(n.a,{href:"https://dune.com/queries?category=canonical&namespace=frequency",children:"here"}),"."]}),"\n",(0,a.jsx)(n.h2,{id:"useful-queries",children:"Useful Queries"}),"\n",(0,a.jsx)(n.p,{children:"Some useful queries for Frequency are provided:"}),"\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.a,{href:"https://dune.com/queries/3781175",children:"Frequency Schema List (Off-chain Payload)"}),"\n",(0,a.jsx)(n.a,{href:"https://dune.com/queries/3760992",children:"Frequency Schema List"}),"\n",(0,a.jsx)(n.a,{href:"https://dune.com/queries/3820268",children:"Frequency MSA Count"})]}),"\n",(0,a.jsxs)(n.table,{children:[(0,a.jsx)(n.thead,{children:(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.th,{children:"Title"}),(0,a.jsx)(n.th,{children:"Query"}),(0,a.jsx)(n.th,{children:"Description"})]})}),(0,a.jsxs)(n.tbody,{children:[(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:"Frequency Schema List (Off-chain Payload)"}),(0,a.jsx)(n.td,{children:(0,a.jsx)(n.a,{href:"https://dune.com/queries/3781175",children:"query_3781175"})}),(0,a.jsx)(n.td,{children:"Provides a list of schemas used in the off-chain payload of Frequency."})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:"Frequency Schema List"}),(0,a.jsx)(n.td,{children:(0,a.jsx)(n.a,{href:"https://dune.com/queries/3760992",children:"query_3760992"})}),(0,a.jsx)(n.td,{children:"Lists the schemas used in Frequency."})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:"Frequency MSA Count"}),(0,a.jsx)(n.td,{children:(0,a.jsx)(n.a,{href:"https://dune.com/queries/3820268",children:"query_3820268"})}),(0,a.jsx)(n.td,{children:"Displays the count of Message Source Accounts (MSAs) extrinsics in Frequency."})]})]})]}),"\n",(0,a.jsx)(n.h2,{id:"getting-started-with-queries",children:"Getting Started with Queries"}),"\n",(0,a.jsx)(n.p,{children:"To get started with querying data from Unique, you are welcome to use the mentioned materialized\nqueries. You can use the following DuneSQL queries as examples:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-sql",metastring:'title="Frequency Extrinsics by Day" showLineNumbers',children:"SELECT\n DATE_TRUNC('day', block_time) AS day,\n section || '_' || method AS section_method,\n COUNT(*) AS cnt\nFROM\n frequency.extrinsics\nWHERE\n section || '_' || method IN (\n SELECT section_method\n FROM unnest(SPLIT('{{section_method}}', ',')) AS c(section_method)\n )\nGROUP BY\n DATE_TRUNC('day', block_time),\n section || '_' || method;\n"})}),"\n",(0,a.jsx)(n.p,{children:"Query result:"}),"\n",(0,a.jsx)("iframe",{src:"https://dune.com/embeds/3760873/6325506/d2393c18-9438-4199-bbd9-27cc28324e6f",height:"350",width:"100%"}),"\n",(0,a.jsx)(n.admonition,{title:"DuneSQL Referece",type:"info",children:(0,a.jsxs)(n.p,{children:["For more information on DuneSQL, please refer to the ",(0,a.jsx)(n.a,{href:"/docs/general/dunesql-cheatsheet",children:"DuneSQL Cheatsheet"}),"\nand\n",(0,a.jsx)(n.a,{href:"https://docs.dune.com/query-engine/Functions-and-operators/index",children:"DuneSQL Official Documentation"}),"."]})})]})}function h(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(l,{...e})}):l(e)}},28453:(e,n,s)=>{s.d(n,{R:()=>i,x:()=>d});var r=s(96540);const a={},t=r.createContext(a);function i(e){const n=r.useContext(t);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:i(e.components),r.createElement(t.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/8dd7cee0.64432729.js b/assets/js/8dd7cee0.64432729.js deleted file mode 100644 index a4ce998f43c4..000000000000 --- a/assets/js/8dd7cee0.64432729.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7147],{52872:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>h,contentTitle:()=>d,default:()=>m,frontMatter:()=>o,metadata:()=>l,toc:()=>c});var a=t(74848),i=t(28453),r=t(11470),s=t(19365);const o={id:"doc-thousand-validators",title:"Thousand Validators Programme",sidebar_label:"Thousand Validators",description:"The Thousand Validators Program and How it can Support your Validator Endeavors.",keywords:["thousand validators program","validator","validate","maintain","TVP"],slug:"../thousand-validators"},d=void 0,l={id:"general/doc-thousand-validators",title:"Thousand Validators Programme",description:"The Thousand Validators Program and How it can Support your Validator Endeavors.",source:"@site/../docs/general/thousand-validators.md",sourceDirName:"general",slug:"/thousand-validators",permalink:"/docs/thousand-validators",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/thousand-validators.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1727168669e3,frontMatter:{id:"doc-thousand-validators",title:"Thousand Validators Programme",sidebar_label:"Thousand Validators",description:"The Thousand Validators Program and How it can Support your Validator Endeavors.",keywords:["thousand validators program","validator","validate","maintain","TVP"],slug:"../thousand-validators"},sidebar:"docs",previous:{title:"Alpha Program",permalink:"/docs/alpha-program"},next:{title:"Thousand Contributors",permalink:"/docs/thousand-contributors"}},h={},c=[{value:"How it Works",id:"how-it-works",level:2},{value:"Setting up a Validator",id:"setting-up-a-validator",level:2},{value:"How to Apply",id:"how-to-apply",level:2},{value:"Requirements",id:"requirements",level:4},{value:"Nominators",id:"nominators",level:4},{value:"Selection",id:"selection",level:2},{value:"Weights",id:"weights",level:3},{value:"Inclusion",id:"inclusion",level:4},{value:"Span Inclusion *",id:"span-inclusion-",level:4},{value:"Discovered *",id:"discovered-",level:4},{value:"Nominated *",id:"nominated-",level:4},{value:"Rank *",id:"rank-",level:4},{value:"Unclaimed",id:"unclaimed",level:4},{value:"Bonded *",id:"bonded-",level:4},{value:"Faults *",id:"faults-",level:4},{value:"Offline time",id:"offline-time",level:4},{value:"Location *",id:"location-",level:4},{value:"Council",id:"council",level:4},{value:"Democracy",id:"democracy",level:4},{value:"Frequently asked questions",id:"frequently-asked-questions",level:2},{value:"Resources",id:"resources",level:2}];function u(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",h4:"h4",li:"li",ol:"ol",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,i.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.p,{children:"The Thousand Validators Programme is an initiative by Web3 Foundation and Parity Technologies to use\nthe funds held by both organizations to nominate validators in the community."}),"\n",(0,a.jsx)(n.p,{children:"It serves two major purposes:"}),"\n",(0,a.jsxs)(n.ol,{children:["\n",(0,a.jsx)(n.li,{children:"Give validators a structured on-ramp to join the active set of validators on Kusama and Polkadot"}),"\n",(0,a.jsx)(n.li,{children:"Further decentralize the validator active set."}),"\n"]}),"\n",(0,a.jsx)(n.h2,{id:"how-it-works",children:"How it Works"}),"\n",(0,a.jsxs)(n.p,{children:["The ",(0,a.jsx)(n.a,{href:"https://github.com/w3f/1k-validators-be",children:"nominating backend"})," will routinely change its\nnominations at every era (four eras on Kusama). The backend does this by short-listing candidates by\nvalidity and then sorts validators by their weighted score in descending order."]}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"Validators with a higher weighted score are selected for any possible slots. As validators are\nnominated and actively validate, their weighted scores decrease allowing other validators to be\nselected in subsequent rounds of assessment."}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"If a validator is active during a single nomination period (the time after a new nomination and\nbefore the next one) and does not break any of the requirements, it will have its rank increased\nby 1. Validators with higher rank have performed well within the program for a longer period of\ntime."}),"\n"]}),"\n"]}),"\n",(0,a.jsx)(n.p,{children:"The backend nominates as many validators as it reasonably can in such a manner to allow each nominee\nan opportunity to be elected into the active set."}),"\n",(0,a.jsx)(n.h2,{id:"setting-up-a-validator",children:"Setting up a Validator"}),"\n",(0,a.jsxs)(n.p,{children:["Please see the guide on how to\n",(0,a.jsx)(n.a,{href:"/docs/maintain-guides-how-to-validate-polkadot",children:"set up a validator"})," as well as additional\ninformation on how to ",(0,a.jsx)(n.a,{href:"/docs/maintain-guides-secure-validator",children:"secure a validator"}),"."]}),"\n",(0,a.jsx)(n.h2,{id:"how-to-apply",children:"How to Apply"}),"\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.strong,{children:"Entrance to the Polkadot program requires a rank of 100 or higher in the Kusama program."}),"\nAttaining a rank of 100 usually takes around two months. The leaderboard is available\n",(0,a.jsx)(n.a,{href:"https://thousand-validators.kusama.network/#/leaderboard",children:"here"}),". In order to apply to the Polkadot\n1KV programme, set up your Polkadot node to adhere to the ",(0,a.jsx)(n.a,{href:"#requirements",children:"requirements"})," below and\nfill in the ",(0,a.jsx)(n.a,{href:"https://forms.gle/LTCze7fJvqQinPqx6",children:"application form"}),". You will hear back from the\nteam shortly."]}),"\n",(0,a.jsx)(n.admonition,{title:"1KV on Kusama",type:"info",children:(0,a.jsxs)(n.p,{children:["In order to apply to the Kusama 1KV programme, set up your node to adhere to the requirements below\nand fill in the ",(0,a.jsx)(n.a,{href:"https://forms.gle/dZkWrGWCNG3ENVCfA",children:"application form"}),". The process of review and\naddition is a manual one; you'll be invited to the 1KV Kusama channel and added to the leaderboard,\nif accepted."]})}),"\n",(0,a.jsx)(n.h4,{id:"requirements",children:"Requirements"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["Verified identity (see ",(0,a.jsx)(n.a,{href:"/docs/learn-identity#setting-an-identity",children:"here"})," for instructions)"]}),"\n",(0,a.jsxs)(n.li,{children:["Connect to dedicated telemetry (use\n",(0,a.jsx)(n.code,{children:"--telemetry-url 'wss://telemetry-backend.w3f.community/submit 1'"})," when starting the node)"]}),"\n",(0,a.jsx)(n.li,{children:"Minimum of 5_000 DOTs self stake on Polkadot and 10 KSM on Kusama"}),"\n",(0,a.jsx)(n.li,{children:"No more than 5% commission on Polkadot and 15% commission on Kusama"}),"\n",(0,a.jsx)(n.li,{children:"Have a staking proxy set up"}),"\n",(0,a.jsx)(n.li,{children:"Must be on the latest release"}),"\n",(0,a.jsx)(n.li,{children:"Maximum one node per applicant on Polkadot and two nodes (under same sub/super identity) on Kusama"}),"\n",(0,a.jsx)(n.li,{children:"Validators must operate nodes themselves. They may not be operated by third parties or staking\nproviders."}),"\n"]}),"\n",(0,a.jsx)(n.h4,{id:"nominators",children:"Nominators"}),"\n",(0,a.jsxs)(n.p,{children:['The below addresses are the stash / staking proxy pairs for the primary nominators involved in the\nThousand Validators programme. They are formatted like "',(0,a.jsx)(n.code,{children:"stash"})," / ",(0,a.jsx)(n.code,{children:"staking proxy"}),'".']}),"\n",(0,a.jsxs)(r.A,{groupId:"chains",values:[{label:"Polkadot",value:"polkadot"},{label:"Kusama",value:"kusama"}],children:[(0,a.jsx)(s.A,{value:"polkadot",children:(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.code,{children:"14Ns6kKbCoka3MS4Hn6b7oRw9fFejG8RH5rq5j63cWUfpPDJ"})," /\n",(0,a.jsx)(n.code,{children:"12iz6aJ75KdqVZLGyvFJmgc5k74Pdokgy9UGTgWtnt67RNTg"})]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.code,{children:"12RYJb5gG4hfoWPK3owEYtmWoko8G6zwYpvDYTyXFVSfJr8Y"})," /\n",(0,a.jsx)(n.code,{children:"12iz6aJ75KdqVZLGyvFJmgc5k74Pdokgy9UGTgWtnt67RNTg"})]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.code,{children:"16GMHo9HZv8CcJy4WLoMaU9qusgzx2wxKDLbXStEBvt5274B"})," /\n",(0,a.jsx)(n.code,{children:"12iz6aJ75KdqVZLGyvFJmgc5k74Pdokgy9UGTgWtnt67RNTg"})]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.code,{children:"13yk62yQYctYsRPXDFvC5WzBtanAsHDasenooLAxKvf5bNkK"})," /\n",(0,a.jsx)(n.code,{children:"12iz6aJ75KdqVZLGyvFJmgc5k74Pdokgy9UGTgWtnt67RNTg"})]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.code,{children:"13SkL2uACPqBzpKBh3d2n5msYNFB2QapA5vEDeKeLjG2LS3Y"})," /\n",(0,a.jsx)(n.code,{children:"12iz6aJ75KdqVZLGyvFJmgc5k74Pdokgy9UGTgWtnt67RNTg"})]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.code,{children:"12WLDL2AXoH3MHr1xj8K4m9rCcRKSWKTUz8A4mX3ah5khJBn"})," /\n",(0,a.jsx)(n.code,{children:"12iz6aJ75KdqVZLGyvFJmgc5k74Pdokgy9UGTgWtnt67RNTg"})]}),"\n"]})}),(0,a.jsx)(s.A,{value:"kusama",children:(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.code,{children:"G1rrUNQSk7CjjEmLSGcpNu72tVtyzbWdUvgmSer9eBitXWf"})," /\n",(0,a.jsx)(n.code,{children:"Edyfdyoi4KJVdXUJ3SU3nuZYMpg13HHa1SWYtPDCV8UPdxy"})]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.code,{children:"HgTtJusFEn2gmMmB5wmJDnMRXKD6dzqCpNR7a99kkQ7BNvX"})," /\n",(0,a.jsx)(n.code,{children:"Edyfdyoi4KJVdXUJ3SU3nuZYMpg13HHa1SWYtPDCV8UPdxy"})]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.code,{children:"EX9uchmfeSqKTM7cMMg8DkH49XV8i4R7a7rqCn8btpZBHDP"})," /\n",(0,a.jsx)(n.code,{children:"Edyfdyoi4KJVdXUJ3SU3nuZYMpg13HHa1SWYtPDCV8UPdxy"})]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.code,{children:"JLENz97TFT2kYaQmyCSEnBsK8VhaDZNmYATfsLCHyLF6Gzu"})," /\n",(0,a.jsx)(n.code,{children:"Edyfdyoi4KJVdXUJ3SU3nuZYMpg13HHa1SWYtPDCV8UPdxy"})]}),"\n"]})})]}),"\n",(0,a.jsx)(n.p,{children:"A time delay proxy is used as the interaction method for some of these accounts."}),"\n",(0,a.jsxs)(n.p,{children:["Within the Kusama program, there are several other nominator accounts that can exhaustively be\ndetermined by parsing data found ",(0,a.jsx)(n.a,{href:"https://kusama.w3f.community/nominators",children:"here"}),"."]}),"\n",(0,a.jsxs)(n.p,{children:["Since approximately early January 2021, the nominators will select an automatic number of validators\nto nominate based on the lowest amount staked for a validator and the amount of funds it holds. This\ncan be anywhere from a few validators receiving nomination from a single nominator, to the\n",(0,a.jsx)(n.a,{href:"/docs/chain-state-values#maximum-votes-per-nominator",children:"max of nominators"}),"."]}),"\n",(0,a.jsx)(n.h2,{id:"selection",children:"Selection"}),"\n",(0,a.jsx)(n.p,{children:"On-chain parameters assess each candidate to produce a weighted score. It is a changing system in\nwhich new endpoints or scores are sometimes introduced. Below are some of the original weights."}),"\n",(0,a.jsx)(n.h3,{id:"weights",children:"Weights"}),"\n",(0,a.jsx)(n.h4,{id:"inclusion",children:"Inclusion"}),"\n",(0,a.jsx)(n.p,{children:"The inclusion weight accounts for 40 points. It is assessed by an evaluation of the validator's\ninclusion in the active set over the past 84 eras. A candidate can be assured of full score if there\nwere no stints of active validation in 84 eras."}),"\n",(0,a.jsx)(n.h4,{id:"span-inclusion-",children:"Span Inclusion *"}),"\n",(0,a.jsx)(n.p,{children:"The span inclusion weight accounts for 40 points. It is assessed by an evaluation of the validator's\ninclusion in the active set over the past 28 eras. A candidate can be assured of full score if there\nwere no stints of active validation in 28 eras."}),"\n",(0,a.jsx)(n.h4,{id:"discovered-",children:"Discovered *"}),"\n",(0,a.jsx)(n.p,{children:"The discovered weight accounts for 5 points. It is determined by comparing the candidates tenure in\nthe program relative to other candidates. A candidate that is in the program for a longer duration\nrelative to the entire group of validators allows for a higher score."}),"\n",(0,a.jsx)(n.h4,{id:"nominated-",children:"Nominated *"}),"\n",(0,a.jsx)(n.p,{children:"The nominated weight accounts for 10 points, and it is assessed based on when the candidate was last\nnominated relative to the other candidates in the program."}),"\n",(0,a.jsx)(n.h4,{id:"rank-",children:"Rank *"}),"\n",(0,a.jsx)(n.p,{children:"The rank weight accounts for 5 points and is assessed relative to the ranks of other candidates\nwithin the program."}),"\n",(0,a.jsx)(n.h4,{id:"unclaimed",children:"Unclaimed"}),"\n",(0,a.jsx)(n.p,{children:"The unclaimed weight relates to the number of payouts outstanding for greater than four eras on\nPolkadot and sixteen on Kusama. Each payout that exceeds this threshold would attribute a negative\nscore of 10 points."}),"\n",(0,a.jsx)(n.h4,{id:"bonded-",children:"Bonded *"}),"\n",(0,a.jsx)(n.p,{children:"Candidates with a bond size that is relatively higher than others would receive a score of 50\npoints."}),"\n",(0,a.jsx)(n.h4,{id:"faults-",children:"Faults *"}),"\n",(0,a.jsx)(n.p,{children:"A fault is attained when a candidate has an offline event when actively validating. A legitimate\nfault is irrevocable. Faults account for 5 points in the system and are relative to others in the\nprogram."}),"\n",(0,a.jsx)(n.h4,{id:"offline-time",children:"Offline time"}),"\n",(0,a.jsx)(n.p,{children:"Candidates who have accumulated < 200 minutes offline time during the weekly period will receive 2\npoints in the system. Offline time is judged by a candidate's connection to the W3F Telemetry and is\nreset on Sundays."}),"\n",(0,a.jsx)(n.h4,{id:"location-",children:"Location *"}),"\n",(0,a.jsx)(n.p,{children:"The system allocates a score of 40 points for candidates who host their validators in uniquely\nlocated data centres. A candidate's location is determined from Telemetry and is relative to the\nnumber of other candidates located at the same data centre."}),"\n",(0,a.jsx)(n.h4,{id:"council",children:"Council"}),"\n",(0,a.jsx)(n.p,{children:"Candidates will receive a score of up to 50 points for voting for council members. Candidates may\nback as few as one candidate; to attain a full score of 50 points, the 1KV candidate should\nallocate > 75% of their bond to the respective council members."}),"\n",(0,a.jsx)(n.h4,{id:"democracy",children:"Democracy"}),"\n",(0,a.jsx)(n.p,{children:"Candidates will receive 10 * 1KV points for each referendum they have voted on (Aye/Nay) to a limit\nof 100 points. Scores are based on votes for referendum 49 on Polkadot (163 on Kusama) and beyond."}),"\n",(0,a.jsx)(n.p,{children:"* Scores that are based on their relative position against others are assessed as follows:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:"The respective weight is assigned high and low percentiles. Any scores lower than the score at the\nlow percentile and higher than the score at the high percentile are removed."}),"\n",(0,a.jsx)(n.li,{children:"The weighted score is then obtained by ((candidate_value - low_threshold) / (high_threshold -\nlow_threshold)) * weight."}),"\n"]}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:"The default low and high percentiles are 10 and 90%, respectively."}),"\n",(0,a.jsx)(n.li,{children:"Inclusion and Span Inclusions are measured against low and high percentiles of 20 and 75%,\nrespectively."}),"\n",(0,a.jsx)(n.li,{children:"Bonded is measured against low and high percentiles of 5 and 85%, respectively."}),"\n",(0,a.jsx)(n.li,{children:"Finally, location is measured against low and high percentiles of 10 and 95%, respectively."}),"\n"]}),"\n",(0,a.jsx)(n.h2,{id:"frequently-asked-questions",children:"Frequently asked questions"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.em,{children:"How do I apply?"})," See ",(0,a.jsx)(n.a,{href:"#how-to-apply",children:"here"}),"."]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.em,{children:"How long does it take for the application to process?"})," Usually a few weeks. Sometimes a little\nlonger. You can inspect the candidate files\n",(0,a.jsx)(n.a,{href:"https://github.com/w3f/1k-validators-be/tree/master/candidates",children:"here"})," and see if your info shows\nup. Also, you will get invited to a dedicated matrix room after being accepted."]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.em,{children:"I'm in the program and am getting nominated but don't get active?"})," The system optimizes the\nnominations to maximize the stake on active validators and minimize the stake variance across\nthem. Also keep in mind that getting nominated does not mean all the nominations are with you.\nNominators can choose up to 16 validators."]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.em,{children:"My scoring doesn't update"}),", ",(0,a.jsx)(n.em,{children:"I haven't been elected for a while"}),"? Sometimes it\u2019s best to give\nthings time to resolve; if they don't, leave a message in the dedicated matrix room or open an\nissue on GitHub."]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.em,{children:"The 1000 validators website is not up to date?"})," See ",(0,a.jsx)(n.a,{href:"#resources",children:"these resources"})," for more\nup-to-date information."]}),"\n"]}),"\n",(0,a.jsx)(n.h2,{id:"resources",children:"Resources"}),"\n",(0,a.jsx)(n.p,{children:"To extract and display the 1KV Programme scores there are various tools listed below."}),"\n",(0,a.jsxs)(n.table,{children:[(0,a.jsx)(n.thead,{children:(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.th,{children:"Resource"}),(0,a.jsx)(n.th,{children:"Github source"}),(0,a.jsx)(n.th,{children:"Info"})]})}),(0,a.jsxs)(n.tbody,{children:[(0,a.jsxs)(n.tr,{children:[(0,a.jsxs)(n.td,{children:["SubVT telegram bot for ",(0,a.jsx)(n.a,{href:"https://t.me/subvt_polkadot_bot",children:"polkadot"})," and ",(0,a.jsx)(n.a,{href:"https://t.me/subvt_kusama_bot",children:"kusama"})]}),(0,a.jsx)(n.td,{children:(0,a.jsx)(n.a,{href:"https://github.com/helikon-labs/subvt-backend/tree/development/subvt-telegram-bot",children:"github"})}),(0,a.jsx)(n.td,{children:"Telegram bot with overviews and alerts for various polkadot and kusama related events, including 1KV events."})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:(0,a.jsx)(n.a,{href:"https://subvt.io/",children:"SubVT ios and android app"})}),(0,a.jsx)(n.td,{children:(0,a.jsx)(n.a,{href:"https://github.com/helikon-labs/subvt-web",children:"github"})}),(0,a.jsx)(n.td,{children:"SubVT app version for mobile phones."})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:(0,a.jsx)(n.a,{href:"https://richvalidator.me/",children:"Validator earnings overview"})}),(0,a.jsx)(n.td,{children:(0,a.jsx)(n.a,{href:"https://github.com/helikon-labs",children:"github"})}),(0,a.jsx)(n.td,{children:"Overview of validators' earnings."})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:(0,a.jsx)(n.a,{href:"https://insights.math-crypto.com/",children:"Math Crypto's Insights"})}),(0,a.jsx)(n.td,{children:(0,a.jsx)(n.a,{href:"https://github.com/MathCryptoDoc",children:"github"})}),(0,a.jsx)(n.td,{children:"1KV-oriented scoring overview of Kusama and Polkadot."})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsxs)(n.td,{children:["One-T for ",(0,a.jsx)(n.a,{href:"https://matrix.to/#/%23polkadot-one-t-bot:matrix.org",children:"polkadot"})," and ",(0,a.jsx)(n.a,{href:"https://matrix.to/#/%23kusama-one-t-bot:matrix.org",children:"kusama"})]}),(0,a.jsx)(n.td,{children:(0,a.jsx)(n.a,{href:"https://github.com/turboflakes/one-t",children:"github"})}),(0,a.jsx)(n.td,{children:"A performance report bot for the Polkadot and Kusama network with special focus on the 1KV programme."})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:(0,a.jsx)(n.a,{href:"https://apps.turboflakes.io/#/one-t/kusama/parachains/overview",children:"One-T parachains overview"})}),(0,a.jsx)(n.td,{children:(0,a.jsx)(n.a,{href:"https://github.com/turboflakes/one-t",children:"github"})}),(0,a.jsx)(n.td,{children:"One-T's parachain overview."})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:(0,a.jsx)(n.a,{href:"https://metaspan.io/kusama/candidate",children:"Metaspan's 1KV overview"})}),(0,a.jsx)(n.td,{children:(0,a.jsx)(n.a,{href:"https://github.com/metaspan/metaspan.io",children:"github"})}),(0,a.jsxs)(n.td,{children:["Overview of 1KV programme, including the newly introduced endpoints, see ",(0,a.jsx)(n.a,{href:"https://metaspan.io/",children:"here"})," for available endpoints."]})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:(0,a.jsx)(n.a,{href:"https://1kv.decentradot.com/",children:"Decentradot's 1KV overview"})}),(0,a.jsx)(n.td,{children:(0,a.jsx)(n.a,{href:"https://github.com/ccris02/1KV_API",children:"github"})}),(0,a.jsx)(n.td,{children:"Overview of the 1KV programme, including the newly introduced endpoints."})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:(0,a.jsx)(n.a,{href:"https://1k.hirish.net/polkadot",children:"Hirish 1KV overview"})}),(0,a.jsx)(n.td,{children:(0,a.jsx)(n.a,{href:"https://github.com/",children:"github?"})}),(0,a.jsx)(n.td,{children:"Overview of the 1KV Programme."})]})]})]})]})}function m(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(u,{...e})}):u(e)}},19365:(e,n,t)=>{t.d(n,{A:()=>s});t(96540);var a=t(34164);const i={tabItem:"tabItem_Ymn6"};var r=t(74848);function s(e){var n=e.children,t=e.hidden,s=e.className;return(0,r.jsx)("div",{role:"tabpanel",className:(0,a.A)(i.tabItem,s),hidden:t,children:n})}},11470:(e,n,t)=>{t.d(n,{A:()=>w});var a=t(96540),i=t(34164),r=t(23104),s=t(56347),o=t(205),d=t(57485),l=t(31682),h=t(75376);function c(e){var n,t;return null!=(n=null==(t=a.Children.toArray(e).filter((function(e){return"\n"!==e})).map((function(e){if(!e||(0,a.isValidElement)(e)&&((n=e.props)&&"object"==typeof n&&"value"in n))return e;var n;throw new Error("Docusaurus error: Bad child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:t.filter(Boolean))?n:[]}function u(e){var n=e.values,t=e.children;return(0,a.useMemo)((function(){var e=null!=n?n:function(e){return c(e).map((function(e){var n=e.props;return{value:n.value,label:n.label,attributes:n.attributes,default:n.default}}))}(t);return function(e){var n=(0,l.XI)(e,(function(e,n){return e.value===n.value}));if(n.length>0)throw new Error('Docusaurus error: Duplicate values "'+n.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[n,t])}function m(e){var n=e.value;return e.tabValues.some((function(e){return e.value===n}))}function p(e){var n=e.queryString,t=void 0!==n&&n,i=e.groupId,r=(0,s.W6)(),o=function(e){var n=e.queryString,t=void 0!==n&&n,a=e.groupId;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=a?a:null}({queryString:t,groupId:i});return[(0,d.aZ)(o),(0,a.useCallback)((function(e){if(o){var n=new URLSearchParams(r.location.search);n.set(o,e),r.replace(Object.assign({},r.location,{search:n.toString()}))}}),[o,r])]}function v(e){var n,t,i,r,s=e.defaultValue,d=e.queryString,l=void 0!==d&&d,c=e.groupId,v=u(e),f=(0,a.useState)((function(){return function(e){var n,t=e.defaultValue,a=e.tabValues;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:a}))throw new Error('Docusaurus error: The has a defaultValue "'+t+'" but none of its children has the corresponding value. Available values are: '+a.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return t}var i=null!=(n=a.find((function(e){return e.default})))?n:a[0];if(!i)throw new Error("Unexpected error: 0 tabValues");return i.value}({defaultValue:s,tabValues:v})})),x=f[0],g=f[1],j=p({queryString:l,groupId:c}),b=j[0],y=j[1],w=(n=function(e){return e?"docusaurus.tab."+e:null}({groupId:c}.groupId),t=(0,h.Dv)(n),i=t[0],r=t[1],[i,(0,a.useCallback)((function(e){n&&r.set(e)}),[n,r])]),k=w[0],T=w[1],V=function(){var e=null!=b?b:k;return m({value:e,tabValues:v})?e:null}();return(0,o.A)((function(){V&&g(V)}),[V]),{selectedValue:x,selectValue:(0,a.useCallback)((function(e){if(!m({value:e,tabValues:v}))throw new Error("Can't select invalid tab value="+e);g(e),y(e),T(e)}),[y,T,v]),tabValues:v}}var f=t(92303);const x={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var g=t(74848);function j(e){var n=e.className,t=e.block,a=e.selectedValue,s=e.selectValue,o=e.tabValues,d=[],l=(0,r.a_)().blockElementScrollPositionUntilNextRender,h=function(e){var n=e.currentTarget,t=d.indexOf(n),i=o[t].value;i!==a&&(l(n),s(i))},c=function(e){var n,t=null;switch(e.key){case"Enter":h(e);break;case"ArrowRight":var a,i=d.indexOf(e.currentTarget)+1;t=null!=(a=d[i])?a:d[0];break;case"ArrowLeft":var r,s=d.indexOf(e.currentTarget)-1;t=null!=(r=d[s])?r:d[d.length-1]}null==(n=t)||n.focus()};return(0,g.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,i.A)("tabs",{"tabs--block":t},n),children:o.map((function(e){var n=e.value,t=e.label,r=e.attributes;return(0,g.jsx)("li",Object.assign({role:"tab",tabIndex:a===n?0:-1,"aria-selected":a===n,ref:function(e){return d.push(e)},onKeyDown:c,onClick:h},r,{className:(0,i.A)("tabs__item",x.tabItem,null==r?void 0:r.className,{"tabs__item--active":a===n}),children:null!=t?t:n}),n)}))})}function b(e){var n=e.lazy,t=e.children,r=e.selectedValue,s=(Array.isArray(t)?t:[t]).filter(Boolean);if(n){var o=s.find((function(e){return e.props.value===r}));return o?(0,a.cloneElement)(o,{className:(0,i.A)("margin-top--md",o.props.className)}):null}return(0,g.jsx)("div",{className:"margin-top--md",children:s.map((function(e,n){return(0,a.cloneElement)(e,{key:n,hidden:e.props.value!==r})}))})}function y(e){var n=v(e);return(0,g.jsxs)("div",{className:(0,i.A)("tabs-container",x.tabList),children:[(0,g.jsx)(j,Object.assign({},n,e)),(0,g.jsx)(b,Object.assign({},n,e))]})}function w(e){var n=(0,f.A)();return(0,g.jsx)(y,Object.assign({},e,{children:c(e.children)}),String(n))}},28453:(e,n,t)=>{t.d(n,{R:()=>s,x:()=>o});var a=t(96540);const i={},r=a.createContext(i);function s(e){const n=a.useContext(r);return a.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:s(e.components),a.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/8dd7cee0.6c992c15.js b/assets/js/8dd7cee0.6c992c15.js new file mode 100644 index 000000000000..a351efe8a0e1 --- /dev/null +++ b/assets/js/8dd7cee0.6c992c15.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7147],{57105:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>h,contentTitle:()=>d,default:()=>m,frontMatter:()=>l,metadata:()=>a,toc:()=>c});const a=JSON.parse('{"id":"general/doc-thousand-validators","title":"Thousand Validators Programme","description":"The Thousand Validators Program and How it can Support your Validator Endeavors.","source":"@site/../docs/general/thousand-validators.md","sourceDirName":"general","slug":"/thousand-validators","permalink":"/docs/thousand-validators","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/thousand-validators.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1727168669000,"frontMatter":{"id":"doc-thousand-validators","title":"Thousand Validators Programme","sidebar_label":"Thousand Validators","description":"The Thousand Validators Program and How it can Support your Validator Endeavors.","keywords":["thousand validators program","validator","validate","maintain","TVP"],"slug":"../thousand-validators"},"sidebar":"docs","previous":{"title":"Alpha Program","permalink":"/docs/alpha-program"},"next":{"title":"Thousand Contributors","permalink":"/docs/thousand-contributors"}}');var i=t(74848),r=t(28453),s=t(11470),o=t(19365);const l={id:"doc-thousand-validators",title:"Thousand Validators Programme",sidebar_label:"Thousand Validators",description:"The Thousand Validators Program and How it can Support your Validator Endeavors.",keywords:["thousand validators program","validator","validate","maintain","TVP"],slug:"../thousand-validators"},d=void 0,h={},c=[{value:"How it Works",id:"how-it-works",level:2},{value:"Setting up a Validator",id:"setting-up-a-validator",level:2},{value:"How to Apply",id:"how-to-apply",level:2},{value:"Requirements",id:"requirements",level:4},{value:"Nominators",id:"nominators",level:4},{value:"Selection",id:"selection",level:2},{value:"Weights",id:"weights",level:3},{value:"Inclusion",id:"inclusion",level:4},{value:"Span Inclusion *",id:"span-inclusion-",level:4},{value:"Discovered *",id:"discovered-",level:4},{value:"Nominated *",id:"nominated-",level:4},{value:"Rank *",id:"rank-",level:4},{value:"Unclaimed",id:"unclaimed",level:4},{value:"Bonded *",id:"bonded-",level:4},{value:"Faults *",id:"faults-",level:4},{value:"Offline time",id:"offline-time",level:4},{value:"Location *",id:"location-",level:4},{value:"Council",id:"council",level:4},{value:"Democracy",id:"democracy",level:4},{value:"Frequently asked questions",id:"frequently-asked-questions",level:2},{value:"Resources",id:"resources",level:2}];function u(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",h4:"h4",li:"li",ol:"ol",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,r.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.p,{children:"The Thousand Validators Programme is an initiative by Web3 Foundation and Parity Technologies to use\nthe funds held by both organizations to nominate validators in the community."}),"\n",(0,i.jsx)(n.p,{children:"It serves two major purposes:"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsx)(n.li,{children:"Give validators a structured on-ramp to join the active set of validators on Kusama and Polkadot"}),"\n",(0,i.jsx)(n.li,{children:"Further decentralize the validator active set."}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"how-it-works",children:"How it Works"}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.a,{href:"https://github.com/w3f/1k-validators-be",children:"nominating backend"})," will routinely change its\nnominations at every era (four eras on Kusama). The backend does this by short-listing candidates by\nvalidity and then sorts validators by their weighted score in descending order."]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:"Validators with a higher weighted score are selected for any possible slots. As validators are\nnominated and actively validate, their weighted scores decrease allowing other validators to be\nselected in subsequent rounds of assessment."}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:"If a validator is active during a single nomination period (the time after a new nomination and\nbefore the next one) and does not break any of the requirements, it will have its rank increased\nby 1. Validators with higher rank have performed well within the program for a longer period of\ntime."}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"The backend nominates as many validators as it reasonably can in such a manner to allow each nominee\nan opportunity to be elected into the active set."}),"\n",(0,i.jsx)(n.h2,{id:"setting-up-a-validator",children:"Setting up a Validator"}),"\n",(0,i.jsxs)(n.p,{children:["Please see the guide on how to\n",(0,i.jsx)(n.a,{href:"/docs/maintain-guides-how-to-validate-polkadot",children:"set up a validator"})," as well as additional\ninformation on how to ",(0,i.jsx)(n.a,{href:"/docs/maintain-guides-secure-validator",children:"secure a validator"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"how-to-apply",children:"How to Apply"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Entrance to the Polkadot program requires a rank of 100 or higher in the Kusama program."}),"\nAttaining a rank of 100 usually takes around two months. The leaderboard is available\n",(0,i.jsx)(n.a,{href:"https://thousand-validators.kusama.network/#/leaderboard",children:"here"}),". In order to apply to the Polkadot\n1KV programme, set up your Polkadot node to adhere to the ",(0,i.jsx)(n.a,{href:"#requirements",children:"requirements"})," below and\nfill in the ",(0,i.jsx)(n.a,{href:"https://forms.gle/LTCze7fJvqQinPqx6",children:"application form"}),". You will hear back from the\nteam shortly."]}),"\n",(0,i.jsx)(n.admonition,{title:"1KV on Kusama",type:"info",children:(0,i.jsxs)(n.p,{children:["In order to apply to the Kusama 1KV programme, set up your node to adhere to the requirements below\nand fill in the ",(0,i.jsx)(n.a,{href:"https://forms.gle/dZkWrGWCNG3ENVCfA",children:"application form"}),". The process of review and\naddition is a manual one; you'll be invited to the 1KV Kusama channel and added to the leaderboard,\nif accepted."]})}),"\n",(0,i.jsx)(n.h4,{id:"requirements",children:"Requirements"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["Verified identity (see ",(0,i.jsx)(n.a,{href:"/docs/learn-identity#setting-an-identity",children:"here"})," for instructions)"]}),"\n",(0,i.jsxs)(n.li,{children:["Connect to dedicated telemetry (use\n",(0,i.jsx)(n.code,{children:"--telemetry-url 'wss://telemetry-backend.w3f.community/submit 1'"})," when starting the node)"]}),"\n",(0,i.jsx)(n.li,{children:"Minimum of 5_000 DOTs self stake on Polkadot and 10 KSM on Kusama"}),"\n",(0,i.jsx)(n.li,{children:"No more than 5% commission on Polkadot and 15% commission on Kusama"}),"\n",(0,i.jsx)(n.li,{children:"Have a staking proxy set up"}),"\n",(0,i.jsx)(n.li,{children:"Must be on the latest release"}),"\n",(0,i.jsx)(n.li,{children:"Maximum one node per applicant on Polkadot and two nodes (under same sub/super identity) on Kusama"}),"\n",(0,i.jsx)(n.li,{children:"Validators must operate nodes themselves. They may not be operated by third parties or staking\nproviders."}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"nominators",children:"Nominators"}),"\n",(0,i.jsxs)(n.p,{children:['The below addresses are the stash / staking proxy pairs for the primary nominators involved in the\nThousand Validators programme. They are formatted like "',(0,i.jsx)(n.code,{children:"stash"})," / ",(0,i.jsx)(n.code,{children:"staking proxy"}),'".']}),"\n",(0,i.jsxs)(s.A,{groupId:"chains",values:[{label:"Polkadot",value:"polkadot"},{label:"Kusama",value:"kusama"}],children:[(0,i.jsx)(o.A,{value:"polkadot",children:(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"14Ns6kKbCoka3MS4Hn6b7oRw9fFejG8RH5rq5j63cWUfpPDJ"})," /\n",(0,i.jsx)(n.code,{children:"12iz6aJ75KdqVZLGyvFJmgc5k74Pdokgy9UGTgWtnt67RNTg"})]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"12RYJb5gG4hfoWPK3owEYtmWoko8G6zwYpvDYTyXFVSfJr8Y"})," /\n",(0,i.jsx)(n.code,{children:"12iz6aJ75KdqVZLGyvFJmgc5k74Pdokgy9UGTgWtnt67RNTg"})]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"16GMHo9HZv8CcJy4WLoMaU9qusgzx2wxKDLbXStEBvt5274B"})," /\n",(0,i.jsx)(n.code,{children:"12iz6aJ75KdqVZLGyvFJmgc5k74Pdokgy9UGTgWtnt67RNTg"})]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"13yk62yQYctYsRPXDFvC5WzBtanAsHDasenooLAxKvf5bNkK"})," /\n",(0,i.jsx)(n.code,{children:"12iz6aJ75KdqVZLGyvFJmgc5k74Pdokgy9UGTgWtnt67RNTg"})]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"13SkL2uACPqBzpKBh3d2n5msYNFB2QapA5vEDeKeLjG2LS3Y"})," /\n",(0,i.jsx)(n.code,{children:"12iz6aJ75KdqVZLGyvFJmgc5k74Pdokgy9UGTgWtnt67RNTg"})]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"12WLDL2AXoH3MHr1xj8K4m9rCcRKSWKTUz8A4mX3ah5khJBn"})," /\n",(0,i.jsx)(n.code,{children:"12iz6aJ75KdqVZLGyvFJmgc5k74Pdokgy9UGTgWtnt67RNTg"})]}),"\n"]})}),(0,i.jsx)(o.A,{value:"kusama",children:(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"G1rrUNQSk7CjjEmLSGcpNu72tVtyzbWdUvgmSer9eBitXWf"})," /\n",(0,i.jsx)(n.code,{children:"Edyfdyoi4KJVdXUJ3SU3nuZYMpg13HHa1SWYtPDCV8UPdxy"})]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"HgTtJusFEn2gmMmB5wmJDnMRXKD6dzqCpNR7a99kkQ7BNvX"})," /\n",(0,i.jsx)(n.code,{children:"Edyfdyoi4KJVdXUJ3SU3nuZYMpg13HHa1SWYtPDCV8UPdxy"})]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"EX9uchmfeSqKTM7cMMg8DkH49XV8i4R7a7rqCn8btpZBHDP"})," /\n",(0,i.jsx)(n.code,{children:"Edyfdyoi4KJVdXUJ3SU3nuZYMpg13HHa1SWYtPDCV8UPdxy"})]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"JLENz97TFT2kYaQmyCSEnBsK8VhaDZNmYATfsLCHyLF6Gzu"})," /\n",(0,i.jsx)(n.code,{children:"Edyfdyoi4KJVdXUJ3SU3nuZYMpg13HHa1SWYtPDCV8UPdxy"})]}),"\n"]})})]}),"\n",(0,i.jsx)(n.p,{children:"A time delay proxy is used as the interaction method for some of these accounts."}),"\n",(0,i.jsxs)(n.p,{children:["Within the Kusama program, there are several other nominator accounts that can exhaustively be\ndetermined by parsing data found ",(0,i.jsx)(n.a,{href:"https://kusama.w3f.community/nominators",children:"here"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["Since approximately early January 2021, the nominators will select an automatic number of validators\nto nominate based on the lowest amount staked for a validator and the amount of funds it holds. This\ncan be anywhere from a few validators receiving nomination from a single nominator, to the\n",(0,i.jsx)(n.a,{href:"/docs/chain-state-values#maximum-votes-per-nominator",children:"max of nominators"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"selection",children:"Selection"}),"\n",(0,i.jsx)(n.p,{children:"On-chain parameters assess each candidate to produce a weighted score. It is a changing system in\nwhich new endpoints or scores are sometimes introduced. Below are some of the original weights."}),"\n",(0,i.jsx)(n.h3,{id:"weights",children:"Weights"}),"\n",(0,i.jsx)(n.h4,{id:"inclusion",children:"Inclusion"}),"\n",(0,i.jsx)(n.p,{children:"The inclusion weight accounts for 40 points. It is assessed by an evaluation of the validator's\ninclusion in the active set over the past 84 eras. A candidate can be assured of full score if there\nwere no stints of active validation in 84 eras."}),"\n",(0,i.jsx)(n.h4,{id:"span-inclusion-",children:"Span Inclusion *"}),"\n",(0,i.jsx)(n.p,{children:"The span inclusion weight accounts for 40 points. It is assessed by an evaluation of the validator's\ninclusion in the active set over the past 28 eras. A candidate can be assured of full score if there\nwere no stints of active validation in 28 eras."}),"\n",(0,i.jsx)(n.h4,{id:"discovered-",children:"Discovered *"}),"\n",(0,i.jsx)(n.p,{children:"The discovered weight accounts for 5 points. It is determined by comparing the candidates tenure in\nthe program relative to other candidates. A candidate that is in the program for a longer duration\nrelative to the entire group of validators allows for a higher score."}),"\n",(0,i.jsx)(n.h4,{id:"nominated-",children:"Nominated *"}),"\n",(0,i.jsx)(n.p,{children:"The nominated weight accounts for 10 points, and it is assessed based on when the candidate was last\nnominated relative to the other candidates in the program."}),"\n",(0,i.jsx)(n.h4,{id:"rank-",children:"Rank *"}),"\n",(0,i.jsx)(n.p,{children:"The rank weight accounts for 5 points and is assessed relative to the ranks of other candidates\nwithin the program."}),"\n",(0,i.jsx)(n.h4,{id:"unclaimed",children:"Unclaimed"}),"\n",(0,i.jsx)(n.p,{children:"The unclaimed weight relates to the number of payouts outstanding for greater than four eras on\nPolkadot and sixteen on Kusama. Each payout that exceeds this threshold would attribute a negative\nscore of 10 points."}),"\n",(0,i.jsx)(n.h4,{id:"bonded-",children:"Bonded *"}),"\n",(0,i.jsx)(n.p,{children:"Candidates with a bond size that is relatively higher than others would receive a score of 50\npoints."}),"\n",(0,i.jsx)(n.h4,{id:"faults-",children:"Faults *"}),"\n",(0,i.jsx)(n.p,{children:"A fault is attained when a candidate has an offline event when actively validating. A legitimate\nfault is irrevocable. Faults account for 5 points in the system and are relative to others in the\nprogram."}),"\n",(0,i.jsx)(n.h4,{id:"offline-time",children:"Offline time"}),"\n",(0,i.jsx)(n.p,{children:"Candidates who have accumulated < 200 minutes offline time during the weekly period will receive 2\npoints in the system. Offline time is judged by a candidate's connection to the W3F Telemetry and is\nreset on Sundays."}),"\n",(0,i.jsx)(n.h4,{id:"location-",children:"Location *"}),"\n",(0,i.jsx)(n.p,{children:"The system allocates a score of 40 points for candidates who host their validators in uniquely\nlocated data centres. A candidate's location is determined from Telemetry and is relative to the\nnumber of other candidates located at the same data centre."}),"\n",(0,i.jsx)(n.h4,{id:"council",children:"Council"}),"\n",(0,i.jsx)(n.p,{children:"Candidates will receive a score of up to 50 points for voting for council members. Candidates may\nback as few as one candidate; to attain a full score of 50 points, the 1KV candidate should\nallocate > 75% of their bond to the respective council members."}),"\n",(0,i.jsx)(n.h4,{id:"democracy",children:"Democracy"}),"\n",(0,i.jsx)(n.p,{children:"Candidates will receive 10 * 1KV points for each referendum they have voted on (Aye/Nay) to a limit\nof 100 points. Scores are based on votes for referendum 49 on Polkadot (163 on Kusama) and beyond."}),"\n",(0,i.jsx)(n.p,{children:"* Scores that are based on their relative position against others are assessed as follows:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"The respective weight is assigned high and low percentiles. Any scores lower than the score at the\nlow percentile and higher than the score at the high percentile are removed."}),"\n",(0,i.jsx)(n.li,{children:"The weighted score is then obtained by ((candidate_value - low_threshold) / (high_threshold -\nlow_threshold)) * weight."}),"\n"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"The default low and high percentiles are 10 and 90%, respectively."}),"\n",(0,i.jsx)(n.li,{children:"Inclusion and Span Inclusions are measured against low and high percentiles of 20 and 75%,\nrespectively."}),"\n",(0,i.jsx)(n.li,{children:"Bonded is measured against low and high percentiles of 5 and 85%, respectively."}),"\n",(0,i.jsx)(n.li,{children:"Finally, location is measured against low and high percentiles of 10 and 95%, respectively."}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"frequently-asked-questions",children:"Frequently asked questions"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.em,{children:"How do I apply?"})," See ",(0,i.jsx)(n.a,{href:"#how-to-apply",children:"here"}),"."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.em,{children:"How long does it take for the application to process?"})," Usually a few weeks. Sometimes a little\nlonger. You can inspect the candidate files\n",(0,i.jsx)(n.a,{href:"https://github.com/w3f/1k-validators-be/tree/master/candidates",children:"here"})," and see if your info shows\nup. Also, you will get invited to a dedicated matrix room after being accepted."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.em,{children:"I'm in the program and am getting nominated but don't get active?"})," The system optimizes the\nnominations to maximize the stake on active validators and minimize the stake variance across\nthem. Also keep in mind that getting nominated does not mean all the nominations are with you.\nNominators can choose up to 16 validators."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.em,{children:"My scoring doesn't update"}),", ",(0,i.jsx)(n.em,{children:"I haven't been elected for a while"}),"? Sometimes it\u2019s best to give\nthings time to resolve; if they don't, leave a message in the dedicated matrix room or open an\nissue on GitHub."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.em,{children:"The 1000 validators website is not up to date?"})," See ",(0,i.jsx)(n.a,{href:"#resources",children:"these resources"})," for more\nup-to-date information."]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"resources",children:"Resources"}),"\n",(0,i.jsx)(n.p,{children:"To extract and display the 1KV Programme scores there are various tools listed below."}),"\n",(0,i.jsxs)(n.table,{children:[(0,i.jsx)(n.thead,{children:(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.th,{children:"Resource"}),(0,i.jsx)(n.th,{children:"Github source"}),(0,i.jsx)(n.th,{children:"Info"})]})}),(0,i.jsxs)(n.tbody,{children:[(0,i.jsxs)(n.tr,{children:[(0,i.jsxs)(n.td,{children:["SubVT telegram bot for ",(0,i.jsx)(n.a,{href:"https://t.me/subvt_polkadot_bot",children:"polkadot"})," and ",(0,i.jsx)(n.a,{href:"https://t.me/subvt_kusama_bot",children:"kusama"})]}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.a,{href:"https://github.com/helikon-labs/subvt-backend/tree/development/subvt-telegram-bot",children:"github"})}),(0,i.jsx)(n.td,{children:"Telegram bot with overviews and alerts for various polkadot and kusama related events, including 1KV events."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.a,{href:"https://subvt.io/",children:"SubVT ios and android app"})}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.a,{href:"https://github.com/helikon-labs/subvt-web",children:"github"})}),(0,i.jsx)(n.td,{children:"SubVT app version for mobile phones."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.a,{href:"https://richvalidator.me/",children:"Validator earnings overview"})}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.a,{href:"https://github.com/helikon-labs",children:"github"})}),(0,i.jsx)(n.td,{children:"Overview of validators' earnings."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.a,{href:"https://insights.math-crypto.com/",children:"Math Crypto's Insights"})}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.a,{href:"https://github.com/MathCryptoDoc",children:"github"})}),(0,i.jsx)(n.td,{children:"1KV-oriented scoring overview of Kusama and Polkadot."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsxs)(n.td,{children:["One-T for ",(0,i.jsx)(n.a,{href:"https://matrix.to/#/%23polkadot-one-t-bot:matrix.org",children:"polkadot"})," and ",(0,i.jsx)(n.a,{href:"https://matrix.to/#/%23kusama-one-t-bot:matrix.org",children:"kusama"})]}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.a,{href:"https://github.com/turboflakes/one-t",children:"github"})}),(0,i.jsx)(n.td,{children:"A performance report bot for the Polkadot and Kusama network with special focus on the 1KV programme."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.a,{href:"https://apps.turboflakes.io/#/one-t/kusama/parachains/overview",children:"One-T parachains overview"})}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.a,{href:"https://github.com/turboflakes/one-t",children:"github"})}),(0,i.jsx)(n.td,{children:"One-T's parachain overview."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.a,{href:"https://metaspan.io/kusama/candidate",children:"Metaspan's 1KV overview"})}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.a,{href:"https://github.com/metaspan/metaspan.io",children:"github"})}),(0,i.jsxs)(n.td,{children:["Overview of 1KV programme, including the newly introduced endpoints, see ",(0,i.jsx)(n.a,{href:"https://metaspan.io/",children:"here"})," for available endpoints."]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.a,{href:"https://1kv.decentradot.com/",children:"Decentradot's 1KV overview"})}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.a,{href:"https://github.com/ccris02/1KV_API",children:"github"})}),(0,i.jsx)(n.td,{children:"Overview of the 1KV programme, including the newly introduced endpoints."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.a,{href:"https://1k.hirish.net/polkadot",children:"Hirish 1KV overview"})}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.a,{href:"https://github.com/",children:"github?"})}),(0,i.jsx)(n.td,{children:"Overview of the 1KV Programme."})]})]})]})]})}function m(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(u,{...e})}):u(e)}},19365:(e,n,t)=>{t.d(n,{A:()=>s});t(96540);var a=t(34164);const i={tabItem:"tabItem_Ymn6"};var r=t(74848);function s(e){var n=e.children,t=e.hidden,s=e.className;return(0,r.jsx)("div",{role:"tabpanel",className:(0,a.A)(i.tabItem,s),hidden:t,children:n})}},11470:(e,n,t)=>{t.d(n,{A:()=>w});var a=t(96540),i=t(34164),r=t(23104),s=t(56347),o=t(205),l=t(57485),d=t(31682),h=t(75376);function c(e){var n,t;return null!=(n=null==(t=a.Children.toArray(e).filter((function(e){return"\n"!==e})).map((function(e){if(!e||(0,a.isValidElement)(e)&&((n=e.props)&&"object"==typeof n&&"value"in n))return e;var n;throw new Error("Docusaurus error: Bad child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:t.filter(Boolean))?n:[]}function u(e){var n=e.values,t=e.children;return(0,a.useMemo)((function(){var e=null!=n?n:function(e){return c(e).map((function(e){var n=e.props;return{value:n.value,label:n.label,attributes:n.attributes,default:n.default}}))}(t);return function(e){var n=(0,d.XI)(e,(function(e,n){return e.value===n.value}));if(n.length>0)throw new Error('Docusaurus error: Duplicate values "'+n.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[n,t])}function m(e){var n=e.value;return e.tabValues.some((function(e){return e.value===n}))}function p(e){var n=e.queryString,t=void 0!==n&&n,i=e.groupId,r=(0,s.W6)(),o=function(e){var n=e.queryString,t=void 0!==n&&n,a=e.groupId;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=a?a:null}({queryString:t,groupId:i});return[(0,l.aZ)(o),(0,a.useCallback)((function(e){if(o){var n=new URLSearchParams(r.location.search);n.set(o,e),r.replace(Object.assign({},r.location,{search:n.toString()}))}}),[o,r])]}function v(e){var n,t,i,r,s=e.defaultValue,l=e.queryString,d=void 0!==l&&l,c=e.groupId,v=u(e),f=(0,a.useState)((function(){return function(e){var n,t=e.defaultValue,a=e.tabValues;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:a}))throw new Error('Docusaurus error: The has a defaultValue "'+t+'" but none of its children has the corresponding value. Available values are: '+a.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return t}var i=null!=(n=a.find((function(e){return e.default})))?n:a[0];if(!i)throw new Error("Unexpected error: 0 tabValues");return i.value}({defaultValue:s,tabValues:v})})),x=f[0],g=f[1],j=p({queryString:d,groupId:c}),b=j[0],y=j[1],w=(n=function(e){return e?"docusaurus.tab."+e:null}({groupId:c}.groupId),t=(0,h.Dv)(n),i=t[0],r=t[1],[i,(0,a.useCallback)((function(e){n&&r.set(e)}),[n,r])]),k=w[0],T=w[1],V=function(){var e=null!=b?b:k;return m({value:e,tabValues:v})?e:null}();return(0,o.A)((function(){V&&g(V)}),[V]),{selectedValue:x,selectValue:(0,a.useCallback)((function(e){if(!m({value:e,tabValues:v}))throw new Error("Can't select invalid tab value="+e);g(e),y(e),T(e)}),[y,T,v]),tabValues:v}}var f=t(92303);const x={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var g=t(74848);function j(e){var n=e.className,t=e.block,a=e.selectedValue,s=e.selectValue,o=e.tabValues,l=[],d=(0,r.a_)().blockElementScrollPositionUntilNextRender,h=function(e){var n=e.currentTarget,t=l.indexOf(n),i=o[t].value;i!==a&&(d(n),s(i))},c=function(e){var n,t=null;switch(e.key){case"Enter":h(e);break;case"ArrowRight":var a,i=l.indexOf(e.currentTarget)+1;t=null!=(a=l[i])?a:l[0];break;case"ArrowLeft":var r,s=l.indexOf(e.currentTarget)-1;t=null!=(r=l[s])?r:l[l.length-1]}null==(n=t)||n.focus()};return(0,g.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,i.A)("tabs",{"tabs--block":t},n),children:o.map((function(e){var n=e.value,t=e.label,r=e.attributes;return(0,g.jsx)("li",Object.assign({role:"tab",tabIndex:a===n?0:-1,"aria-selected":a===n,ref:function(e){return l.push(e)},onKeyDown:c,onClick:h},r,{className:(0,i.A)("tabs__item",x.tabItem,null==r?void 0:r.className,{"tabs__item--active":a===n}),children:null!=t?t:n}),n)}))})}function b(e){var n=e.lazy,t=e.children,r=e.selectedValue,s=(Array.isArray(t)?t:[t]).filter(Boolean);if(n){var o=s.find((function(e){return e.props.value===r}));return o?(0,a.cloneElement)(o,{className:(0,i.A)("margin-top--md",o.props.className)}):null}return(0,g.jsx)("div",{className:"margin-top--md",children:s.map((function(e,n){return(0,a.cloneElement)(e,{key:n,hidden:e.props.value!==r})}))})}function y(e){var n=v(e);return(0,g.jsxs)("div",{className:(0,i.A)("tabs-container",x.tabList),children:[(0,g.jsx)(j,Object.assign({},n,e)),(0,g.jsx)(b,Object.assign({},n,e))]})}function w(e){var n=(0,f.A)();return(0,g.jsx)(y,Object.assign({},e,{children:c(e.children)}),String(n))}},28453:(e,n,t)=>{t.d(n,{R:()=>s,x:()=>o});var a=t(96540);const i={},r=a.createContext(i);function s(e){const n=a.useContext(r);return a.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:s(e.components),a.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/90a09ad1.68432786.js b/assets/js/90a09ad1.68432786.js deleted file mode 100644 index a1a18910b3f3..000000000000 --- a/assets/js/90a09ad1.68432786.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8768],{98729:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>a,contentTitle:()=>i,default:()=>h,frontMatter:()=>r,metadata:()=>o,toc:()=>c});var s=t(74848),d=t(28453);const r={id:"dunesql-cheatsheet",title:"DuneSQL Cheatsheet",sidebar_label:"DuneSQL Cheatsheet",description:"A brief comparison of common features between DuneSQL and Common SQL.",keywords:["polkadot","dashboard","dune","sql","dunesql"],slug:"../dunesql-cheatsheet"},i="DuneSQL Cheatsheet",o={id:"general/dune-analytics/dunesql-cheatsheet",title:"DuneSQL Cheatsheet",description:"A brief comparison of common features between DuneSQL and Common SQL.",source:"@site/../docs/general/dune-analytics/dunesql-cheatsheet.md",sourceDirName:"general/dune-analytics",slug:"/general/dunesql-cheatsheet",permalink:"/docs/general/dunesql-cheatsheet",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/dunesql-cheatsheet.md",tags:[],version:"current",lastUpdatedBy:"MK",lastUpdatedAt:1719215716e3,frontMatter:{id:"dunesql-cheatsheet",title:"DuneSQL Cheatsheet",sidebar_label:"DuneSQL Cheatsheet",description:"A brief comparison of common features between DuneSQL and Common SQL.",keywords:["polkadot","dashboard","dune","sql","dunesql"],slug:"../dunesql-cheatsheet"},sidebar:"docs",previous:{title:"Project Dashboards",permalink:"/docs/general/project-dashboards"},next:{title:"Parity Data Dashboards",permalink:"/docs/parity-data-dashboards"}},a={},c=[];function l(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",header:"header",p:"p",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,d.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"dunesql-cheatsheet",children:"DuneSQL Cheatsheet"})}),"\n",(0,s.jsx)(n.p,{children:"It is important to note that when querying on Dune Analytics, DuneSQL is employed. Although most\nfunctions and syntax are similar to standard SQL, there are still some differences compared to other\nversions of SQL. Below is a comparison table of common features between DuneSQL and Google BigQuery\nSQL."}),"\n",(0,s.jsx)(n.admonition,{title:"DuneSQL Reference",type:"info",children:(0,s.jsxs)(n.p,{children:["For more information on DuneSQL, please refer to the\n",(0,s.jsx)(n.a,{href:"https://docs.dune.com/query-engine/Functions-and-operators/index",children:"DuneSQL documentation"}),"."]})}),"\n",(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Problem Type"}),(0,s.jsx)(n.th,{children:"BigQuery"}),(0,s.jsx)(n.th,{children:"DuneSQL(V2)"}),(0,s.jsx)(n.th,{children:"Description"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"JSON Reading Method"}),(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:'JSON_EXTRACT_SCALAR(call_args, "$.remark")'})}),(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"JSON_EXTRACT_SCALAR(JSON_PARSE(call_args), '$.remark')"})}),(0,s.jsxs)(n.td,{children:["In DuneSQL, ",(0,s.jsx)(n.code,{children:"JSON_PARSE"})," is needed to split the JSON if it is initially not in JSON format but is transformed into a JSON string."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"JSON array to SQL array"}),(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"JSON_EXTRACT_ARRAY(JSON_EXTRACT(pv, '$.others'))"})}),(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"cast(json_extract(pv, '$.others') as array)"})}),(0,s.jsx)(n.td,{children:"BigQuery uses a function for this conversion, while DuneSQL utilizes casting and supports the JSON data type."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"HEX to UTF8"}),(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"SAFE_CONVERT_BYTES_TO_STRING(FROM_HEX(SUBSTR(hex_encode, 3)))"})}),(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"FROM_UTF8(from_hex(SUBSTR(hex_encode, 3)))"})}),(0,s.jsxs)(n.td,{children:["In DuneSQL, the ",(0,s.jsx)(n.code,{children:"SAFE_CONVERT_BYTES_TO_STRING"})," is not required."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Time Series"}),(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:'TIMESTAMP_TRUNC(block_time, DAY) >= TIMESTAMP("2023-12-01")'})}),(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"block_time >= date('2023-12-01')"})}),(0,s.jsxs)(n.td,{children:["Time conversion in DuneSQL is simpler, involving direct usage of ",(0,s.jsx)(n.code,{children:"variable operator date(value)"}),"."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Data Type Conversion (FLOAT64 to DOUBLE)"}),(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"CAST(JSON_EXTRACT_SCALAR(nominationpools_rewardpools, '$.lastRecordedRewardCounter') AS FLOAT64)"})}),(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"CAST(JSON_EXTRACT_SCALAR(nominationpools_rewardpools, '$.lastRecordedRewardCounter')"})}),(0,s.jsx)(n.td,{children:"BigQuery refers to the data format as FLOAT64, while in DuneSQL, it is termed DOUBLE."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Handling Null Values"}),(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"IFNULL(prev_member_bonded, 0)"})}),(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"COALESCE(prev_member_bonded, 0)"})}),(0,s.jsxs)(n.td,{children:["In DuneSQL, BigQuery's ",(0,s.jsx)(n.code,{children:"IFNULL"})," is equivalent to ",(0,s.jsx)(n.code,{children:"COALESCE"}),"."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Calculating Local Time and Subtracting Days"}),(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"TIMESTAMP_TRUNC(ts, DAY) >= TIMESTAMP(DATE_SUB(CURRENT_DATE(), INTERVAL 30 DAY))"})}),(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"ts >= date(current_date - interval '30' day)"})}),(0,s.jsxs)(n.td,{children:["In BigQuery, operations on dates require functions, but DuneSQL allows direct use of ",(0,s.jsx)(n.code,{children:"+"})," and ",(0,s.jsx)(n.code,{children:"-"}),"."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Using Hyperlinks in Tables"}),(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"SELECT concat(concat(concat(\"\"), if(address_name is null, concat(address_ss58, ''), concat(address_name, '')))"})}),(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"CONCAT('', address_ss58 ,'') AS address_ss58"})}),(0,s.jsxs)(n.td,{children:["DuneSQL enables string concatenation using ",(0,s.jsx)(n.code,{children:"CONCAT"}),", making it straightforward compared to the multiple ",(0,s.jsx)(n.code,{children:"concat"})," functions required in BigQuery."]})]})]})]})]})}function h(e={}){const{wrapper:n}={...(0,d.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},28453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>o});var s=t(96540);const d={},r=s.createContext(d);function i(e){const n=s.useContext(r);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(d):e.components||d:i(e.components),s.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/90a09ad1.b325f332.js b/assets/js/90a09ad1.b325f332.js new file mode 100644 index 000000000000..ca54dc7b16ef --- /dev/null +++ b/assets/js/90a09ad1.b325f332.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8768],{10775:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>a,contentTitle:()=>o,default:()=>h,frontMatter:()=>i,metadata:()=>s,toc:()=>c});const s=JSON.parse('{"id":"general/dune-analytics/dunesql-cheatsheet","title":"DuneSQL Cheatsheet","description":"A brief comparison of common features between DuneSQL and Common SQL.","source":"@site/../docs/general/dune-analytics/dunesql-cheatsheet.md","sourceDirName":"general/dune-analytics","slug":"/general/dunesql-cheatsheet","permalink":"/docs/general/dunesql-cheatsheet","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/dunesql-cheatsheet.md","tags":[],"version":"current","lastUpdatedBy":"MK","lastUpdatedAt":1719215716000,"frontMatter":{"id":"dunesql-cheatsheet","title":"DuneSQL Cheatsheet","sidebar_label":"DuneSQL Cheatsheet","description":"A brief comparison of common features between DuneSQL and Common SQL.","keywords":["polkadot","dashboard","dune","sql","dunesql"],"slug":"../dunesql-cheatsheet"},"sidebar":"docs","previous":{"title":"Project Dashboards","permalink":"/docs/general/project-dashboards"},"next":{"title":"Parity Data Dashboards","permalink":"/docs/parity-data-dashboards"}}');var d=t(74848),r=t(28453);const i={id:"dunesql-cheatsheet",title:"DuneSQL Cheatsheet",sidebar_label:"DuneSQL Cheatsheet",description:"A brief comparison of common features between DuneSQL and Common SQL.",keywords:["polkadot","dashboard","dune","sql","dunesql"],slug:"../dunesql-cheatsheet"},o="DuneSQL Cheatsheet",a={},c=[];function l(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",header:"header",p:"p",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,r.R)(),...e.components};return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(n.header,{children:(0,d.jsx)(n.h1,{id:"dunesql-cheatsheet",children:"DuneSQL Cheatsheet"})}),"\n",(0,d.jsx)(n.p,{children:"It is important to note that when querying on Dune Analytics, DuneSQL is employed. Although most\nfunctions and syntax are similar to standard SQL, there are still some differences compared to other\nversions of SQL. Below is a comparison table of common features between DuneSQL and Google BigQuery\nSQL."}),"\n",(0,d.jsx)(n.admonition,{title:"DuneSQL Reference",type:"info",children:(0,d.jsxs)(n.p,{children:["For more information on DuneSQL, please refer to the\n",(0,d.jsx)(n.a,{href:"https://docs.dune.com/query-engine/Functions-and-operators/index",children:"DuneSQL documentation"}),"."]})}),"\n",(0,d.jsxs)(n.table,{children:[(0,d.jsx)(n.thead,{children:(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.th,{children:"Problem Type"}),(0,d.jsx)(n.th,{children:"BigQuery"}),(0,d.jsx)(n.th,{children:"DuneSQL(V2)"}),(0,d.jsx)(n.th,{children:"Description"})]})}),(0,d.jsxs)(n.tbody,{children:[(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:"JSON Reading Method"}),(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:'JSON_EXTRACT_SCALAR(call_args, "$.remark")'})}),(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"JSON_EXTRACT_SCALAR(JSON_PARSE(call_args), '$.remark')"})}),(0,d.jsxs)(n.td,{children:["In DuneSQL, ",(0,d.jsx)(n.code,{children:"JSON_PARSE"})," is needed to split the JSON if it is initially not in JSON format but is transformed into a JSON string."]})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:"JSON array to SQL array"}),(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"JSON_EXTRACT_ARRAY(JSON_EXTRACT(pv, '$.others'))"})}),(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"cast(json_extract(pv, '$.others') as array)"})}),(0,d.jsx)(n.td,{children:"BigQuery uses a function for this conversion, while DuneSQL utilizes casting and supports the JSON data type."})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:"HEX to UTF8"}),(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"SAFE_CONVERT_BYTES_TO_STRING(FROM_HEX(SUBSTR(hex_encode, 3)))"})}),(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"FROM_UTF8(from_hex(SUBSTR(hex_encode, 3)))"})}),(0,d.jsxs)(n.td,{children:["In DuneSQL, the ",(0,d.jsx)(n.code,{children:"SAFE_CONVERT_BYTES_TO_STRING"})," is not required."]})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:"Time Series"}),(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:'TIMESTAMP_TRUNC(block_time, DAY) >= TIMESTAMP("2023-12-01")'})}),(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"block_time >= date('2023-12-01')"})}),(0,d.jsxs)(n.td,{children:["Time conversion in DuneSQL is simpler, involving direct usage of ",(0,d.jsx)(n.code,{children:"variable operator date(value)"}),"."]})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:"Data Type Conversion (FLOAT64 to DOUBLE)"}),(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"CAST(JSON_EXTRACT_SCALAR(nominationpools_rewardpools, '$.lastRecordedRewardCounter') AS FLOAT64)"})}),(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"CAST(JSON_EXTRACT_SCALAR(nominationpools_rewardpools, '$.lastRecordedRewardCounter')"})}),(0,d.jsx)(n.td,{children:"BigQuery refers to the data format as FLOAT64, while in DuneSQL, it is termed DOUBLE."})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:"Handling Null Values"}),(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"IFNULL(prev_member_bonded, 0)"})}),(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"COALESCE(prev_member_bonded, 0)"})}),(0,d.jsxs)(n.td,{children:["In DuneSQL, BigQuery's ",(0,d.jsx)(n.code,{children:"IFNULL"})," is equivalent to ",(0,d.jsx)(n.code,{children:"COALESCE"}),"."]})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:"Calculating Local Time and Subtracting Days"}),(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"TIMESTAMP_TRUNC(ts, DAY) >= TIMESTAMP(DATE_SUB(CURRENT_DATE(), INTERVAL 30 DAY))"})}),(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"ts >= date(current_date - interval '30' day)"})}),(0,d.jsxs)(n.td,{children:["In BigQuery, operations on dates require functions, but DuneSQL allows direct use of ",(0,d.jsx)(n.code,{children:"+"})," and ",(0,d.jsx)(n.code,{children:"-"}),"."]})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:"Using Hyperlinks in Tables"}),(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"SELECT concat(concat(concat(\"\"), if(address_name is null, concat(address_ss58, ''), concat(address_name, '')))"})}),(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"CONCAT('', address_ss58 ,'') AS address_ss58"})}),(0,d.jsxs)(n.td,{children:["DuneSQL enables string concatenation using ",(0,d.jsx)(n.code,{children:"CONCAT"}),", making it straightforward compared to the multiple ",(0,d.jsx)(n.code,{children:"concat"})," functions required in BigQuery."]})]})]})]})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,d.jsx)(n,{...e,children:(0,d.jsx)(l,{...e})}):l(e)}},28453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>o});var s=t(96540);const d={},r=s.createContext(d);function i(e){const n=s.useContext(r);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(d):e.components||d:i(e.components),s.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/918b38b6.30d367a9.js b/assets/js/918b38b6.30d367a9.js new file mode 100644 index 000000000000..3e8171eb207c --- /dev/null +++ b/assets/js/918b38b6.30d367a9.js @@ -0,0 +1 @@ +(self.webpackChunk=self.webpackChunk||[]).push([[6930],{61900:(e,n,a)=>{"use strict";a.r(n),a.d(n,{assets:()=>c,contentTitle:()=>r,default:()=>h,frontMatter:()=>o,metadata:()=>t,toc:()=>l});const t=JSON.parse('{"id":"learn/learn-async-backing","title":"Asynchronous Backing","description":"A brief overview of asynchronous backing, and how it affects Polkadot\'s scalability.","source":"@site/../docs/learn/learn-async-backing.md","sourceDirName":"learn","slug":"/learn-async-backing","permalink":"/docs/learn-async-backing","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-async-backing.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1727178265000,"frontMatter":{"id":"learn-async-backing","title":"Asynchronous Backing","sidebar_label":"Asynchronous Backing","description":"A brief overview of asynchronous backing, and how it affects Polkadot\'s scalability.","keywords":["parachains","backing","parablock","perspective parachains","unincluded segments"],"slug":"../learn-async-backing"},"sidebar":"docs","previous":{"title":"Parachains FAQ","permalink":"/docs/learn-parachains-faq"},"next":{"title":"Agile Coretime","permalink":"/docs/learn-agile-coretime-index"}}');var i=a(74848),s=a(28453);a(47379);const o={id:"learn-async-backing",title:"Asynchronous Backing",sidebar_label:"Asynchronous Backing",description:"A brief overview of asynchronous backing, and how it affects Polkadot's scalability.",keywords:["parachains","backing","parablock","perspective parachains","unincluded segments"],slug:"../learn-async-backing"},r=void 0,c={},l=[{value:"Synchronous Backing",id:"synchronous-backing",level:2},{value:"Asynchronous Backing",id:"asynchronous-backing",level:2},{value:"Synchronous vs. Asynchronous Backing",id:"synchronous-vs-asynchronous-backing",level:3},{value:"Sync Backing as a special case of Async Backing",id:"sync-backing-as-a-special-case-of-async-backing",level:3},{value:"Async Backing Diagram",id:"async-backing-diagram",level:3},{value:"Terminology",id:"terminology",level:2},{value:"Candidate Receipt",id:"candidate-receipt",level:3},{value:"Pipelining",id:"pipelining",level:3},{value:"Unincluded Segments",id:"unincluded-segments",level:3},{value:"Prospective Parachains",id:"prospective-parachains",level:3},{value:"Learn More",id:"learn-more",level:2}];function d(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,s.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.admonition,{title:"Asynchronous Backing Guide for Parachains",type:"tip",children:(0,i.jsxs)(n.p,{children:["For upgrading a parachain for Asynchronous Backing compatibility, follow the instructions on\n",(0,i.jsx)(n.a,{href:"/docs/maintain-guides-async-backing",children:"this Wiki document."})]})}),"\n",(0,i.jsx)(n.admonition,{title:"Learn about Parachain Consensus",type:"info",children:(0,i.jsxs)(n.p,{children:["To fully follow the material on this page, it is recommended to be familiar with the primary stages\nof the ",(0,i.jsx)(n.a,{href:"/docs/learn-parachains-protocol",children:"Parachain Protocol"}),"."]})}),"\n",(0,i.jsxs)(n.p,{children:["In Polkadot, parablocks are generated by ",(0,i.jsx)(n.a,{href:"/docs/learn-collator",children:"collators"})," on the parachain side and\nsent to ",(0,i.jsx)(n.a,{href:"/docs/learn-validator",children:"validators"})," on the relay chain side for backing."]}),"\n",(0,i.jsx)(n.admonition,{title:"What is backing?",type:"info",children:(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Backing"})," refers to the process in which parablocks are verified by a subset of validators or\nbacking groups. It is an important step in the validation process for parablocks, as it is the first\nline of defense in ensuring censorship resistance. Parablocks only need to be backed by one\nvalidator, and as a consequence, backing does not ensure parablock validity."]})}),"\n",(0,i.jsxs)(n.p,{children:["Backed parablocks are sent to other validators for inclusion into the relay chain. Parablocks are\nincluded when validators have attested to having received\n",(0,i.jsx)(n.a,{href:"/docs/learn-parachains-protocol#erasure-codes",children:"erasure coded chunks"})," of the parablock data. Note\n",(0,i.jsx)(n.a,{href:"#candidate-receipt",children:"candidate receipts"})," and not the parablocks themselves are included in relay\nblocks (but for simplicity, we refer to parablocks as being included). When generated, parablocks\nmust be anchored to a relay chain block called ",(0,i.jsx)(n.strong,{children:"relay parent"}),". The relay parent is an input to\nparablock candidate generation. It provides the necessary context to build the next parablock. Note\nthat the relay parent of a parablock and the relay block including that parablock are always\ndifferent."]}),"\n",(0,i.jsx)(n.h2,{id:"synchronous-backing",children:"Synchronous Backing"}),"\n",(0,i.jsx)(n.p,{children:"Before diving into asynchronous backing, it is important to understand what synchronous backing is\nand its main limitations. In synchronous backing, parablock generation is tightly coupled to the\nrelay chain's progression:"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsx)(n.li,{children:"A new parablock can be produced after including the previous one (i.e., every 12 seconds)."}),"\n",(0,i.jsx)(n.li,{children:"Context to build the next parablock is drawn from the latest included parablock ancestor"}),"\n",(0,i.jsx)(n.li,{children:"The relay parent must be the latest relay chain block."}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["Because of (1) parablocks can be generated every other relay chain block (i.e., every 12 seconds).\nBecause of (2) generation of parablock ",(0,i.jsx)(n.code,{children:"P"})," can only start when ",(0,i.jsx)(n.code,{children:"P - 1"})," is included (there is no\n",(0,i.jsx)(n.a,{href:"#pipelining",children:"pipelining"}),"). Because of (3) execution time can take maximum 0.5 seconds as parablock\n",(0,i.jsx)(n.code,{children:"P"})," is rushing to be backed in the next 5.5 seconds (2 seconds needed for backing and the rest for\ngossiping). Every parablock is backed in 6 seconds (one relay chain block) and included in the next\n6 seconds (next relay chain block). The time from generation to inclusion is 12 seconds. This limits\nthe amount of data a collator can add to each parablock."]}),"\n",(0,i.jsxs)(n.p,{children:["Parablock generation will choose the most recently received relay block as a relay parent, although\nwith an imperfect network that may differ from the true most recent relay block. So, in general, if\nrelay block ",(0,i.jsx)(n.code,{children:"R"})," is the relay parent of parablock ",(0,i.jsx)(n.code,{children:"P"}),", then ",(0,i.jsx)(n.code,{children:"P"})," could be backed in ",(0,i.jsx)(n.code,{children:"R + 1"})," and\nincluded in ",(0,i.jsx)(n.code,{children:"R + 2"}),"."]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"sync-backing",src:a(26033).A+"",width:"1211",height:"503"})}),"\n",(0,i.jsxs)(n.p,{children:["From left to right, parablock P1 is anchored to the relay parent R0 (showed with an ",(0,i.jsx)(n.code,{children:"x"}),"), backed\ninto the relay chain block R1, and included in R2. After including P1, collators can start\ngenerating P2 that must be anchored to the relay parent R2. Note that R2 will be the relay parent of\nP2 if R2 is included on the relay chain and gossiped to the collator producing P2."]}),"\n",(0,i.jsx)(n.admonition,{title:"Every collator also runs an attached relay chain full node",type:"info",children:(0,i.jsxs)(n.p,{children:["The attached relay node receives relay blocks via gossip. Then, the relay node talks to the\nparachain node through the ",(0,i.jsx)(n.code,{children:"CollationGeneration"})," subsystem. R2 is gossiped to the relay full node\nattached to the collator producing P2. Then, ",(0,i.jsx)(n.code,{children:"CollationGeneration"})," passes information about R2 to\nthe collator node. Finally, relay parent information from R2 informs the generation of candidate P2."]})}),"\n",(0,i.jsx)(n.p,{children:"Because P2 is rushing to be backed in 6 seconds into R3, validators have only 0.5 seconds for\nexecution. Backing groups will take approximately 2 seconds to back it and some extra time for\ngossiping it (the whole process from collation to backing lasts 6 seconds). P2 is included in R4,\nwhich could be used as a relay parent for P3 (not shown). After 24 seconds P1 and P2 are included in\nthe relay chain. Note how collators can start new parablocks every 12 seconds but only have 0.5\nseconds for execution."}),"\n",(0,i.jsx)(n.h2,{id:"asynchronous-backing",children:"Asynchronous Backing"}),"\n",(0,i.jsx)(n.admonition,{title:"Disclaimer: Performance Measurements",type:"warning",children:(0,i.jsx)(n.p,{children:"Due to asynchronous backing not being fully implemented in a running production network, each\nperformance metric is not thoroughly tested nor guaranteed until proper benchmarking has occurred."})}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"sync-vs-async-backing",src:a(37966).A+"",width:"1920",height:"800"})}),"\n",(0,i.jsx)(n.p,{children:"In asynchronous backing, parablocks (P) are included every 6 seconds, and backing (B) and inclusion\n(I) can happen within the same relay chain block (R)."}),"\n",(0,i.jsx)(n.h3,{id:"synchronous-vs-asynchronous-backing",children:"Synchronous vs. Asynchronous Backing"}),"\n",(0,i.jsx)(n.p,{children:"Below is a table showing the main differences between synchronous and asynchronous backing."}),"\n",(0,i.jsxs)(n.table,{children:[(0,i.jsx)(n.thead,{children:(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.th,{style:{textAlign:"left"}}),(0,i.jsx)(n.th,{style:{textAlign:"center"},children:"Sync Backing"}),(0,i.jsx)(n.th,{style:{textAlign:"center"},children:"Async Backing"}),(0,i.jsx)(n.th,{style:{textAlign:"center"},children:"Async Backing Advantage"})]})}),(0,i.jsxs)(n.tbody,{children:[(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{style:{textAlign:"left"},children:(0,i.jsx)(n.strong,{children:"Parablocks included every"})}),(0,i.jsx)(n.td,{style:{textAlign:"center"},children:"12 seconds"}),(0,i.jsx)(n.td,{style:{textAlign:"center"},children:"6 seconds"}),(0,i.jsx)(n.td,{style:{textAlign:"center"},children:"2x more throughput or 2x less latency"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{style:{textAlign:"left"},children:(0,i.jsx)(n.strong,{children:"Parablock's maximum execution time"})}),(0,i.jsx)(n.td,{style:{textAlign:"center"},children:"0.5 seconds"}),(0,i.jsx)(n.td,{style:{textAlign:"center"},children:"2 seconds"}),(0,i.jsx)(n.td,{style:{textAlign:"center"},children:"4x more data in a parablock"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{style:{textAlign:"left"},children:(0,i.jsx)(n.strong,{children:"Relay parent"})}),(0,i.jsx)(n.td,{style:{textAlign:"center"},children:"Is the latest relay chain block"}),(0,i.jsx)(n.td,{style:{textAlign:"center"},children:"Is not necessarily the latest relay chain block"}),(0,i.jsx)(n.td,{style:{textAlign:"center"},children:"Collators can submit parablocks to backing groups in advance"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{style:{textAlign:"left"},children:(0,i.jsx)(n.strong,{children:"Collators can build on"})}),(0,i.jsx)(n.td,{style:{textAlign:"center"},children:"The most recent ancestor included in the latest relay chain block"}),(0,i.jsxs)(n.td,{style:{textAlign:"center"},children:["An ancestor included in a relay chain block (not necessarily the latest), with augmented information from the latest ancestor in the ",(0,i.jsx)(n.a,{href:"#unincluded-segments",children:"unincluded segment"})]}),(0,i.jsx)(n.td,{style:{textAlign:"center"},children:"Collators can start building parablocks in advance"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{style:{textAlign:"left"},children:(0,i.jsx)(n.strong,{children:"Number of unincluded parablocks"})}),(0,i.jsx)(n.td,{style:{textAlign:"center"},children:"Only one"}),(0,i.jsx)(n.td,{style:{textAlign:"center"},children:"One, or more than one (depends on configuration parameters)"}),(0,i.jsx)(n.td,{style:{textAlign:"center"},children:"More efficiency and scalability"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{style:{textAlign:"left"},children:(0,i.jsx)(n.strong,{children:"Unincluded parablocks"})}),(0,i.jsx)(n.td,{style:{textAlign:"center"},children:"Cannot be re-proposed"}),(0,i.jsx)(n.td,{style:{textAlign:"center"},children:"Can be re-proposed if not successfully included in the first attempt"}),(0,i.jsx)(n.td,{style:{textAlign:"center"},children:"Decrease wastage of unused blockspace"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{style:{textAlign:"left"},children:(0,i.jsx)(n.strong,{children:"Parablock's Backing-to-inclusion time"})}),(0,i.jsx)(n.td,{style:{textAlign:"center"},children:"12 seconds"}),(0,i.jsx)(n.td,{style:{textAlign:"center"},children:"12 seconds"}),(0,i.jsx)(n.td,{style:{textAlign:"center"},children:"No change"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{style:{textAlign:"left"},children:(0,i.jsx)(n.strong,{children:"Parablock's Inclusion-to-finality time"})}),(0,i.jsx)(n.td,{style:{textAlign:"center"},children:"30 seconds"}),(0,i.jsx)(n.td,{style:{textAlign:"center"},children:"30 seconds"}),(0,i.jsx)(n.td,{style:{textAlign:"center"},children:"No change"})]})]})]}),"\n",(0,i.jsxs)(n.p,{children:["In synchronous backing, collators generate parablocks using context entirely pulled from the relay\nchain. While in asynchronous backing, collators use additional context from the\n",(0,i.jsx)(n.a,{href:"#unincluded-segments",children:"unincluded segment"}),". Parablocks are included every 6 seconds because backing\nof parablock ",(0,i.jsx)(n.code,{children:"N + 1"})," and inclusion of parablock ",(0,i.jsx)(n.code,{children:"N"})," can happen on the same relay chain bock\n(",(0,i.jsx)(n.a,{href:"#pipelining",children:"pipelining"}),"). However, as for synchronous backing, a parablock takes 12 seconds to\nget backed and included, and from inclusion to finality there is an additional 30-second time\nwindow."]}),"\n",(0,i.jsx)(n.p,{children:"Because the throughput is increased by 2x and parachains have 4x more execution time, asynchronous\nbacking is expected to deliver 8x more blockspace to parachains."}),"\n",(0,i.jsx)(n.h3,{id:"sync-backing-as-a-special-case-of-async-backing",children:"Sync Backing as a special case of Async Backing"}),"\n",(0,i.jsxs)(n.p,{children:["Two parameters of asynchronous backing can be controlled by\n",(0,i.jsx)(n.a,{href:"/docs/learn-polkadot-opengov",children:"Governance"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/f204e3264f945c33b4cea18a49f7232c180b07c5/polkadot/primitives/src/vstaging/mod.rs#L49",children:(0,i.jsx)(n.code,{children:"max_candidate_depth"})}),":\nthe number of parachain blocks a collator can produce that are not yet included in the relay\nchain."]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/f204e3264f945c33b4cea18a49f7232c180b07c5/polkadot/primitives/src/vstaging/mod.rs#L54",children:(0,i.jsx)(n.code,{children:"allowed_ancestry_len"})}),":\nthe oldest relay chain parent a parachain block can be built on top of."]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["Values of zero for both correspond to synchronous backing: ",(0,i.jsx)(n.code,{children:"max_candidate_depth = 0"})," means there can\nbe only one unincluded parablock at all times, and ",(0,i.jsx)(n.code,{children:"allowed_ancestry_len = 0"})," means a parablock can\nbe built only on the latest relay parent for that parachain. Initial values will be set to 3 (4\nunincluded parablocks at all times) and 2 (relay parent can be the third last)."]}),"\n",(0,i.jsx)(n.h3,{id:"async-backing-diagram",children:"Async Backing Diagram"}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"async-backing",src:a(4498).A+"",width:"1209",height:"503"})}),"\n",(0,i.jsx)(n.p,{children:"The diagram assumes:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"max_candidate_depth = 2"}),", meaning that there can be a maximum of three unincluded parablocks at\nall times"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"allowed_ancestry_len = 1"}),", meaning parablocks can be anchored to the last or second-last relay\nparent (i.e., collators can start preparing parablocks 6 seconds in advance)"]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["From left to right, parablock P1 is backed into the relay chain block R1 and included in R2. While\nP1 undergoes backing, collators can already generate P2, which will have R0 as a relay parent\n(showed with an ",(0,i.jsx)(n.code,{children:"x"}),"). Note how R0 can also be relay parent for P1 as long as in the unincluded\nsegment there is a maximum of three unincluded parablocks. Parablock P2 can be backed in R2 (the\nsame relay block where P1 is included) and included in R3. Collators can now use up to two seconds\nfor execution. And so on, P3 can be generated while backing groups check P2, and P4 can be built\nwhile P3 undergoing backing. In 24 seconds, P1 to P3 are included in the relay chain."]}),"\n",(0,i.jsxs)(n.p,{children:["Note how there are always three unincluded parablocks at all times, i.e. compared to synchronous\nbacking there can be multiple unincluded parablocks (i.e. ",(0,i.jsx)(n.a,{href:"#pipelining",children:"pipelining"}),"). For example,\nwhen P1 is undergoing inclusion, P2 and P3 are undergoing backing. Collators were able to generate\nmultiple unincluded parablocks because on their end they have the\n",(0,i.jsx)(n.a,{href:"#unincluded-segments",children:"unincluded segment"}),", a local storage of not-included parablock ancestors that\nthey can use to fetch information to build new parablocks. On the relay chain side,\n",(0,i.jsx)(n.a,{href:"#prospective-parachains",children:"perspective parachains"})," repeats the work each unincluded segment does in\ntracking candidates (as validators cannot trust the record kept on parachains)."]}),"\n",(0,i.jsx)(n.p,{children:"The 6-second relay chain block delay includes a backing execution timeout (2 seconds) and some time\nfor network latency (the time it takes to gossip messages across the entire network). The limit\ncollators have to generate parablocks is how long it takes to back it (i.e., 2 seconds). Collation\ngeneration conservatively always gives itself the same time limits. If there is extra time for\ncollation generation and backing (i.e., more than 2s + 6s), then all that extra time is allocated to\nbacking (see figure). This could result in backable blocks waiting their turn at the end of the\nbacking step for a few extra seconds until a core frees up to back that block as of the next relay\nblock or some later relay block. Note a core is occupied after backing and before inclusion."}),"\n",(0,i.jsxs)(n.p,{children:["The 2-second execution time is thus a limiter, not a system limitation. If parablock generation\ntakes >2 seconds, the unincluded segment will shrink (less unincluded parablocks), while if it takes\n< 2 seconds, the segment will grow (more unincluded parablocks that will need to be backed and\nincluded). Such flexibility from the parachain side will be possible when, on the relay chain side,\nthere will be elastic scaling (i.e.,\n",(0,i.jsx)(n.a,{href:"/docs/polkadot-direction#agile-core-usage",children:"agile core usage"})," and\n",(0,i.jsx)(n.a,{href:"/docs/polkadot-direction#agile-coretime-allocation",children:"coretime allocation"}),")."]}),"\n",(0,i.jsx)(n.h2,{id:"terminology",children:"Terminology"}),"\n",(0,i.jsx)(n.h3,{id:"candidate-receipt",children:"Candidate Receipt"}),"\n",(0,i.jsxs)(n.p,{children:["Saying that a parablock has been included in a relay chain parent does not mean the entire parablock\nis in the relay chain block. Instead, ",(0,i.jsx)(n.strong,{children:"candidate receipt"})," consisting of the hash of the parablock,\nstate roots, and ID info is placed on the parent block on the relay chain. The relay chain does not\naccess the entire state of a parachain but only the values that changed during that block and the\nmerkelized hashes of the unchanged values."]}),"\n",(0,i.jsx)(n.h3,{id:"pipelining",children:"Pipelining"}),"\n",(0,i.jsxs)(n.p,{children:["Asynchronous backing is a feature that introduces\n",(0,i.jsx)(n.a,{href:"https://www.techtarget.com/whatis/definition/pipelining",children:"pipelining"})," to the parachain block\n",(0,i.jsx)(n.a,{href:"/docs/learn-parachains-protocol",children:"generation, backing and inclusion"}),'. It is analogous to the logical\npipelining of processor instruction in "traditional" architectures, where some instructions may be\nexecuted before others are complete. Instructions may also be executed in parallel, enabling\nmultiple processor parts to work on potentially different instructions simultaneously.']}),"\n",(0,i.jsx)(n.p,{children:"Bundles of state transitions represented as blocks may be processed similarly. In the context of\nPolkadot, pipelining aims to increase the throughput of the entire network by completing the backing\nand inclusion steps for different blocks at the same time. Asynchronous backing does not just allow\nfor pipelining within a single pipe (or core). It lays the foundation for a large number of pipes\n(or cores) to run for the same parachain at the same time. In that way, we have two distinct new\nforms of parallel computation."}),"\n",(0,i.jsx)(n.h3,{id:"unincluded-segments",children:"Unincluded Segments"}),"\n",(0,i.jsx)(n.p,{children:"Unincluded segments are chains of candidate parablocks that have yet to be included in the relay\nchain, i.e. they can contain parablocks at any stage pre-inclusion. An unincluded segment may thus\ninclude candidates that are seconded, backable, or backed. Every parablock candidate recorded in the\nunincluded segment is immediately advertised to validators to begin the backing process."}),"\n",(0,i.jsx)(n.p,{children:"The backing process occurs on the relay chain, whereas unincluded segments live in the runtimes of\nparachain collators. The core functionality that asynchronous backing brings is the ability to build\non these unincluded segments of block ancestors rather than building only on ancestors included in\nthe relay chain state."}),"\n",(0,i.jsx)(n.p,{children:"The purpose of each unincluded segment is twofold:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Make each parachain aware of when and at what depth it can build blocks that won't be rejected by\nthe relay chain"}),"\n",(0,i.jsx)(n.li,{children:"Provide critical context necessary to build parablocks with parent blocks that have yet to be\nincluded. The unincluded segment is all about building parablocks."}),"\n"]}),"\n",(0,i.jsx)(n.h3,{id:"prospective-parachains",children:"Prospective Parachains"}),"\n",(0,i.jsxs)(n.p,{children:["The purpose of\n",(0,i.jsx)(n.a,{href:"https://paritytech.github.io/polkadot/book/node/backing/prospective-parachains.html",children:"prospective parachains"}),"\nis twofold:"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:"Keep track of parablocks that have been submitted to backers but have yet to be included. This\nincludes tracking the full unincluded ancestry of each parablock, without which it wouldn't be\npossible to verify their legitimacy."}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:"Look up and provide candidates which are children of the most recently included parablock for each\nparachain. These are taken as inputs to the availability process. Prospective parachains is all\nabout tracking, storing, and providing candidates to the availability/inclusion step."}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["Prospective parachains essentially repeats the work each ",(0,i.jsx)(n.a,{href:"#unincluded-segments",children:"unincluded segment"}),"\ndoes in tracking candidates. Validators cannot simply trust the availability or validity of records\nkept on parachains. Prospective parachains is the relay chain's record of all parablock candidates\nundergoing the backing and inclusion process. It is the authoritative gatekeeper for parablock\nvalidity. Whereas the unincluded segment is a local record that allows parachains to produce blocks\nthat comply with the rules prospective parachains later enforces."]}),"\n",(0,i.jsxs)(n.p,{children:["The unincluded segment lives in the parachain runtime, so it doesn't know or care about forks/other\nparachains. Prospective parachains lives in the relay chain client. So it has to simultaneously keep\ntrack of candidates from all forks of all parachains. It is as if you folded the unincluded segments\nfrom every fork of every parachain into one giant data structure. When you fold unincluded segments\nrepresenting different chain forks together, they create a tree structure. Hence the term\n",(0,i.jsx)(n.a,{href:"https://paritytech.github.io/polkadot/book/node/backing/prospective-parachains.html#fragment-trees",children:(0,i.jsx)(n.strong,{children:"fragment tree"})}),"."]}),"\n",(0,i.jsx)(n.p,{children:"A single unincluded segment tells a collator whether it can build on top of one fork of one\nparachain. Prospective parachains tells a validator whether it should accept blocks built on top of\nany fork from any parachain."}),"\n",(0,i.jsx)(n.p,{children:"A parablock stops being a prospective parablock when it is included on chain. At that point\nprospective parachains does not have to care about it anymore. Alternatively, a parablock's relay\nparent can get too old before that parablock is included, in which case prospective parachains can\nthrow away the candidate."}),"\n",(0,i.jsx)(n.h2,{id:"learn-more",children:"Learn More"}),"\n",(0,i.jsx)(n.p,{children:"The information provided here is subject to change; keep up to date using the following resources:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.a,{href:"https://polkadot.network/blog/polkadot-roadmap-roundup",children:"Polkadot Roadmap Roundup"})," - Article by\nRob Habermeier, Polkadot founder, details the plans for Polkadot for 2023."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.a,{href:"https://github.com/paritytech/polkadot/issues/3779",children:"Asynchronous Backing Spec & Tracking Issue"})," -\nThe implementation tracking issue for asynchronous backing"]}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://paritytech.github.io/polkadot/book/node/backing/prospective-parachains.html",children:"Prospective Parachains Subsystem - The Polkadot Parachain Host Implementers' Guide"})}),"\n",(0,i.jsxs)(n.li,{children:["Chapter 6.11. from Polkadot Blockchain Academy (PBA) lecture material:\n",(0,i.jsx)(n.a,{href:"https://polkadot-blockchain-academy.github.io/pba-book/polkadot/async-backing-shallow/page.html",children:"Asynchronous Backing (Shallow)"})]}),"\n",(0,i.jsxs)(n.li,{children:["Chapter 6.15. from PBA lecture material:\n",(0,i.jsx)(n.a,{href:"https://polkadot-blockchain-academy.github.io/pba-book/polkadot/async-backing-deep/page.html",children:"Asynchronous Backing (Deep)"})]}),"\n",(0,i.jsxs)(n.li,{children:["Polkadot Blog Post -\n",(0,i.jsx)(n.a,{href:"https://www.polkadot.network/blog/elevating-polkadots-performance-and-scale-with-asynchronous-backing",children:"Asynchronous Backing: Elevating Polkadot's Performance and Scale"})]}),"\n",(0,i.jsxs)(n.li,{children:["Blog posts by Filippo Franchini on\n",(0,i.jsx)(n.a,{href:"https://grillapp.net/10124/polkadot-s-synchronous-backing-explained-40627?ref=10124",children:"Synchronous"}),"\nand\n",(0,i.jsx)(n.a,{href:"https://grillapp.net/10124/polkadot-s-asynchronous-backing-explained-40701?ref=10124",children:"Asynchronous Backing"})]}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}},47379:(e,n,a)=>{"use strict";a.d(n,{A:()=>p});var t=a(90675),i=a(10467),s=a(96540),o=a(19588),r=a(2026),c=a(11135);function l(e,n,a){return d.apply(this,arguments)}function d(){return(d=(0,i.A)((0,t.A)().mark((function e(n,a,i){var s,c,l,d,h;return(0,t.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s=void 0,c=void 0,e.t0=n,e.next="polkadot"===e.t0?5:"kusama"===e.t0?7:"statemine"===e.t0?9:"statemint"===e.t0?11:"polkadotpeople"===e.t0?13:"kusamapeople"===e.t0?15:17;break;case 5:return s="wss://rpc.polkadot.io",e.abrupt("break",18);case 7:return s="wss://kusama-rpc.polkadot.io/",e.abrupt("break",18);case 9:return s="wss://statemine-rpc.polkadot.io/",e.abrupt("break",18);case 11:return s="wss://statemint-rpc.polkadot.io/",e.abrupt("break",18);case 13:return s="wss://polkadot-people-rpc.polkadot.io/",e.abrupt("break",18);case 15:return s="wss://kusama-people-rpc.polkadot.io/",e.abrupt("break",18);case 17:console.log("Unknown socket url provided, no connection made.");case 18:if(void 0!==s){e.next=22;break}return e.abrupt("return");case 22:return l=new o.E(s),e.next=25,r.G.create({provider:l});case 25:d=e.sent,(h=a.split(".")).forEach((function(e){e in d&&(d=d[e])})),e.t1=h[0],e.next="consts"===e.t1?31:"query"===e.t1?33:38;break;case 31:return c=d.toString(),e.abrupt("break",39);case 33:return e.next=35,d();case 35:return c=(c=e.sent).toString(),e.abrupt("break",39);case 38:console.log("Unknown path prefix ("+h[0]+") in "+a);case 39:return e.abrupt("return",c);case 40:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function h(e,n,a,t){switch(n){case"humanReadable":(0,c.HumanReadable)(e,a,t);break;case"precise":(0,c.Precise)(e,a,t);break;case"blocksToDays":(0,c.BlocksToDays)(e,t);break;case"erasToDays":(0,c.ErasToDays)(e,t,a);break;case"percentage":(0,c.Percentage)(e,t);break;case"permillToPercent":(0,c.PermillToPercent)(e,t);break;case"arrayLength":(0,c.ArrayLength)(e,t);break;default:return void console.log("Ignoring unknown filter type")}}const p=function(e){var n=e.network,a=e.path,o=e.defaultValue,r=e.filter,c=void 0===r?void 0:r,d=(0,s.useState)(""),p=d[0],u=d[1];return n=n.toLowerCase(),(0,s.useEffect)((function(){void 0!==c?h(o.toString(),c,n,u):u(o.toString());var e=void 0;switch(n){case"polkadot":e="wss://rpc.polkadot.io";break;case"kusama":e="wss://kusama-rpc.polkadot.io/";break;case"statemine":e="wss://kusama-asset-hub-rpc.polkadot.io/";break;case"statemint":e="wss://polkadot-asset-hub-rpc.polkadot.io/";break;case"kusamapeople":e="wss://kusama-people-rpc.polkadot.io";break;case"polkadotpeople":e="wss://polkadot-people-rpc.polkadot.io";break;default:console.log("Unknown network provided, "+n)}if(void 0===e)console.log("Failed to connect to a valid websocket, applying default");else{var s=function(){var e=(0,i.A)((0,t.A)().mark((function e(){var i;return(0,t.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l(n,a,u);case 2:if(void 0!==(i=e.sent)){e.next=7;break}return e.abrupt("return");case 7:void 0!==c?h(i,c,n,u):u(i);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();try{s()}catch(r){console.log(r)}}}),[]),p}},11135:e=>{var n="polkadot",a="kusama",t="statemine",i="statemint",s="polkadotpeople",o="kusamapeople",r={polkadot:{precision:1e10,symbol:"DOT"},kusama:{precision:1e12,symbol:"KSM"},statemint:{precision:1e10,symbol:"DOT"},statemine:{precision:1e12,symbol:"KSM"},polkadotpeople:{precision:1e10,symbol:"DOT"},kusamapeople:{precision:1e12,symbol:"KSM"}};e.exports={HumanReadable:function(e,c,l){var d=void 0;if(c===n||c===i)d=3;else if(c===a||c===t||c===s)d=6;else{if(c!=o)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");d=8}e=parseFloat(e),l((e=Number.isInteger(e/r[c].precision)?e/r[c].precision+" "+r[c].symbol:(e/r[c].precision).toFixed(d)+" "+r[c].symbol).toString())},Precise:function(e,n,a){a(e=(e=parseFloat(e))/r[n].precision+" "+r[n].symbol)},BlocksToDays:function(e,n){n((e=6*e/86400).toString())},ErasToDays:function(e,r,c){var l=void 0;if(c===n||c===i||c==s)l=1;else{if(c!==a&&c!==t&&c!=o)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");l=4}r((e/=l).toString())},Percentage:function(e,n){n((e/=1e7).toString())},PermillToPercent:function(e,n){n((e/=1e4).toString())},ArrayLength:function(e,n){n((e=e.split(",").length).toString())}}},4498:(e,n,a)=>{"use strict";a.d(n,{A:()=>t});const t=a.p+"assets/images/async-backing-97a966a8148c023012205ad71a146bcc.png"},26033:(e,n,a)=>{"use strict";a.d(n,{A:()=>t});const t=a.p+"assets/images/sync-backing-39f23741e043faaf52bb5ddc880ea409.png"},37966:(e,n,a)=>{"use strict";a.d(n,{A:()=>t});const t=a.p+"assets/images/sync-vs-async-backing-3548388f98c44fc684a6176a6ccb8ed2.png"},47790:()=>{}}]); \ No newline at end of file diff --git a/assets/js/918b38b6.d9bf289c.js b/assets/js/918b38b6.d9bf289c.js deleted file mode 100644 index 5c0305f54b44..000000000000 --- a/assets/js/918b38b6.d9bf289c.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk=self.webpackChunk||[]).push([[6930],{30479:(e,n,a)=>{"use strict";a.r(n),a.d(n,{assets:()=>c,contentTitle:()=>o,default:()=>h,frontMatter:()=>s,metadata:()=>r,toc:()=>l});var t=a(74848),i=a(28453);a(47379);const s={id:"learn-async-backing",title:"Asynchronous Backing",sidebar_label:"Asynchronous Backing",description:"A brief overview of asynchronous backing, and how it affects Polkadot's scalability.",keywords:["parachains","backing","parablock","perspective parachains","unincluded segments"],slug:"../learn-async-backing"},o=void 0,r={id:"learn/learn-async-backing",title:"Asynchronous Backing",description:"A brief overview of asynchronous backing, and how it affects Polkadot's scalability.",source:"@site/../docs/learn/learn-async-backing.md",sourceDirName:"learn",slug:"/learn-async-backing",permalink:"/docs/learn-async-backing",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-async-backing.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1727178265e3,frontMatter:{id:"learn-async-backing",title:"Asynchronous Backing",sidebar_label:"Asynchronous Backing",description:"A brief overview of asynchronous backing, and how it affects Polkadot's scalability.",keywords:["parachains","backing","parablock","perspective parachains","unincluded segments"],slug:"../learn-async-backing"},sidebar:"docs",previous:{title:"Parachains FAQ",permalink:"/docs/learn-parachains-faq"},next:{title:"Agile Coretime",permalink:"/docs/learn-agile-coretime-index"}},c={},l=[{value:"Synchronous Backing",id:"synchronous-backing",level:2},{value:"Asynchronous Backing",id:"asynchronous-backing",level:2},{value:"Synchronous vs. Asynchronous Backing",id:"synchronous-vs-asynchronous-backing",level:3},{value:"Sync Backing as a special case of Async Backing",id:"sync-backing-as-a-special-case-of-async-backing",level:3},{value:"Async Backing Diagram",id:"async-backing-diagram",level:3},{value:"Terminology",id:"terminology",level:2},{value:"Candidate Receipt",id:"candidate-receipt",level:3},{value:"Pipelining",id:"pipelining",level:3},{value:"Unincluded Segments",id:"unincluded-segments",level:3},{value:"Prospective Parachains",id:"prospective-parachains",level:3},{value:"Learn More",id:"learn-more",level:2}];function d(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,i.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.admonition,{title:"Asynchronous Backing Guide for Parachains",type:"tip",children:(0,t.jsxs)(n.p,{children:["For upgrading a parachain for Asynchronous Backing compatibility, follow the instructions on\n",(0,t.jsx)(n.a,{href:"/docs/maintain-guides-async-backing",children:"this Wiki document."})]})}),"\n",(0,t.jsx)(n.admonition,{title:"Learn about Parachain Consensus",type:"info",children:(0,t.jsxs)(n.p,{children:["To fully follow the material on this page, it is recommended to be familiar with the primary stages\nof the ",(0,t.jsx)(n.a,{href:"/docs/learn-parachains-protocol",children:"Parachain Protocol"}),"."]})}),"\n",(0,t.jsxs)(n.p,{children:["In Polkadot, parablocks are generated by ",(0,t.jsx)(n.a,{href:"/docs/learn-collator",children:"collators"})," on the parachain side and\nsent to ",(0,t.jsx)(n.a,{href:"/docs/learn-validator",children:"validators"})," on the relay chain side for backing."]}),"\n",(0,t.jsx)(n.admonition,{title:"What is backing?",type:"info",children:(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Backing"})," refers to the process in which parablocks are verified by a subset of validators or\nbacking groups. It is an important step in the validation process for parablocks, as it is the first\nline of defense in ensuring censorship resistance. Parablocks only need to be backed by one\nvalidator, and as a consequence, backing does not ensure parablock validity."]})}),"\n",(0,t.jsxs)(n.p,{children:["Backed parablocks are sent to other validators for inclusion into the relay chain. Parablocks are\nincluded when validators have attested to having received\n",(0,t.jsx)(n.a,{href:"/docs/learn-parachains-protocol#erasure-codes",children:"erasure coded chunks"})," of the parablock data. Note\n",(0,t.jsx)(n.a,{href:"#candidate-receipt",children:"candidate receipts"})," and not the parablocks themselves are included in relay\nblocks (but for simplicity, we refer to parablocks as being included). When generated, parablocks\nmust be anchored to a relay chain block called ",(0,t.jsx)(n.strong,{children:"relay parent"}),". The relay parent is an input to\nparablock candidate generation. It provides the necessary context to build the next parablock. Note\nthat the relay parent of a parablock and the relay block including that parablock are always\ndifferent."]}),"\n",(0,t.jsx)(n.h2,{id:"synchronous-backing",children:"Synchronous Backing"}),"\n",(0,t.jsx)(n.p,{children:"Before diving into asynchronous backing, it is important to understand what synchronous backing is\nand its main limitations. In synchronous backing, parablock generation is tightly coupled to the\nrelay chain's progression:"}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsx)(n.li,{children:"A new parablock can be produced after including the previous one (i.e., every 12 seconds)."}),"\n",(0,t.jsx)(n.li,{children:"Context to build the next parablock is drawn from the latest included parablock ancestor"}),"\n",(0,t.jsx)(n.li,{children:"The relay parent must be the latest relay chain block."}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["Because of (1) parablocks can be generated every other relay chain block (i.e., every 12 seconds).\nBecause of (2) generation of parablock ",(0,t.jsx)(n.code,{children:"P"})," can only start when ",(0,t.jsx)(n.code,{children:"P - 1"})," is included (there is no\n",(0,t.jsx)(n.a,{href:"#pipelining",children:"pipelining"}),"). Because of (3) execution time can take maximum 0.5 seconds as parablock\n",(0,t.jsx)(n.code,{children:"P"})," is rushing to be backed in the next 5.5 seconds (2 seconds needed for backing and the rest for\ngossiping). Every parablock is backed in 6 seconds (one relay chain block) and included in the next\n6 seconds (next relay chain block). The time from generation to inclusion is 12 seconds. This limits\nthe amount of data a collator can add to each parablock."]}),"\n",(0,t.jsxs)(n.p,{children:["Parablock generation will choose the most recently received relay block as a relay parent, although\nwith an imperfect network that may differ from the true most recent relay block. So, in general, if\nrelay block ",(0,t.jsx)(n.code,{children:"R"})," is the relay parent of parablock ",(0,t.jsx)(n.code,{children:"P"}),", then ",(0,t.jsx)(n.code,{children:"P"})," could be backed in ",(0,t.jsx)(n.code,{children:"R + 1"})," and\nincluded in ",(0,t.jsx)(n.code,{children:"R + 2"}),"."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"sync-backing",src:a(26033).A+"",width:"1211",height:"503"})}),"\n",(0,t.jsxs)(n.p,{children:["From left to right, parablock P1 is anchored to the relay parent R0 (showed with an ",(0,t.jsx)(n.code,{children:"x"}),"), backed\ninto the relay chain block R1, and included in R2. After including P1, collators can start\ngenerating P2 that must be anchored to the relay parent R2. Note that R2 will be the relay parent of\nP2 if R2 is included on the relay chain and gossiped to the collator producing P2."]}),"\n",(0,t.jsx)(n.admonition,{title:"Every collator also runs an attached relay chain full node",type:"info",children:(0,t.jsxs)(n.p,{children:["The attached relay node receives relay blocks via gossip. Then, the relay node talks to the\nparachain node through the ",(0,t.jsx)(n.code,{children:"CollationGeneration"})," subsystem. R2 is gossiped to the relay full node\nattached to the collator producing P2. Then, ",(0,t.jsx)(n.code,{children:"CollationGeneration"})," passes information about R2 to\nthe collator node. Finally, relay parent information from R2 informs the generation of candidate P2."]})}),"\n",(0,t.jsx)(n.p,{children:"Because P2 is rushing to be backed in 6 seconds into R3, validators have only 0.5 seconds for\nexecution. Backing groups will take approximately 2 seconds to back it and some extra time for\ngossiping it (the whole process from collation to backing lasts 6 seconds). P2 is included in R4,\nwhich could be used as a relay parent for P3 (not shown). After 24 seconds P1 and P2 are included in\nthe relay chain. Note how collators can start new parablocks every 12 seconds but only have 0.5\nseconds for execution."}),"\n",(0,t.jsx)(n.h2,{id:"asynchronous-backing",children:"Asynchronous Backing"}),"\n",(0,t.jsx)(n.admonition,{title:"Disclaimer: Performance Measurements",type:"warning",children:(0,t.jsx)(n.p,{children:"Due to asynchronous backing not being fully implemented in a running production network, each\nperformance metric is not thoroughly tested nor guaranteed until proper benchmarking has occurred."})}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"sync-vs-async-backing",src:a(37966).A+"",width:"1920",height:"800"})}),"\n",(0,t.jsx)(n.p,{children:"In asynchronous backing, parablocks (P) are included every 6 seconds, and backing (B) and inclusion\n(I) can happen within the same relay chain block (R)."}),"\n",(0,t.jsx)(n.h3,{id:"synchronous-vs-asynchronous-backing",children:"Synchronous vs. Asynchronous Backing"}),"\n",(0,t.jsx)(n.p,{children:"Below is a table showing the main differences between synchronous and asynchronous backing."}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{style:{textAlign:"left"}}),(0,t.jsx)(n.th,{style:{textAlign:"center"},children:"Sync Backing"}),(0,t.jsx)(n.th,{style:{textAlign:"center"},children:"Async Backing"}),(0,t.jsx)(n.th,{style:{textAlign:"center"},children:"Async Backing Advantage"})]})}),(0,t.jsxs)(n.tbody,{children:[(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{style:{textAlign:"left"},children:(0,t.jsx)(n.strong,{children:"Parablocks included every"})}),(0,t.jsx)(n.td,{style:{textAlign:"center"},children:"12 seconds"}),(0,t.jsx)(n.td,{style:{textAlign:"center"},children:"6 seconds"}),(0,t.jsx)(n.td,{style:{textAlign:"center"},children:"2x more throughput or 2x less latency"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{style:{textAlign:"left"},children:(0,t.jsx)(n.strong,{children:"Parablock's maximum execution time"})}),(0,t.jsx)(n.td,{style:{textAlign:"center"},children:"0.5 seconds"}),(0,t.jsx)(n.td,{style:{textAlign:"center"},children:"2 seconds"}),(0,t.jsx)(n.td,{style:{textAlign:"center"},children:"4x more data in a parablock"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{style:{textAlign:"left"},children:(0,t.jsx)(n.strong,{children:"Relay parent"})}),(0,t.jsx)(n.td,{style:{textAlign:"center"},children:"Is the latest relay chain block"}),(0,t.jsx)(n.td,{style:{textAlign:"center"},children:"Is not necessarily the latest relay chain block"}),(0,t.jsx)(n.td,{style:{textAlign:"center"},children:"Collators can submit parablocks to backing groups in advance"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{style:{textAlign:"left"},children:(0,t.jsx)(n.strong,{children:"Collators can build on"})}),(0,t.jsx)(n.td,{style:{textAlign:"center"},children:"The most recent ancestor included in the latest relay chain block"}),(0,t.jsxs)(n.td,{style:{textAlign:"center"},children:["An ancestor included in a relay chain block (not necessarily the latest), with augmented information from the latest ancestor in the ",(0,t.jsx)(n.a,{href:"#unincluded-segments",children:"unincluded segment"})]}),(0,t.jsx)(n.td,{style:{textAlign:"center"},children:"Collators can start building parablocks in advance"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{style:{textAlign:"left"},children:(0,t.jsx)(n.strong,{children:"Number of unincluded parablocks"})}),(0,t.jsx)(n.td,{style:{textAlign:"center"},children:"Only one"}),(0,t.jsx)(n.td,{style:{textAlign:"center"},children:"One, or more than one (depends on configuration parameters)"}),(0,t.jsx)(n.td,{style:{textAlign:"center"},children:"More efficiency and scalability"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{style:{textAlign:"left"},children:(0,t.jsx)(n.strong,{children:"Unincluded parablocks"})}),(0,t.jsx)(n.td,{style:{textAlign:"center"},children:"Cannot be re-proposed"}),(0,t.jsx)(n.td,{style:{textAlign:"center"},children:"Can be re-proposed if not successfully included in the first attempt"}),(0,t.jsx)(n.td,{style:{textAlign:"center"},children:"Decrease wastage of unused blockspace"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{style:{textAlign:"left"},children:(0,t.jsx)(n.strong,{children:"Parablock's Backing-to-inclusion time"})}),(0,t.jsx)(n.td,{style:{textAlign:"center"},children:"12 seconds"}),(0,t.jsx)(n.td,{style:{textAlign:"center"},children:"12 seconds"}),(0,t.jsx)(n.td,{style:{textAlign:"center"},children:"No change"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{style:{textAlign:"left"},children:(0,t.jsx)(n.strong,{children:"Parablock's Inclusion-to-finality time"})}),(0,t.jsx)(n.td,{style:{textAlign:"center"},children:"30 seconds"}),(0,t.jsx)(n.td,{style:{textAlign:"center"},children:"30 seconds"}),(0,t.jsx)(n.td,{style:{textAlign:"center"},children:"No change"})]})]})]}),"\n",(0,t.jsxs)(n.p,{children:["In synchronous backing, collators generate parablocks using context entirely pulled from the relay\nchain. While in asynchronous backing, collators use additional context from the\n",(0,t.jsx)(n.a,{href:"#unincluded-segments",children:"unincluded segment"}),". Parablocks are included every 6 seconds because backing\nof parablock ",(0,t.jsx)(n.code,{children:"N + 1"})," and inclusion of parablock ",(0,t.jsx)(n.code,{children:"N"})," can happen on the same relay chain bock\n(",(0,t.jsx)(n.a,{href:"#pipelining",children:"pipelining"}),"). However, as for synchronous backing, a parablock takes 12 seconds to\nget backed and included, and from inclusion to finality there is an additional 30-second time\nwindow."]}),"\n",(0,t.jsx)(n.p,{children:"Because the throughput is increased by 2x and parachains have 4x more execution time, asynchronous\nbacking is expected to deliver 8x more blockspace to parachains."}),"\n",(0,t.jsx)(n.h3,{id:"sync-backing-as-a-special-case-of-async-backing",children:"Sync Backing as a special case of Async Backing"}),"\n",(0,t.jsxs)(n.p,{children:["Two parameters of asynchronous backing can be controlled by\n",(0,t.jsx)(n.a,{href:"/docs/learn-polkadot-opengov",children:"Governance"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/f204e3264f945c33b4cea18a49f7232c180b07c5/polkadot/primitives/src/vstaging/mod.rs#L49",children:(0,t.jsx)(n.code,{children:"max_candidate_depth"})}),":\nthe number of parachain blocks a collator can produce that are not yet included in the relay\nchain."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/f204e3264f945c33b4cea18a49f7232c180b07c5/polkadot/primitives/src/vstaging/mod.rs#L54",children:(0,t.jsx)(n.code,{children:"allowed_ancestry_len"})}),":\nthe oldest relay chain parent a parachain block can be built on top of."]}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["Values of zero for both correspond to synchronous backing: ",(0,t.jsx)(n.code,{children:"max_candidate_depth = 0"})," means there can\nbe only one unincluded parablock at all times, and ",(0,t.jsx)(n.code,{children:"allowed_ancestry_len = 0"})," means a parablock can\nbe built only on the latest relay parent for that parachain. Initial values will be set to 3 (4\nunincluded parablocks at all times) and 2 (relay parent can be the third last)."]}),"\n",(0,t.jsx)(n.h3,{id:"async-backing-diagram",children:"Async Backing Diagram"}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"async-backing",src:a(4498).A+"",width:"1209",height:"503"})}),"\n",(0,t.jsx)(n.p,{children:"The diagram assumes:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"max_candidate_depth = 2"}),", meaning that there can be a maximum of three unincluded parablocks at\nall times"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"allowed_ancestry_len = 1"}),", meaning parablocks can be anchored to the last or second-last relay\nparent (i.e., collators can start preparing parablocks 6 seconds in advance)"]}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["From left to right, parablock P1 is backed into the relay chain block R1 and included in R2. While\nP1 undergoes backing, collators can already generate P2, which will have R0 as a relay parent\n(showed with an ",(0,t.jsx)(n.code,{children:"x"}),"). Note how R0 can also be relay parent for P1 as long as in the unincluded\nsegment there is a maximum of three unincluded parablocks. Parablock P2 can be backed in R2 (the\nsame relay block where P1 is included) and included in R3. Collators can now use up to two seconds\nfor execution. And so on, P3 can be generated while backing groups check P2, and P4 can be built\nwhile P3 undergoing backing. In 24 seconds, P1 to P3 are included in the relay chain."]}),"\n",(0,t.jsxs)(n.p,{children:["Note how there are always three unincluded parablocks at all times, i.e. compared to synchronous\nbacking there can be multiple unincluded parablocks (i.e. ",(0,t.jsx)(n.a,{href:"#pipelining",children:"pipelining"}),"). For example,\nwhen P1 is undergoing inclusion, P2 and P3 are undergoing backing. Collators were able to generate\nmultiple unincluded parablocks because on their end they have the\n",(0,t.jsx)(n.a,{href:"#unincluded-segments",children:"unincluded segment"}),", a local storage of not-included parablock ancestors that\nthey can use to fetch information to build new parablocks. On the relay chain side,\n",(0,t.jsx)(n.a,{href:"#prospective-parachains",children:"perspective parachains"})," repeats the work each unincluded segment does in\ntracking candidates (as validators cannot trust the record kept on parachains)."]}),"\n",(0,t.jsx)(n.p,{children:"The 6-second relay chain block delay includes a backing execution timeout (2 seconds) and some time\nfor network latency (the time it takes to gossip messages across the entire network). The limit\ncollators have to generate parablocks is how long it takes to back it (i.e., 2 seconds). Collation\ngeneration conservatively always gives itself the same time limits. If there is extra time for\ncollation generation and backing (i.e., more than 2s + 6s), then all that extra time is allocated to\nbacking (see figure). This could result in backable blocks waiting their turn at the end of the\nbacking step for a few extra seconds until a core frees up to back that block as of the next relay\nblock or some later relay block. Note a core is occupied after backing and before inclusion."}),"\n",(0,t.jsxs)(n.p,{children:["The 2-second execution time is thus a limiter, not a system limitation. If parablock generation\ntakes >2 seconds, the unincluded segment will shrink (less unincluded parablocks), while if it takes\n< 2 seconds, the segment will grow (more unincluded parablocks that will need to be backed and\nincluded). Such flexibility from the parachain side will be possible when, on the relay chain side,\nthere will be elastic scaling (i.e.,\n",(0,t.jsx)(n.a,{href:"/docs/polkadot-direction#agile-core-usage",children:"agile core usage"})," and\n",(0,t.jsx)(n.a,{href:"/docs/polkadot-direction#agile-coretime-allocation",children:"coretime allocation"}),")."]}),"\n",(0,t.jsx)(n.h2,{id:"terminology",children:"Terminology"}),"\n",(0,t.jsx)(n.h3,{id:"candidate-receipt",children:"Candidate Receipt"}),"\n",(0,t.jsxs)(n.p,{children:["Saying that a parablock has been included in a relay chain parent does not mean the entire parablock\nis in the relay chain block. Instead, ",(0,t.jsx)(n.strong,{children:"candidate receipt"})," consisting of the hash of the parablock,\nstate roots, and ID info is placed on the parent block on the relay chain. The relay chain does not\naccess the entire state of a parachain but only the values that changed during that block and the\nmerkelized hashes of the unchanged values."]}),"\n",(0,t.jsx)(n.h3,{id:"pipelining",children:"Pipelining"}),"\n",(0,t.jsxs)(n.p,{children:["Asynchronous backing is a feature that introduces\n",(0,t.jsx)(n.a,{href:"https://www.techtarget.com/whatis/definition/pipelining",children:"pipelining"})," to the parachain block\n",(0,t.jsx)(n.a,{href:"/docs/learn-parachains-protocol",children:"generation, backing and inclusion"}),'. It is analogous to the logical\npipelining of processor instruction in "traditional" architectures, where some instructions may be\nexecuted before others are complete. Instructions may also be executed in parallel, enabling\nmultiple processor parts to work on potentially different instructions simultaneously.']}),"\n",(0,t.jsx)(n.p,{children:"Bundles of state transitions represented as blocks may be processed similarly. In the context of\nPolkadot, pipelining aims to increase the throughput of the entire network by completing the backing\nand inclusion steps for different blocks at the same time. Asynchronous backing does not just allow\nfor pipelining within a single pipe (or core). It lays the foundation for a large number of pipes\n(or cores) to run for the same parachain at the same time. In that way, we have two distinct new\nforms of parallel computation."}),"\n",(0,t.jsx)(n.h3,{id:"unincluded-segments",children:"Unincluded Segments"}),"\n",(0,t.jsx)(n.p,{children:"Unincluded segments are chains of candidate parablocks that have yet to be included in the relay\nchain, i.e. they can contain parablocks at any stage pre-inclusion. An unincluded segment may thus\ninclude candidates that are seconded, backable, or backed. Every parablock candidate recorded in the\nunincluded segment is immediately advertised to validators to begin the backing process."}),"\n",(0,t.jsx)(n.p,{children:"The backing process occurs on the relay chain, whereas unincluded segments live in the runtimes of\nparachain collators. The core functionality that asynchronous backing brings is the ability to build\non these unincluded segments of block ancestors rather than building only on ancestors included in\nthe relay chain state."}),"\n",(0,t.jsx)(n.p,{children:"The purpose of each unincluded segment is twofold:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Make each parachain aware of when and at what depth it can build blocks that won't be rejected by\nthe relay chain"}),"\n",(0,t.jsx)(n.li,{children:"Provide critical context necessary to build parablocks with parent blocks that have yet to be\nincluded. The unincluded segment is all about building parablocks."}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"prospective-parachains",children:"Prospective Parachains"}),"\n",(0,t.jsxs)(n.p,{children:["The purpose of\n",(0,t.jsx)(n.a,{href:"https://paritytech.github.io/polkadot/book/node/backing/prospective-parachains.html",children:"prospective parachains"}),"\nis twofold:"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Keep track of parablocks that have been submitted to backers but have yet to be included. This\nincludes tracking the full unincluded ancestry of each parablock, without which it wouldn't be\npossible to verify their legitimacy."}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Look up and provide candidates which are children of the most recently included parablock for each\nparachain. These are taken as inputs to the availability process. Prospective parachains is all\nabout tracking, storing, and providing candidates to the availability/inclusion step."}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["Prospective parachains essentially repeats the work each ",(0,t.jsx)(n.a,{href:"#unincluded-segments",children:"unincluded segment"}),"\ndoes in tracking candidates. Validators cannot simply trust the availability or validity of records\nkept on parachains. Prospective parachains is the relay chain's record of all parablock candidates\nundergoing the backing and inclusion process. It is the authoritative gatekeeper for parablock\nvalidity. Whereas the unincluded segment is a local record that allows parachains to produce blocks\nthat comply with the rules prospective parachains later enforces."]}),"\n",(0,t.jsxs)(n.p,{children:["The unincluded segment lives in the parachain runtime, so it doesn't know or care about forks/other\nparachains. Prospective parachains lives in the relay chain client. So it has to simultaneously keep\ntrack of candidates from all forks of all parachains. It is as if you folded the unincluded segments\nfrom every fork of every parachain into one giant data structure. When you fold unincluded segments\nrepresenting different chain forks together, they create a tree structure. Hence the term\n",(0,t.jsx)(n.a,{href:"https://paritytech.github.io/polkadot/book/node/backing/prospective-parachains.html#fragment-trees",children:(0,t.jsx)(n.strong,{children:"fragment tree"})}),"."]}),"\n",(0,t.jsx)(n.p,{children:"A single unincluded segment tells a collator whether it can build on top of one fork of one\nparachain. Prospective parachains tells a validator whether it should accept blocks built on top of\nany fork from any parachain."}),"\n",(0,t.jsx)(n.p,{children:"A parablock stops being a prospective parablock when it is included on chain. At that point\nprospective parachains does not have to care about it anymore. Alternatively, a parablock's relay\nparent can get too old before that parablock is included, in which case prospective parachains can\nthrow away the candidate."}),"\n",(0,t.jsx)(n.h2,{id:"learn-more",children:"Learn More"}),"\n",(0,t.jsx)(n.p,{children:"The information provided here is subject to change; keep up to date using the following resources:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"https://polkadot.network/blog/polkadot-roadmap-roundup",children:"Polkadot Roadmap Roundup"})," - Article by\nRob Habermeier, Polkadot founder, details the plans for Polkadot for 2023."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"https://github.com/paritytech/polkadot/issues/3779",children:"Asynchronous Backing Spec & Tracking Issue"})," -\nThe implementation tracking issue for asynchronous backing"]}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://paritytech.github.io/polkadot/book/node/backing/prospective-parachains.html",children:"Prospective Parachains Subsystem - The Polkadot Parachain Host Implementers' Guide"})}),"\n",(0,t.jsxs)(n.li,{children:["Chapter 6.11. from Polkadot Blockchain Academy (PBA) lecture material:\n",(0,t.jsx)(n.a,{href:"https://polkadot-blockchain-academy.github.io/pba-book/polkadot/async-backing-shallow/page.html",children:"Asynchronous Backing (Shallow)"})]}),"\n",(0,t.jsxs)(n.li,{children:["Chapter 6.15. from PBA lecture material:\n",(0,t.jsx)(n.a,{href:"https://polkadot-blockchain-academy.github.io/pba-book/polkadot/async-backing-deep/page.html",children:"Asynchronous Backing (Deep)"})]}),"\n",(0,t.jsxs)(n.li,{children:["Polkadot Blog Post -\n",(0,t.jsx)(n.a,{href:"https://www.polkadot.network/blog/elevating-polkadots-performance-and-scale-with-asynchronous-backing",children:"Asynchronous Backing: Elevating Polkadot's Performance and Scale"})]}),"\n",(0,t.jsxs)(n.li,{children:["Blog posts by Filippo Franchini on\n",(0,t.jsx)(n.a,{href:"https://grillapp.net/10124/polkadot-s-synchronous-backing-explained-40627?ref=10124",children:"Synchronous"}),"\nand\n",(0,t.jsx)(n.a,{href:"https://grillapp.net/10124/polkadot-s-asynchronous-backing-explained-40701?ref=10124",children:"Asynchronous Backing"})]}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(d,{...e})}):d(e)}},47379:(e,n,a)=>{"use strict";a.d(n,{A:()=>p});var t=a(90675),i=a(10467),s=a(96540),o=a(19588),r=a(2026),c=a(11135);function l(e,n,a){return d.apply(this,arguments)}function d(){return(d=(0,i.A)((0,t.A)().mark((function e(n,a,i){var s,c,l,d,h;return(0,t.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s=void 0,c=void 0,e.t0=n,e.next="polkadot"===e.t0?5:"kusama"===e.t0?7:"statemine"===e.t0?9:"statemint"===e.t0?11:"polkadotpeople"===e.t0?13:"kusamapeople"===e.t0?15:17;break;case 5:return s="wss://rpc.polkadot.io",e.abrupt("break",18);case 7:return s="wss://kusama-rpc.polkadot.io/",e.abrupt("break",18);case 9:return s="wss://statemine-rpc.polkadot.io/",e.abrupt("break",18);case 11:return s="wss://statemint-rpc.polkadot.io/",e.abrupt("break",18);case 13:return s="wss://polkadot-people-rpc.polkadot.io/",e.abrupt("break",18);case 15:return s="wss://kusama-people-rpc.polkadot.io/",e.abrupt("break",18);case 17:console.log("Unknown socket url provided, no connection made.");case 18:if(void 0!==s){e.next=22;break}return e.abrupt("return");case 22:return l=new o.E(s),e.next=25,r.G.create({provider:l});case 25:d=e.sent,(h=a.split(".")).forEach((function(e){e in d&&(d=d[e])})),e.t1=h[0],e.next="consts"===e.t1?31:"query"===e.t1?33:38;break;case 31:return c=d.toString(),e.abrupt("break",39);case 33:return e.next=35,d();case 35:return c=(c=e.sent).toString(),e.abrupt("break",39);case 38:console.log("Unknown path prefix ("+h[0]+") in "+a);case 39:return e.abrupt("return",c);case 40:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function h(e,n,a,t){switch(n){case"humanReadable":(0,c.HumanReadable)(e,a,t);break;case"precise":(0,c.Precise)(e,a,t);break;case"blocksToDays":(0,c.BlocksToDays)(e,t);break;case"erasToDays":(0,c.ErasToDays)(e,t,a);break;case"percentage":(0,c.Percentage)(e,t);break;case"permillToPercent":(0,c.PermillToPercent)(e,t);break;case"arrayLength":(0,c.ArrayLength)(e,t);break;default:return void console.log("Ignoring unknown filter type")}}const p=function(e){var n=e.network,a=e.path,o=e.defaultValue,r=e.filter,c=void 0===r?void 0:r,d=(0,s.useState)(""),p=d[0],u=d[1];return n=n.toLowerCase(),(0,s.useEffect)((function(){void 0!==c?h(o.toString(),c,n,u):u(o.toString());var e=void 0;switch(n){case"polkadot":e="wss://rpc.polkadot.io";break;case"kusama":e="wss://kusama-rpc.polkadot.io/";break;case"statemine":e="wss://kusama-asset-hub-rpc.polkadot.io/";break;case"statemint":e="wss://polkadot-asset-hub-rpc.polkadot.io/";break;case"kusamapeople":e="wss://kusama-people-rpc.polkadot.io";break;case"polkadotpeople":e="wss://polkadot-people-rpc.polkadot.io";break;default:console.log("Unknown network provided, "+n)}if(void 0===e)console.log("Failed to connect to a valid websocket, applying default");else{var s=function(){var e=(0,i.A)((0,t.A)().mark((function e(){var i;return(0,t.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l(n,a,u);case 2:if(void 0!==(i=e.sent)){e.next=7;break}return e.abrupt("return");case 7:void 0!==c?h(i,c,n,u):u(i);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();try{s()}catch(r){console.log(r)}}}),[]),p}},11135:e=>{var n="polkadot",a="kusama",t="statemine",i="statemint",s="polkadotpeople",o="kusamapeople",r={polkadot:{precision:1e10,symbol:"DOT"},kusama:{precision:1e12,symbol:"KSM"},statemint:{precision:1e10,symbol:"DOT"},statemine:{precision:1e12,symbol:"KSM"},polkadotpeople:{precision:1e10,symbol:"DOT"},kusamapeople:{precision:1e12,symbol:"KSM"}};e.exports={HumanReadable:function(e,c,l){var d=void 0;if(c===n||c===i)d=3;else if(c===a||c===t||c===s)d=6;else{if(c!=o)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");d=8}e=parseFloat(e),l((e=Number.isInteger(e/r[c].precision)?e/r[c].precision+" "+r[c].symbol:(e/r[c].precision).toFixed(d)+" "+r[c].symbol).toString())},Precise:function(e,n,a){a(e=(e=parseFloat(e))/r[n].precision+" "+r[n].symbol)},BlocksToDays:function(e,n){n((e=6*e/86400).toString())},ErasToDays:function(e,r,c){var l=void 0;if(c===n||c===i||c==s)l=1;else{if(c!==a&&c!==t&&c!=o)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");l=4}r((e/=l).toString())},Percentage:function(e,n){n((e/=1e7).toString())},PermillToPercent:function(e,n){n((e/=1e4).toString())},ArrayLength:function(e,n){n((e=e.split(",").length).toString())}}},4498:(e,n,a)=>{"use strict";a.d(n,{A:()=>t});const t=a.p+"assets/images/async-backing-97a966a8148c023012205ad71a146bcc.png"},26033:(e,n,a)=>{"use strict";a.d(n,{A:()=>t});const t=a.p+"assets/images/sync-backing-39f23741e043faaf52bb5ddc880ea409.png"},37966:(e,n,a)=>{"use strict";a.d(n,{A:()=>t});const t=a.p+"assets/images/sync-vs-async-backing-3548388f98c44fc684a6176a6ccb8ed2.png"},47790:()=>{}}]); \ No newline at end of file diff --git a/assets/js/921.497f0c46.js b/assets/js/921.497f0c46.js new file mode 100644 index 000000000000..9903f4bac2c9 --- /dev/null +++ b/assets/js/921.497f0c46.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[921],{80921:(r,s,e)=>{e.d(s,{diagram:()=>t});var a=e(96790),l=(e(79972),e(79740),e(6396),e(5081),e(34483),e(52294),e(62392),e(86825),e(85039),e(45567)),t={parser:a._$,db:a.z2,renderer:a.Lh,styles:a.tM,init:(0,l.K2)((r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute,a.z2.clear()}),"init")}}}]); \ No newline at end of file diff --git a/assets/js/943aba4c.6abcdbde.js b/assets/js/943aba4c.6abcdbde.js new file mode 100644 index 000000000000..14133c10d954 --- /dev/null +++ b/assets/js/943aba4c.6abcdbde.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1112],{94436:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>r,contentTitle:()=>l,default:()=>h,frontMatter:()=>c,metadata:()=>o,toc:()=>d});const o=JSON.parse('{"id":"learn/learn-guides-claims","title":"Polkadot-JS Guides about Claims","description":"Step-by-step guide on how to claim your tokens.","source":"@site/../docs/learn/learn-guides-claims.md","sourceDirName":"learn","slug":"/learn-guides-claims","permalink":"/docs/learn-guides-claims","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-claims.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1729847256000,"frontMatter":{"id":"learn-guides-claims","title":"Polkadot-JS Guides about Claims","sidebar_label":"Claim Guides","description":"Step-by-step guide on how to claim your tokens.","keywords":["claims","tokens","kusama","polkadot"],"slug":"../learn-guides-claims"},"sidebar":"docs","previous":{"title":"DOT <> KSM Bridge","permalink":"/docs/learn-guides-dot-ksm-bridge"},"next":{"title":"Architecture","permalink":"/docs/learn-architecture"}}');var a=n(74848),s=n(28453),i=n(67141);const c={id:"learn-guides-claims",title:"Polkadot-JS Guides about Claims",sidebar_label:"Claim Guides",description:"Step-by-step guide on how to claim your tokens.",keywords:["claims","tokens","kusama","polkadot"],slug:"../learn-guides-claims"},l=void 0,r={},d=[{value:"Generate an Account",id:"generate-an-account",level:2},{value:"Claiming Tokens",id:"claiming-tokens",level:2},{value:"Select Accounts",id:"select-accounts",level:3},{value:"Select Account on Ethereum",id:"select-account-on-ethereum",level:4},{value:"Sign Message on Ethereum & Claim",id:"sign-message-on-ethereum--claim",level:3},{value:"Verifying your Claim",id:"verifying-your-claim",level:3}];function u(e){const t={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",h4:"h4",img:"img",p:"p",...(0,s.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the Polkadot-JS UI, you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,a.jsx)(i.A,{message:"Screenshots on this page are based on Polkadot, but note that the same process applies to Kusama."}),"\n",(0,a.jsx)(t.p,{children:"If you participated in a previous DOT sale before 2020 and received your DOT allocation indicator\ntokens, you can now claim your DOT (and a proportional amount of KSM on the Kusama network). The\nclaim process connects the address where your DOT indicators have been stored on Ethereum with a\nnative Polkadot address and, if your ETH address is eligible, will pay the tokens to the Polkadot\naddress."}),"\n",(0,a.jsxs)(t.p,{children:["To do this, you must sign a message on Ethereum containing the address of your Polkadot account. You\ncan do this by using the Polkadot-JS UI ",(0,a.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/claims",children:"Claims app"}),". Ensure\nthat you are connected to the Polkadot network (displayed in the upper-left-hand corner of the\nscreen)."]}),"\n",(0,a.jsx)(t.admonition,{title:"Third-party claim processes",type:"warning",children:(0,a.jsx)(t.p,{children:"Claiming using a third-party process can lead to losing your allocation; therefore, we cannot\nrecommend using any third-party apps. Manually specifying your transaction data, as specified in our\nclaims process below, is the only way to ensure you will receive your allocation."})}),"\n",(0,a.jsx)(t.h2,{id:"generate-an-account",children:"Generate an Account"}),"\n",(0,a.jsxs)(t.p,{children:["You will need to generate an account on the relay chain to claim DOT (or KSM on Kusama). See the\n",(0,a.jsx)(t.a,{href:"/docs/wallets-and-extensions",children:"available wallets and extensions"})," for more information about\nwallets and browser extensions you can use to create an account. In terms of hardware wallet\nsupport, you can use the ",(0,a.jsx)(t.a,{href:"/docs/ledger",children:"Ledger"})," devices or\n",(0,a.jsx)(t.a,{href:"/docs/polkadot-vault",children:"Polkadot Vault"}),"."]}),"\n",(0,a.jsx)(t.h2,{id:"claiming-tokens",children:"Claiming Tokens"}),"\n",(0,a.jsxs)(t.p,{children:["The Polkadot-JS ",(0,a.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/claims",children:"Claims app"})," will guide you through the\nprocess of claiming the tokens."]}),"\n",(0,a.jsx)(t.h3,{id:"select-accounts",children:"Select Accounts"}),"\n",(0,a.jsx)(t.p,{children:'Select the account you would like to claim the tokens into and click the "Continue" button to\nproceed. Your screen should look something like this:'}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"claim select dot account",src:n(53825).A+"",width:"1102",height:"301"})}),"\n",(0,a.jsx)(t.h4,{id:"select-account-on-ethereum",children:"Select Account on Ethereum"}),"\n",(0,a.jsx)(t.p,{children:'Paste the Ethereum address with the DOT allocation indicator tokens and click the "Continue" button\nto proceed.'}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"claim select eth account",src:n(21765).A+"",width:"1092",height:"453"})}),"\n",(0,a.jsx)(t.h3,{id:"sign-message-on-ethereum--claim",children:"Sign Message on Ethereum & Claim"}),"\n",(0,a.jsxs)(t.p,{children:['The hex-encoded string that follows the sentence "Pay DOT to the Polkadot account:" is the\nhex-encoded public key of your Polkadot account, minus the ',(0,a.jsx)(t.code,{children:"0x"})," prefix."]}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"claim copy msg",src:n(60894).A+"",width:"1107",height:"888"})}),"\n",(0,a.jsxs)(t.p,{children:["Go to\n",(0,a.jsx)(t.a,{href:"https://app.mycrypto.com/sign-message",children:'the "Sign & Verify Message" tab on the MyCrypto web application'}),'.\nMyCrypto is good to use if you have stored the key to the Ethereum account holding your DOT\nindicator tokens on a hardware device like a Ledger Nano. It also supports raw private keys,\nmnemonics, and the Polkadot Vault. After unlocking your Ethereum wallet, copy and paste the\noutputted sentence on the Polkadot-JS UI into the message box on the MyCrypto app. When you click\n"Sign Message" you will get a JSON output signature as shown below:']}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"claim get signature",src:n(55860).A+"",width:"847",height:"673"})}),"\n",(0,a.jsx)(t.p,{children:'Copy and paste the JSON output of the signed message from MyCrypto into the input box on the\nPolkadot-JS UI and click "Confirm Claim."'}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"claim paste signature",src:n(22145).A+"",width:"1933",height:"823"})}),"\n",(0,a.jsxs)(t.p,{children:["At this point, if you are eligible, you will see a success message if everything went right and your\ntokens will now be in the account that you claimed to. Congratulations! You can now participate in\naspects of the network such as ",(0,a.jsx)(t.a,{href:"/docs/learn-polkadot-opengov",children:"governance"})," and\n",(0,a.jsx)(t.a,{href:"/docs/learn-staking",children:"staking"}),"."]}),"\n",(0,a.jsx)(t.h3,{id:"verifying-your-claim",children:"Verifying your Claim"}),"\n",(0,a.jsx)(t.p,{children:"After you make an on-chain claim, your Your account balance should be updated immediately."})]})}function h(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,a.jsx)(t,{...e,children:(0,a.jsx)(u,{...e})}):u(e)}},67141:(e,t,n)=>{n.d(t,{A:()=>s});var o=n(96540),a=n(74848);const s=function(e){var t,n=e.message,s=(0,o.useState)(!0),i=s[0],c=s[1];return(0,a.jsx)(a.Fragment,{children:i&&(0,a.jsxs)("div",{className:"message-box",children:[(0,a.jsx)("button",{className:"close-button",onClick:function(){c(!1)},children:"\u2716 "}),(0,a.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(t=n,t.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},60894:(e,t,n)=>{n.d(t,{A:()=>o});const o=n.p+"assets/images/claim-copy-msg-9202762828ee9a331ef58dd563e555b5.png"},55860:(e,t,n)=>{n.d(t,{A:()=>o});const o=n.p+"assets/images/claim-get-signature-654200548d6f5f1a374d9ccc9a164c67.png"},22145:(e,t,n)=>{n.d(t,{A:()=>o});const o=n.p+"assets/images/claim-paste-signature-2f64e7c24774df3fede97597551cc9c1.png"},53825:(e,t,n)=>{n.d(t,{A:()=>o});const o=n.p+"assets/images/claim-select-dot-account-a31d56bcfdb38d2783dd347b8e902e68.png"},21765:(e,t,n)=>{n.d(t,{A:()=>o});const o=n.p+"assets/images/claim-select-eth-account-d1e003f87a8b53786a325ec5339a626d.png"},28453:(e,t,n)=>{n.d(t,{R:()=>i,x:()=>c});var o=n(96540);const a={},s=o.createContext(a);function i(e){const t=o.useContext(s);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function c(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:i(e.components),o.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/943aba4c.bd51f365.js b/assets/js/943aba4c.bd51f365.js deleted file mode 100644 index 65178ec3b72a..000000000000 --- a/assets/js/943aba4c.bd51f365.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1112],{83686:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>r,contentTitle:()=>c,default:()=>h,frontMatter:()=>i,metadata:()=>l,toc:()=>d});var o=n(74848),a=n(28453),s=n(67141);const i={id:"learn-guides-claims",title:"Polkadot-JS Guides about Claims",sidebar_label:"Claim Guides",description:"Step-by-step guide on how to claim your tokens.",keywords:["claims","tokens","kusama","polkadot"],slug:"../learn-guides-claims"},c=void 0,l={id:"learn/learn-guides-claims",title:"Polkadot-JS Guides about Claims",description:"Step-by-step guide on how to claim your tokens.",source:"@site/../docs/learn/learn-guides-claims.md",sourceDirName:"learn",slug:"/learn-guides-claims",permalink:"/docs/learn-guides-claims",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-claims.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1729847256e3,frontMatter:{id:"learn-guides-claims",title:"Polkadot-JS Guides about Claims",sidebar_label:"Claim Guides",description:"Step-by-step guide on how to claim your tokens.",keywords:["claims","tokens","kusama","polkadot"],slug:"../learn-guides-claims"},sidebar:"docs",previous:{title:"DOT <> KSM Bridge",permalink:"/docs/learn-guides-dot-ksm-bridge"},next:{title:"Architecture",permalink:"/docs/learn-architecture"}},r={},d=[{value:"Generate an Account",id:"generate-an-account",level:2},{value:"Claiming Tokens",id:"claiming-tokens",level:2},{value:"Select Accounts",id:"select-accounts",level:3},{value:"Select Account on Ethereum",id:"select-account-on-ethereum",level:4},{value:"Sign Message on Ethereum & Claim",id:"sign-message-on-ethereum--claim",level:3},{value:"Verifying your Claim",id:"verifying-your-claim",level:3}];function u(e){const t={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",h4:"h4",img:"img",p:"p",...(0,a.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(s.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the Polkadot-JS UI, you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,o.jsx)(s.A,{message:"Screenshots on this page are based on Polkadot, but note that the same process applies to Kusama."}),"\n",(0,o.jsx)(t.p,{children:"If you participated in a previous DOT sale before 2020 and received your DOT allocation indicator\ntokens, you can now claim your DOT (and a proportional amount of KSM on the Kusama network). The\nclaim process connects the address where your DOT indicators have been stored on Ethereum with a\nnative Polkadot address and, if your ETH address is eligible, will pay the tokens to the Polkadot\naddress."}),"\n",(0,o.jsxs)(t.p,{children:["To do this, you must sign a message on Ethereum containing the address of your Polkadot account. You\ncan do this by using the Polkadot-JS UI ",(0,o.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/claims",children:"Claims app"}),". Ensure\nthat you are connected to the Polkadot network (displayed in the upper-left-hand corner of the\nscreen)."]}),"\n",(0,o.jsx)(t.admonition,{title:"Third-party claim processes",type:"warning",children:(0,o.jsx)(t.p,{children:"Claiming using a third-party process can lead to losing your allocation; therefore, we cannot\nrecommend using any third-party apps. Manually specifying your transaction data, as specified in our\nclaims process below, is the only way to ensure you will receive your allocation."})}),"\n",(0,o.jsx)(t.h2,{id:"generate-an-account",children:"Generate an Account"}),"\n",(0,o.jsxs)(t.p,{children:["You will need to generate an account on the relay chain to claim DOT (or KSM on Kusama). See the\n",(0,o.jsx)(t.a,{href:"/docs/wallets-and-extensions",children:"available wallets and extensions"})," for more information about\nwallets and browser extensions you can use to create an account. In terms of hardware wallet\nsupport, you can use the ",(0,o.jsx)(t.a,{href:"/docs/ledger",children:"Ledger"})," devices or\n",(0,o.jsx)(t.a,{href:"/docs/polkadot-vault",children:"Polkadot Vault"}),"."]}),"\n",(0,o.jsx)(t.h2,{id:"claiming-tokens",children:"Claiming Tokens"}),"\n",(0,o.jsxs)(t.p,{children:["The Polkadot-JS ",(0,o.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/claims",children:"Claims app"})," will guide you through the\nprocess of claiming the tokens."]}),"\n",(0,o.jsx)(t.h3,{id:"select-accounts",children:"Select Accounts"}),"\n",(0,o.jsx)(t.p,{children:'Select the account you would like to claim the tokens into and click the "Continue" button to\nproceed. Your screen should look something like this:'}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{alt:"claim select dot account",src:n(53825).A+"",width:"1102",height:"301"})}),"\n",(0,o.jsx)(t.h4,{id:"select-account-on-ethereum",children:"Select Account on Ethereum"}),"\n",(0,o.jsx)(t.p,{children:'Paste the Ethereum address with the DOT allocation indicator tokens and click the "Continue" button\nto proceed.'}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{alt:"claim select eth account",src:n(21765).A+"",width:"1092",height:"453"})}),"\n",(0,o.jsx)(t.h3,{id:"sign-message-on-ethereum--claim",children:"Sign Message on Ethereum & Claim"}),"\n",(0,o.jsxs)(t.p,{children:['The hex-encoded string that follows the sentence "Pay DOT to the Polkadot account:" is the\nhex-encoded public key of your Polkadot account, minus the ',(0,o.jsx)(t.code,{children:"0x"})," prefix."]}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{alt:"claim copy msg",src:n(60894).A+"",width:"1107",height:"888"})}),"\n",(0,o.jsxs)(t.p,{children:["Go to\n",(0,o.jsx)(t.a,{href:"https://app.mycrypto.com/sign-message",children:'the "Sign & Verify Message" tab on the MyCrypto web application'}),'.\nMyCrypto is good to use if you have stored the key to the Ethereum account holding your DOT\nindicator tokens on a hardware device like a Ledger Nano. It also supports raw private keys,\nmnemonics, and the Polkadot Vault. After unlocking your Ethereum wallet, copy and paste the\noutputted sentence on the Polkadot-JS UI into the message box on the MyCrypto app. When you click\n"Sign Message" you will get a JSON output signature as shown below:']}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{alt:"claim get signature",src:n(55860).A+"",width:"847",height:"673"})}),"\n",(0,o.jsx)(t.p,{children:'Copy and paste the JSON output of the signed message from MyCrypto into the input box on the\nPolkadot-JS UI and click "Confirm Claim."'}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{alt:"claim paste signature",src:n(22145).A+"",width:"1933",height:"823"})}),"\n",(0,o.jsxs)(t.p,{children:["At this point, if you are eligible, you will see a success message if everything went right and your\ntokens will now be in the account that you claimed to. Congratulations! You can now participate in\naspects of the network such as ",(0,o.jsx)(t.a,{href:"/docs/learn-polkadot-opengov",children:"governance"})," and\n",(0,o.jsx)(t.a,{href:"/docs/learn-staking",children:"staking"}),"."]}),"\n",(0,o.jsx)(t.h3,{id:"verifying-your-claim",children:"Verifying your Claim"}),"\n",(0,o.jsx)(t.p,{children:"After you make an on-chain claim, your Your account balance should be updated immediately."})]})}function h(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(u,{...e})}):u(e)}},67141:(e,t,n)=>{n.d(t,{A:()=>s});var o=n(96540),a=n(74848);const s=function(e){var t,n=e.message,s=(0,o.useState)(!0),i=s[0],c=s[1];return(0,a.jsx)(a.Fragment,{children:i&&(0,a.jsxs)("div",{className:"message-box",children:[(0,a.jsx)("button",{className:"close-button",onClick:function(){c(!1)},children:"\u2716 "}),(0,a.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(t=n,t.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},60894:(e,t,n)=>{n.d(t,{A:()=>o});const o=n.p+"assets/images/claim-copy-msg-9202762828ee9a331ef58dd563e555b5.png"},55860:(e,t,n)=>{n.d(t,{A:()=>o});const o=n.p+"assets/images/claim-get-signature-654200548d6f5f1a374d9ccc9a164c67.png"},22145:(e,t,n)=>{n.d(t,{A:()=>o});const o=n.p+"assets/images/claim-paste-signature-2f64e7c24774df3fede97597551cc9c1.png"},53825:(e,t,n)=>{n.d(t,{A:()=>o});const o=n.p+"assets/images/claim-select-dot-account-a31d56bcfdb38d2783dd347b8e902e68.png"},21765:(e,t,n)=>{n.d(t,{A:()=>o});const o=n.p+"assets/images/claim-select-eth-account-d1e003f87a8b53786a325ec5339a626d.png"},28453:(e,t,n)=>{n.d(t,{R:()=>i,x:()=>c});var o=n(96540);const a={},s=o.createContext(a);function i(e){const t=o.useContext(s);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function c(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:i(e.components),o.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/9528ac88.0c912946.js b/assets/js/9528ac88.0c912946.js new file mode 100644 index 000000000000..877ec4c950ec --- /dev/null +++ b/assets/js/9528ac88.0c912946.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1379],{88693:(e,s,n)=>{n.r(s),n.d(s,{assets:()=>c,contentTitle:()=>o,default:()=>d,frontMatter:()=>r,metadata:()=>a,toc:()=>l});const a=JSON.parse('{"id":"learn/learn-xcm-transport","title":"XCM Transport Methods (XCMP, HRMP, VMP)","description":"Methods to send XCM Messages across Networks.","source":"@site/../docs/learn/learn-xcm-transport.md","sourceDirName":"learn","slug":"/learn-xcm-transport","permalink":"/docs/learn-xcm-transport","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-xcm-transport.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1727991122000,"frontMatter":{"id":"learn-xcm-transport","title":"XCM Transport Methods (XCMP, HRMP, VMP)","sidebar_label":"XCM Transport","description":"Methods to send XCM Messages across Networks.","keywords":["cross-consensus","XCM","XCMP","interoperability","communication"],"slug":"../learn-xcm-transport"},"sidebar":"docs","previous":{"title":"XCM Use-cases","permalink":"/docs/learn-xcm-usecases"},"next":{"title":"XCM Virtual Machine (XCVM)","permalink":"/docs/learn-xcvm"}}');var i=n(74848),t=n(28453);const r={id:"learn-xcm-transport",title:"XCM Transport Methods (XCMP, HRMP, VMP)",sidebar_label:"XCM Transport",description:"Methods to send XCM Messages across Networks.",keywords:["cross-consensus","XCM","XCMP","interoperability","communication"],slug:"../learn-xcm-transport"},o=void 0,c={},l=[{value:"XCMP (Cross-Chain Message Passing)",id:"xcmp-cross-chain-message-passing",level:3},{value:"VMP (Vertical Message Passing)",id:"vmp-vertical-message-passing",level:3},{value:"UMP (Upward Message Passing)",id:"ump-upward-message-passing",level:4},{value:"DMP (Downward Message Passing)",id:"dmp-downward-message-passing",level:4},{value:"HRMP (XCMP-Lite)",id:"hrmp-xcmp-lite",level:3},{value:"XCMP (Cross Consensus Message Passing) Design Summary",id:"xcmp-cross-consensus-message-passing-design-summary",level:3},{value:"The Anatomy of an XCMP Interaction",id:"the-anatomy-of-an-xcmp-interaction",level:4}];function h(e){const s={a:"a",admonition:"admonition",code:"code",em:"em",h3:"h3",h4:"h4",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,t.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(s.admonition,{title:"XCM Documentation",type:"info",children:(0,i.jsxs)(s.p,{children:["For a more practical approach to utilizing XCM, refer to the ",(0,i.jsx)(s.a,{href:"./learn/xcm",children:"XCM Docs"}),". Please keep in\nmind that XCM is under active development."]})}),"\n",(0,i.jsx)(s.p,{children:"With the XCM format established, common patterns for protocols of these messages are needed.\nPolkadot implements two message passing protocols for acting on XCM messages between its constituent\nparachains."}),"\n",(0,i.jsx)(s.p,{children:"There are three primary methods for message passing, one of which is under development:"}),"\n",(0,i.jsxs)(s.ol,{children:["\n",(0,i.jsx)(s.li,{children:"XCMP (Cross-Consensus Message Passing)"}),"\n",(0,i.jsx)(s.li,{children:"Horizontal Relay-routed Message Passing (HRMP/XCMP-lite)"}),"\n",(0,i.jsx)(s.li,{children:"VMP (Vertical Message Passing)"}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"xcmp-cross-chain-message-passing",children:"XCMP (Cross-Chain Message Passing)"}),"\n",(0,i.jsx)(s.admonition,{type:"caution",children:(0,i.jsx)(s.p,{children:"XCMP is currently under development, and most of the cross-chain messages pass through HRMP channels\nfor the time being."})}),"\n",(0,i.jsx)(s.p,{children:"XCM is related to XCMP in the same way that REST is related to RESTful."}),"\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.em,{children:"Cross-Consensus Message Passing"})," secure message passing between parachains. There are two variants:\n",(0,i.jsx)(s.em,{children:"Direct"})," and ",(0,i.jsx)(s.em,{children:"Relayed"}),"."]}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["With ",(0,i.jsx)(s.em,{children:"Direct"}),", message data goes direct between parachains and is O(1) on the side of the relay\nchain and is very scalable."]}),"\n",(0,i.jsxs)(s.li,{children:["With ",(0,i.jsx)(s.em,{children:"Relayed"}),", message data is passed via the relay chain, and piggy-backs over VMP. It is much\nless scalable, and on-demand parachains in particular may not receive messages due to excessive\nqueue growth."]}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:"Cross-chain transactions are resolved using a simple queuing mechanism based around a Merkle tree to\nensure fidelity. It is the task of the relay chain validators to move transactions on the output\nqueue of one parachain into the input queue of the destination parachain. However, only the\nassociated metadata is stored as a hash in the relay chain storage."}),"\n",(0,i.jsxs)(s.p,{children:["The input and output queue are sometimes referred to in the Polkadot codebase and associated\ndocumentation as ",(0,i.jsx)(s.code,{children:"ingress"})," and ",(0,i.jsx)(s.code,{children:"egress"})," messages, respectively."]}),"\n",(0,i.jsx)(s.admonition,{type:"info",children:(0,i.jsxs)(s.p,{children:["For detailed information about VMP see dedicated section in\n",(0,i.jsx)(s.a,{href:"https://paritytech.github.io/polkadot/book/messaging.html#horizontal-message-passing",children:"The Polkadot Parachain Host Implementers' Guide"}),"."]})}),"\n",(0,i.jsx)(s.h3,{id:"vmp-vertical-message-passing",children:"VMP (Vertical Message Passing)"}),"\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.em,{children:"Vertical Message Passing"})," message passing between the relay chain itself and a parachain. Message\ndata in both cases exists on the relay chain and are interpreted by the relay chain according to\n",(0,i.jsx)(s.a,{href:"./learn-xcm.md/#cross-consensus-message-format-xcm",children:"XCM"})," standards. This includes:"]}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsx)(s.h4,{id:"ump-upward-message-passing",children:"UMP (Upward Message Passing)"}),"\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.em,{children:"Upward Message Passing"})," message passing from a parachain to the relay chain."]}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsx)(s.h4,{id:"dmp-downward-message-passing",children:"DMP (Downward Message Passing)"}),"\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.em,{children:"Downward Message Passing"})," message passing from the relay chain to a parachain."]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(s.admonition,{type:"info",children:(0,i.jsxs)(s.p,{children:["For detailed information about VMP see dedicated section in\n",(0,i.jsx)(s.a,{href:"https://paritytech.github.io/polkadot/book/messaging.html#vertical-message-passing",children:"The Polkadot Parachain Host Implementers' Guide"}),"."]})}),"\n",(0,i.jsx)(s.h3,{id:"hrmp-xcmp-lite",children:"HRMP (XCMP-Lite)"}),"\n",(0,i.jsxs)(s.p,{children:["While XCMP is still being implemented, a stop-gap protocol (see definition below) known as\n",(0,i.jsx)(s.strong,{children:"Horizontal Relay-routed Message Passing (HRMP)"})," exists in its place. HRMP has the same interface\nand functionality as XCMP but is much more demanding on resources since it stores all messages in\nthe relay chain storage. When XCMP has been implemented, HRMP is planned to be deprecated and phased\nout in favor of it."]}),"\n",(0,i.jsx)(s.p,{children:(0,i.jsx)(s.img,{alt:"xcm",src:n(41612).A+"",width:"2664",height:"1754"})}),"\n",(0,i.jsx)(s.admonition,{type:"note",children:(0,i.jsx)(s.p,{children:"A stop-gap protocol is a temporary substitute for the functionality that is not fully complete.\nWhile XCMP proper is still in development, HRMP is a working replacement."})}),"\n",(0,i.jsxs)(s.p,{children:["A tutorial on how to open an HRMP channel on a parachain can be found\n",(0,i.jsx)(s.a,{href:"/docs/build-hrmp-channels",children:"here"}),"."]}),"\n",(0,i.jsx)(s.h3,{id:"xcmp-cross-consensus-message-passing-design-summary",children:"XCMP (Cross Consensus Message Passing) Design Summary"}),"\n",(0,i.jsx)("div",{className:"row",children:(0,i.jsxs)("div",{className:"col text--center",children:[(0,i.jsx)("a",{href:"https://www.youtube.com/watch?v=tOnzk4AROUY",children:(0,i.jsx)("img",{src:"https://img.youtube.com/vi/tOnzk4AROUY/0.jpg",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,i.jsx)("p",{children:(0,i.jsx)("a",{href:"https://www.youtube.com/watch?v=tOnzk4AROUY",children:"XCMP Explained"})})]})}),"\n",(0,i.jsx)(s.admonition,{type:"note",children:(0,i.jsx)(s.p,{children:"XCMP is not yet implemented. The following illustrates the overall design goals and expectations for\nXCMP."})}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["Cross-chain messages will ",(0,i.jsx)(s.em,{children:"not"})," be delivered to the relay chain."]}),"\n",(0,i.jsx)(s.li,{children:"Cross-chain messages will be constrained to a maximum size specified in bytes."}),"\n",(0,i.jsx)(s.li,{children:"Parachains are allowed to block messages from other parachains, in which case the dispatching\nparachain would be aware of this block."}),"\n",(0,i.jsx)(s.li,{children:"Collator nodes are responsible for routing messages between chains."}),"\n",(0,i.jsxs)(s.li,{children:["Collators produce a list of ",(0,i.jsx)(s.code,{children:"egress"})," messages and will receive the ",(0,i.jsx)(s.code,{children:"ingress"})," messages from other\nparachains."]}),"\n",(0,i.jsx)(s.li,{children:"On each block, parachains are expected to route messages from some subset of all other parachains."}),"\n",(0,i.jsx)(s.li,{children:"When a collator produces a new block to hand off to a validator, it will collect the latest\ningress queue information and process it."}),"\n",(0,i.jsx)(s.li,{children:"Validators will check the proof that the new candidate for the next parachain block includes the\nprocessing of the expected ingress messages to that parachain."}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:"XCMP queues must be initiated by first opening a channel between two parachains. The channel is\nidentified by both the sender and recipient parachains, meaning that it's a one-way channel. A pair\nof parachains can have at most establish two channels between them, one for sending messages to the\nother chain and another for receiving messages. The channel will require a deposit in DOT to be\nopened, which will get returned when the channel is closed."}),"\n",(0,i.jsx)(s.h4,{id:"the-anatomy-of-an-xcmp-interaction",children:"The Anatomy of an XCMP Interaction"}),"\n",(0,i.jsxs)(s.p,{children:["A smart contract that exists on parachain ",(0,i.jsx)(s.code,{children:"A"})," will route a message to parachain ",(0,i.jsx)(s.code,{children:"B"})," in which another\nsmart contract is called that makes a transfer of some assets within that chain."]}),"\n",(0,i.jsxs)(s.p,{children:["Charlie executes the smart contract on parachain ",(0,i.jsx)(s.code,{children:"A"}),", which initiates a new cross-chain message for\nthe destination of a smart contract on parachain ",(0,i.jsx)(s.code,{children:"B"}),"."]}),"\n",(0,i.jsxs)(s.p,{children:["The collator node of parachain ",(0,i.jsx)(s.code,{children:"A"})," will place this new cross-chain message into its outbound\nmessages queue, along with a ",(0,i.jsx)(s.code,{children:"destination"})," and a ",(0,i.jsx)(s.code,{children:"timestamp"}),"."]}),"\n",(0,i.jsxs)(s.p,{children:["The collator node of parachain ",(0,i.jsx)(s.code,{children:"B"})," routinely pings all other collator nodes asking for new messages\n(filtering by the ",(0,i.jsx)(s.code,{children:"destination"})," field). When the collator of parachain ",(0,i.jsx)(s.code,{children:"B"})," makes its next ping, it\nwill see this new message on parachain ",(0,i.jsx)(s.code,{children:"A"})," and add it into its own inbound queue for processing into\nthe next block."]}),"\n",(0,i.jsxs)(s.p,{children:["Validators for parachain ",(0,i.jsx)(s.code,{children:"A"})," will also read the outbound queue and know the message. Validators for\nparachain ",(0,i.jsx)(s.code,{children:"B"})," will do the same. This is so that they will be able to verify the message transmission\nhappened."]}),"\n",(0,i.jsxs)(s.p,{children:["When the collator of parachain ",(0,i.jsx)(s.code,{children:"B"})," is building the next block in its chain, it will process the new\nmessage in its inbound queue as well as any other messages it may have found/received."]}),"\n",(0,i.jsxs)(s.p,{children:["During processing, the message will execute the smart contract on parachain ",(0,i.jsx)(s.code,{children:"B"})," and complete the\nasset transfer as intended."]}),"\n",(0,i.jsxs)(s.p,{children:["The collator now hands this block to the validator, which itself will verify that this message was\nprocessed. If the message was processed and all other aspects of the block are valid, the validator\nwill include this block for parachain ",(0,i.jsx)(s.code,{children:"B"})," into the relay chain."]})]})}function d(e={}){const{wrapper:s}={...(0,t.R)(),...e.components};return s?(0,i.jsx)(s,{...e,children:(0,i.jsx)(h,{...e})}):h(e)}},41612:(e,s,n)=>{n.d(s,{A:()=>a});const a=n.p+"assets/images/hrmp-ex-d985c82747b653714ff4cde293e1eccc.png"},28453:(e,s,n)=>{n.d(s,{R:()=>r,x:()=>o});var a=n(96540);const i={},t=a.createContext(i);function r(e){const s=a.useContext(t);return a.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function o(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),a.createElement(t.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/9528ac88.43c47aef.js b/assets/js/9528ac88.43c47aef.js deleted file mode 100644 index 5b44691b95a9..000000000000 --- a/assets/js/9528ac88.43c47aef.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1379],{48707:(e,s,n)=>{n.r(s),n.d(s,{assets:()=>c,contentTitle:()=>r,default:()=>d,frontMatter:()=>t,metadata:()=>o,toc:()=>l});var a=n(74848),i=n(28453);const t={id:"learn-xcm-transport",title:"XCM Transport Methods (XCMP, HRMP, VMP)",sidebar_label:"XCM Transport",description:"Methods to send XCM Messages across Networks.",keywords:["cross-consensus","XCM","XCMP","interoperability","communication"],slug:"../learn-xcm-transport"},r=void 0,o={id:"learn/learn-xcm-transport",title:"XCM Transport Methods (XCMP, HRMP, VMP)",description:"Methods to send XCM Messages across Networks.",source:"@site/../docs/learn/learn-xcm-transport.md",sourceDirName:"learn",slug:"/learn-xcm-transport",permalink:"/docs/learn-xcm-transport",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-xcm-transport.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1727991122e3,frontMatter:{id:"learn-xcm-transport",title:"XCM Transport Methods (XCMP, HRMP, VMP)",sidebar_label:"XCM Transport",description:"Methods to send XCM Messages across Networks.",keywords:["cross-consensus","XCM","XCMP","interoperability","communication"],slug:"../learn-xcm-transport"},sidebar:"docs",previous:{title:"XCM Use-cases",permalink:"/docs/learn-xcm-usecases"},next:{title:"XCM Virtual Machine (XCVM)",permalink:"/docs/learn-xcvm"}},c={},l=[{value:"XCMP (Cross-Chain Message Passing)",id:"xcmp-cross-chain-message-passing",level:3},{value:"VMP (Vertical Message Passing)",id:"vmp-vertical-message-passing",level:3},{value:"UMP (Upward Message Passing)",id:"ump-upward-message-passing",level:4},{value:"DMP (Downward Message Passing)",id:"dmp-downward-message-passing",level:4},{value:"HRMP (XCMP-Lite)",id:"hrmp-xcmp-lite",level:3},{value:"XCMP (Cross Consensus Message Passing) Design Summary",id:"xcmp-cross-consensus-message-passing-design-summary",level:3},{value:"The Anatomy of an XCMP Interaction",id:"the-anatomy-of-an-xcmp-interaction",level:4}];function h(e){const s={a:"a",admonition:"admonition",code:"code",em:"em",h3:"h3",h4:"h4",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(s.admonition,{title:"XCM Documentation",type:"info",children:(0,a.jsxs)(s.p,{children:["For a more practical approach to utilizing XCM, refer to the ",(0,a.jsx)(s.a,{href:"./learn/xcm",children:"XCM Docs"}),". Please keep in\nmind that XCM is under active development."]})}),"\n",(0,a.jsx)(s.p,{children:"With the XCM format established, common patterns for protocols of these messages are needed.\nPolkadot implements two message passing protocols for acting on XCM messages between its constituent\nparachains."}),"\n",(0,a.jsx)(s.p,{children:"There are three primary methods for message passing, one of which is under development:"}),"\n",(0,a.jsxs)(s.ol,{children:["\n",(0,a.jsx)(s.li,{children:"XCMP (Cross-Consensus Message Passing)"}),"\n",(0,a.jsx)(s.li,{children:"Horizontal Relay-routed Message Passing (HRMP/XCMP-lite)"}),"\n",(0,a.jsx)(s.li,{children:"VMP (Vertical Message Passing)"}),"\n"]}),"\n",(0,a.jsx)(s.h3,{id:"xcmp-cross-chain-message-passing",children:"XCMP (Cross-Chain Message Passing)"}),"\n",(0,a.jsx)(s.admonition,{type:"caution",children:(0,a.jsx)(s.p,{children:"XCMP is currently under development, and most of the cross-chain messages pass through HRMP channels\nfor the time being."})}),"\n",(0,a.jsx)(s.p,{children:"XCM is related to XCMP in the same way that REST is related to RESTful."}),"\n",(0,a.jsxs)(s.p,{children:[(0,a.jsx)(s.em,{children:"Cross-Consensus Message Passing"})," secure message passing between parachains. There are two variants:\n",(0,a.jsx)(s.em,{children:"Direct"})," and ",(0,a.jsx)(s.em,{children:"Relayed"}),"."]}),"\n",(0,a.jsxs)(s.ul,{children:["\n",(0,a.jsxs)(s.li,{children:["With ",(0,a.jsx)(s.em,{children:"Direct"}),", message data goes direct between parachains and is O(1) on the side of the relay\nchain and is very scalable."]}),"\n",(0,a.jsxs)(s.li,{children:["With ",(0,a.jsx)(s.em,{children:"Relayed"}),", message data is passed via the relay chain, and piggy-backs over VMP. It is much\nless scalable, and on-demand parachains in particular may not receive messages due to excessive\nqueue growth."]}),"\n"]}),"\n",(0,a.jsx)(s.p,{children:"Cross-chain transactions are resolved using a simple queuing mechanism based around a Merkle tree to\nensure fidelity. It is the task of the relay chain validators to move transactions on the output\nqueue of one parachain into the input queue of the destination parachain. However, only the\nassociated metadata is stored as a hash in the relay chain storage."}),"\n",(0,a.jsxs)(s.p,{children:["The input and output queue are sometimes referred to in the Polkadot codebase and associated\ndocumentation as ",(0,a.jsx)(s.code,{children:"ingress"})," and ",(0,a.jsx)(s.code,{children:"egress"})," messages, respectively."]}),"\n",(0,a.jsx)(s.admonition,{type:"info",children:(0,a.jsxs)(s.p,{children:["For detailed information about VMP see dedicated section in\n",(0,a.jsx)(s.a,{href:"https://paritytech.github.io/polkadot/book/messaging.html#horizontal-message-passing",children:"The Polkadot Parachain Host Implementers' Guide"}),"."]})}),"\n",(0,a.jsx)(s.h3,{id:"vmp-vertical-message-passing",children:"VMP (Vertical Message Passing)"}),"\n",(0,a.jsxs)(s.p,{children:[(0,a.jsx)(s.em,{children:"Vertical Message Passing"})," message passing between the relay chain itself and a parachain. Message\ndata in both cases exists on the relay chain and are interpreted by the relay chain according to\n",(0,a.jsx)(s.a,{href:"./learn-xcm.md/#cross-consensus-message-format-xcm",children:"XCM"})," standards. This includes:"]}),"\n",(0,a.jsxs)(s.ul,{children:["\n",(0,a.jsxs)(s.li,{children:["\n",(0,a.jsx)(s.h4,{id:"ump-upward-message-passing",children:"UMP (Upward Message Passing)"}),"\n",(0,a.jsxs)(s.p,{children:[(0,a.jsx)(s.em,{children:"Upward Message Passing"})," message passing from a parachain to the relay chain."]}),"\n"]}),"\n",(0,a.jsxs)(s.li,{children:["\n",(0,a.jsx)(s.h4,{id:"dmp-downward-message-passing",children:"DMP (Downward Message Passing)"}),"\n",(0,a.jsxs)(s.p,{children:[(0,a.jsx)(s.em,{children:"Downward Message Passing"})," message passing from the relay chain to a parachain."]}),"\n"]}),"\n"]}),"\n",(0,a.jsx)(s.admonition,{type:"info",children:(0,a.jsxs)(s.p,{children:["For detailed information about VMP see dedicated section in\n",(0,a.jsx)(s.a,{href:"https://paritytech.github.io/polkadot/book/messaging.html#vertical-message-passing",children:"The Polkadot Parachain Host Implementers' Guide"}),"."]})}),"\n",(0,a.jsx)(s.h3,{id:"hrmp-xcmp-lite",children:"HRMP (XCMP-Lite)"}),"\n",(0,a.jsxs)(s.p,{children:["While XCMP is still being implemented, a stop-gap protocol (see definition below) known as\n",(0,a.jsx)(s.strong,{children:"Horizontal Relay-routed Message Passing (HRMP)"})," exists in its place. HRMP has the same interface\nand functionality as XCMP but is much more demanding on resources since it stores all messages in\nthe relay chain storage. When XCMP has been implemented, HRMP is planned to be deprecated and phased\nout in favor of it."]}),"\n",(0,a.jsx)(s.p,{children:(0,a.jsx)(s.img,{alt:"xcm",src:n(41612).A+"",width:"2664",height:"1754"})}),"\n",(0,a.jsx)(s.admonition,{type:"note",children:(0,a.jsx)(s.p,{children:"A stop-gap protocol is a temporary substitute for the functionality that is not fully complete.\nWhile XCMP proper is still in development, HRMP is a working replacement."})}),"\n",(0,a.jsxs)(s.p,{children:["A tutorial on how to open an HRMP channel on a parachain can be found\n",(0,a.jsx)(s.a,{href:"/docs/build-hrmp-channels",children:"here"}),"."]}),"\n",(0,a.jsx)(s.h3,{id:"xcmp-cross-consensus-message-passing-design-summary",children:"XCMP (Cross Consensus Message Passing) Design Summary"}),"\n",(0,a.jsx)("div",{className:"row",children:(0,a.jsxs)("div",{className:"col text--center",children:[(0,a.jsx)("a",{href:"https://www.youtube.com/watch?v=tOnzk4AROUY",children:(0,a.jsx)("img",{src:"https://img.youtube.com/vi/tOnzk4AROUY/0.jpg",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,a.jsx)("p",{children:(0,a.jsx)("a",{href:"https://www.youtube.com/watch?v=tOnzk4AROUY",children:"XCMP Explained"})})]})}),"\n",(0,a.jsx)(s.admonition,{type:"note",children:(0,a.jsx)(s.p,{children:"XCMP is not yet implemented. The following illustrates the overall design goals and expectations for\nXCMP."})}),"\n",(0,a.jsxs)(s.ul,{children:["\n",(0,a.jsxs)(s.li,{children:["Cross-chain messages will ",(0,a.jsx)(s.em,{children:"not"})," be delivered to the relay chain."]}),"\n",(0,a.jsx)(s.li,{children:"Cross-chain messages will be constrained to a maximum size specified in bytes."}),"\n",(0,a.jsx)(s.li,{children:"Parachains are allowed to block messages from other parachains, in which case the dispatching\nparachain would be aware of this block."}),"\n",(0,a.jsx)(s.li,{children:"Collator nodes are responsible for routing messages between chains."}),"\n",(0,a.jsxs)(s.li,{children:["Collators produce a list of ",(0,a.jsx)(s.code,{children:"egress"})," messages and will receive the ",(0,a.jsx)(s.code,{children:"ingress"})," messages from other\nparachains."]}),"\n",(0,a.jsx)(s.li,{children:"On each block, parachains are expected to route messages from some subset of all other parachains."}),"\n",(0,a.jsx)(s.li,{children:"When a collator produces a new block to hand off to a validator, it will collect the latest\ningress queue information and process it."}),"\n",(0,a.jsx)(s.li,{children:"Validators will check the proof that the new candidate for the next parachain block includes the\nprocessing of the expected ingress messages to that parachain."}),"\n"]}),"\n",(0,a.jsx)(s.p,{children:"XCMP queues must be initiated by first opening a channel between two parachains. The channel is\nidentified by both the sender and recipient parachains, meaning that it's a one-way channel. A pair\nof parachains can have at most establish two channels between them, one for sending messages to the\nother chain and another for receiving messages. The channel will require a deposit in DOT to be\nopened, which will get returned when the channel is closed."}),"\n",(0,a.jsx)(s.h4,{id:"the-anatomy-of-an-xcmp-interaction",children:"The Anatomy of an XCMP Interaction"}),"\n",(0,a.jsxs)(s.p,{children:["A smart contract that exists on parachain ",(0,a.jsx)(s.code,{children:"A"})," will route a message to parachain ",(0,a.jsx)(s.code,{children:"B"})," in which another\nsmart contract is called that makes a transfer of some assets within that chain."]}),"\n",(0,a.jsxs)(s.p,{children:["Charlie executes the smart contract on parachain ",(0,a.jsx)(s.code,{children:"A"}),", which initiates a new cross-chain message for\nthe destination of a smart contract on parachain ",(0,a.jsx)(s.code,{children:"B"}),"."]}),"\n",(0,a.jsxs)(s.p,{children:["The collator node of parachain ",(0,a.jsx)(s.code,{children:"A"})," will place this new cross-chain message into its outbound\nmessages queue, along with a ",(0,a.jsx)(s.code,{children:"destination"})," and a ",(0,a.jsx)(s.code,{children:"timestamp"}),"."]}),"\n",(0,a.jsxs)(s.p,{children:["The collator node of parachain ",(0,a.jsx)(s.code,{children:"B"})," routinely pings all other collator nodes asking for new messages\n(filtering by the ",(0,a.jsx)(s.code,{children:"destination"})," field). When the collator of parachain ",(0,a.jsx)(s.code,{children:"B"})," makes its next ping, it\nwill see this new message on parachain ",(0,a.jsx)(s.code,{children:"A"})," and add it into its own inbound queue for processing into\nthe next block."]}),"\n",(0,a.jsxs)(s.p,{children:["Validators for parachain ",(0,a.jsx)(s.code,{children:"A"})," will also read the outbound queue and know the message. Validators for\nparachain ",(0,a.jsx)(s.code,{children:"B"})," will do the same. This is so that they will be able to verify the message transmission\nhappened."]}),"\n",(0,a.jsxs)(s.p,{children:["When the collator of parachain ",(0,a.jsx)(s.code,{children:"B"})," is building the next block in its chain, it will process the new\nmessage in its inbound queue as well as any other messages it may have found/received."]}),"\n",(0,a.jsxs)(s.p,{children:["During processing, the message will execute the smart contract on parachain ",(0,a.jsx)(s.code,{children:"B"})," and complete the\nasset transfer as intended."]}),"\n",(0,a.jsxs)(s.p,{children:["The collator now hands this block to the validator, which itself will verify that this message was\nprocessed. If the message was processed and all other aspects of the block are valid, the validator\nwill include this block for parachain ",(0,a.jsx)(s.code,{children:"B"})," into the relay chain."]})]})}function d(e={}){const{wrapper:s}={...(0,i.R)(),...e.components};return s?(0,a.jsx)(s,{...e,children:(0,a.jsx)(h,{...e})}):h(e)}},41612:(e,s,n)=>{n.d(s,{A:()=>a});const a=n.p+"assets/images/hrmp-ex-d985c82747b653714ff4cde293e1eccc.png"},28453:(e,s,n)=>{n.d(s,{R:()=>r,x:()=>o});var a=n(96540);const i={},t=a.createContext(i);function r(e){const s=a.useContext(t);return a.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function o(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),a.createElement(t.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/9662c81e.2684a700.js b/assets/js/9662c81e.2684a700.js new file mode 100644 index 000000000000..84695c6b9241 --- /dev/null +++ b/assets/js/9662c81e.2684a700.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7809],{69959:(n,e,o)=>{o.r(e),o.d(e,{assets:()=>r,contentTitle:()=>d,default:()=>h,frontMatter:()=>c,metadata:()=>i,toc:()=>l});const i=JSON.parse('{"id":"maintain/archive/maintain-guides-how-to-join-council","title":"Join the Council","description":"Steps on how to join the official on-chain council.","source":"@site/../docs/maintain/archive/maintain-guides-how-to-join-council.md","sourceDirName":"maintain/archive","slug":"/maintain/maintain-guides-how-to-join-council","permalink":"/docs/maintain/maintain-guides-how-to-join-council","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/maintain/archive/maintain-guides-how-to-join-council.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1729847256000,"frontMatter":{"id":"maintain-guides-how-to-join-council","title":"Join the Council","sidebar_label":"Join the Council","description":"Steps on how to join the official on-chain council.","keywords":["council","how to join council","governance","candidate"],"slug":"../maintain-guides-how-to-join-council"},"sidebar":"docs","previous":{"title":"Participate in Democracy","permalink":"/docs/maintain/maintain-guides-democracy"},"next":{"title":"Voting for Councillors","permalink":"/docs/maintain/maintain-guides-how-to-vote-councillor"}}');var t=o(74848),a=o(28453),s=o(67141);const c={id:"maintain-guides-how-to-join-council",title:"Join the Council",sidebar_label:"Join the Council",description:"Steps on how to join the official on-chain council.",keywords:["council","how to join council","governance","candidate"],slug:"../maintain-guides-how-to-join-council"},d=void 0,r={},l=[{value:"Submit Candidacy",id:"submit-candidacy",level:2},{value:"Voting on Candidates",id:"voting-on-candidates",level:2},{value:"Winning",id:"winning",level:2}];function u(n){const e={a:"a",admonition:"admonition",h2:"h2",img:"img",p:"p",...(0,a.R)(),...n.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.A,{message:"The content on this page is archived. For up-to-date information about governance, see the\n[Polkadot OpenGov page](../learn-polkadot-opengov)."}),"\n",(0,t.jsxs)(e.p,{children:["The council is an elected body of on-chain accounts that are intended to represent the passive\nstakeholders of Polkadot and/or Kusama. The council has two major tasks in governance: proposing\nreferenda and vetoing dangerous or malicious referenda. For more information on the council, see the\n",(0,t.jsx)(e.a,{href:"/docs/learn/learn-governance#council",children:"governance page"}),". This guide will walk you through\nentering your candidacy to the council."]}),"\n",(0,t.jsx)(e.h2,{id:"submit-candidacy",children:"Submit Candidacy"}),"\n",(0,t.jsx)(e.p,{children:"Submitting your candidacy for the council requires a small bond of DOT / KSM. Unless your candidacy\nwins, the bond will be forfeited. You can receive your bond back if you manually renounce your\ncandidacy before losing. Runners-up are selected after every round and are reserved members in case\none of the winners gets forcefully removed."}),"\n",(0,t.jsx)(e.admonition,{type:"note",children:(0,t.jsx)(e.p,{children:"Currently the bond for submitting a council candidacy on Polkadot is 100 DOT, and 0.0033 KSM on\nKusama."})}),"\n",(0,t.jsx)(e.p,{children:"It is a good idea to announce your council intention before submitting your candidacy so that your\nsupporters will know when they can start to vote for you. You can also vote for yourself in case no\none else does."}),"\n",(0,t.jsxs)(e.p,{children:["Go to ",(0,t.jsx)(e.a,{href:"https://polkadot.js.org/apps",children:"Polkadot Apps Dashboard"}),' and navigate to the "Council" tab.\nClick the button on the right that says "Submit Candidacy."']}),"\n",(0,t.jsx)(e.p,{children:(0,t.jsx)(e.img,{alt:"submit candidacy button",src:o(96113).A+"",width:"580",height:"120"})}),"\n",(0,t.jsx)(e.p,{children:'After making the transaction, you will see your account appear underneath the row "Candidates."'}),"\n",(0,t.jsx)(e.p,{children:(0,t.jsx)(e.img,{alt:"candidates list",src:o(97214).A+"",width:"2880",height:"298"})}),"\n",(0,t.jsx)(e.p,{children:"It is a good idea now to lead by example and give yourself a vote."}),"\n",(0,t.jsx)(e.h2,{id:"voting-on-candidates",children:"Voting on Candidates"}),"\n",(0,t.jsx)(e.p,{children:'Next to the button to submit candidacy is another button titled "Vote." You will click this button\nto make a vote for yourself (optional).'}),"\n",(0,t.jsx)(e.p,{children:(0,t.jsx)(e.img,{alt:"voting button on UI",src:o(35349).A+"",width:"556",height:"120"})}),"\n",(0,t.jsxs)(e.p,{children:["The council uses ",(0,t.jsx)(e.a,{href:"/docs/learn-phragmen",children:"Phragm\xe9n"}),' approval voting, which is also used in\nthe validator elections. This means that you can choose up to 16 distinct candidates to vote for and\nyour stake will equalize between them. For this guide, choose to approve your own candidacy by\nclicking on the switch next to your account and changing it to say "Aye."']}),"\n",(0,t.jsx)(e.p,{children:(0,t.jsx)(e.img,{alt:"voting pop up on UI",src:o(39365).A+"",width:"2186",height:"1104"})}),"\n",(0,t.jsx)(e.h2,{id:"winning",children:"Winning"}),"\n",(0,t.jsx)(e.p,{children:'If you are one of the lucky ones to win a council election you will see your account move underneath\nthe row "Members".'}),"\n",(0,t.jsx)(e.p,{children:(0,t.jsx)(e.img,{alt:"council members list",src:o(5483).A+"",width:"2880",height:"1346"})}),"\n",(0,t.jsxs)(e.p,{children:["Now you are able to participate on the council by making motions or voting proposals. To join in on\nthe active discussions, join the\n",(0,t.jsx)(e.a,{href:"https://matrix.to/#/#Polkadot-Direction:parity.io",children:"Polkadot Direction channel"}),"."]})]})}function h(n={}){const{wrapper:e}={...(0,a.R)(),...n.components};return e?(0,t.jsx)(e,{...n,children:(0,t.jsx)(u,{...n})}):u(n)}},67141:(n,e,o)=>{o.d(e,{A:()=>a});var i=o(96540),t=o(74848);const a=function(n){var e,o=n.message,a=(0,i.useState)(!0),s=a[0],c=a[1];return(0,t.jsx)(t.Fragment,{children:s&&(0,t.jsxs)("div",{className:"message-box",children:[(0,t.jsx)("button",{className:"close-button",onClick:function(){c(!1)},children:"\u2716 "}),(0,t.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(e=o,e.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},97214:(n,e,o)=>{o.d(e,{A:()=>i});const i=o.p+"assets/images/polkadotjs_candidates-bc420d7637b02bd43169dd6bc44a9bd9.png"},5483:(n,e,o)=>{o.d(e,{A:()=>i});const i=o.p+"assets/images/polkadotjs_council_members-c731a3fa3e5eb821427126149431dbfe.png"},96113:(n,e,o)=>{o.d(e,{A:()=>i});const i=o.p+"assets/images/polkadotjs_submit_candidancy-04eabb0aa998c350427386dcff208d1c.png"},35349:(n,e,o)=>{o.d(e,{A:()=>i});const i=o.p+"assets/images/polkadotjs_vote_button-9f5daf5f27fda6df219d0f959e7632b4.png"},39365:(n,e,o)=>{o.d(e,{A:()=>i});const i=o.p+"assets/images/polkadotjs_voting-cc5698e8e8f5de77644d3a7cb316a2ea.png"},28453:(n,e,o)=>{o.d(e,{R:()=>s,x:()=>c});var i=o(96540);const t={},a=i.createContext(t);function s(n){const e=i.useContext(a);return i.useMemo((function(){return"function"==typeof n?n(e):{...e,...n}}),[e,n])}function c(n){let e;return e=n.disableParentContext?"function"==typeof n.components?n.components(t):n.components||t:s(n.components),i.createElement(a.Provider,{value:e},n.children)}}}]); \ No newline at end of file diff --git a/assets/js/9662c81e.5e211e69.js b/assets/js/9662c81e.5e211e69.js deleted file mode 100644 index dcd22538ea44..000000000000 --- a/assets/js/9662c81e.5e211e69.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7809],{5771:(n,e,o)=>{o.r(e),o.d(e,{assets:()=>r,contentTitle:()=>s,default:()=>h,frontMatter:()=>c,metadata:()=>d,toc:()=>l});var i=o(74848),t=o(28453),a=o(67141);const c={id:"maintain-guides-how-to-join-council",title:"Join the Council",sidebar_label:"Join the Council",description:"Steps on how to join the official on-chain council.",keywords:["council","how to join council","governance","candidate"],slug:"../maintain-guides-how-to-join-council"},s=void 0,d={id:"maintain/archive/maintain-guides-how-to-join-council",title:"Join the Council",description:"Steps on how to join the official on-chain council.",source:"@site/../docs/maintain/archive/maintain-guides-how-to-join-council.md",sourceDirName:"maintain/archive",slug:"/maintain/maintain-guides-how-to-join-council",permalink:"/docs/maintain/maintain-guides-how-to-join-council",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/maintain/archive/maintain-guides-how-to-join-council.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1729847256e3,frontMatter:{id:"maintain-guides-how-to-join-council",title:"Join the Council",sidebar_label:"Join the Council",description:"Steps on how to join the official on-chain council.",keywords:["council","how to join council","governance","candidate"],slug:"../maintain-guides-how-to-join-council"},sidebar:"docs",previous:{title:"Participate in Democracy",permalink:"/docs/maintain/maintain-guides-democracy"},next:{title:"Voting for Councillors",permalink:"/docs/maintain/maintain-guides-how-to-vote-councillor"}},r={},l=[{value:"Submit Candidacy",id:"submit-candidacy",level:2},{value:"Voting on Candidates",id:"voting-on-candidates",level:2},{value:"Winning",id:"winning",level:2}];function u(n){const e={a:"a",admonition:"admonition",h2:"h2",img:"img",p:"p",...(0,t.R)(),...n.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(a.A,{message:"The content on this page is archived. For up-to-date information about governance, see the\n[Polkadot OpenGov page](../learn-polkadot-opengov)."}),"\n",(0,i.jsxs)(e.p,{children:["The council is an elected body of on-chain accounts that are intended to represent the passive\nstakeholders of Polkadot and/or Kusama. The council has two major tasks in governance: proposing\nreferenda and vetoing dangerous or malicious referenda. For more information on the council, see the\n",(0,i.jsx)(e.a,{href:"/docs/learn/learn-governance#council",children:"governance page"}),". This guide will walk you through\nentering your candidacy to the council."]}),"\n",(0,i.jsx)(e.h2,{id:"submit-candidacy",children:"Submit Candidacy"}),"\n",(0,i.jsx)(e.p,{children:"Submitting your candidacy for the council requires a small bond of DOT / KSM. Unless your candidacy\nwins, the bond will be forfeited. You can receive your bond back if you manually renounce your\ncandidacy before losing. Runners-up are selected after every round and are reserved members in case\none of the winners gets forcefully removed."}),"\n",(0,i.jsx)(e.admonition,{type:"note",children:(0,i.jsx)(e.p,{children:"Currently the bond for submitting a council candidacy on Polkadot is 100 DOT, and 0.0033 KSM on\nKusama."})}),"\n",(0,i.jsx)(e.p,{children:"It is a good idea to announce your council intention before submitting your candidacy so that your\nsupporters will know when they can start to vote for you. You can also vote for yourself in case no\none else does."}),"\n",(0,i.jsxs)(e.p,{children:["Go to ",(0,i.jsx)(e.a,{href:"https://polkadot.js.org/apps",children:"Polkadot Apps Dashboard"}),' and navigate to the "Council" tab.\nClick the button on the right that says "Submit Candidacy."']}),"\n",(0,i.jsx)(e.p,{children:(0,i.jsx)(e.img,{alt:"submit candidacy button",src:o(96113).A+"",width:"580",height:"120"})}),"\n",(0,i.jsx)(e.p,{children:'After making the transaction, you will see your account appear underneath the row "Candidates."'}),"\n",(0,i.jsx)(e.p,{children:(0,i.jsx)(e.img,{alt:"candidates list",src:o(97214).A+"",width:"2880",height:"298"})}),"\n",(0,i.jsx)(e.p,{children:"It is a good idea now to lead by example and give yourself a vote."}),"\n",(0,i.jsx)(e.h2,{id:"voting-on-candidates",children:"Voting on Candidates"}),"\n",(0,i.jsx)(e.p,{children:'Next to the button to submit candidacy is another button titled "Vote." You will click this button\nto make a vote for yourself (optional).'}),"\n",(0,i.jsx)(e.p,{children:(0,i.jsx)(e.img,{alt:"voting button on UI",src:o(35349).A+"",width:"556",height:"120"})}),"\n",(0,i.jsxs)(e.p,{children:["The council uses ",(0,i.jsx)(e.a,{href:"/docs/learn-phragmen",children:"Phragm\xe9n"}),' approval voting, which is also used in\nthe validator elections. This means that you can choose up to 16 distinct candidates to vote for and\nyour stake will equalize between them. For this guide, choose to approve your own candidacy by\nclicking on the switch next to your account and changing it to say "Aye."']}),"\n",(0,i.jsx)(e.p,{children:(0,i.jsx)(e.img,{alt:"voting pop up on UI",src:o(39365).A+"",width:"2186",height:"1104"})}),"\n",(0,i.jsx)(e.h2,{id:"winning",children:"Winning"}),"\n",(0,i.jsx)(e.p,{children:'If you are one of the lucky ones to win a council election you will see your account move underneath\nthe row "Members".'}),"\n",(0,i.jsx)(e.p,{children:(0,i.jsx)(e.img,{alt:"council members list",src:o(5483).A+"",width:"2880",height:"1346"})}),"\n",(0,i.jsxs)(e.p,{children:["Now you are able to participate on the council by making motions or voting proposals. To join in on\nthe active discussions, join the\n",(0,i.jsx)(e.a,{href:"https://matrix.to/#/#Polkadot-Direction:parity.io",children:"Polkadot Direction channel"}),"."]})]})}function h(n={}){const{wrapper:e}={...(0,t.R)(),...n.components};return e?(0,i.jsx)(e,{...n,children:(0,i.jsx)(u,{...n})}):u(n)}},67141:(n,e,o)=>{o.d(e,{A:()=>a});var i=o(96540),t=o(74848);const a=function(n){var e,o=n.message,a=(0,i.useState)(!0),c=a[0],s=a[1];return(0,t.jsx)(t.Fragment,{children:c&&(0,t.jsxs)("div",{className:"message-box",children:[(0,t.jsx)("button",{className:"close-button",onClick:function(){s(!1)},children:"\u2716 "}),(0,t.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(e=o,e.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},97214:(n,e,o)=>{o.d(e,{A:()=>i});const i=o.p+"assets/images/polkadotjs_candidates-bc420d7637b02bd43169dd6bc44a9bd9.png"},5483:(n,e,o)=>{o.d(e,{A:()=>i});const i=o.p+"assets/images/polkadotjs_council_members-c731a3fa3e5eb821427126149431dbfe.png"},96113:(n,e,o)=>{o.d(e,{A:()=>i});const i=o.p+"assets/images/polkadotjs_submit_candidancy-04eabb0aa998c350427386dcff208d1c.png"},35349:(n,e,o)=>{o.d(e,{A:()=>i});const i=o.p+"assets/images/polkadotjs_vote_button-9f5daf5f27fda6df219d0f959e7632b4.png"},39365:(n,e,o)=>{o.d(e,{A:()=>i});const i=o.p+"assets/images/polkadotjs_voting-cc5698e8e8f5de77644d3a7cb316a2ea.png"},28453:(n,e,o)=>{o.d(e,{R:()=>c,x:()=>s});var i=o(96540);const t={},a=i.createContext(t);function c(n){const e=i.useContext(a);return i.useMemo((function(){return"function"==typeof n?n(e):{...e,...n}}),[e,n])}function s(n){let e;return e=n.disableParentContext?"function"==typeof n.components?n.components(t):n.components||t:c(n.components),i.createElement(a.Provider,{value:e},n.children)}}}]); \ No newline at end of file diff --git a/assets/js/9664.fa5e84c6.js b/assets/js/9664.fa5e84c6.js new file mode 100644 index 000000000000..8eb6d1a1d474 --- /dev/null +++ b/assets/js/9664.fa5e84c6.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9664],{79972:(t,e,s)=>{s.d(e,{A:()=>r,P:()=>o});var i=s(45567),n=s(20007),r=(0,i.K2)(((t,e)=>{let s;"sandbox"===e&&(s=(0,n.Ltv)("#i"+t));return("sandbox"===e?(0,n.Ltv)(s.nodes()[0].contentDocument.body):(0,n.Ltv)("body")).select(`[id="${t}"]`)}),"getDiagramElement"),o=(0,i.K2)(((t,e,s,n)=>{t.attr("class",s);const{width:r,height:o,x:c,y:h}=a(t,e);(0,i.a$)(t,o,r,n);const d=l(c,h,r,o,e);t.attr("viewBox",d),i.Rm.debug(`viewBox configured: ${d} with padding: ${e}`)}),"setupViewPortForSVG"),a=(0,i.K2)(((t,e)=>{const s=t.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:s.width+2*e,height:s.height+2*e,x:s.x,y:s.y}}),"calculateDimensionsWithPadding"),l=(0,i.K2)(((t,e,s,i,n)=>`${t-n} ${e-n} ${s} ${i}`),"createViewBox")},69664:(t,e,s)=>{s.d(e,{Zk:()=>l,iP:()=>Bt,q7:()=>w,tM:()=>Ft});var i=s(79972),n=s(79740),r=s(85039),o=s(45567),a=function(){var t=(0,o.K2)((function(t,e,s,i){for(s=s||{},i=t.length;i--;s[t[i]]=e);return s}),"o"),e=[1,2],s=[1,3],i=[1,4],n=[2,4],r=[1,9],a=[1,11],l=[1,16],c=[1,17],h=[1,18],d=[1,19],u=[1,32],p=[1,20],y=[1,21],g=[1,22],f=[1,23],m=[1,24],S=[1,26],_=[1,27],b=[1,28],T=[1,29],k=[1,30],E=[1,31],x=[1,34],D=[1,35],C=[1,36],$=[1,37],v=[1,33],L=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],I=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],A=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],K={trace:(0,o.K2)((function(){}),"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"--\x3e":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,classDef:38,CLASSDEF_ID:39,CLASSDEF_STYLEOPTS:40,DEFAULT:41,style:42,STYLE_IDS:43,STYLEDEF_STYLEOPTS:44,class:45,CLASSENTITY_IDS:46,STYLECLASS:47,direction_tb:48,direction_bt:49,direction_rl:50,direction_lr:51,eol:52,";":53,EDGE_STATE:54,STYLE_SEPARATOR:55,left_of:56,right_of:57,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"--\x3e",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"classDef",39:"CLASSDEF_ID",40:"CLASSDEF_STYLEOPTS",41:"DEFAULT",42:"style",43:"STYLE_IDS",44:"STYLEDEF_STYLEOPTS",45:"class",46:"CLASSENTITY_IDS",47:"STYLECLASS",48:"direction_tb",49:"direction_bt",50:"direction_rl",51:"direction_lr",53:";",54:"EDGE_STATE",55:"STYLE_SEPARATOR",56:"left_of",57:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[52,1],[52,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:(0,o.K2)((function(t,e,s,i,n,r,o){var a=r.length-1;switch(n){case 3:return i.setRootDoc(r[a]),r[a];case 4:this.$=[];break;case 5:"nl"!=r[a]&&(r[a-1].push(r[a]),this.$=r[a-1]);break;case 6:case 7:case 12:this.$=r[a];break;case 8:this.$="nl";break;case 13:const t=r[a-1];t.description=i.trimColon(r[a]),this.$=t;break;case 14:this.$={stmt:"relation",state1:r[a-2],state2:r[a]};break;case 15:const e=i.trimColon(r[a]);this.$={stmt:"relation",state1:r[a-3],state2:r[a-1],description:e};break;case 19:this.$={stmt:"state",id:r[a-3],type:"default",description:"",doc:r[a-1]};break;case 20:var l=r[a],c=r[a-2].trim();if(r[a].match(":")){var h=r[a].split(":");l=h[0],c=[c,h[1]]}this.$={stmt:"state",id:l,type:"default",description:c};break;case 21:this.$={stmt:"state",id:r[a-3],type:"default",description:r[a-5],doc:r[a-1]};break;case 22:this.$={stmt:"state",id:r[a],type:"fork"};break;case 23:this.$={stmt:"state",id:r[a],type:"join"};break;case 24:this.$={stmt:"state",id:r[a],type:"choice"};break;case 25:this.$={stmt:"state",id:i.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:r[a-1].trim(),note:{position:r[a-2].trim(),text:r[a].trim()}};break;case 29:this.$=r[a].trim(),i.setAccTitle(this.$);break;case 30:case 31:this.$=r[a].trim(),i.setAccDescription(this.$);break;case 32:case 33:this.$={stmt:"classDef",id:r[a-1].trim(),classes:r[a].trim()};break;case 34:this.$={stmt:"style",id:r[a-1].trim(),styleClass:r[a].trim()};break;case 35:this.$={stmt:"applyClass",id:r[a-1].trim(),styleClass:r[a].trim()};break;case 36:i.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 37:i.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 38:i.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 39:i.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 42:case 43:this.$={stmt:"state",id:r[a].trim(),type:"default",description:""};break;case 44:case 45:this.$={stmt:"state",id:r[a-2].trim(),classes:[r[a].trim()],type:"default",description:""}}}),"anonymous"),table:[{3:1,4:e,5:s,6:i},{1:[3]},{3:5,4:e,5:s,6:i},{3:6,4:e,5:s,6:i},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],n,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:r,5:a,8:8,9:10,10:12,11:13,12:14,13:15,16:l,17:c,19:h,22:d,24:u,25:p,26:y,27:g,28:f,29:m,32:25,33:S,35:_,37:b,38:T,42:k,45:E,48:x,49:D,50:C,51:$,54:v},t(L,[2,5]),{9:38,10:12,11:13,12:14,13:15,16:l,17:c,19:h,22:d,24:u,25:p,26:y,27:g,28:f,29:m,32:25,33:S,35:_,37:b,38:T,42:k,45:E,48:x,49:D,50:C,51:$,54:v},t(L,[2,7]),t(L,[2,8]),t(L,[2,9]),t(L,[2,10]),t(L,[2,11]),t(L,[2,12],{14:[1,39],15:[1,40]}),t(L,[2,16]),{18:[1,41]},t(L,[2,18],{20:[1,42]}),{23:[1,43]},t(L,[2,22]),t(L,[2,23]),t(L,[2,24]),t(L,[2,25]),{30:44,31:[1,45],56:[1,46],57:[1,47]},t(L,[2,28]),{34:[1,48]},{36:[1,49]},t(L,[2,31]),{39:[1,50],41:[1,51]},{43:[1,52]},{46:[1,53]},t(I,[2,42],{55:[1,54]}),t(I,[2,43],{55:[1,55]}),t(L,[2,36]),t(L,[2,37]),t(L,[2,38]),t(L,[2,39]),t(L,[2,6]),t(L,[2,13]),{13:56,24:u,54:v},t(L,[2,17]),t(A,n,{7:57}),{24:[1,58]},{24:[1,59]},{23:[1,60]},{24:[2,46]},{24:[2,47]},t(L,[2,29]),t(L,[2,30]),{40:[1,61]},{40:[1,62]},{44:[1,63]},{47:[1,64]},{24:[1,65]},{24:[1,66]},t(L,[2,14],{14:[1,67]}),{4:r,5:a,8:8,9:10,10:12,11:13,12:14,13:15,16:l,17:c,19:h,21:[1,68],22:d,24:u,25:p,26:y,27:g,28:f,29:m,32:25,33:S,35:_,37:b,38:T,42:k,45:E,48:x,49:D,50:C,51:$,54:v},t(L,[2,20],{20:[1,69]}),{31:[1,70]},{24:[1,71]},t(L,[2,32]),t(L,[2,33]),t(L,[2,34]),t(L,[2,35]),t(I,[2,44]),t(I,[2,45]),t(L,[2,15]),t(L,[2,19]),t(A,n,{7:72}),t(L,[2,26]),t(L,[2,27]),{4:r,5:a,8:8,9:10,10:12,11:13,12:14,13:15,16:l,17:c,19:h,21:[1,73],22:d,24:u,25:p,26:y,27:g,28:f,29:m,32:25,33:S,35:_,37:b,38:T,42:k,45:E,48:x,49:D,50:C,51:$,54:v},t(L,[2,21])],defaultActions:{5:[2,1],6:[2,2],46:[2,46],47:[2,47]},parseError:(0,o.K2)((function(t,e){if(!e.recoverable){var s=new Error(t);throw s.hash=e,s}this.trace(t)}),"parseError"),parse:(0,o.K2)((function(t){var e=this,s=[0],i=[],n=[null],r=[],a=this.table,l="",c=0,h=0,d=0,u=r.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y.yy[g]=this.yy[g]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var f=p.yylloc;r.push(f);var m=p.options&&p.options.ranges;function S(){var t;return"number"!=typeof(t=i.pop()||p.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,o.K2)((function(t){s.length=s.length-2*t,n.length=n.length-t,r.length=r.length-t}),"popStack"),(0,o.K2)(S,"lex");for(var _,b,T,k,E,x,D,C,$,v={};;){if(T=s[s.length-1],this.defaultActions[T]?k=this.defaultActions[T]:(null==_&&(_=S()),k=a[T]&&a[T][_]),void 0===k||!k.length||!k[0]){var L="";for(x in $=[],a[T])this.terminals_[x]&&x>2&&$.push("'"+this.terminals_[x]+"'");L=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+$.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==_?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(L,{text:p.match,token:this.terminals_[_]||_,line:p.yylineno,loc:f,expected:$})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+T+", token: "+_);switch(k[0]){case 1:s.push(_),n.push(p.yytext),r.push(p.yylloc),s.push(k[1]),_=null,b?(_=b,b=null):(h=p.yyleng,l=p.yytext,c=p.yylineno,f=p.yylloc,d>0&&d--);break;case 2:if(D=this.productions_[k[1]][1],v.$=n[n.length-D],v._$={first_line:r[r.length-(D||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(D||1)].first_column,last_column:r[r.length-1].last_column},m&&(v._$.range=[r[r.length-(D||1)].range[0],r[r.length-1].range[1]]),void 0!==(E=this.performAction.apply(v,[l,h,c,y.yy,k[1],n,r].concat(u))))return E;D&&(s=s.slice(0,-1*D*2),n=n.slice(0,-1*D),r=r.slice(0,-1*D)),s.push(this.productions_[k[1]][0]),n.push(v.$),r.push(v._$),C=a[s[s.length-2]][s[s.length-1]],s.push(C);break;case 3:return!0}}return!0}),"parse")},R=function(){return{EOF:1,parseError:(0,o.K2)((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:(0,o.K2)((function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this}),"setInput"),input:(0,o.K2)((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t}),"input"),unput:(0,o.K2)((function(t){var e=t.length,s=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),s.length-1&&(this.yylineno-=s.length-1);var n=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:s?(s.length===i.length?this.yylloc.first_column:0)+i[i.length-s.length].length-s[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"unput"),more:(0,o.K2)((function(){return this._more=!0,this}),"more"),reject:(0,o.K2)((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:(0,o.K2)((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:(0,o.K2)((function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:(0,o.K2)((function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:(0,o.K2)((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:(0,o.K2)((function(t,e){var s,i,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(n.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],s=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack){for(var r in n)this[r]=n[r];return!1}return!1}),"test_match"),next:(0,o.K2)((function(){if(this.done)return this.EOF;var t,e,s,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),r=0;re[0].length)){if(e=s,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(s,n[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:(0,o.K2)((function(){var t=this.next();return t||this.lex()}),"lex"),begin:(0,o.K2)((function(t){this.conditionStack.push(t)}),"begin"),popState:(0,o.K2)((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:(0,o.K2)((function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules}),"_currentRules"),topState:(0,o.K2)((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:(0,o.K2)((function(t){this.begin(t)}),"pushState"),stateStackSize:(0,o.K2)((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,o.K2)((function(t,e,s,i){switch(s){case 0:return 41;case 1:case 42:return 48;case 2:case 43:return 49;case 3:case 44:return 50;case 4:case 45:return 51;case 5:case 6:case 8:case 9:case 10:case 11:case 54:case 56:case 62:break;case 7:case 77:return 5;case 12:case 32:return this.pushState("SCALE"),17;case 13:case 33:return 18;case 14:case 20:case 34:case 49:case 52:this.popState();break;case 15:return this.begin("acc_title"),33;case 16:return this.popState(),"acc_title_value";case 17:return this.begin("acc_descr"),35;case 18:return this.popState(),"acc_descr_value";case 19:this.begin("acc_descr_multiline");break;case 21:return"acc_descr_multiline_value";case 22:return this.pushState("CLASSDEF"),38;case 23:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 24:return this.popState(),this.pushState("CLASSDEFID"),39;case 25:return this.popState(),40;case 26:return this.pushState("CLASS"),45;case 27:return this.popState(),this.pushState("CLASS_STYLE"),46;case 28:return this.popState(),47;case 29:return this.pushState("STYLE"),42;case 30:return this.popState(),this.pushState("STYLEDEF_STYLES"),43;case 31:return this.popState(),44;case 35:this.pushState("STATE");break;case 36:case 39:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),25;case 37:case 40:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),26;case 38:case 41:return this.popState(),e.yytext=e.yytext.slice(0,-10).trim(),27;case 46:this.pushState("STATE_STRING");break;case 47:return this.pushState("STATE_ID"),"AS";case 48:case 64:return this.popState(),"ID";case 50:return"STATE_DESCR";case 51:return 19;case 53:return this.popState(),this.pushState("struct"),20;case 55:return this.popState(),21;case 57:return this.begin("NOTE"),29;case 58:return this.popState(),this.pushState("NOTE_ID"),56;case 59:return this.popState(),this.pushState("NOTE_ID"),57;case 60:this.popState(),this.pushState("FLOATING_NOTE");break;case 61:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 63:return"NOTE_TEXT";case 65:return this.popState(),this.pushState("NOTE_TEXT"),24;case 66:return this.popState(),e.yytext=e.yytext.substr(2).trim(),31;case 67:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),31;case 68:case 69:return 6;case 70:return 16;case 71:return 54;case 72:return 24;case 73:return e.yytext=e.yytext.trim(),14;case 74:return 15;case 75:return 28;case 76:return 55;case 78:return"INVALID"}}),"anonymous"),rules:[/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:style\s+)/i,/^(?:[\w,]+\s+)/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[9,10],inclusive:!1},struct:{rules:[9,10,22,26,29,35,42,43,44,45,54,55,56,57,71,72,73,74,75],inclusive:!1},FLOATING_NOTE_ID:{rules:[64],inclusive:!1},FLOATING_NOTE:{rules:[61,62,63],inclusive:!1},NOTE_TEXT:{rules:[66,67],inclusive:!1},NOTE_ID:{rules:[65],inclusive:!1},NOTE:{rules:[58,59,60],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[31],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[30],inclusive:!1},CLASS_STYLE:{rules:[28],inclusive:!1},CLASS:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[25],inclusive:!1},CLASSDEF:{rules:[23,24],inclusive:!1},acc_descr_multiline:{rules:[20,21],inclusive:!1},acc_descr:{rules:[18],inclusive:!1},acc_title:{rules:[16],inclusive:!1},SCALE:{rules:[13,14,33,34],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[48],inclusive:!1},STATE_STRING:{rules:[49,50],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[9,10,36,37,38,39,40,41,46,47,51,52,53],inclusive:!1},ID:{rules:[9,10],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,10,11,12,15,17,19,22,26,29,32,35,53,57,68,69,70,71,72,73,74,76,77,78],inclusive:!0}}}}();function w(){this.yy={}}return K.lexer=R,(0,o.K2)(w,"Parser"),w.prototype=K,K.Parser=w,new w}();a.parser=a;var l=a,c="state",h="relation",d="default",u="divider",p="fill:none",y="fill: #333",g="text",f="normal",m="rect",S="rectWithTitle",_="divider",b="roundedWithTitle",T="statediagram",k=`${T}-state`,E="transition",x=`${E} note-edge`,D=`${T}-note`,C=`${T}-cluster`,$=`${T}-cluster-alt`,v="parent",L="note",I="----",A=`${I}${L}`,K=`${I}${v}`,R=(0,o.K2)(((t,e="TB")=>{if(!t.doc)return e;let s=e;for(const i of t.doc)"dir"===i.stmt&&(s=i.value);return s}),"getDir"),w={getClasses:(0,o.K2)((function(t,e){return e.db.extract(e.db.getRootDocV2()),e.db.getClasses()}),"getClasses"),draw:(0,o.K2)((async function(t,e,s,a){o.Rm.info("REF0:"),o.Rm.info("Drawing state diagram (v2)",e);const{securityLevel:l,state:c,layout:h}=(0,o.D7)();a.db.extract(a.db.getRootDocV2());const d=a.db.getData(),u=(0,i.A)(e,l);d.type=a.type,d.layoutAlgorithm=h,d.nodeSpacing=c?.nodeSpacing||50,d.rankSpacing=c?.rankSpacing||50,d.markers=["barb"],d.diagramId=e,await(0,n.XX)(d,u);r._K.insertTitle(u,"statediagramTitleText",c?.titleTopMargin??25,a.db.getDiagramTitle()),(0,i.P)(u,8,T,c?.useMaxWidth??!0)}),"draw"),getDir:R},O=new Map,N=0;function B(t="",e=0,s="",i=I){return`state-${t}${null!==s&&s.length>0?`${i}${s}`:""}-${e}`}(0,o.K2)(B,"stateDomId");var F=(0,o.K2)(((t,e,s,i,n,r,a,l)=>{o.Rm.trace("items",e),e.forEach((e=>{switch(e.stmt){case c:case d:z(t,e,s,i,n,r,a,l);break;case h:{z(t,e.state1,s,i,n,r,a,l),z(t,e.state2,s,i,n,r,a,l);const c={id:"edge"+N,start:e.state1.id,end:e.state2.id,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:p,labelStyle:"",label:o.Y2.sanitizeText(e.description,(0,o.D7)()),arrowheadStyle:y,labelpos:"c",labelType:g,thickness:f,classes:E,look:a};n.push(c),N++}}}))}),"setupDoc"),P=(0,o.K2)(((t,e="TB")=>{let s=e;if(t.doc)for(const i of t.doc)"dir"===i.stmt&&(s=i.value);return s}),"getDir");function Y(t,e,s){if(!e.id||""===e.id||"
    "===e.id)return;e.cssClasses&&(Array.isArray(e.cssCompiledStyles)||(e.cssCompiledStyles=[]),e.cssClasses.split(" ").forEach((t=>{if(s.get(t)){const i=s.get(t);e.cssCompiledStyles=[...e.cssCompiledStyles,...i.styles]}})));const i=t.find((t=>t.id===e.id));i?Object.assign(i,e):t.push(e)}function G(t){return t?.classes?.join(" ")??""}function j(t){return t?.styles??[]}(0,o.K2)(Y,"insertOrUpdateNode"),(0,o.K2)(G,"getClassesFromDbInfo"),(0,o.K2)(j,"getStylesFromDbInfo");var z=(0,o.K2)(((t,e,s,i,n,r,a,l)=>{const c=e.id,h=s.get(c),T=G(h),E=j(h);if(o.Rm.info("dataFetcher parsedItem",e,h,E),"root"!==c){let s=m;!0===e.start?s="stateStart":!1===e.start&&(s="stateEnd"),e.type!==d&&(s=e.type),O.get(c)||O.set(c,{id:c,shape:s,description:o.Y2.sanitizeText(c,(0,o.D7)()),cssClasses:`${T} ${k}`,cssStyles:E});const h=O.get(c);e.description&&(Array.isArray(h.description)?(h.shape=S,h.description.push(e.description)):h.description?.length>0?(h.shape=S,h.description===c?h.description=[e.description]:h.description=[h.description,e.description]):(h.shape=m,h.description=e.description),h.description=o.Y2.sanitizeTextOrArray(h.description,(0,o.D7)())),1===h.description?.length&&h.shape===S&&("group"===h.type?h.shape=b:h.shape=m),!h.type&&e.doc&&(o.Rm.info("Setting cluster for XCX",c,P(e)),h.type="group",h.isGroup=!0,h.dir=P(e),h.shape=e.type===u?_:b,h.cssClasses=`${h.cssClasses} ${C} ${r?$:""}`);const I={labelStyle:"",shape:h.shape,label:h.description,cssClasses:h.cssClasses,cssCompiledStyles:[],cssStyles:h.cssStyles,id:c,dir:h.dir,domId:B(c,N),type:h.type,isGroup:"group"===h.type,padding:8,rx:10,ry:10,look:a};if(I.shape===_&&(I.label=""),t&&"root"!==t.id&&(o.Rm.trace("Setting node ",c," to be child of its parent ",t.id),I.parentId=t.id),I.centerLabel=!0,e.note){const t={labelStyle:"",shape:"note",label:e.note.text,cssClasses:D,cssStyles:[],cssCompilesStyles:[],id:c+A+"-"+N,domId:B(c,N,L),type:h.type,isGroup:"group"===h.type,padding:(0,o.D7)().flowchart.padding,look:a,position:e.note.position},s=c+K,r={labelStyle:"",shape:"noteGroup",label:e.note.text,cssClasses:h.cssClasses,cssStyles:[],id:c+K,domId:B(c,N,v),type:"group",isGroup:!0,padding:16,look:a,position:e.note.position};N++,r.id=s,t.parentId=s,Y(i,r,l),Y(i,t,l),Y(i,I,l);let d=c,u=t.id;"left of"===e.note.position&&(d=t.id,u=c),n.push({id:d+"-"+u,start:d,end:u,arrowhead:"none",arrowTypeEnd:"",style:p,labelStyle:"",classes:x,arrowheadStyle:y,labelpos:"c",labelType:g,thickness:f,look:a})}else Y(i,I,l)}e.doc&&(o.Rm.trace("Adding nodes children "),F(e,e.doc,s,i,n,!r,a,l))}),"dataFetcher"),U=(0,o.K2)((()=>{O.clear(),N=0}),"reset"),M="[*]",X="start",V=M,W="color",H="fill";function J(){return new Map}(0,o.K2)(J,"newClassesList");var q=[],Z=[],Q="LR",tt=[],et=J(),st=(0,o.K2)((()=>({relations:[],states:new Map,documents:{}})),"newDoc"),it={root:st()},nt=it.root,rt=0,ot=0,at=(0,o.K2)((t=>JSON.parse(JSON.stringify(t))),"clone"),lt=(0,o.K2)((t=>{o.Rm.info("Setting root doc",t),tt=t}),"setRootDoc"),ct=(0,o.K2)((()=>tt),"getRootDoc"),ht=(0,o.K2)(((t,e,s)=>{if(e.stmt===h)ht(t,e.state1,!0),ht(t,e.state2,!1);else if(e.stmt===c&&("[*]"===e.id?(e.id=s?t.id+"_start":t.id+"_end",e.start=s):e.id=e.id.trim()),e.doc){const t=[];let s,i=[];for(s=0;s0&&i.length>0){const s={stmt:c,id:(0,r.$C)(),type:"divider",doc:at(i)};t.push(at(s)),e.doc=t}e.doc.forEach((t=>ht(e,t,!0)))}}),"docTranslator"),dt=(0,o.K2)((()=>(ht({id:"root"},{id:"root",doc:tt},!0),{id:"root",doc:tt})),"getRootDocV2"),ut=(0,o.K2)((t=>{let e;e=t.doc?t.doc:t,o.Rm.info(e),yt(!0),o.Rm.info("Extract initial document:",e),e.forEach((t=>{switch(o.Rm.warn("Statement",t.stmt),t.stmt){case c:pt(t.id.trim(),t.type,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles);break;case h:xt(t.state1,t.state2,t.description);break;case"classDef":vt(t.id.trim(),t.classes);break;case"style":{const e=t.id.trim().split(","),s=t.styleClass.split(",");e.forEach((t=>{let e=gt(t);if(void 0===e){const s=t.trim();pt(s),e=gt(s)}e.styles=s.map((t=>t.replace(/;/g,"")?.trim()))}))}break;case"applyClass":It(t.id.trim(),t.styleClass)}}));const s=ft(),i=(0,o.D7)().look;U(),z(void 0,dt(),s,q,Z,!0,i,et),q.forEach((t=>{if(Array.isArray(t.label)){if(t.description=t.label.slice(1),t.isGroup&&t.description.length>0)throw new Error("Group nodes can only have label. Remove the additional description for node ["+t.id+"]");t.label=t.label[0]}}))}),"extract"),pt=(0,o.K2)((function(t,e=d,s=null,i=null,n=null,r=null,a=null,l=null){const c=t?.trim();if(nt.states.has(c)?(nt.states.get(c).doc||(nt.states.get(c).doc=s),nt.states.get(c).type||(nt.states.get(c).type=e)):(o.Rm.info("Adding state ",c,i),nt.states.set(c,{id:c,descriptions:[],type:e,doc:s,note:n,classes:[],styles:[],textStyles:[]})),i&&(o.Rm.info("Setting state description",c,i),"string"==typeof i&&Dt(c,i.trim()),"object"==typeof i&&i.forEach((t=>Dt(c,t.trim())))),n){const t=nt.states.get(c);t.note=n,t.note.text=o.Y2.sanitizeText(t.note.text,(0,o.D7)())}if(r){o.Rm.info("Setting state classes",c,r);("string"==typeof r?[r]:r).forEach((t=>It(c,t.trim())))}if(a){o.Rm.info("Setting state styles",c,a);("string"==typeof a?[a]:a).forEach((t=>At(c,t.trim())))}if(l){o.Rm.info("Setting state styles",c,a);("string"==typeof l?[l]:l).forEach((t=>Kt(c,t.trim())))}}),"addState"),yt=(0,o.K2)((function(t){q=[],Z=[],it={root:st()},nt=it.root,rt=0,et=J(),t||(0,o.IU)()}),"clear"),gt=(0,o.K2)((function(t){return nt.states.get(t)}),"getState"),ft=(0,o.K2)((function(){return nt.states}),"getStates"),mt=(0,o.K2)((function(){o.Rm.info("Documents = ",it)}),"logDocuments"),St=(0,o.K2)((function(){return nt.relations}),"getRelations");function _t(t=""){let e=t;return t===M&&(rt++,e=`${X}${rt}`),e}function bt(t="",e=d){return t===M?X:e}function Tt(t=""){let e=t;return t===V&&(e=`end${++rt}`),e}function kt(t="",e=d){return t===V?"end":e}function Et(t,e,s){let i=_t(t.id.trim()),n=bt(t.id.trim(),t.type),r=_t(e.id.trim()),a=bt(e.id.trim(),e.type);pt(i,n,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),pt(r,a,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),nt.relations.push({id1:i,id2:r,relationTitle:o.Y2.sanitizeText(s,(0,o.D7)())})}(0,o.K2)(_t,"startIdIfNeeded"),(0,o.K2)(bt,"startTypeIfNeeded"),(0,o.K2)(Tt,"endIdIfNeeded"),(0,o.K2)(kt,"endTypeIfNeeded"),(0,o.K2)(Et,"addRelationObjs");var xt=(0,o.K2)((function(t,e,s){if("object"==typeof t)Et(t,e,s);else{const i=_t(t.trim()),n=bt(t),r=Tt(e.trim()),a=kt(e);pt(i,n),pt(r,a),nt.relations.push({id1:i,id2:r,title:o.Y2.sanitizeText(s,(0,o.D7)())})}}),"addRelation"),Dt=(0,o.K2)((function(t,e){const s=nt.states.get(t),i=e.startsWith(":")?e.replace(":","").trim():e;s.descriptions.push(o.Y2.sanitizeText(i,(0,o.D7)()))}),"addDescription"),Ct=(0,o.K2)((function(t){return":"===t.substring(0,1)?t.substr(2).trim():t.trim()}),"cleanupLabel"),$t=(0,o.K2)((()=>"divider-id-"+ ++ot),"getDividerId"),vt=(0,o.K2)((function(t,e=""){et.has(t)||et.set(t,{id:t,styles:[],textStyles:[]});const s=et.get(t);null!=e&&e.split(",").forEach((t=>{const e=t.replace(/([^;]*);/,"$1").trim();if(RegExp(W).exec(t)){const t=e.replace(H,"bgFill").replace(W,H);s.textStyles.push(t)}s.styles.push(e)}))}),"addStyleClass"),Lt=(0,o.K2)((function(){return et}),"getClasses"),It=(0,o.K2)((function(t,e){t.split(",").forEach((function(t){let s=gt(t);if(void 0===s){const e=t.trim();pt(e),s=gt(e)}s.classes.push(e)}))}),"setCssClass"),At=(0,o.K2)((function(t,e){const s=gt(t);void 0!==s&&s.styles.push(e)}),"setStyle"),Kt=(0,o.K2)((function(t,e){const s=gt(t);void 0!==s&&s.textStyles.push(e)}),"setTextStyle"),Rt=(0,o.K2)((()=>Q),"getDirection"),wt=(0,o.K2)((t=>{Q=t}),"setDirection"),Ot=(0,o.K2)((t=>t&&":"===t[0]?t.substr(1).trim():t.trim()),"trimColon"),Nt=(0,o.K2)((()=>{const t=(0,o.D7)();return{nodes:q,edges:Z,other:{},config:t,direction:R(dt())}}),"getData"),Bt={getConfig:(0,o.K2)((()=>(0,o.D7)().state),"getConfig"),getData:Nt,addState:pt,clear:yt,getState:gt,getStates:ft,getRelations:St,getClasses:Lt,getDirection:Rt,addRelation:xt,getDividerId:$t,setDirection:wt,cleanupLabel:Ct,lineType:{LINE:0,DOTTED_LINE:1},relationType:{AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},logDocuments:mt,getRootDoc:ct,setRootDoc:lt,getRootDocV2:dt,extract:ut,trimColon:Ot,getAccTitle:o.iN,setAccTitle:o.SV,getAccDescription:o.m7,setAccDescription:o.EI,addStyleClass:vt,setCssClass:It,addDescription:Dt,setDiagramTitle:o.ke,getDiagramTitle:o.ab},Ft=(0,o.K2)((t=>`\ndefs #statediagram-barbEnd {\n fill: ${t.transitionColor};\n stroke: ${t.transitionColor};\n }\ng.stateGroup text {\n fill: ${t.nodeBorder};\n stroke: none;\n font-size: 10px;\n}\ng.stateGroup text {\n fill: ${t.textColor};\n stroke: none;\n font-size: 10px;\n\n}\ng.stateGroup .state-title {\n font-weight: bolder;\n fill: ${t.stateLabelColor};\n}\n\ng.stateGroup rect {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n}\n\ng.stateGroup line {\n stroke: ${t.lineColor};\n stroke-width: 1;\n}\n\n.transition {\n stroke: ${t.transitionColor};\n stroke-width: 1;\n fill: none;\n}\n\n.stateGroup .composit {\n fill: ${t.background};\n border-bottom: 1px\n}\n\n.stateGroup .alt-composit {\n fill: #e0e0e0;\n border-bottom: 1px\n}\n\n.state-note {\n stroke: ${t.noteBorderColor};\n fill: ${t.noteBkgColor};\n\n text {\n fill: ${t.noteTextColor};\n stroke: none;\n font-size: 10px;\n }\n}\n\n.stateLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: ${t.mainBkg};\n opacity: 0.5;\n}\n\n.edgeLabel .label rect {\n fill: ${t.labelBackgroundColor};\n opacity: 0.5;\n}\n.edgeLabel {\n background-color: ${t.edgeLabelBackground};\n p {\n background-color: ${t.edgeLabelBackground};\n }\n rect {\n opacity: 0.5;\n background-color: ${t.edgeLabelBackground};\n fill: ${t.edgeLabelBackground};\n }\n text-align: center;\n}\n.edgeLabel .label text {\n fill: ${t.transitionLabelColor||t.tertiaryTextColor};\n}\n.label div .edgeLabel {\n color: ${t.transitionLabelColor||t.tertiaryTextColor};\n}\n\n.stateLabel text {\n fill: ${t.stateLabelColor};\n font-size: 10px;\n font-weight: bold;\n}\n\n.node circle.state-start {\n fill: ${t.specialStateColor};\n stroke: ${t.specialStateColor};\n}\n\n.node .fork-join {\n fill: ${t.specialStateColor};\n stroke: ${t.specialStateColor};\n}\n\n.node circle.state-end {\n fill: ${t.innerEndBackground};\n stroke: ${t.background};\n stroke-width: 1.5\n}\n.end-state-inner {\n fill: ${t.compositeBackground||t.background};\n // stroke: ${t.background};\n stroke-width: 1.5\n}\n\n.node rect {\n fill: ${t.stateBkg||t.mainBkg};\n stroke: ${t.stateBorder||t.nodeBorder};\n stroke-width: 1px;\n}\n.node polygon {\n fill: ${t.mainBkg};\n stroke: ${t.stateBorder||t.nodeBorder};;\n stroke-width: 1px;\n}\n#statediagram-barbEnd {\n fill: ${t.lineColor};\n}\n\n.statediagram-cluster rect {\n fill: ${t.compositeTitleBackground};\n stroke: ${t.stateBorder||t.nodeBorder};\n stroke-width: 1px;\n}\n\n.cluster-label, .nodeLabel {\n color: ${t.stateLabelColor};\n // line-height: 1;\n}\n\n.statediagram-cluster rect.outer {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-state .divider {\n stroke: ${t.stateBorder||t.nodeBorder};\n}\n\n.statediagram-state .title-state {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-cluster.statediagram-cluster .inner {\n fill: ${t.compositeBackground||t.background};\n}\n.statediagram-cluster.statediagram-cluster-alt .inner {\n fill: ${t.altBackground?t.altBackground:"#efefef"};\n}\n\n.statediagram-cluster .inner {\n rx:0;\n ry:0;\n}\n\n.statediagram-state rect.basic {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-state rect.divider {\n stroke-dasharray: 10,10;\n fill: ${t.altBackground?t.altBackground:"#efefef"};\n}\n\n.note-edge {\n stroke-dasharray: 5;\n}\n\n.statediagram-note rect {\n fill: ${t.noteBkgColor};\n stroke: ${t.noteBorderColor};\n stroke-width: 1px;\n rx: 0;\n ry: 0;\n}\n.statediagram-note rect {\n fill: ${t.noteBkgColor};\n stroke: ${t.noteBorderColor};\n stroke-width: 1px;\n rx: 0;\n ry: 0;\n}\n\n.statediagram-note text {\n fill: ${t.noteTextColor};\n}\n\n.statediagram-note .nodeLabel {\n color: ${t.noteTextColor};\n}\n.statediagram .edgeLabel {\n color: red; // ${t.noteTextColor};\n}\n\n#dependencyStart, #dependencyEnd {\n fill: ${t.lineColor};\n stroke: ${t.lineColor};\n stroke-width: 1;\n}\n\n.statediagramTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n}\n`),"getStyles")}}]); \ No newline at end of file diff --git a/assets/js/967fa6d4.32b03252.js b/assets/js/967fa6d4.32b03252.js deleted file mode 100644 index 4ab914dd07d0..000000000000 --- a/assets/js/967fa6d4.32b03252.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7876],{62482:(e,t,i)=>{i.r(t),i.d(t,{assets:()=>c,contentTitle:()=>l,default:()=>u,frontMatter:()=>o,metadata:()=>r,toc:()=>d});var s=i(74848),n=i(28453),a=i(67141);const o={id:"learn-guides-accounts-multisig",title:"Polkadot-JS Guides about Multi-signature Accounts",sidebar_label:"Multisig Guides",description:"Polkadot-JS Guides about Multi-signature Accounts",keyword:["guides","polkadot-js","accounts","multisig","multi-signature"],slug:"../learn-guides-accounts-multisig"},l=void 0,r={id:"learn/learn-guides-accounts-multisig",title:"Polkadot-JS Guides about Multi-signature Accounts",description:"Polkadot-JS Guides about Multi-signature Accounts",source:"@site/../docs/learn/learn-guides-accounts-multisig.md",sourceDirName:"learn",slug:"/learn-guides-accounts-multisig",permalink:"/docs/learn-guides-accounts-multisig",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-accounts-multisig.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1729847256e3,frontMatter:{id:"learn-guides-accounts-multisig",title:"Polkadot-JS Guides about Multi-signature Accounts",sidebar_label:"Multisig Guides",description:"Polkadot-JS Guides about Multi-signature Accounts",keyword:["guides","polkadot-js","accounts","multisig","multi-signature"],slug:"../learn-guides-accounts-multisig"},sidebar:"docs",previous:{title:"Account Guides",permalink:"/docs/learn-guides-accounts"},next:{title:"Proxy Guides",permalink:"/docs/learn-guides-accounts-proxy"}},c={},d=[{value:"Creating a Multisig Account",id:"creating-a-multisig-account",level:2},{value:"Multisig Transactions with Accounts Tab",id:"multisig-transactions-with-accounts-tab",level:2},{value:"Multisig Transactions with Extrinsic Tab",id:"multisig-transactions-with-extrinsic-tab",level:2},{value:"Multisig Call Deposit",id:"multisig-call-deposit",level:3},{value:"Example using Multisig Accounts",id:"example-using-multisig-accounts",level:3},{value:"Decoding Multisig Call Data",id:"decoding-multisig-call-data",level:2}];function h(e){const t={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,n.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the Polkadot-JS UI, you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,s.jsx)(t.h2,{id:"creating-a-multisig-account",children:"Creating a Multisig Account"}),"\n",(0,s.jsxs)(t.p,{children:['Check the "How to create a multisig account" section on\n',(0,s.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181826-how-to-create-and-use-a-multisig-account",children:"this support page"}),".\nWe recommend trying out the tutorial on\n",(0,s.jsx)(t.a,{href:"/docs/maintain-networks#westend-test-network",children:"Westend network"})," - Polkadot's testnet."]}),"\n",(0,s.jsx)(t.h2,{id:"multisig-transactions-with-accounts-tab",children:"Multisig Transactions with Accounts Tab"}),"\n",(0,s.jsx)(t.admonition,{title:"Walkthrough Video Tutorial",type:"info",children:(0,s.jsxs)(t.p,{children:["See ",(0,s.jsx)(t.a,{href:"https://www.youtube.com/watch?v=-cPiKMslZqI",children:"this video tutorial"})," to learn how to transact with\na multisig account using the Accounts Tab in the\n",(0,s.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/accounts",children:"Polkadot-JS UI"}),"."]})}),"\n",(0,s.jsxs)(t.p,{children:["You can create a multisig account directly on the Accounts Tab of the\n",(0,s.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/accounts",children:"Polkadot-JS UI"}),", and use this account to send funds. See\n",(0,s.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181826-how-to-create-and-use-a-multisig-account",children:"this support article"}),"\nfor more information."]}),"\n",(0,s.jsx)(t.h2,{id:"multisig-transactions-with-extrinsic-tab",children:"Multisig Transactions with Extrinsic Tab"}),"\n",(0,s.jsx)(t.p,{children:"See the video tutorial below to learn about multi-signature accounts and how you can transact with\nthem using the Polkadot-JS UI."}),"\n",(0,s.jsx)("div",{className:"row",children:(0,s.jsxs)("div",{className:"col text--center",children:[(0,s.jsx)("a",{href:"https://youtu.be/Qv_nJVcvQr8?t=2109",children:(0,s.jsx)("img",{src:"https://img.youtube.com/vi/Qv_nJVcvQr8/0.jpg",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,s.jsx)("p",{children:(0,s.jsx)("a",{href:"https://youtu.be/Qv_nJVcvQr8?t=2109",children:"Transact with Multi-signature Accounts"})})]})}),"\n",(0,s.jsx)(t.p,{children:"There are three types of actions you can take with a multisig account:"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:["Executing a call ",(0,s.jsx)(t.code,{children:"asMulti"}),". This is used to begin or end a multisig transaction."]}),"\n",(0,s.jsxs)(t.li,{children:["Approving a call ",(0,s.jsx)(t.code,{children:"approveAsMulti"}),". This is used to approve an extrinsic and pass-on to the next\nsignatory (see ",(0,s.jsx)(t.a,{href:"#example-using-multi-signature-accounts",children:"example below"})," for more information)."]}),"\n",(0,s.jsxs)(t.li,{children:["Cancelling a call ",(0,s.jsx)(t.code,{children:"cancelAsMulti"}),"."]}),"\n"]}),"\n",(0,s.jsx)(t.admonition,{type:"info",children:(0,s.jsxs)(t.p,{children:["Check out ",(0,s.jsx)(t.a,{href:"https://polkadot.js.org/docs/substrate/extrinsics#multisig",children:"this page"})," for more\ninformation about the actions you can take with a multi-signature account."]})}),"\n",(0,s.jsxs)(t.p,{children:["In scenarios where only a single approval is needed, a convenience method ",(0,s.jsx)(t.code,{children:"as_multi_threshold_1"}),"\nshould be used. This function takes only the other signatories and the raw call as arguments. Note\nthat the Polkadot-JS UI does not have integration for this call because it is not possible to create\nmultisig accounts with ",(0,s.jsx)(t.code,{children:"threshold=1"}),". If you want to create a multisig with threshold 1, you can use\n",(0,s.jsx)(t.a,{href:"https://github.com/paritytech/txwrapper-core",children:"txwrapper-core"}),", which is developed and supported by\nParity Technologies. There is a detailed\n",(0,s.jsx)(t.a,{href:"https://github.com/paritytech/txwrapper-core/tree/main/packages/txwrapper-examples/multisig",children:"multisig example"}),"\nthat you can try out and change to see how it works."]}),"\n",(0,s.jsx)(t.p,{children:"However, in anything but the simple one approval case, you will likely need more than one of the\nsignatories to approve the call before finally executing it."}),"\n",(0,s.jsx)(t.h3,{id:"multisig-call-deposit",children:"Multisig Call Deposit"}),"\n",(0,s.jsxs)(t.p,{children:["When you create a new multi-sig call, you will need to place a\n",(0,s.jsx)(t.a,{href:"/docs/chain-state-values#multisig-deposit-base",children:"deposit"}),". The deposit stays locked until\nthe call is executed. This deposit is to establish an economic cost on the storage space that the\nmultisig call takes up in the chain state and discourage users from creating multisig calls that\nnever get executed. The deposit will be reserved in the call initiator's account."]}),"\n",(0,s.jsxs)(t.p,{children:["The deposit is dependent on the ",(0,s.jsx)(t.code,{children:"threshold"})," parameter and is calculated as follows:"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{children:"Deposit = depositBase + threshold * depositFactor\n"})}),"\n",(0,s.jsxs)(t.p,{children:["Where ",(0,s.jsx)(t.a,{href:"/docs/chain-state-values#multisig-deposit-base",children:(0,s.jsx)(t.code,{children:"depositBase"})})," and\n",(0,s.jsx)(t.a,{href:"/docs/chain-state-values#multisig-deposit-factor",children:(0,s.jsx)(t.code,{children:"depositFactor"})})," are chain constants set\nin the runtime code."]}),"\n",(0,s.jsx)(t.p,{children:"The other signatory accounts should have enough funds to pay for the transaction fees associated\nwith approving the multisig call. The deposit is for the call; that is, other signatories will not\nneed to place additional deposits. Once the multisig call is executed or rejected, the deposit is\nreleased on the account that initiated the call."}),"\n",(0,s.jsx)(t.h3,{id:"example-using-multisig-accounts",children:"Example using Multisig Accounts"}),"\n",(0,s.jsx)(t.admonition,{title:"Walk-through video tutorial",type:"info",children:(0,s.jsxs)(t.p,{children:["See ",(0,s.jsx)(t.a,{href:"https://www.youtube.com/watch?v=T0vIuJcTJeQ",children:"this video tutorial"})," to learn how to transact with\na multisig account using the Extrinsic Tab in the\n",(0,s.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/explorer",children:"Polkadot-JS UI"}),"."]})}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{alt:"multisig diagram",src:i(97978).A+"",width:"1920",height:"800"})}),"\n",(0,s.jsxs)(t.p,{children:["Let's consider an example of a multisig on Polkadot with a threshold of 2 and 3 signers: Charlie,\nDan, and Eleanor. First, Charlie will create the call on-chain by calling the ",(0,s.jsx)(t.code,{children:"multisig.asMulti"}),"\nextrinsic with the raw call, in this case, a balance transfer (",(0,s.jsx)(t.code,{children:"balances.transferKeepAlive"}),"\nextrinsic) from multisig CDE to Frank's account. When doing this, Charlie will have to deposit\n",(0,s.jsx)(t.code,{children:"DepositBase + (2 * DepositFactor) = 20.152 DOT"})," while he waits for either Dan or Eleanor also to\napprove the balance transfer call using the ",(0,s.jsx)(t.code,{children:"multisig.approveAsMulti"})," or the ",(0,s.jsx)(t.code,{children:"multisig.asMulti"}),"\nextrinsics."]}),"\n",(0,s.jsxs)(t.p,{children:["If Dan submits the ",(0,s.jsx)(t.code,{children:"multisig.approveAsMulti"})," extrinsic, he approves Charlie's call but he passes on\nthe final approval to Eleanor. So, although the multisig has threshold 2, in this case all 3/3\nsignatories need to participate in the transaction approval. Eleanor will need to submit a\n",(0,s.jsx)(t.code,{children:"multisig.asMulti"})," or ",(0,s.jsx)(t.code,{children:"multisig.approveAsMulti"})," extrinsic to transfer funds from CDE to Frank."]}),"\n",(0,s.jsxs)(t.p,{children:["Alternatively, Dan or Eleanor can just submit a ",(0,s.jsx)(t.code,{children:"multisig.asMulti"})," extrinsic after Charlie to\ntransfer the funds. In this case, 2/3 signatories will participate in the transaction approval. The\naccounts approving Charlie's call will not need to place the deposit, and Charlie will receive his\ndeposit back once the transfer is successful or canceled. To cancel the transaction, Dan or Eleanor\ncan use the ",(0,s.jsx)(t.code,{children:"multisig.cancelAsMulti"})," extrinsic."]}),"\n",(0,s.jsxs)(t.p,{children:["Note that multisigs are ",(0,s.jsx)(t.strong,{children:"deterministic"}),", which means that multisig addresses are generated from\nthe addresses of signers and the threshold of the multisig wallet. No matter the order of the\nsignatories' accounts, the multisig will always have the same address because accounts' addresses\nare sorted in ascending order."]}),"\n",(0,s.jsx)(t.admonition,{title:"Addresses that are provided to the multisig wallet are sorted",type:"note",children:(0,s.jsxs)(t.p,{children:["Public keys of signers' wallets are compared byte-for-byte and sorted ascending before being used to\ngenerate the multisig address. For example, consider the scenario with three addresses, A, B, and C,\nstarting with ",(0,s.jsx)(t.code,{children:"5FUGT"}),", ",(0,s.jsx)(t.code,{children:"5HMfS"}),", and ",(0,s.jsx)(t.code,{children:"5GhKJ"}),". If we build the ABC multisig with the accounts in that\nspecific order (i.e. first A, then B, and C), the real order of the accounts in the multisig will be\nACB. If, in the Extrinsic tab, we initiate a multisig call with C, the order of the other\nsignatories will be first A, then B. If we put first B, then A, the transaction will fail."]})}),"\n",(0,s.jsxs)(t.p,{children:["This has some implications when using the Extrinsics tab on the\n",(0,s.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/accounts",children:"Polkadot-JS UI"})," to perform multisig transactions. If the\norder of the ",(0,s.jsx)(t.em,{children:"other signatories"})," is wrong, the transaction will fail. This does not happen if the\nmultisig is executed directly from the Accounts tab (recommended). The Polkadot-JS UI supports\nmultisig accounts, as documented on the ",(0,s.jsx)(t.a,{href:"/docs/learn-account-multisig",children:"Account Generation page"}),". You\ncan see our video tutorials for more information about creating multisig accounts and transacting\nwith them using both the ",(0,s.jsx)(t.a,{href:"https://www.youtube.com/watch?v=-cPiKMslZqI",children:"Accounts Tab"})," and the\n",(0,s.jsx)(t.a,{href:"https://www.youtube.com/watch?v=T0vIuJcTJeQ",children:"Extrinsic Tab"})," in the Polkadot-JS UI."]}),"\n",(0,s.jsx)(t.h2,{id:"decoding-multisig-call-data",children:"Decoding Multisig Call Data"}),"\n",(0,s.jsx)(t.admonition,{type:"info",children:(0,s.jsxs)(t.p,{children:["Before signing a transaction, it is important to know the exact specifics of what is being signed.\nCheck the\n",(0,s.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181826-how-to-create-and-use-a-multisig-account",children:'"How to use a multisig account"'}),"\nin the support docs on how to decode the multisig call data."]})})]})}function u(e={}){const{wrapper:t}={...(0,n.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}},67141:(e,t,i)=>{i.d(t,{A:()=>a});var s=i(96540),n=i(74848);const a=function(e){var t,i=e.message,a=(0,s.useState)(!0),o=a[0],l=a[1];return(0,n.jsx)(n.Fragment,{children:o&&(0,n.jsxs)("div",{className:"message-box",children:[(0,n.jsx)("button",{className:"close-button",onClick:function(){l(!1)},children:"\u2716 "}),(0,n.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(t=i,t.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},97978:(e,t,i)=>{i.d(t,{A:()=>s});const s=i.p+"assets/images/multisig-diagram-90327330a3e865703a0ab1a1cc1eee47.png"},28453:(e,t,i)=>{i.d(t,{R:()=>o,x:()=>l});var s=i(96540);const n={},a=s.createContext(n);function o(e){const t=s.useContext(a);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function l(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:o(e.components),s.createElement(a.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/967fa6d4.637edc4f.js b/assets/js/967fa6d4.637edc4f.js new file mode 100644 index 000000000000..2ddf76123d58 --- /dev/null +++ b/assets/js/967fa6d4.637edc4f.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7876],{48660:(e,t,i)=>{i.r(t),i.d(t,{assets:()=>c,contentTitle:()=>r,default:()=>u,frontMatter:()=>l,metadata:()=>s,toc:()=>d});const s=JSON.parse('{"id":"learn/learn-guides-accounts-multisig","title":"Polkadot-JS Guides about Multi-signature Accounts","description":"Polkadot-JS Guides about Multi-signature Accounts","source":"@site/../docs/learn/learn-guides-accounts-multisig.md","sourceDirName":"learn","slug":"/learn-guides-accounts-multisig","permalink":"/docs/learn-guides-accounts-multisig","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-accounts-multisig.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1729847256000,"frontMatter":{"id":"learn-guides-accounts-multisig","title":"Polkadot-JS Guides about Multi-signature Accounts","sidebar_label":"Multisig Guides","description":"Polkadot-JS Guides about Multi-signature Accounts","keyword":["guides","polkadot-js","accounts","multisig","multi-signature"],"slug":"../learn-guides-accounts-multisig"},"sidebar":"docs","previous":{"title":"Account Guides","permalink":"/docs/learn-guides-accounts"},"next":{"title":"Proxy Guides","permalink":"/docs/learn-guides-accounts-proxy"}}');var n=i(74848),a=i(28453),o=i(67141);const l={id:"learn-guides-accounts-multisig",title:"Polkadot-JS Guides about Multi-signature Accounts",sidebar_label:"Multisig Guides",description:"Polkadot-JS Guides about Multi-signature Accounts",keyword:["guides","polkadot-js","accounts","multisig","multi-signature"],slug:"../learn-guides-accounts-multisig"},r=void 0,c={},d=[{value:"Creating a Multisig Account",id:"creating-a-multisig-account",level:2},{value:"Multisig Transactions with Accounts Tab",id:"multisig-transactions-with-accounts-tab",level:2},{value:"Multisig Transactions with Extrinsic Tab",id:"multisig-transactions-with-extrinsic-tab",level:2},{value:"Multisig Call Deposit",id:"multisig-call-deposit",level:3},{value:"Example using Multisig Accounts",id:"example-using-multisig-accounts",level:3},{value:"Decoding Multisig Call Data",id:"decoding-multisig-call-data",level:2}];function h(e){const t={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,a.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(o.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the Polkadot-JS UI, you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,n.jsx)(t.h2,{id:"creating-a-multisig-account",children:"Creating a Multisig Account"}),"\n",(0,n.jsxs)(t.p,{children:['Check the "How to create a multisig account" section on\n',(0,n.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181826-how-to-create-and-use-a-multisig-account",children:"this support page"}),".\nWe recommend trying out the tutorial on\n",(0,n.jsx)(t.a,{href:"/docs/maintain-networks#westend-test-network",children:"Westend network"})," - Polkadot's testnet."]}),"\n",(0,n.jsx)(t.h2,{id:"multisig-transactions-with-accounts-tab",children:"Multisig Transactions with Accounts Tab"}),"\n",(0,n.jsx)(t.admonition,{title:"Walkthrough Video Tutorial",type:"info",children:(0,n.jsxs)(t.p,{children:["See ",(0,n.jsx)(t.a,{href:"https://www.youtube.com/watch?v=-cPiKMslZqI",children:"this video tutorial"})," to learn how to transact with\na multisig account using the Accounts Tab in the\n",(0,n.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/accounts",children:"Polkadot-JS UI"}),"."]})}),"\n",(0,n.jsxs)(t.p,{children:["You can create a multisig account directly on the Accounts Tab of the\n",(0,n.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/accounts",children:"Polkadot-JS UI"}),", and use this account to send funds. See\n",(0,n.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181826-how-to-create-and-use-a-multisig-account",children:"this support article"}),"\nfor more information."]}),"\n",(0,n.jsx)(t.h2,{id:"multisig-transactions-with-extrinsic-tab",children:"Multisig Transactions with Extrinsic Tab"}),"\n",(0,n.jsx)(t.p,{children:"See the video tutorial below to learn about multi-signature accounts and how you can transact with\nthem using the Polkadot-JS UI."}),"\n",(0,n.jsx)("div",{className:"row",children:(0,n.jsxs)("div",{className:"col text--center",children:[(0,n.jsx)("a",{href:"https://youtu.be/Qv_nJVcvQr8?t=2109",children:(0,n.jsx)("img",{src:"https://img.youtube.com/vi/Qv_nJVcvQr8/0.jpg",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,n.jsx)("p",{children:(0,n.jsx)("a",{href:"https://youtu.be/Qv_nJVcvQr8?t=2109",children:"Transact with Multi-signature Accounts"})})]})}),"\n",(0,n.jsx)(t.p,{children:"There are three types of actions you can take with a multisig account:"}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:["Executing a call ",(0,n.jsx)(t.code,{children:"asMulti"}),". This is used to begin or end a multisig transaction."]}),"\n",(0,n.jsxs)(t.li,{children:["Approving a call ",(0,n.jsx)(t.code,{children:"approveAsMulti"}),". This is used to approve an extrinsic and pass-on to the next\nsignatory (see ",(0,n.jsx)(t.a,{href:"#example-using-multi-signature-accounts",children:"example below"})," for more information)."]}),"\n",(0,n.jsxs)(t.li,{children:["Cancelling a call ",(0,n.jsx)(t.code,{children:"cancelAsMulti"}),"."]}),"\n"]}),"\n",(0,n.jsx)(t.admonition,{type:"info",children:(0,n.jsxs)(t.p,{children:["Check out ",(0,n.jsx)(t.a,{href:"https://polkadot.js.org/docs/substrate/extrinsics#multisig",children:"this page"})," for more\ninformation about the actions you can take with a multi-signature account."]})}),"\n",(0,n.jsxs)(t.p,{children:["In scenarios where only a single approval is needed, a convenience method ",(0,n.jsx)(t.code,{children:"as_multi_threshold_1"}),"\nshould be used. This function takes only the other signatories and the raw call as arguments. Note\nthat the Polkadot-JS UI does not have integration for this call because it is not possible to create\nmultisig accounts with ",(0,n.jsx)(t.code,{children:"threshold=1"}),". If you want to create a multisig with threshold 1, you can use\n",(0,n.jsx)(t.a,{href:"https://github.com/paritytech/txwrapper-core",children:"txwrapper-core"}),", which is developed and supported by\nParity Technologies. There is a detailed\n",(0,n.jsx)(t.a,{href:"https://github.com/paritytech/txwrapper-core/tree/main/packages/txwrapper-examples/multisig",children:"multisig example"}),"\nthat you can try out and change to see how it works."]}),"\n",(0,n.jsx)(t.p,{children:"However, in anything but the simple one approval case, you will likely need more than one of the\nsignatories to approve the call before finally executing it."}),"\n",(0,n.jsx)(t.h3,{id:"multisig-call-deposit",children:"Multisig Call Deposit"}),"\n",(0,n.jsxs)(t.p,{children:["When you create a new multi-sig call, you will need to place a\n",(0,n.jsx)(t.a,{href:"/docs/chain-state-values#multisig-deposit-base",children:"deposit"}),". The deposit stays locked until\nthe call is executed. This deposit is to establish an economic cost on the storage space that the\nmultisig call takes up in the chain state and discourage users from creating multisig calls that\nnever get executed. The deposit will be reserved in the call initiator's account."]}),"\n",(0,n.jsxs)(t.p,{children:["The deposit is dependent on the ",(0,n.jsx)(t.code,{children:"threshold"})," parameter and is calculated as follows:"]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{children:"Deposit = depositBase + threshold * depositFactor\n"})}),"\n",(0,n.jsxs)(t.p,{children:["Where ",(0,n.jsx)(t.a,{href:"/docs/chain-state-values#multisig-deposit-base",children:(0,n.jsx)(t.code,{children:"depositBase"})})," and\n",(0,n.jsx)(t.a,{href:"/docs/chain-state-values#multisig-deposit-factor",children:(0,n.jsx)(t.code,{children:"depositFactor"})})," are chain constants set\nin the runtime code."]}),"\n",(0,n.jsx)(t.p,{children:"The other signatory accounts should have enough funds to pay for the transaction fees associated\nwith approving the multisig call. The deposit is for the call; that is, other signatories will not\nneed to place additional deposits. Once the multisig call is executed or rejected, the deposit is\nreleased on the account that initiated the call."}),"\n",(0,n.jsx)(t.h3,{id:"example-using-multisig-accounts",children:"Example using Multisig Accounts"}),"\n",(0,n.jsx)(t.admonition,{title:"Walk-through video tutorial",type:"info",children:(0,n.jsxs)(t.p,{children:["See ",(0,n.jsx)(t.a,{href:"https://www.youtube.com/watch?v=T0vIuJcTJeQ",children:"this video tutorial"})," to learn how to transact with\na multisig account using the Extrinsic Tab in the\n",(0,n.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/explorer",children:"Polkadot-JS UI"}),"."]})}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"multisig diagram",src:i(97978).A+"",width:"1920",height:"800"})}),"\n",(0,n.jsxs)(t.p,{children:["Let's consider an example of a multisig on Polkadot with a threshold of 2 and 3 signers: Charlie,\nDan, and Eleanor. First, Charlie will create the call on-chain by calling the ",(0,n.jsx)(t.code,{children:"multisig.asMulti"}),"\nextrinsic with the raw call, in this case, a balance transfer (",(0,n.jsx)(t.code,{children:"balances.transferKeepAlive"}),"\nextrinsic) from multisig CDE to Frank's account. When doing this, Charlie will have to deposit\n",(0,n.jsx)(t.code,{children:"DepositBase + (2 * DepositFactor) = 20.152 DOT"})," while he waits for either Dan or Eleanor also to\napprove the balance transfer call using the ",(0,n.jsx)(t.code,{children:"multisig.approveAsMulti"})," or the ",(0,n.jsx)(t.code,{children:"multisig.asMulti"}),"\nextrinsics."]}),"\n",(0,n.jsxs)(t.p,{children:["If Dan submits the ",(0,n.jsx)(t.code,{children:"multisig.approveAsMulti"})," extrinsic, he approves Charlie's call but he passes on\nthe final approval to Eleanor. So, although the multisig has threshold 2, in this case all 3/3\nsignatories need to participate in the transaction approval. Eleanor will need to submit a\n",(0,n.jsx)(t.code,{children:"multisig.asMulti"})," or ",(0,n.jsx)(t.code,{children:"multisig.approveAsMulti"})," extrinsic to transfer funds from CDE to Frank."]}),"\n",(0,n.jsxs)(t.p,{children:["Alternatively, Dan or Eleanor can just submit a ",(0,n.jsx)(t.code,{children:"multisig.asMulti"})," extrinsic after Charlie to\ntransfer the funds. In this case, 2/3 signatories will participate in the transaction approval. The\naccounts approving Charlie's call will not need to place the deposit, and Charlie will receive his\ndeposit back once the transfer is successful or canceled. To cancel the transaction, Dan or Eleanor\ncan use the ",(0,n.jsx)(t.code,{children:"multisig.cancelAsMulti"})," extrinsic."]}),"\n",(0,n.jsxs)(t.p,{children:["Note that multisigs are ",(0,n.jsx)(t.strong,{children:"deterministic"}),", which means that multisig addresses are generated from\nthe addresses of signers and the threshold of the multisig wallet. No matter the order of the\nsignatories' accounts, the multisig will always have the same address because accounts' addresses\nare sorted in ascending order."]}),"\n",(0,n.jsx)(t.admonition,{title:"Addresses that are provided to the multisig wallet are sorted",type:"note",children:(0,n.jsxs)(t.p,{children:["Public keys of signers' wallets are compared byte-for-byte and sorted ascending before being used to\ngenerate the multisig address. For example, consider the scenario with three addresses, A, B, and C,\nstarting with ",(0,n.jsx)(t.code,{children:"5FUGT"}),", ",(0,n.jsx)(t.code,{children:"5HMfS"}),", and ",(0,n.jsx)(t.code,{children:"5GhKJ"}),". If we build the ABC multisig with the accounts in that\nspecific order (i.e. first A, then B, and C), the real order of the accounts in the multisig will be\nACB. If, in the Extrinsic tab, we initiate a multisig call with C, the order of the other\nsignatories will be first A, then B. If we put first B, then A, the transaction will fail."]})}),"\n",(0,n.jsxs)(t.p,{children:["This has some implications when using the Extrinsics tab on the\n",(0,n.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/accounts",children:"Polkadot-JS UI"})," to perform multisig transactions. If the\norder of the ",(0,n.jsx)(t.em,{children:"other signatories"})," is wrong, the transaction will fail. This does not happen if the\nmultisig is executed directly from the Accounts tab (recommended). The Polkadot-JS UI supports\nmultisig accounts, as documented on the ",(0,n.jsx)(t.a,{href:"/docs/learn-account-multisig",children:"Account Generation page"}),". You\ncan see our video tutorials for more information about creating multisig accounts and transacting\nwith them using both the ",(0,n.jsx)(t.a,{href:"https://www.youtube.com/watch?v=-cPiKMslZqI",children:"Accounts Tab"})," and the\n",(0,n.jsx)(t.a,{href:"https://www.youtube.com/watch?v=T0vIuJcTJeQ",children:"Extrinsic Tab"})," in the Polkadot-JS UI."]}),"\n",(0,n.jsx)(t.h2,{id:"decoding-multisig-call-data",children:"Decoding Multisig Call Data"}),"\n",(0,n.jsx)(t.admonition,{type:"info",children:(0,n.jsxs)(t.p,{children:["Before signing a transaction, it is important to know the exact specifics of what is being signed.\nCheck the\n",(0,n.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181826-how-to-create-and-use-a-multisig-account",children:'"How to use a multisig account"'}),"\nin the support docs on how to decode the multisig call data."]})})]})}function u(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(h,{...e})}):h(e)}},67141:(e,t,i)=>{i.d(t,{A:()=>a});var s=i(96540),n=i(74848);const a=function(e){var t,i=e.message,a=(0,s.useState)(!0),o=a[0],l=a[1];return(0,n.jsx)(n.Fragment,{children:o&&(0,n.jsxs)("div",{className:"message-box",children:[(0,n.jsx)("button",{className:"close-button",onClick:function(){l(!1)},children:"\u2716 "}),(0,n.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(t=i,t.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},97978:(e,t,i)=>{i.d(t,{A:()=>s});const s=i.p+"assets/images/multisig-diagram-90327330a3e865703a0ab1a1cc1eee47.png"},28453:(e,t,i)=>{i.d(t,{R:()=>o,x:()=>l});var s=i(96540);const n={},a=s.createContext(n);function o(e){const t=s.useContext(a);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function l(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:o(e.components),s.createElement(a.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/971.b208045f.js b/assets/js/971.b208045f.js deleted file mode 100644 index 54ef22c8da27..000000000000 --- a/assets/js/971.b208045f.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[971],{50971:(t,e,n)=>{n.d(e,{diagram:()=>O});var i=n(86079),s=n(26312),r=n(3219),a=n(78041),o=n(75263),l=(n(74353),n(16750),n(42838),function(){var t=function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n},e=[6,8,10,11,12,14,16,17,20,21],n=[1,9],i=[1,10],s=[1,11],r=[1,12],a=[1,13],o=[1,16],l=[1,17],c={trace:function(){},yy:{},symbols_:{error:2,start:3,timeline:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,period_statement:18,event_statement:19,period:20,event:21,$accept:0,$end:1},terminals_:{2:"error",4:"timeline",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",20:"period",21:"event"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[18,1],[19,1]],performAction:function(t,e,n,i,s,r,a){var o=r.length-1;switch(s){case 1:return r[o-1];case 2:case 6:case 7:this.$=[];break;case 3:r[o-1].push(r[o]),this.$=r[o-1];break;case 4:case 5:this.$=r[o];break;case 8:i.getCommonDb().setDiagramTitle(r[o].substr(6)),this.$=r[o].substr(6);break;case 9:this.$=r[o].trim(),i.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=r[o].trim(),i.getCommonDb().setAccDescription(this.$);break;case 12:i.addSection(r[o].substr(8)),this.$=r[o].substr(8);break;case 15:i.addTask(r[o],0,""),this.$=r[o];break;case 16:i.addEvent(r[o].substr(2)),this.$=r[o]}},table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:n,12:i,14:s,16:r,17:a,18:14,19:15,20:o,21:l},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:18,11:n,12:i,14:s,16:r,17:a,18:14,19:15,20:o,21:l},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,19]},{15:[1,20]},t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),t(e,[2,4]),t(e,[2,9]),t(e,[2,10])],defaultActions:{},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],i=[],s=[null],r=[],a=this.table,o="",l=0,c=0,h=r.slice.call(arguments,1),d=Object.create(this.lexer),u={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(u.yy[p]=this.yy[p]);d.setInput(t,u.yy),u.yy.lexer=d,u.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var y=d.yylloc;r.push(y);var g=d.options&&d.options.ranges;"function"==typeof u.yy.parseError?this.parseError=u.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var f,m,_,b,x,k,v,w,S,$={};;){if(m=n[n.length-1],this.defaultActions[m]?_=this.defaultActions[m]:(null==f&&(S=void 0,"number"!=typeof(S=i.pop()||d.lex()||1)&&(S instanceof Array&&(S=(i=S).pop()),S=e.symbols_[S]||S),f=S),_=a[m]&&a[m][f]),void 0===_||!_.length||!_[0]){var E="";for(x in w=[],a[m])this.terminals_[x]&&x>2&&w.push("'"+this.terminals_[x]+"'");E=d.showPosition?"Parse error on line "+(l+1)+":\n"+d.showPosition()+"\nExpecting "+w.join(", ")+", got '"+(this.terminals_[f]||f)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==f?"end of input":"'"+(this.terminals_[f]||f)+"'"),this.parseError(E,{text:d.match,token:this.terminals_[f]||f,line:d.yylineno,loc:y,expected:w})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+m+", token: "+f);switch(_[0]){case 1:n.push(f),s.push(d.yytext),r.push(d.yylloc),n.push(_[1]),f=null,c=d.yyleng,o=d.yytext,l=d.yylineno,y=d.yylloc;break;case 2:if(k=this.productions_[_[1]][1],$.$=s[s.length-k],$._$={first_line:r[r.length-(k||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(k||1)].first_column,last_column:r[r.length-1].last_column},g&&($._$.range=[r[r.length-(k||1)].range[0],r[r.length-1].range[1]]),void 0!==(b=this.performAction.apply($,[o,c,l,u.yy,_[1],s,r].concat(h))))return b;k&&(n=n.slice(0,-1*k*2),s=s.slice(0,-1*k),r=r.slice(0,-1*k)),n.push(this.productions_[_[1]][0]),s.push($.$),r.push($._$),v=a[n[n.length-2]][n[n.length-1]],n.push(v);break;case 3:return!0}}return!0}},h={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,i,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var r in s)this[r]=s[r];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),r=0;re[0].length)){if(e=n,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,s[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,i){switch(n){case 0:case 1:case 3:case 4:break;case 2:return 10;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 21;case 16:return 20;case 17:return 6;case 18:return"INVALID"}},rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:timeline\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?::\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18],inclusive:!0}}};function d(){this.yy={}}return c.lexer=h,d.prototype=c,c.Parser=d,new d}());l.parser=l;const c=l;let h="",d=0;const u=[],p=[],y=[],g=()=>i.L,f=function(){u.length=0,p.length=0,h="",y.length=0,(0,i.v)()},m=function(t){h=t,u.push(t)},_=function(){return u},b=function(){let t=w();let e=0;for(;!t&&e<100;)t=w(),e++;return p.push(...y),p},x=function(t,e,n){const i={id:d++,section:h,type:h,task:t,score:e||0,events:n?[n]:[]};y.push(i)},k=function(t){y.find((t=>t.id===d-1)).events.push(t)},v=function(t){const e={section:h,type:h,description:t,task:t,classes:[]};p.push(e)},w=function(){let t=!0;for(const[e,n]of y.entries())y[e].processed,t=t&&n.processed;return t},S={clear:f,getCommonDb:g,addSection:m,getSections:_,getTasks:b,addTask:x,addTaskOrg:v,addEvent:k},$=Object.freeze(Object.defineProperty({__proto__:null,addEvent:k,addSection:m,addTask:x,addTaskOrg:v,clear:f,default:S,getCommonDb:g,getSections:_,getTasks:b},Symbol.toStringTag,{value:"Module"}));!function(){function t(t,e,n,s,r,a,o,l){i(e.append("text").attr("x",n+r/2).attr("y",s+a/2+5).style("font-color",l).style("text-anchor","middle").text(t),o)}function e(t,e,n,s,r,a,o,l,c){const{taskFontSize:h,taskFontFamily:d}=l,u=t.split(//gi);for(let p=0;p)/).reverse(),r=[],a=n.attr("y"),o=parseFloat(n.attr("dy")),l=n.text(null).append("tspan").attr("x",0).attr("y",a).attr("dy",o+"em");for(let s=0;se||"
    "===t)&&(r.pop(),l.text(r.join(" ").trim()),r="
    "===t?[""]:[t],l=n.append("tspan").attr("x",0).attr("y",a).attr("dy","1.1em").text(t))}))}const I=function(t,e,n){t.append("path").attr("id","node-"+e.id).attr("class","node-bkg node-"+e.type).attr("d",`M0 ${e.height-5} v${10-e.height} q0,-5 5,-5 h${e.width-10} q5,0 5,5 v${e.height-5} H0 Z`),t.append("line").attr("class","node-line-"+n).attr("x1",0).attr("y1",e.height).attr("x2",e.width).attr("y2",e.height)},L=function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},T=function(t,e,n,i){const s=n%12-1,r=t.append("g");e.section=s,r.attr("class",(e.class?e.class+" ":"")+"timeline-node section-"+s);const a=r.append("g"),o=r.append("g"),l=o.append("text").text(e.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(E,e.width).node().getBBox(),c=i.fontSize&&i.fontSize.replace?i.fontSize.replace("px",""):i.fontSize;return e.height=l.height+1.1*c*.5+e.padding,e.height=Math.max(e.height,e.maxHeight),e.width=e.width+2*e.padding,o.attr("transform","translate("+e.width/2+", "+e.padding/2+")"),I(a,e,s),e},A=function(t,e,n){const i=t.append("g"),s=i.append("text").text(e.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(E,e.width).node().getBBox(),r=n.fontSize&&n.fontSize.replace?n.fontSize.replace("px",""):n.fontSize;return i.remove(),s.height+1.1*r*.5+e.padding},C=function(t,e,n,s,r,a,o,l,c,h,d){var u;for(const p of e){const e={descr:p.task,section:n,number:n,width:150,padding:20,maxHeight:a};i.l.debug("taskNode",e);const l=t.append("g").attr("class","taskWrapper"),y=T(l,e,n,o).height;if(i.l.debug("taskHeight after draw",y),l.attr("transform",`translate(${s}, ${r})`),a=Math.max(a,y),p.events){const e=t.append("g").attr("class","lineWrapper");let i=a;r+=100,i+=M(t,p.events,n,s,r,o),r-=100,e.append("line").attr("x1",s+95).attr("y1",r+a).attr("x2",s+95).attr("y2",r+a+(d?a:h)+c+120).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5")}s+=200,d&&!(null==(u=o.timeline)?void 0:u.disableMulticolor)&&n++}r-=10},M=function(t,e,n,s,r,a){let o=0;const l=r;r+=100;for(const c of e){const e={descr:c,section:n,number:n,width:150,padding:20,maxHeight:50};i.l.debug("eventNode",e);const l=t.append("g").attr("class","eventWrapper"),h=T(l,e,n,a).height;o+=h,l.attr("transform",`translate(${s}, ${r})`),r=r+10+h}return r=l,o},O={db:$,renderer:{setConf:()=>{},draw:function(t,e,n,r){var a,o;const l=(0,i.c)(),c=l.leftMargin??50;i.l.debug("timeline",r.db);const h=l.securityLevel;let d;"sandbox"===h&&(d=(0,s.Ltv)("#i"+e));const u=("sandbox"===h?(0,s.Ltv)(d.nodes()[0].contentDocument.body):(0,s.Ltv)("body")).select("#"+e);u.append("g");const p=r.db.getTasks(),y=r.db.getCommonDb().getDiagramTitle();i.l.debug("task",p),L(u);const g=r.db.getSections();i.l.debug("sections",g);let f=0,m=0,_=0,b=0,x=50+c,k=50;b=50;let v=0,w=!0;g.forEach((function(t){const e=A(u,{number:v,descr:t,section:v,width:150,padding:20,maxHeight:f},l);i.l.debug("sectionHeight before draw",e),f=Math.max(f,e+20)}));let S=0,$=0;i.l.debug("tasks.length",p.length);for(const[s,I]of p.entries()){const t={number:s,descr:I,section:I.section,width:150,padding:20,maxHeight:m},e=A(u,t,l);i.l.debug("taskHeight before draw",e),m=Math.max(m,e+20),S=Math.max(S,I.events.length);let n=0;for(let i=0;i0?g.forEach((t=>{const e=p.filter((e=>e.section===t)),n={number:v,descr:t,section:v,width:200*Math.max(e.length,1)-50,padding:20,maxHeight:f};i.l.debug("sectionNode",n);const s=u.append("g"),r=T(s,n,v,l);i.l.debug("sectionNode output",r),s.attr("transform",`translate(${x}, 50)`),k+=f+50,e.length>0&&C(u,e,v,x,k,m,l,S,$,f,!1),x+=200*Math.max(e.length,1),k=50,v++})):(w=!1,C(u,p,v,x,k,m,l,S,$,f,!0));const E=u.node().getBBox();i.l.debug("bounds",E),y&&u.append("text").text(y).attr("x",E.width/2-c).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),_=w?f+m+150:m+100;u.append("g").attr("class","lineWrapper").append("line").attr("x1",c).attr("y1",_).attr("x2",E.width+3*c).attr("y2",_).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),(0,i.o)(void 0,u,(null==(a=l.timeline)?void 0:a.padding)??50,(null==(o=l.timeline)?void 0:o.useMaxWidth)??!1)}},parser:c,styles:t=>`\n .edge {\n stroke-width: 3;\n }\n ${(t=>{let e="";for(let n=0;n { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ diagram: () => (/* binding */ diagram) -/* harmony export */ }); -/* harmony import */ var _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(86079); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(26312); -/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(3219); -/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(78041); -/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(75263); -/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(74353); -/* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(16750); -/* harmony import */ var dompurify__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(99418); - - - - - - - - - - - -var parser = function() { - var o = function(k, v, o2, l) { - for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) - ; - return o2; - }, $V0 = [6, 8, 10, 11, 12, 14, 16, 17, 20, 21], $V1 = [1, 9], $V2 = [1, 10], $V3 = [1, 11], $V4 = [1, 12], $V5 = [1, 13], $V6 = [1, 16], $V7 = [1, 17]; - var parser2 = { - trace: function trace() { - }, - yy: {}, - symbols_: { "error": 2, "start": 3, "timeline": 4, "document": 5, "EOF": 6, "line": 7, "SPACE": 8, "statement": 9, "NEWLINE": 10, "title": 11, "acc_title": 12, "acc_title_value": 13, "acc_descr": 14, "acc_descr_value": 15, "acc_descr_multiline_value": 16, "section": 17, "period_statement": 18, "event_statement": 19, "period": 20, "event": 21, "$accept": 0, "$end": 1 }, - terminals_: { 2: "error", 4: "timeline", 6: "EOF", 8: "SPACE", 10: "NEWLINE", 11: "title", 12: "acc_title", 13: "acc_title_value", 14: "acc_descr", 15: "acc_descr_value", 16: "acc_descr_multiline_value", 17: "section", 20: "period", 21: "event" }, - productions_: [0, [3, 3], [5, 0], [5, 2], [7, 2], [7, 1], [7, 1], [7, 1], [9, 1], [9, 2], [9, 2], [9, 1], [9, 1], [9, 1], [9, 1], [18, 1], [19, 1]], - performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { - var $0 = $$.length - 1; - switch (yystate) { - case 1: - return $$[$0 - 1]; - case 2: - this.$ = []; - break; - case 3: - $$[$0 - 1].push($$[$0]); - this.$ = $$[$0 - 1]; - break; - case 4: - case 5: - this.$ = $$[$0]; - break; - case 6: - case 7: - this.$ = []; - break; - case 8: - yy.getCommonDb().setDiagramTitle($$[$0].substr(6)); - this.$ = $$[$0].substr(6); - break; - case 9: - this.$ = $$[$0].trim(); - yy.getCommonDb().setAccTitle(this.$); - break; - case 10: - case 11: - this.$ = $$[$0].trim(); - yy.getCommonDb().setAccDescription(this.$); - break; - case 12: - yy.addSection($$[$0].substr(8)); - this.$ = $$[$0].substr(8); - break; - case 15: - yy.addTask($$[$0], 0, ""); - this.$ = $$[$0]; - break; - case 16: - yy.addEvent($$[$0].substr(2)); - this.$ = $$[$0]; - break; - } - }, - table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, o($V0, [2, 2], { 5: 3 }), { 6: [1, 4], 7: 5, 8: [1, 6], 9: 7, 10: [1, 8], 11: $V1, 12: $V2, 14: $V3, 16: $V4, 17: $V5, 18: 14, 19: 15, 20: $V6, 21: $V7 }, o($V0, [2, 7], { 1: [2, 1] }), o($V0, [2, 3]), { 9: 18, 11: $V1, 12: $V2, 14: $V3, 16: $V4, 17: $V5, 18: 14, 19: 15, 20: $V6, 21: $V7 }, o($V0, [2, 5]), o($V0, [2, 6]), o($V0, [2, 8]), { 13: [1, 19] }, { 15: [1, 20] }, o($V0, [2, 11]), o($V0, [2, 12]), o($V0, [2, 13]), o($V0, [2, 14]), o($V0, [2, 15]), o($V0, [2, 16]), o($V0, [2, 4]), o($V0, [2, 9]), o($V0, [2, 10])], - defaultActions: {}, - parseError: function parseError(str, hash) { - if (hash.recoverable) { - this.trace(str); - } else { - var error = new Error(str); - error.hash = hash; - throw error; - } - }, - parse: function parse(input) { - var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; - var args = lstack.slice.call(arguments, 1); - var lexer2 = Object.create(this.lexer); - var sharedState = { yy: {} }; - for (var k in this.yy) { - if (Object.prototype.hasOwnProperty.call(this.yy, k)) { - sharedState.yy[k] = this.yy[k]; - } - } - lexer2.setInput(input, sharedState.yy); - sharedState.yy.lexer = lexer2; - sharedState.yy.parser = this; - if (typeof lexer2.yylloc == "undefined") { - lexer2.yylloc = {}; - } - var yyloc = lexer2.yylloc; - lstack.push(yyloc); - var ranges = lexer2.options && lexer2.options.ranges; - if (typeof sharedState.yy.parseError === "function") { - this.parseError = sharedState.yy.parseError; - } else { - this.parseError = Object.getPrototypeOf(this).parseError; - } - function lex() { - var token; - token = tstack.pop() || lexer2.lex() || EOF; - if (typeof token !== "number") { - if (token instanceof Array) { - tstack = token; - token = tstack.pop(); - } - token = self.symbols_[token] || token; - } - return token; - } - var symbol, state, action, r, yyval = {}, p, len, newState, expected; - while (true) { - state = stack[stack.length - 1]; - if (this.defaultActions[state]) { - action = this.defaultActions[state]; - } else { - if (symbol === null || typeof symbol == "undefined") { - symbol = lex(); - } - action = table[state] && table[state][symbol]; - } - if (typeof action === "undefined" || !action.length || !action[0]) { - var errStr = ""; - expected = []; - for (p in table[state]) { - if (this.terminals_[p] && p > TERROR) { - expected.push("'" + this.terminals_[p] + "'"); - } - } - if (lexer2.showPosition) { - errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; - } else { - errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); - } - this.parseError(errStr, { - text: lexer2.match, - token: this.terminals_[symbol] || symbol, - line: lexer2.yylineno, - loc: yyloc, - expected - }); - } - if (action[0] instanceof Array && action.length > 1) { - throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); - } - switch (action[0]) { - case 1: - stack.push(symbol); - vstack.push(lexer2.yytext); - lstack.push(lexer2.yylloc); - stack.push(action[1]); - symbol = null; - { - yyleng = lexer2.yyleng; - yytext = lexer2.yytext; - yylineno = lexer2.yylineno; - yyloc = lexer2.yylloc; - } - break; - case 2: - len = this.productions_[action[1]][1]; - yyval.$ = vstack[vstack.length - len]; - yyval._$ = { - first_line: lstack[lstack.length - (len || 1)].first_line, - last_line: lstack[lstack.length - 1].last_line, - first_column: lstack[lstack.length - (len || 1)].first_column, - last_column: lstack[lstack.length - 1].last_column - }; - if (ranges) { - yyval._$.range = [ - lstack[lstack.length - (len || 1)].range[0], - lstack[lstack.length - 1].range[1] - ]; - } - r = this.performAction.apply(yyval, [ - yytext, - yyleng, - yylineno, - sharedState.yy, - action[1], - vstack, - lstack - ].concat(args)); - if (typeof r !== "undefined") { - return r; - } - if (len) { - stack = stack.slice(0, -1 * len * 2); - vstack = vstack.slice(0, -1 * len); - lstack = lstack.slice(0, -1 * len); - } - stack.push(this.productions_[action[1]][0]); - vstack.push(yyval.$); - lstack.push(yyval._$); - newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; - stack.push(newState); - break; - case 3: - return true; - } - } - return true; - } - }; - var lexer = function() { - var lexer2 = { - EOF: 1, - parseError: function parseError(str, hash) { - if (this.yy.parser) { - this.yy.parser.parseError(str, hash); - } else { - throw new Error(str); - } - }, - // resets the lexer, sets new input - setInput: function(input, yy) { - this.yy = yy || this.yy || {}; - this._input = input; - this._more = this._backtrack = this.done = false; - this.yylineno = this.yyleng = 0; - this.yytext = this.matched = this.match = ""; - this.conditionStack = ["INITIAL"]; - this.yylloc = { - first_line: 1, - first_column: 0, - last_line: 1, - last_column: 0 - }; - if (this.options.ranges) { - this.yylloc.range = [0, 0]; - } - this.offset = 0; - return this; - }, - // consumes and returns one char from the input - input: function() { - var ch = this._input[0]; - this.yytext += ch; - this.yyleng++; - this.offset++; - this.match += ch; - this.matched += ch; - var lines = ch.match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno++; - this.yylloc.last_line++; - } else { - this.yylloc.last_column++; - } - if (this.options.ranges) { - this.yylloc.range[1]++; - } - this._input = this._input.slice(1); - return ch; - }, - // unshifts one char (or a string) into the input - unput: function(ch) { - var len = ch.length; - var lines = ch.split(/(?:\r\n?|\n)/g); - this._input = ch + this._input; - this.yytext = this.yytext.substr(0, this.yytext.length - len); - this.offset -= len; - var oldLines = this.match.split(/(?:\r\n?|\n)/g); - this.match = this.match.substr(0, this.match.length - 1); - this.matched = this.matched.substr(0, this.matched.length - 1); - if (lines.length - 1) { - this.yylineno -= lines.length - 1; - } - var r = this.yylloc.range; - this.yylloc = { - first_line: this.yylloc.first_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.first_column, - last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len - }; - if (this.options.ranges) { - this.yylloc.range = [r[0], r[0] + this.yyleng - len]; - } - this.yyleng = this.yytext.length; - return this; - }, - // When called from action, caches matched text and appends it on next action - more: function() { - this._more = true; - return this; - }, - // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. - reject: function() { - if (this.options.backtrack_lexer) { - this._backtrack = true; - } else { - return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), { - text: "", - token: null, - line: this.yylineno - }); - } - return this; - }, - // retain first n characters of the match - less: function(n) { - this.unput(this.match.slice(n)); - }, - // displays already matched input, i.e. for error messages - pastInput: function() { - var past = this.matched.substr(0, this.matched.length - this.match.length); - return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); - }, - // displays upcoming input, i.e. for error messages - upcomingInput: function() { - var next = this.match; - if (next.length < 20) { - next += this._input.substr(0, 20 - next.length); - } - return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); - }, - // displays the character position where the lexing error occurred, i.e. for error messages - showPosition: function() { - var pre = this.pastInput(); - var c = new Array(pre.length + 1).join("-"); - return pre + this.upcomingInput() + "\n" + c + "^"; - }, - // test the lexed token: return FALSE when not a match, otherwise return token - test_match: function(match, indexed_rule) { - var token, lines, backup; - if (this.options.backtrack_lexer) { - backup = { - yylineno: this.yylineno, - yylloc: { - first_line: this.yylloc.first_line, - last_line: this.last_line, - first_column: this.yylloc.first_column, - last_column: this.yylloc.last_column - }, - yytext: this.yytext, - match: this.match, - matches: this.matches, - matched: this.matched, - yyleng: this.yyleng, - offset: this.offset, - _more: this._more, - _input: this._input, - yy: this.yy, - conditionStack: this.conditionStack.slice(0), - done: this.done - }; - if (this.options.ranges) { - backup.yylloc.range = this.yylloc.range.slice(0); - } - } - lines = match[0].match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno += lines.length; - } - this.yylloc = { - first_line: this.yylloc.last_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.last_column, - last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length - }; - this.yytext += match[0]; - this.match += match[0]; - this.matches = match; - this.yyleng = this.yytext.length; - if (this.options.ranges) { - this.yylloc.range = [this.offset, this.offset += this.yyleng]; - } - this._more = false; - this._backtrack = false; - this._input = this._input.slice(match[0].length); - this.matched += match[0]; - token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); - if (this.done && this._input) { - this.done = false; - } - if (token) { - return token; - } else if (this._backtrack) { - for (var k in backup) { - this[k] = backup[k]; - } - return false; - } - return false; - }, - // return next match in input - next: function() { - if (this.done) { - return this.EOF; - } - if (!this._input) { - this.done = true; - } - var token, match, tempMatch, index; - if (!this._more) { - this.yytext = ""; - this.match = ""; - } - var rules = this._currentRules(); - for (var i = 0; i < rules.length; i++) { - tempMatch = this._input.match(this.rules[rules[i]]); - if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { - match = tempMatch; - index = i; - if (this.options.backtrack_lexer) { - token = this.test_match(tempMatch, rules[i]); - if (token !== false) { - return token; - } else if (this._backtrack) { - match = false; - continue; - } else { - return false; - } - } else if (!this.options.flex) { - break; - } - } - } - if (match) { - token = this.test_match(match, rules[index]); - if (token !== false) { - return token; - } - return false; - } - if (this._input === "") { - return this.EOF; - } else { - return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { - text: "", - token: null, - line: this.yylineno - }); - } - }, - // return next match that has a token - lex: function lex() { - var r = this.next(); - if (r) { - return r; - } else { - return this.lex(); - } - }, - // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) - begin: function begin(condition) { - this.conditionStack.push(condition); - }, - // pop the previously active lexer condition state off the condition stack - popState: function popState() { - var n = this.conditionStack.length - 1; - if (n > 0) { - return this.conditionStack.pop(); - } else { - return this.conditionStack[0]; - } - }, - // produce the lexer rule set which is active for the currently active lexer condition state - _currentRules: function _currentRules() { - if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { - return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; - } else { - return this.conditions["INITIAL"].rules; - } - }, - // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available - topState: function topState(n) { - n = this.conditionStack.length - 1 - Math.abs(n || 0); - if (n >= 0) { - return this.conditionStack[n]; - } else { - return "INITIAL"; - } - }, - // alias for begin(condition) - pushState: function pushState(condition) { - this.begin(condition); - }, - // return the number of states currently on the stack - stateStackSize: function stateStackSize() { - return this.conditionStack.length; - }, - options: { "case-insensitive": true }, - performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { - switch ($avoiding_name_collisions) { - case 0: - break; - case 1: - break; - case 2: - return 10; - case 3: - break; - case 4: - break; - case 5: - return 4; - case 6: - return 11; - case 7: - this.begin("acc_title"); - return 12; - case 8: - this.popState(); - return "acc_title_value"; - case 9: - this.begin("acc_descr"); - return 14; - case 10: - this.popState(); - return "acc_descr_value"; - case 11: - this.begin("acc_descr_multiline"); - break; - case 12: - this.popState(); - break; - case 13: - return "acc_descr_multiline_value"; - case 14: - return 17; - case 15: - return 21; - case 16: - return 20; - case 17: - return 6; - case 18: - return "INVALID"; - } - }, - rules: [/^(?:%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:#[^\n]*)/i, /^(?:timeline\b)/i, /^(?:title\s[^#\n;]+)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:section\s[^#:\n;]+)/i, /^(?::\s[^#:\n;]+)/i, /^(?:[^#:\n;]+)/i, /^(?:$)/i, /^(?:.)/i], - conditions: { "acc_descr_multiline": { "rules": [12, 13], "inclusive": false }, "acc_descr": { "rules": [10], "inclusive": false }, "acc_title": { "rules": [8], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 3, 4, 5, 6, 7, 9, 11, 14, 15, 16, 17, 18], "inclusive": true } } - }; - return lexer2; - }(); - parser2.lexer = lexer; - function Parser() { - this.yy = {}; - } - Parser.prototype = parser2; - parser2.Parser = Parser; - return new Parser(); -}(); -parser.parser = parser; -const parser$1 = parser; -let currentSection = ""; -let currentTaskId = 0; -const sections = []; -const tasks = []; -const rawTasks = []; -const getCommonDb = () => _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.L; -const clear = function() { - sections.length = 0; - tasks.length = 0; - currentSection = ""; - rawTasks.length = 0; - (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.v)(); -}; -const addSection = function(txt) { - currentSection = txt; - sections.push(txt); -}; -const getSections = function() { - return sections; -}; -const getTasks = function() { - let allItemsProcessed = compileTasks(); - const maxDepth = 100; - let iterationCount = 0; - while (!allItemsProcessed && iterationCount < maxDepth) { - allItemsProcessed = compileTasks(); - iterationCount++; - } - tasks.push(...rawTasks); - return tasks; -}; -const addTask = function(period, length, event) { - const rawTask = { - id: currentTaskId++, - section: currentSection, - type: currentSection, - task: period, - score: length ? length : 0, - //if event is defined, then add it the events array - events: event ? [event] : [] - }; - rawTasks.push(rawTask); -}; -const addEvent = function(event) { - const currentTask = rawTasks.find((task) => task.id === currentTaskId - 1); - currentTask.events.push(event); -}; -const addTaskOrg = function(descr) { - const newTask = { - section: currentSection, - type: currentSection, - description: descr, - task: descr, - classes: [] - }; - tasks.push(newTask); -}; -const compileTasks = function() { - const compileTask = function(pos) { - return rawTasks[pos].processed; - }; - let allProcessed = true; - for (const [i, rawTask] of rawTasks.entries()) { - compileTask(i); - allProcessed = allProcessed && rawTask.processed; - } - return allProcessed; -}; -const timelineDb = { - clear, - getCommonDb, - addSection, - getSections, - getTasks, - addTask, - addTaskOrg, - addEvent -}; -const db = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ - __proto__: null, - addEvent, - addSection, - addTask, - addTaskOrg, - clear, - default: timelineDb, - getCommonDb, - getSections, - getTasks -}, Symbol.toStringTag, { value: "Module" })); -const MAX_SECTIONS = 12; -const drawRect = function(elem, rectData) { - const rectElem = elem.append("rect"); - rectElem.attr("x", rectData.x); - rectElem.attr("y", rectData.y); - rectElem.attr("fill", rectData.fill); - rectElem.attr("stroke", rectData.stroke); - rectElem.attr("width", rectData.width); - rectElem.attr("height", rectData.height); - rectElem.attr("rx", rectData.rx); - rectElem.attr("ry", rectData.ry); - if (rectData.class !== void 0) { - rectElem.attr("class", rectData.class); - } - return rectElem; -}; -const drawFace = function(element, faceData) { - const radius = 15; - const circleElement = element.append("circle").attr("cx", faceData.cx).attr("cy", faceData.cy).attr("class", "face").attr("r", radius).attr("stroke-width", 2).attr("overflow", "visible"); - const face = element.append("g"); - face.append("circle").attr("cx", faceData.cx - radius / 3).attr("cy", faceData.cy - radius / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666"); - face.append("circle").attr("cx", faceData.cx + radius / 3).attr("cy", faceData.cy - radius / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666"); - function smile(face2) { - const arc$1 = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .arc */ .JLW)().startAngle(Math.PI / 2).endAngle(3 * (Math.PI / 2)).innerRadius(radius / 2).outerRadius(radius / 2.2); - face2.append("path").attr("class", "mouth").attr("d", arc$1).attr("transform", "translate(" + faceData.cx + "," + (faceData.cy + 2) + ")"); - } - function sad(face2) { - const arc$1 = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .arc */ .JLW)().startAngle(3 * Math.PI / 2).endAngle(5 * (Math.PI / 2)).innerRadius(radius / 2).outerRadius(radius / 2.2); - face2.append("path").attr("class", "mouth").attr("d", arc$1).attr("transform", "translate(" + faceData.cx + "," + (faceData.cy + 7) + ")"); - } - function ambivalent(face2) { - face2.append("line").attr("class", "mouth").attr("stroke", 2).attr("x1", faceData.cx - 5).attr("y1", faceData.cy + 7).attr("x2", faceData.cx + 5).attr("y2", faceData.cy + 7).attr("class", "mouth").attr("stroke-width", "1px").attr("stroke", "#666"); - } - if (faceData.score > 3) { - smile(face); - } else if (faceData.score < 3) { - sad(face); - } else { - ambivalent(face); - } - return circleElement; -}; -const drawCircle = function(element, circleData) { - const circleElement = element.append("circle"); - circleElement.attr("cx", circleData.cx); - circleElement.attr("cy", circleData.cy); - circleElement.attr("class", "actor-" + circleData.pos); - circleElement.attr("fill", circleData.fill); - circleElement.attr("stroke", circleData.stroke); - circleElement.attr("r", circleData.r); - if (circleElement.class !== void 0) { - circleElement.attr("class", circleElement.class); - } - if (circleData.title !== void 0) { - circleElement.append("title").text(circleData.title); - } - return circleElement; -}; -const drawText = function(elem, textData) { - const nText = textData.text.replace(//gi, " "); - const textElem = elem.append("text"); - textElem.attr("x", textData.x); - textElem.attr("y", textData.y); - textElem.attr("class", "legend"); - textElem.style("text-anchor", textData.anchor); - if (textData.class !== void 0) { - textElem.attr("class", textData.class); - } - const span = textElem.append("tspan"); - span.attr("x", textData.x + textData.textMargin * 2); - span.text(nText); - return textElem; -}; -const drawLabel = function(elem, txtObject) { - function genPoints(x, y, width, height, cut) { - return x + "," + y + " " + (x + width) + "," + y + " " + (x + width) + "," + (y + height - cut) + " " + (x + width - cut * 1.2) + "," + (y + height) + " " + x + "," + (y + height); - } - const polygon = elem.append("polygon"); - polygon.attr("points", genPoints(txtObject.x, txtObject.y, 50, 20, 7)); - polygon.attr("class", "labelBox"); - txtObject.y = txtObject.y + txtObject.labelMargin; - txtObject.x = txtObject.x + 0.5 * txtObject.labelMargin; - drawText(elem, txtObject); -}; -const drawSection = function(elem, section, conf) { - const g = elem.append("g"); - const rect = getNoteRect(); - rect.x = section.x; - rect.y = section.y; - rect.fill = section.fill; - rect.width = conf.width; - rect.height = conf.height; - rect.class = "journey-section section-type-" + section.num; - rect.rx = 3; - rect.ry = 3; - drawRect(g, rect); - _drawTextCandidateFunc(conf)( - section.text, - g, - rect.x, - rect.y, - rect.width, - rect.height, - { class: "journey-section section-type-" + section.num }, - conf, - section.colour - ); -}; -let taskCount = -1; -const drawTask = function(elem, task, conf) { - const center = task.x + conf.width / 2; - const g = elem.append("g"); - taskCount++; - const maxHeight = 300 + 5 * 30; - g.append("line").attr("id", "task" + taskCount).attr("x1", center).attr("y1", task.y).attr("x2", center).attr("y2", maxHeight).attr("class", "task-line").attr("stroke-width", "1px").attr("stroke-dasharray", "4 2").attr("stroke", "#666"); - drawFace(g, { - cx: center, - cy: 300 + (5 - task.score) * 30, - score: task.score - }); - const rect = getNoteRect(); - rect.x = task.x; - rect.y = task.y; - rect.fill = task.fill; - rect.width = conf.width; - rect.height = conf.height; - rect.class = "task task-type-" + task.num; - rect.rx = 3; - rect.ry = 3; - drawRect(g, rect); - task.x + 14; - _drawTextCandidateFunc(conf)( - task.task, - g, - rect.x, - rect.y, - rect.width, - rect.height, - { class: "task" }, - conf, - task.colour - ); -}; -const drawBackgroundRect = function(elem, bounds) { - const rectElem = drawRect(elem, { - x: bounds.startx, - y: bounds.starty, - width: bounds.stopx - bounds.startx, - height: bounds.stopy - bounds.starty, - fill: bounds.fill, - class: "rect" - }); - rectElem.lower(); -}; -const getTextObj = function() { - return { - x: 0, - y: 0, - fill: void 0, - "text-anchor": "start", - width: 100, - height: 100, - textMargin: 0, - rx: 0, - ry: 0 - }; -}; -const getNoteRect = function() { - return { - x: 0, - y: 0, - width: 100, - anchor: "start", - height: 100, - rx: 0, - ry: 0 - }; -}; -const _drawTextCandidateFunc = function() { - function byText(content, g, x, y, width, height, textAttrs, colour) { - const text = g.append("text").attr("x", x + width / 2).attr("y", y + height / 2 + 5).style("font-color", colour).style("text-anchor", "middle").text(content); - _setTextAttrs(text, textAttrs); - } - function byTspan(content, g, x, y, width, height, textAttrs, conf, colour) { - const { taskFontSize, taskFontFamily } = conf; - const lines = content.split(//gi); - for (let i = 0; i < lines.length; i++) { - const dy = i * taskFontSize - taskFontSize * (lines.length - 1) / 2; - const text = g.append("text").attr("x", x + width / 2).attr("y", y).attr("fill", colour).style("text-anchor", "middle").style("font-size", taskFontSize).style("font-family", taskFontFamily); - text.append("tspan").attr("x", x + width / 2).attr("dy", dy).text(lines[i]); - text.attr("y", y + height / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"); - _setTextAttrs(text, textAttrs); - } - } - function byFo(content, g, x, y, width, height, textAttrs, conf) { - const body = g.append("switch"); - const f = body.append("foreignObject").attr("x", x).attr("y", y).attr("width", width).attr("height", height).attr("position", "fixed"); - const text = f.append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%"); - text.append("div").attr("class", "label").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(content); - byTspan(content, body, x, y, width, height, textAttrs, conf); - _setTextAttrs(text, textAttrs); - } - function _setTextAttrs(toText, fromTextAttrsDict) { - for (const key in fromTextAttrsDict) { - if (key in fromTextAttrsDict) { - toText.attr(key, fromTextAttrsDict[key]); - } - } - } - return function(conf) { - return conf.textPlacement === "fo" ? byFo : conf.textPlacement === "old" ? byText : byTspan; - }; -}(); -const initGraphics = function(graphics) { - graphics.append("defs").append("marker").attr("id", "arrowhead").attr("refX", 5).attr("refY", 2).attr("markerWidth", 6).attr("markerHeight", 4).attr("orient", "auto").append("path").attr("d", "M 0,0 V 4 L6,2 Z"); -}; -function wrap(text, width) { - text.each(function() { - var text2 = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(this), words = text2.text().split(/(\s+|
    )/).reverse(), word, line = [], lineHeight = 1.1, y = text2.attr("y"), dy = parseFloat(text2.attr("dy")), tspan = text2.text(null).append("tspan").attr("x", 0).attr("y", y).attr("dy", dy + "em"); - for (let j = 0; j < words.length; j++) { - word = words[words.length - 1 - j]; - line.push(word); - tspan.text(line.join(" ").trim()); - if (tspan.node().getComputedTextLength() > width || word === "
    ") { - line.pop(); - tspan.text(line.join(" ").trim()); - if (word === "
    ") { - line = [""]; - } else { - line = [word]; - } - tspan = text2.append("tspan").attr("x", 0).attr("y", y).attr("dy", lineHeight + "em").text(word); - } - } - }); -} -const drawNode = function(elem, node, fullSection, conf) { - const section = fullSection % MAX_SECTIONS - 1; - const nodeElem = elem.append("g"); - node.section = section; - nodeElem.attr( - "class", - (node.class ? node.class + " " : "") + "timeline-node " + ("section-" + section) - ); - const bkgElem = nodeElem.append("g"); - const textElem = nodeElem.append("g"); - const txt = textElem.append("text").text(node.descr).attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle").call(wrap, node.width); - const bbox = txt.node().getBBox(); - const fontSize = conf.fontSize && conf.fontSize.replace ? conf.fontSize.replace("px", "") : conf.fontSize; - node.height = bbox.height + fontSize * 1.1 * 0.5 + node.padding; - node.height = Math.max(node.height, node.maxHeight); - node.width = node.width + 2 * node.padding; - textElem.attr("transform", "translate(" + node.width / 2 + ", " + node.padding / 2 + ")"); - defaultBkg(bkgElem, node, section); - return node; -}; -const getVirtualNodeHeight = function(elem, node, conf) { - const textElem = elem.append("g"); - const txt = textElem.append("text").text(node.descr).attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle").call(wrap, node.width); - const bbox = txt.node().getBBox(); - const fontSize = conf.fontSize && conf.fontSize.replace ? conf.fontSize.replace("px", "") : conf.fontSize; - textElem.remove(); - return bbox.height + fontSize * 1.1 * 0.5 + node.padding; -}; -const defaultBkg = function(elem, node, section) { - const rd = 5; - elem.append("path").attr("id", "node-" + node.id).attr("class", "node-bkg node-" + node.type).attr( - "d", - `M0 ${node.height - rd} v${-node.height + 2 * rd} q0,-5 5,-5 h${node.width - 2 * rd} q5,0 5,5 v${node.height - rd} H0 Z` - ); - elem.append("line").attr("class", "node-line-" + section).attr("x1", 0).attr("y1", node.height).attr("x2", node.width).attr("y2", node.height); -}; -const svgDraw = { - drawRect, - drawCircle, - drawSection, - drawText, - drawLabel, - drawTask, - drawBackgroundRect, - getTextObj, - getNoteRect, - initGraphics, - drawNode, - getVirtualNodeHeight -}; -const draw = function(text, id, version, diagObj) { - var _a, _b; - const conf = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.c)(); - const LEFT_MARGIN = conf.leftMargin ?? 50; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("timeline", diagObj.db); - const securityLevel = conf.securityLevel; - let sandboxElement; - if (securityLevel === "sandbox") { - sandboxElement = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)("#i" + id); - } - const root = securityLevel === "sandbox" ? (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(sandboxElement.nodes()[0].contentDocument.body) : (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)("body"); - const svg = root.select("#" + id); - svg.append("g"); - const tasks2 = diagObj.db.getTasks(); - const title = diagObj.db.getCommonDb().getDiagramTitle(); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("task", tasks2); - svgDraw.initGraphics(svg); - const sections2 = diagObj.db.getSections(); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("sections", sections2); - let maxSectionHeight = 0; - let maxTaskHeight = 0; - let depthY = 0; - let sectionBeginY = 0; - let masterX = 50 + LEFT_MARGIN; - let masterY = 50; - sectionBeginY = 50; - let sectionNumber = 0; - let hasSections = true; - sections2.forEach(function(section) { - const sectionNode = { - number: sectionNumber, - descr: section, - section: sectionNumber, - width: 150, - padding: 20, - maxHeight: maxSectionHeight - }; - const sectionHeight = svgDraw.getVirtualNodeHeight(svg, sectionNode, conf); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("sectionHeight before draw", sectionHeight); - maxSectionHeight = Math.max(maxSectionHeight, sectionHeight + 20); - }); - let maxEventCount = 0; - let maxEventLineLength = 0; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("tasks.length", tasks2.length); - for (const [i, task] of tasks2.entries()) { - const taskNode = { - number: i, - descr: task, - section: task.section, - width: 150, - padding: 20, - maxHeight: maxTaskHeight - }; - const taskHeight = svgDraw.getVirtualNodeHeight(svg, taskNode, conf); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("taskHeight before draw", taskHeight); - maxTaskHeight = Math.max(maxTaskHeight, taskHeight + 20); - maxEventCount = Math.max(maxEventCount, task.events.length); - let maxEventLineLengthTemp = 0; - for (let j = 0; j < task.events.length; j++) { - const event = task.events[j]; - const eventNode = { - descr: event, - section: task.section, - number: task.section, - width: 150, - padding: 20, - maxHeight: 50 - }; - maxEventLineLengthTemp += svgDraw.getVirtualNodeHeight(svg, eventNode, conf); - } - maxEventLineLength = Math.max(maxEventLineLength, maxEventLineLengthTemp); - } - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("maxSectionHeight before draw", maxSectionHeight); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("maxTaskHeight before draw", maxTaskHeight); - if (sections2 && sections2.length > 0) { - sections2.forEach((section) => { - const tasksForSection = tasks2.filter((task) => task.section === section); - const sectionNode = { - number: sectionNumber, - descr: section, - section: sectionNumber, - width: 200 * Math.max(tasksForSection.length, 1) - 50, - padding: 20, - maxHeight: maxSectionHeight - }; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("sectionNode", sectionNode); - const sectionNodeWrapper = svg.append("g"); - const node = svgDraw.drawNode(sectionNodeWrapper, sectionNode, sectionNumber, conf); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("sectionNode output", node); - sectionNodeWrapper.attr("transform", `translate(${masterX}, ${sectionBeginY})`); - masterY += maxSectionHeight + 50; - if (tasksForSection.length > 0) { - drawTasks( - svg, - tasksForSection, - sectionNumber, - masterX, - masterY, - maxTaskHeight, - conf, - maxEventCount, - maxEventLineLength, - maxSectionHeight, - false - ); - } - masterX += 200 * Math.max(tasksForSection.length, 1); - masterY = sectionBeginY; - sectionNumber++; - }); - } else { - hasSections = false; - drawTasks( - svg, - tasks2, - sectionNumber, - masterX, - masterY, - maxTaskHeight, - conf, - maxEventCount, - maxEventLineLength, - maxSectionHeight, - true - ); - } - const box = svg.node().getBBox(); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("bounds", box); - if (title) { - svg.append("text").text(title).attr("x", box.width / 2 - LEFT_MARGIN).attr("font-size", "4ex").attr("font-weight", "bold").attr("y", 20); - } - depthY = hasSections ? maxSectionHeight + maxTaskHeight + 150 : maxTaskHeight + 100; - const lineWrapper = svg.append("g").attr("class", "lineWrapper"); - lineWrapper.append("line").attr("x1", LEFT_MARGIN).attr("y1", depthY).attr("x2", box.width + 3 * LEFT_MARGIN).attr("y2", depthY).attr("stroke-width", 4).attr("stroke", "black").attr("marker-end", "url(#arrowhead)"); - (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.o)( - void 0, - svg, - ((_a = conf.timeline) == null ? void 0 : _a.padding) ?? 50, - ((_b = conf.timeline) == null ? void 0 : _b.useMaxWidth) ?? false - ); -}; -const drawTasks = function(diagram2, tasks2, sectionColor, masterX, masterY, maxTaskHeight, conf, maxEventCount, maxEventLineLength, maxSectionHeight, isWithoutSections) { - var _a; - for (const task of tasks2) { - const taskNode = { - descr: task.task, - section: sectionColor, - number: sectionColor, - width: 150, - padding: 20, - maxHeight: maxTaskHeight - }; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("taskNode", taskNode); - const taskWrapper = diagram2.append("g").attr("class", "taskWrapper"); - const node = svgDraw.drawNode(taskWrapper, taskNode, sectionColor, conf); - const taskHeight = node.height; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("taskHeight after draw", taskHeight); - taskWrapper.attr("transform", `translate(${masterX}, ${masterY})`); - maxTaskHeight = Math.max(maxTaskHeight, taskHeight); - if (task.events) { - const lineWrapper = diagram2.append("g").attr("class", "lineWrapper"); - let lineLength = maxTaskHeight; - masterY += 100; - lineLength = lineLength + drawEvents(diagram2, task.events, sectionColor, masterX, masterY, conf); - masterY -= 100; - lineWrapper.append("line").attr("x1", masterX + 190 / 2).attr("y1", masterY + maxTaskHeight).attr("x2", masterX + 190 / 2).attr( - "y2", - masterY + maxTaskHeight + (isWithoutSections ? maxTaskHeight : maxSectionHeight) + maxEventLineLength + 120 - ).attr("stroke-width", 2).attr("stroke", "black").attr("marker-end", "url(#arrowhead)").attr("stroke-dasharray", "5,5"); - } - masterX = masterX + 200; - if (isWithoutSections && !((_a = conf.timeline) == null ? void 0 : _a.disableMulticolor)) { - sectionColor++; - } - } - masterY = masterY - 10; -}; -const drawEvents = function(diagram2, events, sectionColor, masterX, masterY, conf) { - let maxEventHeight = 0; - const eventBeginY = masterY; - masterY = masterY + 100; - for (const event of events) { - const eventNode = { - descr: event, - section: sectionColor, - number: sectionColor, - width: 150, - padding: 20, - maxHeight: 50 - }; - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("eventNode", eventNode); - const eventWrapper = diagram2.append("g").attr("class", "eventWrapper"); - const node = svgDraw.drawNode(eventWrapper, eventNode, sectionColor, conf); - const eventHeight = node.height; - maxEventHeight = maxEventHeight + eventHeight; - eventWrapper.attr("transform", `translate(${masterX}, ${masterY})`); - masterY = masterY + 10 + eventHeight; - } - masterY = eventBeginY; - return maxEventHeight; -}; -const renderer = { - setConf: () => { - }, - draw -}; -const genSections = (options) => { - let sections2 = ""; - for (let i = 0; i < options.THEME_COLOR_LIMIT; i++) { - options["lineColor" + i] = options["lineColor" + i] || options["cScaleInv" + i]; - if ((0,khroma__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A)(options["lineColor" + i])) { - options["lineColor" + i] = (0,khroma__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .A)(options["lineColor" + i], 20); - } else { - options["lineColor" + i] = (0,khroma__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .A)(options["lineColor" + i], 20); - } - } - for (let i = 0; i < options.THEME_COLOR_LIMIT; i++) { - const sw = "" + (17 - 3 * i); - sections2 += ` - .section-${i - 1} rect, .section-${i - 1} path, .section-${i - 1} circle, .section-${i - 1} path { - fill: ${options["cScale" + i]}; - } - .section-${i - 1} text { - fill: ${options["cScaleLabel" + i]}; - } - .node-icon-${i - 1} { - font-size: 40px; - color: ${options["cScaleLabel" + i]}; - } - .section-edge-${i - 1}{ - stroke: ${options["cScale" + i]}; - } - .edge-depth-${i - 1}{ - stroke-width: ${sw}; - } - .section-${i - 1} line { - stroke: ${options["cScaleInv" + i]} ; - stroke-width: 3; - } - - .lineWrapper line{ - stroke: ${options["cScaleLabel" + i]} ; - } - - .disabled, .disabled circle, .disabled text { - fill: lightgray; - } - .disabled text { - fill: #efefef; - } - `; - } - return sections2; -}; -const getStyles = (options) => ` - .edge { - stroke-width: 3; - } - ${genSections(options)} - .section-root rect, .section-root path, .section-root circle { - fill: ${options.git0}; - } - .section-root text { - fill: ${options.gitBranchLabel0}; - } - .icon-container { - height:100%; - display: flex; - justify-content: center; - align-items: center; - } - .edge { - fill: none; - } - .eventWrapper { - filter: brightness(120%); - } -`; -const styles = getStyles; -const diagram = { - db, - renderer, - parser: parser$1, - styles -}; - - - -/***/ }) - -}; -; \ No newline at end of file diff --git a/assets/js/9720.ff368bab.js b/assets/js/9720.ff368bab.js new file mode 100644 index 000000000000..d4e989ec4974 --- /dev/null +++ b/assets/js/9720.ff368bab.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9720],{39720:(e,c,r)=>{r.d(c,{createArchitectureServices:()=>s.S});var s=r(49936);r(19369)}}]); \ No newline at end of file diff --git a/assets/js/979a04e7.bea58416.js b/assets/js/979a04e7.bea58416.js new file mode 100644 index 000000000000..c281d8882aab --- /dev/null +++ b/assets/js/979a04e7.bea58416.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3705],{15554:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>o,default:()=>h,frontMatter:()=>i,metadata:()=>s,toc:()=>l});const s=JSON.parse('{"id":"general/dune-analytics/parachain-dashboards/bifrost-dashboards","title":"Bifrost Dashboards","description":"Bifrost is a decentralized finance hub and liquid staking platform.","source":"@site/../docs/general/dune-analytics/parachain-dashboards/bifrost-dashboards.md","sourceDirName":"general/dune-analytics/parachain-dashboards","slug":"/general/dune-analytics/bifrost-dashboards","permalink":"/docs/general/dune-analytics/bifrost-dashboards","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/parachain-dashboards/bifrost-dashboards.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1727178265000,"frontMatter":{"id":"bifrost-dashboards","title":"Bifrost Dashboards","sidebar_label":"Bifrost","description":"Bifrost is a decentralized finance hub and liquid staking platform.","keywords":["polkadot","dashboard","dune","bifrost","DeFi"],"slug":"../bifrost-dashboards"},"sidebar":"docs","previous":{"title":"Astar","permalink":"/docs/general/dune-analytics/astar-dashboards"},"next":{"title":"BridgeHub","permalink":"/docs/general/dune-analytics/bridgehub-dashboards"}}');var a=t(74848),r=t(28453);const i={id:"bifrost-dashboards",title:"Bifrost Dashboards",sidebar_label:"Bifrost",description:"Bifrost is a decentralized finance hub and liquid staking platform.",keywords:["polkadot","dashboard","dune","bifrost","DeFi"],slug:"../bifrost-dashboards"},o="Bifrost Dashboards",d={},l=[{value:"Overview",id:"overview",level:2},{value:"Featured Dashboards on Dune",id:"featured-dashboards-on-dune",level:2},{value:"Key Tables",id:"key-tables",level:2},{value:"Useful Queries",id:"useful-queries",level:2},{value:"Getting Started with Queries",id:"getting-started-with-queries",level:2}];function c(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,r.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.header,{children:(0,a.jsx)(n.h1,{id:"bifrost-dashboards",children:"Bifrost Dashboards"})}),"\n",(0,a.jsx)(n.h2,{id:"overview",children:"Overview"}),"\n",(0,a.jsx)(n.p,{children:"Bifrost is a decentralized finance hub and liquid staking platform on the Polkadot network and other\nchains. Users obtain a liquid staking token, vToken, by staking their native tokens. The vToken can\nthen be used in DeFi applications, such as lending, borrowing, and trading."}),"\n",(0,a.jsx)(n.p,{children:"On Polkadot, users can stake DOT, ASTR, FIL, GLMR, Manta at the moment."}),"\n",(0,a.jsx)(n.p,{children:"They can also trade their vTokens in a DEX (stableswap) operating on the Bifrost parachain."}),"\n",(0,a.jsx)(n.h2,{id:"featured-dashboards-on-dune",children:"Featured Dashboards on Dune"}),"\n",(0,a.jsx)(n.p,{children:"Here you will find a variety of dashboards that help visualize data from the Bifrost parachain:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.a,{href:"https://dune.com/substrate/bifrost",children:"bifrost on Polkadot"}),": This dashboard provides a comprehensive\nview of staking, value locked, and trading on Bifrost parachain."]}),"\n"]}),"\n",(0,a.jsx)(n.h2,{id:"key-tables",children:"Key Tables"}),"\n",(0,a.jsx)(n.p,{children:"Data from the bifrost parachain is organized into several key tables:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.code,{children:"bifrost.balances"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.code,{children:"bifrost.blocks"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.code,{children:"bifrost.calls"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.code,{children:"bifrost.events"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.code,{children:"bifrost.extrinsics"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.code,{children:"bifrost.transfers"})}),"\n"]}),"\n",(0,a.jsxs)(n.p,{children:["The ",(0,a.jsx)(n.code,{children:"bifrost.traces"})," table is created by a snapshot script utilizing Bifrost API calls to fetch\naccurate values which would be difficult to calculate from the blockchain events alone."]}),"\n",(0,a.jsxs)(n.p,{children:["Start building your own queries using granular data on Dune\n",(0,a.jsx)(n.a,{href:"https://dune.com/queries?category=canonical&namespace=bifrost",children:"here"}),"."]}),"\n",(0,a.jsx)(n.h2,{id:"useful-queries",children:"Useful Queries"}),"\n",(0,a.jsx)(n.p,{children:"Some useful queries for Bifrost are provided:"}),"\n",(0,a.jsxs)(n.table,{children:[(0,a.jsx)(n.thead,{children:(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.th,{children:"Subject Area"}),(0,a.jsx)(n.th,{children:"Query"}),(0,a.jsx)(n.th,{children:"Description"})]})}),(0,a.jsxs)(n.tbody,{children:[(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:"Liquid Staking"}),(0,a.jsx)(n.td,{children:(0,a.jsx)(n.a,{href:"https://dune.com/queries/3571958",children:"query 3571958"})}),(0,a.jsx)(n.td,{children:"Provides amount of vTokens and therefore tokens staked (1=1) Used HydraDX oracle for USD values."})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:"Bifrost Stableswap"}),(0,a.jsx)(n.td,{children:(0,a.jsx)(n.a,{href:"https://dune.com/queries/3532234",children:"query 3532234"})}),(0,a.jsx)(n.td,{children:"Provides price and volume for stableswap pairs, e.g. DOT <-> VDOT"})]})]})]}),"\n",(0,a.jsx)(n.p,{children:"Dune users are encouraged to study the source code of the queries, including parts of a query that\nmay have been commented out for future use."}),"\n",(0,a.jsx)(n.p,{children:"Uncommenting these parts may accelerate your effort of adopting a query to a slightly different use\ncase."}),"\n",(0,a.jsx)(n.h2,{id:"getting-started-with-queries",children:"Getting Started with Queries"}),"\n",(0,a.jsx)(n.p,{children:"To get started with querying data from Bifrost, you are welcome to use the mentioned queries. You\ncan also use the following DuneSQL queries as examples:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-sql",metastring:'title="Bifrost Loan Market Data" showLineNumbers',children:"WITH A AS (\n SELECT\n block_time,\n event_id,\n section,\n method,\n JSON_ARRAY_LENGTH(data) AS array_length,\n JSON_VALUE(data, 'strict $[0]') AS account,\n -- JSON_QUERY(data, 'strict $[1]') AS value_1,\n -- JSON_VALUE(data, 'strict $[2]') AS some_amount,\n JSON_QUERY(data, 'strict $[3]') AS token_in,\n JSON_QUERY(data, 'strict $[4]') AS token_out,\n CAST(JSON_VALUE(data, 'strict $[5]') AS UINT256) AS amount_in,\n CAST(JSON_VALUE(data, 'strict $[9]') AS UINT256) AS amount_out\n -- JSON_QUERY(data, 'strict $[7]') AS value_7,\n -- JSON_QUERY(data, 'strict $[8]') AS value_8,\n -- JSON_QUERY(data, 'strict $[9]') AS value_9\n FROM\n bifrost.events\n WHERE\n section = 'stableAsset'\n AND method IN ('TokenSwapped')\n AND block_time > TIMESTAMP '2024-05-01'\n)\nSELECT\n date_trunc('hour', block_time) AS \"day\",\n SUM(amount_in) / 1e10 AS dot_volume_swapped,\n 1.000 * SUM(amount_in) / SUM(amount_out) AS avg_price,\n (1.000 * SUM(amount_in) / SUM(amount_out)) < 1 AS price_low -- very low prices\nFROM\n A\nWHERE\n token_in = '{\"token2\":0}'\n AND token_out = '{\"vToken2\":0}'\n AND amount_out > 0\n AND block_time > TIMESTAMP '2024-05-01'\nGROUP BY\n 1\nORDER BY\n 1 DESC;\n\n"})}),"\n",(0,a.jsxs)(n.p,{children:["The query is fairly typical for a parachain query on Dune. It parses events from the\n",(0,a.jsx)(n.code,{children:"bifrost.events"})," table, and calculates the aggregate values for each hour."]}),"\n",(0,a.jsx)(n.p,{children:"The query uses Dune's native UINT256 type, which allows to deal with very large numbers and still\nmaintain precision."}),"\n",(0,a.jsx)(n.p,{children:"Query result:"}),"\n",(0,a.jsx)("iframe",{src:"https://dune.com/embeds/3532234/5941878/",height:"350",width:"100%"}),"\n",(0,a.jsx)(n.admonition,{title:"DuneSQL Reference",type:"info",children:(0,a.jsxs)(n.p,{children:["For more information on DuneSQL, please refer to the ",(0,a.jsx)(n.a,{href:"/docs/general/dunesql-cheatsheet",children:"DuneSQL Cheatsheet"}),"\nand\n",(0,a.jsx)(n.a,{href:"https://docs.dune.com/query-engine/Functions-and-operators/index",children:"DuneSQL Official Documentation"}),"."]})})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(c,{...e})}):c(e)}},28453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>o});var s=t(96540);const a={},r=s.createContext(a);function i(e){const n=s.useContext(r);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:i(e.components),s.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/979a04e7.f002e94c.js b/assets/js/979a04e7.f002e94c.js deleted file mode 100644 index e57df10bb10c..000000000000 --- a/assets/js/979a04e7.f002e94c.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3705],{82561:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>i,default:()=>h,frontMatter:()=>r,metadata:()=>o,toc:()=>l});var s=t(74848),a=t(28453);const r={id:"bifrost-dashboards",title:"Bifrost Dashboards",sidebar_label:"Bifrost",description:"Bifrost is a decentralized finance hub and liquid staking platform.",keywords:["polkadot","dashboard","dune","bifrost","DeFi"],slug:"../bifrost-dashboards"},i="Bifrost Dashboards",o={id:"general/dune-analytics/parachain-dashboards/bifrost-dashboards",title:"Bifrost Dashboards",description:"Bifrost is a decentralized finance hub and liquid staking platform.",source:"@site/../docs/general/dune-analytics/parachain-dashboards/bifrost-dashboards.md",sourceDirName:"general/dune-analytics/parachain-dashboards",slug:"/general/dune-analytics/bifrost-dashboards",permalink:"/docs/general/dune-analytics/bifrost-dashboards",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/parachain-dashboards/bifrost-dashboards.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1727178265e3,frontMatter:{id:"bifrost-dashboards",title:"Bifrost Dashboards",sidebar_label:"Bifrost",description:"Bifrost is a decentralized finance hub and liquid staking platform.",keywords:["polkadot","dashboard","dune","bifrost","DeFi"],slug:"../bifrost-dashboards"},sidebar:"docs",previous:{title:"Astar",permalink:"/docs/general/dune-analytics/astar-dashboards"},next:{title:"BridgeHub",permalink:"/docs/general/dune-analytics/bridgehub-dashboards"}},d={},l=[{value:"Overview",id:"overview",level:2},{value:"Featured Dashboards on Dune",id:"featured-dashboards-on-dune",level:2},{value:"Key Tables",id:"key-tables",level:2},{value:"Useful Queries",id:"useful-queries",level:2},{value:"Getting Started with Queries",id:"getting-started-with-queries",level:2}];function c(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,a.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"bifrost-dashboards",children:"Bifrost Dashboards"})}),"\n",(0,s.jsx)(n.h2,{id:"overview",children:"Overview"}),"\n",(0,s.jsx)(n.p,{children:"Bifrost is a decentralized finance hub and liquid staking platform on the Polkadot network and other\nchains. Users obtain a liquid staking token, vToken, by staking their native tokens. The vToken can\nthen be used in DeFi applications, such as lending, borrowing, and trading."}),"\n",(0,s.jsx)(n.p,{children:"On Polkadot, users can stake DOT, ASTR, FIL, GLMR, Manta at the moment."}),"\n",(0,s.jsx)(n.p,{children:"They can also trade their vTokens in a DEX (stableswap) operating on the Bifrost parachain."}),"\n",(0,s.jsx)(n.h2,{id:"featured-dashboards-on-dune",children:"Featured Dashboards on Dune"}),"\n",(0,s.jsx)(n.p,{children:"Here you will find a variety of dashboards that help visualize data from the Bifrost parachain:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"https://dune.com/substrate/bifrost",children:"bifrost on Polkadot"}),": This dashboard provides a comprehensive\nview of staking, value locked, and trading on Bifrost parachain."]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"key-tables",children:"Key Tables"}),"\n",(0,s.jsx)(n.p,{children:"Data from the bifrost parachain is organized into several key tables:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"bifrost.balances"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"bifrost.blocks"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"bifrost.calls"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"bifrost.events"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"bifrost.extrinsics"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"bifrost.transfers"})}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"bifrost.traces"})," table is created by a snapshot script utilizing Bifrost API calls to fetch\naccurate values which would be difficult to calculate from the blockchain events alone."]}),"\n",(0,s.jsxs)(n.p,{children:["Start building your own queries using granular data on Dune\n",(0,s.jsx)(n.a,{href:"https://dune.com/queries?category=canonical&namespace=bifrost",children:"here"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"useful-queries",children:"Useful Queries"}),"\n",(0,s.jsx)(n.p,{children:"Some useful queries for Bifrost are provided:"}),"\n",(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Subject Area"}),(0,s.jsx)(n.th,{children:"Query"}),(0,s.jsx)(n.th,{children:"Description"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Liquid Staking"}),(0,s.jsx)(n.td,{children:(0,s.jsx)(n.a,{href:"https://dune.com/queries/3571958",children:"query 3571958"})}),(0,s.jsx)(n.td,{children:"Provides amount of vTokens and therefore tokens staked (1=1) Used HydraDX oracle for USD values."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Bifrost Stableswap"}),(0,s.jsx)(n.td,{children:(0,s.jsx)(n.a,{href:"https://dune.com/queries/3532234",children:"query 3532234"})}),(0,s.jsx)(n.td,{children:"Provides price and volume for stableswap pairs, e.g. DOT <-> VDOT"})]})]})]}),"\n",(0,s.jsx)(n.p,{children:"Dune users are encouraged to study the source code of the queries, including parts of a query that\nmay have been commented out for future use."}),"\n",(0,s.jsx)(n.p,{children:"Uncommenting these parts may accelerate your effort of adopting a query to a slightly different use\ncase."}),"\n",(0,s.jsx)(n.h2,{id:"getting-started-with-queries",children:"Getting Started with Queries"}),"\n",(0,s.jsx)(n.p,{children:"To get started with querying data from Bifrost, you are welcome to use the mentioned queries. You\ncan also use the following DuneSQL queries as examples:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-sql",metastring:'title="Bifrost Loan Market Data" showLineNumbers',children:"WITH A AS (\n SELECT\n block_time,\n event_id,\n section,\n method,\n JSON_ARRAY_LENGTH(data) AS array_length,\n JSON_VALUE(data, 'strict $[0]') AS account,\n -- JSON_QUERY(data, 'strict $[1]') AS value_1,\n -- JSON_VALUE(data, 'strict $[2]') AS some_amount,\n JSON_QUERY(data, 'strict $[3]') AS token_in,\n JSON_QUERY(data, 'strict $[4]') AS token_out,\n CAST(JSON_VALUE(data, 'strict $[5]') AS UINT256) AS amount_in,\n CAST(JSON_VALUE(data, 'strict $[9]') AS UINT256) AS amount_out\n -- JSON_QUERY(data, 'strict $[7]') AS value_7,\n -- JSON_QUERY(data, 'strict $[8]') AS value_8,\n -- JSON_QUERY(data, 'strict $[9]') AS value_9\n FROM\n bifrost.events\n WHERE\n section = 'stableAsset'\n AND method IN ('TokenSwapped')\n AND block_time > TIMESTAMP '2024-05-01'\n)\nSELECT\n date_trunc('hour', block_time) AS \"day\",\n SUM(amount_in) / 1e10 AS dot_volume_swapped,\n 1.000 * SUM(amount_in) / SUM(amount_out) AS avg_price,\n (1.000 * SUM(amount_in) / SUM(amount_out)) < 1 AS price_low -- very low prices\nFROM\n A\nWHERE\n token_in = '{\"token2\":0}'\n AND token_out = '{\"vToken2\":0}'\n AND amount_out > 0\n AND block_time > TIMESTAMP '2024-05-01'\nGROUP BY\n 1\nORDER BY\n 1 DESC;\n\n"})}),"\n",(0,s.jsxs)(n.p,{children:["The query is fairly typical for a parachain query on Dune. It parses events from the\n",(0,s.jsx)(n.code,{children:"bifrost.events"})," table, and calculates the aggregate values for each hour."]}),"\n",(0,s.jsx)(n.p,{children:"The query uses Dune's native UINT256 type, which allows to deal with very large numbers and still\nmaintain precision."}),"\n",(0,s.jsx)(n.p,{children:"Query result:"}),"\n",(0,s.jsx)("iframe",{src:"https://dune.com/embeds/3532234/5941878/",height:"350",width:"100%"}),"\n",(0,s.jsx)(n.admonition,{title:"DuneSQL Reference",type:"info",children:(0,s.jsxs)(n.p,{children:["For more information on DuneSQL, please refer to the ",(0,s.jsx)(n.a,{href:"/docs/general/dunesql-cheatsheet",children:"DuneSQL Cheatsheet"}),"\nand\n",(0,s.jsx)(n.a,{href:"https://docs.dune.com/query-engine/Functions-and-operators/index",children:"DuneSQL Official Documentation"}),"."]})})]})}function h(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(c,{...e})}):c(e)}},28453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>o});var s=t(96540);const a={},r=s.createContext(a);function i(e){const n=s.useContext(r);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:i(e.components),s.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/9802.e890a4dc.js b/assets/js/9802.e890a4dc.js new file mode 100644 index 000000000000..ba019444bd2c --- /dev/null +++ b/assets/js/9802.e890a4dc.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9802],{89802:(t,i,e)=>{e.d(i,{diagram:()=>J});var s=e(86825),n=e(85039),a=e(61021),h=e(45567),o=e(20007),r=function(){var t=(0,h.K2)((function(t,i,e,s){for(e=e||{},s=t.length;s--;e[t[s]]=i);return e}),"o"),i=[1,10,12,14,16,18,19,21,23],e=[2,6],s=[1,3],n=[1,5],a=[1,6],o=[1,7],r=[1,5,10,12,14,16,18,19,21,23,34,35,36],l=[1,25],c=[1,26],g=[1,28],u=[1,29],x=[1,30],d=[1,31],p=[1,32],f=[1,33],y=[1,34],m=[1,35],b=[1,36],A=[1,37],S=[1,43],C=[1,42],w=[1,47],k=[1,50],_=[1,10,12,14,16,18,19,21,23,34,35,36],T=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],R=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],D=[1,64],L={trace:(0,h.K2)((function(){}),"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:(0,h.K2)((function(t,i,e,s,n,a,h){var o=a.length-1;switch(n){case 5:s.setOrientation(a[o]);break;case 9:s.setDiagramTitle(a[o].text.trim());break;case 12:s.setLineData({text:"",type:"text"},a[o]);break;case 13:s.setLineData(a[o-1],a[o]);break;case 14:s.setBarData({text:"",type:"text"},a[o]);break;case 15:s.setBarData(a[o-1],a[o]);break;case 16:this.$=a[o].trim(),s.setAccTitle(this.$);break;case 17:case 18:this.$=a[o].trim(),s.setAccDescription(this.$);break;case 19:case 27:this.$=a[o-1];break;case 20:this.$=[Number(a[o-2]),...a[o]];break;case 21:this.$=[Number(a[o])];break;case 22:s.setXAxisTitle(a[o]);break;case 23:s.setXAxisTitle(a[o-1]);break;case 24:s.setXAxisTitle({type:"text",text:""});break;case 25:s.setXAxisBand(a[o]);break;case 26:s.setXAxisRangeData(Number(a[o-2]),Number(a[o]));break;case 28:this.$=[a[o-2],...a[o]];break;case 29:this.$=[a[o]];break;case 30:s.setYAxisTitle(a[o]);break;case 31:s.setYAxisTitle(a[o-1]);break;case 32:s.setYAxisTitle({type:"text",text:""});break;case 33:s.setYAxisRangeData(Number(a[o-2]),Number(a[o]));break;case 37:case 38:this.$={text:a[o],type:"text"};break;case 39:this.$={text:a[o],type:"markdown"};break;case 40:this.$=a[o];break;case 41:this.$=a[o-1]+""+a[o]}}),"anonymous"),table:[t(i,e,{3:1,4:2,7:4,5:s,34:n,35:a,36:o}),{1:[3]},t(i,e,{4:2,7:4,3:8,5:s,34:n,35:a,36:o}),t(i,e,{4:2,7:4,6:9,3:10,5:s,8:[1,11],34:n,35:a,36:o}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},t(r,[2,34]),t(r,[2,35]),t(r,[2,36]),{1:[2,1]},t(i,e,{4:2,7:4,3:21,5:s,34:n,35:a,36:o}),{1:[2,3]},t(r,[2,5]),t(i,[2,7],{4:22,34:n,35:a,36:o}),{11:23,37:24,38:l,39:c,40:27,41:g,42:u,43:x,44:d,45:p,46:f,47:y,48:m,49:b,50:A},{11:39,13:38,24:S,27:C,29:40,30:41,37:24,38:l,39:c,40:27,41:g,42:u,43:x,44:d,45:p,46:f,47:y,48:m,49:b,50:A},{11:45,15:44,27:w,33:46,37:24,38:l,39:c,40:27,41:g,42:u,43:x,44:d,45:p,46:f,47:y,48:m,49:b,50:A},{11:49,17:48,24:k,37:24,38:l,39:c,40:27,41:g,42:u,43:x,44:d,45:p,46:f,47:y,48:m,49:b,50:A},{11:52,17:51,24:k,37:24,38:l,39:c,40:27,41:g,42:u,43:x,44:d,45:p,46:f,47:y,48:m,49:b,50:A},{20:[1,53]},{22:[1,54]},t(_,[2,18]),{1:[2,2]},t(_,[2,8]),t(_,[2,9]),t(T,[2,37],{40:55,41:g,42:u,43:x,44:d,45:p,46:f,47:y,48:m,49:b,50:A}),t(T,[2,38]),t(T,[2,39]),t(R,[2,40]),t(R,[2,42]),t(R,[2,43]),t(R,[2,44]),t(R,[2,45]),t(R,[2,46]),t(R,[2,47]),t(R,[2,48]),t(R,[2,49]),t(R,[2,50]),t(R,[2,51]),t(_,[2,10]),t(_,[2,22],{30:41,29:56,24:S,27:C}),t(_,[2,24]),t(_,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:l,39:c,40:27,41:g,42:u,43:x,44:d,45:p,46:f,47:y,48:m,49:b,50:A},t(_,[2,11]),t(_,[2,30],{33:60,27:w}),t(_,[2,32]),{31:[1,61]},t(_,[2,12]),{17:62,24:k},{25:63,27:D},t(_,[2,14]),{17:65,24:k},t(_,[2,16]),t(_,[2,17]),t(R,[2,41]),t(_,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},t(_,[2,31]),{27:[1,69]},t(_,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},t(_,[2,15]),t(_,[2,26]),t(_,[2,27]),{11:59,32:72,37:24,38:l,39:c,40:27,41:g,42:u,43:x,44:d,45:p,46:f,47:y,48:m,49:b,50:A},t(_,[2,33]),t(_,[2,19]),{25:73,27:D},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:(0,h.K2)((function(t,i){if(!i.recoverable){var e=new Error(t);throw e.hash=i,e}this.trace(t)}),"parseError"),parse:(0,h.K2)((function(t){var i=this,e=[0],s=[],n=[null],a=[],o=this.table,r="",l=0,c=0,g=0,u=a.slice.call(arguments,1),x=Object.create(this.lexer),d={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(d.yy[p]=this.yy[p]);x.setInput(t,d.yy),d.yy.lexer=x,d.yy.parser=this,void 0===x.yylloc&&(x.yylloc={});var f=x.yylloc;a.push(f);var y=x.options&&x.options.ranges;function m(){var t;return"number"!=typeof(t=s.pop()||x.lex()||1)&&(t instanceof Array&&(t=(s=t).pop()),t=i.symbols_[t]||t),t}"function"==typeof d.yy.parseError?this.parseError=d.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,h.K2)((function(t){e.length=e.length-2*t,n.length=n.length-t,a.length=a.length-t}),"popStack"),(0,h.K2)(m,"lex");for(var b,A,S,C,w,k,_,T,R,D={};;){if(S=e[e.length-1],this.defaultActions[S]?C=this.defaultActions[S]:(null==b&&(b=m()),C=o[S]&&o[S][b]),void 0===C||!C.length||!C[0]){var L="";for(k in R=[],o[S])this.terminals_[k]&&k>2&&R.push("'"+this.terminals_[k]+"'");L=x.showPosition?"Parse error on line "+(l+1)+":\n"+x.showPosition()+"\nExpecting "+R.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(L,{text:x.match,token:this.terminals_[b]||b,line:x.yylineno,loc:f,expected:R})}if(C[0]instanceof Array&&C.length>1)throw new Error("Parse Error: multiple actions possible at state: "+S+", token: "+b);switch(C[0]){case 1:e.push(b),n.push(x.yytext),a.push(x.yylloc),e.push(C[1]),b=null,A?(b=A,A=null):(c=x.yyleng,r=x.yytext,l=x.yylineno,f=x.yylloc,g>0&&g--);break;case 2:if(_=this.productions_[C[1]][1],D.$=n[n.length-_],D._$={first_line:a[a.length-(_||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(_||1)].first_column,last_column:a[a.length-1].last_column},y&&(D._$.range=[a[a.length-(_||1)].range[0],a[a.length-1].range[1]]),void 0!==(w=this.performAction.apply(D,[r,c,l,d.yy,C[1],n,a].concat(u))))return w;_&&(e=e.slice(0,-1*_*2),n=n.slice(0,-1*_),a=a.slice(0,-1*_)),e.push(this.productions_[C[1]][0]),n.push(D.$),a.push(D._$),T=o[e[e.length-2]][e[e.length-1]],e.push(T);break;case 3:return!0}}return!0}),"parse")},P=function(){return{EOF:1,parseError:(0,h.K2)((function(t,i){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,i)}),"parseError"),setInput:(0,h.K2)((function(t,i){return this.yy=i||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this}),"setInput"),input:(0,h.K2)((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t}),"input"),unput:(0,h.K2)((function(t){var i=t.length,e=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-i),this.offset-=i;var s=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),e.length-1&&(this.yylineno-=e.length-1);var n=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:e?(e.length===s.length?this.yylloc.first_column:0)+s[s.length-e.length].length-e[0].length:this.yylloc.first_column-i},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-i]),this.yyleng=this.yytext.length,this}),"unput"),more:(0,h.K2)((function(){return this._more=!0,this}),"more"),reject:(0,h.K2)((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:(0,h.K2)((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:(0,h.K2)((function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:(0,h.K2)((function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:(0,h.K2)((function(){var t=this.pastInput(),i=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+i+"^"}),"showPosition"),test_match:(0,h.K2)((function(t,i){var e,s,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(n.yylloc.range=this.yylloc.range.slice(0))),(s=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=s.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:s?s[s.length-1].length-s[s.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],e=this.performAction.call(this,this.yy,this,i,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e)return e;if(this._backtrack){for(var a in n)this[a]=n[a];return!1}return!1}),"test_match"),next:(0,h.K2)((function(){if(this.done)return this.EOF;var t,i,e,s;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),a=0;ai[0].length)){if(i=e,s=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(e,n[a])))return t;if(this._backtrack){i=!1;continue}return!1}if(!this.options.flex)break}return i?!1!==(t=this.test_match(i,n[s]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:(0,h.K2)((function(){var t=this.next();return t||this.lex()}),"lex"),begin:(0,h.K2)((function(t){this.conditionStack.push(t)}),"begin"),popState:(0,h.K2)((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:(0,h.K2)((function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules}),"_currentRules"),topState:(0,h.K2)((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:(0,h.K2)((function(t){this.begin(t)}),"pushState"),stateStackSize:(0,h.K2)((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,h.K2)((function(t,i,e,s){switch(e){case 0:case 1:case 5:case 43:break;case 2:case 3:return this.popState(),34;case 4:return 34;case 6:return 10;case 7:return this.pushState("acc_title"),19;case 8:return this.popState(),"acc_title_value";case 9:return this.pushState("acc_descr"),21;case 10:return this.popState(),"acc_descr_value";case 11:this.pushState("acc_descr_multiline");break;case 12:case 25:case 27:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 5;case 15:return 8;case 16:return this.pushState("axis_data"),"X_AXIS";case 17:return this.pushState("axis_data"),"Y_AXIS";case 18:return this.pushState("axis_band_data"),24;case 19:return 31;case 20:return this.pushState("data"),16;case 21:return this.pushState("data"),18;case 22:return this.pushState("data_inner"),24;case 23:return 27;case 24:return this.popState(),26;case 26:this.pushState("string");break;case 28:return"STR";case 29:return 24;case 30:return 26;case 31:return 43;case 32:return"COLON";case 33:return 44;case 34:return 28;case 35:return 45;case 36:return 46;case 37:return 48;case 38:return 50;case 39:return 47;case 40:return 41;case 41:return 49;case 42:return 42;case 44:return 35;case 45:return 36}}),"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\{)/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,23,24,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,20,21,22,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,24,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,23,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[27,28],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0}}}}();function E(){this.yy={}}return L.lexer=P,(0,h.K2)(E,"Parser"),E.prototype=L,L.Parser=E,new E}();r.parser=r;var l=r;function c(t){return"bar"===t.type}function g(t){return"band"===t.type}function u(t){return"linear"===t.type}(0,h.K2)(c,"isBarPlot"),(0,h.K2)(g,"isBandAxisData"),(0,h.K2)(u,"isLinearAxisData");var x=class{constructor(t){this.parentGroup=t}static{(0,h.K2)(this,"TextDimensionCalculatorWithFont")}getMaxDimension(t,i){if(!this.parentGroup)return{width:t.reduce(((t,i)=>Math.max(i.length,t)),0)*i,height:i};const e={width:0,height:0},n=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",i);for(const a of t){const t=(0,s.W6)(n,1,a),h=t?t.width:a.length*i,o=t?t.height:i;e.width=Math.max(e.width,h),e.height=Math.max(e.height,o)}return n.remove(),e}},d=class{constructor(t,i,e,s){this.axisConfig=t,this.title=i,this.textDimensionCalculator=e,this.axisThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.showTitle=!1,this.showLabel=!1,this.showTick=!1,this.showAxisLine=!1,this.outerPadding=0,this.titleTextHeight=0,this.labelTextHeight=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left"}static{(0,h.K2)(this,"BaseAxis")}setRange(t){this.range=t,"left"===this.axisPosition||"right"===this.axisPosition?this.boundingRect.height=t[1]-t[0]:this.boundingRect.width=t[1]-t[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(t){this.axisPosition=t,this.setRange(this.range)}getTickDistance(){const t=this.getRange();return Math.abs(t[0]-t[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map((t=>t.toString())),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){.7*this.getTickDistance()>2*this.outerPadding&&(this.outerPadding=Math.floor(.7*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(t){let i=t.height;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const e=this.getLabelDimension(),s=.2*t.width;this.outerPadding=Math.min(e.width/2,s);const n=e.height+2*this.axisConfig.labelPadding;this.labelTextHeight=e.height,n<=i&&(i-=n,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const t=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),e=t.height+2*this.axisConfig.titlePadding;this.titleTextHeight=t.height,e<=i&&(i-=e,this.showTitle=!0)}this.boundingRect.width=t.width,this.boundingRect.height=t.height-i}calculateSpaceIfDrawnVertical(t){let i=t.width;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const e=this.getLabelDimension(),s=.2*t.height;this.outerPadding=Math.min(e.height/2,s);const n=e.width+2*this.axisConfig.labelPadding;n<=i&&(i-=n,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const t=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),e=t.height+2*this.axisConfig.titlePadding;this.titleTextHeight=t.height,e<=i&&(i-=e,this.showTitle=!0)}this.boundingRect.width=t.width-i,this.boundingRect.height=t.height}calculateSpace(t){return"left"===this.axisPosition||"right"===this.axisPosition?this.calculateSpaceIfDrawnVertical(t):this.calculateSpaceIfDrawnHorizontally(t),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}getDrawableElementsForLeftAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${i},${this.boundingRect.y} L ${i},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map((t=>({text:t.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(t),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"})))}),this.showTick){const i=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map((t=>({path:`M ${i},${this.getScaleValue(t)} L ${i-this.axisConfig.tickLength},${this.getScaleValue(t)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth})))})}return this.showTitle&&t.push({type:"text",groupTexts:["left-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForBottomAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.y+this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map((t=>({text:t.toString(),x:this.getScaleValue(t),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"})))}),this.showTick){const i=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map((t=>({path:`M ${this.getScaleValue(t)},${i} L ${this.getScaleValue(t)},${i+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth})))})}return this.showTitle&&t.push({type:"text",groupTexts:["bottom-axis","title"],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForTopAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map((t=>({text:t.toString(),x:this.getScaleValue(t),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+2*this.axisConfig.titlePadding:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"})))}),this.showTick){const i=this.boundingRect.y;t.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map((t=>({path:`M ${this.getScaleValue(t)},${i+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(t)},${i+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth})))})}return this.showTitle&&t.push({type:"text",groupTexts:["top-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElements(){if("left"===this.axisPosition)return this.getDrawableElementsForLeftAxis();if("right"===this.axisPosition)throw Error("Drawing of right axis is not implemented");return"bottom"===this.axisPosition?this.getDrawableElementsForBottomAxis():"top"===this.axisPosition?this.getDrawableElementsForTopAxis():[]}},p=class extends d{static{(0,h.K2)(this,"BandAxis")}constructor(t,i,e,s,n){super(t,s,n,i),this.categories=e,this.scale=(0,o.WH)().domain(this.categories).range(this.getRange())}setRange(t){super.setRange(t)}recalculateScale(){this.scale=(0,o.WH)().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),h.Rm.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(t){return this.scale(t)??this.getRange()[0]}},f=class extends d{static{(0,h.K2)(this,"LinearAxis")}constructor(t,i,e,s,n){super(t,s,n,i),this.domain=e,this.scale=(0,o.m4Y)().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){const t=[...this.domain];"left"===this.axisPosition&&t.reverse(),this.scale=(0,o.m4Y)().domain(t).range(this.getRange())}getScaleValue(t){return this.scale(t)}};function y(t,i,e,s){const n=new x(s);return g(t)?new p(i,e,t.categories,t.title,n):new f(i,e,[t.min,t.max],t.title,n)}(0,h.K2)(y,"getAxis");var m=class{constructor(t,i,e,s){this.textDimensionCalculator=t,this.chartConfig=i,this.chartData=e,this.chartThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{(0,h.K2)(this,"ChartTitle")}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){const i=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),e=Math.max(i.width,t.width),s=i.height+2*this.chartConfig.titlePadding;return i.width<=e&&i.height<=s&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=e,this.boundingRect.height=s,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){const t=[];return this.showChartTitle&&t.push({groupTexts:["chart-title"],type:"text",data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:"middle",horizontalPos:"center",x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]}),t}};function b(t,i,e,s){const n=new x(s);return new m(n,t,i,e)}(0,h.K2)(b,"getChartTitleComponent");var A=class{constructor(t,i,e,s,n){this.plotData=t,this.xAxis=i,this.yAxis=e,this.orientation=s,this.plotIndex=n}static{(0,h.K2)(this,"LinePlot")}getDrawableElement(){const t=this.plotData.data.map((t=>[this.xAxis.getScaleValue(t[0]),this.yAxis.getScaleValue(t[1])]));let i;return i="horizontal"===this.orientation?(0,o.n8j)().y((t=>t[0])).x((t=>t[1]))(t):(0,o.n8j)().x((t=>t[0])).y((t=>t[1]))(t),i?[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:i,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}]:[]}},S=class{constructor(t,i,e,s,n,a){this.barData=t,this.boundingRect=i,this.xAxis=e,this.yAxis=s,this.orientation=n,this.plotIndex=a}static{(0,h.K2)(this,"BarPlot")}getDrawableElement(){const t=this.barData.data.map((t=>[this.xAxis.getScaleValue(t[0]),this.yAxis.getScaleValue(t[1])])),i=.95*Math.min(2*this.xAxis.getAxisOuterPadding(),this.xAxis.getTickDistance()),e=i/2;return"horizontal"===this.orientation?[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map((t=>({x:this.boundingRect.x,y:t[0]-e,height:i,width:t[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill})))}]:[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map((t=>({x:t[0]-e,y:t[1],width:i,height:this.boundingRect.y+this.boundingRect.height-t[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill})))}]}},C=class{constructor(t,i,e){this.chartConfig=t,this.chartData=i,this.chartThemeConfig=e,this.boundingRect={x:0,y:0,width:0,height:0}}static{(0,h.K2)(this,"BasePlot")}setAxes(t,i){this.xAxis=t,this.yAxis=i}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){return this.boundingRect.width=t.width,this.boundingRect.height=t.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!this.xAxis||!this.yAxis)throw Error("Axes must be passed to render Plots");const t=[];for(const[i,e]of this.chartData.plots.entries())switch(e.type){case"line":{const s=new A(e,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...s.getDrawableElement())}break;case"bar":{const s=new S(e,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...s.getDrawableElement())}}return t}};function w(t,i,e){return new C(t,i,e)}(0,h.K2)(w,"getPlotComponent");var k,_=class{constructor(t,i,e,s){this.chartConfig=t,this.chartData=i,this.componentStore={title:b(t,i,e,s),plot:w(t,i,e),xAxis:y(i.xAxis,t.xAxis,{titleColor:e.xAxisTitleColor,labelColor:e.xAxisLabelColor,tickColor:e.xAxisTickColor,axisLineColor:e.xAxisLineColor},s),yAxis:y(i.yAxis,t.yAxis,{titleColor:e.yAxisTitleColor,labelColor:e.yAxisLabelColor,tickColor:e.yAxisTickColor,axisLineColor:e.yAxisLineColor},s)}}static{(0,h.K2)(this,"Orchestrator")}calculateVerticalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,e=0,s=0,n=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),a=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),h=this.componentStore.plot.calculateSpace({width:n,height:a});t-=h.width,i-=h.height,h=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),s=h.height,i-=h.height,this.componentStore.xAxis.setAxisPosition("bottom"),h=this.componentStore.xAxis.calculateSpace({width:t,height:i}),i-=h.height,this.componentStore.yAxis.setAxisPosition("left"),h=this.componentStore.yAxis.calculateSpace({width:t,height:i}),e=h.width,t-=h.width,t>0&&(n+=t,t=0),i>0&&(a+=i,i=0),this.componentStore.plot.calculateSpace({width:n,height:a}),this.componentStore.plot.setBoundingBoxXY({x:e,y:s}),this.componentStore.xAxis.setRange([e,e+n]),this.componentStore.xAxis.setBoundingBoxXY({x:e,y:s+a}),this.componentStore.yAxis.setRange([s,s+a]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:s}),this.chartData.plots.some((t=>c(t)))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,e=0,s=0,n=0,a=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),h=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),o=this.componentStore.plot.calculateSpace({width:a,height:h});t-=o.width,i-=o.height,o=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),e=o.height,i-=o.height,this.componentStore.xAxis.setAxisPosition("left"),o=this.componentStore.xAxis.calculateSpace({width:t,height:i}),t-=o.width,s=o.width,this.componentStore.yAxis.setAxisPosition("top"),o=this.componentStore.yAxis.calculateSpace({width:t,height:i}),i-=o.height,n=e+o.height,t>0&&(a+=t,t=0),i>0&&(h+=i,i=0),this.componentStore.plot.calculateSpace({width:a,height:h}),this.componentStore.plot.setBoundingBoxXY({x:s,y:n}),this.componentStore.yAxis.setRange([s,s+a]),this.componentStore.yAxis.setBoundingBoxXY({x:s,y:e}),this.componentStore.xAxis.setRange([n,n+h]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:n}),this.chartData.plots.some((t=>c(t)))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){"horizontal"===this.chartConfig.chartOrientation?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();const t=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(const i of Object.values(this.componentStore))t.push(...i.getDrawableElements());return t}},T=class{static{(0,h.K2)(this,"XYChartBuilder")}static build(t,i,e,s){return new _(t,i,e,s).getDrawableElement()}},R=0,D=$(),L=I(),P=M(),E=L.plotColorPalette.split(",").map((t=>t.trim())),v=!1,K=!1;function I(){const t=(0,h.P$)(),i=(0,h.zj)();return(0,n.$t)(t.xyChart,i.themeVariables.xyChart)}function $(){const t=(0,h.zj)();return(0,n.$t)(h.UI.xyChart,t.xyChart)}function M(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}function B(t){const i=(0,h.zj)();return(0,h.jZ)(t.trim(),i)}function z(t){k=t}function W(t){D.chartOrientation="horizontal"===t?"horizontal":"vertical"}function O(t){P.xAxis.title=B(t.text)}function F(t,i){P.xAxis={type:"linear",title:P.xAxis.title,min:t,max:i},v=!0}function N(t){P.xAxis={type:"band",title:P.xAxis.title,categories:t.map((t=>B(t.text)))},v=!0}function V(t){P.yAxis.title=B(t.text)}function X(t,i){P.yAxis={type:"linear",title:P.yAxis.title,min:t,max:i},K=!0}function Y(t){const i=Math.min(...t),e=Math.max(...t),s=u(P.yAxis)?P.yAxis.min:1/0,n=u(P.yAxis)?P.yAxis.max:-1/0;P.yAxis={type:"linear",title:P.yAxis.title,min:Math.min(s,i),max:Math.max(n,e)}}function U(t){let i=[];if(0===t.length)return i;if(!v){const i=u(P.xAxis)?P.xAxis.min:1/0,e=u(P.xAxis)?P.xAxis.max:-1/0;F(Math.min(i,1),Math.max(e,t.length))}if(K||Y(t),g(P.xAxis)&&(i=P.xAxis.categories.map(((i,e)=>[i,t[e]]))),u(P.xAxis)){const e=P.xAxis.min,s=P.xAxis.max,n=(s-e)/(t.length-1),a=[];for(let t=e;t<=s;t+=n)a.push(`${t}`);i=a.map(((i,e)=>[i,t[e]]))}return i}function H(t){return E[0===t?0:t%E.length]}function j(t,i){const e=U(i);P.plots.push({type:"line",strokeFill:H(R),strokeWidth:2,data:e}),R++}function G(t,i){const e=U(i);P.plots.push({type:"bar",fill:H(R),data:e}),R++}function Q(){if(0===P.plots.length)throw Error("No Plot to render, please provide a plot with some data");return P.title=(0,h.ab)(),T.build(D,P,L,k)}function Z(){return L}function q(){return D}(0,h.K2)(I,"getChartDefaultThemeConfig"),(0,h.K2)($,"getChartDefaultConfig"),(0,h.K2)(M,"getChartDefaultData"),(0,h.K2)(B,"textSanitizer"),(0,h.K2)(z,"setTmpSVGG"),(0,h.K2)(W,"setOrientation"),(0,h.K2)(O,"setXAxisTitle"),(0,h.K2)(F,"setXAxisRangeData"),(0,h.K2)(N,"setXAxisBand"),(0,h.K2)(V,"setYAxisTitle"),(0,h.K2)(X,"setYAxisRangeData"),(0,h.K2)(Y,"setYAxisRangeFromPlotData"),(0,h.K2)(U,"transformDataWithoutCategory"),(0,h.K2)(H,"getPlotColorFromPalette"),(0,h.K2)(j,"setLineData"),(0,h.K2)(G,"setBarData"),(0,h.K2)(Q,"getDrawableElem"),(0,h.K2)(Z,"getChartThemeConfig"),(0,h.K2)(q,"getChartConfig");var J={parser:l,db:{getDrawableElem:Q,clear:(0,h.K2)((function(){(0,h.IU)(),R=0,D=$(),P={yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]},L=I(),E=L.plotColorPalette.split(",").map((t=>t.trim())),v=!1,K=!1}),"clear"),setAccTitle:h.SV,getAccTitle:h.iN,setDiagramTitle:h.ke,getDiagramTitle:h.ab,getAccDescription:h.m7,setAccDescription:h.EI,setOrientation:W,setXAxisTitle:O,setXAxisRangeData:F,setXAxisBand:N,setYAxisTitle:V,setYAxisRangeData:X,setLineData:j,setBarData:G,setTmpSVGG:z,getChartThemeConfig:Z,getChartConfig:q},renderer:{draw:(0,h.K2)(((t,i,e,s)=>{const n=s.db,o=n.getChartThemeConfig(),r=n.getChartConfig();function l(t){return"top"===t?"text-before-edge":"middle"}function c(t){return"left"===t?"start":"right"===t?"end":"middle"}function g(t){return`translate(${t.x}, ${t.y}) rotate(${t.rotation||0})`}(0,h.K2)(l,"getDominantBaseLine"),(0,h.K2)(c,"getTextAnchor"),(0,h.K2)(g,"getTextTransformation"),h.Rm.debug("Rendering xychart chart\n"+t);const u=(0,a.D)(i),x=u.append("g").attr("class","main"),d=x.append("rect").attr("width",r.width).attr("height",r.height).attr("class","background");(0,h.a$)(u,r.height,r.width,!0),u.attr("viewBox",`0 0 ${r.width} ${r.height}`),d.attr("fill",o.backgroundColor),n.setTmpSVGG(u.append("g").attr("class","mermaid-tmp-group"));const p=n.getDrawableElem(),f={};function y(t){let i=x,e="";for(const[s]of t.entries()){let n=x;s>0&&f[e]&&(n=f[e]),e+=t[s],i=f[e],i||(i=f[e]=n.append("g").attr("class",t[s]))}return i}(0,h.K2)(y,"getGroup");for(const a of p){if(0===a.data.length)continue;const t=y(a.groupTexts);switch(a.type){case"rect":t.selectAll("rect").data(a.data).enter().append("rect").attr("x",(t=>t.x)).attr("y",(t=>t.y)).attr("width",(t=>t.width)).attr("height",(t=>t.height)).attr("fill",(t=>t.fill)).attr("stroke",(t=>t.strokeFill)).attr("stroke-width",(t=>t.strokeWidth));break;case"text":t.selectAll("text").data(a.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",(t=>t.fill)).attr("font-size",(t=>t.fontSize)).attr("dominant-baseline",(t=>l(t.verticalPos))).attr("text-anchor",(t=>c(t.horizontalPos))).attr("transform",(t=>g(t))).text((t=>t.text));break;case"path":t.selectAll("path").data(a.data).enter().append("path").attr("d",(t=>t.path)).attr("fill",(t=>t.fill?t.fill:"none")).attr("stroke",(t=>t.strokeFill)).attr("stroke-width",(t=>t.strokeWidth))}}}),"draw")}}}}]); \ No newline at end of file diff --git a/assets/js/9875.47bcf4e3.js b/assets/js/9875.47bcf4e3.js new file mode 100644 index 000000000000..00f9f53f894d --- /dev/null +++ b/assets/js/9875.47bcf4e3.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9875],{29875:(e,r,a)=>{a.d(r,{diagram:()=>i});var t=a(69664),s=(a(79972),a(79740),a(6396),a(5081),a(34483),a(52294),a(62392),a(86825),a(85039),a(45567)),i={parser:t.Zk,db:t.iP,renderer:t.q7,styles:t.tM,init:(0,s.K2)((e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute,t.iP.clear()}),"init")}}}]); \ No newline at end of file diff --git a/assets/js/987d08ef.2aebbf03.js b/assets/js/987d08ef.2aebbf03.js new file mode 100644 index 000000000000..e64e51f800e7 --- /dev/null +++ b/assets/js/987d08ef.2aebbf03.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6496],{14954:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>o,default:()=>d,frontMatter:()=>i,metadata:()=>a,toc:()=>l});const a=JSON.parse('{"id":"build/build-smart-contracts","title":"Smart Contracts","description":"How smart contracts play their role in the Polkadot ecosystem.","source":"@site/../docs/build/build-smart-contracts.md","sourceDirName":"build","slug":"/build-smart-contracts","permalink":"/docs/build-smart-contracts","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/build/build-smart-contracts.md","tags":[],"version":"current","lastUpdatedBy":"henrique-c-ladeira","lastUpdatedAt":1728142286000,"frontMatter":{"id":"build-smart-contracts","title":"Smart Contracts","sidebar_label":"Smart Contracts","description":"How smart contracts play their role in the Polkadot ecosystem.","keywords":["build","smart contract","evm","wasm"],"slug":"../build-smart-contracts"},"sidebar":"docs","previous":{"title":"Node Interaction","permalink":"/docs/build-node-interaction"},"next":{"title":"Protocol Development Resources","permalink":"/docs/build-protocol-index"}}');var r=n(74848),s=n(28453);const i={id:"build-smart-contracts",title:"Smart Contracts",sidebar_label:"Smart Contracts",description:"How smart contracts play their role in the Polkadot ecosystem.",keywords:["build","smart contract","evm","wasm"],slug:"../build-smart-contracts"},o=void 0,c={},l=[{value:"Difference between developing a smart contract and a parachain",id:"difference-between-developing-a-smart-contract-and-a-parachain",level:2},{value:"Layer of Abstraction",id:"layer-of-abstraction",level:3},{value:"Gas Fees",id:"gas-fees",level:3},{value:"Building a Smart Contract",id:"building-a-smart-contract",level:2},{value:"Frontier EVM Contracts",id:"frontier-evm-contracts",level:3},{value:"Substrate Contracts",id:"substrate-contracts",level:3},{value:"Resources",id:"resources",level:4},{value:"Contracts Pallet",id:"contracts-pallet",level:3},{value:"Storage Rent: Deprecated",id:"storage-rent-deprecated",level:4},{value:"Polkadot Standards Proposals (PSPs)",id:"polkadot-standards-proposals-psps",level:3},{value:"Ink",id:"ink",level:3},{value:"Libraries for Smart Contracts in ink!",id:"libraries-for-smart-contracts-in-ink",level:4},{value:"Smart Contract Environments",id:"smart-contract-environments",level:2},{value:"Parity Tech",id:"parity-tech",level:3},{value:"Parachains",id:"parachains",level:3},{value:"Moonbeam",id:"moonbeam",level:4},{value:"Astar",id:"astar",level:4},{value:"Acala",id:"acala",level:4},{value:"Phala",id:"phala",level:4},{value:"Darwinia",id:"darwinia",level:4},{value:"Keep In Touch",id:"keep-in-touch",level:2}];function h(e){const t={a:"a",code:"code",em:"em",h2:"h2",h3:"h3",h4:"h4",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.p,{children:"The relay chain which is a layer 0 blockchain, does not support smart contracts natively. However,\nparachains which are layer 1 blockchains are equipped with the functionality to support smart\ncontracts."}),"\n",(0,r.jsxs)(t.p,{children:["The two primary supported smart contract environments are ",(0,r.jsx)(t.a,{href:"#ink",children:"ink!"})," and EVM. There are multiple\n",(0,r.jsx)(t.a,{href:"#parachains",children:"parachains that support both environments"}),"."]}),"\n",(0,r.jsx)(t.h2,{id:"difference-between-developing-a-smart-contract-and-a-parachain",children:"Difference between developing a smart contract and a parachain"}),"\n",(0,r.jsx)(t.h3,{id:"layer-of-abstraction",children:"Layer of Abstraction"}),"\n",(0,r.jsx)(t.p,{children:"When you write a smart contract, you are creating the instructions that associate with and deploy on\na specific chain address."}),"\n",(0,r.jsx)(t.p,{children:"In comparison, a runtime module on a parachain is the entire logic of a chain's state transitions\n(what's called a state transition function)."}),"\n",(0,r.jsx)(t.p,{children:"Smart contracts must consciously implement upgradeability while parachains have the ability to swap\nout their code entirely through a root command or via the governance pallet."}),"\n",(0,r.jsx)(t.p,{children:"When you build a smart contract, it will eventually be deployed to a target chain with its own\nenvironment. Parachains allow the developer to declare the environment of their own chain, even\nallowing others to write smart contracts for it."}),"\n",(0,r.jsx)(t.h3,{id:"gas-fees",children:"Gas Fees"}),"\n",(0,r.jsxs)(t.p,{children:["Smart contracts must find a way to limit their own execution, or else full nodes are vulnerable to\nDOS attacks. An infinite loop in a smart contract, for example, could consume the computational\nresources of an entire chain, preventing others from using it. The\n",(0,r.jsx)(t.a,{href:"https://en.wikipedia.org/wiki/Halting_problem",children:"halting problem"}),' shows that even with a powerful\nenough language, it is impossible to know ahead of time whether or not a program will ever cease\nexecution. Some platforms, such as Bitcoin, get around this constraint by providing a very\nrestricted scripting language. Others, such as Ethereum, "charge" the smart contract "gas" for the\nrights to execute their code. If a smart contract does get into a state where execution will never\nhalt, it eventually runs out of gas, ceases execution, and any state transition that the smart\ncontract would have made is rolled back.']}),"\n",(0,r.jsxs)(t.p,{children:["Parachains can implement arbitrarily powerful programming languages and contain no gas notion for\ntheir own native logic. This means that some functionality is easier to implement for the developer,\nbut some constructs, such as a loop without a terminating condition, should ",(0,r.jsx)(t.em,{children:"never"})," be implemented.\nLeaving certain logic, such as complex loops that could run indefinitely, to a non-smart contract\nlayer, or even trying to eliminate it, will often be a wiser choice. Parachains try to be proactive,\nwhile smart contract platforms are event-driven."]}),"\n",(0,r.jsxs)(t.p,{children:["Relay chain and parachains typically use the ",(0,r.jsx)(t.em,{children:"weight-fee model"})," and not a ",(0,r.jsx)(t.em,{children:"gas-metering model"}),"."]}),"\n",(0,r.jsx)(t.h2,{id:"building-a-smart-contract",children:"Building a Smart Contract"}),"\n",(0,r.jsx)(t.p,{children:"The relay chain does not natively support smart contracts. However, since the parachains that\nconnect to the relay chain can support arbitrary state transitions, they support smart contracts."}),"\n",(0,r.jsx)(t.p,{children:"Substrate presently supports smart contracts out-of-the-box in several ways:"}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:["The EVM pallet offered by ",(0,r.jsx)(t.a,{href:"https://github.com/paritytech/frontier",children:"Frontier"}),"."]}),"\n",(0,r.jsxs)(t.li,{children:["The\n",(0,r.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/contracts/",children:"Contracts pallet"}),"\nin the FRAME library for Wasm-based contracts."]}),"\n"]}),"\n",(0,r.jsx)(t.h3,{id:"frontier-evm-contracts",children:"Frontier EVM Contracts"}),"\n",(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.a,{href:"https://github.com/paritytech/frontier",children:"Frontier"})," is the suite of tools that enables a Substrate\nchain to run Ethereum contracts (EVM) natively with the same API/RPC interface, Ethereum exposes on\nSubstrate. Ethereum Addresses can also be mapped directly to and from Substrate's SS58 scheme from\nexisting accounts."]}),"\n",(0,r.jsx)(t.h3,{id:"substrate-contracts",children:"Substrate Contracts"}),"\n",(0,r.jsxs)(t.p,{children:["Substrate offers a built-in\n",(0,r.jsx)(t.a,{href:"https://paritytech.github.io/substrate/master/pallet_contracts/index.html",children:"contract pallet"}),";\nparachains can also support ",(0,r.jsx)(t.a,{href:"/docs/learn-wasm",children:"WebAssembly"})," smart contracts. Additionally,\nthere is the ",(0,r.jsx)(t.a,{href:"https://github.com/paritytech/frontier/tree/master/frame/evm#evm-module",children:"EVM Pallet"}),",\nwhich allows a parachain to implement the Ethereum Virtual Machine, thereby supporting almost direct\nports of Ethereum contracts."]}),"\n",(0,r.jsxs)(t.p,{children:["A video version of the recap of the smart contract situation is available on the\n",(0,r.jsx)(t.a,{href:"https://www.youtube.com/watch?v=fKHkFBXaUxQ",children:"Polkadot YouTube channel"}),"."]}),"\n",(0,r.jsx)(t.h4,{id:"resources",children:"Resources"}),"\n",(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.a,{href:"https://stackoverflow.com/a/56041305",children:"When should I build a Substrate runtime versus a Substrate smart contract"}),"?\nThis post answers the question more technically of when a developer might choose to develop a\nruntime versus a smart contract."]}),"\n",(0,r.jsx)(t.p,{children:"Here is the list of current resources available to developers who want to get started writing smart\ncontracts to deploy on parachains based on Substrate."}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.a,{href:"https://github.com/paritytech/ink",children:"ink!"})," - Parity's ink to write smart contracts."]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.a,{href:"https://docs.substrate.io/tutorials/smart-contracts/",children:"Substrate ink! Workshop"})," - Walks you\nthrough the basics of writing and deploying an ERC-20 token using ",(0,r.jsx)(t.code,{children:"ink!"}),"."]}),"\n"]}),"\n",(0,r.jsx)(t.h3,{id:"contracts-pallet",children:"Contracts Pallet"}),"\n",(0,r.jsx)(t.p,{children:"The experience of deploying to an EVM-based chain may be more familiar to developers that have\nwritten smart contracts before. However, the Contracts pallet makes some notable improvements to the\ndesign of the EVM:"}),"\n",(0,r.jsxs)(t.ol,{children:["\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.strong,{children:"Wasm"}),". The Contracts pallet uses WebAssembly as its compilation target. Any language that\ncompiles to Wasm can potentially be used to write smart contracts. Nevertheless, it is better to\nhave a dedicated domain-specific language, and for that reason Parity offers the ",(0,r.jsx)(t.a,{href:"#ink",children:"ink!"}),"\nlanguage."]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.strong,{children:"Deposit"}),". Contracts must hold a deposit (named ",(0,r.jsx)(t.em,{children:"ContractDeposit"})," ) suitably large enough in\norder to justify their existence on-chain. A deployer needs to deposit this into the new contract\non top of the ",(0,r.jsx)(t.em,{children:"ExistentialDeposit"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.strong,{children:"Caching"}),". Contracts are cached by default and therefore means they only need to be deployed\nonce and afterward be instantiated as many times as you want. This helps to keep the storage load\non the chain down to the minimum. On top of this, when a contract is no longer being used and the\n",(0,r.jsx)(t.em,{children:"existential deposit"})," is drained, the code will be erased from storage (known as reaping)."]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(t.h4,{id:"storage-rent-deprecated",children:"Storage Rent: Deprecated"}),"\n",(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.code,{children:"pallet_contracts"})," was initially designed to combat unbounded state growth by charging contracts for\nthe state they consume but has since been deprecated."]}),"\n",(0,r.jsxs)(t.p,{children:["See the associated ",(0,r.jsx)(t.a,{href:"https://github.com/paritytech/substrate/pull/9669",children:"pull request"})," for more\ndetails."]}),"\n",(0,r.jsx)(t.h3,{id:"polkadot-standards-proposals-psps",children:"Polkadot Standards Proposals (PSPs)"}),"\n",(0,r.jsx)(t.p,{children:"Web3 Foundation supports proposals for Polkadot that define a set standards to fit ecosystem needs.\nThese standards go through several acceptance phases, where the engagement of the whole community is\nneeded to build valuable and future-proof standards. All the teams who will benefit from a standard\nneed to agree on its content."}),"\n",(0,r.jsxs)(t.p,{children:["Some of these PSPs are targeting Substrate's ",(0,r.jsx)(t.code,{children:"contracts"})," pallet:"]}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.a,{href:"https://github.com/w3f/PSPs/blob/master/PSPs/psp-22.md",children:"PSP22 - Fungible Token Standard"})," Please\nvisit ",(0,r.jsx)(t.a,{href:"https://github.com/w3f/PSPs",children:"Polkadot Standards Proposals (PSPs) Github"})," for more\ninformation."]}),"\n"]}),"\n",(0,r.jsx)(t.h3,{id:"ink",children:"Ink"}),"\n",(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.a,{href:"https://github.com/paritytech/ink",children:"ink!"})," is a domain specific language for writing smart contracts\nin Rust and compiles to Wasm code. As it states in its README, it is still in an experimental phase\nso brave developers should be aware that they might have a bumpy - but workable - development\nexperience. There are some projects that have built projects in ink! with a decent level of\ncomplexity such as Plasm's ",(0,r.jsx)(t.a,{href:"https://github.com/staketechnologies/Plasm",children:"Plasma contracts"}),", so it is\nmature enough to start building interesting things."]}),"\n",(0,r.jsxs)(t.p,{children:["For interested developers, they can get started writing smart contracts using ink! by studying the\n",(0,r.jsx)(t.a,{href:"https://github.com/paritytech/ink/tree/master/examples",children:"examples"})," that were already written. These\ncan be used as guideposts to writing more complex logic that will be deployable on smart contract\nparachains."]}),"\n",(0,r.jsx)(t.p,{children:"ink! has laid much of the groundwork for a new smart contract stack that is based on a Wasm virtual\nmachine and compatible with Substrate chains."}),"\n",(0,r.jsxs)(t.h4,{id:"libraries-for-smart-contracts-in-ink",children:["Libraries for Smart Contracts in ",(0,r.jsx)(t.code,{children:"ink!"})]}),"\n",(0,r.jsxs)(t.p,{children:["Collected below are some community examples of smart contracts in ",(0,r.jsx)(t.code,{children:"ink!"}),". ",(0,r.jsx)(t.strong,{children:"Are you working on a\nsmart contract example? Ask us to add it to this page!"})]}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.a,{href:"https://docs.openbrush.io/",children:"OpenBrush"}),": an ",(0,r.jsx)(t.code,{children:"ink!"})," library providing standard contracts based on\n",(0,r.jsx)(t.a,{href:"https://github.com/w3f/PSPs",children:"PSP"})," with useful contracts and macros for building."]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.a,{href:"https://inkathon.xyz/",children:"ink!athon"}),": Starterkit for full-stack dApps with ink! smart contracts &\nfrontend."]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.a,{href:"https://github.com/patractlabs/metis",children:"Metis"}),": a Wasm contract standard library, developed by\n",(0,r.jsx)(t.a,{href:"https://github.com/patractlabs",children:"Patract Labs"}),"."]}),"\n"]}),"\n",(0,r.jsx)(t.h2,{id:"smart-contract-environments",children:"Smart Contract Environments"}),"\n",(0,r.jsx)(t.p,{children:"It is still early for smart contracts on the relay chain and the development is only now\nstabilizing. We are actively producing content to help developers get up to speed and will maintain\nthe Wiki with the latest resources. You should also keep up to date with the following links:"}),"\n",(0,r.jsx)(t.h3,{id:"parity-tech",children:"Parity Tech"}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsx)(t.li,{children:(0,r.jsx)(t.a,{href:"https://github.com/paritytech/ink",children:"ink!"})}),"\n",(0,r.jsx)(t.li,{children:(0,r.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/substrate/frame/contracts",children:"Substrate contracts pallet"})}),"\n"]}),"\n",(0,r.jsx)(t.h3,{id:"parachains",children:"Parachains"}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsx)(t.li,{children:(0,r.jsx)(t.a,{href:"https://moonbeam.network/",children:"Moonbeam"})}),"\n",(0,r.jsx)(t.li,{children:(0,r.jsx)(t.a,{href:"https://astar.network/",children:"Astar"})}),"\n",(0,r.jsx)(t.li,{children:(0,r.jsx)(t.a,{href:"https://acala.network/",children:"Acala"})}),"\n",(0,r.jsx)(t.li,{children:(0,r.jsx)(t.a,{href:"https://phala.network",children:"Phala"})}),"\n",(0,r.jsx)(t.li,{children:(0,r.jsx)(t.a,{href:"https://darwinia.network/",children:"Darwinia"})}),"\n"]}),"\n",(0,r.jsxs)(t.p,{children:["Many smart contract platforms are building to become a parachain in the ecosystem. A community\ncreated and maintained list of different smart contract platforms building on Polkadot can be found\nat ",(0,r.jsx)(t.a,{href:"https://www.polkaproject.com/#/projects?cateID=1&tagID=6",children:"PolkaProjects"}),". Additionally,\ninformation about ink smart contracts can be accessed at\n",(0,r.jsx)(t.a,{href:"https://use.ink/#where-can-i-deploy-ink-contracts",children:"use.ink"}),"."]}),"\n",(0,r.jsx)(t.h4,{id:"moonbeam",children:"Moonbeam"}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:["ink!: ",(0,r.jsx)(t.strong,{children:"Unsupported"})]}),"\n",(0,r.jsxs)(t.li,{children:["EVM (Solidity): ",(0,r.jsx)(t.a,{href:"https://moonbeam.network/networks/moonbeam/",children:(0,r.jsx)(t.strong,{children:"Supported"})})]}),"\n"]}),"\n",(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.a,{href:"https://moonbeam.network/",children:"Moonbeam"})," is another project that is planning to deploy to Polkadot as a\nparachain and will support Ethereum compatible smart contracts. Since Moonbeam uses\n",(0,r.jsx)(t.a,{href:"https://github.com/paritytech/frontier",children:"Frontier"}),", an interoperability layer with existing Ethereum\ntooling, it will support all applications that are written to target the EVM environment with little\nfriction."]}),"\n",(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.a,{href:"https://docs.moonbeam.network/networks/moonriver/",children:"Moonriver"}),", a companion network to Moonbeam,\nlaunched as a parachain on Kusama. Parachain functionality is live, and features are being\nincrementally released. The final phase of the launch will include EVM functionality and balance\ntransfers."]}),"\n",(0,r.jsxs)(t.p,{children:["Try deploying a smart contract to Moonbeam by following their\n",(0,r.jsx)(t.a,{href:"https://docs.moonbeam.network/",children:"documentation"}),"."]}),"\n",(0,r.jsx)(t.h4,{id:"astar",children:"Astar"}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:["ink!/Wasm: ",(0,r.jsx)(t.a,{href:"https://docs.astar.network/docs/build/#wasm-smart-contracts",children:(0,r.jsx)(t.strong,{children:"Supported"})})]}),"\n",(0,r.jsxs)(t.li,{children:["EVM (Solidity): ",(0,r.jsxs)(t.a,{href:"https://docs.astar.network/docs/build/#evm-smart-contracts",children:[" ",(0,r.jsx)(t.strong,{children:"Supported"})]})]}),"\n"]}),"\n",(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.a,{href:"https://astar.network/",children:"Astar Network"})," supports the building of dApps with EVM and WASM smart\ncontracts and offers developers true interoperability. True interoperability with cross-consensus\nmessaging ",(0,r.jsx)(t.a,{href:"https://wiki.polkadot.network/docs/learn-xcm",children:"XCM"})," and cross-virtual machine\n",(0,r.jsx)(t.a,{href:"https://github.com/AstarNetwork/",children:"XVM"}),". We are made by developers and for developers. Astar\u2019s\nunique Build2Earn model empowers developers to get paid through a dApp staking mechanism for the\ncode they write and dApps they build."]}),"\n",(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.a,{href:"https://shiden.astar.network/",children:"Shiden Network"})," is the canary network of Astar Network, live as a\nparachain on Kusama, and supports the EVM and WASM environment for all developers who want to build\nout use-cases in a canary network with economic value. Shiden acts as a playground for developers."]}),"\n",(0,r.jsxs)(t.p,{children:["Try deploying an Ethereum or ink! smart contract by following their\n",(0,r.jsx)(t.a,{href:"https://docs.astar.network/",children:"documentation"}),"."]}),"\n",(0,r.jsx)(t.h4,{id:"acala",children:"Acala"}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:["ink!: ",(0,r.jsx)(t.strong,{children:"Unsupported"})]}),"\n",(0,r.jsxs)(t.li,{children:["EVM (Solidity): ",(0,r.jsx)(t.a,{href:"https://wiki.acala.network/build/development-guide",children:(0,r.jsx)(t.strong,{children:"Supported"})})]}),"\n"]}),"\n",(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.a,{href:"https://acala.network/",children:"Acala"})," is a decentralized finance consortium and DeFi infrastructure chain\ndelivering a set of protocols to serve as the DeFi hub on Polkadot.\n",(0,r.jsx)(t.a,{href:"https://acala.network/karura",children:"Karura"}),", Acala's canary network is live as a parachain on Kusama.\nInterested teams are now able to deploy DApps and smart contracts on Karura's platform. Acala is\nalso implementing the ",(0,r.jsx)(t.a,{href:"https://wiki.acala.network/learn/acala-evm/why-acala-evm",children:"Acala EVM"}),"."]}),"\n",(0,r.jsxs)(t.p,{children:["Try deploying an Acala EVM smart contract by following their\n",(0,r.jsx)(t.a,{href:"https://wiki.acala.network/build/development-guide/smart-contracts",children:"documentation"}),"."]}),"\n",(0,r.jsx)(t.h4,{id:"phala",children:"Phala"}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:["ink!: ",(0,r.jsx)(t.strong,{children:"Unsupported"})]}),"\n",(0,r.jsxs)(t.li,{children:["EVM (Solidity): ",(0,r.jsx)(t.strong,{children:"Unsupported"})]}),"\n",(0,r.jsxs)(t.li,{children:["See: ",(0,r.jsx)(t.a,{href:"https://docs.phala.network/developers/phat-contract",children:(0,r.jsx)(t.strong,{children:"Phat Contracts"})})," powered by ink!"]}),"\n"]}),"\n",(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.a,{href:"https://phala.network",children:"Phala"})," is an off-chain trustless compute infrastructure that provides fully\nverifiable computation. Using ",(0,r.jsx)(t.a,{href:"https://docs.phala.network/developers/phat-contract",children:"Phat contracts"}),",\ndevelopers can write smart contracts that can interact with web2 services.\n",(0,r.jsx)(t.a,{href:"https://phala.network/en/khala",children:"Khala"})," is Phala's canary network and is live as a parachain on\nKusama."]}),"\n",(0,r.jsxs)(t.p,{children:["Try deploying a smart contract that interacts with Etherscan's web2 API by following their\n",(0,r.jsx)(t.a,{href:"https://docs.phala.network/developers/build-on-phat-contract/create-contract",children:"documentation"}),"."]}),"\n",(0,r.jsx)(t.h4,{id:"darwinia",children:"Darwinia"}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:["ink!: ",(0,r.jsx)(t.strong,{children:"Unsupported"})]}),"\n",(0,r.jsxs)(t.li,{children:["EVM (Solidity) Support:\n",(0,r.jsx)(t.a,{href:"https://docs.darwinia.network/libraries-4a4ce70014ba43b7977aeb16ce9634ab",children:(0,r.jsx)(t.strong,{children:"Supported"})})]}),"\n"]}),"\n",(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.a,{href:"https://darwinia.network/",children:"Darwinia"})," is a community-run technology and service powering the\ncross-chain capabilities of decentralized applications. By crafting secure and efficient cross-chain\nmessaging protocols, Darwinia is at the forefront of facilitating seamless communication between\ndisparate blockchain networks. The newest addition to the suite of protocols is ",(0,r.jsx)(t.code,{children:"Darwinia Msgport"}),",\nan innovative messaging abstraction that has been successfully implemented across a wide array of\nmainstream smart contract platforms, broadening the potential for interoperability and enabling\ndevelopers to create more versatile and connected blockchain ecosystems."]}),"\n",(0,r.jsxs)(t.p,{children:["Try deploying a smart contract to Darwinia by following their\n",(0,r.jsx)(t.a,{href:"https://docs.darwinia.network/dapp-development-4b021f21c52d474aa08a8109eb55bbd1",children:"documentation"}),"."]}),"\n",(0,r.jsx)(t.h2,{id:"keep-in-touch",children:"Keep In Touch"}),"\n",(0,r.jsx)(t.p,{children:"Even though the tooling is still maturing, the advantage of being early will be the familiarity and\nhead start on your project, allowing you to innovate and create something truly new."}),"\n",(0,r.jsxs)(t.p,{children:["If you have interesting ideas for smart contracts on Polkadot feel free to drop into the\n",(0,r.jsx)(t.a,{href:"https://matrix.to/#/#polkadot-watercooler:matrix.org",children:"Polkadot Watercooler"})," to talk about them.\nDevelopers may be interested in joining the\n",(0,r.jsx)(t.a,{href:"https://matrix.to/#/#polkadotnoobs:matrix.org",children:"Polkadot Beginners Lounge"})," or\n",(0,r.jsx)(t.a,{href:"https://substrate.stackexchange.com/",children:"Substrate and Polkadot StackExchange"})," to ask their questions.\nAs always, keep up to date with Polkadot and Kusama by following the\n",(0,r.jsx)(t.a,{href:"/docs/community",children:"social channels"}),"."]})]})}function d(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(h,{...e})}):h(e)}},28453:(e,t,n)=>{n.d(t,{R:()=>i,x:()=>o});var a=n(96540);const r={},s=a.createContext(r);function i(e){const t=a.useContext(s);return a.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),a.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/987d08ef.a70802d8.js b/assets/js/987d08ef.a70802d8.js deleted file mode 100644 index 8c76a6e2a21d..000000000000 --- a/assets/js/987d08ef.a70802d8.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6496],{73036:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>i,default:()=>d,frontMatter:()=>s,metadata:()=>o,toc:()=>l});var a=n(74848),r=n(28453);const s={id:"build-smart-contracts",title:"Smart Contracts",sidebar_label:"Smart Contracts",description:"How smart contracts play their role in the Polkadot ecosystem.",keywords:["build","smart contract","evm","wasm"],slug:"../build-smart-contracts"},i=void 0,o={id:"build/build-smart-contracts",title:"Smart Contracts",description:"How smart contracts play their role in the Polkadot ecosystem.",source:"@site/../docs/build/build-smart-contracts.md",sourceDirName:"build",slug:"/build-smart-contracts",permalink:"/docs/build-smart-contracts",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/build/build-smart-contracts.md",tags:[],version:"current",lastUpdatedBy:"henrique-c-ladeira",lastUpdatedAt:1728142286e3,frontMatter:{id:"build-smart-contracts",title:"Smart Contracts",sidebar_label:"Smart Contracts",description:"How smart contracts play their role in the Polkadot ecosystem.",keywords:["build","smart contract","evm","wasm"],slug:"../build-smart-contracts"},sidebar:"docs",previous:{title:"Node Interaction",permalink:"/docs/build-node-interaction"},next:{title:"Protocol Development Resources",permalink:"/docs/build-protocol-index"}},c={},l=[{value:"Difference between developing a smart contract and a parachain",id:"difference-between-developing-a-smart-contract-and-a-parachain",level:2},{value:"Layer of Abstraction",id:"layer-of-abstraction",level:3},{value:"Gas Fees",id:"gas-fees",level:3},{value:"Building a Smart Contract",id:"building-a-smart-contract",level:2},{value:"Frontier EVM Contracts",id:"frontier-evm-contracts",level:3},{value:"Substrate Contracts",id:"substrate-contracts",level:3},{value:"Resources",id:"resources",level:4},{value:"Contracts Pallet",id:"contracts-pallet",level:3},{value:"Storage Rent: Deprecated",id:"storage-rent-deprecated",level:4},{value:"Polkadot Standards Proposals (PSPs)",id:"polkadot-standards-proposals-psps",level:3},{value:"Ink",id:"ink",level:3},{value:"Libraries for Smart Contracts in ink!",id:"libraries-for-smart-contracts-in-ink",level:4},{value:"Smart Contract Environments",id:"smart-contract-environments",level:2},{value:"Parity Tech",id:"parity-tech",level:3},{value:"Parachains",id:"parachains",level:3},{value:"Moonbeam",id:"moonbeam",level:4},{value:"Astar",id:"astar",level:4},{value:"Acala",id:"acala",level:4},{value:"Phala",id:"phala",level:4},{value:"Darwinia",id:"darwinia",level:4},{value:"Keep In Touch",id:"keep-in-touch",level:2}];function h(e){const t={a:"a",code:"code",em:"em",h2:"h2",h3:"h3",h4:"h4",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(t.p,{children:"The relay chain which is a layer 0 blockchain, does not support smart contracts natively. However,\nparachains which are layer 1 blockchains are equipped with the functionality to support smart\ncontracts."}),"\n",(0,a.jsxs)(t.p,{children:["The two primary supported smart contract environments are ",(0,a.jsx)(t.a,{href:"#ink",children:"ink!"})," and EVM. There are multiple\n",(0,a.jsx)(t.a,{href:"#parachains",children:"parachains that support both environments"}),"."]}),"\n",(0,a.jsx)(t.h2,{id:"difference-between-developing-a-smart-contract-and-a-parachain",children:"Difference between developing a smart contract and a parachain"}),"\n",(0,a.jsx)(t.h3,{id:"layer-of-abstraction",children:"Layer of Abstraction"}),"\n",(0,a.jsx)(t.p,{children:"When you write a smart contract, you are creating the instructions that associate with and deploy on\na specific chain address."}),"\n",(0,a.jsx)(t.p,{children:"In comparison, a runtime module on a parachain is the entire logic of a chain's state transitions\n(what's called a state transition function)."}),"\n",(0,a.jsx)(t.p,{children:"Smart contracts must consciously implement upgradeability while parachains have the ability to swap\nout their code entirely through a root command or via the governance pallet."}),"\n",(0,a.jsx)(t.p,{children:"When you build a smart contract, it will eventually be deployed to a target chain with its own\nenvironment. Parachains allow the developer to declare the environment of their own chain, even\nallowing others to write smart contracts for it."}),"\n",(0,a.jsx)(t.h3,{id:"gas-fees",children:"Gas Fees"}),"\n",(0,a.jsxs)(t.p,{children:["Smart contracts must find a way to limit their own execution, or else full nodes are vulnerable to\nDOS attacks. An infinite loop in a smart contract, for example, could consume the computational\nresources of an entire chain, preventing others from using it. The\n",(0,a.jsx)(t.a,{href:"https://en.wikipedia.org/wiki/Halting_problem",children:"halting problem"}),' shows that even with a powerful\nenough language, it is impossible to know ahead of time whether or not a program will ever cease\nexecution. Some platforms, such as Bitcoin, get around this constraint by providing a very\nrestricted scripting language. Others, such as Ethereum, "charge" the smart contract "gas" for the\nrights to execute their code. If a smart contract does get into a state where execution will never\nhalt, it eventually runs out of gas, ceases execution, and any state transition that the smart\ncontract would have made is rolled back.']}),"\n",(0,a.jsxs)(t.p,{children:["Parachains can implement arbitrarily powerful programming languages and contain no gas notion for\ntheir own native logic. This means that some functionality is easier to implement for the developer,\nbut some constructs, such as a loop without a terminating condition, should ",(0,a.jsx)(t.em,{children:"never"})," be implemented.\nLeaving certain logic, such as complex loops that could run indefinitely, to a non-smart contract\nlayer, or even trying to eliminate it, will often be a wiser choice. Parachains try to be proactive,\nwhile smart contract platforms are event-driven."]}),"\n",(0,a.jsxs)(t.p,{children:["Relay chain and parachains typically use the ",(0,a.jsx)(t.em,{children:"weight-fee model"})," and not a ",(0,a.jsx)(t.em,{children:"gas-metering model"}),"."]}),"\n",(0,a.jsx)(t.h2,{id:"building-a-smart-contract",children:"Building a Smart Contract"}),"\n",(0,a.jsx)(t.p,{children:"The relay chain does not natively support smart contracts. However, since the parachains that\nconnect to the relay chain can support arbitrary state transitions, they support smart contracts."}),"\n",(0,a.jsx)(t.p,{children:"Substrate presently supports smart contracts out-of-the-box in several ways:"}),"\n",(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsxs)(t.li,{children:["The EVM pallet offered by ",(0,a.jsx)(t.a,{href:"https://github.com/paritytech/frontier",children:"Frontier"}),"."]}),"\n",(0,a.jsxs)(t.li,{children:["The\n",(0,a.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/contracts/",children:"Contracts pallet"}),"\nin the FRAME library for Wasm-based contracts."]}),"\n"]}),"\n",(0,a.jsx)(t.h3,{id:"frontier-evm-contracts",children:"Frontier EVM Contracts"}),"\n",(0,a.jsxs)(t.p,{children:[(0,a.jsx)(t.a,{href:"https://github.com/paritytech/frontier",children:"Frontier"})," is the suite of tools that enables a Substrate\nchain to run Ethereum contracts (EVM) natively with the same API/RPC interface, Ethereum exposes on\nSubstrate. Ethereum Addresses can also be mapped directly to and from Substrate's SS58 scheme from\nexisting accounts."]}),"\n",(0,a.jsx)(t.h3,{id:"substrate-contracts",children:"Substrate Contracts"}),"\n",(0,a.jsxs)(t.p,{children:["Substrate offers a built-in\n",(0,a.jsx)(t.a,{href:"https://paritytech.github.io/substrate/master/pallet_contracts/index.html",children:"contract pallet"}),";\nparachains can also support ",(0,a.jsx)(t.a,{href:"/docs/learn-wasm",children:"WebAssembly"})," smart contracts. Additionally,\nthere is the ",(0,a.jsx)(t.a,{href:"https://github.com/paritytech/frontier/tree/master/frame/evm#evm-module",children:"EVM Pallet"}),",\nwhich allows a parachain to implement the Ethereum Virtual Machine, thereby supporting almost direct\nports of Ethereum contracts."]}),"\n",(0,a.jsxs)(t.p,{children:["A video version of the recap of the smart contract situation is available on the\n",(0,a.jsx)(t.a,{href:"https://www.youtube.com/watch?v=fKHkFBXaUxQ",children:"Polkadot YouTube channel"}),"."]}),"\n",(0,a.jsx)(t.h4,{id:"resources",children:"Resources"}),"\n",(0,a.jsxs)(t.p,{children:[(0,a.jsx)(t.a,{href:"https://stackoverflow.com/a/56041305",children:"When should I build a Substrate runtime versus a Substrate smart contract"}),"?\nThis post answers the question more technically of when a developer might choose to develop a\nruntime versus a smart contract."]}),"\n",(0,a.jsx)(t.p,{children:"Here is the list of current resources available to developers who want to get started writing smart\ncontracts to deploy on parachains based on Substrate."}),"\n",(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.a,{href:"https://github.com/paritytech/ink",children:"ink!"})," - Parity's ink to write smart contracts."]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.a,{href:"https://docs.substrate.io/tutorials/smart-contracts/",children:"Substrate ink! Workshop"})," - Walks you\nthrough the basics of writing and deploying an ERC-20 token using ",(0,a.jsx)(t.code,{children:"ink!"}),"."]}),"\n"]}),"\n",(0,a.jsx)(t.h3,{id:"contracts-pallet",children:"Contracts Pallet"}),"\n",(0,a.jsx)(t.p,{children:"The experience of deploying to an EVM-based chain may be more familiar to developers that have\nwritten smart contracts before. However, the Contracts pallet makes some notable improvements to the\ndesign of the EVM:"}),"\n",(0,a.jsxs)(t.ol,{children:["\n",(0,a.jsxs)(t.li,{children:["\n",(0,a.jsxs)(t.p,{children:[(0,a.jsx)(t.strong,{children:"Wasm"}),". The Contracts pallet uses WebAssembly as its compilation target. Any language that\ncompiles to Wasm can potentially be used to write smart contracts. Nevertheless, it is better to\nhave a dedicated domain-specific language, and for that reason Parity offers the ",(0,a.jsx)(t.a,{href:"#ink",children:"ink!"}),"\nlanguage."]}),"\n"]}),"\n",(0,a.jsxs)(t.li,{children:["\n",(0,a.jsxs)(t.p,{children:[(0,a.jsx)(t.strong,{children:"Deposit"}),". Contracts must hold a deposit (named ",(0,a.jsx)(t.em,{children:"ContractDeposit"})," ) suitably large enough in\norder to justify their existence on-chain. A deployer needs to deposit this into the new contract\non top of the ",(0,a.jsx)(t.em,{children:"ExistentialDeposit"}),"."]}),"\n"]}),"\n",(0,a.jsxs)(t.li,{children:["\n",(0,a.jsxs)(t.p,{children:[(0,a.jsx)(t.strong,{children:"Caching"}),". Contracts are cached by default and therefore means they only need to be deployed\nonce and afterward be instantiated as many times as you want. This helps to keep the storage load\non the chain down to the minimum. On top of this, when a contract is no longer being used and the\n",(0,a.jsx)(t.em,{children:"existential deposit"})," is drained, the code will be erased from storage (known as reaping)."]}),"\n"]}),"\n"]}),"\n",(0,a.jsx)(t.h4,{id:"storage-rent-deprecated",children:"Storage Rent: Deprecated"}),"\n",(0,a.jsxs)(t.p,{children:[(0,a.jsx)(t.code,{children:"pallet_contracts"})," was initially designed to combat unbounded state growth by charging contracts for\nthe state they consume but has since been deprecated."]}),"\n",(0,a.jsxs)(t.p,{children:["See the associated ",(0,a.jsx)(t.a,{href:"https://github.com/paritytech/substrate/pull/9669",children:"pull request"})," for more\ndetails."]}),"\n",(0,a.jsx)(t.h3,{id:"polkadot-standards-proposals-psps",children:"Polkadot Standards Proposals (PSPs)"}),"\n",(0,a.jsx)(t.p,{children:"Web3 Foundation supports proposals for Polkadot that define a set standards to fit ecosystem needs.\nThese standards go through several acceptance phases, where the engagement of the whole community is\nneeded to build valuable and future-proof standards. All the teams who will benefit from a standard\nneed to agree on its content."}),"\n",(0,a.jsxs)(t.p,{children:["Some of these PSPs are targeting Substrate's ",(0,a.jsx)(t.code,{children:"contracts"})," pallet:"]}),"\n",(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.a,{href:"https://github.com/w3f/PSPs/blob/master/PSPs/psp-22.md",children:"PSP22 - Fungible Token Standard"})," Please\nvisit ",(0,a.jsx)(t.a,{href:"https://github.com/w3f/PSPs",children:"Polkadot Standards Proposals (PSPs) Github"})," for more\ninformation."]}),"\n"]}),"\n",(0,a.jsx)(t.h3,{id:"ink",children:"Ink"}),"\n",(0,a.jsxs)(t.p,{children:[(0,a.jsx)(t.a,{href:"https://github.com/paritytech/ink",children:"ink!"})," is a domain specific language for writing smart contracts\nin Rust and compiles to Wasm code. As it states in its README, it is still in an experimental phase\nso brave developers should be aware that they might have a bumpy - but workable - development\nexperience. There are some projects that have built projects in ink! with a decent level of\ncomplexity such as Plasm's ",(0,a.jsx)(t.a,{href:"https://github.com/staketechnologies/Plasm",children:"Plasma contracts"}),", so it is\nmature enough to start building interesting things."]}),"\n",(0,a.jsxs)(t.p,{children:["For interested developers, they can get started writing smart contracts using ink! by studying the\n",(0,a.jsx)(t.a,{href:"https://github.com/paritytech/ink/tree/master/examples",children:"examples"})," that were already written. These\ncan be used as guideposts to writing more complex logic that will be deployable on smart contract\nparachains."]}),"\n",(0,a.jsx)(t.p,{children:"ink! has laid much of the groundwork for a new smart contract stack that is based on a Wasm virtual\nmachine and compatible with Substrate chains."}),"\n",(0,a.jsxs)(t.h4,{id:"libraries-for-smart-contracts-in-ink",children:["Libraries for Smart Contracts in ",(0,a.jsx)(t.code,{children:"ink!"})]}),"\n",(0,a.jsxs)(t.p,{children:["Collected below are some community examples of smart contracts in ",(0,a.jsx)(t.code,{children:"ink!"}),". ",(0,a.jsx)(t.strong,{children:"Are you working on a\nsmart contract example? Ask us to add it to this page!"})]}),"\n",(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.a,{href:"https://docs.openbrush.io/",children:"OpenBrush"}),": an ",(0,a.jsx)(t.code,{children:"ink!"})," library providing standard contracts based on\n",(0,a.jsx)(t.a,{href:"https://github.com/w3f/PSPs",children:"PSP"})," with useful contracts and macros for building."]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.a,{href:"https://inkathon.xyz/",children:"ink!athon"}),": Starterkit for full-stack dApps with ink! smart contracts &\nfrontend."]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.a,{href:"https://github.com/patractlabs/metis",children:"Metis"}),": a Wasm contract standard library, developed by\n",(0,a.jsx)(t.a,{href:"https://github.com/patractlabs",children:"Patract Labs"}),"."]}),"\n"]}),"\n",(0,a.jsx)(t.h2,{id:"smart-contract-environments",children:"Smart Contract Environments"}),"\n",(0,a.jsx)(t.p,{children:"It is still early for smart contracts on the relay chain and the development is only now\nstabilizing. We are actively producing content to help developers get up to speed and will maintain\nthe Wiki with the latest resources. You should also keep up to date with the following links:"}),"\n",(0,a.jsx)(t.h3,{id:"parity-tech",children:"Parity Tech"}),"\n",(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsx)(t.li,{children:(0,a.jsx)(t.a,{href:"https://github.com/paritytech/ink",children:"ink!"})}),"\n",(0,a.jsx)(t.li,{children:(0,a.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/substrate/frame/contracts",children:"Substrate contracts pallet"})}),"\n"]}),"\n",(0,a.jsx)(t.h3,{id:"parachains",children:"Parachains"}),"\n",(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsx)(t.li,{children:(0,a.jsx)(t.a,{href:"https://moonbeam.network/",children:"Moonbeam"})}),"\n",(0,a.jsx)(t.li,{children:(0,a.jsx)(t.a,{href:"https://astar.network/",children:"Astar"})}),"\n",(0,a.jsx)(t.li,{children:(0,a.jsx)(t.a,{href:"https://acala.network/",children:"Acala"})}),"\n",(0,a.jsx)(t.li,{children:(0,a.jsx)(t.a,{href:"https://phala.network",children:"Phala"})}),"\n",(0,a.jsx)(t.li,{children:(0,a.jsx)(t.a,{href:"https://darwinia.network/",children:"Darwinia"})}),"\n"]}),"\n",(0,a.jsxs)(t.p,{children:["Many smart contract platforms are building to become a parachain in the ecosystem. A community\ncreated and maintained list of different smart contract platforms building on Polkadot can be found\nat ",(0,a.jsx)(t.a,{href:"https://www.polkaproject.com/#/projects?cateID=1&tagID=6",children:"PolkaProjects"}),". Additionally,\ninformation about ink smart contracts can be accessed at\n",(0,a.jsx)(t.a,{href:"https://use.ink/#where-can-i-deploy-ink-contracts",children:"use.ink"}),"."]}),"\n",(0,a.jsx)(t.h4,{id:"moonbeam",children:"Moonbeam"}),"\n",(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsxs)(t.li,{children:["ink!: ",(0,a.jsx)(t.strong,{children:"Unsupported"})]}),"\n",(0,a.jsxs)(t.li,{children:["EVM (Solidity): ",(0,a.jsx)(t.a,{href:"https://moonbeam.network/networks/moonbeam/",children:(0,a.jsx)(t.strong,{children:"Supported"})})]}),"\n"]}),"\n",(0,a.jsxs)(t.p,{children:[(0,a.jsx)(t.a,{href:"https://moonbeam.network/",children:"Moonbeam"})," is another project that is planning to deploy to Polkadot as a\nparachain and will support Ethereum compatible smart contracts. Since Moonbeam uses\n",(0,a.jsx)(t.a,{href:"https://github.com/paritytech/frontier",children:"Frontier"}),", an interoperability layer with existing Ethereum\ntooling, it will support all applications that are written to target the EVM environment with little\nfriction."]}),"\n",(0,a.jsxs)(t.p,{children:[(0,a.jsx)(t.a,{href:"https://docs.moonbeam.network/networks/moonriver/",children:"Moonriver"}),", a companion network to Moonbeam,\nlaunched as a parachain on Kusama. Parachain functionality is live, and features are being\nincrementally released. The final phase of the launch will include EVM functionality and balance\ntransfers."]}),"\n",(0,a.jsxs)(t.p,{children:["Try deploying a smart contract to Moonbeam by following their\n",(0,a.jsx)(t.a,{href:"https://docs.moonbeam.network/",children:"documentation"}),"."]}),"\n",(0,a.jsx)(t.h4,{id:"astar",children:"Astar"}),"\n",(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsxs)(t.li,{children:["ink!/Wasm: ",(0,a.jsx)(t.a,{href:"https://docs.astar.network/docs/build/#wasm-smart-contracts",children:(0,a.jsx)(t.strong,{children:"Supported"})})]}),"\n",(0,a.jsxs)(t.li,{children:["EVM (Solidity): ",(0,a.jsxs)(t.a,{href:"https://docs.astar.network/docs/build/#evm-smart-contracts",children:[" ",(0,a.jsx)(t.strong,{children:"Supported"})]})]}),"\n"]}),"\n",(0,a.jsxs)(t.p,{children:[(0,a.jsx)(t.a,{href:"https://astar.network/",children:"Astar Network"})," supports the building of dApps with EVM and WASM smart\ncontracts and offers developers true interoperability. True interoperability with cross-consensus\nmessaging ",(0,a.jsx)(t.a,{href:"https://wiki.polkadot.network/docs/learn-xcm",children:"XCM"})," and cross-virtual machine\n",(0,a.jsx)(t.a,{href:"https://github.com/AstarNetwork/",children:"XVM"}),". We are made by developers and for developers. Astar\u2019s\nunique Build2Earn model empowers developers to get paid through a dApp staking mechanism for the\ncode they write and dApps they build."]}),"\n",(0,a.jsxs)(t.p,{children:[(0,a.jsx)(t.a,{href:"https://shiden.astar.network/",children:"Shiden Network"})," is the canary network of Astar Network, live as a\nparachain on Kusama, and supports the EVM and WASM environment for all developers who want to build\nout use-cases in a canary network with economic value. Shiden acts as a playground for developers."]}),"\n",(0,a.jsxs)(t.p,{children:["Try deploying an Ethereum or ink! smart contract by following their\n",(0,a.jsx)(t.a,{href:"https://docs.astar.network/",children:"documentation"}),"."]}),"\n",(0,a.jsx)(t.h4,{id:"acala",children:"Acala"}),"\n",(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsxs)(t.li,{children:["ink!: ",(0,a.jsx)(t.strong,{children:"Unsupported"})]}),"\n",(0,a.jsxs)(t.li,{children:["EVM (Solidity): ",(0,a.jsx)(t.a,{href:"https://wiki.acala.network/build/development-guide",children:(0,a.jsx)(t.strong,{children:"Supported"})})]}),"\n"]}),"\n",(0,a.jsxs)(t.p,{children:[(0,a.jsx)(t.a,{href:"https://acala.network/",children:"Acala"})," is a decentralized finance consortium and DeFi infrastructure chain\ndelivering a set of protocols to serve as the DeFi hub on Polkadot.\n",(0,a.jsx)(t.a,{href:"https://acala.network/karura",children:"Karura"}),", Acala's canary network is live as a parachain on Kusama.\nInterested teams are now able to deploy DApps and smart contracts on Karura's platform. Acala is\nalso implementing the ",(0,a.jsx)(t.a,{href:"https://wiki.acala.network/learn/acala-evm/why-acala-evm",children:"Acala EVM"}),"."]}),"\n",(0,a.jsxs)(t.p,{children:["Try deploying an Acala EVM smart contract by following their\n",(0,a.jsx)(t.a,{href:"https://wiki.acala.network/build/development-guide/smart-contracts",children:"documentation"}),"."]}),"\n",(0,a.jsx)(t.h4,{id:"phala",children:"Phala"}),"\n",(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsxs)(t.li,{children:["ink!: ",(0,a.jsx)(t.strong,{children:"Unsupported"})]}),"\n",(0,a.jsxs)(t.li,{children:["EVM (Solidity): ",(0,a.jsx)(t.strong,{children:"Unsupported"})]}),"\n",(0,a.jsxs)(t.li,{children:["See: ",(0,a.jsx)(t.a,{href:"https://docs.phala.network/developers/phat-contract",children:(0,a.jsx)(t.strong,{children:"Phat Contracts"})})," powered by ink!"]}),"\n"]}),"\n",(0,a.jsxs)(t.p,{children:[(0,a.jsx)(t.a,{href:"https://phala.network",children:"Phala"})," is an off-chain trustless compute infrastructure that provides fully\nverifiable computation. Using ",(0,a.jsx)(t.a,{href:"https://docs.phala.network/developers/phat-contract",children:"Phat contracts"}),",\ndevelopers can write smart contracts that can interact with web2 services.\n",(0,a.jsx)(t.a,{href:"https://phala.network/en/khala",children:"Khala"})," is Phala's canary network and is live as a parachain on\nKusama."]}),"\n",(0,a.jsxs)(t.p,{children:["Try deploying a smart contract that interacts with Etherscan's web2 API by following their\n",(0,a.jsx)(t.a,{href:"https://docs.phala.network/developers/build-on-phat-contract/create-contract",children:"documentation"}),"."]}),"\n",(0,a.jsx)(t.h4,{id:"darwinia",children:"Darwinia"}),"\n",(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsxs)(t.li,{children:["ink!: ",(0,a.jsx)(t.strong,{children:"Unsupported"})]}),"\n",(0,a.jsxs)(t.li,{children:["EVM (Solidity) Support:\n",(0,a.jsx)(t.a,{href:"https://docs.darwinia.network/libraries-4a4ce70014ba43b7977aeb16ce9634ab",children:(0,a.jsx)(t.strong,{children:"Supported"})})]}),"\n"]}),"\n",(0,a.jsxs)(t.p,{children:[(0,a.jsx)(t.a,{href:"https://darwinia.network/",children:"Darwinia"})," is a community-run technology and service powering the\ncross-chain capabilities of decentralized applications. By crafting secure and efficient cross-chain\nmessaging protocols, Darwinia is at the forefront of facilitating seamless communication between\ndisparate blockchain networks. The newest addition to the suite of protocols is ",(0,a.jsx)(t.code,{children:"Darwinia Msgport"}),",\nan innovative messaging abstraction that has been successfully implemented across a wide array of\nmainstream smart contract platforms, broadening the potential for interoperability and enabling\ndevelopers to create more versatile and connected blockchain ecosystems."]}),"\n",(0,a.jsxs)(t.p,{children:["Try deploying a smart contract to Darwinia by following their\n",(0,a.jsx)(t.a,{href:"https://docs.darwinia.network/dapp-development-4b021f21c52d474aa08a8109eb55bbd1",children:"documentation"}),"."]}),"\n",(0,a.jsx)(t.h2,{id:"keep-in-touch",children:"Keep In Touch"}),"\n",(0,a.jsx)(t.p,{children:"Even though the tooling is still maturing, the advantage of being early will be the familiarity and\nhead start on your project, allowing you to innovate and create something truly new."}),"\n",(0,a.jsxs)(t.p,{children:["If you have interesting ideas for smart contracts on Polkadot feel free to drop into the\n",(0,a.jsx)(t.a,{href:"https://matrix.to/#/#polkadot-watercooler:matrix.org",children:"Polkadot Watercooler"})," to talk about them.\nDevelopers may be interested in joining the\n",(0,a.jsx)(t.a,{href:"https://matrix.to/#/#polkadotnoobs:matrix.org",children:"Polkadot Beginners Lounge"})," or\n",(0,a.jsx)(t.a,{href:"https://substrate.stackexchange.com/",children:"Substrate and Polkadot StackExchange"})," to ask their questions.\nAs always, keep up to date with Polkadot and Kusama by following the\n",(0,a.jsx)(t.a,{href:"/docs/community",children:"social channels"}),"."]})]})}function d(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,a.jsx)(t,{...e,children:(0,a.jsx)(h,{...e})}):h(e)}},28453:(e,t,n)=>{n.d(t,{R:()=>i,x:()=>o});var a=n(96540);const r={},s=a.createContext(r);function i(e){const t=a.useContext(s);return a.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),a.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/989.e17cb0a2.js b/assets/js/989.e17cb0a2.js deleted file mode 100644 index 857a34fdaece..000000000000 --- a/assets/js/989.e17cb0a2.js +++ /dev/null @@ -1,2105 +0,0 @@ -exports.id = 989; -exports.ids = [989]; -exports.modules = { - -/***/ 97375: -/***/ (function(module) { - -!function(e,t){ true?module.exports=t():0}(this,(function(){"use strict";return function(e,t){var r=t.prototype,n=r.format;r.format=function(e){var t=this,r=this.$locale();if(!this.isValid())return n.bind(this)(e);var s=this.$utils(),a=(e||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(e){switch(e){case"Q":return Math.ceil((t.$M+1)/3);case"Do":return r.ordinal(t.$D);case"gggg":return t.weekYear();case"GGGG":return t.isoWeekYear();case"wo":return r.ordinal(t.week(),"W");case"w":case"ww":return s.s(t.week(),"w"===e?1:2,"0");case"W":case"WW":return s.s(t.isoWeek(),"W"===e?1:2,"0");case"k":case"kk":return s.s(String(0===t.$H?24:t.$H),"k"===e?1:2,"0");case"X":return Math.floor(t.$d.getTime()/1e3);case"x":return t.$d.getTime();case"z":return"["+t.offsetName()+"]";case"zzz":return"["+t.offsetName("long")+"]";default:return e}}));return n.bind(this)(a)}}})); - -/***/ }), - -/***/ 90445: -/***/ (function(module) { - -!function(e,t){ true?module.exports=t():0}(this,(function(){"use strict";var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,r=/\d\d/,i=/\d\d?/,o=/\d*[^-_:/,()\s\d]+/,s={},a=function(e){return(e=+e)+(e>68?1900:2e3)};var f=function(e){return function(t){this[e]=+t}},h=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e)return 0;if("Z"===e)return 0;var t=e.match(/([+-]|\d\d)/g),n=60*t[1]+(+t[2]||0);return 0===n?0:"+"===t[0]?-n:n}(e)}],u=function(e){var t=s[e];return t&&(t.indexOf?t:t.s.concat(t.f))},d=function(e,t){var n,r=s.meridiem;if(r){for(var i=1;i<=24;i+=1)if(e.indexOf(r(i,0,t))>-1){n=i>12;break}}else n=e===(t?"pm":"PM");return n},c={A:[o,function(e){this.afternoon=d(e,!1)}],a:[o,function(e){this.afternoon=d(e,!0)}],Q:[n,function(e){this.month=3*(e-1)+1}],S:[n,function(e){this.milliseconds=100*+e}],SS:[r,function(e){this.milliseconds=10*+e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[i,f("seconds")],ss:[i,f("seconds")],m:[i,f("minutes")],mm:[i,f("minutes")],H:[i,f("hours")],h:[i,f("hours")],HH:[i,f("hours")],hh:[i,f("hours")],D:[i,f("day")],DD:[r,f("day")],Do:[o,function(e){var t=s.ordinal,n=e.match(/\d+/);if(this.day=n[0],t)for(var r=1;r<=31;r+=1)t(r).replace(/\[|\]/g,"")===e&&(this.day=r)}],w:[i,f("week")],ww:[r,f("week")],M:[i,f("month")],MM:[r,f("month")],MMM:[o,function(e){var t=u("months"),n=(u("monthsShort")||t.map((function(e){return e.slice(0,3)}))).indexOf(e)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[o,function(e){var t=u("months").indexOf(e)+1;if(t<1)throw new Error;this.month=t%12||t}],Y:[/[+-]?\d+/,f("year")],YY:[r,function(e){this.year=a(e)}],YYYY:[/\d{4}/,f("year")],Z:h,ZZ:h};function l(n){var r,i;r=n,i=s&&s.formats;for(var o=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var o=r&&r.toUpperCase();return n||i[r]||e[r]||i[o].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))).match(t),a=o.length,f=0;f-1)return new Date(("X"===t?1e3:1)*e);var i=l(t)(e),o=i.year,s=i.month,a=i.day,f=i.hours,h=i.minutes,u=i.seconds,d=i.milliseconds,c=i.zone,m=i.week,M=new Date,Y=a||(o||s?1:M.getDate()),p=o||M.getFullYear(),v=0;o&&!s||(v=s>0?s-1:M.getMonth());var D,w=f||0,g=h||0,y=u||0,L=d||0;return c?new Date(Date.UTC(p,v,Y,w,g,y,L+60*c.offset*1e3)):n?new Date(Date.UTC(p,v,Y,w,g,y,L)):(D=new Date(p,v,Y,w,g,y,L),m&&(D=r(D).week(m).toDate()),D)}catch(e){return new Date("")}}(t,a,r,n),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),u&&t!=this.format(a)&&(this.$d=new Date("")),s={}}else if(a instanceof Array)for(var c=a.length,m=1;m<=c;m+=1){o[1]=a[m-1];var M=n.apply(this,o);if(M.isValid()){this.$d=M.$d,this.$L=M.$L,this.init();break}m===c&&(this.$d=new Date(""))}else i.call(this,e)}}})); - -/***/ }), - -/***/ 68313: -/***/ (function(module) { - -!function(e,t){ true?module.exports=t():0}(this,(function(){"use strict";var e="day";return function(t,i,s){var a=function(t){return t.add(4-t.isoWeekday(),e)},d=i.prototype;d.isoWeekYear=function(){return a(this).year()},d.isoWeek=function(t){if(!this.$utils().u(t))return this.add(7*(t-this.isoWeek()),e);var i,d,n,o,r=a(this),u=(i=this.isoWeekYear(),d=this.$u,n=(d?s.utc:s)().year(i).startOf("year"),o=4-n.isoWeekday(),n.isoWeekday()>4&&(o+=7),n.add(o,e));return r.diff(u,"week")+1},d.isoWeekday=function(e){return this.$utils().u(e)?this.day()||7:this.day(this.day()%7?e:e-7)};var n=d.startOf;d.startOf=function(e,t){var i=this.$utils(),s=!!i.u(t)||t;return"isoweek"===i.p(e)?s?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):n.bind(this)(e,t)}}})); - -/***/ }), - -/***/ 8989: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ diagram: () => (/* binding */ diagram) -/* harmony export */ }); -/* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(16750); -/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(74353); -/* harmony import */ var dayjs_plugin_isoWeek_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(68313); -/* harmony import */ var dayjs_plugin_customParseFormat_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(90445); -/* harmony import */ var dayjs_plugin_advancedFormat_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(97375); -/* harmony import */ var _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(86079); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(26312); -/* harmony import */ var dompurify__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(99418); - - - - - - - - - - - - - - -var parser = function() { - var o = function(k, v, o2, l) { - for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) - ; - return o2; - }, $V0 = [6, 8, 10, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 30, 32, 33, 35, 37], $V1 = [1, 25], $V2 = [1, 26], $V3 = [1, 27], $V4 = [1, 28], $V5 = [1, 29], $V6 = [1, 30], $V7 = [1, 31], $V8 = [1, 9], $V9 = [1, 10], $Va = [1, 11], $Vb = [1, 12], $Vc = [1, 13], $Vd = [1, 14], $Ve = [1, 15], $Vf = [1, 16], $Vg = [1, 18], $Vh = [1, 19], $Vi = [1, 20], $Vj = [1, 21], $Vk = [1, 22], $Vl = [1, 24], $Vm = [1, 32]; - var parser2 = { - trace: function trace() { - }, - yy: {}, - symbols_: { "error": 2, "start": 3, "gantt": 4, "document": 5, "EOF": 6, "line": 7, "SPACE": 8, "statement": 9, "NL": 10, "weekday": 11, "weekday_monday": 12, "weekday_tuesday": 13, "weekday_wednesday": 14, "weekday_thursday": 15, "weekday_friday": 16, "weekday_saturday": 17, "weekday_sunday": 18, "dateFormat": 19, "inclusiveEndDates": 20, "topAxis": 21, "axisFormat": 22, "tickInterval": 23, "excludes": 24, "includes": 25, "todayMarker": 26, "title": 27, "acc_title": 28, "acc_title_value": 29, "acc_descr": 30, "acc_descr_value": 31, "acc_descr_multiline_value": 32, "section": 33, "clickStatement": 34, "taskTxt": 35, "taskData": 36, "click": 37, "callbackname": 38, "callbackargs": 39, "href": 40, "clickStatementDebug": 41, "$accept": 0, "$end": 1 }, - terminals_: { 2: "error", 4: "gantt", 6: "EOF", 8: "SPACE", 10: "NL", 12: "weekday_monday", 13: "weekday_tuesday", 14: "weekday_wednesday", 15: "weekday_thursday", 16: "weekday_friday", 17: "weekday_saturday", 18: "weekday_sunday", 19: "dateFormat", 20: "inclusiveEndDates", 21: "topAxis", 22: "axisFormat", 23: "tickInterval", 24: "excludes", 25: "includes", 26: "todayMarker", 27: "title", 28: "acc_title", 29: "acc_title_value", 30: "acc_descr", 31: "acc_descr_value", 32: "acc_descr_multiline_value", 33: "section", 35: "taskTxt", 36: "taskData", 37: "click", 38: "callbackname", 39: "callbackargs", 40: "href" }, - productions_: [0, [3, 3], [5, 0], [5, 2], [7, 2], [7, 1], [7, 1], [7, 1], [11, 1], [11, 1], [11, 1], [11, 1], [11, 1], [11, 1], [11, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 2], [9, 2], [9, 1], [9, 1], [9, 1], [9, 2], [34, 2], [34, 3], [34, 3], [34, 4], [34, 3], [34, 4], [34, 2], [41, 2], [41, 3], [41, 3], [41, 4], [41, 3], [41, 4], [41, 2]], - performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { - var $0 = $$.length - 1; - switch (yystate) { - case 1: - return $$[$0 - 1]; - case 2: - this.$ = []; - break; - case 3: - $$[$0 - 1].push($$[$0]); - this.$ = $$[$0 - 1]; - break; - case 4: - case 5: - this.$ = $$[$0]; - break; - case 6: - case 7: - this.$ = []; - break; - case 8: - yy.setWeekday("monday"); - break; - case 9: - yy.setWeekday("tuesday"); - break; - case 10: - yy.setWeekday("wednesday"); - break; - case 11: - yy.setWeekday("thursday"); - break; - case 12: - yy.setWeekday("friday"); - break; - case 13: - yy.setWeekday("saturday"); - break; - case 14: - yy.setWeekday("sunday"); - break; - case 15: - yy.setDateFormat($$[$0].substr(11)); - this.$ = $$[$0].substr(11); - break; - case 16: - yy.enableInclusiveEndDates(); - this.$ = $$[$0].substr(18); - break; - case 17: - yy.TopAxis(); - this.$ = $$[$0].substr(8); - break; - case 18: - yy.setAxisFormat($$[$0].substr(11)); - this.$ = $$[$0].substr(11); - break; - case 19: - yy.setTickInterval($$[$0].substr(13)); - this.$ = $$[$0].substr(13); - break; - case 20: - yy.setExcludes($$[$0].substr(9)); - this.$ = $$[$0].substr(9); - break; - case 21: - yy.setIncludes($$[$0].substr(9)); - this.$ = $$[$0].substr(9); - break; - case 22: - yy.setTodayMarker($$[$0].substr(12)); - this.$ = $$[$0].substr(12); - break; - case 24: - yy.setDiagramTitle($$[$0].substr(6)); - this.$ = $$[$0].substr(6); - break; - case 25: - this.$ = $$[$0].trim(); - yy.setAccTitle(this.$); - break; - case 26: - case 27: - this.$ = $$[$0].trim(); - yy.setAccDescription(this.$); - break; - case 28: - yy.addSection($$[$0].substr(8)); - this.$ = $$[$0].substr(8); - break; - case 30: - yy.addTask($$[$0 - 1], $$[$0]); - this.$ = "task"; - break; - case 31: - this.$ = $$[$0 - 1]; - yy.setClickEvent($$[$0 - 1], $$[$0], null); - break; - case 32: - this.$ = $$[$0 - 2]; - yy.setClickEvent($$[$0 - 2], $$[$0 - 1], $$[$0]); - break; - case 33: - this.$ = $$[$0 - 2]; - yy.setClickEvent($$[$0 - 2], $$[$0 - 1], null); - yy.setLink($$[$0 - 2], $$[$0]); - break; - case 34: - this.$ = $$[$0 - 3]; - yy.setClickEvent($$[$0 - 3], $$[$0 - 2], $$[$0 - 1]); - yy.setLink($$[$0 - 3], $$[$0]); - break; - case 35: - this.$ = $$[$0 - 2]; - yy.setClickEvent($$[$0 - 2], $$[$0], null); - yy.setLink($$[$0 - 2], $$[$0 - 1]); - break; - case 36: - this.$ = $$[$0 - 3]; - yy.setClickEvent($$[$0 - 3], $$[$0 - 1], $$[$0]); - yy.setLink($$[$0 - 3], $$[$0 - 2]); - break; - case 37: - this.$ = $$[$0 - 1]; - yy.setLink($$[$0 - 1], $$[$0]); - break; - case 38: - case 44: - this.$ = $$[$0 - 1] + " " + $$[$0]; - break; - case 39: - case 40: - case 42: - this.$ = $$[$0 - 2] + " " + $$[$0 - 1] + " " + $$[$0]; - break; - case 41: - case 43: - this.$ = $$[$0 - 3] + " " + $$[$0 - 2] + " " + $$[$0 - 1] + " " + $$[$0]; - break; - } - }, - table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, o($V0, [2, 2], { 5: 3 }), { 6: [1, 4], 7: 5, 8: [1, 6], 9: 7, 10: [1, 8], 11: 17, 12: $V1, 13: $V2, 14: $V3, 15: $V4, 16: $V5, 17: $V6, 18: $V7, 19: $V8, 20: $V9, 21: $Va, 22: $Vb, 23: $Vc, 24: $Vd, 25: $Ve, 26: $Vf, 27: $Vg, 28: $Vh, 30: $Vi, 32: $Vj, 33: $Vk, 34: 23, 35: $Vl, 37: $Vm }, o($V0, [2, 7], { 1: [2, 1] }), o($V0, [2, 3]), { 9: 33, 11: 17, 12: $V1, 13: $V2, 14: $V3, 15: $V4, 16: $V5, 17: $V6, 18: $V7, 19: $V8, 20: $V9, 21: $Va, 22: $Vb, 23: $Vc, 24: $Vd, 25: $Ve, 26: $Vf, 27: $Vg, 28: $Vh, 30: $Vi, 32: $Vj, 33: $Vk, 34: 23, 35: $Vl, 37: $Vm }, o($V0, [2, 5]), o($V0, [2, 6]), o($V0, [2, 15]), o($V0, [2, 16]), o($V0, [2, 17]), o($V0, [2, 18]), o($V0, [2, 19]), o($V0, [2, 20]), o($V0, [2, 21]), o($V0, [2, 22]), o($V0, [2, 23]), o($V0, [2, 24]), { 29: [1, 34] }, { 31: [1, 35] }, o($V0, [2, 27]), o($V0, [2, 28]), o($V0, [2, 29]), { 36: [1, 36] }, o($V0, [2, 8]), o($V0, [2, 9]), o($V0, [2, 10]), o($V0, [2, 11]), o($V0, [2, 12]), o($V0, [2, 13]), o($V0, [2, 14]), { 38: [1, 37], 40: [1, 38] }, o($V0, [2, 4]), o($V0, [2, 25]), o($V0, [2, 26]), o($V0, [2, 30]), o($V0, [2, 31], { 39: [1, 39], 40: [1, 40] }), o($V0, [2, 37], { 38: [1, 41] }), o($V0, [2, 32], { 40: [1, 42] }), o($V0, [2, 33]), o($V0, [2, 35], { 39: [1, 43] }), o($V0, [2, 34]), o($V0, [2, 36])], - defaultActions: {}, - parseError: function parseError(str, hash) { - if (hash.recoverable) { - this.trace(str); - } else { - var error = new Error(str); - error.hash = hash; - throw error; - } - }, - parse: function parse(input) { - var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; - var args = lstack.slice.call(arguments, 1); - var lexer2 = Object.create(this.lexer); - var sharedState = { yy: {} }; - for (var k in this.yy) { - if (Object.prototype.hasOwnProperty.call(this.yy, k)) { - sharedState.yy[k] = this.yy[k]; - } - } - lexer2.setInput(input, sharedState.yy); - sharedState.yy.lexer = lexer2; - sharedState.yy.parser = this; - if (typeof lexer2.yylloc == "undefined") { - lexer2.yylloc = {}; - } - var yyloc = lexer2.yylloc; - lstack.push(yyloc); - var ranges = lexer2.options && lexer2.options.ranges; - if (typeof sharedState.yy.parseError === "function") { - this.parseError = sharedState.yy.parseError; - } else { - this.parseError = Object.getPrototypeOf(this).parseError; - } - function lex() { - var token; - token = tstack.pop() || lexer2.lex() || EOF; - if (typeof token !== "number") { - if (token instanceof Array) { - tstack = token; - token = tstack.pop(); - } - token = self.symbols_[token] || token; - } - return token; - } - var symbol, state, action, r, yyval = {}, p, len, newState, expected; - while (true) { - state = stack[stack.length - 1]; - if (this.defaultActions[state]) { - action = this.defaultActions[state]; - } else { - if (symbol === null || typeof symbol == "undefined") { - symbol = lex(); - } - action = table[state] && table[state][symbol]; - } - if (typeof action === "undefined" || !action.length || !action[0]) { - var errStr = ""; - expected = []; - for (p in table[state]) { - if (this.terminals_[p] && p > TERROR) { - expected.push("'" + this.terminals_[p] + "'"); - } - } - if (lexer2.showPosition) { - errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; - } else { - errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); - } - this.parseError(errStr, { - text: lexer2.match, - token: this.terminals_[symbol] || symbol, - line: lexer2.yylineno, - loc: yyloc, - expected - }); - } - if (action[0] instanceof Array && action.length > 1) { - throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); - } - switch (action[0]) { - case 1: - stack.push(symbol); - vstack.push(lexer2.yytext); - lstack.push(lexer2.yylloc); - stack.push(action[1]); - symbol = null; - { - yyleng = lexer2.yyleng; - yytext = lexer2.yytext; - yylineno = lexer2.yylineno; - yyloc = lexer2.yylloc; - } - break; - case 2: - len = this.productions_[action[1]][1]; - yyval.$ = vstack[vstack.length - len]; - yyval._$ = { - first_line: lstack[lstack.length - (len || 1)].first_line, - last_line: lstack[lstack.length - 1].last_line, - first_column: lstack[lstack.length - (len || 1)].first_column, - last_column: lstack[lstack.length - 1].last_column - }; - if (ranges) { - yyval._$.range = [ - lstack[lstack.length - (len || 1)].range[0], - lstack[lstack.length - 1].range[1] - ]; - } - r = this.performAction.apply(yyval, [ - yytext, - yyleng, - yylineno, - sharedState.yy, - action[1], - vstack, - lstack - ].concat(args)); - if (typeof r !== "undefined") { - return r; - } - if (len) { - stack = stack.slice(0, -1 * len * 2); - vstack = vstack.slice(0, -1 * len); - lstack = lstack.slice(0, -1 * len); - } - stack.push(this.productions_[action[1]][0]); - vstack.push(yyval.$); - lstack.push(yyval._$); - newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; - stack.push(newState); - break; - case 3: - return true; - } - } - return true; - } - }; - var lexer = function() { - var lexer2 = { - EOF: 1, - parseError: function parseError(str, hash) { - if (this.yy.parser) { - this.yy.parser.parseError(str, hash); - } else { - throw new Error(str); - } - }, - // resets the lexer, sets new input - setInput: function(input, yy) { - this.yy = yy || this.yy || {}; - this._input = input; - this._more = this._backtrack = this.done = false; - this.yylineno = this.yyleng = 0; - this.yytext = this.matched = this.match = ""; - this.conditionStack = ["INITIAL"]; - this.yylloc = { - first_line: 1, - first_column: 0, - last_line: 1, - last_column: 0 - }; - if (this.options.ranges) { - this.yylloc.range = [0, 0]; - } - this.offset = 0; - return this; - }, - // consumes and returns one char from the input - input: function() { - var ch = this._input[0]; - this.yytext += ch; - this.yyleng++; - this.offset++; - this.match += ch; - this.matched += ch; - var lines = ch.match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno++; - this.yylloc.last_line++; - } else { - this.yylloc.last_column++; - } - if (this.options.ranges) { - this.yylloc.range[1]++; - } - this._input = this._input.slice(1); - return ch; - }, - // unshifts one char (or a string) into the input - unput: function(ch) { - var len = ch.length; - var lines = ch.split(/(?:\r\n?|\n)/g); - this._input = ch + this._input; - this.yytext = this.yytext.substr(0, this.yytext.length - len); - this.offset -= len; - var oldLines = this.match.split(/(?:\r\n?|\n)/g); - this.match = this.match.substr(0, this.match.length - 1); - this.matched = this.matched.substr(0, this.matched.length - 1); - if (lines.length - 1) { - this.yylineno -= lines.length - 1; - } - var r = this.yylloc.range; - this.yylloc = { - first_line: this.yylloc.first_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.first_column, - last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len - }; - if (this.options.ranges) { - this.yylloc.range = [r[0], r[0] + this.yyleng - len]; - } - this.yyleng = this.yytext.length; - return this; - }, - // When called from action, caches matched text and appends it on next action - more: function() { - this._more = true; - return this; - }, - // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. - reject: function() { - if (this.options.backtrack_lexer) { - this._backtrack = true; - } else { - return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), { - text: "", - token: null, - line: this.yylineno - }); - } - return this; - }, - // retain first n characters of the match - less: function(n) { - this.unput(this.match.slice(n)); - }, - // displays already matched input, i.e. for error messages - pastInput: function() { - var past = this.matched.substr(0, this.matched.length - this.match.length); - return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); - }, - // displays upcoming input, i.e. for error messages - upcomingInput: function() { - var next = this.match; - if (next.length < 20) { - next += this._input.substr(0, 20 - next.length); - } - return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); - }, - // displays the character position where the lexing error occurred, i.e. for error messages - showPosition: function() { - var pre = this.pastInput(); - var c = new Array(pre.length + 1).join("-"); - return pre + this.upcomingInput() + "\n" + c + "^"; - }, - // test the lexed token: return FALSE when not a match, otherwise return token - test_match: function(match, indexed_rule) { - var token, lines, backup; - if (this.options.backtrack_lexer) { - backup = { - yylineno: this.yylineno, - yylloc: { - first_line: this.yylloc.first_line, - last_line: this.last_line, - first_column: this.yylloc.first_column, - last_column: this.yylloc.last_column - }, - yytext: this.yytext, - match: this.match, - matches: this.matches, - matched: this.matched, - yyleng: this.yyleng, - offset: this.offset, - _more: this._more, - _input: this._input, - yy: this.yy, - conditionStack: this.conditionStack.slice(0), - done: this.done - }; - if (this.options.ranges) { - backup.yylloc.range = this.yylloc.range.slice(0); - } - } - lines = match[0].match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno += lines.length; - } - this.yylloc = { - first_line: this.yylloc.last_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.last_column, - last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length - }; - this.yytext += match[0]; - this.match += match[0]; - this.matches = match; - this.yyleng = this.yytext.length; - if (this.options.ranges) { - this.yylloc.range = [this.offset, this.offset += this.yyleng]; - } - this._more = false; - this._backtrack = false; - this._input = this._input.slice(match[0].length); - this.matched += match[0]; - token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); - if (this.done && this._input) { - this.done = false; - } - if (token) { - return token; - } else if (this._backtrack) { - for (var k in backup) { - this[k] = backup[k]; - } - return false; - } - return false; - }, - // return next match in input - next: function() { - if (this.done) { - return this.EOF; - } - if (!this._input) { - this.done = true; - } - var token, match, tempMatch, index; - if (!this._more) { - this.yytext = ""; - this.match = ""; - } - var rules = this._currentRules(); - for (var i = 0; i < rules.length; i++) { - tempMatch = this._input.match(this.rules[rules[i]]); - if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { - match = tempMatch; - index = i; - if (this.options.backtrack_lexer) { - token = this.test_match(tempMatch, rules[i]); - if (token !== false) { - return token; - } else if (this._backtrack) { - match = false; - continue; - } else { - return false; - } - } else if (!this.options.flex) { - break; - } - } - } - if (match) { - token = this.test_match(match, rules[index]); - if (token !== false) { - return token; - } - return false; - } - if (this._input === "") { - return this.EOF; - } else { - return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { - text: "", - token: null, - line: this.yylineno - }); - } - }, - // return next match that has a token - lex: function lex() { - var r = this.next(); - if (r) { - return r; - } else { - return this.lex(); - } - }, - // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) - begin: function begin(condition) { - this.conditionStack.push(condition); - }, - // pop the previously active lexer condition state off the condition stack - popState: function popState() { - var n = this.conditionStack.length - 1; - if (n > 0) { - return this.conditionStack.pop(); - } else { - return this.conditionStack[0]; - } - }, - // produce the lexer rule set which is active for the currently active lexer condition state - _currentRules: function _currentRules() { - if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { - return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; - } else { - return this.conditions["INITIAL"].rules; - } - }, - // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available - topState: function topState(n) { - n = this.conditionStack.length - 1 - Math.abs(n || 0); - if (n >= 0) { - return this.conditionStack[n]; - } else { - return "INITIAL"; - } - }, - // alias for begin(condition) - pushState: function pushState(condition) { - this.begin(condition); - }, - // return the number of states currently on the stack - stateStackSize: function stateStackSize() { - return this.conditionStack.length; - }, - options: { "case-insensitive": true }, - performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { - switch ($avoiding_name_collisions) { - case 0: - this.begin("open_directive"); - return "open_directive"; - case 1: - this.begin("acc_title"); - return 28; - case 2: - this.popState(); - return "acc_title_value"; - case 3: - this.begin("acc_descr"); - return 30; - case 4: - this.popState(); - return "acc_descr_value"; - case 5: - this.begin("acc_descr_multiline"); - break; - case 6: - this.popState(); - break; - case 7: - return "acc_descr_multiline_value"; - case 8: - break; - case 9: - break; - case 10: - break; - case 11: - return 10; - case 12: - break; - case 13: - break; - case 14: - this.begin("href"); - break; - case 15: - this.popState(); - break; - case 16: - return 40; - case 17: - this.begin("callbackname"); - break; - case 18: - this.popState(); - break; - case 19: - this.popState(); - this.begin("callbackargs"); - break; - case 20: - return 38; - case 21: - this.popState(); - break; - case 22: - return 39; - case 23: - this.begin("click"); - break; - case 24: - this.popState(); - break; - case 25: - return 37; - case 26: - return 4; - case 27: - return 19; - case 28: - return 20; - case 29: - return 21; - case 30: - return 22; - case 31: - return 23; - case 32: - return 25; - case 33: - return 24; - case 34: - return 26; - case 35: - return 12; - case 36: - return 13; - case 37: - return 14; - case 38: - return 15; - case 39: - return 16; - case 40: - return 17; - case 41: - return 18; - case 42: - return "date"; - case 43: - return 27; - case 44: - return "accDescription"; - case 45: - return 33; - case 46: - return 35; - case 47: - return 36; - case 48: - return ":"; - case 49: - return 6; - case 50: - return "INVALID"; - } - }, - rules: [/^(?:%%\{)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:%%(?!\{)*[^\n]*)/i, /^(?:[^\}]%%*[^\n]*)/i, /^(?:%%*[^\n]*[\n]*)/i, /^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:%[^\n]*)/i, /^(?:href[\s]+["])/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:call[\s]+)/i, /^(?:\([\s]*\))/i, /^(?:\()/i, /^(?:[^(]*)/i, /^(?:\))/i, /^(?:[^)]*)/i, /^(?:click[\s]+)/i, /^(?:[\s\n])/i, /^(?:[^\s\n]*)/i, /^(?:gantt\b)/i, /^(?:dateFormat\s[^#\n;]+)/i, /^(?:inclusiveEndDates\b)/i, /^(?:topAxis\b)/i, /^(?:axisFormat\s[^#\n;]+)/i, /^(?:tickInterval\s[^#\n;]+)/i, /^(?:includes\s[^#\n;]+)/i, /^(?:excludes\s[^#\n;]+)/i, /^(?:todayMarker\s[^\n;]+)/i, /^(?:weekday\s+monday\b)/i, /^(?:weekday\s+tuesday\b)/i, /^(?:weekday\s+wednesday\b)/i, /^(?:weekday\s+thursday\b)/i, /^(?:weekday\s+friday\b)/i, /^(?:weekday\s+saturday\b)/i, /^(?:weekday\s+sunday\b)/i, /^(?:\d\d\d\d-\d\d-\d\d\b)/i, /^(?:title\s[^\n]+)/i, /^(?:accDescription\s[^#\n;]+)/i, /^(?:section\s[^\n]+)/i, /^(?:[^:\n]+)/i, /^(?::[^#\n;]+)/i, /^(?::)/i, /^(?:$)/i, /^(?:.)/i], - conditions: { "acc_descr_multiline": { "rules": [6, 7], "inclusive": false }, "acc_descr": { "rules": [4], "inclusive": false }, "acc_title": { "rules": [2], "inclusive": false }, "callbackargs": { "rules": [21, 22], "inclusive": false }, "callbackname": { "rules": [18, 19, 20], "inclusive": false }, "href": { "rules": [15, 16], "inclusive": false }, "click": { "rules": [24, 25], "inclusive": false }, "INITIAL": { "rules": [0, 1, 3, 5, 8, 9, 10, 11, 12, 13, 14, 17, 23, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50], "inclusive": true } } - }; - return lexer2; - }(); - parser2.lexer = lexer; - function Parser() { - this.yy = {}; - } - Parser.prototype = parser2; - parser2.Parser = Parser; - return new Parser(); -}(); -parser.parser = parser; -const ganttParser = parser; -dayjs__WEBPACK_IMPORTED_MODULE_1__.extend(dayjs_plugin_isoWeek_js__WEBPACK_IMPORTED_MODULE_2__); -dayjs__WEBPACK_IMPORTED_MODULE_1__.extend(dayjs_plugin_customParseFormat_js__WEBPACK_IMPORTED_MODULE_3__); -dayjs__WEBPACK_IMPORTED_MODULE_1__.extend(dayjs_plugin_advancedFormat_js__WEBPACK_IMPORTED_MODULE_4__); -let dateFormat = ""; -let axisFormat = ""; -let tickInterval = void 0; -let todayMarker = ""; -let includes = []; -let excludes = []; -let links = {}; -let sections = []; -let tasks = []; -let currentSection = ""; -let displayMode = ""; -const tags = ["active", "done", "crit", "milestone"]; -let funs = []; -let inclusiveEndDates = false; -let topAxis = false; -let weekday = "sunday"; -let lastOrder = 0; -const clear = function() { - sections = []; - tasks = []; - currentSection = ""; - funs = []; - taskCnt = 0; - lastTask = void 0; - lastTaskID = void 0; - rawTasks = []; - dateFormat = ""; - axisFormat = ""; - displayMode = ""; - tickInterval = void 0; - todayMarker = ""; - includes = []; - excludes = []; - inclusiveEndDates = false; - topAxis = false; - lastOrder = 0; - links = {}; - (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_7__.v)(); - weekday = "sunday"; -}; -const setAxisFormat = function(txt) { - axisFormat = txt; -}; -const getAxisFormat = function() { - return axisFormat; -}; -const setTickInterval = function(txt) { - tickInterval = txt; -}; -const getTickInterval = function() { - return tickInterval; -}; -const setTodayMarker = function(txt) { - todayMarker = txt; -}; -const getTodayMarker = function() { - return todayMarker; -}; -const setDateFormat = function(txt) { - dateFormat = txt; -}; -const enableInclusiveEndDates = function() { - inclusiveEndDates = true; -}; -const endDatesAreInclusive = function() { - return inclusiveEndDates; -}; -const enableTopAxis = function() { - topAxis = true; -}; -const topAxisEnabled = function() { - return topAxis; -}; -const setDisplayMode = function(txt) { - displayMode = txt; -}; -const getDisplayMode = function() { - return displayMode; -}; -const getDateFormat = function() { - return dateFormat; -}; -const setIncludes = function(txt) { - includes = txt.toLowerCase().split(/[\s,]+/); -}; -const getIncludes = function() { - return includes; -}; -const setExcludes = function(txt) { - excludes = txt.toLowerCase().split(/[\s,]+/); -}; -const getExcludes = function() { - return excludes; -}; -const getLinks = function() { - return links; -}; -const addSection = function(txt) { - currentSection = txt; - sections.push(txt); -}; -const getSections = function() { - return sections; -}; -const getTasks = function() { - let allItemsProcessed = compileTasks(); - const maxDepth = 10; - let iterationCount = 0; - while (!allItemsProcessed && iterationCount < maxDepth) { - allItemsProcessed = compileTasks(); - iterationCount++; - } - tasks = rawTasks; - return tasks; -}; -const isInvalidDate = function(date, dateFormat2, excludes2, includes2) { - if (includes2.includes(date.format(dateFormat2.trim()))) { - return false; - } - if (date.isoWeekday() >= 6 && excludes2.includes("weekends")) { - return true; - } - if (excludes2.includes(date.format("dddd").toLowerCase())) { - return true; - } - return excludes2.includes(date.format(dateFormat2.trim())); -}; -const setWeekday = function(txt) { - weekday = txt; -}; -const getWeekday = function() { - return weekday; -}; -const checkTaskDates = function(task, dateFormat2, excludes2, includes2) { - if (!excludes2.length || task.manualEndTime) { - return; - } - let startTime; - if (task.startTime instanceof Date) { - startTime = dayjs__WEBPACK_IMPORTED_MODULE_1__(task.startTime); - } else { - startTime = dayjs__WEBPACK_IMPORTED_MODULE_1__(task.startTime, dateFormat2, true); - } - startTime = startTime.add(1, "d"); - let originalEndTime; - if (task.endTime instanceof Date) { - originalEndTime = dayjs__WEBPACK_IMPORTED_MODULE_1__(task.endTime); - } else { - originalEndTime = dayjs__WEBPACK_IMPORTED_MODULE_1__(task.endTime, dateFormat2, true); - } - const [fixedEndTime, renderEndTime] = fixTaskDates( - startTime, - originalEndTime, - dateFormat2, - excludes2, - includes2 - ); - task.endTime = fixedEndTime.toDate(); - task.renderEndTime = renderEndTime; -}; -const fixTaskDates = function(startTime, endTime, dateFormat2, excludes2, includes2) { - let invalid = false; - let renderEndTime = null; - while (startTime <= endTime) { - if (!invalid) { - renderEndTime = endTime.toDate(); - } - invalid = isInvalidDate(startTime, dateFormat2, excludes2, includes2); - if (invalid) { - endTime = endTime.add(1, "d"); - } - startTime = startTime.add(1, "d"); - } - return [endTime, renderEndTime]; -}; -const getStartDate = function(prevTime, dateFormat2, str) { - str = str.trim(); - const afterRePattern = /^after\s+(?[\d\w- ]+)/; - const afterStatement = afterRePattern.exec(str); - if (afterStatement !== null) { - let latestTask = null; - for (const id of afterStatement.groups.ids.split(" ")) { - let task = findTaskById(id); - if (task !== void 0 && (!latestTask || task.endTime > latestTask.endTime)) { - latestTask = task; - } - } - if (latestTask) { - return latestTask.endTime; - } - const today = /* @__PURE__ */ new Date(); - today.setHours(0, 0, 0, 0); - return today; - } - let mDate = dayjs__WEBPACK_IMPORTED_MODULE_1__(str, dateFormat2.trim(), true); - if (mDate.isValid()) { - return mDate.toDate(); - } else { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_7__.l.debug("Invalid date:" + str); - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_7__.l.debug("With date format:" + dateFormat2.trim()); - const d = new Date(str); - if (d === void 0 || isNaN(d.getTime()) || // WebKit browsers can mis-parse invalid dates to be ridiculously - // huge numbers, e.g. new Date('202304') gets parsed as January 1, 202304. - // This can cause virtually infinite loops while rendering, so for the - // purposes of Gantt charts we'll just treat any date beyond 10,000 AD/BC as - // invalid. - d.getFullYear() < -1e4 || d.getFullYear() > 1e4) { - throw new Error("Invalid date:" + str); - } - return d; - } -}; -const parseDuration = function(str) { - const statement = /^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(str.trim()); - if (statement !== null) { - return [Number.parseFloat(statement[1]), statement[2]]; - } - return [NaN, "ms"]; -}; -const getEndDate = function(prevTime, dateFormat2, str, inclusive = false) { - str = str.trim(); - const untilRePattern = /^until\s+(?[\d\w- ]+)/; - const untilStatement = untilRePattern.exec(str); - if (untilStatement !== null) { - let earliestTask = null; - for (const id of untilStatement.groups.ids.split(" ")) { - let task = findTaskById(id); - if (task !== void 0 && (!earliestTask || task.startTime < earliestTask.startTime)) { - earliestTask = task; - } - } - if (earliestTask) { - return earliestTask.startTime; - } - const today = /* @__PURE__ */ new Date(); - today.setHours(0, 0, 0, 0); - return today; - } - let parsedDate = dayjs__WEBPACK_IMPORTED_MODULE_1__(str, dateFormat2.trim(), true); - if (parsedDate.isValid()) { - if (inclusive) { - parsedDate = parsedDate.add(1, "d"); - } - return parsedDate.toDate(); - } - let endTime = dayjs__WEBPACK_IMPORTED_MODULE_1__(prevTime); - const [durationValue, durationUnit] = parseDuration(str); - if (!Number.isNaN(durationValue)) { - const newEndTime = endTime.add(durationValue, durationUnit); - if (newEndTime.isValid()) { - endTime = newEndTime; - } - } - return endTime.toDate(); -}; -let taskCnt = 0; -const parseId = function(idStr) { - if (idStr === void 0) { - taskCnt = taskCnt + 1; - return "task" + taskCnt; - } - return idStr; -}; -const compileData = function(prevTask, dataStr) { - let ds; - if (dataStr.substr(0, 1) === ":") { - ds = dataStr.substr(1, dataStr.length); - } else { - ds = dataStr; - } - const data = ds.split(","); - const task = {}; - getTaskTags(data, task, tags); - for (let i = 0; i < data.length; i++) { - data[i] = data[i].trim(); - } - let endTimeData = ""; - switch (data.length) { - case 1: - task.id = parseId(); - task.startTime = prevTask.endTime; - endTimeData = data[0]; - break; - case 2: - task.id = parseId(); - task.startTime = getStartDate(void 0, dateFormat, data[0]); - endTimeData = data[1]; - break; - case 3: - task.id = parseId(data[0]); - task.startTime = getStartDate(void 0, dateFormat, data[1]); - endTimeData = data[2]; - break; - } - if (endTimeData) { - task.endTime = getEndDate(task.startTime, dateFormat, endTimeData, inclusiveEndDates); - task.manualEndTime = dayjs__WEBPACK_IMPORTED_MODULE_1__(endTimeData, "YYYY-MM-DD", true).isValid(); - checkTaskDates(task, dateFormat, excludes, includes); - } - return task; -}; -const parseData = function(prevTaskId, dataStr) { - let ds; - if (dataStr.substr(0, 1) === ":") { - ds = dataStr.substr(1, dataStr.length); - } else { - ds = dataStr; - } - const data = ds.split(","); - const task = {}; - getTaskTags(data, task, tags); - for (let i = 0; i < data.length; i++) { - data[i] = data[i].trim(); - } - switch (data.length) { - case 1: - task.id = parseId(); - task.startTime = { - type: "prevTaskEnd", - id: prevTaskId - }; - task.endTime = { - data: data[0] - }; - break; - case 2: - task.id = parseId(); - task.startTime = { - type: "getStartDate", - startData: data[0] - }; - task.endTime = { - data: data[1] - }; - break; - case 3: - task.id = parseId(data[0]); - task.startTime = { - type: "getStartDate", - startData: data[1] - }; - task.endTime = { - data: data[2] - }; - break; - } - return task; -}; -let lastTask; -let lastTaskID; -let rawTasks = []; -const taskDb = {}; -const addTask = function(descr, data) { - const rawTask = { - section: currentSection, - type: currentSection, - processed: false, - manualEndTime: false, - renderEndTime: null, - raw: { data }, - task: descr, - classes: [] - }; - const taskInfo = parseData(lastTaskID, data); - rawTask.raw.startTime = taskInfo.startTime; - rawTask.raw.endTime = taskInfo.endTime; - rawTask.id = taskInfo.id; - rawTask.prevTaskId = lastTaskID; - rawTask.active = taskInfo.active; - rawTask.done = taskInfo.done; - rawTask.crit = taskInfo.crit; - rawTask.milestone = taskInfo.milestone; - rawTask.order = lastOrder; - lastOrder++; - const pos = rawTasks.push(rawTask); - lastTaskID = rawTask.id; - taskDb[rawTask.id] = pos - 1; -}; -const findTaskById = function(id) { - const pos = taskDb[id]; - return rawTasks[pos]; -}; -const addTaskOrg = function(descr, data) { - const newTask = { - section: currentSection, - type: currentSection, - description: descr, - task: descr, - classes: [] - }; - const taskInfo = compileData(lastTask, data); - newTask.startTime = taskInfo.startTime; - newTask.endTime = taskInfo.endTime; - newTask.id = taskInfo.id; - newTask.active = taskInfo.active; - newTask.done = taskInfo.done; - newTask.crit = taskInfo.crit; - newTask.milestone = taskInfo.milestone; - lastTask = newTask; - tasks.push(newTask); -}; -const compileTasks = function() { - const compileTask = function(pos) { - const task = rawTasks[pos]; - let startTime = ""; - switch (rawTasks[pos].raw.startTime.type) { - case "prevTaskEnd": { - const prevTask = findTaskById(task.prevTaskId); - task.startTime = prevTask.endTime; - break; - } - case "getStartDate": - startTime = getStartDate(void 0, dateFormat, rawTasks[pos].raw.startTime.startData); - if (startTime) { - rawTasks[pos].startTime = startTime; - } - break; - } - if (rawTasks[pos].startTime) { - rawTasks[pos].endTime = getEndDate( - rawTasks[pos].startTime, - dateFormat, - rawTasks[pos].raw.endTime.data, - inclusiveEndDates - ); - if (rawTasks[pos].endTime) { - rawTasks[pos].processed = true; - rawTasks[pos].manualEndTime = dayjs__WEBPACK_IMPORTED_MODULE_1__( - rawTasks[pos].raw.endTime.data, - "YYYY-MM-DD", - true - ).isValid(); - checkTaskDates(rawTasks[pos], dateFormat, excludes, includes); - } - } - return rawTasks[pos].processed; - }; - let allProcessed = true; - for (const [i, rawTask] of rawTasks.entries()) { - compileTask(i); - allProcessed = allProcessed && rawTask.processed; - } - return allProcessed; -}; -const setLink = function(ids, _linkStr) { - let linkStr = _linkStr; - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_7__.c)().securityLevel !== "loose") { - linkStr = (0,_braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_0__/* .sanitizeUrl */ .Jf)(_linkStr); - } - ids.split(",").forEach(function(id) { - let rawTask = findTaskById(id); - if (rawTask !== void 0) { - pushFun(id, () => { - window.open(linkStr, "_self"); - }); - links[id] = linkStr; - } - }); - setClass(ids, "clickable"); -}; -const setClass = function(ids, className) { - ids.split(",").forEach(function(id) { - let rawTask = findTaskById(id); - if (rawTask !== void 0) { - rawTask.classes.push(className); - } - }); -}; -const setClickFun = function(id, functionName, functionArgs) { - if ((0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_7__.c)().securityLevel !== "loose") { - return; - } - if (functionName === void 0) { - return; - } - let argList = []; - if (typeof functionArgs === "string") { - argList = functionArgs.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/); - for (let i = 0; i < argList.length; i++) { - let item = argList[i].trim(); - if (item.charAt(0) === '"' && item.charAt(item.length - 1) === '"') { - item = item.substr(1, item.length - 2); - } - argList[i] = item; - } - } - if (argList.length === 0) { - argList.push(id); - } - let rawTask = findTaskById(id); - if (rawTask !== void 0) { - pushFun(id, () => { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_7__.u.runFunc(functionName, ...argList); - }); - } -}; -const pushFun = function(id, callbackFunction) { - funs.push( - function() { - const elem = document.querySelector(`[id="${id}"]`); - if (elem !== null) { - elem.addEventListener("click", function() { - callbackFunction(); - }); - } - }, - function() { - const elem = document.querySelector(`[id="${id}-text"]`); - if (elem !== null) { - elem.addEventListener("click", function() { - callbackFunction(); - }); - } - } - ); -}; -const setClickEvent = function(ids, functionName, functionArgs) { - ids.split(",").forEach(function(id) { - setClickFun(id, functionName, functionArgs); - }); - setClass(ids, "clickable"); -}; -const bindFunctions = function(element) { - funs.forEach(function(fun) { - fun(element); - }); -}; -const ganttDb = { - getConfig: () => (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_7__.c)().gantt, - clear, - setDateFormat, - getDateFormat, - enableInclusiveEndDates, - endDatesAreInclusive, - enableTopAxis, - topAxisEnabled, - setAxisFormat, - getAxisFormat, - setTickInterval, - getTickInterval, - setTodayMarker, - getTodayMarker, - setAccTitle: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_7__.s, - getAccTitle: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_7__.g, - setDiagramTitle: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_7__.q, - getDiagramTitle: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_7__.t, - setDisplayMode, - getDisplayMode, - setAccDescription: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_7__.b, - getAccDescription: _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_7__.a, - addSection, - getSections, - getTasks, - addTask, - findTaskById, - addTaskOrg, - setIncludes, - getIncludes, - setExcludes, - getExcludes, - setClickEvent, - setLink, - getLinks, - bindFunctions, - parseDuration, - isInvalidDate, - setWeekday, - getWeekday -}; -function getTaskTags(data, task, tags2) { - let matchFound = true; - while (matchFound) { - matchFound = false; - tags2.forEach(function(t) { - const pattern = "^\\s*" + t + "\\s*$"; - const regex = new RegExp(pattern); - if (data[0].match(regex)) { - task[t] = true; - data.shift(1); - matchFound = true; - } - }); - } -} -const setConf = function() { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_7__.l.debug("Something is calling, setConf, remove the call"); -}; -const mapWeekdayToTimeFunction = { - monday: d3__WEBPACK_IMPORTED_MODULE_5__/* .timeMonday */ .ABi, - tuesday: d3__WEBPACK_IMPORTED_MODULE_5__/* .timeTuesday */ .PGu, - wednesday: d3__WEBPACK_IMPORTED_MODULE_5__/* .timeWednesday */ .GuW, - thursday: d3__WEBPACK_IMPORTED_MODULE_5__/* .timeThursday */ .Mol, - friday: d3__WEBPACK_IMPORTED_MODULE_5__/* .timeFriday */ .TUC, - saturday: d3__WEBPACK_IMPORTED_MODULE_5__/* .timeSaturday */ .rGn, - sunday: d3__WEBPACK_IMPORTED_MODULE_5__/* .timeSunday */ .YPH -}; -const getMaxIntersections = (tasks2, orderOffset) => { - let timeline = [...tasks2].map(() => -Infinity); - let sorted = [...tasks2].sort((a, b) => a.startTime - b.startTime || a.order - b.order); - let maxIntersections = 0; - for (const element of sorted) { - for (let j = 0; j < timeline.length; j++) { - if (element.startTime >= timeline[j]) { - timeline[j] = element.endTime; - element.order = j + orderOffset; - if (j > maxIntersections) { - maxIntersections = j; - } - break; - } - } - } - return maxIntersections; -}; -let w; -const draw = function(text, id, version, diagObj) { - const conf = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_7__.c)().gantt; - const securityLevel = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_7__.c)().securityLevel; - let sandboxElement; - if (securityLevel === "sandbox") { - sandboxElement = (0,d3__WEBPACK_IMPORTED_MODULE_5__/* .select */ .Ltv)("#i" + id); - } - const root = securityLevel === "sandbox" ? (0,d3__WEBPACK_IMPORTED_MODULE_5__/* .select */ .Ltv)(sandboxElement.nodes()[0].contentDocument.body) : (0,d3__WEBPACK_IMPORTED_MODULE_5__/* .select */ .Ltv)("body"); - const doc = securityLevel === "sandbox" ? sandboxElement.nodes()[0].contentDocument : document; - const elem = doc.getElementById(id); - w = elem.parentElement.offsetWidth; - if (w === void 0) { - w = 1200; - } - if (conf.useWidth !== void 0) { - w = conf.useWidth; - } - const taskArray = diagObj.db.getTasks(); - let categories = []; - for (const element of taskArray) { - categories.push(element.type); - } - categories = checkUnique(categories); - const categoryHeights = {}; - let h = 2 * conf.topPadding; - if (diagObj.db.getDisplayMode() === "compact" || conf.displayMode === "compact") { - const categoryElements = {}; - for (const element of taskArray) { - if (categoryElements[element.section] === void 0) { - categoryElements[element.section] = [element]; - } else { - categoryElements[element.section].push(element); - } - } - let intersections = 0; - for (const category of Object.keys(categoryElements)) { - const categoryHeight = getMaxIntersections(categoryElements[category], intersections) + 1; - intersections += categoryHeight; - h += categoryHeight * (conf.barHeight + conf.barGap); - categoryHeights[category] = categoryHeight; - } - } else { - h += taskArray.length * (conf.barHeight + conf.barGap); - for (const category of categories) { - categoryHeights[category] = taskArray.filter((task) => task.type === category).length; - } - } - elem.setAttribute("viewBox", "0 0 " + w + " " + h); - const svg = root.select(`[id="${id}"]`); - const timeScale = (0,d3__WEBPACK_IMPORTED_MODULE_5__/* .scaleTime */ .w7C)().domain([ - (0,d3__WEBPACK_IMPORTED_MODULE_5__/* .min */ .jkA)(taskArray, function(d) { - return d.startTime; - }), - (0,d3__WEBPACK_IMPORTED_MODULE_5__/* .max */ .T9B)(taskArray, function(d) { - return d.endTime; - }) - ]).rangeRound([0, w - conf.leftPadding - conf.rightPadding]); - function taskCompare(a, b) { - const taskA = a.startTime; - const taskB = b.startTime; - let result = 0; - if (taskA > taskB) { - result = 1; - } else if (taskA < taskB) { - result = -1; - } - return result; - } - taskArray.sort(taskCompare); - makeGantt(taskArray, w, h); - (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_7__.i)(svg, h, w, conf.useMaxWidth); - svg.append("text").text(diagObj.db.getDiagramTitle()).attr("x", w / 2).attr("y", conf.titleTopMargin).attr("class", "titleText"); - function makeGantt(tasks2, pageWidth, pageHeight) { - const barHeight = conf.barHeight; - const gap = barHeight + conf.barGap; - const topPadding = conf.topPadding; - const leftPadding = conf.leftPadding; - const colorScale = (0,d3__WEBPACK_IMPORTED_MODULE_5__/* .scaleLinear */ .m4Y)().domain([0, categories.length]).range(["#00B9FA", "#F95002"]).interpolate(d3__WEBPACK_IMPORTED_MODULE_5__/* .interpolateHcl */ .bEH); - drawExcludeDays( - gap, - topPadding, - leftPadding, - pageWidth, - pageHeight, - tasks2, - diagObj.db.getExcludes(), - diagObj.db.getIncludes() - ); - makeGrid(leftPadding, topPadding, pageWidth, pageHeight); - drawRects(tasks2, gap, topPadding, leftPadding, barHeight, colorScale, pageWidth); - vertLabels(gap, topPadding); - drawToday(leftPadding, topPadding, pageWidth, pageHeight); - } - function drawRects(theArray, theGap, theTopPad, theSidePad, theBarHeight, theColorScale, w2) { - const uniqueTaskOrderIds = [...new Set(theArray.map((item) => item.order))]; - const uniqueTasks = uniqueTaskOrderIds.map((id2) => theArray.find((item) => item.order === id2)); - svg.append("g").selectAll("rect").data(uniqueTasks).enter().append("rect").attr("x", 0).attr("y", function(d, i) { - i = d.order; - return i * theGap + theTopPad - 2; - }).attr("width", function() { - return w2 - conf.rightPadding / 2; - }).attr("height", theGap).attr("class", function(d) { - for (const [i, category] of categories.entries()) { - if (d.type === category) { - return "section section" + i % conf.numberSectionStyles; - } - } - return "section section0"; - }); - const rectangles = svg.append("g").selectAll("rect").data(theArray).enter(); - const links2 = diagObj.db.getLinks(); - rectangles.append("rect").attr("id", function(d) { - return d.id; - }).attr("rx", 3).attr("ry", 3).attr("x", function(d) { - if (d.milestone) { - return timeScale(d.startTime) + theSidePad + 0.5 * (timeScale(d.endTime) - timeScale(d.startTime)) - 0.5 * theBarHeight; - } - return timeScale(d.startTime) + theSidePad; - }).attr("y", function(d, i) { - i = d.order; - return i * theGap + theTopPad; - }).attr("width", function(d) { - if (d.milestone) { - return theBarHeight; - } - return timeScale(d.renderEndTime || d.endTime) - timeScale(d.startTime); - }).attr("height", theBarHeight).attr("transform-origin", function(d, i) { - i = d.order; - return (timeScale(d.startTime) + theSidePad + 0.5 * (timeScale(d.endTime) - timeScale(d.startTime))).toString() + "px " + (i * theGap + theTopPad + 0.5 * theBarHeight).toString() + "px"; - }).attr("class", function(d) { - const res = "task"; - let classStr = ""; - if (d.classes.length > 0) { - classStr = d.classes.join(" "); - } - let secNum = 0; - for (const [i, category] of categories.entries()) { - if (d.type === category) { - secNum = i % conf.numberSectionStyles; - } - } - let taskClass = ""; - if (d.active) { - if (d.crit) { - taskClass += " activeCrit"; - } else { - taskClass = " active"; - } - } else if (d.done) { - if (d.crit) { - taskClass = " doneCrit"; - } else { - taskClass = " done"; - } - } else { - if (d.crit) { - taskClass += " crit"; - } - } - if (taskClass.length === 0) { - taskClass = " task"; - } - if (d.milestone) { - taskClass = " milestone " + taskClass; - } - taskClass += secNum; - taskClass += " " + classStr; - return res + taskClass; - }); - rectangles.append("text").attr("id", function(d) { - return d.id + "-text"; - }).text(function(d) { - return d.task; - }).attr("font-size", conf.fontSize).attr("x", function(d) { - let startX = timeScale(d.startTime); - let endX = timeScale(d.renderEndTime || d.endTime); - if (d.milestone) { - startX += 0.5 * (timeScale(d.endTime) - timeScale(d.startTime)) - 0.5 * theBarHeight; - } - if (d.milestone) { - endX = startX + theBarHeight; - } - const textWidth = this.getBBox().width; - if (textWidth > endX - startX) { - if (endX + textWidth + 1.5 * conf.leftPadding > w2) { - return startX + theSidePad - 5; - } else { - return endX + theSidePad + 5; - } - } else { - return (endX - startX) / 2 + startX + theSidePad; - } - }).attr("y", function(d, i) { - i = d.order; - return i * theGap + conf.barHeight / 2 + (conf.fontSize / 2 - 2) + theTopPad; - }).attr("text-height", theBarHeight).attr("class", function(d) { - const startX = timeScale(d.startTime); - let endX = timeScale(d.endTime); - if (d.milestone) { - endX = startX + theBarHeight; - } - const textWidth = this.getBBox().width; - let classStr = ""; - if (d.classes.length > 0) { - classStr = d.classes.join(" "); - } - let secNum = 0; - for (const [i, category] of categories.entries()) { - if (d.type === category) { - secNum = i % conf.numberSectionStyles; - } - } - let taskType = ""; - if (d.active) { - if (d.crit) { - taskType = "activeCritText" + secNum; - } else { - taskType = "activeText" + secNum; - } - } - if (d.done) { - if (d.crit) { - taskType = taskType + " doneCritText" + secNum; - } else { - taskType = taskType + " doneText" + secNum; - } - } else { - if (d.crit) { - taskType = taskType + " critText" + secNum; - } - } - if (d.milestone) { - taskType += " milestoneText"; - } - if (textWidth > endX - startX) { - if (endX + textWidth + 1.5 * conf.leftPadding > w2) { - return classStr + " taskTextOutsideLeft taskTextOutside" + secNum + " " + taskType; - } else { - return classStr + " taskTextOutsideRight taskTextOutside" + secNum + " " + taskType + " width-" + textWidth; - } - } else { - return classStr + " taskText taskText" + secNum + " " + taskType + " width-" + textWidth; - } - }); - const securityLevel2 = (0,_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_7__.c)().securityLevel; - if (securityLevel2 === "sandbox") { - let sandboxElement2; - sandboxElement2 = (0,d3__WEBPACK_IMPORTED_MODULE_5__/* .select */ .Ltv)("#i" + id); - const doc2 = sandboxElement2.nodes()[0].contentDocument; - rectangles.filter(function(d) { - return links2[d.id] !== void 0; - }).each(function(o) { - var taskRect = doc2.querySelector("#" + o.id); - var taskText = doc2.querySelector("#" + o.id + "-text"); - const oldParent = taskRect.parentNode; - var Link = doc2.createElement("a"); - Link.setAttribute("xlink:href", links2[o.id]); - Link.setAttribute("target", "_top"); - oldParent.appendChild(Link); - Link.appendChild(taskRect); - Link.appendChild(taskText); - }); - } - } - function drawExcludeDays(theGap, theTopPad, theSidePad, w2, h2, tasks2, excludes2, includes2) { - if (excludes2.length === 0 && includes2.length === 0) { - return; - } - let minTime; - let maxTime; - for (const { startTime, endTime } of tasks2) { - if (minTime === void 0 || startTime < minTime) { - minTime = startTime; - } - if (maxTime === void 0 || endTime > maxTime) { - maxTime = endTime; - } - } - if (!minTime || !maxTime) { - return; - } - if (dayjs__WEBPACK_IMPORTED_MODULE_1__(maxTime).diff(dayjs__WEBPACK_IMPORTED_MODULE_1__(minTime), "year") > 5) { - _mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_7__.l.warn( - "The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days." - ); - return; - } - const dateFormat2 = diagObj.db.getDateFormat(); - const excludeRanges = []; - let range = null; - let d = dayjs__WEBPACK_IMPORTED_MODULE_1__(minTime); - while (d.valueOf() <= maxTime) { - if (diagObj.db.isInvalidDate(d, dateFormat2, excludes2, includes2)) { - if (!range) { - range = { - start: d, - end: d - }; - } else { - range.end = d; - } - } else { - if (range) { - excludeRanges.push(range); - range = null; - } - } - d = d.add(1, "d"); - } - const rectangles = svg.append("g").selectAll("rect").data(excludeRanges).enter(); - rectangles.append("rect").attr("id", function(d2) { - return "exclude-" + d2.start.format("YYYY-MM-DD"); - }).attr("x", function(d2) { - return timeScale(d2.start) + theSidePad; - }).attr("y", conf.gridLineStartPadding).attr("width", function(d2) { - const renderEnd = d2.end.add(1, "day"); - return timeScale(renderEnd) - timeScale(d2.start); - }).attr("height", h2 - theTopPad - conf.gridLineStartPadding).attr("transform-origin", function(d2, i) { - return (timeScale(d2.start) + theSidePad + 0.5 * (timeScale(d2.end) - timeScale(d2.start))).toString() + "px " + (i * theGap + 0.5 * h2).toString() + "px"; - }).attr("class", "exclude-range"); - } - function makeGrid(theSidePad, theTopPad, w2, h2) { - let bottomXAxis = (0,d3__WEBPACK_IMPORTED_MODULE_5__/* .axisBottom */ .l78)(timeScale).tickSize(-h2 + theTopPad + conf.gridLineStartPadding).tickFormat((0,d3__WEBPACK_IMPORTED_MODULE_5__/* .timeFormat */ .DCK)(diagObj.db.getAxisFormat() || conf.axisFormat || "%Y-%m-%d")); - const reTickInterval = /^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/; - const resultTickInterval = reTickInterval.exec( - diagObj.db.getTickInterval() || conf.tickInterval - ); - if (resultTickInterval !== null) { - const every = resultTickInterval[1]; - const interval = resultTickInterval[2]; - const weekday2 = diagObj.db.getWeekday() || conf.weekday; - switch (interval) { - case "millisecond": - bottomXAxis.ticks(d3__WEBPACK_IMPORTED_MODULE_5__/* .timeMillisecond */ .t6C.every(every)); - break; - case "second": - bottomXAxis.ticks(d3__WEBPACK_IMPORTED_MODULE_5__/* .timeSecond */ .ucG.every(every)); - break; - case "minute": - bottomXAxis.ticks(d3__WEBPACK_IMPORTED_MODULE_5__/* .timeMinute */ .wXd.every(every)); - break; - case "hour": - bottomXAxis.ticks(d3__WEBPACK_IMPORTED_MODULE_5__/* .timeHour */ .Agd.every(every)); - break; - case "day": - bottomXAxis.ticks(d3__WEBPACK_IMPORTED_MODULE_5__/* .timeDay */ .UAC.every(every)); - break; - case "week": - bottomXAxis.ticks(mapWeekdayToTimeFunction[weekday2].every(every)); - break; - case "month": - bottomXAxis.ticks(d3__WEBPACK_IMPORTED_MODULE_5__/* .timeMonth */ .Ui6.every(every)); - break; - } - } - svg.append("g").attr("class", "grid").attr("transform", "translate(" + theSidePad + ", " + (h2 - 50) + ")").call(bottomXAxis).selectAll("text").style("text-anchor", "middle").attr("fill", "#000").attr("stroke", "none").attr("font-size", 10).attr("dy", "1em"); - if (diagObj.db.topAxisEnabled() || conf.topAxis) { - let topXAxis = (0,d3__WEBPACK_IMPORTED_MODULE_5__/* .axisTop */ .tlR)(timeScale).tickSize(-h2 + theTopPad + conf.gridLineStartPadding).tickFormat((0,d3__WEBPACK_IMPORTED_MODULE_5__/* .timeFormat */ .DCK)(diagObj.db.getAxisFormat() || conf.axisFormat || "%Y-%m-%d")); - if (resultTickInterval !== null) { - const every = resultTickInterval[1]; - const interval = resultTickInterval[2]; - const weekday2 = diagObj.db.getWeekday() || conf.weekday; - switch (interval) { - case "millisecond": - topXAxis.ticks(d3__WEBPACK_IMPORTED_MODULE_5__/* .timeMillisecond */ .t6C.every(every)); - break; - case "second": - topXAxis.ticks(d3__WEBPACK_IMPORTED_MODULE_5__/* .timeSecond */ .ucG.every(every)); - break; - case "minute": - topXAxis.ticks(d3__WEBPACK_IMPORTED_MODULE_5__/* .timeMinute */ .wXd.every(every)); - break; - case "hour": - topXAxis.ticks(d3__WEBPACK_IMPORTED_MODULE_5__/* .timeHour */ .Agd.every(every)); - break; - case "day": - topXAxis.ticks(d3__WEBPACK_IMPORTED_MODULE_5__/* .timeDay */ .UAC.every(every)); - break; - case "week": - topXAxis.ticks(mapWeekdayToTimeFunction[weekday2].every(every)); - break; - case "month": - topXAxis.ticks(d3__WEBPACK_IMPORTED_MODULE_5__/* .timeMonth */ .Ui6.every(every)); - break; - } - } - svg.append("g").attr("class", "grid").attr("transform", "translate(" + theSidePad + ", " + theTopPad + ")").call(topXAxis).selectAll("text").style("text-anchor", "middle").attr("fill", "#000").attr("stroke", "none").attr("font-size", 10); - } - } - function vertLabels(theGap, theTopPad) { - let prevGap = 0; - const numOccurrences = Object.keys(categoryHeights).map((d) => [d, categoryHeights[d]]); - svg.append("g").selectAll("text").data(numOccurrences).enter().append(function(d) { - const rows = d[0].split(_mermaid_b5860b54_js__WEBPACK_IMPORTED_MODULE_7__.e.lineBreakRegex); - const dy = -(rows.length - 1) / 2; - const svgLabel = doc.createElementNS("http://www.w3.org/2000/svg", "text"); - svgLabel.setAttribute("dy", dy + "em"); - for (const [j, row] of rows.entries()) { - const tspan = doc.createElementNS("http://www.w3.org/2000/svg", "tspan"); - tspan.setAttribute("alignment-baseline", "central"); - tspan.setAttribute("x", "10"); - if (j > 0) { - tspan.setAttribute("dy", "1em"); - } - tspan.textContent = row; - svgLabel.appendChild(tspan); - } - return svgLabel; - }).attr("x", 10).attr("y", function(d, i) { - if (i > 0) { - for (let j = 0; j < i; j++) { - prevGap += numOccurrences[i - 1][1]; - return d[1] * theGap / 2 + prevGap * theGap + theTopPad; - } - } else { - return d[1] * theGap / 2 + theTopPad; - } - }).attr("font-size", conf.sectionFontSize).attr("class", function(d) { - for (const [i, category] of categories.entries()) { - if (d[0] === category) { - return "sectionTitle sectionTitle" + i % conf.numberSectionStyles; - } - } - return "sectionTitle"; - }); - } - function drawToday(theSidePad, theTopPad, w2, h2) { - const todayMarker2 = diagObj.db.getTodayMarker(); - if (todayMarker2 === "off") { - return; - } - const todayG = svg.append("g").attr("class", "today"); - const today = /* @__PURE__ */ new Date(); - const todayLine = todayG.append("line"); - todayLine.attr("x1", timeScale(today) + theSidePad).attr("x2", timeScale(today) + theSidePad).attr("y1", conf.titleTopMargin).attr("y2", h2 - conf.titleTopMargin).attr("class", "today"); - if (todayMarker2 !== "") { - todayLine.attr("style", todayMarker2.replace(/,/g, ";")); - } - } - function checkUnique(arr) { - const hash = {}; - const result = []; - for (let i = 0, l = arr.length; i < l; ++i) { - if (!Object.prototype.hasOwnProperty.call(hash, arr[i])) { - hash[arr[i]] = true; - result.push(arr[i]); - } - } - return result; - } -}; -const ganttRenderer = { - setConf, - draw -}; -const getStyles = (options) => ` - .mermaid-main-font { - font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif); - } - - .exclude-range { - fill: ${options.excludeBkgColor}; - } - - .section { - stroke: none; - opacity: 0.2; - } - - .section0 { - fill: ${options.sectionBkgColor}; - } - - .section2 { - fill: ${options.sectionBkgColor2}; - } - - .section1, - .section3 { - fill: ${options.altSectionBkgColor}; - opacity: 0.2; - } - - .sectionTitle0 { - fill: ${options.titleColor}; - } - - .sectionTitle1 { - fill: ${options.titleColor}; - } - - .sectionTitle2 { - fill: ${options.titleColor}; - } - - .sectionTitle3 { - fill: ${options.titleColor}; - } - - .sectionTitle { - text-anchor: start; - font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif); - } - - - /* Grid and axis */ - - .grid .tick { - stroke: ${options.gridColor}; - opacity: 0.8; - shape-rendering: crispEdges; - } - - .grid .tick text { - font-family: ${options.fontFamily}; - fill: ${options.textColor}; - } - - .grid path { - stroke-width: 0; - } - - - /* Today line */ - - .today { - fill: none; - stroke: ${options.todayLineColor}; - stroke-width: 2px; - } - - - /* Task styling */ - - /* Default task */ - - .task { - stroke-width: 2; - } - - .taskText { - text-anchor: middle; - font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif); - } - - .taskTextOutsideRight { - fill: ${options.taskTextDarkColor}; - text-anchor: start; - font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif); - } - - .taskTextOutsideLeft { - fill: ${options.taskTextDarkColor}; - text-anchor: end; - } - - - /* Special case clickable */ - - .task.clickable { - cursor: pointer; - } - - .taskText.clickable { - cursor: pointer; - fill: ${options.taskTextClickableColor} !important; - font-weight: bold; - } - - .taskTextOutsideLeft.clickable { - cursor: pointer; - fill: ${options.taskTextClickableColor} !important; - font-weight: bold; - } - - .taskTextOutsideRight.clickable { - cursor: pointer; - fill: ${options.taskTextClickableColor} !important; - font-weight: bold; - } - - - /* Specific task settings for the sections*/ - - .taskText0, - .taskText1, - .taskText2, - .taskText3 { - fill: ${options.taskTextColor}; - } - - .task0, - .task1, - .task2, - .task3 { - fill: ${options.taskBkgColor}; - stroke: ${options.taskBorderColor}; - } - - .taskTextOutside0, - .taskTextOutside2 - { - fill: ${options.taskTextOutsideColor}; - } - - .taskTextOutside1, - .taskTextOutside3 { - fill: ${options.taskTextOutsideColor}; - } - - - /* Active task */ - - .active0, - .active1, - .active2, - .active3 { - fill: ${options.activeTaskBkgColor}; - stroke: ${options.activeTaskBorderColor}; - } - - .activeText0, - .activeText1, - .activeText2, - .activeText3 { - fill: ${options.taskTextDarkColor} !important; - } - - - /* Completed task */ - - .done0, - .done1, - .done2, - .done3 { - stroke: ${options.doneTaskBorderColor}; - fill: ${options.doneTaskBkgColor}; - stroke-width: 2; - } - - .doneText0, - .doneText1, - .doneText2, - .doneText3 { - fill: ${options.taskTextDarkColor} !important; - } - - - /* Tasks on the critical line */ - - .crit0, - .crit1, - .crit2, - .crit3 { - stroke: ${options.critBorderColor}; - fill: ${options.critBkgColor}; - stroke-width: 2; - } - - .activeCrit0, - .activeCrit1, - .activeCrit2, - .activeCrit3 { - stroke: ${options.critBorderColor}; - fill: ${options.activeTaskBkgColor}; - stroke-width: 2; - } - - .doneCrit0, - .doneCrit1, - .doneCrit2, - .doneCrit3 { - stroke: ${options.critBorderColor}; - fill: ${options.doneTaskBkgColor}; - stroke-width: 2; - cursor: pointer; - shape-rendering: crispEdges; - } - - .milestone { - transform: rotate(45deg) scale(0.8,0.8); - } - - .milestoneText { - font-style: italic; - } - .doneCritText0, - .doneCritText1, - .doneCritText2, - .doneCritText3 { - fill: ${options.taskTextDarkColor} !important; - } - - .activeCritText0, - .activeCritText1, - .activeCritText2, - .activeCritText3 { - fill: ${options.taskTextDarkColor} !important; - } - - .titleText { - text-anchor: middle; - font-size: 18px; - fill: ${options.titleColor || options.textColor}; - font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif); - } -`; -const ganttStyles = getStyles; -const diagram = { - parser: ganttParser, - db: ganttDb, - renderer: ganttRenderer, - styles: ganttStyles -}; - - - -/***/ }) - -}; -; \ No newline at end of file diff --git a/assets/js/98a30fd8.3b61ae9c.js b/assets/js/98a30fd8.3b61ae9c.js deleted file mode 100644 index 8dce66c1eceb..000000000000 --- a/assets/js/98a30fd8.3b61ae9c.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2950],{11193:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>r,contentTitle:()=>a,default:()=>u,frontMatter:()=>l,metadata:()=>o,toc:()=>d});var n=t(74848),i=t(28453);const l={id:"learn-xcm-docs-fundamentals-multiasset",title:"MultiAsset",sidebar_label:"MultiAsset",description:"The MultiAsset Datatype.",keywords:["xcm","cross-consensus messaging","multilocation"],slug:"../fundamentals-multiasset"},a="MultiAsset",o={id:"learn/xcm/fundamentals/learn-xcm-docs-fundamentals-multiasset",title:"MultiAsset",description:"The MultiAsset Datatype.",source:"@site/../docs/learn/xcm/fundamentals/multiasset.md",sourceDirName:"learn/xcm/fundamentals",slug:"/learn/xcm/fundamentals-multiasset",permalink:"/docs/learn/xcm/fundamentals-multiasset",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/xcm/fundamentals/multiasset.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1726730833e3,frontMatter:{id:"learn-xcm-docs-fundamentals-multiasset",title:"MultiAsset",sidebar_label:"MultiAsset",description:"The MultiAsset Datatype.",keywords:["xcm","cross-consensus messaging","multilocation"],slug:"../fundamentals-multiasset"},sidebar:"docs",previous:{title:"Example",permalink:"/docs/learn/xcm/fundamentals/multilocation-example"},next:{title:"XCVM",permalink:"/docs/learn/xcm/fundamentals-xcvm"}},r={},d=[{value:"MultiAsset Breakdown",id:"multiasset-breakdown",level:2},{value:"How to use Multiple Assets Together?",id:"how-to-use-multiple-assets-together",level:2},{value:"MultiAssets",id:"multiassets",level:3},{value:"WildMultiAsset",id:"wildmultiasset",level:3},{value:"MultiAssetFilter",id:"multiassetfilter",level:3},{value:"Examples",id:"examples",level:2},{value:"MultiAsset",id:"multiasset-1",level:3},{value:"MultiAssetFilter",id:"multiassetfilter-1",level:3}];function c(e){const s={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,i.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.header,{children:(0,n.jsx)(s.h1,{id:"multiasset",children:"MultiAsset"})}),"\n",(0,n.jsx)(s.p,{children:"When working with XCM, it is often needed to represent an asset of some sort. This is because\npractically all public blockchains in existence rely on some native digital asset to provide the\nbackbone for its internal economy and security mechanism. For example, the native asset for the\nPolkadot relay chain is DOT."}),"\n",(0,n.jsx)(s.p,{children:"Some blockchains manage multiple assets, e.g. Ethereum\u2019s ERC-20 framework allows for many different\nassets to be managed on-chain. Some manage assets that are not fungible, such as Ethereum\u2019s\nCrypto-kitties \u2014 each kitty is a one-of-a-kind instance. It was an early example of such\nnon-fungible tokens or NFTs."}),"\n",(0,n.jsxs)(s.p,{children:["XCM is designed to be able to describe all such assets without breaking a sweat. For this purpose,\nthere is the ",(0,n.jsx)(s.code,{children:"MultiAsset"})," datatype, along with its related types ",(0,n.jsx)(s.code,{children:"MultiAssets"}),", ",(0,n.jsx)(s.code,{children:"WildMultiAsset"}),",\nand ",(0,n.jsx)(s.code,{children:"MultiAssetFilter"}),"."]}),"\n",(0,n.jsx)(s.h2,{id:"multiasset-breakdown",children:"MultiAsset Breakdown"}),"\n",(0,n.jsx)(s.p,{children:"Let's take a look at the MultiAsset struct:"}),"\n",(0,n.jsx)(s.pre,{children:(0,n.jsx)(s.code,{className:"language-rust",children:"pub struct MultiAsset {\n pub id: AssetId,\n pub fun: Fungibility,\n}\n"})}),"\n",(0,n.jsx)(s.p,{children:"So two fields define our asset: id and fun. These fields are indicative of how XCM approaches\nassets. Firstly, an overall asset identity must be provided. For fungible assets, this is simply a\nsymbol that identifies the asset. For NFTs this identifies the overall asset \u201cclass\u201d \u2014 different\nasset instances may be within this class."}),"\n",(0,n.jsx)(s.pre,{children:(0,n.jsx)(s.code,{className:"language-rust",children:"enum AssetId {\n Concrete(MultiLocation),\n Abstract([u8; 32]),\n}\n"})}),"\n",(0,n.jsxs)(s.p,{children:["The asset identity is expressed in one of two ways; either Concrete or Abstract. Abstract identities\nallow assets to be specified by a 32-byte blob. This is convenient, but it relies on the receiver to\ninterpret the blob in the way that the sender expects, which will require a common definition\nbetween the sender and the receiver, and may not be simple to achieve. Concrete identities use a\n",(0,n.jsx)(s.code,{children:"MultiLocation"})," to identify an asset unambiguously. For native assets (such as DOT), the asset is\nidentified as the chain which mints the asset (the Polkadot relay chain in this case, which would be\nthe location ",(0,n.jsx)(s.code,{children:".."})," from one of its parachains). Other assets (e.g. non-native assets or NFTs) can be\nidentified by a ",(0,n.jsx)(s.code,{children:"GeneralIndex"})," junction. Depending on the implementation of the encapsulating\nconsensus system, the exact location may differ (e.g. ",(0,n.jsx)(s.code,{children:"GeneralIndex(AssetID)"})," or\n",(0,n.jsx)(s.code,{children:"PalletInstance(PalletID)/GeneralIndex(AssetID)"})," can both be valid asset identities)."]}),"\n",(0,n.jsx)(s.pre,{children:(0,n.jsx)(s.code,{className:"language-rust",children:"enum Fungibility {\n // Fungible cannot be 0\n Fungible(u128),\n NonFungible(AssetInstance),\n}\n"})}),"\n",(0,n.jsxs)(s.p,{children:["Secondly, they must be either fungible or non-fungible. If they\u2019re fungible, then there should be\nsome associated non-zero amount of assets specified. If they\u2019re not fungible, then instead of an\namount, there should be some indication of which\n",(0,n.jsx)(s.a,{href:"https://paritytech.github.io/polkadot/doc/xcm/v3/enum.AssetInstance.html",children:"AssetInstance"})," they are.\n(This is commonly expressed with an index, but XCM also allows arrays.)"]}),"\n",(0,n.jsx)(s.h2,{id:"how-to-use-multiple-assets-together",children:"How to use Multiple Assets Together?"}),"\n",(0,n.jsx)(s.p,{children:"There are multiple ways to group Assets. In this section, we go over these methods."}),"\n",(0,n.jsx)(s.h3,{id:"multiassets",children:"MultiAssets"}),"\n",(0,n.jsxs)(s.p,{children:["One way to group a set of ",(0,n.jsx)(s.code,{children:"MultiAsset"})," items is the\n",(0,n.jsx)(s.a,{href:"https://paritytech.github.io/polkadot/doc/xcm/v3/struct.MultiAssets.html",children:"MultiAssets"})," type."]}),"\n",(0,n.jsx)(s.pre,{children:(0,n.jsx)(s.code,{className:"language-rust",children:"struct MultiAssets(Vec);\n"})}),"\n",(0,n.jsx)(s.p,{children:"This structure must uphold some rules:"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:["It may not contain duplicate ",(0,n.jsx)(s.code,{children:"MultiAsset"}),"s (",(0,n.jsx)(s.code,{children:"Fungible"})," assets are considered the same if their IDs\nmatch. However, ",(0,n.jsx)(s.code,{children:"NonFungible"})," assets are different if the ",(0,n.jsx)(s.code,{children:"AssetInstance"})," is different);"]}),"\n",(0,n.jsx)(s.li,{children:"All items must be ordered;"}),"\n",(0,n.jsx)(s.li,{children:"The number of items should grow no larger than MAX_ITEMS_IN_MULTIASSETS (currently set to 20)."}),"\n"]}),"\n",(0,n.jsx)(s.h3,{id:"wildmultiasset",children:"WildMultiAsset"}),"\n",(0,n.jsxs)(s.p,{children:["Then we have WildMultiAsset; this is a wildcard that can be used to match against one or more\nMultiAsset items. All the WildMultiAsset wildcards can be used to select/filter assets in the\n",(0,n.jsx)(s.a,{href:"/docs/learn/xcm/overview-xcvm",children:"Holding register"}),"."]}),"\n",(0,n.jsx)(s.pre,{children:(0,n.jsx)(s.code,{className:"language-rust",children:"pub enum WildMultiAsset {\n /// All assets in Holding.\n All,\n /// All assets in Holding of a given fungibility and ID.\n AllOf { id: AssetId, fun: WildFungibility },\n /// All assets in Holding, up to `u32` individual assets (different instances of non-fungibles\n /// are separate assets).\n AllCounted(#[codec(compact)] u32),\n /// All assets in Holding of a given fungibility and ID up to `count` individual assets\n /// (different instances of non-fungibles are separate assets).\n AllOfCounted {\n id: AssetId,\n fun: WildFungibility,\n #[codec(compact)]\n count: u32,\n },\n}\n"})}),"\n",(0,n.jsx)(s.h3,{id:"multiassetfilter",children:"MultiAssetFilter"}),"\n",(0,n.jsxs)(s.p,{children:["Finally, there is ",(0,n.jsx)(s.code,{children:"MultiAssetFilter"}),". This is used most often and is just a combination of\nMultiAssets and WildMultiAsset allowing either a wildcard or a list of definite (i.e. not wildcard)\nassets to be specified."]}),"\n",(0,n.jsx)(s.pre,{children:(0,n.jsx)(s.code,{className:"language-rust",children:"pub enum MultiAssetFilter {\n /// Specify the filter as being everything contained by the given `MultiAssets` inner.\n Definite(MultiAssets),\n /// Specify the filter as the given `WildMultiAsset` wildcard.\n Wild(WildMultiAsset),\n}\n"})}),"\n",(0,n.jsx)(s.h2,{id:"examples",children:"Examples"}),"\n",(0,n.jsx)(s.h3,{id:"multiasset-1",children:"MultiAsset"}),"\n",(0,n.jsxs)(s.p,{children:["For more information about the MultiLocations used to define concrete assets, see\n",(0,n.jsx)(s.a,{href:"/docs/learn/xcm/fundamentals/multilocation-summary",children:"MultiLocation"})," and ",(0,n.jsx)(s.a,{href:"/docs/learn/xcm/fundamentals/multilocation-junctions",children:"Junction"}),"."]}),"\n",(0,n.jsx)(s.pre,{children:(0,n.jsx)(s.code,{className:"language-rust",children:"// Location relay chain\n// 100 Native Asset (three ways)\nMultiAsset {id: Concrete(MultiLocation {parents: 0, interior: Here}), fun: Fungible(100u128)};\nMultiAsset {id: Here.into(), fun: 100.into()};\nlet _: MultiAsset = (Here, 100u128).into();\n\n// 100 Parachain's Native Asset\nlet _: MultiAsset = (X1(Parachain(1000)), 100u128).into();\n// 100 Fungible assets in Parachain 1000 with id 1234\nlet _: MultiAsset = (X2(Parachain(1000), GeneralIndex(1234)), 100u128).into();\n// Non Fungible asset with asset class 1234 containing only one nft instance in Parachain 1000\nlet _: MultiAsset = (X2(Parachain(1000), GeneralIndex(1234)), Undefined).into();\n// Non Fungible asset with asset class 1234 and AssetInstance 1 in Parachain 1000\nlet _: MultiAsset = (X2(Parachain(1000), GeneralIndex(1234)), Index(1)).into();\n"})}),"\n",(0,n.jsx)(s.h3,{id:"multiassetfilter-1",children:"MultiAssetFilter"}),"\n",(0,n.jsx)(s.pre,{children:(0,n.jsx)(s.code,{className:"language-rust",children:"let a1: MultiAssets = MultiAssets::from(vec![MultiAsset {id: Here.into(), fun: 100u128.into()}]);\nlet b1: MultiAssets = (Here, 100u128).into();\nassert_eq!(a1, b1);\n\nlet a2: MultiAssetFilter = a1.into();\nlet b2 = MultiAssetFilter::Definite((Here, 100u128).into());\nassert_eq!(a2, b2);\n\nlet a3 = MultiAssetFilter::Wild(WildMultiAsset::All);\nlet b3: MultiAssetFilter = All.into();\nassert_eq!(a3, b3);\n"})})]})}function u(e={}){const{wrapper:s}={...(0,i.R)(),...e.components};return s?(0,n.jsx)(s,{...e,children:(0,n.jsx)(c,{...e})}):c(e)}},28453:(e,s,t)=>{t.d(s,{R:()=>a,x:()=>o});var n=t(96540);const i={},l=n.createContext(i);function a(e){const s=n.useContext(l);return n.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function o(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:a(e.components),n.createElement(l.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/98a30fd8.ae4fba84.js b/assets/js/98a30fd8.ae4fba84.js new file mode 100644 index 000000000000..9bbb04c61909 --- /dev/null +++ b/assets/js/98a30fd8.ae4fba84.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2950],{81151:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>r,contentTitle:()=>o,default:()=>u,frontMatter:()=>a,metadata:()=>n,toc:()=>d});const n=JSON.parse('{"id":"learn/xcm/fundamentals/learn-xcm-docs-fundamentals-multiasset","title":"MultiAsset","description":"The MultiAsset Datatype.","source":"@site/../docs/learn/xcm/fundamentals/multiasset.md","sourceDirName":"learn/xcm/fundamentals","slug":"/learn/xcm/fundamentals-multiasset","permalink":"/docs/learn/xcm/fundamentals-multiasset","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/xcm/fundamentals/multiasset.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1726730833000,"frontMatter":{"id":"learn-xcm-docs-fundamentals-multiasset","title":"MultiAsset","sidebar_label":"MultiAsset","description":"The MultiAsset Datatype.","keywords":["xcm","cross-consensus messaging","multilocation"],"slug":"../fundamentals-multiasset"},"sidebar":"docs","previous":{"title":"Example","permalink":"/docs/learn/xcm/fundamentals/multilocation-example"},"next":{"title":"XCVM","permalink":"/docs/learn/xcm/fundamentals-xcvm"}}');var i=t(74848),l=t(28453);const a={id:"learn-xcm-docs-fundamentals-multiasset",title:"MultiAsset",sidebar_label:"MultiAsset",description:"The MultiAsset Datatype.",keywords:["xcm","cross-consensus messaging","multilocation"],slug:"../fundamentals-multiasset"},o="MultiAsset",r={},d=[{value:"MultiAsset Breakdown",id:"multiasset-breakdown",level:2},{value:"How to use Multiple Assets Together?",id:"how-to-use-multiple-assets-together",level:2},{value:"MultiAssets",id:"multiassets",level:3},{value:"WildMultiAsset",id:"wildmultiasset",level:3},{value:"MultiAssetFilter",id:"multiassetfilter",level:3},{value:"Examples",id:"examples",level:2},{value:"MultiAsset",id:"multiasset-1",level:3},{value:"MultiAssetFilter",id:"multiassetfilter-1",level:3}];function c(e){const s={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,l.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(s.header,{children:(0,i.jsx)(s.h1,{id:"multiasset",children:"MultiAsset"})}),"\n",(0,i.jsx)(s.p,{children:"When working with XCM, it is often needed to represent an asset of some sort. This is because\npractically all public blockchains in existence rely on some native digital asset to provide the\nbackbone for its internal economy and security mechanism. For example, the native asset for the\nPolkadot relay chain is DOT."}),"\n",(0,i.jsx)(s.p,{children:"Some blockchains manage multiple assets, e.g. Ethereum\u2019s ERC-20 framework allows for many different\nassets to be managed on-chain. Some manage assets that are not fungible, such as Ethereum\u2019s\nCrypto-kitties \u2014 each kitty is a one-of-a-kind instance. It was an early example of such\nnon-fungible tokens or NFTs."}),"\n",(0,i.jsxs)(s.p,{children:["XCM is designed to be able to describe all such assets without breaking a sweat. For this purpose,\nthere is the ",(0,i.jsx)(s.code,{children:"MultiAsset"})," datatype, along with its related types ",(0,i.jsx)(s.code,{children:"MultiAssets"}),", ",(0,i.jsx)(s.code,{children:"WildMultiAsset"}),",\nand ",(0,i.jsx)(s.code,{children:"MultiAssetFilter"}),"."]}),"\n",(0,i.jsx)(s.h2,{id:"multiasset-breakdown",children:"MultiAsset Breakdown"}),"\n",(0,i.jsx)(s.p,{children:"Let's take a look at the MultiAsset struct:"}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-rust",children:"pub struct MultiAsset {\n pub id: AssetId,\n pub fun: Fungibility,\n}\n"})}),"\n",(0,i.jsx)(s.p,{children:"So two fields define our asset: id and fun. These fields are indicative of how XCM approaches\nassets. Firstly, an overall asset identity must be provided. For fungible assets, this is simply a\nsymbol that identifies the asset. For NFTs this identifies the overall asset \u201cclass\u201d \u2014 different\nasset instances may be within this class."}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-rust",children:"enum AssetId {\n Concrete(MultiLocation),\n Abstract([u8; 32]),\n}\n"})}),"\n",(0,i.jsxs)(s.p,{children:["The asset identity is expressed in one of two ways; either Concrete or Abstract. Abstract identities\nallow assets to be specified by a 32-byte blob. This is convenient, but it relies on the receiver to\ninterpret the blob in the way that the sender expects, which will require a common definition\nbetween the sender and the receiver, and may not be simple to achieve. Concrete identities use a\n",(0,i.jsx)(s.code,{children:"MultiLocation"})," to identify an asset unambiguously. For native assets (such as DOT), the asset is\nidentified as the chain which mints the asset (the Polkadot relay chain in this case, which would be\nthe location ",(0,i.jsx)(s.code,{children:".."})," from one of its parachains). Other assets (e.g. non-native assets or NFTs) can be\nidentified by a ",(0,i.jsx)(s.code,{children:"GeneralIndex"})," junction. Depending on the implementation of the encapsulating\nconsensus system, the exact location may differ (e.g. ",(0,i.jsx)(s.code,{children:"GeneralIndex(AssetID)"})," or\n",(0,i.jsx)(s.code,{children:"PalletInstance(PalletID)/GeneralIndex(AssetID)"})," can both be valid asset identities)."]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-rust",children:"enum Fungibility {\n // Fungible cannot be 0\n Fungible(u128),\n NonFungible(AssetInstance),\n}\n"})}),"\n",(0,i.jsxs)(s.p,{children:["Secondly, they must be either fungible or non-fungible. If they\u2019re fungible, then there should be\nsome associated non-zero amount of assets specified. If they\u2019re not fungible, then instead of an\namount, there should be some indication of which\n",(0,i.jsx)(s.a,{href:"https://paritytech.github.io/polkadot/doc/xcm/v3/enum.AssetInstance.html",children:"AssetInstance"})," they are.\n(This is commonly expressed with an index, but XCM also allows arrays.)"]}),"\n",(0,i.jsx)(s.h2,{id:"how-to-use-multiple-assets-together",children:"How to use Multiple Assets Together?"}),"\n",(0,i.jsx)(s.p,{children:"There are multiple ways to group Assets. In this section, we go over these methods."}),"\n",(0,i.jsx)(s.h3,{id:"multiassets",children:"MultiAssets"}),"\n",(0,i.jsxs)(s.p,{children:["One way to group a set of ",(0,i.jsx)(s.code,{children:"MultiAsset"})," items is the\n",(0,i.jsx)(s.a,{href:"https://paritytech.github.io/polkadot/doc/xcm/v3/struct.MultiAssets.html",children:"MultiAssets"})," type."]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-rust",children:"struct MultiAssets(Vec);\n"})}),"\n",(0,i.jsx)(s.p,{children:"This structure must uphold some rules:"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["It may not contain duplicate ",(0,i.jsx)(s.code,{children:"MultiAsset"}),"s (",(0,i.jsx)(s.code,{children:"Fungible"})," assets are considered the same if their IDs\nmatch. However, ",(0,i.jsx)(s.code,{children:"NonFungible"})," assets are different if the ",(0,i.jsx)(s.code,{children:"AssetInstance"})," is different);"]}),"\n",(0,i.jsx)(s.li,{children:"All items must be ordered;"}),"\n",(0,i.jsx)(s.li,{children:"The number of items should grow no larger than MAX_ITEMS_IN_MULTIASSETS (currently set to 20)."}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"wildmultiasset",children:"WildMultiAsset"}),"\n",(0,i.jsxs)(s.p,{children:["Then we have WildMultiAsset; this is a wildcard that can be used to match against one or more\nMultiAsset items. All the WildMultiAsset wildcards can be used to select/filter assets in the\n",(0,i.jsx)(s.a,{href:"/docs/learn/xcm/overview-xcvm",children:"Holding register"}),"."]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-rust",children:"pub enum WildMultiAsset {\n /// All assets in Holding.\n All,\n /// All assets in Holding of a given fungibility and ID.\n AllOf { id: AssetId, fun: WildFungibility },\n /// All assets in Holding, up to `u32` individual assets (different instances of non-fungibles\n /// are separate assets).\n AllCounted(#[codec(compact)] u32),\n /// All assets in Holding of a given fungibility and ID up to `count` individual assets\n /// (different instances of non-fungibles are separate assets).\n AllOfCounted {\n id: AssetId,\n fun: WildFungibility,\n #[codec(compact)]\n count: u32,\n },\n}\n"})}),"\n",(0,i.jsx)(s.h3,{id:"multiassetfilter",children:"MultiAssetFilter"}),"\n",(0,i.jsxs)(s.p,{children:["Finally, there is ",(0,i.jsx)(s.code,{children:"MultiAssetFilter"}),". This is used most often and is just a combination of\nMultiAssets and WildMultiAsset allowing either a wildcard or a list of definite (i.e. not wildcard)\nassets to be specified."]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-rust",children:"pub enum MultiAssetFilter {\n /// Specify the filter as being everything contained by the given `MultiAssets` inner.\n Definite(MultiAssets),\n /// Specify the filter as the given `WildMultiAsset` wildcard.\n Wild(WildMultiAsset),\n}\n"})}),"\n",(0,i.jsx)(s.h2,{id:"examples",children:"Examples"}),"\n",(0,i.jsx)(s.h3,{id:"multiasset-1",children:"MultiAsset"}),"\n",(0,i.jsxs)(s.p,{children:["For more information about the MultiLocations used to define concrete assets, see\n",(0,i.jsx)(s.a,{href:"/docs/learn/xcm/fundamentals/multilocation-summary",children:"MultiLocation"})," and ",(0,i.jsx)(s.a,{href:"/docs/learn/xcm/fundamentals/multilocation-junctions",children:"Junction"}),"."]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-rust",children:"// Location relay chain\n// 100 Native Asset (three ways)\nMultiAsset {id: Concrete(MultiLocation {parents: 0, interior: Here}), fun: Fungible(100u128)};\nMultiAsset {id: Here.into(), fun: 100.into()};\nlet _: MultiAsset = (Here, 100u128).into();\n\n// 100 Parachain's Native Asset\nlet _: MultiAsset = (X1(Parachain(1000)), 100u128).into();\n// 100 Fungible assets in Parachain 1000 with id 1234\nlet _: MultiAsset = (X2(Parachain(1000), GeneralIndex(1234)), 100u128).into();\n// Non Fungible asset with asset class 1234 containing only one nft instance in Parachain 1000\nlet _: MultiAsset = (X2(Parachain(1000), GeneralIndex(1234)), Undefined).into();\n// Non Fungible asset with asset class 1234 and AssetInstance 1 in Parachain 1000\nlet _: MultiAsset = (X2(Parachain(1000), GeneralIndex(1234)), Index(1)).into();\n"})}),"\n",(0,i.jsx)(s.h3,{id:"multiassetfilter-1",children:"MultiAssetFilter"}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-rust",children:"let a1: MultiAssets = MultiAssets::from(vec![MultiAsset {id: Here.into(), fun: 100u128.into()}]);\nlet b1: MultiAssets = (Here, 100u128).into();\nassert_eq!(a1, b1);\n\nlet a2: MultiAssetFilter = a1.into();\nlet b2 = MultiAssetFilter::Definite((Here, 100u128).into());\nassert_eq!(a2, b2);\n\nlet a3 = MultiAssetFilter::Wild(WildMultiAsset::All);\nlet b3: MultiAssetFilter = All.into();\nassert_eq!(a3, b3);\n"})})]})}function u(e={}){const{wrapper:s}={...(0,l.R)(),...e.components};return s?(0,i.jsx)(s,{...e,children:(0,i.jsx)(c,{...e})}):c(e)}},28453:(e,s,t)=>{t.d(s,{R:()=>a,x:()=>o});var n=t(96540);const i={},l=n.createContext(i);function a(e){const s=n.useContext(l);return n.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function o(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:a(e.components),n.createElement(l.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/98a431f4.caaa7643.js b/assets/js/98a431f4.caaa7643.js deleted file mode 100644 index 89493241855f..000000000000 --- a/assets/js/98a431f4.caaa7643.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8005],{40058:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>o,default:()=>h,frontMatter:()=>s,metadata:()=>r,toc:()=>d});var a=n(74848),i=n(28453);const s={id:"transaction-attacks",title:"Why Verify Transactions?",sidebar_label:"Transaction Verification",description:"How to Prevent from being a Victim of an Attack",keywords:["transaction","extrinsic","verification","protection"],slug:"../transaction-attacks"},o=void 0,r={id:"general/transaction-attacks",title:"Why Verify Transactions?",description:"How to Prevent from being a Victim of an Attack",source:"@site/../docs/general/transaction-attacks.md",sourceDirName:"general",slug:"/transaction-attacks",permalink:"/docs/transaction-attacks",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/transaction-attacks.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1726729579e3,frontMatter:{id:"transaction-attacks",title:"Why Verify Transactions?",sidebar_label:"Transaction Verification",description:"How to Prevent from being a Victim of an Attack",keywords:["transaction","extrinsic","verification","protection"],slug:"../transaction-attacks"},sidebar:"docs",previous:{title:"Scam Protection",permalink:"/docs/learn-scams"},next:{title:"Build on Polkadot",permalink:"/docs/start-building"}},c={},d=[{value:"Clipboard Memory",id:"clipboard-memory",level:3},{value:"Malicious Website/dApp",id:"malicious-websitedapp",level:3},{value:"Malicious Browser Extension",id:"malicious-browser-extension",level:3},{value:"Corrupted metadata",id:"corrupted-metadata",level:3},{value:"Corrupted QR-code (Parity Signer)",id:"corrupted-qr-code-parity-signer",level:3},{value:"Replay Attack",id:"replay-attack",level:3},{value:"Defense against Attacks",id:"defense-against-attacks",level:2}];function l(e){const t={a:"a",admonition:"admonition",h2:"h2",h3:"h3",li:"li",p:"p",ul:"ul",...(0,i.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(t.p,{children:"In general, an attacker would make you think you are signing a Transaction A when in reality you are\nsigning a Transaction B. An Attack might come from:"}),"\n",(0,a.jsx)(t.h3,{id:"clipboard-memory",children:"Clipboard Memory"}),"\n",(0,a.jsx)(t.admonition,{type:"info",children:(0,a.jsxs)(t.p,{children:["For a more detailed read about clipboard memory attacks see\n",(0,a.jsx)(t.a,{href:"https://www.kaspersky.com/blog/cryptoshuffler-bitcoin-stealer/19976/",children:"this article"}),"."]})}),"\n",(0,a.jsx)(t.p,{children:"This is a common attack. The clipboard memory is that memory on your computer dedicated to\ncopy-paste operations. There is malicious software that can be remotely installed on your computer\nand that can detect when a cryptocurrency address is copied. For example, you want to send funds to\nAddress A (belonging to you) but after copying address A a malicious software swaps that address\nwith Address B (belonging to an attacker). This attack can be prevented by checking the receiver\naddress before signing. Failing to do so could result in loss of the funds."}),"\n",(0,a.jsx)(t.h3,{id:"malicious-websitedapp",children:"Malicious Website/dApp"}),"\n",(0,a.jsx)(t.p,{children:"This is a common attack that can happen if you are interacting with a malicious site (dApp). In this\nscenario you want to perform Transaction A on the website, but the dApp will send Transaction B to\nthe extension for signing. In this case the extension will show Transaction B. If you are using a\nLedger device you have a second layer of verification, as it will also display Transaction B."}),"\n",(0,a.jsx)(t.h3,{id:"malicious-browser-extension",children:"Malicious Browser Extension"}),"\n",(0,a.jsxs)(t.p,{children:["This scenario can happen if you have downloaded a malicious browser extension or a trusted browser\nextension, from a non-trusted source. In this scenario the extension will display that you will sign\nfor an Transaction A but in the background will execute Transaction B. If you are using a\n",(0,a.jsx)(t.a,{href:"https://www.ledger.com/",children:"Ledger"})," device this attack can be detected because you will be able to see\nTransaction B on the screen of your Ledger device."]}),"\n",(0,a.jsx)(t.h3,{id:"corrupted-metadata",children:"Corrupted metadata"}),"\n",(0,a.jsx)(t.p,{children:"This attack is least common and might result in signing a non-intended transaction without the\npossibility of verifying it. Before authorizing the metadata update check who is requesting it.\nMetadata updates for browser extensions might be requested by dApps (for example DeFi apps of\nparachains). For the extensions, you should trust the app that requests the update. When updating\nthe metadata for Parity Signer you should trust the issuer of the metadata (or generate the QR\nfountain yourself)."}),"\n",(0,a.jsx)(t.h3,{id:"corrupted-qr-code-parity-signer",children:"Corrupted QR-code (Parity Signer)"}),"\n",(0,a.jsxs)(t.p,{children:["This is a sub-case of the malicious dApp scenario. If your account is on\n",(0,a.jsx)(t.a,{href:"https://www.parity.io/technologies/signer/",children:"Parity Signer"})," the transaction will be displayed as a\nQR code, instead of the extension showing its details and you need to verify it on the device. The\ncorrupted QR code will make you sign for an Transaction B when you want to sign for Transaction A.\nThis will be showed in the Signer app and a careful user will notice it. If the metadata in the\nSigner is already incorrect (or the Signer is corrupted) there is the risk of signing a non-intended\ntransaction without the possibility of verifying it."]}),"\n",(0,a.jsx)(t.h3,{id:"replay-attack",children:"Replay Attack"}),"\n",(0,a.jsxs)(t.p,{children:["A replay attack is where past transactions can be replayed (same ",(0,a.jsx)(t.a,{href:"#balance-transfers",children:"balance"}),',\nreceiver account, etc.) without knowing private keys. It is an attack where publicly known data can\nbe "replayed" as a new extrinsic. This could happen in the context of\n',(0,a.jsx)(t.a,{href:"/docs/learn-accounts#existential-deposit-and-reaping",children:"reaping accounts"})," because the reaping\nprocess resets the nonce value. If all signed transactions until the nonce before the reaping event\nwere immortal, all past transactions can be replayed once the account is refunded. There is no need\nfor the attacker to know your private key, valid signatures for those past transactions and nonces\nalready exist and are stored on-chain (meaning the private key was already used to generate those\nsignatures)."]}),"\n",(0,a.jsxs)(t.p,{children:["Making a ",(0,a.jsx)(t.a,{href:"/docs/learn-transactions#mortal-and-immortal-extrinsics",children:"transaction mortal"})," with a\nrelatively short mortality window will almost certainly ensure that replay attacks are not possible,\nwith the only exception being if the account is reaped and then re-funded shortly after submitting a\nmortal transaction, and then an attacker replays that transaction within the mortality window (i.e.,\nthe specified block interval) and such transaction is valid (e.g. if you only have 10 DOT, and you\ntry to issue an extrinsic sending 20 DOT, the transfer will fail)."]}),"\n",(0,a.jsx)(t.h2,{id:"defense-against-attacks",children:"Defense against Attacks"}),"\n",(0,a.jsx)(t.admonition,{type:"warning",children:(0,a.jsx)(t.p,{children:"If you can't verify the transaction or you suspect you are signing something different than what you\nintended, don't sign it!"})}),"\n",(0,a.jsx)(t.p,{children:"To avoid being victim of an attack:"}),"\n",(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsx)(t.li,{children:"Use only trusted extensions, sites and software in general."}),"\n",(0,a.jsx)(t.li,{children:"Use cold storage options (Ledger, Signer) and verify them. Trust what these devices tell you over\nwhat is shown in the app or the browser extension."}),"\n",(0,a.jsx)(t.li,{children:"Update Signer metadata only from trusted sources (or do it yourself)."}),"\n",(0,a.jsx)(t.li,{children:"Accept metadata updates for the extension only from trusted apps."}),"\n"]})]})}function h(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,a.jsx)(t,{...e,children:(0,a.jsx)(l,{...e})}):l(e)}},28453:(e,t,n)=>{n.d(t,{R:()=>o,x:()=>r});var a=n(96540);const i={},s=a.createContext(i);function o(e){const t=a.useContext(s);return a.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:o(e.components),a.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/98a431f4.f672c446.js b/assets/js/98a431f4.f672c446.js new file mode 100644 index 000000000000..7e42bfaff4a1 --- /dev/null +++ b/assets/js/98a431f4.f672c446.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8005],{34760:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>r,default:()=>h,frontMatter:()=>o,metadata:()=>a,toc:()=>d});const a=JSON.parse('{"id":"general/transaction-attacks","title":"Why Verify Transactions?","description":"How to Prevent from being a Victim of an Attack","source":"@site/../docs/general/transaction-attacks.md","sourceDirName":"general","slug":"/transaction-attacks","permalink":"/docs/transaction-attacks","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/transaction-attacks.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1726729579000,"frontMatter":{"id":"transaction-attacks","title":"Why Verify Transactions?","sidebar_label":"Transaction Verification","description":"How to Prevent from being a Victim of an Attack","keywords":["transaction","extrinsic","verification","protection"],"slug":"../transaction-attacks"},"sidebar":"docs","previous":{"title":"Scam Protection","permalink":"/docs/learn-scams"},"next":{"title":"Build on Polkadot","permalink":"/docs/start-building"}}');var i=n(74848),s=n(28453);const o={id:"transaction-attacks",title:"Why Verify Transactions?",sidebar_label:"Transaction Verification",description:"How to Prevent from being a Victim of an Attack",keywords:["transaction","extrinsic","verification","protection"],slug:"../transaction-attacks"},r=void 0,c={},d=[{value:"Clipboard Memory",id:"clipboard-memory",level:3},{value:"Malicious Website/dApp",id:"malicious-websitedapp",level:3},{value:"Malicious Browser Extension",id:"malicious-browser-extension",level:3},{value:"Corrupted metadata",id:"corrupted-metadata",level:3},{value:"Corrupted QR-code (Parity Signer)",id:"corrupted-qr-code-parity-signer",level:3},{value:"Replay Attack",id:"replay-attack",level:3},{value:"Defense against Attacks",id:"defense-against-attacks",level:2}];function l(e){const t={a:"a",admonition:"admonition",h2:"h2",h3:"h3",li:"li",p:"p",ul:"ul",...(0,s.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.p,{children:"In general, an attacker would make you think you are signing a Transaction A when in reality you are\nsigning a Transaction B. An Attack might come from:"}),"\n",(0,i.jsx)(t.h3,{id:"clipboard-memory",children:"Clipboard Memory"}),"\n",(0,i.jsx)(t.admonition,{type:"info",children:(0,i.jsxs)(t.p,{children:["For a more detailed read about clipboard memory attacks see\n",(0,i.jsx)(t.a,{href:"https://www.kaspersky.com/blog/cryptoshuffler-bitcoin-stealer/19976/",children:"this article"}),"."]})}),"\n",(0,i.jsx)(t.p,{children:"This is a common attack. The clipboard memory is that memory on your computer dedicated to\ncopy-paste operations. There is malicious software that can be remotely installed on your computer\nand that can detect when a cryptocurrency address is copied. For example, you want to send funds to\nAddress A (belonging to you) but after copying address A a malicious software swaps that address\nwith Address B (belonging to an attacker). This attack can be prevented by checking the receiver\naddress before signing. Failing to do so could result in loss of the funds."}),"\n",(0,i.jsx)(t.h3,{id:"malicious-websitedapp",children:"Malicious Website/dApp"}),"\n",(0,i.jsx)(t.p,{children:"This is a common attack that can happen if you are interacting with a malicious site (dApp). In this\nscenario you want to perform Transaction A on the website, but the dApp will send Transaction B to\nthe extension for signing. In this case the extension will show Transaction B. If you are using a\nLedger device you have a second layer of verification, as it will also display Transaction B."}),"\n",(0,i.jsx)(t.h3,{id:"malicious-browser-extension",children:"Malicious Browser Extension"}),"\n",(0,i.jsxs)(t.p,{children:["This scenario can happen if you have downloaded a malicious browser extension or a trusted browser\nextension, from a non-trusted source. In this scenario the extension will display that you will sign\nfor an Transaction A but in the background will execute Transaction B. If you are using a\n",(0,i.jsx)(t.a,{href:"https://www.ledger.com/",children:"Ledger"})," device this attack can be detected because you will be able to see\nTransaction B on the screen of your Ledger device."]}),"\n",(0,i.jsx)(t.h3,{id:"corrupted-metadata",children:"Corrupted metadata"}),"\n",(0,i.jsx)(t.p,{children:"This attack is least common and might result in signing a non-intended transaction without the\npossibility of verifying it. Before authorizing the metadata update check who is requesting it.\nMetadata updates for browser extensions might be requested by dApps (for example DeFi apps of\nparachains). For the extensions, you should trust the app that requests the update. When updating\nthe metadata for Parity Signer you should trust the issuer of the metadata (or generate the QR\nfountain yourself)."}),"\n",(0,i.jsx)(t.h3,{id:"corrupted-qr-code-parity-signer",children:"Corrupted QR-code (Parity Signer)"}),"\n",(0,i.jsxs)(t.p,{children:["This is a sub-case of the malicious dApp scenario. If your account is on\n",(0,i.jsx)(t.a,{href:"https://www.parity.io/technologies/signer/",children:"Parity Signer"})," the transaction will be displayed as a\nQR code, instead of the extension showing its details and you need to verify it on the device. The\ncorrupted QR code will make you sign for an Transaction B when you want to sign for Transaction A.\nThis will be showed in the Signer app and a careful user will notice it. If the metadata in the\nSigner is already incorrect (or the Signer is corrupted) there is the risk of signing a non-intended\ntransaction without the possibility of verifying it."]}),"\n",(0,i.jsx)(t.h3,{id:"replay-attack",children:"Replay Attack"}),"\n",(0,i.jsxs)(t.p,{children:["A replay attack is where past transactions can be replayed (same ",(0,i.jsx)(t.a,{href:"#balance-transfers",children:"balance"}),',\nreceiver account, etc.) without knowing private keys. It is an attack where publicly known data can\nbe "replayed" as a new extrinsic. This could happen in the context of\n',(0,i.jsx)(t.a,{href:"/docs/learn-accounts#existential-deposit-and-reaping",children:"reaping accounts"})," because the reaping\nprocess resets the nonce value. If all signed transactions until the nonce before the reaping event\nwere immortal, all past transactions can be replayed once the account is refunded. There is no need\nfor the attacker to know your private key, valid signatures for those past transactions and nonces\nalready exist and are stored on-chain (meaning the private key was already used to generate those\nsignatures)."]}),"\n",(0,i.jsxs)(t.p,{children:["Making a ",(0,i.jsx)(t.a,{href:"/docs/learn-transactions#mortal-and-immortal-extrinsics",children:"transaction mortal"})," with a\nrelatively short mortality window will almost certainly ensure that replay attacks are not possible,\nwith the only exception being if the account is reaped and then re-funded shortly after submitting a\nmortal transaction, and then an attacker replays that transaction within the mortality window (i.e.,\nthe specified block interval) and such transaction is valid (e.g. if you only have 10 DOT, and you\ntry to issue an extrinsic sending 20 DOT, the transfer will fail)."]}),"\n",(0,i.jsx)(t.h2,{id:"defense-against-attacks",children:"Defense against Attacks"}),"\n",(0,i.jsx)(t.admonition,{type:"warning",children:(0,i.jsx)(t.p,{children:"If you can't verify the transaction or you suspect you are signing something different than what you\nintended, don't sign it!"})}),"\n",(0,i.jsx)(t.p,{children:"To avoid being victim of an attack:"}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsx)(t.li,{children:"Use only trusted extensions, sites and software in general."}),"\n",(0,i.jsx)(t.li,{children:"Use cold storage options (Ledger, Signer) and verify them. Trust what these devices tell you over\nwhat is shown in the app or the browser extension."}),"\n",(0,i.jsx)(t.li,{children:"Update Signer metadata only from trusted sources (or do it yourself)."}),"\n",(0,i.jsx)(t.li,{children:"Accept metadata updates for the extension only from trusted apps."}),"\n"]})]})}function h(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(l,{...e})}):l(e)}},28453:(e,t,n)=>{n.d(t,{R:()=>o,x:()=>r});var a=n(96540);const i={},s=a.createContext(i);function o(e){const t=a.useContext(s);return a.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:o(e.components),a.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/9913464d.65a85687.js b/assets/js/9913464d.65a85687.js new file mode 100644 index 000000000000..df7736a6b603 --- /dev/null +++ b/assets/js/9913464d.65a85687.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5883],{93563:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>l,default:()=>u,frontMatter:()=>a,metadata:()=>o,toc:()=>d});const o=JSON.parse('{"id":"learn/archive/learn-governance","title":"Governance V1","description":"Polkadot\'s First Governance Model.","source":"@site/../docs/learn/archive/learn-governance.md","sourceDirName":"learn/archive","slug":"/learn/learn-governance","permalink":"/docs/learn/learn-governance","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/archive/learn-governance.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1729847256000,"frontMatter":{"id":"learn-governance","title":"Governance V1","sidebar_label":"Governance V1","description":"Polkadot\'s First Governance Model.","keywords":["governance","referenda","proposal","voting","endorse"],"slug":"../learn-governance"},"sidebar":"docs","previous":{"title":"Archive","permalink":"/docs/learn-archive"},"next":{"title":"Gov1 Treasury","permalink":"/docs/learn/learn-treasury"}}');var r=n(74848),s=n(28453),i=n(67141);const a={id:"learn-governance",title:"Governance V1",sidebar_label:"Governance V1",description:"Polkadot's First Governance Model.",keywords:["governance","referenda","proposal","voting","endorse"],slug:"../learn-governance"},l=void 0,c={},d=[{value:"Governance Summary",id:"governance-summary",level:2},{value:"Proposals",id:"proposals",level:2},{value:"Endorsing Proposals",id:"endorsing-proposals",level:3},{value:"Cancelling Proposals",id:"cancelling-proposals",level:3},{value:"Blacklisting Proposals",id:"blacklisting-proposals",level:3},{value:"Referenda",id:"referenda",level:2},{value:"Referenda Timeline",id:"referenda-timeline",level:3},{value:"Public Referenda",id:"public-referenda",level:3},{value:"Council Referenda",id:"council-referenda",level:3},{value:"Alternating Voting Timetable",id:"alternating-voting-timetable",level:3},{value:"Adaptive Quorum Biasing",id:"adaptive-quorum-biasing",level:3},{value:"Example of Adaptive Quorum Biasing",id:"example-of-adaptive-quorum-biasing",level:4},{value:"Enactment",id:"enactment",level:3},{value:"Voting on a Referendum",id:"voting-on-a-referendum",level:2},{value:"Voluntary Locking",id:"voluntary-locking",level:3},{value:"Delegations",id:"delegations",level:3},{value:"Council",id:"council",level:2},{value:"Prime Members",id:"prime-members",level:3},{value:"Technical Committee",id:"technical-committee",level:2},{value:"Frequently Asked Questions",id:"frequently-asked-questions",level:2},{value:"How to be a council member?",id:"how-to-be-a-council-member",level:3},{value:"How can I appeal to the council to enact a change on my behalf?",id:"how-can-i-appeal-to-the-council-to-enact-a-change-on-my-behalf",level:3},{value:"Gov1 Runtime Upgrade Monitoring",id:"gov1-runtime-upgrade-monitoring",level:2},{value:"Resources",id:"resources",level:2}];function h(e){const t={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",h4:"h4",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,s.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.A,{message:"The content on this page is archived. For up-to-date information about governance, see the\n[Polkadot OpenGov page](../learn-polkadot-opengov)."}),"\n",(0,r.jsx)(t.p,{children:"Polkadot uses a sophisticated governance mechanism that allows it to evolve gracefully overtime at\nthe ultimate behest of its assembled stakeholders. The stated goal is to ensure that the majority of\nthe stake can always command the network."}),"\n",(0,r.jsxs)(t.p,{children:["Polkadot brings together various novel mechanisms, including an amorphous (abstract) form of\nstate-transition function stored on-chain defined in a platform-agnostic language (i.e.\n",(0,r.jsx)(t.a,{href:"/docs/learn-wasm",children:"WebAssembly"}),"). It also allows for several on-chain voting mechanisms, such as\nreferenda with the novel concept of ",(0,r.jsx)(t.a,{href:"#adaptive-quorum-biasing",children:"Adaptive Quorum Biasing"})," and batch\napproval voting. All changes to the protocol must be agreed upon by stake-weighted referenda."]}),"\n",(0,r.jsxs)(t.p,{children:["To make any changes to the network, the idea is to compose active token holders and the council\ntogether to administrate a network upgrade decision. No matter whether the proposal is proposed by\nthe public (token holders) or the ",(0,r.jsx)(t.a,{href:"#council",children:"Council"}),", it finally will have to go through a vote on\na referendum to let all holders, weighted by stake, make the decision."]}),"\n",(0,r.jsx)(t.h2,{id:"governance-summary",children:"Governance Summary"}),"\n",(0,r.jsx)(t.p,{children:"The figure below shows an overview of Governance V1 with the key actors and different paths for\nsubmitting a proposal that can potentially be voted on as a referendum."}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.img,{alt:"gov1-overview",src:n(89005).A+"",width:"1920",height:"800"})}),"\n",(0,r.jsxs)(t.p,{children:["The public (i.e. token holders) can submit a proposal that gets added to the proposal queue. Here,\nproposals are ",(0,r.jsx)(t.a,{href:"#endorsing-proposals",children:"endorsed"}),", and the one that gets the most support will climb to\nthe top of the queue. When it is time, the proposal at the top of the queue will become a\n",(0,r.jsx)(t.a,{href:"#public-referenda",children:"Public Referendum"}),". For instance, the proposal with 11 endorsements is shown at\nthe top of the queue in the figure, which is ready to become a referendum."]}),"\n",(0,r.jsxs)(t.p,{children:["The public can also submit a ",(0,r.jsx)(t.a,{href:"/docs/learn/learn-treasury#creating-a-treasury-proposal",children:"treasury proposal"}),",\nwhich must be evaluated by the ",(0,r.jsx)(t.a,{href:"#council",children:"Council"})," through a motion. If the Council motion passes,\nthe treasury proposal can be directly executed or go to the external queue, which will be voted on\nthrough a ",(0,r.jsx)(t.a,{href:"#council-referenda",children:"Council Referendum"}),". See the figure's green horizontal path from the\nPublic (green) to the Council (yellow). Treasury proposals and Council proposals can be directly\nexecuted (horizontal yellow arrows) or go to the external queue, where they will become a referendum"]}),"\n",(0,r.jsxs)(t.p,{children:["Note that the external queue always consists of\n",(0,r.jsx)(t.a,{href:"https://github.com/paritytech/substrate/blob/f4a2e84ee5974b219f2a03cd195105060c41e3cd/frame/democracy/src/lib.rs#LL29C8-L31C4",children:"a single proposal"}),".\nA proposal in the external queue can be fast-tracked by the\n",(0,r.jsx)(t.a,{href:"#technical-committee",children:"Technical Committee"})," (light blue). The fast track can contain as many\nproposals as possible (also called emergency proposals) that can be voted on simultaneously with\nwith the referenda introduced either by the Council or the Public. See in the figure the yellow\ncircle (i.e. Council Proposal) exiting the external queue, and the yellow circle with a light-blue\nborder also leaving the queue and being fast-tracked by the Technical Committee (TC). Once empty,\nthe external queue can be filled with another Council proposal."]}),"\n",(0,r.jsxs)(t.p,{children:["The Council can also submit proposals that will end up in the external queue. Voting on Council and\nPublic proposals subject to an ",(0,r.jsx)(t.a,{href:"#alternating-voting-timetable",children:"alternating timetable"}),', shown in the\nfigure as the "on" and "off" toggles on the external and proposal queues. In this example, the\nPublic proposal will be voted on together with the fast-tracked Council Proposal. Voting on\nnon-fast-tracked Council Proposals will be blocked until the alternating timetable switches the\ntoggles, which stops Public proposals from becoming a referenda.']}),"\n",(0,r.jsxs)(t.p,{children:["Referenda will follow an ",(0,r.jsx)(t.a,{href:"#adaptive-quorum-biasing",children:"adaptive quorum biasing"})," mechanism for deciding\nwhether they get enacted, and if they do, they will be executed after an\n",(0,r.jsx)(t.a,{href:"#enactment",children:"enactment period"}),"."]}),"\n",(0,r.jsx)(t.p,{children:"Token holders can delegate their votes (with a conviction multiplier) to another account belonging\nto a trusted entity voting on their behalf."}),"\n",(0,r.jsx)(t.h2,{id:"proposals",children:"Proposals"}),"\n",(0,r.jsx)(t.p,{children:"Referenda can be started in different ways:"}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsx)(t.li,{children:"Publicly submitted proposals"}),"\n",(0,r.jsx)(t.li,{children:"Proposals submitted by the council, either through a majority or unanimously"}),"\n",(0,r.jsxs)(t.li,{children:["Proposals submitted as part of the ",(0,r.jsx)(t.a,{href:"#enactment",children:"enactment"})," of a prior referendum (i.e. making a\nreferendum to start a new referendum)"]}),"\n",(0,r.jsxs)(t.li,{children:["Emergency proposals submitted by the ",(0,r.jsx)(t.a,{href:"#technical-committee",children:"Technical Committee"})," and approved by\nthe ",(0,r.jsx)(t.a,{href:"#council",children:"Council"})]}),"\n"]}),"\n",(0,r.jsx)(t.admonition,{title:"Starting a proposal in Governance V1",type:"info",children:(0,r.jsxs)(t.p,{children:["For more information about how to start a proposal, see the\n",(0,r.jsx)(t.a,{href:"/docs/maintain/maintain-guides-democracy#proposing-an-action",children:"dedicated page"}),"."]})}),"\n",(0,r.jsx)(t.h3,{id:"endorsing-proposals",children:"Endorsing Proposals"}),"\n",(0,r.jsxs)(t.p,{children:["Anyone can submit a proposal by depositing the minimum amount of tokens for a certain period (number\nof blocks). If someone agrees with the proposal, they may deposit the same amount of tokens to\nsupport it - this action is called\n",(0,r.jsx)(t.a,{href:"/docs/maintain/maintain-guides-democracy#endorsing-a-proposal",children:(0,r.jsx)(t.em,{children:"endorsing"})}),". The\nproposal with the highest amount of bonded support will be selected to be a referendum in the next\nvoting cycle based on an ",(0,r.jsx)(t.a,{href:"#alternating-voting-timetable",children:"alternating voting timetable"}),"."]}),"\n",(0,r.jsx)(t.h3,{id:"cancelling-proposals",children:"Cancelling Proposals"}),"\n",(0,r.jsxs)(t.p,{children:["A proposal can be canceled if the ",(0,r.jsx)(t.a,{href:"#technical-committee",children:"Technical Committee"})," unanimously agrees to\ndo so or if Root Origin (e.g. sudo) triggers this functionality. A canceled proposal's deposit is\nburned."]}),"\n",(0,r.jsx)(t.p,{children:"Additionally, a two-thirds majority of the council can cancel a referendum. This may function as a\nlast-resort if there is an issue found late in a referendum's proposal, such as a bug in the code of\nthe runtime that the proposal would institute."}),"\n",(0,r.jsxs)(t.p,{children:["If the cancellation is controversial enough that the council cannot get a two-thirds majority, then\nit will be left to the stakeholders ",(0,r.jsx)(t.em,{children:"en masse"})," to determine the proposal\u2019s fate."]}),"\n",(0,r.jsx)(t.h3,{id:"blacklisting-proposals",children:"Blacklisting Proposals"}),"\n",(0,r.jsxs)(t.p,{children:["A proposal can be blacklisted by Root Origin (e.g. sudo). A blacklisted proposal and its related\nreferendum (if any) are immediately ",(0,r.jsx)(t.a,{href:"#canceling",children:"canceled"}),". Additionally, a blacklisted proposal's\nhash cannot re-appear in the proposal queue. Blacklisting is useful when removing erroneous\nproposals that could be submitted with the same hash."]}),"\n",(0,r.jsx)(t.p,{children:"Upon seeing their proposal removed, a submitter who is not properly introduced to the democracy\nsystem of Polkadot might be tempted to re-submit the same proposal. That said, this is far from a\nfool-proof method of preventing invalid proposals from being submitted - a single changed character\nin a proposal's text will also change the hash of the proposal, rendering the per-hash blacklist\ninvalid."}),"\n",(0,r.jsx)(t.h2,{id:"referenda",children:"Referenda"}),"\n",(0,r.jsxs)(t.p,{children:["Referenda are simple, inclusive, stake-based voting schemes. Each referendum has a specific proposal\nthat takes the form of a ",(0,r.jsx)(t.strong,{children:"privileged function"})," call in the runtime. That function includes the\nmost powerful ",(0,r.jsx)(t.strong,{children:"call"}),": ",(0,r.jsx)(t.code,{children:"set_code"}),', which can switch out the entire runtime code, achieving what\nwould otherwise require a "hard fork".']}),"\n",(0,r.jsx)(t.p,{children:'Referenda are discrete events, have a fixed period where voting happens, and then are tallied, and\nthe function call is executed if the vote is approved. Referenda are always binary: your only\noptions in voting are "aye", "nay", or abstaining entirely.'}),"\n",(0,r.jsx)(t.h3,{id:"referenda-timeline",children:"Referenda Timeline"}),"\n",(0,r.jsx)(t.p,{children:"The structure of the timeline for all referenda is the same regardless of who initiates the\nproposal, although the timeline length can vary (see below)."}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.img,{alt:"gov1-timeline",src:n(96601).A+"",width:"1920",height:"800"})}),"\n",(0,r.jsx)(t.p,{children:"The figure above provides a summary view of the referenda timeline for Governance V1."}),"\n",(0,r.jsxs)(t.p,{children:["In (1), the proposal is submitted, and the Launch Period starts. During this period of indefinite\nlength the voters can ",(0,r.jsx)(t.a,{href:"#endorsing-proposals",children:"endorse"})," proposals by bonding the same amount of tokens\nused by the depositor. Deposited tokens for endorsement will be returned once the proposal becomes a\nreferendum. During the launch period, the proposal will compete with other proposals, and the one\nthat gets to the top will be selected for a referendum when the next voting period starts."]}),"\n",(0,r.jsx)(t.p,{children:"The figure shows that the launch period is shown with a fixed length. Still, it varies depending on\nwho initiated the proposal and how many proposals there are in the pipeline. Council motions will\nlikely have a short launch period when compared to the public referenda which might take longer\nunless they are the only ones in the pipeline."}),"\n",(0,r.jsxs)(t.p,{children:["In (2), the proposal is selected for a referendum. Proposals initiated by the public will become a\n",(0,r.jsx)(t.a,{href:"#public-referenda",children:"public referendum"}),", while those initiated by the council will become\n",(0,r.jsx)(t.a,{href:"#council-referenda",children:"council referenda"}),". The voting period lasts 28 days (7 days on Kusama), after\nwhich, if the proposal is approved, it will go through an enactment period. Rejected proposals will\nneed to start from (1). Note that Governance V1 uses an\n",(0,r.jsx)(t.a,{href:"#alternating-voting-timetable",children:"alternating voting timeline"})," where voters can vote either for a\npublic proposal or a council motion every 28 days (7 days on Kusama)."]}),"\n",(0,r.jsxs)(t.p,{children:["In (3), the proposal is approved and moves through the ",(0,r.jsx)(t.a,{href:"#enactment",children:"enactment period"})," that can be of\ndifferent lengths depending on who initiated the proposal in the first place, with emergency\nproposals being the fastest ones and the only ones that can be voted simultaneously with other\nreferenda."]}),"\n",(0,r.jsx)(t.h3,{id:"public-referenda",children:"Public Referenda"}),"\n",(0,r.jsxs)(t.p,{children:["Public referenda will have a ",(0,r.jsx)(t.a,{href:"#adaptive-quorum-biasing",children:(0,r.jsx)(t.strong,{children:"positive turnout bias"})}),", meaning that\nthey will require a heavy supermajority of ",(0,r.jsx)(t.em,{children:"aye"})," votes to pass at low turnouts but as turnout\nincreases towards 100%, it will require a simple majority of ",(0,r.jsx)(t.em,{children:"aye"})," votes to pass (i.e. 51% wins)."]}),"\n",(0,r.jsx)(t.p,{children:"Note that the bonded tokens will be released once the proposal is tabled (that is, brought to a\nvote), and a maximum of 100 public proposals can be in the proposal queue."}),"\n",(0,r.jsx)(t.admonition,{title:"turnout",type:"info",children:(0,r.jsxs)(t.p,{children:["The total number of voting tokens excluding conviction or ",(0,r.jsx)(t.a,{href:"#voluntary-locking",children:"voluntary locking"}),"."]})}),"\n",(0,r.jsx)(t.h3,{id:"council-referenda",children:"Council Referenda"}),"\n",(0,r.jsxs)(t.p,{children:["Unanimous Council - When all council members agree on a proposal, it can be moved to a referendum\nwith a ",(0,r.jsx)(t.a,{href:"#adaptive-quorum-biasing",children:(0,r.jsx)(t.strong,{children:"negative turnout bias"})}),". Briefly, it will require a heavy\nsupermajority of ",(0,r.jsx)(t.em,{children:"nay"})," votes to reject at low turnouts, but as turnout increases towards 100%, it\nwill require a simple majority of ",(0,r.jsx)(t.em,{children:"nay"})," votes to fail (i.e. 51% wins)."]}),"\n",(0,r.jsxs)(t.p,{children:["Majority Council - When agreement from only a simple majority of council members occurs, the\nreferendum will need ",(0,r.jsx)(t.a,{href:"#adaptive-quorum-biasing",children:(0,r.jsx)(t.strong,{children:"simple majority"})})," to pass."]}),"\n",(0,r.jsx)(t.admonition,{title:"Public- vs. Council-initiated Referenda",type:"info",children:(0,r.jsx)(t.p,{children:"Public referenda must be agreed upon using a positive bias to mitigate attacks by malicious or\nill-conceived proposals. Conversely, when a proposal is unanimously voted in favor by the council,\nit benefits from using the negative bias. We assume low turnout is less problematic if the council\nproposes a referendum. Also, the council members are elected by the community and have strong\ntechnical as well as functional knowledge about the system, and we assume solid justifications back\nchanges proposed by the council."})}),"\n",(0,r.jsx)(t.h3,{id:"alternating-voting-timetable",children:"Alternating Voting Timetable"}),"\n",(0,r.jsx)(t.p,{children:"All referenda are executed by Root Origin. It follows that multiple referenda cannot be voted upon\nin the same period, excluding emergency referenda. An emergency referendum occurring at the same\ntime as a regular referendum (either public- or council-proposed) is the only time multiple\nreferenda can be voted on."}),"\n",(0,r.jsxs)(t.p,{children:["Every 28 days (7 days on Kusama), a new referendum will come up for a vote, assuming there is at\nleast one proposal in one of the queues. There is a queue for Council-approved proposals and a queue\nfor publicly-submitted proposals. The referendum to be voted upon alternates between the top\nproposal in the two queues, where the proposals' rank is based on\n",(0,r.jsx)(t.a,{href:"#endorsing-proposals",children:"endorsement"})," (i.e. bonded tokens)."]}),"\n",(0,r.jsx)(t.h3,{id:"adaptive-quorum-biasing",children:"Adaptive Quorum Biasing"}),"\n",(0,r.jsxs)(t.p,{children:["Polkadot introduces the concept of ",(0,r.jsx)(t.strong,{children:"Adaptive Quorum Biasing"}),", which is used to alter the effective\nsuper-majority required to make it easier or more difficult for a proposal to pass depending on\nvoting power (turnout) and origin (Council or public)."]}),"\n",(0,r.jsx)(t.p,{children:"Adaptive Quorum Biasing creates three tallying mechanisms: majority carry, super-majority approve,\nand super-majority against. They all equate to a simple majority-carry system at 100% turnout. Their\nselection depends on which entity proposed the proposal and whether all Council members voted yes\n(in the case of Council Referenda)."}),"\n",(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{style:{textAlign:"center"},children:(0,r.jsx)(t.strong,{children:"Entity"})}),(0,r.jsx)(t.th,{style:{textAlign:"center"},children:(0,r.jsx)(t.strong,{children:"Metric"})})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"Public"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"Positive Turnout Bias (Super-Majority Approve)"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"Council (Complete agreement)"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"Negative Turnout Bias (Super-Majority Against)"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"Council (Majority agreement)"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"Simple Majority"})]})]})]}),"\n",(0,r.jsx)(t.p,{children:"Let's use the image below as an example."}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.img,{alt:"adaptive-quorum-biasing",src:n(87635).A+"",width:"537",height:"439"})}),"\n",(0,r.jsxs)(t.p,{children:["If a publicly submitted referendum only has a 25% turnout, the tally of ",(0,r.jsx)(t.em,{children:"aye"})," votes has to reach 66%\nfor it to pass since we applied ",(0,r.jsx)(t.strong,{children:"Positive Turnout Bias"}),". In contrast, when it has a 75% turnout,\nthe tally of ",(0,r.jsx)(t.em,{children:"aye"})," votes has to reach 54%, which means that the super-majority required decreases as\nthe turnout increases. A positive turnout bias, whereby a heavy super-majority of aye votes is\nrequired to carry at low turnouts. However, as turnout increases towards 100%, it becomes a simple\nmajority carry as below."]}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.img,{src:"https://latex.codecogs.com/svg.latex?%5Clarge&space;%7Bagainst&space;%5Cover&space;%5Csqrt%7Bturnout%7D%7D&space;%3C&space;%7Bapprove&space;%5Cover&space;%5Csqrt%7Belectorate%7D%7D",alt:""})}),"\n",(0,r.jsxs)(t.p,{children:["Where ",(0,r.jsx)(t.code,{children:"approve"})," is the number of ",(0,r.jsx)(t.em,{children:"aye"})," votes, ",(0,r.jsx)(t.code,{children:"against"})," is the number of ",(0,r.jsx)(t.em,{children:"nay"})," votes, ",(0,r.jsx)(t.code,{children:"turnout"})," is\nthe total number of voting tokens excluding ",(0,r.jsx)(t.a,{href:"#voluntary-locking",children:"voluntary locking"}),", and\n",(0,r.jsx)(t.code,{children:"electorate"})," is the total number of tokens issued in the network."]}),"\n",(0,r.jsxs)(t.p,{children:["When the council proposes a new proposal through unanimous consent, the referendum would be put to\nthe vote using ",(0,r.jsx)(t.strong,{children:"Negative Turnout Bias"}),". Referring to the above image, when a Council referendum\nonly has a 25% turnout, the tally of ",(0,r.jsx)(t.em,{children:"aye"})," votes has to reach 34% for it to pass, while if the\nturnout increases to 75%, the tally of ",(0,r.jsx)(t.em,{children:"aye"})," votes has to reach 46%. A negative turnout bias\nrequires a heavy super-majority of ",(0,r.jsx)(t.em,{children:"nay"})," votes to reject at low turnouts. However, as turnout\nincreases towards 100%, it becomes a simple majority carry as below."]}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.img,{src:"https://latex.codecogs.com/svg.latex?%5Clarge&space;%7Bagainst&space;%5Cover&space;%5Csqrt%7Belectorate%7D%7D&space;%3C&space;%7Bapprove&space;%5Cover&space;%5Csqrt%7Bturnout%7D%7D",alt:""})}),"\n",(0,r.jsxs)(t.p,{children:["In short, when the turnout rate is low, a super-majority is required to reject the proposal, which\nmeans a lower threshold of ",(0,r.jsx)(t.em,{children:"aye"})," votes must be reached. As turnout increases toward 100%, it becomes\na simple majority, a simple comparison of votes. If there are more ",(0,r.jsx)(t.em,{children:"aye"})," votes than ",(0,r.jsx)(t.em,{children:"nay"}),", then the\nproposal is carried, no matter how much stake votes on the proposal."]}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.img,{src:"https://latex.codecogs.com/svg.latex?%5Clarge&space;%7Bapprove%7D&space;%3E&space;%7Bagainst%7D",alt:""})}),"\n",(0,r.jsxs)(t.p,{children:["To know more about where these above formulas come from, please read the\n",(0,r.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/democracy/src/vote_threshold.rs",children:"democracy pallet"}),"."]}),"\n",(0,r.jsx)(t.h4,{id:"example-of-adaptive-quorum-biasing",children:"Example of Adaptive Quorum Biasing"}),"\n",(0,r.jsx)(t.p,{children:"Let's assume we only have 1,500 DOT tokens in total and that this is a public proposal."}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsx)(t.li,{children:"John: 500 DOT"}),"\n",(0,r.jsx)(t.li,{children:"Peter: 100 DOT"}),"\n",(0,r.jsx)(t.li,{children:"Lilly: 150 DOT"}),"\n",(0,r.jsx)(t.li,{children:"JJ: 150 DOT"}),"\n",(0,r.jsx)(t.li,{children:"Ken: 600 DOT"}),"\n"]}),"\n",(0,r.jsxs)(t.p,{children:["John: Votes ",(0,r.jsx)(t.code,{children:"Yes"})," for a 4 week lock period => 500 x 1 = 500 Votes"]}),"\n",(0,r.jsxs)(t.p,{children:["Peter: Votes ",(0,r.jsx)(t.code,{children:"Yes"})," for a 4 week lock period => 100 x 1 = 100 Votes"]}),"\n",(0,r.jsxs)(t.p,{children:["JJ: Votes ",(0,r.jsx)(t.code,{children:"No"})," for a 16 week lock period => 150 x 3 = 450 Votes"]}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsx)(t.li,{children:"approve = 600 Votes"}),"\n",(0,r.jsx)(t.li,{children:"against = 450 Votes"}),"\n",(0,r.jsx)(t.li,{children:"turnout = 750 Votes"}),"\n",(0,r.jsx)(t.li,{children:"electorate = 1500 Votes"}),"\n"]}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.img,{src:"https://latex.codecogs.com/svg.latex?%5Clarge&space;%5Cfrac%7B450%7D%7B%5Csqrt%7B750%7D%7D&space;%3C&space;%5Cfrac%7B600%7D%7B%5Csqrt%7B1500%7D%7D",alt:""})}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.img,{src:"https://latex.codecogs.com/svg.latex?%5Clarge&space;%7B16.432%7D&space;%3C&space;%7B15.492%7D",alt:""})}),"\n",(0,r.jsxs)(t.p,{children:["Since the above example is a public referendum, ",(0,r.jsx)(t.strong,{children:"Super-Majority Approve"})," would be used to\ncalculate the result. Super-Majority Approve requires more ",(0,r.jsx)(t.em,{children:"aye"})," votes to pass the referendum when\nturnout is low; therefore, based on the above result, the referendum will be rejected."]}),"\n",(0,r.jsx)(t.admonition,{title:"only the winning voter's tokens are locked.",type:"info",children:(0,r.jsxs)(t.p,{children:["If the voters on the losing side of the referendum believe that the outcome will have adverse\neffects, their tokens are transferrable, so they will not be locked into the decision. Winning\nproposals are autonomously enacted after the ",(0,r.jsx)(t.a,{href:"#enactment",children:"enactment period"}),"."]})}),"\n",(0,r.jsx)(t.h3,{id:"enactment",children:"Enactment"}),"\n",(0,r.jsxs)(t.p,{children:["Referenda are considered ",(0,r.jsx)(t.em,{children:"baked"})," if they are closed and tallied. Assuming a referendum is approved,\nit will be scheduled for ",(0,r.jsx)(t.strong,{children:"enactment"}),". Referenda are considered ",(0,r.jsx)(t.em,{children:"unbaked"})," if they are pending an\noutcome, i.e. being voted on."]}),"\n",(0,r.jsxs)(t.p,{children:["All referenda are associated with an enactment delay or ",(0,r.jsx)(t.strong,{children:"enactment period"}),". This is the period\nbetween a referendum ending and (assuming it was approved) the changes being enacted."]}),"\n",(0,r.jsx)(t.p,{children:'For public and Council referenda, the enactment period is a fixed time of 28 days (8 days on\nKusama). For proposals submitted as part of the enactment of a prior referendum, it can be set as\ndesired. Emergency proposals deal with major problems with the network and need to be\n"fast-tracked". These will have a shorter enactment period.'}),"\n",(0,r.jsx)(t.h2,{id:"voting-on-a-referendum",children:"Voting on a Referendum"}),"\n",(0,r.jsx)(t.p,{children:"To vote, a voter generally must lock their tokens up for at least the enactment period beyond the\nend of the referendum. This is to ensure that some minimal economic buy-in to the result is needed\nand to dissuade vote selling."}),"\n",(0,r.jsx)(t.admonition,{title:"Referenda explainer video",type:"note",children:(0,r.jsxs)(t.p,{children:["To learn more about voting on referenda, please check out our\n",(0,r.jsx)(t.a,{href:"https://www.youtube.com/watch?v=BkbhhlsezGA&list=PLOyWqupZ-WGuAuS00rK-pebTMAOxW41W8&index=31&ab_channel=Polkadot",children:"technical explainer video"}),"."]})}),"\n",(0,r.jsxs)(t.p,{children:["It is possible to vote without locking, but your vote is worth a small fraction of a normal vote,\ngiven your stake. At the same time, holding only a small amount of tokens does not mean that the\nholder cannot influence the referendum result, thanks to time-locking or ",(0,r.jsx)(t.strong,{children:"voluntary locking"})," (see\nbelow)."]}),"\n",(0,r.jsx)(t.h3,{id:"voluntary-locking",children:"Voluntary Locking"}),"\n",(0,r.jsx)(t.admonition,{title:"Voluntary Locking",type:"info",children:(0,r.jsxs)(t.p,{children:["For more information about voluntary locking or conviction voting see\n",(0,r.jsx)(t.a,{href:"/docs/learn-polkadot-opengov#voluntary-locking",children:"Polkadot OpenGov"}),"."]})}),"\n",(0,r.jsx)(t.h3,{id:"delegations",children:"Delegations"}),"\n",(0,r.jsxs)(t.p,{children:["In Polkadot, you can\n",(0,r.jsx)(t.a,{href:"/docs/maintain/maintain-guides-democracy#delegate-a-vote",children:"delegate your voting power"})," to\nanother account you trust if you are not willing to stay up-to-date with all referenda."]}),"\n",(0,r.jsxs)(t.p,{children:["You can also use a ",(0,r.jsx)(t.a,{href:"/docs/learn-proxies#governance-proxy",children:"governance proxy"})," to vote on behalf of\nyour stash account. The proxy can be yours, or you can authorize a third-party governance proxy to\nvote with your stash. Learn more from the ",(0,r.jsx)(t.a,{href:"/docs/learn-proxies",children:"dedicated page on Proxy Accounts"}),"."]}),"\n",(0,r.jsx)(t.h2,{id:"council",children:"Council"}),"\n",(0,r.jsx)(t.p,{children:'To represent passive stakeholders, Polkadot introduces the idea of a "council". The council is an\non-chain entity comprising several actors, each represented as an on-chain account. The Polkadot\ncouncil consists of 13 members (19 on Kusama).'}),"\n",(0,r.jsxs)(t.p,{children:["Along with ",(0,r.jsx)(t.a,{href:"/docs/learn/learn-treasury",children:"controlling the treasury"}),", the council is called upon primarily for\nthree tasks of governance:"]}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsx)(t.li,{children:"Proposing sensible referenda"}),"\n",(0,r.jsx)(t.li,{children:"Cancelling uncontroversially dangerous or malicious referenda"}),"\n",(0,r.jsxs)(t.li,{children:["Electing the ",(0,r.jsx)(t.a,{href:"#technical-committee",children:"Technical Committee"}),"."]}),"\n"]}),"\n",(0,r.jsx)(t.p,{children:"For a referendum to be proposed by the council, a strict majority of members must be in favor, with\nno member exercising a veto. Vetoes may be exercised only once by a member for any single proposal.\nIf the proposal is resubmitted after a cool-down period, they may not veto it a second time."}),"\n",(0,r.jsxs)(t.p,{children:["Council motion that pass with a 3/5 (60%) super-majority - but without reaching unanimous support -\nwill move to a public referendum under a neutral, majority-carries voting scheme. In the case that\nall members of the council that voted are in favor of a motion, the vote is considered unanimous and\nbecomes a referendum with ",(0,r.jsx)(t.a,{href:"#adaptive-quorum-biasing",children:"negative turnout bias"}),"."]}),"\n",(0,r.jsx)(t.admonition,{title:"Explainer video on the Council",type:"note",children:(0,r.jsxs)(t.p,{children:["For more information, check out our\n",(0,r.jsx)(t.a,{href:"https://www.youtube.com/watch?v=837Vv3gdRzI",children:"video explainer on Council"})]})}),"\n",(0,r.jsx)(t.h3,{id:"prime-members",children:"Prime Members"}),"\n",(0,r.jsxs)(t.p,{children:["The council, being an instantiation of\n",(0,r.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/substrate/frame/collective",children:"Substrate's Collective pallet"}),",\nimplements what's called a ",(0,r.jsx)(t.em,{children:"prime member"})," whose vote acts as the default for other members that fail\nto vote before the timeout."]}),"\n",(0,r.jsxs)(t.p,{children:["The prime member is chosen based on a ",(0,r.jsx)(t.a,{href:"https://en.wikipedia.org/wiki/Borda_count",children:"Borda count"}),"."]}),"\n",(0,r.jsx)(t.p,{children:'The purpose of having a prime council member is to ensure a quorum, even when several members\nabstain from a vote. Council members might be tempted to vote a "soft rejection" or a "soft\napproval" by not voting and letting the others vote. The existence of a prime member forces\ncouncilors to be explicit in their votes or have their vote counted for whatever is voted on by the\nprime.'}),"\n",(0,r.jsx)(t.h2,{id:"technical-committee",children:"Technical Committee"}),"\n",(0,r.jsxs)(t.p,{children:["The Technical Committee(TC) was introduced in the\n",(0,r.jsx)(t.a,{href:"https://polkadot.network/kusama-rollout-and-governance/",children:"Kusama rollout and governance post"})," as one\nof the three chambers of Kusama governance (along with the Council and the Referendum chamber). The\nTC is composed of the teams that have successfully implemented or specified either a Polkadot\nruntime or Polkadot Host. Teams are added or removed from the TC via a simple majority vote of the\n",(0,r.jsx)(t.a,{href:"#council",children:"Council"}),"."]}),"\n",(0,r.jsx)(t.p,{children:'The TC aims to safeguard against malicious referenda, implement bug fixes, reverse faulty runtime\nupdates, or add new but battle-tested features. The TC can fast-track proposals using the Democracy\npallet and is the only origin that can trigger the fast-tracking functionality. We can think of the\nTC as a "unique origin" that cannot generate proposals but fast-track existing ones.'}),"\n",(0,r.jsx)(t.p,{children:"Fast-tracked referenda are the only referenda that can be active alongside another active\nreferendum. Thus, with fast-tracked referenda, it is possible to have two active referendums\nsimultaneously. Voting on one does not prevent a user from voting on the other."}),"\n",(0,r.jsx)(t.h2,{id:"frequently-asked-questions",children:"Frequently Asked Questions"}),"\n",(0,r.jsx)(t.h3,{id:"how-to-be-a-council-member",children:"How to be a council member?"}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.img,{alt:"approval-vote",src:n(87507).A+"",width:"850",height:"340"})}),"\n",(0,r.jsx)(t.p,{children:"All stakeholders can signal their approval of any of the registered candidates."}),"\n",(0,r.jsxs)(t.p,{children:["Council elections are handled by the same ",(0,r.jsx)(t.a,{href:"/docs/learn-phragmen",children:"Phragm\xe9n election"})," process that\nselects validators from the available pool based on nominations. However, token holders' votes for\ncouncilors are isolated from any nominations they may have on validators. Council terms last for one\nweek on Polkadot and one day day on Kusama."]}),"\n",(0,r.jsxs)(t.p,{children:["At the end of each term, ",(0,r.jsx)(t.a,{href:"../learn-phragmen#algorithm",children:"Phragm\xe9n election algorithm"})," runs and the\nresult will choose the new councilors based on the vote configurations of all voters. The election\nalso chooses a set number of runners-up, which is 20 on Polkadot (12 on Kusama), that will remain in\nthe queue with their votes intact."]}),"\n",(0,r.jsx)(t.p,{children:'As opposed to a "first-past-the-post" electoral system, where voters can only vote for a single\ncandidate from a list, a Phragm\xe9n election is a more expressive way to include each voter\u2019s views.\nToken holders can treat it as a way to support as many candidates as they want. The election\nalgorithm will find a fair subset of the candidates that most closely matches the expressed\nindications of the electorate as a whole.'}),"\n",(0,r.jsx)(t.p,{children:"Let's take a look at the example below."}),"\n",(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{style:{textAlign:"center"},children:"Round 1"}),(0,r.jsx)(t.th,{style:{textAlign:"center"}}),(0,r.jsx)(t.th,{style:{textAlign:"center"}}),(0,r.jsx)(t.th,{style:{textAlign:"center"}}),(0,r.jsx)(t.th,{style:{textAlign:"center"}}),(0,r.jsx)(t.th,{style:{textAlign:"center"}})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)(t.strong,{children:"Token Holders"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"}}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)(t.strong,{children:"Candidates"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"}}),(0,r.jsx)(t.td,{style:{textAlign:"center"}}),(0,r.jsx)(t.td,{style:{textAlign:"center"}})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{style:{textAlign:"center"}}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"A"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"B"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"C"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"D"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"E"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"Peter"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"X"}),(0,r.jsx)(t.td,{style:{textAlign:"center"}}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"X"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"X"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"X"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"Alice"}),(0,r.jsx)(t.td,{style:{textAlign:"center"}}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"X"}),(0,r.jsx)(t.td,{style:{textAlign:"center"}}),(0,r.jsx)(t.td,{style:{textAlign:"center"}}),(0,r.jsx)(t.td,{style:{textAlign:"center"}})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"Bob"}),(0,r.jsx)(t.td,{style:{textAlign:"center"}}),(0,r.jsx)(t.td,{style:{textAlign:"center"}}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"X"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"X"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"X"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"Kelvin"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"X"}),(0,r.jsx)(t.td,{style:{textAlign:"center"}}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"X"}),(0,r.jsx)(t.td,{style:{textAlign:"center"}}),(0,r.jsx)(t.td,{style:{textAlign:"center"}})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)(t.strong,{children:"Total"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"2"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"1"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"3"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"2"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"2"})]})]})]}),"\n",(0,r.jsx)(t.p,{children:"The above example shows that candidate C wins the election in round 1, while candidates A, B, D & E\nkeep remaining on the candidates' list for the next round."}),"\n",(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{style:{textAlign:"center"},children:"Round 2"}),(0,r.jsx)(t.th,{style:{textAlign:"center"}}),(0,r.jsx)(t.th,{style:{textAlign:"center"}}),(0,r.jsx)(t.th,{style:{textAlign:"center"}}),(0,r.jsx)(t.th,{style:{textAlign:"center"}})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)(t.strong,{children:"Token Holders"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"}}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)(t.strong,{children:"Candidates"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"}}),(0,r.jsx)(t.td,{style:{textAlign:"center"}})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{style:{textAlign:"center"}}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"A"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"B"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"D"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"E"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"Peter"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"X"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"X"}),(0,r.jsx)(t.td,{style:{textAlign:"center"}}),(0,r.jsx)(t.td,{style:{textAlign:"center"}})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"Alice"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"X"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"X"}),(0,r.jsx)(t.td,{style:{textAlign:"center"}}),(0,r.jsx)(t.td,{style:{textAlign:"center"}})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"Bob"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"X"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"X"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"X"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"X"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"Kelvin"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"X"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"X"}),(0,r.jsx)(t.td,{style:{textAlign:"center"}}),(0,r.jsx)(t.td,{style:{textAlign:"center"}})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)(t.strong,{children:"Total"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"4"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"4"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"1"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"1"})]})]})]}),"\n",(0,r.jsx)(t.p,{children:"The top-N (say 4 in this example) runners-up can remain, and their votes persist until the next\nelection. After round 2, even though candidates A & B get the same number of votes in this round,\ncandidate A gets elected because after adding the older unused approvals, it is higher than B."}),"\n",(0,r.jsx)(t.h3,{id:"how-can-i-appeal-to-the-council-to-enact-a-change-on-my-behalf",children:"How can I appeal to the council to enact a change on my behalf?"}),"\n",(0,r.jsxs)(t.p,{children:["In some circumstances, you may want to appeal to the on-chain council to enact a change on your\nbehalf. One example of this circumstance is the case of lost or locked funds when the funds were\nlost due to a human interface error (such as inputting an address for another network). Another\nexample is if you participated in the 2017 Polkadot ICO with a multi-sig address which now does not\nlet you sign a message easily. When these circumstances can be proven beyond a reasonable doubt to\nbe an error, the council ",(0,r.jsx)(t.em,{children:"may"})," consider a governance motion to correct it."]}),"\n",(0,r.jsxs)(t.p,{children:["The first step to appeal to the council is to contact the councilors. There is no singular place\nwhere you are guaranteed to grab every councilor\u2019s ear with your message. However, there are\n",(0,r.jsx)(t.a,{href:"/docs/community",children:"a handful of good places"})," to start where you can get the attention of\nsome of them. After creating an account and joining this room, you can post a well-thought-through\nmessage here that lays down your case and justifies why you think the council should consider\nenacting a change to the protocol on your behalf."]}),"\n",(0,r.jsxs)(t.p,{children:["At some point, you will likely need a place for a longer-form discussion. For this, making a post on\n",(0,r.jsx)(t.a,{href:"https://polkadot.polkassembly.io/",children:"Polkassembly"})," is the recommended place to do so. When you write\na post on Polkassembly, present all the evidence for your circumstances and state clearly what kind\nof change you would suggest to the councilors to enact."]}),"\n",(0,r.jsx)(t.admonition,{type:"info",children:(0,r.jsx)(t.p,{children:"Remember, the councilors do not need to make the change, it is your responsibility to make a strong\ncase for why the change should be made."})}),"\n",(0,r.jsx)(t.h2,{id:"gov1-runtime-upgrade-monitoring",children:"Gov1 Runtime Upgrade Monitoring"}),"\n",(0,r.jsx)(t.p,{children:"Monitor the chain for:"}),"\n",(0,r.jsxs)(t.ol,{children:["\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.code,{children:"democracy(Started)"})," events and log ",(0,r.jsx)(t.code,{children:"index"})," and ",(0,r.jsx)(t.code,{children:"blockNumber"}),". This event indicates that a\nreferendum has started (although it does not mean it is a runtime upgrade). Get the referendum\ninfo*; it should have a status of ",(0,r.jsx)(t.code,{children:"Ongoing"}),". Find the ending block number (",(0,r.jsx)(t.code,{children:"end"}),") and the\nenactment ",(0,r.jsx)(t.code,{children:"delay"})," (delay). If the referendum passes, it will execute on block number\n",(0,r.jsx)(t.code,{children:"end + delay"}),"."]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.code,{children:"democracy(Passed)"}),", ",(0,r.jsx)(t.code,{children:"democracy(NotPassed)"}),", or, ",(0,r.jsx)(t.code,{children:"democracy(Cancelled)"})," events citing the index.\nIf ",(0,r.jsx)(t.code,{children:"Passed"}),", you need to look at the ",(0,r.jsx)(t.code,{children:"scheduler(Scheduled)"})," event in the same block for the\nenactment block."]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.code,{children:"democracy(PreimageNoted)"})," events with the same hash as the ",(0,r.jsx)(t.code,{children:"ReferendumInfoOf(index)"})," item. This\nmay be up to the last block before execution, but it will not work if this is missing."]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.code,{children:"democracy(Executed)"})," events for actual execution. In the case of a runtime upgrade, there will\nalso be a ",(0,r.jsx)(t.code,{children:"system(CodeUpdated)"})," event."]}),"\n"]}),"\n",(0,r.jsxs)(t.p,{children:["You can also monitor ",(0,r.jsx)(t.a,{href:"https://polkadot.polkassembly.io/",children:"Polkassembly"})," for discussions on on-chain\nproposals and referenda."]}),"\n",(0,r.jsxs)(t.p,{children:["* E.g. via ",(0,r.jsx)(t.code,{children:"pallets/democracy/storage/ReferendumInfoOf?key1=index&at=blockNumber"})," on Sidecar."]}),"\n",(0,r.jsx)(t.h2,{id:"resources",children:"Resources"}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsx)(t.li,{children:(0,r.jsx)(t.a,{href:"https://github.com/paritytech/polkadot/wiki/Governance",children:"Initial Governance Description"})}),"\n",(0,r.jsx)(t.li,{children:(0,r.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/substrate/frame/democracy/src",children:"Democracy Pallet"})}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.a,{href:"https://www.youtube.com/watch?v=VsZuDJMmVPY&feature=youtu.be&t=24734",children:"Governance Demo"})," - Dr.\nGavin Wood presents the initial governance structure for Polkadot. (Video)"]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.a,{href:"https://www.crowdcast.io/e/governance-on-polkadot--",children:"Governance on Polkadot"})," - A webinar\nexplaining how governance works in Polkadot and Kusama."]}),"\n"]})]})}function u(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(h,{...e})}):h(e)}},67141:(e,t,n)=>{n.d(t,{A:()=>s});var o=n(96540),r=n(74848);const s=function(e){var t,n=e.message,s=(0,o.useState)(!0),i=s[0],a=s[1];return(0,r.jsx)(r.Fragment,{children:i&&(0,r.jsxs)("div",{className:"message-box",children:[(0,r.jsx)("button",{className:"close-button",onClick:function(){a(!1)},children:"\u2716 "}),(0,r.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(t=n,t.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},89005:(e,t,n)=>{n.d(t,{A:()=>o});const o=n.p+"assets/images/gov1-overview-515a8f55923136c0b6e6bd23bea3d836.png"},96601:(e,t,n)=>{n.d(t,{A:()=>o});const o=n.p+"assets/images/gov1-timeline-69424fec137182a898f00c29a90fbdb1.png"},87635:(e,t,n)=>{n.d(t,{A:()=>o});const o=n.p+"assets/images/adaptive-quorum-biasing-18c2e70b6b9d2c3abf563219b11974dc.png"},87507:(e,t,n)=>{n.d(t,{A:()=>o});const o=n.p+"assets/images/approval-vote-d0622e1c0a9bc7c50ab9f23761488dbe.png"},28453:(e,t,n)=>{n.d(t,{R:()=>i,x:()=>a});var o=n(96540);const r={},s=o.createContext(r);function i(e){const t=o.useContext(s);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),o.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/9913464d.9f0529b2.js b/assets/js/9913464d.9f0529b2.js deleted file mode 100644 index 010aab81f608..000000000000 --- a/assets/js/9913464d.9f0529b2.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5883],{9296:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>a,default:()=>u,frontMatter:()=>i,metadata:()=>l,toc:()=>d});var o=n(74848),r=n(28453),s=n(67141);const i={id:"learn-governance",title:"Governance V1",sidebar_label:"Governance V1",description:"Polkadot's First Governance Model.",keywords:["governance","referenda","proposal","voting","endorse"],slug:"../learn-governance"},a=void 0,l={id:"learn/archive/learn-governance",title:"Governance V1",description:"Polkadot's First Governance Model.",source:"@site/../docs/learn/archive/learn-governance.md",sourceDirName:"learn/archive",slug:"/learn/learn-governance",permalink:"/docs/learn/learn-governance",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/archive/learn-governance.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1729847256e3,frontMatter:{id:"learn-governance",title:"Governance V1",sidebar_label:"Governance V1",description:"Polkadot's First Governance Model.",keywords:["governance","referenda","proposal","voting","endorse"],slug:"../learn-governance"},sidebar:"docs",previous:{title:"Archive",permalink:"/docs/learn-archive"},next:{title:"Gov1 Treasury",permalink:"/docs/learn/learn-treasury"}},c={},d=[{value:"Governance Summary",id:"governance-summary",level:2},{value:"Proposals",id:"proposals",level:2},{value:"Endorsing Proposals",id:"endorsing-proposals",level:3},{value:"Cancelling Proposals",id:"cancelling-proposals",level:3},{value:"Blacklisting Proposals",id:"blacklisting-proposals",level:3},{value:"Referenda",id:"referenda",level:2},{value:"Referenda Timeline",id:"referenda-timeline",level:3},{value:"Public Referenda",id:"public-referenda",level:3},{value:"Council Referenda",id:"council-referenda",level:3},{value:"Alternating Voting Timetable",id:"alternating-voting-timetable",level:3},{value:"Adaptive Quorum Biasing",id:"adaptive-quorum-biasing",level:3},{value:"Example of Adaptive Quorum Biasing",id:"example-of-adaptive-quorum-biasing",level:4},{value:"Enactment",id:"enactment",level:3},{value:"Voting on a Referendum",id:"voting-on-a-referendum",level:2},{value:"Voluntary Locking",id:"voluntary-locking",level:3},{value:"Delegations",id:"delegations",level:3},{value:"Council",id:"council",level:2},{value:"Prime Members",id:"prime-members",level:3},{value:"Technical Committee",id:"technical-committee",level:2},{value:"Frequently Asked Questions",id:"frequently-asked-questions",level:2},{value:"How to be a council member?",id:"how-to-be-a-council-member",level:3},{value:"How can I appeal to the council to enact a change on my behalf?",id:"how-can-i-appeal-to-the-council-to-enact-a-change-on-my-behalf",level:3},{value:"Gov1 Runtime Upgrade Monitoring",id:"gov1-runtime-upgrade-monitoring",level:2},{value:"Resources",id:"resources",level:2}];function h(e){const t={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",h4:"h4",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,r.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(s.A,{message:"The content on this page is archived. For up-to-date information about governance, see the\n[Polkadot OpenGov page](../learn-polkadot-opengov)."}),"\n",(0,o.jsx)(t.p,{children:"Polkadot uses a sophisticated governance mechanism that allows it to evolve gracefully overtime at\nthe ultimate behest of its assembled stakeholders. The stated goal is to ensure that the majority of\nthe stake can always command the network."}),"\n",(0,o.jsxs)(t.p,{children:["Polkadot brings together various novel mechanisms, including an amorphous (abstract) form of\nstate-transition function stored on-chain defined in a platform-agnostic language (i.e.\n",(0,o.jsx)(t.a,{href:"/docs/learn-wasm",children:"WebAssembly"}),"). It also allows for several on-chain voting mechanisms, such as\nreferenda with the novel concept of ",(0,o.jsx)(t.a,{href:"#adaptive-quorum-biasing",children:"Adaptive Quorum Biasing"})," and batch\napproval voting. All changes to the protocol must be agreed upon by stake-weighted referenda."]}),"\n",(0,o.jsxs)(t.p,{children:["To make any changes to the network, the idea is to compose active token holders and the council\ntogether to administrate a network upgrade decision. No matter whether the proposal is proposed by\nthe public (token holders) or the ",(0,o.jsx)(t.a,{href:"#council",children:"Council"}),", it finally will have to go through a vote on\na referendum to let all holders, weighted by stake, make the decision."]}),"\n",(0,o.jsx)(t.h2,{id:"governance-summary",children:"Governance Summary"}),"\n",(0,o.jsx)(t.p,{children:"The figure below shows an overview of Governance V1 with the key actors and different paths for\nsubmitting a proposal that can potentially be voted on as a referendum."}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{alt:"gov1-overview",src:n(89005).A+"",width:"1920",height:"800"})}),"\n",(0,o.jsxs)(t.p,{children:["The public (i.e. token holders) can submit a proposal that gets added to the proposal queue. Here,\nproposals are ",(0,o.jsx)(t.a,{href:"#endorsing-proposals",children:"endorsed"}),", and the one that gets the most support will climb to\nthe top of the queue. When it is time, the proposal at the top of the queue will become a\n",(0,o.jsx)(t.a,{href:"#public-referenda",children:"Public Referendum"}),". For instance, the proposal with 11 endorsements is shown at\nthe top of the queue in the figure, which is ready to become a referendum."]}),"\n",(0,o.jsxs)(t.p,{children:["The public can also submit a ",(0,o.jsx)(t.a,{href:"/docs/learn/learn-treasury#creating-a-treasury-proposal",children:"treasury proposal"}),",\nwhich must be evaluated by the ",(0,o.jsx)(t.a,{href:"#council",children:"Council"})," through a motion. If the Council motion passes,\nthe treasury proposal can be directly executed or go to the external queue, which will be voted on\nthrough a ",(0,o.jsx)(t.a,{href:"#council-referenda",children:"Council Referendum"}),". See the figure's green horizontal path from the\nPublic (green) to the Council (yellow). Treasury proposals and Council proposals can be directly\nexecuted (horizontal yellow arrows) or go to the external queue, where they will become a referendum"]}),"\n",(0,o.jsxs)(t.p,{children:["Note that the external queue always consists of\n",(0,o.jsx)(t.a,{href:"https://github.com/paritytech/substrate/blob/f4a2e84ee5974b219f2a03cd195105060c41e3cd/frame/democracy/src/lib.rs#LL29C8-L31C4",children:"a single proposal"}),".\nA proposal in the external queue can be fast-tracked by the\n",(0,o.jsx)(t.a,{href:"#technical-committee",children:"Technical Committee"})," (light blue). The fast track can contain as many\nproposals as possible (also called emergency proposals) that can be voted on simultaneously with\nwith the referenda introduced either by the Council or the Public. See in the figure the yellow\ncircle (i.e. Council Proposal) exiting the external queue, and the yellow circle with a light-blue\nborder also leaving the queue and being fast-tracked by the Technical Committee (TC). Once empty,\nthe external queue can be filled with another Council proposal."]}),"\n",(0,o.jsxs)(t.p,{children:["The Council can also submit proposals that will end up in the external queue. Voting on Council and\nPublic proposals subject to an ",(0,o.jsx)(t.a,{href:"#alternating-voting-timetable",children:"alternating timetable"}),', shown in the\nfigure as the "on" and "off" toggles on the external and proposal queues. In this example, the\nPublic proposal will be voted on together with the fast-tracked Council Proposal. Voting on\nnon-fast-tracked Council Proposals will be blocked until the alternating timetable switches the\ntoggles, which stops Public proposals from becoming a referenda.']}),"\n",(0,o.jsxs)(t.p,{children:["Referenda will follow an ",(0,o.jsx)(t.a,{href:"#adaptive-quorum-biasing",children:"adaptive quorum biasing"})," mechanism for deciding\nwhether they get enacted, and if they do, they will be executed after an\n",(0,o.jsx)(t.a,{href:"#enactment",children:"enactment period"}),"."]}),"\n",(0,o.jsx)(t.p,{children:"Token holders can delegate their votes (with a conviction multiplier) to another account belonging\nto a trusted entity voting on their behalf."}),"\n",(0,o.jsx)(t.h2,{id:"proposals",children:"Proposals"}),"\n",(0,o.jsx)(t.p,{children:"Referenda can be started in different ways:"}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsx)(t.li,{children:"Publicly submitted proposals"}),"\n",(0,o.jsx)(t.li,{children:"Proposals submitted by the council, either through a majority or unanimously"}),"\n",(0,o.jsxs)(t.li,{children:["Proposals submitted as part of the ",(0,o.jsx)(t.a,{href:"#enactment",children:"enactment"})," of a prior referendum (i.e. making a\nreferendum to start a new referendum)"]}),"\n",(0,o.jsxs)(t.li,{children:["Emergency proposals submitted by the ",(0,o.jsx)(t.a,{href:"#technical-committee",children:"Technical Committee"})," and approved by\nthe ",(0,o.jsx)(t.a,{href:"#council",children:"Council"})]}),"\n"]}),"\n",(0,o.jsx)(t.admonition,{title:"Starting a proposal in Governance V1",type:"info",children:(0,o.jsxs)(t.p,{children:["For more information about how to start a proposal, see the\n",(0,o.jsx)(t.a,{href:"/docs/maintain/maintain-guides-democracy#proposing-an-action",children:"dedicated page"}),"."]})}),"\n",(0,o.jsx)(t.h3,{id:"endorsing-proposals",children:"Endorsing Proposals"}),"\n",(0,o.jsxs)(t.p,{children:["Anyone can submit a proposal by depositing the minimum amount of tokens for a certain period (number\nof blocks). If someone agrees with the proposal, they may deposit the same amount of tokens to\nsupport it - this action is called\n",(0,o.jsx)(t.a,{href:"/docs/maintain/maintain-guides-democracy#endorsing-a-proposal",children:(0,o.jsx)(t.em,{children:"endorsing"})}),". The\nproposal with the highest amount of bonded support will be selected to be a referendum in the next\nvoting cycle based on an ",(0,o.jsx)(t.a,{href:"#alternating-voting-timetable",children:"alternating voting timetable"}),"."]}),"\n",(0,o.jsx)(t.h3,{id:"cancelling-proposals",children:"Cancelling Proposals"}),"\n",(0,o.jsxs)(t.p,{children:["A proposal can be canceled if the ",(0,o.jsx)(t.a,{href:"#technical-committee",children:"Technical Committee"})," unanimously agrees to\ndo so or if Root Origin (e.g. sudo) triggers this functionality. A canceled proposal's deposit is\nburned."]}),"\n",(0,o.jsx)(t.p,{children:"Additionally, a two-thirds majority of the council can cancel a referendum. This may function as a\nlast-resort if there is an issue found late in a referendum's proposal, such as a bug in the code of\nthe runtime that the proposal would institute."}),"\n",(0,o.jsxs)(t.p,{children:["If the cancellation is controversial enough that the council cannot get a two-thirds majority, then\nit will be left to the stakeholders ",(0,o.jsx)(t.em,{children:"en masse"})," to determine the proposal\u2019s fate."]}),"\n",(0,o.jsx)(t.h3,{id:"blacklisting-proposals",children:"Blacklisting Proposals"}),"\n",(0,o.jsxs)(t.p,{children:["A proposal can be blacklisted by Root Origin (e.g. sudo). A blacklisted proposal and its related\nreferendum (if any) are immediately ",(0,o.jsx)(t.a,{href:"#canceling",children:"canceled"}),". Additionally, a blacklisted proposal's\nhash cannot re-appear in the proposal queue. Blacklisting is useful when removing erroneous\nproposals that could be submitted with the same hash."]}),"\n",(0,o.jsx)(t.p,{children:"Upon seeing their proposal removed, a submitter who is not properly introduced to the democracy\nsystem of Polkadot might be tempted to re-submit the same proposal. That said, this is far from a\nfool-proof method of preventing invalid proposals from being submitted - a single changed character\nin a proposal's text will also change the hash of the proposal, rendering the per-hash blacklist\ninvalid."}),"\n",(0,o.jsx)(t.h2,{id:"referenda",children:"Referenda"}),"\n",(0,o.jsxs)(t.p,{children:["Referenda are simple, inclusive, stake-based voting schemes. Each referendum has a specific proposal\nthat takes the form of a ",(0,o.jsx)(t.strong,{children:"privileged function"})," call in the runtime. That function includes the\nmost powerful ",(0,o.jsx)(t.strong,{children:"call"}),": ",(0,o.jsx)(t.code,{children:"set_code"}),', which can switch out the entire runtime code, achieving what\nwould otherwise require a "hard fork".']}),"\n",(0,o.jsx)(t.p,{children:'Referenda are discrete events, have a fixed period where voting happens, and then are tallied, and\nthe function call is executed if the vote is approved. Referenda are always binary: your only\noptions in voting are "aye", "nay", or abstaining entirely.'}),"\n",(0,o.jsx)(t.h3,{id:"referenda-timeline",children:"Referenda Timeline"}),"\n",(0,o.jsx)(t.p,{children:"The structure of the timeline for all referenda is the same regardless of who initiates the\nproposal, although the timeline length can vary (see below)."}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{alt:"gov1-timeline",src:n(96601).A+"",width:"1920",height:"800"})}),"\n",(0,o.jsx)(t.p,{children:"The figure above provides a summary view of the referenda timeline for Governance V1."}),"\n",(0,o.jsxs)(t.p,{children:["In (1), the proposal is submitted, and the Launch Period starts. During this period of indefinite\nlength the voters can ",(0,o.jsx)(t.a,{href:"#endorsing-proposals",children:"endorse"})," proposals by bonding the same amount of tokens\nused by the depositor. Deposited tokens for endorsement will be returned once the proposal becomes a\nreferendum. During the launch period, the proposal will compete with other proposals, and the one\nthat gets to the top will be selected for a referendum when the next voting period starts."]}),"\n",(0,o.jsx)(t.p,{children:"The figure shows that the launch period is shown with a fixed length. Still, it varies depending on\nwho initiated the proposal and how many proposals there are in the pipeline. Council motions will\nlikely have a short launch period when compared to the public referenda which might take longer\nunless they are the only ones in the pipeline."}),"\n",(0,o.jsxs)(t.p,{children:["In (2), the proposal is selected for a referendum. Proposals initiated by the public will become a\n",(0,o.jsx)(t.a,{href:"#public-referenda",children:"public referendum"}),", while those initiated by the council will become\n",(0,o.jsx)(t.a,{href:"#council-referenda",children:"council referenda"}),". The voting period lasts 28 days (7 days on Kusama), after\nwhich, if the proposal is approved, it will go through an enactment period. Rejected proposals will\nneed to start from (1). Note that Governance V1 uses an\n",(0,o.jsx)(t.a,{href:"#alternating-voting-timetable",children:"alternating voting timeline"})," where voters can vote either for a\npublic proposal or a council motion every 28 days (7 days on Kusama)."]}),"\n",(0,o.jsxs)(t.p,{children:["In (3), the proposal is approved and moves through the ",(0,o.jsx)(t.a,{href:"#enactment",children:"enactment period"})," that can be of\ndifferent lengths depending on who initiated the proposal in the first place, with emergency\nproposals being the fastest ones and the only ones that can be voted simultaneously with other\nreferenda."]}),"\n",(0,o.jsx)(t.h3,{id:"public-referenda",children:"Public Referenda"}),"\n",(0,o.jsxs)(t.p,{children:["Public referenda will have a ",(0,o.jsx)(t.a,{href:"#adaptive-quorum-biasing",children:(0,o.jsx)(t.strong,{children:"positive turnout bias"})}),", meaning that\nthey will require a heavy supermajority of ",(0,o.jsx)(t.em,{children:"aye"})," votes to pass at low turnouts but as turnout\nincreases towards 100%, it will require a simple majority of ",(0,o.jsx)(t.em,{children:"aye"})," votes to pass (i.e. 51% wins)."]}),"\n",(0,o.jsx)(t.p,{children:"Note that the bonded tokens will be released once the proposal is tabled (that is, brought to a\nvote), and a maximum of 100 public proposals can be in the proposal queue."}),"\n",(0,o.jsx)(t.admonition,{title:"turnout",type:"info",children:(0,o.jsxs)(t.p,{children:["The total number of voting tokens excluding conviction or ",(0,o.jsx)(t.a,{href:"#voluntary-locking",children:"voluntary locking"}),"."]})}),"\n",(0,o.jsx)(t.h3,{id:"council-referenda",children:"Council Referenda"}),"\n",(0,o.jsxs)(t.p,{children:["Unanimous Council - When all council members agree on a proposal, it can be moved to a referendum\nwith a ",(0,o.jsx)(t.a,{href:"#adaptive-quorum-biasing",children:(0,o.jsx)(t.strong,{children:"negative turnout bias"})}),". Briefly, it will require a heavy\nsupermajority of ",(0,o.jsx)(t.em,{children:"nay"})," votes to reject at low turnouts, but as turnout increases towards 100%, it\nwill require a simple majority of ",(0,o.jsx)(t.em,{children:"nay"})," votes to fail (i.e. 51% wins)."]}),"\n",(0,o.jsxs)(t.p,{children:["Majority Council - When agreement from only a simple majority of council members occurs, the\nreferendum will need ",(0,o.jsx)(t.a,{href:"#adaptive-quorum-biasing",children:(0,o.jsx)(t.strong,{children:"simple majority"})})," to pass."]}),"\n",(0,o.jsx)(t.admonition,{title:"Public- vs. Council-initiated Referenda",type:"info",children:(0,o.jsx)(t.p,{children:"Public referenda must be agreed upon using a positive bias to mitigate attacks by malicious or\nill-conceived proposals. Conversely, when a proposal is unanimously voted in favor by the council,\nit benefits from using the negative bias. We assume low turnout is less problematic if the council\nproposes a referendum. Also, the council members are elected by the community and have strong\ntechnical as well as functional knowledge about the system, and we assume solid justifications back\nchanges proposed by the council."})}),"\n",(0,o.jsx)(t.h3,{id:"alternating-voting-timetable",children:"Alternating Voting Timetable"}),"\n",(0,o.jsx)(t.p,{children:"All referenda are executed by Root Origin. It follows that multiple referenda cannot be voted upon\nin the same period, excluding emergency referenda. An emergency referendum occurring at the same\ntime as a regular referendum (either public- or council-proposed) is the only time multiple\nreferenda can be voted on."}),"\n",(0,o.jsxs)(t.p,{children:["Every 28 days (7 days on Kusama), a new referendum will come up for a vote, assuming there is at\nleast one proposal in one of the queues. There is a queue for Council-approved proposals and a queue\nfor publicly-submitted proposals. The referendum to be voted upon alternates between the top\nproposal in the two queues, where the proposals' rank is based on\n",(0,o.jsx)(t.a,{href:"#endorsing-proposals",children:"endorsement"})," (i.e. bonded tokens)."]}),"\n",(0,o.jsx)(t.h3,{id:"adaptive-quorum-biasing",children:"Adaptive Quorum Biasing"}),"\n",(0,o.jsxs)(t.p,{children:["Polkadot introduces the concept of ",(0,o.jsx)(t.strong,{children:"Adaptive Quorum Biasing"}),", which is used to alter the effective\nsuper-majority required to make it easier or more difficult for a proposal to pass depending on\nvoting power (turnout) and origin (Council or public)."]}),"\n",(0,o.jsx)(t.p,{children:"Adaptive Quorum Biasing creates three tallying mechanisms: majority carry, super-majority approve,\nand super-majority against. They all equate to a simple majority-carry system at 100% turnout. Their\nselection depends on which entity proposed the proposal and whether all Council members voted yes\n(in the case of Council Referenda)."}),"\n",(0,o.jsxs)(t.table,{children:[(0,o.jsx)(t.thead,{children:(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.th,{style:{textAlign:"center"},children:(0,o.jsx)(t.strong,{children:"Entity"})}),(0,o.jsx)(t.th,{style:{textAlign:"center"},children:(0,o.jsx)(t.strong,{children:"Metric"})})]})}),(0,o.jsxs)(t.tbody,{children:[(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"Public"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"Positive Turnout Bias (Super-Majority Approve)"})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"Council (Complete agreement)"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"Negative Turnout Bias (Super-Majority Against)"})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"Council (Majority agreement)"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"Simple Majority"})]})]})]}),"\n",(0,o.jsx)(t.p,{children:"Let's use the image below as an example."}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{alt:"adaptive-quorum-biasing",src:n(87635).A+"",width:"537",height:"439"})}),"\n",(0,o.jsxs)(t.p,{children:["If a publicly submitted referendum only has a 25% turnout, the tally of ",(0,o.jsx)(t.em,{children:"aye"})," votes has to reach 66%\nfor it to pass since we applied ",(0,o.jsx)(t.strong,{children:"Positive Turnout Bias"}),". In contrast, when it has a 75% turnout,\nthe tally of ",(0,o.jsx)(t.em,{children:"aye"})," votes has to reach 54%, which means that the super-majority required decreases as\nthe turnout increases. A positive turnout bias, whereby a heavy super-majority of aye votes is\nrequired to carry at low turnouts. However, as turnout increases towards 100%, it becomes a simple\nmajority carry as below."]}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{src:"https://latex.codecogs.com/svg.latex?%5Clarge&space;%7Bagainst&space;%5Cover&space;%5Csqrt%7Bturnout%7D%7D&space;%3C&space;%7Bapprove&space;%5Cover&space;%5Csqrt%7Belectorate%7D%7D",alt:""})}),"\n",(0,o.jsxs)(t.p,{children:["Where ",(0,o.jsx)(t.code,{children:"approve"})," is the number of ",(0,o.jsx)(t.em,{children:"aye"})," votes, ",(0,o.jsx)(t.code,{children:"against"})," is the number of ",(0,o.jsx)(t.em,{children:"nay"})," votes, ",(0,o.jsx)(t.code,{children:"turnout"})," is\nthe total number of voting tokens excluding ",(0,o.jsx)(t.a,{href:"#voluntary-locking",children:"voluntary locking"}),", and\n",(0,o.jsx)(t.code,{children:"electorate"})," is the total number of tokens issued in the network."]}),"\n",(0,o.jsxs)(t.p,{children:["When the council proposes a new proposal through unanimous consent, the referendum would be put to\nthe vote using ",(0,o.jsx)(t.strong,{children:"Negative Turnout Bias"}),". Referring to the above image, when a Council referendum\nonly has a 25% turnout, the tally of ",(0,o.jsx)(t.em,{children:"aye"})," votes has to reach 34% for it to pass, while if the\nturnout increases to 75%, the tally of ",(0,o.jsx)(t.em,{children:"aye"})," votes has to reach 46%. A negative turnout bias\nrequires a heavy super-majority of ",(0,o.jsx)(t.em,{children:"nay"})," votes to reject at low turnouts. However, as turnout\nincreases towards 100%, it becomes a simple majority carry as below."]}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{src:"https://latex.codecogs.com/svg.latex?%5Clarge&space;%7Bagainst&space;%5Cover&space;%5Csqrt%7Belectorate%7D%7D&space;%3C&space;%7Bapprove&space;%5Cover&space;%5Csqrt%7Bturnout%7D%7D",alt:""})}),"\n",(0,o.jsxs)(t.p,{children:["In short, when the turnout rate is low, a super-majority is required to reject the proposal, which\nmeans a lower threshold of ",(0,o.jsx)(t.em,{children:"aye"})," votes must be reached. As turnout increases toward 100%, it becomes\na simple majority, a simple comparison of votes. If there are more ",(0,o.jsx)(t.em,{children:"aye"})," votes than ",(0,o.jsx)(t.em,{children:"nay"}),", then the\nproposal is carried, no matter how much stake votes on the proposal."]}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{src:"https://latex.codecogs.com/svg.latex?%5Clarge&space;%7Bapprove%7D&space;%3E&space;%7Bagainst%7D",alt:""})}),"\n",(0,o.jsxs)(t.p,{children:["To know more about where these above formulas come from, please read the\n",(0,o.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/democracy/src/vote_threshold.rs",children:"democracy pallet"}),"."]}),"\n",(0,o.jsx)(t.h4,{id:"example-of-adaptive-quorum-biasing",children:"Example of Adaptive Quorum Biasing"}),"\n",(0,o.jsx)(t.p,{children:"Let's assume we only have 1,500 DOT tokens in total and that this is a public proposal."}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsx)(t.li,{children:"John: 500 DOT"}),"\n",(0,o.jsx)(t.li,{children:"Peter: 100 DOT"}),"\n",(0,o.jsx)(t.li,{children:"Lilly: 150 DOT"}),"\n",(0,o.jsx)(t.li,{children:"JJ: 150 DOT"}),"\n",(0,o.jsx)(t.li,{children:"Ken: 600 DOT"}),"\n"]}),"\n",(0,o.jsxs)(t.p,{children:["John: Votes ",(0,o.jsx)(t.code,{children:"Yes"})," for a 4 week lock period => 500 x 1 = 500 Votes"]}),"\n",(0,o.jsxs)(t.p,{children:["Peter: Votes ",(0,o.jsx)(t.code,{children:"Yes"})," for a 4 week lock period => 100 x 1 = 100 Votes"]}),"\n",(0,o.jsxs)(t.p,{children:["JJ: Votes ",(0,o.jsx)(t.code,{children:"No"})," for a 16 week lock period => 150 x 3 = 450 Votes"]}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsx)(t.li,{children:"approve = 600 Votes"}),"\n",(0,o.jsx)(t.li,{children:"against = 450 Votes"}),"\n",(0,o.jsx)(t.li,{children:"turnout = 750 Votes"}),"\n",(0,o.jsx)(t.li,{children:"electorate = 1500 Votes"}),"\n"]}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{src:"https://latex.codecogs.com/svg.latex?%5Clarge&space;%5Cfrac%7B450%7D%7B%5Csqrt%7B750%7D%7D&space;%3C&space;%5Cfrac%7B600%7D%7B%5Csqrt%7B1500%7D%7D",alt:""})}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{src:"https://latex.codecogs.com/svg.latex?%5Clarge&space;%7B16.432%7D&space;%3C&space;%7B15.492%7D",alt:""})}),"\n",(0,o.jsxs)(t.p,{children:["Since the above example is a public referendum, ",(0,o.jsx)(t.strong,{children:"Super-Majority Approve"})," would be used to\ncalculate the result. Super-Majority Approve requires more ",(0,o.jsx)(t.em,{children:"aye"})," votes to pass the referendum when\nturnout is low; therefore, based on the above result, the referendum will be rejected."]}),"\n",(0,o.jsx)(t.admonition,{title:"only the winning voter's tokens are locked.",type:"info",children:(0,o.jsxs)(t.p,{children:["If the voters on the losing side of the referendum believe that the outcome will have adverse\neffects, their tokens are transferrable, so they will not be locked into the decision. Winning\nproposals are autonomously enacted after the ",(0,o.jsx)(t.a,{href:"#enactment",children:"enactment period"}),"."]})}),"\n",(0,o.jsx)(t.h3,{id:"enactment",children:"Enactment"}),"\n",(0,o.jsxs)(t.p,{children:["Referenda are considered ",(0,o.jsx)(t.em,{children:"baked"})," if they are closed and tallied. Assuming a referendum is approved,\nit will be scheduled for ",(0,o.jsx)(t.strong,{children:"enactment"}),". Referenda are considered ",(0,o.jsx)(t.em,{children:"unbaked"})," if they are pending an\noutcome, i.e. being voted on."]}),"\n",(0,o.jsxs)(t.p,{children:["All referenda are associated with an enactment delay or ",(0,o.jsx)(t.strong,{children:"enactment period"}),". This is the period\nbetween a referendum ending and (assuming it was approved) the changes being enacted."]}),"\n",(0,o.jsx)(t.p,{children:'For public and Council referenda, the enactment period is a fixed time of 28 days (8 days on\nKusama). For proposals submitted as part of the enactment of a prior referendum, it can be set as\ndesired. Emergency proposals deal with major problems with the network and need to be\n"fast-tracked". These will have a shorter enactment period.'}),"\n",(0,o.jsx)(t.h2,{id:"voting-on-a-referendum",children:"Voting on a Referendum"}),"\n",(0,o.jsx)(t.p,{children:"To vote, a voter generally must lock their tokens up for at least the enactment period beyond the\nend of the referendum. This is to ensure that some minimal economic buy-in to the result is needed\nand to dissuade vote selling."}),"\n",(0,o.jsx)(t.admonition,{title:"Referenda explainer video",type:"note",children:(0,o.jsxs)(t.p,{children:["To learn more about voting on referenda, please check out our\n",(0,o.jsx)(t.a,{href:"https://www.youtube.com/watch?v=BkbhhlsezGA&list=PLOyWqupZ-WGuAuS00rK-pebTMAOxW41W8&index=31&ab_channel=Polkadot",children:"technical explainer video"}),"."]})}),"\n",(0,o.jsxs)(t.p,{children:["It is possible to vote without locking, but your vote is worth a small fraction of a normal vote,\ngiven your stake. At the same time, holding only a small amount of tokens does not mean that the\nholder cannot influence the referendum result, thanks to time-locking or ",(0,o.jsx)(t.strong,{children:"voluntary locking"})," (see\nbelow)."]}),"\n",(0,o.jsx)(t.h3,{id:"voluntary-locking",children:"Voluntary Locking"}),"\n",(0,o.jsx)(t.admonition,{title:"Voluntary Locking",type:"info",children:(0,o.jsxs)(t.p,{children:["For more information about voluntary locking or conviction voting see\n",(0,o.jsx)(t.a,{href:"/docs/learn-polkadot-opengov#voluntary-locking",children:"Polkadot OpenGov"}),"."]})}),"\n",(0,o.jsx)(t.h3,{id:"delegations",children:"Delegations"}),"\n",(0,o.jsxs)(t.p,{children:["In Polkadot, you can\n",(0,o.jsx)(t.a,{href:"/docs/maintain/maintain-guides-democracy#delegate-a-vote",children:"delegate your voting power"})," to\nanother account you trust if you are not willing to stay up-to-date with all referenda."]}),"\n",(0,o.jsxs)(t.p,{children:["You can also use a ",(0,o.jsx)(t.a,{href:"/docs/learn-proxies#governance-proxy",children:"governance proxy"})," to vote on behalf of\nyour stash account. The proxy can be yours, or you can authorize a third-party governance proxy to\nvote with your stash. Learn more from the ",(0,o.jsx)(t.a,{href:"/docs/learn-proxies",children:"dedicated page on Proxy Accounts"}),"."]}),"\n",(0,o.jsx)(t.h2,{id:"council",children:"Council"}),"\n",(0,o.jsx)(t.p,{children:'To represent passive stakeholders, Polkadot introduces the idea of a "council". The council is an\non-chain entity comprising several actors, each represented as an on-chain account. The Polkadot\ncouncil consists of 13 members (19 on Kusama).'}),"\n",(0,o.jsxs)(t.p,{children:["Along with ",(0,o.jsx)(t.a,{href:"/docs/learn/learn-treasury",children:"controlling the treasury"}),", the council is called upon primarily for\nthree tasks of governance:"]}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsx)(t.li,{children:"Proposing sensible referenda"}),"\n",(0,o.jsx)(t.li,{children:"Cancelling uncontroversially dangerous or malicious referenda"}),"\n",(0,o.jsxs)(t.li,{children:["Electing the ",(0,o.jsx)(t.a,{href:"#technical-committee",children:"Technical Committee"}),"."]}),"\n"]}),"\n",(0,o.jsx)(t.p,{children:"For a referendum to be proposed by the council, a strict majority of members must be in favor, with\nno member exercising a veto. Vetoes may be exercised only once by a member for any single proposal.\nIf the proposal is resubmitted after a cool-down period, they may not veto it a second time."}),"\n",(0,o.jsxs)(t.p,{children:["Council motion that pass with a 3/5 (60%) super-majority - but without reaching unanimous support -\nwill move to a public referendum under a neutral, majority-carries voting scheme. In the case that\nall members of the council that voted are in favor of a motion, the vote is considered unanimous and\nbecomes a referendum with ",(0,o.jsx)(t.a,{href:"#adaptive-quorum-biasing",children:"negative turnout bias"}),"."]}),"\n",(0,o.jsx)(t.admonition,{title:"Explainer video on the Council",type:"note",children:(0,o.jsxs)(t.p,{children:["For more information, check out our\n",(0,o.jsx)(t.a,{href:"https://www.youtube.com/watch?v=837Vv3gdRzI",children:"video explainer on Council"})]})}),"\n",(0,o.jsx)(t.h3,{id:"prime-members",children:"Prime Members"}),"\n",(0,o.jsxs)(t.p,{children:["The council, being an instantiation of\n",(0,o.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/substrate/frame/collective",children:"Substrate's Collective pallet"}),",\nimplements what's called a ",(0,o.jsx)(t.em,{children:"prime member"})," whose vote acts as the default for other members that fail\nto vote before the timeout."]}),"\n",(0,o.jsxs)(t.p,{children:["The prime member is chosen based on a ",(0,o.jsx)(t.a,{href:"https://en.wikipedia.org/wiki/Borda_count",children:"Borda count"}),"."]}),"\n",(0,o.jsx)(t.p,{children:'The purpose of having a prime council member is to ensure a quorum, even when several members\nabstain from a vote. Council members might be tempted to vote a "soft rejection" or a "soft\napproval" by not voting and letting the others vote. The existence of a prime member forces\ncouncilors to be explicit in their votes or have their vote counted for whatever is voted on by the\nprime.'}),"\n",(0,o.jsx)(t.h2,{id:"technical-committee",children:"Technical Committee"}),"\n",(0,o.jsxs)(t.p,{children:["The Technical Committee(TC) was introduced in the\n",(0,o.jsx)(t.a,{href:"https://polkadot.network/kusama-rollout-and-governance/",children:"Kusama rollout and governance post"})," as one\nof the three chambers of Kusama governance (along with the Council and the Referendum chamber). The\nTC is composed of the teams that have successfully implemented or specified either a Polkadot\nruntime or Polkadot Host. Teams are added or removed from the TC via a simple majority vote of the\n",(0,o.jsx)(t.a,{href:"#council",children:"Council"}),"."]}),"\n",(0,o.jsx)(t.p,{children:'The TC aims to safeguard against malicious referenda, implement bug fixes, reverse faulty runtime\nupdates, or add new but battle-tested features. The TC can fast-track proposals using the Democracy\npallet and is the only origin that can trigger the fast-tracking functionality. We can think of the\nTC as a "unique origin" that cannot generate proposals but fast-track existing ones.'}),"\n",(0,o.jsx)(t.p,{children:"Fast-tracked referenda are the only referenda that can be active alongside another active\nreferendum. Thus, with fast-tracked referenda, it is possible to have two active referendums\nsimultaneously. Voting on one does not prevent a user from voting on the other."}),"\n",(0,o.jsx)(t.h2,{id:"frequently-asked-questions",children:"Frequently Asked Questions"}),"\n",(0,o.jsx)(t.h3,{id:"how-to-be-a-council-member",children:"How to be a council member?"}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{alt:"approval-vote",src:n(87507).A+"",width:"850",height:"340"})}),"\n",(0,o.jsx)(t.p,{children:"All stakeholders can signal their approval of any of the registered candidates."}),"\n",(0,o.jsxs)(t.p,{children:["Council elections are handled by the same ",(0,o.jsx)(t.a,{href:"/docs/learn-phragmen",children:"Phragm\xe9n election"})," process that\nselects validators from the available pool based on nominations. However, token holders' votes for\ncouncilors are isolated from any nominations they may have on validators. Council terms last for one\nweek on Polkadot and one day day on Kusama."]}),"\n",(0,o.jsxs)(t.p,{children:["At the end of each term, ",(0,o.jsx)(t.a,{href:"../learn-phragmen#algorithm",children:"Phragm\xe9n election algorithm"})," runs and the\nresult will choose the new councilors based on the vote configurations of all voters. The election\nalso chooses a set number of runners-up, which is 20 on Polkadot (12 on Kusama), that will remain in\nthe queue with their votes intact."]}),"\n",(0,o.jsx)(t.p,{children:'As opposed to a "first-past-the-post" electoral system, where voters can only vote for a single\ncandidate from a list, a Phragm\xe9n election is a more expressive way to include each voter\u2019s views.\nToken holders can treat it as a way to support as many candidates as they want. The election\nalgorithm will find a fair subset of the candidates that most closely matches the expressed\nindications of the electorate as a whole.'}),"\n",(0,o.jsx)(t.p,{children:"Let's take a look at the example below."}),"\n",(0,o.jsxs)(t.table,{children:[(0,o.jsx)(t.thead,{children:(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.th,{style:{textAlign:"center"},children:"Round 1"}),(0,o.jsx)(t.th,{style:{textAlign:"center"}}),(0,o.jsx)(t.th,{style:{textAlign:"center"}}),(0,o.jsx)(t.th,{style:{textAlign:"center"}}),(0,o.jsx)(t.th,{style:{textAlign:"center"}}),(0,o.jsx)(t.th,{style:{textAlign:"center"}})]})}),(0,o.jsxs)(t.tbody,{children:[(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{style:{textAlign:"center"},children:(0,o.jsx)(t.strong,{children:"Token Holders"})}),(0,o.jsx)(t.td,{style:{textAlign:"center"}}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:(0,o.jsx)(t.strong,{children:"Candidates"})}),(0,o.jsx)(t.td,{style:{textAlign:"center"}}),(0,o.jsx)(t.td,{style:{textAlign:"center"}}),(0,o.jsx)(t.td,{style:{textAlign:"center"}})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{style:{textAlign:"center"}}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"A"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"B"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"C"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"D"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"E"})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"Peter"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"X"}),(0,o.jsx)(t.td,{style:{textAlign:"center"}}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"X"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"X"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"X"})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"Alice"}),(0,o.jsx)(t.td,{style:{textAlign:"center"}}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"X"}),(0,o.jsx)(t.td,{style:{textAlign:"center"}}),(0,o.jsx)(t.td,{style:{textAlign:"center"}}),(0,o.jsx)(t.td,{style:{textAlign:"center"}})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"Bob"}),(0,o.jsx)(t.td,{style:{textAlign:"center"}}),(0,o.jsx)(t.td,{style:{textAlign:"center"}}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"X"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"X"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"X"})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"Kelvin"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"X"}),(0,o.jsx)(t.td,{style:{textAlign:"center"}}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"X"}),(0,o.jsx)(t.td,{style:{textAlign:"center"}}),(0,o.jsx)(t.td,{style:{textAlign:"center"}})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{style:{textAlign:"center"},children:(0,o.jsx)(t.strong,{children:"Total"})}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"2"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"1"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"3"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"2"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"2"})]})]})]}),"\n",(0,o.jsx)(t.p,{children:"The above example shows that candidate C wins the election in round 1, while candidates A, B, D & E\nkeep remaining on the candidates' list for the next round."}),"\n",(0,o.jsxs)(t.table,{children:[(0,o.jsx)(t.thead,{children:(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.th,{style:{textAlign:"center"},children:"Round 2"}),(0,o.jsx)(t.th,{style:{textAlign:"center"}}),(0,o.jsx)(t.th,{style:{textAlign:"center"}}),(0,o.jsx)(t.th,{style:{textAlign:"center"}}),(0,o.jsx)(t.th,{style:{textAlign:"center"}})]})}),(0,o.jsxs)(t.tbody,{children:[(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{style:{textAlign:"center"},children:(0,o.jsx)(t.strong,{children:"Token Holders"})}),(0,o.jsx)(t.td,{style:{textAlign:"center"}}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:(0,o.jsx)(t.strong,{children:"Candidates"})}),(0,o.jsx)(t.td,{style:{textAlign:"center"}}),(0,o.jsx)(t.td,{style:{textAlign:"center"}})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{style:{textAlign:"center"}}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"A"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"B"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"D"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"E"})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"Peter"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"X"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"X"}),(0,o.jsx)(t.td,{style:{textAlign:"center"}}),(0,o.jsx)(t.td,{style:{textAlign:"center"}})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"Alice"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"X"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"X"}),(0,o.jsx)(t.td,{style:{textAlign:"center"}}),(0,o.jsx)(t.td,{style:{textAlign:"center"}})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"Bob"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"X"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"X"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"X"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"X"})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"Kelvin"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"X"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"X"}),(0,o.jsx)(t.td,{style:{textAlign:"center"}}),(0,o.jsx)(t.td,{style:{textAlign:"center"}})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{style:{textAlign:"center"},children:(0,o.jsx)(t.strong,{children:"Total"})}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"4"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"4"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"1"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"1"})]})]})]}),"\n",(0,o.jsx)(t.p,{children:"The top-N (say 4 in this example) runners-up can remain, and their votes persist until the next\nelection. After round 2, even though candidates A & B get the same number of votes in this round,\ncandidate A gets elected because after adding the older unused approvals, it is higher than B."}),"\n",(0,o.jsx)(t.h3,{id:"how-can-i-appeal-to-the-council-to-enact-a-change-on-my-behalf",children:"How can I appeal to the council to enact a change on my behalf?"}),"\n",(0,o.jsxs)(t.p,{children:["In some circumstances, you may want to appeal to the on-chain council to enact a change on your\nbehalf. One example of this circumstance is the case of lost or locked funds when the funds were\nlost due to a human interface error (such as inputting an address for another network). Another\nexample is if you participated in the 2017 Polkadot ICO with a multi-sig address which now does not\nlet you sign a message easily. When these circumstances can be proven beyond a reasonable doubt to\nbe an error, the council ",(0,o.jsx)(t.em,{children:"may"})," consider a governance motion to correct it."]}),"\n",(0,o.jsxs)(t.p,{children:["The first step to appeal to the council is to contact the councilors. There is no singular place\nwhere you are guaranteed to grab every councilor\u2019s ear with your message. However, there are\n",(0,o.jsx)(t.a,{href:"/docs/community",children:"a handful of good places"})," to start where you can get the attention of\nsome of them. After creating an account and joining this room, you can post a well-thought-through\nmessage here that lays down your case and justifies why you think the council should consider\nenacting a change to the protocol on your behalf."]}),"\n",(0,o.jsxs)(t.p,{children:["At some point, you will likely need a place for a longer-form discussion. For this, making a post on\n",(0,o.jsx)(t.a,{href:"https://polkadot.polkassembly.io/",children:"Polkassembly"})," is the recommended place to do so. When you write\na post on Polkassembly, present all the evidence for your circumstances and state clearly what kind\nof change you would suggest to the councilors to enact."]}),"\n",(0,o.jsx)(t.admonition,{type:"info",children:(0,o.jsx)(t.p,{children:"Remember, the councilors do not need to make the change, it is your responsibility to make a strong\ncase for why the change should be made."})}),"\n",(0,o.jsx)(t.h2,{id:"gov1-runtime-upgrade-monitoring",children:"Gov1 Runtime Upgrade Monitoring"}),"\n",(0,o.jsx)(t.p,{children:"Monitor the chain for:"}),"\n",(0,o.jsxs)(t.ol,{children:["\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.code,{children:"democracy(Started)"})," events and log ",(0,o.jsx)(t.code,{children:"index"})," and ",(0,o.jsx)(t.code,{children:"blockNumber"}),". This event indicates that a\nreferendum has started (although it does not mean it is a runtime upgrade). Get the referendum\ninfo*; it should have a status of ",(0,o.jsx)(t.code,{children:"Ongoing"}),". Find the ending block number (",(0,o.jsx)(t.code,{children:"end"}),") and the\nenactment ",(0,o.jsx)(t.code,{children:"delay"})," (delay). If the referendum passes, it will execute on block number\n",(0,o.jsx)(t.code,{children:"end + delay"}),"."]}),"\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.code,{children:"democracy(Passed)"}),", ",(0,o.jsx)(t.code,{children:"democracy(NotPassed)"}),", or, ",(0,o.jsx)(t.code,{children:"democracy(Cancelled)"})," events citing the index.\nIf ",(0,o.jsx)(t.code,{children:"Passed"}),", you need to look at the ",(0,o.jsx)(t.code,{children:"scheduler(Scheduled)"})," event in the same block for the\nenactment block."]}),"\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.code,{children:"democracy(PreimageNoted)"})," events with the same hash as the ",(0,o.jsx)(t.code,{children:"ReferendumInfoOf(index)"})," item. This\nmay be up to the last block before execution, but it will not work if this is missing."]}),"\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.code,{children:"democracy(Executed)"})," events for actual execution. In the case of a runtime upgrade, there will\nalso be a ",(0,o.jsx)(t.code,{children:"system(CodeUpdated)"})," event."]}),"\n"]}),"\n",(0,o.jsxs)(t.p,{children:["You can also monitor ",(0,o.jsx)(t.a,{href:"https://polkadot.polkassembly.io/",children:"Polkassembly"})," for discussions on on-chain\nproposals and referenda."]}),"\n",(0,o.jsxs)(t.p,{children:["* E.g. via ",(0,o.jsx)(t.code,{children:"pallets/democracy/storage/ReferendumInfoOf?key1=index&at=blockNumber"})," on Sidecar."]}),"\n",(0,o.jsx)(t.h2,{id:"resources",children:"Resources"}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsx)(t.li,{children:(0,o.jsx)(t.a,{href:"https://github.com/paritytech/polkadot/wiki/Governance",children:"Initial Governance Description"})}),"\n",(0,o.jsx)(t.li,{children:(0,o.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/substrate/frame/democracy/src",children:"Democracy Pallet"})}),"\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.a,{href:"https://www.youtube.com/watch?v=VsZuDJMmVPY&feature=youtu.be&t=24734",children:"Governance Demo"})," - Dr.\nGavin Wood presents the initial governance structure for Polkadot. (Video)"]}),"\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.a,{href:"https://www.crowdcast.io/e/governance-on-polkadot--",children:"Governance on Polkadot"})," - A webinar\nexplaining how governance works in Polkadot and Kusama."]}),"\n"]})]})}function u(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(h,{...e})}):h(e)}},67141:(e,t,n)=>{n.d(t,{A:()=>s});var o=n(96540),r=n(74848);const s=function(e){var t,n=e.message,s=(0,o.useState)(!0),i=s[0],a=s[1];return(0,r.jsx)(r.Fragment,{children:i&&(0,r.jsxs)("div",{className:"message-box",children:[(0,r.jsx)("button",{className:"close-button",onClick:function(){a(!1)},children:"\u2716 "}),(0,r.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(t=n,t.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},89005:(e,t,n)=>{n.d(t,{A:()=>o});const o=n.p+"assets/images/gov1-overview-515a8f55923136c0b6e6bd23bea3d836.png"},96601:(e,t,n)=>{n.d(t,{A:()=>o});const o=n.p+"assets/images/gov1-timeline-69424fec137182a898f00c29a90fbdb1.png"},87635:(e,t,n)=>{n.d(t,{A:()=>o});const o=n.p+"assets/images/adaptive-quorum-biasing-18c2e70b6b9d2c3abf563219b11974dc.png"},87507:(e,t,n)=>{n.d(t,{A:()=>o});const o=n.p+"assets/images/approval-vote-d0622e1c0a9bc7c50ab9f23761488dbe.png"},28453:(e,t,n)=>{n.d(t,{R:()=>i,x:()=>a});var o=n(96540);const r={},s=o.createContext(r);function i(e){const t=o.useContext(s);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),o.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/9e2042f5.5d25be6d.js b/assets/js/9e2042f5.5d25be6d.js deleted file mode 100644 index 59cabe2a2abd..000000000000 --- a/assets/js/9e2042f5.5d25be6d.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3086],{70225:(a,e,n)=>{n.r(e),n.d(e,{assets:()=>l,contentTitle:()=>r,default:()=>h,frontMatter:()=>i,metadata:()=>s,toc:()=>c});var t=n(74848),o=n(28453);const i={id:"learn-collator",title:"Collator",sidebar_label:"Collator",description:"Role of Collators within the Polkadot Ecosystem.",keywords:["collator","maintain","full node","block candidate"],slug:"../learn-collator"},r=void 0,s={id:"learn/learn-collator",title:"Collator",description:"Role of Collators within the Polkadot Ecosystem.",source:"@site/../docs/learn/learn-collator.md",sourceDirName:"learn",slug:"/learn-collator",permalink:"/docs/learn-collator",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-collator.md",tags:[],version:"current",lastUpdatedBy:"github-actions[bot]",lastUpdatedAt:1729496727e3,frontMatter:{id:"learn-collator",title:"Collator",sidebar_label:"Collator",description:"Role of Collators within the Polkadot Ecosystem.",keywords:["collator","maintain","full node","block candidate"],slug:"../learn-collator"},sidebar:"docs",previous:{title:"Network Participants",permalink:"/docs/learn-participants-index"},next:{title:"Nominator",permalink:"/docs/learn-nominator"}},l={},c=[{value:"Collators' Role",id:"collators-role",level:2},{value:"XCM",id:"xcm",level:2},{value:"Taking the Case for One Parachain",id:"taking-the-case-for-one-parachain",level:2},{value:"Collators in the Wild",id:"collators-in-the-wild",level:2},{value:"Guides and Tools",id:"guides-and-tools",level:2}];function d(a){const e={a:"a",admonition:"admonition",em:"em",h2:"h2",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,o.R)(),...a.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(e.admonition,{type:"info",children:(0,t.jsxs)(e.p,{children:["This page provides a general overview of the role of collators' in the Polkadot ecosystem. For more\ndetailed information you can read the ",(0,t.jsx)(e.a,{href:"/docs/learn-parachains-protocol",children:"Parachain Protocol Overview"}),"."]})}),"\n",(0,t.jsx)(e.h2,{id:"collators-role",children:"Collators' Role"}),"\n",(0,t.jsx)(e.p,{children:"Collators maintain parachains by collecting parachain transactions from users and producing state\ntransition proofs for relay chain validators. In other words, collators maintain parachains by\naggregating parachain transactions into parachain block candidates and producing state transition\nproofs (Proof-of-Validity, PoV) for validators."}),"\n",(0,t.jsx)(e.p,{children:"Collators maintain a full node for the relay chain and a full node for their particular parachain;\nmeaning they retain all necessary information to be able to author new blocks and execute\ntransactions in much the same way as miners do on PoW blockchains. Under normal circumstances, they\nwill collate and execute transactions to create an unsealed block and provide it, together with a\nPoV, to one or more validators responsible for proposing a parachain block."}),"\n",(0,t.jsxs)(e.p,{children:["Collators are similar to validators on any other blockchain but they do not need to provide security\nguarantees because the relay chain provides those. If a parachain block is invalid, it will get\nrejected by validators. The validators are required to check the validity of submitted candidates,\nfollowed by issuing and collecting statements about the validity of candidates to other validators.\nThis process is known as ",(0,t.jsx)(e.strong,{children:"candidate backing"}),". Validators receive an arbitrary number of parachain\ncandidates with associated PoV from untrusted collators. A candidate is considered ",(0,t.jsx)(e.em,{children:"backable"})," when\nat least 2/3 of all assigned validators have issued a valid statement about that candidate."]}),"\n",(0,t.jsx)(e.p,{children:"The validator must successfully verify the following conditions in the following order:"}),"\n",(0,t.jsxs)(e.ol,{children:["\n",(0,t.jsxs)(e.li,{children:["\n",(0,t.jsx)(e.p,{children:"The candidate does not exceed any parameters in the persisted validation data."}),"\n"]}),"\n",(0,t.jsxs)(e.li,{children:["\n",(0,t.jsx)(e.p,{children:"The signature of the collator is valid."}),"\n"]}),"\n",(0,t.jsxs)(e.li,{children:["\n",(0,t.jsx)(e.p,{children:"Validate the candidate by executing the parachain Runtime."}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(e.p,{children:["Once a candidate meets a specified criteria for inclusion, the selected relay chain block author\nthen chooses any of the backable candidates for each parachain and includes those into the relay\nchain block. We say the candidate blocks are ",(0,t.jsx)(e.em,{children:"backed"}),"."]}),"\n",(0,t.jsx)(e.p,{children:"The assumption that having more collators is better or more secure is not correct. On the contrary,\ntoo many collators may slow down the network. The only nefarious power collators have is transaction\ncensorship. To prevent censorship, a parachain only needs to ensure that there are some neutral\ncollators - but not necessarily a majority. Theoretically, the censorship problem is solved by\nhaving just one honest collator."}),"\n",(0,t.jsx)(e.h2,{id:"xcm",children:"XCM"}),"\n",(0,t.jsxs)(e.p,{children:["Collators are a key element of the ",(0,t.jsx)(e.a,{href:"/docs/learn-xcm",children:"XCM (Cross-Consensus Message Passing Format)"}),". By\nbeing full nodes of the relay chain, they are all aware of each other as peers. This makes it\npossible for them to send messages from parachain A to parachain B."]}),"\n",(0,t.jsx)(e.h2,{id:"taking-the-case-for-one-parachain",children:"Taking the Case for One Parachain"}),"\n",(0,t.jsxs)(e.p,{children:["A start of a new block candidate is initiated with a block creation time. The collator aggregates\nall new transactions at the end of the process. When doing so, the collator signs the ",(0,t.jsx)(e.em,{children:"parachain\nblock candidate"})," and produces state transition proofs (Proof-of-Validity, PoV), which are a summary\nof the final account balances caused by the transactions in the candidate block. The collator sends\nthe candidate block and PoV to the parachain validators, so-called para-validators. The\npara-validators verify the transactions within the parachain block candidate. Upon verification, and\nif all is well, the candidate becomes ",(0,t.jsx)(e.em,{children:"backable"})," and a para-validator shares the candidate block\nwith the relay chain."]}),"\n",(0,t.jsx)(e.p,{children:(0,t.jsx)(e.img,{alt:"parachain candidate block diagram",src:n(8891).A+"",width:"413",height:"298"})}),"\n",(0,t.jsx)(e.p,{children:"The validators on the relay chain will try to reach a consensus on the block candidate. Upon\nreaching consensus, the now validated block candidate is shared with the validators and collators,\nand the process repeats for new transactions. A collator cannot continue building blocks on a\nparachain until the block candidate they proposed to the relay chain validators have been validated.\nA block is produced every 6 seconds."}),"\n",(0,t.jsx)(e.h2,{id:"collators-in-the-wild",children:"Collators in the Wild"}),"\n",(0,t.jsxs)(e.p,{children:["Blockchains that are built using Substrate are unable to hook onto the relay chain on their own. The\nParity team built the\n",(0,t.jsx)(e.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/cumulus/",children:"Cumulus library"})," to address this.\nCollators are being used on the ",(0,t.jsx)(e.a,{href:"/docs/build-pdk#testing-a-parachain",children:"Paseo"})," testnet,\nand you can learn more about how they are used with Cumulus via the\n",(0,t.jsx)(e.a,{href:"hhttps://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/polkadot_sdk/cumulus/index.html",children:"Cumulus"}),"\nRust documentation. More information can be found under the\n",(0,t.jsx)(e.a,{href:"/docs/build-pdk###cumulus",children:"Cumulus section"})," on the build parachain page."]}),"\n",(0,t.jsx)(e.h2,{id:"guides-and-tools",children:"Guides and Tools"}),"\n",(0,t.jsxs)(e.ul,{children:["\n",(0,t.jsx)(e.li,{children:(0,t.jsx)(e.a,{href:"https://docs.substrate.io/reference/how-to-guides/parachains/connect-to-a-relay-chain/",children:"Tutorial covering Cumulus and Collators"})}),"\n",(0,t.jsx)(e.li,{children:(0,t.jsx)(e.a,{href:"/docs/build-pdk#testing-a-parachain",children:"Paseo testnet guide"})}),"\n",(0,t.jsxs)(e.li,{children:[(0,t.jsx)(e.a,{href:"https://github.com/shawntabrizi/polkadot-launch",children:"polkadot-launch"})," - a tool to quickly spin up a\nlocal Polkadot testnet based on some parameters like number of parachains, collator setup, etc."]}),"\n"]})]})}function h(a={}){const{wrapper:e}={...(0,o.R)(),...a.components};return e?(0,t.jsx)(e,{...a,children:(0,t.jsx)(d,{...a})}):d(a)}},8891:(a,e,n)=>{n.d(e,{A:()=>t});const t=n.p+"assets/images/polkadot-consensus-example-1-b4a05f2e5a4b991594612da57e1d6dfd.png"},28453:(a,e,n)=>{n.d(e,{R:()=>r,x:()=>s});var t=n(96540);const o={},i=t.createContext(o);function r(a){const e=t.useContext(i);return t.useMemo((function(){return"function"==typeof a?a(e):{...e,...a}}),[e,a])}function s(a){let e;return e=a.disableParentContext?"function"==typeof a.components?a.components(o):a.components||o:r(a.components),t.createElement(i.Provider,{value:e},a.children)}}}]); \ No newline at end of file diff --git a/assets/js/9e2042f5.b4a1a823.js b/assets/js/9e2042f5.b4a1a823.js new file mode 100644 index 000000000000..b4ccb67541d7 --- /dev/null +++ b/assets/js/9e2042f5.b4a1a823.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3086],{79554:(a,e,n)=>{n.r(e),n.d(e,{assets:()=>l,contentTitle:()=>r,default:()=>h,frontMatter:()=>s,metadata:()=>t,toc:()=>c});const t=JSON.parse('{"id":"learn/learn-collator","title":"Collator","description":"Role of Collators within the Polkadot Ecosystem.","source":"@site/../docs/learn/learn-collator.md","sourceDirName":"learn","slug":"/learn-collator","permalink":"/docs/learn-collator","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-collator.md","tags":[],"version":"current","lastUpdatedBy":"github-actions[bot]","lastUpdatedAt":1729496727000,"frontMatter":{"id":"learn-collator","title":"Collator","sidebar_label":"Collator","description":"Role of Collators within the Polkadot Ecosystem.","keywords":["collator","maintain","full node","block candidate"],"slug":"../learn-collator"},"sidebar":"docs","previous":{"title":"Network Participants","permalink":"/docs/learn-participants-index"},"next":{"title":"Nominator","permalink":"/docs/learn-nominator"}}');var o=n(74848),i=n(28453);const s={id:"learn-collator",title:"Collator",sidebar_label:"Collator",description:"Role of Collators within the Polkadot Ecosystem.",keywords:["collator","maintain","full node","block candidate"],slug:"../learn-collator"},r=void 0,l={},c=[{value:"Collators' Role",id:"collators-role",level:2},{value:"XCM",id:"xcm",level:2},{value:"Taking the Case for One Parachain",id:"taking-the-case-for-one-parachain",level:2},{value:"Collators in the Wild",id:"collators-in-the-wild",level:2},{value:"Guides and Tools",id:"guides-and-tools",level:2}];function d(a){const e={a:"a",admonition:"admonition",em:"em",h2:"h2",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,i.R)(),...a.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(e.admonition,{type:"info",children:(0,o.jsxs)(e.p,{children:["This page provides a general overview of the role of collators' in the Polkadot ecosystem. For more\ndetailed information you can read the ",(0,o.jsx)(e.a,{href:"/docs/learn-parachains-protocol",children:"Parachain Protocol Overview"}),"."]})}),"\n",(0,o.jsx)(e.h2,{id:"collators-role",children:"Collators' Role"}),"\n",(0,o.jsx)(e.p,{children:"Collators maintain parachains by collecting parachain transactions from users and producing state\ntransition proofs for relay chain validators. In other words, collators maintain parachains by\naggregating parachain transactions into parachain block candidates and producing state transition\nproofs (Proof-of-Validity, PoV) for validators."}),"\n",(0,o.jsx)(e.p,{children:"Collators maintain a full node for the relay chain and a full node for their particular parachain;\nmeaning they retain all necessary information to be able to author new blocks and execute\ntransactions in much the same way as miners do on PoW blockchains. Under normal circumstances, they\nwill collate and execute transactions to create an unsealed block and provide it, together with a\nPoV, to one or more validators responsible for proposing a parachain block."}),"\n",(0,o.jsxs)(e.p,{children:["Collators are similar to validators on any other blockchain but they do not need to provide security\nguarantees because the relay chain provides those. If a parachain block is invalid, it will get\nrejected by validators. The validators are required to check the validity of submitted candidates,\nfollowed by issuing and collecting statements about the validity of candidates to other validators.\nThis process is known as ",(0,o.jsx)(e.strong,{children:"candidate backing"}),". Validators receive an arbitrary number of parachain\ncandidates with associated PoV from untrusted collators. A candidate is considered ",(0,o.jsx)(e.em,{children:"backable"})," when\nat least 2/3 of all assigned validators have issued a valid statement about that candidate."]}),"\n",(0,o.jsx)(e.p,{children:"The validator must successfully verify the following conditions in the following order:"}),"\n",(0,o.jsxs)(e.ol,{children:["\n",(0,o.jsxs)(e.li,{children:["\n",(0,o.jsx)(e.p,{children:"The candidate does not exceed any parameters in the persisted validation data."}),"\n"]}),"\n",(0,o.jsxs)(e.li,{children:["\n",(0,o.jsx)(e.p,{children:"The signature of the collator is valid."}),"\n"]}),"\n",(0,o.jsxs)(e.li,{children:["\n",(0,o.jsx)(e.p,{children:"Validate the candidate by executing the parachain Runtime."}),"\n"]}),"\n"]}),"\n",(0,o.jsxs)(e.p,{children:["Once a candidate meets a specified criteria for inclusion, the selected relay chain block author\nthen chooses any of the backable candidates for each parachain and includes those into the relay\nchain block. We say the candidate blocks are ",(0,o.jsx)(e.em,{children:"backed"}),"."]}),"\n",(0,o.jsx)(e.p,{children:"The assumption that having more collators is better or more secure is not correct. On the contrary,\ntoo many collators may slow down the network. The only nefarious power collators have is transaction\ncensorship. To prevent censorship, a parachain only needs to ensure that there are some neutral\ncollators - but not necessarily a majority. Theoretically, the censorship problem is solved by\nhaving just one honest collator."}),"\n",(0,o.jsx)(e.h2,{id:"xcm",children:"XCM"}),"\n",(0,o.jsxs)(e.p,{children:["Collators are a key element of the ",(0,o.jsx)(e.a,{href:"/docs/learn-xcm",children:"XCM (Cross-Consensus Message Passing Format)"}),". By\nbeing full nodes of the relay chain, they are all aware of each other as peers. This makes it\npossible for them to send messages from parachain A to parachain B."]}),"\n",(0,o.jsx)(e.h2,{id:"taking-the-case-for-one-parachain",children:"Taking the Case for One Parachain"}),"\n",(0,o.jsxs)(e.p,{children:["A start of a new block candidate is initiated with a block creation time. The collator aggregates\nall new transactions at the end of the process. When doing so, the collator signs the ",(0,o.jsx)(e.em,{children:"parachain\nblock candidate"})," and produces state transition proofs (Proof-of-Validity, PoV), which are a summary\nof the final account balances caused by the transactions in the candidate block. The collator sends\nthe candidate block and PoV to the parachain validators, so-called para-validators. The\npara-validators verify the transactions within the parachain block candidate. Upon verification, and\nif all is well, the candidate becomes ",(0,o.jsx)(e.em,{children:"backable"})," and a para-validator shares the candidate block\nwith the relay chain."]}),"\n",(0,o.jsx)(e.p,{children:(0,o.jsx)(e.img,{alt:"parachain candidate block diagram",src:n(8891).A+"",width:"413",height:"298"})}),"\n",(0,o.jsx)(e.p,{children:"The validators on the relay chain will try to reach a consensus on the block candidate. Upon\nreaching consensus, the now validated block candidate is shared with the validators and collators,\nand the process repeats for new transactions. A collator cannot continue building blocks on a\nparachain until the block candidate they proposed to the relay chain validators have been validated.\nA block is produced every 6 seconds."}),"\n",(0,o.jsx)(e.h2,{id:"collators-in-the-wild",children:"Collators in the Wild"}),"\n",(0,o.jsxs)(e.p,{children:["Blockchains that are built using Substrate are unable to hook onto the relay chain on their own. The\nParity team built the\n",(0,o.jsx)(e.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/cumulus/",children:"Cumulus library"})," to address this.\nCollators are being used on the ",(0,o.jsx)(e.a,{href:"/docs/build-pdk#testing-a-parachain",children:"Paseo"})," testnet,\nand you can learn more about how they are used with Cumulus via the\n",(0,o.jsx)(e.a,{href:"hhttps://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/polkadot_sdk/cumulus/index.html",children:"Cumulus"}),"\nRust documentation. More information can be found under the\n",(0,o.jsx)(e.a,{href:"/docs/build-pdk###cumulus",children:"Cumulus section"})," on the build parachain page."]}),"\n",(0,o.jsx)(e.h2,{id:"guides-and-tools",children:"Guides and Tools"}),"\n",(0,o.jsxs)(e.ul,{children:["\n",(0,o.jsx)(e.li,{children:(0,o.jsx)(e.a,{href:"https://docs.substrate.io/reference/how-to-guides/parachains/connect-to-a-relay-chain/",children:"Tutorial covering Cumulus and Collators"})}),"\n",(0,o.jsx)(e.li,{children:(0,o.jsx)(e.a,{href:"/docs/build-pdk#testing-a-parachain",children:"Paseo testnet guide"})}),"\n",(0,o.jsxs)(e.li,{children:[(0,o.jsx)(e.a,{href:"https://github.com/shawntabrizi/polkadot-launch",children:"polkadot-launch"})," - a tool to quickly spin up a\nlocal Polkadot testnet based on some parameters like number of parachains, collator setup, etc."]}),"\n"]})]})}function h(a={}){const{wrapper:e}={...(0,i.R)(),...a.components};return e?(0,o.jsx)(e,{...a,children:(0,o.jsx)(d,{...a})}):d(a)}},8891:(a,e,n)=>{n.d(e,{A:()=>t});const t=n.p+"assets/images/polkadot-consensus-example-1-b4a05f2e5a4b991594612da57e1d6dfd.png"},28453:(a,e,n)=>{n.d(e,{R:()=>s,x:()=>r});var t=n(96540);const o={},i=t.createContext(o);function s(a){const e=t.useContext(i);return t.useMemo((function(){return"function"==typeof a?a(e):{...e,...a}}),[e,a])}function r(a){let e;return e=a.disableParentContext?"function"==typeof a.components?a.components(o):a.components||o:s(a.components),t.createElement(i.Provider,{value:e},a.children)}}}]); \ No newline at end of file diff --git a/assets/js/9e3f6a8a.97bdd95d.js b/assets/js/9e3f6a8a.97bdd95d.js deleted file mode 100644 index a6885ddc2560..000000000000 --- a/assets/js/9e3f6a8a.97bdd95d.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8108],{23773:(e,a,n)=>{n.r(a),n.d(a,{assets:()=>l,contentTitle:()=>s,default:()=>d,frontMatter:()=>r,metadata:()=>i,toc:()=>c});var o=n(74848),t=n(28453);const r={id:"learn-comparisons-ethereum-2",title:"Polkadot vs. Ethereum",sidebar_label:"Ethereum",description:"Comparison between Polkadot and Ethereum.",keywords:["ethereum","Ethereum","proof of stake","sharding"],slug:"../learn-comparisons-ethereum-2"},s=void 0,i={id:"learn/learn-comparisons-ethereum-2",title:"Polkadot vs. Ethereum",description:"Comparison between Polkadot and Ethereum.",source:"@site/../docs/learn/learn-comparison-ethereum-2.md",sourceDirName:"learn",slug:"/learn-comparisons-ethereum-2",permalink:"/docs/learn-comparisons-ethereum-2",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-comparison-ethereum-2.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1726760224e3,frontMatter:{id:"learn-comparisons-ethereum-2",title:"Polkadot vs. Ethereum",sidebar_label:"Ethereum",description:"Comparison between Polkadot and Ethereum.",keywords:["ethereum","Ethereum","proof of stake","sharding"],slug:"../learn-comparisons-ethereum-2"},sidebar:"docs",previous:{title:"Kusama",permalink:"/docs/learn-comparisons-kusama"},next:{title:"Cosmos",permalink:"/docs/learn-comparisons-cosmos"}},l={},c=[{value:"High-Level Comparison",id:"high-level-comparison",level:2},{value:"Scalability Approaches",id:"scalability-approaches",level:2},{value:"Rollups vs. Parachain Creation",id:"rollups-vs-parachain-creation",level:3},{value:"Architectural Differences: Polkadot and Ethereum",id:"architectural-differences-polkadot-and-ethereum",level:2},{value:"Forks, Upgrades, and Governance",id:"forks-upgrades-and-governance",level:3},{value:"Block Production & Finalization",id:"block-production--finalization",level:3},{value:"Staking Mechanics: Ethereum PoS vs. Polkadot NPoS",id:"staking-mechanics-ethereum-pos-vs-polkadot-npos",level:3},{value:"Interoperability and Message Passing",id:"interoperability-and-message-passing",level:3},{value:"DApp Support and Development",id:"dapp-support-and-development",level:2},{value:"Conclusion",id:"conclusion",level:2}];function h(e){const a={a:"a",admonition:"admonition",blockquote:"blockquote",em:"em",h2:"h2",h3:"h3",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,t.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(a.p,{children:"Both protocols are blockchains at their core but serve fundamentally different roles in how they are\nutilized:"}),"\n",(0,o.jsxs)(a.ul,{children:["\n",(0,o.jsx)(a.li,{children:"Ethereum is a general-purpose blockchain that hosts the Ethereum Virtual Machine, an environment\nfor executing smart contracts. Ethereum is homogenous but can utilize rollups and layer two\nsolutions to scale its usage."}),"\n",(0,o.jsxs)(a.li,{children:['Polkadot is a heterogeneous, multi-chain protocol (a "layer 0" or metaprotocol) that hosts\nmultiple layer one blockchains and allows them to partake in shared security. Polkadot acts as a\n',(0,o.jsx)(a.strong,{children:"meta-protocol"})," allowing multiple protocols to coexist and work together."]}),"\n"]}),"\n",(0,o.jsx)(a.admonition,{title:"Sharding",type:"note",children:(0,o.jsxs)(a.p,{children:['In the context of blockchains, the term "shards" or "sharded protocol" is typically used to refer to\nsub-protocols or as a general term to refer to a form of\n',(0,o.jsx)(a.a,{href:"https://en.wikipedia.org/wiki/Scalability#Horizontal_or_scale_out",children:(0,o.jsx)(a.strong,{children:"horizontal scaling"})}),"."]})}),"\n",(0,o.jsx)(a.h2,{id:"high-level-comparison",children:"High-Level Comparison"}),"\n",(0,o.jsx)(a.p,{children:"Both protocols have fundamentally different goals:"}),"\n",(0,o.jsxs)(a.ul,{children:["\n",(0,o.jsxs)(a.li,{children:["\n",(0,o.jsxs)(a.p,{children:["Ethereum is a general-purpose blockchain based on the Ethereum Virtual Machine (EVM). Ethereum is\nnot specialized nor optimized for any particular application. Instead, its primary focus is the\nEthereum Virtual Machine for executing smart contracts. Ethereum achieves scalability via\n",(0,o.jsx)(a.a,{href:"./learn-comparisons-rollups",children:(0,o.jsx)(a.strong,{children:"rollups"})})," are secondary protocols that utilize Ethereum as a\nsettlement layer."]}),"\n"]}),"\n",(0,o.jsxs)(a.li,{children:["\n",(0,o.jsxs)(a.p,{children:["Polkadot is a multi-chain protocol that provides shared security and secure interoperability for\neach of its ",(0,o.jsx)(a.strong,{children:"parachains"}),'. Each parachain (also called an "appchain" in this context) is\nspecialized towards a specific focus and optimized towards that goal. Parachains must abide by the\n',(0,o.jsx)(a.a,{href:"/docs/learn-parachains-protocol",children:"Parachains Protocol"}),"."]}),"\n"]}),"\n"]}),"\n",(0,o.jsxs)(a.p,{children:["Polkadot ",(0,o.jsx)(a.em,{children:"does not"})," directly run a virtual machine for smart contracts, as Polkadot's primary\npurpose is to validate the protocols that operate under it."]}),"\n",(0,o.jsxs)(a.p,{children:["However, several parachains provide\n",(0,o.jsx)(a.a,{href:"https://wiki.polkadot.network/docs/build-smart-contracts#parachains",children:"smart contract functionality"}),".\nParachains on Polkadot can even run an EVM for executing smart contracts written in Solidity using\n",(0,o.jsx)(a.a,{href:"https://github.com/polkadot-evm/frontier",children:"Frontier, an Ethereum compatibility layer for Substrate"}),"."]}),"\n",(0,o.jsxs)(a.blockquote,{children:["\n",(0,o.jsxs)(a.p,{children:["As a general summary, one could also say that Polkadot ",(0,o.jsx)(a.strong,{children:"coordinates"})," and ",(0,o.jsx)(a.strong,{children:"validates"}),"\nsub-protocols that follow the ",(0,o.jsx)(a.a,{href:"/docs/learn-parachains-protocol",children:"Parachains Protocol"})," (which are\nakin to an optimistic-style rollup). In contrast, Ethereum coordinates inputs and outputs for the\nEVM. On Polkadot, any sub-protocol can have its own logic so long as it compiles to WebAssembly."]}),"\n"]}),"\n",(0,o.jsx)(a.h2,{id:"scalability-approaches",children:"Scalability Approaches"}),"\n",(0,o.jsxs)(a.p,{children:["Ethereum favors a ",(0,o.jsx)(a.em,{children:"rollup-centric"})," approach for scaling transaction throughput.\n",(0,o.jsx)(a.a,{href:"https://ethereum.org/en/roadmap/danksharding/",children:(0,o.jsx)(a.strong,{children:"Danksharding"})})," is how Ethereum plans to better\naccommodate and facilitate rollup activity by providing better utilities, such as data availability\nvia ",(0,o.jsx)(a.a,{href:"https://ethereum.org/roadmap/danksharding",children:"Proto-Danksharding"}),", for rollups to record state to\nEthereum."]}),"\n",(0,o.jsx)(a.p,{children:"Danksharding will allow for much more space to be utilized per block on Ethereum, where blobs of\ndata will be verifiable for an amount of time before being pruned from the network. This approach\nwill enable data availability at layer one and further enable layer two protocols on Ethereum to\nflourish more readily."}),"\n",(0,o.jsxs)(a.p,{children:["In contrast, the relay chain requires parachains to register themselves in accordance with the\n",(0,o.jsx)(a.a,{href:"/docs/learn-parachains-protocol",children:"Parachains Protocol"}),". Once registered, the relay chain validates\nthe state transitions of each parachain as per their parachain validation function (PVF).\n",(0,o.jsx)(a.a,{href:"./learn-parachains-protocol#availability-and-unavailability-phase",children:"Data availability"})," is an\nintegral part of validating the parachain state. This approach enables parallelized interactions\nbetween parachains. They can trust that each sub-protocol's respective state is valid, as Polkadot\ncollectively validated them."]}),"\n",(0,o.jsx)(a.h3,{id:"rollups-vs-parachain-creation",children:"Rollups vs. Parachain Creation"}),"\n",(0,o.jsx)(a.p,{children:"Ethereum primarily focuses on optimizing itself for rollups; Polkadot's parachains protocol allows\nvalidation to occur on the protocol level without needing a layer two solution."}),"\n",(0,o.jsx)(a.admonition,{title:"Rollup vs. Parachain Comparison",type:"info",children:(0,o.jsxs)(a.p,{children:["For a more in-depth comparison of parachains versus rollups, take a look at the\n",(0,o.jsx)(a.a,{href:"/docs/learn-comparisons-rollups",children:"rollup comparison page"})]})}),"\n",(0,o.jsxs)(a.p,{children:["Each parachain hosts its own core logic, called a ",(0,o.jsx)(a.strong,{children:"runtime"})," (sometimes called a ",(0,o.jsx)(a.strong,{children:"state transition\nfunction"}),"). Polkadot uses WebAssembly (",(0,o.jsx)(a.a,{href:"/docs/learn-wasm",children:"Wasm"}),') as a "meta-protocol".']}),"\n",(0,o.jsxs)(a.p,{children:["Parachains have the option of using ",(0,o.jsx)(a.a,{href:"/docs/learn-xcm",children:"cross-consensus messaging (XCM)"})," to communicate\nwith one another and facilitate inter-chain reactions. It is also possible to utilize XCM on\nEthereum as it is merely a format for describing state transitions on a particular network."]}),"\n",(0,o.jsx)(a.h2,{id:"architectural-differences-polkadot-and-ethereum",children:"Architectural Differences: Polkadot and Ethereum"}),"\n",(0,o.jsxs)(a.p,{children:["As previously mentioned, Ethereum is a ",(0,o.jsx)(a.strong,{children:"general-purpose"})," virtual machine that can run sandboxed\nprograms are written in Solidity, whereas Polkadot is a meta-protocol for other parachains to\nconnect and interact with each other."]}),"\n",(0,o.jsxs)(a.p,{children:["Ethereum operates as a single, homogeneous chain. Each Ethereum node is divided into two layers: the\n",(0,o.jsx)(a.strong,{children:"consensus"})," and ",(0,o.jsx)(a.strong,{children:"execution"})," layers. Each layer handles the block validation information, peer\ndiscovery, and Proof-of-Stake of the Ethereum client."]}),"\n",(0,o.jsxs)(a.p,{children:["Polkadot's primary component is the ",(0,o.jsx)(a.strong,{children:"relay chain"}),", which hosts heterogeneous ",(0,o.jsx)(a.strong,{children:"parachains"}),". The\nrelay chain aggregates information from each parachain, where validators agree upon consensus and\nfinality. One can see Polkadot as a series of ",(0,o.jsx)(a.strong,{children:"runtimes"}),", which are state transition functions\nused to describe parachains and Polkadot itself."]}),"\n",(0,o.jsx)(a.h3,{id:"forks-upgrades-and-governance",children:"Forks, Upgrades, and Governance"}),"\n",(0,o.jsx)(a.p,{children:"Ethereum's governance is done off-chain, where various stakeholders come to a consensus through some\nmedium other than the protocol itself. Upgrades on Ethereum will follow the standard hard fork\nprocedure, coordinating the community and validators to upgrade their nodes to implement protocol\nchanges."}),"\n",(0,o.jsxs)(a.p,{children:["Polkadot uses on-chain ",(0,o.jsx)(a.a,{href:"/docs/learn-polkadot-opengov",children:"governance, called OpenGov"}),", to facilitate\nruntime upgrades. The stakeholders of Polkadot vote on these upgrades, and if successful, the\nupgrade is enacted automatically in the blocks to come. Polkadot validator operators only upgrade\ntheir nodes when the client itself gets updated."]}),"\n",(0,o.jsxs)(a.p,{children:["Because of this mechanism, the relay chain can enact upgrades using the Wasm meta-protocol ",(0,o.jsx)(a.em,{children:"without"}),"\na hard fork. As the WebAssembly runtime for Polkadot (and all of its subsequent parachains) are\nstored on-chain, this involves simply replacing the runtime with a new WebAssembly blob once\ngovernance allowed the upgrade to be enacted."]}),"\n",(0,o.jsx)(a.p,{children:"Anything within the state transition function, the transaction queue, or off-chain workers can be\nupgraded without forking the chain, as these are all part of the WebAssembly runtime."}),"\n",(0,o.jsx)(a.h3,{id:"block-production--finalization",children:"Block Production & Finalization"}),"\n",(0,o.jsxs)(a.p,{children:["Both Ethereum and Polkadot use hybrid consensus models where ",(0,o.jsx)(a.strong,{children:"block production"})," and ",(0,o.jsx)(a.strong,{children:"finality"}),"\nare decoupled."]}),"\n",(0,o.jsxs)(a.p,{children:["For finalization, Ethereum utilizes ",(0,o.jsx)(a.a,{href:"https://ethereum.org/glossary#casper-ffg",children:"Casper FFG"}),", which\nworks with ",(0,o.jsx)(a.a,{href:"https://ethereum.org/glossary#lmd-ghost",children:"LMD-GHOST"})," as the fork choice rule for\nfinalization."]}),"\n",(0,o.jsxs)(a.p,{children:["Polkadot utilizes ",(0,o.jsx)(a.a,{href:"/docs/learn-consensus#finality-gadget-grandpa",children:"GRANDPA"})," for finalization. Rather\nthan decide on a block-by-block basis, GRANDPA can finalize ",(0,o.jsx)(a.em,{children:"chains"})," of blocks. Both finalization\nmechanisms are both\n",(0,o.jsx)(a.a,{href:"https://www.geeksforgeeks.org/what-is-ghost-protocol-for-ethereum/",children:"GHOST"}),"-based and can both\nfinalize batches of blocks in one round."]}),"\n",(0,o.jsxs)(a.p,{children:["For block production, both protocols use slot-based protocols that randomly assign validators to a\nslot and provide a fork choice rule for unfinalized blocks. Polkadot uses\n",(0,o.jsx)(a.a,{href:"/docs/learn-consensus#block-production-babe",children:"BABE"})," for block production. BABE includes two\nmechanisms for selecting block producers, one of which is a fallback in case the first fails, which\nallows for chain liveness. BABE produces unfinalized blocks on top of the chain already finalized by\nGRANDPA."]}),"\n",(0,o.jsx)(a.p,{children:"There are two main differences between Ethereum and Polkadot consensus:"}),"\n",(0,o.jsxs)(a.ol,{children:["\n",(0,o.jsxs)(a.li,{children:["\n",(0,o.jsxs)(a.p,{children:["Polkadot finality protocol, GRANDPA, finalizes batches of blocks based on\n",(0,o.jsx)(a.a,{href:"/docs/learn-parachains-protocol#availability-and-unavailability-phase",children:"availability and validity checks"}),"\nthat happen as the proposed chain grows. The time to finality varies with the number of checks\nthat need to be performed (and invalidity reports, which cause extra checks). The expected time\nto finality is 30 seconds."]}),"\n"]}),"\n",(0,o.jsxs)(a.li,{children:["\n",(0,o.jsxs)(a.p,{children:["Ethereum typically has many validators per round (called an\n",(0,o.jsx)(a.a,{href:"https://ethereum.org/en/glossary/#epoch",children:"epoch"})," on Ethereum) to provide strong validity\nguarantees while Polkadot can provide stronger guarantees with fewer validators per round.\nPolkadot achieves this by making validators distribute an\n",(0,o.jsx)(a.a,{href:"/docs/learn-parachains-protocol#erasure-codes",children:"erasure coding"})," to all validators in the system,\nsuch that anyone - not only the round's validators - can reconstruct a parachain's block and\ntest its validity. This data availability is a core part of Polkadot - ensuring state is valid\nfor its state transitions. The random parachain-validator assignments and secondary checks are\nperformed by randomly selected validators, making it less likely for the small set of validators\non each parachain to collude."]}),"\n"]}),"\n"]}),"\n",(0,o.jsx)(a.h3,{id:"staking-mechanics-ethereum-pos-vs-polkadot-npos",children:"Staking Mechanics: Ethereum PoS vs. Polkadot NPoS"}),"\n",(0,o.jsxs)(a.p,{children:["Polkadot uses ",(0,o.jsx)(a.a,{href:"/docs/learn-phragmen",children:"Nominated Proof of Stake (NPoS)"})," to select validators from a\nsmaller set, letting smaller holders nominate validators to run the network while claiming the\nsystem's rewards without running a node. Polkadot needs about five validators for each parachain in\nthe network. For more information, see the ",(0,o.jsx)(a.a,{href:"/docs/learn-staking",children:"staking page"}),"."]}),"\n",(0,o.jsx)(a.p,{children:'Ethereum is a Proof of Stake (PoS) network that requires 32 ETH to stake for each validator\ninstance. Validators run a primary Beacon Chain node and multiple validator clients - one for each\n32 ETH. These validators get assigned to "committees," randomly selected groups to validate blocks\nin the network.'}),"\n",(0,o.jsx)(a.h3,{id:"interoperability-and-message-passing",children:"Interoperability and Message Passing"}),"\n",(0,o.jsxs)(a.p,{children:["Polkadot uses ",(0,o.jsx)(a.a,{href:"/docs/learn-xcm",children:"Cross-Consensus Messaging (XCM)"})," for parachains to send arbitrary\nmessages to each other. Parachains open connections with each other and can send messages via their\nestablished channels. Given that ",(0,o.jsx)(a.a,{href:"/docs/learn-collator",children:"collators"})," communicate directly to the relay\nchain, they will be connected and can relay messages from parachain A to parachain B if needed\nthrough these message passing channels (see:\n",(0,o.jsx)(a.a,{href:"/docs/learn-xcm-transport",children:"HRMP, VMP, and other message passing mechanisms for XCM"}),")."]}),"\n",(0,o.jsx)(a.p,{children:"Messages do not pass through the relay chain. Only validity proofs and channel operations do (open,\nclose, etc.). This enhances scalability by keeping data on the edges of the system."}),"\n",(0,o.jsxs)(a.p,{children:["Currently, Ethereum rollups can communicate using\n",(0,o.jsx)(a.a,{href:"https://medium.com/@richardchen_81235/intro-to-shared-sequencing-1622d1fd51c9",children:"shared sequencers"}),",\nwhich provides a common ground of interoperability between layer two solutions."]}),"\n",(0,o.jsxs)(a.p,{children:["Polkadot plans to have the concept of\n",(0,o.jsx)(a.a,{href:"/docs/polkadot-direction#xcm-and-accords",children:(0,o.jsx)(a.strong,{children:"Accords"})})," are opt-in treaties for different\nprotocols to partake in. Accords ensure that logic about interoperability is kept consistent and\ncannot be changed and undermined by participating protocols. This helps ensure that any XCM message\ncan be properly interpreted and executed as needed on the target protocol in a fully trustless\nenvironment."]}),"\n",(0,o.jsxs)(a.p,{children:[(0,o.jsx)(a.a,{href:"/docs/learn-spree",children:"SPREE (Shared Protected Runtime Execution Enclaves)"})," is the mechanism that\nprovides shared logic for cross-consensus messages, and will be used to construct Accords."]}),"\n",(0,o.jsx)(a.h2,{id:"dapp-support-and-development",children:"DApp Support and Development"}),"\n",(0,o.jsx)(a.p,{children:"Ethereum supports smart contract development using Solidity. These contracts are immutable, and\ncannot be changed once published on-chain."}),"\n",(0,o.jsxs)(a.p,{children:["Polkadot supports smart contracts through parachains, usually using the\n",(0,o.jsx)(a.a,{href:"https://use.ink/",children:"ink! smart contract language"}),", but also Solidity through Frontier-enabled\nparachains. On Ethereum, smart contracts can call each other; however, they are fixed on-chain to\nthe domain of Ethereum. On Polkadot, smart contracts can call each other in the same parachain ",(0,o.jsx)(a.em,{children:"and"}),"\nacross parachains."]}),"\n",(0,o.jsx)(a.p,{children:"On Polkadot, developers have the option of either using smart contracts, calling extrinsics from\npallets that modify the chain's state in some particular way or merely use Polkadot's RPC to\ndirectly retrieve and act on-chain information. DApps on Polkadot are often composed of these\nmultiple components working together to modify, retrieve, and watch state changes live as they\nhappen."}),"\n",(0,o.jsxs)(a.p,{children:["For a more comprehensive list of how to build on Polkadot, be sure to check the\n",(0,o.jsx)(a.a,{href:"/docs/build-guide",children:"Build Section"}),"."]}),"\n",(0,o.jsx)(a.h2,{id:"conclusion",children:"Conclusion"}),"\n",(0,o.jsx)(a.p,{children:'Ethereum and Polkadot both use a sharded model. Danksharding plans to utilize a rollup-centric\napproach by focusing on data availability. The Polkadot ecosystem is secured by a main chain, called\nthe "relay chain," which in turn manages cores and allows tasks, such as parachains, to be run on\ntop of those cores and messages to be sent between them.'}),"\n",(0,o.jsx)(a.p,{children:"The primary differences between the two protocols are:"}),"\n",(0,o.jsxs)(a.ul,{children:["\n",(0,o.jsx)(a.li,{children:"Ethereum processes EVM-compatible state transitions, whether through rollups or on the mainnet\nitself, while Polkadot allows its parachains to have an abstract state transition function\nimplementation."}),"\n",(0,o.jsx)(a.li,{children:"Governance processes in Ethereum are planned to be off-chain and thus require coordination for a\nhard fork to enact governance decisions. In contrast, in Polkadot the decisions are on-chain and\nenacted autonomously via forkless upgrades."}),"\n",(0,o.jsx)(a.li,{children:"Validator selection mechanisms differ as Polkadot can provide strong availability and validity\nguarantees with fewer validators per protocol."}),"\n"]})]})}function d(e={}){const{wrapper:a}={...(0,t.R)(),...e.components};return a?(0,o.jsx)(a,{...e,children:(0,o.jsx)(h,{...e})}):h(e)}},28453:(e,a,n)=>{n.d(a,{R:()=>s,x:()=>i});var o=n(96540);const t={},r=o.createContext(t);function s(e){const a=o.useContext(r);return o.useMemo((function(){return"function"==typeof e?e(a):{...a,...e}}),[a,e])}function i(e){let a;return a=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:s(e.components),o.createElement(r.Provider,{value:a},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/9e3f6a8a.c585f9ff.js b/assets/js/9e3f6a8a.c585f9ff.js new file mode 100644 index 000000000000..b9c230718247 --- /dev/null +++ b/assets/js/9e3f6a8a.c585f9ff.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8108],{44533:(e,a,n)=>{n.r(a),n.d(a,{assets:()=>l,contentTitle:()=>i,default:()=>d,frontMatter:()=>r,metadata:()=>o,toc:()=>c});const o=JSON.parse('{"id":"learn/learn-comparisons-ethereum-2","title":"Polkadot vs. Ethereum","description":"Comparison between Polkadot and Ethereum.","source":"@site/../docs/learn/learn-comparison-ethereum-2.md","sourceDirName":"learn","slug":"/learn-comparisons-ethereum-2","permalink":"/docs/learn-comparisons-ethereum-2","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-comparison-ethereum-2.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1726760224000,"frontMatter":{"id":"learn-comparisons-ethereum-2","title":"Polkadot vs. Ethereum","sidebar_label":"Ethereum","description":"Comparison between Polkadot and Ethereum.","keywords":["ethereum","Ethereum","proof of stake","sharding"],"slug":"../learn-comparisons-ethereum-2"},"sidebar":"docs","previous":{"title":"Kusama","permalink":"/docs/learn-comparisons-kusama"},"next":{"title":"Cosmos","permalink":"/docs/learn-comparisons-cosmos"}}');var t=n(74848),s=n(28453);const r={id:"learn-comparisons-ethereum-2",title:"Polkadot vs. Ethereum",sidebar_label:"Ethereum",description:"Comparison between Polkadot and Ethereum.",keywords:["ethereum","Ethereum","proof of stake","sharding"],slug:"../learn-comparisons-ethereum-2"},i=void 0,l={},c=[{value:"High-Level Comparison",id:"high-level-comparison",level:2},{value:"Scalability Approaches",id:"scalability-approaches",level:2},{value:"Rollups vs. Parachain Creation",id:"rollups-vs-parachain-creation",level:3},{value:"Architectural Differences: Polkadot and Ethereum",id:"architectural-differences-polkadot-and-ethereum",level:2},{value:"Forks, Upgrades, and Governance",id:"forks-upgrades-and-governance",level:3},{value:"Block Production & Finalization",id:"block-production--finalization",level:3},{value:"Staking Mechanics: Ethereum PoS vs. Polkadot NPoS",id:"staking-mechanics-ethereum-pos-vs-polkadot-npos",level:3},{value:"Interoperability and Message Passing",id:"interoperability-and-message-passing",level:3},{value:"DApp Support and Development",id:"dapp-support-and-development",level:2},{value:"Conclusion",id:"conclusion",level:2}];function h(e){const a={a:"a",admonition:"admonition",blockquote:"blockquote",em:"em",h2:"h2",h3:"h3",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(a.p,{children:"Both protocols are blockchains at their core but serve fundamentally different roles in how they are\nutilized:"}),"\n",(0,t.jsxs)(a.ul,{children:["\n",(0,t.jsx)(a.li,{children:"Ethereum is a general-purpose blockchain that hosts the Ethereum Virtual Machine, an environment\nfor executing smart contracts. Ethereum is homogenous but can utilize rollups and layer two\nsolutions to scale its usage."}),"\n",(0,t.jsxs)(a.li,{children:['Polkadot is a heterogeneous, multi-chain protocol (a "layer 0" or metaprotocol) that hosts\nmultiple layer one blockchains and allows them to partake in shared security. Polkadot acts as a\n',(0,t.jsx)(a.strong,{children:"meta-protocol"})," allowing multiple protocols to coexist and work together."]}),"\n"]}),"\n",(0,t.jsx)(a.admonition,{title:"Sharding",type:"note",children:(0,t.jsxs)(a.p,{children:['In the context of blockchains, the term "shards" or "sharded protocol" is typically used to refer to\nsub-protocols or as a general term to refer to a form of\n',(0,t.jsx)(a.a,{href:"https://en.wikipedia.org/wiki/Scalability#Horizontal_or_scale_out",children:(0,t.jsx)(a.strong,{children:"horizontal scaling"})}),"."]})}),"\n",(0,t.jsx)(a.h2,{id:"high-level-comparison",children:"High-Level Comparison"}),"\n",(0,t.jsx)(a.p,{children:"Both protocols have fundamentally different goals:"}),"\n",(0,t.jsxs)(a.ul,{children:["\n",(0,t.jsxs)(a.li,{children:["\n",(0,t.jsxs)(a.p,{children:["Ethereum is a general-purpose blockchain based on the Ethereum Virtual Machine (EVM). Ethereum is\nnot specialized nor optimized for any particular application. Instead, its primary focus is the\nEthereum Virtual Machine for executing smart contracts. Ethereum achieves scalability via\n",(0,t.jsx)(a.a,{href:"./learn-comparisons-rollups",children:(0,t.jsx)(a.strong,{children:"rollups"})})," are secondary protocols that utilize Ethereum as a\nsettlement layer."]}),"\n"]}),"\n",(0,t.jsxs)(a.li,{children:["\n",(0,t.jsxs)(a.p,{children:["Polkadot is a multi-chain protocol that provides shared security and secure interoperability for\neach of its ",(0,t.jsx)(a.strong,{children:"parachains"}),'. Each parachain (also called an "appchain" in this context) is\nspecialized towards a specific focus and optimized towards that goal. Parachains must abide by the\n',(0,t.jsx)(a.a,{href:"/docs/learn-parachains-protocol",children:"Parachains Protocol"}),"."]}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(a.p,{children:["Polkadot ",(0,t.jsx)(a.em,{children:"does not"})," directly run a virtual machine for smart contracts, as Polkadot's primary\npurpose is to validate the protocols that operate under it."]}),"\n",(0,t.jsxs)(a.p,{children:["However, several parachains provide\n",(0,t.jsx)(a.a,{href:"https://wiki.polkadot.network/docs/build-smart-contracts#parachains",children:"smart contract functionality"}),".\nParachains on Polkadot can even run an EVM for executing smart contracts written in Solidity using\n",(0,t.jsx)(a.a,{href:"https://github.com/polkadot-evm/frontier",children:"Frontier, an Ethereum compatibility layer for Substrate"}),"."]}),"\n",(0,t.jsxs)(a.blockquote,{children:["\n",(0,t.jsxs)(a.p,{children:["As a general summary, one could also say that Polkadot ",(0,t.jsx)(a.strong,{children:"coordinates"})," and ",(0,t.jsx)(a.strong,{children:"validates"}),"\nsub-protocols that follow the ",(0,t.jsx)(a.a,{href:"/docs/learn-parachains-protocol",children:"Parachains Protocol"})," (which are\nakin to an optimistic-style rollup). In contrast, Ethereum coordinates inputs and outputs for the\nEVM. On Polkadot, any sub-protocol can have its own logic so long as it compiles to WebAssembly."]}),"\n"]}),"\n",(0,t.jsx)(a.h2,{id:"scalability-approaches",children:"Scalability Approaches"}),"\n",(0,t.jsxs)(a.p,{children:["Ethereum favors a ",(0,t.jsx)(a.em,{children:"rollup-centric"})," approach for scaling transaction throughput.\n",(0,t.jsx)(a.a,{href:"https://ethereum.org/en/roadmap/danksharding/",children:(0,t.jsx)(a.strong,{children:"Danksharding"})})," is how Ethereum plans to better\naccommodate and facilitate rollup activity by providing better utilities, such as data availability\nvia ",(0,t.jsx)(a.a,{href:"https://ethereum.org/roadmap/danksharding",children:"Proto-Danksharding"}),", for rollups to record state to\nEthereum."]}),"\n",(0,t.jsx)(a.p,{children:"Danksharding will allow for much more space to be utilized per block on Ethereum, where blobs of\ndata will be verifiable for an amount of time before being pruned from the network. This approach\nwill enable data availability at layer one and further enable layer two protocols on Ethereum to\nflourish more readily."}),"\n",(0,t.jsxs)(a.p,{children:["In contrast, the relay chain requires parachains to register themselves in accordance with the\n",(0,t.jsx)(a.a,{href:"/docs/learn-parachains-protocol",children:"Parachains Protocol"}),". Once registered, the relay chain validates\nthe state transitions of each parachain as per their parachain validation function (PVF).\n",(0,t.jsx)(a.a,{href:"./learn-parachains-protocol#availability-and-unavailability-phase",children:"Data availability"})," is an\nintegral part of validating the parachain state. This approach enables parallelized interactions\nbetween parachains. They can trust that each sub-protocol's respective state is valid, as Polkadot\ncollectively validated them."]}),"\n",(0,t.jsx)(a.h3,{id:"rollups-vs-parachain-creation",children:"Rollups vs. Parachain Creation"}),"\n",(0,t.jsx)(a.p,{children:"Ethereum primarily focuses on optimizing itself for rollups; Polkadot's parachains protocol allows\nvalidation to occur on the protocol level without needing a layer two solution."}),"\n",(0,t.jsx)(a.admonition,{title:"Rollup vs. Parachain Comparison",type:"info",children:(0,t.jsxs)(a.p,{children:["For a more in-depth comparison of parachains versus rollups, take a look at the\n",(0,t.jsx)(a.a,{href:"/docs/learn-comparisons-rollups",children:"rollup comparison page"})]})}),"\n",(0,t.jsxs)(a.p,{children:["Each parachain hosts its own core logic, called a ",(0,t.jsx)(a.strong,{children:"runtime"})," (sometimes called a ",(0,t.jsx)(a.strong,{children:"state transition\nfunction"}),"). Polkadot uses WebAssembly (",(0,t.jsx)(a.a,{href:"/docs/learn-wasm",children:"Wasm"}),') as a "meta-protocol".']}),"\n",(0,t.jsxs)(a.p,{children:["Parachains have the option of using ",(0,t.jsx)(a.a,{href:"/docs/learn-xcm",children:"cross-consensus messaging (XCM)"})," to communicate\nwith one another and facilitate inter-chain reactions. It is also possible to utilize XCM on\nEthereum as it is merely a format for describing state transitions on a particular network."]}),"\n",(0,t.jsx)(a.h2,{id:"architectural-differences-polkadot-and-ethereum",children:"Architectural Differences: Polkadot and Ethereum"}),"\n",(0,t.jsxs)(a.p,{children:["As previously mentioned, Ethereum is a ",(0,t.jsx)(a.strong,{children:"general-purpose"})," virtual machine that can run sandboxed\nprograms are written in Solidity, whereas Polkadot is a meta-protocol for other parachains to\nconnect and interact with each other."]}),"\n",(0,t.jsxs)(a.p,{children:["Ethereum operates as a single, homogeneous chain. Each Ethereum node is divided into two layers: the\n",(0,t.jsx)(a.strong,{children:"consensus"})," and ",(0,t.jsx)(a.strong,{children:"execution"})," layers. Each layer handles the block validation information, peer\ndiscovery, and Proof-of-Stake of the Ethereum client."]}),"\n",(0,t.jsxs)(a.p,{children:["Polkadot's primary component is the ",(0,t.jsx)(a.strong,{children:"relay chain"}),", which hosts heterogeneous ",(0,t.jsx)(a.strong,{children:"parachains"}),". The\nrelay chain aggregates information from each parachain, where validators agree upon consensus and\nfinality. One can see Polkadot as a series of ",(0,t.jsx)(a.strong,{children:"runtimes"}),", which are state transition functions\nused to describe parachains and Polkadot itself."]}),"\n",(0,t.jsx)(a.h3,{id:"forks-upgrades-and-governance",children:"Forks, Upgrades, and Governance"}),"\n",(0,t.jsx)(a.p,{children:"Ethereum's governance is done off-chain, where various stakeholders come to a consensus through some\nmedium other than the protocol itself. Upgrades on Ethereum will follow the standard hard fork\nprocedure, coordinating the community and validators to upgrade their nodes to implement protocol\nchanges."}),"\n",(0,t.jsxs)(a.p,{children:["Polkadot uses on-chain ",(0,t.jsx)(a.a,{href:"/docs/learn-polkadot-opengov",children:"governance, called OpenGov"}),", to facilitate\nruntime upgrades. The stakeholders of Polkadot vote on these upgrades, and if successful, the\nupgrade is enacted automatically in the blocks to come. Polkadot validator operators only upgrade\ntheir nodes when the client itself gets updated."]}),"\n",(0,t.jsxs)(a.p,{children:["Because of this mechanism, the relay chain can enact upgrades using the Wasm meta-protocol ",(0,t.jsx)(a.em,{children:"without"}),"\na hard fork. As the WebAssembly runtime for Polkadot (and all of its subsequent parachains) are\nstored on-chain, this involves simply replacing the runtime with a new WebAssembly blob once\ngovernance allowed the upgrade to be enacted."]}),"\n",(0,t.jsx)(a.p,{children:"Anything within the state transition function, the transaction queue, or off-chain workers can be\nupgraded without forking the chain, as these are all part of the WebAssembly runtime."}),"\n",(0,t.jsx)(a.h3,{id:"block-production--finalization",children:"Block Production & Finalization"}),"\n",(0,t.jsxs)(a.p,{children:["Both Ethereum and Polkadot use hybrid consensus models where ",(0,t.jsx)(a.strong,{children:"block production"})," and ",(0,t.jsx)(a.strong,{children:"finality"}),"\nare decoupled."]}),"\n",(0,t.jsxs)(a.p,{children:["For finalization, Ethereum utilizes ",(0,t.jsx)(a.a,{href:"https://ethereum.org/glossary#casper-ffg",children:"Casper FFG"}),", which\nworks with ",(0,t.jsx)(a.a,{href:"https://ethereum.org/glossary#lmd-ghost",children:"LMD-GHOST"})," as the fork choice rule for\nfinalization."]}),"\n",(0,t.jsxs)(a.p,{children:["Polkadot utilizes ",(0,t.jsx)(a.a,{href:"/docs/learn-consensus#finality-gadget-grandpa",children:"GRANDPA"})," for finalization. Rather\nthan decide on a block-by-block basis, GRANDPA can finalize ",(0,t.jsx)(a.em,{children:"chains"})," of blocks. Both finalization\nmechanisms are both\n",(0,t.jsx)(a.a,{href:"https://www.geeksforgeeks.org/what-is-ghost-protocol-for-ethereum/",children:"GHOST"}),"-based and can both\nfinalize batches of blocks in one round."]}),"\n",(0,t.jsxs)(a.p,{children:["For block production, both protocols use slot-based protocols that randomly assign validators to a\nslot and provide a fork choice rule for unfinalized blocks. Polkadot uses\n",(0,t.jsx)(a.a,{href:"/docs/learn-consensus#block-production-babe",children:"BABE"})," for block production. BABE includes two\nmechanisms for selecting block producers, one of which is a fallback in case the first fails, which\nallows for chain liveness. BABE produces unfinalized blocks on top of the chain already finalized by\nGRANDPA."]}),"\n",(0,t.jsx)(a.p,{children:"There are two main differences between Ethereum and Polkadot consensus:"}),"\n",(0,t.jsxs)(a.ol,{children:["\n",(0,t.jsxs)(a.li,{children:["\n",(0,t.jsxs)(a.p,{children:["Polkadot finality protocol, GRANDPA, finalizes batches of blocks based on\n",(0,t.jsx)(a.a,{href:"/docs/learn-parachains-protocol#availability-and-unavailability-phase",children:"availability and validity checks"}),"\nthat happen as the proposed chain grows. The time to finality varies with the number of checks\nthat need to be performed (and invalidity reports, which cause extra checks). The expected time\nto finality is 30 seconds."]}),"\n"]}),"\n",(0,t.jsxs)(a.li,{children:["\n",(0,t.jsxs)(a.p,{children:["Ethereum typically has many validators per round (called an\n",(0,t.jsx)(a.a,{href:"https://ethereum.org/en/glossary/#epoch",children:"epoch"})," on Ethereum) to provide strong validity\nguarantees while Polkadot can provide stronger guarantees with fewer validators per round.\nPolkadot achieves this by making validators distribute an\n",(0,t.jsx)(a.a,{href:"/docs/learn-parachains-protocol#erasure-codes",children:"erasure coding"})," to all validators in the system,\nsuch that anyone - not only the round's validators - can reconstruct a parachain's block and\ntest its validity. This data availability is a core part of Polkadot - ensuring state is valid\nfor its state transitions. The random parachain-validator assignments and secondary checks are\nperformed by randomly selected validators, making it less likely for the small set of validators\non each parachain to collude."]}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(a.h3,{id:"staking-mechanics-ethereum-pos-vs-polkadot-npos",children:"Staking Mechanics: Ethereum PoS vs. Polkadot NPoS"}),"\n",(0,t.jsxs)(a.p,{children:["Polkadot uses ",(0,t.jsx)(a.a,{href:"/docs/learn-phragmen",children:"Nominated Proof of Stake (NPoS)"})," to select validators from a\nsmaller set, letting smaller holders nominate validators to run the network while claiming the\nsystem's rewards without running a node. Polkadot needs about five validators for each parachain in\nthe network. For more information, see the ",(0,t.jsx)(a.a,{href:"/docs/learn-staking",children:"staking page"}),"."]}),"\n",(0,t.jsx)(a.p,{children:'Ethereum is a Proof of Stake (PoS) network that requires 32 ETH to stake for each validator\ninstance. Validators run a primary Beacon Chain node and multiple validator clients - one for each\n32 ETH. These validators get assigned to "committees," randomly selected groups to validate blocks\nin the network.'}),"\n",(0,t.jsx)(a.h3,{id:"interoperability-and-message-passing",children:"Interoperability and Message Passing"}),"\n",(0,t.jsxs)(a.p,{children:["Polkadot uses ",(0,t.jsx)(a.a,{href:"/docs/learn-xcm",children:"Cross-Consensus Messaging (XCM)"})," for parachains to send arbitrary\nmessages to each other. Parachains open connections with each other and can send messages via their\nestablished channels. Given that ",(0,t.jsx)(a.a,{href:"/docs/learn-collator",children:"collators"})," communicate directly to the relay\nchain, they will be connected and can relay messages from parachain A to parachain B if needed\nthrough these message passing channels (see:\n",(0,t.jsx)(a.a,{href:"/docs/learn-xcm-transport",children:"HRMP, VMP, and other message passing mechanisms for XCM"}),")."]}),"\n",(0,t.jsx)(a.p,{children:"Messages do not pass through the relay chain. Only validity proofs and channel operations do (open,\nclose, etc.). This enhances scalability by keeping data on the edges of the system."}),"\n",(0,t.jsxs)(a.p,{children:["Currently, Ethereum rollups can communicate using\n",(0,t.jsx)(a.a,{href:"https://medium.com/@richardchen_81235/intro-to-shared-sequencing-1622d1fd51c9",children:"shared sequencers"}),",\nwhich provides a common ground of interoperability between layer two solutions."]}),"\n",(0,t.jsxs)(a.p,{children:["Polkadot plans to have the concept of\n",(0,t.jsx)(a.a,{href:"/docs/polkadot-direction#xcm-and-accords",children:(0,t.jsx)(a.strong,{children:"Accords"})})," are opt-in treaties for different\nprotocols to partake in. Accords ensure that logic about interoperability is kept consistent and\ncannot be changed and undermined by participating protocols. This helps ensure that any XCM message\ncan be properly interpreted and executed as needed on the target protocol in a fully trustless\nenvironment."]}),"\n",(0,t.jsxs)(a.p,{children:[(0,t.jsx)(a.a,{href:"/docs/learn-spree",children:"SPREE (Shared Protected Runtime Execution Enclaves)"})," is the mechanism that\nprovides shared logic for cross-consensus messages, and will be used to construct Accords."]}),"\n",(0,t.jsx)(a.h2,{id:"dapp-support-and-development",children:"DApp Support and Development"}),"\n",(0,t.jsx)(a.p,{children:"Ethereum supports smart contract development using Solidity. These contracts are immutable, and\ncannot be changed once published on-chain."}),"\n",(0,t.jsxs)(a.p,{children:["Polkadot supports smart contracts through parachains, usually using the\n",(0,t.jsx)(a.a,{href:"https://use.ink/",children:"ink! smart contract language"}),", but also Solidity through Frontier-enabled\nparachains. On Ethereum, smart contracts can call each other; however, they are fixed on-chain to\nthe domain of Ethereum. On Polkadot, smart contracts can call each other in the same parachain ",(0,t.jsx)(a.em,{children:"and"}),"\nacross parachains."]}),"\n",(0,t.jsx)(a.p,{children:"On Polkadot, developers have the option of either using smart contracts, calling extrinsics from\npallets that modify the chain's state in some particular way or merely use Polkadot's RPC to\ndirectly retrieve and act on-chain information. DApps on Polkadot are often composed of these\nmultiple components working together to modify, retrieve, and watch state changes live as they\nhappen."}),"\n",(0,t.jsxs)(a.p,{children:["For a more comprehensive list of how to build on Polkadot, be sure to check the\n",(0,t.jsx)(a.a,{href:"/docs/build-guide",children:"Build Section"}),"."]}),"\n",(0,t.jsx)(a.h2,{id:"conclusion",children:"Conclusion"}),"\n",(0,t.jsx)(a.p,{children:'Ethereum and Polkadot both use a sharded model. Danksharding plans to utilize a rollup-centric\napproach by focusing on data availability. The Polkadot ecosystem is secured by a main chain, called\nthe "relay chain," which in turn manages cores and allows tasks, such as parachains, to be run on\ntop of those cores and messages to be sent between them.'}),"\n",(0,t.jsx)(a.p,{children:"The primary differences between the two protocols are:"}),"\n",(0,t.jsxs)(a.ul,{children:["\n",(0,t.jsx)(a.li,{children:"Ethereum processes EVM-compatible state transitions, whether through rollups or on the mainnet\nitself, while Polkadot allows its parachains to have an abstract state transition function\nimplementation."}),"\n",(0,t.jsx)(a.li,{children:"Governance processes in Ethereum are planned to be off-chain and thus require coordination for a\nhard fork to enact governance decisions. In contrast, in Polkadot the decisions are on-chain and\nenacted autonomously via forkless upgrades."}),"\n",(0,t.jsx)(a.li,{children:"Validator selection mechanisms differ as Polkadot can provide strong availability and validity\nguarantees with fewer validators per protocol."}),"\n"]})]})}function d(e={}){const{wrapper:a}={...(0,s.R)(),...e.components};return a?(0,t.jsx)(a,{...e,children:(0,t.jsx)(h,{...e})}):h(e)}},28453:(e,a,n)=>{n.d(a,{R:()=>r,x:()=>i});var o=n(96540);const t={},s=o.createContext(t);function r(e){const a=o.useContext(s);return o.useMemo((function(){return"function"==typeof e?e(a):{...a,...e}}),[a,e])}function i(e){let a;return a=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:r(e.components),o.createElement(s.Provider,{value:a},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/9e6341e5.1e1f0839.js b/assets/js/9e6341e5.1e1f0839.js new file mode 100644 index 000000000000..e61ede970700 --- /dev/null +++ b/assets/js/9e6341e5.1e1f0839.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8431],{82057:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>d,contentTitle:()=>o,default:()=>l,frontMatter:()=>a,metadata:()=>n,toc:()=>h});const n=JSON.parse('{"id":"learn/xcm/journey/transfers/learn-xcm-docs-transfers-reserve","title":"Reserve-backed Transfers","description":"Reserve-backed Transfers: Third-party Reserve to store Assets.","source":"@site/../docs/learn/xcm/journey/transfers/reserve.md","sourceDirName":"learn/xcm/journey/transfers","slug":"/learn/xcm/journey/transfers-reserve","permalink":"/docs/learn/xcm/journey/transfers-reserve","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/xcm/journey/transfers/reserve.md","tags":[],"version":"current","lastUpdatedBy":"bader y","lastUpdatedAt":1694099593000,"frontMatter":{"id":"learn-xcm-docs-transfers-reserve","title":"Reserve-backed Transfers","sidebar_label":"Reserve-backed Transfers","description":"Reserve-backed Transfers: Third-party Reserve to store Assets.","keywords":["xcm","cross-consensus messaging","transfers","reserve"],"slug":"../transfers-reserve"},"sidebar":"docs","previous":{"title":"Asset Teleportation","permalink":"/docs/learn/xcm/journey/transfers-teleport"},"next":{"title":"Fee Handling","permalink":"/docs/learn/xcm/journey-fees"}}');var r=t(74848),i=t(28453);const a={id:"learn-xcm-docs-transfers-reserve",title:"Reserve-backed Transfers",sidebar_label:"Reserve-backed Transfers",description:"Reserve-backed Transfers: Third-party Reserve to store Assets.",keywords:["xcm","cross-consensus messaging","transfers","reserve"],slug:"../transfers-reserve"},o="Reserve-backed transfers",d={},h=[{value:"Process",id:"process",level:2},{value:"1. InitiateReserveWithdraw",id:"1-initiatereservewithdraw",level:3},{value:"2. WithdrawAsset",id:"2-withdrawasset",level:3},{value:"3. DepositReserveAsset",id:"3-depositreserveasset",level:3},{value:"4. ReserveAssetDeposited",id:"4-reserveassetdeposited",level:3},{value:"5. DepositAsset",id:"5-depositasset",level:3},{value:"Thoughts",id:"thoughts",level:3},{value:"A note on trust",id:"a-note-on-trust",level:3},{value:"Example",id:"example",level:2},{value:"InitiateReserveWithdraw",id:"initiatereservewithdraw",level:3},{value:"DepositReserveAsset",id:"depositreserveasset",level:3},{value:"ReserveAssetDeposited",id:"reserveassetdeposited",level:3},{value:"Another example",id:"another-example",level:2},{value:"Another note on trust",id:"another-note-on-trust",level:3},{value:"Next steps",id:"next-steps",level:2}];function c(e){const s={a:"a",code:"code",em:"em",h1:"h1",h2:"h2",h3:"h3",header:"header",img:"img",li:"li",ol:"ol",p:"p",pre:"pre",ul:"ul",...(0,i.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.header,{children:(0,r.jsx)(s.h1,{id:"reserve-backed-transfers",children:"Reserve-backed transfers"})}),"\n",(0,r.jsx)(s.p,{children:"For consensus systems that don't have the level of trust required for asset teleportation, they can\ninstead opt for trusting a third party called a reserve to store the real assets (think Statemine on\nKusama, or Statemint on Polkadot). The source and the destination need a way to keep track of the\nreal assets they own on the reserve, this is usually done by minting a new derivative token. Both\nsource and destination now need accounts on the reserve to hold their assets, we call these their\nsovereign accounts on that system."}),"\n",(0,r.jsx)(s.h2,{id:"process",children:"Process"}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.img,{alt:"Reserve Backed Transfer diagram",src:t(29660).A+"",width:"863",height:"651"})}),"\n",(0,r.jsx)(s.p,{children:"The flow in this diagram is further explained below:"}),"\n",(0,r.jsx)(s.h3,{id:"1-initiatereservewithdraw",children:"1. InitiateReserveWithdraw"}),"\n",(0,r.jsx)(s.p,{children:"The source gathers the derivative assets to be transferred from the sending account and burns them,\ntaking note of the amount of derivatives that were burned."}),"\n",(0,r.jsx)(s.h3,{id:"2-withdrawasset",children:"2. WithdrawAsset"}),"\n",(0,r.jsxs)(s.p,{children:["The source sends a ",(0,r.jsx)(s.code,{children:"WithdrawAsset"})," instruction to the reserve, instructing it to withdraw real\nassets equivalent to the amount of derivatives burned from the source chain."]}),"\n",(0,r.jsx)(s.h3,{id:"3-depositreserveasset",children:"3. DepositReserveAsset"}),"\n",(0,r.jsx)(s.p,{children:"The reserve deposits the assets withdrawn from the previous step to the destination's sovereign\naccount, taking note of the amount of assets deposited."}),"\n",(0,r.jsx)(s.h3,{id:"4-reserveassetdeposited",children:"4. ReserveAssetDeposited"}),"\n",(0,r.jsxs)(s.p,{children:["The reserve creates a ",(0,r.jsx)(s.code,{children:"ReserveAssetDeposited"})," instruction with the amount of assets deposited to the\ndestination's sovereign account, and sends this instruction onwards to the destination. The\ndestination receives the instruction and processes it, minting the correct amount of derivative\nassets."]}),"\n",(0,r.jsx)(s.h3,{id:"5-depositasset",children:"5. DepositAsset"}),"\n",(0,r.jsx)(s.p,{children:"The destination deposits the derivative assets minted to the receiving account."}),"\n",(0,r.jsx)(s.h3,{id:"thoughts",children:"Thoughts"}),"\n",(0,r.jsx)(s.p,{children:"The addition of a third consensus system is already a hint of the disadvantages of a reserve asset\ntransfer model. Firstly, the reserve could easily become a point of centralization when too many\nconsensus systems rely on it to be the reserve of choice for their assets. Secondly, the sheer\namount of steps required necessarily makes it more prone to errors, and as such, implementors will\nhave to consider more possible pitfalls and provide technical support accordingly when an end user\nencounters issues arising from these steps. Last, but not least, either the source or destination\ncan opt to designate multiple consensus systems to be their reserves. In such a situation, care must\nbe taken in order to ensure that the sovereign accounts on the reserves are balanced, so that one\ndoesn't get drained while the others still contain a healthy balance."}),"\n",(0,r.jsx)(s.h3,{id:"a-note-on-trust",children:"A note on trust"}),"\n",(0,r.jsx)(s.p,{children:"We mentioned that reserve-backed transfers require the sender and the destination to trust a third\nparty, the reserve, and not each other. This is true, but it doesn't mean the sender and destination\nhave to trust ONLY the reserve, they also have to trust the issuer of the token. Whenever you are\ndealing with a particular asset, you are always trusting the issuer of said asset, because at any\npoint they could mint a huge amount of that asset, wreaking havoc. You have to make sure you trust\nthe asset, based on the security mechanisms used to protect its issuance. For this reason, reserves\nwork best when they are the issuers of the asset being transacted. In that scenario, you only have\nto trust the reserve, period."}),"\n",(0,r.jsx)(s.h2,{id:"example",children:"Example"}),"\n",(0,r.jsx)(s.p,{children:"We'll create a program for the scenario in the diagram. Let's assume that the reserve is a relay\nchain and both source and destination are parachains 1 and 2 respectively. Let's also say that an\naccount ALICE in parachain 1 wants to transfer the relay chain's native token to their other account\n(also ALICE) on parachain 2. The program might look like this:"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-rust",children:"let message = Xcm(vec![\n WithdrawAsset((Parent, amount).into()),\n InitiateReserveWithdraw {\n assets: All.into(),\n reserve: Parent.into(),\n xcm: Xcm(vec![DepositReserveAsset {\n assets: All.into(),\n dest: Parachain(2).into(),\n xcm: Xcm(vec![DepositAsset {\n assets: All.into(),\n beneficiary: AccountId32 { id: ALICE.into(), network: None }.into(),\n }]),\n }]),\n },\n]);\n"})}),"\n",(0,r.jsxs)(s.p,{children:["This program should be executed on the source, so on parachain 1. We start, as usual, with a\n",(0,r.jsx)(s.code,{children:"WithdrawAsset"})," instruction. The ",(0,r.jsx)(s.code,{children:"MultiAsset"})," here references the relay chain's native token, which\nmeans we'll be gathering the derivative on this chain."]}),"\n",(0,r.jsx)(s.h3,{id:"initiatereservewithdraw",children:"InitiateReserveWithdraw"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-rust",children:"InitiateReserveWithdraw { assets: MultiAssetFilter, reserve: MultiLocation, xcm: Xcm<()> }\n"})}),"\n",(0,r.jsxs)(s.p,{children:["The ",(0,r.jsx)(s.code,{children:"InitiateReserveWithdraw"})," instruction takes the derivative token from the holding register and\nburns it. Then it sends a new XCM to the specified ",(0,r.jsx)(s.code,{children:"reserve"}),", in this example, the relay chain. This\nnew XCM contains the following instructions, in order:"]}),"\n",(0,r.jsxs)(s.ol,{children:["\n",(0,r.jsx)(s.li,{children:"WithdrawAsset"}),"\n",(0,r.jsx)(s.li,{children:"ClearOrigin"}),"\n",(0,r.jsxs)(s.li,{children:["All instructions specified in the ",(0,r.jsx)(s.code,{children:"xcm"})," operand, in this case ",(0,r.jsx)(s.code,{children:"DepositReserveAsset"})]}),"\n"]}),"\n",(0,r.jsxs)(s.p,{children:["As was the case with ",(0,r.jsx)(s.a,{href:"/docs/learn/xcm/journey/transfers-teleport",children:"teleports"}),", instructions 1. and 2. are added automatically by\nthe executor when using ",(0,r.jsx)(s.code,{children:"InitiateReserveWithdraw"}),"."]}),"\n",(0,r.jsx)(s.p,{children:"Upon receiving this XCM, the reserve will withdraw the asset from parachain 1's sovereign account\n(where the real asset is stored), and deposit it on parachain 2's sovereign account."}),"\n",(0,r.jsx)(s.h3,{id:"depositreserveasset",children:"DepositReserveAsset"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-rust",children:"DepositReserveAsset { assets: MultiAssetFilter, dest: MultiLocation, xcm: Xcm<()> }\n"})}),"\n",(0,r.jsxs)(s.p,{children:["This instruction is used in this example instead of ",(0,r.jsx)(s.code,{children:"DepositAsset"}),", because as well as depositing\nthe assets to parachain 2's sovereign account, this instruction will send another XCM to\nparachain 2. This new XCM has the following instructions:"]}),"\n",(0,r.jsxs)(s.ol,{children:["\n",(0,r.jsx)(s.li,{children:"ReserveAssetDeposited"}),"\n",(0,r.jsx)(s.li,{children:"ClearOrigin"}),"\n",(0,r.jsxs)(s.li,{children:["All instructions specified in the ",(0,r.jsx)(s.code,{children:"xcm"})," operand, in this case, only ",(0,r.jsx)(s.code,{children:"DepositAsset"})]}),"\n"]}),"\n",(0,r.jsx)(s.h3,{id:"reserveassetdeposited",children:"ReserveAssetDeposited"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-rust",children:"ReserveAssetDeposited(MultiAssets)\n"})}),"\n",(0,r.jsxs)(s.p,{children:["Parachain 2 receives the XCM, mints new derivative tokens and deposit them locally to the\nbeneficiary account. ",(0,r.jsx)(s.code,{children:"ReserveAssetDeposited"})," is a ",(0,r.jsx)(s.em,{children:"trusted indication"}),". As is the case with\nteleporting, you need to trust the reserve to have actually put the specified amount of assets in\nthe sovereign account of this system. You can specify which systems you trust as reserves for which\nassets by configuring the ",(0,r.jsx)(s.a,{href:"/docs/learn/xcm/config-deep-dive",children:"IsReserve"})," type in the executor. In our\nexample, both parachains trust the relay chain as a reserve for its own native token."]}),"\n",(0,r.jsx)(s.h2,{id:"another-example",children:"Another example"}),"\n",(0,r.jsx)(s.p,{children:"We now know this type of transfers requires 3 actors: the source, the reserve, and the destination.\nHowever, the source and reserve don't have to be different systems, they could be one and the same,\nas in the following diagram."}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.img,{alt:"Source is reserve",src:t(91946).A+"",width:"805",height:"271"})}),"\n",(0,r.jsx)(s.p,{children:"In this case the message is the following:"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-rust",children:"let message = Xcm(vec![\n WithdrawAsset((Parent, amount).into()),\n DepositReserveAsset {\n assets: All.into(),\n dest: Parachain(2).into(),\n xcm: Xcm(vec![DepositAsset {\n assets: All.into(),\n beneficiary: AccountId32 { id: ALICE.into(), network: None }.into(),\n }]),\n },\n]);\n"})}),"\n",(0,r.jsx)(s.p,{children:"This simplifies the reserve-backed transfer. However, the destination still needs to:"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsx)(s.li,{children:"Recognize the source as the proper reserve for the tokens that are being sent over and"}),"\n",(0,r.jsx)(s.li,{children:"Support minting derivatives of the tokens being sent over"}),"\n"]}),"\n",(0,r.jsxs)(s.p,{children:["It's also possible to skip the ",(0,r.jsx)(s.code,{children:"WithdrawAsset"})," instruction. The ",(0,r.jsx)(s.code,{children:"TransferReserveAsset"})," instruction\nhandles the withdrawal already. It can be called like so:"]}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-rust",children:"let message = Xcm(vec![\n TransferReserveAsset {\n assets: (Parent, amount).into(),\n dest: Parachain(2).into(),\n xcm: Xcm(vec![DepositAsset {\n assets: All.into(),\n beneficiary: AccountId32 { id: ALICE.into(), network: None }.into(),\n }]),\n },\n]);\n"})}),"\n",(0,r.jsx)(s.h3,{id:"another-note-on-trust",children:"Another note on trust"}),"\n",(0,r.jsx)(s.p,{children:"In this model, where the sender is the reserve, the destination is trusting the sender entirely.\nIt's the sender the one who doesn't need to trust the destination, since it'll ever only be minting\nderivatives anyway, the sender/reserve controls the real assets and issuance."}),"\n",(0,r.jsx)(s.h2,{id:"next-steps",children:"Next steps"}),"\n",(0,r.jsxs)(s.p,{children:["Next, we'll talk about a very important topic we mentioned before but skipped in this chapter,\n",(0,r.jsx)(s.a,{href:"../fees/index.html",children:"paying fees"})," for the effects our XCMs have."]})]})}function l(e={}){const{wrapper:s}={...(0,i.R)(),...e.components};return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(c,{...e})}):c(e)}},29660:(e,s,t)=>{t.d(s,{A:()=>n});const n=t.p+"assets/images/reserve_asset_transfer-14d4ab3d815e04d0a6286921abe6007c.png"},91946:(e,s,t)=>{t.d(s,{A:()=>n});const n=t.p+"assets/images/source_is_reserve-78e1a6fa98531fdfa5bcdf518c116a1b.png"},28453:(e,s,t)=>{t.d(s,{R:()=>a,x:()=>o});var n=t(96540);const r={},i=n.createContext(r);function a(e){const s=n.useContext(i);return n.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function o(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:a(e.components),n.createElement(i.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/9e6341e5.d77eba4c.js b/assets/js/9e6341e5.d77eba4c.js deleted file mode 100644 index e9cad8819c51..000000000000 --- a/assets/js/9e6341e5.d77eba4c.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8431],{62147:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>d,contentTitle:()=>a,default:()=>l,frontMatter:()=>i,metadata:()=>o,toc:()=>h});var n=t(74848),r=t(28453);const i={id:"learn-xcm-docs-transfers-reserve",title:"Reserve-backed Transfers",sidebar_label:"Reserve-backed Transfers",description:"Reserve-backed Transfers: Third-party Reserve to store Assets.",keywords:["xcm","cross-consensus messaging","transfers","reserve"],slug:"../transfers-reserve"},a="Reserve-backed transfers",o={id:"learn/xcm/journey/transfers/learn-xcm-docs-transfers-reserve",title:"Reserve-backed Transfers",description:"Reserve-backed Transfers: Third-party Reserve to store Assets.",source:"@site/../docs/learn/xcm/journey/transfers/reserve.md",sourceDirName:"learn/xcm/journey/transfers",slug:"/learn/xcm/journey/transfers-reserve",permalink:"/docs/learn/xcm/journey/transfers-reserve",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/xcm/journey/transfers/reserve.md",tags:[],version:"current",lastUpdatedBy:"bader y",lastUpdatedAt:1694099593e3,frontMatter:{id:"learn-xcm-docs-transfers-reserve",title:"Reserve-backed Transfers",sidebar_label:"Reserve-backed Transfers",description:"Reserve-backed Transfers: Third-party Reserve to store Assets.",keywords:["xcm","cross-consensus messaging","transfers","reserve"],slug:"../transfers-reserve"},sidebar:"docs",previous:{title:"Asset Teleportation",permalink:"/docs/learn/xcm/journey/transfers-teleport"},next:{title:"Fee Handling",permalink:"/docs/learn/xcm/journey-fees"}},d={},h=[{value:"Process",id:"process",level:2},{value:"1. InitiateReserveWithdraw",id:"1-initiatereservewithdraw",level:3},{value:"2. WithdrawAsset",id:"2-withdrawasset",level:3},{value:"3. DepositReserveAsset",id:"3-depositreserveasset",level:3},{value:"4. ReserveAssetDeposited",id:"4-reserveassetdeposited",level:3},{value:"5. DepositAsset",id:"5-depositasset",level:3},{value:"Thoughts",id:"thoughts",level:3},{value:"A note on trust",id:"a-note-on-trust",level:3},{value:"Example",id:"example",level:2},{value:"InitiateReserveWithdraw",id:"initiatereservewithdraw",level:3},{value:"DepositReserveAsset",id:"depositreserveasset",level:3},{value:"ReserveAssetDeposited",id:"reserveassetdeposited",level:3},{value:"Another example",id:"another-example",level:2},{value:"Another note on trust",id:"another-note-on-trust",level:3},{value:"Next steps",id:"next-steps",level:2}];function c(e){const s={a:"a",code:"code",em:"em",h1:"h1",h2:"h2",h3:"h3",header:"header",img:"img",li:"li",ol:"ol",p:"p",pre:"pre",ul:"ul",...(0,r.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.header,{children:(0,n.jsx)(s.h1,{id:"reserve-backed-transfers",children:"Reserve-backed transfers"})}),"\n",(0,n.jsx)(s.p,{children:"For consensus systems that don't have the level of trust required for asset teleportation, they can\ninstead opt for trusting a third party called a reserve to store the real assets (think Statemine on\nKusama, or Statemint on Polkadot). The source and the destination need a way to keep track of the\nreal assets they own on the reserve, this is usually done by minting a new derivative token. Both\nsource and destination now need accounts on the reserve to hold their assets, we call these their\nsovereign accounts on that system."}),"\n",(0,n.jsx)(s.h2,{id:"process",children:"Process"}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.img,{alt:"Reserve Backed Transfer diagram",src:t(29660).A+"",width:"863",height:"651"})}),"\n",(0,n.jsx)(s.p,{children:"The flow in this diagram is further explained below:"}),"\n",(0,n.jsx)(s.h3,{id:"1-initiatereservewithdraw",children:"1. InitiateReserveWithdraw"}),"\n",(0,n.jsx)(s.p,{children:"The source gathers the derivative assets to be transferred from the sending account and burns them,\ntaking note of the amount of derivatives that were burned."}),"\n",(0,n.jsx)(s.h3,{id:"2-withdrawasset",children:"2. WithdrawAsset"}),"\n",(0,n.jsxs)(s.p,{children:["The source sends a ",(0,n.jsx)(s.code,{children:"WithdrawAsset"})," instruction to the reserve, instructing it to withdraw real\nassets equivalent to the amount of derivatives burned from the source chain."]}),"\n",(0,n.jsx)(s.h3,{id:"3-depositreserveasset",children:"3. DepositReserveAsset"}),"\n",(0,n.jsx)(s.p,{children:"The reserve deposits the assets withdrawn from the previous step to the destination's sovereign\naccount, taking note of the amount of assets deposited."}),"\n",(0,n.jsx)(s.h3,{id:"4-reserveassetdeposited",children:"4. ReserveAssetDeposited"}),"\n",(0,n.jsxs)(s.p,{children:["The reserve creates a ",(0,n.jsx)(s.code,{children:"ReserveAssetDeposited"})," instruction with the amount of assets deposited to the\ndestination's sovereign account, and sends this instruction onwards to the destination. The\ndestination receives the instruction and processes it, minting the correct amount of derivative\nassets."]}),"\n",(0,n.jsx)(s.h3,{id:"5-depositasset",children:"5. DepositAsset"}),"\n",(0,n.jsx)(s.p,{children:"The destination deposits the derivative assets minted to the receiving account."}),"\n",(0,n.jsx)(s.h3,{id:"thoughts",children:"Thoughts"}),"\n",(0,n.jsx)(s.p,{children:"The addition of a third consensus system is already a hint of the disadvantages of a reserve asset\ntransfer model. Firstly, the reserve could easily become a point of centralization when too many\nconsensus systems rely on it to be the reserve of choice for their assets. Secondly, the sheer\namount of steps required necessarily makes it more prone to errors, and as such, implementors will\nhave to consider more possible pitfalls and provide technical support accordingly when an end user\nencounters issues arising from these steps. Last, but not least, either the source or destination\ncan opt to designate multiple consensus systems to be their reserves. In such a situation, care must\nbe taken in order to ensure that the sovereign accounts on the reserves are balanced, so that one\ndoesn't get drained while the others still contain a healthy balance."}),"\n",(0,n.jsx)(s.h3,{id:"a-note-on-trust",children:"A note on trust"}),"\n",(0,n.jsx)(s.p,{children:"We mentioned that reserve-backed transfers require the sender and the destination to trust a third\nparty, the reserve, and not each other. This is true, but it doesn't mean the sender and destination\nhave to trust ONLY the reserve, they also have to trust the issuer of the token. Whenever you are\ndealing with a particular asset, you are always trusting the issuer of said asset, because at any\npoint they could mint a huge amount of that asset, wreaking havoc. You have to make sure you trust\nthe asset, based on the security mechanisms used to protect its issuance. For this reason, reserves\nwork best when they are the issuers of the asset being transacted. In that scenario, you only have\nto trust the reserve, period."}),"\n",(0,n.jsx)(s.h2,{id:"example",children:"Example"}),"\n",(0,n.jsx)(s.p,{children:"We'll create a program for the scenario in the diagram. Let's assume that the reserve is a relay\nchain and both source and destination are parachains 1 and 2 respectively. Let's also say that an\naccount ALICE in parachain 1 wants to transfer the relay chain's native token to their other account\n(also ALICE) on parachain 2. The program might look like this:"}),"\n",(0,n.jsx)(s.pre,{children:(0,n.jsx)(s.code,{className:"language-rust",children:"let message = Xcm(vec![\n WithdrawAsset((Parent, amount).into()),\n InitiateReserveWithdraw {\n assets: All.into(),\n reserve: Parent.into(),\n xcm: Xcm(vec![DepositReserveAsset {\n assets: All.into(),\n dest: Parachain(2).into(),\n xcm: Xcm(vec![DepositAsset {\n assets: All.into(),\n beneficiary: AccountId32 { id: ALICE.into(), network: None }.into(),\n }]),\n }]),\n },\n]);\n"})}),"\n",(0,n.jsxs)(s.p,{children:["This program should be executed on the source, so on parachain 1. We start, as usual, with a\n",(0,n.jsx)(s.code,{children:"WithdrawAsset"})," instruction. The ",(0,n.jsx)(s.code,{children:"MultiAsset"})," here references the relay chain's native token, which\nmeans we'll be gathering the derivative on this chain."]}),"\n",(0,n.jsx)(s.h3,{id:"initiatereservewithdraw",children:"InitiateReserveWithdraw"}),"\n",(0,n.jsx)(s.pre,{children:(0,n.jsx)(s.code,{className:"language-rust",children:"InitiateReserveWithdraw { assets: MultiAssetFilter, reserve: MultiLocation, xcm: Xcm<()> }\n"})}),"\n",(0,n.jsxs)(s.p,{children:["The ",(0,n.jsx)(s.code,{children:"InitiateReserveWithdraw"})," instruction takes the derivative token from the holding register and\nburns it. Then it sends a new XCM to the specified ",(0,n.jsx)(s.code,{children:"reserve"}),", in this example, the relay chain. This\nnew XCM contains the following instructions, in order:"]}),"\n",(0,n.jsxs)(s.ol,{children:["\n",(0,n.jsx)(s.li,{children:"WithdrawAsset"}),"\n",(0,n.jsx)(s.li,{children:"ClearOrigin"}),"\n",(0,n.jsxs)(s.li,{children:["All instructions specified in the ",(0,n.jsx)(s.code,{children:"xcm"})," operand, in this case ",(0,n.jsx)(s.code,{children:"DepositReserveAsset"})]}),"\n"]}),"\n",(0,n.jsxs)(s.p,{children:["As was the case with ",(0,n.jsx)(s.a,{href:"/docs/learn/xcm/journey/transfers-teleport",children:"teleports"}),", instructions 1. and 2. are added automatically by\nthe executor when using ",(0,n.jsx)(s.code,{children:"InitiateReserveWithdraw"}),"."]}),"\n",(0,n.jsx)(s.p,{children:"Upon receiving this XCM, the reserve will withdraw the asset from parachain 1's sovereign account\n(where the real asset is stored), and deposit it on parachain 2's sovereign account."}),"\n",(0,n.jsx)(s.h3,{id:"depositreserveasset",children:"DepositReserveAsset"}),"\n",(0,n.jsx)(s.pre,{children:(0,n.jsx)(s.code,{className:"language-rust",children:"DepositReserveAsset { assets: MultiAssetFilter, dest: MultiLocation, xcm: Xcm<()> }\n"})}),"\n",(0,n.jsxs)(s.p,{children:["This instruction is used in this example instead of ",(0,n.jsx)(s.code,{children:"DepositAsset"}),", because as well as depositing\nthe assets to parachain 2's sovereign account, this instruction will send another XCM to\nparachain 2. This new XCM has the following instructions:"]}),"\n",(0,n.jsxs)(s.ol,{children:["\n",(0,n.jsx)(s.li,{children:"ReserveAssetDeposited"}),"\n",(0,n.jsx)(s.li,{children:"ClearOrigin"}),"\n",(0,n.jsxs)(s.li,{children:["All instructions specified in the ",(0,n.jsx)(s.code,{children:"xcm"})," operand, in this case, only ",(0,n.jsx)(s.code,{children:"DepositAsset"})]}),"\n"]}),"\n",(0,n.jsx)(s.h3,{id:"reserveassetdeposited",children:"ReserveAssetDeposited"}),"\n",(0,n.jsx)(s.pre,{children:(0,n.jsx)(s.code,{className:"language-rust",children:"ReserveAssetDeposited(MultiAssets)\n"})}),"\n",(0,n.jsxs)(s.p,{children:["Parachain 2 receives the XCM, mints new derivative tokens and deposit them locally to the\nbeneficiary account. ",(0,n.jsx)(s.code,{children:"ReserveAssetDeposited"})," is a ",(0,n.jsx)(s.em,{children:"trusted indication"}),". As is the case with\nteleporting, you need to trust the reserve to have actually put the specified amount of assets in\nthe sovereign account of this system. You can specify which systems you trust as reserves for which\nassets by configuring the ",(0,n.jsx)(s.a,{href:"/docs/learn/xcm/config-deep-dive",children:"IsReserve"})," type in the executor. In our\nexample, both parachains trust the relay chain as a reserve for its own native token."]}),"\n",(0,n.jsx)(s.h2,{id:"another-example",children:"Another example"}),"\n",(0,n.jsx)(s.p,{children:"We now know this type of transfers requires 3 actors: the source, the reserve, and the destination.\nHowever, the source and reserve don't have to be different systems, they could be one and the same,\nas in the following diagram."}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.img,{alt:"Source is reserve",src:t(91946).A+"",width:"805",height:"271"})}),"\n",(0,n.jsx)(s.p,{children:"In this case the message is the following:"}),"\n",(0,n.jsx)(s.pre,{children:(0,n.jsx)(s.code,{className:"language-rust",children:"let message = Xcm(vec![\n WithdrawAsset((Parent, amount).into()),\n DepositReserveAsset {\n assets: All.into(),\n dest: Parachain(2).into(),\n xcm: Xcm(vec![DepositAsset {\n assets: All.into(),\n beneficiary: AccountId32 { id: ALICE.into(), network: None }.into(),\n }]),\n },\n]);\n"})}),"\n",(0,n.jsx)(s.p,{children:"This simplifies the reserve-backed transfer. However, the destination still needs to:"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsx)(s.li,{children:"Recognize the source as the proper reserve for the tokens that are being sent over and"}),"\n",(0,n.jsx)(s.li,{children:"Support minting derivatives of the tokens being sent over"}),"\n"]}),"\n",(0,n.jsxs)(s.p,{children:["It's also possible to skip the ",(0,n.jsx)(s.code,{children:"WithdrawAsset"})," instruction. The ",(0,n.jsx)(s.code,{children:"TransferReserveAsset"})," instruction\nhandles the withdrawal already. It can be called like so:"]}),"\n",(0,n.jsx)(s.pre,{children:(0,n.jsx)(s.code,{className:"language-rust",children:"let message = Xcm(vec![\n TransferReserveAsset {\n assets: (Parent, amount).into(),\n dest: Parachain(2).into(),\n xcm: Xcm(vec![DepositAsset {\n assets: All.into(),\n beneficiary: AccountId32 { id: ALICE.into(), network: None }.into(),\n }]),\n },\n]);\n"})}),"\n",(0,n.jsx)(s.h3,{id:"another-note-on-trust",children:"Another note on trust"}),"\n",(0,n.jsx)(s.p,{children:"In this model, where the sender is the reserve, the destination is trusting the sender entirely.\nIt's the sender the one who doesn't need to trust the destination, since it'll ever only be minting\nderivatives anyway, the sender/reserve controls the real assets and issuance."}),"\n",(0,n.jsx)(s.h2,{id:"next-steps",children:"Next steps"}),"\n",(0,n.jsxs)(s.p,{children:["Next, we'll talk about a very important topic we mentioned before but skipped in this chapter,\n",(0,n.jsx)(s.a,{href:"../fees/index.html",children:"paying fees"})," for the effects our XCMs have."]})]})}function l(e={}){const{wrapper:s}={...(0,r.R)(),...e.components};return s?(0,n.jsx)(s,{...e,children:(0,n.jsx)(c,{...e})}):c(e)}},29660:(e,s,t)=>{t.d(s,{A:()=>n});const n=t.p+"assets/images/reserve_asset_transfer-14d4ab3d815e04d0a6286921abe6007c.png"},91946:(e,s,t)=>{t.d(s,{A:()=>n});const n=t.p+"assets/images/source_is_reserve-78e1a6fa98531fdfa5bcdf518c116a1b.png"},28453:(e,s,t)=>{t.d(s,{R:()=>a,x:()=>o});var n=t(96540);const r={},i=n.createContext(r);function a(e){const s=n.useContext(i);return n.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function o(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:a(e.components),n.createElement(i.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/9e76b49d.66ba0195.js b/assets/js/9e76b49d.66ba0195.js new file mode 100644 index 000000000000..bbd3fb92a23f --- /dev/null +++ b/assets/js/9e76b49d.66ba0195.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6775],{1399:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>c,contentTitle:()=>a,default:()=>u,frontMatter:()=>r,metadata:()=>n,toc:()=>l});const n=JSON.parse('{"id":"learn/xcm/learn-xcm-docs-testing","title":"Testing","description":"Testing XCM-powered Solutions.","source":"@site/../docs/learn/xcm/testing.md","sourceDirName":"learn/xcm","slug":"/learn/xcm/testing","permalink":"/docs/learn/xcm/testing","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/xcm/testing.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1714735401000,"frontMatter":{"id":"learn-xcm-docs-testing","title":"Testing","sidebar_label":"Testing","description":"Testing XCM-powered Solutions.","keywords":["xcm","cross-consensus messaging","config"],"slug":"./testing"},"sidebar":"docs","previous":{"title":"Executor Configuration","permalink":"/docs/learn/xcm/config-deep-dive"},"next":{"title":"References","permalink":"/docs/learn/xcm/references"}}');var i=s(74848),o=s(28453);const r={id:"learn-xcm-docs-testing",title:"Testing",sidebar_label:"Testing",description:"Testing XCM-powered Solutions.",keywords:["xcm","cross-consensus messaging","config"],slug:"./testing"},a="Testing",c={},l=[{value:"XCM Simulator",id:"xcm-simulator",level:2},{value:"XCM Emulator",id:"xcm-emulator",level:2},{value:"End-to-End testing",id:"end-to-end-testing",level:2}];function d(e){const t={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",ul:"ul",...(0,o.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.header,{children:(0,i.jsx)(t.h1,{id:"testing",children:"Testing"})}),"\n",(0,i.jsx)(t.p,{children:"Before deploying your XCM-powered solution to production, it's paramount to test it thoroughly.\nThere are different levels for testing, which should be tackled sequentially:"}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsx)(t.li,{children:"Message: Making sure your message works properly, according to the XCVM spec."}),"\n",(0,i.jsx)(t.li,{children:"Configuration: Making sure your executor's configuration is as expected."}),"\n",(0,i.jsx)(t.li,{children:"End-to-end: Making sure the whole flow works, in an environment as similar to production as\npossible."}),"\n"]}),"\n",(0,i.jsx)(t.p,{children:"We'll discuss tools and best practices for each of these levels."}),"\n",(0,i.jsx)(t.h2,{id:"xcm-simulator",children:"XCM Simulator"}),"\n",(0,i.jsxs)(t.p,{children:["The\n",(0,i.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/polkadot/xcm/xcm-simulator",children:"xcm-simulator"}),"\nis a tool to quickly test the execution of various XCM instructions against the ",(0,i.jsx)(t.code,{children:"xcm-executor"}),". The\nexamples in this documentation use the xcm-simulator. The simulator mocks the Downward Message\nPassing pallet, enabling us to get the XCMs that a parachain receives from the relay chain using the\n",(0,i.jsx)(t.code,{children:"received_dmp"})," getter. The simulator should be used as a XCM playground. For testing the XCM\nconfiguration of your parachain and the integration with other chains, you can use the xcm-emulator."]}),"\n",(0,i.jsx)(t.h2,{id:"xcm-emulator",children:"XCM Emulator"}),"\n",(0,i.jsxs)(t.p,{children:["The ",(0,i.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/cumulus/xcm/xcm-emulator",children:"xcm-emulator"}),"\nis a tool to emulate XCM program execution using pre-configured runtimes, including those used to\nrun on live networks, such as Kusama, Polkadot, Statemine, etc. This allows for testing cross-chain\nmessage passing and verifying outcomes, weights, and side-effects."]}),"\n",(0,i.jsxs)(t.p,{children:["An example of how the emulator is used for testing common good parachains can be found\n",(0,i.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/cumulus/parachains/integration-tests/emulated",children:"here"}),"."]}),"\n",(0,i.jsx)(t.p,{children:"The xcm-emulator uses the transport layer pallets. However, the messages do not utilize the same\nmessaging infrastructure as live networks, as the transport mechanism is being mocked out. Also,\nconsensus related events are not tested, like disputes and staking. To test for these events,\nparachains can use E2E tests."}),"\n",(0,i.jsx)(t.h2,{id:"end-to-end-testing",children:"End-to-End testing"}),"\n",(0,i.jsx)(t.p,{children:"There are two frameworks being used in the ecosystem to do e2e testing:"}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://github.com/paritytech/zombienet",children:"Zombienet"}),"."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://github.com/AcalaNetwork/chopsticks",children:"Chopsticks"}),"."]}),"\n"]})]})}function u(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}},28453:(e,t,s)=>{s.d(t,{R:()=>r,x:()=>a});var n=s(96540);const i={},o=n.createContext(i);function r(e){const t=n.useContext(o);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),n.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/9e76b49d.7154d2da.js b/assets/js/9e76b49d.7154d2da.js deleted file mode 100644 index 85c1ac5d5ec9..000000000000 --- a/assets/js/9e76b49d.7154d2da.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6775],{29967:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>c,contentTitle:()=>r,default:()=>u,frontMatter:()=>o,metadata:()=>a,toc:()=>l});var n=s(74848),i=s(28453);const o={id:"learn-xcm-docs-testing",title:"Testing",sidebar_label:"Testing",description:"Testing XCM-powered Solutions.",keywords:["xcm","cross-consensus messaging","config"],slug:"./testing"},r="Testing",a={id:"learn/xcm/learn-xcm-docs-testing",title:"Testing",description:"Testing XCM-powered Solutions.",source:"@site/../docs/learn/xcm/testing.md",sourceDirName:"learn/xcm",slug:"/learn/xcm/testing",permalink:"/docs/learn/xcm/testing",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/xcm/testing.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1714735401e3,frontMatter:{id:"learn-xcm-docs-testing",title:"Testing",sidebar_label:"Testing",description:"Testing XCM-powered Solutions.",keywords:["xcm","cross-consensus messaging","config"],slug:"./testing"},sidebar:"docs",previous:{title:"Executor Configuration",permalink:"/docs/learn/xcm/config-deep-dive"},next:{title:"References",permalink:"/docs/learn/xcm/references"}},c={},l=[{value:"XCM Simulator",id:"xcm-simulator",level:2},{value:"XCM Emulator",id:"xcm-emulator",level:2},{value:"End-to-End testing",id:"end-to-end-testing",level:2}];function d(e){const t={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",ul:"ul",...(0,i.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.header,{children:(0,n.jsx)(t.h1,{id:"testing",children:"Testing"})}),"\n",(0,n.jsx)(t.p,{children:"Before deploying your XCM-powered solution to production, it's paramount to test it thoroughly.\nThere are different levels for testing, which should be tackled sequentially:"}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsx)(t.li,{children:"Message: Making sure your message works properly, according to the XCVM spec."}),"\n",(0,n.jsx)(t.li,{children:"Configuration: Making sure your executor's configuration is as expected."}),"\n",(0,n.jsx)(t.li,{children:"End-to-end: Making sure the whole flow works, in an environment as similar to production as\npossible."}),"\n"]}),"\n",(0,n.jsx)(t.p,{children:"We'll discuss tools and best practices for each of these levels."}),"\n",(0,n.jsx)(t.h2,{id:"xcm-simulator",children:"XCM Simulator"}),"\n",(0,n.jsxs)(t.p,{children:["The\n",(0,n.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/polkadot/xcm/xcm-simulator",children:"xcm-simulator"}),"\nis a tool to quickly test the execution of various XCM instructions against the ",(0,n.jsx)(t.code,{children:"xcm-executor"}),". The\nexamples in this documentation use the xcm-simulator. The simulator mocks the Downward Message\nPassing pallet, enabling us to get the XCMs that a parachain receives from the relay chain using the\n",(0,n.jsx)(t.code,{children:"received_dmp"})," getter. The simulator should be used as a XCM playground. For testing the XCM\nconfiguration of your parachain and the integration with other chains, you can use the xcm-emulator."]}),"\n",(0,n.jsx)(t.h2,{id:"xcm-emulator",children:"XCM Emulator"}),"\n",(0,n.jsxs)(t.p,{children:["The ",(0,n.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/cumulus/xcm/xcm-emulator",children:"xcm-emulator"}),"\nis a tool to emulate XCM program execution using pre-configured runtimes, including those used to\nrun on live networks, such as Kusama, Polkadot, Statemine, etc. This allows for testing cross-chain\nmessage passing and verifying outcomes, weights, and side-effects."]}),"\n",(0,n.jsxs)(t.p,{children:["An example of how the emulator is used for testing common good parachains can be found\n",(0,n.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/cumulus/parachains/integration-tests/emulated",children:"here"}),"."]}),"\n",(0,n.jsx)(t.p,{children:"The xcm-emulator uses the transport layer pallets. However, the messages do not utilize the same\nmessaging infrastructure as live networks, as the transport mechanism is being mocked out. Also,\nconsensus related events are not tested, like disputes and staking. To test for these events,\nparachains can use E2E tests."}),"\n",(0,n.jsx)(t.h2,{id:"end-to-end-testing",children:"End-to-End testing"}),"\n",(0,n.jsx)(t.p,{children:"There are two frameworks being used in the ecosystem to do e2e testing:"}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://github.com/paritytech/zombienet",children:"Zombienet"}),"."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://github.com/AcalaNetwork/chopsticks",children:"Chopsticks"}),"."]}),"\n"]})]})}function u(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(d,{...e})}):d(e)}},28453:(e,t,s)=>{s.d(t,{R:()=>r,x:()=>a});var n=s(96540);const i={},o=n.createContext(i);function r(e){const t=n.useContext(o);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),n.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/9f319605.0c987fc4.js b/assets/js/9f319605.0c987fc4.js deleted file mode 100644 index fbe68375128c..000000000000 --- a/assets/js/9f319605.0c987fc4.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[834],{43635:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>a,default:()=>u,frontMatter:()=>r,metadata:()=>o,toc:()=>l});var s=t(74848),i=t(28453);const r={id:"learn-xcm-docs-journey-fees",title:"Fee Handling",sidebar_label:"Fee Handling",description:"How Fees for XCM Transfers are Handled.",keywords:["xcm","cross-consensus messaging","transfers","fees"],slug:"../journey-fees"},a="Fee handling",o={id:"learn/xcm/journey/learn-xcm-docs-journey-fees",title:"Fee Handling",description:"How Fees for XCM Transfers are Handled.",source:"@site/../docs/learn/xcm/journey/fees.md",sourceDirName:"learn/xcm/journey",slug:"/learn/xcm/journey-fees",permalink:"/docs/learn/xcm/journey-fees",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/xcm/journey/fees.md",tags:[],version:"current",lastUpdatedBy:"spazcoin",lastUpdatedAt:1715375475e3,frontMatter:{id:"learn-xcm-docs-journey-fees",title:"Fee Handling",sidebar_label:"Fee Handling",description:"How Fees for XCM Transfers are Handled.",keywords:["xcm","cross-consensus messaging","transfers","fees"],slug:"../journey-fees"},sidebar:"docs",previous:{title:"Reserve-backed Transfers",permalink:"/docs/learn/xcm/journey/transfers-reserve"},next:{title:"Transact: A General Solution",permalink:"/docs/learn/xcm/journey-transact"}},c={},l=[{value:"BuyExecution",id:"buyexecution",level:2},{value:"SetFeesMode",id:"setfeesmode",level:2},{value:"UnpaidExecution",id:"unpaidexecution",level:2},{value:"RefundSurplus",id:"refundsurplus",level:2},{value:"Example",id:"example",level:3}];function d(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"fee-handling",children:"Fee handling"})}),"\n",(0,s.jsxs)(n.p,{children:["Like we learnt in the ",(0,s.jsx)(n.a,{href:"/docs/learn/xcm/fundamentals-fees",children:"weight and fees"})," chapter, the XCM\noperations our messages perform need to be paid for. To accomplish this, we'll make use of different\ninstructions in this chapter."]}),"\n",(0,s.jsx)(n.h2,{id:"buyexecution",children:"BuyExecution"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-rust",children:"BuyExecution { fees: MultiAsset, weight_limit: WeightLimit }\n"})}),"\n",(0,s.jsxs)(n.p,{children:["This instruction is used to buy weight using fees. While in some cases there's no need to pay for\nexecution (if you control both systems for example), in most cases you'll need to add this\ninstruction. There's a predefined ",(0,s.jsx)(n.a,{href:"/docs/learn/xcm/config-deep-dive#barrier",children:"barrier"}),",\n",(0,s.jsx)(n.code,{children:"AllowTopLevelPaidExecutionFrom"}),", that explicitly drops messages that do not include this\ninstruction."]}),"\n",(0,s.jsxs)(n.p,{children:["Let's grab the teleport message from the ",(0,s.jsx)(n.a,{href:"/docs/learn/xcm/journey/transfers-teleport",children:"transfers chapter"})," and add fee\npayment."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-rust",children:"let message = Xcm(vec![\n WithdrawAsset((Here, withdraw_amount + fee_estimation).into()),\n BuyExecution { // <-- Added here\n fees: (Here, fee_estimation).into(),\n weight_limit: WeightLimit::Limited(weight_estimation),\n },\n InitiateTeleport {\n assets: All.into(),\n dest: Parachain(1).into(),\n xcm: Xcm(vec![DepositAsset {\n assets: All.into(),\n beneficiary: Junction::AccountId32 {\n network: None,\n id: ALICE.into(),\n },\n }]),\n },\n]);\n"})}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"fee_estimation"})," and ",(0,s.jsx)(n.code,{children:"weight_estimation"})," are values that can be calculated from the configuration of\nthe receiving chain. As mentioned in the ",(0,s.jsx)(n.a,{href:"/docs/learn/xcm/fundamentals-fees",children:"weight and fees"}),"\nchapter of the fundamentals, XCMs instructions are usually assigned weights separately, so, in order\nto estimate the weight, you need to estimate the weight of every instruction and add them together.\nBy using ",(0,s.jsx)(n.code,{children:"WeightLimit::Limited()"}),", you guarantee the message will error if it tries to use more\nweight than you expect. If you don't mind this, you can use ",(0,s.jsx)(n.code,{children:"WeightLimit::Unlimited"}),". The\n",(0,s.jsx)(n.code,{children:"fee_estimation"})," value is the maximum assets you want to use, if it doesn't cover all fees, message\nexecution will fail. You can add a higher value (all of ",(0,s.jsx)(n.code,{children:"withdraw_amount"})," for example) to make sure\nyou have enough assets for fee payment. If you plan to use the entirety of ",(0,s.jsx)(n.code,{children:"withdraw_amount"}),",\nhowever, it's recommended to add a little extra for fee payment."]}),"\n",(0,s.jsx)(n.p,{children:"In our examples, we use a very simple method, where all instructions weigh a constant value. This is\nvery useful for testing purposes, but it's recommended to actually benchmark every instruction as\nthey differ in resource usage. Given our setup, we estimate the weight and fee using only the number\nof instructions in each message."}),"\n",(0,s.jsx)(n.h2,{id:"setfeesmode",children:"SetFeesMode"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-rust",children:"SetFeesMode { jit_withdraw: bool }\n"})}),"\n",(0,s.jsxs)(n.p,{children:["This instruction changes the fee mode of the XCVM. If ",(0,s.jsx)(n.code,{children:"jit_withdraw"})," is set to true, then fee assets\nare taken directly from the origin's on-chain account, instead of the holding register. This means\nthe fees are taken directly from the account, no need for a ",(0,s.jsx)(n.code,{children:"BuyExecution"})," instruction. That means\nyou make sure the message will get executed, as long as there are enough assets in the account. It's\nuseful when paying sending fees, which are difficult to estimate, as they usually depend on network\ncongestion."]}),"\n",(0,s.jsx)(n.h2,{id:"unpaidexecution",children:"UnpaidExecution"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-rust",children:"UnpaidExecution { weight_limit: WeightLimit, check_origin: Option }\n"})}),"\n",(0,s.jsxs)(n.p,{children:["This instruction is used for explicitly stating this message shouldn't be paid for. It can be used\nas a way of identifying certain priviledged messages that don't pay fees, coming from a particular\nsystem. This instruction can be searched for in ",(0,s.jsx)(n.a,{href:"/docs/learn/xcm/config-deep-dive#barrier",children:"barriers"})," to\nallow this. Make sure you trust the origin system because it won't be paying fees. There's already a\npredefined barrier in xcm-builder, ",(0,s.jsx)(n.code,{children:"AllowExplicitUnpaidExecutionFrom"}),", that makes sure this is\nthe first instruction in the message. As always, you can build your own for your own use-cases."]}),"\n",(0,s.jsx)(n.p,{children:"This is safer than allowing all messages from a particular system to not pay fees, as it's an\nexception to the rule and not the default. Extra measures can be taken to limit who can use this\ninstruction."}),"\n",(0,s.jsx)(n.h2,{id:"refundsurplus",children:"RefundSurplus"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-rust",children:"RefundSurplus\n"})}),"\n",(0,s.jsxs)(n.p,{children:["Refunds any surplus weight previously bought with ",(0,s.jsx)(n.code,{children:"BuyExecution"}),". This is useful in many cases:"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"When you pay for execution of your whole message, but there's an error and not all instructions\nget executed"}),"\n",(0,s.jsx)(n.li,{children:"When you set an error handler, buy weight for it, but in the end there's no error so it doesn't\nget called"}),"\n",(0,s.jsxs)(n.li,{children:["When you use the ",(0,s.jsxs)(n.a,{href:"/docs/learn/xcm/journey-transact",children:[(0,s.jsx)(n.code,{children:"Transact"})," instruction"]})," and the call takes less weight than\nexpected"]}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"example",children:"Example"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-rust",children:"let message = Xcm(vec![\n WithdrawAsset((Parent, message_fee).into()),\n BuyExecution {\n fees: (Parent, message_fee).into(),\n weight_limit: WeightLimit::Unlimited,\n },\n SetErrorHandler(Xcm(vec![\n RefundSurplus,\n DepositAsset {\n assets: All.into(),\n beneficiary: AccountId32 {\n network: Some(ByGenesis([0; 32])),\n id: relay_sovereign_account_id().into(),\n }\n .into(),\n },\n ])),\n Trap(1),\n ClearOrigin,\n ClearOrigin,\n ClearOrigin,\n]);\n"})}),"\n",(0,s.jsxs)(n.p,{children:["In this example, we pay upfront for all the instructions in the XCM. When the ",(0,s.jsx)(n.code,{children:"Trap"})," instruction\nthrows an error, the error handler will be called and the weight for all the instructions that\nweren't executed is refunded. For the full example, check our\n",(0,s.jsx)(n.a,{href:"https://github.com/paritytech/xcm-docs/tree/main/examples",children:"repo"}),"."]})]})}function u(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},28453:(e,n,t)=>{t.d(n,{R:()=>a,x:()=>o});var s=t(96540);const i={},r=s.createContext(i);function a(e){const n=s.useContext(r);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:a(e.components),s.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/9f319605.1ca55897.js b/assets/js/9f319605.1ca55897.js new file mode 100644 index 000000000000..2a964c925e77 --- /dev/null +++ b/assets/js/9f319605.1ca55897.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[834],{1567:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>o,default:()=>u,frontMatter:()=>a,metadata:()=>s,toc:()=>l});const s=JSON.parse('{"id":"learn/xcm/journey/learn-xcm-docs-journey-fees","title":"Fee Handling","description":"How Fees for XCM Transfers are Handled.","source":"@site/../docs/learn/xcm/journey/fees.md","sourceDirName":"learn/xcm/journey","slug":"/learn/xcm/journey-fees","permalink":"/docs/learn/xcm/journey-fees","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/xcm/journey/fees.md","tags":[],"version":"current","lastUpdatedBy":"spazcoin","lastUpdatedAt":1715375475000,"frontMatter":{"id":"learn-xcm-docs-journey-fees","title":"Fee Handling","sidebar_label":"Fee Handling","description":"How Fees for XCM Transfers are Handled.","keywords":["xcm","cross-consensus messaging","transfers","fees"],"slug":"../journey-fees"},"sidebar":"docs","previous":{"title":"Reserve-backed Transfers","permalink":"/docs/learn/xcm/journey/transfers-reserve"},"next":{"title":"Transact: A General Solution","permalink":"/docs/learn/xcm/journey-transact"}}');var i=t(74848),r=t(28453);const a={id:"learn-xcm-docs-journey-fees",title:"Fee Handling",sidebar_label:"Fee Handling",description:"How Fees for XCM Transfers are Handled.",keywords:["xcm","cross-consensus messaging","transfers","fees"],slug:"../journey-fees"},o="Fee handling",c={},l=[{value:"BuyExecution",id:"buyexecution",level:2},{value:"SetFeesMode",id:"setfeesmode",level:2},{value:"UnpaidExecution",id:"unpaidexecution",level:2},{value:"RefundSurplus",id:"refundsurplus",level:2},{value:"Example",id:"example",level:3}];function d(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,r.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.header,{children:(0,i.jsx)(n.h1,{id:"fee-handling",children:"Fee handling"})}),"\n",(0,i.jsxs)(n.p,{children:["Like we learnt in the ",(0,i.jsx)(n.a,{href:"/docs/learn/xcm/fundamentals-fees",children:"weight and fees"})," chapter, the XCM\noperations our messages perform need to be paid for. To accomplish this, we'll make use of different\ninstructions in this chapter."]}),"\n",(0,i.jsx)(n.h2,{id:"buyexecution",children:"BuyExecution"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-rust",children:"BuyExecution { fees: MultiAsset, weight_limit: WeightLimit }\n"})}),"\n",(0,i.jsxs)(n.p,{children:["This instruction is used to buy weight using fees. While in some cases there's no need to pay for\nexecution (if you control both systems for example), in most cases you'll need to add this\ninstruction. There's a predefined ",(0,i.jsx)(n.a,{href:"/docs/learn/xcm/config-deep-dive#barrier",children:"barrier"}),",\n",(0,i.jsx)(n.code,{children:"AllowTopLevelPaidExecutionFrom"}),", that explicitly drops messages that do not include this\ninstruction."]}),"\n",(0,i.jsxs)(n.p,{children:["Let's grab the teleport message from the ",(0,i.jsx)(n.a,{href:"/docs/learn/xcm/journey/transfers-teleport",children:"transfers chapter"})," and add fee\npayment."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-rust",children:"let message = Xcm(vec![\n WithdrawAsset((Here, withdraw_amount + fee_estimation).into()),\n BuyExecution { // <-- Added here\n fees: (Here, fee_estimation).into(),\n weight_limit: WeightLimit::Limited(weight_estimation),\n },\n InitiateTeleport {\n assets: All.into(),\n dest: Parachain(1).into(),\n xcm: Xcm(vec![DepositAsset {\n assets: All.into(),\n beneficiary: Junction::AccountId32 {\n network: None,\n id: ALICE.into(),\n },\n }]),\n },\n]);\n"})}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"fee_estimation"})," and ",(0,i.jsx)(n.code,{children:"weight_estimation"})," are values that can be calculated from the configuration of\nthe receiving chain. As mentioned in the ",(0,i.jsx)(n.a,{href:"/docs/learn/xcm/fundamentals-fees",children:"weight and fees"}),"\nchapter of the fundamentals, XCMs instructions are usually assigned weights separately, so, in order\nto estimate the weight, you need to estimate the weight of every instruction and add them together.\nBy using ",(0,i.jsx)(n.code,{children:"WeightLimit::Limited()"}),", you guarantee the message will error if it tries to use more\nweight than you expect. If you don't mind this, you can use ",(0,i.jsx)(n.code,{children:"WeightLimit::Unlimited"}),". The\n",(0,i.jsx)(n.code,{children:"fee_estimation"})," value is the maximum assets you want to use, if it doesn't cover all fees, message\nexecution will fail. You can add a higher value (all of ",(0,i.jsx)(n.code,{children:"withdraw_amount"})," for example) to make sure\nyou have enough assets for fee payment. If you plan to use the entirety of ",(0,i.jsx)(n.code,{children:"withdraw_amount"}),",\nhowever, it's recommended to add a little extra for fee payment."]}),"\n",(0,i.jsx)(n.p,{children:"In our examples, we use a very simple method, where all instructions weigh a constant value. This is\nvery useful for testing purposes, but it's recommended to actually benchmark every instruction as\nthey differ in resource usage. Given our setup, we estimate the weight and fee using only the number\nof instructions in each message."}),"\n",(0,i.jsx)(n.h2,{id:"setfeesmode",children:"SetFeesMode"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-rust",children:"SetFeesMode { jit_withdraw: bool }\n"})}),"\n",(0,i.jsxs)(n.p,{children:["This instruction changes the fee mode of the XCVM. If ",(0,i.jsx)(n.code,{children:"jit_withdraw"})," is set to true, then fee assets\nare taken directly from the origin's on-chain account, instead of the holding register. This means\nthe fees are taken directly from the account, no need for a ",(0,i.jsx)(n.code,{children:"BuyExecution"})," instruction. That means\nyou make sure the message will get executed, as long as there are enough assets in the account. It's\nuseful when paying sending fees, which are difficult to estimate, as they usually depend on network\ncongestion."]}),"\n",(0,i.jsx)(n.h2,{id:"unpaidexecution",children:"UnpaidExecution"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-rust",children:"UnpaidExecution { weight_limit: WeightLimit, check_origin: Option }\n"})}),"\n",(0,i.jsxs)(n.p,{children:["This instruction is used for explicitly stating this message shouldn't be paid for. It can be used\nas a way of identifying certain priviledged messages that don't pay fees, coming from a particular\nsystem. This instruction can be searched for in ",(0,i.jsx)(n.a,{href:"/docs/learn/xcm/config-deep-dive#barrier",children:"barriers"})," to\nallow this. Make sure you trust the origin system because it won't be paying fees. There's already a\npredefined barrier in xcm-builder, ",(0,i.jsx)(n.code,{children:"AllowExplicitUnpaidExecutionFrom"}),", that makes sure this is\nthe first instruction in the message. As always, you can build your own for your own use-cases."]}),"\n",(0,i.jsx)(n.p,{children:"This is safer than allowing all messages from a particular system to not pay fees, as it's an\nexception to the rule and not the default. Extra measures can be taken to limit who can use this\ninstruction."}),"\n",(0,i.jsx)(n.h2,{id:"refundsurplus",children:"RefundSurplus"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-rust",children:"RefundSurplus\n"})}),"\n",(0,i.jsxs)(n.p,{children:["Refunds any surplus weight previously bought with ",(0,i.jsx)(n.code,{children:"BuyExecution"}),". This is useful in many cases:"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"When you pay for execution of your whole message, but there's an error and not all instructions\nget executed"}),"\n",(0,i.jsx)(n.li,{children:"When you set an error handler, buy weight for it, but in the end there's no error so it doesn't\nget called"}),"\n",(0,i.jsxs)(n.li,{children:["When you use the ",(0,i.jsxs)(n.a,{href:"/docs/learn/xcm/journey-transact",children:[(0,i.jsx)(n.code,{children:"Transact"})," instruction"]})," and the call takes less weight than\nexpected"]}),"\n"]}),"\n",(0,i.jsx)(n.h3,{id:"example",children:"Example"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-rust",children:"let message = Xcm(vec![\n WithdrawAsset((Parent, message_fee).into()),\n BuyExecution {\n fees: (Parent, message_fee).into(),\n weight_limit: WeightLimit::Unlimited,\n },\n SetErrorHandler(Xcm(vec![\n RefundSurplus,\n DepositAsset {\n assets: All.into(),\n beneficiary: AccountId32 {\n network: Some(ByGenesis([0; 32])),\n id: relay_sovereign_account_id().into(),\n }\n .into(),\n },\n ])),\n Trap(1),\n ClearOrigin,\n ClearOrigin,\n ClearOrigin,\n]);\n"})}),"\n",(0,i.jsxs)(n.p,{children:["In this example, we pay upfront for all the instructions in the XCM. When the ",(0,i.jsx)(n.code,{children:"Trap"})," instruction\nthrows an error, the error handler will be called and the weight for all the instructions that\nweren't executed is refunded. For the full example, check our\n",(0,i.jsx)(n.a,{href:"https://github.com/paritytech/xcm-docs/tree/main/examples",children:"repo"}),"."]})]})}function u(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}},28453:(e,n,t)=>{t.d(n,{R:()=>a,x:()=>o});var s=t(96540);const i={},r=s.createContext(i);function a(e){const n=s.useContext(r);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:a(e.components),s.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/9f804621.1825abd0.js b/assets/js/9f804621.1825abd0.js new file mode 100644 index 000000000000..415c683fe46d --- /dev/null +++ b/assets/js/9f804621.1825abd0.js @@ -0,0 +1 @@ +(self.webpackChunk=self.webpackChunk||[]).push([[1431],{68448:(e,t,n)=>{"use strict";n.r(t),n.d(t,{assets:()=>u,contentTitle:()=>l,default:()=>p,frontMatter:()=>c,metadata:()=>o,toc:()=>d});const o=JSON.parse('{"id":"learn/learn-guides-accounts","title":"Polkadot-JS Guides about Accounts","description":"Polkadot-JS Guides about Accounts","source":"@site/../docs/learn/learn-guides-accounts.md","sourceDirName":"learn","slug":"/learn-guides-accounts","permalink":"/docs/learn-guides-accounts","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-accounts.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1729847256000,"frontMatter":{"id":"learn-guides-accounts","title":"Polkadot-JS Guides about Accounts","sidebar_label":"Account Guides","description":"Polkadot-JS Guides about Accounts","keyword":["guides","polkadot-js","accounts"],"slug":"../learn-guides-accounts"},"sidebar":"docs","previous":{"title":"Polkadot-JS Guides","permalink":"/docs/learn-polkadot-js-guides"},"next":{"title":"Multisig Guides","permalink":"/docs/learn-guides-accounts-multisig"}}');var s=n(74848),a=n(28453),r=(n(47379),n(11470),n(19365),n(3514)),i=n(67141);const c={id:"learn-guides-accounts",title:"Polkadot-JS Guides about Accounts",sidebar_label:"Account Guides",description:"Polkadot-JS Guides about Accounts",keyword:["guides","polkadot-js","accounts"],slug:"../learn-guides-accounts"},l=void 0,u={},d=[{value:"Account Address Format",id:"account-address-format",level:2},{value:"Polkadot-JS Browser Extension",id:"polkadot-js-browser-extension",level:2},{value:"Account Backup using the Polkadot-JS Browser Extension",id:"account-backup-using-the-polkadot-js-browser-extension",level:3},{value:"Reset Password using the Polkadot-JS Browser Extension",id:"reset-password-using-the-polkadot-js-browser-extension",level:3},{value:"Restore Account on the Polkadot-JS Browser Extension",id:"restore-account-on-the-polkadot-js-browser-extension",level:3},{value:"Polkadot-JS UI",id:"polkadot-js-ui",level:2},{value:"Account Backup using the Polkadot-JS UI",id:"account-backup-using-the-polkadot-js-ui",level:3},{value:"Reset password using the Polkadot-JS UI",id:"reset-password-using-the-polkadot-js-ui",level:3},{value:"Restore Account on the Polkadot-JS UI",id:"restore-account-on-the-polkadot-js-ui",level:3},{value:"Unlocking Locks",id:"unlocking-locks",level:3},{value:"Query Account Data in Polkadot-JS",id:"query-account-data-in-polkadot-js",level:2},{value:"Vanity Generator",id:"vanity-generator",level:2},{value:"Encryption Enhancement",id:"encryption-enhancement",level:2}];function h(e){const t={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,a.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(i.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the Polkadot-JS UI, you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,s.jsx)(r.A,{}),"\n",(0,s.jsx)(t.h2,{id:"account-address-format",children:"Account Address Format"}),"\n",(0,s.jsxs)(t.p,{children:["An account created on the relay chain can also be used on multiple chains in the ecosystem. More\nspecifically, the account of a chain that uses the ",(0,s.jsx)(t.code,{children:"*25519"})," account address format (the latest list\ncan be accessed on the\n",(0,s.jsx)(t.a,{href:"https://github.com/paritytech/ss58-registry/blob/main/ss58-registry.json",children:"ss58 registry repository"}),")\nis cross-compatible with all the chains that use the similar format. To switch between the accounts\non different chains, you can follow the guidelines in\n",(0,s.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000103707-can-i-use-the-same-account-on-polkadot-kusama-and-parachains-",children:"this support article"}),".\n",(0,s.jsx)(t.a,{href:"https://polkadot.subscan.io/tools/format_transform",children:"Subscan has a tool"})," you can use to convert your\naddress between the different chain formats."]}),"\n",(0,s.jsxs)(t.admonition,{title:"Using the same account on multiple chains - Pros and Cons",type:"info",children:[(0,s.jsx)(t.p,{children:"The address format differs from chain to chain, but that difference is only visual. The same private\nkey can be used to sign transactions on behalf of the respective accounts on multiple chains. Using\na single account on multiple chains is convenient, as you do not have to deal with multiple mnemonic\nphrases or private keys. But, if your account gets compromised on one chain, the attacker can gain\nfull access to the accounts on all other chains. This also has implications for the account holder's\nprivacy, as knowing the identity of an account on one chain can expose the account holder's identity\non all the chains. In the Accounts tab, the Polkadot-JS UI displays a warning message next to each\nAccount you are using on multiple chains and recommends using different Accounts on different chains\n(see below)."}),(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{alt:"warning multiple chains",src:n(36105).A+"",width:"1103",height:"343"})})]}),"\n",(0,s.jsx)(t.p,{children:'On Polkadot-JS Extension, you can copy your address by clicking the account\'s icon while the desired\nchain format is active. E.g. selecting "Substrate" as the format will change your address, and\nclicking the colorful icon of your account will copy it in that format.'}),"\n",(0,s.jsx)(t.h2,{id:"polkadot-js-browser-extension",children:"Polkadot-JS Browser Extension"}),"\n",(0,s.jsx)("div",{className:"row",children:(0,s.jsxs)("div",{className:"col text--center",children:[(0,s.jsx)("a",{href:"https://www.youtube.com/watch?v=DNU0p5G0Gqc",children:(0,s.jsx)("img",{src:"https://img.youtube.com/vi/DNU0p5G0Gqc/0.jpg",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,s.jsx)("p",{children:(0,s.jsx)("a",{href:"https://www.youtube.com/watch?v=DNU0p5G0Gqc",children:"Polkadot-JS Browser Extension Tutorial"})})]})}),"\n",(0,s.jsx)(t.admonition,{type:"info",children:(0,s.jsxs)(t.p,{children:["For guidelines about how to create an account using the Polkadot Extension, see\n",(0,s.jsx)(t.a,{href:"https://youtu.be/DNU0p5G0Gqc",children:(0,s.jsx)(t.strong,{children:"this video tutorial"})})," and visit\n",(0,s.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000098878-how-to-create-a-dot-account",children:(0,s.jsx)(t.strong,{children:"this support article"})}),"."]})}),"\n",(0,s.jsx)(t.p,{children:"The Polkadot-JS Browser Extension (the Polkadot Extension) provides a reasonable balance of security\nand usability. It provides a separate local mechanism to generate your address and interact with\nPolkadot."}),"\n",(0,s.jsx)(t.p,{children:'This method involves installing the Polkadot Extension and using it as a \u201cvirtual vault," separate\nfrom your browser, to store your private keys. It also allows the signing of transactions and\nsimilar functionality.'}),"\n",(0,s.jsx)(t.p,{children:"It is still running on the same computer you use to connect to the internet and thus is less secure\nthan using Parity Signer or other air-gapped approaches."}),"\n",(0,s.jsx)(t.h3,{id:"account-backup-using-the-polkadot-js-browser-extension",children:"Account Backup using the Polkadot-JS Browser Extension"}),"\n",(0,s.jsxs)(t.p,{children:["See ",(0,s.jsx)(t.a,{href:"https://youtu.be/DNU0p5G0Gqc",children:(0,s.jsx)(t.strong,{children:"this video tutorial"})})," and visit\n",(0,s.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000177677-how-to-export-your-json-backup-file",children:(0,s.jsx)(t.strong,{children:"this support page"})}),"\nto know how to back up your account."]}),"\n",(0,s.jsx)(t.h3,{id:"reset-password-using-the-polkadot-js-browser-extension",children:"Reset Password using the Polkadot-JS Browser Extension"}),"\n",(0,s.jsx)(t.admonition,{type:"info",children:(0,s.jsxs)(t.p,{children:["See ",(0,s.jsx)(t.a,{href:"https://www.youtube.com/watch?v=DNU0p5G0Gqc&t=280s",children:(0,s.jsx)(t.strong,{children:"this video tutorial"})})," to learn how to\nchange the password for an account that has been created on the Polkadot-JS browser extension (i.e.\nan injected account)."]})}),"\n",(0,s.jsx)(t.admonition,{type:"warning",children:(0,s.jsx)(t.p,{children:"Before following the instructions below, make sure you have your mnemonic phrase stored in a safe\nplace accessible to you."})}),"\n",(0,s.jsxs)(t.p,{children:["Let's say you created ",(0,s.jsx)(t.code,{children:"ACCOUNT 1"})," protected by password ",(0,s.jsx)(t.code,{children:"PSW 1"}),". To reset the password of your\n",(0,s.jsx)(t.code,{children:"ACCOUNT 1"})," using the browser extension, you must follow the following steps:"]}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:["Go to ",(0,s.jsx)(t.code,{children:"ACCOUNT 1"}),' on the browser extension and click "Forget account". This action will delete the\naccess to your account. Note that your tokens are still in your account on the Polkadot network.']}),"\n",(0,s.jsxs)(t.li,{children:['On the browser extension click the "+" button in the top right corner and select the option\n"Import account from pre-existing seed". After entering the mnemonic phrase, you can choose a new\npassword, ',(0,s.jsx)(t.code,{children:"PSW 2"}),"."]}),"\n"]}),"\n",(0,s.jsx)(t.admonition,{title:"JSON files do not allow changing account passwords",type:"info",children:(0,s.jsxs)(t.p,{children:['If you add the account to the extension using the option "Restore account from backup JSON file",\nthis will allow you to restore access to your account using a JSON file protected by the password\n',(0,s.jsx)(t.code,{children:"PSW 1"}),", but does not let you set a new password. Thus, ",(0,s.jsx)(t.code,{children:"PSW 1"})," will become the account password by\ndefault."]})}),"\n",(0,s.jsx)(t.admonition,{title:"Accounts on Cold wallets do not need passwords",type:"info",children:(0,s.jsxs)(t.p,{children:["For hardware wallets such as ",(0,s.jsx)(t.a,{href:"https://www.ledger.com/",children:"Ledger"}),", you may have to set a PIN for\naccessing the accounts on the device, but you do not need to set a password for every individual\naccount. When you need to make transactions with your account, you are required to sign using your\nLedger device. Also, Ledger wallets let you generate multiple accounts for multiple blockchain\nnetworks without setting different passwords to access such accounts."]})}),"\n",(0,s.jsx)(t.h3,{id:"restore-account-on-the-polkadot-js-browser-extension",children:"Restore Account on the Polkadot-JS Browser Extension"}),"\n",(0,s.jsx)(t.admonition,{type:"info",children:(0,s.jsxs)(t.p,{children:["See ",(0,s.jsx)(t.a,{href:"https://youtu.be/9ohp8k4Hz8c",children:(0,s.jsx)(t.strong,{children:"this video tutorial"})})," and\n",(0,s.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000169952-how-to-restore-your-account-in-the-polkadot-extension",children:(0,s.jsx)(t.strong,{children:"this support page"})}),"\nto learn how to restore your account on the Polkadot-JS UI."]})}),"\n",(0,s.jsx)(t.h2,{id:"polkadot-js-ui",children:"Polkadot-JS UI"}),"\n",(0,s.jsx)(t.admonition,{type:"info",children:(0,s.jsxs)(t.p,{children:["For guidelines about how to create an account using Polkadot-JS UI, see\n",(0,s.jsx)(t.a,{href:"https://youtu.be/DNU0p5G0Gqc",children:(0,s.jsx)(t.strong,{children:"this video tutorial"})})," and visit\n",(0,s.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000180529",children:(0,s.jsx)(t.strong,{children:"this support article"})}),"."]})}),"\n",(0,s.jsx)(t.admonition,{type:"caution",children:(0,s.jsxs)(t.p,{children:["If you use this method to create your account and clear your cookies in your browser, your account\nwill be lost forever if you do not ",(0,s.jsx)(t.a,{href:"#restore-account-on-the-polkadot-js-ui",children:"back it up"}),". Make sure\nyou store your seed phrase in a safe place or download the account's JSON file if using the\nPolkadot-JS browser extension. Learn more about account backup and restoration\n",(0,s.jsx)(t.a,{href:"#restore-account-on-the-polkadot-js-ui",children:"here"}),"."]})}),"\n",(0,s.jsxs)(t.p,{children:["Local in-browser account storage is disabled by default on the Polkadot-JS UI. To create an account\nusing the Polkadot-JS UI, navigate to settings > account options and click on allow local in-browser\naccount storage in the drop-down menu. Using the Polkadot-JS user interface without a browser\nextension is ",(0,s.jsx)(t.strong,{children:"not recommended"}),". It is the least secure way of generating an account. It should\nonly be used if all other methods are not feasible."]}),"\n",(0,s.jsx)(t.h3,{id:"account-backup-using-the-polkadot-js-ui",children:"Account Backup using the Polkadot-JS UI"}),"\n",(0,s.jsx)(t.admonition,{type:"info",children:(0,s.jsxs)(t.p,{children:["See ",(0,s.jsx)(t.a,{href:"https://youtu.be/DNU0p5G0Gqc",children:(0,s.jsx)(t.strong,{children:"this video tutorial"})})," and visit\n",(0,s.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000177677-how-to-export-your-json-backup-file",children:(0,s.jsx)(t.strong,{children:"this support page"})}),"\nto know how to back up your account."]})}),"\n",(0,s.jsx)(t.h3,{id:"reset-password-using-the-polkadot-js-ui",children:"Reset password using the Polkadot-JS UI"}),"\n",(0,s.jsx)(t.p,{children:'To reset the password of an account created with Polkadot-JS Apps UI, you need to go to the\n"Accounts" tab, click the icon with three vertical dots on your account and select "Change this\naccount\'s password".'}),"\n",(0,s.jsxs)(t.p,{children:["See ",(0,s.jsx)(t.a,{href:"https://youtu.be/DNU0p5G0Gqc?t=261",children:(0,s.jsx)(t.strong,{children:"this video tutorial"})})," to learn how to change the\npassword for an account created on the Polkadot-JS UI (i.e. a non-injected account)."]}),"\n",(0,s.jsx)(t.admonition,{type:"note",children:(0,s.jsxs)(t.p,{children:["If you create an account first using Polkadot-JS Apps UI and then add it to the browser extension,\nyou need to follow the\n",(0,s.jsx)(t.a,{href:"#reset-password-using-the-browser-extension",children:"guidelines for the browser extension"})," to change the\npassword of such an account."]})}),"\n",(0,s.jsx)(t.h3,{id:"restore-account-on-the-polkadot-js-ui",children:"Restore Account on the Polkadot-JS UI"}),"\n",(0,s.jsxs)(t.p,{children:["See ",(0,s.jsx)(t.a,{href:"https://youtu.be/cBsZqFpBANY",children:(0,s.jsx)(t.strong,{children:"this video tutorial"})})," and\n",(0,s.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000180110-how-to-restore-your-account-in-polkadot-js-ui",children:(0,s.jsx)(t.strong,{children:"this support page"})}),"\nto learn how to restore your account on the Polkadot-JS UI."]}),"\n",(0,s.jsx)(t.h3,{id:"unlocking-locks",children:"Unlocking Locks"}),"\n",(0,s.jsx)(t.admonition,{title:"Locks do not stack!",type:"info",children:(0,s.jsxs)(t.p,{children:["The biggest lock decides the total amount of locked funds. See\n",(0,s.jsx)(t.a,{href:"https://youtu.be/LHgY7ds_bZ0",children:(0,s.jsx)(t.strong,{children:"this walk-through video tutorial"})})," that will guide you in the\nprocess of unlocking funds in the example above."]})}),"\n",(0,s.jsx)(t.p,{children:"In the example, the locked balance is 0.55 KSM because the biggest lock is on democracy and is 0.55\nKSM. As soon as the democracy lock is removed the next biggest lock is on staking 0.5 KSM (bonded\n0.4 KSM + redeemable 0.1 KSM). This means that the locked balance will be 0.5 KSM, and 0.05 KSM will\nbe added to the transferrable balance. After redeeming the unbonded 0.1 KSM, the locked balance will\nbe 0.4 KSM, and an additional 0.1 KSM will be added to the transferrable balance. Now the biggest\nlock is still the bonded one. This means that even if we remove the vested lock, the locked balance\nwill still be 0.4 KSM and no tokens will be added to the transferrable balance. To free those bonded\ntokens we will need to unbond them and wait for the unbonding period to make them redeemable. If we\nremove the proxy the reserved funds will be automatically added to the transferrable balance."}),"\n",(0,s.jsx)(t.h2,{id:"query-account-data-in-polkadot-js",children:"Query Account Data in Polkadot-JS"}),"\n",(0,s.jsxs)(t.p,{children:["In the Polkadot-JS UI, you can also query account data under\n",(0,s.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/chainstate",children:"Developer > Chain state"}),". Under ",(0,s.jsx)(t.code,{children:"selected state query"}),"\nchoose the system pallet followed by ",(0,s.jsx)(t.code,{children:"account(AccountId32): FrameSystemAccountInfo"}),", under ",(0,s.jsx)(t.code,{children:"Option"}),'\nchoose an account, and then click on the "+" button on the right.']}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{alt:"account_balance_types",src:n(59637).A+"",width:"1636",height:"343"})}),"\n",(0,s.jsx)(t.p,{children:"Account information include:"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"nonce"}),", the number of transactions the account sent."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"consumers"}),", the number of other modules that currently depend on this account's existence. The\naccount cannot be reaped until this is zero."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"providers"}),", the number of other modules that allow this account to exist. The account may not be\nreaped until this and ",(0,s.jsx)(t.code,{children:"sufficients"})," are both zero."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"sufficients"}),", the number of modules that allow this account to exist for their own purposes. The\naccount may not be reaped until this and ",(0,s.jsx)(t.code,{children:"providers"})," are both zero."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"data"}),", the additional data that belongs to this account. Used to store the balance(s) in a lot of\nchains."]}),"\n"]}),"\n",(0,s.jsxs)(t.p,{children:["More in-depth information about the above data can be found in the\n",(0,s.jsx)(t.a,{href:"https://github.com/paritytech/substrate/blob/2e7fde832b77b242269b136f1c3b6fffef86f9b6/frame/system/src/lib.rs#LL767C1-L781C24",children:"substrate code base"}),"."]}),"\n",(0,s.jsxs)(t.p,{children:["The ",(0,s.jsx)(t.code,{children:"AccountData"})," structure defines the balance types in Substrate. The three types of balances\ninclude:"]}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"free"}),", is the balance that is free but not necessarily transferrable."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"reserved"}),", is the balance that is not free, and it is put on hold for on-chain activity such as\ndeposits for multi-signature calls, setting up proxies and identities, and other actions that hold\nstate on the network."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"frozen"}),", is the amount that is free to use for on-chain activity but is locked in staking,\ngovernance, or vesting."]}),"\n"]}),"\n",(0,s.jsxs)(t.p,{children:["The ",(0,s.jsx)(t.strong,{children:"usable"})," or transferrable balance of the account is currently calculated using the formula\nbelow:"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{children:"transferable = free - max(frozen - reserved, ED)\n"})}),"\n",(0,s.jsxs)(t.p,{children:["Where ED is the existential deposit. The ",(0,s.jsx)(t.strong,{children:"total"})," balance of the account is the sum of ",(0,s.jsx)(t.code,{children:"free"})," and\n",(0,s.jsx)(t.code,{children:"reserved"})," funds. The ",(0,s.jsx)(t.code,{children:"flags"})," describe extra information about the account."]}),"\n",(0,s.jsxs)(t.p,{children:["More in-depth information about the above data can be found in the\n",(0,s.jsx)(t.a,{href:"https://github.com/paritytech/substrate/blob/2e7fde832b77b242269b136f1c3b6fffef86f9b6/frame/balances/src/types.rs#LL95-L114",children:"balances pallet in the Substrate code base"}),"."]}),"\n",(0,s.jsx)(t.h2,{id:"vanity-generator",children:"Vanity Generator"}),"\n",(0,s.jsxs)(t.p,{children:["The vanity generator is a tool on ",(0,s.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/accounts/vanity",children:"Polkadot-JS UI"}),"\nthat lets you generate addresses that contain a specific substring. For the tutorial on how to\ncreate an account using Vanity Generator, visit\n",(0,s.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000171416",children:"this support article"}),"."]}),"\n",(0,s.jsx)(t.h2,{id:"encryption-enhancement",children:"Encryption Enhancement"}),"\n",(0,s.jsxs)(t.p,{children:["Some newly generated ",(0,s.jsx)(t.code,{children:"JSON"})," account files cannot be imported (restored) into older wallet software.\nThis is due to an enhanced encryption method, noticeable in a slight delay when\nencrypting/decrypting your wallet. If you cannot load a ",(0,s.jsx)(t.code,{children:"JSON"})," file, please use the latest version\nof the wallet software. If you cannot load it, ensure that the wallet software uses the newest\nversion of the ",(0,s.jsx)(t.a,{href:"https://polkadot.js.org/api/",children:"Polkadot API"}),"."]})]})}function p(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}},67141:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var o=n(96540),s=n(74848);const a=function(e){var t,n=e.message,a=(0,o.useState)(!0),r=a[0],i=a[1];return(0,s.jsx)(s.Fragment,{children:r&&(0,s.jsxs)("div",{className:"message-box",children:[(0,s.jsx)("button",{className:"close-button",onClick:function(){i(!1)},children:"\u2716 "}),(0,s.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(t=n,t.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},47379:(e,t,n)=>{"use strict";n.d(t,{A:()=>h});var o=n(90675),s=n(10467),a=n(96540),r=n(19588),i=n(2026),c=n(11135);function l(e,t,n){return u.apply(this,arguments)}function u(){return(u=(0,s.A)((0,o.A)().mark((function e(t,n,s){var a,c,l,u,d;return(0,o.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a=void 0,c=void 0,e.t0=t,e.next="polkadot"===e.t0?5:"kusama"===e.t0?7:"statemine"===e.t0?9:"statemint"===e.t0?11:"polkadotpeople"===e.t0?13:"kusamapeople"===e.t0?15:17;break;case 5:return a="wss://rpc.polkadot.io",e.abrupt("break",18);case 7:return a="wss://kusama-rpc.polkadot.io/",e.abrupt("break",18);case 9:return a="wss://statemine-rpc.polkadot.io/",e.abrupt("break",18);case 11:return a="wss://statemint-rpc.polkadot.io/",e.abrupt("break",18);case 13:return a="wss://polkadot-people-rpc.polkadot.io/",e.abrupt("break",18);case 15:return a="wss://kusama-people-rpc.polkadot.io/",e.abrupt("break",18);case 17:console.log("Unknown socket url provided, no connection made.");case 18:if(void 0!==a){e.next=22;break}return e.abrupt("return");case 22:return l=new r.E(a),e.next=25,i.G.create({provider:l});case 25:u=e.sent,(d=n.split(".")).forEach((function(e){e in u&&(u=u[e])})),e.t1=d[0],e.next="consts"===e.t1?31:"query"===e.t1?33:38;break;case 31:return c=u.toString(),e.abrupt("break",39);case 33:return e.next=35,u();case 35:return c=(c=e.sent).toString(),e.abrupt("break",39);case 38:console.log("Unknown path prefix ("+d[0]+") in "+n);case 39:return e.abrupt("return",c);case 40:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function d(e,t,n,o){switch(t){case"humanReadable":(0,c.HumanReadable)(e,n,o);break;case"precise":(0,c.Precise)(e,n,o);break;case"blocksToDays":(0,c.BlocksToDays)(e,o);break;case"erasToDays":(0,c.ErasToDays)(e,o,n);break;case"percentage":(0,c.Percentage)(e,o);break;case"permillToPercent":(0,c.PermillToPercent)(e,o);break;case"arrayLength":(0,c.ArrayLength)(e,o);break;default:return void console.log("Ignoring unknown filter type")}}const h=function(e){var t=e.network,n=e.path,r=e.defaultValue,i=e.filter,c=void 0===i?void 0:i,u=(0,a.useState)(""),h=u[0],p=u[1];return t=t.toLowerCase(),(0,a.useEffect)((function(){void 0!==c?d(r.toString(),c,t,p):p(r.toString());var e=void 0;switch(t){case"polkadot":e="wss://rpc.polkadot.io";break;case"kusama":e="wss://kusama-rpc.polkadot.io/";break;case"statemine":e="wss://kusama-asset-hub-rpc.polkadot.io/";break;case"statemint":e="wss://polkadot-asset-hub-rpc.polkadot.io/";break;case"kusamapeople":e="wss://kusama-people-rpc.polkadot.io";break;case"polkadotpeople":e="wss://polkadot-people-rpc.polkadot.io";break;default:console.log("Unknown network provided, "+t)}if(void 0===e)console.log("Failed to connect to a valid websocket, applying default");else{var a=function(){var e=(0,s.A)((0,o.A)().mark((function e(){var s;return(0,o.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l(t,n,p);case 2:if(void 0!==(s=e.sent)){e.next=7;break}return e.abrupt("return");case 7:void 0!==c?d(s,c,t,p):p(s);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();try{a()}catch(i){console.log(i)}}}),[]),h}},11135:e=>{var t="polkadot",n="kusama",o="statemine",s="statemint",a="polkadotpeople",r="kusamapeople",i={polkadot:{precision:1e10,symbol:"DOT"},kusama:{precision:1e12,symbol:"KSM"},statemint:{precision:1e10,symbol:"DOT"},statemine:{precision:1e12,symbol:"KSM"},polkadotpeople:{precision:1e10,symbol:"DOT"},kusamapeople:{precision:1e12,symbol:"KSM"}};e.exports={HumanReadable:function(e,c,l){var u=void 0;if(c===t||c===s)u=3;else if(c===n||c===o||c===a)u=6;else{if(c!=r)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");u=8}e=parseFloat(e),l((e=Number.isInteger(e/i[c].precision)?e/i[c].precision+" "+i[c].symbol:(e/i[c].precision).toFixed(u)+" "+i[c].symbol).toString())},Precise:function(e,t,n){n(e=(e=parseFloat(e))/i[t].precision+" "+i[t].symbol)},BlocksToDays:function(e,t){t((e=6*e/86400).toString())},ErasToDays:function(e,i,c){var l=void 0;if(c===t||c===s||c==a)l=1;else{if(c!==n&&c!==o&&c!=r)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");l=4}i((e/=l).toString())},Percentage:function(e,t){t((e/=1e7).toString())},PermillToPercent:function(e,t){t((e/=1e4).toString())},ArrayLength:function(e,t){t((e=e.split(",").length).toString())}}},3514:(e,t,n)=>{"use strict";n.d(t,{A:()=>k});n(96540);var o=n(34164),s=n(26972),a=n(28774),r=n(53465),i=n(16654),c=n(21312),l=n(51107);const u={cardContainer:"cardContainer_fWXF",cardTitle:"cardTitle_rnsV",cardDescription:"cardDescription_PWke"};var d=n(74848);function h(e){var t=e.href,n=e.children;return(0,d.jsx)(a.A,{href:t,className:(0,o.A)("card padding--lg",u.cardContainer),children:n})}function p(e){var t=e.href,n=e.icon,s=e.title,a=e.description;return(0,d.jsxs)(h,{href:t,children:[(0,d.jsxs)(l.A,{as:"h2",className:(0,o.A)("text--truncate",u.cardTitle),title:s,children:[n," ",s]}),a&&(0,d.jsx)("p",{className:(0,o.A)("text--truncate",u.cardDescription),title:a,children:a})]})}function f(e){var t,n,o=e.item,a=(0,s.Nr)(o),i=(n=(0,r.W)().selectMessage,function(e){return n(e,(0,c.T)({message:"1 item|{count} items",id:"theme.docs.DocCard.categoryDescription.plurals",description:"The default description for a category card in the generated index about how many items this category includes"},{count:e}))});return a?(0,d.jsx)(p,{href:a,icon:"\ud83d\uddc3\ufe0f",title:o.label,description:null!=(t=o.description)?t:i(o.items.length)}):null}function b(e){var t,n,o=e.item,a=(0,i.A)(o.href)?"\ud83d\udcc4\ufe0f":"\ud83d\udd17",r=(0,s.cC)(null!=(t=o.docId)?t:void 0);return(0,d.jsx)(p,{href:o.href,icon:a,title:o.label,description:null!=(n=o.description)?n:null==r?void 0:r.description})}function m(e){var t=e.item;switch(t.type){case"link":return(0,d.jsx)(b,{item:t});case"category":return(0,d.jsx)(f,{item:t});default:throw new Error("unknown item type "+JSON.stringify(t))}}function g(e){var t=e.className,n=(0,s.$S)();return(0,d.jsx)(k,{items:n.items,className:t})}function k(e){var t=e.items,n=e.className;if(!t)return(0,d.jsx)(g,Object.assign({},e));var a=(0,s.d1)(t);return(0,d.jsx)("section",{className:(0,o.A)("row",n),children:a.map((function(e,t){return(0,d.jsx)("article",{className:"col col--6 margin-bottom--lg",children:(0,d.jsx)(m,{item:e})},t)}))})}},19365:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});n(96540);var o=n(34164);const s={tabItem:"tabItem_Ymn6"};var a=n(74848);function r(e){var t=e.children,n=e.hidden,r=e.className;return(0,a.jsx)("div",{role:"tabpanel",className:(0,o.A)(s.tabItem,r),hidden:n,children:t})}},11470:(e,t,n)=>{"use strict";n.d(t,{A:()=>j});var o=n(96540),s=n(34164),a=n(23104),r=n(56347),i=n(205),c=n(57485),l=n(31682),u=n(75376);function d(e){var t,n;return null!=(t=null==(n=o.Children.toArray(e).filter((function(e){return"\n"!==e})).map((function(e){if(!e||(0,o.isValidElement)(e)&&((t=e.props)&&"object"==typeof t&&"value"in t))return e;var t;throw new Error("Docusaurus error: Bad child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:n.filter(Boolean))?t:[]}function h(e){var t=e.values,n=e.children;return(0,o.useMemo)((function(){var e=null!=t?t:function(e){return d(e).map((function(e){var t=e.props;return{value:t.value,label:t.label,attributes:t.attributes,default:t.default}}))}(n);return function(e){var t=(0,l.XI)(e,(function(e,t){return e.value===t.value}));if(t.length>0)throw new Error('Docusaurus error: Duplicate values "'+t.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[t,n])}function p(e){var t=e.value;return e.tabValues.some((function(e){return e.value===t}))}function f(e){var t=e.queryString,n=void 0!==t&&t,s=e.groupId,a=(0,r.W6)(),i=function(e){var t=e.queryString,n=void 0!==t&&t,o=e.groupId;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!o)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=o?o:null}({queryString:n,groupId:s});return[(0,c.aZ)(i),(0,o.useCallback)((function(e){if(i){var t=new URLSearchParams(a.location.search);t.set(i,e),a.replace(Object.assign({},a.location,{search:t.toString()}))}}),[i,a])]}function b(e){var t,n,s,a,r=e.defaultValue,c=e.queryString,l=void 0!==c&&c,d=e.groupId,b=h(e),m=(0,o.useState)((function(){return function(e){var t,n=e.defaultValue,o=e.tabValues;if(0===o.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!p({value:n,tabValues:o}))throw new Error('Docusaurus error: The has a defaultValue "'+n+'" but none of its children has the corresponding value. Available values are: '+o.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return n}var s=null!=(t=o.find((function(e){return e.default})))?t:o[0];if(!s)throw new Error("Unexpected error: 0 tabValues");return s.value}({defaultValue:r,tabValues:b})})),g=m[0],k=m[1],x=f({queryString:l,groupId:d}),w=x[0],y=x[1],j=(t=function(e){return e?"docusaurus.tab."+e:null}({groupId:d}.groupId),n=(0,u.Dv)(t),s=n[0],a=n[1],[s,(0,o.useCallback)((function(e){t&&a.set(e)}),[t,a])]),v=j[0],S=j[1],A=function(){var e=null!=w?w:v;return p({value:e,tabValues:b})?e:null}();return(0,i.A)((function(){A&&k(A)}),[A]),{selectedValue:g,selectValue:(0,o.useCallback)((function(e){if(!p({value:e,tabValues:b}))throw new Error("Can't select invalid tab value="+e);k(e),y(e),S(e)}),[y,S,b]),tabValues:b}}var m=n(92303);const g={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var k=n(74848);function x(e){var t=e.className,n=e.block,o=e.selectedValue,r=e.selectValue,i=e.tabValues,c=[],l=(0,a.a_)().blockElementScrollPositionUntilNextRender,u=function(e){var t=e.currentTarget,n=c.indexOf(t),s=i[n].value;s!==o&&(l(t),r(s))},d=function(e){var t,n=null;switch(e.key){case"Enter":u(e);break;case"ArrowRight":var o,s=c.indexOf(e.currentTarget)+1;n=null!=(o=c[s])?o:c[0];break;case"ArrowLeft":var a,r=c.indexOf(e.currentTarget)-1;n=null!=(a=c[r])?a:c[c.length-1]}null==(t=n)||t.focus()};return(0,k.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,s.A)("tabs",{"tabs--block":n},t),children:i.map((function(e){var t=e.value,n=e.label,a=e.attributes;return(0,k.jsx)("li",Object.assign({role:"tab",tabIndex:o===t?0:-1,"aria-selected":o===t,ref:function(e){return c.push(e)},onKeyDown:d,onClick:u},a,{className:(0,s.A)("tabs__item",g.tabItem,null==a?void 0:a.className,{"tabs__item--active":o===t}),children:null!=n?n:t}),t)}))})}function w(e){var t=e.lazy,n=e.children,a=e.selectedValue,r=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){var i=r.find((function(e){return e.props.value===a}));return i?(0,o.cloneElement)(i,{className:(0,s.A)("margin-top--md",i.props.className)}):null}return(0,k.jsx)("div",{className:"margin-top--md",children:r.map((function(e,t){return(0,o.cloneElement)(e,{key:t,hidden:e.props.value!==a})}))})}function y(e){var t=b(e);return(0,k.jsxs)("div",{className:(0,s.A)("tabs-container",g.tabList),children:[(0,k.jsx)(x,Object.assign({},t,e)),(0,k.jsx)(w,Object.assign({},t,e))]})}function j(e){var t=(0,m.A)();return(0,k.jsx)(y,Object.assign({},e,{children:d(e.children)}),String(t))}},53465:(e,t,n)=>{"use strict";n.d(t,{W:()=>l});var o=n(96540),s=n(44586),a=["zero","one","two","few","many","other"];function r(e){return a.filter((function(t){return e.includes(t)}))}var i={locale:"en",pluralForms:r(["one","other"]),select:function(e){return 1===e?"one":"other"}};function c(){var e=(0,s.A)().i18n.currentLocale;return(0,o.useMemo)((function(){try{return t=e,n=new Intl.PluralRules(t),{locale:t,pluralForms:r(n.resolvedOptions().pluralCategories),select:function(e){return n.select(e)}}}catch(o){return console.error('Failed to use Intl.PluralRules for locale "'+e+'".\nDocusaurus will fallback to the default (English) implementation.\nError: '+o.message+"\n"),i}var t,n}),[e])}function l(){var e=c();return{selectMessage:function(t,n){return function(e,t,n){var o=e.split("|");if(1===o.length)return o[0];o.length>n.pluralForms.length&&console.error("For locale="+n.locale+", a maximum of "+n.pluralForms.length+" plural forms are expected ("+n.pluralForms.join(",")+"), but the message contains "+o.length+": "+e);var s=n.select(t),a=n.pluralForms.indexOf(s);return o[Math.min(a,o.length-1)]}(n,t,e)}}}},59637:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const o=n.p+"assets/images/AccountData-struct-118d0bf533806084460cba05bef62b9c.png"},36105:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const o=n.p+"assets/images/warning-multichain-account-0719ff59691f3ff48562d92ef2295e84.png"},47790:()=>{}}]); \ No newline at end of file diff --git a/assets/js/9f804621.af321897.js b/assets/js/9f804621.af321897.js deleted file mode 100644 index bcd9101fe2ec..000000000000 --- a/assets/js/9f804621.af321897.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk=self.webpackChunk||[]).push([[1431],{92415:(e,t,n)=>{"use strict";n.r(t),n.d(t,{assets:()=>u,contentTitle:()=>c,default:()=>p,frontMatter:()=>i,metadata:()=>l,toc:()=>d});var o=n(74848),s=n(28453),a=(n(47379),n(11470),n(19365),n(3514)),r=n(67141);const i={id:"learn-guides-accounts",title:"Polkadot-JS Guides about Accounts",sidebar_label:"Account Guides",description:"Polkadot-JS Guides about Accounts",keyword:["guides","polkadot-js","accounts"],slug:"../learn-guides-accounts"},c=void 0,l={id:"learn/learn-guides-accounts",title:"Polkadot-JS Guides about Accounts",description:"Polkadot-JS Guides about Accounts",source:"@site/../docs/learn/learn-guides-accounts.md",sourceDirName:"learn",slug:"/learn-guides-accounts",permalink:"/docs/learn-guides-accounts",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-accounts.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1729847256e3,frontMatter:{id:"learn-guides-accounts",title:"Polkadot-JS Guides about Accounts",sidebar_label:"Account Guides",description:"Polkadot-JS Guides about Accounts",keyword:["guides","polkadot-js","accounts"],slug:"../learn-guides-accounts"},sidebar:"docs",previous:{title:"Polkadot-JS Guides",permalink:"/docs/learn-polkadot-js-guides"},next:{title:"Multisig Guides",permalink:"/docs/learn-guides-accounts-multisig"}},u={},d=[{value:"Account Address Format",id:"account-address-format",level:2},{value:"Polkadot-JS Browser Extension",id:"polkadot-js-browser-extension",level:2},{value:"Account Backup using the Polkadot-JS Browser Extension",id:"account-backup-using-the-polkadot-js-browser-extension",level:3},{value:"Reset Password using the Polkadot-JS Browser Extension",id:"reset-password-using-the-polkadot-js-browser-extension",level:3},{value:"Restore Account on the Polkadot-JS Browser Extension",id:"restore-account-on-the-polkadot-js-browser-extension",level:3},{value:"Polkadot-JS UI",id:"polkadot-js-ui",level:2},{value:"Account Backup using the Polkadot-JS UI",id:"account-backup-using-the-polkadot-js-ui",level:3},{value:"Reset password using the Polkadot-JS UI",id:"reset-password-using-the-polkadot-js-ui",level:3},{value:"Restore Account on the Polkadot-JS UI",id:"restore-account-on-the-polkadot-js-ui",level:3},{value:"Unlocking Locks",id:"unlocking-locks",level:3},{value:"Query Account Data in Polkadot-JS",id:"query-account-data-in-polkadot-js",level:2},{value:"Vanity Generator",id:"vanity-generator",level:2},{value:"Encryption Enhancement",id:"encryption-enhancement",level:2}];function h(e){const t={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(r.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the Polkadot-JS UI, you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,o.jsx)(a.A,{}),"\n",(0,o.jsx)(t.h2,{id:"account-address-format",children:"Account Address Format"}),"\n",(0,o.jsxs)(t.p,{children:["An account created on the relay chain can also be used on multiple chains in the ecosystem. More\nspecifically, the account of a chain that uses the ",(0,o.jsx)(t.code,{children:"*25519"})," account address format (the latest list\ncan be accessed on the\n",(0,o.jsx)(t.a,{href:"https://github.com/paritytech/ss58-registry/blob/main/ss58-registry.json",children:"ss58 registry repository"}),")\nis cross-compatible with all the chains that use the similar format. To switch between the accounts\non different chains, you can follow the guidelines in\n",(0,o.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000103707-can-i-use-the-same-account-on-polkadot-kusama-and-parachains-",children:"this support article"}),".\n",(0,o.jsx)(t.a,{href:"https://polkadot.subscan.io/tools/format_transform",children:"Subscan has a tool"})," you can use to convert your\naddress between the different chain formats."]}),"\n",(0,o.jsxs)(t.admonition,{title:"Using the same account on multiple chains - Pros and Cons",type:"info",children:[(0,o.jsx)(t.p,{children:"The address format differs from chain to chain, but that difference is only visual. The same private\nkey can be used to sign transactions on behalf of the respective accounts on multiple chains. Using\na single account on multiple chains is convenient, as you do not have to deal with multiple mnemonic\nphrases or private keys. But, if your account gets compromised on one chain, the attacker can gain\nfull access to the accounts on all other chains. This also has implications for the account holder's\nprivacy, as knowing the identity of an account on one chain can expose the account holder's identity\non all the chains. In the Accounts tab, the Polkadot-JS UI displays a warning message next to each\nAccount you are using on multiple chains and recommends using different Accounts on different chains\n(see below)."}),(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{alt:"warning multiple chains",src:n(36105).A+"",width:"1103",height:"343"})})]}),"\n",(0,o.jsx)(t.p,{children:'On Polkadot-JS Extension, you can copy your address by clicking the account\'s icon while the desired\nchain format is active. E.g. selecting "Substrate" as the format will change your address, and\nclicking the colorful icon of your account will copy it in that format.'}),"\n",(0,o.jsx)(t.h2,{id:"polkadot-js-browser-extension",children:"Polkadot-JS Browser Extension"}),"\n",(0,o.jsx)("div",{className:"row",children:(0,o.jsxs)("div",{className:"col text--center",children:[(0,o.jsx)("a",{href:"https://www.youtube.com/watch?v=DNU0p5G0Gqc",children:(0,o.jsx)("img",{src:"https://img.youtube.com/vi/DNU0p5G0Gqc/0.jpg",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,o.jsx)("p",{children:(0,o.jsx)("a",{href:"https://www.youtube.com/watch?v=DNU0p5G0Gqc",children:"Polkadot-JS Browser Extension Tutorial"})})]})}),"\n",(0,o.jsx)(t.admonition,{type:"info",children:(0,o.jsxs)(t.p,{children:["For guidelines about how to create an account using the Polkadot Extension, see\n",(0,o.jsx)(t.a,{href:"https://youtu.be/DNU0p5G0Gqc",children:(0,o.jsx)(t.strong,{children:"this video tutorial"})})," and visit\n",(0,o.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000098878-how-to-create-a-dot-account",children:(0,o.jsx)(t.strong,{children:"this support article"})}),"."]})}),"\n",(0,o.jsx)(t.p,{children:"The Polkadot-JS Browser Extension (the Polkadot Extension) provides a reasonable balance of security\nand usability. It provides a separate local mechanism to generate your address and interact with\nPolkadot."}),"\n",(0,o.jsx)(t.p,{children:'This method involves installing the Polkadot Extension and using it as a \u201cvirtual vault," separate\nfrom your browser, to store your private keys. It also allows the signing of transactions and\nsimilar functionality.'}),"\n",(0,o.jsx)(t.p,{children:"It is still running on the same computer you use to connect to the internet and thus is less secure\nthan using Parity Signer or other air-gapped approaches."}),"\n",(0,o.jsx)(t.h3,{id:"account-backup-using-the-polkadot-js-browser-extension",children:"Account Backup using the Polkadot-JS Browser Extension"}),"\n",(0,o.jsxs)(t.p,{children:["See ",(0,o.jsx)(t.a,{href:"https://youtu.be/DNU0p5G0Gqc",children:(0,o.jsx)(t.strong,{children:"this video tutorial"})})," and visit\n",(0,o.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000177677-how-to-export-your-json-backup-file",children:(0,o.jsx)(t.strong,{children:"this support page"})}),"\nto know how to back up your account."]}),"\n",(0,o.jsx)(t.h3,{id:"reset-password-using-the-polkadot-js-browser-extension",children:"Reset Password using the Polkadot-JS Browser Extension"}),"\n",(0,o.jsx)(t.admonition,{type:"info",children:(0,o.jsxs)(t.p,{children:["See ",(0,o.jsx)(t.a,{href:"https://www.youtube.com/watch?v=DNU0p5G0Gqc&t=280s",children:(0,o.jsx)(t.strong,{children:"this video tutorial"})})," to learn how to\nchange the password for an account that has been created on the Polkadot-JS browser extension (i.e.\nan injected account)."]})}),"\n",(0,o.jsx)(t.admonition,{type:"warning",children:(0,o.jsx)(t.p,{children:"Before following the instructions below, make sure you have your mnemonic phrase stored in a safe\nplace accessible to you."})}),"\n",(0,o.jsxs)(t.p,{children:["Let's say you created ",(0,o.jsx)(t.code,{children:"ACCOUNT 1"})," protected by password ",(0,o.jsx)(t.code,{children:"PSW 1"}),". To reset the password of your\n",(0,o.jsx)(t.code,{children:"ACCOUNT 1"})," using the browser extension, you must follow the following steps:"]}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsxs)(t.li,{children:["Go to ",(0,o.jsx)(t.code,{children:"ACCOUNT 1"}),' on the browser extension and click "Forget account". This action will delete the\naccess to your account. Note that your tokens are still in your account on the Polkadot network.']}),"\n",(0,o.jsxs)(t.li,{children:['On the browser extension click the "+" button in the top right corner and select the option\n"Import account from pre-existing seed". After entering the mnemonic phrase, you can choose a new\npassword, ',(0,o.jsx)(t.code,{children:"PSW 2"}),"."]}),"\n"]}),"\n",(0,o.jsx)(t.admonition,{title:"JSON files do not allow changing account passwords",type:"info",children:(0,o.jsxs)(t.p,{children:['If you add the account to the extension using the option "Restore account from backup JSON file",\nthis will allow you to restore access to your account using a JSON file protected by the password\n',(0,o.jsx)(t.code,{children:"PSW 1"}),", but does not let you set a new password. Thus, ",(0,o.jsx)(t.code,{children:"PSW 1"})," will become the account password by\ndefault."]})}),"\n",(0,o.jsx)(t.admonition,{title:"Accounts on Cold wallets do not need passwords",type:"info",children:(0,o.jsxs)(t.p,{children:["For hardware wallets such as ",(0,o.jsx)(t.a,{href:"https://www.ledger.com/",children:"Ledger"}),", you may have to set a PIN for\naccessing the accounts on the device, but you do not need to set a password for every individual\naccount. When you need to make transactions with your account, you are required to sign using your\nLedger device. Also, Ledger wallets let you generate multiple accounts for multiple blockchain\nnetworks without setting different passwords to access such accounts."]})}),"\n",(0,o.jsx)(t.h3,{id:"restore-account-on-the-polkadot-js-browser-extension",children:"Restore Account on the Polkadot-JS Browser Extension"}),"\n",(0,o.jsx)(t.admonition,{type:"info",children:(0,o.jsxs)(t.p,{children:["See ",(0,o.jsx)(t.a,{href:"https://youtu.be/9ohp8k4Hz8c",children:(0,o.jsx)(t.strong,{children:"this video tutorial"})})," and\n",(0,o.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000169952-how-to-restore-your-account-in-the-polkadot-extension",children:(0,o.jsx)(t.strong,{children:"this support page"})}),"\nto learn how to restore your account on the Polkadot-JS UI."]})}),"\n",(0,o.jsx)(t.h2,{id:"polkadot-js-ui",children:"Polkadot-JS UI"}),"\n",(0,o.jsx)(t.admonition,{type:"info",children:(0,o.jsxs)(t.p,{children:["For guidelines about how to create an account using Polkadot-JS UI, see\n",(0,o.jsx)(t.a,{href:"https://youtu.be/DNU0p5G0Gqc",children:(0,o.jsx)(t.strong,{children:"this video tutorial"})})," and visit\n",(0,o.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000180529",children:(0,o.jsx)(t.strong,{children:"this support article"})}),"."]})}),"\n",(0,o.jsx)(t.admonition,{type:"caution",children:(0,o.jsxs)(t.p,{children:["If you use this method to create your account and clear your cookies in your browser, your account\nwill be lost forever if you do not ",(0,o.jsx)(t.a,{href:"#restore-account-on-the-polkadot-js-ui",children:"back it up"}),". Make sure\nyou store your seed phrase in a safe place or download the account's JSON file if using the\nPolkadot-JS browser extension. Learn more about account backup and restoration\n",(0,o.jsx)(t.a,{href:"#restore-account-on-the-polkadot-js-ui",children:"here"}),"."]})}),"\n",(0,o.jsxs)(t.p,{children:["Local in-browser account storage is disabled by default on the Polkadot-JS UI. To create an account\nusing the Polkadot-JS UI, navigate to settings > account options and click on allow local in-browser\naccount storage in the drop-down menu. Using the Polkadot-JS user interface without a browser\nextension is ",(0,o.jsx)(t.strong,{children:"not recommended"}),". It is the least secure way of generating an account. It should\nonly be used if all other methods are not feasible."]}),"\n",(0,o.jsx)(t.h3,{id:"account-backup-using-the-polkadot-js-ui",children:"Account Backup using the Polkadot-JS UI"}),"\n",(0,o.jsx)(t.admonition,{type:"info",children:(0,o.jsxs)(t.p,{children:["See ",(0,o.jsx)(t.a,{href:"https://youtu.be/DNU0p5G0Gqc",children:(0,o.jsx)(t.strong,{children:"this video tutorial"})})," and visit\n",(0,o.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000177677-how-to-export-your-json-backup-file",children:(0,o.jsx)(t.strong,{children:"this support page"})}),"\nto know how to back up your account."]})}),"\n",(0,o.jsx)(t.h3,{id:"reset-password-using-the-polkadot-js-ui",children:"Reset password using the Polkadot-JS UI"}),"\n",(0,o.jsx)(t.p,{children:'To reset the password of an account created with Polkadot-JS Apps UI, you need to go to the\n"Accounts" tab, click the icon with three vertical dots on your account and select "Change this\naccount\'s password".'}),"\n",(0,o.jsxs)(t.p,{children:["See ",(0,o.jsx)(t.a,{href:"https://youtu.be/DNU0p5G0Gqc?t=261",children:(0,o.jsx)(t.strong,{children:"this video tutorial"})})," to learn how to change the\npassword for an account created on the Polkadot-JS UI (i.e. a non-injected account)."]}),"\n",(0,o.jsx)(t.admonition,{type:"note",children:(0,o.jsxs)(t.p,{children:["If you create an account first using Polkadot-JS Apps UI and then add it to the browser extension,\nyou need to follow the\n",(0,o.jsx)(t.a,{href:"#reset-password-using-the-browser-extension",children:"guidelines for the browser extension"})," to change the\npassword of such an account."]})}),"\n",(0,o.jsx)(t.h3,{id:"restore-account-on-the-polkadot-js-ui",children:"Restore Account on the Polkadot-JS UI"}),"\n",(0,o.jsxs)(t.p,{children:["See ",(0,o.jsx)(t.a,{href:"https://youtu.be/cBsZqFpBANY",children:(0,o.jsx)(t.strong,{children:"this video tutorial"})})," and\n",(0,o.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000180110-how-to-restore-your-account-in-polkadot-js-ui",children:(0,o.jsx)(t.strong,{children:"this support page"})}),"\nto learn how to restore your account on the Polkadot-JS UI."]}),"\n",(0,o.jsx)(t.h3,{id:"unlocking-locks",children:"Unlocking Locks"}),"\n",(0,o.jsx)(t.admonition,{title:"Locks do not stack!",type:"info",children:(0,o.jsxs)(t.p,{children:["The biggest lock decides the total amount of locked funds. See\n",(0,o.jsx)(t.a,{href:"https://youtu.be/LHgY7ds_bZ0",children:(0,o.jsx)(t.strong,{children:"this walk-through video tutorial"})})," that will guide you in the\nprocess of unlocking funds in the example above."]})}),"\n",(0,o.jsx)(t.p,{children:"In the example, the locked balance is 0.55 KSM because the biggest lock is on democracy and is 0.55\nKSM. As soon as the democracy lock is removed the next biggest lock is on staking 0.5 KSM (bonded\n0.4 KSM + redeemable 0.1 KSM). This means that the locked balance will be 0.5 KSM, and 0.05 KSM will\nbe added to the transferrable balance. After redeeming the unbonded 0.1 KSM, the locked balance will\nbe 0.4 KSM, and an additional 0.1 KSM will be added to the transferrable balance. Now the biggest\nlock is still the bonded one. This means that even if we remove the vested lock, the locked balance\nwill still be 0.4 KSM and no tokens will be added to the transferrable balance. To free those bonded\ntokens we will need to unbond them and wait for the unbonding period to make them redeemable. If we\nremove the proxy the reserved funds will be automatically added to the transferrable balance."}),"\n",(0,o.jsx)(t.h2,{id:"query-account-data-in-polkadot-js",children:"Query Account Data in Polkadot-JS"}),"\n",(0,o.jsxs)(t.p,{children:["In the Polkadot-JS UI, you can also query account data under\n",(0,o.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/chainstate",children:"Developer > Chain state"}),". Under ",(0,o.jsx)(t.code,{children:"selected state query"}),"\nchoose the system pallet followed by ",(0,o.jsx)(t.code,{children:"account(AccountId32): FrameSystemAccountInfo"}),", under ",(0,o.jsx)(t.code,{children:"Option"}),'\nchoose an account, and then click on the "+" button on the right.']}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{alt:"account_balance_types",src:n(59637).A+"",width:"1636",height:"343"})}),"\n",(0,o.jsx)(t.p,{children:"Account information include:"}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.code,{children:"nonce"}),", the number of transactions the account sent."]}),"\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.code,{children:"consumers"}),", the number of other modules that currently depend on this account's existence. The\naccount cannot be reaped until this is zero."]}),"\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.code,{children:"providers"}),", the number of other modules that allow this account to exist. The account may not be\nreaped until this and ",(0,o.jsx)(t.code,{children:"sufficients"})," are both zero."]}),"\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.code,{children:"sufficients"}),", the number of modules that allow this account to exist for their own purposes. The\naccount may not be reaped until this and ",(0,o.jsx)(t.code,{children:"providers"})," are both zero."]}),"\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.code,{children:"data"}),", the additional data that belongs to this account. Used to store the balance(s) in a lot of\nchains."]}),"\n"]}),"\n",(0,o.jsxs)(t.p,{children:["More in-depth information about the above data can be found in the\n",(0,o.jsx)(t.a,{href:"https://github.com/paritytech/substrate/blob/2e7fde832b77b242269b136f1c3b6fffef86f9b6/frame/system/src/lib.rs#LL767C1-L781C24",children:"substrate code base"}),"."]}),"\n",(0,o.jsxs)(t.p,{children:["The ",(0,o.jsx)(t.code,{children:"AccountData"})," structure defines the balance types in Substrate. The three types of balances\ninclude:"]}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.code,{children:"free"}),", is the balance that is free but not necessarily transferrable."]}),"\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.code,{children:"reserved"}),", is the balance that is not free, and it is put on hold for on-chain activity such as\ndeposits for multi-signature calls, setting up proxies and identities, and other actions that hold\nstate on the network."]}),"\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.code,{children:"frozen"}),", is the amount that is free to use for on-chain activity but is locked in staking,\ngovernance, or vesting."]}),"\n"]}),"\n",(0,o.jsxs)(t.p,{children:["The ",(0,o.jsx)(t.strong,{children:"usable"})," or transferrable balance of the account is currently calculated using the formula\nbelow:"]}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{children:"transferable = free - max(frozen - reserved, ED)\n"})}),"\n",(0,o.jsxs)(t.p,{children:["Where ED is the existential deposit. The ",(0,o.jsx)(t.strong,{children:"total"})," balance of the account is the sum of ",(0,o.jsx)(t.code,{children:"free"})," and\n",(0,o.jsx)(t.code,{children:"reserved"})," funds. The ",(0,o.jsx)(t.code,{children:"flags"})," describe extra information about the account."]}),"\n",(0,o.jsxs)(t.p,{children:["More in-depth information about the above data can be found in the\n",(0,o.jsx)(t.a,{href:"https://github.com/paritytech/substrate/blob/2e7fde832b77b242269b136f1c3b6fffef86f9b6/frame/balances/src/types.rs#LL95-L114",children:"balances pallet in the Substrate code base"}),"."]}),"\n",(0,o.jsx)(t.h2,{id:"vanity-generator",children:"Vanity Generator"}),"\n",(0,o.jsxs)(t.p,{children:["The vanity generator is a tool on ",(0,o.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/accounts/vanity",children:"Polkadot-JS UI"}),"\nthat lets you generate addresses that contain a specific substring. For the tutorial on how to\ncreate an account using Vanity Generator, visit\n",(0,o.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000171416",children:"this support article"}),"."]}),"\n",(0,o.jsx)(t.h2,{id:"encryption-enhancement",children:"Encryption Enhancement"}),"\n",(0,o.jsxs)(t.p,{children:["Some newly generated ",(0,o.jsx)(t.code,{children:"JSON"})," account files cannot be imported (restored) into older wallet software.\nThis is due to an enhanced encryption method, noticeable in a slight delay when\nencrypting/decrypting your wallet. If you cannot load a ",(0,o.jsx)(t.code,{children:"JSON"})," file, please use the latest version\nof the wallet software. If you cannot load it, ensure that the wallet software uses the newest\nversion of the ",(0,o.jsx)(t.a,{href:"https://polkadot.js.org/api/",children:"Polkadot API"}),"."]})]})}function p(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(h,{...e})}):h(e)}},67141:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var o=n(96540),s=n(74848);const a=function(e){var t,n=e.message,a=(0,o.useState)(!0),r=a[0],i=a[1];return(0,s.jsx)(s.Fragment,{children:r&&(0,s.jsxs)("div",{className:"message-box",children:[(0,s.jsx)("button",{className:"close-button",onClick:function(){i(!1)},children:"\u2716 "}),(0,s.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(t=n,t.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},47379:(e,t,n)=>{"use strict";n.d(t,{A:()=>h});var o=n(90675),s=n(10467),a=n(96540),r=n(19588),i=n(2026),c=n(11135);function l(e,t,n){return u.apply(this,arguments)}function u(){return(u=(0,s.A)((0,o.A)().mark((function e(t,n,s){var a,c,l,u,d;return(0,o.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a=void 0,c=void 0,e.t0=t,e.next="polkadot"===e.t0?5:"kusama"===e.t0?7:"statemine"===e.t0?9:"statemint"===e.t0?11:"polkadotpeople"===e.t0?13:"kusamapeople"===e.t0?15:17;break;case 5:return a="wss://rpc.polkadot.io",e.abrupt("break",18);case 7:return a="wss://kusama-rpc.polkadot.io/",e.abrupt("break",18);case 9:return a="wss://statemine-rpc.polkadot.io/",e.abrupt("break",18);case 11:return a="wss://statemint-rpc.polkadot.io/",e.abrupt("break",18);case 13:return a="wss://polkadot-people-rpc.polkadot.io/",e.abrupt("break",18);case 15:return a="wss://kusama-people-rpc.polkadot.io/",e.abrupt("break",18);case 17:console.log("Unknown socket url provided, no connection made.");case 18:if(void 0!==a){e.next=22;break}return e.abrupt("return");case 22:return l=new r.E(a),e.next=25,i.G.create({provider:l});case 25:u=e.sent,(d=n.split(".")).forEach((function(e){e in u&&(u=u[e])})),e.t1=d[0],e.next="consts"===e.t1?31:"query"===e.t1?33:38;break;case 31:return c=u.toString(),e.abrupt("break",39);case 33:return e.next=35,u();case 35:return c=(c=e.sent).toString(),e.abrupt("break",39);case 38:console.log("Unknown path prefix ("+d[0]+") in "+n);case 39:return e.abrupt("return",c);case 40:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function d(e,t,n,o){switch(t){case"humanReadable":(0,c.HumanReadable)(e,n,o);break;case"precise":(0,c.Precise)(e,n,o);break;case"blocksToDays":(0,c.BlocksToDays)(e,o);break;case"erasToDays":(0,c.ErasToDays)(e,o,n);break;case"percentage":(0,c.Percentage)(e,o);break;case"permillToPercent":(0,c.PermillToPercent)(e,o);break;case"arrayLength":(0,c.ArrayLength)(e,o);break;default:return void console.log("Ignoring unknown filter type")}}const h=function(e){var t=e.network,n=e.path,r=e.defaultValue,i=e.filter,c=void 0===i?void 0:i,u=(0,a.useState)(""),h=u[0],p=u[1];return t=t.toLowerCase(),(0,a.useEffect)((function(){void 0!==c?d(r.toString(),c,t,p):p(r.toString());var e=void 0;switch(t){case"polkadot":e="wss://rpc.polkadot.io";break;case"kusama":e="wss://kusama-rpc.polkadot.io/";break;case"statemine":e="wss://kusama-asset-hub-rpc.polkadot.io/";break;case"statemint":e="wss://polkadot-asset-hub-rpc.polkadot.io/";break;case"kusamapeople":e="wss://kusama-people-rpc.polkadot.io";break;case"polkadotpeople":e="wss://polkadot-people-rpc.polkadot.io";break;default:console.log("Unknown network provided, "+t)}if(void 0===e)console.log("Failed to connect to a valid websocket, applying default");else{var a=function(){var e=(0,s.A)((0,o.A)().mark((function e(){var s;return(0,o.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l(t,n,p);case 2:if(void 0!==(s=e.sent)){e.next=7;break}return e.abrupt("return");case 7:void 0!==c?d(s,c,t,p):p(s);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();try{a()}catch(i){console.log(i)}}}),[]),h}},11135:e=>{var t="polkadot",n="kusama",o="statemine",s="statemint",a="polkadotpeople",r="kusamapeople",i={polkadot:{precision:1e10,symbol:"DOT"},kusama:{precision:1e12,symbol:"KSM"},statemint:{precision:1e10,symbol:"DOT"},statemine:{precision:1e12,symbol:"KSM"},polkadotpeople:{precision:1e10,symbol:"DOT"},kusamapeople:{precision:1e12,symbol:"KSM"}};e.exports={HumanReadable:function(e,c,l){var u=void 0;if(c===t||c===s)u=3;else if(c===n||c===o||c===a)u=6;else{if(c!=r)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");u=8}e=parseFloat(e),l((e=Number.isInteger(e/i[c].precision)?e/i[c].precision+" "+i[c].symbol:(e/i[c].precision).toFixed(u)+" "+i[c].symbol).toString())},Precise:function(e,t,n){n(e=(e=parseFloat(e))/i[t].precision+" "+i[t].symbol)},BlocksToDays:function(e,t){t((e=6*e/86400).toString())},ErasToDays:function(e,i,c){var l=void 0;if(c===t||c===s||c==a)l=1;else{if(c!==n&&c!==o&&c!=r)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");l=4}i((e/=l).toString())},Percentage:function(e,t){t((e/=1e7).toString())},PermillToPercent:function(e,t){t((e/=1e4).toString())},ArrayLength:function(e,t){t((e=e.split(",").length).toString())}}},3514:(e,t,n)=>{"use strict";n.d(t,{A:()=>k});n(96540);var o=n(34164),s=n(26972),a=n(28774),r=n(53465),i=n(16654),c=n(21312),l=n(51107);const u={cardContainer:"cardContainer_fWXF",cardTitle:"cardTitle_rnsV",cardDescription:"cardDescription_PWke"};var d=n(74848);function h(e){var t=e.href,n=e.children;return(0,d.jsx)(a.A,{href:t,className:(0,o.A)("card padding--lg",u.cardContainer),children:n})}function p(e){var t=e.href,n=e.icon,s=e.title,a=e.description;return(0,d.jsxs)(h,{href:t,children:[(0,d.jsxs)(l.A,{as:"h2",className:(0,o.A)("text--truncate",u.cardTitle),title:s,children:[n," ",s]}),a&&(0,d.jsx)("p",{className:(0,o.A)("text--truncate",u.cardDescription),title:a,children:a})]})}function f(e){var t,n,o=e.item,a=(0,s.Nr)(o),i=(n=(0,r.W)().selectMessage,function(e){return n(e,(0,c.T)({message:"1 item|{count} items",id:"theme.docs.DocCard.categoryDescription.plurals",description:"The default description for a category card in the generated index about how many items this category includes"},{count:e}))});return a?(0,d.jsx)(p,{href:a,icon:"\ud83d\uddc3\ufe0f",title:o.label,description:null!=(t=o.description)?t:i(o.items.length)}):null}function b(e){var t,n,o=e.item,a=(0,i.A)(o.href)?"\ud83d\udcc4\ufe0f":"\ud83d\udd17",r=(0,s.cC)(null!=(t=o.docId)?t:void 0);return(0,d.jsx)(p,{href:o.href,icon:a,title:o.label,description:null!=(n=o.description)?n:null==r?void 0:r.description})}function m(e){var t=e.item;switch(t.type){case"link":return(0,d.jsx)(b,{item:t});case"category":return(0,d.jsx)(f,{item:t});default:throw new Error("unknown item type "+JSON.stringify(t))}}function g(e){var t=e.className,n=(0,s.$S)();return(0,d.jsx)(k,{items:n.items,className:t})}function k(e){var t=e.items,n=e.className;if(!t)return(0,d.jsx)(g,Object.assign({},e));var a=(0,s.d1)(t);return(0,d.jsx)("section",{className:(0,o.A)("row",n),children:a.map((function(e,t){return(0,d.jsx)("article",{className:"col col--6 margin-bottom--lg",children:(0,d.jsx)(m,{item:e})},t)}))})}},19365:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});n(96540);var o=n(34164);const s={tabItem:"tabItem_Ymn6"};var a=n(74848);function r(e){var t=e.children,n=e.hidden,r=e.className;return(0,a.jsx)("div",{role:"tabpanel",className:(0,o.A)(s.tabItem,r),hidden:n,children:t})}},11470:(e,t,n)=>{"use strict";n.d(t,{A:()=>j});var o=n(96540),s=n(34164),a=n(23104),r=n(56347),i=n(205),c=n(57485),l=n(31682),u=n(75376);function d(e){var t,n;return null!=(t=null==(n=o.Children.toArray(e).filter((function(e){return"\n"!==e})).map((function(e){if(!e||(0,o.isValidElement)(e)&&((t=e.props)&&"object"==typeof t&&"value"in t))return e;var t;throw new Error("Docusaurus error: Bad child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:n.filter(Boolean))?t:[]}function h(e){var t=e.values,n=e.children;return(0,o.useMemo)((function(){var e=null!=t?t:function(e){return d(e).map((function(e){var t=e.props;return{value:t.value,label:t.label,attributes:t.attributes,default:t.default}}))}(n);return function(e){var t=(0,l.XI)(e,(function(e,t){return e.value===t.value}));if(t.length>0)throw new Error('Docusaurus error: Duplicate values "'+t.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[t,n])}function p(e){var t=e.value;return e.tabValues.some((function(e){return e.value===t}))}function f(e){var t=e.queryString,n=void 0!==t&&t,s=e.groupId,a=(0,r.W6)(),i=function(e){var t=e.queryString,n=void 0!==t&&t,o=e.groupId;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!o)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=o?o:null}({queryString:n,groupId:s});return[(0,c.aZ)(i),(0,o.useCallback)((function(e){if(i){var t=new URLSearchParams(a.location.search);t.set(i,e),a.replace(Object.assign({},a.location,{search:t.toString()}))}}),[i,a])]}function b(e){var t,n,s,a,r=e.defaultValue,c=e.queryString,l=void 0!==c&&c,d=e.groupId,b=h(e),m=(0,o.useState)((function(){return function(e){var t,n=e.defaultValue,o=e.tabValues;if(0===o.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!p({value:n,tabValues:o}))throw new Error('Docusaurus error: The has a defaultValue "'+n+'" but none of its children has the corresponding value. Available values are: '+o.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return n}var s=null!=(t=o.find((function(e){return e.default})))?t:o[0];if(!s)throw new Error("Unexpected error: 0 tabValues");return s.value}({defaultValue:r,tabValues:b})})),g=m[0],k=m[1],x=f({queryString:l,groupId:d}),w=x[0],y=x[1],j=(t=function(e){return e?"docusaurus.tab."+e:null}({groupId:d}.groupId),n=(0,u.Dv)(t),s=n[0],a=n[1],[s,(0,o.useCallback)((function(e){t&&a.set(e)}),[t,a])]),v=j[0],S=j[1],A=function(){var e=null!=w?w:v;return p({value:e,tabValues:b})?e:null}();return(0,i.A)((function(){A&&k(A)}),[A]),{selectedValue:g,selectValue:(0,o.useCallback)((function(e){if(!p({value:e,tabValues:b}))throw new Error("Can't select invalid tab value="+e);k(e),y(e),S(e)}),[y,S,b]),tabValues:b}}var m=n(92303);const g={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var k=n(74848);function x(e){var t=e.className,n=e.block,o=e.selectedValue,r=e.selectValue,i=e.tabValues,c=[],l=(0,a.a_)().blockElementScrollPositionUntilNextRender,u=function(e){var t=e.currentTarget,n=c.indexOf(t),s=i[n].value;s!==o&&(l(t),r(s))},d=function(e){var t,n=null;switch(e.key){case"Enter":u(e);break;case"ArrowRight":var o,s=c.indexOf(e.currentTarget)+1;n=null!=(o=c[s])?o:c[0];break;case"ArrowLeft":var a,r=c.indexOf(e.currentTarget)-1;n=null!=(a=c[r])?a:c[c.length-1]}null==(t=n)||t.focus()};return(0,k.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,s.A)("tabs",{"tabs--block":n},t),children:i.map((function(e){var t=e.value,n=e.label,a=e.attributes;return(0,k.jsx)("li",Object.assign({role:"tab",tabIndex:o===t?0:-1,"aria-selected":o===t,ref:function(e){return c.push(e)},onKeyDown:d,onClick:u},a,{className:(0,s.A)("tabs__item",g.tabItem,null==a?void 0:a.className,{"tabs__item--active":o===t}),children:null!=n?n:t}),t)}))})}function w(e){var t=e.lazy,n=e.children,a=e.selectedValue,r=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){var i=r.find((function(e){return e.props.value===a}));return i?(0,o.cloneElement)(i,{className:(0,s.A)("margin-top--md",i.props.className)}):null}return(0,k.jsx)("div",{className:"margin-top--md",children:r.map((function(e,t){return(0,o.cloneElement)(e,{key:t,hidden:e.props.value!==a})}))})}function y(e){var t=b(e);return(0,k.jsxs)("div",{className:(0,s.A)("tabs-container",g.tabList),children:[(0,k.jsx)(x,Object.assign({},t,e)),(0,k.jsx)(w,Object.assign({},t,e))]})}function j(e){var t=(0,m.A)();return(0,k.jsx)(y,Object.assign({},e,{children:d(e.children)}),String(t))}},53465:(e,t,n)=>{"use strict";n.d(t,{W:()=>l});var o=n(96540),s=n(44586),a=["zero","one","two","few","many","other"];function r(e){return a.filter((function(t){return e.includes(t)}))}var i={locale:"en",pluralForms:r(["one","other"]),select:function(e){return 1===e?"one":"other"}};function c(){var e=(0,s.A)().i18n.currentLocale;return(0,o.useMemo)((function(){try{return t=e,n=new Intl.PluralRules(t),{locale:t,pluralForms:r(n.resolvedOptions().pluralCategories),select:function(e){return n.select(e)}}}catch(o){return console.error('Failed to use Intl.PluralRules for locale "'+e+'".\nDocusaurus will fallback to the default (English) implementation.\nError: '+o.message+"\n"),i}var t,n}),[e])}function l(){var e=c();return{selectMessage:function(t,n){return function(e,t,n){var o=e.split("|");if(1===o.length)return o[0];o.length>n.pluralForms.length&&console.error("For locale="+n.locale+", a maximum of "+n.pluralForms.length+" plural forms are expected ("+n.pluralForms.join(",")+"), but the message contains "+o.length+": "+e);var s=n.select(t),a=n.pluralForms.indexOf(s);return o[Math.min(a,o.length-1)]}(n,t,e)}}}},59637:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const o=n.p+"assets/images/AccountData-struct-118d0bf533806084460cba05bef62b9c.png"},36105:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const o=n.p+"assets/images/warning-multichain-account-0719ff59691f3ff48562d92ef2295e84.png"},47790:()=>{}}]); \ No newline at end of file diff --git a/assets/js/a2800a5b.5f372241.js b/assets/js/a2800a5b.5f372241.js new file mode 100644 index 000000000000..8fb90cd66c2f --- /dev/null +++ b/assets/js/a2800a5b.5f372241.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3234],{52350:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>r,default:()=>h,frontMatter:()=>o,metadata:()=>a,toc:()=>d});const a=JSON.parse('{"id":"build/build-transaction-construction","title":"Transaction Construction and Signing","description":"Information about how transactions are constructed on Polkadot.","source":"@site/../docs/build/build-transaction-construction.md","sourceDirName":"build","slug":"/build-transaction-construction","permalink":"/docs/build-transaction-construction","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/build/build-transaction-construction.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1726730833000,"frontMatter":{"id":"build-transaction-construction","title":"Transaction Construction and Signing","sidebar_label":"Transaction Construction","description":"Information about how transactions are constructed on Polkadot.","keywords":["transaction","transaction construction","format","tools"],"slug":"../build-transaction-construction"},"sidebar":"docs","previous":{"title":"Archive","permalink":"/docs/build-archive-index"},"next":{"title":"Integration Initiation","permalink":"/docs/build-integration"}}');var s=t(74848),i=t(28453);const o={id:"build-transaction-construction",title:"Transaction Construction and Signing",sidebar_label:"Transaction Construction",description:"Information about how transactions are constructed on Polkadot.",keywords:["transaction","transaction construction","format","tools"],slug:"../build-transaction-construction"},r=void 0,c={},d=[{value:"Transaction Format",id:"transaction-format",level:2},{value:"Polkadot-JS Tools",id:"polkadot-js-tools",level:2},{value:"Tx Wrapper",id:"tx-wrapper",level:2},{value:"Submitting a Signed Payload",id:"submitting-a-signed-payload",level:2},{value:"Notes",id:"notes",level:2}];function l(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(n.p,{children:["This page will discuss the transaction format in Polkadot and how to create, sign, and broadcast\ntransactions. Like the other pages in this guide, this page demonstrates some of the available\ntools. ",(0,s.jsx)(n.strong,{children:"Always refer to each tool's documentation when integrating."})]}),"\n",(0,s.jsx)(n.h2,{id:"transaction-format",children:"Transaction Format"}),"\n",(0,s.jsx)(n.p,{children:"Polkadot has some basic transaction information that is common to all transactions."}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Address: The SS58-encoded address of the sending account."}),"\n",(0,s.jsxs)(n.li,{children:["Block Hash: The hash of the ",(0,s.jsx)(n.a,{href:"/docs/build-protocol-info#transaction-mortality",children:"checkpoint"})," block."]}),"\n",(0,s.jsx)(n.li,{children:"Block Number: The number of the checkpoint block."}),"\n",(0,s.jsx)(n.li,{children:"Genesis Hash: The genesis hash of the chain."}),"\n",(0,s.jsx)(n.li,{children:"Metadata: The SCALE-encoded metadata for the runtime when submitted."}),"\n",(0,s.jsx)(n.li,{children:"Nonce: The nonce for this transaction.*"}),"\n",(0,s.jsx)(n.li,{children:"Spec Version: The current spec version for the runtime."}),"\n",(0,s.jsx)(n.li,{children:"Transaction Version: The current version for transaction format."}),"\n",(0,s.jsxs)(n.li,{children:["Tip: Optional, the ",(0,s.jsx)(n.a,{href:"/docs/build-protocol-info#fees",children:"tip"})," to increase transaction priority."]}),"\n",(0,s.jsx)(n.li,{children:"Mode: The flag indicating whether to verify the metadata hash or not."}),"\n",(0,s.jsxs)(n.li,{children:["Era Period: Optional, the number of blocks after the checkpoint for which a transaction is valid.\nIf zero, the transaction is ",(0,s.jsx)(n.a,{href:"/docs/build-protocol-info#transaction-mortality",children:"immortal"})]}),"\n",(0,s.jsx)(n.li,{children:"MetadataHash: Optional, the metadata hash which should match the RUNTIME_METADATA_HASH environment\nvariable."}),"\n"]}),"\n",(0,s.jsx)(n.admonition,{type:"caution",children:(0,s.jsx)(n.p,{children:"There are risks to making a transaction immortal. If an account is reaped and a user re-funds the\naccount, then they could replay an immortal transaction. Always default to using a mortal extrinsic."})}),"\n",(0,s.jsx)(n.p,{children:"*The nonce queried from the System module does not account for pending transactions. You must track\nand increment the nonce manually if you want to submit multiple valid transactions at the same time."}),"\n",(0,s.jsxs)(n.p,{children:["Each transaction will have its own (or no) parameters to add. For example, the ",(0,s.jsx)(n.code,{children:"transferKeepAlive"}),"\nfunction from the Balances pallet will take:"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"dest"}),": Destination address"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"#[compact] value"}),": Number of tokens (compact encoding)"]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["Refer to ",(0,s.jsx)(n.a,{href:"https://spec.polkadot.network/id-extrinsics",children:"the protocol specifications"}),", for the\nconcrete specifications and types to build a transaction."]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Mode and MetadataHash"})}),"\n",(0,s.jsxs)(n.p,{children:["The mode and metadataHash fields were introduced in transaction construction to support the optional\n",(0,s.jsxs)(n.a,{href:"https://github.com/polkadot-fellows/RFCs/blob/main/text/0078-merkleized-metadata.md",children:[(0,s.jsx)(n.code,{children:"CheckMetadataHash"})," Signed Extension"]}),".\nThis enables trustless metadata verification by allowing the chain to verify the correctness of the\nmetadata used without the need of a trusted party. This functionality was included in\n",(0,s.jsx)(n.a,{href:"https://github.com/polkadot-fellows/runtimes/releases/tag/v1.2.5",children:"v1.2.5"})," runtime release by the\nFellowship. A user may up out of this functionality by setting the mode to ",(0,s.jsx)(n.code,{children:"0"}),". When the mode is 00,\nthe ",(0,s.jsx)(n.code,{children:"metadataHash"})," field is empty/None."]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Serialized transactions and metadata"})}),"\n",(0,s.jsxs)(n.p,{children:["Before being submitted, transactions are serialized. Serialized transactions are hex encoded\nSCALE-encoded bytes. The relay chain runtimes are upgradable and therefore any interfaces are\nsubject to change, the metadata allows developers to structure any extrinsics or storage entries\naccordingly. The metadata provides you with all of the information required to know how to construct\nthe serialized call data specific to your transaction. You can read more about the metadata, its\nformat and how to get it in the\n",(0,s.jsx)(n.a,{href:"https://docs.substrate.io/reference/command-line-tools/subxt/#metadata",children:"Substrate documentation"}),"."]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Summary"})}),"\n",(0,s.jsx)(n.p,{children:"The typical transaction workflow is as follows:"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsx)(n.li,{children:"Construct an unsigned transaction."}),"\n",(0,s.jsx)(n.li,{children:"Create a signing payload."}),"\n",(0,s.jsx)(n.li,{children:"Sign the payload."}),"\n",(0,s.jsx)(n.li,{children:"Serialize the signed payload into a transaction."}),"\n",(0,s.jsx)(n.li,{children:"Submit the serialized transaction."}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"Parity provides the following tools to help perform these steps."}),"\n",(0,s.jsx)(n.h2,{id:"polkadot-js-tools",children:"Polkadot-JS Tools"}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.a,{href:"https://github.com/polkadot-js/tools",children:"Polkadot-JS Tools"}),' contains a set of command line tools for\ninteracting with a Substrate client, including one called "Signer CLI" to create, sign, and\nbroadcast transactions.']}),"\n",(0,s.jsxs)(n.p,{children:["This example will use the ",(0,s.jsx)(n.code,{children:"signer submit"})," command, which will create and submit the transaction. The\n",(0,s.jsx)(n.code,{children:"signer sendOffline"})," command has the exact same API, but will not broadcast the transaction.\n",(0,s.jsx)(n.code,{children:"submit"})," and ",(0,s.jsx)(n.code,{children:"sendOffline"})," must be connected to a node to fetch the current metadata and construct a\nvalid transaction. Their API has the format:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"yarn run:signer --account --ws [param1] [...] [paramX]\n"})}),"\n",(0,s.jsx)(n.p,{children:"Signing:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"yarn run:signer sign --account --seed --type \n"})}),"\n",(0,s.jsxs)(n.p,{children:["For example, let's send 0.5 DOT from ",(0,s.jsx)(n.code,{children:"121X5bEgTZcGQx5NZjwuTjqqKoiG8B2wEAvrUFjuw24ZGZf2"})," to\n",(0,s.jsx)(n.code,{children:"15vrtLsCQFG3qRYUcaEeeEih4JwepocNJHkpsrqojqnZPc2y"}),"."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"yarn run:signer submit --account 121X5bEgTZcGQx5NZjwuTjqqKoiG8B2wEAvrUFjuw24ZGZf2 --ws ws://127.0.0.1:9944 balances.transferKeepAlive 15vrtLsCQFG3qRYUcaEeeEih4JwepocNJHkpsrqojqnZPc2y 5000000000\n"})}),"\n",(0,s.jsx)(n.p,{children:"This will return a payload to sign and an input waiting for a signature. Take this payload and use\nyour normal signing environment (e.g. air gapped machine, VM, etc.). Sign the payload:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:'yarn run:signer sign --account 121X5bEgTZcGQx5NZjwuTjqqKoiG8B2wEAvrUFjuw24ZGZf2 --seed "pulp gaze fuel ... mercy inherit equal" --type sr25519 0x040300ff4a83f1...a8239139ff3ff7c3f6\n'})}),"\n",(0,s.jsxs)(n.p,{children:["Save the output and bring it to the machine that you will broadcast from, enter it into ",(0,s.jsx)(n.code,{children:"submit"}),"'s\nsignature field, and send the transaction (or just return the serialized transaction if using\n",(0,s.jsx)(n.code,{children:"sendOffline"}),")."]}),"\n",(0,s.jsx)(n.h2,{id:"tx-wrapper",children:"Tx Wrapper"}),"\n",(0,s.jsxs)(n.p,{children:["If you do not want to use the CLI for signing operations, Parity provides an SDK called\n",(0,s.jsx)(n.a,{href:"https://github.com/paritytech/txwrapper-core",children:"TxWrapper Core"})," to generate and sign transactions\noffline. For Polkadot, Kusama, and select parachains, use the ",(0,s.jsx)(n.code,{children:"txwrapper-polkadot"})," package. Other\nSubstrate-based chains will have their own ",(0,s.jsx)(n.code,{children:"txwrapper-{chain}"})," implementations. See the\n",(0,s.jsx)(n.a,{href:"https://github.com/paritytech/txwrapper-core/blob/main/packages/txwrapper-examples/README.md",children:"examples"}),"\nfor a guide."]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Import a private key"})}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",children:"import { importPrivateKey } from '@substrate/txwrapper-polkadot';\n\nconst keypair = importPrivateKey(\u201cpulp gaze fuel ... mercy inherit equal\u201d);\n"})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Derive an address from a public key"})}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",children:"import { deriveAddress } from '@substrate/txwrapper-polkadot';\n\n// Public key, can be either hex string, or Uint8Array\nconst publicKey = \u201c0x2ca17d26ca376087dc30ed52deb74bf0f64aca96fe78b05ec3e720a72adb1235\u201d;\nconst address = deriveAddress(publicKey);\n"})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Construct a transaction offline"})}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",children:'import { methods } from "@substrate/txwrapper-polkadot";\n\nconst unsigned = methods.balances.transferKeepAlive(\n {\n dest: "15vrtLsCQFG3qRYUcaEeeEih4JwepocNJHkpsrqojqnZPc2y",\n value: 5000000000,\n },\n {\n address: "121X5bEgTZcGQx5NZjwuTjqqKoiG8B2wEAvrUFjuw24ZGZf2",\n blockHash: "0x1fc7493f3c1e9ac758a183839906475f8363aafb1b1d3e910fe16fab4ae1b582",\n blockNumber: 4302222,\n genesisHash: "0xe3777fa922cafbff200cadeaea1a76bd7898ad5b89f7848999058b50e715f636",\n metadataRpc, // must import from client RPC call state_getMetadata\n nonce: 2,\n specVersion: 1019,\n tip: 0,\n eraPeriod: 64, // number of blocks from checkpoint that transaction is valid\n transactionVersion: 1,\n },\n {\n metadataRpc,\n registry, // Type registry\n }\n);\n'})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Construct a signing payload"})}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",children:'import { methods, createSigningPayload } from \'@substrate/txwrapper-polkadot\';\n\n// See "Construct a transaction offline" for "{...}"\nconst unsigned = methods.balances.transferKeepAlive({...}, {...}, {...});\nconst signingPayload = createSigningPayload(unsigned, { registry });\n'})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Serialize a signed transaction"})}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",children:'import { createSignedTx } from "@substrate/txwrapper-polkadot";\n\n// Example code, replace `signWithAlice` with actual remote signer.\n// An example is given here:\n// https://github.com/paritytech/txwrapper-core/blob/b213cabf50f18f0fe710817072a81596e1a53cae/packages/txwrapper-core/src/test-helpers/signWithAlice.ts\nconst signature = await signWithAlice(signingPayload);\nconst signedTx = createSignedTx(unsigned, signature, { metadataRpc, registry });\n'})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Decode payload types"})}),"\n",(0,s.jsx)(n.p,{children:"You may want to decode payloads to verify their contents prior to submission."}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",children:'import { decode } from "@substrate/txwrapper-polkadot";\n\n// Decode an unsigned tx\nconst txInfo = decode(unsigned, { metadataRpc, registry });\n\n// Decode a signing payload\nconst txInfo = decode(signingPayload, { metadataRpc, registry });\n\n// Decode a signed tx\nconst txInfo = decode(signedTx, { metadataRpc, registry });\n'})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Check a transaction's hash"})}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",children:"import { getTxHash } from \u2018@substrate/txwrapper-polkadot\u2019;\nconst txHash = getTxHash(signedTx);\n"})}),"\n",(0,s.jsx)(n.h2,{id:"submitting-a-signed-payload",children:"Submitting a Signed Payload"}),"\n",(0,s.jsx)(n.p,{children:"There are several ways to submit a signed payload:"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["Signer CLI (",(0,s.jsx)(n.code,{children:"yarn run:signer submit --tx --ws "}),")"]}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"/docs/build-node-interaction#substrate-api-sidecar",children:"Substrate API Sidecar"})}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"/docs/build-node-interaction#polkadot-rpc",children:"RPC"})," with ",(0,s.jsx)(n.code,{children:"author_submitExtrinsic"})," or\n",(0,s.jsx)(n.code,{children:"author_submitAndWatchExtrinsic"}),", the latter of which will subscribe you to events to be notified\nas a transaction gets validated and included in the chain."]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"notes",children:"Notes"}),"\n",(0,s.jsxs)(n.p,{children:["Some addresses to use in the examples. See\n",(0,s.jsx)(n.a,{href:"https://docs.substrate.io/reference/command-line-tools/subkey/",children:"Subkey documentation"}),"."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"$ subkey --network polkadot generate\nSecret phrase `pulp gaze fuel ... mercy inherit equal` is account:\n Secret seed: 0x57450b3e09ba4598 ... ... ... ... ... ... ... .. 219756eeba80bb16\n Public key (hex): 0x2ca17d26ca376087dc30ed52deb74bf0f64aca96fe78b05ec3e720a72adb1235\n Account ID: 0x2ca17d26ca376087dc30ed52deb74bf0f64aca96fe78b05ec3e720a72adb1235\n SS58 Address: 121X5bEgTZcGQx5NZjwuTjqqKoiG8B2wEAvrUFjuw24ZGZf2\n\n$ subkey --network polkadot generate\nSecret phrase `exercise auction soft ... obey control easily` is account:\n Secret seed: 0x5f4bbb9fbb69261a ... ... ... ... ... ... ... .. 4691ed7d1130fbbd\n Public key (hex): 0xda04de6cd781c98acf0693dfb97c11011938ad22fcc476ed0089ac5aec3fe243\n Account ID: 0xda04de6cd781c98acf0693dfb97c11011938ad22fcc476ed0089ac5aec3fe243\n SS58 Address: 15vrtLsCQFG3qRYUcaEeeEih4JwepocNJHkpsrqojqnZPc2y\n"})})]})}function h(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},28453:(e,n,t)=>{t.d(n,{R:()=>o,x:()=>r});var a=t(96540);const s={},i=a.createContext(s);function o(e){const n=a.useContext(i);return a.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:o(e.components),a.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/a2800a5b.c1295ab6.js b/assets/js/a2800a5b.c1295ab6.js deleted file mode 100644 index 09157dd00b6f..000000000000 --- a/assets/js/a2800a5b.c1295ab6.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3234],{29389:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>o,default:()=>h,frontMatter:()=>i,metadata:()=>r,toc:()=>d});var a=t(74848),s=t(28453);const i={id:"build-transaction-construction",title:"Transaction Construction and Signing",sidebar_label:"Transaction Construction",description:"Information about how transactions are constructed on Polkadot.",keywords:["transaction","transaction construction","format","tools"],slug:"../build-transaction-construction"},o=void 0,r={id:"build/build-transaction-construction",title:"Transaction Construction and Signing",description:"Information about how transactions are constructed on Polkadot.",source:"@site/../docs/build/build-transaction-construction.md",sourceDirName:"build",slug:"/build-transaction-construction",permalink:"/docs/build-transaction-construction",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/build/build-transaction-construction.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1726730833e3,frontMatter:{id:"build-transaction-construction",title:"Transaction Construction and Signing",sidebar_label:"Transaction Construction",description:"Information about how transactions are constructed on Polkadot.",keywords:["transaction","transaction construction","format","tools"],slug:"../build-transaction-construction"},sidebar:"docs",previous:{title:"Archive",permalink:"/docs/build-archive-index"},next:{title:"Integration Initiation",permalink:"/docs/build-integration"}},c={},d=[{value:"Transaction Format",id:"transaction-format",level:2},{value:"Polkadot-JS Tools",id:"polkadot-js-tools",level:2},{value:"Tx Wrapper",id:"tx-wrapper",level:2},{value:"Submitting a Signed Payload",id:"submitting-a-signed-payload",level:2},{value:"Notes",id:"notes",level:2}];function l(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(n.p,{children:["This page will discuss the transaction format in Polkadot and how to create, sign, and broadcast\ntransactions. Like the other pages in this guide, this page demonstrates some of the available\ntools. ",(0,a.jsx)(n.strong,{children:"Always refer to each tool's documentation when integrating."})]}),"\n",(0,a.jsx)(n.h2,{id:"transaction-format",children:"Transaction Format"}),"\n",(0,a.jsx)(n.p,{children:"Polkadot has some basic transaction information that is common to all transactions."}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:"Address: The SS58-encoded address of the sending account."}),"\n",(0,a.jsxs)(n.li,{children:["Block Hash: The hash of the ",(0,a.jsx)(n.a,{href:"/docs/build-protocol-info#transaction-mortality",children:"checkpoint"})," block."]}),"\n",(0,a.jsx)(n.li,{children:"Block Number: The number of the checkpoint block."}),"\n",(0,a.jsx)(n.li,{children:"Genesis Hash: The genesis hash of the chain."}),"\n",(0,a.jsx)(n.li,{children:"Metadata: The SCALE-encoded metadata for the runtime when submitted."}),"\n",(0,a.jsx)(n.li,{children:"Nonce: The nonce for this transaction.*"}),"\n",(0,a.jsx)(n.li,{children:"Spec Version: The current spec version for the runtime."}),"\n",(0,a.jsx)(n.li,{children:"Transaction Version: The current version for transaction format."}),"\n",(0,a.jsxs)(n.li,{children:["Tip: Optional, the ",(0,a.jsx)(n.a,{href:"/docs/build-protocol-info#fees",children:"tip"})," to increase transaction priority."]}),"\n",(0,a.jsx)(n.li,{children:"Mode: The flag indicating whether to verify the metadata hash or not."}),"\n",(0,a.jsxs)(n.li,{children:["Era Period: Optional, the number of blocks after the checkpoint for which a transaction is valid.\nIf zero, the transaction is ",(0,a.jsx)(n.a,{href:"/docs/build-protocol-info#transaction-mortality",children:"immortal"})]}),"\n",(0,a.jsx)(n.li,{children:"MetadataHash: Optional, the metadata hash which should match the RUNTIME_METADATA_HASH environment\nvariable."}),"\n"]}),"\n",(0,a.jsx)(n.admonition,{type:"caution",children:(0,a.jsx)(n.p,{children:"There are risks to making a transaction immortal. If an account is reaped and a user re-funds the\naccount, then they could replay an immortal transaction. Always default to using a mortal extrinsic."})}),"\n",(0,a.jsx)(n.p,{children:"*The nonce queried from the System module does not account for pending transactions. You must track\nand increment the nonce manually if you want to submit multiple valid transactions at the same time."}),"\n",(0,a.jsxs)(n.p,{children:["Each transaction will have its own (or no) parameters to add. For example, the ",(0,a.jsx)(n.code,{children:"transferKeepAlive"}),"\nfunction from the Balances pallet will take:"]}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.code,{children:"dest"}),": Destination address"]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.code,{children:"#[compact] value"}),": Number of tokens (compact encoding)"]}),"\n"]}),"\n",(0,a.jsxs)(n.p,{children:["Refer to ",(0,a.jsx)(n.a,{href:"https://spec.polkadot.network/id-extrinsics",children:"the protocol specifications"}),", for the\nconcrete specifications and types to build a transaction."]}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.strong,{children:"Mode and MetadataHash"})}),"\n",(0,a.jsxs)(n.p,{children:["The mode and metadataHash fields were introduced in transaction construction to support the optional\n",(0,a.jsxs)(n.a,{href:"https://github.com/polkadot-fellows/RFCs/blob/main/text/0078-merkleized-metadata.md",children:[(0,a.jsx)(n.code,{children:"CheckMetadataHash"})," Signed Extension"]}),".\nThis enables trustless metadata verification by allowing the chain to verify the correctness of the\nmetadata used without the need of a trusted party. This functionality was included in\n",(0,a.jsx)(n.a,{href:"https://github.com/polkadot-fellows/runtimes/releases/tag/v1.2.5",children:"v1.2.5"})," runtime release by the\nFellowship. A user may up out of this functionality by setting the mode to ",(0,a.jsx)(n.code,{children:"0"}),". When the mode is 00,\nthe ",(0,a.jsx)(n.code,{children:"metadataHash"})," field is empty/None."]}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.strong,{children:"Serialized transactions and metadata"})}),"\n",(0,a.jsxs)(n.p,{children:["Before being submitted, transactions are serialized. Serialized transactions are hex encoded\nSCALE-encoded bytes. The relay chain runtimes are upgradable and therefore any interfaces are\nsubject to change, the metadata allows developers to structure any extrinsics or storage entries\naccordingly. The metadata provides you with all of the information required to know how to construct\nthe serialized call data specific to your transaction. You can read more about the metadata, its\nformat and how to get it in the\n",(0,a.jsx)(n.a,{href:"https://docs.substrate.io/reference/command-line-tools/subxt/#metadata",children:"Substrate documentation"}),"."]}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.strong,{children:"Summary"})}),"\n",(0,a.jsx)(n.p,{children:"The typical transaction workflow is as follows:"}),"\n",(0,a.jsxs)(n.ol,{children:["\n",(0,a.jsx)(n.li,{children:"Construct an unsigned transaction."}),"\n",(0,a.jsx)(n.li,{children:"Create a signing payload."}),"\n",(0,a.jsx)(n.li,{children:"Sign the payload."}),"\n",(0,a.jsx)(n.li,{children:"Serialize the signed payload into a transaction."}),"\n",(0,a.jsx)(n.li,{children:"Submit the serialized transaction."}),"\n"]}),"\n",(0,a.jsx)(n.p,{children:"Parity provides the following tools to help perform these steps."}),"\n",(0,a.jsx)(n.h2,{id:"polkadot-js-tools",children:"Polkadot-JS Tools"}),"\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.a,{href:"https://github.com/polkadot-js/tools",children:"Polkadot-JS Tools"}),' contains a set of command line tools for\ninteracting with a Substrate client, including one called "Signer CLI" to create, sign, and\nbroadcast transactions.']}),"\n",(0,a.jsxs)(n.p,{children:["This example will use the ",(0,a.jsx)(n.code,{children:"signer submit"})," command, which will create and submit the transaction. The\n",(0,a.jsx)(n.code,{children:"signer sendOffline"})," command has the exact same API, but will not broadcast the transaction.\n",(0,a.jsx)(n.code,{children:"submit"})," and ",(0,a.jsx)(n.code,{children:"sendOffline"})," must be connected to a node to fetch the current metadata and construct a\nvalid transaction. Their API has the format:"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"yarn run:signer --account --ws [param1] [...] [paramX]\n"})}),"\n",(0,a.jsx)(n.p,{children:"Signing:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"yarn run:signer sign --account --seed --type \n"})}),"\n",(0,a.jsxs)(n.p,{children:["For example, let's send 0.5 DOT from ",(0,a.jsx)(n.code,{children:"121X5bEgTZcGQx5NZjwuTjqqKoiG8B2wEAvrUFjuw24ZGZf2"})," to\n",(0,a.jsx)(n.code,{children:"15vrtLsCQFG3qRYUcaEeeEih4JwepocNJHkpsrqojqnZPc2y"}),"."]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"yarn run:signer submit --account 121X5bEgTZcGQx5NZjwuTjqqKoiG8B2wEAvrUFjuw24ZGZf2 --ws ws://127.0.0.1:9944 balances.transferKeepAlive 15vrtLsCQFG3qRYUcaEeeEih4JwepocNJHkpsrqojqnZPc2y 5000000000\n"})}),"\n",(0,a.jsx)(n.p,{children:"This will return a payload to sign and an input waiting for a signature. Take this payload and use\nyour normal signing environment (e.g. air gapped machine, VM, etc.). Sign the payload:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'yarn run:signer sign --account 121X5bEgTZcGQx5NZjwuTjqqKoiG8B2wEAvrUFjuw24ZGZf2 --seed "pulp gaze fuel ... mercy inherit equal" --type sr25519 0x040300ff4a83f1...a8239139ff3ff7c3f6\n'})}),"\n",(0,a.jsxs)(n.p,{children:["Save the output and bring it to the machine that you will broadcast from, enter it into ",(0,a.jsx)(n.code,{children:"submit"}),"'s\nsignature field, and send the transaction (or just return the serialized transaction if using\n",(0,a.jsx)(n.code,{children:"sendOffline"}),")."]}),"\n",(0,a.jsx)(n.h2,{id:"tx-wrapper",children:"Tx Wrapper"}),"\n",(0,a.jsxs)(n.p,{children:["If you do not want to use the CLI for signing operations, Parity provides an SDK called\n",(0,a.jsx)(n.a,{href:"https://github.com/paritytech/txwrapper-core",children:"TxWrapper Core"})," to generate and sign transactions\noffline. For Polkadot, Kusama, and select parachains, use the ",(0,a.jsx)(n.code,{children:"txwrapper-polkadot"})," package. Other\nSubstrate-based chains will have their own ",(0,a.jsx)(n.code,{children:"txwrapper-{chain}"})," implementations. See the\n",(0,a.jsx)(n.a,{href:"https://github.com/paritytech/txwrapper-core/blob/main/packages/txwrapper-examples/README.md",children:"examples"}),"\nfor a guide."]}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.strong,{children:"Import a private key"})}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-ts",children:"import { importPrivateKey } from '@substrate/txwrapper-polkadot';\n\nconst keypair = importPrivateKey(\u201cpulp gaze fuel ... mercy inherit equal\u201d);\n"})}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.strong,{children:"Derive an address from a public key"})}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-ts",children:"import { deriveAddress } from '@substrate/txwrapper-polkadot';\n\n// Public key, can be either hex string, or Uint8Array\nconst publicKey = \u201c0x2ca17d26ca376087dc30ed52deb74bf0f64aca96fe78b05ec3e720a72adb1235\u201d;\nconst address = deriveAddress(publicKey);\n"})}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.strong,{children:"Construct a transaction offline"})}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-ts",children:'import { methods } from "@substrate/txwrapper-polkadot";\n\nconst unsigned = methods.balances.transferKeepAlive(\n {\n dest: "15vrtLsCQFG3qRYUcaEeeEih4JwepocNJHkpsrqojqnZPc2y",\n value: 5000000000,\n },\n {\n address: "121X5bEgTZcGQx5NZjwuTjqqKoiG8B2wEAvrUFjuw24ZGZf2",\n blockHash: "0x1fc7493f3c1e9ac758a183839906475f8363aafb1b1d3e910fe16fab4ae1b582",\n blockNumber: 4302222,\n genesisHash: "0xe3777fa922cafbff200cadeaea1a76bd7898ad5b89f7848999058b50e715f636",\n metadataRpc, // must import from client RPC call state_getMetadata\n nonce: 2,\n specVersion: 1019,\n tip: 0,\n eraPeriod: 64, // number of blocks from checkpoint that transaction is valid\n transactionVersion: 1,\n },\n {\n metadataRpc,\n registry, // Type registry\n }\n);\n'})}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.strong,{children:"Construct a signing payload"})}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-ts",children:'import { methods, createSigningPayload } from \'@substrate/txwrapper-polkadot\';\n\n// See "Construct a transaction offline" for "{...}"\nconst unsigned = methods.balances.transferKeepAlive({...}, {...}, {...});\nconst signingPayload = createSigningPayload(unsigned, { registry });\n'})}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.strong,{children:"Serialize a signed transaction"})}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-ts",children:'import { createSignedTx } from "@substrate/txwrapper-polkadot";\n\n// Example code, replace `signWithAlice` with actual remote signer.\n// An example is given here:\n// https://github.com/paritytech/txwrapper-core/blob/b213cabf50f18f0fe710817072a81596e1a53cae/packages/txwrapper-core/src/test-helpers/signWithAlice.ts\nconst signature = await signWithAlice(signingPayload);\nconst signedTx = createSignedTx(unsigned, signature, { metadataRpc, registry });\n'})}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.strong,{children:"Decode payload types"})}),"\n",(0,a.jsx)(n.p,{children:"You may want to decode payloads to verify their contents prior to submission."}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-ts",children:'import { decode } from "@substrate/txwrapper-polkadot";\n\n// Decode an unsigned tx\nconst txInfo = decode(unsigned, { metadataRpc, registry });\n\n// Decode a signing payload\nconst txInfo = decode(signingPayload, { metadataRpc, registry });\n\n// Decode a signed tx\nconst txInfo = decode(signedTx, { metadataRpc, registry });\n'})}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.strong,{children:"Check a transaction's hash"})}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-ts",children:"import { getTxHash } from \u2018@substrate/txwrapper-polkadot\u2019;\nconst txHash = getTxHash(signedTx);\n"})}),"\n",(0,a.jsx)(n.h2,{id:"submitting-a-signed-payload",children:"Submitting a Signed Payload"}),"\n",(0,a.jsx)(n.p,{children:"There are several ways to submit a signed payload:"}),"\n",(0,a.jsxs)(n.ol,{children:["\n",(0,a.jsxs)(n.li,{children:["Signer CLI (",(0,a.jsx)(n.code,{children:"yarn run:signer submit --tx --ws "}),")"]}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"/docs/build-node-interaction#substrate-api-sidecar",children:"Substrate API Sidecar"})}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.a,{href:"/docs/build-node-interaction#polkadot-rpc",children:"RPC"})," with ",(0,a.jsx)(n.code,{children:"author_submitExtrinsic"})," or\n",(0,a.jsx)(n.code,{children:"author_submitAndWatchExtrinsic"}),", the latter of which will subscribe you to events to be notified\nas a transaction gets validated and included in the chain."]}),"\n"]}),"\n",(0,a.jsx)(n.h2,{id:"notes",children:"Notes"}),"\n",(0,a.jsxs)(n.p,{children:["Some addresses to use in the examples. See\n",(0,a.jsx)(n.a,{href:"https://docs.substrate.io/reference/command-line-tools/subkey/",children:"Subkey documentation"}),"."]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"$ subkey --network polkadot generate\nSecret phrase `pulp gaze fuel ... mercy inherit equal` is account:\n Secret seed: 0x57450b3e09ba4598 ... ... ... ... ... ... ... .. 219756eeba80bb16\n Public key (hex): 0x2ca17d26ca376087dc30ed52deb74bf0f64aca96fe78b05ec3e720a72adb1235\n Account ID: 0x2ca17d26ca376087dc30ed52deb74bf0f64aca96fe78b05ec3e720a72adb1235\n SS58 Address: 121X5bEgTZcGQx5NZjwuTjqqKoiG8B2wEAvrUFjuw24ZGZf2\n\n$ subkey --network polkadot generate\nSecret phrase `exercise auction soft ... obey control easily` is account:\n Secret seed: 0x5f4bbb9fbb69261a ... ... ... ... ... ... ... .. 4691ed7d1130fbbd\n Public key (hex): 0xda04de6cd781c98acf0693dfb97c11011938ad22fcc476ed0089ac5aec3fe243\n Account ID: 0xda04de6cd781c98acf0693dfb97c11011938ad22fcc476ed0089ac5aec3fe243\n SS58 Address: 15vrtLsCQFG3qRYUcaEeeEih4JwepocNJHkpsrqojqnZPc2y\n"})})]})}function h(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(l,{...e})}):l(e)}},28453:(e,n,t)=>{t.d(n,{R:()=>o,x:()=>r});var a=t(96540);const s={},i=a.createContext(s);function o(e){const n=a.useContext(i);return a.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:o(e.components),a.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/a29dc56e.368f96e7.js b/assets/js/a29dc56e.368f96e7.js new file mode 100644 index 000000000000..11cb42f01235 --- /dev/null +++ b/assets/js/a29dc56e.368f96e7.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7554],{55221:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>l,contentTitle:()=>i,default:()=>h,frontMatter:()=>a,metadata:()=>t,toc:()=>c});const t=JSON.parse('{"id":"maintain/maintain-guides-how-to-monitor-your-node","title":"Monitor your node","description":"This guide will walk you through how to set up Prometheus with","source":"@site/../docs/maintain/maintain-guides-how-to-monitor-your-node.md","sourceDirName":"maintain","slug":"/maintain-guides-how-to-monitor-your-node","permalink":"/docs/maintain-guides-how-to-monitor-your-node","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/maintain/maintain-guides-how-to-monitor-your-node.md","tags":[],"version":"current","lastUpdatedBy":"github-actions[bot]","lastUpdatedAt":1724683517000,"frontMatter":{"id":"maintain-guides-how-to-monitor-your-node","title":"Monitor your node","sidebar_label":"Monitor your node","descriptions":"Tips on how to monitor your node.","keywords":["node","monitor","dashboard"],"slug":"../maintain-guides-how-to-monitor-your-node"},"sidebar":"docs","previous":{"title":"How to Upgrade Your Validator","permalink":"/docs/maintain-guides-how-to-upgrade"},"next":{"title":"How to Chill","permalink":"/docs/maintain-guides-how-to-chill"}}');var r=s(74848),o=s(28453);const a={id:"maintain-guides-how-to-monitor-your-node",title:"Monitor your node",sidebar_label:"Monitor your node",descriptions:"Tips on how to monitor your node.",keywords:["node","monitor","dashboard"],slug:"../maintain-guides-how-to-monitor-your-node"},i=void 0,l={},c=[{value:"Preparation",id:"preparation",level:2},{value:"Installing and Configuring Prometheus",id:"installing-and-configuring-prometheus",level:2},{value:"Starting Prometheus",id:"starting-prometheus",level:2},{value:"Installing Grafana",id:"installing-grafana",level:2},{value:"Installing and Configuring Alertmanager (Optional)",id:"installing-and-configuring-alertmanager-optional",level:2},{value:"Gmail Setup",id:"gmail-setup",level:3},{value:"AlertManager Configuration",id:"alertmanager-configuration",level:3},{value:"AlertManager Integration",id:"alertmanager-integration",level:3}];function d(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",pre:"pre",ul:"ul",...(0,o.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(n.p,{children:["This guide will walk you through how to set up ",(0,r.jsx)(n.a,{href:"https://prometheus.io/",children:"Prometheus"})," with\n",(0,r.jsx)(n.a,{href:"https://grafana.com/",children:"Grafana"})," to monitor your node using Ubuntu 18.04 or 20.04."]}),"\n",(0,r.jsx)(n.p,{children:"A Substrate-based chain exposes data such as the height of the chain, the number of connected peers\nto your node, CPU, memory usage of your machine, and more. To monitor this data, Prometheus is used\nto collect metrics and Grafana allows for displaying them on the dashboard."}),"\n",(0,r.jsx)(n.h2,{id:"preparation",children:"Preparation"}),"\n",(0,r.jsxs)(n.p,{children:["First, create a user for Prometheus by adding the ",(0,r.jsx)(n.code,{children:"--no-create-home"})," flag to disallow ",(0,r.jsx)(n.code,{children:"prometheus"}),"\nfrom logging in."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"sudo useradd --no-create-home --shell /usr/sbin/nologin prometheus\n"})}),"\n",(0,r.jsx)(n.p,{children:"Create the directories required to store the configuration and executable files."}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"sudo mkdir /etc/prometheus\nsudo mkdir /var/lib/prometheus\n"})}),"\n",(0,r.jsxs)(n.p,{children:["Change the ownership of these directories to ",(0,r.jsx)(n.code,{children:"prometheus"})," so that only prometheus can access them."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"sudo chown -R prometheus:prometheus /etc/prometheus\nsudo chown -R prometheus:prometheus /var/lib/prometheus\n"})}),"\n",(0,r.jsx)(n.h2,{id:"installing-and-configuring-prometheus",children:"Installing and Configuring Prometheus"}),"\n",(0,r.jsxs)(n.p,{children:["After setting up the environment, update your OS, and install the latest Prometheus. You can check\nthe latest release by going to their GitHub repository under the\n",(0,r.jsx)(n.a,{href:"https://github.com/prometheus/prometheus/releases/",children:"releases"})," page."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"sudo apt-get update && apt-get upgrade\nwget https://github.com/prometheus/prometheus/releases/download/v2.26.0/prometheus-2.26.0.linux-amd64.tar.gz\ntar xfz prometheus-*.tar.gz\ncd prometheus-2.26.0.linux-amd64\n"})}),"\n",(0,r.jsx)(n.p,{children:"The following two binaries are in the directory:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"prometheus - Prometheus main binary file"}),"\n",(0,r.jsx)(n.li,{children:"promtool"}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"The following two directories (which contain the web interface, configuration files examples and the\nlicense) are in the directory:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"consoles"}),"\n",(0,r.jsx)(n.li,{children:"console_libraries"}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:["Copy the executable files to the ",(0,r.jsx)(n.code,{children:"/usr/local/bin/"})," directory."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"sudo cp ./prometheus /usr/local/bin/\nsudo cp ./promtool /usr/local/bin/\n"})}),"\n",(0,r.jsxs)(n.p,{children:["Change the ownership of these files to the ",(0,r.jsx)(n.code,{children:"prometheus"})," user."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"sudo chown prometheus:prometheus /usr/local/bin/prometheus\nsudo chown prometheus:prometheus /usr/local/bin/promtool\n"})}),"\n",(0,r.jsxs)(n.p,{children:["Copy the ",(0,r.jsx)(n.code,{children:"consoles"})," and ",(0,r.jsx)(n.code,{children:"console_libraries"})," directories to ",(0,r.jsx)(n.code,{children:"/etc/prometheus"})]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"sudo cp -r ./consoles /etc/prometheus\nsudo cp -r ./console_libraries /etc/prometheus\n"})}),"\n",(0,r.jsxs)(n.p,{children:["Change the ownership of these directories to the ",(0,r.jsx)(n.code,{children:"prometheus"})," user."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"sudo chown -R prometheus:prometheus /etc/prometheus/consoles\nsudo chown -R prometheus:prometheus /etc/prometheus/console_libraries\n"})}),"\n",(0,r.jsxs)(n.p,{children:["Once everything is done, run this command to remove ",(0,r.jsx)(n.code,{children:"prometheus"})," directory."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"cd .. && rm -rf prometheus*\n"})}),"\n",(0,r.jsxs)(n.p,{children:["Before using Prometheus, it needs some configuration. Create a YAML configuration file named\n",(0,r.jsx)(n.code,{children:"prometheus.yml"})," by running the command below."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"sudo nano /etc/prometheus/prometheus.yml\n"})}),"\n",(0,r.jsxs)(n.p,{children:["The configuration file is divided into three parts which are ",(0,r.jsx)(n.code,{children:"global"}),", ",(0,r.jsx)(n.code,{children:"rule_files"}),", and\n",(0,r.jsx)(n.code,{children:"scrape_configs"}),"."]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"scrape_interval"})," defines how often Prometheus scrapes targets, while ",(0,r.jsx)(n.code,{children:"evaluation_interval"}),"\ncontrols how often the software will evaluate rules."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"rule_files"})," block contains information of the location of any rules we want the Prometheus server\nto load."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"scrape_configs"})," contains the information which resources Prometheus monitors."]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"The configuration file should look like this below:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-yaml",children:'global:\n scrape_interval: 15s\n evaluation_interval: 15s\n\nrule_files:\n # - "first.rules"\n # - "second.rules"\n\nscrape_configs:\n - job_name: "prometheus"\n scrape_interval: 5s\n static_configs:\n - targets: ["localhost:9090"]\n - job_name: "substrate_node"\n scrape_interval: 5s\n static_configs:\n - targets: ["localhost:9615"]\n'})}),"\n",(0,r.jsxs)(n.p,{children:["With the above configuration file, the first exporter is the one that Prometheus exports to monitor\nitself. As we want to have more precise information about the state of the Prometheus server we\nreduced the ",(0,r.jsx)(n.code,{children:"scrape_interval"})," to 5 seconds for this job. The parameters ",(0,r.jsx)(n.code,{children:"static_configs"})," and\n",(0,r.jsx)(n.code,{children:"targets"})," determine where the exporters are running. The second exporter is capturing the data from\nyour node, and the port by default is ",(0,r.jsx)(n.code,{children:"9615"}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["You can check the validity of this configuration file by running\n",(0,r.jsx)(n.code,{children:"promtool check config /etc/prometheus/prometheus.yml"}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["Save the configuration file and change the ownership of the file to ",(0,r.jsx)(n.code,{children:"prometheus"})," user."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"sudo chown prometheus:prometheus /etc/prometheus/prometheus.yml\n"})}),"\n",(0,r.jsx)(n.h2,{id:"starting-prometheus",children:"Starting Prometheus"}),"\n",(0,r.jsxs)(n.p,{children:["To test that Prometheus is set up properly, execute the following command to start it as the\n",(0,r.jsx)(n.code,{children:"prometheus"})," user."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"sudo -u prometheus /usr/local/bin/prometheus --config.file /etc/prometheus/prometheus.yml --storage.tsdb.path /var/lib/prometheus/ --web.console.templates=/etc/prometheus/consoles --web.console.libraries=/etc/prometheus/console_libraries\n"})}),"\n",(0,r.jsx)(n.p,{children:"The following messages indicate the status of the server. If you see the following messages, your\nserver is set up properly."}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:'level=info ts=2021-04-16T19:02:20.167Z caller=main.go:380 msg="No time or size retention was set so using the default time retention" duration=15d\nlevel=info ts=2021-04-16T19:02:20.167Z caller=main.go:418 msg="Starting Prometheus" version="(version=2.26.0, branch=HEAD, revision=3cafc58827d1ebd1a67749f88be4218f0bab3d8d)"\nlevel=info ts=2021-04-16T19:02:20.167Z caller=main.go:423 build_context="(go=go1.16.2, user=root@a67cafebe6d0, date=20210331-11:56:23)"\nlevel=info ts=2021-04-16T19:02:20.167Z caller=main.go:424 host_details="(Linux 5.4.0-42-generic #46-Ubuntu SMP Fri Jul 10 00:24:02 UTC 2020 x86_64 ubuntu2004 (none))"\nlevel=info ts=2021-04-16T19:02:20.167Z caller=main.go:425 fd_limits="(soft=1024, hard=1048576)"\nlevel=info ts=2021-04-16T19:02:20.167Z caller=main.go:426 vm_limits="(soft=unlimited, hard=unlimited)"\nlevel=info ts=2021-04-16T19:02:20.169Z caller=web.go:540 component=web msg="Start listening for connections" address=0.0.0.0:9090\nlevel=info ts=2021-04-16T19:02:20.170Z caller=main.go:795 msg="Starting TSDB ..."\nlevel=info ts=2021-04-16T19:02:20.171Z caller=tls_config.go:191 component=web msg="TLS is disabled." http2=false\nlevel=info ts=2021-04-16T19:02:20.174Z caller=head.go:696 component=tsdb msg="Replaying on-disk memory mappable chunks if any"\nlevel=info ts=2021-04-16T19:02:20.175Z caller=head.go:710 component=tsdb msg="On-disk memory mappable chunks replay completed" duration=1.391446ms\nlevel=info ts=2021-04-16T19:02:20.175Z caller=head.go:716 component=tsdb msg="Replaying WAL, this may take a while"\nlevel=info ts=2021-04-16T19:02:20.178Z caller=head.go:768 component=tsdb msg="WAL segment loaded" segment=0 maxSegment=4\nlevel=info ts=2021-04-16T19:02:20.193Z caller=head.go:768 component=tsdb msg="WAL segment loaded" segment=1 maxSegment=4\nlevel=info ts=2021-04-16T19:02:20.221Z caller=head.go:768 component=tsdb msg="WAL segment loaded" segment=2 maxSegment=4\nlevel=info ts=2021-04-16T19:02:20.224Z caller=head.go:768 component=tsdb msg="WAL segment loaded" segment=3 maxSegment=4\nlevel=info ts=2021-04-16T19:02:20.229Z caller=head.go:768 component=tsdb msg="WAL segment loaded" segment=4 maxSegment=4\nlevel=info ts=2021-04-16T19:02:20.229Z caller=head.go:773 component=tsdb msg="WAL replay completed" checkpoint_replay_duration=43.716\xb5s wal_replay_duration=53.973285ms total_replay_duration=55.445308ms\nlevel=info ts=2021-04-16T19:02:20.233Z caller=main.go:815 fs_type=EXT4_SUPER_MAGIC\nlevel=info ts=2021-04-16T19:02:20.233Z caller=main.go:818 msg="TSDB started"\nlevel=info ts=2021-04-16T19:02:20.233Z caller=main.go:944 msg="Loading configuration file" filename=/etc/prometheus/prometheus.yml\nlevel=info ts=2021-04-16T19:02:20.234Z caller=main.go:975 msg="Completed loading of configuration file" filename=/etc/prometheus/prometheus.yml totalDuration=824.115\xb5s remote_storage=3.131\xb5s web_handler=401ns query_engine=1.056\xb5s scrape=236.454\xb5s scrape_sd=45.432\xb5s notify=723ns notify_sd=2.61\xb5s rules=956ns\nlevel=info ts=2021-04-16T19:02:20.234Z caller=main.go:767 msg="Server is ready to receive web requests."\n\n'})}),"\n",(0,r.jsxs)(n.p,{children:["Go to ",(0,r.jsx)(n.code,{children:"http://SERVER_IP_ADDRESS:9090/graph"})," to check whether you are able to access the Prometheus\ninterface or not. If it is working, exit the process by pressing on ",(0,r.jsx)(n.code,{children:"CTRL + C"}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["Next, we would like to automatically start the server during the boot process, so we have to create\na new ",(0,r.jsx)(n.code,{children:"systemd"})," configuration file with the following config."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"sudo nano /etc/systemd/system/prometheus.service\n"})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"[Unit]\n Description=Prometheus Monitoring\n Wants=network-online.target\n After=network-online.target\n\n[Service]\n User=prometheus\n Group=prometheus\n Type=simple\n ExecStart=/usr/local/bin/prometheus \\\n --config.file /etc/prometheus/prometheus.yml \\\n --storage.tsdb.path /var/lib/prometheus/ \\\n --web.console.templates=/etc/prometheus/consoles \\\n --web.console.libraries=/etc/prometheus/console_libraries\n ExecReload=/bin/kill -HUP $MAINPID\n\n[Install]\n WantedBy=multi-user.target\n"})}),"\n",(0,r.jsxs)(n.p,{children:["Once the file is saved, execute the command below to reload ",(0,r.jsx)(n.code,{children:"systemd"})," and enable the service so that\nit will be loaded automatically during the operating system's startup."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"sudo systemctl daemon-reload && systemctl enable prometheus && systemctl start prometheus\n"})}),"\n",(0,r.jsxs)(n.p,{children:["Prometheus should be running now, and you should be able to access its front again end by\nre-visiting ",(0,r.jsx)(n.code,{children:"IP_ADDRESS:9090/"}),"."]}),"\n",(0,r.jsx)(n.h2,{id:"installing-grafana",children:"Installing Grafana"}),"\n",(0,r.jsx)(n.p,{children:"In order to visualize your node metrics, you can use Grafana to query the Prometheus server. Run the\nfollowing commands to install it first."}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"sudo apt-get install -y adduser libfontconfig1\nwget https://dl.grafana.com/oss/release/grafana_7.5.4_amd64.deb\nsudo dpkg -i grafana_7.5.4_amd64.deb\n"})}),"\n",(0,r.jsx)(n.p,{children:"If everything is fine, configure Grafana to auto-start on boot and then start the service."}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"sudo systemctl daemon-reload\nsudo systemctl enable grafana-server\nsudo systemctl start grafana-server\n"})}),"\n",(0,r.jsxs)(n.p,{children:["You can now access it by going to the ",(0,r.jsx)(n.code,{children:"http://SERVER_IP_ADDRESS:3000/login"}),". The default user and\npassword is admin/admin."]}),"\n",(0,r.jsx)(n.admonition,{type:"note",children:(0,r.jsxs)(n.p,{children:["If you want to change the port on which Grafana runs (3000 is a popular port), edit the file\n",(0,r.jsx)(n.code,{children:"/usr/share/grafana/conf/defaults.ini"})," with a command like\n",(0,r.jsx)(n.code,{children:"sudo vim /usr/share/grafana/conf/defaults.ini"})," and change the ",(0,r.jsx)(n.code,{children:"http_port"})," value to something else.\nThen restart grafana with ",(0,r.jsx)(n.code,{children:"sudo systemctl restart grafana-server"}),"."]})}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.img,{alt:"1-grafana-login",src:s(22566).A+"",width:"1500",height:"709"})}),"\n",(0,r.jsxs)(n.p,{children:["In order to visualize the node metrics, click ",(0,r.jsx)(n.em,{children:"settings"})," to configure the ",(0,r.jsx)(n.code,{children:"Data Sources"})," first."]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.img,{alt:"2-add-data-source",src:s(77445).A+"",width:"250",height:"300"})}),"\n",(0,r.jsxs)(n.p,{children:["Click ",(0,r.jsx)(n.code,{children:"Add data source"})," to choose where the data is coming from."]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.img,{alt:"2-add-data-source-2",src:s(95276).A+"",width:"2204",height:"1040"})}),"\n",(0,r.jsxs)(n.p,{children:["Select ",(0,r.jsx)(n.code,{children:"Prometheus"}),"."]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.img,{alt:"3-select-prometheus",src:s(86513).A+"",width:"700",height:"444"})}),"\n",(0,r.jsxs)(n.p,{children:["The only thing you need to input is the ",(0,r.jsx)(n.code,{children:"URL"})," that is ",(0,r.jsx)(n.code,{children:"https://localhost:9090"})," and then click\n",(0,r.jsx)(n.code,{children:"Save & Test"}),". If you see ",(0,r.jsx)(n.code,{children:"Data source is working"}),", your connection is configured correctly."]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.img,{alt:"4-configure-data-source",src:s(58570).A+"",width:"700",height:"729"})}),"\n",(0,r.jsxs)(n.p,{children:['Next, import the dashboard that lets you visualize your node data. Go to the menu bar on the left\nand mouse hover "+" then select ',(0,r.jsx)(n.code,{children:"Import"}),"."]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"Import via grafana.com"})," - It allows you to use a dashboard that someone else has created and made\npublic. You can check what other dashboards are available via\n",(0,r.jsx)(n.a,{href:"https://grafana.com/grafana/dashboards",children:"https://grafana.com/grafana/dashboards"}),". In this guide, we\nuse\n",(0,r.jsx)(n.a,{href:"https://grafana.com/grafana/dashboards/21715-substrate-node-metrics/",children:'"Substrate Node Metrics"'}),', so\ninput "21715" under the id field and click ',(0,r.jsx)(n.code,{children:"Load"}),"."]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.img,{alt:"5-import-dashboard",src:s(88400).A+"",width:"1272",height:"1320"})}),"\n",(0,r.jsxs)(n.p,{children:['Once it has been loaded, make sure to select "Prometheus" in the Prometheus dropdown list. Then\nclick ',(0,r.jsx)(n.code,{children:"Import"}),"."]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.img,{alt:"5-import-dashboard-2",src:s(19877).A+"",width:"1426",height:"1382"})}),"\n",(0,r.jsxs)(n.p,{children:["In the meantime, start your Polkadot node by running ",(0,r.jsx)(n.code,{children:"./polkadot"}),". If everything is done correctly,\nyou should be able to monitor your node's performance such as the current block height, network\ntraffic, running tasks, etc. on the Grafana dashboard."]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.img,{alt:"6-dashboard-metric",src:s(97320).A+"",width:"1551",height:"930"})}),"\n",(0,r.jsx)(n.h2,{id:"installing-and-configuring-alertmanager-optional",children:"Installing and Configuring Alertmanager (Optional)"}),"\n",(0,r.jsx)(n.p,{children:"In this section, let's configure the Alertmanager that helps to predict the potential problem or\nnotify you of the current problem in your server. Alerts can be sent in Slack, Email, Matrix, or\nothers. In this guide, we will show you how to configure the email notifications using Gmail if your\nnode goes down."}),"\n",(0,r.jsx)(n.p,{children:"First, download the latest binary of AlertManager and unzip it by running the command below:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"wget https://github.com/prometheus/alertmanager/releases/download/v0.26.0/alertmanager-0.26.0.linux-amd64.tar.gz\ntar -xvzf alertmanager-0.26.0.linux-amd64.tar.gz\nmv alertmanager-0.26.0.linux-amd64/alertmanager /usr/local/bin\n"})}),"\n",(0,r.jsx)(n.h3,{id:"gmail-setup",children:"Gmail Setup"}),"\n",(0,r.jsxs)(n.p,{children:["To allow AlertManager to send an email to you, you will need to generate something called an\n",(0,r.jsx)(n.code,{children:"app password"})," in your Gmail account. For details, click\n",(0,r.jsx)(n.a,{href:"https://support.google.com/accounts/answer/185833?hl=en",children:"here"})," to follow the whole setup."]}),"\n",(0,r.jsx)(n.p,{children:"You should see something like below:"}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.img,{alt:"grafana-am-1",src:s(51362).A+"",width:"700",height:"680"})}),"\n",(0,r.jsx)(n.p,{children:"Copy and save it somewhere else first."}),"\n",(0,r.jsx)(n.h3,{id:"alertmanager-configuration",children:"AlertManager Configuration"}),"\n",(0,r.jsxs)(n.p,{children:["There is a configuration file named ",(0,r.jsx)(n.code,{children:"alertmanager.yml"})," inside the directory that you just extracted\nin the previous command, but that is not of our use. We will create our ",(0,r.jsx)(n.code,{children:"alertmanager.yml"})," file\nunder ",(0,r.jsx)(n.code,{children:"/etc/alertmanager"})," with the following config."]}),"\n",(0,r.jsxs)(n.admonition,{type:"note",children:[(0,r.jsxs)(n.p,{children:['Ensure to change the ownership of "/etc/alertmanager" to ',(0,r.jsx)(n.code,{children:"prometheus"})," by executing"]}),(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"sudo chown -R prometheus:prometheus /etc/alertmanager\n"})})]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"global:\n resolve_timeout: 1m\n\nroute:\n receiver: 'gmail-notifications'\n\nreceivers:\n- name: 'gmail-notifications'\n email_configs:\n - to: YOUR_EMAIL\n from: YOUR_EMAIL\n smarthost: smtp.gmail.com:587\n auth_username: YOUR_EMAIL\n auth_identity: YOUR_EMAIL\n auth_password: YOUR_APP_PASSWORD\n send_resolved: true\n"})}),"\n",(0,r.jsxs)(n.p,{children:["With the above configuration, alerts will be sent using the email you set above. Remember to change\n",(0,r.jsx)(n.code,{children:"YOUR_EMAIL"})," to your email and paste the app password you just saved earlier to the\n",(0,r.jsx)(n.code,{children:"YOUR_APP_PASSWORD"}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["Next, create another ",(0,r.jsx)(n.code,{children:"systemd"})," configuration file named ",(0,r.jsx)(n.code,{children:"alertmanager.service"})," by running the\ncommand ",(0,r.jsx)(n.code,{children:"sudo nano /etc/systemd/system/alertmanager.service"})," with the following config."]}),"\n",(0,r.jsx)(n.admonition,{title:"SERVER_IP",type:"info",children:(0,r.jsx)(n.p,{children:"Change to your host IP address and make sure port 9093 is opened."})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"[Unit]\nDescription=AlertManager Server Service\nWants=network-online.target\nAfter=network-online.target\n\n[Service]\nUser=root\nGroup=root\nType=simple\nExecStart=/usr/local/bin/alertmanager --config.file /etc/alertmanager/alertmanager.yml --web.external-url=http://SERVER_IP:9093 --cluster.advertise-address='0.0.0.0:9093'\n\n\n[Install]\nWantedBy=multi-user.target\n"})}),"\n",(0,r.jsx)(n.p,{children:"To the start the Alertmanager, run the following commands:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"sudo systemctl daemon-reload && sudo systemctl enable alertmanager && sudo systemctl start alertmanager && sudo systemctl status alertmanager\n"})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"\u25cf alertmanager.service - AlertManager Server Service\n Loaded: loaded (/etc/systemd/system/alertmanager.service; enabled; vendor preset: enabled)\n Active: active (running) since Thu 2020-08-20 22:01:21 CEST; 3 days ago\n Main PID: 20592 (alertmanager)\n Tasks: 70 (limit: 9830)\n CGroup: /system.slice/alertmanager.service\n"})}),"\n",(0,r.jsx)(n.p,{children:'You should see the process status is "active (running)" if you have configured properly.'}),"\n",(0,r.jsx)(n.p,{children:"There is a Alertmanager plugin in Grafana that can help you to monitor the alert information. To\ninstall it, execute the command below:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"sudo grafana-cli plugins install camptocamp-prometheus-alertmanager-datasource\n"})}),"\n",(0,r.jsx)(n.p,{children:"And restart Grafana once the plugin is successfully installed."}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"sudo systemctl restart grafana-server\n"})}),"\n",(0,r.jsxs)(n.p,{children:["Now go to your Grafana dashboard ",(0,r.jsx)(n.code,{children:"SERVER_IP:3000"})," and configure the Alertmanager datasource."]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.img,{alt:"grafana-am-5",src:s(78070).A+"",width:"700",height:"293"})}),"\n",(0,r.jsx)(n.p,{children:'Go to Configuration -> Data Sources, search "Prometheus AlertManger" if you cannot find it at the\ntop.'}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.img,{alt:"grafana-am-2",src:s(70277).A+"",width:"700",height:"363"})}),"\n",(0,r.jsxs)(n.p,{children:["Fill in the ",(0,r.jsx)(n.code,{children:"URL"})," to your server location followed by the port number used in the Alertmanager."]}),"\n",(0,r.jsx)(n.p,{children:'Then click "Save & Test" at the bottom to test the connection.'}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.img,{alt:"grafana-am-3",src:s(1756).A+"",width:"700",height:"823"})}),"\n",(0,r.jsxs)(n.p,{children:["To monitor the alerts, let's import dashboard \"",(0,r.jsx)(n.a,{href:"https://grafana.com/dashboards/8010",children:"8010"}),'" that is\nused for Alertmanager. And make sure to select the "Prometheus AlertManager" in the last column.\nThen click "Import".']}),"\n",(0,r.jsx)(n.p,{children:"You will end up having the following:"}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.img,{alt:"grafana-am-4",src:s(8791).A+"",width:"1200",height:"516"})}),"\n",(0,r.jsx)(n.h3,{id:"alertmanager-integration",children:"AlertManager Integration"}),"\n",(0,r.jsxs)(n.p,{children:["To let the Prometheus server be able to talk to the AlertManager, we will need to add the following\nconfig in the ",(0,r.jsx)(n.code,{children:"etc/prometheus/prometheus.yml"}),"."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"rule_files:\n - 'rules.yml'\n\nalerting:\n alertmanagers:\n - static_configs:\n - targets:\n - localhost:9093\n"})}),"\n",(0,r.jsxs)(n.p,{children:["That is the updated ",(0,r.jsx)(n.code,{children:"etc/prometheus/prometheus.yml"}),"."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"global:\n scrape_interval: 15s\n evaluation_interval: 15s\n\nrule_files:\n - 'rules.yml'\n\nalerting:\n alertmanagers:\n - static_configs:\n - targets:\n - localhost:9093\n\nscrape_configs:\n - job_name: 'prometheus'\n scrape_interval: 5s\n static_configs:\n - targets: ['localhost:9090']\n - job_name: 'substrate_node'\n scrape_interval: 5s\n static_configs:\n - targets: ['localhost:9615']\n"})}),"\n",(0,r.jsxs)(n.p,{children:['We will need to create a new file called "rules.yml" under ',(0,r.jsx)(n.code,{children:"/etc/prometheus/"})," that is defined all\nthe rules we would like to detect. If any of the rules defined in this file is fulfilled, an alert\nwill be triggered. The rule below checks whether the instance is down. If it is down for more than 5\nminutes, an email notification will be sent. If you would like to learn more about the details of\nthe rule defining, go\n",(0,r.jsx)(n.a,{href:"https://prometheus.io/docs/prometheus/latest/configuration/alerting_rules/",children:"here"}),". There are other\ninteresting alerts you may find useful ",(0,r.jsx)(n.a,{href:"https://awesome-prometheus-alerts.grep.to/rules.html",children:"here"}),"."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:'groups:\n - name: alert_rules\n rules:\n - alert: InstanceDown\n expr: up == 0\n for: 5m\n labels:\n severity: critical\n annotations:\n summary: "Instance [{{ $labels.instance }}] down"\n description: "[{{ $labels.instance }}] of job [{{ $labels.job }}] has been down for more than 1 minute."\n'})}),"\n",(0,r.jsxs)(n.p,{children:["Change the ownership of this file to ",(0,r.jsx)(n.code,{children:"prometheus"})," instead of ",(0,r.jsx)(n.code,{children:"root"})," by running:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"sudo chown prometheus:prometheus rules.yml\n"})}),"\n",(0,r.jsx)(n.p,{children:'To check the rules defined in the "rules.yml" is syntactically correct, run the following command:'}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"sudo -u prometheus promtool check rules rules.yml\n"})}),"\n",(0,r.jsx)(n.p,{children:"Finally, restart everything by running:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"sudo systemctl restart prometheus && sudo systemctl restart alertmanager\n"})}),"\n",(0,r.jsx)(n.p,{children:"Now if one of your target instances down, you will receive an alert on the AlertManager and Gmail\nlike below."}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.img,{alt:"grafana-am-6",src:s(14425).A+"",width:"700",height:"529"})})]})}function h(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(d,{...e})}):d(e)}},51362:(e,n,s)=>{s.d(n,{A:()=>t});const t=s.p+"assets/images/1-alert-manager-772a381e44fb289d713129bce0ac1a7e.png"},22566:(e,n,s)=>{s.d(n,{A:()=>t});const t=s.p+"assets/images/1-grafana-login-c1c6fbd7d08509b83393b50c01bb0616.png"},95276:(e,n,s)=>{s.d(n,{A:()=>t});const t=s.p+"assets/images/2-add-data-source-2-1a307a18d157b5a6dcfc5ff9affa9998.png"},77445:(e,n,s)=>{s.d(n,{A:()=>t});const t=s.p+"assets/images/2-add-data-source-d761a4186c463aad357c6130b2881789.png"},70277:(e,n,s)=>{s.d(n,{A:()=>t});const t=s.p+"assets/images/2-alert-manager-d3e306837b2c64bf91a0cad9af6a7864.png"},1756:(e,n,s)=>{s.d(n,{A:()=>t});const t=s.p+"assets/images/3-alert-manager-1fda12aea0c70f3f6844b52b95331aa8.png"},86513:(e,n,s)=>{s.d(n,{A:()=>t});const t=s.p+"assets/images/3-select-prometheus-0791dd096d2ca64c0146121e58f9c3e3.png"},8791:(e,n,s)=>{s.d(n,{A:()=>t});const t=s.p+"assets/images/4-alert-manager-85181686515e903e6a4098ddd9575a2f.png"},58570:(e,n,s)=>{s.d(n,{A:()=>t});const t=s.p+"assets/images/4-configure-data-source-7b1620ce4fc9ab2de90283415cea7df9.png"},78070:(e,n,s)=>{s.d(n,{A:()=>t});const t=s.p+"assets/images/5-alert-manager-c72c2dc814113f58399347add3c1f884.png"},19877:(e,n,s)=>{s.d(n,{A:()=>t});const t=s.p+"assets/images/5-import-dashboard-2-b6118a68ef2f8d78c555735471678f22.png"},88400:(e,n,s)=>{s.d(n,{A:()=>t});const t=s.p+"assets/images/5-import-dashboard-4a6f27887cfd081b9385dfd897787cbd.png"},14425:(e,n,s)=>{s.d(n,{A:()=>t});const t=s.p+"assets/images/6-alert-manager-12cff39ab28672b46017b175f875985b.png"},97320:(e,n,s)=>{s.d(n,{A:()=>t});const t=s.p+"assets/images/6-dashboard-metric-52044f98ca5a45715a8731a4cc96ed1b.png"},28453:(e,n,s)=>{s.d(n,{R:()=>a,x:()=>i});var t=s(96540);const r={},o=t.createContext(r);function a(e){const n=t.useContext(o);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:a(e.components),t.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/a29dc56e.8fc8490e.js b/assets/js/a29dc56e.8fc8490e.js deleted file mode 100644 index b69c61138968..000000000000 --- a/assets/js/a29dc56e.8fc8490e.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7554],{81815:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>l,contentTitle:()=>a,default:()=>h,frontMatter:()=>o,metadata:()=>i,toc:()=>c});var t=s(74848),r=s(28453);const o={id:"maintain-guides-how-to-monitor-your-node",title:"Monitor your node",sidebar_label:"Monitor your node",descriptions:"Tips on how to monitor your node.",keywords:["node","monitor","dashboard"],slug:"../maintain-guides-how-to-monitor-your-node"},a=void 0,i={id:"maintain/maintain-guides-how-to-monitor-your-node",title:"Monitor your node",description:"This guide will walk you through how to set up Prometheus with",source:"@site/../docs/maintain/maintain-guides-how-to-monitor-your-node.md",sourceDirName:"maintain",slug:"/maintain-guides-how-to-monitor-your-node",permalink:"/docs/maintain-guides-how-to-monitor-your-node",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/maintain/maintain-guides-how-to-monitor-your-node.md",tags:[],version:"current",lastUpdatedBy:"github-actions[bot]",lastUpdatedAt:1724683517e3,frontMatter:{id:"maintain-guides-how-to-monitor-your-node",title:"Monitor your node",sidebar_label:"Monitor your node",descriptions:"Tips on how to monitor your node.",keywords:["node","monitor","dashboard"],slug:"../maintain-guides-how-to-monitor-your-node"},sidebar:"docs",previous:{title:"How to Upgrade Your Validator",permalink:"/docs/maintain-guides-how-to-upgrade"},next:{title:"How to Chill",permalink:"/docs/maintain-guides-how-to-chill"}},l={},c=[{value:"Preparation",id:"preparation",level:2},{value:"Installing and Configuring Prometheus",id:"installing-and-configuring-prometheus",level:2},{value:"Starting Prometheus",id:"starting-prometheus",level:2},{value:"Installing Grafana",id:"installing-grafana",level:2},{value:"Installing and Configuring Alertmanager (Optional)",id:"installing-and-configuring-alertmanager-optional",level:2},{value:"Gmail Setup",id:"gmail-setup",level:3},{value:"AlertManager Configuration",id:"alertmanager-configuration",level:3},{value:"AlertManager Integration",id:"alertmanager-integration",level:3}];function d(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",pre:"pre",ul:"ul",...(0,r.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(n.p,{children:["This guide will walk you through how to set up ",(0,t.jsx)(n.a,{href:"https://prometheus.io/",children:"Prometheus"})," with\n",(0,t.jsx)(n.a,{href:"https://grafana.com/",children:"Grafana"})," to monitor your node using Ubuntu 18.04 or 20.04."]}),"\n",(0,t.jsx)(n.p,{children:"A Substrate-based chain exposes data such as the height of the chain, the number of connected peers\nto your node, CPU, memory usage of your machine, and more. To monitor this data, Prometheus is used\nto collect metrics and Grafana allows for displaying them on the dashboard."}),"\n",(0,t.jsx)(n.h2,{id:"preparation",children:"Preparation"}),"\n",(0,t.jsxs)(n.p,{children:["First, create a user for Prometheus by adding the ",(0,t.jsx)(n.code,{children:"--no-create-home"})," flag to disallow ",(0,t.jsx)(n.code,{children:"prometheus"}),"\nfrom logging in."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"sudo useradd --no-create-home --shell /usr/sbin/nologin prometheus\n"})}),"\n",(0,t.jsx)(n.p,{children:"Create the directories required to store the configuration and executable files."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"sudo mkdir /etc/prometheus\nsudo mkdir /var/lib/prometheus\n"})}),"\n",(0,t.jsxs)(n.p,{children:["Change the ownership of these directories to ",(0,t.jsx)(n.code,{children:"prometheus"})," so that only prometheus can access them."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"sudo chown -R prometheus:prometheus /etc/prometheus\nsudo chown -R prometheus:prometheus /var/lib/prometheus\n"})}),"\n",(0,t.jsx)(n.h2,{id:"installing-and-configuring-prometheus",children:"Installing and Configuring Prometheus"}),"\n",(0,t.jsxs)(n.p,{children:["After setting up the environment, update your OS, and install the latest Prometheus. You can check\nthe latest release by going to their GitHub repository under the\n",(0,t.jsx)(n.a,{href:"https://github.com/prometheus/prometheus/releases/",children:"releases"})," page."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"sudo apt-get update && apt-get upgrade\nwget https://github.com/prometheus/prometheus/releases/download/v2.26.0/prometheus-2.26.0.linux-amd64.tar.gz\ntar xfz prometheus-*.tar.gz\ncd prometheus-2.26.0.linux-amd64\n"})}),"\n",(0,t.jsx)(n.p,{children:"The following two binaries are in the directory:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"prometheus - Prometheus main binary file"}),"\n",(0,t.jsx)(n.li,{children:"promtool"}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"The following two directories (which contain the web interface, configuration files examples and the\nlicense) are in the directory:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"consoles"}),"\n",(0,t.jsx)(n.li,{children:"console_libraries"}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["Copy the executable files to the ",(0,t.jsx)(n.code,{children:"/usr/local/bin/"})," directory."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"sudo cp ./prometheus /usr/local/bin/\nsudo cp ./promtool /usr/local/bin/\n"})}),"\n",(0,t.jsxs)(n.p,{children:["Change the ownership of these files to the ",(0,t.jsx)(n.code,{children:"prometheus"})," user."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"sudo chown prometheus:prometheus /usr/local/bin/prometheus\nsudo chown prometheus:prometheus /usr/local/bin/promtool\n"})}),"\n",(0,t.jsxs)(n.p,{children:["Copy the ",(0,t.jsx)(n.code,{children:"consoles"})," and ",(0,t.jsx)(n.code,{children:"console_libraries"})," directories to ",(0,t.jsx)(n.code,{children:"/etc/prometheus"})]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"sudo cp -r ./consoles /etc/prometheus\nsudo cp -r ./console_libraries /etc/prometheus\n"})}),"\n",(0,t.jsxs)(n.p,{children:["Change the ownership of these directories to the ",(0,t.jsx)(n.code,{children:"prometheus"})," user."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"sudo chown -R prometheus:prometheus /etc/prometheus/consoles\nsudo chown -R prometheus:prometheus /etc/prometheus/console_libraries\n"})}),"\n",(0,t.jsxs)(n.p,{children:["Once everything is done, run this command to remove ",(0,t.jsx)(n.code,{children:"prometheus"})," directory."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"cd .. && rm -rf prometheus*\n"})}),"\n",(0,t.jsxs)(n.p,{children:["Before using Prometheus, it needs some configuration. Create a YAML configuration file named\n",(0,t.jsx)(n.code,{children:"prometheus.yml"})," by running the command below."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"sudo nano /etc/prometheus/prometheus.yml\n"})}),"\n",(0,t.jsxs)(n.p,{children:["The configuration file is divided into three parts which are ",(0,t.jsx)(n.code,{children:"global"}),", ",(0,t.jsx)(n.code,{children:"rule_files"}),", and\n",(0,t.jsx)(n.code,{children:"scrape_configs"}),"."]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.code,{children:"scrape_interval"})," defines how often Prometheus scrapes targets, while ",(0,t.jsx)(n.code,{children:"evaluation_interval"}),"\ncontrols how often the software will evaluate rules."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.code,{children:"rule_files"})," block contains information of the location of any rules we want the Prometheus server\nto load."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.code,{children:"scrape_configs"})," contains the information which resources Prometheus monitors."]}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"The configuration file should look like this below:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-yaml",children:'global:\n scrape_interval: 15s\n evaluation_interval: 15s\n\nrule_files:\n # - "first.rules"\n # - "second.rules"\n\nscrape_configs:\n - job_name: "prometheus"\n scrape_interval: 5s\n static_configs:\n - targets: ["localhost:9090"]\n - job_name: "substrate_node"\n scrape_interval: 5s\n static_configs:\n - targets: ["localhost:9615"]\n'})}),"\n",(0,t.jsxs)(n.p,{children:["With the above configuration file, the first exporter is the one that Prometheus exports to monitor\nitself. As we want to have more precise information about the state of the Prometheus server we\nreduced the ",(0,t.jsx)(n.code,{children:"scrape_interval"})," to 5 seconds for this job. The parameters ",(0,t.jsx)(n.code,{children:"static_configs"})," and\n",(0,t.jsx)(n.code,{children:"targets"})," determine where the exporters are running. The second exporter is capturing the data from\nyour node, and the port by default is ",(0,t.jsx)(n.code,{children:"9615"}),"."]}),"\n",(0,t.jsxs)(n.p,{children:["You can check the validity of this configuration file by running\n",(0,t.jsx)(n.code,{children:"promtool check config /etc/prometheus/prometheus.yml"}),"."]}),"\n",(0,t.jsxs)(n.p,{children:["Save the configuration file and change the ownership of the file to ",(0,t.jsx)(n.code,{children:"prometheus"})," user."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"sudo chown prometheus:prometheus /etc/prometheus/prometheus.yml\n"})}),"\n",(0,t.jsx)(n.h2,{id:"starting-prometheus",children:"Starting Prometheus"}),"\n",(0,t.jsxs)(n.p,{children:["To test that Prometheus is set up properly, execute the following command to start it as the\n",(0,t.jsx)(n.code,{children:"prometheus"})," user."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"sudo -u prometheus /usr/local/bin/prometheus --config.file /etc/prometheus/prometheus.yml --storage.tsdb.path /var/lib/prometheus/ --web.console.templates=/etc/prometheus/consoles --web.console.libraries=/etc/prometheus/console_libraries\n"})}),"\n",(0,t.jsx)(n.p,{children:"The following messages indicate the status of the server. If you see the following messages, your\nserver is set up properly."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'level=info ts=2021-04-16T19:02:20.167Z caller=main.go:380 msg="No time or size retention was set so using the default time retention" duration=15d\nlevel=info ts=2021-04-16T19:02:20.167Z caller=main.go:418 msg="Starting Prometheus" version="(version=2.26.0, branch=HEAD, revision=3cafc58827d1ebd1a67749f88be4218f0bab3d8d)"\nlevel=info ts=2021-04-16T19:02:20.167Z caller=main.go:423 build_context="(go=go1.16.2, user=root@a67cafebe6d0, date=20210331-11:56:23)"\nlevel=info ts=2021-04-16T19:02:20.167Z caller=main.go:424 host_details="(Linux 5.4.0-42-generic #46-Ubuntu SMP Fri Jul 10 00:24:02 UTC 2020 x86_64 ubuntu2004 (none))"\nlevel=info ts=2021-04-16T19:02:20.167Z caller=main.go:425 fd_limits="(soft=1024, hard=1048576)"\nlevel=info ts=2021-04-16T19:02:20.167Z caller=main.go:426 vm_limits="(soft=unlimited, hard=unlimited)"\nlevel=info ts=2021-04-16T19:02:20.169Z caller=web.go:540 component=web msg="Start listening for connections" address=0.0.0.0:9090\nlevel=info ts=2021-04-16T19:02:20.170Z caller=main.go:795 msg="Starting TSDB ..."\nlevel=info ts=2021-04-16T19:02:20.171Z caller=tls_config.go:191 component=web msg="TLS is disabled." http2=false\nlevel=info ts=2021-04-16T19:02:20.174Z caller=head.go:696 component=tsdb msg="Replaying on-disk memory mappable chunks if any"\nlevel=info ts=2021-04-16T19:02:20.175Z caller=head.go:710 component=tsdb msg="On-disk memory mappable chunks replay completed" duration=1.391446ms\nlevel=info ts=2021-04-16T19:02:20.175Z caller=head.go:716 component=tsdb msg="Replaying WAL, this may take a while"\nlevel=info ts=2021-04-16T19:02:20.178Z caller=head.go:768 component=tsdb msg="WAL segment loaded" segment=0 maxSegment=4\nlevel=info ts=2021-04-16T19:02:20.193Z caller=head.go:768 component=tsdb msg="WAL segment loaded" segment=1 maxSegment=4\nlevel=info ts=2021-04-16T19:02:20.221Z caller=head.go:768 component=tsdb msg="WAL segment loaded" segment=2 maxSegment=4\nlevel=info ts=2021-04-16T19:02:20.224Z caller=head.go:768 component=tsdb msg="WAL segment loaded" segment=3 maxSegment=4\nlevel=info ts=2021-04-16T19:02:20.229Z caller=head.go:768 component=tsdb msg="WAL segment loaded" segment=4 maxSegment=4\nlevel=info ts=2021-04-16T19:02:20.229Z caller=head.go:773 component=tsdb msg="WAL replay completed" checkpoint_replay_duration=43.716\xb5s wal_replay_duration=53.973285ms total_replay_duration=55.445308ms\nlevel=info ts=2021-04-16T19:02:20.233Z caller=main.go:815 fs_type=EXT4_SUPER_MAGIC\nlevel=info ts=2021-04-16T19:02:20.233Z caller=main.go:818 msg="TSDB started"\nlevel=info ts=2021-04-16T19:02:20.233Z caller=main.go:944 msg="Loading configuration file" filename=/etc/prometheus/prometheus.yml\nlevel=info ts=2021-04-16T19:02:20.234Z caller=main.go:975 msg="Completed loading of configuration file" filename=/etc/prometheus/prometheus.yml totalDuration=824.115\xb5s remote_storage=3.131\xb5s web_handler=401ns query_engine=1.056\xb5s scrape=236.454\xb5s scrape_sd=45.432\xb5s notify=723ns notify_sd=2.61\xb5s rules=956ns\nlevel=info ts=2021-04-16T19:02:20.234Z caller=main.go:767 msg="Server is ready to receive web requests."\n\n'})}),"\n",(0,t.jsxs)(n.p,{children:["Go to ",(0,t.jsx)(n.code,{children:"http://SERVER_IP_ADDRESS:9090/graph"})," to check whether you are able to access the Prometheus\ninterface or not. If it is working, exit the process by pressing on ",(0,t.jsx)(n.code,{children:"CTRL + C"}),"."]}),"\n",(0,t.jsxs)(n.p,{children:["Next, we would like to automatically start the server during the boot process, so we have to create\na new ",(0,t.jsx)(n.code,{children:"systemd"})," configuration file with the following config."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"sudo nano /etc/systemd/system/prometheus.service\n"})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"[Unit]\n Description=Prometheus Monitoring\n Wants=network-online.target\n After=network-online.target\n\n[Service]\n User=prometheus\n Group=prometheus\n Type=simple\n ExecStart=/usr/local/bin/prometheus \\\n --config.file /etc/prometheus/prometheus.yml \\\n --storage.tsdb.path /var/lib/prometheus/ \\\n --web.console.templates=/etc/prometheus/consoles \\\n --web.console.libraries=/etc/prometheus/console_libraries\n ExecReload=/bin/kill -HUP $MAINPID\n\n[Install]\n WantedBy=multi-user.target\n"})}),"\n",(0,t.jsxs)(n.p,{children:["Once the file is saved, execute the command below to reload ",(0,t.jsx)(n.code,{children:"systemd"})," and enable the service so that\nit will be loaded automatically during the operating system's startup."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"sudo systemctl daemon-reload && systemctl enable prometheus && systemctl start prometheus\n"})}),"\n",(0,t.jsxs)(n.p,{children:["Prometheus should be running now, and you should be able to access its front again end by\nre-visiting ",(0,t.jsx)(n.code,{children:"IP_ADDRESS:9090/"}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"installing-grafana",children:"Installing Grafana"}),"\n",(0,t.jsx)(n.p,{children:"In order to visualize your node metrics, you can use Grafana to query the Prometheus server. Run the\nfollowing commands to install it first."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"sudo apt-get install -y adduser libfontconfig1\nwget https://dl.grafana.com/oss/release/grafana_7.5.4_amd64.deb\nsudo dpkg -i grafana_7.5.4_amd64.deb\n"})}),"\n",(0,t.jsx)(n.p,{children:"If everything is fine, configure Grafana to auto-start on boot and then start the service."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"sudo systemctl daemon-reload\nsudo systemctl enable grafana-server\nsudo systemctl start grafana-server\n"})}),"\n",(0,t.jsxs)(n.p,{children:["You can now access it by going to the ",(0,t.jsx)(n.code,{children:"http://SERVER_IP_ADDRESS:3000/login"}),". The default user and\npassword is admin/admin."]}),"\n",(0,t.jsx)(n.admonition,{type:"note",children:(0,t.jsxs)(n.p,{children:["If you want to change the port on which Grafana runs (3000 is a popular port), edit the file\n",(0,t.jsx)(n.code,{children:"/usr/share/grafana/conf/defaults.ini"})," with a command like\n",(0,t.jsx)(n.code,{children:"sudo vim /usr/share/grafana/conf/defaults.ini"})," and change the ",(0,t.jsx)(n.code,{children:"http_port"})," value to something else.\nThen restart grafana with ",(0,t.jsx)(n.code,{children:"sudo systemctl restart grafana-server"}),"."]})}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"1-grafana-login",src:s(22566).A+"",width:"1500",height:"709"})}),"\n",(0,t.jsxs)(n.p,{children:["In order to visualize the node metrics, click ",(0,t.jsx)(n.em,{children:"settings"})," to configure the ",(0,t.jsx)(n.code,{children:"Data Sources"})," first."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"2-add-data-source",src:s(77445).A+"",width:"250",height:"300"})}),"\n",(0,t.jsxs)(n.p,{children:["Click ",(0,t.jsx)(n.code,{children:"Add data source"})," to choose where the data is coming from."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"2-add-data-source-2",src:s(95276).A+"",width:"2204",height:"1040"})}),"\n",(0,t.jsxs)(n.p,{children:["Select ",(0,t.jsx)(n.code,{children:"Prometheus"}),"."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"3-select-prometheus",src:s(86513).A+"",width:"700",height:"444"})}),"\n",(0,t.jsxs)(n.p,{children:["The only thing you need to input is the ",(0,t.jsx)(n.code,{children:"URL"})," that is ",(0,t.jsx)(n.code,{children:"https://localhost:9090"})," and then click\n",(0,t.jsx)(n.code,{children:"Save & Test"}),". If you see ",(0,t.jsx)(n.code,{children:"Data source is working"}),", your connection is configured correctly."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"4-configure-data-source",src:s(58570).A+"",width:"700",height:"729"})}),"\n",(0,t.jsxs)(n.p,{children:['Next, import the dashboard that lets you visualize your node data. Go to the menu bar on the left\nand mouse hover "+" then select ',(0,t.jsx)(n.code,{children:"Import"}),"."]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.code,{children:"Import via grafana.com"})," - It allows you to use a dashboard that someone else has created and made\npublic. You can check what other dashboards are available via\n",(0,t.jsx)(n.a,{href:"https://grafana.com/grafana/dashboards",children:"https://grafana.com/grafana/dashboards"}),". In this guide, we\nuse\n",(0,t.jsx)(n.a,{href:"https://grafana.com/grafana/dashboards/21715-substrate-node-metrics/",children:'"Substrate Node Metrics"'}),', so\ninput "21715" under the id field and click ',(0,t.jsx)(n.code,{children:"Load"}),"."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"5-import-dashboard",src:s(88400).A+"",width:"1272",height:"1320"})}),"\n",(0,t.jsxs)(n.p,{children:['Once it has been loaded, make sure to select "Prometheus" in the Prometheus dropdown list. Then\nclick ',(0,t.jsx)(n.code,{children:"Import"}),"."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"5-import-dashboard-2",src:s(19877).A+"",width:"1426",height:"1382"})}),"\n",(0,t.jsxs)(n.p,{children:["In the meantime, start your Polkadot node by running ",(0,t.jsx)(n.code,{children:"./polkadot"}),". If everything is done correctly,\nyou should be able to monitor your node's performance such as the current block height, network\ntraffic, running tasks, etc. on the Grafana dashboard."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"6-dashboard-metric",src:s(97320).A+"",width:"1551",height:"930"})}),"\n",(0,t.jsx)(n.h2,{id:"installing-and-configuring-alertmanager-optional",children:"Installing and Configuring Alertmanager (Optional)"}),"\n",(0,t.jsx)(n.p,{children:"In this section, let's configure the Alertmanager that helps to predict the potential problem or\nnotify you of the current problem in your server. Alerts can be sent in Slack, Email, Matrix, or\nothers. In this guide, we will show you how to configure the email notifications using Gmail if your\nnode goes down."}),"\n",(0,t.jsx)(n.p,{children:"First, download the latest binary of AlertManager and unzip it by running the command below:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"wget https://github.com/prometheus/alertmanager/releases/download/v0.26.0/alertmanager-0.26.0.linux-amd64.tar.gz\ntar -xvzf alertmanager-0.26.0.linux-amd64.tar.gz\nmv alertmanager-0.26.0.linux-amd64/alertmanager /usr/local/bin\n"})}),"\n",(0,t.jsx)(n.h3,{id:"gmail-setup",children:"Gmail Setup"}),"\n",(0,t.jsxs)(n.p,{children:["To allow AlertManager to send an email to you, you will need to generate something called an\n",(0,t.jsx)(n.code,{children:"app password"})," in your Gmail account. For details, click\n",(0,t.jsx)(n.a,{href:"https://support.google.com/accounts/answer/185833?hl=en",children:"here"})," to follow the whole setup."]}),"\n",(0,t.jsx)(n.p,{children:"You should see something like below:"}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"grafana-am-1",src:s(51362).A+"",width:"700",height:"680"})}),"\n",(0,t.jsx)(n.p,{children:"Copy and save it somewhere else first."}),"\n",(0,t.jsx)(n.h3,{id:"alertmanager-configuration",children:"AlertManager Configuration"}),"\n",(0,t.jsxs)(n.p,{children:["There is a configuration file named ",(0,t.jsx)(n.code,{children:"alertmanager.yml"})," inside the directory that you just extracted\nin the previous command, but that is not of our use. We will create our ",(0,t.jsx)(n.code,{children:"alertmanager.yml"})," file\nunder ",(0,t.jsx)(n.code,{children:"/etc/alertmanager"})," with the following config."]}),"\n",(0,t.jsxs)(n.admonition,{type:"note",children:[(0,t.jsxs)(n.p,{children:['Ensure to change the ownership of "/etc/alertmanager" to ',(0,t.jsx)(n.code,{children:"prometheus"})," by executing"]}),(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"sudo chown -R prometheus:prometheus /etc/alertmanager\n"})})]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"global:\n resolve_timeout: 1m\n\nroute:\n receiver: 'gmail-notifications'\n\nreceivers:\n- name: 'gmail-notifications'\n email_configs:\n - to: YOUR_EMAIL\n from: YOUR_EMAIL\n smarthost: smtp.gmail.com:587\n auth_username: YOUR_EMAIL\n auth_identity: YOUR_EMAIL\n auth_password: YOUR_APP_PASSWORD\n send_resolved: true\n"})}),"\n",(0,t.jsxs)(n.p,{children:["With the above configuration, alerts will be sent using the email you set above. Remember to change\n",(0,t.jsx)(n.code,{children:"YOUR_EMAIL"})," to your email and paste the app password you just saved earlier to the\n",(0,t.jsx)(n.code,{children:"YOUR_APP_PASSWORD"}),"."]}),"\n",(0,t.jsxs)(n.p,{children:["Next, create another ",(0,t.jsx)(n.code,{children:"systemd"})," configuration file named ",(0,t.jsx)(n.code,{children:"alertmanager.service"})," by running the\ncommand ",(0,t.jsx)(n.code,{children:"sudo nano /etc/systemd/system/alertmanager.service"})," with the following config."]}),"\n",(0,t.jsx)(n.admonition,{title:"SERVER_IP",type:"info",children:(0,t.jsx)(n.p,{children:"Change to your host IP address and make sure port 9093 is opened."})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"[Unit]\nDescription=AlertManager Server Service\nWants=network-online.target\nAfter=network-online.target\n\n[Service]\nUser=root\nGroup=root\nType=simple\nExecStart=/usr/local/bin/alertmanager --config.file /etc/alertmanager/alertmanager.yml --web.external-url=http://SERVER_IP:9093 --cluster.advertise-address='0.0.0.0:9093'\n\n\n[Install]\nWantedBy=multi-user.target\n"})}),"\n",(0,t.jsx)(n.p,{children:"To the start the Alertmanager, run the following commands:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"sudo systemctl daemon-reload && sudo systemctl enable alertmanager && sudo systemctl start alertmanager && sudo systemctl status alertmanager\n"})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"\u25cf alertmanager.service - AlertManager Server Service\n Loaded: loaded (/etc/systemd/system/alertmanager.service; enabled; vendor preset: enabled)\n Active: active (running) since Thu 2020-08-20 22:01:21 CEST; 3 days ago\n Main PID: 20592 (alertmanager)\n Tasks: 70 (limit: 9830)\n CGroup: /system.slice/alertmanager.service\n"})}),"\n",(0,t.jsx)(n.p,{children:'You should see the process status is "active (running)" if you have configured properly.'}),"\n",(0,t.jsx)(n.p,{children:"There is a Alertmanager plugin in Grafana that can help you to monitor the alert information. To\ninstall it, execute the command below:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"sudo grafana-cli plugins install camptocamp-prometheus-alertmanager-datasource\n"})}),"\n",(0,t.jsx)(n.p,{children:"And restart Grafana once the plugin is successfully installed."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"sudo systemctl restart grafana-server\n"})}),"\n",(0,t.jsxs)(n.p,{children:["Now go to your Grafana dashboard ",(0,t.jsx)(n.code,{children:"SERVER_IP:3000"})," and configure the Alertmanager datasource."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"grafana-am-5",src:s(78070).A+"",width:"700",height:"293"})}),"\n",(0,t.jsx)(n.p,{children:'Go to Configuration -> Data Sources, search "Prometheus AlertManger" if you cannot find it at the\ntop.'}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"grafana-am-2",src:s(70277).A+"",width:"700",height:"363"})}),"\n",(0,t.jsxs)(n.p,{children:["Fill in the ",(0,t.jsx)(n.code,{children:"URL"})," to your server location followed by the port number used in the Alertmanager."]}),"\n",(0,t.jsx)(n.p,{children:'Then click "Save & Test" at the bottom to test the connection.'}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"grafana-am-3",src:s(1756).A+"",width:"700",height:"823"})}),"\n",(0,t.jsxs)(n.p,{children:["To monitor the alerts, let's import dashboard \"",(0,t.jsx)(n.a,{href:"https://grafana.com/dashboards/8010",children:"8010"}),'" that is\nused for Alertmanager. And make sure to select the "Prometheus AlertManager" in the last column.\nThen click "Import".']}),"\n",(0,t.jsx)(n.p,{children:"You will end up having the following:"}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"grafana-am-4",src:s(8791).A+"",width:"1200",height:"516"})}),"\n",(0,t.jsx)(n.h3,{id:"alertmanager-integration",children:"AlertManager Integration"}),"\n",(0,t.jsxs)(n.p,{children:["To let the Prometheus server be able to talk to the AlertManager, we will need to add the following\nconfig in the ",(0,t.jsx)(n.code,{children:"etc/prometheus/prometheus.yml"}),"."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"rule_files:\n - 'rules.yml'\n\nalerting:\n alertmanagers:\n - static_configs:\n - targets:\n - localhost:9093\n"})}),"\n",(0,t.jsxs)(n.p,{children:["That is the updated ",(0,t.jsx)(n.code,{children:"etc/prometheus/prometheus.yml"}),"."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"global:\n scrape_interval: 15s\n evaluation_interval: 15s\n\nrule_files:\n - 'rules.yml'\n\nalerting:\n alertmanagers:\n - static_configs:\n - targets:\n - localhost:9093\n\nscrape_configs:\n - job_name: 'prometheus'\n scrape_interval: 5s\n static_configs:\n - targets: ['localhost:9090']\n - job_name: 'substrate_node'\n scrape_interval: 5s\n static_configs:\n - targets: ['localhost:9615']\n"})}),"\n",(0,t.jsxs)(n.p,{children:['We will need to create a new file called "rules.yml" under ',(0,t.jsx)(n.code,{children:"/etc/prometheus/"})," that is defined all\nthe rules we would like to detect. If any of the rules defined in this file is fulfilled, an alert\nwill be triggered. The rule below checks whether the instance is down. If it is down for more than 5\nminutes, an email notification will be sent. If you would like to learn more about the details of\nthe rule defining, go\n",(0,t.jsx)(n.a,{href:"https://prometheus.io/docs/prometheus/latest/configuration/alerting_rules/",children:"here"}),". There are other\ninteresting alerts you may find useful ",(0,t.jsx)(n.a,{href:"https://awesome-prometheus-alerts.grep.to/rules.html",children:"here"}),"."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:'groups:\n - name: alert_rules\n rules:\n - alert: InstanceDown\n expr: up == 0\n for: 5m\n labels:\n severity: critical\n annotations:\n summary: "Instance [{{ $labels.instance }}] down"\n description: "[{{ $labels.instance }}] of job [{{ $labels.job }}] has been down for more than 1 minute."\n'})}),"\n",(0,t.jsxs)(n.p,{children:["Change the ownership of this file to ",(0,t.jsx)(n.code,{children:"prometheus"})," instead of ",(0,t.jsx)(n.code,{children:"root"})," by running:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"sudo chown prometheus:prometheus rules.yml\n"})}),"\n",(0,t.jsx)(n.p,{children:'To check the rules defined in the "rules.yml" is syntactically correct, run the following command:'}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"sudo -u prometheus promtool check rules rules.yml\n"})}),"\n",(0,t.jsx)(n.p,{children:"Finally, restart everything by running:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"sudo systemctl restart prometheus && sudo systemctl restart alertmanager\n"})}),"\n",(0,t.jsx)(n.p,{children:"Now if one of your target instances down, you will receive an alert on the AlertManager and Gmail\nlike below."}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"grafana-am-6",src:s(14425).A+"",width:"700",height:"529"})})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(d,{...e})}):d(e)}},51362:(e,n,s)=>{s.d(n,{A:()=>t});const t=s.p+"assets/images/1-alert-manager-772a381e44fb289d713129bce0ac1a7e.png"},22566:(e,n,s)=>{s.d(n,{A:()=>t});const t=s.p+"assets/images/1-grafana-login-c1c6fbd7d08509b83393b50c01bb0616.png"},95276:(e,n,s)=>{s.d(n,{A:()=>t});const t=s.p+"assets/images/2-add-data-source-2-1a307a18d157b5a6dcfc5ff9affa9998.png"},77445:(e,n,s)=>{s.d(n,{A:()=>t});const t=s.p+"assets/images/2-add-data-source-d761a4186c463aad357c6130b2881789.png"},70277:(e,n,s)=>{s.d(n,{A:()=>t});const t=s.p+"assets/images/2-alert-manager-d3e306837b2c64bf91a0cad9af6a7864.png"},1756:(e,n,s)=>{s.d(n,{A:()=>t});const t=s.p+"assets/images/3-alert-manager-1fda12aea0c70f3f6844b52b95331aa8.png"},86513:(e,n,s)=>{s.d(n,{A:()=>t});const t=s.p+"assets/images/3-select-prometheus-0791dd096d2ca64c0146121e58f9c3e3.png"},8791:(e,n,s)=>{s.d(n,{A:()=>t});const t=s.p+"assets/images/4-alert-manager-85181686515e903e6a4098ddd9575a2f.png"},58570:(e,n,s)=>{s.d(n,{A:()=>t});const t=s.p+"assets/images/4-configure-data-source-7b1620ce4fc9ab2de90283415cea7df9.png"},78070:(e,n,s)=>{s.d(n,{A:()=>t});const t=s.p+"assets/images/5-alert-manager-c72c2dc814113f58399347add3c1f884.png"},19877:(e,n,s)=>{s.d(n,{A:()=>t});const t=s.p+"assets/images/5-import-dashboard-2-b6118a68ef2f8d78c555735471678f22.png"},88400:(e,n,s)=>{s.d(n,{A:()=>t});const t=s.p+"assets/images/5-import-dashboard-4a6f27887cfd081b9385dfd897787cbd.png"},14425:(e,n,s)=>{s.d(n,{A:()=>t});const t=s.p+"assets/images/6-alert-manager-12cff39ab28672b46017b175f875985b.png"},97320:(e,n,s)=>{s.d(n,{A:()=>t});const t=s.p+"assets/images/6-dashboard-metric-52044f98ca5a45715a8731a4cc96ed1b.png"},28453:(e,n,s)=>{s.d(n,{R:()=>a,x:()=>i});var t=s(96540);const r={},o=t.createContext(r);function a(e){const n=t.useContext(o);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:a(e.components),t.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/a2d5a6d8.34cef367.js b/assets/js/a2d5a6d8.34cef367.js deleted file mode 100644 index 3c5926cfe855..000000000000 --- a/assets/js/a2d5a6d8.34cef367.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6622],{51421:(e,s,n)=>{n.r(s),n.d(s,{assets:()=>r,contentTitle:()=>i,default:()=>h,frontMatter:()=>l,metadata:()=>a,toc:()=>d});var t=n(74848),o=n(28453);const l={id:"collectives-dashboards",title:"Collectives Dashboards",sidebar_label:"Collectives",description:"Collectives is a self-governing body of experts and developers of Polkadot and Kusama networks protocols.",keywords:["polkadot","dashboard","dune","collectives","fellowship"],slug:"../collectives-dashboards"},i="Collectives Dashboards",a={id:"general/dune-analytics/parachain-dashboards/collectives-dashboards",title:"Collectives Dashboards",description:"Collectives is a self-governing body of experts and developers of Polkadot and Kusama networks protocols.",source:"@site/../docs/general/dune-analytics/parachain-dashboards/collectives-dashboards.md",sourceDirName:"general/dune-analytics/parachain-dashboards",slug:"/general/dune-analytics/collectives-dashboards",permalink:"/docs/general/dune-analytics/collectives-dashboards",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/parachain-dashboards/collectives-dashboards.md",tags:[],version:"current",lastUpdatedBy:"MK",lastUpdatedAt:1719215716e3,frontMatter:{id:"collectives-dashboards",title:"Collectives Dashboards",sidebar_label:"Collectives",description:"Collectives is a self-governing body of experts and developers of Polkadot and Kusama networks protocols.",keywords:["polkadot","dashboard","dune","collectives","fellowship"],slug:"../collectives-dashboards"},sidebar:"docs",previous:{title:"Centrifuge",permalink:"/docs/general/dune-analytics/centrifuge-dashboards"},next:{title:"Coretime",permalink:"/docs/general/dune-analytics/coretime-dashboards"}},r={},d=[{value:"Overview",id:"overview",level:2},{value:"Featured Dashboards on Dune",id:"featured-dashboards-on-dune",level:2},{value:"Key Tables",id:"key-tables",level:2},{value:"Useful Queries",id:"useful-queries",level:2},{value:"Getting Started with Queries",id:"getting-started-with-queries",level:2}];function c(e){const s={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,o.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.header,{children:(0,t.jsx)(s.h1,{id:"collectives-dashboards",children:"Collectives Dashboards"})}),"\n",(0,t.jsx)(s.h2,{id:"overview",children:"Overview"}),"\n",(0,t.jsx)(s.p,{children:"The Technical Fellowship is a self-governing body of experts and developers of Polkadot and Kusama\nnetworks protocols. It operates on-chain through the Polkadot Collectives system chain and off-chain\nthrough the Polkadot Fellows repository."}),"\n",(0,t.jsx)(s.h2,{id:"featured-dashboards-on-dune",children:"Featured Dashboards on Dune"}),"\n",(0,t.jsx)(s.p,{children:"Here you will find a variety of dashboards that help visualize data from the Collectives parachain:"}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.a,{href:"https://dune.com/substrate/collectives",children:"Collectives"}),": This dashboard provides an overview of the\nCollectives ecosystem. On this dashboard, you can see the entire landscape of activities within\nthe Collectives network, such as the distribution of Salaries, Member Ranks, and voting activities\non Referenda."]}),"\n"]}),"\n",(0,t.jsx)(s.h2,{id:"key-tables",children:"Key Tables"}),"\n",(0,t.jsx)(s.p,{children:"Data from the manta parachain is organized into several key tables:"}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsx)(s.li,{children:(0,t.jsx)(s.code,{children:"collectives.balances"})}),"\n",(0,t.jsx)(s.li,{children:(0,t.jsx)(s.code,{children:"collectives.blocks"})}),"\n",(0,t.jsx)(s.li,{children:(0,t.jsx)(s.code,{children:"collectives.calls"})}),"\n",(0,t.jsx)(s.li,{children:(0,t.jsx)(s.code,{children:"collectives.events"})}),"\n",(0,t.jsx)(s.li,{children:(0,t.jsx)(s.code,{children:"collectives.extrinsics"})}),"\n",(0,t.jsx)(s.li,{children:(0,t.jsx)(s.code,{children:"collectives.transfers"})}),"\n"]}),"\n",(0,t.jsxs)(s.p,{children:["Start building your own queries using granular data on Dune\n",(0,t.jsx)(s.a,{href:"https://dune.com/queries?category=canonical&namespace=collectives",children:"here"}),"."]}),"\n",(0,t.jsx)(s.h2,{id:"useful-queries",children:"Useful Queries"}),"\n",(0,t.jsx)(s.p,{children:"Some useful queries for Collectives are provided:"}),"\n",(0,t.jsxs)(s.table,{children:[(0,t.jsx)(s.thead,{children:(0,t.jsxs)(s.tr,{children:[(0,t.jsx)(s.th,{children:"Title"}),(0,t.jsx)(s.th,{children:"Query"}),(0,t.jsx)(s.th,{children:"Description"})]})}),(0,t.jsxs)(s.tbody,{children:[(0,t.jsxs)(s.tr,{children:[(0,t.jsx)(s.td,{children:"Collectives Core Member Events"}),(0,t.jsx)(s.td,{children:(0,t.jsx)(s.a,{href:"https://dune.com/queries/3799229",children:"query_3799229"})}),(0,t.jsx)(s.td,{children:"Provides details on events involving core members of Collectives."})]}),(0,t.jsxs)(s.tr,{children:[(0,t.jsx)(s.td,{children:"Collective Fellowship Referenda"}),(0,t.jsx)(s.td,{children:(0,t.jsx)(s.a,{href:"https://dune.com/queries/3776581",children:"query_3776581"})}),(0,t.jsx)(s.td,{children:"Offers comprehensive data on Collective fellowship referenda, covering vote counts (Ayes, BareAyes, Nays), current status, and type of referendum."})]})]})]}),"\n",(0,t.jsx)(s.h2,{id:"getting-started-with-queries",children:"Getting Started with Queries"}),"\n",(0,t.jsx)(s.p,{children:"To get started with querying data from Collectives, you are welcome to use the mentioned\nmaterialized queries. You can use the following DuneSQL queries as examples:"}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-sql",metastring:'title="Collectives Referenda Types" showLineNumbers',children:"WITH types AS (\n SELECT\n block_time,\n JSON_EXTRACT_SCALAR(params, '$.proposal.lookup.hash') AS lookup,\n JSON_EXTRACT_SCALAR(params, '$.proposal_origin.fellowshipOrigins') AS fellowshipOrigins\n FROM\n collectives.extrinsics\n WHERE\n section = 'fellowshipReferenda'\n AND method = 'submit'\n AND JSON_EXTRACT_SCALAR(params, '$.proposal.lookup.hash') IS NOT NULL\n)\nSELECT\n JSON_EXTRACT_SCALAR(data, '$[0]') AS r_id,\n JSON_EXTRACT_SCALAR(data, '$[2].lookup.hash') AS lookup,\n COALESCE(types.fellowshipOrigins, 'Fellows') AS types\nFROM\n collectives.events\nLEFT JOIN types ON JSON_EXTRACT_SCALAR(data, '$[2].lookup.hash') = types.lookup\nWHERE\n method = 'Submitted'\n AND JSON_EXTRACT_SCALAR(data, '$[2].lookup.hash') IS NOT NULL;\n"})}),"\n",(0,t.jsx)(s.p,{children:"Query result:"}),"\n",(0,t.jsx)("iframe",{src:"https://dune.com/embeds/3789493/6371240/",height:"350",width:"100%"}),"\n",(0,t.jsx)(s.admonition,{title:"DuneSQL Referece",type:"info",children:(0,t.jsxs)(s.p,{children:["For more information on DuneSQL, please refer to the ",(0,t.jsx)(s.a,{href:"/docs/general/dunesql-cheatsheet",children:"DuneSQL Cheatsheet"}),"\nand\n",(0,t.jsx)(s.a,{href:"https://docs.dune.com/query-engine/Functions-and-operators/index",children:"DuneSQL Official Documentation"}),"."]})})]})}function h(e={}){const{wrapper:s}={...(0,o.R)(),...e.components};return s?(0,t.jsx)(s,{...e,children:(0,t.jsx)(c,{...e})}):c(e)}},28453:(e,s,n)=>{n.d(s,{R:()=>i,x:()=>a});var t=n(96540);const o={},l=t.createContext(o);function i(e){const s=t.useContext(l);return t.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function a(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:i(e.components),t.createElement(l.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/a2d5a6d8.97bcb422.js b/assets/js/a2d5a6d8.97bcb422.js new file mode 100644 index 000000000000..0592ae86a4bf --- /dev/null +++ b/assets/js/a2d5a6d8.97bcb422.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6622],{68962:(e,s,n)=>{n.r(s),n.d(s,{assets:()=>r,contentTitle:()=>a,default:()=>h,frontMatter:()=>i,metadata:()=>t,toc:()=>d});const t=JSON.parse('{"id":"general/dune-analytics/parachain-dashboards/collectives-dashboards","title":"Collectives Dashboards","description":"Collectives is a self-governing body of experts and developers of Polkadot and Kusama networks protocols.","source":"@site/../docs/general/dune-analytics/parachain-dashboards/collectives-dashboards.md","sourceDirName":"general/dune-analytics/parachain-dashboards","slug":"/general/dune-analytics/collectives-dashboards","permalink":"/docs/general/dune-analytics/collectives-dashboards","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/parachain-dashboards/collectives-dashboards.md","tags":[],"version":"current","lastUpdatedBy":"MK","lastUpdatedAt":1719215716000,"frontMatter":{"id":"collectives-dashboards","title":"Collectives Dashboards","sidebar_label":"Collectives","description":"Collectives is a self-governing body of experts and developers of Polkadot and Kusama networks protocols.","keywords":["polkadot","dashboard","dune","collectives","fellowship"],"slug":"../collectives-dashboards"},"sidebar":"docs","previous":{"title":"Centrifuge","permalink":"/docs/general/dune-analytics/centrifuge-dashboards"},"next":{"title":"Coretime","permalink":"/docs/general/dune-analytics/coretime-dashboards"}}');var o=n(74848),l=n(28453);const i={id:"collectives-dashboards",title:"Collectives Dashboards",sidebar_label:"Collectives",description:"Collectives is a self-governing body of experts and developers of Polkadot and Kusama networks protocols.",keywords:["polkadot","dashboard","dune","collectives","fellowship"],slug:"../collectives-dashboards"},a="Collectives Dashboards",r={},d=[{value:"Overview",id:"overview",level:2},{value:"Featured Dashboards on Dune",id:"featured-dashboards-on-dune",level:2},{value:"Key Tables",id:"key-tables",level:2},{value:"Useful Queries",id:"useful-queries",level:2},{value:"Getting Started with Queries",id:"getting-started-with-queries",level:2}];function c(e){const s={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,l.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(s.header,{children:(0,o.jsx)(s.h1,{id:"collectives-dashboards",children:"Collectives Dashboards"})}),"\n",(0,o.jsx)(s.h2,{id:"overview",children:"Overview"}),"\n",(0,o.jsx)(s.p,{children:"The Technical Fellowship is a self-governing body of experts and developers of Polkadot and Kusama\nnetworks protocols. It operates on-chain through the Polkadot Collectives system chain and off-chain\nthrough the Polkadot Fellows repository."}),"\n",(0,o.jsx)(s.h2,{id:"featured-dashboards-on-dune",children:"Featured Dashboards on Dune"}),"\n",(0,o.jsx)(s.p,{children:"Here you will find a variety of dashboards that help visualize data from the Collectives parachain:"}),"\n",(0,o.jsxs)(s.ul,{children:["\n",(0,o.jsxs)(s.li,{children:[(0,o.jsx)(s.a,{href:"https://dune.com/substrate/collectives",children:"Collectives"}),": This dashboard provides an overview of the\nCollectives ecosystem. On this dashboard, you can see the entire landscape of activities within\nthe Collectives network, such as the distribution of Salaries, Member Ranks, and voting activities\non Referenda."]}),"\n"]}),"\n",(0,o.jsx)(s.h2,{id:"key-tables",children:"Key Tables"}),"\n",(0,o.jsx)(s.p,{children:"Data from the manta parachain is organized into several key tables:"}),"\n",(0,o.jsxs)(s.ul,{children:["\n",(0,o.jsx)(s.li,{children:(0,o.jsx)(s.code,{children:"collectives.balances"})}),"\n",(0,o.jsx)(s.li,{children:(0,o.jsx)(s.code,{children:"collectives.blocks"})}),"\n",(0,o.jsx)(s.li,{children:(0,o.jsx)(s.code,{children:"collectives.calls"})}),"\n",(0,o.jsx)(s.li,{children:(0,o.jsx)(s.code,{children:"collectives.events"})}),"\n",(0,o.jsx)(s.li,{children:(0,o.jsx)(s.code,{children:"collectives.extrinsics"})}),"\n",(0,o.jsx)(s.li,{children:(0,o.jsx)(s.code,{children:"collectives.transfers"})}),"\n"]}),"\n",(0,o.jsxs)(s.p,{children:["Start building your own queries using granular data on Dune\n",(0,o.jsx)(s.a,{href:"https://dune.com/queries?category=canonical&namespace=collectives",children:"here"}),"."]}),"\n",(0,o.jsx)(s.h2,{id:"useful-queries",children:"Useful Queries"}),"\n",(0,o.jsx)(s.p,{children:"Some useful queries for Collectives are provided:"}),"\n",(0,o.jsxs)(s.table,{children:[(0,o.jsx)(s.thead,{children:(0,o.jsxs)(s.tr,{children:[(0,o.jsx)(s.th,{children:"Title"}),(0,o.jsx)(s.th,{children:"Query"}),(0,o.jsx)(s.th,{children:"Description"})]})}),(0,o.jsxs)(s.tbody,{children:[(0,o.jsxs)(s.tr,{children:[(0,o.jsx)(s.td,{children:"Collectives Core Member Events"}),(0,o.jsx)(s.td,{children:(0,o.jsx)(s.a,{href:"https://dune.com/queries/3799229",children:"query_3799229"})}),(0,o.jsx)(s.td,{children:"Provides details on events involving core members of Collectives."})]}),(0,o.jsxs)(s.tr,{children:[(0,o.jsx)(s.td,{children:"Collective Fellowship Referenda"}),(0,o.jsx)(s.td,{children:(0,o.jsx)(s.a,{href:"https://dune.com/queries/3776581",children:"query_3776581"})}),(0,o.jsx)(s.td,{children:"Offers comprehensive data on Collective fellowship referenda, covering vote counts (Ayes, BareAyes, Nays), current status, and type of referendum."})]})]})]}),"\n",(0,o.jsx)(s.h2,{id:"getting-started-with-queries",children:"Getting Started with Queries"}),"\n",(0,o.jsx)(s.p,{children:"To get started with querying data from Collectives, you are welcome to use the mentioned\nmaterialized queries. You can use the following DuneSQL queries as examples:"}),"\n",(0,o.jsx)(s.pre,{children:(0,o.jsx)(s.code,{className:"language-sql",metastring:'title="Collectives Referenda Types" showLineNumbers',children:"WITH types AS (\n SELECT\n block_time,\n JSON_EXTRACT_SCALAR(params, '$.proposal.lookup.hash') AS lookup,\n JSON_EXTRACT_SCALAR(params, '$.proposal_origin.fellowshipOrigins') AS fellowshipOrigins\n FROM\n collectives.extrinsics\n WHERE\n section = 'fellowshipReferenda'\n AND method = 'submit'\n AND JSON_EXTRACT_SCALAR(params, '$.proposal.lookup.hash') IS NOT NULL\n)\nSELECT\n JSON_EXTRACT_SCALAR(data, '$[0]') AS r_id,\n JSON_EXTRACT_SCALAR(data, '$[2].lookup.hash') AS lookup,\n COALESCE(types.fellowshipOrigins, 'Fellows') AS types\nFROM\n collectives.events\nLEFT JOIN types ON JSON_EXTRACT_SCALAR(data, '$[2].lookup.hash') = types.lookup\nWHERE\n method = 'Submitted'\n AND JSON_EXTRACT_SCALAR(data, '$[2].lookup.hash') IS NOT NULL;\n"})}),"\n",(0,o.jsx)(s.p,{children:"Query result:"}),"\n",(0,o.jsx)("iframe",{src:"https://dune.com/embeds/3789493/6371240/",height:"350",width:"100%"}),"\n",(0,o.jsx)(s.admonition,{title:"DuneSQL Referece",type:"info",children:(0,o.jsxs)(s.p,{children:["For more information on DuneSQL, please refer to the ",(0,o.jsx)(s.a,{href:"/docs/general/dunesql-cheatsheet",children:"DuneSQL Cheatsheet"}),"\nand\n",(0,o.jsx)(s.a,{href:"https://docs.dune.com/query-engine/Functions-and-operators/index",children:"DuneSQL Official Documentation"}),"."]})})]})}function h(e={}){const{wrapper:s}={...(0,l.R)(),...e.components};return s?(0,o.jsx)(s,{...e,children:(0,o.jsx)(c,{...e})}):c(e)}},28453:(e,s,n)=>{n.d(s,{R:()=>i,x:()=>a});var t=n(96540);const o={},l=t.createContext(o);function i(e){const s=t.useContext(l);return t.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function a(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:i(e.components),t.createElement(l.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/a44b8423.23a4c80d.js b/assets/js/a44b8423.23a4c80d.js new file mode 100644 index 000000000000..4cfbf4378d2b --- /dev/null +++ b/assets/js/a44b8423.23a4c80d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[319],{71484:(e,o,a)=>{a.r(o),a.d(o,{assets:()=>i,contentTitle:()=>r,default:()=>c,frontMatter:()=>n,metadata:()=>t,toc:()=>l});const t=JSON.parse('{"id":"general/dune-analytics/polkadot-dashboards/legacy/polkadot-staking-dashboard-pool-member","title":"Polkadot Staking Dashboard (Pool Member)","description":"Polkadot Staking Dashboard (Pool Member) descriptions","source":"@site/../docs/general/dune-analytics/polkadot-dashboards/legacy/polkadot-staking-dashboard-pool-member.md","sourceDirName":"general/dune-analytics/polkadot-dashboards/legacy","slug":"/general/dune-analytics/polkadot-dashboards/polkadot-staking-dashboard-pool-member","permalink":"/docs/general/dune-analytics/polkadot-dashboards/polkadot-staking-dashboard-pool-member","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/polkadot-dashboards/legacy/polkadot-staking-dashboard-pool-member.md","tags":[],"version":"current","lastUpdatedBy":"MK","lastUpdatedAt":1717658873000,"frontMatter":{"id":"polkadot-staking-dashboard-pool-member","title":"Polkadot Staking Dashboard (Pool Member)","sidebar_label":"Staking Dashboard (Pool Member)","description":"Polkadot Staking Dashboard (Pool Member) descriptions","keywords":["polkadot","governance","dashboard","dune"],"slug":"../polkadot-staking-dashboard-pool-member"}}');var s=a(74848),d=a(28453);const n={id:"polkadot-staking-dashboard-pool-member",title:"Polkadot Staking Dashboard (Pool Member)",sidebar_label:"Staking Dashboard (Pool Member)",description:"Polkadot Staking Dashboard (Pool Member) descriptions",keywords:["polkadot","governance","dashboard","dune"],slug:"../polkadot-staking-dashboard-pool-member"},r="Polkadot Staking Dashboard (Pool Member)",i={},l=[{value:"View On Dune: Polkadot Staking Dashboard",id:"view-on-dune-polkadot-staking-dashboard",level:2},{value:"For a specific nomination pool member",id:"for-a-specific-nomination-pool-member",level:2}];function h(e){const o={a:"a",h1:"h1",h2:"h2",header:"header",p:"p",strong:"strong",...(0,d.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(o.header,{children:(0,s.jsx)(o.h1,{id:"polkadot-staking-dashboard-pool-member",children:"Polkadot Staking Dashboard (Pool Member)"})}),"\n",(0,s.jsxs)(o.h2,{id:"view-on-dune-polkadot-staking-dashboard",children:["View On Dune: ",(0,s.jsx)(o.a,{href:"https://dune.com/substrate/polkadot-staking-pool-member",children:"Polkadot Staking Dashboard"})]}),"\n",(0,s.jsxs)(o.p,{children:["We're using ",(0,s.jsx)(o.strong,{children:"default parameters"})," for all of the following parameterized charts. Visit our\ndashboard on Dune to use the ",(0,s.jsx)(o.strong,{children:"user_ss58"})," parameter and analyze a specific referendum."]}),"\n",(0,s.jsx)(o.h2,{id:"for-a-specific-nomination-pool-member",children:"For a specific nomination pool member"}),"\n",(0,s.jsx)(o.p,{children:"This dashboard shows raw data of member activity within the pool"}),"\n",(0,s.jsx)(o.p,{children:"Member Pool Fee: 365 * member_staking_rewards / member_bonded"}),"\n",(0,s.jsxs)(o.p,{children:["Source Table: ",(0,s.jsx)(o.strong,{children:"polkadot.stakings"})," , MaterializedView:\n",(0,s.jsx)(o.a,{href:"https://dune.com/queries/3327479",children:(0,s.jsx)(o.strong,{children:"dune.substrate.result_polkadot_poolmembers"})})]}),"\n",(0,s.jsxs)(o.p,{children:["Go back to ",(0,s.jsx)(o.a,{href:"https://dune.com/substrate/polkadot-staking",children:(0,s.jsx)(o.strong,{children:"Polkadot Staking Home"})})]}),"\n",(0,s.jsx)("iframe",{src:"https://dune.com/embeds/3341609/5599266/",height:"350",width:"100%"}),"\n",(0,s.jsx)("iframe",{src:"https://dune.com/embeds/3341609/5599280/",height:"350",width:"100%"}),"\n",(0,s.jsx)("iframe",{src:"https://dune.com/embeds/3341609/5599290/",height:"350",width:"100%"}),"\n",(0,s.jsx)("iframe",{src:"https://dune.com/embeds/3341609/5599317/",height:"350",width:"100%"}),"\n",(0,s.jsx)("iframe",{src:"https://dune.com/embeds/3343369/5602279/",height:"350",width:"100%"}),"\n",(0,s.jsx)("iframe",{src:"https://dune.com/embeds/3343707/5602761/",height:"350",width:"100%"})]})}function c(e={}){const{wrapper:o}={...(0,d.R)(),...e.components};return o?(0,s.jsx)(o,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}},28453:(e,o,a)=>{a.d(o,{R:()=>n,x:()=>r});var t=a(96540);const s={},d=t.createContext(s);function n(e){const o=t.useContext(d);return t.useMemo((function(){return"function"==typeof e?e(o):{...o,...e}}),[o,e])}function r(e){let o;return o=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:n(e.components),t.createElement(d.Provider,{value:o},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/a44b8423.e65e5bda.js b/assets/js/a44b8423.e65e5bda.js deleted file mode 100644 index ee2d1b5257c5..000000000000 --- a/assets/js/a44b8423.e65e5bda.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[319],{55722:(e,o,a)=>{a.r(o),a.d(o,{assets:()=>i,contentTitle:()=>n,default:()=>c,frontMatter:()=>d,metadata:()=>r,toc:()=>l});var t=a(74848),s=a(28453);const d={id:"polkadot-staking-dashboard-pool-member",title:"Polkadot Staking Dashboard (Pool Member)",sidebar_label:"Staking Dashboard (Pool Member)",description:"Polkadot Staking Dashboard (Pool Member) descriptions",keywords:["polkadot","governance","dashboard","dune"],slug:"../polkadot-staking-dashboard-pool-member"},n="Polkadot Staking Dashboard (Pool Member)",r={id:"general/dune-analytics/polkadot-dashboards/legacy/polkadot-staking-dashboard-pool-member",title:"Polkadot Staking Dashboard (Pool Member)",description:"Polkadot Staking Dashboard (Pool Member) descriptions",source:"@site/../docs/general/dune-analytics/polkadot-dashboards/legacy/polkadot-staking-dashboard-pool-member.md",sourceDirName:"general/dune-analytics/polkadot-dashboards/legacy",slug:"/general/dune-analytics/polkadot-dashboards/polkadot-staking-dashboard-pool-member",permalink:"/docs/general/dune-analytics/polkadot-dashboards/polkadot-staking-dashboard-pool-member",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/polkadot-dashboards/legacy/polkadot-staking-dashboard-pool-member.md",tags:[],version:"current",lastUpdatedBy:"MK",lastUpdatedAt:1717658873e3,frontMatter:{id:"polkadot-staking-dashboard-pool-member",title:"Polkadot Staking Dashboard (Pool Member)",sidebar_label:"Staking Dashboard (Pool Member)",description:"Polkadot Staking Dashboard (Pool Member) descriptions",keywords:["polkadot","governance","dashboard","dune"],slug:"../polkadot-staking-dashboard-pool-member"}},i={},l=[{value:"View On Dune: Polkadot Staking Dashboard",id:"view-on-dune-polkadot-staking-dashboard",level:2},{value:"For a specific nomination pool member",id:"for-a-specific-nomination-pool-member",level:2}];function h(e){const o={a:"a",h1:"h1",h2:"h2",header:"header",p:"p",strong:"strong",...(0,s.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o.header,{children:(0,t.jsx)(o.h1,{id:"polkadot-staking-dashboard-pool-member",children:"Polkadot Staking Dashboard (Pool Member)"})}),"\n",(0,t.jsxs)(o.h2,{id:"view-on-dune-polkadot-staking-dashboard",children:["View On Dune: ",(0,t.jsx)(o.a,{href:"https://dune.com/substrate/polkadot-staking-pool-member",children:"Polkadot Staking Dashboard"})]}),"\n",(0,t.jsxs)(o.p,{children:["We're using ",(0,t.jsx)(o.strong,{children:"default parameters"})," for all of the following parameterized charts. Visit our\ndashboard on Dune to use the ",(0,t.jsx)(o.strong,{children:"user_ss58"})," parameter and analyze a specific referendum."]}),"\n",(0,t.jsx)(o.h2,{id:"for-a-specific-nomination-pool-member",children:"For a specific nomination pool member"}),"\n",(0,t.jsx)(o.p,{children:"This dashboard shows raw data of member activity within the pool"}),"\n",(0,t.jsx)(o.p,{children:"Member Pool Fee: 365 * member_staking_rewards / member_bonded"}),"\n",(0,t.jsxs)(o.p,{children:["Source Table: ",(0,t.jsx)(o.strong,{children:"polkadot.stakings"})," , MaterializedView:\n",(0,t.jsx)(o.a,{href:"https://dune.com/queries/3327479",children:(0,t.jsx)(o.strong,{children:"dune.substrate.result_polkadot_poolmembers"})})]}),"\n",(0,t.jsxs)(o.p,{children:["Go back to ",(0,t.jsx)(o.a,{href:"https://dune.com/substrate/polkadot-staking",children:(0,t.jsx)(o.strong,{children:"Polkadot Staking Home"})})]}),"\n",(0,t.jsx)("iframe",{src:"https://dune.com/embeds/3341609/5599266/",height:"350",width:"100%"}),"\n",(0,t.jsx)("iframe",{src:"https://dune.com/embeds/3341609/5599280/",height:"350",width:"100%"}),"\n",(0,t.jsx)("iframe",{src:"https://dune.com/embeds/3341609/5599290/",height:"350",width:"100%"}),"\n",(0,t.jsx)("iframe",{src:"https://dune.com/embeds/3341609/5599317/",height:"350",width:"100%"}),"\n",(0,t.jsx)("iframe",{src:"https://dune.com/embeds/3343369/5602279/",height:"350",width:"100%"}),"\n",(0,t.jsx)("iframe",{src:"https://dune.com/embeds/3343707/5602761/",height:"350",width:"100%"})]})}function c(e={}){const{wrapper:o}={...(0,s.R)(),...e.components};return o?(0,t.jsx)(o,{...e,children:(0,t.jsx)(h,{...e})}):h(e)}},28453:(e,o,a)=>{a.d(o,{R:()=>n,x:()=>r});var t=a(96540);const s={},d=t.createContext(s);function n(e){const o=t.useContext(d);return t.useMemo((function(){return"function"==typeof e?e(o):{...o,...e}}),[o,e])}function r(e){let o;return o=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:n(e.components),t.createElement(d.Provider,{value:o},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/a5002e4a.da11ab6d.js b/assets/js/a5002e4a.da11ab6d.js new file mode 100644 index 000000000000..d0d13f010b77 --- /dev/null +++ b/assets/js/a5002e4a.da11ab6d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1067],{13094:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>l,contentTitle:()=>s,default:()=>u,frontMatter:()=>i,metadata:()=>n,toc:()=>c});const n=JSON.parse('{"id":"build/build-oracle","title":"Oracles","description":"Information about building with oracles.","source":"@site/../docs/build/build-oracle.md","sourceDirName":"build","slug":"/build-oracle","permalink":"/docs/build-oracle","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/build/build-oracle.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1726729589000,"frontMatter":{"id":"build-oracle","title":"Oracles","sidebar_label":"Oracles","description":"Information about building with oracles.","keywords":["build","oracles","contracts"],"slug":"../build-oracle"}}');var o=a(74848),r=a(28453);const i={id:"build-oracle",title:"Oracles",sidebar_label:"Oracles",description:"Information about building with oracles.",keywords:["build","oracles","contracts"],slug:"../build-oracle"},s=void 0,l={},c=[];function d(e){const t={a:"a",em:"em",li:"li",p:"p",ul:"ul",...(0,r.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(t.p,{children:["In the blockchain context, an ",(0,o.jsx)(t.em,{children:"oracle"})," is a way to bring real-world data onto the blockchain so that\nit can be used by a decentralized application."]}),"\n",(0,o.jsx)(t.p,{children:"Oracles serve many purposes for application builders. For example:"}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsx)(t.li,{children:"Most stablecoin designs use an oracle to bring in data of the exchange rate of assets, in order to\npeg their value to a real world currency."}),"\n",(0,o.jsx)(t.li,{children:"Synthetic assets use oracles as price feeds in order to determine if the underlying cryptocurrency\ncan sufficiently collateralize the debt position."}),"\n",(0,o.jsx)(t.li,{children:"Prediction markets use oracles to decide the outcome of real world events and determine the payout\nof the prediction shares."}),"\n",(0,o.jsx)(t.li,{children:"Decentralized insurance markets use oracles to bring in information about whether a claim is valid\nor not."}),"\n"]}),"\n",(0,o.jsxs)(t.p,{children:["Oracle solutions range from centralized and trusted to decentralized and game-theory based. On the\ncentralized end of the spectrum, an oracle could be a single account that has the authority to\ndictate the real-world data on-chain. On the decentralized end, a\n",(0,o.jsx)(t.a,{href:"https://blog.ethereum.org/2014/03/28/schellingcoin-a-minimal-trust-universal-data-feed/",children:'complex game of "chicken"'}),"\ncan be played among various staked actors who risk getting slashed if they don't submit the same\ndata as everyone else. Solutions such as\n",(0,o.jsx)(t.a,{href:"https://polkadot.network/chainlink-reaches-milestone-with-polkadot/",children:"Chainlink"})," fit somewhere in\nthe middle, where the amount of trust you put into the reporting oracles can be adjusted based on\nyour preferences. A Chainlink\n",(0,o.jsx)(t.a,{href:"https://github.com/smartcontractkit/chainlink-polkadot/blob/master/pallet-chainlink-feed/README.md",children:"Feed Pallet"}),"\nwas recently released to allow smart contract applications across Polkadot to access price reference\ndata, made available as a Substrate oracle pallet. ",(0,o.jsx)(t.a,{href:"https://acurast.com/",children:"Acurast"})," is another\nsolution that enables developers to define their off-chain data and computation requirements and\nreceive the outputs to the ",(0,o.jsx)(t.a,{href:"https://docs.acurast.com/integrations/substrate",children:"Acurast Pallet"})," and EVM\nor WASM environments."]}),"\n",(0,o.jsx)(t.p,{children:"When using an oracle in your application you should be aware of the benefits and risks that are\nbaked into its specific model. As the Polkadot ecosystem develops and oracle parachains begin to\nappear, this article will be updated with a comparison of the different solutions and the benefits\nand drawbacks that each provide."})]})}function u(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},28453:(e,t,a)=>{a.d(t,{R:()=>i,x:()=>s});var n=a(96540);const o={},r=n.createContext(o);function i(e){const t=n.useContext(r);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function s(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:i(e.components),n.createElement(r.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/a5002e4a.e98dc710.js b/assets/js/a5002e4a.e98dc710.js deleted file mode 100644 index 957fc58a64dd..000000000000 --- a/assets/js/a5002e4a.e98dc710.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1067],{53029:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>u,frontMatter:()=>r,metadata:()=>s,toc:()=>c});var n=a(74848),o=a(28453);const r={id:"build-oracle",title:"Oracles",sidebar_label:"Oracles",description:"Information about building with oracles.",keywords:["build","oracles","contracts"],slug:"../build-oracle"},i=void 0,s={id:"build/build-oracle",title:"Oracles",description:"Information about building with oracles.",source:"@site/../docs/build/build-oracle.md",sourceDirName:"build",slug:"/build-oracle",permalink:"/docs/build-oracle",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/build/build-oracle.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1726729589e3,frontMatter:{id:"build-oracle",title:"Oracles",sidebar_label:"Oracles",description:"Information about building with oracles.",keywords:["build","oracles","contracts"],slug:"../build-oracle"}},l={},c=[];function d(e){const t={a:"a",em:"em",li:"li",p:"p",ul:"ul",...(0,o.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(t.p,{children:["In the blockchain context, an ",(0,n.jsx)(t.em,{children:"oracle"})," is a way to bring real-world data onto the blockchain so that\nit can be used by a decentralized application."]}),"\n",(0,n.jsx)(t.p,{children:"Oracles serve many purposes for application builders. For example:"}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsx)(t.li,{children:"Most stablecoin designs use an oracle to bring in data of the exchange rate of assets, in order to\npeg their value to a real world currency."}),"\n",(0,n.jsx)(t.li,{children:"Synthetic assets use oracles as price feeds in order to determine if the underlying cryptocurrency\ncan sufficiently collateralize the debt position."}),"\n",(0,n.jsx)(t.li,{children:"Prediction markets use oracles to decide the outcome of real world events and determine the payout\nof the prediction shares."}),"\n",(0,n.jsx)(t.li,{children:"Decentralized insurance markets use oracles to bring in information about whether a claim is valid\nor not."}),"\n"]}),"\n",(0,n.jsxs)(t.p,{children:["Oracle solutions range from centralized and trusted to decentralized and game-theory based. On the\ncentralized end of the spectrum, an oracle could be a single account that has the authority to\ndictate the real-world data on-chain. On the decentralized end, a\n",(0,n.jsx)(t.a,{href:"https://blog.ethereum.org/2014/03/28/schellingcoin-a-minimal-trust-universal-data-feed/",children:'complex game of "chicken"'}),"\ncan be played among various staked actors who risk getting slashed if they don't submit the same\ndata as everyone else. Solutions such as\n",(0,n.jsx)(t.a,{href:"https://polkadot.network/chainlink-reaches-milestone-with-polkadot/",children:"Chainlink"})," fit somewhere in\nthe middle, where the amount of trust you put into the reporting oracles can be adjusted based on\nyour preferences. A Chainlink\n",(0,n.jsx)(t.a,{href:"https://github.com/smartcontractkit/chainlink-polkadot/blob/master/pallet-chainlink-feed/README.md",children:"Feed Pallet"}),"\nwas recently released to allow smart contract applications across Polkadot to access price reference\ndata, made available as a Substrate oracle pallet. ",(0,n.jsx)(t.a,{href:"https://acurast.com/",children:"Acurast"})," is another\nsolution that enables developers to define their off-chain data and computation requirements and\nreceive the outputs to the ",(0,n.jsx)(t.a,{href:"https://docs.acurast.com/integrations/substrate",children:"Acurast Pallet"})," and EVM\nor WASM environments."]}),"\n",(0,n.jsx)(t.p,{children:"When using an oracle in your application you should be aware of the benefits and risks that are\nbaked into its specific model. As the Polkadot ecosystem develops and oracle parachains begin to\nappear, this article will be updated with a comparison of the different solutions and the benefits\nand drawbacks that each provide."})]})}function u(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(d,{...e})}):d(e)}},28453:(e,t,a)=>{a.d(t,{R:()=>i,x:()=>s});var n=a(96540);const o={},r=n.createContext(o);function i(e){const t=n.useContext(r);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function s(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:i(e.components),n.createElement(r.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/a5b3561d.0d88e6fa.js b/assets/js/a5b3561d.0d88e6fa.js new file mode 100644 index 000000000000..fbfb2ae202a5 --- /dev/null +++ b/assets/js/a5b3561d.0d88e6fa.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2226],{49538:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>r,default:()=>l,frontMatter:()=>i,metadata:()=>o,toc:()=>d});const o=JSON.parse('{"id":"general/kusama/kusama-coc","title":"Kusama Code of Conduct","description":"Kusama\'s Code of Conduct to sustain chaos.","source":"@site/../docs/general/kusama/kusama-coc.md","sourceDirName":"general/kusama","slug":"/kusama-coc","permalink":"/docs/kusama-coc","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/kusama/kusama-coc.md","tags":[],"version":"current","lastUpdatedBy":"Keith Alfaro","lastUpdatedAt":1663541349000,"frontMatter":{"id":"kusama-coc","title":"Kusama Code of Conduct","sidebar_label":"Code of Conduct","description":"Kusama\'s Code of Conduct to sustain chaos.","keywords":["coc","code of conduct","report","guideline"],"slug":"../../kusama-coc"},"sidebar":"docs","previous":{"title":"Timeline","permalink":"/docs/kusama-timeline"},"next":{"title":"Bug Bounty","permalink":"/docs/kusama-bug-bounty"}}');var a=n(74848),s=n(28453);const i={id:"kusama-coc",title:"Kusama Code of Conduct",sidebar_label:"Code of Conduct",description:"Kusama's Code of Conduct to sustain chaos.",keywords:["coc","code of conduct","report","guideline"],slug:"../../kusama-coc"},r=void 0,c={},d=[{value:"Community",id:"community",level:2},{value:"Bugs",id:"bugs",level:2}];function u(e){const t={a:"a",admonition:"admonition",h2:"h2",li:"li",p:"p",ul:"ul",...(0,s.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(t.p,{children:"While Kusama has been its own network and has had its own ecosystem for a while now, it is still one\nbig experiment, and we need your participation for it to continue being a great success."}),"\n",(0,a.jsx)(t.h2,{id:"community",children:"Community"}),"\n",(0,a.jsx)(t.p,{children:"We want to foster a sense of collaboration amongst ourselves and the open-source community. Kusama\nparticipants exist to encourage the open exchange of ideas and expression and require an environment\nthat recognizes the inherent worth of every person and group. We are here to collaborate, discuss,\nand even disagree. The key is doing this in a manner that comes from a place of respect and\nprofessionalism. Participants in the Kusama network may consist of an online forum, on-chain\ngovernance participants, parachain deployment teams, validators, enthusiasts, and ecosystem tool\nbuilders. We expect for there to be participation from all backgrounds but like to set some social\nboundaries on how you may be treated and treat others."}),"\n",(0,a.jsx)(t.p,{children:"Kusama community members come from across the globe and are not bordered by race, gender, or\nbackground. Community participants have read through the requisite resources and obtained sufficient\nknowledge about Kusama and all related content. This knowledge equips the community with the\nrequisite information needed to dispense of their duties as a participant."}),"\n",(0,a.jsxs)(t.admonition,{title:"Examples of Unacceptable Behavior",type:"note",children:[(0,a.jsx)(t.p,{children:"These are just a few examples, and you can always consult a team member if you have any questions."}),(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsx)(t.li,{children:"Obnoxious, aggressive comments towards individuals or other projects on any medium of\ncommunication."}),"\n",(0,a.jsx)(t.li,{children:"Knowingly distributing false information about Kusama or other projects."}),"\n",(0,a.jsx)(t.li,{children:"Harassing other individuals or projects."}),"\n"]})]}),"\n",(0,a.jsx)(t.p,{children:"That said, please note that Kusama is an edgy and meme-friendly network, and community member\nactions shouldn't be taken too seriously - try to assume jest before malice."}),"\n",(0,a.jsxs)(t.admonition,{title:"What To Do If You Witness or Are Subject To Unacceptable Behavior",type:"tip",children:[(0,a.jsx)(t.p,{children:"If you are being harassed, notice that someone else is being harassed, or have any other concerns\nrelating to harassment, please contact the administrator of the channel you\u2019re in."}),(0,a.jsx)(t.p,{children:"This Code of Conduct may be revised at any time. We are always willing to revise this document based\non feedback from the Kusama participants and/or the Polkadot community."})]}),"\n",(0,a.jsx)(t.h2,{id:"bugs",children:"Bugs"}),"\n",(0,a.jsxs)(t.p,{children:["Please understand that this network is, despite its success, an experiment with potential flaws, so\nit\u2019s appreciated that community members help report any sort of exploits directly to the team before\nsharing publicly. Please see the ",(0,a.jsx)(t.a,{href:"/docs/kusama-bug-bounty",children:"bug bounty program"}),"."]})]})}function l(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,a.jsx)(t,{...e,children:(0,a.jsx)(u,{...e})}):u(e)}},28453:(e,t,n)=>{n.d(t,{R:()=>i,x:()=>r});var o=n(96540);const a={},s=o.createContext(a);function i(e){const t=o.useContext(s);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:i(e.components),o.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/a5b3561d.517be5d6.js b/assets/js/a5b3561d.517be5d6.js deleted file mode 100644 index 88aa4a9effb2..000000000000 --- a/assets/js/a5b3561d.517be5d6.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2226],{54237:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>i,default:()=>l,frontMatter:()=>s,metadata:()=>r,toc:()=>d});var o=n(74848),a=n(28453);const s={id:"kusama-coc",title:"Kusama Code of Conduct",sidebar_label:"Code of Conduct",description:"Kusama's Code of Conduct to sustain chaos.",keywords:["coc","code of conduct","report","guideline"],slug:"../../kusama-coc"},i=void 0,r={id:"general/kusama/kusama-coc",title:"Kusama Code of Conduct",description:"Kusama's Code of Conduct to sustain chaos.",source:"@site/../docs/general/kusama/kusama-coc.md",sourceDirName:"general/kusama",slug:"/kusama-coc",permalink:"/docs/kusama-coc",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/kusama/kusama-coc.md",tags:[],version:"current",lastUpdatedBy:"Keith Alfaro",lastUpdatedAt:1663541349e3,frontMatter:{id:"kusama-coc",title:"Kusama Code of Conduct",sidebar_label:"Code of Conduct",description:"Kusama's Code of Conduct to sustain chaos.",keywords:["coc","code of conduct","report","guideline"],slug:"../../kusama-coc"},sidebar:"docs",previous:{title:"Timeline",permalink:"/docs/kusama-timeline"},next:{title:"Bug Bounty",permalink:"/docs/kusama-bug-bounty"}},c={},d=[{value:"Community",id:"community",level:2},{value:"Bugs",id:"bugs",level:2}];function u(e){const t={a:"a",admonition:"admonition",h2:"h2",li:"li",p:"p",ul:"ul",...(0,a.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.p,{children:"While Kusama has been its own network and has had its own ecosystem for a while now, it is still one\nbig experiment, and we need your participation for it to continue being a great success."}),"\n",(0,o.jsx)(t.h2,{id:"community",children:"Community"}),"\n",(0,o.jsx)(t.p,{children:"We want to foster a sense of collaboration amongst ourselves and the open-source community. Kusama\nparticipants exist to encourage the open exchange of ideas and expression and require an environment\nthat recognizes the inherent worth of every person and group. We are here to collaborate, discuss,\nand even disagree. The key is doing this in a manner that comes from a place of respect and\nprofessionalism. Participants in the Kusama network may consist of an online forum, on-chain\ngovernance participants, parachain deployment teams, validators, enthusiasts, and ecosystem tool\nbuilders. We expect for there to be participation from all backgrounds but like to set some social\nboundaries on how you may be treated and treat others."}),"\n",(0,o.jsx)(t.p,{children:"Kusama community members come from across the globe and are not bordered by race, gender, or\nbackground. Community participants have read through the requisite resources and obtained sufficient\nknowledge about Kusama and all related content. This knowledge equips the community with the\nrequisite information needed to dispense of their duties as a participant."}),"\n",(0,o.jsxs)(t.admonition,{title:"Examples of Unacceptable Behavior",type:"note",children:[(0,o.jsx)(t.p,{children:"These are just a few examples, and you can always consult a team member if you have any questions."}),(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsx)(t.li,{children:"Obnoxious, aggressive comments towards individuals or other projects on any medium of\ncommunication."}),"\n",(0,o.jsx)(t.li,{children:"Knowingly distributing false information about Kusama or other projects."}),"\n",(0,o.jsx)(t.li,{children:"Harassing other individuals or projects."}),"\n"]})]}),"\n",(0,o.jsx)(t.p,{children:"That said, please note that Kusama is an edgy and meme-friendly network, and community member\nactions shouldn't be taken too seriously - try to assume jest before malice."}),"\n",(0,o.jsxs)(t.admonition,{title:"What To Do If You Witness or Are Subject To Unacceptable Behavior",type:"tip",children:[(0,o.jsx)(t.p,{children:"If you are being harassed, notice that someone else is being harassed, or have any other concerns\nrelating to harassment, please contact the administrator of the channel you\u2019re in."}),(0,o.jsx)(t.p,{children:"This Code of Conduct may be revised at any time. We are always willing to revise this document based\non feedback from the Kusama participants and/or the Polkadot community."})]}),"\n",(0,o.jsx)(t.h2,{id:"bugs",children:"Bugs"}),"\n",(0,o.jsxs)(t.p,{children:["Please understand that this network is, despite its success, an experiment with potential flaws, so\nit\u2019s appreciated that community members help report any sort of exploits directly to the team before\nsharing publicly. Please see the ",(0,o.jsx)(t.a,{href:"/docs/kusama-bug-bounty",children:"bug bounty program"}),"."]})]})}function l(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(u,{...e})}):u(e)}},28453:(e,t,n)=>{n.d(t,{R:()=>i,x:()=>r});var o=n(96540);const a={},s=o.createContext(a);function i(e){const t=o.useContext(s);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:i(e.components),o.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/a74a59a0.7d018d64.js b/assets/js/a74a59a0.7d018d64.js deleted file mode 100644 index e33214428178..000000000000 --- a/assets/js/a74a59a0.7d018d64.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk=self.webpackChunk||[]).push([[4975],{34917:(e,n,t)=>{"use strict";t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>s,default:()=>h,frontMatter:()=>o,metadata:()=>r,toc:()=>d});var a=t(74848),i=t(28453);t(47379);const o={id:"maintain-guides-how-to-validate-polkadot",title:"Run a Validator (Polkadot)",sidebar_label:"How to run a Validator on Polkadot",description:"The fundamentals for running a Polkadot validator.",keywords:["validator setup","validator","validate","binary","runtime"],slug:"../maintain-guides-how-to-validate-polkadot"},s=void 0,r={id:"maintain/maintain-guides-how-to-validate-polkadot",title:"Run a Validator (Polkadot)",description:"The fundamentals for running a Polkadot validator.",source:"@site/../docs/maintain/maintain-guides-how-to-validate-polkadot.md",sourceDirName:"maintain",slug:"/maintain-guides-how-to-validate-polkadot",permalink:"/docs/maintain-guides-how-to-validate-polkadot",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/maintain/maintain-guides-how-to-validate-polkadot.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1727167801e3,frontMatter:{id:"maintain-guides-how-to-validate-polkadot",title:"Run a Validator (Polkadot)",sidebar_label:"How to run a Validator on Polkadot",description:"The fundamentals for running a Polkadot validator.",keywords:["validator setup","validator","validate","binary","runtime"],slug:"../maintain-guides-how-to-validate-polkadot"},sidebar:"docs",previous:{title:"Validator Guides",permalink:"/docs/maintain-validator-index"},next:{title:"Validator Payout Overview",permalink:"/docs/maintain-guides-validator-payout"}},l={},d=[{value:"Preliminaries",id:"preliminaries",level:2},{value:"How many DOT do I need to become an active Validator?",id:"how-many-dot-do-i-need-to-become-an-active-validator",level:3},{value:"Initial Set-up",id:"initial-set-up",level:2},{value:"Requirements",id:"requirements",level:3},{value:"Reference Hardware",id:"reference-hardware",level:4},{value:"Install & Configure Network Time Protocol (NTP) Client",id:"install--configure-network-time-protocol-ntp-client",level:3},{value:"Make Sure Landlock is Enabled",id:"make-sure-landlock-is-enabled",level:3},{value:"Installing the Polkadot binaries",id:"installing-the-polkadot-binaries",level:3},{value:"Installation from official releases",id:"installation-from-official-releases",level:4},{value:"Optional: Installation with Package Managers",id:"optional-installation-with-package-managers",level:4},{value:"Debian-based (Debian, Ubuntu)",id:"debian-based-debian-ubuntu",level:4},{value:"RPM-based (Fedora, CentOS)",id:"rpm-based-fedora-centos",level:4},{value:"Optional: Installation with Ansible",id:"optional-installation-with-ansible",level:4},{value:"Optional: Installation with Docker",id:"optional-installation-with-docker",level:4},{value:"Optional: Building the Polkadot binaries from sources",id:"optional-building-the-polkadot-binaries-from-sources",level:3},{value:"Prerequisites: Install Rust and Dependencies",id:"prerequisites-install-rust-and-dependencies",level:4},{value:"Building the binaries",id:"building-the-binaries",level:4},{value:"Verify the installation",id:"verify-the-installation",level:3},{value:"Synchronize Chain Data",id:"synchronize-chain-data",level:3},{value:"Database Snapshot Services",id:"database-snapshot-services",level:4},{value:"Bond DOT",id:"bond-dot",level:2},{value:"Set Session Keys",id:"set-session-keys",level:2},{value:"Generating the Session Keys",id:"generating-the-session-keys",level:3},{value:"Option 1: PolkadotJS-APPS",id:"option-1-polkadotjs-apps",level:4},{value:"Option 2: CLI",id:"option-2-cli",level:4},{value:"Submitting the setKeys Transaction",id:"submitting-the-setkeys-transaction",level:3},{value:"Setting the Node (aka Network) Key",id:"setting-the-node-aka-network-key",level:3},{value:"Validate",id:"validate",level:2},{value:"Setup via Validator Tab",id:"setup-via-validator-tab",level:3},{value:"Thousand Validators Programme",id:"thousand-validators-programme",level:2},{value:"Running a validator on a testnet",id:"running-a-validator-on-a-testnet",level:2},{value:"FAQ",id:"faq",level:2},{value:"Why am I unable to synchronize the chain with 0 peers?",id:"why-am-i-unable-to-synchronize-the-chain-with-0-peers",level:3},{value:"How do I clear all my chain data?",id:"how-do-i-clear-all-my-chain-data",level:3},{value:"Note about VPS",id:"note-about-vps",level:2},{value:"Disable SMT",id:"disable-smt",level:3},{value:"Disable automatic NUMA balancing",id:"disable-automatic-numa-balancing",level:3},{value:"Configure Spectre/Meltdown Mitigations",id:"configure-spectremeltdown-mitigations",level:3},{value:"For Linux >= 5.16",id:"for-linux--516",level:4},{value:"For Linux < 5.16",id:"for-linux--516-1",level:4},{value:"VPS List",id:"vps-list",level:3}];function c(e){const n={a:"a",admonition:"admonition",blockquote:"blockquote",code:"code",del:"del",em:"em",h2:"h2",h3:"h3",h4:"h4",img:"img",li:"li",mdxAdmonitionTitle:"mdxAdmonitionTitle",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,i.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.admonition,{type:"tip",children:(0,a.jsxs)(n.p,{children:["If you are a beginner, it is recommended that you start your validator journey on Kusama network.\nCheck the ",(0,a.jsx)(n.a,{href:"/docs/maintain-guides-how-to-validate-kusama",children:"Kusama guide"})," for details on how to get\nstarted."]})}),"\n",(0,a.jsx)(n.h2,{id:"preliminaries",children:"Preliminaries"}),"\n",(0,a.jsxs)(n.p,{children:["Running a validator on a live network is a lot of responsibility! You will be accountable for not\nonly your own stake, but also the stake of your current nominators. If you make a mistake and get\n",(0,a.jsx)(n.a,{href:"/docs/learn-offenses",children:"slashed"}),", your tokens and your reputation will be at risk. However,\nrunning a validator can also be very rewarding, knowing that you contribute to the security of a\ndecentralized network while growing your stash."]}),"\n",(0,a.jsxs)(n.admonition,{type:"warning",children:[(0,a.jsx)(n.p,{children:"It is highly recommended that you have significant system administration experience before\nattempting to run your own validator."}),(0,a.jsx)(n.p,{children:"You must be able to handle technical issues and anomalies with your node which you must be able to\ntackle yourself. Being a validator involves more than just executing the Polkadot binary."})]}),"\n",(0,a.jsxs)(n.p,{children:["Since security is so important to running a successful validator, you should take a look at the\n",(0,a.jsx)(n.a,{href:"/docs/maintain-guides-secure-validator",children:"secure validator"})," information to make sure you understand the\nfactors to consider when constructing your infrastructure. As you progress in your journey as a\nvalidator, you will likely want to use this repository as a ",(0,a.jsx)(n.em,{children:"starting point"})," for your own\nmodifications and customizations."]}),"\n",(0,a.jsxs)(n.p,{children:["If you need help, please reach out on the\n",(0,a.jsx)(n.a,{href:"https://matrix.to/#/#polkadotvalidatorlounge:web3.foundation",children:"Polkadot Validator Lounge"})," on\nElement. The team and other validators are there to help answer questions and provide tips from\nexperience."]}),"\n",(0,a.jsx)(n.h3,{id:"how-many-dot-do-i-need-to-become-an-active-validator",children:"How many DOT do I need to become an active Validator?"}),"\n",(0,a.jsxs)(n.p,{children:["You can have a rough estimate on that by using the methods listed\n",(0,a.jsx)(n.a,{href:"../general/faq.md/#what-is-the-minimum-stake-necessary-to-be-elected-as-an-active-validator",children:"here"}),".\nTo be elected into the set, you need a minimum stake behind your validator. This stake can come from\nyourself or from ",(0,a.jsx)(n.a,{href:"/docs/learn-nominator",children:"nominators"}),". This means that as a minimum, you will\nneed enough DOT to set up stash (and optionally a staking\n",(0,a.jsx)(n.a,{href:"/docs/learn-proxies",children:"proxy account"}),") with the existential deposit, plus a little extra for\ntransaction fees. The rest can come from nominators. To understand how validators are elected, check\nthe ",(0,a.jsx)(n.a,{href:"/docs/learn-phragmen",children:"NPoS Election algorithms"})," page."]}),"\n",(0,a.jsxs)(n.p,{children:["For further reference, you may look at the\n",(0,a.jsx)(n.a,{href:"https://polkadot.subscan.io/validator_list?status=validator",children:"statistics for current, active validators"}),".\nFor Kusama see ",(0,a.jsx)(n.a,{href:"https://kusama.subscan.io/validator_list?status=validator",children:"here"}),"."]}),"\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.strong,{children:"Warning:"})," Any DOT that you stake for your validator is liable to be\n",(0,a.jsx)(n.a,{href:"/docs/learn-offenses",children:"slashed"}),", meaning that an insecure or improper setup may result in loss\nof DOT tokens! If you are not confident in your ability to run a validator node, it is recommended\nto nominate your DOT to a trusted validator node instead."]}),"\n",(0,a.jsx)(n.h2,{id:"initial-set-up",children:"Initial Set-up"}),"\n",(0,a.jsx)(n.h3,{id:"requirements",children:"Requirements"}),"\n",(0,a.jsxs)(n.p,{children:["The most common way for a beginner to run a validator is on a cloud server running Linux. You may\nchoose whatever ",(0,a.jsx)(n.a,{href:"#note-about-vps",children:"VPS"})," provider that you prefer. As OS it is best to use a recent\nDebian Linux. For this guide we will be using ",(0,a.jsx)(n.strong,{children:"Ubuntu 22.04"}),", but the instructions should be\nsimilar for other platforms."]}),"\n",(0,a.jsx)(n.h4,{id:"reference-hardware",children:"Reference Hardware"}),"\n",(0,a.jsxs)(n.p,{children:["The transaction weights in Polkadot are benchmarked on reference hardware. We ran the benchmark on\nVM instances of two major cloud providers: Google Cloud Platform (GCP) and Amazon Web Services\n(AWS). To be specific, we used ",(0,a.jsx)(n.code,{children:"n2-standard-8"})," VM instance on GCP and ",(0,a.jsx)(n.code,{children:"c6i.4xlarge"})," on AWS. It is\nrecommended that the hardware used to run the validators at least matches the specs of the reference\nhardware in order to ensure they are able to process all blocks in time. If you use subpar hardware\nyou will possibly run into performance issues, get less era points, and potentially even get\nslashed."]}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.strong,{children:"CPU"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:"x86-64 compatible;"}),"\n",(0,a.jsx)(n.li,{children:"Intel Ice Lake, or newer (Xeon or Core series); AMD Zen3, or newer (EPYC or Ryzen);"}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.del,{children:"4"})," 8 physical cores @ 3.4GHz; starting with January 2025, the recommendation is to use a\nhardware with at least ",(0,a.jsx)(n.strong,{children:"8"})," physical cores, see\n",(0,a.jsx)(n.a,{href:"https://polkadot.subsquare.io/referenda/1051",children:"referenda"})," for more details about the rationale;"]}),"\n",(0,a.jsx)(n.li,{children:"Simultaneous multithreading disabled (Hyper-Threading on Intel, SMT on AMD);"}),"\n",(0,a.jsxs)(n.li,{children:["Prefer single-threaded performance over higher cores count. A comparison of single-threaded\nperformance can be found ",(0,a.jsx)(n.a,{href:"https://www.cpubenchmark.net/singleThread.html",children:"here"}),"."]}),"\n"]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.strong,{children:"Storage"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["An NVMe SSD of 1 TB (As it should be reasonably sized to deal with blockchain growth). An\nestimation of current chain snapshot sizes can be found\n",(0,a.jsx)(n.a,{href:"https://stakeworld.io/docs/dbsize",children:"here"}),". In general, the latency is more important than the\nthroughput."]}),"\n"]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.strong,{children:"Memory"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:"32 GB DDR4 ECC."}),"\n"]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.strong,{children:"System"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:"Linux Kernel 5.16 or newer."}),"\n"]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.strong,{children:"Network"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:"The minimum symmetric networking speed is set to 500 Mbit/s (= 62.5 MB/s). This is required to\nsupport a large number of parachains and allow for proper congestion control in busy network\nsituations."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,a.jsxs)(n.p,{children:["The specs posted above are not a ",(0,a.jsx)(n.em,{children:"hard"})," requirement to run a validator, but are considered best\npractice. Running a validator is a responsible task; using professional hardware is a must in any\nway."]}),"\n",(0,a.jsx)(n.h3,{id:"install--configure-network-time-protocol-ntp-client",children:"Install & Configure Network Time Protocol (NTP) Client"}),"\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/Network_Time_Protocol",children:"NTP"})," is a networking protocol designed to\nsynchronize the clocks of computers over a network. NTP allows you to synchronize the clocks of all\nthe systems within the network. Currently it is required that validators' local clocks stay\nreasonably in sync, so you should be running NTP or a similar service. You can check whether you\nhave the NTP client by running:"]}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.em,{children:"If you are using Ubuntu 18.04 or a newer version, NTP Client should be installed by default."})}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-sh",children:"timedatectl\n"})}),"\n",(0,a.jsxs)(n.p,{children:["If NTP is installed and running, you should see ",(0,a.jsx)(n.code,{children:"System clock synchronized: yes"})," (or a similar\nmessage). If you do not see it, you can install it by executing:"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-sh",children:"sudo apt-get install ntp\n"})}),"\n",(0,a.jsx)(n.p,{children:"ntpd will be started automatically after install. You can query ntpd for status information to\nverify that everything is working:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-sh",children:"sudo ntpq -p\n"})}),"\n",(0,a.jsx)(n.admonition,{type:"warning",children:(0,a.jsx)(n.p,{children:"Skipping this can result in the validator node missing block authorship opportunities. If the clock\nis out of sync (even by a small amount), the blocks the validator produces may not get accepted by\nthe network."})}),"\n",(0,a.jsx)(n.h3,{id:"make-sure-landlock-is-enabled",children:"Make Sure Landlock is Enabled"}),"\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.a,{href:"https://docs.kernel.org/userspace-api/landlock.html",children:"Landlock"})," is a Linux security feature used in\nPolkadot:"]}),"\n",(0,a.jsxs)(n.blockquote,{children:["\n",(0,a.jsx)(n.p,{children:"Landlock empowers any process, including unprivileged ones, to securely restrict themselves."}),"\n"]}),"\n",(0,a.jsx)(n.p,{children:"To make use of landlock, make sure you are on the reference kernel version or newer. Most Linux\ndistributions should already have landlock enabled, but you can check by running the following as\nroot:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-sh",children:"dmesg | grep landlock || journalctl -kg landlock\n"})}),"\n",(0,a.jsxs)(n.p,{children:["If it is not enabled, please see the\n",(0,a.jsx)(n.a,{href:"https://docs.kernel.org/userspace-api/landlock.html#kernel-support",children:'official docs ("Kernel support")'}),"\nif you would like to build Linux with landlock enabled."]}),"\n",(0,a.jsx)(n.h3,{id:"installing-the-polkadot-binaries",children:"Installing the Polkadot binaries"}),"\n",(0,a.jsx)(n.admonition,{title:"Multiple Validator Binaries",type:"info",children:(0,a.jsxs)(n.p,{children:["In addition to the ",(0,a.jsx)(n.code,{children:"polkadot"})," binary, recent changes have separated out functionality into two\nadditional needed binaries, ",(0,a.jsx)(n.code,{children:"polkadot-prepare-worker"}),", and ",(0,a.jsx)(n.code,{children:"polkadot-execute-worker"}),". All three\nbinaries are needed to properly run a validator node. More context on these changes can be found\n",(0,a.jsx)(n.a,{href:"https://github.com/paritytech/polkadot/pull/7337",children:"here"})]})}),"\n",(0,a.jsx)(n.h4,{id:"installation-from-official-releases",children:"Installation from official releases"}),"\n",(0,a.jsxs)(n.p,{children:["The official binaries can be downloaded from the\n",(0,a.jsx)(n.a,{href:"https://github.com/paritytech/polkadot-sdk/releases",children:"Github Releases"}),". You should download the\nlatest available version. You can also download the binaries by using the following direct links\n(replace X.Y.Z by the appropriate version):"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-sh",children:"https://github.com/paritytech/polkadot-sdk/releases/download/polkadot-vX.Y.Z/polkadot\nhttps://github.com/paritytech/polkadot-sdk/releases/download/polkadot-vX.Y.Z/polkadot-execute-worker\nhttps://github.com/paritytech/polkadot-sdk/releases/download/polkadot-vX.Y.Z/polkadot-prepare-worker\n"})}),"\n",(0,a.jsx)(n.h4,{id:"optional-installation-with-package-managers",children:"Optional: Installation with Package Managers"}),"\n",(0,a.jsxs)(n.p,{children:["The Polkadot Binary in included in ",(0,a.jsx)(n.code,{children:"Debian"})," derivatives (i.e. ",(0,a.jsx)(n.strong,{children:"Debian"}),", ",(0,a.jsx)(n.strong,{children:"Ubuntu"}),") and\n",(0,a.jsx)(n.code,{children:"RPM-based"})," distros (i.e. ",(0,a.jsx)(n.strong,{children:"Fedora"}),", ",(0,a.jsx)(n.strong,{children:"CentOS"}),")."]}),"\n",(0,a.jsx)(n.h4,{id:"debian-based-debian-ubuntu",children:"Debian-based (Debian, Ubuntu)"}),"\n",(0,a.jsx)(n.p,{children:"Run the following commands as the root user:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-ssh",children:"# Import the security@parity.io GPG key\ngpg --recv-keys --keyserver hkps://keys.mailvelope.com 9D4B2B6EB8F97156D19669A9FF0812D491B96798\ngpg --export 9D4B2B6EB8F97156D19669A9FF0812D491B96798 > /usr/share/keyrings/parity.gpg\n# Add the Parity repository and update the package index\necho 'deb [signed-by=/usr/share/keyrings/parity.gpg] https://releases.parity.io/deb release main' > /etc/apt/sources.list.d/parity.list\napt update\n# Install the `parity-keyring` package - This will ensure the GPG key\n# used by APT remains up-to-date\napt install parity-keyring\n# Install polkadot\napt install polkadot\n"})}),"\n",(0,a.jsx)(n.h4,{id:"rpm-based-fedora-centos",children:"RPM-based (Fedora, CentOS)"}),"\n",(0,a.jsx)(n.p,{children:"Run the following commands as the root user:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"# Install dnf-plugins-core (This might already be installed)\ndnf install dnf-plugins-core\n# Add the repository and enable it\ndnf config-manager --add-repo https://releases.parity.io/rpm/polkadot.repo\ndnf config-manager --set-enabled polkadot\n# Install polkadot (You may have to confirm the import of the GPG key, which\n# should have the following fingerprint: 9D4B2B6EB8F97156D19669A9FF0812D491B96798)\ndnf install polkadot\n"})}),"\n",(0,a.jsx)(n.p,{children:'Make sure you verify the installation (see the "Verify the installation" section).'}),"\n",(0,a.jsxs)(n.admonition,{title:"By default, the Polkadot systemd service is disabled",type:"note",children:[(0,a.jsx)(n.p,{children:"To start the service, run:"}),(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"sudo systemctl start polkadot.service\n"})})]}),"\n",(0,a.jsx)(n.h4,{id:"optional-installation-with-ansible",children:"Optional: Installation with Ansible"}),"\n",(0,a.jsxs)(n.p,{children:["To manage Polkadot installation with Ansible, you can use the ",(0,a.jsx)(n.strong,{children:"Substrate node role"})," distributed on\nthe ",(0,a.jsx)(n.a,{href:"https://github.com/paritytech/ansible-galaxy/",children:"Parity chain operations Ansible collection"})]}),"\n",(0,a.jsx)(n.h4,{id:"optional-installation-with-docker",children:"Optional: Installation with Docker"}),"\n",(0,a.jsxs)(n.p,{children:["To run Polkadot on a Docker or an OCI compatible container runtime, you can use the official\n",(0,a.jsx)(n.a,{href:"https://hub.docker.com/r/parity/polkadot/tags",children:"parity/polkadot docker image"}),", available on Docker\nHub (replace X.Y.Z by the appropriate version):"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-sh",children:"docker.io/parity/polkadot:vX.Y.Z\n"})}),"\n",(0,a.jsx)(n.h3,{id:"optional-building-the-polkadot-binaries-from-sources",children:"Optional: Building the Polkadot binaries from sources"}),"\n",(0,a.jsx)(n.h4,{id:"prerequisites-install-rust-and-dependencies",children:"Prerequisites: Install Rust and Dependencies"}),"\n",(0,a.jsx)(n.p,{children:"If you have never installed Rust, you should do this first."}),"\n",(0,a.jsx)(n.p,{children:"If you have already installed Rust, run the following command to make sure you are using the latest\nversion."}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-sh",children:"rustup update\n"})}),"\n",(0,a.jsx)(n.p,{children:"If not, this command will fetch the latest version of Rust and install it."}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-sh",children:"curl https://sh.rustup.rs -sSf | sh -s -- -y\n"})}),"\n",(0,a.jsxs)(n.admonition,{type:"note",children:[(0,a.jsx)(n.p,{children:'If you do not have "curl" installed, run:'}),(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"sudo apt install curl\n"})}),(0,a.jsxs)(n.p,{children:['It will also be valuable to have "websocat" (Netcat, curl and socat for WebSockets) installed for\nRPC interactions. Installation instructions for various operating systems can be found\n',(0,a.jsx)(n.a,{href:"https://github.com/vi/websocat#installation",children:"here"}),"."]})]}),"\n",(0,a.jsx)(n.p,{children:"To configure your shell, run the following command."}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-sh",children:"source $HOME/.cargo/env\n"})}),"\n",(0,a.jsx)(n.p,{children:"Verify your installation."}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-sh",children:"rustc --version\n"})}),"\n",(0,a.jsx)(n.p,{children:"Finally, run this command to install the necessary dependencies for compiling and running the\nPolkadot node software."}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-sh",children:"sudo apt install make clang pkg-config libssl-dev build-essential\n"})}),"\n",(0,a.jsxs)(n.admonition,{type:"note",children:[(0,a.jsxs)(n.p,{children:["If you are using OSX and you have ",(0,a.jsx)(n.a,{href:"https://brew.sh",children:"Homebrew"})," installed, you can issue the following\nequivalent command INSTEAD of the previous one:"]}),(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-sh",children:"brew install cmake pkg-config openssl git llvm\n"})})]}),"\n",(0,a.jsx)(n.h4,{id:"building-the-binaries",children:"Building the binaries"}),"\n",(0,a.jsxs)(n.p,{children:["You can build the Polkadot binaries from the\n",(0,a.jsx)(n.a,{href:"https://github.com/paritytech/polkadot-sdk",children:"paritytech/polkadot-sdk"})," repository on GitHub."]}),"\n",(0,a.jsxs)(n.p,{children:["You should generally use the latest ",(0,a.jsx)(n.strong,{children:"X.Y.Z"}),' tag. You should either review the output from the "git\ntag" command or view the ',(0,a.jsx)(n.a,{href:"https://github.com/paritytech/polkadot-sdk/tags",children:"Polkadot SDK Github tags"}),"\nto see a list of all the available release versions. You should replace ",(0,a.jsx)(n.code,{children:"VERSION"})," below with the\nlatest build (i.e., the highest number)."]}),"\n",(0,a.jsxs)(n.admonition,{type:"note",children:[(0,a.jsx)(n.p,{children:"If you prefer to use SSH rather than HTTPS, you can replace the first line of the below with"}),(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-sh",children:"git clone git@github.com:paritytech/polkadot-sdk.git\n"})})]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-sh",children:"git clone https://github.com/paritytech/polkadot-sdk.git\ncd polkadot-sdk/polkadot\n"})}),"\n",(0,a.jsx)(n.p,{children:"Run the following command to find the latest version."}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-sh",children:"git tag -l | sort -V | grep -v -- '-rc'\n"})}),"\n",(0,a.jsx)(n.p,{children:'Find the latest version; replace "VERSION" in the command below and run to change your branch.'}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-sh",children:"git checkout VERSION\n"})}),"\n",(0,a.jsxs)(n.p,{children:["Build native code with the production profile. The following will make sure that the binaries are\nall in your ",(0,a.jsx)(n.code,{children:"$PATH"}),"."]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-sh",children:"cargo install --force --path . --profile production\n"})}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.strong,{children:(0,a.jsx)(n.em,{children:"This step will take a while (generally 10 - 40 minutes, depending on your hardware)."})})}),"\n",(0,a.jsxs)(n.admonition,{title:"Compilation Errors",type:"note",children:[(0,a.jsxs)(n.p,{children:["If you run into compile errors, you may have to pin the version of Rust compiler to the one that was\nused to build the release. Check out ",(0,a.jsx)(n.code,{children:"Rust compiler versions"})," section in the release notes. This can\nbe done by running:"]}),(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-sh",children:"rustup install nightly-2022-05-18\nrustup target add wasm32-unknown-unknown --toolchain nightly-2022-05-18\ncargo +nightly-2022-05-18 build --release\n"})}),(0,a.jsx)(n.p,{children:"You may also need to run the build more than once."}),(0,a.jsx)(n.p,{children:"If you would like to execute the tests, run the following command:"}),(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-sh",children:"cargo test --all\n"})})]}),"\n",(0,a.jsxs)(n.p,{children:["If you are interested in generating keys locally, you can also install ",(0,a.jsx)(n.code,{children:"subkey"})," from the same\ndirectory. You may then take the generated ",(0,a.jsx)(n.code,{children:"subkey"})," executable and transfer it to an air-gapped\nmachine for extra security."]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-sh",children:"cargo install --force --git https://github.com/paritytech/polkadot-sdk subkey\n"})}),"\n",(0,a.jsx)(n.h3,{id:"verify-the-installation",children:"Verify the installation"}),"\n",(0,a.jsx)(n.p,{children:"After installing Polkadot, you can verify the installation by running"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"polkadot --version\npolkadot-execute-worker --version\npolkadot-prepare-worker --version\n"})}),"\n",(0,a.jsx)(n.p,{children:"It should return something like this (the exact versions don't matter, but they must all be the\nsame):"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"0.9.43-36264cb36db\n0.9.43-36264cb36db\n0.9.43-36264cb36db\n"})}),"\n",(0,a.jsxs)(n.p,{children:["If not, make sure that you installed all the binaries, all the binaries are somewhere in your\n",(0,a.jsx)(n.code,{children:"$PATH"})," and they are all in the same folder."]}),"\n",(0,a.jsx)(n.h3,{id:"synchronize-chain-data",children:"Synchronize Chain Data"}),"\n",(0,a.jsx)(n.p,{children:"You can begin syncing your node by running the following command if you do not want to start in\nvalidator mode right away:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-sh",children:"polkadot\n"})}),"\n",(0,a.jsxs)(n.admonition,{type:"info",children:[(0,a.jsx)(n.p,{children:"If you want to run a validator on Kusama, you have an option to specify the chain. With no\nspecification, this would default to Polkadot."}),(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-sh",children:"polkadot --chain=kusama\n"})})]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"2021-06-17 03:07:07 Parity Polkadot\n2021-06-17 03:07:07 \u270c\ufe0f version 0.9.5-95f6aa201-x86_64-linux-gnu\n2021-06-17 03:07:07 \u2764\ufe0f by Parity Technologies , 2017-2021\n2021-06-17 03:07:07 \ud83d\udccb Chain specification: Polkadot\n2021-06-17 03:07:07 \ud83c\udff7 Node name: boiling-pet-7554\n2021-06-17 03:07:07 \ud83d\udc64 Role: FULL\n2021-06-17 03:07:07 \ud83d\udcbe Database: RocksDb at /root/.local/share/polkadot/chains/polkadot/db\n2021-06-17 03:07:07 \u26d3 Native runtime: polkadot-9050 (parity-polkadot-0.tx7.au0)\n2021-06-17 03:07:10 \ud83c\udff7 Local node identity is: 12D3KooWLtXFWf1oGrnxMGmPKPW54xWCHAXHbFh4Eap6KXmxoi9u\n2021-06-17 03:07:10 \ud83d\udce6 Highest known block at #17914\n2021-06-17 03:07:10 \u303d\ufe0f Prometheus server started at 127.0.0.1:9615\n2021-06-17 03:07:10 Listening for new connections on 127.0.0.1:9944.\n"})}),"\n",(0,a.jsx)(n.admonition,{title:"Example of node sync",type:"info",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"2021-06-17 03:07:39 \ud83d\udd0d Discovered new external address for our node: /ip4/10.26.16.1/tcp/30333/ws/p2p/12D3KooWLtXFWf1oGrnxMGmPKPW54xWCHAXHbFh4Eap6KXmxoi9u\n2021-06-17 03:07:40 \u2699\ufe0f Syncing 218.8 bps, target=#5553764 (17 peers), best: #24034 (0x08af\u2026dcf5), finalized #23552 (0xd4f0\u20262642), \u2b07 173.5kiB/s \u2b06 12.7kiB/s\n2021-06-17 03:07:45 \u2699\ufe0f Syncing 214.8 bps, target=#5553765 (20 peers), best: #25108 (0xb272\u2026e800), finalized #25088 (0x94e6\u20268a9f), \u2b07 134.3kiB/s \u2b06 7.4kiB/s\n2021-06-17 03:07:50 \u2699\ufe0f Syncing 214.8 bps, target=#5553766 (21 peers), best: #26182 (0xe7a5\u202601a2), finalized #26112 (0xcc29\u2026b1a9), \u2b07 5.0kiB/s \u2b06 1.1kiB/s\n2021-06-17 03:07:55 \u2699\ufe0f Syncing 138.4 bps, target=#5553767 (21 peers), best: #26874 (0xcf4b\u20266553), finalized #26624 (0x9dd9\u202627f8), \u2b07 18.9kiB/s \u2b06 2.0kiB/s\n2021-06-17 03:08:00 \u2699\ufe0f Syncing 37.0 bps, target=#5553768 (22 peers), best: #27059 (0x5b73\u20266fc9), finalized #26624 (0x9dd9\u202627f8), \u2b07 14.3kiB/s \u2b06 4.4kiB/s\n"})})}),"\n",(0,a.jsxs)(n.admonition,{title:"Use Warp sync for faster syncing",type:"tip",children:[(0,a.jsxs)(n.p,{children:["By default, the node performs ",(0,a.jsx)(n.code,{children:"full"})," sync, which downloads and validates the full blockchain\nhistory. Full sync works by listening to announced blocks and requesting the blocks from the\nannouncing peers, or just the block headers in case of light clients."]}),(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.code,{children:"Fast"})," sync is another option that works by downloading the block header history and validating the\nauthority set changes in order to arrive at a specific (usually the most recent) header. After the\ndesired header has been reached and verified, the state can be downloaded and imported. Once this\nprocess has been completed, the node can proceed with a full sync."]}),(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-sh",children:"polkadot --sync warp\n"})}),(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.code,{children:"Warp sync"})," initially downloads and validates the finality proofs from\n",(0,a.jsx)(n.a,{href:"/docs/learn-consensus#finality-gadget-grandpa",children:"GRANDPA"})," and then downloads the state of the\nlatest finalized block. After the warp sync, the node is ready to import the latest blocks from the\nnetwork and can be used as a Validator. The blocks from genesis will be downloaded in the\nbackground. Check\n",(0,a.jsx)(n.a,{href:"https://substrate.stackexchange.com/questions/334/what-kinds-of-sync-mechanisms-does-substrate-implement/",children:"this discussion"}),"\nfor more information about the different sync options available."]})]}),"\n",(0,a.jsxs)(n.admonition,{title:"Validators should sync using the RocksDb backend",type:"note",children:[(0,a.jsxs)(n.p,{children:["This is implicit by default, but can be explicit by passing the ",(0,a.jsx)(n.code,{children:"--database RocksDb"})," flag."]}),(0,a.jsxs)(n.p,{children:["In the future, it is recommended to switch to the faster and more efficient ParityDB option. Note\nthat ",(0,a.jsx)(n.strong,{children:"ParityDB is still experimental and should not be used in production."})," If you want to test\nout ParityDB, you can add the flag ",(0,a.jsx)(n.code,{children:"--database paritydb"}),". Switching between database backends will\nrequire a resync."]})]}),"\n",(0,a.jsx)(n.p,{children:"Depending on the size of the chain when you do this, this step may take anywhere from a few minutes\nto a few hours."}),"\n",(0,a.jsxs)(n.p,{children:["If you are interested in determining how much longer you have to go, your server logs (printed to\nSTDOUT from the ",(0,a.jsx)(n.code,{children:"polkadot"})," process) will tell you the latest block your node has processed and\nverified. You can then compare that to the current highest block via\n",(0,a.jsx)(n.a,{href:"https://telemetry.polkadot.io/#list/Polkadot%20CC1",children:"Telemetry"})," or the\n",(0,a.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/explorer",children:"PolkadotJS Block Explorer"}),"."]}),"\n",(0,a.jsx)(n.h4,{id:"database-snapshot-services",children:"Database Snapshot Services"}),"\n",(0,a.jsx)(n.p,{children:"If you start a node for the first time, it will start building from the genesis block. This process\ncan take a while depending on the database size. To make this process faster, snapshots can be used.\nSnapshots are compressed backups of the database directory of Polkadot/Kusama nodes, containing the\nwhole chain (or a pruned version of it, with states only from the latest 1000 or 256 blocks). Listed\nbelow are a few public snapshot providers for Polkadot and Kusama."}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"https://stakeworld.io/snapshot",children:"Stakeworld"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"https://polkachu.com/snapshots",children:"Polkachu"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"https://polkashots.io/",children:"Polkashots"})}),"\n"]}),"\n",(0,a.jsx)(n.admonition,{type:"caution",children:(0,a.jsx)(n.p,{children:"For the security of the network, it is recommended that you sync from scratch, even if you are\nrunning your node in pruning mode for validation. The reason is that if these snapshots get\ncorrupted and a majority of nodes run based on these snapshots, the network could end up running on\na non-canonical chain."})}),"\n",(0,a.jsx)(n.h2,{id:"bond-dot",children:"Bond DOT"}),"\n",(0,a.jsxs)(n.p,{children:["There is a ",(0,a.jsx)(n.a,{href:"/docs/chain-state-values#minimum-validator-bond",children:"minimum bond"})," to start a\nvalidator instance, but to enter the active validator set and be eligible to earn rewards, your\nvalidator node should be nominated by a minimum number of DOT tokens."]}),"\n",(0,a.jsx)(n.p,{children:"If you are validator who intends to get DOT/KSM nominations from the community, you will need to\nshow some skin in the game. For that, you need to bond some DOT/KSM as own stake. Make sure not to\nbond all your DOT balance since you will be unable to pay transaction fees from your bonded balance."}),"\n",(0,a.jsx)(n.admonition,{title:"Controller accounts are deprecated. Use Staking Proxy.",type:"info",children:(0,a.jsxs)(n.p,{children:["Controller accounts are deprecated. For more information, see\n",(0,a.jsx)(n.a,{href:"https://forum.polkadot.network/t/staking-controller-deprecation-plan-staking-ui-leads-comms/2748",children:"this discussion"}),".\nIt is highly recommended that you setup an account with a staking proxy, which can be used for\nissuing start and stop validating calls. Read more about ",(0,a.jsx)(n.a,{href:"/docs/learn-proxies",children:"proxy accounts"}),"\nhere."]})}),"\n",(0,a.jsxs)(n.p,{children:["First, go to the ",(0,a.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/staking/actions",children:"Staking"}),' section. Click on\n"Account Actions", and then the "+ Stash" button.']}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.img,{alt:"bonding-JS-UI",src:t(46966).A+"",width:"2143",height:"847"})}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.strong,{children:"Stash account"})," - Select your Stash account (which is the account with the DOT/KSM balance)"]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.strong,{children:"Value bonded"})," - How much DOT from the Stash account you want to bond/stake. Note that you do\nnot need to bond all of the DOT in that account. Also note that you can always bond ",(0,a.jsx)(n.em,{children:"more"})," DOT\nlater. However, ",(0,a.jsx)(n.em,{children:"withdrawing"})," any bonded amount requires the duration of the unbonding period. On\nKusama, the unbonding period is 7 days. On Polkadot, the planned unbonding period is 28 days."]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.strong,{children:"Payment destination"})," - The account where the rewards from validating are sent. More info\n",(0,a.jsx)(n.a,{href:"../learn/learn-staking.md/#reward-distribution",children:"here"}),". Starting with runtime version v23 natively\nincluded in client version ",(0,a.jsx)(n.a,{href:"https://github.com/paritytech/polkadot/releases/tag/v0.9.3",children:"0.9.3"}),",\npayouts can go to any custom address. If you'd like to redirect payments to an account that is not\nthe stash account, you can do it by entering the address here. Note that it is extremely unsafe to\nset an exchange address as the recipient of the staking rewards."]}),"\n"]}),"\n",(0,a.jsxs)(n.p,{children:["Once everything is filled in properly, click ",(0,a.jsx)(n.code,{children:"Bond"})," and sign the transaction with your Stash\naccount."]}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.img,{alt:"sign transaction",src:t(61021).A+"",width:"2141",height:"780"})}),"\n",(0,a.jsxs)(n.p,{children:["After a few seconds, you should see an ",(0,a.jsx)(n.code,{children:"ExtrinsicSuccess"})," message."]}),"\n",(0,a.jsxs)(n.p,{children:["Your bonded account will be available under ",(0,a.jsx)(n.code,{children:"Stashes"}),". You should now see a new card with all your\naccounts (note: you may need to refresh the screen). The bonded amount on the right corresponds to\nthe funds bonded by the Stash account."]}),"\n",(0,a.jsx)(n.h2,{id:"set-session-keys",children:"Set Session Keys"}),"\n",(0,a.jsx)(n.admonition,{title:"Session keys are consensus critical",type:"caution",children:(0,a.jsxs)(n.p,{children:["If you are not sure if your node has the current session keys that you made the ",(0,a.jsx)(n.code,{children:"setKeys"}),"\ntransaction then you can use one of the two available RPC methods to query your node:\n",(0,a.jsx)(n.a,{href:"https://polkadot.js.org/docs/substrate/rpc/#haskeypublickey-bytes-keytype-text-bool",children:"hasKey"})," to\ncheck for a specific key or\n",(0,a.jsx)(n.a,{href:"https://polkadot.js.org/docs/substrate/rpc/#hassessionkeyssessionkeys-bytes-bool",children:"hasSessionKeys"}),"\nto check the full session key public key string."]})}),"\n",(0,a.jsx)(n.p,{children:"Once your node is fully synced, stop the process by pressing Ctrl-C. At your terminal prompt, you\nwill now start running the node."}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-sh",children:'polkadot --validator --name "name on telemetry"\n'})}),"\n",(0,a.jsx)(n.p,{children:"Similarly:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"2021-06-17 03:12:08 Parity Polkadot\n2021-06-17 03:12:08 \u270c\ufe0f version 0.9.5-95f6aa201-x86_64-linux-gnu\n2021-06-17 03:12:08 \u2764\ufe0f by Parity Technologies , 2017-2021\n2021-06-17 03:12:08 \ud83d\udccb Chain specification: Polkadot\n2021-06-17 03:12:08 \ud83c\udff7 Node name: nateched-test\n2021-06-17 03:12:08 \ud83d\udc64 Role: AUTHORITY\n2021-06-17 03:12:08 \ud83d\udcbe Database: RocksDb at /root/.local/share/polkadot/chains/polkadot/db\n2021-06-17 03:12:08 \u26d3 Native runtime: polkadot-9050 (parity-polkadot-0.tx7.au0)\n2021-06-17 03:12:12 \ud83c\udff7 Local node identity is: 12D3KooWLtXFWf1oGrnxMGmPKPW54xWCHAXHbFh4Eap6KXmxoi9u\n2021-06-17 03:12:12 \ud83d\udce6 Highest known block at #64673\n2021-06-17 03:12:12 \u303d\ufe0f Prometheus server started at 127.0.0.1:9615\n2021-06-17 03:12:12 Listening for new connections on 127.0.0.1:9944.\n2021-06-17 03:12:12 \ud83d\udc76 Starting BABE Authorship worker\n"})}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"2021-06-17 03:12:16 \ud83d\udd0d Discovered new external address for our node: /ip4/10.26.11.1/tcp/30333/p2p/12D3KooWLtXFWf1oGrnxMGmPKPW54xWCHAXHbFh4Eap6KXmxoi9u\n2021-06-17 03:12:17 \u2699\ufe0f Syncing, target=#5553810 (14 peers), best: #65068 (0x6da5\u20260662), finalized #65024 (0x4e84\u2026d170), \u2b07 352.2kiB/s \u2b06 75.6kiB/s\n"})}),"\n",(0,a.jsx)(n.p,{children:"You can give your validator any name that you like, but note that others will be able to see it, and\nit will be included in the list of all servers using the same telemetry server. Since numerous\npeople are using telemetry, it is recommended that you choose something likely to be unique."}),"\n",(0,a.jsx)(n.h3,{id:"generating-the-session-keys",children:"Generating the Session Keys"}),"\n",(0,a.jsx)(n.p,{children:"You need to tell the chain your Session keys by signing and submitting an extrinsic. This is what\nassociates your validator node with your stash account on Polkadot."}),"\n",(0,a.jsx)(n.h4,{id:"option-1-polkadotjs-apps",children:"Option 1: PolkadotJS-APPS"}),"\n",(0,a.jsxs)(n.p,{children:["You can generate your ",(0,a.jsx)(n.a,{href:"/docs/learn-cryptography",children:"Session keys"})," in the client via the apps RPC.\nIf you are doing this, make sure that you have the PolkadotJS-Apps explorer attached to your\nvalidator node. You can configure the apps dashboard to connect to the endpoint of your validator in\nthe Settings tab. If you are connected to a default endpoint hosted by Parity of Web3 Foundation,\nyou will not be able to use this method since making RPC requests to this node would effect the\nlocal keystore hosted on a ",(0,a.jsx)(n.em,{children:"public node"})," and you want to make sure you are interacting with the\nkeystore for ",(0,a.jsx)(n.em,{children:"your node"}),"."]}),"\n",(0,a.jsxs)(n.p,{children:["Once ensuring that you have connected to your node, the easiest way to set session keys for your\nnode is by calling the ",(0,a.jsx)(n.code,{children:"author_rotateKeys"})," RPC request to create new keys in your validator's\nkeystore. Navigate to Toolbox tab and select RPC Calls then select the author > rotateKeys() option\nand remember to save the output that you get back for a later step."]}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.img,{alt:"Explorer RPC call",src:t(3106).A+"",width:"1700",height:"582"})}),"\n",(0,a.jsx)(n.h4,{id:"option-2-cli",children:"Option 2: CLI"}),"\n",(0,a.jsx)(n.p,{children:"If you are on a remote server, it is easier to run this command on the same machine (while the node\nis running with the default WS RPC port configured):"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-sh",children:'curl -H "Content-Type: application/json" -d \'{"id":1, "jsonrpc":"2.0", "method": "author_rotateKeys", "params":[]}\' http://localhost:9944\n'})}),"\n",(0,a.jsx)(n.p,{children:'The output will have a hex-encoded "result" field. The result is the concatenation of the four\npublic keys. Save this result for a later step.'}),"\n",(0,a.jsx)(n.p,{children:"You can restart your node at this point."}),"\n",(0,a.jsxs)(n.h3,{id:"submitting-the-setkeys-transaction",children:["Submitting the ",(0,a.jsx)(n.code,{children:"setKeys"})," Transaction"]}),"\n",(0,a.jsx)(n.p,{children:"You need to tell the chain your Session keys by signing and submitting an extrinsic. This is what\nassociates your validator with your staking proxy."}),"\n",(0,a.jsxs)(n.p,{children:["Go to ",(0,a.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/staking/actions",children:"Staking > Account Actions"}),', and click "Set\nSession Key" on the bonding account you generated earlier. Enter the output from ',(0,a.jsx)(n.code,{children:"author_rotateKeys"}),'\nin the field and click "Set Session Key".']}),"\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.img,{alt:"staking-change-session",src:t(83215).A+"",width:"2792",height:"182"}),"\n",(0,a.jsx)(n.img,{alt:"staking-session-result",src:t(61748).A+"",width:"2146",height:"680"})]}),"\n",(0,a.jsx)(n.p,{children:"Submit this extrinsic and you are now ready to start validating."}),"\n",(0,a.jsx)(n.h3,{id:"setting-the-node-aka-network-key",children:"Setting the Node (aka Network) Key"}),"\n",(0,a.jsx)(n.p,{children:"Validators must use a static network key to maintain a stable node identity across restarts.\nStarting with Polkadot version 1.11, a check is performed on startup, and the following error will\nbe printed if a static node key is not set:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:'Error:\n0: Starting an authority without network key\nThis is not a safe operation because other authorities in the network may depend on your node having a stable identity.\nOtherwise these other authorities may not being able to reach you.\n\nIf it is the first time running your node you could use one of the following methods:\n1. [Preferred] Separately generate the key with: key generate-node-key --base-path \n2. [Preferred] Separately generate the key with: key generate-node-key --file \n3. [Preferred] Separately generate the key with: key generate-node-key --default-base-path\n4. [Unsafe] Pass --unsafe-force-node-key-generation and make sure you remove it for subsequent node restarts"\n'})}),"\n",(0,a.jsxs)(n.p,{children:["The recommended solution is to generate a node key and save it to a file using\n",(0,a.jsx)(n.code,{children:"polkadot key generate-node-key --file "}),", then attach it to your node with\n",(0,a.jsx)(n.code,{children:"--node-key-file "}),"."]}),"\n",(0,a.jsxs)(n.p,{children:["Please see ",(0,a.jsx)(n.a,{href:"https://github.com/paritytech/polkadot-sdk/pull/3852",children:"polkadot-sdk#3852"})," for the\nrationale behind this change."]}),"\n",(0,a.jsx)(n.h2,{id:"validate",children:"Validate"}),"\n",(0,a.jsxs)(n.p,{children:["To verify that your node is live and synchronized, head to\n",(0,a.jsx)(n.a,{href:"https://telemetry.polkadot.io/#list/Polkadot%20CC1",children:"Telemetry"})," and find your node. Note that this\nwill show all nodes on the Polkadot network, which is why it is important to select a unique name!"]}),"\n",(0,a.jsxs)(n.p,{children:["In this example, we used the name ",(0,a.jsx)(n.code,{children:"techedtest"})," and have successfully located it upon searching:"]}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.img,{alt:"polkadot-dashboard-telemetry",src:t(83517).A+"",width:"2862",height:"472"})}),"\n",(0,a.jsx)(n.h3,{id:"setup-via-validator-tab",children:"Setup via Validator Tab"}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.img,{alt:"polkadot-dashboard-validate-1",src:t(47526).A+"",width:"2128",height:"1022"})}),"\n",(0,a.jsxs)(n.p,{children:["Here you will need to input the Keys from ",(0,a.jsx)(n.code,{children:"rotateKeys"}),", which is the Hex output from\n",(0,a.jsx)(n.code,{children:"author_rotateKeys"}),". The keys will show as pending until applied at the start of a new session."]}),"\n",(0,a.jsx)(n.p,{children:'The "reward commission percentage" is the commission percentage that you can declare against your\nvalidator\'s rewards. This is the rate that your validator will be commissioned with.'}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.strong,{children:"Payment preferences"})," - You can specify the percentage of the rewards that will get paid to you.\nThe remaining will be split among your nominators."]}),"\n"]}),"\n",(0,a.jsx)(n.admonition,{title:"Setting a commission rate of 100% suggests that you do not want your validator to receive",type:"caution",children:(0,a.jsx)(n.p,{children:"nominations"})}),"\n",(0,a.jsx)(n.p,{children:'You can also determine if you would like to receive nominations with the "allows new nominations"\noption.'}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.img,{alt:"dashboard validate",src:t(28733).A+"",width:"2126",height:"694"})}),"\n",(0,a.jsx)(n.p,{children:'Click "Bond & Validate".'}),"\n",(0,a.jsx)(n.p,{children:'If you go to the "Staking" tab, you will see a list of active validators currently running on the\nnetwork. At the top of the page, it shows the number of validator slots that are available as well\nas the number of nodes that have signaled their intention to be a validator. You can go to the\n"Waiting" tab to double check to see whether your node is listed there.'}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.img,{alt:"staking queue",src:t(72563).A+"",width:"2838",height:"1440"})}),"\n",(0,a.jsxs)(n.p,{children:["The validator set is refreshed every era. In the next era, if there is a slot available and your\nnode is selected to join the validator set, your node will become an active validator. Until then,\nit will remain in the ",(0,a.jsx)(n.em,{children:"waiting"})," queue. If your validator is not selected to become part of the\nvalidator set, it will remain in the ",(0,a.jsx)(n.em,{children:"waiting"})," queue until it is. There is no need to re-start if\nyou are not selected for the validator set in a particular era. However, it may be necessary to\nincrease the number of DOT staked or seek out nominators for your validator in order to join the\nvalidator set."]}),"\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.strong,{children:"Congratulations!"})," If you have followed all of these steps, and been selected to be a part of the\nvalidator set, you are now running a Polkadot validator! If you need help, reach out on the\n",(0,a.jsx)(n.a,{href:"https://matrix.to/#/!NZrbtteFeqYKCUGQtr:matrix.parity.io?via=matrix.parity.io&via=matrix.org&via=web3.foundation",children:"Polkadot Validator chat"}),"."]}),"\n",(0,a.jsx)(n.h2,{id:"thousand-validators-programme",children:"Thousand Validators Programme"}),"\n",(0,a.jsxs)(n.p,{children:["The Thousand Validators Programme is a joint initiative by Web3 Foundation and Parity Technologies\nto provide support for community validators. If you are interested in applying for the program, you\ncan find more information ",(0,a.jsx)(n.a,{href:"/docs/thousand-validators",children:"on the wiki page"}),"."]}),"\n",(0,a.jsx)(n.h2,{id:"running-a-validator-on-a-testnet",children:"Running a validator on a testnet"}),"\n",(0,a.jsx)(n.p,{children:"To verify your validator setup, it is possible to run it against a PoS test network such as Westend.\nHowever, validator slots are intentionally limited on Westend to ensure stability and availability\nof the testnet for the Polkadot release process."}),"\n",(0,a.jsx)(n.p,{children:"Here is a small comparison of each network characteristics as relevant to validators:"}),"\n",(0,a.jsxs)(n.table,{children:[(0,a.jsx)(n.thead,{children:(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.th,{children:"Network"}),(0,a.jsx)(n.th,{children:"Polkadot"}),(0,a.jsx)(n.th,{children:"Westend"})]})}),(0,a.jsxs)(n.tbody,{children:[(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:"epoch"}),(0,a.jsx)(n.td,{children:"4h"}),(0,a.jsx)(n.td,{children:"1h"})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:"era"}),(0,a.jsx)(n.td,{children:"1d"}),(0,a.jsx)(n.td,{children:"6h"})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:"token"}),(0,a.jsx)(n.td,{children:"DOT"}),(0,a.jsx)(n.td,{children:"WND (test)"})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:"active validators"}),(0,a.jsx)(n.td,{children:"~300"}),(0,a.jsx)(n.td,{children:"~20"})]})]})]}),"\n",(0,a.jsx)(n.h2,{id:"faq",children:"FAQ"}),"\n",(0,a.jsx)(n.h3,{id:"why-am-i-unable-to-synchronize-the-chain-with-0-peers",children:"Why am I unable to synchronize the chain with 0 peers?"}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.img,{alt:"zero-peer",src:t(39664).A+"",width:"1350",height:"235"})}),"\n",(0,a.jsxs)(n.p,{children:["Make sure to enable ",(0,a.jsx)(n.code,{children:"30333"})," libp2p port. Eventually, it will take a little bit of time to discover\nother peers over the network."]}),"\n",(0,a.jsx)(n.h3,{id:"how-do-i-clear-all-my-chain-data",children:"How do I clear all my chain data?"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-sh",children:"polkadot purge-chain\n"})}),"\n",(0,a.jsx)(n.admonition,{type:"info",children:(0,a.jsxs)(n.p,{children:["Check out the ",(0,a.jsx)(n.a,{href:"https://substrate.stackexchange.com/",children:"Substrate StackExchange"})," to quickly get the\nanswers you need."]})}),"\n",(0,a.jsx)(n.h2,{id:"note-about-vps",children:"Note about VPS"}),"\n",(0,a.jsx)(n.p,{children:"VPS providers are very popular for running servers of any kind. Extensive benchmarking was conducted\nto ensure that VPS servers are able to keep up with the work load in general."}),"\n",(0,a.jsxs)(n.admonition,{type:"note",children:[(0,a.jsx)(n.p,{children:"Before you run a live Validator, please verify if the advertised performance is actually delivered\nconsistently by the VPS provider."}),(0,a.jsx)(n.p,{children:"::: The following server types showed acceptable performance during the benchmark tests. Please note\nthat this is not an endorsement in any way:"}),(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["GCP's ",(0,a.jsx)(n.em,{children:"c2"})," and ",(0,a.jsx)(n.em,{children:"c2d"})," machine families"]}),"\n",(0,a.jsxs)(n.li,{children:["AWS's ",(0,a.jsx)(n.em,{children:"c6id"})," machine family"]}),"\n"]}),(0,a.jsx)(n.p,{children:"The following additional configurations were applied to the instances to tune their performance:"}),(0,a.jsxs)(n.h3,{id:"disable-smt",children:["Disable ",(0,a.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/Simultaneous_multithreading",children:"SMT"})]}),(0,a.jsxs)(n.p,{children:["As critical path of Substrate is single-threaded we need to optimize for single-core CPU\nperformance. The node still profits from multiple cores when doing networking and other non-runtime\noperations. It is therefore still necessary to run it on at least the minimum required number of\ncores. Disabling SMT improves the performance as each vCPU becomes mapped to a physical CPU core\nrather than being presented to the OS as two logical cores. SMT implementation is called\n",(0,a.jsx)(n.em,{children:"Hyper-Threading"})," on Intel and ",(0,a.jsx)(n.em,{children:"2-way SMT"})," on AMD Zen. To disable SMT in runtime:"]}),(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"for cpunum in $(cat /sys/devices/system/cpu/cpu*/topology/thread_siblings_list | cut -s -d, -f2- | tr ',' '\\n' | sort -un)\ndo\n echo 0 > /sys/devices/system/cpu/cpu$cpunum/online\ndone\n"})}),(0,a.jsx)(n.p,{children:"It will disable every other (vCPU) core."}),(0,a.jsxs)(n.p,{children:["To save changes permanently add ",(0,a.jsx)(n.code,{children:"nosmt=force"})," as kernel parameter. Edit ",(0,a.jsx)(n.code,{children:"/etc/default/grub"})," and add\n",(0,a.jsx)(n.code,{children:"nosmt=force"})," to ",(0,a.jsx)(n.code,{children:"GRUB_CMDLINE_LINUX_DEFAULT"})," variable and run ",(0,a.jsx)(n.code,{children:"sudo update-grub"}),". After the reboot\nyou should see half of the cores are offline. Run ",(0,a.jsx)(n.code,{children:"lscpu --extended"})," to confirm."]}),(0,a.jsx)(n.h3,{id:"disable-automatic-numa-balancing",children:"Disable automatic NUMA balancing"}),(0,a.jsx)(n.p,{children:"If you have multiple physical CPUs (CPU0 and CPU1) in the system each with its own memory bank (MB0\nand MB1), then it is usually slower for a CPU0 to access MB1 due to the slower interconnection. To\nprevent the OS from automatically moving the running Substrate process from one CPU to another and\nthus causing an increased latency, it is recommended to disable automatic NUMA balancing."}),(0,a.jsx)(n.p,{children:"With automatic NUMA balancing disabled, an OS will always run a process on the same NUMA node where\nit was initially scheduled."}),(0,a.jsx)(n.p,{children:"To disable NUMA balancing in runtime:"}),(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"sysctl kernel.numa_balancing=0\n"})}),(0,a.jsxs)(n.p,{children:["To save changes permanently, update startup options and reconfigure GRUB. Edit ",(0,a.jsx)(n.code,{children:"/etc/default/grub"}),"\nand add ",(0,a.jsx)(n.code,{children:"numa_balancing=disable"})," to ",(0,a.jsx)(n.code,{children:"GRUB_CMDLINE_LINUX_DEFAULT"})," variable and run\n",(0,a.jsx)(n.code,{children:"sudo update-grub"}),". After reboot you can confirm the change by running\n",(0,a.jsx)(n.code,{children:"sysctl -a | grep 'kernel.numa_balancing'"})," and checking if the parameter is set to 0"]}),(0,a.jsx)(n.h3,{id:"configure-spectremeltdown-mitigations",children:"Configure Spectre/Meltdown Mitigations"}),(0,a.jsxs)(n.p,{children:["Spectre and Meltdown are vulnerabilities discovered in modern CPUs a few years ago. Mitigations were\nmade to the Linux kernel to cope with the multiple variations of these attacks. Check out\n",(0,a.jsx)(n.a,{href:"https://meltdownattack.com/",children:"https://meltdownattack.com/"})," for more info."]}),(0,a.jsxs)(n.p,{children:["Initially those mitigations added ~20% penalty to the performance of the workloads. As CPU\nmanufacturers started to roll-out mitigations implemented in hardware, the performance gap\n",(0,a.jsx)(n.a,{href:"https://www.phoronix.com/scan.php?page=article&item=3-years-specmelt&num=1",children:"narrowed down"}),". As the\nbenchmark demonstrates, the performance penalty got reduced to ~7% on Intel 10th Gen CPUs. This is\ntrue for the workloads running on both bare-metal and VMs. But the penalty remains high for the\ncontainerized workloads in some cases."]}),(0,a.jsxs)(n.p,{children:["As demonstrated in\n",(0,a.jsx)(n.a,{href:"http://mamememo.blogspot.com/2020/05/cpu-intensive-rubypython-code-runs.html",children:"Yusuke Endoh's article"}),",\na performance penalty for containerized workloads can be as high as 100%. This is due to SECCOMP\nprofile being overprotective about applying Spectre/Meltdown mitigations without providing real\nsecurity. A longer explanation is available in the\n",(0,a.jsx)(n.a,{href:"https://lkml.org/lkml/2020/11/4/1135",children:"kernel patch discussion"}),"."]}),(0,a.jsxs)(n.p,{children:["Linux 5.16\n",(0,a.jsx)(n.a,{href:"https://www.phoronix.com/scan.php?page=news_item&px=Linux-Spectre-SECCOMP-Default",children:"loosened the protections"}),"\napplied to SECCOMP threads by default. Containers running on kernel 5.16 and later now don't suffer\nfrom the performance penalty implied by using a SECCOMP profile in container runtimes."]}),(0,a.jsx)(n.h4,{id:"for-linux--516",children:"For Linux >= 5.16"}),(0,a.jsx)(n.p,{children:"You are all set. The performance of containerized workloads is on par with non-containerized ones.\nYou don't have to do anything."}),(0,a.jsx)(n.h4,{id:"for-linux--516-1",children:"For Linux < 5.16"}),(0,a.jsxs)(n.p,{children:["You'll need to disable mitigations for Spectre V2 for user-space tasks as well as Speculative Store\nBypass Disable (SSBD) for Spectre V4.\n",(0,a.jsx)(n.a,{href:"https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git/commit/?h=for-next/seccomp&id=2f46993d83ff4abb310ef7b4beced56ba96f0d9d",children:"This patch message"}),"\ndescribes the reasoning for this default change in more detail:"]}),(0,a.jsxs)(n.blockquote,{children:["\n",(0,a.jsx)(n.p,{children:"Ultimately setting SSBD and STIBP by default for all seccomp jails is a bad sweet spot and bad\ndefault with more cons than pros that end up reducing security in the public cloud (by giving an\nhuge incentive to not expose SPEC_CTRL which would be needed to get full security with IBPB after\nsetting nosmt in the guest) and by excessively hurting performance to more secure apps using\nseccomp that end up having to opt out with SECCOMP_FILTER_FLAG_SPEC_ALLOW."}),"\n"]}),(0,a.jsxs)(n.p,{children:["To disable the mitigations edit ",(0,a.jsx)(n.code,{children:"/etc/default/grub"})," and add\n",(0,a.jsx)(n.code,{children:"spec_store_bypass_disable=prctl spectre_v2_user=prctl"})," to ",(0,a.jsx)(n.code,{children:"GRUB_CMDLINE_LINUX_DEFAULT"})," variable,\nrun ",(0,a.jsx)(n.code,{children:"sudo update-grub"}),", then reboot."]}),(0,a.jsxs)(n.p,{children:["Note that mitigations are not disabled completely. You can fully disable all the available kernel\nmitigations by setting ",(0,a.jsx)(n.code,{children:"mitigations=off"}),". But we don't recommend doing this unless you run a fully\ntrusted code on the host."]}),(0,a.jsx)(n.h3,{id:"vps-list",children:"VPS List"}),(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"https://cloud.google.com/",children:"Google Cloud"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"https://aws.amazon.com/",children:"Amazon AWS"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"https://www.ovh.com.au/",children:"OVH"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"https://www.digitalocean.com/",children:"Digital Ocean"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"https://www.vultr.com/",children:"Vultr"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"https://www.linode.com/",children:"Linode"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"https://www.scaleway.com/",children:"Scaleway"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"https://onfinality.io/",children:"OnFinality"})}),"\n"]}),(0,a.jsxs)(n.admonition,{type:"caution",children:[(0,a.jsxs)(n.mdxAdmonitionTitle,{children:["Beware of the ",(0,a.jsx)(n.strong,{children:"Terms and Conditions"})," and ",(0,a.jsx)(n.strong,{children:"Acceptable Use Policies"})," for each VPS"]}),(0,a.jsx)(n.p,{children:"provider"}),(0,a.jsxs)(n.p,{children:['You may be locked out of your account and your server shut down if you come in violation. For\ninstance, Digital Ocean lists "Mining of Cryptocurrencies" under the Network Abuse section of their\n',(0,a.jsx)(n.a,{href:"https://www.digitalocean.com/legal/acceptable-use-policy/",children:"Acceptable Use Policy"})," and requires\nexplicit permission to do so. This may extend to other cryptocurrency activity."]})]})]})]})}function h(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(c,{...e})}):c(e)}},47379:(e,n,t)=>{"use strict";t.d(n,{A:()=>u});var a=t(90675),i=t(10467),o=t(96540),s=t(19588),r=t(2026),l=t(11135);function d(e,n,t){return c.apply(this,arguments)}function c(){return(c=(0,i.A)((0,a.A)().mark((function e(n,t,i){var o,l,d,c,h;return(0,a.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=void 0,l=void 0,e.t0=n,e.next="polkadot"===e.t0?5:"kusama"===e.t0?7:"statemine"===e.t0?9:"statemint"===e.t0?11:"polkadotpeople"===e.t0?13:"kusamapeople"===e.t0?15:17;break;case 5:return o="wss://rpc.polkadot.io",e.abrupt("break",18);case 7:return o="wss://kusama-rpc.polkadot.io/",e.abrupt("break",18);case 9:return o="wss://statemine-rpc.polkadot.io/",e.abrupt("break",18);case 11:return o="wss://statemint-rpc.polkadot.io/",e.abrupt("break",18);case 13:return o="wss://polkadot-people-rpc.polkadot.io/",e.abrupt("break",18);case 15:return o="wss://kusama-people-rpc.polkadot.io/",e.abrupt("break",18);case 17:console.log("Unknown socket url provided, no connection made.");case 18:if(void 0!==o){e.next=22;break}return e.abrupt("return");case 22:return d=new s.E(o),e.next=25,r.G.create({provider:d});case 25:c=e.sent,(h=t.split(".")).forEach((function(e){e in c&&(c=c[e])})),e.t1=h[0],e.next="consts"===e.t1?31:"query"===e.t1?33:38;break;case 31:return l=c.toString(),e.abrupt("break",39);case 33:return e.next=35,c();case 35:return l=(l=e.sent).toString(),e.abrupt("break",39);case 38:console.log("Unknown path prefix ("+h[0]+") in "+t);case 39:return e.abrupt("return",l);case 40:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function h(e,n,t,a){switch(n){case"humanReadable":(0,l.HumanReadable)(e,t,a);break;case"precise":(0,l.Precise)(e,t,a);break;case"blocksToDays":(0,l.BlocksToDays)(e,a);break;case"erasToDays":(0,l.ErasToDays)(e,a,t);break;case"percentage":(0,l.Percentage)(e,a);break;case"permillToPercent":(0,l.PermillToPercent)(e,a);break;case"arrayLength":(0,l.ArrayLength)(e,a);break;default:return void console.log("Ignoring unknown filter type")}}const u=function(e){var n=e.network,t=e.path,s=e.defaultValue,r=e.filter,l=void 0===r?void 0:r,c=(0,o.useState)(""),u=c[0],p=c[1];return n=n.toLowerCase(),(0,o.useEffect)((function(){void 0!==l?h(s.toString(),l,n,p):p(s.toString());var e=void 0;switch(n){case"polkadot":e="wss://rpc.polkadot.io";break;case"kusama":e="wss://kusama-rpc.polkadot.io/";break;case"statemine":e="wss://kusama-asset-hub-rpc.polkadot.io/";break;case"statemint":e="wss://polkadot-asset-hub-rpc.polkadot.io/";break;case"kusamapeople":e="wss://kusama-people-rpc.polkadot.io";break;case"polkadotpeople":e="wss://polkadot-people-rpc.polkadot.io";break;default:console.log("Unknown network provided, "+n)}if(void 0===e)console.log("Failed to connect to a valid websocket, applying default");else{var o=function(){var e=(0,i.A)((0,a.A)().mark((function e(){var i;return(0,a.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,d(n,t,p);case 2:if(void 0!==(i=e.sent)){e.next=7;break}return e.abrupt("return");case 7:void 0!==l?h(i,l,n,p):p(i);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();try{o()}catch(r){console.log(r)}}}),[]),u}},11135:e=>{var n="polkadot",t="kusama",a="statemine",i="statemint",o="polkadotpeople",s="kusamapeople",r={polkadot:{precision:1e10,symbol:"DOT"},kusama:{precision:1e12,symbol:"KSM"},statemint:{precision:1e10,symbol:"DOT"},statemine:{precision:1e12,symbol:"KSM"},polkadotpeople:{precision:1e10,symbol:"DOT"},kusamapeople:{precision:1e12,symbol:"KSM"}};e.exports={HumanReadable:function(e,l,d){var c=void 0;if(l===n||l===i)c=3;else if(l===t||l===a||l===o)c=6;else{if(l!=s)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");c=8}e=parseFloat(e),d((e=Number.isInteger(e/r[l].precision)?e/r[l].precision+" "+r[l].symbol:(e/r[l].precision).toFixed(c)+" "+r[l].symbol).toString())},Precise:function(e,n,t){t(e=(e=parseFloat(e))/r[n].precision+" "+r[n].symbol)},BlocksToDays:function(e,n){n((e=6*e/86400).toString())},ErasToDays:function(e,r,l){var d=void 0;if(l===n||l===i||l==o)d=1;else{if(l!==t&&l!==a&&l!=s)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");d=4}r((e/=d).toString())},Percentage:function(e,n){n((e/=1e7).toString())},PermillToPercent:function(e,n){n((e/=1e4).toString())},ArrayLength:function(e,n){n((e=e.split(",").length).toString())}}},46966:(e,n,t)=>{"use strict";t.d(n,{A:()=>a});const a=t.p+"assets/images/JS-UI-bond-7bdecad8831f3c1b20d96e426e7e47c1.png"},61021:(e,n,t)=>{"use strict";t.d(n,{A:()=>a});const a=t.p+"assets/images/JS-UI-sign-transaction-75b2e29fcaecc44c5eb1c4f5e3e364ae.png"},72563:(e,n,t)=>{"use strict";t.d(n,{A:()=>a});const a=t.p+"assets/images/polkadot-dashboard-staking-4005504ef30291ebe1a243298c351a34.png"},83517:(e,n,t)=>{"use strict";t.d(n,{A:()=>a});const a=t.p+"assets/images/polkadot-dashboard-telemetry-8930bdd60309c864ed682a1bdd4b1e31.png"},47526:(e,n,t)=>{"use strict";t.d(n,{A:()=>a});const a=t.p+"assets/images/polkadot-dashboard-validate-1-4bf6a6488b4e128d12cab2617025d796.png"},28733:(e,n,t)=>{"use strict";t.d(n,{A:()=>a});const a=t.p+"assets/images/polkadot-dashboard-validate-2-18a8869804f89ffebafa1b920e31ccd6.png"},3106:(e,n,t)=>{"use strict";t.d(n,{A:()=>a});const a=t.p+"assets/images/polkadot-explorer-rotatekeys-rpc-6d5ba5d9ffb20fd9683432e9a6ccd0f9.jpg"},39664:(e,n,t)=>{"use strict";t.d(n,{A:()=>a});const a=t.p+"assets/images/polkadot-zero-peer-2642d52b7e07893a66a0ddfd492cce38.jpg"},83215:(e,n,t)=>{"use strict";t.d(n,{A:()=>a});const a=t.p+"assets/images/set-session-key-1-b0cdb38a299d6ef6bcc24c6ab2bce66d.png"},61748:(e,n,t)=>{"use strict";t.d(n,{A:()=>a});const a=t.p+"assets/images/set-session-key-2-408efe22daa8d6533715987a1099828a.png"},47790:()=>{}}]); \ No newline at end of file diff --git a/assets/js/a74a59a0.b786860b.js b/assets/js/a74a59a0.b786860b.js new file mode 100644 index 000000000000..e88ea95ca05d --- /dev/null +++ b/assets/js/a74a59a0.b786860b.js @@ -0,0 +1 @@ +(self.webpackChunk=self.webpackChunk||[]).push([[4975],{61861:(e,n,t)=>{"use strict";t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>r,default:()=>h,frontMatter:()=>s,metadata:()=>a,toc:()=>d});const a=JSON.parse('{"id":"maintain/maintain-guides-how-to-validate-polkadot","title":"Run a Validator (Polkadot)","description":"The fundamentals for running a Polkadot validator.","source":"@site/../docs/maintain/maintain-guides-how-to-validate-polkadot.md","sourceDirName":"maintain","slug":"/maintain-guides-how-to-validate-polkadot","permalink":"/docs/maintain-guides-how-to-validate-polkadot","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/maintain/maintain-guides-how-to-validate-polkadot.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1727167801000,"frontMatter":{"id":"maintain-guides-how-to-validate-polkadot","title":"Run a Validator (Polkadot)","sidebar_label":"How to run a Validator on Polkadot","description":"The fundamentals for running a Polkadot validator.","keywords":["validator setup","validator","validate","binary","runtime"],"slug":"../maintain-guides-how-to-validate-polkadot"},"sidebar":"docs","previous":{"title":"Validator Guides","permalink":"/docs/maintain-validator-index"},"next":{"title":"Validator Payout Overview","permalink":"/docs/maintain-guides-validator-payout"}}');var i=t(74848),o=t(28453);t(47379);const s={id:"maintain-guides-how-to-validate-polkadot",title:"Run a Validator (Polkadot)",sidebar_label:"How to run a Validator on Polkadot",description:"The fundamentals for running a Polkadot validator.",keywords:["validator setup","validator","validate","binary","runtime"],slug:"../maintain-guides-how-to-validate-polkadot"},r=void 0,l={},d=[{value:"Preliminaries",id:"preliminaries",level:2},{value:"How many DOT do I need to become an active Validator?",id:"how-many-dot-do-i-need-to-become-an-active-validator",level:3},{value:"Initial Set-up",id:"initial-set-up",level:2},{value:"Requirements",id:"requirements",level:3},{value:"Reference Hardware",id:"reference-hardware",level:4},{value:"Install & Configure Network Time Protocol (NTP) Client",id:"install--configure-network-time-protocol-ntp-client",level:3},{value:"Make Sure Landlock is Enabled",id:"make-sure-landlock-is-enabled",level:3},{value:"Installing the Polkadot binaries",id:"installing-the-polkadot-binaries",level:3},{value:"Installation from official releases",id:"installation-from-official-releases",level:4},{value:"Optional: Installation with Package Managers",id:"optional-installation-with-package-managers",level:4},{value:"Debian-based (Debian, Ubuntu)",id:"debian-based-debian-ubuntu",level:4},{value:"RPM-based (Fedora, CentOS)",id:"rpm-based-fedora-centos",level:4},{value:"Optional: Installation with Ansible",id:"optional-installation-with-ansible",level:4},{value:"Optional: Installation with Docker",id:"optional-installation-with-docker",level:4},{value:"Optional: Building the Polkadot binaries from sources",id:"optional-building-the-polkadot-binaries-from-sources",level:3},{value:"Prerequisites: Install Rust and Dependencies",id:"prerequisites-install-rust-and-dependencies",level:4},{value:"Building the binaries",id:"building-the-binaries",level:4},{value:"Verify the installation",id:"verify-the-installation",level:3},{value:"Synchronize Chain Data",id:"synchronize-chain-data",level:3},{value:"Database Snapshot Services",id:"database-snapshot-services",level:4},{value:"Bond DOT",id:"bond-dot",level:2},{value:"Set Session Keys",id:"set-session-keys",level:2},{value:"Generating the Session Keys",id:"generating-the-session-keys",level:3},{value:"Option 1: PolkadotJS-APPS",id:"option-1-polkadotjs-apps",level:4},{value:"Option 2: CLI",id:"option-2-cli",level:4},{value:"Submitting the setKeys Transaction",id:"submitting-the-setkeys-transaction",level:3},{value:"Setting the Node (aka Network) Key",id:"setting-the-node-aka-network-key",level:3},{value:"Validate",id:"validate",level:2},{value:"Setup via Validator Tab",id:"setup-via-validator-tab",level:3},{value:"Thousand Validators Programme",id:"thousand-validators-programme",level:2},{value:"Running a validator on a testnet",id:"running-a-validator-on-a-testnet",level:2},{value:"FAQ",id:"faq",level:2},{value:"Why am I unable to synchronize the chain with 0 peers?",id:"why-am-i-unable-to-synchronize-the-chain-with-0-peers",level:3},{value:"How do I clear all my chain data?",id:"how-do-i-clear-all-my-chain-data",level:3},{value:"Note about VPS",id:"note-about-vps",level:2},{value:"Disable SMT",id:"disable-smt",level:3},{value:"Disable automatic NUMA balancing",id:"disable-automatic-numa-balancing",level:3},{value:"Configure Spectre/Meltdown Mitigations",id:"configure-spectremeltdown-mitigations",level:3},{value:"For Linux >= 5.16",id:"for-linux--516",level:4},{value:"For Linux < 5.16",id:"for-linux--516-1",level:4},{value:"VPS List",id:"vps-list",level:3}];function c(e){const n={a:"a",admonition:"admonition",blockquote:"blockquote",code:"code",del:"del",em:"em",h2:"h2",h3:"h3",h4:"h4",img:"img",li:"li",mdxAdmonitionTitle:"mdxAdmonitionTitle",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,o.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.admonition,{type:"tip",children:(0,i.jsxs)(n.p,{children:["If you are a beginner, it is recommended that you start your validator journey on Kusama network.\nCheck the ",(0,i.jsx)(n.a,{href:"/docs/maintain-guides-how-to-validate-kusama",children:"Kusama guide"})," for details on how to get\nstarted."]})}),"\n",(0,i.jsx)(n.h2,{id:"preliminaries",children:"Preliminaries"}),"\n",(0,i.jsxs)(n.p,{children:["Running a validator on a live network is a lot of responsibility! You will be accountable for not\nonly your own stake, but also the stake of your current nominators. If you make a mistake and get\n",(0,i.jsx)(n.a,{href:"/docs/learn-offenses",children:"slashed"}),", your tokens and your reputation will be at risk. However,\nrunning a validator can also be very rewarding, knowing that you contribute to the security of a\ndecentralized network while growing your stash."]}),"\n",(0,i.jsxs)(n.admonition,{type:"warning",children:[(0,i.jsx)(n.p,{children:"It is highly recommended that you have significant system administration experience before\nattempting to run your own validator."}),(0,i.jsx)(n.p,{children:"You must be able to handle technical issues and anomalies with your node which you must be able to\ntackle yourself. Being a validator involves more than just executing the Polkadot binary."})]}),"\n",(0,i.jsxs)(n.p,{children:["Since security is so important to running a successful validator, you should take a look at the\n",(0,i.jsx)(n.a,{href:"/docs/maintain-guides-secure-validator",children:"secure validator"})," information to make sure you understand the\nfactors to consider when constructing your infrastructure. As you progress in your journey as a\nvalidator, you will likely want to use this repository as a ",(0,i.jsx)(n.em,{children:"starting point"})," for your own\nmodifications and customizations."]}),"\n",(0,i.jsxs)(n.p,{children:["If you need help, please reach out on the\n",(0,i.jsx)(n.a,{href:"https://matrix.to/#/#polkadotvalidatorlounge:web3.foundation",children:"Polkadot Validator Lounge"})," on\nElement. The team and other validators are there to help answer questions and provide tips from\nexperience."]}),"\n",(0,i.jsx)(n.h3,{id:"how-many-dot-do-i-need-to-become-an-active-validator",children:"How many DOT do I need to become an active Validator?"}),"\n",(0,i.jsxs)(n.p,{children:["You can have a rough estimate on that by using the methods listed\n",(0,i.jsx)(n.a,{href:"../general/faq.md/#what-is-the-minimum-stake-necessary-to-be-elected-as-an-active-validator",children:"here"}),".\nTo be elected into the set, you need a minimum stake behind your validator. This stake can come from\nyourself or from ",(0,i.jsx)(n.a,{href:"/docs/learn-nominator",children:"nominators"}),". This means that as a minimum, you will\nneed enough DOT to set up stash (and optionally a staking\n",(0,i.jsx)(n.a,{href:"/docs/learn-proxies",children:"proxy account"}),") with the existential deposit, plus a little extra for\ntransaction fees. The rest can come from nominators. To understand how validators are elected, check\nthe ",(0,i.jsx)(n.a,{href:"/docs/learn-phragmen",children:"NPoS Election algorithms"})," page."]}),"\n",(0,i.jsxs)(n.p,{children:["For further reference, you may look at the\n",(0,i.jsx)(n.a,{href:"https://polkadot.subscan.io/validator_list?status=validator",children:"statistics for current, active validators"}),".\nFor Kusama see ",(0,i.jsx)(n.a,{href:"https://kusama.subscan.io/validator_list?status=validator",children:"here"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Warning:"})," Any DOT that you stake for your validator is liable to be\n",(0,i.jsx)(n.a,{href:"/docs/learn-offenses",children:"slashed"}),", meaning that an insecure or improper setup may result in loss\nof DOT tokens! If you are not confident in your ability to run a validator node, it is recommended\nto nominate your DOT to a trusted validator node instead."]}),"\n",(0,i.jsx)(n.h2,{id:"initial-set-up",children:"Initial Set-up"}),"\n",(0,i.jsx)(n.h3,{id:"requirements",children:"Requirements"}),"\n",(0,i.jsxs)(n.p,{children:["The most common way for a beginner to run a validator is on a cloud server running Linux. You may\nchoose whatever ",(0,i.jsx)(n.a,{href:"#note-about-vps",children:"VPS"})," provider that you prefer. As OS it is best to use a recent\nDebian Linux. For this guide we will be using ",(0,i.jsx)(n.strong,{children:"Ubuntu 22.04"}),", but the instructions should be\nsimilar for other platforms."]}),"\n",(0,i.jsx)(n.h4,{id:"reference-hardware",children:"Reference Hardware"}),"\n",(0,i.jsxs)(n.p,{children:["The transaction weights in Polkadot are benchmarked on reference hardware. We ran the benchmark on\nVM instances of two major cloud providers: Google Cloud Platform (GCP) and Amazon Web Services\n(AWS). To be specific, we used ",(0,i.jsx)(n.code,{children:"n2-standard-8"})," VM instance on GCP and ",(0,i.jsx)(n.code,{children:"c6i.4xlarge"})," on AWS. It is\nrecommended that the hardware used to run the validators at least matches the specs of the reference\nhardware in order to ensure they are able to process all blocks in time. If you use subpar hardware\nyou will possibly run into performance issues, get less era points, and potentially even get\nslashed."]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"CPU"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"x86-64 compatible;"}),"\n",(0,i.jsx)(n.li,{children:"Intel Ice Lake, or newer (Xeon or Core series); AMD Zen3, or newer (EPYC or Ryzen);"}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.del,{children:"4"})," 8 physical cores @ 3.4GHz; starting with January 2025, the recommendation is to use a\nhardware with at least ",(0,i.jsx)(n.strong,{children:"8"})," physical cores, see\n",(0,i.jsx)(n.a,{href:"https://polkadot.subsquare.io/referenda/1051",children:"referenda"})," for more details about the rationale;"]}),"\n",(0,i.jsx)(n.li,{children:"Simultaneous multithreading disabled (Hyper-Threading on Intel, SMT on AMD);"}),"\n",(0,i.jsxs)(n.li,{children:["Prefer single-threaded performance over higher cores count. A comparison of single-threaded\nperformance can be found ",(0,i.jsx)(n.a,{href:"https://www.cpubenchmark.net/singleThread.html",children:"here"}),"."]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Storage"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["An NVMe SSD of 1 TB (As it should be reasonably sized to deal with blockchain growth). An\nestimation of current chain snapshot sizes can be found\n",(0,i.jsx)(n.a,{href:"https://stakeworld.io/docs/dbsize",children:"here"}),". In general, the latency is more important than the\nthroughput."]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Memory"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"32 GB DDR4 ECC."}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"System"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Linux Kernel 5.16 or newer."}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Network"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"The minimum symmetric networking speed is set to 500 Mbit/s (= 62.5 MB/s). This is required to\nsupport a large number of parachains and allow for proper congestion control in busy network\nsituations."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["The specs posted above are not a ",(0,i.jsx)(n.em,{children:"hard"})," requirement to run a validator, but are considered best\npractice. Running a validator is a responsible task; using professional hardware is a must in any\nway."]}),"\n",(0,i.jsx)(n.h3,{id:"install--configure-network-time-protocol-ntp-client",children:"Install & Configure Network Time Protocol (NTP) Client"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/Network_Time_Protocol",children:"NTP"})," is a networking protocol designed to\nsynchronize the clocks of computers over a network. NTP allows you to synchronize the clocks of all\nthe systems within the network. Currently it is required that validators' local clocks stay\nreasonably in sync, so you should be running NTP or a similar service. You can check whether you\nhave the NTP client by running:"]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.em,{children:"If you are using Ubuntu 18.04 or a newer version, NTP Client should be installed by default."})}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-sh",children:"timedatectl\n"})}),"\n",(0,i.jsxs)(n.p,{children:["If NTP is installed and running, you should see ",(0,i.jsx)(n.code,{children:"System clock synchronized: yes"})," (or a similar\nmessage). If you do not see it, you can install it by executing:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-sh",children:"sudo apt-get install ntp\n"})}),"\n",(0,i.jsx)(n.p,{children:"ntpd will be started automatically after install. You can query ntpd for status information to\nverify that everything is working:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-sh",children:"sudo ntpq -p\n"})}),"\n",(0,i.jsx)(n.admonition,{type:"warning",children:(0,i.jsx)(n.p,{children:"Skipping this can result in the validator node missing block authorship opportunities. If the clock\nis out of sync (even by a small amount), the blocks the validator produces may not get accepted by\nthe network."})}),"\n",(0,i.jsx)(n.h3,{id:"make-sure-landlock-is-enabled",children:"Make Sure Landlock is Enabled"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.a,{href:"https://docs.kernel.org/userspace-api/landlock.html",children:"Landlock"})," is a Linux security feature used in\nPolkadot:"]}),"\n",(0,i.jsxs)(n.blockquote,{children:["\n",(0,i.jsx)(n.p,{children:"Landlock empowers any process, including unprivileged ones, to securely restrict themselves."}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"To make use of landlock, make sure you are on the reference kernel version or newer. Most Linux\ndistributions should already have landlock enabled, but you can check by running the following as\nroot:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-sh",children:"dmesg | grep landlock || journalctl -kg landlock\n"})}),"\n",(0,i.jsxs)(n.p,{children:["If it is not enabled, please see the\n",(0,i.jsx)(n.a,{href:"https://docs.kernel.org/userspace-api/landlock.html#kernel-support",children:'official docs ("Kernel support")'}),"\nif you would like to build Linux with landlock enabled."]}),"\n",(0,i.jsx)(n.h3,{id:"installing-the-polkadot-binaries",children:"Installing the Polkadot binaries"}),"\n",(0,i.jsx)(n.admonition,{title:"Multiple Validator Binaries",type:"info",children:(0,i.jsxs)(n.p,{children:["In addition to the ",(0,i.jsx)(n.code,{children:"polkadot"})," binary, recent changes have separated out functionality into two\nadditional needed binaries, ",(0,i.jsx)(n.code,{children:"polkadot-prepare-worker"}),", and ",(0,i.jsx)(n.code,{children:"polkadot-execute-worker"}),". All three\nbinaries are needed to properly run a validator node. More context on these changes can be found\n",(0,i.jsx)(n.a,{href:"https://github.com/paritytech/polkadot/pull/7337",children:"here"})]})}),"\n",(0,i.jsx)(n.h4,{id:"installation-from-official-releases",children:"Installation from official releases"}),"\n",(0,i.jsxs)(n.p,{children:["The official binaries can be downloaded from the\n",(0,i.jsx)(n.a,{href:"https://github.com/paritytech/polkadot-sdk/releases",children:"Github Releases"}),". You should download the\nlatest available version. You can also download the binaries by using the following direct links\n(replace X.Y.Z by the appropriate version):"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-sh",children:"https://github.com/paritytech/polkadot-sdk/releases/download/polkadot-vX.Y.Z/polkadot\nhttps://github.com/paritytech/polkadot-sdk/releases/download/polkadot-vX.Y.Z/polkadot-execute-worker\nhttps://github.com/paritytech/polkadot-sdk/releases/download/polkadot-vX.Y.Z/polkadot-prepare-worker\n"})}),"\n",(0,i.jsx)(n.h4,{id:"optional-installation-with-package-managers",children:"Optional: Installation with Package Managers"}),"\n",(0,i.jsxs)(n.p,{children:["The Polkadot Binary in included in ",(0,i.jsx)(n.code,{children:"Debian"})," derivatives (i.e. ",(0,i.jsx)(n.strong,{children:"Debian"}),", ",(0,i.jsx)(n.strong,{children:"Ubuntu"}),") and\n",(0,i.jsx)(n.code,{children:"RPM-based"})," distros (i.e. ",(0,i.jsx)(n.strong,{children:"Fedora"}),", ",(0,i.jsx)(n.strong,{children:"CentOS"}),")."]}),"\n",(0,i.jsx)(n.h4,{id:"debian-based-debian-ubuntu",children:"Debian-based (Debian, Ubuntu)"}),"\n",(0,i.jsx)(n.p,{children:"Run the following commands as the root user:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-ssh",children:"# Import the security@parity.io GPG key\ngpg --recv-keys --keyserver hkps://keys.mailvelope.com 9D4B2B6EB8F97156D19669A9FF0812D491B96798\ngpg --export 9D4B2B6EB8F97156D19669A9FF0812D491B96798 > /usr/share/keyrings/parity.gpg\n# Add the Parity repository and update the package index\necho 'deb [signed-by=/usr/share/keyrings/parity.gpg] https://releases.parity.io/deb release main' > /etc/apt/sources.list.d/parity.list\napt update\n# Install the `parity-keyring` package - This will ensure the GPG key\n# used by APT remains up-to-date\napt install parity-keyring\n# Install polkadot\napt install polkadot\n"})}),"\n",(0,i.jsx)(n.h4,{id:"rpm-based-fedora-centos",children:"RPM-based (Fedora, CentOS)"}),"\n",(0,i.jsx)(n.p,{children:"Run the following commands as the root user:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"# Install dnf-plugins-core (This might already be installed)\ndnf install dnf-plugins-core\n# Add the repository and enable it\ndnf config-manager --add-repo https://releases.parity.io/rpm/polkadot.repo\ndnf config-manager --set-enabled polkadot\n# Install polkadot (You may have to confirm the import of the GPG key, which\n# should have the following fingerprint: 9D4B2B6EB8F97156D19669A9FF0812D491B96798)\ndnf install polkadot\n"})}),"\n",(0,i.jsx)(n.p,{children:'Make sure you verify the installation (see the "Verify the installation" section).'}),"\n",(0,i.jsxs)(n.admonition,{title:"By default, the Polkadot systemd service is disabled",type:"note",children:[(0,i.jsx)(n.p,{children:"To start the service, run:"}),(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"sudo systemctl start polkadot.service\n"})})]}),"\n",(0,i.jsx)(n.h4,{id:"optional-installation-with-ansible",children:"Optional: Installation with Ansible"}),"\n",(0,i.jsxs)(n.p,{children:["To manage Polkadot installation with Ansible, you can use the ",(0,i.jsx)(n.strong,{children:"Substrate node role"})," distributed on\nthe ",(0,i.jsx)(n.a,{href:"https://github.com/paritytech/ansible-galaxy/",children:"Parity chain operations Ansible collection"})]}),"\n",(0,i.jsx)(n.h4,{id:"optional-installation-with-docker",children:"Optional: Installation with Docker"}),"\n",(0,i.jsxs)(n.p,{children:["To run Polkadot on a Docker or an OCI compatible container runtime, you can use the official\n",(0,i.jsx)(n.a,{href:"https://hub.docker.com/r/parity/polkadot/tags",children:"parity/polkadot docker image"}),", available on Docker\nHub (replace X.Y.Z by the appropriate version):"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-sh",children:"docker.io/parity/polkadot:vX.Y.Z\n"})}),"\n",(0,i.jsx)(n.h3,{id:"optional-building-the-polkadot-binaries-from-sources",children:"Optional: Building the Polkadot binaries from sources"}),"\n",(0,i.jsx)(n.h4,{id:"prerequisites-install-rust-and-dependencies",children:"Prerequisites: Install Rust and Dependencies"}),"\n",(0,i.jsx)(n.p,{children:"If you have never installed Rust, you should do this first."}),"\n",(0,i.jsx)(n.p,{children:"If you have already installed Rust, run the following command to make sure you are using the latest\nversion."}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-sh",children:"rustup update\n"})}),"\n",(0,i.jsx)(n.p,{children:"If not, this command will fetch the latest version of Rust and install it."}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-sh",children:"curl https://sh.rustup.rs -sSf | sh -s -- -y\n"})}),"\n",(0,i.jsxs)(n.admonition,{type:"note",children:[(0,i.jsx)(n.p,{children:'If you do not have "curl" installed, run:'}),(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"sudo apt install curl\n"})}),(0,i.jsxs)(n.p,{children:['It will also be valuable to have "websocat" (Netcat, curl and socat for WebSockets) installed for\nRPC interactions. Installation instructions for various operating systems can be found\n',(0,i.jsx)(n.a,{href:"https://github.com/vi/websocat#installation",children:"here"}),"."]})]}),"\n",(0,i.jsx)(n.p,{children:"To configure your shell, run the following command."}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-sh",children:"source $HOME/.cargo/env\n"})}),"\n",(0,i.jsx)(n.p,{children:"Verify your installation."}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-sh",children:"rustc --version\n"})}),"\n",(0,i.jsx)(n.p,{children:"Finally, run this command to install the necessary dependencies for compiling and running the\nPolkadot node software."}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-sh",children:"sudo apt install make clang pkg-config libssl-dev build-essential\n"})}),"\n",(0,i.jsxs)(n.admonition,{type:"note",children:[(0,i.jsxs)(n.p,{children:["If you are using OSX and you have ",(0,i.jsx)(n.a,{href:"https://brew.sh",children:"Homebrew"})," installed, you can issue the following\nequivalent command INSTEAD of the previous one:"]}),(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-sh",children:"brew install cmake pkg-config openssl git llvm\n"})})]}),"\n",(0,i.jsx)(n.h4,{id:"building-the-binaries",children:"Building the binaries"}),"\n",(0,i.jsxs)(n.p,{children:["You can build the Polkadot binaries from the\n",(0,i.jsx)(n.a,{href:"https://github.com/paritytech/polkadot-sdk",children:"paritytech/polkadot-sdk"})," repository on GitHub."]}),"\n",(0,i.jsxs)(n.p,{children:["You should generally use the latest ",(0,i.jsx)(n.strong,{children:"X.Y.Z"}),' tag. You should either review the output from the "git\ntag" command or view the ',(0,i.jsx)(n.a,{href:"https://github.com/paritytech/polkadot-sdk/tags",children:"Polkadot SDK Github tags"}),"\nto see a list of all the available release versions. You should replace ",(0,i.jsx)(n.code,{children:"VERSION"})," below with the\nlatest build (i.e., the highest number)."]}),"\n",(0,i.jsxs)(n.admonition,{type:"note",children:[(0,i.jsx)(n.p,{children:"If you prefer to use SSH rather than HTTPS, you can replace the first line of the below with"}),(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-sh",children:"git clone git@github.com:paritytech/polkadot-sdk.git\n"})})]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-sh",children:"git clone https://github.com/paritytech/polkadot-sdk.git\ncd polkadot-sdk/polkadot\n"})}),"\n",(0,i.jsx)(n.p,{children:"Run the following command to find the latest version."}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-sh",children:"git tag -l | sort -V | grep -v -- '-rc'\n"})}),"\n",(0,i.jsx)(n.p,{children:'Find the latest version; replace "VERSION" in the command below and run to change your branch.'}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-sh",children:"git checkout VERSION\n"})}),"\n",(0,i.jsxs)(n.p,{children:["Build native code with the production profile. The following will make sure that the binaries are\nall in your ",(0,i.jsx)(n.code,{children:"$PATH"}),"."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-sh",children:"cargo install --force --path . --profile production\n"})}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:(0,i.jsx)(n.em,{children:"This step will take a while (generally 10 - 40 minutes, depending on your hardware)."})})}),"\n",(0,i.jsxs)(n.admonition,{title:"Compilation Errors",type:"note",children:[(0,i.jsxs)(n.p,{children:["If you run into compile errors, you may have to pin the version of Rust compiler to the one that was\nused to build the release. Check out ",(0,i.jsx)(n.code,{children:"Rust compiler versions"})," section in the release notes. This can\nbe done by running:"]}),(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-sh",children:"rustup install nightly-2022-05-18\nrustup target add wasm32-unknown-unknown --toolchain nightly-2022-05-18\ncargo +nightly-2022-05-18 build --release\n"})}),(0,i.jsx)(n.p,{children:"You may also need to run the build more than once."}),(0,i.jsx)(n.p,{children:"If you would like to execute the tests, run the following command:"}),(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-sh",children:"cargo test --all\n"})})]}),"\n",(0,i.jsxs)(n.p,{children:["If you are interested in generating keys locally, you can also install ",(0,i.jsx)(n.code,{children:"subkey"})," from the same\ndirectory. You may then take the generated ",(0,i.jsx)(n.code,{children:"subkey"})," executable and transfer it to an air-gapped\nmachine for extra security."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-sh",children:"cargo install --force --git https://github.com/paritytech/polkadot-sdk subkey\n"})}),"\n",(0,i.jsx)(n.h3,{id:"verify-the-installation",children:"Verify the installation"}),"\n",(0,i.jsx)(n.p,{children:"After installing Polkadot, you can verify the installation by running"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"polkadot --version\npolkadot-execute-worker --version\npolkadot-prepare-worker --version\n"})}),"\n",(0,i.jsx)(n.p,{children:"It should return something like this (the exact versions don't matter, but they must all be the\nsame):"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"0.9.43-36264cb36db\n0.9.43-36264cb36db\n0.9.43-36264cb36db\n"})}),"\n",(0,i.jsxs)(n.p,{children:["If not, make sure that you installed all the binaries, all the binaries are somewhere in your\n",(0,i.jsx)(n.code,{children:"$PATH"})," and they are all in the same folder."]}),"\n",(0,i.jsx)(n.h3,{id:"synchronize-chain-data",children:"Synchronize Chain Data"}),"\n",(0,i.jsx)(n.p,{children:"You can begin syncing your node by running the following command if you do not want to start in\nvalidator mode right away:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-sh",children:"polkadot\n"})}),"\n",(0,i.jsxs)(n.admonition,{type:"info",children:[(0,i.jsx)(n.p,{children:"If you want to run a validator on Kusama, you have an option to specify the chain. With no\nspecification, this would default to Polkadot."}),(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-sh",children:"polkadot --chain=kusama\n"})})]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"2021-06-17 03:07:07 Parity Polkadot\n2021-06-17 03:07:07 \u270c\ufe0f version 0.9.5-95f6aa201-x86_64-linux-gnu\n2021-06-17 03:07:07 \u2764\ufe0f by Parity Technologies , 2017-2021\n2021-06-17 03:07:07 \ud83d\udccb Chain specification: Polkadot\n2021-06-17 03:07:07 \ud83c\udff7 Node name: boiling-pet-7554\n2021-06-17 03:07:07 \ud83d\udc64 Role: FULL\n2021-06-17 03:07:07 \ud83d\udcbe Database: RocksDb at /root/.local/share/polkadot/chains/polkadot/db\n2021-06-17 03:07:07 \u26d3 Native runtime: polkadot-9050 (parity-polkadot-0.tx7.au0)\n2021-06-17 03:07:10 \ud83c\udff7 Local node identity is: 12D3KooWLtXFWf1oGrnxMGmPKPW54xWCHAXHbFh4Eap6KXmxoi9u\n2021-06-17 03:07:10 \ud83d\udce6 Highest known block at #17914\n2021-06-17 03:07:10 \u303d\ufe0f Prometheus server started at 127.0.0.1:9615\n2021-06-17 03:07:10 Listening for new connections on 127.0.0.1:9944.\n"})}),"\n",(0,i.jsx)(n.admonition,{title:"Example of node sync",type:"info",children:(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"2021-06-17 03:07:39 \ud83d\udd0d Discovered new external address for our node: /ip4/10.26.16.1/tcp/30333/ws/p2p/12D3KooWLtXFWf1oGrnxMGmPKPW54xWCHAXHbFh4Eap6KXmxoi9u\n2021-06-17 03:07:40 \u2699\ufe0f Syncing 218.8 bps, target=#5553764 (17 peers), best: #24034 (0x08af\u2026dcf5), finalized #23552 (0xd4f0\u20262642), \u2b07 173.5kiB/s \u2b06 12.7kiB/s\n2021-06-17 03:07:45 \u2699\ufe0f Syncing 214.8 bps, target=#5553765 (20 peers), best: #25108 (0xb272\u2026e800), finalized #25088 (0x94e6\u20268a9f), \u2b07 134.3kiB/s \u2b06 7.4kiB/s\n2021-06-17 03:07:50 \u2699\ufe0f Syncing 214.8 bps, target=#5553766 (21 peers), best: #26182 (0xe7a5\u202601a2), finalized #26112 (0xcc29\u2026b1a9), \u2b07 5.0kiB/s \u2b06 1.1kiB/s\n2021-06-17 03:07:55 \u2699\ufe0f Syncing 138.4 bps, target=#5553767 (21 peers), best: #26874 (0xcf4b\u20266553), finalized #26624 (0x9dd9\u202627f8), \u2b07 18.9kiB/s \u2b06 2.0kiB/s\n2021-06-17 03:08:00 \u2699\ufe0f Syncing 37.0 bps, target=#5553768 (22 peers), best: #27059 (0x5b73\u20266fc9), finalized #26624 (0x9dd9\u202627f8), \u2b07 14.3kiB/s \u2b06 4.4kiB/s\n"})})}),"\n",(0,i.jsxs)(n.admonition,{title:"Use Warp sync for faster syncing",type:"tip",children:[(0,i.jsxs)(n.p,{children:["By default, the node performs ",(0,i.jsx)(n.code,{children:"full"})," sync, which downloads and validates the full blockchain\nhistory. Full sync works by listening to announced blocks and requesting the blocks from the\nannouncing peers, or just the block headers in case of light clients."]}),(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"Fast"})," sync is another option that works by downloading the block header history and validating the\nauthority set changes in order to arrive at a specific (usually the most recent) header. After the\ndesired header has been reached and verified, the state can be downloaded and imported. Once this\nprocess has been completed, the node can proceed with a full sync."]}),(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-sh",children:"polkadot --sync warp\n"})}),(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"Warp sync"})," initially downloads and validates the finality proofs from\n",(0,i.jsx)(n.a,{href:"/docs/learn-consensus#finality-gadget-grandpa",children:"GRANDPA"})," and then downloads the state of the\nlatest finalized block. After the warp sync, the node is ready to import the latest blocks from the\nnetwork and can be used as a Validator. The blocks from genesis will be downloaded in the\nbackground. Check\n",(0,i.jsx)(n.a,{href:"https://substrate.stackexchange.com/questions/334/what-kinds-of-sync-mechanisms-does-substrate-implement/",children:"this discussion"}),"\nfor more information about the different sync options available."]})]}),"\n",(0,i.jsxs)(n.admonition,{title:"Validators should sync using the RocksDb backend",type:"note",children:[(0,i.jsxs)(n.p,{children:["This is implicit by default, but can be explicit by passing the ",(0,i.jsx)(n.code,{children:"--database RocksDb"})," flag."]}),(0,i.jsxs)(n.p,{children:["In the future, it is recommended to switch to the faster and more efficient ParityDB option. Note\nthat ",(0,i.jsx)(n.strong,{children:"ParityDB is still experimental and should not be used in production."})," If you want to test\nout ParityDB, you can add the flag ",(0,i.jsx)(n.code,{children:"--database paritydb"}),". Switching between database backends will\nrequire a resync."]})]}),"\n",(0,i.jsx)(n.p,{children:"Depending on the size of the chain when you do this, this step may take anywhere from a few minutes\nto a few hours."}),"\n",(0,i.jsxs)(n.p,{children:["If you are interested in determining how much longer you have to go, your server logs (printed to\nSTDOUT from the ",(0,i.jsx)(n.code,{children:"polkadot"})," process) will tell you the latest block your node has processed and\nverified. You can then compare that to the current highest block via\n",(0,i.jsx)(n.a,{href:"https://telemetry.polkadot.io/#list/Polkadot%20CC1",children:"Telemetry"})," or the\n",(0,i.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/explorer",children:"PolkadotJS Block Explorer"}),"."]}),"\n",(0,i.jsx)(n.h4,{id:"database-snapshot-services",children:"Database Snapshot Services"}),"\n",(0,i.jsx)(n.p,{children:"If you start a node for the first time, it will start building from the genesis block. This process\ncan take a while depending on the database size. To make this process faster, snapshots can be used.\nSnapshots are compressed backups of the database directory of Polkadot/Kusama nodes, containing the\nwhole chain (or a pruned version of it, with states only from the latest 1000 or 256 blocks). Listed\nbelow are a few public snapshot providers for Polkadot and Kusama."}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://stakeworld.io/snapshot",children:"Stakeworld"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://polkachu.com/snapshots",children:"Polkachu"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://polkashots.io/",children:"Polkashots"})}),"\n"]}),"\n",(0,i.jsx)(n.admonition,{type:"caution",children:(0,i.jsx)(n.p,{children:"For the security of the network, it is recommended that you sync from scratch, even if you are\nrunning your node in pruning mode for validation. The reason is that if these snapshots get\ncorrupted and a majority of nodes run based on these snapshots, the network could end up running on\na non-canonical chain."})}),"\n",(0,i.jsx)(n.h2,{id:"bond-dot",children:"Bond DOT"}),"\n",(0,i.jsxs)(n.p,{children:["There is a ",(0,i.jsx)(n.a,{href:"/docs/chain-state-values#minimum-validator-bond",children:"minimum bond"})," to start a\nvalidator instance, but to enter the active validator set and be eligible to earn rewards, your\nvalidator node should be nominated by a minimum number of DOT tokens."]}),"\n",(0,i.jsx)(n.p,{children:"If you are validator who intends to get DOT/KSM nominations from the community, you will need to\nshow some skin in the game. For that, you need to bond some DOT/KSM as own stake. Make sure not to\nbond all your DOT balance since you will be unable to pay transaction fees from your bonded balance."}),"\n",(0,i.jsx)(n.admonition,{title:"Controller accounts are deprecated. Use Staking Proxy.",type:"info",children:(0,i.jsxs)(n.p,{children:["Controller accounts are deprecated. For more information, see\n",(0,i.jsx)(n.a,{href:"https://forum.polkadot.network/t/staking-controller-deprecation-plan-staking-ui-leads-comms/2748",children:"this discussion"}),".\nIt is highly recommended that you setup an account with a staking proxy, which can be used for\nissuing start and stop validating calls. Read more about ",(0,i.jsx)(n.a,{href:"/docs/learn-proxies",children:"proxy accounts"}),"\nhere."]})}),"\n",(0,i.jsxs)(n.p,{children:["First, go to the ",(0,i.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/staking/actions",children:"Staking"}),' section. Click on\n"Account Actions", and then the "+ Stash" button.']}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"bonding-JS-UI",src:t(46966).A+"",width:"2143",height:"847"})}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Stash account"})," - Select your Stash account (which is the account with the DOT/KSM balance)"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Value bonded"})," - How much DOT from the Stash account you want to bond/stake. Note that you do\nnot need to bond all of the DOT in that account. Also note that you can always bond ",(0,i.jsx)(n.em,{children:"more"})," DOT\nlater. However, ",(0,i.jsx)(n.em,{children:"withdrawing"})," any bonded amount requires the duration of the unbonding period. On\nKusama, the unbonding period is 7 days. On Polkadot, the planned unbonding period is 28 days."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Payment destination"})," - The account where the rewards from validating are sent. More info\n",(0,i.jsx)(n.a,{href:"../learn/learn-staking.md/#reward-distribution",children:"here"}),". Starting with runtime version v23 natively\nincluded in client version ",(0,i.jsx)(n.a,{href:"https://github.com/paritytech/polkadot/releases/tag/v0.9.3",children:"0.9.3"}),",\npayouts can go to any custom address. If you'd like to redirect payments to an account that is not\nthe stash account, you can do it by entering the address here. Note that it is extremely unsafe to\nset an exchange address as the recipient of the staking rewards."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["Once everything is filled in properly, click ",(0,i.jsx)(n.code,{children:"Bond"})," and sign the transaction with your Stash\naccount."]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"sign transaction",src:t(83402).A+"",width:"2141",height:"780"})}),"\n",(0,i.jsxs)(n.p,{children:["After a few seconds, you should see an ",(0,i.jsx)(n.code,{children:"ExtrinsicSuccess"})," message."]}),"\n",(0,i.jsxs)(n.p,{children:["Your bonded account will be available under ",(0,i.jsx)(n.code,{children:"Stashes"}),". You should now see a new card with all your\naccounts (note: you may need to refresh the screen). The bonded amount on the right corresponds to\nthe funds bonded by the Stash account."]}),"\n",(0,i.jsx)(n.h2,{id:"set-session-keys",children:"Set Session Keys"}),"\n",(0,i.jsx)(n.admonition,{title:"Session keys are consensus critical",type:"caution",children:(0,i.jsxs)(n.p,{children:["If you are not sure if your node has the current session keys that you made the ",(0,i.jsx)(n.code,{children:"setKeys"}),"\ntransaction then you can use one of the two available RPC methods to query your node:\n",(0,i.jsx)(n.a,{href:"https://polkadot.js.org/docs/substrate/rpc/#haskeypublickey-bytes-keytype-text-bool",children:"hasKey"})," to\ncheck for a specific key or\n",(0,i.jsx)(n.a,{href:"https://polkadot.js.org/docs/substrate/rpc/#hassessionkeyssessionkeys-bytes-bool",children:"hasSessionKeys"}),"\nto check the full session key public key string."]})}),"\n",(0,i.jsx)(n.p,{children:"Once your node is fully synced, stop the process by pressing Ctrl-C. At your terminal prompt, you\nwill now start running the node."}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-sh",children:'polkadot --validator --name "name on telemetry"\n'})}),"\n",(0,i.jsx)(n.p,{children:"Similarly:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"2021-06-17 03:12:08 Parity Polkadot\n2021-06-17 03:12:08 \u270c\ufe0f version 0.9.5-95f6aa201-x86_64-linux-gnu\n2021-06-17 03:12:08 \u2764\ufe0f by Parity Technologies , 2017-2021\n2021-06-17 03:12:08 \ud83d\udccb Chain specification: Polkadot\n2021-06-17 03:12:08 \ud83c\udff7 Node name: nateched-test\n2021-06-17 03:12:08 \ud83d\udc64 Role: AUTHORITY\n2021-06-17 03:12:08 \ud83d\udcbe Database: RocksDb at /root/.local/share/polkadot/chains/polkadot/db\n2021-06-17 03:12:08 \u26d3 Native runtime: polkadot-9050 (parity-polkadot-0.tx7.au0)\n2021-06-17 03:12:12 \ud83c\udff7 Local node identity is: 12D3KooWLtXFWf1oGrnxMGmPKPW54xWCHAXHbFh4Eap6KXmxoi9u\n2021-06-17 03:12:12 \ud83d\udce6 Highest known block at #64673\n2021-06-17 03:12:12 \u303d\ufe0f Prometheus server started at 127.0.0.1:9615\n2021-06-17 03:12:12 Listening for new connections on 127.0.0.1:9944.\n2021-06-17 03:12:12 \ud83d\udc76 Starting BABE Authorship worker\n"})}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"2021-06-17 03:12:16 \ud83d\udd0d Discovered new external address for our node: /ip4/10.26.11.1/tcp/30333/p2p/12D3KooWLtXFWf1oGrnxMGmPKPW54xWCHAXHbFh4Eap6KXmxoi9u\n2021-06-17 03:12:17 \u2699\ufe0f Syncing, target=#5553810 (14 peers), best: #65068 (0x6da5\u20260662), finalized #65024 (0x4e84\u2026d170), \u2b07 352.2kiB/s \u2b06 75.6kiB/s\n"})}),"\n",(0,i.jsx)(n.p,{children:"You can give your validator any name that you like, but note that others will be able to see it, and\nit will be included in the list of all servers using the same telemetry server. Since numerous\npeople are using telemetry, it is recommended that you choose something likely to be unique."}),"\n",(0,i.jsx)(n.h3,{id:"generating-the-session-keys",children:"Generating the Session Keys"}),"\n",(0,i.jsx)(n.p,{children:"You need to tell the chain your Session keys by signing and submitting an extrinsic. This is what\nassociates your validator node with your stash account on Polkadot."}),"\n",(0,i.jsx)(n.h4,{id:"option-1-polkadotjs-apps",children:"Option 1: PolkadotJS-APPS"}),"\n",(0,i.jsxs)(n.p,{children:["You can generate your ",(0,i.jsx)(n.a,{href:"/docs/learn-cryptography",children:"Session keys"})," in the client via the apps RPC.\nIf you are doing this, make sure that you have the PolkadotJS-Apps explorer attached to your\nvalidator node. You can configure the apps dashboard to connect to the endpoint of your validator in\nthe Settings tab. If you are connected to a default endpoint hosted by Parity of Web3 Foundation,\nyou will not be able to use this method since making RPC requests to this node would effect the\nlocal keystore hosted on a ",(0,i.jsx)(n.em,{children:"public node"})," and you want to make sure you are interacting with the\nkeystore for ",(0,i.jsx)(n.em,{children:"your node"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["Once ensuring that you have connected to your node, the easiest way to set session keys for your\nnode is by calling the ",(0,i.jsx)(n.code,{children:"author_rotateKeys"})," RPC request to create new keys in your validator's\nkeystore. Navigate to Toolbox tab and select RPC Calls then select the author > rotateKeys() option\nand remember to save the output that you get back for a later step."]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"Explorer RPC call",src:t(3106).A+"",width:"1700",height:"582"})}),"\n",(0,i.jsx)(n.h4,{id:"option-2-cli",children:"Option 2: CLI"}),"\n",(0,i.jsx)(n.p,{children:"If you are on a remote server, it is easier to run this command on the same machine (while the node\nis running with the default WS RPC port configured):"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-sh",children:'curl -H "Content-Type: application/json" -d \'{"id":1, "jsonrpc":"2.0", "method": "author_rotateKeys", "params":[]}\' http://localhost:9944\n'})}),"\n",(0,i.jsx)(n.p,{children:'The output will have a hex-encoded "result" field. The result is the concatenation of the four\npublic keys. Save this result for a later step.'}),"\n",(0,i.jsx)(n.p,{children:"You can restart your node at this point."}),"\n",(0,i.jsxs)(n.h3,{id:"submitting-the-setkeys-transaction",children:["Submitting the ",(0,i.jsx)(n.code,{children:"setKeys"})," Transaction"]}),"\n",(0,i.jsx)(n.p,{children:"You need to tell the chain your Session keys by signing and submitting an extrinsic. This is what\nassociates your validator with your staking proxy."}),"\n",(0,i.jsxs)(n.p,{children:["Go to ",(0,i.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/staking/actions",children:"Staking > Account Actions"}),', and click "Set\nSession Key" on the bonding account you generated earlier. Enter the output from ',(0,i.jsx)(n.code,{children:"author_rotateKeys"}),'\nin the field and click "Set Session Key".']}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.img,{alt:"staking-change-session",src:t(83215).A+"",width:"2792",height:"182"}),"\n",(0,i.jsx)(n.img,{alt:"staking-session-result",src:t(61748).A+"",width:"2146",height:"680"})]}),"\n",(0,i.jsx)(n.p,{children:"Submit this extrinsic and you are now ready to start validating."}),"\n",(0,i.jsx)(n.h3,{id:"setting-the-node-aka-network-key",children:"Setting the Node (aka Network) Key"}),"\n",(0,i.jsx)(n.p,{children:"Validators must use a static network key to maintain a stable node identity across restarts.\nStarting with Polkadot version 1.11, a check is performed on startup, and the following error will\nbe printed if a static node key is not set:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:'Error:\n0: Starting an authority without network key\nThis is not a safe operation because other authorities in the network may depend on your node having a stable identity.\nOtherwise these other authorities may not being able to reach you.\n\nIf it is the first time running your node you could use one of the following methods:\n1. [Preferred] Separately generate the key with: key generate-node-key --base-path \n2. [Preferred] Separately generate the key with: key generate-node-key --file \n3. [Preferred] Separately generate the key with: key generate-node-key --default-base-path\n4. [Unsafe] Pass --unsafe-force-node-key-generation and make sure you remove it for subsequent node restarts"\n'})}),"\n",(0,i.jsxs)(n.p,{children:["The recommended solution is to generate a node key and save it to a file using\n",(0,i.jsx)(n.code,{children:"polkadot key generate-node-key --file "}),", then attach it to your node with\n",(0,i.jsx)(n.code,{children:"--node-key-file "}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["Please see ",(0,i.jsx)(n.a,{href:"https://github.com/paritytech/polkadot-sdk/pull/3852",children:"polkadot-sdk#3852"})," for the\nrationale behind this change."]}),"\n",(0,i.jsx)(n.h2,{id:"validate",children:"Validate"}),"\n",(0,i.jsxs)(n.p,{children:["To verify that your node is live and synchronized, head to\n",(0,i.jsx)(n.a,{href:"https://telemetry.polkadot.io/#list/Polkadot%20CC1",children:"Telemetry"})," and find your node. Note that this\nwill show all nodes on the Polkadot network, which is why it is important to select a unique name!"]}),"\n",(0,i.jsxs)(n.p,{children:["In this example, we used the name ",(0,i.jsx)(n.code,{children:"techedtest"})," and have successfully located it upon searching:"]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"polkadot-dashboard-telemetry",src:t(83517).A+"",width:"2862",height:"472"})}),"\n",(0,i.jsx)(n.h3,{id:"setup-via-validator-tab",children:"Setup via Validator Tab"}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"polkadot-dashboard-validate-1",src:t(47526).A+"",width:"2128",height:"1022"})}),"\n",(0,i.jsxs)(n.p,{children:["Here you will need to input the Keys from ",(0,i.jsx)(n.code,{children:"rotateKeys"}),", which is the Hex output from\n",(0,i.jsx)(n.code,{children:"author_rotateKeys"}),". The keys will show as pending until applied at the start of a new session."]}),"\n",(0,i.jsx)(n.p,{children:'The "reward commission percentage" is the commission percentage that you can declare against your\nvalidator\'s rewards. This is the rate that your validator will be commissioned with.'}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Payment preferences"})," - You can specify the percentage of the rewards that will get paid to you.\nThe remaining will be split among your nominators."]}),"\n"]}),"\n",(0,i.jsx)(n.admonition,{title:"Setting a commission rate of 100% suggests that you do not want your validator to receive",type:"caution",children:(0,i.jsx)(n.p,{children:"nominations"})}),"\n",(0,i.jsx)(n.p,{children:'You can also determine if you would like to receive nominations with the "allows new nominations"\noption.'}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"dashboard validate",src:t(28733).A+"",width:"2126",height:"694"})}),"\n",(0,i.jsx)(n.p,{children:'Click "Bond & Validate".'}),"\n",(0,i.jsx)(n.p,{children:'If you go to the "Staking" tab, you will see a list of active validators currently running on the\nnetwork. At the top of the page, it shows the number of validator slots that are available as well\nas the number of nodes that have signaled their intention to be a validator. You can go to the\n"Waiting" tab to double check to see whether your node is listed there.'}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"staking queue",src:t(72563).A+"",width:"2838",height:"1440"})}),"\n",(0,i.jsxs)(n.p,{children:["The validator set is refreshed every era. In the next era, if there is a slot available and your\nnode is selected to join the validator set, your node will become an active validator. Until then,\nit will remain in the ",(0,i.jsx)(n.em,{children:"waiting"})," queue. If your validator is not selected to become part of the\nvalidator set, it will remain in the ",(0,i.jsx)(n.em,{children:"waiting"})," queue until it is. There is no need to re-start if\nyou are not selected for the validator set in a particular era. However, it may be necessary to\nincrease the number of DOT staked or seek out nominators for your validator in order to join the\nvalidator set."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Congratulations!"})," If you have followed all of these steps, and been selected to be a part of the\nvalidator set, you are now running a Polkadot validator! If you need help, reach out on the\n",(0,i.jsx)(n.a,{href:"https://matrix.to/#/!NZrbtteFeqYKCUGQtr:matrix.parity.io?via=matrix.parity.io&via=matrix.org&via=web3.foundation",children:"Polkadot Validator chat"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"thousand-validators-programme",children:"Thousand Validators Programme"}),"\n",(0,i.jsxs)(n.p,{children:["The Thousand Validators Programme is a joint initiative by Web3 Foundation and Parity Technologies\nto provide support for community validators. If you are interested in applying for the program, you\ncan find more information ",(0,i.jsx)(n.a,{href:"/docs/thousand-validators",children:"on the wiki page"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"running-a-validator-on-a-testnet",children:"Running a validator on a testnet"}),"\n",(0,i.jsx)(n.p,{children:"To verify your validator setup, it is possible to run it against a PoS test network such as Westend.\nHowever, validator slots are intentionally limited on Westend to ensure stability and availability\nof the testnet for the Polkadot release process."}),"\n",(0,i.jsx)(n.p,{children:"Here is a small comparison of each network characteristics as relevant to validators:"}),"\n",(0,i.jsxs)(n.table,{children:[(0,i.jsx)(n.thead,{children:(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.th,{children:"Network"}),(0,i.jsx)(n.th,{children:"Polkadot"}),(0,i.jsx)(n.th,{children:"Westend"})]})}),(0,i.jsxs)(n.tbody,{children:[(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"epoch"}),(0,i.jsx)(n.td,{children:"4h"}),(0,i.jsx)(n.td,{children:"1h"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"era"}),(0,i.jsx)(n.td,{children:"1d"}),(0,i.jsx)(n.td,{children:"6h"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"token"}),(0,i.jsx)(n.td,{children:"DOT"}),(0,i.jsx)(n.td,{children:"WND (test)"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"active validators"}),(0,i.jsx)(n.td,{children:"~300"}),(0,i.jsx)(n.td,{children:"~20"})]})]})]}),"\n",(0,i.jsx)(n.h2,{id:"faq",children:"FAQ"}),"\n",(0,i.jsx)(n.h3,{id:"why-am-i-unable-to-synchronize-the-chain-with-0-peers",children:"Why am I unable to synchronize the chain with 0 peers?"}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"zero-peer",src:t(39664).A+"",width:"1350",height:"235"})}),"\n",(0,i.jsxs)(n.p,{children:["Make sure to enable ",(0,i.jsx)(n.code,{children:"30333"})," libp2p port. Eventually, it will take a little bit of time to discover\nother peers over the network."]}),"\n",(0,i.jsx)(n.h3,{id:"how-do-i-clear-all-my-chain-data",children:"How do I clear all my chain data?"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-sh",children:"polkadot purge-chain\n"})}),"\n",(0,i.jsx)(n.admonition,{type:"info",children:(0,i.jsxs)(n.p,{children:["Check out the ",(0,i.jsx)(n.a,{href:"https://substrate.stackexchange.com/",children:"Substrate StackExchange"})," to quickly get the\nanswers you need."]})}),"\n",(0,i.jsx)(n.h2,{id:"note-about-vps",children:"Note about VPS"}),"\n",(0,i.jsx)(n.p,{children:"VPS providers are very popular for running servers of any kind. Extensive benchmarking was conducted\nto ensure that VPS servers are able to keep up with the work load in general."}),"\n",(0,i.jsxs)(n.admonition,{type:"note",children:[(0,i.jsx)(n.p,{children:"Before you run a live Validator, please verify if the advertised performance is actually delivered\nconsistently by the VPS provider."}),(0,i.jsx)(n.p,{children:"::: The following server types showed acceptable performance during the benchmark tests. Please note\nthat this is not an endorsement in any way:"}),(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["GCP's ",(0,i.jsx)(n.em,{children:"c2"})," and ",(0,i.jsx)(n.em,{children:"c2d"})," machine families"]}),"\n",(0,i.jsxs)(n.li,{children:["AWS's ",(0,i.jsx)(n.em,{children:"c6id"})," machine family"]}),"\n"]}),(0,i.jsx)(n.p,{children:"The following additional configurations were applied to the instances to tune their performance:"}),(0,i.jsxs)(n.h3,{id:"disable-smt",children:["Disable ",(0,i.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/Simultaneous_multithreading",children:"SMT"})]}),(0,i.jsxs)(n.p,{children:["As critical path of Substrate is single-threaded we need to optimize for single-core CPU\nperformance. The node still profits from multiple cores when doing networking and other non-runtime\noperations. It is therefore still necessary to run it on at least the minimum required number of\ncores. Disabling SMT improves the performance as each vCPU becomes mapped to a physical CPU core\nrather than being presented to the OS as two logical cores. SMT implementation is called\n",(0,i.jsx)(n.em,{children:"Hyper-Threading"})," on Intel and ",(0,i.jsx)(n.em,{children:"2-way SMT"})," on AMD Zen. To disable SMT in runtime:"]}),(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"for cpunum in $(cat /sys/devices/system/cpu/cpu*/topology/thread_siblings_list | cut -s -d, -f2- | tr ',' '\\n' | sort -un)\ndo\n echo 0 > /sys/devices/system/cpu/cpu$cpunum/online\ndone\n"})}),(0,i.jsx)(n.p,{children:"It will disable every other (vCPU) core."}),(0,i.jsxs)(n.p,{children:["To save changes permanently add ",(0,i.jsx)(n.code,{children:"nosmt=force"})," as kernel parameter. Edit ",(0,i.jsx)(n.code,{children:"/etc/default/grub"})," and add\n",(0,i.jsx)(n.code,{children:"nosmt=force"})," to ",(0,i.jsx)(n.code,{children:"GRUB_CMDLINE_LINUX_DEFAULT"})," variable and run ",(0,i.jsx)(n.code,{children:"sudo update-grub"}),". After the reboot\nyou should see half of the cores are offline. Run ",(0,i.jsx)(n.code,{children:"lscpu --extended"})," to confirm."]}),(0,i.jsx)(n.h3,{id:"disable-automatic-numa-balancing",children:"Disable automatic NUMA balancing"}),(0,i.jsx)(n.p,{children:"If you have multiple physical CPUs (CPU0 and CPU1) in the system each with its own memory bank (MB0\nand MB1), then it is usually slower for a CPU0 to access MB1 due to the slower interconnection. To\nprevent the OS from automatically moving the running Substrate process from one CPU to another and\nthus causing an increased latency, it is recommended to disable automatic NUMA balancing."}),(0,i.jsx)(n.p,{children:"With automatic NUMA balancing disabled, an OS will always run a process on the same NUMA node where\nit was initially scheduled."}),(0,i.jsx)(n.p,{children:"To disable NUMA balancing in runtime:"}),(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"sysctl kernel.numa_balancing=0\n"})}),(0,i.jsxs)(n.p,{children:["To save changes permanently, update startup options and reconfigure GRUB. Edit ",(0,i.jsx)(n.code,{children:"/etc/default/grub"}),"\nand add ",(0,i.jsx)(n.code,{children:"numa_balancing=disable"})," to ",(0,i.jsx)(n.code,{children:"GRUB_CMDLINE_LINUX_DEFAULT"})," variable and run\n",(0,i.jsx)(n.code,{children:"sudo update-grub"}),". After reboot you can confirm the change by running\n",(0,i.jsx)(n.code,{children:"sysctl -a | grep 'kernel.numa_balancing'"})," and checking if the parameter is set to 0"]}),(0,i.jsx)(n.h3,{id:"configure-spectremeltdown-mitigations",children:"Configure Spectre/Meltdown Mitigations"}),(0,i.jsxs)(n.p,{children:["Spectre and Meltdown are vulnerabilities discovered in modern CPUs a few years ago. Mitigations were\nmade to the Linux kernel to cope with the multiple variations of these attacks. Check out\n",(0,i.jsx)(n.a,{href:"https://meltdownattack.com/",children:"https://meltdownattack.com/"})," for more info."]}),(0,i.jsxs)(n.p,{children:["Initially those mitigations added ~20% penalty to the performance of the workloads. As CPU\nmanufacturers started to roll-out mitigations implemented in hardware, the performance gap\n",(0,i.jsx)(n.a,{href:"https://www.phoronix.com/scan.php?page=article&item=3-years-specmelt&num=1",children:"narrowed down"}),". As the\nbenchmark demonstrates, the performance penalty got reduced to ~7% on Intel 10th Gen CPUs. This is\ntrue for the workloads running on both bare-metal and VMs. But the penalty remains high for the\ncontainerized workloads in some cases."]}),(0,i.jsxs)(n.p,{children:["As demonstrated in\n",(0,i.jsx)(n.a,{href:"http://mamememo.blogspot.com/2020/05/cpu-intensive-rubypython-code-runs.html",children:"Yusuke Endoh's article"}),",\na performance penalty for containerized workloads can be as high as 100%. This is due to SECCOMP\nprofile being overprotective about applying Spectre/Meltdown mitigations without providing real\nsecurity. A longer explanation is available in the\n",(0,i.jsx)(n.a,{href:"https://lkml.org/lkml/2020/11/4/1135",children:"kernel patch discussion"}),"."]}),(0,i.jsxs)(n.p,{children:["Linux 5.16\n",(0,i.jsx)(n.a,{href:"https://www.phoronix.com/scan.php?page=news_item&px=Linux-Spectre-SECCOMP-Default",children:"loosened the protections"}),"\napplied to SECCOMP threads by default. Containers running on kernel 5.16 and later now don't suffer\nfrom the performance penalty implied by using a SECCOMP profile in container runtimes."]}),(0,i.jsx)(n.h4,{id:"for-linux--516",children:"For Linux >= 5.16"}),(0,i.jsx)(n.p,{children:"You are all set. The performance of containerized workloads is on par with non-containerized ones.\nYou don't have to do anything."}),(0,i.jsx)(n.h4,{id:"for-linux--516-1",children:"For Linux < 5.16"}),(0,i.jsxs)(n.p,{children:["You'll need to disable mitigations for Spectre V2 for user-space tasks as well as Speculative Store\nBypass Disable (SSBD) for Spectre V4.\n",(0,i.jsx)(n.a,{href:"https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git/commit/?h=for-next/seccomp&id=2f46993d83ff4abb310ef7b4beced56ba96f0d9d",children:"This patch message"}),"\ndescribes the reasoning for this default change in more detail:"]}),(0,i.jsxs)(n.blockquote,{children:["\n",(0,i.jsx)(n.p,{children:"Ultimately setting SSBD and STIBP by default for all seccomp jails is a bad sweet spot and bad\ndefault with more cons than pros that end up reducing security in the public cloud (by giving an\nhuge incentive to not expose SPEC_CTRL which would be needed to get full security with IBPB after\nsetting nosmt in the guest) and by excessively hurting performance to more secure apps using\nseccomp that end up having to opt out with SECCOMP_FILTER_FLAG_SPEC_ALLOW."}),"\n"]}),(0,i.jsxs)(n.p,{children:["To disable the mitigations edit ",(0,i.jsx)(n.code,{children:"/etc/default/grub"})," and add\n",(0,i.jsx)(n.code,{children:"spec_store_bypass_disable=prctl spectre_v2_user=prctl"})," to ",(0,i.jsx)(n.code,{children:"GRUB_CMDLINE_LINUX_DEFAULT"})," variable,\nrun ",(0,i.jsx)(n.code,{children:"sudo update-grub"}),", then reboot."]}),(0,i.jsxs)(n.p,{children:["Note that mitigations are not disabled completely. You can fully disable all the available kernel\nmitigations by setting ",(0,i.jsx)(n.code,{children:"mitigations=off"}),". But we don't recommend doing this unless you run a fully\ntrusted code on the host."]}),(0,i.jsx)(n.h3,{id:"vps-list",children:"VPS List"}),(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://cloud.google.com/",children:"Google Cloud"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://aws.amazon.com/",children:"Amazon AWS"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://www.ovh.com.au/",children:"OVH"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://www.digitalocean.com/",children:"Digital Ocean"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://www.vultr.com/",children:"Vultr"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://www.linode.com/",children:"Linode"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://www.scaleway.com/",children:"Scaleway"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://onfinality.io/",children:"OnFinality"})}),"\n"]}),(0,i.jsxs)(n.admonition,{type:"caution",children:[(0,i.jsxs)(n.mdxAdmonitionTitle,{children:["Beware of the ",(0,i.jsx)(n.strong,{children:"Terms and Conditions"})," and ",(0,i.jsx)(n.strong,{children:"Acceptable Use Policies"})," for each VPS"]}),(0,i.jsx)(n.p,{children:"provider"}),(0,i.jsxs)(n.p,{children:['You may be locked out of your account and your server shut down if you come in violation. For\ninstance, Digital Ocean lists "Mining of Cryptocurrencies" under the Network Abuse section of their\n',(0,i.jsx)(n.a,{href:"https://www.digitalocean.com/legal/acceptable-use-policy/",children:"Acceptable Use Policy"})," and requires\nexplicit permission to do so. This may extend to other cryptocurrency activity."]})]})]})]})}function h(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(c,{...e})}):c(e)}},47379:(e,n,t)=>{"use strict";t.d(n,{A:()=>u});var a=t(90675),i=t(10467),o=t(96540),s=t(19588),r=t(2026),l=t(11135);function d(e,n,t){return c.apply(this,arguments)}function c(){return(c=(0,i.A)((0,a.A)().mark((function e(n,t,i){var o,l,d,c,h;return(0,a.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=void 0,l=void 0,e.t0=n,e.next="polkadot"===e.t0?5:"kusama"===e.t0?7:"statemine"===e.t0?9:"statemint"===e.t0?11:"polkadotpeople"===e.t0?13:"kusamapeople"===e.t0?15:17;break;case 5:return o="wss://rpc.polkadot.io",e.abrupt("break",18);case 7:return o="wss://kusama-rpc.polkadot.io/",e.abrupt("break",18);case 9:return o="wss://statemine-rpc.polkadot.io/",e.abrupt("break",18);case 11:return o="wss://statemint-rpc.polkadot.io/",e.abrupt("break",18);case 13:return o="wss://polkadot-people-rpc.polkadot.io/",e.abrupt("break",18);case 15:return o="wss://kusama-people-rpc.polkadot.io/",e.abrupt("break",18);case 17:console.log("Unknown socket url provided, no connection made.");case 18:if(void 0!==o){e.next=22;break}return e.abrupt("return");case 22:return d=new s.E(o),e.next=25,r.G.create({provider:d});case 25:c=e.sent,(h=t.split(".")).forEach((function(e){e in c&&(c=c[e])})),e.t1=h[0],e.next="consts"===e.t1?31:"query"===e.t1?33:38;break;case 31:return l=c.toString(),e.abrupt("break",39);case 33:return e.next=35,c();case 35:return l=(l=e.sent).toString(),e.abrupt("break",39);case 38:console.log("Unknown path prefix ("+h[0]+") in "+t);case 39:return e.abrupt("return",l);case 40:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function h(e,n,t,a){switch(n){case"humanReadable":(0,l.HumanReadable)(e,t,a);break;case"precise":(0,l.Precise)(e,t,a);break;case"blocksToDays":(0,l.BlocksToDays)(e,a);break;case"erasToDays":(0,l.ErasToDays)(e,a,t);break;case"percentage":(0,l.Percentage)(e,a);break;case"permillToPercent":(0,l.PermillToPercent)(e,a);break;case"arrayLength":(0,l.ArrayLength)(e,a);break;default:return void console.log("Ignoring unknown filter type")}}const u=function(e){var n=e.network,t=e.path,s=e.defaultValue,r=e.filter,l=void 0===r?void 0:r,c=(0,o.useState)(""),u=c[0],p=c[1];return n=n.toLowerCase(),(0,o.useEffect)((function(){void 0!==l?h(s.toString(),l,n,p):p(s.toString());var e=void 0;switch(n){case"polkadot":e="wss://rpc.polkadot.io";break;case"kusama":e="wss://kusama-rpc.polkadot.io/";break;case"statemine":e="wss://kusama-asset-hub-rpc.polkadot.io/";break;case"statemint":e="wss://polkadot-asset-hub-rpc.polkadot.io/";break;case"kusamapeople":e="wss://kusama-people-rpc.polkadot.io";break;case"polkadotpeople":e="wss://polkadot-people-rpc.polkadot.io";break;default:console.log("Unknown network provided, "+n)}if(void 0===e)console.log("Failed to connect to a valid websocket, applying default");else{var o=function(){var e=(0,i.A)((0,a.A)().mark((function e(){var i;return(0,a.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,d(n,t,p);case 2:if(void 0!==(i=e.sent)){e.next=7;break}return e.abrupt("return");case 7:void 0!==l?h(i,l,n,p):p(i);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();try{o()}catch(r){console.log(r)}}}),[]),u}},11135:e=>{var n="polkadot",t="kusama",a="statemine",i="statemint",o="polkadotpeople",s="kusamapeople",r={polkadot:{precision:1e10,symbol:"DOT"},kusama:{precision:1e12,symbol:"KSM"},statemint:{precision:1e10,symbol:"DOT"},statemine:{precision:1e12,symbol:"KSM"},polkadotpeople:{precision:1e10,symbol:"DOT"},kusamapeople:{precision:1e12,symbol:"KSM"}};e.exports={HumanReadable:function(e,l,d){var c=void 0;if(l===n||l===i)c=3;else if(l===t||l===a||l===o)c=6;else{if(l!=s)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");c=8}e=parseFloat(e),d((e=Number.isInteger(e/r[l].precision)?e/r[l].precision+" "+r[l].symbol:(e/r[l].precision).toFixed(c)+" "+r[l].symbol).toString())},Precise:function(e,n,t){t(e=(e=parseFloat(e))/r[n].precision+" "+r[n].symbol)},BlocksToDays:function(e,n){n((e=6*e/86400).toString())},ErasToDays:function(e,r,l){var d=void 0;if(l===n||l===i||l==o)d=1;else{if(l!==t&&l!==a&&l!=s)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");d=4}r((e/=d).toString())},Percentage:function(e,n){n((e/=1e7).toString())},PermillToPercent:function(e,n){n((e/=1e4).toString())},ArrayLength:function(e,n){n((e=e.split(",").length).toString())}}},46966:(e,n,t)=>{"use strict";t.d(n,{A:()=>a});const a=t.p+"assets/images/JS-UI-bond-7bdecad8831f3c1b20d96e426e7e47c1.png"},83402:(e,n,t)=>{"use strict";t.d(n,{A:()=>a});const a=t.p+"assets/images/JS-UI-sign-transaction-75b2e29fcaecc44c5eb1c4f5e3e364ae.png"},72563:(e,n,t)=>{"use strict";t.d(n,{A:()=>a});const a=t.p+"assets/images/polkadot-dashboard-staking-4005504ef30291ebe1a243298c351a34.png"},83517:(e,n,t)=>{"use strict";t.d(n,{A:()=>a});const a=t.p+"assets/images/polkadot-dashboard-telemetry-8930bdd60309c864ed682a1bdd4b1e31.png"},47526:(e,n,t)=>{"use strict";t.d(n,{A:()=>a});const a=t.p+"assets/images/polkadot-dashboard-validate-1-4bf6a6488b4e128d12cab2617025d796.png"},28733:(e,n,t)=>{"use strict";t.d(n,{A:()=>a});const a=t.p+"assets/images/polkadot-dashboard-validate-2-18a8869804f89ffebafa1b920e31ccd6.png"},3106:(e,n,t)=>{"use strict";t.d(n,{A:()=>a});const a=t.p+"assets/images/polkadot-explorer-rotatekeys-rpc-6d5ba5d9ffb20fd9683432e9a6ccd0f9.jpg"},39664:(e,n,t)=>{"use strict";t.d(n,{A:()=>a});const a=t.p+"assets/images/polkadot-zero-peer-2642d52b7e07893a66a0ddfd492cce38.jpg"},83215:(e,n,t)=>{"use strict";t.d(n,{A:()=>a});const a=t.p+"assets/images/set-session-key-1-b0cdb38a299d6ef6bcc24c6ab2bce66d.png"},61748:(e,n,t)=>{"use strict";t.d(n,{A:()=>a});const a=t.p+"assets/images/set-session-key-2-408efe22daa8d6533715987a1099828a.png"},47790:()=>{}}]); \ No newline at end of file diff --git a/assets/js/a7b37b86.a05657d0.js b/assets/js/a7b37b86.a05657d0.js new file mode 100644 index 000000000000..0f02534937cf --- /dev/null +++ b/assets/js/a7b37b86.a05657d0.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1447],{10958:(e,o,t)=>{t.r(o),t.d(o,{assets:()=>l,contentTitle:()=>i,default:()=>h,frontMatter:()=>r,metadata:()=>s,toc:()=>c});const s=JSON.parse('{"id":"general/scams","title":"How to Protect Yourself from Scams","description":"How to Protect yourself against Scams.","source":"@site/../docs/general/scams.md","sourceDirName":"general","slug":"/learn-scams","permalink":"/docs/learn-scams","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/scams.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1727682132000,"frontMatter":{"id":"scams","title":"How to Protect Yourself from Scams","sidebar_label":"Scam Protection","description":"How to Protect yourself against Scams.","keywords":["scams","protect","official"],"slug":"../learn-scams"},"sidebar":"docs","previous":{"title":"Do Your Own Research","permalink":"/docs/how-to-dyor"},"next":{"title":"Transaction Verification","permalink":"/docs/transaction-attacks"}}');var n=t(74848),a=t(28453);const r={id:"scams",title:"How to Protect Yourself from Scams",sidebar_label:"Scam Protection",description:"How to Protect yourself against Scams.",keywords:["scams","protect","official"],slug:"../learn-scams"},i=void 0,l={},c=[{value:"DISCLAIMER: Key Security",id:"disclaimer-key-security",level:2},{value:"Essential Rules",id:"essential-rules",level:2},{value:"Some Common Types of Scams",id:"some-common-types-of-scams",level:3},{value:"Admins will never contact you directly",id:"admins-will-never-contact-you-directly",level:3},{value:"Keep your data secure",id:"keep-your-data-secure",level:3},{value:"Always check the source",id:"always-check-the-source",level:3},{value:"Check twice before sending DOT/KSM",id:"check-twice-before-sending-dotksm",level:3},{value:"Install the Polkadot-JS extension",id:"install-the-polkadot-js-extension",level:3},{value:"Our official sites",id:"our-official-sites",level:3},{value:"I Got Scammed - What Can I Do?",id:"i-got-scammed---what-can-i-do",level:2}];function d(e){const o={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,a.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(o.p,{children:["Scams and hacks are an unfortunate reality of the crypto industry. It's important to stay alert and\nprotect yourself and your non-refundable crypto assets from scammers and hackers. If you ever feel\nyou have been the target of such an attempt or are currently targeted, please contact\n",(0,n.jsx)(o.a,{href:"https://support.polkadot.network",children:"Polkadot Support"}),"."]}),"\n",(0,n.jsx)(o.h2,{id:"disclaimer-key-security",children:"DISCLAIMER: Key Security"}),"\n",(0,n.jsx)(o.p,{children:"One of the most attractive targets for malicious actors are your wallet secret seeds or the\noptionally exported backup JSON file. Keep them offline in a secure and private location. If you\nshare these with anyone, they can access your account and execute any transaction."}),"\n",(0,n.jsx)("div",{className:"row",children:(0,n.jsxs)("div",{className:"col text--center",children:[(0,n.jsx)("a",{href:"https://www.youtube.com/watch?v=ARsdXZycJAg",children:(0,n.jsx)("img",{src:"https://img.youtube.com/vi/ARsdXZycJAg/0.jpg",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,n.jsx)("p",{children:(0,n.jsx)("a",{href:"https://www.youtube.com/watch?v=ARsdXZycJAg",children:"Stay Safe in Polkadot"})})]})}),"\n",(0,n.jsx)(o.admonition,{type:"info",children:(0,n.jsxs)(o.p,{children:["Visit\n",(0,n.jsx)(o.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181874-how-to-store-your-mnemonic-phrase-and-backup-file-safely",children:"this support article"}),"\nfor more information about key security."]})}),"\n",(0,n.jsx)(o.h2,{id:"essential-rules",children:"Essential Rules"}),"\n",(0,n.jsxs)(o.ol,{children:["\n",(0,n.jsx)(o.li,{children:"Never ever share your seed phrase or backup JSON file with anyone. If you do that, you hand over\nall your funds, so don\u2019t do it!"}),"\n",(0,n.jsx)(o.li,{children:"Be careful with extensions/applications and typing in recovery seeds or importing backup JSON\nfiles in there, they could be malicious or pretend to be a well-known wallet."}),"\n",(0,n.jsx)(o.li,{children:"Do not trust anyone online. Malicious actors often pretend to be someone else to gain your trust."}),"\n",(0,n.jsxs)(o.li,{children:[(0,n.jsx)(o.a,{href:"#i-got-scammed---what-can-i-do",children:"If you are scammed"}),", there is likely ",(0,n.jsx)(o.strong,{children:"nothing that can be\ndone"})," to recover your funds. If a scammer gets a hold of your seed phrase, they can transfer all\nyour funds to their account in seconds."]}),"\n",(0,n.jsx)(o.li,{children:"If it sounds too good to be true, it probably is. People, especially celebrities, do not give\naway crypto for free. Even if they wanted to, they could just ask for your address as opposed to\nhaving you send them tokens."}),"\n",(0,n.jsx)(o.li,{children:"Scams are absolutely rife in this space. It is easy and cheap to set a scam up, and hard to shut\none down. Therefore, the user must be diligent to avoid such scams."}),"\n",(0,n.jsxs)(o.li,{children:["If you can, always try to verify new information that you see through an official source, such as\n",(0,n.jsx)(o.a,{href:"/docs/community",children:"Polkadot network's official blog"})," or\n",(0,n.jsx)(o.a,{href:"https://support.polkadot.network",children:"Polkadot's Official Support"}),". Often, scammers will fake a\nwebsites or blog posts, but if you validate such information through a secondary source, you will\nreduce the chances of being scammed."]}),"\n"]}),"\n",(0,n.jsx)(o.h3,{id:"some-common-types-of-scams",children:"Some Common Types of Scams"}),"\n",(0,n.jsxs)(o.ul,{children:["\n",(0,n.jsx)(o.li,{children:"Private messages sent to you over Telegram, X/Twitter, Discord, and other social media - admins or\nemployees will never contact you."}),"\n",(0,n.jsx)(o.li,{children:'"Giveaways" advertising that you "send us some DOT/KSM, we\'ll send you double back".'}),"\n",(0,n.jsx)(o.li,{children:'Sites where you must enter your seed phrase to "sync" your account, claim tokens, unblock\ntransactions, etc.'}),"\n",(0,n.jsx)(o.li,{children:"Emails asking for DOT/KSM private keys/seeds/etc., posing as a member of any of our teams."}),"\n",(0,n.jsx)(o.li,{children:'Scammers will take official videos and add "giveaway" text around them to look like Polkadot,\nKusama, Web3 Foundation, Parity, or another well-known entity supporting the giveaway.'}),"\n",(0,n.jsx)(o.li,{children:"Many scammers will create nearly perfect imitations of sites - always triple-check the URL."}),"\n",(0,n.jsx)(o.li,{children:"People are offering to help you stake or get rewards."}),"\n",(0,n.jsx)(o.li,{children:"People responding to publicly asked questions in a private chat."}),"\n",(0,n.jsx)(o.li,{children:"Advertisements pointing to imitations of sites asking you to enter your seed words."}),"\n"]}),"\n",(0,n.jsx)(o.p,{children:'These are just some of the types of scams. Scammers are inventing new ones all the time. In general,\ndo not trust anyone messaging you that you did not message yourself, and be wary of anyone\nattempting to help you or offer you a "deal".'}),"\n",(0,n.jsxs)(o.p,{children:["Scammers will often imitate the usernames, profile pictures, etc., of well-known members of the\ncommunity. Often the differences in these accounts will be minor, such as ",(0,n.jsx)(o.code,{children:"joe_sm1th"})," or ",(0,n.jsx)(o.code,{children:"jo_smith"}),"\ninstead of ",(0,n.jsx)(o.code,{children:"joe_smith"}),". Sometimes, the display name will be identical if uniqueness is not enforced;\ncheck over a 2nd (ideally verifiable) communication channel to be sure you are talking to the right\nperson."]}),"\n",(0,n.jsx)(o.p,{children:'Scammers often make it seem like the "deal" is only available for a limited time. Do not be tricked\nby this, it is always better to confirm than to risk losing everything.'}),"\n",(0,n.jsx)(o.h3,{id:"admins-will-never-contact-you-directly",children:"Admins will never contact you directly"}),"\n",(0,n.jsxs)(o.p,{children:['If you received a message from an admin over Telegram, ignore it. Our team members will never\npersonally message you. Our social media accounts are posted on our website, and our team will\nannounce any new ones. We will never offer to sell you DOT at a discount, air-drop "rewards", or\nmessage you privately to help with a problem you posted publicly. Our social media and community\npages can be found ',(0,n.jsx)(o.a,{href:"/docs/community",children:"here"}),"."]}),"\n",(0,n.jsx)(o.h3,{id:"keep-your-data-secure",children:"Keep your data secure"}),"\n",(0,n.jsxs)(o.p,{children:["You should ",(0,n.jsx)(o.em,{children:"never"})," share your seed phrase, passwords, private keys, or any other personal data with\nanyone. If you are concerned a wallet could be fake, please check out our list of well-known\n",(0,n.jsx)(o.a,{href:"./wallets",children:"wallets"}),"."]}),"\n",(0,n.jsx)(o.p,{children:"Some simple things that you can do to keep your assets and information secure from hackers:"}),"\n",(0,n.jsxs)(o.ul,{children:["\n",(0,n.jsx)(o.li,{children:"Keep your seed phrase only on paper, in a secret and secure location."}),"\n",(0,n.jsx)(o.li,{children:"DO NOT keep your seed phrase on any electronic medium connected to the internet, e.g., cloud\nservices, password managers, your daily computer, etc."}),"\n",(0,n.jsx)(o.li,{children:"Never enter your seed or mnemonic phrase directly into a website."}),"\n",(0,n.jsx)(o.li,{children:"Your seed phrase is a backup in case you lose access to your wallet. Use it only for that purpose\nand only in wallets you've used before and trust."}),"\n",(0,n.jsxs)(o.li,{children:["Your passwords should be strong and unique. It is recommended that you use a\n",(0,n.jsx)(o.a,{href:"https://www.howtogeek.com/141500/why-you-should-use-a-password-manager-and-how-to-get-started/",children:"password manager app"}),"\nto create and store your passwords. Use fido2 (hardware dongles) for best security, not google\nauthenticator/OTP."]}),"\n",(0,n.jsx)(o.li,{children:"Keep your computer free of malware. Although an antivirus can be of great help, it's not a\npanacea. Safe browsing and downloading is the only way to be sure your computer is clean. Beware\nof unvetted (not security-scanned) software, such as extensions, 3rd party software, and\nregistries/repositories that come in many forms and shapes."}),"\n",(0,n.jsxs)(o.li,{children:["Store your assets in cold storage, like a hardware wallet or\n",(0,n.jsx)(o.a,{href:"/docs/polkadot-vault",children:"Polkadot Vault"}),"."]}),"\n"]}),"\n",(0,n.jsx)(o.h3,{id:"always-check-the-source",children:"Always check the source"}),"\n",(0,n.jsxs)(o.p,{children:["For any potential scam, always do a background check on the source, i.e., look at any username,\nemail, YouTube channel name, URL, etc. If something seems fishy, that's because it likely is. Never\nenter any personal data if you feel the source could be a scam. Feel free to check with\n",(0,n.jsx)(o.a,{href:"https://support.polkadot.network",children:"Polkadot's official support"}),"."]}),"\n",(0,n.jsx)(o.h3,{id:"check-twice-before-sending-dotksm",children:"Check twice before sending DOT/KSM"}),"\n",(0,n.jsx)(o.p,{children:"A good practice to consider is to verify the address to which you are sending crypto. You shouldn't\nbe sending your assets to an account you do not know or are not familiar with. Crypto is a\ndecentralized space with no room for errors."}),"\n",(0,n.jsx)(o.h3,{id:"install-the-polkadot-js-extension",children:"Install the Polkadot-JS extension"}),"\n",(0,n.jsxs)(o.p,{children:["The extension uses crowd-sourced ",(0,n.jsx)(o.a,{href:"https://polkadot.js.org/phishing/",children:"anti-phishing measures"})," to\nautomatically prevent your browser from displaying known phishing or scam sites. They will be\nblocked upon loading, helping to prevent you from visiting these sites and thus falling for them."]}),"\n",(0,n.jsx)(o.h3,{id:"our-official-sites",children:"Our official sites"}),"\n",(0,n.jsx)(o.p,{children:"You can use the following list of our official domains to make sure that you're visiting an official\nsite:"}),"\n",(0,n.jsxs)(o.ul,{children:["\n",(0,n.jsx)(o.li,{children:(0,n.jsx)(o.a,{href:"https://polkadot.com",children:"https://polkadot.com"})}),"\n",(0,n.jsx)(o.li,{children:(0,n.jsx)(o.a,{href:"https://polkadot.network",children:"https://polkadot.network"})}),"\n",(0,n.jsx)(o.li,{children:(0,n.jsx)(o.a,{href:"https://polkadot.io",children:"https://polkadot.io"})}),"\n",(0,n.jsx)(o.li,{children:(0,n.jsx)(o.a,{href:"https://kusama.network",children:"https://kusama.network"})}),"\n",(0,n.jsx)(o.li,{children:(0,n.jsx)(o.a,{href:"https://web3.foundation",children:"https://web3.foundation"})}),"\n",(0,n.jsx)(o.li,{children:(0,n.jsx)(o.a,{href:"https://parity.io",children:"https://parity.io"})}),"\n",(0,n.jsx)(o.li,{children:(0,n.jsx)(o.a,{href:"https://substrate.io",children:"https://substrate.io"})}),"\n"]}),"\n",(0,n.jsx)(o.p,{children:"Of course, many projects building on Polkadot and Kusama use similar names. If, however, a site\nposes as Polkadot, Kusama, Web3 Foundation, or Parity on a domain not listed above, then it's most\nlikely a scam."}),"\n",(0,n.jsxs)(o.p,{children:["Besides those, there are also ",(0,n.jsx)(o.code,{children:"polkadot.js.org"})," and ",(0,n.jsx)(o.code,{children:"dotapps.io"})," that host our web wallet and other\ntools."]}),"\n",(0,n.jsx)(o.h2,{id:"i-got-scammed---what-can-i-do",children:"I Got Scammed - What Can I Do?"}),"\n",(0,n.jsxs)(o.p,{children:["In the unfortunate case of having fallen for a scam, nothing can likely be done to recover your\nfunds. However, you can still receive help and support. The Polkadot Support Team stands ready to\nhelp you in this difficult situation. Please check this\n",(0,n.jsx)(o.a,{href:"https://support.polkadot.network/support/solutions/articles/65000182668-what-to-do-if-you-fell-victim-to-scam-or-hack",children:"Support Article"}),"\nfor steps you should take to ",(0,n.jsx)(o.strong,{children:"prevent further loss"})," and contact Polkadot Support from the same\npage."]})]})}function h(e={}){const{wrapper:o}={...(0,a.R)(),...e.components};return o?(0,n.jsx)(o,{...e,children:(0,n.jsx)(d,{...e})}):d(e)}},28453:(e,o,t)=>{t.d(o,{R:()=>r,x:()=>i});var s=t(96540);const n={},a=s.createContext(n);function r(e){const o=s.useContext(a);return s.useMemo((function(){return"function"==typeof e?e(o):{...o,...e}}),[o,e])}function i(e){let o;return o=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:r(e.components),s.createElement(a.Provider,{value:o},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/a7b37b86.d3823891.js b/assets/js/a7b37b86.d3823891.js deleted file mode 100644 index 895aaa3322aa..000000000000 --- a/assets/js/a7b37b86.d3823891.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1447],{48999:(e,o,t)=>{t.r(o),t.d(o,{assets:()=>l,contentTitle:()=>r,default:()=>h,frontMatter:()=>a,metadata:()=>i,toc:()=>c});var s=t(74848),n=t(28453);const a={id:"scams",title:"How to Protect Yourself from Scams",sidebar_label:"Scam Protection",description:"How to Protect yourself against Scams.",keywords:["scams","protect","official"],slug:"../learn-scams"},r=void 0,i={id:"general/scams",title:"How to Protect Yourself from Scams",description:"How to Protect yourself against Scams.",source:"@site/../docs/general/scams.md",sourceDirName:"general",slug:"/learn-scams",permalink:"/docs/learn-scams",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/scams.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1727682132e3,frontMatter:{id:"scams",title:"How to Protect Yourself from Scams",sidebar_label:"Scam Protection",description:"How to Protect yourself against Scams.",keywords:["scams","protect","official"],slug:"../learn-scams"},sidebar:"docs",previous:{title:"Do Your Own Research",permalink:"/docs/how-to-dyor"},next:{title:"Transaction Verification",permalink:"/docs/transaction-attacks"}},l={},c=[{value:"DISCLAIMER: Key Security",id:"disclaimer-key-security",level:2},{value:"Essential Rules",id:"essential-rules",level:2},{value:"Some Common Types of Scams",id:"some-common-types-of-scams",level:3},{value:"Admins will never contact you directly",id:"admins-will-never-contact-you-directly",level:3},{value:"Keep your data secure",id:"keep-your-data-secure",level:3},{value:"Always check the source",id:"always-check-the-source",level:3},{value:"Check twice before sending DOT/KSM",id:"check-twice-before-sending-dotksm",level:3},{value:"Install the Polkadot-JS extension",id:"install-the-polkadot-js-extension",level:3},{value:"Our official sites",id:"our-official-sites",level:3},{value:"I Got Scammed - What Can I Do?",id:"i-got-scammed---what-can-i-do",level:2}];function d(e){const o={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,n.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(o.p,{children:["Scams and hacks are an unfortunate reality of the crypto industry. It's important to stay alert and\nprotect yourself and your non-refundable crypto assets from scammers and hackers. If you ever feel\nyou have been the target of such an attempt or are currently targeted, please contact\n",(0,s.jsx)(o.a,{href:"https://support.polkadot.network",children:"Polkadot Support"}),"."]}),"\n",(0,s.jsx)(o.h2,{id:"disclaimer-key-security",children:"DISCLAIMER: Key Security"}),"\n",(0,s.jsx)(o.p,{children:"One of the most attractive targets for malicious actors are your wallet secret seeds or the\noptionally exported backup JSON file. Keep them offline in a secure and private location. If you\nshare these with anyone, they can access your account and execute any transaction."}),"\n",(0,s.jsx)("div",{className:"row",children:(0,s.jsxs)("div",{className:"col text--center",children:[(0,s.jsx)("a",{href:"https://www.youtube.com/watch?v=ARsdXZycJAg",children:(0,s.jsx)("img",{src:"https://img.youtube.com/vi/ARsdXZycJAg/0.jpg",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,s.jsx)("p",{children:(0,s.jsx)("a",{href:"https://www.youtube.com/watch?v=ARsdXZycJAg",children:"Stay Safe in Polkadot"})})]})}),"\n",(0,s.jsx)(o.admonition,{type:"info",children:(0,s.jsxs)(o.p,{children:["Visit\n",(0,s.jsx)(o.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181874-how-to-store-your-mnemonic-phrase-and-backup-file-safely",children:"this support article"}),"\nfor more information about key security."]})}),"\n",(0,s.jsx)(o.h2,{id:"essential-rules",children:"Essential Rules"}),"\n",(0,s.jsxs)(o.ol,{children:["\n",(0,s.jsx)(o.li,{children:"Never ever share your seed phrase or backup JSON file with anyone. If you do that, you hand over\nall your funds, so don\u2019t do it!"}),"\n",(0,s.jsx)(o.li,{children:"Be careful with extensions/applications and typing in recovery seeds or importing backup JSON\nfiles in there, they could be malicious or pretend to be a well-known wallet."}),"\n",(0,s.jsx)(o.li,{children:"Do not trust anyone online. Malicious actors often pretend to be someone else to gain your trust."}),"\n",(0,s.jsxs)(o.li,{children:[(0,s.jsx)(o.a,{href:"#i-got-scammed---what-can-i-do",children:"If you are scammed"}),", there is likely ",(0,s.jsx)(o.strong,{children:"nothing that can be\ndone"})," to recover your funds. If a scammer gets a hold of your seed phrase, they can transfer all\nyour funds to their account in seconds."]}),"\n",(0,s.jsx)(o.li,{children:"If it sounds too good to be true, it probably is. People, especially celebrities, do not give\naway crypto for free. Even if they wanted to, they could just ask for your address as opposed to\nhaving you send them tokens."}),"\n",(0,s.jsx)(o.li,{children:"Scams are absolutely rife in this space. It is easy and cheap to set a scam up, and hard to shut\none down. Therefore, the user must be diligent to avoid such scams."}),"\n",(0,s.jsxs)(o.li,{children:["If you can, always try to verify new information that you see through an official source, such as\n",(0,s.jsx)(o.a,{href:"/docs/community",children:"Polkadot network's official blog"})," or\n",(0,s.jsx)(o.a,{href:"https://support.polkadot.network",children:"Polkadot's Official Support"}),". Often, scammers will fake a\nwebsites or blog posts, but if you validate such information through a secondary source, you will\nreduce the chances of being scammed."]}),"\n"]}),"\n",(0,s.jsx)(o.h3,{id:"some-common-types-of-scams",children:"Some Common Types of Scams"}),"\n",(0,s.jsxs)(o.ul,{children:["\n",(0,s.jsx)(o.li,{children:"Private messages sent to you over Telegram, X/Twitter, Discord, and other social media - admins or\nemployees will never contact you."}),"\n",(0,s.jsx)(o.li,{children:'"Giveaways" advertising that you "send us some DOT/KSM, we\'ll send you double back".'}),"\n",(0,s.jsx)(o.li,{children:'Sites where you must enter your seed phrase to "sync" your account, claim tokens, unblock\ntransactions, etc.'}),"\n",(0,s.jsx)(o.li,{children:"Emails asking for DOT/KSM private keys/seeds/etc., posing as a member of any of our teams."}),"\n",(0,s.jsx)(o.li,{children:'Scammers will take official videos and add "giveaway" text around them to look like Polkadot,\nKusama, Web3 Foundation, Parity, or another well-known entity supporting the giveaway.'}),"\n",(0,s.jsx)(o.li,{children:"Many scammers will create nearly perfect imitations of sites - always triple-check the URL."}),"\n",(0,s.jsx)(o.li,{children:"People are offering to help you stake or get rewards."}),"\n",(0,s.jsx)(o.li,{children:"People responding to publicly asked questions in a private chat."}),"\n",(0,s.jsx)(o.li,{children:"Advertisements pointing to imitations of sites asking you to enter your seed words."}),"\n"]}),"\n",(0,s.jsx)(o.p,{children:'These are just some of the types of scams. Scammers are inventing new ones all the time. In general,\ndo not trust anyone messaging you that you did not message yourself, and be wary of anyone\nattempting to help you or offer you a "deal".'}),"\n",(0,s.jsxs)(o.p,{children:["Scammers will often imitate the usernames, profile pictures, etc., of well-known members of the\ncommunity. Often the differences in these accounts will be minor, such as ",(0,s.jsx)(o.code,{children:"joe_sm1th"})," or ",(0,s.jsx)(o.code,{children:"jo_smith"}),"\ninstead of ",(0,s.jsx)(o.code,{children:"joe_smith"}),". Sometimes, the display name will be identical if uniqueness is not enforced;\ncheck over a 2nd (ideally verifiable) communication channel to be sure you are talking to the right\nperson."]}),"\n",(0,s.jsx)(o.p,{children:'Scammers often make it seem like the "deal" is only available for a limited time. Do not be tricked\nby this, it is always better to confirm than to risk losing everything.'}),"\n",(0,s.jsx)(o.h3,{id:"admins-will-never-contact-you-directly",children:"Admins will never contact you directly"}),"\n",(0,s.jsxs)(o.p,{children:['If you received a message from an admin over Telegram, ignore it. Our team members will never\npersonally message you. Our social media accounts are posted on our website, and our team will\nannounce any new ones. We will never offer to sell you DOT at a discount, air-drop "rewards", or\nmessage you privately to help with a problem you posted publicly. Our social media and community\npages can be found ',(0,s.jsx)(o.a,{href:"/docs/community",children:"here"}),"."]}),"\n",(0,s.jsx)(o.h3,{id:"keep-your-data-secure",children:"Keep your data secure"}),"\n",(0,s.jsxs)(o.p,{children:["You should ",(0,s.jsx)(o.em,{children:"never"})," share your seed phrase, passwords, private keys, or any other personal data with\nanyone. If you are concerned a wallet could be fake, please check out our list of well-known\n",(0,s.jsx)(o.a,{href:"./wallets",children:"wallets"}),"."]}),"\n",(0,s.jsx)(o.p,{children:"Some simple things that you can do to keep your assets and information secure from hackers:"}),"\n",(0,s.jsxs)(o.ul,{children:["\n",(0,s.jsx)(o.li,{children:"Keep your seed phrase only on paper, in a secret and secure location."}),"\n",(0,s.jsx)(o.li,{children:"DO NOT keep your seed phrase on any electronic medium connected to the internet, e.g., cloud\nservices, password managers, your daily computer, etc."}),"\n",(0,s.jsx)(o.li,{children:"Never enter your seed or mnemonic phrase directly into a website."}),"\n",(0,s.jsx)(o.li,{children:"Your seed phrase is a backup in case you lose access to your wallet. Use it only for that purpose\nand only in wallets you've used before and trust."}),"\n",(0,s.jsxs)(o.li,{children:["Your passwords should be strong and unique. It is recommended that you use a\n",(0,s.jsx)(o.a,{href:"https://www.howtogeek.com/141500/why-you-should-use-a-password-manager-and-how-to-get-started/",children:"password manager app"}),"\nto create and store your passwords. Use fido2 (hardware dongles) for best security, not google\nauthenticator/OTP."]}),"\n",(0,s.jsx)(o.li,{children:"Keep your computer free of malware. Although an antivirus can be of great help, it's not a\npanacea. Safe browsing and downloading is the only way to be sure your computer is clean. Beware\nof unvetted (not security-scanned) software, such as extensions, 3rd party software, and\nregistries/repositories that come in many forms and shapes."}),"\n",(0,s.jsxs)(o.li,{children:["Store your assets in cold storage, like a hardware wallet or\n",(0,s.jsx)(o.a,{href:"/docs/polkadot-vault",children:"Polkadot Vault"}),"."]}),"\n"]}),"\n",(0,s.jsx)(o.h3,{id:"always-check-the-source",children:"Always check the source"}),"\n",(0,s.jsxs)(o.p,{children:["For any potential scam, always do a background check on the source, i.e., look at any username,\nemail, YouTube channel name, URL, etc. If something seems fishy, that's because it likely is. Never\nenter any personal data if you feel the source could be a scam. Feel free to check with\n",(0,s.jsx)(o.a,{href:"https://support.polkadot.network",children:"Polkadot's official support"}),"."]}),"\n",(0,s.jsx)(o.h3,{id:"check-twice-before-sending-dotksm",children:"Check twice before sending DOT/KSM"}),"\n",(0,s.jsx)(o.p,{children:"A good practice to consider is to verify the address to which you are sending crypto. You shouldn't\nbe sending your assets to an account you do not know or are not familiar with. Crypto is a\ndecentralized space with no room for errors."}),"\n",(0,s.jsx)(o.h3,{id:"install-the-polkadot-js-extension",children:"Install the Polkadot-JS extension"}),"\n",(0,s.jsxs)(o.p,{children:["The extension uses crowd-sourced ",(0,s.jsx)(o.a,{href:"https://polkadot.js.org/phishing/",children:"anti-phishing measures"})," to\nautomatically prevent your browser from displaying known phishing or scam sites. They will be\nblocked upon loading, helping to prevent you from visiting these sites and thus falling for them."]}),"\n",(0,s.jsx)(o.h3,{id:"our-official-sites",children:"Our official sites"}),"\n",(0,s.jsx)(o.p,{children:"You can use the following list of our official domains to make sure that you're visiting an official\nsite:"}),"\n",(0,s.jsxs)(o.ul,{children:["\n",(0,s.jsx)(o.li,{children:(0,s.jsx)(o.a,{href:"https://polkadot.com",children:"https://polkadot.com"})}),"\n",(0,s.jsx)(o.li,{children:(0,s.jsx)(o.a,{href:"https://polkadot.network",children:"https://polkadot.network"})}),"\n",(0,s.jsx)(o.li,{children:(0,s.jsx)(o.a,{href:"https://polkadot.io",children:"https://polkadot.io"})}),"\n",(0,s.jsx)(o.li,{children:(0,s.jsx)(o.a,{href:"https://kusama.network",children:"https://kusama.network"})}),"\n",(0,s.jsx)(o.li,{children:(0,s.jsx)(o.a,{href:"https://web3.foundation",children:"https://web3.foundation"})}),"\n",(0,s.jsx)(o.li,{children:(0,s.jsx)(o.a,{href:"https://parity.io",children:"https://parity.io"})}),"\n",(0,s.jsx)(o.li,{children:(0,s.jsx)(o.a,{href:"https://substrate.io",children:"https://substrate.io"})}),"\n"]}),"\n",(0,s.jsx)(o.p,{children:"Of course, many projects building on Polkadot and Kusama use similar names. If, however, a site\nposes as Polkadot, Kusama, Web3 Foundation, or Parity on a domain not listed above, then it's most\nlikely a scam."}),"\n",(0,s.jsxs)(o.p,{children:["Besides those, there are also ",(0,s.jsx)(o.code,{children:"polkadot.js.org"})," and ",(0,s.jsx)(o.code,{children:"dotapps.io"})," that host our web wallet and other\ntools."]}),"\n",(0,s.jsx)(o.h2,{id:"i-got-scammed---what-can-i-do",children:"I Got Scammed - What Can I Do?"}),"\n",(0,s.jsxs)(o.p,{children:["In the unfortunate case of having fallen for a scam, nothing can likely be done to recover your\nfunds. However, you can still receive help and support. The Polkadot Support Team stands ready to\nhelp you in this difficult situation. Please check this\n",(0,s.jsx)(o.a,{href:"https://support.polkadot.network/support/solutions/articles/65000182668-what-to-do-if-you-fell-victim-to-scam-or-hack",children:"Support Article"}),"\nfor steps you should take to ",(0,s.jsx)(o.strong,{children:"prevent further loss"})," and contact Polkadot Support from the same\npage."]})]})}function h(e={}){const{wrapper:o}={...(0,n.R)(),...e.components};return o?(0,s.jsx)(o,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},28453:(e,o,t)=>{t.d(o,{R:()=>r,x:()=>i});var s=t(96540);const n={},a=s.createContext(n);function r(e){const o=s.useContext(a);return s.useMemo((function(){return"function"==typeof e?e(o):{...o,...e}}),[o,e])}function i(e){let o;return o=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:r(e.components),s.createElement(a.Provider,{value:o},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/a8f54fb1.75ad782a.js b/assets/js/a8f54fb1.75ad782a.js deleted file mode 100644 index f6962308ca79..000000000000 --- a/assets/js/a8f54fb1.75ad782a.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1706],{52280:(e,a,r)=>{r.r(a),r.d(a,{assets:()=>d,contentTitle:()=>o,default:()=>c,frontMatter:()=>s,metadata:()=>i,toc:()=>l});var n=r(74848),t=r(28453);const s={id:"learn-dot-ksm-bridge",title:"Polkadot <> Kusama Bridge",sidebar_label:"DOT <> KSM Bridge",description:"Overview of Polkadot and Kusama Bridge.",keywords:["Bridge","XCM","Bridge Hub"],slug:"../learn-dot-ksm-bridge"},o=void 0,i={id:"learn/learn-dot-ksm-bridge",title:"Polkadot <> Kusama Bridge",description:"Overview of Polkadot and Kusama Bridge.",source:"@site/../docs/learn/learn-DOT-KSM-bridge.md",sourceDirName:"learn",slug:"/learn-dot-ksm-bridge",permalink:"/docs/learn-dot-ksm-bridge",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-DOT-KSM-bridge.md",tags:[],version:"current",lastUpdatedBy:"Radha",lastUpdatedAt:1712756939e3,frontMatter:{id:"learn-dot-ksm-bridge",title:"Polkadot <> Kusama Bridge",sidebar_label:"DOT <> KSM Bridge",description:"Overview of Polkadot and Kusama Bridge.",keywords:["Bridge","XCM","Bridge Hub"],slug:"../learn-dot-ksm-bridge"},sidebar:"docs",previous:{title:"Hyperbridge",permalink:"/docs/learn-hyperbridge"},next:{title:"Cross Consensus Messaging (XCM)",permalink:"/docs/learn-xcm-index"}},d={},l=[{value:"Polkadot and Kusama Bridge Relayers",id:"polkadot-and-kusama-bridge-relayers",level:2},{value:"Run a Polkadot and Kusama Bridge Relayer",id:"run-a-polkadot-and-kusama-bridge-relayer",level:3},{value:"Relayer Rewards",id:"relayer-rewards",level:3}];function h(e){const a={a:"a",admonition:"admonition",h2:"h2",h3:"h3",li:"li",p:"p",ul:"ul",...(0,t.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(a.p,{children:["Both Polkadot and Kusama blockchain networks achieve finality through GRANDPA consensus, which\nenables trustless bridging of both the networks through their respective Bridge Hubs. Polkadot\nBridge Hub runs a ",(0,n.jsx)(a.a,{href:"https://polkadot.polkassembly.io/referenda/545",children:"light client of Kusama network"}),"\nand Kusama Bridge Hub runs a\n",(0,n.jsx)(a.a,{href:"https://kusama.polkassembly.io/referenda/354",children:"light client of Polkadot network"}),", which were both\nenabled through their respective OpenGov referenda. This trustless bridge allows Polkadot Asset Hub\nto bridge in wrapped KSM tokens and Kusama Asset Hub to bridge in wrapped DOT tokens, thus making\nDOT available to all Kusama parachains and KSM to all Polkadot parachains."]}),"\n",(0,n.jsx)(a.admonition,{title:"Transferring Assets between Polkadot and Kusama",type:"info",children:(0,n.jsxs)(a.p,{children:["The user guides for transferring assets between Polkadot and Kusama are available\n",(0,n.jsx)(a.a,{href:"/docs/learn-guides-dot-ksm-bridge",children:"here"}),"."]})}),"\n",(0,n.jsx)(a.h2,{id:"polkadot-and-kusama-bridge-relayers",children:"Polkadot and Kusama Bridge Relayers"}),"\n",(0,n.jsx)(a.p,{children:"The job of the relayers is to relay Kusama/Polkadot GRANDPA justifications to the bridge hubs on one\nside to the other. They also relay finalized Kusama Bridge Hub and Polkadot Bridge Hub block\nheaders. They operate only when messages are queued at the bridge hubs. When there are no messages\nqueued, the relayers stay idle."}),"\n",(0,n.jsx)(a.h3,{id:"run-a-polkadot-and-kusama-bridge-relayer",children:"Run a Polkadot and Kusama Bridge Relayer"}),"\n",(0,n.jsxs)(a.p,{children:["Anyone can start running a relayer for the Polkadot < > Kusama Bridge. For instructions, check\n",(0,n.jsx)(a.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/master/bridges/docs/running-relayer.md",children:"the relayer docs on Polkadot-SDK repository"}),".\nOf course, running relayer has costs involved. Apart from paying for the CPU and network, the\nrelayer pays for transactions at both sides of the bridge."]}),"\n",(0,n.jsx)(a.h3,{id:"relayer-rewards",children:"Relayer Rewards"}),"\n",(0,n.jsx)(a.admonition,{title:"Relayer Incentive Mechanism - Work in Progress",type:"caution",children:(0,n.jsx)(a.p,{children:"The initial bridge design supports any number of relayers, but there's no guaranteed reward for each\nand every relayer submitting valid bridge transactions. Also, these rewards are distributed from the\naccounts controlled by the respective relay chain's governance. Hence, any delays in replenishing\nthe funds on these accounts will result in not receiving any rewards."})}),"\n",(0,n.jsx)(a.p,{children:"Rewards paid to relayer has two parts - static and dynamic. The static part of the reward is set\nthrough the on-chain governance. It requires the relayer to deliver a preset number of valid\nmessages to earn a preset number of DOT or KSM. The other reward part is dynamic, which involves\ndelivering an XCM message from one BridgeHub to another. The relayer needs to submit transactions on\nboth the bridge hubs, where each transaction has its cost, which can be:"}),"\n",(0,n.jsxs)(a.ul,{children:["\n",(0,n.jsx)(a.li,{children:"dynamic, because message size can change and/or fee factor of the target chain may change."}),"\n",(0,n.jsx)(a.li,{children:"significant, because the bridge transactions can be of arbitrary size."}),"\n"]}),"\n",(0,n.jsx)(a.p,{children:"The relayers are compensated for the cost of submitting valid, minimal and useful bridge-related\ntransactions. Valid here means that the transaction doesn't fail. Minimal means that all data within\ntransaction call is actually required for the transaction to succeed. Useful means that all supplied\ndata in transaction is new and yet unknown to the target chain."}),"\n",(0,n.jsx)(a.p,{children:"It is always the sending chain that will be paying for rewards for the relayers. The sending chain\nwill be paying at both ends of the bridge from its sovereign accounts on each Bridge Hub. For\nexample Polkadot Asset Hub (PAH) \u2192 Kusama Asset Hub (KAH) transfer will involve relayers getting\nsome rewards from PAH's sovereign account on Polkadot Bridge Hub (PBH) and some rewards from PAH's\nsovereign account on Kusama Bridge Hub (KBH). It is the responsibility of Polkadot OpenGov to\nreplenish the funds of PAH's sovereign account on both the bridge hubs (PBH and KBH). Similarly, KAH\n\u2192 PAH transfer is rewarded by KAH's sovereign accounts on PBH and KBH, which have to be replenished\nthrough Kusama OpenGov."}),"\n",(0,n.jsxs)(a.p,{children:["For more information on relayer rewards, check the\n",(0,n.jsx)(a.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/master/bridges/docs/running-relayer.md#a-brief-introduction-into-relayers-and-our-compensations-scheme",children:"relayers compensation scheme section"}),"\non the relayer docs on the Polkadot-SDK repository."]})]})}function c(e={}){const{wrapper:a}={...(0,t.R)(),...e.components};return a?(0,n.jsx)(a,{...e,children:(0,n.jsx)(h,{...e})}):h(e)}},28453:(e,a,r)=>{r.d(a,{R:()=>o,x:()=>i});var n=r(96540);const t={},s=n.createContext(t);function o(e){const a=n.useContext(s);return n.useMemo((function(){return"function"==typeof e?e(a):{...a,...e}}),[a,e])}function i(e){let a;return a=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:o(e.components),n.createElement(s.Provider,{value:a},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/a8f54fb1.d5e1c786.js b/assets/js/a8f54fb1.d5e1c786.js new file mode 100644 index 000000000000..fb10ba89d38b --- /dev/null +++ b/assets/js/a8f54fb1.d5e1c786.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1706],{37672:(e,a,r)=>{r.r(a),r.d(a,{assets:()=>d,contentTitle:()=>i,default:()=>c,frontMatter:()=>o,metadata:()=>n,toc:()=>l});const n=JSON.parse('{"id":"learn/learn-dot-ksm-bridge","title":"Polkadot <> Kusama Bridge","description":"Overview of Polkadot and Kusama Bridge.","source":"@site/../docs/learn/learn-DOT-KSM-bridge.md","sourceDirName":"learn","slug":"/learn-dot-ksm-bridge","permalink":"/docs/learn-dot-ksm-bridge","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-DOT-KSM-bridge.md","tags":[],"version":"current","lastUpdatedBy":"Radha","lastUpdatedAt":1712756939000,"frontMatter":{"id":"learn-dot-ksm-bridge","title":"Polkadot <> Kusama Bridge","sidebar_label":"DOT <> KSM Bridge","description":"Overview of Polkadot and Kusama Bridge.","keywords":["Bridge","XCM","Bridge Hub"],"slug":"../learn-dot-ksm-bridge"},"sidebar":"docs","previous":{"title":"Hyperbridge","permalink":"/docs/learn-hyperbridge"},"next":{"title":"Cross Consensus Messaging (XCM)","permalink":"/docs/learn-xcm-index"}}');var t=r(74848),s=r(28453);const o={id:"learn-dot-ksm-bridge",title:"Polkadot <> Kusama Bridge",sidebar_label:"DOT <> KSM Bridge",description:"Overview of Polkadot and Kusama Bridge.",keywords:["Bridge","XCM","Bridge Hub"],slug:"../learn-dot-ksm-bridge"},i=void 0,d={},l=[{value:"Polkadot and Kusama Bridge Relayers",id:"polkadot-and-kusama-bridge-relayers",level:2},{value:"Run a Polkadot and Kusama Bridge Relayer",id:"run-a-polkadot-and-kusama-bridge-relayer",level:3},{value:"Relayer Rewards",id:"relayer-rewards",level:3}];function h(e){const a={a:"a",admonition:"admonition",h2:"h2",h3:"h3",li:"li",p:"p",ul:"ul",...(0,s.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(a.p,{children:["Both Polkadot and Kusama blockchain networks achieve finality through GRANDPA consensus, which\nenables trustless bridging of both the networks through their respective Bridge Hubs. Polkadot\nBridge Hub runs a ",(0,t.jsx)(a.a,{href:"https://polkadot.polkassembly.io/referenda/545",children:"light client of Kusama network"}),"\nand Kusama Bridge Hub runs a\n",(0,t.jsx)(a.a,{href:"https://kusama.polkassembly.io/referenda/354",children:"light client of Polkadot network"}),", which were both\nenabled through their respective OpenGov referenda. This trustless bridge allows Polkadot Asset Hub\nto bridge in wrapped KSM tokens and Kusama Asset Hub to bridge in wrapped DOT tokens, thus making\nDOT available to all Kusama parachains and KSM to all Polkadot parachains."]}),"\n",(0,t.jsx)(a.admonition,{title:"Transferring Assets between Polkadot and Kusama",type:"info",children:(0,t.jsxs)(a.p,{children:["The user guides for transferring assets between Polkadot and Kusama are available\n",(0,t.jsx)(a.a,{href:"/docs/learn-guides-dot-ksm-bridge",children:"here"}),"."]})}),"\n",(0,t.jsx)(a.h2,{id:"polkadot-and-kusama-bridge-relayers",children:"Polkadot and Kusama Bridge Relayers"}),"\n",(0,t.jsx)(a.p,{children:"The job of the relayers is to relay Kusama/Polkadot GRANDPA justifications to the bridge hubs on one\nside to the other. They also relay finalized Kusama Bridge Hub and Polkadot Bridge Hub block\nheaders. They operate only when messages are queued at the bridge hubs. When there are no messages\nqueued, the relayers stay idle."}),"\n",(0,t.jsx)(a.h3,{id:"run-a-polkadot-and-kusama-bridge-relayer",children:"Run a Polkadot and Kusama Bridge Relayer"}),"\n",(0,t.jsxs)(a.p,{children:["Anyone can start running a relayer for the Polkadot < > Kusama Bridge. For instructions, check\n",(0,t.jsx)(a.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/master/bridges/docs/running-relayer.md",children:"the relayer docs on Polkadot-SDK repository"}),".\nOf course, running relayer has costs involved. Apart from paying for the CPU and network, the\nrelayer pays for transactions at both sides of the bridge."]}),"\n",(0,t.jsx)(a.h3,{id:"relayer-rewards",children:"Relayer Rewards"}),"\n",(0,t.jsx)(a.admonition,{title:"Relayer Incentive Mechanism - Work in Progress",type:"caution",children:(0,t.jsx)(a.p,{children:"The initial bridge design supports any number of relayers, but there's no guaranteed reward for each\nand every relayer submitting valid bridge transactions. Also, these rewards are distributed from the\naccounts controlled by the respective relay chain's governance. Hence, any delays in replenishing\nthe funds on these accounts will result in not receiving any rewards."})}),"\n",(0,t.jsx)(a.p,{children:"Rewards paid to relayer has two parts - static and dynamic. The static part of the reward is set\nthrough the on-chain governance. It requires the relayer to deliver a preset number of valid\nmessages to earn a preset number of DOT or KSM. The other reward part is dynamic, which involves\ndelivering an XCM message from one BridgeHub to another. The relayer needs to submit transactions on\nboth the bridge hubs, where each transaction has its cost, which can be:"}),"\n",(0,t.jsxs)(a.ul,{children:["\n",(0,t.jsx)(a.li,{children:"dynamic, because message size can change and/or fee factor of the target chain may change."}),"\n",(0,t.jsx)(a.li,{children:"significant, because the bridge transactions can be of arbitrary size."}),"\n"]}),"\n",(0,t.jsx)(a.p,{children:"The relayers are compensated for the cost of submitting valid, minimal and useful bridge-related\ntransactions. Valid here means that the transaction doesn't fail. Minimal means that all data within\ntransaction call is actually required for the transaction to succeed. Useful means that all supplied\ndata in transaction is new and yet unknown to the target chain."}),"\n",(0,t.jsx)(a.p,{children:"It is always the sending chain that will be paying for rewards for the relayers. The sending chain\nwill be paying at both ends of the bridge from its sovereign accounts on each Bridge Hub. For\nexample Polkadot Asset Hub (PAH) \u2192 Kusama Asset Hub (KAH) transfer will involve relayers getting\nsome rewards from PAH's sovereign account on Polkadot Bridge Hub (PBH) and some rewards from PAH's\nsovereign account on Kusama Bridge Hub (KBH). It is the responsibility of Polkadot OpenGov to\nreplenish the funds of PAH's sovereign account on both the bridge hubs (PBH and KBH). Similarly, KAH\n\u2192 PAH transfer is rewarded by KAH's sovereign accounts on PBH and KBH, which have to be replenished\nthrough Kusama OpenGov."}),"\n",(0,t.jsxs)(a.p,{children:["For more information on relayer rewards, check the\n",(0,t.jsx)(a.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/master/bridges/docs/running-relayer.md#a-brief-introduction-into-relayers-and-our-compensations-scheme",children:"relayers compensation scheme section"}),"\non the relayer docs on the Polkadot-SDK repository."]})]})}function c(e={}){const{wrapper:a}={...(0,s.R)(),...e.components};return a?(0,t.jsx)(a,{...e,children:(0,t.jsx)(h,{...e})}):h(e)}},28453:(e,a,r)=>{r.d(a,{R:()=>o,x:()=>i});var n=r(96540);const t={},s=n.createContext(t);function o(e){const a=n.useContext(s);return n.useMemo((function(){return"function"==typeof e?e(a):{...a,...e}}),[a,e])}function i(e){let a;return a=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:o(e.components),n.createElement(s.Provider,{value:a},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/a9f58d5b.3dcad58b.js b/assets/js/a9f58d5b.3dcad58b.js deleted file mode 100644 index 005170a64d1f..000000000000 --- a/assets/js/a9f58d5b.3dcad58b.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5331],{40936:(e,n,a)=>{a.r(n),a.d(n,{assets:()=>l,contentTitle:()=>c,default:()=>h,frontMatter:()=>o,metadata:()=>i,toc:()=>r});var t=a(74848),s=a(28453);const o={id:"learn-account-balances",title:"Account Balances",sidebar_label:"Account Balances",description:"Polkadot and Kusama Network Account Balance Types.",keywords:["Polkadot","Kusama","locks","balance","account"],slug:"../learn-account-balances"},c=void 0,i={id:"learn/learn-account-balances",title:"Account Balances",description:"Polkadot and Kusama Network Account Balance Types.",source:"@site/../docs/learn/learn-account-balances.md",sourceDirName:"learn",slug:"/learn-account-balances",permalink:"/docs/learn-account-balances",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-account-balances.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1726731604e3,frontMatter:{id:"learn-account-balances",title:"Account Balances",sidebar_label:"Account Balances",description:"Polkadot and Kusama Network Account Balance Types.",keywords:["Polkadot","Kusama","locks","balance","account"],slug:"../learn-account-balances"},sidebar:"docs",previous:{title:"Polkadot Accounts",permalink:"/docs/learn-accounts"},next:{title:"Account Abstraction",permalink:"/docs/learn-account-abstraction"}},l={},r=[{value:"Example of Account Balance Types",id:"example-of-account-balance-types",level:2},{value:"Locks",id:"locks",level:2},{value:"Edge Case for Locks",id:"edge-case-for-locks",level:3},{value:"Balance Types on Polkadot-JS",id:"balance-types-on-polkadot-js",level:2}];function d(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.p,{children:"In the Polkadot ecosystem, there are different types of balances depending on the account activity.\nDifferent balance types dictate whether your balance can be used for transfers, to pay fees, or must\nremain frozen and unused due to an on-chain requirement."}),"\n",(0,t.jsx)(n.admonition,{title:"A more efficient distribution of account balance types",type:"info",children:(0,t.jsxs)(n.p,{children:["Soon, pallets on Polkadot SDK will be implementing the ",(0,t.jsx)(n.em,{children:"fungible"})," trait (see\n",(0,t.jsx)(n.a,{href:"https://github.com/paritytech/polkadot-sdk/issues/226",children:"the tracking issue"})," for more info). This new\nlogic will allow for more efficient use of your account balance. Specifically, the\n",(0,t.jsx)(n.a,{href:"https://paritytech.github.io/polkadot-sdk/master/frame_support/traits/tokens/fungible/index.html",children:"fungible trait"}),"\nwill allow using the ",(0,t.jsx)(n.code,{children:"free"})," balance for on-chain activity like setting proxies and identities."]})}),"\n",(0,t.jsx)(n.p,{children:"There are 5 types of account balances:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Free"})," is the balance that can be used for on-chain activity like staking, participating in\ngovernance etc. but is not necessarily spendable (or transferrable)"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Frozen"})," is the free balance locked for ",(0,t.jsx)(n.a,{href:"/docs/learn-staking",children:"staking"}),",\n",(0,t.jsx)(n.a,{href:"/docs/learn-polkadot-opengov",children:"governance"}),", and ",(0,t.jsx)(n.a,{href:"/docs/learn-transactions#vested-transfers",children:"vesting"}),"\n(also called locked balance)"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"On hold"})," is used for ",(0,t.jsx)(n.a,{href:"/docs/learn-identity",children:"identities"}),", ",(0,t.jsx)(n.a,{href:"/docs/learn-proxies",children:"proxies"}),",\n",(0,t.jsx)(n.a,{href:"/docs/learn-guides-polkadot-opengov#claiming-opengov-deposits",children:"OpenGov preimages and deposits"}),",\nand it is no longer free (also called reserved balance)"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Spendable"})," is the free balance that can be spent"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Untouchable"})," is the portion of the free balance that cannot be moved (i.e., not spendable) but\ncan still be used for on-chain activity"]}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"The spendable balance is calculated as follows:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"spendable = free - max(frozen - on_hold, ED)\n"})}),"\n",(0,t.jsxs)(n.p,{children:["where ",(0,t.jsx)(n.code,{children:"free"}),", ",(0,t.jsx)(n.code,{children:"frozen"})," and ",(0,t.jsx)(n.code,{children:"on_hold"})," are defined above. The ",(0,t.jsx)(n.code,{children:"ED"})," is the the\n",(0,t.jsx)(n.a,{href:"/docs/learn-accounts#existential-deposit-and-reaping",children:"existential deposit"}),"."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Wallet providers might show you the spendable, locked, and reserved balance."})}),"\n",(0,t.jsx)(n.h2,{id:"example-of-account-balance-types",children:"Example of Account Balance Types"}),"\n",(0,t.jsxs)(n.p,{children:["Below is an in-depth example of how an account balance composition changes depending on user actions\nonce\n",(0,t.jsxs)(n.a,{href:"https://paritytech.github.io/polkadot-sdk/master/frame_support/traits/tokens/fungible/index.html",children:["the ",(0,t.jsx)(n.em,{children:"fungible"})," trait"]}),"\nis used for account balances. Let\u2019s take, for example, an account with 100 DOT."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"Free: 100 DOT\nFrozen: 0 DOT\nOn hold: 0 DOT\nSpendable: 99 DOT\nUntouchable: 1 DOT (ED)\n"})}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"balance-example-1",src:a(17977).A+"",width:"1627",height:"914"})}),"\n",(0,t.jsx)(n.p,{children:"In this case, the existential deposit of 1 DOT is untouchable (meaning you can\u2019t touch it if the\naccount can\u2019t or shouldn\u2019t get reaped). If 80 DOT from the account is staked, we get the following\nbalance structure:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"Free: 100 DOT\nFrozen : 80 DOT\nOnhold: 0 DOT\nSpendable: 20 DOT\nUntouchable: 80 DOT\n"})}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"balance-example-2",src:a(35042).A+"",width:"1626",height:"913"})}),"\n",(0,t.jsx)(n.p,{children:"The spendable balance would be 20 DOT (which would also include fees for future transactions from\nthis account)."}),"\n",(0,t.jsxs)(n.p,{children:["Note how the account cannot be reaped from the state while it has a frozen balance, or in general\nany ",(0,t.jsx)(n.a,{href:"/docs/learn-guides-accounts#query-account-data-in-polkadot-js",children:"consumer and provider reference"}),".\nThose references determine if an account can be reaped, usually because other accounts depend on the\nexistence of such an account). For example, the existential deposit adds a provider reference simply\nbecause the account exists, while a proxy account adds a consumer reference (the proxy existence\ndepends on the proxied account; the proxy is the consumer). ",(0,t.jsx)(n.strong,{children:"Because the existential deposit is\npart of the untouchable balance, the user can use all the spendable balance (there is no need to\nkeep 1 DOT as spendable)."})]}),"\n",(0,t.jsx)(n.admonition,{type:"info",children:(0,t.jsxs)(n.p,{children:["The use of the ",(0,t.jsx)(n.em,{children:"free"})," balance as shown in the following figures will be possible once the ",(0,t.jsx)(n.em,{children:"fungible"}),"\ntrait is implemented for account balances."]})}),"\n",(0,t.jsxs)(n.p,{children:["If the account creates a proxy, it will use the ",(0,t.jsx)(n.code,{children:"free"})," balance as shown below."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"Free: 80 DOT\nFrozen : 80 DOT\nOnhold: 20 DOT\nSpendable: 20 DOT\nUntouchable: 60 DOT\n"})}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"balance-example-3",src:a(25547).A+"",width:"1627",height:"914"})}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsxs)(n.strong,{children:["Note how, through the fungible trait, the system uses the ",(0,t.jsx)(n.code,{children:"balance"})," that is frozen instead of the\n",(0,t.jsx)(n.code,{children:"free"})," balance that is spendable (present configuration on-chain)."]})," In other words, holds are\nsubtracted from free balance but overlap with the frozen balance. The free portion shrinks from 100\nto 80 DOT, and the ",(0,t.jsx)(n.code,{children:"on_hold"})," portion increases from 0 to 20 DOT. The creation of an identity will\ngrow the ",(0,t.jsx)(n.code,{children:"on_hold"})," portion to 40 DOT, and shrink further the ",(0,t.jsx)(n.code,{children:"free"})," from 80 to 60 DOT. Note how the\nspendable balance stays the same in the process."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"Free: 60 DOT\nFrozen: 80 DOT\nOnhold: 40 DOT\nSpendable: 20 DOT\nUntouchable: 40 DOT\n"})}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"balance-example-4",src:a(75636).A+"",width:"1627",height:"914"})}),"\n",(0,t.jsxs)(n.p,{children:["This update using the fungible trait allows the use of the frozen balance for on-chain activity like\nsetting up proxies and identities. Note that\n",(0,t.jsx)(n.a,{href:"https://github.com/paritytech/substrate/pull/12951",children:"holds are slashable"}),", and the pallet\n",(0,t.jsx)(n.a,{href:"https://github.com/paritytech/polkadot-sdk/issues/226",children:"migrations"})," need to take that into account.\nThis means that freezes should account for hold being slashed (for example, your stash account\nbalance getting reduced because your governance deposit for a proposal was slashed)."]}),"\n",(0,t.jsx)(n.h2,{id:"locks",children:"Locks"}),"\n",(0,t.jsx)(n.p,{children:"Locks are abstractions over an account's free balance, preventing it from being spent. Several locks\ncan overlap on the same account balance instead of being stacked on top of one another. Locks are\nautomatically added onto accounts when the account participates in activities on-chain (staking,\nvoting, etc.), but these are not customizable."}),"\n",(0,t.jsxs)(n.p,{children:["Locks are accounted for within the ",(0,t.jsx)(n.code,{children:"frozen"})," balance of the account. This is the balance that can be\n",(0,t.jsx)(n.code,{children:"free"})," but not transferrable, and locked in ",(0,t.jsx)(n.a,{href:"/docs/learn-staking",children:"staking"}),",\n",(0,t.jsx)(n.a,{href:"/docs/learn-polkadot-opengov",children:"governance"})," and ",(0,t.jsx)(n.a,{href:"/docs/learn-transactions#vested-transfers",children:"vesting"}),"."]}),"\n",(0,t.jsx)(n.p,{children:"Locks overlap (in both amount and duration), and the general rule is that:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"If you have multiple locks of different amounts of tokens, the biggest lock decides the total\namount of locked tokens"}),"\n",(0,t.jsx)(n.li,{children:"If you have multiple locks of the same amount of tokens, the lock with the longest duration\ndecides when those tokens can be unlocked"}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["Let's take, for example, 80 DOT as a ",(0,t.jsx)(n.code,{children:"frozen"})," balance. These 80 DOT are currently used in staking\nand governance as follows:"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"80 DOT Staking (just unbonded) -> lock 28 days"}),"\n",(0,t.jsx)(n.li,{children:"24 DOT OpenGov 1x conviction (referendum just ended, winning side) -> lock 7 days"}),"\n",(0,t.jsx)(n.li,{children:"4 DOT OpenGov 6x conviction (referendum just ended, winning side) -> lock 224 days"}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"locks-example-1",src:a(28361).A+"",width:"1626",height:"913"})}),"\n",(0,t.jsx)(n.p,{children:"The 1 DOT ED is the existential deposit. The locked amount is 80 DOT (not 108 DOT). But those 80 DOT\nwill be available for unlock at different times. You will first need to remove the governance lock\non the 24 DOT after 7 days, then remove the staking lock for the 80 DOT after 28 days, and finally,\nafter 224 days, you will be able to remove the second governance lock."}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"locks-example-2",src:a(63218).A+"",width:"1626",height:"910"})}),"\n",(0,t.jsx)(n.p,{children:"After 224 days, all 80 DOT (- ED) will be free and transferrable."}),"\n",(0,t.jsx)(n.h3,{id:"edge-case-for-locks",children:"Edge Case for Locks"}),"\n",(0,t.jsx)(n.p,{children:"The longest period and the largest amount are considered if you use different convictions while you\nhave ongoing locks."}),"\n",(0,t.jsx)(n.p,{children:"Following the previous example, if you:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"undelegate a 1x conviction delegation of 24 DOT, you will get a 7-day lock on 24 DOT"}),"\n",(0,t.jsx)(n.li,{children:"delegate 4 DOT with 6x conviction"}),"\n",(0,t.jsx)(n.li,{children:"undelegate again before the 1x conviction lock is removed"}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["You will get a 6x conviction for 24 DOT! See\n",(0,t.jsx)(n.a,{href:"https://substrate.stackexchange.com/questions/5067/delegating-and-undelegating-during-the-lock-period-extends-it-for-the-initial-am",children:"here"}),"\nfor more information."]}),"\n",(0,t.jsx)(n.h2,{id:"balance-types-on-polkadot-js",children:"Balance Types on Polkadot-JS"}),"\n",(0,t.jsxs)(n.p,{children:["Below is an example that displays different balance types on the\n",(0,t.jsx)(n.a,{href:"/docs/polkadotjs-ui",children:"Polkadot-JS UI (wallet)"})," of a Kusama account (note that the balance\ntypes are the same for a Polkadot account)."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"account_balance_types",src:a(95572).A+"",width:"1061",height:"291"})}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["The ",(0,t.jsx)(n.strong,{children:"total"})," balance indicates the total number of tokens in the account. Note that this number\ndoes not necessarily correspond to the tokens you can transfer. In the example, the total number\nof tokens is 0.6274 KSM. The ",(0,t.jsx)(n.strong,{children:"transferrable"})," balance indicates the number of free tokens to be\ntransferred. This is calculated by subtracting the number of ",(0,t.jsx)(n.em,{children:"locked"})," and ",(0,t.jsx)(n.em,{children:"reserved"})," tokens from\nthe total number of tokens. Locked funds correspond to tokens used in staking, governance, and\nvested transfers (see below). In the example, the transferrable balance is 0.0106 KSM."]}),"\n",(0,t.jsxs)(n.li,{children:["The ",(0,t.jsx)(n.strong,{children:"vested"})," balance indicates tokens sent to the account and released with a specific time\nschedule. The account owns the tokens, but they are ",(0,t.jsx)(n.em,{children:"locked"})," and become available for transfer\nafter a specific number of blocks. In the example, the vested balance is 0.25 KSM."]}),"\n",(0,t.jsxs)(n.li,{children:["The ",(0,t.jsx)(n.strong,{children:"bonded"})," balance indicates the number of tokens that are ",(0,t.jsx)(n.em,{children:"locked"})," for on-chain participation\nto staking. In the example, the bonded balance is 0.4 KSM."]}),"\n",(0,t.jsxs)(n.li,{children:["The ",(0,t.jsx)(n.strong,{children:"democracy"})," balance indicates the number of tokens that are ",(0,t.jsx)(n.em,{children:"locked"})," for on-chain\nparticipation in democracy (i.e., voting for referenda and council). In the example, the democracy\nbalance is 0.4 KSM."]}),"\n",(0,t.jsxs)(n.li,{children:["The ",(0,t.jsx)(n.strong,{children:"redeemable"})," balance indicates the number of tokens ready to be unlocked to become\ntransferrable again. Those tokens already went through the unbonding period. In this case, the\nredeemable balance is 0.1 KSM."]}),"\n",(0,t.jsxs)(n.li,{children:["The ",(0,t.jsx)(n.strong,{children:"locked"})," balance indicates the number of frozen tokens for on-chain participation to staking\nand democracy or for vested transfers. ",(0,t.jsx)(n.strong,{children:"Locks do not stack"}),", which means that if you have\ndifferent locks, the total locked balance is not the addition of the individual locks. Instead,\n",(0,t.jsx)(n.strong,{children:"the biggest lock decides the total locked balance"}),". In the example, the locked balance is 0.55\nKSM because the biggest lock is on democracy (0.55 KSM)."]}),"\n",(0,t.jsxs)(n.li,{children:["The ",(0,t.jsx)(n.strong,{children:"reserved"}),' balance indicates the number of frozen tokens for on-chain activity other than\nstaking, governance, and vested transfers. Such activity can be setting an identity or a proxy.\nReserved funds are held due to on-chain requirements and can usually be freed by taking some\non-chain action. For example, the "Identity" pallet reserves funds while an on-chain identity is\nregistered, but by clearing the identity, you can unreserve the funds and make them free again.\nThe same applies to proxies. The idea is that those actions require some network memory usage that\nis not given for free. In the example, we created a governance proxy, and the reserved funds for\nthis are 0.0668 KSM.']}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(d,{...e})}):d(e)}},95572:(e,n,a)=>{a.d(n,{A:()=>t});const t=a.p+"assets/images/account-balance-types-95095ee12fb785022e957c5ab975a776.png"},17977:(e,n,a)=>{a.d(n,{A:()=>t});const t=a.p+"assets/images/balance-example-1-1aa56201b9e9874517e8289e7bcc3ccf.png"},35042:(e,n,a)=>{a.d(n,{A:()=>t});const t=a.p+"assets/images/balance-example-2-a1cbaa67dc150ab02b384a50e89e26b7.png"},25547:(e,n,a)=>{a.d(n,{A:()=>t});const t=a.p+"assets/images/balance-example-3-ba1131e3bce279fc6e8e43f73270bdf1.png"},75636:(e,n,a)=>{a.d(n,{A:()=>t});const t=a.p+"assets/images/balance-example-4-6641f43558ab34fb71f0178dba313d42.png"},28361:(e,n,a)=>{a.d(n,{A:()=>t});const t=a.p+"assets/images/locks-example-1-9f0558ffaa8fcfb7d62c7cad3237ff3e.png"},63218:(e,n,a)=>{a.d(n,{A:()=>t});const t=a.p+"assets/images/locks-example-2-226d978e7e9d72777761df8a2b713193.png"},28453:(e,n,a)=>{a.d(n,{R:()=>c,x:()=>i});var t=a(96540);const s={},o=t.createContext(s);function c(e){const n=t.useContext(o);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:c(e.components),t.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/a9f58d5b.a25ef913.js b/assets/js/a9f58d5b.a25ef913.js new file mode 100644 index 000000000000..1adc2444b931 --- /dev/null +++ b/assets/js/a9f58d5b.a25ef913.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5331],{57946:(e,n,a)=>{a.r(n),a.d(n,{assets:()=>l,contentTitle:()=>i,default:()=>h,frontMatter:()=>c,metadata:()=>t,toc:()=>r});const t=JSON.parse('{"id":"learn/learn-account-balances","title":"Account Balances","description":"Polkadot and Kusama Network Account Balance Types.","source":"@site/../docs/learn/learn-account-balances.md","sourceDirName":"learn","slug":"/learn-account-balances","permalink":"/docs/learn-account-balances","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-account-balances.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1726731604000,"frontMatter":{"id":"learn-account-balances","title":"Account Balances","sidebar_label":"Account Balances","description":"Polkadot and Kusama Network Account Balance Types.","keywords":["Polkadot","Kusama","locks","balance","account"],"slug":"../learn-account-balances"},"sidebar":"docs","previous":{"title":"Polkadot Accounts","permalink":"/docs/learn-accounts"},"next":{"title":"Account Abstraction","permalink":"/docs/learn-account-abstraction"}}');var s=a(74848),o=a(28453);const c={id:"learn-account-balances",title:"Account Balances",sidebar_label:"Account Balances",description:"Polkadot and Kusama Network Account Balance Types.",keywords:["Polkadot","Kusama","locks","balance","account"],slug:"../learn-account-balances"},i=void 0,l={},r=[{value:"Example of Account Balance Types",id:"example-of-account-balance-types",level:2},{value:"Locks",id:"locks",level:2},{value:"Edge Case for Locks",id:"edge-case-for-locks",level:3},{value:"Balance Types on Polkadot-JS",id:"balance-types-on-polkadot-js",level:2}];function d(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,o.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.p,{children:"In the Polkadot ecosystem, there are different types of balances depending on the account activity.\nDifferent balance types dictate whether your balance can be used for transfers, to pay fees, or must\nremain frozen and unused due to an on-chain requirement."}),"\n",(0,s.jsx)(n.admonition,{title:"A more efficient distribution of account balance types",type:"info",children:(0,s.jsxs)(n.p,{children:["Soon, pallets on Polkadot SDK will be implementing the ",(0,s.jsx)(n.em,{children:"fungible"})," trait (see\n",(0,s.jsx)(n.a,{href:"https://github.com/paritytech/polkadot-sdk/issues/226",children:"the tracking issue"})," for more info). This new\nlogic will allow for more efficient use of your account balance. Specifically, the\n",(0,s.jsx)(n.a,{href:"https://paritytech.github.io/polkadot-sdk/master/frame_support/traits/tokens/fungible/index.html",children:"fungible trait"}),"\nwill allow using the ",(0,s.jsx)(n.code,{children:"free"})," balance for on-chain activity like setting proxies and identities."]})}),"\n",(0,s.jsx)(n.p,{children:"There are 5 types of account balances:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Free"})," is the balance that can be used for on-chain activity like staking, participating in\ngovernance etc. but is not necessarily spendable (or transferrable)"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Frozen"})," is the free balance locked for ",(0,s.jsx)(n.a,{href:"/docs/learn-staking",children:"staking"}),",\n",(0,s.jsx)(n.a,{href:"/docs/learn-polkadot-opengov",children:"governance"}),", and ",(0,s.jsx)(n.a,{href:"/docs/learn-transactions#vested-transfers",children:"vesting"}),"\n(also called locked balance)"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"On hold"})," is used for ",(0,s.jsx)(n.a,{href:"/docs/learn-identity",children:"identities"}),", ",(0,s.jsx)(n.a,{href:"/docs/learn-proxies",children:"proxies"}),",\n",(0,s.jsx)(n.a,{href:"/docs/learn-guides-polkadot-opengov#claiming-opengov-deposits",children:"OpenGov preimages and deposits"}),",\nand it is no longer free (also called reserved balance)"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Spendable"})," is the free balance that can be spent"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Untouchable"})," is the portion of the free balance that cannot be moved (i.e., not spendable) but\ncan still be used for on-chain activity"]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"The spendable balance is calculated as follows:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"spendable = free - max(frozen - on_hold, ED)\n"})}),"\n",(0,s.jsxs)(n.p,{children:["where ",(0,s.jsx)(n.code,{children:"free"}),", ",(0,s.jsx)(n.code,{children:"frozen"})," and ",(0,s.jsx)(n.code,{children:"on_hold"})," are defined above. The ",(0,s.jsx)(n.code,{children:"ED"})," is the the\n",(0,s.jsx)(n.a,{href:"/docs/learn-accounts#existential-deposit-and-reaping",children:"existential deposit"}),"."]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Wallet providers might show you the spendable, locked, and reserved balance."})}),"\n",(0,s.jsx)(n.h2,{id:"example-of-account-balance-types",children:"Example of Account Balance Types"}),"\n",(0,s.jsxs)(n.p,{children:["Below is an in-depth example of how an account balance composition changes depending on user actions\nonce\n",(0,s.jsxs)(n.a,{href:"https://paritytech.github.io/polkadot-sdk/master/frame_support/traits/tokens/fungible/index.html",children:["the ",(0,s.jsx)(n.em,{children:"fungible"})," trait"]}),"\nis used for account balances. Let\u2019s take, for example, an account with 100 DOT."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"Free: 100 DOT\nFrozen: 0 DOT\nOn hold: 0 DOT\nSpendable: 99 DOT\nUntouchable: 1 DOT (ED)\n"})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"balance-example-1",src:a(17977).A+"",width:"1627",height:"914"})}),"\n",(0,s.jsx)(n.p,{children:"In this case, the existential deposit of 1 DOT is untouchable (meaning you can\u2019t touch it if the\naccount can\u2019t or shouldn\u2019t get reaped). If 80 DOT from the account is staked, we get the following\nbalance structure:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"Free: 100 DOT\nFrozen : 80 DOT\nOnhold: 0 DOT\nSpendable: 20 DOT\nUntouchable: 80 DOT\n"})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"balance-example-2",src:a(35042).A+"",width:"1626",height:"913"})}),"\n",(0,s.jsx)(n.p,{children:"The spendable balance would be 20 DOT (which would also include fees for future transactions from\nthis account)."}),"\n",(0,s.jsxs)(n.p,{children:["Note how the account cannot be reaped from the state while it has a frozen balance, or in general\nany ",(0,s.jsx)(n.a,{href:"/docs/learn-guides-accounts#query-account-data-in-polkadot-js",children:"consumer and provider reference"}),".\nThose references determine if an account can be reaped, usually because other accounts depend on the\nexistence of such an account). For example, the existential deposit adds a provider reference simply\nbecause the account exists, while a proxy account adds a consumer reference (the proxy existence\ndepends on the proxied account; the proxy is the consumer). ",(0,s.jsx)(n.strong,{children:"Because the existential deposit is\npart of the untouchable balance, the user can use all the spendable balance (there is no need to\nkeep 1 DOT as spendable)."})]}),"\n",(0,s.jsx)(n.admonition,{type:"info",children:(0,s.jsxs)(n.p,{children:["The use of the ",(0,s.jsx)(n.em,{children:"free"})," balance as shown in the following figures will be possible once the ",(0,s.jsx)(n.em,{children:"fungible"}),"\ntrait is implemented for account balances."]})}),"\n",(0,s.jsxs)(n.p,{children:["If the account creates a proxy, it will use the ",(0,s.jsx)(n.code,{children:"free"})," balance as shown below."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"Free: 80 DOT\nFrozen : 80 DOT\nOnhold: 20 DOT\nSpendable: 20 DOT\nUntouchable: 60 DOT\n"})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"balance-example-3",src:a(25547).A+"",width:"1627",height:"914"})}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsxs)(n.strong,{children:["Note how, through the fungible trait, the system uses the ",(0,s.jsx)(n.code,{children:"balance"})," that is frozen instead of the\n",(0,s.jsx)(n.code,{children:"free"})," balance that is spendable (present configuration on-chain)."]})," In other words, holds are\nsubtracted from free balance but overlap with the frozen balance. The free portion shrinks from 100\nto 80 DOT, and the ",(0,s.jsx)(n.code,{children:"on_hold"})," portion increases from 0 to 20 DOT. The creation of an identity will\ngrow the ",(0,s.jsx)(n.code,{children:"on_hold"})," portion to 40 DOT, and shrink further the ",(0,s.jsx)(n.code,{children:"free"})," from 80 to 60 DOT. Note how the\nspendable balance stays the same in the process."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"Free: 60 DOT\nFrozen: 80 DOT\nOnhold: 40 DOT\nSpendable: 20 DOT\nUntouchable: 40 DOT\n"})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"balance-example-4",src:a(75636).A+"",width:"1627",height:"914"})}),"\n",(0,s.jsxs)(n.p,{children:["This update using the fungible trait allows the use of the frozen balance for on-chain activity like\nsetting up proxies and identities. Note that\n",(0,s.jsx)(n.a,{href:"https://github.com/paritytech/substrate/pull/12951",children:"holds are slashable"}),", and the pallet\n",(0,s.jsx)(n.a,{href:"https://github.com/paritytech/polkadot-sdk/issues/226",children:"migrations"})," need to take that into account.\nThis means that freezes should account for hold being slashed (for example, your stash account\nbalance getting reduced because your governance deposit for a proposal was slashed)."]}),"\n",(0,s.jsx)(n.h2,{id:"locks",children:"Locks"}),"\n",(0,s.jsx)(n.p,{children:"Locks are abstractions over an account's free balance, preventing it from being spent. Several locks\ncan overlap on the same account balance instead of being stacked on top of one another. Locks are\nautomatically added onto accounts when the account participates in activities on-chain (staking,\nvoting, etc.), but these are not customizable."}),"\n",(0,s.jsxs)(n.p,{children:["Locks are accounted for within the ",(0,s.jsx)(n.code,{children:"frozen"})," balance of the account. This is the balance that can be\n",(0,s.jsx)(n.code,{children:"free"})," but not transferrable, and locked in ",(0,s.jsx)(n.a,{href:"/docs/learn-staking",children:"staking"}),",\n",(0,s.jsx)(n.a,{href:"/docs/learn-polkadot-opengov",children:"governance"})," and ",(0,s.jsx)(n.a,{href:"/docs/learn-transactions#vested-transfers",children:"vesting"}),"."]}),"\n",(0,s.jsx)(n.p,{children:"Locks overlap (in both amount and duration), and the general rule is that:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"If you have multiple locks of different amounts of tokens, the biggest lock decides the total\namount of locked tokens"}),"\n",(0,s.jsx)(n.li,{children:"If you have multiple locks of the same amount of tokens, the lock with the longest duration\ndecides when those tokens can be unlocked"}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["Let's take, for example, 80 DOT as a ",(0,s.jsx)(n.code,{children:"frozen"})," balance. These 80 DOT are currently used in staking\nand governance as follows:"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"80 DOT Staking (just unbonded) -> lock 28 days"}),"\n",(0,s.jsx)(n.li,{children:"24 DOT OpenGov 1x conviction (referendum just ended, winning side) -> lock 7 days"}),"\n",(0,s.jsx)(n.li,{children:"4 DOT OpenGov 6x conviction (referendum just ended, winning side) -> lock 224 days"}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"locks-example-1",src:a(28361).A+"",width:"1626",height:"913"})}),"\n",(0,s.jsx)(n.p,{children:"The 1 DOT ED is the existential deposit. The locked amount is 80 DOT (not 108 DOT). But those 80 DOT\nwill be available for unlock at different times. You will first need to remove the governance lock\non the 24 DOT after 7 days, then remove the staking lock for the 80 DOT after 28 days, and finally,\nafter 224 days, you will be able to remove the second governance lock."}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"locks-example-2",src:a(63218).A+"",width:"1626",height:"910"})}),"\n",(0,s.jsx)(n.p,{children:"After 224 days, all 80 DOT (- ED) will be free and transferrable."}),"\n",(0,s.jsx)(n.h3,{id:"edge-case-for-locks",children:"Edge Case for Locks"}),"\n",(0,s.jsx)(n.p,{children:"The longest period and the largest amount are considered if you use different convictions while you\nhave ongoing locks."}),"\n",(0,s.jsx)(n.p,{children:"Following the previous example, if you:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"undelegate a 1x conviction delegation of 24 DOT, you will get a 7-day lock on 24 DOT"}),"\n",(0,s.jsx)(n.li,{children:"delegate 4 DOT with 6x conviction"}),"\n",(0,s.jsx)(n.li,{children:"undelegate again before the 1x conviction lock is removed"}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["You will get a 6x conviction for 24 DOT! See\n",(0,s.jsx)(n.a,{href:"https://substrate.stackexchange.com/questions/5067/delegating-and-undelegating-during-the-lock-period-extends-it-for-the-initial-am",children:"here"}),"\nfor more information."]}),"\n",(0,s.jsx)(n.h2,{id:"balance-types-on-polkadot-js",children:"Balance Types on Polkadot-JS"}),"\n",(0,s.jsxs)(n.p,{children:["Below is an example that displays different balance types on the\n",(0,s.jsx)(n.a,{href:"/docs/polkadotjs-ui",children:"Polkadot-JS UI (wallet)"})," of a Kusama account (note that the balance\ntypes are the same for a Polkadot account)."]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"account_balance_types",src:a(95572).A+"",width:"1061",height:"291"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["The ",(0,s.jsx)(n.strong,{children:"total"})," balance indicates the total number of tokens in the account. Note that this number\ndoes not necessarily correspond to the tokens you can transfer. In the example, the total number\nof tokens is 0.6274 KSM. The ",(0,s.jsx)(n.strong,{children:"transferrable"})," balance indicates the number of free tokens to be\ntransferred. This is calculated by subtracting the number of ",(0,s.jsx)(n.em,{children:"locked"})," and ",(0,s.jsx)(n.em,{children:"reserved"})," tokens from\nthe total number of tokens. Locked funds correspond to tokens used in staking, governance, and\nvested transfers (see below). In the example, the transferrable balance is 0.0106 KSM."]}),"\n",(0,s.jsxs)(n.li,{children:["The ",(0,s.jsx)(n.strong,{children:"vested"})," balance indicates tokens sent to the account and released with a specific time\nschedule. The account owns the tokens, but they are ",(0,s.jsx)(n.em,{children:"locked"})," and become available for transfer\nafter a specific number of blocks. In the example, the vested balance is 0.25 KSM."]}),"\n",(0,s.jsxs)(n.li,{children:["The ",(0,s.jsx)(n.strong,{children:"bonded"})," balance indicates the number of tokens that are ",(0,s.jsx)(n.em,{children:"locked"})," for on-chain participation\nto staking. In the example, the bonded balance is 0.4 KSM."]}),"\n",(0,s.jsxs)(n.li,{children:["The ",(0,s.jsx)(n.strong,{children:"democracy"})," balance indicates the number of tokens that are ",(0,s.jsx)(n.em,{children:"locked"})," for on-chain\nparticipation in democracy (i.e., voting for referenda and council). In the example, the democracy\nbalance is 0.4 KSM."]}),"\n",(0,s.jsxs)(n.li,{children:["The ",(0,s.jsx)(n.strong,{children:"redeemable"})," balance indicates the number of tokens ready to be unlocked to become\ntransferrable again. Those tokens already went through the unbonding period. In this case, the\nredeemable balance is 0.1 KSM."]}),"\n",(0,s.jsxs)(n.li,{children:["The ",(0,s.jsx)(n.strong,{children:"locked"})," balance indicates the number of frozen tokens for on-chain participation to staking\nand democracy or for vested transfers. ",(0,s.jsx)(n.strong,{children:"Locks do not stack"}),", which means that if you have\ndifferent locks, the total locked balance is not the addition of the individual locks. Instead,\n",(0,s.jsx)(n.strong,{children:"the biggest lock decides the total locked balance"}),". In the example, the locked balance is 0.55\nKSM because the biggest lock is on democracy (0.55 KSM)."]}),"\n",(0,s.jsxs)(n.li,{children:["The ",(0,s.jsx)(n.strong,{children:"reserved"}),' balance indicates the number of frozen tokens for on-chain activity other than\nstaking, governance, and vested transfers. Such activity can be setting an identity or a proxy.\nReserved funds are held due to on-chain requirements and can usually be freed by taking some\non-chain action. For example, the "Identity" pallet reserves funds while an on-chain identity is\nregistered, but by clearing the identity, you can unreserve the funds and make them free again.\nThe same applies to proxies. The idea is that those actions require some network memory usage that\nis not given for free. In the example, we created a governance proxy, and the reserved funds for\nthis are 0.0668 KSM.']}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},95572:(e,n,a)=>{a.d(n,{A:()=>t});const t=a.p+"assets/images/account-balance-types-95095ee12fb785022e957c5ab975a776.png"},17977:(e,n,a)=>{a.d(n,{A:()=>t});const t=a.p+"assets/images/balance-example-1-1aa56201b9e9874517e8289e7bcc3ccf.png"},35042:(e,n,a)=>{a.d(n,{A:()=>t});const t=a.p+"assets/images/balance-example-2-a1cbaa67dc150ab02b384a50e89e26b7.png"},25547:(e,n,a)=>{a.d(n,{A:()=>t});const t=a.p+"assets/images/balance-example-3-ba1131e3bce279fc6e8e43f73270bdf1.png"},75636:(e,n,a)=>{a.d(n,{A:()=>t});const t=a.p+"assets/images/balance-example-4-6641f43558ab34fb71f0178dba313d42.png"},28361:(e,n,a)=>{a.d(n,{A:()=>t});const t=a.p+"assets/images/locks-example-1-9f0558ffaa8fcfb7d62c7cad3237ff3e.png"},63218:(e,n,a)=>{a.d(n,{A:()=>t});const t=a.p+"assets/images/locks-example-2-226d978e7e9d72777761df8a2b713193.png"},28453:(e,n,a)=>{a.d(n,{R:()=>c,x:()=>i});var t=a(96540);const s={},o=t.createContext(s);function c(e){const n=t.useContext(o);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:c(e.components),t.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/ab138bf8.2b9eb8fb.js b/assets/js/ab138bf8.2b9eb8fb.js new file mode 100644 index 000000000000..5cc01fcf39ed --- /dev/null +++ b/assets/js/ab138bf8.2b9eb8fb.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8914],{18538:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>r,default:()=>h,frontMatter:()=>i,metadata:()=>o,toc:()=>l});const o=JSON.parse('{"id":"learn/learn-proxies","title":"Proxy Accounts","description":"Proxy Accounts on Polkadot.","source":"@site/../docs/learn/learn-proxies.md","sourceDirName":"learn","slug":"/learn-proxies","permalink":"/docs/learn-proxies","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-proxies.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1729246243000,"frontMatter":{"id":"learn-proxies","title":"Proxy Accounts","sidebar_label":"Proxy Accounts","description":"Proxy Accounts on Polkadot.","keywords":["proxy","proxies","proxy accounts","proxy types","staking proxy"],"slug":"../learn-proxies"},"sidebar":"docs","previous":{"title":"Multi-Signature Accounts","permalink":"/docs/learn-account-multisig"},"next":{"title":"Pure Proxy Accounts","permalink":"/docs/learn-proxies-pure"}}');var s=t(74848),a=t(28453);const i={id:"learn-proxies",title:"Proxy Accounts",sidebar_label:"Proxy Accounts",description:"Proxy Accounts on Polkadot.",keywords:["proxy","proxies","proxy accounts","proxy types","staking proxy"],slug:"../learn-proxies"},r=void 0,c={},l=[{value:"Proxy Types",id:"proxy-types",level:2},{value:"Proxy Deposits",id:"proxy-deposits",level:2},{value:"Time-delayed Proxy",id:"time-delayed-proxy",level:2}];function d(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",hr:"hr",img:"img",li:"li",p:"p",strong:"strong",ul:"ul",...(0,a.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(n.p,{children:["Proxies are helpful because they let you delegate efficiently and add a layer of security. Rather\nthan using funds in a single account, smaller accounts with unique roles can complete tasks on\nbehalf of the main stash account. Proxies can be ",(0,s.jsx)(n.em,{children:"hotter"})," than the initial account, which can be\nkept cold, but the ",(0,s.jsx)(n.em,{children:"weight"})," of the tokens in the colder account can be used by the hotter accounts.\nThis increases the security of your accounts by minimizing the number of transactions the cold\naccount has to make. This also drives attention away from the stash account, although it is possible\nto determine the relationship between the proxy and the proxied account."]}),"\n",(0,s.jsx)(n.p,{children:"From the security perspective, we can imagine proxies as bodyguards of a VIP, loyal and ready to\nrisk their lives to ensure the VIP's protection. But proxies are also useful in other contexts such\nas efficient account management at the corporate level. They also provide an elegant solution to\nchange signatories within multi-signature accounts, and they can be used within proxy calls and\nnested proxy calls. In this page we will explore all these interesting use cases of proxies within\nthe Polkadot ecosystem."}),"\n",(0,s.jsx)(n.p,{children:"Shown below is an example of how you might use these accounts. Imagine you have one stash account as\nyour primary token-holding account and don't want to access it very often, but you want to\nparticipate in staking to earn staking rewards. You could set one of your existing accounts as a\nstaking proxy for that stash account, and use your staking proxy to sign all staking-related\ntransactions."}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"proxies",src:t(60546).A+"",width:"1920",height:"800"})}),"\n",(0,s.jsxs)(n.p,{children:["Having a staking proxy will make the stash account isolated within the staking context. In other\nwords, the account assigned as a staking proxy can participate in staking on behalf of that stash.\nWithout the proxy you will need to sign all the staking-related transactions with the stash. If the\nproxy is compromised, it doesn't have access to transfer-related transactions, so the stash account\ncould just set a new proxy to replace it. You can also monitor proxies by\n",(0,s.jsx)(n.a,{href:"#time-delayed-proxy",children:"setting a time-delay"}),"."]}),"\n",(0,s.jsx)(n.p,{children:"Creating multiple proxy accounts that act for a single account, lets you come up with more granular\nsecurity practices around how you protect private keys while still being able to actively\nparticipate in the network."}),"\n",(0,s.jsx)(n.h2,{id:"proxy-types",children:"Proxy Types"}),"\n",(0,s.jsx)(n.p,{children:"When a proxy account makes a transaction, Polkadot filters the desired transaction to ensure that\nthe proxy account has the appropriate permission to make that transaction on behalf of the proxied\naccount. For example, staking proxies have permission to do only staking-related transactions."}),"\n",(0,s.jsx)(n.p,{children:"When you set a proxy, you must choose a type of proxy for the relationship with the proxied account."}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Any"}),": allow any transaction, including balance transfers. In most cases, this should be avoided\nas the proxy account is used more frequently than the cold account and is therefore less secure."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Non-transfer"}),": allow any type of transaction except\n",(0,s.jsx)(n.a,{href:"/docs/learn-transactions#balance-transfers",children:"balance transfers"})," (including\n",(0,s.jsx)(n.a,{href:"/docs/learn-transactions#vested-transfers",children:"vested"})," transfers). Hence, this proxy does not have\npermission to access calls in the Balances and XCM pallet."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Governance"}),": allow to make transactions related to governance."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Nomination pool"}),": allow transactions pertaining to\n",(0,s.jsx)(n.a,{href:"/docs/learn-nomination-pools",children:"Nomination Pools"}),"."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Staking"}),": allow all staking-related transactions. The stash account is meant to stay in cold\nstorage, while the staking proxy account makes day-to-day transactions like setting session keys\nor deciding which validators to nominate. Visit the\n",(0,s.jsx)(n.a,{href:"/docs/learn-staking-advanced#staking-proxies",children:"Advanced Staking Concepts page"})," for more detailed\ninformation about staking proxies."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Identity Judgement"}),": allow registrars to make judgments on an account's identity. If you are\nunfamiliar with judgment and identities on chain, please refer to\n",(0,s.jsx)(n.a,{href:"/docs/learn-identity#judgements",children:"this page"}),". This proxy can only access ",(0,s.jsx)(n.code,{children:"provide_judgement"})," call\nfrom the Identity pallet along with the calls from the Utility pallet."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Cancel"}),": allow to reject and remove any time-delay proxy announcements. This proxy can only\naccess ",(0,s.jsx)(n.code,{children:"reject_announcement"})," call from the Proxy pallet."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Spokesperson"}),": Kusama-specific proxy type that only allows ",(0,s.jsx)(n.code,{children:"remark"})," or ",(0,s.jsx)(n.code,{children:"remark_with_event"}),"\ncalls."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Society"}),": Kusama-specific proxy type that only allows\n",(0,s.jsx)(n.a,{href:"/docs/maintain-guides-society-kusama",children:"society-related"})," calls."]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"proxy-deposits",children:"Proxy Deposits"}),"\n",(0,s.jsx)(n.p,{children:"Proxies require deposits in the native currency to be created. The deposit is required because\nadding a proxy requires some storage space on-chain, which must be replicated across every peer in\nthe network. Due to the costly nature of this, these functions could open up the network to a\nDenial-of-Service attack. To defend against this attack, proxies require a deposit to be reserved\nwhile the storage space is consumed over the lifetime of the proxy. When the proxy is removed, so is\nthe storage space, and therefore the deposit is returned."}),"\n",(0,s.jsxs)(n.p,{children:["The required deposit amount for ",(0,s.jsx)(n.code,{children:"n"})," proxies is equal to:"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"ProxyDepositBase"})," + ",(0,s.jsx)(n.code,{children:"ProxyDepositFactor"})," * ",(0,s.jsx)(n.code,{children:"n"})]}),"\n",(0,s.jsxs)(n.p,{children:["where the ",(0,s.jsx)(n.a,{href:"/docs/chain-state-values#proxy-deposits",children:(0,s.jsx)(n.code,{children:"ProxyDepositBase"})})," is the required\namount to be reserved for an account to have a proxy list (creates one new item in storage). For\nevery proxy the account has, an additional amount defined by the\n",(0,s.jsx)(n.a,{href:"/docs/chain-state-values#proxy-deposits",children:(0,s.jsx)(n.code,{children:"ProxyDepositFactor"})})," is reserved as well (appends\n33 bytes to storage location)."]}),"\n",(0,s.jsx)(n.h2,{id:"time-delayed-proxy",children:"Time-delayed Proxy"}),"\n",(0,s.jsx)(n.p,{children:"We can add a layer of security to proxies by giving them a delay time. The delay will be quantified\nin blocks. Polkadot has approximately 6 seconds of block time. A delay value of 10 will mean ten\nblocks, which equals about one minute delay."}),"\n",(0,s.jsx)(n.p,{children:"The proxy will announce its intended action and will wait for the number of blocks defined in the\ndelay time before executing it. Within this time window, the intended action may be canceled by\naccounts that control the proxy."}),"\n",(0,s.jsxs)(n.p,{children:["Announcing ",(0,s.jsx)(n.code,{children:"n"})," calls using a time-delayed proxy also requires a deposit of the form:"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"announcementDepositBase"})," + ",(0,s.jsx)(n.code,{children:"announcementDepositFactor"})," * ",(0,s.jsx)(n.code,{children:"n"})]}),"\n",(0,s.jsxs)(n.p,{children:["where the ",(0,s.jsx)(n.a,{href:"/docs/chain-state-values#proxy-deposits",children:(0,s.jsx)(n.code,{children:"announcementDepositBase"})})," is the\nrequired amount to be reserved for an account to announce a proxy call. For every proxy call the\naccount has, an additional amount defined by the\n",(0,s.jsx)(n.a,{href:"/docs/chain-state-values#proxy-deposits",children:(0,s.jsx)(n.code,{children:"announcementDepositFactor"})})," is reserved as well."]}),"\n",(0,s.jsx)(n.hr,{}),"\n",(0,s.jsx)(n.admonition,{title:"Polkadot-JS Guides",type:"info",children:(0,s.jsxs)(n.p,{children:["If you are an advanced user, see the\n",(0,s.jsx)(n.a,{href:"/docs/learn-guides-accounts-proxy",children:"Polkadot-JS guides about proxy accounts"}),". You can find\ninformation about creating and removing proxies, and more."]})})]})}function h(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},60546:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/stash-vs-stash-and-staking-proxy-2104e1a23d5c29821cec15fb9b67eba5.png"},28453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>r});var o=t(96540);const s={},a=o.createContext(s);function i(e){const n=o.useContext(a);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),o.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/ab138bf8.bdc0d1f3.js b/assets/js/ab138bf8.bdc0d1f3.js deleted file mode 100644 index e0d121604480..000000000000 --- a/assets/js/ab138bf8.bdc0d1f3.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8914],{99771:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>i,default:()=>h,frontMatter:()=>a,metadata:()=>r,toc:()=>l});var o=t(74848),s=t(28453);const a={id:"learn-proxies",title:"Proxy Accounts",sidebar_label:"Proxy Accounts",description:"Proxy Accounts on Polkadot.",keywords:["proxy","proxies","proxy accounts","proxy types","staking proxy"],slug:"../learn-proxies"},i=void 0,r={id:"learn/learn-proxies",title:"Proxy Accounts",description:"Proxy Accounts on Polkadot.",source:"@site/../docs/learn/learn-proxies.md",sourceDirName:"learn",slug:"/learn-proxies",permalink:"/docs/learn-proxies",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-proxies.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1729246243e3,frontMatter:{id:"learn-proxies",title:"Proxy Accounts",sidebar_label:"Proxy Accounts",description:"Proxy Accounts on Polkadot.",keywords:["proxy","proxies","proxy accounts","proxy types","staking proxy"],slug:"../learn-proxies"},sidebar:"docs",previous:{title:"Multi-Signature Accounts",permalink:"/docs/learn-account-multisig"},next:{title:"Pure Proxy Accounts",permalink:"/docs/learn-proxies-pure"}},c={},l=[{value:"Proxy Types",id:"proxy-types",level:2},{value:"Proxy Deposits",id:"proxy-deposits",level:2},{value:"Time-delayed Proxy",id:"time-delayed-proxy",level:2}];function d(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",hr:"hr",img:"img",li:"li",p:"p",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(n.p,{children:["Proxies are helpful because they let you delegate efficiently and add a layer of security. Rather\nthan using funds in a single account, smaller accounts with unique roles can complete tasks on\nbehalf of the main stash account. Proxies can be ",(0,o.jsx)(n.em,{children:"hotter"})," than the initial account, which can be\nkept cold, but the ",(0,o.jsx)(n.em,{children:"weight"})," of the tokens in the colder account can be used by the hotter accounts.\nThis increases the security of your accounts by minimizing the number of transactions the cold\naccount has to make. This also drives attention away from the stash account, although it is possible\nto determine the relationship between the proxy and the proxied account."]}),"\n",(0,o.jsx)(n.p,{children:"From the security perspective, we can imagine proxies as bodyguards of a VIP, loyal and ready to\nrisk their lives to ensure the VIP's protection. But proxies are also useful in other contexts such\nas efficient account management at the corporate level. They also provide an elegant solution to\nchange signatories within multi-signature accounts, and they can be used within proxy calls and\nnested proxy calls. In this page we will explore all these interesting use cases of proxies within\nthe Polkadot ecosystem."}),"\n",(0,o.jsx)(n.p,{children:"Shown below is an example of how you might use these accounts. Imagine you have one stash account as\nyour primary token-holding account and don't want to access it very often, but you want to\nparticipate in staking to earn staking rewards. You could set one of your existing accounts as a\nstaking proxy for that stash account, and use your staking proxy to sign all staking-related\ntransactions."}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"proxies",src:t(60546).A+"",width:"1920",height:"800"})}),"\n",(0,o.jsxs)(n.p,{children:["Having a staking proxy will make the stash account isolated within the staking context. In other\nwords, the account assigned as a staking proxy can participate in staking on behalf of that stash.\nWithout the proxy you will need to sign all the staking-related transactions with the stash. If the\nproxy is compromised, it doesn't have access to transfer-related transactions, so the stash account\ncould just set a new proxy to replace it. You can also monitor proxies by\n",(0,o.jsx)(n.a,{href:"#time-delayed-proxy",children:"setting a time-delay"}),"."]}),"\n",(0,o.jsx)(n.p,{children:"Creating multiple proxy accounts that act for a single account, lets you come up with more granular\nsecurity practices around how you protect private keys while still being able to actively\nparticipate in the network."}),"\n",(0,o.jsx)(n.h2,{id:"proxy-types",children:"Proxy Types"}),"\n",(0,o.jsx)(n.p,{children:"When a proxy account makes a transaction, Polkadot filters the desired transaction to ensure that\nthe proxy account has the appropriate permission to make that transaction on behalf of the proxied\naccount. For example, staking proxies have permission to do only staking-related transactions."}),"\n",(0,o.jsx)(n.p,{children:"When you set a proxy, you must choose a type of proxy for the relationship with the proxied account."}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Any"}),": allow any transaction, including balance transfers. In most cases, this should be avoided\nas the proxy account is used more frequently than the cold account and is therefore less secure."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Non-transfer"}),": allow any type of transaction except\n",(0,o.jsx)(n.a,{href:"/docs/learn-transactions#balance-transfers",children:"balance transfers"})," (including\n",(0,o.jsx)(n.a,{href:"/docs/learn-transactions#vested-transfers",children:"vested"})," transfers). Hence, this proxy does not have\npermission to access calls in the Balances and XCM pallet."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Governance"}),": allow to make transactions related to governance."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Nomination pool"}),": allow transactions pertaining to\n",(0,o.jsx)(n.a,{href:"/docs/learn-nomination-pools",children:"Nomination Pools"}),"."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Staking"}),": allow all staking-related transactions. The stash account is meant to stay in cold\nstorage, while the staking proxy account makes day-to-day transactions like setting session keys\nor deciding which validators to nominate. Visit the\n",(0,o.jsx)(n.a,{href:"/docs/learn-staking-advanced#staking-proxies",children:"Advanced Staking Concepts page"})," for more detailed\ninformation about staking proxies."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Identity Judgement"}),": allow registrars to make judgments on an account's identity. If you are\nunfamiliar with judgment and identities on chain, please refer to\n",(0,o.jsx)(n.a,{href:"/docs/learn-identity#judgements",children:"this page"}),". This proxy can only access ",(0,o.jsx)(n.code,{children:"provide_judgement"})," call\nfrom the Identity pallet along with the calls from the Utility pallet."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Cancel"}),": allow to reject and remove any time-delay proxy announcements. This proxy can only\naccess ",(0,o.jsx)(n.code,{children:"reject_announcement"})," call from the Proxy pallet."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Spokesperson"}),": Kusama-specific proxy type that only allows ",(0,o.jsx)(n.code,{children:"remark"})," or ",(0,o.jsx)(n.code,{children:"remark_with_event"}),"\ncalls."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Society"}),": Kusama-specific proxy type that only allows\n",(0,o.jsx)(n.a,{href:"/docs/maintain-guides-society-kusama",children:"society-related"})," calls."]}),"\n"]}),"\n",(0,o.jsx)(n.h2,{id:"proxy-deposits",children:"Proxy Deposits"}),"\n",(0,o.jsx)(n.p,{children:"Proxies require deposits in the native currency to be created. The deposit is required because\nadding a proxy requires some storage space on-chain, which must be replicated across every peer in\nthe network. Due to the costly nature of this, these functions could open up the network to a\nDenial-of-Service attack. To defend against this attack, proxies require a deposit to be reserved\nwhile the storage space is consumed over the lifetime of the proxy. When the proxy is removed, so is\nthe storage space, and therefore the deposit is returned."}),"\n",(0,o.jsxs)(n.p,{children:["The required deposit amount for ",(0,o.jsx)(n.code,{children:"n"})," proxies is equal to:"]}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.code,{children:"ProxyDepositBase"})," + ",(0,o.jsx)(n.code,{children:"ProxyDepositFactor"})," * ",(0,o.jsx)(n.code,{children:"n"})]}),"\n",(0,o.jsxs)(n.p,{children:["where the ",(0,o.jsx)(n.a,{href:"/docs/chain-state-values#proxy-deposits",children:(0,o.jsx)(n.code,{children:"ProxyDepositBase"})})," is the required\namount to be reserved for an account to have a proxy list (creates one new item in storage). For\nevery proxy the account has, an additional amount defined by the\n",(0,o.jsx)(n.a,{href:"/docs/chain-state-values#proxy-deposits",children:(0,o.jsx)(n.code,{children:"ProxyDepositFactor"})})," is reserved as well (appends\n33 bytes to storage location)."]}),"\n",(0,o.jsx)(n.h2,{id:"time-delayed-proxy",children:"Time-delayed Proxy"}),"\n",(0,o.jsx)(n.p,{children:"We can add a layer of security to proxies by giving them a delay time. The delay will be quantified\nin blocks. Polkadot has approximately 6 seconds of block time. A delay value of 10 will mean ten\nblocks, which equals about one minute delay."}),"\n",(0,o.jsx)(n.p,{children:"The proxy will announce its intended action and will wait for the number of blocks defined in the\ndelay time before executing it. Within this time window, the intended action may be canceled by\naccounts that control the proxy."}),"\n",(0,o.jsxs)(n.p,{children:["Announcing ",(0,o.jsx)(n.code,{children:"n"})," calls using a time-delayed proxy also requires a deposit of the form:"]}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.code,{children:"announcementDepositBase"})," + ",(0,o.jsx)(n.code,{children:"announcementDepositFactor"})," * ",(0,o.jsx)(n.code,{children:"n"})]}),"\n",(0,o.jsxs)(n.p,{children:["where the ",(0,o.jsx)(n.a,{href:"/docs/chain-state-values#proxy-deposits",children:(0,o.jsx)(n.code,{children:"announcementDepositBase"})})," is the\nrequired amount to be reserved for an account to announce a proxy call. For every proxy call the\naccount has, an additional amount defined by the\n",(0,o.jsx)(n.a,{href:"/docs/chain-state-values#proxy-deposits",children:(0,o.jsx)(n.code,{children:"announcementDepositFactor"})})," is reserved as well."]}),"\n",(0,o.jsx)(n.hr,{}),"\n",(0,o.jsx)(n.admonition,{title:"Polkadot-JS Guides",type:"info",children:(0,o.jsxs)(n.p,{children:["If you are an advanced user, see the\n",(0,o.jsx)(n.a,{href:"/docs/learn-guides-accounts-proxy",children:"Polkadot-JS guides about proxy accounts"}),". You can find\ninformation about creating and removing proxies, and more."]})})]})}function h(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},60546:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/stash-vs-stash-and-staking-proxy-2104e1a23d5c29821cec15fb9b67eba5.png"},28453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>r});var o=t(96540);const s={},a=o.createContext(s);function i(e){const n=o.useContext(a);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),o.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/ad5a1373.0790d0ed.js b/assets/js/ad5a1373.0790d0ed.js new file mode 100644 index 000000000000..0d6ee32e4502 --- /dev/null +++ b/assets/js/ad5a1373.0790d0ed.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3656],{30091:(e,a,n)=>{n.r(a),n.d(a,{assets:()=>l,contentTitle:()=>d,default:()=>c,frontMatter:()=>i,metadata:()=>r,toc:()=>o});const r=JSON.parse('{"id":"general/dune-analytics/parachain-dashboards/phala-dashboards","title":"Phala Dashboards","description":"Phala provides a privacy-preserving computation and data protection framework.","source":"@site/../docs/general/dune-analytics/parachain-dashboards/phala-dashboards.md","sourceDirName":"general/dune-analytics/parachain-dashboards","slug":"/general/dune-analytics/phala-dashboards","permalink":"/docs/general/dune-analytics/phala-dashboards","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/parachain-dashboards/phala-dashboards.md","tags":[],"version":"current","lastUpdatedBy":"MK","lastUpdatedAt":1719215716000,"frontMatter":{"id":"phala-dashboards","title":"Phala Dashboards","sidebar_label":"Phala","description":"Phala provides a privacy-preserving computation and data protection framework.","keywords":["polkadot","dashboard","dune","phala","privacy"],"slug":"../phala-dashboards"},"sidebar":"docs","previous":{"title":"Pendulum","permalink":"/docs/general/dune-analytics/pendulum-dashboards"},"next":{"title":"Polkadex","permalink":"/docs/general/dune-analytics/polkadex-dashboards"}}');var s=n(74848),t=n(28453);const i={id:"phala-dashboards",title:"Phala Dashboards",sidebar_label:"Phala",description:"Phala provides a privacy-preserving computation and data protection framework.",keywords:["polkadot","dashboard","dune","phala","privacy"],slug:"../phala-dashboards"},d="Phala Dashboards",l={},o=[{value:"Overview",id:"overview",level:2},{value:"Featured Dashboards on Dune",id:"featured-dashboards-on-dune",level:2},{value:"Key Tables",id:"key-tables",level:2},{value:"Useful Queries",id:"useful-queries",level:2},{value:"Getting Started with Queries",id:"getting-started-with-queries",level:2}];function h(e){const a={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,t.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a.header,{children:(0,s.jsx)(a.h1,{id:"phala-dashboards",children:"Phala Dashboards"})}),"\n",(0,s.jsx)(a.h2,{id:"overview",children:"Overview"}),"\n",(0,s.jsx)(a.p,{children:"Phala is a parachain on Polkadot that provides a privacy-preserving computation and data protection\nframework. It allows for the processing of sensitive data with guaranteed privacy."}),"\n",(0,s.jsx)(a.h2,{id:"featured-dashboards-on-dune",children:"Featured Dashboards on Dune"}),"\n",(0,s.jsx)(a.p,{children:"Here you will find a variety of dashboards that help visualize data from the Phala parachain:"}),"\n",(0,s.jsxs)(a.ul,{children:["\n",(0,s.jsxs)(a.li,{children:[(0,s.jsx)(a.a,{href:"https://dune.com/substrate/phala",children:"Phala Dashboard"}),": A comprehensive view of activities within the\nPhala ecosystem."]}),"\n"]}),"\n",(0,s.jsxs)(a.p,{children:["Please also visit our dashboards for Phala on\n",(0,s.jsx)(a.a,{href:"https://dune.com/discover/content/relevant?q=title:Phala%20author:substrate",children:"Dune Analytics"}),"."]}),"\n",(0,s.jsx)(a.h2,{id:"key-tables",children:"Key Tables"}),"\n",(0,s.jsx)(a.p,{children:"Data from the Phala parachain is organized into several key tables:"}),"\n",(0,s.jsxs)(a.ul,{children:["\n",(0,s.jsx)(a.li,{children:(0,s.jsx)(a.code,{children:"phala.balances"})}),"\n",(0,s.jsx)(a.li,{children:(0,s.jsx)(a.code,{children:"phala.blocks"})}),"\n",(0,s.jsx)(a.li,{children:(0,s.jsx)(a.code,{children:"phala.calls"})}),"\n",(0,s.jsx)(a.li,{children:(0,s.jsx)(a.code,{children:"phala.events"})}),"\n",(0,s.jsx)(a.li,{children:(0,s.jsx)(a.code,{children:"phala.extrinsics"})}),"\n",(0,s.jsx)(a.li,{children:(0,s.jsx)(a.code,{children:"phala.transfers"})}),"\n"]}),"\n",(0,s.jsxs)(a.p,{children:["Start building your own queries using granular data on Dune\n",(0,s.jsx)(a.a,{href:"https://dune.com/queries?category=canonical&namespace=phala",children:"here"}),"."]}),"\n",(0,s.jsxs)(a.p,{children:["Additional curated dataset from Phala team can be found at ",(0,s.jsx)(a.code,{children:"dune.phala_network.*"})]}),"\n",(0,s.jsx)(a.h2,{id:"useful-queries",children:"Useful Queries"}),"\n",(0,s.jsx)(a.p,{children:"Some useful queries for Phala are provided:"}),"\n",(0,s.jsxs)(a.table,{children:[(0,s.jsx)(a.thead,{children:(0,s.jsxs)(a.tr,{children:[(0,s.jsx)(a.th,{children:"Title"}),(0,s.jsx)(a.th,{children:"Query"}),(0,s.jsx)(a.th,{children:"Description"})]})}),(0,s.jsxs)(a.tbody,{children:[(0,s.jsxs)(a.tr,{children:[(0,s.jsx)(a.td,{children:"Phala Computation"}),(0,s.jsx)(a.td,{children:(0,s.jsx)(a.a,{href:"https://dune.com/queries/3619434",children:"query_3619434"})}),(0,s.jsx)(a.td,{children:"This query provides an overview of the Phala network's computation, including circulation, bridge, reward, issuance, supply, value, worker count, rewards, APR, budget, and delegator count."})]}),(0,s.jsxs)(a.tr,{children:[(0,s.jsx)(a.td,{children:"Phala Recent AI Agent Contracts"}),(0,s.jsx)(a.td,{children:(0,s.jsx)(a.a,{href:"https://dune.com/queries/3743294",children:"query_3743294"})}),(0,s.jsx)(a.td,{children:"This query lists the recent AI agent contracts deployed on the Phala network, including deployer, instantiation time, code hash, stake, and staker."})]})]})]}),"\n",(0,s.jsx)(a.h2,{id:"getting-started-with-queries",children:"Getting Started with Queries"}),"\n",(0,s.jsx)(a.p,{children:"To get started with querying data from Unique, you are welcome to use the mentioned materialized\nqueries. You can use the following DuneSQL queries as examples:"}),"\n",(0,s.jsx)(a.pre,{children:(0,s.jsx)(a.code,{className:"language-sql",metastring:'title="Phala Computation" showLineNumbers',children:"SELECT\n chain,\n circulation,\n sygma_bridge,\n reward,\n COALESCE(total_issuance, total_supply) AS total_issuance,\n total_value,\n idle_worker_count,\n daily_rewards,\n average_apr,\n budget_per_share,\n delegator_count\nFROM\n dune.phala_network.dataset_phala_computation;\n"})}),"\n",(0,s.jsx)(a.p,{children:"Query result:"}),"\n",(0,s.jsx)("iframe",{src:"https://dune.com/embeds/3619434/6098180/",height:"350",width:"100%"}),"\n",(0,s.jsx)(a.p,{children:"Visualizations using the query result:"}),"\n",(0,s.jsx)("iframe",{src:"https://dune.com/embeds/3619434/6098184/",height:"350",width:"100%"}),"\n",(0,s.jsx)(a.admonition,{title:"DuneSQL Referece",type:"info",children:(0,s.jsxs)(a.p,{children:["For more information on DuneSQL, please refer to the ",(0,s.jsx)(a.a,{href:"/docs/general/dunesql-cheatsheet",children:"DuneSQL Cheatsheet"}),"\nand\n",(0,s.jsx)(a.a,{href:"https://docs.dune.com/query-engine/Functions-and-operators/index",children:"DuneSQL Official Documentation"}),"."]})})]})}function c(e={}){const{wrapper:a}={...(0,t.R)(),...e.components};return a?(0,s.jsx)(a,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}},28453:(e,a,n)=>{n.d(a,{R:()=>i,x:()=>d});var r=n(96540);const s={},t=r.createContext(s);function i(e){const a=r.useContext(t);return r.useMemo((function(){return"function"==typeof e?e(a):{...a,...e}}),[a,e])}function d(e){let a;return a=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),r.createElement(t.Provider,{value:a},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/ad5a1373.314112bb.js b/assets/js/ad5a1373.314112bb.js deleted file mode 100644 index 904fc9c72931..000000000000 --- a/assets/js/ad5a1373.314112bb.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3656],{67166:(e,a,n)=>{n.r(a),n.d(a,{assets:()=>l,contentTitle:()=>i,default:()=>c,frontMatter:()=>t,metadata:()=>d,toc:()=>o});var r=n(74848),s=n(28453);const t={id:"phala-dashboards",title:"Phala Dashboards",sidebar_label:"Phala",description:"Phala provides a privacy-preserving computation and data protection framework.",keywords:["polkadot","dashboard","dune","phala","privacy"],slug:"../phala-dashboards"},i="Phala Dashboards",d={id:"general/dune-analytics/parachain-dashboards/phala-dashboards",title:"Phala Dashboards",description:"Phala provides a privacy-preserving computation and data protection framework.",source:"@site/../docs/general/dune-analytics/parachain-dashboards/phala-dashboards.md",sourceDirName:"general/dune-analytics/parachain-dashboards",slug:"/general/dune-analytics/phala-dashboards",permalink:"/docs/general/dune-analytics/phala-dashboards",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/parachain-dashboards/phala-dashboards.md",tags:[],version:"current",lastUpdatedBy:"MK",lastUpdatedAt:1719215716e3,frontMatter:{id:"phala-dashboards",title:"Phala Dashboards",sidebar_label:"Phala",description:"Phala provides a privacy-preserving computation and data protection framework.",keywords:["polkadot","dashboard","dune","phala","privacy"],slug:"../phala-dashboards"},sidebar:"docs",previous:{title:"Pendulum",permalink:"/docs/general/dune-analytics/pendulum-dashboards"},next:{title:"Polkadex",permalink:"/docs/general/dune-analytics/polkadex-dashboards"}},l={},o=[{value:"Overview",id:"overview",level:2},{value:"Featured Dashboards on Dune",id:"featured-dashboards-on-dune",level:2},{value:"Key Tables",id:"key-tables",level:2},{value:"Useful Queries",id:"useful-queries",level:2},{value:"Getting Started with Queries",id:"getting-started-with-queries",level:2}];function h(e){const a={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,s.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(a.header,{children:(0,r.jsx)(a.h1,{id:"phala-dashboards",children:"Phala Dashboards"})}),"\n",(0,r.jsx)(a.h2,{id:"overview",children:"Overview"}),"\n",(0,r.jsx)(a.p,{children:"Phala is a parachain on Polkadot that provides a privacy-preserving computation and data protection\nframework. It allows for the processing of sensitive data with guaranteed privacy."}),"\n",(0,r.jsx)(a.h2,{id:"featured-dashboards-on-dune",children:"Featured Dashboards on Dune"}),"\n",(0,r.jsx)(a.p,{children:"Here you will find a variety of dashboards that help visualize data from the Phala parachain:"}),"\n",(0,r.jsxs)(a.ul,{children:["\n",(0,r.jsxs)(a.li,{children:[(0,r.jsx)(a.a,{href:"https://dune.com/substrate/phala",children:"Phala Dashboard"}),": A comprehensive view of activities within the\nPhala ecosystem."]}),"\n"]}),"\n",(0,r.jsxs)(a.p,{children:["Please also visit our dashboards for Phala on\n",(0,r.jsx)(a.a,{href:"https://dune.com/discover/content/relevant?q=title:Phala%20author:substrate",children:"Dune Analytics"}),"."]}),"\n",(0,r.jsx)(a.h2,{id:"key-tables",children:"Key Tables"}),"\n",(0,r.jsx)(a.p,{children:"Data from the Phala parachain is organized into several key tables:"}),"\n",(0,r.jsxs)(a.ul,{children:["\n",(0,r.jsx)(a.li,{children:(0,r.jsx)(a.code,{children:"phala.balances"})}),"\n",(0,r.jsx)(a.li,{children:(0,r.jsx)(a.code,{children:"phala.blocks"})}),"\n",(0,r.jsx)(a.li,{children:(0,r.jsx)(a.code,{children:"phala.calls"})}),"\n",(0,r.jsx)(a.li,{children:(0,r.jsx)(a.code,{children:"phala.events"})}),"\n",(0,r.jsx)(a.li,{children:(0,r.jsx)(a.code,{children:"phala.extrinsics"})}),"\n",(0,r.jsx)(a.li,{children:(0,r.jsx)(a.code,{children:"phala.transfers"})}),"\n"]}),"\n",(0,r.jsxs)(a.p,{children:["Start building your own queries using granular data on Dune\n",(0,r.jsx)(a.a,{href:"https://dune.com/queries?category=canonical&namespace=phala",children:"here"}),"."]}),"\n",(0,r.jsxs)(a.p,{children:["Additional curated dataset from Phala team can be found at ",(0,r.jsx)(a.code,{children:"dune.phala_network.*"})]}),"\n",(0,r.jsx)(a.h2,{id:"useful-queries",children:"Useful Queries"}),"\n",(0,r.jsx)(a.p,{children:"Some useful queries for Phala are provided:"}),"\n",(0,r.jsxs)(a.table,{children:[(0,r.jsx)(a.thead,{children:(0,r.jsxs)(a.tr,{children:[(0,r.jsx)(a.th,{children:"Title"}),(0,r.jsx)(a.th,{children:"Query"}),(0,r.jsx)(a.th,{children:"Description"})]})}),(0,r.jsxs)(a.tbody,{children:[(0,r.jsxs)(a.tr,{children:[(0,r.jsx)(a.td,{children:"Phala Computation"}),(0,r.jsx)(a.td,{children:(0,r.jsx)(a.a,{href:"https://dune.com/queries/3619434",children:"query_3619434"})}),(0,r.jsx)(a.td,{children:"This query provides an overview of the Phala network's computation, including circulation, bridge, reward, issuance, supply, value, worker count, rewards, APR, budget, and delegator count."})]}),(0,r.jsxs)(a.tr,{children:[(0,r.jsx)(a.td,{children:"Phala Recent AI Agent Contracts"}),(0,r.jsx)(a.td,{children:(0,r.jsx)(a.a,{href:"https://dune.com/queries/3743294",children:"query_3743294"})}),(0,r.jsx)(a.td,{children:"This query lists the recent AI agent contracts deployed on the Phala network, including deployer, instantiation time, code hash, stake, and staker."})]})]})]}),"\n",(0,r.jsx)(a.h2,{id:"getting-started-with-queries",children:"Getting Started with Queries"}),"\n",(0,r.jsx)(a.p,{children:"To get started with querying data from Unique, you are welcome to use the mentioned materialized\nqueries. You can use the following DuneSQL queries as examples:"}),"\n",(0,r.jsx)(a.pre,{children:(0,r.jsx)(a.code,{className:"language-sql",metastring:'title="Phala Computation" showLineNumbers',children:"SELECT\n chain,\n circulation,\n sygma_bridge,\n reward,\n COALESCE(total_issuance, total_supply) AS total_issuance,\n total_value,\n idle_worker_count,\n daily_rewards,\n average_apr,\n budget_per_share,\n delegator_count\nFROM\n dune.phala_network.dataset_phala_computation;\n"})}),"\n",(0,r.jsx)(a.p,{children:"Query result:"}),"\n",(0,r.jsx)("iframe",{src:"https://dune.com/embeds/3619434/6098180/",height:"350",width:"100%"}),"\n",(0,r.jsx)(a.p,{children:"Visualizations using the query result:"}),"\n",(0,r.jsx)("iframe",{src:"https://dune.com/embeds/3619434/6098184/",height:"350",width:"100%"}),"\n",(0,r.jsx)(a.admonition,{title:"DuneSQL Referece",type:"info",children:(0,r.jsxs)(a.p,{children:["For more information on DuneSQL, please refer to the ",(0,r.jsx)(a.a,{href:"/docs/general/dunesql-cheatsheet",children:"DuneSQL Cheatsheet"}),"\nand\n",(0,r.jsx)(a.a,{href:"https://docs.dune.com/query-engine/Functions-and-operators/index",children:"DuneSQL Official Documentation"}),"."]})})]})}function c(e={}){const{wrapper:a}={...(0,s.R)(),...e.components};return a?(0,r.jsx)(a,{...e,children:(0,r.jsx)(h,{...e})}):h(e)}},28453:(e,a,n)=>{n.d(a,{R:()=>i,x:()=>d});var r=n(96540);const s={},t=r.createContext(s);function i(e){const a=r.useContext(t);return r.useMemo((function(){return"function"==typeof e?e(a):{...a,...e}}),[a,e])}function d(e){let a;return a=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),r.createElement(t.Provider,{value:a},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/ad762f86.000b6515.js b/assets/js/ad762f86.000b6515.js new file mode 100644 index 000000000000..16262af5291b --- /dev/null +++ b/assets/js/ad762f86.000b6515.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3041],{6331:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>c,default:()=>p,frontMatter:()=>d,metadata:()=>s,toc:()=>h});const s=JSON.parse('{"id":"learn/learn-account-advanced","title":"Polkadot Accounts In-Depth","description":"Advanced Concepts about Polkadot\'s Accounts.","source":"@site/../docs/learn/learn-account-advanced.md","sourceDirName":"learn","slug":"/learn-account-advanced","permalink":"/docs/learn-account-advanced","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-account-advanced.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1727178265000,"frontMatter":{"id":"learn-account-advanced","title":"Polkadot Accounts In-Depth","sidebar_label":"Accounts","description":"Advanced Concepts about Polkadot\'s Accounts.","keywords":["account","polkadot account","polkadotjs","indices","identity","reaping","ENS","domain","ETH"],"slug":"../learn-account-advanced"},"sidebar":"docs","previous":{"title":"XCM Instructions","permalink":"/docs/learn-xcm-instructions"},"next":{"title":"Advanced Staking Concepts","permalink":"/docs/learn-staking-advanced"}}');var a=t(74848),r=t(28453),i=t(11470),o=t(19365);const d={id:"learn-account-advanced",title:"Polkadot Accounts In-Depth",sidebar_label:"Accounts",description:"Advanced Concepts about Polkadot's Accounts.",keywords:["account","polkadot account","polkadotjs","indices","identity","reaping","ENS","domain","ETH"],slug:"../learn-account-advanced"},c=void 0,l={},h=[{value:"Address Format",id:"address-format",level:2},{value:"For the Curious: How Prefixes Work",id:"for-the-curious-how-prefixes-work",level:3},{value:"Address Conversion Tools",id:"address-conversion-tools",level:2},{value:"How to Verify a Public Key's Associated Address",id:"how-to-verify-a-public-keys-associated-address",level:3},{value:"Using Subkey to Retrieve Public Key from SS58 Address",id:"using-subkey-to-retrieve-public-key-from-ss58-address",level:4},{value:"Address Verification",id:"address-verification",level:4},{value:"Consider the following example:",id:"consider-the-following-example",level:5},{value:"Portability",id:"portability",level:2},{value:"Derivation Paths",id:"derivation-paths",level:2},{value:"Soft and Hard Derivation",id:"soft-and-hard-derivation",level:3},{value:"Password Derivation",id:"password-derivation",level:3},{value:"Account Derivation on Ledger Live",id:"account-derivation-on-ledger-live",level:3},{value:"Account Derivation on Subkey and Polkadot Vault",id:"account-derivation-on-subkey-and-polkadot-vault",level:3},{value:"System Accounts",id:"system-accounts",level:2},{value:"Indices",id:"indices",level:2},{value:"Creating Accounts with Subkey",id:"creating-accounts-with-subkey",level:2},{value:"Using ENS with DOT/KSM accounts",id:"using-ens-with-dotksm-accounts",level:2},{value:"Adding via the UI",id:"adding-via-the-ui",level:3},{value:"Wallet Support",id:"wallet-support",level:3},{value:"Relevant links",id:"relevant-links",level:3},{value:"Transferring Polkadot-JS Apps Accounts/Addresses From One Computer to Another",id:"transferring-polkadot-js-apps-accountsaddresses-from-one-computer-to-another",level:2}];function u(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",h4:"h4",h5:"h5",img:"img",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,r.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.h2,{id:"address-format",children:"Address Format"}),"\n",(0,a.jsxs)(n.p,{children:["The address format used in Substrate-based chains is SS58. SS58 is a modification of Base-58-check\nfrom Bitcoin with some minor changes. Notably, the format contains an ",(0,a.jsx)(n.em,{children:"address type"})," prefix that\nidentifies an address belonging to a specific network."]}),"\n",(0,a.jsx)(n.p,{children:"For example:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["Polkadot addresses ",(0,a.jsx)(n.strong,{children:"always start with"})," the number ",(0,a.jsx)(n.strong,{children:"1"}),"."]}),"\n",(0,a.jsxs)(n.li,{children:["Kusama addresses always start with a capital letter, such as ",(0,a.jsx)(n.strong,{children:"C, D, E, F, G, H, J"}),"."]}),"\n",(0,a.jsxs)(n.li,{children:["Generic Substrate addresses ",(0,a.jsx)(n.strong,{children:"always start with"})," the number ",(0,a.jsx)(n.strong,{children:"5"}),"."]}),"\n"]}),"\n",(0,a.jsx)(n.p,{children:"These prefixes, including how to validate addresses, are embedded in the Substrate SS58 format.\nNever use regular expressions for address validation."}),"\n",(0,a.jsxs)(n.p,{children:["It's important to understand that different network formats are ",(0,a.jsx)(n.strong,{children:"merely other representations of\nthe same public key in a private-public keypair"})," generated by an address generation tool. As a\nresult, the addresses across Substrate-based chains are compatible if the format is converted\ncorrectly."]}),"\n",(0,a.jsxs)(n.p,{children:["As of Runtime 28, the default ",(0,a.jsx)(n.a,{href:"/docs/learn-accounts##address-format",children:"address format"})," is the\n",(0,a.jsx)(n.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/master/substrate/primitives/runtime/src/multiaddress.rs",children:(0,a.jsx)(n.code,{children:"MultiAddress"})}),"\ntype."]}),"\n",(0,a.jsxs)(n.p,{children:["This ",(0,a.jsx)(n.code,{children:"enum"})," is a multi-format address wrapper for on-chain accounts and allows us to describe\nPolkadot's default address format to represent many different address types. This includes ",(0,a.jsx)(n.strong,{children:"20\nbyte"}),", ",(0,a.jsx)(n.strong,{children:"32 byte"}),", and ",(0,a.jsx)(n.strong,{children:"arbitrary raw byte"})," variants. It also enhances the original\n",(0,a.jsx)(n.a,{href:"/docs/learn-accounts#indices",children:(0,a.jsx)(n.code,{children:"indices"})})," lookup."]}),"\n",(0,a.jsx)(n.admonition,{type:"info",children:(0,a.jsxs)(n.p,{children:["Many wallets allow you to convert between formats. Stand-alone tools exist as well; you can find\nthem in the ",(0,a.jsx)(n.a,{href:"#address-conversion-tools",children:"address conversion tools"})," section."]})}),"\n",(0,a.jsx)(n.h3,{id:"for-the-curious-how-prefixes-work",children:"For the Curious: How Prefixes Work"}),"\n",(0,a.jsxs)(n.p,{children:["The ",(0,a.jsx)(n.a,{href:"https://github.com/paritytech/ss58-registry/blob/main/ss58-registry.json",children:"SS58 registry"})," states\nthat:"]}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["Polkadot has an address type of ",(0,a.jsx)(n.code,{children:"00000000b"})," (",(0,a.jsx)(n.code,{children:"0"})," in decimal)."]}),"\n",(0,a.jsxs)(n.li,{children:["Kusama (Polkadot Canary) has an address type of ",(0,a.jsx)(n.code,{children:"00000010b"})," (",(0,a.jsx)(n.code,{children:"2"})," in decimal)."]}),"\n",(0,a.jsxs)(n.li,{children:["Generic Substrate has ",(0,a.jsx)(n.code,{children:"00101010b"})," as the address type (",(0,a.jsx)(n.code,{children:"42"})," in decimal)."]}),"\n"]}),"\n",(0,a.jsxs)(n.p,{children:["Because the ",(0,a.jsx)(n.code,{children:"Base58-check"})," alphabet has no number 0, the lowest value is indeed 1. So ",(0,a.jsx)(n.code,{children:"00000000b"})," is\n1 in Base58-check. If we try to\n",(0,a.jsx)(n.a,{href:"https://www.better-converter.com/Encoders-Decoders/Base58Check-to-Hexadecimal-Decoder",children:"decode"})," a\nPolkadot address like ",(0,a.jsx)(n.code,{children:"1FRMM8PEiWXYax7rpS6X4XZX1aAAxSWx1CrKTyrVYhV24fg"}),", the result is\n",(0,a.jsx)(n.code,{children:"000aff6865635ae11013a83835c019d44ec3f865145943f487ae82a8e7bed3a66b29d7"}),". The first byte is ",(0,a.jsx)(n.code,{children:"00"}),",\nwhich is indeed ",(0,a.jsx)(n.code,{children:"00000000"})," in binary and ",(0,a.jsx)(n.code,{children:"0"})," in decimal and thus matches the address type of\nPolkadot."]}),"\n",(0,a.jsxs)(n.p,{children:["Let's take a look at Substrate addresses. If we decode\n",(0,a.jsx)(n.code,{children:"5CK8D1sKNwF473wbuBP6NuhQfPaWUetNsWUNAAzVwTfxqjfr"}),", we get\n",(0,a.jsx)(n.code,{children:"2a0aff6865635ae11013a83835c019d44ec3f865145943f487ae82a8e7bed3a66b77e5"}),". The first byte is ",(0,a.jsx)(n.code,{children:"2a"}),"\nwhich when\n",(0,a.jsx)(n.a,{href:"https://www.rapidtables.com/convert/number/hex-to-decimal.html",children:"converted from hex to decimal"}),"\nis 42. 42 is ",(0,a.jsx)(n.code,{children:"00101010"})," in binary, just as the SS58 document states."]}),"\n",(0,a.jsxs)(n.p,{children:["Finally, let's look at Kusama addresses. Decoding ",(0,a.jsx)(n.code,{children:"CpjsLDC1JFyrhm3ftC9Gs4QoyrkHKhZKtK7YqGTRFtTafgp"}),"\ngives us ",(0,a.jsx)(n.code,{children:"020aff6865635ae11013a83835c019d44ec3f865145943f487ae82a8e7bed3a66b0985"})," with the first\nbyte being ",(0,a.jsx)(n.code,{children:"02"}),", just as specified. If we try a Kusama address that starts with a completely\ndifferent letter, like ",(0,a.jsx)(n.code,{children:"J4iggBtsWsb61RemU2TDWDXTNHqHNfBSAkGvVZBtn1AJV1a"}),", we still get ",(0,a.jsx)(n.code,{children:"02"})," as the\nfirst byte: ",(0,a.jsx)(n.code,{children:"02f2d606a67f58fa0b3ad2b556195a0ef905676efd4e3ec62f8fa1b8461355f1142509"}),". It seems\ncounterintuitive that some addresses always have the same prefix and others like Kusama can vary\nwildly, but it's just a quirk of Base58-check encoding."]}),"\n",(0,a.jsx)(n.h2,{id:"address-conversion-tools",children:"Address Conversion Tools"}),"\n",(0,a.jsx)(n.p,{children:"You can use the tools below to convert any SS58 address for any network for use on different\nnetworks"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"https://polkadot.subscan.io/tools/ss58_transform",children:"handy subscan tool"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"https://polkadot-address-convertor.netlify.app/",children:"simple address converter"})}),"\n"]}),"\n",(0,a.jsx)(n.h3,{id:"how-to-verify-a-public-keys-associated-address",children:"How to Verify a Public Key's Associated Address"}),"\n",(0,a.jsx)(n.p,{children:"You can verify your public key's associated address through a series of inspection steps, where the\nkey is a base-16 (hexadecimal) address."}),"\n",(0,a.jsx)(n.h4,{id:"using-subkey-to-retrieve-public-key-from-ss58-address",children:"Using Subkey to Retrieve Public Key from SS58 Address"}),"\n",(0,a.jsxs)(n.p,{children:["This is to showcase that the ",(0,a.jsx)(n.strong,{children:'SS58 address is based on the public key (aka "Account ID")'})]}),"\n",(0,a.jsxs)(n.p,{children:["The Subkey Tool's The\n",(0,a.jsx)(n.a,{href:"https://docs.substrate.io/reference/command-line-tools/subkey/#inspecting-keys",children:"Inspecting Keys"}),"\nsection explains how to use the ",(0,a.jsx)(n.code,{children:"inspect"})," command to recalculate your key pair's public key and\naddress."]}),"\n",(0,a.jsx)(n.p,{children:"Start by inspecting your account's Polkadot address by running the inspect command against your\naccount's address:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"$ subkey inspect 1a1LcBX6hGPKg5aQ6DXZpAHCCzWjckhea4sz3P1PvL3oc4F\n\nPublic Key URI `1a1LcBX6hGPKg5aQ6DXZpAHCCzWjckhea4sz3P1PvL3oc4F` is account:\n Network ID/version: polkadot\n Public key (hex): 0x192c3c7e5789b461fbf1c7f614ba5eed0b22efc507cda60a5e7fda8e046bcdce\n Account ID: 0x192c3c7e5789b461fbf1c7f614ba5eed0b22efc507cda60a5e7fda8e046bcdce\n SS58 Address: 1a1LcBX6hGPKg5aQ6DXZpAHCCzWjckhea4sz3P1PvL3oc4F\n"})}),"\n",(0,a.jsx)(n.p,{children:'Take note of the hexadecimal string for "Public key (hex)". This is your account\'s public key.'}),"\n",(0,a.jsxs)(n.p,{children:["Running the ",(0,a.jsx)(n.code,{children:"inspect"})," command on your public key along with the ",(0,a.jsx)(n.code,{children:"--public"})," parameter the SS58\naddress for the default network (substrate) is returned."]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"$ subkey inspect --public 0x192c3c7e5789b461fbf1c7f614ba5eed0b22efc507cda60a5e7fda8e046bcdce\n\nNetwork ID/version: substrate\n Public key (hex): 0x192c3c7e5789b461fbf1c7f614ba5eed0b22efc507cda60a5e7fda8e046bcdce\n Account ID: 0x192c3c7e5789b461fbf1c7f614ba5eed0b22efc507cda60a5e7fda8e046bcdce\n Public key (SS58): 5CdiCGvTEuzut954STAXRfL8Lazs3KCZa5LPpkPeqqJXdTHp\n SS58 Address: 5CdiCGvTEuzut954STAXRfL8Lazs3KCZa5LPpkPeqqJXdTHp\n"})}),"\n",(0,a.jsxs)(n.p,{children:["Using the ",(0,a.jsx)(n.code,{children:"--network"})," flag, you can define the network that you would like to inspect, where the\nSS58 address will be based on that network. Now, running the ",(0,a.jsx)(n.code,{children:"inspect"})," command with\n",(0,a.jsx)(n.code,{children:"--network polkadot"})," return your original Polkadot address, thus verifying the public key."]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"$ subkey inspect --network polkadot 5CdiCGvTEuzut954STAXRfL8Lazs3KCZa5LPpkPeqqJXdTHp\n\nPublic Key URI `5CdiCGvTEuzut954STAXRfL8Lazs3KCZa5LPpkPeqqJXdTHp` is account:\n Network ID/version: polkadot\n Public key (hex): 0x192c3c7e5789b461fbf1c7f614ba5eed0b22efc507cda60a5e7fda8e046bcdce\n Account ID: 0x192c3c7e5789b461fbf1c7f614ba5eed0b22efc507cda60a5e7fda8e046bcdce\n Public key (SS58): 1a1LcBX6hGPKg5aQ6DXZpAHCCzWjckhea4sz3P1PvL3oc4F\n SS58 Address: 1a1LcBX6hGPKg5aQ6DXZpAHCCzWjckhea4sz3P1PvL3oc4F\n"})}),"\n",(0,a.jsxs)(n.p,{children:["You will notice that the Subkey Tool recognizes the correct address network and returns the\nassociated public key. The public key is returned as a hexadecimal string (i.e. prefixed with\n",(0,a.jsx)(n.strong,{children:'"0x"'}),"). ",(0,a.jsx)(n.strong,{children:"For both SS58 addresses, the same public key is returned."})]}),"\n",(0,a.jsx)(n.h4,{id:"address-verification",children:"Address Verification"}),"\n",(0,a.jsx)(n.h5,{id:"consider-the-following-example",children:"Consider the following example:"}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.img,{alt:"19",src:t(66881).A+"",width:"739",height:"543"})}),"\n",(0,a.jsxs)(n.p,{children:["If you are comfortable enough to distinguish between each account parameter, you can prefix the\npublic-key string with ",(0,a.jsx)(n.strong,{children:'"0x"'})," on your own:"]}),"\n",(0,a.jsxs)(n.p,{children:["From:\n",(0,a.jsx)(n.code,{children:"Pay DOTs to the Polkadot account:192c3c7e5789b461fbf1c7f614ba5eed0b22efc507cda60a5e7fda8e046bcdce"}),',\nwe prefix the address by "0x" ->\n',(0,a.jsx)(n.code,{children:"0x192c3c7e5789b461fbf1c7f614ba5eed0b22efc507cda60a5e7fda8e046bcdce"}),"."]}),"\n",(0,a.jsxs)(n.p,{children:["Using the ",(0,a.jsx)(n.a,{href:"https://polkadot.subscan.io/tools/ss58_transform",children:"handy subscan tool"}),', you can verify\nboth address associations to your public key. Copy your public key into the "Input Account or Public\nKey" textbox and click "Transform" at the bottom. On the right-hand side, the addresses for Polkadot\nand Substrate that are returned based on your public key should match the ones you inspected.']}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.img,{alt:"20",src:t(52650).A+"",width:"1505",height:"759"})}),"\n",(0,a.jsx)(n.admonition,{type:"note",children:(0,a.jsx)(n.p,{children:"You may have to scroll down to the bottom of the menu to find the Substrate address based on the\nmenu listings. You will notice that many networks that also use the same Substrate address."})}),"\n",(0,a.jsxs)(n.p,{children:["You can verify your public key verification by recalling that Polkadot addresses start with a '1',\nwhereas Substrate addresses generally start with a '5' (Kusama addresses start with a capital\nletter). See ",(0,a.jsx)(n.a,{href:"/docs/learn-accounts#address-format",children:"Addresses"})," for more details."]}),"\n",(0,a.jsxs)(n.p,{children:["Furthermore, the ",(0,a.jsx)(n.a,{href:"https://github.com/w3f/utility-scripts",children:"Utility Scripts"})," can be referenced for how\nthe verification is performed:\n",(0,a.jsx)(n.a,{href:"https://github.com/w3f/utility-scripts/blob/master/src/misc/pubkeyToAddress.js",children:"pubkeyToAddress.js"}),"\ndemonstrates how a single public key interprets a Polkadot, Substrate, or Kusama address."]}),"\n",(0,a.jsx)(n.h2,{id:"portability",children:"Portability"}),"\n",(0,a.jsx)(n.p,{children:"Portability is the ability to use a mnemonic phrase or seed across multiple wallets."}),"\n",(0,a.jsx)(n.p,{children:"Most wallets generate a mnemonic phrase for users to back up their wallets and generate a private\nkey from the mnemonic. Not all wallets use the same algorithm to convert from mnemonic phrase to\nprivate key, which affects the ability to use the same mnemonic phrase in multiple wallets. Wallets\nthat use different measures will arrive at a different set of addresses from the exact mnemonic\nphrase."}),"\n",(0,a.jsx)(n.admonition,{title:"Not all wallets use the same algorithm to convert from mnemonic phrase to private key",type:"danger",children:(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.a,{href:"https://docs.substrate.io/reference/command-line-tools/subkey/",children:"Subkey"})," and Polkadot-JS based\nwallets use the BIP39 dictionary for mnemonic generation, but use the entropy byte array to generate\nthe private key, while full BIP39 wallets (like Ledger) use 2048 rounds of PBKDF2 on the mnemonic.\nThe same mnemonic may generate different private keys on other wallets due to the various\ncryptographic algorithms used. See\n",(0,a.jsx)(n.a,{href:"https://github.com/paritytech/substrate-bip39",children:"Substrate BIP39 Repo"})," for more information."]})}),"\n",(0,a.jsx)(n.p,{children:"Portability depends on several factors:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:"Derivation path"}),"\n",(0,a.jsx)(n.li,{children:"Mnemonic format"}),"\n",(0,a.jsx)(n.li,{children:"Seed derivation"}),"\n",(0,a.jsx)(n.li,{children:"Signature scheme"}),"\n"]}),"\n",(0,a.jsx)(n.p,{children:"To use the exact mnemonic across multiple wallets, ensure they follow compatible methods for\ngenerating keys and signing messages. If you are still looking for understandable documentation,\ncontact the project maintainers."}),"\n",(0,a.jsxs)(n.table,{children:[(0,a.jsx)(n.thead,{children:(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.th,{style:{textAlign:"left"}}),(0,a.jsx)(n.th,{style:{textAlign:"center"},children:"Mnemonic Format"}),(0,a.jsx)(n.th,{style:{textAlign:"center"},children:"Derivation Path"}),(0,a.jsx)(n.th,{style:{textAlign:"center"},children:"Seed Derivation"}),(0,a.jsx)(n.th,{style:{textAlign:"center"},children:"Signature Support"})]})}),(0,a.jsxs)(n.tbody,{children:[(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{style:{textAlign:"left"},children:"Polkadot-JS Extension"}),(0,a.jsx)(n.td,{style:{textAlign:"center"},children:"Standard"}),(0,a.jsx)(n.td,{style:{textAlign:"center"},children:"User-Defined"}),(0,a.jsx)(n.td,{style:{textAlign:"center"},children:"BIP32"}),(0,a.jsx)(n.td,{style:{textAlign:"center"},children:"sr25519"})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{style:{textAlign:"left"},children:"Polkadot-JS Apps"}),(0,a.jsx)(n.td,{style:{textAlign:"center"},children:"Standard*"}),(0,a.jsx)(n.td,{style:{textAlign:"center"},children:"User-Defined"}),(0,a.jsx)(n.td,{style:{textAlign:"center"},children:"BIP32"}),(0,a.jsx)(n.td,{style:{textAlign:"center"},children:"sr25519, ed25519, secp256k"})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{style:{textAlign:"left"},children:"Ledger"}),(0,a.jsx)(n.td,{style:{textAlign:"center"},children:"BIP39"}),(0,a.jsx)(n.td,{style:{textAlign:"center"},children:"BIP44\u2020"}),(0,a.jsx)(n.td,{style:{textAlign:"center"},children:"BIP32\u2021"}),(0,a.jsx)(n.td,{style:{textAlign:"center"},children:"ed25519\xa7"})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{style:{textAlign:"left"},children:"Subkey"}),(0,a.jsx)(n.td,{style:{textAlign:"center"},children:"Standard*"}),(0,a.jsx)(n.td,{style:{textAlign:"center"},children:"User-Defined"}),(0,a.jsx)(n.td,{style:{textAlign:"center"},children:"BIP32"}),(0,a.jsx)(n.td,{style:{textAlign:"center"},children:"sr25519, ed25519, secp256k1"})]})]})]}),"\n",(0,a.jsxs)(n.p,{children:["* Ed25519 keys have ",(0,a.jsx)(n.a,{href:"https://github.com/paritytech/substrate-bip39",children:"limited compatibility"})," with\nBIP39."]}),"\n",(0,a.jsxs)(n.p,{children:["\u2020 ",(0,a.jsx)(n.a,{href:"https://github.com/satoshilabs/slips/blob/master/slip-0044.md",children:"BIP44 Registry"})]}),"\n",(0,a.jsxs)(n.p,{children:["\u2021 Ed25519 and BIP32 based on\n",(0,a.jsx)(n.a,{href:"https://github.com/LedgerHQ/orakolo/blob/master/papers/Ed25519_BIP%20Final.pdf",children:"Khovratovich"})]}),"\n",(0,a.jsx)(n.p,{children:"\xa7 Sr25519 planned"}),"\n",(0,a.jsx)(n.h2,{id:"derivation-paths",children:"Derivation Paths"}),"\n",(0,a.jsx)(n.p,{children:"If you want to create and manage several accounts on the network using the same seed, you can use\nderivation paths. We can think of the derived accounts as child accounts of the root account created\nusing the original mnemonic seed phrase."}),"\n",(0,a.jsx)(n.h3,{id:"soft-and-hard-derivation",children:"Soft and Hard Derivation"}),"\n",(0,a.jsx)(n.p,{children:"A soft derivation allows someone to potentially \"go backward\u201d to figure out the initial account's\nprivate key if they know the derived account's private key. It is also possible to determine that\ndifferent accounts generated from the same seed are linked to that seed. A hard derivation path does\nnot allow either of these - even if you know a derived private key, it's not feasible to figure out\nthe private key of the root address, and it's impossible to prove that the first account is linked\nwith the second. These derivation methods have their use cases, given that the private keys for all\nthe derived accounts are fully secure. Unless you have a specific need for a soft derivation, it is\nrecommended to generate the account using a hard derivation path."}),"\n",(0,a.jsxs)(n.p,{children:["Many Polkadot key generation tools support hard and soft derivation. For instance, if you intend to\ncreate an account to be used on the relay chain, you can derive a ",(0,a.jsx)(n.strong,{children:"hard key"})," child account using\n",(0,a.jsx)(n.strong,{children:"//"})," after the mnemonic phrase."]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"'caution juice atom organ advance problem want pledge someone senior holiday very//0'\n"})}),"\n",(0,a.jsxs)(n.p,{children:["and a ",(0,a.jsx)(n.strong,{children:"soft key"})," child account using ",(0,a.jsx)(n.strong,{children:"/"})," after the mnemonic phrase"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"'caution juice atom organ advance problem want pledge someone senior holiday very/0'\n"})}),"\n",(0,a.jsxs)(n.p,{children:["If you want to create another account using the Polkadot chain using the same seed, you can change\nthe number at the end of the string above. For example, ",(0,a.jsx)(n.code,{children:"/1"}),", ",(0,a.jsx)(n.code,{children:"/2"}),", and ",(0,a.jsx)(n.code,{children:"/3"})," will create different\nderived accounts."]}),"\n",(0,a.jsxs)(n.p,{children:["You can use any letters or numbers in the derivation path as long as they make sense to you; they do\nnot have to follow any specific pattern. You may combine multiple derivations in your path, as well.\nFor instance, ",(0,a.jsx)(n.code,{children:"//bill//account//1"})," and ",(0,a.jsx)(n.code,{children:"//john/polkadot/initial"})," are both valid. To recreate a\nderived account, you must know both the seed and the derivation path, so you should either use a\nwell-defined sequence (e.g. //0, //1, //2...) or be sure to write down any derivation paths you use."]}),"\n",(0,a.jsxs)(n.p,{children:["See the ",(0,a.jsx)(n.a,{href:"https://docs.substrate.io/reference/command-line-tools/subkey/",children:"Subkey documentation"})," for\ndetails and examples of derivation path formats. The Polkadot-JS Apps and Extension and Parity\nSigner support custom derivation paths using the same syntax as Subkey."]}),"\n",(0,a.jsxs)(n.p,{children:["Some wallets will automatically add derivation paths to the end of the generated mnemonic phrase.\nThis will generate separate seeds for different paths, allowing separate signing keys with the same\nmnemonic, e.g. ",(0,a.jsx)(n.code,{children:"//polkadot"})," and ",(0,a.jsx)(n.code,{children:"//kusama"}),". Although you may\ncorrectly save the mnemonic phrase, using it in another wallet will generate the same addresses only\nif both wallets use the same derivation paths."]}),"\n",(0,a.jsxs)(n.p,{children:["Polkadot and Kusama both have paths registered in the\n",(0,a.jsx)(n.a,{href:"https://github.com/satoshilabs/slips/blob/master/slip-0044.md",children:"BIP44 registry"}),"."]}),"\n",(0,a.jsx)(n.admonition,{type:"warning",children:(0,a.jsxs)(n.p,{children:["You must have the ",(0,a.jsx)(n.em,{children:"parent"})," private key and the derivation path to arrive at the key for an address.\nOnly use custom derivation paths if you are comfortable with your knowledge of this topic."]})}),"\n",(0,a.jsx)(n.h3,{id:"password-derivation",children:"Password Derivation"}),"\n",(0,a.jsxs)(n.p,{children:["There is an additional type of derivation called password derivation. On Polkadot you can derive a\n",(0,a.jsx)(n.strong,{children:"password key"})," account using ",(0,a.jsx)(n.strong,{children:"///"})," after the mnemonic phrase"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"'caution juice atom organ advance problem want pledge someone senior holiday very///0'\n"})}),"\n",(0,a.jsxs)(n.p,{children:["In this type of derivation, if the mnemonic phrase leaks, accounts cannot be derived without the\ninitial password. In fact, for soft- and hard-derived accounts, if someone knows the mnemonic phrase\nand the derivation path, they will have access to your account. For password-derived accounts, the\npassword is applied on the derivation path. You can know the mnemonic phrase and the derivation\npath, but without the password, it is impossible to access the account. In mathematical terms, if we\nhave a ",(0,a.jsx)(n.code,{children:"written derivation path"})," and a ",(0,a.jsx)(n.code,{children:"password"}),", we can calculate the ",(0,a.jsx)(n.code,{children:"real derivation path"})," as\n",(0,a.jsx)(n.code,{children:"f(written derivation path, password)"}),", where ",(0,a.jsx)(n.code,{children:"f"})," is a function. We can then calculate the\n",(0,a.jsx)(n.code,{children:"account key pair"})," using ",(0,a.jsx)(n.code,{children:"f(seed, real derivation path)"}),". Unlike hard and soft derivations that can\nbe mixed, only a single password should be specified per derivation."]}),"\n",(0,a.jsx)(n.admonition,{type:"info",children:(0,a.jsx)(n.p,{children:"Password-derived account are as secure as the chosen password."})}),"\n",(0,a.jsxs)(n.h3,{id:"account-derivation-on-ledger-live",children:["Account Derivation on ",(0,a.jsx)(n.a,{href:"/docs/ledger",children:"Ledger"})," Live"]}),"\n",(0,a.jsxs)(n.p,{children:["Ledger Live will only show the main account with BIP44 path 44'/354'/0'/0'/0'. This means that if\nyou created a derived account with a derivation path 44'/354'/0'/0'/1' on a wallet or extension, it\nwill not be displayed on the Ledger Live App. Consequently, it is not possible to transact with\nderived accounts using the Ledger Live App, but it is possible to do so using Polkadot-JS. Check\n",(0,a.jsx)(n.a,{href:"/docs/learn-accounts",children:"the accounts page"})," for more information about derived accounts and\nderivation paths."]}),"\n",(0,a.jsxs)(n.p,{children:["Note that you cannot import Kusama Ledger accounts in Ledger Live. To see Kusama account balances,\nyou must import your ledger account into a ",(0,a.jsx)(n.a,{href:"./wallets",children:(0,a.jsx)(n.strong,{children:"wallet"})}),"."]}),"\n",(0,a.jsxs)(n.h3,{id:"account-derivation-on-subkey-and-polkadot-vault",children:["Account Derivation on ",(0,a.jsx)(n.a,{href:"#creating-accounts-with-subkey",children:"Subkey"})," and ",(0,a.jsx)(n.a,{href:"/docs/polkadot-vault",children:"Polkadot Vault"})]}),"\n",(0,a.jsx)(n.p,{children:"The Subkey tool and Polkadot Vault App use the following Polkadot Standard Hard Derivation scheme:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.code,{children:"//network"})," as the primary account for ",(0,a.jsx)(n.code,{children:"network"}),", named according to ",(0,a.jsx)(n.code,{children:"network"}),"'s named chain\nspecification","\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.code,{children:"//network//0"}),", ",(0,a.jsx)(n.code,{children:"//network//1"}),", ... as the secondary high-security accounts for ",(0,a.jsx)(n.code,{children:"network"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,a.jsxs)(n.p,{children:["For example, the Vault app will generate a new account from a ",(0,a.jsx)(n.code,{children:"SEED PHRASE"}),", and for each network\nwill create a derived child account from that seed. For the default networks Polkadot, Kusama and\nWestend the derivation path will be:"]}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.code,{children:"SEED PHRASE//polkadot"})," for Polkadot, with ",(0,a.jsx)(n.code,{children:"SEED PHRASE//polkadot//0"})," as the first secondary\nhigh-security account"]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.code,{children:"SEED PHRASE//kusama"})," for Kusama, with ",(0,a.jsx)(n.code,{children:"SEED PHRASE//kusama//0"})," as the first secondary\nhigh-security account"]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.code,{children:"SEED PHRASE//westend"})," for Westend, with ",(0,a.jsx)(n.code,{children:"SEED PHRASE//westend//0"})," as the first secondary\nhigh-security account"]}),"\n"]}),"\n",(0,a.jsx)(n.p,{children:"Additionally, although it is not strictly necessary, users can adopt the following good practice\nscheme:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.code,{children:"//network//pub"})," as the primary high-security public account for ",(0,a.jsx)(n.code,{children:"network"}),' (the one the user is\nhappy to be associated with their "real" ID)',"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.code,{children:"//network//pub//0"}),", ",(0,a.jsx)(n.code,{children:"//network//pub//0"}),", ... as the secondary high-security public accounts for\n",(0,a.jsx)(n.code,{children:"network"})]}),"\n"]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.code,{children:"//network//hot"})," as the primary low-security account for ",(0,a.jsx)(n.code,{children:"network"})," (the one whose secret key the\nuser exports from the Vault app to carry on an internet-connected device)","\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.code,{children:"//network//hot//0"}),", ",(0,a.jsx)(n.code,{children:"//network//hot//1"}),", ... as the secondary low-security accounts for\n",(0,a.jsx)(n.code,{children:"network"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,a.jsx)(n.admonition,{type:"info",children:(0,a.jsxs)(n.p,{children:["For more information about account derivation best practices, see\n",(0,a.jsx)(n.a,{href:"https://forum.polkadot.network/t/polkadot-standards-proposal-psp-to-define-hierarchical-deterministic-hd-key-derivation-paths/2941/2",children:"this post"}),"\non the Polkadot Forum."]})}),"\n",(0,a.jsx)(n.h2,{id:"system-accounts",children:"System Accounts"}),"\n",(0,a.jsxs)(n.p,{children:["As the word suggests, system accounts are used by the system. They are used, for example, for the\ntreasury, crowdloans, and nomination pools. From the point of view of the runtime, these accounts\nare like any other account on-chain. These special system accounts are just public keys, with the\nprivate key being unknown (and unattainable). So, that means that only the pallet itself can\ninteract with this account. These accounts can never issue a signed\n",(0,a.jsx)(n.a,{href:"/docs/learn-transactions",children:"extrinsic"})," since they do not have a private key."]}),"\n",(0,a.jsx)(n.p,{children:"Explore the main system accounts below."}),"\n",(0,a.jsxs)(i.A,{groupId:"system",values:[{label:"Polkadot",value:"polkadot"},{label:"Kusama",value:"kusama"}],children:[(0,a.jsx)(o.A,{value:"polkadot",children:(0,a.jsxs)(n.p,{children:["Treasury account address - ",(0,a.jsx)(n.code,{children:"13UVJyLnbVp9RBZYFwFGyDvVd1y27Tt8tkntv6Q7JVPhFsTB"})]})}),(0,a.jsx)(o.A,{value:"kusama",children:(0,a.jsxs)(n.p,{children:["Treasury account address - ",(0,a.jsx)(n.code,{children:"F3opxRbN5ZbjJNU511Kj2TLuzFcDq9BGduA9TgiECafpg29"})]})})]}),"\n",(0,a.jsxs)(n.p,{children:["You can view the existing system accounts on\n",(0,a.jsx)(n.a,{href:"https://polkadot.subscan.io/account_list?role=module",children:"Subscan"}),"."]}),"\n",(0,a.jsxs)(n.p,{children:['Let us take a look at how system accounts are generated under the hood. For instance, to generate\nthe treasury account, the raw bytes of the strings "modl" and "py/trsry" are combined to create the\n',(0,a.jsx)(n.code,{children:"AccountID"}),". For more information, check the post on Substrate StackExchange on\n",(0,a.jsx)(n.a,{href:"https://substrate.stackexchange.com/questions/536/how-do-treasury-accounts-compare-to-end-user-accounts-in-frame",children:"Treasury accounts"}),'.\nSimilarly, to generate the crowdloan account, the raw bytes of the strings "modl" and "py/cfund"\nalong with the fund index are combined to create the ',(0,a.jsx)(n.code,{children:"AccountID"}),". Similar logic applies to\nnomination pool and parachain accounts as well."]}),"\n",(0,a.jsx)(n.h2,{id:"indices",children:"Indices"}),"\n",(0,a.jsxs)(n.p,{children:["Polkadot addresses can have indices. An index is like a short and easy-to-remember version of an\naddress. Claiming an index requires ",(0,a.jsx)(n.a,{href:"/docs/chain-state-values#index-deposit",children:"a deposit"}),"\nreleased when the index is cleared. Any index can be claimed if it is not taken by someone else."]}),"\n",(0,a.jsxs)(n.p,{children:["But what if an account gets reaped, as explained above? In that case, the index is emptied. In other\nwords, the slot frees up again, making it available for anyone to claim. It is possible to ",(0,a.jsx)(n.em,{children:"freeze"}),"\nan index and permanently assign it to an address. ",(0,a.jsx)(n.strong,{children:"This action consumes a deposit, and the index\nwill be permanently bound to the address with no option to release it."})]}),"\n",(0,a.jsx)(n.admonition,{title:"Lookup Account Index on-chain",type:"note",children:(0,a.jsx)(n.p,{children:"When someone shares their account index, their actual account address on-chain can be looked up\nthrough Polkadot-JS Apps UI > Developer > Chain state > Storage and selecting state query on indices\npallet for the account corresponding to the index."})}),"\n",(0,a.jsxs)(n.p,{children:["Here is an example snapshot that shows how to lookup the corresponding account address of the\naccount index 1988 on\n",(0,a.jsx)(n.a,{href:"/docs/maintain-networks#westend-test-network",children:"Westend network (Polkadot Test Network)"}),",\nusing Polkadot-JS Apps UI. The output shows the account address, deposit amount, and a boolean flag\nindicating whether this is claimed permanently."]}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.img,{alt:"query account index",src:t(24210).A+"",width:"2012",height:"998"})}),"\n",(0,a.jsxs)(n.p,{children:["Submit a ",(0,a.jsx)(n.code,{children:"claim"})," extrinsic to the ",(0,a.jsx)(n.code,{children:"indices"})," pallet to register an index. The easiest way to do this\nis via Polkadot-JS UI through the ",(0,a.jsx)(n.em,{children:"Developer -> Extrinsics"})," menu:"]}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.img,{alt:"Indices extrinsics",src:t(31085).A+"",width:"786",height:"386"})}),"\n",(0,a.jsxs)(n.p,{children:["To find available indices to claim on Polkadot or Kusama,\n",(0,a.jsx)(n.a,{href:"https://www.shawntabrizi.com/substrate-js-utilities/indices/",children:"this helper tool may come in handy"}),"."]}),"\n",(0,a.jsxs)(n.p,{children:["For keeping the index permanently, you can follow up with a ",(0,a.jsx)(n.code,{children:"freeze"})," extrinsic as mentioned above."]}),"\n",(0,a.jsx)(n.h2,{id:"creating-accounts-with-subkey",children:"Creating Accounts with Subkey"}),"\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/substrate/bin/utils/subkey",children:"Subkey"})," is\nrecommended for technically advanced users comfortable with the command line and compiling Rust\ncode. Subkey lets you generate keys on any device that can compile the code. Subkey may also be\nuseful for automated account generation using an air-gapped device. It is not recommended for\ngeneral users. Follow the instructions in the\n",(0,a.jsx)(n.a,{href:"https://docs.substrate.io/reference/command-line-tools/subkey/",children:"Subkey documentation"}),"."]}),"\n",(0,a.jsx)(n.admonition,{type:"info",children:(0,a.jsxs)(n.p,{children:["For guidelines about how to create an account using Subkey, see\n",(0,a.jsx)(n.a,{href:"https://youtu.be/SWfE_EwxgIU",children:(0,a.jsx)(n.strong,{children:"this video tutorial"})})," and visit\n",(0,a.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000180519-how-to-create-an-account-in-subkey",children:(0,a.jsx)(n.strong,{children:"this support article"})}),"."]})}),"\n",(0,a.jsx)(n.h2,{id:"using-ens-with-dotksm-accounts",children:"Using ENS with DOT/KSM accounts"}),"\n",(0,a.jsxs)(n.p,{children:["ENS (Ethereum Name Service) is a distributed and open system of smart contracts on the Ethereum\nblockchain which allows users to claim domain names like ",(0,a.jsx)(n.code,{children:"bruno.eth"}),"."]}),"\n",(0,a.jsx)(n.p,{children:"The ENS is equivalent to a DNS (Domain Name System) domain. Instead, it offers a decentralized and\nsecure way to translate text via smart contracts. Supporting wallets can then allow senders to input\nENS domains instead of long and unwieldy addresses. This prevents phishing, fraud, and typos and\nadds a layer of usability to the regular wallet user experience."}),"\n",(0,a.jsx)(n.admonition,{type:"note",children:(0,a.jsxs)(n.p,{children:["You will need an ENS name and an Ethereum account with some ether to follow along with this guide.\nTo register an ENS name, visit the ",(0,a.jsx)(n.a,{href:"https://app.ens.domains",children:"ENS App"})," or any number of subdomain\nregistrars like ",(0,a.jsx)(n.a,{href:"https://nameth.io",children:"Nameth"}),". Note that if you're using an older ENS name, you should\nmake sure you're using the\n",(0,a.jsx)(n.a,{href:"https://medium.com/the-ethereum-name-service/ens-registry-migration-is-over-now-what-a-few-things-to-know-fb05f921872a",children:"new resolver"}),".\nVisiting the ENS App will warn you about this. You will also need some way to use your Ethereum\naddress - following this guide on a personal computer is recommended. Wallets like\n",(0,a.jsx)(n.a,{href:"https://frame.sh/",children:"Frame"})," and ",(0,a.jsx)(n.a,{href:"https://metamask.io",children:"Metamask"})," are safe and will make interacting\nwith the Ethereum blockchain through your browser very easy."]})}),"\n",(0,a.jsx)(n.p,{children:"Despite living on the Ethereum blockchain, the ENS system has multi-chain support. In this guide,\nyou'll go through the process of adding a KSM and DOT address to ENS. We cover both KSM and DOT to\nshow two different approaches."}),"\n",(0,a.jsx)(n.admonition,{type:"note",children:(0,a.jsx)(n.p,{children:"DOT can currently only be added using the Resolver method. KSM can be added through both methods are\ndescribed below."})}),"\n",(0,a.jsxs)(n.p,{children:["This guide is also available in video format ",(0,a.jsx)(n.a,{href:"https://youtu.be/XKjZk-5_mQc",children:"on YouTube"}),"."]}),"\n",(0,a.jsx)(n.h3,{id:"adding-via-the-ui",children:"Adding via the UI"}),"\n",(0,a.jsxs)(n.p,{children:["The ",(0,a.jsx)(n.a,{href:"https://app.ens.domains",children:"ENS App"})," allows an ENS domain owner to inspect all records bound to\nthe domain, and to add new ones."]}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.img,{alt:"bruno.eth domain name in the ENS application",src:t(59109).A+"",width:"977",height:"842"})}),"\n",(0,a.jsxs)(n.p,{children:["In the example above, the domain ",(0,a.jsx)(n.code,{children:"bruno.eth"})," has an Ethereum and a Bitcoin address attached. Let's\nattach a KSM account. First, click the ",(0,a.jsx)(n.code,{children:"[+]"})," icon in the Records tab."]}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.img,{alt:"The plus icon in the records tab",src:t(5502).A+"",width:"951",height:"190"})}),"\n",(0,a.jsx)(n.p,{children:'Then, pick "Other Addresses", "KSM", and input the Kusama address:'}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.img,{alt:"Inputs needed to register a KSM address",src:t(98863).A+"",width:"914",height:"224"})}),"\n",(0,a.jsx)(n.p,{children:"After clicking Save, your Ethereum wallet will ask you to confirm a transaction. Once processed, the\nrecord will show up on the domain's page:"}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.img,{alt:"KSM address now visible in bruno.eth records",src:t(576).A+"",width:"936",height:"367"})}),"\n",(0,a.jsx)(n.p,{children:"The exact process applies to adding your DOT address."}),"\n",(0,a.jsx)(n.p,{children:"Once the transaction is confirmed, your address will be bound to your ENS domain."}),"\n",(0,a.jsx)(n.h3,{id:"wallet-support",children:"Wallet Support"}),"\n",(0,a.jsxs)(n.p,{children:["There is no wallet support for ENS names for either KSM or DOT at this time, but the crypto\naccounting and portfolio application ",(0,a.jsx)(n.a,{href:"https://rotki.com/",children:"Rotki"})," does support KSM ENS resolution."]}),"\n",(0,a.jsx)(n.h3,{id:"relevant-links",children:"Relevant links"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"https://docs.ens.domains/",children:"ENS docs"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"https://medium.com/the-ethereum-name-service/ens-launches-multi-coin-support-15-wallets-to-integrate-92518ab20599",children:"ENS Multi-chain announcement"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"https://github.com/ensdomains/address-encoder",children:"Address encoder"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"https://swolfeyes.github.io/ethereum-namehash-calculator/",children:"Namehash calculator"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"https://www.shawntabrizi.com/substrate-js-utilities/",children:"Address to pubkey converter"})}),"\n"]}),"\n",(0,a.jsx)(n.h2,{id:"transferring-polkadot-js-apps-accountsaddresses-from-one-computer-to-another",children:"Transferring Polkadot-JS Apps Accounts/Addresses From One Computer to Another"}),"\n",(0,a.jsx)(n.admonition,{type:"caution",children:(0,a.jsx)(n.p,{children:"This will overwrite existing accounts with the same pubkey on your new computer. This generally\nshould not make a difference (since it can still access the same account), but it might if you have\ne.g. an account that was stored externally in the extension on the old computer but was created\ndirectly in the browser on the new one."})}),"\n",(0,a.jsx)(n.p,{children:"This has been tested on Brave and Chrome, but not other browsers."}),"\n",(0,a.jsxs)(n.ol,{children:["\n",(0,a.jsx)(n.li,{children:"Go to Polkadot-JS Apps"}),"\n",(0,a.jsx)(n.li,{children:"Go to JavaScript console on the browser (Available in Developer Tools)"}),"\n",(0,a.jsx)(n.li,{children:"Type in the command:"}),"\n"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"JSON.stringify(localStorage)\n"})}),"\n",(0,a.jsxs)(n.ol,{start:"4",children:["\n",(0,a.jsx)(n.li,{children:"Copy and paste the returned string to a text editor and save the file."}),"\n",(0,a.jsx)(n.li,{children:"Check that the string you pasted begins and ends with a tick mark ('). If not, add one to the\nbeginning and end."}),"\n",(0,a.jsx)(n.li,{children:"Save and send that file with the copied string to the new computer."}),"\n",(0,a.jsx)(n.li,{children:"On the new computer, go to Polkadot-JS Apps"}),"\n",(0,a.jsx)(n.li,{children:"Open the Javascript console on the browser (Available in Developer Tools)"}),"\n",(0,a.jsx)(n.li,{children:"Set a variable raw equal to the string from the text file"}),"\n"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"raw = ... copy-pasted json from original computer ...\n"})}),"\n",(0,a.jsxs)(n.ol,{start:"10",children:["\n",(0,a.jsx)(n.li,{children:"Run the following code on the console:"}),"\n"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"accounts = JSON.parse(raw);\nfor (var key in accounts) {\n if (accounts.hasOwnProperty(key)) {\n val = JSON.stringify(accounts[key]).replace(/\\\\/g,'').slice(1,-1);\n console.log(key + \" -> \" + val);\n localStorage.setItem(key, val);\n }\n}\n"})}),"\n",(0,a.jsxs)(n.ol,{start:"11",children:["\n",(0,a.jsx)(n.li,{children:"Refresh Polkadot-JS App browser and check the Accounts and Addresses pages. All of your accounts\nand addresses should now be available."}),"\n"]})]})}function p(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(u,{...e})}):u(e)}},19365:(e,n,t)=>{t.d(n,{A:()=>i});t(96540);var s=t(34164);const a={tabItem:"tabItem_Ymn6"};var r=t(74848);function i(e){var n=e.children,t=e.hidden,i=e.className;return(0,r.jsx)("div",{role:"tabpanel",className:(0,s.A)(a.tabItem,i),hidden:t,children:n})}},11470:(e,n,t)=>{t.d(n,{A:()=>A});var s=t(96540),a=t(34164),r=t(23104),i=t(56347),o=t(205),d=t(57485),c=t(31682),l=t(75376);function h(e){var n,t;return null!=(n=null==(t=s.Children.toArray(e).filter((function(e){return"\n"!==e})).map((function(e){if(!e||(0,s.isValidElement)(e)&&((n=e.props)&&"object"==typeof n&&"value"in n))return e;var n;throw new Error("Docusaurus error: Bad child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:t.filter(Boolean))?n:[]}function u(e){var n=e.values,t=e.children;return(0,s.useMemo)((function(){var e=null!=n?n:function(e){return h(e).map((function(e){var n=e.props;return{value:n.value,label:n.label,attributes:n.attributes,default:n.default}}))}(t);return function(e){var n=(0,c.XI)(e,(function(e,n){return e.value===n.value}));if(n.length>0)throw new Error('Docusaurus error: Duplicate values "'+n.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[n,t])}function p(e){var n=e.value;return e.tabValues.some((function(e){return e.value===n}))}function m(e){var n=e.queryString,t=void 0!==n&&n,a=e.groupId,r=(0,i.W6)(),o=function(e){var n=e.queryString,t=void 0!==n&&n,s=e.groupId;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!s)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=s?s:null}({queryString:t,groupId:a});return[(0,d.aZ)(o),(0,s.useCallback)((function(e){if(o){var n=new URLSearchParams(r.location.search);n.set(o,e),r.replace(Object.assign({},r.location,{search:n.toString()}))}}),[o,r])]}function f(e){var n,t,a,r,i=e.defaultValue,d=e.queryString,c=void 0!==d&&d,h=e.groupId,f=u(e),x=(0,s.useState)((function(){return function(e){var n,t=e.defaultValue,s=e.tabValues;if(0===s.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!p({value:t,tabValues:s}))throw new Error('Docusaurus error: The has a defaultValue "'+t+'" but none of its children has the corresponding value. Available values are: '+s.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return t}var a=null!=(n=s.find((function(e){return e.default})))?n:s[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:i,tabValues:f})})),b=x[0],y=x[1],j=m({queryString:c,groupId:h}),v=j[0],g=j[1],A=(n=function(e){return e?"docusaurus.tab."+e:null}({groupId:h}.groupId),t=(0,l.Dv)(n),a=t[0],r=t[1],[a,(0,s.useCallback)((function(e){n&&r.set(e)}),[n,r])]),k=A[0],w=A[1],S=function(){var e=null!=v?v:k;return p({value:e,tabValues:f})?e:null}();return(0,o.A)((function(){S&&y(S)}),[S]),{selectedValue:b,selectValue:(0,s.useCallback)((function(e){if(!p({value:e,tabValues:f}))throw new Error("Can't select invalid tab value="+e);y(e),g(e),w(e)}),[g,w,f]),tabValues:f}}var x=t(92303);const b={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var y=t(74848);function j(e){var n=e.className,t=e.block,s=e.selectedValue,i=e.selectValue,o=e.tabValues,d=[],c=(0,r.a_)().blockElementScrollPositionUntilNextRender,l=function(e){var n=e.currentTarget,t=d.indexOf(n),a=o[t].value;a!==s&&(c(n),i(a))},h=function(e){var n,t=null;switch(e.key){case"Enter":l(e);break;case"ArrowRight":var s,a=d.indexOf(e.currentTarget)+1;t=null!=(s=d[a])?s:d[0];break;case"ArrowLeft":var r,i=d.indexOf(e.currentTarget)-1;t=null!=(r=d[i])?r:d[d.length-1]}null==(n=t)||n.focus()};return(0,y.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,a.A)("tabs",{"tabs--block":t},n),children:o.map((function(e){var n=e.value,t=e.label,r=e.attributes;return(0,y.jsx)("li",Object.assign({role:"tab",tabIndex:s===n?0:-1,"aria-selected":s===n,ref:function(e){return d.push(e)},onKeyDown:h,onClick:l},r,{className:(0,a.A)("tabs__item",b.tabItem,null==r?void 0:r.className,{"tabs__item--active":s===n}),children:null!=t?t:n}),n)}))})}function v(e){var n=e.lazy,t=e.children,r=e.selectedValue,i=(Array.isArray(t)?t:[t]).filter(Boolean);if(n){var o=i.find((function(e){return e.props.value===r}));return o?(0,s.cloneElement)(o,{className:(0,a.A)("margin-top--md",o.props.className)}):null}return(0,y.jsx)("div",{className:"margin-top--md",children:i.map((function(e,n){return(0,s.cloneElement)(e,{key:n,hidden:e.props.value!==r})}))})}function g(e){var n=f(e);return(0,y.jsxs)("div",{className:(0,a.A)("tabs-container",b.tabList),children:[(0,y.jsx)(j,Object.assign({},n,e)),(0,y.jsx)(v,Object.assign({},n,e))]})}function A(e){var n=(0,x.A)();return(0,y.jsx)(g,Object.assign({},e,{children:h(e.children)}),String(n))}},31085:(e,n,t)=>{t.d(n,{A:()=>s});const s=t.p+"assets/images/index-a2000a16d514f2136b303dd1d29a17f4.png"},66881:(e,n,t)=>{t.d(n,{A:()=>s});const s=t.p+"assets/images/pubkey-1-6dc18c2b04022519cc6dd0fb3af36f94.png"},52650:(e,n,t)=>{t.d(n,{A:()=>s});const s=t.p+"assets/images/pubkey-2-16f0cbc7db6ab6eb8248a05df94adc35.png"},24210:(e,n,t)=>{t.d(n,{A:()=>s});const s=t.p+"assets/images/query-index-6db697cbe5e058388b830fee34bc4415.png"},59109:(e,n,t)=>{t.d(n,{A:()=>s});const s=t.p+"assets/images/01-min-dd1b37ae350384f3941bf8f446ec0994.png"},5502:(e,n,t)=>{t.d(n,{A:()=>s});const s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA7cAAAC+CAMAAADZXQhkAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAJSUExURfD2+u70+OYbG/3+/tPT01KE/+/2+v///1OE/u3t7fTx/+/2/9Gm/627zbeU/+j//3m6/1Kl/7Xm/06Osvz8/NTh/6iwEOq6///4/3mF///n/wAAAPb29nCG//X////9/1KT/9L////x/2SF///O/8We/6DV/1iQ/1iE//Ly8pHK/1eL/9L1/nC1/pvP/5uE/8T0/12J/1WX//r6+vfG/6+R/9r//1KM/4GG/3Gc/7rZ/p6M/8aCAIceRWKq/4+F/+///+O0/1eH/1OQqf/e/6y/1v/V/9G2/6OtGv/8x2CW/9mt/wAFgaXi/4yKjeH0/+ioWN67/wEEJoXC/+/k3vTS/83q/1Og//To/wAAUGWd/+PR/8b//4mN/5i1/7Gd/4IFAPTg/6CX/9/p/7TN/5/J/+uPkbmk///k/4Oo/+yUllGGqqjB/9/G/8Dr/+g2NpOP/73J1//jpuzH/1yq/7O8zu/X2c7+/3Sp/7HL4enx/5C6/8Op/9/S0ePr7sLd/unc/4Wz/8zX4u7KzbnV7RsAAKza//P03+laXF0JAOlNTn6+/djy/gVQoMvHz///6gYgTACCxtvh5+69wFGj47y8zW1RLQAzimyKjP//9/vBe4WxyYg1AEIAALq0//rR/xRKbS4bAGGOs1OE/QZvuIhtT6FUCTGNzr/CzpPE7tCPOtLs9YyKfERkeFYwEK9jAKvW9Wd3fj1EQr13GLeIYRs7XsHIWtTZle3p0N+4kFPB/2GVxidYhppddzmFzBiFzLC4KYyUvnOizr11ALVxGBgAGEKYpuAAACAcSURBVHja7Z2JW1RHusZh2vZgp20W6dAszdFusRFZFWTLVUDAIIkoBNcRRHGUERTBGDWJ27iM0WhitlGTGDOTZJJMksmdbLPeWe79v259X9VZaVS2BvR9n0cpTp9zquqc+tW3VAFJGgRB80fJyQsXJicl4UFAELiFIAjcQhAEbiEI3EIQBG4hCAK3EARuIQgCtxAEgVsImh4FBwdqK1JmTBW1A4NBcAtB0wltzwwia4O3JwhuIWiaqB1gqn47s9DK2w8EwS0ETYN6UlK8KQmSqKgH3ELQVLW/NiXBqt0PbiFoKvIEKxKNbcpvK4LgFoKmEtom0Ee2+cpBcAtBk3eSE29tZWJ5P7iFoMmqNvHWVlrcWnALQZNUT8psqakH3ELQZIPb2VPwCePW4/FkZq5Zc6bl7sdLlnx8t+VMXt4aocxMDwmDEXpkDcwmtwNPHLcC2yt3l5i6+xOTK8Gd+v1DT83jhxPBxDURc+udPWy9EzC4jwe3mZmZPz4reN3AEoVnf8wjcqcH3K3RFc4DeqR/zj4Lfeta+7c5+1Y3TOaJ+ubuy57JpvWkzKp6nixuhbVtIVw3PMui0oYWN7ijNd6ml/PjXe5PU0O80FtbzAe8LHlYL9jVYZyZFfauyqCv6XZQxMEDsrjRLGqRgxXeTdsk99lmzVtrvN6BMSDJ+ujGASrUyssiveYdHDIa4aBV1CzryMleZjveHT4QxwKbTbNX1zcsui97GtqYnf6gy7jPTUVUWk53WDXmuZZ5zS5pQzVm0+TRZa6aLcU/Knud/oCmTZsqZpfbiieN21PsHm949mkh4lbolATX4Dar6cDp3TUl8UZEIQPaHD7f0de7isCN+IS6w8USqnXmoAytL/KdC7q49Vf3+7ZGeRD7Y3W+jdEuHuT1u4I7equLueYVvqHwOjrazo1Y5/YAAteoQjoaKPH5+g6uIpMZoju80nRkjNNuNMKuAlHz1miam9tD2Rlx+LOaZqvuUPb5jnP11VRsLWzakx7/soNN5bK6s6JLacxtuc83tKfLZRP5Cbbzk+MHv2cdN+0yHWZ7aavZ/iDiHiXdi3KLXE2rnbCderApn66s1K4jG2c4M/VYcLvmzJKx3C65ZQdXjHZ67dExGIgBywNQq2L0Cgyy9apSabE2pVpOp4GBjdvmMB0bpbEW6aW7ty8le1qwWlymf0jXFlwW/1WSlYnUcLGw3NWE+svmwJVNoaormaHAmJkmJw6LrRV0y8bqVCe3uuyTm3Grabbqhs4Tm+upmBN0TExKjUu5M8epabFU7nk5cUvVLV/q9iE89GB54qvvYt5ecrbcVrOd27hHedIIc4tcTUvpGSRNG7iDk2EtXXQzNOQ49Lw2SW4Hnyx7e5eIXbLk8H+xDov4VtB7d6WNW0mBViUGUWTYjrDgMyDt1EuabQTqo9ulma1a4XT+0iW3wlGM1fFwXi3O00PrzdMat3uIUP5e142jlcSUHsm3wCO3XLqdkZryOAM3S3IiuTWrszXC7oD7pM+6jO5+drhQHa20xbZU3ckGzdk0Nyeh9ZfdE5NZc1WXZswmftmoQKmT29BGEQWYLrNeICeNMvrSHC0fn9u+fabfbjuaczBq9JlCGX+6NmbO1JR9SqmdJnAHJvGDe95ibUewwQGqd5Lc/vbRM8qPBbdnlri5Zat7ywZuu3zb/Pa7K4o1vT5NjYh1noDNv5TjUIy6egli66YPxcA9Kyf97vBl6eVleTedFR5xqQWWYRf1bh6cy70vOY36sGVDeAxrOetP7lducGtM1GEN3IifDKKwfV2Z+miUh3qj8MU3yqLVCK091u+THqgxN6ylfki/lL3ulwlWBikiqjtXT46rvWm26vikAiMmMOEwa47UZJjWXiUE6Gp6Xnr3Hu5d48BZ0Z4i0weQ7m5jbJsWqaL2uLlVNYeGB8WTiKW62tPbExQ1yxkta3XqA7kdrJsecCfzc0De1Mj6lPTBsLK8voNkbkWvyib1c0GT53ZLLun7z0XxGS7ufF7T2z65n/vR5/z5n9+91PnVH/nMndTA2396jl/Hls4i64K2vVToPHw9Idy2HD5M6agNGyS3oiC+PXy4xcatwOte9Jo0YrpgtVENVnKDmVtlMdsVt9IVpO85yix3+clsC9lzFK6oCGA1NaxEhmlXg3mCGUF7vZvM3JYeIIOstR833HK90isQVgEnWVOVB2umNE6pZprI3U85G5FTc8ScBaQvWWJ+zN57pIYR5hmlnUxvTtDVNHt1nDa67ILDqpnqCcSKtbJS8jEauP40lZfy2pJflQZWZsRBWTfuvsxLZYytmd3pjHhHpc0+lF2uPZDbgcHaiW0TnMa0lOhQKLiPi8X6uW2eSE3KtW3auf6aGU1MxeG289vNmz+5LyjUntn5m81C5drNTzu/EofIU9oiqBXkdpncandy6Q3d/Oa5n1sXtO39aPPmP7x76XcNieD27warMr5lhoXt/ftKE1xic7SwRA3ayHBPWA6fyHCG4Z01Vtdpoa1RNaoLlDkOWFHdmPiWkRHjuN1bZAyrCGWgPG5uQ8IMGUYtdLBahn0rpCERBi6nnw18iUrMnOuNFfNgZYNMpy2vXhsnvq1czcaxTHnokX1chfIbyKttLWQXNXzE9HI1N7dWdaIFvr5eryuAt2oWhlWv95Yzt8J4n9YO7SssVXmpreFrMgFe6I31qtuH1mdYeTvZfZmX8oypeUjwPMAOif1o9x6RWt6XZqQaHsStNJPTMJAmF5QWiYlmhyD3L/nnenqOaK9MIb5NmQK3TOPIB/8juBUosu588Lbmafv755o+8sF7YrC2vf9cuXFmZtve34kB1LbXukAX373JpnhnRiK4NXxjS9JntnFLs3/EHLSVhWm2MEtyq7UXioHSKwnVy5TlCXTJ4Zsah1t2HSn1E7ENK5l2cnLLFEq8coZj1+0rJdZ57YShbEoB+b6B4/mGTXfczWqEvIM0yXpfzS7VxmUcXKaZ0HFyqqw0LrdWdSrYP+6Ewzq5OfqSFspUNzokmGoatPJSnKLSRcJZIKyuWK4cltbCDHbTi+LFt1SzPiq8gnO9haXO9rRGRXr/IL8nP82ED+KWFJw9blNStl/25AhuZT5u46Tj22ngtm3v66lObjWdZsovyA5rOttYZW9v/4dOu/N/XTbQJbfC5+5KGLcymay0wcWtx2+LbwUNXrkWU1loH/shX6aRX6JRauZezKjXxS1/q6C38r46jWzOnzpUlSbXU8+rCLKsyGcuiliIyLstp6K0o4fIMRiH26UdfIdM/iZaZHy8zIw95WV8T4tbe9Ns1Tk5HcutkU1TtUd80ltWT4YsYmtsre1mjcYdpFfgPx6PWz5ZTo2BUudR/zpjab056rWvp881bo8Hd6ekLE2NlAl7u6Ou7mzdvrljb9ve7zzMuZmbn77Hb33k6psmtxzZinPLx3CbKHsrV4A2WPscNzzLq0E2biulxZRjpDlct16RSqoqkWNfMyI3AbQxXv1dtixzPD+5naNVnSjL4Sy+hxCx5ZcjvOIiuT2UbeJT5V7g4SklPrfj+MleMw2td0czNAe35BfnZK8107OWn2xrmq06fes2yWnDOH6yVi/3WZiLqxG+j+KWqJPXLHcFGpJbnjfH4bYsIx63gSKDW/mSCrb7nppxbicR33qXrtV8wQ6tT8a3wac2cj65L1g2O/HtG8+rvBS/8LZPL3Feis2wYY4NbtuufibIJmfZvEDFt7n/yE8Etx+rfLIlzid/bOM2xKDKWE8XDFWuKnaNITaHUfcCrcxPqRxLvLyUXL+tpOHcWkF3v8drqQU8AWw8S+mbFealVk0inDaJGOWkTU2ReQLnrAJscLLoNLnuO7TN2YjQepNFvb7IibVsVVWR4cOK6YUD6XxH08ZWZ7gNVl7KrLnRHulTeo1dFsltDq1kSXvrV9wGioy08hHOI3TF41bW3GXOaLajbG8j9WmOaW2muZ3U75VK3+bR9HM1tnxyyl8atJyUWcknf0QZY04z1cnFvivffd35dlxu9ZvfvL525IMS+wUqn/zXhKSlPHeZ28OHD0toRYG5vWvjVm3bkRkoSpIUWLuWTJpGzY3IVrgaoF1CDLnHvg4UM9aBOO8yFC7loFLsWpLbiMQyD+Wh+bp27wFarslnCkzPNlIfC+7YyIs0gVj/aXkCJ2bUik9zmPJSHPZp7dW0EWuFsxGiSy+f3r0vg33fcp/aciWStgeMu92L0vYs2Z6ak2I7lMwDW02zVdcaPSm2i1Wr7WKN25ULb9Us928Z012kV4bTnJcSC0wePmF/X2+T4tZ0zAtceSnZfVvNcj9ZU6nz6L2o6NyeJhe39qbNALcD0/CLV6fwgwlTWr8lGkc++IyKpturnOXnyuP6yaKw4gtyk51+cqK8ZLEOxNyKgFZiKwrMbYudW96fXGTtcJJbg+zcRvbFjoyZ3XlXrtq269p3YWxKpp0JMoul+8VWAWN/srW7mM51bNAtNW68ifcV8OZiGffyQog8KjdmyCKdEWffBXXpfKpmrMbwGgvvuzD2QNMJqj3NdDTV1TR7dbQ/eaDDWLgxUma2mvlJKGy3RlWczjU3nW8wGjww6uaW9zLzCfbu22vmrR0B99HRbPGE/S5u/c5s3nRzO5gyyxqcGrdiUceBoXZCPHcPfSLzUsIol9i4Hbn61095xccZ33I2K3H7LmRW2cbtLQe3D5MeCU6+BfpYJ2AC/oI+hb7r+oSb6XnELjzgrHOn58SGm2nm1hOcZWy9walxq9259LYdwy+Ei0wwZwhL/LpYxxj52loH4mzV9+wmu7i9+elz5Ql5fXl343F7d5FtHWi6CYAeQ27n9c8DEY0e6Q+rbRSfCxc59/tvv6Ysk8e+76Lzv0lkeXPlninrAuLWc+fSuoS8Pv65gg1PO9aBlpC5nRC30Pzjtj9oqH9auJ3HP38rreiWzhJjn2OusLVXvruf+8a/OYqx7XM0Px65KjdGmRfIdaC29997KSHc5p1a4t53seTUogm5ydA8VO1kUrEP0mPw+y48Ewl+PLPqY67Jy2txc9uyaCW4hSaeUcbvl0octwLcU05uTwFbaFIGF7/PMaHc5t36wcL2h1sSW3ALzZsI98n7/cmZDG7eTz/+8M+nn/7nDz/+RNSulL/SEdhCE4yZ8fcKEsVt5ppMwe1KqUWLFLZ50/ebWKEnRvj7QAkT/9bzPIvcPEUtsIUmFeLi7/ElhlsGl8m1BGyhyUifjb9/m/JE/v1b9XdGbOSuwd8ZgSZNLv7efMK4Nci1pKgFttDE1ZNAX9k7mV8j+/hw6yTXoBbYQpMKcgfUT9bNqOTtBybxAy2Pyd/RNMk1BGqhKZLbk5Awt6JnUj+G9rj8/VtPXGH0QVNBd3CgdgbhragdGJzsz47i71ZD0HjGYO42DdxC0PwTuIUgcAtBELiFIAjcQhC4hSAI3EIQBG4hCNxCEARuIQgCtxAEbiEIArcQBIFbCAK3EASBWwiCwC0EQeAWgsAtBEGzzW0e/YkdCIISqZV5U+I2CYKg2RG4haAnids8PDwImiXlTZrblXh4EDRLWjlpbhfh4UHQLGkRuIUgcAtBELiFIAjcQhC4hSAI3EIQBG4haP7oxFtCvzJ0QukF0qJFv3rtZ78AtxA01/TLnz1MJ8AtBM0xvfZQbt8CtxA0x3QU3ELQfFMykflr1muGjr521BC4haC5yu34H/8a3ELQnNPClS5uX13cUgxuIWhuaxa5XXjlncVCp04nvfAiFeqSkl8VhYsLk5Je+L04/mWS+kAceVV8aRFfF16hTzrw3qAnW4tm0d5eeefUmTMLFp8VeF48c+bM6aQTi0/dWrD4ovi+5cKCd1quyw9uLN6W9GrLl7duiE9W3hCfvHgR7w0Ct0dnzd5eJHiJ0zr22W+0dCQlJyctfLVlG9la9QH996polfi4WPy7Ls7Ee4PArcHtC8eOHRNuqPj/2HUbt7+aOXt7MSmZqCR3WCAr7K/03W+cSmZrzMgmv7r4CHMrzPG2pBfeWdxyAdxC4Nbk9sRiQ6bNnUlujfi2Q7rDCw1uFzK3CyW3fEayxa0A/QYdgCBwOyvccnx7o+XLJOUnJ7ETTH7yAstPvniGnGfTT05+4Uv5DQSB2wfGtzNoby8SuwtVXurMQspL3eA8lZmXqmN+zbzUot+3XLj1+xYklKEnWk+9MHvccnwrKjxruMPx1oFEfLtAmGRjHSjpyg1R+BIvDnqy9RBuX5tJbpMWjpdgchxPfqRLIAj2NjHcQhA0LfbWJXALQfPA3oJbCHos7C1+3wUEzTF7e4K4/eW4OgpuIWju6cTP8PulIAjcglsImnE9nNskcAtBc0vJbx09+osH6NdH3wK3EDTnwE2irfwPOiEZ3ELQPBa4hSBwC0EQuIUgCNxCELiFIAjcQhAEbiEI3IJbCAK3EASBWwgCt+AWgh5DbhcsWKBp+A//4b/E/zcFbjUIgmZH4BaCwC0EQeAWgiBwC0HgFoIgcAtBELiFIHALbiEI3EIQBG4hCNyCWwgCtxAEgVsIArfgFoLALQRB4BaCIHALQeAWgiBwC0EQuIUgUm2KVA+4hSYhj2/m6wg9hefsVkrPIGnegJt5bPEFcDtjyumf2Pl9e44bxUi+/Dq6bUJ30B8K/tboijn2lEL+tQmvM+J8MylB+aV2foC75tjixeOAC27H02iNt+nlfNfBgFeoVjKWs6/QW1tMJX+abaT0Vng38Ql+LyvNKnqX8SlZFXWKvt3DhfKQVpZh3qFMnssHhqxG+K2jkVfCqka9b7hQVZclL0uXxwt2dVhXbZL16VvD3lUHZHFj2LgxFdVR6rP3fL67EVxemursEtVhdDty0OgzPxRV5KNnrSeznLufk221UuhQ9rIxM45oxECDLGab3T8kOlrbYT34DvN84+mbL8zW56z0uNwO1s0LcJnbxbcSxO2W3M/46zO5ublvfHw9TjG386M/alrbXirmvi4GRNsnlzr/Jg5pt7d8nfvGXxvmwDPLajpwendNiZvbEp+v7+AqMhzN4fMdfb2rip3chup3BXe80nSEjm73kZ6yitJIdlcUm4TWxuE2Qme2r8s3GrFnnaz6Gh330NHCWI2qsTV6fn/fvmq6YYg+7tsj7+Nfp2YcqnnHxugRLlf3+7ZGi6hYEKsTRb6JXxQ3Rruo2Bjr94nq8p2NyMnOMNrOR7vDsv2RGmZZFKjPB5vKZXF/X6+XqssZPrlfPIkMF7etq7aZT4Iel9fNbTs/+HXc0aYVvqEwdz8n+6S4cfVaRl0U98VSjRdVmGa+sCGez2x9HofbgcHalNo5T+2FNQzui4nh9uY3ue+9xITu/M0f3r30xvNjips3f3L/uQzB7Uebhf7VoLW93/mV/HjLpe+//Tr3H/mz79StL2Isjri45TFSVUr/SQBKHNzqlTy0AnzUGjO2ohYZNoayZ3dmTvZYbj08NpmNesKptZAfZ/1l083eb9Soc/WyrTbbo3dvSrXX7OHDzWGqY5QmndYKgqyxOpX8A+pi+9IGOoHRW59h2kJuRKuJiKyTe09d3a7ObGR+C8j37yZDqdenGU9Ga9zucXArrvLYbuYPu7mN1FA/KwupKQVc5DPat+fTjYu4Ii5eMxopfY/mMDVrtM7Z5/jcyvTU3De2xxjcC4nhduTqV508jp557uf0HUHsLnruXHpbcPumYaE7xTse+bZOAPz6Wu3md/+efYMr+dOqugg0C2GL25xspmk5DXh/mj9qeKtyDD+A28Z1FqEei9t+4fwNmIAUSBLL6EtzlHGqKbeP9zR78ilgzButiteqFc6a+fTG1fkMOX3mswygZuKlBrk5C6lGOEnTRrfnGx/7JTtVXbYnphlTmpyJZAfZZd4oAbS7MN2bRmUb9KE9hd6TDWbEL2y89SZSzX7QjWUHVG9oFpG9b1/dEKfPWekiNojVubglBVPmPLaLGdxExbdbdi7e+5nJrWDyWpziyNU33dzquia51fQ58Nja080hoJNjK20IExLxr041BqQc+/4mdo4z2Fp1Zeqj0YxxudXrB4e93peNjJbJbdP5jnP1qxW4rRWSgcbYNi1SxT5ja+zDsBE5OiNqAxz2pRW+4tzYWaPm0FbyzKVtVr6A5iBN72ZMstIdjVWN8LSf7DWY4vavMDyS8uXMSqRGEapQC7VzN8qso3ogdlb44mxvC14WgaqKWcWHau6orO0/fa7eQlrOVTKuLVXm1BNqp6hEuR/qi3+dR3JrdcvWZxH0b6KaS+cdtzK0JXATlE+++c3ra//EjrJB6Gdxik57O3JVBb/aF7l/O5U/F56bGOT3oteU+RSDo1EixXkpTvmoab+duSXPTSvg8d5MeZdSMyWUbsspLZPjTQSRQ+EiN7dFDH2pWbtmXriJUzCVXhEu9lYXx+E2q0kNcunoUqN4Hik3czTblLESAaM1h0QMTsQ5uwjASo7b9fp0ZyMKvAdOn9tjBMyVhtcszLBeVq4YC8SKtbJSI63Gnau6JrNlGXTjYtPhra+m7kt3PlBkt/mmt0CfKBufZXRfG42qNJmwvyExwclpggICyW1ZqcWt1Wf5/hpVID5/uFXYjpOUmgluR66+rd1hR1kS2rb3d/mOIse3l94rl3kp/kAbeTdX5qVufnd/buSlxGAYLSxR7z0y3BPOMPNS53pjxRwd1olZPUonSIrYfFHSRCCzwkxGmdkhVcySg2/VWhe3fP+C48qUKdNFmaTde3jK4LUm3UQtzb7iYwzZRkVcwAo4qea+g+wKiJHdLpAyuI3sM6x7hJI/HvI5d10X8W5TmqMRnu4gTzeqSQV2L9rfJV0Ovd5brsjxRHa8UkilyqYDHn2U41dZpUR0SJpBAj5LzAWK29ArFd5VPVH1MEIHjfkpZHS/O0pZQMr3iVeSIzJizC3nCsZya/VZuhCm9Z4v3JrYXtASxe2WnZRx+mx8bjmf/LcjmsxL/Uu5aj99d7+Tvb2bf3439/W1c8HeahFjvhZpkjR7XqqAQ9T2QrEk1HvcpKiVcsMBNr08wcf3k7M4LtPLLsfjVnnny5VNk7BErLSTiOLyXdzqBU1mMBtQJwb4SS6vNhvRSDEpBYcRsy19Nbts6aZuzgNF9glD9bJ0JMxGiCjcTJFZDSc3WZxDzWmOvqSFMu3k+LmVWcJCbvqQivKpKUR1dq1FHffIk1UHC4QjPbRH2d6c4dh1q2mHslcYqS6tQJjhSvFsQx7pgPONx3Jr9Vlyqzz5ecPtw7Gddm5vfvPGbzb/4WszAxXXT75zaR1j/KY9lh25KnH13P6i89qsPzq/I9Zr9K7z2LhdLmkO+TKlt2zjtowH/SEyz+NwK4tqmLm4NapLtzMu3HDrauXxmdwKq9lh5cDV8AyUWqF3umzPMjN7JQPBrGiRPUesq/ZEfKYr0JgeJ5POkEqsC9n3LzcDW1sqySBUrIGxt+zg1ux+vVrUFl3KyS63HkZ3+LwjVKpK09QJfIvWwmVGfFtZqG5ROia+VX2WT9ts2vzg9hGwnXZuR67yoiw5yuPnpWT6yYpvb9/KV/b5yn7las9+PjnVslzN4ToVeTq45axmg+bwkx/KbauytxkP8JMNX9TgduyNDG71wLp8WzJH3czfZaW6081q2jlm1LmF3VEDspxBaUZLzWWeLpdDrOysSi4bXffzcjKnnHl1RltOvPM6jI1QOQnY/WTNBIkXgyu95T7jgcqHcSjbaErkw9Q43MqFIn42vGTtqyrxZRpvwvaQ+G7z0k9+BGynndstO59nU/qZufhDiLqKHibY5Pb2/3Z+Trnk914a+YBO2ZJbMtuPTg8xqM3hIzyU01RqRXHbbhhANfxVXoq4CLALnUUIx+dWGkUju+POSxU5/N3WiiMcXRNJo2RWc2qKnNxmLbU5u+Z0Iu9uW4ziCUCu3zJJciHUVse9inLTx011Ot2eIXoEoyr3ZSyIKn+Z14hs67dyNcZvrBwpBit5H0oWcRvhLHe72WxjExXHu2xJzUUt0dsVZkaa3XTdT75vwXGOxa85PYHmMJ3c3JPv6PN8zEvlPQK2083tzU/Z2b39H+Eoj7PvghAWkW6Dse9ic7kguvOjT+53vq3d/iL3jW/fvfRe8ew/PblVKU0a1VSKaT0qLyXWFZSxGlV7gP1ecx2oOUx5KU7M2DZJ2ddvs1bRrqVS9rPF3qNyuQeqzGtbBzKNX4GVlwrE+k9be5kKSuSN+auZ8jJpCNAGJrmVixoxFC41slyy2FpY7jN2X9HWqSFj32SowAwtjUbkZO8KWksprkUiBk7uEePqcmp22TZJddeooDjAe7II0XvRk0H7LiplhAOr6ShxK8wpNy2T8+IHjP1bozIvlaEZW6dWp7o8+Hbzhdn6nOWNOdaB+oOG+ucst2ceAdvp5la5uB7KKI+zz1Fwq3u+EJ+rfY7CQOttn9zP/f5zim3//HVu5+Hrc+Hx0XbXIjmTZ5hrNAHbdt/IvtgRw/qJfRdqdZ836NZZiz9eV4pK5H+NnQDLvdYmYN53YWy6tZxWcW7TeXYAeUexDPwC1k7kgH1TssUt7XOQN+NGxA6Yd4tddtesU9vV/uTu8MlUzcWt6FGFuszGrcqgyS0WXF2x2X21f1sLNF22tUftu+AN1dauZcVt5KC4bDc5H3L/slpKow3Vaq23e7jQvjH8ZIc78rb2ctv6zPsujN3X1s/xkebsPsdjj4DttPvJHpl9tNJNtk0U4++noD0XnLfkq3WPrs0DRYKJctof8vQmdrMH3UfsoNQncdk47dvt0aCJ68VHwBY/DzRlnqBx5AG2k7O3xy6cWaOBWwiaXxPeIxgEcAtB80/gFoLALQRB4BaCIHALQeAWgiBwC0EQuIUgcAtuIQjcQhAEbiEI3IJbCAK3EASBWwgCt+AWgsAtBEHgFoIgcAtB4BaCIHALQRC4hSBwC24hCNxCEARuIQjcglsIegK4XbNyETSNyluDYQrNOLd5i1aK86DpUvLKRSsxTqEpcfv/RMQHx0ct4v0AAAAASUVORK5CYII="},98863:(e,n,t)=>{t.d(n,{A:()=>s});const s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA5IAAADgCAMAAABGral3AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAIcUExURfD2+v7+/tPT09/f3/Dw8Pv7+/b39v///1OE/u3t7f9ZWczMzL6+vv8AAOTm6OLi4v//0ebq7NH////9/+uva63m/9DQ0YsrilRVU+z//0LgaDQzNK+7zvb//4zO/u3y9f/orfX19f/NjO7m3uzw8vL0861naP//9uXv+mmu6///67u8zS2N0Nra28LY+2pprY0yNP/+41yL/0pQU9H0/t/h5Pr6+m4zM//psa2+2M/e/LOwtNCMK9z4/jMyj+v2+8XFyLjq/5aWlcj3/4fF99uiVeT7/57Y/1ZNRdXW1/Lv83267rnV7DpAWLy9vE9ag//4y22PyX9/f2Op4U99vr/1/ysrK7HK4Z25/P/WnG+y7FCLy4Km/s+OaPbEhrd5UvDt5lOE/8fs+H9ZSvHj//bNj//vv86NNVGb1fD27f/51+25fYfsoF24//D34sWHTjI1h//gqFVrsGnlhnBRi1E9NjBssN/Pz7Z3NHCd/pCw/fbarZJrUe/t8TY5cZNUamuW/s6lcDJhqNjr97uNZzNOmDA3TlOE/Yiu0phbO+ja1OXKq8DK1ExPbYE4as7c6GY5VVuBrEdumuTW/9KTTduxj4tnrV2X1PT1/5FEfsax/v7s///796elcVZZpf7jwDCBwJzK66GO/pZfjKhcg22QnF7Hd4OE/qzxvfxNO3R3ZLeP/tAqL7fvz9LP1YSEhIGQb5TtquzfxOz5yt+iR3QAABP5SURBVHja7Jv9TxPZGsenS+lJU1NlqbVYixQsFbRKUywSQItQ6AsIisJFIxgI4MJmBRUgkXAjghHVFQ1evYmubnY195e7u/fef/A+z5npG7QIQrWx34/SDp0zM8+ceT7znDNVRQAAcggFXQAAlAQAQEkAoCQAAEoC8I0oadAbAQBfFr0hk5IKAODrACUByH0lDegXAL4ShnRK6tEvAHwl9OmUNKJfAPhKGKEkAFASAAAlAYCSAAAoCQCUBABASQCgJAAASgIAJdEvAEBJAACUBABKAgCgJADfnJI/HTtE9J1VKvj90AlFeUSfdJxVlAp677uvaCs6FGWW3urpXbnOa46ilwHIipJ9RUV/kIoVhzqKioqOKo8O9T2z8u/H6p95jtU3yRVm06EhZbZ+aK+J3HSZ6p+F2VEAQBaU7FBfKrhCKuxbm6Ic5po4xBVSW8Evs/W1vLr2h0D9fXQxAOv44Y8nRMeuKPlIVkkaljZx1VR3H6DBrPxNKjkrq2QtNx3iIW39s7O4BACkKBmQk8Bdmku2yfHpUSWtknIueTahpKLsfcLTTwBAFpTsKzKxa4mBa5OikJuz6oc8cO0wB/jD2MBVqbivrQYAZGMueZ0rY/LjHVPq4x357EeJP96huSSvaUM3A5AdJeVMUR2f9mlfgijJX4KcUFxWKoqJL0Ge0AKe8ACQDSU3gjkiADmlJAAASgIAJQEAUBIAKAklAYCSAAAoCQCUBABASQCgJAAASgIAJQEAUBIAKAkAgJIAQEkoCQCUBABASQCgJAAASgIAJQEAUBIAKAkAgJIAQEkAAJQEAEpCSQCgJAAASgIAJQEAUBIAKAkAgJIAQEkAAJQEAEoCAKAkAFASSgIAJQEAUBIAKAkAyKqSp6yBPTlAwHrqU2dm9lhNOYDVY948zsNH9EaQb+iPHN4dJU8FrGaDTnx1dAazNbCplGarx+jPhUj9Ro91MykPG/V6+gvyCr7oR3ZDybBJL3IGvSmcOdELwq7cidQVLsgYKF8dl9MA8guni63cuZJhq07kEDprRicLPLkVqSeTkzRodRn8fn+hvxDkC3S1/X6DiwavO1XylCmn8pwy3ZRh7GoO51qkYXOGUSsbWagDeQZ5SU4aD+9QyYBe5BjGQHolra5ci9RlTRuoS69nI4VOgHyCrjg5qU9fJreu5Clr7p1a+ueuZk/uRZr+uate7+IaiRzNPyl1hQZX+tnk1pW0mnPvxMxpi4/HmHuRGj1pe9/o9EPIPJXS7zQad6ZkwJB7p2VIO3K1+nMvUn/am4dRT0rCyfwsk36nfodK7vnCqWPaynntSRepKRcjNaVX0lAII/PUyULDjpUUuZfoIr2SuRhpJiUxcM3bgSuUzE0lUSVRJaEklARQEkpCyTymMPydRtifJSXdL0P2p78KYbEzx4XlzPdClNPL6Tr+oFRd0dWsNe+f7qHXfTV2e+eFpqQF2bozqu2H97HbSu6ruSK8c8u1wrs0bX9OhxybbKGP19YdC0qCrN60z8UxZUdJXfDBw4Ile6t4E7lb1xp5naxkayQScQjL5FDkvyszDlXgMfvy96xHj/7xynJTYoFbVywtNMvmkYjIjpLBhf1CZ1n49fHKDYcYs0eFGK37lpV883pr7Ypn2z7d5vHQrudn8fixkkxrTnyZSIrH67+okg0fb59XudiQHSW7a3qEzj222MaFrpQ+SFKyVLaQH1i0xO+uebjarupBDaKJBdmaXyxpFElJdKPHqS44U/8dwBaUHFnlkILLl+UHdHdooqKcPSUzRbodJUfnfTx2SGbkqiPpt30HtPgtnTbfBZngd4d9C9TJ4vE83YGSmu2r8dlstktpJIjvJE71NV/ohcz88XmfOsa5tj82LAq9qKWFd/M2NbSRVVvX/tTN3Wvy4k+EQpc2lb3spBZNY6kWI/10/532ZqnSmgQpZtuDdtm07E5tIpJ409FhajEdFd5K+qW6MjkU6goewlGL0AObLSrK6mxqL1FvEdxLZRdih7H7bL8k90P1oE+22E0MHw8evO3as8flcmVLyf5O7gELjwE1Je3ayJOHojMlqo3uuRm16yeWm8aOO1QTvXPHEwty4wFKId7+ymaJ7jFZZaY7rSbP9pT8UEdXVujGV+xd9ZTVY13DreMrtuwpmSnSrSupG/15v+j+rXmTIyaUpBy2vKLz6u9qofxtEt6GgspUJQ98/6mdxJmgazBwyZFI2biSa3RHsPQ4xOidFkpaumpTdLx3Dx2pm9s5F0ZutQnLje0q6R0sFQkl5T+fGKBjUlMpYLKSalO5owsOoeNmKTcs2X0N8qZQfjx2PPfaldjui+PnR4dJlZkP8I822WI3jbx9kBDnztHyl1OSB54D2sBViTmq3a69KzfIu8tpleRmV9Rx7uvNEp0SnDNde9uOkvaeucUmXrx+b5puEWMz9xbpT/aUzBTpNqpksEcL/ue/bKHnnFv9tpBMLu+gL8S3+xQlvZSz7rFW7UIXV2dQsp9ds/SICduZwLxtupTWvLVNk87lL+afPpn3aXk+wTYFqbzw+4Rt2scL3f9s0Y7HFbKM9iSPV0y5+04tSTLz52gf7ps8IOL2VKx8LO1aqyxj1YOh9y+H+WYY9yxJyWvy8JYPw6HYE4hR3kfZyZ/U04lFEm/KvfE7j3yqK5vdlc1qcex6WyXPkSLj2JKUlIsx4/et0Pmpx9F6y3vPZpOjgAmbXQ4p3Pd8oeccZOMH24bhwOcY+R/juXPG7CnJA1ex+cB1cuhunVb3pqZZvGjagWvr9blYUd18hiZTfEOeb0HJqw4+UvH4fQqQZq1jM/+rsUctWZxLZoh060pWD7bHgqdktqgFQE0u9mW2aZ2SorGVHLgc3zyDkpzAcpRHfVLCNvDu3XOtonzyMv3tv8Wlq7F3uYWrx7oqKXWOH2/qVom3UhPHTcF6n/Da8d9apGIcCZ/CaSqo7pvUfoo2nuK9lz+IynDYs/bUKvl2UsZvoZTq/0UWOPfNVmnToHpDTVRJrSn3hnrrGnnV/4qTkoojH889VxrvyqQqeTOaNC5OjAK03iqM0EleVaukLOHc7VOrrCQvqEPnnRj5ozh/8eL57Ckpgp3q4500SvLjHfV5T3BB7bu1xfuRyNpim3yqM7yoPd7hBd54qi6qVdmIQ7yRP0L+rHtowkm+Ic+39HhHBCdb3GudDx8N0jRybKYkuNyUTSUzRLoNJWNOSZu6D7Qkkuv0nRNUB9crSS9Jg9D1Stb09vbKJA1GyQwHf0rX5WUzvdOey3tE+UwJJW1sNDkhjVinpHp0GUAzjW/eO3jPFrlfC80buSK5qXjFFJOyBas0G/heEOTbc/l7Bw2s22hyOK9O1xoptN4zHONVdajLBc77uzzhgfdyAF3XczOaomSsqSyP2rsseAMcY3mVPP/y3t6qJCXrensXuF5TxL3qZGq9kt6l6c6/5E1JVTIxQ+VzUl+2x7/+nWzkR6Fr+PPPBl3WlNS90b4ESaNk4luR8RV5g++u4T6dWm1P9yVIKT94adHmoqVipLNdDMif/RueYzq/M5nCzs944qrrrrkhqu9Nyy9lSMnRv4msKpk+0s+pkpzdWs6oyaUbX3oaFZ9XJcXoSYc0Q/2kWH2n/aYqKZNRZKqSNDq0v1jqEWqVlJl6d76Ln5MO3IhVPa1KypXdfAzLFbU5nwPbW7Zaqu4wUSVbxuVIlk9Hjb9bPaGyk22jWomKVUmtKZ+PGrFO7RvZFeWxKmmpSqmS6vEyV8m1Hp4EJ5RMdH1jacqGW+VHLowJIy8K596Cgr3O7FXJ7f/vBZ22SXzDTfego4wxbfy+NVy43S9B4oeSUwt13q7b5dn71iL9nLnk/9s7G9e4yTCA16WadGpiKCurUI9hauvQU2831YxSp5sVZCp+ccI5W626Tor4iT0FOjYYKkOliGNFBxuyD+f/6Ptxn2uT3uXetMnd7wd3u92lSXrNL8/7PG/yvluipGrQvXaXkmfbc8kYJWce+08d5413tig580c5QslmLqmqsdff1dtrbEnq8+lzMuK994TKJcdlLnmy3sYVZ96nPlFGNH4HuSl12mmvuKpFmkrqZquOsvWo2Kq46rW1vhL9ohEl9df32SMdSurtRSqpnvVJyVCU1I3VRqv12Fu2J7tAvPSU3JXuVRP9ktnZ0x6UlCVDeUw8JNsXHbnk1RdEy/LxTiVnzsklZAX0zevllpKn69XTtibt6dtqXZFK2idl8VLFiuYhKw5teQZTn/yp9mRGlVdkhVemn+O/iPPBheOtCuo9n3z1yhe3z9gqlzysWp0zF26fsDuV1K62Kzkj66hNJevWqUXrUVHvSXPRNsH0emUu+cyHj+uv73kdWlu5pGqytyn51KQ+STeipEirz3032ZZLvjNp/6BySfEiQS6pVVyp55FCSeuYwELJfCppX/3xyBEVC/+qV1wbB5fsOPxdNf1lZ+MZ1dN2qtkveWlB1mZlT9trMjsSP1vu6Op4U5aLZE1R9zluVfLwB6fU6psVV+HGtwflcTxz7lVdkRT7pnO793/Tb3z6o66r2s1g8vmrB1UVoVFxFecCWZs//KFYqeof1eWWE51K2l/+PddU8qGnZQ+i2EsVuXRaqfekuegWJZsVV/t58eLAlvLOiXYln/n+1Bsvtyl59qcjl16S22pVXL89+I+uuH6cpOKqw+PD9WAplBybEIyhZE6V3KbjsNlKi0wMtkkG7mqhn73ebQYdvU+Hj83tsIj84P23O95SFdFdQTZc1a9tIjlRnSwJKjvNbLJhpFByeswVjE2j5MAoefLt/vfz9BkDv2yCY111Ve6ikqY4LRu7iZWsO6mKPMfeej3lC+pQMk0lH9xv79ePX+v/2rcevFPe33o/4ePOQv/rSPK49c3ebLe/R/07/1n/P6mTykh7onXZ+YRJJRnoo5897SFK5vEAHvRHIm5+fVO/eDadm7MYDqsfoobD4uasYcWAkgwa2Q8Rg0aiJEoytPLesP3QygyHNcRK9j8cVgYnIBjN+wQEREmiJNP07M2eRkzTw9DKw2ukgaGVmcwu+Z5GTWbHBATD3HDtewICpnxN3GqNnPKVaXqGN0gamKaHidGTnQvjJkYPmMxuOIU0M5ldo+764gMZ4MWJWCF13XXi/gww8aQbs5NM+Tqsc74amfIVzMPE6EyMjpLZYnR0bHT60H0wVBw6NC3+7qMjKJnJODkmrYThQv7RgxGUzG7jFYaN0aAwgpIAeQAlAVASAFASACUBACUBUBIAUBIAJQEAJQFQEiUBUBIAUBIAJQEAJQFQEgBQEgAlAQAlAVASAFASACVREgAlAQAlAVASAFASACUBACUBUBIAUBIAJQEAJQFQEiUBUBIAUBIAJQEAJQFQEgBQEgAlAQAlYegJfNfzrP7xPNcPet98sVJdLzm9U1qvVoooCYNGwTVhY5uXbqGXzYe1JDa2eVkLURIGSkhpkR8UzKwt8KXf3UsZVpVXFxP6qH+uGqIkDAq+9LFgVnJppd/dshXHWXL6RayhgpIwGCGye3l6Fr0Lz8M1xxRrIUrCAFR1vK7MSea6t2Odp1gyZqRzsVRESci9kZblprZy17J2cLJootHa1ngtoiTkvtXqp7h6f4cIHBqMkTpOhigJucZLMUbqOOnFfbxmMEbqOLmGkpBn/HhjjDgfE4UrjnkqKAk5brZaVmEPNxE6aRCiJOQWN9VEshGII5vG1VSUrKIk5DdIeruwFS8qTIaGE8lGOhmiJBAkk4TJmpMONZSEnOKlnknGxuJSSkqWUBLySWCu3Trtz8aZv+31AkUnLYooCbnEj2u3LnqWdXS221U9as32vJ24HpDVV2z78hWj/SAoCTlIJaOvdlu0LNfr2sn5WCWD7ZPJavTdWKW58eVwavzfhPdqVVESBi2VnPakjWMyuo3KcOmrSCheufPq03oEHW28iFUyIplcjwmSU5slZ7Uik80DU7a9fM1xjtsiaJbHr6kIOi7fiWYdJSGnSkZ+tNIKbIue6yrvHrWOuvpaHPFKRND5kRVPhlJpaaySI9srGVfdKdub9fuay5fDWXtDiCieVieXpZHjG2V7uef6DkpC5rGsmHZrW1szKCjj5JN6f8UTOgbzcik/CLyjszsque2GYqVamBfB8YaMeGu1NWmiM7d5Y0FGSuFmrabCZTQoCYOm5IoMgs2sUlDXTkXPZgjVH1kpKOk4S2vHZShcnbPtcRUTD9hXyps35L+S+DwTJWHQlNS55KI/L1/5vteppIySYwUVS33BvHElT5y/ohJKx1mwN4rFKamkaLVObTgqShYFN1AShimXbFVcp1W+2KFkZy65c3mn51xyaXXSXg7nZQr5iC1zyWWdX6rQKHPJ8/deIZeEQVQy+uKdgmyUKtsWPSlgh5KpV1yXVHt1Q0hb+kjklCqXFHZulup9llRcYSBxrWBXttN7v2SbnEv0S8LQ4O/KVeeJrt5J4S5mlITME+zKvVlc4wpgIpk0B3eCAHSdTHK/JECGYFQBlIThC5OMvQPQQ5hkhDqALME4rgDZgtHOAbLVdB2sOUEc5gSBvMPMWQAZc3Jw5pd0mF8SBqTtyizMAFlCyuObjZQFv3vRKyYar0vRtVaUhPwFSteyhJWBGS0LgfTRcrteW33kq4sJbdQ/Vw1HUBIGSUrPMonn9qR3WOsvpSzVwp02gZKQuzqP73omvPQ8109wb3SxUl1P4mVpvVopdrF+lATIFCgJgJIAgJIAKAkAKAmAkgCAkgAoCQAoCYCSKAmAkgCAkgAoCQAoCYCSAICSACgJACgJgJIAsGdK7tu3z7Z54omn3X/aXkkbAPYGlATIrpL/A2Tjp6eND0hIAAAAAElFTkSuQmCC"},576:(e,n,t)=>{t.d(n,{A:()=>s});const s=t.p+"assets/images/04-min-7eb9f3330355312efa81e47ffc75123b.png"},28453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>o});var s=t(96540);const a={},r=s.createContext(a);function i(e){const n=s.useContext(r);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:i(e.components),s.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/ad762f86.159c37f1.js b/assets/js/ad762f86.159c37f1.js deleted file mode 100644 index 77ee32aee3e2..000000000000 --- a/assets/js/ad762f86.159c37f1.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3041],{12735:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>d,default:()=>p,frontMatter:()=>o,metadata:()=>c,toc:()=>h});var s=t(74848),a=t(28453),r=t(11470),i=t(19365);const o={id:"learn-account-advanced",title:"Polkadot Accounts In-Depth",sidebar_label:"Accounts",description:"Advanced Concepts about Polkadot's Accounts.",keywords:["account","polkadot account","polkadotjs","indices","identity","reaping","ENS","domain","ETH"],slug:"../learn-account-advanced"},d=void 0,c={id:"learn/learn-account-advanced",title:"Polkadot Accounts In-Depth",description:"Advanced Concepts about Polkadot's Accounts.",source:"@site/../docs/learn/learn-account-advanced.md",sourceDirName:"learn",slug:"/learn-account-advanced",permalink:"/docs/learn-account-advanced",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-account-advanced.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1727178265e3,frontMatter:{id:"learn-account-advanced",title:"Polkadot Accounts In-Depth",sidebar_label:"Accounts",description:"Advanced Concepts about Polkadot's Accounts.",keywords:["account","polkadot account","polkadotjs","indices","identity","reaping","ENS","domain","ETH"],slug:"../learn-account-advanced"},sidebar:"docs",previous:{title:"XCM Instructions",permalink:"/docs/learn-xcm-instructions"},next:{title:"Advanced Staking Concepts",permalink:"/docs/learn-staking-advanced"}},l={},h=[{value:"Address Format",id:"address-format",level:2},{value:"For the Curious: How Prefixes Work",id:"for-the-curious-how-prefixes-work",level:3},{value:"Address Conversion Tools",id:"address-conversion-tools",level:2},{value:"How to Verify a Public Key's Associated Address",id:"how-to-verify-a-public-keys-associated-address",level:3},{value:"Using Subkey to Retrieve Public Key from SS58 Address",id:"using-subkey-to-retrieve-public-key-from-ss58-address",level:4},{value:"Address Verification",id:"address-verification",level:4},{value:"Consider the following example:",id:"consider-the-following-example",level:5},{value:"Portability",id:"portability",level:2},{value:"Derivation Paths",id:"derivation-paths",level:2},{value:"Soft and Hard Derivation",id:"soft-and-hard-derivation",level:3},{value:"Password Derivation",id:"password-derivation",level:3},{value:"Account Derivation on Ledger Live",id:"account-derivation-on-ledger-live",level:3},{value:"Account Derivation on Subkey and Polkadot Vault",id:"account-derivation-on-subkey-and-polkadot-vault",level:3},{value:"System Accounts",id:"system-accounts",level:2},{value:"Indices",id:"indices",level:2},{value:"Creating Accounts with Subkey",id:"creating-accounts-with-subkey",level:2},{value:"Using ENS with DOT/KSM accounts",id:"using-ens-with-dotksm-accounts",level:2},{value:"Adding via the UI",id:"adding-via-the-ui",level:3},{value:"Wallet Support",id:"wallet-support",level:3},{value:"Relevant links",id:"relevant-links",level:3},{value:"Transferring Polkadot-JS Apps Accounts/Addresses From One Computer to Another",id:"transferring-polkadot-js-apps-accountsaddresses-from-one-computer-to-another",level:2}];function u(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",h4:"h4",h5:"h5",img:"img",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,a.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h2,{id:"address-format",children:"Address Format"}),"\n",(0,s.jsxs)(n.p,{children:["The address format used in Substrate-based chains is SS58. SS58 is a modification of Base-58-check\nfrom Bitcoin with some minor changes. Notably, the format contains an ",(0,s.jsx)(n.em,{children:"address type"})," prefix that\nidentifies an address belonging to a specific network."]}),"\n",(0,s.jsx)(n.p,{children:"For example:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Polkadot addresses ",(0,s.jsx)(n.strong,{children:"always start with"})," the number ",(0,s.jsx)(n.strong,{children:"1"}),"."]}),"\n",(0,s.jsxs)(n.li,{children:["Kusama addresses always start with a capital letter, such as ",(0,s.jsx)(n.strong,{children:"C, D, E, F, G, H, J"}),"."]}),"\n",(0,s.jsxs)(n.li,{children:["Generic Substrate addresses ",(0,s.jsx)(n.strong,{children:"always start with"})," the number ",(0,s.jsx)(n.strong,{children:"5"}),"."]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"These prefixes, including how to validate addresses, are embedded in the Substrate SS58 format.\nNever use regular expressions for address validation."}),"\n",(0,s.jsxs)(n.p,{children:["It's important to understand that different network formats are ",(0,s.jsx)(n.strong,{children:"merely other representations of\nthe same public key in a private-public keypair"})," generated by an address generation tool. As a\nresult, the addresses across Substrate-based chains are compatible if the format is converted\ncorrectly."]}),"\n",(0,s.jsxs)(n.p,{children:["As of Runtime 28, the default ",(0,s.jsx)(n.a,{href:"/docs/learn-accounts##address-format",children:"address format"})," is the\n",(0,s.jsx)(n.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/master/substrate/primitives/runtime/src/multiaddress.rs",children:(0,s.jsx)(n.code,{children:"MultiAddress"})}),"\ntype."]}),"\n",(0,s.jsxs)(n.p,{children:["This ",(0,s.jsx)(n.code,{children:"enum"})," is a multi-format address wrapper for on-chain accounts and allows us to describe\nPolkadot's default address format to represent many different address types. This includes ",(0,s.jsx)(n.strong,{children:"20\nbyte"}),", ",(0,s.jsx)(n.strong,{children:"32 byte"}),", and ",(0,s.jsx)(n.strong,{children:"arbitrary raw byte"})," variants. It also enhances the original\n",(0,s.jsx)(n.a,{href:"/docs/learn-accounts#indices",children:(0,s.jsx)(n.code,{children:"indices"})})," lookup."]}),"\n",(0,s.jsx)(n.admonition,{type:"info",children:(0,s.jsxs)(n.p,{children:["Many wallets allow you to convert between formats. Stand-alone tools exist as well; you can find\nthem in the ",(0,s.jsx)(n.a,{href:"#address-conversion-tools",children:"address conversion tools"})," section."]})}),"\n",(0,s.jsx)(n.h3,{id:"for-the-curious-how-prefixes-work",children:"For the Curious: How Prefixes Work"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.a,{href:"https://github.com/paritytech/ss58-registry/blob/main/ss58-registry.json",children:"SS58 registry"})," states\nthat:"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Polkadot has an address type of ",(0,s.jsx)(n.code,{children:"00000000b"})," (",(0,s.jsx)(n.code,{children:"0"})," in decimal)."]}),"\n",(0,s.jsxs)(n.li,{children:["Kusama (Polkadot Canary) has an address type of ",(0,s.jsx)(n.code,{children:"00000010b"})," (",(0,s.jsx)(n.code,{children:"2"})," in decimal)."]}),"\n",(0,s.jsxs)(n.li,{children:["Generic Substrate has ",(0,s.jsx)(n.code,{children:"00101010b"})," as the address type (",(0,s.jsx)(n.code,{children:"42"})," in decimal)."]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["Because the ",(0,s.jsx)(n.code,{children:"Base58-check"})," alphabet has no number 0, the lowest value is indeed 1. So ",(0,s.jsx)(n.code,{children:"00000000b"})," is\n1 in Base58-check. If we try to\n",(0,s.jsx)(n.a,{href:"https://www.better-converter.com/Encoders-Decoders/Base58Check-to-Hexadecimal-Decoder",children:"decode"})," a\nPolkadot address like ",(0,s.jsx)(n.code,{children:"1FRMM8PEiWXYax7rpS6X4XZX1aAAxSWx1CrKTyrVYhV24fg"}),", the result is\n",(0,s.jsx)(n.code,{children:"000aff6865635ae11013a83835c019d44ec3f865145943f487ae82a8e7bed3a66b29d7"}),". The first byte is ",(0,s.jsx)(n.code,{children:"00"}),",\nwhich is indeed ",(0,s.jsx)(n.code,{children:"00000000"})," in binary and ",(0,s.jsx)(n.code,{children:"0"})," in decimal and thus matches the address type of\nPolkadot."]}),"\n",(0,s.jsxs)(n.p,{children:["Let's take a look at Substrate addresses. If we decode\n",(0,s.jsx)(n.code,{children:"5CK8D1sKNwF473wbuBP6NuhQfPaWUetNsWUNAAzVwTfxqjfr"}),", we get\n",(0,s.jsx)(n.code,{children:"2a0aff6865635ae11013a83835c019d44ec3f865145943f487ae82a8e7bed3a66b77e5"}),". The first byte is ",(0,s.jsx)(n.code,{children:"2a"}),"\nwhich when\n",(0,s.jsx)(n.a,{href:"https://www.rapidtables.com/convert/number/hex-to-decimal.html",children:"converted from hex to decimal"}),"\nis 42. 42 is ",(0,s.jsx)(n.code,{children:"00101010"})," in binary, just as the SS58 document states."]}),"\n",(0,s.jsxs)(n.p,{children:["Finally, let's look at Kusama addresses. Decoding ",(0,s.jsx)(n.code,{children:"CpjsLDC1JFyrhm3ftC9Gs4QoyrkHKhZKtK7YqGTRFtTafgp"}),"\ngives us ",(0,s.jsx)(n.code,{children:"020aff6865635ae11013a83835c019d44ec3f865145943f487ae82a8e7bed3a66b0985"})," with the first\nbyte being ",(0,s.jsx)(n.code,{children:"02"}),", just as specified. If we try a Kusama address that starts with a completely\ndifferent letter, like ",(0,s.jsx)(n.code,{children:"J4iggBtsWsb61RemU2TDWDXTNHqHNfBSAkGvVZBtn1AJV1a"}),", we still get ",(0,s.jsx)(n.code,{children:"02"})," as the\nfirst byte: ",(0,s.jsx)(n.code,{children:"02f2d606a67f58fa0b3ad2b556195a0ef905676efd4e3ec62f8fa1b8461355f1142509"}),". It seems\ncounterintuitive that some addresses always have the same prefix and others like Kusama can vary\nwildly, but it's just a quirk of Base58-check encoding."]}),"\n",(0,s.jsx)(n.h2,{id:"address-conversion-tools",children:"Address Conversion Tools"}),"\n",(0,s.jsx)(n.p,{children:"You can use the tools below to convert any SS58 address for any network for use on different\nnetworks"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"https://polkadot.subscan.io/tools/ss58_transform",children:"handy subscan tool"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"https://polkadot-address-convertor.netlify.app/",children:"simple address converter"})}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"how-to-verify-a-public-keys-associated-address",children:"How to Verify a Public Key's Associated Address"}),"\n",(0,s.jsx)(n.p,{children:"You can verify your public key's associated address through a series of inspection steps, where the\nkey is a base-16 (hexadecimal) address."}),"\n",(0,s.jsx)(n.h4,{id:"using-subkey-to-retrieve-public-key-from-ss58-address",children:"Using Subkey to Retrieve Public Key from SS58 Address"}),"\n",(0,s.jsxs)(n.p,{children:["This is to showcase that the ",(0,s.jsx)(n.strong,{children:'SS58 address is based on the public key (aka "Account ID")'})]}),"\n",(0,s.jsxs)(n.p,{children:["The Subkey Tool's The\n",(0,s.jsx)(n.a,{href:"https://docs.substrate.io/reference/command-line-tools/subkey/#inspecting-keys",children:"Inspecting Keys"}),"\nsection explains how to use the ",(0,s.jsx)(n.code,{children:"inspect"})," command to recalculate your key pair's public key and\naddress."]}),"\n",(0,s.jsx)(n.p,{children:"Start by inspecting your account's Polkadot address by running the inspect command against your\naccount's address:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"$ subkey inspect 1a1LcBX6hGPKg5aQ6DXZpAHCCzWjckhea4sz3P1PvL3oc4F\n\nPublic Key URI `1a1LcBX6hGPKg5aQ6DXZpAHCCzWjckhea4sz3P1PvL3oc4F` is account:\n Network ID/version: polkadot\n Public key (hex): 0x192c3c7e5789b461fbf1c7f614ba5eed0b22efc507cda60a5e7fda8e046bcdce\n Account ID: 0x192c3c7e5789b461fbf1c7f614ba5eed0b22efc507cda60a5e7fda8e046bcdce\n SS58 Address: 1a1LcBX6hGPKg5aQ6DXZpAHCCzWjckhea4sz3P1PvL3oc4F\n"})}),"\n",(0,s.jsx)(n.p,{children:'Take note of the hexadecimal string for "Public key (hex)". This is your account\'s public key.'}),"\n",(0,s.jsxs)(n.p,{children:["Running the ",(0,s.jsx)(n.code,{children:"inspect"})," command on your public key along with the ",(0,s.jsx)(n.code,{children:"--public"})," parameter the SS58\naddress for the default network (substrate) is returned."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"$ subkey inspect --public 0x192c3c7e5789b461fbf1c7f614ba5eed0b22efc507cda60a5e7fda8e046bcdce\n\nNetwork ID/version: substrate\n Public key (hex): 0x192c3c7e5789b461fbf1c7f614ba5eed0b22efc507cda60a5e7fda8e046bcdce\n Account ID: 0x192c3c7e5789b461fbf1c7f614ba5eed0b22efc507cda60a5e7fda8e046bcdce\n Public key (SS58): 5CdiCGvTEuzut954STAXRfL8Lazs3KCZa5LPpkPeqqJXdTHp\n SS58 Address: 5CdiCGvTEuzut954STAXRfL8Lazs3KCZa5LPpkPeqqJXdTHp\n"})}),"\n",(0,s.jsxs)(n.p,{children:["Using the ",(0,s.jsx)(n.code,{children:"--network"})," flag, you can define the network that you would like to inspect, where the\nSS58 address will be based on that network. Now, running the ",(0,s.jsx)(n.code,{children:"inspect"})," command with\n",(0,s.jsx)(n.code,{children:"--network polkadot"})," return your original Polkadot address, thus verifying the public key."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"$ subkey inspect --network polkadot 5CdiCGvTEuzut954STAXRfL8Lazs3KCZa5LPpkPeqqJXdTHp\n\nPublic Key URI `5CdiCGvTEuzut954STAXRfL8Lazs3KCZa5LPpkPeqqJXdTHp` is account:\n Network ID/version: polkadot\n Public key (hex): 0x192c3c7e5789b461fbf1c7f614ba5eed0b22efc507cda60a5e7fda8e046bcdce\n Account ID: 0x192c3c7e5789b461fbf1c7f614ba5eed0b22efc507cda60a5e7fda8e046bcdce\n Public key (SS58): 1a1LcBX6hGPKg5aQ6DXZpAHCCzWjckhea4sz3P1PvL3oc4F\n SS58 Address: 1a1LcBX6hGPKg5aQ6DXZpAHCCzWjckhea4sz3P1PvL3oc4F\n"})}),"\n",(0,s.jsxs)(n.p,{children:["You will notice that the Subkey Tool recognizes the correct address network and returns the\nassociated public key. The public key is returned as a hexadecimal string (i.e. prefixed with\n",(0,s.jsx)(n.strong,{children:'"0x"'}),"). ",(0,s.jsx)(n.strong,{children:"For both SS58 addresses, the same public key is returned."})]}),"\n",(0,s.jsx)(n.h4,{id:"address-verification",children:"Address Verification"}),"\n",(0,s.jsx)(n.h5,{id:"consider-the-following-example",children:"Consider the following example:"}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"19",src:t(66881).A+"",width:"739",height:"543"})}),"\n",(0,s.jsxs)(n.p,{children:["If you are comfortable enough to distinguish between each account parameter, you can prefix the\npublic-key string with ",(0,s.jsx)(n.strong,{children:'"0x"'})," on your own:"]}),"\n",(0,s.jsxs)(n.p,{children:["From:\n",(0,s.jsx)(n.code,{children:"Pay DOTs to the Polkadot account:192c3c7e5789b461fbf1c7f614ba5eed0b22efc507cda60a5e7fda8e046bcdce"}),',\nwe prefix the address by "0x" ->\n',(0,s.jsx)(n.code,{children:"0x192c3c7e5789b461fbf1c7f614ba5eed0b22efc507cda60a5e7fda8e046bcdce"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["Using the ",(0,s.jsx)(n.a,{href:"https://polkadot.subscan.io/tools/ss58_transform",children:"handy subscan tool"}),', you can verify\nboth address associations to your public key. Copy your public key into the "Input Account or Public\nKey" textbox and click "Transform" at the bottom. On the right-hand side, the addresses for Polkadot\nand Substrate that are returned based on your public key should match the ones you inspected.']}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"20",src:t(52650).A+"",width:"1505",height:"759"})}),"\n",(0,s.jsx)(n.admonition,{type:"note",children:(0,s.jsx)(n.p,{children:"You may have to scroll down to the bottom of the menu to find the Substrate address based on the\nmenu listings. You will notice that many networks that also use the same Substrate address."})}),"\n",(0,s.jsxs)(n.p,{children:["You can verify your public key verification by recalling that Polkadot addresses start with a '1',\nwhereas Substrate addresses generally start with a '5' (Kusama addresses start with a capital\nletter). See ",(0,s.jsx)(n.a,{href:"/docs/learn-accounts#address-format",children:"Addresses"})," for more details."]}),"\n",(0,s.jsxs)(n.p,{children:["Furthermore, the ",(0,s.jsx)(n.a,{href:"https://github.com/w3f/utility-scripts",children:"Utility Scripts"})," can be referenced for how\nthe verification is performed:\n",(0,s.jsx)(n.a,{href:"https://github.com/w3f/utility-scripts/blob/master/src/misc/pubkeyToAddress.js",children:"pubkeyToAddress.js"}),"\ndemonstrates how a single public key interprets a Polkadot, Substrate, or Kusama address."]}),"\n",(0,s.jsx)(n.h2,{id:"portability",children:"Portability"}),"\n",(0,s.jsx)(n.p,{children:"Portability is the ability to use a mnemonic phrase or seed across multiple wallets."}),"\n",(0,s.jsx)(n.p,{children:"Most wallets generate a mnemonic phrase for users to back up their wallets and generate a private\nkey from the mnemonic. Not all wallets use the same algorithm to convert from mnemonic phrase to\nprivate key, which affects the ability to use the same mnemonic phrase in multiple wallets. Wallets\nthat use different measures will arrive at a different set of addresses from the exact mnemonic\nphrase."}),"\n",(0,s.jsx)(n.admonition,{title:"Not all wallets use the same algorithm to convert from mnemonic phrase to private key",type:"danger",children:(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.a,{href:"https://docs.substrate.io/reference/command-line-tools/subkey/",children:"Subkey"})," and Polkadot-JS based\nwallets use the BIP39 dictionary for mnemonic generation, but use the entropy byte array to generate\nthe private key, while full BIP39 wallets (like Ledger) use 2048 rounds of PBKDF2 on the mnemonic.\nThe same mnemonic may generate different private keys on other wallets due to the various\ncryptographic algorithms used. See\n",(0,s.jsx)(n.a,{href:"https://github.com/paritytech/substrate-bip39",children:"Substrate BIP39 Repo"})," for more information."]})}),"\n",(0,s.jsx)(n.p,{children:"Portability depends on several factors:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Derivation path"}),"\n",(0,s.jsx)(n.li,{children:"Mnemonic format"}),"\n",(0,s.jsx)(n.li,{children:"Seed derivation"}),"\n",(0,s.jsx)(n.li,{children:"Signature scheme"}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"To use the exact mnemonic across multiple wallets, ensure they follow compatible methods for\ngenerating keys and signing messages. If you are still looking for understandable documentation,\ncontact the project maintainers."}),"\n",(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{style:{textAlign:"left"}}),(0,s.jsx)(n.th,{style:{textAlign:"center"},children:"Mnemonic Format"}),(0,s.jsx)(n.th,{style:{textAlign:"center"},children:"Derivation Path"}),(0,s.jsx)(n.th,{style:{textAlign:"center"},children:"Seed Derivation"}),(0,s.jsx)(n.th,{style:{textAlign:"center"},children:"Signature Support"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{style:{textAlign:"left"},children:"Polkadot-JS Extension"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Standard"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"User-Defined"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"BIP32"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"sr25519"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{style:{textAlign:"left"},children:"Polkadot-JS Apps"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Standard*"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"User-Defined"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"BIP32"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"sr25519, ed25519, secp256k"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{style:{textAlign:"left"},children:"Ledger"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"BIP39"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"BIP44\u2020"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"BIP32\u2021"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"ed25519\xa7"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{style:{textAlign:"left"},children:"Subkey"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Standard*"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"User-Defined"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"BIP32"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"sr25519, ed25519, secp256k1"})]})]})]}),"\n",(0,s.jsxs)(n.p,{children:["* Ed25519 keys have ",(0,s.jsx)(n.a,{href:"https://github.com/paritytech/substrate-bip39",children:"limited compatibility"})," with\nBIP39."]}),"\n",(0,s.jsxs)(n.p,{children:["\u2020 ",(0,s.jsx)(n.a,{href:"https://github.com/satoshilabs/slips/blob/master/slip-0044.md",children:"BIP44 Registry"})]}),"\n",(0,s.jsxs)(n.p,{children:["\u2021 Ed25519 and BIP32 based on\n",(0,s.jsx)(n.a,{href:"https://github.com/LedgerHQ/orakolo/blob/master/papers/Ed25519_BIP%20Final.pdf",children:"Khovratovich"})]}),"\n",(0,s.jsx)(n.p,{children:"\xa7 Sr25519 planned"}),"\n",(0,s.jsx)(n.h2,{id:"derivation-paths",children:"Derivation Paths"}),"\n",(0,s.jsx)(n.p,{children:"If you want to create and manage several accounts on the network using the same seed, you can use\nderivation paths. We can think of the derived accounts as child accounts of the root account created\nusing the original mnemonic seed phrase."}),"\n",(0,s.jsx)(n.h3,{id:"soft-and-hard-derivation",children:"Soft and Hard Derivation"}),"\n",(0,s.jsx)(n.p,{children:"A soft derivation allows someone to potentially \"go backward\u201d to figure out the initial account's\nprivate key if they know the derived account's private key. It is also possible to determine that\ndifferent accounts generated from the same seed are linked to that seed. A hard derivation path does\nnot allow either of these - even if you know a derived private key, it's not feasible to figure out\nthe private key of the root address, and it's impossible to prove that the first account is linked\nwith the second. These derivation methods have their use cases, given that the private keys for all\nthe derived accounts are fully secure. Unless you have a specific need for a soft derivation, it is\nrecommended to generate the account using a hard derivation path."}),"\n",(0,s.jsxs)(n.p,{children:["Many Polkadot key generation tools support hard and soft derivation. For instance, if you intend to\ncreate an account to be used on the relay chain, you can derive a ",(0,s.jsx)(n.strong,{children:"hard key"})," child account using\n",(0,s.jsx)(n.strong,{children:"//"})," after the mnemonic phrase."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"'caution juice atom organ advance problem want pledge someone senior holiday very//0'\n"})}),"\n",(0,s.jsxs)(n.p,{children:["and a ",(0,s.jsx)(n.strong,{children:"soft key"})," child account using ",(0,s.jsx)(n.strong,{children:"/"})," after the mnemonic phrase"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"'caution juice atom organ advance problem want pledge someone senior holiday very/0'\n"})}),"\n",(0,s.jsxs)(n.p,{children:["If you want to create another account using the Polkadot chain using the same seed, you can change\nthe number at the end of the string above. For example, ",(0,s.jsx)(n.code,{children:"/1"}),", ",(0,s.jsx)(n.code,{children:"/2"}),", and ",(0,s.jsx)(n.code,{children:"/3"})," will create different\nderived accounts."]}),"\n",(0,s.jsxs)(n.p,{children:["You can use any letters or numbers in the derivation path as long as they make sense to you; they do\nnot have to follow any specific pattern. You may combine multiple derivations in your path, as well.\nFor instance, ",(0,s.jsx)(n.code,{children:"//bill//account//1"})," and ",(0,s.jsx)(n.code,{children:"//john/polkadot/initial"})," are both valid. To recreate a\nderived account, you must know both the seed and the derivation path, so you should either use a\nwell-defined sequence (e.g. //0, //1, //2...) or be sure to write down any derivation paths you use."]}),"\n",(0,s.jsxs)(n.p,{children:["See the ",(0,s.jsx)(n.a,{href:"https://docs.substrate.io/reference/command-line-tools/subkey/",children:"Subkey documentation"})," for\ndetails and examples of derivation path formats. The Polkadot-JS Apps and Extension and Parity\nSigner support custom derivation paths using the same syntax as Subkey."]}),"\n",(0,s.jsxs)(n.p,{children:["Some wallets will automatically add derivation paths to the end of the generated mnemonic phrase.\nThis will generate separate seeds for different paths, allowing separate signing keys with the same\nmnemonic, e.g. ",(0,s.jsx)(n.code,{children:"//polkadot"})," and ",(0,s.jsx)(n.code,{children:"//kusama"}),". Although you may\ncorrectly save the mnemonic phrase, using it in another wallet will generate the same addresses only\nif both wallets use the same derivation paths."]}),"\n",(0,s.jsxs)(n.p,{children:["Polkadot and Kusama both have paths registered in the\n",(0,s.jsx)(n.a,{href:"https://github.com/satoshilabs/slips/blob/master/slip-0044.md",children:"BIP44 registry"}),"."]}),"\n",(0,s.jsx)(n.admonition,{type:"warning",children:(0,s.jsxs)(n.p,{children:["You must have the ",(0,s.jsx)(n.em,{children:"parent"})," private key and the derivation path to arrive at the key for an address.\nOnly use custom derivation paths if you are comfortable with your knowledge of this topic."]})}),"\n",(0,s.jsx)(n.h3,{id:"password-derivation",children:"Password Derivation"}),"\n",(0,s.jsxs)(n.p,{children:["There is an additional type of derivation called password derivation. On Polkadot you can derive a\n",(0,s.jsx)(n.strong,{children:"password key"})," account using ",(0,s.jsx)(n.strong,{children:"///"})," after the mnemonic phrase"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"'caution juice atom organ advance problem want pledge someone senior holiday very///0'\n"})}),"\n",(0,s.jsxs)(n.p,{children:["In this type of derivation, if the mnemonic phrase leaks, accounts cannot be derived without the\ninitial password. In fact, for soft- and hard-derived accounts, if someone knows the mnemonic phrase\nand the derivation path, they will have access to your account. For password-derived accounts, the\npassword is applied on the derivation path. You can know the mnemonic phrase and the derivation\npath, but without the password, it is impossible to access the account. In mathematical terms, if we\nhave a ",(0,s.jsx)(n.code,{children:"written derivation path"})," and a ",(0,s.jsx)(n.code,{children:"password"}),", we can calculate the ",(0,s.jsx)(n.code,{children:"real derivation path"})," as\n",(0,s.jsx)(n.code,{children:"f(written derivation path, password)"}),", where ",(0,s.jsx)(n.code,{children:"f"})," is a function. We can then calculate the\n",(0,s.jsx)(n.code,{children:"account key pair"})," using ",(0,s.jsx)(n.code,{children:"f(seed, real derivation path)"}),". Unlike hard and soft derivations that can\nbe mixed, only a single password should be specified per derivation."]}),"\n",(0,s.jsx)(n.admonition,{type:"info",children:(0,s.jsx)(n.p,{children:"Password-derived account are as secure as the chosen password."})}),"\n",(0,s.jsxs)(n.h3,{id:"account-derivation-on-ledger-live",children:["Account Derivation on ",(0,s.jsx)(n.a,{href:"/docs/ledger",children:"Ledger"})," Live"]}),"\n",(0,s.jsxs)(n.p,{children:["Ledger Live will only show the main account with BIP44 path 44'/354'/0'/0'/0'. This means that if\nyou created a derived account with a derivation path 44'/354'/0'/0'/1' on a wallet or extension, it\nwill not be displayed on the Ledger Live App. Consequently, it is not possible to transact with\nderived accounts using the Ledger Live App, but it is possible to do so using Polkadot-JS. Check\n",(0,s.jsx)(n.a,{href:"/docs/learn-accounts",children:"the accounts page"})," for more information about derived accounts and\nderivation paths."]}),"\n",(0,s.jsxs)(n.p,{children:["Note that you cannot import Kusama Ledger accounts in Ledger Live. To see Kusama account balances,\nyou must import your ledger account into a ",(0,s.jsx)(n.a,{href:"./wallets",children:(0,s.jsx)(n.strong,{children:"wallet"})}),"."]}),"\n",(0,s.jsxs)(n.h3,{id:"account-derivation-on-subkey-and-polkadot-vault",children:["Account Derivation on ",(0,s.jsx)(n.a,{href:"#creating-accounts-with-subkey",children:"Subkey"})," and ",(0,s.jsx)(n.a,{href:"/docs/polkadot-vault",children:"Polkadot Vault"})]}),"\n",(0,s.jsx)(n.p,{children:"The Subkey tool and Polkadot Vault App use the following Polkadot Standard Hard Derivation scheme:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"//network"})," as the primary account for ",(0,s.jsx)(n.code,{children:"network"}),", named according to ",(0,s.jsx)(n.code,{children:"network"}),"'s named chain\nspecification","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"//network//0"}),", ",(0,s.jsx)(n.code,{children:"//network//1"}),", ... as the secondary high-security accounts for ",(0,s.jsx)(n.code,{children:"network"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["For example, the Vault app will generate a new account from a ",(0,s.jsx)(n.code,{children:"SEED PHRASE"}),", and for each network\nwill create a derived child account from that seed. For the default networks Polkadot, Kusama and\nWestend the derivation path will be:"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"SEED PHRASE//polkadot"})," for Polkadot, with ",(0,s.jsx)(n.code,{children:"SEED PHRASE//polkadot//0"})," as the first secondary\nhigh-security account"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"SEED PHRASE//kusama"})," for Kusama, with ",(0,s.jsx)(n.code,{children:"SEED PHRASE//kusama//0"})," as the first secondary\nhigh-security account"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"SEED PHRASE//westend"})," for Westend, with ",(0,s.jsx)(n.code,{children:"SEED PHRASE//westend//0"})," as the first secondary\nhigh-security account"]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"Additionally, although it is not strictly necessary, users can adopt the following good practice\nscheme:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"//network//pub"})," as the primary high-security public account for ",(0,s.jsx)(n.code,{children:"network"}),' (the one the user is\nhappy to be associated with their "real" ID)',"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"//network//pub//0"}),", ",(0,s.jsx)(n.code,{children:"//network//pub//0"}),", ... as the secondary high-security public accounts for\n",(0,s.jsx)(n.code,{children:"network"})]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"//network//hot"})," as the primary low-security account for ",(0,s.jsx)(n.code,{children:"network"})," (the one whose secret key the\nuser exports from the Vault app to carry on an internet-connected device)","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"//network//hot//0"}),", ",(0,s.jsx)(n.code,{children:"//network//hot//1"}),", ... as the secondary low-security accounts for\n",(0,s.jsx)(n.code,{children:"network"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.admonition,{type:"info",children:(0,s.jsxs)(n.p,{children:["For more information about account derivation best practices, see\n",(0,s.jsx)(n.a,{href:"https://forum.polkadot.network/t/polkadot-standards-proposal-psp-to-define-hierarchical-deterministic-hd-key-derivation-paths/2941/2",children:"this post"}),"\non the Polkadot Forum."]})}),"\n",(0,s.jsx)(n.h2,{id:"system-accounts",children:"System Accounts"}),"\n",(0,s.jsxs)(n.p,{children:["As the word suggests, system accounts are used by the system. They are used, for example, for the\ntreasury, crowdloans, and nomination pools. From the point of view of the runtime, these accounts\nare like any other account on-chain. These special system accounts are just public keys, with the\nprivate key being unknown (and unattainable). So, that means that only the pallet itself can\ninteract with this account. These accounts can never issue a signed\n",(0,s.jsx)(n.a,{href:"/docs/learn-transactions",children:"extrinsic"})," since they do not have a private key."]}),"\n",(0,s.jsx)(n.p,{children:"Explore the main system accounts below."}),"\n",(0,s.jsxs)(r.A,{groupId:"system",values:[{label:"Polkadot",value:"polkadot"},{label:"Kusama",value:"kusama"}],children:[(0,s.jsx)(i.A,{value:"polkadot",children:(0,s.jsxs)(n.p,{children:["Treasury account address - ",(0,s.jsx)(n.code,{children:"13UVJyLnbVp9RBZYFwFGyDvVd1y27Tt8tkntv6Q7JVPhFsTB"})]})}),(0,s.jsx)(i.A,{value:"kusama",children:(0,s.jsxs)(n.p,{children:["Treasury account address - ",(0,s.jsx)(n.code,{children:"F3opxRbN5ZbjJNU511Kj2TLuzFcDq9BGduA9TgiECafpg29"})]})})]}),"\n",(0,s.jsxs)(n.p,{children:["You can view the existing system accounts on\n",(0,s.jsx)(n.a,{href:"https://polkadot.subscan.io/account_list?role=module",children:"Subscan"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:['Let us take a look at how system accounts are generated under the hood. For instance, to generate\nthe treasury account, the raw bytes of the strings "modl" and "py/trsry" are combined to create the\n',(0,s.jsx)(n.code,{children:"AccountID"}),". For more information, check the post on Substrate StackExchange on\n",(0,s.jsx)(n.a,{href:"https://substrate.stackexchange.com/questions/536/how-do-treasury-accounts-compare-to-end-user-accounts-in-frame",children:"Treasury accounts"}),'.\nSimilarly, to generate the crowdloan account, the raw bytes of the strings "modl" and "py/cfund"\nalong with the fund index are combined to create the ',(0,s.jsx)(n.code,{children:"AccountID"}),". Similar logic applies to\nnomination pool and parachain accounts as well."]}),"\n",(0,s.jsx)(n.h2,{id:"indices",children:"Indices"}),"\n",(0,s.jsxs)(n.p,{children:["Polkadot addresses can have indices. An index is like a short and easy-to-remember version of an\naddress. Claiming an index requires ",(0,s.jsx)(n.a,{href:"/docs/chain-state-values#index-deposit",children:"a deposit"}),"\nreleased when the index is cleared. Any index can be claimed if it is not taken by someone else."]}),"\n",(0,s.jsxs)(n.p,{children:["But what if an account gets reaped, as explained above? In that case, the index is emptied. In other\nwords, the slot frees up again, making it available for anyone to claim. It is possible to ",(0,s.jsx)(n.em,{children:"freeze"}),"\nan index and permanently assign it to an address. ",(0,s.jsx)(n.strong,{children:"This action consumes a deposit, and the index\nwill be permanently bound to the address with no option to release it."})]}),"\n",(0,s.jsx)(n.admonition,{title:"Lookup Account Index on-chain",type:"note",children:(0,s.jsx)(n.p,{children:"When someone shares their account index, their actual account address on-chain can be looked up\nthrough Polkadot-JS Apps UI > Developer > Chain state > Storage and selecting state query on indices\npallet for the account corresponding to the index."})}),"\n",(0,s.jsxs)(n.p,{children:["Here is an example snapshot that shows how to lookup the corresponding account address of the\naccount index 1988 on\n",(0,s.jsx)(n.a,{href:"/docs/maintain-networks#westend-test-network",children:"Westend network (Polkadot Test Network)"}),",\nusing Polkadot-JS Apps UI. The output shows the account address, deposit amount, and a boolean flag\nindicating whether this is claimed permanently."]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"query account index",src:t(24210).A+"",width:"2012",height:"998"})}),"\n",(0,s.jsxs)(n.p,{children:["Submit a ",(0,s.jsx)(n.code,{children:"claim"})," extrinsic to the ",(0,s.jsx)(n.code,{children:"indices"})," pallet to register an index. The easiest way to do this\nis via Polkadot-JS UI through the ",(0,s.jsx)(n.em,{children:"Developer -> Extrinsics"})," menu:"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"Indices extrinsics",src:t(31085).A+"",width:"786",height:"386"})}),"\n",(0,s.jsxs)(n.p,{children:["To find available indices to claim on Polkadot or Kusama,\n",(0,s.jsx)(n.a,{href:"https://www.shawntabrizi.com/substrate-js-utilities/indices/",children:"this helper tool may come in handy"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["For keeping the index permanently, you can follow up with a ",(0,s.jsx)(n.code,{children:"freeze"})," extrinsic as mentioned above."]}),"\n",(0,s.jsx)(n.h2,{id:"creating-accounts-with-subkey",children:"Creating Accounts with Subkey"}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/substrate/bin/utils/subkey",children:"Subkey"})," is\nrecommended for technically advanced users comfortable with the command line and compiling Rust\ncode. Subkey lets you generate keys on any device that can compile the code. Subkey may also be\nuseful for automated account generation using an air-gapped device. It is not recommended for\ngeneral users. Follow the instructions in the\n",(0,s.jsx)(n.a,{href:"https://docs.substrate.io/reference/command-line-tools/subkey/",children:"Subkey documentation"}),"."]}),"\n",(0,s.jsx)(n.admonition,{type:"info",children:(0,s.jsxs)(n.p,{children:["For guidelines about how to create an account using Subkey, see\n",(0,s.jsx)(n.a,{href:"https://youtu.be/SWfE_EwxgIU",children:(0,s.jsx)(n.strong,{children:"this video tutorial"})})," and visit\n",(0,s.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000180519-how-to-create-an-account-in-subkey",children:(0,s.jsx)(n.strong,{children:"this support article"})}),"."]})}),"\n",(0,s.jsx)(n.h2,{id:"using-ens-with-dotksm-accounts",children:"Using ENS with DOT/KSM accounts"}),"\n",(0,s.jsxs)(n.p,{children:["ENS (Ethereum Name Service) is a distributed and open system of smart contracts on the Ethereum\nblockchain which allows users to claim domain names like ",(0,s.jsx)(n.code,{children:"bruno.eth"}),"."]}),"\n",(0,s.jsx)(n.p,{children:"The ENS is equivalent to a DNS (Domain Name System) domain. Instead, it offers a decentralized and\nsecure way to translate text via smart contracts. Supporting wallets can then allow senders to input\nENS domains instead of long and unwieldy addresses. This prevents phishing, fraud, and typos and\nadds a layer of usability to the regular wallet user experience."}),"\n",(0,s.jsx)(n.admonition,{type:"note",children:(0,s.jsxs)(n.p,{children:["You will need an ENS name and an Ethereum account with some ether to follow along with this guide.\nTo register an ENS name, visit the ",(0,s.jsx)(n.a,{href:"https://app.ens.domains",children:"ENS App"})," or any number of subdomain\nregistrars like ",(0,s.jsx)(n.a,{href:"https://nameth.io",children:"Nameth"}),". Note that if you're using an older ENS name, you should\nmake sure you're using the\n",(0,s.jsx)(n.a,{href:"https://medium.com/the-ethereum-name-service/ens-registry-migration-is-over-now-what-a-few-things-to-know-fb05f921872a",children:"new resolver"}),".\nVisiting the ENS App will warn you about this. You will also need some way to use your Ethereum\naddress - following this guide on a personal computer is recommended. Wallets like\n",(0,s.jsx)(n.a,{href:"https://frame.sh/",children:"Frame"})," and ",(0,s.jsx)(n.a,{href:"https://metamask.io",children:"Metamask"})," are safe and will make interacting\nwith the Ethereum blockchain through your browser very easy."]})}),"\n",(0,s.jsx)(n.p,{children:"Despite living on the Ethereum blockchain, the ENS system has multi-chain support. In this guide,\nyou'll go through the process of adding a KSM and DOT address to ENS. We cover both KSM and DOT to\nshow two different approaches."}),"\n",(0,s.jsx)(n.admonition,{type:"note",children:(0,s.jsx)(n.p,{children:"DOT can currently only be added using the Resolver method. KSM can be added through both methods are\ndescribed below."})}),"\n",(0,s.jsxs)(n.p,{children:["This guide is also available in video format ",(0,s.jsx)(n.a,{href:"https://youtu.be/XKjZk-5_mQc",children:"on YouTube"}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"adding-via-the-ui",children:"Adding via the UI"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.a,{href:"https://app.ens.domains",children:"ENS App"})," allows an ENS domain owner to inspect all records bound to\nthe domain, and to add new ones."]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"bruno.eth domain name in the ENS application",src:t(59109).A+"",width:"977",height:"842"})}),"\n",(0,s.jsxs)(n.p,{children:["In the example above, the domain ",(0,s.jsx)(n.code,{children:"bruno.eth"})," has an Ethereum and a Bitcoin address attached. Let's\nattach a KSM account. First, click the ",(0,s.jsx)(n.code,{children:"[+]"})," icon in the Records tab."]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"The plus icon in the records tab",src:t(5502).A+"",width:"951",height:"190"})}),"\n",(0,s.jsx)(n.p,{children:'Then, pick "Other Addresses", "KSM", and input the Kusama address:'}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"Inputs needed to register a KSM address",src:t(98863).A+"",width:"914",height:"224"})}),"\n",(0,s.jsx)(n.p,{children:"After clicking Save, your Ethereum wallet will ask you to confirm a transaction. Once processed, the\nrecord will show up on the domain's page:"}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"KSM address now visible in bruno.eth records",src:t(576).A+"",width:"936",height:"367"})}),"\n",(0,s.jsx)(n.p,{children:"The exact process applies to adding your DOT address."}),"\n",(0,s.jsx)(n.p,{children:"Once the transaction is confirmed, your address will be bound to your ENS domain."}),"\n",(0,s.jsx)(n.h3,{id:"wallet-support",children:"Wallet Support"}),"\n",(0,s.jsxs)(n.p,{children:["There is no wallet support for ENS names for either KSM or DOT at this time, but the crypto\naccounting and portfolio application ",(0,s.jsx)(n.a,{href:"https://rotki.com/",children:"Rotki"})," does support KSM ENS resolution."]}),"\n",(0,s.jsx)(n.h3,{id:"relevant-links",children:"Relevant links"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"https://docs.ens.domains/",children:"ENS docs"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"https://medium.com/the-ethereum-name-service/ens-launches-multi-coin-support-15-wallets-to-integrate-92518ab20599",children:"ENS Multi-chain announcement"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"https://github.com/ensdomains/address-encoder",children:"Address encoder"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"https://swolfeyes.github.io/ethereum-namehash-calculator/",children:"Namehash calculator"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"https://www.shawntabrizi.com/substrate-js-utilities/",children:"Address to pubkey converter"})}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"transferring-polkadot-js-apps-accountsaddresses-from-one-computer-to-another",children:"Transferring Polkadot-JS Apps Accounts/Addresses From One Computer to Another"}),"\n",(0,s.jsx)(n.admonition,{type:"caution",children:(0,s.jsx)(n.p,{children:"This will overwrite existing accounts with the same pubkey on your new computer. This generally\nshould not make a difference (since it can still access the same account), but it might if you have\ne.g. an account that was stored externally in the extension on the old computer but was created\ndirectly in the browser on the new one."})}),"\n",(0,s.jsx)(n.p,{children:"This has been tested on Brave and Chrome, but not other browsers."}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsx)(n.li,{children:"Go to Polkadot-JS Apps"}),"\n",(0,s.jsx)(n.li,{children:"Go to JavaScript console on the browser (Available in Developer Tools)"}),"\n",(0,s.jsx)(n.li,{children:"Type in the command:"}),"\n"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"JSON.stringify(localStorage)\n"})}),"\n",(0,s.jsxs)(n.ol,{start:"4",children:["\n",(0,s.jsx)(n.li,{children:"Copy and paste the returned string to a text editor and save the file."}),"\n",(0,s.jsx)(n.li,{children:"Check that the string you pasted begins and ends with a tick mark ('). If not, add one to the\nbeginning and end."}),"\n",(0,s.jsx)(n.li,{children:"Save and send that file with the copied string to the new computer."}),"\n",(0,s.jsx)(n.li,{children:"On the new computer, go to Polkadot-JS Apps"}),"\n",(0,s.jsx)(n.li,{children:"Open the Javascript console on the browser (Available in Developer Tools)"}),"\n",(0,s.jsx)(n.li,{children:"Set a variable raw equal to the string from the text file"}),"\n"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"raw = ... copy-pasted json from original computer ...\n"})}),"\n",(0,s.jsxs)(n.ol,{start:"10",children:["\n",(0,s.jsx)(n.li,{children:"Run the following code on the console:"}),"\n"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"accounts = JSON.parse(raw);\nfor (var key in accounts) {\n if (accounts.hasOwnProperty(key)) {\n val = JSON.stringify(accounts[key]).replace(/\\\\/g,'').slice(1,-1);\n console.log(key + \" -> \" + val);\n localStorage.setItem(key, val);\n }\n}\n"})}),"\n",(0,s.jsxs)(n.ol,{start:"11",children:["\n",(0,s.jsx)(n.li,{children:"Refresh Polkadot-JS App browser and check the Accounts and Addresses pages. All of your accounts\nand addresses should now be available."}),"\n"]})]})}function p(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(u,{...e})}):u(e)}},19365:(e,n,t)=>{t.d(n,{A:()=>i});t(96540);var s=t(34164);const a={tabItem:"tabItem_Ymn6"};var r=t(74848);function i(e){var n=e.children,t=e.hidden,i=e.className;return(0,r.jsx)("div",{role:"tabpanel",className:(0,s.A)(a.tabItem,i),hidden:t,children:n})}},11470:(e,n,t)=>{t.d(n,{A:()=>A});var s=t(96540),a=t(34164),r=t(23104),i=t(56347),o=t(205),d=t(57485),c=t(31682),l=t(75376);function h(e){var n,t;return null!=(n=null==(t=s.Children.toArray(e).filter((function(e){return"\n"!==e})).map((function(e){if(!e||(0,s.isValidElement)(e)&&((n=e.props)&&"object"==typeof n&&"value"in n))return e;var n;throw new Error("Docusaurus error: Bad child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:t.filter(Boolean))?n:[]}function u(e){var n=e.values,t=e.children;return(0,s.useMemo)((function(){var e=null!=n?n:function(e){return h(e).map((function(e){var n=e.props;return{value:n.value,label:n.label,attributes:n.attributes,default:n.default}}))}(t);return function(e){var n=(0,c.XI)(e,(function(e,n){return e.value===n.value}));if(n.length>0)throw new Error('Docusaurus error: Duplicate values "'+n.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[n,t])}function p(e){var n=e.value;return e.tabValues.some((function(e){return e.value===n}))}function m(e){var n=e.queryString,t=void 0!==n&&n,a=e.groupId,r=(0,i.W6)(),o=function(e){var n=e.queryString,t=void 0!==n&&n,s=e.groupId;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!s)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=s?s:null}({queryString:t,groupId:a});return[(0,d.aZ)(o),(0,s.useCallback)((function(e){if(o){var n=new URLSearchParams(r.location.search);n.set(o,e),r.replace(Object.assign({},r.location,{search:n.toString()}))}}),[o,r])]}function f(e){var n,t,a,r,i=e.defaultValue,d=e.queryString,c=void 0!==d&&d,h=e.groupId,f=u(e),x=(0,s.useState)((function(){return function(e){var n,t=e.defaultValue,s=e.tabValues;if(0===s.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!p({value:t,tabValues:s}))throw new Error('Docusaurus error: The has a defaultValue "'+t+'" but none of its children has the corresponding value. Available values are: '+s.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return t}var a=null!=(n=s.find((function(e){return e.default})))?n:s[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:i,tabValues:f})})),b=x[0],y=x[1],j=m({queryString:c,groupId:h}),v=j[0],g=j[1],A=(n=function(e){return e?"docusaurus.tab."+e:null}({groupId:h}.groupId),t=(0,l.Dv)(n),a=t[0],r=t[1],[a,(0,s.useCallback)((function(e){n&&r.set(e)}),[n,r])]),k=A[0],w=A[1],S=function(){var e=null!=v?v:k;return p({value:e,tabValues:f})?e:null}();return(0,o.A)((function(){S&&y(S)}),[S]),{selectedValue:b,selectValue:(0,s.useCallback)((function(e){if(!p({value:e,tabValues:f}))throw new Error("Can't select invalid tab value="+e);y(e),g(e),w(e)}),[g,w,f]),tabValues:f}}var x=t(92303);const b={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var y=t(74848);function j(e){var n=e.className,t=e.block,s=e.selectedValue,i=e.selectValue,o=e.tabValues,d=[],c=(0,r.a_)().blockElementScrollPositionUntilNextRender,l=function(e){var n=e.currentTarget,t=d.indexOf(n),a=o[t].value;a!==s&&(c(n),i(a))},h=function(e){var n,t=null;switch(e.key){case"Enter":l(e);break;case"ArrowRight":var s,a=d.indexOf(e.currentTarget)+1;t=null!=(s=d[a])?s:d[0];break;case"ArrowLeft":var r,i=d.indexOf(e.currentTarget)-1;t=null!=(r=d[i])?r:d[d.length-1]}null==(n=t)||n.focus()};return(0,y.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,a.A)("tabs",{"tabs--block":t},n),children:o.map((function(e){var n=e.value,t=e.label,r=e.attributes;return(0,y.jsx)("li",Object.assign({role:"tab",tabIndex:s===n?0:-1,"aria-selected":s===n,ref:function(e){return d.push(e)},onKeyDown:h,onClick:l},r,{className:(0,a.A)("tabs__item",b.tabItem,null==r?void 0:r.className,{"tabs__item--active":s===n}),children:null!=t?t:n}),n)}))})}function v(e){var n=e.lazy,t=e.children,r=e.selectedValue,i=(Array.isArray(t)?t:[t]).filter(Boolean);if(n){var o=i.find((function(e){return e.props.value===r}));return o?(0,s.cloneElement)(o,{className:(0,a.A)("margin-top--md",o.props.className)}):null}return(0,y.jsx)("div",{className:"margin-top--md",children:i.map((function(e,n){return(0,s.cloneElement)(e,{key:n,hidden:e.props.value!==r})}))})}function g(e){var n=f(e);return(0,y.jsxs)("div",{className:(0,a.A)("tabs-container",b.tabList),children:[(0,y.jsx)(j,Object.assign({},n,e)),(0,y.jsx)(v,Object.assign({},n,e))]})}function A(e){var n=(0,x.A)();return(0,y.jsx)(g,Object.assign({},e,{children:h(e.children)}),String(n))}},31085:(e,n,t)=>{t.d(n,{A:()=>s});const s=t.p+"assets/images/index-a2000a16d514f2136b303dd1d29a17f4.png"},66881:(e,n,t)=>{t.d(n,{A:()=>s});const s=t.p+"assets/images/pubkey-1-6dc18c2b04022519cc6dd0fb3af36f94.png"},52650:(e,n,t)=>{t.d(n,{A:()=>s});const s=t.p+"assets/images/pubkey-2-16f0cbc7db6ab6eb8248a05df94adc35.png"},24210:(e,n,t)=>{t.d(n,{A:()=>s});const s=t.p+"assets/images/query-index-6db697cbe5e058388b830fee34bc4415.png"},59109:(e,n,t)=>{t.d(n,{A:()=>s});const s=t.p+"assets/images/01-min-dd1b37ae350384f3941bf8f446ec0994.png"},5502:(e,n,t)=>{t.d(n,{A:()=>s});const s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA7cAAAC+CAMAAADZXQhkAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAJSUExURfD2+u70+OYbG/3+/tPT01KE/+/2+v///1OE/u3t7fTx/+/2/9Gm/627zbeU/+j//3m6/1Kl/7Xm/06Osvz8/NTh/6iwEOq6///4/3mF///n/wAAAPb29nCG//X////9/1KT/9L////x/2SF///O/8We/6DV/1iQ/1iE//Ly8pHK/1eL/9L1/nC1/pvP/5uE/8T0/12J/1WX//r6+vfG/6+R/9r//1KM/4GG/3Gc/7rZ/p6M/8aCAIceRWKq/4+F/+///+O0/1eH/1OQqf/e/6y/1v/V/9G2/6OtGv/8x2CW/9mt/wAFgaXi/4yKjeH0/+ioWN67/wEEJoXC/+/k3vTS/83q/1Og//To/wAAUGWd/+PR/8b//4mN/5i1/7Gd/4IFAPTg/6CX/9/p/7TN/5/J/+uPkbmk///k/4Oo/+yUllGGqqjB/9/G/8Dr/+g2NpOP/73J1//jpuzH/1yq/7O8zu/X2c7+/3Sp/7HL4enx/5C6/8Op/9/S0ePr7sLd/unc/4Wz/8zX4u7KzbnV7RsAAKza//P03+laXF0JAOlNTn6+/djy/gVQoMvHz///6gYgTACCxtvh5+69wFGj47y8zW1RLQAzimyKjP//9/vBe4WxyYg1AEIAALq0//rR/xRKbS4bAGGOs1OE/QZvuIhtT6FUCTGNzr/CzpPE7tCPOtLs9YyKfERkeFYwEK9jAKvW9Wd3fj1EQr13GLeIYRs7XsHIWtTZle3p0N+4kFPB/2GVxidYhppddzmFzBiFzLC4KYyUvnOizr11ALVxGBgAGEKYpuAAACAcSURBVHja7Z2JW1RHusZh2vZgp20W6dAszdFusRFZFWTLVUDAIIkoBNcRRHGUERTBGDWJ27iM0WhitlGTGDOTZJJMksmdbLPeWe79v259X9VZaVS2BvR9n0cpTp9zquqc+tW3VAFJGgRB80fJyQsXJicl4UFAELiFIAjcQhAEbiEI3EIQBG4hCAK3EARuIQgCtxAEgVsImh4FBwdqK1JmTBW1A4NBcAtB0wltzwwia4O3JwhuIWiaqB1gqn47s9DK2w8EwS0ETYN6UlK8KQmSqKgH3ELQVLW/NiXBqt0PbiFoKvIEKxKNbcpvK4LgFoKmEtom0Ee2+cpBcAtBk3eSE29tZWJ5P7iFoMmqNvHWVlrcWnALQZNUT8psqakH3ELQZIPb2VPwCePW4/FkZq5Zc6bl7sdLlnx8t+VMXt4aocxMDwmDEXpkDcwmtwNPHLcC2yt3l5i6+xOTK8Gd+v1DT83jhxPBxDURc+udPWy9EzC4jwe3mZmZPz4reN3AEoVnf8wjcqcH3K3RFc4DeqR/zj4Lfeta+7c5+1Y3TOaJ+ubuy57JpvWkzKp6nixuhbVtIVw3PMui0oYWN7ijNd6ml/PjXe5PU0O80FtbzAe8LHlYL9jVYZyZFfauyqCv6XZQxMEDsrjRLGqRgxXeTdsk99lmzVtrvN6BMSDJ+ujGASrUyssiveYdHDIa4aBV1CzryMleZjveHT4QxwKbTbNX1zcsui97GtqYnf6gy7jPTUVUWk53WDXmuZZ5zS5pQzVm0+TRZa6aLcU/Knud/oCmTZsqZpfbiieN21PsHm949mkh4lbolATX4Dar6cDp3TUl8UZEIQPaHD7f0de7isCN+IS6w8USqnXmoAytL/KdC7q49Vf3+7ZGeRD7Y3W+jdEuHuT1u4I7equLueYVvqHwOjrazo1Y5/YAAteoQjoaKPH5+g6uIpMZoju80nRkjNNuNMKuAlHz1miam9tD2Rlx+LOaZqvuUPb5jnP11VRsLWzakx7/soNN5bK6s6JLacxtuc83tKfLZRP5Cbbzk+MHv2cdN+0yHWZ7aavZ/iDiHiXdi3KLXE2rnbCderApn66s1K4jG2c4M/VYcLvmzJKx3C65ZQdXjHZ67dExGIgBywNQq2L0Cgyy9apSabE2pVpOp4GBjdvmMB0bpbEW6aW7ty8le1qwWlymf0jXFlwW/1WSlYnUcLGw3NWE+svmwJVNoaormaHAmJkmJw6LrRV0y8bqVCe3uuyTm3Grabbqhs4Tm+upmBN0TExKjUu5M8epabFU7nk5cUvVLV/q9iE89GB54qvvYt5ecrbcVrOd27hHedIIc4tcTUvpGSRNG7iDk2EtXXQzNOQ49Lw2SW4Hnyx7e5eIXbLk8H+xDov4VtB7d6WNW0mBViUGUWTYjrDgMyDt1EuabQTqo9ulma1a4XT+0iW3wlGM1fFwXi3O00PrzdMat3uIUP5e142jlcSUHsm3wCO3XLqdkZryOAM3S3IiuTWrszXC7oD7pM+6jO5+drhQHa20xbZU3ckGzdk0Nyeh9ZfdE5NZc1WXZswmftmoQKmT29BGEQWYLrNeICeNMvrSHC0fn9u+fabfbjuaczBq9JlCGX+6NmbO1JR9SqmdJnAHJvGDe95ibUewwQGqd5Lc/vbRM8qPBbdnlri5Zat7ywZuu3zb/Pa7K4o1vT5NjYh1noDNv5TjUIy6egli66YPxcA9Kyf97vBl6eVleTedFR5xqQWWYRf1bh6cy70vOY36sGVDeAxrOetP7lducGtM1GEN3IifDKKwfV2Z+miUh3qj8MU3yqLVCK091u+THqgxN6ylfki/lL3ulwlWBikiqjtXT46rvWm26vikAiMmMOEwa47UZJjWXiUE6Gp6Xnr3Hu5d48BZ0Z4i0weQ7m5jbJsWqaL2uLlVNYeGB8WTiKW62tPbExQ1yxkta3XqA7kdrJsecCfzc0De1Mj6lPTBsLK8voNkbkWvyib1c0GT53ZLLun7z0XxGS7ufF7T2z65n/vR5/z5n9+91PnVH/nMndTA2396jl/Hls4i64K2vVToPHw9Idy2HD5M6agNGyS3oiC+PXy4xcatwOte9Jo0YrpgtVENVnKDmVtlMdsVt9IVpO85yix3+clsC9lzFK6oCGA1NaxEhmlXg3mCGUF7vZvM3JYeIIOstR833HK90isQVgEnWVOVB2umNE6pZprI3U85G5FTc8ScBaQvWWJ+zN57pIYR5hmlnUxvTtDVNHt1nDa67ILDqpnqCcSKtbJS8jEauP40lZfy2pJflQZWZsRBWTfuvsxLZYytmd3pjHhHpc0+lF2uPZDbgcHaiW0TnMa0lOhQKLiPi8X6uW2eSE3KtW3auf6aGU1MxeG289vNmz+5LyjUntn5m81C5drNTzu/EofIU9oiqBXkdpncandy6Q3d/Oa5n1sXtO39aPPmP7x76XcNieD27warMr5lhoXt/ftKE1xic7SwRA3ayHBPWA6fyHCG4Z01Vtdpoa1RNaoLlDkOWFHdmPiWkRHjuN1bZAyrCGWgPG5uQ8IMGUYtdLBahn0rpCERBi6nnw18iUrMnOuNFfNgZYNMpy2vXhsnvq1czcaxTHnokX1chfIbyKttLWQXNXzE9HI1N7dWdaIFvr5eryuAt2oWhlWv95Yzt8J4n9YO7SssVXmpreFrMgFe6I31qtuH1mdYeTvZfZmX8oypeUjwPMAOif1o9x6RWt6XZqQaHsStNJPTMJAmF5QWiYlmhyD3L/nnenqOaK9MIb5NmQK3TOPIB/8juBUosu588Lbmafv755o+8sF7YrC2vf9cuXFmZtve34kB1LbXukAX373JpnhnRiK4NXxjS9JntnFLs3/EHLSVhWm2MEtyq7UXioHSKwnVy5TlCXTJ4Zsah1t2HSn1E7ENK5l2cnLLFEq8coZj1+0rJdZ57YShbEoB+b6B4/mGTXfczWqEvIM0yXpfzS7VxmUcXKaZ0HFyqqw0LrdWdSrYP+6Ewzq5OfqSFspUNzokmGoatPJSnKLSRcJZIKyuWK4cltbCDHbTi+LFt1SzPiq8gnO9haXO9rRGRXr/IL8nP82ED+KWFJw9blNStl/25AhuZT5u46Tj22ngtm3v66lObjWdZsovyA5rOttYZW9v/4dOu/N/XTbQJbfC5+5KGLcymay0wcWtx2+LbwUNXrkWU1loH/shX6aRX6JRauZezKjXxS1/q6C38r46jWzOnzpUlSbXU8+rCLKsyGcuiliIyLstp6K0o4fIMRiH26UdfIdM/iZaZHy8zIw95WV8T4tbe9Ns1Tk5HcutkU1TtUd80ltWT4YsYmtsre1mjcYdpFfgPx6PWz5ZTo2BUudR/zpjab056rWvp881bo8Hd6ekLE2NlAl7u6Ou7mzdvrljb9ve7zzMuZmbn77Hb33k6psmtxzZinPLx3CbKHsrV4A2WPscNzzLq0E2biulxZRjpDlct16RSqoqkWNfMyI3AbQxXv1dtixzPD+5naNVnSjL4Sy+hxCx5ZcjvOIiuT2UbeJT5V7g4SklPrfj+MleMw2td0czNAe35BfnZK8107OWn2xrmq06fes2yWnDOH6yVi/3WZiLqxG+j+KWqJPXLHcFGpJbnjfH4bYsIx63gSKDW/mSCrb7nppxbicR33qXrtV8wQ6tT8a3wac2cj65L1g2O/HtG8+rvBS/8LZPL3Feis2wYY4NbtuufibIJmfZvEDFt7n/yE8Etx+rfLIlzid/bOM2xKDKWE8XDFWuKnaNITaHUfcCrcxPqRxLvLyUXL+tpOHcWkF3v8drqQU8AWw8S+mbFealVk0inDaJGOWkTU2ReQLnrAJscLLoNLnuO7TN2YjQepNFvb7IibVsVVWR4cOK6YUD6XxH08ZWZ7gNVl7KrLnRHulTeo1dFsltDq1kSXvrV9wGioy08hHOI3TF41bW3GXOaLajbG8j9WmOaW2muZ3U75VK3+bR9HM1tnxyyl8atJyUWcknf0QZY04z1cnFvivffd35dlxu9ZvfvL525IMS+wUqn/zXhKSlPHeZ28OHD0toRYG5vWvjVm3bkRkoSpIUWLuWTJpGzY3IVrgaoF1CDLnHvg4UM9aBOO8yFC7loFLsWpLbiMQyD+Wh+bp27wFarslnCkzPNlIfC+7YyIs0gVj/aXkCJ2bUik9zmPJSHPZp7dW0EWuFsxGiSy+f3r0vg33fcp/aciWStgeMu92L0vYs2Z6ak2I7lMwDW02zVdcaPSm2i1Wr7WKN25ULb9Us928Z012kV4bTnJcSC0wePmF/X2+T4tZ0zAtceSnZfVvNcj9ZU6nz6L2o6NyeJhe39qbNALcD0/CLV6fwgwlTWr8lGkc++IyKpturnOXnyuP6yaKw4gtyk51+cqK8ZLEOxNyKgFZiKwrMbYudW96fXGTtcJJbg+zcRvbFjoyZ3XlXrtq269p3YWxKpp0JMoul+8VWAWN/srW7mM51bNAtNW68ifcV8OZiGffyQog8KjdmyCKdEWffBXXpfKpmrMbwGgvvuzD2QNMJqj3NdDTV1TR7dbQ/eaDDWLgxUma2mvlJKGy3RlWczjU3nW8wGjww6uaW9zLzCfbu22vmrR0B99HRbPGE/S5u/c5s3nRzO5gyyxqcGrdiUceBoXZCPHcPfSLzUsIol9i4Hbn61095xccZ33I2K3H7LmRW2cbtLQe3D5MeCU6+BfpYJ2AC/oI+hb7r+oSb6XnELjzgrHOn58SGm2nm1hOcZWy9walxq9259LYdwy+Ei0wwZwhL/LpYxxj52loH4mzV9+wmu7i9+elz5Ql5fXl343F7d5FtHWi6CYAeQ27n9c8DEY0e6Q+rbRSfCxc59/tvv6Ysk8e+76Lzv0lkeXPlninrAuLWc+fSuoS8Pv65gg1PO9aBlpC5nRC30Pzjtj9oqH9auJ3HP38rreiWzhJjn2OusLVXvruf+8a/OYqx7XM0Px65KjdGmRfIdaC29997KSHc5p1a4t53seTUogm5ydA8VO1kUrEP0mPw+y48Ewl+PLPqY67Jy2txc9uyaCW4hSaeUcbvl0octwLcU05uTwFbaFIGF7/PMaHc5t36wcL2h1sSW3ALzZsI98n7/cmZDG7eTz/+8M+nn/7nDz/+RNSulL/SEdhCE4yZ8fcKEsVt5ppMwe1KqUWLFLZ50/ebWKEnRvj7QAkT/9bzPIvcPEUtsIUmFeLi7/ElhlsGl8m1BGyhyUifjb9/m/JE/v1b9XdGbOSuwd8ZgSZNLv7efMK4Nci1pKgFttDE1ZNAX9k7mV8j+/hw6yTXoBbYQpMKcgfUT9bNqOTtBybxAy2Pyd/RNMk1BGqhKZLbk5Awt6JnUj+G9rj8/VtPXGH0QVNBd3CgdgbhragdGJzsz47i71ZD0HjGYO42DdxC0PwTuIUgcAtBELiFIAjcQhC4hSAI3EIQBG4hCNxCEARuIQgCtxAEbiEIArcQBIFbCAK3EASBWwiCwC0EQeAWgsAtBEGzzW0e/YkdCIISqZV5U+I2CYKg2RG4haAnids8PDwImiXlTZrblXh4EDRLWjlpbhfh4UHQLGkRuIUgcAtBELiFIAjcQhC4hSAI3EIQBG4haP7oxFtCvzJ0QukF0qJFv3rtZ78AtxA01/TLnz1MJ8AtBM0xvfZQbt8CtxA0x3QU3ELQfFMykflr1muGjr521BC4haC5yu34H/8a3ELQnNPClS5uX13cUgxuIWhuaxa5XXjlncVCp04nvfAiFeqSkl8VhYsLk5Je+L04/mWS+kAceVV8aRFfF16hTzrw3qAnW4tm0d5eeefUmTMLFp8VeF48c+bM6aQTi0/dWrD4ovi+5cKCd1quyw9uLN6W9GrLl7duiE9W3hCfvHgR7w0Ct0dnzd5eJHiJ0zr22W+0dCQlJyctfLVlG9la9QH996polfi4WPy7Ls7Ee4PArcHtC8eOHRNuqPj/2HUbt7+aOXt7MSmZqCR3WCAr7K/03W+cSmZrzMgmv7r4CHMrzPG2pBfeWdxyAdxC4Nbk9sRiQ6bNnUlujfi2Q7rDCw1uFzK3CyW3fEayxa0A/QYdgCBwOyvccnx7o+XLJOUnJ7ETTH7yAstPvniGnGfTT05+4Uv5DQSB2wfGtzNoby8SuwtVXurMQspL3eA8lZmXqmN+zbzUot+3XLj1+xYklKEnWk+9MHvccnwrKjxruMPx1oFEfLtAmGRjHSjpyg1R+BIvDnqy9RBuX5tJbpMWjpdgchxPfqRLIAj2NjHcQhA0LfbWJXALQfPA3oJbCHos7C1+3wUEzTF7e4K4/eW4OgpuIWju6cTP8PulIAjcglsImnE9nNskcAtBc0vJbx09+osH6NdH3wK3EDTnwE2irfwPOiEZ3ELQPBa4hSBwC0EQuIUgCNxCELiFIAjcQhAEbiEI3IJbCAK3EASBWwgCt+AWgh5DbhcsWKBp+A//4b/E/zcFbjUIgmZH4BaCwC0EQeAWgiBwC0HgFoIgcAtBELiFIHALbiEI3EIQBG4hCNyCWwgCtxAEgVsIArfgFoLALQRB4BaCIHALQeAWgiBwC0EQuIUgUm2KVA+4hSYhj2/m6wg9hefsVkrPIGnegJt5bPEFcDtjyumf2Pl9e44bxUi+/Dq6bUJ30B8K/tboijn2lEL+tQmvM+J8MylB+aV2foC75tjixeOAC27H02iNt+nlfNfBgFeoVjKWs6/QW1tMJX+abaT0Vng38Ql+LyvNKnqX8SlZFXWKvt3DhfKQVpZh3qFMnssHhqxG+K2jkVfCqka9b7hQVZclL0uXxwt2dVhXbZL16VvD3lUHZHFj2LgxFdVR6rP3fL67EVxemursEtVhdDty0OgzPxRV5KNnrSeznLufk221UuhQ9rIxM45oxECDLGab3T8kOlrbYT34DvN84+mbL8zW56z0uNwO1s0LcJnbxbcSxO2W3M/46zO5ublvfHw9TjG386M/alrbXirmvi4GRNsnlzr/Jg5pt7d8nfvGXxvmwDPLajpwendNiZvbEp+v7+AqMhzN4fMdfb2rip3chup3BXe80nSEjm73kZ6yitJIdlcUm4TWxuE2Qme2r8s3GrFnnaz6Gh330NHCWI2qsTV6fn/fvmq6YYg+7tsj7+Nfp2YcqnnHxugRLlf3+7ZGi6hYEKsTRb6JXxQ3Rruo2Bjr94nq8p2NyMnOMNrOR7vDsv2RGmZZFKjPB5vKZXF/X6+XqssZPrlfPIkMF7etq7aZT4Iel9fNbTs/+HXc0aYVvqEwdz8n+6S4cfVaRl0U98VSjRdVmGa+sCGez2x9HofbgcHalNo5T+2FNQzui4nh9uY3ue+9xITu/M0f3r30xvNjips3f3L/uQzB7Uebhf7VoLW93/mV/HjLpe+//Tr3H/mz79StL2Isjri45TFSVUr/SQBKHNzqlTy0AnzUGjO2ohYZNoayZ3dmTvZYbj08NpmNesKptZAfZ/1l083eb9Soc/WyrTbbo3dvSrXX7OHDzWGqY5QmndYKgqyxOpX8A+pi+9IGOoHRW59h2kJuRKuJiKyTe09d3a7ObGR+C8j37yZDqdenGU9Ga9zucXArrvLYbuYPu7mN1FA/KwupKQVc5DPat+fTjYu4Ii5eMxopfY/mMDVrtM7Z5/jcyvTU3De2xxjcC4nhduTqV508jp557uf0HUHsLnruXHpbcPumYaE7xTse+bZOAPz6Wu3md/+efYMr+dOqugg0C2GL25xspmk5DXh/mj9qeKtyDD+A28Z1FqEei9t+4fwNmIAUSBLL6EtzlHGqKbeP9zR78ilgzButiteqFc6a+fTG1fkMOX3mswygZuKlBrk5C6lGOEnTRrfnGx/7JTtVXbYnphlTmpyJZAfZZd4oAbS7MN2bRmUb9KE9hd6TDWbEL2y89SZSzX7QjWUHVG9oFpG9b1/dEKfPWekiNojVubglBVPmPLaLGdxExbdbdi7e+5nJrWDyWpziyNU33dzquia51fQ58Nja080hoJNjK20IExLxr041BqQc+/4mdo4z2Fp1Zeqj0YxxudXrB4e93peNjJbJbdP5jnP1qxW4rRWSgcbYNi1SxT5ja+zDsBE5OiNqAxz2pRW+4tzYWaPm0FbyzKVtVr6A5iBN72ZMstIdjVWN8LSf7DWY4vavMDyS8uXMSqRGEapQC7VzN8qso3ogdlb44mxvC14WgaqKWcWHau6orO0/fa7eQlrOVTKuLVXm1BNqp6hEuR/qi3+dR3JrdcvWZxH0b6KaS+cdtzK0JXATlE+++c3ra//EjrJB6Gdxik57O3JVBb/aF7l/O5U/F56bGOT3oteU+RSDo1EixXkpTvmoab+duSXPTSvg8d5MeZdSMyWUbsspLZPjTQSRQ+EiN7dFDH2pWbtmXriJUzCVXhEu9lYXx+E2q0kNcunoUqN4Hik3czTblLESAaM1h0QMTsQ5uwjASo7b9fp0ZyMKvAdOn9tjBMyVhtcszLBeVq4YC8SKtbJSI63Gnau6JrNlGXTjYtPhra+m7kt3PlBkt/mmt0CfKBufZXRfG42qNJmwvyExwclpggICyW1ZqcWt1Wf5/hpVID5/uFXYjpOUmgluR66+rd1hR1kS2rb3d/mOIse3l94rl3kp/kAbeTdX5qVufnd/buSlxGAYLSxR7z0y3BPOMPNS53pjxRwd1olZPUonSIrYfFHSRCCzwkxGmdkhVcySg2/VWhe3fP+C48qUKdNFmaTde3jK4LUm3UQtzb7iYwzZRkVcwAo4qea+g+wKiJHdLpAyuI3sM6x7hJI/HvI5d10X8W5TmqMRnu4gTzeqSQV2L9rfJV0Ovd5brsjxRHa8UkilyqYDHn2U41dZpUR0SJpBAj5LzAWK29ArFd5VPVH1MEIHjfkpZHS/O0pZQMr3iVeSIzJizC3nCsZya/VZuhCm9Z4v3JrYXtASxe2WnZRx+mx8bjmf/LcjmsxL/Uu5aj99d7+Tvb2bf3439/W1c8HeahFjvhZpkjR7XqqAQ9T2QrEk1HvcpKiVcsMBNr08wcf3k7M4LtPLLsfjVnnny5VNk7BErLSTiOLyXdzqBU1mMBtQJwb4SS6vNhvRSDEpBYcRsy19Nbts6aZuzgNF9glD9bJ0JMxGiCjcTJFZDSc3WZxDzWmOvqSFMu3k+LmVWcJCbvqQivKpKUR1dq1FHffIk1UHC4QjPbRH2d6c4dh1q2mHslcYqS6tQJjhSvFsQx7pgPONx3Jr9Vlyqzz5ecPtw7Gddm5vfvPGbzb/4WszAxXXT75zaR1j/KY9lh25KnH13P6i89qsPzq/I9Zr9K7z2LhdLmkO+TKlt2zjtowH/SEyz+NwK4tqmLm4NapLtzMu3HDrauXxmdwKq9lh5cDV8AyUWqF3umzPMjN7JQPBrGiRPUesq/ZEfKYr0JgeJ5POkEqsC9n3LzcDW1sqySBUrIGxt+zg1ux+vVrUFl3KyS63HkZ3+LwjVKpK09QJfIvWwmVGfFtZqG5ROia+VX2WT9ts2vzg9hGwnXZuR67yoiw5yuPnpWT6yYpvb9/KV/b5yn7las9+PjnVslzN4ToVeTq45axmg+bwkx/KbauytxkP8JMNX9TgduyNDG71wLp8WzJH3czfZaW6081q2jlm1LmF3VEDspxBaUZLzWWeLpdDrOysSi4bXffzcjKnnHl1RltOvPM6jI1QOQnY/WTNBIkXgyu95T7jgcqHcSjbaErkw9Q43MqFIn42vGTtqyrxZRpvwvaQ+G7z0k9+BGynndstO59nU/qZufhDiLqKHibY5Pb2/3Z+Trnk914a+YBO2ZJbMtuPTg8xqM3hIzyU01RqRXHbbhhANfxVXoq4CLALnUUIx+dWGkUju+POSxU5/N3WiiMcXRNJo2RWc2qKnNxmLbU5u+Z0Iu9uW4ziCUCu3zJJciHUVse9inLTx011Ot2eIXoEoyr3ZSyIKn+Z14hs67dyNcZvrBwpBit5H0oWcRvhLHe72WxjExXHu2xJzUUt0dsVZkaa3XTdT75vwXGOxa85PYHmMJ3c3JPv6PN8zEvlPQK2083tzU/Z2b39H+Eoj7PvghAWkW6Dse9ic7kguvOjT+53vq3d/iL3jW/fvfRe8ew/PblVKU0a1VSKaT0qLyXWFZSxGlV7gP1ecx2oOUx5KU7M2DZJ2ddvs1bRrqVS9rPF3qNyuQeqzGtbBzKNX4GVlwrE+k9be5kKSuSN+auZ8jJpCNAGJrmVixoxFC41slyy2FpY7jN2X9HWqSFj32SowAwtjUbkZO8KWksprkUiBk7uEePqcmp22TZJddeooDjAe7II0XvRk0H7LiplhAOr6ShxK8wpNy2T8+IHjP1bozIvlaEZW6dWp7o8+Hbzhdn6nOWNOdaB+oOG+ucst2ceAdvp5la5uB7KKI+zz1Fwq3u+EJ+rfY7CQOttn9zP/f5zim3//HVu5+Hrc+Hx0XbXIjmTZ5hrNAHbdt/IvtgRw/qJfRdqdZ836NZZiz9eV4pK5H+NnQDLvdYmYN53YWy6tZxWcW7TeXYAeUexDPwC1k7kgH1TssUt7XOQN+NGxA6Yd4tddtesU9vV/uTu8MlUzcWt6FGFuszGrcqgyS0WXF2x2X21f1sLNF22tUftu+AN1dauZcVt5KC4bDc5H3L/slpKow3Vaq23e7jQvjH8ZIc78rb2ctv6zPsujN3X1s/xkebsPsdjj4DttPvJHpl9tNJNtk0U4++noD0XnLfkq3WPrs0DRYKJctof8vQmdrMH3UfsoNQncdk47dvt0aCJ68VHwBY/DzRlnqBx5AG2k7O3xy6cWaOBWwiaXxPeIxgEcAtB80/gFoLALQRB4BaCIHALQeAWgiBwC0EQuIUgcAtuIQjcQhAEbiEI3IJbCAK3EASBWwgCt+AWgsAtBEHgFoIgcAtB4BaCIHALQRC4hSBwC24hCNxCEARuIQjcglsIegK4XbNyETSNyluDYQrNOLd5i1aK86DpUvLKRSsxTqEpcfv/RMQHx0ct4v0AAAAASUVORK5CYII="},98863:(e,n,t)=>{t.d(n,{A:()=>s});const s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA5IAAADgCAMAAABGral3AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAIcUExURfD2+v7+/tPT09/f3/Dw8Pv7+/b39v///1OE/u3t7f9ZWczMzL6+vv8AAOTm6OLi4v//0ebq7NH////9/+uva63m/9DQ0YsrilRVU+z//0LgaDQzNK+7zvb//4zO/u3y9f/orfX19f/NjO7m3uzw8vL0861naP//9uXv+mmu6///67u8zS2N0Nra28LY+2pprY0yNP/+41yL/0pQU9H0/t/h5Pr6+m4zM//psa2+2M/e/LOwtNCMK9z4/jMyj+v2+8XFyLjq/5aWlcj3/4fF99uiVeT7/57Y/1ZNRdXW1/Lv83267rnV7DpAWLy9vE9ag//4y22PyX9/f2Op4U99vr/1/ysrK7HK4Z25/P/WnG+y7FCLy4Km/s+OaPbEhrd5UvDt5lOE/8fs+H9ZSvHj//bNj//vv86NNVGb1fD27f/51+25fYfsoF24//D34sWHTjI1h//gqFVrsGnlhnBRi1E9NjBssN/Pz7Z3NHCd/pCw/fbarZJrUe/t8TY5cZNUamuW/s6lcDJhqNjr97uNZzNOmDA3TlOE/Yiu0phbO+ja1OXKq8DK1ExPbYE4as7c6GY5VVuBrEdumuTW/9KTTduxj4tnrV2X1PT1/5FEfsax/v7s///796elcVZZpf7jwDCBwJzK66GO/pZfjKhcg22QnF7Hd4OE/qzxvfxNO3R3ZLeP/tAqL7fvz9LP1YSEhIGQb5TtquzfxOz5yt+iR3QAABP5SURBVHja7Jv9TxPZGsenS+lJU1NlqbVYixQsFbRKUywSQItQ6AsIisJFIxgI4MJmBRUgkXAjghHVFQ1evYmubnY195e7u/fef/A+z5npG7QIQrWx34/SDp0zM8+ceT7znDNVRQAAcggFXQAAlAQAQEkAoCQAAEoC8I0oadAbAQBfFr0hk5IKAODrACUByH0lDegXAL4ShnRK6tEvAHwl9OmUNKJfAPhKGKEkAFASAAAlAYCSAAAoCQCUBABASQCgJAAASgIAJdEvAEBJAACUBABKAgCgJADfnJI/HTtE9J1VKvj90AlFeUSfdJxVlAp677uvaCs6FGWW3urpXbnOa46ilwHIipJ9RUV/kIoVhzqKioqOKo8O9T2z8u/H6p95jtU3yRVm06EhZbZ+aK+J3HSZ6p+F2VEAQBaU7FBfKrhCKuxbm6Ic5po4xBVSW8Evs/W1vLr2h0D9fXQxAOv44Y8nRMeuKPlIVkkaljZx1VR3H6DBrPxNKjkrq2QtNx3iIW39s7O4BACkKBmQk8Bdmku2yfHpUSWtknIueTahpKLsfcLTTwBAFpTsKzKxa4mBa5OikJuz6oc8cO0wB/jD2MBVqbivrQYAZGMueZ0rY/LjHVPq4x357EeJP96huSSvaUM3A5AdJeVMUR2f9mlfgijJX4KcUFxWKoqJL0Ge0AKe8ACQDSU3gjkiADmlJAAASgIAJQEAUBIAKAklAYCSAAAoCQCUBABASQCgJAAASgIAJQEAUBIAKAkAgJIAQEkoCQCUBABASQCgJAAASgIAJQEAUBIAKAkAgJIAQEkAAJQEAEpCSQCgJAAASgIAJQEAUBIAKAkAgJIAQEkAAJQEAEoCAKAkAFASSgIAJQEAUBIAKAkAyKqSp6yBPTlAwHrqU2dm9lhNOYDVY948zsNH9EaQb+iPHN4dJU8FrGaDTnx1dAazNbCplGarx+jPhUj9Ro91MykPG/V6+gvyCr7oR3ZDybBJL3IGvSmcOdELwq7cidQVLsgYKF8dl9MA8guni63cuZJhq07kEDprRicLPLkVqSeTkzRodRn8fn+hvxDkC3S1/X6DiwavO1XylCmn8pwy3ZRh7GoO51qkYXOGUSsbWagDeQZ5SU4aD+9QyYBe5BjGQHolra5ci9RlTRuoS69nI4VOgHyCrjg5qU9fJreu5Clr7p1a+ueuZk/uRZr+uate7+IaiRzNPyl1hQZX+tnk1pW0mnPvxMxpi4/HmHuRGj1pe9/o9EPIPJXS7zQad6ZkwJB7p2VIO3K1+nMvUn/am4dRT0rCyfwsk36nfodK7vnCqWPaynntSRepKRcjNaVX0lAII/PUyULDjpUUuZfoIr2SuRhpJiUxcM3bgSuUzE0lUSVRJaEklARQEkpCyTymMPydRtifJSXdL0P2p78KYbEzx4XlzPdClNPL6Tr+oFRd0dWsNe+f7qHXfTV2e+eFpqQF2bozqu2H97HbSu6ruSK8c8u1wrs0bX9OhxybbKGP19YdC0qCrN60z8UxZUdJXfDBw4Ile6t4E7lb1xp5naxkayQScQjL5FDkvyszDlXgMfvy96xHj/7xynJTYoFbVywtNMvmkYjIjpLBhf1CZ1n49fHKDYcYs0eFGK37lpV883pr7Ypn2z7d5vHQrudn8fixkkxrTnyZSIrH67+okg0fb59XudiQHSW7a3qEzj222MaFrpQ+SFKyVLaQH1i0xO+uebjarupBDaKJBdmaXyxpFElJdKPHqS44U/8dwBaUHFnlkILLl+UHdHdooqKcPSUzRbodJUfnfTx2SGbkqiPpt30HtPgtnTbfBZngd4d9C9TJ4vE83YGSmu2r8dlstktpJIjvJE71NV/ohcz88XmfOsa5tj82LAq9qKWFd/M2NbSRVVvX/tTN3Wvy4k+EQpc2lb3spBZNY6kWI/10/532ZqnSmgQpZtuDdtm07E5tIpJ409FhajEdFd5K+qW6MjkU6goewlGL0AObLSrK6mxqL1FvEdxLZRdih7H7bL8k90P1oE+22E0MHw8evO3as8flcmVLyf5O7gELjwE1Je3ayJOHojMlqo3uuRm16yeWm8aOO1QTvXPHEwty4wFKId7+ymaJ7jFZZaY7rSbP9pT8UEdXVujGV+xd9ZTVY13DreMrtuwpmSnSrSupG/15v+j+rXmTIyaUpBy2vKLz6u9qofxtEt6GgspUJQ98/6mdxJmgazBwyZFI2biSa3RHsPQ4xOidFkpaumpTdLx3Dx2pm9s5F0ZutQnLje0q6R0sFQkl5T+fGKBjUlMpYLKSalO5owsOoeNmKTcs2X0N8qZQfjx2PPfaldjui+PnR4dJlZkP8I822WI3jbx9kBDnztHyl1OSB54D2sBViTmq3a69KzfIu8tpleRmV9Rx7uvNEp0SnDNde9uOkvaeucUmXrx+b5puEWMz9xbpT/aUzBTpNqpksEcL/ue/bKHnnFv9tpBMLu+gL8S3+xQlvZSz7rFW7UIXV2dQsp9ds/SICduZwLxtupTWvLVNk87lL+afPpn3aXk+wTYFqbzw+4Rt2scL3f9s0Y7HFbKM9iSPV0y5+04tSTLz52gf7ps8IOL2VKx8LO1aqyxj1YOh9y+H+WYY9yxJyWvy8JYPw6HYE4hR3kfZyZ/U04lFEm/KvfE7j3yqK5vdlc1qcex6WyXPkSLj2JKUlIsx4/et0Pmpx9F6y3vPZpOjgAmbXQ4p3Pd8oeccZOMH24bhwOcY+R/juXPG7CnJA1ex+cB1cuhunVb3pqZZvGjagWvr9blYUd18hiZTfEOeb0HJqw4+UvH4fQqQZq1jM/+rsUctWZxLZoh060pWD7bHgqdktqgFQE0u9mW2aZ2SorGVHLgc3zyDkpzAcpRHfVLCNvDu3XOtonzyMv3tv8Wlq7F3uYWrx7oqKXWOH2/qVom3UhPHTcF6n/Da8d9apGIcCZ/CaSqo7pvUfoo2nuK9lz+IynDYs/bUKvl2UsZvoZTq/0UWOPfNVmnToHpDTVRJrSn3hnrrGnnV/4qTkoojH889VxrvyqQqeTOaNC5OjAK03iqM0EleVaukLOHc7VOrrCQvqEPnnRj5ozh/8eL57Ckpgp3q4500SvLjHfV5T3BB7bu1xfuRyNpim3yqM7yoPd7hBd54qi6qVdmIQ7yRP0L+rHtowkm+Ic+39HhHBCdb3GudDx8N0jRybKYkuNyUTSUzRLoNJWNOSZu6D7Qkkuv0nRNUB9crSS9Jg9D1Stb09vbKJA1GyQwHf0rX5WUzvdOey3tE+UwJJW1sNDkhjVinpHp0GUAzjW/eO3jPFrlfC80buSK5qXjFFJOyBas0G/heEOTbc/l7Bw2s22hyOK9O1xoptN4zHONVdajLBc77uzzhgfdyAF3XczOaomSsqSyP2rsseAMcY3mVPP/y3t6qJCXrensXuF5TxL3qZGq9kt6l6c6/5E1JVTIxQ+VzUl+2x7/+nWzkR6Fr+PPPBl3WlNS90b4ESaNk4luR8RV5g++u4T6dWm1P9yVIKT94adHmoqVipLNdDMif/RueYzq/M5nCzs944qrrrrkhqu9Nyy9lSMnRv4msKpk+0s+pkpzdWs6oyaUbX3oaFZ9XJcXoSYc0Q/2kWH2n/aYqKZNRZKqSNDq0v1jqEWqVlJl6d76Ln5MO3IhVPa1KypXdfAzLFbU5nwPbW7Zaqu4wUSVbxuVIlk9Hjb9bPaGyk22jWomKVUmtKZ+PGrFO7RvZFeWxKmmpSqmS6vEyV8m1Hp4EJ5RMdH1jacqGW+VHLowJIy8K596Cgr3O7FXJ7f/vBZ22SXzDTfego4wxbfy+NVy43S9B4oeSUwt13q7b5dn71iL9nLnk/9s7G9e4yTCA16WadGpiKCurUI9hauvQU2831YxSp5sVZCp+ccI5W626Tor4iT0FOjYYKkOliGNFBxuyD+f/6Ptxn2uT3uXetMnd7wd3u92lSXrNL8/7PG/yvluipGrQvXaXkmfbc8kYJWce+08d5413tig580c5QslmLqmqsdff1dtrbEnq8+lzMuK994TKJcdlLnmy3sYVZ96nPlFGNH4HuSl12mmvuKpFmkrqZquOsvWo2Kq46rW1vhL9ohEl9df32SMdSurtRSqpnvVJyVCU1I3VRqv12Fu2J7tAvPSU3JXuVRP9ktnZ0x6UlCVDeUw8JNsXHbnk1RdEy/LxTiVnzsklZAX0zevllpKn69XTtibt6dtqXZFK2idl8VLFiuYhKw5teQZTn/yp9mRGlVdkhVemn+O/iPPBheOtCuo9n3z1yhe3z9gqlzysWp0zF26fsDuV1K62Kzkj66hNJevWqUXrUVHvSXPRNsH0emUu+cyHj+uv73kdWlu5pGqytyn51KQ+STeipEirz3032ZZLvjNp/6BySfEiQS6pVVyp55FCSeuYwELJfCppX/3xyBEVC/+qV1wbB5fsOPxdNf1lZ+MZ1dN2qtkveWlB1mZlT9trMjsSP1vu6Op4U5aLZE1R9zluVfLwB6fU6psVV+HGtwflcTxz7lVdkRT7pnO793/Tb3z6o66r2s1g8vmrB1UVoVFxFecCWZs//KFYqeof1eWWE51K2l/+PddU8qGnZQ+i2EsVuXRaqfekuegWJZsVV/t58eLAlvLOiXYln/n+1Bsvtyl59qcjl16S22pVXL89+I+uuH6cpOKqw+PD9WAplBybEIyhZE6V3KbjsNlKi0wMtkkG7mqhn73ebQYdvU+Hj83tsIj84P23O95SFdFdQTZc1a9tIjlRnSwJKjvNbLJhpFByeswVjE2j5MAoefLt/vfz9BkDv2yCY111Ve6ikqY4LRu7iZWsO6mKPMfeej3lC+pQMk0lH9xv79ePX+v/2rcevFPe33o/4ePOQv/rSPK49c3ebLe/R/07/1n/P6mTykh7onXZ+YRJJRnoo5897SFK5vEAHvRHIm5+fVO/eDadm7MYDqsfoobD4uasYcWAkgwa2Q8Rg0aiJEoytPLesP3QygyHNcRK9j8cVgYnIBjN+wQEREmiJNP07M2eRkzTw9DKw2ukgaGVmcwu+Z5GTWbHBATD3HDtewICpnxN3GqNnPKVaXqGN0gamKaHidGTnQvjJkYPmMxuOIU0M5ldo+764gMZ4MWJWCF13XXi/gww8aQbs5NM+Tqsc74amfIVzMPE6EyMjpLZYnR0bHT60H0wVBw6NC3+7qMjKJnJODkmrYThQv7RgxGUzG7jFYaN0aAwgpIAeQAlAVASAFASACUBACUBUBIAUBIAJQEAJQFQEiUBUBIAUBIAJQEAJQFQEgBQEgAlAQAlAVASAFASACVREgAlAQAlAVASAFASACUBACUBUBIAUBIAJQEAJQFQEiUBUBIAUBIAJQEAJQFQEgBQEgAlAQAlYegJfNfzrP7xPNcPet98sVJdLzm9U1qvVoooCYNGwTVhY5uXbqGXzYe1JDa2eVkLURIGSkhpkR8UzKwt8KXf3UsZVpVXFxP6qH+uGqIkDAq+9LFgVnJppd/dshXHWXL6RayhgpIwGCGye3l6Fr0Lz8M1xxRrIUrCAFR1vK7MSea6t2Odp1gyZqRzsVRESci9kZblprZy17J2cLJootHa1ngtoiTkvtXqp7h6f4cIHBqMkTpOhigJucZLMUbqOOnFfbxmMEbqOLmGkpBn/HhjjDgfE4UrjnkqKAk5brZaVmEPNxE6aRCiJOQWN9VEshGII5vG1VSUrKIk5DdIeruwFS8qTIaGE8lGOhmiJBAkk4TJmpMONZSEnOKlnknGxuJSSkqWUBLySWCu3Trtz8aZv+31AkUnLYooCbnEj2u3LnqWdXS221U9as32vJ24HpDVV2z78hWj/SAoCTlIJaOvdlu0LNfr2sn5WCWD7ZPJavTdWKW58eVwavzfhPdqVVESBi2VnPakjWMyuo3KcOmrSCheufPq03oEHW28iFUyIplcjwmSU5slZ7Uik80DU7a9fM1xjtsiaJbHr6kIOi7fiWYdJSGnSkZ+tNIKbIue6yrvHrWOuvpaHPFKRND5kRVPhlJpaaySI9srGVfdKdub9fuay5fDWXtDiCieVieXpZHjG2V7uef6DkpC5rGsmHZrW1szKCjj5JN6f8UTOgbzcik/CLyjszsque2GYqVamBfB8YaMeGu1NWmiM7d5Y0FGSuFmrabCZTQoCYOm5IoMgs2sUlDXTkXPZgjVH1kpKOk4S2vHZShcnbPtcRUTD9hXyps35L+S+DwTJWHQlNS55KI/L1/5vteppIySYwUVS33BvHElT5y/ohJKx1mwN4rFKamkaLVObTgqShYFN1AShimXbFVcp1W+2KFkZy65c3mn51xyaXXSXg7nZQr5iC1zyWWdX6rQKHPJ8/deIZeEQVQy+uKdgmyUKtsWPSlgh5KpV1yXVHt1Q0hb+kjklCqXFHZulup9llRcYSBxrWBXttN7v2SbnEv0S8LQ4O/KVeeJrt5J4S5mlITME+zKvVlc4wpgIpk0B3eCAHSdTHK/JECGYFQBlIThC5OMvQPQQ5hkhDqALME4rgDZgtHOAbLVdB2sOUEc5gSBvMPMWQAZc3Jw5pd0mF8SBqTtyizMAFlCyuObjZQFv3vRKyYar0vRtVaUhPwFSteyhJWBGS0LgfTRcrteW33kq4sJbdQ/Vw1HUBIGSUrPMonn9qR3WOsvpSzVwp02gZKQuzqP73omvPQ8109wb3SxUl1P4mVpvVopdrF+lATIFCgJgJIAgJIAKAkAKAmAkgCAkgAoCQAoCYCSKAmAkgCAkgAoCQAoCYCSAICSACgJACgJgJIAsGdK7tu3z7Z54omn3X/aXkkbAPYGlATIrpL/A2Tjp6eND0hIAAAAAElFTkSuQmCC"},576:(e,n,t)=>{t.d(n,{A:()=>s});const s=t.p+"assets/images/04-min-7eb9f3330355312efa81e47ffc75123b.png"},28453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>o});var s=t(96540);const a={},r=s.createContext(a);function i(e){const n=s.useContext(r);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:i(e.components),s.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/af2ff1b5.0f31efeb.js b/assets/js/af2ff1b5.0f31efeb.js new file mode 100644 index 000000000000..c8ccc7829679 --- /dev/null +++ b/assets/js/af2ff1b5.0f31efeb.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6646],{88350:(e,s,n)=>{n.r(s),n.d(s,{assets:()=>l,contentTitle:()=>d,default:()=>h,frontMatter:()=>i,metadata:()=>a,toc:()=>o});const a=JSON.parse('{"id":"general/dune-analytics/parachain-dashboards/hydration-dashboards","title":"Hydration Dashboards","description":"Hydration is a decentralized finance hub on Polkadot. Its main function is a DEX.","source":"@site/../docs/general/dune-analytics/parachain-dashboards/hydration-dashboards.md","sourceDirName":"general/dune-analytics/parachain-dashboards","slug":"/general/dune-analytics/hydration-dashboards","permalink":"/docs/general/dune-analytics/hydration-dashboards","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/parachain-dashboards/hydration-dashboards.md","tags":[],"version":"current","lastUpdatedBy":"MK","lastUpdatedAt":1719215716000,"frontMatter":{"id":"hydration-dashboards","title":"Hydration Dashboards","sidebar_label":"Hydration","description":"Hydration is a decentralized finance hub on Polkadot. Its main function is a DEX.","keywords":["polkadot","dashboard","dune","hydration","DeFi"],"slug":"../hydration-dashboards"},"sidebar":"docs","previous":{"title":"Frequency","permalink":"/docs/general/dune-analytics/frequency-dashboards"},"next":{"title":"Interlay","permalink":"/docs/general/dune-analytics/interlay-dashboards"}}');var t=n(74848),r=n(28453);const i={id:"hydration-dashboards",title:"Hydration Dashboards",sidebar_label:"Hydration",description:"Hydration is a decentralized finance hub on Polkadot. Its main function is a DEX.",keywords:["polkadot","dashboard","dune","hydration","DeFi"],slug:"../hydration-dashboards"},d="Hydration Dashboards",l={},o=[{value:"Overview",id:"overview",level:2},{value:"Featured Dashboards on Dune",id:"featured-dashboards-on-dune",level:2},{value:"Key Tables",id:"key-tables",level:2},{value:"Useful Queries",id:"useful-queries",level:2},{value:"Getting Started with Queries",id:"getting-started-with-queries",level:2}];function c(e){const s={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,r.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.header,{children:(0,t.jsx)(s.h1,{id:"hydration-dashboards",children:"Hydration Dashboards"})}),"\n",(0,t.jsx)(s.h2,{id:"overview",children:"Overview"}),"\n",(0,t.jsx)(s.p,{children:"Hydration, formerly known as HydraDX, is a decentralized finance hub on Polkadot. It offers several\ntypes of DEX pools:"}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsx)(s.li,{children:"Omnipool: a single liquidity pool for assets that have been vetted by governance. Typically, these\nwould be currencies that have existed for a while and are expected to generate a high volume of\ntrades."}),"\n",(0,t.jsx)(s.li,{children:"Stable pools: pools where all coins in the same pool are expected to trade almost at the same\nprice, e.g. USDC/USDT."}),"\n",(0,t.jsx)(s.li,{children:"xyk-pools: pools where the price of the assets is determined by the x * y = k formula, also known\nas the constant product formula."}),"\n"]}),"\n",(0,t.jsx)(s.p,{children:"Users can swap from any asset to any other asset using an automated router that will calculate the\nmost efficient path."}),"\n",(0,t.jsx)(s.p,{children:"Liquidity providers can earn fees from the trades in the pools they provide liquidity to."}),"\n",(0,t.jsx)(s.h2,{id:"featured-dashboards-on-dune",children:"Featured Dashboards on Dune"}),"\n",(0,t.jsx)(s.p,{children:"Here you will find a variety of dashboards that help visualize data from the Hydration parachain:"}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.a,{href:"https://dune.com/substrate/hydradx",children:"hydration on Polkadot"}),": This dashboard provides a\ncomprehensive view of DEX volumes and liquidity on the Hydration parachain."]}),"\n"]}),"\n",(0,t.jsx)(s.h2,{id:"key-tables",children:"Key Tables"}),"\n",(0,t.jsx)(s.p,{children:"Data from the hydration parachain is organized into several key tables:"}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsx)(s.li,{children:(0,t.jsx)(s.code,{children:"hydradx.balances"})}),"\n",(0,t.jsx)(s.li,{children:(0,t.jsx)(s.code,{children:"hydradx.blocks"})}),"\n",(0,t.jsx)(s.li,{children:(0,t.jsx)(s.code,{children:"hydradx.calls"})}),"\n",(0,t.jsx)(s.li,{children:(0,t.jsx)(s.code,{children:"hydradx.events"})}),"\n",(0,t.jsx)(s.li,{children:(0,t.jsx)(s.code,{children:"hydradx.extrinsics"})}),"\n",(0,t.jsx)(s.li,{children:(0,t.jsx)(s.code,{children:"hydradx.transfers"})}),"\n"]}),"\n",(0,t.jsxs)(s.p,{children:["The ",(0,t.jsx)(s.code,{children:"hydradx.traces"})," table is created by a snapshot script utilizing Hydration API calls to fetch\naccurate values which would be difficult to calculate from the blockchain events alone."]}),"\n",(0,t.jsxs)(s.p,{children:["Start building your own queries using granular data on Dune\n",(0,t.jsx)(s.a,{href:"https://dune.com/queries?category=canonical&namespace=hydradx",children:"here"}),"."]}),"\n",(0,t.jsx)(s.h2,{id:"useful-queries",children:"Useful Queries"}),"\n",(0,t.jsx)(s.p,{children:"Some useful queries for Hydration are made available as materialized views."}),"\n",(0,t.jsxs)(s.table,{children:[(0,t.jsx)(s.thead,{children:(0,t.jsxs)(s.tr,{children:[(0,t.jsx)(s.th,{children:"Subject Area"}),(0,t.jsx)(s.th,{children:"Query"}),(0,t.jsx)(s.th,{children:"Materialized View"}),(0,t.jsx)(s.th,{children:"Description"})]})}),(0,t.jsxs)(s.tbody,{children:[(0,t.jsxs)(s.tr,{children:[(0,t.jsx)(s.td,{children:"Oracle"}),(0,t.jsx)(s.td,{children:(0,t.jsx)(s.a,{href:"https://dune.com/queries/3459562",children:"query_3459562"})}),(0,t.jsx)(s.td,{children:(0,t.jsx)(s.code,{children:"dune.substrate.result_hydradx_oracle"})}),(0,t.jsx)(s.td,{children:"Provides hourly oracle values for all currencies present in the omnipool. Uses LRNA."})]}),(0,t.jsxs)(s.tr,{children:[(0,t.jsx)(s.td,{children:"Oracle (Alt.)"}),(0,t.jsx)(s.td,{children:(0,t.jsx)(s.a,{href:"https://dune.com/queries/3573146",children:"query_3573146"})}),(0,t.jsx)(s.td,{children:(0,t.jsx)(s.code,{children:"dune.substrate.result_hydra_dx_oracle_new"})}),(0,t.jsx)(s.td,{children:"Provides hourly oracle values for all currencies present in the omnipool. Uses DOT."})]}),(0,t.jsxs)(s.tr,{children:[(0,t.jsx)(s.td,{children:"Oracle (Alt. Daily)"}),(0,t.jsx)(s.td,{children:(0,t.jsx)(s.a,{href:"https://dune.com/queries/3445402",children:"query_3445402"})}),(0,t.jsx)(s.td,{children:(0,t.jsx)(s.code,{children:"dune.substrate.result_hydra_dx_oracle_new_daily"})}),(0,t.jsx)(s.td,{children:"Same, but aggregated daily."})]}),(0,t.jsxs)(s.tr,{children:[(0,t.jsx)(s.td,{children:"Oracle Pairs"}),(0,t.jsx)(s.td,{children:(0,t.jsx)(s.a,{href:"https://dune.com/queries/3483707",children:"query_3483707"})}),(0,t.jsx)(s.td,{children:(0,t.jsx)(s.code,{children:"dune.substrate.result_hydra_dx_oracle_pairs"})}),(0,t.jsx)(s.td,{children:"Provides volume and transaction counts for all pairwise trades in the omnipool."})]}),(0,t.jsxs)(s.tr,{children:[(0,t.jsx)(s.td,{children:"Omnipool Liquidity"}),(0,t.jsx)(s.td,{children:(0,t.jsx)(s.a,{href:"https://dune.com/queries/3507194",children:"query_3507194"})}),(0,t.jsx)(s.td,{children:(0,t.jsx)(s.code,{children:"dune.substrate.result_hydradx_liquidity_master"})}),(0,t.jsx)(s.td,{children:"Provides liquidity in the Omnipool on a per-account basis."})]}),(0,t.jsxs)(s.tr,{children:[(0,t.jsx)(s.td,{children:"Assets"}),(0,t.jsx)(s.td,{children:(0,t.jsx)(s.a,{href:"https://dune.com/queries/3482301",children:"query_3482301"})}),(0,t.jsx)(s.td,{children:"N/A"}),(0,t.jsx)(s.td,{children:"Provides asset_id, symbol, and decimals for all assets in the Hydration parachain."})]})]})]}),"\n",(0,t.jsx)(s.p,{children:"The first Oracle query is the recommended one to use for any oracle use cases that are not\nhistorical in nature. This is because it relies on the most reliable mechanism for determining the\nactual price, using the intermediate LRNA token price. This level of detail is only available from\nJan. 2024 onwards."}),"\n",(0,t.jsx)(s.p,{children:"For historical price analysis, the alternative oracle query uses DOT as the intermediate currency.\nIt may be slightly less accurate and take a bit longer to calculate."}),"\n",(0,t.jsx)(s.p,{children:"Liquidity in the Omnipool is calculated on a per-account basis, using the NFT positions that\nrepresent shares in the Omnipool."}),"\n",(0,t.jsx)(s.p,{children:"Dune users are encouraged to study the source code of the queries, including parts of a query that\nmay have been commented out for future use."}),"\n",(0,t.jsx)(s.p,{children:"Uncommenting these parts may accelerate your effort of adopting a query to a slightly different use\ncase."}),"\n",(0,t.jsx)(s.h2,{id:"getting-started-with-queries",children:"Getting Started with Queries"}),"\n",(0,t.jsx)(s.p,{children:"To get started with querying data from Hydration, you are welcome to use the mentioned materialized\nqueries. You can also use the following DuneSQL queries as examples:"}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-sql",metastring:'title="Hydration Omnipool Asset (Latest)" showLineNumbers',children:"WITH MaxTimestamps AS (\n SELECT\n CAST(JSON_VALUE(kv, 'strict $.id') AS INT) AS asset_id,\n MAX(ts) AS max_ts\n FROM hydradx.traces\n WHERE track = 'omniasset'\n GROUP BY 1\n), A AS (\n SELECT\n m.asset_id,\n A1.ticker,\n A1.decimals,\n m.max_ts AS ts,\n CAST(JSON_VALUE(t.pv, 'strict $.cap') AS UINT256) AS cap,\n CAST(JSON_VALUE(t.pv, 'strict $.hubReserve') AS UINT256) AS hubReserve,\n CAST(JSON_VALUE(t.pv, 'strict $.protocolShares') AS UINT256) AS protocolShares,\n CAST(JSON_VALUE(t.pv, 'strict $.shares') AS UINT256) AS shares,\n JSON_VALUE(t.pv, 'strict $.tradable.bits') AS tradeable\n FROM MaxTimestamps m\n INNER JOIN hydradx.traces t\n ON m.asset_id = CAST(JSON_VALUE(t.kv, 'strict $.id') AS INT)\n AND m.max_ts = t.ts\n JOIN query_3482301 A1\n ON A1.asset_id = m.asset_id\n WHERE t.track = 'omniasset'\n)\nSELECT\n asset_id,\n ticker,\n ROUND(100.0 * hubReserve / (SUM(hubReserve) OVER (ORDER BY 1)), 1) AS percentage_of_pool,\n cap / POW(10, 18) AS cap,\n ROUND(hubReserve / POW(10, 12)) AS hubReserve,\n ROUND(protocolShares / POW(10, decimals)) AS protocolShares,\n ROUND(shares / POW(10, decimals)) AS shares,\n ts AS last_update -- when this data was collected\nFROM A\nWHERE tradeable = '15' -- all bits set to \"on\"\nORDER BY 3 DESC;\n\n\n"})}),"\n",(0,t.jsxs)(s.p,{children:["The query is fairly typical for a parachain query on Dune. It calculates the last available values\nfrom the snapshot table ",(0,t.jsx)(s.code,{children:"hydradx.traces"}),"."]}),"\n",(0,t.jsx)(s.p,{children:"The query uses Dune's native UINT256 type extensively, which allows to deal with very large numbers\nand still maintain precision."}),"\n",(0,t.jsx)(s.p,{children:"Query result:"}),"\n",(0,t.jsx)("iframe",{src:"https://dune.com/embeds/3485087/5857870/",height:"350",width:"100%"}),"\n",(0,t.jsx)(s.admonition,{title:"DuneSQL Reference",type:"info",children:(0,t.jsxs)(s.p,{children:["For more information on DuneSQL, please refer to the ",(0,t.jsx)(s.a,{href:"/docs/general/dunesql-cheatsheet",children:"DuneSQL Cheatsheet"}),"\nand\n",(0,t.jsx)(s.a,{href:"https://docs.dune.com/query-engine/Functions-and-operators/index",children:"DuneSQL Official Documentation"}),"."]})})]})}function h(e={}){const{wrapper:s}={...(0,r.R)(),...e.components};return s?(0,t.jsx)(s,{...e,children:(0,t.jsx)(c,{...e})}):c(e)}},28453:(e,s,n)=>{n.d(s,{R:()=>i,x:()=>d});var a=n(96540);const t={},r=a.createContext(t);function i(e){const s=a.useContext(r);return a.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function d(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:i(e.components),a.createElement(r.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/af2ff1b5.98ac0ce4.js b/assets/js/af2ff1b5.98ac0ce4.js deleted file mode 100644 index eeece5b29244..000000000000 --- a/assets/js/af2ff1b5.98ac0ce4.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6646],{18428:(e,s,n)=>{n.r(s),n.d(s,{assets:()=>l,contentTitle:()=>i,default:()=>c,frontMatter:()=>r,metadata:()=>d,toc:()=>o});var a=n(74848),t=n(28453);const r={id:"hydration-dashboards",title:"Hydration Dashboards",sidebar_label:"Hydration",description:"Hydration is a decentralized finance hub on Polkadot. Its main function is a DEX.",keywords:["polkadot","dashboard","dune","hydration","DeFi"],slug:"../hydration-dashboards"},i="Hydration Dashboards",d={id:"general/dune-analytics/parachain-dashboards/hydration-dashboards",title:"Hydration Dashboards",description:"Hydration is a decentralized finance hub on Polkadot. Its main function is a DEX.",source:"@site/../docs/general/dune-analytics/parachain-dashboards/hydration-dashboards.md",sourceDirName:"general/dune-analytics/parachain-dashboards",slug:"/general/dune-analytics/hydration-dashboards",permalink:"/docs/general/dune-analytics/hydration-dashboards",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/parachain-dashboards/hydration-dashboards.md",tags:[],version:"current",lastUpdatedBy:"MK",lastUpdatedAt:1719215716e3,frontMatter:{id:"hydration-dashboards",title:"Hydration Dashboards",sidebar_label:"Hydration",description:"Hydration is a decentralized finance hub on Polkadot. Its main function is a DEX.",keywords:["polkadot","dashboard","dune","hydration","DeFi"],slug:"../hydration-dashboards"},sidebar:"docs",previous:{title:"Frequency",permalink:"/docs/general/dune-analytics/frequency-dashboards"},next:{title:"Interlay",permalink:"/docs/general/dune-analytics/interlay-dashboards"}},l={},o=[{value:"Overview",id:"overview",level:2},{value:"Featured Dashboards on Dune",id:"featured-dashboards-on-dune",level:2},{value:"Key Tables",id:"key-tables",level:2},{value:"Useful Queries",id:"useful-queries",level:2},{value:"Getting Started with Queries",id:"getting-started-with-queries",level:2}];function h(e){const s={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,t.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(s.header,{children:(0,a.jsx)(s.h1,{id:"hydration-dashboards",children:"Hydration Dashboards"})}),"\n",(0,a.jsx)(s.h2,{id:"overview",children:"Overview"}),"\n",(0,a.jsx)(s.p,{children:"Hydration, formerly known as HydraDX, is a decentralized finance hub on Polkadot. It offers several\ntypes of DEX pools:"}),"\n",(0,a.jsxs)(s.ul,{children:["\n",(0,a.jsx)(s.li,{children:"Omnipool: a single liquidity pool for assets that have been vetted by governance. Typically, these\nwould be currencies that have existed for a while and are expected to generate a high volume of\ntrades."}),"\n",(0,a.jsx)(s.li,{children:"Stable pools: pools where all coins in the same pool are expected to trade almost at the same\nprice, e.g. USDC/USDT."}),"\n",(0,a.jsx)(s.li,{children:"xyk-pools: pools where the price of the assets is determined by the x * y = k formula, also known\nas the constant product formula."}),"\n"]}),"\n",(0,a.jsx)(s.p,{children:"Users can swap from any asset to any other asset using an automated router that will calculate the\nmost efficient path."}),"\n",(0,a.jsx)(s.p,{children:"Liquidity providers can earn fees from the trades in the pools they provide liquidity to."}),"\n",(0,a.jsx)(s.h2,{id:"featured-dashboards-on-dune",children:"Featured Dashboards on Dune"}),"\n",(0,a.jsx)(s.p,{children:"Here you will find a variety of dashboards that help visualize data from the Hydration parachain:"}),"\n",(0,a.jsxs)(s.ul,{children:["\n",(0,a.jsxs)(s.li,{children:[(0,a.jsx)(s.a,{href:"https://dune.com/substrate/hydradx",children:"hydration on Polkadot"}),": This dashboard provides a\ncomprehensive view of DEX volumes and liquidity on the Hydration parachain."]}),"\n"]}),"\n",(0,a.jsx)(s.h2,{id:"key-tables",children:"Key Tables"}),"\n",(0,a.jsx)(s.p,{children:"Data from the hydration parachain is organized into several key tables:"}),"\n",(0,a.jsxs)(s.ul,{children:["\n",(0,a.jsx)(s.li,{children:(0,a.jsx)(s.code,{children:"hydradx.balances"})}),"\n",(0,a.jsx)(s.li,{children:(0,a.jsx)(s.code,{children:"hydradx.blocks"})}),"\n",(0,a.jsx)(s.li,{children:(0,a.jsx)(s.code,{children:"hydradx.calls"})}),"\n",(0,a.jsx)(s.li,{children:(0,a.jsx)(s.code,{children:"hydradx.events"})}),"\n",(0,a.jsx)(s.li,{children:(0,a.jsx)(s.code,{children:"hydradx.extrinsics"})}),"\n",(0,a.jsx)(s.li,{children:(0,a.jsx)(s.code,{children:"hydradx.transfers"})}),"\n"]}),"\n",(0,a.jsxs)(s.p,{children:["The ",(0,a.jsx)(s.code,{children:"hydradx.traces"})," table is created by a snapshot script utilizing Hydration API calls to fetch\naccurate values which would be difficult to calculate from the blockchain events alone."]}),"\n",(0,a.jsxs)(s.p,{children:["Start building your own queries using granular data on Dune\n",(0,a.jsx)(s.a,{href:"https://dune.com/queries?category=canonical&namespace=hydradx",children:"here"}),"."]}),"\n",(0,a.jsx)(s.h2,{id:"useful-queries",children:"Useful Queries"}),"\n",(0,a.jsx)(s.p,{children:"Some useful queries for Hydration are made available as materialized views."}),"\n",(0,a.jsxs)(s.table,{children:[(0,a.jsx)(s.thead,{children:(0,a.jsxs)(s.tr,{children:[(0,a.jsx)(s.th,{children:"Subject Area"}),(0,a.jsx)(s.th,{children:"Query"}),(0,a.jsx)(s.th,{children:"Materialized View"}),(0,a.jsx)(s.th,{children:"Description"})]})}),(0,a.jsxs)(s.tbody,{children:[(0,a.jsxs)(s.tr,{children:[(0,a.jsx)(s.td,{children:"Oracle"}),(0,a.jsx)(s.td,{children:(0,a.jsx)(s.a,{href:"https://dune.com/queries/3459562",children:"query_3459562"})}),(0,a.jsx)(s.td,{children:(0,a.jsx)(s.code,{children:"dune.substrate.result_hydradx_oracle"})}),(0,a.jsx)(s.td,{children:"Provides hourly oracle values for all currencies present in the omnipool. Uses LRNA."})]}),(0,a.jsxs)(s.tr,{children:[(0,a.jsx)(s.td,{children:"Oracle (Alt.)"}),(0,a.jsx)(s.td,{children:(0,a.jsx)(s.a,{href:"https://dune.com/queries/3573146",children:"query_3573146"})}),(0,a.jsx)(s.td,{children:(0,a.jsx)(s.code,{children:"dune.substrate.result_hydra_dx_oracle_new"})}),(0,a.jsx)(s.td,{children:"Provides hourly oracle values for all currencies present in the omnipool. Uses DOT."})]}),(0,a.jsxs)(s.tr,{children:[(0,a.jsx)(s.td,{children:"Oracle (Alt. Daily)"}),(0,a.jsx)(s.td,{children:(0,a.jsx)(s.a,{href:"https://dune.com/queries/3445402",children:"query_3445402"})}),(0,a.jsx)(s.td,{children:(0,a.jsx)(s.code,{children:"dune.substrate.result_hydra_dx_oracle_new_daily"})}),(0,a.jsx)(s.td,{children:"Same, but aggregated daily."})]}),(0,a.jsxs)(s.tr,{children:[(0,a.jsx)(s.td,{children:"Oracle Pairs"}),(0,a.jsx)(s.td,{children:(0,a.jsx)(s.a,{href:"https://dune.com/queries/3483707",children:"query_3483707"})}),(0,a.jsx)(s.td,{children:(0,a.jsx)(s.code,{children:"dune.substrate.result_hydra_dx_oracle_pairs"})}),(0,a.jsx)(s.td,{children:"Provides volume and transaction counts for all pairwise trades in the omnipool."})]}),(0,a.jsxs)(s.tr,{children:[(0,a.jsx)(s.td,{children:"Omnipool Liquidity"}),(0,a.jsx)(s.td,{children:(0,a.jsx)(s.a,{href:"https://dune.com/queries/3507194",children:"query_3507194"})}),(0,a.jsx)(s.td,{children:(0,a.jsx)(s.code,{children:"dune.substrate.result_hydradx_liquidity_master"})}),(0,a.jsx)(s.td,{children:"Provides liquidity in the Omnipool on a per-account basis."})]}),(0,a.jsxs)(s.tr,{children:[(0,a.jsx)(s.td,{children:"Assets"}),(0,a.jsx)(s.td,{children:(0,a.jsx)(s.a,{href:"https://dune.com/queries/3482301",children:"query_3482301"})}),(0,a.jsx)(s.td,{children:"N/A"}),(0,a.jsx)(s.td,{children:"Provides asset_id, symbol, and decimals for all assets in the Hydration parachain."})]})]})]}),"\n",(0,a.jsx)(s.p,{children:"The first Oracle query is the recommended one to use for any oracle use cases that are not\nhistorical in nature. This is because it relies on the most reliable mechanism for determining the\nactual price, using the intermediate LRNA token price. This level of detail is only available from\nJan. 2024 onwards."}),"\n",(0,a.jsx)(s.p,{children:"For historical price analysis, the alternative oracle query uses DOT as the intermediate currency.\nIt may be slightly less accurate and take a bit longer to calculate."}),"\n",(0,a.jsx)(s.p,{children:"Liquidity in the Omnipool is calculated on a per-account basis, using the NFT positions that\nrepresent shares in the Omnipool."}),"\n",(0,a.jsx)(s.p,{children:"Dune users are encouraged to study the source code of the queries, including parts of a query that\nmay have been commented out for future use."}),"\n",(0,a.jsx)(s.p,{children:"Uncommenting these parts may accelerate your effort of adopting a query to a slightly different use\ncase."}),"\n",(0,a.jsx)(s.h2,{id:"getting-started-with-queries",children:"Getting Started with Queries"}),"\n",(0,a.jsx)(s.p,{children:"To get started with querying data from Hydration, you are welcome to use the mentioned materialized\nqueries. You can also use the following DuneSQL queries as examples:"}),"\n",(0,a.jsx)(s.pre,{children:(0,a.jsx)(s.code,{className:"language-sql",metastring:'title="Hydration Omnipool Asset (Latest)" showLineNumbers',children:"WITH MaxTimestamps AS (\n SELECT\n CAST(JSON_VALUE(kv, 'strict $.id') AS INT) AS asset_id,\n MAX(ts) AS max_ts\n FROM hydradx.traces\n WHERE track = 'omniasset'\n GROUP BY 1\n), A AS (\n SELECT\n m.asset_id,\n A1.ticker,\n A1.decimals,\n m.max_ts AS ts,\n CAST(JSON_VALUE(t.pv, 'strict $.cap') AS UINT256) AS cap,\n CAST(JSON_VALUE(t.pv, 'strict $.hubReserve') AS UINT256) AS hubReserve,\n CAST(JSON_VALUE(t.pv, 'strict $.protocolShares') AS UINT256) AS protocolShares,\n CAST(JSON_VALUE(t.pv, 'strict $.shares') AS UINT256) AS shares,\n JSON_VALUE(t.pv, 'strict $.tradable.bits') AS tradeable\n FROM MaxTimestamps m\n INNER JOIN hydradx.traces t\n ON m.asset_id = CAST(JSON_VALUE(t.kv, 'strict $.id') AS INT)\n AND m.max_ts = t.ts\n JOIN query_3482301 A1\n ON A1.asset_id = m.asset_id\n WHERE t.track = 'omniasset'\n)\nSELECT\n asset_id,\n ticker,\n ROUND(100.0 * hubReserve / (SUM(hubReserve) OVER (ORDER BY 1)), 1) AS percentage_of_pool,\n cap / POW(10, 18) AS cap,\n ROUND(hubReserve / POW(10, 12)) AS hubReserve,\n ROUND(protocolShares / POW(10, decimals)) AS protocolShares,\n ROUND(shares / POW(10, decimals)) AS shares,\n ts AS last_update -- when this data was collected\nFROM A\nWHERE tradeable = '15' -- all bits set to \"on\"\nORDER BY 3 DESC;\n\n\n"})}),"\n",(0,a.jsxs)(s.p,{children:["The query is fairly typical for a parachain query on Dune. It calculates the last available values\nfrom the snapshot table ",(0,a.jsx)(s.code,{children:"hydradx.traces"}),"."]}),"\n",(0,a.jsx)(s.p,{children:"The query uses Dune's native UINT256 type extensively, which allows to deal with very large numbers\nand still maintain precision."}),"\n",(0,a.jsx)(s.p,{children:"Query result:"}),"\n",(0,a.jsx)("iframe",{src:"https://dune.com/embeds/3485087/5857870/",height:"350",width:"100%"}),"\n",(0,a.jsx)(s.admonition,{title:"DuneSQL Reference",type:"info",children:(0,a.jsxs)(s.p,{children:["For more information on DuneSQL, please refer to the ",(0,a.jsx)(s.a,{href:"/docs/general/dunesql-cheatsheet",children:"DuneSQL Cheatsheet"}),"\nand\n",(0,a.jsx)(s.a,{href:"https://docs.dune.com/query-engine/Functions-and-operators/index",children:"DuneSQL Official Documentation"}),"."]})})]})}function c(e={}){const{wrapper:s}={...(0,t.R)(),...e.components};return s?(0,a.jsx)(s,{...e,children:(0,a.jsx)(h,{...e})}):h(e)}},28453:(e,s,n)=>{n.d(s,{R:()=>i,x:()=>d});var a=n(96540);const t={},r=a.createContext(t);function i(e){const s=a.useContext(r);return a.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function d(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:i(e.components),a.createElement(r.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/afddde9d.02d24edc.js b/assets/js/afddde9d.02d24edc.js new file mode 100644 index 000000000000..44d865898e9f --- /dev/null +++ b/assets/js/afddde9d.02d24edc.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1724],{29644:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>l,contentTitle:()=>r,default:()=>d,frontMatter:()=>i,metadata:()=>n,toc:()=>c});const n=JSON.parse('{"id":"learn/learn-asset-conversion-assethub","title":"Asset Conversion on AssetHub","description":"Asset Conversion implementation details on AssetHub.","source":"@site/../docs/learn/learn-asset-conversion-assethub.md","sourceDirName":"learn","slug":"/learn-asset-conversion-assethub","permalink":"/docs/learn-asset-conversion-assethub","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-asset-conversion-assethub.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1726760224000,"frontMatter":{"id":"learn-asset-conversion-assethub","title":"Asset Conversion on AssetHub","sidebar_label":"Asset Conversion","description":"Asset Conversion implementation details on AssetHub.","keywords":["Assets","DEX","Exchange","Pools","Tokens"],"slug":"../learn-asset-conversion-assethub"},"sidebar":"docs","previous":{"title":"Asset Hub","permalink":"/docs/learn-assets"},"next":{"title":"Teleporting Assets","permalink":"/docs/learn-teleport"}}');var a=t(74848),o=t(28453);const i={id:"learn-asset-conversion-assethub",title:"Asset Conversion on AssetHub",sidebar_label:"Asset Conversion",description:"Asset Conversion implementation details on AssetHub.",keywords:["Assets","DEX","Exchange","Pools","Tokens"],slug:"../learn-asset-conversion-assethub"},r=void 0,l={},c=[{value:"Fee Payment in Any Asset - Wallets",id:"fee-payment-in-any-asset---wallets",level:2},{value:"Fee Payment in Any Asset - Parachains",id:"fee-payment-in-any-asset---parachains",level:2},{value:"Creation of Pools with Foreign Assets - Parachains",id:"creation-of-pools-with-foreign-assets---parachains",level:2}];function h(e){const s={a:"a",admonition:"admonition",h2:"h2",li:"li",p:"p",ul:"ul",...(0,o.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(s.p,{children:["Asset conversion is a simple AMM (Automated Market Maker) based on\n",(0,a.jsx)(s.a,{href:"https://github.com/Uniswap/v2-core",children:"Uniswap V2"})," logic, deployed as a\n",(0,a.jsx)(s.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/substrate/frame/asset-conversion",children:"pallet on Polkadot AssetHub"}),".\nIn the AMM model the prices of tokens are determined by a mathematical formula based on the ratio of\ntokens in a liquidity pool, unlike traditional exchanges that use an order book. This will be a\n\u201ctrustless\u201d DEX, controlled through Polkadot OpenGov."]}),"\n",(0,a.jsx)(s.admonition,{type:"note",children:(0,a.jsx)(s.p,{children:"The asset pairs of the liquidity pools of AssetHub will always contain the relay chain's native\ntoken as one of the assets. Provision of liquidity for pools with arbitrary asset pairs is not\nallowed."})}),"\n",(0,a.jsx)(s.p,{children:"Asset Conversion on Asset Hub enables fee payment in any asset, given it has a liquidity pool, such\nthat the fee handler (in this case, a Collator) only receives the native asset."}),"\n",(0,a.jsx)(s.p,{children:"Asset Conversion pallet allows you to:"}),"\n",(0,a.jsxs)(s.ul,{children:["\n",(0,a.jsxs)(s.li,{children:[(0,a.jsx)(s.a,{href:"https://docs.rs/pallet-asset-conversion/latest/pallet_asset_conversion/pallet/struct.Pallet.html#method.create_pool",children:"Create a liquidity pool"}),"\nwith the relay chain's native token and an asset"]}),"\n",(0,a.jsxs)(s.li,{children:[(0,a.jsx)(s.a,{href:"https://docs.rs/pallet-asset-conversion/latest/pallet_asset_conversion/pallet/struct.Pallet.html#method.add_liquidity",children:"Provide the liquidity"}),"\nand receive back an LP token"]}),"\n",(0,a.jsx)(s.li,{children:(0,a.jsx)(s.a,{href:"https://docs.rs/pallet-asset-conversion/latest/pallet_asset_conversion/pallet/struct.Pallet.html#method.remove_liquidity",children:"Exchange the LP token back to assets"})}),"\n",(0,a.jsx)(s.li,{children:(0,a.jsx)(s.a,{href:"https://docs.rs/pallet-asset-conversion/latest/pallet_asset_conversion/pallet/struct.Pallet.html#method.swap_exact_tokens_for_tokens",children:"Swap assets if there is a pool created"})}),"\n",(0,a.jsxs)(s.li,{children:[(0,a.jsx)(s.a,{href:"https://docs.rs/pallet-asset-conversion/latest/pallet_asset_conversion/trait.AssetConversionApi.html#method.quote_price_exact_tokens_for_tokens",children:"Query for an exchange price"}),"\nvia a runtime call endpoint"]}),"\n",(0,a.jsxs)(s.li,{children:[(0,a.jsx)(s.a,{href:"https://docs.rs/pallet-asset-conversion/latest/pallet_asset_conversion/trait.AssetConversionApi.html#method.get_reserves",children:"Query the size of a liquidity pool"}),"."]}),"\n"]}),"\n",(0,a.jsx)(s.admonition,{title:"Asset Conversion Tutorials",type:"info",children:(0,a.jsxs)(s.p,{children:["The Asset Conversion user guide and tutorials are available\n",(0,a.jsx)(s.a,{href:"/docs/learn-guides-asset-conversion",children:"here"})]})}),"\n",(0,a.jsx)(s.h2,{id:"fee-payment-in-any-asset---wallets",children:"Fee Payment in Any Asset - Wallets"}),"\n",(0,a.jsxs)(s.p,{children:["Without Asset Conversion pallet, only DOT and\n",(0,a.jsx)(s.a,{href:"/docs/learn-assets#sufficient-assets",children:"sufficient assets"})," can be used for paying transaction fees.\nWith the Asset Conversion pallet deployed, Wallets can enable users to pay transaction fees through\nany arbitrary asset made available in pools with either DOT or sufficient assets. More specifically,\nthis functionality is enabled through\n",(0,a.jsx)(s.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/cdc8d197e6d487ef54f7e16767b5c1ab041c8b10/substrate/frame/transaction-payment/asset-conversion-tx-payment",children:"Asset Conversion Transaction Payment Pallet"}),",\nallowing runtimes that include it to pay for transactions in assets other than the native token of\nthe chain."]}),"\n",(0,a.jsx)(s.admonition,{title:"Handling Pools with Low Liquidity",type:"caution",children:(0,a.jsx)(s.p,{children:"The wallets and UIs should ensure that the user is prompted with the necessary warnings, such that\nthey do not accidentally spend all of their funds to perform a swap on a pool with no or low\nliquidity."})}),"\n",(0,a.jsx)(s.h2,{id:"fee-payment-in-any-asset---parachains",children:"Fee Payment in Any Asset - Parachains"}),"\n",(0,a.jsx)(s.p,{children:"Parachains can pay for their XCM execution fees in any asset with a liquidity pool on AssetHub."}),"\n",(0,a.jsx)(s.h2,{id:"creation-of-pools-with-foreign-assets---parachains",children:"Creation of Pools with Foreign Assets - Parachains"}),"\n",(0,a.jsx)(s.p,{children:"Assets pallet uses XCM MultiLocations to represent assets, and their corresponding origins to\ncontrol them."}),"\n",(0,a.jsx)(s.p,{children:"One of the pain points of integrating parachain tokens natively on wallets and exchanges is that\nthey require running individual parachain infrastructure like full nodes to process deposits, and\nrequire additional code to handle withdrawals because they need to be able to construct and\nbroadcast transactions on each parachain. These parachains could use different balances pallets or\norder them differently. When Polkadot hosts hundreds of parachains (and possibly thousands of\nthreads), this becomes a huge burden in terms of network support. This is in contrast to adding\nsupport for an additional ERC20 token; the marginal effort is very small since an Ethereum node\nalready serves all the data they need."}),"\n",(0,a.jsx)(s.p,{children:"With support for these assets on Asset Hub, exchanges/custodians could monitor one chain for\ndeposits (applications and UIs would need to give the option to transfer to Asset Hub). For\nwithdrawals, users could choose to withdraw to their address on Asset Hub. There are two user\nexperience bonuses here:"}),"\n",(0,a.jsxs)(s.ul,{children:["\n",(0,a.jsx)(s.li,{children:"The exchange/custodian only needs to transact on one parachain and can access every other without\nany infrastructure lift."}),"\n",(0,a.jsx)(s.li,{children:"For the user, they never actually need to \u201csee\u201d AssetHub. It\u2019s entirely abstracted away behind\neither the parachain wallet/application or the exchange/custodian."}),"\n"]})]})}function d(e={}){const{wrapper:s}={...(0,o.R)(),...e.components};return s?(0,a.jsx)(s,{...e,children:(0,a.jsx)(h,{...e})}):h(e)}},28453:(e,s,t)=>{t.d(s,{R:()=>i,x:()=>r});var n=t(96540);const a={},o=n.createContext(a);function i(e){const s=n.useContext(o);return n.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function r(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:i(e.components),n.createElement(o.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/afddde9d.1699d6e0.js b/assets/js/afddde9d.1699d6e0.js deleted file mode 100644 index 7d51487f49b1..000000000000 --- a/assets/js/afddde9d.1699d6e0.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1724],{10666:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>l,contentTitle:()=>i,default:()=>d,frontMatter:()=>o,metadata:()=>r,toc:()=>c});var n=t(74848),a=t(28453);const o={id:"learn-asset-conversion-assethub",title:"Asset Conversion on AssetHub",sidebar_label:"Asset Conversion",description:"Asset Conversion implementation details on AssetHub.",keywords:["Assets","DEX","Exchange","Pools","Tokens"],slug:"../learn-asset-conversion-assethub"},i=void 0,r={id:"learn/learn-asset-conversion-assethub",title:"Asset Conversion on AssetHub",description:"Asset Conversion implementation details on AssetHub.",source:"@site/../docs/learn/learn-asset-conversion-assethub.md",sourceDirName:"learn",slug:"/learn-asset-conversion-assethub",permalink:"/docs/learn-asset-conversion-assethub",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-asset-conversion-assethub.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1726760224e3,frontMatter:{id:"learn-asset-conversion-assethub",title:"Asset Conversion on AssetHub",sidebar_label:"Asset Conversion",description:"Asset Conversion implementation details on AssetHub.",keywords:["Assets","DEX","Exchange","Pools","Tokens"],slug:"../learn-asset-conversion-assethub"},sidebar:"docs",previous:{title:"Asset Hub",permalink:"/docs/learn-assets"},next:{title:"Teleporting Assets",permalink:"/docs/learn-teleport"}},l={},c=[{value:"Fee Payment in Any Asset - Wallets",id:"fee-payment-in-any-asset---wallets",level:2},{value:"Fee Payment in Any Asset - Parachains",id:"fee-payment-in-any-asset---parachains",level:2},{value:"Creation of Pools with Foreign Assets - Parachains",id:"creation-of-pools-with-foreign-assets---parachains",level:2}];function h(e){const s={a:"a",admonition:"admonition",h2:"h2",li:"li",p:"p",ul:"ul",...(0,a.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(s.p,{children:["Asset conversion is a simple AMM (Automated Market Maker) based on\n",(0,n.jsx)(s.a,{href:"https://github.com/Uniswap/v2-core",children:"Uniswap V2"})," logic, deployed as a\n",(0,n.jsx)(s.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/substrate/frame/asset-conversion",children:"pallet on Polkadot AssetHub"}),".\nIn the AMM model the prices of tokens are determined by a mathematical formula based on the ratio of\ntokens in a liquidity pool, unlike traditional exchanges that use an order book. This will be a\n\u201ctrustless\u201d DEX, controlled through Polkadot OpenGov."]}),"\n",(0,n.jsx)(s.admonition,{type:"note",children:(0,n.jsx)(s.p,{children:"The asset pairs of the liquidity pools of AssetHub will always contain the relay chain's native\ntoken as one of the assets. Provision of liquidity for pools with arbitrary asset pairs is not\nallowed."})}),"\n",(0,n.jsx)(s.p,{children:"Asset Conversion on Asset Hub enables fee payment in any asset, given it has a liquidity pool, such\nthat the fee handler (in this case, a Collator) only receives the native asset."}),"\n",(0,n.jsx)(s.p,{children:"Asset Conversion pallet allows you to:"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"https://docs.rs/pallet-asset-conversion/latest/pallet_asset_conversion/pallet/struct.Pallet.html#method.create_pool",children:"Create a liquidity pool"}),"\nwith the relay chain's native token and an asset"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"https://docs.rs/pallet-asset-conversion/latest/pallet_asset_conversion/pallet/struct.Pallet.html#method.add_liquidity",children:"Provide the liquidity"}),"\nand receive back an LP token"]}),"\n",(0,n.jsx)(s.li,{children:(0,n.jsx)(s.a,{href:"https://docs.rs/pallet-asset-conversion/latest/pallet_asset_conversion/pallet/struct.Pallet.html#method.remove_liquidity",children:"Exchange the LP token back to assets"})}),"\n",(0,n.jsx)(s.li,{children:(0,n.jsx)(s.a,{href:"https://docs.rs/pallet-asset-conversion/latest/pallet_asset_conversion/pallet/struct.Pallet.html#method.swap_exact_tokens_for_tokens",children:"Swap assets if there is a pool created"})}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"https://docs.rs/pallet-asset-conversion/latest/pallet_asset_conversion/trait.AssetConversionApi.html#method.quote_price_exact_tokens_for_tokens",children:"Query for an exchange price"}),"\nvia a runtime call endpoint"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"https://docs.rs/pallet-asset-conversion/latest/pallet_asset_conversion/trait.AssetConversionApi.html#method.get_reserves",children:"Query the size of a liquidity pool"}),"."]}),"\n"]}),"\n",(0,n.jsx)(s.admonition,{title:"Asset Conversion Tutorials",type:"info",children:(0,n.jsxs)(s.p,{children:["The Asset Conversion user guide and tutorials are available\n",(0,n.jsx)(s.a,{href:"/docs/learn-guides-asset-conversion",children:"here"})]})}),"\n",(0,n.jsx)(s.h2,{id:"fee-payment-in-any-asset---wallets",children:"Fee Payment in Any Asset - Wallets"}),"\n",(0,n.jsxs)(s.p,{children:["Without Asset Conversion pallet, only DOT and\n",(0,n.jsx)(s.a,{href:"/docs/learn-assets#sufficient-assets",children:"sufficient assets"})," can be used for paying transaction fees.\nWith the Asset Conversion pallet deployed, Wallets can enable users to pay transaction fees through\nany arbitrary asset made available in pools with either DOT or sufficient assets. More specifically,\nthis functionality is enabled through\n",(0,n.jsx)(s.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/cdc8d197e6d487ef54f7e16767b5c1ab041c8b10/substrate/frame/transaction-payment/asset-conversion-tx-payment",children:"Asset Conversion Transaction Payment Pallet"}),",\nallowing runtimes that include it to pay for transactions in assets other than the native token of\nthe chain."]}),"\n",(0,n.jsx)(s.admonition,{title:"Handling Pools with Low Liquidity",type:"caution",children:(0,n.jsx)(s.p,{children:"The wallets and UIs should ensure that the user is prompted with the necessary warnings, such that\nthey do not accidentally spend all of their funds to perform a swap on a pool with no or low\nliquidity."})}),"\n",(0,n.jsx)(s.h2,{id:"fee-payment-in-any-asset---parachains",children:"Fee Payment in Any Asset - Parachains"}),"\n",(0,n.jsx)(s.p,{children:"Parachains can pay for their XCM execution fees in any asset with a liquidity pool on AssetHub."}),"\n",(0,n.jsx)(s.h2,{id:"creation-of-pools-with-foreign-assets---parachains",children:"Creation of Pools with Foreign Assets - Parachains"}),"\n",(0,n.jsx)(s.p,{children:"Assets pallet uses XCM MultiLocations to represent assets, and their corresponding origins to\ncontrol them."}),"\n",(0,n.jsx)(s.p,{children:"One of the pain points of integrating parachain tokens natively on wallets and exchanges is that\nthey require running individual parachain infrastructure like full nodes to process deposits, and\nrequire additional code to handle withdrawals because they need to be able to construct and\nbroadcast transactions on each parachain. These parachains could use different balances pallets or\norder them differently. When Polkadot hosts hundreds of parachains (and possibly thousands of\nthreads), this becomes a huge burden in terms of network support. This is in contrast to adding\nsupport for an additional ERC20 token; the marginal effort is very small since an Ethereum node\nalready serves all the data they need."}),"\n",(0,n.jsx)(s.p,{children:"With support for these assets on Asset Hub, exchanges/custodians could monitor one chain for\ndeposits (applications and UIs would need to give the option to transfer to Asset Hub). For\nwithdrawals, users could choose to withdraw to their address on Asset Hub. There are two user\nexperience bonuses here:"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsx)(s.li,{children:"The exchange/custodian only needs to transact on one parachain and can access every other without\nany infrastructure lift."}),"\n",(0,n.jsx)(s.li,{children:"For the user, they never actually need to \u201csee\u201d AssetHub. It\u2019s entirely abstracted away behind\neither the parachain wallet/application or the exchange/custodian."}),"\n"]})]})}function d(e={}){const{wrapper:s}={...(0,a.R)(),...e.components};return s?(0,n.jsx)(s,{...e,children:(0,n.jsx)(h,{...e})}):h(e)}},28453:(e,s,t)=>{t.d(s,{R:()=>i,x:()=>r});var n=t(96540);const a={},o=n.createContext(a);function i(e){const s=n.useContext(o);return n.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function r(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:i(e.components),n.createElement(o.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/b0a48d97.0b707f88.js b/assets/js/b0a48d97.0b707f88.js new file mode 100644 index 000000000000..cfb6d3ac36a3 --- /dev/null +++ b/assets/js/b0a48d97.0b707f88.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1018],{83313:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>l,default:()=>u,frontMatter:()=>i,metadata:()=>o,toc:()=>c});const o=JSON.parse('{"id":"learn/learn-guides-ledger","title":"Polkadot-JS Guides for Ledger Devices","description":"Polkadot-JS Guides for Ledger Devices.","source":"@site/../docs/learn/learn-guides-ledger.md","sourceDirName":"learn","slug":"/learn-guides-ledger","permalink":"/docs/learn-guides-ledger","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-ledger.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1729847256000,"frontMatter":{"id":"learn-guides-ledger","title":"Polkadot-JS Guides for Ledger Devices","sidebar_label":"Ledger Guides","description":"Polkadot-JS Guides for Ledger Devices.","keywords":["ledger","polkadot-js"],"slug":"../learn-guides-ledger"},"sidebar":"docs","previous":{"title":"Identity Guides","permalink":"/docs/learn-guides-identity"},"next":{"title":"Polkadot Vault Guides","permalink":"/docs/learn-guides-vault"}}');var s=t(74848),r=t(28453),a=t(67141);const i={id:"learn-guides-ledger",title:"Polkadot-JS Guides for Ledger Devices",sidebar_label:"Ledger Guides",description:"Polkadot-JS Guides for Ledger Devices.",keywords:["ledger","polkadot-js"],slug:"../learn-guides-ledger"},l=void 0,d={},c=[{value:"Loading Your Account",id:"loading-your-account",level:2},{value:"Derivation paths",id:"derivation-paths",level:3},{value:"Confirming the Address on your Device",id:"confirming-the-address-on-your-device",level:3},{value:"Navigating your Account",id:"navigating-your-account",level:2},{value:"Sending a Transfer with Ledger Devices",id:"sending-a-transfer-with-ledger-devices",level:2},{value:"Receiving a Transfer",id:"receiving-a-transfer",level:2},{value:"Staking",id:"staking",level:2},{value:"Ledger Developer Release",id:"ledger-developer-release",level:2},{value:"Why you might need the Developer Release",id:"why-you-might-need-the-developer-release",level:3},{value:"Install the Developer Release",id:"install-the-developer-release",level:3}];function h(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the Polkadot-JS UI, you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.a,{href:"/docs/ledger",children:"Ledger devices"})," are hardware wallets that keep your private key secured\non a physical device not directly exposed to your computer or the internet."]}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.a,{href:"/docs/ledger#polkadot-generic-app",children:"Polkadot Generic application"})," allows you to manage\nyour DOT/KSM on Polkadot/Kusama networks, tokens on their Asset Hubs and possibly all chains within\nthe Polkadot ecosystem. It is versatile and capable of handling parachains and relay chains without\nbeing affected by their runtime upgrades."]}),"\n",(0,s.jsx)(n.h2,{id:"loading-your-account",children:"Loading Your Account"}),"\n",(0,s.jsx)(n.admonition,{type:"info",children:(0,s.jsx)(n.p,{children:"Ledger Live should be off while using Ledger with Polkadot-JS UI, as it can interfere with normal\noperation."})}),"\n",(0,s.jsxs)(n.p,{children:["You can import your Ledger account to ",(0,s.jsx)(n.a,{href:"https://polkadot.js.org/extension/",children:"Polkadot Extension"})," or to\nthe ",(0,s.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/explorer",children:"Polkadot-JS UI"}),". For instructions on how to import\nLedger accounts to the Polkadot Extension read through\n",(0,s.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000175387-how-to-add-your-ledger-through-the-polkadot-extension",children:"this support article"}),",\nwhile if you want to import Ledger accounts to the Polkadot-JS UI, you can consult\n",(0,s.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000170812-how-to-add-ledger-account-through-the-polkadot-js-ui",children:"this other article"}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"derivation-paths",children:"Derivation paths"}),"\n",(0,s.jsxs)(n.p,{children:["When adding a Ledger account using the extension or the UI, you will be asked to select an\n",(0,s.jsx)(n.code,{children:"account type"})," and an ",(0,s.jsx)(n.code,{children:"account index"}),". The first lets you select an account, while the second lets\nyou pick a derivation path from that account - think of it like a formula from which child accounts\nare generated. When you are creating a Polkadot ledger account for the first time on Ledger Live\nwith name ",(0,s.jsx)(n.code,{children:"Polkadot 1"}),", this can be added to Polkadot-JS using the 0/0 derivation path (i.e. account\ntype = 0 and account index = 0). If you add a second account called ",(0,s.jsx)(n.code,{children:"Polkadot 2"}),", this will\ncorrespond to the 1/0 derivation path, and so on. We thus have multiple parent accounts that can be\nviewed and used in both Ledger Live and Polkadot-JS. Additionally, we can use Polkadot-JS UI to\ncreate multiple children accounts from each parent account. For example, ",(0,s.jsx)(n.code,{children:"Polkadot 1"})," with 0/0\nderivation path can have child 0/1, 0/2, etc. that can be used within the UI. However, such children\naccounts cannot be used in Ledger Live, as it only scans through the parent accounts. So, remember\nthat the balances on the children accounts cannot be viewed, and you will not be able to transact\nwith those accounts on Ledger Live."]}),"\n",(0,s.jsx)(n.h3,{id:"confirming-the-address-on-your-device",children:"Confirming the Address on your Device"}),"\n",(0,s.jsxs)(n.p,{children:["If your Ledger account is directly imported into the Polkadot-JS UI, you can ask the UI to confirm\nthe address on your Ledger device. There are a few methods to check the balance of your Ledger\naccount. Check out\n",(0,s.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000169332-where-can-i-see-the-balance-of-my-account-",children:"this support article"}),"\nfor information."]}),"\n",(0,s.jsx)(n.h2,{id:"navigating-your-account",children:"Navigating your Account"}),"\n",(0,s.jsxs)(n.p,{children:["Once you have loaded your account on the \u201cAccounts\u201d tab, it should show a row with your Ledger\naccount. Your account\u2019s DOT balance is on the row\u2019s far right. Expanding the balance arrow will show\nyour balance details, such as locks or reserved amounts. For more information about the type of\nbalances, visit the ",(0,s.jsx)(n.a,{href:"/docs/learn-account-balances#balance-types-on-polkadot-js",children:"balances page"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"sending-a-transfer-with-ledger-devices",children:"Sending a Transfer with Ledger Devices"}),"\n",(0,s.jsx)(n.admonition,{title:"Verifying Extrinsics",type:"danger",children:(0,s.jsxs)(n.p,{children:["Visit the\n",(0,s.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000179161-how-can-i-verify-what-extrinsic-i-m-signing-#Verify-an-extrinsic-using-Ledger",children:(0,s.jsx)(n.strong,{children:"dedicated support page"})}),"\nand see ",(0,s.jsx)(n.a,{href:"https://youtu.be/bxMs-9fBtFk?t=360",children:(0,s.jsx)(n.strong,{children:"this video tutorial"})})," tutorial to learn how to\nverify extrinsics before signing them. The video will also mention potential attacks that can happen\nwhile signing transactions."]})}),"\n",(0,s.jsx)(n.admonition,{title:"Signature error message",type:"info",children:(0,s.jsxs)(n.p,{children:["If you have already connected your device, but an error message appears before signing a\ntransaction, make sure you have opened the Polkadot Ledger Generic application on your Ledger Nano\ndevice. Visit\n",(0,s.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181994",children:"this support page"})," for\nmore information about signing transactions using your ledger."]})}),"\n",(0,s.jsxs)(n.p,{children:["General instructions to send a transfer can be found on\n",(0,s.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000170304-how-to-send-transfer-funds-out-of-your-dot-account-on-the-polkadot-js-ui",children:"this support page"}),".\nTo sign transactions with your Ledger Nano check\n",(0,s.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181994",children:"this support article"})," or\nsee ",(0,s.jsx)(n.a,{href:"https://youtu.be/gbvrHzr4EDY?t=579",children:"this video tutorial"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"receiving-a-transfer",children:"Receiving a Transfer"}),"\n",(0,s.jsxs)(n.p,{children:["To receive a transfer on the accounts stored on your Ledger device, you must provide the sender\n(i.e., the payer) with your address. To do so, follow the instructions on\n",(0,s.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181866-how-to-receive-dot-to-my-account-on-polkadot-js-ui",children:"this support page"}),"."]}),"\n",(0,s.jsx)(n.admonition,{title:"Sharing your account address",type:"caution",children:(0,s.jsxs)(n.p,{children:["Before giving anyone your address, ensure it matches what's on the Ledger by\n",(0,s.jsx)(n.a,{href:"#confirming-the-address-on-your-device",children:"confirming the address on your device"}),". Some malware will\nintercept clicks and clipboard requests and can change your copied value in-flight, so being extra\nvigilant around copy-paste operations makes sense."]})}),"\n",(0,s.jsx)(n.p,{children:"The easiest way to get your address is to click on the account name. This will open a sidebar\nshowing your address and other information, such as on-chain identity. Another method is just\nclicking on your account's avatar icon - this immediately copies your address to the clipboard."}),"\n",(0,s.jsx)(n.admonition,{title:"Your Asset Hub address is the same as your relay chain address",type:"note",children:(0,s.jsx)(n.p,{children:"Make sure that you clarify to the sender that you wish to receive your tokens on the Asset Hub\nparachain, otherwise (if you're receiving DOT or KSM tokens) they could be sent on the Polkadot or\nKusama relay chain."})}),"\n",(0,s.jsx)(n.h2,{id:"staking",children:"Staking"}),"\n",(0,s.jsxs)(n.p,{children:["For staking using Ledger devices, follow the instructions on\n",(0,s.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000168057-how-do-i-stake-nominate-on-polkadot-",children:"this support article"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"ledger-developer-release",children:"Ledger Developer Release"}),"\n",(0,s.jsx)(n.admonition,{type:"warning",children:(0,s.jsxs)(n.p,{children:["This section is for developers only. It is recommended to install the application from Ledger Live\nunless you ",(0,s.jsx)(n.em,{children:"know precisely what you're doing"}),"."]})}),"\n",(0,s.jsx)(n.h3,{id:"why-you-might-need-the-developer-release",children:"Why you might need the Developer Release"}),"\n",(0,s.jsxs)(n.p,{children:["Ledger apps for the Polkadot ecosystem are developed by ",(0,s.jsx)(n.a,{href:"https://zondax.ch/",children:"Zondax"}),". When new\nfunctionalities are added to the Ledger apps, they are made available on a developer release for\ntesting purposes. After a successful audit and review, the apps would be available for download and\ninstallation using ",(0,s.jsx)(n.a,{href:"https://www.ledger.com/ledger-live",children:"Ledger Live"}),". As it takes some time for\nLedger to audit and review the release, the app upgrade option may not be available on Ledger Live\nwhen the new runtime is deployed on the network. If this happens, users cannot use Ledger devices to\nsign transactions. Suppose you cannot wait a few days until the app passes the Ledger audit, you can\ninstall the developer release from the shell using the latest version published on\n",(0,s.jsx)(n.a,{href:"https://github.com/Zondax/ledger-polkadot/releases",children:"the Zondax GitHub repository"}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"install-the-developer-release",children:"Install the Developer Release"}),"\n",(0,s.jsxs)(n.admonition,{type:"info",children:[(0,s.jsxs)(n.p,{children:["See ",(0,s.jsx)(n.a,{href:"https://youtu.be/4SyVQrlXZ_Q",children:(0,s.jsx)(n.strong,{children:"this video tutorial"})})," to learn how to install the developer\nrelease of your ledger app."]}),(0,s.jsx)(n.p,{children:"Currently, the developer release can be installed only on the Nano S and S Plus devices and can't be\ninstalled on the Nano X."})]}),"\n",(0,s.jsxs)(n.p,{children:["To install the developer version, make sure you have the latest ",(0,s.jsx)(n.code,{children:"pip"})," version and follow the steps\nbelow:"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Install ",(0,s.jsx)(n.em,{children:"ledgerblue"})," running the command ",(0,s.jsx)(n.code,{children:"python3 -m pip install ledgerblue"}),"."]}),"\n",(0,s.jsxs)(n.li,{children:["Download the developer release from the\n",(0,s.jsx)(n.a,{href:"https://github.com/Zondax/ledger-polkadot/releases",children:"Zondax GitHub repository"}),". The file will be\nnamed ",(0,s.jsx)(n.code,{children:"installer_nanos_plus.sh"})," or something similar, depending on your ledger device."]}),"\n",(0,s.jsxs)(n.li,{children:["Locate the downloaded shell script and make it executable in your shell by typing the command\n",(0,s.jsx)(n.code,{children:"chmod +x installer_nanos_plus.sh"}),"."]}),"\n",(0,s.jsxs)(n.li,{children:["You can now use the ",(0,s.jsx)(n.code,{children:"./installer_nanos_plus.sh --help"})," command to visualize the available options\n(see below)"]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"Dev Ledger Help Menu",src:t(93611).A+"",width:"525",height:"54"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Attach your Ledger Nano (in this case, Nano S Plus) to your computer, enter the PIN code, and run\nthe command ",(0,s.jsx)(n.code,{children:"./installer_nanos_plus.sh load"}),'. Scroll with the right button until you see "Allow\nunsafe manager", left and right press to confirm. You will be asked to confirm the action of\nuninstalling the app and subsequently installing the newer version. After confirming both actions,\nthe shell script will install the version on your device. You must insert the PIN code to use the\ndevice after the installation.']}),"\n",(0,s.jsx)(n.li,{children:"If you wish to revert the version to the stable release, go to Ledger Live. The app will\nautomatically detect the developer release and give the option to install the previous stable\nrelease."}),"\n"]})]})}function u(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}},67141:(e,n,t)=>{t.d(n,{A:()=>r});var o=t(96540),s=t(74848);const r=function(e){var n,t=e.message,r=(0,o.useState)(!0),a=r[0],i=r[1];return(0,s.jsx)(s.Fragment,{children:a&&(0,s.jsxs)("div",{className:"message-box",children:[(0,s.jsx)("button",{className:"close-button",onClick:function(){i(!1)},children:"\u2716 "}),(0,s.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(n=t,n.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},93611:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/ledger-help-menu-3af6592c7bc1830644f7ca9d55005cf4.png"},28453:(e,n,t)=>{t.d(n,{R:()=>a,x:()=>i});var o=t(96540);const s={},r=o.createContext(s);function a(e){const n=o.useContext(r);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:a(e.components),o.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/b0a48d97.6c3bc3c0.js b/assets/js/b0a48d97.6c3bc3c0.js deleted file mode 100644 index 8ed865dfbd77..000000000000 --- a/assets/js/b0a48d97.6c3bc3c0.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1018],{31962:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>a,default:()=>u,frontMatter:()=>i,metadata:()=>l,toc:()=>c});var o=t(74848),s=t(28453),r=t(67141);const i={id:"learn-guides-ledger",title:"Polkadot-JS Guides for Ledger Devices",sidebar_label:"Ledger Guides",description:"Polkadot-JS Guides for Ledger Devices.",keywords:["ledger","polkadot-js"],slug:"../learn-guides-ledger"},a=void 0,l={id:"learn/learn-guides-ledger",title:"Polkadot-JS Guides for Ledger Devices",description:"Polkadot-JS Guides for Ledger Devices.",source:"@site/../docs/learn/learn-guides-ledger.md",sourceDirName:"learn",slug:"/learn-guides-ledger",permalink:"/docs/learn-guides-ledger",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-ledger.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1729847256e3,frontMatter:{id:"learn-guides-ledger",title:"Polkadot-JS Guides for Ledger Devices",sidebar_label:"Ledger Guides",description:"Polkadot-JS Guides for Ledger Devices.",keywords:["ledger","polkadot-js"],slug:"../learn-guides-ledger"},sidebar:"docs",previous:{title:"Identity Guides",permalink:"/docs/learn-guides-identity"},next:{title:"Polkadot Vault Guides",permalink:"/docs/learn-guides-vault"}},d={},c=[{value:"Loading Your Account",id:"loading-your-account",level:2},{value:"Derivation paths",id:"derivation-paths",level:3},{value:"Confirming the Address on your Device",id:"confirming-the-address-on-your-device",level:3},{value:"Navigating your Account",id:"navigating-your-account",level:2},{value:"Sending a Transfer with Ledger Devices",id:"sending-a-transfer-with-ledger-devices",level:2},{value:"Receiving a Transfer",id:"receiving-a-transfer",level:2},{value:"Staking",id:"staking",level:2},{value:"Ledger Developer Release",id:"ledger-developer-release",level:2},{value:"Why you might need the Developer Release",id:"why-you-might-need-the-developer-release",level:3},{value:"Install the Developer Release",id:"install-the-developer-release",level:3}];function h(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(r.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the Polkadot-JS UI, you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,o.jsxs)(n.p,{children:["The ",(0,o.jsx)(n.a,{href:"/docs/ledger",children:"Ledger devices"})," are hardware wallets that keep your private key secured\non a physical device not directly exposed to your computer or the internet."]}),"\n",(0,o.jsxs)(n.p,{children:["The ",(0,o.jsx)(n.a,{href:"/docs/ledger#polkadot-generic-app",children:"Polkadot Generic application"})," allows you to manage\nyour DOT/KSM on Polkadot/Kusama networks, tokens on their Asset Hubs and possibly all chains within\nthe Polkadot ecosystem. It is versatile and capable of handling parachains and relay chains without\nbeing affected by their runtime upgrades."]}),"\n",(0,o.jsx)(n.h2,{id:"loading-your-account",children:"Loading Your Account"}),"\n",(0,o.jsx)(n.admonition,{type:"info",children:(0,o.jsx)(n.p,{children:"Ledger Live should be off while using Ledger with Polkadot-JS UI, as it can interfere with normal\noperation."})}),"\n",(0,o.jsxs)(n.p,{children:["You can import your Ledger account to ",(0,o.jsx)(n.a,{href:"https://polkadot.js.org/extension/",children:"Polkadot Extension"})," or to\nthe ",(0,o.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/explorer",children:"Polkadot-JS UI"}),". For instructions on how to import\nLedger accounts to the Polkadot Extension read through\n",(0,o.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000175387-how-to-add-your-ledger-through-the-polkadot-extension",children:"this support article"}),",\nwhile if you want to import Ledger accounts to the Polkadot-JS UI, you can consult\n",(0,o.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000170812-how-to-add-ledger-account-through-the-polkadot-js-ui",children:"this other article"}),"."]}),"\n",(0,o.jsx)(n.h3,{id:"derivation-paths",children:"Derivation paths"}),"\n",(0,o.jsxs)(n.p,{children:["When adding a Ledger account using the extension or the UI, you will be asked to select an\n",(0,o.jsx)(n.code,{children:"account type"})," and an ",(0,o.jsx)(n.code,{children:"account index"}),". The first lets you select an account, while the second lets\nyou pick a derivation path from that account - think of it like a formula from which child accounts\nare generated. When you are creating a Polkadot ledger account for the first time on Ledger Live\nwith name ",(0,o.jsx)(n.code,{children:"Polkadot 1"}),", this can be added to Polkadot-JS using the 0/0 derivation path (i.e. account\ntype = 0 and account index = 0). If you add a second account called ",(0,o.jsx)(n.code,{children:"Polkadot 2"}),", this will\ncorrespond to the 1/0 derivation path, and so on. We thus have multiple parent accounts that can be\nviewed and used in both Ledger Live and Polkadot-JS. Additionally, we can use Polkadot-JS UI to\ncreate multiple children accounts from each parent account. For example, ",(0,o.jsx)(n.code,{children:"Polkadot 1"})," with 0/0\nderivation path can have child 0/1, 0/2, etc. that can be used within the UI. However, such children\naccounts cannot be used in Ledger Live, as it only scans through the parent accounts. So, remember\nthat the balances on the children accounts cannot be viewed, and you will not be able to transact\nwith those accounts on Ledger Live."]}),"\n",(0,o.jsx)(n.h3,{id:"confirming-the-address-on-your-device",children:"Confirming the Address on your Device"}),"\n",(0,o.jsxs)(n.p,{children:["If your Ledger account is directly imported into the Polkadot-JS UI, you can ask the UI to confirm\nthe address on your Ledger device. There are a few methods to check the balance of your Ledger\naccount. Check out\n",(0,o.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000169332-where-can-i-see-the-balance-of-my-account-",children:"this support article"}),"\nfor information."]}),"\n",(0,o.jsx)(n.h2,{id:"navigating-your-account",children:"Navigating your Account"}),"\n",(0,o.jsxs)(n.p,{children:["Once you have loaded your account on the \u201cAccounts\u201d tab, it should show a row with your Ledger\naccount. Your account\u2019s DOT balance is on the row\u2019s far right. Expanding the balance arrow will show\nyour balance details, such as locks or reserved amounts. For more information about the type of\nbalances, visit the ",(0,o.jsx)(n.a,{href:"/docs/learn-account-balances#balance-types-on-polkadot-js",children:"balances page"}),"."]}),"\n",(0,o.jsx)(n.h2,{id:"sending-a-transfer-with-ledger-devices",children:"Sending a Transfer with Ledger Devices"}),"\n",(0,o.jsx)(n.admonition,{title:"Verifying Extrinsics",type:"danger",children:(0,o.jsxs)(n.p,{children:["Visit the\n",(0,o.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000179161-how-can-i-verify-what-extrinsic-i-m-signing-#Verify-an-extrinsic-using-Ledger",children:(0,o.jsx)(n.strong,{children:"dedicated support page"})}),"\nand see ",(0,o.jsx)(n.a,{href:"https://youtu.be/bxMs-9fBtFk?t=360",children:(0,o.jsx)(n.strong,{children:"this video tutorial"})})," tutorial to learn how to\nverify extrinsics before signing them. The video will also mention potential attacks that can happen\nwhile signing transactions."]})}),"\n",(0,o.jsx)(n.admonition,{title:"Signature error message",type:"info",children:(0,o.jsxs)(n.p,{children:["If you have already connected your device, but an error message appears before signing a\ntransaction, make sure you have opened the Polkadot Ledger Generic application on your Ledger Nano\ndevice. Visit\n",(0,o.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181994",children:"this support page"})," for\nmore information about signing transactions using your ledger."]})}),"\n",(0,o.jsxs)(n.p,{children:["General instructions to send a transfer can be found on\n",(0,o.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000170304-how-to-send-transfer-funds-out-of-your-dot-account-on-the-polkadot-js-ui",children:"this support page"}),".\nTo sign transactions with your Ledger Nano check\n",(0,o.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181994",children:"this support article"})," or\nsee ",(0,o.jsx)(n.a,{href:"https://youtu.be/gbvrHzr4EDY?t=579",children:"this video tutorial"}),"."]}),"\n",(0,o.jsx)(n.h2,{id:"receiving-a-transfer",children:"Receiving a Transfer"}),"\n",(0,o.jsxs)(n.p,{children:["To receive a transfer on the accounts stored on your Ledger device, you must provide the sender\n(i.e., the payer) with your address. To do so, follow the instructions on\n",(0,o.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181866-how-to-receive-dot-to-my-account-on-polkadot-js-ui",children:"this support page"}),"."]}),"\n",(0,o.jsx)(n.admonition,{title:"Sharing your account address",type:"caution",children:(0,o.jsxs)(n.p,{children:["Before giving anyone your address, ensure it matches what's on the Ledger by\n",(0,o.jsx)(n.a,{href:"#confirming-the-address-on-your-device",children:"confirming the address on your device"}),". Some malware will\nintercept clicks and clipboard requests and can change your copied value in-flight, so being extra\nvigilant around copy-paste operations makes sense."]})}),"\n",(0,o.jsx)(n.p,{children:"The easiest way to get your address is to click on the account name. This will open a sidebar\nshowing your address and other information, such as on-chain identity. Another method is just\nclicking on your account's avatar icon - this immediately copies your address to the clipboard."}),"\n",(0,o.jsx)(n.admonition,{title:"Your Asset Hub address is the same as your relay chain address",type:"note",children:(0,o.jsx)(n.p,{children:"Make sure that you clarify to the sender that you wish to receive your tokens on the Asset Hub\nparachain, otherwise (if you're receiving DOT or KSM tokens) they could be sent on the Polkadot or\nKusama relay chain."})}),"\n",(0,o.jsx)(n.h2,{id:"staking",children:"Staking"}),"\n",(0,o.jsxs)(n.p,{children:["For staking using Ledger devices, follow the instructions on\n",(0,o.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000168057-how-do-i-stake-nominate-on-polkadot-",children:"this support article"}),"."]}),"\n",(0,o.jsx)(n.h2,{id:"ledger-developer-release",children:"Ledger Developer Release"}),"\n",(0,o.jsx)(n.admonition,{type:"warning",children:(0,o.jsxs)(n.p,{children:["This section is for developers only. It is recommended to install the application from Ledger Live\nunless you ",(0,o.jsx)(n.em,{children:"know precisely what you're doing"}),"."]})}),"\n",(0,o.jsx)(n.h3,{id:"why-you-might-need-the-developer-release",children:"Why you might need the Developer Release"}),"\n",(0,o.jsxs)(n.p,{children:["Ledger apps for the Polkadot ecosystem are developed by ",(0,o.jsx)(n.a,{href:"https://zondax.ch/",children:"Zondax"}),". When new\nfunctionalities are added to the Ledger apps, they are made available on a developer release for\ntesting purposes. After a successful audit and review, the apps would be available for download and\ninstallation using ",(0,o.jsx)(n.a,{href:"https://www.ledger.com/ledger-live",children:"Ledger Live"}),". As it takes some time for\nLedger to audit and review the release, the app upgrade option may not be available on Ledger Live\nwhen the new runtime is deployed on the network. If this happens, users cannot use Ledger devices to\nsign transactions. Suppose you cannot wait a few days until the app passes the Ledger audit, you can\ninstall the developer release from the shell using the latest version published on\n",(0,o.jsx)(n.a,{href:"https://github.com/Zondax/ledger-polkadot/releases",children:"the Zondax GitHub repository"}),"."]}),"\n",(0,o.jsx)(n.h3,{id:"install-the-developer-release",children:"Install the Developer Release"}),"\n",(0,o.jsxs)(n.admonition,{type:"info",children:[(0,o.jsxs)(n.p,{children:["See ",(0,o.jsx)(n.a,{href:"https://youtu.be/4SyVQrlXZ_Q",children:(0,o.jsx)(n.strong,{children:"this video tutorial"})})," to learn how to install the developer\nrelease of your ledger app."]}),(0,o.jsx)(n.p,{children:"Currently, the developer release can be installed only on the Nano S and S Plus devices and can't be\ninstalled on the Nano X."})]}),"\n",(0,o.jsxs)(n.p,{children:["To install the developer version, make sure you have the latest ",(0,o.jsx)(n.code,{children:"pip"})," version and follow the steps\nbelow:"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:["Install ",(0,o.jsx)(n.em,{children:"ledgerblue"})," running the command ",(0,o.jsx)(n.code,{children:"python3 -m pip install ledgerblue"}),"."]}),"\n",(0,o.jsxs)(n.li,{children:["Download the developer release from the\n",(0,o.jsx)(n.a,{href:"https://github.com/Zondax/ledger-polkadot/releases",children:"Zondax GitHub repository"}),". The file will be\nnamed ",(0,o.jsx)(n.code,{children:"installer_nanos_plus.sh"})," or something similar, depending on your ledger device."]}),"\n",(0,o.jsxs)(n.li,{children:["Locate the downloaded shell script and make it executable in your shell by typing the command\n",(0,o.jsx)(n.code,{children:"chmod +x installer_nanos_plus.sh"}),"."]}),"\n",(0,o.jsxs)(n.li,{children:["You can now use the ",(0,o.jsx)(n.code,{children:"./installer_nanos_plus.sh --help"})," command to visualize the available options\n(see below)"]}),"\n"]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"Dev Ledger Help Menu",src:t(93611).A+"",width:"525",height:"54"})}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:["Attach your Ledger Nano (in this case, Nano S Plus) to your computer, enter the PIN code, and run\nthe command ",(0,o.jsx)(n.code,{children:"./installer_nanos_plus.sh load"}),'. Scroll with the right button until you see "Allow\nunsafe manager", left and right press to confirm. You will be asked to confirm the action of\nuninstalling the app and subsequently installing the newer version. After confirming both actions,\nthe shell script will install the version on your device. You must insert the PIN code to use the\ndevice after the installation.']}),"\n",(0,o.jsx)(n.li,{children:"If you wish to revert the version to the stable release, go to Ledger Live. The app will\nautomatically detect the developer release and give the option to install the previous stable\nrelease."}),"\n"]})]})}function u(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(h,{...e})}):h(e)}},67141:(e,n,t)=>{t.d(n,{A:()=>r});var o=t(96540),s=t(74848);const r=function(e){var n,t=e.message,r=(0,o.useState)(!0),i=r[0],a=r[1];return(0,s.jsx)(s.Fragment,{children:i&&(0,s.jsxs)("div",{className:"message-box",children:[(0,s.jsx)("button",{className:"close-button",onClick:function(){a(!1)},children:"\u2716 "}),(0,s.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(n=t,n.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},93611:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/ledger-help-menu-3af6592c7bc1830644f7ca9d55005cf4.png"},28453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>a});var o=t(96540);const s={},r=o.createContext(s);function i(e){const n=o.useContext(r);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),o.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/b0cb055f.676c1785.js b/assets/js/b0cb055f.676c1785.js new file mode 100644 index 000000000000..227f4c6b1242 --- /dev/null +++ b/assets/js/b0cb055f.676c1785.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9074],{35568:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>i,contentTitle:()=>r,default:()=>m,frontMatter:()=>c,metadata:()=>s,toc:()=>l});const s=JSON.parse('{"id":"learn/xcm/fundamentals/learn-xcm-docs-fundamentals-xcvm","title":"XCVM","description":"Deep Dive into XCVM.","source":"@site/../docs/learn/xcm/fundamentals/xcvm.md","sourceDirName":"learn/xcm/fundamentals","slug":"/learn/xcm/fundamentals-xcvm","permalink":"/docs/learn/xcm/fundamentals-xcvm","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/xcm/fundamentals/xcvm.md","tags":[],"version":"current","lastUpdatedBy":"Radha","lastUpdatedAt":1694074887000,"frontMatter":{"id":"learn-xcm-docs-fundamentals-xcvm","title":"XCVM","sidebar_label":"XCVM","description":"Deep Dive into XCVM.","keywords":["xcm","cross-consensus messaging","xcvm"],"slug":"../fundamentals-xcvm"},"sidebar":"docs","previous":{"title":"MultiAsset","permalink":"/docs/learn/xcm/fundamentals-multiasset"},"next":{"title":"Weight and Fees","permalink":"/docs/learn/xcm/fundamentals-fees"}}');var a=t(74848),o=t(28453);const c={id:"learn-xcm-docs-fundamentals-xcvm",title:"XCVM",sidebar_label:"XCVM",description:"Deep Dive into XCVM.",keywords:["xcm","cross-consensus messaging","xcvm"],slug:"../fundamentals-xcvm"},r="XCVM",i={},l=[{value:"Coming soon",id:"coming-soon",level:2}];function d(e){const n={h1:"h1",h2:"h2",header:"header",p:"p",...(0,o.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.header,{children:(0,a.jsx)(n.h1,{id:"xcvm",children:"XCVM"})}),"\n",(0,a.jsx)(n.p,{children:"We've already seen an overview of the XCVM. In this section, we'll dive deeper into how it works."}),"\n",(0,a.jsx)(n.h2,{id:"coming-soon",children:"Coming soon"}),"\n",(0,a.jsx)(n.p,{children:"This chapter is still being worked on."})]})}function m(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(d,{...e})}):d(e)}},28453:(e,n,t)=>{t.d(n,{R:()=>c,x:()=>r});var s=t(96540);const a={},o=s.createContext(a);function c(e){const n=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:c(e.components),s.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/b0cb055f.88c03b73.js b/assets/js/b0cb055f.88c03b73.js deleted file mode 100644 index f23ab2412fde..000000000000 --- a/assets/js/b0cb055f.88c03b73.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9074],{93490:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>r,contentTitle:()=>c,default:()=>m,frontMatter:()=>o,metadata:()=>i,toc:()=>d});var s=t(74848),a=t(28453);const o={id:"learn-xcm-docs-fundamentals-xcvm",title:"XCVM",sidebar_label:"XCVM",description:"Deep Dive into XCVM.",keywords:["xcm","cross-consensus messaging","xcvm"],slug:"../fundamentals-xcvm"},c="XCVM",i={id:"learn/xcm/fundamentals/learn-xcm-docs-fundamentals-xcvm",title:"XCVM",description:"Deep Dive into XCVM.",source:"@site/../docs/learn/xcm/fundamentals/xcvm.md",sourceDirName:"learn/xcm/fundamentals",slug:"/learn/xcm/fundamentals-xcvm",permalink:"/docs/learn/xcm/fundamentals-xcvm",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/xcm/fundamentals/xcvm.md",tags:[],version:"current",lastUpdatedBy:"Radha",lastUpdatedAt:1694074887e3,frontMatter:{id:"learn-xcm-docs-fundamentals-xcvm",title:"XCVM",sidebar_label:"XCVM",description:"Deep Dive into XCVM.",keywords:["xcm","cross-consensus messaging","xcvm"],slug:"../fundamentals-xcvm"},sidebar:"docs",previous:{title:"MultiAsset",permalink:"/docs/learn/xcm/fundamentals-multiasset"},next:{title:"Weight and Fees",permalink:"/docs/learn/xcm/fundamentals-fees"}},r={},d=[{value:"Coming soon",id:"coming-soon",level:2}];function l(e){const n={h1:"h1",h2:"h2",header:"header",p:"p",...(0,a.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"xcvm",children:"XCVM"})}),"\n",(0,s.jsx)(n.p,{children:"We've already seen an overview of the XCVM. In this section, we'll dive deeper into how it works."}),"\n",(0,s.jsx)(n.h2,{id:"coming-soon",children:"Coming soon"}),"\n",(0,s.jsx)(n.p,{children:"This chapter is still being worked on."})]})}function m(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},28453:(e,n,t)=>{t.d(n,{R:()=>c,x:()=>i});var s=t(96540);const a={},o=s.createContext(a);function c(e){const n=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:c(e.components),s.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/b0cbc1d4.22128d93.js b/assets/js/b0cbc1d4.22128d93.js deleted file mode 100644 index fd3e9e652754..000000000000 --- a/assets/js/b0cbc1d4.22128d93.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk=self.webpackChunk||[]).push([[7826],{2662:(e,n,o)=>{"use strict";o.r(n),o.d(n,{assets:()=>l,contentTitle:()=>i,default:()=>c,frontMatter:()=>s,metadata:()=>r,toc:()=>d});var t=o(74848),a=o(28453);o(47379);const s={id:"staking-dashboard",title:"Polkadot Staking Dashboard",sidebar_label:"Staking Dashboard",description:"Everything about the Polkadot Staking Dashboard.",keywords:["ledger","staking","polkadot","dashboard"],slug:"../staking-dashboard"},i=void 0,r={id:"general/staking-dashboard",title:"Polkadot Staking Dashboard",description:"Everything about the Polkadot Staking Dashboard.",source:"@site/../docs/general/staking-dashboard.md",sourceDirName:"general",slug:"/staking-dashboard",permalink:"/docs/staking-dashboard",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/staking-dashboard.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1726729579e3,frontMatter:{id:"staking-dashboard",title:"Polkadot Staking Dashboard",sidebar_label:"Staking Dashboard",description:"Everything about the Polkadot Staking Dashboard.",keywords:["ledger","staking","polkadot","dashboard"],slug:"../staking-dashboard"},sidebar:"docs",previous:{title:"Parity Data Dashboards",permalink:"/docs/parity-data-dashboards"},next:{title:"Community & Contributors",permalink:"/docs/community-index"}},l={},d=[{value:"Preliminary Notes",id:"preliminary-notes",level:2},{value:"Using the Polkadot Staking Dashboard",id:"using-the-polkadot-staking-dashboard",level:2},{value:"Overview",id:"overview",level:2},{value:"Stake",id:"stake",level:2},{value:"Pools",id:"pools",level:3},{value:"Nominate",id:"nominate",level:3},{value:"Payouts",id:"payouts",level:3},{value:"After Staking",id:"after-staking",level:3},{value:"Validators",id:"validators",level:2},{value:"Support",id:"support",level:2},{value:"Network",id:"network",level:2}];function h(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",strong:"strong",ul:"ul",...(0,a.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h2,{id:"preliminary-notes",children:"Preliminary Notes"}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.a,{href:"https://staking.polkadot.cloud/#/overview",children:"Polkadot Staking Dashboard"})," supports\n",(0,t.jsx)(n.a,{href:"/docs/learn-proxies",children:(0,t.jsx)(n.strong,{children:"proxy accounts"})})," and you can import your\n",(0,t.jsx)(n.a,{href:"/docs/learn-staking-advanced#staking-proxies",children:"staking proxy"})," (for nominators) or\n",(0,t.jsx)(n.a,{href:"/docs/learn-proxies#non-transfer-proxy",children:"non-transfer proxy"})," (for nomination pool admins and\nmembers)."]}),"\n",(0,t.jsxs)(n.p,{children:["The dashboard also has ",(0,t.jsxs)(n.strong,{children:["native ",(0,t.jsx)(n.a,{href:"/docs/ledger",children:"Ledger"})," support"]}),", meaning that you do not need an\nextension or a wallet to use it; you just need your Ledger device.\n",(0,t.jsx)(n.a,{href:"/docs/learn-guides-accounts#metadata-updates-with-the-polkadot-js-browser-extension",children:"Metadata updates"}),"\nare thus not necessary, as you only need to keep your Ledger apps up-to-date."]}),"\n",(0,t.jsxs)(n.p,{children:["Before using the dashboard, make sure you have a\n",(0,t.jsx)(n.a,{href:"/docs/wallets-and-extensions#browser-extensions",children:"wallet or extension"})," with a funded account. Note\nthat accounts on wallets or extensions can be imported from ",(0,t.jsx)(n.a,{href:"/docs/ledger",children:"Ledger"})," or\n",(0,t.jsx)(n.a,{href:"/docs/polkadot-vault",children:"Polkadot Vault"}),"."]}),"\n",(0,t.jsxs)(n.p,{children:["On top of the ",(0,t.jsx)(n.a,{href:"/docs/learn-accounts#existential-deposit-and-reaping",children:"existential deposit"}),", you\nneed some free balance to pay for\n",(0,t.jsx)(n.a,{href:"/docs/learn-transactions#transaction-fees",children:"transaction fees"})," and\n",(0,t.jsx)(n.a,{href:"/docs/chain-state-values#minimum-bond-to-participate-in-staking",children:"the minimum amount to place your nominations or join a nomination pool"}),".\nFor more information about staking visit the ",(0,t.jsx)(n.a,{href:"/docs/learn-staking",children:"staking page"})," and the\n",(0,t.jsx)(n.a,{href:"/docs/learn-staking-advanced",children:"advanced staking page"}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"using-the-polkadot-staking-dashboard",children:"Using the Polkadot Staking Dashboard"}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.a,{href:"https://staking.polkadot.cloud/#/overview",children:"Polkadot Staking Dashboard"})," is a tool only dedicated\nto ",(0,t.jsx)(n.a,{href:"/docs/learn-staking",children:"staking"})," on Polkadot, ",(0,t.jsx)(n.a,{href:"/docs/learn-comparisons-kusama",children:"Kusama"}),"\n(Polkadot's canary network) and ",(0,t.jsx)(n.a,{href:"/docs/maintain-networks#westend-test-network",children:"Westend"}),"\n(Polkadot's test network)."]}),"\n",(0,t.jsxs)(n.p,{children:["The dashboard is not a wallet, meaning that you cannot transfer funds between accounts. To fund\naccounts, you can use ",(0,t.jsx)(n.a,{href:"/docs/wallets-and-extensions",children:"wallets and extension"}),". You can participate in\nstaking by being a ",(0,t.jsx)(n.a,{href:"/docs/learn-nominator",children:"nominator"})," or a member of a\n",(0,t.jsx)(n.a,{href:"/docs/learn-nomination-pools",children:"nomination pool"}),". Once you have a funded account, you need to\nconnect it to the dashboard (connect button on the top-right corner), this will allow you to\ninteract with native staking."]}),"\n",(0,t.jsx)(n.admonition,{title:"The dashboard is a Web3 dApp",type:"info",children:(0,t.jsxs)(n.p,{children:["The dashboard is a decentralized application (dApp), and to login you do not need to sign up with an\nemail and password but just need an account created on the supported non-custodial wallets. Any\ntransaction to be submitted needs to be signed by you. Also, if you use light clients, which are\nresistant to censorship, you interact trustlessly with the network without intermediaries. Welcome\nto the world of ",(0,t.jsx)(n.a,{href:"/docs/web3-and-polkadot",children:"true Web3"}),"!"]})}),"\n",(0,t.jsx)(n.p,{children:"Note the pictures on this page refer to Kusama, but the same applies to Polkadot and Westend."}),"\n",(0,t.jsxs)(n.p,{children:["The structure of this page follows the sidebar of the staking dashboard. Here you will learn about\nthe main features of the dashboard. If you need more information, see the\n",(0,t.jsx)(n.a,{href:"https://youtu.be/hvXLc4H7rA4",children:"Walkthrough Tutorial"}),"."]}),"\n",(0,t.jsx)(n.admonition,{title:"Walk-through Video Tutorials",type:"info",children:(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"https://youtu.be/F59N3YKYCRs",children:(0,t.jsx)(n.strong,{children:"Nominating"})}),": Stake your tokens, choose your best validators,\nand start your staking journey."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"https://youtu.be/dDIG7QAApig",children:(0,t.jsx)(n.strong,{children:"Becoming a Pool Member"})}),": Start becoming a part of the Polkadot\nmovement, keep the network secure by staking minimum 1 DOT and receiving staking rewards."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"https://youtu.be/hvXLc4H7rA4",children:(0,t.jsx)(n.strong,{children:"Dashboard Walkthrough"})}),": Become a Pro using the Staking\nDashboard."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"https://youtu.be/58pIe8tt2o4",children:(0,t.jsx)(n.strong,{children:"After Staking"})}),": Nominating is not a set-and-forget action,\nlearn what you can do with the dashboard after you started staking."]}),"\n"]})}),"\n",(0,t.jsx)(n.h2,{id:"overview",children:"Overview"}),"\n",(0,t.jsx)(n.admonition,{title:"Staking Dashboard Walk-through video tutorial",type:"info",children:(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.a,{href:"https://youtu.be/hvXLc4H7rA4",children:"This video tutorial"})," shows you everything you can do with the Staking\nDashboard."]})}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"dashboard overview",src:o(71208).A+"",width:"1920",height:"1080"})}),"\n",(0,t.jsx)(n.p,{children:"This page of the dashboard has six main panels:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Section A: The Sidebar"})," shows which page you are on (in this case, the Overview). It will also\nshow the role you currently have in staking (in this case, active in both ",(0,t.jsx)(n.a,{href:"#pools",children:"Pools"})," and\n",(0,t.jsx)(n.a,{href:"#nominate",children:"Nominate"}),"). You can also change the ",(0,t.jsx)(n.a,{href:"#network",children:"network"})," (currently on Kusama)."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Section B: The Accounts Panel"})," allows you to connect one account to the dashboard. Once\nconnected, the account will appear next to the ",(0,t.jsx)(n.code,{children:"Accounts"})," button. You can see it here if you are\nactive as a nominator and/or a pool member. In this case, the account KSM Stash is a nominator and\na member of the pool Insight Finance. Proxy accounts are also shown here if applicable. Note that\nthe dashboard will automatically fetch the stash and the proxy."]}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"Note that Sections A and B will always be visible while you use the dashboard."}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Section C: The Stats Panel"})," shows the general view of current staking metrics, including the\nhistorical reward rate (including after\n",(0,t.jsx)(n.a,{href:"/docs/learn-staking-advanced#inflation",children:"inflation"}),"), the supply staked and time remaining\nin the current era."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Section D: The Summary Panel"})," shows your current situation and gives you general tips about\nstaking. In this case, the KSM Stash account is a nominator and a pool member, and by clicking on\n",(0,t.jsx)(n.code,{children:"Manage >"})," you can go directly to the ",(0,t.jsx)(n.a,{href:"#nominate",children:"Nominate"})," and ",(0,t.jsx)(n.a,{href:"#pools",children:"Pools"})," pages,\nrespectively. You can take actions such as changing staking preferences, bonding more funds, etc."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Section E: The Balance Panel"}),' shows the bonded amount distinguishing between "Nominating", "In\na Pool", and "Not Staking". The amount that is not staking is further divided into "Free" (a\nbalance that can be transferred) and "Reserve" (a balance that is needed the keep the account\non-chain, see ',(0,t.jsx)(n.a,{href:"/docs/learn-accounts#existential-deposit-and-reaping",children:"existential deposit"}),").\nIn this case, 0.301 KSM are bonded for nominating, 0.3 KSM are bonded in a pool, and 0.145 KSM are\nnot used for staking. Of the non-staking balance, 0.144 KSM are free while\n",(0,t.jsx)(n.a,{href:"/docs/chain-state-values#existential-deposit",children:"a small portion is reserved for the existential deposit"}),"."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Section F: The Recent Payouts Panel"})," shows a bar chart with the rewards paid out to you in the\npast 15 days either as a nominator or a pool member (manually claimed). Note how the 4th of April\nbar has the tip that is not filled with color. This is to show a pending payout (for nominators\nonly). Below the bar chart is a line chart showing the 10-day moving average."]}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"Additional statistics can be found at the bottom of the overview page."}),"\n",(0,t.jsx)(n.admonition,{title:"Pool funds are in system accounts",type:"info",children:(0,t.jsx)(n.p,{children:"Remember that funds bonded in a pool are transferred to the pool's system account, which can only be\naccessed by the protocol, and not by any individual user. Some wallets might not display the balance\nbonded in pools, but the dashboard will always show it."})}),"\n",(0,t.jsx)(n.h2,{id:"stake",children:"Stake"}),"\n",(0,t.jsx)(n.p,{children:"In this category, you can access all functionalities allowing you to stake your tokens as a\nnominator, member of a nomination pool, or both. The payout section will enable you to inspect the\nmost recently received rewards."}),"\n",(0,t.jsx)(n.h3,{id:"pools",children:"Pools"}),"\n",(0,t.jsx)(n.admonition,{title:"Joining a Nomination Pool - Walk-through video tutorial",type:"info",children:(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.a,{href:"https://youtu.be/dDIG7QAApig",children:"This video tutorial"})," shows you how to join a\n",(0,t.jsx)(n.a,{href:"/docs/learn-nomination-pools",children:"nomination pool"})," with the Staking Dashboard. You can also read\nthe\n",(0,t.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000182376-staking-dashboard-how-to-join-a-nomination-pool",children:"dedicated support article"}),"\nabout joining a pool."]})}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"dashboard pools",src:o(90656).A+"",width:"1920",height:"1080"})}),"\n",(0,t.jsx)(n.p,{children:"This page of the dashboard has four main panels (Sidebar and Accounts Panels excluded):"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Section A: The Stats Panel"})," shows the number of active pools and the minimum number of tokens\nneeded to join a pool and/or create one."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Section B: The Balance Panel"})," shows the number of tokens bonded in pools and those that are\nfree. In this case, we have 0.3 KSM bonded and 0.144 KSM free. In this panel, you can bond more\nfunds (",(0,t.jsx)(n.code,{children:"+"})," button) or unbond some funds (",(0,t.jsx)(n.code,{children:"-"})," button). Unbonding will withdraw unclaimed rewards\nand funds will be locked for the ",(0,t.jsx)(n.a,{href:"/docs/chain-state-values#unbonding-duration",children:"unbonding period"}),".\nOnce the unbonding period has passed, you can unlock the locked funds (button with a lock icon)\nthat will be available as a free balance."]}),"\n"]}),"\n",(0,t.jsx)(n.admonition,{title:"No fast unstake and pool swap for pool members",type:"info",children:(0,t.jsx)(n.p,{children:"Note that the option to fast unstake is only available to nominators. Also, to change pool, you\ncannot simply swap memberships. You will need to unbond and go through the whole unbonding period."})}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Section C: The Pool Panel"})," shows the pool id where you have membership (in this case, Pool 82),\nthe pool name, and next to it, a ",(0,t.jsx)(n.code,{children:"Manage"})," button that will allow to choose between different\noptions:"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["Update Claim Permissions: you can allow other pool members to compound your rewards, withdraw\nyour rewards as a free balance, or both. More details about nomination pools and updating claim\npermissions can be found on the\n",(0,t.jsx)(n.a,{href:"/docs/learn-nomination-pools#claim-permissions",children:"dedicated wiki page"}),"."]}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"dashboard-permissionlessPoolClaims",src:o(85778).A+"",width:"651",height:"272"})}),"\n",(0,t.jsx)(n.admonition,{type:"info",children:(0,t.jsxs)(n.p,{children:["For more information about how-to update your claim permissions with the staking dashboard see\n",(0,t.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000182399-staking-dashboard-how-to-claim-nomination-pool-rewards#Permissionless-claiming",children:"this support article"}),"."]})}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Leave the pool and unbond all the funds in the pool."}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"If you are a pool admin you will be able to see the additional options:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Claim Commission: you can claim pool commissions to an account specified under Manage Commission\n(below)."}),"\n",(0,t.jsxs)(n.li,{children:["Manage Commission: you can manage the pool commission rate, maximum commission, maximum change\nrate, and minimum time delay between commission updates. More details about nomination pools and\nmanaging pool commissions can be found on the\n",(0,t.jsx)(n.a,{href:"/docs/learn-nomination-pools#pool-commissions",children:"dedicated wiki page"}),"."]}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"dashboard-manage-commission",src:o(93389).A+"",width:"650",height:"645"})}),"\n",(0,t.jsx)(n.admonition,{type:"info",children:(0,t.jsxs)(n.p,{children:["For more information about how-to manage commission of your nomination pool with the staking\ndashboard see\n",(0,t.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000182388-staking-dashboard-how-to-create-a-nomination-pool#Pool-management-options",children:"this support article"}),"."]})}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Rename Pool: you can change the pool's name."}),"\n",(0,t.jsx)(n.li,{children:"Lock Pool: you can lock the pool so that new members are not allowed."}),"\n",(0,t.jsxs)(n.li,{children:["Destroy Pool: you can destroy the pool. See\n",(0,t.jsx)(n.a,{href:"/docs/learn-guides-staking-pools#pool-destruction",children:"this wiki page"})," and\n",(0,t.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000182388-staking-dashboard-how-to-create-a-nomination-pool#How-to-destroy-a-pool",children:"this support article"}),"\nfor more information."]}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["You can see any unclaimed rewards in the middle of the panel. You can claim and bond the rewards\n(",(0,t.jsx)(n.code,{children:"+ Compound"})," button) or withdraw them as a free balance (",(0,t.jsx)(n.code,{children:"Withdraw"}),' button). In this case, there\nare approximately 0.0012 KSM that can be claimed. You can see the Pool Status at the bottom of the\npanel, currently set to "Nominating and Earning Rewards".']}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["Note that if it is the first time you log in to the dashboard, you will see two\nbuttons\xa0",(0,t.jsx)(n.code,{children:"Create"}),"\xa0and\xa0",(0,t.jsx)(n.code,{children:"Join"}),", instead of ",(0,t.jsx)(n.code,{children:"Manage"}),". For more information about how to create a\nnomination pool, see\n",(0,t.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000182388-staking-dashboard-how-to-create-a-nomination-pool#How-to-create-a-pool",children:"this support article"}),"."]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Section D: The Pool Nominations Panel"})," shows the nominations of the pool you are currently in,\nhighlighting the validator that is active and will pay rewards to the pool at the end of the era\n(in this case ",(0,t.jsx)(n.code,{children:"ParaNodes.io/11"}),")."]}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"If you scroll down the page, there are two additional panels:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Roles"})," showing the accounts of the pool's Depositor, Root, Nominator, and Bouncer. The same\naccount can cover all the roles."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Pool Stats"})," showing the Pool State (either Active, Closed, or Destroying), Pool Members (number\nof members in the pool), and Total Bonded (total number of bonded tokens)."]}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"The Pools page is divided into four parts: the Overview is basically what we talked about until now,\nthe Members section will show all accounts of the pool members, the All Pools section will show all\npools (you can filter Active, Locked, and Destroying pools), and the Favorites section shows all\npools that you liked (you can like a pool in the All Pools section by clicking on the heart icons)."}),"\n",(0,t.jsx)(n.h3,{id:"nominate",children:"Nominate"}),"\n",(0,t.jsx)(n.admonition,{title:"Walk-through video tutorial of How to Nominate",type:"info",children:(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.a,{href:"https://youtu.be/F59N3YKYCRs",children:"This video tutorial"})," shows you how to become a nominator with the\nStaking Dashboard."]})}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"dashboard nominate",src:o(6568).A+"",width:"1920",height:"1080"})}),"\n",(0,t.jsx)(n.p,{children:"This page of the dashboard has four main panels (Sidebar and Accounts Panels excluded):"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Section A: The Stats Panel"})," shows the number of active nominators,\n",(0,t.jsx)(n.a,{href:"/docs/chain-state-values#minimum-bond-to-participate-in-staking",children:"the minimum number of tokens to nominate"}),"\nand ",(0,t.jsx)(n.a,{href:"/docs/chain-state-values#minimum-active-bond",children:"the minimum active bond"}),". The system keeps 12500\nnomination intents and puts them into the\n",(0,t.jsx)(n.a,{href:"/docs/learn-staking-advanced#bags-list",children:"bags list"}),". The fact that active nominators are not\n12500 is because there are nominators that have no active validator."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Section B: The Balance Panel"})," shows the number of tokens bonded in nominations and those that\nare free. In this case, we have 0.301 KSM bonded and 0.144 KSM free. In this panel, you can bond\nmore funds (",(0,t.jsx)(n.code,{children:"+"})," button) or unbond some funds (",(0,t.jsx)(n.code,{children:"-"})," button). Unbonding will withdraw unclaimed\nrewards and funds will be locked for the\n",(0,t.jsx)(n.a,{href:"/docs/chain-state-values#unbonding-duration",children:"unbonding period"}),". Once the unbonding period has\npassed, you can unlock the locked funds (button with a lock icon) that will be available as a free\nbalance."]}),"\n"]}),"\n",(0,t.jsx)(n.admonition,{title:"Fast unstake",type:"info",children:(0,t.jsx)(n.p,{children:"If your account did not receive rewards in the past 28 eras, you will be eligible for fast unstake.\nThe dashboard will automatically check this for you and prompt a banner."})}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Section C: The Nominator Panel"}),' shows the current status of the nominator, currently set to\n"Nominating and Earning Rewards", and next to it, the ',(0,t.jsx)(n.code,{children:"Unstake"}),' button allows you to unstake the\nwhole bonded amount and stop nominating. In the middle of the panel, the payout destination is\ncurrently set to "Compounding" (i.e. rewards are added to the bonded funds). The ',(0,t.jsx)(n.code,{children:"Update"}),' button\nwill allow you to change the destination to "To Your Account" (to the stash account as a free\nbalance), "To Another Account" (an account that is not the stash), or "None" (no payout\ndestination).']}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Section D: The Nominations panel"})," shows your nominations and allows you to stop all nomination\nwith the ",(0,t.jsx)(n.code,{children:"Stop"})," button or to select specific validators (",(0,t.jsx)(n.code,{children:"Select"})," button) and stop nominating only\nthose."]}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"payouts",children:"Payouts"}),"\n",(0,t.jsxs)(n.p,{children:["This page is an expanded version of Panel F on the ",(0,t.jsx)(n.a,{href:"#overview",children:"Overview"})," page. It also shows all\nvalidators and/or nomination pools that paid out rewards to your accounts in the past few months."]}),"\n",(0,t.jsx)(n.h3,{id:"after-staking",children:"After Staking"}),"\n",(0,t.jsx)(n.admonition,{title:"Walk-through video tutorial - What to do after Staking",type:"info",children:(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.a,{href:"https://youtu.be/F59N3YKYCRs",children:"This video tutorial"})," shows you how to what you can do after staking\nwith the Staking Dashboard."]})}),"\n",(0,t.jsx)(n.h2,{id:"validators",children:"Validators"}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"dashboard nominate",src:o(84544).A+"",width:"1920",height:"1080"})}),"\n",(0,t.jsx)(n.p,{children:"This page of the dashboard has two main panels (Sidebar and Accounts Panels excluded):"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Panel A: The Stats Panel"})," shows the total number of active validators, all validators currently\nregistered (active and inactive), and average commission across all validators."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Panel B: The Validators Panel"})," shows all validators. You can order them by low/high commission\nor apply the following filters:","\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Include only active validators"}),"\n",(0,t.jsx)(n.li,{children:"Exclude validators that have 100% commission, blocked nominations, and have missing identity."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"support",children:"Support"}),"\n",(0,t.jsxs)(n.p,{children:["Support for the Staking Dashboard is available at\n",(0,t.jsx)(n.a,{href:"https://support.polkadot.network/support/home",children:"the official Polkadot support website"}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"network",children:"Network"}),"\n",(0,t.jsxs)(n.p,{children:["Under Network, you can connect to either Polkadot, Kusama, or Westend through public RPC nodes or\nlight clients for a true Web3 experience. For more information about light clients, see\n",(0,t.jsx)(n.a,{href:"/docs/build-light-clients#replacing-rpc-node-reliance-with-light-clients",children:"this page"}),"."]})]})}function c(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(h,{...e})}):h(e)}},47379:(e,n,o)=>{"use strict";o.d(n,{A:()=>u});var t=o(90675),a=o(10467),s=o(96540),i=o(19588),r=o(2026),l=o(11135);function d(e,n,o){return h.apply(this,arguments)}function h(){return(h=(0,a.A)((0,t.A)().mark((function e(n,o,a){var s,l,d,h,c;return(0,t.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s=void 0,l=void 0,e.t0=n,e.next="polkadot"===e.t0?5:"kusama"===e.t0?7:"statemine"===e.t0?9:"statemint"===e.t0?11:"polkadotpeople"===e.t0?13:"kusamapeople"===e.t0?15:17;break;case 5:return s="wss://rpc.polkadot.io",e.abrupt("break",18);case 7:return s="wss://kusama-rpc.polkadot.io/",e.abrupt("break",18);case 9:return s="wss://statemine-rpc.polkadot.io/",e.abrupt("break",18);case 11:return s="wss://statemint-rpc.polkadot.io/",e.abrupt("break",18);case 13:return s="wss://polkadot-people-rpc.polkadot.io/",e.abrupt("break",18);case 15:return s="wss://kusama-people-rpc.polkadot.io/",e.abrupt("break",18);case 17:console.log("Unknown socket url provided, no connection made.");case 18:if(void 0!==s){e.next=22;break}return e.abrupt("return");case 22:return d=new i.E(s),e.next=25,r.G.create({provider:d});case 25:h=e.sent,(c=o.split(".")).forEach((function(e){e in h&&(h=h[e])})),e.t1=c[0],e.next="consts"===e.t1?31:"query"===e.t1?33:38;break;case 31:return l=h.toString(),e.abrupt("break",39);case 33:return e.next=35,h();case 35:return l=(l=e.sent).toString(),e.abrupt("break",39);case 38:console.log("Unknown path prefix ("+c[0]+") in "+o);case 39:return e.abrupt("return",l);case 40:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function c(e,n,o,t){switch(n){case"humanReadable":(0,l.HumanReadable)(e,o,t);break;case"precise":(0,l.Precise)(e,o,t);break;case"blocksToDays":(0,l.BlocksToDays)(e,t);break;case"erasToDays":(0,l.ErasToDays)(e,t,o);break;case"percentage":(0,l.Percentage)(e,t);break;case"permillToPercent":(0,l.PermillToPercent)(e,t);break;case"arrayLength":(0,l.ArrayLength)(e,t);break;default:return void console.log("Ignoring unknown filter type")}}const u=function(e){var n=e.network,o=e.path,i=e.defaultValue,r=e.filter,l=void 0===r?void 0:r,h=(0,s.useState)(""),u=h[0],p=h[1];return n=n.toLowerCase(),(0,s.useEffect)((function(){void 0!==l?c(i.toString(),l,n,p):p(i.toString());var e=void 0;switch(n){case"polkadot":e="wss://rpc.polkadot.io";break;case"kusama":e="wss://kusama-rpc.polkadot.io/";break;case"statemine":e="wss://kusama-asset-hub-rpc.polkadot.io/";break;case"statemint":e="wss://polkadot-asset-hub-rpc.polkadot.io/";break;case"kusamapeople":e="wss://kusama-people-rpc.polkadot.io";break;case"polkadotpeople":e="wss://polkadot-people-rpc.polkadot.io";break;default:console.log("Unknown network provided, "+n)}if(void 0===e)console.log("Failed to connect to a valid websocket, applying default");else{var s=function(){var e=(0,a.A)((0,t.A)().mark((function e(){var a;return(0,t.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,d(n,o,p);case 2:if(void 0!==(a=e.sent)){e.next=7;break}return e.abrupt("return");case 7:void 0!==l?c(a,l,n,p):p(a);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();try{s()}catch(r){console.log(r)}}}),[]),u}},11135:e=>{var n="polkadot",o="kusama",t="statemine",a="statemint",s="polkadotpeople",i="kusamapeople",r={polkadot:{precision:1e10,symbol:"DOT"},kusama:{precision:1e12,symbol:"KSM"},statemint:{precision:1e10,symbol:"DOT"},statemine:{precision:1e12,symbol:"KSM"},polkadotpeople:{precision:1e10,symbol:"DOT"},kusamapeople:{precision:1e12,symbol:"KSM"}};e.exports={HumanReadable:function(e,l,d){var h=void 0;if(l===n||l===a)h=3;else if(l===o||l===t||l===s)h=6;else{if(l!=i)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");h=8}e=parseFloat(e),d((e=Number.isInteger(e/r[l].precision)?e/r[l].precision+" "+r[l].symbol:(e/r[l].precision).toFixed(h)+" "+r[l].symbol).toString())},Precise:function(e,n,o){o(e=(e=parseFloat(e))/r[n].precision+" "+r[n].symbol)},BlocksToDays:function(e,n){n((e=6*e/86400).toString())},ErasToDays:function(e,r,l){var d=void 0;if(l===n||l===a||l==s)d=1;else{if(l!==o&&l!==t&&l!=i)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");d=4}r((e/=d).toString())},Percentage:function(e,n){n((e/=1e7).toString())},PermillToPercent:function(e,n){n((e/=1e4).toString())},ArrayLength:function(e,n){n((e=e.split(",").length).toString())}}},93389:(e,n,o)=>{"use strict";o.d(n,{A:()=>t});const t=o.p+"assets/images/dashboard-managePoolCommission-46842e2d0927915c031faf72cb3e266a.png"},6568:(e,n,o)=>{"use strict";o.d(n,{A:()=>t});const t=o.p+"assets/images/dashboard-nominate-7b882e41a42abeb928b78a6d6db4a6f0.png"},71208:(e,n,o)=>{"use strict";o.d(n,{A:()=>t});const t=o.p+"assets/images/dashboard-overview-755861fe5937455f21a9360334fc26ea.png"},85778:(e,n,o)=>{"use strict";o.d(n,{A:()=>t});const t=o.p+"assets/images/dashboard-permissionlessPoolClaims-20c461799ea9447fff83f2d2bd41b4f9.png"},90656:(e,n,o)=>{"use strict";o.d(n,{A:()=>t});const t=o.p+"assets/images/dashboard-pools-b7327a1bbe115970fe683b0350c7bb6e.png"},84544:(e,n,o)=>{"use strict";o.d(n,{A:()=>t});const t=o.p+"assets/images/dashboard-validators-a90166e01dcd1072c9a3be81a439afbb.png"},47790:()=>{}}]); \ No newline at end of file diff --git a/assets/js/b0cbc1d4.d8ff7f95.js b/assets/js/b0cbc1d4.d8ff7f95.js new file mode 100644 index 000000000000..2b7ae77560c6 --- /dev/null +++ b/assets/js/b0cbc1d4.d8ff7f95.js @@ -0,0 +1 @@ +(self.webpackChunk=self.webpackChunk||[]).push([[7826],{86106:(e,n,o)=>{"use strict";o.r(n),o.d(n,{assets:()=>l,contentTitle:()=>r,default:()=>c,frontMatter:()=>i,metadata:()=>t,toc:()=>d});const t=JSON.parse('{"id":"general/staking-dashboard","title":"Polkadot Staking Dashboard","description":"Everything about the Polkadot Staking Dashboard.","source":"@site/../docs/general/staking-dashboard.md","sourceDirName":"general","slug":"/staking-dashboard","permalink":"/docs/staking-dashboard","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/staking-dashboard.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1726729579000,"frontMatter":{"id":"staking-dashboard","title":"Polkadot Staking Dashboard","sidebar_label":"Staking Dashboard","description":"Everything about the Polkadot Staking Dashboard.","keywords":["ledger","staking","polkadot","dashboard"],"slug":"../staking-dashboard"},"sidebar":"docs","previous":{"title":"Parity Data Dashboards","permalink":"/docs/parity-data-dashboards"},"next":{"title":"Community & Contributors","permalink":"/docs/community-index"}}');var a=o(74848),s=o(28453);o(47379);const i={id:"staking-dashboard",title:"Polkadot Staking Dashboard",sidebar_label:"Staking Dashboard",description:"Everything about the Polkadot Staking Dashboard.",keywords:["ledger","staking","polkadot","dashboard"],slug:"../staking-dashboard"},r=void 0,l={},d=[{value:"Preliminary Notes",id:"preliminary-notes",level:2},{value:"Using the Polkadot Staking Dashboard",id:"using-the-polkadot-staking-dashboard",level:2},{value:"Overview",id:"overview",level:2},{value:"Stake",id:"stake",level:2},{value:"Pools",id:"pools",level:3},{value:"Nominate",id:"nominate",level:3},{value:"Payouts",id:"payouts",level:3},{value:"After Staking",id:"after-staking",level:3},{value:"Validators",id:"validators",level:2},{value:"Support",id:"support",level:2},{value:"Network",id:"network",level:2}];function h(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.h2,{id:"preliminary-notes",children:"Preliminary Notes"}),"\n",(0,a.jsxs)(n.p,{children:["The ",(0,a.jsx)(n.a,{href:"https://staking.polkadot.cloud/#/overview",children:"Polkadot Staking Dashboard"})," supports\n",(0,a.jsx)(n.a,{href:"/docs/learn-proxies",children:(0,a.jsx)(n.strong,{children:"proxy accounts"})})," and you can import your\n",(0,a.jsx)(n.a,{href:"/docs/learn-staking-advanced#staking-proxies",children:"staking proxy"})," (for nominators) or\n",(0,a.jsx)(n.a,{href:"/docs/learn-proxies#non-transfer-proxy",children:"non-transfer proxy"})," (for nomination pool admins and\nmembers)."]}),"\n",(0,a.jsxs)(n.p,{children:["The dashboard also has ",(0,a.jsxs)(n.strong,{children:["native ",(0,a.jsx)(n.a,{href:"/docs/ledger",children:"Ledger"})," support"]}),", meaning that you do not need an\nextension or a wallet to use it; you just need your Ledger device.\n",(0,a.jsx)(n.a,{href:"/docs/learn-guides-accounts#metadata-updates-with-the-polkadot-js-browser-extension",children:"Metadata updates"}),"\nare thus not necessary, as you only need to keep your Ledger apps up-to-date."]}),"\n",(0,a.jsxs)(n.p,{children:["Before using the dashboard, make sure you have a\n",(0,a.jsx)(n.a,{href:"/docs/wallets-and-extensions#browser-extensions",children:"wallet or extension"})," with a funded account. Note\nthat accounts on wallets or extensions can be imported from ",(0,a.jsx)(n.a,{href:"/docs/ledger",children:"Ledger"})," or\n",(0,a.jsx)(n.a,{href:"/docs/polkadot-vault",children:"Polkadot Vault"}),"."]}),"\n",(0,a.jsxs)(n.p,{children:["On top of the ",(0,a.jsx)(n.a,{href:"/docs/learn-accounts#existential-deposit-and-reaping",children:"existential deposit"}),", you\nneed some free balance to pay for\n",(0,a.jsx)(n.a,{href:"/docs/learn-transactions#transaction-fees",children:"transaction fees"})," and\n",(0,a.jsx)(n.a,{href:"/docs/chain-state-values#minimum-bond-to-participate-in-staking",children:"the minimum amount to place your nominations or join a nomination pool"}),".\nFor more information about staking visit the ",(0,a.jsx)(n.a,{href:"/docs/learn-staking",children:"staking page"})," and the\n",(0,a.jsx)(n.a,{href:"/docs/learn-staking-advanced",children:"advanced staking page"}),"."]}),"\n",(0,a.jsx)(n.h2,{id:"using-the-polkadot-staking-dashboard",children:"Using the Polkadot Staking Dashboard"}),"\n",(0,a.jsxs)(n.p,{children:["The ",(0,a.jsx)(n.a,{href:"https://staking.polkadot.cloud/#/overview",children:"Polkadot Staking Dashboard"})," is a tool only dedicated\nto ",(0,a.jsx)(n.a,{href:"/docs/learn-staking",children:"staking"})," on Polkadot, ",(0,a.jsx)(n.a,{href:"/docs/learn-comparisons-kusama",children:"Kusama"}),"\n(Polkadot's canary network) and ",(0,a.jsx)(n.a,{href:"/docs/maintain-networks#westend-test-network",children:"Westend"}),"\n(Polkadot's test network)."]}),"\n",(0,a.jsxs)(n.p,{children:["The dashboard is not a wallet, meaning that you cannot transfer funds between accounts. To fund\naccounts, you can use ",(0,a.jsx)(n.a,{href:"/docs/wallets-and-extensions",children:"wallets and extension"}),". You can participate in\nstaking by being a ",(0,a.jsx)(n.a,{href:"/docs/learn-nominator",children:"nominator"})," or a member of a\n",(0,a.jsx)(n.a,{href:"/docs/learn-nomination-pools",children:"nomination pool"}),". Once you have a funded account, you need to\nconnect it to the dashboard (connect button on the top-right corner), this will allow you to\ninteract with native staking."]}),"\n",(0,a.jsx)(n.admonition,{title:"The dashboard is a Web3 dApp",type:"info",children:(0,a.jsxs)(n.p,{children:["The dashboard is a decentralized application (dApp), and to login you do not need to sign up with an\nemail and password but just need an account created on the supported non-custodial wallets. Any\ntransaction to be submitted needs to be signed by you. Also, if you use light clients, which are\nresistant to censorship, you interact trustlessly with the network without intermediaries. Welcome\nto the world of ",(0,a.jsx)(n.a,{href:"/docs/web3-and-polkadot",children:"true Web3"}),"!"]})}),"\n",(0,a.jsx)(n.p,{children:"Note the pictures on this page refer to Kusama, but the same applies to Polkadot and Westend."}),"\n",(0,a.jsxs)(n.p,{children:["The structure of this page follows the sidebar of the staking dashboard. Here you will learn about\nthe main features of the dashboard. If you need more information, see the\n",(0,a.jsx)(n.a,{href:"https://youtu.be/hvXLc4H7rA4",children:"Walkthrough Tutorial"}),"."]}),"\n",(0,a.jsx)(n.admonition,{title:"Walk-through Video Tutorials",type:"info",children:(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.a,{href:"https://youtu.be/F59N3YKYCRs",children:(0,a.jsx)(n.strong,{children:"Nominating"})}),": Stake your tokens, choose your best validators,\nand start your staking journey."]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.a,{href:"https://youtu.be/dDIG7QAApig",children:(0,a.jsx)(n.strong,{children:"Becoming a Pool Member"})}),": Start becoming a part of the Polkadot\nmovement, keep the network secure by staking minimum 1 DOT and receiving staking rewards."]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.a,{href:"https://youtu.be/hvXLc4H7rA4",children:(0,a.jsx)(n.strong,{children:"Dashboard Walkthrough"})}),": Become a Pro using the Staking\nDashboard."]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.a,{href:"https://youtu.be/58pIe8tt2o4",children:(0,a.jsx)(n.strong,{children:"After Staking"})}),": Nominating is not a set-and-forget action,\nlearn what you can do with the dashboard after you started staking."]}),"\n"]})}),"\n",(0,a.jsx)(n.h2,{id:"overview",children:"Overview"}),"\n",(0,a.jsx)(n.admonition,{title:"Staking Dashboard Walk-through video tutorial",type:"info",children:(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.a,{href:"https://youtu.be/hvXLc4H7rA4",children:"This video tutorial"})," shows you everything you can do with the Staking\nDashboard."]})}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.img,{alt:"dashboard overview",src:o(71208).A+"",width:"1920",height:"1080"})}),"\n",(0,a.jsx)(n.p,{children:"This page of the dashboard has six main panels:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.strong,{children:"Section A: The Sidebar"})," shows which page you are on (in this case, the Overview). It will also\nshow the role you currently have in staking (in this case, active in both ",(0,a.jsx)(n.a,{href:"#pools",children:"Pools"})," and\n",(0,a.jsx)(n.a,{href:"#nominate",children:"Nominate"}),"). You can also change the ",(0,a.jsx)(n.a,{href:"#network",children:"network"})," (currently on Kusama)."]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.strong,{children:"Section B: The Accounts Panel"})," allows you to connect one account to the dashboard. Once\nconnected, the account will appear next to the ",(0,a.jsx)(n.code,{children:"Accounts"})," button. You can see it here if you are\nactive as a nominator and/or a pool member. In this case, the account KSM Stash is a nominator and\na member of the pool Insight Finance. Proxy accounts are also shown here if applicable. Note that\nthe dashboard will automatically fetch the stash and the proxy."]}),"\n"]}),"\n"]}),"\n",(0,a.jsx)(n.p,{children:"Note that Sections A and B will always be visible while you use the dashboard."}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.strong,{children:"Section C: The Stats Panel"})," shows the general view of current staking metrics, including the\nhistorical reward rate (including after\n",(0,a.jsx)(n.a,{href:"/docs/learn-staking-advanced#inflation",children:"inflation"}),"), the supply staked and time remaining\nin the current era."]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.strong,{children:"Section D: The Summary Panel"})," shows your current situation and gives you general tips about\nstaking. In this case, the KSM Stash account is a nominator and a pool member, and by clicking on\n",(0,a.jsx)(n.code,{children:"Manage >"})," you can go directly to the ",(0,a.jsx)(n.a,{href:"#nominate",children:"Nominate"})," and ",(0,a.jsx)(n.a,{href:"#pools",children:"Pools"})," pages,\nrespectively. You can take actions such as changing staking preferences, bonding more funds, etc."]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.strong,{children:"Section E: The Balance Panel"}),' shows the bonded amount distinguishing between "Nominating", "In\na Pool", and "Not Staking". The amount that is not staking is further divided into "Free" (a\nbalance that can be transferred) and "Reserve" (a balance that is needed the keep the account\non-chain, see ',(0,a.jsx)(n.a,{href:"/docs/learn-accounts#existential-deposit-and-reaping",children:"existential deposit"}),").\nIn this case, 0.301 KSM are bonded for nominating, 0.3 KSM are bonded in a pool, and 0.145 KSM are\nnot used for staking. Of the non-staking balance, 0.144 KSM are free while\n",(0,a.jsx)(n.a,{href:"/docs/chain-state-values#existential-deposit",children:"a small portion is reserved for the existential deposit"}),"."]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.strong,{children:"Section F: The Recent Payouts Panel"})," shows a bar chart with the rewards paid out to you in the\npast 15 days either as a nominator or a pool member (manually claimed). Note how the 4th of April\nbar has the tip that is not filled with color. This is to show a pending payout (for nominators\nonly). Below the bar chart is a line chart showing the 10-day moving average."]}),"\n"]}),"\n"]}),"\n",(0,a.jsx)(n.p,{children:"Additional statistics can be found at the bottom of the overview page."}),"\n",(0,a.jsx)(n.admonition,{title:"Pool funds are in system accounts",type:"info",children:(0,a.jsx)(n.p,{children:"Remember that funds bonded in a pool are transferred to the pool's system account, which can only be\naccessed by the protocol, and not by any individual user. Some wallets might not display the balance\nbonded in pools, but the dashboard will always show it."})}),"\n",(0,a.jsx)(n.h2,{id:"stake",children:"Stake"}),"\n",(0,a.jsx)(n.p,{children:"In this category, you can access all functionalities allowing you to stake your tokens as a\nnominator, member of a nomination pool, or both. The payout section will enable you to inspect the\nmost recently received rewards."}),"\n",(0,a.jsx)(n.h3,{id:"pools",children:"Pools"}),"\n",(0,a.jsx)(n.admonition,{title:"Joining a Nomination Pool - Walk-through video tutorial",type:"info",children:(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.a,{href:"https://youtu.be/dDIG7QAApig",children:"This video tutorial"})," shows you how to join a\n",(0,a.jsx)(n.a,{href:"/docs/learn-nomination-pools",children:"nomination pool"})," with the Staking Dashboard. You can also read\nthe\n",(0,a.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000182376-staking-dashboard-how-to-join-a-nomination-pool",children:"dedicated support article"}),"\nabout joining a pool."]})}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.img,{alt:"dashboard pools",src:o(90656).A+"",width:"1920",height:"1080"})}),"\n",(0,a.jsx)(n.p,{children:"This page of the dashboard has four main panels (Sidebar and Accounts Panels excluded):"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.strong,{children:"Section A: The Stats Panel"})," shows the number of active pools and the minimum number of tokens\nneeded to join a pool and/or create one."]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.strong,{children:"Section B: The Balance Panel"})," shows the number of tokens bonded in pools and those that are\nfree. In this case, we have 0.3 KSM bonded and 0.144 KSM free. In this panel, you can bond more\nfunds (",(0,a.jsx)(n.code,{children:"+"})," button) or unbond some funds (",(0,a.jsx)(n.code,{children:"-"})," button). Unbonding will withdraw unclaimed rewards\nand funds will be locked for the ",(0,a.jsx)(n.a,{href:"/docs/chain-state-values#unbonding-duration",children:"unbonding period"}),".\nOnce the unbonding period has passed, you can unlock the locked funds (button with a lock icon)\nthat will be available as a free balance."]}),"\n"]}),"\n",(0,a.jsx)(n.admonition,{title:"No fast unstake and pool swap for pool members",type:"info",children:(0,a.jsx)(n.p,{children:"Note that the option to fast unstake is only available to nominators. Also, to change pool, you\ncannot simply swap memberships. You will need to unbond and go through the whole unbonding period."})}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.strong,{children:"Section C: The Pool Panel"})," shows the pool id where you have membership (in this case, Pool 82),\nthe pool name, and next to it, a ",(0,a.jsx)(n.code,{children:"Manage"})," button that will allow to choose between different\noptions:"]}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["Update Claim Permissions: you can allow other pool members to compound your rewards, withdraw\nyour rewards as a free balance, or both. More details about nomination pools and updating claim\npermissions can be found on the\n",(0,a.jsx)(n.a,{href:"/docs/learn-nomination-pools#claim-permissions",children:"dedicated wiki page"}),"."]}),"\n"]}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.img,{alt:"dashboard-permissionlessPoolClaims",src:o(85778).A+"",width:"651",height:"272"})}),"\n",(0,a.jsx)(n.admonition,{type:"info",children:(0,a.jsxs)(n.p,{children:["For more information about how-to update your claim permissions with the staking dashboard see\n",(0,a.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000182399-staking-dashboard-how-to-claim-nomination-pool-rewards#Permissionless-claiming",children:"this support article"}),"."]})}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:"Leave the pool and unbond all the funds in the pool."}),"\n"]}),"\n",(0,a.jsx)(n.p,{children:"If you are a pool admin you will be able to see the additional options:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:"Claim Commission: you can claim pool commissions to an account specified under Manage Commission\n(below)."}),"\n",(0,a.jsxs)(n.li,{children:["Manage Commission: you can manage the pool commission rate, maximum commission, maximum change\nrate, and minimum time delay between commission updates. More details about nomination pools and\nmanaging pool commissions can be found on the\n",(0,a.jsx)(n.a,{href:"/docs/learn-nomination-pools#pool-commissions",children:"dedicated wiki page"}),"."]}),"\n"]}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.img,{alt:"dashboard-manage-commission",src:o(93389).A+"",width:"650",height:"645"})}),"\n",(0,a.jsx)(n.admonition,{type:"info",children:(0,a.jsxs)(n.p,{children:["For more information about how-to manage commission of your nomination pool with the staking\ndashboard see\n",(0,a.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000182388-staking-dashboard-how-to-create-a-nomination-pool#Pool-management-options",children:"this support article"}),"."]})}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:"Rename Pool: you can change the pool's name."}),"\n",(0,a.jsx)(n.li,{children:"Lock Pool: you can lock the pool so that new members are not allowed."}),"\n",(0,a.jsxs)(n.li,{children:["Destroy Pool: you can destroy the pool. See\n",(0,a.jsx)(n.a,{href:"/docs/learn-guides-staking-pools#pool-destruction",children:"this wiki page"})," and\n",(0,a.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000182388-staking-dashboard-how-to-create-a-nomination-pool#How-to-destroy-a-pool",children:"this support article"}),"\nfor more information."]}),"\n"]}),"\n",(0,a.jsxs)(n.p,{children:["You can see any unclaimed rewards in the middle of the panel. You can claim and bond the rewards\n(",(0,a.jsx)(n.code,{children:"+ Compound"})," button) or withdraw them as a free balance (",(0,a.jsx)(n.code,{children:"Withdraw"}),' button). In this case, there\nare approximately 0.0012 KSM that can be claimed. You can see the Pool Status at the bottom of the\npanel, currently set to "Nominating and Earning Rewards".']}),"\n"]}),"\n"]}),"\n",(0,a.jsxs)(n.p,{children:["Note that if it is the first time you log in to the dashboard, you will see two\nbuttons\xa0",(0,a.jsx)(n.code,{children:"Create"}),"\xa0and\xa0",(0,a.jsx)(n.code,{children:"Join"}),", instead of ",(0,a.jsx)(n.code,{children:"Manage"}),". For more information about how to create a\nnomination pool, see\n",(0,a.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000182388-staking-dashboard-how-to-create-a-nomination-pool#How-to-create-a-pool",children:"this support article"}),"."]}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.strong,{children:"Section D: The Pool Nominations Panel"})," shows the nominations of the pool you are currently in,\nhighlighting the validator that is active and will pay rewards to the pool at the end of the era\n(in this case ",(0,a.jsx)(n.code,{children:"ParaNodes.io/11"}),")."]}),"\n"]}),"\n",(0,a.jsx)(n.p,{children:"If you scroll down the page, there are two additional panels:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.strong,{children:"Roles"})," showing the accounts of the pool's Depositor, Root, Nominator, and Bouncer. The same\naccount can cover all the roles."]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.strong,{children:"Pool Stats"})," showing the Pool State (either Active, Closed, or Destroying), Pool Members (number\nof members in the pool), and Total Bonded (total number of bonded tokens)."]}),"\n"]}),"\n",(0,a.jsx)(n.p,{children:"The Pools page is divided into four parts: the Overview is basically what we talked about until now,\nthe Members section will show all accounts of the pool members, the All Pools section will show all\npools (you can filter Active, Locked, and Destroying pools), and the Favorites section shows all\npools that you liked (you can like a pool in the All Pools section by clicking on the heart icons)."}),"\n",(0,a.jsx)(n.h3,{id:"nominate",children:"Nominate"}),"\n",(0,a.jsx)(n.admonition,{title:"Walk-through video tutorial of How to Nominate",type:"info",children:(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.a,{href:"https://youtu.be/F59N3YKYCRs",children:"This video tutorial"})," shows you how to become a nominator with the\nStaking Dashboard."]})}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.img,{alt:"dashboard nominate",src:o(6568).A+"",width:"1920",height:"1080"})}),"\n",(0,a.jsx)(n.p,{children:"This page of the dashboard has four main panels (Sidebar and Accounts Panels excluded):"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.strong,{children:"Section A: The Stats Panel"})," shows the number of active nominators,\n",(0,a.jsx)(n.a,{href:"/docs/chain-state-values#minimum-bond-to-participate-in-staking",children:"the minimum number of tokens to nominate"}),"\nand ",(0,a.jsx)(n.a,{href:"/docs/chain-state-values#minimum-active-bond",children:"the minimum active bond"}),". The system keeps 12500\nnomination intents and puts them into the\n",(0,a.jsx)(n.a,{href:"/docs/learn-staking-advanced#bags-list",children:"bags list"}),". The fact that active nominators are not\n12500 is because there are nominators that have no active validator."]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.strong,{children:"Section B: The Balance Panel"})," shows the number of tokens bonded in nominations and those that\nare free. In this case, we have 0.301 KSM bonded and 0.144 KSM free. In this panel, you can bond\nmore funds (",(0,a.jsx)(n.code,{children:"+"})," button) or unbond some funds (",(0,a.jsx)(n.code,{children:"-"})," button). Unbonding will withdraw unclaimed\nrewards and funds will be locked for the\n",(0,a.jsx)(n.a,{href:"/docs/chain-state-values#unbonding-duration",children:"unbonding period"}),". Once the unbonding period has\npassed, you can unlock the locked funds (button with a lock icon) that will be available as a free\nbalance."]}),"\n"]}),"\n",(0,a.jsx)(n.admonition,{title:"Fast unstake",type:"info",children:(0,a.jsx)(n.p,{children:"If your account did not receive rewards in the past 28 eras, you will be eligible for fast unstake.\nThe dashboard will automatically check this for you and prompt a banner."})}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.strong,{children:"Section C: The Nominator Panel"}),' shows the current status of the nominator, currently set to\n"Nominating and Earning Rewards", and next to it, the ',(0,a.jsx)(n.code,{children:"Unstake"}),' button allows you to unstake the\nwhole bonded amount and stop nominating. In the middle of the panel, the payout destination is\ncurrently set to "Compounding" (i.e. rewards are added to the bonded funds). The ',(0,a.jsx)(n.code,{children:"Update"}),' button\nwill allow you to change the destination to "To Your Account" (to the stash account as a free\nbalance), "To Another Account" (an account that is not the stash), or "None" (no payout\ndestination).']}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.strong,{children:"Section D: The Nominations panel"})," shows your nominations and allows you to stop all nomination\nwith the ",(0,a.jsx)(n.code,{children:"Stop"})," button or to select specific validators (",(0,a.jsx)(n.code,{children:"Select"})," button) and stop nominating only\nthose."]}),"\n"]}),"\n",(0,a.jsx)(n.h3,{id:"payouts",children:"Payouts"}),"\n",(0,a.jsxs)(n.p,{children:["This page is an expanded version of Panel F on the ",(0,a.jsx)(n.a,{href:"#overview",children:"Overview"})," page. It also shows all\nvalidators and/or nomination pools that paid out rewards to your accounts in the past few months."]}),"\n",(0,a.jsx)(n.h3,{id:"after-staking",children:"After Staking"}),"\n",(0,a.jsx)(n.admonition,{title:"Walk-through video tutorial - What to do after Staking",type:"info",children:(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.a,{href:"https://youtu.be/F59N3YKYCRs",children:"This video tutorial"})," shows you how to what you can do after staking\nwith the Staking Dashboard."]})}),"\n",(0,a.jsx)(n.h2,{id:"validators",children:"Validators"}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.img,{alt:"dashboard nominate",src:o(84544).A+"",width:"1920",height:"1080"})}),"\n",(0,a.jsx)(n.p,{children:"This page of the dashboard has two main panels (Sidebar and Accounts Panels excluded):"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.strong,{children:"Panel A: The Stats Panel"})," shows the total number of active validators, all validators currently\nregistered (active and inactive), and average commission across all validators."]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.strong,{children:"Panel B: The Validators Panel"})," shows all validators. You can order them by low/high commission\nor apply the following filters:","\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:"Include only active validators"}),"\n",(0,a.jsx)(n.li,{children:"Exclude validators that have 100% commission, blocked nominations, and have missing identity."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,a.jsx)(n.h2,{id:"support",children:"Support"}),"\n",(0,a.jsxs)(n.p,{children:["Support for the Staking Dashboard is available at\n",(0,a.jsx)(n.a,{href:"https://support.polkadot.network/support/home",children:"the official Polkadot support website"}),"."]}),"\n",(0,a.jsx)(n.h2,{id:"network",children:"Network"}),"\n",(0,a.jsxs)(n.p,{children:["Under Network, you can connect to either Polkadot, Kusama, or Westend through public RPC nodes or\nlight clients for a true Web3 experience. For more information about light clients, see\n",(0,a.jsx)(n.a,{href:"/docs/build-light-clients#replacing-rpc-node-reliance-with-light-clients",children:"this page"}),"."]})]})}function c(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(h,{...e})}):h(e)}},47379:(e,n,o)=>{"use strict";o.d(n,{A:()=>u});var t=o(90675),a=o(10467),s=o(96540),i=o(19588),r=o(2026),l=o(11135);function d(e,n,o){return h.apply(this,arguments)}function h(){return(h=(0,a.A)((0,t.A)().mark((function e(n,o,a){var s,l,d,h,c;return(0,t.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s=void 0,l=void 0,e.t0=n,e.next="polkadot"===e.t0?5:"kusama"===e.t0?7:"statemine"===e.t0?9:"statemint"===e.t0?11:"polkadotpeople"===e.t0?13:"kusamapeople"===e.t0?15:17;break;case 5:return s="wss://rpc.polkadot.io",e.abrupt("break",18);case 7:return s="wss://kusama-rpc.polkadot.io/",e.abrupt("break",18);case 9:return s="wss://statemine-rpc.polkadot.io/",e.abrupt("break",18);case 11:return s="wss://statemint-rpc.polkadot.io/",e.abrupt("break",18);case 13:return s="wss://polkadot-people-rpc.polkadot.io/",e.abrupt("break",18);case 15:return s="wss://kusama-people-rpc.polkadot.io/",e.abrupt("break",18);case 17:console.log("Unknown socket url provided, no connection made.");case 18:if(void 0!==s){e.next=22;break}return e.abrupt("return");case 22:return d=new i.E(s),e.next=25,r.G.create({provider:d});case 25:h=e.sent,(c=o.split(".")).forEach((function(e){e in h&&(h=h[e])})),e.t1=c[0],e.next="consts"===e.t1?31:"query"===e.t1?33:38;break;case 31:return l=h.toString(),e.abrupt("break",39);case 33:return e.next=35,h();case 35:return l=(l=e.sent).toString(),e.abrupt("break",39);case 38:console.log("Unknown path prefix ("+c[0]+") in "+o);case 39:return e.abrupt("return",l);case 40:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function c(e,n,o,t){switch(n){case"humanReadable":(0,l.HumanReadable)(e,o,t);break;case"precise":(0,l.Precise)(e,o,t);break;case"blocksToDays":(0,l.BlocksToDays)(e,t);break;case"erasToDays":(0,l.ErasToDays)(e,t,o);break;case"percentage":(0,l.Percentage)(e,t);break;case"permillToPercent":(0,l.PermillToPercent)(e,t);break;case"arrayLength":(0,l.ArrayLength)(e,t);break;default:return void console.log("Ignoring unknown filter type")}}const u=function(e){var n=e.network,o=e.path,i=e.defaultValue,r=e.filter,l=void 0===r?void 0:r,h=(0,s.useState)(""),u=h[0],p=h[1];return n=n.toLowerCase(),(0,s.useEffect)((function(){void 0!==l?c(i.toString(),l,n,p):p(i.toString());var e=void 0;switch(n){case"polkadot":e="wss://rpc.polkadot.io";break;case"kusama":e="wss://kusama-rpc.polkadot.io/";break;case"statemine":e="wss://kusama-asset-hub-rpc.polkadot.io/";break;case"statemint":e="wss://polkadot-asset-hub-rpc.polkadot.io/";break;case"kusamapeople":e="wss://kusama-people-rpc.polkadot.io";break;case"polkadotpeople":e="wss://polkadot-people-rpc.polkadot.io";break;default:console.log("Unknown network provided, "+n)}if(void 0===e)console.log("Failed to connect to a valid websocket, applying default");else{var s=function(){var e=(0,a.A)((0,t.A)().mark((function e(){var a;return(0,t.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,d(n,o,p);case 2:if(void 0!==(a=e.sent)){e.next=7;break}return e.abrupt("return");case 7:void 0!==l?c(a,l,n,p):p(a);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();try{s()}catch(r){console.log(r)}}}),[]),u}},11135:e=>{var n="polkadot",o="kusama",t="statemine",a="statemint",s="polkadotpeople",i="kusamapeople",r={polkadot:{precision:1e10,symbol:"DOT"},kusama:{precision:1e12,symbol:"KSM"},statemint:{precision:1e10,symbol:"DOT"},statemine:{precision:1e12,symbol:"KSM"},polkadotpeople:{precision:1e10,symbol:"DOT"},kusamapeople:{precision:1e12,symbol:"KSM"}};e.exports={HumanReadable:function(e,l,d){var h=void 0;if(l===n||l===a)h=3;else if(l===o||l===t||l===s)h=6;else{if(l!=i)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");h=8}e=parseFloat(e),d((e=Number.isInteger(e/r[l].precision)?e/r[l].precision+" "+r[l].symbol:(e/r[l].precision).toFixed(h)+" "+r[l].symbol).toString())},Precise:function(e,n,o){o(e=(e=parseFloat(e))/r[n].precision+" "+r[n].symbol)},BlocksToDays:function(e,n){n((e=6*e/86400).toString())},ErasToDays:function(e,r,l){var d=void 0;if(l===n||l===a||l==s)d=1;else{if(l!==o&&l!==t&&l!=i)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");d=4}r((e/=d).toString())},Percentage:function(e,n){n((e/=1e7).toString())},PermillToPercent:function(e,n){n((e/=1e4).toString())},ArrayLength:function(e,n){n((e=e.split(",").length).toString())}}},93389:(e,n,o)=>{"use strict";o.d(n,{A:()=>t});const t=o.p+"assets/images/dashboard-managePoolCommission-46842e2d0927915c031faf72cb3e266a.png"},6568:(e,n,o)=>{"use strict";o.d(n,{A:()=>t});const t=o.p+"assets/images/dashboard-nominate-7b882e41a42abeb928b78a6d6db4a6f0.png"},71208:(e,n,o)=>{"use strict";o.d(n,{A:()=>t});const t=o.p+"assets/images/dashboard-overview-755861fe5937455f21a9360334fc26ea.png"},85778:(e,n,o)=>{"use strict";o.d(n,{A:()=>t});const t=o.p+"assets/images/dashboard-permissionlessPoolClaims-20c461799ea9447fff83f2d2bd41b4f9.png"},90656:(e,n,o)=>{"use strict";o.d(n,{A:()=>t});const t=o.p+"assets/images/dashboard-pools-b7327a1bbe115970fe683b0350c7bb6e.png"},84544:(e,n,o)=>{"use strict";o.d(n,{A:()=>t});const t=o.p+"assets/images/dashboard-validators-a90166e01dcd1072c9a3be81a439afbb.png"},47790:()=>{}}]); \ No newline at end of file diff --git a/assets/js/b0d34550.950b2bd6.js b/assets/js/b0d34550.950b2bd6.js deleted file mode 100644 index ba28fce6b9ce..000000000000 --- a/assets/js/b0d34550.950b2bd6.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8660],{42868:(a,t,e)=>{e.r(t),e.d(t,{assets:()=>i,contentTitle:()=>r,default:()=>c,frontMatter:()=>s,metadata:()=>d,toc:()=>l});var o=e(74848),n=e(28453);const s={id:"polkadot-dashboards-network",title:"Polkadot Dashboards: Network",sidebar_label:"Network",description:"Data dashboards of Polkadot network dynamics, including staking rates, validator dynamics, and staking pools.",keywords:["polkadot","network","dashboard","dune"],slug:"../polkadot-dashboards-network"},r="Polkadot Dashboards Network",d={id:"general/dune-analytics/polkadot-dashboards/polkadot-dashboards-network",title:"Polkadot Dashboards: Network",description:"Data dashboards of Polkadot network dynamics, including staking rates, validator dynamics, and staking pools.",source:"@site/../docs/general/dune-analytics/polkadot-dashboards/polkadot-dashboards-network.md",sourceDirName:"general/dune-analytics/polkadot-dashboards",slug:"/general/dune-analytics/polkadot-dashboards-network",permalink:"/docs/general/dune-analytics/polkadot-dashboards-network",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/polkadot-dashboards/polkadot-dashboards-network.md",tags:[],version:"current",lastUpdatedBy:"MK",lastUpdatedAt:1719215716e3,frontMatter:{id:"polkadot-dashboards-network",title:"Polkadot Dashboards: Network",sidebar_label:"Network",description:"Data dashboards of Polkadot network dynamics, including staking rates, validator dynamics, and staking pools.",keywords:["polkadot","network","dashboard","dune"],slug:"../polkadot-dashboards-network"},sidebar:"docs",previous:{title:"Staking",permalink:"/docs/general/dune-analytics/polkadot-dashboards-staking"},next:{title:"Parachain Dashboards",permalink:"/docs/general/dune-analytics/parachain-dashboards"}},i={},l=[{value:"Overview",id:"overview",level:2},{value:"Polkadot Shared Security of the Network",id:"polkadot-shared-security-of-the-network",level:2},{value:"Polkadot - Network Staking Rate Chart",id:"polkadot---network-staking-rate-chart",level:3},{value:"Polkadot - Nominators & Validators & Pools Chart",id:"polkadot---nominators--validators--pools-chart",level:3},{value:"Polkadot Minimum and Maximum Validator Stakes",id:"polkadot-minimum-and-maximum-validator-stakes",level:3}];function h(a){const t={a:"a",h1:"h1",h2:"h2",h3:"h3",header:"header",p:"p",strong:"strong",...(0,n.R)(),...a.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.header,{children:(0,o.jsx)(t.h1,{id:"polkadot-dashboards-network",children:"Polkadot Dashboards Network"})}),"\n",(0,o.jsx)(t.h2,{id:"overview",children:"Overview"}),"\n",(0,o.jsx)(t.p,{children:"This document demonstrated various Polkadot network dashboards, offering insights into shared\nsecurity, staking rates, validator dynamics, and staking pools. These dashboards aim to provide a\ncomprehensive understanding of the Polkadot ecosystem's economic and consensus mechanisms,\nemphasizing network participation, security, and decentralization."}),"\n",(0,o.jsxs)(t.p,{children:["Authored by ",(0,o.jsx)(t.a,{href:"https://x.com/colorfulnotion",children:(0,o.jsx)(t.strong,{children:"@ colorfulnotion"})})]}),"\n",(0,o.jsx)(t.h2,{id:"polkadot-shared-security-of-the-network",children:"Polkadot Shared Security of the Network"}),"\n",(0,o.jsxs)(t.p,{children:[(0,o.jsx)(t.strong,{children:"View On Dune:"}),"\n",(0,o.jsx)(t.a,{href:"https://dune.com/substrate/polkadot-shared-security",children:"Polkadot Shared Security of the Network"})]}),"\n",(0,o.jsxs)(t.p,{children:["The ",(0,o.jsx)(t.strong,{children:"Polkadot - Shared Security of the Network"})," dashboard showcases the staking and validator\ndynamics within the Polkadot network. It emphasizes various aspects of network security, such as\n",(0,o.jsx)(t.strong,{children:"staking rates"}),", ",(0,o.jsx)(t.strong,{children:"validator nomination pools"}),", and the ",(0,o.jsx)(t.strong,{children:"minimum and maximum stakes required for\nvalidators"}),". This dashboard visualizes data trends over time, reflecting the network's stake\ndistribution and the participation of validators and nominators. It serves as an essential indicator\nof network participation, security, and decentralization."]}),"\n",(0,o.jsx)(t.h3,{id:"polkadot---network-staking-rate-chart",children:"Polkadot - Network Staking Rate Chart"}),"\n",(0,o.jsx)(t.p,{children:"This chart analyzes the Polkadot network's staking rate over time, focusing on the ratio of total\nstaked tokens to total issued tokens. It shows the portion of the network's capital used for\nsecuring the blockchain, a key metric for assessing network engagement and security."}),"\n",(0,o.jsx)("iframe",{src:"https://dune.com/embeds/3334817/5587364/",height:"350",width:"100%"}),"\n",(0,o.jsx)(t.h3,{id:"polkadot---nominators--validators--pools-chart",children:"Polkadot - Nominators & Validators & Pools Chart"}),"\n",(0,o.jsx)(t.p,{children:"The chart tracks the number of active validators, nominators, and staking pools. This data helps\nvisualize the network's decentralization and stakeholder participation, crucial for understanding\nthe robustness of Polkadot's staking ecosystem."}),"\n",(0,o.jsx)("iframe",{src:"https://dune.com/embeds/3334817/5603258/",height:"350",width:"100%"}),"\n",(0,o.jsx)(t.h3,{id:"polkadot-minimum-and-maximum-validator-stakes",children:"Polkadot Minimum and Maximum Validator Stakes"}),"\n",(0,o.jsx)(t.p,{children:"This chart represents the stake distribution among validators in the Polkadot network on a monthly\nbasis. It illustrates the minimum, average, and maximum stakes held by validators, providing a clear\nvisualization of the variance and spread within the validator pool. Additionally, it highlights the\nstake concentration by showing the difference between the highest and lowest stakes as a percentage\nof the total stake, offering insights into the network's staking dynamics and the level of\ndecentralization."}),"\n",(0,o.jsx)("iframe",{src:"https://dune.com/embeds/3343955/5603201/",height:"350",width:"100%"})]})}function c(a={}){const{wrapper:t}={...(0,n.R)(),...a.components};return t?(0,o.jsx)(t,{...a,children:(0,o.jsx)(h,{...a})}):h(a)}},28453:(a,t,e)=>{e.d(t,{R:()=>r,x:()=>d});var o=e(96540);const n={},s=o.createContext(n);function r(a){const t=o.useContext(s);return o.useMemo((function(){return"function"==typeof a?a(t):{...t,...a}}),[t,a])}function d(a){let t;return t=a.disableParentContext?"function"==typeof a.components?a.components(n):a.components||n:r(a.components),o.createElement(s.Provider,{value:t},a.children)}}}]); \ No newline at end of file diff --git a/assets/js/b0d34550.cc708c8c.js b/assets/js/b0d34550.cc708c8c.js new file mode 100644 index 000000000000..d98500509550 --- /dev/null +++ b/assets/js/b0d34550.cc708c8c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8660],{80338:(a,t,e)=>{e.r(t),e.d(t,{assets:()=>i,contentTitle:()=>d,default:()=>c,frontMatter:()=>r,metadata:()=>o,toc:()=>l});const o=JSON.parse('{"id":"general/dune-analytics/polkadot-dashboards/polkadot-dashboards-network","title":"Polkadot Dashboards: Network","description":"Data dashboards of Polkadot network dynamics, including staking rates, validator dynamics, and staking pools.","source":"@site/../docs/general/dune-analytics/polkadot-dashboards/polkadot-dashboards-network.md","sourceDirName":"general/dune-analytics/polkadot-dashboards","slug":"/general/dune-analytics/polkadot-dashboards-network","permalink":"/docs/general/dune-analytics/polkadot-dashboards-network","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/polkadot-dashboards/polkadot-dashboards-network.md","tags":[],"version":"current","lastUpdatedBy":"MK","lastUpdatedAt":1719215716000,"frontMatter":{"id":"polkadot-dashboards-network","title":"Polkadot Dashboards: Network","sidebar_label":"Network","description":"Data dashboards of Polkadot network dynamics, including staking rates, validator dynamics, and staking pools.","keywords":["polkadot","network","dashboard","dune"],"slug":"../polkadot-dashboards-network"},"sidebar":"docs","previous":{"title":"Staking","permalink":"/docs/general/dune-analytics/polkadot-dashboards-staking"},"next":{"title":"Parachain Dashboards","permalink":"/docs/general/dune-analytics/parachain-dashboards"}}');var s=e(74848),n=e(28453);const r={id:"polkadot-dashboards-network",title:"Polkadot Dashboards: Network",sidebar_label:"Network",description:"Data dashboards of Polkadot network dynamics, including staking rates, validator dynamics, and staking pools.",keywords:["polkadot","network","dashboard","dune"],slug:"../polkadot-dashboards-network"},d="Polkadot Dashboards Network",i={},l=[{value:"Overview",id:"overview",level:2},{value:"Polkadot Shared Security of the Network",id:"polkadot-shared-security-of-the-network",level:2},{value:"Polkadot - Network Staking Rate Chart",id:"polkadot---network-staking-rate-chart",level:3},{value:"Polkadot - Nominators & Validators & Pools Chart",id:"polkadot---nominators--validators--pools-chart",level:3},{value:"Polkadot Minimum and Maximum Validator Stakes",id:"polkadot-minimum-and-maximum-validator-stakes",level:3}];function h(a){const t={a:"a",h1:"h1",h2:"h2",h3:"h3",header:"header",p:"p",strong:"strong",...(0,n.R)(),...a.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.header,{children:(0,s.jsx)(t.h1,{id:"polkadot-dashboards-network",children:"Polkadot Dashboards Network"})}),"\n",(0,s.jsx)(t.h2,{id:"overview",children:"Overview"}),"\n",(0,s.jsx)(t.p,{children:"This document demonstrated various Polkadot network dashboards, offering insights into shared\nsecurity, staking rates, validator dynamics, and staking pools. These dashboards aim to provide a\ncomprehensive understanding of the Polkadot ecosystem's economic and consensus mechanisms,\nemphasizing network participation, security, and decentralization."}),"\n",(0,s.jsxs)(t.p,{children:["Authored by ",(0,s.jsx)(t.a,{href:"https://x.com/colorfulnotion",children:(0,s.jsx)(t.strong,{children:"@ colorfulnotion"})})]}),"\n",(0,s.jsx)(t.h2,{id:"polkadot-shared-security-of-the-network",children:"Polkadot Shared Security of the Network"}),"\n",(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.strong,{children:"View On Dune:"}),"\n",(0,s.jsx)(t.a,{href:"https://dune.com/substrate/polkadot-shared-security",children:"Polkadot Shared Security of the Network"})]}),"\n",(0,s.jsxs)(t.p,{children:["The ",(0,s.jsx)(t.strong,{children:"Polkadot - Shared Security of the Network"})," dashboard showcases the staking and validator\ndynamics within the Polkadot network. It emphasizes various aspects of network security, such as\n",(0,s.jsx)(t.strong,{children:"staking rates"}),", ",(0,s.jsx)(t.strong,{children:"validator nomination pools"}),", and the ",(0,s.jsx)(t.strong,{children:"minimum and maximum stakes required for\nvalidators"}),". This dashboard visualizes data trends over time, reflecting the network's stake\ndistribution and the participation of validators and nominators. It serves as an essential indicator\nof network participation, security, and decentralization."]}),"\n",(0,s.jsx)(t.h3,{id:"polkadot---network-staking-rate-chart",children:"Polkadot - Network Staking Rate Chart"}),"\n",(0,s.jsx)(t.p,{children:"This chart analyzes the Polkadot network's staking rate over time, focusing on the ratio of total\nstaked tokens to total issued tokens. It shows the portion of the network's capital used for\nsecuring the blockchain, a key metric for assessing network engagement and security."}),"\n",(0,s.jsx)("iframe",{src:"https://dune.com/embeds/3334817/5587364/",height:"350",width:"100%"}),"\n",(0,s.jsx)(t.h3,{id:"polkadot---nominators--validators--pools-chart",children:"Polkadot - Nominators & Validators & Pools Chart"}),"\n",(0,s.jsx)(t.p,{children:"The chart tracks the number of active validators, nominators, and staking pools. This data helps\nvisualize the network's decentralization and stakeholder participation, crucial for understanding\nthe robustness of Polkadot's staking ecosystem."}),"\n",(0,s.jsx)("iframe",{src:"https://dune.com/embeds/3334817/5603258/",height:"350",width:"100%"}),"\n",(0,s.jsx)(t.h3,{id:"polkadot-minimum-and-maximum-validator-stakes",children:"Polkadot Minimum and Maximum Validator Stakes"}),"\n",(0,s.jsx)(t.p,{children:"This chart represents the stake distribution among validators in the Polkadot network on a monthly\nbasis. It illustrates the minimum, average, and maximum stakes held by validators, providing a clear\nvisualization of the variance and spread within the validator pool. Additionally, it highlights the\nstake concentration by showing the difference between the highest and lowest stakes as a percentage\nof the total stake, offering insights into the network's staking dynamics and the level of\ndecentralization."}),"\n",(0,s.jsx)("iframe",{src:"https://dune.com/embeds/3343955/5603201/",height:"350",width:"100%"})]})}function c(a={}){const{wrapper:t}={...(0,n.R)(),...a.components};return t?(0,s.jsx)(t,{...a,children:(0,s.jsx)(h,{...a})}):h(a)}},28453:(a,t,e)=>{e.d(t,{R:()=>r,x:()=>d});var o=e(96540);const s={},n=o.createContext(s);function r(a){const t=o.useContext(n);return o.useMemo((function(){return"function"==typeof a?a(t):{...t,...a}}),[t,a])}function d(a){let t;return t=a.disableParentContext?"function"==typeof a.components?a.components(s):a.components||s:r(a.components),o.createElement(n.Provider,{value:t},a.children)}}}]); \ No newline at end of file diff --git a/assets/js/b1b82dcd.63083cd0.js b/assets/js/b1b82dcd.63083cd0.js deleted file mode 100644 index c67c760e6ed0..000000000000 --- a/assets/js/b1b82dcd.63083cd0.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[557],{59384:(n,e,a)=>{a.r(e),a.d(e,{assets:()=>l,contentTitle:()=>s,default:()=>p,frontMatter:()=>r,metadata:()=>c,toc:()=>d});var o=a(74848),t=a(28453),i=a(67141);const r={id:"learn-crowdloans",title:"Parachain Crowdloans",sidebar_label:"Parachain Crowdloans",description:"Polkadot's Crowdloans and How to Participate.",keywords:["crowdloans","parachains","lending","auction"],slug:"../learn-crowdloans"},s=void 0,c={id:"learn/archive/learn-crowdloans",title:"Parachain Crowdloans",description:"Polkadot's Crowdloans and How to Participate.",source:"@site/../docs/learn/archive/learn-crowdloans.md",sourceDirName:"learn/archive",slug:"/learn/learn-crowdloans",permalink:"/docs/learn/learn-crowdloans",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/archive/learn-crowdloans.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1729847256e3,frontMatter:{id:"learn-crowdloans",title:"Parachain Crowdloans",sidebar_label:"Parachain Crowdloans",description:"Polkadot's Crowdloans and How to Participate.",keywords:["crowdloans","parachains","lending","auction"],slug:"../learn-crowdloans"},sidebar:"docs",previous:{title:"Parachain Slot Auctions",permalink:"/docs/learn/learn-auction"},next:{title:"Polkadot Developer Portal",permalink:"/docs/build-guide"}},l={},d=[{value:"Crowdloan Campaigns vs Parachain Auctions",id:"crowdloan-campaigns-vs-parachain-auctions",level:2},{value:"Starting a Crowdloan Campaign",id:"starting-a-crowdloan-campaign",level:2},{value:"Supporting a Crowdloan Campaign",id:"supporting-a-crowdloan-campaign",level:2},{value:"Contributing to Crowdloans",id:"contributing-to-crowdloans",level:3},{value:"Withdraw Crowdloaned Tokens",id:"withdraw-crowdloaned-tokens",level:3}];function h(n){const e={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",img:"img",li:"li",mdxAdmonitionTitle:"mdxAdmonitionTitle",p:"p",strong:"strong",ul:"ul",...(0,t.R)(),...n.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(i.A,{message:"The content on this page is archived. [Agile Coretime](../learn-agile-coretime) is activated on the network, and crowdloans have been deprecated. For decentralized, transparent, and regulatory-compliant fundraising within the ecosystem, check out the [Polimec parachain](https://www.polimec.org/)."}),"\n",(0,o.jsx)(e.p,{children:"Polkadot allows parachains to source tokens for their parachain bids in a decentralized crowdloan."}),"\n",(0,o.jsx)(e.admonition,{title:"Contributing to a crowdloan",type:"note",children:(0,o.jsxs)(e.p,{children:["If you are here for guidance on how to contribute to a crowdloan, watch the video below or read this\n",(0,o.jsx)(e.a,{href:"https://support.polkadot.network/support/solutions/articles/65000177341-how-to-participate-in-crowdloans-on-polkadot-or-kusama",children:"support article on crowdloans"}),"."]})}),"\n",(0,o.jsx)("div",{className:"row",children:(0,o.jsxs)("div",{className:"col text--center",children:[(0,o.jsx)("a",{href:"https://youtu.be/AA9mPANmzmU",children:(0,o.jsx)("img",{src:"https://img.youtube.com/vi/AA9mPANmzmU/0.jpg",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,o.jsx)("p",{children:(0,o.jsx)("a",{href:"https://youtu.be/AA9mPANmzmU",children:"Crowdloans on Polkadot-JS"})})]})}),"\n",(0,o.jsx)(e.h2,{id:"crowdloan-campaigns-vs-parachain-auctions",children:"Crowdloan Campaigns vs Parachain Auctions"}),"\n",(0,o.jsxs)(e.p,{children:["It is important to recognize that starting a crowdloan campaign is ",(0,o.jsx)(e.strong,{children:"optional"})," for participating in\na parachain slot auction. The parachain slot auction can also be won directly through self-funding\nwithout community involvement. To reiterate, crowdloan campaigns are just one of the means to win\nauctions, which allow the community to participate in a trustless and permissionless way."]}),"\n",(0,o.jsx)(e.p,{children:"Let's look at a scenario where Project A is bidding for a parachain slot, but they don't have enough\ntokens to bid directly to win the parachain auction. Project A could benefit from starting a new\ncrowdloan campaign to help secure a parachain slot. Crowdloans are trustless and are supported\nnatively on the relay chain, allowing the community to bond their tokens on Project A's behalf for\nthe entire parachain lease duration. This will allow Project A to compete with projects that may\nhave access to greater capital, given the project has sufficient community support. In return, the\ncommunity contributors are rewarded by the projects that win the parachain slot, which would\ncompensate for the opportunity cost of bonding their tokens for the lease duration."}),"\n",(0,o.jsx)(e.p,{children:"On the other hand, let's say Project B, which is more established and has access to capital, is\nhoping to secure a parachain slot through self-funding. Project B is not relying on community\nfunding (at least via the crowdloan mechanism), so they must determine how much funding they can\nallocate towards winning a slot."}),"\n",(0,o.jsx)(e.p,{children:"Project B fully controls how much they are willing to contribute to gaining a parachain slot.\nProject B need not work on creating a reward model for community contributors like Project A. In\ncontrast, crowdloan campaigns benefit projects with access to limited capital but have strong\ncommunity support. They are also beneficial for projects that can successfully bid to win the\nauction with self-funding but are looking for a mechanism to bootstrap their community and get\nnoticed by the key actors in the ecosystem."}),"\n",(0,o.jsx)(e.p,{children:"It is publicly visible on-chain whether or not a project is bidding directly or through a crowdloan\ncampaign. More details regarding creating and executing a crowdloan campaign are provided below."}),"\n",(0,o.jsx)(e.h2,{id:"starting-a-crowdloan-campaign",children:"Starting a Crowdloan Campaign"}),"\n",(0,o.jsxs)(e.p,{children:["Anyone who has registered a parachain can create a new crowdloan campaign for a slot by depositing a\nspecified number of tokens. A campaign is configured as a range of slots (i.e. the duration of the\n",(0,o.jsx)(e.a,{href:"/docs/learn-parachains",children:"parachain"})," will bid for), a cap, and a duration. The duration can last over\nseveral auctions as long as the range of slots matches those of the auction (i.e. the first lease\nperiod of the crowdloan is the same or bigger than that of the auction). This means a team will not\nneed to restart the campaign just because they do not secure a slot on their first attempt."]}),"\n",(0,o.jsx)(e.admonition,{title:"Crowdloan Submission Deposit Required",type:"info",children:(0,o.jsx)(e.p,{children:"To create a new crowdloan campaign, your account must have 500 DOT (or 100 KSM on Kusama)\ntransferrable which will be reserved for the duration of the crowdloan."})}),"\n",(0,o.jsx)(e.p,{children:"When setting the parameters of a crowdloan campaign, consider the following:"}),"\n",(0,o.jsxs)(e.ul,{children:["\n",(0,o.jsxs)(e.li,{children:["\n",(0,o.jsx)(e.p,{children:"A crowdloan campaign can start well before the auction slot is opened."}),"\n"]}),"\n",(0,o.jsxs)(e.li,{children:["\n",(0,o.jsxs)(e.p,{children:["The campaign creation form requires setting a crowdloan cap \u2014 the maximum amount a campaign\ncan collect. A team can still win an ",(0,o.jsx)(e.a,{href:"/docs/learn/learn-auction",children:"auction"})," if the cap is not reached."]}),"\n"]}),"\n",(0,o.jsxs)(e.li,{children:["\n",(0,o.jsx)(e.p,{children:'Set the desired end of the crowdloan in the "Ending block" field. This helps ensure that the\ncrowdloan is live during the entire auction. For example, if an auction starts in three days and\nlasts five days, you should set your crowdloan to end in 10 days or a similar timescale.'}),"\n"]}),"\n",(0,o.jsxs)(e.li,{children:["\n",(0,o.jsxs)(e.p,{children:["One way of calculating the ending block number is adding: ",(0,o.jsx)(e.code,{children:"(10 * 60 * 24 * 7) * (x * 6) + y"})]}),"\n",(0,o.jsxs)(e.ul,{children:["\n",(0,o.jsxs)(e.li,{children:["\n",(0,o.jsxs)(e.p,{children:[(0,o.jsx)(e.code,{children:"x"})," is the number of auction periods you want the crowdloan to continue for"]}),"\n"]}),"\n",(0,o.jsxs)(e.li,{children:["\n",(0,o.jsxs)(e.p,{children:[(0,o.jsx)(e.code,{children:"y"})," is the current block number"]}),"\n"]}),"\n",(0,o.jsxs)(e.li,{children:["\n",(0,o.jsx)(e.p,{children:(0,o.jsx)(e.code,{children:"(Blocks/Min * Min/Hour * Hour/Day * Day/Week) * (x[Period] * Week/Period) + y[BlockNumber]"})}),"\n"]}),"\n",(0,o.jsxs)(e.li,{children:["\n",(0,o.jsxs)(e.p,{children:['"First period" field refers to the first period you want to bid for. If the current auction\nencompasses periods ',(0,o.jsx)(e.code,{children:"(3, 4, 5, 6)"}),", your first period can be at least ",(0,o.jsx)(e.code,{children:"3"}),". The last slot must\nalso be within that range."]}),"\n"]}),"\n",(0,o.jsxs)(e.li,{children:["\n",(0,o.jsx)(e.p,{children:"You can only cancel an ongoing crowdloan if no contributions have been made. Your deposit will\nbe returned to you."}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,o.jsxs)(e.p,{children:["Before the start of the crowdloan campaign, the owner will upload the parachain data. Once the\ncrowdloan is live, ",(0,o.jsx)(e.strong,{children:"the parachain configuration will be locked"})," and will be deployed as the\nparachain's runtime. Of course, once the parachain is running, it can always change via runtime\nupgrades (as determined through its local governance)."]}),"\n",(0,o.jsx)(e.h2,{id:"supporting-a-crowdloan-campaign",children:"Supporting a Crowdloan Campaign"}),"\n",(0,o.jsx)(e.h3,{id:"contributing-to-crowdloans",children:"Contributing to Crowdloans"}),"\n",(0,o.jsx)(e.admonition,{title:"Minimum Crowdloan Contribution",type:"info",children:(0,o.jsxs)(e.p,{children:["There is a\n",(0,o.jsx)(e.a,{href:"/docs/chain-state-values#minimum-crowdloan-contribution",children:"minimum balance for contributions for a crowdloan campaign"}),".\nThis is to make crowdloans as accessible as possible while maintaining a balance to justify using\nthe network's resources."]})}),"\n",(0,o.jsxs)(e.p,{children:["Each created campaign will have an index. Once a crowdloan campaign is open, anyone can participate\nby sending a transaction referencing the campaign's index. Tokens used to participate must be\ntransferable \u2014 that is, not locked for any reason, including staking, vesting, and governance\n\u2014 because they will be moved into a module-controlled account that was generated uniquely for\nthis campaign. See ",(0,o.jsx)(e.a,{href:"/docs/learn-account-advanced#system-accounts",children:"system accounts"})," for more\ninformation."]}),"\n",(0,o.jsx)(e.admonition,{title:"Do not send Crowdloan contributions directly to the Parachain address",type:"caution",children:(0,o.jsxs)(e.p,{children:["All crowdloan contributions are handled by the Crowdloan module\u2019s logic, where a campaign is\nidentified by an index, not by address. ",(0,o.jsx)(e.strong,{children:"Never transfer tokens to an address in support of a\ncampaign"}),"."]})}),"\n",(0,o.jsx)(e.p,{children:"It is up to individual parachain teams to decide if and how they want to reward participants who\nforgo staking and choose to lock their tokens in support of the parachain\u2019s campaign. As one can\nimagine, rewards will take many forms and may vary widely among projects."}),"\n",(0,o.jsx)(e.p,{children:"If a crowdloan campaign is successful, that parachain will be on-boarded to the relay chain. The\ncollective tokens will be locked in that parachain's account for the entire duration that it is\nactive."}),"\n",(0,o.jsx)(e.h3,{id:"withdraw-crowdloaned-tokens",children:"Withdraw Crowdloaned Tokens"}),"\n",(0,o.jsx)(e.p,{children:"Participants will be able to reclaim their tokens in one of two ways:"}),"\n",(0,o.jsxs)(e.ul,{children:["\n",(0,o.jsx)(e.li,{children:"If the campaign succeeds, the parachain will enter a retirement phase at the end of its lease.\nDuring this phase, participants can withdraw the tokens with which they participated."}),"\n",(0,o.jsx)(e.li,{children:"If the campaign is unsuccessful, this retirement phase will begin at its configured end, and\nparticipants can likewise withdraw their tokens."}),"\n"]}),"\n",(0,o.jsxs)(e.admonition,{type:"tip",children:[(0,o.jsxs)(e.mdxAdmonitionTitle,{children:[(0,o.jsx)(e.code,{children:"crowdloan.contribute"})," extrinsic is trustless"]}),(0,o.jsxs)(e.p,{children:["Contributing to a crowdloan through Polkadot JS Apps (which uses ",(0,o.jsx)(e.code,{children:"crowdloan.contribute"})," extrinsic)\nguarantees that you receive your tokens after the campaign ends. If you intend to contribute through\nother websites and custodial service providers like central exchanges, review their terms and\nconditions thoroughly and assess the associated risks."]})]}),"\n",(0,o.jsxs)(e.p,{children:["Note: When the lease periods won by the crowdloan have finished, or the crowdloan has ended without\nwinning a slot, anyone can trigger the refund of crowdloan contributions back to their original\nowners. This can be done through the permissionless ",(0,o.jsx)(e.code,{children:"crowdloan.refund"})," extrinsic available on\nPolkadot JS Apps > Developer > Extrinsics page, by specifying the parachain ID. This extrinsic may\nneed to be issued multiple times if the list of contributors is too long. All contributions must be\nreturned before the crowdloan is entirely deleted."]}),"\n",(0,o.jsx)(e.p,{children:(0,o.jsx)(e.img,{alt:"Crowdloan refund",src:a(1764).A+"",width:"1440",height:"552"})}),"\n",(0,o.jsxs)(e.p,{children:["Many projects will have dashboards that allow users to participate in their crowdloans. PolkadotJS\napps also offer a breakdown of ongoing crowdloans on the\n",(0,o.jsx)(e.a,{href:"https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fkusama-rpc.polkadot.io#/parachains/crowdloan",children:"Apps page"}),"."]}),"\n",(0,o.jsx)(e.p,{children:"Here is an example of the crowdloans in play during the very first Kusama auction."}),"\n",(0,o.jsx)(e.p,{children:(0,o.jsx)(e.img,{alt:"crowdloan dashboard",src:a(41841).A+"",width:"2328",height:"1540"})}),"\n",(0,o.jsxs)(e.p,{children:["Furthermore, check out this video on\n",(0,o.jsx)(e.a,{href:"https://www.youtube.com/watch?v=YrTxDufrcQM",children:"How to Participate in Crowdloans"})," for steps on how to\naccess available crowdloans on PolkadotJS apps."]})]})}function p(n={}){const{wrapper:e}={...(0,t.R)(),...n.components};return e?(0,o.jsx)(e,{...n,children:(0,o.jsx)(h,{...n})}):h(n)}},67141:(n,e,a)=>{a.d(e,{A:()=>i});var o=a(96540),t=a(74848);const i=function(n){var e,a=n.message,i=(0,o.useState)(!0),r=i[0],s=i[1];return(0,t.jsx)(t.Fragment,{children:r&&(0,t.jsxs)("div",{className:"message-box",children:[(0,t.jsx)("button",{className:"close-button",onClick:function(){s(!1)},children:"\u2716 "}),(0,t.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(e=a,e.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},1764:(n,e,a)=>{a.d(e,{A:()=>o});const o=a.p+"assets/images/crowdloan-refund-a452b6b303e27c25b3e87c42577a9265.png"},41841:(n,e,a)=>{a.d(e,{A:()=>o});const o=a.p+"assets/images/kusama-crowdloans-0237f5d573dee5e221b51678b2ed25f1.png"},28453:(n,e,a)=>{a.d(e,{R:()=>r,x:()=>s});var o=a(96540);const t={},i=o.createContext(t);function r(n){const e=o.useContext(i);return o.useMemo((function(){return"function"==typeof n?n(e):{...e,...n}}),[e,n])}function s(n){let e;return e=n.disableParentContext?"function"==typeof n.components?n.components(t):n.components||t:r(n.components),o.createElement(i.Provider,{value:e},n.children)}}}]); \ No newline at end of file diff --git a/assets/js/b1b82dcd.6aab2caa.js b/assets/js/b1b82dcd.6aab2caa.js new file mode 100644 index 000000000000..a0e41ebf54ea --- /dev/null +++ b/assets/js/b1b82dcd.6aab2caa.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[557],{85916:(n,e,a)=>{a.r(e),a.d(e,{assets:()=>l,contentTitle:()=>c,default:()=>p,frontMatter:()=>s,metadata:()=>o,toc:()=>d});const o=JSON.parse('{"id":"learn/archive/learn-crowdloans","title":"Parachain Crowdloans","description":"Polkadot\'s Crowdloans and How to Participate.","source":"@site/../docs/learn/archive/learn-crowdloans.md","sourceDirName":"learn/archive","slug":"/learn/learn-crowdloans","permalink":"/docs/learn/learn-crowdloans","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/archive/learn-crowdloans.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1729847256000,"frontMatter":{"id":"learn-crowdloans","title":"Parachain Crowdloans","sidebar_label":"Parachain Crowdloans","description":"Polkadot\'s Crowdloans and How to Participate.","keywords":["crowdloans","parachains","lending","auction"],"slug":"../learn-crowdloans"},"sidebar":"docs","previous":{"title":"Parachain Slot Auctions","permalink":"/docs/learn/learn-auction"},"next":{"title":"Polkadot Developer Portal","permalink":"/docs/build-guide"}}');var t=a(74848),i=a(28453),r=a(67141);const s={id:"learn-crowdloans",title:"Parachain Crowdloans",sidebar_label:"Parachain Crowdloans",description:"Polkadot's Crowdloans and How to Participate.",keywords:["crowdloans","parachains","lending","auction"],slug:"../learn-crowdloans"},c=void 0,l={},d=[{value:"Crowdloan Campaigns vs Parachain Auctions",id:"crowdloan-campaigns-vs-parachain-auctions",level:2},{value:"Starting a Crowdloan Campaign",id:"starting-a-crowdloan-campaign",level:2},{value:"Supporting a Crowdloan Campaign",id:"supporting-a-crowdloan-campaign",level:2},{value:"Contributing to Crowdloans",id:"contributing-to-crowdloans",level:3},{value:"Withdraw Crowdloaned Tokens",id:"withdraw-crowdloaned-tokens",level:3}];function h(n){const e={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",img:"img",li:"li",mdxAdmonitionTitle:"mdxAdmonitionTitle",p:"p",strong:"strong",ul:"ul",...(0,i.R)(),...n.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.A,{message:"The content on this page is archived. [Agile Coretime](../learn-agile-coretime) is activated on the network, and crowdloans have been deprecated. For decentralized, transparent, and regulatory-compliant fundraising within the ecosystem, check out the [Polimec parachain](https://www.polimec.org/)."}),"\n",(0,t.jsx)(e.p,{children:"Polkadot allows parachains to source tokens for their parachain bids in a decentralized crowdloan."}),"\n",(0,t.jsx)(e.admonition,{title:"Contributing to a crowdloan",type:"note",children:(0,t.jsxs)(e.p,{children:["If you are here for guidance on how to contribute to a crowdloan, watch the video below or read this\n",(0,t.jsx)(e.a,{href:"https://support.polkadot.network/support/solutions/articles/65000177341-how-to-participate-in-crowdloans-on-polkadot-or-kusama",children:"support article on crowdloans"}),"."]})}),"\n",(0,t.jsx)("div",{className:"row",children:(0,t.jsxs)("div",{className:"col text--center",children:[(0,t.jsx)("a",{href:"https://youtu.be/AA9mPANmzmU",children:(0,t.jsx)("img",{src:"https://img.youtube.com/vi/AA9mPANmzmU/0.jpg",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,t.jsx)("p",{children:(0,t.jsx)("a",{href:"https://youtu.be/AA9mPANmzmU",children:"Crowdloans on Polkadot-JS"})})]})}),"\n",(0,t.jsx)(e.h2,{id:"crowdloan-campaigns-vs-parachain-auctions",children:"Crowdloan Campaigns vs Parachain Auctions"}),"\n",(0,t.jsxs)(e.p,{children:["It is important to recognize that starting a crowdloan campaign is ",(0,t.jsx)(e.strong,{children:"optional"})," for participating in\na parachain slot auction. The parachain slot auction can also be won directly through self-funding\nwithout community involvement. To reiterate, crowdloan campaigns are just one of the means to win\nauctions, which allow the community to participate in a trustless and permissionless way."]}),"\n",(0,t.jsx)(e.p,{children:"Let's look at a scenario where Project A is bidding for a parachain slot, but they don't have enough\ntokens to bid directly to win the parachain auction. Project A could benefit from starting a new\ncrowdloan campaign to help secure a parachain slot. Crowdloans are trustless and are supported\nnatively on the relay chain, allowing the community to bond their tokens on Project A's behalf for\nthe entire parachain lease duration. This will allow Project A to compete with projects that may\nhave access to greater capital, given the project has sufficient community support. In return, the\ncommunity contributors are rewarded by the projects that win the parachain slot, which would\ncompensate for the opportunity cost of bonding their tokens for the lease duration."}),"\n",(0,t.jsx)(e.p,{children:"On the other hand, let's say Project B, which is more established and has access to capital, is\nhoping to secure a parachain slot through self-funding. Project B is not relying on community\nfunding (at least via the crowdloan mechanism), so they must determine how much funding they can\nallocate towards winning a slot."}),"\n",(0,t.jsx)(e.p,{children:"Project B fully controls how much they are willing to contribute to gaining a parachain slot.\nProject B need not work on creating a reward model for community contributors like Project A. In\ncontrast, crowdloan campaigns benefit projects with access to limited capital but have strong\ncommunity support. They are also beneficial for projects that can successfully bid to win the\nauction with self-funding but are looking for a mechanism to bootstrap their community and get\nnoticed by the key actors in the ecosystem."}),"\n",(0,t.jsx)(e.p,{children:"It is publicly visible on-chain whether or not a project is bidding directly or through a crowdloan\ncampaign. More details regarding creating and executing a crowdloan campaign are provided below."}),"\n",(0,t.jsx)(e.h2,{id:"starting-a-crowdloan-campaign",children:"Starting a Crowdloan Campaign"}),"\n",(0,t.jsxs)(e.p,{children:["Anyone who has registered a parachain can create a new crowdloan campaign for a slot by depositing a\nspecified number of tokens. A campaign is configured as a range of slots (i.e. the duration of the\n",(0,t.jsx)(e.a,{href:"/docs/learn-parachains",children:"parachain"})," will bid for), a cap, and a duration. The duration can last over\nseveral auctions as long as the range of slots matches those of the auction (i.e. the first lease\nperiod of the crowdloan is the same or bigger than that of the auction). This means a team will not\nneed to restart the campaign just because they do not secure a slot on their first attempt."]}),"\n",(0,t.jsx)(e.admonition,{title:"Crowdloan Submission Deposit Required",type:"info",children:(0,t.jsx)(e.p,{children:"To create a new crowdloan campaign, your account must have 500 DOT (or 100 KSM on Kusama)\ntransferrable which will be reserved for the duration of the crowdloan."})}),"\n",(0,t.jsx)(e.p,{children:"When setting the parameters of a crowdloan campaign, consider the following:"}),"\n",(0,t.jsxs)(e.ul,{children:["\n",(0,t.jsxs)(e.li,{children:["\n",(0,t.jsx)(e.p,{children:"A crowdloan campaign can start well before the auction slot is opened."}),"\n"]}),"\n",(0,t.jsxs)(e.li,{children:["\n",(0,t.jsxs)(e.p,{children:["The campaign creation form requires setting a crowdloan cap \u2014 the maximum amount a campaign\ncan collect. A team can still win an ",(0,t.jsx)(e.a,{href:"/docs/learn/learn-auction",children:"auction"})," if the cap is not reached."]}),"\n"]}),"\n",(0,t.jsxs)(e.li,{children:["\n",(0,t.jsx)(e.p,{children:'Set the desired end of the crowdloan in the "Ending block" field. This helps ensure that the\ncrowdloan is live during the entire auction. For example, if an auction starts in three days and\nlasts five days, you should set your crowdloan to end in 10 days or a similar timescale.'}),"\n"]}),"\n",(0,t.jsxs)(e.li,{children:["\n",(0,t.jsxs)(e.p,{children:["One way of calculating the ending block number is adding: ",(0,t.jsx)(e.code,{children:"(10 * 60 * 24 * 7) * (x * 6) + y"})]}),"\n",(0,t.jsxs)(e.ul,{children:["\n",(0,t.jsxs)(e.li,{children:["\n",(0,t.jsxs)(e.p,{children:[(0,t.jsx)(e.code,{children:"x"})," is the number of auction periods you want the crowdloan to continue for"]}),"\n"]}),"\n",(0,t.jsxs)(e.li,{children:["\n",(0,t.jsxs)(e.p,{children:[(0,t.jsx)(e.code,{children:"y"})," is the current block number"]}),"\n"]}),"\n",(0,t.jsxs)(e.li,{children:["\n",(0,t.jsx)(e.p,{children:(0,t.jsx)(e.code,{children:"(Blocks/Min * Min/Hour * Hour/Day * Day/Week) * (x[Period] * Week/Period) + y[BlockNumber]"})}),"\n"]}),"\n",(0,t.jsxs)(e.li,{children:["\n",(0,t.jsxs)(e.p,{children:['"First period" field refers to the first period you want to bid for. If the current auction\nencompasses periods ',(0,t.jsx)(e.code,{children:"(3, 4, 5, 6)"}),", your first period can be at least ",(0,t.jsx)(e.code,{children:"3"}),". The last slot must\nalso be within that range."]}),"\n"]}),"\n",(0,t.jsxs)(e.li,{children:["\n",(0,t.jsx)(e.p,{children:"You can only cancel an ongoing crowdloan if no contributions have been made. Your deposit will\nbe returned to you."}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(e.p,{children:["Before the start of the crowdloan campaign, the owner will upload the parachain data. Once the\ncrowdloan is live, ",(0,t.jsx)(e.strong,{children:"the parachain configuration will be locked"})," and will be deployed as the\nparachain's runtime. Of course, once the parachain is running, it can always change via runtime\nupgrades (as determined through its local governance)."]}),"\n",(0,t.jsx)(e.h2,{id:"supporting-a-crowdloan-campaign",children:"Supporting a Crowdloan Campaign"}),"\n",(0,t.jsx)(e.h3,{id:"contributing-to-crowdloans",children:"Contributing to Crowdloans"}),"\n",(0,t.jsx)(e.admonition,{title:"Minimum Crowdloan Contribution",type:"info",children:(0,t.jsxs)(e.p,{children:["There is a\n",(0,t.jsx)(e.a,{href:"/docs/chain-state-values#minimum-crowdloan-contribution",children:"minimum balance for contributions for a crowdloan campaign"}),".\nThis is to make crowdloans as accessible as possible while maintaining a balance to justify using\nthe network's resources."]})}),"\n",(0,t.jsxs)(e.p,{children:["Each created campaign will have an index. Once a crowdloan campaign is open, anyone can participate\nby sending a transaction referencing the campaign's index. Tokens used to participate must be\ntransferable \u2014 that is, not locked for any reason, including staking, vesting, and governance\n\u2014 because they will be moved into a module-controlled account that was generated uniquely for\nthis campaign. See ",(0,t.jsx)(e.a,{href:"/docs/learn-account-advanced#system-accounts",children:"system accounts"})," for more\ninformation."]}),"\n",(0,t.jsx)(e.admonition,{title:"Do not send Crowdloan contributions directly to the Parachain address",type:"caution",children:(0,t.jsxs)(e.p,{children:["All crowdloan contributions are handled by the Crowdloan module\u2019s logic, where a campaign is\nidentified by an index, not by address. ",(0,t.jsx)(e.strong,{children:"Never transfer tokens to an address in support of a\ncampaign"}),"."]})}),"\n",(0,t.jsx)(e.p,{children:"It is up to individual parachain teams to decide if and how they want to reward participants who\nforgo staking and choose to lock their tokens in support of the parachain\u2019s campaign. As one can\nimagine, rewards will take many forms and may vary widely among projects."}),"\n",(0,t.jsx)(e.p,{children:"If a crowdloan campaign is successful, that parachain will be on-boarded to the relay chain. The\ncollective tokens will be locked in that parachain's account for the entire duration that it is\nactive."}),"\n",(0,t.jsx)(e.h3,{id:"withdraw-crowdloaned-tokens",children:"Withdraw Crowdloaned Tokens"}),"\n",(0,t.jsx)(e.p,{children:"Participants will be able to reclaim their tokens in one of two ways:"}),"\n",(0,t.jsxs)(e.ul,{children:["\n",(0,t.jsx)(e.li,{children:"If the campaign succeeds, the parachain will enter a retirement phase at the end of its lease.\nDuring this phase, participants can withdraw the tokens with which they participated."}),"\n",(0,t.jsx)(e.li,{children:"If the campaign is unsuccessful, this retirement phase will begin at its configured end, and\nparticipants can likewise withdraw their tokens."}),"\n"]}),"\n",(0,t.jsxs)(e.admonition,{type:"tip",children:[(0,t.jsxs)(e.mdxAdmonitionTitle,{children:[(0,t.jsx)(e.code,{children:"crowdloan.contribute"})," extrinsic is trustless"]}),(0,t.jsxs)(e.p,{children:["Contributing to a crowdloan through Polkadot JS Apps (which uses ",(0,t.jsx)(e.code,{children:"crowdloan.contribute"})," extrinsic)\nguarantees that you receive your tokens after the campaign ends. If you intend to contribute through\nother websites and custodial service providers like central exchanges, review their terms and\nconditions thoroughly and assess the associated risks."]})]}),"\n",(0,t.jsxs)(e.p,{children:["Note: When the lease periods won by the crowdloan have finished, or the crowdloan has ended without\nwinning a slot, anyone can trigger the refund of crowdloan contributions back to their original\nowners. This can be done through the permissionless ",(0,t.jsx)(e.code,{children:"crowdloan.refund"})," extrinsic available on\nPolkadot JS Apps > Developer > Extrinsics page, by specifying the parachain ID. This extrinsic may\nneed to be issued multiple times if the list of contributors is too long. All contributions must be\nreturned before the crowdloan is entirely deleted."]}),"\n",(0,t.jsx)(e.p,{children:(0,t.jsx)(e.img,{alt:"Crowdloan refund",src:a(1764).A+"",width:"1440",height:"552"})}),"\n",(0,t.jsxs)(e.p,{children:["Many projects will have dashboards that allow users to participate in their crowdloans. PolkadotJS\napps also offer a breakdown of ongoing crowdloans on the\n",(0,t.jsx)(e.a,{href:"https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fkusama-rpc.polkadot.io#/parachains/crowdloan",children:"Apps page"}),"."]}),"\n",(0,t.jsx)(e.p,{children:"Here is an example of the crowdloans in play during the very first Kusama auction."}),"\n",(0,t.jsx)(e.p,{children:(0,t.jsx)(e.img,{alt:"crowdloan dashboard",src:a(41841).A+"",width:"2328",height:"1540"})}),"\n",(0,t.jsxs)(e.p,{children:["Furthermore, check out this video on\n",(0,t.jsx)(e.a,{href:"https://www.youtube.com/watch?v=YrTxDufrcQM",children:"How to Participate in Crowdloans"})," for steps on how to\naccess available crowdloans on PolkadotJS apps."]})]})}function p(n={}){const{wrapper:e}={...(0,i.R)(),...n.components};return e?(0,t.jsx)(e,{...n,children:(0,t.jsx)(h,{...n})}):h(n)}},67141:(n,e,a)=>{a.d(e,{A:()=>i});var o=a(96540),t=a(74848);const i=function(n){var e,a=n.message,i=(0,o.useState)(!0),r=i[0],s=i[1];return(0,t.jsx)(t.Fragment,{children:r&&(0,t.jsxs)("div",{className:"message-box",children:[(0,t.jsx)("button",{className:"close-button",onClick:function(){s(!1)},children:"\u2716 "}),(0,t.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(e=a,e.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},1764:(n,e,a)=>{a.d(e,{A:()=>o});const o=a.p+"assets/images/crowdloan-refund-a452b6b303e27c25b3e87c42577a9265.png"},41841:(n,e,a)=>{a.d(e,{A:()=>o});const o=a.p+"assets/images/kusama-crowdloans-0237f5d573dee5e221b51678b2ed25f1.png"},28453:(n,e,a)=>{a.d(e,{R:()=>r,x:()=>s});var o=a(96540);const t={},i=o.createContext(t);function r(n){const e=o.useContext(i);return o.useMemo((function(){return"function"==typeof n?n(e):{...e,...n}}),[e,n])}function s(n){let e;return e=n.disableParentContext?"function"==typeof n.components?n.components(t):n.components||t:r(n.components),o.createElement(i.Provider,{value:e},n.children)}}}]); \ No newline at end of file diff --git a/assets/js/b21dd8a7.2f244e17.js b/assets/js/b21dd8a7.2f244e17.js deleted file mode 100644 index 8aa54f06054f..000000000000 --- a/assets/js/b21dd8a7.2f244e17.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6024],{28964:(e,i,n)=>{n.r(i),n.d(i,{assets:()=>r,contentTitle:()=>s,default:()=>d,frontMatter:()=>t,metadata:()=>l,toc:()=>c});var a=n(74848),o=n(28453);const t={id:"learn-comparisons-rollups",title:"Layer Two and Rollups",sidebar_label:"Layer Two and Rollups",description:"Comparison between various Rollup and L2 Protocols.",keywords:["rollups","polkadot","scalability","shared","security","parachain","ethereum"],slug:"../learn-comparisons-rollups"},s=void 0,l={id:"learn/learn-comparisons-rollups",title:"Layer Two and Rollups",description:"Comparison between various Rollup and L2 Protocols.",source:"@site/../docs/learn/learn-comparison-rollups.md",sourceDirName:"learn",slug:"/learn-comparisons-rollups",permalink:"/docs/learn-comparisons-rollups",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-comparison-rollups.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1726760224e3,frontMatter:{id:"learn-comparisons-rollups",title:"Layer Two and Rollups",sidebar_label:"Layer Two and Rollups",description:"Comparison between various Rollup and L2 Protocols.",keywords:["rollups","polkadot","scalability","shared","security","parachain","ethereum"],slug:"../learn-comparisons-rollups"},sidebar:"docs",previous:{title:"Other Comparisons",permalink:"/docs/learn-comparisons"},next:{title:"Videos",permalink:"/docs/learn-video-tutorials"}},r={},c=[{value:"Optimistic Rollups",id:"optimistic-rollups",level:2},{value:"Zero-knowledge Rollups",id:"zero-knowledge-rollups",level:2},{value:"Polkadot - Native Shared Security",id:"polkadot---native-shared-security",level:2}];function h(e){const i={a:"a",admonition:"admonition",em:"em",h2:"h2",li:"li",p:"p",strong:"strong",ul:"ul",...(0,o.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.admonition,{type:"note",children:(0,a.jsx)(i.p,{children:"This comparison covers general information regarding two widely used rollup mechanisms that are used\nto scale (usually EVM-based) blockchains and compares and contrasts how Polkadot achieves\nscalability."})}),"\n",(0,a.jsx)(i.p,{children:"Layer two (L2) networks are popular as being the way forward for blockchain scalability by\noff-loading the majority of computation from layer one (L1) networks. L2 solutions utilize the L1\nnetwork's security and functionality to build an additional layer that is often faster, reduces\nfees, and solves other platform-specific issues. In many cases, L2 solutions focus on utilizing\nblock space on a particular blockchain efficiently and cost-effectively."}),"\n",(0,a.jsxs)(i.p,{children:[(0,a.jsx)(i.strong,{children:"Rollups"}),' are an L2 scaling solution. At the most basic level, a rollup L2 solution is responsible\nfor "rolling up" transactions by batching them before publishing them to the L1 chain, usually\nthrough a network of ',(0,a.jsx)(i.strong,{children:"sequencers"}),". This mechanism could include thousands of transactions in a\nsingle rollup."]}),"\n",(0,a.jsxs)(i.p,{children:["Polkadot implements this functionality at the native level (i.e. without using L2 scaling\nsolutions), allowing for shared security and scalability of the relay chain and respective\nparachains. Shared security is a concept that has similar goals to EVM-based optimistic and\nzero-knowledge rollups. Still, instead of being implemented as a secondary layer, Polkadot\nguarantees native security and scalability for each of its parachains through the\n",(0,a.jsx)(i.a,{href:"/docs/learn-parachains-protocol",children:"Parachains Protocol"}),". Polkadot handles the coordination of data\nfrom parachains into an aggregated, representative state, somewhat similar to L2 rollups."]}),"\n",(0,a.jsx)(i.h2,{id:"optimistic-rollups",children:"Optimistic Rollups"}),"\n",(0,a.jsxs)(i.p,{children:["Optimistic rollups are an interactive scaling method for L1 blockchains. They assume\n",(0,a.jsx)(i.em,{children:"optimistically"})," that every proposed transaction is valid by default."]}),"\n",(0,a.jsxs)(i.p,{children:["In the case of mitigating potentially invalid transactions, optimistic rollups introduce a\n",(0,a.jsx)(i.em,{children:"challenge period"})," during which participants may challenge a suspect rollup. A fraud-proving scheme\nis in place to allow for several ",(0,a.jsx)(i.em,{children:"fraud proofs"})," to be submitted. Those proofs could make the rollup\nvalid or invalid. During the challenge period, state changes may be disputed, resolved, or included\nif no challenge is presented (and the required proofs are in place)."]}),"\n",(0,a.jsx)(i.p,{children:"While optimistic rollups provide scalability, they have both benefits and drawbacks to their\napproach:"}),"\n",(0,a.jsx)(i.p,{children:(0,a.jsx)(i.strong,{children:"Benefits:"})}),"\n",(0,a.jsxs)(i.ul,{children:["\n",(0,a.jsx)(i.li,{children:"They are not limited by the type of state change - any state change can be included, meaning\nexisting apps do not have to account for it."}),"\n",(0,a.jsx)(i.li,{children:"They can be parallelized for scalability."}),"\n",(0,a.jsxs)(i.li,{children:["A substantial amount of data can fit within a single rollup\n(",(0,a.jsx)(i.a,{href:"https://ethereum.org/en/developers/docs/scaling/optimistic-rollups/#scaling-ethereum-with-optimistic-rollups",children:"in the case of Ethereum, for example"}),",\ntens of thousands of transactions in a single state transition)."]}),"\n"]}),"\n",(0,a.jsx)(i.p,{children:(0,a.jsx)(i.strong,{children:"Drawbacks:"})}),"\n",(0,a.jsxs)(i.ul,{children:["\n",(0,a.jsx)(i.li,{children:"Transaction censorship and centralization are of concern, where sequencers/L2 nodes can be\ncompromised."}),"\n",(0,a.jsx)(i.li,{children:"Challenge periods could take a substantial amount of time to pass, increasing time for the rollup\nto finalize onto the L1 network."}),"\n",(0,a.jsx)(i.li,{children:"Due to their generalist nature of including any state change for their parent network, optimistic\nrollups can run into gas limitations or cause network congestion in the case of Ethereum."}),"\n"]}),"\n",(0,a.jsx)(i.p,{children:"Optimistic rollups are often used in the Ethereum ecosystem. Examples of optimistic EVM-based rollup\nsolutions include:"}),"\n",(0,a.jsxs)(i.ul,{children:["\n",(0,a.jsx)(i.li,{children:(0,a.jsx)(i.a,{href:"https://www.optimism.io/",children:"Optimism"})}),"\n",(0,a.jsx)(i.li,{children:(0,a.jsx)(i.a,{href:"https://bridge.arbitrum.io/",children:"Arbitrum"})}),"\n",(0,a.jsx)(i.li,{children:(0,a.jsx)(i.a,{href:"https://unipig.exchange/welcome",children:"Unipig"})}),"\n"]}),"\n",(0,a.jsx)(i.h2,{id:"zero-knowledge-rollups",children:"Zero-knowledge Rollups"}),"\n",(0,a.jsx)(i.p,{children:"Zero-knowledge rollups (often called ZK rollups) are a non-interactive method that utilizes\nzero-knowledge proofs to compute the validity of a particular set of state changes. Whereas\noptimistic rollups relied on fraud proofs, ZK rollups rely on cryptographic validation in the form\nof ZK proofs."}),"\n",(0,a.jsx)(i.p,{children:"Zero-knowledge rollups are significantly faster in finalization, as the cryptographic validity proof\nhandles the nuance of ensuring a rollup is valid. However, the ZK rollups often suffer from\nperformance due to their complexity and difficult implementation into resource-constrained\nenvironments. Because Turing completeness is also challenging to achieve due to this computational\noverhead, their ability to be generalized (in terms of blockspace) is reduced. However, they have a\npromising future in solving some of the problems of optimistic rollups and addressing secure\nscalability."}),"\n",(0,a.jsx)(i.p,{children:(0,a.jsx)(i.strong,{children:"Benefits:"})}),"\n",(0,a.jsxs)(i.ul,{children:["\n",(0,a.jsx)(i.li,{children:"They only require a small amount of data availability. Often, the proof is enough to ensure\nvalidity."}),"\n",(0,a.jsx)(i.li,{children:"They can be proven trustlessly."}),"\n",(0,a.jsx)(i.li,{children:"Because the proof is immediately available, finality is also instantaneous."}),"\n",(0,a.jsx)(i.li,{children:"They have a promising future overall, as they have not reached maturity yet."}),"\n"]}),"\n",(0,a.jsx)(i.p,{children:(0,a.jsx)(i.strong,{children:"Drawbacks:"})}),"\n",(0,a.jsxs)(i.ul,{children:["\n",(0,a.jsx)(i.li,{children:"They suffer from the same problems that other L2 solutions have regarding the centralization of L2\noperators."}),"\n",(0,a.jsx)(i.li,{children:"They are computationally expensive, and ZK circuits are difficult to implement."}),"\n",(0,a.jsx)(i.li,{children:"The potential for congestion is still a factor, as the amount of data could still be problematic."}),"\n"]}),"\n",(0,a.jsx)(i.h2,{id:"polkadot---native-shared-security",children:"Polkadot - Native Shared Security"}),"\n",(0,a.jsxs)(i.p,{children:["Whereas rollups are considered solutions for L2 protocols, Polkadot include this functionality\nnatively through its ",(0,a.jsx)(i.a,{href:"/docs/learn-parachains-protocol",children:"Parachains Protocol"}),". The Parachains Protocol,\nwhich is how Polkadot handles network's ",(0,a.jsx)(i.strong,{children:"sharding"})," is meant to accomplish the combined goals of\nproviding security, scalability, and availability."]}),"\n",(0,a.jsxs)(i.p,{children:["It enables parachains to verify their collective state and communicate with one another. Parachains\nhave similarities to aspects of optimistic and ZK rollups, which are reflected in how Polkadot\nhandles the validity and availability of the parachain state. ",(0,a.jsx)(i.a,{href:"/docs/learn-collator",children:"Collators"}),", a\nkey part of Polkadot architecture, are in principle similar to sequencers, as collators pass data\nwith a proof-of-validity (PoV) function for liveness and communication with the relay chain."]}),"\n",(0,a.jsxs)(i.p,{children:["Each shard, or parachain, is equipped with a unique state transition function (STF). This function\nensures that communication to the relay chain remains valid. Each STF, called runtime, is written in\n",(0,a.jsx)(i.a,{href:"https://wiki.polkadot.network/docs/learn-wasm",children:"Wasm"}),". Any state transition function is valid if it\ncompiles to Wasm and abides by the Parachains Protocol."]}),"\n",(0,a.jsxs)(i.p,{children:["Each STF runs a validity proof. The proof (",(0,a.jsx)(i.a,{href:"/docs/learn-parachains-protocol",children:"the Approval Protocol"}),")\nis interactive, unlike ZK rollups, which are non-interactive. Additionally, unlike ZK rollups, there\nare no difficulties in creating parachains with Turing-complete logic. Each parachain is also a\nfull-fledged state machine (usually in the form of a blockchain). Similarly to optimistic rollups,\nthe Parachain Protocol also has cases where disputes and resolutions of potentially harmful para\nblocks (blocks representing the parachain) can take place, in which case the validators that vouched\nfor that parablock are ",(0,a.jsx)(i.a,{href:"/docs/learn-offenses",children:"slashed"})," if it is found to be bad."]}),"\n",(0,a.jsx)(i.p,{children:(0,a.jsx)(i.strong,{children:"Benefits:"})}),"\n",(0,a.jsxs)(i.ul,{children:["\n",(0,a.jsx)(i.li,{children:"Protocol level sharding, shared security, and interoperability."}),"\n",(0,a.jsx)(i.li,{children:"Each shard has a low barrier of entry in terms of development, as anything that compiles to Wasm\nis a valid target."}),"\n",(0,a.jsx)(i.li,{children:"Fast Finality (usually under a minute on Polkadot)."}),"\n",(0,a.jsxs)(i.li,{children:["Data availability is built-in through validators and mechanisms like\n",(0,a.jsx)(i.a,{href:"/docs/learn-parachains-protocol#erasure-codes",children:"erasure coding"}),"."]}),"\n",(0,a.jsx)(i.li,{children:"No L2 implies less of a risk of incurring centralization issues for sequencers or other L2\noperators."}),"\n"]}),"\n",(0,a.jsx)(i.p,{children:(0,a.jsx)(i.strong,{children:"Drawbacks:"})}),"\n",(0,a.jsxs)(i.ul,{children:["\n",(0,a.jsx)(i.li,{children:"Execution of code in Wasm could be a performance bottleneck, as it is slower than making native\ncalls."}),"\n",(0,a.jsxs)(i.li,{children:["The relay chain sets a\n",(0,a.jsx)(i.a,{href:"https://paritytech.github.io/polkadot/book/protocol-overview.html?highlight=10#protocol-overview",children:"hard limit"}),"\non the size and weights of the PoV (Proof of Validity) blocks which contain the parachain state\ntransition data."]}),"\n"]}),"\n",(0,a.jsx)(i.p,{children:"Despite these drawbacks, Polkadot remains upgradable through forkless upgrades, which allows the\nprotocol to be easily upgradable to stay in line with future technological advances."})]})}function d(e={}){const{wrapper:i}={...(0,o.R)(),...e.components};return i?(0,a.jsx)(i,{...e,children:(0,a.jsx)(h,{...e})}):h(e)}},28453:(e,i,n)=>{n.d(i,{R:()=>s,x:()=>l});var a=n(96540);const o={},t=a.createContext(o);function s(e){const i=a.useContext(t);return a.useMemo((function(){return"function"==typeof e?e(i):{...i,...e}}),[i,e])}function l(e){let i;return i=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:s(e.components),a.createElement(t.Provider,{value:i},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/b21dd8a7.fae1c710.js b/assets/js/b21dd8a7.fae1c710.js new file mode 100644 index 000000000000..91cc63da5580 --- /dev/null +++ b/assets/js/b21dd8a7.fae1c710.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6024],{88617:(e,i,n)=>{n.r(i),n.d(i,{assets:()=>r,contentTitle:()=>l,default:()=>d,frontMatter:()=>s,metadata:()=>a,toc:()=>c});const a=JSON.parse('{"id":"learn/learn-comparisons-rollups","title":"Layer Two and Rollups","description":"Comparison between various Rollup and L2 Protocols.","source":"@site/../docs/learn/learn-comparison-rollups.md","sourceDirName":"learn","slug":"/learn-comparisons-rollups","permalink":"/docs/learn-comparisons-rollups","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-comparison-rollups.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1726760224000,"frontMatter":{"id":"learn-comparisons-rollups","title":"Layer Two and Rollups","sidebar_label":"Layer Two and Rollups","description":"Comparison between various Rollup and L2 Protocols.","keywords":["rollups","polkadot","scalability","shared","security","parachain","ethereum"],"slug":"../learn-comparisons-rollups"},"sidebar":"docs","previous":{"title":"Other Comparisons","permalink":"/docs/learn-comparisons"},"next":{"title":"Videos","permalink":"/docs/learn-video-tutorials"}}');var o=n(74848),t=n(28453);const s={id:"learn-comparisons-rollups",title:"Layer Two and Rollups",sidebar_label:"Layer Two and Rollups",description:"Comparison between various Rollup and L2 Protocols.",keywords:["rollups","polkadot","scalability","shared","security","parachain","ethereum"],slug:"../learn-comparisons-rollups"},l=void 0,r={},c=[{value:"Optimistic Rollups",id:"optimistic-rollups",level:2},{value:"Zero-knowledge Rollups",id:"zero-knowledge-rollups",level:2},{value:"Polkadot - Native Shared Security",id:"polkadot---native-shared-security",level:2}];function h(e){const i={a:"a",admonition:"admonition",em:"em",h2:"h2",li:"li",p:"p",strong:"strong",ul:"ul",...(0,t.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(i.admonition,{type:"note",children:(0,o.jsx)(i.p,{children:"This comparison covers general information regarding two widely used rollup mechanisms that are used\nto scale (usually EVM-based) blockchains and compares and contrasts how Polkadot achieves\nscalability."})}),"\n",(0,o.jsx)(i.p,{children:"Layer two (L2) networks are popular as being the way forward for blockchain scalability by\noff-loading the majority of computation from layer one (L1) networks. L2 solutions utilize the L1\nnetwork's security and functionality to build an additional layer that is often faster, reduces\nfees, and solves other platform-specific issues. In many cases, L2 solutions focus on utilizing\nblock space on a particular blockchain efficiently and cost-effectively."}),"\n",(0,o.jsxs)(i.p,{children:[(0,o.jsx)(i.strong,{children:"Rollups"}),' are an L2 scaling solution. At the most basic level, a rollup L2 solution is responsible\nfor "rolling up" transactions by batching them before publishing them to the L1 chain, usually\nthrough a network of ',(0,o.jsx)(i.strong,{children:"sequencers"}),". This mechanism could include thousands of transactions in a\nsingle rollup."]}),"\n",(0,o.jsxs)(i.p,{children:["Polkadot implements this functionality at the native level (i.e. without using L2 scaling\nsolutions), allowing for shared security and scalability of the relay chain and respective\nparachains. Shared security is a concept that has similar goals to EVM-based optimistic and\nzero-knowledge rollups. Still, instead of being implemented as a secondary layer, Polkadot\nguarantees native security and scalability for each of its parachains through the\n",(0,o.jsx)(i.a,{href:"/docs/learn-parachains-protocol",children:"Parachains Protocol"}),". Polkadot handles the coordination of data\nfrom parachains into an aggregated, representative state, somewhat similar to L2 rollups."]}),"\n",(0,o.jsx)(i.h2,{id:"optimistic-rollups",children:"Optimistic Rollups"}),"\n",(0,o.jsxs)(i.p,{children:["Optimistic rollups are an interactive scaling method for L1 blockchains. They assume\n",(0,o.jsx)(i.em,{children:"optimistically"})," that every proposed transaction is valid by default."]}),"\n",(0,o.jsxs)(i.p,{children:["In the case of mitigating potentially invalid transactions, optimistic rollups introduce a\n",(0,o.jsx)(i.em,{children:"challenge period"})," during which participants may challenge a suspect rollup. A fraud-proving scheme\nis in place to allow for several ",(0,o.jsx)(i.em,{children:"fraud proofs"})," to be submitted. Those proofs could make the rollup\nvalid or invalid. During the challenge period, state changes may be disputed, resolved, or included\nif no challenge is presented (and the required proofs are in place)."]}),"\n",(0,o.jsx)(i.p,{children:"While optimistic rollups provide scalability, they have both benefits and drawbacks to their\napproach:"}),"\n",(0,o.jsx)(i.p,{children:(0,o.jsx)(i.strong,{children:"Benefits:"})}),"\n",(0,o.jsxs)(i.ul,{children:["\n",(0,o.jsx)(i.li,{children:"They are not limited by the type of state change - any state change can be included, meaning\nexisting apps do not have to account for it."}),"\n",(0,o.jsx)(i.li,{children:"They can be parallelized for scalability."}),"\n",(0,o.jsxs)(i.li,{children:["A substantial amount of data can fit within a single rollup\n(",(0,o.jsx)(i.a,{href:"https://ethereum.org/en/developers/docs/scaling/optimistic-rollups/#scaling-ethereum-with-optimistic-rollups",children:"in the case of Ethereum, for example"}),",\ntens of thousands of transactions in a single state transition)."]}),"\n"]}),"\n",(0,o.jsx)(i.p,{children:(0,o.jsx)(i.strong,{children:"Drawbacks:"})}),"\n",(0,o.jsxs)(i.ul,{children:["\n",(0,o.jsx)(i.li,{children:"Transaction censorship and centralization are of concern, where sequencers/L2 nodes can be\ncompromised."}),"\n",(0,o.jsx)(i.li,{children:"Challenge periods could take a substantial amount of time to pass, increasing time for the rollup\nto finalize onto the L1 network."}),"\n",(0,o.jsx)(i.li,{children:"Due to their generalist nature of including any state change for their parent network, optimistic\nrollups can run into gas limitations or cause network congestion in the case of Ethereum."}),"\n"]}),"\n",(0,o.jsx)(i.p,{children:"Optimistic rollups are often used in the Ethereum ecosystem. Examples of optimistic EVM-based rollup\nsolutions include:"}),"\n",(0,o.jsxs)(i.ul,{children:["\n",(0,o.jsx)(i.li,{children:(0,o.jsx)(i.a,{href:"https://www.optimism.io/",children:"Optimism"})}),"\n",(0,o.jsx)(i.li,{children:(0,o.jsx)(i.a,{href:"https://bridge.arbitrum.io/",children:"Arbitrum"})}),"\n",(0,o.jsx)(i.li,{children:(0,o.jsx)(i.a,{href:"https://unipig.exchange/welcome",children:"Unipig"})}),"\n"]}),"\n",(0,o.jsx)(i.h2,{id:"zero-knowledge-rollups",children:"Zero-knowledge Rollups"}),"\n",(0,o.jsx)(i.p,{children:"Zero-knowledge rollups (often called ZK rollups) are a non-interactive method that utilizes\nzero-knowledge proofs to compute the validity of a particular set of state changes. Whereas\noptimistic rollups relied on fraud proofs, ZK rollups rely on cryptographic validation in the form\nof ZK proofs."}),"\n",(0,o.jsx)(i.p,{children:"Zero-knowledge rollups are significantly faster in finalization, as the cryptographic validity proof\nhandles the nuance of ensuring a rollup is valid. However, the ZK rollups often suffer from\nperformance due to their complexity and difficult implementation into resource-constrained\nenvironments. Because Turing completeness is also challenging to achieve due to this computational\noverhead, their ability to be generalized (in terms of blockspace) is reduced. However, they have a\npromising future in solving some of the problems of optimistic rollups and addressing secure\nscalability."}),"\n",(0,o.jsx)(i.p,{children:(0,o.jsx)(i.strong,{children:"Benefits:"})}),"\n",(0,o.jsxs)(i.ul,{children:["\n",(0,o.jsx)(i.li,{children:"They only require a small amount of data availability. Often, the proof is enough to ensure\nvalidity."}),"\n",(0,o.jsx)(i.li,{children:"They can be proven trustlessly."}),"\n",(0,o.jsx)(i.li,{children:"Because the proof is immediately available, finality is also instantaneous."}),"\n",(0,o.jsx)(i.li,{children:"They have a promising future overall, as they have not reached maturity yet."}),"\n"]}),"\n",(0,o.jsx)(i.p,{children:(0,o.jsx)(i.strong,{children:"Drawbacks:"})}),"\n",(0,o.jsxs)(i.ul,{children:["\n",(0,o.jsx)(i.li,{children:"They suffer from the same problems that other L2 solutions have regarding the centralization of L2\noperators."}),"\n",(0,o.jsx)(i.li,{children:"They are computationally expensive, and ZK circuits are difficult to implement."}),"\n",(0,o.jsx)(i.li,{children:"The potential for congestion is still a factor, as the amount of data could still be problematic."}),"\n"]}),"\n",(0,o.jsx)(i.h2,{id:"polkadot---native-shared-security",children:"Polkadot - Native Shared Security"}),"\n",(0,o.jsxs)(i.p,{children:["Whereas rollups are considered solutions for L2 protocols, Polkadot include this functionality\nnatively through its ",(0,o.jsx)(i.a,{href:"/docs/learn-parachains-protocol",children:"Parachains Protocol"}),". The Parachains Protocol,\nwhich is how Polkadot handles network's ",(0,o.jsx)(i.strong,{children:"sharding"})," is meant to accomplish the combined goals of\nproviding security, scalability, and availability."]}),"\n",(0,o.jsxs)(i.p,{children:["It enables parachains to verify their collective state and communicate with one another. Parachains\nhave similarities to aspects of optimistic and ZK rollups, which are reflected in how Polkadot\nhandles the validity and availability of the parachain state. ",(0,o.jsx)(i.a,{href:"/docs/learn-collator",children:"Collators"}),", a\nkey part of Polkadot architecture, are in principle similar to sequencers, as collators pass data\nwith a proof-of-validity (PoV) function for liveness and communication with the relay chain."]}),"\n",(0,o.jsxs)(i.p,{children:["Each shard, or parachain, is equipped with a unique state transition function (STF). This function\nensures that communication to the relay chain remains valid. Each STF, called runtime, is written in\n",(0,o.jsx)(i.a,{href:"https://wiki.polkadot.network/docs/learn-wasm",children:"Wasm"}),". Any state transition function is valid if it\ncompiles to Wasm and abides by the Parachains Protocol."]}),"\n",(0,o.jsxs)(i.p,{children:["Each STF runs a validity proof. The proof (",(0,o.jsx)(i.a,{href:"/docs/learn-parachains-protocol",children:"the Approval Protocol"}),")\nis interactive, unlike ZK rollups, which are non-interactive. Additionally, unlike ZK rollups, there\nare no difficulties in creating parachains with Turing-complete logic. Each parachain is also a\nfull-fledged state machine (usually in the form of a blockchain). Similarly to optimistic rollups,\nthe Parachain Protocol also has cases where disputes and resolutions of potentially harmful para\nblocks (blocks representing the parachain) can take place, in which case the validators that vouched\nfor that parablock are ",(0,o.jsx)(i.a,{href:"/docs/learn-offenses",children:"slashed"})," if it is found to be bad."]}),"\n",(0,o.jsx)(i.p,{children:(0,o.jsx)(i.strong,{children:"Benefits:"})}),"\n",(0,o.jsxs)(i.ul,{children:["\n",(0,o.jsx)(i.li,{children:"Protocol level sharding, shared security, and interoperability."}),"\n",(0,o.jsx)(i.li,{children:"Each shard has a low barrier of entry in terms of development, as anything that compiles to Wasm\nis a valid target."}),"\n",(0,o.jsx)(i.li,{children:"Fast Finality (usually under a minute on Polkadot)."}),"\n",(0,o.jsxs)(i.li,{children:["Data availability is built-in through validators and mechanisms like\n",(0,o.jsx)(i.a,{href:"/docs/learn-parachains-protocol#erasure-codes",children:"erasure coding"}),"."]}),"\n",(0,o.jsx)(i.li,{children:"No L2 implies less of a risk of incurring centralization issues for sequencers or other L2\noperators."}),"\n"]}),"\n",(0,o.jsx)(i.p,{children:(0,o.jsx)(i.strong,{children:"Drawbacks:"})}),"\n",(0,o.jsxs)(i.ul,{children:["\n",(0,o.jsx)(i.li,{children:"Execution of code in Wasm could be a performance bottleneck, as it is slower than making native\ncalls."}),"\n",(0,o.jsxs)(i.li,{children:["The relay chain sets a\n",(0,o.jsx)(i.a,{href:"https://paritytech.github.io/polkadot/book/protocol-overview.html?highlight=10#protocol-overview",children:"hard limit"}),"\non the size and weights of the PoV (Proof of Validity) blocks which contain the parachain state\ntransition data."]}),"\n"]}),"\n",(0,o.jsx)(i.p,{children:"Despite these drawbacks, Polkadot remains upgradable through forkless upgrades, which allows the\nprotocol to be easily upgradable to stay in line with future technological advances."})]})}function d(e={}){const{wrapper:i}={...(0,t.R)(),...e.components};return i?(0,o.jsx)(i,{...e,children:(0,o.jsx)(h,{...e})}):h(e)}},28453:(e,i,n)=>{n.d(i,{R:()=>s,x:()=>l});var a=n(96540);const o={},t=a.createContext(o);function s(e){const i=a.useContext(t);return a.useMemo((function(){return"function"==typeof e?e(i):{...i,...e}}),[i,e])}function l(e){let i;return i=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:s(e.components),a.createElement(t.Provider,{value:i},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/b225a2ce.80b69293.js b/assets/js/b225a2ce.80b69293.js deleted file mode 100644 index c5cfaa437bff..000000000000 --- a/assets/js/b225a2ce.80b69293.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1101],{53241:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>o,default:()=>u,frontMatter:()=>s,metadata:()=>c,toc:()=>r});var a=t(74848),i=t(28453);const s={id:"learn-xcm-docs-multilocation-summary",title:"MultiLocation",sidebar_label:"Summary",description:"Learn about XCM fundamentals.",keywords:["xcm","cross-consensus messaging","multilocation"],slug:"../multilocation-summary"},o="MultiLocation",c={id:"learn/xcm/fundamentals/multilocation/learn-xcm-docs-multilocation-summary",title:"MultiLocation",description:"Learn about XCM fundamentals.",source:"@site/../docs/learn/xcm/fundamentals/multilocation/summary.md",sourceDirName:"learn/xcm/fundamentals/multilocation",slug:"/learn/xcm/fundamentals/multilocation-summary",permalink:"/docs/learn/xcm/fundamentals/multilocation-summary",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/xcm/fundamentals/multilocation/summary.md",tags:[],version:"current",lastUpdatedBy:"bader y",lastUpdatedAt:1694099593e3,frontMatter:{id:"learn-xcm-docs-multilocation-summary",title:"MultiLocation",sidebar_label:"Summary",description:"Learn about XCM fundamentals.",keywords:["xcm","cross-consensus messaging","multilocation"],slug:"../multilocation-summary"},sidebar:"docs",previous:{title:"MultiLocation",permalink:"/docs/learn/xcm/fundamentals/multilocation"},next:{title:"Junction(s)",permalink:"/docs/learn/xcm/fundamentals/multilocation-junctions"}},l={},r=[{value:"Location is relative",id:"location-is-relative",level:3},{value:"Hierarchical structure",id:"hierarchical-structure",level:3},{value:"So what is a MultiLocation: Simple example",id:"so-what-is-a-multilocation-simple-example",level:3},{value:"What's next:",id:"whats-next",level:2}];function h(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",img:"img",li:"li",p:"p",pre:"pre",ul:"ul",...(0,i.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.header,{children:(0,a.jsx)(n.h1,{id:"multilocation",children:"MultiLocation"})}),"\n",(0,a.jsxs)(n.p,{children:["The ",(0,a.jsx)(n.a,{href:"https://paritytech.github.io/polkadot/doc/xcm/v3/struct.MultiLocation.html",children:"MultiLocation"})," type\nidentifies any single location that exists within the world of consensus. It can represent all\nmanner of things that exist within consensus, from a scalable multi-shard blockchain such as\nPolkadot down to an ERC-20 asset account on a parachain. MultiLocations are used to identify places\nto send XCMs, places that can receive assets, and can even help describe the type of an asset\nitself, as we will see in ",(0,a.jsx)(n.a,{href:"/docs/learn/xcm/fundamentals-multiasset",children:"MultiAsset"}),"."]}),"\n",(0,a.jsx)(n.h3,{id:"location-is-relative",children:"Location is relative"}),"\n",(0,a.jsx)(n.p,{children:"MultiLocation always expresses a location relative to the current location. It can be thought of as\na file system path, without the ability to directly express the \u201croot\u201d of the file system tree. This\nis for a simple reason: In the world of Polkadot, blockchains can be merged into, and split from\nother blockchains. A blockchain can begin as a standalone sovereign chain, and could eventually be\nelevated to become a parachain within a larger consensus. If it did that, then the meaning of \u201croot\u201d\nwould change overnight and this could spell chaos for XCMs and anything else using MultiLocation. To\nkeep things simple, we exclude this possibility altogether."}),"\n",(0,a.jsx)(n.h3,{id:"hierarchical-structure",children:"Hierarchical structure"}),"\n",(0,a.jsx)(n.p,{children:"Locations in XCM are hierarchical; some places in consensus are wholly encapsulated within other\nplaces in consensus. A parachain of Polkadot exists wholly within the overall Polkadot consensus; we\ncall this an interior location. Or a pallet exists wholly within a parachain or relay chain. Putting\nit more strictly, say we have two consensus systems, A and B. If any change in A implies a change in\nB, then we say A is interior to B."}),"\n",(0,a.jsx)(n.h3,{id:"so-what-is-a-multilocation-simple-example",children:"So what is a MultiLocation: Simple example"}),"\n",(0,a.jsx)(n.p,{children:"A quick summary of the previous points:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:"A MultiLocation identifies any single location that exists within the world of consensus."}),"\n",(0,a.jsx)(n.li,{children:"A MultiLocation is always relative to the current location."}),"\n",(0,a.jsx)(n.li,{children:"MultiLocations in XCM are hierarchical."}),"\n"]}),"\n",(0,a.jsx)(n.p,{children:"Now take a look at the MultiLocation struct:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-rust",children:"pub struct MultiLocation {\n pub parents: u8,\n pub interior: Junctions,\n}\n"})}),"\n",(0,a.jsx)(n.p,{children:"As we have already discussed, locations in XCM are hierarchical. The following image shows an\nexample of such a Hierarchy."}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.img,{alt:"Simple Example",src:t(30258).A+"",width:"341",height:"271"})}),"\n",(0,a.jsxs)(n.p,{children:["Relay chain A completely encapsulates Parachain A and B (indicated by the arrows) and parachain A\nencapsulates an account ",(0,a.jsx)(n.code,{children:"0x00..."}),". So RelayA is higher in the hierarchy than ParaA and ParaB and can\nbe described as the ",(0,a.jsx)(n.code,{children:"parent"})," of these parachains. The ",(0,a.jsx)(n.code,{children:"parents: u8"})," in the MultiLocation struct\ndescribes the number of steps in the hierarchy we want to move up. The ",(0,a.jsx)(n.code,{children:"interior: Junctions"})," express\nthe steps in the hierarchy we want to move down. The ",(0,a.jsx)(n.code,{children:"Junctions"})," type will be further discussed in\nthe next chapter about ",(0,a.jsx)(n.a,{href:"/docs/learn/xcm/fundamentals/multilocation-junctions",children:"Junctions"}),", but for now, it's just a way to express a way down\nthe hierarchy. As all MultiLocations are relative to the current location, Parachain B relative to\nParachain A is one step up and one step down in the hierarchy."]}),"\n",(0,a.jsxs)(n.p,{children:["To get a better understanding of this concept, we show some simple MultiLocations in the code\nexample below. The first two examples are relative to RelayA and the second set of examples is\nrelative to ParaB. In the ",(0,a.jsx)(n.code,{children:"Location"})," comments, we expressed the locations in text. The ",(0,a.jsx)(n.code,{children:".."})," express\na step up in the hierarchical structure (the \u201cparent\u201d or the encapsulating consensus system). The\n",(0,a.jsx)(n.code,{children:".."})," are followed by some number of ",(0,a.jsx)(n.a,{href:"/docs/learn/xcm/fundamentals/multilocation-junctions",children:"Junctions"}),", all separated by ",(0,a.jsx)(n.code,{children:"/"}),". The ",(0,a.jsx)(n.code,{children:"X1"})," and\n",(0,a.jsx)(n.code,{children:"X2"})," variants are expressing the number of ",(0,a.jsx)(n.code,{children:"Junction"}),"s that we step down in the hierarchical\nstructure (see ",(0,a.jsx)(n.a,{href:"/docs/learn/xcm/fundamentals/multilocation-junctions",children:"Junctions"})," for an explanation)."]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-rust",children:"// From: RelayA\n// To: ParaB\n// Location: Parachain(2000)\nMultiLocation {parents: 0, interior: X1(Parachain(2000))};\n// To: Account in ParaA\n// Location: Parachain(1000)/AccountId32(0x00..)\nMultiLocation {\n parents: 0,\n interior: X2(\n Parachain(1000),\n AccountId32{network: None, id: [0u8; 32]}\n )\n};\n\n// From: ParaB\n// To: RelayA\n// Location: ../Here\nMultiLocation {parents: 1, interior: Here};\n// To: Account in ParaA\n// Location: ../Parachain(1000)/AccountId32(0x00..)\nMultiLocation {\n parents: 1,\n interior: X2(\n Parachain(1000),\n AccountId32{network: None, id: [0u8; 32]}\n )\n};\n"})}),"\n",(0,a.jsx)(n.h2,{id:"whats-next",children:"What's next:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["More information about ",(0,a.jsx)(n.a,{href:"/docs/learn/xcm/fundamentals/multilocation-junctions",children:"junctions"})]}),"\n",(0,a.jsxs)(n.li,{children:["More MultiLocation ",(0,a.jsx)(n.a,{href:"/docs/learn/xcm/fundamentals/multilocation-example",children:"examples"})]}),"\n",(0,a.jsx)(n.li,{children:"Expressing assets using Multilocations: [MultiAsset][../multiasset.md]"}),"\n"]})]})}function u(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(h,{...e})}):h(e)}},30258:(e,n,t)=>{t.d(n,{A:()=>a});const a=t.p+"assets/images/MultiLocation_simple_example-f2857ab7c4530ec864532d6ee3c4e30c.png"},28453:(e,n,t)=>{t.d(n,{R:()=>o,x:()=>c});var a=t(96540);const i={},s=a.createContext(i);function o(e){const n=a.useContext(s);return a.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:o(e.components),a.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/b225a2ce.f2983d0d.js b/assets/js/b225a2ce.f2983d0d.js new file mode 100644 index 000000000000..e26d09fc442b --- /dev/null +++ b/assets/js/b225a2ce.f2983d0d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1101],{28179:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>c,default:()=>u,frontMatter:()=>o,metadata:()=>a,toc:()=>r});const a=JSON.parse('{"id":"learn/xcm/fundamentals/multilocation/learn-xcm-docs-multilocation-summary","title":"MultiLocation","description":"Learn about XCM fundamentals.","source":"@site/../docs/learn/xcm/fundamentals/multilocation/summary.md","sourceDirName":"learn/xcm/fundamentals/multilocation","slug":"/learn/xcm/fundamentals/multilocation-summary","permalink":"/docs/learn/xcm/fundamentals/multilocation-summary","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/xcm/fundamentals/multilocation/summary.md","tags":[],"version":"current","lastUpdatedBy":"bader y","lastUpdatedAt":1694099593000,"frontMatter":{"id":"learn-xcm-docs-multilocation-summary","title":"MultiLocation","sidebar_label":"Summary","description":"Learn about XCM fundamentals.","keywords":["xcm","cross-consensus messaging","multilocation"],"slug":"../multilocation-summary"},"sidebar":"docs","previous":{"title":"MultiLocation","permalink":"/docs/learn/xcm/fundamentals/multilocation"},"next":{"title":"Junction(s)","permalink":"/docs/learn/xcm/fundamentals/multilocation-junctions"}}');var i=t(74848),s=t(28453);const o={id:"learn-xcm-docs-multilocation-summary",title:"MultiLocation",sidebar_label:"Summary",description:"Learn about XCM fundamentals.",keywords:["xcm","cross-consensus messaging","multilocation"],slug:"../multilocation-summary"},c="MultiLocation",l={},r=[{value:"Location is relative",id:"location-is-relative",level:3},{value:"Hierarchical structure",id:"hierarchical-structure",level:3},{value:"So what is a MultiLocation: Simple example",id:"so-what-is-a-multilocation-simple-example",level:3},{value:"What's next:",id:"whats-next",level:2}];function h(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",img:"img",li:"li",p:"p",pre:"pre",ul:"ul",...(0,s.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.header,{children:(0,i.jsx)(n.h1,{id:"multilocation",children:"MultiLocation"})}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.a,{href:"https://paritytech.github.io/polkadot/doc/xcm/v3/struct.MultiLocation.html",children:"MultiLocation"})," type\nidentifies any single location that exists within the world of consensus. It can represent all\nmanner of things that exist within consensus, from a scalable multi-shard blockchain such as\nPolkadot down to an ERC-20 asset account on a parachain. MultiLocations are used to identify places\nto send XCMs, places that can receive assets, and can even help describe the type of an asset\nitself, as we will see in ",(0,i.jsx)(n.a,{href:"/docs/learn/xcm/fundamentals-multiasset",children:"MultiAsset"}),"."]}),"\n",(0,i.jsx)(n.h3,{id:"location-is-relative",children:"Location is relative"}),"\n",(0,i.jsx)(n.p,{children:"MultiLocation always expresses a location relative to the current location. It can be thought of as\na file system path, without the ability to directly express the \u201croot\u201d of the file system tree. This\nis for a simple reason: In the world of Polkadot, blockchains can be merged into, and split from\nother blockchains. A blockchain can begin as a standalone sovereign chain, and could eventually be\nelevated to become a parachain within a larger consensus. If it did that, then the meaning of \u201croot\u201d\nwould change overnight and this could spell chaos for XCMs and anything else using MultiLocation. To\nkeep things simple, we exclude this possibility altogether."}),"\n",(0,i.jsx)(n.h3,{id:"hierarchical-structure",children:"Hierarchical structure"}),"\n",(0,i.jsx)(n.p,{children:"Locations in XCM are hierarchical; some places in consensus are wholly encapsulated within other\nplaces in consensus. A parachain of Polkadot exists wholly within the overall Polkadot consensus; we\ncall this an interior location. Or a pallet exists wholly within a parachain or relay chain. Putting\nit more strictly, say we have two consensus systems, A and B. If any change in A implies a change in\nB, then we say A is interior to B."}),"\n",(0,i.jsx)(n.h3,{id:"so-what-is-a-multilocation-simple-example",children:"So what is a MultiLocation: Simple example"}),"\n",(0,i.jsx)(n.p,{children:"A quick summary of the previous points:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"A MultiLocation identifies any single location that exists within the world of consensus."}),"\n",(0,i.jsx)(n.li,{children:"A MultiLocation is always relative to the current location."}),"\n",(0,i.jsx)(n.li,{children:"MultiLocations in XCM are hierarchical."}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"Now take a look at the MultiLocation struct:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-rust",children:"pub struct MultiLocation {\n pub parents: u8,\n pub interior: Junctions,\n}\n"})}),"\n",(0,i.jsx)(n.p,{children:"As we have already discussed, locations in XCM are hierarchical. The following image shows an\nexample of such a Hierarchy."}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"Simple Example",src:t(30258).A+"",width:"341",height:"271"})}),"\n",(0,i.jsxs)(n.p,{children:["Relay chain A completely encapsulates Parachain A and B (indicated by the arrows) and parachain A\nencapsulates an account ",(0,i.jsx)(n.code,{children:"0x00..."}),". So RelayA is higher in the hierarchy than ParaA and ParaB and can\nbe described as the ",(0,i.jsx)(n.code,{children:"parent"})," of these parachains. The ",(0,i.jsx)(n.code,{children:"parents: u8"})," in the MultiLocation struct\ndescribes the number of steps in the hierarchy we want to move up. The ",(0,i.jsx)(n.code,{children:"interior: Junctions"})," express\nthe steps in the hierarchy we want to move down. The ",(0,i.jsx)(n.code,{children:"Junctions"})," type will be further discussed in\nthe next chapter about ",(0,i.jsx)(n.a,{href:"/docs/learn/xcm/fundamentals/multilocation-junctions",children:"Junctions"}),", but for now, it's just a way to express a way down\nthe hierarchy. As all MultiLocations are relative to the current location, Parachain B relative to\nParachain A is one step up and one step down in the hierarchy."]}),"\n",(0,i.jsxs)(n.p,{children:["To get a better understanding of this concept, we show some simple MultiLocations in the code\nexample below. The first two examples are relative to RelayA and the second set of examples is\nrelative to ParaB. In the ",(0,i.jsx)(n.code,{children:"Location"})," comments, we expressed the locations in text. The ",(0,i.jsx)(n.code,{children:".."})," express\na step up in the hierarchical structure (the \u201cparent\u201d or the encapsulating consensus system). The\n",(0,i.jsx)(n.code,{children:".."})," are followed by some number of ",(0,i.jsx)(n.a,{href:"/docs/learn/xcm/fundamentals/multilocation-junctions",children:"Junctions"}),", all separated by ",(0,i.jsx)(n.code,{children:"/"}),". The ",(0,i.jsx)(n.code,{children:"X1"})," and\n",(0,i.jsx)(n.code,{children:"X2"})," variants are expressing the number of ",(0,i.jsx)(n.code,{children:"Junction"}),"s that we step down in the hierarchical\nstructure (see ",(0,i.jsx)(n.a,{href:"/docs/learn/xcm/fundamentals/multilocation-junctions",children:"Junctions"})," for an explanation)."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-rust",children:"// From: RelayA\n// To: ParaB\n// Location: Parachain(2000)\nMultiLocation {parents: 0, interior: X1(Parachain(2000))};\n// To: Account in ParaA\n// Location: Parachain(1000)/AccountId32(0x00..)\nMultiLocation {\n parents: 0,\n interior: X2(\n Parachain(1000),\n AccountId32{network: None, id: [0u8; 32]}\n )\n};\n\n// From: ParaB\n// To: RelayA\n// Location: ../Here\nMultiLocation {parents: 1, interior: Here};\n// To: Account in ParaA\n// Location: ../Parachain(1000)/AccountId32(0x00..)\nMultiLocation {\n parents: 1,\n interior: X2(\n Parachain(1000),\n AccountId32{network: None, id: [0u8; 32]}\n )\n};\n"})}),"\n",(0,i.jsx)(n.h2,{id:"whats-next",children:"What's next:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["More information about ",(0,i.jsx)(n.a,{href:"/docs/learn/xcm/fundamentals/multilocation-junctions",children:"junctions"})]}),"\n",(0,i.jsxs)(n.li,{children:["More MultiLocation ",(0,i.jsx)(n.a,{href:"/docs/learn/xcm/fundamentals/multilocation-example",children:"examples"})]}),"\n",(0,i.jsx)(n.li,{children:"Expressing assets using Multilocations: [MultiAsset][../multiasset.md]"}),"\n"]})]})}function u(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(h,{...e})}):h(e)}},30258:(e,n,t)=>{t.d(n,{A:()=>a});const a=t.p+"assets/images/MultiLocation_simple_example-f2857ab7c4530ec864532d6ee3c4e30c.png"},28453:(e,n,t)=>{t.d(n,{R:()=>o,x:()=>c});var a=t(96540);const i={},s=a.createContext(i);function o(e){const n=a.useContext(s);return a.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:o(e.components),a.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/b3558274.c34af154.js b/assets/js/b3558274.c34af154.js deleted file mode 100644 index 2bb8531d1dfd..000000000000 --- a/assets/js/b3558274.c34af154.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3975],{57844:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>i,contentTitle:()=>d,default:()=>c,frontMatter:()=>o,metadata:()=>r,toc:()=>l});var s=a(74848),n=a(28453);const o={id:"polkadot-staking-dashboard",title:"Polkadot Staking Dashboard",sidebar_label:"Staking Dashboard",description:"Polkadot Staking Dashboard descriptions",keywords:["polkadot","governance","dashboard","dune"],slug:"../polkadot-staking-dashboard"},d="Polkadot Staking Dashboard",r={id:"general/dune-analytics/polkadot-dashboards/legacy/polkadot-staking-dashboard",title:"Polkadot Staking Dashboard",description:"Polkadot Staking Dashboard descriptions",source:"@site/../docs/general/dune-analytics/polkadot-dashboards/legacy/polkadot-staking-dashboard.md",sourceDirName:"general/dune-analytics/polkadot-dashboards/legacy",slug:"/general/dune-analytics/polkadot-dashboards/polkadot-staking-dashboard",permalink:"/docs/general/dune-analytics/polkadot-dashboards/polkadot-staking-dashboard",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/polkadot-dashboards/legacy/polkadot-staking-dashboard.md",tags:[],version:"current",lastUpdatedBy:"MK",lastUpdatedAt:1717658873e3,frontMatter:{id:"polkadot-staking-dashboard",title:"Polkadot Staking Dashboard",sidebar_label:"Staking Dashboard",description:"Polkadot Staking Dashboard descriptions",keywords:["polkadot","governance","dashboard","dune"],slug:"../polkadot-staking-dashboard"}},i={},l=[{value:"View On Dune: Polkadot Staking Dashboard",id:"view-on-dune-polkadot-staking-dashboard",level:2},{value:"Polkadot Staking Dashboard",id:"polkadot-staking-dashboard-1",level:2},{value:"Rewards Rate Math",id:"rewards-rate-math",level:2},{value:"Sources",id:"sources",level:2}];function h(e){const t={a:"a",em:"em",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",strong:"strong",ul:"ul",...(0,n.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.header,{children:(0,s.jsx)(t.h1,{id:"polkadot-staking-dashboard",children:"Polkadot Staking Dashboard"})}),"\n",(0,s.jsxs)(t.h2,{id:"view-on-dune-polkadot-staking-dashboard",children:["View On Dune: ",(0,s.jsx)(t.a,{href:"https://dune.com/substrate/polkadot-staking",children:"Polkadot Staking Dashboard"})]}),"\n",(0,s.jsx)(t.h2,{id:"polkadot-staking-dashboard-1",children:"Polkadot Staking Dashboard"}),"\n",(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.strong,{children:"Completed Era"})," - completed era can have at most 2 days delay before the staking rewards & apy\ncomputation becomes available. The Staking Home Page is showing the most recently completed era"]}),"\n",(0,s.jsxs)(t.p,{children:["Please note that Reward Rate and Effective Reward Rate can be volatile as erapoint varies based on\nnetwork condition and total delegation amount are subject to\n",(0,s.jsx)(t.a,{href:"https://wiki.polkadot.network/docs/learn-phragmen",children:"phragmen algo"})]}),"\n",(0,s.jsxs)(t.p,{children:["Authored by ",(0,s.jsx)(t.em,{children:"Stanley"}),", ",(0,s.jsx)(t.em,{children:"Jerry"}),", and ",(0,s.jsx)(t.em,{children:"William"})," ",(0,s.jsx)(t.a,{href:"https://x.com/colorfulnotion",children:(0,s.jsx)(t.strong,{children:"@ colorfulnotion"})}),"\n(QA'ed: ",(0,s.jsx)(t.em,{children:"MK"}),")"]}),"\n",(0,s.jsx)(t.h2,{id:"rewards-rate-math",children:"Rewards Rate Math"}),"\n",(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.strong,{children:"Reward Rate"})," - computed as (validator_erasRewardPoints/erasRewardPoints_total) *\nErasValidatorReward / validator_total_stake."]}),"\n",(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.strong,{children:"Effective Reward Rate"})," - computed as (1-validator",(0,s.jsx)(t.em,{children:"commision) *\n(validator"}),"erasRewardPoints/erasRewardPoints_total) * ErasValidatorReward / validator_total_stake -\nIn other words, (1-validator_commision) *Reward Rate, after considering validator_commision"]}),"\n",(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.strong,{children:"Normalized Reward Rate"})," - computed as total_era_rewards / number_of_validators * (1 -\ncommission) / validator_total_stake. This metric nomoralized the reward rate across active validator\nsets"]}),"\n",(0,s.jsx)(t.h2,{id:"sources",children:"Sources"}),"\n",(0,s.jsxs)(t.p,{children:["Raw staking data can be found at ",(0,s.jsx)(t.strong,{children:"polkadot.stakings"})," table. To demonstrate how to compute and\ngenerate ",(0,s.jsx)(t.em,{children:"validators"}),", ",(0,s.jsx)(t.em,{children:"nominators"}),", ",(0,s.jsx)(t.em,{children:"pools"}),", ",(0,s.jsx)(t.em,{children:"poolmembers"})," ",(0,s.jsx)(t.strong,{children:"granular metrics"}),", the following\nqueries have been provided:"]}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.strong,{children:"Validators"})," - ",(0,s.jsx)(t.a,{href:"https://dune.com/queries/3302709",children:(0,s.jsx)(t.strong,{children:"dune.substrate.result_polkadot_validators"})}),"\n(MetVeiw)"]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.strong,{children:"Nominators"})," - ",(0,s.jsx)(t.a,{href:"https://dune.com/queries/3326829",children:(0,s.jsx)(t.strong,{children:"dune.substrate.result_polkadot_nominators"})}),"\n(MetVeiw)"]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.strong,{children:"Nomination Pools"})," -\n",(0,s.jsx)(t.a,{href:"https://dune.com/queries/3327350",children:(0,s.jsx)(t.strong,{children:"dune.substrate.result_polkadot_nominationpools"})})," (MetVeiw)"]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.strong,{children:"Pool Members"})," -\n",(0,s.jsx)(t.a,{href:"https://dune.com/queries/3327479",children:(0,s.jsx)(t.strong,{children:"dune.substrate.result_polkadot_poolmembers"})})," (MetVeiw)"]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.strong,{children:"On-Chain Identities"})," -\n",(0,s.jsx)(t.a,{href:"https://dune.com/queries/3420617",children:(0,s.jsx)(t.strong,{children:"dune.substrate.result_polkadot_identity"})})," (MetVeiw)"]}),"\n"]}),"\n",(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.em,{children:"Github repo"}),": ",(0,s.jsx)(t.a,{href:"https://github.com/colorfulnotion/substrate-etl",children:(0,s.jsx)(t.em,{children:(0,s.jsx)(t.strong,{children:"substrate-etl"})})})]}),"\n",(0,s.jsx)("iframe",{src:"https://dune.com/embeds/3335920/5589273/",height:"350",width:"100%"}),"\n",(0,s.jsx)("iframe",{src:"https://dune.com/embeds/3338274/5593554/",height:"350",width:"100%"}),"\n",(0,s.jsx)("iframe",{src:"https://dune.com/embeds/3345583/5606404/",height:"350",width:"100%"}),"\n",(0,s.jsx)("iframe",{src:"https://dune.com/embeds/3338274/5817115/",height:"350",width:"100%"}),"\n",(0,s.jsx)("iframe",{src:"https://dune.com/embeds/3334573/5586661/",height:"350",width:"100%"}),"\n",(0,s.jsx)("iframe",{src:"https://dune.com/embeds/3459220/5813496/",height:"350",width:"100%"}),"\n",(0,s.jsx)("iframe",{src:"https://dune.com/embeds/3302959/5531365/",height:"350",width:"100%"}),"\n",(0,s.jsx)("iframe",{src:"https://dune.com/embeds/3303032/5531577/",height:"350",width:"100%"}),"\n",(0,s.jsx)("iframe",{src:"https://dune.com/embeds/3459195/5813464/",height:"350",width:"100%"}),"\n",(0,s.jsx)("iframe",{src:"https://dune.com/embeds/3414552/5732594/",height:"350",width:"100%"}),"\n",(0,s.jsx)("iframe",{src:"https://dune.com/embeds/3334817/5603258/",height:"350",width:"100%"}),"\n",(0,s.jsx)("iframe",{src:"https://dune.com/embeds/3334817/5587364/",height:"350",width:"100%"})]})}function c(e={}){const{wrapper:t}={...(0,n.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}},28453:(e,t,a)=>{a.d(t,{R:()=>d,x:()=>r});var s=a(96540);const n={},o=s.createContext(n);function d(e){const t=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:d(e.components),s.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/b3558274.ea22508e.js b/assets/js/b3558274.ea22508e.js new file mode 100644 index 000000000000..d9538b50ce85 --- /dev/null +++ b/assets/js/b3558274.ea22508e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3975],{24716:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>i,contentTitle:()=>r,default:()=>c,frontMatter:()=>d,metadata:()=>s,toc:()=>l});const s=JSON.parse('{"id":"general/dune-analytics/polkadot-dashboards/legacy/polkadot-staking-dashboard","title":"Polkadot Staking Dashboard","description":"Polkadot Staking Dashboard descriptions","source":"@site/../docs/general/dune-analytics/polkadot-dashboards/legacy/polkadot-staking-dashboard.md","sourceDirName":"general/dune-analytics/polkadot-dashboards/legacy","slug":"/general/dune-analytics/polkadot-dashboards/polkadot-staking-dashboard","permalink":"/docs/general/dune-analytics/polkadot-dashboards/polkadot-staking-dashboard","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/polkadot-dashboards/legacy/polkadot-staking-dashboard.md","tags":[],"version":"current","lastUpdatedBy":"MK","lastUpdatedAt":1717658873000,"frontMatter":{"id":"polkadot-staking-dashboard","title":"Polkadot Staking Dashboard","sidebar_label":"Staking Dashboard","description":"Polkadot Staking Dashboard descriptions","keywords":["polkadot","governance","dashboard","dune"],"slug":"../polkadot-staking-dashboard"}}');var n=a(74848),o=a(28453);const d={id:"polkadot-staking-dashboard",title:"Polkadot Staking Dashboard",sidebar_label:"Staking Dashboard",description:"Polkadot Staking Dashboard descriptions",keywords:["polkadot","governance","dashboard","dune"],slug:"../polkadot-staking-dashboard"},r="Polkadot Staking Dashboard",i={},l=[{value:"View On Dune: Polkadot Staking Dashboard",id:"view-on-dune-polkadot-staking-dashboard",level:2},{value:"Polkadot Staking Dashboard",id:"polkadot-staking-dashboard-1",level:2},{value:"Rewards Rate Math",id:"rewards-rate-math",level:2},{value:"Sources",id:"sources",level:2}];function h(e){const t={a:"a",em:"em",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",strong:"strong",ul:"ul",...(0,o.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.header,{children:(0,n.jsx)(t.h1,{id:"polkadot-staking-dashboard",children:"Polkadot Staking Dashboard"})}),"\n",(0,n.jsxs)(t.h2,{id:"view-on-dune-polkadot-staking-dashboard",children:["View On Dune: ",(0,n.jsx)(t.a,{href:"https://dune.com/substrate/polkadot-staking",children:"Polkadot Staking Dashboard"})]}),"\n",(0,n.jsx)(t.h2,{id:"polkadot-staking-dashboard-1",children:"Polkadot Staking Dashboard"}),"\n",(0,n.jsxs)(t.p,{children:[(0,n.jsx)(t.strong,{children:"Completed Era"})," - completed era can have at most 2 days delay before the staking rewards & apy\ncomputation becomes available. The Staking Home Page is showing the most recently completed era"]}),"\n",(0,n.jsxs)(t.p,{children:["Please note that Reward Rate and Effective Reward Rate can be volatile as erapoint varies based on\nnetwork condition and total delegation amount are subject to\n",(0,n.jsx)(t.a,{href:"https://wiki.polkadot.network/docs/learn-phragmen",children:"phragmen algo"})]}),"\n",(0,n.jsxs)(t.p,{children:["Authored by ",(0,n.jsx)(t.em,{children:"Stanley"}),", ",(0,n.jsx)(t.em,{children:"Jerry"}),", and ",(0,n.jsx)(t.em,{children:"William"})," ",(0,n.jsx)(t.a,{href:"https://x.com/colorfulnotion",children:(0,n.jsx)(t.strong,{children:"@ colorfulnotion"})}),"\n(QA'ed: ",(0,n.jsx)(t.em,{children:"MK"}),")"]}),"\n",(0,n.jsx)(t.h2,{id:"rewards-rate-math",children:"Rewards Rate Math"}),"\n",(0,n.jsxs)(t.p,{children:[(0,n.jsx)(t.strong,{children:"Reward Rate"})," - computed as (validator_erasRewardPoints/erasRewardPoints_total) *\nErasValidatorReward / validator_total_stake."]}),"\n",(0,n.jsxs)(t.p,{children:[(0,n.jsx)(t.strong,{children:"Effective Reward Rate"})," - computed as (1-validator",(0,n.jsx)(t.em,{children:"commision) *\n(validator"}),"erasRewardPoints/erasRewardPoints_total) * ErasValidatorReward / validator_total_stake -\nIn other words, (1-validator_commision) *Reward Rate, after considering validator_commision"]}),"\n",(0,n.jsxs)(t.p,{children:[(0,n.jsx)(t.strong,{children:"Normalized Reward Rate"})," - computed as total_era_rewards / number_of_validators * (1 -\ncommission) / validator_total_stake. This metric nomoralized the reward rate across active validator\nsets"]}),"\n",(0,n.jsx)(t.h2,{id:"sources",children:"Sources"}),"\n",(0,n.jsxs)(t.p,{children:["Raw staking data can be found at ",(0,n.jsx)(t.strong,{children:"polkadot.stakings"})," table. To demonstrate how to compute and\ngenerate ",(0,n.jsx)(t.em,{children:"validators"}),", ",(0,n.jsx)(t.em,{children:"nominators"}),", ",(0,n.jsx)(t.em,{children:"pools"}),", ",(0,n.jsx)(t.em,{children:"poolmembers"})," ",(0,n.jsx)(t.strong,{children:"granular metrics"}),", the following\nqueries have been provided:"]}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.strong,{children:"Validators"})," - ",(0,n.jsx)(t.a,{href:"https://dune.com/queries/3302709",children:(0,n.jsx)(t.strong,{children:"dune.substrate.result_polkadot_validators"})}),"\n(MetVeiw)"]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.strong,{children:"Nominators"})," - ",(0,n.jsx)(t.a,{href:"https://dune.com/queries/3326829",children:(0,n.jsx)(t.strong,{children:"dune.substrate.result_polkadot_nominators"})}),"\n(MetVeiw)"]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.strong,{children:"Nomination Pools"})," -\n",(0,n.jsx)(t.a,{href:"https://dune.com/queries/3327350",children:(0,n.jsx)(t.strong,{children:"dune.substrate.result_polkadot_nominationpools"})})," (MetVeiw)"]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.strong,{children:"Pool Members"})," -\n",(0,n.jsx)(t.a,{href:"https://dune.com/queries/3327479",children:(0,n.jsx)(t.strong,{children:"dune.substrate.result_polkadot_poolmembers"})})," (MetVeiw)"]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.strong,{children:"On-Chain Identities"})," -\n",(0,n.jsx)(t.a,{href:"https://dune.com/queries/3420617",children:(0,n.jsx)(t.strong,{children:"dune.substrate.result_polkadot_identity"})})," (MetVeiw)"]}),"\n"]}),"\n",(0,n.jsxs)(t.p,{children:[(0,n.jsx)(t.em,{children:"Github repo"}),": ",(0,n.jsx)(t.a,{href:"https://github.com/colorfulnotion/substrate-etl",children:(0,n.jsx)(t.em,{children:(0,n.jsx)(t.strong,{children:"substrate-etl"})})})]}),"\n",(0,n.jsx)("iframe",{src:"https://dune.com/embeds/3335920/5589273/",height:"350",width:"100%"}),"\n",(0,n.jsx)("iframe",{src:"https://dune.com/embeds/3338274/5593554/",height:"350",width:"100%"}),"\n",(0,n.jsx)("iframe",{src:"https://dune.com/embeds/3345583/5606404/",height:"350",width:"100%"}),"\n",(0,n.jsx)("iframe",{src:"https://dune.com/embeds/3338274/5817115/",height:"350",width:"100%"}),"\n",(0,n.jsx)("iframe",{src:"https://dune.com/embeds/3334573/5586661/",height:"350",width:"100%"}),"\n",(0,n.jsx)("iframe",{src:"https://dune.com/embeds/3459220/5813496/",height:"350",width:"100%"}),"\n",(0,n.jsx)("iframe",{src:"https://dune.com/embeds/3302959/5531365/",height:"350",width:"100%"}),"\n",(0,n.jsx)("iframe",{src:"https://dune.com/embeds/3303032/5531577/",height:"350",width:"100%"}),"\n",(0,n.jsx)("iframe",{src:"https://dune.com/embeds/3459195/5813464/",height:"350",width:"100%"}),"\n",(0,n.jsx)("iframe",{src:"https://dune.com/embeds/3414552/5732594/",height:"350",width:"100%"}),"\n",(0,n.jsx)("iframe",{src:"https://dune.com/embeds/3334817/5603258/",height:"350",width:"100%"}),"\n",(0,n.jsx)("iframe",{src:"https://dune.com/embeds/3334817/5587364/",height:"350",width:"100%"})]})}function c(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(h,{...e})}):h(e)}},28453:(e,t,a)=>{a.d(t,{R:()=>d,x:()=>r});var s=a(96540);const n={},o=s.createContext(n);function d(e){const t=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:d(e.components),s.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/b3719d54.09288277.js b/assets/js/b3719d54.09288277.js deleted file mode 100644 index ac701b113cff..000000000000 --- a/assets/js/b3719d54.09288277.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8290],{106:(e,n,a)=>{a.r(n),a.d(n,{assets:()=>l,contentTitle:()=>s,default:()=>h,frontMatter:()=>i,metadata:()=>r,toc:()=>c});var t=a(74848),o=a(28453);const i={id:"polkadot-v1",title:"Polkadot 1.0",sidebar_label:"Polkadot 1.0",description:"Polkadot's 1.0, Blockspace, Decentralization and Resilience.",keywords:["polkadot vison","polkadot 1.0","Blockspace","Resilience","Decentralization"],slug:"../polkadot-v1"},s=void 0,r={id:"general/polkadot-v1",title:"Polkadot 1.0",description:"Polkadot's 1.0, Blockspace, Decentralization and Resilience.",source:"@site/../docs/general/polkadot-v1.md",sourceDirName:"general",slug:"/polkadot-v1",permalink:"/docs/polkadot-v1",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/polkadot-v1.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1727991122e3,frontMatter:{id:"polkadot-v1",title:"Polkadot 1.0",sidebar_label:"Polkadot 1.0",description:"Polkadot's 1.0, Blockspace, Decentralization and Resilience.",keywords:["polkadot vison","polkadot 1.0","Blockspace","Resilience","Decentralization"],slug:"../polkadot-v1"},sidebar:"docs",previous:{title:"Polkadot Vision",permalink:"/docs/polkadot-vision-index"},next:{title:"Polkadot Direction",permalink:"/docs/polkadot-direction"}},l={},c=[{value:"Polkadot 1.0",id:"polkadot-10",level:2},{value:"Polkadot's Representation",id:"polkadots-representation",level:3},{value:"Polkadot's Additional Functionalities",id:"polkadots-additional-functionalities",level:3},{value:"Polkadot's Resilience",id:"polkadots-resilience",level:3},{value:"Polkadot's Blockspace",id:"polkadots-blockspace",level:3},{value:"A Perspective Shift: Upcoming Polkadot Features",id:"a-perspective-shift-upcoming-polkadot-features",level:3}];function d(e){const n={a:"a",em:"em",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",strong:"strong",ul:"ul",...(0,o.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.p,{children:"Since the release of Bitcoin in 2009, blockchain projects increased exponentially to the order of\ntens of thousands. Different projects have different value propositions, suggesting that the future\nwill be multi-chain and that inter-chain communication will be crucial to establish collaborations\nand leveraging each other strengths."}),"\n",(0,t.jsx)(n.h2,{id:"polkadot-10",children:"Polkadot 1.0"}),"\n",(0,t.jsxs)(n.p,{children:["Polkadot 1.0 reflected the status of Polkadot in 2023 at time of the release of the\n",(0,t.jsx)(n.a,{href:"https://github.com/paritytech/polkadot/releases/tag/v1.0.0",children:"Polkadot runtime v1.0.0"}),". This sections\nfocuses on Polkadot 1.0 and some philosophical digressions about network resilience and blockspace."]}),"\n",(0,t.jsx)(n.p,{children:"Polkadot is a Layer-0 blockchain that brings to the multi-chain vision the following innovations and\ninitiatives:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Application-specific Layer-1 (L1) blockchains (or parachains)."})," Polkadot is a sharded network\nwhere transactions are processed in parallel with each shard. Polkadot shards can be heterogenous\n(i.e. they do not need the same state transition function as in the proposed Ethereum sharding\narchitecture). This allows to build L1 chains designed explicitly around their application and\nvalue proposition."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Shared security and financial scalability of L1 chains"}),". Any L1 chain attached to a Polkadot\ncore can benefit from Polkadot shared security model. This means the Polkadot\n",(0,t.jsx)(n.a,{href:"/docs/learn-staking#nominated-proof-of-stake-npos",children:"Nominated-Proof-of-Stake (NPoS)"}),"\nmechanism along with its consensus mechanism, secures L1 chains out-of-the-box without having to\nbootstrap security on their own."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Secure interoperability."})," Any L1 chain attached to Polkadot (as well as L2 chains built on top\nof them) can benefit from Polkadot's native interoperability and will thus be able to communicate\nand exchange value and information with other parachains."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Truly resilient infrastructure."})," This is achieved by keeping the network decentralized without\ncompromising scalability and throughput and through on-chain\n",(0,t.jsx)(n.a,{href:"/docs/learn-polkadot-opengov-treasury",children:"treasury"})," funds that can be accessed through\ngovernance referendum. Those funds guarantee constant sponsorship for events, initiatives,\neducational material, education, software development, etc."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Fast development and deployment of L1 chains."})," This is achieved through the modular and\nflexible ",(0,t.jsx)(n.a,{href:"/docs/glossary#substrate",children:"Polkadot SDK Substrate"}),"."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Fostering next-gen of Web3 core developers."})," This is achieved through different initiatives\nsuch as:","\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://polkadot.network/development/academy/",children:"The Polkadot Blockchain Academy"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"/docs/alpha-program",children:"Polkadot Alpha Program"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"/docs/dev-heroes",children:"Polkadot Developer Heroes Program"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://www.edx.org/school/web3x",children:"Edx Courses"})}),"\n",(0,t.jsx)(n.li,{children:"Rust and Substrate Courses (coming soon)"}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"polkadots-representation",children:"Polkadot's Representation"}),"\n",(0,t.jsx)(n.p,{children:"Polkadot has a relay chain acting as the main chain of the system. The Polkadot relay chain is\nrepresented as a ring surrounded by multiple parachains attached to it. Based on Polkadot's design,\nas long as a chain's logic can compile to Wasm and adheres to the relay chain API, then it can\nconnect to the Polkadot network as a parachain."}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"polkadot-relay-chain",src:a(42706).A+"",width:"1701",height:"1441"})}),"\n",(0,t.jsxs)(n.p,{children:["Parachains construct and propose blocks to validators on the relay chain, where the blocks undergo\nrigorous ",(0,t.jsx)(n.a,{href:"/docs/learn-parachains-protocol",children:"availability and validity"})," checks before being\nadded to the finalized chain. As the relay chain provides the security guarantees,\n",(0,t.jsx)(n.a,{href:"/docs/learn-collator",children:"collators"})," - full nodes of these parachains - do not have any security\nresponsibilities, and thus do not require a robust incentive system. This is how the entire network\nstays up to date with the many transactions that take place."]}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.a,{href:"/docs/learn-xcm",children:"Cross-Consensus Messaging Format (XCM)"})," allows parachains to send\nmessages of any type to each other. The shared security and validation logic of the relay chain\nprovide the environment for trust-free message passing that opens up true interoperability."]}),"\n",(0,t.jsxs)(n.p,{children:["In order to interact with chains that want to use their own finalization process (e.g. Bitcoin),\nPolkadot has ",(0,t.jsx)(n.a,{href:"/docs/learn-bridges",children:"bridges"})," that offer two-way compatibility, meaning that\ntransactions can be made between different parachains."]}),"\n",(0,t.jsx)(n.h3,{id:"polkadots-additional-functionalities",children:"Polkadot's Additional Functionalities"}),"\n",(0,t.jsxs)(n.p,{children:["The Polkadot relay chain managed ",(0,t.jsx)(n.a,{href:"/docs/learn/learn-crowdloans",children:"crowdloans"})," and\n",(0,t.jsx)(n.a,{href:"/docs/learn/learn-auction",children:"auctions"}),". Relay chain cores were leased via auctions in 3-month\nchunks for a maximum of two years, and crowdloans allowed users to trustlessly loan funds to teams\nfor lease deposits in exchange for pre-sale tokens. There was no other way you could access cores on\nPolkadot 1.0."]}),"\n",(0,t.jsxs)(n.p,{children:["The relay chain currently manages other tasks such as ",(0,t.jsx)(n.a,{href:"/docs/learn-staking",children:"staking"}),",\n",(0,t.jsx)(n.a,{href:"./learn-accounts-index",children:"accounts"}),", ",(0,t.jsx)(n.a,{href:"/docs/learn-transactions#balance-transfers",children:"balances"}),",\nand ",(0,t.jsx)(n.a,{href:"/docs/learn-polkadot-opengov",children:"governance"}),"."]}),"\n",(0,t.jsx)(n.h3,{id:"polkadots-resilience",children:"Polkadot's Resilience"}),"\n",(0,t.jsx)(n.p,{children:"Decentralization is a crucial aspect of blockchain networks, but there is a trade-off between:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"having an over-decentralized network that struggles to reach consensus and consumes a lot of\nenergy to operate, and"}),"\n",(0,t.jsx)(n.li,{children:"having a network that reaches consensus fast at the expense of being centralized, making it\ntrivial to manipulate or attack."}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:['Ideally, a network should be decentralized "enough" to make it practically impossible for someone to\nexert manipulative or malicious influence on the network. So, ',(0,t.jsx)(n.strong,{children:"decentralization is a tool while the\ngoal is resilience"}),", which is achieved by additionally providing on-chain treasury and governance\nmechanism allowing continuous incentives for the network's participants without relying on\nintermediaries or centralized entities."]}),"\n",(0,t.jsx)(n.p,{children:"Currently, Polkadot 1.0 achieve resilience through the following strategies:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Nominated Proof of Staking (NPoS) where the stake per validator is maximized and evenly\ndistributed across validators."}),"\n",(0,t.jsxs)(n.li,{children:["The ",(0,t.jsx)(n.a,{href:"/docs/thousand-validators",children:"1KV program"})," aims to incentivize new operators to become network\nparticipants and further increase physical (how many validator nodes per service provider) and\nsocial decentralization (how many validator nodes per operator). Those can be explored with the\n",(0,t.jsx)(n.a,{href:"https://polkadot.polkawatch.app/",children:"Polkawatch App"}),"."]}),"\n",(0,t.jsxs)(n.li,{children:["An on-chain treasury and governance (see: ",(0,t.jsx)(n.a,{href:"/docs/learn-polkadot-opengov",children:"OpenGov"}),") where\nevery decision goes through public referenda and any token holder can cast a vote."]}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"polkadots-blockspace",children:"Polkadot's Blockspace"}),"\n",(0,t.jsx)(n.p,{children:"The design and realization of Polkadot 1.0 allowed its creators to enable commoditization of\nblockspace."}),"\n",(0,t.jsx)(n.p,{children:"A blockchain is a way to store data. The storage unit is the block, and once a block is finalized\nonto the chain, it is practically impossible to modify the data within that block. In addition to\nbeing tamper-proof, public permissionless blockchains like Polkadot store data that are visible to\neverybody (i.e. public), and anybody can become a network participant permissionlessly."}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Blockspace"})," is the capacity of a blockchain to finalize and commit operations. It represents a\nblockchain's security, computing, and storage capability as an end product. Blockspace produced by\ndifferent blockchains can vary in security, flexibility, and availability."]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Security"}),", intended as how secure the blockspace is. In Proof-of-Stake (PoS) networks, this is\ndirectly related to how much stake is locked on validator nodes, how much variance in stake there\nis between validators (i.e. how easy it is to attack a single validator), and how many validators\nthere are securing the network (i.e. how easy it is for colluding validators to exert influence on\nthe network). Additionally, it is also important to look at how many validators are owned by\nsingle operators (this will determine the degree of social centralization of the network), and how\nmany validators run on the same service provider (this will determine the degree of physical\ncentralization of the network)."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Flexibility"}),", intended as how flexible the blockspace is, what can be done with it, and what\ntype of data can be stored. Data quality plays an important role depending on the type of network.\nOne might avoid having situations in which poor quality data flood blockspace hindering the prompt\nexecution of vital processes."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Availability"}),', intended as how available blockspace is and how difficult it is to access it. It\nshould not be too difficult to get your hands on it so that any business model can thrive using\nit. Ideally, a marketplace must drive the blockspace price based on demand, with secondary market\noptions to ensure the usage of "second-hand" blockspace.']}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["Polkadot has been designed around those core blockspace principles. However, its design can be\nfurther improved such that the tasks which are currently managed on the relay chain, such as\nbalances transfers, staking, and governance, can be delegated to\n",(0,t.jsx)(n.a,{href:"/docs/learn-system-chains",children:"system parachains"}),' to increase flexibility and to focus the use of\nthe relay chain to provide shared security and interoperability. Blockspace is only accessible\nthrough auctions, but an auction winner has access to a "freighter of blocks" regardless it is\nneeded or not. This creates high entry barriers and it can lead to waste of energy and resources.']}),"\n",(0,t.jsxs)(n.p,{children:["For more information about blockspace see ",(0,t.jsx)(n.a,{href:"https://youtu.be/e1vISppPwe4",children:"this interview"})," with Robert\nHabermeier as well as ",(0,t.jsx)(n.a,{href:"https://www.rob.tech/polkadot-blockspace-over-blockchains/",children:"this article"})," by\nhim."]}),"\n",(0,t.jsx)(n.h3,{id:"a-perspective-shift-upcoming-polkadot-features",children:"A Perspective Shift: Upcoming Polkadot Features"}),"\n",(0,t.jsx)(n.p,{children:'As with many other projects before Polkadot, at some point in time after achieving the\ninitially-planned goals, a perspective shift allows you to understand better what your project is\nabout and what you actually have built. This allows you to "run the extra mile" and achieve more\nthan what was originally planned.'}),"\n",(0,t.jsxs)(n.p,{children:["The quote below by ",(0,t.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/Marcel_Proust",children:"Marcel Proust"})," must remind us that\nsometimes a perspective shift is crucial in ",(0,t.jsx)(n.em,{children:"understanding"})," the world, and perhaps it is more\nimportant than ",(0,t.jsx)(n.em,{children:"seeing more"})," of the world."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.em,{children:"The only true voyage of discovery, the only fountain of Eternal Youth, would be not to visit\nstrange lands but to possess other eyes."})}),"\n",(0,t.jsxs)(n.p,{children:["Thus, if we start to see Polkadot with ",(0,t.jsx)(n.em,{children:"other eyes"})," we can truly envision its potential and what it\ncould become."]}),"\n",(0,t.jsxs)(n.p,{children:["Polkadot is perfecting its implementation through ",(0,t.jsx)(n.a,{href:"https://github.com/polkadot-fellows/RFCs",children:"RFCs"}),"\nto continue being a decentralized, secure, ubiquitous computing engine to power the next generation\nof ",(0,t.jsx)(n.a,{href:"/docs/web3-and-polkadot",children:"Web3"})," applications."]})]})}function h(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(d,{...e})}):d(e)}},42706:(e,n,a)=>{a.d(n,{A:()=>t});const t=a.p+"assets/images/polkadot_relay_chain-c411a282aa36af0f20d04389919a6275.png"},28453:(e,n,a)=>{a.d(n,{R:()=>s,x:()=>r});var t=a(96540);const o={},i=t.createContext(o);function s(e){const n=t.useContext(i);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:s(e.components),t.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/b3719d54.9cdeb7ae.js b/assets/js/b3719d54.9cdeb7ae.js new file mode 100644 index 000000000000..16a49bbc2a6d --- /dev/null +++ b/assets/js/b3719d54.9cdeb7ae.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8290],{61004:(e,n,a)=>{a.r(n),a.d(n,{assets:()=>l,contentTitle:()=>r,default:()=>h,frontMatter:()=>s,metadata:()=>t,toc:()=>c});const t=JSON.parse('{"id":"general/polkadot-v1","title":"Polkadot 1.0","description":"Polkadot\'s 1.0, Blockspace, Decentralization and Resilience.","source":"@site/../docs/general/polkadot-v1.md","sourceDirName":"general","slug":"/polkadot-v1","permalink":"/docs/polkadot-v1","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/polkadot-v1.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1727991122000,"frontMatter":{"id":"polkadot-v1","title":"Polkadot 1.0","sidebar_label":"Polkadot 1.0","description":"Polkadot\'s 1.0, Blockspace, Decentralization and Resilience.","keywords":["polkadot vison","polkadot 1.0","Blockspace","Resilience","Decentralization"],"slug":"../polkadot-v1"},"sidebar":"docs","previous":{"title":"Polkadot Vision","permalink":"/docs/polkadot-vision-index"},"next":{"title":"Polkadot Direction","permalink":"/docs/polkadot-direction"}}');var o=a(74848),i=a(28453);const s={id:"polkadot-v1",title:"Polkadot 1.0",sidebar_label:"Polkadot 1.0",description:"Polkadot's 1.0, Blockspace, Decentralization and Resilience.",keywords:["polkadot vison","polkadot 1.0","Blockspace","Resilience","Decentralization"],slug:"../polkadot-v1"},r=void 0,l={},c=[{value:"Polkadot 1.0",id:"polkadot-10",level:2},{value:"Polkadot's Representation",id:"polkadots-representation",level:3},{value:"Polkadot's Additional Functionalities",id:"polkadots-additional-functionalities",level:3},{value:"Polkadot's Resilience",id:"polkadots-resilience",level:3},{value:"Polkadot's Blockspace",id:"polkadots-blockspace",level:3},{value:"A Perspective Shift: Upcoming Polkadot Features",id:"a-perspective-shift-upcoming-polkadot-features",level:3}];function d(e){const n={a:"a",em:"em",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.p,{children:"Since the release of Bitcoin in 2009, blockchain projects increased exponentially to the order of\ntens of thousands. Different projects have different value propositions, suggesting that the future\nwill be multi-chain and that inter-chain communication will be crucial to establish collaborations\nand leveraging each other strengths."}),"\n",(0,o.jsx)(n.h2,{id:"polkadot-10",children:"Polkadot 1.0"}),"\n",(0,o.jsxs)(n.p,{children:["Polkadot 1.0 reflected the status of Polkadot in 2023 at time of the release of the\n",(0,o.jsx)(n.a,{href:"https://github.com/paritytech/polkadot/releases/tag/v1.0.0",children:"Polkadot runtime v1.0.0"}),". This sections\nfocuses on Polkadot 1.0 and some philosophical digressions about network resilience and blockspace."]}),"\n",(0,o.jsx)(n.p,{children:"Polkadot is a Layer-0 blockchain that brings to the multi-chain vision the following innovations and\ninitiatives:"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Application-specific Layer-1 (L1) blockchains (or parachains)."})," Polkadot is a sharded network\nwhere transactions are processed in parallel with each shard. Polkadot shards can be heterogenous\n(i.e. they do not need the same state transition function as in the proposed Ethereum sharding\narchitecture). This allows to build L1 chains designed explicitly around their application and\nvalue proposition."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Shared security and financial scalability of L1 chains"}),". Any L1 chain attached to a Polkadot\ncore can benefit from Polkadot shared security model. This means the Polkadot\n",(0,o.jsx)(n.a,{href:"/docs/learn-staking#nominated-proof-of-stake-npos",children:"Nominated-Proof-of-Stake (NPoS)"}),"\nmechanism along with its consensus mechanism, secures L1 chains out-of-the-box without having to\nbootstrap security on their own."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Secure interoperability."})," Any L1 chain attached to Polkadot (as well as L2 chains built on top\nof them) can benefit from Polkadot's native interoperability and will thus be able to communicate\nand exchange value and information with other parachains."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Truly resilient infrastructure."})," This is achieved by keeping the network decentralized without\ncompromising scalability and throughput and through on-chain\n",(0,o.jsx)(n.a,{href:"/docs/learn-polkadot-opengov-treasury",children:"treasury"})," funds that can be accessed through\ngovernance referendum. Those funds guarantee constant sponsorship for events, initiatives,\neducational material, education, software development, etc."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Fast development and deployment of L1 chains."})," This is achieved through the modular and\nflexible ",(0,o.jsx)(n.a,{href:"/docs/glossary#substrate",children:"Polkadot SDK Substrate"}),"."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Fostering next-gen of Web3 core developers."})," This is achieved through different initiatives\nsuch as:","\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"https://polkadot.network/development/academy/",children:"The Polkadot Blockchain Academy"})}),"\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"/docs/alpha-program",children:"Polkadot Alpha Program"})}),"\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"/docs/dev-heroes",children:"Polkadot Developer Heroes Program"})}),"\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"https://www.edx.org/school/web3x",children:"Edx Courses"})}),"\n",(0,o.jsx)(n.li,{children:"Rust and Substrate Courses (coming soon)"}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,o.jsx)(n.h3,{id:"polkadots-representation",children:"Polkadot's Representation"}),"\n",(0,o.jsx)(n.p,{children:"Polkadot has a relay chain acting as the main chain of the system. The Polkadot relay chain is\nrepresented as a ring surrounded by multiple parachains attached to it. Based on Polkadot's design,\nas long as a chain's logic can compile to Wasm and adheres to the relay chain API, then it can\nconnect to the Polkadot network as a parachain."}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"polkadot-relay-chain",src:a(42706).A+"",width:"1701",height:"1441"})}),"\n",(0,o.jsxs)(n.p,{children:["Parachains construct and propose blocks to validators on the relay chain, where the blocks undergo\nrigorous ",(0,o.jsx)(n.a,{href:"/docs/learn-parachains-protocol",children:"availability and validity"})," checks before being\nadded to the finalized chain. As the relay chain provides the security guarantees,\n",(0,o.jsx)(n.a,{href:"/docs/learn-collator",children:"collators"})," - full nodes of these parachains - do not have any security\nresponsibilities, and thus do not require a robust incentive system. This is how the entire network\nstays up to date with the many transactions that take place."]}),"\n",(0,o.jsxs)(n.p,{children:["The ",(0,o.jsx)(n.a,{href:"/docs/learn-xcm",children:"Cross-Consensus Messaging Format (XCM)"})," allows parachains to send\nmessages of any type to each other. The shared security and validation logic of the relay chain\nprovide the environment for trust-free message passing that opens up true interoperability."]}),"\n",(0,o.jsxs)(n.p,{children:["In order to interact with chains that want to use their own finalization process (e.g. Bitcoin),\nPolkadot has ",(0,o.jsx)(n.a,{href:"/docs/learn-bridges",children:"bridges"})," that offer two-way compatibility, meaning that\ntransactions can be made between different parachains."]}),"\n",(0,o.jsx)(n.h3,{id:"polkadots-additional-functionalities",children:"Polkadot's Additional Functionalities"}),"\n",(0,o.jsxs)(n.p,{children:["The Polkadot relay chain managed ",(0,o.jsx)(n.a,{href:"/docs/learn/learn-crowdloans",children:"crowdloans"})," and\n",(0,o.jsx)(n.a,{href:"/docs/learn/learn-auction",children:"auctions"}),". Relay chain cores were leased via auctions in 3-month\nchunks for a maximum of two years, and crowdloans allowed users to trustlessly loan funds to teams\nfor lease deposits in exchange for pre-sale tokens. There was no other way you could access cores on\nPolkadot 1.0."]}),"\n",(0,o.jsxs)(n.p,{children:["The relay chain currently manages other tasks such as ",(0,o.jsx)(n.a,{href:"/docs/learn-staking",children:"staking"}),",\n",(0,o.jsx)(n.a,{href:"./learn-accounts-index",children:"accounts"}),", ",(0,o.jsx)(n.a,{href:"/docs/learn-transactions#balance-transfers",children:"balances"}),",\nand ",(0,o.jsx)(n.a,{href:"/docs/learn-polkadot-opengov",children:"governance"}),"."]}),"\n",(0,o.jsx)(n.h3,{id:"polkadots-resilience",children:"Polkadot's Resilience"}),"\n",(0,o.jsx)(n.p,{children:"Decentralization is a crucial aspect of blockchain networks, but there is a trade-off between:"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"having an over-decentralized network that struggles to reach consensus and consumes a lot of\nenergy to operate, and"}),"\n",(0,o.jsx)(n.li,{children:"having a network that reaches consensus fast at the expense of being centralized, making it\ntrivial to manipulate or attack."}),"\n"]}),"\n",(0,o.jsxs)(n.p,{children:['Ideally, a network should be decentralized "enough" to make it practically impossible for someone to\nexert manipulative or malicious influence on the network. So, ',(0,o.jsx)(n.strong,{children:"decentralization is a tool while the\ngoal is resilience"}),", which is achieved by additionally providing on-chain treasury and governance\nmechanism allowing continuous incentives for the network's participants without relying on\nintermediaries or centralized entities."]}),"\n",(0,o.jsx)(n.p,{children:"Currently, Polkadot 1.0 achieve resilience through the following strategies:"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"Nominated Proof of Staking (NPoS) where the stake per validator is maximized and evenly\ndistributed across validators."}),"\n",(0,o.jsxs)(n.li,{children:["The ",(0,o.jsx)(n.a,{href:"/docs/thousand-validators",children:"1KV program"})," aims to incentivize new operators to become network\nparticipants and further increase physical (how many validator nodes per service provider) and\nsocial decentralization (how many validator nodes per operator). Those can be explored with the\n",(0,o.jsx)(n.a,{href:"https://polkadot.polkawatch.app/",children:"Polkawatch App"}),"."]}),"\n",(0,o.jsxs)(n.li,{children:["An on-chain treasury and governance (see: ",(0,o.jsx)(n.a,{href:"/docs/learn-polkadot-opengov",children:"OpenGov"}),") where\nevery decision goes through public referenda and any token holder can cast a vote."]}),"\n"]}),"\n",(0,o.jsx)(n.h3,{id:"polkadots-blockspace",children:"Polkadot's Blockspace"}),"\n",(0,o.jsx)(n.p,{children:"The design and realization of Polkadot 1.0 allowed its creators to enable commoditization of\nblockspace."}),"\n",(0,o.jsx)(n.p,{children:"A blockchain is a way to store data. The storage unit is the block, and once a block is finalized\nonto the chain, it is practically impossible to modify the data within that block. In addition to\nbeing tamper-proof, public permissionless blockchains like Polkadot store data that are visible to\neverybody (i.e. public), and anybody can become a network participant permissionlessly."}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Blockspace"})," is the capacity of a blockchain to finalize and commit operations. It represents a\nblockchain's security, computing, and storage capability as an end product. Blockspace produced by\ndifferent blockchains can vary in security, flexibility, and availability."]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Security"}),", intended as how secure the blockspace is. In Proof-of-Stake (PoS) networks, this is\ndirectly related to how much stake is locked on validator nodes, how much variance in stake there\nis between validators (i.e. how easy it is to attack a single validator), and how many validators\nthere are securing the network (i.e. how easy it is for colluding validators to exert influence on\nthe network). Additionally, it is also important to look at how many validators are owned by\nsingle operators (this will determine the degree of social centralization of the network), and how\nmany validators run on the same service provider (this will determine the degree of physical\ncentralization of the network)."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Flexibility"}),", intended as how flexible the blockspace is, what can be done with it, and what\ntype of data can be stored. Data quality plays an important role depending on the type of network.\nOne might avoid having situations in which poor quality data flood blockspace hindering the prompt\nexecution of vital processes."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Availability"}),', intended as how available blockspace is and how difficult it is to access it. It\nshould not be too difficult to get your hands on it so that any business model can thrive using\nit. Ideally, a marketplace must drive the blockspace price based on demand, with secondary market\noptions to ensure the usage of "second-hand" blockspace.']}),"\n"]}),"\n",(0,o.jsxs)(n.p,{children:["Polkadot has been designed around those core blockspace principles. However, its design can be\nfurther improved such that the tasks which are currently managed on the relay chain, such as\nbalances transfers, staking, and governance, can be delegated to\n",(0,o.jsx)(n.a,{href:"/docs/learn-system-chains",children:"system parachains"}),' to increase flexibility and to focus the use of\nthe relay chain to provide shared security and interoperability. Blockspace is only accessible\nthrough auctions, but an auction winner has access to a "freighter of blocks" regardless it is\nneeded or not. This creates high entry barriers and it can lead to waste of energy and resources.']}),"\n",(0,o.jsxs)(n.p,{children:["For more information about blockspace see ",(0,o.jsx)(n.a,{href:"https://youtu.be/e1vISppPwe4",children:"this interview"})," with Robert\nHabermeier as well as ",(0,o.jsx)(n.a,{href:"https://www.rob.tech/polkadot-blockspace-over-blockchains/",children:"this article"})," by\nhim."]}),"\n",(0,o.jsx)(n.h3,{id:"a-perspective-shift-upcoming-polkadot-features",children:"A Perspective Shift: Upcoming Polkadot Features"}),"\n",(0,o.jsx)(n.p,{children:'As with many other projects before Polkadot, at some point in time after achieving the\ninitially-planned goals, a perspective shift allows you to understand better what your project is\nabout and what you actually have built. This allows you to "run the extra mile" and achieve more\nthan what was originally planned.'}),"\n",(0,o.jsxs)(n.p,{children:["The quote below by ",(0,o.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/Marcel_Proust",children:"Marcel Proust"})," must remind us that\nsometimes a perspective shift is crucial in ",(0,o.jsx)(n.em,{children:"understanding"})," the world, and perhaps it is more\nimportant than ",(0,o.jsx)(n.em,{children:"seeing more"})," of the world."]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.em,{children:"The only true voyage of discovery, the only fountain of Eternal Youth, would be not to visit\nstrange lands but to possess other eyes."})}),"\n",(0,o.jsxs)(n.p,{children:["Thus, if we start to see Polkadot with ",(0,o.jsx)(n.em,{children:"other eyes"})," we can truly envision its potential and what it\ncould become."]}),"\n",(0,o.jsxs)(n.p,{children:["Polkadot is perfecting its implementation through ",(0,o.jsx)(n.a,{href:"https://github.com/polkadot-fellows/RFCs",children:"RFCs"}),"\nto continue being a decentralized, secure, ubiquitous computing engine to power the next generation\nof ",(0,o.jsx)(n.a,{href:"/docs/web3-and-polkadot",children:"Web3"})," applications."]})]})}function h(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},42706:(e,n,a)=>{a.d(n,{A:()=>t});const t=a.p+"assets/images/polkadot_relay_chain-c411a282aa36af0f20d04389919a6275.png"},28453:(e,n,a)=>{a.d(n,{R:()=>s,x:()=>r});var t=a(96540);const o={},i=t.createContext(o);function s(e){const n=t.useContext(i);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:s(e.components),t.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/b38833d4.8a208140.js b/assets/js/b38833d4.8a208140.js new file mode 100644 index 000000000000..829dc009b589 --- /dev/null +++ b/assets/js/b38833d4.8a208140.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6104],{15199:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>r,default:()=>c,frontMatter:()=>s,metadata:()=>a,toc:()=>l});const a=JSON.parse('{"id":"learn/learn-phragmen","title":"NPoS Election Algorithms","description":"The Election Methods used in Polkadot\'s NPoS Mechanism.","source":"@site/../docs/learn/learn-phragmen.md","sourceDirName":"learn","slug":"/learn-phragmen","permalink":"/docs/learn-phragmen","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-phragmen.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1726760224000,"frontMatter":{"id":"learn-phragmen","title":"NPoS Election Algorithms","sidebar_label":"NPoS Election Algorithms","description":"The Election Methods used in Polkadot\'s NPoS Mechanism.","keywords":["phragmen","sequential phragm\xe9n method","elections","algorithm","phragmms"],"slug":"../learn-phragmen"},"sidebar":"docs","previous":{"title":"Cryptography","permalink":"/docs/learn-cryptography"},"next":{"title":"XCM Docs","permalink":"/docs/learn/xcm"}}');var i=t(74848),o=t(28453);const s={id:"learn-phragmen",title:"NPoS Election Algorithms",sidebar_label:"NPoS Election Algorithms",description:"The Election Methods used in Polkadot's NPoS Mechanism.",keywords:["phragmen","sequential phragm\xe9n method","elections","algorithm","phragmms"],slug:"../learn-phragmen"},r=void 0,d={},l=[{value:"NPoS Election Algorithms",id:"npos-election-algorithms",level:2},{value:"What is the sequential Phragm\xe9n method?",id:"what-is-the-sequential-phragm\xe9n-method",level:2},{value:"Validator Elections",id:"validator-elections",level:3},{value:"Off-Chain Phragm\xe9n",id:"off-chain-phragm\xe9n",level:4},{value:"Council Elections",id:"council-elections",level:3},{value:"What does it mean for node operators?",id:"what-does-it-mean-for-node-operators",level:2},{value:"Understanding Phragm\xe9n",id:"understanding-phragm\xe9n",level:2},{value:"Basic Phragm\xe9n",id:"basic-phragm\xe9n",level:3},{value:"Rationale",id:"rationale",level:3},{value:"Algorithm",id:"algorithm",level:3},{value:"Example",id:"example",level:3},{value:"Weighted Phragm\xe9n",id:"weighted-phragm\xe9n",level:3},{value:"Rationale",id:"rationale-1",level:3},{value:"Algorithm",id:"algorithm-1",level:3},{value:"Example",id:"example-1",level:3},{value:"Optimizations",id:"optimizations",level:2},{value:"High-Level Description",id:"high-level-description",level:3},{value:"Rationale for Minimizing the Number of Validators Per Nominator",id:"rationale-for-minimizing-the-number-of-validators-per-nominator",level:3},{value:"Rationale for Maintaining an Even Distribution of Stake",id:"rationale-for-maintaining-an-even-distribution-of-stake",level:3},{value:"Rationale for Reducing Block Computing Time",id:"rationale-for-reducing-block-computing-time",level:3},{value:"Phragmms (aka Balphragmms)",id:"phragmms-aka-balphragmms",level:3},{value:"Maximin Support Objective and PJR",id:"maximin-support-objective-and-pjr",level:4},{value:"Comparing Sequential Phragm\xe9n, MMS, and Phragmms",id:"comparing-sequential-phragm\xe9n-mms-and-phragmms",level:4},{value:"The New Election Rule: Phragmms",id:"the-new-election-rule-phragmms",level:4},{value:"Algorithm",id:"algorithm-2",level:4},{value:"External Resources",id:"external-resources",level:2}];function h(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",h4:"h4",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,o.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h2,{id:"npos-election-algorithms",children:"NPoS Election Algorithms"}),"\n",(0,i.jsx)(n.p,{children:"Since validators are paid almost equally in in each era, it is important that the stake behind each\nvalidator is uniformly spread out. An election algorithm for Nominated Proof of Staking (NPoS) will\ntry to optimize three metrics when computing a solution graph of nominators and validators:"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsx)(n.li,{children:"Maximize the total amount at stake."}),"\n",(0,i.jsx)(n.li,{children:"Maximize the stake behind the minimally staked validator."}),"\n",(0,i.jsx)(n.li,{children:"Minimize the variance of the stake in the set."}),"\n"]}),"\n",(0,i.jsx)(n.admonition,{type:"note",children:(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.a,{href:"#understanding-phragm%C3%A9n",children:"Sequential Phragm\xe9n"}),", ",(0,i.jsx)(n.a,{href:"#phragmms-fka-balphragmms",children:"Phragmms"})," and\n",(0,i.jsx)(n.a,{href:"https://crates.parity.io/sp_npos_elections/balancing/fn.balance.html",children:"Star balancing"})," are a few\nnotable algorithms used for computing the NPoS solutions in Polkadot and Kusama."]})}),"\n",(0,i.jsx)(n.h2,{id:"what-is-the-sequential-phragm\xe9n-method",children:"What is the sequential Phragm\xe9n method?"}),"\n",(0,i.jsxs)(n.p,{children:["The sequential Phragm\xe9n method is a multi-winner election method introduced by Edvard Phragm\xe9n in\nthe 1890s. The quote below taken from the reference ",(0,i.jsx)(n.a,{href:"#external-resources",children:"Phragm\xe9n paper"})," sums up\nthe purpose of the sequential Phragm\xe9n method:"]}),"\n",(0,i.jsx)(n.admonition,{type:"note",children:(0,i.jsx)(n.p,{children:"The problem that Phragm\xe9n\u2019s methods try to solve is that of electing a set of a given numbers of\npersons from a larger set of candidates. Phragm\xe9n discussed this in the context of a parliamentary\nelection in a multi-member constituency; the same problem can, of course, also occur in local\nelections, but also in many other situations such as electing a board or a committee in an\norganization."})}),"\n",(0,i.jsx)(n.h3,{id:"validator-elections",children:"Validator Elections"}),"\n",(0,i.jsx)(n.p,{children:"The sequential Phragm\xe9n is one of the methods used in the Nominated Proof-of-Stake scheme to elect\nvalidators based on their own self-stake and the stake that is voted to them from nominators. It\nalso tries to equalize the weights between the validators after each election round."}),"\n",(0,i.jsx)(n.h4,{id:"off-chain-phragm\xe9n",children:"Off-Chain Phragm\xe9n"}),"\n",(0,i.jsx)(n.p,{children:"Given the large set of nominators and validators, Phragm\xe9n's method is a difficult optimization\nproblem. Polkadot uses off-chain workers to compute the result off-chain and submit a transaction to\npropose the set of winners. The reason for performing this computation off-chain is to keep a\nconstant block time of six seconds and prevent long block times at the end of each era, when the\nvalidator election takes place."}),"\n",(0,i.jsx)(n.admonition,{title:"Staking Miners",type:"info",children:(0,i.jsxs)(n.p,{children:["The process of computing the optimal solution for NPoS election can be delegated to\n",(0,i.jsx)(n.a,{href:"learn-staking-miner",children:"Staking Miners"}),"."]})}),"\n",(0,i.jsx)(n.h3,{id:"council-elections",children:"Council Elections"}),"\n",(0,i.jsx)(n.admonition,{title:"Deprecated in Polkadot OpenGov",type:"info",children:(0,i.jsxs)(n.p,{children:["Phragmen was used for Council elections in ",(0,i.jsx)(n.a,{href:"/docs/learn/learn-governance",children:"Governance v1"}),"."]})}),"\n",(0,i.jsx)(n.p,{children:"The Phragm\xe9n method was also used in the council election mechanism. When you voted for council\nmembers, you could select up to 16 different candidates and then place a reserved bond as the weight\nof your vote. Phragm\xe9n would run once on every election to determine the top candidates to assume\ncouncil positions and then again amongst the top candidates to equalize the weight of the votes\nbehind them as much as possible."}),"\n",(0,i.jsx)(n.h2,{id:"what-does-it-mean-for-node-operators",children:"What does it mean for node operators?"}),"\n",(0,i.jsx)(n.p,{children:"Phragm\xe9n is something that will run in the background and requires no extra effort from you.\nHowever, it is good to understand how it works since it means that not all the stake you've been\nnominated will end up on your validator after an election. Nominators are likely to nominate a few\ndifferent validators that they trust to do a good job operating their nodes."}),"\n",(0,i.jsxs)(n.p,{children:["You can use\n",(0,i.jsx)(n.a,{href:"https://gist.github.com/tugytur/3531cc618bfbb42f1a6cfb44d9906197",children:"this offline-phragm\xe9n"})," tool for\npredicting the outcome of a validator election ahead of a new election."]}),"\n",(0,i.jsx)(n.h2,{id:"understanding-phragm\xe9n",children:"Understanding Phragm\xe9n"}),"\n",(0,i.jsx)(n.p,{children:"This section explains the sequential Phragm\xe9n method in-depth and walks through examples."}),"\n",(0,i.jsx)(n.h3,{id:"basic-phragm\xe9n",children:"Basic Phragm\xe9n"}),"\n",(0,i.jsx)(n.h3,{id:"rationale",children:"Rationale"}),"\n",(0,i.jsx)(n.p,{children:"In order to understand the Weighted Phragm\xe9n method, we must first understand the basic Phragm\xe9n\nmethod. There must be some group of candidates, a group of seats they are vying for (which is less\nthan the size of the group of candidates), and some group of voters. The voters can cast an approval\nvote - that is, they can signal approval for any subset of the candidates."}),"\n",(0,i.jsx)(n.p,{children:"The subset should be a minimum size of one (i.e., one cannot vote for no candidates) and a maximum\nsize of one less than the number of candidates (i.e., one cannot vote for all candidates). Users are\nallowed to vote for all or no candidates, but this will not affect the final result, making votes of\nthis nature meaningless."}),"\n",(0,i.jsxs)(n.p,{children:['Note that in this example, all voters are assumed to have equal say (that is, their vote does not\ncount more or less than any other votes). The weighted case will be considered later. However,\nweighting can be "simulated" by having multiple voters vote for the same slate of candidates. For\ninstance, five people voting for a particular candidate is mathematically the same as a single\nperson with weight ',(0,i.jsx)(n.code,{children:"5"})," voting for that candidate."]}),"\n",(0,i.jsxs)(n.p,{children:['The particular algorithm we call here the "Basic Phragm\xe9n" was first described by Brill ',(0,i.jsx)(n.em,{children:"et al."})," in\ntheir paper\n",(0,i.jsx)(n.a,{href:"https://ojs.aaai.org/index.php/AAAI/article/view/10598",children:'"Phragm\xe9n\u2019s Voting Methods and Justified Representation"'}),"."]}),"\n",(0,i.jsx)(n.h3,{id:"algorithm",children:"Algorithm"}),"\n",(0,i.jsx)(n.p,{children:"The Phragm\xe9n method will iterate, selecting one seat at a time, according to the following rules:"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsx)(n.li,{children:"Voters submit their ballots, marking which candidates they approve. Ballots will not be modified\nafter submission."}),"\n",(0,i.jsx)(n.li,{children:"An initial load of 0 is set for each ballot."}),"\n",(0,i.jsxs)(n.li,{children:["The candidate who wins the next available seat is the one where the ballots of their supporters\nwould have the ",(0,i.jsx)(n.em,{children:"least average (mean) cost"})," if that candidate wins."]}),"\n",(0,i.jsxs)(n.li,{children:["The ",(0,i.jsx)(n.em,{children:"n"})," ballots that approved that winning candidate get ",(0,i.jsx)(n.em,{children:"1/n"})," added to their load."]}),"\n",(0,i.jsx)(n.li,{children:"The load of all ballots that supported the winner of this round are averaged out so that they are\nequal."}),"\n",(0,i.jsx)(n.li,{children:"If there are any more seats, go back to step 3. Otherwise, the selection ends."}),"\n"]}),"\n",(0,i.jsx)(n.h3,{id:"example",children:"Example"}),"\n",(0,i.jsx)(n.p,{children:"Let's walk through an example with four candidates vying for three seats, and five voters."}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"Open Seats: 3\n\nCandidates: A B C D L0\n-------------------------\nVoter V1: X 0\nVoter V2: X X 0\nVoter V3: X X 0\nVoter V4: X X 0\nVoter V5: X X X 0\n"})}),"\n",(0,i.jsxs)(n.p,{children:["In this example, we can see that voter ",(0,i.jsx)(n.code,{children:"V1"})," approves only of candidate ",(0,i.jsx)(n.code,{children:"B"}),", voter ",(0,i.jsx)(n.code,{children:"V2"})," approves of\ncandidates ",(0,i.jsx)(n.code,{children:"C"})," and ",(0,i.jsx)(n.code,{children:"D"}),", etc. Voters can approve any number of candidates between 1 and\n",(0,i.jsx)(n.code,{children:"number_of_candidates - 1"}),'. An initial "load" of ',(0,i.jsx)(n.code,{children:"0"})," is set for each ballot (",(0,i.jsx)(n.code,{children:"L0"})," = load after round\n",(0,i.jsx)(n.code,{children:"0"}),', i.e., the "round" before the first round). We shall see shortly how this load is updated and\nused to select candidates.']}),"\n",(0,i.jsx)(n.p,{children:'We will now run through an iterative algorithm, with each iteration corresponding to one "seat".\nSince there are three seats, we will walk through three rounds.'}),"\n",(0,i.jsxs)(n.p,{children:["For the first round, the winner is simply going to be the candidate with the most votes. Since all\nloads are equal, the lowest average load will be the candidate with the highest n, since ",(0,i.jsx)(n.code,{children:"1/n"})," will\nget smaller as ",(0,i.jsx)(n.code,{children:"n"})," increases. For this first example round, for instance, candidate ",(0,i.jsx)(n.code,{children:"A"})," had only one\nballot vote for them. Thus, the average load for candidate A is ",(0,i.jsx)(n.code,{children:"1/1"}),", or 1. Candidate C has two\nballots approving of them, so the average load is ",(0,i.jsx)(n.code,{children:"1/2"}),". Candidate B has the lowest average load, at\n",(0,i.jsx)(n.code,{children:"1/4"})," and they get the first seat. Ballots loads are now averaged out, although for the first\niteration, this will not have any effect."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"Filled seats: 1 (B)\nOpen Seats: 2\n\nCandidates: A B C D L0 L1\n-----------------------------\nVoter V1: X 0 1/4\nVoter V2: X X 0 0\nVoter V3: X X 0 1/4\nVoter V4: X X 0 1/4\nVoter V5: X X X 0 1/4\n"})}),"\n",(0,i.jsxs)(n.p,{children:["We are now down to candidates ",(0,i.jsx)(n.code,{children:"A"}),", ",(0,i.jsx)(n.code,{children:"C"}),", and ",(0,i.jsx)(n.code,{children:"D"})," for two open seats. There is only one voter (",(0,i.jsx)(n.code,{children:"V4"}),")\nfor ",(0,i.jsx)(n.code,{children:"A"}),", with load ",(0,i.jsx)(n.code,{children:"1/4"}),". ",(0,i.jsx)(n.code,{children:"C"})," has two voters, ",(0,i.jsx)(n.code,{children:"V2"})," and ",(0,i.jsx)(n.code,{children:"V5"}),", with loads of ",(0,i.jsx)(n.code,{children:"0"})," and ",(0,i.jsx)(n.code,{children:"1/4"}),". ",(0,i.jsx)(n.code,{children:"D"})," has\nthree voters approving of them, ",(0,i.jsx)(n.code,{children:"V2"}),", ",(0,i.jsx)(n.code,{children:"V3"}),", and ",(0,i.jsx)(n.code,{children:"V5"}),", with loads of ",(0,i.jsx)(n.code,{children:"0"}),", ",(0,i.jsx)(n.code,{children:"1/4"}),", and ",(0,i.jsx)(n.code,{children:"1/4"}),",\nrespectively."]}),"\n",(0,i.jsxs)(n.p,{children:["If Candidate ",(0,i.jsx)(n.code,{children:"A"})," wins, the average load would be ",(0,i.jsx)(n.code,{children:"(1/4 + 1/1) / 1"}),", or ",(0,i.jsx)(n.code,{children:"5/4"}),". If candidate ",(0,i.jsx)(n.code,{children:"C"})," wins,\nthe average load would be ",(0,i.jsx)(n.code,{children:"((0 + 1/2) + (1/4 + 1/2)) / 2"}),", or ",(0,i.jsx)(n.code,{children:"5/8"}),". If candidate ",(0,i.jsx)(n.code,{children:"D"})," wins, the\naverage load would be ",(0,i.jsx)(n.code,{children:"((0 + 1/3) + (1/4 + 1/3) + (1/4 + 1/3)) / 3"}),", or ",(0,i.jsx)(n.code,{children:"1/2"}),". Since ",(0,i.jsx)(n.code,{children:"1/2"})," is the\nlowest average load, candidate D wins the second round."]}),"\n",(0,i.jsxs)(n.p,{children:["Now everybody who voted for Candidate ",(0,i.jsx)(n.code,{children:"D"})," has their load set to the average, ",(0,i.jsx)(n.code,{children:"1/2"})," of all the loads."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"Filled seats: 2 (B, D)\nOpen Seats: 1\n\nCandidates: A B C D L0 L1 L2\n---------------------------------\nVoter V1: X 0 1/4 1/4\nVoter V2: X X 0 0 1/2\nVoter V3: X X 0 1/4 1/2\nVoter V4: X X 0 1/4 1/4\nVoter V5: X X X 0 1/4 1/2\n"})}),"\n",(0,i.jsxs)(n.p,{children:["There is now one seat open and two candidates, ",(0,i.jsx)(n.code,{children:"A"})," and ",(0,i.jsx)(n.code,{children:"C"}),". Voter ",(0,i.jsx)(n.code,{children:"V4"})," is the only one voting for\n",(0,i.jsx)(n.code,{children:"A"}),", so if ",(0,i.jsx)(n.code,{children:"A"})," wins then the average load would be ",(0,i.jsx)(n.code,{children:"(1/4 + 1/1) / 1"}),", or ",(0,i.jsx)(n.code,{children:"5/4"}),". Voters ",(0,i.jsx)(n.code,{children:"V2"})," and ",(0,i.jsx)(n.code,{children:"V5"}),"\n(both with load ",(0,i.jsx)(n.code,{children:"1/2"}),") support ",(0,i.jsx)(n.code,{children:"C"}),", so if ",(0,i.jsx)(n.code,{children:"C"})," wins the average load would be\n",(0,i.jsx)(n.code,{children:"((1/2 + 1/2) + (1/2 + 1/2)) / 2"}),", or ",(0,i.jsx)(n.code,{children:"1"}),". Since the average load would be lower with ",(0,i.jsx)(n.code,{children:"C"}),", ",(0,i.jsx)(n.code,{children:"C"})," wins\nthe final seat."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"Filled seats: 3 (B, D, C)\nOpen Seats: 0\n\nCandidates: A B C D L0 L1 L2 L3\n------------------------------------\nVoter V1: X 0 1/4 1/4 1/4\nVoter V2: X X 0 0 1/2 1\nVoter V3: X X 0 1/4 1/2 1/2\nVoter V4: X X 0 1/4 1/4 1/4\nVoter V5: X X X 0 1/4 1/2 1\n"})}),"\n",(0,i.jsxs)(n.p,{children:["An interesting characteristic of this calculation is that the total load of all voters will always\nequal the number of seats filled in that round. In the zeroth round, load starts at ",(0,i.jsx)(n.code,{children:"0"})," and there\nare no seats filled. After the first round, the total of all loads is ",(0,i.jsx)(n.code,{children:"1"}),", after the second round it\nis ",(0,i.jsx)(n.code,{children:"2"}),", etc."]}),"\n",(0,i.jsx)(n.h3,{id:"weighted-phragm\xe9n",children:"Weighted Phragm\xe9n"}),"\n",(0,i.jsx)(n.h3,{id:"rationale-1",children:"Rationale"}),"\n",(0,i.jsx)(n.p,{children:"While this method works well if all voters have equal weight, this is not the case in Polkadot.\nElections for both validators and candidates for the Council are weighted by the number of tokens\nheld by the voters. This makes elections more similar to a corporate shareholder election than a\ntraditional political election, where some members have more pull than others. Someone with a single\ntoken will have much less voting power than someone with 100. Although this may seem\nanti-democratic, in a pseudonymous system, it is trivial for someone with 100 tokens to create 100\ndifferent accounts and spread their wealth to all of their pseudonyms."}),"\n",(0,i.jsx)(n.p,{children:"Therefore, not only do we want to allow voters to have their preferences expressed in the result,\nbut do so while keeping as equal a distribution of their stake as possible and express the wishes of\nminorities as much as is possible. The Weighted Phragm\xe9n method allows us to reach these goals."}),"\n",(0,i.jsx)(n.h3,{id:"algorithm-1",children:"Algorithm"}),"\n",(0,i.jsx)(n.p,{children:"Weighted Phragm\xe9n is similar to Basic Phragm\xe9n in that it selects candidates sequentially, one per\nround, until the maximum number of candidates are elected. However, it has additional features to\nalso allocate weight (stake) behind the candidates."}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.em,{children:'NOTE: in terms of validator selection, for the following algorithm, you can think of "voters" as\n"nominators" and "candidates" as "validators".'})}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsx)(n.li,{children:'Candidates are elected, one per round, and added to the set of successful candidates (they have\nwon a "seat"). This aspect of the algorithm is very similar to the "basic Phragm\xe9n" algorithm\ndescribed above.'}),"\n",(0,i.jsx)(n.li,{children:"However, as candidates are elected, a weighted mapping is built, defining the weights of each\nselection of a validator by each nominator."}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"In more depth, the algorithm operates like so:"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsx)(n.li,{children:"Create a list of all voters, their total amount of stake, and which validators they support."}),"\n",(0,i.jsxs)(n.li,{children:["Generate an initial edge-weighted graph mapping from voters to candidates, where each edge weight\nis the total ",(0,i.jsx)(n.em,{children:"potential"})," weight (stake) given by that voter. The sum of all potential weight for\na given candidate is called their ",(0,i.jsx)(n.em,{children:"approval stake"}),"."]}),"\n",(0,i.jsxs)(n.li,{children:["Now we start electing candidates. For the list of all candidates who have not been elected, get\ntheir score, which is equal to ",(0,i.jsx)(n.code,{children:"1 / approval_stake"}),"."]}),"\n",(0,i.jsxs)(n.li,{children:["For each voter, update the score of each candidate they support by adding their total budget\n(stake) multiplied by the load of the voter and then dividing by that candidate's approval stake\n",(0,i.jsx)(n.code,{children:"(voter_budget * voter_load / candidate_approval_stake)"}),"."]}),"\n",(0,i.jsx)(n.li,{children:"Determine the candidate with the lowest score and elect that candidate. Remove the elected\ncandidate from the pool of potential candidates."}),"\n",(0,i.jsx)(n.li,{children:"The load for each edge connecting to the winning candidate is updated, with the edge load set to\nthe score of the candidate minus the voter's load, and the voter's load then set to the\ncandidate's score."}),"\n",(0,i.jsx)(n.li,{children:"If there are more candidates to elect, go to Step 3. Otherwise, continue to step 8."}),"\n",(0,i.jsxs)(n.li,{children:["Now the stake is distributed amongst each nominator who backed at least one elected candidate.\nThe backing stake for each candidate is calculated by taking the budget of the voter and\nmultiplying by the edge load then dividing by the candidate load\n(",(0,i.jsx)(n.code,{children:"voter_budget * edge_load / candidate_load"}),")."]}),"\n"]}),"\n",(0,i.jsx)(n.h3,{id:"example-1",children:"Example"}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.em,{children:"Note: All numbers in this example are rounded off to three decimal places."})}),"\n",(0,i.jsxs)(n.p,{children:["In the following example, there are five voters and five candidates vying for three potential seats.\nEach voter ",(0,i.jsx)(n.code,{children:"V1 - V5"})," has an amount of stake equal to their number (e.g., ",(0,i.jsx)(n.code,{children:"V1"})," has stake of 1, ",(0,i.jsx)(n.code,{children:"V2"}),"\nhas stake of 2, etc.). Every voter is also going to have a ",(0,i.jsx)(n.em,{children:"load,"})," which initially starts at ",(0,i.jsx)(n.code,{children:"0"}),"."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"Filled seats: 0\nOpen Seats: 3\n\nCandidates: A B C D E L0\n----------------------------\nVoter V1 (1): X X 0\nVoter V2 (2): X X 0\nVoter V3 (3): X 0\nVoter V4 (4): X X X 0\nVoter V5 (5): X X 0\n"})}),"\n",(0,i.jsx)(n.p,{children:"Let us now calculate the approval stake of each of the candidates. Recall that this is merely the\namount of all support for that candidate by all voters."}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"Candidate A: 1 + 2 + 3 + 5 = 11\nCandidate B: 1 + 2 + 4 = 7\nCandidate C: 4 = 4\nCandidate D: 4 + 5 = 9\nCandidate E: 0\n"})}),"\n",(0,i.jsxs)(n.p,{children:["The first step is easy - candidate ",(0,i.jsx)(n.code,{children:"E"})," has 0 approval stake and can be ignored from here on out.\nThey will never be elected."]}),"\n",(0,i.jsxs)(n.p,{children:["We can now calculate the initial scores of the candidates, which is ",(0,i.jsx)(n.code,{children:"1 / approval_stake"}),":"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"Candidate A: 1 / 11 = 0.091\nCandidate B: 1 / 7 = 0.143\nCandidate C: 1 / 4 = 0.25\nCandidate D: 1 / 9 = 0.111\nCandidate E: N/A\n"})}),"\n",(0,i.jsxs)(n.p,{children:["For every edge, we are going to calculate the score, which is current score plus the total budget *\nthe load of the voter divided by the approval stake of the candidate. However, since the load of\nevery voter starts at 0, and anything multiplied by 0 is 0, any addition will be ",(0,i.jsx)(n.code,{children:"0 / x"}),", or 0. This\nmeans that this step can be safely ignored for the initial round."]}),"\n",(0,i.jsxs)(n.p,{children:["Thus, the best (lowest) score for Round 0 is Candidate A, with a score of ",(0,i.jsx)(n.code,{children:"0.091"}),"."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"Candidates: A B C D E L0 L1\n----------------------------------\nVoter V1 (1): X X 0 0.091\nVoter V2 (2): X X 0 0.091\nVoter V3 (3): X 0 0.091\nVoter V4 (4): X X X 0 0\nVoter V5 (5): X X 0 0.091\n"})}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"Filled seats: 1 (A)\nOpen Seats: 2\n\nCandidates: A B C D E L0\n----------------------------\nVoter V1 (1): X X 0\nVoter V2 (2): X X 0\nVoter V3 (3): X 0\nVoter V4 (4): X X X 0\nVoter V5 (5): X X 0\n"})}),"\n",(0,i.jsxs)(n.p,{children:["Candidate ",(0,i.jsx)(n.code,{children:"A"})," is now safe; there is no way that they will lose their seat. Before moving on to the\nnext round, we need to update the scores on the edges of our graph for any candidates who have not\nyet been elected."]}),"\n",(0,i.jsx)(n.p,{children:"We elided this detail in the previous round, since it made no difference to the final scores, but we\nshould go into depth here to see how scores are updated. We first must calculate the new loads of\nthe voters, and then calculate the new scores of the candidates."}),"\n",(0,i.jsxs)(n.p,{children:["Any voter who had one of their choices for candidate fill the seat in this round (i.e., voters ",(0,i.jsx)(n.code,{children:"V1"}),",\n",(0,i.jsx)(n.code,{children:"V2"}),", ",(0,i.jsx)(n.code,{children:"V3"}),", and ",(0,i.jsx)(n.code,{children:"V5"}),", who all voted for ",(0,i.jsx)(n.code,{children:"A"}),") will have their load increased. This load increase will\nblunt the impact of their vote in future rounds, and the edge (which will be used in determining\nstake allocation later) is set to the score of the elected candidate minus the ",(0,i.jsx)(n.em,{children:"current"})," voter load."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"edge_load = elected_candidate_score - voter_load\nvoter_load = elected_candidate_score\n"})}),"\n",(0,i.jsxs)(n.p,{children:["In this instance, the score of the elected candidate is ",(0,i.jsx)(n.code,{children:"0.091"})," and the voter loads are all ",(0,i.jsx)(n.code,{children:"0"}),". So\nfor each voter who voted for ",(0,i.jsx)(n.code,{children:"A"}),", we will calculate a new edge load ",(0,i.jsx)(n.code,{children:"Voter"})," -> ",(0,i.jsx)(n.code,{children:"A"})," of:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"Edge load: 0.091 - 0 = 0.091\n"})}),"\n",(0,i.jsx)(n.p,{children:"and a new voter load of:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"Voter load: 0.091\n"})}),"\n",(0,i.jsxs)(n.p,{children:["As a reminder, here are the current scores. Loads of the voters are all ",(0,i.jsx)(n.code,{children:"0"}),"."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"Candidate B : 0.143\nCandidate C : 0.25\nCandidate D : 0.111\n"})}),"\n",(0,i.jsx)(n.p,{children:"Now, we go through the weighted graph and update the score of the candidate and the load of the\nedge, using the algorithm:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"candidate_score = candidate_score + ((voter_budget * voter_load) / candidate_approval_stake)\n"})}),"\n",(0,i.jsx)(n.p,{children:"Without walking through each step, this gives us the following modifications to the scores of the\ndifferent candidates."}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"V1 updates B to 0.156\nV2 updates B to 0.182\nV4 updates B to 0.182\nV4 updates C to 0.25\nV4 updates D to 0.111\nV5 updates D to 0.162\n"})}),"\n",(0,i.jsx)(n.p,{children:"After scores are updated, the final scores for the candidates for this round are:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"Candidate B: 0.182\nCandidate C: 0.25\nCandidate D: 0.162\n"})}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"D"}),", with the lowest score, is elected. You will note that even though candidate ",(0,i.jsx)(n.code,{children:"B"})," had more voters\nsupporting them, candidate ",(0,i.jsx)(n.code,{children:"D"})," won the election due to their lower score. This is directly due to\nthe fact that they had the lowest score, of course, but the root reason behind them having a lower\nscore was both the greater amount of stake behind them and that voters who did not get one of their\nchoices in an earlier round (in this example, voter V4) correspond to a higher likelihood of a\ncandidate being elected."]}),"\n",(0,i.jsxs)(n.p,{children:["We then update the loads for the voters and edges as specified above for any voters who voted for\ncandidate ",(0,i.jsx)(n.code,{children:"D"})," (viz., ",(0,i.jsx)(n.code,{children:"V4"})," and ",(0,i.jsx)(n.code,{children:"V5"}),") using the same formula as above."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"Filled seats: 2 (A, D)\nOpen Seats: 1\n\nCandidates: A B C D E L0 L1 L2\n-----------------------------------\nVoter V1 (1): X X 0 0.091 0.091\nVoter V2 (2): X X 0 0.091 0.091\nVoter V3 (3): X 0 0.091 0.091\nVoter V4 (4): X X X 0 0 0.162\nVoter V5 (5): X X 0 0.091 0.162\n"})}),"\n",(0,i.jsx)(n.p,{children:"Following a similar process for Round 2, we start with initial candidate scores of:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"Candidate B : 0.143\nCandidate C : 0.25\n"})}),"\n",(0,i.jsx)(n.p,{children:"We can then update the scores of the remaining two candidates according to the algorithm described\nabove."}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"V1 updates B to 0.156\nV2 updates B to 0.182\nV4 updates B to 0.274\nV4 updates C to 0.412\n"})}),"\n",(0,i.jsxs)(n.p,{children:["With the lowest score of ",(0,i.jsx)(n.code,{children:"0.274"}),", Candidate ",(0,i.jsx)(n.code,{children:"B"})," claims the last open seat. Candidates ",(0,i.jsx)(n.code,{children:"A"}),", ",(0,i.jsx)(n.code,{children:"D"}),", and\n",(0,i.jsx)(n.code,{children:"B"})," have been elected, and candidates ",(0,i.jsx)(n.code,{children:"C"})," and ",(0,i.jsx)(n.code,{children:"E"})," are not."]}),"\n",(0,i.jsx)(n.p,{children:"Before moving on, we must perform a final load adjustment for the voters and the graph."}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"Filled seats: 3 (A, D, B)\nOpen Seats: 0\n\nCandidates: A B C D E L0 L1 L2 L3\n------------------------------------------\nVoter V1 (1): X X 0 0.091 0.091 0.274\nVoter V2 (2): X X 0 0.091 0.091 0.274\nVoter V3 (3): X 0 0.091 0.091 0.091\nVoter V4 (4): X X X 0 0 0.162 0.274\nVoter V5 (5): X X 0 0.091 0.162 0.162\n"})}),"\n",(0,i.jsx)(n.p,{children:"Now we have to determine how much stake every voter should allocate to each candidate. This is done\nby taking the load of the each edge and dividing it by the voter load, then multiplying by the total\nbudget of the voter."}),"\n",(0,i.jsx)(n.p,{children:"In this example, the weighted graph ended up looking like this:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"Nominator: V1\n\tEdge to A load= 0.091\n\tEdge to B load= 0.183\nNominator: V2\n\tEdge to A load= 0.091\n\tEdge to B load= 0.183\nNominator: V3\n\tEdge to A load= 0.091\nNominator: V4\n\tEdge to B load= 0.113\n\tEdge to D load= 0.162\nNominator: V5\n\tEdge to A load= 0.091\n\tEdge to D load= 0.071\n"})}),"\n",(0,i.jsxs)(n.p,{children:["For instance, the budget of ",(0,i.jsx)(n.code,{children:"V1"})," is ",(0,i.jsx)(n.code,{children:"1"}),", the edge load to ",(0,i.jsx)(n.code,{children:"A"})," is ",(0,i.jsx)(n.code,{children:"0.091"}),", and the voter load is\n",(0,i.jsx)(n.code,{children:"0.274"}),". Using our equation:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"backing_stake (A) = voter_budget * edge_load / voter_load\n"})}),"\n",(0,i.jsx)(n.p,{children:"We can fill these variables in with:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"backing_stake (A) = 1 * 0.091 / 0.274 = 0.332\n"})}),"\n",(0,i.jsxs)(n.p,{children:["For ",(0,i.jsx)(n.code,{children:"V1"})," backing stake of ",(0,i.jsx)(n.code,{children:"B"}),", you can simply replace the edge load value and re-calculate."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"backing_stake (B) = 1 * 0.183 / 0.274 = 0.668\n"})}),"\n",(0,i.jsx)(n.p,{children:"Note that the total amount of all backing stake for a given voter will equal the total budget of the\nvoter, unless that voter had no candidates elected, in which case it will be 0."}),"\n",(0,i.jsx)(n.p,{children:"The final results are:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"A is elected with stake 6.807.\nD is elected with stake 4.545.\nB is elected with stake 3.647.\n\nV1 supports: A with stake: 0.332 and B with stake: 0.668.\nV2 supports: A with stake: 0.663 and B with stake: 1.337.\nV3 supports: A with stake: 3.0.\nV4 supports: B with stake: 1.642 and D with stake: 2.358.\nV5 supports: A with stake: 2.813 and D with stake: 2.187.\n"})}),"\n",(0,i.jsxs)(n.p,{children:["You will notice that the total amount of stake for candidates ",(0,i.jsx)(n.code,{children:"A"}),", ",(0,i.jsx)(n.code,{children:"D"}),", and ",(0,i.jsx)(n.code,{children:"B"})," equals (aside from\nrounding errors) the total amount of stake of all the voters (",(0,i.jsx)(n.code,{children:"1 + 2 + 3 + 4 + 5 = 15"}),"). This is\nbecause each voter had at least one of their candidates fill a seat. Any voter who had none of their\ncandidates selected will also not have any stake in any of the elected candidates."]}),"\n",(0,i.jsx)(n.h2,{id:"optimizations",children:"Optimizations"}),"\n",(0,i.jsx)(n.p,{children:"The results for nominating validators are further optimized for several purposes:"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsx)(n.li,{children:"To reduce the number of edges, i.e. to minimize the number of validators any nominator selects"}),"\n",(0,i.jsx)(n.li,{children:"To ensure, as much as possible, an even distribution of stake among the validators"}),"\n",(0,i.jsx)(n.li,{children:"Reduce the amount of block computation time"}),"\n"]}),"\n",(0,i.jsx)(n.h3,{id:"high-level-description",children:"High-Level Description"}),"\n",(0,i.jsx)(n.p,{children:"After running the weighted Phragm\xe9n algorithm, a process is run that redistributes the vote amongst\nthe elected set. This process will never add or remove an elected candidate from the set. Instead,\nit reduces the variance in the list of backing stake from the voters to the elected candidates.\nPerfect equalization is not always possible, but the algorithm attempts to equalize as much as\npossible. It then runs an edge-reducing algorithm to minimize the number of validators per\nnominator, ideally giving every nominator a single validator to nominate per era."}),"\n",(0,i.jsxs)(n.p,{children:["To minimize block computation time, the staking process is run as an\n",(0,i.jsx)(n.a,{href:"https://docs.substrate.io/reference/how-to-guides/offchain-workers/",children:"off-chain worker"}),". In order to\ngive time for this off-chain worker to run, staking commands (bond, nominate, etc.) are not allowed\nin the last quarter of each era."]}),"\n",(0,i.jsxs)(n.p,{children:["These optimizations will not be covered in-depth on this page. For more details, you can view the\n",(0,i.jsx)(n.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/substrate/frame/elections-phragmen/src/lib.rs",children:"Rust implementation of elections in Substrate"}),",\nthe\n",(0,i.jsx)(n.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/substrate/frame/staking/src/lib.rs",children:"Rust implementation of staking in Substrate"}),",\nor the ",(0,i.jsx)(n.code,{children:"seqPhragm\xe9nwithpostprocessing"})," method in the\n",(0,i.jsx)(n.a,{href:"https://github.com/w3f/consensus/tree/master/NPoS",children:"Python reference implementation"}),". If you would\nlike to dive even more deeply, you can review the\n",(0,i.jsx)(n.a,{href:"https://research.web3.foundation/Polkadot/protocols/NPoS/Overview#the-election-process",children:"W3F Research Page on Sequential Phragm\xe9n Method"}),"."]}),"\n",(0,i.jsx)(n.h3,{id:"rationale-for-minimizing-the-number-of-validators-per-nominator",children:"Rationale for Minimizing the Number of Validators Per Nominator"}),"\n",(0,i.jsxs)(n.p,{children:["Paying out rewards for staking from every validator to all of their nominators can cost a\nnon-trivial amount of chain resources (in terms of space on chain and resources to compute). Assume\na system with 200 validators and 1000 nominators, where each of the nominators has nominated 10\ndifferent validators. Payout would thus require ",(0,i.jsx)(n.code,{children:"1_000 * 10"}),", or 10_000 transactions. In an ideal\nscenario, if every nominator selects a single validator, only 1_000 transactions would need to take\nplace - an order of magnitude fewer. Empirically, network slowdown at the beginning of an era has\noccurred due to the large number of individual payouts by validators to nominators. In extreme\ncases, this could be an attack vector on the system, where nominators nominate many different\nvalidators with small amounts of stake in order to slow the system at the next era change."]}),"\n",(0,i.jsxs)(n.p,{children:["While this would reduce network and on-chain load, being able to select only a single validator\nincurs some diversification costs. If the single validator that a nominator has nominated acts\nmaliciously, then the nominator incurs a risk of a significant amount of\n",(0,i.jsx)(n.a,{href:"/docs/learn-offenses",children:"slashing"}),". Nominators are thus allowed to nominate up to 16 different\nvalidators. However, after the weighted edge-reducing algorithm is run, the number of validators per\nnominator is minimized. Nominators are likely to see themselves nominating a single active validator\nfor an era."]}),"\n",(0,i.jsx)(n.p,{children:"At each era change, as the algorithm runs again, nominators are likely to have a different validator\nthan they had before (assuming a significant number of selected validators). Therefore, nominators\ncan diversify against incompetent or corrupt validators causing slashing on their accounts, even if\nthey only nominate a single validator per era."}),"\n",(0,i.jsx)(n.h3,{id:"rationale-for-maintaining-an-even-distribution-of-stake",children:"Rationale for Maintaining an Even Distribution of Stake"}),"\n",(0,i.jsxs)(n.p,{children:["Another issue is that we want to ensure that as equal a distribution of votes as possible amongst\nthe elected validators or council members. This helps us increase the security of the system by\nensuring that the minimum amount of tokens in order to join the active validator set or council is\nas high as possible. For example, assume a result of five validators being elected, where validators\nhave the following stake: ",(0,i.jsx)(n.code,{children:"{1_000, 20, 10, 10, 10}"}),', for a total stake of 1_050. In this case, a\npotential attacker could join the active validator set with only 11 tokens, and could obtain a\nmajority of validators with only 33 tokens (since the attacker only has to have enough stake to\n"kick out" the three lowest validators).']}),"\n",(0,i.jsxs)(n.p,{children:["In contrast, imagine a different result with the same amount of total stake, but with that stake\nperfectly equally distributed: ",(0,i.jsx)(n.code,{children:"{210, 210, 210, 210, 210}"}),". With the same amount of stake, an\nattacker would need to stake 633 tokens in order to get a majority of validators, a much more\nexpensive proposition. Although obtaining an equal distribution is unlikely, the more equal the\ndistribution, the higher the threshold - and thus the higher the expense - for attackers to gain\nentry to the set."]}),"\n",(0,i.jsx)(n.h3,{id:"rationale-for-reducing-block-computing-time",children:"Rationale for Reducing Block Computing Time"}),"\n",(0,i.jsx)(n.p,{children:"Running the Phragm\xe9n algorithm is time-consuming, and often cannot be completed within the time\nlimits of production of a single block. Waiting for calculation to complete would jeopardize the\nconstant block production time of the network. Therefore, as much computation as possible is moved\nto an off-chain worker, which validators can work on the problem without impacting block production\ntime."}),"\n",(0,i.jsxs)(n.p,{children:["To limit the complexity of the election and payout, any given nominator can only\n",(0,i.jsx)(n.a,{href:"/docs/chain-state-values#maximum-votes-per-nominator",children:"select a limited number of validators"}),"\nto nominate."]}),"\n",(0,i.jsx)(n.h3,{id:"phragmms-aka-balphragmms",children:"Phragmms (aka Balphragmms)"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"Phragmms"}),", formerly known as ",(0,i.jsx)(n.code,{children:"Balphragmms"}),", is a new election rule inspired by Phragm\xe9n and\ndeveloped in-house for Polkadot. In general, election rules on blockchains is an active topic of\nresearch. This is due to the conflicting requirements for election rules and blockchains: elections\nare computationally expensive, but blockchains are computationally limited. Thus, this work\nconstitutes state of the art in terms of optimization."]}),"\n",(0,i.jsxs)(n.p,{children:["Proportional representation is a very important property for a decentralized network to have in\norder to maintain a sufficient level of decentralization. While this is already provided by the\ncurrently implemented ",(0,i.jsx)(n.code,{children:"seqPhragmen"}),", this new election rule provides the advantage of the added\nsecurity guarantee described below. As far as we can tell, at the time of writing, Polkadot and\nKusama are the only blockchain networks that implement an election rule that guarantees proportional\nrepresentation."]}),"\n",(0,i.jsxs)(n.p,{children:["The security of a distributed and decentralized system such as Polkadot is directly related to the\ngoal of avoiding ",(0,i.jsx)(n.em,{children:"overrepresentation"})," of any minority. This is a stark contrast to traditional\napproaches to proportional representation axioms, which typically only seek to avoid\nunderrepresentation."]}),"\n",(0,i.jsx)(n.h4,{id:"maximin-support-objective-and-pjr",children:"Maximin Support Objective and PJR"}),"\n",(0,i.jsxs)(n.p,{children:["This new election rule aims to achieve a constant-factor approximation guarantee for the ",(0,i.jsx)(n.em,{children:"maximin\nsupport objective"})," and the closely related ",(0,i.jsx)(n.em,{children:"proportional justified representation"})," (PJR) property."]}),"\n",(0,i.jsxs)(n.p,{children:["The maximin support objective is based on maximizing the support of the least-supported elected\ncandidate, or in the case of Polkadot and Kusama, maximizing the least amount of stake backing\namongst elected validators. This security-based objective translates to a security guarantee for\nNPoS and makes it difficult for an adversarial whale\u2019s validator nodes to be elected. The ",(0,i.jsx)(n.code,{children:"Phragmms"}),"\nrule, and the guarantees it provides in terms of security and proportionality, have been formalized\nin a ",(0,i.jsx)(n.a,{href:"https://arxiv.org/pdf/2004.12990.pdf",children:"peer-reviewed paper"}),")."]}),"\n",(0,i.jsx)(n.p,{children:"The PJR property considers the proportionality of the voter\u2019s decision power. The property states\nthat a group of voters with cohesive candidate preferences and a large enough aggregate voting\nstrength deserve to have a number of representatives proportional to the group\u2019s vote strength."}),"\n",(0,i.jsx)(n.h4,{id:"comparing-sequential-phragm\xe9n-mms-and-phragmms",children:"Comparing Sequential Phragm\xe9n, MMS, and Phragmms"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.em,{children:"Sequential Phragm\xe9n"})," (",(0,i.jsx)(n.code,{children:"seqPhragmen"}),") and ",(0,i.jsx)(n.code,{children:"MMS"})," are two efficient election rules that both achieve\nPJR."]}),"\n",(0,i.jsxs)(n.p,{children:["Currently, Polkadot employs the ",(0,i.jsx)(n.code,{children:"seqPhragmen"})," method for validator and council elections. Although\n",(0,i.jsx)(n.code,{children:"seqPhramen"})," has a very fast runtime, it does not provide constant-factor approximation for the\nmaximin support problem. This is due to ",(0,i.jsx)(n.code,{children:"seqPhramen"})," only performing an ",(0,i.jsx)(n.em,{children:"approximate"})," rebalancing of\nthe distribution of stake."]}),"\n",(0,i.jsxs)(n.p,{children:["In contrast, ",(0,i.jsx)(n.code,{children:"MMS"})," is another standard greedy algorithm that simultaneously achieves the PJR\nproperty and provides a constant factor approximation for maximin support, although with a\nconsiderably slower runtime. This is because for a given partial solution, ",(0,i.jsx)(n.code,{children:"MMS"})," computes a balanced\nedge weight vector for each possible augmented committee when a new candidate is added, which is\ncomputationally expensive."]}),"\n",(0,i.jsxs)(n.p,{children:["We introduce a new heuristic inspired by ",(0,i.jsx)(n.code,{children:"seqPhragmen"}),", ",(0,i.jsx)(n.code,{children:"PhragMMS"}),", which maintains a comparable\nruntime to ",(0,i.jsx)(n.code,{children:"seqPhragmen"}),", offers a constant-factor approximation guarantee for the maximin support\nobjective, and satisfies PJR. This is the fastest known algorithm to achieve a constant-factor\nguarantee for maximin support."]}),"\n",(0,i.jsx)(n.h4,{id:"the-new-election-rule-phragmms",children:"The New Election Rule: Phragmms"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"Phragmms"})," is an iterative greedy algorithm that starts with an empty committee and alternates\nbetween the ",(0,i.jsx)(n.code,{children:"Phragmms"})," heuristic for inserting a new candidate and ",(0,i.jsx)(n.em,{children:"rebalancing"})," by replacing the\nweight vector with a balanced one. The main differentiator between ",(0,i.jsx)(n.code,{children:"Phragmms"})," and ",(0,i.jsx)(n.code,{children:"seqPhragmen"})," is\nthat the latter only perform an approximate rebalancing. Details can be found in\n",(0,i.jsx)(n.a,{href:"#rationale-for-maintaining-an-even-distribution-of-stake",children:"Balanced Stake Distribution"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["The computation is executed by off-chain workers privately and separately from block production, and\nthe validators only need to submit and verify the solutions on-chain. Relative to a committee ",(0,i.jsx)(n.em,{children:"A"}),",\nthe score of an unelected candidate ",(0,i.jsx)(n.em,{children:"c"})," is an easy-to-compute rough estimate of what would be the\nsize of the least stake backing if we added ",(0,i.jsx)(n.em,{children:"c"})," to committee ",(0,i.jsx)(n.em,{children:"A"}),". Observing on-chain, only one\nsolution needs to be tracked at any given time, and a block producer can submit a new solution in\nthe block only if the block passes the verification test, consisting of checking:"]}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsx)(n.li,{children:"Feasibility,"}),"\n",(0,i.jsx)(n.li,{children:"Balance and"}),"\n",(0,i.jsxs)(n.li,{children:["Local Optimality - The least stake backing of ",(0,i.jsx)(n.em,{children:"A"})," is higher than the highest score among\nunelected candidates"]}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"If the tentative solution passes the tests, then it replaces the current solution as the tentative\nwinner. The official winning solution is declared at the end of the election window."}),"\n",(0,i.jsxs)(n.p,{children:["A powerful feature of this algorithm is the fact that both its approximation guarantee for maximin\nsupport and the above checks passing can be efficiently verified in linear time. This allows for a\nmore scalable solution for secure and proportional committee elections. While ",(0,i.jsx)(n.code,{children:"seqPhragmen"})," also has\na notion of score for unelected candidates, ",(0,i.jsx)(n.code,{children:"Phragmms"})," can be seen as a natural complication of the\n",(0,i.jsx)(n.code,{children:"seqPhragmen"})," algorithm, where ",(0,i.jsx)(n.code,{children:"Phragmms"})," always grants higher score values to candidates and thus\ninserts them with higher support values."]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"To summarize, the main differences between the two rules are:"})}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["In ",(0,i.jsx)(n.code,{children:"seqPhragmen"}),", lower scores are better, whereas in ",(0,i.jsx)(n.code,{children:"Phragmms"}),", higher scores are better."]}),"\n",(0,i.jsxs)(n.li,{children:["Inspired by ",(0,i.jsx)(n.code,{children:"seqPhragmen"}),", the scoring system of ",(0,i.jsx)(n.code,{children:"Phragmms"})," can be considered to be more intuitive\nand does a better job at estimating the value of adding a candidate to the current solution, and\nhence leads to a better candidate-selection heuristic."]}),"\n",(0,i.jsxs)(n.li,{children:["Unlike ",(0,i.jsx)(n.code,{children:"seqPhragmen"}),", in ",(0,i.jsx)(n.code,{children:"Phragmms"}),", the edge weight vector ",(0,i.jsx)(n.em,{children:"w"})," is completely rebalanced after\neach iteration of the algorithm."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.code,{children:"Phragmms"})," election rule is currently being implemented on Polkadot. Once completed, it will\nbecome one of the most sophisticated election rules implemented on a blockchain. For the first time,\nthis election rule will provide both fair representation (PJR) and security (constant-factor\napproximation for the maximin support objection) to a blockchain network."]}),"\n",(0,i.jsx)(n.h4,{id:"algorithm-2",children:"Algorithm"}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.code,{children:"Phragmms"})," algorithm iterates through the available seats, starting with an empty committee of\nsize ",(0,i.jsx)(n.em,{children:"k"}),":"]}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:["Initialize an empty committee ",(0,i.jsx)(n.em,{children:"A"})," and zero edge weight vector ",(0,i.jsx)(n.em,{children:"w = 0"}),"."]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:["Repeat ",(0,i.jsx)(n.em,{children:"k"})," times:"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["Find the unelected candidate with highest score and add it to committee ",(0,i.jsx)(n.em,{children:"A"}),"."]}),"\n",(0,i.jsxs)(n.li,{children:["Re-balance the weight vector ",(0,i.jsx)(n.em,{children:"w"})," for the new committee ",(0,i.jsx)(n.em,{children:"A"}),"."]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:["Return ",(0,i.jsx)(n.em,{children:"A"})," and ",(0,i.jsx)(n.em,{children:"w"}),"."]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"external-resources",children:"External Resources"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.a,{href:"https://arxiv.org/pdf/2004.12990.pdf",children:"Phragmms"})," - W3F research paper that expands on the\nsequential Phragm\xe9n method."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.a,{href:"https://research.web3.foundation/Polkadot/protocols/NPoS/Overview",children:"W3F Research Page on NPoS"})," -\nAn overview of Nominated Proof of Stake as its applied to Polkadot."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.a,{href:"https://github.com/w3f/consensus/tree/master/NPoS",children:"Python Reference Implementations"})," - Python\nimplementations of Simple and Complicated Phragm\xe9n methods."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/substrate/frame/staking/src/lib.rs",children:"Substrate Implementation"})," -\nRust implementation used in Substrate."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.a,{href:"https://arxiv.org/pdf/1611.08826.pdf",children:"Phragm\xe9n's and Thiele's Election Methods"})," - 95-page paper\nexplaining Phragm\xe9n's election methods in detail."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.a,{href:"https://ojs.aaai.org/index.php/AAAI/article/view/10598",children:"Phragm\xe9n\u2019s Voting Methods and Justified Representation"})," -\nThis paper by Brill ",(0,i.jsx)(n.em,{children:"et al."})," is the source for the simple Phragm\xe9n method, along with proofs about\nits properties."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.a,{href:"https://github.com/kianenigma/offline-phragmen",children:"Offline Phragm\xe9n"})," - Script to generate the\nPhragm\xe9n validator election outcome before the start of an era."]}),"\n"]})]})}function c(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(h,{...e})}):h(e)}},28453:(e,n,t)=>{t.d(n,{R:()=>s,x:()=>r});var a=t(96540);const i={},o=a.createContext(i);function s(e){const n=a.useContext(o);return a.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:s(e.components),a.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/b38833d4.a0cdfc05.js b/assets/js/b38833d4.a0cdfc05.js deleted file mode 100644 index 90a3a7ebd6d1..000000000000 --- a/assets/js/b38833d4.a0cdfc05.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6104],{54357:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>s,default:()=>c,frontMatter:()=>o,metadata:()=>r,toc:()=>l});var a=t(74848),i=t(28453);const o={id:"learn-phragmen",title:"NPoS Election Algorithms",sidebar_label:"NPoS Election Algorithms",description:"The Election Methods used in Polkadot's NPoS Mechanism.",keywords:["phragmen","sequential phragm\xe9n method","elections","algorithm","phragmms"],slug:"../learn-phragmen"},s=void 0,r={id:"learn/learn-phragmen",title:"NPoS Election Algorithms",description:"The Election Methods used in Polkadot's NPoS Mechanism.",source:"@site/../docs/learn/learn-phragmen.md",sourceDirName:"learn",slug:"/learn-phragmen",permalink:"/docs/learn-phragmen",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-phragmen.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1726760224e3,frontMatter:{id:"learn-phragmen",title:"NPoS Election Algorithms",sidebar_label:"NPoS Election Algorithms",description:"The Election Methods used in Polkadot's NPoS Mechanism.",keywords:["phragmen","sequential phragm\xe9n method","elections","algorithm","phragmms"],slug:"../learn-phragmen"},sidebar:"docs",previous:{title:"Cryptography",permalink:"/docs/learn-cryptography"},next:{title:"XCM Docs",permalink:"/docs/learn/xcm"}},d={},l=[{value:"NPoS Election Algorithms",id:"npos-election-algorithms",level:2},{value:"What is the sequential Phragm\xe9n method?",id:"what-is-the-sequential-phragm\xe9n-method",level:2},{value:"Validator Elections",id:"validator-elections",level:3},{value:"Off-Chain Phragm\xe9n",id:"off-chain-phragm\xe9n",level:4},{value:"Council Elections",id:"council-elections",level:3},{value:"What does it mean for node operators?",id:"what-does-it-mean-for-node-operators",level:2},{value:"Understanding Phragm\xe9n",id:"understanding-phragm\xe9n",level:2},{value:"Basic Phragm\xe9n",id:"basic-phragm\xe9n",level:3},{value:"Rationale",id:"rationale",level:3},{value:"Algorithm",id:"algorithm",level:3},{value:"Example",id:"example",level:3},{value:"Weighted Phragm\xe9n",id:"weighted-phragm\xe9n",level:3},{value:"Rationale",id:"rationale-1",level:3},{value:"Algorithm",id:"algorithm-1",level:3},{value:"Example",id:"example-1",level:3},{value:"Optimizations",id:"optimizations",level:2},{value:"High-Level Description",id:"high-level-description",level:3},{value:"Rationale for Minimizing the Number of Validators Per Nominator",id:"rationale-for-minimizing-the-number-of-validators-per-nominator",level:3},{value:"Rationale for Maintaining an Even Distribution of Stake",id:"rationale-for-maintaining-an-even-distribution-of-stake",level:3},{value:"Rationale for Reducing Block Computing Time",id:"rationale-for-reducing-block-computing-time",level:3},{value:"Phragmms (aka Balphragmms)",id:"phragmms-aka-balphragmms",level:3},{value:"Maximin Support Objective and PJR",id:"maximin-support-objective-and-pjr",level:4},{value:"Comparing Sequential Phragm\xe9n, MMS, and Phragmms",id:"comparing-sequential-phragm\xe9n-mms-and-phragmms",level:4},{value:"The New Election Rule: Phragmms",id:"the-new-election-rule-phragmms",level:4},{value:"Algorithm",id:"algorithm-2",level:4},{value:"External Resources",id:"external-resources",level:2}];function h(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",h4:"h4",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.h2,{id:"npos-election-algorithms",children:"NPoS Election Algorithms"}),"\n",(0,a.jsx)(n.p,{children:"Since validators are paid almost equally in in each era, it is important that the stake behind each\nvalidator is uniformly spread out. An election algorithm for Nominated Proof of Staking (NPoS) will\ntry to optimize three metrics when computing a solution graph of nominators and validators:"}),"\n",(0,a.jsxs)(n.ol,{children:["\n",(0,a.jsx)(n.li,{children:"Maximize the total amount at stake."}),"\n",(0,a.jsx)(n.li,{children:"Maximize the stake behind the minimally staked validator."}),"\n",(0,a.jsx)(n.li,{children:"Minimize the variance of the stake in the set."}),"\n"]}),"\n",(0,a.jsx)(n.admonition,{type:"note",children:(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.a,{href:"#understanding-phragm%C3%A9n",children:"Sequential Phragm\xe9n"}),", ",(0,a.jsx)(n.a,{href:"#phragmms-fka-balphragmms",children:"Phragmms"})," and\n",(0,a.jsx)(n.a,{href:"https://crates.parity.io/sp_npos_elections/balancing/fn.balance.html",children:"Star balancing"})," are a few\nnotable algorithms used for computing the NPoS solutions in Polkadot and Kusama."]})}),"\n",(0,a.jsx)(n.h2,{id:"what-is-the-sequential-phragm\xe9n-method",children:"What is the sequential Phragm\xe9n method?"}),"\n",(0,a.jsxs)(n.p,{children:["The sequential Phragm\xe9n method is a multi-winner election method introduced by Edvard Phragm\xe9n in\nthe 1890s. The quote below taken from the reference ",(0,a.jsx)(n.a,{href:"#external-resources",children:"Phragm\xe9n paper"})," sums up\nthe purpose of the sequential Phragm\xe9n method:"]}),"\n",(0,a.jsx)(n.admonition,{type:"note",children:(0,a.jsx)(n.p,{children:"The problem that Phragm\xe9n\u2019s methods try to solve is that of electing a set of a given numbers of\npersons from a larger set of candidates. Phragm\xe9n discussed this in the context of a parliamentary\nelection in a multi-member constituency; the same problem can, of course, also occur in local\nelections, but also in many other situations such as electing a board or a committee in an\norganization."})}),"\n",(0,a.jsx)(n.h3,{id:"validator-elections",children:"Validator Elections"}),"\n",(0,a.jsx)(n.p,{children:"The sequential Phragm\xe9n is one of the methods used in the Nominated Proof-of-Stake scheme to elect\nvalidators based on their own self-stake and the stake that is voted to them from nominators. It\nalso tries to equalize the weights between the validators after each election round."}),"\n",(0,a.jsx)(n.h4,{id:"off-chain-phragm\xe9n",children:"Off-Chain Phragm\xe9n"}),"\n",(0,a.jsx)(n.p,{children:"Given the large set of nominators and validators, Phragm\xe9n's method is a difficult optimization\nproblem. Polkadot uses off-chain workers to compute the result off-chain and submit a transaction to\npropose the set of winners. The reason for performing this computation off-chain is to keep a\nconstant block time of six seconds and prevent long block times at the end of each era, when the\nvalidator election takes place."}),"\n",(0,a.jsx)(n.admonition,{title:"Staking Miners",type:"info",children:(0,a.jsxs)(n.p,{children:["The process of computing the optimal solution for NPoS election can be delegated to\n",(0,a.jsx)(n.a,{href:"learn-staking-miner",children:"Staking Miners"}),"."]})}),"\n",(0,a.jsx)(n.h3,{id:"council-elections",children:"Council Elections"}),"\n",(0,a.jsx)(n.admonition,{title:"Deprecated in Polkadot OpenGov",type:"info",children:(0,a.jsxs)(n.p,{children:["Phragmen was used for Council elections in ",(0,a.jsx)(n.a,{href:"/docs/learn/learn-governance",children:"Governance v1"}),"."]})}),"\n",(0,a.jsx)(n.p,{children:"The Phragm\xe9n method was also used in the council election mechanism. When you voted for council\nmembers, you could select up to 16 different candidates and then place a reserved bond as the weight\nof your vote. Phragm\xe9n would run once on every election to determine the top candidates to assume\ncouncil positions and then again amongst the top candidates to equalize the weight of the votes\nbehind them as much as possible."}),"\n",(0,a.jsx)(n.h2,{id:"what-does-it-mean-for-node-operators",children:"What does it mean for node operators?"}),"\n",(0,a.jsx)(n.p,{children:"Phragm\xe9n is something that will run in the background and requires no extra effort from you.\nHowever, it is good to understand how it works since it means that not all the stake you've been\nnominated will end up on your validator after an election. Nominators are likely to nominate a few\ndifferent validators that they trust to do a good job operating their nodes."}),"\n",(0,a.jsxs)(n.p,{children:["You can use\n",(0,a.jsx)(n.a,{href:"https://gist.github.com/tugytur/3531cc618bfbb42f1a6cfb44d9906197",children:"this offline-phragm\xe9n"})," tool for\npredicting the outcome of a validator election ahead of a new election."]}),"\n",(0,a.jsx)(n.h2,{id:"understanding-phragm\xe9n",children:"Understanding Phragm\xe9n"}),"\n",(0,a.jsx)(n.p,{children:"This section explains the sequential Phragm\xe9n method in-depth and walks through examples."}),"\n",(0,a.jsx)(n.h3,{id:"basic-phragm\xe9n",children:"Basic Phragm\xe9n"}),"\n",(0,a.jsx)(n.h3,{id:"rationale",children:"Rationale"}),"\n",(0,a.jsx)(n.p,{children:"In order to understand the Weighted Phragm\xe9n method, we must first understand the basic Phragm\xe9n\nmethod. There must be some group of candidates, a group of seats they are vying for (which is less\nthan the size of the group of candidates), and some group of voters. The voters can cast an approval\nvote - that is, they can signal approval for any subset of the candidates."}),"\n",(0,a.jsx)(n.p,{children:"The subset should be a minimum size of one (i.e., one cannot vote for no candidates) and a maximum\nsize of one less than the number of candidates (i.e., one cannot vote for all candidates). Users are\nallowed to vote for all or no candidates, but this will not affect the final result, making votes of\nthis nature meaningless."}),"\n",(0,a.jsxs)(n.p,{children:['Note that in this example, all voters are assumed to have equal say (that is, their vote does not\ncount more or less than any other votes). The weighted case will be considered later. However,\nweighting can be "simulated" by having multiple voters vote for the same slate of candidates. For\ninstance, five people voting for a particular candidate is mathematically the same as a single\nperson with weight ',(0,a.jsx)(n.code,{children:"5"})," voting for that candidate."]}),"\n",(0,a.jsxs)(n.p,{children:['The particular algorithm we call here the "Basic Phragm\xe9n" was first described by Brill ',(0,a.jsx)(n.em,{children:"et al."})," in\ntheir paper\n",(0,a.jsx)(n.a,{href:"https://ojs.aaai.org/index.php/AAAI/article/view/10598",children:'"Phragm\xe9n\u2019s Voting Methods and Justified Representation"'}),"."]}),"\n",(0,a.jsx)(n.h3,{id:"algorithm",children:"Algorithm"}),"\n",(0,a.jsx)(n.p,{children:"The Phragm\xe9n method will iterate, selecting one seat at a time, according to the following rules:"}),"\n",(0,a.jsxs)(n.ol,{children:["\n",(0,a.jsx)(n.li,{children:"Voters submit their ballots, marking which candidates they approve. Ballots will not be modified\nafter submission."}),"\n",(0,a.jsx)(n.li,{children:"An initial load of 0 is set for each ballot."}),"\n",(0,a.jsxs)(n.li,{children:["The candidate who wins the next available seat is the one where the ballots of their supporters\nwould have the ",(0,a.jsx)(n.em,{children:"least average (mean) cost"})," if that candidate wins."]}),"\n",(0,a.jsxs)(n.li,{children:["The ",(0,a.jsx)(n.em,{children:"n"})," ballots that approved that winning candidate get ",(0,a.jsx)(n.em,{children:"1/n"})," added to their load."]}),"\n",(0,a.jsx)(n.li,{children:"The load of all ballots that supported the winner of this round are averaged out so that they are\nequal."}),"\n",(0,a.jsx)(n.li,{children:"If there are any more seats, go back to step 3. Otherwise, the selection ends."}),"\n"]}),"\n",(0,a.jsx)(n.h3,{id:"example",children:"Example"}),"\n",(0,a.jsx)(n.p,{children:"Let's walk through an example with four candidates vying for three seats, and five voters."}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"Open Seats: 3\n\nCandidates: A B C D L0\n-------------------------\nVoter V1: X 0\nVoter V2: X X 0\nVoter V3: X X 0\nVoter V4: X X 0\nVoter V5: X X X 0\n"})}),"\n",(0,a.jsxs)(n.p,{children:["In this example, we can see that voter ",(0,a.jsx)(n.code,{children:"V1"})," approves only of candidate ",(0,a.jsx)(n.code,{children:"B"}),", voter ",(0,a.jsx)(n.code,{children:"V2"})," approves of\ncandidates ",(0,a.jsx)(n.code,{children:"C"})," and ",(0,a.jsx)(n.code,{children:"D"}),", etc. Voters can approve any number of candidates between 1 and\n",(0,a.jsx)(n.code,{children:"number_of_candidates - 1"}),'. An initial "load" of ',(0,a.jsx)(n.code,{children:"0"})," is set for each ballot (",(0,a.jsx)(n.code,{children:"L0"})," = load after round\n",(0,a.jsx)(n.code,{children:"0"}),', i.e., the "round" before the first round). We shall see shortly how this load is updated and\nused to select candidates.']}),"\n",(0,a.jsx)(n.p,{children:'We will now run through an iterative algorithm, with each iteration corresponding to one "seat".\nSince there are three seats, we will walk through three rounds.'}),"\n",(0,a.jsxs)(n.p,{children:["For the first round, the winner is simply going to be the candidate with the most votes. Since all\nloads are equal, the lowest average load will be the candidate with the highest n, since ",(0,a.jsx)(n.code,{children:"1/n"})," will\nget smaller as ",(0,a.jsx)(n.code,{children:"n"})," increases. For this first example round, for instance, candidate ",(0,a.jsx)(n.code,{children:"A"})," had only one\nballot vote for them. Thus, the average load for candidate A is ",(0,a.jsx)(n.code,{children:"1/1"}),", or 1. Candidate C has two\nballots approving of them, so the average load is ",(0,a.jsx)(n.code,{children:"1/2"}),". Candidate B has the lowest average load, at\n",(0,a.jsx)(n.code,{children:"1/4"})," and they get the first seat. Ballots loads are now averaged out, although for the first\niteration, this will not have any effect."]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"Filled seats: 1 (B)\nOpen Seats: 2\n\nCandidates: A B C D L0 L1\n-----------------------------\nVoter V1: X 0 1/4\nVoter V2: X X 0 0\nVoter V3: X X 0 1/4\nVoter V4: X X 0 1/4\nVoter V5: X X X 0 1/4\n"})}),"\n",(0,a.jsxs)(n.p,{children:["We are now down to candidates ",(0,a.jsx)(n.code,{children:"A"}),", ",(0,a.jsx)(n.code,{children:"C"}),", and ",(0,a.jsx)(n.code,{children:"D"})," for two open seats. There is only one voter (",(0,a.jsx)(n.code,{children:"V4"}),")\nfor ",(0,a.jsx)(n.code,{children:"A"}),", with load ",(0,a.jsx)(n.code,{children:"1/4"}),". ",(0,a.jsx)(n.code,{children:"C"})," has two voters, ",(0,a.jsx)(n.code,{children:"V2"})," and ",(0,a.jsx)(n.code,{children:"V5"}),", with loads of ",(0,a.jsx)(n.code,{children:"0"})," and ",(0,a.jsx)(n.code,{children:"1/4"}),". ",(0,a.jsx)(n.code,{children:"D"})," has\nthree voters approving of them, ",(0,a.jsx)(n.code,{children:"V2"}),", ",(0,a.jsx)(n.code,{children:"V3"}),", and ",(0,a.jsx)(n.code,{children:"V5"}),", with loads of ",(0,a.jsx)(n.code,{children:"0"}),", ",(0,a.jsx)(n.code,{children:"1/4"}),", and ",(0,a.jsx)(n.code,{children:"1/4"}),",\nrespectively."]}),"\n",(0,a.jsxs)(n.p,{children:["If Candidate ",(0,a.jsx)(n.code,{children:"A"})," wins, the average load would be ",(0,a.jsx)(n.code,{children:"(1/4 + 1/1) / 1"}),", or ",(0,a.jsx)(n.code,{children:"5/4"}),". If candidate ",(0,a.jsx)(n.code,{children:"C"})," wins,\nthe average load would be ",(0,a.jsx)(n.code,{children:"((0 + 1/2) + (1/4 + 1/2)) / 2"}),", or ",(0,a.jsx)(n.code,{children:"5/8"}),". If candidate ",(0,a.jsx)(n.code,{children:"D"})," wins, the\naverage load would be ",(0,a.jsx)(n.code,{children:"((0 + 1/3) + (1/4 + 1/3) + (1/4 + 1/3)) / 3"}),", or ",(0,a.jsx)(n.code,{children:"1/2"}),". Since ",(0,a.jsx)(n.code,{children:"1/2"})," is the\nlowest average load, candidate D wins the second round."]}),"\n",(0,a.jsxs)(n.p,{children:["Now everybody who voted for Candidate ",(0,a.jsx)(n.code,{children:"D"})," has their load set to the average, ",(0,a.jsx)(n.code,{children:"1/2"})," of all the loads."]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"Filled seats: 2 (B, D)\nOpen Seats: 1\n\nCandidates: A B C D L0 L1 L2\n---------------------------------\nVoter V1: X 0 1/4 1/4\nVoter V2: X X 0 0 1/2\nVoter V3: X X 0 1/4 1/2\nVoter V4: X X 0 1/4 1/4\nVoter V5: X X X 0 1/4 1/2\n"})}),"\n",(0,a.jsxs)(n.p,{children:["There is now one seat open and two candidates, ",(0,a.jsx)(n.code,{children:"A"})," and ",(0,a.jsx)(n.code,{children:"C"}),". Voter ",(0,a.jsx)(n.code,{children:"V4"})," is the only one voting for\n",(0,a.jsx)(n.code,{children:"A"}),", so if ",(0,a.jsx)(n.code,{children:"A"})," wins then the average load would be ",(0,a.jsx)(n.code,{children:"(1/4 + 1/1) / 1"}),", or ",(0,a.jsx)(n.code,{children:"5/4"}),". Voters ",(0,a.jsx)(n.code,{children:"V2"})," and ",(0,a.jsx)(n.code,{children:"V5"}),"\n(both with load ",(0,a.jsx)(n.code,{children:"1/2"}),") support ",(0,a.jsx)(n.code,{children:"C"}),", so if ",(0,a.jsx)(n.code,{children:"C"})," wins the average load would be\n",(0,a.jsx)(n.code,{children:"((1/2 + 1/2) + (1/2 + 1/2)) / 2"}),", or ",(0,a.jsx)(n.code,{children:"1"}),". Since the average load would be lower with ",(0,a.jsx)(n.code,{children:"C"}),", ",(0,a.jsx)(n.code,{children:"C"})," wins\nthe final seat."]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"Filled seats: 3 (B, D, C)\nOpen Seats: 0\n\nCandidates: A B C D L0 L1 L2 L3\n------------------------------------\nVoter V1: X 0 1/4 1/4 1/4\nVoter V2: X X 0 0 1/2 1\nVoter V3: X X 0 1/4 1/2 1/2\nVoter V4: X X 0 1/4 1/4 1/4\nVoter V5: X X X 0 1/4 1/2 1\n"})}),"\n",(0,a.jsxs)(n.p,{children:["An interesting characteristic of this calculation is that the total load of all voters will always\nequal the number of seats filled in that round. In the zeroth round, load starts at ",(0,a.jsx)(n.code,{children:"0"})," and there\nare no seats filled. After the first round, the total of all loads is ",(0,a.jsx)(n.code,{children:"1"}),", after the second round it\nis ",(0,a.jsx)(n.code,{children:"2"}),", etc."]}),"\n",(0,a.jsx)(n.h3,{id:"weighted-phragm\xe9n",children:"Weighted Phragm\xe9n"}),"\n",(0,a.jsx)(n.h3,{id:"rationale-1",children:"Rationale"}),"\n",(0,a.jsx)(n.p,{children:"While this method works well if all voters have equal weight, this is not the case in Polkadot.\nElections for both validators and candidates for the Council are weighted by the number of tokens\nheld by the voters. This makes elections more similar to a corporate shareholder election than a\ntraditional political election, where some members have more pull than others. Someone with a single\ntoken will have much less voting power than someone with 100. Although this may seem\nanti-democratic, in a pseudonymous system, it is trivial for someone with 100 tokens to create 100\ndifferent accounts and spread their wealth to all of their pseudonyms."}),"\n",(0,a.jsx)(n.p,{children:"Therefore, not only do we want to allow voters to have their preferences expressed in the result,\nbut do so while keeping as equal a distribution of their stake as possible and express the wishes of\nminorities as much as is possible. The Weighted Phragm\xe9n method allows us to reach these goals."}),"\n",(0,a.jsx)(n.h3,{id:"algorithm-1",children:"Algorithm"}),"\n",(0,a.jsx)(n.p,{children:"Weighted Phragm\xe9n is similar to Basic Phragm\xe9n in that it selects candidates sequentially, one per\nround, until the maximum number of candidates are elected. However, it has additional features to\nalso allocate weight (stake) behind the candidates."}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.em,{children:'NOTE: in terms of validator selection, for the following algorithm, you can think of "voters" as\n"nominators" and "candidates" as "validators".'})}),"\n",(0,a.jsxs)(n.ol,{children:["\n",(0,a.jsx)(n.li,{children:'Candidates are elected, one per round, and added to the set of successful candidates (they have\nwon a "seat"). This aspect of the algorithm is very similar to the "basic Phragm\xe9n" algorithm\ndescribed above.'}),"\n",(0,a.jsx)(n.li,{children:"However, as candidates are elected, a weighted mapping is built, defining the weights of each\nselection of a validator by each nominator."}),"\n"]}),"\n",(0,a.jsx)(n.p,{children:"In more depth, the algorithm operates like so:"}),"\n",(0,a.jsxs)(n.ol,{children:["\n",(0,a.jsx)(n.li,{children:"Create a list of all voters, their total amount of stake, and which validators they support."}),"\n",(0,a.jsxs)(n.li,{children:["Generate an initial edge-weighted graph mapping from voters to candidates, where each edge weight\nis the total ",(0,a.jsx)(n.em,{children:"potential"})," weight (stake) given by that voter. The sum of all potential weight for\na given candidate is called their ",(0,a.jsx)(n.em,{children:"approval stake"}),"."]}),"\n",(0,a.jsxs)(n.li,{children:["Now we start electing candidates. For the list of all candidates who have not been elected, get\ntheir score, which is equal to ",(0,a.jsx)(n.code,{children:"1 / approval_stake"}),"."]}),"\n",(0,a.jsxs)(n.li,{children:["For each voter, update the score of each candidate they support by adding their total budget\n(stake) multiplied by the load of the voter and then dividing by that candidate's approval stake\n",(0,a.jsx)(n.code,{children:"(voter_budget * voter_load / candidate_approval_stake)"}),"."]}),"\n",(0,a.jsx)(n.li,{children:"Determine the candidate with the lowest score and elect that candidate. Remove the elected\ncandidate from the pool of potential candidates."}),"\n",(0,a.jsx)(n.li,{children:"The load for each edge connecting to the winning candidate is updated, with the edge load set to\nthe score of the candidate minus the voter's load, and the voter's load then set to the\ncandidate's score."}),"\n",(0,a.jsx)(n.li,{children:"If there are more candidates to elect, go to Step 3. Otherwise, continue to step 8."}),"\n",(0,a.jsxs)(n.li,{children:["Now the stake is distributed amongst each nominator who backed at least one elected candidate.\nThe backing stake for each candidate is calculated by taking the budget of the voter and\nmultiplying by the edge load then dividing by the candidate load\n(",(0,a.jsx)(n.code,{children:"voter_budget * edge_load / candidate_load"}),")."]}),"\n"]}),"\n",(0,a.jsx)(n.h3,{id:"example-1",children:"Example"}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.em,{children:"Note: All numbers in this example are rounded off to three decimal places."})}),"\n",(0,a.jsxs)(n.p,{children:["In the following example, there are five voters and five candidates vying for three potential seats.\nEach voter ",(0,a.jsx)(n.code,{children:"V1 - V5"})," has an amount of stake equal to their number (e.g., ",(0,a.jsx)(n.code,{children:"V1"})," has stake of 1, ",(0,a.jsx)(n.code,{children:"V2"}),"\nhas stake of 2, etc.). Every voter is also going to have a ",(0,a.jsx)(n.em,{children:"load,"})," which initially starts at ",(0,a.jsx)(n.code,{children:"0"}),"."]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"Filled seats: 0\nOpen Seats: 3\n\nCandidates: A B C D E L0\n----------------------------\nVoter V1 (1): X X 0\nVoter V2 (2): X X 0\nVoter V3 (3): X 0\nVoter V4 (4): X X X 0\nVoter V5 (5): X X 0\n"})}),"\n",(0,a.jsx)(n.p,{children:"Let us now calculate the approval stake of each of the candidates. Recall that this is merely the\namount of all support for that candidate by all voters."}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"Candidate A: 1 + 2 + 3 + 5 = 11\nCandidate B: 1 + 2 + 4 = 7\nCandidate C: 4 = 4\nCandidate D: 4 + 5 = 9\nCandidate E: 0\n"})}),"\n",(0,a.jsxs)(n.p,{children:["The first step is easy - candidate ",(0,a.jsx)(n.code,{children:"E"})," has 0 approval stake and can be ignored from here on out.\nThey will never be elected."]}),"\n",(0,a.jsxs)(n.p,{children:["We can now calculate the initial scores of the candidates, which is ",(0,a.jsx)(n.code,{children:"1 / approval_stake"}),":"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"Candidate A: 1 / 11 = 0.091\nCandidate B: 1 / 7 = 0.143\nCandidate C: 1 / 4 = 0.25\nCandidate D: 1 / 9 = 0.111\nCandidate E: N/A\n"})}),"\n",(0,a.jsxs)(n.p,{children:["For every edge, we are going to calculate the score, which is current score plus the total budget *\nthe load of the voter divided by the approval stake of the candidate. However, since the load of\nevery voter starts at 0, and anything multiplied by 0 is 0, any addition will be ",(0,a.jsx)(n.code,{children:"0 / x"}),", or 0. This\nmeans that this step can be safely ignored for the initial round."]}),"\n",(0,a.jsxs)(n.p,{children:["Thus, the best (lowest) score for Round 0 is Candidate A, with a score of ",(0,a.jsx)(n.code,{children:"0.091"}),"."]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"Candidates: A B C D E L0 L1\n----------------------------------\nVoter V1 (1): X X 0 0.091\nVoter V2 (2): X X 0 0.091\nVoter V3 (3): X 0 0.091\nVoter V4 (4): X X X 0 0\nVoter V5 (5): X X 0 0.091\n"})}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"Filled seats: 1 (A)\nOpen Seats: 2\n\nCandidates: A B C D E L0\n----------------------------\nVoter V1 (1): X X 0\nVoter V2 (2): X X 0\nVoter V3 (3): X 0\nVoter V4 (4): X X X 0\nVoter V5 (5): X X 0\n"})}),"\n",(0,a.jsxs)(n.p,{children:["Candidate ",(0,a.jsx)(n.code,{children:"A"})," is now safe; there is no way that they will lose their seat. Before moving on to the\nnext round, we need to update the scores on the edges of our graph for any candidates who have not\nyet been elected."]}),"\n",(0,a.jsx)(n.p,{children:"We elided this detail in the previous round, since it made no difference to the final scores, but we\nshould go into depth here to see how scores are updated. We first must calculate the new loads of\nthe voters, and then calculate the new scores of the candidates."}),"\n",(0,a.jsxs)(n.p,{children:["Any voter who had one of their choices for candidate fill the seat in this round (i.e., voters ",(0,a.jsx)(n.code,{children:"V1"}),",\n",(0,a.jsx)(n.code,{children:"V2"}),", ",(0,a.jsx)(n.code,{children:"V3"}),", and ",(0,a.jsx)(n.code,{children:"V5"}),", who all voted for ",(0,a.jsx)(n.code,{children:"A"}),") will have their load increased. This load increase will\nblunt the impact of their vote in future rounds, and the edge (which will be used in determining\nstake allocation later) is set to the score of the elected candidate minus the ",(0,a.jsx)(n.em,{children:"current"})," voter load."]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"edge_load = elected_candidate_score - voter_load\nvoter_load = elected_candidate_score\n"})}),"\n",(0,a.jsxs)(n.p,{children:["In this instance, the score of the elected candidate is ",(0,a.jsx)(n.code,{children:"0.091"})," and the voter loads are all ",(0,a.jsx)(n.code,{children:"0"}),". So\nfor each voter who voted for ",(0,a.jsx)(n.code,{children:"A"}),", we will calculate a new edge load ",(0,a.jsx)(n.code,{children:"Voter"})," -> ",(0,a.jsx)(n.code,{children:"A"})," of:"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"Edge load: 0.091 - 0 = 0.091\n"})}),"\n",(0,a.jsx)(n.p,{children:"and a new voter load of:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"Voter load: 0.091\n"})}),"\n",(0,a.jsxs)(n.p,{children:["As a reminder, here are the current scores. Loads of the voters are all ",(0,a.jsx)(n.code,{children:"0"}),"."]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"Candidate B : 0.143\nCandidate C : 0.25\nCandidate D : 0.111\n"})}),"\n",(0,a.jsx)(n.p,{children:"Now, we go through the weighted graph and update the score of the candidate and the load of the\nedge, using the algorithm:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"candidate_score = candidate_score + ((voter_budget * voter_load) / candidate_approval_stake)\n"})}),"\n",(0,a.jsx)(n.p,{children:"Without walking through each step, this gives us the following modifications to the scores of the\ndifferent candidates."}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"V1 updates B to 0.156\nV2 updates B to 0.182\nV4 updates B to 0.182\nV4 updates C to 0.25\nV4 updates D to 0.111\nV5 updates D to 0.162\n"})}),"\n",(0,a.jsx)(n.p,{children:"After scores are updated, the final scores for the candidates for this round are:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"Candidate B: 0.182\nCandidate C: 0.25\nCandidate D: 0.162\n"})}),"\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.code,{children:"D"}),", with the lowest score, is elected. You will note that even though candidate ",(0,a.jsx)(n.code,{children:"B"})," had more voters\nsupporting them, candidate ",(0,a.jsx)(n.code,{children:"D"})," won the election due to their lower score. This is directly due to\nthe fact that they had the lowest score, of course, but the root reason behind them having a lower\nscore was both the greater amount of stake behind them and that voters who did not get one of their\nchoices in an earlier round (in this example, voter V4) correspond to a higher likelihood of a\ncandidate being elected."]}),"\n",(0,a.jsxs)(n.p,{children:["We then update the loads for the voters and edges as specified above for any voters who voted for\ncandidate ",(0,a.jsx)(n.code,{children:"D"})," (viz., ",(0,a.jsx)(n.code,{children:"V4"})," and ",(0,a.jsx)(n.code,{children:"V5"}),") using the same formula as above."]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"Filled seats: 2 (A, D)\nOpen Seats: 1\n\nCandidates: A B C D E L0 L1 L2\n-----------------------------------\nVoter V1 (1): X X 0 0.091 0.091\nVoter V2 (2): X X 0 0.091 0.091\nVoter V3 (3): X 0 0.091 0.091\nVoter V4 (4): X X X 0 0 0.162\nVoter V5 (5): X X 0 0.091 0.162\n"})}),"\n",(0,a.jsx)(n.p,{children:"Following a similar process for Round 2, we start with initial candidate scores of:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"Candidate B : 0.143\nCandidate C : 0.25\n"})}),"\n",(0,a.jsx)(n.p,{children:"We can then update the scores of the remaining two candidates according to the algorithm described\nabove."}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"V1 updates B to 0.156\nV2 updates B to 0.182\nV4 updates B to 0.274\nV4 updates C to 0.412\n"})}),"\n",(0,a.jsxs)(n.p,{children:["With the lowest score of ",(0,a.jsx)(n.code,{children:"0.274"}),", Candidate ",(0,a.jsx)(n.code,{children:"B"})," claims the last open seat. Candidates ",(0,a.jsx)(n.code,{children:"A"}),", ",(0,a.jsx)(n.code,{children:"D"}),", and\n",(0,a.jsx)(n.code,{children:"B"})," have been elected, and candidates ",(0,a.jsx)(n.code,{children:"C"})," and ",(0,a.jsx)(n.code,{children:"E"})," are not."]}),"\n",(0,a.jsx)(n.p,{children:"Before moving on, we must perform a final load adjustment for the voters and the graph."}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"Filled seats: 3 (A, D, B)\nOpen Seats: 0\n\nCandidates: A B C D E L0 L1 L2 L3\n------------------------------------------\nVoter V1 (1): X X 0 0.091 0.091 0.274\nVoter V2 (2): X X 0 0.091 0.091 0.274\nVoter V3 (3): X 0 0.091 0.091 0.091\nVoter V4 (4): X X X 0 0 0.162 0.274\nVoter V5 (5): X X 0 0.091 0.162 0.162\n"})}),"\n",(0,a.jsx)(n.p,{children:"Now we have to determine how much stake every voter should allocate to each candidate. This is done\nby taking the load of the each edge and dividing it by the voter load, then multiplying by the total\nbudget of the voter."}),"\n",(0,a.jsx)(n.p,{children:"In this example, the weighted graph ended up looking like this:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"Nominator: V1\n\tEdge to A load= 0.091\n\tEdge to B load= 0.183\nNominator: V2\n\tEdge to A load= 0.091\n\tEdge to B load= 0.183\nNominator: V3\n\tEdge to A load= 0.091\nNominator: V4\n\tEdge to B load= 0.113\n\tEdge to D load= 0.162\nNominator: V5\n\tEdge to A load= 0.091\n\tEdge to D load= 0.071\n"})}),"\n",(0,a.jsxs)(n.p,{children:["For instance, the budget of ",(0,a.jsx)(n.code,{children:"V1"})," is ",(0,a.jsx)(n.code,{children:"1"}),", the edge load to ",(0,a.jsx)(n.code,{children:"A"})," is ",(0,a.jsx)(n.code,{children:"0.091"}),", and the voter load is\n",(0,a.jsx)(n.code,{children:"0.274"}),". Using our equation:"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"backing_stake (A) = voter_budget * edge_load / voter_load\n"})}),"\n",(0,a.jsx)(n.p,{children:"We can fill these variables in with:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"backing_stake (A) = 1 * 0.091 / 0.274 = 0.332\n"})}),"\n",(0,a.jsxs)(n.p,{children:["For ",(0,a.jsx)(n.code,{children:"V1"})," backing stake of ",(0,a.jsx)(n.code,{children:"B"}),", you can simply replace the edge load value and re-calculate."]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"backing_stake (B) = 1 * 0.183 / 0.274 = 0.668\n"})}),"\n",(0,a.jsx)(n.p,{children:"Note that the total amount of all backing stake for a given voter will equal the total budget of the\nvoter, unless that voter had no candidates elected, in which case it will be 0."}),"\n",(0,a.jsx)(n.p,{children:"The final results are:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"A is elected with stake 6.807.\nD is elected with stake 4.545.\nB is elected with stake 3.647.\n\nV1 supports: A with stake: 0.332 and B with stake: 0.668.\nV2 supports: A with stake: 0.663 and B with stake: 1.337.\nV3 supports: A with stake: 3.0.\nV4 supports: B with stake: 1.642 and D with stake: 2.358.\nV5 supports: A with stake: 2.813 and D with stake: 2.187.\n"})}),"\n",(0,a.jsxs)(n.p,{children:["You will notice that the total amount of stake for candidates ",(0,a.jsx)(n.code,{children:"A"}),", ",(0,a.jsx)(n.code,{children:"D"}),", and ",(0,a.jsx)(n.code,{children:"B"})," equals (aside from\nrounding errors) the total amount of stake of all the voters (",(0,a.jsx)(n.code,{children:"1 + 2 + 3 + 4 + 5 = 15"}),"). This is\nbecause each voter had at least one of their candidates fill a seat. Any voter who had none of their\ncandidates selected will also not have any stake in any of the elected candidates."]}),"\n",(0,a.jsx)(n.h2,{id:"optimizations",children:"Optimizations"}),"\n",(0,a.jsx)(n.p,{children:"The results for nominating validators are further optimized for several purposes:"}),"\n",(0,a.jsxs)(n.ol,{children:["\n",(0,a.jsx)(n.li,{children:"To reduce the number of edges, i.e. to minimize the number of validators any nominator selects"}),"\n",(0,a.jsx)(n.li,{children:"To ensure, as much as possible, an even distribution of stake among the validators"}),"\n",(0,a.jsx)(n.li,{children:"Reduce the amount of block computation time"}),"\n"]}),"\n",(0,a.jsx)(n.h3,{id:"high-level-description",children:"High-Level Description"}),"\n",(0,a.jsx)(n.p,{children:"After running the weighted Phragm\xe9n algorithm, a process is run that redistributes the vote amongst\nthe elected set. This process will never add or remove an elected candidate from the set. Instead,\nit reduces the variance in the list of backing stake from the voters to the elected candidates.\nPerfect equalization is not always possible, but the algorithm attempts to equalize as much as\npossible. It then runs an edge-reducing algorithm to minimize the number of validators per\nnominator, ideally giving every nominator a single validator to nominate per era."}),"\n",(0,a.jsxs)(n.p,{children:["To minimize block computation time, the staking process is run as an\n",(0,a.jsx)(n.a,{href:"https://docs.substrate.io/reference/how-to-guides/offchain-workers/",children:"off-chain worker"}),". In order to\ngive time for this off-chain worker to run, staking commands (bond, nominate, etc.) are not allowed\nin the last quarter of each era."]}),"\n",(0,a.jsxs)(n.p,{children:["These optimizations will not be covered in-depth on this page. For more details, you can view the\n",(0,a.jsx)(n.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/substrate/frame/elections-phragmen/src/lib.rs",children:"Rust implementation of elections in Substrate"}),",\nthe\n",(0,a.jsx)(n.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/substrate/frame/staking/src/lib.rs",children:"Rust implementation of staking in Substrate"}),",\nor the ",(0,a.jsx)(n.code,{children:"seqPhragm\xe9nwithpostprocessing"})," method in the\n",(0,a.jsx)(n.a,{href:"https://github.com/w3f/consensus/tree/master/NPoS",children:"Python reference implementation"}),". If you would\nlike to dive even more deeply, you can review the\n",(0,a.jsx)(n.a,{href:"https://research.web3.foundation/Polkadot/protocols/NPoS/Overview#the-election-process",children:"W3F Research Page on Sequential Phragm\xe9n Method"}),"."]}),"\n",(0,a.jsx)(n.h3,{id:"rationale-for-minimizing-the-number-of-validators-per-nominator",children:"Rationale for Minimizing the Number of Validators Per Nominator"}),"\n",(0,a.jsxs)(n.p,{children:["Paying out rewards for staking from every validator to all of their nominators can cost a\nnon-trivial amount of chain resources (in terms of space on chain and resources to compute). Assume\na system with 200 validators and 1000 nominators, where each of the nominators has nominated 10\ndifferent validators. Payout would thus require ",(0,a.jsx)(n.code,{children:"1_000 * 10"}),", or 10_000 transactions. In an ideal\nscenario, if every nominator selects a single validator, only 1_000 transactions would need to take\nplace - an order of magnitude fewer. Empirically, network slowdown at the beginning of an era has\noccurred due to the large number of individual payouts by validators to nominators. In extreme\ncases, this could be an attack vector on the system, where nominators nominate many different\nvalidators with small amounts of stake in order to slow the system at the next era change."]}),"\n",(0,a.jsxs)(n.p,{children:["While this would reduce network and on-chain load, being able to select only a single validator\nincurs some diversification costs. If the single validator that a nominator has nominated acts\nmaliciously, then the nominator incurs a risk of a significant amount of\n",(0,a.jsx)(n.a,{href:"/docs/learn-offenses",children:"slashing"}),". Nominators are thus allowed to nominate up to 16 different\nvalidators. However, after the weighted edge-reducing algorithm is run, the number of validators per\nnominator is minimized. Nominators are likely to see themselves nominating a single active validator\nfor an era."]}),"\n",(0,a.jsx)(n.p,{children:"At each era change, as the algorithm runs again, nominators are likely to have a different validator\nthan they had before (assuming a significant number of selected validators). Therefore, nominators\ncan diversify against incompetent or corrupt validators causing slashing on their accounts, even if\nthey only nominate a single validator per era."}),"\n",(0,a.jsx)(n.h3,{id:"rationale-for-maintaining-an-even-distribution-of-stake",children:"Rationale for Maintaining an Even Distribution of Stake"}),"\n",(0,a.jsxs)(n.p,{children:["Another issue is that we want to ensure that as equal a distribution of votes as possible amongst\nthe elected validators or council members. This helps us increase the security of the system by\nensuring that the minimum amount of tokens in order to join the active validator set or council is\nas high as possible. For example, assume a result of five validators being elected, where validators\nhave the following stake: ",(0,a.jsx)(n.code,{children:"{1_000, 20, 10, 10, 10}"}),', for a total stake of 1_050. In this case, a\npotential attacker could join the active validator set with only 11 tokens, and could obtain a\nmajority of validators with only 33 tokens (since the attacker only has to have enough stake to\n"kick out" the three lowest validators).']}),"\n",(0,a.jsxs)(n.p,{children:["In contrast, imagine a different result with the same amount of total stake, but with that stake\nperfectly equally distributed: ",(0,a.jsx)(n.code,{children:"{210, 210, 210, 210, 210}"}),". With the same amount of stake, an\nattacker would need to stake 633 tokens in order to get a majority of validators, a much more\nexpensive proposition. Although obtaining an equal distribution is unlikely, the more equal the\ndistribution, the higher the threshold - and thus the higher the expense - for attackers to gain\nentry to the set."]}),"\n",(0,a.jsx)(n.h3,{id:"rationale-for-reducing-block-computing-time",children:"Rationale for Reducing Block Computing Time"}),"\n",(0,a.jsx)(n.p,{children:"Running the Phragm\xe9n algorithm is time-consuming, and often cannot be completed within the time\nlimits of production of a single block. Waiting for calculation to complete would jeopardize the\nconstant block production time of the network. Therefore, as much computation as possible is moved\nto an off-chain worker, which validators can work on the problem without impacting block production\ntime."}),"\n",(0,a.jsxs)(n.p,{children:["To limit the complexity of the election and payout, any given nominator can only\n",(0,a.jsx)(n.a,{href:"/docs/chain-state-values#maximum-votes-per-nominator",children:"select a limited number of validators"}),"\nto nominate."]}),"\n",(0,a.jsx)(n.h3,{id:"phragmms-aka-balphragmms",children:"Phragmms (aka Balphragmms)"}),"\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.code,{children:"Phragmms"}),", formerly known as ",(0,a.jsx)(n.code,{children:"Balphragmms"}),", is a new election rule inspired by Phragm\xe9n and\ndeveloped in-house for Polkadot. In general, election rules on blockchains is an active topic of\nresearch. This is due to the conflicting requirements for election rules and blockchains: elections\nare computationally expensive, but blockchains are computationally limited. Thus, this work\nconstitutes state of the art in terms of optimization."]}),"\n",(0,a.jsxs)(n.p,{children:["Proportional representation is a very important property for a decentralized network to have in\norder to maintain a sufficient level of decentralization. While this is already provided by the\ncurrently implemented ",(0,a.jsx)(n.code,{children:"seqPhragmen"}),", this new election rule provides the advantage of the added\nsecurity guarantee described below. As far as we can tell, at the time of writing, Polkadot and\nKusama are the only blockchain networks that implement an election rule that guarantees proportional\nrepresentation."]}),"\n",(0,a.jsxs)(n.p,{children:["The security of a distributed and decentralized system such as Polkadot is directly related to the\ngoal of avoiding ",(0,a.jsx)(n.em,{children:"overrepresentation"})," of any minority. This is a stark contrast to traditional\napproaches to proportional representation axioms, which typically only seek to avoid\nunderrepresentation."]}),"\n",(0,a.jsx)(n.h4,{id:"maximin-support-objective-and-pjr",children:"Maximin Support Objective and PJR"}),"\n",(0,a.jsxs)(n.p,{children:["This new election rule aims to achieve a constant-factor approximation guarantee for the ",(0,a.jsx)(n.em,{children:"maximin\nsupport objective"})," and the closely related ",(0,a.jsx)(n.em,{children:"proportional justified representation"})," (PJR) property."]}),"\n",(0,a.jsxs)(n.p,{children:["The maximin support objective is based on maximizing the support of the least-supported elected\ncandidate, or in the case of Polkadot and Kusama, maximizing the least amount of stake backing\namongst elected validators. This security-based objective translates to a security guarantee for\nNPoS and makes it difficult for an adversarial whale\u2019s validator nodes to be elected. The ",(0,a.jsx)(n.code,{children:"Phragmms"}),"\nrule, and the guarantees it provides in terms of security and proportionality, have been formalized\nin a ",(0,a.jsx)(n.a,{href:"https://arxiv.org/pdf/2004.12990.pdf",children:"peer-reviewed paper"}),")."]}),"\n",(0,a.jsx)(n.p,{children:"The PJR property considers the proportionality of the voter\u2019s decision power. The property states\nthat a group of voters with cohesive candidate preferences and a large enough aggregate voting\nstrength deserve to have a number of representatives proportional to the group\u2019s vote strength."}),"\n",(0,a.jsx)(n.h4,{id:"comparing-sequential-phragm\xe9n-mms-and-phragmms",children:"Comparing Sequential Phragm\xe9n, MMS, and Phragmms"}),"\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.em,{children:"Sequential Phragm\xe9n"})," (",(0,a.jsx)(n.code,{children:"seqPhragmen"}),") and ",(0,a.jsx)(n.code,{children:"MMS"})," are two efficient election rules that both achieve\nPJR."]}),"\n",(0,a.jsxs)(n.p,{children:["Currently, Polkadot employs the ",(0,a.jsx)(n.code,{children:"seqPhragmen"})," method for validator and council elections. Although\n",(0,a.jsx)(n.code,{children:"seqPhramen"})," has a very fast runtime, it does not provide constant-factor approximation for the\nmaximin support problem. This is due to ",(0,a.jsx)(n.code,{children:"seqPhramen"})," only performing an ",(0,a.jsx)(n.em,{children:"approximate"})," rebalancing of\nthe distribution of stake."]}),"\n",(0,a.jsxs)(n.p,{children:["In contrast, ",(0,a.jsx)(n.code,{children:"MMS"})," is another standard greedy algorithm that simultaneously achieves the PJR\nproperty and provides a constant factor approximation for maximin support, although with a\nconsiderably slower runtime. This is because for a given partial solution, ",(0,a.jsx)(n.code,{children:"MMS"})," computes a balanced\nedge weight vector for each possible augmented committee when a new candidate is added, which is\ncomputationally expensive."]}),"\n",(0,a.jsxs)(n.p,{children:["We introduce a new heuristic inspired by ",(0,a.jsx)(n.code,{children:"seqPhragmen"}),", ",(0,a.jsx)(n.code,{children:"PhragMMS"}),", which maintains a comparable\nruntime to ",(0,a.jsx)(n.code,{children:"seqPhragmen"}),", offers a constant-factor approximation guarantee for the maximin support\nobjective, and satisfies PJR. This is the fastest known algorithm to achieve a constant-factor\nguarantee for maximin support."]}),"\n",(0,a.jsx)(n.h4,{id:"the-new-election-rule-phragmms",children:"The New Election Rule: Phragmms"}),"\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.code,{children:"Phragmms"})," is an iterative greedy algorithm that starts with an empty committee and alternates\nbetween the ",(0,a.jsx)(n.code,{children:"Phragmms"})," heuristic for inserting a new candidate and ",(0,a.jsx)(n.em,{children:"rebalancing"})," by replacing the\nweight vector with a balanced one. The main differentiator between ",(0,a.jsx)(n.code,{children:"Phragmms"})," and ",(0,a.jsx)(n.code,{children:"seqPhragmen"})," is\nthat the latter only perform an approximate rebalancing. Details can be found in\n",(0,a.jsx)(n.a,{href:"#rationale-for-maintaining-an-even-distribution-of-stake",children:"Balanced Stake Distribution"}),"."]}),"\n",(0,a.jsxs)(n.p,{children:["The computation is executed by off-chain workers privately and separately from block production, and\nthe validators only need to submit and verify the solutions on-chain. Relative to a committee ",(0,a.jsx)(n.em,{children:"A"}),",\nthe score of an unelected candidate ",(0,a.jsx)(n.em,{children:"c"})," is an easy-to-compute rough estimate of what would be the\nsize of the least stake backing if we added ",(0,a.jsx)(n.em,{children:"c"})," to committee ",(0,a.jsx)(n.em,{children:"A"}),". Observing on-chain, only one\nsolution needs to be tracked at any given time, and a block producer can submit a new solution in\nthe block only if the block passes the verification test, consisting of checking:"]}),"\n",(0,a.jsxs)(n.ol,{children:["\n",(0,a.jsx)(n.li,{children:"Feasibility,"}),"\n",(0,a.jsx)(n.li,{children:"Balance and"}),"\n",(0,a.jsxs)(n.li,{children:["Local Optimality - The least stake backing of ",(0,a.jsx)(n.em,{children:"A"})," is higher than the highest score among\nunelected candidates"]}),"\n"]}),"\n",(0,a.jsx)(n.p,{children:"If the tentative solution passes the tests, then it replaces the current solution as the tentative\nwinner. The official winning solution is declared at the end of the election window."}),"\n",(0,a.jsxs)(n.p,{children:["A powerful feature of this algorithm is the fact that both its approximation guarantee for maximin\nsupport and the above checks passing can be efficiently verified in linear time. This allows for a\nmore scalable solution for secure and proportional committee elections. While ",(0,a.jsx)(n.code,{children:"seqPhragmen"})," also has\na notion of score for unelected candidates, ",(0,a.jsx)(n.code,{children:"Phragmms"})," can be seen as a natural complication of the\n",(0,a.jsx)(n.code,{children:"seqPhragmen"})," algorithm, where ",(0,a.jsx)(n.code,{children:"Phragmms"})," always grants higher score values to candidates and thus\ninserts them with higher support values."]}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.strong,{children:"To summarize, the main differences between the two rules are:"})}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["In ",(0,a.jsx)(n.code,{children:"seqPhragmen"}),", lower scores are better, whereas in ",(0,a.jsx)(n.code,{children:"Phragmms"}),", higher scores are better."]}),"\n",(0,a.jsxs)(n.li,{children:["Inspired by ",(0,a.jsx)(n.code,{children:"seqPhragmen"}),", the scoring system of ",(0,a.jsx)(n.code,{children:"Phragmms"})," can be considered to be more intuitive\nand does a better job at estimating the value of adding a candidate to the current solution, and\nhence leads to a better candidate-selection heuristic."]}),"\n",(0,a.jsxs)(n.li,{children:["Unlike ",(0,a.jsx)(n.code,{children:"seqPhragmen"}),", in ",(0,a.jsx)(n.code,{children:"Phragmms"}),", the edge weight vector ",(0,a.jsx)(n.em,{children:"w"})," is completely rebalanced after\neach iteration of the algorithm."]}),"\n"]}),"\n",(0,a.jsxs)(n.p,{children:["The ",(0,a.jsx)(n.code,{children:"Phragmms"})," election rule is currently being implemented on Polkadot. Once completed, it will\nbecome one of the most sophisticated election rules implemented on a blockchain. For the first time,\nthis election rule will provide both fair representation (PJR) and security (constant-factor\napproximation for the maximin support objection) to a blockchain network."]}),"\n",(0,a.jsx)(n.h4,{id:"algorithm-2",children:"Algorithm"}),"\n",(0,a.jsxs)(n.p,{children:["The ",(0,a.jsx)(n.code,{children:"Phragmms"})," algorithm iterates through the available seats, starting with an empty committee of\nsize ",(0,a.jsx)(n.em,{children:"k"}),":"]}),"\n",(0,a.jsxs)(n.ol,{children:["\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:["Initialize an empty committee ",(0,a.jsx)(n.em,{children:"A"})," and zero edge weight vector ",(0,a.jsx)(n.em,{children:"w = 0"}),"."]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:["Repeat ",(0,a.jsx)(n.em,{children:"k"})," times:"]}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["Find the unelected candidate with highest score and add it to committee ",(0,a.jsx)(n.em,{children:"A"}),"."]}),"\n",(0,a.jsxs)(n.li,{children:["Re-balance the weight vector ",(0,a.jsx)(n.em,{children:"w"})," for the new committee ",(0,a.jsx)(n.em,{children:"A"}),"."]}),"\n"]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:["Return ",(0,a.jsx)(n.em,{children:"A"})," and ",(0,a.jsx)(n.em,{children:"w"}),"."]}),"\n"]}),"\n"]}),"\n",(0,a.jsx)(n.h2,{id:"external-resources",children:"External Resources"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.a,{href:"https://arxiv.org/pdf/2004.12990.pdf",children:"Phragmms"})," - W3F research paper that expands on the\nsequential Phragm\xe9n method."]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.a,{href:"https://research.web3.foundation/Polkadot/protocols/NPoS/Overview",children:"W3F Research Page on NPoS"})," -\nAn overview of Nominated Proof of Stake as its applied to Polkadot."]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.a,{href:"https://github.com/w3f/consensus/tree/master/NPoS",children:"Python Reference Implementations"})," - Python\nimplementations of Simple and Complicated Phragm\xe9n methods."]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/substrate/frame/staking/src/lib.rs",children:"Substrate Implementation"})," -\nRust implementation used in Substrate."]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.a,{href:"https://arxiv.org/pdf/1611.08826.pdf",children:"Phragm\xe9n's and Thiele's Election Methods"})," - 95-page paper\nexplaining Phragm\xe9n's election methods in detail."]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.a,{href:"https://ojs.aaai.org/index.php/AAAI/article/view/10598",children:"Phragm\xe9n\u2019s Voting Methods and Justified Representation"})," -\nThis paper by Brill ",(0,a.jsx)(n.em,{children:"et al."})," is the source for the simple Phragm\xe9n method, along with proofs about\nits properties."]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.a,{href:"https://github.com/kianenigma/offline-phragmen",children:"Offline Phragm\xe9n"})," - Script to generate the\nPhragm\xe9n validator election outcome before the start of an era."]}),"\n"]})]})}function c(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(h,{...e})}):h(e)}},28453:(e,n,t)=>{t.d(n,{R:()=>s,x:()=>r});var a=t(96540);const i={},o=a.createContext(i);function s(e){const n=a.useContext(o);return a.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:s(e.components),a.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/b418feb9.1aefd6c3.js b/assets/js/b418feb9.1aefd6c3.js deleted file mode 100644 index 3eb6953e05c2..000000000000 --- a/assets/js/b418feb9.1aefd6c3.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7242],{42344:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>a,contentTitle:()=>i,default:()=>c,frontMatter:()=>t,metadata:()=>d,toc:()=>l});var o=s(74848),r=s(28453);const t={id:"polkadot-dashboards-governance",title:"Polkadot Dashboards: Governance",sidebar_label:"Governance",description:"A comprehensive data analysis of Polkadot governance systems, including treasury management, referendum outcomes, voting patterns, and OpenGov referenda.",keywords:["polkadot","governance","dashboard","dune"],slug:"../polkadot-dashboards-governance"},i="Polkadot Dashboards Governance",d={id:"general/dune-analytics/polkadot-dashboards/polkadot-dashboards-governance",title:"Polkadot Dashboards: Governance",description:"A comprehensive data analysis of Polkadot governance systems, including treasury management, referendum outcomes, voting patterns, and OpenGov referenda.",source:"@site/../docs/general/dune-analytics/polkadot-dashboards/polkadot-dashboards-governance.md",sourceDirName:"general/dune-analytics/polkadot-dashboards",slug:"/general/dune-analytics/polkadot-dashboards-governance",permalink:"/docs/general/dune-analytics/polkadot-dashboards-governance",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/polkadot-dashboards/polkadot-dashboards-governance.md",tags:[],version:"current",lastUpdatedBy:"MK",lastUpdatedAt:1719215716e3,frontMatter:{id:"polkadot-dashboards-governance",title:"Polkadot Dashboards: Governance",sidebar_label:"Governance",description:"A comprehensive data analysis of Polkadot governance systems, including treasury management, referendum outcomes, voting patterns, and OpenGov referenda.",keywords:["polkadot","governance","dashboard","dune"],slug:"../polkadot-dashboards-governance"},sidebar:"docs",previous:{title:"Overview",permalink:"/docs/general/dune-analytics/polkadot-dashboards-overview"},next:{title:"Staking",permalink:"/docs/general/dune-analytics/polkadot-dashboards-staking"}},a={},l=[{value:"Overview",id:"overview",level:2},{value:"Polkadot Governance Dashboard",id:"polkadot-governance-dashboard",level:2},{value:"Polkadot Treasury Flow",id:"polkadot-treasury-flow",level:3},{value:"Number of Votes by Duration of Lock",id:"number-of-votes-by-duration-of-lock",level:3},{value:"Monthly Governance Metrics",id:"monthly-governance-metrics",level:3},{value:"Conviction Voting Power",id:"conviction-voting-power",level:3},{value:"Referenda Metrics",id:"referenda-metrics",level:3},{value:"Delegation and Voting Dynamics",id:"delegation-and-voting-dynamics",level:3},{value:"Polkadot OpenGov Referenda - Home",id:"polkadot-opengov-referenda---home",level:2},{value:"Referenda Basic Information",id:"referenda-basic-information",level:3},{value:"Controversial Referenda",id:"controversial-referenda",level:3},{value:"Polkadot Opengov - Referendum Voting Analysis",id:"polkadot-opengov---referendum-voting-analysis",level:2},{value:"Voting Power Analysis",id:"voting-power-analysis",level:3},{value:"Vote Analysis",id:"vote-analysis",level:3},{value:"Voter Insights",id:"voter-insights",level:3}];function h(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",img:"img",li:"li",p:"p",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.header,{children:(0,o.jsx)(n.h1,{id:"polkadot-dashboards-governance",children:"Polkadot Dashboards Governance"})}),"\n",(0,o.jsx)(n.h2,{id:"overview",children:"Overview"}),"\n",(0,o.jsx)(n.p,{children:"This document demonstrated various Polkadot governance dashboards, offering insights into treasury\nmanagement, referendum outcomes, voting patterns, and OpenGov referenda. These dashboards aim to\nenhance community engagement by simplifying access to governance information and fostering a\ntransparent decision-making environment."}),"\n",(0,o.jsxs)(n.p,{children:["Authored by ",(0,o.jsx)(n.a,{href:"https://x.com/colorfulnotion",children:(0,o.jsx)(n.strong,{children:"@ colorfulnotion"})})]}),"\n",(0,o.jsx)(n.h2,{id:"polkadot-governance-dashboard",children:"Polkadot Governance Dashboard"}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"View On Dune:"})," ",(0,o.jsx)(n.a,{href:"https://dune.com/substrate/polkadot-gov",children:"Polkadot Governance Dashboard"})]}),"\n",(0,o.jsxs)(n.p,{children:["The ",(0,o.jsx)(n.strong,{children:"Polkadot Governance Dashboard"})," provides a clear and concise representation of the\n",(0,o.jsx)(n.a,{href:"https://wiki.polkadot.network/docs/en/learn-governance",children:"network's governance"})," activities."]}),"\n",(0,o.jsx)(n.h3,{id:"polkadot-treasury-flow",children:"Polkadot Treasury Flow"}),"\n",(0,o.jsx)(n.p,{children:"Visualizes the monthly financial movements within the Polkadot treasury."}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Treasury Netflow"}),": Treasury Inflows - Treasury Outflows"]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Treasury Inflows"}),": Inflation + Fees + Txn Tips + Slash"]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Treasury Outflows"}),": Opengov Proposals (Spender + Tipper Track) + Bounties + Burnt"]}),"\n"]}),"\n",(0,o.jsx)("iframe",{src:"https://dune.com/embeds/3386769/5684359/",height:"350",width:"100%"}),"\n",(0,o.jsx)(n.h3,{id:"number-of-votes-by-duration-of-lock",children:"Number of Votes by Duration of Lock"}),"\n",(0,o.jsx)(n.p,{children:"Visualizes Polkadot governance voting commitments."}),"\n",(0,o.jsx)("iframe",{src:"https://dune.com/embeds/3393628/5694824/",height:"350",width:"100%"}),"\n",(0,o.jsx)(n.h3,{id:"monthly-governance-metrics",children:"Monthly Governance Metrics"}),"\n",(0,o.jsx)(n.p,{children:"These charts offer insights into monthly Polkadot governance engagement."}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Number of Monthly Voters / Monthly Capital by Type / Monthly Voting Power by Type"}),"\n",(0,o.jsx)("iframe",{src:"https://dune.com/embeds/3393704/5695078/",height:"350",width:"100%"}),"\n",(0,o.jsx)("iframe",{src:"https://dune.com/embeds/3393704/5695222/",height:"350",width:"100%"}),"\n",(0,o.jsx)("iframe",{src:"https://dune.com/embeds/3393704/5695499/",height:"350",width:"100%"}),"\n"]}),"\n"]}),"\n",(0,o.jsx)(n.h3,{id:"conviction-voting-power",children:"Conviction Voting Power"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"None (0.1x)"})," - No lock"]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Locked1x"})," - 7 Days"]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Locked2x"})," - 14 Days"]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Locked3x"})," - 28 Days"]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Locked4x"})," - 56 Days"]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Locked5x"})," - 112 Days"]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Locked6x"})," - 224 Days"]}),"\n"]}),"\n",(0,o.jsx)(n.h3,{id:"referenda-metrics",children:"Referenda Metrics"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.strong,{children:"Number of Referenda by Outcome (OpenGov)"})}),"\n",(0,o.jsx)("iframe",{src:"https://dune.com/embeds/3352377/5619239/",height:"350",width:"100%"}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.strong,{children:"Number of Referenda by Origin"})}),"\n",(0,o.jsx)("iframe",{src:"https://dune.com/embeds/3415581/5734690/",height:"350",width:"100%"}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.strong,{children:"Monthly Tokens Voted by Direction / Monthly Voting Power by Direction"})}),"\n",(0,o.jsx)("iframe",{src:"https://dune.com/embeds/3394126/5695667/",height:"350",width:"100%"}),"\n",(0,o.jsx)("iframe",{src:"https://dune.com/embeds/3394126/5695709/",height:"350",width:"100%"}),"\n"]}),"\n"]}),"\n",(0,o.jsx)(n.h3,{id:"delegation-and-voting-dynamics",children:"Delegation and Voting Dynamics"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.strong,{children:"Recent Major Delegation Changes"})}),"\n",(0,o.jsx)("iframe",{src:"https://dune.com/embeds/3460749/5816431/",height:"350",width:"100%"}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.strong,{children:"Recent Major Swing Votes"})}),"\n",(0,o.jsx)("iframe",{src:"https://dune.com/embeds/3460920/5816752/",height:"350",width:"100%"}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.strong,{children:"Whale Voters"})}),"\n",(0,o.jsx)("iframe",{src:"https://dune.com/embeds/3461952/5818542/",height:"350",width:"100%"}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.strong,{children:"Awakened Whale Voters"})}),"\n",(0,o.jsx)("iframe",{src:"https://dune.com/embeds/3461031/5816940/",height:"350",width:"100%"}),"\n"]}),"\n"]}),"\n",(0,o.jsx)(n.h2,{id:"polkadot-opengov-referenda---home",children:"Polkadot OpenGov Referenda - Home"}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"View On Dune:"}),"\n",(0,o.jsx)(n.a,{href:"https://dune.com/substrate/polkadot-opengov-active-referenda",children:"Polkadot OpenGov Referenda - Home"})]}),"\n",(0,o.jsxs)(n.p,{children:["Designed for voters to quickly understand the current trend in Polkadot OpenGov and proceed to vote\non ",(0,o.jsx)(n.a,{href:"https://polkadot.polkassembly.io/opengov",children:(0,o.jsx)(n.strong,{children:"Polkassembly"})}),"."]}),"\n",(0,o.jsx)(n.h3,{id:"referenda-basic-information",children:"Referenda Basic Information"}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"Preview screenshot 1",src:s(6570).A+"",width:"2562",height:"2063"})}),"\n",(0,o.jsx)(n.h3,{id:"controversial-referenda",children:"Controversial Referenda"}),"\n",(0,o.jsxs)(n.p,{children:["Referenda with approval ratings ranging from ",(0,o.jsx)(n.strong,{children:"0.2"})," to ",(0,o.jsx)(n.strong,{children:"0.8"})," are considered controversial."]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"Preview screenshot 2",src:s(18279).A+"",width:"2562",height:"1312"})}),"\n",(0,o.jsx)(n.h2,{id:"polkadot-opengov---referendum-voting-analysis",children:"Polkadot Opengov - Referendum Voting Analysis"}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"View On Dune:"}),"\n",(0,o.jsx)(n.a,{href:"https://dune.com/substrate/polkadot-referendum",children:"Polkadot Opengov - Referendum Voting Analysis"})]}),"\n",(0,o.jsx)(n.admonition,{type:"tip",children:(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Default parameters"})," are applied to all parameterized charts on this Wiki page as a demonstration.\nVisit our dashboard on Dune to use the ",(0,o.jsx)(n.code,{children:"referendum_id"})," parameter for more in-depth analysis. For\nmore information, please visit the\n",(0,o.jsx)(n.a,{href:"https://docs.dune.com/web-app/query-editor/parameters",children:"Dune documentation on parameters"}),"."]})}),"\n",(0,o.jsx)(n.h3,{id:"voting-power-analysis",children:"Voting Power Analysis"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.strong,{children:"Voting Power Daily Accumulation"})}),"\n",(0,o.jsx)("iframe",{src:"https://dune.com/embeds/3394377/5695923/",height:"350",width:"100%"}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.strong,{children:"Aye vs Nay"})}),"\n",(0,o.jsx)("iframe",{src:"https://dune.com/embeds/3394358/5695887/",height:"350",width:"100%"}),"\n"]}),"\n"]}),"\n",(0,o.jsx)(n.h3,{id:"vote-analysis",children:"Vote Analysis"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.strong,{children:"Aye Votes Analysis"})}),"\n",(0,o.jsx)("iframe",{src:"https://dune.com/embeds/3394729/5696475/",height:"350",width:"100%"}),"\n",(0,o.jsx)("iframe",{src:"https://dune.com/embeds/3394729/5697343/",height:"350",width:"100%"}),"\n",(0,o.jsx)("iframe",{src:"https://dune.com/embeds/3394729/5701237/",height:"350",width:"100%"}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.strong,{children:"Nay Votes Analysis"})}),"\n",(0,o.jsx)("iframe",{src:"https://dune.com/embeds/3394774/5696554/",height:"350",width:"100%"}),"\n",(0,o.jsx)("iframe",{src:"https://dune.com/embeds/3394774/5697365/",height:"350",width:"100%"}),"\n",(0,o.jsx)("iframe",{src:"https://dune.com/embeds/3394774/5701248/",height:"350",width:"100%"}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.strong,{children:"Abstain Votes Analysis"})}),"\n",(0,o.jsx)("iframe",{src:"https://dune.com/embeds/3394782/5696570/",height:"350",width:"100%"}),"\n",(0,o.jsx)("iframe",{src:"https://dune.com/embeds/3394782/5697378/",height:"350",width:"100%"}),"\n"]}),"\n"]}),"\n",(0,o.jsx)(n.h3,{id:"voter-insights",children:"Voter Insights"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.strong,{children:"First Time Voter Analysis"})}),"\n",(0,o.jsx)("iframe",{src:"https://dune.com/embeds/3395256/5697453/",height:"350",width:"100%"}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.strong,{children:"Voter Conviction Adjustment"})}),"\n",(0,o.jsx)("iframe",{src:"https://dune.com/embeds/3397420/5701499/",height:"350",width:"100%"}),"\n",(0,o.jsx)("iframe",{src:"https://dune.com/embeds/3397420/5703298/",height:"350",width:"100%"}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.strong,{children:"Awakened Voters"})}),"\n",(0,o.jsx)("iframe",{src:"https://dune.com/embeds/3399552/5705369/",height:"350",width:"100%"}),"\n",(0,o.jsx)("iframe",{src:"https://dune.com/embeds/3401113/5707996/",height:"350",width:"100%"}),"\n"]}),"\n"]})]})}function c(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(h,{...e})}):h(e)}},6570:(e,n,s)=>{s.d(n,{A:()=>o});const o=s.p+"assets/images/polkadot-opengov-referenda-home_preview_1-a2abe7464739f3b05a3a3251de232eff.jpeg"},18279:(e,n,s)=>{s.d(n,{A:()=>o});const o=s.p+"assets/images/polkadot-opengov-referenda-home_preview_2-6498a730906891774ffc4bcbca4af9cf.jpeg"},28453:(e,n,s)=>{s.d(n,{R:()=>i,x:()=>d});var o=s(96540);const r={},t=o.createContext(r);function i(e){const n=o.useContext(t);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),o.createElement(t.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/b418feb9.88b9602a.js b/assets/js/b418feb9.88b9602a.js new file mode 100644 index 000000000000..942ed64bf7ef --- /dev/null +++ b/assets/js/b418feb9.88b9602a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7242],{94910:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>a,contentTitle:()=>d,default:()=>c,frontMatter:()=>i,metadata:()=>o,toc:()=>l});const o=JSON.parse('{"id":"general/dune-analytics/polkadot-dashboards/polkadot-dashboards-governance","title":"Polkadot Dashboards: Governance","description":"A comprehensive data analysis of Polkadot governance systems, including treasury management, referendum outcomes, voting patterns, and OpenGov referenda.","source":"@site/../docs/general/dune-analytics/polkadot-dashboards/polkadot-dashboards-governance.md","sourceDirName":"general/dune-analytics/polkadot-dashboards","slug":"/general/dune-analytics/polkadot-dashboards-governance","permalink":"/docs/general/dune-analytics/polkadot-dashboards-governance","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/polkadot-dashboards/polkadot-dashboards-governance.md","tags":[],"version":"current","lastUpdatedBy":"MK","lastUpdatedAt":1719215716000,"frontMatter":{"id":"polkadot-dashboards-governance","title":"Polkadot Dashboards: Governance","sidebar_label":"Governance","description":"A comprehensive data analysis of Polkadot governance systems, including treasury management, referendum outcomes, voting patterns, and OpenGov referenda.","keywords":["polkadot","governance","dashboard","dune"],"slug":"../polkadot-dashboards-governance"},"sidebar":"docs","previous":{"title":"Overview","permalink":"/docs/general/dune-analytics/polkadot-dashboards-overview"},"next":{"title":"Staking","permalink":"/docs/general/dune-analytics/polkadot-dashboards-staking"}}');var r=s(74848),t=s(28453);const i={id:"polkadot-dashboards-governance",title:"Polkadot Dashboards: Governance",sidebar_label:"Governance",description:"A comprehensive data analysis of Polkadot governance systems, including treasury management, referendum outcomes, voting patterns, and OpenGov referenda.",keywords:["polkadot","governance","dashboard","dune"],slug:"../polkadot-dashboards-governance"},d="Polkadot Dashboards Governance",a={},l=[{value:"Overview",id:"overview",level:2},{value:"Polkadot Governance Dashboard",id:"polkadot-governance-dashboard",level:2},{value:"Polkadot Treasury Flow",id:"polkadot-treasury-flow",level:3},{value:"Number of Votes by Duration of Lock",id:"number-of-votes-by-duration-of-lock",level:3},{value:"Monthly Governance Metrics",id:"monthly-governance-metrics",level:3},{value:"Conviction Voting Power",id:"conviction-voting-power",level:3},{value:"Referenda Metrics",id:"referenda-metrics",level:3},{value:"Delegation and Voting Dynamics",id:"delegation-and-voting-dynamics",level:3},{value:"Polkadot OpenGov Referenda - Home",id:"polkadot-opengov-referenda---home",level:2},{value:"Referenda Basic Information",id:"referenda-basic-information",level:3},{value:"Controversial Referenda",id:"controversial-referenda",level:3},{value:"Polkadot Opengov - Referendum Voting Analysis",id:"polkadot-opengov---referendum-voting-analysis",level:2},{value:"Voting Power Analysis",id:"voting-power-analysis",level:3},{value:"Vote Analysis",id:"vote-analysis",level:3},{value:"Voter Insights",id:"voter-insights",level:3}];function h(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",img:"img",li:"li",p:"p",strong:"strong",ul:"ul",...(0,t.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.header,{children:(0,r.jsx)(n.h1,{id:"polkadot-dashboards-governance",children:"Polkadot Dashboards Governance"})}),"\n",(0,r.jsx)(n.h2,{id:"overview",children:"Overview"}),"\n",(0,r.jsx)(n.p,{children:"This document demonstrated various Polkadot governance dashboards, offering insights into treasury\nmanagement, referendum outcomes, voting patterns, and OpenGov referenda. These dashboards aim to\nenhance community engagement by simplifying access to governance information and fostering a\ntransparent decision-making environment."}),"\n",(0,r.jsxs)(n.p,{children:["Authored by ",(0,r.jsx)(n.a,{href:"https://x.com/colorfulnotion",children:(0,r.jsx)(n.strong,{children:"@ colorfulnotion"})})]}),"\n",(0,r.jsx)(n.h2,{id:"polkadot-governance-dashboard",children:"Polkadot Governance Dashboard"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"View On Dune:"})," ",(0,r.jsx)(n.a,{href:"https://dune.com/substrate/polkadot-gov",children:"Polkadot Governance Dashboard"})]}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.strong,{children:"Polkadot Governance Dashboard"})," provides a clear and concise representation of the\n",(0,r.jsx)(n.a,{href:"https://wiki.polkadot.network/docs/en/learn-governance",children:"network's governance"})," activities."]}),"\n",(0,r.jsx)(n.h3,{id:"polkadot-treasury-flow",children:"Polkadot Treasury Flow"}),"\n",(0,r.jsx)(n.p,{children:"Visualizes the monthly financial movements within the Polkadot treasury."}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Treasury Netflow"}),": Treasury Inflows - Treasury Outflows"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Treasury Inflows"}),": Inflation + Fees + Txn Tips + Slash"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Treasury Outflows"}),": Opengov Proposals (Spender + Tipper Track) + Bounties + Burnt"]}),"\n"]}),"\n",(0,r.jsx)("iframe",{src:"https://dune.com/embeds/3386769/5684359/",height:"350",width:"100%"}),"\n",(0,r.jsx)(n.h3,{id:"number-of-votes-by-duration-of-lock",children:"Number of Votes by Duration of Lock"}),"\n",(0,r.jsx)(n.p,{children:"Visualizes Polkadot governance voting commitments."}),"\n",(0,r.jsx)("iframe",{src:"https://dune.com/embeds/3393628/5694824/",height:"350",width:"100%"}),"\n",(0,r.jsx)(n.h3,{id:"monthly-governance-metrics",children:"Monthly Governance Metrics"}),"\n",(0,r.jsx)(n.p,{children:"These charts offer insights into monthly Polkadot governance engagement."}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Number of Monthly Voters / Monthly Capital by Type / Monthly Voting Power by Type"}),"\n",(0,r.jsx)("iframe",{src:"https://dune.com/embeds/3393704/5695078/",height:"350",width:"100%"}),"\n",(0,r.jsx)("iframe",{src:"https://dune.com/embeds/3393704/5695222/",height:"350",width:"100%"}),"\n",(0,r.jsx)("iframe",{src:"https://dune.com/embeds/3393704/5695499/",height:"350",width:"100%"}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"conviction-voting-power",children:"Conviction Voting Power"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"None (0.1x)"})," - No lock"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Locked1x"})," - 7 Days"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Locked2x"})," - 14 Days"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Locked3x"})," - 28 Days"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Locked4x"})," - 56 Days"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Locked5x"})," - 112 Days"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Locked6x"})," - 224 Days"]}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"referenda-metrics",children:"Referenda Metrics"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Number of Referenda by Outcome (OpenGov)"})}),"\n",(0,r.jsx)("iframe",{src:"https://dune.com/embeds/3352377/5619239/",height:"350",width:"100%"}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Number of Referenda by Origin"})}),"\n",(0,r.jsx)("iframe",{src:"https://dune.com/embeds/3415581/5734690/",height:"350",width:"100%"}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Monthly Tokens Voted by Direction / Monthly Voting Power by Direction"})}),"\n",(0,r.jsx)("iframe",{src:"https://dune.com/embeds/3394126/5695667/",height:"350",width:"100%"}),"\n",(0,r.jsx)("iframe",{src:"https://dune.com/embeds/3394126/5695709/",height:"350",width:"100%"}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"delegation-and-voting-dynamics",children:"Delegation and Voting Dynamics"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Recent Major Delegation Changes"})}),"\n",(0,r.jsx)("iframe",{src:"https://dune.com/embeds/3460749/5816431/",height:"350",width:"100%"}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Recent Major Swing Votes"})}),"\n",(0,r.jsx)("iframe",{src:"https://dune.com/embeds/3460920/5816752/",height:"350",width:"100%"}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Whale Voters"})}),"\n",(0,r.jsx)("iframe",{src:"https://dune.com/embeds/3461952/5818542/",height:"350",width:"100%"}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Awakened Whale Voters"})}),"\n",(0,r.jsx)("iframe",{src:"https://dune.com/embeds/3461031/5816940/",height:"350",width:"100%"}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"polkadot-opengov-referenda---home",children:"Polkadot OpenGov Referenda - Home"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"View On Dune:"}),"\n",(0,r.jsx)(n.a,{href:"https://dune.com/substrate/polkadot-opengov-active-referenda",children:"Polkadot OpenGov Referenda - Home"})]}),"\n",(0,r.jsxs)(n.p,{children:["Designed for voters to quickly understand the current trend in Polkadot OpenGov and proceed to vote\non ",(0,r.jsx)(n.a,{href:"https://polkadot.polkassembly.io/opengov",children:(0,r.jsx)(n.strong,{children:"Polkassembly"})}),"."]}),"\n",(0,r.jsx)(n.h3,{id:"referenda-basic-information",children:"Referenda Basic Information"}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.img,{alt:"Preview screenshot 1",src:s(6570).A+"",width:"2562",height:"2063"})}),"\n",(0,r.jsx)(n.h3,{id:"controversial-referenda",children:"Controversial Referenda"}),"\n",(0,r.jsxs)(n.p,{children:["Referenda with approval ratings ranging from ",(0,r.jsx)(n.strong,{children:"0.2"})," to ",(0,r.jsx)(n.strong,{children:"0.8"})," are considered controversial."]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.img,{alt:"Preview screenshot 2",src:s(18279).A+"",width:"2562",height:"1312"})}),"\n",(0,r.jsx)(n.h2,{id:"polkadot-opengov---referendum-voting-analysis",children:"Polkadot Opengov - Referendum Voting Analysis"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"View On Dune:"}),"\n",(0,r.jsx)(n.a,{href:"https://dune.com/substrate/polkadot-referendum",children:"Polkadot Opengov - Referendum Voting Analysis"})]}),"\n",(0,r.jsx)(n.admonition,{type:"tip",children:(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Default parameters"})," are applied to all parameterized charts on this Wiki page as a demonstration.\nVisit our dashboard on Dune to use the ",(0,r.jsx)(n.code,{children:"referendum_id"})," parameter for more in-depth analysis. For\nmore information, please visit the\n",(0,r.jsx)(n.a,{href:"https://docs.dune.com/web-app/query-editor/parameters",children:"Dune documentation on parameters"}),"."]})}),"\n",(0,r.jsx)(n.h3,{id:"voting-power-analysis",children:"Voting Power Analysis"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Voting Power Daily Accumulation"})}),"\n",(0,r.jsx)("iframe",{src:"https://dune.com/embeds/3394377/5695923/",height:"350",width:"100%"}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Aye vs Nay"})}),"\n",(0,r.jsx)("iframe",{src:"https://dune.com/embeds/3394358/5695887/",height:"350",width:"100%"}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"vote-analysis",children:"Vote Analysis"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Aye Votes Analysis"})}),"\n",(0,r.jsx)("iframe",{src:"https://dune.com/embeds/3394729/5696475/",height:"350",width:"100%"}),"\n",(0,r.jsx)("iframe",{src:"https://dune.com/embeds/3394729/5697343/",height:"350",width:"100%"}),"\n",(0,r.jsx)("iframe",{src:"https://dune.com/embeds/3394729/5701237/",height:"350",width:"100%"}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Nay Votes Analysis"})}),"\n",(0,r.jsx)("iframe",{src:"https://dune.com/embeds/3394774/5696554/",height:"350",width:"100%"}),"\n",(0,r.jsx)("iframe",{src:"https://dune.com/embeds/3394774/5697365/",height:"350",width:"100%"}),"\n",(0,r.jsx)("iframe",{src:"https://dune.com/embeds/3394774/5701248/",height:"350",width:"100%"}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Abstain Votes Analysis"})}),"\n",(0,r.jsx)("iframe",{src:"https://dune.com/embeds/3394782/5696570/",height:"350",width:"100%"}),"\n",(0,r.jsx)("iframe",{src:"https://dune.com/embeds/3394782/5697378/",height:"350",width:"100%"}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"voter-insights",children:"Voter Insights"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"First Time Voter Analysis"})}),"\n",(0,r.jsx)("iframe",{src:"https://dune.com/embeds/3395256/5697453/",height:"350",width:"100%"}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Voter Conviction Adjustment"})}),"\n",(0,r.jsx)("iframe",{src:"https://dune.com/embeds/3397420/5701499/",height:"350",width:"100%"}),"\n",(0,r.jsx)("iframe",{src:"https://dune.com/embeds/3397420/5703298/",height:"350",width:"100%"}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Awakened Voters"})}),"\n",(0,r.jsx)("iframe",{src:"https://dune.com/embeds/3399552/5705369/",height:"350",width:"100%"}),"\n",(0,r.jsx)("iframe",{src:"https://dune.com/embeds/3401113/5707996/",height:"350",width:"100%"}),"\n"]}),"\n"]})]})}function c(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(h,{...e})}):h(e)}},6570:(e,n,s)=>{s.d(n,{A:()=>o});const o=s.p+"assets/images/polkadot-opengov-referenda-home_preview_1-a2abe7464739f3b05a3a3251de232eff.jpeg"},18279:(e,n,s)=>{s.d(n,{A:()=>o});const o=s.p+"assets/images/polkadot-opengov-referenda-home_preview_2-6498a730906891774ffc4bcbca4af9cf.jpeg"},28453:(e,n,s)=>{s.d(n,{R:()=>i,x:()=>d});var o=s(96540);const r={},t=o.createContext(r);function i(e){const n=o.useContext(t);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),o.createElement(t.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/b48c599b.099913cd.js b/assets/js/b48c599b.099913cd.js deleted file mode 100644 index 03aebc09830e..000000000000 --- a/assets/js/b48c599b.099913cd.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9057],{66242:(e,t,o)=>{o.r(t),o.d(t,{assets:()=>u,contentTitle:()=>r,default:()=>d,frontMatter:()=>a,metadata:()=>s,toc:()=>l});var n=o(74848),i=o(28453);const a={id:"kusama-bug-bounty",title:"Bug Bounty",sidebar_label:"Bug Bounty",description:"An overview of how you can help catch bugs.",keywords:["bug","bounty","error","report"],slug:"../../kusama-bug-bounty"},r=void 0,s={id:"general/kusama/kusama-bug-bounty",title:"Bug Bounty",description:"An overview of how you can help catch bugs.",source:"@site/../docs/general/kusama/kusama-bug-bounty.md",sourceDirName:"general/kusama",slug:"/kusama-bug-bounty",permalink:"/docs/kusama-bug-bounty",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/kusama/kusama-bug-bounty.md",tags:[],version:"current",lastUpdatedBy:"Keith Alfaro",lastUpdatedAt:1663541349e3,frontMatter:{id:"kusama-bug-bounty",title:"Bug Bounty",sidebar_label:"Bug Bounty",description:"An overview of how you can help catch bugs.",keywords:["bug","bounty","error","report"],slug:"../../kusama-bug-bounty"},sidebar:"docs",previous:{title:"Code of Conduct",permalink:"/docs/kusama-coc"},next:{title:"Account Recovery",permalink:"/docs/kusama-social-recovery"}},u={},l=[{value:"Eligibility",id:"eligibility",level:2},{value:"How to report a bug",id:"how-to-report-a-bug",level:2}];function c(e){const t={a:"a",admonition:"admonition",em:"em",h2:"h2",li:"li",p:"p",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.admonition,{title:"Program Scope",type:"note",children:(0,n.jsxs)(t.p,{children:["The bug bounty program does ",(0,n.jsx)(t.em,{children:"not"})," cover bugs on code bases that are external to or, written on top\nof Kusama, or that use Kusama. To be eligible for the bug bounty program the bug has to be a part of\nthe Kusama codebase, this includes protocols that Polkadot uses such as AnV, XCM, GRANDPA, etc."]})}),"\n",(0,n.jsx)(t.p,{children:"We call on our community and all bug bounty hunters to help identify bugs in Kusama."}),"\n",(0,n.jsxs)(t.p,{children:["If you discover a bug, we appreciate your cooperation in responsibly investigating and reporting it\nas per ",(0,n.jsx)(t.a,{href:"https://web3.foundation/security-report/",children:"instructions on Web3 Foundation website"}),".\nDisclosure to any third parties disqualifies bug bounty eligibility."]}),"\n",(0,n.jsx)(t.h2,{id:"eligibility",children:"Eligibility"}),"\n",(0,n.jsx)(t.p,{children:"Generally speaking, any bug that poses a significant vulnerability, either to the soundness of\nprotocols and protocol/implementation compliance to network security, to classical client security,\nas well as security of cryptographic primitives, could be eligible for a reward. Please note that\nit's entirely our discretion to decide whether a bug is significant enough to qualify for a reward."}),"\n",(0,n.jsxs)(t.p,{children:[(0,n.jsx)(t.strong,{children:"Examples include:"})," An attack that could disrupt the entire network and harm the validity to the\nnetwork would be considered a critical threat. An attack that would disrupt service to others would\nbe regarded as a high threat."]}),"\n",(0,n.jsx)(t.p,{children:"Please note: The submission quality will be a significant factor in the level of considered\ncompensation. A high-quality submission includes explaining how the bug can be reproduced, how it\nwas discovered, and otherwise critical details. Please disclose responsibly; disclosure to any third\nparties disqualifies bug bounty eligibility."}),"\n",(0,n.jsxs)(t.p,{children:[(0,n.jsx)(t.strong,{children:"Responsible investigation and reporting"})," Responsible investigation and reporting include, but\nisn't limited to, the following:"]}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsx)(t.li,{children:"Don't violate the privacy of other users, destroy data, etc."}),"\n",(0,n.jsx)(t.li,{children:"Don't defraud or harm Kusama network or its users during your research; you should make a good\nfaith effort not to interrupt or degrade our services."}),"\n",(0,n.jsx)(t.li,{children:"Don't target the validators' physical security measures, or attempt to use social engineering,\nspam, distributed denial of service (DDoS) attacks, etc."}),"\n",(0,n.jsx)(t.li,{children:"Initially, report the bug only to us and not to anyone else."}),"\n",(0,n.jsx)(t.li,{children:"Give us a reasonable amount of time to fix the bug before disclosing it to anyone else, and give\nus adequate written warning before disclosing it to anyone else."}),"\n",(0,n.jsx)(t.li,{children:"In general, please investigate and report bugs in a way that makes a reasonable, good-faith effort\nnot to be disruptive or harmful to our users or us. Otherwise, your actions might be interpreted\nas an attack rather than an effort to be helpful."}),"\n"]}),"\n",(0,n.jsx)(t.h2,{id:"how-to-report-a-bug",children:"How to report a bug"}),"\n",(0,n.jsxs)(t.p,{children:["Please follow the instructions at\n",(0,n.jsx)(t.a,{href:"https://web3.foundation/security-report/",children:"web3.foundation/security-report/"}),"."]})]})}function d(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(c,{...e})}):c(e)}},28453:(e,t,o)=>{o.d(t,{R:()=>r,x:()=>s});var n=o(96540);const i={},a=n.createContext(i);function r(e){const t=n.useContext(a);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function s(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),n.createElement(a.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/b48c599b.87486b57.js b/assets/js/b48c599b.87486b57.js new file mode 100644 index 000000000000..430afd121a70 --- /dev/null +++ b/assets/js/b48c599b.87486b57.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9057],{90313:(e,t,o)=>{o.r(t),o.d(t,{assets:()=>u,contentTitle:()=>r,default:()=>d,frontMatter:()=>a,metadata:()=>n,toc:()=>l});const n=JSON.parse('{"id":"general/kusama/kusama-bug-bounty","title":"Bug Bounty","description":"An overview of how you can help catch bugs.","source":"@site/../docs/general/kusama/kusama-bug-bounty.md","sourceDirName":"general/kusama","slug":"/kusama-bug-bounty","permalink":"/docs/kusama-bug-bounty","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/kusama/kusama-bug-bounty.md","tags":[],"version":"current","lastUpdatedBy":"Keith Alfaro","lastUpdatedAt":1663541349000,"frontMatter":{"id":"kusama-bug-bounty","title":"Bug Bounty","sidebar_label":"Bug Bounty","description":"An overview of how you can help catch bugs.","keywords":["bug","bounty","error","report"],"slug":"../../kusama-bug-bounty"},"sidebar":"docs","previous":{"title":"Code of Conduct","permalink":"/docs/kusama-coc"},"next":{"title":"Account Recovery","permalink":"/docs/kusama-social-recovery"}}');var i=o(74848),s=o(28453);const a={id:"kusama-bug-bounty",title:"Bug Bounty",sidebar_label:"Bug Bounty",description:"An overview of how you can help catch bugs.",keywords:["bug","bounty","error","report"],slug:"../../kusama-bug-bounty"},r=void 0,u={},l=[{value:"Eligibility",id:"eligibility",level:2},{value:"How to report a bug",id:"how-to-report-a-bug",level:2}];function c(e){const t={a:"a",admonition:"admonition",em:"em",h2:"h2",li:"li",p:"p",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.admonition,{title:"Program Scope",type:"note",children:(0,i.jsxs)(t.p,{children:["The bug bounty program does ",(0,i.jsx)(t.em,{children:"not"})," cover bugs on code bases that are external to or, written on top\nof Kusama, or that use Kusama. To be eligible for the bug bounty program the bug has to be a part of\nthe Kusama codebase, this includes protocols that Polkadot uses such as AnV, XCM, GRANDPA, etc."]})}),"\n",(0,i.jsx)(t.p,{children:"We call on our community and all bug bounty hunters to help identify bugs in Kusama."}),"\n",(0,i.jsxs)(t.p,{children:["If you discover a bug, we appreciate your cooperation in responsibly investigating and reporting it\nas per ",(0,i.jsx)(t.a,{href:"https://web3.foundation/security-report/",children:"instructions on Web3 Foundation website"}),".\nDisclosure to any third parties disqualifies bug bounty eligibility."]}),"\n",(0,i.jsx)(t.h2,{id:"eligibility",children:"Eligibility"}),"\n",(0,i.jsx)(t.p,{children:"Generally speaking, any bug that poses a significant vulnerability, either to the soundness of\nprotocols and protocol/implementation compliance to network security, to classical client security,\nas well as security of cryptographic primitives, could be eligible for a reward. Please note that\nit's entirely our discretion to decide whether a bug is significant enough to qualify for a reward."}),"\n",(0,i.jsxs)(t.p,{children:[(0,i.jsx)(t.strong,{children:"Examples include:"})," An attack that could disrupt the entire network and harm the validity to the\nnetwork would be considered a critical threat. An attack that would disrupt service to others would\nbe regarded as a high threat."]}),"\n",(0,i.jsx)(t.p,{children:"Please note: The submission quality will be a significant factor in the level of considered\ncompensation. A high-quality submission includes explaining how the bug can be reproduced, how it\nwas discovered, and otherwise critical details. Please disclose responsibly; disclosure to any third\nparties disqualifies bug bounty eligibility."}),"\n",(0,i.jsxs)(t.p,{children:[(0,i.jsx)(t.strong,{children:"Responsible investigation and reporting"})," Responsible investigation and reporting include, but\nisn't limited to, the following:"]}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsx)(t.li,{children:"Don't violate the privacy of other users, destroy data, etc."}),"\n",(0,i.jsx)(t.li,{children:"Don't defraud or harm Kusama network or its users during your research; you should make a good\nfaith effort not to interrupt or degrade our services."}),"\n",(0,i.jsx)(t.li,{children:"Don't target the validators' physical security measures, or attempt to use social engineering,\nspam, distributed denial of service (DDoS) attacks, etc."}),"\n",(0,i.jsx)(t.li,{children:"Initially, report the bug only to us and not to anyone else."}),"\n",(0,i.jsx)(t.li,{children:"Give us a reasonable amount of time to fix the bug before disclosing it to anyone else, and give\nus adequate written warning before disclosing it to anyone else."}),"\n",(0,i.jsx)(t.li,{children:"In general, please investigate and report bugs in a way that makes a reasonable, good-faith effort\nnot to be disruptive or harmful to our users or us. Otherwise, your actions might be interpreted\nas an attack rather than an effort to be helpful."}),"\n"]}),"\n",(0,i.jsx)(t.h2,{id:"how-to-report-a-bug",children:"How to report a bug"}),"\n",(0,i.jsxs)(t.p,{children:["Please follow the instructions at\n",(0,i.jsx)(t.a,{href:"https://web3.foundation/security-report/",children:"web3.foundation/security-report/"}),"."]})]})}function d(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(c,{...e})}):c(e)}},28453:(e,t,o)=>{o.d(t,{R:()=>a,x:()=>r});var n=o(96540);const i={},s=n.createContext(i);function a(e){const t=n.useContext(s);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:a(e.components),n.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/b7bd3ab3.c4706704.js b/assets/js/b7bd3ab3.c4706704.js deleted file mode 100644 index 6e5358e0a2ba..000000000000 --- a/assets/js/b7bd3ab3.c4706704.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6445],{46806:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>o,contentTitle:()=>d,default:()=>h,frontMatter:()=>s,metadata:()=>i,toc:()=>c});var a=r(74848),t=r(28453);const s={id:"energywebx-dashboards",title:"EnergyWebX Dashboards",sidebar_label:"EnergyWebX",description:"EnergyWebX is a parachain focused on integrating blockchain technology within the energy sector.",keywords:["polkadot","dashboard","dune","energywebx","energy"],slug:"../energywebx-dashboards"},d="EnergyWebX Dashboards",i={id:"general/dune-analytics/parachain-dashboards/energywebx-dashboards",title:"EnergyWebX Dashboards",description:"EnergyWebX is a parachain focused on integrating blockchain technology within the energy sector.",source:"@site/../docs/general/dune-analytics/parachain-dashboards/energywebx-dashboards.md",sourceDirName:"general/dune-analytics/parachain-dashboards",slug:"/general/dune-analytics/energywebx-dashboards",permalink:"/docs/general/dune-analytics/energywebx-dashboards",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/parachain-dashboards/energywebx-dashboards.md",tags:[],version:"current",lastUpdatedBy:"MK",lastUpdatedAt:1719215716e3,frontMatter:{id:"energywebx-dashboards",title:"EnergyWebX Dashboards",sidebar_label:"EnergyWebX",description:"EnergyWebX is a parachain focused on integrating blockchain technology within the energy sector.",keywords:["polkadot","dashboard","dune","energywebx","energy"],slug:"../energywebx-dashboards"},sidebar:"docs",previous:{title:"Coretime",permalink:"/docs/general/dune-analytics/coretime-dashboards"},next:{title:"Frequency",permalink:"/docs/general/dune-analytics/frequency-dashboards"}},o={},c=[{value:"Overview",id:"overview",level:2},{value:"Featured Dashboards on Dune",id:"featured-dashboards-on-dune",level:2},{value:"Key Tables",id:"key-tables",level:2},{value:"Useful Queries",id:"useful-queries",level:2},{value:"Getting Started with Queries",id:"getting-started-with-queries",level:2}];function l(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,t.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.header,{children:(0,a.jsx)(n.h1,{id:"energywebx-dashboards",children:"EnergyWebX Dashboards"})}),"\n",(0,a.jsx)(n.h2,{id:"overview",children:"Overview"}),"\n",(0,a.jsx)(n.p,{children:"EnergyWebX is a parachain focused on integrating blockchain technology within the energy sector,\naiming to enhance energy efficiency and promote renewable energy sources across the Polkadot\necosystem."}),"\n",(0,a.jsx)(n.h2,{id:"featured-dashboards-on-dune",children:"Featured Dashboards on Dune"}),"\n",(0,a.jsx)(n.p,{children:"Here you will find a variety of dashboards that help visualize data from the EnergyWebX parachain:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.a,{href:"https://dune.com/substrate/energywebx",children:"EnergyWebX"}),": This dashboard provides a comprehensive view\nof the blockchain activities and energy transactions within the EnergyWebX network."]}),"\n"]}),"\n",(0,a.jsx)(n.h2,{id:"key-tables",children:"Key Tables"}),"\n",(0,a.jsx)(n.p,{children:"Data from the EnergyWebX parachain is organized into several key tables:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.code,{children:"energywebx.balances"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.code,{children:"energywebx.blocks"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.code,{children:"energywebx.calls"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.code,{children:"energywebx.events"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.code,{children:"energywebx.extrinsics"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.code,{children:"energywebx.transfers"})}),"\n"]}),"\n",(0,a.jsxs)(n.p,{children:["Start building your own queries using granular data on Dune\n",(0,a.jsx)(n.a,{href:"https://dune.com/queries?category=canonical&namespace=energywebx",children:"here"}),"."]}),"\n",(0,a.jsx)(n.h2,{id:"useful-queries",children:"Useful Queries"}),"\n",(0,a.jsx)(n.p,{children:"Some useful queries for EnergyWebX are provided:"}),"\n",(0,a.jsxs)(n.table,{children:[(0,a.jsx)(n.thead,{children:(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.th,{children:"Title"}),(0,a.jsx)(n.th,{children:"Query"}),(0,a.jsx)(n.th,{children:"Description"})]})}),(0,a.jsxs)(n.tbody,{children:[(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:"EnergyWebX Solutions and Groups"}),(0,a.jsx)(n.td,{children:(0,a.jsx)(n.a,{href:"https://dune.com/queries/3810095",children:"query_3810095"})}),(0,a.jsx)(n.td,{children:"Provides a list of solutions and groups created within the EnergyWebX network."})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:"EnergyWebX Operators and Worker"}),(0,a.jsx)(n.td,{children:(0,a.jsx)(n.a,{href:"https://dune.com/queries/3813780",children:"query_3813780"})}),(0,a.jsx)(n.td,{children:"Displays a list of operators and workers connected to the EnergyWebX network."})]})]})]}),"\n",(0,a.jsx)(n.h2,{id:"getting-started-with-queries",children:"Getting Started with Queries"}),"\n",(0,a.jsx)(n.p,{children:"To get started with querying data from Snowbridge, you are welcome to use the mentioned materialized\nqueries. You can use the following DuneSQL queries as examples:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-sql",metastring:'title="EnergyWebX Token Lifted & Lowered" showLineNumbers',children:"WITH\n lift AS (\n SELECT\n date_trunc('day', block_time) AS day,\n SUM(\n CAST(json_extract_scalar(data, '$[1]') AS double) / POWER(10, 18)\n ) AS amount,\n 'AVTLifted' AS method\n FROM\n energywebx.events\n WHERE\n method = 'AVTLifted'\n GROUP BY\n date_trunc('day', block_time)\n ),\n lower AS (\n SELECT\n date_trunc('day', block_time) AS day,\n SUM(\n CAST(json_extract_scalar(data, '$[2]') AS double) / POWER(10, 18)\n ) AS amount,\n 'AVTLowered' AS method\n FROM\n energywebx.events\n WHERE\n method = 'AvtLowered'\n GROUP BY\n date_trunc('day', block_time)\n )\nSELECT\n *\nFROM\n lift\nUNION ALL\nSELECT\n *\nFROM\n lower;\n\n"})}),"\n",(0,a.jsx)(n.p,{children:"Query result:"}),"\n",(0,a.jsx)("iframe",{src:"https://dune.com/embeds/3811524/6410270/65829801-abf1-4f2a-a9a3-e6afdf444bff",height:"350",width:"100%"}),"\n",(0,a.jsx)("iframe",{src:"https://dune.com/embeds/3811524/6410355/b0ebb3df-de06-43b8-a3e2-3255ca4b29b6",height:"350",width:"100%"}),"\n",(0,a.jsx)(n.admonition,{title:"DuneSQL Referece",type:"info",children:(0,a.jsxs)(n.p,{children:["For more information on DuneSQL, please refer to the ",(0,a.jsx)(n.a,{href:"/docs/general/dunesql-cheatsheet",children:"DuneSQL Cheatsheet"}),"\nand\n",(0,a.jsx)(n.a,{href:"https://docs.dune.com/query-engine/Functions-and-operators/index",children:"DuneSQL Official Documentation"}),"."]})})]})}function h(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(l,{...e})}):l(e)}},28453:(e,n,r)=>{r.d(n,{R:()=>d,x:()=>i});var a=r(96540);const t={},s=a.createContext(t);function d(e){const n=a.useContext(s);return a.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:d(e.components),a.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/b7bd3ab3.e9899117.js b/assets/js/b7bd3ab3.e9899117.js new file mode 100644 index 000000000000..516a1de66451 --- /dev/null +++ b/assets/js/b7bd3ab3.e9899117.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6445],{26705:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>o,contentTitle:()=>i,default:()=>h,frontMatter:()=>d,metadata:()=>a,toc:()=>l});const a=JSON.parse('{"id":"general/dune-analytics/parachain-dashboards/energywebx-dashboards","title":"EnergyWebX Dashboards","description":"EnergyWebX is a parachain focused on integrating blockchain technology within the energy sector.","source":"@site/../docs/general/dune-analytics/parachain-dashboards/energywebx-dashboards.md","sourceDirName":"general/dune-analytics/parachain-dashboards","slug":"/general/dune-analytics/energywebx-dashboards","permalink":"/docs/general/dune-analytics/energywebx-dashboards","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/parachain-dashboards/energywebx-dashboards.md","tags":[],"version":"current","lastUpdatedBy":"MK","lastUpdatedAt":1719215716000,"frontMatter":{"id":"energywebx-dashboards","title":"EnergyWebX Dashboards","sidebar_label":"EnergyWebX","description":"EnergyWebX is a parachain focused on integrating blockchain technology within the energy sector.","keywords":["polkadot","dashboard","dune","energywebx","energy"],"slug":"../energywebx-dashboards"},"sidebar":"docs","previous":{"title":"Coretime","permalink":"/docs/general/dune-analytics/coretime-dashboards"},"next":{"title":"Frequency","permalink":"/docs/general/dune-analytics/frequency-dashboards"}}');var s=r(74848),t=r(28453);const d={id:"energywebx-dashboards",title:"EnergyWebX Dashboards",sidebar_label:"EnergyWebX",description:"EnergyWebX is a parachain focused on integrating blockchain technology within the energy sector.",keywords:["polkadot","dashboard","dune","energywebx","energy"],slug:"../energywebx-dashboards"},i="EnergyWebX Dashboards",o={},l=[{value:"Overview",id:"overview",level:2},{value:"Featured Dashboards on Dune",id:"featured-dashboards-on-dune",level:2},{value:"Key Tables",id:"key-tables",level:2},{value:"Useful Queries",id:"useful-queries",level:2},{value:"Getting Started with Queries",id:"getting-started-with-queries",level:2}];function c(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,t.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"energywebx-dashboards",children:"EnergyWebX Dashboards"})}),"\n",(0,s.jsx)(n.h2,{id:"overview",children:"Overview"}),"\n",(0,s.jsx)(n.p,{children:"EnergyWebX is a parachain focused on integrating blockchain technology within the energy sector,\naiming to enhance energy efficiency and promote renewable energy sources across the Polkadot\necosystem."}),"\n",(0,s.jsx)(n.h2,{id:"featured-dashboards-on-dune",children:"Featured Dashboards on Dune"}),"\n",(0,s.jsx)(n.p,{children:"Here you will find a variety of dashboards that help visualize data from the EnergyWebX parachain:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"https://dune.com/substrate/energywebx",children:"EnergyWebX"}),": This dashboard provides a comprehensive view\nof the blockchain activities and energy transactions within the EnergyWebX network."]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"key-tables",children:"Key Tables"}),"\n",(0,s.jsx)(n.p,{children:"Data from the EnergyWebX parachain is organized into several key tables:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"energywebx.balances"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"energywebx.blocks"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"energywebx.calls"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"energywebx.events"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"energywebx.extrinsics"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"energywebx.transfers"})}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["Start building your own queries using granular data on Dune\n",(0,s.jsx)(n.a,{href:"https://dune.com/queries?category=canonical&namespace=energywebx",children:"here"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"useful-queries",children:"Useful Queries"}),"\n",(0,s.jsx)(n.p,{children:"Some useful queries for EnergyWebX are provided:"}),"\n",(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Title"}),(0,s.jsx)(n.th,{children:"Query"}),(0,s.jsx)(n.th,{children:"Description"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"EnergyWebX Solutions and Groups"}),(0,s.jsx)(n.td,{children:(0,s.jsx)(n.a,{href:"https://dune.com/queries/3810095",children:"query_3810095"})}),(0,s.jsx)(n.td,{children:"Provides a list of solutions and groups created within the EnergyWebX network."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"EnergyWebX Operators and Worker"}),(0,s.jsx)(n.td,{children:(0,s.jsx)(n.a,{href:"https://dune.com/queries/3813780",children:"query_3813780"})}),(0,s.jsx)(n.td,{children:"Displays a list of operators and workers connected to the EnergyWebX network."})]})]})]}),"\n",(0,s.jsx)(n.h2,{id:"getting-started-with-queries",children:"Getting Started with Queries"}),"\n",(0,s.jsx)(n.p,{children:"To get started with querying data from Snowbridge, you are welcome to use the mentioned materialized\nqueries. You can use the following DuneSQL queries as examples:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-sql",metastring:'title="EnergyWebX Token Lifted & Lowered" showLineNumbers',children:"WITH\n lift AS (\n SELECT\n date_trunc('day', block_time) AS day,\n SUM(\n CAST(json_extract_scalar(data, '$[1]') AS double) / POWER(10, 18)\n ) AS amount,\n 'AVTLifted' AS method\n FROM\n energywebx.events\n WHERE\n method = 'AVTLifted'\n GROUP BY\n date_trunc('day', block_time)\n ),\n lower AS (\n SELECT\n date_trunc('day', block_time) AS day,\n SUM(\n CAST(json_extract_scalar(data, '$[2]') AS double) / POWER(10, 18)\n ) AS amount,\n 'AVTLowered' AS method\n FROM\n energywebx.events\n WHERE\n method = 'AvtLowered'\n GROUP BY\n date_trunc('day', block_time)\n )\nSELECT\n *\nFROM\n lift\nUNION ALL\nSELECT\n *\nFROM\n lower;\n\n"})}),"\n",(0,s.jsx)(n.p,{children:"Query result:"}),"\n",(0,s.jsx)("iframe",{src:"https://dune.com/embeds/3811524/6410270/65829801-abf1-4f2a-a9a3-e6afdf444bff",height:"350",width:"100%"}),"\n",(0,s.jsx)("iframe",{src:"https://dune.com/embeds/3811524/6410355/b0ebb3df-de06-43b8-a3e2-3255ca4b29b6",height:"350",width:"100%"}),"\n",(0,s.jsx)(n.admonition,{title:"DuneSQL Referece",type:"info",children:(0,s.jsxs)(n.p,{children:["For more information on DuneSQL, please refer to the ",(0,s.jsx)(n.a,{href:"/docs/general/dunesql-cheatsheet",children:"DuneSQL Cheatsheet"}),"\nand\n",(0,s.jsx)(n.a,{href:"https://docs.dune.com/query-engine/Functions-and-operators/index",children:"DuneSQL Official Documentation"}),"."]})})]})}function h(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(c,{...e})}):c(e)}},28453:(e,n,r)=>{r.d(n,{R:()=>d,x:()=>i});var a=r(96540);const s={},t=a.createContext(s);function d(e){const n=a.useContext(t);return a.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:d(e.components),a.createElement(t.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/b835d927.04628926.js b/assets/js/b835d927.04628926.js new file mode 100644 index 000000000000..5639bf680481 --- /dev/null +++ b/assets/js/b835d927.04628926.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1397],{66600:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>r,default:()=>u,frontMatter:()=>a,metadata:()=>s,toc:()=>d});const s=JSON.parse('{"id":"general/ecosystem-funds","title":"Polkadot Ecosystem Development Funds","description":"An Overview of Trusted Polkadot Ecosystem Development Funds.","source":"@site/../docs/general/ecosystem-funds.md","sourceDirName":"general","slug":"/ecosystem-funds","permalink":"/docs/ecosystem-funds","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/ecosystem-funds.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1729153785000,"frontMatter":{"id":"ecosystem-funds","title":"Polkadot Ecosystem Development Funds","sidebar_label":"Ecosystem Funds","description":"An Overview of Trusted Polkadot Ecosystem Development Funds.","keywords":["funding","vc","venture","venture capital","fund","ecosystem fund"],"slug":"../ecosystem-funds"},"sidebar":"docs","previous":{"title":"Polkadot Community Foundation","permalink":"/docs/polkadot-community-foundation"},"next":{"title":"Programs","permalink":"/docs/programs-index"}}');var i=t(74848),o=t(28453);const a={id:"ecosystem-funds",title:"Polkadot Ecosystem Development Funds",sidebar_label:"Ecosystem Funds",description:"An Overview of Trusted Polkadot Ecosystem Development Funds.",keywords:["funding","vc","venture","venture capital","fund","ecosystem fund"],slug:"../ecosystem-funds"},r=void 0,l={},d=[{value:"Scytale Digital",id:"scytale-digital",level:2},{value:"Harbour Industrial Capital",id:"harbour-industrial-capital",level:2},{value:"Contact for Projects",id:"contact-for-projects",level:3},{value:"Legal Disclaimer",id:"legal-disclaimer",level:2}];function c(e){const n={a:"a",h2:"h2",h3:"h3",li:"li",p:"p",ul:"ul",...(0,o.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.p,{children:"The Polkadot has Ecosystem Development Funds aiming to support the development of parachains and\napplications aiming to use the Polkadot Tech Stack:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://www.scytale.digital/",children:"Scytale Digital"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://www.harbourindustrial.com/",children:"Harbour Industrial Capital"})}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"scytale-digital",children:"Scytale Digital"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.a,{href:"https://www.scytale.digital/blog-posts/scytale-polkadot-ecosystem-fund",children:"The Polkadot Ecosystem Fund"}),"\nby Scytale is going to be a venture initiative focused on strategically investing in and supporting\nprojects within the Polkadot and Kusama ecosystems. With over USD 75 million in assets under\nmanagement, Scytale has built a portfolio of over 20 projects spanning three continents. The fund\nwill provide early-stage ventures with mentorship, liquidity, and access to a network of strategic\npartners. Through its rigorous due diligence process, it selects only the most promising projects.\nThe fund\u2019s value proposition includes offering technical advisory, KPI, and OKR oversight, and\nfostering active ecosystem participation, ensuring sustainable growth for its portfolio companies."]}),"\n",(0,i.jsx)(n.h2,{id:"harbour-industrial-capital",children:"Harbour Industrial Capital"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.a,{href:"https://www.harbourindustrial.com/",children:"Harbour Industrial Capital (HIC)"})," is a Polkadot-focused VC fund\nmanaged by ",(0,i.jsx)(n.a,{href:"https://www.linkedin.com/in/maxrebol/",children:"Max Rebol"})," and\n",(0,i.jsx)(n.a,{href:"https://www.linkedin.com/in/marioaltenburger/",children:"Mario Altenburger"}),". The fund launched in early 2022,\nheld its final closing at the end of 2023, and, as of 2024, reached an AUM of ~US$10m. LPs are\nprimarily family offices and institutional investors from Asia, Europe, and the Middle East."]}),"\n",(0,i.jsx)(n.h3,{id:"contact-for-projects",children:"Contact for Projects"}),"\n",(0,i.jsxs)(n.p,{children:["Projects building on Polkadot that want to raise investment from HIC can contact\n",(0,i.jsx)(n.a,{href:"mailto:info@harbourindustrial.com",children:"info@harbourindustrial.com"}),". Please note that projects building in different ecosystems will be\noutside HIC\u2019s investment scope."]}),"\n",(0,i.jsx)(n.h2,{id:"legal-disclaimer",children:"Legal Disclaimer"}),"\n",(0,i.jsx)(n.p,{children:"The information provided herein is for informational purposes only and should not be construed as an\nendorsement, recommendation, or advice regarding any specific products, services, or investment\nfunds. Web 3.0 Technologies Foundation (\u201cW3F\u201d) does not make any representations or warranties,\neither express or implied, regarding the suitability, performance, or potential outcomes of any\nproducts referenced."}),"\n",(0,i.jsx)(n.p,{children:"Nothing contained in this communication constitutes financial, legal, or investment advice, nor does\nit take into account your specific objectives, financial situation, or needs. Decisions based on the\ninformation provided are your responsibility, and W3F strongly advises that you seek professional\nadvice from licensed financial, legal, or other relevant experts before making any decisions. W3F\ndisclaims any liability for any loss or damage that may arise from your reliance on the information\nprovided."})]})}function u(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(c,{...e})}):c(e)}},28453:(e,n,t)=>{t.d(n,{R:()=>a,x:()=>r});var s=t(96540);const i={},o=s.createContext(i);function a(e){const n=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:a(e.components),s.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/b835d927.284d68c7.js b/assets/js/b835d927.284d68c7.js deleted file mode 100644 index 651c9887bf9f..000000000000 --- a/assets/js/b835d927.284d68c7.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1397],{53119:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>a,default:()=>u,frontMatter:()=>s,metadata:()=>r,toc:()=>d});var i=t(74848),o=t(28453);const s={id:"ecosystem-funds",title:"Polkadot Ecosystem Development Funds",sidebar_label:"Ecosystem Funds",description:"An Overview of Trusted Polkadot Ecosystem Development Funds.",keywords:["funding","vc","venture","venture capital","fund","ecosystem fund"],slug:"../ecosystem-funds"},a=void 0,r={id:"general/ecosystem-funds",title:"Polkadot Ecosystem Development Funds",description:"An Overview of Trusted Polkadot Ecosystem Development Funds.",source:"@site/../docs/general/ecosystem-funds.md",sourceDirName:"general",slug:"/ecosystem-funds",permalink:"/docs/ecosystem-funds",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/ecosystem-funds.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1729153785e3,frontMatter:{id:"ecosystem-funds",title:"Polkadot Ecosystem Development Funds",sidebar_label:"Ecosystem Funds",description:"An Overview of Trusted Polkadot Ecosystem Development Funds.",keywords:["funding","vc","venture","venture capital","fund","ecosystem fund"],slug:"../ecosystem-funds"},sidebar:"docs",previous:{title:"Polkadot Community Foundation",permalink:"/docs/polkadot-community-foundation"},next:{title:"Programs",permalink:"/docs/programs-index"}},l={},d=[{value:"Scytale Digital",id:"scytale-digital",level:2},{value:"Harbour Industrial Capital",id:"harbour-industrial-capital",level:2},{value:"Contact for Projects",id:"contact-for-projects",level:3},{value:"Legal Disclaimer",id:"legal-disclaimer",level:2}];function c(e){const n={a:"a",h2:"h2",h3:"h3",li:"li",p:"p",ul:"ul",...(0,o.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.p,{children:"The Polkadot has Ecosystem Development Funds aiming to support the development of parachains and\napplications aiming to use the Polkadot Tech Stack:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://www.scytale.digital/",children:"Scytale Digital"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://www.harbourindustrial.com/",children:"Harbour Industrial Capital"})}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"scytale-digital",children:"Scytale Digital"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.a,{href:"https://www.scytale.digital/blog-posts/scytale-polkadot-ecosystem-fund",children:"The Polkadot Ecosystem Fund"}),"\nby Scytale is going to be a venture initiative focused on strategically investing in and supporting\nprojects within the Polkadot and Kusama ecosystems. With over USD 75 million in assets under\nmanagement, Scytale has built a portfolio of over 20 projects spanning three continents. The fund\nwill provide early-stage ventures with mentorship, liquidity, and access to a network of strategic\npartners. Through its rigorous due diligence process, it selects only the most promising projects.\nThe fund\u2019s value proposition includes offering technical advisory, KPI, and OKR oversight, and\nfostering active ecosystem participation, ensuring sustainable growth for its portfolio companies."]}),"\n",(0,i.jsx)(n.h2,{id:"harbour-industrial-capital",children:"Harbour Industrial Capital"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.a,{href:"https://www.harbourindustrial.com/",children:"Harbour Industrial Capital (HIC)"})," is a Polkadot-focused VC fund\nmanaged by ",(0,i.jsx)(n.a,{href:"https://www.linkedin.com/in/maxrebol/",children:"Max Rebol"})," and\n",(0,i.jsx)(n.a,{href:"https://www.linkedin.com/in/marioaltenburger/",children:"Mario Altenburger"}),". The fund launched in early 2022,\nheld its final closing at the end of 2023, and, as of 2024, reached an AUM of ~US$10m. LPs are\nprimarily family offices and institutional investors from Asia, Europe, and the Middle East."]}),"\n",(0,i.jsx)(n.h3,{id:"contact-for-projects",children:"Contact for Projects"}),"\n",(0,i.jsxs)(n.p,{children:["Projects building on Polkadot that want to raise investment from HIC can contact\n",(0,i.jsx)(n.a,{href:"mailto:info@harbourindustrial.com",children:"info@harbourindustrial.com"}),". Please note that projects building in different ecosystems will be\noutside HIC\u2019s investment scope."]}),"\n",(0,i.jsx)(n.h2,{id:"legal-disclaimer",children:"Legal Disclaimer"}),"\n",(0,i.jsx)(n.p,{children:"The information provided herein is for informational purposes only and should not be construed as an\nendorsement, recommendation, or advice regarding any specific products, services, or investment\nfunds. Web 3.0 Technologies Foundation (\u201cW3F\u201d) does not make any representations or warranties,\neither express or implied, regarding the suitability, performance, or potential outcomes of any\nproducts referenced."}),"\n",(0,i.jsx)(n.p,{children:"Nothing contained in this communication constitutes financial, legal, or investment advice, nor does\nit take into account your specific objectives, financial situation, or needs. Decisions based on the\ninformation provided are your responsibility, and W3F strongly advises that you seek professional\nadvice from licensed financial, legal, or other relevant experts before making any decisions. W3F\ndisclaims any liability for any loss or damage that may arise from your reliance on the information\nprovided."})]})}function u(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(c,{...e})}):c(e)}},28453:(e,n,t)=>{t.d(n,{R:()=>a,x:()=>r});var i=t(96540);const o={},s=i.createContext(o);function a(e){const n=i.useContext(s);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:a(e.components),i.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/b906f375.054ad4f2.js b/assets/js/b906f375.054ad4f2.js deleted file mode 100644 index 93a4bd9f59b6..000000000000 --- a/assets/js/b906f375.054ad4f2.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[159],{15102:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>r,contentTitle:()=>a,default:()=>h,frontMatter:()=>l,metadata:()=>o,toc:()=>c});var i=n(74848),s=n(28453);const l={id:"build-light-clients",title:"Using Light Clients",sidebar_label:"Using Light Clients",description:"Information about light client options.",keywords:["build","substrate","substrate connect","light client"],slug:"../build-light-clients"},a=void 0,o={id:"build/build-light-clients",title:"Using Light Clients",description:"Information about light client options.",source:"@site/../docs/build/build-light-clients.md",sourceDirName:"build",slug:"/build-light-clients",permalink:"/docs/build-light-clients",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/build/build-light-clients.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1729152709e3,frontMatter:{id:"build-light-clients",title:"Using Light Clients",sidebar_label:"Using Light Clients",description:"Information about light client options.",keywords:["build","substrate","substrate connect","light client"],slug:"../build-light-clients"},sidebar:"docs",previous:{title:"Building Client-side Apps",permalink:"/docs/build-client-side"},next:{title:"Node Interaction",permalink:"/docs/build-node-interaction"}},r={},c=[{value:"Blockchain User Interfaces are still Centralized",id:"blockchain-user-interfaces-are-still-centralized",level:2},{value:"What is Substrate Connect?",id:"what-is-substrate-connect",level:2},{value:"Replacing RPC node reliance with light clients",id:"replacing-rpc-node-reliance-with-light-clients",level:3},{value:"Substrate (full node) vs. Substrate connect (light client)",id:"substrate-full-node-vs-substrate-connect-light-client",level:3},{value:"How to use Substrate Connect",id:"how-to-use-substrate-connect",level:2},{value:"As a JavaScript library",id:"as-a-javascript-library",level:3},{value:"A node bundled with its user interface: ready-to-use light clients",id:"a-node-bundled-with-its-user-interface-ready-to-use-light-clients",level:4},{value:"As a browser extension",id:"as-a-browser-extension",level:3},{value:"Bundling light-clients of multiple chains",id:"bundling-light-clients-of-multiple-chains",level:4},{value:"Resources",id:"resources",level:2}];function d(e){const t={a:"a",admonition:"admonition",h2:"h2",h3:"h3",h4:"h4",li:"li",ol:"ol",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,s.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.h2,{id:"blockchain-user-interfaces-are-still-centralized",children:"Blockchain User Interfaces are still Centralized"}),"\n",(0,i.jsx)(t.p,{children:"The communication between a standard user interface (UI) and a network node is through a JSON RPC\nprotocol. Generally, the UI will showcase the information that is available on the node, and this is\ndone through two main approaches:"}),"\n",(0,i.jsxs)(t.ol,{children:["\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.strong,{children:"User-Controlled Nodes"}),": The UI connects to a node client that the user has installed on their\nmachine.","\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsx)(t.li,{children:"These nodes are secure, but installation and maintenance of these nodes tend to be an\ninconvenience."}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.strong,{children:"Publicly-Accessible Nodes"}),": The UI connects to a third-party-owned publicly-accessible node\nclient.","\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsx)(t.li,{children:"While these nodes are more prevalent in their usage as they are convenient to use, they are\ncentralized and insecure."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(t.p,{children:["There is now a new paradigm: instead of specifying a centralized RPC node, developers just need to\ndefine the blockchain's ",(0,i.jsx)(t.a,{href:"https://docs.substrate.io/main-docs/build/chain-spec/",children:"chain specification"}),"\nfor their application to synchronize with the chain. This is possible with Substrate connect."]}),"\n",(0,i.jsx)(t.h2,{id:"what-is-substrate-connect",children:"What is Substrate Connect?"}),"\n",(0,i.jsxs)(t.h3,{id:"replacing-rpc-node-reliance-with-light-clients",children:["Replacing ",(0,i.jsx)(t.a,{href:"/docs/build-node-interaction",children:"RPC node"})," reliance with light clients"]}),"\n",(0,i.jsxs)(t.p,{children:[(0,i.jsx)(t.a,{href:"https://substrate.io/substrate-connect/",children:"Substrate connect"})," is a JavaScript library and browser\nextension that builds on the ",(0,i.jsx)(t.a,{href:"https://polkadot.js.org/api/",children:"PolkadotJS API"})," to enable developers to\nbuild application-specific light clients for Substrate chains. There is no installation required or\noptional extension with minimal or no maintenance. The node is run by the JavaScript engine."]}),"\n",(0,i.jsx)(t.p,{children:"Simply put, Substrate connect is a Substrate client that runs in JavaScript."}),"\n",(0,i.jsx)(t.p,{children:"Application developers no longer need to rely on single RPC nodes to allow end-users to interact\nwith their applications."}),"\n",(0,i.jsx)(t.h3,{id:"substrate-full-node-vs-substrate-connect-light-client",children:"Substrate (full node) vs. Substrate connect (light client)"}),"\n",(0,i.jsx)(t.p,{children:"A light client lets you utilize all basic features of the chain such as fetching data and\ntransferring tokens, but it does not require you to run a full copy of the entire blockchain or\nhaving to trust remote peers. Light clients fetch the required data that they need from a Polkadot\nnode with an associated proof to validate the data."}),"\n",(0,i.jsxs)(t.table,{children:[(0,i.jsx)(t.thead,{children:(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.th,{children:"Substrate: Full node"}),(0,i.jsx)(t.th,{children:"Substrate connect: Light client"})]})}),(0,i.jsxs)(t.tbody,{children:[(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"full verification of all blocks of the chain"}),(0,i.jsx)(t.td,{children:"only verifies the authenticity of blocks of the chain"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"holds all of the previous block data and the chain's storage in database"}),(0,i.jsx)(t.td,{children:"no database"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"installation, maintenance, and execution tend to be exhaustive and require system administration expertise."}),(0,i.jsx)(t.td,{children:"no installation; has an optional extension with minimal or no maintenance. Initializes in five to ten seconds"})]})]})]}),"\n",(0,i.jsx)(t.h2,{id:"how-to-use-substrate-connect",children:"How to use Substrate Connect"}),"\n",(0,i.jsx)(t.h3,{id:"as-a-javascript-library",children:"As a JavaScript library"}),"\n",(0,i.jsx)(t.p,{children:"Substrate connect provides a PolkadotJS API connected to a bundled node. Through the use of the\nlibrary, a user can run an actual Substrate-compatible node."}),"\n",(0,i.jsx)(t.h4,{id:"a-node-bundled-with-its-user-interface-ready-to-use-light-clients",children:"A node bundled with its user interface: ready-to-use light clients"}),"\n",(0,i.jsxs)(t.p,{children:["The UI connects to a node client that is directly integrated: ",(0,i.jsx)(t.strong,{children:"convenient"}),", ",(0,i.jsx)(t.strong,{children:"secure"}),", and\n",(0,i.jsx)(t.strong,{children:"decentralized"}),". This is accomplished through Substrate connect using a\n",(0,i.jsx)(t.a,{href:"https://github.com/smol-dot/smoldot",children:"smoldot"})," Wasm light client to securely connect to the\nblockchain network without relying on specific third parties."]}),"\n",(0,i.jsxs)(t.p,{children:["Application developers can now run a Substrate light client in any NodeJS environment\n(",(0,i.jsx)(t.a,{href:"https://www.npmjs.com/package/@substrate/connect",children:"@substrate/connect"}),"). Currently, Substrate\nconnect supports Polkadot, Kusama, and Westend; because light clients are part of the overall\nSubstrate framework, they are available for Substrate-based blockchains."]}),"\n",(0,i.jsx)(t.h3,{id:"as-a-browser-extension",children:"As a browser extension"}),"\n",(0,i.jsx)(t.p,{children:"Establishing a sufficient number of peers is difficult due to browser limitations on WebSockets from\nHTTPS pages, as many nodes need to be available with TLS. The browser extension provided by\nSubstrate connect helps to overcome this limitation and keeps the chains synced in the background,\nallowing applications to run faster."}),"\n",(0,i.jsx)(t.h4,{id:"bundling-light-clients-of-multiple-chains",children:"Bundling light-clients of multiple chains"}),"\n",(0,i.jsxs)(t.p,{children:["The ",(0,i.jsx)(t.a,{href:"https://www.npmjs.com/package/@substrate/connect-extension-protocol",children:"browser extension"})," allows\nend-users to interact with applications connected to multiple blockchains or connect their own\nblockchains to applications that support it."]}),"\n",(0,i.jsx)(t.admonition,{type:"note",children:(0,i.jsx)(t.p,{children:"Substrate Connect will auto-detect whether a user is using the extension. If not, the Wasm light\nclient will be created in-page for them."})}),"\n",(0,i.jsx)(t.h2,{id:"resources",children:"Resources"}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsx)(t.li,{children:(0,i.jsx)(t.a,{href:"https://www.parity.io/blog/what-is-a-light-client/",children:"What is a light client and why you should care?"})}),"\n",(0,i.jsx)(t.li,{children:(0,i.jsx)(t.a,{href:"https://www.parity.io/blog/introducing-substrate-connect",children:"Introducing Substrate Connect: Browser-Based Light Clients for Connecting to Substrate Chains"})}),"\n",(0,i.jsx)(t.li,{children:(0,i.jsx)(t.a,{href:"https://github.com/paritytech/substrate-connect/tree/master/projects/extension",children:"Substrate connect GitHub Repo"})}),"\n"]})]})}function h(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}},28453:(e,t,n)=>{n.d(t,{R:()=>a,x:()=>o});var i=n(96540);const s={},l=i.createContext(s);function a(e){const t=i.useContext(l);return i.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:a(e.components),i.createElement(l.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/b906f375.65319bb3.js b/assets/js/b906f375.65319bb3.js new file mode 100644 index 000000000000..a98e45d1f7a0 --- /dev/null +++ b/assets/js/b906f375.65319bb3.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[159],{91160:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>r,contentTitle:()=>o,default:()=>h,frontMatter:()=>a,metadata:()=>i,toc:()=>c});const i=JSON.parse('{"id":"build/build-light-clients","title":"Using Light Clients","description":"Information about light client options.","source":"@site/../docs/build/build-light-clients.md","sourceDirName":"build","slug":"/build-light-clients","permalink":"/docs/build-light-clients","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/build/build-light-clients.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1729152709000,"frontMatter":{"id":"build-light-clients","title":"Using Light Clients","sidebar_label":"Using Light Clients","description":"Information about light client options.","keywords":["build","substrate","substrate connect","light client"],"slug":"../build-light-clients"},"sidebar":"docs","previous":{"title":"Building Client-side Apps","permalink":"/docs/build-client-side"},"next":{"title":"Node Interaction","permalink":"/docs/build-node-interaction"}}');var s=n(74848),l=n(28453);const a={id:"build-light-clients",title:"Using Light Clients",sidebar_label:"Using Light Clients",description:"Information about light client options.",keywords:["build","substrate","substrate connect","light client"],slug:"../build-light-clients"},o=void 0,r={},c=[{value:"Blockchain User Interfaces are still Centralized",id:"blockchain-user-interfaces-are-still-centralized",level:2},{value:"What is Substrate Connect?",id:"what-is-substrate-connect",level:2},{value:"Replacing RPC node reliance with light clients",id:"replacing-rpc-node-reliance-with-light-clients",level:3},{value:"Substrate (full node) vs. Substrate connect (light client)",id:"substrate-full-node-vs-substrate-connect-light-client",level:3},{value:"How to use Substrate Connect",id:"how-to-use-substrate-connect",level:2},{value:"As a JavaScript library",id:"as-a-javascript-library",level:3},{value:"A node bundled with its user interface: ready-to-use light clients",id:"a-node-bundled-with-its-user-interface-ready-to-use-light-clients",level:4},{value:"As a browser extension",id:"as-a-browser-extension",level:3},{value:"Bundling light-clients of multiple chains",id:"bundling-light-clients-of-multiple-chains",level:4},{value:"Resources",id:"resources",level:2}];function d(e){const t={a:"a",admonition:"admonition",h2:"h2",h3:"h3",h4:"h4",li:"li",ol:"ol",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,l.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.h2,{id:"blockchain-user-interfaces-are-still-centralized",children:"Blockchain User Interfaces are still Centralized"}),"\n",(0,s.jsx)(t.p,{children:"The communication between a standard user interface (UI) and a network node is through a JSON RPC\nprotocol. Generally, the UI will showcase the information that is available on the node, and this is\ndone through two main approaches:"}),"\n",(0,s.jsxs)(t.ol,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.strong,{children:"User-Controlled Nodes"}),": The UI connects to a node client that the user has installed on their\nmachine.","\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:"These nodes are secure, but installation and maintenance of these nodes tend to be an\ninconvenience."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.strong,{children:"Publicly-Accessible Nodes"}),": The UI connects to a third-party-owned publicly-accessible node\nclient.","\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:"While these nodes are more prevalent in their usage as they are convenient to use, they are\ncentralized and insecure."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(t.p,{children:["There is now a new paradigm: instead of specifying a centralized RPC node, developers just need to\ndefine the blockchain's ",(0,s.jsx)(t.a,{href:"https://docs.substrate.io/main-docs/build/chain-spec/",children:"chain specification"}),"\nfor their application to synchronize with the chain. This is possible with Substrate connect."]}),"\n",(0,s.jsx)(t.h2,{id:"what-is-substrate-connect",children:"What is Substrate Connect?"}),"\n",(0,s.jsxs)(t.h3,{id:"replacing-rpc-node-reliance-with-light-clients",children:["Replacing ",(0,s.jsx)(t.a,{href:"/docs/build-node-interaction",children:"RPC node"})," reliance with light clients"]}),"\n",(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.a,{href:"https://substrate.io/substrate-connect/",children:"Substrate connect"})," is a JavaScript library and browser\nextension that builds on the ",(0,s.jsx)(t.a,{href:"https://polkadot.js.org/api/",children:"PolkadotJS API"})," to enable developers to\nbuild application-specific light clients for Substrate chains. There is no installation required or\noptional extension with minimal or no maintenance. The node is run by the JavaScript engine."]}),"\n",(0,s.jsx)(t.p,{children:"Simply put, Substrate connect is a Substrate client that runs in JavaScript."}),"\n",(0,s.jsx)(t.p,{children:"Application developers no longer need to rely on single RPC nodes to allow end-users to interact\nwith their applications."}),"\n",(0,s.jsx)(t.h3,{id:"substrate-full-node-vs-substrate-connect-light-client",children:"Substrate (full node) vs. Substrate connect (light client)"}),"\n",(0,s.jsx)(t.p,{children:"A light client lets you utilize all basic features of the chain such as fetching data and\ntransferring tokens, but it does not require you to run a full copy of the entire blockchain or\nhaving to trust remote peers. Light clients fetch the required data that they need from a Polkadot\nnode with an associated proof to validate the data."}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Substrate: Full node"}),(0,s.jsx)(t.th,{children:"Substrate connect: Light client"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"full verification of all blocks of the chain"}),(0,s.jsx)(t.td,{children:"only verifies the authenticity of blocks of the chain"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"holds all of the previous block data and the chain's storage in database"}),(0,s.jsx)(t.td,{children:"no database"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"installation, maintenance, and execution tend to be exhaustive and require system administration expertise."}),(0,s.jsx)(t.td,{children:"no installation; has an optional extension with minimal or no maintenance. Initializes in five to ten seconds"})]})]})]}),"\n",(0,s.jsx)(t.h2,{id:"how-to-use-substrate-connect",children:"How to use Substrate Connect"}),"\n",(0,s.jsx)(t.h3,{id:"as-a-javascript-library",children:"As a JavaScript library"}),"\n",(0,s.jsx)(t.p,{children:"Substrate connect provides a PolkadotJS API connected to a bundled node. Through the use of the\nlibrary, a user can run an actual Substrate-compatible node."}),"\n",(0,s.jsx)(t.h4,{id:"a-node-bundled-with-its-user-interface-ready-to-use-light-clients",children:"A node bundled with its user interface: ready-to-use light clients"}),"\n",(0,s.jsxs)(t.p,{children:["The UI connects to a node client that is directly integrated: ",(0,s.jsx)(t.strong,{children:"convenient"}),", ",(0,s.jsx)(t.strong,{children:"secure"}),", and\n",(0,s.jsx)(t.strong,{children:"decentralized"}),". This is accomplished through Substrate connect using a\n",(0,s.jsx)(t.a,{href:"https://github.com/smol-dot/smoldot",children:"smoldot"})," Wasm light client to securely connect to the\nblockchain network without relying on specific third parties."]}),"\n",(0,s.jsxs)(t.p,{children:["Application developers can now run a Substrate light client in any NodeJS environment\n(",(0,s.jsx)(t.a,{href:"https://www.npmjs.com/package/@substrate/connect",children:"@substrate/connect"}),"). Currently, Substrate\nconnect supports Polkadot, Kusama, and Westend; because light clients are part of the overall\nSubstrate framework, they are available for Substrate-based blockchains."]}),"\n",(0,s.jsx)(t.h3,{id:"as-a-browser-extension",children:"As a browser extension"}),"\n",(0,s.jsx)(t.p,{children:"Establishing a sufficient number of peers is difficult due to browser limitations on WebSockets from\nHTTPS pages, as many nodes need to be available with TLS. The browser extension provided by\nSubstrate connect helps to overcome this limitation and keeps the chains synced in the background,\nallowing applications to run faster."}),"\n",(0,s.jsx)(t.h4,{id:"bundling-light-clients-of-multiple-chains",children:"Bundling light-clients of multiple chains"}),"\n",(0,s.jsxs)(t.p,{children:["The ",(0,s.jsx)(t.a,{href:"https://www.npmjs.com/package/@substrate/connect-extension-protocol",children:"browser extension"})," allows\nend-users to interact with applications connected to multiple blockchains or connect their own\nblockchains to applications that support it."]}),"\n",(0,s.jsx)(t.admonition,{type:"note",children:(0,s.jsx)(t.p,{children:"Substrate Connect will auto-detect whether a user is using the extension. If not, the Wasm light\nclient will be created in-page for them."})}),"\n",(0,s.jsx)(t.h2,{id:"resources",children:"Resources"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.a,{href:"https://www.parity.io/blog/what-is-a-light-client/",children:"What is a light client and why you should care?"})}),"\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.a,{href:"https://www.parity.io/blog/introducing-substrate-connect",children:"Introducing Substrate Connect: Browser-Based Light Clients for Connecting to Substrate Chains"})}),"\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.a,{href:"https://github.com/paritytech/substrate-connect/tree/master/projects/extension",children:"Substrate connect GitHub Repo"})}),"\n"]})]})}function h(e={}){const{wrapper:t}={...(0,l.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},28453:(e,t,n)=>{n.d(t,{R:()=>a,x:()=>o});var i=n(96540);const s={},l=i.createContext(s);function a(e){const t=i.useContext(l);return i.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:a(e.components),i.createElement(l.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/b940de31.043a7796.js b/assets/js/b940de31.043a7796.js new file mode 100644 index 000000000000..0f861c8c3536 --- /dev/null +++ b/assets/js/b940de31.043a7796.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4817],{21644:(e,s,n)=>{n.r(s),n.d(s,{assets:()=>l,contentTitle:()=>r,default:()=>d,frontMatter:()=>o,metadata:()=>t,toc:()=>c});const t=JSON.parse('{"id":"learn/learn-assets","title":"Asset Hub","description":"Fungible Tokens and NFTs on Polkadot.","source":"@site/../docs/learn/learn-assets.md","sourceDirName":"learn","slug":"/learn-assets","permalink":"/docs/learn-assets","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-assets.md","tags":[],"version":"current","lastUpdatedBy":"Radha","lastUpdatedAt":1730750958000,"frontMatter":{"id":"learn-assets","title":"Asset Hub","sidebar_label":"Asset Hub","description":"Fungible Tokens and NFTs on Polkadot.","keywords":["assets","fungible","non-fungible","asset hub","statemine","statemint"],"slug":"../learn-assets"},"sidebar":"docs","previous":{"title":"Token Inflation","permalink":"/docs/learn-inflation"},"next":{"title":"Asset Conversion","permalink":"/docs/learn-asset-conversion-assethub"}}');var a=n(74848),i=n(28453);const o={id:"learn-assets",title:"Asset Hub",sidebar_label:"Asset Hub",description:"Fungible Tokens and NFTs on Polkadot.",keywords:["assets","fungible","non-fungible","asset hub","statemine","statemint"],slug:"../learn-assets"},r=void 0,l={},c=[{value:"Sufficient Assets",id:"sufficient-assets",level:2},{value:"Asset Conversion",id:"asset-conversion",level:2},{value:"Create and Manage Assets",id:"create-and-manage-assets",level:2},{value:"Fungible Assets",id:"fungible-assets",level:2},{value:"Transferring Asset Balances",id:"transferring-asset-balances",level:3},{value:"Destroying an Asset",id:"destroying-an-asset",level:3},{value:"Application Development",id:"application-development",level:3},{value:"Cross-Chain Accounting",id:"cross-chain-accounting",level:3},{value:"Non-Fungible Assets",id:"non-fungible-assets",level:2},{value:"Transferring NFTs",id:"transferring-nfts",level:3},{value:"Advanced Techniques",id:"advanced-techniques",level:2}];function h(e){const s={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",li:"li",p:"p",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(s.p,{children:"Assets in the Polkadot ecosystem can be represented on several chains. They can take many forms,\nfrom a parachain's native token to on-chain representations of off-chain reserves. This page focuses\non the latter, namely assets issued by a creator (e.g. rights to audited, off-chain reserves held by\nthe creator, or art issued as an NFT)."}),"\n",(0,a.jsxs)(s.p,{children:["The\n",(0,a.jsx)(s.a,{href:"https://www.parity.io/blog/statemint-generic-assets-chain-proposing-a-common-good-parachain-to-polkadot-governance/",children:"Asset Hub system parachain"}),'\nhosts data structures and logic that specialize in the creation, management, and use of assets in\nthe network. Although other parachains can host applications dealing with assets on the Asset Hub,\nthe hub can be thought of as a trusted "home base" of assets in the network.']}),"\n",(0,a.jsxs)(s.p,{children:["The Asset Hub uses the relay chain's native token. The chain yields its governance to its parent\nrelay chain and has no inflation or era-based rewards for collators (although collators receive a\nportion of transaction fees). As a ",(0,a.jsx)(s.a,{href:"/docs/learn-system-chains",children:"system parachain"}),", the Asset Hub has a\ntrusted relationship with the relay chain, and as such, can teleport the relay chain's native token\nbetween itself and the relay chain. That is, the native token on the relay chain is just as good on\nAsset Hub."]}),"\n",(0,a.jsxs)(s.p,{children:["The Asset Hub does not support smart contracts. See the ",(0,a.jsx)(s.a,{href:"#advanced-techniques",children:"Advanced"})," section at\nthe bottom for a discussion on using proxy and multisig accounts to replicate oft-used contract\nlogic."]}),"\n",(0,a.jsx)(s.h2,{id:"sufficient-assets",children:"Sufficient Assets"}),"\n",(0,a.jsxs)(s.p,{children:["A sufficient asset on Asset Hub can allow for an account to exist on-chain even though it does not\nhave any account balance in the native asset. Any registered asset on the Asset Hub can be made\n",(0,a.jsx)(s.em,{children:"sufficient"})," through governance on the relay chain. A balance of a non-sufficient asset can only\nexist on accounts that are on-chain (i.e., accounts having the\n",(0,a.jsx)(s.a,{href:"/docs/learn-accounts#existential-deposit-and-reaping",children:"existential deposit"})," of a sufficient asset).\nThat is, a user could not keep an account on-chain by transferring a non-sufficient asset to it; the\naccount must already be on-chain by having more than the existential deposit in native asset (or a\nsufficient asset)."]}),"\n",(0,a.jsxs)(s.p,{children:["Assets deemed ",(0,a.jsx)(s.em,{children:"sufficient"})," can instantiate accounts on the Asset Hub and pay for transaction fees\nwithout the need for the native token (DOT or KSM). An example would be USDT on the Polkadot Asset\nHub. If an account holds 0.7 USDT, it would exist on the Polkadot Asset Hub system parachain without\nthe need to hold DOT."]}),"\n",(0,a.jsx)(s.admonition,{title:"Transfers of Non-sufficient assets",type:"warning",children:(0,a.jsx)(s.p,{children:"Before transferring a non-sufficient asset, ensure the receiver account has enough funds to cover\nthe existential deposit and transaction fees for future transfers. Please do so to ensure the asset\ntransfer is successful."})}),"\n",(0,a.jsx)(s.h2,{id:"asset-conversion",children:"Asset Conversion"}),"\n",(0,a.jsxs)(s.p,{children:[(0,a.jsx)(s.a,{href:"https://paritytech.github.io/polkadot-sdk/master/pallet_asset_conversion/index.html",children:"An asset conversion pallet"}),"\nis deployed on AssetHub with Uniswap V2-style functionality. It implements a simple AMM (automated\nmarket maker), which employs a mathematical formula to determine the price of a token based on its\nratio within the liquidity pool."]}),"\n",(0,a.jsxs)(s.p,{children:["This pallet enables fees to be paid in any asset that has corresponding liquidity (in DOT/KSM) on\nAssetHub. Learn more about asset conversion on AssetHub,\n",(0,a.jsx)(s.a,{href:"/docs/learn-asset-conversion-assethub",children:"including guides on how to use it here."})]}),"\n",(0,a.jsx)(s.h2,{id:"create-and-manage-assets",children:"Create and Manage Assets"}),"\n",(0,a.jsx)(s.admonition,{title:"Walk-through video tutorial about creating assets",type:"info",children:(0,a.jsxs)(s.p,{children:["See\n",(0,a.jsx)(s.a,{href:"https://youtu.be/knNLZEyposM?list=PLOyWqupZ-WGuAuS00rK-pebTMAOxW41W8&t=63",children:"this technical explainer video"}),"\nto learn how to create fungible assets on the Asset Hub."]})}),"\n",(0,a.jsxs)(s.p,{children:["Anyone on the network can create assets on the Asset Hub as long as they can reserve the\n",(0,a.jsx)(s.a,{href:"/docs/chain-state-values#asset-deposit",children:"required deposits"}),". The network reserves the\ndeposit on creation. The creator also must specify a unique ",(0,a.jsx)(s.code,{children:"AssetId"}),", an integer of type ",(0,a.jsx)(s.code,{children:"u32"}),", to\nidentify the asset. The ",(0,a.jsx)(s.code,{children:"AssetId"}),' should be the canonical identifier for an asset, as the chain does\nnot enforce the uniqueness of metadata like "name" and "symbol". The creator must also specify a\nminimum balance, preventing accounts from having dust balances.']}),"\n",(0,a.jsx)(s.admonition,{title:"Advanced How-to Guides",type:"info",children:(0,a.jsxs)(s.p,{children:["See ",(0,a.jsx)(s.a,{href:"/docs/learn-guides-assets-create",children:"this page"})," to learn more about creating assets using the Asset\nHub."]})}),"\n",(0,a.jsxs)(s.p,{children:["Asset classes and instances can have associated metadata. The metadata is an array of data that the\nclass owner can add on-chain, for example, a link to an IPFS hash or other off-chain hosting\nservice. The ",(0,a.jsx)(s.a,{href:"/docs/learn-nft-pallets#uniques-pallet",children:"Uniques pallet"})," also supports setting key/value\npairs as attributes to a class or instance."]}),"\n",(0,a.jsx)(s.p,{children:"An asset class has several privileged roles. The asset creator automatically takes on all privileged\nroles but can reassign them after creation. These roles are:"}),"\n",(0,a.jsxs)(s.ul,{children:["\n",(0,a.jsxs)(s.li,{children:["The ",(0,a.jsx)(s.strong,{children:"owner"})," can set the accounts responsible for the other three roles and set asset metadata\n(e.g. name, symbol, decimals)."]}),"\n",(0,a.jsxs)(s.li,{children:["The ",(0,a.jsx)(s.strong,{children:"issuer"})," can mint and burn tokens to/from their chosen addresses."]}),"\n",(0,a.jsxs)(s.li,{children:["The ",(0,a.jsx)(s.strong,{children:"admin"})," can make force transfers as well as unfreeze accounts of the asset class."]}),"\n",(0,a.jsxs)(s.li,{children:["The ",(0,a.jsx)(s.strong,{children:"freezer"})," can freeze assets on target addresses or the entire asset class."]}),"\n"]}),"\n",(0,a.jsxs)(s.p,{children:["Always refer to the ",(0,a.jsx)(s.a,{href:"https://crates.parity.io/pallet_assets/index.html",children:(0,a.jsx)(s.strong,{children:"reference documentation"})}),"\nfor certainty on privileged roles."]}),"\n",(0,a.jsxs)(s.p,{children:["An asset's details contain one field not accessible to its owner or admin team,\n",(0,a.jsx)(s.a,{href:"#sufficient-assets",children:"asset sufficiency"}),"."]}),"\n",(0,a.jsx)(s.admonition,{title:"Transaction Fees on Polkadot-JS UI",type:"info",children:(0,a.jsxs)(s.p,{children:["Polkadot-JS UI\n",(0,a.jsx)(s.a,{href:"https://github.com/polkadot-js/apps/issues/7812",children:"doesn't support the functionality to pay with a sufficient asset yet"}),".\nWhen using Polkadot-JS UI, transaction fee needs to be paid using the native asset (DOT or KSM)."]})}),"\n",(0,a.jsx)(s.h2,{id:"fungible-assets",children:"Fungible Assets"}),"\n",(0,a.jsx)(s.p,{children:"Fungible assets are interchangeable, i.e. one unit is equivalent to any other unit to claim the\nunderlying item. The Asset Hub represents fungible assets in the Assets pallet. This pallet presents\na similar interface for those familiar with the ERC20 standard. However, the logic is encoded\ndirectly in the chain's runtime. As such, operations are not gas-metered but benchmarked upon every\nrelease, leading to efficient execution and stable transaction fees."}),"\n",(0,a.jsx)(s.h3,{id:"transferring-asset-balances",children:"Transferring Asset Balances"}),"\n",(0,a.jsxs)(s.admonition,{title:"Walk-through video tutorial about transferring assets",type:"info",children:[(0,a.jsxs)(s.p,{children:["See\n",(0,a.jsx)(s.a,{href:"https://youtu.be/knNLZEyposM?list=PLOyWqupZ-WGuAuS00rK-pebTMAOxW41W8&t=326",children:"this technical explainer video"}),"\nto learn how to transfer assets on the Asset Hub."]}),(0,a.jsxs)(s.p,{children:["For Ledger users see ",(0,a.jsx)(s.a,{href:"https://youtu.be/j0O-KziV9iw",children:"this video tutorial"})," to learn how to use the\nStatemine Ledger app and what its current limitations are."]})]}),"\n",(0,a.jsxs)(s.p,{children:["Users have a simple interface, namely the ability to transfer asset balances to other accounts\non-chain. As mentioned before, if the asset is not ",(0,a.jsx)(s.em,{children:"sufficient"}),", then the destination account must\nalready exist for the transfer to succeed."]}),"\n",(0,a.jsxs)(s.p,{children:["The chain also contains a ",(0,a.jsx)(s.code,{children:"transfer_keep_alive"})," function, similar to that of the Balances pallet,\nthat will fail if execution kills the sending account."]}),"\n",(0,a.jsx)(s.p,{children:"The Asset Hub also sweeps dust balances into transfers. For example, if an asset has a minimum\nbalance of 10 and an account has a balance of 25, then an attempt to transfer 20 units would\ntransfer all 25."}),"\n",(0,a.jsx)(s.admonition,{type:"info",children:(0,a.jsxs)(s.p,{children:["See\n",(0,a.jsx)(s.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181118-how-to-transfer-tether-usdt-on-statemine",children:"this support article"}),"\nto learn more about transferring assets using the Asset Hub."]})}),"\n",(0,a.jsx)(s.h3,{id:"destroying-an-asset",children:"Destroying an Asset"}),"\n",(0,a.jsx)(s.admonition,{title:"Walk-through video tutorial about destroying assets",type:"info",children:(0,a.jsxs)(s.p,{children:["See\n",(0,a.jsx)(s.a,{href:"https://youtu.be/knNLZEyposM?list=PLOyWqupZ-WGuAuS00rK-pebTMAOxW41W8&t=422",children:"this technical explainer video"}),"\nto learn how to destroy assets on the Asset Hub."]})}),"\n",(0,a.jsxs)(s.p,{children:["To destroy an asset, go to the Polkadot-JS UI on the Asset Hub > Developer > Extrinsics. If you\ncreated an asset without minting any unit, you could call ",(0,a.jsx)(s.code,{children:"assets.startDestroy"})," and then the\n",(0,a.jsx)(s.code,{children:"assets.finishDestroy"})," extrinsics specifying the asset id you want to destroy. If you created an\nasset and minted some units, follow the steps below:"]}),"\n",(0,a.jsxs)(s.ul,{children:["\n",(0,a.jsxs)(s.li,{children:[(0,a.jsx)(s.code,{children:"assets.freezeAsset"})," will freeze all assets on all accounts holding that asset id. Those accounts\nwill no longer be able to transfer that asset."]}),"\n",(0,a.jsxs)(s.li,{children:[(0,a.jsx)(s.code,{children:"assets.startDestroy"})," will start the destroying process."]}),"\n",(0,a.jsxs)(s.li,{children:[(0,a.jsx)(s.code,{children:"assets.destroyApprovals"})," will destroy all approvals related to that asset id (if there are any\napprovals)."]}),"\n",(0,a.jsxs)(s.li,{children:[(0,a.jsx)(s.code,{children:"assets.destroyAccounts"})," will destroy all accounts related to that asset id. All asset units will\nbe removed from those accounts."]}),"\n",(0,a.jsxs)(s.li,{children:[(0,a.jsx)(s.code,{children:"assets.finishDestroy"})," will finish the destroying process. The asset id will be removed and\navailable for another fungible token."]}),"\n"]}),"\n",(0,a.jsx)(s.h3,{id:"application-development",children:"Application Development"}),"\n",(0,a.jsxs)(s.p,{children:["The Asset Hub provides an ",(0,a.jsx)(s.code,{children:"approve_transfer"}),", ",(0,a.jsx)(s.code,{children:"transfer_approved"}),", and ",(0,a.jsx)(s.code,{children:"cancel_approval"})," interface.\nApplication developers can use this interface so that users can authorize the application to\neffectuate transfers up to a given amount on behalf of an account."]}),"\n",(0,a.jsx)(s.h3,{id:"cross-chain-accounting",children:"Cross-Chain Accounting"}),"\n",(0,a.jsx)(s.p,{children:"The Asset Hub uses a reserve-backed system to manage asset transfers to other parachains. It tracks\nhow much of each asset has gone to each parachain and will not accept more from a particular\nparachain."}),"\n",(0,a.jsx)(s.p,{children:"As a result of this, asset owners can use the Asset Hub to track information like the total issuance\nof their asset in the entire network, as parachain balances would be included in the reserve-backed\ntable. Likewise, for the minting and burning of tokens, an asset's team can perform all operations\non the Asset Hub and propagate any minted tokens to other parachains in the network."}),"\n",(0,a.jsxs)(s.p,{children:['Parachains that want to send assets to other parachains should do so via instructions to the Asset\nHub so that the reserve-backed table stays up to date. For more info, see the "Moving Assets between\nChains in XCM" section of the\n',(0,a.jsx)(s.a,{href:"https://polkadot.network/blog/xcm-the-cross-consensus-message-format/",children:"article on the XCM format"}),"."]}),"\n",(0,a.jsx)(s.h2,{id:"non-fungible-assets",children:"Non-Fungible Assets"}),"\n",(0,a.jsxs)(s.p,{children:["Unlike fungible assets, the particular instance of a ",(0,a.jsx)(s.a,{href:"/docs/learn-nft",children:"non-fungible asset (NFT)"})," has\na separate meaning from another instance of the same class. The Asset Hub represents NFTs in the\n",(0,a.jsx)(s.a,{href:"/docs/learn-nft-pallets",children:"Uniques and NFTs pallets"}),"."]}),"\n",(0,a.jsx)(s.p,{children:"Similar to the Assets pallet, this functionality is encoded into the chain. Operations are\nbenchmarked before each release instead of any runtime metering, ensuring efficient execution and\nstable transaction fees."}),"\n",(0,a.jsx)(s.h3,{id:"transferring-nfts",children:"Transferring NFTs"}),"\n",(0,a.jsxs)(s.p,{children:["Users can transfer their NFTs to other accounts. The chain also provides an ",(0,a.jsx)(s.code,{children:"approve_transfer"}),",\n",(0,a.jsx)(s.code,{children:"transfer_approved"})," and ",(0,a.jsx)(s.code,{children:"cancel_approval"})," interfaces that application developers can use to allow\nusers to authorize an application to transfer an instance on their behalf."]}),"\n",(0,a.jsx)(s.h2,{id:"advanced-techniques",children:"Advanced Techniques"}),"\n",(0,a.jsxs)(s.p,{children:["Many asset creators on other networks use smart contracts to control privileged functions like\nminting and burning. Although the Asset Hub does not have a smart contract interface, it contains\nthe ",(0,a.jsx)(s.a,{href:"https://crates.parity.io/pallet_multisig/index.html",children:"Multisig"}),",\n",(0,a.jsx)(s.a,{href:"https://crates.parity.io/pallet_proxy/index.html",children:"Proxy"}),", and\n",(0,a.jsx)(s.a,{href:"https://crates.parity.io/pallet_utility/index.html",children:"Utility"})," pallets, which will meet most account\nmanagement needs."]}),"\n",(0,a.jsxs)(s.p,{children:["For example, if a team wants sign-off from two groups to perform a privileged operation, it could\ncreate a 2-of-2 ",(0,a.jsx)(s.a,{href:"/docs/learn-account-multisig",children:(0,a.jsx)(s.strong,{children:"multisig"})})," from two\n",(0,a.jsx)(s.a,{href:"/docs/learn-proxies-pure#anonymous-proxy-pure-proxy",children:(0,a.jsx)(s.strong,{children:"pure proxies"})}),", and then set members from\neach group as proxies to those two accounts."]})]})}function d(e={}){const{wrapper:s}={...(0,i.R)(),...e.components};return s?(0,a.jsx)(s,{...e,children:(0,a.jsx)(h,{...e})}):h(e)}},28453:(e,s,n)=>{n.d(s,{R:()=>o,x:()=>r});var t=n(96540);const a={},i=t.createContext(a);function o(e){const s=t.useContext(i);return t.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function r(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:o(e.components),t.createElement(i.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/b940de31.04f83dc2.js b/assets/js/b940de31.04f83dc2.js deleted file mode 100644 index eaa31faaa006..000000000000 --- a/assets/js/b940de31.04f83dc2.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4817],{6598:(e,s,n)=>{n.r(s),n.d(s,{assets:()=>l,contentTitle:()=>o,default:()=>d,frontMatter:()=>i,metadata:()=>r,toc:()=>c});var t=n(74848),a=n(28453);const i={id:"learn-assets",title:"Asset Hub",sidebar_label:"Asset Hub",description:"Fungible Tokens and NFTs on Polkadot.",keywords:["assets","fungible","non-fungible","asset hub","statemine","statemint"],slug:"../learn-assets"},o=void 0,r={id:"learn/learn-assets",title:"Asset Hub",description:"Fungible Tokens and NFTs on Polkadot.",source:"@site/../docs/learn/learn-assets.md",sourceDirName:"learn",slug:"/learn-assets",permalink:"/docs/learn-assets",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-assets.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1727943421e3,frontMatter:{id:"learn-assets",title:"Asset Hub",sidebar_label:"Asset Hub",description:"Fungible Tokens and NFTs on Polkadot.",keywords:["assets","fungible","non-fungible","asset hub","statemine","statemint"],slug:"../learn-assets"},sidebar:"docs",previous:{title:"Token Inflation",permalink:"/docs/learn-inflation"},next:{title:"Asset Conversion",permalink:"/docs/learn-asset-conversion-assethub"}},l={},c=[{value:"Sufficient Assets",id:"sufficient-assets",level:2},{value:"Asset Conversion",id:"asset-conversion",level:2},{value:"Creation and Management",id:"creation-and-management",level:2},{value:"Fungible Assets",id:"fungible-assets",level:2},{value:"Transferring Asset Balances",id:"transferring-asset-balances",level:3},{value:"Destroying an Asset",id:"destroying-an-asset",level:3},{value:"Application Development",id:"application-development",level:3},{value:"Cross-Chain Accounting",id:"cross-chain-accounting",level:3},{value:"Non-Fungible Assets",id:"non-fungible-assets",level:2},{value:"Transferring NFTs",id:"transferring-nfts",level:3},{value:"Advanced Techniques",id:"advanced-techniques",level:2}];function h(e){const s={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",li:"li",p:"p",strong:"strong",ul:"ul",...(0,a.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.p,{children:"Assets in the Polkadot ecosystem can be represented on several chains. They can take many forms,\nfrom a parachain's native token to on-chain representations of off-chain reserves. This page focuses\non the latter, namely assets issued by a creator (e.g. rights to audited, off-chain reserves held by\nthe creator, or art issued as an NFT)."}),"\n",(0,t.jsxs)(s.p,{children:["The\n",(0,t.jsx)(s.a,{href:"https://www.parity.io/blog/statemint-generic-assets-chain-proposing-a-common-good-parachain-to-polkadot-governance/",children:"Asset Hub system parachain"}),'\nhosts data structures and logic that specialize in the creation, management, and use of assets in\nthe network. Although other parachains can host applications dealing with assets on the Asset Hub,\nthe hub can be thought of as a trusted "home base" of assets in the network.']}),"\n",(0,t.jsxs)(s.p,{children:["The Asset Hub uses the relay chain's native token. The chain yields its governance to its parent\nrelay chain and has no inflation or era-based rewards for collators (although collators receive a\nportion of transaction fees). As a ",(0,t.jsx)(s.a,{href:"/docs/learn-system-chains",children:"system parachain"}),", the Asset Hub has a\ntrusted relationship with the relay chain, and as such, can teleport the relay chain's native token\nbetween itself and the relay chain. That is, the native token on the relay chain is just as good on\nAsset Hub."]}),"\n",(0,t.jsxs)(s.p,{children:["The Asset Hub does not support smart contracts. See the ",(0,t.jsx)(s.a,{href:"#advanced-techniques",children:"Advanced"})," section at\nthe bottom for a discussion on using proxy and multisig accounts to replicate oft-used contract\nlogic."]}),"\n",(0,t.jsx)(s.h2,{id:"sufficient-assets",children:"Sufficient Assets"}),"\n",(0,t.jsxs)(s.p,{children:["A sufficient asset on Asset Hub can allow for an account to exist on-chain even though it does not\nhave any account balance in the native asset. Any registered asset on the Asset Hub can be made\n",(0,t.jsx)(s.em,{children:"sufficient"})," through governance on the relay chain. A balance of a non-sufficient asset can only\nexist on accounts that are on-chain (i.e., accounts having the\n",(0,t.jsx)(s.a,{href:"/docs/learn-accounts#existential-deposit-and-reaping",children:"existential deposit"})," of a sufficient asset).\nThat is, a user could not keep an account on-chain by transferring a non-sufficient asset to it; the\naccount must already be on-chain by having more than the existential deposit in native asset (or a\nsufficient asset)."]}),"\n",(0,t.jsxs)(s.p,{children:["Assets deemed ",(0,t.jsx)(s.em,{children:"sufficient"})," can instantiate accounts on the Asset Hub and pay for transaction fees\nwithout the need for the native token (DOT or KSM). An example would be USDT on the Polkadot Asset\nHub. If an account holds 0.7 USDT, it would exist on the Polkadot Asset Hub system parachain without\nthe need to hold DOT."]}),"\n",(0,t.jsx)(s.admonition,{title:"Transfers of Non-sufficient assets",type:"warning",children:(0,t.jsx)(s.p,{children:"Before transferring a non-sufficient asset, ensure the receiver account has enough funds to cover\nthe existential deposit and transaction fees for future transfers. Please do so to ensure the asset\ntransfer is successful."})}),"\n",(0,t.jsx)(s.h2,{id:"asset-conversion",children:"Asset Conversion"}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.a,{href:"https://paritytech.github.io/polkadot-sdk/master/pallet_asset_conversion/index.html",children:"An asset conversion pallet"}),"\nis deployed on AssetHub with Uniswap V2-style functionality. It implements a simple AMM (automated\nmarket maker), which employs a mathematical formula to determine the price of a token based on its\nratio within the liquidity pool."]}),"\n",(0,t.jsxs)(s.p,{children:["This pallet enables fees to be paid in any asset that has corresponding liquidity (in DOT/KSM) on\nAssetHub. Learn more about asset conversion on AssetHub,\n",(0,t.jsx)(s.a,{href:"/docs/learn-asset-conversion-assethub",children:"including guides on how to use it here."})]}),"\n",(0,t.jsx)(s.h2,{id:"creation-and-management",children:"Creation and Management"}),"\n",(0,t.jsx)(s.admonition,{title:"Walk-through video tutorial about creating assets",type:"info",children:(0,t.jsxs)(s.p,{children:["See\n",(0,t.jsx)(s.a,{href:"https://youtu.be/knNLZEyposM?list=PLOyWqupZ-WGuAuS00rK-pebTMAOxW41W8&t=63",children:"this technical explainer video"}),"\nto learn how to create fungible assets on the Asset Hub."]})}),"\n",(0,t.jsxs)(s.p,{children:["Anyone on the network can create assets on the Asset Hub as long as they can reserve the\n",(0,t.jsx)(s.a,{href:"/docs/chain-state-values#asset-deposit",children:"required deposits"}),". The network reserves the\ndeposit on creation. The creator also must specify a unique ",(0,t.jsx)(s.code,{children:"AssetId"}),", an integer of type ",(0,t.jsx)(s.code,{children:"u32"}),", to\nidentify the asset. The ",(0,t.jsx)(s.code,{children:"AssetId"}),' should be the canonical identifier for an asset, as the chain does\nnot enforce the uniqueness of metadata like "name" and "symbol". The creator must also specify a\nminimum balance, preventing accounts from having dust balances.']}),"\n",(0,t.jsx)(s.admonition,{title:"Advanced How-to Guides",type:"info",children:(0,t.jsxs)(s.p,{children:["See ",(0,t.jsx)(s.a,{href:"/docs/learn-guides-assets-create",children:"this page"})," to learn more about creating assets using the Asset\nHub."]})}),"\n",(0,t.jsxs)(s.p,{children:["Asset classes and instances can have associated metadata. The metadata is an array of data that the\nclass owner can add on-chain, for example, a link to an IPFS hash or other off-chain hosting\nservice. The ",(0,t.jsx)(s.a,{href:"/docs/learn-nft-pallets#uniques-pallet",children:"Uniques pallet"})," also supports setting key/value\npairs as attributes to a class or instance."]}),"\n",(0,t.jsx)(s.p,{children:"An asset class has several privileged roles. The asset creator automatically takes on all privileged\nroles but can reassign them after creation. These roles are:"}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:["The ",(0,t.jsx)(s.strong,{children:"owner"})," can set the accounts responsible for the other three roles and set asset metadata\n(e.g. name, symbol, decimals)."]}),"\n",(0,t.jsxs)(s.li,{children:["The ",(0,t.jsx)(s.strong,{children:"issuer"})," can mint and burn tokens to/from their chosen addresses."]}),"\n",(0,t.jsxs)(s.li,{children:["The ",(0,t.jsx)(s.strong,{children:"admin"})," can make force transfers as well as unfreeze accounts of the asset class."]}),"\n",(0,t.jsxs)(s.li,{children:["The ",(0,t.jsx)(s.strong,{children:"freezer"})," can freeze assets on target addresses or the entire asset class."]}),"\n"]}),"\n",(0,t.jsxs)(s.p,{children:["Always refer to the ",(0,t.jsx)(s.a,{href:"https://crates.parity.io/pallet_assets/index.html",children:(0,t.jsx)(s.strong,{children:"reference documentation"})}),"\nfor certainty on privileged roles."]}),"\n",(0,t.jsxs)(s.p,{children:["An asset's details contain one field not accessible to its owner or admin team,\n",(0,t.jsx)(s.a,{href:"#sufficient-assets",children:"asset sufficiency"}),"."]}),"\n",(0,t.jsx)(s.admonition,{title:"Transaction Fees on Polkadot-JS UI",type:"info",children:(0,t.jsxs)(s.p,{children:["Polkadot-JS UI\n",(0,t.jsx)(s.a,{href:"https://github.com/polkadot-js/apps/issues/7812",children:"doesn't support the functionality to pay with a sufficient asset yet"}),".\nWhen using Polkadot-JS UI, transaction fee needs to be paid using the native asset (DOT or KSM)."]})}),"\n",(0,t.jsx)(s.h2,{id:"fungible-assets",children:"Fungible Assets"}),"\n",(0,t.jsx)(s.p,{children:"Fungible assets are interchangeable, i.e. one unit is equivalent to any other unit to claim the\nunderlying item. The Asset Hub represents fungible assets in the Assets pallet. This pallet presents\na similar interface for those familiar with the ERC20 standard. However, the logic is encoded\ndirectly in the chain's runtime. As such, operations are not gas-metered but benchmarked upon every\nrelease, leading to efficient execution and stable transaction fees."}),"\n",(0,t.jsx)(s.h3,{id:"transferring-asset-balances",children:"Transferring Asset Balances"}),"\n",(0,t.jsxs)(s.admonition,{title:"Walk-through video tutorial about transferring assets",type:"info",children:[(0,t.jsxs)(s.p,{children:["See\n",(0,t.jsx)(s.a,{href:"https://youtu.be/knNLZEyposM?list=PLOyWqupZ-WGuAuS00rK-pebTMAOxW41W8&t=326",children:"this technical explainer video"}),"\nto learn how to transfer assets on the Asset Hub."]}),(0,t.jsxs)(s.p,{children:["For Ledger users see ",(0,t.jsx)(s.a,{href:"https://youtu.be/j0O-KziV9iw",children:"this video tutorial"})," to learn how to use the\nStatemine Ledger app and what its current limitations are."]})]}),"\n",(0,t.jsxs)(s.p,{children:["Users have a simple interface, namely the ability to transfer asset balances to other accounts\non-chain. As mentioned before, if the asset is not ",(0,t.jsx)(s.em,{children:"sufficient"}),", then the destination account must\nalready exist for the transfer to succeed."]}),"\n",(0,t.jsxs)(s.p,{children:["The chain also contains a ",(0,t.jsx)(s.code,{children:"transfer_keep_alive"})," function, similar to that of the Balances pallet,\nthat will fail if execution kills the sending account."]}),"\n",(0,t.jsx)(s.p,{children:"The Asset Hub also sweeps dust balances into transfers. For example, if an asset has a minimum\nbalance of 10 and an account has a balance of 25, then an attempt to transfer 20 units would\ntransfer all 25."}),"\n",(0,t.jsx)(s.admonition,{type:"info",children:(0,t.jsxs)(s.p,{children:["See\n",(0,t.jsx)(s.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181118-how-to-transfer-tether-usdt-on-statemine",children:"this support article"}),"\nto learn more about transferring assets using the Asset Hub."]})}),"\n",(0,t.jsx)(s.h3,{id:"destroying-an-asset",children:"Destroying an Asset"}),"\n",(0,t.jsx)(s.admonition,{title:"Walk-through video tutorial about destroying assets",type:"info",children:(0,t.jsxs)(s.p,{children:["See\n",(0,t.jsx)(s.a,{href:"https://youtu.be/knNLZEyposM?list=PLOyWqupZ-WGuAuS00rK-pebTMAOxW41W8&t=422",children:"this technical explainer video"}),"\nto learn how to destroy assets on the Asset Hub."]})}),"\n",(0,t.jsxs)(s.p,{children:["To destroy an asset, go to the Polkadot-JS UI on the Asset Hub > Developer > Extrinsics. If you\ncreated an asset without minting any unit, you could call ",(0,t.jsx)(s.code,{children:"assets.startDestroy"})," and then the\n",(0,t.jsx)(s.code,{children:"assets.finishDestroy"})," extrinsics specifying the asset id you want to destroy. If you created an\nasset and minted some units, follow the steps below:"]}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.code,{children:"assets.freezeAsset"})," will freeze all assets on all accounts holding that asset id. Those accounts\nwill no longer be able to transfer that asset."]}),"\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.code,{children:"assets.startDestroy"})," will start the destroying process."]}),"\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.code,{children:"assets.destroyApprovals"})," will destroy all approvals related to that asset id (if there are any\napprovals)."]}),"\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.code,{children:"assets.destroyAccounts"})," will destroy all accounts related to that asset id. All asset units will\nbe removed from those accounts."]}),"\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.code,{children:"assets.finishDestroy"})," will finish the destroying process. The asset id will be removed and\navailable for another fungible token."]}),"\n"]}),"\n",(0,t.jsx)(s.h3,{id:"application-development",children:"Application Development"}),"\n",(0,t.jsxs)(s.p,{children:["The Asset Hub provides an ",(0,t.jsx)(s.code,{children:"approve_transfer"}),", ",(0,t.jsx)(s.code,{children:"transfer_approved"}),", and ",(0,t.jsx)(s.code,{children:"cancel_approval"})," interface.\nApplication developers can use this interface so that users can authorize the application to\neffectuate transfers up to a given amount on behalf of an account."]}),"\n",(0,t.jsx)(s.h3,{id:"cross-chain-accounting",children:"Cross-Chain Accounting"}),"\n",(0,t.jsx)(s.p,{children:"The Asset Hub uses a reserve-backed system to manage asset transfers to other parachains. It tracks\nhow much of each asset has gone to each parachain and will not accept more from a particular\nparachain."}),"\n",(0,t.jsx)(s.p,{children:"As a result of this, asset owners can use the Asset Hub to track information like the total issuance\nof their asset in the entire network, as parachain balances would be included in the reserve-backed\ntable. Likewise, for the minting and burning of tokens, an asset's team can perform all operations\non the Asset Hub and propagate any minted tokens to other parachains in the network."}),"\n",(0,t.jsxs)(s.p,{children:['Parachains that want to send assets to other parachains should do so via instructions to the Asset\nHub so that the reserve-backed table stays up to date. For more info, see the "Moving Assets between\nChains in XCM" section of the\n',(0,t.jsx)(s.a,{href:"https://polkadot.network/blog/xcm-the-cross-consensus-message-format/",children:"article on the XCM format"}),"."]}),"\n",(0,t.jsx)(s.h2,{id:"non-fungible-assets",children:"Non-Fungible Assets"}),"\n",(0,t.jsxs)(s.p,{children:["Unlike fungible assets, the particular instance of a ",(0,t.jsx)(s.a,{href:"/docs/learn-nft",children:"non-fungible asset (NFT)"})," has\na separate meaning from another instance of the same class. The Asset Hub represents NFTs in the\n",(0,t.jsx)(s.a,{href:"/docs/learn-nft-pallets",children:"Uniques and NFTs pallets"}),"."]}),"\n",(0,t.jsx)(s.p,{children:"Similar to the Assets pallet, this functionality is encoded into the chain. Operations are\nbenchmarked before each release instead of any runtime metering, ensuring efficient execution and\nstable transaction fees."}),"\n",(0,t.jsx)(s.h3,{id:"transferring-nfts",children:"Transferring NFTs"}),"\n",(0,t.jsxs)(s.p,{children:["Users can transfer their NFTs to other accounts. The chain also provides an ",(0,t.jsx)(s.code,{children:"approve_transfer"}),",\n",(0,t.jsx)(s.code,{children:"transfer_approved"})," and ",(0,t.jsx)(s.code,{children:"cancel_approval"})," interfaces that application developers can use to allow\nusers to authorize an application to transfer an instance on their behalf."]}),"\n",(0,t.jsx)(s.h2,{id:"advanced-techniques",children:"Advanced Techniques"}),"\n",(0,t.jsxs)(s.p,{children:["Many asset creators on other networks use smart contracts to control privileged functions like\nminting and burning. Although the Asset Hub does not have a smart contract interface, it contains\nthe ",(0,t.jsx)(s.a,{href:"https://crates.parity.io/pallet_multisig/index.html",children:"Multisig"}),",\n",(0,t.jsx)(s.a,{href:"https://crates.parity.io/pallet_proxy/index.html",children:"Proxy"}),", and\n",(0,t.jsx)(s.a,{href:"https://crates.parity.io/pallet_utility/index.html",children:"Utility"})," pallets, which will meet most account\nmanagement needs."]}),"\n",(0,t.jsxs)(s.p,{children:["For example, if a team wants sign-off from two groups to perform a privileged operation, it could\ncreate a 2-of-2 ",(0,t.jsx)(s.a,{href:"/docs/learn-account-multisig",children:(0,t.jsx)(s.strong,{children:"multisig"})})," from two\n",(0,t.jsx)(s.a,{href:"/docs/learn-proxies-pure#anonymous-proxy-pure-proxy",children:(0,t.jsx)(s.strong,{children:"pure proxies"})}),", and then set members from\neach group as proxies to those two accounts."]})]})}function d(e={}){const{wrapper:s}={...(0,a.R)(),...e.components};return s?(0,t.jsx)(s,{...e,children:(0,t.jsx)(h,{...e})}):h(e)}},28453:(e,s,n)=>{n.d(s,{R:()=>o,x:()=>r});var t=n(96540);const a={},i=t.createContext(a);function o(e){const s=t.useContext(i);return t.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function r(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:o(e.components),t.createElement(i.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/b9b4ec9e.9b41ea67.js b/assets/js/b9b4ec9e.9b41ea67.js deleted file mode 100644 index 404f86c4e4ed..000000000000 --- a/assets/js/b9b4ec9e.9b41ea67.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3316],{2197:(e,s,n)=>{n.r(s),n.d(s,{assets:()=>l,contentTitle:()=>o,default:()=>h,frontMatter:()=>a,metadata:()=>i,toc:()=>c});var r=n(74848),t=n(28453);const a={id:"learn-xcm-docs-reference-glossary",title:"XCM Glossary",sidebar_label:"XCM Glossary",description:"XCM Glossary.",keywords:["xcm","cross-consensus messaging","reference","glossary"],slug:"../reference-glossary"},o="Glossary",i={id:"learn/xcm/reference/learn-xcm-docs-reference-glossary",title:"XCM Glossary",description:"XCM Glossary.",source:"@site/../docs/learn/xcm/reference/glossary.md",sourceDirName:"learn/xcm/reference",slug:"/learn/xcm/reference-glossary",permalink:"/docs/learn/xcm/reference-glossary",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/xcm/reference/glossary.md",tags:[],version:"current",lastUpdatedBy:"Radha",lastUpdatedAt:1721404843e3,frontMatter:{id:"learn-xcm-docs-reference-glossary",title:"XCM Glossary",sidebar_label:"XCM Glossary",description:"XCM Glossary.",keywords:["xcm","cross-consensus messaging","reference","glossary"],slug:"../reference-glossary"},sidebar:"docs",previous:{title:"All XCVM Registers",permalink:"/docs/learn/xcm/reference-xcvm-registers"},next:{title:"Polkadot Comparisons",permalink:"/docs/learn-comparisons-index"}},l={},c=[{value:"XCM (Cross-Consensus Messaging)",id:"xcm-cross-consensus-messaging",level:2},{value:"Instructions",id:"instructions",level:2},{value:"Consensus system",id:"consensus-system",level:2},{value:"MultiLocation",id:"multilocation",level:2},{value:"Junction",id:"junction",level:2},{value:"MultiAsset",id:"multiasset",level:2},{value:"Sovereign account",id:"sovereign-account",level:2},{value:"Teleport",id:"teleport",level:2},{value:"Reserve asset transfer",id:"reserve-asset-transfer",level:2},{value:"XCVM",id:"xcvm",level:2},{value:"Holding register",id:"holding-register",level:2},{value:"Barrier",id:"barrier",level:2},{value:"UMP (Upward Message Passing)",id:"ump-upward-message-passing",level:2},{value:"DMP (Downward Message Passing)",id:"dmp-downward-message-passing",level:2},{value:"XCMP (Cross-Consensus Message Passing)",id:"xcmp-cross-consensus-message-passing",level:2},{value:"HRMP (Horizontal Message Passing)",id:"hrmp-horizontal-message-passing",level:2}];function d(e){const s={code:"code",h1:"h1",h2:"h2",header:"header",p:"p",...(0,t.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.header,{children:(0,r.jsx)(s.h1,{id:"glossary",children:"Glossary"})}),"\n",(0,r.jsx)(s.h2,{id:"xcm-cross-consensus-messaging",children:"XCM (Cross-Consensus Messaging)"}),"\n",(0,r.jsx)(s.p,{children:"A messaging format meant to communicate intentions between consensus systems. XCM could also refer\nto a single message."}),"\n",(0,r.jsx)(s.h2,{id:"instructions",children:"Instructions"}),"\n",(0,r.jsx)(s.p,{children:"XCMs are composed of a sequence of instructions. Each instruction aims to convey a particular\nintention. There are instructions for transferring and locking assets, handling fees, calling\narbitrary blobs, and more."}),"\n",(0,r.jsx)(s.h2,{id:"consensus-system",children:"Consensus system"}),"\n",(0,r.jsx)(s.p,{children:"A system that can reach any kind of consensus. For example, relay chains, parachains, smart\ncontracts."}),"\n",(0,r.jsx)(s.h2,{id:"multilocation",children:"MultiLocation"}),"\n",(0,r.jsx)(s.p,{children:"A way of addressing consensus systems. These could be relative or absolute."}),"\n",(0,r.jsx)(s.h2,{id:"junction",children:"Junction"}),"\n",(0,r.jsxs)(s.p,{children:["The different ways of descending down a ",(0,r.jsx)(s.code,{children:"MultiLocation"})," hierarchy. A junction can be a Parachain, an\nAccount, or more."]}),"\n",(0,r.jsx)(s.h2,{id:"multiasset",children:"MultiAsset"}),"\n",(0,r.jsxs)(s.p,{children:["A way of identifying assets in the same or another consensus system, by using a ",(0,r.jsx)(s.code,{children:"MultiLocation"}),"."]}),"\n",(0,r.jsx)(s.h2,{id:"sovereign-account",children:"Sovereign account"}),"\n",(0,r.jsx)(s.p,{children:"An account on a consensus system that is controlled by an account in another consensus system."}),"\n",(0,r.jsx)(s.h2,{id:"teleport",children:"Teleport"}),"\n",(0,r.jsx)(s.p,{children:"A way of transferring assets between two consensus systems without the need of a third party. It\nconsists of the sender system burning the asset that wants to be sent over and the recipient minting\nan equivalent amount of that asset. It requires a lot of trust between the two systems, since\nfailure to mint or burn will reduce the total issuance of the token."}),"\n",(0,r.jsx)(s.h2,{id:"reserve-asset-transfer",children:"Reserve asset transfer"}),"\n",(0,r.jsx)(s.p,{children:"A way of transferring assets between two consensus systems that don't trust each other, by using a\nthird system they both trust, called the reserve. The real asset only exists on the reserve, both\nsender and recipient only deal with derivatives. It consists of the sender burning a certain amount\nof derivatives, telling the reserve to move real assets from its sovereign account to the\ndestination's sovereign account, and then telling the recipient to mint the right amount of\nderivatives."}),"\n",(0,r.jsx)(s.h2,{id:"xcvm",children:"XCVM"}),"\n",(0,r.jsx)(s.p,{children:"The virtual machine behind XCM. Every XCM is an XCVM programme. Holds state in registers."}),"\n",(0,r.jsx)(s.h2,{id:"holding-register",children:"Holding register"}),"\n",(0,r.jsxs)(s.p,{children:["An XCVM register used to hold arbitrary ",(0,r.jsx)(s.code,{children:"Asset"}),"s during the execution of an XCVM programme."]}),"\n",(0,r.jsx)(s.h2,{id:"barrier",children:"Barrier"}),"\n",(0,r.jsx)(s.p,{children:"An XCM executor configuration item that works as a firewall for incoming XCMs. All XCMs have to pass\nthe barrier to be executed, else they are dropped. It can be used for whitelisting only certain\ntypes or messages or messages from certain senders."}),"\n",(0,r.jsx)(s.h2,{id:"ump-upward-message-passing",children:"UMP (Upward Message Passing)"}),"\n",(0,r.jsx)(s.p,{children:"Transport-layer protocol that allows parachains to send messages upwards to their relay chain."}),"\n",(0,r.jsx)(s.h2,{id:"dmp-downward-message-passing",children:"DMP (Downward Message Passing)"}),"\n",(0,r.jsx)(s.p,{children:"Transport-layer protocol that allows the relay chain to send messages downwards to one of their\nparachains."}),"\n",(0,r.jsx)(s.h2,{id:"xcmp-cross-consensus-message-passing",children:"XCMP (Cross-Consensus Message Passing)"}),"\n",(0,r.jsx)(s.p,{children:"Transport-layer protocol that allows parachains to send messages between themselves, without going\nthrough the relay chain."}),"\n",(0,r.jsx)(s.h2,{id:"hrmp-horizontal-message-passing",children:"HRMP (Horizontal Message Passing)"}),"\n",(0,r.jsx)(s.p,{children:"Transport-layer protocol that allows a parachain to send messages to a sibling parachain going\nthrough the relay chain. It's a precursor to XCMP, also known as XCMP-lite. It uses a mixture of UMP\nand VMP."})]})}function h(e={}){const{wrapper:s}={...(0,t.R)(),...e.components};return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(d,{...e})}):d(e)}},28453:(e,s,n)=>{n.d(s,{R:()=>o,x:()=>i});var r=n(96540);const t={},a=r.createContext(t);function o(e){const s=r.useContext(a);return r.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function i(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:o(e.components),r.createElement(a.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/b9b4ec9e.c2bfdb39.js b/assets/js/b9b4ec9e.c2bfdb39.js new file mode 100644 index 000000000000..ba5c0ddec379 --- /dev/null +++ b/assets/js/b9b4ec9e.c2bfdb39.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3316],{8255:(e,s,n)=>{n.r(s),n.d(s,{assets:()=>l,contentTitle:()=>i,default:()=>h,frontMatter:()=>o,metadata:()=>r,toc:()=>c});const r=JSON.parse('{"id":"learn/xcm/reference/learn-xcm-docs-reference-glossary","title":"XCM Glossary","description":"XCM Glossary.","source":"@site/../docs/learn/xcm/reference/glossary.md","sourceDirName":"learn/xcm/reference","slug":"/learn/xcm/reference-glossary","permalink":"/docs/learn/xcm/reference-glossary","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/xcm/reference/glossary.md","tags":[],"version":"current","lastUpdatedBy":"Radha","lastUpdatedAt":1721404843000,"frontMatter":{"id":"learn-xcm-docs-reference-glossary","title":"XCM Glossary","sidebar_label":"XCM Glossary","description":"XCM Glossary.","keywords":["xcm","cross-consensus messaging","reference","glossary"],"slug":"../reference-glossary"},"sidebar":"docs","previous":{"title":"All XCVM Registers","permalink":"/docs/learn/xcm/reference-xcvm-registers"},"next":{"title":"Polkadot Comparisons","permalink":"/docs/learn-comparisons-index"}}');var t=n(74848),a=n(28453);const o={id:"learn-xcm-docs-reference-glossary",title:"XCM Glossary",sidebar_label:"XCM Glossary",description:"XCM Glossary.",keywords:["xcm","cross-consensus messaging","reference","glossary"],slug:"../reference-glossary"},i="Glossary",l={},c=[{value:"XCM (Cross-Consensus Messaging)",id:"xcm-cross-consensus-messaging",level:2},{value:"Instructions",id:"instructions",level:2},{value:"Consensus system",id:"consensus-system",level:2},{value:"MultiLocation",id:"multilocation",level:2},{value:"Junction",id:"junction",level:2},{value:"MultiAsset",id:"multiasset",level:2},{value:"Sovereign account",id:"sovereign-account",level:2},{value:"Teleport",id:"teleport",level:2},{value:"Reserve asset transfer",id:"reserve-asset-transfer",level:2},{value:"XCVM",id:"xcvm",level:2},{value:"Holding register",id:"holding-register",level:2},{value:"Barrier",id:"barrier",level:2},{value:"UMP (Upward Message Passing)",id:"ump-upward-message-passing",level:2},{value:"DMP (Downward Message Passing)",id:"dmp-downward-message-passing",level:2},{value:"XCMP (Cross-Consensus Message Passing)",id:"xcmp-cross-consensus-message-passing",level:2},{value:"HRMP (Horizontal Message Passing)",id:"hrmp-horizontal-message-passing",level:2}];function d(e){const s={code:"code",h1:"h1",h2:"h2",header:"header",p:"p",...(0,a.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.header,{children:(0,t.jsx)(s.h1,{id:"glossary",children:"Glossary"})}),"\n",(0,t.jsx)(s.h2,{id:"xcm-cross-consensus-messaging",children:"XCM (Cross-Consensus Messaging)"}),"\n",(0,t.jsx)(s.p,{children:"A messaging format meant to communicate intentions between consensus systems. XCM could also refer\nto a single message."}),"\n",(0,t.jsx)(s.h2,{id:"instructions",children:"Instructions"}),"\n",(0,t.jsx)(s.p,{children:"XCMs are composed of a sequence of instructions. Each instruction aims to convey a particular\nintention. There are instructions for transferring and locking assets, handling fees, calling\narbitrary blobs, and more."}),"\n",(0,t.jsx)(s.h2,{id:"consensus-system",children:"Consensus system"}),"\n",(0,t.jsx)(s.p,{children:"A system that can reach any kind of consensus. For example, relay chains, parachains, smart\ncontracts."}),"\n",(0,t.jsx)(s.h2,{id:"multilocation",children:"MultiLocation"}),"\n",(0,t.jsx)(s.p,{children:"A way of addressing consensus systems. These could be relative or absolute."}),"\n",(0,t.jsx)(s.h2,{id:"junction",children:"Junction"}),"\n",(0,t.jsxs)(s.p,{children:["The different ways of descending down a ",(0,t.jsx)(s.code,{children:"MultiLocation"})," hierarchy. A junction can be a Parachain, an\nAccount, or more."]}),"\n",(0,t.jsx)(s.h2,{id:"multiasset",children:"MultiAsset"}),"\n",(0,t.jsxs)(s.p,{children:["A way of identifying assets in the same or another consensus system, by using a ",(0,t.jsx)(s.code,{children:"MultiLocation"}),"."]}),"\n",(0,t.jsx)(s.h2,{id:"sovereign-account",children:"Sovereign account"}),"\n",(0,t.jsx)(s.p,{children:"An account on a consensus system that is controlled by an account in another consensus system."}),"\n",(0,t.jsx)(s.h2,{id:"teleport",children:"Teleport"}),"\n",(0,t.jsx)(s.p,{children:"A way of transferring assets between two consensus systems without the need of a third party. It\nconsists of the sender system burning the asset that wants to be sent over and the recipient minting\nan equivalent amount of that asset. It requires a lot of trust between the two systems, since\nfailure to mint or burn will reduce the total issuance of the token."}),"\n",(0,t.jsx)(s.h2,{id:"reserve-asset-transfer",children:"Reserve asset transfer"}),"\n",(0,t.jsx)(s.p,{children:"A way of transferring assets between two consensus systems that don't trust each other, by using a\nthird system they both trust, called the reserve. The real asset only exists on the reserve, both\nsender and recipient only deal with derivatives. It consists of the sender burning a certain amount\nof derivatives, telling the reserve to move real assets from its sovereign account to the\ndestination's sovereign account, and then telling the recipient to mint the right amount of\nderivatives."}),"\n",(0,t.jsx)(s.h2,{id:"xcvm",children:"XCVM"}),"\n",(0,t.jsx)(s.p,{children:"The virtual machine behind XCM. Every XCM is an XCVM programme. Holds state in registers."}),"\n",(0,t.jsx)(s.h2,{id:"holding-register",children:"Holding register"}),"\n",(0,t.jsxs)(s.p,{children:["An XCVM register used to hold arbitrary ",(0,t.jsx)(s.code,{children:"Asset"}),"s during the execution of an XCVM programme."]}),"\n",(0,t.jsx)(s.h2,{id:"barrier",children:"Barrier"}),"\n",(0,t.jsx)(s.p,{children:"An XCM executor configuration item that works as a firewall for incoming XCMs. All XCMs have to pass\nthe barrier to be executed, else they are dropped. It can be used for whitelisting only certain\ntypes or messages or messages from certain senders."}),"\n",(0,t.jsx)(s.h2,{id:"ump-upward-message-passing",children:"UMP (Upward Message Passing)"}),"\n",(0,t.jsx)(s.p,{children:"Transport-layer protocol that allows parachains to send messages upwards to their relay chain."}),"\n",(0,t.jsx)(s.h2,{id:"dmp-downward-message-passing",children:"DMP (Downward Message Passing)"}),"\n",(0,t.jsx)(s.p,{children:"Transport-layer protocol that allows the relay chain to send messages downwards to one of their\nparachains."}),"\n",(0,t.jsx)(s.h2,{id:"xcmp-cross-consensus-message-passing",children:"XCMP (Cross-Consensus Message Passing)"}),"\n",(0,t.jsx)(s.p,{children:"Transport-layer protocol that allows parachains to send messages between themselves, without going\nthrough the relay chain."}),"\n",(0,t.jsx)(s.h2,{id:"hrmp-horizontal-message-passing",children:"HRMP (Horizontal Message Passing)"}),"\n",(0,t.jsx)(s.p,{children:"Transport-layer protocol that allows a parachain to send messages to a sibling parachain going\nthrough the relay chain. It's a precursor to XCMP, also known as XCMP-lite. It uses a mixture of UMP\nand VMP."})]})}function h(e={}){const{wrapper:s}={...(0,a.R)(),...e.components};return s?(0,t.jsx)(s,{...e,children:(0,t.jsx)(d,{...e})}):d(e)}},28453:(e,s,n)=>{n.d(s,{R:()=>o,x:()=>i});var r=n(96540);const t={},a=r.createContext(t);function o(e){const s=r.useContext(a);return r.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function i(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:o(e.components),r.createElement(a.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/bb8b1738.7e3b33ba.js b/assets/js/bb8b1738.7e3b33ba.js new file mode 100644 index 000000000000..2c08377dbaed --- /dev/null +++ b/assets/js/bb8b1738.7e3b33ba.js @@ -0,0 +1 @@ +(self.webpackChunk=self.webpackChunk||[]).push([[2916],{77348:(a,e,t)=>{"use strict";t.r(e),t.d(e,{assets:()=>l,contentTitle:()=>s,default:()=>h,frontMatter:()=>r,metadata:()=>n,toc:()=>d});const n=JSON.parse('{"id":"learn/learn-validator","title":"Validator","description":"Role of Validators within the Polkadot Ecosystem.","source":"@site/../docs/learn/learn-validator.md","sourceDirName":"learn","slug":"/learn-validator","permalink":"/docs/learn-validator","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-validator.md","tags":[],"version":"current","lastUpdatedBy":"batman","lastUpdatedAt":1730356998000,"frontMatter":{"id":"learn-validator","title":"Validator","sidebar_label":"Validator","description":"Role of Validators within the Polkadot Ecosystem.","keywords":["validate","validator","maintain","NPoS","stake"],"slug":"../learn-validator"},"sidebar":"docs","previous":{"title":"Nominator","permalink":"/docs/learn-nominator"},"next":{"title":"Offenses & Slashes","permalink":"/docs/learn-offenses"}}');var o=t(74848),i=t(28453);t(47379);const r={id:"learn-validator",title:"Validator",sidebar_label:"Validator",description:"Role of Validators within the Polkadot Ecosystem.",keywords:["validate","validator","maintain","NPoS","stake"],slug:"../learn-validator"},s=void 0,l={},d=[{value:"Para-validators",id:"para-validators",level:2},{value:"Block Authors",id:"block-authors",level:2},{value:"Other Validators",id:"other-validators",level:2},{value:"Further Readings",id:"further-readings",level:2},{value:"Guides",id:"guides",level:3},{value:"Other References",id:"other-references",level:3},{value:"Security / Key Management",id:"security--key-management",level:3},{value:"Monitoring Tools",id:"monitoring-tools",level:3},{value:"Validator Stats",id:"validator-stats",level:3}];function c(a){const e={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",li:"li",p:"p",strong:"strong",ul:"ul",...(0,i.R)(),...a.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(e.admonition,{type:"info",children:(0,o.jsxs)(e.p,{children:["This page provides a general overview of the role of validators in the Polkadot network. For more\ndetailed information you can read the ",(0,o.jsx)(e.a,{href:"/docs/learn-parachains-protocol",children:"Parachain Protocol Overview"}),"."]})}),"\n",(0,o.jsxs)(e.p,{children:["Validators secure the ",(0,o.jsx)(e.a,{href:"/docs/learn-architecture#relay-chain",children:"relay chain"})," by staking native tokens,\nvalidating proofs from collators and participating in consensus with other validators."]}),"\n",(0,o.jsx)(e.p,{children:"Validators play a crucial role in adding new blocks to the relay chain and, by extension, to all\nparachains. This allows parties to complete cross-chain transactions via the relay chain. They\nguarantee that each parachain follows its unique rules and can pass messages between shards in a\ntrust-free environment."}),"\n",(0,o.jsx)(e.h2,{id:"para-validators",children:"Para-validators"}),"\n",(0,o.jsxs)(e.p,{children:["Parachain validators (i.e. para-validators) participate to the\n",(0,o.jsx)(e.a,{href:"./learn-parachains-protocol.md/#parachain-phase",children:"Parachain Phase of the AnV Protocol"}),", and submit\n",(0,o.jsx)(e.a,{href:"./learn-parachains-protocol.md/#candidate-receipts",children:"candidate receipts"})," to the relay chain\ntransaction queue so that a block author can include information on the parablock in a fork of of\nthe relay chain."]}),"\n",(0,o.jsxs)(e.p,{children:["Para-validators work in groups and are selected by the runtime in every epoch to validate parachain\nblocks for all parachains connected to the relay chain. The selected para-validators are part of the\n",(0,o.jsx)(e.a,{href:"/docs/chain-state-values#active-validator-count",children:"active validators"})," randomly selected (per\nepoch) to participate in the validation, creating a validator pool of 200 para-validators."]}),"\n",(0,o.jsxs)(e.p,{children:["Para-validators verify that the information contained in an assigned set of parachain blocks is\nvalid. They receive parachain block candidates from the ",(0,o.jsx)(e.a,{href:"/docs/learn-collator",children:"collators"})," together\nwith a Proof-of-Validity (PoV). The para-validators perform the first round of validity checks on\nthe block candidates. Candidates that gather enough signed validity statements are considered\n",(0,o.jsx)(e.em,{children:"backable"}),"."]}),"\n",(0,o.jsx)(e.h2,{id:"block-authors",children:"Block Authors"}),"\n",(0,o.jsxs)(e.p,{children:["There are validators on the relay chain who participate in the consensus mechanism to produce the\nrelay chain blocks based on validity statements from other validators. These validators are called\nblock authors, they are selected by ",(0,o.jsx)(e.a,{href:"./learn-consensus.md/#block-production-babe",children:"BABE"})," and can note\nup to one backable candidate for each parachain to include in the relay chain. A backable candidate\nincluded in the relay chain is considered ",(0,o.jsx)(e.em,{children:"backed"})," in that fork of the chain."]}),"\n",(0,o.jsxs)(e.p,{children:["In a relay chain block, block authors will only include\n",(0,o.jsx)(e.a,{href:"./learn-parachains-protocol.md/#candidate-receipts",children:"candidate receipts"})," that have a parent\ncandidate receipt in an earlier relay chain block. This ensures the parachain follows a valid chain.\nAlso, the block authors will only include a receipt for which they have an erasure coding chunk,\nensuring that the system can perform the next round of availability and validity checks."]}),"\n",(0,o.jsx)(e.h2,{id:"other-validators",children:"Other Validators"}),"\n",(0,o.jsxs)(e.p,{children:["Validators also contribute to the so-called ",(0,o.jsx)(e.strong,{children:"availability distribution"}),". In fact, once the\ncandidate is backed in a fork of the relay chain, it is still ",(0,o.jsx)(e.em,{children:"pending availability"}),", i.e. it is not\nfully included (only tentative included) as part of the parachain until it is proven available\n(together with the PoV). Information regarding the availability of the candidate will be noted in\nthe following relay chain blocks. Only when there is enough information, the candidate is considered\na full parachain block or ",(0,o.jsx)(e.em,{children:"parablock"}),"."]}),"\n",(0,o.jsxs)(e.p,{children:["Validators also participate in the so-called\n",(0,o.jsx)(e.a,{href:"./learn-parachains-protocol.md/#approval-process",children:(0,o.jsx)(e.strong,{children:"approval process"})}),". Once the parablock is\nconsidered available and part of the parachain, it is still ",(0,o.jsx)(e.em,{children:"pending approval"}),". Because\npara-validators are a small subset of all validators, there is a risk that by chance the majority of\npara-validators assigned to a parachain might be dishonest. It is thus necessary to run a secondary\nverification of the parablock before it can be considered approved. Having a secondary verification\nstep avoids the allocation of more para-validators that will ultimately reduce the throughput of the\nsystem."]}),"\n",(0,o.jsxs)(e.p,{children:["Any instances of non-compliance with the consensus algorithms result in\n",(0,o.jsx)(e.a,{href:"./learn-parachains-protocol.md/#disputes",children:(0,o.jsx)(e.strong,{children:"disputes"})})," with the punishment of the validators on\nthe wrong side by removing some or all their staked tokens, thereby discouraging bad actors. Good\nperformance, however, will be rewarded, with validators receiving block rewards (including\ntransaction fees) in the form of native tokens (DOT or KSM on Kusama) in exchange for their\nactivities."]}),"\n",(0,o.jsxs)(e.p,{children:["Finally, validators participate in the\n",(0,o.jsx)(e.a,{href:"./learn-parachains-protocol.md/#chain-selection",children:"chain selection process within GRANDPA"}),", ensuring\nthat only available and valid blocks end within the finalized relay chain."]}),"\n",(0,o.jsx)(e.admonition,{title:"Within an era roles can change",type:"info",children:(0,o.jsx)(e.p,{children:"Within the same era, a Validator can be a para-validator, block author, and participate in the\navailability distribution or the approval process. Those roles can change between sessions."})}),"\n",(0,o.jsx)(e.h2,{id:"further-readings",children:"Further Readings"}),"\n",(0,o.jsx)(e.h3,{id:"guides",children:"Guides"}),"\n",(0,o.jsxs)(e.ul,{children:["\n",(0,o.jsxs)(e.li,{children:[(0,o.jsx)(e.a,{href:"/docs/maintain-guides-how-to-validate-polkadot",children:"How to Validate on Polkadot"})," - Guide on\nhow to set up a validator on the Polkadot live network."]}),"\n",(0,o.jsxs)(e.li,{children:[(0,o.jsx)(e.a,{href:"/docs/maintain-guides-validator-payout",children:"Validator Payout Overview"})," - A short overview on\nhow the validator payout mechanism works."]}),"\n",(0,o.jsxs)(e.li,{children:[(0,o.jsx)(e.a,{href:"/docs/maintain-guides-how-to-systemd",children:"How to run your validator as a systemd process"})," -\nGuide on running your validator as a ",(0,o.jsx)(e.code,{children:"systemd"})," process so that it will run in the background and\nstart automatically on reboots."]}),"\n",(0,o.jsxs)(e.li,{children:[(0,o.jsx)(e.a,{href:"/docs/maintain-guides-how-to-upgrade",children:"How to Upgrade your Validator"})," - Guide for\nsecurely upgrading your validator when you want to switch to a different machine or begin running\nthe latest version of client code."]}),"\n",(0,o.jsxs)(e.li,{children:[(0,o.jsx)(e.a,{href:"/docs/maintain-guides-how-to-validate-polkadot",children:"How to Use Validator Setup"})," - Guide on\nhow to use Polkadot / Kusama validator setup."]}),"\n"]}),"\n",(0,o.jsx)(e.h3,{id:"other-references",children:"Other References"}),"\n",(0,o.jsxs)(e.ul,{children:["\n",(0,o.jsx)(e.li,{children:(0,o.jsx)(e.a,{href:"https://medium.com/@acvlls/setting-up-a-maintain-the-easy-way-3a885283091f",children:"How to run a Polkadot node (Docker)"})}),"\n",(0,o.jsxs)(e.li,{children:[(0,o.jsx)(e.a,{href:"https://medium.com/hackernoon/a-serverless-failover-solution-for-web-3-0-validator-nodes-e26b9d24c71d",children:"A Serverless Failover Solution for Web3.0 Validator Nodes"})," -\nBlog that details how to create a robust failover solution for running validators."]}),"\n",(0,o.jsx)(e.li,{children:(0,o.jsx)(e.a,{href:"/docs/maintain-guides-how-to-validate-kusama##vps-list",children:"VPS list"})}),"\n",(0,o.jsxs)(e.li,{children:[(0,o.jsx)(e.a,{href:"https://matrix.to/#/!NZrbtteFeqYKCUGQtr:matrix.parity.io?via=matrix.parity.io&via=matrix.org&via=web3.foundation",children:"Polkadot Validator Lounge"})," -\nA place to chat about being a validator."]}),"\n",(0,o.jsxs)(e.li,{children:[(0,o.jsx)(e.a,{href:"/docs/learn-offenses",children:"Slashing Consequences"})," - Learn more about slashing consequences for running\na validator node."]}),"\n",(0,o.jsx)(e.li,{children:(0,o.jsx)(e.a,{href:"https://www.youtube.com/watch?v=0EmP0s6JOW4&list=PLOyWqupZ-WGuAuS00rK-pebTMAOxW41W8&index=2",children:"Why You Should be A Validator on Polkadot and Kusama"})}),"\n",(0,o.jsx)(e.li,{children:(0,o.jsx)(e.a,{href:"https://www.youtube.com/watch?v=riVg_Up_fCg&list=PLOyWqupZ-WGuAuS00rK-pebTMAOxW41W8&index=15",children:"Roles and Responsibilities of a Validator"})}),"\n",(0,o.jsxs)(e.li,{children:[(0,o.jsx)(e.a,{href:"https://www.crowdcast.io/e/validating-on-polkadot",children:"Validating on Polkadot"})," - An explanation of\nhow to validate on Polkadot, with Joe Petrowski and David Dorgan of Parity Technologies, along\nwith Tim Ogilvie from Staked."]}),"\n"]}),"\n",(0,o.jsx)(e.h3,{id:"security--key-management",children:"Security / Key Management"}),"\n",(0,o.jsxs)(e.ul,{children:["\n",(0,o.jsx)(e.li,{children:(0,o.jsx)(e.a,{href:"https://github.com/w3f/validator-security",children:"Validator Security Overview"})}),"\n"]}),"\n",(0,o.jsx)(e.h3,{id:"monitoring-tools",children:"Monitoring Tools"}),"\n",(0,o.jsxs)(e.ul,{children:["\n",(0,o.jsxs)(e.li,{children:[(0,o.jsx)(e.a,{href:"https://github.com/SimplyVC/panic_polkadot",children:"PANIC for Polkadot"})," - A monitoring and alerting\nsolution for Polkadot / Kusama node"]}),"\n",(0,o.jsxs)(e.li,{children:[(0,o.jsx)(e.a,{href:"https://telemetry.polkadot.io/#list/Kusama%20CC3",children:"Polkadot Telemetry Service"})," - Network\ninformation, including what nodes are running on a given chain, what software versions they are\nrunning, and sync status."]}),"\n"]}),"\n",(0,o.jsx)(e.h3,{id:"validator-stats",children:"Validator Stats"}),"\n",(0,o.jsxs)(e.ul,{children:["\n",(0,o.jsxs)(e.li,{children:[(0,o.jsx)(e.a,{href:"https://polkastats.io/",children:"Polkastats"})," - Polkastats is a cleanly designed dashboard for validator\nstatistics."]}),"\n",(0,o.jsxs)(e.li,{children:[(0,o.jsx)(e.a,{href:"https://kusama.subscan.io/validator",children:"Subscan Validators Page"})," - Displays information on the\ncurrent validators - not as tailored for validators as the other sites."]}),"\n"]})]})}function h(a={}){const{wrapper:e}={...(0,i.R)(),...a.components};return e?(0,o.jsx)(e,{...a,children:(0,o.jsx)(c,{...a})}):c(a)}},47379:(a,e,t)=>{"use strict";t.d(e,{A:()=>p});var n=t(90675),o=t(10467),i=t(96540),r=t(19588),s=t(2026),l=t(11135);function d(a,e,t){return c.apply(this,arguments)}function c(){return(c=(0,o.A)((0,n.A)().mark((function a(e,t,o){var i,l,d,c,h;return(0,n.A)().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:i=void 0,l=void 0,a.t0=e,a.next="polkadot"===a.t0?5:"kusama"===a.t0?7:"statemine"===a.t0?9:"statemint"===a.t0?11:"polkadotpeople"===a.t0?13:"kusamapeople"===a.t0?15:17;break;case 5:return i="wss://rpc.polkadot.io",a.abrupt("break",18);case 7:return i="wss://kusama-rpc.polkadot.io/",a.abrupt("break",18);case 9:return i="wss://statemine-rpc.polkadot.io/",a.abrupt("break",18);case 11:return i="wss://statemint-rpc.polkadot.io/",a.abrupt("break",18);case 13:return i="wss://polkadot-people-rpc.polkadot.io/",a.abrupt("break",18);case 15:return i="wss://kusama-people-rpc.polkadot.io/",a.abrupt("break",18);case 17:console.log("Unknown socket url provided, no connection made.");case 18:if(void 0!==i){a.next=22;break}return a.abrupt("return");case 22:return d=new r.E(i),a.next=25,s.G.create({provider:d});case 25:c=a.sent,(h=t.split(".")).forEach((function(a){a in c&&(c=c[a])})),a.t1=h[0],a.next="consts"===a.t1?31:"query"===a.t1?33:38;break;case 31:return l=c.toString(),a.abrupt("break",39);case 33:return a.next=35,c();case 35:return l=(l=a.sent).toString(),a.abrupt("break",39);case 38:console.log("Unknown path prefix ("+h[0]+") in "+t);case 39:return a.abrupt("return",l);case 40:case"end":return a.stop()}}),a)})))).apply(this,arguments)}function h(a,e,t,n){switch(e){case"humanReadable":(0,l.HumanReadable)(a,t,n);break;case"precise":(0,l.Precise)(a,t,n);break;case"blocksToDays":(0,l.BlocksToDays)(a,n);break;case"erasToDays":(0,l.ErasToDays)(a,n,t);break;case"percentage":(0,l.Percentage)(a,n);break;case"permillToPercent":(0,l.PermillToPercent)(a,n);break;case"arrayLength":(0,l.ArrayLength)(a,n);break;default:return void console.log("Ignoring unknown filter type")}}const p=function(a){var e=a.network,t=a.path,r=a.defaultValue,s=a.filter,l=void 0===s?void 0:s,c=(0,i.useState)(""),p=c[0],u=c[1];return e=e.toLowerCase(),(0,i.useEffect)((function(){void 0!==l?h(r.toString(),l,e,u):u(r.toString());var a=void 0;switch(e){case"polkadot":a="wss://rpc.polkadot.io";break;case"kusama":a="wss://kusama-rpc.polkadot.io/";break;case"statemine":a="wss://kusama-asset-hub-rpc.polkadot.io/";break;case"statemint":a="wss://polkadot-asset-hub-rpc.polkadot.io/";break;case"kusamapeople":a="wss://kusama-people-rpc.polkadot.io";break;case"polkadotpeople":a="wss://polkadot-people-rpc.polkadot.io";break;default:console.log("Unknown network provided, "+e)}if(void 0===a)console.log("Failed to connect to a valid websocket, applying default");else{var i=function(){var a=(0,o.A)((0,n.A)().mark((function a(){var o;return(0,n.A)().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,d(e,t,u);case 2:if(void 0!==(o=a.sent)){a.next=7;break}return a.abrupt("return");case 7:void 0!==l?h(o,l,e,u):u(o);case 8:case"end":return a.stop()}}),a)})));return function(){return a.apply(this,arguments)}}();try{i()}catch(s){console.log(s)}}}),[]),p}},11135:a=>{var e="polkadot",t="kusama",n="statemine",o="statemint",i="polkadotpeople",r="kusamapeople",s={polkadot:{precision:1e10,symbol:"DOT"},kusama:{precision:1e12,symbol:"KSM"},statemint:{precision:1e10,symbol:"DOT"},statemine:{precision:1e12,symbol:"KSM"},polkadotpeople:{precision:1e10,symbol:"DOT"},kusamapeople:{precision:1e12,symbol:"KSM"}};a.exports={HumanReadable:function(a,l,d){var c=void 0;if(l===e||l===o)c=3;else if(l===t||l===n||l===i)c=6;else{if(l!=r)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");c=8}a=parseFloat(a),d((a=Number.isInteger(a/s[l].precision)?a/s[l].precision+" "+s[l].symbol:(a/s[l].precision).toFixed(c)+" "+s[l].symbol).toString())},Precise:function(a,e,t){t(a=(a=parseFloat(a))/s[e].precision+" "+s[e].symbol)},BlocksToDays:function(a,e){e((a=6*a/86400).toString())},ErasToDays:function(a,s,l){var d=void 0;if(l===e||l===o||l==i)d=1;else{if(l!==t&&l!==n&&l!=r)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");d=4}s((a/=d).toString())},Percentage:function(a,e){e((a/=1e7).toString())},PermillToPercent:function(a,e){e((a/=1e4).toString())},ArrayLength:function(a,e){e((a=a.split(",").length).toString())}}},47790:()=>{}}]); \ No newline at end of file diff --git a/assets/js/bb8b1738.f57bdae0.js b/assets/js/bb8b1738.f57bdae0.js deleted file mode 100644 index 6e094ddb9a27..000000000000 --- a/assets/js/bb8b1738.f57bdae0.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk=self.webpackChunk||[]).push([[2916],{2937:(a,e,t)=>{"use strict";t.r(e),t.d(e,{assets:()=>l,contentTitle:()=>r,default:()=>h,frontMatter:()=>i,metadata:()=>s,toc:()=>d});var n=t(74848),o=t(28453);t(47379);const i={id:"learn-validator",title:"Validator",sidebar_label:"Validator",description:"Role of Validators within the Polkadot Ecosystem.",keywords:["validate","validator","maintain","NPoS","stake"],slug:"../learn-validator"},r=void 0,s={id:"learn/learn-validator",title:"Validator",description:"Role of Validators within the Polkadot Ecosystem.",source:"@site/../docs/learn/learn-validator.md",sourceDirName:"learn",slug:"/learn-validator",permalink:"/docs/learn-validator",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-validator.md",tags:[],version:"current",lastUpdatedBy:"batman",lastUpdatedAt:1730356998e3,frontMatter:{id:"learn-validator",title:"Validator",sidebar_label:"Validator",description:"Role of Validators within the Polkadot Ecosystem.",keywords:["validate","validator","maintain","NPoS","stake"],slug:"../learn-validator"},sidebar:"docs",previous:{title:"Nominator",permalink:"/docs/learn-nominator"},next:{title:"Offenses & Slashes",permalink:"/docs/learn-offenses"}},l={},d=[{value:"Para-validators",id:"para-validators",level:2},{value:"Block Authors",id:"block-authors",level:2},{value:"Other Validators",id:"other-validators",level:2},{value:"Further Readings",id:"further-readings",level:2},{value:"Guides",id:"guides",level:3},{value:"Other References",id:"other-references",level:3},{value:"Security / Key Management",id:"security--key-management",level:3},{value:"Monitoring Tools",id:"monitoring-tools",level:3},{value:"Validator Stats",id:"validator-stats",level:3}];function c(a){const e={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",li:"li",p:"p",strong:"strong",ul:"ul",...(0,o.R)(),...a.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(e.admonition,{type:"info",children:(0,n.jsxs)(e.p,{children:["This page provides a general overview of the role of validators in the Polkadot network. For more\ndetailed information you can read the ",(0,n.jsx)(e.a,{href:"/docs/learn-parachains-protocol",children:"Parachain Protocol Overview"}),"."]})}),"\n",(0,n.jsxs)(e.p,{children:["Validators secure the ",(0,n.jsx)(e.a,{href:"/docs/learn-architecture#relay-chain",children:"relay chain"})," by staking native tokens,\nvalidating proofs from collators and participating in consensus with other validators."]}),"\n",(0,n.jsx)(e.p,{children:"Validators play a crucial role in adding new blocks to the relay chain and, by extension, to all\nparachains. This allows parties to complete cross-chain transactions via the relay chain. They\nguarantee that each parachain follows its unique rules and can pass messages between shards in a\ntrust-free environment."}),"\n",(0,n.jsx)(e.h2,{id:"para-validators",children:"Para-validators"}),"\n",(0,n.jsxs)(e.p,{children:["Parachain validators (i.e. para-validators) participate to the\n",(0,n.jsx)(e.a,{href:"./learn-parachains-protocol.md/#parachain-phase",children:"Parachain Phase of the AnV Protocol"}),", and submit\n",(0,n.jsx)(e.a,{href:"./learn-parachains-protocol.md/#candidate-receipts",children:"candidate receipts"})," to the relay chain\ntransaction queue so that a block author can include information on the parablock in a fork of of\nthe relay chain."]}),"\n",(0,n.jsxs)(e.p,{children:["Para-validators work in groups and are selected by the runtime in every epoch to validate parachain\nblocks for all parachains connected to the relay chain. The selected para-validators are part of the\n",(0,n.jsx)(e.a,{href:"/docs/chain-state-values#active-validator-count",children:"active validators"})," randomly selected (per\nepoch) to participate in the validation, creating a validator pool of 200 para-validators."]}),"\n",(0,n.jsxs)(e.p,{children:["Para-validators verify that the information contained in an assigned set of parachain blocks is\nvalid. They receive parachain block candidates from the ",(0,n.jsx)(e.a,{href:"/docs/learn-collator",children:"collators"})," together\nwith a Proof-of-Validity (PoV). The para-validators perform the first round of validity checks on\nthe block candidates. Candidates that gather enough signed validity statements are considered\n",(0,n.jsx)(e.em,{children:"backable"}),"."]}),"\n",(0,n.jsx)(e.h2,{id:"block-authors",children:"Block Authors"}),"\n",(0,n.jsxs)(e.p,{children:["There are validators on the relay chain who participate in the consensus mechanism to produce the\nrelay chain blocks based on validity statements from other validators. These validators are called\nblock authors, they are selected by ",(0,n.jsx)(e.a,{href:"./learn-consensus.md/#block-production-babe",children:"BABE"})," and can note\nup to one backable candidate for each parachain to include in the relay chain. A backable candidate\nincluded in the relay chain is considered ",(0,n.jsx)(e.em,{children:"backed"})," in that fork of the chain."]}),"\n",(0,n.jsxs)(e.p,{children:["In a relay chain block, block authors will only include\n",(0,n.jsx)(e.a,{href:"./learn-parachains-protocol.md/#candidate-receipts",children:"candidate receipts"})," that have a parent\ncandidate receipt in an earlier relay chain block. This ensures the parachain follows a valid chain.\nAlso, the block authors will only include a receipt for which they have an erasure coding chunk,\nensuring that the system can perform the next round of availability and validity checks."]}),"\n",(0,n.jsx)(e.h2,{id:"other-validators",children:"Other Validators"}),"\n",(0,n.jsxs)(e.p,{children:["Validators also contribute to the so-called ",(0,n.jsx)(e.strong,{children:"availability distribution"}),". In fact, once the\ncandidate is backed in a fork of the relay chain, it is still ",(0,n.jsx)(e.em,{children:"pending availability"}),", i.e. it is not\nfully included (only tentative included) as part of the parachain until it is proven available\n(together with the PoV). Information regarding the availability of the candidate will be noted in\nthe following relay chain blocks. Only when there is enough information, the candidate is considered\na full parachain block or ",(0,n.jsx)(e.em,{children:"parablock"}),"."]}),"\n",(0,n.jsxs)(e.p,{children:["Validators also participate in the so-called\n",(0,n.jsx)(e.a,{href:"./learn-parachains-protocol.md/#approval-process",children:(0,n.jsx)(e.strong,{children:"approval process"})}),". Once the parablock is\nconsidered available and part of the parachain, it is still ",(0,n.jsx)(e.em,{children:"pending approval"}),". Because\npara-validators are a small subset of all validators, there is a risk that by chance the majority of\npara-validators assigned to a parachain might be dishonest. It is thus necessary to run a secondary\nverification of the parablock before it can be considered approved. Having a secondary verification\nstep avoids the allocation of more para-validators that will ultimately reduce the throughput of the\nsystem."]}),"\n",(0,n.jsxs)(e.p,{children:["Any instances of non-compliance with the consensus algorithms result in\n",(0,n.jsx)(e.a,{href:"./learn-parachains-protocol.md/#disputes",children:(0,n.jsx)(e.strong,{children:"disputes"})})," with the punishment of the validators on\nthe wrong side by removing some or all their staked tokens, thereby discouraging bad actors. Good\nperformance, however, will be rewarded, with validators receiving block rewards (including\ntransaction fees) in the form of native tokens (DOT or KSM on Kusama) in exchange for their\nactivities."]}),"\n",(0,n.jsxs)(e.p,{children:["Finally, validators participate in the\n",(0,n.jsx)(e.a,{href:"./learn-parachains-protocol.md/#chain-selection",children:"chain selection process within GRANDPA"}),", ensuring\nthat only available and valid blocks end within the finalized relay chain."]}),"\n",(0,n.jsx)(e.admonition,{title:"Within an era roles can change",type:"info",children:(0,n.jsx)(e.p,{children:"Within the same era, a Validator can be a para-validator, block author, and participate in the\navailability distribution or the approval process. Those roles can change between sessions."})}),"\n",(0,n.jsx)(e.h2,{id:"further-readings",children:"Further Readings"}),"\n",(0,n.jsx)(e.h3,{id:"guides",children:"Guides"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:[(0,n.jsx)(e.a,{href:"/docs/maintain-guides-how-to-validate-polkadot",children:"How to Validate on Polkadot"})," - Guide on\nhow to set up a validator on the Polkadot live network."]}),"\n",(0,n.jsxs)(e.li,{children:[(0,n.jsx)(e.a,{href:"/docs/maintain-guides-validator-payout",children:"Validator Payout Overview"})," - A short overview on\nhow the validator payout mechanism works."]}),"\n",(0,n.jsxs)(e.li,{children:[(0,n.jsx)(e.a,{href:"/docs/maintain-guides-how-to-systemd",children:"How to run your validator as a systemd process"})," -\nGuide on running your validator as a ",(0,n.jsx)(e.code,{children:"systemd"})," process so that it will run in the background and\nstart automatically on reboots."]}),"\n",(0,n.jsxs)(e.li,{children:[(0,n.jsx)(e.a,{href:"/docs/maintain-guides-how-to-upgrade",children:"How to Upgrade your Validator"})," - Guide for\nsecurely upgrading your validator when you want to switch to a different machine or begin running\nthe latest version of client code."]}),"\n",(0,n.jsxs)(e.li,{children:[(0,n.jsx)(e.a,{href:"/docs/maintain-guides-how-to-validate-polkadot",children:"How to Use Validator Setup"})," - Guide on\nhow to use Polkadot / Kusama validator setup."]}),"\n"]}),"\n",(0,n.jsx)(e.h3,{id:"other-references",children:"Other References"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsx)(e.li,{children:(0,n.jsx)(e.a,{href:"https://medium.com/@acvlls/setting-up-a-maintain-the-easy-way-3a885283091f",children:"How to run a Polkadot node (Docker)"})}),"\n",(0,n.jsxs)(e.li,{children:[(0,n.jsx)(e.a,{href:"https://medium.com/hackernoon/a-serverless-failover-solution-for-web-3-0-validator-nodes-e26b9d24c71d",children:"A Serverless Failover Solution for Web3.0 Validator Nodes"})," -\nBlog that details how to create a robust failover solution for running validators."]}),"\n",(0,n.jsx)(e.li,{children:(0,n.jsx)(e.a,{href:"/docs/maintain-guides-how-to-validate-kusama##vps-list",children:"VPS list"})}),"\n",(0,n.jsxs)(e.li,{children:[(0,n.jsx)(e.a,{href:"https://matrix.to/#/!NZrbtteFeqYKCUGQtr:matrix.parity.io?via=matrix.parity.io&via=matrix.org&via=web3.foundation",children:"Polkadot Validator Lounge"})," -\nA place to chat about being a validator."]}),"\n",(0,n.jsxs)(e.li,{children:[(0,n.jsx)(e.a,{href:"/docs/learn-offenses",children:"Slashing Consequences"})," - Learn more about slashing consequences for running\na validator node."]}),"\n",(0,n.jsx)(e.li,{children:(0,n.jsx)(e.a,{href:"https://www.youtube.com/watch?v=0EmP0s6JOW4&list=PLOyWqupZ-WGuAuS00rK-pebTMAOxW41W8&index=2",children:"Why You Should be A Validator on Polkadot and Kusama"})}),"\n",(0,n.jsx)(e.li,{children:(0,n.jsx)(e.a,{href:"https://www.youtube.com/watch?v=riVg_Up_fCg&list=PLOyWqupZ-WGuAuS00rK-pebTMAOxW41W8&index=15",children:"Roles and Responsibilities of a Validator"})}),"\n",(0,n.jsxs)(e.li,{children:[(0,n.jsx)(e.a,{href:"https://www.crowdcast.io/e/validating-on-polkadot",children:"Validating on Polkadot"})," - An explanation of\nhow to validate on Polkadot, with Joe Petrowski and David Dorgan of Parity Technologies, along\nwith Tim Ogilvie from Staked."]}),"\n"]}),"\n",(0,n.jsx)(e.h3,{id:"security--key-management",children:"Security / Key Management"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsx)(e.li,{children:(0,n.jsx)(e.a,{href:"https://github.com/w3f/validator-security",children:"Validator Security Overview"})}),"\n"]}),"\n",(0,n.jsx)(e.h3,{id:"monitoring-tools",children:"Monitoring Tools"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:[(0,n.jsx)(e.a,{href:"https://github.com/SimplyVC/panic_polkadot",children:"PANIC for Polkadot"})," - A monitoring and alerting\nsolution for Polkadot / Kusama node"]}),"\n",(0,n.jsxs)(e.li,{children:[(0,n.jsx)(e.a,{href:"https://telemetry.polkadot.io/#list/Kusama%20CC3",children:"Polkadot Telemetry Service"})," - Network\ninformation, including what nodes are running on a given chain, what software versions they are\nrunning, and sync status."]}),"\n"]}),"\n",(0,n.jsx)(e.h3,{id:"validator-stats",children:"Validator Stats"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:[(0,n.jsx)(e.a,{href:"https://polkastats.io/",children:"Polkastats"})," - Polkastats is a cleanly designed dashboard for validator\nstatistics."]}),"\n",(0,n.jsxs)(e.li,{children:[(0,n.jsx)(e.a,{href:"https://kusama.subscan.io/validator",children:"Subscan Validators Page"})," - Displays information on the\ncurrent validators - not as tailored for validators as the other sites."]}),"\n"]})]})}function h(a={}){const{wrapper:e}={...(0,o.R)(),...a.components};return e?(0,n.jsx)(e,{...a,children:(0,n.jsx)(c,{...a})}):c(a)}},47379:(a,e,t)=>{"use strict";t.d(e,{A:()=>p});var n=t(90675),o=t(10467),i=t(96540),r=t(19588),s=t(2026),l=t(11135);function d(a,e,t){return c.apply(this,arguments)}function c(){return(c=(0,o.A)((0,n.A)().mark((function a(e,t,o){var i,l,d,c,h;return(0,n.A)().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:i=void 0,l=void 0,a.t0=e,a.next="polkadot"===a.t0?5:"kusama"===a.t0?7:"statemine"===a.t0?9:"statemint"===a.t0?11:"polkadotpeople"===a.t0?13:"kusamapeople"===a.t0?15:17;break;case 5:return i="wss://rpc.polkadot.io",a.abrupt("break",18);case 7:return i="wss://kusama-rpc.polkadot.io/",a.abrupt("break",18);case 9:return i="wss://statemine-rpc.polkadot.io/",a.abrupt("break",18);case 11:return i="wss://statemint-rpc.polkadot.io/",a.abrupt("break",18);case 13:return i="wss://polkadot-people-rpc.polkadot.io/",a.abrupt("break",18);case 15:return i="wss://kusama-people-rpc.polkadot.io/",a.abrupt("break",18);case 17:console.log("Unknown socket url provided, no connection made.");case 18:if(void 0!==i){a.next=22;break}return a.abrupt("return");case 22:return d=new r.E(i),a.next=25,s.G.create({provider:d});case 25:c=a.sent,(h=t.split(".")).forEach((function(a){a in c&&(c=c[a])})),a.t1=h[0],a.next="consts"===a.t1?31:"query"===a.t1?33:38;break;case 31:return l=c.toString(),a.abrupt("break",39);case 33:return a.next=35,c();case 35:return l=(l=a.sent).toString(),a.abrupt("break",39);case 38:console.log("Unknown path prefix ("+h[0]+") in "+t);case 39:return a.abrupt("return",l);case 40:case"end":return a.stop()}}),a)})))).apply(this,arguments)}function h(a,e,t,n){switch(e){case"humanReadable":(0,l.HumanReadable)(a,t,n);break;case"precise":(0,l.Precise)(a,t,n);break;case"blocksToDays":(0,l.BlocksToDays)(a,n);break;case"erasToDays":(0,l.ErasToDays)(a,n,t);break;case"percentage":(0,l.Percentage)(a,n);break;case"permillToPercent":(0,l.PermillToPercent)(a,n);break;case"arrayLength":(0,l.ArrayLength)(a,n);break;default:return void console.log("Ignoring unknown filter type")}}const p=function(a){var e=a.network,t=a.path,r=a.defaultValue,s=a.filter,l=void 0===s?void 0:s,c=(0,i.useState)(""),p=c[0],u=c[1];return e=e.toLowerCase(),(0,i.useEffect)((function(){void 0!==l?h(r.toString(),l,e,u):u(r.toString());var a=void 0;switch(e){case"polkadot":a="wss://rpc.polkadot.io";break;case"kusama":a="wss://kusama-rpc.polkadot.io/";break;case"statemine":a="wss://kusama-asset-hub-rpc.polkadot.io/";break;case"statemint":a="wss://polkadot-asset-hub-rpc.polkadot.io/";break;case"kusamapeople":a="wss://kusama-people-rpc.polkadot.io";break;case"polkadotpeople":a="wss://polkadot-people-rpc.polkadot.io";break;default:console.log("Unknown network provided, "+e)}if(void 0===a)console.log("Failed to connect to a valid websocket, applying default");else{var i=function(){var a=(0,o.A)((0,n.A)().mark((function a(){var o;return(0,n.A)().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,d(e,t,u);case 2:if(void 0!==(o=a.sent)){a.next=7;break}return a.abrupt("return");case 7:void 0!==l?h(o,l,e,u):u(o);case 8:case"end":return a.stop()}}),a)})));return function(){return a.apply(this,arguments)}}();try{i()}catch(s){console.log(s)}}}),[]),p}},11135:a=>{var e="polkadot",t="kusama",n="statemine",o="statemint",i="polkadotpeople",r="kusamapeople",s={polkadot:{precision:1e10,symbol:"DOT"},kusama:{precision:1e12,symbol:"KSM"},statemint:{precision:1e10,symbol:"DOT"},statemine:{precision:1e12,symbol:"KSM"},polkadotpeople:{precision:1e10,symbol:"DOT"},kusamapeople:{precision:1e12,symbol:"KSM"}};a.exports={HumanReadable:function(a,l,d){var c=void 0;if(l===e||l===o)c=3;else if(l===t||l===n||l===i)c=6;else{if(l!=r)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");c=8}a=parseFloat(a),d((a=Number.isInteger(a/s[l].precision)?a/s[l].precision+" "+s[l].symbol:(a/s[l].precision).toFixed(c)+" "+s[l].symbol).toString())},Precise:function(a,e,t){t(a=(a=parseFloat(a))/s[e].precision+" "+s[e].symbol)},BlocksToDays:function(a,e){e((a=6*a/86400).toString())},ErasToDays:function(a,s,l){var d=void 0;if(l===e||l===o||l==i)d=1;else{if(l!==t&&l!==n&&l!=r)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");d=4}s((a/=d).toString())},Percentage:function(a,e){e((a/=1e7).toString())},PermillToPercent:function(a,e){e((a/=1e4).toString())},ArrayLength:function(a,e){e((a=a.split(",").length).toString())}}},47790:()=>{}}]); \ No newline at end of file diff --git a/assets/js/bbba852d.a1ca954c.js b/assets/js/bbba852d.a1ca954c.js deleted file mode 100644 index 177a63e9e21c..000000000000 --- a/assets/js/bbba852d.a1ca954c.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9799],{20995:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>r,default:()=>h,frontMatter:()=>a,metadata:()=>c,toc:()=>d});var s=n(74848),i=n(28453);const a={id:"kusama-adversarial-cheatsheet",title:"Adversarial Cheatsheet",sidebar_label:"Adversarial Cheatsheet",description:"A cheatsheet to help you create chaos.",keywords:["cheatsheet","kusama","model","chaos"],slug:"../../kusama-adversarial-cheatsheet"},r=void 0,c={id:"general/kusama/kusama-adversarial-cheatsheet",title:"Adversarial Cheatsheet",description:"A cheatsheet to help you create chaos.",source:"@site/../docs/general/kusama/kusama-adverserial-cheatsheet.md",sourceDirName:"general/kusama",slug:"/kusama-adversarial-cheatsheet",permalink:"/docs/kusama-adversarial-cheatsheet",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/kusama/kusama-adverserial-cheatsheet.md",tags:[],version:"current",lastUpdatedBy:"Danny Salman",lastUpdatedAt:1649779476e3,frontMatter:{id:"kusama-adversarial-cheatsheet",title:"Adversarial Cheatsheet",sidebar_label:"Adversarial Cheatsheet",description:"A cheatsheet to help you create chaos.",keywords:["cheatsheet","kusama","model","chaos"],slug:"../../kusama-adversarial-cheatsheet"},sidebar:"docs",previous:{title:"Account Recovery",permalink:"/docs/kusama-social-recovery"},next:{title:"Kappa Sigma Mu",permalink:"/docs/maintain-guides-society-kusama"}},l={},d=[];function o(e){const t={p:"p",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.p,{children:"Expect things to break on Kusama. To help you break some things, take a look at the following threat\nmodel."}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Hacker wants to \u2026"}),(0,s.jsx)(t.th,{style:{textAlign:"center"},children:"Security promise that should prevent the hack"}),(0,s.jsx)(t.th,{style:{textAlign:"center"},children:"Hacking Incentive"}),(0,s.jsx)(t.th,{style:{textAlign:"center"},children:"Hacking Damage"}),(0,s.jsx)(t.th,{children:"Hacking value details"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Double spend tokens via getting the clients to accept a different chain"}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"Integrity (System-wide)"}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"High"}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"High"}),(0,s.jsx)(t.td,{children:"If attackers are able to double spend tokens, they are able to get services without paying for them. This gives them a high monetary incentive to execute the attack."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Cause system to mint tokens to his own account"}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"Integrity (System-wide)"}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"\xa0Medium"}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"Low - Medium"}),(0,s.jsx)(t.td,{children:"If an attacker is able to craft transactions that mint tokens to their account, then this provides a high monetary incentive to execute this attack."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Validate malicious blocks to double spend tokens"}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"Availability (System-wide)"}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"\xa0High"}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"Medium"}),(0,s.jsx)(t.td,{children:"If an attacker is able to double spend tokens, they are able to get services without paying for them. This gives them a high monetary incentive to execute the attack."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Undermine consensus mechanism to split chain"}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"Integrity (System-wide)"}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"High"}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"High"}),(0,s.jsx)(t.td,{children:'"If an attacker is able to double spend tokens, they are able to get services without paying for them. This gives them a high monetary incentive to execute the attack. Betting on decrease in value of the cryptocurrency or competitors want to damage the reputation, so that the value of their blockchain increases.'})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Tamper/manipulate blockchain history to invalidate transactions (e.g. a voting result)"}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"Integrity (System-wide)"}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"Medium"}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"Medium - High"}),(0,s.jsx)(t.td,{children:"Attacker can rollback undesired transactions by intentionally invalidating the block where transaction has happened. Attacker can force a governance decision (or even an on-chain update) that favors them."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Undermine blockchain or consensus mechanism to damage the ecosystem's reputation"}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"Availability (System-wide)"}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"High"}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"High"}),(0,s.jsx)(t.td,{children:"Betting on decrease in value of the cryptocurrency or competitors want to damage the reputation, so that the value of their blockchain increases"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Censorship"}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"Availability (System-wide)"}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"Medium"}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"High"}),(0,s.jsx)(t.td,{children:"Hackers are able to block undesirable types of transactions (e.g. industry competitor transactions or referendum votes). This could be achieved by colluding with other stakeholders or by otherwise obtaining more voting power."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Deanonymize users"}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"Confidentiality (Node)"}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"Medium"}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"Medium"}),(0,s.jsx)(t.td,{children:"Parties that want to de-anonymize users can use the information to oppress the opposition (e.g. political activists)."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Steal token from node"}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"Integrity (Node)"}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"High"}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"High"}),(0,s.jsx)(t.td,{children:"Attackers that are able to steal tokens from nodes can claim assets for themselves, which gives them a high monetary incentive to execute the attack."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Steal token from node by leaking credentials"}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"Confidentiality (Node)"}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"High"}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"High"}),(0,s.jsx)(t.td,{children:"Attackers that are able to steal tokens from nodes can claim assets for themselves, which gives them a high monetary incentive to execute the attack."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Prevent node from accessing the Polkadot network"}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"Availability (Node)"}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"Low"}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"Low - Medium"}),(0,s.jsx)(t.td,{children:"Run a targeted denial-of-service attack out of revenge, monetary interests (in case of a competing coin exchange, etc.)."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Defraud other participants"}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"Integrity (Node)"}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"Medium"}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"Low - Medium"}),(0,s.jsx)(t.td,{children:"Attacker can abuse other participants\u2019 misunderstanding of Polkadot's security guarantees to defraud them. Also, if the reward for calling out bad behavior can be set up so that it is higher than the according punishment, a set of self-handled nodes can be set up to generate a source cycle. Other participants are not needed for this attack."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Defraud other participants"}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"Integrity (System-wide)"}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"High"}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"High"}),(0,s.jsx)(t.td,{children:"An attacker could abuse bugs in Polkadot's economic system to defraud other participants. For example, an attacker could exploit a logic bug to not pay transaction fees."})]})]})]})]})}function h(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(o,{...e})}):o(e)}},28453:(e,t,n)=>{n.d(t,{R:()=>r,x:()=>c});var s=n(96540);const i={},a=s.createContext(i);function r(e){const t=s.useContext(a);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function c(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),s.createElement(a.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/bbba852d.cd6da65a.js b/assets/js/bbba852d.cd6da65a.js new file mode 100644 index 000000000000..b1db5c9ae612 --- /dev/null +++ b/assets/js/bbba852d.cd6da65a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9799],{17681:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>c,default:()=>h,frontMatter:()=>r,metadata:()=>s,toc:()=>d});const s=JSON.parse('{"id":"general/kusama/kusama-adversarial-cheatsheet","title":"Adversarial Cheatsheet","description":"A cheatsheet to help you create chaos.","source":"@site/../docs/general/kusama/kusama-adverserial-cheatsheet.md","sourceDirName":"general/kusama","slug":"/kusama-adversarial-cheatsheet","permalink":"/docs/kusama-adversarial-cheatsheet","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/kusama/kusama-adverserial-cheatsheet.md","tags":[],"version":"current","lastUpdatedBy":"Danny Salman","lastUpdatedAt":1649779476000,"frontMatter":{"id":"kusama-adversarial-cheatsheet","title":"Adversarial Cheatsheet","sidebar_label":"Adversarial Cheatsheet","description":"A cheatsheet to help you create chaos.","keywords":["cheatsheet","kusama","model","chaos"],"slug":"../../kusama-adversarial-cheatsheet"},"sidebar":"docs","previous":{"title":"Account Recovery","permalink":"/docs/kusama-social-recovery"},"next":{"title":"Kappa Sigma Mu","permalink":"/docs/maintain-guides-society-kusama"}}');var i=n(74848),a=n(28453);const r={id:"kusama-adversarial-cheatsheet",title:"Adversarial Cheatsheet",sidebar_label:"Adversarial Cheatsheet",description:"A cheatsheet to help you create chaos.",keywords:["cheatsheet","kusama","model","chaos"],slug:"../../kusama-adversarial-cheatsheet"},c=void 0,l={},d=[];function o(e){const t={p:"p",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,a.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.p,{children:"Expect things to break on Kusama. To help you break some things, take a look at the following threat\nmodel."}),"\n",(0,i.jsxs)(t.table,{children:[(0,i.jsx)(t.thead,{children:(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.th,{children:"Hacker wants to \u2026"}),(0,i.jsx)(t.th,{style:{textAlign:"center"},children:"Security promise that should prevent the hack"}),(0,i.jsx)(t.th,{style:{textAlign:"center"},children:"Hacking Incentive"}),(0,i.jsx)(t.th,{style:{textAlign:"center"},children:"Hacking Damage"}),(0,i.jsx)(t.th,{children:"Hacking value details"})]})}),(0,i.jsxs)(t.tbody,{children:[(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Double spend tokens via getting the clients to accept a different chain"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"Integrity (System-wide)"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"High"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"High"}),(0,i.jsx)(t.td,{children:"If attackers are able to double spend tokens, they are able to get services without paying for them. This gives them a high monetary incentive to execute the attack."})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Cause system to mint tokens to his own account"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"Integrity (System-wide)"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"\xa0Medium"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"Low - Medium"}),(0,i.jsx)(t.td,{children:"If an attacker is able to craft transactions that mint tokens to their account, then this provides a high monetary incentive to execute this attack."})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Validate malicious blocks to double spend tokens"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"Availability (System-wide)"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"\xa0High"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"Medium"}),(0,i.jsx)(t.td,{children:"If an attacker is able to double spend tokens, they are able to get services without paying for them. This gives them a high monetary incentive to execute the attack."})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Undermine consensus mechanism to split chain"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"Integrity (System-wide)"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"High"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"High"}),(0,i.jsx)(t.td,{children:'"If an attacker is able to double spend tokens, they are able to get services without paying for them. This gives them a high monetary incentive to execute the attack. Betting on decrease in value of the cryptocurrency or competitors want to damage the reputation, so that the value of their blockchain increases.'})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Tamper/manipulate blockchain history to invalidate transactions (e.g. a voting result)"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"Integrity (System-wide)"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"Medium"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"Medium - High"}),(0,i.jsx)(t.td,{children:"Attacker can rollback undesired transactions by intentionally invalidating the block where transaction has happened. Attacker can force a governance decision (or even an on-chain update) that favors them."})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Undermine blockchain or consensus mechanism to damage the ecosystem's reputation"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"Availability (System-wide)"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"High"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"High"}),(0,i.jsx)(t.td,{children:"Betting on decrease in value of the cryptocurrency or competitors want to damage the reputation, so that the value of their blockchain increases"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Censorship"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"Availability (System-wide)"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"Medium"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"High"}),(0,i.jsx)(t.td,{children:"Hackers are able to block undesirable types of transactions (e.g. industry competitor transactions or referendum votes). This could be achieved by colluding with other stakeholders or by otherwise obtaining more voting power."})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Deanonymize users"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"Confidentiality (Node)"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"Medium"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"Medium"}),(0,i.jsx)(t.td,{children:"Parties that want to de-anonymize users can use the information to oppress the opposition (e.g. political activists)."})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Steal token from node"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"Integrity (Node)"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"High"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"High"}),(0,i.jsx)(t.td,{children:"Attackers that are able to steal tokens from nodes can claim assets for themselves, which gives them a high monetary incentive to execute the attack."})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Steal token from node by leaking credentials"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"Confidentiality (Node)"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"High"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"High"}),(0,i.jsx)(t.td,{children:"Attackers that are able to steal tokens from nodes can claim assets for themselves, which gives them a high monetary incentive to execute the attack."})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Prevent node from accessing the Polkadot network"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"Availability (Node)"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"Low"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"Low - Medium"}),(0,i.jsx)(t.td,{children:"Run a targeted denial-of-service attack out of revenge, monetary interests (in case of a competing coin exchange, etc.)."})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Defraud other participants"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"Integrity (Node)"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"Medium"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"Low - Medium"}),(0,i.jsx)(t.td,{children:"Attacker can abuse other participants\u2019 misunderstanding of Polkadot's security guarantees to defraud them. Also, if the reward for calling out bad behavior can be set up so that it is higher than the according punishment, a set of self-handled nodes can be set up to generate a source cycle. Other participants are not needed for this attack."})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Defraud other participants"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"Integrity (System-wide)"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"High"}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:"High"}),(0,i.jsx)(t.td,{children:"An attacker could abuse bugs in Polkadot's economic system to defraud other participants. For example, an attacker could exploit a logic bug to not pay transaction fees."})]})]})]})]})}function h(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(o,{...e})}):o(e)}},28453:(e,t,n)=>{n.d(t,{R:()=>r,x:()=>c});var s=n(96540);const i={},a=s.createContext(i);function r(e){const t=s.useContext(a);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function c(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),s.createElement(a.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/bd701914.61955492.js b/assets/js/bd701914.61955492.js deleted file mode 100644 index 22e38af58f1c..000000000000 --- a/assets/js/bd701914.61955492.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1077],{63298:(e,a,t)=>{t.r(a),t.d(a,{assets:()=>l,contentTitle:()=>s,default:()=>u,frontMatter:()=>o,metadata:()=>h,toc:()=>c});var n=t(74848),i=t(28453),r=t(67141);const o={id:"learn-parachains-faq",title:"Parachains FAQ",sidebar_label:"Parachains FAQ",description:"Parachains FAQ.",keywords:["parachains","application-specific","sharding","faq"],slug:"../learn-parachains-faq"},s=void 0,h={id:"learn/learn-parachains-faq",title:"Parachains FAQ",description:"Parachains FAQ.",source:"@site/../docs/learn/learn-parachains-faq.md",sourceDirName:"learn",slug:"/learn-parachains-faq",permalink:"/docs/learn-parachains-faq",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-parachains-faq.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1729847256e3,frontMatter:{id:"learn-parachains-faq",title:"Parachains FAQ",sidebar_label:"Parachains FAQ",description:"Parachains FAQ.",keywords:["parachains","application-specific","sharding","faq"],slug:"../learn-parachains-faq"},sidebar:"docs",previous:{title:"System Parachains",permalink:"/docs/learn-system-chains"},next:{title:"Asynchronous Backing",permalink:"/docs/learn-async-backing"}},l={},c=[{value:"General",id:"general",level:2},{value:"What is "parachain consensus"?",id:"what-is-parachain-consensus",level:3},{value:"How about parachains that are not Substrate-based?",id:"how-about-parachains-that-are-not-substrate-based",level:3},{value:"Is 100 a hard limit on the number of Parachains that can be supported?",id:"is-100-a-hard-limit-on-the-number-of-parachains-that-can-be-supported",level:3},{value:"What happens to parachains when the number of validators drops below a certain threshold?",id:"what-happens-to-parachains-when-the-number-of-validators-drops-below-a-certain-threshold",level:3},{value:"Parachain Development Kits (PDKs)",id:"parachain-development-kits-pdks",level:3},{value:"Security",id:"security",level:2},{value:"Is security correlated to the number of validators? What about the number of parachains?",id:"is-security-correlated-to-the-number-of-validators-what-about-the-number-of-parachains",level:3},{value:"In what scenarios do parachains need their own security?",id:"in-what-scenarios-do-parachains-need-their-own-security",level:3}];function d(e){const a={a:"a",h2:"h2",h3:"h3",p:"p",...(0,i.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.A,{message:"Parachain Slot Auctions and Crowdloans will be deprecated right after [Agile Coretime](./learn-agile-coretime) is activated on the network. For existing parachains, the remainder of the lease will automatically be converted to coretime. See more information [here](./learn-agile-coretime#implementation)."}),"\n",(0,n.jsx)(a.h2,{id:"general",children:"General"}),"\n",(0,n.jsx)(a.h3,{id:"what-is-parachain-consensus",children:'What is "parachain consensus"?'}),"\n",(0,n.jsx)(a.p,{children:'"Parachain consensus" is special in that it will follow the relay chain. Parachains cannot use other\nconsensus algorithms that provide their own finality. Only sovereign chains (that must bridge to the\nrelay chain via a parachain) can control their own consensus. Parachains have control over how\nblocks are authored and by whom. The relay chain guarantees valid state transitions. Executing a\nblock finality outside the context of the relay chain is outside the scope of trust that the relay\nchain provides.'}),"\n",(0,n.jsx)(a.h3,{id:"how-about-parachains-that-are-not-substrate-based",children:"How about parachains that are not Substrate-based?"}),"\n",(0,n.jsxs)(a.p,{children:["Substrate provides ",(0,n.jsx)(a.a,{href:"https://docs.substrate.io/main-docs/fundamentals/runtime-intro/",children:"FRAME Pallets"}),"\nas part of its framework to seamlessly build a rustic-based blockchain. Part of FRAME are pallets\nthat can be used for consensus. Polkadot, being a Substrate-based chain, relies on BABE as the block\nproduction scheme and GRANDPA as the finality gadget as part of its consensus mechanism.\nCollectively, this is a ",(0,n.jsx)(a.a,{href:"/docs/learn-consensus#hybrid-consensus",children:"Hybrid Consensus Model"}),", where block\nproduction and block finality are separate. Parachains only need to produce blocks as they can rely\non the relay chain to validate the state transitions. Thus, parachains can have their own block\nproduction where the ",(0,n.jsx)(a.a,{href:"/docs/learn-collator",children:"collators"})," act as the block producers, even if the\nparachain is not Substrate-based."]}),"\n",(0,n.jsx)(a.h3,{id:"is-100-a-hard-limit-on-the-number-of-parachains-that-can-be-supported",children:"Is 100 a hard limit on the number of Parachains that can be supported?"}),"\n",(0,n.jsxs)(a.p,{children:["No. The network went through a significant number of optimizations, and there are\n",(0,n.jsx)(a.a,{href:"https://polkadot.network/blog/polkadot-roadmap-roundup/",children:"several updates planned"})," in the near\nfuture. The exact number of parachains that the relay chain can support without any degradation in\nperformance is yet to be discovered. Also, with the\n",(0,n.jsx)(a.a,{href:"https://www.rob.tech/polkadot-blockspace-over-blockchains/",children:"blockspace over blockchains"})," paradigm\nwhich brings on-demand parachains into the picture, there is no hard limit number on the number of\nblockchains that can be supported by the relay chain."]}),"\n",(0,n.jsx)(a.h3,{id:"what-happens-to-parachains-when-the-number-of-validators-drops-below-a-certain-threshold",children:"What happens to parachains when the number of validators drops below a certain threshold?"}),"\n",(0,n.jsxs)(a.p,{children:["The minimal safe ratio of validators per parachain is 5:1. With a sufficiently large set of\nvalidators, the randomness of their distribution along with\n",(0,n.jsx)(a.a,{href:"/docs/learn-parachains-protocol#anv-protocol",children:"availability and validity"})," will make sure security is\non-par. However, should there be a big outage of a popular cloud provider or another network\nconnectivity catastrophe, it is reasonable to expect that the number of validators per chain will\ndrop."]}),"\n",(0,n.jsx)(a.p,{children:"Depending on how many validators went offline, the outcome differs."}),"\n",(0,n.jsx)(a.p,{children:"If a few validators went offline, the parachains whose validator groups are too small to validate a\nblock will skip those blocks. Their block production speed will slow down to an increment of six\nseconds until the situation is resolved and the optimal number of validators is in that parachain's\nvalidator group again."}),"\n",(0,n.jsx)(a.p,{children:"If anywhere from 30% to 50% of the validators go offline, availability will suffer because we need\ntwo-thirds of the validator set to back the parachain candidates. In other words, all parachains\nwill stop until the situation is resolved. Finality will also stop, but low-value transactions on\nthe relay chain should be safe enough to execute, despite common forks. Once the required number of\nvalidators are in the validator set again, parachains will resume block production."}),"\n",(0,n.jsxs)(a.p,{children:["Given that collators are full nodes of the relay chain and the parachain they are running, they will\nbe able to recognize a disruption as soon as it occurs and should stop producing block candidates.\nLikewise, it should be easy for them to recognize when it's safe to restart block production -\nperhaps based on finality delay, validator set size or some other factor that is yet to be decided\nwithin ",(0,n.jsx)(a.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/cumulus",children:"Cumulus"}),"."]}),"\n",(0,n.jsx)(a.h3,{id:"parachain-development-kits-pdks",children:"Parachain Development Kits (PDKs)"}),"\n",(0,n.jsxs)(a.p,{children:["Parachain Development Kits are a set of tools that enable developers to create their own\napplications as parachains. For more information, see the PDK\ncontent](../build/build-parachains.md#parachain-development-kit-pdk) and\n",(0,n.jsx)(a.a,{href:"/docs/build-pdk",children:"Parachain Development page"}),"."]}),"\n",(0,n.jsx)(a.h2,{id:"security",children:"Security"}),"\n",(0,n.jsx)(a.h3,{id:"is-security-correlated-to-the-number-of-validators-what-about-the-number-of-parachains",children:"Is security correlated to the number of validators? What about the number of parachains?"}),"\n",(0,n.jsx)(a.p,{children:"Security is independent of the number of parachains that are connected to the Polkadot relay chain.\nThe correlation of security and the number of validators exists as the higher number of validators\nwill give the network stronger decentralization properties and make it harder to try to take down.\nHowever, the biggest indicator of the security of the network is the economic signal of the number\nof DOT that are bonded and staked. The greater the number of DOT staked by honest validators and\nnominators, the higher the minimum amount of DOT an attacker would need to acquire a validator slot."}),"\n",(0,n.jsx)(a.h3,{id:"in-what-scenarios-do-parachains-need-their-own-security",children:"In what scenarios do parachains need their own security?"}),"\n",(0,n.jsx)(a.p,{children:"Most parachains will not need to worry about their own security, since all state transitions will be\nsecured by the Polkadot relay chain validator set. However, in some cases (which are considered more\nexperimental), parachains may require their own security. In general, these cases will revolve\naround lack of data available to relay chain validators."}),"\n",(0,n.jsxs)(a.p,{children:["One example is if the state transition function is some succinct or zero-knowledge proof, the\nparachain would be responsible for keeping its data available as the relay chain won't have it.\nAdditionally, for chains with their own consensus, like the one that enables fast payments on\n",(0,n.jsx)(a.a,{href:"https://www.youtube.com/watch?v=sf5GMDlG7Uk",children:"Blink Network"}),", there would probably need to be a\nByzantine agreement between stakers before a parachain block is valid. The agreement would be\nnecessary because the data associated with the fast consensus would be unknown to relay chain\nvalidators."]})]})}function u(e={}){const{wrapper:a}={...(0,i.R)(),...e.components};return a?(0,n.jsx)(a,{...e,children:(0,n.jsx)(d,{...e})}):d(e)}},67141:(e,a,t)=>{t.d(a,{A:()=>r});var n=t(96540),i=t(74848);const r=function(e){var a,t=e.message,r=(0,n.useState)(!0),o=r[0],s=r[1];return(0,i.jsx)(i.Fragment,{children:o&&(0,i.jsxs)("div",{className:"message-box",children:[(0,i.jsx)("button",{className:"close-button",onClick:function(){s(!1)},children:"\u2716 "}),(0,i.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(a=t,a.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},28453:(e,a,t)=>{t.d(a,{R:()=>o,x:()=>s});var n=t(96540);const i={},r=n.createContext(i);function o(e){const a=n.useContext(r);return n.useMemo((function(){return"function"==typeof e?e(a):{...a,...e}}),[a,e])}function s(e){let a;return a=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:o(e.components),n.createElement(r.Provider,{value:a},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/bd701914.87538cd3.js b/assets/js/bd701914.87538cd3.js new file mode 100644 index 000000000000..e95c895b6412 --- /dev/null +++ b/assets/js/bd701914.87538cd3.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1077],{4366:(e,a,t)=>{t.r(a),t.d(a,{assets:()=>l,contentTitle:()=>h,default:()=>u,frontMatter:()=>s,metadata:()=>n,toc:()=>c});const n=JSON.parse('{"id":"learn/learn-parachains-faq","title":"Parachains FAQ","description":"Parachains FAQ.","source":"@site/../docs/learn/learn-parachains-faq.md","sourceDirName":"learn","slug":"/learn-parachains-faq","permalink":"/docs/learn-parachains-faq","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-parachains-faq.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1729847256000,"frontMatter":{"id":"learn-parachains-faq","title":"Parachains FAQ","sidebar_label":"Parachains FAQ","description":"Parachains FAQ.","keywords":["parachains","application-specific","sharding","faq"],"slug":"../learn-parachains-faq"},"sidebar":"docs","previous":{"title":"System Parachains","permalink":"/docs/learn-system-chains"},"next":{"title":"Asynchronous Backing","permalink":"/docs/learn-async-backing"}}');var r=t(74848),i=t(28453),o=t(67141);const s={id:"learn-parachains-faq",title:"Parachains FAQ",sidebar_label:"Parachains FAQ",description:"Parachains FAQ.",keywords:["parachains","application-specific","sharding","faq"],slug:"../learn-parachains-faq"},h=void 0,l={},c=[{value:"General",id:"general",level:2},{value:"What is "parachain consensus"?",id:"what-is-parachain-consensus",level:3},{value:"How about parachains that are not Substrate-based?",id:"how-about-parachains-that-are-not-substrate-based",level:3},{value:"Is 100 a hard limit on the number of Parachains that can be supported?",id:"is-100-a-hard-limit-on-the-number-of-parachains-that-can-be-supported",level:3},{value:"What happens to parachains when the number of validators drops below a certain threshold?",id:"what-happens-to-parachains-when-the-number-of-validators-drops-below-a-certain-threshold",level:3},{value:"Parachain Development Kits (PDKs)",id:"parachain-development-kits-pdks",level:3},{value:"Security",id:"security",level:2},{value:"Is security correlated to the number of validators? What about the number of parachains?",id:"is-security-correlated-to-the-number-of-validators-what-about-the-number-of-parachains",level:3},{value:"In what scenarios do parachains need their own security?",id:"in-what-scenarios-do-parachains-need-their-own-security",level:3}];function d(e){const a={a:"a",h2:"h2",h3:"h3",p:"p",...(0,i.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.A,{message:"Parachain Slot Auctions and Crowdloans will be deprecated right after [Agile Coretime](./learn-agile-coretime) is activated on the network. For existing parachains, the remainder of the lease will automatically be converted to coretime. See more information [here](./learn-agile-coretime#implementation)."}),"\n",(0,r.jsx)(a.h2,{id:"general",children:"General"}),"\n",(0,r.jsx)(a.h3,{id:"what-is-parachain-consensus",children:'What is "parachain consensus"?'}),"\n",(0,r.jsx)(a.p,{children:'"Parachain consensus" is special in that it will follow the relay chain. Parachains cannot use other\nconsensus algorithms that provide their own finality. Only sovereign chains (that must bridge to the\nrelay chain via a parachain) can control their own consensus. Parachains have control over how\nblocks are authored and by whom. The relay chain guarantees valid state transitions. Executing a\nblock finality outside the context of the relay chain is outside the scope of trust that the relay\nchain provides.'}),"\n",(0,r.jsx)(a.h3,{id:"how-about-parachains-that-are-not-substrate-based",children:"How about parachains that are not Substrate-based?"}),"\n",(0,r.jsxs)(a.p,{children:["Substrate provides ",(0,r.jsx)(a.a,{href:"https://docs.substrate.io/main-docs/fundamentals/runtime-intro/",children:"FRAME Pallets"}),"\nas part of its framework to seamlessly build a rustic-based blockchain. Part of FRAME are pallets\nthat can be used for consensus. Polkadot, being a Substrate-based chain, relies on BABE as the block\nproduction scheme and GRANDPA as the finality gadget as part of its consensus mechanism.\nCollectively, this is a ",(0,r.jsx)(a.a,{href:"/docs/learn-consensus#hybrid-consensus",children:"Hybrid Consensus Model"}),", where block\nproduction and block finality are separate. Parachains only need to produce blocks as they can rely\non the relay chain to validate the state transitions. Thus, parachains can have their own block\nproduction where the ",(0,r.jsx)(a.a,{href:"/docs/learn-collator",children:"collators"})," act as the block producers, even if the\nparachain is not Substrate-based."]}),"\n",(0,r.jsx)(a.h3,{id:"is-100-a-hard-limit-on-the-number-of-parachains-that-can-be-supported",children:"Is 100 a hard limit on the number of Parachains that can be supported?"}),"\n",(0,r.jsxs)(a.p,{children:["No. The network went through a significant number of optimizations, and there are\n",(0,r.jsx)(a.a,{href:"https://polkadot.network/blog/polkadot-roadmap-roundup/",children:"several updates planned"})," in the near\nfuture. The exact number of parachains that the relay chain can support without any degradation in\nperformance is yet to be discovered. Also, with the\n",(0,r.jsx)(a.a,{href:"https://www.rob.tech/polkadot-blockspace-over-blockchains/",children:"blockspace over blockchains"})," paradigm\nwhich brings on-demand parachains into the picture, there is no hard limit number on the number of\nblockchains that can be supported by the relay chain."]}),"\n",(0,r.jsx)(a.h3,{id:"what-happens-to-parachains-when-the-number-of-validators-drops-below-a-certain-threshold",children:"What happens to parachains when the number of validators drops below a certain threshold?"}),"\n",(0,r.jsxs)(a.p,{children:["The minimal safe ratio of validators per parachain is 5:1. With a sufficiently large set of\nvalidators, the randomness of their distribution along with\n",(0,r.jsx)(a.a,{href:"/docs/learn-parachains-protocol#anv-protocol",children:"availability and validity"})," will make sure security is\non-par. However, should there be a big outage of a popular cloud provider or another network\nconnectivity catastrophe, it is reasonable to expect that the number of validators per chain will\ndrop."]}),"\n",(0,r.jsx)(a.p,{children:"Depending on how many validators went offline, the outcome differs."}),"\n",(0,r.jsx)(a.p,{children:"If a few validators went offline, the parachains whose validator groups are too small to validate a\nblock will skip those blocks. Their block production speed will slow down to an increment of six\nseconds until the situation is resolved and the optimal number of validators is in that parachain's\nvalidator group again."}),"\n",(0,r.jsx)(a.p,{children:"If anywhere from 30% to 50% of the validators go offline, availability will suffer because we need\ntwo-thirds of the validator set to back the parachain candidates. In other words, all parachains\nwill stop until the situation is resolved. Finality will also stop, but low-value transactions on\nthe relay chain should be safe enough to execute, despite common forks. Once the required number of\nvalidators are in the validator set again, parachains will resume block production."}),"\n",(0,r.jsxs)(a.p,{children:["Given that collators are full nodes of the relay chain and the parachain they are running, they will\nbe able to recognize a disruption as soon as it occurs and should stop producing block candidates.\nLikewise, it should be easy for them to recognize when it's safe to restart block production -\nperhaps based on finality delay, validator set size or some other factor that is yet to be decided\nwithin ",(0,r.jsx)(a.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/cumulus",children:"Cumulus"}),"."]}),"\n",(0,r.jsx)(a.h3,{id:"parachain-development-kits-pdks",children:"Parachain Development Kits (PDKs)"}),"\n",(0,r.jsxs)(a.p,{children:["Parachain Development Kits are a set of tools that enable developers to create their own\napplications as parachains. For more information, see the PDK\ncontent](../build/build-parachains.md#parachain-development-kit-pdk) and\n",(0,r.jsx)(a.a,{href:"/docs/build-pdk",children:"Parachain Development page"}),"."]}),"\n",(0,r.jsx)(a.h2,{id:"security",children:"Security"}),"\n",(0,r.jsx)(a.h3,{id:"is-security-correlated-to-the-number-of-validators-what-about-the-number-of-parachains",children:"Is security correlated to the number of validators? What about the number of parachains?"}),"\n",(0,r.jsx)(a.p,{children:"Security is independent of the number of parachains that are connected to the Polkadot relay chain.\nThe correlation of security and the number of validators exists as the higher number of validators\nwill give the network stronger decentralization properties and make it harder to try to take down.\nHowever, the biggest indicator of the security of the network is the economic signal of the number\nof DOT that are bonded and staked. The greater the number of DOT staked by honest validators and\nnominators, the higher the minimum amount of DOT an attacker would need to acquire a validator slot."}),"\n",(0,r.jsx)(a.h3,{id:"in-what-scenarios-do-parachains-need-their-own-security",children:"In what scenarios do parachains need their own security?"}),"\n",(0,r.jsx)(a.p,{children:"Most parachains will not need to worry about their own security, since all state transitions will be\nsecured by the Polkadot relay chain validator set. However, in some cases (which are considered more\nexperimental), parachains may require their own security. In general, these cases will revolve\naround lack of data available to relay chain validators."}),"\n",(0,r.jsxs)(a.p,{children:["One example is if the state transition function is some succinct or zero-knowledge proof, the\nparachain would be responsible for keeping its data available as the relay chain won't have it.\nAdditionally, for chains with their own consensus, like the one that enables fast payments on\n",(0,r.jsx)(a.a,{href:"https://www.youtube.com/watch?v=sf5GMDlG7Uk",children:"Blink Network"}),", there would probably need to be a\nByzantine agreement between stakers before a parachain block is valid. The agreement would be\nnecessary because the data associated with the fast consensus would be unknown to relay chain\nvalidators."]})]})}function u(e={}){const{wrapper:a}={...(0,i.R)(),...e.components};return a?(0,r.jsx)(a,{...e,children:(0,r.jsx)(d,{...e})}):d(e)}},67141:(e,a,t)=>{t.d(a,{A:()=>i});var n=t(96540),r=t(74848);const i=function(e){var a,t=e.message,i=(0,n.useState)(!0),o=i[0],s=i[1];return(0,r.jsx)(r.Fragment,{children:o&&(0,r.jsxs)("div",{className:"message-box",children:[(0,r.jsx)("button",{className:"close-button",onClick:function(){s(!1)},children:"\u2716 "}),(0,r.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(a=t,a.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},28453:(e,a,t)=>{t.d(a,{R:()=>o,x:()=>s});var n=t(96540);const r={},i=n.createContext(r);function o(e){const a=n.useContext(i);return n.useMemo((function(){return"function"==typeof e?e(a):{...a,...e}}),[a,e])}function s(e){let a;return a=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:o(e.components),n.createElement(i.Provider,{value:a},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/bea375d6.3cd623d5.js b/assets/js/bea375d6.3cd623d5.js new file mode 100644 index 000000000000..4774db2b9176 --- /dev/null +++ b/assets/js/bea375d6.3cd623d5.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4938],{85374:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>d,contentTitle:()=>i,default:()=>c,frontMatter:()=>o,metadata:()=>t,toc:()=>l});const t=JSON.parse('{"id":"general/grants","title":"Grants Program","description":"The Grant Programs in the Polkadot Ecosystem.","source":"@site/../docs/general/grants.md","sourceDirName":"general","slug":"/grants","permalink":"/docs/grants","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/grants.md","tags":[],"version":"current","lastUpdatedBy":"bader y","lastUpdatedAt":1724438822000,"frontMatter":{"id":"grants","title":"Grants Program","sidebar_label":"Grants","description":"The Grant Programs in the Polkadot Ecosystem.","keywords":["grants program","grants","funding"],"slug":"../grants"},"sidebar":"docs","previous":{"title":"Funding","permalink":"/docs/funding"},"next":{"title":"Decentralized Futures","permalink":"/docs/decentralized-futures"}}');var a=r(74848),s=r(28453);const o={id:"grants",title:"Grants Program",sidebar_label:"Grants",description:"The Grant Programs in the Polkadot Ecosystem.",keywords:["grants program","grants","funding"],slug:"../grants"},i=void 0,d={},l=[{value:"Web3 Foundation Grants",id:"web3-foundation-grants",level:2},{value:"Alternative Funding Sources",id:"alternative-funding-sources",level:2},{value:"Polkadot Treasury",id:"polkadot-treasury",level:3},{value:"Other Grant Programs",id:"other-grant-programs",level:3}];function h(e){const n={a:"a",admonition:"admonition",h2:"h2",h3:"h3",li:"li",p:"p",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.admonition,{title:"Decentralized Futures Program",type:"info",children:(0,a.jsxs)(n.p,{children:["In addition to the listed grants programs, the Web3 Foundation has launched the ",(0,a.jsx)(n.strong,{children:"Decentralized\nFutures"})," program to support individuals and teams as they launch new initiatives aimed at growing\nthe Polkadot ecosystem. For details on the status of the program, see the\n",(0,a.jsx)(n.a,{href:"/docs/decentralized-futures",children:"Decentralized Futures Program"}),"."]})}),"\n",(0,a.jsx)(n.h2,{id:"web3-foundation-grants",children:"Web3 Foundation Grants"}),"\n",(0,a.jsxs)(n.p,{children:["Web3 Foundation offers grants for open source software development and research around Substrate,\nPolkadot, Kusama and ink!. Applications and deliveries are tracked transparently on GitHub.\nInformation regarding requirements, the application process, deliveries, etc. can be found on the\n",(0,a.jsx)(n.a,{href:"https://grants.web3.foundation/",children:"Grants Program website"}),". For guidance, there is also a list of\n",(0,a.jsx)(n.a,{href:"https://grants.web3.foundation/applications",children:"previously accepted applications"})," and a list of\n",(0,a.jsx)(n.a,{href:"https://grants.web3.foundation/docs/faq",children:"frequently asked questions"}),"."]}),"\n",(0,a.jsx)(n.h2,{id:"alternative-funding-sources",children:"Alternative Funding Sources"}),"\n",(0,a.jsx)(n.admonition,{type:"info",children:(0,a.jsxs)(n.p,{children:["Check the ",(0,a.jsx)(n.a,{href:"https://grants.web3.foundation/docs/funding",children:"alternative funding sources"})," section on the\nWeb3 Foundation Grants website for comprehensive information."]})}),"\n",(0,a.jsx)(n.h3,{id:"polkadot-treasury",children:"Polkadot Treasury"}),"\n",(0,a.jsxs)(n.p,{children:["The Polkadot Treasury is a pot of on-chain funds collected through transaction fees,\n",(0,a.jsx)(n.a,{href:"/docs/learn-offenses",children:"slashing"}),", staking inefficiencies, etc. The funds held in the treasury\ncan be spent on spending proposals. Both Polkadot and Kusama offer everyone the opportunity to apply\nfor funding via the treasury. See:"]}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"/docs/learn-polkadot-opengov-treasury",children:"Treasury Wiki"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"https://docs.google.com/document/d/1IZykdp2cyQavcRyZd_dgNj5DcgxgZR6kAqGdcNARu1w",children:"Polkadot Treasury Guide"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"https://docs.google.com/document/d/1p3UQUjph5t8TVaWnTkfrI5mE-BABnM9Xvtuhdlhl6JE",children:"Kusama Treasury Guide"})}),"\n"]}),"\n",(0,a.jsxs)(n.admonition,{title:"Kusama Faucet",type:"info",children:[(0,a.jsx)(n.p,{children:"Due to high demand and spamming issues, the Kusama faucet is no longer in operation. The Web3\nFoundation has considered new ways to distribute KSM for people who need KSM to build."}),(0,a.jsxs)(n.p,{children:["If you are interested in obtaining KSM for building or research, you can apply through the\n",(0,a.jsx)(n.a,{href:"/docs/learn-polkadot-opengov-treasury",children:"Treasury"})," or receive a\n",(0,a.jsx)(n.a,{href:"/docs/learn-polkadot-opengov-treasury#treasury-tracks",children:"tip"})," for doing something cool in the\ncommunity."]})]}),"\n",(0,a.jsx)(n.h3,{id:"other-grant-programs",children:"Other Grant Programs"}),"\n",(0,a.jsx)(n.p,{children:"Below is a list of other grant programs in the Polkadot/Substrate ecosystem."}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"https://acala.network/ecosystem-program",children:"Acala Grants Program"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"https://alephzero.org/ecosystem-funding-program",children:"Aleph Zero Funding Program"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"https://github.com/availproject/avail-uncharted/blob/main/grants/grants.md",children:"Avail Uncharted Grants"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"https://github.com/darwinia-network/collaboration/blob/master/grant/README.md#grant-program",children:"Darwinia Grants Program"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"https://futures.web3.foundation/",children:"Decentralized Futures Program"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"https://jam.web3.foundation/",children:"Decentralized JAM"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"https://gov.edgewa.re/discussion/1132-edgeware-proposal-process-and-template",children:"Edgeware Grants and Bounties"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"https://docs.hydradx.io/spending_fw/",children:"HydraDX Grants and Bounties"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"https://use.ink/ubator/",children:"ink!ubator"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"https://github.com/kodadot/grants/discussions/2",children:"KodaDot RFPs"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"https://moonbeam.foundation/grants/",children:"Moonbeam Grants Program"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"https://oak.tech/community/grants/",children:"OAK\u2019s Developer Grants"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"https://www.peaq.network/grant-program",children:"peaq Ecosystem Grant Program"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"https://pendulumchain.org/ecosystem-grant",children:"Pendulum / Amplitude Grant Programs"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"https://wiki.phala.network/en-us/build/general/builders-program/",children:"Phala Builders Program"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"https://polkadotassurance.com/",children:"Polkadot Assurance Legion"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"https://pioneersprize.polkadot.network/",children:"Polkadot Pioneers Prize"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"https://subquery.network/grants",children:"SubQuery Grants Programme"})}),"\n"]})]})}function c(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(h,{...e})}):h(e)}},28453:(e,n,r)=>{r.d(n,{R:()=>o,x:()=>i});var t=r(96540);const a={},s=t.createContext(a);function o(e){const n=t.useContext(s);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:o(e.components),t.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/bea375d6.b5676a7a.js b/assets/js/bea375d6.b5676a7a.js deleted file mode 100644 index 46ffb844cd6f..000000000000 --- a/assets/js/bea375d6.b5676a7a.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4938],{4907:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>d,contentTitle:()=>o,default:()=>c,frontMatter:()=>s,metadata:()=>i,toc:()=>l});var t=r(74848),a=r(28453);const s={id:"grants",title:"Grants Program",sidebar_label:"Grants",description:"The Grant Programs in the Polkadot Ecosystem.",keywords:["grants program","grants","funding"],slug:"../grants"},o=void 0,i={id:"general/grants",title:"Grants Program",description:"The Grant Programs in the Polkadot Ecosystem.",source:"@site/../docs/general/grants.md",sourceDirName:"general",slug:"/grants",permalink:"/docs/grants",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/grants.md",tags:[],version:"current",lastUpdatedBy:"bader y",lastUpdatedAt:1724438822e3,frontMatter:{id:"grants",title:"Grants Program",sidebar_label:"Grants",description:"The Grant Programs in the Polkadot Ecosystem.",keywords:["grants program","grants","funding"],slug:"../grants"},sidebar:"docs",previous:{title:"Funding",permalink:"/docs/funding"},next:{title:"Decentralized Futures",permalink:"/docs/decentralized-futures"}},d={},l=[{value:"Web3 Foundation Grants",id:"web3-foundation-grants",level:2},{value:"Alternative Funding Sources",id:"alternative-funding-sources",level:2},{value:"Polkadot Treasury",id:"polkadot-treasury",level:3},{value:"Other Grant Programs",id:"other-grant-programs",level:3}];function h(e){const n={a:"a",admonition:"admonition",h2:"h2",h3:"h3",li:"li",p:"p",strong:"strong",ul:"ul",...(0,a.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.admonition,{title:"Decentralized Futures Program",type:"info",children:(0,t.jsxs)(n.p,{children:["In addition to the listed grants programs, the Web3 Foundation has launched the ",(0,t.jsx)(n.strong,{children:"Decentralized\nFutures"})," program to support individuals and teams as they launch new initiatives aimed at growing\nthe Polkadot ecosystem. For details on the status of the program, see the\n",(0,t.jsx)(n.a,{href:"/docs/decentralized-futures",children:"Decentralized Futures Program"}),"."]})}),"\n",(0,t.jsx)(n.h2,{id:"web3-foundation-grants",children:"Web3 Foundation Grants"}),"\n",(0,t.jsxs)(n.p,{children:["Web3 Foundation offers grants for open source software development and research around Substrate,\nPolkadot, Kusama and ink!. Applications and deliveries are tracked transparently on GitHub.\nInformation regarding requirements, the application process, deliveries, etc. can be found on the\n",(0,t.jsx)(n.a,{href:"https://grants.web3.foundation/",children:"Grants Program website"}),". For guidance, there is also a list of\n",(0,t.jsx)(n.a,{href:"https://grants.web3.foundation/applications",children:"previously accepted applications"})," and a list of\n",(0,t.jsx)(n.a,{href:"https://grants.web3.foundation/docs/faq",children:"frequently asked questions"}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"alternative-funding-sources",children:"Alternative Funding Sources"}),"\n",(0,t.jsx)(n.admonition,{type:"info",children:(0,t.jsxs)(n.p,{children:["Check the ",(0,t.jsx)(n.a,{href:"https://grants.web3.foundation/docs/funding",children:"alternative funding sources"})," section on the\nWeb3 Foundation Grants website for comprehensive information."]})}),"\n",(0,t.jsx)(n.h3,{id:"polkadot-treasury",children:"Polkadot Treasury"}),"\n",(0,t.jsxs)(n.p,{children:["The Polkadot Treasury is a pot of on-chain funds collected through transaction fees,\n",(0,t.jsx)(n.a,{href:"/docs/learn-offenses",children:"slashing"}),", staking inefficiencies, etc. The funds held in the treasury\ncan be spent on spending proposals. Both Polkadot and Kusama offer everyone the opportunity to apply\nfor funding via the treasury. See:"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"/docs/learn-polkadot-opengov-treasury",children:"Treasury Wiki"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://docs.google.com/document/d/1IZykdp2cyQavcRyZd_dgNj5DcgxgZR6kAqGdcNARu1w",children:"Polkadot Treasury Guide"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://docs.google.com/document/d/1p3UQUjph5t8TVaWnTkfrI5mE-BABnM9Xvtuhdlhl6JE",children:"Kusama Treasury Guide"})}),"\n"]}),"\n",(0,t.jsxs)(n.admonition,{title:"Kusama Faucet",type:"info",children:[(0,t.jsx)(n.p,{children:"Due to high demand and spamming issues, the Kusama faucet is no longer in operation. The Web3\nFoundation has considered new ways to distribute KSM for people who need KSM to build."}),(0,t.jsxs)(n.p,{children:["If you are interested in obtaining KSM for building or research, you can apply through the\n",(0,t.jsx)(n.a,{href:"/docs/learn-polkadot-opengov-treasury",children:"Treasury"})," or receive a\n",(0,t.jsx)(n.a,{href:"/docs/learn-polkadot-opengov-treasury#treasury-tracks",children:"tip"})," for doing something cool in the\ncommunity."]})]}),"\n",(0,t.jsx)(n.h3,{id:"other-grant-programs",children:"Other Grant Programs"}),"\n",(0,t.jsx)(n.p,{children:"Below is a list of other grant programs in the Polkadot/Substrate ecosystem."}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://acala.network/ecosystem-program",children:"Acala Grants Program"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://alephzero.org/ecosystem-funding-program",children:"Aleph Zero Funding Program"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://github.com/availproject/avail-uncharted/blob/main/grants/grants.md",children:"Avail Uncharted Grants"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://github.com/darwinia-network/collaboration/blob/master/grant/README.md#grant-program",children:"Darwinia Grants Program"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://futures.web3.foundation/",children:"Decentralized Futures Program"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://jam.web3.foundation/",children:"Decentralized JAM"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://gov.edgewa.re/discussion/1132-edgeware-proposal-process-and-template",children:"Edgeware Grants and Bounties"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://docs.hydradx.io/spending_fw/",children:"HydraDX Grants and Bounties"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://use.ink/ubator/",children:"ink!ubator"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://github.com/kodadot/grants/discussions/2",children:"KodaDot RFPs"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://moonbeam.foundation/grants/",children:"Moonbeam Grants Program"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://oak.tech/community/grants/",children:"OAK\u2019s Developer Grants"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://www.peaq.network/grant-program",children:"peaq Ecosystem Grant Program"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://pendulumchain.org/ecosystem-grant",children:"Pendulum / Amplitude Grant Programs"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://wiki.phala.network/en-us/build/general/builders-program/",children:"Phala Builders Program"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://polkadotassurance.com/",children:"Polkadot Assurance Legion"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://pioneersprize.polkadot.network/",children:"Polkadot Pioneers Prize"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://subquery.network/grants",children:"SubQuery Grants Programme"})}),"\n"]})]})}function c(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(h,{...e})}):h(e)}},28453:(e,n,r)=>{r.d(n,{R:()=>o,x:()=>i});var t=r(96540);const a={},s=t.createContext(a);function o(e){const n=t.useContext(s);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:o(e.components),t.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/bf3ab9de.19765894.js b/assets/js/bf3ab9de.19765894.js deleted file mode 100644 index a2ab70e8ac88..000000000000 --- a/assets/js/bf3ab9de.19765894.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2389],{75753:(e,r,t)=>{t.r(r),t.d(r,{assets:()=>c,contentTitle:()=>o,default:()=>p,frontMatter:()=>i,metadata:()=>u,toc:()=>d});var n=t(74848),a=t(28453),s=(t(11470),t(19365),t(3514)),l=t(67141);const i={id:"learn-guides-bridges",title:"Polkadot-JS Guides about Bridge Hub",sidebar_label:"Bridge Hub Guides",description:"Polkadot-JS Guides about the Bridge Hub.",keywords:["Bridge","XCM","Bridge Hub","polkadot-js"],slug:"../learn-guides-bridges"},o=void 0,u={id:"learn/learn-guides-bridges",title:"Polkadot-JS Guides about Bridge Hub",description:"Polkadot-JS Guides about the Bridge Hub.",source:"@site/../docs/learn/learn-guides-bridges.md",sourceDirName:"learn",slug:"/learn-guides-bridges",permalink:"/docs/learn-guides-bridges",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-bridges.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1729847256e3,frontMatter:{id:"learn-guides-bridges",title:"Polkadot-JS Guides about Bridge Hub",sidebar_label:"Bridge Hub Guides",description:"Polkadot-JS Guides about the Bridge Hub.",keywords:["Bridge","XCM","Bridge Hub","polkadot-js"],slug:"../learn-guides-bridges"},sidebar:"docs",previous:{title:"Asset Conversion Tutorials",permalink:"/docs/learn-guides-asset-conversion"},next:{title:"DOT <> KSM Bridge",permalink:"/docs/learn-guides-dot-ksm-bridge"}},c={},d=[];function f(e){return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the Polkadot-JS UI, you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,n.jsx)(s.A,{})]})}function p(e={}){const{wrapper:r}={...(0,a.R)(),...e.components};return r?(0,n.jsx)(r,{...e,children:(0,n.jsx)(f,{...e})}):f()}},67141:(e,r,t)=>{t.d(r,{A:()=>s});var n=t(96540),a=t(74848);const s=function(e){var r,t=e.message,s=(0,n.useState)(!0),l=s[0],i=s[1];return(0,a.jsx)(a.Fragment,{children:l&&(0,a.jsxs)("div",{className:"message-box",children:[(0,a.jsx)("button",{className:"close-button",onClick:function(){i(!1)},children:"\u2716 "}),(0,a.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(r=t,r.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},3514:(e,r,t)=>{t.d(r,{A:()=>v});t(96540);var n=t(34164),a=t(26972),s=t(28774),l=t(53465),i=t(16654),o=t(21312),u=t(51107);const c={cardContainer:"cardContainer_fWXF",cardTitle:"cardTitle_rnsV",cardDescription:"cardDescription_PWke"};var d=t(74848);function f(e){var r=e.href,t=e.children;return(0,d.jsx)(s.A,{href:r,className:(0,n.A)("card padding--lg",c.cardContainer),children:t})}function p(e){var r=e.href,t=e.icon,a=e.title,s=e.description;return(0,d.jsxs)(f,{href:r,children:[(0,d.jsxs)(u.A,{as:"h2",className:(0,n.A)("text--truncate",c.cardTitle),title:a,children:[t," ",a]}),s&&(0,d.jsx)("p",{className:(0,n.A)("text--truncate",c.cardDescription),title:s,children:s})]})}function m(e){var r,t,n=e.item,s=(0,a.Nr)(n),i=(t=(0,l.W)().selectMessage,function(e){return t(e,(0,o.T)({message:"1 item|{count} items",id:"theme.docs.DocCard.categoryDescription.plurals",description:"The default description for a category card in the generated index about how many items this category includes"},{count:e}))});return s?(0,d.jsx)(p,{href:s,icon:"\ud83d\uddc3\ufe0f",title:n.label,description:null!=(r=n.description)?r:i(n.items.length)}):null}function h(e){var r,t,n=e.item,s=(0,i.A)(n.href)?"\ud83d\udcc4\ufe0f":"\ud83d\udd17",l=(0,a.cC)(null!=(r=n.docId)?r:void 0);return(0,d.jsx)(p,{href:n.href,icon:s,title:n.label,description:null!=(t=n.description)?t:null==l?void 0:l.description})}function b(e){var r=e.item;switch(r.type){case"link":return(0,d.jsx)(h,{item:r});case"category":return(0,d.jsx)(m,{item:r});default:throw new Error("unknown item type "+JSON.stringify(r))}}function g(e){var r=e.className,t=(0,a.$S)();return(0,d.jsx)(v,{items:t.items,className:r})}function v(e){var r=e.items,t=e.className;if(!r)return(0,d.jsx)(g,Object.assign({},e));var s=(0,a.d1)(r);return(0,d.jsx)("section",{className:(0,n.A)("row",t),children:s.map((function(e,r){return(0,d.jsx)("article",{className:"col col--6 margin-bottom--lg",children:(0,d.jsx)(b,{item:e})},r)}))})}},19365:(e,r,t)=>{t.d(r,{A:()=>l});t(96540);var n=t(34164);const a={tabItem:"tabItem_Ymn6"};var s=t(74848);function l(e){var r=e.children,t=e.hidden,l=e.className;return(0,s.jsx)("div",{role:"tabpanel",className:(0,n.A)(a.tabItem,l),hidden:t,children:r})}},11470:(e,r,t)=>{t.d(r,{A:()=>k});var n=t(96540),a=t(34164),s=t(23104),l=t(56347),i=t(205),o=t(57485),u=t(31682),c=t(75376);function d(e){var r,t;return null!=(r=null==(t=n.Children.toArray(e).filter((function(e){return"\n"!==e})).map((function(e){if(!e||(0,n.isValidElement)(e)&&((r=e.props)&&"object"==typeof r&&"value"in r))return e;var r;throw new Error("Docusaurus error: Bad child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:t.filter(Boolean))?r:[]}function f(e){var r=e.values,t=e.children;return(0,n.useMemo)((function(){var e=null!=r?r:function(e){return d(e).map((function(e){var r=e.props;return{value:r.value,label:r.label,attributes:r.attributes,default:r.default}}))}(t);return function(e){var r=(0,u.XI)(e,(function(e,r){return e.value===r.value}));if(r.length>0)throw new Error('Docusaurus error: Duplicate values "'+r.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[r,t])}function p(e){var r=e.value;return e.tabValues.some((function(e){return e.value===r}))}function m(e){var r=e.queryString,t=void 0!==r&&r,a=e.groupId,s=(0,l.W6)(),i=function(e){var r=e.queryString,t=void 0!==r&&r,n=e.groupId;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=n?n:null}({queryString:t,groupId:a});return[(0,o.aZ)(i),(0,n.useCallback)((function(e){if(i){var r=new URLSearchParams(s.location.search);r.set(i,e),s.replace(Object.assign({},s.location,{search:r.toString()}))}}),[i,s])]}function h(e){var r,t,a,s,l=e.defaultValue,o=e.queryString,u=void 0!==o&&o,d=e.groupId,h=f(e),b=(0,n.useState)((function(){return function(e){var r,t=e.defaultValue,n=e.tabValues;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!p({value:t,tabValues:n}))throw new Error('Docusaurus error: The has a defaultValue "'+t+'" but none of its children has the corresponding value. Available values are: '+n.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return t}var a=null!=(r=n.find((function(e){return e.default})))?r:n[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:l,tabValues:h})})),g=b[0],v=b[1],x=m({queryString:u,groupId:d}),y=x[0],j=x[1],k=(r=function(e){return e?"docusaurus.tab."+e:null}({groupId:d}.groupId),t=(0,c.Dv)(r),a=t[0],s=t[1],[a,(0,n.useCallback)((function(e){r&&s.set(e)}),[r,s])]),w=k[0],A=k[1],I=function(){var e=null!=y?y:w;return p({value:e,tabValues:h})?e:null}();return(0,i.A)((function(){I&&v(I)}),[I]),{selectedValue:g,selectValue:(0,n.useCallback)((function(e){if(!p({value:e,tabValues:h}))throw new Error("Can't select invalid tab value="+e);v(e),j(e),A(e)}),[j,A,h]),tabValues:h}}var b=t(92303);const g={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var v=t(74848);function x(e){var r=e.className,t=e.block,n=e.selectedValue,l=e.selectValue,i=e.tabValues,o=[],u=(0,s.a_)().blockElementScrollPositionUntilNextRender,c=function(e){var r=e.currentTarget,t=o.indexOf(r),a=i[t].value;a!==n&&(u(r),l(a))},d=function(e){var r,t=null;switch(e.key){case"Enter":c(e);break;case"ArrowRight":var n,a=o.indexOf(e.currentTarget)+1;t=null!=(n=o[a])?n:o[0];break;case"ArrowLeft":var s,l=o.indexOf(e.currentTarget)-1;t=null!=(s=o[l])?s:o[o.length-1]}null==(r=t)||r.focus()};return(0,v.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,a.A)("tabs",{"tabs--block":t},r),children:i.map((function(e){var r=e.value,t=e.label,s=e.attributes;return(0,v.jsx)("li",Object.assign({role:"tab",tabIndex:n===r?0:-1,"aria-selected":n===r,ref:function(e){return o.push(e)},onKeyDown:d,onClick:c},s,{className:(0,a.A)("tabs__item",g.tabItem,null==s?void 0:s.className,{"tabs__item--active":n===r}),children:null!=t?t:r}),r)}))})}function y(e){var r=e.lazy,t=e.children,s=e.selectedValue,l=(Array.isArray(t)?t:[t]).filter(Boolean);if(r){var i=l.find((function(e){return e.props.value===s}));return i?(0,n.cloneElement)(i,{className:(0,a.A)("margin-top--md",i.props.className)}):null}return(0,v.jsx)("div",{className:"margin-top--md",children:l.map((function(e,r){return(0,n.cloneElement)(e,{key:r,hidden:e.props.value!==s})}))})}function j(e){var r=h(e);return(0,v.jsxs)("div",{className:(0,a.A)("tabs-container",g.tabList),children:[(0,v.jsx)(x,Object.assign({},r,e)),(0,v.jsx)(y,Object.assign({},r,e))]})}function k(e){var r=(0,b.A)();return(0,v.jsx)(j,Object.assign({},e,{children:d(e.children)}),String(r))}},53465:(e,r,t)=>{t.d(r,{W:()=>u});var n=t(96540),a=t(44586),s=["zero","one","two","few","many","other"];function l(e){return s.filter((function(r){return e.includes(r)}))}var i={locale:"en",pluralForms:l(["one","other"]),select:function(e){return 1===e?"one":"other"}};function o(){var e=(0,a.A)().i18n.currentLocale;return(0,n.useMemo)((function(){try{return r=e,t=new Intl.PluralRules(r),{locale:r,pluralForms:l(t.resolvedOptions().pluralCategories),select:function(e){return t.select(e)}}}catch(n){return console.error('Failed to use Intl.PluralRules for locale "'+e+'".\nDocusaurus will fallback to the default (English) implementation.\nError: '+n.message+"\n"),i}var r,t}),[e])}function u(){var e=o();return{selectMessage:function(r,t){return function(e,r,t){var n=e.split("|");if(1===n.length)return n[0];n.length>t.pluralForms.length&&console.error("For locale="+t.locale+", a maximum of "+t.pluralForms.length+" plural forms are expected ("+t.pluralForms.join(",")+"), but the message contains "+n.length+": "+e);var a=t.select(r),s=t.pluralForms.indexOf(a);return n[Math.min(s,n.length-1)]}(t,r,e)}}}},28453:(e,r,t)=>{t.d(r,{R:()=>l,x:()=>i});var n=t(96540);const a={},s=n.createContext(a);function l(e){const r=n.useContext(s);return n.useMemo((function(){return"function"==typeof e?e(r):{...r,...e}}),[r,e])}function i(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:l(e.components),n.createElement(s.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/bf3ab9de.b3a434b4.js b/assets/js/bf3ab9de.b3a434b4.js new file mode 100644 index 000000000000..b685e26a0368 --- /dev/null +++ b/assets/js/bf3ab9de.b3a434b4.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2389],{4543:(e,r,t)=>{t.r(r),t.d(r,{assets:()=>c,contentTitle:()=>u,default:()=>p,frontMatter:()=>i,metadata:()=>n,toc:()=>d});const n=JSON.parse('{"id":"learn/learn-guides-bridges","title":"Polkadot-JS Guides about Bridge Hub","description":"Polkadot-JS Guides about the Bridge Hub.","source":"@site/../docs/learn/learn-guides-bridges.md","sourceDirName":"learn","slug":"/learn-guides-bridges","permalink":"/docs/learn-guides-bridges","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-bridges.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1729847256000,"frontMatter":{"id":"learn-guides-bridges","title":"Polkadot-JS Guides about Bridge Hub","sidebar_label":"Bridge Hub Guides","description":"Polkadot-JS Guides about the Bridge Hub.","keywords":["Bridge","XCM","Bridge Hub","polkadot-js"],"slug":"../learn-guides-bridges"},"sidebar":"docs","previous":{"title":"Asset Conversion Tutorials","permalink":"/docs/learn-guides-asset-conversion"},"next":{"title":"DOT <> KSM Bridge","permalink":"/docs/learn-guides-dot-ksm-bridge"}}');var a=t(74848),s=t(28453),l=(t(11470),t(19365),t(3514)),o=t(67141);const i={id:"learn-guides-bridges",title:"Polkadot-JS Guides about Bridge Hub",sidebar_label:"Bridge Hub Guides",description:"Polkadot-JS Guides about the Bridge Hub.",keywords:["Bridge","XCM","Bridge Hub","polkadot-js"],slug:"../learn-guides-bridges"},u=void 0,c={},d=[];function f(e){return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(o.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the Polkadot-JS UI, you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,a.jsx)(l.A,{})]})}function p(e={}){const{wrapper:r}={...(0,s.R)(),...e.components};return r?(0,a.jsx)(r,{...e,children:(0,a.jsx)(f,{...e})}):f()}},67141:(e,r,t)=>{t.d(r,{A:()=>s});var n=t(96540),a=t(74848);const s=function(e){var r,t=e.message,s=(0,n.useState)(!0),l=s[0],o=s[1];return(0,a.jsx)(a.Fragment,{children:l&&(0,a.jsxs)("div",{className:"message-box",children:[(0,a.jsx)("button",{className:"close-button",onClick:function(){o(!1)},children:"\u2716 "}),(0,a.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(r=t,r.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},3514:(e,r,t)=>{t.d(r,{A:()=>v});t(96540);var n=t(34164),a=t(26972),s=t(28774),l=t(53465),o=t(16654),i=t(21312),u=t(51107);const c={cardContainer:"cardContainer_fWXF",cardTitle:"cardTitle_rnsV",cardDescription:"cardDescription_PWke"};var d=t(74848);function f(e){var r=e.href,t=e.children;return(0,d.jsx)(s.A,{href:r,className:(0,n.A)("card padding--lg",c.cardContainer),children:t})}function p(e){var r=e.href,t=e.icon,a=e.title,s=e.description;return(0,d.jsxs)(f,{href:r,children:[(0,d.jsxs)(u.A,{as:"h2",className:(0,n.A)("text--truncate",c.cardTitle),title:a,children:[t," ",a]}),s&&(0,d.jsx)("p",{className:(0,n.A)("text--truncate",c.cardDescription),title:s,children:s})]})}function m(e){var r,t,n=e.item,s=(0,a.Nr)(n),o=(t=(0,l.W)().selectMessage,function(e){return t(e,(0,i.T)({message:"1 item|{count} items",id:"theme.docs.DocCard.categoryDescription.plurals",description:"The default description for a category card in the generated index about how many items this category includes"},{count:e}))});return s?(0,d.jsx)(p,{href:s,icon:"\ud83d\uddc3\ufe0f",title:n.label,description:null!=(r=n.description)?r:o(n.items.length)}):null}function h(e){var r,t,n=e.item,s=(0,o.A)(n.href)?"\ud83d\udcc4\ufe0f":"\ud83d\udd17",l=(0,a.cC)(null!=(r=n.docId)?r:void 0);return(0,d.jsx)(p,{href:n.href,icon:s,title:n.label,description:null!=(t=n.description)?t:null==l?void 0:l.description})}function b(e){var r=e.item;switch(r.type){case"link":return(0,d.jsx)(h,{item:r});case"category":return(0,d.jsx)(m,{item:r});default:throw new Error("unknown item type "+JSON.stringify(r))}}function g(e){var r=e.className,t=(0,a.$S)();return(0,d.jsx)(v,{items:t.items,className:r})}function v(e){var r=e.items,t=e.className;if(!r)return(0,d.jsx)(g,Object.assign({},e));var s=(0,a.d1)(r);return(0,d.jsx)("section",{className:(0,n.A)("row",t),children:s.map((function(e,r){return(0,d.jsx)("article",{className:"col col--6 margin-bottom--lg",children:(0,d.jsx)(b,{item:e})},r)}))})}},19365:(e,r,t)=>{t.d(r,{A:()=>l});t(96540);var n=t(34164);const a={tabItem:"tabItem_Ymn6"};var s=t(74848);function l(e){var r=e.children,t=e.hidden,l=e.className;return(0,s.jsx)("div",{role:"tabpanel",className:(0,n.A)(a.tabItem,l),hidden:t,children:r})}},11470:(e,r,t)=>{t.d(r,{A:()=>k});var n=t(96540),a=t(34164),s=t(23104),l=t(56347),o=t(205),i=t(57485),u=t(31682),c=t(75376);function d(e){var r,t;return null!=(r=null==(t=n.Children.toArray(e).filter((function(e){return"\n"!==e})).map((function(e){if(!e||(0,n.isValidElement)(e)&&((r=e.props)&&"object"==typeof r&&"value"in r))return e;var r;throw new Error("Docusaurus error: Bad child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:t.filter(Boolean))?r:[]}function f(e){var r=e.values,t=e.children;return(0,n.useMemo)((function(){var e=null!=r?r:function(e){return d(e).map((function(e){var r=e.props;return{value:r.value,label:r.label,attributes:r.attributes,default:r.default}}))}(t);return function(e){var r=(0,u.XI)(e,(function(e,r){return e.value===r.value}));if(r.length>0)throw new Error('Docusaurus error: Duplicate values "'+r.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[r,t])}function p(e){var r=e.value;return e.tabValues.some((function(e){return e.value===r}))}function m(e){var r=e.queryString,t=void 0!==r&&r,a=e.groupId,s=(0,l.W6)(),o=function(e){var r=e.queryString,t=void 0!==r&&r,n=e.groupId;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=n?n:null}({queryString:t,groupId:a});return[(0,i.aZ)(o),(0,n.useCallback)((function(e){if(o){var r=new URLSearchParams(s.location.search);r.set(o,e),s.replace(Object.assign({},s.location,{search:r.toString()}))}}),[o,s])]}function h(e){var r,t,a,s,l=e.defaultValue,i=e.queryString,u=void 0!==i&&i,d=e.groupId,h=f(e),b=(0,n.useState)((function(){return function(e){var r,t=e.defaultValue,n=e.tabValues;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!p({value:t,tabValues:n}))throw new Error('Docusaurus error: The has a defaultValue "'+t+'" but none of its children has the corresponding value. Available values are: '+n.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return t}var a=null!=(r=n.find((function(e){return e.default})))?r:n[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:l,tabValues:h})})),g=b[0],v=b[1],x=m({queryString:u,groupId:d}),y=x[0],j=x[1],k=(r=function(e){return e?"docusaurus.tab."+e:null}({groupId:d}.groupId),t=(0,c.Dv)(r),a=t[0],s=t[1],[a,(0,n.useCallback)((function(e){r&&s.set(e)}),[r,s])]),w=k[0],A=k[1],N=function(){var e=null!=y?y:w;return p({value:e,tabValues:h})?e:null}();return(0,o.A)((function(){N&&v(N)}),[N]),{selectedValue:g,selectValue:(0,n.useCallback)((function(e){if(!p({value:e,tabValues:h}))throw new Error("Can't select invalid tab value="+e);v(e),j(e),A(e)}),[j,A,h]),tabValues:h}}var b=t(92303);const g={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var v=t(74848);function x(e){var r=e.className,t=e.block,n=e.selectedValue,l=e.selectValue,o=e.tabValues,i=[],u=(0,s.a_)().blockElementScrollPositionUntilNextRender,c=function(e){var r=e.currentTarget,t=i.indexOf(r),a=o[t].value;a!==n&&(u(r),l(a))},d=function(e){var r,t=null;switch(e.key){case"Enter":c(e);break;case"ArrowRight":var n,a=i.indexOf(e.currentTarget)+1;t=null!=(n=i[a])?n:i[0];break;case"ArrowLeft":var s,l=i.indexOf(e.currentTarget)-1;t=null!=(s=i[l])?s:i[i.length-1]}null==(r=t)||r.focus()};return(0,v.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,a.A)("tabs",{"tabs--block":t},r),children:o.map((function(e){var r=e.value,t=e.label,s=e.attributes;return(0,v.jsx)("li",Object.assign({role:"tab",tabIndex:n===r?0:-1,"aria-selected":n===r,ref:function(e){return i.push(e)},onKeyDown:d,onClick:c},s,{className:(0,a.A)("tabs__item",g.tabItem,null==s?void 0:s.className,{"tabs__item--active":n===r}),children:null!=t?t:r}),r)}))})}function y(e){var r=e.lazy,t=e.children,s=e.selectedValue,l=(Array.isArray(t)?t:[t]).filter(Boolean);if(r){var o=l.find((function(e){return e.props.value===s}));return o?(0,n.cloneElement)(o,{className:(0,a.A)("margin-top--md",o.props.className)}):null}return(0,v.jsx)("div",{className:"margin-top--md",children:l.map((function(e,r){return(0,n.cloneElement)(e,{key:r,hidden:e.props.value!==s})}))})}function j(e){var r=h(e);return(0,v.jsxs)("div",{className:(0,a.A)("tabs-container",g.tabList),children:[(0,v.jsx)(x,Object.assign({},r,e)),(0,v.jsx)(y,Object.assign({},r,e))]})}function k(e){var r=(0,b.A)();return(0,v.jsx)(j,Object.assign({},e,{children:d(e.children)}),String(r))}},53465:(e,r,t)=>{t.d(r,{W:()=>u});var n=t(96540),a=t(44586),s=["zero","one","two","few","many","other"];function l(e){return s.filter((function(r){return e.includes(r)}))}var o={locale:"en",pluralForms:l(["one","other"]),select:function(e){return 1===e?"one":"other"}};function i(){var e=(0,a.A)().i18n.currentLocale;return(0,n.useMemo)((function(){try{return r=e,t=new Intl.PluralRules(r),{locale:r,pluralForms:l(t.resolvedOptions().pluralCategories),select:function(e){return t.select(e)}}}catch(n){return console.error('Failed to use Intl.PluralRules for locale "'+e+'".\nDocusaurus will fallback to the default (English) implementation.\nError: '+n.message+"\n"),o}var r,t}),[e])}function u(){var e=i();return{selectMessage:function(r,t){return function(e,r,t){var n=e.split("|");if(1===n.length)return n[0];n.length>t.pluralForms.length&&console.error("For locale="+t.locale+", a maximum of "+t.pluralForms.length+" plural forms are expected ("+t.pluralForms.join(",")+"), but the message contains "+n.length+": "+e);var a=t.select(r),s=t.pluralForms.indexOf(a);return n[Math.min(s,n.length-1)]}(t,r,e)}}}},28453:(e,r,t)=>{t.d(r,{R:()=>l,x:()=>o});var n=t(96540);const a={},s=n.createContext(a);function l(e){const r=n.useContext(s);return n.useMemo((function(){return"function"==typeof e?e(r):{...r,...e}}),[r,e])}function o(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:l(e.components),n.createElement(s.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/c07c2447.7ab126e0.js b/assets/js/c07c2447.7ab126e0.js deleted file mode 100644 index 7d58ade5ed2a..000000000000 --- a/assets/js/c07c2447.7ab126e0.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7561],{572:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>r,default:()=>p,frontMatter:()=>a,metadata:()=>l,toc:()=>c});var o=t(74848),i=t(28453),s=t(67141);const a={id:"learn-guides-polkadot-opengov",title:"Polkadot-JS Guides about OpenGov",sidebar_label:"OpenGov Guides",description:"Polkadot-JS Guides about Polkadot OpenGov.",keywords:["opengov","polkadot opengov","referenda","cancel","polkadot-js"],slug:"../learn-guides-polkadot-opengov"},r=void 0,l={id:"learn/learn-guides-polkadot-opengov",title:"Polkadot-JS Guides about OpenGov",description:"Polkadot-JS Guides about Polkadot OpenGov.",source:"@site/../docs/learn/learn-guides-polkadot-opengov.md",sourceDirName:"learn",slug:"/learn-guides-polkadot-opengov",permalink:"/docs/learn-guides-polkadot-opengov",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-polkadot-opengov.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1729847256e3,frontMatter:{id:"learn-guides-polkadot-opengov",title:"Polkadot-JS Guides about OpenGov",sidebar_label:"OpenGov Guides",description:"Polkadot-JS Guides about Polkadot OpenGov.",keywords:["opengov","polkadot opengov","referenda","cancel","polkadot-js"],slug:"../learn-guides-polkadot-opengov"},sidebar:"docs",previous:{title:"Nomination Pool Guides",permalink:"/docs/learn-guides-staking-pools"},next:{title:"Treasury Guides",permalink:"/docs/learn-guides-treasury"}},d={},c=[{value:"Create a Referenda Proposal",id:"create-a-referenda-proposal",level:2},{value:"Submitting a Preimage",id:"submitting-a-preimage",level:3},{value:"Submitting a Proposal",id:"submitting-a-proposal",level:3},{value:"Submitting a Referendum on the Whitelisted Caller Track",id:"submitting-a-referendum-on-the-whitelisted-caller-track",level:3},{value:"Voting on Referenda",id:"voting-on-referenda",level:2},{value:"Removing Votes",id:"removing-votes",level:3},{value:"Removing Expired Voting Locks",id:"removing-expired-voting-locks",level:3},{value:"Delegations",id:"delegations",level:2},{value:"Delegate Votes",id:"delegate-votes",level:3},{value:"Undelegate Votes",id:"undelegate-votes",level:3},{value:"Remove Expired Locks from Delegations",id:"remove-expired-locks-from-delegations",level:3},{value:"Modify your Delegations",id:"modify-your-delegations",level:3},{value:"Claiming OpenGov Deposits",id:"claiming-opengov-deposits",level:2},{value:"Claiming the Preimage and Decision Deposits",id:"claiming-the-preimage-and-decision-deposits",level:3},{value:"Claiming the Referendum Submission Deposit",id:"claiming-the-referendum-submission-deposit",level:3},{value:"Cancel or Kill a Referendum",id:"cancel-or-kill-a-referendum",level:2},{value:"Interpreting On-Chain Voting Data",id:"interpreting-on-chain-voting-data",level:2}];function h(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",li:"li",ol:"ol",p:"p",pre:"pre",ul:"ul",...(0,i.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(s.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the Polkadot-JS UI, you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,o.jsxs)(n.p,{children:["See ",(0,o.jsx)(n.a,{href:"/docs/learn-polkadot-opengov",children:"this page"})," to learn about Polkadot OpenGov."]}),"\n",(0,o.jsx)(n.p,{children:"This guide will instruct token holders how to propose and vote on public referenda using the\nReferenda module (OpenGov). Below are a few links to stay informed and directly engage with the\ncommunity."}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.a,{href:"https://matrix.to/#/#Polkadot-Direction:parity.io",children:"Polkadot Direction"})," - a place to discuss\ngovernance and the future of Polkadot."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.a,{href:"https://matrix.to/#/#Kusama-Direction:parity.io",children:"Kusama Direction"})," - a place to discuss\ngovernance and the future of Kusama."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.a,{href:"https://polkadot.polkassembly.io",children:"Polkadot"})," and ",(0,o.jsx)(n.a,{href:"https://kusama.polkassembly.io",children:"Kusama"}),"\nPolkassembly - for current referenda, latest proposals, motions, treasury proposals, tips,\nbounties, and more."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.a,{href:"https://matrix.to/#/#dailydigest:web3.foundation",children:"Polkadot Daily Digest"})," - News about what is\nhappening in the Polkadot ecosystem, published every weekday except holidays."]}),"\n"]}),"\n",(0,o.jsx)(n.h2,{id:"create-a-referenda-proposal",children:"Create a Referenda Proposal"}),"\n",(0,o.jsxs)(n.p,{children:['Before submitting a referendum, identify the right track and origin for it. For instance, if the\nreferendum is for requesting funds from treasury, select the treasury track with appropriate spend\nlimits. If the referendum is for a suggestion to make changes to the protocol, select the "Wish for\nChange" track. For more info, check the\n',(0,o.jsx)(n.a,{href:"/docs/learn-polkadot-opengov#origins-and-tracks",children:"tracks and origins"})," of Polkadot OpenGov."]}),"\n",(0,o.jsx)(n.h3,{id:"submitting-a-preimage",children:"Submitting a Preimage"}),"\n",(0,o.jsx)(n.p,{children:"The act of creating a proposal is split from submitting the preimage for the proposal since the\nstorage cost of submitting a large preimage could be expensive. Allowing the preimage submission to\ncome as a separate transaction means that another account could submit the preimage for you and pay\nthe fee. The example below demonstrates the creation of a preimage to propose and approve a spend of\ntreasury funds."}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"submit preimage",src:t(79087).A+"",width:"2148",height:"1191"})}),"\n",(0,o.jsx)(n.p,{children:"Follow the steps below to submit a preimage as shown in the screenshot above."}),"\n",(0,o.jsxs)(n.ol,{children:["\n",(0,o.jsx)(n.li,{children:"Navigate to Governance -> Referenda."}),"\n",(0,o.jsx)(n.li,{children:'Click on the "Add preimage" button.'}),"\n",(0,o.jsxs)(n.li,{children:["From the ",(0,o.jsx)(n.em,{children:"propose"})," drop-down field, select ",(0,o.jsx)(n.code,{children:"treasury"}),"."]}),"\n",(0,o.jsxs)(n.li,{children:["From the unlabeled drop-down field to the right of the ",(0,o.jsx)(n.em,{children:"propose"})," drop-down field, select\n",(0,o.jsx)(n.code,{children:"spendLocal(amount, beneficiary)"}),"."]}),"\n",(0,o.jsxs)(n.li,{children:["In the ",(0,o.jsx)(n.code,{children:"amount: Compact (BalanceOf)"})," text field, enter the spend amount in\n",(0,o.jsx)(n.a,{href:"/docs/learn-DOT#the-planck-unit",children:"plancks"}),"."]}),"\n",(0,o.jsxs)(n.li,{children:["The ",(0,o.jsx)(n.code,{children:"beneficiary: MultiAddress (AccountIdLookupOf)"})," drop-down field will have ",(0,o.jsx)(n.code,{children:"Id"})," selected by\ndefault. Select the beneficiary from the ",(0,o.jsx)(n.code,{children:"Id: AccountId"})," drop-down field."]}),"\n"]}),"\n",(0,o.jsx)(n.admonition,{type:"info",children:(0,o.jsxs)(n.p,{children:["Copy the ",(0,o.jsx)(n.code,{children:"preimage hash"}),' value before clicking the "Submit preimage" button.']})}),"\n",(0,o.jsxs)(n.ol,{start:"7",children:["\n",(0,o.jsx)(n.li,{children:'Click the "Submit preimage" button.'}),"\n"]}),"\n",(0,o.jsx)(n.p,{children:"After the preimage is submitted successfully on-chain, Polkadot-JS UI lists it under the tab of\nGovernance -> Preimages."}),"\n",(0,o.jsx)(n.h3,{id:"submitting-a-proposal",children:"Submitting a Proposal"}),"\n",(0,o.jsx)(n.p,{children:'Submitting a proposal requires you to bond some tokens. On Polkadot-JS UI, you can navigate to the\nGovernance -> Referenda to make a new proposal. In order to submit a proposal, you will need to\nsubmit what\'s called the preimage hash. The preimage hash is simply the hash of the proposal to be\nenacted. The easiest way to get the preimage hash is by clicking on the "Submit preimage" button as\nshown in the previous section.'}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"submit proposal",src:t(60849).A+"",width:"1936",height:"1118"})}),"\n",(0,o.jsx)(n.p,{children:"The proposal will be registered from the account selected and the balance lock will be applied to\nit. An appropriate origin must be chosen, as each origin has different privileges, and acceptance\ncriteria. After entering the hash of the preimage for the proposal, the preimage length field is\nautomatically populated. The enactment delay can be specified either as a block number, or as a\nspecific number of blocks after the referendum is approved. The deposit for this proposal will be\nlocked for the referendum duration."}),"\n",(0,o.jsx)(n.h3,{id:"submitting-a-referendum-on-the-whitelisted-caller-track",children:"Submitting a Referendum on the Whitelisted Caller Track"}),"\n",(0,o.jsxs)(n.p,{children:["Let's consider increasing the number of validators participating in parachain consensus. You could\n",(0,o.jsx)(n.a,{href:"#submitting-a-preimage",children:"submit a preimage"})," with the call that sets the number of validators to\n1,000 and submit a referendum to the Root track directly. However, this requires a large decision\ndeposit and has very conservative passing parameters such that it will probably need the entire\n28-day voting period to pass."]}),"\n",(0,o.jsx)(n.p,{children:"Operations that are deemed safe or time critical by the Polkadot Technical Fellowship can use the\nWhitelisted Caller track. This track requires less turnout in the first half of the decision period\nso that it can pass more quickly. This track is typically used for more neutral, technical proposals\nlike runtime upgrades or changing the system's parachain validation configuration."}),"\n",(0,o.jsxs)(n.p,{children:["Using the Whitelisted Caller track requires some special calls. Submitting a referendum in the same\nform as other tracks will not work. Namely, rather than voting on a particular ",(0,o.jsx)(n.code,{children:"proposal"}),", the\nWhitelisted Caller track requires a vote to ",(0,o.jsx)(n.code,{children:"dispatch"})," the ",(0,o.jsx)(n.code,{children:"proposal"})," via the Whitelist pallet.\nBefore opening a referendum on this track, you should also attempt to get a positive signal from the\nFellowship that they will whitelist the proposal. If they do not, then even if the public referendum\npasses, it will not execute."]}),"\n",(0,o.jsx)(n.p,{children:"Below are the steps to follow when submitting a proposal to the Whitelist track."}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.a,{href:"#submitting-a-preimage",children:"Submit a preimage"})," with the call to ",(0,o.jsx)(n.em,{children:"dispatch"})," the proposal (",(0,o.jsx)(n.code,{children:"call"}),") you\nwant to submit -- ",(0,o.jsx)(n.code,{children:"whitelist.dispatchWhitelistedCallWithPreimage(call)"})," -- and obtain the preimage\nhash. This is the preimage for the ",(0,o.jsx)(n.em,{children:"public referendum"})," on the Whitelisted Caller track."]}),"\n"]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"preimage-whitelist",src:t(56985).A+"",width:"2146",height:"1113"})}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["Obtain the hash of ",(0,o.jsx)(n.code,{children:"call"}),". The Polkadot Fellowship needs to start a Fellowship referendum to\nwhitelist the call with ",(0,o.jsx)(n.code,{children:"whitelist.whitelistCall(callHash)"}),". The Fellowship referendum gets voted\non by the Polkadot Fellowship members only."]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"call-hash",src:t(36585).A+"",width:"2257",height:"858"})}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsx)(n.p,{children:"The public now votes on the referendum. Someone must place a decision deposit to go into the\ndeciding phase."}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsx)(n.p,{children:"Once passed, it gets enacted successfully as long as the call has been whitelisted by the\nFellowship."}),"\n"]}),"\n"]}),"\n",(0,o.jsx)(n.p,{children:"Note that the public referendum and Fellowship referendum can happen simultaneously. However, if the\nFellowship does not whitelist the call, you must submit it directly to the Root origin."}),"\n",(0,o.jsx)(n.h2,{id:"voting-on-referenda",children:"Voting on Referenda"}),"\n",(0,o.jsx)(n.p,{children:"As Polkadot OpenGov takes both the approval and support into account, there are four options to\nchoose from when voting on a referendum:"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"Aye"}),"\n",(0,o.jsx)(n.li,{children:"Nay"}),"\n",(0,o.jsx)(n.li,{children:"Split"}),"\n",(0,o.jsx)(n.li,{children:"Abstain"}),"\n"]}),"\n",(0,o.jsx)(n.p,{children:"Also, you have to specify the conviction multiplier for this vote. The longer you are willing to\nlock your tokens, the stronger your vote will be weighted. Unwillingness to lock your tokens means\nthat your vote only counts for 10% of the tokens that you hold."}),"\n",(0,o.jsxs)(n.p,{children:["For detailed instructions on how to vote on Polkadot OpenGov referenda, check\n",(0,o.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000184120-polkadot-opengov-how-to-vote",children:"this support guide."})]}),"\n",(0,o.jsx)(n.admonition,{title:"Polkadot OpenGov uses Conviction Voting Pallet (Not Democracy Pallet)",type:"caution",children:(0,o.jsxs)(n.p,{children:["Use ",(0,o.jsx)(n.code,{children:"convictionVoting.vote"})," for voting on Referenda in Polkadot OpenGov instead of ",(0,o.jsx)(n.code,{children:"democracy.vote"}),"\n(which only works for the old version of governance)."]})}),"\n",(0,o.jsx)(n.h3,{id:"removing-votes",children:"Removing Votes"}),"\n",(0,o.jsxs)(n.p,{children:["To remove votes, you need to use the ",(0,o.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/extrinsics",children:"Extrinsics tab"})," and\ncall the ",(0,o.jsx)(n.code,{children:"removeVote"})," function through the ",(0,o.jsx)(n.code,{children:"convictionVoting"})," pallet."]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"rm-vote",src:t(36894).A+"",width:"2388",height:"594"})}),"\n",(0,o.jsxs)(n.p,{children:["The ",(0,o.jsx)(n.code,{children:"class"})," is the ",(0,o.jsx)(n.a,{href:"/docs/learn-polkadot-opengov-origins",children:"OpenGov track"})," of the referendum you voted\non and the ",(0,o.jsx)(n.code,{children:"index"})," is the referendum number."]}),"\n",(0,o.jsx)(n.h3,{id:"removing-expired-voting-locks",children:"Removing Expired Voting Locks"}),"\n",(0,o.jsxs)(n.p,{children:["To remove an expired lock, you need to use the\n",(0,o.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/extrinsics",children:"Extrinsics tab"})," and call the ",(0,o.jsx)(n.code,{children:"unlock"})," function through\nthe ",(0,o.jsx)(n.code,{children:"convictionVoting"})," pallet. Note that if you voted on referenda in multiple tracks, the tokens\nwill be unlocked after removing votes and unlocking on all the tracks. Similarly, if you you\n",(0,o.jsx)(n.a,{href:"#delegations",children:"delegated"})," on multiple tracks, the funds will be unlocked after\n",(0,o.jsx)(n.a,{href:"#undelegate-votes",children:"undelegating"})," and unlocking on all the tracks."]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"rm-voting-lock",src:t(82187).A+"",width:"2382",height:"684"})}),"\n",(0,o.jsxs)(n.p,{children:["The ",(0,o.jsx)(n.code,{children:"class"})," is the ",(0,o.jsx)(n.a,{href:"/docs/learn-polkadot-opengov-origins",children:"OpenGov track"})," where you have the lock."]}),"\n",(0,o.jsxs)(n.p,{children:["For additional instructions, check\n",(0,o.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000184129-polkadot-js-ui-how-to-remove-expired-referenda-locks",children:"this support guide."})]}),"\n",(0,o.jsx)(n.h2,{id:"delegations",children:"Delegations"}),"\n",(0,o.jsx)(n.admonition,{title:"Video Tutorial about Delegations using the Polkadot-JS UI",type:"info",children:(0,o.jsxs)(n.p,{children:["See ",(0,o.jsx)(n.a,{href:"https://youtu.be/PNGs11EvCB0",children:"this video tutorial"})," to learn about how to delegate, modify\ndelegations and remove delegations using the Polkadot-JS UI."]})}),"\n",(0,o.jsxs)(n.p,{children:["For an overview of how delegation works in Polkadot OpenGov, check out the\n",(0,o.jsx)(n.a,{href:"/docs/learn-polkadot-opengov#multirole-delegation",children:"Multirole Delegation"})," section on the\n",(0,o.jsx)(n.a,{href:"/docs/learn-polkadot-opengov",children:"Learn Polkadot OpenGov"})," page."]}),"\n",(0,o.jsxs)(n.p,{children:["Instructions to do delegations with Polkadot-JS are also available on the\n",(0,o.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000184776-polkadot-js-ui-how-to-delegate-your-voting-power-on-polkadot-opengov",children:"Support Pages"}),"."]}),"\n",(0,o.jsx)(n.h3,{id:"delegate-votes",children:"Delegate Votes"}),"\n",(0,o.jsxs)(n.p,{children:['You can start delegating your votes by clicking the "Delegate" button on\n',(0,o.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/referenda",children:"Governance > Referenda"}),"."]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"js-delegation-start",src:t(28577).A+"",width:"1055",height:"497"})}),"\n",(0,o.jsxs)(n.p,{children:["If it is the first time you delegate or vote, there will be a banner message. You can delegate on a\nsingle track or all the tracks. You have an option to specify the number of votes (i.e., the number\nof tokens) and the ",(0,o.jsx)(n.a,{href:"/docs/learn-polkadot-opengov#voluntary-locking",children:"conviction multiplier"}),'. After\nclicking "Next", you will need to specify the account to delegate your votes to, and after clicking\n"Delegate" and "Sign and Submit" your delegations will appear for each track (see below).']}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"js-delegation-allTracks",src:t(87236).A+"",width:"2116",height:"1438"})}),"\n",(0,o.jsx)(n.p,{children:"Note that if you want to delegate just a few tracks, you have two options:"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:'Repeat the process using the "Delegate" button multiple times'}),"\n",(0,o.jsxs)(n.li,{children:["Issue a batch call with multiple ",(0,o.jsx)(n.code,{children:"convictionVoting.delegate"})," extrinsics under\n",(0,o.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/extrinsics",children:"Developer > Extrinsics"})]}),"\n"]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"js-delegation-delegate",src:t(44176).A+"",width:"2694",height:"1104"})}),"\n",(0,o.jsx)(n.p,{children:'By clicking on "Add item" you can add new extrinsics for multiple tracks.'}),"\n",(0,o.jsx)(n.h3,{id:"undelegate-votes",children:"Undelegate Votes"}),"\n",(0,o.jsxs)(n.p,{children:['The "Delegate" button on ',(0,o.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/referenda",children:"Governance > Referenda"})," is only\nfor delegating votes. You cannot undelegate or modify your delegations. If you wish to undelegate,\nyou will need to go to ",(0,o.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/extrinsics",children:"Developer > Extrinsics"})," and\nsubmit a ",(0,o.jsx)(n.code,{children:"convictionVoting.undelegate"})," extrinsic, specifying the track you wish to undelegate."]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"js-delegation-undelegate",src:t(99829).A+"",width:"2708",height:"632"})}),"\n",(0,o.jsx)(n.p,{children:'Undelegated tracks will show up as "0 votes" on the Delegate tab.'}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"js-delegation-undelegate",src:t(38981).A+"",width:"2128",height:"1432"})}),"\n",(0,o.jsx)(n.p,{children:"After you undelegated, the conviction lock will start the countdown, and your funds will be\navailable for unlocking after the countdown ends."}),"\n",(0,o.jsx)(n.h3,{id:"remove-expired-locks-from-delegations",children:"Remove Expired Locks from Delegations"}),"\n",(0,o.jsxs)(n.p,{children:["To remove expired locks from delegations, you can\n",(0,o.jsx)(n.a,{href:"#removing-expired-voting-locks",children:"follow the same procedure as how to remove expired voting locks"}),"."]}),"\n",(0,o.jsx)(n.h3,{id:"modify-your-delegations",children:"Modify your Delegations"}),"\n",(0,o.jsxs)(n.p,{children:['The "Delegate" button on ',(0,o.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/referenda",children:"Governance > Referenda"})," is only\nfor delegating votes. You cannot undelegate or modify your delegations. If you wish to update the\ndelegated account, the conviction, and the number of votes you will need to go to\n",(0,o.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/extrinsics",children:"Developer > Extrinsics"}),", ",(0,o.jsx)(n.a,{href:"#undelegate-votes",children:"undelegate"}),"\nthe track and ",(0,o.jsx)(n.a,{href:"#delegate-votes",children:"delegate"})," again with updated information."]}),"\n",(0,o.jsx)(n.h2,{id:"claiming-opengov-deposits",children:"Claiming OpenGov Deposits"}),"\n",(0,o.jsx)(n.admonition,{title:"Video Tutorial about OpenGov deposits using the Polkadot-JS UI",type:"info",children:(0,o.jsxs)(n.p,{children:["See ",(0,o.jsx)(n.a,{href:"https://youtu.be/kkEq5cqW2Pk",children:"this video tutorial"})," to learn about how to claim OpenGov deposits\nusing the Polkadot-JS UI."]})}),"\n",(0,o.jsx)(n.h3,{id:"claiming-the-preimage-and-decision-deposits",children:"Claiming the Preimage and Decision Deposits"}),"\n",(0,o.jsxs)(n.p,{children:["After a referendum finishes its life cycle (and gets approved or rejected or timed out), the\npreimage and decision deposits can be claimed. For claiming the preimage deposit, navigate to\n",(0,o.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/preimages",children:"Polkadot-JS UI > Governance > Preimages"})," and click on\nunnote button shown on the preimage you submitted."]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"Claim Preimage Deposit",src:t(43214).A+"",width:"2828",height:"362"})}),"\n",(0,o.jsxs)(n.p,{children:["Similarly, to claim the decision deposit, navigate to\n",(0,o.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/referenda",children:"Polkadot-JS UI > Governance > Referenda"})," and scroll down\nto the end of the page to click on the referenda with the decision deposit and claim it."]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"Claim Referendum Deposits",src:t(22450).A+"",width:"2830",height:"444"})}),"\n",(0,o.jsx)(n.h3,{id:"claiming-the-referendum-submission-deposit",children:"Claiming the Referendum Submission Deposit"}),"\n",(0,o.jsxs)(n.p,{children:["The submission deposit for a referendum can be claimed\n",(0,o.jsxs)(n.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/cfb29254f74412cea35e8048d8aea94bc789fcb1/substrate/frame/referenda/src/types.rs#L261",children:["only if the referendum was ",(0,o.jsx)(n.code,{children:"Approved"})," or ",(0,o.jsx)(n.code,{children:"Canceled"})]}),".\nThe submission deposit can be claimed by issuing the ",(0,o.jsx)(n.code,{children:"refundSubmissionDeposit"})," extrinsic."]}),"\n",(0,o.jsxs)(n.p,{children:["Users can not refund their submission deposit while the referendum is ",(0,o.jsx)(n.code,{children:"Ongoing"})," or ",(0,o.jsx)(n.code,{children:"Rejected"}),".\nSimilarly, users cannot refund their submission deposit if the proposal has ",(0,o.jsx)(n.code,{children:"TimedOut"})," (failing to\nsubmit the decision deposit\n",(0,o.jsx)(n.a,{href:"/docs/chain-state-values#opengov-referendum-timeout",children:"within specific period"})," will lead to a\nreferendum timeout). This behavior exists so that users can refrain from spamming the chain with\nproposals that have no interest from the community. If a proposal is in the ",(0,o.jsx)(n.code,{children:"TimedOut"})," state, any\nuser can call ",(0,o.jsx)(n.code,{children:"slash_proposal_deposit"}),", which will move the funds from the user to a\nruntime-configured account, like the treasury."]}),"\n",(0,o.jsxs)(n.p,{children:["To refund your slashed deposit, you can start a new referendum and specifically request a refund\nfrom the treasury. You need to make sure you have enough balance for a new submission and decision\ndeposit, and you will need to select the right track to ask for a refund. For example, the\n",(0,o.jsx)(n.a,{href:"/docs/learn-polkadot-opengov-origins#small-tipper",children:"Small Tipper Track"})," would be fine for any kind of\ndeposit refund up to 250 DOT (8.25 KSM on Kusama)."]}),"\n",(0,o.jsx)(n.h2,{id:"cancel-or-kill-a-referendum",children:"Cancel or Kill a Referendum"}),"\n",(0,o.jsxs)(n.admonition,{type:"info",children:[(0,o.jsxs)(n.p,{children:["Anybody can cancel an ongoing referendum (i.e., a referendum within the Lead-in or\nvoting/confirmation period). For more information about the referenda timeline in Polkadot OpenGov,\nsee the ",(0,o.jsx)(n.a,{href:"/docs/learn-polkadot-opengov#referenda-timeline",children:"dedicated page"}),"."]}),(0,o.jsxs)(n.p,{children:["To successfully cancel a referendum through the track ",(0,o.jsx)(n.code,{children:"20 / Referendum Canceller"}),", you will need to\nattain\n",(0,o.jsx)(n.a,{href:"/docs/learn-polkadot-opengov-origins#referendum-canceller",children:"specific approval and support levels"}),"."]})]}),"\n",(0,o.jsxs)(n.p,{children:["To cancel a referendum, you need first to submit a preimage with the ",(0,o.jsx)(n.code,{children:"referenda.cancel"})," extrinsic.\nGo to the ",(0,o.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/referenda",children:"Polkadot-JS UI > Governance > Referenda"}),' and\nclick on the "Add Preimage" button. You must specify the ',(0,o.jsx)(n.code,{children:"referenda.cancel"})," extrinsic with the index\nequal to the ongoing Referendum you wish to cancel. In the screenshot below, the Referendum to be\ncancelled is 249."]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"cancel-referenda-preimage-creation",src:t(53972).A+"",width:"2144",height:"944"})}),"\n",(0,o.jsxs)(n.p,{children:["This call will cancel the referendum and return the deposit. You can also kill a referendum using\nthe ",(0,o.jsx)(n.code,{children:"referenda.kill"})," extrinsic. This will cancel the referendum and slash the deposit."]}),"\n",(0,o.jsx)(n.admonition,{title:"Preimage Submission Deposit",type:"info",children:(0,o.jsx)(n.p,{children:"A deposit is required for the preimage to be stored on chain. The preimage deposit is proportional\nto the amount of information stored within the preimage. The deposit amount required for a preimage\nwith a treasury spend transaction is around 41 DOT (1.4 KSM on Kusama). Ensure you have enough\naccount balance to pay for this submission deposit as well as the transaction fees."})}),"\n",(0,o.jsxs)(n.p,{children:["Once a preimage is submitted, it can be checked under\n",(0,o.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/preimages",children:"Governance > Preimages"}),"."]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"cancel-referenda-preimage-check",src:t(50887).A+"",width:"2758",height:"190"})}),"\n",(0,o.jsxs)(n.p,{children:["You must copy the preimage to use it when you submit your proposal. To submit the proposal to cancel\nreferendum 249, for example, you need to go under\n",(0,o.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/referenda",children:"Governance > Referenda"}),' and click the "Submit Proposal"\nbutton.']}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"cancel-referenda-proposal",src:t(29860).A+"",width:"2130",height:"1226"})}),"\n",(0,o.jsxs)(n.p,{children:["You must specify the account to submit the proposal (this can differ from the account used to create\nthe preimage). Then you will need to specify the track ",(0,o.jsx)(n.code,{children:"20 / Referendum Canceller"})," and add the\npreimage hash containing the specific action that will be enacted if the referendum passes. Note\nthat a ",(0,o.jsx)(n.a,{href:"/docs/chain-state-values#opengov-submission-deposit",children:"submission deposit"})," will be\nreserved for submitting the proposal."]}),"\n",(0,o.jsxs)(n.p,{children:["Once the proposal has been submitted, it will stay in the Lead-in period until there is enough space\nwithin the track, and a\n",(0,o.jsx)(n.a,{href:"/docs/learn-polkadot-opengov-origins#polkadot-opengov-terminology-and-parameters",children:"track-dependent preparation period and decision deposit"}),"\nhave been met. Failing to submit the decision deposit will ultimately lead to a\n",(0,o.jsx)(n.a,{href:"/docs/chain-state-values#opengov-referendum-timeout",children:"referendum timeout"}),"."]}),"\n",(0,o.jsx)(n.h2,{id:"interpreting-on-chain-voting-data",children:"Interpreting On-Chain Voting Data"}),"\n",(0,o.jsx)(n.p,{children:"Below is the numeric conversion of the type of vote and conviction displayed in a block explorer."}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{children:"Nay 0.1x => 0\nNay 1x => 1\nNay 2x => 2\nNay 3x => 3\nNay 4x => 4\nNay 5x => 5\nNay 6x => 6\n\nAye 0.1x => 128\nAye 1x => 129\nAye 2x => 130\nAye 3x => 131\nAye 4x => 132\nAye 5x => 133\nAye 6x => 134\n"})}),"\n",(0,o.jsxs)(n.p,{children:["Take, for example, the information provided for\n",(0,o.jsx)(n.a,{href:"https://kusama.subscan.io/extrinsic/22460598-2",children:"this vote"}),". The vote ",(0,o.jsx)(n.code,{children:"131"})," means the account voted\nAye with 3x conviction."]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"vote_numeric_conversion",src:t(71685).A+"",width:"870",height:"255"})}),"\n",(0,o.jsx)(n.p,{children:'At first glance, it may not be easy to interpret what you voted on. We need to take a step back and\nconsider the "voting data" at the binary level.'}),"\n",(0,o.jsx)(n.p,{children:"The vote is stored as a byte using a bitfield data structure and displayed on the block explorer as\na decimal integer. The bitfield stores both the conviction and aye/nay boolean, where the boolean is\nrepresented using the MSB of the byte. This would mean that the seven remaining bits are grouped to\nstore the conviction."})]})}function p(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(h,{...e})}):h(e)}},67141:(e,n,t)=>{t.d(n,{A:()=>s});var o=t(96540),i=t(74848);const s=function(e){var n,t=e.message,s=(0,o.useState)(!0),a=s[0],r=s[1];return(0,i.jsx)(i.Fragment,{children:a&&(0,i.jsxs)("div",{className:"message-box",children:[(0,i.jsx)("button",{className:"close-button",onClick:function(){r(!1)},children:"\u2716 "}),(0,i.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(n=t,n.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},50887:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/cancel-referenda-preimage-check-45ef7f984450113a2b1a87e9e2751d69.png"},53972:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/cancel-referenda-preimage-creation-3923463db47aec298f74a426dba23166.png"},29860:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/cancel-referenda-proposal-b9c5e90784ec8216360053d8bda84980.png"},43214:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/claim-preimage-deposit-069843b91eba35d4829b237b59ab2d12.png"},22450:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/claim-referendum-decision-deposit-6352bbad189dac6fe7a651b5a3c8f5a5.png"},36585:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/encoded-call-hash-4e0347923993beea4d12d5a787649f8f.png"},56985:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/opengov-submit-preimage-whitelist-67d383745b6e7b3ef31a37567e044e80.png"},60849:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/opengov-submit-proposal-0c82b35f3f7b1d9e66130a621b76c44b.png"},87236:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/js-delegation-allTracks-788efa580f296aa78b65b77691570181.png"},44176:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/js-delegation-delegate-3bcce735bcc35b831079cd44ad0eef15.png"},28577:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/js-delegation-start-c8186f8875fd402b993abfd5ab09f515.png"},99829:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/js-delegation-undelegate-a5018d2ecd2d5523f711199cd6fa1e63.png"},38981:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/js-delegation-undelegated-9b5efde53d2016c4e4b1f0f6b651ecf5.png"},36894:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/rm-vote-8572ff30a00c8d6fe903fae7a39147f4.png"},82187:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/rm-voting-lock-214119c2fcfe92488190b321cdfe823a.png"},79087:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/OpenGov-Treasury-Preimage-SpendLocal-693c955b1e3e27bb6c98a6aad4d1b697.png"},71685:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/vote_numeric_conversion-6aef93a6fd1ea92beabfcbe058ac876b.png"},28453:(e,n,t)=>{t.d(n,{R:()=>a,x:()=>r});var o=t(96540);const i={},s=o.createContext(i);function a(e){const n=o.useContext(s);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:a(e.components),o.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/c07c2447.f9c4b937.js b/assets/js/c07c2447.f9c4b937.js new file mode 100644 index 000000000000..364fb936d7e8 --- /dev/null +++ b/assets/js/c07c2447.f9c4b937.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7561],{28794:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>l,default:()=>p,frontMatter:()=>r,metadata:()=>o,toc:()=>c});const o=JSON.parse('{"id":"learn/learn-guides-polkadot-opengov","title":"Polkadot-JS Guides about OpenGov","description":"Polkadot-JS Guides about Polkadot OpenGov.","source":"@site/../docs/learn/learn-guides-polkadot-opengov.md","sourceDirName":"learn","slug":"/learn-guides-polkadot-opengov","permalink":"/docs/learn-guides-polkadot-opengov","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-polkadot-opengov.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1729847256000,"frontMatter":{"id":"learn-guides-polkadot-opengov","title":"Polkadot-JS Guides about OpenGov","sidebar_label":"OpenGov Guides","description":"Polkadot-JS Guides about Polkadot OpenGov.","keywords":["opengov","polkadot opengov","referenda","cancel","polkadot-js"],"slug":"../learn-guides-polkadot-opengov"},"sidebar":"docs","previous":{"title":"Nomination Pool Guides","permalink":"/docs/learn-guides-staking-pools"},"next":{"title":"Treasury Guides","permalink":"/docs/learn-guides-treasury"}}');var i=t(74848),s=t(28453),a=t(67141);const r={id:"learn-guides-polkadot-opengov",title:"Polkadot-JS Guides about OpenGov",sidebar_label:"OpenGov Guides",description:"Polkadot-JS Guides about Polkadot OpenGov.",keywords:["opengov","polkadot opengov","referenda","cancel","polkadot-js"],slug:"../learn-guides-polkadot-opengov"},l=void 0,d={},c=[{value:"Create a Referenda Proposal",id:"create-a-referenda-proposal",level:2},{value:"Submitting a Preimage",id:"submitting-a-preimage",level:3},{value:"Submitting a Proposal",id:"submitting-a-proposal",level:3},{value:"Submitting a Referendum on the Whitelisted Caller Track",id:"submitting-a-referendum-on-the-whitelisted-caller-track",level:3},{value:"Voting on Referenda",id:"voting-on-referenda",level:2},{value:"Removing Votes",id:"removing-votes",level:3},{value:"Removing Expired Voting Locks",id:"removing-expired-voting-locks",level:3},{value:"Delegations",id:"delegations",level:2},{value:"Delegate Votes",id:"delegate-votes",level:3},{value:"Undelegate Votes",id:"undelegate-votes",level:3},{value:"Remove Expired Locks from Delegations",id:"remove-expired-locks-from-delegations",level:3},{value:"Modify your Delegations",id:"modify-your-delegations",level:3},{value:"Claiming OpenGov Deposits",id:"claiming-opengov-deposits",level:2},{value:"Claiming the Preimage and Decision Deposits",id:"claiming-the-preimage-and-decision-deposits",level:3},{value:"Claiming the Referendum Submission Deposit",id:"claiming-the-referendum-submission-deposit",level:3},{value:"Cancel or Kill a Referendum",id:"cancel-or-kill-a-referendum",level:2},{value:"Interpreting On-Chain Voting Data",id:"interpreting-on-chain-voting-data",level:2}];function h(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",li:"li",ol:"ol",p:"p",pre:"pre",ul:"ul",...(0,s.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(a.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the Polkadot-JS UI, you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,i.jsxs)(n.p,{children:["See ",(0,i.jsx)(n.a,{href:"/docs/learn-polkadot-opengov",children:"this page"})," to learn about Polkadot OpenGov."]}),"\n",(0,i.jsx)(n.p,{children:"This guide will instruct token holders how to propose and vote on public referenda using the\nReferenda module (OpenGov). Below are a few links to stay informed and directly engage with the\ncommunity."}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.a,{href:"https://matrix.to/#/#Polkadot-Direction:parity.io",children:"Polkadot Direction"})," - a place to discuss\ngovernance and the future of Polkadot."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.a,{href:"https://matrix.to/#/#Kusama-Direction:parity.io",children:"Kusama Direction"})," - a place to discuss\ngovernance and the future of Kusama."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.a,{href:"https://polkadot.polkassembly.io",children:"Polkadot"})," and ",(0,i.jsx)(n.a,{href:"https://kusama.polkassembly.io",children:"Kusama"}),"\nPolkassembly - for current referenda, latest proposals, motions, treasury proposals, tips,\nbounties, and more."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.a,{href:"https://matrix.to/#/#dailydigest:web3.foundation",children:"Polkadot Daily Digest"})," - News about what is\nhappening in the Polkadot ecosystem, published every weekday except holidays."]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"create-a-referenda-proposal",children:"Create a Referenda Proposal"}),"\n",(0,i.jsxs)(n.p,{children:['Before submitting a referendum, identify the right track and origin for it. For instance, if the\nreferendum is for requesting funds from treasury, select the treasury track with appropriate spend\nlimits. If the referendum is for a suggestion to make changes to the protocol, select the "Wish for\nChange" track. For more info, check the\n',(0,i.jsx)(n.a,{href:"/docs/learn-polkadot-opengov#origins-and-tracks",children:"tracks and origins"})," of Polkadot OpenGov."]}),"\n",(0,i.jsx)(n.h3,{id:"submitting-a-preimage",children:"Submitting a Preimage"}),"\n",(0,i.jsx)(n.p,{children:"The act of creating a proposal is split from submitting the preimage for the proposal since the\nstorage cost of submitting a large preimage could be expensive. Allowing the preimage submission to\ncome as a separate transaction means that another account could submit the preimage for you and pay\nthe fee. The example below demonstrates the creation of a preimage to propose and approve a spend of\ntreasury funds."}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"submit preimage",src:t(79087).A+"",width:"2148",height:"1191"})}),"\n",(0,i.jsx)(n.p,{children:"Follow the steps below to submit a preimage as shown in the screenshot above."}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsx)(n.li,{children:"Navigate to Governance -> Referenda."}),"\n",(0,i.jsx)(n.li,{children:'Click on the "Add preimage" button.'}),"\n",(0,i.jsxs)(n.li,{children:["From the ",(0,i.jsx)(n.em,{children:"propose"})," drop-down field, select ",(0,i.jsx)(n.code,{children:"treasury"}),"."]}),"\n",(0,i.jsxs)(n.li,{children:["From the unlabeled drop-down field to the right of the ",(0,i.jsx)(n.em,{children:"propose"})," drop-down field, select\n",(0,i.jsx)(n.code,{children:"spendLocal(amount, beneficiary)"}),"."]}),"\n",(0,i.jsxs)(n.li,{children:["In the ",(0,i.jsx)(n.code,{children:"amount: Compact (BalanceOf)"})," text field, enter the spend amount in\n",(0,i.jsx)(n.a,{href:"/docs/learn-DOT#the-planck-unit",children:"plancks"}),"."]}),"\n",(0,i.jsxs)(n.li,{children:["The ",(0,i.jsx)(n.code,{children:"beneficiary: MultiAddress (AccountIdLookupOf)"})," drop-down field will have ",(0,i.jsx)(n.code,{children:"Id"})," selected by\ndefault. Select the beneficiary from the ",(0,i.jsx)(n.code,{children:"Id: AccountId"})," drop-down field."]}),"\n"]}),"\n",(0,i.jsx)(n.admonition,{type:"info",children:(0,i.jsxs)(n.p,{children:["Copy the ",(0,i.jsx)(n.code,{children:"preimage hash"}),' value before clicking the "Submit preimage" button.']})}),"\n",(0,i.jsxs)(n.ol,{start:"7",children:["\n",(0,i.jsx)(n.li,{children:'Click the "Submit preimage" button.'}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"After the preimage is submitted successfully on-chain, Polkadot-JS UI lists it under the tab of\nGovernance -> Preimages."}),"\n",(0,i.jsx)(n.h3,{id:"submitting-a-proposal",children:"Submitting a Proposal"}),"\n",(0,i.jsx)(n.p,{children:'Submitting a proposal requires you to bond some tokens. On Polkadot-JS UI, you can navigate to the\nGovernance -> Referenda to make a new proposal. In order to submit a proposal, you will need to\nsubmit what\'s called the preimage hash. The preimage hash is simply the hash of the proposal to be\nenacted. The easiest way to get the preimage hash is by clicking on the "Submit preimage" button as\nshown in the previous section.'}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"submit proposal",src:t(60849).A+"",width:"1936",height:"1118"})}),"\n",(0,i.jsx)(n.p,{children:"The proposal will be registered from the account selected and the balance lock will be applied to\nit. An appropriate origin must be chosen, as each origin has different privileges, and acceptance\ncriteria. After entering the hash of the preimage for the proposal, the preimage length field is\nautomatically populated. The enactment delay can be specified either as a block number, or as a\nspecific number of blocks after the referendum is approved. The deposit for this proposal will be\nlocked for the referendum duration."}),"\n",(0,i.jsx)(n.h3,{id:"submitting-a-referendum-on-the-whitelisted-caller-track",children:"Submitting a Referendum on the Whitelisted Caller Track"}),"\n",(0,i.jsxs)(n.p,{children:["Let's consider increasing the number of validators participating in parachain consensus. You could\n",(0,i.jsx)(n.a,{href:"#submitting-a-preimage",children:"submit a preimage"})," with the call that sets the number of validators to\n1,000 and submit a referendum to the Root track directly. However, this requires a large decision\ndeposit and has very conservative passing parameters such that it will probably need the entire\n28-day voting period to pass."]}),"\n",(0,i.jsx)(n.p,{children:"Operations that are deemed safe or time critical by the Polkadot Technical Fellowship can use the\nWhitelisted Caller track. This track requires less turnout in the first half of the decision period\nso that it can pass more quickly. This track is typically used for more neutral, technical proposals\nlike runtime upgrades or changing the system's parachain validation configuration."}),"\n",(0,i.jsxs)(n.p,{children:["Using the Whitelisted Caller track requires some special calls. Submitting a referendum in the same\nform as other tracks will not work. Namely, rather than voting on a particular ",(0,i.jsx)(n.code,{children:"proposal"}),", the\nWhitelisted Caller track requires a vote to ",(0,i.jsx)(n.code,{children:"dispatch"})," the ",(0,i.jsx)(n.code,{children:"proposal"})," via the Whitelist pallet.\nBefore opening a referendum on this track, you should also attempt to get a positive signal from the\nFellowship that they will whitelist the proposal. If they do not, then even if the public referendum\npasses, it will not execute."]}),"\n",(0,i.jsx)(n.p,{children:"Below are the steps to follow when submitting a proposal to the Whitelist track."}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.a,{href:"#submitting-a-preimage",children:"Submit a preimage"})," with the call to ",(0,i.jsx)(n.em,{children:"dispatch"})," the proposal (",(0,i.jsx)(n.code,{children:"call"}),") you\nwant to submit -- ",(0,i.jsx)(n.code,{children:"whitelist.dispatchWhitelistedCallWithPreimage(call)"})," -- and obtain the preimage\nhash. This is the preimage for the ",(0,i.jsx)(n.em,{children:"public referendum"})," on the Whitelisted Caller track."]}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"preimage-whitelist",src:t(56985).A+"",width:"2146",height:"1113"})}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:["Obtain the hash of ",(0,i.jsx)(n.code,{children:"call"}),". The Polkadot Fellowship needs to start a Fellowship referendum to\nwhitelist the call with ",(0,i.jsx)(n.code,{children:"whitelist.whitelistCall(callHash)"}),". The Fellowship referendum gets voted\non by the Polkadot Fellowship members only."]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"call-hash",src:t(36585).A+"",width:"2257",height:"858"})}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:"The public now votes on the referendum. Someone must place a decision deposit to go into the\ndeciding phase."}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:"Once passed, it gets enacted successfully as long as the call has been whitelisted by the\nFellowship."}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"Note that the public referendum and Fellowship referendum can happen simultaneously. However, if the\nFellowship does not whitelist the call, you must submit it directly to the Root origin."}),"\n",(0,i.jsx)(n.h2,{id:"voting-on-referenda",children:"Voting on Referenda"}),"\n",(0,i.jsx)(n.p,{children:"As Polkadot OpenGov takes both the approval and support into account, there are four options to\nchoose from when voting on a referendum:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Aye"}),"\n",(0,i.jsx)(n.li,{children:"Nay"}),"\n",(0,i.jsx)(n.li,{children:"Split"}),"\n",(0,i.jsx)(n.li,{children:"Abstain"}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"Also, you have to specify the conviction multiplier for this vote. The longer you are willing to\nlock your tokens, the stronger your vote will be weighted. Unwillingness to lock your tokens means\nthat your vote only counts for 10% of the tokens that you hold."}),"\n",(0,i.jsxs)(n.p,{children:["For detailed instructions on how to vote on Polkadot OpenGov referenda, check\n",(0,i.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000184120-polkadot-opengov-how-to-vote",children:"this support guide."})]}),"\n",(0,i.jsx)(n.admonition,{title:"Polkadot OpenGov uses Conviction Voting Pallet (Not Democracy Pallet)",type:"caution",children:(0,i.jsxs)(n.p,{children:["Use ",(0,i.jsx)(n.code,{children:"convictionVoting.vote"})," for voting on Referenda in Polkadot OpenGov instead of ",(0,i.jsx)(n.code,{children:"democracy.vote"}),"\n(which only works for the old version of governance)."]})}),"\n",(0,i.jsx)(n.h3,{id:"removing-votes",children:"Removing Votes"}),"\n",(0,i.jsxs)(n.p,{children:["To remove votes, you need to use the ",(0,i.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/extrinsics",children:"Extrinsics tab"})," and\ncall the ",(0,i.jsx)(n.code,{children:"removeVote"})," function through the ",(0,i.jsx)(n.code,{children:"convictionVoting"})," pallet."]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"rm-vote",src:t(36894).A+"",width:"2388",height:"594"})}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.code,{children:"class"})," is the ",(0,i.jsx)(n.a,{href:"/docs/learn-polkadot-opengov-origins",children:"OpenGov track"})," of the referendum you voted\non and the ",(0,i.jsx)(n.code,{children:"index"})," is the referendum number."]}),"\n",(0,i.jsx)(n.h3,{id:"removing-expired-voting-locks",children:"Removing Expired Voting Locks"}),"\n",(0,i.jsxs)(n.p,{children:["To remove an expired lock, you need to use the\n",(0,i.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/extrinsics",children:"Extrinsics tab"})," and call the ",(0,i.jsx)(n.code,{children:"unlock"})," function through\nthe ",(0,i.jsx)(n.code,{children:"convictionVoting"})," pallet. Note that if you voted on referenda in multiple tracks, the tokens\nwill be unlocked after removing votes and unlocking on all the tracks. Similarly, if you you\n",(0,i.jsx)(n.a,{href:"#delegations",children:"delegated"})," on multiple tracks, the funds will be unlocked after\n",(0,i.jsx)(n.a,{href:"#undelegate-votes",children:"undelegating"})," and unlocking on all the tracks."]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"rm-voting-lock",src:t(82187).A+"",width:"2382",height:"684"})}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.code,{children:"class"})," is the ",(0,i.jsx)(n.a,{href:"/docs/learn-polkadot-opengov-origins",children:"OpenGov track"})," where you have the lock."]}),"\n",(0,i.jsxs)(n.p,{children:["For additional instructions, check\n",(0,i.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000184129-polkadot-js-ui-how-to-remove-expired-referenda-locks",children:"this support guide."})]}),"\n",(0,i.jsx)(n.h2,{id:"delegations",children:"Delegations"}),"\n",(0,i.jsx)(n.admonition,{title:"Video Tutorial about Delegations using the Polkadot-JS UI",type:"info",children:(0,i.jsxs)(n.p,{children:["See ",(0,i.jsx)(n.a,{href:"https://youtu.be/PNGs11EvCB0",children:"this video tutorial"})," to learn about how to delegate, modify\ndelegations and remove delegations using the Polkadot-JS UI."]})}),"\n",(0,i.jsxs)(n.p,{children:["For an overview of how delegation works in Polkadot OpenGov, check out the\n",(0,i.jsx)(n.a,{href:"/docs/learn-polkadot-opengov#multirole-delegation",children:"Multirole Delegation"})," section on the\n",(0,i.jsx)(n.a,{href:"/docs/learn-polkadot-opengov",children:"Learn Polkadot OpenGov"})," page."]}),"\n",(0,i.jsxs)(n.p,{children:["Instructions to do delegations with Polkadot-JS are also available on the\n",(0,i.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000184776-polkadot-js-ui-how-to-delegate-your-voting-power-on-polkadot-opengov",children:"Support Pages"}),"."]}),"\n",(0,i.jsx)(n.h3,{id:"delegate-votes",children:"Delegate Votes"}),"\n",(0,i.jsxs)(n.p,{children:['You can start delegating your votes by clicking the "Delegate" button on\n',(0,i.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/referenda",children:"Governance > Referenda"}),"."]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"js-delegation-start",src:t(28577).A+"",width:"1055",height:"497"})}),"\n",(0,i.jsxs)(n.p,{children:["If it is the first time you delegate or vote, there will be a banner message. You can delegate on a\nsingle track or all the tracks. You have an option to specify the number of votes (i.e., the number\nof tokens) and the ",(0,i.jsx)(n.a,{href:"/docs/learn-polkadot-opengov#voluntary-locking",children:"conviction multiplier"}),'. After\nclicking "Next", you will need to specify the account to delegate your votes to, and after clicking\n"Delegate" and "Sign and Submit" your delegations will appear for each track (see below).']}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"js-delegation-allTracks",src:t(87236).A+"",width:"2116",height:"1438"})}),"\n",(0,i.jsx)(n.p,{children:"Note that if you want to delegate just a few tracks, you have two options:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:'Repeat the process using the "Delegate" button multiple times'}),"\n",(0,i.jsxs)(n.li,{children:["Issue a batch call with multiple ",(0,i.jsx)(n.code,{children:"convictionVoting.delegate"})," extrinsics under\n",(0,i.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/extrinsics",children:"Developer > Extrinsics"})]}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"js-delegation-delegate",src:t(44176).A+"",width:"2694",height:"1104"})}),"\n",(0,i.jsx)(n.p,{children:'By clicking on "Add item" you can add new extrinsics for multiple tracks.'}),"\n",(0,i.jsx)(n.h3,{id:"undelegate-votes",children:"Undelegate Votes"}),"\n",(0,i.jsxs)(n.p,{children:['The "Delegate" button on ',(0,i.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/referenda",children:"Governance > Referenda"})," is only\nfor delegating votes. You cannot undelegate or modify your delegations. If you wish to undelegate,\nyou will need to go to ",(0,i.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/extrinsics",children:"Developer > Extrinsics"})," and\nsubmit a ",(0,i.jsx)(n.code,{children:"convictionVoting.undelegate"})," extrinsic, specifying the track you wish to undelegate."]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"js-delegation-undelegate",src:t(99829).A+"",width:"2708",height:"632"})}),"\n",(0,i.jsx)(n.p,{children:'Undelegated tracks will show up as "0 votes" on the Delegate tab.'}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"js-delegation-undelegate",src:t(38981).A+"",width:"2128",height:"1432"})}),"\n",(0,i.jsx)(n.p,{children:"After you undelegated, the conviction lock will start the countdown, and your funds will be\navailable for unlocking after the countdown ends."}),"\n",(0,i.jsx)(n.h3,{id:"remove-expired-locks-from-delegations",children:"Remove Expired Locks from Delegations"}),"\n",(0,i.jsxs)(n.p,{children:["To remove expired locks from delegations, you can\n",(0,i.jsx)(n.a,{href:"#removing-expired-voting-locks",children:"follow the same procedure as how to remove expired voting locks"}),"."]}),"\n",(0,i.jsx)(n.h3,{id:"modify-your-delegations",children:"Modify your Delegations"}),"\n",(0,i.jsxs)(n.p,{children:['The "Delegate" button on ',(0,i.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/referenda",children:"Governance > Referenda"})," is only\nfor delegating votes. You cannot undelegate or modify your delegations. If you wish to update the\ndelegated account, the conviction, and the number of votes you will need to go to\n",(0,i.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/extrinsics",children:"Developer > Extrinsics"}),", ",(0,i.jsx)(n.a,{href:"#undelegate-votes",children:"undelegate"}),"\nthe track and ",(0,i.jsx)(n.a,{href:"#delegate-votes",children:"delegate"})," again with updated information."]}),"\n",(0,i.jsx)(n.h2,{id:"claiming-opengov-deposits",children:"Claiming OpenGov Deposits"}),"\n",(0,i.jsx)(n.admonition,{title:"Video Tutorial about OpenGov deposits using the Polkadot-JS UI",type:"info",children:(0,i.jsxs)(n.p,{children:["See ",(0,i.jsx)(n.a,{href:"https://youtu.be/kkEq5cqW2Pk",children:"this video tutorial"})," to learn about how to claim OpenGov deposits\nusing the Polkadot-JS UI."]})}),"\n",(0,i.jsx)(n.h3,{id:"claiming-the-preimage-and-decision-deposits",children:"Claiming the Preimage and Decision Deposits"}),"\n",(0,i.jsxs)(n.p,{children:["After a referendum finishes its life cycle (and gets approved or rejected or timed out), the\npreimage and decision deposits can be claimed. For claiming the preimage deposit, navigate to\n",(0,i.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/preimages",children:"Polkadot-JS UI > Governance > Preimages"})," and click on\nunnote button shown on the preimage you submitted."]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"Claim Preimage Deposit",src:t(43214).A+"",width:"2828",height:"362"})}),"\n",(0,i.jsxs)(n.p,{children:["Similarly, to claim the decision deposit, navigate to\n",(0,i.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/referenda",children:"Polkadot-JS UI > Governance > Referenda"})," and scroll down\nto the end of the page to click on the referenda with the decision deposit and claim it."]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"Claim Referendum Deposits",src:t(22450).A+"",width:"2830",height:"444"})}),"\n",(0,i.jsx)(n.h3,{id:"claiming-the-referendum-submission-deposit",children:"Claiming the Referendum Submission Deposit"}),"\n",(0,i.jsxs)(n.p,{children:["The submission deposit for a referendum can be claimed\n",(0,i.jsxs)(n.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/cfb29254f74412cea35e8048d8aea94bc789fcb1/substrate/frame/referenda/src/types.rs#L261",children:["only if the referendum was ",(0,i.jsx)(n.code,{children:"Approved"})," or ",(0,i.jsx)(n.code,{children:"Canceled"})]}),".\nThe submission deposit can be claimed by issuing the ",(0,i.jsx)(n.code,{children:"refundSubmissionDeposit"})," extrinsic."]}),"\n",(0,i.jsxs)(n.p,{children:["Users can not refund their submission deposit while the referendum is ",(0,i.jsx)(n.code,{children:"Ongoing"})," or ",(0,i.jsx)(n.code,{children:"Rejected"}),".\nSimilarly, users cannot refund their submission deposit if the proposal has ",(0,i.jsx)(n.code,{children:"TimedOut"})," (failing to\nsubmit the decision deposit\n",(0,i.jsx)(n.a,{href:"/docs/chain-state-values#opengov-referendum-timeout",children:"within specific period"})," will lead to a\nreferendum timeout). This behavior exists so that users can refrain from spamming the chain with\nproposals that have no interest from the community. If a proposal is in the ",(0,i.jsx)(n.code,{children:"TimedOut"})," state, any\nuser can call ",(0,i.jsx)(n.code,{children:"slash_proposal_deposit"}),", which will move the funds from the user to a\nruntime-configured account, like the treasury."]}),"\n",(0,i.jsxs)(n.p,{children:["To refund your slashed deposit, you can start a new referendum and specifically request a refund\nfrom the treasury. You need to make sure you have enough balance for a new submission and decision\ndeposit, and you will need to select the right track to ask for a refund. For example, the\n",(0,i.jsx)(n.a,{href:"/docs/learn-polkadot-opengov-origins#small-tipper",children:"Small Tipper Track"})," would be fine for any kind of\ndeposit refund up to 250 DOT (8.25 KSM on Kusama)."]}),"\n",(0,i.jsx)(n.h2,{id:"cancel-or-kill-a-referendum",children:"Cancel or Kill a Referendum"}),"\n",(0,i.jsxs)(n.admonition,{type:"info",children:[(0,i.jsxs)(n.p,{children:["Anybody can cancel an ongoing referendum (i.e., a referendum within the Lead-in or\nvoting/confirmation period). For more information about the referenda timeline in Polkadot OpenGov,\nsee the ",(0,i.jsx)(n.a,{href:"/docs/learn-polkadot-opengov#referenda-timeline",children:"dedicated page"}),"."]}),(0,i.jsxs)(n.p,{children:["To successfully cancel a referendum through the track ",(0,i.jsx)(n.code,{children:"20 / Referendum Canceller"}),", you will need to\nattain\n",(0,i.jsx)(n.a,{href:"/docs/learn-polkadot-opengov-origins#referendum-canceller",children:"specific approval and support levels"}),"."]})]}),"\n",(0,i.jsxs)(n.p,{children:["To cancel a referendum, you need first to submit a preimage with the ",(0,i.jsx)(n.code,{children:"referenda.cancel"})," extrinsic.\nGo to the ",(0,i.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/referenda",children:"Polkadot-JS UI > Governance > Referenda"}),' and\nclick on the "Add Preimage" button. You must specify the ',(0,i.jsx)(n.code,{children:"referenda.cancel"})," extrinsic with the index\nequal to the ongoing Referendum you wish to cancel. In the screenshot below, the Referendum to be\ncancelled is 249."]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"cancel-referenda-preimage-creation",src:t(53972).A+"",width:"2144",height:"944"})}),"\n",(0,i.jsxs)(n.p,{children:["This call will cancel the referendum and return the deposit. You can also kill a referendum using\nthe ",(0,i.jsx)(n.code,{children:"referenda.kill"})," extrinsic. This will cancel the referendum and slash the deposit."]}),"\n",(0,i.jsx)(n.admonition,{title:"Preimage Submission Deposit",type:"info",children:(0,i.jsx)(n.p,{children:"A deposit is required for the preimage to be stored on chain. The preimage deposit is proportional\nto the amount of information stored within the preimage. The deposit amount required for a preimage\nwith a treasury spend transaction is around 41 DOT (1.4 KSM on Kusama). Ensure you have enough\naccount balance to pay for this submission deposit as well as the transaction fees."})}),"\n",(0,i.jsxs)(n.p,{children:["Once a preimage is submitted, it can be checked under\n",(0,i.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/preimages",children:"Governance > Preimages"}),"."]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"cancel-referenda-preimage-check",src:t(50887).A+"",width:"2758",height:"190"})}),"\n",(0,i.jsxs)(n.p,{children:["You must copy the preimage to use it when you submit your proposal. To submit the proposal to cancel\nreferendum 249, for example, you need to go under\n",(0,i.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/referenda",children:"Governance > Referenda"}),' and click the "Submit Proposal"\nbutton.']}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"cancel-referenda-proposal",src:t(29860).A+"",width:"2130",height:"1226"})}),"\n",(0,i.jsxs)(n.p,{children:["You must specify the account to submit the proposal (this can differ from the account used to create\nthe preimage). Then you will need to specify the track ",(0,i.jsx)(n.code,{children:"20 / Referendum Canceller"})," and add the\npreimage hash containing the specific action that will be enacted if the referendum passes. Note\nthat a ",(0,i.jsx)(n.a,{href:"/docs/chain-state-values#opengov-submission-deposit",children:"submission deposit"})," will be\nreserved for submitting the proposal."]}),"\n",(0,i.jsxs)(n.p,{children:["Once the proposal has been submitted, it will stay in the Lead-in period until there is enough space\nwithin the track, and a\n",(0,i.jsx)(n.a,{href:"/docs/learn-polkadot-opengov-origins#polkadot-opengov-terminology-and-parameters",children:"track-dependent preparation period and decision deposit"}),"\nhave been met. Failing to submit the decision deposit will ultimately lead to a\n",(0,i.jsx)(n.a,{href:"/docs/chain-state-values#opengov-referendum-timeout",children:"referendum timeout"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"interpreting-on-chain-voting-data",children:"Interpreting On-Chain Voting Data"}),"\n",(0,i.jsx)(n.p,{children:"Below is the numeric conversion of the type of vote and conviction displayed in a block explorer."}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"Nay 0.1x => 0\nNay 1x => 1\nNay 2x => 2\nNay 3x => 3\nNay 4x => 4\nNay 5x => 5\nNay 6x => 6\n\nAye 0.1x => 128\nAye 1x => 129\nAye 2x => 130\nAye 3x => 131\nAye 4x => 132\nAye 5x => 133\nAye 6x => 134\n"})}),"\n",(0,i.jsxs)(n.p,{children:["Take, for example, the information provided for\n",(0,i.jsx)(n.a,{href:"https://kusama.subscan.io/extrinsic/22460598-2",children:"this vote"}),". The vote ",(0,i.jsx)(n.code,{children:"131"})," means the account voted\nAye with 3x conviction."]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"vote_numeric_conversion",src:t(71685).A+"",width:"870",height:"255"})}),"\n",(0,i.jsx)(n.p,{children:'At first glance, it may not be easy to interpret what you voted on. We need to take a step back and\nconsider the "voting data" at the binary level.'}),"\n",(0,i.jsx)(n.p,{children:"The vote is stored as a byte using a bitfield data structure and displayed on the block explorer as\na decimal integer. The bitfield stores both the conviction and aye/nay boolean, where the boolean is\nrepresented using the MSB of the byte. This would mean that the seven remaining bits are grouped to\nstore the conviction."})]})}function p(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(h,{...e})}):h(e)}},67141:(e,n,t)=>{t.d(n,{A:()=>s});var o=t(96540),i=t(74848);const s=function(e){var n,t=e.message,s=(0,o.useState)(!0),a=s[0],r=s[1];return(0,i.jsx)(i.Fragment,{children:a&&(0,i.jsxs)("div",{className:"message-box",children:[(0,i.jsx)("button",{className:"close-button",onClick:function(){r(!1)},children:"\u2716 "}),(0,i.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(n=t,n.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},50887:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/cancel-referenda-preimage-check-45ef7f984450113a2b1a87e9e2751d69.png"},53972:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/cancel-referenda-preimage-creation-3923463db47aec298f74a426dba23166.png"},29860:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/cancel-referenda-proposal-b9c5e90784ec8216360053d8bda84980.png"},43214:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/claim-preimage-deposit-069843b91eba35d4829b237b59ab2d12.png"},22450:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/claim-referendum-decision-deposit-6352bbad189dac6fe7a651b5a3c8f5a5.png"},36585:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/encoded-call-hash-4e0347923993beea4d12d5a787649f8f.png"},56985:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/opengov-submit-preimage-whitelist-67d383745b6e7b3ef31a37567e044e80.png"},60849:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/opengov-submit-proposal-0c82b35f3f7b1d9e66130a621b76c44b.png"},87236:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/js-delegation-allTracks-788efa580f296aa78b65b77691570181.png"},44176:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/js-delegation-delegate-3bcce735bcc35b831079cd44ad0eef15.png"},28577:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/js-delegation-start-c8186f8875fd402b993abfd5ab09f515.png"},99829:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/js-delegation-undelegate-a5018d2ecd2d5523f711199cd6fa1e63.png"},38981:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/js-delegation-undelegated-9b5efde53d2016c4e4b1f0f6b651ecf5.png"},36894:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/rm-vote-8572ff30a00c8d6fe903fae7a39147f4.png"},82187:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/rm-voting-lock-214119c2fcfe92488190b321cdfe823a.png"},79087:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/OpenGov-Treasury-Preimage-SpendLocal-693c955b1e3e27bb6c98a6aad4d1b697.png"},71685:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/vote_numeric_conversion-6aef93a6fd1ea92beabfcbe058ac876b.png"},28453:(e,n,t)=>{t.d(n,{R:()=>a,x:()=>r});var o=t(96540);const i={},s=o.createContext(i);function a(e){const n=o.useContext(s);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:a(e.components),o.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/c110e322.9ee678ef.js b/assets/js/c110e322.9ee678ef.js deleted file mode 100644 index 18fd42911617..000000000000 --- a/assets/js/c110e322.9ee678ef.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1592],{37917:(e,a,n)=>{n.r(a),n.d(a,{assets:()=>c,contentTitle:()=>r,default:()=>d,frontMatter:()=>o,metadata:()=>s,toc:()=>h});var t=n(74848),i=n(28453);const o={id:"learn-guides-coretime-swap",title:"Coretime Lease Swap",sidebar_label:"Coretime Swap",description:"A guide to leverage the swap lease functionality for different parachains",keywords:["coretime","blockspace","parachain","cores","lease"],slug:"../learn-guides-coretime-swap"},r=void 0,s={id:"learn/learn-guides-coretime-swap",title:"Coretime Lease Swap",description:"A guide to leverage the swap lease functionality for different parachains",source:"@site/../docs/learn/learn-guides-coretime-swap.md",sourceDirName:"learn",slug:"/learn-guides-coretime-swap",permalink:"/docs/learn-guides-coretime-swap",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-coretime-swap.md",tags:[],version:"current",lastUpdatedBy:"github-actions[bot]",lastUpdatedAt:1730123236e3,frontMatter:{id:"learn-guides-coretime-swap",title:"Coretime Lease Swap",sidebar_label:"Coretime Swap",description:"A guide to leverage the swap lease functionality for different parachains",keywords:["coretime","blockspace","parachain","cores","lease"],slug:"../learn-guides-coretime-swap"},sidebar:"docs",previous:{title:"Troubleshooting FAQ",permalink:"/docs/build-guides-coretime-troubleshoot"},next:{title:"Polkadot Protocol Overview",permalink:"/docs/build-protocol-info"}},c={},h=[{value:"Initiate Swap from the Parachain",id:"initiate-swap-from-the-parachain",level:2},{value:"Perform Swap on the Relay chain for an unlocked Parachain",id:"perform-swap-on-the-relay-chain-for-an-unlocked-parachain",level:2},{value:"Coretime Swap Prerequisites",id:"coretime-swap-prerequisites",level:2},{value:"Swap through an OnDemand Core",id:"swap-through-an-ondemand-core",level:3},{value:"Core Swap Execution Steps",id:"core-swap-execution-steps",level:3},{value:"Coretime Swap - Time for Effect",id:"coretime-swap---time-for-effect",level:3}];function l(e){const a={a:"a",br:"br",code:"code",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",ul:"ul",...(0,i.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(a.p,{children:"The following is a guide to leverage the swap functionality to change leases between different\nparaIDs. This allows parachain teams to swap existing leases."}),"\n",(0,t.jsxs)(a.p,{children:["Coretime swapping requires two chains to send a ",(0,t.jsx)(a.code,{children:"swap"})," instruction from an origin with Root\nprivileges. Depending on whether the parachain is locked or not, this can either be the manager\naccount of the parachain on the relay chain (if parachain is not locked), or the governance system\nin place for the parachain (can be sudo) if the parachain is locked."]}),"\n",(0,t.jsxs)(a.p,{children:["In order to check if a parachain is locked or not, teams need to query ",(0,t.jsx)(a.code,{children:"registrar.paras"})," with the\ncorresponding paraID on the relay chain. It's important to note that since\n",(0,t.jsx)(a.a,{href:"https://github.com/polkadot-fellows/RFCs/pull/14",children:"RFC #14"}),", if a parachain never produced a block\nthe it's by default unlocked."]}),"\n",(0,t.jsx)(a.h2,{id:"initiate-swap-from-the-parachain",children:"Initiate Swap from the Parachain"}),"\n",(0,t.jsxs)(a.p,{children:["To swap from a parachain, an XCM message needs to be sent from the parachain to the relay chain.\nThis XCM message must be a send instruction that wraps the ",(0,t.jsx)(a.code,{children:"registrar.swap"})," extrinsic that needs to\nbe executed on the relay chain."]}),"\n",(0,t.jsx)(a.p,{children:"Below, you can find an example hex encoded call for Composable Finance, assuming the team is still\noperating under SUDO."}),"\n",(0,t.jsx)(a.p,{children:(0,t.jsx)(a.a,{href:"https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fcomposable-rpc.dwellir.com#/extrinsics/decode/0x0200290003010003140004000000000700e876481713000000000700e87648170006000700e40b540282380100284603e3070000320d0000140d01000001008d1f",children:"0x0200290003010003140004000000000700e876481713000000000700e87648170006000700e40b540282380100284603e3070000320d0000140d01000001008d1f"})}),"\n",(0,t.jsx)(a.p,{children:"As for weights (size and time), we use an overestimate compared with those returned by the Polkadot\nRelay Runtime API."}),"\n",(0,t.jsxs)(a.p,{children:["To check the exact weights, you can navigate to Polkadot JS UI > Developer > Runtime Calls and then\nselect ",(0,t.jsx)(a.code,{children:"transactionPaymentCallInfo"})," and ",(0,t.jsx)(a.code,{children:"queryCallInfo"})," and include the extrinsic being sent in the\n",(0,t.jsx)(a.code,{children:"send"})," instruction of the XCM message:\n",(0,t.jsx)(a.a,{href:"https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc.ibp.network%2Fpolkadot#/extrinsics/decode/0x4603e3070000320d0000",children:"0x4603e3070000320d0000"})]}),"\n",(0,t.jsx)(a.p,{children:(0,t.jsx)(a.img,{alt:"TX-payment-API-Lease-Swap",src:n(65066).A+"",width:"1962",height:"1165"})}),"\n",(0,t.jsx)(a.h2,{id:"perform-swap-on-the-relay-chain-for-an-unlocked-parachain",children:"Perform Swap on the Relay chain for an unlocked Parachain"}),"\n",(0,t.jsx)(a.p,{children:"In the case a parachain is unlocked, then the manager of the parachain on the relaychain must send\nthe extrinsic directly on the relaychain."}),"\n",(0,t.jsxs)(a.p,{children:["In the case of paraID 3378 wanting to swap with Composable Finance, the extrinsic to send from its\nmanager account ",(0,t.jsx)(a.code,{children:"13B8Tdhi4EuruwzVt3gdcTopXpqbUzmncutiQKKNbd8cpU91"})," is:"]}),"\n",(0,t.jsx)(a.p,{children:(0,t.jsx)(a.a,{href:"https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc.ibp.network%2Fpolkadot#/extrinsics/decode/0x4603320d0000e3070000",children:"0x4603320d0000e3070000"})}),"\n",(0,t.jsx)(a.h2,{id:"coretime-swap-prerequisites",children:"Coretime Swap Prerequisites"}),"\n",(0,t.jsxs)(a.p,{children:["We need to ensure the parachains have a valid cores to execute the swap instruction. This can be\nachieved either by getting a core in bulk from the coretime system chain, or by leveraging the\nonDemand functionality on relay chain. Assuming that teams have a working parachain (with a valid\ncore) and a stalled parachain, the following instructions explain how to get a core ",(0,t.jsx)(a.code,{children:"onDemand"})," for\nthe stalled parachain."]}),"\n",(0,t.jsx)(a.h3,{id:"swap-through-an-ondemand-core",children:"Swap through an OnDemand Core"}),"\n",(0,t.jsxs)(a.p,{children:["This functionality exists on the relay chain and allows users to request for 1 block of validation\nof their parachain. In order to place an order for on demand, any account must call the\n",(0,t.jsx)(a.code,{children:"onDemand.placeOrderAllowDeath"})," extrinsic."]}),"\n",(0,t.jsx)(a.p,{children:(0,t.jsx)(a.img,{alt:"onDemand-block-production",src:n(9621).A+"",width:"2017",height:"1045"})}),"\n",(0,t.jsx)(a.p,{children:"This extrinsic takes two parameters:"}),"\n",(0,t.jsxs)(a.ul,{children:["\n",(0,t.jsxs)(a.li,{children:["\n",(0,t.jsx)(a.p,{children:"Amount: the amount the user is willing to pay for the parachain block to be validated by a core.\nThe minimum amount the system allows is 250,000,000 planckDOT (0.025 DOT) and the actual amount is\ndynamic as it depends on the on-demand block production requests queued."}),"\n"]}),"\n",(0,t.jsxs)(a.li,{children:["\n",(0,t.jsxs)(a.p,{children:["paraID: This refers to the ",(0,t.jsx)(a.code,{children:"paraID"})," of the on-demand Parachain whose block must be",(0,t.jsx)(a.br,{}),"\n","validated by a core."]}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(a.h3,{id:"core-swap-execution-steps",children:"Core Swap Execution Steps"}),"\n",(0,t.jsx)(a.p,{children:"If you are a team with two parachains, one that has a lease with a fresh paraID, and an old one that\ndoesn't have a lease but contains the history of the chain then below is a list of steps to execute\nto swap these leases."}),"\n",(0,t.jsx)(a.p,{children:"Assumptions"}),"\n",(0,t.jsxs)(a.ul,{children:["\n",(0,t.jsx)(a.li,{children:"Your new paraID is unlocked and your old paraID is locked."}),"\n",(0,t.jsx)(a.li,{children:"You have access to the manager account on the relay chain for the new paraID"}),"\n",(0,t.jsx)(a.li,{children:"You have your collators running on your old paraID and you can execute upward XCM messages from\nthat parachain."}),"\n",(0,t.jsx)(a.li,{children:"The sovereign account for the locked paraID has enough available funds to execute transactions on\nthe relay chain."}),"\n",(0,t.jsx)(a.li,{children:"The account that owns the unlocked paraID has enough available funds to execute transactions on\nthe relay chain. transactions on the relay chain."}),"\n"]}),"\n",(0,t.jsx)(a.p,{children:"Steps"}),"\n",(0,t.jsxs)(a.ul,{children:["\n",(0,t.jsx)(a.li,{children:"Have the collator running for your original paraID."}),"\n",(0,t.jsxs)(a.li,{children:["Send the ",(0,t.jsx)(a.a,{href:"#initiate-swap-from-the-parachain",children:"XCM instruction detailed before"}),"."]}),"\n",(0,t.jsx)(a.li,{children:"Get a onDemandCore for your original paraID. Once this gets executed, your XCM message should be\ndispatched to the relay chain and you should see a pending swap."}),"\n",(0,t.jsxs)(a.li,{children:["Use the manager account on your new paraID to send the\n",(0,t.jsx)(a.a,{href:"#perform-swap-on-the-relay-chain-for-an-unlocked-parachain",children:"swap instruction"})," directly on the\nrelay chain."]}),"\n"]}),"\n",(0,t.jsx)(a.h3,{id:"coretime-swap---time-for-effect",children:"Coretime Swap - Time for Effect"}),"\n",(0,t.jsxs)(a.p,{children:["The swap of leases is effective immediately, however the Coretime chain communicates the changes of\nthese leases to the relay chain with every new coretime cycle. Thus, the change will come into\neffect in the following coretime cycle. For information on when the new coretime cycle, you can view\nthe ",(0,t.jsx)(a.a,{href:"https://coretime-polkadot.subscan.io/coretime_dashboard",children:"coretime sales"})," page."]})]})}function d(e={}){const{wrapper:a}={...(0,i.R)(),...e.components};return a?(0,t.jsx)(a,{...e,children:(0,t.jsx)(l,{...e})}):l(e)}},9621:(e,a,n)=>{n.d(a,{A:()=>t});const t=n.p+"assets/images/onDemand-block-production-ba682c530332d798721a8f87934bccfc.png"},65066:(e,a,n)=>{n.d(a,{A:()=>t});const t=n.p+"assets/images/tx-payment-api-weights-lease-swap-d1c125d22aa51ad58c980c890050d1e9.png"},28453:(e,a,n)=>{n.d(a,{R:()=>r,x:()=>s});var t=n(96540);const i={},o=t.createContext(i);function r(e){const a=t.useContext(o);return t.useMemo((function(){return"function"==typeof e?e(a):{...a,...e}}),[a,e])}function s(e){let a;return a=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),t.createElement(o.Provider,{value:a},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/c110e322.b8cdcdcf.js b/assets/js/c110e322.b8cdcdcf.js new file mode 100644 index 000000000000..be075e9e007e --- /dev/null +++ b/assets/js/c110e322.b8cdcdcf.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1592],{34687:(e,a,n)=>{n.r(a),n.d(a,{assets:()=>c,contentTitle:()=>s,default:()=>d,frontMatter:()=>r,metadata:()=>t,toc:()=>h});const t=JSON.parse('{"id":"learn/learn-guides-coretime-swap","title":"Coretime Lease Swap","description":"A guide to leverage the swap lease functionality for different parachains","source":"@site/../docs/learn/learn-guides-coretime-swap.md","sourceDirName":"learn","slug":"/learn-guides-coretime-swap","permalink":"/docs/learn-guides-coretime-swap","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-coretime-swap.md","tags":[],"version":"current","lastUpdatedBy":"github-actions[bot]","lastUpdatedAt":1730123236000,"frontMatter":{"id":"learn-guides-coretime-swap","title":"Coretime Lease Swap","sidebar_label":"Coretime Swap","description":"A guide to leverage the swap lease functionality for different parachains","keywords":["coretime","blockspace","parachain","cores","lease"],"slug":"../learn-guides-coretime-swap"},"sidebar":"docs","previous":{"title":"Troubleshooting FAQ","permalink":"/docs/build-guides-coretime-troubleshoot"},"next":{"title":"Polkadot Protocol Overview","permalink":"/docs/build-protocol-info"}}');var i=n(74848),o=n(28453);const r={id:"learn-guides-coretime-swap",title:"Coretime Lease Swap",sidebar_label:"Coretime Swap",description:"A guide to leverage the swap lease functionality for different parachains",keywords:["coretime","blockspace","parachain","cores","lease"],slug:"../learn-guides-coretime-swap"},s=void 0,c={},h=[{value:"Initiate Swap from the Parachain",id:"initiate-swap-from-the-parachain",level:2},{value:"Perform Swap on the Relay chain for an unlocked Parachain",id:"perform-swap-on-the-relay-chain-for-an-unlocked-parachain",level:2},{value:"Coretime Swap Prerequisites",id:"coretime-swap-prerequisites",level:2},{value:"Swap through an OnDemand Core",id:"swap-through-an-ondemand-core",level:3},{value:"Core Swap Execution Steps",id:"core-swap-execution-steps",level:3},{value:"Coretime Swap - Time for Effect",id:"coretime-swap---time-for-effect",level:3}];function l(e){const a={a:"a",br:"br",code:"code",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",ul:"ul",...(0,o.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(a.p,{children:"The following is a guide to leverage the swap functionality to change leases between different\nparaIDs. This allows parachain teams to swap existing leases."}),"\n",(0,i.jsxs)(a.p,{children:["Coretime swapping requires two chains to send a ",(0,i.jsx)(a.code,{children:"swap"})," instruction from an origin with Root\nprivileges. Depending on whether the parachain is locked or not, this can either be the manager\naccount of the parachain on the relay chain (if parachain is not locked), or the governance system\nin place for the parachain (can be sudo) if the parachain is locked."]}),"\n",(0,i.jsxs)(a.p,{children:["In order to check if a parachain is locked or not, teams need to query ",(0,i.jsx)(a.code,{children:"registrar.paras"})," with the\ncorresponding paraID on the relay chain. It's important to note that since\n",(0,i.jsx)(a.a,{href:"https://github.com/polkadot-fellows/RFCs/pull/14",children:"RFC #14"}),", if a parachain never produced a block\nthe it's by default unlocked."]}),"\n",(0,i.jsx)(a.h2,{id:"initiate-swap-from-the-parachain",children:"Initiate Swap from the Parachain"}),"\n",(0,i.jsxs)(a.p,{children:["To swap from a parachain, an XCM message needs to be sent from the parachain to the relay chain.\nThis XCM message must be a send instruction that wraps the ",(0,i.jsx)(a.code,{children:"registrar.swap"})," extrinsic that needs to\nbe executed on the relay chain."]}),"\n",(0,i.jsx)(a.p,{children:"Below, you can find an example hex encoded call for Composable Finance, assuming the team is still\noperating under SUDO."}),"\n",(0,i.jsx)(a.p,{children:(0,i.jsx)(a.a,{href:"https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fcomposable-rpc.dwellir.com#/extrinsics/decode/0x0200290003010003140004000000000700e876481713000000000700e87648170006000700e40b540282380100284603e3070000320d0000140d01000001008d1f",children:"0x0200290003010003140004000000000700e876481713000000000700e87648170006000700e40b540282380100284603e3070000320d0000140d01000001008d1f"})}),"\n",(0,i.jsx)(a.p,{children:"As for weights (size and time), we use an overestimate compared with those returned by the Polkadot\nRelay Runtime API."}),"\n",(0,i.jsxs)(a.p,{children:["To check the exact weights, you can navigate to Polkadot JS UI > Developer > Runtime Calls and then\nselect ",(0,i.jsx)(a.code,{children:"transactionPaymentCallInfo"})," and ",(0,i.jsx)(a.code,{children:"queryCallInfo"})," and include the extrinsic being sent in the\n",(0,i.jsx)(a.code,{children:"send"})," instruction of the XCM message:\n",(0,i.jsx)(a.a,{href:"https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc.ibp.network%2Fpolkadot#/extrinsics/decode/0x4603e3070000320d0000",children:"0x4603e3070000320d0000"})]}),"\n",(0,i.jsx)(a.p,{children:(0,i.jsx)(a.img,{alt:"TX-payment-API-Lease-Swap",src:n(65066).A+"",width:"1962",height:"1165"})}),"\n",(0,i.jsx)(a.h2,{id:"perform-swap-on-the-relay-chain-for-an-unlocked-parachain",children:"Perform Swap on the Relay chain for an unlocked Parachain"}),"\n",(0,i.jsx)(a.p,{children:"In the case a parachain is unlocked, then the manager of the parachain on the relaychain must send\nthe extrinsic directly on the relaychain."}),"\n",(0,i.jsxs)(a.p,{children:["In the case of paraID 3378 wanting to swap with Composable Finance, the extrinsic to send from its\nmanager account ",(0,i.jsx)(a.code,{children:"13B8Tdhi4EuruwzVt3gdcTopXpqbUzmncutiQKKNbd8cpU91"})," is:"]}),"\n",(0,i.jsx)(a.p,{children:(0,i.jsx)(a.a,{href:"https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc.ibp.network%2Fpolkadot#/extrinsics/decode/0x4603320d0000e3070000",children:"0x4603320d0000e3070000"})}),"\n",(0,i.jsx)(a.h2,{id:"coretime-swap-prerequisites",children:"Coretime Swap Prerequisites"}),"\n",(0,i.jsxs)(a.p,{children:["We need to ensure the parachains have a valid cores to execute the swap instruction. This can be\nachieved either by getting a core in bulk from the coretime system chain, or by leveraging the\nonDemand functionality on relay chain. Assuming that teams have a working parachain (with a valid\ncore) and a stalled parachain, the following instructions explain how to get a core ",(0,i.jsx)(a.code,{children:"onDemand"})," for\nthe stalled parachain."]}),"\n",(0,i.jsx)(a.h3,{id:"swap-through-an-ondemand-core",children:"Swap through an OnDemand Core"}),"\n",(0,i.jsxs)(a.p,{children:["This functionality exists on the relay chain and allows users to request for 1 block of validation\nof their parachain. In order to place an order for on demand, any account must call the\n",(0,i.jsx)(a.code,{children:"onDemand.placeOrderAllowDeath"})," extrinsic."]}),"\n",(0,i.jsx)(a.p,{children:(0,i.jsx)(a.img,{alt:"onDemand-block-production",src:n(9621).A+"",width:"2017",height:"1045"})}),"\n",(0,i.jsx)(a.p,{children:"This extrinsic takes two parameters:"}),"\n",(0,i.jsxs)(a.ul,{children:["\n",(0,i.jsxs)(a.li,{children:["\n",(0,i.jsx)(a.p,{children:"Amount: the amount the user is willing to pay for the parachain block to be validated by a core.\nThe minimum amount the system allows is 250,000,000 planckDOT (0.025 DOT) and the actual amount is\ndynamic as it depends on the on-demand block production requests queued."}),"\n"]}),"\n",(0,i.jsxs)(a.li,{children:["\n",(0,i.jsxs)(a.p,{children:["paraID: This refers to the ",(0,i.jsx)(a.code,{children:"paraID"})," of the on-demand Parachain whose block must be",(0,i.jsx)(a.br,{}),"\n","validated by a core."]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(a.h3,{id:"core-swap-execution-steps",children:"Core Swap Execution Steps"}),"\n",(0,i.jsx)(a.p,{children:"If you are a team with two parachains, one that has a lease with a fresh paraID, and an old one that\ndoesn't have a lease but contains the history of the chain then below is a list of steps to execute\nto swap these leases."}),"\n",(0,i.jsx)(a.p,{children:"Assumptions"}),"\n",(0,i.jsxs)(a.ul,{children:["\n",(0,i.jsx)(a.li,{children:"Your new paraID is unlocked and your old paraID is locked."}),"\n",(0,i.jsx)(a.li,{children:"You have access to the manager account on the relay chain for the new paraID"}),"\n",(0,i.jsx)(a.li,{children:"You have your collators running on your old paraID and you can execute upward XCM messages from\nthat parachain."}),"\n",(0,i.jsx)(a.li,{children:"The sovereign account for the locked paraID has enough available funds to execute transactions on\nthe relay chain."}),"\n",(0,i.jsx)(a.li,{children:"The account that owns the unlocked paraID has enough available funds to execute transactions on\nthe relay chain. transactions on the relay chain."}),"\n"]}),"\n",(0,i.jsx)(a.p,{children:"Steps"}),"\n",(0,i.jsxs)(a.ul,{children:["\n",(0,i.jsx)(a.li,{children:"Have the collator running for your original paraID."}),"\n",(0,i.jsxs)(a.li,{children:["Send the ",(0,i.jsx)(a.a,{href:"#initiate-swap-from-the-parachain",children:"XCM instruction detailed before"}),"."]}),"\n",(0,i.jsx)(a.li,{children:"Get a onDemandCore for your original paraID. Once this gets executed, your XCM message should be\ndispatched to the relay chain and you should see a pending swap."}),"\n",(0,i.jsxs)(a.li,{children:["Use the manager account on your new paraID to send the\n",(0,i.jsx)(a.a,{href:"#perform-swap-on-the-relay-chain-for-an-unlocked-parachain",children:"swap instruction"})," directly on the\nrelay chain."]}),"\n"]}),"\n",(0,i.jsx)(a.h3,{id:"coretime-swap---time-for-effect",children:"Coretime Swap - Time for Effect"}),"\n",(0,i.jsxs)(a.p,{children:["The swap of leases is effective immediately, however the Coretime chain communicates the changes of\nthese leases to the relay chain with every new coretime cycle. Thus, the change will come into\neffect in the following coretime cycle. For information on when the new coretime cycle, you can view\nthe ",(0,i.jsx)(a.a,{href:"https://coretime-polkadot.subscan.io/coretime_dashboard",children:"coretime sales"})," page."]})]})}function d(e={}){const{wrapper:a}={...(0,o.R)(),...e.components};return a?(0,i.jsx)(a,{...e,children:(0,i.jsx)(l,{...e})}):l(e)}},9621:(e,a,n)=>{n.d(a,{A:()=>t});const t=n.p+"assets/images/onDemand-block-production-ba682c530332d798721a8f87934bccfc.png"},65066:(e,a,n)=>{n.d(a,{A:()=>t});const t=n.p+"assets/images/tx-payment-api-weights-lease-swap-d1c125d22aa51ad58c980c890050d1e9.png"},28453:(e,a,n)=>{n.d(a,{R:()=>r,x:()=>s});var t=n(96540);const i={},o=t.createContext(i);function r(e){const a=t.useContext(o);return t.useMemo((function(){return"function"==typeof e?e(a):{...a,...e}}),[a,e])}function s(e){let a;return a=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),t.createElement(o.Provider,{value:a},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/c1bbdb2a.9bd7129e.js b/assets/js/c1bbdb2a.9bd7129e.js deleted file mode 100644 index 584f2053850b..000000000000 --- a/assets/js/c1bbdb2a.9bd7129e.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5558],{47008:(e,t,o)=>{o.r(t),o.d(t,{assets:()=>r,contentTitle:()=>a,default:()=>c,frontMatter:()=>i,metadata:()=>l,toc:()=>d});var n=o(74848),s=o(28453);const i={id:"learn-polkadot-host",title:"Polkadot Host (PH)",sidebar_label:"Polkadot Host",description:"The Polkadot Host and its Components.",keywords:["polkadot host","runtime"],slug:"../learn-polkadot-host"},a=void 0,l={id:"learn/learn-polkadot-host",title:"Polkadot Host (PH)",description:"The Polkadot Host and its Components.",source:"@site/../docs/learn/learn-polkadot-host.md",sourceDirName:"learn",slug:"/learn-polkadot-host",permalink:"/docs/learn-polkadot-host",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-polkadot-host.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1688135081e3,frontMatter:{id:"learn-polkadot-host",title:"Polkadot Host (PH)",sidebar_label:"Polkadot Host",description:"The Polkadot Host and its Components.",keywords:["polkadot host","runtime"],slug:"../learn-polkadot-host"},sidebar:"docs",previous:{title:"Components",permalink:"/docs/learn-components-index"},next:{title:"WebAssembly (Wasm)",permalink:"/docs/learn-wasm"}},r={},d=[{value:"Components of the Polkadot host",id:"components-of-the-polkadot-host",level:2},{value:"Polkadot Runtime",id:"polkadot-runtime",level:2},{value:"Code Executor",id:"code-executor",level:2},{value:"Resources",id:"resources",level:2}];function h(e){const t={a:"a",code:"code",em:"em",h2:"h2",img:"img",li:"li",ol:"ol",p:"p",ul:"ul",...(0,s.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(t.p,{children:["The architecture of Polkadot can be divided into two different parts, the Polkadot ",(0,n.jsx)(t.em,{children:"runtime"})," and the\nPolkadot ",(0,n.jsx)(t.em,{children:"host"}),". The Polkadot runtime is the core state transition logic of the chain and can be\nupgraded over the course of time and without the need for a hard fork. In comparison, the Polkadot\nhost is the environment in which the runtime executes and is expected to remain stable and mostly\nstatic over the lifetime of Polkadot."]}),"\n",(0,n.jsxs)(t.p,{children:["The Polkadot host interacts with the Polkadot runtime in limited, and well-specified ways. For this\nreason, implementation teams can build an alternative implementation of the Polkadot host while\ntreating the Polkadot runtime as a black box. For more details of the interactions between the host\nand the runtime, please see the ",(0,n.jsx)(t.a,{href:"https://spec.polkadot.network/",children:"specification"}),"."]}),"\n",(0,n.jsx)(t.h2,{id:"components-of-the-polkadot-host",children:"Components of the Polkadot host"}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:["Networking components such as ",(0,n.jsx)(t.code,{children:"Libp2p"})," that facilitates network interactions."]}),"\n",(0,n.jsx)(t.li,{children:"State storage and the storage trie along with the database layer."}),"\n",(0,n.jsx)(t.li,{children:"Consensus engine for GRANDPA and BABE."}),"\n",(0,n.jsx)(t.li,{children:"Wasm interpreter and virtual machine."}),"\n",(0,n.jsx)(t.li,{children:"Low level primitives for a blockchain, such as cryptographic primitives like hash functions."}),"\n"]}),"\n",(0,n.jsx)(t.p,{children:"A compiled Polkadot runtime, a blob of Wasm code, can be uploaded into the Polkadot host and used as\nthe logic for the execution of state transitions. Without a runtime, the Polkadot host is unable to\nmake state transitions or produce any blocks."}),"\n",(0,n.jsx)(t.p,{children:"A host node..."}),"\n",(0,n.jsxs)(t.ol,{children:["\n",(0,n.jsx)(t.li,{children:"must populate the state storage with the official genesis state."}),"\n",(0,n.jsx)(t.li,{children:"should maintain a set of around 50 active peers at any time. New peers can be found using the\ndiscovery protocols."}),"\n",(0,n.jsx)(t.li,{children:"should open and maintain the various required streams with each of its active peers."}),"\n",(0,n.jsx)(t.li,{children:"should send block requests to these peers to receive all blocks in the chain and execute each of\nthem."}),"\n",(0,n.jsx)(t.li,{children:"should exchange neighbor packets."}),"\n"]}),"\n",(0,n.jsx)(t.p,{children:"Consensus in the Polkadot Host is achieved during the execution of two different procedures,\nblock-production and finality. The Polkadot Host must run these procedures if (and only if) it is\nrunning on a validator node."}),"\n",(0,n.jsxs)(t.p,{children:["Additional information on each of these requirements can be found\n",(0,n.jsx)(t.a,{href:"https://spec.polkadot.network/#sect-node-full",children:"here"}),"."]}),"\n",(0,n.jsx)(t.h2,{id:"polkadot-runtime",children:"Polkadot Runtime"}),"\n",(0,n.jsx)(t.p,{children:"Below is a diagram that displays the Polkadot host surrounding the Polkadot runtime. Think of the\nruntime (in white) as a component that can be inserted, swapped out, or removed entirely. While the\nparts in grey are stable and can not change without an explicit hard fork."}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"polkadot host",src:o(34449).A+"",width:"923",height:"1018"})}),"\n",(0,n.jsx)(t.h2,{id:"code-executor",children:"Code Executor"}),"\n",(0,n.jsxs)(t.p,{children:["The Polkadot Host executes the calls of Runtime entrypoints inside a Wasm Virtual Machine (VM),\nwhich in turn provides the Runtime with access to the Polkadot Host API. This part of the Polkadot\nHost is referred to as the Executor. For additional technical implementation details, check out\n",(0,n.jsx)(t.a,{href:"https://spec.polkadot.network/#sect-code-executor",children:"this section"})," of the Polkadot Spec."]}),"\n",(0,n.jsx)(t.h2,{id:"resources",children:"Resources"}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://github.com/w3f/polkadot-spec",children:"Polkadot Host Protocol Specification"})," - Incubator for the\nPolkadot Host spec, including tests."]}),"\n",(0,n.jsx)(t.li,{children:(0,n.jsx)(t.a,{href:"https://github.com/ChainSafe/gossamer",children:"Gossamer: A Go implementation of the Polkadot Host"})}),"\n",(0,n.jsx)(t.li,{children:(0,n.jsx)(t.a,{href:"https://github.com/soramitsu/kagome",children:"Kagome - C++ implementation of Polkadot Host"})}),"\n"]})]})}function c(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(h,{...e})}):h(e)}},34449:(e,t,o)=>{o.d(t,{A:()=>n});const n=o.p+"assets/images/updated_pre-d5849e650527f0dc796f8cad044d1f35.png"},28453:(e,t,o)=>{o.d(t,{R:()=>a,x:()=>l});var n=o(96540);const s={},i=n.createContext(s);function a(e){const t=n.useContext(i);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function l(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:a(e.components),n.createElement(i.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/c1bbdb2a.f3b2b6be.js b/assets/js/c1bbdb2a.f3b2b6be.js new file mode 100644 index 000000000000..cac9b06eae54 --- /dev/null +++ b/assets/js/c1bbdb2a.f3b2b6be.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5558],{99435:(e,t,o)=>{o.r(t),o.d(t,{assets:()=>r,contentTitle:()=>l,default:()=>c,frontMatter:()=>a,metadata:()=>n,toc:()=>d});const n=JSON.parse('{"id":"learn/learn-polkadot-host","title":"Polkadot Host (PH)","description":"The Polkadot Host and its Components.","source":"@site/../docs/learn/learn-polkadot-host.md","sourceDirName":"learn","slug":"/learn-polkadot-host","permalink":"/docs/learn-polkadot-host","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-polkadot-host.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1688135081000,"frontMatter":{"id":"learn-polkadot-host","title":"Polkadot Host (PH)","sidebar_label":"Polkadot Host","description":"The Polkadot Host and its Components.","keywords":["polkadot host","runtime"],"slug":"../learn-polkadot-host"},"sidebar":"docs","previous":{"title":"Components","permalink":"/docs/learn-components-index"},"next":{"title":"WebAssembly (Wasm)","permalink":"/docs/learn-wasm"}}');var s=o(74848),i=o(28453);const a={id:"learn-polkadot-host",title:"Polkadot Host (PH)",sidebar_label:"Polkadot Host",description:"The Polkadot Host and its Components.",keywords:["polkadot host","runtime"],slug:"../learn-polkadot-host"},l=void 0,r={},d=[{value:"Components of the Polkadot host",id:"components-of-the-polkadot-host",level:2},{value:"Polkadot Runtime",id:"polkadot-runtime",level:2},{value:"Code Executor",id:"code-executor",level:2},{value:"Resources",id:"resources",level:2}];function h(e){const t={a:"a",code:"code",em:"em",h2:"h2",img:"img",li:"li",ol:"ol",p:"p",ul:"ul",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(t.p,{children:["The architecture of Polkadot can be divided into two different parts, the Polkadot ",(0,s.jsx)(t.em,{children:"runtime"})," and the\nPolkadot ",(0,s.jsx)(t.em,{children:"host"}),". The Polkadot runtime is the core state transition logic of the chain and can be\nupgraded over the course of time and without the need for a hard fork. In comparison, the Polkadot\nhost is the environment in which the runtime executes and is expected to remain stable and mostly\nstatic over the lifetime of Polkadot."]}),"\n",(0,s.jsxs)(t.p,{children:["The Polkadot host interacts with the Polkadot runtime in limited, and well-specified ways. For this\nreason, implementation teams can build an alternative implementation of the Polkadot host while\ntreating the Polkadot runtime as a black box. For more details of the interactions between the host\nand the runtime, please see the ",(0,s.jsx)(t.a,{href:"https://spec.polkadot.network/",children:"specification"}),"."]}),"\n",(0,s.jsx)(t.h2,{id:"components-of-the-polkadot-host",children:"Components of the Polkadot host"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:["Networking components such as ",(0,s.jsx)(t.code,{children:"Libp2p"})," that facilitates network interactions."]}),"\n",(0,s.jsx)(t.li,{children:"State storage and the storage trie along with the database layer."}),"\n",(0,s.jsx)(t.li,{children:"Consensus engine for GRANDPA and BABE."}),"\n",(0,s.jsx)(t.li,{children:"Wasm interpreter and virtual machine."}),"\n",(0,s.jsx)(t.li,{children:"Low level primitives for a blockchain, such as cryptographic primitives like hash functions."}),"\n"]}),"\n",(0,s.jsx)(t.p,{children:"A compiled Polkadot runtime, a blob of Wasm code, can be uploaded into the Polkadot host and used as\nthe logic for the execution of state transitions. Without a runtime, the Polkadot host is unable to\nmake state transitions or produce any blocks."}),"\n",(0,s.jsx)(t.p,{children:"A host node..."}),"\n",(0,s.jsxs)(t.ol,{children:["\n",(0,s.jsx)(t.li,{children:"must populate the state storage with the official genesis state."}),"\n",(0,s.jsx)(t.li,{children:"should maintain a set of around 50 active peers at any time. New peers can be found using the\ndiscovery protocols."}),"\n",(0,s.jsx)(t.li,{children:"should open and maintain the various required streams with each of its active peers."}),"\n",(0,s.jsx)(t.li,{children:"should send block requests to these peers to receive all blocks in the chain and execute each of\nthem."}),"\n",(0,s.jsx)(t.li,{children:"should exchange neighbor packets."}),"\n"]}),"\n",(0,s.jsx)(t.p,{children:"Consensus in the Polkadot Host is achieved during the execution of two different procedures,\nblock-production and finality. The Polkadot Host must run these procedures if (and only if) it is\nrunning on a validator node."}),"\n",(0,s.jsxs)(t.p,{children:["Additional information on each of these requirements can be found\n",(0,s.jsx)(t.a,{href:"https://spec.polkadot.network/#sect-node-full",children:"here"}),"."]}),"\n",(0,s.jsx)(t.h2,{id:"polkadot-runtime",children:"Polkadot Runtime"}),"\n",(0,s.jsx)(t.p,{children:"Below is a diagram that displays the Polkadot host surrounding the Polkadot runtime. Think of the\nruntime (in white) as a component that can be inserted, swapped out, or removed entirely. While the\nparts in grey are stable and can not change without an explicit hard fork."}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{alt:"polkadot host",src:o(34449).A+"",width:"923",height:"1018"})}),"\n",(0,s.jsx)(t.h2,{id:"code-executor",children:"Code Executor"}),"\n",(0,s.jsxs)(t.p,{children:["The Polkadot Host executes the calls of Runtime entrypoints inside a Wasm Virtual Machine (VM),\nwhich in turn provides the Runtime with access to the Polkadot Host API. This part of the Polkadot\nHost is referred to as the Executor. For additional technical implementation details, check out\n",(0,s.jsx)(t.a,{href:"https://spec.polkadot.network/#sect-code-executor",children:"this section"})," of the Polkadot Spec."]}),"\n",(0,s.jsx)(t.h2,{id:"resources",children:"Resources"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.a,{href:"https://github.com/w3f/polkadot-spec",children:"Polkadot Host Protocol Specification"})," - Incubator for the\nPolkadot Host spec, including tests."]}),"\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.a,{href:"https://github.com/ChainSafe/gossamer",children:"Gossamer: A Go implementation of the Polkadot Host"})}),"\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.a,{href:"https://github.com/soramitsu/kagome",children:"Kagome - C++ implementation of Polkadot Host"})}),"\n"]})]})}function c(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}},34449:(e,t,o)=>{o.d(t,{A:()=>n});const n=o.p+"assets/images/updated_pre-d5849e650527f0dc796f8cad044d1f35.png"},28453:(e,t,o)=>{o.d(t,{R:()=>a,x:()=>l});var n=o(96540);const s={},i=n.createContext(s);function a(e){const t=n.useContext(i);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function l(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:a(e.components),n.createElement(i.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/c2c6a3a6.3fb6b06b.js b/assets/js/c2c6a3a6.3fb6b06b.js deleted file mode 100644 index d07659fa5821..000000000000 --- a/assets/js/c2c6a3a6.3fb6b06b.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8506],{2506:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>c,frontMatter:()=>a,metadata:()=>r,toc:()=>h});var s=n(74848),o=n(28453);const a={id:"learn-nft-projects",title:"NFT projects on Polkadot and Kusama",sidebar_label:"NFT Projects",description:"NFT Projects in the Polkadot Ecosystem.",keywords:["NFT","non-fungible token","NFT 2.0"],slug:"../learn-nft-projects"},i=void 0,r={id:"learn/learn-nft-projects",title:"NFT projects on Polkadot and Kusama",description:"NFT Projects in the Polkadot Ecosystem.",source:"@site/../docs/learn/learn-nft-projects.md",sourceDirName:"learn",slug:"/learn-nft-projects",permalink:"/docs/learn-nft-projects",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-nft-projects.md",tags:[],version:"current",lastUpdatedBy:"bader y",lastUpdatedAt:1723795705e3,frontMatter:{id:"learn-nft-projects",title:"NFT projects on Polkadot and Kusama",sidebar_label:"NFT Projects",description:"NFT Projects in the Polkadot Ecosystem.",keywords:["NFT","non-fungible token","NFT 2.0"],slug:"../learn-nft-projects"},sidebar:"docs",previous:{title:"Multisig Apps",permalink:"/docs/multisig-apps"},next:{title:"Parachain Apps",permalink:"/docs/parachains-apps"}},l={},h=[{value:"List of NFT Projects",id:"list-of-nft-projects",level:2},{value:"Astar",id:"astar",level:2},{value:"Basilisk",id:"basilisk",level:2},{value:"KodaDot",id:"kodadot",level:2},{value:"The Team Behind KodaDot",id:"the-team-behind-kodadot",level:3},{value:"Ecosystem Tools by KodaDot",id:"ecosystem-tools-by-kodadot",level:3},{value:"Moonbeam",id:"moonbeam",level:2},{value:"RMRK",id:"rmrk",level:2},{value:"NFT Legos",id:"nft-legos",level:3},{value:"NFT from Kanaria",id:"nft-from-kanaria",level:3},{value:"Asset Hub",id:"asset-hub",level:2},{value:"Unique Network",id:"unique-network",level:2}];function d(e){const t={a:"a",admonition:"admonition",h2:"h2",h3:"h3",img:"img",li:"li",ol:"ol",p:"p",ul:"ul",...(0,o.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.admonition,{title:"Community Page",type:"info",children:(0,s.jsxs)(t.p,{children:["This page is open to contributions from the community. Please follow the\n",(0,s.jsx)(t.a,{href:"https://github.com/w3f/polkadot-wiki#contributing-to-documentation",children:"Wiki contribution guidelines"}),"\nand add your NFT app to this page."]})}),"\n",(0,s.jsx)(t.h2,{id:"list-of-nft-projects",children:"List of NFT Projects"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.a,{href:"#astar",children:"Astar"})}),"\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.a,{href:"#basilisk",children:"Basilisk"})}),"\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.a,{href:"#kodadot",children:"KodaDot"})}),"\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.a,{href:"#moonbeam",children:"Moonbeam"})}),"\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.a,{href:"#rmrk",children:"RMRK"})}),"\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.a,{href:"#asset-hub",children:"Asset Hub"})}),"\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.a,{href:"#unique-network",children:"Unique Network"})}),"\n"]}),"\n",(0,s.jsx)(t.h2,{id:"astar",children:"Astar"}),"\n",(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.a,{href:"https://astar.network",children:"Astar Network"})," and its sister network\n",(0,s.jsx)(t.a,{href:"https://shiden.astar.network",children:"Shiden Network"}),' are the smart contract infrastructure in the Polkadot\nEcosystem. Astar Ecosystem ("Astar") supports NFTs developed with EVM smart contracts and WASM smart\ncontracts.']}),"\n",(0,s.jsxs)(t.p,{children:["Astar has all toolings available that every EVM NFT developer knows. The availability of those\ntoolings makes the onboarding to Astar networks very attractive to any developer looking to explore\nthe Polkadot Ecosystem. Astar has an active community of artists and NFT enthusiasts. Besides\nsupporting all EVM toolings, Astar also bootstrapped the WASM smart contract environment for NFT\ndevelopers writing smart contracts with ",(0,s.jsx)(t.a,{href:"https://use.ink",children:"ink!"})," based on\n",(0,s.jsx)(t.a,{href:"https://github.com/w3f/PSPs/blob/master/PSPs/psp-34.md",children:"PSP34"})," (Polkadot Standards Proposals)."]}),"\n",(0,s.jsxs)(t.p,{children:["The main advantage of having a multi-virtual machine environment for NFT developers is that it will\ngive more possibilities to the builders for the use case they are developing. With the support of\nWASM smart contracts, developers can develop solutions like ",(0,s.jsx)(t.a,{href:"./learn-nft#rmrk",children:"RMRK"})," with smart\ncontracts."]}),"\n",(0,s.jsx)(t.h2,{id:"basilisk",children:"Basilisk"}),"\n",(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.a,{href:"https://bsx.fi/",children:"Basilisk"})," is a Kusama parachain that provides liquidity for the ecosystem. It also\nhas a full-featured NFT platform based on the\n",(0,s.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/substrate/frame/uniques",children:"Uniques pallet"}),".\nOne of the key features of Basilisk is that it allows minting NFTs with a royalty fee. This royalty\nfee is distributed to the original creator of the NFT via the runtime pallet. Additionally\n",(0,s.jsx)(t.a,{href:"https://github.com/galacticcouncil/Basilisk-node/tree/master/pallets/marketplace",children:"Basilisk offers a feature"}),"\nthat allows creating a buy order for a specific NFT."]}),"\n",(0,s.jsxs)(t.p,{children:["These NFTs can be viewed and interacted instantly on ",(0,s.jsx)(t.a,{href:"https://kodadot.xyz",children:"KodaDot"}),"."]}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{alt:"nft-basilisk",src:n(20782).A+"",width:"3358",height:"1564"})}),"\n",(0,s.jsx)(t.h2,{id:"kodadot",children:(0,s.jsx)(t.a,{href:"https://kodadot.xyz",children:"KodaDot"})}),"\n",(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.a,{href:"https://kodadot.xyz",children:"KodaDot"})," is an open-source NFT marketplace that operates on the Dotsama\n(Kusama/Polkadot) network, striving to aggregate various NFT standards (Kusama, RMRK, Asset Hub,\nBasilisk, etc.) in the Dotsama ecosystem, enhancing user experience by abstracting these standards."]}),"\n",(0,s.jsxs)(t.p,{children:["KodaDot's strength lies in its commitment to open-source collaboration. It has transformed into a\ncollaborative hub where creators, developers, and community members work collectively for decision\nmaking, amassing an extensive network of over\n",(0,s.jsx)(t.a,{href:"https://hello.kodadot.xyz/about-us/who-are-we/achievements",children:"90 open-source contributors"}),". This\nrobust collaboration has earned KodaDot the\n",(0,s.jsx)(t.a,{href:"https://github.com/topics/polkadot",children:"number one rank as a dapp in the Polkadot ecosystem on Github"}),"."]}),"\n",(0,s.jsxs)(t.p,{children:["See below a video tutorial about how to mint your NFT on ",(0,s.jsx)(t.a,{href:"#asset-hub",children:"the Polkadot Asset Hub"})," using\nKodaDot."]}),"\n",(0,s.jsx)("div",{className:"row",children:(0,s.jsxs)("div",{className:"col text--center",children:[(0,s.jsx)("a",{href:"https://www.youtube.com/watch?v=SKdx4pTgL04",children:(0,s.jsx)("img",{src:"https://img.youtube.com/vi/SKdx4pTgL04/0.jpg",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,s.jsx)("p",{children:(0,s.jsx)("a",{href:"https://www.youtube.com/watch?v=SKdx4pTgL04",children:"KodaDot Tutorial on Minting NFTs"})})]})}),"\n",(0,s.jsxs)(t.p,{children:["For more information about minting using KodaDot see\n",(0,s.jsx)(t.a,{href:"https://hello.kodadot.xyz/tutorial/minting/how-to-mint-nfts-on-polkadot-asset-hub-using-kodadot",children:"this step-by-step tutorial"}),"."]}),"\n",(0,s.jsx)(t.h3,{id:"the-team-behind-kodadot",children:"The Team Behind KodaDot"}),"\n",(0,s.jsxs)(t.p,{children:["KodaDot began as the first\n",(0,s.jsx)(t.a,{href:"https://kusama.polkassembly.io/motion/256",children:"unofficial explorer for RMRKv0.0.1"}),"\n",(0,s.jsx)(t.a,{href:"https://github.com/rmrk-team/rmrk-spec/issues/10",children:"contributing to RMRK protocol"}),". It later\n",(0,s.jsx)(t.a,{href:"https://kusama.polkassembly.io/motion/349",children:"received Kusama Treasury funding"}),", which propelled the\nteam to create the\n",(0,s.jsx)(t.a,{href:"https://kusama.polkassembly.io/motion/349",children:"best end-user experience on the Asset hub"}),"."]}),"\n",(0,s.jsxs)(t.p,{children:["In the summer of 2022, KodaDot won the first prize at the\n",(0,s.jsx)(t.a,{href:"https://devpost.com/software/kodadot-moonsama",children:"Polkadot North American event"})," for implementing\nMoonBeam and MoonRiver NFT EVM smart contracts and enabling read-only access to existing components\nfor seamless end-user interaction."]}),"\n",(0,s.jsxs)(t.p,{children:["The team successfully\n",(0,s.jsx)(t.a,{href:"https://github.com/kodadot/nft-gallery/issues/660",children:"launched with Basilisk NFT Marketplace pallet in Fall 2022"}),",\nwhere an increasing number of artist collections are emerging, providing artists the opportunity to\nreceive offers on unlisted NFTs and earn on-chain royalties."]}),"\n",(0,s.jsxs)(t.p,{children:["KodaDot's upcoming integrations are based on\n",(0,s.jsx)(t.a,{href:"https://github.com/w3f/PSPs/blob/master/PSPs/psp-34.md",children:"PSP-34"}),", leveraging\n",(0,s.jsx)(t.a,{href:"https://use.ink/",children:"smart contracts written with ink!"}),"."]}),"\n",(0,s.jsx)(t.h3,{id:"ecosystem-tools-by-kodadot",children:"Ecosystem Tools by KodaDot"}),"\n",(0,s.jsxs)(t.p,{children:["KodaDot has enriched the Polkadot ecosystem by\n",(0,s.jsx)(t.a,{href:"https://github.com/kodadot/uniquery",children:"offering a comprehensive API interface for builders"}),", based on\nthe SubSquid indexer. This platform also presents searchable items and collections, translating\non-chain transactions into deep insights about collection ownership dynamics for end-users. For more\ninfo about KodaDot check out ",(0,s.jsx)(t.a,{href:"https://hello.kodadot.xyz/",children:"link"}),"."]}),"\n",(0,s.jsx)(t.h2,{id:"moonbeam",children:"Moonbeam"}),"\n",(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.a,{href:"https://moonbeam.network",children:"Moonbeam"})," and its Kusama counterpart Moonriver are full EVM deployments\nwith Ethereum RPC endpoints."]}),"\n",(0,s.jsx)(t.p,{children:"This means that the entire toolkit offered to other EVM chains (stacks like Hardhat, Remix, Truffle,\nMetamask, etc.) are available to Moonriver / Moonbeam users and developers, giving it a noticeable\nhead start in attracting existing userbases."}),"\n",(0,s.jsx)(t.p,{children:"Several dozen high profile teams are launching their products (or re-launching) on Moonriver /\nMoonbeam, however, it is essential to note that Moonbeam is an EVM chain and will therefore suffer\nfrom the same limitations as any other EVM chain in regards to customization and feature-richness of\nNFTs."}),"\n",(0,s.jsx)(t.p,{children:"A notable advantage, however, is that Moonriver / Moonbeam is still a Substrate chain, meaning\nintegration of custom pallets into the runtime is still possible, making NFT specific optimizations\nat the chain runtime level a reliable way to keep EVM compatibility of tools while at the same time\noptimizing storage and interactions for rich NFTs."}),"\n",(0,s.jsx)(t.h2,{id:"rmrk",children:"RMRK"}),"\n",(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.a,{href:"https://rmrk.app",children:"RMRK"})," is a set of NFT 2.0 standards developed in three distinct code flavors:"]}),"\n",(0,s.jsxs)(t.ol,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.a,{href:"https://en.bitcoin.it/wiki/Colored_Coins",children:'"Colored coins"'}),' approach, as on Bitcoin, originally\ndeveloped as a "hack" on the Kusama chain. This is now deprecated, and it is recommended\nimplementers use any of the other options.']}),"\n",(0,s.jsxs)(t.li,{children:["Solidity contracts, compatible with any EVM blockchain in and outside the Polkadot ecosystem.\nDocumented ",(0,s.jsx)(t.a,{href:"https://evm.rmrk.app",children:"here"})]}),"\n",(0,s.jsxs)(t.li,{children:["Rust code (Substrate pallets), compatible with any Substrate chain. Code is available\n",(0,s.jsx)(t.a,{href:"https://github.com/rmrk-team/rmrk-substrate",children:"here"}),"."]}),"\n"]}),"\n",(0,s.jsx)(t.p,{children:"Additionally, two more flavors are in development:"}),"\n",(0,s.jsxs)(t.ol,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.a,{href:"https://astar.network/",children:"Astar"})," are developing the ink! version of RMRK:\n",(0,s.jsx)(t.a,{href:"https://github.com/rmrk-team/rmrk-ink",children:"code here"}),"."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.a,{href:"https://www.gear-tech.io/",children:"Gear Technologies"})," are developing the Gear implementation:\n",(0,s.jsx)(t.a,{href:"https://wiki.gear-tech.io/docs/examples/rmrk/",children:"code and docs here"}),"."]}),"\n"]}),"\n",(0,s.jsx)(t.p,{children:'The RMRK NFT 2.0 standards are a set of "NFT legos", primitives that, when put together, allow a\nbuilder to compose an NFT system of arbitrary complexity without smart contracts.'}),"\n",(0,s.jsx)(t.h3,{id:"nft-legos",children:"NFT Legos"}),"\n",(0,s.jsxs)(t.ol,{children:["\n",(0,s.jsx)(t.li,{children:"NFTs can own other NFTs, NFTs can equip other NFTs for visual change"}),"\n",(0,s.jsx)(t.li,{children:"NFTs can have multiple resources (different outputs based on context and resource priority)"}),"\n",(0,s.jsx)(t.li,{children:"NFTs can have on-chain emotes (reactions) for price discovery and social mechanics"}),"\n",(0,s.jsx)(t.li,{children:"NFTs have conditional rendering (e.g. show Mona Lisa as blushing if she got 50 kissy \ud83d\ude18 emoji)"}),"\n",(0,s.jsx)(t.li,{children:"NFTs can be governed by the community via fungible shareholder-tokens (fractionalization of NFTs)"}),"\n"]}),"\n",(0,s.jsxs)(t.h3,{id:"nft-from-kanaria",children:["NFT from ",(0,s.jsx)(t.a,{href:"https://kanaria.rmrk.app",children:"Kanaria"})]}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{alt:"kanaria.png",src:n(52886).A+"",width:"1891",height:"799"})}),"\n",(0,s.jsx)(t.admonition,{title:"Multi-resource NFTs",type:"note",children:(0,s.jsx)(t.p,{children:'A multi-resource NFT (gif of statue, and SVG-composable dynamic NFT in one) that can also equip\nother NFTs from within its "inventory".'})}),"\n",(0,s.jsx)(t.p,{children:"Two marketplaces for RMRK-based NFTs exist with hundreds of projects already launched:"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.a,{href:"https://singular.rmrk.app",children:"Singular"}),", the official marketplace"]}),"\n"]}),"\n",(0,s.jsxs)(t.p,{children:["For a complete introduction into RMRK, see ",(0,s.jsx)(t.a,{href:"https://url.rmrk.app/wasmconf",children:"this presentation"})," or\nread ",(0,s.jsx)(t.a,{href:"https://docs.rmrk.app",children:"the non-technical docs"}),"."]}),"\n",(0,s.jsx)(t.h2,{id:"asset-hub",children:"Asset Hub"}),"\n",(0,s.jsxs)(t.p,{children:["The Asset Hub is a generic assets parachain which provides functionality for deploying and\ntransferring assets \u2014 both Fungible and Non-Fungible Tokens (NFTs). The Asset Hub currently hosts\n",(0,s.jsx)(t.a,{href:"./learn-nft-pallets.md/#uniques-pallet",children:"Uniques pallet"})," and the\n",(0,s.jsx)(t.a,{href:"/docs/learn-nft-pallets#nfts-pallet",children:"NFTs pallet"})," with NFT 2.0 functionalities."]}),"\n",(0,s.jsx)(t.h2,{id:"unique-network",children:"Unique Network"}),"\n",(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.a,{href:"https://unique.network/",children:"Unique network"}),", an NFT-specific blockchain offering innovations such as\nsponsored transactions, bundling fungible tokens with non-fungibles, and splitting NFTs into\nfungible tokens for partial ownership."]}),"\n",(0,s.jsxs)(t.p,{children:["Unique Network have launched two NFT projects to date: Substrapunks as part of\n",(0,s.jsx)(t.a,{href:"https://hackusama.devpost.com/",children:"Hackusama"}),", and Chelobricks as a promotion during\n",(0,s.jsx)(t.a,{href:"https://decoded.polkadot.network/",children:"Polkadot Decoded"}),"."]}),"\n",(0,s.jsx)(t.p,{children:"Unique Network focuses on B2B use cases, aiming to be an infrastructure provider for others to build\non, rather than entering the NFT space themselves as an end-product."}),"\n",(0,s.jsx)(t.p,{children:"Unique Network aims to make their marketplace technology open-source and whitelabel-friendly. In\ntheory, it should be trivial to set up a new marketplace for your project using Unique's technology.\nUnique network aims to be a parachain on Polkadot, and Quartz is their Kusama counterpart."})]})}function c(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},52886:(e,t,n)=>{n.d(t,{A:()=>s});const s=n.p+"assets/images/kanaria-55b0060679c6303db0fc91f5c402ba02.png"},20782:(e,t,n)=>{n.d(t,{A:()=>s});const s=n.p+"assets/images/nft-basilisk-654977e2e97885e796857fc2e2add909.png"},28453:(e,t,n)=>{n.d(t,{R:()=>i,x:()=>r});var s=n(96540);const o={},a=s.createContext(o);function i(e){const t=s.useContext(a);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:i(e.components),s.createElement(a.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/c2c6a3a6.416f7fd8.js b/assets/js/c2c6a3a6.416f7fd8.js new file mode 100644 index 000000000000..f4f360ce80e7 --- /dev/null +++ b/assets/js/c2c6a3a6.416f7fd8.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8506],{39323:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>r,default:()=>c,frontMatter:()=>i,metadata:()=>s,toc:()=>h});const s=JSON.parse('{"id":"learn/learn-nft-projects","title":"NFT projects on Polkadot and Kusama","description":"NFT Projects in the Polkadot Ecosystem.","source":"@site/../docs/learn/learn-nft-projects.md","sourceDirName":"learn","slug":"/learn-nft-projects","permalink":"/docs/learn-nft-projects","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-nft-projects.md","tags":[],"version":"current","lastUpdatedBy":"bader y","lastUpdatedAt":1723795705000,"frontMatter":{"id":"learn-nft-projects","title":"NFT projects on Polkadot and Kusama","sidebar_label":"NFT Projects","description":"NFT Projects in the Polkadot Ecosystem.","keywords":["NFT","non-fungible token","NFT 2.0"],"slug":"../learn-nft-projects"},"sidebar":"docs","previous":{"title":"Multisig Apps","permalink":"/docs/multisig-apps"},"next":{"title":"Parachain Apps","permalink":"/docs/parachains-apps"}}');var a=n(74848),o=n(28453);const i={id:"learn-nft-projects",title:"NFT projects on Polkadot and Kusama",sidebar_label:"NFT Projects",description:"NFT Projects in the Polkadot Ecosystem.",keywords:["NFT","non-fungible token","NFT 2.0"],slug:"../learn-nft-projects"},r=void 0,l={},h=[{value:"List of NFT Projects",id:"list-of-nft-projects",level:2},{value:"Astar",id:"astar",level:2},{value:"Basilisk",id:"basilisk",level:2},{value:"KodaDot",id:"kodadot",level:2},{value:"The Team Behind KodaDot",id:"the-team-behind-kodadot",level:3},{value:"Ecosystem Tools by KodaDot",id:"ecosystem-tools-by-kodadot",level:3},{value:"Moonbeam",id:"moonbeam",level:2},{value:"RMRK",id:"rmrk",level:2},{value:"NFT Legos",id:"nft-legos",level:3},{value:"NFT from Kanaria",id:"nft-from-kanaria",level:3},{value:"Asset Hub",id:"asset-hub",level:2},{value:"Unique Network",id:"unique-network",level:2}];function d(e){const t={a:"a",admonition:"admonition",h2:"h2",h3:"h3",img:"img",li:"li",ol:"ol",p:"p",ul:"ul",...(0,o.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(t.admonition,{title:"Community Page",type:"info",children:(0,a.jsxs)(t.p,{children:["This page is open to contributions from the community. Please follow the\n",(0,a.jsx)(t.a,{href:"https://github.com/w3f/polkadot-wiki#contributing-to-documentation",children:"Wiki contribution guidelines"}),"\nand add your NFT app to this page."]})}),"\n",(0,a.jsx)(t.h2,{id:"list-of-nft-projects",children:"List of NFT Projects"}),"\n",(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsx)(t.li,{children:(0,a.jsx)(t.a,{href:"#astar",children:"Astar"})}),"\n",(0,a.jsx)(t.li,{children:(0,a.jsx)(t.a,{href:"#basilisk",children:"Basilisk"})}),"\n",(0,a.jsx)(t.li,{children:(0,a.jsx)(t.a,{href:"#kodadot",children:"KodaDot"})}),"\n",(0,a.jsx)(t.li,{children:(0,a.jsx)(t.a,{href:"#moonbeam",children:"Moonbeam"})}),"\n",(0,a.jsx)(t.li,{children:(0,a.jsx)(t.a,{href:"#rmrk",children:"RMRK"})}),"\n",(0,a.jsx)(t.li,{children:(0,a.jsx)(t.a,{href:"#asset-hub",children:"Asset Hub"})}),"\n",(0,a.jsx)(t.li,{children:(0,a.jsx)(t.a,{href:"#unique-network",children:"Unique Network"})}),"\n"]}),"\n",(0,a.jsx)(t.h2,{id:"astar",children:"Astar"}),"\n",(0,a.jsxs)(t.p,{children:[(0,a.jsx)(t.a,{href:"https://astar.network",children:"Astar Network"})," and its sister network\n",(0,a.jsx)(t.a,{href:"https://shiden.astar.network",children:"Shiden Network"}),' are the smart contract infrastructure in the Polkadot\nEcosystem. Astar Ecosystem ("Astar") supports NFTs developed with EVM smart contracts and WASM smart\ncontracts.']}),"\n",(0,a.jsxs)(t.p,{children:["Astar has all toolings available that every EVM NFT developer knows. The availability of those\ntoolings makes the onboarding to Astar networks very attractive to any developer looking to explore\nthe Polkadot Ecosystem. Astar has an active community of artists and NFT enthusiasts. Besides\nsupporting all EVM toolings, Astar also bootstrapped the WASM smart contract environment for NFT\ndevelopers writing smart contracts with ",(0,a.jsx)(t.a,{href:"https://use.ink",children:"ink!"})," based on\n",(0,a.jsx)(t.a,{href:"https://github.com/w3f/PSPs/blob/master/PSPs/psp-34.md",children:"PSP34"})," (Polkadot Standards Proposals)."]}),"\n",(0,a.jsxs)(t.p,{children:["The main advantage of having a multi-virtual machine environment for NFT developers is that it will\ngive more possibilities to the builders for the use case they are developing. With the support of\nWASM smart contracts, developers can develop solutions like ",(0,a.jsx)(t.a,{href:"./learn-nft#rmrk",children:"RMRK"})," with smart\ncontracts."]}),"\n",(0,a.jsx)(t.h2,{id:"basilisk",children:"Basilisk"}),"\n",(0,a.jsxs)(t.p,{children:[(0,a.jsx)(t.a,{href:"https://bsx.fi/",children:"Basilisk"})," is a Kusama parachain that provides liquidity for the ecosystem. It also\nhas a full-featured NFT platform based on the\n",(0,a.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/substrate/frame/uniques",children:"Uniques pallet"}),".\nOne of the key features of Basilisk is that it allows minting NFTs with a royalty fee. This royalty\nfee is distributed to the original creator of the NFT via the runtime pallet. Additionally\n",(0,a.jsx)(t.a,{href:"https://github.com/galacticcouncil/Basilisk-node/tree/master/pallets/marketplace",children:"Basilisk offers a feature"}),"\nthat allows creating a buy order for a specific NFT."]}),"\n",(0,a.jsxs)(t.p,{children:["These NFTs can be viewed and interacted instantly on ",(0,a.jsx)(t.a,{href:"https://kodadot.xyz",children:"KodaDot"}),"."]}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"nft-basilisk",src:n(20782).A+"",width:"3358",height:"1564"})}),"\n",(0,a.jsx)(t.h2,{id:"kodadot",children:(0,a.jsx)(t.a,{href:"https://kodadot.xyz",children:"KodaDot"})}),"\n",(0,a.jsxs)(t.p,{children:[(0,a.jsx)(t.a,{href:"https://kodadot.xyz",children:"KodaDot"})," is an open-source NFT marketplace that operates on the Dotsama\n(Kusama/Polkadot) network, striving to aggregate various NFT standards (Kusama, RMRK, Asset Hub,\nBasilisk, etc.) in the Dotsama ecosystem, enhancing user experience by abstracting these standards."]}),"\n",(0,a.jsxs)(t.p,{children:["KodaDot's strength lies in its commitment to open-source collaboration. It has transformed into a\ncollaborative hub where creators, developers, and community members work collectively for decision\nmaking, amassing an extensive network of over\n",(0,a.jsx)(t.a,{href:"https://hello.kodadot.xyz/about-us/who-are-we/achievements",children:"90 open-source contributors"}),". This\nrobust collaboration has earned KodaDot the\n",(0,a.jsx)(t.a,{href:"https://github.com/topics/polkadot",children:"number one rank as a dapp in the Polkadot ecosystem on Github"}),"."]}),"\n",(0,a.jsxs)(t.p,{children:["See below a video tutorial about how to mint your NFT on ",(0,a.jsx)(t.a,{href:"#asset-hub",children:"the Polkadot Asset Hub"})," using\nKodaDot."]}),"\n",(0,a.jsx)("div",{className:"row",children:(0,a.jsxs)("div",{className:"col text--center",children:[(0,a.jsx)("a",{href:"https://www.youtube.com/watch?v=SKdx4pTgL04",children:(0,a.jsx)("img",{src:"https://img.youtube.com/vi/SKdx4pTgL04/0.jpg",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,a.jsx)("p",{children:(0,a.jsx)("a",{href:"https://www.youtube.com/watch?v=SKdx4pTgL04",children:"KodaDot Tutorial on Minting NFTs"})})]})}),"\n",(0,a.jsxs)(t.p,{children:["For more information about minting using KodaDot see\n",(0,a.jsx)(t.a,{href:"https://hello.kodadot.xyz/tutorial/minting/how-to-mint-nfts-on-polkadot-asset-hub-using-kodadot",children:"this step-by-step tutorial"}),"."]}),"\n",(0,a.jsx)(t.h3,{id:"the-team-behind-kodadot",children:"The Team Behind KodaDot"}),"\n",(0,a.jsxs)(t.p,{children:["KodaDot began as the first\n",(0,a.jsx)(t.a,{href:"https://kusama.polkassembly.io/motion/256",children:"unofficial explorer for RMRKv0.0.1"}),"\n",(0,a.jsx)(t.a,{href:"https://github.com/rmrk-team/rmrk-spec/issues/10",children:"contributing to RMRK protocol"}),". It later\n",(0,a.jsx)(t.a,{href:"https://kusama.polkassembly.io/motion/349",children:"received Kusama Treasury funding"}),", which propelled the\nteam to create the\n",(0,a.jsx)(t.a,{href:"https://kusama.polkassembly.io/motion/349",children:"best end-user experience on the Asset hub"}),"."]}),"\n",(0,a.jsxs)(t.p,{children:["In the summer of 2022, KodaDot won the first prize at the\n",(0,a.jsx)(t.a,{href:"https://devpost.com/software/kodadot-moonsama",children:"Polkadot North American event"})," for implementing\nMoonBeam and MoonRiver NFT EVM smart contracts and enabling read-only access to existing components\nfor seamless end-user interaction."]}),"\n",(0,a.jsxs)(t.p,{children:["The team successfully\n",(0,a.jsx)(t.a,{href:"https://github.com/kodadot/nft-gallery/issues/660",children:"launched with Basilisk NFT Marketplace pallet in Fall 2022"}),",\nwhere an increasing number of artist collections are emerging, providing artists the opportunity to\nreceive offers on unlisted NFTs and earn on-chain royalties."]}),"\n",(0,a.jsxs)(t.p,{children:["KodaDot's upcoming integrations are based on\n",(0,a.jsx)(t.a,{href:"https://github.com/w3f/PSPs/blob/master/PSPs/psp-34.md",children:"PSP-34"}),", leveraging\n",(0,a.jsx)(t.a,{href:"https://use.ink/",children:"smart contracts written with ink!"}),"."]}),"\n",(0,a.jsx)(t.h3,{id:"ecosystem-tools-by-kodadot",children:"Ecosystem Tools by KodaDot"}),"\n",(0,a.jsxs)(t.p,{children:["KodaDot has enriched the Polkadot ecosystem by\n",(0,a.jsx)(t.a,{href:"https://github.com/kodadot/uniquery",children:"offering a comprehensive API interface for builders"}),", based on\nthe SubSquid indexer. This platform also presents searchable items and collections, translating\non-chain transactions into deep insights about collection ownership dynamics for end-users. For more\ninfo about KodaDot check out ",(0,a.jsx)(t.a,{href:"https://hello.kodadot.xyz/",children:"link"}),"."]}),"\n",(0,a.jsx)(t.h2,{id:"moonbeam",children:"Moonbeam"}),"\n",(0,a.jsxs)(t.p,{children:[(0,a.jsx)(t.a,{href:"https://moonbeam.network",children:"Moonbeam"})," and its Kusama counterpart Moonriver are full EVM deployments\nwith Ethereum RPC endpoints."]}),"\n",(0,a.jsx)(t.p,{children:"This means that the entire toolkit offered to other EVM chains (stacks like Hardhat, Remix, Truffle,\nMetamask, etc.) are available to Moonriver / Moonbeam users and developers, giving it a noticeable\nhead start in attracting existing userbases."}),"\n",(0,a.jsx)(t.p,{children:"Several dozen high profile teams are launching their products (or re-launching) on Moonriver /\nMoonbeam, however, it is essential to note that Moonbeam is an EVM chain and will therefore suffer\nfrom the same limitations as any other EVM chain in regards to customization and feature-richness of\nNFTs."}),"\n",(0,a.jsx)(t.p,{children:"A notable advantage, however, is that Moonriver / Moonbeam is still a Substrate chain, meaning\nintegration of custom pallets into the runtime is still possible, making NFT specific optimizations\nat the chain runtime level a reliable way to keep EVM compatibility of tools while at the same time\noptimizing storage and interactions for rich NFTs."}),"\n",(0,a.jsx)(t.h2,{id:"rmrk",children:"RMRK"}),"\n",(0,a.jsxs)(t.p,{children:[(0,a.jsx)(t.a,{href:"https://rmrk.app",children:"RMRK"})," is a set of NFT 2.0 standards developed in three distinct code flavors:"]}),"\n",(0,a.jsxs)(t.ol,{children:["\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.a,{href:"https://en.bitcoin.it/wiki/Colored_Coins",children:'"Colored coins"'}),' approach, as on Bitcoin, originally\ndeveloped as a "hack" on the Kusama chain. This is now deprecated, and it is recommended\nimplementers use any of the other options.']}),"\n",(0,a.jsxs)(t.li,{children:["Solidity contracts, compatible with any EVM blockchain in and outside the Polkadot ecosystem.\nDocumented ",(0,a.jsx)(t.a,{href:"https://evm.rmrk.app",children:"here"})]}),"\n",(0,a.jsxs)(t.li,{children:["Rust code (Substrate pallets), compatible with any Substrate chain. Code is available\n",(0,a.jsx)(t.a,{href:"https://github.com/rmrk-team/rmrk-substrate",children:"here"}),"."]}),"\n"]}),"\n",(0,a.jsx)(t.p,{children:"Additionally, two more flavors are in development:"}),"\n",(0,a.jsxs)(t.ol,{children:["\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.a,{href:"https://astar.network/",children:"Astar"})," are developing the ink! version of RMRK:\n",(0,a.jsx)(t.a,{href:"https://github.com/rmrk-team/rmrk-ink",children:"code here"}),"."]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.a,{href:"https://www.gear-tech.io/",children:"Gear Technologies"})," are developing the Gear implementation:\n",(0,a.jsx)(t.a,{href:"https://wiki.gear-tech.io/docs/examples/rmrk/",children:"code and docs here"}),"."]}),"\n"]}),"\n",(0,a.jsx)(t.p,{children:'The RMRK NFT 2.0 standards are a set of "NFT legos", primitives that, when put together, allow a\nbuilder to compose an NFT system of arbitrary complexity without smart contracts.'}),"\n",(0,a.jsx)(t.h3,{id:"nft-legos",children:"NFT Legos"}),"\n",(0,a.jsxs)(t.ol,{children:["\n",(0,a.jsx)(t.li,{children:"NFTs can own other NFTs, NFTs can equip other NFTs for visual change"}),"\n",(0,a.jsx)(t.li,{children:"NFTs can have multiple resources (different outputs based on context and resource priority)"}),"\n",(0,a.jsx)(t.li,{children:"NFTs can have on-chain emotes (reactions) for price discovery and social mechanics"}),"\n",(0,a.jsx)(t.li,{children:"NFTs have conditional rendering (e.g. show Mona Lisa as blushing if she got 50 kissy \ud83d\ude18 emoji)"}),"\n",(0,a.jsx)(t.li,{children:"NFTs can be governed by the community via fungible shareholder-tokens (fractionalization of NFTs)"}),"\n"]}),"\n",(0,a.jsxs)(t.h3,{id:"nft-from-kanaria",children:["NFT from ",(0,a.jsx)(t.a,{href:"https://kanaria.rmrk.app",children:"Kanaria"})]}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"kanaria.png",src:n(52886).A+"",width:"1891",height:"799"})}),"\n",(0,a.jsx)(t.admonition,{title:"Multi-resource NFTs",type:"note",children:(0,a.jsx)(t.p,{children:'A multi-resource NFT (gif of statue, and SVG-composable dynamic NFT in one) that can also equip\nother NFTs from within its "inventory".'})}),"\n",(0,a.jsx)(t.p,{children:"Two marketplaces for RMRK-based NFTs exist with hundreds of projects already launched:"}),"\n",(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.a,{href:"https://singular.rmrk.app",children:"Singular"}),", the official marketplace"]}),"\n"]}),"\n",(0,a.jsxs)(t.p,{children:["For a complete introduction into RMRK, see ",(0,a.jsx)(t.a,{href:"https://url.rmrk.app/wasmconf",children:"this presentation"})," or\nread ",(0,a.jsx)(t.a,{href:"https://docs.rmrk.app",children:"the non-technical docs"}),"."]}),"\n",(0,a.jsx)(t.h2,{id:"asset-hub",children:"Asset Hub"}),"\n",(0,a.jsxs)(t.p,{children:["The Asset Hub is a generic assets parachain which provides functionality for deploying and\ntransferring assets \u2014 both Fungible and Non-Fungible Tokens (NFTs). The Asset Hub currently hosts\n",(0,a.jsx)(t.a,{href:"./learn-nft-pallets.md/#uniques-pallet",children:"Uniques pallet"})," and the\n",(0,a.jsx)(t.a,{href:"/docs/learn-nft-pallets#nfts-pallet",children:"NFTs pallet"})," with NFT 2.0 functionalities."]}),"\n",(0,a.jsx)(t.h2,{id:"unique-network",children:"Unique Network"}),"\n",(0,a.jsxs)(t.p,{children:[(0,a.jsx)(t.a,{href:"https://unique.network/",children:"Unique network"}),", an NFT-specific blockchain offering innovations such as\nsponsored transactions, bundling fungible tokens with non-fungibles, and splitting NFTs into\nfungible tokens for partial ownership."]}),"\n",(0,a.jsxs)(t.p,{children:["Unique Network have launched two NFT projects to date: Substrapunks as part of\n",(0,a.jsx)(t.a,{href:"https://hackusama.devpost.com/",children:"Hackusama"}),", and Chelobricks as a promotion during\n",(0,a.jsx)(t.a,{href:"https://decoded.polkadot.network/",children:"Polkadot Decoded"}),"."]}),"\n",(0,a.jsx)(t.p,{children:"Unique Network focuses on B2B use cases, aiming to be an infrastructure provider for others to build\non, rather than entering the NFT space themselves as an end-product."}),"\n",(0,a.jsx)(t.p,{children:"Unique Network aims to make their marketplace technology open-source and whitelabel-friendly. In\ntheory, it should be trivial to set up a new marketplace for your project using Unique's technology.\nUnique network aims to be a parachain on Polkadot, and Quartz is their Kusama counterpart."})]})}function c(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,a.jsx)(t,{...e,children:(0,a.jsx)(d,{...e})}):d(e)}},52886:(e,t,n)=>{n.d(t,{A:()=>s});const s=n.p+"assets/images/kanaria-55b0060679c6303db0fc91f5c402ba02.png"},20782:(e,t,n)=>{n.d(t,{A:()=>s});const s=n.p+"assets/images/nft-basilisk-654977e2e97885e796857fc2e2add909.png"},28453:(e,t,n)=>{n.d(t,{R:()=>i,x:()=>r});var s=n(96540);const a={},o=s.createContext(a);function i(e){const t=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:i(e.components),s.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/c41801b5.a1013bcd.js b/assets/js/c41801b5.a1013bcd.js new file mode 100644 index 000000000000..9db5c250f6b2 --- /dev/null +++ b/assets/js/c41801b5.a1013bcd.js @@ -0,0 +1 @@ +(self.webpackChunk=self.webpackChunk||[]).push([[9507],{62499:(a,e,t)=>{"use strict";t.r(e),t.d(e,{assets:()=>l,contentTitle:()=>s,default:()=>c,frontMatter:()=>r,metadata:()=>o,toc:()=>d});const o=JSON.parse('{"id":"maintain/kusama/maintain-guides-how-to-validate-kusama","title":"Run a Validator (Kusama)","description":"The fundamentals for running a Kusama validator.","source":"@site/../docs/maintain/kusama/maintain-guides-how-to-validate-kusama.md","sourceDirName":"maintain/kusama","slug":"/maintain-guides-how-to-validate-kusama","permalink":"/docs/maintain-guides-how-to-validate-kusama","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/maintain/kusama/maintain-guides-how-to-validate-kusama.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1725464514000,"frontMatter":{"id":"maintain-guides-how-to-validate-kusama","title":"Run a Validator (Kusama)","sidebar_label":"How to run a Validator on Kusama","description":"The fundamentals for running a Kusama validator.","keywords":["validate","validator","kusama","stake","maintain"],"slug":"../../maintain-guides-how-to-validate-kusama"},"sidebar":"docs","previous":{"title":"Kappa Sigma Mu","permalink":"/docs/maintain-guides-society-kusama"}}');var n=t(74848),i=t(28453);t(47379),t(96540),t(11135);const r={id:"maintain-guides-how-to-validate-kusama",title:"Run a Validator (Kusama)",sidebar_label:"How to run a Validator on Kusama",description:"The fundamentals for running a Kusama validator.",keywords:["validate","validator","kusama","stake","maintain"],slug:"../../maintain-guides-how-to-validate-kusama"},s=void 0,l={},d=[{value:"Preliminaries",id:"preliminaries",level:2},{value:"How many KSM do I need to become an active Validator?",id:"how-many-ksm-do-i-need-to-become-an-active-validator",level:3},{value:"Validator Rewards",id:"validator-rewards",level:3},{value:"Run a Kusama Validator",id:"run-a-kusama-validator",level:2}];function u(a){const e={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",li:"li",p:"p",strong:"strong",ul:"ul",...(0,i.R)(),...a.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(e.h2,{id:"preliminaries",children:"Preliminaries"}),"\n",(0,n.jsxs)(e.p,{children:["Running a validator on a live network is a lot of responsibility! You will be accountable for not\nonly your own stake, but also the stake of your current nominators. If you make a mistake and get\n",(0,n.jsx)(e.a,{href:"/docs/learn-offenses",children:"slashed"}),", your tokens and your reputation will be at risk. However,\nrunning a validator can also be very rewarding, knowing that you contribute to the security of a\ndecentralized network while growing your stash."]}),"\n",(0,n.jsxs)(e.admonition,{type:"warning",children:[(0,n.jsx)(e.p,{children:"It is highly recommended that you have significant system administration experience before\nattempting to run your own validator."}),(0,n.jsx)(e.p,{children:"You must be able to handle technical issues and anomalies with your node which you must be able to\ntackle yourself. Being a validator involves more than just executing the binary file."})]}),"\n",(0,n.jsxs)(e.p,{children:["Since security is so important to running a successful validator, you should take a look at the\n",(0,n.jsx)(e.a,{href:"/docs/maintain-guides-secure-validator",children:"secure validator"})," information to make sure you understand\nthe factors to consider when constructing your infrastructure. As you progress in your journey as a\nvalidator, you will likely want to use this repository as a ",(0,n.jsx)(e.em,{children:"starting point"})," for your own\nmodifications and customizations."]}),"\n",(0,n.jsxs)(e.p,{children:["If you need help, please reach out on the\n",(0,n.jsx)(e.a,{href:"https://matrix.to/#/#KusamaValidatorLounge:polkadot.builders",children:"Kusama Validator Lounge"})," on Element.\nThe team and other validators are there to help answer questions and provide tips from experience."]}),"\n",(0,n.jsx)(e.h3,{id:"how-many-ksm-do-i-need-to-become-an-active-validator",children:"How many KSM do I need to become an active Validator?"}),"\n",(0,n.jsx)(e.admonition,{title:"Controller accounts are deprecated",type:"info",children:(0,n.jsxs)(e.p,{children:["Controller accounts are deprecated. For more information, see\n",(0,n.jsx)(e.a,{href:"https://forum.polkadot.network/t/staking-controller-deprecation-plan-staking-ui-leads-comms/2748",children:"this discussion"}),"."]})}),"\n",(0,n.jsxs)(e.p,{children:["You can have a rough estimate on that by using the methods listed\n",(0,n.jsx)(e.a,{href:"../../general/faq.md/#what-is-the-minimum-stake-necessary-to-be-elected-as-an-active-validator",children:"here"}),".\nTo be elected into the set, you need a minimum stake behind your validator. This stake can come from\nyourself or from ",(0,n.jsx)(e.a,{href:"/docs/learn-nominator",children:"nominators"}),". This means that as a minimum, you\nwill need enough KSM to set up Stash and staking proxy ",(0,n.jsx)(e.a,{href:"/docs/learn-cryptography",children:"accounts"}),"\nwith the existential deposit, plus a little extra for transaction fees. The rest can come from\nnominators. To understand how validators are elected, check the\n",(0,n.jsx)(e.a,{href:"/docs/learn-phragmen",children:"NPoS Election algorithms"})," page."]}),"\n",(0,n.jsx)(e.admonition,{title:"Join the Thousand Validator Programme",type:"tip",children:(0,n.jsxs)(e.p,{children:[(0,n.jsx)(e.a,{href:"/docs/thousand-validators",children:"The Thousand Validator Programme"})," is an initiative by Web3\nFoundation and Parity Technologies to use the funds held by both organizations to nominate\nvalidators in the community."]})}),"\n",(0,n.jsxs)(e.p,{children:[(0,n.jsx)(e.strong,{children:"Warning:"})," Any KSM that you stake for your validator is liable to be slashed, meaning that an\ninsecure or improper setup may result in loss of KSM tokens! If you are not confident in your\nability to run a validator node, it is recommended to nominate your KSM to a trusted validator node\ninstead."]}),"\n",(0,n.jsx)(e.h3,{id:"validator-rewards",children:"Validator Rewards"}),"\n",(0,n.jsxs)(e.p,{children:["On Kusama, one day is approximately four eras whereas on Polkadot, one era is approximately a day.\nIn each era, the validators elected to the active set earn era points which correspond to the actual\nrewards earned that are distributed proportionally to the nominators after deducting the validator\ncommission. The\n",(0,n.jsx)(e.a,{href:"/docs/chain-state-values#minimum-validator-commission",children:"minimum validator commission"})," can\nbe set through on-chain governance. For more information rewards and payouts, check the\n",(0,n.jsx)(e.a,{href:"/docs/maintain-guides-validator-payout",children:"validator payout"})," document."]}),"\n",(0,n.jsx)(e.h2,{id:"run-a-kusama-validator",children:"Run a Kusama Validator"}),"\n",(0,n.jsxs)(e.p,{children:["Running a validator on the Kusama network is identical to running a Polkadot validator. Check out\nthe ",(0,n.jsx)(e.a,{href:"/docs/maintain-guides-how-to-validate-polkadot",children:"Polkadot guide"})," on how to setup a validator."]}),"\n",(0,n.jsx)(e.p,{children:"Make sure to adjust the Polkadot guide to run a Kusama network validator (the instructions will also\nbe available in the Polkadot Validator guide):"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["When starting the node pass ",(0,n.jsx)(e.code,{children:"--chain=kusama"})," CLI flag"]}),"\n"]})]})}function c(a={}){const{wrapper:e}={...(0,i.R)(),...a.components};return e?(0,n.jsx)(e,{...a,children:(0,n.jsx)(u,{...a})}):u(a)}},47379:(a,e,t)=>{"use strict";t.d(e,{A:()=>m});var o=t(90675),n=t(10467),i=t(96540),r=t(19588),s=t(2026),l=t(11135);function d(a,e,t){return u.apply(this,arguments)}function u(){return(u=(0,n.A)((0,o.A)().mark((function a(e,t,n){var i,l,d,u,c;return(0,o.A)().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:i=void 0,l=void 0,a.t0=e,a.next="polkadot"===a.t0?5:"kusama"===a.t0?7:"statemine"===a.t0?9:"statemint"===a.t0?11:"polkadotpeople"===a.t0?13:"kusamapeople"===a.t0?15:17;break;case 5:return i="wss://rpc.polkadot.io",a.abrupt("break",18);case 7:return i="wss://kusama-rpc.polkadot.io/",a.abrupt("break",18);case 9:return i="wss://statemine-rpc.polkadot.io/",a.abrupt("break",18);case 11:return i="wss://statemint-rpc.polkadot.io/",a.abrupt("break",18);case 13:return i="wss://polkadot-people-rpc.polkadot.io/",a.abrupt("break",18);case 15:return i="wss://kusama-people-rpc.polkadot.io/",a.abrupt("break",18);case 17:console.log("Unknown socket url provided, no connection made.");case 18:if(void 0!==i){a.next=22;break}return a.abrupt("return");case 22:return d=new r.E(i),a.next=25,s.G.create({provider:d});case 25:u=a.sent,(c=t.split(".")).forEach((function(a){a in u&&(u=u[a])})),a.t1=c[0],a.next="consts"===a.t1?31:"query"===a.t1?33:38;break;case 31:return l=u.toString(),a.abrupt("break",39);case 33:return a.next=35,u();case 35:return l=(l=a.sent).toString(),a.abrupt("break",39);case 38:console.log("Unknown path prefix ("+c[0]+") in "+t);case 39:return a.abrupt("return",l);case 40:case"end":return a.stop()}}),a)})))).apply(this,arguments)}function c(a,e,t,o){switch(e){case"humanReadable":(0,l.HumanReadable)(a,t,o);break;case"precise":(0,l.Precise)(a,t,o);break;case"blocksToDays":(0,l.BlocksToDays)(a,o);break;case"erasToDays":(0,l.ErasToDays)(a,o,t);break;case"percentage":(0,l.Percentage)(a,o);break;case"permillToPercent":(0,l.PermillToPercent)(a,o);break;case"arrayLength":(0,l.ArrayLength)(a,o);break;default:return void console.log("Ignoring unknown filter type")}}const m=function(a){var e=a.network,t=a.path,r=a.defaultValue,s=a.filter,l=void 0===s?void 0:s,u=(0,i.useState)(""),m=u[0],p=u[1];return e=e.toLowerCase(),(0,i.useEffect)((function(){void 0!==l?c(r.toString(),l,e,p):p(r.toString());var a=void 0;switch(e){case"polkadot":a="wss://rpc.polkadot.io";break;case"kusama":a="wss://kusama-rpc.polkadot.io/";break;case"statemine":a="wss://kusama-asset-hub-rpc.polkadot.io/";break;case"statemint":a="wss://polkadot-asset-hub-rpc.polkadot.io/";break;case"kusamapeople":a="wss://kusama-people-rpc.polkadot.io";break;case"polkadotpeople":a="wss://polkadot-people-rpc.polkadot.io";break;default:console.log("Unknown network provided, "+e)}if(void 0===a)console.log("Failed to connect to a valid websocket, applying default");else{var i=function(){var a=(0,n.A)((0,o.A)().mark((function a(){var n;return(0,o.A)().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,d(e,t,p);case 2:if(void 0!==(n=a.sent)){a.next=7;break}return a.abrupt("return");case 7:void 0!==l?c(n,l,e,p):p(n);case 8:case"end":return a.stop()}}),a)})));return function(){return a.apply(this,arguments)}}();try{i()}catch(s){console.log(s)}}}),[]),m}},11135:a=>{var e="polkadot",t="kusama",o="statemine",n="statemint",i="polkadotpeople",r="kusamapeople",s={polkadot:{precision:1e10,symbol:"DOT"},kusama:{precision:1e12,symbol:"KSM"},statemint:{precision:1e10,symbol:"DOT"},statemine:{precision:1e12,symbol:"KSM"},polkadotpeople:{precision:1e10,symbol:"DOT"},kusamapeople:{precision:1e12,symbol:"KSM"}};a.exports={HumanReadable:function(a,l,d){var u=void 0;if(l===e||l===n)u=3;else if(l===t||l===o||l===i)u=6;else{if(l!=r)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");u=8}a=parseFloat(a),d((a=Number.isInteger(a/s[l].precision)?a/s[l].precision+" "+s[l].symbol:(a/s[l].precision).toFixed(u)+" "+s[l].symbol).toString())},Precise:function(a,e,t){t(a=(a=parseFloat(a))/s[e].precision+" "+s[e].symbol)},BlocksToDays:function(a,e){e((a=6*a/86400).toString())},ErasToDays:function(a,s,l){var d=void 0;if(l===e||l===n||l==i)d=1;else{if(l!==t&&l!==o&&l!=r)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");d=4}s((a/=d).toString())},Percentage:function(a,e){e((a/=1e7).toString())},PermillToPercent:function(a,e){e((a/=1e4).toString())},ArrayLength:function(a,e){e((a=a.split(",").length).toString())}}},47790:()=>{}}]); \ No newline at end of file diff --git a/assets/js/c41801b5.e2d83b5b.js b/assets/js/c41801b5.e2d83b5b.js deleted file mode 100644 index 0e4ef89b1852..000000000000 --- a/assets/js/c41801b5.e2d83b5b.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk=self.webpackChunk||[]).push([[9507],{95462:(a,e,t)=>{"use strict";t.r(e),t.d(e,{assets:()=>l,contentTitle:()=>r,default:()=>c,frontMatter:()=>i,metadata:()=>s,toc:()=>d});var o=t(74848),n=t(28453);t(47379),t(96540),t(11135);const i={id:"maintain-guides-how-to-validate-kusama",title:"Run a Validator (Kusama)",sidebar_label:"How to run a Validator on Kusama",description:"The fundamentals for running a Kusama validator.",keywords:["validate","validator","kusama","stake","maintain"],slug:"../../maintain-guides-how-to-validate-kusama"},r=void 0,s={id:"maintain/kusama/maintain-guides-how-to-validate-kusama",title:"Run a Validator (Kusama)",description:"The fundamentals for running a Kusama validator.",source:"@site/../docs/maintain/kusama/maintain-guides-how-to-validate-kusama.md",sourceDirName:"maintain/kusama",slug:"/maintain-guides-how-to-validate-kusama",permalink:"/docs/maintain-guides-how-to-validate-kusama",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/maintain/kusama/maintain-guides-how-to-validate-kusama.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1725464514e3,frontMatter:{id:"maintain-guides-how-to-validate-kusama",title:"Run a Validator (Kusama)",sidebar_label:"How to run a Validator on Kusama",description:"The fundamentals for running a Kusama validator.",keywords:["validate","validator","kusama","stake","maintain"],slug:"../../maintain-guides-how-to-validate-kusama"},sidebar:"docs",previous:{title:"Kappa Sigma Mu",permalink:"/docs/maintain-guides-society-kusama"}},l={},d=[{value:"Preliminaries",id:"preliminaries",level:2},{value:"How many KSM do I need to become an active Validator?",id:"how-many-ksm-do-i-need-to-become-an-active-validator",level:3},{value:"Validator Rewards",id:"validator-rewards",level:3},{value:"Run a Kusama Validator",id:"run-a-kusama-validator",level:2}];function u(a){const e={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",li:"li",p:"p",strong:"strong",ul:"ul",...(0,n.R)(),...a.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(e.h2,{id:"preliminaries",children:"Preliminaries"}),"\n",(0,o.jsxs)(e.p,{children:["Running a validator on a live network is a lot of responsibility! You will be accountable for not\nonly your own stake, but also the stake of your current nominators. If you make a mistake and get\n",(0,o.jsx)(e.a,{href:"/docs/learn-offenses",children:"slashed"}),", your tokens and your reputation will be at risk. However,\nrunning a validator can also be very rewarding, knowing that you contribute to the security of a\ndecentralized network while growing your stash."]}),"\n",(0,o.jsxs)(e.admonition,{type:"warning",children:[(0,o.jsx)(e.p,{children:"It is highly recommended that you have significant system administration experience before\nattempting to run your own validator."}),(0,o.jsx)(e.p,{children:"You must be able to handle technical issues and anomalies with your node which you must be able to\ntackle yourself. Being a validator involves more than just executing the binary file."})]}),"\n",(0,o.jsxs)(e.p,{children:["Since security is so important to running a successful validator, you should take a look at the\n",(0,o.jsx)(e.a,{href:"/docs/maintain-guides-secure-validator",children:"secure validator"})," information to make sure you understand\nthe factors to consider when constructing your infrastructure. As you progress in your journey as a\nvalidator, you will likely want to use this repository as a ",(0,o.jsx)(e.em,{children:"starting point"})," for your own\nmodifications and customizations."]}),"\n",(0,o.jsxs)(e.p,{children:["If you need help, please reach out on the\n",(0,o.jsx)(e.a,{href:"https://matrix.to/#/#KusamaValidatorLounge:polkadot.builders",children:"Kusama Validator Lounge"})," on Element.\nThe team and other validators are there to help answer questions and provide tips from experience."]}),"\n",(0,o.jsx)(e.h3,{id:"how-many-ksm-do-i-need-to-become-an-active-validator",children:"How many KSM do I need to become an active Validator?"}),"\n",(0,o.jsx)(e.admonition,{title:"Controller accounts are deprecated",type:"info",children:(0,o.jsxs)(e.p,{children:["Controller accounts are deprecated. For more information, see\n",(0,o.jsx)(e.a,{href:"https://forum.polkadot.network/t/staking-controller-deprecation-plan-staking-ui-leads-comms/2748",children:"this discussion"}),"."]})}),"\n",(0,o.jsxs)(e.p,{children:["You can have a rough estimate on that by using the methods listed\n",(0,o.jsx)(e.a,{href:"../../general/faq.md/#what-is-the-minimum-stake-necessary-to-be-elected-as-an-active-validator",children:"here"}),".\nTo be elected into the set, you need a minimum stake behind your validator. This stake can come from\nyourself or from ",(0,o.jsx)(e.a,{href:"/docs/learn-nominator",children:"nominators"}),". This means that as a minimum, you\nwill need enough KSM to set up Stash and staking proxy ",(0,o.jsx)(e.a,{href:"/docs/learn-cryptography",children:"accounts"}),"\nwith the existential deposit, plus a little extra for transaction fees. The rest can come from\nnominators. To understand how validators are elected, check the\n",(0,o.jsx)(e.a,{href:"/docs/learn-phragmen",children:"NPoS Election algorithms"})," page."]}),"\n",(0,o.jsx)(e.admonition,{title:"Join the Thousand Validator Programme",type:"tip",children:(0,o.jsxs)(e.p,{children:[(0,o.jsx)(e.a,{href:"/docs/thousand-validators",children:"The Thousand Validator Programme"})," is an initiative by Web3\nFoundation and Parity Technologies to use the funds held by both organizations to nominate\nvalidators in the community."]})}),"\n",(0,o.jsxs)(e.p,{children:[(0,o.jsx)(e.strong,{children:"Warning:"})," Any KSM that you stake for your validator is liable to be slashed, meaning that an\ninsecure or improper setup may result in loss of KSM tokens! If you are not confident in your\nability to run a validator node, it is recommended to nominate your KSM to a trusted validator node\ninstead."]}),"\n",(0,o.jsx)(e.h3,{id:"validator-rewards",children:"Validator Rewards"}),"\n",(0,o.jsxs)(e.p,{children:["On Kusama, one day is approximately four eras whereas on Polkadot, one era is approximately a day.\nIn each era, the validators elected to the active set earn era points which correspond to the actual\nrewards earned that are distributed proportionally to the nominators after deducting the validator\ncommission. The\n",(0,o.jsx)(e.a,{href:"/docs/chain-state-values#minimum-validator-commission",children:"minimum validator commission"})," can\nbe set through on-chain governance. For more information rewards and payouts, check the\n",(0,o.jsx)(e.a,{href:"/docs/maintain-guides-validator-payout",children:"validator payout"})," document."]}),"\n",(0,o.jsx)(e.h2,{id:"run-a-kusama-validator",children:"Run a Kusama Validator"}),"\n",(0,o.jsxs)(e.p,{children:["Running a validator on the Kusama network is identical to running a Polkadot validator. Check out\nthe ",(0,o.jsx)(e.a,{href:"/docs/maintain-guides-how-to-validate-polkadot",children:"Polkadot guide"})," on how to setup a validator."]}),"\n",(0,o.jsx)(e.p,{children:"Make sure to adjust the Polkadot guide to run a Kusama network validator (the instructions will also\nbe available in the Polkadot Validator guide):"}),"\n",(0,o.jsxs)(e.ul,{children:["\n",(0,o.jsxs)(e.li,{children:["When starting the node pass ",(0,o.jsx)(e.code,{children:"--chain=kusama"})," CLI flag"]}),"\n"]})]})}function c(a={}){const{wrapper:e}={...(0,n.R)(),...a.components};return e?(0,o.jsx)(e,{...a,children:(0,o.jsx)(u,{...a})}):u(a)}},47379:(a,e,t)=>{"use strict";t.d(e,{A:()=>m});var o=t(90675),n=t(10467),i=t(96540),r=t(19588),s=t(2026),l=t(11135);function d(a,e,t){return u.apply(this,arguments)}function u(){return(u=(0,n.A)((0,o.A)().mark((function a(e,t,n){var i,l,d,u,c;return(0,o.A)().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:i=void 0,l=void 0,a.t0=e,a.next="polkadot"===a.t0?5:"kusama"===a.t0?7:"statemine"===a.t0?9:"statemint"===a.t0?11:"polkadotpeople"===a.t0?13:"kusamapeople"===a.t0?15:17;break;case 5:return i="wss://rpc.polkadot.io",a.abrupt("break",18);case 7:return i="wss://kusama-rpc.polkadot.io/",a.abrupt("break",18);case 9:return i="wss://statemine-rpc.polkadot.io/",a.abrupt("break",18);case 11:return i="wss://statemint-rpc.polkadot.io/",a.abrupt("break",18);case 13:return i="wss://polkadot-people-rpc.polkadot.io/",a.abrupt("break",18);case 15:return i="wss://kusama-people-rpc.polkadot.io/",a.abrupt("break",18);case 17:console.log("Unknown socket url provided, no connection made.");case 18:if(void 0!==i){a.next=22;break}return a.abrupt("return");case 22:return d=new r.E(i),a.next=25,s.G.create({provider:d});case 25:u=a.sent,(c=t.split(".")).forEach((function(a){a in u&&(u=u[a])})),a.t1=c[0],a.next="consts"===a.t1?31:"query"===a.t1?33:38;break;case 31:return l=u.toString(),a.abrupt("break",39);case 33:return a.next=35,u();case 35:return l=(l=a.sent).toString(),a.abrupt("break",39);case 38:console.log("Unknown path prefix ("+c[0]+") in "+t);case 39:return a.abrupt("return",l);case 40:case"end":return a.stop()}}),a)})))).apply(this,arguments)}function c(a,e,t,o){switch(e){case"humanReadable":(0,l.HumanReadable)(a,t,o);break;case"precise":(0,l.Precise)(a,t,o);break;case"blocksToDays":(0,l.BlocksToDays)(a,o);break;case"erasToDays":(0,l.ErasToDays)(a,o,t);break;case"percentage":(0,l.Percentage)(a,o);break;case"permillToPercent":(0,l.PermillToPercent)(a,o);break;case"arrayLength":(0,l.ArrayLength)(a,o);break;default:return void console.log("Ignoring unknown filter type")}}const m=function(a){var e=a.network,t=a.path,r=a.defaultValue,s=a.filter,l=void 0===s?void 0:s,u=(0,i.useState)(""),m=u[0],p=u[1];return e=e.toLowerCase(),(0,i.useEffect)((function(){void 0!==l?c(r.toString(),l,e,p):p(r.toString());var a=void 0;switch(e){case"polkadot":a="wss://rpc.polkadot.io";break;case"kusama":a="wss://kusama-rpc.polkadot.io/";break;case"statemine":a="wss://kusama-asset-hub-rpc.polkadot.io/";break;case"statemint":a="wss://polkadot-asset-hub-rpc.polkadot.io/";break;case"kusamapeople":a="wss://kusama-people-rpc.polkadot.io";break;case"polkadotpeople":a="wss://polkadot-people-rpc.polkadot.io";break;default:console.log("Unknown network provided, "+e)}if(void 0===a)console.log("Failed to connect to a valid websocket, applying default");else{var i=function(){var a=(0,n.A)((0,o.A)().mark((function a(){var n;return(0,o.A)().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,d(e,t,p);case 2:if(void 0!==(n=a.sent)){a.next=7;break}return a.abrupt("return");case 7:void 0!==l?c(n,l,e,p):p(n);case 8:case"end":return a.stop()}}),a)})));return function(){return a.apply(this,arguments)}}();try{i()}catch(s){console.log(s)}}}),[]),m}},11135:a=>{var e="polkadot",t="kusama",o="statemine",n="statemint",i="polkadotpeople",r="kusamapeople",s={polkadot:{precision:1e10,symbol:"DOT"},kusama:{precision:1e12,symbol:"KSM"},statemint:{precision:1e10,symbol:"DOT"},statemine:{precision:1e12,symbol:"KSM"},polkadotpeople:{precision:1e10,symbol:"DOT"},kusamapeople:{precision:1e12,symbol:"KSM"}};a.exports={HumanReadable:function(a,l,d){var u=void 0;if(l===e||l===n)u=3;else if(l===t||l===o||l===i)u=6;else{if(l!=r)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");u=8}a=parseFloat(a),d((a=Number.isInteger(a/s[l].precision)?a/s[l].precision+" "+s[l].symbol:(a/s[l].precision).toFixed(u)+" "+s[l].symbol).toString())},Precise:function(a,e,t){t(a=(a=parseFloat(a))/s[e].precision+" "+s[e].symbol)},BlocksToDays:function(a,e){e((a=6*a/86400).toString())},ErasToDays:function(a,s,l){var d=void 0;if(l===e||l===n||l==i)d=1;else{if(l!==t&&l!==o&&l!=r)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");d=4}s((a/=d).toString())},Percentage:function(a,e){e((a/=1e7).toString())},PermillToPercent:function(a,e){e((a/=1e4).toString())},ArrayLength:function(a,e){e((a=a.split(",").length).toString())}}},47790:()=>{}}]); \ No newline at end of file diff --git a/assets/js/c630d0cd.8eb13a73.js b/assets/js/c630d0cd.8eb13a73.js deleted file mode 100644 index f5a0e9050d31..000000000000 --- a/assets/js/c630d0cd.8eb13a73.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5420],{23862:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>l,contentTitle:()=>o,default:()=>h,frontMatter:()=>t,metadata:()=>r,toc:()=>c});var s=i(74848),a=i(28453);const t={id:"build-guides-template-basic",title:"Template to Core - Setup & Initial Deployment of a Parachain",sidebar_label:"Parachain Template Guide",description:"A minimal guide on how to deploy a parachain using Polkadot SDK's parachain template.",keywords:["coretime","blockspace","parathread","parachain","cores","coretime","agile"],slug:"../build-guides-template-basic"},o=void 0,r={id:"build/build-guides-template-basic",title:"Template to Core - Setup & Initial Deployment of a Parachain",description:"A minimal guide on how to deploy a parachain using Polkadot SDK's parachain template.",source:"@site/../docs/build/build-guides-template-basic.md",sourceDirName:"build",slug:"/build-guides-template-basic",permalink:"/docs/build-guides-template-basic",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/build/build-guides-template-basic.md",tags:[],version:"current",lastUpdatedBy:"Juan Girini",lastUpdatedAt:1730488883e3,frontMatter:{id:"build-guides-template-basic",title:"Template to Core - Setup & Initial Deployment of a Parachain",sidebar_label:"Parachain Template Guide",description:"A minimal guide on how to deploy a parachain using Polkadot SDK's parachain template.",keywords:["coretime","blockspace","parathread","parachain","cores","coretime","agile"],slug:"../build-guides-template-basic"},sidebar:"docs",previous:{title:"Install Dependencies",permalink:"/docs/build-guides-install-deps"},next:{title:"Troubleshooting FAQ",permalink:"/docs/build-guides-coretime-troubleshoot"}},l={},c=[{value:"Getting ROC and Reserving a ParaId",id:"getting-roc-and-reserving-a-paraid",level:2},{value:"Compiling Parachain Runtime and Generating Wasm Blob",id:"compiling-parachain-runtime-and-generating-wasm-blob",level:2},{value:"Compiling the Parachain Template Node",id:"compiling-the-parachain-template-node",level:3},{value:"Customizing our chain specification's patch file",id:"customizing-our-chain-specifications-patch-file",level:3},{value:"Generating the chain specification",id:"generating-the-chain-specification",level:3},{value:"Generating the Runtime and Genesis",id:"generating-the-runtime-and-genesis",level:3},{value:"Running Your Collator",id:"running-your-collator",level:2},{value:"Register the Parachain as a Parathread",id:"register-the-parachain-as-a-parathread",level:2},{value:"Procure Coretime",id:"procure-coretime",level:2},{value:"On-Demand Coretime",id:"on-demand-coretime",level:3},{value:"Bulk Coretime: Assigning your Core",id:"bulk-coretime-assigning-your-core",level:3},{value:"What's Next?",id:"whats-next",level:2}];function d(e){const n={a:"a",admonition:"admonition",blockquote:"blockquote",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",li:"li",mdxAdmonitionTitle:"mdxAdmonitionTitle",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,a.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(n.admonition,{title:"Not a production ready guide.",type:"warning",children:[(0,s.jsxs)(n.p,{children:["This guide is considered a moving document and currently uses the ",(0,s.jsx)(n.strong,{children:"Paseo"})," testnet. This guide is\nalso applicable to the parachains on the Kusama relay chain, as coretime is also enabled there."]}),(0,s.jsx)(n.p,{children:(0,s.jsxs)(n.strong,{children:["This instructions on this guide are applicable for the Polkadot SDK repository with tag\n",(0,s.jsx)(n.code,{children:"polkadot-v1.15.1"})]})})]}),"\n",(0,s.jsx)(n.p,{children:"This guide aims to get you up and running with the basics of:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Compiling"})," and configuring your first template"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Obtaining"})," Coretime (bulk or on-demand)"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Deploying"})," your template on your procured core"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"getting-roc-and-reserving-a-paraid",children:"Getting ROC and Reserving a ParaId"}),"\n",(0,s.jsxs)(n.p,{children:["Before starting to work with coretime, you'll need some ROC tokens to pay fees, reserve a\n",(0,s.jsx)(n.a,{href:"/docs/glossary#paraid",children:"ParaId"}),", and more."]}),"\n",(0,s.jsxs)(n.p,{children:["Head over to Polkadot.js to reserve a ",(0,s.jsx)(n.a,{href:"/docs/glossary#paraid",children:"ParaId"}),". We'll need a ParaId\nto upload our parachain's code:"]}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["Get the ",(0,s.jsx)(n.a,{href:"https://polkadot.js.org/extension/",children:"Polkadot.js Web Extension."})]}),"\n",(0,s.jsxs)(n.li,{children:["Create a wallet, and get some ",(0,s.jsx)(n.a,{href:"https://faucet.polkadot.io/",children:"ROC via the faucet."})," with your new\naddress."]}),"\n",(0,s.jsxs)(n.li,{children:["Go to the ",(0,s.jsx)(n.a,{href:"https://polkadot.js.org/apps/#",children:"Polkadot.js Web App"}),", and make sure you select\n",(0,s.jsx)(n.strong,{children:"Paseo"})," as your network via the tabs on the side\n",(0,s.jsx)(n.a,{href:"https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fpaseo.dotters.network#/explorer",children:"or visit this link to get to Paseo directly"})]}),"\n",(0,s.jsxs)(n.li,{children:["Head to\n",(0,s.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/parachains/parathreads",children:"Network > Parachains > Parathreads (the tab)"})]}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"/docs/learn-guides-coretime-parachains#reserve-paraid",children:"Follow these instructions to reserve a ParaId."})}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["Visit the ",(0,s.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/accounts",children:"Accounts"})," tab to view all registered accounts\nand associated balances within the Polkadot.js Extension. Once finished, you should see your new\nParaId at the bottom of the list within\n",(0,s.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/parachains/parathreads",children:"Network > Parachains > Parathreads"}),' with the\noption to "Deregister" to the right:']}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"Registered ParaID in PolkadotJs",src:i(85360).A+"",width:"1866",height:"109"})}),"\n",(0,s.jsx)(n.h2,{id:"compiling-parachain-runtime-and-generating-wasm-blob",children:"Compiling Parachain Runtime and Generating Wasm Blob"}),"\n",(0,s.jsx)(n.p,{children:"We can now move on to working with the template. Essential prerequisites are:"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Have"})," a command line, git, and other common development tools to edit code/files."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Rust"}),", its associated tooling, the nightly toolchain, and the ",(0,s.jsx)(n.code,{children:"wasm32-unknown-unknown"}),"\ncompilation target."]}),"\n"]}),"\n",(0,s.jsx)(n.admonition,{title:"Install dependencies",type:"info",children:(0,s.jsxs)(n.p,{children:["Visit ",(0,s.jsx)(n.a,{href:"/docs/build-guides-install-deps",children:"the dependencies' installation"})," page before starting."]})}),"\n",(0,s.jsxs)(n.p,{children:["This guide uses release\n",(0,s.jsx)(n.a,{href:"https://github.com/paritytech/polkadot-sdk/releases/tag/polkadot-v1.15.1",children:(0,s.jsx)(n.code,{children:"polkadot-v1.15.1"})}),", for\nassociated tooling (such as ",(0,s.jsx)(n.code,{children:"polkadot-parachain"})," and ",(0,s.jsx)(n.code,{children:"chain-spec-builder"}),")."]}),"\n",(0,s.jsxs)(n.p,{children:["We will be using the\n",(0,s.jsx)(n.a,{href:"https://github.com/paritytech/polkadot-sdk-parachain-template",children:"Polkadot SDK's parachain template"}),",\nwhich is mirrored in the templates folder within Polkadot SDK repository."]}),"\n",(0,s.jsx)(n.p,{children:"Clone the repository:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-shell",children:"git clone git@github.com:paritytech/polkadot-sdk-parachain-template.git\n"})}),"\n",(0,s.jsxs)(n.p,{children:["Now, navigate to ",(0,s.jsx)(n.code,{children:"polkadot-sdk-parachain-template/"}),":"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"cd polkadot-sdk-parachain-template\n"})}),"\n",(0,s.jsx)(n.p,{children:"Open this in your code editor of choice. This template contains the necessary dependencies we need\nto utilize a core."}),"\n",(0,s.jsx)(n.h3,{id:"compiling-the-parachain-template-node",children:"Compiling the Parachain Template Node"}),"\n",(0,s.jsx)(n.p,{children:"This tutorial won't go into the specifics of the template, nor will it go into the specifics of\nFRAME and Substrate. All you need to know is the following:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"runtime/"})," - Contains the runtime and business logic. This is how all of your pallets (runtime\nmodules) are configured. The runtime, once it's compiled as a WebAssembly blob, is uploaded\non-chain."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"node/"})," - The node implementation, which takes care of networking and RPC setup."]}),"\n"]}),"\n",(0,s.jsxs)(n.blockquote,{children:["\n",(0,s.jsxs)(n.p,{children:["Pallets are essentially just Rust crates, which are imported as dependencies, as seen in\n",(0,s.jsx)(n.code,{children:"runtime/Cargo.toml"}),". Read more about\n",(0,s.jsx)(n.a,{href:"https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/polkadot_sdk/frame_runtime/index.html#pallets",children:"pallets here."})]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["When we compile our template, we can extract the runtime code as a WebAssembly ",(0,s.jsx)(n.code,{children:".wasm"})," blob, which\nis one of the key artifacts for registering our parachain on the relay chain."]}),"\n",(0,s.jsx)(n.p,{children:"Build the node using the following command:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-shell",children:"cargo build --release\n"})}),"\n",(0,s.jsx)(n.p,{children:"For the sake of this example, we won't go into adding or modifying any pallets. However, this is\ndefinitely a next step after you get used to deploying your parachain."}),"\n",(0,s.jsx)(n.h3,{id:"customizing-our-chain-specifications-patch-file",children:"Customizing our chain specification's patch file"}),"\n",(0,s.jsxs)(n.p,{children:["The chain specification is a JSON file that describes Polkadot SDK-based networks. It usually\ncontains the genesis runtime (in hex) under ",(0,s.jsx)(n.code,{children:"genesis.runtimeGenesis.code"})," and also contains genesis\nvalues/state for the pallets included in your runtime."]}),"\n",(0,s.jsxs)(n.p,{children:["You can bootstrap your network with some initial values, such as initial collators, balances for\ncertain accounts, and more. This is done using a patch file, which the ",(0,s.jsx)(n.code,{children:"chain-spec-builder"})," tool\nuses to create the full chain specification of your network. You should do the following to create\nyour ",(0,s.jsx)(n.code,{children:"patch.json"}),":"]}),"\n",(0,s.jsx)(n.p,{children:"Feel free to use the patch provided here, which you can look to tweak to your liking."}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["Create the file: ",(0,s.jsx)(n.code,{children:"touch patch.json"})]}),"\n",(0,s.jsx)(n.li,{children:"Paste the below patch JSON."}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"The patch JSON states that:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["The ",(0,s.jsx)(n.code,{children:"Alice"})," and ",(0,s.jsx)(n.code,{children:"Bob"})," accounts get a substantial balance."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"Alice"})," is the collator and block producer of this network. This makes it easy for us to run our\ncollator with ",(0,s.jsx)(n.code,{children:"--alice"})," later on."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"Alice"})," is the sudo key of our network."]}),"\n"]}),"\n",(0,s.jsxs)(n.admonition,{type:"info",children:[(0,s.jsxs)(n.mdxAdmonitionTitle,{children:["Make sure you replace ",(0,s.jsx)(n.code,{children:"YOUR_PARA_ID_HERE"})," with your reserved ParaId!"]}),(0,s.jsx)(n.p,{children:"This should be the same as the ID you reserved."})]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-json",children:'{\n "balances": {\n "balances": [\n ["5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", 1152921504606846976],\n ["5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", 1152921504606846976]\n ]\n },\n "collatorSelection": {\n "candidacyBond": 16000000000,\n "invulnerables": ["5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY"]\n },\n "parachainInfo": {\n "parachainId": YOUR_PARA_ID_HERE\n },\n "polkadotXcm": {\n "safeXcmVersion": 4\n },\n\n "session": {\n "keys": [\n [\n "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY",\n "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY",\n {\n "aura": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY"\n }\n ]\n ]\n },\n "sudo": {\n "key": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY"\n }\n}\n'})}),"\n",(0,s.jsx)(n.h3,{id:"generating-the-chain-specification",children:"Generating the chain specification"}),"\n",(0,s.jsxs)(n.blockquote,{children:["\n",(0,s.jsxs)(n.p,{children:["Ensure you have\nthe",(0,s.jsxs)(n.a,{href:"/docs/build-guides-install-deps#install-polkadot-parachain-and-chain-spec-builder",children:[" ",(0,s.jsx)(n.code,{children:"chain-spec-builder"})]}),"\ninstalled before following along!"]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["By now, you should have ",(0,s.jsx)(n.code,{children:"patch.json"})," created and populated, and your ",(0,s.jsx)(n.code,{children:"./target"})," folder should look\nsomething akin to:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-sh",children:"./target/release/wbuild/parachain-template-runtime\n\u251c\u2500\u2500 Cargo.lock\n\u251c\u2500\u2500 Cargo.toml\n\u251c\u2500\u2500 parachain_template_runtime.compact.compressed.wasm\n\u251c\u2500\u2500 parachain_template_runtime.compact.wasm\n\u251c\u2500\u2500 parachain_template_runtime.wasm\n\u251c\u2500\u2500 src\n\u2514\u2500\u2500 target\n"})}),"\n",(0,s.jsxs)(n.p,{children:["We'll be using ",(0,s.jsx)(n.code,{children:"parachain_template_runtime.wasm"})," in conjunction with ",(0,s.jsx)(n.code,{children:"chain-spec-builder"})," to build\nour chain specification:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-sh",children:"chain-spec-builder create \\\n-v \\\n-r ./target/release/wbuild/parachain-template-runtime/parachain_template_runtime.wasm \\\npatch patch.json\n"})}),"\n",(0,s.jsxs)(n.p,{children:["You should now see ",(0,s.jsx)(n.code,{children:"chain_spec.json"})," generated, with the message ",(0,s.jsx)(n.code,{children:"Genesis config verification: OK"}),".\nThe ",(0,s.jsx)(n.code,{children:"-v"})," does a superficial verification of the JSON to ensure all fields are properly populated."]}),"\n",(0,s.jsxs)(n.p,{children:["Next, you'll need to modify a few things in your chain spec, namely by adding the following fields\nto make it parachain-ready. Once again, make sure you set ",(0,s.jsx)(n.code,{children:"para_id"})," to the one you reserved earlier:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-json",children:'"protocolId": "my-live-protocol",\n"properties": {\n "ss58Format": 42,\n "tokenDecimals": 12,\n "tokenSymbol": "UNIT"\n},\n"para_id": PARA_ID_HERE,\n"relay_chain": "paseo",\n'})}),"\n",(0,s.jsx)(n.p,{children:"Once you finish modifying the file, it should look like this:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-json",children:'{\n "name": "Custom",\n "id": "custom",\n "chainType": "Live",\n "bootNodes": [],\n "telemetryEndpoints": null,\n "protocolId": "my-live-protocol",\n "properties": {\n "ss58Format": 42,\n "tokenDecimals": 12,\n "tokenSymbol": "UNIT"\n },\n "para_id": YOUR_PARA_ID_HERE,\n "relay_chain": "paseo",\n "codeSubstitutes": {},\n "genesis": { ... }\n}\n'})}),"\n",(0,s.jsxs)(n.p,{children:["Feel free to customize various aspects of your spec, such as the ",(0,s.jsx)(n.code,{children:"UNIT"})," ticker, ",(0,s.jsx)(n.code,{children:"name"}),", ",(0,s.jsx)(n.code,{children:"id"}),", or\nother fields."]}),"\n",(0,s.jsxs)(n.p,{children:["Now you should open your ",(0,s.jsx)(n.code,{children:"chain_spec.json"}),", and use this checklist to ensure all the necessary\nfields are in place:"]}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Make"})," sure that ",(0,s.jsx)(n.code,{children:"relay_chain"})," is set to the target relay chain (",(0,s.jsx)(n.code,{children:"paseo"}),", in our case)"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Make"})," sure that ",(0,s.jsx)(n.code,{children:"para_id"})," (right below ",(0,s.jsx)(n.code,{children:"relay_chain"}),") is set to your reserved ParaId"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Make"})," sure that our ",(0,s.jsx)(n.code,{children:"chain_type"})," is set to ",(0,s.jsx)(n.code,{children:"Live"})]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Optionally"}),", change the name, id, and token symbol of your chain."]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"If you fail to do one of these, your chain may fail to produce blocks."}),"\n",(0,s.jsxs)(n.p,{children:["For more information on chain specifications,\n",(0,s.jsx)(n.a,{href:"https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/reference_docs/chain_spec_genesis/index.html",children:"check out the reference document from the Polkadot SDK."})]}),"\n",(0,s.jsx)(n.h3,{id:"generating-the-runtime-and-genesis",children:"Generating the Runtime and Genesis"}),"\n",(0,s.jsx)(n.p,{children:"With our chain specification successfully generated, we can move to generating the genesis state and\nruntime."}),"\n",(0,s.jsx)(n.p,{children:"Generate the genesis following the instructions below:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-shell",children:"polkadot-parachain export-genesis-head --chain chain_spec.json genesis\n"})}),"\n",(0,s.jsxs)(n.p,{children:["Although you can use the WebAssembly within ",(0,s.jsx)(n.code,{children:"wbuild"}),", for ease of access you can also regenerate\nyour WebAssembly blob with the following:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-shell",children:"polkadot-parachain export-genesis-wasm --chain chain_spec.json genesis-wasm\n"})}),"\n",(0,s.jsx)(n.p,{children:"Within your project folder, you should now have two files:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:(0,s.jsx)(n.code,{children:"genesis"})})," - the initial state of your parachain."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:(0,s.jsx)(n.code,{children:"genesis-wasm"})})," - the initial runtime WebAssembly blob of your parachain."]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"running-your-collator",children:"Running Your Collator"}),"\n",(0,s.jsxs)(n.blockquote,{children:["\n",(0,s.jsxs)(n.p,{children:["Make sure you have the\n",(0,s.jsx)(n.a,{href:"/docs/build-guides-install-deps#installing-the-omninode",children:(0,s.jsx)(n.code,{children:"polkadot-parachain"})})," binary installed!"]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["Before you are able to connect your collator, you must sync the relay chain. Depending on your\ndownload speed, the time to sync may vary. In order to avoid storing the full state of the relay\nchain, be sure to run with the appropriate pruning flags (",(0,s.jsx)(n.code,{children:"blocks-pruning"})," and ",(0,s.jsx)(n.code,{children:"state-pruning"}),"):"]}),"\n",(0,s.jsxs)(n.admonition,{type:"info",children:[(0,s.jsxs)(n.mdxAdmonitionTitle,{children:["Explaining ",(0,s.jsx)(n.code,{children:"blocks-pruning"})," and ",(0,s.jsx)(n.code,{children:"state-pruning"})]}),(0,s.jsx)(n.p,{children:"A Polkadot SDK-based node has two pruning modes:"}),(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"blocks-pruning"})," - Prunes block bodies (the list of extrinsics in the block) from a specified\nheight (default: ",(0,s.jsx)(n.code,{children:"256"}),")"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"state-pruning"})," - Prunes the overall state from a specified height"]}),"\n"]}),(0,s.jsxs)(n.p,{children:["Both of these flags aid in reducing the amount of disk space taken up by the relay chain. Note that\n",(0,s.jsx)(n.code,{children:"state-pruning"})," is only used for the first initial sync for the database."]})]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-shell",children:"polkadot-parachain --collator \\\n--alice \\\n--chain chain_spec.json \\\n--force-authoring \\\n--base-path \\\n-- \\\n--chain=paseo \\\n--sync warp \\\n--blocks-pruning 256 \\\n--state-pruning 256\n"})}),"\n",(0,s.jsxs)(n.blockquote,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Fun fact"}),": This command really spins up ",(0,s.jsx)(n.em,{children:"two"})," nodes: your collator node for your parachain,\nalong with an embedded relay chain node, hence the separation in the command via ",(0,s.jsx)(n.code,{children:"--"}),"."]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"You should now see your relay chain syncing, reaching the same target that your target relay chain\nis currently at:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"2024-05-07 11:43:18 [Relaychain] \u2699\ufe0f Syncing 490.8 bps, target=#10342815 (9 peers), best: #10013784 (0x91d7\u2026aeb2), finalized #10013704 (0x8556\u2026e679), \u2b07 8.3MiB/s \u2b06 1.2kiB/s\n"})}),"\n",(0,s.jsx)(n.h2,{id:"register-the-parachain-as-a-parathread",children:"Register the Parachain as a Parathread"}),"\n",(0,s.jsxs)(n.p,{children:["With your ",(0,s.jsx)(n.strong,{children:(0,s.jsx)(n.code,{children:"genesis"})})," and ",(0,s.jsx)(n.strong,{children:(0,s.jsx)(n.code,{children:"genesis-wasm"})})," created, you can now create your parathread. Head\nback to\n",(0,s.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/parachains/parathreads",children:"Network > Parachains > Parathreads (the tab)"}),"\nin PolkadotJS, and click ",(0,s.jsx)(n.em,{children:"+ Parathread"})," in the top right. Now, you can upload your runtime and\ngenesis accordingly:"]}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["Upload ",(0,s.jsx)(n.code,{children:"genesis-wasm"})," in the ",(0,s.jsx)(n.code,{children:"code"})," field"]}),"\n",(0,s.jsxs)(n.li,{children:["Upload ",(0,s.jsx)(n.code,{children:"genesis"})," in the ",(0,s.jsx)(n.code,{children:"initial state"})," field"]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"Upload chain artifacts",src:i(28504).A+"",width:"2136",height:"977"})}),"\n",(0,s.jsxs)(n.p,{children:["Pay the deposit, and you're good to go! Keep in mind the parathread takes around ",(0,s.jsx)(n.strong,{children:"~2 hours"})," to\nonboard. You can scroll down to your ParaId to see it onboarding, for example:"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"Onboarding ParaId",src:i(90397).A+"",width:"2873",height:"352"})}),"\n",(0,s.jsx)(n.h2,{id:"procure-coretime",children:"Procure Coretime"}),"\n",(0,s.jsxs)(n.blockquote,{children:["\n",(0,s.jsx)(n.p,{children:"** Your node should be synced with the relay before this step.**"}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["Procuring a core is easy with coretime marketplaces already available. Visit\n",(0,s.jsx)(n.a,{href:"/docs/learn-guides-coretime-marketplaces",children:"The Coretime Marketplaces"})," page to learn more about\nthem, and purchase a core!"]}),"\n",(0,s.jsx)(n.p,{children:"We have two options:"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"/docs/learn-agile-coretime#bulk-coretime",children:(0,s.jsx)(n.strong,{children:"Bulk"})})," - obtain a set amount of coretime in\nbulk."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"/docs/learn-agile-coretime#on-demand-coretime",children:(0,s.jsx)(n.strong,{children:"On-demand"})})," - pay as we go for our block\nproduction."]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"With bulk coretime, we assign a core to our ParaId, and as long as that core is valid, our parachain\nwill produce blocks and finalize them via the relay chain until we have to renew the core."}),"\n",(0,s.jsx)(n.p,{children:"It's worth noting that you can easily experiment using on-demand extrinsics, then later switch to a\nbulk coretime model. For now, let's start with on-demand coretime to get our first blocks going."}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"It is recommended that you first try an on-demand assignment, then move to a bulk assignment after\nyou confirm your chain can create blocks!"})}),"\n",(0,s.jsx)(n.h3,{id:"on-demand-coretime",children:"On-Demand Coretime"}),"\n",(0,s.jsx)(n.p,{children:"Provided your collator is synced, you can create a block using an on-demand extrinsic."}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["Head to ",(0,s.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/extrinsics",children:"PolkadotJS > Extrinsics"})]}),"\n",(0,s.jsxs)(n.li,{children:["Issue the ",(0,s.jsx)(n.code,{children:"onDemandAssignmentProvider.placeOrderAllowDeath"})," extrinsic"]}),"\n",(0,s.jsxs)(n.li,{children:["Set the ",(0,s.jsx)(n.code,{children:"max_amount"})," to at least ",(0,s.jsx)(n.code,{children:"1000000000000"})," and ",(0,s.jsx)(n.code,{children:"paraId"})," to your ParaId."]}),"\n",(0,s.jsx)(n.li,{children:"As long as your collator is running, you should see your block height increase from 0 to 1!"}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"On-demand coretime assignment",src:i(4265).A+"",width:"2873",height:"1394"})}),"\n",(0,s.jsx)(n.h3,{id:"bulk-coretime-assigning-your-core",children:"Bulk Coretime: Assigning your Core"}),"\n",(0,s.jsxs)(n.p,{children:["If everything is working as intended, you can now choose to assign bulk coretime to your parachain\nfor persistent block generation. For this assignment,\n",(0,s.jsx)(n.a,{href:"https://app.regionx.tech/regions?network=paseo",children:"RegionX's CoreHub"})," will be used to purchase and\nassign cores."]}),"\n",(0,s.jsxs)(n.admonition,{title:"Getting Coretime ROC",type:"info",children:[(0,s.jsx)(n.p,{children:"In the upper right, you will see two balances: one for the relay chain, and one for the coretime\nchain. Before you can purchase a core, you need ROC on the coretime chain. RegionX includes a tool\nfor doing so:"}),(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsx)(n.li,{children:"Head to General > Cross Chain Transfer on the right, and transfer 10 ROC:"}),"\n"]}),(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"Region X cross chain transfer",src:i(8099).A+"",width:"1918",height:"960"})}),(0,s.jsxs)(n.ol,{start:"2",children:["\n",(0,s.jsx)(n.li,{children:"Sign the transaction with Polkadot.js. If all goes well, you should see the balance update in the\nupper right:"}),"\n"]}),(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"Region X cross chain transfer",src:i(46935).A+"",width:"581",height:"98"})})]}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["Connect your wallet and make sure you select ",(0,s.jsx)(n.strong,{children:"Paseo"})," as your network:"]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"Connect your wallet to RegionX",src:i(52573).A+"",width:"383",height:"117"})}),"\n",(0,s.jsxs)(n.ol,{start:"2",children:["\n",(0,s.jsxs)(n.li,{children:["Click ",(0,s.jsx)(n.strong,{children:"Purchase a Core"})," on the left:"]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{src:"https://hackmd.io/_uploads/r12b0mxMC.jpg",alt:"GMcdatDW8AEC8kh"})}),"\n",(0,s.jsxs)(n.ol,{start:"3",children:["\n",(0,s.jsx)(n.li,{children:'In the lower right, click "Purchase Core":'}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"Purchase a core",src:i(33066).A+"",width:"1917",height:"957"})}),"\n",(0,s.jsxs)(n.ol,{start:"4",children:["\n",(0,s.jsxs)(n.li,{children:["Go to ",(0,s.jsx)(n.strong,{children:"My Regions"}),", and click to select your region, then click ",(0,s.jsx)(n.strong,{children:"Assign"})," on the right side:"]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"Select and assign region",src:i(60617).A+"",width:"1920",height:"958"})}),"\n",(0,s.jsxs)(n.ol,{start:"5",children:["\n",(0,s.jsxs)(n.li,{children:["Click ",(0,s.jsx)(n.strong,{children:"Add Task"}),", and input your ParaId along with a name for your chain:"]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"Add a new task",src:i(9147).A+"",width:"1913",height:"955"})}),"\n",(0,s.jsxs)(n.ol,{start:"6",children:["\n",(0,s.jsxs)(n.li,{children:["Select your task, and select ",(0,s.jsx)(n.strong,{children:"Provisional Assignment"}),", and sign using Polkadot JS:"]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"Assign the core",src:i(73044).A+"",width:"1918",height:"956"})}),"\n",(0,s.jsxs)(n.ol,{start:"7",children:["\n",(0,s.jsx)(n.li,{children:"Once the transaction is confirmed, provided everything is synced, your collator is running, and\nthe region has begun, you should see blocks being persistently created as they were with the\non-demand extrinsic:"}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{src:"https://hackmd.io/_uploads/r12b0mxMC.jpg",alt:"GMcdatDW8AEC8kh"})}),"\n",(0,s.jsx)(n.h2,{id:"whats-next",children:"What's Next?"}),"\n",(0,s.jsx)(n.p,{children:"Now that you can launch a layer one blockchain, the possibilities are endless:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Setup a local development environment for your parachain"}),"\n",(0,s.jsx)(n.li,{children:"Create a pallet"}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"/docs/build-guides-coretime-start#openzepplin-templates--guides",children:"Take a look at the OpenZepplin template - which has a lot more pallets configured."})}),"\n",(0,s.jsx)(n.li,{children:"Upgrade your network"}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},85360:(e,n,i)=>{i.d(n,{A:()=>s});const s=i.p+"assets/images/Coretime-ParaId-Registered-94cc0c2ffa8b6974ca84fe67e5eb2cd6.png"},4265:(e,n,i)=>{i.d(n,{A:()=>s});const s=i.p+"assets/images/coretime-on-demand-assignment-098632f2c2246a688ffb1405c12e87b5.png"},90397:(e,n,i)=>{i.d(n,{A:()=>s});const s=i.p+"assets/images/coretime-parachain-onboarding-9d96e69f180f0a932f526855ef990f73.png"},52573:(e,n,i)=>{i.d(n,{A:()=>s});const s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAX8AAAB1CAYAAACmqOG1AAAAAXNSR0IArs4c6QAAAGJlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAABJKGAAcAAAASAAAAUKABAAMAAAABAAEAAKACAAQAAAABAAABf6ADAAQAAAABAAAAdQAAAABBU0NJSQAAAFNjcmVlbnNob3TgLnqhAAAB1mlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNi4wLjAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczpleGlmPSJodHRwOi8vbnMuYWRvYmUuY29tL2V4aWYvMS4wLyI+CiAgICAgICAgIDxleGlmOlBpeGVsWURpbWVuc2lvbj4xMTc8L2V4aWY6UGl4ZWxZRGltZW5zaW9uPgogICAgICAgICA8ZXhpZjpQaXhlbFhEaW1lbnNpb24+MzgzPC9leGlmOlBpeGVsWERpbWVuc2lvbj4KICAgICAgICAgPGV4aWY6VXNlckNvbW1lbnQ+U2NyZWVuc2hvdDwvZXhpZjpVc2VyQ29tbWVudD4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgIDwvcmRmOlJERj4KPC94OnhtcG1ldGE+CpiCpnMAACGzSURBVHgB7Z0JmJXVmef/d79VdWsv9qLY91VBREVBkaDBJWrMqGkziZnuTLaedNoknclM53lmOulJtOcx3ZnppGPSJtqtj5oADioKGBBwQRYhsu9bQRXUvt295v+eWwcu1yquLErV/d5Tz61vX87vnO9/3vOe853PNWfOnE5oUAJKQAkoAUcRcDsqthpZJaAElIASMAS8wYJ8RaEElIASUAIOI+DqZHBYnDW6SkAJKAHHE1C3j+OzgAJQAkrAiQRU/J2Y6hpnJaAEHE9Axd/xWUABKAEl4EQCKv5OTHWNsxJQAo4noOLv+CygAJSAEnAiARV/J6a6xlkJKAHHE1Dxd3wWUABKQAk4kYCKvxNTXeOsBJSA4wmo+Ds+CygAJaAEnEhAxd+Jqa5xVgJKwPEEVPwdnwUUgBJQAk4koOLvxFTXOCsBJeB4Air+js8CCkAJKAEnElDxd2Kqa5yVgBJwPAEVf8dnAQWgBJSAEwmo+Dsx1TXOSkAJOJ6A1/EEFIAS+IgE9LtHHxHUFdrN5XJdoSv3zcuq+PfNdNO7/gQIZIp95vIncAt6iUsgoIXB+eHpZxzPz0e3OpBAusjb+cypYLHrHIioV0Q5XdztfOZUbtSu6xU33YtuQi3/XpQYeitXlkC6mMu8/cld2Xm7j52m33F369K36/ylEehOxO06mdqfXMXOy9Smi8xrOEtAxf8sC51zMAErEDLN/CWTSSQPHkP8g71I7DuCxLEaJOsbkWwPg1VndJKbyIpOP0EOIvZ5QbgrSuAZMgCe0VXwTh4D94hKuN3uc8TfFgSSrloAnH3I1e1zloXOOZBAT6JvBL8jgujr6xFZvQGJoydYKIhFmaoFpCxKXe5tPHxVg+CfNwv+T90Ad16g24JAsrkWAmTAzC8GiwYl4DgCNuvL1P6M6NPSDy99Ax1/eB2dbR1q0TNn9LWajbsgH3n3LkDw7ltMAZBZG5DM7vQCQMXfcZKnERYCmcJvRT+67zDaf/17RHcfVD9ODvix/ONHIP/L98E/etiHCgHJB04uAFT8JQdocBSBdOEX0ZflRCKB8Jsb0fKPT6OT6/qerdvXbPNP8H55qaL/8gUEb5oJj8djBN/WBCTjO7UAUPF3lOxpZIWAdfHIVMQ/Ho8jTN9+0y+eU0A5TKD4Pz+AINsCvF7vh9oCcjjaPUZNe/v0iEY35CKB7oS/gxa/Ef4ccHP0Oef8J1gBaPzn51ASDJgagC0AbB53ovXfJy3/zngS0V01aH91FzpWHAC21CGRdCMxYxAKbx2L/E+PQHB8GVxeHbrIZm6dnvXzn+Pq2XMIp7/z05R/X5t2mU0+QTW+ErxdblQ89h0Exw4/xwUkz4fTCoA+Jf6d0TjaX9qJ5kdfQefRFhjPbKeH1XgvEi4P4ggg5gogCh86h5Vg0OOzUHEHG3r8Wgio+J9195xp3I1G0fCDJxDZSQOiO82z0HqqEej2FIE+xicwbiRKf/wt+P3+bhuBbbLm+rTPiH9s32nUPfRv6Nx0Wp5iYzNIngOFP0mxT7i8RvhjnQFEWAhEXX7zc19TjmnPzEZoVEGup6XG7zwExN0jwQq/+Plb/rACjU8tPs9RuilXCZR88R4Usiuodf9IA7AEJ1n/fcIkjm48hroFTyFJ4Wdp1VVFN0mVKgT4pkkSHiRYC4hxGoc3Jf5uPxq3RrFu0Wac3tQkB2hwMAHr75cCINbahqYXlp8xIqRo0J9zGEjaSx6wLkBrHDjp8ej1Db5xWvyN9z8LHG2GO1335Uml6HfSh5cUlw9rALFOH61/HyKsBYT5i3A+7OG6miRWPLIbty+egpKReU5KX40rCdgH24q/dOtsf2094i1tZ909lpR1/+hyikCO8kgy7SUPeGn9i9UveUOsfju1yZ/L014t/uLjr3voOSTp36dZ/6F0YHIhATdFnxY/xT9q/P3i9vFT+Pmj5S8/KQDCp1xY+o2D+LMlE+DxS47OHjo6wti19+CZHd1uF4oKQxjYvwJ5HFdEQ98hYIVfLD0R/9Y33jGWfupfWjwys5kup8HhbA7xkDxQwDeAbd9/Jwm/JGqvFv/2l3YgsfkUXBT+Tp+bDbds3JW7TqZyYDJGdw+t+0R+AS3/AMIdPrTHKfieIGKhfESDPrQlvejwsADwe1G/rxPbVzVi6u2lcpasoamlFUuWrUCIr4pL45CIRlNzC+d9mD/3esy+ZlrWc+gOvYuAiH+Eb/GGDx3/eG6M1qN3SH8kW9uRbKTR0oeDK+CHKz+IZFOrNJaYmLgLC9CZ4Itx7R1m2eXzwsVnrZOWdGc80WNs/WNHIO/ma9Hy3Ms8X4uZ93JAtpZnXurxmI97g+QByQve8aNMAfBxX6+3nb/Xir9052x8dBlczHRJMdSnlsP3wBT4BhUjcuAU4qfDiC87Av+1w9i1cwzg9gDLTqNhcTP808sw/AsD4ernw7F3O7D5pTDauT3GAuD3P2/EpAUcCdD70ax/SbA7brsZE8aNMmlX39CEVWvexvIVa1DJzFs5eKBZr/96N4F0yz/yp73SZ4BB/lm/xqVPQ/fcitBdHEumKGRgRLbuQsPj/8rRP9sv63Uu533n3TCDBVUbIlt3f4hHYOo4lH3vz3H6v/8M0R37zfaKx76L+El2vvjhP5nl/Jtno/gvPofar/9Prq/tMZ6eQf2Qv+B6tC5Zhc5GPqMTRyMwbRyanxbxP386+CeMhHdgP7T/8Z0ez3+x6Sh5IY8Fk80fTmrw7bXiH9nJYXOPdtCpQ6ODz2VnXQzRmjDKvnkTIk9uQsv6/UhUlmHA92bj4NOH2dvHj6rvTcHxw7tQ9aUhiOQHsG9tG0bcWoLohtNoaafvnzWHRhox1UeiGDoywDNfeCgrLcbNN16LD3bswcFDx84R/5M1p7D/4FGEwxFUDR2EMaOGf+gC9Q2N2HfgCBoamzBoYH9MmTj2nB4GCRZ2R45W48Cho/D7fDzHMAwc0O+c88ijcrz6JA7wWtFYDKNHDsPwqiHn7BOORLn9CI4eP4mS4kJMHD8ahSHn9XiyD7XAsS6fMPv2JztTlqwIT0p65L+Ei1su4EiSRX92F9peX4eWl9dARpcs++bDyFt4A5o5QBy9yanTX+T5P67jQ5+7DfHjNeh4f+eH7i+8UwSf7oFRVQhv30sBroCnohTu4hA72dFPHmPXilFDkWANJ3qi5kPHp1akeLKuYBZpytGDy3Wp0tekQzb+wTkzkM9f6xtv8xwXlz498ZO8IDV6yRvW9y836oRCoNeKf/gVWiKdfHFLevJQ/BPH2xFddwLJcAKnnt+Dli0NyJs/HK7iPBxcegqRZADDvzoB3okV8A3Mx753I9j0Rjsa+Ni1FuahxeNGnK6jGGO8cUvkosVfMoYZF4RTcf/Y8Na7W7DijXUYTcH38FpvbdiMieNG4967FxrbUvbbs+8Qnn3h/yFEER44oALvvrcVW7buwMMPfgbursam5//wKg4dOYYxFPSWtna88eY7uH3BTZg1Y6q9FFb+cT3Wvb0Jg1l4uHmttW9txLw5s3DzTbPNPm0cifLJ3z1vrNuqykHYu/8QVq/bgAc/ewdk2YnBFgLyoEdleGZCEP0hdjOVRLqU5dCiuYjXnEY9h4iQ88R4DbFu8264Gk2LV/LkFJeSYhT/h9sRGD+SgtmM5hdfQ4SiKvsXzJ+N/BuvQfva9xC67SYkTtejefEqRNnmJNv7/+hbaH93GwJ8Ock7uD863tlqChUql9nu53j2hXfPh2/YYB5zGI2/W4IE3TUSPw/zWskX7oaPNdXw+7vQyqEs4tU16Pe3X4e3fzk8NA7KHv0yTj/263N4xHl8vLqWg6JVGV7+yWN5zha46ebx0VoO8/sGsi2y60BK2lm7Lr5/IYIzJiHJPNj+1ha0rVhv7s/mOUbl7DIXzixLe9p9C5F3zRS6ldgm88oatK3dZO4779qpHJ45iH4/+ivU8R7jDc3G0L+U9LLpLXlB8oTNH04QfZsWvVb821bQsmePnSR788SYMTC2GAV30vXCF7b8d4xCvOgUjtZ1YkhrHMO+NYEJ6EZLcxw7dscQ4qsAQ2/Kw4wyF6beUoTNP22g+PsQ57EJunve2dWJeyyBC5yKz1/cPhLGjRlppoePHMfrq9birkW34uppE806scp/++xiFgbDMG3yeLTRR/rC4lcx46rJRsylkeno8RN48rcv4E/bd5t93qSI79l7AN/4ysMoLysx5zEuppVrad1Xoay0xAi5CP+9d33KHCM7ifivWv0Wrp4+CcVFhXhx6XJTQH3lkQdM7UFqE797dgmWvrwSX/vzz8PT1afZXKCbfytWrID8zhcWLFgA+fW1YHz+p+pp6RnZ4UMvNiG7DnAqUiTLmdNs2wmUlv5gtK1+95zz1v9SxgpKnd8dCFBsvwoZarjl1TeRP2sq+v3w6zj2yA+QZJ5yl5ciSDdIZyKOtjUbUHjHPJRwNMqT333M3F9gwij4+KGSphdeM8Ja/OAiRFgwdGzeCQ8tchHy6P4jaF3xFgrvvBnFD9+Nun96GuB1B1A05cMzra+vpQU9ExXTx6P6L3+E1lVvm/uO88M0bW++x7jTPs+Iv1j/wUmjTbwC/FhKePMOUwPwc1149wH4WMNteSMV79KH70Dhonmof/J5FioVKPvqg4gerkZ4136eN5VThLu5TmrRnFf4ln/xflMANi9ZSdduf5R/+0uQa3ds2g4/ax7usTTglq9FnM9R5n1mS5/zbY+eauA92Fpg1005ZNJrxT+xu4XiT8Gm+Ec9tP7Z0JT0edDy9Adoz/ehtaoUR9a1oOmJg5hwz1CEWT144Wensb/Vh9plHbjhs4UYMDOEf+P8UeQhXkrLn8Kf5G/naXnAP3p4dcWbxgIXC6GOD4o0AIu1Lu4UCXv3HzZiO2nC6DMnHTliqOkZtO2DlLAfo/tFXDTTp7C3EYVfwtAhg3DXp29BCQVbwp59BzF40IAzwi/rrpo6EW+ufw87+ADNuW5Gyh3EGsdkuotskFqB1ADkwZJrHDp8DNfPvtoIv+wjYj9t8jiK/yqcoF82WzuFFfWeCoC+LPzG9UOrNGVzCh2RhtTUTLqWM90Emfunb/eUFEIaPmM1deZoOV/6dlkO0G/tH16J2h//Am0btqH5ldWoeuZxFNw8C01LV3GP1F3U/uRXSNJlh4APpZ+/C64CNria+4URv6Y/vCYJioK51yA4fSLaKcYyL42ztY//hiLfgSTzacnnbmc3aJcpZDxlxTj1xFMIb9tt9i9hweHpV4rWtRtZE/k0axkNaHvn/VT0M+IvAhyaf51p1A1OGYuG3y6Bt7YfgiwIjKuIecuIO49rEZcXLf0Ya0BeuocKWRsq4EiaHSL+XfGTeKZLrVnP5yF0241ofmkVGlkb4sOE4FUTEGQtoIU1gLw5zMsjh6KVhaKE7vhafjK9kO1xspU84cQCoNeKf6f04uGfiH+c1cm2nRF0/J/D6Cjxo9mfhzpPHhrpezx0JIGNv6pn1043mmJ56BgcwDF2/dzzapwPkButbi/aS2jx+yj8LESkusceoRcUxo4eTv98yu/+xpp3MGpElfnZkxw/WYMhgwcgwB5B6WEUC4DD9N9LkPYAHwViMPdLDzOmTzaLSZpGJ0+eMqKdvl3aGEqKi0yhI+tP8DxVlYPPsd4DfPBvuPZqc9iRY3SN8VyjhlelnwYju5al8Mom/nJgTwVAXxV+C0Oq9ynrMyW2KTvfbjXZw4iHXfNRtifrm1P+b7pVzLntwZza470UfgkdFFPZJ9nOr4QdqkbezCnspLDSdmBDMib+Zw4xLYIvrkCvj8vSYMw2C4q6OX+SU1NA+M2yCKOLBkHVM4+Z/ew/D61yT78ys9ix66DZN3nkBE7+5Em7i9FMscoTvKYEe792hw7T0Avk33QNPMyLbWwb8LGQK75nAfzsJdMZjSG89wi9Wp3w5ueh7KE7ERgzzLiHXPI8MM+b+Had384bNwsvIsv+4eycwf2K6faRnw3BKePQtGz1GV2Xe8y8v0tedkttJxV3e12nTHuv+I8tR5yNSFGKd8TNGkBJPoZ9Zzr8U0sQibvx3h8bcGhXFJNuKMO0OaV0D3nw5sY4Xt8KXD3WhVuv8yGQT2u6OoGn3nGjPcFuonQfMakxfmi67ZE9qUXsbW+fBLu5vfLaalx37VUY1NUQ6/exQGpmS3JGqKdft4C1BAnSVTTOrnARNgZ3946A+PylcGjv6kJnTxXjMASt7I0htQ0JUsA08rw9BdsO0dYh1u3ZIA3MEux5zm7peS6zAOjrwm9jarovnrH+xUaXhz8lI2flxcrKR9hOV03kwFEEJ47qsmpT5xvwV19EkEJ4+Bv/w4ihXN9Dl0aMfnPpneZjl9BW+rXPWsUUQ+4jy1aOZHp2KbX9jBp2bUmwm2WS+eroX/4dOiMxc4TEJ0F3UnDMcC6z0ZYFU4Q1VGZEBOinj7IQkF4+6ddJXelsvGU5ysZgOX/xZ+abtpJYfRPiktcpmEWfZucLti8k43JNF/p97SFOXDj0yPdZKMQx4rc/MedPj0938TPn4xka2DDexC+opeJH7jxvevxT5zn3/uS6KT6p9Reafp781HPFizouuHtrjEML5EFi33r+YuzJkzdrIIZ9fjQ2vVCLmuooxt85BKEpxZh39wCsPpHA4oNA6eR8BMd5Mf/WPOyLJvGv2xO4b04+xtJD0l7kQUfIg0iBB9eOv/hoi8++lBbQ66vWnUEntYLTdQ2mB49dKe6XY7TCrZU9oF+5sTAO0iVjg1Q1lyxbiV17Ur0qpFePuJDSg/T8idPik26lEvrzPDW1pyGNujaIsD/P9gSx6qWtQHoJ7WXjcnqQNgh5PIbQrXQhwQq+nV7Isb11X295ifEbGyuUfm6Zih+5u6n0Cupuvd3fbm9YsgI+Np4O/Ju/oEtkLIrpdw/dOBONdO8kWei3bvyT8buXPXQHpM97+X9kIz8bMVvpbkmdPyXD9rwirhLESSLbzTzXndku27hart9C942bQxWX0Gp2sXNDgO6ZcrYXiKHSuvkDY52XslePtBlUPHIvKv/+r1kapNyEcfY+k148UhB1F88kaxni+pG4tW/Zaa6foLXfwYZqWdexc9/Z4/jNYxddOF52RChaOIcNySGOrJuy/FOCLvecqnnZZbn/aG29aT8oZI+pwPjhjEMI5bxP37AhJn7xuibzsXb5Gpe9b8vB8rfLmdNs2z3MC04NF6+CHzOxAg7LLMKf4KBt8gKXt1+hsYr2b2jF0T1huPP5QYaBQbjp2nm7EXi11oUtDXF00jvjy+/EtiYX1p6W0T6B4gr6JQvYdpDnQizowrwxKZ/7xURB/Oe3zL3O+N6lF42E2TOnIZ9V3mXLVxsBlkbhlzkf4AM5a8YUs88IuoBEeFeufgtbP9gFeV9gORtyt7Gxt7ws9dKZ9NaRY2WfFlplJynyK//4lmkbGDWCGZ/hWl7Lxyr+iy8tp8vrOKrpw1/6yirT9VMKJR8ftjnXz2TD9z5Ie4PUJOQ+N77/AWbPmo4g7+lCQ64Iv+3J4Rs60LhZRFJFQGUq+nopy8204Gv+77/Dzy6elT/+Niq+dC+a2S+9cfk6c94Ye6gcp7/fz0K86vHvoXDuLNT+y/Nopf/fXLcrUc7cT8ayLKbfX/pyKxtFa9nLqJC+8WE//yH6ffl+tLEtQL5IFmODZvVPf8Uhzkdh2M/+GwquuxrV/+tfEBNXFU/S9No6I+KVf//oOedP59G+Y59czrh87P21mfcCaFRt32eOk/1PPb3UiHvVE983jcRR+v6Ftb1vOYc9Xqbpy9V0RUWP1WDQ33wFVU/8V/OuRPhwtdm/ef1mxGlcVf3v78NLA0kOTb+/S1n2VaaMIZs3UnfljP+9dlRPeclr2/gX0c4++e3eAOKzynHTi9djy/IaFI0oxBG2Cfx6bQSP3leEk8zkTREXCinsP6br59vTvagIJLGHno4HxgXw4PIodjX6jOU7OBDH+gf9YkBkDSK+//zkv+OB+xadcfvIQZLZfvmb50wXsa/9p4dY03XhFLvmLebbwNXsQudiAVFJ3/7CW288Y/nLca3suimW/v4DrCoz91ewh8edt99yTh/93ezt8/Jra868SSy++rsXzUd+2nASx3mNJey5U3uqzjQ0Vw0djPvY+0eGnpAg1pX0HFrPXkGRaNT075cG4oXz55h7NTs55J/xLZOH1LJirI21tbWh/vcrUGtG85SUTLkLLufUE8pDgj59Oum7Pb/Z3io1t8t/fQ/zQIJvpncXH09hPrdJ+8G513Xx5UcX3VDJcLjb4zL3z7bsZmN1Ms39lG3/9O3uYJCFFrte0m2Uvp43CA8bvxOXmVv/L96LsvsW0D1bQLerzzxP8jw7oTDoteLPlEfd4iPYdf8GtHq8aOJLW555/VB+ewVqWBt4ba8bO4L5KBztwcLJXgpeAkuPeHGg1Y/KghgWVSZR4Uvg9RNubKxnjwk6G12sYv7ipk7cNfLja+oQsZWQ2fhrVnb9M75/7lfA2kJPQdw6wTzGmQVJT6GDfl7Zbv38mfvJIy7tBU58ucuysOIvUxnGuZ1v2zb8aTeOf/cf7C46dTCBIY/9Nd3F41hzzzfDO1vhV/G/wpkiSb/9prmrUL8xgiZPAHVs9KwpC+F4ZR5ODAvhZGUI9f2DCLOnpJsFhLwUFqchJ7acR6w9lzT/yIh9si6JSaVRLFsUBF/01eAgAiL8YvlLV90ONoQ3NzfjxKP/gA6+oa3BuQTyhg/hB58eRVFRETth5Jku2OYFTlr+Tgg9m5W9IPbyBa5Jz1wPb1WINWgqdpg9dqJMmBjnE6yqsm+/my+lcCgtulFE3lkIiNDLwy73z8JAHnxJyoFsB/jFXL8Kv3BxYLAWnbxjIR/wCM2daZwfUjsS48BMZV6XHcMjxPcjJC/YUT2dYO2nP/ofn/8j/SqXMJ/PL3Bd9fxVWH3/TiTowknyTd7OJAsBfrOXb7FQ6EXwRfily1dmoPBT+QcGE/j1PBdGFvfqsi7z5nX5MhOQh1sedul2G5g3E25+0CPO0TdNyMw8unwu/Rzj4aWPX/KA5AXJE04TfkncPqGGZTOKceuKaSiaWcCxeThAm3RTM1WzVPUsM1+mHD+yrRNTSmJ4YaEb0/v1iaie+8Dp0mUjYC1/qdabAoBvjJfe96lzLX6TYzJqAbouJxmVspHXzzwgecG6epxWAPR6y98+/UWj8vD5VROxdVULnvpdK05wmAZWAsT4N24d4+YRZ4/RfDcG50fxtzM9uK1KXT2WoVOn8lAb9x+nMi+9OoLsVRJceB3y2dWydXvqPQvDJ2UzdOUjrrHLFp5dzpzq9hSBTC52uRfxCXGcJEl7yQOSF6xhILfopAKgV/f2sfklc5rgx10On4xhzQF+npH9+7eF2bWMBcGEkgRuHgLMr3RjTAl9u2rsZ6Jz7LKIvwTb8Btmt0Zp+G3ky0rVP/jHlLlvbFyrVjpNQcktDtINe9DffRMlk8aYhl4pAMTnL9a/BBV/g0H/KYHcIiAFgPzS+/ybAmD1BtT+/Nlc1LqzNZfc0vCLjlf/bz6EknnXGOF3Yt/+9Ce6z7h90m9a55XAxRKwVXzx9YrVZ8b3v346yvheRd1vlnTVAHh225Ck0xTqHOBQ/shnkH/9NPNCl6S9beh1krWf/tyo+KfT0PmcJiAPufX9SzXf+v6ln3fillkcMtyLul++SOGXFiQ1lXOmKsR0L//KZ1Fw49VnXD3pb/NKpndiAdAnff45rVAauY+dgHX/yFTe+pUXv2TYh8bGRjRs34P44jVo5WBm2gQgqsifWP19dBriSKvez8zlW7xjUVJSYqx+eaEr3ep3ovDLQ6biLxQ0OIqAiL4EmYrbR37SACyFQFNTE2pq+D3addvQ9jK/HMX3APqw9vVVzb7k+/bxU5MFi+YAc6ZhwIABKC4uNm/x2gZe+2KX5AOnir+6fST1NTiKQLr7x4qAWIPiCpJlcQk03hZCZNpI5L+/H7EN29HOoSBMmdHlOhJ10mVmm17GI5/DVvtmTUJ0+iiEBg001n5hYaFp3wnwk5a2Z48VfDt11APQFVm1/J2Y6hpnQyC9BmBrATLyZyTCr8axFtDa2mpcQfX19XCdqEPgeB1wrBbR6lOI8tOHcY7SKmMLa83gCniFWFB7C/Lg5+cifYP7wVXZH5Eh/GbGoHKUlZUZ0Q+FQsbaF9GXAt0W9Fbw7dSpj4OKv1NTXuPdbQFg3wOwhYAUBDISqPykMJC2AVkX5aissq8tQBTnJ0tAhFtqamaoDoq7dNsUsZfROeUngp8u+rKvHGMF304/2bvuXVdT8e9d6aF3c4UIWBGXqfxsISANwlIQiNjLVH6yzm6/QrerlyUB68KRxlux7OUnhYFMZZ3drqLffXZR8e+ei651IAFbAEjU0wsBmbcNwzK1hUMmovTjM7fp8qUT6M5atxa9CL39yX52ffox6fOXfjd9/wwq/n0/DTUGl5lAuojbebH0JciyXWenl/nyerqPSMCKuUztvIi+BLucOW826j9DQMVfM4IS6IFAprhnLvdwmK6+QgTSBV9uIXP5Ct1Wr72sdvXstUmjN3alCah4XOkUuLDra3pdGC8V/wvjpXs7mICKi4MTPwejroMe52CiapSUgBJQAtkIqPhnI6TblYASUAI5SEDFPwcTVaOkBJSAEshGQMU/GyHdrgSUgBLIQQIq/jmYqBolJaAElEA2Air+2QjpdiWgBJRADhJQ8c/BRNUoKQEloASyEVDxz0ZItysBJaAEcpCAin8OJqpGSQkoASWQjYCKfzZCul0JKAElkIMEVPxzMFE1SkpACSiBbARU/LMR0u1KQAkogRwkoOKfg4mqUVICSkAJZCOg4p+NkG5XAkpACeQgAW9jY2MORkujpASUgBJQAucj4GrviHaebwfdpgSUgBJQArlHQN0+uZemGiMloASUQFYCKv5ZEekOSkAJKIHcI6Din3tpqjFSAkpACWQloOKfFZHuoASUgBLIPQIq/rmXphojJaAElEBWAir+WRHpDkpACSiB3COg4p97aaoxUgJKQAlkJaDinxWR7qAElIASyD0CKv65l6YaIyWgBJRAVgIq/lkR6Q5KQAkogdwjoOKfe2mqMVICSkAJZCWg4p8Vke6gBJSAEsg9Air+uZemGiMloASUQFYCKv5ZEekOSkAJKIHcI6Din3tpqjFSAkpACWQloOKfFZHuoASUgBLIPQIq/rmXphojJaAElEBWAir+WRHpDkpACSiB3COg4p97aaoxUgJKQAlkJaDinxWR7qAElIASyD0CKv65l6YaIyWgBJRAVgIq/lkR6Q5KQAkogdwjoOKfe2mqMVICSkAJZCWg4p8Vke6gBJSAEsg9Air+uZemGiMloASUQFYCKv5ZEekOSkAJKIHcI6Din3tpqjFSAkpACWQloOKfFZHuoASUgBLIPQIq/rmXphojJaAElEBWAir+WRHpDkpACSiB3COg4p97aaoxUgJKQAlkJaDinxWR7qAElIASyD0C/x/ILCwQolpGTAAAAABJRU5ErkJggg=="},28504:(e,n,i)=>{i.d(n,{A:()=>s});const s=i.p+"assets/images/coretime-register-parathread-c49534aa188c71fcb462ba7ded9014ce.png"},9147:(e,n,i)=>{i.d(n,{A:()=>s});const s=i.p+"assets/images/regionx-add-task-afdc4b2a7427016140a74e3f40cab22c.png"},73044:(e,n,i)=>{i.d(n,{A:()=>s});const s=i.p+"assets/images/regionx-assign-region-fc7974f69204e5cea7583044139e4763.png"},46935:(e,n,i)=>{i.d(n,{A:()=>s});const s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAkUAAABiCAYAAABeSKdmAAAAAXNSR0IArs4c6QAAAGJlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAABJKGAAcAAAASAAAAUKABAAMAAAABAAEAAKACAAQAAAABAAACRaADAAQAAAABAAAAYgAAAABBU0NJSQAAAFNjcmVlbnNob3StA1u0AAAB1WlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNi4wLjAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczpleGlmPSJodHRwOi8vbnMuYWRvYmUuY29tL2V4aWYvMS4wLyI+CiAgICAgICAgIDxleGlmOlBpeGVsWURpbWVuc2lvbj45ODwvZXhpZjpQaXhlbFlEaW1lbnNpb24+CiAgICAgICAgIDxleGlmOlBpeGVsWERpbWVuc2lvbj41ODE8L2V4aWY6UGl4ZWxYRGltZW5zaW9uPgogICAgICAgICA8ZXhpZjpVc2VyQ29tbWVudD5TY3JlZW5zaG90PC9leGlmOlVzZXJDb21tZW50PgogICAgICA8L3JkZjpEZXNjcmlwdGlvbj4KICAgPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4K+Te7IAAAIQ5JREFUeAHtnQeYlNXVxw/sIk2K9KL0XqQjoBjE3jCiiOVDY9Q8lqgxpueJ+VKMfkmMJZaADUVFBSIiSFFAeu8sbWkL0ntbYBeY7/zvcmffmZ3yzu7M7Ls7//s8u2+ZW3/33jPnnlumjE+d0JEACZAACZAACZBAihMom+LlZ/FJgARIgARIgARIwBCgUsSGQAIkQAIkQAIkQAJKgEoRmwEJkAAJkAAJkAAJKAEqRWwGJEACJEACJEACJKAEqBSxGZAACZAACZAACZCAEqBSxGZAAiRAAiRAAiRAAkog/fDhwwRBAiRAAiRAAiRAAilPoEz2yRyeU5TyzYAASIAESIAESIAEOH3GNkACJEACJEACJEACSoBKEZsBCZAACZAACZAACSgBKkVsBiRAAiRAAiRAAiSgBKgUsRmQAAmQAAmQAAmQgBKgUsRmQAIkQAIkQAIkQAJKgEoRmwEJkAAJkAAJkAAJKAEqRWwGJEACJEACJEACJKAEqBSxGZAACZAACZAACZCAEqBSxGZAAiRAAiRAAiRAAkqAShGbAQmQAAmQAAmQAAkoASpFbAYkQAIkQAIkQAIkoASoFLEZkAAJkAAJkAAJkIASoFLEZkACJEACJEACJEACSoBKEZsBCZAACZAACZAACSgBKkVsBiRAAiRAAiRAAiSgBNJJgQTCEShbtozk/ZUVvZUyZfQfnWcI+Hw+OecTOXfunP7pPR7oSMAjBCg/irciKB8Kx79M9skcStLCsSuVoaD4pKeVlTT9ow5UsqpYdSQ5e/acnNE/CEQ6Ekg2AcqPZBN3nx7lgztWVIrccSr1vqAApaenGYWo1Bc2BQoIxejMmbOqHKVAYVnEYidA+VHsVRBTBigfwuOiUhSeTcp8AstQuXJpKVPeVCpobu5ZYzlKpTKzrMklQPmRXN7xTI3yoSBNLrQuyCSl3kAZokJUequc9Vt669YLJWP78kItFD4PrL+C7KgUFWSSMm8uuCCd02UpUNsYyaOu6UggngQoP+JJs/jionwIZE+lKJBHyjxBoKVhSxldShBAXVMxSomqTkohKT+SgjlpiVA+5KOmUpTPImXuYDKlQpQy1e0vKOocdU9HAkUhQPlRFHreDUv5kFc3VIq820YTkjOYSvFHl5oEWP+pWe/xKjXbT7xIejMe1i9PtPZmy0xQrrBtlpaCBMEtQdGiDfAMqhJUYR7JKuWHRyoiwdlIdflAk0GCG5iXosc5RHQkAAJsC2wHsRJgm4mVWMn1n8p1TaWo5LbbmHJuT5qNKRA9l1oCMJPzZ1tKbfXGvWCUH3FH6ukIU1k+UCnydNOMX+bQyOlIwEmAbcJJg/eRCLCtRKJTOj9L1TovtsNLMtZlmt9pQnPCXHXlipWkZs2LpFrVC2NqYTNmLZAVGWvlqUd/FFO4wng+deqUZG3fKQcOHZKLqleXFs0aS7n0fITLV66RSd/OkGefeiTgfaxp7d13UHbv3SeXtm8da9Cw/vFbZvF2+CHSr776SlavXi3VqlWTq6++Wtq2bVsgmbVr18rUqVN1yiZdrrnmGmnRokUBP8Evzpw5IwsXLpTZs2dLw4YN5cYbb5QaNWoEexM3ce/atUumTZsmuF5++eXSu3fvAvEcPXpUvvjiC8nKyjLp3XbbbVKrVq0C/uyLLVu2yIwZM+yj/nBuWWnQoIF06NBB6tWr53/vvNm+fbtMmTJF2/1Zufbaa6Vp06bOjwPuDxw4YJht3LjR8Lr55pulcuXKAX6K+oA2kas/BRJvd+ToMdmatV1O5eRInVo1pWnjS+KdRMzxLV2+Wpo2aaT9tmrMYeMVIBqXcRO+kUNHjsoD995RpCQ3bc7StYPp0uiShkWKxxk4EfID8bvpv8582Hs34dz0++PHj5t+vGrVKmnfvr2RM5BTTudWFtkwhZENR44cMf1969at0q9fP+nSpUtYS24yZAPKkij5YDl59RpY+0nM5ZRps/TnvX1SqVJFTdUnR44c0/8iHdq2khuvv0p/lV01JQ+5eQuXysw5C6V6tSpyQfnysmfPPqPA3THgRqlTJ/yXZ2GKsFYVxmWrMqRju1ZhO0Ys8eLXquONEwoiOu+CBQv8WUlLS5PXXntNHn/8cf+7P/7xj/LnP//Z/1yhQgX54IMP5K677vK/C77J0S9TKAHffvut/6NGjRrJ119/bQSXfekm7smTJ8utt94qubm5Npj8/Oc/l5deesn/vG7dOlOWPXv2+N/94he/kEmTJslll13mf+e8gcL24IMPOl+Z+3LlysmTTz4ZED+E6g9/+EOZMGFCgP/+/fubMpXX9uR0SPvll1/WX70/538NhevTTz+Vvn37+t8V9QZtAm3jnPbDeDjkd8y4SbJl63apXauGnD6dI4f1S/6ShvVl0O036TlJF8QjmYhxoF0uXrZa2rZuITVrVDd+0Z6mzZgrP9Dfg+vR7dKI4RPxYbK5zFmwRCqrXI2XUpQI+QHObvpvqPpwE85Nv8cgpU+fPvL999/7k7nqqqtk7NixUrVqnvLsVhb5I9CbWGQDwv3lL3+RP/3pT2awZOO55JJLjLIWPHBKlmxAPuItH2zZPH/NPpnjK46/51/6j2/cxGn+tA8eOuqbOmO+77nnX/VNn7XQ/z5a3iZOmeV78eVhrv1Hiy/U54uWZvj+94V/+xYuXe1PZ9eeg75X3/rA98qbw33HTpwy7+cuWG7yf+RYtt9fqPjcvDtytOhx2HRycs/oj6bH1/3zn//EN6nvuuuu8+nIyKdf+D790jN/hw4dMonhHfzoqMenypNv5MiRvpo1a/pU4PgOHjwYNkO/+tWvTLjBgwf7MjMzfapUmWdVCPxh3MS9d+9en1pXfGph8n3++ecmD507dzZxqeXKH9ctt9xi3iFdHV36/vrXv5rnnj17+v0E36iCYvyoBcs3f/58n1q0fM8//7xPrUTm/bvvvusP8vDDD5t3t99+u2/u3LkmH/fcc495d/fdd/v0S9PvV5VK8/6KK67wzZs3z6cjWJ8KTJ+u6TBxR+LmjySGG7QN206Keh0z7hvf/738tm9L1k5/nJmbtpm+M3rsJP+7oqYTKfyOXftNH1yZkRmQXjz7U6T0Q33mlsunoyf43np3ZEC+Q8UX7d2x4yd9x8/LpGh+3XyeCPnhpv+GasZuwrnt9+jfkE9/+9vffBs2bPANGjTIPP/hD3/wJ+1GFvk9n7+JRTaMGDHCpKkWdt/EiRNNf4f8Ucuzr02bNgFyMtmyAcWJp3xw09a84Cf+cyqFVANhQejVo4tUufBCNb3na+6I7tjxE7JsRYZMnzlP1mdujprCaR0ZrsxYJ9PU/7oNmyQ3J99KsFafV61ZHxAH4l+wZLkZ1QZ8cP5h1tyF0qZlM2PFsp9jmq97l0vl4KEjOi2Tb2HA5+d0emTF6nXy3cz5su37ncYCZsPhqm1NNmzU6Red+kO5jp844fxYtu/YJas0/9bBHI5yn8jOlkVLVsrsuYvkwMHD9uOoV0ztxNthygzu0UcflSZNmshNN91krC0YWakiYz7DVBEcRjcqgEQVAPOHqarPPvvMfBbqH0Z5cLDmYKpNhZSxEM2aNUtg1YFzE/ecOXPkhLK94447RAWeycPvf/97E37YsGHmin+2LL/5zW/M1JcKQjNVZd/7PYa4qV27trEmYVrud7/7nSkrvNkyLFu2TN555x1p166djB492kzdgcUnn3wiPXr0MNYfVX5MzLAo/frXv5YLtQ9gWrJXr15mOu65554TjGB3795tLEshslHoV/FqG0ePHZcVq9ZI3z49pK7DctqwQT1prX1n7fpNASNh9FG0afTRJctWFegDaPNr12+UvXv3m37y/c7d/jKGkwcbN2+VlavWGn8bNG5MZ8OpyilLV642ceH5pFqT0N/R7yAPkAf0q+MnsvGxkT+wCqMPI5/BLlz6wf7wHCsXhMnr5yvC9vNI8g3h12nZN6u1zjrImF2798refQdkzvzFsnjpSsk+edJ+HPUarzbiTMhN/3X6t/duwrnp9zpwk0WLFknLli3lt7/9rbm+8cYbxjLvlA22H0eSRTZvwddosgHfA7Aqw7qMct1www2mv0NGwZoNWffWW2+ZaItDNiDhRNR9MCevPcf/27KIJYSpFvPh1u3cvUeGvfeJLFQhhk499qvJMu7rb+zHBa6HDh+R90eMkjnzFku2CjkoUq8NHe4XeIcOHZaJk6cHCIWMtRtk5uyFUqFC4DQGIj91+rRRllqqYA92HXTNz+CBt+h6msB1Cp+OHq/KzmrZoXkfOWqcTJg41R/0jCpMn/93gkyYMl0Oq3KwUgXvG8NGGCXJetq8eZvMVuFlHfI3feZcGTHyv7Jpa5YKvU3y9vCRKrTzvgCsv3BXRRp317VrVxPnypUrzRXrZDIyMgRTQVAA4NasyftS6tixo3nGv379+pl7qziZh6B/WC+gFiWztsd+FBzOTdxu/CD+4LJs3qwKqH5h2vc2D26udevWNd7sVNHixXn1+MADDxQQMPfff7/xC+EMh/ye1C8rrDeqrmvWnO6VV14RtT5J69atna+LfB+vtrFbp5PhWrVoWiBP/X/QRwYOuME/TZedfVKGfzTK9E300WUrM+TdD0eJU/FBm/92+hz56POxpr1jPQ5cJHlwUPv2nv37jT9zvy/vHtNX02fMkx3nBy8nTpw0z5+O/krmL1om+1SufDdrnnyiaX0zfbaM1bU9ezTsNO1z//7PcKOkmEijpG/9OK+xcEG4Y8dOyIefoJ9vC9nPo8k3xAElM8Mx8JutsnDK1Fny2ZjxsmvPXpmrSwHeGPqh64FVvNoI8mad275p/durm3Bu/EDGQClxyiYoMZBdmEY/diyvvbmRRTZv0a7BsgHrBQ8fPmzWWV588cUBwSEv4IpTNiD9RNQ94vWyy9c+ijmXsDAs1RENhF/fy3ua3MDCM3rsRLM+4Mbr+hktPnPTFhnz5STp1LGdNA6xkDBjbaaU09/1GnL3QLlANXAIxNeHfWgsMhjFttc1S7N0FLghc4t0vjTvyxtWGywGrRC0tgOZsEKtapWCi1yxyLppk4KLSNu1aelfu4D5/QWLlstZzUda2bKyffsO2X/gkNxz561Sr05tU87/fjVJR6orQn6hGA/6D6PYewfdJg3q533pQqBjpN2pQ1vrJew1EVuv8YU+ZswYs14IFpxNmzYZSwZGW3ZBsO3oM2fO9AsfKE9w+89/eYXKNBZW65ScUbKw+BEuOJybuJ1+MCKDw4gLzpk+1jxhbRSsXVjng/JgkfU//vEP49fNP7QznRoTnVY03hEX3JIlS8y1efPm5ur8BwsbnFWcli5dap6xfirYQXg7BXjw54V9jlfbwBq7dF1TVtGsEQzMTZULK6sFOL//jPv6W6MgPnDfnaaPom/gC3uiDhR+fP9g008Qw2kdkNyt/eRiXZMEF00e9OzWWVo2byZDt3wsvXp2NRshTMAw/5pon7+m3+Xm081btsnnX0zQ9rFFfvqT+805Tkj/tbeGG1nRpVP7qOmHkkexcEFGTp0+FbGfR5NvYYpq4n34R4Ololrkz+ji+tf+875kbt6i6666hAvifx+vNuKPUG+cfdO26+A+7vRv792Ec/oJ1++tH2zkgHKEMtr0kRbkQ5UqVczALJossnkLdy2psgHlSUTdh+PklffFailavSZT3vnwM/P3qgofKCv9f9DbKC4AtFNNvhhVdu/ayV85zZs2looVK8o23QUWyl3Ru7s8NGSwEbYwk8PUXa9ubdmiu2HgqlVFQ69vRmF4hqka01/t2rbEYwGXc37qrVyae/2xc6c8ZQuRNVHFDQrfHt1NBocdME/8ZIhRiCDkjxw9LnVr1zJTZrAihXO1dRePVYjgp1GjBspgRzjvCX8PgYHpH3R47MLaunWr2R3WrVs3f9r33nuvuYfSAUvHm2++6V+EbUdNfs+OGxsO148++shMSw0dOtT4sOGsn0hxY7E2dsWNGzdOfvazn4muaTK7SxCRjQf3EJCwwGRrW8DiauwEadasmYRSZODf6ZA/TP3iD4ugYTmDOd4uJMcOGDirKDrDYpoMbt++vLaBXSVwiKukudO5ObpbRU/KjpLxHF3wjnbbsnlT00fhHYOF9tr/MCVs+wne165d068Q4bkw8gDhwrnmjgFN48YXG0WtQ9vW/oMtYfWsqwOXrdu+N1EUJn23XGweo/XzaPLNxhN8bd2iuVGI8B4H8zWsX0+ytoWWocFhE/Hspv+GStdNODf9HgMPTHnr+iOzCQJT27qG0QzEkK6VDzY9XMPJolD5xLuiyAbICygkpUE2hOPj1ffuv+kTUIK6dWpKO90lArdaLTzHdF1CN12nYwXrLm2wcO+NKLj+5Oh5c7rx4PiHUdB3s+fptNR6s+OokipQp3NO69bg/B1i2OE2ZepMM1WRuXGrmdNt2ayJI5b8W+zigNuvpvnC7DJLUwEEd1Z3vliH7cEw22O9ARQ8rEEyDkvuXDqMyp1xugwWN2+6GNBYRZ544gnBPSxFWLtz5ZVXCszC2C2F7ff4DLtFnnnmGfNlj3fjx4+PuB0dSgXm02GJGjJkiFFasAtMFzT7w7mJG1NwUITuu+8+efXVV03Z77zzTlm+fLk/HrzUBdAyffp0GT58uFFmdMGjwB/SWLFiRURmUJ5QZlgVPv74Y4H1B4oaFAQ4HFEApcy5s81GaAWePcagcePG5iNdTG29lJgrdpFirQvW6VwY4egATIFjjU+TRoHTBU0a5VlcsUavQb08a2hw4QsjD4LjCPcMxQxT9+nl8urN+kP/RX7hCpO+Wy42veBrcD93I9+C4wj1XFaPY7BW01CfJ/qdm/4bKg9uwrnt9+jv6Pvon/jTzQ1mTSEGepUqVTLJu5FFofKJd25kA/yFkg2wVMGCVRpkA8pYklyxWoqwbRfTYPi79qq+ZupsmSoM1qWVyTt1995BA+THQ+4K+LuiT94Um/Vrr9N1bQAWWA4ccL0889OH5MlHHxCj8FhNSz22ad1cyqgQXK9TaBt0Oq5Fcz1vyLGOycaF60XVq5nHrKy80aLzM1iZJk75zqxzcL6PdI8pLxxH0KPrpfLUYz+Sp/WvX99eeUEceYwUhxc+g8KCkQwWQWP9CyxEmFLDmhjdIeLPIhYN4kseU0RQAqz1JdJ6HYySMHLbsWOHUWCwxgdbrZGOc4uqm7hxvhEWKGPBM6w2UJDgbPqwzsDShbUEmMeHkjpw4EAjIGH1ibT2CfFgSy/W+mBUiBEqTO14tg7WNDg7NWbf42oVLmtdwwJsOLuY3Dyc/4djDHSXnFmY7XzvlXuc2wW3dVtB6yU2G6CfQHHElDZcttan0x1W6xycHYQ4P7P3hZEHNmw8roVJ3y0Xt/lzI9/cxlXc/tz031B5dBMuWr9HvC10Ewf6+Pr160V3n5lzymA5srIBftzKIvgNdpQNwURKxnOxKkVORHVq1zC7u+bMX2KEJz6DKRnaMhYX1lFTuv2rcVH1sIc84tA4TLFhJGoF8Ck9L8XpsHaoebNGZofaNhXi7dq0cn4ccI+RHs5ZgQkdeXG69Rs2m8XOsEa5dYgH/rt362SuCHdS1xEk0gXnOx5pIU78YdrMOhx8CBecHs786NSpk7HGYDcFFhKHO//HxoUrrE0Ybb344otGOfrlL39ZYGrJTdxY9Kxb8Y2pHHFgJPnYY4/5k8LIcOfOnf52h/xv27bNfB5cFn+gEDewikFRxJkjmIqDg4kegnW4jkphTbMO6b399tumPBihwsGkD0sT1jThrBPrsNYBO9CgbCLv8XSxlC9Suk0bNZTyulFhq2PXk/UPyyimrzEdddFF1Uy/3Ky7y5wuK2uHsRA3qFfH+TrgPjZ5ENhXAyIq5ENs6ecl4paL2yy5kW9u43LrL15tJFR6bvpvYcNF6/eIF/21VatWxjL0yCOPmOUAGOgFOzeyKDiM8zmUbEBfhgIGxWzUqFF+71hu8cILL5hnWMbgikM2IN1E1j3i96LzjFIEOLD+4JC9uQvyFpxinh+LLGfPW3J+2262YNvtUN2NhtFnKIeR2Ra16mDxNE6FhlUGAvnkyUDFA2sHdupaonS1EDXVdCK5q3Sd0wld6PzF+Mlm9wamAHCY4wzdqt+pQxs90DFw91mkuGqo5QnbYRcsXqa76dSCsnSVzNXywQXnMVI8sXwWp7P5ApLUc3bMMywv6PAPPfSQ2WaPNTwYpVmH3RWYAqtTp44MGDBA6tevb9YX2c+hPMBKg8+cDpYVLFbGjhAoBP369ZOnn37a6cXs3IgUt/UMIQflCooZlBEoZhDGcBBMetaSfxcItt4iXSh4sOBgNOnWQfHC1n9YpHD4IhxOt8ahi9jNhi32ONgS5YAFCZaz999/3yhCNg1Y4KBEQXF86qmn5NlnnzV8oKRhy64VktZ/Ua/xahtmTVWv7oJdY7POHxmRpWuHsJsLx2JcecVlJqvYnHBZzy6yfuNm9ZtpLItY5LxMt/N314MVgw+ydJbPjTyoqkdl4MsQMgDT0/F0btIPTs8tl+Bw4Z7dyrdw4QvzPl5tJDjtwsqGaOFsOpH6vfWDvgkLLQ5LxKGNOD4EFh6ncyOLnP5D3YeSDfCH/o71S5CnkKU4FgQDRpzAj+NOcIyJdcmWDUg3UXVvy+TFa7qXMoWzf7p07mAUoK6dO54/Mfp6s50UJ9JCwFbWuV6cStvo4gYhs37d1X3lO92GP163wUPBaqYWIawhWqOnRGMhM+bo4Zo1bWRGtq1bNvev/wgZob7EGof/ued2MwWA7bLQniF4u3fpKH0uy19YHC68831XDXNUF38vWrxS8zlfaulPm/TWL4lZum32gO5Kc+7ScYYryj0sIWllA9dKFCU+hMV5OpgO+de//mWm0PAOSsfrr79uBAye4bBoGVNhUHygwOD0VquQ4HOsa8D0WvC8Oo7dxxoiCCzM+0ORCD4zI1rciB8O64pQX1hIifU+GBk6HdYCIX494NH8rAjSgZKGsgSn6QwX6h5WIgivv//970aoQenCtBfygMXi7733nhmN4qdG9NC4AKGH+DBy/PLLL83ON0zDQWnEgmycW4K1WRjZxtOhbcTLddcp4QoVK+jxFgvMeTiIF3365hv6B5zx1adn3nEOk3VdH0bFWIPUQU9v739l74hZQcnv0GlxbC8PJw+wNqinWmEX6Jq9Nap0Pf34gxHjjOVDN+mHis8tl1Bhg9+5lW/B4YrynAj5gfxE67/hZEO0cLas0fo9/OEcIgxirr/+ejMIcQ7obDxuZJH1G+kaSjbAMow1jLAM4Yrzk7AbD2eewb/TJVs2IO14ygdnWbx8XwYnSHo5gzZvmELAbrJIizitX1xzc8+o8nIu7E8LYI3K63pWx6CBN4fc2u+My3mP3TNWkDvfx3oPxQrliWXqLdY0rH8sIC1/QWL0X5QD1hfsRnMqOzZtfI6/SMoFhJ/ZueT4wkd928XKNq7gq5u4EQbxB/+eUXBceIYSDQGJkVski0WosG7fQcmBoLE7zyKFg9IJhRHWtUS50zlnND/xFwFYW4Y6j8QRqcKC5rZPOxlEkwfoo4i/vCrDiXDR0g+Xphsu4cI630eTb06/Rb1PlPxw039DyQY34VBmN/3ejR83sqiojBEecgFKkZsp8mTIBuQpUfIBcXvVlRilKJ4A0fgwSsVhbg/pAu54j77jmdd4xVWhfDktZ7xiYzylgYDqqnp+TW5pKArLkGAClB8JBuzB6FNVPiTGfODBCrZZws8HfKknYmM7+32Db0sJhQhlR3nT0z21hMxWCa/FRKA4j3QopiIz2UISoPwoJLgSHCxV5UPKWYpwmCMWaePgtpJ4SF5h+xisYRXKp5wOXFhcKRHu1GlMMcd/6iwl4KVYISk/UqzCtbipKh9STilKvaadX+JyejBduh7aRkcCZ9RymJt7liBIwDUByg/XqEq8x1SWD/yGLPHN130BcBouHQmAANsC20GsBNhmYiVWcv2ncl1TKSq57TbmnGOmhNaBmLGVugBoA5w1K3XVmvACUX4kHLEnEkh1+UClyBPNMHmZgFkUf3SpSYD1n5r1Hq9Ss/3Ei6Q342H9ilAp8mbbTGiuMBI4m4CzaRKaaUZeZAKoc1oKi4wx5SOg/CidTYDyIa9eqRSVzvYdtVQ5emgfFaOomEqNB9Q16pyOBOJBgPIjHhS9EwflQ35dUCnKZ5FydxBsnEor/dWOOqZCVPrrOdklpPxINvHEpEf5EMiVSlEgj5R7gimcUyqlt9pZv6W3br1QMrYvL9RC4fPA+ivIjucUFWSSkm/wEyDp6TzHqLRUvlkwqUcwcJdZaalRb5eD8sPb9ROcO8qHYCL5z1SK8lnwTgng5Foc8JimfxB0dCWHABQgHM0PgceTqktOvZWmnFJ+eLc2KR/c1Q2VInecUtIXfh0776+s6G3K/E5cSalsKD7YRIgfOMYv3Sfi1+5LCgvm03sEKD+Kt04oHwrHnz+GVThuKREq/4uW5xqlRIWzkCQQRwKUH3GEyaiSRoALrZOGmgmRAAmQAAmQAAl4mQCVIi/XDvNGAiRAAiRAAiSQNAJUipKGmgmRAAmQAAmQAAl4mQCVIi/XDvNGAiRAAiRAAiSQNAJUipKGmgmRAAmQAAmQAAl4mQCVIi/XDvNGAiRAAiRAAiSQNAJUipKGmgmRAAmQAAmQAAl4mQCVIi/XDvNGAiRAAiRAAiSQNAJUipKGmgmRAAmQAAmQAAl4mQCVIi/XDvNGAiRAAiRAAiSQNAJUipKGmgmRAAmQAAmQAAl4mQCVIi/XDvNGAiRAAiRAAiSQNAJUipKGmgmRAAmQAAmQAAl4mQCVIi/XDvNGAiRAAiRAAiSQNAJUipKGmgmRAAmQAAmQAAl4mQCVIi/XDvNGAiRAAiRAAiSQNAJUipKGmgmRAAmQAAmQAAl4mQCVIi/XDvNGAiRAAiRAAiSQNAJUipKGmgmRAAmQAAmQAAl4mQCVIi/XDvNGAiRAAiRAAiSQNAJUipKGmgmRAAmQAAmQAAl4mQCVIi/XDvNGAiRAAiRAAiSQNAJUipKGmgmRAAmQAAmQAAl4mQCVIi/XDvNGAiRAAiRAAiSQNAJUipKGmgmRAAmQAAmQAAl4mQCVIi/XDvNGAiRAAiRAAiSQNAJUipKGmgmRAAmQAAmQAAl4mQCVIi/XDvNGAiRAAiRAAiSQNAJUipKGmgmRAAmQAAmQAAl4mQCVIi/XDvNGAiRAAiRAAiSQNAJUipKGmgmRAAmQAAmQAAl4mQCVIi/XDvNGAiRAAiRAAiSQNAJUipKGmgmRAAmQAAmQAAl4mcD/A1FtzTlyPtIaAAAAAElFTkSuQmCC"},8099:(e,n,i)=>{i.d(n,{A:()=>s});const s=i.p+"assets/images/regionx-cross-chain-roc-c5f1f0f0b065e28630cdd848c740a7e7.png"},33066:(e,n,i)=>{i.d(n,{A:()=>s});const s=i.p+"assets/images/regionx-purchase-bulk-51b6f2857476de2db74a0511744d468f.png"},60617:(e,n,i)=>{i.d(n,{A:()=>s});const s=i.p+"assets/images/regionx-select-region-1c68f88831920a288960cf232c4d8b46.png"},28453:(e,n,i)=>{i.d(n,{R:()=>o,x:()=>r});var s=i(96540);const a={},t=s.createContext(a);function o(e){const n=s.useContext(t);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:o(e.components),s.createElement(t.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/c630d0cd.bfa2d974.js b/assets/js/c630d0cd.bfa2d974.js new file mode 100644 index 000000000000..68531ed9c013 --- /dev/null +++ b/assets/js/c630d0cd.bfa2d974.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5420],{3284:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>l,contentTitle:()=>r,default:()=>h,frontMatter:()=>o,metadata:()=>s,toc:()=>c});const s=JSON.parse('{"id":"build/build-guides-template-basic","title":"Template to Core - Setup & Initial Deployment of a Parachain","description":"A minimal guide on how to deploy a parachain using Polkadot SDK\'s parachain template.","source":"@site/../docs/build/build-guides-template-basic.md","sourceDirName":"build","slug":"/build-guides-template-basic","permalink":"/docs/build-guides-template-basic","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/build/build-guides-template-basic.md","tags":[],"version":"current","lastUpdatedBy":"Juan Girini","lastUpdatedAt":1730488883000,"frontMatter":{"id":"build-guides-template-basic","title":"Template to Core - Setup & Initial Deployment of a Parachain","sidebar_label":"Parachain Template Guide","description":"A minimal guide on how to deploy a parachain using Polkadot SDK\'s parachain template.","keywords":["coretime","blockspace","parathread","parachain","cores","coretime","agile"],"slug":"../build-guides-template-basic"},"sidebar":"docs","previous":{"title":"Install Dependencies","permalink":"/docs/build-guides-install-deps"},"next":{"title":"Troubleshooting FAQ","permalink":"/docs/build-guides-coretime-troubleshoot"}}');var a=i(74848),t=i(28453);const o={id:"build-guides-template-basic",title:"Template to Core - Setup & Initial Deployment of a Parachain",sidebar_label:"Parachain Template Guide",description:"A minimal guide on how to deploy a parachain using Polkadot SDK's parachain template.",keywords:["coretime","blockspace","parathread","parachain","cores","coretime","agile"],slug:"../build-guides-template-basic"},r=void 0,l={},c=[{value:"Getting ROC and Reserving a ParaId",id:"getting-roc-and-reserving-a-paraid",level:2},{value:"Compiling Parachain Runtime and Generating Wasm Blob",id:"compiling-parachain-runtime-and-generating-wasm-blob",level:2},{value:"Compiling the Parachain Template Node",id:"compiling-the-parachain-template-node",level:3},{value:"Customizing our chain specification's patch file",id:"customizing-our-chain-specifications-patch-file",level:3},{value:"Generating the chain specification",id:"generating-the-chain-specification",level:3},{value:"Generating the Runtime and Genesis",id:"generating-the-runtime-and-genesis",level:3},{value:"Running Your Collator",id:"running-your-collator",level:2},{value:"Register the Parachain as a Parathread",id:"register-the-parachain-as-a-parathread",level:2},{value:"Procure Coretime",id:"procure-coretime",level:2},{value:"On-Demand Coretime",id:"on-demand-coretime",level:3},{value:"Bulk Coretime: Assigning your Core",id:"bulk-coretime-assigning-your-core",level:3},{value:"What's Next?",id:"whats-next",level:2}];function d(e){const n={a:"a",admonition:"admonition",blockquote:"blockquote",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",li:"li",mdxAdmonitionTitle:"mdxAdmonitionTitle",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,t.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(n.admonition,{title:"Not a production ready guide.",type:"warning",children:[(0,a.jsxs)(n.p,{children:["This guide is considered a moving document and currently uses the ",(0,a.jsx)(n.strong,{children:"Paseo"})," testnet. This guide is\nalso applicable to the parachains on the Kusama relay chain, as coretime is also enabled there."]}),(0,a.jsx)(n.p,{children:(0,a.jsxs)(n.strong,{children:["This instructions on this guide are applicable for the Polkadot SDK repository with tag\n",(0,a.jsx)(n.code,{children:"polkadot-v1.15.1"})]})})]}),"\n",(0,a.jsx)(n.p,{children:"This guide aims to get you up and running with the basics of:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.strong,{children:"Compiling"})," and configuring your first template"]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.strong,{children:"Obtaining"})," Coretime (bulk or on-demand)"]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.strong,{children:"Deploying"})," your template on your procured core"]}),"\n"]}),"\n",(0,a.jsx)(n.h2,{id:"getting-roc-and-reserving-a-paraid",children:"Getting ROC and Reserving a ParaId"}),"\n",(0,a.jsxs)(n.p,{children:["Before starting to work with coretime, you'll need some ROC tokens to pay fees, reserve a\n",(0,a.jsx)(n.a,{href:"/docs/glossary#paraid",children:"ParaId"}),", and more."]}),"\n",(0,a.jsxs)(n.p,{children:["Head over to Polkadot.js to reserve a ",(0,a.jsx)(n.a,{href:"/docs/glossary#paraid",children:"ParaId"}),". We'll need a ParaId\nto upload our parachain's code:"]}),"\n",(0,a.jsxs)(n.ol,{children:["\n",(0,a.jsxs)(n.li,{children:["Get the ",(0,a.jsx)(n.a,{href:"https://polkadot.js.org/extension/",children:"Polkadot.js Web Extension."})]}),"\n",(0,a.jsxs)(n.li,{children:["Create a wallet, and get some ",(0,a.jsx)(n.a,{href:"https://faucet.polkadot.io/",children:"ROC via the faucet."})," with your new\naddress."]}),"\n",(0,a.jsxs)(n.li,{children:["Go to the ",(0,a.jsx)(n.a,{href:"https://polkadot.js.org/apps/#",children:"Polkadot.js Web App"}),", and make sure you select\n",(0,a.jsx)(n.strong,{children:"Paseo"})," as your network via the tabs on the side\n",(0,a.jsx)(n.a,{href:"https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fpaseo.dotters.network#/explorer",children:"or visit this link to get to Paseo directly"})]}),"\n",(0,a.jsxs)(n.li,{children:["Head to\n",(0,a.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/parachains/parathreads",children:"Network > Parachains > Parathreads (the tab)"})]}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"/docs/learn-guides-coretime-parachains#reserve-paraid",children:"Follow these instructions to reserve a ParaId."})}),"\n"]}),"\n",(0,a.jsxs)(n.p,{children:["Visit the ",(0,a.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/accounts",children:"Accounts"})," tab to view all registered accounts\nand associated balances within the Polkadot.js Extension. Once finished, you should see your new\nParaId at the bottom of the list within\n",(0,a.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/parachains/parathreads",children:"Network > Parachains > Parathreads"}),' with the\noption to "Deregister" to the right:']}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.img,{alt:"Registered ParaID in PolkadotJs",src:i(85360).A+"",width:"1866",height:"109"})}),"\n",(0,a.jsx)(n.h2,{id:"compiling-parachain-runtime-and-generating-wasm-blob",children:"Compiling Parachain Runtime and Generating Wasm Blob"}),"\n",(0,a.jsx)(n.p,{children:"We can now move on to working with the template. Essential prerequisites are:"}),"\n",(0,a.jsxs)(n.ol,{children:["\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.strong,{children:"Have"})," a command line, git, and other common development tools to edit code/files."]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.strong,{children:"Rust"}),", its associated tooling, the nightly toolchain, and the ",(0,a.jsx)(n.code,{children:"wasm32-unknown-unknown"}),"\ncompilation target."]}),"\n"]}),"\n",(0,a.jsx)(n.admonition,{title:"Install dependencies",type:"info",children:(0,a.jsxs)(n.p,{children:["Visit ",(0,a.jsx)(n.a,{href:"/docs/build-guides-install-deps",children:"the dependencies' installation"})," page before starting."]})}),"\n",(0,a.jsxs)(n.p,{children:["This guide uses release\n",(0,a.jsx)(n.a,{href:"https://github.com/paritytech/polkadot-sdk/releases/tag/polkadot-v1.15.1",children:(0,a.jsx)(n.code,{children:"polkadot-v1.15.1"})}),", for\nassociated tooling (such as ",(0,a.jsx)(n.code,{children:"polkadot-parachain"})," and ",(0,a.jsx)(n.code,{children:"chain-spec-builder"}),")."]}),"\n",(0,a.jsxs)(n.p,{children:["We will be using the\n",(0,a.jsx)(n.a,{href:"https://github.com/paritytech/polkadot-sdk-parachain-template",children:"Polkadot SDK's parachain template"}),",\nwhich is mirrored in the templates folder within Polkadot SDK repository."]}),"\n",(0,a.jsx)(n.p,{children:"Clone the repository:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-shell",children:"git clone git@github.com:paritytech/polkadot-sdk-parachain-template.git\n"})}),"\n",(0,a.jsxs)(n.p,{children:["Now, navigate to ",(0,a.jsx)(n.code,{children:"polkadot-sdk-parachain-template/"}),":"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"cd polkadot-sdk-parachain-template\n"})}),"\n",(0,a.jsx)(n.p,{children:"Open this in your code editor of choice. This template contains the necessary dependencies we need\nto utilize a core."}),"\n",(0,a.jsx)(n.h3,{id:"compiling-the-parachain-template-node",children:"Compiling the Parachain Template Node"}),"\n",(0,a.jsx)(n.p,{children:"This tutorial won't go into the specifics of the template, nor will it go into the specifics of\nFRAME and Substrate. All you need to know is the following:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.code,{children:"runtime/"})," - Contains the runtime and business logic. This is how all of your pallets (runtime\nmodules) are configured. The runtime, once it's compiled as a WebAssembly blob, is uploaded\non-chain."]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.code,{children:"node/"})," - The node implementation, which takes care of networking and RPC setup."]}),"\n"]}),"\n",(0,a.jsxs)(n.blockquote,{children:["\n",(0,a.jsxs)(n.p,{children:["Pallets are essentially just Rust crates, which are imported as dependencies, as seen in\n",(0,a.jsx)(n.code,{children:"runtime/Cargo.toml"}),". Read more about\n",(0,a.jsx)(n.a,{href:"https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/polkadot_sdk/frame_runtime/index.html#pallets",children:"pallets here."})]}),"\n"]}),"\n",(0,a.jsxs)(n.p,{children:["When we compile our template, we can extract the runtime code as a WebAssembly ",(0,a.jsx)(n.code,{children:".wasm"})," blob, which\nis one of the key artifacts for registering our parachain on the relay chain."]}),"\n",(0,a.jsx)(n.p,{children:"Build the node using the following command:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-shell",children:"cargo build --release\n"})}),"\n",(0,a.jsx)(n.p,{children:"For the sake of this example, we won't go into adding or modifying any pallets. However, this is\ndefinitely a next step after you get used to deploying your parachain."}),"\n",(0,a.jsx)(n.h3,{id:"customizing-our-chain-specifications-patch-file",children:"Customizing our chain specification's patch file"}),"\n",(0,a.jsxs)(n.p,{children:["The chain specification is a JSON file that describes Polkadot SDK-based networks. It usually\ncontains the genesis runtime (in hex) under ",(0,a.jsx)(n.code,{children:"genesis.runtimeGenesis.code"})," and also contains genesis\nvalues/state for the pallets included in your runtime."]}),"\n",(0,a.jsxs)(n.p,{children:["You can bootstrap your network with some initial values, such as initial collators, balances for\ncertain accounts, and more. This is done using a patch file, which the ",(0,a.jsx)(n.code,{children:"chain-spec-builder"})," tool\nuses to create the full chain specification of your network. You should do the following to create\nyour ",(0,a.jsx)(n.code,{children:"patch.json"}),":"]}),"\n",(0,a.jsx)(n.p,{children:"Feel free to use the patch provided here, which you can look to tweak to your liking."}),"\n",(0,a.jsxs)(n.ol,{children:["\n",(0,a.jsxs)(n.li,{children:["Create the file: ",(0,a.jsx)(n.code,{children:"touch patch.json"})]}),"\n",(0,a.jsx)(n.li,{children:"Paste the below patch JSON."}),"\n"]}),"\n",(0,a.jsx)(n.p,{children:"The patch JSON states that:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["The ",(0,a.jsx)(n.code,{children:"Alice"})," and ",(0,a.jsx)(n.code,{children:"Bob"})," accounts get a substantial balance."]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.code,{children:"Alice"})," is the collator and block producer of this network. This makes it easy for us to run our\ncollator with ",(0,a.jsx)(n.code,{children:"--alice"})," later on."]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.code,{children:"Alice"})," is the sudo key of our network."]}),"\n"]}),"\n",(0,a.jsxs)(n.admonition,{type:"info",children:[(0,a.jsxs)(n.mdxAdmonitionTitle,{children:["Make sure you replace ",(0,a.jsx)(n.code,{children:"YOUR_PARA_ID_HERE"})," with your reserved ParaId!"]}),(0,a.jsx)(n.p,{children:"This should be the same as the ID you reserved."})]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-json",children:'{\n "balances": {\n "balances": [\n ["5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", 1152921504606846976],\n ["5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", 1152921504606846976]\n ]\n },\n "collatorSelection": {\n "candidacyBond": 16000000000,\n "invulnerables": ["5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY"]\n },\n "parachainInfo": {\n "parachainId": YOUR_PARA_ID_HERE\n },\n "polkadotXcm": {\n "safeXcmVersion": 4\n },\n\n "session": {\n "keys": [\n [\n "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY",\n "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY",\n {\n "aura": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY"\n }\n ]\n ]\n },\n "sudo": {\n "key": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY"\n }\n}\n'})}),"\n",(0,a.jsx)(n.h3,{id:"generating-the-chain-specification",children:"Generating the chain specification"}),"\n",(0,a.jsxs)(n.blockquote,{children:["\n",(0,a.jsxs)(n.p,{children:["Ensure you have\nthe",(0,a.jsxs)(n.a,{href:"/docs/build-guides-install-deps#install-polkadot-parachain-and-chain-spec-builder",children:[" ",(0,a.jsx)(n.code,{children:"chain-spec-builder"})]}),"\ninstalled before following along!"]}),"\n"]}),"\n",(0,a.jsxs)(n.p,{children:["By now, you should have ",(0,a.jsx)(n.code,{children:"patch.json"})," created and populated, and your ",(0,a.jsx)(n.code,{children:"./target"})," folder should look\nsomething akin to:"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-sh",children:"./target/release/wbuild/parachain-template-runtime\n\u251c\u2500\u2500 Cargo.lock\n\u251c\u2500\u2500 Cargo.toml\n\u251c\u2500\u2500 parachain_template_runtime.compact.compressed.wasm\n\u251c\u2500\u2500 parachain_template_runtime.compact.wasm\n\u251c\u2500\u2500 parachain_template_runtime.wasm\n\u251c\u2500\u2500 src\n\u2514\u2500\u2500 target\n"})}),"\n",(0,a.jsxs)(n.p,{children:["We'll be using ",(0,a.jsx)(n.code,{children:"parachain_template_runtime.wasm"})," in conjunction with ",(0,a.jsx)(n.code,{children:"chain-spec-builder"})," to build\nour chain specification:"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-sh",children:"chain-spec-builder create \\\n-v \\\n-r ./target/release/wbuild/parachain-template-runtime/parachain_template_runtime.wasm \\\npatch patch.json\n"})}),"\n",(0,a.jsxs)(n.p,{children:["You should now see ",(0,a.jsx)(n.code,{children:"chain_spec.json"})," generated, with the message ",(0,a.jsx)(n.code,{children:"Genesis config verification: OK"}),".\nThe ",(0,a.jsx)(n.code,{children:"-v"})," does a superficial verification of the JSON to ensure all fields are properly populated."]}),"\n",(0,a.jsxs)(n.p,{children:["Next, you'll need to modify a few things in your chain spec, namely by adding the following fields\nto make it parachain-ready. Once again, make sure you set ",(0,a.jsx)(n.code,{children:"para_id"})," to the one you reserved earlier:"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-json",children:'"protocolId": "my-live-protocol",\n"properties": {\n "ss58Format": 42,\n "tokenDecimals": 12,\n "tokenSymbol": "UNIT"\n},\n"para_id": PARA_ID_HERE,\n"relay_chain": "paseo",\n'})}),"\n",(0,a.jsx)(n.p,{children:"Once you finish modifying the file, it should look like this:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-json",children:'{\n "name": "Custom",\n "id": "custom",\n "chainType": "Live",\n "bootNodes": [],\n "telemetryEndpoints": null,\n "protocolId": "my-live-protocol",\n "properties": {\n "ss58Format": 42,\n "tokenDecimals": 12,\n "tokenSymbol": "UNIT"\n },\n "para_id": YOUR_PARA_ID_HERE,\n "relay_chain": "paseo",\n "codeSubstitutes": {},\n "genesis": { ... }\n}\n'})}),"\n",(0,a.jsxs)(n.p,{children:["Feel free to customize various aspects of your spec, such as the ",(0,a.jsx)(n.code,{children:"UNIT"})," ticker, ",(0,a.jsx)(n.code,{children:"name"}),", ",(0,a.jsx)(n.code,{children:"id"}),", or\nother fields."]}),"\n",(0,a.jsxs)(n.p,{children:["Now you should open your ",(0,a.jsx)(n.code,{children:"chain_spec.json"}),", and use this checklist to ensure all the necessary\nfields are in place:"]}),"\n",(0,a.jsxs)(n.ol,{children:["\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.strong,{children:"Make"})," sure that ",(0,a.jsx)(n.code,{children:"relay_chain"})," is set to the target relay chain (",(0,a.jsx)(n.code,{children:"paseo"}),", in our case)"]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.strong,{children:"Make"})," sure that ",(0,a.jsx)(n.code,{children:"para_id"})," (right below ",(0,a.jsx)(n.code,{children:"relay_chain"}),") is set to your reserved ParaId"]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.strong,{children:"Make"})," sure that our ",(0,a.jsx)(n.code,{children:"chain_type"})," is set to ",(0,a.jsx)(n.code,{children:"Live"})]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.strong,{children:"Optionally"}),", change the name, id, and token symbol of your chain."]}),"\n"]}),"\n",(0,a.jsx)(n.p,{children:"If you fail to do one of these, your chain may fail to produce blocks."}),"\n",(0,a.jsxs)(n.p,{children:["For more information on chain specifications,\n",(0,a.jsx)(n.a,{href:"https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/reference_docs/chain_spec_genesis/index.html",children:"check out the reference document from the Polkadot SDK."})]}),"\n",(0,a.jsx)(n.h3,{id:"generating-the-runtime-and-genesis",children:"Generating the Runtime and Genesis"}),"\n",(0,a.jsx)(n.p,{children:"With our chain specification successfully generated, we can move to generating the genesis state and\nruntime."}),"\n",(0,a.jsx)(n.p,{children:"Generate the genesis following the instructions below:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-shell",children:"polkadot-parachain export-genesis-head --chain chain_spec.json genesis\n"})}),"\n",(0,a.jsxs)(n.p,{children:["Although you can use the WebAssembly within ",(0,a.jsx)(n.code,{children:"wbuild"}),", for ease of access you can also regenerate\nyour WebAssembly blob with the following:"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-shell",children:"polkadot-parachain export-genesis-wasm --chain chain_spec.json genesis-wasm\n"})}),"\n",(0,a.jsx)(n.p,{children:"Within your project folder, you should now have two files:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.strong,{children:(0,a.jsx)(n.code,{children:"genesis"})})," - the initial state of your parachain."]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.strong,{children:(0,a.jsx)(n.code,{children:"genesis-wasm"})})," - the initial runtime WebAssembly blob of your parachain."]}),"\n"]}),"\n",(0,a.jsx)(n.h2,{id:"running-your-collator",children:"Running Your Collator"}),"\n",(0,a.jsxs)(n.blockquote,{children:["\n",(0,a.jsxs)(n.p,{children:["Make sure you have the\n",(0,a.jsx)(n.a,{href:"/docs/build-guides-install-deps#installing-the-omninode",children:(0,a.jsx)(n.code,{children:"polkadot-parachain"})})," binary installed!"]}),"\n"]}),"\n",(0,a.jsxs)(n.p,{children:["Before you are able to connect your collator, you must sync the relay chain. Depending on your\ndownload speed, the time to sync may vary. In order to avoid storing the full state of the relay\nchain, be sure to run with the appropriate pruning flags (",(0,a.jsx)(n.code,{children:"blocks-pruning"})," and ",(0,a.jsx)(n.code,{children:"state-pruning"}),"):"]}),"\n",(0,a.jsxs)(n.admonition,{type:"info",children:[(0,a.jsxs)(n.mdxAdmonitionTitle,{children:["Explaining ",(0,a.jsx)(n.code,{children:"blocks-pruning"})," and ",(0,a.jsx)(n.code,{children:"state-pruning"})]}),(0,a.jsx)(n.p,{children:"A Polkadot SDK-based node has two pruning modes:"}),(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.code,{children:"blocks-pruning"})," - Prunes block bodies (the list of extrinsics in the block) from a specified\nheight (default: ",(0,a.jsx)(n.code,{children:"256"}),")"]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.code,{children:"state-pruning"})," - Prunes the overall state from a specified height"]}),"\n"]}),(0,a.jsxs)(n.p,{children:["Both of these flags aid in reducing the amount of disk space taken up by the relay chain. Note that\n",(0,a.jsx)(n.code,{children:"state-pruning"})," is only used for the first initial sync for the database."]})]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-shell",children:"polkadot-parachain --collator \\\n--alice \\\n--chain chain_spec.json \\\n--force-authoring \\\n--base-path \\\n-- \\\n--chain=paseo \\\n--sync warp \\\n--blocks-pruning 256 \\\n--state-pruning 256\n"})}),"\n",(0,a.jsxs)(n.blockquote,{children:["\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.strong,{children:"Fun fact"}),": This command really spins up ",(0,a.jsx)(n.em,{children:"two"})," nodes: your collator node for your parachain,\nalong with an embedded relay chain node, hence the separation in the command via ",(0,a.jsx)(n.code,{children:"--"}),"."]}),"\n"]}),"\n",(0,a.jsx)(n.p,{children:"You should now see your relay chain syncing, reaching the same target that your target relay chain\nis currently at:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"2024-05-07 11:43:18 [Relaychain] \u2699\ufe0f Syncing 490.8 bps, target=#10342815 (9 peers), best: #10013784 (0x91d7\u2026aeb2), finalized #10013704 (0x8556\u2026e679), \u2b07 8.3MiB/s \u2b06 1.2kiB/s\n"})}),"\n",(0,a.jsx)(n.h2,{id:"register-the-parachain-as-a-parathread",children:"Register the Parachain as a Parathread"}),"\n",(0,a.jsxs)(n.p,{children:["With your ",(0,a.jsx)(n.strong,{children:(0,a.jsx)(n.code,{children:"genesis"})})," and ",(0,a.jsx)(n.strong,{children:(0,a.jsx)(n.code,{children:"genesis-wasm"})})," created, you can now create your parathread. Head\nback to\n",(0,a.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/parachains/parathreads",children:"Network > Parachains > Parathreads (the tab)"}),"\nin PolkadotJS, and click ",(0,a.jsx)(n.em,{children:"+ Parathread"})," in the top right. Now, you can upload your runtime and\ngenesis accordingly:"]}),"\n",(0,a.jsxs)(n.ol,{children:["\n",(0,a.jsxs)(n.li,{children:["Upload ",(0,a.jsx)(n.code,{children:"genesis-wasm"})," in the ",(0,a.jsx)(n.code,{children:"code"})," field"]}),"\n",(0,a.jsxs)(n.li,{children:["Upload ",(0,a.jsx)(n.code,{children:"genesis"})," in the ",(0,a.jsx)(n.code,{children:"initial state"})," field"]}),"\n"]}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.img,{alt:"Upload chain artifacts",src:i(28504).A+"",width:"2136",height:"977"})}),"\n",(0,a.jsxs)(n.p,{children:["Pay the deposit, and you're good to go! Keep in mind the parathread takes around ",(0,a.jsx)(n.strong,{children:"~2 hours"})," to\nonboard. You can scroll down to your ParaId to see it onboarding, for example:"]}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.img,{alt:"Onboarding ParaId",src:i(90397).A+"",width:"2873",height:"352"})}),"\n",(0,a.jsx)(n.h2,{id:"procure-coretime",children:"Procure Coretime"}),"\n",(0,a.jsxs)(n.blockquote,{children:["\n",(0,a.jsx)(n.p,{children:"** Your node should be synced with the relay before this step.**"}),"\n"]}),"\n",(0,a.jsxs)(n.p,{children:["Procuring a core is easy with coretime marketplaces already available. Visit\n",(0,a.jsx)(n.a,{href:"/docs/learn-guides-coretime-marketplaces",children:"The Coretime Marketplaces"})," page to learn more about\nthem, and purchase a core!"]}),"\n",(0,a.jsx)(n.p,{children:"We have two options:"}),"\n",(0,a.jsxs)(n.ol,{children:["\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.a,{href:"/docs/learn-agile-coretime#bulk-coretime",children:(0,a.jsx)(n.strong,{children:"Bulk"})})," - obtain a set amount of coretime in\nbulk."]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.a,{href:"/docs/learn-agile-coretime#on-demand-coretime",children:(0,a.jsx)(n.strong,{children:"On-demand"})})," - pay as we go for our block\nproduction."]}),"\n"]}),"\n",(0,a.jsx)(n.p,{children:"With bulk coretime, we assign a core to our ParaId, and as long as that core is valid, our parachain\nwill produce blocks and finalize them via the relay chain until we have to renew the core."}),"\n",(0,a.jsx)(n.p,{children:"It's worth noting that you can easily experiment using on-demand extrinsics, then later switch to a\nbulk coretime model. For now, let's start with on-demand coretime to get our first blocks going."}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.strong,{children:"It is recommended that you first try an on-demand assignment, then move to a bulk assignment after\nyou confirm your chain can create blocks!"})}),"\n",(0,a.jsx)(n.h3,{id:"on-demand-coretime",children:"On-Demand Coretime"}),"\n",(0,a.jsx)(n.p,{children:"Provided your collator is synced, you can create a block using an on-demand extrinsic."}),"\n",(0,a.jsxs)(n.ol,{children:["\n",(0,a.jsxs)(n.li,{children:["Head to ",(0,a.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/extrinsics",children:"PolkadotJS > Extrinsics"})]}),"\n",(0,a.jsxs)(n.li,{children:["Issue the ",(0,a.jsx)(n.code,{children:"onDemandAssignmentProvider.placeOrderAllowDeath"})," extrinsic"]}),"\n",(0,a.jsxs)(n.li,{children:["Set the ",(0,a.jsx)(n.code,{children:"max_amount"})," to at least ",(0,a.jsx)(n.code,{children:"1000000000000"})," and ",(0,a.jsx)(n.code,{children:"paraId"})," to your ParaId."]}),"\n",(0,a.jsx)(n.li,{children:"As long as your collator is running, you should see your block height increase from 0 to 1!"}),"\n"]}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.img,{alt:"On-demand coretime assignment",src:i(4265).A+"",width:"2873",height:"1394"})}),"\n",(0,a.jsx)(n.h3,{id:"bulk-coretime-assigning-your-core",children:"Bulk Coretime: Assigning your Core"}),"\n",(0,a.jsxs)(n.p,{children:["If everything is working as intended, you can now choose to assign bulk coretime to your parachain\nfor persistent block generation. For this assignment,\n",(0,a.jsx)(n.a,{href:"https://app.regionx.tech/regions?network=paseo",children:"RegionX's CoreHub"})," will be used to purchase and\nassign cores."]}),"\n",(0,a.jsxs)(n.admonition,{title:"Getting Coretime ROC",type:"info",children:[(0,a.jsx)(n.p,{children:"In the upper right, you will see two balances: one for the relay chain, and one for the coretime\nchain. Before you can purchase a core, you need ROC on the coretime chain. RegionX includes a tool\nfor doing so:"}),(0,a.jsxs)(n.ol,{children:["\n",(0,a.jsx)(n.li,{children:"Head to General > Cross Chain Transfer on the right, and transfer 10 ROC:"}),"\n"]}),(0,a.jsx)(n.p,{children:(0,a.jsx)(n.img,{alt:"Region X cross chain transfer",src:i(8099).A+"",width:"1918",height:"960"})}),(0,a.jsxs)(n.ol,{start:"2",children:["\n",(0,a.jsx)(n.li,{children:"Sign the transaction with Polkadot.js. If all goes well, you should see the balance update in the\nupper right:"}),"\n"]}),(0,a.jsx)(n.p,{children:(0,a.jsx)(n.img,{alt:"Region X cross chain transfer",src:i(46935).A+"",width:"581",height:"98"})})]}),"\n",(0,a.jsxs)(n.ol,{children:["\n",(0,a.jsxs)(n.li,{children:["Connect your wallet and make sure you select ",(0,a.jsx)(n.strong,{children:"Paseo"})," as your network:"]}),"\n"]}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.img,{alt:"Connect your wallet to RegionX",src:i(52573).A+"",width:"383",height:"117"})}),"\n",(0,a.jsxs)(n.ol,{start:"2",children:["\n",(0,a.jsxs)(n.li,{children:["Click ",(0,a.jsx)(n.strong,{children:"Purchase a Core"})," on the left:"]}),"\n"]}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.img,{src:"https://hackmd.io/_uploads/r12b0mxMC.jpg",alt:"GMcdatDW8AEC8kh"})}),"\n",(0,a.jsxs)(n.ol,{start:"3",children:["\n",(0,a.jsx)(n.li,{children:'In the lower right, click "Purchase Core":'}),"\n"]}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.img,{alt:"Purchase a core",src:i(33066).A+"",width:"1917",height:"957"})}),"\n",(0,a.jsxs)(n.ol,{start:"4",children:["\n",(0,a.jsxs)(n.li,{children:["Go to ",(0,a.jsx)(n.strong,{children:"My Regions"}),", and click to select your region, then click ",(0,a.jsx)(n.strong,{children:"Assign"})," on the right side:"]}),"\n"]}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.img,{alt:"Select and assign region",src:i(60617).A+"",width:"1920",height:"958"})}),"\n",(0,a.jsxs)(n.ol,{start:"5",children:["\n",(0,a.jsxs)(n.li,{children:["Click ",(0,a.jsx)(n.strong,{children:"Add Task"}),", and input your ParaId along with a name for your chain:"]}),"\n"]}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.img,{alt:"Add a new task",src:i(9147).A+"",width:"1913",height:"955"})}),"\n",(0,a.jsxs)(n.ol,{start:"6",children:["\n",(0,a.jsxs)(n.li,{children:["Select your task, and select ",(0,a.jsx)(n.strong,{children:"Provisional Assignment"}),", and sign using Polkadot JS:"]}),"\n"]}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.img,{alt:"Assign the core",src:i(73044).A+"",width:"1918",height:"956"})}),"\n",(0,a.jsxs)(n.ol,{start:"7",children:["\n",(0,a.jsx)(n.li,{children:"Once the transaction is confirmed, provided everything is synced, your collator is running, and\nthe region has begun, you should see blocks being persistently created as they were with the\non-demand extrinsic:"}),"\n"]}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.img,{src:"https://hackmd.io/_uploads/r12b0mxMC.jpg",alt:"GMcdatDW8AEC8kh"})}),"\n",(0,a.jsx)(n.h2,{id:"whats-next",children:"What's Next?"}),"\n",(0,a.jsx)(n.p,{children:"Now that you can launch a layer one blockchain, the possibilities are endless:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:"Setup a local development environment for your parachain"}),"\n",(0,a.jsx)(n.li,{children:"Create a pallet"}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"/docs/build-guides-coretime-start#openzepplin-templates--guides",children:"Take a look at the OpenZepplin template - which has a lot more pallets configured."})}),"\n",(0,a.jsx)(n.li,{children:"Upgrade your network"}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(d,{...e})}):d(e)}},85360:(e,n,i)=>{i.d(n,{A:()=>s});const s=i.p+"assets/images/Coretime-ParaId-Registered-94cc0c2ffa8b6974ca84fe67e5eb2cd6.png"},4265:(e,n,i)=>{i.d(n,{A:()=>s});const s=i.p+"assets/images/coretime-on-demand-assignment-098632f2c2246a688ffb1405c12e87b5.png"},90397:(e,n,i)=>{i.d(n,{A:()=>s});const s=i.p+"assets/images/coretime-parachain-onboarding-9d96e69f180f0a932f526855ef990f73.png"},52573:(e,n,i)=>{i.d(n,{A:()=>s});const s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAX8AAAB1CAYAAACmqOG1AAAAAXNSR0IArs4c6QAAAGJlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAABJKGAAcAAAASAAAAUKABAAMAAAABAAEAAKACAAQAAAABAAABf6ADAAQAAAABAAAAdQAAAABBU0NJSQAAAFNjcmVlbnNob3TgLnqhAAAB1mlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNi4wLjAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczpleGlmPSJodHRwOi8vbnMuYWRvYmUuY29tL2V4aWYvMS4wLyI+CiAgICAgICAgIDxleGlmOlBpeGVsWURpbWVuc2lvbj4xMTc8L2V4aWY6UGl4ZWxZRGltZW5zaW9uPgogICAgICAgICA8ZXhpZjpQaXhlbFhEaW1lbnNpb24+MzgzPC9leGlmOlBpeGVsWERpbWVuc2lvbj4KICAgICAgICAgPGV4aWY6VXNlckNvbW1lbnQ+U2NyZWVuc2hvdDwvZXhpZjpVc2VyQ29tbWVudD4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgIDwvcmRmOlJERj4KPC94OnhtcG1ldGE+CpiCpnMAACGzSURBVHgB7Z0JmJXVmef/d79VdWsv9qLY91VBREVBkaDBJWrMqGkziZnuTLaedNoknclM53lmOulJtOcx3ZnppGPSJtqtj5oADioKGBBwQRYhsu9bQRXUvt295v+eWwcu1yquLErV/d5Tz61vX87vnO9/3vOe853PNWfOnE5oUAJKQAkoAUcRcDsqthpZJaAElIASMAS8wYJ8RaEElIASUAIOI+DqZHBYnDW6SkAJKAHHE1C3j+OzgAJQAkrAiQRU/J2Y6hpnJaAEHE9Axd/xWUABKAEl4EQCKv5OTHWNsxJQAo4noOLv+CygAJSAEnAiARV/J6a6xlkJKAHHE1Dxd3wWUABKQAk4kYCKvxNTXeOsBJSA4wmo+Ds+CygAJaAEnEhAxd+Jqa5xVgJKwPEEVPwdnwUUgBJQAk4koOLvxFTXOCsBJeB4Air+js8CCkAJKAEnElDxd2Kqa5yVgBJwPAEVf8dnAQWgBJSAEwmo+Dsx1TXOSkAJOJ6A1/EEFIAS+IgE9LtHHxHUFdrN5XJdoSv3zcuq+PfNdNO7/gQIZIp95vIncAt6iUsgoIXB+eHpZxzPz0e3OpBAusjb+cypYLHrHIioV0Q5XdztfOZUbtSu6xU33YtuQi3/XpQYeitXlkC6mMu8/cld2Xm7j52m33F369K36/ylEehOxO06mdqfXMXOy9Smi8xrOEtAxf8sC51zMAErEDLN/CWTSSQPHkP8g71I7DuCxLEaJOsbkWwPg1VndJKbyIpOP0EOIvZ5QbgrSuAZMgCe0VXwTh4D94hKuN3uc8TfFgSSrloAnH3I1e1zloXOOZBAT6JvBL8jgujr6xFZvQGJoydYKIhFmaoFpCxKXe5tPHxVg+CfNwv+T90Ad16g24JAsrkWAmTAzC8GiwYl4DgCNuvL1P6M6NPSDy99Ax1/eB2dbR1q0TNn9LWajbsgH3n3LkDw7ltMAZBZG5DM7vQCQMXfcZKnERYCmcJvRT+67zDaf/17RHcfVD9ODvix/ONHIP/L98E/etiHCgHJB04uAFT8JQdocBSBdOEX0ZflRCKB8Jsb0fKPT6OT6/qerdvXbPNP8H55qaL/8gUEb5oJj8djBN/WBCTjO7UAUPF3lOxpZIWAdfHIVMQ/Ho8jTN9+0y+eU0A5TKD4Pz+AINsCvF7vh9oCcjjaPUZNe/v0iEY35CKB7oS/gxa/Ef4ccHP0Oef8J1gBaPzn51ASDJgagC0AbB53ovXfJy3/zngS0V01aH91FzpWHAC21CGRdCMxYxAKbx2L/E+PQHB8GVxeHbrIZm6dnvXzn+Pq2XMIp7/z05R/X5t2mU0+QTW+ErxdblQ89h0Exw4/xwUkz4fTCoA+Jf6d0TjaX9qJ5kdfQefRFhjPbKeH1XgvEi4P4ggg5gogCh86h5Vg0OOzUHEHG3r8Wgio+J9195xp3I1G0fCDJxDZSQOiO82z0HqqEej2FIE+xicwbiRKf/wt+P3+bhuBbbLm+rTPiH9s32nUPfRv6Nx0Wp5iYzNIngOFP0mxT7i8RvhjnQFEWAhEXX7zc19TjmnPzEZoVEGup6XG7zwExN0jwQq/+Plb/rACjU8tPs9RuilXCZR88R4Usiuodf9IA7AEJ1n/fcIkjm48hroFTyFJ4Wdp1VVFN0mVKgT4pkkSHiRYC4hxGoc3Jf5uPxq3RrFu0Wac3tQkB2hwMAHr75cCINbahqYXlp8xIqRo0J9zGEjaSx6wLkBrHDjp8ej1Db5xWvyN9z8LHG2GO1335Uml6HfSh5cUlw9rALFOH61/HyKsBYT5i3A+7OG6miRWPLIbty+egpKReU5KX40rCdgH24q/dOtsf2094i1tZ909lpR1/+hyikCO8kgy7SUPeGn9i9UveUOsfju1yZ/L014t/uLjr3voOSTp36dZ/6F0YHIhATdFnxY/xT9q/P3i9vFT+Pmj5S8/KQDCp1xY+o2D+LMlE+DxS47OHjo6wti19+CZHd1uF4oKQxjYvwJ5HFdEQ98hYIVfLD0R/9Y33jGWfupfWjwys5kup8HhbA7xkDxQwDeAbd9/Jwm/JGqvFv/2l3YgsfkUXBT+Tp+bDbds3JW7TqZyYDJGdw+t+0R+AS3/AMIdPrTHKfieIGKhfESDPrQlvejwsADwe1G/rxPbVzVi6u2lcpasoamlFUuWrUCIr4pL45CIRlNzC+d9mD/3esy+ZlrWc+gOvYuAiH+Eb/GGDx3/eG6M1qN3SH8kW9uRbKTR0oeDK+CHKz+IZFOrNJaYmLgLC9CZ4Itx7R1m2eXzwsVnrZOWdGc80WNs/WNHIO/ma9Hy3Ms8X4uZ93JAtpZnXurxmI97g+QByQve8aNMAfBxX6+3nb/Xir9052x8dBlczHRJMdSnlsP3wBT4BhUjcuAU4qfDiC87Av+1w9i1cwzg9gDLTqNhcTP808sw/AsD4ernw7F3O7D5pTDauT3GAuD3P2/EpAUcCdD70ax/SbA7brsZE8aNMmlX39CEVWvexvIVa1DJzFs5eKBZr/96N4F0yz/yp73SZ4BB/lm/xqVPQ/fcitBdHEumKGRgRLbuQsPj/8rRP9sv63Uu533n3TCDBVUbIlt3f4hHYOo4lH3vz3H6v/8M0R37zfaKx76L+El2vvjhP5nl/Jtno/gvPofar/9Prq/tMZ6eQf2Qv+B6tC5Zhc5GPqMTRyMwbRyanxbxP386+CeMhHdgP7T/8Z0ez3+x6Sh5IY8Fk80fTmrw7bXiH9nJYXOPdtCpQ6ODz2VnXQzRmjDKvnkTIk9uQsv6/UhUlmHA92bj4NOH2dvHj6rvTcHxw7tQ9aUhiOQHsG9tG0bcWoLohtNoaafvnzWHRhox1UeiGDoywDNfeCgrLcbNN16LD3bswcFDx84R/5M1p7D/4FGEwxFUDR2EMaOGf+gC9Q2N2HfgCBoamzBoYH9MmTj2nB4GCRZ2R45W48Cho/D7fDzHMAwc0O+c88ijcrz6JA7wWtFYDKNHDsPwqiHn7BOORLn9CI4eP4mS4kJMHD8ahSHn9XiyD7XAsS6fMPv2JztTlqwIT0p65L+Ei1su4EiSRX92F9peX4eWl9dARpcs++bDyFt4A5o5QBy9yanTX+T5P67jQ5+7DfHjNeh4f+eH7i+8UwSf7oFRVQhv30sBroCnohTu4hA72dFPHmPXilFDkWANJ3qi5kPHp1akeLKuYBZpytGDy3Wp0tekQzb+wTkzkM9f6xtv8xwXlz498ZO8IDV6yRvW9y836oRCoNeKf/gVWiKdfHFLevJQ/BPH2xFddwLJcAKnnt+Dli0NyJs/HK7iPBxcegqRZADDvzoB3okV8A3Mx753I9j0Rjsa+Ni1FuahxeNGnK6jGGO8cUvkosVfMoYZF4RTcf/Y8Na7W7DijXUYTcH38FpvbdiMieNG4967FxrbUvbbs+8Qnn3h/yFEER44oALvvrcVW7buwMMPfgbursam5//wKg4dOYYxFPSWtna88eY7uH3BTZg1Y6q9FFb+cT3Wvb0Jg1l4uHmttW9txLw5s3DzTbPNPm0cifLJ3z1vrNuqykHYu/8QVq/bgAc/ewdk2YnBFgLyoEdleGZCEP0hdjOVRLqU5dCiuYjXnEY9h4iQ88R4DbFu8264Gk2LV/LkFJeSYhT/h9sRGD+SgtmM5hdfQ4SiKvsXzJ+N/BuvQfva9xC67SYkTtejefEqRNnmJNv7/+hbaH93GwJ8Ock7uD863tlqChUql9nu53j2hXfPh2/YYB5zGI2/W4IE3TUSPw/zWskX7oaPNdXw+7vQyqEs4tU16Pe3X4e3fzk8NA7KHv0yTj/263N4xHl8vLqWg6JVGV7+yWN5zha46ebx0VoO8/sGsi2y60BK2lm7Lr5/IYIzJiHJPNj+1ha0rVhv7s/mOUbl7DIXzixLe9p9C5F3zRS6ldgm88oatK3dZO4779qpHJ45iH4/+ivU8R7jDc3G0L+U9LLpLXlB8oTNH04QfZsWvVb821bQsmePnSR788SYMTC2GAV30vXCF7b8d4xCvOgUjtZ1YkhrHMO+NYEJ6EZLcxw7dscQ4qsAQ2/Kw4wyF6beUoTNP22g+PsQ57EJunve2dWJeyyBC5yKz1/cPhLGjRlppoePHMfrq9birkW34uppE806scp/++xiFgbDMG3yeLTRR/rC4lcx46rJRsylkeno8RN48rcv4E/bd5t93qSI79l7AN/4ysMoLysx5zEuppVrad1Xoay0xAi5CP+9d33KHCM7ifivWv0Wrp4+CcVFhXhx6XJTQH3lkQdM7UFqE797dgmWvrwSX/vzz8PT1afZXKCbfytWrID8zhcWLFgA+fW1YHz+p+pp6RnZ4UMvNiG7DnAqUiTLmdNs2wmUlv5gtK1+95zz1v9SxgpKnd8dCFBsvwoZarjl1TeRP2sq+v3w6zj2yA+QZJ5yl5ciSDdIZyKOtjUbUHjHPJRwNMqT333M3F9gwij4+KGSphdeM8Ja/OAiRFgwdGzeCQ8tchHy6P4jaF3xFgrvvBnFD9+Nun96GuB1B1A05cMzra+vpQU9ExXTx6P6L3+E1lVvm/uO88M0bW++x7jTPs+Iv1j/wUmjTbwC/FhKePMOUwPwc1149wH4WMNteSMV79KH70Dhonmof/J5FioVKPvqg4gerkZ4136eN5VThLu5TmrRnFf4ln/xflMANi9ZSdduf5R/+0uQa3ds2g4/ax7usTTglq9FnM9R5n1mS5/zbY+eauA92Fpg1005ZNJrxT+xu4XiT8Gm+Ec9tP7Z0JT0edDy9Adoz/ehtaoUR9a1oOmJg5hwz1CEWT144Wensb/Vh9plHbjhs4UYMDOEf+P8UeQhXkrLn8Kf5G/naXnAP3p4dcWbxgIXC6GOD4o0AIu1Lu4UCXv3HzZiO2nC6DMnHTliqOkZtO2DlLAfo/tFXDTTp7C3EYVfwtAhg3DXp29BCQVbwp59BzF40IAzwi/rrpo6EW+ufw87+ADNuW5Gyh3EGsdkuotskFqB1ADkwZJrHDp8DNfPvtoIv+wjYj9t8jiK/yqcoF82WzuFFfWeCoC+LPzG9UOrNGVzCh2RhtTUTLqWM90Emfunb/eUFEIaPmM1deZoOV/6dlkO0G/tH16J2h//Am0btqH5ldWoeuZxFNw8C01LV3GP1F3U/uRXSNJlh4APpZ+/C64CNria+4URv6Y/vCYJioK51yA4fSLaKcYyL42ztY//hiLfgSTzacnnbmc3aJcpZDxlxTj1xFMIb9tt9i9hweHpV4rWtRtZE/k0axkNaHvn/VT0M+IvAhyaf51p1A1OGYuG3y6Bt7YfgiwIjKuIecuIO49rEZcXLf0Ya0BeuocKWRsq4EiaHSL+XfGTeKZLrVnP5yF0241ofmkVGlkb4sOE4FUTEGQtoIU1gLw5zMsjh6KVhaKE7vhafjK9kO1xspU84cQCoNeKf6f04uGfiH+c1cm2nRF0/J/D6Cjxo9mfhzpPHhrpezx0JIGNv6pn1043mmJ56BgcwDF2/dzzapwPkButbi/aS2jx+yj8LESkusceoRcUxo4eTv98yu/+xpp3MGpElfnZkxw/WYMhgwcgwB5B6WEUC4DD9N9LkPYAHwViMPdLDzOmTzaLSZpGJ0+eMqKdvl3aGEqKi0yhI+tP8DxVlYPPsd4DfPBvuPZqc9iRY3SN8VyjhlelnwYju5al8Mom/nJgTwVAXxV+C0Oq9ynrMyW2KTvfbjXZw4iHXfNRtifrm1P+b7pVzLntwZza470UfgkdFFPZJ9nOr4QdqkbezCnspLDSdmBDMib+Zw4xLYIvrkCvj8vSYMw2C4q6OX+SU1NA+M2yCKOLBkHVM4+Z/ew/D61yT78ys9ix66DZN3nkBE7+5Em7i9FMscoTvKYEe792hw7T0Avk33QNPMyLbWwb8LGQK75nAfzsJdMZjSG89wi9Wp3w5ueh7KE7ERgzzLiHXPI8MM+b+Had384bNwsvIsv+4eycwf2K6faRnw3BKePQtGz1GV2Xe8y8v0tedkttJxV3e12nTHuv+I8tR5yNSFGKd8TNGkBJPoZ9Zzr8U0sQibvx3h8bcGhXFJNuKMO0OaV0D3nw5sY4Xt8KXD3WhVuv8yGQT2u6OoGn3nGjPcFuonQfMakxfmi67ZE9qUXsbW+fBLu5vfLaalx37VUY1NUQ6/exQGpmS3JGqKdft4C1BAnSVTTOrnARNgZ3946A+PylcGjv6kJnTxXjMASt7I0htQ0JUsA08rw9BdsO0dYh1u3ZIA3MEux5zm7peS6zAOjrwm9jarovnrH+xUaXhz8lI2flxcrKR9hOV03kwFEEJ47qsmpT5xvwV19EkEJ4+Bv/w4ihXN9Dl0aMfnPpneZjl9BW+rXPWsUUQ+4jy1aOZHp2KbX9jBp2bUmwm2WS+eroX/4dOiMxc4TEJ0F3UnDMcC6z0ZYFU4Q1VGZEBOinj7IQkF4+6ddJXelsvGU5ysZgOX/xZ+abtpJYfRPiktcpmEWfZucLti8k43JNF/p97SFOXDj0yPdZKMQx4rc/MedPj0938TPn4xka2DDexC+opeJH7jxvevxT5zn3/uS6KT6p9Reafp781HPFizouuHtrjEML5EFi33r+YuzJkzdrIIZ9fjQ2vVCLmuooxt85BKEpxZh39wCsPpHA4oNA6eR8BMd5Mf/WPOyLJvGv2xO4b04+xtJD0l7kQUfIg0iBB9eOv/hoi8++lBbQ66vWnUEntYLTdQ2mB49dKe6XY7TCrZU9oF+5sTAO0iVjg1Q1lyxbiV17Ur0qpFePuJDSg/T8idPik26lEvrzPDW1pyGNujaIsD/P9gSx6qWtQHoJ7WXjcnqQNgh5PIbQrXQhwQq+nV7Isb11X295ifEbGyuUfm6Zih+5u6n0Cupuvd3fbm9YsgI+Np4O/Ju/oEtkLIrpdw/dOBONdO8kWei3bvyT8buXPXQHpM97+X9kIz8bMVvpbkmdPyXD9rwirhLESSLbzTzXndku27hart9C942bQxWX0Gp2sXNDgO6ZcrYXiKHSuvkDY52XslePtBlUPHIvKv/+r1kapNyEcfY+k148UhB1F88kaxni+pG4tW/Zaa6foLXfwYZqWdexc9/Z4/jNYxddOF52RChaOIcNySGOrJuy/FOCLvecqnnZZbn/aG29aT8oZI+pwPjhjEMI5bxP37AhJn7xuibzsXb5Gpe9b8vB8rfLmdNs2z3MC04NF6+CHzOxAg7LLMKf4KBt8gKXt1+hsYr2b2jF0T1huPP5QYaBQbjp2nm7EXi11oUtDXF00jvjy+/EtiYX1p6W0T6B4gr6JQvYdpDnQizowrwxKZ/7xURB/Oe3zL3O+N6lF42E2TOnIZ9V3mXLVxsBlkbhlzkf4AM5a8YUs88IuoBEeFeufgtbP9gFeV9gORtyt7Gxt7ws9dKZ9NaRY2WfFlplJynyK//4lmkbGDWCGZ/hWl7Lxyr+iy8tp8vrOKrpw1/6yirT9VMKJR8ftjnXz2TD9z5Ie4PUJOQ+N77/AWbPmo4g7+lCQ64Iv+3J4Rs60LhZRFJFQGUq+nopy8204Gv+77/Dzy6elT/+Niq+dC+a2S+9cfk6c94Ye6gcp7/fz0K86vHvoXDuLNT+y/Nopf/fXLcrUc7cT8ayLKbfX/pyKxtFa9nLqJC+8WE//yH6ffl+tLEtQL5IFmODZvVPf8Uhzkdh2M/+GwquuxrV/+tfEBNXFU/S9No6I+KVf//oOedP59G+Y59czrh87P21mfcCaFRt32eOk/1PPb3UiHvVE983jcRR+v6Ftb1vOYc9Xqbpy9V0RUWP1WDQ33wFVU/8V/OuRPhwtdm/ef1mxGlcVf3v78NLA0kOTb+/S1n2VaaMIZs3UnfljP+9dlRPeclr2/gX0c4++e3eAOKzynHTi9djy/IaFI0oxBG2Cfx6bQSP3leEk8zkTREXCinsP6br59vTvagIJLGHno4HxgXw4PIodjX6jOU7OBDH+gf9YkBkDSK+//zkv+OB+xadcfvIQZLZfvmb50wXsa/9p4dY03XhFLvmLebbwNXsQudiAVFJ3/7CW288Y/nLca3suimW/v4DrCoz91ewh8edt99yTh/93ezt8/Jra868SSy++rsXzUd+2nASx3mNJey5U3uqzjQ0Vw0djPvY+0eGnpAg1pX0HFrPXkGRaNT075cG4oXz55h7NTs55J/xLZOH1LJirI21tbWh/vcrUGtG85SUTLkLLufUE8pDgj59Oum7Pb/Z3io1t8t/fQ/zQIJvpncXH09hPrdJ+8G513Xx5UcX3VDJcLjb4zL3z7bsZmN1Ms39lG3/9O3uYJCFFrte0m2Uvp43CA8bvxOXmVv/L96LsvsW0D1bQLerzzxP8jw7oTDoteLPlEfd4iPYdf8GtHq8aOJLW555/VB+ewVqWBt4ba8bO4L5KBztwcLJXgpeAkuPeHGg1Y/KghgWVSZR4Uvg9RNubKxnjwk6G12sYv7ipk7cNfLja+oQsZWQ2fhrVnb9M75/7lfA2kJPQdw6wTzGmQVJT6GDfl7Zbv38mfvJIy7tBU58ucuysOIvUxnGuZ1v2zb8aTeOf/cf7C46dTCBIY/9Nd3F41hzzzfDO1vhV/G/wpkiSb/9prmrUL8xgiZPAHVs9KwpC+F4ZR5ODAvhZGUI9f2DCLOnpJsFhLwUFqchJ7acR6w9lzT/yIh9si6JSaVRLFsUBF/01eAgAiL8YvlLV90ONoQ3NzfjxKP/gA6+oa3BuQTyhg/hB58eRVFRETth5Jku2OYFTlr+Tgg9m5W9IPbyBa5Jz1wPb1WINWgqdpg9dqJMmBjnE6yqsm+/my+lcCgtulFE3lkIiNDLwy73z8JAHnxJyoFsB/jFXL8Kv3BxYLAWnbxjIR/wCM2daZwfUjsS48BMZV6XHcMjxPcjJC/YUT2dYO2nP/ofn/8j/SqXMJ/PL3Bd9fxVWH3/TiTowknyTd7OJAsBfrOXb7FQ6EXwRfily1dmoPBT+QcGE/j1PBdGFvfqsi7z5nX5MhOQh1sedul2G5g3E25+0CPO0TdNyMw8unwu/Rzj4aWPX/KA5AXJE04TfkncPqGGZTOKceuKaSiaWcCxeThAm3RTM1WzVPUsM1+mHD+yrRNTSmJ4YaEb0/v1iaie+8Dp0mUjYC1/qdabAoBvjJfe96lzLX6TYzJqAbouJxmVspHXzzwgecG6epxWAPR6y98+/UWj8vD5VROxdVULnvpdK05wmAZWAsT4N24d4+YRZ4/RfDcG50fxtzM9uK1KXT2WoVOn8lAb9x+nMi+9OoLsVRJceB3y2dWydXvqPQvDJ2UzdOUjrrHLFp5dzpzq9hSBTC52uRfxCXGcJEl7yQOSF6xhILfopAKgV/f2sfklc5rgx10On4xhzQF+npH9+7eF2bWMBcGEkgRuHgLMr3RjTAl9u2rsZ6Jz7LKIvwTb8Btmt0Zp+G3ky0rVP/jHlLlvbFyrVjpNQcktDtINe9DffRMlk8aYhl4pAMTnL9a/BBV/g0H/KYHcIiAFgPzS+/ybAmD1BtT+/Nlc1LqzNZfc0vCLjlf/bz6EknnXGOF3Yt/+9Ce6z7h90m9a55XAxRKwVXzx9YrVZ8b3v346yvheRd1vlnTVAHh225Ck0xTqHOBQ/shnkH/9NPNCl6S9beh1krWf/tyo+KfT0PmcJiAPufX9SzXf+v6ln3fillkcMtyLul++SOGXFiQ1lXOmKsR0L//KZ1Fw49VnXD3pb/NKpndiAdAnff45rVAauY+dgHX/yFTe+pUXv2TYh8bGRjRs34P44jVo5WBm2gQgqsifWP19dBriSKvez8zlW7xjUVJSYqx+eaEr3ep3ovDLQ6biLxQ0OIqAiL4EmYrbR37SACyFQFNTE2pq+D3addvQ9jK/HMX3APqw9vVVzb7k+/bxU5MFi+YAc6ZhwIABKC4uNm/x2gZe+2KX5AOnir+6fST1NTiKQLr7x4qAWIPiCpJlcQk03hZCZNpI5L+/H7EN29HOoSBMmdHlOhJ10mVmm17GI5/DVvtmTUJ0+iiEBg001n5hYaFp3wnwk5a2Z48VfDt11APQFVm1/J2Y6hpnQyC9BmBrATLyZyTCr8axFtDa2mpcQfX19XCdqEPgeB1wrBbR6lOI8tOHcY7SKmMLa83gCniFWFB7C/Lg5+cifYP7wVXZH5Eh/GbGoHKUlZUZ0Q+FQsbaF9GXAt0W9Fbw7dSpj4OKv1NTXuPdbQFg3wOwhYAUBDISqPykMJC2AVkX5aissq8tQBTnJ0tAhFtqamaoDoq7dNsUsZfROeUngp8u+rKvHGMF304/2bvuXVdT8e9d6aF3c4UIWBGXqfxsISANwlIQiNjLVH6yzm6/QrerlyUB68KRxlux7OUnhYFMZZ3drqLffXZR8e+ei651IAFbAEjU0wsBmbcNwzK1hUMmovTjM7fp8qUT6M5atxa9CL39yX52ffox6fOXfjd9/wwq/n0/DTUGl5lAuojbebH0JciyXWenl/nyerqPSMCKuUztvIi+BLucOW826j9DQMVfM4IS6IFAprhnLvdwmK6+QgTSBV9uIXP5Ct1Wr72sdvXstUmjN3alCah4XOkUuLDra3pdGC8V/wvjpXs7mICKi4MTPwejroMe52CiapSUgBJQAtkIqPhnI6TblYASUAI5SEDFPwcTVaOkBJSAEshGQMU/GyHdrgSUgBLIQQIq/jmYqBolJaAElEA2Air+2QjpdiWgBJRADhJQ8c/BRNUoKQEloASyEVDxz0ZItysBJaAEcpCAin8OJqpGSQkoASWQjYCKfzZCul0JKAElkIMEVPxzMFE1SkpACSiBbARU/LMR0u1KQAkogRwkoOKfg4mqUVICSkAJZCOg4p+NkG5XAkpACeQgAW9jY2MORkujpASUgBJQAucj4GrviHaebwfdpgSUgBJQArlHQN0+uZemGiMloASUQFYCKv5ZEekOSkAJKIHcI6Din3tpqjFSAkpACWQloOKfFZHuoASUgBLIPQIq/rmXphojJaAElEBWAir+WRHpDkpACSiB3COg4p97aaoxUgJKQAlkJaDinxWR7qAElIASyD0CKv65l6YaIyWgBJRAVgIq/lkR6Q5KQAkogdwjoOKfe2mqMVICSkAJZCWg4p8Vke6gBJSAEsg9Air+uZemGiMloASUQFYCKv5ZEekOSkAJKIHcI6Din3tpqjFSAkpACWQloOKfFZHuoASUgBLIPQIq/rmXphojJaAElEBWAir+WRHpDkpACSiB3COg4p97aaoxUgJKQAlkJaDinxWR7qAElIASyD0CKv65l6YaIyWgBJRAVgIq/lkR6Q5KQAkogdwjoOKfe2mqMVICSkAJZCWg4p8Vke6gBJSAEsg9Air+uZemGiMloASUQFYCKv5ZEekOSkAJKIHcI6Din3tpqjFSAkpACWQloOKfFZHuoASUgBLIPQIq/rmXphojJaAElEBWAir+WRHpDkpACSiB3COg4p97aaoxUgJKQAlkJaDinxWR7qAElIASyD0C/x/ILCwQolpGTAAAAABJRU5ErkJggg=="},28504:(e,n,i)=>{i.d(n,{A:()=>s});const s=i.p+"assets/images/coretime-register-parathread-c49534aa188c71fcb462ba7ded9014ce.png"},9147:(e,n,i)=>{i.d(n,{A:()=>s});const s=i.p+"assets/images/regionx-add-task-afdc4b2a7427016140a74e3f40cab22c.png"},73044:(e,n,i)=>{i.d(n,{A:()=>s});const s=i.p+"assets/images/regionx-assign-region-fc7974f69204e5cea7583044139e4763.png"},46935:(e,n,i)=>{i.d(n,{A:()=>s});const s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAkUAAABiCAYAAABeSKdmAAAAAXNSR0IArs4c6QAAAGJlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAABJKGAAcAAAASAAAAUKABAAMAAAABAAEAAKACAAQAAAABAAACRaADAAQAAAABAAAAYgAAAABBU0NJSQAAAFNjcmVlbnNob3StA1u0AAAB1WlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNi4wLjAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczpleGlmPSJodHRwOi8vbnMuYWRvYmUuY29tL2V4aWYvMS4wLyI+CiAgICAgICAgIDxleGlmOlBpeGVsWURpbWVuc2lvbj45ODwvZXhpZjpQaXhlbFlEaW1lbnNpb24+CiAgICAgICAgIDxleGlmOlBpeGVsWERpbWVuc2lvbj41ODE8L2V4aWY6UGl4ZWxYRGltZW5zaW9uPgogICAgICAgICA8ZXhpZjpVc2VyQ29tbWVudD5TY3JlZW5zaG90PC9leGlmOlVzZXJDb21tZW50PgogICAgICA8L3JkZjpEZXNjcmlwdGlvbj4KICAgPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4K+Te7IAAAIQ5JREFUeAHtnQeYlNXVxw/sIk2K9KL0XqQjoBjE3jCiiOVDY9Q8lqgxpueJ+VKMfkmMJZaADUVFBSIiSFFAeu8sbWkL0ntbYBeY7/zvcmffmZ3yzu7M7Ls7//s8u2+ZW3/33jPnnlumjE+d0JEACZAACZAACZBAihMom+LlZ/FJgARIgARIgARIwBCgUsSGQAIkQAIkQAIkQAJKgEoRmwEJkAAJkAAJkAAJKAEqRWwGJEACJEACJEACJKAEqBSxGZAACZAACZAACZCAEqBSxGZAAiRAAiRAAiRAAkog/fDhwwRBAiRAAiRAAiRAAilPoEz2yRyeU5TyzYAASIAESIAESIAEOH3GNkACJEACJEACJEACSoBKEZsBCZAACZAACZAACSgBKkVsBiRAAiRAAiRAAiSgBKgUsRmQAAmQAAmQAAmQgBKgUsRmQAIkQAIkQAIkQAJKgEoRmwEJkAAJkAAJkAAJKAEqRWwGJEACJEACJEACJKAEqBSxGZAACZAACZAACZCAEqBSxGZAAiRAAiRAAiRAAkqAShGbAQmQAAmQAAmQAAkoASpFbAYkQAIkQAIkQAIkoASoFLEZkAAJkAAJkAAJkIASoFLEZkACJEACJEACJEACSoBKEZsBCZAACZAACZAACSgBKkVsBiRAAiRAAiRAAiSgBNJJgQTCEShbtozk/ZUVvZUyZfQfnWcI+Hw+OecTOXfunP7pPR7oSMAjBCg/irciKB8Kx79M9skcStLCsSuVoaD4pKeVlTT9ow5UsqpYdSQ5e/acnNE/CEQ6Ekg2AcqPZBN3nx7lgztWVIrccSr1vqAApaenGYWo1Bc2BQoIxejMmbOqHKVAYVnEYidA+VHsVRBTBigfwuOiUhSeTcp8AstQuXJpKVPeVCpobu5ZYzlKpTKzrMklQPmRXN7xTI3yoSBNLrQuyCSl3kAZokJUequc9Vt669YLJWP78kItFD4PrL+C7KgUFWSSMm8uuCCd02UpUNsYyaOu6UggngQoP+JJs/jionwIZE+lKJBHyjxBoKVhSxldShBAXVMxSomqTkohKT+SgjlpiVA+5KOmUpTPImXuYDKlQpQy1e0vKOocdU9HAkUhQPlRFHreDUv5kFc3VIq820YTkjOYSvFHl5oEWP+pWe/xKjXbT7xIejMe1i9PtPZmy0xQrrBtlpaCBMEtQdGiDfAMqhJUYR7JKuWHRyoiwdlIdflAk0GCG5iXosc5RHQkAAJsC2wHsRJgm4mVWMn1n8p1TaWo5LbbmHJuT5qNKRA9l1oCMJPzZ1tKbfXGvWCUH3FH6ukIU1k+UCnydNOMX+bQyOlIwEmAbcJJg/eRCLCtRKJTOj9L1TovtsNLMtZlmt9pQnPCXHXlipWkZs2LpFrVC2NqYTNmLZAVGWvlqUd/FFO4wng+deqUZG3fKQcOHZKLqleXFs0aS7n0fITLV66RSd/OkGefeiTgfaxp7d13UHbv3SeXtm8da9Cw/vFbZvF2+CHSr776SlavXi3VqlWTq6++Wtq2bVsgmbVr18rUqVN1yiZdrrnmGmnRokUBP8Evzpw5IwsXLpTZs2dLw4YN5cYbb5QaNWoEexM3ce/atUumTZsmuF5++eXSu3fvAvEcPXpUvvjiC8nKyjLp3XbbbVKrVq0C/uyLLVu2yIwZM+yj/nBuWWnQoIF06NBB6tWr53/vvNm+fbtMmTJF2/1Zufbaa6Vp06bOjwPuDxw4YJht3LjR8Lr55pulcuXKAX6K+oA2kas/BRJvd+ToMdmatV1O5eRInVo1pWnjS+KdRMzxLV2+Wpo2aaT9tmrMYeMVIBqXcRO+kUNHjsoD995RpCQ3bc7StYPp0uiShkWKxxk4EfID8bvpv8582Hs34dz0++PHj5t+vGrVKmnfvr2RM5BTTudWFtkwhZENR44cMf1969at0q9fP+nSpUtYS24yZAPKkij5YDl59RpY+0nM5ZRps/TnvX1SqVJFTdUnR44c0/8iHdq2khuvv0p/lV01JQ+5eQuXysw5C6V6tSpyQfnysmfPPqPA3THgRqlTJ/yXZ2GKsFYVxmWrMqRju1ZhO0Ys8eLXquONEwoiOu+CBQv8WUlLS5PXXntNHn/8cf+7P/7xj/LnP//Z/1yhQgX54IMP5K677vK/C77J0S9TKAHffvut/6NGjRrJ119/bQSXfekm7smTJ8utt94qubm5Npj8/Oc/l5deesn/vG7dOlOWPXv2+N/94he/kEmTJslll13mf+e8gcL24IMPOl+Z+3LlysmTTz4ZED+E6g9/+EOZMGFCgP/+/fubMpXX9uR0SPvll1/WX70/538NhevTTz+Vvn37+t8V9QZtAm3jnPbDeDjkd8y4SbJl63apXauGnD6dI4f1S/6ShvVl0O036TlJF8QjmYhxoF0uXrZa2rZuITVrVDd+0Z6mzZgrP9Dfg+vR7dKI4RPxYbK5zFmwRCqrXI2XUpQI+QHObvpvqPpwE85Nv8cgpU+fPvL999/7k7nqqqtk7NixUrVqnvLsVhb5I9CbWGQDwv3lL3+RP/3pT2awZOO55JJLjLIWPHBKlmxAPuItH2zZPH/NPpnjK46/51/6j2/cxGn+tA8eOuqbOmO+77nnX/VNn7XQ/z5a3iZOmeV78eVhrv1Hiy/U54uWZvj+94V/+xYuXe1PZ9eeg75X3/rA98qbw33HTpwy7+cuWG7yf+RYtt9fqPjcvDtytOhx2HRycs/oj6bH1/3zn//EN6nvuuuu8+nIyKdf+D790jN/hw4dMonhHfzoqMenypNv5MiRvpo1a/pU4PgOHjwYNkO/+tWvTLjBgwf7MjMzfapUmWdVCPxh3MS9d+9en1pXfGph8n3++ecmD507dzZxqeXKH9ctt9xi3iFdHV36/vrXv5rnnj17+v0E36iCYvyoBcs3f/58n1q0fM8//7xPrUTm/bvvvusP8vDDD5t3t99+u2/u3LkmH/fcc495d/fdd/v0S9PvV5VK8/6KK67wzZs3z6cjWJ8KTJ+u6TBxR+LmjySGG7QN206Keh0z7hvf/738tm9L1k5/nJmbtpm+M3rsJP+7oqYTKfyOXftNH1yZkRmQXjz7U6T0Q33mlsunoyf43np3ZEC+Q8UX7d2x4yd9x8/LpGh+3XyeCPnhpv+GasZuwrnt9+jfkE9/+9vffBs2bPANGjTIPP/hD3/wJ+1GFvk9n7+JRTaMGDHCpKkWdt/EiRNNf4f8Ucuzr02bNgFyMtmyAcWJp3xw09a84Cf+cyqFVANhQejVo4tUufBCNb3na+6I7tjxE7JsRYZMnzlP1mdujprCaR0ZrsxYJ9PU/7oNmyQ3J99KsFafV61ZHxAH4l+wZLkZ1QZ8cP5h1tyF0qZlM2PFsp9jmq97l0vl4KEjOi2Tb2HA5+d0emTF6nXy3cz5su37ncYCZsPhqm1NNmzU6Red+kO5jp844fxYtu/YJas0/9bBHI5yn8jOlkVLVsrsuYvkwMHD9uOoV0ztxNthygzu0UcflSZNmshNN91krC0YWakiYz7DVBEcRjcqgEQVAPOHqarPPvvMfBbqH0Z5cLDmYKpNhZSxEM2aNUtg1YFzE/ecOXPkhLK94447RAWeycPvf/97E37YsGHmin+2LL/5zW/M1JcKQjNVZd/7PYa4qV27trEmYVrud7/7nSkrvNkyLFu2TN555x1p166djB492kzdgcUnn3wiPXr0MNYfVX5MzLAo/frXv5YLtQ9gWrJXr15mOu65554TjGB3795tLEshslHoV/FqG0ePHZcVq9ZI3z49pK7DctqwQT1prX1n7fpNASNh9FG0afTRJctWFegDaPNr12+UvXv3m37y/c7d/jKGkwcbN2+VlavWGn8bNG5MZ8OpyilLV642ceH5pFqT0N/R7yAPkAf0q+MnsvGxkT+wCqMPI5/BLlz6wf7wHCsXhMnr5yvC9vNI8g3h12nZN6u1zjrImF2798refQdkzvzFsnjpSsk+edJ+HPUarzbiTMhN/3X6t/duwrnp9zpwk0WLFknLli3lt7/9rbm+8cYbxjLvlA22H0eSRTZvwddosgHfA7Aqw7qMct1www2mv0NGwZoNWffWW2+ZaItDNiDhRNR9MCevPcf/27KIJYSpFvPh1u3cvUeGvfeJLFQhhk499qvJMu7rb+zHBa6HDh+R90eMkjnzFku2CjkoUq8NHe4XeIcOHZaJk6cHCIWMtRtk5uyFUqFC4DQGIj91+rRRllqqYA92HXTNz+CBt+h6msB1Cp+OHq/KzmrZoXkfOWqcTJg41R/0jCpMn/93gkyYMl0Oq3KwUgXvG8NGGCXJetq8eZvMVuFlHfI3feZcGTHyv7Jpa5YKvU3y9vCRKrTzvgCsv3BXRRp317VrVxPnypUrzRXrZDIyMgRTQVAA4NasyftS6tixo3nGv379+pl7qziZh6B/WC+gFiWztsd+FBzOTdxu/CD+4LJs3qwKqH5h2vc2D26udevWNd7sVNHixXn1+MADDxQQMPfff7/xC+EMh/ye1C8rrDeqrmvWnO6VV14RtT5J69atna+LfB+vtrFbp5PhWrVoWiBP/X/QRwYOuME/TZedfVKGfzTK9E300WUrM+TdD0eJU/FBm/92+hz56POxpr1jPQ5cJHlwUPv2nv37jT9zvy/vHtNX02fMkx3nBy8nTpw0z5+O/krmL1om+1SufDdrnnyiaX0zfbaM1bU9ezTsNO1z//7PcKOkmEijpG/9OK+xcEG4Y8dOyIefoJ9vC9nPo8k3xAElM8Mx8JutsnDK1Fny2ZjxsmvPXpmrSwHeGPqh64FVvNoI8mad275p/durm3Bu/EDGQClxyiYoMZBdmEY/diyvvbmRRTZv0a7BsgHrBQ8fPmzWWV588cUBwSEv4IpTNiD9RNQ94vWyy9c+ijmXsDAs1RENhF/fy3ua3MDCM3rsRLM+4Mbr+hktPnPTFhnz5STp1LGdNA6xkDBjbaaU09/1GnL3QLlANXAIxNeHfWgsMhjFttc1S7N0FLghc4t0vjTvyxtWGywGrRC0tgOZsEKtapWCi1yxyLppk4KLSNu1aelfu4D5/QWLlstZzUda2bKyffsO2X/gkNxz561Sr05tU87/fjVJR6orQn6hGA/6D6PYewfdJg3q533pQqBjpN2pQ1vrJew1EVuv8YU+ZswYs14IFpxNmzYZSwZGW3ZBsO3oM2fO9AsfKE9w+89/eYXKNBZW65ScUbKw+BEuOJybuJ1+MCKDw4gLzpk+1jxhbRSsXVjng/JgkfU//vEP49fNP7QznRoTnVY03hEX3JIlS8y1efPm5ur8BwsbnFWcli5dap6xfirYQXg7BXjw54V9jlfbwBq7dF1TVtGsEQzMTZULK6sFOL//jPv6W6MgPnDfnaaPom/gC3uiDhR+fP9g008Qw2kdkNyt/eRiXZMEF00e9OzWWVo2byZDt3wsvXp2NRshTMAw/5pon7+m3+Xm081btsnnX0zQ9rFFfvqT+805Tkj/tbeGG1nRpVP7qOmHkkexcEFGTp0+FbGfR5NvYYpq4n34R4Ololrkz+ji+tf+875kbt6i6666hAvifx+vNuKPUG+cfdO26+A+7vRv792Ec/oJ1++tH2zkgHKEMtr0kRbkQ5UqVczALJossnkLdy2psgHlSUTdh+PklffFailavSZT3vnwM/P3qgofKCv9f9DbKC4AtFNNvhhVdu/ayV85zZs2looVK8o23QUWyl3Ru7s8NGSwEbYwk8PUXa9ubdmiu2HgqlVFQ69vRmF4hqka01/t2rbEYwGXc37qrVyae/2xc6c8ZQuRNVHFDQrfHt1NBocdME/8ZIhRiCDkjxw9LnVr1zJTZrAihXO1dRePVYjgp1GjBspgRzjvCX8PgYHpH3R47MLaunWr2R3WrVs3f9r33nuvuYfSAUvHm2++6V+EbUdNfs+OGxsO148++shMSw0dOtT4sOGsn0hxY7E2dsWNGzdOfvazn4muaTK7SxCRjQf3EJCwwGRrW8DiauwEadasmYRSZODf6ZA/TP3iD4ugYTmDOd4uJMcOGDirKDrDYpoMbt++vLaBXSVwiKukudO5ObpbRU/KjpLxHF3wjnbbsnlT00fhHYOF9tr/MCVs+wne165d068Q4bkw8gDhwrnmjgFN48YXG0WtQ9vW/oMtYfWsqwOXrdu+N1EUJn23XGweo/XzaPLNxhN8bd2iuVGI8B4H8zWsX0+ytoWWocFhE/Hspv+GStdNODf9HgMPTHnr+iOzCQJT27qG0QzEkK6VDzY9XMPJolD5xLuiyAbICygkpUE2hOPj1ffuv+kTUIK6dWpKO90lArdaLTzHdF1CN12nYwXrLm2wcO+NKLj+5Oh5c7rx4PiHUdB3s+fptNR6s+OokipQp3NO69bg/B1i2OE2ZepMM1WRuXGrmdNt2ayJI5b8W+zigNuvpvnC7DJLUwEEd1Z3vliH7cEw22O9ARQ8rEEyDkvuXDqMyp1xugwWN2+6GNBYRZ544gnBPSxFWLtz5ZVXCszC2C2F7ff4DLtFnnnmGfNlj3fjx4+PuB0dSgXm02GJGjJkiFFasAtMFzT7w7mJG1NwUITuu+8+efXVV03Z77zzTlm+fLk/HrzUBdAyffp0GT58uFFmdMGjwB/SWLFiRURmUJ5QZlgVPv74Y4H1B4oaFAQ4HFEApcy5s81GaAWePcagcePG5iNdTG29lJgrdpFirQvW6VwY4egATIFjjU+TRoHTBU0a5VlcsUavQb08a2hw4QsjD4LjCPcMxQxT9+nl8urN+kP/RX7hCpO+Wy42veBrcD93I9+C4wj1XFaPY7BW01CfJ/qdm/4bKg9uwrnt9+jv6Pvon/jTzQ1mTSEGepUqVTLJu5FFofKJd25kA/yFkg2wVMGCVRpkA8pYklyxWoqwbRfTYPi79qq+ZupsmSoM1qWVyTt1995BA+THQ+4K+LuiT94Um/Vrr9N1bQAWWA4ccL0889OH5MlHHxCj8FhNSz22ad1cyqgQXK9TaBt0Oq5Fcz1vyLGOycaF60XVq5nHrKy80aLzM1iZJk75zqxzcL6PdI8pLxxH0KPrpfLUYz+Sp/WvX99eeUEceYwUhxc+g8KCkQwWQWP9CyxEmFLDmhjdIeLPIhYN4kseU0RQAqz1JdJ6HYySMHLbsWOHUWCwxgdbrZGOc4uqm7hxvhEWKGPBM6w2UJDgbPqwzsDShbUEmMeHkjpw4EAjIGH1ibT2CfFgSy/W+mBUiBEqTO14tg7WNDg7NWbf42oVLmtdwwJsOLuY3Dyc/4djDHSXnFmY7XzvlXuc2wW3dVtB6yU2G6CfQHHElDZcttan0x1W6xycHYQ4P7P3hZEHNmw8roVJ3y0Xt/lzI9/cxlXc/tz031B5dBMuWr9HvC10Ewf6+Pr160V3n5lzymA5srIBftzKIvgNdpQNwURKxnOxKkVORHVq1zC7u+bMX2KEJz6DKRnaMhYX1lFTuv2rcVH1sIc84tA4TLFhJGoF8Ck9L8XpsHaoebNGZofaNhXi7dq0cn4ccI+RHs5ZgQkdeXG69Rs2m8XOsEa5dYgH/rt362SuCHdS1xEk0gXnOx5pIU78YdrMOhx8CBecHs786NSpk7HGYDcFFhKHO//HxoUrrE0Ybb344otGOfrlL39ZYGrJTdxY9Kxb8Y2pHHFgJPnYY4/5k8LIcOfOnf52h/xv27bNfB5cFn+gEDewikFRxJkjmIqDg4kegnW4jkphTbMO6b399tumPBihwsGkD0sT1jThrBPrsNYBO9CgbCLv8XSxlC9Suk0bNZTyulFhq2PXk/UPyyimrzEdddFF1Uy/3Ky7y5wuK2uHsRA3qFfH+TrgPjZ5ENhXAyIq5ENs6ecl4paL2yy5kW9u43LrL15tJFR6bvpvYcNF6/eIF/21VatWxjL0yCOPmOUAGOgFOzeyKDiM8zmUbEBfhgIGxWzUqFF+71hu8cILL5hnWMbgikM2IN1E1j3i96LzjFIEOLD+4JC9uQvyFpxinh+LLGfPW3J+2262YNvtUN2NhtFnKIeR2Ra16mDxNE6FhlUGAvnkyUDFA2sHdupaonS1EDXVdCK5q3Sd0wld6PzF+Mlm9wamAHCY4wzdqt+pQxs90DFw91mkuGqo5QnbYRcsXqa76dSCsnSVzNXywQXnMVI8sXwWp7P5ApLUc3bMMywv6PAPPfSQ2WaPNTwYpVmH3RWYAqtTp44MGDBA6tevb9YX2c+hPMBKg8+cDpYVLFbGjhAoBP369ZOnn37a6cXs3IgUt/UMIQflCooZlBEoZhDGcBBMetaSfxcItt4iXSh4sOBgNOnWQfHC1n9YpHD4IhxOt8ahi9jNhi32ONgS5YAFCZaz999/3yhCNg1Y4KBEQXF86qmn5NlnnzV8oKRhy64VktZ/Ua/xahtmTVWv7oJdY7POHxmRpWuHsJsLx2JcecVlJqvYnHBZzy6yfuNm9ZtpLItY5LxMt/N314MVgw+ydJbPjTyoqkdl4MsQMgDT0/F0btIPTs8tl+Bw4Z7dyrdw4QvzPl5tJDjtwsqGaOFsOpH6vfWDvgkLLQ5LxKGNOD4EFh6ncyOLnP5D3YeSDfCH/o71S5CnkKU4FgQDRpzAj+NOcIyJdcmWDUg3UXVvy+TFa7qXMoWzf7p07mAUoK6dO54/Mfp6s50UJ9JCwFbWuV6cStvo4gYhs37d1X3lO92GP163wUPBaqYWIawhWqOnRGMhM+bo4Zo1bWRGtq1bNvev/wgZob7EGof/ued2MwWA7bLQniF4u3fpKH0uy19YHC68831XDXNUF38vWrxS8zlfaulPm/TWL4lZum32gO5Kc+7ScYYryj0sIWllA9dKFCU+hMV5OpgO+de//mWm0PAOSsfrr79uBAye4bBoGVNhUHygwOD0VquQ4HOsa8D0WvC8Oo7dxxoiCCzM+0ORCD4zI1rciB8O64pQX1hIifU+GBk6HdYCIX494NH8rAjSgZKGsgSn6QwX6h5WIgivv//970aoQenCtBfygMXi7733nhmN4qdG9NC4AKGH+DBy/PLLL83ON0zDQWnEgmycW4K1WRjZxtOhbcTLddcp4QoVK+jxFgvMeTiIF3365hv6B5zx1adn3nEOk3VdH0bFWIPUQU9v739l74hZQcnv0GlxbC8PJw+wNqinWmEX6Jq9Nap0Pf34gxHjjOVDN+mHis8tl1Bhg9+5lW/B4YrynAj5gfxE67/hZEO0cLas0fo9/OEcIgxirr/+ejMIcQ7obDxuZJH1G+kaSjbAMow1jLAM4Yrzk7AbD2eewb/TJVs2IO14ygdnWbx8XwYnSHo5gzZvmELAbrJIizitX1xzc8+o8nIu7E8LYI3K63pWx6CBN4fc2u+My3mP3TNWkDvfx3oPxQrliWXqLdY0rH8sIC1/QWL0X5QD1hfsRnMqOzZtfI6/SMoFhJ/ZueT4wkd928XKNq7gq5u4EQbxB/+eUXBceIYSDQGJkVski0WosG7fQcmBoLE7zyKFg9IJhRHWtUS50zlnND/xFwFYW4Y6j8QRqcKC5rZPOxlEkwfoo4i/vCrDiXDR0g+Xphsu4cI630eTb06/Rb1PlPxw039DyQY34VBmN/3ejR83sqiojBEecgFKkZsp8mTIBuQpUfIBcXvVlRilKJ4A0fgwSsVhbg/pAu54j77jmdd4xVWhfDktZ7xiYzylgYDqqnp+TW5pKArLkGAClB8JBuzB6FNVPiTGfODBCrZZws8HfKknYmM7+32Db0sJhQhlR3nT0z21hMxWCa/FRKA4j3QopiIz2UISoPwoJLgSHCxV5UPKWYpwmCMWaePgtpJ4SF5h+xisYRXKp5wOXFhcKRHu1GlMMcd/6iwl4KVYISk/UqzCtbipKh9STilKvaadX+JyejBduh7aRkcCZ9RymJt7liBIwDUByg/XqEq8x1SWD/yGLPHN130BcBouHQmAANsC20GsBNhmYiVWcv2ncl1TKSq57TbmnGOmhNaBmLGVugBoA5w1K3XVmvACUX4kHLEnEkh1+UClyBPNMHmZgFkUf3SpSYD1n5r1Hq9Ss/3Ei6Q342H9ilAp8mbbTGiuMBI4m4CzaRKaaUZeZAKoc1oKi4wx5SOg/CidTYDyIa9eqRSVzvYdtVQ5emgfFaOomEqNB9Q16pyOBOJBgPIjHhS9EwflQ35dUCnKZ5FydxBsnEor/dWOOqZCVPrrOdklpPxINvHEpEf5EMiVSlEgj5R7gimcUyqlt9pZv6W3br1QMrYvL9RC4fPA+ivIjucUFWSSkm/wEyDp6TzHqLRUvlkwqUcwcJdZaalRb5eD8sPb9ROcO8qHYCL5z1SK8lnwTgng5Foc8JimfxB0dCWHABQgHM0PgceTqktOvZWmnFJ+eLc2KR/c1Q2VInecUtIXfh0776+s6G3K/E5cSalsKD7YRIgfOMYv3Sfi1+5LCgvm03sEKD+Kt04oHwrHnz+GVThuKREq/4uW5xqlRIWzkCQQRwKUH3GEyaiSRoALrZOGmgmRAAmQAAmQAAl4mQCVIi/XDvNGAiRAAiRAAiSQNAJUipKGmgmRAAmQAAmQAAl4mQCVIi/XDvNGAiRAAiRAAiSQNAJUipKGmgmRAAmQAAmQAAl4mQCVIi/XDvNGAiRAAiRAAiSQNAJUipKGmgmRAAmQAAmQAAl4mQCVIi/XDvNGAiRAAiRAAiSQNAJUipKGmgmRAAmQAAmQAAl4mQCVIi/XDvNGAiRAAiRAAiSQNAJUipKGmgmRAAmQAAmQAAl4mQCVIi/XDvNGAiRAAiRAAiSQNAJUipKGmgmRAAmQAAmQAAl4mQCVIi/XDvNGAiRAAiRAAiSQNAJUipKGmgmRAAmQAAmQAAl4mQCVIi/XDvNGAiRAAiRAAiSQNAJUipKGmgmRAAmQAAmQAAl4mQCVIi/XDvNGAiRAAiRAAiSQNAJUipKGmgmRAAmQAAmQAAl4mQCVIi/XDvNGAiRAAiRAAiSQNAJUipKGmgmRAAmQAAmQAAl4mQCVIi/XDvNGAiRAAiRAAiSQNAJUipKGmgmRAAmQAAmQAAl4mQCVIi/XDvNGAiRAAiRAAiSQNAJUipKGmgmRAAmQAAmQAAl4mQCVIi/XDvNGAiRAAiRAAiSQNAJUipKGmgmRAAmQAAmQAAl4mQCVIi/XDvNGAiRAAiRAAiSQNAJUipKGmgmRAAmQAAmQAAl4mQCVIi/XDvNGAiRAAiRAAiSQNAJUipKGmgmRAAmQAAmQAAl4mQCVIi/XDvNGAiRAAiRAAiSQNAJUipKGmgmRAAmQAAmQAAl4mcD/A1FtzTlyPtIaAAAAAElFTkSuQmCC"},8099:(e,n,i)=>{i.d(n,{A:()=>s});const s=i.p+"assets/images/regionx-cross-chain-roc-c5f1f0f0b065e28630cdd848c740a7e7.png"},33066:(e,n,i)=>{i.d(n,{A:()=>s});const s=i.p+"assets/images/regionx-purchase-bulk-51b6f2857476de2db74a0511744d468f.png"},60617:(e,n,i)=>{i.d(n,{A:()=>s});const s=i.p+"assets/images/regionx-select-region-1c68f88831920a288960cf232c4d8b46.png"},28453:(e,n,i)=>{i.d(n,{R:()=>o,x:()=>r});var s=i(96540);const a={},t=s.createContext(a);function o(e){const n=s.useContext(t);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:o(e.components),s.createElement(t.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/c662f00a.2ce44b41.js b/assets/js/c662f00a.2ce44b41.js new file mode 100644 index 000000000000..4b6bafc7749c --- /dev/null +++ b/assets/js/c662f00a.2ce44b41.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7887],{84768:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>a,default:()=>h,frontMatter:()=>o,metadata:()=>s,toc:()=>l});const s=JSON.parse('{"id":"learn/xcm/journey/learn-xcm-docs-journey-queries","title":"Queries","description":"Query Information from another Consensus System.","source":"@site/../docs/learn/xcm/journey/queries.md","sourceDirName":"learn/xcm/journey","slug":"/learn/xcm/journey-queries","permalink":"/docs/learn/xcm/journey-queries","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/xcm/journey/queries.md","tags":[],"version":"current","lastUpdatedBy":"divdeploy","lastUpdatedAt":1712340071000,"frontMatter":{"id":"learn-xcm-docs-journey-queries","title":"Queries","sidebar_label":"Queries","description":"Query Information from another Consensus System.","keywords":["xcm","cross-consensus messaging","queries"],"slug":"../journey-queries"},"sidebar":"docs","previous":{"title":"Expectations","permalink":"/docs/learn/xcm/journey-expectations"},"next":{"title":"Version Subscription","permalink":"/docs/learn/xcm/journey-version"}}');var r=t(74848),i=t(28453);const o={id:"learn-xcm-docs-journey-queries",title:"Queries",sidebar_label:"Queries",description:"Query Information from another Consensus System.",keywords:["xcm","cross-consensus messaging","queries"],slug:"../journey-queries"},a="Queries",c={},l=[{value:"ReportHolding",id:"reportholding",level:2},{value:"Example",id:"example",level:3},{value:"QueryPallet",id:"querypallet",level:2},{value:"Example",id:"example-1",level:3},{value:"ReportError",id:"reporterror",level:2},{value:"Example",id:"example-2",level:3},{value:"ReportTransactStatus",id:"reporttransactstatus",level:2},{value:"Example",id:"example-3",level:3}];function d(e){const n={a:"a",code:"code",em:"em",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,i.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.header,{children:(0,r.jsx)(n.h1,{id:"queries",children:"Queries"})}),"\n",(0,r.jsx)(n.p,{children:"XCM contains query instructions that can be used to query information from another consensus system:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"ReportHolding"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"QueryPallet"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"ReportError"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"ReportTransactStatus"})}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:["Each of these instructions is sent to the destination where we would like the information to be\nreported back to us. Each instruction has a ",(0,r.jsx)(n.code,{children:"QueryResponseInfo"})," struct as one of its inputs."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-rust,",metastring:"noplayground",children:"pub struct QueryResponseInfo {\n\tpub destination: MultiLocation,\n\t#[codec(compact)]\n\tpub query_id: QueryId,\n\tpub max_weight: Weight,\n}\n"})}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.code,{children:"destination"})," tells the queried consensus system where to send the response to and the\n",(0,r.jsx)(n.code,{children:"query_id"})," field links the query and the query response together. The ",(0,r.jsx)(n.code,{children:"max_weight"})," field tells the\nqueried consensus system what the maximum weight is that the response instruction can take."]}),"\n",(0,r.jsxs)(n.p,{children:["When a query instruction is executed correctly, it sends a ",(0,r.jsx)(n.code,{children:"QueryResponse"})," instruction to the\nlocation defined in the previously described ",(0,r.jsx)(n.code,{children:"destination"})," field. The ",(0,r.jsx)(n.code,{children:"QueryResponse"})," looks like\nthis:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-rust",children:"QueryResponse {\n #[codec(compact)]\n query_id: QueryId,\n response: Response,\n max_weight: Weight,\n querier: Option,\n}\n\n// Response Struct\npub enum Response {\n\t/// No response. Serves as a neutral default.\n\tNull,\n\t/// Some assets.\n\tAssets(MultiAssets),\n\t/// The outcome of an XCM instruction.\n\tExecutionResult(Option<(u32, Error)>),\n\t/// An XCM version.\n\tVersion(super::Version),\n\t/// The index, instance name, pallet name and version of some pallets.\n\tPalletsInfo(BoundedVec),\n\t/// The status of a dispatch attempt using `Transact`.\n\tDispatchResult(MaybeErrorCode),\n}\n"})}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.code,{children:"QueryResponse"})," has the same ",(0,r.jsx)(n.code,{children:"query_id"})," as the request to link the request and response and\ntakes over the ",(0,r.jsx)(n.code,{children:"max_weight"})," from the ",(0,r.jsx)(n.code,{children:"QueryResponseInfo"}),". It has the requested information in the\n",(0,r.jsx)(n.code,{children:"response"})," field. And it has the location of the querier relative to the queried location in the\nquerier field. The response can be sent back to the requester, or to another location, so the\nquerier field is important to determine where the requested information is needed."]}),"\n",(0,r.jsx)(n.p,{children:"Now we take a look at the query instructions."}),"\n",(0,r.jsx)(n.h2,{id:"reportholding",children:"ReportHolding"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-rust,",metastring:"noplayground",children:"ReportHolding { response_info: QueryResponseInfo, assets: MultiAssetFilter }\n"})}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.code,{children:"ReportHolding"})," instruction reports to the given destination the contents of the Holding\nRegister. The ",(0,r.jsx)(n.code,{children:"assets"})," field is a filter for the assets that should be reported back. The assets\nreported back will be, asset-wise, ",(0,r.jsx)(n.em,{children:"the lesser of this value and the holding register"}),". For example,\nif the holding register contains 10 units of some fungible asset and the ",(0,r.jsx)(n.code,{children:"assets"})," field specifies 15\nunits of the same asset, the result will return 10 units of that asset. Wild cards can be used to\ndescribe which assets in the holding register to report, but the response always contains assets and\nno wild cards."]}),"\n",(0,r.jsx)(n.h3,{id:"example",children:"Example"}),"\n",(0,r.jsxs)(n.p,{children:["For the full example, check ",(0,r.jsx)(n.a,{href:"https://github.com/paritytech/xcm-docs/tree/main/examples",children:"here"}),".\nAssets are withdrawn from the account of parachain 1 on the relay chain and partly deposited in the\naccount of parachain 2. The remaining assets are reported back to parachain 1."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-rust,",metastring:"noplayground",children:"Xcm(vec![\n WithdrawAsset((Here, AMOUNT).into()),\n BuyExecution { fees: (Here, AMOUNT).into(), weight_limit: Unlimited },\n DepositAsset { assets: Definite((Here, AMOUNT - 5).into()), beneficiary: Parachain(2).into() },\n ReportHolding {\n response_info: QueryResponseInfo {\n destination: Parachain(1).into(),\n query_id: QUERY_ID,\n max_weight: Weight::from_all(0),\n },\n assets: All.into(),\n },\n]);\n"})}),"\n",(0,r.jsx)(n.h2,{id:"querypallet",children:"QueryPallet"}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.code,{children:"QueryPallet"})," instruction queries the existence of a particular pallet based on the module name\nspecified in the ",(0,r.jsx)(n.code,{children:"module_name"})," field."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-rust,",metastring:"noplayground",children:"QueryPallet { module_name: Vec, response_info: QueryResponseInfo }\n"})}),"\n",(0,r.jsxs)(n.p,{children:["The destination responds with a vec of ",(0,r.jsx)(n.code,{children:"PalletInfo"}),"s if the pallet exists."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-rust",children:"pub struct PalletInfo {\n\t#[codec(compact)]\n\tindex: u32,\n\tname: BoundedVec,\n\tmodule_name: BoundedVec,\n\t#[codec(compact)]\n\tmajor: u32,\n\t#[codec(compact)]\n\tminor: u32,\n\t#[codec(compact)]\n\tpatch: u32,\n}\n"})}),"\n",(0,r.jsx)(n.h3,{id:"example-1",children:"Example"}),"\n",(0,r.jsxs)(n.p,{children:["For the full example, check ",(0,r.jsx)(n.a,{href:"https://github.com/paritytech/xcm-docs/tree/main/examples",children:"here"}),". It\nqueries for all instances of pallet_balances and sends the result back to parachain 1."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-rust,",metastring:"noplayground",children:'Xcm(vec![\n QueryPallet {\n module_name: "pallet_balances".into(),\n response_info: QueryResponseInfo {\n destination: Parachain(1).into(),\n query_id: QUERY_ID,\n max_weight: Weight::from_all(0),\n },\n }\n]);\n'})}),"\n",(0,r.jsx)(n.h2,{id:"reporterror",children:"ReportError"}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.code,{children:"ReportError"})," instruction report the contents of the Error Register to the given destination.\nThis instruction is useful in combination with the ",(0,r.jsx)(n.code,{children:"SetErrorHandler"})," instruction. It then only\nreports an error if an error is thrown."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-rust",children:"ReportError(QueryResponseInfo)\n"})}),"\n",(0,r.jsx)(n.h3,{id:"example-2",children:"Example"}),"\n",(0,r.jsxs)(n.p,{children:["For the full example, check ",(0,r.jsx)(n.a,{href:"https://github.com/paritytech/xcm-docs/tree/main/examples",children:"here"}),". The\nmessage sets the error handler to report back any error that is thrown during execution of the\ninstructions using the ",(0,r.jsx)(n.code,{children:"ReportError"})," instruction."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-rust,",metastring:"noplayground",children:"Xcm(vec![\n // Set the Error Handler to report back status of Error register.\n SetErrorHandler(Xcm(vec![\n ReportError(QueryResponseInfo {\n destination: Parachain(1).into(),\n query_id: QUERY_ID,\n max_weight: Weight::from_all(0),\n })\n ])),\n // If an instruction errors during further processing, the resulting error is reported back to Parachain(1).\n // MORE INSTRUCTIONS\n]);\n"})}),"\n",(0,r.jsx)(n.h2,{id:"reporttransactstatus",children:"ReportTransactStatus"}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.code,{children:"ReportTransactStatus"})," instruction report the value of the Transact Status Register to the\nspecified destination."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-rust",children:"ReportTransactStatus(QueryResponseInfo)\n"})}),"\n",(0,r.jsx)(n.h3,{id:"example-3",children:"Example"}),"\n",(0,r.jsxs)(n.p,{children:["For the full example, check ",(0,r.jsx)(n.a,{href:"https://github.com/paritytech/xcm-docs/tree/main/examples",children:"here"}),".\nDispatches a call on the consensus system receiving this Xcm and reports back the status of the\nTransact Status Register."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-rust",children:"Xcm(vec![\n Transact {\n origin_kind: OriginKind::SovereignAccount,\n require_weight_at_most: Weight::from_parts(INITIAL_BALANCE as u64, 1024 * 1024),\n call: remark.encode().into(),\n },\n ReportTransactStatus(QueryResponseInfo {\n destination: Parachain(1).into(),\n query_id: QUERY_ID,\n max_weight: Weight::from_all(0),\n }),\n]);\n"})})]})}function h(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(d,{...e})}):d(e)}},28453:(e,n,t)=>{t.d(n,{R:()=>o,x:()=>a});var s=t(96540);const r={},i=s.createContext(r);function o(e){const n=s.useContext(i);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:o(e.components),s.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/c662f00a.62804d16.js b/assets/js/c662f00a.62804d16.js deleted file mode 100644 index 1e92479c8079..000000000000 --- a/assets/js/c662f00a.62804d16.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7887],{21352:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>o,default:()=>h,frontMatter:()=>i,metadata:()=>a,toc:()=>l});var s=t(74848),r=t(28453);const i={id:"learn-xcm-docs-journey-queries",title:"Queries",sidebar_label:"Queries",description:"Query Information from another Consensus System.",keywords:["xcm","cross-consensus messaging","queries"],slug:"../journey-queries"},o="Queries",a={id:"learn/xcm/journey/learn-xcm-docs-journey-queries",title:"Queries",description:"Query Information from another Consensus System.",source:"@site/../docs/learn/xcm/journey/queries.md",sourceDirName:"learn/xcm/journey",slug:"/learn/xcm/journey-queries",permalink:"/docs/learn/xcm/journey-queries",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/xcm/journey/queries.md",tags:[],version:"current",lastUpdatedBy:"divdeploy",lastUpdatedAt:1712340071e3,frontMatter:{id:"learn-xcm-docs-journey-queries",title:"Queries",sidebar_label:"Queries",description:"Query Information from another Consensus System.",keywords:["xcm","cross-consensus messaging","queries"],slug:"../journey-queries"},sidebar:"docs",previous:{title:"Expectations",permalink:"/docs/learn/xcm/journey-expectations"},next:{title:"Version Subscription",permalink:"/docs/learn/xcm/journey-version"}},c={},l=[{value:"ReportHolding",id:"reportholding",level:2},{value:"Example",id:"example",level:3},{value:"QueryPallet",id:"querypallet",level:2},{value:"Example",id:"example-1",level:3},{value:"ReportError",id:"reporterror",level:2},{value:"Example",id:"example-2",level:3},{value:"ReportTransactStatus",id:"reporttransactstatus",level:2},{value:"Example",id:"example-3",level:3}];function d(e){const n={a:"a",code:"code",em:"em",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"queries",children:"Queries"})}),"\n",(0,s.jsx)(n.p,{children:"XCM contains query instructions that can be used to query information from another consensus system:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"ReportHolding"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"QueryPallet"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"ReportError"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"ReportTransactStatus"})}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["Each of these instructions is sent to the destination where we would like the information to be\nreported back to us. Each instruction has a ",(0,s.jsx)(n.code,{children:"QueryResponseInfo"})," struct as one of its inputs."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-rust,",metastring:"noplayground",children:"pub struct QueryResponseInfo {\n\tpub destination: MultiLocation,\n\t#[codec(compact)]\n\tpub query_id: QueryId,\n\tpub max_weight: Weight,\n}\n"})}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"destination"})," tells the queried consensus system where to send the response to and the\n",(0,s.jsx)(n.code,{children:"query_id"})," field links the query and the query response together. The ",(0,s.jsx)(n.code,{children:"max_weight"})," field tells the\nqueried consensus system what the maximum weight is that the response instruction can take."]}),"\n",(0,s.jsxs)(n.p,{children:["When a query instruction is executed correctly, it sends a ",(0,s.jsx)(n.code,{children:"QueryResponse"})," instruction to the\nlocation defined in the previously described ",(0,s.jsx)(n.code,{children:"destination"})," field. The ",(0,s.jsx)(n.code,{children:"QueryResponse"})," looks like\nthis:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-rust",children:"QueryResponse {\n #[codec(compact)]\n query_id: QueryId,\n response: Response,\n max_weight: Weight,\n querier: Option,\n}\n\n// Response Struct\npub enum Response {\n\t/// No response. Serves as a neutral default.\n\tNull,\n\t/// Some assets.\n\tAssets(MultiAssets),\n\t/// The outcome of an XCM instruction.\n\tExecutionResult(Option<(u32, Error)>),\n\t/// An XCM version.\n\tVersion(super::Version),\n\t/// The index, instance name, pallet name and version of some pallets.\n\tPalletsInfo(BoundedVec),\n\t/// The status of a dispatch attempt using `Transact`.\n\tDispatchResult(MaybeErrorCode),\n}\n"})}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"QueryResponse"})," has the same ",(0,s.jsx)(n.code,{children:"query_id"})," as the request to link the request and response and\ntakes over the ",(0,s.jsx)(n.code,{children:"max_weight"})," from the ",(0,s.jsx)(n.code,{children:"QueryResponseInfo"}),". It has the requested information in the\n",(0,s.jsx)(n.code,{children:"response"})," field. And it has the location of the querier relative to the queried location in the\nquerier field. The response can be sent back to the requester, or to another location, so the\nquerier field is important to determine where the requested information is needed."]}),"\n",(0,s.jsx)(n.p,{children:"Now we take a look at the query instructions."}),"\n",(0,s.jsx)(n.h2,{id:"reportholding",children:"ReportHolding"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-rust,",metastring:"noplayground",children:"ReportHolding { response_info: QueryResponseInfo, assets: MultiAssetFilter }\n"})}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"ReportHolding"})," instruction reports to the given destination the contents of the Holding\nRegister. The ",(0,s.jsx)(n.code,{children:"assets"})," field is a filter for the assets that should be reported back. The assets\nreported back will be, asset-wise, ",(0,s.jsx)(n.em,{children:"the lesser of this value and the holding register"}),". For example,\nif the holding register contains 10 units of some fungible asset and the ",(0,s.jsx)(n.code,{children:"assets"})," field specifies 15\nunits of the same asset, the result will return 10 units of that asset. Wild cards can be used to\ndescribe which assets in the holding register to report, but the response always contains assets and\nno wild cards."]}),"\n",(0,s.jsx)(n.h3,{id:"example",children:"Example"}),"\n",(0,s.jsxs)(n.p,{children:["For the full example, check ",(0,s.jsx)(n.a,{href:"https://github.com/paritytech/xcm-docs/tree/main/examples",children:"here"}),".\nAssets are withdrawn from the account of parachain 1 on the relay chain and partly deposited in the\naccount of parachain 2. The remaining assets are reported back to parachain 1."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-rust,",metastring:"noplayground",children:"Xcm(vec![\n WithdrawAsset((Here, AMOUNT).into()),\n BuyExecution { fees: (Here, AMOUNT).into(), weight_limit: Unlimited },\n DepositAsset { assets: Definite((Here, AMOUNT - 5).into()), beneficiary: Parachain(2).into() },\n ReportHolding {\n response_info: QueryResponseInfo {\n destination: Parachain(1).into(),\n query_id: QUERY_ID,\n max_weight: Weight::from_all(0),\n },\n assets: All.into(),\n },\n]);\n"})}),"\n",(0,s.jsx)(n.h2,{id:"querypallet",children:"QueryPallet"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"QueryPallet"})," instruction queries the existence of a particular pallet based on the module name\nspecified in the ",(0,s.jsx)(n.code,{children:"module_name"})," field."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-rust,",metastring:"noplayground",children:"QueryPallet { module_name: Vec, response_info: QueryResponseInfo }\n"})}),"\n",(0,s.jsxs)(n.p,{children:["The destination responds with a vec of ",(0,s.jsx)(n.code,{children:"PalletInfo"}),"s if the pallet exists."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-rust",children:"pub struct PalletInfo {\n\t#[codec(compact)]\n\tindex: u32,\n\tname: BoundedVec,\n\tmodule_name: BoundedVec,\n\t#[codec(compact)]\n\tmajor: u32,\n\t#[codec(compact)]\n\tminor: u32,\n\t#[codec(compact)]\n\tpatch: u32,\n}\n"})}),"\n",(0,s.jsx)(n.h3,{id:"example-1",children:"Example"}),"\n",(0,s.jsxs)(n.p,{children:["For the full example, check ",(0,s.jsx)(n.a,{href:"https://github.com/paritytech/xcm-docs/tree/main/examples",children:"here"}),". It\nqueries for all instances of pallet_balances and sends the result back to parachain 1."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-rust,",metastring:"noplayground",children:'Xcm(vec![\n QueryPallet {\n module_name: "pallet_balances".into(),\n response_info: QueryResponseInfo {\n destination: Parachain(1).into(),\n query_id: QUERY_ID,\n max_weight: Weight::from_all(0),\n },\n }\n]);\n'})}),"\n",(0,s.jsx)(n.h2,{id:"reporterror",children:"ReportError"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"ReportError"})," instruction report the contents of the Error Register to the given destination.\nThis instruction is useful in combination with the ",(0,s.jsx)(n.code,{children:"SetErrorHandler"})," instruction. It then only\nreports an error if an error is thrown."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-rust",children:"ReportError(QueryResponseInfo)\n"})}),"\n",(0,s.jsx)(n.h3,{id:"example-2",children:"Example"}),"\n",(0,s.jsxs)(n.p,{children:["For the full example, check ",(0,s.jsx)(n.a,{href:"https://github.com/paritytech/xcm-docs/tree/main/examples",children:"here"}),". The\nmessage sets the error handler to report back any error that is thrown during execution of the\ninstructions using the ",(0,s.jsx)(n.code,{children:"ReportError"})," instruction."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-rust,",metastring:"noplayground",children:"Xcm(vec![\n // Set the Error Handler to report back status of Error register.\n SetErrorHandler(Xcm(vec![\n ReportError(QueryResponseInfo {\n destination: Parachain(1).into(),\n query_id: QUERY_ID,\n max_weight: Weight::from_all(0),\n })\n ])),\n // If an instruction errors during further processing, the resulting error is reported back to Parachain(1).\n // MORE INSTRUCTIONS\n]);\n"})}),"\n",(0,s.jsx)(n.h2,{id:"reporttransactstatus",children:"ReportTransactStatus"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"ReportTransactStatus"})," instruction report the value of the Transact Status Register to the\nspecified destination."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-rust",children:"ReportTransactStatus(QueryResponseInfo)\n"})}),"\n",(0,s.jsx)(n.h3,{id:"example-3",children:"Example"}),"\n",(0,s.jsxs)(n.p,{children:["For the full example, check ",(0,s.jsx)(n.a,{href:"https://github.com/paritytech/xcm-docs/tree/main/examples",children:"here"}),".\nDispatches a call on the consensus system receiving this Xcm and reports back the status of the\nTransact Status Register."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-rust",children:"Xcm(vec![\n Transact {\n origin_kind: OriginKind::SovereignAccount,\n require_weight_at_most: Weight::from_parts(INITIAL_BALANCE as u64, 1024 * 1024),\n call: remark.encode().into(),\n },\n ReportTransactStatus(QueryResponseInfo {\n destination: Parachain(1).into(),\n query_id: QUERY_ID,\n max_weight: Weight::from_all(0),\n }),\n]);\n"})})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},28453:(e,n,t)=>{t.d(n,{R:()=>o,x:()=>a});var s=t(96540);const r={},i=s.createContext(r);function o(e){const n=s.useContext(i);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:o(e.components),s.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/c78e4f7d.c6a1236c.js b/assets/js/c78e4f7d.c6a1236c.js new file mode 100644 index 000000000000..b1b0bd635edb --- /dev/null +++ b/assets/js/c78e4f7d.c6a1236c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1335],{97685:(e,n,o)=>{o.r(n),o.d(n,{assets:()=>i,contentTitle:()=>d,default:()=>h,frontMatter:()=>r,metadata:()=>s,toc:()=>l});const s=JSON.parse('{"id":"general/dune-analytics/polkadot-dashboards/polkadot-dashboards-overview","title":"Polkadot Dashboards Overview","description":"The starting point for exploring Polkadot dashboards on Dune Analytics.","source":"@site/../docs/general/dune-analytics/polkadot-dashboards/polkadot-dashboards-overview.md","sourceDirName":"general/dune-analytics/polkadot-dashboards","slug":"/general/dune-analytics/polkadot-dashboards-overview","permalink":"/docs/general/dune-analytics/polkadot-dashboards-overview","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/polkadot-dashboards/polkadot-dashboards-overview.md","tags":[],"version":"current","lastUpdatedBy":"MK","lastUpdatedAt":1719215716000,"frontMatter":{"id":"polkadot-dashboards-overview","title":"Polkadot Dashboards Overview","sidebar_label":"Overview","description":"The starting point for exploring Polkadot dashboards on Dune Analytics.","keywords":["polkadot","dashboard","dune","governance","staking","NFT"],"slug":"../polkadot-dashboards-overview"},"sidebar":"docs","previous":{"title":"Polkadot Dashboards","permalink":"/docs/general/dune-analytics/polkadot-dashboards"},"next":{"title":"Governance","permalink":"/docs/general/dune-analytics/polkadot-dashboards-governance"}}');var a=o(74848),t=o(28453);const r={id:"polkadot-dashboards-overview",title:"Polkadot Dashboards Overview",sidebar_label:"Overview",description:"The starting point for exploring Polkadot dashboards on Dune Analytics.",keywords:["polkadot","dashboard","dune","governance","staking","NFT"],slug:"../polkadot-dashboards-overview"},d="Polkadot Dashboards Overview",i={},l=[{value:"Featured Dashboards on Dune",id:"featured-dashboards-on-dune",level:2},{value:"Governance",id:"governance",level:3},{value:"Staking",id:"staking",level:3},{value:"Miscellaneous",id:"miscellaneous",level:3},{value:"Key Tables",id:"key-tables",level:2},{value:"Useful Queries",id:"useful-queries",level:2},{value:"Getting Started with Queries",id:"getting-started-with-queries",level:2}];function c(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,t.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.header,{children:(0,a.jsx)(n.h1,{id:"polkadot-dashboards-overview",children:"Polkadot Dashboards Overview"})}),"\n",(0,a.jsx)(n.p,{children:"Polkadot is a flagship project by Web3 Foundation, designed to enable a completely decentralized web\nwhere users are in control. It is a sharded multichain network, meaning it can process many\ntransactions on several chains in parallel, improving scalability."}),"\n",(0,a.jsx)(n.h2,{id:"featured-dashboards-on-dune",children:"Featured Dashboards on Dune"}),"\n",(0,a.jsx)(n.p,{children:"Here you'll find a variety of dashboards that help visualize data from the Polkadot network:"}),"\n",(0,a.jsx)(n.h3,{id:"governance",children:"Governance"}),"\n",(0,a.jsx)(n.p,{children:"Explore Polkadot's governance through dashboards detailing proposal submissions, referenda outcomes,\nand voting behaviors. These tools highlight the decentralized decision-making process and its\nefficacy."}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.a,{href:"https://dune.com/substrate/polkadot-gov",children:"Polkadot Governance Dashboard"}),": The ",(0,a.jsx)(n.em,{children:"Polkadot Governance\nDashboard"})," provides a clear and concise representation of the\n",(0,a.jsx)(n.a,{href:"https://wiki.polkadot.network/docs/en/learn-governance",children:"network's governance"})," activities. It\nserves as a useful tool for community members to observe\n",(0,a.jsx)(n.a,{href:"https://wiki.polkadot.network/docs/en/learn-treasury",children:"treasury management"}),",\n",(0,a.jsx)(n.a,{href:"https://wiki.polkadot.network/docs/en/learn-governance#referenda",children:"referendum outcomes"}),", and\nvoting patterns. This dashboard aims to enhance community engagement by simplifying access to\ngovernance information and fostering a transparent decision-making environment."]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.a,{href:"https://dune.com/substrate/polkadot-opengov-active-referenda",children:"Polkadot OpenGov Referenda - Home"}),":\nThis dashboard is designed for those who wish to vote, allowing them to quickly understand the\ncurrent trend in Polkadot OpenGov and proceed to vote on\n",(0,a.jsx)(n.a,{href:"https://polkadot.polkassembly.io/opengov",children:"Polkassembly"}),". If you want to see more details of each\nreferendum, please check\n",(0,a.jsx)(n.a,{href:"https://dune.com/substrate/polkadot-referendum",children:"Polkadot Opengov - Referendum Voting Analysis"}),"."]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.a,{href:"https://dune.com/substrate/polkadot-referendum",children:"Polkadot Opengov - Referendum Voting Analysis"}),":\nDetailed insights into the referendum voting process and outcomes."]}),"\n"]}),"\n",(0,a.jsx)(n.h3,{id:"staking",children:"Staking"}),"\n",(0,a.jsxs)(n.p,{children:["Dive into the staking ecosystem with dashboards that analyze validator performance, nominator\ncontributions, and staking distributions. For a deeper understanding of Polkadot's staking mechanism\nand to optimize your staking strategies, visit the\n",(0,a.jsx)(n.a,{href:"https://wiki.polkadot.network/docs/learn-staking",children:"official staking mechanism documentation"})," and the\n",(0,a.jsx)(n.a,{href:"https://wiki.polkadot.network/docs/staking-dashboard",children:"staking web app documentation"}),"."]}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.a,{href:"https://dune.com/substrate/polkadot-staking",children:"Polkadot Staking Dashboard"}),": Overview of staking\ndynamics and distribution across the network."]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.a,{href:"https://dune.com/substrate/polkadot-staking-validators",children:"Polkadot Staking Dashboard (Validators) \ud83d\udcb0"}),":\nAnalyze validator performance and statistics."]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.a,{href:"https://dune.com/substrate/polkadot-staking-nominators",children:"Polkadot Staking Dashboard (Nominators) \ud83d\udcb0"}),":\nInsights into nominator contributions and rewards."]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.a,{href:"https://dune.com/substrate/polkadot-staking-pool-member",children:"Polkadot Staking Dashboard (Pool Member) \ud83d\udcb0"}),":\nData on staking pools and individual member activity."]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.a,{href:"https://dune.com/substrate/polkadot-staking-nomination-pool",children:"Polkadot Staking Dashboard (Nomination Pool) \ud83d\udcb0"}),":\nDetailed view of nomination pools and their performance."]}),"\n"]}),"\n",(0,a.jsx)(n.h3,{id:"miscellaneous",children:"Miscellaneous"}),"\n",(0,a.jsx)(n.p,{children:"Discover diverse aspects of Polkadot through Miscellaneous dashboards, which provide insights into\nDOT ordinals and other unique network activities. Ideal for uncovering trends in the broader\necosystem."}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.a,{href:"https://dune.com/substrate/dot-ordinals",children:"DOT Ordinals"}),": Examination of DOT ordinal metrics and\ntrends."]}),"\n"]}),"\n",(0,a.jsx)(n.h2,{id:"key-tables",children:"Key Tables"}),"\n",(0,a.jsx)(n.p,{children:"Data from the Polkadot network is organized into several key tables:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.code,{children:"polkadot.balances"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.code,{children:"polkadot.blocks"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.code,{children:"polkadot.calls"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.code,{children:"polkadot.events"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.code,{children:"polkadot.extrinsics"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.code,{children:"polkadot.transfers"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.code,{children:"polkadot.traces"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.code,{children:"polkadot.stakings"})}),"\n"]}),"\n",(0,a.jsxs)(n.p,{children:["Start building your own queries using granular data on Dune\n",(0,a.jsx)(n.a,{href:"https://dune.com/queries?category=canonical&namespace=polkadot",children:"here"}),"."]}),"\n",(0,a.jsx)(n.h2,{id:"useful-queries",children:"Useful Queries"}),"\n",(0,a.jsxs)(n.p,{children:["Here are ",(0,a.jsx)(n.strong,{children:"materialized"})," queries for Polkadot that may be useful to build your own charts:"]}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.a,{href:"https://dune.com/queries/3394422",children:"Polkadot Referenda Total Voting Power"}),"\n(",(0,a.jsx)(n.code,{children:"dune.substrate.result_polkadot_referenda_total_voting_power"}),")"]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.a,{href:"https://dune.com/queries/3426963",children:"Polkadot Staking Nomination Total"}),"\n(",(0,a.jsx)(n.code,{children:"dune.substrate.result_polkadot_staking_nomination_total"}),")"]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.a,{href:"https://dune.com/queries/3393179",children:"Polkadot OpenGov Delegation"}),"\n(",(0,a.jsx)(n.code,{children:"dune.substrate.result_polkadot_open_gov_delegation"}),")"]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.a,{href:"https://dune.com/queries/3415321",children:"Polkadot Vote Record"}),"\n(",(0,a.jsx)(n.code,{children:"dune.substrate.result_polkadot_vote_record"}),")"]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.a,{href:"https://dune.com/queries/3394156",children:"Polkadot Proposals proposed"}),"\n(",(0,a.jsx)(n.code,{children:"dune.substrate.result_polkadot_proposals_proposed"}),")"]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.a,{href:"https://dune.com/queries/3391225",children:"Polkadot Referenda Direct Vote"}),"\n(",(0,a.jsx)(n.code,{children:"dune.substrate.result_polkadot_referenda_direct_vote"}),")"]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.a,{href:"https://dune.com/queries/3393684",children:"Polkadot Each Vote Record"}),"(",(0,a.jsx)(n.code,{children:"dune.substrate.result_polkadot_each_vote_record"}),")"]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.a,{href:"https://dune.com/queries/3399352",children:"Polkdaot Referenda Origin Map"}),"(",(0,a.jsx)(n.code,{children:"dune.substrate.result_polkdaot_referenda_origin_map"}),")"]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.a,{href:"https://dune.com/queries/3457139",children:"Polkadot Failed calls in batch"}),"(",(0,a.jsx)(n.code,{children:"dune.substrate.result_polkadot_failed_calls_in_batch"}),")"]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.a,{href:"https://dune.com/queries/3302709",children:"polkadot_validator"}),"\n(",(0,a.jsx)(n.code,{children:"dune.substrate.result_polkadot_validators"}),")"]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.a,{href:"https://dune.com/queries/3327350",children:"polkadot_nominationpools"}),"\n(",(0,a.jsx)(n.code,{children:"dune.substrate.result_polkadot_nominationpools"}),")"]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.a,{href:"https://dune.com/queries/3326829",children:"polkadot_nominators"}),"\n(",(0,a.jsx)(n.code,{children:"dune.substrate.result_polkadot_nominators"}),")"]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.a,{href:"https://dune.com/queries/3327479",children:"polkadot_poolmembers"}),"\n(",(0,a.jsx)(n.code,{children:"dune.substrate.result_polkadot_poolmembers"}),")"]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.a,{href:"https://dune.com/queries/3420617",children:"polkadot_identity"})," (",(0,a.jsx)(n.code,{children:"dune.substrate.result_polkadot_identity"}),")"]}),"\n"]}),"\n",(0,a.jsx)(n.h2,{id:"getting-started-with-queries",children:"Getting Started with Queries"}),"\n",(0,a.jsx)(n.p,{children:"To get started with querying data from Unique, you are welcome to use the mentioned materialized\nqueries. You can use the following DuneSQL queries as examples:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-sql",metastring:'title="Polkadot Staking APR (Normalized)" showLineNumbers',children:"SELECT\n AVG(validator_normalized_staking_apr) AS staking_apr,\n era,\n DATE_FORMAT(ts, '%Y-%m-%d') AS era_ts\nFROM\n dune.substrate.result_polkadot_validators\nWHERE\n validator_is_active = TRUE\n AND validator_commission <> 1\nGROUP BY\n era,\n ts\nHAVING\n AVG(validator_normalized_staking_apr) > 0\nORDER BY\n era DESC;\n"})}),"\n",(0,a.jsx)(n.p,{children:"Query result:"}),"\n",(0,a.jsx)("iframe",{src:"https://dune.com/embeds/3303109/5531719/",height:"350",width:"100%"}),"\n",(0,a.jsx)(n.p,{children:"Visualized result:"}),"\n",(0,a.jsx)("iframe",{src:"https://dune.com/embeds/3303109/5531727/",height:"350",width:"100%"}),"\n",(0,a.jsx)(n.admonition,{title:"DuneSQL Reference",type:"info",children:(0,a.jsxs)(n.p,{children:["For more information on DuneSQL, please refer to the ",(0,a.jsx)(n.a,{href:"/docs/general/dunesql-cheatsheet",children:"DuneSQL Cheatsheet"}),"\nand\n",(0,a.jsx)(n.a,{href:"https://docs.dune.com/query-engine/Functions-and-operators/index",children:"DuneSQL Official Documentation"}),"."]})})]})}function h(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(c,{...e})}):c(e)}},28453:(e,n,o)=>{o.d(n,{R:()=>r,x:()=>d});var s=o(96540);const a={},t=s.createContext(a);function r(e){const n=s.useContext(t);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:r(e.components),s.createElement(t.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/c78e4f7d.e7e0dbd3.js b/assets/js/c78e4f7d.e7e0dbd3.js deleted file mode 100644 index 3b527af314cb..000000000000 --- a/assets/js/c78e4f7d.e7e0dbd3.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1335],{39363:(e,n,o)=>{o.r(n),o.d(n,{assets:()=>i,contentTitle:()=>r,default:()=>h,frontMatter:()=>t,metadata:()=>d,toc:()=>l});var s=o(74848),a=o(28453);const t={id:"polkadot-dashboards-overview",title:"Polkadot Dashboards Overview",sidebar_label:"Overview",description:"The starting point for exploring Polkadot dashboards on Dune Analytics.",keywords:["polkadot","dashboard","dune","governance","staking","NFT"],slug:"../polkadot-dashboards-overview"},r="Polkadot Dashboards Overview",d={id:"general/dune-analytics/polkadot-dashboards/polkadot-dashboards-overview",title:"Polkadot Dashboards Overview",description:"The starting point for exploring Polkadot dashboards on Dune Analytics.",source:"@site/../docs/general/dune-analytics/polkadot-dashboards/polkadot-dashboards-overview.md",sourceDirName:"general/dune-analytics/polkadot-dashboards",slug:"/general/dune-analytics/polkadot-dashboards-overview",permalink:"/docs/general/dune-analytics/polkadot-dashboards-overview",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/polkadot-dashboards/polkadot-dashboards-overview.md",tags:[],version:"current",lastUpdatedBy:"MK",lastUpdatedAt:1719215716e3,frontMatter:{id:"polkadot-dashboards-overview",title:"Polkadot Dashboards Overview",sidebar_label:"Overview",description:"The starting point for exploring Polkadot dashboards on Dune Analytics.",keywords:["polkadot","dashboard","dune","governance","staking","NFT"],slug:"../polkadot-dashboards-overview"},sidebar:"docs",previous:{title:"Polkadot Dashboards",permalink:"/docs/general/dune-analytics/polkadot-dashboards"},next:{title:"Governance",permalink:"/docs/general/dune-analytics/polkadot-dashboards-governance"}},i={},l=[{value:"Featured Dashboards on Dune",id:"featured-dashboards-on-dune",level:2},{value:"Governance",id:"governance",level:3},{value:"Staking",id:"staking",level:3},{value:"Miscellaneous",id:"miscellaneous",level:3},{value:"Key Tables",id:"key-tables",level:2},{value:"Useful Queries",id:"useful-queries",level:2},{value:"Getting Started with Queries",id:"getting-started-with-queries",level:2}];function c(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,a.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"polkadot-dashboards-overview",children:"Polkadot Dashboards Overview"})}),"\n",(0,s.jsx)(n.p,{children:"Polkadot is a flagship project by Web3 Foundation, designed to enable a completely decentralized web\nwhere users are in control. It is a sharded multichain network, meaning it can process many\ntransactions on several chains in parallel, improving scalability."}),"\n",(0,s.jsx)(n.h2,{id:"featured-dashboards-on-dune",children:"Featured Dashboards on Dune"}),"\n",(0,s.jsx)(n.p,{children:"Here you'll find a variety of dashboards that help visualize data from the Polkadot network:"}),"\n",(0,s.jsx)(n.h3,{id:"governance",children:"Governance"}),"\n",(0,s.jsx)(n.p,{children:"Explore Polkadot's governance through dashboards detailing proposal submissions, referenda outcomes,\nand voting behaviors. These tools highlight the decentralized decision-making process and its\nefficacy."}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"https://dune.com/substrate/polkadot-gov",children:"Polkadot Governance Dashboard"}),": The ",(0,s.jsx)(n.em,{children:"Polkadot Governance\nDashboard"})," provides a clear and concise representation of the\n",(0,s.jsx)(n.a,{href:"https://wiki.polkadot.network/docs/en/learn-governance",children:"network's governance"})," activities. It\nserves as a useful tool for community members to observe\n",(0,s.jsx)(n.a,{href:"https://wiki.polkadot.network/docs/en/learn-treasury",children:"treasury management"}),",\n",(0,s.jsx)(n.a,{href:"https://wiki.polkadot.network/docs/en/learn-governance#referenda",children:"referendum outcomes"}),", and\nvoting patterns. This dashboard aims to enhance community engagement by simplifying access to\ngovernance information and fostering a transparent decision-making environment."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"https://dune.com/substrate/polkadot-opengov-active-referenda",children:"Polkadot OpenGov Referenda - Home"}),":\nThis dashboard is designed for those who wish to vote, allowing them to quickly understand the\ncurrent trend in Polkadot OpenGov and proceed to vote on\n",(0,s.jsx)(n.a,{href:"https://polkadot.polkassembly.io/opengov",children:"Polkassembly"}),". If you want to see more details of each\nreferendum, please check\n",(0,s.jsx)(n.a,{href:"https://dune.com/substrate/polkadot-referendum",children:"Polkadot Opengov - Referendum Voting Analysis"}),"."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"https://dune.com/substrate/polkadot-referendum",children:"Polkadot Opengov - Referendum Voting Analysis"}),":\nDetailed insights into the referendum voting process and outcomes."]}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"staking",children:"Staking"}),"\n",(0,s.jsxs)(n.p,{children:["Dive into the staking ecosystem with dashboards that analyze validator performance, nominator\ncontributions, and staking distributions. For a deeper understanding of Polkadot's staking mechanism\nand to optimize your staking strategies, visit the\n",(0,s.jsx)(n.a,{href:"https://wiki.polkadot.network/docs/learn-staking",children:"official staking mechanism documentation"})," and the\n",(0,s.jsx)(n.a,{href:"https://wiki.polkadot.network/docs/staking-dashboard",children:"staking web app documentation"}),"."]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"https://dune.com/substrate/polkadot-staking",children:"Polkadot Staking Dashboard"}),": Overview of staking\ndynamics and distribution across the network."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"https://dune.com/substrate/polkadot-staking-validators",children:"Polkadot Staking Dashboard (Validators) \ud83d\udcb0"}),":\nAnalyze validator performance and statistics."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"https://dune.com/substrate/polkadot-staking-nominators",children:"Polkadot Staking Dashboard (Nominators) \ud83d\udcb0"}),":\nInsights into nominator contributions and rewards."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"https://dune.com/substrate/polkadot-staking-pool-member",children:"Polkadot Staking Dashboard (Pool Member) \ud83d\udcb0"}),":\nData on staking pools and individual member activity."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"https://dune.com/substrate/polkadot-staking-nomination-pool",children:"Polkadot Staking Dashboard (Nomination Pool) \ud83d\udcb0"}),":\nDetailed view of nomination pools and their performance."]}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"miscellaneous",children:"Miscellaneous"}),"\n",(0,s.jsx)(n.p,{children:"Discover diverse aspects of Polkadot through Miscellaneous dashboards, which provide insights into\nDOT ordinals and other unique network activities. Ideal for uncovering trends in the broader\necosystem."}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"https://dune.com/substrate/dot-ordinals",children:"DOT Ordinals"}),": Examination of DOT ordinal metrics and\ntrends."]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"key-tables",children:"Key Tables"}),"\n",(0,s.jsx)(n.p,{children:"Data from the Polkadot network is organized into several key tables:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"polkadot.balances"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"polkadot.blocks"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"polkadot.calls"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"polkadot.events"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"polkadot.extrinsics"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"polkadot.transfers"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"polkadot.traces"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"polkadot.stakings"})}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["Start building your own queries using granular data on Dune\n",(0,s.jsx)(n.a,{href:"https://dune.com/queries?category=canonical&namespace=polkadot",children:"here"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"useful-queries",children:"Useful Queries"}),"\n",(0,s.jsxs)(n.p,{children:["Here are ",(0,s.jsx)(n.strong,{children:"materialized"})," queries for Polkadot that may be useful to build your own charts:"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"https://dune.com/queries/3394422",children:"Polkadot Referenda Total Voting Power"}),"\n(",(0,s.jsx)(n.code,{children:"dune.substrate.result_polkadot_referenda_total_voting_power"}),")"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"https://dune.com/queries/3426963",children:"Polkadot Staking Nomination Total"}),"\n(",(0,s.jsx)(n.code,{children:"dune.substrate.result_polkadot_staking_nomination_total"}),")"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"https://dune.com/queries/3393179",children:"Polkadot OpenGov Delegation"}),"\n(",(0,s.jsx)(n.code,{children:"dune.substrate.result_polkadot_open_gov_delegation"}),")"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"https://dune.com/queries/3415321",children:"Polkadot Vote Record"}),"\n(",(0,s.jsx)(n.code,{children:"dune.substrate.result_polkadot_vote_record"}),")"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"https://dune.com/queries/3394156",children:"Polkadot Proposals proposed"}),"\n(",(0,s.jsx)(n.code,{children:"dune.substrate.result_polkadot_proposals_proposed"}),")"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"https://dune.com/queries/3391225",children:"Polkadot Referenda Direct Vote"}),"\n(",(0,s.jsx)(n.code,{children:"dune.substrate.result_polkadot_referenda_direct_vote"}),")"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"https://dune.com/queries/3393684",children:"Polkadot Each Vote Record"}),"(",(0,s.jsx)(n.code,{children:"dune.substrate.result_polkadot_each_vote_record"}),")"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"https://dune.com/queries/3399352",children:"Polkdaot Referenda Origin Map"}),"(",(0,s.jsx)(n.code,{children:"dune.substrate.result_polkdaot_referenda_origin_map"}),")"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"https://dune.com/queries/3457139",children:"Polkadot Failed calls in batch"}),"(",(0,s.jsx)(n.code,{children:"dune.substrate.result_polkadot_failed_calls_in_batch"}),")"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"https://dune.com/queries/3302709",children:"polkadot_validator"}),"\n(",(0,s.jsx)(n.code,{children:"dune.substrate.result_polkadot_validators"}),")"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"https://dune.com/queries/3327350",children:"polkadot_nominationpools"}),"\n(",(0,s.jsx)(n.code,{children:"dune.substrate.result_polkadot_nominationpools"}),")"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"https://dune.com/queries/3326829",children:"polkadot_nominators"}),"\n(",(0,s.jsx)(n.code,{children:"dune.substrate.result_polkadot_nominators"}),")"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"https://dune.com/queries/3327479",children:"polkadot_poolmembers"}),"\n(",(0,s.jsx)(n.code,{children:"dune.substrate.result_polkadot_poolmembers"}),")"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"https://dune.com/queries/3420617",children:"polkadot_identity"})," (",(0,s.jsx)(n.code,{children:"dune.substrate.result_polkadot_identity"}),")"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"getting-started-with-queries",children:"Getting Started with Queries"}),"\n",(0,s.jsx)(n.p,{children:"To get started with querying data from Unique, you are welcome to use the mentioned materialized\nqueries. You can use the following DuneSQL queries as examples:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-sql",metastring:'title="Polkadot Staking APR (Normalized)" showLineNumbers',children:"SELECT\n AVG(validator_normalized_staking_apr) AS staking_apr,\n era,\n DATE_FORMAT(ts, '%Y-%m-%d') AS era_ts\nFROM\n dune.substrate.result_polkadot_validators\nWHERE\n validator_is_active = TRUE\n AND validator_commission <> 1\nGROUP BY\n era,\n ts\nHAVING\n AVG(validator_normalized_staking_apr) > 0\nORDER BY\n era DESC;\n"})}),"\n",(0,s.jsx)(n.p,{children:"Query result:"}),"\n",(0,s.jsx)("iframe",{src:"https://dune.com/embeds/3303109/5531719/",height:"350",width:"100%"}),"\n",(0,s.jsx)(n.p,{children:"Visualized result:"}),"\n",(0,s.jsx)("iframe",{src:"https://dune.com/embeds/3303109/5531727/",height:"350",width:"100%"}),"\n",(0,s.jsx)(n.admonition,{title:"DuneSQL Reference",type:"info",children:(0,s.jsxs)(n.p,{children:["For more information on DuneSQL, please refer to the ",(0,s.jsx)(n.a,{href:"/docs/general/dunesql-cheatsheet",children:"DuneSQL Cheatsheet"}),"\nand\n",(0,s.jsx)(n.a,{href:"https://docs.dune.com/query-engine/Functions-and-operators/index",children:"DuneSQL Official Documentation"}),"."]})})]})}function h(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(c,{...e})}):c(e)}},28453:(e,n,o)=>{o.d(n,{R:()=>r,x:()=>d});var s=o(96540);const a={},t=s.createContext(a);function r(e){const n=s.useContext(t);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:r(e.components),s.createElement(t.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/c7a044bb.ac5c6787.js b/assets/js/c7a044bb.ac5c6787.js new file mode 100644 index 000000000000..4776c93e6fcc --- /dev/null +++ b/assets/js/c7a044bb.ac5c6787.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9110],{31189:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>o,contentTitle:()=>c,default:()=>d,frontMatter:()=>r,metadata:()=>t,toc:()=>h});const t=JSON.parse('{"id":"learn/xcm/journey/learn-xcm-docs-journey-channels","title":"Channels and Bridges","description":"Establishment of HRMP Channels between Parachains.","source":"@site/../docs/learn/xcm/journey/channels-and-bridges.md","sourceDirName":"learn/xcm/journey","slug":"/learn/xcm/journey-channels","permalink":"/docs/learn/xcm/journey-channels","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/xcm/journey/channels-and-bridges.md","tags":[],"version":"current","lastUpdatedBy":"bader y","lastUpdatedAt":1694099593000,"frontMatter":{"id":"learn-xcm-docs-journey-channels","title":"Channels and Bridges","sidebar_label":"Channels and Bridges","description":"Establishment of HRMP Channels between Parachains.","keywords":["xcm","cross-consensus messaging","channels","bridges"],"slug":"../journey-channels"},"sidebar":"docs","previous":{"title":"Locks","permalink":"/docs/learn/xcm/journey-locks"},"next":{"title":"Executor Configuration","permalink":"/docs/learn/xcm/config-deep-dive"}}');var a=s(74848),i=s(28453);const r={id:"learn-xcm-docs-journey-channels",title:"Channels and Bridges",sidebar_label:"Channels and Bridges",description:"Establishment of HRMP Channels between Parachains.",keywords:["xcm","cross-consensus messaging","channels","bridges"],slug:"../journey-channels"},c="Channels",o={},h=[{value:"HrmpNewChannelOpenRequest",id:"hrmpnewchannelopenrequest",level:2},{value:"HrmpChannelAccepted",id:"hrmpchannelaccepted",level:2},{value:"HrmpChannelClosing",id:"hrmpchannelclosing",level:2},{value:"ExportMessage",id:"exportmessage",level:2}];function l(e){const n={code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,i.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.header,{children:(0,a.jsx)(n.h1,{id:"channels",children:"Channels"})}),"\n",(0,a.jsx)(n.p,{children:"XCM has instructions that aid in the establishment of a HRMP channel between parachains. HRMP\nchannels are always unidirectional (one-way); every channel has a static sender and a static\nrecipient. To send messages in the opposite direction (i.e. from recipient to sender), another new\nHRMP channel must be opened. Unlike other XCM instructions, these HRMP instructions are related to\nthe underlying transport mechanism, and will normally not be sent by developers. We still want to\nlist them, as they are part of XCM:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.code,{children:"HrmpNewChannelOpenRequest"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.code,{children:"HrmpChannelAccepted"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.code,{children:"HrmpChannelClosing"})}),"\n"]}),"\n",(0,a.jsx)(n.h2,{id:"hrmpnewchannelopenrequest",children:"HrmpNewChannelOpenRequest"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-rust",children:"HrmpNewChannelOpenRequest {\n #[codec(compact)]\n sender: u32,\n #[codec(compact)]\n max_message_size: u32,\n #[codec(compact)]\n max_capacity: u32,\n}\n"})}),"\n",(0,a.jsxs)(n.p,{children:["The ",(0,a.jsx)(n.code,{children:"HrmpNewChannelOpenRequest"})," is an instruction to notify about a new incoming HRMP channel. This\nmessage is meant to be sent by the relay chain to a parachain."]}),"\n",(0,a.jsxs)(n.p,{children:["The ",(0,a.jsx)(n.code,{children:"sender"})," field represents the ParaId of the parachain initializing the channel. This parachain\nwill also be the sender in the to-be opened channel."]}),"\n",(0,a.jsxs)(n.p,{children:["The ",(0,a.jsx)(n.code,{children:"max_message_size"})," field is the maximum size of a message that is send through the channel. This\nfield is the size proposed by the sender, and needs to be accepted by the recipient."]}),"\n",(0,a.jsxs)(n.p,{children:["The ",(0,a.jsx)(n.code,{children:"max_capacity"})," is the maximum number of messages that can be queued in the channel."]}),"\n",(0,a.jsx)(n.h2,{id:"hrmpchannelaccepted",children:"HrmpChannelAccepted"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-rust",children:"HrmpChannelAccepted {\n #[codec(compact)]\n recipient: u32,\n}\n"})}),"\n",(0,a.jsxs)(n.p,{children:["The ",(0,a.jsx)(n.code,{children:"HrmpChannelAccepted"})," instruction is used to notify about that a previously sent open channel\nrequest has been accepted by the recipient. That means that the channel will be opened during the\nnext relay chain session change. This message is meant to be sent by the relay chain to a parachain."]}),"\n",(0,a.jsxs)(n.p,{children:["The ",(0,a.jsx)(n.code,{children:"recipient"})," field represents the ParaId of the parachain that initialized the channel, so it\nequals the ",(0,a.jsx)(n.code,{children:"sender"})," field in the preceding ",(0,a.jsx)(n.code,{children:"HrmpNewChannelOpenRequest"})," instruction."]}),"\n",(0,a.jsx)(n.h2,{id:"hrmpchannelclosing",children:"HrmpChannelClosing"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-rust",children:"HrmpChannelClosing {\n #[codec(compact)]\n initiator: u32,\n #[codec(compact)]\n sender: u32,\n #[codec(compact)]\n recipient: u32,\n}\n"})}),"\n",(0,a.jsxs)(n.p,{children:["The ",(0,a.jsx)(n.code,{children:"HrmpChannelClosing"})," instruction is used to notify that the other party in an open channel\ndecided to close it. In particular, ",(0,a.jsx)(n.code,{children:"initiator"})," is going to close the channel opened from ",(0,a.jsx)(n.code,{children:"sender"}),"\nto the ",(0,a.jsx)(n.code,{children:"recipient"}),". The close will be enacted at the next relay chain session change. This message\nis meant to be sent by the relay chain to a para."]}),"\n",(0,a.jsxs)(n.p,{children:["The ",(0,a.jsx)(n.code,{children:"initiator"})," field represents the ParaId of the parachain that is closing the channel. It is\nequal to either the ",(0,a.jsx)(n.code,{children:"sender"})," or ",(0,a.jsx)(n.code,{children:"recipient"})," field."]}),"\n",(0,a.jsxs)(n.p,{children:["The ",(0,a.jsx)(n.code,{children:"sender"})," field represents the ParaId of the parachain that is the sender side of the channel."]}),"\n",(0,a.jsxs)(n.p,{children:["The ",(0,a.jsx)(n.code,{children:"recipient"})," field represents the ParaId of the parachain that is the recipient side of the\nchannel."]}),"\n",(0,a.jsx)(n.p,{children:"Important to note is that both the sender and recipient can close the channel."}),"\n",(0,a.jsx)(n.h1,{id:"message-export-bridging",children:"Message Export (Bridging)"}),"\n",(0,a.jsxs)(n.p,{children:["XCM has an instruction that allows us to send an XCM to a Non-Local Consensus System, meaning to\nMultiLocation that is outside our current GlobalConsensus. For example, it allows us to send an XCM\nfrom Kusama to Polkadot or from Polkadot to an Ethereum-based chain. Exporting an XCM to another\nNon-Local Consensus System will tend to utilize some extra consensus layer/mechanism, the obvious\none being a bridge. The instruction to export an XCM is called ",(0,a.jsx)(n.code,{children:"ExportMessage"}),"."]}),"\n",(0,a.jsx)(n.h2,{id:"exportmessage",children:"ExportMessage"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-rust",children:"ExportMessage { network: NetworkId, destination: InteriorMultiLocation, xcm: Xcm<()> },\n"})}),"\n",(0,a.jsxs)(n.p,{children:["The ",(0,a.jsx)(n.code,{children:"ExportMessage"})," instruction can be used to export a message to a Non-Local Consensus System. The\nmessage is sent to the bridge (or other consensus mechanism) that is able to export the message. A\nfee is charged for exporting the message via the bridge."]}),"\n",(0,a.jsxs)(n.p,{children:["The ",(0,a.jsx)(n.code,{children:"network"})," field is the remote consensus system to which the message should be exported."]}),"\n",(0,a.jsxs)(n.p,{children:["The ",(0,a.jsx)(n.code,{children:"destination"})," field is the location relative to the remote consensus system to which the message\nshould be sent on arrival."]}),"\n",(0,a.jsxs)(n.p,{children:["The ",(0,a.jsx)(n.code,{children:"xcm"})," field is the message to be exported."]}),"\n",(0,a.jsxs)(n.p,{children:["As an example, to export a message for execution on Statemine (parachain ",(0,a.jsx)(n.code,{children:"#1000"})," in the Kusama\nnetwork), you would call with ",(0,a.jsx)(n.code,{children:"network: NetworkId::Kusama"})," and ",(0,a.jsx)(n.code,{children:"destination: X1(Parachain(1000))"}),".\nAlternatively, to export a message for execution on Polkadot, you would call with\n",(0,a.jsx)(n.code,{children:"network: NetworkId:: Polkadot"})," and ",(0,a.jsx)(n.code,{children:"destination: Here"}),"."]})]})}function d(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(l,{...e})}):l(e)}},28453:(e,n,s)=>{s.d(n,{R:()=>r,x:()=>c});var t=s(96540);const a={},i=t.createContext(a);function r(e){const n=t.useContext(i);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:r(e.components),t.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/c7a044bb.d7dc01c3.js b/assets/js/c7a044bb.d7dc01c3.js deleted file mode 100644 index 2d455218e8cd..000000000000 --- a/assets/js/c7a044bb.d7dc01c3.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9110],{24225:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>o,contentTitle:()=>r,default:()=>d,frontMatter:()=>i,metadata:()=>c,toc:()=>h});var t=s(74848),a=s(28453);const i={id:"learn-xcm-docs-journey-channels",title:"Channels and Bridges",sidebar_label:"Channels and Bridges",description:"Establishment of HRMP Channels between Parachains.",keywords:["xcm","cross-consensus messaging","channels","bridges"],slug:"../journey-channels"},r="Channels",c={id:"learn/xcm/journey/learn-xcm-docs-journey-channels",title:"Channels and Bridges",description:"Establishment of HRMP Channels between Parachains.",source:"@site/../docs/learn/xcm/journey/channels-and-bridges.md",sourceDirName:"learn/xcm/journey",slug:"/learn/xcm/journey-channels",permalink:"/docs/learn/xcm/journey-channels",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/xcm/journey/channels-and-bridges.md",tags:[],version:"current",lastUpdatedBy:"bader y",lastUpdatedAt:1694099593e3,frontMatter:{id:"learn-xcm-docs-journey-channels",title:"Channels and Bridges",sidebar_label:"Channels and Bridges",description:"Establishment of HRMP Channels between Parachains.",keywords:["xcm","cross-consensus messaging","channels","bridges"],slug:"../journey-channels"},sidebar:"docs",previous:{title:"Locks",permalink:"/docs/learn/xcm/journey-locks"},next:{title:"Executor Configuration",permalink:"/docs/learn/xcm/config-deep-dive"}},o={},h=[{value:"HrmpNewChannelOpenRequest",id:"hrmpnewchannelopenrequest",level:2},{value:"HrmpChannelAccepted",id:"hrmpchannelaccepted",level:2},{value:"HrmpChannelClosing",id:"hrmpchannelclosing",level:2},{value:"ExportMessage",id:"exportmessage",level:2}];function l(e){const n={code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,a.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.header,{children:(0,t.jsx)(n.h1,{id:"channels",children:"Channels"})}),"\n",(0,t.jsx)(n.p,{children:"XCM has instructions that aid in the establishment of a HRMP channel between parachains. HRMP\nchannels are always unidirectional (one-way); every channel has a static sender and a static\nrecipient. To send messages in the opposite direction (i.e. from recipient to sender), another new\nHRMP channel must be opened. Unlike other XCM instructions, these HRMP instructions are related to\nthe underlying transport mechanism, and will normally not be sent by developers. We still want to\nlist them, as they are part of XCM:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"HrmpNewChannelOpenRequest"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"HrmpChannelAccepted"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"HrmpChannelClosing"})}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"hrmpnewchannelopenrequest",children:"HrmpNewChannelOpenRequest"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-rust",children:"HrmpNewChannelOpenRequest {\n #[codec(compact)]\n sender: u32,\n #[codec(compact)]\n max_message_size: u32,\n #[codec(compact)]\n max_capacity: u32,\n}\n"})}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"HrmpNewChannelOpenRequest"})," is an instruction to notify about a new incoming HRMP channel. This\nmessage is meant to be sent by the relay chain to a parachain."]}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"sender"})," field represents the ParaId of the parachain initializing the channel. This parachain\nwill also be the sender in the to-be opened channel."]}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"max_message_size"})," field is the maximum size of a message that is send through the channel. This\nfield is the size proposed by the sender, and needs to be accepted by the recipient."]}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"max_capacity"})," is the maximum number of messages that can be queued in the channel."]}),"\n",(0,t.jsx)(n.h2,{id:"hrmpchannelaccepted",children:"HrmpChannelAccepted"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-rust",children:"HrmpChannelAccepted {\n #[codec(compact)]\n recipient: u32,\n}\n"})}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"HrmpChannelAccepted"})," instruction is used to notify about that a previously sent open channel\nrequest has been accepted by the recipient. That means that the channel will be opened during the\nnext relay chain session change. This message is meant to be sent by the relay chain to a parachain."]}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"recipient"})," field represents the ParaId of the parachain that initialized the channel, so it\nequals the ",(0,t.jsx)(n.code,{children:"sender"})," field in the preceding ",(0,t.jsx)(n.code,{children:"HrmpNewChannelOpenRequest"})," instruction."]}),"\n",(0,t.jsx)(n.h2,{id:"hrmpchannelclosing",children:"HrmpChannelClosing"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-rust",children:"HrmpChannelClosing {\n #[codec(compact)]\n initiator: u32,\n #[codec(compact)]\n sender: u32,\n #[codec(compact)]\n recipient: u32,\n}\n"})}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"HrmpChannelClosing"})," instruction is used to notify that the other party in an open channel\ndecided to close it. In particular, ",(0,t.jsx)(n.code,{children:"initiator"})," is going to close the channel opened from ",(0,t.jsx)(n.code,{children:"sender"}),"\nto the ",(0,t.jsx)(n.code,{children:"recipient"}),". The close will be enacted at the next relay chain session change. This message\nis meant to be sent by the relay chain to a para."]}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"initiator"})," field represents the ParaId of the parachain that is closing the channel. It is\nequal to either the ",(0,t.jsx)(n.code,{children:"sender"})," or ",(0,t.jsx)(n.code,{children:"recipient"})," field."]}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"sender"})," field represents the ParaId of the parachain that is the sender side of the channel."]}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"recipient"})," field represents the ParaId of the parachain that is the recipient side of the\nchannel."]}),"\n",(0,t.jsx)(n.p,{children:"Important to note is that both the sender and recipient can close the channel."}),"\n",(0,t.jsx)(n.h1,{id:"message-export-bridging",children:"Message Export (Bridging)"}),"\n",(0,t.jsxs)(n.p,{children:["XCM has an instruction that allows us to send an XCM to a Non-Local Consensus System, meaning to\nMultiLocation that is outside our current GlobalConsensus. For example, it allows us to send an XCM\nfrom Kusama to Polkadot or from Polkadot to an Ethereum-based chain. Exporting an XCM to another\nNon-Local Consensus System will tend to utilize some extra consensus layer/mechanism, the obvious\none being a bridge. The instruction to export an XCM is called ",(0,t.jsx)(n.code,{children:"ExportMessage"}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"exportmessage",children:"ExportMessage"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-rust",children:"ExportMessage { network: NetworkId, destination: InteriorMultiLocation, xcm: Xcm<()> },\n"})}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"ExportMessage"})," instruction can be used to export a message to a Non-Local Consensus System. The\nmessage is sent to the bridge (or other consensus mechanism) that is able to export the message. A\nfee is charged for exporting the message via the bridge."]}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"network"})," field is the remote consensus system to which the message should be exported."]}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"destination"})," field is the location relative to the remote consensus system to which the message\nshould be sent on arrival."]}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"xcm"})," field is the message to be exported."]}),"\n",(0,t.jsxs)(n.p,{children:["As an example, to export a message for execution on Statemine (parachain ",(0,t.jsx)(n.code,{children:"#1000"})," in the Kusama\nnetwork), you would call with ",(0,t.jsx)(n.code,{children:"network: NetworkId::Kusama"})," and ",(0,t.jsx)(n.code,{children:"destination: X1(Parachain(1000))"}),".\nAlternatively, to export a message for execution on Polkadot, you would call with\n",(0,t.jsx)(n.code,{children:"network: NetworkId:: Polkadot"})," and ",(0,t.jsx)(n.code,{children:"destination: Here"}),"."]})]})}function d(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(l,{...e})}):l(e)}},28453:(e,n,s)=>{s.d(n,{R:()=>r,x:()=>c});var t=s(96540);const a={},i=t.createContext(a);function r(e){const n=t.useContext(i);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:r(e.components),t.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/c7a2145e.07a5a9bd.js b/assets/js/c7a2145e.07a5a9bd.js new file mode 100644 index 000000000000..50da318c3f4d --- /dev/null +++ b/assets/js/c7a2145e.07a5a9bd.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6277],{40319:(e,t,o)=>{o.r(t),o.d(t,{assets:()=>h,contentTitle:()=>r,default:()=>d,frontMatter:()=>s,metadata:()=>n,toc:()=>l});const n=JSON.parse('{"id":"general/how-to-dyor","title":"How to Do Your Own Research (DYOR)","description":"Importance of Doing Your Own Research (DYOR).","source":"@site/../docs/general/how-to-dyor.md","sourceDirName":"general","slug":"/how-to-dyor","permalink":"/docs/how-to-dyor","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/how-to-dyor.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1727943421000,"frontMatter":{"id":"how-to-dyor","title":"How to Do Your Own Research (DYOR)","sidebar_label":"Do Your Own Research","description":"Importance of Doing Your Own Research (DYOR).","keywords":["dyor","research","scams","protect"],"slug":"../how-to-dyor"},"sidebar":"docs","previous":{"title":"Stay Safe","permalink":"/docs/stay-safe-index"},"next":{"title":"Scam Protection","permalink":"/docs/learn-scams"}}');var i=o(74848),a=o(28453);const s={id:"how-to-dyor",title:"How to Do Your Own Research (DYOR)",sidebar_label:"Do Your Own Research",description:"Importance of Doing Your Own Research (DYOR).",keywords:["dyor","research","scams","protect"],slug:"../how-to-dyor"},r=void 0,h={},l=[{value:"Powered by Polkadot or Polka prefix clarification",id:"powered-by-polkadot-or-polka-prefix-clarification",level:2},{value:"Hard metrics to look for when you DYOR",id:"hard-metrics-to-look-for-when-you-dyor",level:2},{value:"Association with Entities You Trust",id:"association-with-entities-you-trust",level:3},{value:"Open Source",id:"open-source",level:3},{value:"Active Development",id:"active-development",level:3},{value:"Comprehensive Documentation",id:"comprehensive-documentation",level:3},{value:"Reputable Team",id:"reputable-team",level:3},{value:"Clear Integration",id:"clear-integration",level:3},{value:"Soft metrics",id:"soft-metrics",level:2},{value:"Site Quality",id:"site-quality",level:3},{value:"Social Media Presence",id:"social-media-presence",level:3},{value:"Media Presence",id:"media-presence",level:3},{value:"Email Communication",id:"email-communication",level:3},{value:"Additional material",id:"additional-material",level:3},{value:"One last piece of advice",id:"one-last-piece-of-advice",level:3}];function c(e){const t={a:"a",em:"em",h2:"h2",h3:"h3",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,a.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.p,{children:"Many projects are being built, or intend to build, on both Polkadot and Kusama. However, many claim\nto do so but have either no such intention, they do not have the resources to pull it through, or\nthey are outright trying to scam people by misusing the Polkadot and Kusama brands."}),"\n",(0,i.jsxs)(t.p,{children:["Distinguishing legitimate projects from the dishonest ones is not always an easy task. This guide is\nmeant to help you find out how to do your research better when you come across a project that seems\ninteresting. What it's ",(0,i.jsx)(t.strong,{children:"not"})," meant to do, is label any single project as legitimate or not, or\nmake that decision for you."]}),"\n",(0,i.jsxs)(t.p,{children:["Furthermore, a legitimate project does not necessarily mean it will also be successful, and ",(0,i.jsx)(t.strong,{children:"this\nguide is not meant to be viewed as financial or investment advice."})]}),"\n",(0,i.jsxs)(t.h2,{id:"powered-by-polkadot-or-polka-prefix-clarification",children:[(0,i.jsx)(t.em,{children:"Powered by Polkadot"})," or ",(0,i.jsx)(t.em,{children:"Polka"})," prefix clarification"]}),"\n",(0,i.jsxs)(t.p,{children:['The statement "Powered by Polkadot" on many projects\' sites is often a cause of confusion. This\nusually means that the project is building, or intends to build, on the Polkadot ecosystem, using\n',(0,i.jsx)(t.a,{href:"https://substrate.io",children:"Substrate"}),". But any project can claim that, so the existence of this\nstatement on a project's site infers no information about the project's legitimacy, and it's\ncertainly not a \"seal of approval\" by Web3 Foundation."]}),"\n",(0,i.jsx)(t.p,{children:'This also applies for projects with a "Polka" prefix in their name. Many projects use that to\nassociate themselves with the ecosystem, some legitimately and others only to piggyback on\nPolkadot\'s reputation.'}),"\n",(0,i.jsxs)(t.h2,{id:"hard-metrics-to-look-for-when-you-dyor",children:[(0,i.jsx)(t.em,{children:"Hard"})," metrics to look for when you DYOR"]}),"\n",(0,i.jsx)(t.h3,{id:"association-with-entities-you-trust",children:"Association with Entities You Trust"}),"\n",(0,i.jsx)(t.p,{children:'New projects usually try to increase their credibility by associating themselves with well-known\nentities. The thinking is simple: "These entities that have a good reputation trust us, so if you\ntrust them, by association, you should trust us too". Indeed, association with a trusted entity can\nbe a strong indicator of the legitimacy of a project.'}),"\n",(0,i.jsxs)(t.p,{children:["For example, if a project had received a ",(0,i.jsx)(t.a,{href:"https://grants.web3.foundation",children:"Web3 Foundation Grant"}),",\nthis is an indication that the project is indeed building on the Polkadot ecosystem, and if they\nhave delivered all of their milestones, then their code is most likely of reasonable quality."]}),"\n",(0,i.jsx)(t.p,{children:"Furthermore, Web3 Foundation is not the only entity in the ecosystem that provides grants. Other\nreputable teams in the ecosystem that have developed platforms or prospective parachains provide\ngrants for projects to build on or expand their project. These are also indicators that a project is\ncommitted to building on the broader Polkadot ecosystem."}),"\n",(0,i.jsxs)(t.p,{children:["Receiving funding from reputable VCs and are known to be involved with other reputable Polkadot\nprojects can also be a good indicator. Or participating in the\n",(0,i.jsx)(t.a,{href:"https://polkadot.network/development/alpha/",children:"Polkadot Alpha Program"}),"."]}),"\n",(0,i.jsxs)(t.p,{children:[(0,i.jsx)(t.strong,{children:"However"}),", claiming such associations and having them is not always the same thing. ",(0,i.jsx)(t.strong,{children:"You always\nneed to verify any claims a project makes"}),", and that is probably the most critical takeaway from\nthis guide."]}),"\n",(0,i.jsxs)(t.p,{children:["For example, if a project has the\n",(0,i.jsx)(t.a,{href:"https://grants.web3.foundation/docs/Support%20Docs/grant-badge-guidelines",children:"Web3 Foundation Grant badge"}),"\non their site or claims to have received a grant, check to see if they have received one and that it\nhas not been terminated. The complete list of projects that have successfully applied for a grant\ncan be found ",(0,i.jsx)(t.a,{href:"https://grants.web3.foundation/applications",children:"here"}),", where you can see what each\nproject has delivered and if, perhaps, their grant has been terminated."]}),"\n",(0,i.jsx)(t.p,{children:"The same thing goes for VC funding or another grant, or any advertised association for that matter.\nCheck on the corresponding sites to make sure such claims are valid."}),"\n",(0,i.jsxs)(t.p,{children:["Also, make sure you understand the ",(0,i.jsx)(t.em,{children:"scope"})," of the association. Going back to the Web3 grants\nexample, they have a precise scope. They are granted for specific deliverables, and the review team\nonly checks the code and evaluates these deliverables ",(0,i.jsx)(t.em,{children:"of the particular project"}),". So, having\nreceived a Web3 grant provides no information about the general practices of a team, the longevity\nof the project besides the scope of the grant, or other projects the team might be building, which\nis why the badge rules clearly state that it should not be displayed on the team's landing page."]}),"\n",(0,i.jsxs)(t.p,{children:["Similarly, if a project claims to have partnered with a reputable entity, verify its scope and if it\nis indeed a partnership by searching their site for projects they have partnered with, their press\nreleases, or by contacting them directly. And if you see such claims about Web3 Foundation, you can\nbe sure they're false because Web3 Foundation ",(0,i.jsx)(t.strong,{children:"does not"})," partner with, or endorse, ecosystem\nprojects."]}),"\n",(0,i.jsx)(t.h3,{id:"open-source",children:"Open Source"}),"\n",(0,i.jsx)(t.p,{children:"An open-source project promotes transparency, builds trust, and potentially ensures project team\nhonesty. Additionally, it makes it very easy to track the project's progress and see how active the\nteam is in developing it."}),"\n",(0,i.jsxs)(t.p,{children:["However, that does not mean that any closed source project is not legitimate or the team behind it\nhas something to hide. Many teams choose to keep their code private to protect their intellectual\nproperty. And several teams that do so have gotten a\n",(0,i.jsx)(t.a,{href:"https://github.com/w3f/General-Grants-Program",children:"General Grant"}),", under which members of the grants\nreview team review their private code."]}),"\n",(0,i.jsx)(t.p,{children:"Another thing that an open-source project allows you to see is if they have copied any code from\nother open sources. This isn't necessarily bad, since no one wants to re-invents the wheel, but\ncopied code should attribute to the source. If it doesn't, this should raise some red flags because\nthe project team tries to feign expertise by passing someone else's code as their own."}),"\n",(0,i.jsxs)(t.p,{children:["A forked repo is easy to spot since it points to the original repo, but partially copied code might\nnot be as easy to find. A quick\n",(0,i.jsx)(t.a,{href:"https://duckduckgo.com/?q=search+for+copied+source+code+plagiarism&t=ffab&ia=web",children:"search"})," can\nprovide you with some ways and tools to look for plagiarism."]}),"\n",(0,i.jsx)(t.p,{children:"So, a project being closed source is not necessarily a red flag. It just limits the ability to\nverify the project in that regard, but there are indirect ways as described below. However, a\nproject being open source is undoubtedly a potentially strong indicator of its legitimacy because\nshady or poor practices seldom stay hidden for long in open source code."}),"\n",(0,i.jsx)(t.h3,{id:"active-development",children:"Active Development"}),"\n",(0,i.jsx)(t.p,{children:"If a project team constantly updates their product, it is always a good indication that they are\nserious and passionate about building. Regularly releasing new features and upgrades, fixing bugs,\nupdating their site and notifying the community of these changes are good earmarks of a legitimate\nproject."}),"\n",(0,i.jsxs)(t.p,{children:["Additionally, active development ",(0,i.jsx)(t.em,{children:"usually"})," also means good development to be used as an ",(0,i.jsx)(t.em,{children:"indirect"}),"\nindicator for a closed source project."]}),"\n",(0,i.jsx)(t.p,{children:"An open-source project allows anyone to monitor the development activity through its code repository\ndirectly, such as through GitHub."}),"\n",(0,i.jsx)(t.h3,{id:"comprehensive-documentation",children:"Comprehensive Documentation"}),"\n",(0,i.jsx)(t.p,{children:"The existence of comprehensive documentation should be considered mandatory for any serious project.\nA couple of years ago, this meant a whitepaper, but lately, we have seen a shift to other forms of\ndocumentation, like wiki pages describing the various aspects."}),"\n",(0,i.jsx)(t.p,{children:"No matter the form of the documentation, its existence and completion is necessary, and the more\ndetailed it is, the better. This is where the details of the project or parts of the project are\nexplained in full for prospective investors or users."}),"\n",(0,i.jsx)(t.p,{children:"The documentation will also give you an idea of the technical expertise of the team. If the team\nanalyses their technology and technical aspects, this is a potential indication of technical\nprowess. On the other hand, if the team focuses only on tokenomics or analyses their project only in\nbroad, vague terms, this is potentially an indication that there is not a clear path to their goals."}),"\n",(0,i.jsxs)(t.p,{children:["If you are looking for an example of good documentation, look no further than our own\n",(0,i.jsx)(t.a,{href:"https://wiki.polkadot.network",children:"wiki"}),". Of course, you should not expect to find such extensive\ndocumentation on newly launched projects. Our wiki, after all, covers a whole ecosystem and was\npopulated over the course of multiple years. Updates are also constantly being pushed out and edits\nare consistently being made. Nevertheless, this wiki provides a good example of the documentation a\nlegitimate project should provide."]}),"\n",(0,i.jsx)(t.h3,{id:"reputable-team",children:"Reputable Team"}),"\n",(0,i.jsx)(t.p,{children:"Some teams display their team members prominently on their site, along with their social media\nprofiles (usually LinkedIn) and GitHub accounts. This gives prospective users and investors the\nability to verify the team's credentials, track records, and expertise."}),"\n",(0,i.jsxs)(t.p,{children:["But the keyword here is ",(0,i.jsx)(t.strong,{children:"verify"}),"! Do not take what you see on the project's team at face value.\nLook them up and verify their track record. Do a Google search for the team members mentioned. If it\ncomes up empty, or the only results are regarding the project you are researching, it is an\nindication that their team members are potentially fake. Their photos on their site, if there are\nany, may also be stock photos, or in other words, also fake. These are usually easily recognisable,\nbut here is a ",(0,i.jsx)(t.a,{href:"https://helpdeskgeek.com/how-to/free-reverse-image-search-tools/",children:"guide"})," on how to do\na reverse image search, if you want to be thorough."]}),"\n",(0,i.jsx)(t.p,{children:"In some other cases, some developers prefer to maintain their anonymity, using pseudonyms, or the\nteam members are not mentioned at all. This is not necessarily a bad thing. Perhaps the team is a\nstrong proponent of privacy, or they want their work to speak for itself. Still, you should try and\nfind out who is behind the project and what they are doing. For developers, their GitHub activity\nmay be a stronger indicator of honesty. Other team members might be heavily engaged in their\ncommunity, providing guidance and answers, which is always a good sign."}),"\n",(0,i.jsx)(t.p,{children:"But if the team are ghosts that do not show up anywhere and only engage with the community through\nproxies, this can be considered a red flag and extra precaution should be taken."}),"\n",(0,i.jsxs)(t.p,{children:["Besides their community, projects that are serious about building on Polkadot usually engage with\nthe ",(0,i.jsx)(t.a,{href:"/docs/community",children:"community"}),". They are active in the various\n",(0,i.jsx)(t.a,{href:"https://wiki.polkadot.network/docs/community/",children:"Polkadot and Kusama channels"}),", and some of them are\n",(0,i.jsx)(t.a,{href:"https://polkadot.network/polkadot-ambassador-program/",children:"Polkadot Ambassadors"}),", or generally\nprominent members of the ecosystem."]}),"\n",(0,i.jsx)(t.h3,{id:"clear-integration",children:"Clear Integration"}),"\n",(0,i.jsxs)(t.p,{children:["There are many ways for a project to build on Polkadot. Some of the most notable Polkadot projects\nare parachains on Kusama or gearing up to become one. Parachains can purchase\n",(0,i.jsx)(t.a,{href:"/docs/learn-agile-coretime",children:"coretime"})," and access a relay chain's core."]}),"\n",(0,i.jsxs)(t.p,{children:["Verifying which projects are currently parachains on Kusama can be quickly done by visiting the\n",(0,i.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/parachains",children:"parachains"})," page on\n",(0,i.jsx)(t.a,{href:"https://polkadot.js.org/apps",children:"polkadot.js.org/apps"}),"."]}),"\n",(0,i.jsxs)(t.p,{children:["But not all projects that build a chain using ",(0,i.jsx)(t.a,{href:"https://substrate.io",children:"Substrate"})," aim to become a\nparachain. Some use it simply because of its infrastructure to build their customised chain, without\nany plans to connect to the relay chain. And other projects may aim to become a parachain only on\nKusama or directly on Polkadot."]}),"\n",(0,i.jsx)(t.p,{children:"However, building a potential parachain is not the only way to build on Polkadot and expand its\necosystem. A project might aim to build a DeFi platform on a parachain, launch a stablecoin or other\ntoken on the Asset Hub, build a decentralized exchange, or any other dApp that one might think of,\nwithout ever touching the relay chain."}),"\n",(0,i.jsxs)(t.p,{children:["But in all of those cases, their plans to build on Polkadot whatever they may be, should be clearly\nstated on their site and in their documentation. Most importantly, you should look for an\nexplanation of ",(0,i.jsx)(t.em,{children:"how"})," they plan to achieve that integration. A roadmap that places the integration at\nsome point in the future means close to nothing without clearly stating the steps to get there.\nThese plans should be evaluated in tandem with your research on the technical expertise of the team."]}),"\n",(0,i.jsx)(t.p,{children:'This is especially true for projects that are already running on another network, like on Ethereum\nor Binance Smart Chain, and have issued tokens there. Many projects do that either to raise funds\nand test their infrastructure or because they aim to build a "multi-chain" solution or both. But\nbecause those projects are not currently built on Substrate, the existence of a clear and robust\nintegration plan with the relay chain should be essential in your research to ensure that they will\nindeed build on it one day.'}),"\n",(0,i.jsxs)(t.h2,{id:"soft-metrics",children:[(0,i.jsx)(t.em,{children:"Soft"})," metrics"]}),"\n",(0,i.jsx)(t.p,{children:'The items above are what you should look at first when evaluating a project and should carry most of\nthe weight in your decision. The reason is that they are hard to fake or manipulate, assuming that\nyou are able to verify the information found. Hence we called them "hard" metrics.'}),"\n",(0,i.jsx)(t.p,{children:'But there are other things to look for that might point to a project\'s legitimacy but can be more\neasily manipulated, so they should not affect your decision heavily. These are called "soft"\nmetrics.'}),"\n",(0,i.jsx)(t.h3,{id:"site-quality",children:"Site Quality"}),"\n",(0,i.jsx)(t.p,{children:"The quality of a project's site could sometimes provide insights into the legitimacy of a project. A\npoorly constructed site, may:"}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsx)(t.li,{children:"have typos, grammatical errors, or poor styling"}),"\n",(0,i.jsx)(t.li,{children:"be a template without any serious effort to improve or change it"}),"\n",(0,i.jsx)(t.li,{children:"hold little information about the project, without links to their GitHub or other resources"}),"\n",(0,i.jsx)(t.li,{children:'not "feel" professional'}),"\n"]}),"\n",(0,i.jsx)(t.p,{children:"These are all potential indications that the team is not serious about this project."}),"\n",(0,i.jsx)(t.p,{children:"But that does not mean that all well-designed sites are also solid projects. This is a soft metric,\nafter all. Many projects that do not have any plans to build anything substantial still have\nexcellent, or even beautiful-looking, sites. They put many resources into how they present\nthemselves visually to mislead. So, an excellent site does not necessarily indicate a legitimate\nproject, a poor site might indicate an illegitimate one, but the site quality alone usually is not\nenough to reach a conclusion. None of these metrics are sufficient alone; you need to look into all\nof them to make an educated decision."}),"\n",(0,i.jsx)(t.h3,{id:"social-media-presence",children:"Social Media Presence"}),"\n",(0,i.jsx)(t.p,{children:"Having a vibrant community is a good indication of a legitimate project. A team that engages with\ntheir community, gives updates, answers questions, holds AMAs, and posts articles, is a team that is\ninterested in keeping their community members updated and informed."}),"\n",(0,i.jsx)(t.p,{children:"Though at the same time, social media presence and engagement can be easily faked and manipulated.\nCreating a Telegram group or a Discord server and filling it with thousands of bots is very easy.\nAlthough bot users need to be identified on Discord according to its terms, scammers have little\nregard for terms and conditions."}),"\n",(0,i.jsx)(t.p,{children:"A team that tweets five times a day or posts a Medium article every other day may not necessarily be\nthe building something substantial."}),"\n",(0,i.jsx)(t.p,{children:'So, make sure that you verify that their social media presence and engagement is genuine. Join their\nchannels, ask questions and see first-hand what the community and the admins look like. If you are\nseeing a lot of users posting very brief comments, like "Good project", "To the moon", "Thank you"\netc, without really engaging, remain skeptical and maintain a critical eye, as these are probably\nbots. Additionally, verify any information shared by the team on social media and also verify the\ncomments of users.'}),"\n",(0,i.jsx)(t.h3,{id:"media-presence",children:"Media Presence"}),"\n",(0,i.jsx)(t.p,{children:"Related to social media presence is media presence: third-party articles, mentions in YouTube\nvideos, and general promotions of the project."}),"\n",(0,i.jsx)(t.p,{children:'When it comes to articles, the first thing to check is if the article is genuine coverage or a paid\npress release, especially when a project displays this coverage prominently on their page. Or if the\nauthor has any vested interest in promoting the project. You can check their previous articles to\nsee if they systematically "shill" this project or other projects in general.'}),"\n",(0,i.jsx)(t.p,{children:'This especially applies for YouTubers and influencers in general, who may be dishonest. Many of them\ndo this for a living or as a way to "pump" projects they have invested in. Finding good influencers\nthat provide as objective info as possible usually involves its own separate research.'}),"\n",(0,i.jsx)(t.p,{children:"That is not to say that media exposure is terrible. It is probably the most abundant source of\ninformation outside the project itself, but at the same time, it requires extensive cross-checking\nand verification of information."}),"\n",(0,i.jsx)(t.h3,{id:"email-communication",children:"Email Communication"}),"\n",(0,i.jsx)(t.p,{children:"Nowadays, many projects use Telegram, Discord, or similar apps for community engagement, as well as\nthe sole channel for communication, updates, and support. But having an email registered with their\ndomain, besides providing another channel of communication, can be considered an additional\ncredibility criterion."}),"\n",(0,i.jsx)(t.p,{children:"Furthermore, receiving emails from the project's domain makes it easy to verify that the\ncommunication is authentic (but look out for spoofed emails!). On the other hand, communicating\nthrough personal emails or using a public email provider, like Google or Yahoo, might indicate a\nless serious team or one that is spread too thin."}),"\n",(0,i.jsx)(t.h3,{id:"additional-material",children:"Additional material"}),"\n",(0,i.jsx)(t.p,{children:"Fact-checking is a skill necessary not only for DYOR but also for filtering out the plethora of\ninformation that we come across on the internet on a daily basis. If you are interested in learning\nmore about fact-checking and claim verification, have a look at the following material."}),"\n",(0,i.jsxs)(t.ol,{children:["\n",(0,i.jsxs)(t.li,{children:["A very nice YouTube series on the art of fact-checking that covers a lot of ground can be found\n",(0,i.jsx)(t.a,{href:"https://www.youtube.com/watch?v=L4aNmdL3Hr0&list=PL8dPuuaLjXtN07XYqqWSKpPrtNDiCHTzU",children:"here"}),"."]}),"\n",(0,i.jsxs)(t.li,{children:["Another great resource on fact-checking, for those who prefer to read, can be found\n",(0,i.jsx)(t.a,{href:"https://webliteracy.pressbooks.com",children:"here"}),"."]}),"\n",(0,i.jsxs)(t.li,{children:["Wikipedia article on ",(0,i.jsx)(t.a,{href:"https://en.wikipedia.org/wiki/Fact-checking",children:"fact-checking"})]}),"\n"]}),"\n",(0,i.jsxs)(t.p,{children:["Finally, you should also check our complementary guide on ",(0,i.jsx)(t.a,{href:"/docs/learn-scams",children:"how to identify scams"}),", which\nexplains how to identify outright scams and avoid them, as well as how to protect your sensitive\ninformation."]}),"\n",(0,i.jsx)(t.h3,{id:"one-last-piece-of-advice",children:"One last piece of advice"}),"\n",(0,i.jsx)(t.p,{children:"Once you have read through this material and have done your research and have identified a project\nas legitimate, it is also imperative that you understand what the project does and what novelty it\naims to bring to the ecosystem."}),"\n",(0,i.jsx)(t.p,{children:"This does not fall under fact-checking and verifying claims, but it is important to mention: fully\nunderstanding what something does and its prospective impact is an integral part of making an\ninformed decision, so do not overlook it."})]})}function d(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(c,{...e})}):c(e)}},28453:(e,t,o)=>{o.d(t,{R:()=>s,x:()=>r});var n=o(96540);const i={},a=n.createContext(i);function s(e){const t=n.useContext(a);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:s(e.components),n.createElement(a.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/c7a2145e.0cbaf33c.js b/assets/js/c7a2145e.0cbaf33c.js deleted file mode 100644 index 3d6fd53fec7d..000000000000 --- a/assets/js/c7a2145e.0cbaf33c.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6277],{31059:(e,t,o)=>{o.r(t),o.d(t,{assets:()=>h,contentTitle:()=>s,default:()=>d,frontMatter:()=>a,metadata:()=>r,toc:()=>l});var n=o(74848),i=o(28453);const a={id:"how-to-dyor",title:"How to Do Your Own Research (DYOR)",sidebar_label:"Do Your Own Research",description:"Importance of Doing Your Own Research (DYOR).",keywords:["dyor","research","scams","protect"],slug:"../how-to-dyor"},s=void 0,r={id:"general/how-to-dyor",title:"How to Do Your Own Research (DYOR)",description:"Importance of Doing Your Own Research (DYOR).",source:"@site/../docs/general/how-to-dyor.md",sourceDirName:"general",slug:"/how-to-dyor",permalink:"/docs/how-to-dyor",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/how-to-dyor.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1727943421e3,frontMatter:{id:"how-to-dyor",title:"How to Do Your Own Research (DYOR)",sidebar_label:"Do Your Own Research",description:"Importance of Doing Your Own Research (DYOR).",keywords:["dyor","research","scams","protect"],slug:"../how-to-dyor"},sidebar:"docs",previous:{title:"Stay Safe",permalink:"/docs/stay-safe-index"},next:{title:"Scam Protection",permalink:"/docs/learn-scams"}},h={},l=[{value:"Powered by Polkadot or Polka prefix clarification",id:"powered-by-polkadot-or-polka-prefix-clarification",level:2},{value:"Hard metrics to look for when you DYOR",id:"hard-metrics-to-look-for-when-you-dyor",level:2},{value:"Association with Entities You Trust",id:"association-with-entities-you-trust",level:3},{value:"Open Source",id:"open-source",level:3},{value:"Active Development",id:"active-development",level:3},{value:"Comprehensive Documentation",id:"comprehensive-documentation",level:3},{value:"Reputable Team",id:"reputable-team",level:3},{value:"Clear Integration",id:"clear-integration",level:3},{value:"Soft metrics",id:"soft-metrics",level:2},{value:"Site Quality",id:"site-quality",level:3},{value:"Social Media Presence",id:"social-media-presence",level:3},{value:"Media Presence",id:"media-presence",level:3},{value:"Email Communication",id:"email-communication",level:3},{value:"Additional material",id:"additional-material",level:3},{value:"One last piece of advice",id:"one-last-piece-of-advice",level:3}];function c(e){const t={a:"a",em:"em",h2:"h2",h3:"h3",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.p,{children:"Many projects are being built, or intend to build, on both Polkadot and Kusama. However, many claim\nto do so but have either no such intention, they do not have the resources to pull it through, or\nthey are outright trying to scam people by misusing the Polkadot and Kusama brands."}),"\n",(0,n.jsxs)(t.p,{children:["Distinguishing legitimate projects from the dishonest ones is not always an easy task. This guide is\nmeant to help you find out how to do your research better when you come across a project that seems\ninteresting. What it's ",(0,n.jsx)(t.strong,{children:"not"})," meant to do, is label any single project as legitimate or not, or\nmake that decision for you."]}),"\n",(0,n.jsxs)(t.p,{children:["Furthermore, a legitimate project does not necessarily mean it will also be successful, and ",(0,n.jsx)(t.strong,{children:"this\nguide is not meant to be viewed as financial or investment advice."})]}),"\n",(0,n.jsxs)(t.h2,{id:"powered-by-polkadot-or-polka-prefix-clarification",children:[(0,n.jsx)(t.em,{children:"Powered by Polkadot"})," or ",(0,n.jsx)(t.em,{children:"Polka"})," prefix clarification"]}),"\n",(0,n.jsxs)(t.p,{children:['The statement "Powered by Polkadot" on many projects\' sites is often a cause of confusion. This\nusually means that the project is building, or intends to build, on the Polkadot ecosystem, using\n',(0,n.jsx)(t.a,{href:"https://substrate.io",children:"Substrate"}),". But any project can claim that, so the existence of this\nstatement on a project's site infers no information about the project's legitimacy, and it's\ncertainly not a \"seal of approval\" by Web3 Foundation."]}),"\n",(0,n.jsx)(t.p,{children:'This also applies for projects with a "Polka" prefix in their name. Many projects use that to\nassociate themselves with the ecosystem, some legitimately and others only to piggyback on\nPolkadot\'s reputation.'}),"\n",(0,n.jsxs)(t.h2,{id:"hard-metrics-to-look-for-when-you-dyor",children:[(0,n.jsx)(t.em,{children:"Hard"})," metrics to look for when you DYOR"]}),"\n",(0,n.jsx)(t.h3,{id:"association-with-entities-you-trust",children:"Association with Entities You Trust"}),"\n",(0,n.jsx)(t.p,{children:'New projects usually try to increase their credibility by associating themselves with well-known\nentities. The thinking is simple: "These entities that have a good reputation trust us, so if you\ntrust them, by association, you should trust us too". Indeed, association with a trusted entity can\nbe a strong indicator of the legitimacy of a project.'}),"\n",(0,n.jsxs)(t.p,{children:["For example, if a project had received a ",(0,n.jsx)(t.a,{href:"https://grants.web3.foundation",children:"Web3 Foundation Grant"}),",\nthis is an indication that the project is indeed building on the Polkadot ecosystem, and if they\nhave delivered all of their milestones, then their code is most likely of reasonable quality."]}),"\n",(0,n.jsx)(t.p,{children:"Furthermore, Web3 Foundation is not the only entity in the ecosystem that provides grants. Other\nreputable teams in the ecosystem that have developed platforms or prospective parachains provide\ngrants for projects to build on or expand their project. These are also indicators that a project is\ncommitted to building on the broader Polkadot ecosystem."}),"\n",(0,n.jsxs)(t.p,{children:["Receiving funding from reputable VCs and are known to be involved with other reputable Polkadot\nprojects can also be a good indicator. Or participating in the\n",(0,n.jsx)(t.a,{href:"https://polkadot.network/development/alpha/",children:"Polkadot Alpha Program"}),"."]}),"\n",(0,n.jsxs)(t.p,{children:[(0,n.jsx)(t.strong,{children:"However"}),", claiming such associations and having them is not always the same thing. ",(0,n.jsx)(t.strong,{children:"You always\nneed to verify any claims a project makes"}),", and that is probably the most critical takeaway from\nthis guide."]}),"\n",(0,n.jsxs)(t.p,{children:["For example, if a project has the\n",(0,n.jsx)(t.a,{href:"https://grants.web3.foundation/docs/Support%20Docs/grant-badge-guidelines",children:"Web3 Foundation Grant badge"}),"\non their site or claims to have received a grant, check to see if they have received one and that it\nhas not been terminated. The complete list of projects that have successfully applied for a grant\ncan be found ",(0,n.jsx)(t.a,{href:"https://grants.web3.foundation/applications",children:"here"}),", where you can see what each\nproject has delivered and if, perhaps, their grant has been terminated."]}),"\n",(0,n.jsx)(t.p,{children:"The same thing goes for VC funding or another grant, or any advertised association for that matter.\nCheck on the corresponding sites to make sure such claims are valid."}),"\n",(0,n.jsxs)(t.p,{children:["Also, make sure you understand the ",(0,n.jsx)(t.em,{children:"scope"})," of the association. Going back to the Web3 grants\nexample, they have a precise scope. They are granted for specific deliverables, and the review team\nonly checks the code and evaluates these deliverables ",(0,n.jsx)(t.em,{children:"of the particular project"}),". So, having\nreceived a Web3 grant provides no information about the general practices of a team, the longevity\nof the project besides the scope of the grant, or other projects the team might be building, which\nis why the badge rules clearly state that it should not be displayed on the team's landing page."]}),"\n",(0,n.jsxs)(t.p,{children:["Similarly, if a project claims to have partnered with a reputable entity, verify its scope and if it\nis indeed a partnership by searching their site for projects they have partnered with, their press\nreleases, or by contacting them directly. And if you see such claims about Web3 Foundation, you can\nbe sure they're false because Web3 Foundation ",(0,n.jsx)(t.strong,{children:"does not"})," partner with, or endorse, ecosystem\nprojects."]}),"\n",(0,n.jsx)(t.h3,{id:"open-source",children:"Open Source"}),"\n",(0,n.jsx)(t.p,{children:"An open-source project promotes transparency, builds trust, and potentially ensures project team\nhonesty. Additionally, it makes it very easy to track the project's progress and see how active the\nteam is in developing it."}),"\n",(0,n.jsxs)(t.p,{children:["However, that does not mean that any closed source project is not legitimate or the team behind it\nhas something to hide. Many teams choose to keep their code private to protect their intellectual\nproperty. And several teams that do so have gotten a\n",(0,n.jsx)(t.a,{href:"https://github.com/w3f/General-Grants-Program",children:"General Grant"}),", under which members of the grants\nreview team review their private code."]}),"\n",(0,n.jsx)(t.p,{children:"Another thing that an open-source project allows you to see is if they have copied any code from\nother open sources. This isn't necessarily bad, since no one wants to re-invents the wheel, but\ncopied code should attribute to the source. If it doesn't, this should raise some red flags because\nthe project team tries to feign expertise by passing someone else's code as their own."}),"\n",(0,n.jsxs)(t.p,{children:["A forked repo is easy to spot since it points to the original repo, but partially copied code might\nnot be as easy to find. A quick\n",(0,n.jsx)(t.a,{href:"https://duckduckgo.com/?q=search+for+copied+source+code+plagiarism&t=ffab&ia=web",children:"search"})," can\nprovide you with some ways and tools to look for plagiarism."]}),"\n",(0,n.jsx)(t.p,{children:"So, a project being closed source is not necessarily a red flag. It just limits the ability to\nverify the project in that regard, but there are indirect ways as described below. However, a\nproject being open source is undoubtedly a potentially strong indicator of its legitimacy because\nshady or poor practices seldom stay hidden for long in open source code."}),"\n",(0,n.jsx)(t.h3,{id:"active-development",children:"Active Development"}),"\n",(0,n.jsx)(t.p,{children:"If a project team constantly updates their product, it is always a good indication that they are\nserious and passionate about building. Regularly releasing new features and upgrades, fixing bugs,\nupdating their site and notifying the community of these changes are good earmarks of a legitimate\nproject."}),"\n",(0,n.jsxs)(t.p,{children:["Additionally, active development ",(0,n.jsx)(t.em,{children:"usually"})," also means good development to be used as an ",(0,n.jsx)(t.em,{children:"indirect"}),"\nindicator for a closed source project."]}),"\n",(0,n.jsx)(t.p,{children:"An open-source project allows anyone to monitor the development activity through its code repository\ndirectly, such as through GitHub."}),"\n",(0,n.jsx)(t.h3,{id:"comprehensive-documentation",children:"Comprehensive Documentation"}),"\n",(0,n.jsx)(t.p,{children:"The existence of comprehensive documentation should be considered mandatory for any serious project.\nA couple of years ago, this meant a whitepaper, but lately, we have seen a shift to other forms of\ndocumentation, like wiki pages describing the various aspects."}),"\n",(0,n.jsx)(t.p,{children:"No matter the form of the documentation, its existence and completion is necessary, and the more\ndetailed it is, the better. This is where the details of the project or parts of the project are\nexplained in full for prospective investors or users."}),"\n",(0,n.jsx)(t.p,{children:"The documentation will also give you an idea of the technical expertise of the team. If the team\nanalyses their technology and technical aspects, this is a potential indication of technical\nprowess. On the other hand, if the team focuses only on tokenomics or analyses their project only in\nbroad, vague terms, this is potentially an indication that there is not a clear path to their goals."}),"\n",(0,n.jsxs)(t.p,{children:["If you are looking for an example of good documentation, look no further than our own\n",(0,n.jsx)(t.a,{href:"https://wiki.polkadot.network",children:"wiki"}),". Of course, you should not expect to find such extensive\ndocumentation on newly launched projects. Our wiki, after all, covers a whole ecosystem and was\npopulated over the course of multiple years. Updates are also constantly being pushed out and edits\nare consistently being made. Nevertheless, this wiki provides a good example of the documentation a\nlegitimate project should provide."]}),"\n",(0,n.jsx)(t.h3,{id:"reputable-team",children:"Reputable Team"}),"\n",(0,n.jsx)(t.p,{children:"Some teams display their team members prominently on their site, along with their social media\nprofiles (usually LinkedIn) and GitHub accounts. This gives prospective users and investors the\nability to verify the team's credentials, track records, and expertise."}),"\n",(0,n.jsxs)(t.p,{children:["But the keyword here is ",(0,n.jsx)(t.strong,{children:"verify"}),"! Do not take what you see on the project's team at face value.\nLook them up and verify their track record. Do a Google search for the team members mentioned. If it\ncomes up empty, or the only results are regarding the project you are researching, it is an\nindication that their team members are potentially fake. Their photos on their site, if there are\nany, may also be stock photos, or in other words, also fake. These are usually easily recognisable,\nbut here is a ",(0,n.jsx)(t.a,{href:"https://helpdeskgeek.com/how-to/free-reverse-image-search-tools/",children:"guide"})," on how to do\na reverse image search, if you want to be thorough."]}),"\n",(0,n.jsx)(t.p,{children:"In some other cases, some developers prefer to maintain their anonymity, using pseudonyms, or the\nteam members are not mentioned at all. This is not necessarily a bad thing. Perhaps the team is a\nstrong proponent of privacy, or they want their work to speak for itself. Still, you should try and\nfind out who is behind the project and what they are doing. For developers, their GitHub activity\nmay be a stronger indicator of honesty. Other team members might be heavily engaged in their\ncommunity, providing guidance and answers, which is always a good sign."}),"\n",(0,n.jsx)(t.p,{children:"But if the team are ghosts that do not show up anywhere and only engage with the community through\nproxies, this can be considered a red flag and extra precaution should be taken."}),"\n",(0,n.jsxs)(t.p,{children:["Besides their community, projects that are serious about building on Polkadot usually engage with\nthe ",(0,n.jsx)(t.a,{href:"/docs/community",children:"community"}),". They are active in the various\n",(0,n.jsx)(t.a,{href:"https://wiki.polkadot.network/docs/community/",children:"Polkadot and Kusama channels"}),", and some of them are\n",(0,n.jsx)(t.a,{href:"https://polkadot.network/polkadot-ambassador-program/",children:"Polkadot Ambassadors"}),", or generally\nprominent members of the ecosystem."]}),"\n",(0,n.jsx)(t.h3,{id:"clear-integration",children:"Clear Integration"}),"\n",(0,n.jsxs)(t.p,{children:["There are many ways for a project to build on Polkadot. Some of the most notable Polkadot projects\nare parachains on Kusama or gearing up to become one. Parachains can purchase\n",(0,n.jsx)(t.a,{href:"/docs/learn-agile-coretime",children:"coretime"})," and access a relay chain's core."]}),"\n",(0,n.jsxs)(t.p,{children:["Verifying which projects are currently parachains on Kusama can be quickly done by visiting the\n",(0,n.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/parachains",children:"parachains"})," page on\n",(0,n.jsx)(t.a,{href:"https://polkadot.js.org/apps",children:"polkadot.js.org/apps"}),"."]}),"\n",(0,n.jsxs)(t.p,{children:["But not all projects that build a chain using ",(0,n.jsx)(t.a,{href:"https://substrate.io",children:"Substrate"})," aim to become a\nparachain. Some use it simply because of its infrastructure to build their customised chain, without\nany plans to connect to the relay chain. And other projects may aim to become a parachain only on\nKusama or directly on Polkadot."]}),"\n",(0,n.jsx)(t.p,{children:"However, building a potential parachain is not the only way to build on Polkadot and expand its\necosystem. A project might aim to build a DeFi platform on a parachain, launch a stablecoin or other\ntoken on the Asset Hub, build a decentralized exchange, or any other dApp that one might think of,\nwithout ever touching the relay chain."}),"\n",(0,n.jsxs)(t.p,{children:["But in all of those cases, their plans to build on Polkadot whatever they may be, should be clearly\nstated on their site and in their documentation. Most importantly, you should look for an\nexplanation of ",(0,n.jsx)(t.em,{children:"how"})," they plan to achieve that integration. A roadmap that places the integration at\nsome point in the future means close to nothing without clearly stating the steps to get there.\nThese plans should be evaluated in tandem with your research on the technical expertise of the team."]}),"\n",(0,n.jsx)(t.p,{children:'This is especially true for projects that are already running on another network, like on Ethereum\nor Binance Smart Chain, and have issued tokens there. Many projects do that either to raise funds\nand test their infrastructure or because they aim to build a "multi-chain" solution or both. But\nbecause those projects are not currently built on Substrate, the existence of a clear and robust\nintegration plan with the relay chain should be essential in your research to ensure that they will\nindeed build on it one day.'}),"\n",(0,n.jsxs)(t.h2,{id:"soft-metrics",children:[(0,n.jsx)(t.em,{children:"Soft"})," metrics"]}),"\n",(0,n.jsx)(t.p,{children:'The items above are what you should look at first when evaluating a project and should carry most of\nthe weight in your decision. The reason is that they are hard to fake or manipulate, assuming that\nyou are able to verify the information found. Hence we called them "hard" metrics.'}),"\n",(0,n.jsx)(t.p,{children:'But there are other things to look for that might point to a project\'s legitimacy but can be more\neasily manipulated, so they should not affect your decision heavily. These are called "soft"\nmetrics.'}),"\n",(0,n.jsx)(t.h3,{id:"site-quality",children:"Site Quality"}),"\n",(0,n.jsx)(t.p,{children:"The quality of a project's site could sometimes provide insights into the legitimacy of a project. A\npoorly constructed site, may:"}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsx)(t.li,{children:"have typos, grammatical errors, or poor styling"}),"\n",(0,n.jsx)(t.li,{children:"be a template without any serious effort to improve or change it"}),"\n",(0,n.jsx)(t.li,{children:"hold little information about the project, without links to their GitHub or other resources"}),"\n",(0,n.jsx)(t.li,{children:'not "feel" professional'}),"\n"]}),"\n",(0,n.jsx)(t.p,{children:"These are all potential indications that the team is not serious about this project."}),"\n",(0,n.jsx)(t.p,{children:"But that does not mean that all well-designed sites are also solid projects. This is a soft metric,\nafter all. Many projects that do not have any plans to build anything substantial still have\nexcellent, or even beautiful-looking, sites. They put many resources into how they present\nthemselves visually to mislead. So, an excellent site does not necessarily indicate a legitimate\nproject, a poor site might indicate an illegitimate one, but the site quality alone usually is not\nenough to reach a conclusion. None of these metrics are sufficient alone; you need to look into all\nof them to make an educated decision."}),"\n",(0,n.jsx)(t.h3,{id:"social-media-presence",children:"Social Media Presence"}),"\n",(0,n.jsx)(t.p,{children:"Having a vibrant community is a good indication of a legitimate project. A team that engages with\ntheir community, gives updates, answers questions, holds AMAs, and posts articles, is a team that is\ninterested in keeping their community members updated and informed."}),"\n",(0,n.jsx)(t.p,{children:"Though at the same time, social media presence and engagement can be easily faked and manipulated.\nCreating a Telegram group or a Discord server and filling it with thousands of bots is very easy.\nAlthough bot users need to be identified on Discord according to its terms, scammers have little\nregard for terms and conditions."}),"\n",(0,n.jsx)(t.p,{children:"A team that tweets five times a day or posts a Medium article every other day may not necessarily be\nthe building something substantial."}),"\n",(0,n.jsx)(t.p,{children:'So, make sure that you verify that their social media presence and engagement is genuine. Join their\nchannels, ask questions and see first-hand what the community and the admins look like. If you are\nseeing a lot of users posting very brief comments, like "Good project", "To the moon", "Thank you"\netc, without really engaging, remain skeptical and maintain a critical eye, as these are probably\nbots. Additionally, verify any information shared by the team on social media and also verify the\ncomments of users.'}),"\n",(0,n.jsx)(t.h3,{id:"media-presence",children:"Media Presence"}),"\n",(0,n.jsx)(t.p,{children:"Related to social media presence is media presence: third-party articles, mentions in YouTube\nvideos, and general promotions of the project."}),"\n",(0,n.jsx)(t.p,{children:'When it comes to articles, the first thing to check is if the article is genuine coverage or a paid\npress release, especially when a project displays this coverage prominently on their page. Or if the\nauthor has any vested interest in promoting the project. You can check their previous articles to\nsee if they systematically "shill" this project or other projects in general.'}),"\n",(0,n.jsx)(t.p,{children:'This especially applies for YouTubers and influencers in general, who may be dishonest. Many of them\ndo this for a living or as a way to "pump" projects they have invested in. Finding good influencers\nthat provide as objective info as possible usually involves its own separate research.'}),"\n",(0,n.jsx)(t.p,{children:"That is not to say that media exposure is terrible. It is probably the most abundant source of\ninformation outside the project itself, but at the same time, it requires extensive cross-checking\nand verification of information."}),"\n",(0,n.jsx)(t.h3,{id:"email-communication",children:"Email Communication"}),"\n",(0,n.jsx)(t.p,{children:"Nowadays, many projects use Telegram, Discord, or similar apps for community engagement, as well as\nthe sole channel for communication, updates, and support. But having an email registered with their\ndomain, besides providing another channel of communication, can be considered an additional\ncredibility criterion."}),"\n",(0,n.jsx)(t.p,{children:"Furthermore, receiving emails from the project's domain makes it easy to verify that the\ncommunication is authentic (but look out for spoofed emails!). On the other hand, communicating\nthrough personal emails or using a public email provider, like Google or Yahoo, might indicate a\nless serious team or one that is spread too thin."}),"\n",(0,n.jsx)(t.h3,{id:"additional-material",children:"Additional material"}),"\n",(0,n.jsx)(t.p,{children:"Fact-checking is a skill necessary not only for DYOR but also for filtering out the plethora of\ninformation that we come across on the internet on a daily basis. If you are interested in learning\nmore about fact-checking and claim verification, have a look at the following material."}),"\n",(0,n.jsxs)(t.ol,{children:["\n",(0,n.jsxs)(t.li,{children:["A very nice YouTube series on the art of fact-checking that covers a lot of ground can be found\n",(0,n.jsx)(t.a,{href:"https://www.youtube.com/watch?v=L4aNmdL3Hr0&list=PL8dPuuaLjXtN07XYqqWSKpPrtNDiCHTzU",children:"here"}),"."]}),"\n",(0,n.jsxs)(t.li,{children:["Another great resource on fact-checking, for those who prefer to read, can be found\n",(0,n.jsx)(t.a,{href:"https://webliteracy.pressbooks.com",children:"here"}),"."]}),"\n",(0,n.jsxs)(t.li,{children:["Wikipedia article on ",(0,n.jsx)(t.a,{href:"https://en.wikipedia.org/wiki/Fact-checking",children:"fact-checking"})]}),"\n"]}),"\n",(0,n.jsxs)(t.p,{children:["Finally, you should also check our complementary guide on ",(0,n.jsx)(t.a,{href:"/docs/learn-scams",children:"how to identify scams"}),", which\nexplains how to identify outright scams and avoid them, as well as how to protect your sensitive\ninformation."]}),"\n",(0,n.jsx)(t.h3,{id:"one-last-piece-of-advice",children:"One last piece of advice"}),"\n",(0,n.jsx)(t.p,{children:"Once you have read through this material and have done your research and have identified a project\nas legitimate, it is also imperative that you understand what the project does and what novelty it\naims to bring to the ecosystem."}),"\n",(0,n.jsx)(t.p,{children:"This does not fall under fact-checking and verifying claims, but it is important to mention: fully\nunderstanding what something does and its prospective impact is an integral part of making an\ninformed decision, so do not overlook it."})]})}function d(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(c,{...e})}):c(e)}},28453:(e,t,o)=>{o.d(t,{R:()=>s,x:()=>r});var n=o(96540);const i={},a=n.createContext(i);function s(e){const t=n.useContext(a);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:s(e.components),n.createElement(a.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/c7c5ba1a.431aab81.js b/assets/js/c7c5ba1a.431aab81.js new file mode 100644 index 000000000000..0fb97b5518d0 --- /dev/null +++ b/assets/js/c7c5ba1a.431aab81.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9476],{55927:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>c,default:()=>h,frontMatter:()=>i,metadata:()=>a,toc:()=>u});const a=JSON.parse('{"id":"learn/learn-accounts","title":"Polkadot Accounts","description":"Polkadot Accounts, Account Identity, and Account Reaping.","source":"@site/../docs/learn/learn-accounts.md","sourceDirName":"learn","slug":"/learn-accounts","permalink":"/docs/learn-accounts","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-accounts.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1726731604000,"frontMatter":{"id":"learn-accounts","title":"Polkadot Accounts","sidebar_label":"Polkadot Accounts","description":"Polkadot Accounts, Account Identity, and Account Reaping.","keywords":["account","polkadot account","polkadotjs","indices","identity","reaping"],"slug":"../learn-accounts"},"sidebar":"docs","previous":{"title":"Basics","permalink":"/docs/learn-basics-index"},"next":{"title":"Account Balances","permalink":"/docs/learn-account-balances"}}');var r=t(74848),o=t(28453),s=(t(11470),t(19365),t(3514));const i={id:"learn-accounts",title:"Polkadot Accounts",sidebar_label:"Polkadot Accounts",description:"Polkadot Accounts, Account Identity, and Account Reaping.",keywords:["account","polkadot account","polkadotjs","indices","identity","reaping"],slug:"../learn-accounts"},c=void 0,l={},u=[{value:"Account Address",id:"account-address",level:2},{value:"Mnemonic Seed Phrase",id:"mnemonic-seed-phrase",level:3},{value:"Account Generation",id:"account-generation",level:3},{value:"Backing Up Accounts",id:"backing-up-accounts",level:3},{value:"Existential Deposit and Reaping",id:"existential-deposit-and-reaping",level:2}];function d(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",hr:"hr",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,o.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(n.admonition,{title:"User friendly wallets",type:"info",children:[(0,r.jsxs)(n.p,{children:["Create your Polkadot accounts with any of the secure and user-friendly wallets listed on the\n",(0,r.jsx)(n.a,{href:"https://www.polkadot.network/ecosystem/wallets/",children:"Polkadot website"}),"."]}),(0,r.jsxs)(n.p,{children:["See the ",(0,r.jsx)(n.a,{href:"./wallets-index",children:"Wallets"})," section for more information about different wallet options\navailable, and specifically the ",(0,r.jsx)(n.a,{href:"/docs/wallets-and-extensions",children:"wallets and extensions"})," page,\nwhich lists the user friendly wallet projects funded by the Polkadot/Kusama Treasuries or by the\n",(0,r.jsx)(n.a,{href:"/docs/grants",children:"Web3 Foundation Grants Program"}),"."]})]}),"\n",(0,r.jsxs)(n.p,{children:["This document covers the basics of accounts in the Polkadot ecosystem. See the\n",(0,r.jsx)(n.a,{href:"/docs/learn-account-advanced",children:"Advanced Account"})," page for more information about accounts such as\n",(0,r.jsx)(n.a,{href:"/docs/learn-account-advanced#derivation-paths",children:"account derivation"})," and\n",(0,r.jsx)(n.a,{href:"/docs/learn-account-advanced#indices",children:"indices"}),". For a more in-depth explanation of the cryptography\nbehind accounts, please see the ",(0,r.jsx)(n.a,{href:"/docs/learn-cryptography",children:"cryptography page"}),"."]}),"\n",(0,r.jsx)(s.A,{}),"\n",(0,r.jsx)(n.h2,{id:"account-address",children:"Account Address"}),"\n",(0,r.jsx)(n.p,{children:"An address is the public part of an account. The private part is the key used to access this\naddress. The public and private parts together make up an account. You can think of the public\naddress of your account, like your mailbox and the private key like the key to open that mailbox.\nAnybody can send mail to your mailbox, but only you can access it as only you have access to its\nkey. In the context of accounts, anybody can send tokens to your public address, but only you can\ntransact with them using your private key. That is why you should keep your private key secret."}),"\n",(0,r.jsx)(n.h3,{id:"mnemonic-seed-phrase",children:"Mnemonic Seed Phrase"}),"\n",(0,r.jsxs)(n.p,{children:["A user's account requires a private key that can sign on to one of the\n",(0,r.jsx)(n.a,{href:"/docs/build-protocol-info#cryptography",children:"supported curves and signature schemes"}),". Without a\nprivate key, an account cannot sign anything. In Polkadot, there are some exceptions of accounts\nthat do not have known private keys (i.e. keyless accounts). Such accounts are\n",(0,r.jsx)(n.a,{href:"/docs/learn-account-multisig",children:"multi-signature accounts"}),",\n",(0,r.jsx)(n.a,{href:"/docs/learn-proxies-pure#anonymous-proxy-pure-proxy",children:"pure proxies"}),", and\n",(0,r.jsx)(n.a,{href:"/docs/learn-account-advanced#system-accounts",children:"system accounts"})," that are not discussed here and are\nmeant for an advanced audience."]}),"\n",(0,r.jsx)(n.p,{children:"A typical 12-word mnemonic seed phrase is shown below."}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"'caution juice atom organ advance problem want pledge someone senior holiday very'\n"})}),"\n",(0,r.jsxs)(n.p,{children:["Its corresponding ",(0,r.jsx)(n.em,{children:"private/public keypair"})," is also shown."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"Secret seed (Private key): 0x056a6a4e203766ffbea3146967ef25e9daf677b14dc6f6ed8919b1983c9bebbc\nPublic key (SS58): 5F3sa2TJAWMqDhXG6jhV4N8ko9SxwGy8TpaNS1repo5EYjQX\n"})}),"\n",(0,r.jsxs)(n.p,{children:["Polkadot default address format is the ",(0,r.jsx)(n.code,{children:"MultiAddress"})," type. This means the same mnemonic phrase will\ngenerate public keys for different parachains. For more information, see the\n",(0,r.jsx)(n.a,{href:"/docs/learn-account-advanced#address-format",children:"Address Format"})," section on the\n",(0,r.jsx)(n.a,{href:"/docs/learn-account-advanced",children:"Advanced Account"})," page."]}),"\n",(0,r.jsx)(n.h3,{id:"account-generation",children:"Account Generation"}),"\n",(0,r.jsx)(n.p,{children:"Usually, there are two ways of generating a mnemonic seed:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:'On a "hot" device, i.e. a device that is connected to the internet'}),"\n",(0,r.jsx)(n.li,{children:'On a "cold" device, i.e. a device that is not (and ideally will never be) connected to the\ninternet'}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"Hot wallets are susceptible to a wide range of attacks, so it is recommended to use cold wallets\nwhen dealing with non-trivial amounts of funds."}),"\n",(0,r.jsxs)(n.p,{children:["Generating a mnemonic seed on a browser extension or a mobile application will create a hot key or\nhot wallet. Create your Polkadot accounts with a secure and user-friendly wallet listed on the\n",(0,r.jsx)(n.a,{href:"https://www.polkadot.network/ecosystem/wallets/",children:"Polkadot website"}),". See also the\n",(0,r.jsx)(n.a,{href:"./wallets-index",children:"Wallets"})," section for more information about wallets and the\n",(0,r.jsx)(n.a,{href:"/docs/wallets-and-extensions",children:"wallets and extensions"})," page for wallets and browser\nextensions funded by the Polkadot/Kusama Treasuries or by the\n",(0,r.jsx)(n.a,{href:"/docs/grants",children:"Web3 Foundation Grants Program"}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["Cold keys are generated on special devices such as those provided by ",(0,r.jsx)(n.a,{href:"/docs/ledger",children:"Ledger"}),".\nAdditionally, you can generate your account using the ",(0,r.jsx)(n.a,{href:"/docs/polkadot-vault",children:"Polkadot Vault"}),"\nmobile app (you need a dedicated air-gapped Android or iOS-compatible smartphone that you are\ncomfortable using only for Polkadot Vault), or a dedicated hardware implementation of Polkadot Vault\nsuch as ",(0,r.jsx)(n.a,{href:"https://www.kampe.la/",children:"the Kampela Signer"}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["Usually, browser extensions and mobile devices have options to securely import accounts from cold\nwallets. Note that the private keys of those accounts will remain on the cold wallet, meaning that\nyou will always need the device to sign any transaction. Exceptions exist where you can generate hot\nwallet based ",(0,r.jsx)(n.a,{href:"/docs/learn-proxies",children:"proxy accounts"})," and sign on behalf of a cold wallet account\nwithout connecting the cold device. This is practical, especially for transactions made frequently."]}),"\n",(0,r.jsx)(n.h3,{id:"backing-up-accounts",children:"Backing Up Accounts"}),"\n",(0,r.jsx)(n.p,{children:"Depending on what software you use to access your account, there are various ways to back up and\nrestore your account. It is a good idea to back your information up and keep it secure. In general,\nas long as you know how you created your account and have the mnemonic seed phrase or the JSON\nbackup file (and password) stored securely, you can restore your account."}),"\n",(0,r.jsx)(n.h2,{id:"existential-deposit-and-reaping",children:"Existential Deposit and Reaping"}),"\n",(0,r.jsx)(n.admonition,{type:"info",children:(0,r.jsxs)(n.p,{children:["Visit\n",(0,r.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000168651-what-is-the-existential-deposit-",children:(0,r.jsx)(n.strong,{children:"this support page"})}),"\nfor more information about existential deposit."]})}),"\n",(0,r.jsxs)(n.p,{children:["When you generate an account (address), you only generate a ",(0,r.jsx)(n.em,{children:"key"})," that lets you access it. The\naccount does not exist yet on-chain. For that, it needs the\n",(0,r.jsx)(n.a,{href:"/docs/chain-state-values#existential-deposit",children:"existential deposit"}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["Having an account go below the existential deposit causes that account to be ",(0,r.jsx)(n.em,{children:"reaped"}),". The account\nwill be wiped from the blockchain's state to conserve space, along with any funds in that address.\nYou do not lose access to the reaped address - as long as you have your private key or recovery\nphrase, you can still use the address - but it needs a top-up of another existential deposit to be\nable to interact with the chain."]}),"\n",(0,r.jsxs)(n.p,{children:["Transaction fees cannot cause an account to be reaped. Since fees are deducted from the account\nbefore any other transaction logic, accounts with balances ",(0,r.jsx)(n.em,{children:"equal to"})," the existential deposit cannot\nconstruct a valid transaction. Additional funds will need to be added to cover the transaction fees."]}),"\n",(0,r.jsx)(n.admonition,{title:"The existential deposit can be different on parachains",type:"info",children:(0,r.jsx)(n.p,{children:"Having an Existential Deposit (ED) on the relay chain account does not guarantee the liveness of the\nsame account on its system chains or parachains. Parachains typically define ED for an account in\ntheir native tokens but can also configure it with tokens that are deemed sufficient. For example,\nthe Existential Deposit on Polkadot Asset Hub can be in DOT or sufficient assets like USDC or USDT."})}),"\n",(0,r.jsxs)(n.p,{children:["Here's another way to think about existential deposits. Ever notice those ",(0,r.jsx)(n.code,{children:"Thumbs.db"})," files on\nWindows or ",(0,r.jsx)(n.code,{children:".DS_Store"})," files on Mac? Those are junk; they serve no specific purpose other than\nmaking previews a bit faster. If a folder is empty saved for such a file, you can remove the folder\nto clear the junk off your hard drive. That does not mean you will lose access to this folder\nforever - you can always recreate it. You have the ",(0,r.jsx)(n.em,{children:"key"}),", after all - you're the computer's owner.\nIt just means you want to keep your computer clean until you maybe need this folder again and\nrecreate it. Your address is like this folder - it gets removed from the chain when nothing is in it\nbut gets put back when it has the existential deposit."]}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsx)(n.admonition,{title:"Polkadot-JS Guides",type:"info",children:(0,r.jsxs)(n.p,{children:["If you are an advanced user, see the ",(0,r.jsx)(n.a,{href:"./learn-guides-accounts",children:"Polkadot-JS guides about accounts"}),"."]})})]})}function h(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(d,{...e})}):d(e)}},3514:(e,n,t)=>{t.d(n,{A:()=>b});t(96540);var a=t(34164),r=t(26972),o=t(28774),s=t(53465),i=t(16654),c=t(21312),l=t(51107);const u={cardContainer:"cardContainer_fWXF",cardTitle:"cardTitle_rnsV",cardDescription:"cardDescription_PWke"};var d=t(74848);function h(e){var n=e.href,t=e.children;return(0,d.jsx)(o.A,{href:n,className:(0,a.A)("card padding--lg",u.cardContainer),children:t})}function p(e){var n=e.href,t=e.icon,r=e.title,o=e.description;return(0,d.jsxs)(h,{href:n,children:[(0,d.jsxs)(l.A,{as:"h2",className:(0,a.A)("text--truncate",u.cardTitle),title:r,children:[t," ",r]}),o&&(0,d.jsx)("p",{className:(0,a.A)("text--truncate",u.cardDescription),title:o,children:o})]})}function f(e){var n,t,a=e.item,o=(0,r.Nr)(a),i=(t=(0,s.W)().selectMessage,function(e){return t(e,(0,c.T)({message:"1 item|{count} items",id:"theme.docs.DocCard.categoryDescription.plurals",description:"The default description for a category card in the generated index about how many items this category includes"},{count:e}))});return o?(0,d.jsx)(p,{href:o,icon:"\ud83d\uddc3\ufe0f",title:a.label,description:null!=(n=a.description)?n:i(a.items.length)}):null}function m(e){var n,t,a=e.item,o=(0,i.A)(a.href)?"\ud83d\udcc4\ufe0f":"\ud83d\udd17",s=(0,r.cC)(null!=(n=a.docId)?n:void 0);return(0,d.jsx)(p,{href:a.href,icon:o,title:a.label,description:null!=(t=a.description)?t:null==s?void 0:s.description})}function y(e){var n=e.item;switch(n.type){case"link":return(0,d.jsx)(m,{item:n});case"category":return(0,d.jsx)(f,{item:n});default:throw new Error("unknown item type "+JSON.stringify(n))}}function v(e){var n=e.className,t=(0,r.$S)();return(0,d.jsx)(b,{items:t.items,className:n})}function b(e){var n=e.items,t=e.className;if(!n)return(0,d.jsx)(v,Object.assign({},e));var o=(0,r.d1)(n);return(0,d.jsx)("section",{className:(0,a.A)("row",t),children:o.map((function(e,n){return(0,d.jsx)("article",{className:"col col--6 margin-bottom--lg",children:(0,d.jsx)(y,{item:e})},n)}))})}},19365:(e,n,t)=>{t.d(n,{A:()=>s});t(96540);var a=t(34164);const r={tabItem:"tabItem_Ymn6"};var o=t(74848);function s(e){var n=e.children,t=e.hidden,s=e.className;return(0,o.jsx)("div",{role:"tabpanel",className:(0,a.A)(r.tabItem,s),hidden:t,children:n})}},11470:(e,n,t)=>{t.d(n,{A:()=>j});var a=t(96540),r=t(34164),o=t(23104),s=t(56347),i=t(205),c=t(57485),l=t(31682),u=t(75376);function d(e){var n,t;return null!=(n=null==(t=a.Children.toArray(e).filter((function(e){return"\n"!==e})).map((function(e){if(!e||(0,a.isValidElement)(e)&&((n=e.props)&&"object"==typeof n&&"value"in n))return e;var n;throw new Error("Docusaurus error: Bad child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:t.filter(Boolean))?n:[]}function h(e){var n=e.values,t=e.children;return(0,a.useMemo)((function(){var e=null!=n?n:function(e){return d(e).map((function(e){var n=e.props;return{value:n.value,label:n.label,attributes:n.attributes,default:n.default}}))}(t);return function(e){var n=(0,l.XI)(e,(function(e,n){return e.value===n.value}));if(n.length>0)throw new Error('Docusaurus error: Duplicate values "'+n.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[n,t])}function p(e){var n=e.value;return e.tabValues.some((function(e){return e.value===n}))}function f(e){var n=e.queryString,t=void 0!==n&&n,r=e.groupId,o=(0,s.W6)(),i=function(e){var n=e.queryString,t=void 0!==n&&n,a=e.groupId;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=a?a:null}({queryString:t,groupId:r});return[(0,c.aZ)(i),(0,a.useCallback)((function(e){if(i){var n=new URLSearchParams(o.location.search);n.set(i,e),o.replace(Object.assign({},o.location,{search:n.toString()}))}}),[i,o])]}function m(e){var n,t,r,o,s=e.defaultValue,c=e.queryString,l=void 0!==c&&c,d=e.groupId,m=h(e),y=(0,a.useState)((function(){return function(e){var n,t=e.defaultValue,a=e.tabValues;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!p({value:t,tabValues:a}))throw new Error('Docusaurus error: The has a defaultValue "'+t+'" but none of its children has the corresponding value. Available values are: '+a.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return t}var r=null!=(n=a.find((function(e){return e.default})))?n:a[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:s,tabValues:m})})),v=y[0],b=y[1],x=f({queryString:l,groupId:d}),g=x[0],w=x[1],j=(n=function(e){return e?"docusaurus.tab."+e:null}({groupId:d}.groupId),t=(0,u.Dv)(n),r=t[0],o=t[1],[r,(0,a.useCallback)((function(e){n&&o.set(e)}),[n,o])]),k=j[0],A=j[1],T=function(){var e=null!=g?g:k;return p({value:e,tabValues:m})?e:null}();return(0,i.A)((function(){T&&b(T)}),[T]),{selectedValue:v,selectValue:(0,a.useCallback)((function(e){if(!p({value:e,tabValues:m}))throw new Error("Can't select invalid tab value="+e);b(e),w(e),A(e)}),[w,A,m]),tabValues:m}}var y=t(92303);const v={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var b=t(74848);function x(e){var n=e.className,t=e.block,a=e.selectedValue,s=e.selectValue,i=e.tabValues,c=[],l=(0,o.a_)().blockElementScrollPositionUntilNextRender,u=function(e){var n=e.currentTarget,t=c.indexOf(n),r=i[t].value;r!==a&&(l(n),s(r))},d=function(e){var n,t=null;switch(e.key){case"Enter":u(e);break;case"ArrowRight":var a,r=c.indexOf(e.currentTarget)+1;t=null!=(a=c[r])?a:c[0];break;case"ArrowLeft":var o,s=c.indexOf(e.currentTarget)-1;t=null!=(o=c[s])?o:c[c.length-1]}null==(n=t)||n.focus()};return(0,b.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,r.A)("tabs",{"tabs--block":t},n),children:i.map((function(e){var n=e.value,t=e.label,o=e.attributes;return(0,b.jsx)("li",Object.assign({role:"tab",tabIndex:a===n?0:-1,"aria-selected":a===n,ref:function(e){return c.push(e)},onKeyDown:d,onClick:u},o,{className:(0,r.A)("tabs__item",v.tabItem,null==o?void 0:o.className,{"tabs__item--active":a===n}),children:null!=t?t:n}),n)}))})}function g(e){var n=e.lazy,t=e.children,o=e.selectedValue,s=(Array.isArray(t)?t:[t]).filter(Boolean);if(n){var i=s.find((function(e){return e.props.value===o}));return i?(0,a.cloneElement)(i,{className:(0,r.A)("margin-top--md",i.props.className)}):null}return(0,b.jsx)("div",{className:"margin-top--md",children:s.map((function(e,n){return(0,a.cloneElement)(e,{key:n,hidden:e.props.value!==o})}))})}function w(e){var n=m(e);return(0,b.jsxs)("div",{className:(0,r.A)("tabs-container",v.tabList),children:[(0,b.jsx)(x,Object.assign({},n,e)),(0,b.jsx)(g,Object.assign({},n,e))]})}function j(e){var n=(0,y.A)();return(0,b.jsx)(w,Object.assign({},e,{children:d(e.children)}),String(n))}},53465:(e,n,t)=>{t.d(n,{W:()=>l});var a=t(96540),r=t(44586),o=["zero","one","two","few","many","other"];function s(e){return o.filter((function(n){return e.includes(n)}))}var i={locale:"en",pluralForms:s(["one","other"]),select:function(e){return 1===e?"one":"other"}};function c(){var e=(0,r.A)().i18n.currentLocale;return(0,a.useMemo)((function(){try{return n=e,t=new Intl.PluralRules(n),{locale:n,pluralForms:s(t.resolvedOptions().pluralCategories),select:function(e){return t.select(e)}}}catch(a){return console.error('Failed to use Intl.PluralRules for locale "'+e+'".\nDocusaurus will fallback to the default (English) implementation.\nError: '+a.message+"\n"),i}var n,t}),[e])}function l(){var e=c();return{selectMessage:function(n,t){return function(e,n,t){var a=e.split("|");if(1===a.length)return a[0];a.length>t.pluralForms.length&&console.error("For locale="+t.locale+", a maximum of "+t.pluralForms.length+" plural forms are expected ("+t.pluralForms.join(",")+"), but the message contains "+a.length+": "+e);var r=t.select(n),o=t.pluralForms.indexOf(r);return a[Math.min(o,a.length-1)]}(t,n,e)}}}},28453:(e,n,t)=>{t.d(n,{R:()=>s,x:()=>i});var a=t(96540);const r={},o=a.createContext(r);function s(e){const n=a.useContext(o);return a.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:s(e.components),a.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/c7c5ba1a.70f5d26b.js b/assets/js/c7c5ba1a.70f5d26b.js deleted file mode 100644 index 0b73a18128c7..000000000000 --- a/assets/js/c7c5ba1a.70f5d26b.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9476],{89207:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>i,default:()=>h,frontMatter:()=>s,metadata:()=>c,toc:()=>u});var a=t(74848),r=t(28453),o=(t(11470),t(19365),t(3514));const s={id:"learn-accounts",title:"Polkadot Accounts",sidebar_label:"Polkadot Accounts",description:"Polkadot Accounts, Account Identity, and Account Reaping.",keywords:["account","polkadot account","polkadotjs","indices","identity","reaping"],slug:"../learn-accounts"},i=void 0,c={id:"learn/learn-accounts",title:"Polkadot Accounts",description:"Polkadot Accounts, Account Identity, and Account Reaping.",source:"@site/../docs/learn/learn-accounts.md",sourceDirName:"learn",slug:"/learn-accounts",permalink:"/docs/learn-accounts",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-accounts.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1726731604e3,frontMatter:{id:"learn-accounts",title:"Polkadot Accounts",sidebar_label:"Polkadot Accounts",description:"Polkadot Accounts, Account Identity, and Account Reaping.",keywords:["account","polkadot account","polkadotjs","indices","identity","reaping"],slug:"../learn-accounts"},sidebar:"docs",previous:{title:"Basics",permalink:"/docs/learn-basics-index"},next:{title:"Account Balances",permalink:"/docs/learn-account-balances"}},l={},u=[{value:"Account Address",id:"account-address",level:2},{value:"Mnemonic Seed Phrase",id:"mnemonic-seed-phrase",level:3},{value:"Account Generation",id:"account-generation",level:3},{value:"Backing Up Accounts",id:"backing-up-accounts",level:3},{value:"Existential Deposit and Reaping",id:"existential-deposit-and-reaping",level:2}];function d(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",hr:"hr",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(n.admonition,{title:"User friendly wallets",type:"info",children:[(0,a.jsxs)(n.p,{children:["Create your Polkadot accounts with any of the secure and user-friendly wallets listed on the\n",(0,a.jsx)(n.a,{href:"https://www.polkadot.network/ecosystem/wallets/",children:"Polkadot website"}),"."]}),(0,a.jsxs)(n.p,{children:["See the ",(0,a.jsx)(n.a,{href:"./wallets-index",children:"Wallets"})," section for more information about different wallet options\navailable, and specifically the ",(0,a.jsx)(n.a,{href:"/docs/wallets-and-extensions",children:"wallets and extensions"})," page,\nwhich lists the user friendly wallet projects funded by the Polkadot/Kusama Treasuries or by the\n",(0,a.jsx)(n.a,{href:"/docs/grants",children:"Web3 Foundation Grants Program"}),"."]})]}),"\n",(0,a.jsxs)(n.p,{children:["This document covers the basics of accounts in the Polkadot ecosystem. See the\n",(0,a.jsx)(n.a,{href:"/docs/learn-account-advanced",children:"Advanced Account"})," page for more information about accounts such as\n",(0,a.jsx)(n.a,{href:"/docs/learn-account-advanced#derivation-paths",children:"account derivation"})," and\n",(0,a.jsx)(n.a,{href:"/docs/learn-account-advanced#indices",children:"indices"}),". For a more in-depth explanation of the cryptography\nbehind accounts, please see the ",(0,a.jsx)(n.a,{href:"/docs/learn-cryptography",children:"cryptography page"}),"."]}),"\n",(0,a.jsx)(o.A,{}),"\n",(0,a.jsx)(n.h2,{id:"account-address",children:"Account Address"}),"\n",(0,a.jsx)(n.p,{children:"An address is the public part of an account. The private part is the key used to access this\naddress. The public and private parts together make up an account. You can think of the public\naddress of your account, like your mailbox and the private key like the key to open that mailbox.\nAnybody can send mail to your mailbox, but only you can access it as only you have access to its\nkey. In the context of accounts, anybody can send tokens to your public address, but only you can\ntransact with them using your private key. That is why you should keep your private key secret."}),"\n",(0,a.jsx)(n.h3,{id:"mnemonic-seed-phrase",children:"Mnemonic Seed Phrase"}),"\n",(0,a.jsxs)(n.p,{children:["A user's account requires a private key that can sign on to one of the\n",(0,a.jsx)(n.a,{href:"/docs/build-protocol-info#cryptography",children:"supported curves and signature schemes"}),". Without a\nprivate key, an account cannot sign anything. In Polkadot, there are some exceptions of accounts\nthat do not have known private keys (i.e. keyless accounts). Such accounts are\n",(0,a.jsx)(n.a,{href:"/docs/learn-account-multisig",children:"multi-signature accounts"}),",\n",(0,a.jsx)(n.a,{href:"/docs/learn-proxies-pure#anonymous-proxy-pure-proxy",children:"pure proxies"}),", and\n",(0,a.jsx)(n.a,{href:"/docs/learn-account-advanced#system-accounts",children:"system accounts"})," that are not discussed here and are\nmeant for an advanced audience."]}),"\n",(0,a.jsx)(n.p,{children:"A typical 12-word mnemonic seed phrase is shown below."}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"'caution juice atom organ advance problem want pledge someone senior holiday very'\n"})}),"\n",(0,a.jsxs)(n.p,{children:["Its corresponding ",(0,a.jsx)(n.em,{children:"private/public keypair"})," is also shown."]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"Secret seed (Private key): 0x056a6a4e203766ffbea3146967ef25e9daf677b14dc6f6ed8919b1983c9bebbc\nPublic key (SS58): 5F3sa2TJAWMqDhXG6jhV4N8ko9SxwGy8TpaNS1repo5EYjQX\n"})}),"\n",(0,a.jsxs)(n.p,{children:["Polkadot default address format is the ",(0,a.jsx)(n.code,{children:"MultiAddress"})," type. This means the same mnemonic phrase will\ngenerate public keys for different parachains. For more information, see the\n",(0,a.jsx)(n.a,{href:"/docs/learn-account-advanced#address-format",children:"Address Format"})," section on the\n",(0,a.jsx)(n.a,{href:"/docs/learn-account-advanced",children:"Advanced Account"})," page."]}),"\n",(0,a.jsx)(n.h3,{id:"account-generation",children:"Account Generation"}),"\n",(0,a.jsx)(n.p,{children:"Usually, there are two ways of generating a mnemonic seed:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:'On a "hot" device, i.e. a device that is connected to the internet'}),"\n",(0,a.jsx)(n.li,{children:'On a "cold" device, i.e. a device that is not (and ideally will never be) connected to the\ninternet'}),"\n"]}),"\n",(0,a.jsx)(n.p,{children:"Hot wallets are susceptible to a wide range of attacks, so it is recommended to use cold wallets\nwhen dealing with non-trivial amounts of funds."}),"\n",(0,a.jsxs)(n.p,{children:["Generating a mnemonic seed on a browser extension or a mobile application will create a hot key or\nhot wallet. Create your Polkadot accounts with a secure and user-friendly wallet listed on the\n",(0,a.jsx)(n.a,{href:"https://www.polkadot.network/ecosystem/wallets/",children:"Polkadot website"}),". See also the\n",(0,a.jsx)(n.a,{href:"./wallets-index",children:"Wallets"})," section for more information about wallets and the\n",(0,a.jsx)(n.a,{href:"/docs/wallets-and-extensions",children:"wallets and extensions"})," page for wallets and browser\nextensions funded by the Polkadot/Kusama Treasuries or by the\n",(0,a.jsx)(n.a,{href:"/docs/grants",children:"Web3 Foundation Grants Program"}),"."]}),"\n",(0,a.jsxs)(n.p,{children:["Cold keys are generated on special devices such as those provided by ",(0,a.jsx)(n.a,{href:"/docs/ledger",children:"Ledger"}),".\nAdditionally, you can generate your account using the ",(0,a.jsx)(n.a,{href:"/docs/polkadot-vault",children:"Polkadot Vault"}),"\nmobile app (you need a dedicated air-gapped Android or iOS-compatible smartphone that you are\ncomfortable using only for Polkadot Vault), or a dedicated hardware implementation of Polkadot Vault\nsuch as ",(0,a.jsx)(n.a,{href:"https://www.kampe.la/",children:"the Kampela Signer"}),"."]}),"\n",(0,a.jsxs)(n.p,{children:["Usually, browser extensions and mobile devices have options to securely import accounts from cold\nwallets. Note that the private keys of those accounts will remain on the cold wallet, meaning that\nyou will always need the device to sign any transaction. Exceptions exist where you can generate hot\nwallet based ",(0,a.jsx)(n.a,{href:"/docs/learn-proxies",children:"proxy accounts"})," and sign on behalf of a cold wallet account\nwithout connecting the cold device. This is practical, especially for transactions made frequently."]}),"\n",(0,a.jsx)(n.h3,{id:"backing-up-accounts",children:"Backing Up Accounts"}),"\n",(0,a.jsx)(n.p,{children:"Depending on what software you use to access your account, there are various ways to back up and\nrestore your account. It is a good idea to back your information up and keep it secure. In general,\nas long as you know how you created your account and have the mnemonic seed phrase or the JSON\nbackup file (and password) stored securely, you can restore your account."}),"\n",(0,a.jsx)(n.h2,{id:"existential-deposit-and-reaping",children:"Existential Deposit and Reaping"}),"\n",(0,a.jsx)(n.admonition,{type:"info",children:(0,a.jsxs)(n.p,{children:["Visit\n",(0,a.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000168651-what-is-the-existential-deposit-",children:(0,a.jsx)(n.strong,{children:"this support page"})}),"\nfor more information about existential deposit."]})}),"\n",(0,a.jsxs)(n.p,{children:["When you generate an account (address), you only generate a ",(0,a.jsx)(n.em,{children:"key"})," that lets you access it. The\naccount does not exist yet on-chain. For that, it needs the\n",(0,a.jsx)(n.a,{href:"/docs/chain-state-values#existential-deposit",children:"existential deposit"}),"."]}),"\n",(0,a.jsxs)(n.p,{children:["Having an account go below the existential deposit causes that account to be ",(0,a.jsx)(n.em,{children:"reaped"}),". The account\nwill be wiped from the blockchain's state to conserve space, along with any funds in that address.\nYou do not lose access to the reaped address - as long as you have your private key or recovery\nphrase, you can still use the address - but it needs a top-up of another existential deposit to be\nable to interact with the chain."]}),"\n",(0,a.jsxs)(n.p,{children:["Transaction fees cannot cause an account to be reaped. Since fees are deducted from the account\nbefore any other transaction logic, accounts with balances ",(0,a.jsx)(n.em,{children:"equal to"})," the existential deposit cannot\nconstruct a valid transaction. Additional funds will need to be added to cover the transaction fees."]}),"\n",(0,a.jsx)(n.admonition,{title:"The existential deposit can be different on parachains",type:"info",children:(0,a.jsx)(n.p,{children:"Having an Existential Deposit (ED) on the relay chain account does not guarantee the liveness of the\nsame account on its system chains or parachains. Parachains typically define ED for an account in\ntheir native tokens but can also configure it with tokens that are deemed sufficient. For example,\nthe Existential Deposit on Polkadot Asset Hub can be in DOT or sufficient assets like USDC or USDT."})}),"\n",(0,a.jsxs)(n.p,{children:["Here's another way to think about existential deposits. Ever notice those ",(0,a.jsx)(n.code,{children:"Thumbs.db"})," files on\nWindows or ",(0,a.jsx)(n.code,{children:".DS_Store"})," files on Mac? Those are junk; they serve no specific purpose other than\nmaking previews a bit faster. If a folder is empty saved for such a file, you can remove the folder\nto clear the junk off your hard drive. That does not mean you will lose access to this folder\nforever - you can always recreate it. You have the ",(0,a.jsx)(n.em,{children:"key"}),", after all - you're the computer's owner.\nIt just means you want to keep your computer clean until you maybe need this folder again and\nrecreate it. Your address is like this folder - it gets removed from the chain when nothing is in it\nbut gets put back when it has the existential deposit."]}),"\n",(0,a.jsx)(n.hr,{}),"\n",(0,a.jsx)(n.admonition,{title:"Polkadot-JS Guides",type:"info",children:(0,a.jsxs)(n.p,{children:["If you are an advanced user, see the ",(0,a.jsx)(n.a,{href:"./learn-guides-accounts",children:"Polkadot-JS guides about accounts"}),"."]})})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(d,{...e})}):d(e)}},3514:(e,n,t)=>{t.d(n,{A:()=>b});t(96540);var a=t(34164),r=t(26972),o=t(28774),s=t(53465),i=t(16654),c=t(21312),l=t(51107);const u={cardContainer:"cardContainer_fWXF",cardTitle:"cardTitle_rnsV",cardDescription:"cardDescription_PWke"};var d=t(74848);function h(e){var n=e.href,t=e.children;return(0,d.jsx)(o.A,{href:n,className:(0,a.A)("card padding--lg",u.cardContainer),children:t})}function p(e){var n=e.href,t=e.icon,r=e.title,o=e.description;return(0,d.jsxs)(h,{href:n,children:[(0,d.jsxs)(l.A,{as:"h2",className:(0,a.A)("text--truncate",u.cardTitle),title:r,children:[t," ",r]}),o&&(0,d.jsx)("p",{className:(0,a.A)("text--truncate",u.cardDescription),title:o,children:o})]})}function f(e){var n,t,a=e.item,o=(0,r.Nr)(a),i=(t=(0,s.W)().selectMessage,function(e){return t(e,(0,c.T)({message:"1 item|{count} items",id:"theme.docs.DocCard.categoryDescription.plurals",description:"The default description for a category card in the generated index about how many items this category includes"},{count:e}))});return o?(0,d.jsx)(p,{href:o,icon:"\ud83d\uddc3\ufe0f",title:a.label,description:null!=(n=a.description)?n:i(a.items.length)}):null}function m(e){var n,t,a=e.item,o=(0,i.A)(a.href)?"\ud83d\udcc4\ufe0f":"\ud83d\udd17",s=(0,r.cC)(null!=(n=a.docId)?n:void 0);return(0,d.jsx)(p,{href:a.href,icon:o,title:a.label,description:null!=(t=a.description)?t:null==s?void 0:s.description})}function y(e){var n=e.item;switch(n.type){case"link":return(0,d.jsx)(m,{item:n});case"category":return(0,d.jsx)(f,{item:n});default:throw new Error("unknown item type "+JSON.stringify(n))}}function v(e){var n=e.className,t=(0,r.$S)();return(0,d.jsx)(b,{items:t.items,className:n})}function b(e){var n=e.items,t=e.className;if(!n)return(0,d.jsx)(v,Object.assign({},e));var o=(0,r.d1)(n);return(0,d.jsx)("section",{className:(0,a.A)("row",t),children:o.map((function(e,n){return(0,d.jsx)("article",{className:"col col--6 margin-bottom--lg",children:(0,d.jsx)(y,{item:e})},n)}))})}},19365:(e,n,t)=>{t.d(n,{A:()=>s});t(96540);var a=t(34164);const r={tabItem:"tabItem_Ymn6"};var o=t(74848);function s(e){var n=e.children,t=e.hidden,s=e.className;return(0,o.jsx)("div",{role:"tabpanel",className:(0,a.A)(r.tabItem,s),hidden:t,children:n})}},11470:(e,n,t)=>{t.d(n,{A:()=>j});var a=t(96540),r=t(34164),o=t(23104),s=t(56347),i=t(205),c=t(57485),l=t(31682),u=t(75376);function d(e){var n,t;return null!=(n=null==(t=a.Children.toArray(e).filter((function(e){return"\n"!==e})).map((function(e){if(!e||(0,a.isValidElement)(e)&&((n=e.props)&&"object"==typeof n&&"value"in n))return e;var n;throw new Error("Docusaurus error: Bad child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:t.filter(Boolean))?n:[]}function h(e){var n=e.values,t=e.children;return(0,a.useMemo)((function(){var e=null!=n?n:function(e){return d(e).map((function(e){var n=e.props;return{value:n.value,label:n.label,attributes:n.attributes,default:n.default}}))}(t);return function(e){var n=(0,l.XI)(e,(function(e,n){return e.value===n.value}));if(n.length>0)throw new Error('Docusaurus error: Duplicate values "'+n.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[n,t])}function p(e){var n=e.value;return e.tabValues.some((function(e){return e.value===n}))}function f(e){var n=e.queryString,t=void 0!==n&&n,r=e.groupId,o=(0,s.W6)(),i=function(e){var n=e.queryString,t=void 0!==n&&n,a=e.groupId;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=a?a:null}({queryString:t,groupId:r});return[(0,c.aZ)(i),(0,a.useCallback)((function(e){if(i){var n=new URLSearchParams(o.location.search);n.set(i,e),o.replace(Object.assign({},o.location,{search:n.toString()}))}}),[i,o])]}function m(e){var n,t,r,o,s=e.defaultValue,c=e.queryString,l=void 0!==c&&c,d=e.groupId,m=h(e),y=(0,a.useState)((function(){return function(e){var n,t=e.defaultValue,a=e.tabValues;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!p({value:t,tabValues:a}))throw new Error('Docusaurus error: The has a defaultValue "'+t+'" but none of its children has the corresponding value. Available values are: '+a.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return t}var r=null!=(n=a.find((function(e){return e.default})))?n:a[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:s,tabValues:m})})),v=y[0],b=y[1],x=f({queryString:l,groupId:d}),g=x[0],w=x[1],j=(n=function(e){return e?"docusaurus.tab."+e:null}({groupId:d}.groupId),t=(0,u.Dv)(n),r=t[0],o=t[1],[r,(0,a.useCallback)((function(e){n&&o.set(e)}),[n,o])]),k=j[0],A=j[1],T=function(){var e=null!=g?g:k;return p({value:e,tabValues:m})?e:null}();return(0,i.A)((function(){T&&b(T)}),[T]),{selectedValue:v,selectValue:(0,a.useCallback)((function(e){if(!p({value:e,tabValues:m}))throw new Error("Can't select invalid tab value="+e);b(e),w(e),A(e)}),[w,A,m]),tabValues:m}}var y=t(92303);const v={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var b=t(74848);function x(e){var n=e.className,t=e.block,a=e.selectedValue,s=e.selectValue,i=e.tabValues,c=[],l=(0,o.a_)().blockElementScrollPositionUntilNextRender,u=function(e){var n=e.currentTarget,t=c.indexOf(n),r=i[t].value;r!==a&&(l(n),s(r))},d=function(e){var n,t=null;switch(e.key){case"Enter":u(e);break;case"ArrowRight":var a,r=c.indexOf(e.currentTarget)+1;t=null!=(a=c[r])?a:c[0];break;case"ArrowLeft":var o,s=c.indexOf(e.currentTarget)-1;t=null!=(o=c[s])?o:c[c.length-1]}null==(n=t)||n.focus()};return(0,b.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,r.A)("tabs",{"tabs--block":t},n),children:i.map((function(e){var n=e.value,t=e.label,o=e.attributes;return(0,b.jsx)("li",Object.assign({role:"tab",tabIndex:a===n?0:-1,"aria-selected":a===n,ref:function(e){return c.push(e)},onKeyDown:d,onClick:u},o,{className:(0,r.A)("tabs__item",v.tabItem,null==o?void 0:o.className,{"tabs__item--active":a===n}),children:null!=t?t:n}),n)}))})}function g(e){var n=e.lazy,t=e.children,o=e.selectedValue,s=(Array.isArray(t)?t:[t]).filter(Boolean);if(n){var i=s.find((function(e){return e.props.value===o}));return i?(0,a.cloneElement)(i,{className:(0,r.A)("margin-top--md",i.props.className)}):null}return(0,b.jsx)("div",{className:"margin-top--md",children:s.map((function(e,n){return(0,a.cloneElement)(e,{key:n,hidden:e.props.value!==o})}))})}function w(e){var n=m(e);return(0,b.jsxs)("div",{className:(0,r.A)("tabs-container",v.tabList),children:[(0,b.jsx)(x,Object.assign({},n,e)),(0,b.jsx)(g,Object.assign({},n,e))]})}function j(e){var n=(0,y.A)();return(0,b.jsx)(w,Object.assign({},e,{children:d(e.children)}),String(n))}},53465:(e,n,t)=>{t.d(n,{W:()=>l});var a=t(96540),r=t(44586),o=["zero","one","two","few","many","other"];function s(e){return o.filter((function(n){return e.includes(n)}))}var i={locale:"en",pluralForms:s(["one","other"]),select:function(e){return 1===e?"one":"other"}};function c(){var e=(0,r.A)().i18n.currentLocale;return(0,a.useMemo)((function(){try{return n=e,t=new Intl.PluralRules(n),{locale:n,pluralForms:s(t.resolvedOptions().pluralCategories),select:function(e){return t.select(e)}}}catch(a){return console.error('Failed to use Intl.PluralRules for locale "'+e+'".\nDocusaurus will fallback to the default (English) implementation.\nError: '+a.message+"\n"),i}var n,t}),[e])}function l(){var e=c();return{selectMessage:function(n,t){return function(e,n,t){var a=e.split("|");if(1===a.length)return a[0];a.length>t.pluralForms.length&&console.error("For locale="+t.locale+", a maximum of "+t.pluralForms.length+" plural forms are expected ("+t.pluralForms.join(",")+"), but the message contains "+a.length+": "+e);var r=t.select(n),o=t.pluralForms.indexOf(r);return a[Math.min(o,a.length-1)]}(t,n,e)}}}},28453:(e,n,t)=>{t.d(n,{R:()=>s,x:()=>i});var a=t(96540);const r={},o=a.createContext(r);function s(e){const n=a.useContext(o);return a.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:s(e.components),a.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/c8dd560b.37fedf94.js b/assets/js/c8dd560b.37fedf94.js new file mode 100644 index 000000000000..018c279afc74 --- /dev/null +++ b/assets/js/c8dd560b.37fedf94.js @@ -0,0 +1 @@ +(self.webpackChunk=self.webpackChunk||[]).push([[4293],{13699:(e,t,n)=>{"use strict";n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>l,default:()=>h,frontMatter:()=>a,metadata:()=>o,toc:()=>u});const o=JSON.parse('{"id":"learn/learn-guides-accounts-proxy-pure","title":"Polkadot-JS Guides about Pure Proxy Accounts","description":"Polkadot-JS Guides about Pure Proxy Accounts","source":"@site/../docs/learn/learn-guides-accounts-proxy-pure.md","sourceDirName":"learn","slug":"/learn-guides-accounts-proxy-pure","permalink":"/docs/learn-guides-accounts-proxy-pure","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-accounts-proxy-pure.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1729847256000,"frontMatter":{"id":"learn-guides-accounts-proxy-pure","title":"Polkadot-JS Guides about Pure Proxy Accounts","sidebar_label":"Pure Proxy Guides","description":"Polkadot-JS Guides about Pure Proxy Accounts","keyword":["guides","polkadot-js","accounts","proxy","pure proxy","anonymous proxy"],"slug":"../learn-guides-accounts-proxy-pure"},"sidebar":"docs","previous":{"title":"Proxy Guides","permalink":"/docs/learn-guides-accounts-proxy"},"next":{"title":"Transfer Guides","permalink":"/docs/learn-guides-transfers"}}');var s=n(74848),r=n(28453),i=(n(47379),n(67141));const a={id:"learn-guides-accounts-proxy-pure",title:"Polkadot-JS Guides about Pure Proxy Accounts",sidebar_label:"Pure Proxy Guides",description:"Polkadot-JS Guides about Pure Proxy Accounts",keyword:["guides","polkadot-js","accounts","proxy","pure proxy","anonymous proxy"],slug:"../learn-guides-accounts-proxy-pure"},l=void 0,c={},u=[{value:"Create and Remove Pure Proxies with Polkadot-JS",id:"create-and-remove-pure-proxies-with-polkadot-js",level:2},{value:"Advanced Account Management with Pure Proxies",id:"advanced-account-management-with-pure-proxies",level:2},{value:"Pure Proxies and Multisigs",id:"pure-proxies-and-multisigs",level:2},{value:"Scenario One: One Pure Proxy within a Multisig",id:"scenario-one-one-pure-proxy-within-a-multisig",level:3},{value:"Scenario Two: Multisig made of Pure Proxies",id:"scenario-two-multisig-made-of-pure-proxies",level:3},{value:"Scenario Three: Multisig controlling a Pure Proxy",id:"scenario-three-multisig-controlling-a-pure-proxy",level:3}];function d(e){const t={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(i.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the Polkadot-JS UI, you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,s.jsxs)(t.admonition,{title:"The Account Tab in the Polkadot-JS UI cannot handle complex proxy setups",type:"caution",children:[(0,s.jsxs)(t.p,{children:["The Accounts Tab in the Polkadot-JS UI cannot handle complex proxy setups (e.g. a proxy -> multisig\n-> a pure proxy which is part of another multisig). These complex setups must be done using the\n",(0,s.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/extrinsics",children:"Extrinsics Tab"})," directly."]}),(0,s.jsxs)(t.p,{children:[(0,s.jsxs)(t.strong,{children:["We recommend to use the ",(0,s.jsx)(t.a,{href:"/docs/learn-DOT#getting-tokens-on-the-westend-testnet",children:"Westend Testnet"})," if\nyou are testing features for the first time."]})," By performing the complex proxy setups on the\ntestnet, you can comfortably replicate the procedure on the main networks."]})]}),"\n",(0,s.jsx)(t.admonition,{title:"Risk of loss of funds",type:"danger",children:(0,s.jsx)(t.p,{children:"Read carefully the text below and before performing any action using pure proxies, experiment on the\nWestend testnet."})}),"\n",(0,s.jsx)(t.h2,{id:"create-and-remove-pure-proxies-with-polkadot-js",children:"Create and Remove Pure Proxies with Polkadot-JS"}),"\n",(0,s.jsxs)(t.p,{children:["To create a ",(0,s.jsx)(t.strong,{children:"pure proxy"})," see\n",(0,s.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000182196",children:"this support article"}),", or\nwatch ",(0,s.jsx)(t.a,{href:"https://www.youtube.com/watch?v=T443RcCYP24",children:"this technical explainer video"}),"."]}),"\n",(0,s.jsx)(t.admonition,{title:"Removing Pure Proxies",type:"caution",children:(0,s.jsxs)(t.p,{children:["The procedure for removing a ",(0,s.jsx)(t.em,{children:"pure"}),' proxy is different from the one used to remove other proxies.\nVisit the section "Removing an Anonymous Proxy" on\n',(0,s.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000182196",children:"this support article"}),", or\nwatch ",(0,s.jsx)(t.a,{href:"https://www.youtube.com/watch?v=T443RcCYP24",children:"this technical explainer video"}),"."]})}),"\n",(0,s.jsxs)(t.p,{children:["Learn more about pure proxies from our\n",(0,s.jsx)(t.a,{href:"https://www.youtube.com/watch?v=YkYApbhU3i0",children:"technical explainer video"}),"."]}),"\n",(0,s.jsx)(t.h2,{id:"advanced-account-management-with-pure-proxies",children:"Advanced Account Management with Pure Proxies"}),"\n",(0,s.jsx)(t.admonition,{title:"Walk-through tutorial video of Account Management",type:"info",children:(0,s.jsxs)(t.p,{children:["You can see ",(0,s.jsx)(t.a,{href:"https://www.youtube.com/watch?v=YkYApbhU3i0",children:"this video tutorial"})," that goes through the\nexample below. The tutorial requires some familiarity with the Extrinsic Tab of the Polkadot-JS UI."]})}),"\n",(0,s.jsx)(t.p,{children:"Let's take for example 3 accounts belonging to Charlie, Dan and Eleanor working for Company X.\nCharlie holds funds belonging to Company X, but he wants to leave the company and transfer the\neconomic responsibility to Eleanor. Dan is a staking proxy of Charlie."}),"\n",(0,s.jsxs)(t.p,{children:[(0,s.jsxs)(t.strong,{children:["Without ",(0,s.jsx)(t.em,{children:"Pure"})," Proxy"]}),", Charlie must (see ",(0,s.jsx)(t.em,{children:"left"})," side of the Figure below):"]}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:"Remove Dan as a staking proxy, this step requires 1 signature"}),"\n",(0,s.jsx)(t.li,{children:"Stop nominating and unbound all funds , this step requires 2 signatures"}),"\n",(0,s.jsx)(t.li,{children:"Transfer the funds to Eleanor, this step requires 1 signature"}),"\n"]}),"\n",(0,s.jsx)(t.p,{children:"Then Eleanor adds Dan as a staking proxy (1 signature). The whole process requires 5 signatures.\nHere we are presenting a simple example, in fact, with multi-signature accounts and multiple proxies\nthe procedure would be more time-consuming and labor-intensive."}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{alt:"why anonymous proxies",src:n(79022).A+"",width:"1920",height:"800"})}),"\n",(0,s.jsxs)(t.p,{children:[(0,s.jsxs)(t.strong,{children:["With ",(0,s.jsx)(t.em,{children:"Pure"})," Proxy"]})," (see ",(0,s.jsx)(t.em,{children:"right"})," side of the Figure above), Charlie must add Eleanor as ",(0,s.jsx)(t.em,{children:"any"}),"\nproxy of the ",(0,s.jsx)(t.em,{children:"pure"})," proxy, and remove himself (or Eleanor can remove him). The process requires just\n2 signatures (1 signature to add the new ",(0,s.jsx)(t.em,{children:"any"})," proxy and 1 signature the remove the old one). The\nfunds remain in the ",(0,s.jsx)(t.em,{children:"pure"})," proxy, and it is not necessary to stop nominating or unbond funds. Also,\nany proxy relationships with the ",(0,s.jsx)(t.em,{children:"pure"})," proxy stay in place. Thus, if we use the ",(0,s.jsx)(t.em,{children:"pure"})," proxy, with\nan increasing number of proxies we will always have to sign twice (not necessarily true in\nmulti-signature accounts). While if we are not using the ",(0,s.jsx)(t.em,{children:"pure"})," proxy, the more the proxies the more\nsignatures we need to detach them from the old stash and attach them to the new stash (see Figure\nbelow)."]}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{alt:"anon vs stash plot",src:n(47862).A+"",width:"1920",height:"800"})}),"\n",(0,s.jsx)(t.h2,{id:"pure-proxies-and-multisigs",children:"Pure Proxies and Multisigs"}),"\n",(0,s.jsx)(t.h3,{id:"scenario-one-one-pure-proxy-within-a-multisig",children:"Scenario One: One Pure Proxy within a Multisig"}),"\n",(0,s.jsx)(t.admonition,{title:"Walk-through tutorial video",type:"info",children:(0,s.jsxs)(t.p,{children:["You can see ",(0,s.jsx)(t.a,{href:"https://www.youtube.com/watch?v=iGRoGstB_pQ",children:"this video tutorial"})," that goes through\nthis scenario. The tutorial requires some familiarity with the Extrinsic Tab of the Polkadot-JS UI."]})}),"\n",(0,s.jsxs)(t.p,{children:["It is possible to put a ",(0,s.jsx)(t.em,{children:"pure"})," proxy within a multisig, and then transactions will be signed by the\n",(0,s.jsx)(t.em,{children:"any"})," proxy on behalf of the ",(0,s.jsx)(t.em,{children:"pure"})," proxy (proxied account). Let's take for example the diagram\nbelow. Alice, Bob and Anon are part of the multisig ABC, a multisig account with threshold 2. P-C is\na ",(0,s.jsx)(t.em,{children:"pure"})," proxy spawned by Charlie, who now acts as ",(0,s.jsx)(t.em,{children:"any"})," proxy and thus signs anything on behalf of\nP-C. The ",(0,s.jsx)(t.em,{children:"pure"})," proxy cannot sign directly because it does not have a private key. So, for example,\nto send funds from the multisig to Dan, Charly needs to submit a ",(0,s.jsx)(t.code,{children:"proxy.proxy"})," extrinsic to P-C,\nwhich in turn will submit a ",(0,s.jsx)(t.code,{children:"multisig.asMulti"})," extrinsic to ABC containing the call data for the\n",(0,s.jsx)(t.code,{children:"balances.transferKeepAlive"})," extrinsic about the transfer of some funds from ABC to Dan. Alice can\nthen approve the transfer by submitting a ",(0,s.jsx)(t.code,{children:"multisig.asMulti"})," extrinsic also containing the call data\nfor the ",(0,s.jsx)(t.code,{children:"balances.transferKeepAlive"})," extrinsic about the transfer of some funds from ABC to Dan."]}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{alt:"multisig with one anon",src:n(87091).A+"",width:"1920",height:"800"})}),"\n",(0,s.jsxs)(t.p,{children:["If Charly wants to leave the multisig, a new ",(0,s.jsx)(t.em,{children:"any"})," proxy can be added to P-C and Charly can be\nremoved (by himself or by the new ",(0,s.jsx)(t.em,{children:"any"})," proxy). Note that the multisig also contains Bob that in\nthis specific example does not do anything."]}),"\n",(0,s.jsx)(t.admonition,{title:"Proxy calls",type:"note",children:(0,s.jsxs)(t.p,{children:["To use a ",(0,s.jsx)(t.em,{children:"pure"})," proxy within a multisig you need to use the Extrinsic Tab and generate a\n",(0,s.jsx)(t.code,{children:"proxy.proxy"})," extrinsic. If you try to sign a multisig transaction using the ",(0,s.jsx)(t.em,{children:"pure"})," proxy you will\nbe prompted with a warning. Remember, you cannot sign something directly if you do not have a\nprivate key."]})}),"\n",(0,s.jsx)(t.h3,{id:"scenario-two-multisig-made-of-pure-proxies",children:"Scenario Two: Multisig made of Pure Proxies"}),"\n",(0,s.jsx)(t.admonition,{title:"Walk-through Tutorial Video",type:"info",children:(0,s.jsxs)(t.p,{children:["You can see ",(0,s.jsx)(t.a,{href:"https://www.youtube.com/watch?v=F82C3zDNJyk",children:"this video tutorial"})," that goes through\nthis scenario. The tutorial requires some familiarity with the Extrinsic Tab of the Polkadot-JS UI."]})}),"\n",(0,s.jsxs)(t.p,{children:["The diagram below shows a multisig that is made only with ",(0,s.jsx)(t.em,{children:"pure"})," proxies (P-A, P-B and P-C). In this\nsituation Alice, Bob or Charly can leave the multisig at any time without the requirement of\ncreating a new multisig. If for example, Bob leaves the multisig the procedure will require somebody\nelse to be added as ",(0,s.jsx)(t.em,{children:"any"})," proxy to P-B, and then Bob can remove himself (or the new ",(0,s.jsx)(t.em,{children:"any"})," proxy can\nremove Bob)."]}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{alt:"multisig with anons",src:n(79947).A+"",width:"1920",height:"800"})}),"\n",(0,s.jsxs)(t.p,{children:["In the diagram above, Alice submits the ",(0,s.jsx)(t.code,{children:"proxy.proxy"})," extrinsic to P-A, which in turn submits the\n",(0,s.jsx)(t.code,{children:"multisig.asMulti"})," extrinsic containing the ",(0,s.jsx)(t.code,{children:"balances.transferKeepAlive"})," extrinsic about the\ntransfer of some tokens from ABC to Dan. Then, Charly does the same to confirm the transaction. Note\nthat Charly will need to pay for some weight, for the computation that is necessary to execute the\ntransaction."]}),"\n",(0,s.jsx)(t.h3,{id:"scenario-three-multisig-controlling-a-pure-proxy",children:"Scenario Three: Multisig controlling a Pure Proxy"}),"\n",(0,s.jsxs)(t.p,{children:["This setup is used by the ",(0,s.jsx)(t.a,{href:"/docs/multisig-apps#multix",children:"MultiX"})," tool."]}),"\n",(0,s.jsxs)(t.p,{children:["After its creation, a multi-signature account creates a pure proxy that becomes the proxied account.\nThe multi-signature account behaves as ",(0,s.jsx)(t.em,{children:"any"})," proxy of the pure. If signatories of the\nmulti-signature account change, a new multisig can be created, assigned as ",(0,s.jsx)(t.em,{children:"any"})," proxy of the pure,\nand then the old multisig can be removed as a proxy."]}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{alt:"multisig with pure",src:n(4782).A+"",width:"1920",height:"800"})}),"\n",(0,s.jsxs)(t.p,{children:["Compared to ",(0,s.jsx)(t.a,{href:"#scenario-two-multisig-made-of-pure-proxies",children:"Scenario Two"}),", signatories do not need to\ncreate pure proxies here. Multisig controlling a Pure Proxy is a more practical solution, where the\nsignatories, number of signatories and/or the threshold can be changed, which changes the multisig\naddress but does not impact the pure proxy address. In Scenario Two, if signatories behind the pure\nproxies change, the address of the multisig stays the same. However, changing the number of\nsignatories and threshold would not be possible."]})]})}function h(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},67141:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var o=n(96540),s=n(74848);const r=function(e){var t,n=e.message,r=(0,o.useState)(!0),i=r[0],a=r[1];return(0,s.jsx)(s.Fragment,{children:i&&(0,s.jsxs)("div",{className:"message-box",children:[(0,s.jsx)("button",{className:"close-button",onClick:function(){a(!1)},children:"\u2716 "}),(0,s.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(t=n,t.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},47379:(e,t,n)=>{"use strict";n.d(t,{A:()=>h});var o=n(90675),s=n(10467),r=n(96540),i=n(19588),a=n(2026),l=n(11135);function c(e,t,n){return u.apply(this,arguments)}function u(){return(u=(0,s.A)((0,o.A)().mark((function e(t,n,s){var r,l,c,u,d;return(0,o.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=void 0,l=void 0,e.t0=t,e.next="polkadot"===e.t0?5:"kusama"===e.t0?7:"statemine"===e.t0?9:"statemint"===e.t0?11:"polkadotpeople"===e.t0?13:"kusamapeople"===e.t0?15:17;break;case 5:return r="wss://rpc.polkadot.io",e.abrupt("break",18);case 7:return r="wss://kusama-rpc.polkadot.io/",e.abrupt("break",18);case 9:return r="wss://statemine-rpc.polkadot.io/",e.abrupt("break",18);case 11:return r="wss://statemint-rpc.polkadot.io/",e.abrupt("break",18);case 13:return r="wss://polkadot-people-rpc.polkadot.io/",e.abrupt("break",18);case 15:return r="wss://kusama-people-rpc.polkadot.io/",e.abrupt("break",18);case 17:console.log("Unknown socket url provided, no connection made.");case 18:if(void 0!==r){e.next=22;break}return e.abrupt("return");case 22:return c=new i.E(r),e.next=25,a.G.create({provider:c});case 25:u=e.sent,(d=n.split(".")).forEach((function(e){e in u&&(u=u[e])})),e.t1=d[0],e.next="consts"===e.t1?31:"query"===e.t1?33:38;break;case 31:return l=u.toString(),e.abrupt("break",39);case 33:return e.next=35,u();case 35:return l=(l=e.sent).toString(),e.abrupt("break",39);case 38:console.log("Unknown path prefix ("+d[0]+") in "+n);case 39:return e.abrupt("return",l);case 40:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function d(e,t,n,o){switch(t){case"humanReadable":(0,l.HumanReadable)(e,n,o);break;case"precise":(0,l.Precise)(e,n,o);break;case"blocksToDays":(0,l.BlocksToDays)(e,o);break;case"erasToDays":(0,l.ErasToDays)(e,o,n);break;case"percentage":(0,l.Percentage)(e,o);break;case"permillToPercent":(0,l.PermillToPercent)(e,o);break;case"arrayLength":(0,l.ArrayLength)(e,o);break;default:return void console.log("Ignoring unknown filter type")}}const h=function(e){var t=e.network,n=e.path,i=e.defaultValue,a=e.filter,l=void 0===a?void 0:a,u=(0,r.useState)(""),h=u[0],p=u[1];return t=t.toLowerCase(),(0,r.useEffect)((function(){void 0!==l?d(i.toString(),l,t,p):p(i.toString());var e=void 0;switch(t){case"polkadot":e="wss://rpc.polkadot.io";break;case"kusama":e="wss://kusama-rpc.polkadot.io/";break;case"statemine":e="wss://kusama-asset-hub-rpc.polkadot.io/";break;case"statemint":e="wss://polkadot-asset-hub-rpc.polkadot.io/";break;case"kusamapeople":e="wss://kusama-people-rpc.polkadot.io";break;case"polkadotpeople":e="wss://polkadot-people-rpc.polkadot.io";break;default:console.log("Unknown network provided, "+t)}if(void 0===e)console.log("Failed to connect to a valid websocket, applying default");else{var r=function(){var e=(0,s.A)((0,o.A)().mark((function e(){var s;return(0,o.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,c(t,n,p);case 2:if(void 0!==(s=e.sent)){e.next=7;break}return e.abrupt("return");case 7:void 0!==l?d(s,l,t,p):p(s);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();try{r()}catch(a){console.log(a)}}}),[]),h}},11135:e=>{var t="polkadot",n="kusama",o="statemine",s="statemint",r="polkadotpeople",i="kusamapeople",a={polkadot:{precision:1e10,symbol:"DOT"},kusama:{precision:1e12,symbol:"KSM"},statemint:{precision:1e10,symbol:"DOT"},statemine:{precision:1e12,symbol:"KSM"},polkadotpeople:{precision:1e10,symbol:"DOT"},kusamapeople:{precision:1e12,symbol:"KSM"}};e.exports={HumanReadable:function(e,l,c){var u=void 0;if(l===t||l===s)u=3;else if(l===n||l===o||l===r)u=6;else{if(l!=i)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");u=8}e=parseFloat(e),c((e=Number.isInteger(e/a[l].precision)?e/a[l].precision+" "+a[l].symbol:(e/a[l].precision).toFixed(u)+" "+a[l].symbol).toString())},Precise:function(e,t,n){n(e=(e=parseFloat(e))/a[t].precision+" "+a[t].symbol)},BlocksToDays:function(e,t){t((e=6*e/86400).toString())},ErasToDays:function(e,a,l){var c=void 0;if(l===t||l===s||l==r)c=1;else{if(l!==n&&l!==o&&l!=i)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");c=4}a((e/=c).toString())},Percentage:function(e,t){t((e/=1e7).toString())},PermillToPercent:function(e,t){t((e/=1e4).toString())},ArrayLength:function(e,t){t((e=e.split(",").length).toString())}}},47862:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const o=n.p+"assets/images/anon-vs-stash-plot-fa8f730710dbf5cbec2d7db43d5d962d.png"},79947:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const o=n.p+"assets/images/multisig-with-anons-209a0f481e6a13ed943a952be07e1a75.png"},87091:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const o=n.p+"assets/images/multisig-with-one-anon-b8bb0a5183fbdc1d1809d4cd58489ab4.png"},4782:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const o=n.p+"assets/images/multisig-with-pure-684efe47eba1ab52cd41218daf674357.png"},79022:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const o=n.p+"assets/images/why-anon-proxy-48fc32ddd2da9a5e9342554c68372d98.png"},47790:()=>{}}]); \ No newline at end of file diff --git a/assets/js/c8dd560b.e46a4d81.js b/assets/js/c8dd560b.e46a4d81.js deleted file mode 100644 index 26dc32a2b7a7..000000000000 --- a/assets/js/c8dd560b.e46a4d81.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk=self.webpackChunk||[]).push([[4293],{77405:(e,t,n)=>{"use strict";n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>a,default:()=>h,frontMatter:()=>i,metadata:()=>l,toc:()=>u});var o=n(74848),s=n(28453),r=(n(47379),n(67141));const i={id:"learn-guides-accounts-proxy-pure",title:"Polkadot-JS Guides about Pure Proxy Accounts",sidebar_label:"Pure Proxy Guides",description:"Polkadot-JS Guides about Pure Proxy Accounts",keyword:["guides","polkadot-js","accounts","proxy","pure proxy","anonymous proxy"],slug:"../learn-guides-accounts-proxy-pure"},a=void 0,l={id:"learn/learn-guides-accounts-proxy-pure",title:"Polkadot-JS Guides about Pure Proxy Accounts",description:"Polkadot-JS Guides about Pure Proxy Accounts",source:"@site/../docs/learn/learn-guides-accounts-proxy-pure.md",sourceDirName:"learn",slug:"/learn-guides-accounts-proxy-pure",permalink:"/docs/learn-guides-accounts-proxy-pure",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-accounts-proxy-pure.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1729847256e3,frontMatter:{id:"learn-guides-accounts-proxy-pure",title:"Polkadot-JS Guides about Pure Proxy Accounts",sidebar_label:"Pure Proxy Guides",description:"Polkadot-JS Guides about Pure Proxy Accounts",keyword:["guides","polkadot-js","accounts","proxy","pure proxy","anonymous proxy"],slug:"../learn-guides-accounts-proxy-pure"},sidebar:"docs",previous:{title:"Proxy Guides",permalink:"/docs/learn-guides-accounts-proxy"},next:{title:"Transfer Guides",permalink:"/docs/learn-guides-transfers"}},c={},u=[{value:"Create and Remove Pure Proxies with Polkadot-JS",id:"create-and-remove-pure-proxies-with-polkadot-js",level:2},{value:"Advanced Account Management with Pure Proxies",id:"advanced-account-management-with-pure-proxies",level:2},{value:"Pure Proxies and Multisigs",id:"pure-proxies-and-multisigs",level:2},{value:"Scenario One: One Pure Proxy within a Multisig",id:"scenario-one-one-pure-proxy-within-a-multisig",level:3},{value:"Scenario Two: Multisig made of Pure Proxies",id:"scenario-two-multisig-made-of-pure-proxies",level:3},{value:"Scenario Three: Multisig controlling a Pure Proxy",id:"scenario-three-multisig-controlling-a-pure-proxy",level:3}];function d(e){const t={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(r.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the Polkadot-JS UI, you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,o.jsxs)(t.admonition,{title:"The Account Tab in the Polkadot-JS UI cannot handle complex proxy setups",type:"caution",children:[(0,o.jsxs)(t.p,{children:["The Accounts Tab in the Polkadot-JS UI cannot handle complex proxy setups (e.g. a proxy -> multisig\n-> a pure proxy which is part of another multisig). These complex setups must be done using the\n",(0,o.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/extrinsics",children:"Extrinsics Tab"})," directly."]}),(0,o.jsxs)(t.p,{children:[(0,o.jsxs)(t.strong,{children:["We recommend to use the ",(0,o.jsx)(t.a,{href:"/docs/learn-DOT#getting-tokens-on-the-westend-testnet",children:"Westend Testnet"})," if\nyou are testing features for the first time."]})," By performing the complex proxy setups on the\ntestnet, you can comfortably replicate the procedure on the main networks."]})]}),"\n",(0,o.jsx)(t.admonition,{title:"Risk of loss of funds",type:"danger",children:(0,o.jsx)(t.p,{children:"Read carefully the text below and before performing any action using pure proxies, experiment on the\nWestend testnet."})}),"\n",(0,o.jsx)(t.h2,{id:"create-and-remove-pure-proxies-with-polkadot-js",children:"Create and Remove Pure Proxies with Polkadot-JS"}),"\n",(0,o.jsxs)(t.p,{children:["To create a ",(0,o.jsx)(t.strong,{children:"pure proxy"})," see\n",(0,o.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000182196",children:"this support article"}),", or\nwatch ",(0,o.jsx)(t.a,{href:"https://www.youtube.com/watch?v=T443RcCYP24",children:"this technical explainer video"}),"."]}),"\n",(0,o.jsx)(t.admonition,{title:"Removing Pure Proxies",type:"caution",children:(0,o.jsxs)(t.p,{children:["The procedure for removing a ",(0,o.jsx)(t.em,{children:"pure"}),' proxy is different from the one used to remove other proxies.\nVisit the section "Removing an Anonymous Proxy" on\n',(0,o.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000182196",children:"this support article"}),", or\nwatch ",(0,o.jsx)(t.a,{href:"https://www.youtube.com/watch?v=T443RcCYP24",children:"this technical explainer video"}),"."]})}),"\n",(0,o.jsxs)(t.p,{children:["Learn more about pure proxies from our\n",(0,o.jsx)(t.a,{href:"https://www.youtube.com/watch?v=YkYApbhU3i0",children:"technical explainer video"}),"."]}),"\n",(0,o.jsx)(t.h2,{id:"advanced-account-management-with-pure-proxies",children:"Advanced Account Management with Pure Proxies"}),"\n",(0,o.jsx)(t.admonition,{title:"Walk-through tutorial video of Account Management",type:"info",children:(0,o.jsxs)(t.p,{children:["You can see ",(0,o.jsx)(t.a,{href:"https://www.youtube.com/watch?v=YkYApbhU3i0",children:"this video tutorial"})," that goes through the\nexample below. The tutorial requires some familiarity with the Extrinsic Tab of the Polkadot-JS UI."]})}),"\n",(0,o.jsx)(t.p,{children:"Let's take for example 3 accounts belonging to Charlie, Dan and Eleanor working for Company X.\nCharlie holds funds belonging to Company X, but he wants to leave the company and transfer the\neconomic responsibility to Eleanor. Dan is a staking proxy of Charlie."}),"\n",(0,o.jsxs)(t.p,{children:[(0,o.jsxs)(t.strong,{children:["Without ",(0,o.jsx)(t.em,{children:"Pure"})," Proxy"]}),", Charlie must (see ",(0,o.jsx)(t.em,{children:"left"})," side of the Figure below):"]}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsx)(t.li,{children:"Remove Dan as a staking proxy, this step requires 1 signature"}),"\n",(0,o.jsx)(t.li,{children:"Stop nominating and unbound all funds , this step requires 2 signatures"}),"\n",(0,o.jsx)(t.li,{children:"Transfer the funds to Eleanor, this step requires 1 signature"}),"\n"]}),"\n",(0,o.jsx)(t.p,{children:"Then Eleanor adds Dan as a staking proxy (1 signature). The whole process requires 5 signatures.\nHere we are presenting a simple example, in fact, with multi-signature accounts and multiple proxies\nthe procedure would be more time-consuming and labor-intensive."}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{alt:"why anonymous proxies",src:n(79022).A+"",width:"1920",height:"800"})}),"\n",(0,o.jsxs)(t.p,{children:[(0,o.jsxs)(t.strong,{children:["With ",(0,o.jsx)(t.em,{children:"Pure"})," Proxy"]})," (see ",(0,o.jsx)(t.em,{children:"right"})," side of the Figure above), Charlie must add Eleanor as ",(0,o.jsx)(t.em,{children:"any"}),"\nproxy of the ",(0,o.jsx)(t.em,{children:"pure"})," proxy, and remove himself (or Eleanor can remove him). The process requires just\n2 signatures (1 signature to add the new ",(0,o.jsx)(t.em,{children:"any"})," proxy and 1 signature the remove the old one). The\nfunds remain in the ",(0,o.jsx)(t.em,{children:"pure"})," proxy, and it is not necessary to stop nominating or unbond funds. Also,\nany proxy relationships with the ",(0,o.jsx)(t.em,{children:"pure"})," proxy stay in place. Thus, if we use the ",(0,o.jsx)(t.em,{children:"pure"})," proxy, with\nan increasing number of proxies we will always have to sign twice (not necessarily true in\nmulti-signature accounts). While if we are not using the ",(0,o.jsx)(t.em,{children:"pure"})," proxy, the more the proxies the more\nsignatures we need to detach them from the old stash and attach them to the new stash (see Figure\nbelow)."]}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{alt:"anon vs stash plot",src:n(47862).A+"",width:"1920",height:"800"})}),"\n",(0,o.jsx)(t.h2,{id:"pure-proxies-and-multisigs",children:"Pure Proxies and Multisigs"}),"\n",(0,o.jsx)(t.h3,{id:"scenario-one-one-pure-proxy-within-a-multisig",children:"Scenario One: One Pure Proxy within a Multisig"}),"\n",(0,o.jsx)(t.admonition,{title:"Walk-through tutorial video",type:"info",children:(0,o.jsxs)(t.p,{children:["You can see ",(0,o.jsx)(t.a,{href:"https://www.youtube.com/watch?v=iGRoGstB_pQ",children:"this video tutorial"})," that goes through\nthis scenario. The tutorial requires some familiarity with the Extrinsic Tab of the Polkadot-JS UI."]})}),"\n",(0,o.jsxs)(t.p,{children:["It is possible to put a ",(0,o.jsx)(t.em,{children:"pure"})," proxy within a multisig, and then transactions will be signed by the\n",(0,o.jsx)(t.em,{children:"any"})," proxy on behalf of the ",(0,o.jsx)(t.em,{children:"pure"})," proxy (proxied account). Let's take for example the diagram\nbelow. Alice, Bob and Anon are part of the multisig ABC, a multisig account with threshold 2. P-C is\na ",(0,o.jsx)(t.em,{children:"pure"})," proxy spawned by Charlie, who now acts as ",(0,o.jsx)(t.em,{children:"any"})," proxy and thus signs anything on behalf of\nP-C. The ",(0,o.jsx)(t.em,{children:"pure"})," proxy cannot sign directly because it does not have a private key. So, for example,\nto send funds from the multisig to Dan, Charly needs to submit a ",(0,o.jsx)(t.code,{children:"proxy.proxy"})," extrinsic to P-C,\nwhich in turn will submit a ",(0,o.jsx)(t.code,{children:"multisig.asMulti"})," extrinsic to ABC containing the call data for the\n",(0,o.jsx)(t.code,{children:"balances.transferKeepAlive"})," extrinsic about the transfer of some funds from ABC to Dan. Alice can\nthen approve the transfer by submitting a ",(0,o.jsx)(t.code,{children:"multisig.asMulti"})," extrinsic also containing the call data\nfor the ",(0,o.jsx)(t.code,{children:"balances.transferKeepAlive"})," extrinsic about the transfer of some funds from ABC to Dan."]}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{alt:"multisig with one anon",src:n(87091).A+"",width:"1920",height:"800"})}),"\n",(0,o.jsxs)(t.p,{children:["If Charly wants to leave the multisig, a new ",(0,o.jsx)(t.em,{children:"any"})," proxy can be added to P-C and Charly can be\nremoved (by himself or by the new ",(0,o.jsx)(t.em,{children:"any"})," proxy). Note that the multisig also contains Bob that in\nthis specific example does not do anything."]}),"\n",(0,o.jsx)(t.admonition,{title:"Proxy calls",type:"note",children:(0,o.jsxs)(t.p,{children:["To use a ",(0,o.jsx)(t.em,{children:"pure"})," proxy within a multisig you need to use the Extrinsic Tab and generate a\n",(0,o.jsx)(t.code,{children:"proxy.proxy"})," extrinsic. If you try to sign a multisig transaction using the ",(0,o.jsx)(t.em,{children:"pure"})," proxy you will\nbe prompted with a warning. Remember, you cannot sign something directly if you do not have a\nprivate key."]})}),"\n",(0,o.jsx)(t.h3,{id:"scenario-two-multisig-made-of-pure-proxies",children:"Scenario Two: Multisig made of Pure Proxies"}),"\n",(0,o.jsx)(t.admonition,{title:"Walk-through Tutorial Video",type:"info",children:(0,o.jsxs)(t.p,{children:["You can see ",(0,o.jsx)(t.a,{href:"https://www.youtube.com/watch?v=F82C3zDNJyk",children:"this video tutorial"})," that goes through\nthis scenario. The tutorial requires some familiarity with the Extrinsic Tab of the Polkadot-JS UI."]})}),"\n",(0,o.jsxs)(t.p,{children:["The diagram below shows a multisig that is made only with ",(0,o.jsx)(t.em,{children:"pure"})," proxies (P-A, P-B and P-C). In this\nsituation Alice, Bob or Charly can leave the multisig at any time without the requirement of\ncreating a new multisig. If for example, Bob leaves the multisig the procedure will require somebody\nelse to be added as ",(0,o.jsx)(t.em,{children:"any"})," proxy to P-B, and then Bob can remove himself (or the new ",(0,o.jsx)(t.em,{children:"any"})," proxy can\nremove Bob)."]}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{alt:"multisig with anons",src:n(79947).A+"",width:"1920",height:"800"})}),"\n",(0,o.jsxs)(t.p,{children:["In the diagram above, Alice submits the ",(0,o.jsx)(t.code,{children:"proxy.proxy"})," extrinsic to P-A, which in turn submits the\n",(0,o.jsx)(t.code,{children:"multisig.asMulti"})," extrinsic containing the ",(0,o.jsx)(t.code,{children:"balances.transferKeepAlive"})," extrinsic about the\ntransfer of some tokens from ABC to Dan. Then, Charly does the same to confirm the transaction. Note\nthat Charly will need to pay for some weight, for the computation that is necessary to execute the\ntransaction."]}),"\n",(0,o.jsx)(t.h3,{id:"scenario-three-multisig-controlling-a-pure-proxy",children:"Scenario Three: Multisig controlling a Pure Proxy"}),"\n",(0,o.jsxs)(t.p,{children:["This setup is used by the ",(0,o.jsx)(t.a,{href:"/docs/multisig-apps#multix",children:"MultiX"})," tool."]}),"\n",(0,o.jsxs)(t.p,{children:["After its creation, a multi-signature account creates a pure proxy that becomes the proxied account.\nThe multi-signature account behaves as ",(0,o.jsx)(t.em,{children:"any"})," proxy of the pure. If signatories of the\nmulti-signature account change, a new multisig can be created, assigned as ",(0,o.jsx)(t.em,{children:"any"})," proxy of the pure,\nand then the old multisig can be removed as a proxy."]}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{alt:"multisig with pure",src:n(4782).A+"",width:"1920",height:"800"})}),"\n",(0,o.jsxs)(t.p,{children:["Compared to ",(0,o.jsx)(t.a,{href:"#scenario-two-multisig-made-of-pure-proxies",children:"Scenario Two"}),", signatories do not need to\ncreate pure proxies here. Multisig controlling a Pure Proxy is a more practical solution, where the\nsignatories, number of signatories and/or the threshold can be changed, which changes the multisig\naddress but does not impact the pure proxy address. In Scenario Two, if signatories behind the pure\nproxies change, the address of the multisig stays the same. However, changing the number of\nsignatories and threshold would not be possible."]})]})}function h(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},67141:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var o=n(96540),s=n(74848);const r=function(e){var t,n=e.message,r=(0,o.useState)(!0),i=r[0],a=r[1];return(0,s.jsx)(s.Fragment,{children:i&&(0,s.jsxs)("div",{className:"message-box",children:[(0,s.jsx)("button",{className:"close-button",onClick:function(){a(!1)},children:"\u2716 "}),(0,s.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(t=n,t.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},47379:(e,t,n)=>{"use strict";n.d(t,{A:()=>h});var o=n(90675),s=n(10467),r=n(96540),i=n(19588),a=n(2026),l=n(11135);function c(e,t,n){return u.apply(this,arguments)}function u(){return(u=(0,s.A)((0,o.A)().mark((function e(t,n,s){var r,l,c,u,d;return(0,o.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=void 0,l=void 0,e.t0=t,e.next="polkadot"===e.t0?5:"kusama"===e.t0?7:"statemine"===e.t0?9:"statemint"===e.t0?11:"polkadotpeople"===e.t0?13:"kusamapeople"===e.t0?15:17;break;case 5:return r="wss://rpc.polkadot.io",e.abrupt("break",18);case 7:return r="wss://kusama-rpc.polkadot.io/",e.abrupt("break",18);case 9:return r="wss://statemine-rpc.polkadot.io/",e.abrupt("break",18);case 11:return r="wss://statemint-rpc.polkadot.io/",e.abrupt("break",18);case 13:return r="wss://polkadot-people-rpc.polkadot.io/",e.abrupt("break",18);case 15:return r="wss://kusama-people-rpc.polkadot.io/",e.abrupt("break",18);case 17:console.log("Unknown socket url provided, no connection made.");case 18:if(void 0!==r){e.next=22;break}return e.abrupt("return");case 22:return c=new i.E(r),e.next=25,a.G.create({provider:c});case 25:u=e.sent,(d=n.split(".")).forEach((function(e){e in u&&(u=u[e])})),e.t1=d[0],e.next="consts"===e.t1?31:"query"===e.t1?33:38;break;case 31:return l=u.toString(),e.abrupt("break",39);case 33:return e.next=35,u();case 35:return l=(l=e.sent).toString(),e.abrupt("break",39);case 38:console.log("Unknown path prefix ("+d[0]+") in "+n);case 39:return e.abrupt("return",l);case 40:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function d(e,t,n,o){switch(t){case"humanReadable":(0,l.HumanReadable)(e,n,o);break;case"precise":(0,l.Precise)(e,n,o);break;case"blocksToDays":(0,l.BlocksToDays)(e,o);break;case"erasToDays":(0,l.ErasToDays)(e,o,n);break;case"percentage":(0,l.Percentage)(e,o);break;case"permillToPercent":(0,l.PermillToPercent)(e,o);break;case"arrayLength":(0,l.ArrayLength)(e,o);break;default:return void console.log("Ignoring unknown filter type")}}const h=function(e){var t=e.network,n=e.path,i=e.defaultValue,a=e.filter,l=void 0===a?void 0:a,u=(0,r.useState)(""),h=u[0],p=u[1];return t=t.toLowerCase(),(0,r.useEffect)((function(){void 0!==l?d(i.toString(),l,t,p):p(i.toString());var e=void 0;switch(t){case"polkadot":e="wss://rpc.polkadot.io";break;case"kusama":e="wss://kusama-rpc.polkadot.io/";break;case"statemine":e="wss://kusama-asset-hub-rpc.polkadot.io/";break;case"statemint":e="wss://polkadot-asset-hub-rpc.polkadot.io/";break;case"kusamapeople":e="wss://kusama-people-rpc.polkadot.io";break;case"polkadotpeople":e="wss://polkadot-people-rpc.polkadot.io";break;default:console.log("Unknown network provided, "+t)}if(void 0===e)console.log("Failed to connect to a valid websocket, applying default");else{var r=function(){var e=(0,s.A)((0,o.A)().mark((function e(){var s;return(0,o.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,c(t,n,p);case 2:if(void 0!==(s=e.sent)){e.next=7;break}return e.abrupt("return");case 7:void 0!==l?d(s,l,t,p):p(s);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();try{r()}catch(a){console.log(a)}}}),[]),h}},11135:e=>{var t="polkadot",n="kusama",o="statemine",s="statemint",r="polkadotpeople",i="kusamapeople",a={polkadot:{precision:1e10,symbol:"DOT"},kusama:{precision:1e12,symbol:"KSM"},statemint:{precision:1e10,symbol:"DOT"},statemine:{precision:1e12,symbol:"KSM"},polkadotpeople:{precision:1e10,symbol:"DOT"},kusamapeople:{precision:1e12,symbol:"KSM"}};e.exports={HumanReadable:function(e,l,c){var u=void 0;if(l===t||l===s)u=3;else if(l===n||l===o||l===r)u=6;else{if(l!=i)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");u=8}e=parseFloat(e),c((e=Number.isInteger(e/a[l].precision)?e/a[l].precision+" "+a[l].symbol:(e/a[l].precision).toFixed(u)+" "+a[l].symbol).toString())},Precise:function(e,t,n){n(e=(e=parseFloat(e))/a[t].precision+" "+a[t].symbol)},BlocksToDays:function(e,t){t((e=6*e/86400).toString())},ErasToDays:function(e,a,l){var c=void 0;if(l===t||l===s||l==r)c=1;else{if(l!==n&&l!==o&&l!=i)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");c=4}a((e/=c).toString())},Percentage:function(e,t){t((e/=1e7).toString())},PermillToPercent:function(e,t){t((e/=1e4).toString())},ArrayLength:function(e,t){t((e=e.split(",").length).toString())}}},47862:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const o=n.p+"assets/images/anon-vs-stash-plot-fa8f730710dbf5cbec2d7db43d5d962d.png"},79947:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const o=n.p+"assets/images/multisig-with-anons-209a0f481e6a13ed943a952be07e1a75.png"},87091:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const o=n.p+"assets/images/multisig-with-one-anon-b8bb0a5183fbdc1d1809d4cd58489ab4.png"},4782:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const o=n.p+"assets/images/multisig-with-pure-684efe47eba1ab52cd41218daf674357.png"},79022:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const o=n.p+"assets/images/why-anon-proxy-48fc32ddd2da9a5e9342554c68372d98.png"},47790:()=>{}}]); \ No newline at end of file diff --git a/assets/js/c91a9c06.496bc36e.js b/assets/js/c91a9c06.496bc36e.js deleted file mode 100644 index 118e9b005d3f..000000000000 --- a/assets/js/c91a9c06.496bc36e.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1019],{84345:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>l,default:()=>p,frontMatter:()=>o,metadata:()=>c,toc:()=>u});var r=t(74848),s=t(28453),i=t(11470),a=t(19365);const o={id:"learn-identity",title:"Account Identity",sidebar_label:"Account Identity",description:"On-chain Identity, Judgements and Registrars.",keywords:["identity","registrars","judgements"],slug:"../learn-identity"},l=void 0,c={id:"learn/learn-identity",title:"Account Identity",description:"On-chain Identity, Judgements and Registrars.",source:"@site/../docs/learn/learn-identity.md",sourceDirName:"learn",slug:"/learn-identity",permalink:"/docs/learn-identity",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-identity.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1727944438e3,frontMatter:{id:"learn-identity",title:"Account Identity",sidebar_label:"Account Identity",description:"On-chain Identity, Judgements and Registrars.",keywords:["identity","registrars","judgements"],slug:"../learn-identity"},sidebar:"docs",previous:{title:"Account Abstraction",permalink:"/docs/learn-account-abstraction"},next:{title:"Multi-Signature Accounts",permalink:"/docs/learn-account-multisig"}},d={},u=[{value:"Sub-Identities",id:"sub-identities",level:2},{value:"Judgements",id:"judgements",level:2},{value:"Registrars",id:"registrars",level:2}];function h(e){const n={a:"a",admonition:"admonition",del:"del",em:"em",h2:"h2",hr:"hr",li:"li",p:"p",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(n.p,{children:["Polkadot provides a naming system that allows participants to add personal information to their\non-chain account and subsequently ask for verification of this information by\n",(0,r.jsx)(n.a,{href:"#registrars",children:"registrars"}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["Users must ",(0,r.jsx)(n.a,{href:"/docs/chain-state-values#identity-deposit",children:"reserve funds"})," in a bond to store\ntheir information on chain. These funds are ",(0,r.jsx)(n.em,{children:"locked"}),", not spent - they are returned when the\nidentity is cleared."]}),"\n",(0,r.jsxs)(n.p,{children:["Identities are managed on the ",(0,r.jsx)(n.a,{href:"/docs/learn-system-chains",children:"People system chain"}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["You can cross-chain transfer your DOT tokens to the People system chain using\n",(0,r.jsx)(n.a,{href:"https://novawallet.io/",children:"Nova Wallet"}),". A guide on how to do this can be found\n",(0,r.jsx)(n.a,{href:"https://docs.novawallet.io/nova-wallet-wiki/asset-management/how-to-send-tokens/send-tokens-cross-chain",children:"here"}),"."]}),"\n",(0,r.jsx)(n.h2,{id:"sub-identities",children:"Sub-Identities"}),"\n",(0,r.jsxs)(n.p,{children:['Users can also link accounts by setting "sub accounts", each with its own identity, under a primary\naccount. The system reserves a bond for each sub account. An example of how you might use this would\nbe a validation company running multiple validators. A single entity, "My Staking Company", could\nregister multiple sub accounts that represent the ',(0,r.jsx)(n.a,{href:"/docs/learn-cryptography",children:"Stash accounts"})," of each of\ntheir validators."]}),"\n",(0,r.jsxs)(n.p,{children:["An account can have a maximum of 100 sub-accounts. Note that a\n",(0,r.jsx)(n.a,{href:"/docs/chain-state-values#sub-identity-deposit",children:"deposit"})," is required for every sub-account."]}),"\n",(0,r.jsx)(n.h2,{id:"judgements",children:"Judgements"}),"\n",(0,r.jsx)(n.p,{children:"After a user injects their information on chain, they can request judgement from a registrar. Users\ndeclare a maximum fee that they are willing to pay for judgement, and registrars whose fee is below\nthat amount can provide a judgement."}),"\n",(0,r.jsx)(n.p,{children:"When a registrar provides judgement, they can select up to six levels of confidence in their\nattestation:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Unknown: The default value, no judgement made yet."}),"\n",(0,r.jsx)(n.li,{children:"Reasonable: The data appears reasonable, but no in-depth checks (e.g. formal KYC process) were\nperformed (all the currently verified identities on-chain)."}),"\n",(0,r.jsx)(n.li,{children:"Known Good: The registrar has certified that the information is correct (this step involves\nverification of state issued identity documents, and at the moment no account has known good\nidentity, with the exception of registrars)."}),"\n",(0,r.jsx)(n.li,{children:"Out of Date: The information used to be good, but is now out of date."}),"\n",(0,r.jsx)(n.li,{children:"Low Quality: The information is low quality or imprecise, but can be fixed with an update."}),"\n",(0,r.jsx)(n.li,{children:"Erroneous: The information is erroneous and may indicate malicious intent."}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:'A seventh state, "fee paid", is for when a user has requested judgement and it is in progress.\nInformation that is in this state or "erroneous" is "sticky" and cannot be modified; it can only be\nremoved by the complete removal of the identity.'}),"\n",(0,r.jsx)(n.p,{children:"Registrars gain trust by performing proper due diligence and would presumably be replaced for\nissuing faulty judgments."}),"\n",(0,r.jsx)(n.h2,{id:"registrars",children:"Registrars"}),"\n",(0,r.jsx)(n.p,{children:"Registrars can set a fee for their services and limit their attestation to certain fields. For\nexample, a registrar could charge 1 DOT to verify one's legal name, email, and GPG key. When a user\nrequests judgement, they will pay this fee to the registrar who provides the judgement on those\nclaims. Users set a maximum fee they are willing to pay and only registrars below this amount would\nprovide judgement."}),"\n",(0,r.jsx)(n.p,{children:"There are multiple registrars on Polkadot and Kusama. Unless no additional information is available\nhere, you must reach out to specific registrars individually if you want to be judged by those."}),"\n",(0,r.jsx)(n.admonition,{title:"Decommissioned Registrar Service",type:"info",children:(0,r.jsxs)(n.p,{children:["From the 1st of April 2024 onwards, ",(0,r.jsx)(n.strong,{children:"Registrar 0"})," will still exist on-chain but will not accept\nany new judgment requests. The registrar fee is set to a substantial amount to dissuade identity\njudgement requests. Identities judged by the registrar before that date will not be affected. For\nnew identity judgment, please use the other registrars."]})}),"\n",(0,r.jsxs)(i.A,{groupId:"clients",values:[{label:"Polkadot",value:"polkadot"},{label:"Kusama",value:"kusama"}],children:[(0,r.jsxs)(a.A,{value:"polkadot",children:[(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.del,{children:"Registrar 0"})," : ",(0,r.jsx)("br",{})," ",(0,r.jsx)(n.strong,{children:"URL"}),": NA ",(0,r.jsx)("br",{})," ",(0,r.jsx)(n.strong,{children:"Account"}),":\n",(0,r.jsx)(n.del,{children:"12j3Cz8qskCGJxmSJpVL2z2t3Fpmw3KoBaBaRGPnuibFc7o8"})," ",(0,r.jsx)("br",{})," ",(0,r.jsx)(n.strong,{children:"Fee"}),": ",(0,r.jsx)(n.del,{children:"0 DOT"})," ",(0,r.jsx)("br",{})]}),(0,r.jsxs)(n.p,{children:["Registrar 1: ",(0,r.jsx)("br",{})," ",(0,r.jsx)(n.strong,{children:"URL"}),": ",(0,r.jsx)(n.a,{href:"https://registrar.d11d.net/",children:"https://registrar.d11d.net/"})," ",(0,r.jsx)("br",{})," ",(0,r.jsx)(n.strong,{children:"Account"}),":\n1Reg2TYv9rGfrQKpPREmrHRxrNsUDBQKzkYwP1UstD97wpJ ",(0,r.jsx)("br",{})," ",(0,r.jsx)(n.strong,{children:"Fee"}),": 20 DOT ",(0,r.jsx)("br",{})]}),(0,r.jsxs)(n.p,{children:["Registrar 2: ",(0,r.jsx)("br",{})," ",(0,r.jsx)(n.strong,{children:"Account"}),": 1EpXirnoTimS1SWq52BeYx7sitsusXNGzMyGx8WPujPd1HB ",(0,r.jsx)("br",{})," ",(0,r.jsx)(n.strong,{children:"Fee"}),": 0\nDOT ",(0,r.jsx)("br",{})]}),(0,r.jsxs)(n.p,{children:["Registrar 3: ",(0,r.jsx)("br",{})," ",(0,r.jsx)(n.strong,{children:"Account"}),": 13SceNt2ELz3ti4rnQbY1snpYH4XE4fLFsW8ph9rpwJd6HFC ",(0,r.jsx)("br",{})," ",(0,r.jsx)(n.strong,{children:"Fee"}),":\n0.5 DOT ",(0,r.jsx)("br",{})," Polkassembly (Registrar 3) provides setting on-chain ID as a service on their\n",(0,r.jsx)(n.a,{href:"https://polkadot.polkassembly.io/",children:"website"}),"."]})]}),(0,r.jsxs)(a.A,{value:"kusama",children:[(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.del,{children:"Registrar 0"})," : ",(0,r.jsx)("br",{})," ",(0,r.jsx)(n.strong,{children:"URL"}),": NA ",(0,r.jsx)("br",{})," ",(0,r.jsx)(n.strong,{children:"Account"}),":\n",(0,r.jsx)(n.del,{children:"H4XieK3r3dq3VEvRtqZR7wN7a1UEkXxf14orRsEfdFjmgkF"})," ",(0,r.jsx)("br",{})," ",(0,r.jsx)(n.strong,{children:"Fee"}),": ",(0,r.jsx)(n.del,{children:"0.04 KSM"})," ",(0,r.jsx)("br",{})]}),(0,r.jsxs)(n.p,{children:["Registrar 1: ",(0,r.jsx)("br",{})," ",(0,r.jsx)(n.strong,{children:"URL"}),": ",(0,r.jsx)(n.a,{href:"https://registrar.d11d.net/",children:"https://registrar.d11d.net/"})," ",(0,r.jsx)("br",{})," ",(0,r.jsx)(n.strong,{children:"Account"}),":\nFom9M5W6Kck1hNAiE2mDcZ67auUCiNTzLBUdQy4QnxHSxdn ",(0,r.jsx)("br",{})," ",(0,r.jsx)(n.strong,{children:"Fee"}),": 4.5 KSM ",(0,r.jsx)("br",{})]}),(0,r.jsxs)(n.p,{children:["Registrar 2: is no longer offering registrar services on Kusama. ",(0,r.jsx)("br",{})," ",(0,r.jsx)(n.strong,{children:"Account"}),":\n",(0,r.jsx)(n.del,{children:"EK8veMNH6sVtvhSRo4q1ZRh6huCDm69gxK4eN5MFoZzo3G7"})," ",(0,r.jsx)("br",{})," ",(0,r.jsx)(n.strong,{children:"Fee"}),": ",(0,r.jsx)(n.del,{children:"1 KSM"})," ",(0,r.jsx)("br",{})]}),(0,r.jsxs)(n.p,{children:["Registrar 3: ",(0,r.jsx)("br",{})," ",(0,r.jsx)(n.strong,{children:"Account"}),": GLiebiQp5f6G5vNcc7BgRE9T3hrZSYDwP6evERn3hEczdaM ",(0,r.jsx)("br",{})," ",(0,r.jsx)(n.strong,{children:"Fee"}),": 1\nKSM ",(0,r.jsx)("br",{})," Polkassembly (Registrar 3) provides setting on-chain ID as a service on their\n",(0,r.jsx)(n.a,{href:"https://kusama.polkassembly.io/",children:"website"}),"."]}),(0,r.jsxs)(n.p,{children:["Registrar 4: ",(0,r.jsx)("br",{})," ",(0,r.jsx)(n.strong,{children:"Account"}),": GhmpzxUyTVsFJhV7s2wNvD8v3Bgikb6WvYjj4QSuSScAUw6 ",(0,r.jsx)("br",{})," ",(0,r.jsx)(n.strong,{children:"Fee"}),":\n0.04 KSM ",(0,r.jsx)("br",{})]}),(0,r.jsxs)(n.p,{children:["Registrar 5: ",(0,r.jsx)("br",{})," ",(0,r.jsx)(n.strong,{children:"Account"}),": F1wAMxpzvjWCpsnbUMamgKfqFM7LRvNdkcQ44STkeVbemEZ ",(0,r.jsx)("br",{})," ",(0,r.jsx)(n.strong,{children:"Fee"}),":\n0.04 KSM ",(0,r.jsx)("br",{})," Polkassembly (Registrar 5) provides setting on-chain ID as a service on their\n",(0,r.jsx)(n.a,{href:"https://kusama.polkassembly.io/",children:"website"}),"."]}),(0,r.jsxs)(n.p,{children:["Registrar 6: ",(0,r.jsx)("br",{})," ",(0,r.jsx)(n.strong,{children:"Account"}),": HurhThD66KBUf2zcE9Zhx46sCqNJXviKhWAct95rBCkPuix ",(0,r.jsx)("br",{})," ",(0,r.jsx)(n.strong,{children:"Fee"}),":\n0.04 KSM ",(0,r.jsx)("br",{})," PolkaIdentity (Registrar 6) provides setting on-chain ID as a service on their\n",(0,r.jsx)(n.a,{href:"https://polkaidentity.com/",children:"website"}),"."]})]})]}),"\n",(0,r.jsxs)(n.p,{children:["See ",(0,r.jsx)(n.a,{href:"/docs/learn-guides-identity#registrars",children:"this page"})," to learn how to become a Registrar."]}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsx)(n.admonition,{title:"Polkadot-JS Guides",type:"info",children:(0,r.jsxs)(n.p,{children:["If you are an advanced user, see the\n",(0,r.jsx)(n.a,{href:"/docs/learn-guides-identity",children:"Polkadot-JS guides about account identity"}),"."]})})]})}function p(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(h,{...e})}):h(e)}},19365:(e,n,t)=>{t.d(n,{A:()=>a});t(96540);var r=t(34164);const s={tabItem:"tabItem_Ymn6"};var i=t(74848);function a(e){var n=e.children,t=e.hidden,a=e.className;return(0,i.jsx)("div",{role:"tabpanel",className:(0,r.A)(s.tabItem,a),hidden:t,children:n})}},11470:(e,n,t)=>{t.d(n,{A:()=>w});var r=t(96540),s=t(34164),i=t(23104),a=t(56347),o=t(205),l=t(57485),c=t(31682),d=t(75376);function u(e){var n,t;return null!=(n=null==(t=r.Children.toArray(e).filter((function(e){return"\n"!==e})).map((function(e){if(!e||(0,r.isValidElement)(e)&&((n=e.props)&&"object"==typeof n&&"value"in n))return e;var n;throw new Error("Docusaurus error: Bad child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:t.filter(Boolean))?n:[]}function h(e){var n=e.values,t=e.children;return(0,r.useMemo)((function(){var e=null!=n?n:function(e){return u(e).map((function(e){var n=e.props;return{value:n.value,label:n.label,attributes:n.attributes,default:n.default}}))}(t);return function(e){var n=(0,c.XI)(e,(function(e,n){return e.value===n.value}));if(n.length>0)throw new Error('Docusaurus error: Duplicate values "'+n.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[n,t])}function p(e){var n=e.value;return e.tabValues.some((function(e){return e.value===n}))}function m(e){var n=e.queryString,t=void 0!==n&&n,s=e.groupId,i=(0,a.W6)(),o=function(e){var n=e.queryString,t=void 0!==n&&n,r=e.groupId;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!r)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=r?r:null}({queryString:t,groupId:s});return[(0,l.aZ)(o),(0,r.useCallback)((function(e){if(o){var n=new URLSearchParams(i.location.search);n.set(o,e),i.replace(Object.assign({},i.location,{search:n.toString()}))}}),[o,i])]}function g(e){var n,t,s,i,a=e.defaultValue,l=e.queryString,c=void 0!==l&&l,u=e.groupId,g=h(e),f=(0,r.useState)((function(){return function(e){var n,t=e.defaultValue,r=e.tabValues;if(0===r.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!p({value:t,tabValues:r}))throw new Error('Docusaurus error: The has a defaultValue "'+t+'" but none of its children has the corresponding value. Available values are: '+r.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return t}var s=null!=(n=r.find((function(e){return e.default})))?n:r[0];if(!s)throw new Error("Unexpected error: 0 tabValues");return s.value}({defaultValue:a,tabValues:g})})),j=f[0],x=f[1],b=m({queryString:c,groupId:u}),v=b[0],y=b[1],w=(n=function(e){return e?"docusaurus.tab."+e:null}({groupId:u}.groupId),t=(0,d.Dv)(n),s=t[0],i=t[1],[s,(0,r.useCallback)((function(e){n&&i.set(e)}),[n,i])]),k=w[0],A=w[1],R=function(){var e=null!=v?v:k;return p({value:e,tabValues:g})?e:null}();return(0,o.A)((function(){R&&x(R)}),[R]),{selectedValue:j,selectValue:(0,r.useCallback)((function(e){if(!p({value:e,tabValues:g}))throw new Error("Can't select invalid tab value="+e);x(e),y(e),A(e)}),[y,A,g]),tabValues:g}}var f=t(92303);const j={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var x=t(74848);function b(e){var n=e.className,t=e.block,r=e.selectedValue,a=e.selectValue,o=e.tabValues,l=[],c=(0,i.a_)().blockElementScrollPositionUntilNextRender,d=function(e){var n=e.currentTarget,t=l.indexOf(n),s=o[t].value;s!==r&&(c(n),a(s))},u=function(e){var n,t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":var r,s=l.indexOf(e.currentTarget)+1;t=null!=(r=l[s])?r:l[0];break;case"ArrowLeft":var i,a=l.indexOf(e.currentTarget)-1;t=null!=(i=l[a])?i:l[l.length-1]}null==(n=t)||n.focus()};return(0,x.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,s.A)("tabs",{"tabs--block":t},n),children:o.map((function(e){var n=e.value,t=e.label,i=e.attributes;return(0,x.jsx)("li",Object.assign({role:"tab",tabIndex:r===n?0:-1,"aria-selected":r===n,ref:function(e){return l.push(e)},onKeyDown:u,onClick:d},i,{className:(0,s.A)("tabs__item",j.tabItem,null==i?void 0:i.className,{"tabs__item--active":r===n}),children:null!=t?t:n}),n)}))})}function v(e){var n=e.lazy,t=e.children,i=e.selectedValue,a=(Array.isArray(t)?t:[t]).filter(Boolean);if(n){var o=a.find((function(e){return e.props.value===i}));return o?(0,r.cloneElement)(o,{className:(0,s.A)("margin-top--md",o.props.className)}):null}return(0,x.jsx)("div",{className:"margin-top--md",children:a.map((function(e,n){return(0,r.cloneElement)(e,{key:n,hidden:e.props.value!==i})}))})}function y(e){var n=g(e);return(0,x.jsxs)("div",{className:(0,s.A)("tabs-container",j.tabList),children:[(0,x.jsx)(b,Object.assign({},n,e)),(0,x.jsx)(v,Object.assign({},n,e))]})}function w(e){var n=(0,f.A)();return(0,x.jsx)(y,Object.assign({},e,{children:u(e.children)}),String(n))}},28453:(e,n,t)=>{t.d(n,{R:()=>a,x:()=>o});var r=t(96540);const s={},i=r.createContext(s);function a(e){const n=r.useContext(i);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:a(e.components),r.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/c91a9c06.9c2ab127.js b/assets/js/c91a9c06.9c2ab127.js new file mode 100644 index 000000000000..3caac91fc8d5 --- /dev/null +++ b/assets/js/c91a9c06.9c2ab127.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1019],{27186:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>c,default:()=>p,frontMatter:()=>l,metadata:()=>r,toc:()=>u});const r=JSON.parse('{"id":"learn/learn-identity","title":"Account Identity","description":"On-chain Identity, Judgements and Registrars.","source":"@site/../docs/learn/learn-identity.md","sourceDirName":"learn","slug":"/learn-identity","permalink":"/docs/learn-identity","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-identity.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1727944438000,"frontMatter":{"id":"learn-identity","title":"Account Identity","sidebar_label":"Account Identity","description":"On-chain Identity, Judgements and Registrars.","keywords":["identity","registrars","judgements"],"slug":"../learn-identity"},"sidebar":"docs","previous":{"title":"Account Abstraction","permalink":"/docs/learn-account-abstraction"},"next":{"title":"Multi-Signature Accounts","permalink":"/docs/learn-account-multisig"}}');var s=t(74848),i=t(28453),a=t(11470),o=t(19365);const l={id:"learn-identity",title:"Account Identity",sidebar_label:"Account Identity",description:"On-chain Identity, Judgements and Registrars.",keywords:["identity","registrars","judgements"],slug:"../learn-identity"},c=void 0,d={},u=[{value:"Sub-Identities",id:"sub-identities",level:2},{value:"Judgements",id:"judgements",level:2},{value:"Registrars",id:"registrars",level:2}];function h(e){const n={a:"a",admonition:"admonition",del:"del",em:"em",h2:"h2",hr:"hr",li:"li",p:"p",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(n.p,{children:["Polkadot provides a naming system that allows participants to add personal information to their\non-chain account and subsequently ask for verification of this information by\n",(0,s.jsx)(n.a,{href:"#registrars",children:"registrars"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["Users must ",(0,s.jsx)(n.a,{href:"/docs/chain-state-values#identity-deposit",children:"reserve funds"})," in a bond to store\ntheir information on chain. These funds are ",(0,s.jsx)(n.em,{children:"locked"}),", not spent - they are returned when the\nidentity is cleared."]}),"\n",(0,s.jsxs)(n.p,{children:["Identities are managed on the ",(0,s.jsx)(n.a,{href:"/docs/learn-system-chains",children:"People system chain"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["You can cross-chain transfer your DOT tokens to the People system chain using\n",(0,s.jsx)(n.a,{href:"https://novawallet.io/",children:"Nova Wallet"}),". A guide on how to do this can be found\n",(0,s.jsx)(n.a,{href:"https://docs.novawallet.io/nova-wallet-wiki/asset-management/how-to-send-tokens/send-tokens-cross-chain",children:"here"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"sub-identities",children:"Sub-Identities"}),"\n",(0,s.jsxs)(n.p,{children:['Users can also link accounts by setting "sub accounts", each with its own identity, under a primary\naccount. The system reserves a bond for each sub account. An example of how you might use this would\nbe a validation company running multiple validators. A single entity, "My Staking Company", could\nregister multiple sub accounts that represent the ',(0,s.jsx)(n.a,{href:"/docs/learn-cryptography",children:"Stash accounts"})," of each of\ntheir validators."]}),"\n",(0,s.jsxs)(n.p,{children:["An account can have a maximum of 100 sub-accounts. Note that a\n",(0,s.jsx)(n.a,{href:"/docs/chain-state-values#sub-identity-deposit",children:"deposit"})," is required for every sub-account."]}),"\n",(0,s.jsx)(n.h2,{id:"judgements",children:"Judgements"}),"\n",(0,s.jsx)(n.p,{children:"After a user injects their information on chain, they can request judgement from a registrar. Users\ndeclare a maximum fee that they are willing to pay for judgement, and registrars whose fee is below\nthat amount can provide a judgement."}),"\n",(0,s.jsx)(n.p,{children:"When a registrar provides judgement, they can select up to six levels of confidence in their\nattestation:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Unknown: The default value, no judgement made yet."}),"\n",(0,s.jsx)(n.li,{children:"Reasonable: The data appears reasonable, but no in-depth checks (e.g. formal KYC process) were\nperformed (all the currently verified identities on-chain)."}),"\n",(0,s.jsx)(n.li,{children:"Known Good: The registrar has certified that the information is correct (this step involves\nverification of state issued identity documents, and at the moment no account has known good\nidentity, with the exception of registrars)."}),"\n",(0,s.jsx)(n.li,{children:"Out of Date: The information used to be good, but is now out of date."}),"\n",(0,s.jsx)(n.li,{children:"Low Quality: The information is low quality or imprecise, but can be fixed with an update."}),"\n",(0,s.jsx)(n.li,{children:"Erroneous: The information is erroneous and may indicate malicious intent."}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:'A seventh state, "fee paid", is for when a user has requested judgement and it is in progress.\nInformation that is in this state or "erroneous" is "sticky" and cannot be modified; it can only be\nremoved by the complete removal of the identity.'}),"\n",(0,s.jsx)(n.p,{children:"Registrars gain trust by performing proper due diligence and would presumably be replaced for\nissuing faulty judgments."}),"\n",(0,s.jsx)(n.h2,{id:"registrars",children:"Registrars"}),"\n",(0,s.jsx)(n.p,{children:"Registrars can set a fee for their services and limit their attestation to certain fields. For\nexample, a registrar could charge 1 DOT to verify one's legal name, email, and GPG key. When a user\nrequests judgement, they will pay this fee to the registrar who provides the judgement on those\nclaims. Users set a maximum fee they are willing to pay and only registrars below this amount would\nprovide judgement."}),"\n",(0,s.jsx)(n.p,{children:"There are multiple registrars on Polkadot and Kusama. Unless no additional information is available\nhere, you must reach out to specific registrars individually if you want to be judged by those."}),"\n",(0,s.jsx)(n.admonition,{title:"Decommissioned Registrar Service",type:"info",children:(0,s.jsxs)(n.p,{children:["From the 1st of April 2024 onwards, ",(0,s.jsx)(n.strong,{children:"Registrar 0"})," will still exist on-chain but will not accept\nany new judgment requests. The registrar fee is set to a substantial amount to dissuade identity\njudgement requests. Identities judged by the registrar before that date will not be affected. For\nnew identity judgment, please use the other registrars."]})}),"\n",(0,s.jsxs)(a.A,{groupId:"clients",values:[{label:"Polkadot",value:"polkadot"},{label:"Kusama",value:"kusama"}],children:[(0,s.jsxs)(o.A,{value:"polkadot",children:[(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.del,{children:"Registrar 0"})," : ",(0,s.jsx)("br",{})," ",(0,s.jsx)(n.strong,{children:"URL"}),": NA ",(0,s.jsx)("br",{})," ",(0,s.jsx)(n.strong,{children:"Account"}),":\n",(0,s.jsx)(n.del,{children:"12j3Cz8qskCGJxmSJpVL2z2t3Fpmw3KoBaBaRGPnuibFc7o8"})," ",(0,s.jsx)("br",{})," ",(0,s.jsx)(n.strong,{children:"Fee"}),": ",(0,s.jsx)(n.del,{children:"0 DOT"})," ",(0,s.jsx)("br",{})]}),(0,s.jsxs)(n.p,{children:["Registrar 1: ",(0,s.jsx)("br",{})," ",(0,s.jsx)(n.strong,{children:"URL"}),": ",(0,s.jsx)(n.a,{href:"https://registrar.d11d.net/",children:"https://registrar.d11d.net/"})," ",(0,s.jsx)("br",{})," ",(0,s.jsx)(n.strong,{children:"Account"}),":\n1Reg2TYv9rGfrQKpPREmrHRxrNsUDBQKzkYwP1UstD97wpJ ",(0,s.jsx)("br",{})," ",(0,s.jsx)(n.strong,{children:"Fee"}),": 20 DOT ",(0,s.jsx)("br",{})]}),(0,s.jsxs)(n.p,{children:["Registrar 2: ",(0,s.jsx)("br",{})," ",(0,s.jsx)(n.strong,{children:"Account"}),": 1EpXirnoTimS1SWq52BeYx7sitsusXNGzMyGx8WPujPd1HB ",(0,s.jsx)("br",{})," ",(0,s.jsx)(n.strong,{children:"Fee"}),": 0\nDOT ",(0,s.jsx)("br",{})]}),(0,s.jsxs)(n.p,{children:["Registrar 3: ",(0,s.jsx)("br",{})," ",(0,s.jsx)(n.strong,{children:"Account"}),": 13SceNt2ELz3ti4rnQbY1snpYH4XE4fLFsW8ph9rpwJd6HFC ",(0,s.jsx)("br",{})," ",(0,s.jsx)(n.strong,{children:"Fee"}),":\n0.5 DOT ",(0,s.jsx)("br",{})," Polkassembly (Registrar 3) provides setting on-chain ID as a service on their\n",(0,s.jsx)(n.a,{href:"https://polkadot.polkassembly.io/",children:"website"}),"."]})]}),(0,s.jsxs)(o.A,{value:"kusama",children:[(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.del,{children:"Registrar 0"})," : ",(0,s.jsx)("br",{})," ",(0,s.jsx)(n.strong,{children:"URL"}),": NA ",(0,s.jsx)("br",{})," ",(0,s.jsx)(n.strong,{children:"Account"}),":\n",(0,s.jsx)(n.del,{children:"H4XieK3r3dq3VEvRtqZR7wN7a1UEkXxf14orRsEfdFjmgkF"})," ",(0,s.jsx)("br",{})," ",(0,s.jsx)(n.strong,{children:"Fee"}),": ",(0,s.jsx)(n.del,{children:"0.04 KSM"})," ",(0,s.jsx)("br",{})]}),(0,s.jsxs)(n.p,{children:["Registrar 1: ",(0,s.jsx)("br",{})," ",(0,s.jsx)(n.strong,{children:"URL"}),": ",(0,s.jsx)(n.a,{href:"https://registrar.d11d.net/",children:"https://registrar.d11d.net/"})," ",(0,s.jsx)("br",{})," ",(0,s.jsx)(n.strong,{children:"Account"}),":\nFom9M5W6Kck1hNAiE2mDcZ67auUCiNTzLBUdQy4QnxHSxdn ",(0,s.jsx)("br",{})," ",(0,s.jsx)(n.strong,{children:"Fee"}),": 4.5 KSM ",(0,s.jsx)("br",{})]}),(0,s.jsxs)(n.p,{children:["Registrar 2: is no longer offering registrar services on Kusama. ",(0,s.jsx)("br",{})," ",(0,s.jsx)(n.strong,{children:"Account"}),":\n",(0,s.jsx)(n.del,{children:"EK8veMNH6sVtvhSRo4q1ZRh6huCDm69gxK4eN5MFoZzo3G7"})," ",(0,s.jsx)("br",{})," ",(0,s.jsx)(n.strong,{children:"Fee"}),": ",(0,s.jsx)(n.del,{children:"1 KSM"})," ",(0,s.jsx)("br",{})]}),(0,s.jsxs)(n.p,{children:["Registrar 3: ",(0,s.jsx)("br",{})," ",(0,s.jsx)(n.strong,{children:"Account"}),": GLiebiQp5f6G5vNcc7BgRE9T3hrZSYDwP6evERn3hEczdaM ",(0,s.jsx)("br",{})," ",(0,s.jsx)(n.strong,{children:"Fee"}),": 1\nKSM ",(0,s.jsx)("br",{})," Polkassembly (Registrar 3) provides setting on-chain ID as a service on their\n",(0,s.jsx)(n.a,{href:"https://kusama.polkassembly.io/",children:"website"}),"."]}),(0,s.jsxs)(n.p,{children:["Registrar 4: ",(0,s.jsx)("br",{})," ",(0,s.jsx)(n.strong,{children:"Account"}),": GhmpzxUyTVsFJhV7s2wNvD8v3Bgikb6WvYjj4QSuSScAUw6 ",(0,s.jsx)("br",{})," ",(0,s.jsx)(n.strong,{children:"Fee"}),":\n0.04 KSM ",(0,s.jsx)("br",{})]}),(0,s.jsxs)(n.p,{children:["Registrar 5: ",(0,s.jsx)("br",{})," ",(0,s.jsx)(n.strong,{children:"Account"}),": F1wAMxpzvjWCpsnbUMamgKfqFM7LRvNdkcQ44STkeVbemEZ ",(0,s.jsx)("br",{})," ",(0,s.jsx)(n.strong,{children:"Fee"}),":\n0.04 KSM ",(0,s.jsx)("br",{})," Polkassembly (Registrar 5) provides setting on-chain ID as a service on their\n",(0,s.jsx)(n.a,{href:"https://kusama.polkassembly.io/",children:"website"}),"."]}),(0,s.jsxs)(n.p,{children:["Registrar 6: ",(0,s.jsx)("br",{})," ",(0,s.jsx)(n.strong,{children:"Account"}),": HurhThD66KBUf2zcE9Zhx46sCqNJXviKhWAct95rBCkPuix ",(0,s.jsx)("br",{})," ",(0,s.jsx)(n.strong,{children:"Fee"}),":\n0.04 KSM ",(0,s.jsx)("br",{})," PolkaIdentity (Registrar 6) provides setting on-chain ID as a service on their\n",(0,s.jsx)(n.a,{href:"https://polkaidentity.com/",children:"website"}),"."]})]})]}),"\n",(0,s.jsxs)(n.p,{children:["See ",(0,s.jsx)(n.a,{href:"/docs/learn-guides-identity#registrars",children:"this page"})," to learn how to become a Registrar."]}),"\n",(0,s.jsx)(n.hr,{}),"\n",(0,s.jsx)(n.admonition,{title:"Polkadot-JS Guides",type:"info",children:(0,s.jsxs)(n.p,{children:["If you are an advanced user, see the\n",(0,s.jsx)(n.a,{href:"/docs/learn-guides-identity",children:"Polkadot-JS guides about account identity"}),"."]})})]})}function p(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}},19365:(e,n,t)=>{t.d(n,{A:()=>a});t(96540);var r=t(34164);const s={tabItem:"tabItem_Ymn6"};var i=t(74848);function a(e){var n=e.children,t=e.hidden,a=e.className;return(0,i.jsx)("div",{role:"tabpanel",className:(0,r.A)(s.tabItem,a),hidden:t,children:n})}},11470:(e,n,t)=>{t.d(n,{A:()=>w});var r=t(96540),s=t(34164),i=t(23104),a=t(56347),o=t(205),l=t(57485),c=t(31682),d=t(75376);function u(e){var n,t;return null!=(n=null==(t=r.Children.toArray(e).filter((function(e){return"\n"!==e})).map((function(e){if(!e||(0,r.isValidElement)(e)&&((n=e.props)&&"object"==typeof n&&"value"in n))return e;var n;throw new Error("Docusaurus error: Bad child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:t.filter(Boolean))?n:[]}function h(e){var n=e.values,t=e.children;return(0,r.useMemo)((function(){var e=null!=n?n:function(e){return u(e).map((function(e){var n=e.props;return{value:n.value,label:n.label,attributes:n.attributes,default:n.default}}))}(t);return function(e){var n=(0,c.XI)(e,(function(e,n){return e.value===n.value}));if(n.length>0)throw new Error('Docusaurus error: Duplicate values "'+n.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[n,t])}function p(e){var n=e.value;return e.tabValues.some((function(e){return e.value===n}))}function m(e){var n=e.queryString,t=void 0!==n&&n,s=e.groupId,i=(0,a.W6)(),o=function(e){var n=e.queryString,t=void 0!==n&&n,r=e.groupId;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!r)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=r?r:null}({queryString:t,groupId:s});return[(0,l.aZ)(o),(0,r.useCallback)((function(e){if(o){var n=new URLSearchParams(i.location.search);n.set(o,e),i.replace(Object.assign({},i.location,{search:n.toString()}))}}),[o,i])]}function g(e){var n,t,s,i,a=e.defaultValue,l=e.queryString,c=void 0!==l&&l,u=e.groupId,g=h(e),f=(0,r.useState)((function(){return function(e){var n,t=e.defaultValue,r=e.tabValues;if(0===r.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!p({value:t,tabValues:r}))throw new Error('Docusaurus error: The has a defaultValue "'+t+'" but none of its children has the corresponding value. Available values are: '+r.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return t}var s=null!=(n=r.find((function(e){return e.default})))?n:r[0];if(!s)throw new Error("Unexpected error: 0 tabValues");return s.value}({defaultValue:a,tabValues:g})})),j=f[0],x=f[1],b=m({queryString:c,groupId:u}),v=b[0],y=b[1],w=(n=function(e){return e?"docusaurus.tab."+e:null}({groupId:u}.groupId),t=(0,d.Dv)(n),s=t[0],i=t[1],[s,(0,r.useCallback)((function(e){n&&i.set(e)}),[n,i])]),k=w[0],A=w[1],R=function(){var e=null!=v?v:k;return p({value:e,tabValues:g})?e:null}();return(0,o.A)((function(){R&&x(R)}),[R]),{selectedValue:j,selectValue:(0,r.useCallback)((function(e){if(!p({value:e,tabValues:g}))throw new Error("Can't select invalid tab value="+e);x(e),y(e),A(e)}),[y,A,g]),tabValues:g}}var f=t(92303);const j={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var x=t(74848);function b(e){var n=e.className,t=e.block,r=e.selectedValue,a=e.selectValue,o=e.tabValues,l=[],c=(0,i.a_)().blockElementScrollPositionUntilNextRender,d=function(e){var n=e.currentTarget,t=l.indexOf(n),s=o[t].value;s!==r&&(c(n),a(s))},u=function(e){var n,t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":var r,s=l.indexOf(e.currentTarget)+1;t=null!=(r=l[s])?r:l[0];break;case"ArrowLeft":var i,a=l.indexOf(e.currentTarget)-1;t=null!=(i=l[a])?i:l[l.length-1]}null==(n=t)||n.focus()};return(0,x.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,s.A)("tabs",{"tabs--block":t},n),children:o.map((function(e){var n=e.value,t=e.label,i=e.attributes;return(0,x.jsx)("li",Object.assign({role:"tab",tabIndex:r===n?0:-1,"aria-selected":r===n,ref:function(e){return l.push(e)},onKeyDown:u,onClick:d},i,{className:(0,s.A)("tabs__item",j.tabItem,null==i?void 0:i.className,{"tabs__item--active":r===n}),children:null!=t?t:n}),n)}))})}function v(e){var n=e.lazy,t=e.children,i=e.selectedValue,a=(Array.isArray(t)?t:[t]).filter(Boolean);if(n){var o=a.find((function(e){return e.props.value===i}));return o?(0,r.cloneElement)(o,{className:(0,s.A)("margin-top--md",o.props.className)}):null}return(0,x.jsx)("div",{className:"margin-top--md",children:a.map((function(e,n){return(0,r.cloneElement)(e,{key:n,hidden:e.props.value!==i})}))})}function y(e){var n=g(e);return(0,x.jsxs)("div",{className:(0,s.A)("tabs-container",j.tabList),children:[(0,x.jsx)(b,Object.assign({},n,e)),(0,x.jsx)(v,Object.assign({},n,e))]})}function w(e){var n=(0,f.A)();return(0,x.jsx)(y,Object.assign({},e,{children:u(e.children)}),String(n))}},28453:(e,n,t)=>{t.d(n,{R:()=>a,x:()=>o});var r=t(96540);const s={},i=r.createContext(s);function a(e){const n=r.useContext(i);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:a(e.components),r.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/c977dfe8.4fa429f9.js b/assets/js/c977dfe8.4fa429f9.js new file mode 100644 index 000000000000..5efeb6e54921 --- /dev/null +++ b/assets/js/c977dfe8.4fa429f9.js @@ -0,0 +1 @@ +(self.webpackChunk=self.webpackChunk||[]).push([[4024],{32690:(e,t,s)=>{"use strict";s.r(t),s.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>d,frontMatter:()=>r,metadata:()=>a,toc:()=>c});const a=JSON.parse('{"id":"learn/learn-teleport","title":"Teleporting Assets","description":"Teleport Assets between Parachains and Relay Chain.","source":"@site/../docs/learn/learn-teleport.md","sourceDirName":"learn","slug":"/learn-teleport","permalink":"/docs/learn-teleport","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-teleport.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1726760224000,"frontMatter":{"id":"learn-teleport","title":"Teleporting Assets","sidebar_label":"Teleporting Assets","description":"Teleport Assets between Parachains and Relay Chain.","keywords":["teleport","assets","transfer"],"slug":"../learn-teleport"},"sidebar":"docs","previous":{"title":"Asset Conversion","permalink":"/docs/learn-asset-conversion-assethub"},"next":{"title":"Introduction to NFTs","permalink":"/docs/learn-nft"}}');var n=s(74848),o=s(28453);s(47379);const r={id:"learn-teleport",title:"Teleporting Assets",sidebar_label:"Teleporting Assets",description:"Teleport Assets between Parachains and Relay Chain.",keywords:["teleport","assets","transfer"],slug:"../learn-teleport"},i=void 0,l={},c=[{value:"How Teleports work",id:"how-teleports-work",level:2},{value:"Initiate Teleport",id:"initiate-teleport",level:3},{value:"Receive Teleported Assets",id:"receive-teleported-assets",level:3},{value:"Deposit Asset",id:"deposit-asset",level:3}];function p(e){const t={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",img:"img",p:"p",strong:"strong",...(0,o.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(t.p,{children:["One of the main properties that Polkadot brings to the blockchain industry is secure\ninteroperability. This interoperability allows for ",(0,n.jsx)(t.strong,{children:"asset teleportation"}),", i.e., the process of\nmoving assets (such as fungible and non-fungible tokens) between chains (parachains) to use them as\nany other asset native to that chain. Interoperability is possible through ",(0,n.jsx)(t.a,{href:"/docs/learn-xcm",children:"XCM"})," and\n",(0,n.jsx)(t.a,{href:"/docs/learn-spree",children:"SPREE modules"}),", which together ensure that assets are not lost or duplicated across\nmultiple chains."]}),"\n",(0,n.jsx)(t.admonition,{title:"Walk-through video tutorial about teleporting assets",type:"info",children:(0,n.jsxs)(t.p,{children:["See ",(0,n.jsx)(t.a,{href:"https://youtu.be/3tE9ouub5Tg",children:"this technical explainer video"})," to learn how to teleport assets\nfrom Kusama to the Asset Hub. The same procedure applies to teleporting between Polkadot and the\nPolkadot Asset Hub, or any other parachain."]})}),"\n",(0,n.jsx)(t.h2,{id:"how-teleports-work",children:"How Teleports work"}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"teleport",src:s(70883).A+"",width:"1397",height:"611"})}),"\n",(0,n.jsx)(t.p,{children:"As you can see from the diagram above, there are only two actors within this model: the source and\nthe destination. How we transfer assets between the source and the destination is briefly summarized\nin the numbered labels on the diagram and explained in more detail below."}),"\n",(0,n.jsx)(t.h3,{id:"initiate-teleport",children:"Initiate Teleport"}),"\n",(0,n.jsxs)(t.p,{children:["The source gathers the assets to be teleported from the sending account and ",(0,n.jsx)(t.strong,{children:"takes them out"})," from\nthe circulating supply, taking note of the total amount of assets that was taken out."]}),"\n",(0,n.jsx)(t.h3,{id:"receive-teleported-assets",children:"Receive Teleported Assets"}),"\n",(0,n.jsxs)(t.p,{children:["The source chain then creates an ",(0,n.jsx)(t.a,{href:"/docs/learn-xcm",children:"XCM"})," instruction called ",(0,n.jsx)(t.code,{children:"ReceiveTeleportedAssets"}),"\ncontaining the receiving account and the amount of assets taken out from circulation as parameters."]}),"\n",(0,n.jsxs)(t.p,{children:["It then sends this instruction over to the destination chain, where it gets processed, and new\nassets are ",(0,n.jsx)(t.strong,{children:"put back into"})," the circulating supply."]}),"\n",(0,n.jsx)(t.h3,{id:"deposit-asset",children:"Deposit Asset"}),"\n",(0,n.jsxs)(t.p,{children:["The destination deposits the assets to the receiving account. The actions of ",(0,n.jsx)(t.strong,{children:"taking out"})," from the\ncirculating supply and ",(0,n.jsx)(t.strong,{children:"putting back"})," into the circulating supply show the great flexibility that\nan ",(0,n.jsx)(t.a,{href:"/docs/learn-xcm",children:"XCM"})," executor has in regulating the flow of an asset without changing its\ncirculating supply. Assets are transferred to an inaccessible account to remove them from\ncirculation. Likewise, for putting assets back into circulation, assets are released from a\npre-filled and inaccessible treasury, or perform a mint of the assets. This process requires mutual\ntrust between the source and destination. The destination must trust the source of having\nappropriately removed the sent assets from the circulating supply, and the source must trust the\ndestination of having put the received assets back into circulation. The result of an asset\nteleportation should result in the same circulating supply of the asset, and failing to uphold this\ncondition will result in a change in the asset's total issuance (in the case of fungible tokens) or\na complete loss/duplication of an NFT."]})]})}function d(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(p,{...e})}):p(e)}},47379:(e,t,s)=>{"use strict";s.d(t,{A:()=>u});var a=s(90675),n=s(10467),o=s(96540),r=s(19588),i=s(2026),l=s(11135);function c(e,t,s){return p.apply(this,arguments)}function p(){return(p=(0,n.A)((0,a.A)().mark((function e(t,s,n){var o,l,c,p,d;return(0,a.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=void 0,l=void 0,e.t0=t,e.next="polkadot"===e.t0?5:"kusama"===e.t0?7:"statemine"===e.t0?9:"statemint"===e.t0?11:"polkadotpeople"===e.t0?13:"kusamapeople"===e.t0?15:17;break;case 5:return o="wss://rpc.polkadot.io",e.abrupt("break",18);case 7:return o="wss://kusama-rpc.polkadot.io/",e.abrupt("break",18);case 9:return o="wss://statemine-rpc.polkadot.io/",e.abrupt("break",18);case 11:return o="wss://statemint-rpc.polkadot.io/",e.abrupt("break",18);case 13:return o="wss://polkadot-people-rpc.polkadot.io/",e.abrupt("break",18);case 15:return o="wss://kusama-people-rpc.polkadot.io/",e.abrupt("break",18);case 17:console.log("Unknown socket url provided, no connection made.");case 18:if(void 0!==o){e.next=22;break}return e.abrupt("return");case 22:return c=new r.E(o),e.next=25,i.G.create({provider:c});case 25:p=e.sent,(d=s.split(".")).forEach((function(e){e in p&&(p=p[e])})),e.t1=d[0],e.next="consts"===e.t1?31:"query"===e.t1?33:38;break;case 31:return l=p.toString(),e.abrupt("break",39);case 33:return e.next=35,p();case 35:return l=(l=e.sent).toString(),e.abrupt("break",39);case 38:console.log("Unknown path prefix ("+d[0]+") in "+s);case 39:return e.abrupt("return",l);case 40:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function d(e,t,s,a){switch(t){case"humanReadable":(0,l.HumanReadable)(e,s,a);break;case"precise":(0,l.Precise)(e,s,a);break;case"blocksToDays":(0,l.BlocksToDays)(e,a);break;case"erasToDays":(0,l.ErasToDays)(e,a,s);break;case"percentage":(0,l.Percentage)(e,a);break;case"permillToPercent":(0,l.PermillToPercent)(e,a);break;case"arrayLength":(0,l.ArrayLength)(e,a);break;default:return void console.log("Ignoring unknown filter type")}}const u=function(e){var t=e.network,s=e.path,r=e.defaultValue,i=e.filter,l=void 0===i?void 0:i,p=(0,o.useState)(""),u=p[0],h=p[1];return t=t.toLowerCase(),(0,o.useEffect)((function(){void 0!==l?d(r.toString(),l,t,h):h(r.toString());var e=void 0;switch(t){case"polkadot":e="wss://rpc.polkadot.io";break;case"kusama":e="wss://kusama-rpc.polkadot.io/";break;case"statemine":e="wss://kusama-asset-hub-rpc.polkadot.io/";break;case"statemint":e="wss://polkadot-asset-hub-rpc.polkadot.io/";break;case"kusamapeople":e="wss://kusama-people-rpc.polkadot.io";break;case"polkadotpeople":e="wss://polkadot-people-rpc.polkadot.io";break;default:console.log("Unknown network provided, "+t)}if(void 0===e)console.log("Failed to connect to a valid websocket, applying default");else{var o=function(){var e=(0,n.A)((0,a.A)().mark((function e(){var n;return(0,a.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,c(t,s,h);case 2:if(void 0!==(n=e.sent)){e.next=7;break}return e.abrupt("return");case 7:void 0!==l?d(n,l,t,h):h(n);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();try{o()}catch(i){console.log(i)}}}),[]),u}},11135:e=>{var t="polkadot",s="kusama",a="statemine",n="statemint",o="polkadotpeople",r="kusamapeople",i={polkadot:{precision:1e10,symbol:"DOT"},kusama:{precision:1e12,symbol:"KSM"},statemint:{precision:1e10,symbol:"DOT"},statemine:{precision:1e12,symbol:"KSM"},polkadotpeople:{precision:1e10,symbol:"DOT"},kusamapeople:{precision:1e12,symbol:"KSM"}};e.exports={HumanReadable:function(e,l,c){var p=void 0;if(l===t||l===n)p=3;else if(l===s||l===a||l===o)p=6;else{if(l!=r)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");p=8}e=parseFloat(e),c((e=Number.isInteger(e/i[l].precision)?e/i[l].precision+" "+i[l].symbol:(e/i[l].precision).toFixed(p)+" "+i[l].symbol).toString())},Precise:function(e,t,s){s(e=(e=parseFloat(e))/i[t].precision+" "+i[t].symbol)},BlocksToDays:function(e,t){t((e=6*e/86400).toString())},ErasToDays:function(e,i,l){var c=void 0;if(l===t||l===n||l==o)c=1;else{if(l!==s&&l!==a&&l!=r)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");c=4}i((e/=c).toString())},Percentage:function(e,t){t((e/=1e7).toString())},PermillToPercent:function(e,t){t((e/=1e4).toString())},ArrayLength:function(e,t){t((e=e.split(",").length).toString())}}},70883:(e,t,s)=>{"use strict";s.d(t,{A:()=>a});const a=s.p+"assets/images/teleport-asset-4f624ff92c1b79da7067a267f10abc95.png"},47790:()=>{}}]); \ No newline at end of file diff --git a/assets/js/c977dfe8.99e02f3a.js b/assets/js/c977dfe8.99e02f3a.js deleted file mode 100644 index 370423e2c63d..000000000000 --- a/assets/js/c977dfe8.99e02f3a.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk=self.webpackChunk||[]).push([[4024],{95304:(e,t,s)=>{"use strict";s.r(t),s.d(t,{assets:()=>l,contentTitle:()=>r,default:()=>d,frontMatter:()=>o,metadata:()=>i,toc:()=>c});var n=s(74848),a=s(28453);s(47379);const o={id:"learn-teleport",title:"Teleporting Assets",sidebar_label:"Teleporting Assets",description:"Teleport Assets between Parachains and Relay Chain.",keywords:["teleport","assets","transfer"],slug:"../learn-teleport"},r=void 0,i={id:"learn/learn-teleport",title:"Teleporting Assets",description:"Teleport Assets between Parachains and Relay Chain.",source:"@site/../docs/learn/learn-teleport.md",sourceDirName:"learn",slug:"/learn-teleport",permalink:"/docs/learn-teleport",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-teleport.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1726760224e3,frontMatter:{id:"learn-teleport",title:"Teleporting Assets",sidebar_label:"Teleporting Assets",description:"Teleport Assets between Parachains and Relay Chain.",keywords:["teleport","assets","transfer"],slug:"../learn-teleport"},sidebar:"docs",previous:{title:"Asset Conversion",permalink:"/docs/learn-asset-conversion-assethub"},next:{title:"Introduction to NFTs",permalink:"/docs/learn-nft"}},l={},c=[{value:"How Teleports work",id:"how-teleports-work",level:2},{value:"Initiate Teleport",id:"initiate-teleport",level:3},{value:"Receive Teleported Assets",id:"receive-teleported-assets",level:3},{value:"Deposit Asset",id:"deposit-asset",level:3}];function p(e){const t={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",img:"img",p:"p",strong:"strong",...(0,a.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(t.p,{children:["One of the main properties that Polkadot brings to the blockchain industry is secure\ninteroperability. This interoperability allows for ",(0,n.jsx)(t.strong,{children:"asset teleportation"}),", i.e., the process of\nmoving assets (such as fungible and non-fungible tokens) between chains (parachains) to use them as\nany other asset native to that chain. Interoperability is possible through ",(0,n.jsx)(t.a,{href:"/docs/learn-xcm",children:"XCM"})," and\n",(0,n.jsx)(t.a,{href:"/docs/learn-spree",children:"SPREE modules"}),", which together ensure that assets are not lost or duplicated across\nmultiple chains."]}),"\n",(0,n.jsx)(t.admonition,{title:"Walk-through video tutorial about teleporting assets",type:"info",children:(0,n.jsxs)(t.p,{children:["See ",(0,n.jsx)(t.a,{href:"https://youtu.be/3tE9ouub5Tg",children:"this technical explainer video"})," to learn how to teleport assets\nfrom Kusama to the Asset Hub. The same procedure applies to teleporting between Polkadot and the\nPolkadot Asset Hub, or any other parachain."]})}),"\n",(0,n.jsx)(t.h2,{id:"how-teleports-work",children:"How Teleports work"}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"teleport",src:s(70883).A+"",width:"1397",height:"611"})}),"\n",(0,n.jsx)(t.p,{children:"As you can see from the diagram above, there are only two actors within this model: the source and\nthe destination. How we transfer assets between the source and the destination is briefly summarized\nin the numbered labels on the diagram and explained in more detail below."}),"\n",(0,n.jsx)(t.h3,{id:"initiate-teleport",children:"Initiate Teleport"}),"\n",(0,n.jsxs)(t.p,{children:["The source gathers the assets to be teleported from the sending account and ",(0,n.jsx)(t.strong,{children:"takes them out"})," from\nthe circulating supply, taking note of the total amount of assets that was taken out."]}),"\n",(0,n.jsx)(t.h3,{id:"receive-teleported-assets",children:"Receive Teleported Assets"}),"\n",(0,n.jsxs)(t.p,{children:["The source chain then creates an ",(0,n.jsx)(t.a,{href:"/docs/learn-xcm",children:"XCM"})," instruction called ",(0,n.jsx)(t.code,{children:"ReceiveTeleportedAssets"}),"\ncontaining the receiving account and the amount of assets taken out from circulation as parameters."]}),"\n",(0,n.jsxs)(t.p,{children:["It then sends this instruction over to the destination chain, where it gets processed, and new\nassets are ",(0,n.jsx)(t.strong,{children:"put back into"})," the circulating supply."]}),"\n",(0,n.jsx)(t.h3,{id:"deposit-asset",children:"Deposit Asset"}),"\n",(0,n.jsxs)(t.p,{children:["The destination deposits the assets to the receiving account. The actions of ",(0,n.jsx)(t.strong,{children:"taking out"})," from the\ncirculating supply and ",(0,n.jsx)(t.strong,{children:"putting back"})," into the circulating supply show the great flexibility that\nan ",(0,n.jsx)(t.a,{href:"/docs/learn-xcm",children:"XCM"})," executor has in regulating the flow of an asset without changing its\ncirculating supply. Assets are transferred to an inaccessible account to remove them from\ncirculation. Likewise, for putting assets back into circulation, assets are released from a\npre-filled and inaccessible treasury, or perform a mint of the assets. This process requires mutual\ntrust between the source and destination. The destination must trust the source of having\nappropriately removed the sent assets from the circulating supply, and the source must trust the\ndestination of having put the received assets back into circulation. The result of an asset\nteleportation should result in the same circulating supply of the asset, and failing to uphold this\ncondition will result in a change in the asset's total issuance (in the case of fungible tokens) or\na complete loss/duplication of an NFT."]})]})}function d(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(p,{...e})}):p(e)}},47379:(e,t,s)=>{"use strict";s.d(t,{A:()=>u});var n=s(90675),a=s(10467),o=s(96540),r=s(19588),i=s(2026),l=s(11135);function c(e,t,s){return p.apply(this,arguments)}function p(){return(p=(0,a.A)((0,n.A)().mark((function e(t,s,a){var o,l,c,p,d;return(0,n.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=void 0,l=void 0,e.t0=t,e.next="polkadot"===e.t0?5:"kusama"===e.t0?7:"statemine"===e.t0?9:"statemint"===e.t0?11:"polkadotpeople"===e.t0?13:"kusamapeople"===e.t0?15:17;break;case 5:return o="wss://rpc.polkadot.io",e.abrupt("break",18);case 7:return o="wss://kusama-rpc.polkadot.io/",e.abrupt("break",18);case 9:return o="wss://statemine-rpc.polkadot.io/",e.abrupt("break",18);case 11:return o="wss://statemint-rpc.polkadot.io/",e.abrupt("break",18);case 13:return o="wss://polkadot-people-rpc.polkadot.io/",e.abrupt("break",18);case 15:return o="wss://kusama-people-rpc.polkadot.io/",e.abrupt("break",18);case 17:console.log("Unknown socket url provided, no connection made.");case 18:if(void 0!==o){e.next=22;break}return e.abrupt("return");case 22:return c=new r.E(o),e.next=25,i.G.create({provider:c});case 25:p=e.sent,(d=s.split(".")).forEach((function(e){e in p&&(p=p[e])})),e.t1=d[0],e.next="consts"===e.t1?31:"query"===e.t1?33:38;break;case 31:return l=p.toString(),e.abrupt("break",39);case 33:return e.next=35,p();case 35:return l=(l=e.sent).toString(),e.abrupt("break",39);case 38:console.log("Unknown path prefix ("+d[0]+") in "+s);case 39:return e.abrupt("return",l);case 40:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function d(e,t,s,n){switch(t){case"humanReadable":(0,l.HumanReadable)(e,s,n);break;case"precise":(0,l.Precise)(e,s,n);break;case"blocksToDays":(0,l.BlocksToDays)(e,n);break;case"erasToDays":(0,l.ErasToDays)(e,n,s);break;case"percentage":(0,l.Percentage)(e,n);break;case"permillToPercent":(0,l.PermillToPercent)(e,n);break;case"arrayLength":(0,l.ArrayLength)(e,n);break;default:return void console.log("Ignoring unknown filter type")}}const u=function(e){var t=e.network,s=e.path,r=e.defaultValue,i=e.filter,l=void 0===i?void 0:i,p=(0,o.useState)(""),u=p[0],h=p[1];return t=t.toLowerCase(),(0,o.useEffect)((function(){void 0!==l?d(r.toString(),l,t,h):h(r.toString());var e=void 0;switch(t){case"polkadot":e="wss://rpc.polkadot.io";break;case"kusama":e="wss://kusama-rpc.polkadot.io/";break;case"statemine":e="wss://kusama-asset-hub-rpc.polkadot.io/";break;case"statemint":e="wss://polkadot-asset-hub-rpc.polkadot.io/";break;case"kusamapeople":e="wss://kusama-people-rpc.polkadot.io";break;case"polkadotpeople":e="wss://polkadot-people-rpc.polkadot.io";break;default:console.log("Unknown network provided, "+t)}if(void 0===e)console.log("Failed to connect to a valid websocket, applying default");else{var o=function(){var e=(0,a.A)((0,n.A)().mark((function e(){var a;return(0,n.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,c(t,s,h);case 2:if(void 0!==(a=e.sent)){e.next=7;break}return e.abrupt("return");case 7:void 0!==l?d(a,l,t,h):h(a);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();try{o()}catch(i){console.log(i)}}}),[]),u}},11135:e=>{var t="polkadot",s="kusama",n="statemine",a="statemint",o="polkadotpeople",r="kusamapeople",i={polkadot:{precision:1e10,symbol:"DOT"},kusama:{precision:1e12,symbol:"KSM"},statemint:{precision:1e10,symbol:"DOT"},statemine:{precision:1e12,symbol:"KSM"},polkadotpeople:{precision:1e10,symbol:"DOT"},kusamapeople:{precision:1e12,symbol:"KSM"}};e.exports={HumanReadable:function(e,l,c){var p=void 0;if(l===t||l===a)p=3;else if(l===s||l===n||l===o)p=6;else{if(l!=r)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");p=8}e=parseFloat(e),c((e=Number.isInteger(e/i[l].precision)?e/i[l].precision+" "+i[l].symbol:(e/i[l].precision).toFixed(p)+" "+i[l].symbol).toString())},Precise:function(e,t,s){s(e=(e=parseFloat(e))/i[t].precision+" "+i[t].symbol)},BlocksToDays:function(e,t){t((e=6*e/86400).toString())},ErasToDays:function(e,i,l){var c=void 0;if(l===t||l===a||l==o)c=1;else{if(l!==s&&l!==n&&l!=r)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");c=4}i((e/=c).toString())},Percentage:function(e,t){t((e/=1e7).toString())},PermillToPercent:function(e,t){t((e/=1e4).toString())},ArrayLength:function(e,t){t((e=e.split(",").length).toString())}}},70883:(e,t,s)=>{"use strict";s.d(t,{A:()=>n});const n=s.p+"assets/images/teleport-asset-4f624ff92c1b79da7067a267f10abc95.png"},47790:()=>{}}]); \ No newline at end of file diff --git a/assets/js/ca9fe671.a35a33b7.js b/assets/js/ca9fe671.a35a33b7.js deleted file mode 100644 index d65dd8f2660e..000000000000 --- a/assets/js/ca9fe671.a35a33b7.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5827],{55995:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>o,default:()=>d,frontMatter:()=>i,metadata:()=>a,toc:()=>h});var s=n(74848),r=n(28453);const i={id:"learn-xcm-docs-overview-xcvm",title:"The XCVM",sidebar_label:"The XCVM",description:"The Cross-Consensus Virtual Machine.",keywords:["xcm","cross-consensus messaging","xcvm"],slug:"../overview-xcvm"},o="The XCVM",a={id:"learn/xcm/overview/learn-xcm-docs-overview-xcvm",title:"The XCVM",description:"The Cross-Consensus Virtual Machine.",source:"@site/../docs/learn/xcm/overview/xcvm.md",sourceDirName:"learn/xcm/overview",slug:"/learn/xcm/overview-xcvm",permalink:"/docs/learn/xcm/overview-xcvm",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/xcm/overview/xcvm.md",tags:[],version:"current",lastUpdatedBy:"github-actions[bot]",lastUpdatedAt:1712558849e3,frontMatter:{id:"learn-xcm-docs-overview-xcvm",title:"The XCVM",sidebar_label:"The XCVM",description:"The Cross-Consensus Virtual Machine.",keywords:["xcm","cross-consensus messaging","xcvm"],slug:"../overview-xcvm"},sidebar:"docs",previous:{title:"A Format, not a Protocol",permalink:"/docs/learn/xcm/overview-format"},next:{title:"Architecture",permalink:"/docs/learn/xcm/overview-architecture"}},c={},h=[];function l(e){const t={a:"a",code:"code",h1:"h1",header:"header",li:"li",p:"p",ul:"ul",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.header,{children:(0,s.jsx)(t.h1,{id:"the-xcvm",children:"The XCVM"})}),"\n",(0,s.jsx)(t.p,{children:"At the core of XCM lies the XCVM (Cross-Consensus Virtual Machine). A message in XCM (referred to as\nan XCM, cross-consensus message, or XCMs for more than one) is an XCVM program. The XCVM is a\nregister-based state machine that executes every program by processing its instructions one at a\ntime. During execution, state is tracked in domain-specific registers, and is constantly being used\nand updated. Most of the XCM format comprises these registers and the instructions used to compose\nXCVM programs."}),"\n",(0,s.jsxs)(t.p,{children:["Like XCM, the XCVM is also a specification. The implementation that will be used in this\ndocumentation is the\n",(0,s.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/polkadot/xcm/xcm-executor",children:"xcm-executor"}),",\nprovided by Parity. The executor is highly configurable. For more information on the extensive\nconfiguration options available, see the ",(0,s.jsx)(t.a,{href:"/docs/learn/xcm/config-deep-dive",children:"Config Deep Dive"})," chapter."]}),"\n",(0,s.jsx)(t.p,{children:"Anyone can create an implementation of the XCVM. As long as they follow the standard, they'll be\nable to send XCMs to systems using other implementations."}),"\n",(0,s.jsx)(t.p,{children:"Typically, an XCM takes the following path through the XCVM:"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:"Instructions within an XCM are read one-by-one."}),"\n",(0,s.jsx)(t.li,{children:"The instruction is executed. This means that the current values of the XCVM registers, the\ninstruction type, and the instruction operands are all used to execute some operation, which might\nresult in some registers changing their value, or in an error being thrown, which would halt\nexecution."}),"\n",(0,s.jsx)(t.li,{children:"Each subsequent instruction within the XCM is read until the end of the message has been reached."}),"\n"]}),"\n",(0,s.jsxs)(t.p,{children:["An example of an XCVM register is the holding register. Any XCVM program that handles assets will be\nputting them in and taking them from this register. This register is used by several of the\ninstructions we will look at later, including ",(0,s.jsx)(t.code,{children:"DepositAsset"})," and ",(0,s.jsx)(t.code,{children:"WithdrawAsset"}),"."]}),"\n",(0,s.jsxs)(t.p,{children:["For more information on other registers, see the\n",(0,s.jsx)(t.a,{href:"/docs/learn/xcm/reference-xcvm-registers",children:"All XCVM Registers"})," section."]})]})}function d(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},28453:(e,t,n)=>{n.d(t,{R:()=>o,x:()=>a});var s=n(96540);const r={},i=s.createContext(r);function o(e){const t=s.useContext(i);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:o(e.components),s.createElement(i.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/ca9fe671.b4e08b7d.js b/assets/js/ca9fe671.b4e08b7d.js new file mode 100644 index 000000000000..298be2431ab6 --- /dev/null +++ b/assets/js/ca9fe671.b4e08b7d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5827],{47733:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>a,default:()=>d,frontMatter:()=>o,metadata:()=>s,toc:()=>h});const s=JSON.parse('{"id":"learn/xcm/overview/learn-xcm-docs-overview-xcvm","title":"The XCVM","description":"The Cross-Consensus Virtual Machine.","source":"@site/../docs/learn/xcm/overview/xcvm.md","sourceDirName":"learn/xcm/overview","slug":"/learn/xcm/overview-xcvm","permalink":"/docs/learn/xcm/overview-xcvm","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/xcm/overview/xcvm.md","tags":[],"version":"current","lastUpdatedBy":"github-actions[bot]","lastUpdatedAt":1712558849000,"frontMatter":{"id":"learn-xcm-docs-overview-xcvm","title":"The XCVM","sidebar_label":"The XCVM","description":"The Cross-Consensus Virtual Machine.","keywords":["xcm","cross-consensus messaging","xcvm"],"slug":"../overview-xcvm"},"sidebar":"docs","previous":{"title":"A Format, not a Protocol","permalink":"/docs/learn/xcm/overview-format"},"next":{"title":"Architecture","permalink":"/docs/learn/xcm/overview-architecture"}}');var r=n(74848),i=n(28453);const o={id:"learn-xcm-docs-overview-xcvm",title:"The XCVM",sidebar_label:"The XCVM",description:"The Cross-Consensus Virtual Machine.",keywords:["xcm","cross-consensus messaging","xcvm"],slug:"../overview-xcvm"},a="The XCVM",c={},h=[];function l(e){const t={a:"a",code:"code",h1:"h1",header:"header",li:"li",p:"p",ul:"ul",...(0,i.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.header,{children:(0,r.jsx)(t.h1,{id:"the-xcvm",children:"The XCVM"})}),"\n",(0,r.jsx)(t.p,{children:"At the core of XCM lies the XCVM (Cross-Consensus Virtual Machine). A message in XCM (referred to as\nan XCM, cross-consensus message, or XCMs for more than one) is an XCVM program. The XCVM is a\nregister-based state machine that executes every program by processing its instructions one at a\ntime. During execution, state is tracked in domain-specific registers, and is constantly being used\nand updated. Most of the XCM format comprises these registers and the instructions used to compose\nXCVM programs."}),"\n",(0,r.jsxs)(t.p,{children:["Like XCM, the XCVM is also a specification. The implementation that will be used in this\ndocumentation is the\n",(0,r.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/polkadot/xcm/xcm-executor",children:"xcm-executor"}),",\nprovided by Parity. The executor is highly configurable. For more information on the extensive\nconfiguration options available, see the ",(0,r.jsx)(t.a,{href:"/docs/learn/xcm/config-deep-dive",children:"Config Deep Dive"})," chapter."]}),"\n",(0,r.jsx)(t.p,{children:"Anyone can create an implementation of the XCVM. As long as they follow the standard, they'll be\nable to send XCMs to systems using other implementations."}),"\n",(0,r.jsx)(t.p,{children:"Typically, an XCM takes the following path through the XCVM:"}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsx)(t.li,{children:"Instructions within an XCM are read one-by-one."}),"\n",(0,r.jsx)(t.li,{children:"The instruction is executed. This means that the current values of the XCVM registers, the\ninstruction type, and the instruction operands are all used to execute some operation, which might\nresult in some registers changing their value, or in an error being thrown, which would halt\nexecution."}),"\n",(0,r.jsx)(t.li,{children:"Each subsequent instruction within the XCM is read until the end of the message has been reached."}),"\n"]}),"\n",(0,r.jsxs)(t.p,{children:["An example of an XCVM register is the holding register. Any XCVM program that handles assets will be\nputting them in and taking them from this register. This register is used by several of the\ninstructions we will look at later, including ",(0,r.jsx)(t.code,{children:"DepositAsset"})," and ",(0,r.jsx)(t.code,{children:"WithdrawAsset"}),"."]}),"\n",(0,r.jsxs)(t.p,{children:["For more information on other registers, see the\n",(0,r.jsx)(t.a,{href:"/docs/learn/xcm/reference-xcvm-registers",children:"All XCVM Registers"})," section."]})]})}function d(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(l,{...e})}):l(e)}},28453:(e,t,n)=>{n.d(t,{R:()=>o,x:()=>a});var s=n(96540);const r={},i=s.createContext(r);function o(e){const t=s.useContext(i);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:o(e.components),s.createElement(i.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/cb9afd28.26565d39.js b/assets/js/cb9afd28.26565d39.js deleted file mode 100644 index b9dff7202506..000000000000 --- a/assets/js/cb9afd28.26565d39.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1738],{27735:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>l,default:()=>h,frontMatter:()=>i,metadata:()=>d,toc:()=>u});var r=n(74848),o=n(28453),s=n(67141),a=n(3514);const i={id:"learn-polkadot-js-guides",title:"Polkadot-JS Guides",sidebar_label:"Polkadot-JS Guides",description:"Guides about Polkadot-JS.",keywords:["polkadot-JS","polkadotjs","guides","advanced"],slug:"../learn-polkadot-js-guides"},l=void 0,d={id:"learn/learn-polkadot-js-guides",title:"Polkadot-JS Guides",description:"Guides about Polkadot-JS.",source:"@site/../docs/learn/learn-polkadot-js-guides.md",sourceDirName:"learn",slug:"/learn-polkadot-js-guides",permalink:"/docs/learn-polkadot-js-guides",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-polkadot-js-guides.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1729847256e3,frontMatter:{id:"learn-polkadot-js-guides",title:"Polkadot-JS Guides",sidebar_label:"Polkadot-JS Guides",description:"Guides about Polkadot-JS.",keywords:["polkadot-JS","polkadotjs","guides","advanced"],slug:"../learn-polkadot-js-guides"},sidebar:"docs",previous:{title:"Polkadot-JS UI",permalink:"/docs/polkadotjs-ui"},next:{title:"Account Guides",permalink:"/docs/learn-guides-accounts"}},c={},u=[];function p(e){const t={a:"a",admonition:"admonition",p:"p",strong:"strong",...(0,o.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the Polkadot-JS UI, you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,r.jsx)(t.admonition,{type:"info",children:(0,r.jsxs)(t.p,{children:["We support only the use of the ",(0,r.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/explorer",children:(0,r.jsx)(t.strong,{children:"Polkadot-JS UI"})}),"\ntogether with the ",(0,r.jsx)(t.a,{href:"https://polkadot.js.org/extension/",children:(0,r.jsx)(t.strong,{children:"Polkadot-JS browser extension"})}),",\n",(0,r.jsx)(t.a,{href:"https://www.ledger.com/ledger-live",children:(0,r.jsx)(t.strong,{children:"Ledger"})})," and\n",(0,r.jsx)(t.a,{href:"https://www.parity.io/technologies/signer/",children:(0,r.jsx)(t.strong,{children:"Polkadot Vault"})})," for signing transactions. We do not\nprovide support for third party applications."]})}),"\n",(0,r.jsx)(a.A,{})]})}function h(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(p,{...e})}):p(e)}},67141:(e,t,n)=>{n.d(t,{A:()=>s});var r=n(96540),o=n(74848);const s=function(e){var t,n=e.message,s=(0,r.useState)(!0),a=s[0],i=s[1];return(0,o.jsx)(o.Fragment,{children:a&&(0,o.jsxs)("div",{className:"message-box",children:[(0,o.jsx)("button",{className:"close-button",onClick:function(){i(!1)},children:"\u2716 "}),(0,o.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(t=n,t.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},3514:(e,t,n)=>{n.d(t,{A:()=>k});n(96540);var r=n(34164),o=n(26972),s=n(28774),a=n(53465),i=n(16654),l=n(21312),d=n(51107);const c={cardContainer:"cardContainer_fWXF",cardTitle:"cardTitle_rnsV",cardDescription:"cardDescription_PWke"};var u=n(74848);function p(e){var t=e.href,n=e.children;return(0,u.jsx)(s.A,{href:t,className:(0,r.A)("card padding--lg",c.cardContainer),children:n})}function h(e){var t=e.href,n=e.icon,o=e.title,s=e.description;return(0,u.jsxs)(p,{href:t,children:[(0,u.jsxs)(d.A,{as:"h2",className:(0,r.A)("text--truncate",c.cardTitle),title:o,children:[n," ",o]}),s&&(0,u.jsx)("p",{className:(0,r.A)("text--truncate",c.cardDescription),title:s,children:s})]})}function m(e){var t,n,r=e.item,s=(0,o.Nr)(r),i=(n=(0,a.W)().selectMessage,function(e){return n(e,(0,l.T)({message:"1 item|{count} items",id:"theme.docs.DocCard.categoryDescription.plurals",description:"The default description for a category card in the generated index about how many items this category includes"},{count:e}))});return s?(0,u.jsx)(h,{href:s,icon:"\ud83d\uddc3\ufe0f",title:r.label,description:null!=(t=r.description)?t:i(r.items.length)}):null}function f(e){var t,n,r=e.item,s=(0,i.A)(r.href)?"\ud83d\udcc4\ufe0f":"\ud83d\udd17",a=(0,o.cC)(null!=(t=r.docId)?t:void 0);return(0,u.jsx)(h,{href:r.href,icon:s,title:r.label,description:null!=(n=r.description)?n:null==a?void 0:a.description})}function g(e){var t=e.item;switch(t.type){case"link":return(0,u.jsx)(f,{item:t});case"category":return(0,u.jsx)(m,{item:t});default:throw new Error("unknown item type "+JSON.stringify(t))}}function x(e){var t=e.className,n=(0,o.$S)();return(0,u.jsx)(k,{items:n.items,className:t})}function k(e){var t=e.items,n=e.className;if(!t)return(0,u.jsx)(x,Object.assign({},e));var s=(0,o.d1)(t);return(0,u.jsx)("section",{className:(0,r.A)("row",n),children:s.map((function(e,t){return(0,u.jsx)("article",{className:"col col--6 margin-bottom--lg",children:(0,u.jsx)(g,{item:e})},t)}))})}},53465:(e,t,n)=>{n.d(t,{W:()=>d});var r=n(96540),o=n(44586),s=["zero","one","two","few","many","other"];function a(e){return s.filter((function(t){return e.includes(t)}))}var i={locale:"en",pluralForms:a(["one","other"]),select:function(e){return 1===e?"one":"other"}};function l(){var e=(0,o.A)().i18n.currentLocale;return(0,r.useMemo)((function(){try{return t=e,n=new Intl.PluralRules(t),{locale:t,pluralForms:a(n.resolvedOptions().pluralCategories),select:function(e){return n.select(e)}}}catch(r){return console.error('Failed to use Intl.PluralRules for locale "'+e+'".\nDocusaurus will fallback to the default (English) implementation.\nError: '+r.message+"\n"),i}var t,n}),[e])}function d(){var e=l();return{selectMessage:function(t,n){return function(e,t,n){var r=e.split("|");if(1===r.length)return r[0];r.length>n.pluralForms.length&&console.error("For locale="+n.locale+", a maximum of "+n.pluralForms.length+" plural forms are expected ("+n.pluralForms.join(",")+"), but the message contains "+r.length+": "+e);var o=n.select(t),s=n.pluralForms.indexOf(o);return r[Math.min(s,r.length-1)]}(n,t,e)}}}},28453:(e,t,n)=>{n.d(t,{R:()=>a,x:()=>i});var r=n(96540);const o={},s=r.createContext(o);function a(e){const t=r.useContext(s);return r.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:a(e.components),r.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/cb9afd28.62efae8e.js b/assets/js/cb9afd28.62efae8e.js new file mode 100644 index 000000000000..5a551f6c280d --- /dev/null +++ b/assets/js/cb9afd28.62efae8e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1738],{58772:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>d,default:()=>h,frontMatter:()=>i,metadata:()=>r,toc:()=>u});const r=JSON.parse('{"id":"learn/learn-polkadot-js-guides","title":"Polkadot-JS Guides","description":"Guides about Polkadot-JS.","source":"@site/../docs/learn/learn-polkadot-js-guides.md","sourceDirName":"learn","slug":"/learn-polkadot-js-guides","permalink":"/docs/learn-polkadot-js-guides","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-polkadot-js-guides.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1729847256000,"frontMatter":{"id":"learn-polkadot-js-guides","title":"Polkadot-JS Guides","sidebar_label":"Polkadot-JS Guides","description":"Guides about Polkadot-JS.","keywords":["polkadot-JS","polkadotjs","guides","advanced"],"slug":"../learn-polkadot-js-guides"},"sidebar":"docs","previous":{"title":"Polkadot-JS UI","permalink":"/docs/polkadotjs-ui"},"next":{"title":"Account Guides","permalink":"/docs/learn-guides-accounts"}}');var o=n(74848),s=n(28453),a=n(67141),l=n(3514);const i={id:"learn-polkadot-js-guides",title:"Polkadot-JS Guides",sidebar_label:"Polkadot-JS Guides",description:"Guides about Polkadot-JS.",keywords:["polkadot-JS","polkadotjs","guides","advanced"],slug:"../learn-polkadot-js-guides"},d=void 0,c={},u=[];function p(e){const t={a:"a",admonition:"admonition",p:"p",strong:"strong",...(0,s.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(a.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the Polkadot-JS UI, you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,o.jsx)(t.admonition,{type:"info",children:(0,o.jsxs)(t.p,{children:["We support only the use of the ",(0,o.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/explorer",children:(0,o.jsx)(t.strong,{children:"Polkadot-JS UI"})}),"\ntogether with the ",(0,o.jsx)(t.a,{href:"https://polkadot.js.org/extension/",children:(0,o.jsx)(t.strong,{children:"Polkadot-JS browser extension"})}),",\n",(0,o.jsx)(t.a,{href:"https://www.ledger.com/ledger-live",children:(0,o.jsx)(t.strong,{children:"Ledger"})})," and\n",(0,o.jsx)(t.a,{href:"https://www.parity.io/technologies/signer/",children:(0,o.jsx)(t.strong,{children:"Polkadot Vault"})})," for signing transactions. We do not\nprovide support for third party applications."]})}),"\n",(0,o.jsx)(l.A,{})]})}function h(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(p,{...e})}):p(e)}},67141:(e,t,n)=>{n.d(t,{A:()=>s});var r=n(96540),o=n(74848);const s=function(e){var t,n=e.message,s=(0,r.useState)(!0),a=s[0],l=s[1];return(0,o.jsx)(o.Fragment,{children:a&&(0,o.jsxs)("div",{className:"message-box",children:[(0,o.jsx)("button",{className:"close-button",onClick:function(){l(!1)},children:"\u2716 "}),(0,o.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(t=n,t.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},3514:(e,t,n)=>{n.d(t,{A:()=>k});n(96540);var r=n(34164),o=n(26972),s=n(28774),a=n(53465),l=n(16654),i=n(21312),d=n(51107);const c={cardContainer:"cardContainer_fWXF",cardTitle:"cardTitle_rnsV",cardDescription:"cardDescription_PWke"};var u=n(74848);function p(e){var t=e.href,n=e.children;return(0,u.jsx)(s.A,{href:t,className:(0,r.A)("card padding--lg",c.cardContainer),children:n})}function h(e){var t=e.href,n=e.icon,o=e.title,s=e.description;return(0,u.jsxs)(p,{href:t,children:[(0,u.jsxs)(d.A,{as:"h2",className:(0,r.A)("text--truncate",c.cardTitle),title:o,children:[n," ",o]}),s&&(0,u.jsx)("p",{className:(0,r.A)("text--truncate",c.cardDescription),title:s,children:s})]})}function m(e){var t,n,r=e.item,s=(0,o.Nr)(r),l=(n=(0,a.W)().selectMessage,function(e){return n(e,(0,i.T)({message:"1 item|{count} items",id:"theme.docs.DocCard.categoryDescription.plurals",description:"The default description for a category card in the generated index about how many items this category includes"},{count:e}))});return s?(0,u.jsx)(h,{href:s,icon:"\ud83d\uddc3\ufe0f",title:r.label,description:null!=(t=r.description)?t:l(r.items.length)}):null}function f(e){var t,n,r=e.item,s=(0,l.A)(r.href)?"\ud83d\udcc4\ufe0f":"\ud83d\udd17",a=(0,o.cC)(null!=(t=r.docId)?t:void 0);return(0,u.jsx)(h,{href:r.href,icon:s,title:r.label,description:null!=(n=r.description)?n:null==a?void 0:a.description})}function g(e){var t=e.item;switch(t.type){case"link":return(0,u.jsx)(f,{item:t});case"category":return(0,u.jsx)(m,{item:t});default:throw new Error("unknown item type "+JSON.stringify(t))}}function x(e){var t=e.className,n=(0,o.$S)();return(0,u.jsx)(k,{items:n.items,className:t})}function k(e){var t=e.items,n=e.className;if(!t)return(0,u.jsx)(x,Object.assign({},e));var s=(0,o.d1)(t);return(0,u.jsx)("section",{className:(0,r.A)("row",n),children:s.map((function(e,t){return(0,u.jsx)("article",{className:"col col--6 margin-bottom--lg",children:(0,u.jsx)(g,{item:e})},t)}))})}},53465:(e,t,n)=>{n.d(t,{W:()=>d});var r=n(96540),o=n(44586),s=["zero","one","two","few","many","other"];function a(e){return s.filter((function(t){return e.includes(t)}))}var l={locale:"en",pluralForms:a(["one","other"]),select:function(e){return 1===e?"one":"other"}};function i(){var e=(0,o.A)().i18n.currentLocale;return(0,r.useMemo)((function(){try{return t=e,n=new Intl.PluralRules(t),{locale:t,pluralForms:a(n.resolvedOptions().pluralCategories),select:function(e){return n.select(e)}}}catch(r){return console.error('Failed to use Intl.PluralRules for locale "'+e+'".\nDocusaurus will fallback to the default (English) implementation.\nError: '+r.message+"\n"),l}var t,n}),[e])}function d(){var e=i();return{selectMessage:function(t,n){return function(e,t,n){var r=e.split("|");if(1===r.length)return r[0];r.length>n.pluralForms.length&&console.error("For locale="+n.locale+", a maximum of "+n.pluralForms.length+" plural forms are expected ("+n.pluralForms.join(",")+"), but the message contains "+r.length+": "+e);var o=n.select(t),s=n.pluralForms.indexOf(o);return r[Math.min(s,r.length-1)]}(n,t,e)}}}},28453:(e,t,n)=>{n.d(t,{R:()=>a,x:()=>l});var r=n(96540);const o={},s=r.createContext(o);function a(e){const t=r.useContext(s);return r.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function l(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:a(e.components),r.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/cc44e8fd.41d4028f.js b/assets/js/cc44e8fd.41d4028f.js new file mode 100644 index 000000000000..b9061ced3424 --- /dev/null +++ b/assets/js/cc44e8fd.41d4028f.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5052],{93123:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>a,default:()=>h,frontMatter:()=>r,metadata:()=>o,toc:()=>d});const o=JSON.parse('{"id":"build/build-node-management","title":"Node Management","description":"Steps on how to manage your Polkadot node.","source":"@site/../docs/build/build-node-management.md","sourceDirName":"build","slug":"/build-node-management","permalink":"/docs/build-node-management","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/build/build-node-management.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1729245684000,"frontMatter":{"id":"build-node-management","title":"Node Management","sidebar_label":"Node Management","description":"Steps on how to manage your Polkadot node.","keywords":["node","management","deployment","operations","monitor"],"slug":"../build-node-management"},"sidebar":"docs","previous":{"title":"Integration Initiation","permalink":"/docs/build-integration"},"next":{"title":"Parachain Development","permalink":"/docs/build-pdk"}}');var i=t(74848),s=t(28453);const r={id:"build-node-management",title:"Node Management",sidebar_label:"Node Management",description:"Steps on how to manage your Polkadot node.",keywords:["node","management","deployment","operations","monitor"],slug:"../build-node-management"},a=void 0,l={},d=[{value:"Basic Node Operations",id:"basic-node-operations",level:2},{value:"File Structure",id:"file-structure",level:2},{value:"Monitoring and Telemetry",id:"monitoring-and-telemetry",level:2}];function c(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(n.p,{children:["This page contains basic information about running a Parity Polkadot client. There are a lot of ways\nto obtain/run a client, e.g. compiling from source, running in Docker, or downloading a binary. This\nguide will always refer to the executable as ",(0,i.jsx)(n.code,{children:"polkadot"}),"."]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsxs)(n.strong,{children:["Always refer to the client's help ",(0,i.jsx)(n.code,{children:"polkadot --help"})," for the most up-to-date information."]})}),"\n",(0,i.jsx)(n.admonition,{type:"note",children:(0,i.jsx)(n.p,{children:"Other client implementation teams: Feel free to make a PR to this page with instructions (or a link\nto instructions) for your client."})}),"\n",(0,i.jsxs)(n.p,{children:["If you are trying to run a validator, refer to this tutorial\n",(0,i.jsx)(n.a,{href:"/docs/maintain-guides-how-to-validate-polkadot",children:"here"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"basic-node-operations",children:"Basic Node Operations"}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"Selecting a chain"})}),"\n",(0,i.jsxs)(n.p,{children:["Use the ",(0,i.jsx)(n.code,{children:"--chain "})," option to select the chain. Can be ",(0,i.jsx)(n.code,{children:"polkadot"}),", ",(0,i.jsx)(n.code,{children:"kusama"}),", ",(0,i.jsx)(n.code,{children:"westend"}),", or\na custom chain spec. By default, the client will start Polkadot. Watch\n",(0,i.jsx)(n.a,{href:"https://www.youtube.com/watch?v=i9vNCHz6wO4",children:"How a single codebase can power four different blockchains"}),"\nto learn more about how the chain selection works internally."]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"Archive node"})}),"\n",(0,i.jsxs)(n.p,{children:["An archive node does not prune any block or state data. Use the ",(0,i.jsx)(n.code,{children:"--pruning archive"})," flag. Certain\ntypes of nodes like validators must run in archive mode. Likewise, all\n",(0,i.jsx)(n.a,{href:"build-protocol-info.md/#events",children:"events"})," are cleared from state in each block, so if you want to\nstore events then you will need an archive node."]}),"\n",(0,i.jsx)(n.admonition,{title:"Explainer video on upgrading a node",type:"note",children:(0,i.jsxs)(n.p,{children:["To upgrade a node, please refer to this\n",(0,i.jsx)(n.a,{href:"https://www.youtube.com/watch?v=5LtcdBR9F40&list=PLOyWqupZ-WGuAuS00rK-pebTMAOxW41W8&index=5",children:"video"})]})}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"Exporting blocks"})}),"\n",(0,i.jsxs)(n.p,{children:["To export blocks to a file, use ",(0,i.jsx)(n.code,{children:"export-blocks"}),". Export in JSON (default) or binary\n(",(0,i.jsx)(n.code,{children:"--binary true"}),")."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"polkadot export-blocks --from 0 \n"})}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"RPC ports"})}),"\n",(0,i.jsxs)(n.p,{children:["Use the ",(0,i.jsx)(n.code,{children:"--rpc-external"})," flag to expose RPC ports. Not all RPC calls are safe to allow and you\nshould use an RPC proxy to filter unsafe calls. Select ports with the ",(0,i.jsx)(n.code,{children:"--rpc-port"})," option. To limit\nthe hosts who can access, use the ",(0,i.jsx)(n.code,{children:"--rpc-cors"})," option."]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"Execution"})}),"\n",(0,i.jsxs)(n.p,{children:["The Parity Polkadot client implements a ",(0,i.jsx)(n.a,{href:"/docs/learn-polkadot-host",children:"Polkadot Host"})," and a\nnative runtime. The runtime must compile to WebAssembly and is stored on-chain. If the client's\nruntime is the same spec as the runtime that is stored on-chain, then the client will execute blocks\nusing the client binary. Otherwise, the client will execute the Wasm runtime from the chain."]}),"\n",(0,i.jsx)(n.p,{children:"Therefore, when syncing the chain, the client will execute blocks from past runtimes using their\nassociated Wasm binary. This feature also allows forkless upgrades: the client can execute a new\nruntime without updating the client."}),"\n",(0,i.jsxs)(n.p,{children:["Parity's Polkadot client has two Wasm execution methods, interpreted (default) and compiled. Set the\npreferred method to use when executing Wasm with ",(0,i.jsx)(n.code,{children:"--wasm-execution "}),". Compiled\nexecution will run much faster, especially when syncing the chain, but is experimental and may use\nmore memory/CPU. A reasonable tradeoff would be to sync the chain with compiled execution and then\nrestart the node with interpreted execution."]}),"\n",(0,i.jsx)(n.h2,{id:"file-structure",children:"File Structure"}),"\n",(0,i.jsxs)(n.p,{children:["The node stores a number of files in: ",(0,i.jsx)(n.code,{children:"/home/$USER/.local/share/polkadot/chains//"}),". You\ncan set a custom path with ",(0,i.jsx)(n.code,{children:"--base-path "}),"."]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:(0,i.jsx)(n.code,{children:"keystore"})})}),"\n",(0,i.jsx)(n.p,{children:"The keystore stores session keys, which are important for validator operations."}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"/docs/learn-cryptography",children:"Polkadot documentation"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://docs.substrate.io/main-docs/fundamentals/accounts-addresses-keys/#specialized-accounts",children:"Substrate documentation"})}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:(0,i.jsx)(n.code,{children:"db"})})}),"\n",(0,i.jsxs)(n.p,{children:["The database stores blocks and the state trie. If you are running a validator node, it also stores\nGRANDPA pre-votes and pre-commits and the offchain-worker DB. Use caution when\n",(0,i.jsx)(n.a,{href:"/docs/maintain-guides-how-to-upgrade",children:"migrating validator nodes"})," to avoid equivocation. If\nyou want to start a new machine without resyncing, you can stop your node, back up the DB, and move\nit to a new machine."]}),"\n",(0,i.jsx)(n.p,{children:"To delete your DB and re-sync from genesis, run:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"polkadot purge-chain\n"})}),"\n",(0,i.jsxs)(n.admonition,{title:"Validators should sync using the RocksDb backend",type:"note",children:[(0,i.jsxs)(n.p,{children:["This is implicit by default, but can be explicit by passing the ",(0,i.jsx)(n.code,{children:"--database RocksDb"})," flag. In the\nfuture, it is recommended to switch to using the faster and more efficient ParityDb option.\nSwitching between database backends will require a resync."]}),(0,i.jsxs)(n.p,{children:["If you want to test out ParityDB you can add the flag ",(0,i.jsx)(n.code,{children:"--database paritydb"}),"."]})]}),"\n",(0,i.jsx)(n.h2,{id:"monitoring-and-telemetry",children:"Monitoring and Telemetry"}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"Node status"})}),"\n",(0,i.jsxs)(n.p,{children:["You can check the node's health via RPC with\n",(0,i.jsx)(n.a,{href:"https://github.com/vi/websocat#installation",children:"websocat"}),":"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:'echo \'{"id":1,"jsonrpc":"2.0","method":"system_health","params":[]}\' | websocat -n1 -B 99999999 ws://127.0.0.1:9944\n\n{"jsonrpc":"2.0","result":{"peers":50,"isSyncing":false,"shouldHavePeers":true},"id":1}\n'})}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"Logs"})}),"\n",(0,i.jsx)(n.p,{children:"The Polkadot client has a number of log targets. The most interesting to users may be:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"afg"})," (Al's Finality Gadget - GRANDPA consensus)"]}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"babe"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"telemetry"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"txpool"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"usage"})}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["Other targets include:\n",(0,i.jsx)(n.code,{children:"db, gossip, peerset, state-db, state-trace, sub-libp2p, trie, wasm-executor, wasm-heap"}),"."]}),"\n",(0,i.jsx)(n.p,{children:"The log levels, from least to most verbose, are:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"error"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"warn"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"info"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"debug"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"trace"})}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["All targets are set to ",(0,i.jsx)(n.code,{children:"info"})," logging by default. You can adjust individual log levels using the\n",(0,i.jsx)(n.code,{children:"--log (-l short)"})," option, for example ",(0,i.jsx)(n.code,{children:"-l afg=trace,sync=debug"})," or globally with ",(0,i.jsx)(n.code,{children:"-ldebug"}),"."]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"Telemetry & Metrics"})}),"\n",(0,i.jsxs)(n.p,{children:["The Parity Polkadot client connects to telemetry by default. You can disable it with\n",(0,i.jsx)(n.code,{children:"--no-telemetry"}),", or connect only to specified telemetry servers with the ",(0,i.jsx)(n.code,{children:"--telemetry-url"})," option\n(see the help options for instructions). Connecting to public telemetry may expose information that\nputs your node at higher risk of attack. You can run your own, private\n",(0,i.jsx)(n.a,{href:"https://github.com/paritytech/substrate-telemetry",children:"telemetry server"})," or deploy a\n",(0,i.jsx)(n.code,{children:"substrate-telemetry"})," instance to a Kubernetes cluster using\n",(0,i.jsx)(n.a,{href:"https://github.com/w3f/substrate-telemetry-chart",children:"this Helm chart"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["The node also exposes a Prometheus endpoint by default (disable with ",(0,i.jsx)(n.code,{children:"--no-prometheus"}),"). Substrate\nhas a\n",(0,i.jsx)(n.a,{href:"https://docs.substrate.io/tutorials/get-started/monitor-node-metrics/",children:"monitor node metrics tutorial"}),"\nwhich uses this endpoint."]})]})}function h(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(c,{...e})}):c(e)}},28453:(e,n,t)=>{t.d(n,{R:()=>r,x:()=>a});var o=t(96540);const i={},s=o.createContext(i);function r(e){const n=o.useContext(s);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),o.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/cc44e8fd.4d1aa36d.js b/assets/js/cc44e8fd.4d1aa36d.js deleted file mode 100644 index 64db9a8294e2..000000000000 --- a/assets/js/cc44e8fd.4d1aa36d.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5052],{2851:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>r,default:()=>h,frontMatter:()=>s,metadata:()=>a,toc:()=>d});var o=t(74848),i=t(28453);const s={id:"build-node-management",title:"Node Management",sidebar_label:"Node Management",description:"Steps on how to manage your Polkadot node.",keywords:["node","management","deployment","operations","monitor"],slug:"../build-node-management"},r=void 0,a={id:"build/build-node-management",title:"Node Management",description:"Steps on how to manage your Polkadot node.",source:"@site/../docs/build/build-node-management.md",sourceDirName:"build",slug:"/build-node-management",permalink:"/docs/build-node-management",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/build/build-node-management.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1729245684e3,frontMatter:{id:"build-node-management",title:"Node Management",sidebar_label:"Node Management",description:"Steps on how to manage your Polkadot node.",keywords:["node","management","deployment","operations","monitor"],slug:"../build-node-management"},sidebar:"docs",previous:{title:"Integration Initiation",permalink:"/docs/build-integration"},next:{title:"Parachain Development",permalink:"/docs/build-pdk"}},l={},d=[{value:"Basic Node Operations",id:"basic-node-operations",level:2},{value:"File Structure",id:"file-structure",level:2},{value:"Monitoring and Telemetry",id:"monitoring-and-telemetry",level:2}];function c(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(n.p,{children:["This page contains basic information about running a Parity Polkadot client. There are a lot of ways\nto obtain/run a client, e.g. compiling from source, running in Docker, or downloading a binary. This\nguide will always refer to the executable as ",(0,o.jsx)(n.code,{children:"polkadot"}),"."]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsxs)(n.strong,{children:["Always refer to the client's help ",(0,o.jsx)(n.code,{children:"polkadot --help"})," for the most up-to-date information."]})}),"\n",(0,o.jsx)(n.admonition,{type:"note",children:(0,o.jsx)(n.p,{children:"Other client implementation teams: Feel free to make a PR to this page with instructions (or a link\nto instructions) for your client."})}),"\n",(0,o.jsxs)(n.p,{children:["If you are trying to run a validator, refer to this tutorial\n",(0,o.jsx)(n.a,{href:"/docs/maintain-guides-how-to-validate-polkadot",children:"here"}),"."]}),"\n",(0,o.jsx)(n.h2,{id:"basic-node-operations",children:"Basic Node Operations"}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.strong,{children:"Selecting a chain"})}),"\n",(0,o.jsxs)(n.p,{children:["Use the ",(0,o.jsx)(n.code,{children:"--chain "})," option to select the chain. Can be ",(0,o.jsx)(n.code,{children:"polkadot"}),", ",(0,o.jsx)(n.code,{children:"kusama"}),", ",(0,o.jsx)(n.code,{children:"westend"}),", or\na custom chain spec. By default, the client will start Polkadot. Watch\n",(0,o.jsx)(n.a,{href:"https://www.youtube.com/watch?v=i9vNCHz6wO4",children:"How a single codebase can power four different blockchains"}),"\nto learn more about how the chain selection works internally."]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.strong,{children:"Archive node"})}),"\n",(0,o.jsxs)(n.p,{children:["An archive node does not prune any block or state data. Use the ",(0,o.jsx)(n.code,{children:"--pruning archive"})," flag. Certain\ntypes of nodes like validators must run in archive mode. Likewise, all\n",(0,o.jsx)(n.a,{href:"build-protocol-info.md/#events",children:"events"})," are cleared from state in each block, so if you want to\nstore events then you will need an archive node."]}),"\n",(0,o.jsx)(n.admonition,{title:"Explainer video on upgrading a node",type:"note",children:(0,o.jsxs)(n.p,{children:["To upgrade a node, please refer to this\n",(0,o.jsx)(n.a,{href:"https://www.youtube.com/watch?v=5LtcdBR9F40&list=PLOyWqupZ-WGuAuS00rK-pebTMAOxW41W8&index=5",children:"video"})]})}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.strong,{children:"Exporting blocks"})}),"\n",(0,o.jsxs)(n.p,{children:["To export blocks to a file, use ",(0,o.jsx)(n.code,{children:"export-blocks"}),". Export in JSON (default) or binary\n(",(0,o.jsx)(n.code,{children:"--binary true"}),")."]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:"polkadot export-blocks --from 0 \n"})}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.strong,{children:"RPC ports"})}),"\n",(0,o.jsxs)(n.p,{children:["Use the ",(0,o.jsx)(n.code,{children:"--rpc-external"})," flag to expose RPC ports. Not all RPC calls are safe to allow and you\nshould use an RPC proxy to filter unsafe calls. Select ports with the ",(0,o.jsx)(n.code,{children:"--rpc-port"})," option. To limit\nthe hosts who can access, use the ",(0,o.jsx)(n.code,{children:"--rpc-cors"})," option."]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.strong,{children:"Execution"})}),"\n",(0,o.jsxs)(n.p,{children:["The Parity Polkadot client implements a ",(0,o.jsx)(n.a,{href:"/docs/learn-polkadot-host",children:"Polkadot Host"})," and a\nnative runtime. The runtime must compile to WebAssembly and is stored on-chain. If the client's\nruntime is the same spec as the runtime that is stored on-chain, then the client will execute blocks\nusing the client binary. Otherwise, the client will execute the Wasm runtime from the chain."]}),"\n",(0,o.jsx)(n.p,{children:"Therefore, when syncing the chain, the client will execute blocks from past runtimes using their\nassociated Wasm binary. This feature also allows forkless upgrades: the client can execute a new\nruntime without updating the client."}),"\n",(0,o.jsxs)(n.p,{children:["Parity's Polkadot client has two Wasm execution methods, interpreted (default) and compiled. Set the\npreferred method to use when executing Wasm with ",(0,o.jsx)(n.code,{children:"--wasm-execution "}),". Compiled\nexecution will run much faster, especially when syncing the chain, but is experimental and may use\nmore memory/CPU. A reasonable tradeoff would be to sync the chain with compiled execution and then\nrestart the node with interpreted execution."]}),"\n",(0,o.jsx)(n.h2,{id:"file-structure",children:"File Structure"}),"\n",(0,o.jsxs)(n.p,{children:["The node stores a number of files in: ",(0,o.jsx)(n.code,{children:"/home/$USER/.local/share/polkadot/chains//"}),". You\ncan set a custom path with ",(0,o.jsx)(n.code,{children:"--base-path "}),"."]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.strong,{children:(0,o.jsx)(n.code,{children:"keystore"})})}),"\n",(0,o.jsx)(n.p,{children:"The keystore stores session keys, which are important for validator operations."}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"/docs/learn-cryptography",children:"Polkadot documentation"})}),"\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"https://docs.substrate.io/main-docs/fundamentals/accounts-addresses-keys/#specialized-accounts",children:"Substrate documentation"})}),"\n"]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.strong,{children:(0,o.jsx)(n.code,{children:"db"})})}),"\n",(0,o.jsxs)(n.p,{children:["The database stores blocks and the state trie. If you are running a validator node, it also stores\nGRANDPA pre-votes and pre-commits and the offchain-worker DB. Use caution when\n",(0,o.jsx)(n.a,{href:"/docs/maintain-guides-how-to-upgrade",children:"migrating validator nodes"})," to avoid equivocation. If\nyou want to start a new machine without resyncing, you can stop your node, back up the DB, and move\nit to a new machine."]}),"\n",(0,o.jsx)(n.p,{children:"To delete your DB and re-sync from genesis, run:"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:"polkadot purge-chain\n"})}),"\n",(0,o.jsxs)(n.admonition,{title:"Validators should sync using the RocksDb backend",type:"note",children:[(0,o.jsxs)(n.p,{children:["This is implicit by default, but can be explicit by passing the ",(0,o.jsx)(n.code,{children:"--database RocksDb"})," flag. In the\nfuture, it is recommended to switch to using the faster and more efficient ParityDb option.\nSwitching between database backends will require a resync."]}),(0,o.jsxs)(n.p,{children:["If you want to test out ParityDB you can add the flag ",(0,o.jsx)(n.code,{children:"--database paritydb"}),"."]})]}),"\n",(0,o.jsx)(n.h2,{id:"monitoring-and-telemetry",children:"Monitoring and Telemetry"}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.strong,{children:"Node status"})}),"\n",(0,o.jsxs)(n.p,{children:["You can check the node's health via RPC with\n",(0,o.jsx)(n.a,{href:"https://github.com/vi/websocat#installation",children:"websocat"}),":"]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:'echo \'{"id":1,"jsonrpc":"2.0","method":"system_health","params":[]}\' | websocat -n1 -B 99999999 ws://127.0.0.1:9944\n\n{"jsonrpc":"2.0","result":{"peers":50,"isSyncing":false,"shouldHavePeers":true},"id":1}\n'})}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.strong,{children:"Logs"})}),"\n",(0,o.jsx)(n.p,{children:"The Polkadot client has a number of log targets. The most interesting to users may be:"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.code,{children:"afg"})," (Al's Finality Gadget - GRANDPA consensus)"]}),"\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.code,{children:"babe"})}),"\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.code,{children:"telemetry"})}),"\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.code,{children:"txpool"})}),"\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.code,{children:"usage"})}),"\n"]}),"\n",(0,o.jsxs)(n.p,{children:["Other targets include:\n",(0,o.jsx)(n.code,{children:"db, gossip, peerset, state-db, state-trace, sub-libp2p, trie, wasm-executor, wasm-heap"}),"."]}),"\n",(0,o.jsx)(n.p,{children:"The log levels, from least to most verbose, are:"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.code,{children:"error"})}),"\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.code,{children:"warn"})}),"\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.code,{children:"info"})}),"\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.code,{children:"debug"})}),"\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.code,{children:"trace"})}),"\n"]}),"\n",(0,o.jsxs)(n.p,{children:["All targets are set to ",(0,o.jsx)(n.code,{children:"info"})," logging by default. You can adjust individual log levels using the\n",(0,o.jsx)(n.code,{children:"--log (-l short)"})," option, for example ",(0,o.jsx)(n.code,{children:"-l afg=trace,sync=debug"})," or globally with ",(0,o.jsx)(n.code,{children:"-ldebug"}),"."]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.strong,{children:"Telemetry & Metrics"})}),"\n",(0,o.jsxs)(n.p,{children:["The Parity Polkadot client connects to telemetry by default. You can disable it with\n",(0,o.jsx)(n.code,{children:"--no-telemetry"}),", or connect only to specified telemetry servers with the ",(0,o.jsx)(n.code,{children:"--telemetry-url"})," option\n(see the help options for instructions). Connecting to public telemetry may expose information that\nputs your node at higher risk of attack. You can run your own, private\n",(0,o.jsx)(n.a,{href:"https://github.com/paritytech/substrate-telemetry",children:"telemetry server"})," or deploy a\n",(0,o.jsx)(n.code,{children:"substrate-telemetry"})," instance to a Kubernetes cluster using\n",(0,o.jsx)(n.a,{href:"https://github.com/w3f/substrate-telemetry-chart",children:"this Helm chart"}),"."]}),"\n",(0,o.jsxs)(n.p,{children:["The node also exposes a Prometheus endpoint by default (disable with ",(0,o.jsx)(n.code,{children:"--no-prometheus"}),"). Substrate\nhas a\n",(0,o.jsx)(n.a,{href:"https://docs.substrate.io/tutorials/get-started/monitor-node-metrics/",children:"monitor node metrics tutorial"}),"\nwhich uses this endpoint."]})]})}function h(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(c,{...e})}):c(e)}},28453:(e,n,t)=>{t.d(n,{R:()=>r,x:()=>a});var o=t(96540);const i={},s=o.createContext(i);function r(e){const n=o.useContext(s);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),o.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/ccc1222e.bf5f2581.js b/assets/js/ccc1222e.bf5f2581.js deleted file mode 100644 index c833ffcb1f71..000000000000 --- a/assets/js/ccc1222e.bf5f2581.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5702],{47765:(t,e,s)=>{s.r(e),s.d(e,{assets:()=>c,contentTitle:()=>a,default:()=>d,frontMatter:()=>i,metadata:()=>n,toc:()=>o});var r=s(74848),h=s(28453);const i={id:"build-open-source",title:"Open Source Stack",sidebar_label:"Open Source Stack",description:"Overview of the open source Polkadot/Kusama Tech Stack",keywords:["open","source","development","code","resources","tools","apis"],slug:"../build-open-source"},a="Open Source Polkadot Stack ",n={id:"build/build-open-source",title:"Open Source Stack",description:"Overview of the open source Polkadot/Kusama Tech Stack",source:"@site/../docs/build/build-open-source.md",sourceDirName:"build",slug:"/build-open-source",permalink:"/docs/build-open-source",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/build/build-open-source.md",tags:[],version:"current",lastUpdatedBy:"github-actions[bot]",lastUpdatedAt:1730123217e3,frontMatter:{id:"build-open-source",title:"Open Source Stack",sidebar_label:"Open Source Stack",description:"Overview of the open source Polkadot/Kusama Tech Stack",keywords:["open","source","development","code","resources","tools","apis"],slug:"../build-open-source"},sidebar:"docs",previous:{title:"Explorer, Data, & Indexing Tools",permalink:"/docs/build-data"},next:{title:"Hackathons",permalink:"/docs/build-hackathon"}},c={},o=[{value:"About",id:"about",level:2},{value:"Layers of Polkadot Stack",id:"layers-of-polkadot-stack",level:2},{value:"Wallets",id:"wallets",level:3},{value:"User Interface",id:"user-interface",level:3},{value:"Tools, APIs, and Languages",id:"tools-apis-and-languages",level:3},{value:"ink! Smart Contracts",id:"ink-smart-contracts",level:3},{value:"Chains and Pallets",id:"chains-and-pallets",level:3},{value:"Host",id:"host",level:3},{value:"Network Maintenance Tools",id:"network-maintenance-tools",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Consensus",id:"consensus",level:3},{value:"Networking",id:"networking",level:3},{value:"Primitives",id:"primitives",level:3},{value:"Contributing",id:"contributing",level:2}];function l(t){const e={a:"a",admonition:"admonition",code:"code",em:"em",h1:"h1",h2:"h2",h3:"h3",header:"header",hr:"hr",li:"li",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,h.R)(),...t.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(e.header,{children:(0,r.jsx)(e.h1,{id:"open-source-polkadot-stack-",children:"Open Source Polkadot Stack "})}),"\n",(0,r.jsx)(e.admonition,{title:"Do your research before using open-source tools",type:"caution",children:(0,r.jsxs)(e.p,{children:["The tools listed here are open-source and are linked directly to their source code. Before using these tools to build your projects, always ",(0,r.jsx)(e.a,{href:"/docs/how-to-dyor",children:"do your research"})," and be aware of ",(0,r.jsx)(e.a,{href:"/docs/learn-scams",children:"scams"}),"."]})}),"\n",(0,r.jsx)(e.p,{children:"This page aims to provide an overview of the open-source Polkadot Tech Stack."}),"\n",(0,r.jsxs)(e.p,{children:["This is a living document, and we rely on everyone to contribute and help maintain\nit. ",(0,r.jsx)(e.a,{href:"#contributing",children:(0,r.jsx)(e.strong,{children:"Please feel free to make edits and additions via pull requests"})}),". We\napologize if we missed your project!"]}),"\n",(0,r.jsx)(e.hr,{}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsx)(e.li,{children:(0,r.jsx)(e.a,{href:"#about",children:"About"})}),"\n",(0,r.jsxs)(e.li,{children:[(0,r.jsx)(e.a,{href:"#layers-of-polkadot-stack",children:"Layers of Polkadot Stack"}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsx)(e.li,{children:(0,r.jsx)(e.a,{href:"#wallets",children:"Wallets"})}),"\n",(0,r.jsx)(e.li,{children:(0,r.jsx)(e.a,{href:"#user-interface",children:"User Interface"})}),"\n",(0,r.jsx)(e.li,{children:(0,r.jsx)(e.a,{href:"#tools-apis-and-languages",children:"Tools, APIs, and Languages"})}),"\n",(0,r.jsx)(e.li,{children:(0,r.jsx)(e.a,{href:"#ink-smart-contracts",children:"ink! Smart Contracts"})}),"\n",(0,r.jsx)(e.li,{children:(0,r.jsx)(e.a,{href:"#chains-and-pallets",children:"Chains and Pallets"})}),"\n",(0,r.jsx)(e.li,{children:(0,r.jsx)(e.a,{href:"#host",children:"Host"})}),"\n",(0,r.jsx)(e.li,{children:(0,r.jsx)(e.a,{href:"#network-maintenance-tools",children:"Network Maintenance Tools"})}),"\n",(0,r.jsx)(e.li,{children:(0,r.jsx)(e.a,{href:"#signatures",children:"Signatures"})}),"\n",(0,r.jsx)(e.li,{children:(0,r.jsx)(e.a,{href:"#consensus",children:"Consensus"})}),"\n",(0,r.jsx)(e.li,{children:(0,r.jsx)(e.a,{href:"#networking",children:"Networking"})}),"\n",(0,r.jsx)(e.li,{children:(0,r.jsx)(e.a,{href:"#primitives",children:"Primitives"})}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(e.li,{children:(0,r.jsx)(e.a,{href:"#contributing",children:"Contributing"})}),"\n"]}),"\n",(0,r.jsx)(e.h2,{id:"about",children:"About"}),"\n",(0,r.jsxs)(e.p,{children:["The Polkadot Tech Stack is a subset of the Web 3.0 Tech Stack, which consists of the ",(0,r.jsx)(e.strong,{children:"open-source"}),"\ntechnologies contributing to and relying on ",(0,r.jsx)(e.a,{href:"https://polkadot.network/",children:"Polkadot"}),". It is meant to be used\nfor decentralized application (Dapp) development within numerous verticals, including DeFi, Gaming,\nProvenance and many others not pictured below."]}),"\n",(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{children:"|------|--------|------------|\n| DeFi | Gaming | Provenance |\n|______|________|____________|\n Dapps\n|--------------------------/-|\n| Explorers, Wallets / |\n|------------------------/---|\n| Tools, Apis, Languages/ |\n|----------------------/-----|\n| 2nd layer protocols / |\n|--------------------/-------|\n| Chains / other |\n|------------------/--- --|\n| *Polkadot* | tech |\n|------------------\\---------|\n| P2P, Crypto, Wasm \\ |\n|--------------------\\-------|\n"})}),"\n",(0,r.jsx)(e.h2,{id:"layers-of-polkadot-stack",children:"Layers of Polkadot Stack"}),"\n",(0,r.jsx)(e.p,{children:"In the below sections, you can find a list of different layers of the Polkadot Stack."}),"\n",(0,r.jsxs)(e.p,{children:[(0,r.jsx)(e.strong,{children:"Maintenance Status"}),":"]}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsx)(e.li,{children:"\ud83d\udfe2 Actively maintained"}),"\n",(0,r.jsx)(e.li,{children:"\ud83d\udfe1 Stale (no activity on the main branch for one month)"}),"\n",(0,r.jsx)(e.li,{children:"\u26aa Unmaintained (no activity on the main branch for more than three months)"}),"\n"]}),"\n",(0,r.jsx)(e.h3,{id:"wallets",children:"Wallets"}),"\n",(0,r.jsxs)(e.table,{children:[(0,r.jsx)(e.thead,{children:(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.th,{children:"Components"}),(0,r.jsx)(e.th,{children:"Existing projects"}),(0,r.jsx)(e.th,{children:"Potentially interesting projects"})]})}),(0,r.jsxs)(e.tbody,{children:[(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Web Wallets"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/ChainSafe/Multix",children:"Multix"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/polkasafe/polkasafe-ui",children:"Polkasafe"})," \ud83d\udfe1, ",(0,r.jsx)(e.a,{href:"https://github.com/polkadot-js/apps",children:"polkadot-js/apps"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/TalismanSociety/talisman-web",children:"Talisman Web Application"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/enkryptcom/mydotwallet",children:"mydotwallet"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/dappforce/subid",children:"Sub ID"})," \ud83d\udfe1, ",(0,r.jsx)(e.a,{href:"https://github.com/Primis-Labs/client",children:"Primis"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/w3finance/sakura",children:"Sakura"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/w3f-grants-archive/Web3Box-apps",children:"Web3Box"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/CoongCrafts/coong-wallet",children:"Coong Wallet"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/itering/subscan-multisig-react",children:"Subscan Multisig UI - React"})," \ud83d\udfe1, ",(0,r.jsx)(e.a,{href:"https://github.com/itering/subscan-multisig-ui",children:"Subscan Multisig UI"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/DoraFactory/dorafactory-multisig",children:"Dorafactory-Multisig"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/paritytech/capi-multisig-app",children:"Capi Multisig App"})," \u26aa"]}),(0,r.jsxs)(e.td,{children:["User-friendly Wallet based on the ",(0,r.jsx)(e.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/substrate/frame/recovery",children:"Recovery Pallet"}),", Web wallets focused on user-onboarding (e.g. using ",(0,r.jsx)(e.a,{href:"https://github.com/near/near-wallet",children:"localStorage"}),")"]})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Desktop Wallets"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/novasamatech/nova-spektr",children:"nova-spektr"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/w3f-grants-archive/omni-desktop-prototype",children:"Omni desktop"})," \u26aa"]}),(0,r.jsx)(e.td,{children:"Enterprise Wallets"})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Browser Extensions"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/TalismanSociety/talisman",children:"Talisman-Extension"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/Koniverse/SubWallet-Extension",children:"SubWallet-Extension"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/enkryptcom/enKrypt",children:"Enkrypt"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/polkadot-js/extension",children:"Polkadot-JS"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/PolkaGate/polkagate-extension",children:"PolkaGate"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/trustwallet",children:"Trust Wallet Extension"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/ChainBridgeNetworkTeam/Doter",children:"Doter"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/GetSpeckle/speckle-browser-extension",children:"Speckle OS"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/blockcoders/kuma-wallet",children:"Kuma Cross-chain Wallet"})," \ud83d\udfe2"]}),(0,r.jsx)(e.td,{children:"Sign-in with your Polkadot, Kusama, etc. account."})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Mobile Wallets"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/novasamatech/nova-wallet-ios",children:"Nova Wallet iOS"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/novasamatech/nova-wallet-android",children:"Nova Wallet Android"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/paritytech/parity-signer",children:"Polkadot Vault"})," \ud83d\udfe1, ",(0,r.jsx)(e.a,{href:"https://github.com/soramitsu/fearless-Android",children:"Fearless Wallet Android"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/soramitsu/fearless-iOS",children:"Fearless Wallet iOS"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/trustwallet",children:"Trust Wallet"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/Koniverse/SubWallet-Mobile",children:"SubWallet-Mobile"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/Kalapaja/kampela-firmware",children:"Kampela"})," \ud83d\udfe1, ",(0,r.jsx)(e.a,{href:"https://github.com/airgap-it/airgap-wallet",children:"AirGap"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/Interstellar-Network/wallet-app",children:"Interstellar Network"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/luniehq/lunie",children:"Lunie"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/polkawallet-io/polkawallet-flutter",children:"Polkawallet"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/consenlabs/token-core",children:"imToken"})," \ud83d\udfe1, ",(0,r.jsx)(e.a,{href:"https://github.com/stylo-app/stylo",children:"Stylo"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/fractapp/fractapp/",children:"Fractapp"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/hypha-dao/hashed-wallet",children:"Hashed Wallet"})," \u26aa"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Burner Wallets/Faucet/Gifts"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/hamidra/dotdrop",children:"dotdrop"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/vue-polkadot/apps",children:"KodaDot"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/AstarNetwork/astar-faucet-bot",children:"Astar Faucet Bot"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/karooolis/sybil-resistant-substrate-faucet",children:"Generic sybil-resistant faucet"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/StringNick/sybil-resistant-chat-bot-substrate-faucet",children:"sybil-resistant Chat Bot Faucet"})," ","\u2754"]}),(0,r.jsx)(e.td,{children:"Faucet (a sybil-resistant way to receive free tokens)"})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Wallet Plugins"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/ChainSafe/metamask-snap-polkadot",children:"Metamask-Snap by Chainsafe"})," \ud83d\udfe1"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"CLI Wallet"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/yxf/subwallet",children:"Subwallet"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/canontech/proxy-hot-wallet",children:"Proxy-hot-wallet"})," \u26aa"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Hardware Wallets"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/ZondaX/ledger-polkadot",children:"Ledger Polkadot"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/Zondax/ledger-kusama",children:"Ledger Kusama"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/Zondax/ledger-statemint",children:"Ledger Statemint"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/Zondax/ledger-statemine",children:"Ledger Statemine"})," \ud83d\udfe2"]}),(0,r.jsx)(e.td,{children:"Trezor"})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"OAuth2-compatible Wallets"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/singkeo/dot-login",children:"DOT Login"})," \u26aa"]}),(0,r.jsx)(e.td,{})]})]})]}),"\n",(0,r.jsx)(e.h3,{id:"user-interface",children:"User Interface"}),"\n",(0,r.jsxs)(e.table,{children:[(0,r.jsx)(e.thead,{children:(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.th,{children:"Components"}),(0,r.jsx)(e.th,{children:"Existing projects"}),(0,r.jsx)(e.th,{children:"Potentially interesting projects"})]})}),(0,r.jsxs)(e.tbody,{children:[(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Block Explorers"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/topmonks/calamar",children:"Calamar"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/polkascan/explorer-api",children:"Polkascan"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/Colm3na/polkastats-backend",children:"Polkastats"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/itering/subscan",children:"Subscan"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/opensquare-network/statescan-v2",children:"Statescan"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/edgeware-builders/edgscan",children:"Edgscan"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/web3labs/epirus-substrate",children:"Sirato"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/blockcoders/ink-substrate-explorer-api",children:"ink! Explorer API"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/CESSProject/substats",children:"Substats"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/hybrid-explorer/hybrid-dapp",children:"Hybrid Block Explorer"})," \u26aa"]}),(0,r.jsx)(e.td,{children:"Mempool focused explorer (including parachain transaction)"})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Validator Dashboards"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/paritytech/substrate-telemetry",children:"Polkadot Telemetry"})," \ud83d\udfe1, ",(0,r.jsx)(e.a,{href:"https://github.com/hashquark-io/polkacube-frontend",children:"Polkacube"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/buidl-labs/YieldScan",children:"YieldScan"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/w3f-community/hubble/tree/master/app/controllers/polkadot",children:"Hubble"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/ArthurHoeke/cyclops",children:"Cyclops"})," \ud83d\udfe1, ",(0,r.jsx)(e.a,{href:"https://github.com/web3go-xyz/web3go-xyz-v2",children:"Web3Go"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/MathCryptoDoc/insights-1kv",children:"1kv insights"})," \u26aa"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Node Explorers"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/protos-research/polkadot-node-explorer",children:"Polkadot Node Explorer"})," \u26aa"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"NFT Explorer"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/kodadot/nft-gallery",children:"NFT Explorer for Kusama & Polkadot"})," \ud83d\udfe2"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Governance Dashboards"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/paritytech/governance-ui",children:"Polkadot Delegation Dashboard"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/premiurly/polkassembly",children:"Polkassembly"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/opensquare-network/dotreasury",children:"dotreasury"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/bright/bright-tresury",children:"Bright Treasury"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/opensquare-network/collaboration",children:"OpenSquare offchain voting"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/wpank/open-gov-insights",children:"OpenGov Insights"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/stake-plus/treasury-tracker",children:"Treasury Tracker"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/joepetrowski/opengov-cli",children:"OpenGov CLI"})," \ud83d\udfe1"]}),(0,r.jsxs)(e.td,{children:["UI for the Kusama and/or Polkadot treasury (see ",(0,r.jsx)(e.a,{href:"https://github.com/paritytech/substrate/pull/5715",children:"bounty module"}),"), UI for Parachain Lease Offering (PLO)"]})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Staking"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/w3f/staking-rewards-collector",children:"Staking Rewards Collector"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/jackson-harris-iii/staking-rewards-viewer",children:"Staking Rewards Viewer"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/cryptolab-network/polkadot-staking-site",children:"Polkadot Staking Site"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/paritytech/polkadot-staking-dashboard",children:"Polkadot Staking Dashboard"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/James-Sangalli/dot-validator-selector",children:"Polkadot/Kusama Validator Selector"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/James-Sangalli/dot-staking-income",children:"Staking Income CSV Generator"})," \u26aa"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Bridge UI"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/paritytech/parity-bridges-ui",children:"Parity Bridges UI"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/nutbox-dao/donut-interface",children:"Donut Interface (Steem - Dot)"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/RostislavLitovkin/PlutonicationServer",children:"Plutonication"})," \ud83d\udfe1"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Parachain/Crowdloan"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/jhonalino/parachains.network",children:"Parachains.Network"})," ","\u2754",", ",(0,r.jsx)(e.a,{href:"https://github.com/CrommVardek/polk-auction-ui",children:"PolkAuction"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/10clouds/crowdloan-template",children:"Crowdloan Front End Template"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/hack-ink/slothunter/",children:"Slothunter"})," \u26aa"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Identicon"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://polkadot.cloud/polkicon",children:"Polkicon"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/RidOne-technologies/polkadot-web-identicon",children:"PolkadotWebIdenticon"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/RidOne-technologies/polkadot-angular-identicon",children:"Polkadot Angular IdentIcon"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/Noc2/Bird-Identicon",children:"Bird Identicon"})," \u26aa"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Coretime"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/LasticXYZ/LasticUI",children:"Lastic"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/RegionX-Labs/RegionX-Node",children:"RegionX"})," \ud83d\udfe2"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Other"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://polkadot.cloud",children:"Polkadot Cloud"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/tien/dot-console",children:"\u0110\xd3TConsole"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/KappaSigmaMu/ksm-app",children:"KappaSigmaMu Fratority"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/OAK-Foundation/quadratic-funding-webapp",children:"Quadratic Funding Webapp"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://gitlab.com/polkawatch/polkawatch",children:"Polkawatch"}),", ",(0,r.jsx)(e.a,{href:"https://github.com/bytepayment/bytepay",children:"Bytepay"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/Delmonicos/charging-management-platform",children:"charging-management-platform"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/TDSoftware/subidentity-webapp",children:"subidentity-webapp"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/opensquare-network/paid-qa/",children:"OpenSquare Paid QA"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/CrossChainLabs-DOT/dotpulse-api",children:"DotPulse"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/bsn-si/rubeus-smartcontract",children:"Rubeus Keeper"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/justmert/eco-flow-frontend",children:"Polkaflow"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/helikon-labs/chainviz",children:"ChainViz"})," \ud83d\udfe1, ",(0,r.jsx)(e.a,{href:"https://github.com/fidi-tech/dotsight",children:"Dotsight"})," \u26aa"]}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://docs.sui.io/build/zk_login",children:"zkLogin"}),", Portfolio Viewer like Zapper or Zerion"]})]})]})]}),"\n",(0,r.jsx)(e.h3,{id:"tools-apis-and-languages",children:"Tools, APIs, and Languages"}),"\n",(0,r.jsxs)(e.table,{children:[(0,r.jsx)(e.thead,{children:(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.th,{children:"Components"}),(0,r.jsx)(e.th,{children:"Existing projects"}),(0,r.jsx)(e.th,{children:"Potentially interesting projects"})]})}),(0,r.jsxs)(e.tbody,{children:[(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Runtime/Parachain frameworks"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/paritytech/polkadot-sdk",children:"Polkadot Blockchain SDK"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/LimeChain/gosemble",children:"Gosemble"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/LimeChain/subsembly",children:"Subsembly"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/AcalaNetwork/parachain-utilities",children:"Parachain utilities"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/gantree-io/gantree-core",children:"Gantree"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/ideal-lab5",children:"Cryptex"})," \ud83d\udfe2"]}),(0,r.jsxs)(e.td,{children:["Tools to create parachains with other frameworks, like the ",(0,r.jsx)(e.a,{href:"https://github.com/cosmos/cosmos-sdk",children:"Cosmos SDK"})," or ",(0,r.jsx)(e.a,{href:"https://github.com/0xPolygon/cdk-validium-node",children:"Polygon CDK"})]})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Client Libraries"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/polkadot-api/polkadot-api",children:"Polkadot-API - Typescript"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/tien/reactive-dot",children:"Reactive DOT - Typescript"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/paritytech/capi",children:"Capi - Typescript"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/kodadot/packages/tree/main/sub-api",children:"sub-api"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/centrifuge/go-substrate-rpc-client",children:"Go"})," \ud83d\udfe1, ",(0,r.jsx)(e.a,{href:"https://github.com/usetech-llc/polkadot_api_dotnet",children:".Net"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/SubstrateGaming/Substrate.NET.API",children:".NET Standard 2.0"})," \ud83d\udfe1, ",(0,r.jsx)(e.a,{href:"https://github.com/SubstrateGaming/Substrate.NET.Toolchain",children:"Substrate .NET Toolchain"})," \ud83d\udfe1, ",(0,r.jsx)(e.a,{href:"https://github.com/usetech-llc/polkadot_api_cpp",children:"C++"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/finoabanking/substrate-c-tool",children:"C"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/airalab/hs-web3",children:"Haskell"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/polkadot-js/api",children:"Javascript"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/paritytech/substrate-api-sidecar",children:"Substrate API Sidecar - TypeScript"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/polkascan/py-substrate-interface",children:"Python"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/emeraldpay/polkaj",children:"Java (+ Android)"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/strategyobject/substrate-client-java",children:"Substrate Client Java"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/scs/substrate-api-client",children:"Rust SCS"})," \ud83d\udfe1, ",(0,r.jsx)(e.a,{href:"https://github.com/paritytech/subxt",children:"Rust Parity (subxt)"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/philoniare/subxtpy",children:"subxtpy"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/trevor-crypto",children:"Rust pdotc"})," ",(0,r.jsx)(e.a,{href:"https://github.com/gmajor-encrypt/php-substrate-api",children:"PHP (gmajor-encrypt)"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/neha0921/substrate-interface-package",children:"PHP (neha0921)"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/paritytech/frontier",children:"RPC-Ethereum"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/tesseract-one/Substrate.swift",children:"Swift"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/NodleCode/substrate-client-kotlin",children:"Kotlin"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/sublabdev/substrate-client-kotlin",children:"substrate-client-kotlin"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/sublabdev/substrate-client-swift",children:"substrate-client-swift"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/rankanizer/polkadart",children:"Dart"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/polywrap/integrations",children:"Substrate Core Polywrapper"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/novasamatech/substrate-sdk-ios",children:"Substrate SDK iOS"})," \ud83d\udfe1, ",(0,r.jsx)(e.a,{href:"https://github.com/novasamatech/substrate-sdk-android",children:"Substrate SDK Android"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/dedotdev/dedot",children:"Dedot - Typescript"})," \ud83d\udfe2"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"RPC Gateway"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/AcalaNetwork/subway",children:"Subway"})," \u26aa"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Substrate Contract clients"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/patractlabs/go-patract",children:"PatractGo"})," \u26aa"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Easy Runtime Development"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/hack-ink/subalfred",children:"Subalfred"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/kaichaosun/substrate-stencil",children:"substrate-stencil"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/kaichaosun/play-substrate",children:"Play Substrate"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/substrate-developer-hub/substrate-node-template",children:"substrate-node-template"})," ","\u2754",", ",(0,r.jsx)(e.a,{href:"https://github.com/paritytech/substrate-playground",children:"Substrate Playground"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/LimeChain/as-substrate-runtime",children:"AssemblyScript Runtime Generation"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/clearloop/sup",children:"Substrate Package Manager"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/LimeChain/subsembly",children:"Subsembly: Framework for developing AssemblyScript Substrate Runtimes"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/bkchr/diener",children:"dependency diener"})," \u26aa"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"IDE Plugins"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/paritytech/vscode-substrate",children:"Substrate Marketplace VS Code Plugin"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/everstake/vscode-plugin-substrate",children:"VS Code Plugin"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/everstake/atom-plugin-substrate",children:"Atom Code Plugin"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/paritytech/zombienet-vscode-extension",children:"zombienet extension"})," \u26aa"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Runtime/Pallet Security"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/srlabs/substrate-runtime-fuzzer",children:"Substrate Runtime Fuzzer"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/shawntabrizi/substrate-toml-lint",children:"Substrate Toml Lint"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/kframework/wasm-semantics",children:"K specifications"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/ChainSecurity/polpatrol",children:"PolPatrol - Polkadot Runtime Checker"})," \u26aa"]}),(0,r.jsxs)(e.td,{children:["Automated Runtime checking tools, economic audit simulator such as ",(0,r.jsx)(e.a,{href:"https://gauntlet.network/",children:"gauntlet.network"})]})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Smart Contract Languages"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"#ink-smart-contracts",children:"ink!"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/ask-lang/ask",children:"Ask!"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/slickup/subscript",children:"Subscript"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/hyperledger-labs/solang",children:"Solang"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/eigerco/pallet-move",children:"pallet-move"})," \ud83d\udfe1, ",(0,r.jsx)(e.a,{href:"https://github.com/pontem-network/sp-move",children:"Move VM Substrate"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/neatcoin/neatcoin",children:"Move smart contract by Neatcoin"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/pepyakin/substrate-seal-ebpf",children:"eBPF Contracts Hackathon"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/koute/polkavm",children:"PolkaVM"})," \ud83d\udfe2"]}),(0,r.jsx)(e.td,{children:"Functional Programming Languages, other languages with developed toolchains"})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Testing"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/paritytech/polkadot-introspector",children:"Polkadot introspector"})," \ud83d\udfe1, ",(0,r.jsx)(e.a,{href:"https://github.com/subdirectory/subshell",children:"Subshell"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/polytope-labs/sc-simnode",children:"substrate-simnode"})," \ud83d\udfe1, ",(0,r.jsx)(e.a,{href:"https://github.com/halva-suite/halva",children:"Halva"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/patractlabs/redspot",children:"Redspot"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/mixbytes/tank",children:"MixBytes Tank"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/NikVolf/sub-flood",children:"sub-flood"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/paritytech/substrate-debug-kit",children:"Substrate debug-kit"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/JesseAbram/asset_cli_tool",children:"Asset CLI tool"})," \ud83d\udfe1, ",(0,r.jsx)(e.a,{href:"https://github.com/JesseAbram/unfinished_testing_tool",children:"sub_crash"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/chevdor/subwasm",children:"subwasm"})," \ud83d\udfe1, ",(0,r.jsx)(e.a,{href:"https://github.com/ascjones/subsee",children:"subsee"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/w3f/polkadot-lab",children:"polkadot-lab"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/dwellir-public/rpc-perf/",children:"RPC-perf"})," \u26aa"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Static Analysis"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/KaiserKarel/substrace",children:"Substrace"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/simon-perriard/saft",children:"Static analyzer for Substrate FRAME's pallets"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/CoinFabrik/scout",children:"CoinFabrik Scout"})," \u26aa"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Testnet"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/paritytech/zombienet",children:"Zombienet"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/AcalaNetwork/chopsticks",children:"Chopsticks"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/paritytech/polkadot-launch",children:"Polkadot Launch"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/koute/polkadot-starship",children:"polkadot-starship"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/maxsam4/fork-off-substrate",children:"Fork off Substrate"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/paritytech/try-runtime-cli",children:"try-runtime-cli"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/open-web3-stack/parachain-launch",children:"Parachain Launch"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/Zeeve-App/larch",children:"Larch Zombienet GUI"})," \u26aa"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Benchmarking"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/substrate/utils/frame/benchmarking-cli",children:"Benchmarking CLI"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/paritytech/polkadot-stps",children:"Polkadot sTPS"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/0xekez/clockchain",children:"Clockchain"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/shawntabrizi/substrate-graph-benchmarks",children:"Substrate Graph Benchmarks"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/Nikhil-Desai-Talentica/substrate-node-template-benchmarking",children:"ink! & pallet benchmarking template"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/paritytech/smart-bench",children:"smart-bench"})," \u26aa"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Blockchain Indexing Engine"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/subsquid/squid-sdk",children:"Squid SDK"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/hybrid-explorer/hybrid-indexer",children:"Hybrid Indexer"})," \ud83d\udfe1, ",(0,r.jsx)(e.a,{href:"https://github.com/paritytech/substrate-archive",children:"Substrate Archive"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/usetech-llc/polkadot_psql_indexer",children:"PSQL Indexer"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/playzero/substrate-graph",children:"Substrate Graph"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/OnFinality-io/subql",children:"Subquery"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/p2p-org/polkadot-profit-transformer",children:"MBELT3"})," \ud83d\udfe1, ",(0,r.jsx)(e.a,{href:"https://github.com/kodadot/stick",children:"stick"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/Infra3-Network/hyperdot",children:"Hyperdot"})," \u26aa"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Blockchain/Event Monitoring"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/open-web3-stack/guardian",children:"Web3 Guardian"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/HugoByte/aurras-event-manager",children:"Aurras Event Manager"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/hicommonwealth/chain-events",children:"@commonwealth/chain-events"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/w3f-grants-archive/massbitchain",children:"Massbit"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/kianenigma/polkadot-basic-notification",children:"Polkadot Basic Notifications"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/sodazone/ocelloids",children:"Ocelloids"})," \ud83d\udfe1, ",(0,r.jsx)(e.a,{href:"https://github.com/TrackingChains/TrackingChain",children:"Tracking Chain"})," \u26aa,"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Gaming"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/PolkadotPlay/Polkadot.Unity.SDK",children:"Polkadot SDK for Unity"})," \ud83d\udfe1, ",(0,r.jsx)(e.a,{href:"https://github.com/dodorare/crossbow",children:"Crossbow"})," \u26aa"]}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://assetstore.unity.com/packages/decentralization/infrastructure/polkadot-sdk-for-unity-273535",children:"Unity Asset Store"}),", ",(0,r.jsx)(e.a,{href:"https://amethyst.rs/",children:"Amethyst"})," + ",(0,r.jsx)(e.a,{href:"https://substrate.dev/",children:"Substrate"})]})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"No-code Platforms"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/NovaBloq/Bubble-Plugin-Polkadot.js",children:"EzCode's Polkadot.js plugin on Bubble.io"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/Blackprint/nodes-polkadot.js",children:"Blackprint Visual Programming Polkadot.js module"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/subrelay/interface",children:"SubRelay"})," \u26aa"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Wallets"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/tien/dot-connect",children:"DOT Connect"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/TalismanSociety/talisman-connect",children:"Talisman Connect"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/Koniverse/SubConnect",children:"SubWallet-SubConnect"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/nova-wallet/metadata-portal",children:"Metadata Portal"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/tesseract-one/Tesseract.rs",children:"Tesseract"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/w3f-grants-archive/walletconnect-v2-monorepo",children:"WalletConnect"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/BitGo/BitGoJS/tree/master",children:"BitGoJS"})," \ud83d\udfe2"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"XCM"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/paritytech/trappist",children:"Trappist"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/Moonsong-Labs/xcm-tools",children:"XCM-tools"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/itering/substrate-api-rpc",children:"XCM-tools Golang"})," \ud83d\udfe1,",(0,r.jsx)(e.a,{href:"https://github.com/paraspell/ui-v2",children:"ParaSpell"})," ","\u2754",", ",(0,r.jsx)(e.a,{href:"https://github.com/t3rn/xbi",children:"XBI"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/blockcoders/xcm-sdk",children:"XCM TS/JS SDK"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/XcmSend/app",children:"XCMSend"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/sodazone/xcm-monitoring/",children:"XCM Monitoring Server"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/moonbeam-foundation/xcm-sdk",children:"Moonbeam Foundation XCM-SDK"})," \ud83d\udfe2"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Other"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/paritytech/asset-transfer-api",children:"asset-transfer-api"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/paritytech/txwrapper-core",children:"txwrapper-core"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/open-web3-stack/open-web3.js",children:"open-web3 JS library"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/CycanTech/GVM-Bridge",children:"VM-Bridge"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/paritytech/srtool",children:"srtool"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/chevdor/srtool-cli",children:"srtool-cli"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/paritytech/substrate-tip-bot",children:"Substrate Tip Bot"})," \ud83d\udfe1, ",(0,r.jsx)(e.a,{href:"https://github.com/syntifi/ori",children:"ORI (Onchain Risk Intelligence)"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/albertov19/PolkaTools",children:"PolkaTools"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/paritytech/polkadot-scripts",children:"polkadot-scripts"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/virto-network/sube",children:"Sube"})," \ud83d\udfe1, ",(0,r.jsx)(e.a,{href:"https://github.com/CESSProject/data-store-sidecar",children:"data-store-sidecar"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/SugarFunge/sugarfunge-node",children:"SugarFunge"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/second-state/substrate-wasmedge",children:"substrate-wasmedge"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/eightfish-org/eightfish",children:"EightFish"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/sandoxio/sandox",children:"Sandox"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/darwinia-network/apk-verifier/",children:"APK verifier"})," \u26aa"]}),(0,r.jsx)(e.td,{})]})]})]}),"\n",(0,r.jsx)(e.h3,{id:"ink-smart-contracts",children:"ink! Smart Contracts"}),"\n",(0,r.jsxs)(e.table,{children:[(0,r.jsx)(e.thead,{children:(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.th,{children:"Components"}),(0,r.jsx)(e.th,{children:"Existing projects"}),(0,r.jsx)(e.th,{children:"Potentially interesting projects"})]})}),(0,r.jsxs)(e.tbody,{children:[(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Core Libraries"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/paritytech/ink",children:"ink!"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/paritytech/cargo-contract",children:"cargo-contract"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/substrate/frame/contracts",children:"pallet-contracts"})," \ud83d\udfe2"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Local Nodes"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/paritytech/substrate-contracts-node",children:"substrate-contracts-node"})," \ud83d\udfe1, ",(0,r.jsx)(e.a,{href:"https://github.com/swankyhub/swanky-cli",children:"Swanky"})," \u26aa"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Smart Contract Development"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/Cardinal-Cryptography/drink",children:"DRink!"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/paritytech/contracts-ui",children:"contracts-ui"})," \ud83d\udfe1, ",(0,r.jsx)(e.a,{href:"https://github.com/Smart-Beaver",children:"SmartBeaver"}),", ",(0,r.jsx)(e.a,{href:"https://github.com/h4nsu/openbrush-contracts",children:"OpenBrush"})," ","\u2754",", ",(0,r.jsx)(e.a,{href:"https://github.com/727-Ventures/sol2ink",children:"Sol2Ink"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/protofire/polkadot-contract-wizard",children:"Polkadot Contract Wizard"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/Cardinal-Cryptography/ink-wrapper",children:"ink-wrapper"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/paritytech/ink-playground",children:"ink-playground"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/blockchain-it-hr/ink-remix-plugin",children:"ink! Remix Plugin"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/standardweb3/signac/",children:"Signac"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/avirajkhare00/ink-boxes/",children:"ink!-boxes"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/avirajkhare00/ink-wizard",children:"ink!-smart-contract-wizard"})," \u26aa"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Security & Testing"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/paritytech/ink-waterfall",children:"ink! Waterfall"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/web3labs/ink-verifier-image",children:"Verifier Image for ink!"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/Brushfam/patron-backend/",children:"Patron"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/inkscopexyz/inkscope-fuzzer",children:"Inkscope Fuzzer"})," \ud83d\udfe2"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Frontend Development"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/scio-labs/inkathon",children:"ink!athon Boilerplate"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/paritytech/useink",children:"useink"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/scio-labs/use-inkathon",children:"useInkathon"})," \ud83d\udfe1, ",(0,r.jsx)(e.a,{href:"https://github.com/subsquid/squid-sdk/tree/master/substrate/ink-typegen",children:"ink-typegen"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/Brushfam/typechain-polkadot",children:"Typechain Polkadot"})," \u26aa"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"IDE Plugins"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/ink-analyzer/ink-analyzer",children:"ink! Analyzer"})," \u26aa"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Bridges"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/dantenetwork/protocol-stack-for-ink",children:"Dante Protocol"})," \u26aa"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"DeFi"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/pendulum-chain/pendulum-ink-wrapper",children:"Pendulum-Ink-Wrapper"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/RottenKiwi/Panorama-Swap-INK-SC",children:"Panorama Swap"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/Juminstock/ink_bank",children:"ink_bank"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/realnimish/polkadot-amm",children:"Polkadot AMM"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/veradefi/defi",children:"Vera"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/nsure-tech/dot-contract",children:"Nsure Insurance"})," ","\u2754",", ",(0,r.jsx)(e.a,{href:"https://github.com/CycanTech/ELC",children:"Everlasting Cash"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/Coinversation/coinpro",children:"Coinversation"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/zenlinkpro/zenlink-dex-contract",children:"zenlink-dex-contract"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/ReserveLabs/AlgoCash",children:"AlgoCash"})," \ud83d\udfe2"]}),(0,r.jsx)(e.td,{children:"New seigniorage-style stable coins"})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Gaming"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/OpenEmojiBattler/open-emoji-battler",children:"Open Emoji Battler"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/WiktorStarczewski/newomega.polkadot/blob/master/newomega_delegator/newomega/newomega.rs",children:"NewOmega"})," \u26aa"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"DAO"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/SyncraDAO/modular-dao",children:"SyncraDAO"})," ","\u2754",", ",(0,r.jsx)(e.a,{href:"https://github.com/w3f-grants-archive/subDAO-contracts",children:"subDAO"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/RainbowcityFoundation/RainbowDAO-Protocol-Ink-milestone_1",children:"RainbowDAO"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/Mangoboxlabs/Mangoboxink",children:"MangoBox"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/Mangoboxlabs/MangoSaleV2",children:"MangoSale"})," \u26aa"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Identity/DID"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/TheDotflow",children:"Dotflow"})," \ud83d\udfe2"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Oracles"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/diadata-org/dia-wasm-oracle",children:"DIA WASM Oracle"})," \u26aa"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Spam Protection"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/prosopo/captcha",children:"Prosopo"})," \ud83d\udfe2"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Governance"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/AbaxFinance/Governance",children:"Abax Governance"})," \u26aa"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"NFT"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/ArtZero-io/Contracts",children:"ArtZero"})," \u26aa"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Other"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/pnsproject/ink-aa",children:"Polkadot Smart Account"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/swankyhub/magink-dapp",children:"magink"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/AstarNetwork/ink-test-contracts",children:"ink-test-contracts"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/agryaznov/candle-auction-ink",children:"Candle Auctions"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/SubDAO-Network/polkasign-contract",children:"polkasign-contract"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/bsn-si/ocex-cli",children:"OCEX"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/RoloiMoney/roloi-polkadot-w3f-grant",children:"Roloi"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/polkadrys/openPayroll",children:"OpenPayroll"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/InkSmartContract/BlockchainFoodOrder",children:"BlockchainFoodOrder"})," \u26aa"]}),(0,r.jsx)(e.td,{})]})]})]}),"\n",(0,r.jsx)(e.h3,{id:"chains-and-pallets",children:"Chains and Pallets"}),"\n",(0,r.jsxs)(e.table,{children:[(0,r.jsx)(e.thead,{children:(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.th,{children:"Components"}),(0,r.jsx)(e.th,{children:"Existing projects"}),(0,r.jsx)(e.th,{children:"Potentially interesting projects"})]})}),(0,r.jsxs)(e.tbody,{children:[(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Scalable Transactions"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/perun-network/perun-polkadot-pallet",children:"Perun channels"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/perun-network/perun-polkadot-demo",children:"CLI demo of Perun"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/AstarNetwork/Astar",children:"Astar"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/celer-network/cChannel-substrate",children:"Celer"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/GunClear/Gunero",children:"Gunclear"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/BCS-Labs/tpscore-etl-system",children:"TPScore"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/auguth/pocs",children:"proof-of-contract-stake"})," \u26aa"]}),(0,r.jsx)(e.td,{children:"roll-ups, DAG-based consensus mechanisms, side chains"})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Bridges"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/interlay/interbtc",children:"interBTC"})," \ud83d\udfe1, ",(0,r.jsx)(e.a,{href:"https://github.com/webb-tools/dkg-substrate",children:"DKG Substrate"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/sygmaprotocol/sygma-substrate-pallets",children:"Sygma"})," \ud83d\udfe1, ",(0,r.jsx)(e.a,{href:"https://github.com/bifrost-finance/bifrost-eos-relay",children:"EOS by Bifrost"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/paritytech/parity-bridge",children:"POA - Substrate"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/akropolisio/POC-polkadai-bridge",children:"Substrate - Ethereum DAI Bridge"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/paritytech/substrate-bridge-relay",children:"Substrate - Substrate Bridge"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/chainx-org/ChainX",children:"BTC by ChainX"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/ChorusOne/wormhole-bridge",children:"Cosmos-Substrate bridge"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/octopus-network/substrate-ibc",children:"Substrate IBC Pallet"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/Snowfork/polkadot-ethereum",children:"Polkadot Ethereum Bridge"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/darwinia-network/darwinia",children:"Darwinia"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/pendulum-chain/spacewalk",children:"Spacewalk: a Stellar bridge"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/ChainSafe/filecoindot",children:"Filecoindot"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/centrifuge/axelar-cgp-substrate/tree/main",children:"Axelar-Substrate"})," \u26aa"]}),(0,r.jsx)(e.td,{children:"ZCash"})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Privacy"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/LayerXcom/zero-chain",children:"ZeroChain"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/xx-labs/xxchain",children:"xx network"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/Phala-Network/phala-blockchain",children:"pLibra (Phala Network)"})," \ud83d\udfe1, ",(0,r.jsx)(e.a,{href:"https://github.com/automata-network/automata",children:"Automata Network"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/zero-network/zero",children:"Zero Network"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/appliedblockchain/silentdata-polkadot",children:"Silent Data"})," \u26aa"]}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/anoma/masp",children:"Multi-Asset Shielded Pool (MASP)"})," , ",(0,r.jsx)(e.a,{href:"https://arxiv.org/pdf/2009.01020.pdf",children:"Zkay"}),", ",(0,r.jsx)(e.a,{href:"https://eprint.iacr.org/2018/962.pdf",children:"Zexe"})]})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"ZKP"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/zeropoolnetwork/zeropool-substrate-groth16-example",children:"ZeroPool"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/patractlabs/megaclite",children:"Megaclite"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/patractlabs/zkmega",children:"zkMega"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/AstarNetwork/plonk",children:"PLONK for Substrate"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/webb-tools/protocol-substrate",children:"Webb Anchor Protocol"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/bright/zk-snarks-with-substrate/",children:"zk-SNARKs tutorial"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/Zkvers/substrate-zk",children:"substrate-zk"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/w3f-grants-archive/hyperfridge-r0",children:"hyperfridge-r0"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/Cyborg-Network/cyborg-parachain/tree/master",children:"Cyborg Network"})," \ud83d\udfe2"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"TEE"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/Acurast/acurast-core",children:"Acurast"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/integritee-network/worker",children:"Integritee"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/scs/substraTEE",children:"substraTEE"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/wetee-dao/chain",children:"WeTEE"})," \u26aa"]}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/keysafe-protocol/keysafe-app",children:"Keysafe Protocol"})," \u26aa"]})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"DeFi"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/kapilsinha/privadex",children:"PrivaDEX"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/uinb/fusotao",children:"Fusotao"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/reef-defi/reef-chain",children:"Reef"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/Diora-Network/Diora",children:"Diora"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/pendulum-chain/pendulum",children:"Pendulum Chain"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/compound-finance/gateway",children:"Compound Gateway"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/parallel-finance/parallel",children:"Parallel Finance"})," \ud83d\udfe1, ",(0,r.jsx)(e.a,{href:"https://github.com/ChainSafe/PINT",children:"PINT"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/laminar-protocol/laminar-chain",children:"Laminar Chain"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/AcalaNetwork/Acala",children:"Acala"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/centrifuge/centrifuge-chain",children:"Centrifuge"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/stafiprotocol/stafi-node",children:"Stafi"})," \ud83d\udfe1, ",(0,r.jsx)(e.a,{href:"https://github.com/y2labs-0sh/definex",children:"Definex"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/OAXFoundation/parrot",children:"OAX Foundation"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/alexxuyang/substrate-dex",children:"Cybex"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/zenlinkpro/pallet-zenlink",children:"Zenlink"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/lsaether/pallet-swaps",children:"Swaps Pallet"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/Polkadex-Substrate/Polkadex/tree/master",children:"Polkadex"})," \ud83d\udfe1, ",(0,r.jsx)(e.a,{href:"https://github.com/subdarkdex/subdex-parachain",children:"SubDEX"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/galacticcouncil/hack.HydraDX-node",children:"HydraDX"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/apopiak/stablecoin",children:"Substrate Stablecoin"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/digitalnativeinc/standard-substrate",children:"Standard protocol"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/sora-xor/sora2-network",children:"Polkaswap"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/equilibrium-eosdt/equilibrium-curve-amm",children:"Curve AMM"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/konomi-network/cumulus/",children:"Konomi Network"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/nutsfinance/stable-asset",children:"Stable Asset"})," \ud83d\udfe1, ",(0,r.jsx)(e.a,{href:"https://github.com/atscaletech/libra",children:"Libra Payment"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/mangata-finance/mangata-node",children:"Mangata"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/tidelabs/tidechain",children:"Tidechain"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/galacticcouncil/Basilisk-node",children:"Basilisk"})," \ud83d\udfe1, ",(0,r.jsx)(e.a,{href:"https://github.com/PolymeshAssociation/Polymesh",children:"Polymesh"})," \ud83d\udfe2"]}),(0,r.jsxs)(e.td,{children:["DEX with privacy and confidentiality features such as those found in a ",(0,r.jsx)(e.a,{href:"https://en.wikipedia.org/wiki/Dark_pool",children:"dark pool"})]})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Smart contract chains"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/PureStake/moonbeam",children:"moonbeam"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/Magport/Magnet",children:"Magnet"})," \ud83d\udfe1, ",(0,r.jsx)(e.a,{href:"https://github.com/Cardinal-Cryptography/aleph-node",children:"Aleph-node"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/hicommonwealth/edgeware-node",children:"Edgeware"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/ParaState/substrate-ssvm-node",children:"ParaState"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/gear-tech/gear",children:"gear"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/cennznet/cennznet",children:"CENNZnet"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/skyekiwi/skyekiwi-network",children:"SkyeKiwi"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/OAK-Foundation/OAK-blockchain",children:"OAK-blockchain"})," \ud83d\udfe1, ",(0,r.jsx)(e.a,{href:"https://github.com/web3labs/ice-substrate",children:"ICE Blockchain"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/OmniBTC/PSC",children:"Polkadot Smart Chain"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/keep-starknet-strange/madara",children:"Madara - Cairo/Starknet"})," \ud83d\udfe1"]}),(0,r.jsx)(e.td,{children:"smart contract chains with novel security approaches, smart contract chains based on existing toolchains"})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Oracle"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/tellor-io/tellor-pallet",children:"Tellor"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/laminar-protocol/open-runtime-module-library/tree/master/oracle",children:"Laminar"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/smartcontractkit/chainlink-polkadot",children:"Chainlink-polkadot"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/aresprotocols/ares",children:"Ares Protocol"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/Kylin-Network/kylin-node",children:"Kylin Network"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/interlay/interbtc-clients/tree/master/oracle",children:"interbtc-clients oracle"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/webb-tools/anonima",children:"Anonima"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/SaaS3-Foundation/dRuntime-fat",children:"SaaS3"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/tellor-io/tellor-parachain-contracts",children:"Tellor"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/diadata-org/bridgestate-ocw",children:"Bridgestate Oracle"})," \u26aa"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Identity/DID"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/parami-foundation/parami-blockchain",children:"Parami"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/litentry/litentry-parachain",children:"Litentry"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/substrate-developer-hub/pallet-did",children:"pallet-did"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/prasad-kumkar/dot-id",children:"dot-id"})," \u26aa"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"IoT"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/NodleCode/chain",children:"Nodle"})," \ud83d\udfe1, ",(0,r.jsx)(e.a,{href:"https://github.com/DataHighway-DHX/node",children:"MXC/DataHighway"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/peaqnetwork/peaq-network-node",children:"peaq-network-node"})," \ud83d\udfe2"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Verifiable Claims"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/KILTprotocol/kilt-node",children:"KILT"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/docknetwork/dock-substrate",children:"Dock"})," \ud83d\udfe2"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Supply chain"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/digicatapult/dscp-node",children:"DSCP Node"})," \ud83d\udfe2"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Health care"}),(0,r.jsx)(e.td,{}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Music Industry"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/Allfeat/Allfeat",children:"Allfeat Network"})," \ud83d\udfe2"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Data Availability"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/availproject/avail",children:"Avail"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/ZeroDAO/melodot",children:"Melodot"})," \u26aa"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Social Networking"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/frequency-chain/frequency",children:"Frequency"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/social-network/blockchain",children:"Social Network"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/dappforce/subsocial-parachain",children:"SubSocial"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/ZeroDAO/ZeroDAO-node",children:"ZeroDAO"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/myriadsocial/myriad-node",children:"Myriad Node"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/randombishop/wika_etl",children:"Wika Network"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/listenofficial/listen-parachain",children:"Listen"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/tribal-protocol/tribal_contract",children:"Tribal Protocol"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/rust-0x0/hex-space-protocol-substrate",children:"Five Degrees on Substrate"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/acuity-social/acuity-substrate",children:"Acuity Social"})," \ud83d\udfe2"]}),(0,r.jsx)(e.td,{children:"Private instant messenger that uses on-chain identity"})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Governance/DAO"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/aisland-dao/aisland-node/tree/main",children:"Aisland Node"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/hashed-io/hashed-substrate",children:"Hashed Network"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/sunshine-protocol/sunshine-bounty",children:"Sunshine DAO"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/NucleiStudio/governance-os",children:"Governance OS"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/idavollnetwork/idavoll",children:"Idavoll Network"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/DoraFactory/Substrate-Moloch-V2",children:"Substrate Moloch"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/Qrucial/QRUCIAL-DAO",children:"QRUCIAL-DAO"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/sctllabs/societal-node",children:"Societal"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/daos-org/daos",children:"DAOs"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/amiyatulu/shivarthu/",children:"Shivarthu"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/faterium",children:"Faterium"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/decentration/apps",children:"Supersig"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/deep-ink-ventures/genesis-dao-node",children:"GenesisDAO"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/dao-entrance/dao-entrance-node",children:"DAO Entrance"})," ","\u2754",", ",(0,r.jsx)(e.a,{href:"https://github.com/liberland/liberland_substrate",children:"Liberland"})," \ud83d\udfe1"]}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/consul/consul",children:"Consul"})," - Open Government and E-Participation Web Software"]})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Prediction Markets and Futarchy"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/zeitgeistpm/zeitgeist",children:"Zeitgeist"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/XPredictMarket/NodePredict",children:"X Predict Market"})," \u26aa"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Messaging"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/validitylabs/HOPR-PL-Substrate",children:"HOPR"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/chainify/nolik",children:"Nolik"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/Uke-Messaging/uke-pallet",children:"Uke"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/Belsoft-rs/diffychat-pallet",children:"Diffy Chat"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/fennelLabs/Fennel-Protocol",children:"Fennel Protocol"})," \u26aa"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"File Storage, Cloud"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/dappforce/subsocial-offchain",children:"Subsocial-Offchain"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/playproject-io/datdot",children:"DatDot"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/crustio/crust",children:"Crust Network"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/rs-ipfs/offchain-ipfs-manual",children:"offchain::ipfs"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/canyon-network/canyon",children:"Canyon Network"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/Cumulus2021/cess",children:"CESS"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/CESSProject/cess-proving-system",children:"CESS Proving Subsystem"})," ","\u2754",", ",(0,r.jsx)(e.a,{href:"https://github.com/ideal-lab5/iris",children:"Iris"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/CESSProject/fmd-cess",children:"fmd-cess"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/DanHenton/pocket-substrate/tree/ipfs-ocw",children:"IPFS Frame V3"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/threefoldtech/tfchain",children:"Threefold Chain"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/Apron-Network/apron-node",children:"Apron"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/TDSoftware/substrate-ipfs",children:"IPFS Utilities"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://gitlab.com/dinfra/dinfra",children:"DINFRA"})," \ud83d\udfe2"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Name Service"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/xaya/substrate-names",children:"Substrate Names"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/hskang9/substrate-name-service",children:"ENS on Substrate"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/pnsproject/pns-pallets",children:"PNS-Pallets"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/HeisenbergLin22/Faceless_milestone2_delivery",children:"Faceless"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/ff13dfly/Anchor",children:"Anchor"})," \u26aa"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Gaming"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/bit-country/Bit-Country-Blockchain",children:"Bit.country"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/SubGame-Network/subgame-network",children:"SubGame"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/playzero/subzero",children:"subzero"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/web3gamesofficial/web3games-blockchain",children:"Web3Games"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/ajuna-network/ajuna-pallets",children:"Ajuna Pallets"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/cryptoviet/gafi",children:"Gafi Network"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://gitlab.com/asylum-space/asylum-item-nft",children:"Asylum"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/3Dpass/3DP",children:"3DPass"})," \ud83d\udfe1, ",(0,r.jsx)(e.a,{href:"https://github.com/polketio/toearnfun_flutter_app",children:"Polket"})," \u26aa"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Computation/AI"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/Deitos-Network/deitos-ip",children:"Deitos Network"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/DeepBrainChain/DeepBrainChain-MainChain",children:"DeepBrain Chain"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/anudit/cerebrum",children:"AI Infrastructure on Blockchain"})," \u26aa"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Enable specific use-cases"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/deep-ink-ventures/pallet_hookpoints",children:"pallet-hookpoints"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/airalab/substrate-node-robonomics",children:"Robonomics"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/UniversalDot/pallets",children:"UniversalDOT"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/EvercityEcosystem/evercity-chain",children:"Evercity Sustainable Finance Protocol"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/logion-network/logion-node",children:"logion"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/Me-Protocol/rusty-protocol-v0.1/",children:"Me Protocol"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/QSTN-US/Polkadot-QSTN-v1/",children:"QSTN"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/subcoin-project/subcoin",children:"Subcoin"})," \ud83d\udfe2"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"NFT"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/capsule-corp-ternoa/chain",children:"ternoa"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/danforbes/pallet-nft",children:"FRAME Pallet: NFTs for Substrate"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/UniqueNetwork/unique-chain",children:"Unique NFT Parachain"})," \ud83d\udfe1, ",(0,r.jsx)(e.a,{href:"https://github.com/DNFT-Team/dnft-substrate-node/tree/master/pallets",children:"DNFT"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/rmrk-team/rmrk-substrate",children:"RMRK-Substrate"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/Popular-Coding/nt-nft",children:"NT-NFTs"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/GreenLemonProtocol/dksap-polkadot",children:"Green Lemon"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/galacticcouncil/Basilisk-node",children:"Basilisk"})," \ud83d\udfe1"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Randomness"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/Cardinal-Cryptography/substrate/tree/randomness-beacon",children:"DKG and Randomness Beacon"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/random-meat/drand-substrate-client",children:"drand-substrate-client"})," \u26aa"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Licensing"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/anagolay/anagolay-chain",children:"Anagolay Network"})," ","\u2754"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Banking Integration"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/element36-io/ebics-java-service",children:"FIAT on-off-ramp"})," \u26aa"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Crowdfunding"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/ImbueNetwork/imbue",children:"Imbue Network"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/zhangjiannan/QFgrant",children:"Quadratic Funding pallet by Dora"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/OAK-Foundation/quadratic-funding-pallet/tree/master",children:"Quadratic Funding pallet by OAK"})," \u26aa"]}),(0,r.jsx)(e.td,{children:(0,r.jsx)(e.a,{href:"https://ethresear.ch/t/minimal-anti-collusion-infrastructure/5413",children:"Minimum Anti-Collusion Infrastructure (MACI)"})})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Collection of Pallets"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/open-web3-stack/open-runtime-module-library",children:"Substrate Open Runtime Module Library"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/galacticcouncil/warehouse",children:"warehouse"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/InvArch/InvArch-Frames",children:"InvArch FRAME Pallet Library"})," \ud83d\udfe1"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Marketplaces"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/WowLabz/dot-marketplace-v2/tree/Phase3_Milestone3",children:"Dot Marketplace"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/hashed-io/hashed-substrate/tree/main/pallets/gated-marketplace",children:"Gated Marketplace"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/Popular-Coding/ventur",children:"Ventur"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/RELAI-Network/futur-protocol",children:"Futur Protocol"})," ","\u2754"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Carbon Credits"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/bitgreen/bitg-node",children:"BitGreen"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/EvercityEcosystem/carbon-assets",children:"Carbon Assets Pallet"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/SequesterChain/pallets",children:"Sequester Pallets"})," \u26aa"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"UTXO"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/Off-Narrative-Labs/Tuxedo",children:"Tuxedo"})," \u26aa"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Other"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/Moonsong-Labs/moonkit",children:"Moonkit"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/gautamdhameja/substrate-account-filter",children:"Substrate Account Filter"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/opentensor/subtensor",children:"Subtensor"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/AdMetaNetwork/admeta",children:"AdMeta"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/chocolatenetwork/chocolate-node",children:"Chocolate Node"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/virto-network/virto-node",children:"Virto Network"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/gautamdhameja/substrate-validator-set",children:"Substrate Validator Set"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/DEIPworld/deip-node",children:"DEIP"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/debionetwork/debio-node",children:"DeBio"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/mathwallet/MathChain",children:"MathChain"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/encointer/encointer-node",children:"encointer"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/grasslandnetwork/substrate_node",children:"Grassland"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/rusty-crewmates/substrate-tutorials",children:"Substrate-Tutorials"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/Fair-Squares/fair-squares",children:"Fair Squares"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/totem-tech/totem",children:"Totem Live Accounting"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/herou/EscrowPallet",children:"Escrow Pallet"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/NexTokenTech/TREX",children:"TREX"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/relationlabs/Relation-Graph",children:"Relation Graph"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/gertt/Invoice",children:"Decentralized Invoice"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/redstone-network/redstone-node",children:"Redstone Network"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/WunderbarNetwork/access-control",children:"Access Control Pallet"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/Omniverse-Web3-Labs/omniverse-swap/tree/web3-grant",children:"Omniverse DLT"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/polytope-labs/substrate-ismp",children:"ISMP"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/w3f/xcmp_prototype_playground",children:"XCMP"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/dhiway/cord",children:"CORD Chain"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/w3f/educhain",children:"Educhain"})," \ud83d\udfe2"]}),(0,r.jsx)(e.td,{children:"Decentralized review/reputation system"})]})]})]}),"\n",(0,r.jsx)(e.h3,{id:"host",children:"Host"}),"\n",(0,r.jsxs)(e.table,{children:[(0,r.jsx)(e.thead,{children:(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.th,{children:"Components"}),(0,r.jsx)(e.th,{children:"Existing projects"}),(0,r.jsx)(e.th,{children:"Potentially interesting projects"})]})}),(0,r.jsxs)(e.tbody,{children:[(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Rust"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/substrate",children:"Substrate"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/cumulus",children:"Cumulus"})," \ud83d\udfe2"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"C++"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/soramitsu/kagome",children:"Kagome"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/Zondax/mayon",children:"Mayon"})," \u26aa"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Go"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/ChainSafe/gossamer",children:"Gossamer"})," \ud83d\udfe2"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Java"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/LimeChain/Fruzhin",children:"Fruzhin"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/LimeChain/java-host-research",children:"Java Host Research"})," \u26aa"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"AssemblyScript"}),(0,r.jsx)(e.td,{}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Light Client"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/smol-dot/smoldot",children:"smoldot"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/paritytech/substrate-connect",children:"Substrate Connect"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/eqlabs/polkadot-light-client",children:"C++ Polkadot Light Client"})," \u26aa"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Testing"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/LimeChain/polkadot-conformance",children:"Polkadot Conformance"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/sigp/polkafuzz",children:"Polkafuzz"})," \u26aa"]}),(0,r.jsx)(e.td,{})]})]})]}),"\n",(0,r.jsx)(e.h3,{id:"network-maintenance-tools",children:"Network Maintenance Tools"}),"\n",(0,r.jsxs)(e.table,{children:[(0,r.jsx)(e.thead,{children:(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.th,{children:"Components"}),(0,r.jsx)(e.th,{children:"Existing projects"}),(0,r.jsx)(e.th,{children:"Potentially interesting projects"})]})}),(0,r.jsxs)(e.tbody,{children:[(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Secure validator setup"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/polkachu/polkadot-validator",children:"Polkadot Validation Node Ansible Setup"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/w3f/polkadot-validator-setup",children:"W3F Polkadot Validator Setup"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/Nexus2k/polkadot-ansible",children:"polkadot-ansible"})," \u26aa"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"High availability setup"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/luguslabs/archipel",children:"Archipel"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/protofire/polkadot-failover-mechanism",children:"Polkadot Failover Mechanism"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/Datagen-Project/Datagen-Substrate-Grant",children:"Datagen"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/bright/substrate-raft",children:"High Availability Validator Setup"})," \u26aa"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Load Balanced Endpoints"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/insight-w3f/terragrunt-polkadot",children:"terragrunt-polkadot"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/sudoblockio/substrate-meta",children:"Geometry Labs' Substrate Meta repo"})," \u26aa"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Deployment Tools"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/Blockdaemon/bpm-sdk",children:"Polkadot Package Manager"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/akropolisio/polkahub-monorepo",children:"PolkaHub"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/AvadoDServer/AVADO-DNP-Polkadot-custom",children:"Avado"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/w3f/polkadot-deployer",children:"Polkadot Deployer"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/for-parity-with-love/unified-collator-node-deployment",children:"Unified Collator Deployment"})," \u26aa"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Validator monitoring"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/turboflakes/one-t",children:"ONE-T"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/helikon-labs/subvt-backend",children:"SubVT"})," \ud83d\udfe1, ",(0,r.jsx)(e.a,{href:"https://github.com/SimplyVC/panic",children:"P.A.N.I.C."})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/galacticcouncil/polkalert",children:"Polkalert"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/nodebreaker0-0/substrate/tree/prometheus_v0.3",children:"B-Harvest"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/stakezone/nmonpolkadot",children:"nmonpolkadot"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/ironoa/polkadot-k8s-monitor",children:"Polkadot-K8s-Monitor"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/w3f/polkadot-watcher",children:"Polkadot-Watcher"})," \ud83d\udfe1, ",(0,r.jsx)(e.a,{href:"https://github.com/helikon-labs/polkadot-kusama-1kv-telegram-bot",children:"1KV Telegram Bot"})," \u26aa"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Validator payout management"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/Colm3na/substrate-auto-payout",children:"Substrate validator auto payout"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/w3f/polkadot-payouts",children:"Polkadot Payouts"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/emostov/staking-payouts",children:"staking-payouts CLI"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/stakelink/substrate-payctl",children:"Payctl"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/turboflakes/crunch",children:"crunch"})," \ud83d\udfe2"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Staking Miner"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/paritytech/staking-miner-v2",children:"Staking Miner v2"})," \ud83d\udfe2"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Nominator Tools"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/miepsik/validators_selection",children:"Validator Selection"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/filippoweb3/polkanalyzer",children:"Polkanalyzer"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/filippoweb3/polkanalyzer-app",children:"Polkanalyzer-app"})," \u26aa"]}),(0,r.jsx)(e.td,{})]})]})]}),"\n",(0,r.jsx)(e.h3,{id:"signatures",children:"Signatures"}),"\n",(0,r.jsxs)(e.table,{children:[(0,r.jsx)(e.thead,{children:(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.th,{children:"Components"}),(0,r.jsx)(e.th,{children:"Existing projects"}),(0,r.jsx)(e.th,{children:"Potentially interesting projects"})]})}),(0,r.jsxs)(e.tbody,{children:[(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"SR25519"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/w3f/schnorrkel",children:"rust"})," \u26aa(contains partial bindings for C, JavaScript, and Python), ",(0,r.jsx)(e.a,{href:"https://github.com/gautamdhameja/sr25519-dotnet",children:".Net bindings"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/usetech-llc/sr25519",children:"C"})," \u26aa",(0,r.jsx)(e.em,{children:"(old)"}),", ",(0,r.jsx)(e.a,{href:"https://github.com/TerenceGe/sr25519-donna",children:"C"})," \u26aa",(0,r.jsx)(e.em,{children:"(new)"}),", ",(0,r.jsx)(e.a,{href:"https://github.com/soramitsu/soramitsu-sr25519-crust",children:"C/C++"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/usetech-llc/sr25519_dotnet",children:"C#"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/ChainSafe/go-schnorrkel",children:"Go"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/debuggor/schnorrkel-java",children:"java"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/gmajor-encrypt/sr25519-bindings",children:"PHP"})," \u26aa"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Signature Aggregation"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/w3f/apk-proofs",children:"apk-proofs"})," \u26aa"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Distributed key generation (DKG) or management"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/isislovecruft/frost-dalek",children:"keygen.rs"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/w3f-grants-archive/sword",children:"Secure Wallet Origin Distribution (SWORD)"})," \u26aa"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Validator HSMs"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/Zondax/buildroot-zondax",children:"Zondax Remote Signer"})," \u26aa"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"MPC"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/orochi-network/orochi-network.github.io",children:"Orochi Network"})," \ud83d\udfe2"]}),(0,r.jsx)(e.td,{})]})]})]}),"\n",(0,r.jsx)(e.h3,{id:"consensus",children:"Consensus"}),"\n",(0,r.jsxs)(e.table,{children:[(0,r.jsx)(e.thead,{children:(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.th,{children:"Components"}),(0,r.jsx)(e.th,{children:"Existing projects"}),(0,r.jsx)(e.th,{children:"Potentially interesting projects"})]})}),(0,r.jsxs)(e.tbody,{children:[(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"PoC"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/subspace/substrate",children:"Spartan"})," \u26aa"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"PoW"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/substrate/client/consensus/pow",children:"PoW consensus for Substrate"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/kulupu/kulupu/tree/master/pow",children:"RandomX"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/substrate-developer-hub/recipes/tree/master/consensus/sha3pow",children:"Sha3 PoW"})," \u26aa"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Block production"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/substrate/client/consensus/babe",children:"BABE"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/substrate/client/consensus/aura",children:"Aura"})," \ud83d\udfe2"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Finality"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/substrate/frame/grandpa",children:"GRANDPA"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/Cardinal-Cryptography/AlephBFT",children:"AlephBFT"})," \ud83d\udfe1"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Other"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/PureStake/nimbus",children:"Nimbus: Upgradeable consensus framework"})," \u26aa"]}),(0,r.jsx)(e.td,{})]})]})]}),"\n",(0,r.jsx)(e.h3,{id:"networking",children:"Networking"}),"\n",(0,r.jsxs)(e.table,{children:[(0,r.jsx)(e.thead,{children:(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.th,{children:"Components"}),(0,r.jsx)(e.th,{children:"Existing projects"}),(0,r.jsx)(e.th,{children:"Potentially interesting projects"})]})}),(0,r.jsxs)(e.tbody,{children:[(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"SCALE Codec"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/paritytech/parity-scale-codec",children:"Rust"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/paritytech/parity-scale-codec-ts",children:"TypeScript"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/polkascan/py-scale-codec",children:"Python"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/ChainSafe/gossamer/tree/development/pkg/scale/",children:"Golang Chainsafe"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/itering/scale.go",children:"Golang Itering"})," \ud83d\udfe1, ",(0,r.jsx)(e.a,{href:"https://github.com/MatthewDarnell/cScale",children:"C"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/soramitsu/scale-codec-cpp",children:"C++"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/polkadot-js/api",children:"JavaScript"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/LimeChain/as-scale-codec",children:"AssemblyScript"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/airalab/hs-web3/tree/master/packages/scale/src/Codec",children:"Haskell"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/emeraldpay/polkaj",children:"Java"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/itering/scale.rb",children:"Ruby"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/nbltrust/dart-scale-codec",children:"Dart"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/tesseract-one/swift-scale-codec",children:"Swift"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/sublabdev/scale-codec-swift",children:"scale-codec-swift"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/sublabdev/scale-codec-kotlin",children:"scale-codec-kotlin"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/gmajor-encrypt/php-scale-codec",children:"PHP"})," \ud83d\udfe1, ",(0,r.jsx)(e.a,{href:"https://github.com/soramitsu/scale-codec-js-library",children:"JavaScript by Soramitsu"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/gmajor-encrypt/scale-codec-comparator",children:"Scale Codec Comparator"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/darwinia-network/darwinia-messages-sol/blob/master/contracts/utils/contracts/ScaleCodec.sol",children:"ScaleCodec.sol by Darwinia"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/Snowfork/snowbridge/blob/main/core/packages/contracts/contracts/ScaleCodec.sol",children:"ScaleCodec.sol by Snowfork"})," \ud83d\udfe2, ",(0,r.jsx)(e.a,{href:"https://github.com/arijitAD/dotscale",children:"Dotscale"})," \u26aa"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Networking Framework"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/libp2p/libp2p",children:"libp2p"})," \ud83d\udfe1",(0,r.jsx)(e.a,{href:"https://github.com/algorealmInc/SwarmNL",children:"SwarmNL"})," \u26aa"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"DHT Crawler"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/atredispartners/dht-crawler-polkadot",children:"Go"})," \u26aa, ",(0,r.jsx)(e.a,{href:"https://github.com/emeraldpay/polkabot",children:"Kotlin"})," \u26aa"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"RPC Tor-like access"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/Evanesco-Labs/WhiteNoise.rs",children:"WhiteNoise"})," \u26aa"]}),(0,r.jsx)(e.td,{})]})]})]}),"\n",(0,r.jsx)(e.h3,{id:"primitives",children:"Primitives"}),"\n",(0,r.jsxs)(e.table,{children:[(0,r.jsx)(e.thead,{children:(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.th,{children:"Components"}),(0,r.jsx)(e.th,{children:"Existing projects"}),(0,r.jsx)(e.th,{children:"Potentially interesting projects"})]})}),(0,r.jsxs)(e.tbody,{children:[(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Storage"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/frisitano/merkle-tree-db",children:"Merkle Tree DB"})," \u26aa"]}),(0,r.jsx)(e.td,{})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Merkle Proofs"}),(0,r.jsxs)(e.td,{children:[(0,r.jsx)(e.a,{href:"https://github.com/polytope-labs/solidity-merkle-trees",children:"Solidity Trie Verifier"})," \ud83d\udfe1"]}),(0,r.jsx)(e.td,{})]})]})]}),"\n",(0,r.jsx)(e.h2,{id:"contributing",children:"Contributing"}),"\n",(0,r.jsx)(e.p,{children:"Pull requests, issues, or other contributions from the community are encouraged! You can not only\nadd specific projects, but also potentially interesting fields/areas which are currently missing in\nthe tech stack."}),"\n",(0,r.jsx)(e.p,{children:":heavy_exclamation_mark: All technologies listed above need to be open-source. Ideally, the links\nlead directly to the code."}),"\n",(0,r.jsx)(e.p,{children:(0,r.jsxs)(e.em,{children:["Note: You will need a GitHub account to suggest changes or open issues. If you do not have one, you\nmay ",(0,r.jsx)(e.a,{href:"https://github.com/join",children:"sign up for free"}),"."]})})]})}function d(t={}){const{wrapper:e}={...(0,h.R)(),...t.components};return e?(0,r.jsx)(e,{...t,children:(0,r.jsx)(l,{...t})}):l(t)}},28453:(t,e,s)=>{s.d(e,{R:()=>a,x:()=>n});var r=s(96540);const h={},i=r.createContext(h);function a(t){const e=r.useContext(i);return r.useMemo((function(){return"function"==typeof t?t(e):{...e,...t}}),[e,t])}function n(t){let e;return e=t.disableParentContext?"function"==typeof t.components?t.components(h):t.components||h:a(t.components),r.createElement(i.Provider,{value:e},t.children)}}}]); \ No newline at end of file diff --git a/assets/js/ccc1222e.c2e39750.js b/assets/js/ccc1222e.c2e39750.js new file mode 100644 index 000000000000..a3be02ab0fdc --- /dev/null +++ b/assets/js/ccc1222e.c2e39750.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5702],{6295:(t,e,s)=>{s.r(e),s.d(e,{assets:()=>c,contentTitle:()=>n,default:()=>d,frontMatter:()=>a,metadata:()=>r,toc:()=>o});const r=JSON.parse('{"id":"build/build-open-source","title":"Open Source Stack","description":"Overview of the open source Polkadot/Kusama Tech Stack","source":"@site/../docs/build/build-open-source.md","sourceDirName":"build","slug":"/build-open-source","permalink":"/docs/build-open-source","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/build/build-open-source.md","tags":[],"version":"current","lastUpdatedBy":"github-actions[bot]","lastUpdatedAt":1730712408000,"frontMatter":{"id":"build-open-source","title":"Open Source Stack","sidebar_label":"Open Source Stack","description":"Overview of the open source Polkadot/Kusama Tech Stack","keywords":["open","source","development","code","resources","tools","apis"],"slug":"../build-open-source"},"sidebar":"docs","previous":{"title":"Explorer, Data, & Indexing Tools","permalink":"/docs/build-data"},"next":{"title":"Hackathons","permalink":"/docs/build-hackathon"}}');var h=s(74848),i=s(28453);const a={id:"build-open-source",title:"Open Source Stack",sidebar_label:"Open Source Stack",description:"Overview of the open source Polkadot/Kusama Tech Stack",keywords:["open","source","development","code","resources","tools","apis"],slug:"../build-open-source"},n="Open Source Polkadot Stack ",c={},o=[{value:"About",id:"about",level:2},{value:"Layers of Polkadot Stack",id:"layers-of-polkadot-stack",level:2},{value:"Wallets",id:"wallets",level:3},{value:"User Interface",id:"user-interface",level:3},{value:"Tools, APIs, and Languages",id:"tools-apis-and-languages",level:3},{value:"ink! Smart Contracts",id:"ink-smart-contracts",level:3},{value:"Chains and Pallets",id:"chains-and-pallets",level:3},{value:"Host",id:"host",level:3},{value:"Network Maintenance Tools",id:"network-maintenance-tools",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Consensus",id:"consensus",level:3},{value:"Networking",id:"networking",level:3},{value:"Primitives",id:"primitives",level:3},{value:"Contributing",id:"contributing",level:2}];function l(t){const e={a:"a",admonition:"admonition",code:"code",em:"em",h1:"h1",h2:"h2",h3:"h3",header:"header",hr:"hr",li:"li",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,i.R)(),...t.components};return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(e.header,{children:(0,h.jsx)(e.h1,{id:"open-source-polkadot-stack-",children:"Open Source Polkadot Stack "})}),"\n",(0,h.jsx)(e.admonition,{title:"Do your research before using open-source tools",type:"caution",children:(0,h.jsxs)(e.p,{children:["The tools listed here are open-source and are linked directly to their source code. Before using these tools to build your projects, always ",(0,h.jsx)(e.a,{href:"/docs/how-to-dyor",children:"do your research"})," and be aware of ",(0,h.jsx)(e.a,{href:"/docs/learn-scams",children:"scams"}),"."]})}),"\n",(0,h.jsx)(e.p,{children:"This page aims to provide an overview of the open-source Polkadot Tech Stack."}),"\n",(0,h.jsxs)(e.p,{children:["This is a living document, and we rely on everyone to contribute and help maintain\nit. ",(0,h.jsx)(e.a,{href:"#contributing",children:(0,h.jsx)(e.strong,{children:"Please feel free to make edits and additions via pull requests"})}),". We\napologize if we missed your project!"]}),"\n",(0,h.jsx)(e.hr,{}),"\n",(0,h.jsxs)(e.ul,{children:["\n",(0,h.jsx)(e.li,{children:(0,h.jsx)(e.a,{href:"#about",children:"About"})}),"\n",(0,h.jsxs)(e.li,{children:[(0,h.jsx)(e.a,{href:"#layers-of-polkadot-stack",children:"Layers of Polkadot Stack"}),"\n",(0,h.jsxs)(e.ul,{children:["\n",(0,h.jsx)(e.li,{children:(0,h.jsx)(e.a,{href:"#wallets",children:"Wallets"})}),"\n",(0,h.jsx)(e.li,{children:(0,h.jsx)(e.a,{href:"#user-interface",children:"User Interface"})}),"\n",(0,h.jsx)(e.li,{children:(0,h.jsx)(e.a,{href:"#tools-apis-and-languages",children:"Tools, APIs, and Languages"})}),"\n",(0,h.jsx)(e.li,{children:(0,h.jsx)(e.a,{href:"#ink-smart-contracts",children:"ink! Smart Contracts"})}),"\n",(0,h.jsx)(e.li,{children:(0,h.jsx)(e.a,{href:"#chains-and-pallets",children:"Chains and Pallets"})}),"\n",(0,h.jsx)(e.li,{children:(0,h.jsx)(e.a,{href:"#host",children:"Host"})}),"\n",(0,h.jsx)(e.li,{children:(0,h.jsx)(e.a,{href:"#network-maintenance-tools",children:"Network Maintenance Tools"})}),"\n",(0,h.jsx)(e.li,{children:(0,h.jsx)(e.a,{href:"#signatures",children:"Signatures"})}),"\n",(0,h.jsx)(e.li,{children:(0,h.jsx)(e.a,{href:"#consensus",children:"Consensus"})}),"\n",(0,h.jsx)(e.li,{children:(0,h.jsx)(e.a,{href:"#networking",children:"Networking"})}),"\n",(0,h.jsx)(e.li,{children:(0,h.jsx)(e.a,{href:"#primitives",children:"Primitives"})}),"\n"]}),"\n"]}),"\n",(0,h.jsx)(e.li,{children:(0,h.jsx)(e.a,{href:"#contributing",children:"Contributing"})}),"\n"]}),"\n",(0,h.jsx)(e.h2,{id:"about",children:"About"}),"\n",(0,h.jsxs)(e.p,{children:["The Polkadot Tech Stack is a subset of the Web 3.0 Tech Stack, which consists of the ",(0,h.jsx)(e.strong,{children:"open-source"}),"\ntechnologies contributing to and relying on ",(0,h.jsx)(e.a,{href:"https://polkadot.network/",children:"Polkadot"}),". It is meant to be used\nfor decentralized application (Dapp) development within numerous verticals, including DeFi, Gaming,\nProvenance and many others not pictured below."]}),"\n",(0,h.jsx)(e.pre,{children:(0,h.jsx)(e.code,{children:"|------|--------|------------|\n| DeFi | Gaming | Provenance |\n|______|________|____________|\n Dapps\n|--------------------------/-|\n| Explorers, Wallets / |\n|------------------------/---|\n| Tools, Apis, Languages/ |\n|----------------------/-----|\n| 2nd layer protocols / |\n|--------------------/-------|\n| Chains / other |\n|------------------/--- --|\n| *Polkadot* | tech |\n|------------------\\---------|\n| P2P, Crypto, Wasm \\ |\n|--------------------\\-------|\n"})}),"\n",(0,h.jsx)(e.h2,{id:"layers-of-polkadot-stack",children:"Layers of Polkadot Stack"}),"\n",(0,h.jsx)(e.p,{children:"In the below sections, you can find a list of different layers of the Polkadot Stack."}),"\n",(0,h.jsxs)(e.p,{children:[(0,h.jsx)(e.strong,{children:"Maintenance Status"}),":"]}),"\n",(0,h.jsxs)(e.ul,{children:["\n",(0,h.jsx)(e.li,{children:"\ud83d\udfe2 Actively maintained"}),"\n",(0,h.jsx)(e.li,{children:"\ud83d\udfe1 Stale (no activity on the main branch for one month)"}),"\n",(0,h.jsx)(e.li,{children:"\u26aa Unmaintained (no activity on the main branch for more than three months)"}),"\n"]}),"\n",(0,h.jsx)(e.h3,{id:"wallets",children:"Wallets"}),"\n",(0,h.jsxs)(e.table,{children:[(0,h.jsx)(e.thead,{children:(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.th,{children:"Components"}),(0,h.jsx)(e.th,{children:"Existing projects"}),(0,h.jsx)(e.th,{children:"Potentially interesting projects"})]})}),(0,h.jsxs)(e.tbody,{children:[(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Web Wallets"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/ChainSafe/Multix",children:"Multix"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/polkasafe/polkasafe-ui",children:"Polkasafe"})," \ud83d\udfe1, ",(0,h.jsx)(e.a,{href:"https://github.com/polkadot-js/apps",children:"polkadot-js/apps"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/TalismanSociety/talisman-web",children:"Talisman Web Application"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/enkryptcom/mydotwallet",children:"mydotwallet"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/dappforce/subid",children:"Sub ID"})," \ud83d\udfe1, ",(0,h.jsx)(e.a,{href:"https://github.com/Primis-Labs/client",children:"Primis"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/w3finance/sakura",children:"Sakura"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/w3f-grants-archive/Web3Box-apps",children:"Web3Box"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/CoongCrafts/coong-wallet",children:"Coong Wallet"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/itering/subscan-multisig-react",children:"Subscan Multisig UI - React"})," \ud83d\udfe1, ",(0,h.jsx)(e.a,{href:"https://github.com/itering/subscan-multisig-ui",children:"Subscan Multisig UI"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/DoraFactory/dorafactory-multisig",children:"Dorafactory-Multisig"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/paritytech/capi-multisig-app",children:"Capi Multisig App"})," \u26aa"]}),(0,h.jsxs)(e.td,{children:["User-friendly Wallet based on the ",(0,h.jsx)(e.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/substrate/frame/recovery",children:"Recovery Pallet"}),", Web wallets focused on user-onboarding (e.g. using ",(0,h.jsx)(e.a,{href:"https://github.com/near/near-wallet",children:"localStorage"}),")"]})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Desktop Wallets"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/novasamatech/nova-spektr",children:"nova-spektr"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/w3f-grants-archive/omni-desktop-prototype",children:"Omni desktop"})," \u26aa"]}),(0,h.jsx)(e.td,{children:"Enterprise Wallets"})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Browser Extensions"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/TalismanSociety/talisman",children:"Talisman-Extension"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/Koniverse/SubWallet-Extension",children:"SubWallet-Extension"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/enkryptcom/enKrypt",children:"Enkrypt"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/polkadot-js/extension",children:"Polkadot-JS"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/PolkaGate/polkagate-extension",children:"PolkaGate"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/trustwallet",children:"Trust Wallet Extension"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/ChainBridgeNetworkTeam/Doter",children:"Doter"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/GetSpeckle/speckle-browser-extension",children:"Speckle OS"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/blockcoders/kuma-wallet",children:"Kuma Cross-chain Wallet"})," \ud83d\udfe2"]}),(0,h.jsx)(e.td,{children:"Sign-in with your Polkadot, Kusama, etc. account."})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Mobile Wallets"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/novasamatech/nova-wallet-ios",children:"Nova Wallet iOS"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/novasamatech/nova-wallet-android",children:"Nova Wallet Android"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/paritytech/parity-signer",children:"Polkadot Vault"})," \ud83d\udfe1, ",(0,h.jsx)(e.a,{href:"https://github.com/soramitsu/fearless-Android",children:"Fearless Wallet Android"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/soramitsu/fearless-iOS",children:"Fearless Wallet iOS"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/trustwallet",children:"Trust Wallet"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/Koniverse/SubWallet-Mobile",children:"SubWallet-Mobile"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/Kalapaja/kampela-firmware",children:"Kampela"})," \ud83d\udfe1, ",(0,h.jsx)(e.a,{href:"https://github.com/airgap-it/airgap-wallet",children:"AirGap"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/Interstellar-Network/wallet-app",children:"Interstellar Network"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/luniehq/lunie",children:"Lunie"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/polkawallet-io/polkawallet-flutter",children:"Polkawallet"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/consenlabs/token-core",children:"imToken"})," \ud83d\udfe1, ",(0,h.jsx)(e.a,{href:"https://github.com/stylo-app/stylo",children:"Stylo"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/fractapp/fractapp/",children:"Fractapp"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/hypha-dao/hashed-wallet",children:"Hashed Wallet"})," \u26aa"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Burner Wallets/Faucet/Gifts"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/hamidra/dotdrop",children:"dotdrop"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/vue-polkadot/apps",children:"KodaDot"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/AstarNetwork/astar-faucet-bot",children:"Astar Faucet Bot"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/karooolis/sybil-resistant-substrate-faucet",children:"Generic sybil-resistant faucet"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/StringNick/sybil-resistant-chat-bot-substrate-faucet",children:"sybil-resistant Chat Bot Faucet"})," ","\u2754"]}),(0,h.jsx)(e.td,{children:"Faucet (a sybil-resistant way to receive free tokens)"})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Wallet Plugins"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/ChainSafe/metamask-snap-polkadot",children:"Metamask-Snap by Chainsafe"})," \ud83d\udfe1"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"CLI Wallet"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/yxf/subwallet",children:"Subwallet"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/canontech/proxy-hot-wallet",children:"Proxy-hot-wallet"})," \u26aa"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Hardware Wallets"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/ZondaX/ledger-polkadot",children:"Ledger Polkadot"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/Zondax/ledger-kusama",children:"Ledger Kusama"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/Zondax/ledger-statemint",children:"Ledger Statemint"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/Zondax/ledger-statemine",children:"Ledger Statemine"})," \ud83d\udfe2"]}),(0,h.jsx)(e.td,{children:"Trezor"})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"OAuth2-compatible Wallets"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/singkeo/dot-login",children:"DOT Login"})," \u26aa"]}),(0,h.jsx)(e.td,{})]})]})]}),"\n",(0,h.jsx)(e.h3,{id:"user-interface",children:"User Interface"}),"\n",(0,h.jsxs)(e.table,{children:[(0,h.jsx)(e.thead,{children:(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.th,{children:"Components"}),(0,h.jsx)(e.th,{children:"Existing projects"}),(0,h.jsx)(e.th,{children:"Potentially interesting projects"})]})}),(0,h.jsxs)(e.tbody,{children:[(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Block Explorers"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/topmonks/calamar",children:"Calamar"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/polkascan/explorer-api",children:"Polkascan"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/Colm3na/polkastats-backend",children:"Polkastats"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/itering/subscan",children:"Subscan"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/opensquare-network/statescan-v2",children:"Statescan"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/edgeware-builders/edgscan",children:"Edgscan"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/web3labs/epirus-substrate",children:"Sirato"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/blockcoders/ink-substrate-explorer-api",children:"ink! Explorer API"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/CESSProject/substats",children:"Substats"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/hybrid-explorer/hybrid-dapp",children:"Hybrid Block Explorer"})," \u26aa"]}),(0,h.jsx)(e.td,{children:"Mempool focused explorer (including parachain transaction)"})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Validator Dashboards"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/paritytech/substrate-telemetry",children:"Polkadot Telemetry"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/hashquark-io/polkacube-frontend",children:"Polkacube"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/buidl-labs/YieldScan",children:"YieldScan"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/w3f-community/hubble/tree/master/app/controllers/polkadot",children:"Hubble"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/ArthurHoeke/cyclops",children:"Cyclops"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/web3go-xyz/web3go-xyz-v2",children:"Web3Go"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/MathCryptoDoc/insights-1kv",children:"1kv insights"})," \u26aa"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Node Explorers"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/protos-research/polkadot-node-explorer",children:"Polkadot Node Explorer"})," \u26aa"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"NFT Explorer"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/kodadot/nft-gallery",children:"NFT Explorer for Kusama & Polkadot"})," \ud83d\udfe2"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Governance Dashboards"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/paritytech/governance-ui",children:"Polkadot Delegation Dashboard"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/premiurly/polkassembly",children:"Polkassembly"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/opensquare-network/dotreasury",children:"dotreasury"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/bright/bright-tresury",children:"Bright Treasury"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/opensquare-network/collaboration",children:"OpenSquare offchain voting"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/wpank/open-gov-insights",children:"OpenGov Insights"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/stake-plus/treasury-tracker",children:"Treasury Tracker"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/joepetrowski/opengov-cli",children:"OpenGov CLI"})," \ud83d\udfe1"]}),(0,h.jsxs)(e.td,{children:["UI for the Kusama and/or Polkadot treasury (see ",(0,h.jsx)(e.a,{href:"https://github.com/paritytech/substrate/pull/5715",children:"bounty module"}),"), UI for Parachain Lease Offering (PLO)"]})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Staking"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/w3f/staking-rewards-collector",children:"Staking Rewards Collector"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/jackson-harris-iii/staking-rewards-viewer",children:"Staking Rewards Viewer"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/cryptolab-network/polkadot-staking-site",children:"Polkadot Staking Site"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/paritytech/polkadot-staking-dashboard",children:"Polkadot Staking Dashboard"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/James-Sangalli/dot-validator-selector",children:"Polkadot/Kusama Validator Selector"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/James-Sangalli/dot-staking-income",children:"Staking Income CSV Generator"})," \u26aa"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Bridge UI"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/paritytech/parity-bridges-ui",children:"Parity Bridges UI"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/nutbox-dao/donut-interface",children:"Donut Interface (Steem - Dot)"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/RostislavLitovkin/PlutonicationServer",children:"Plutonication"})," \ud83d\udfe1"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Parachain/Crowdloan"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/jhonalino/parachains.network",children:"Parachains.Network"})," ","\u2754",", ",(0,h.jsx)(e.a,{href:"https://github.com/CrommVardek/polk-auction-ui",children:"PolkAuction"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/10clouds/crowdloan-template",children:"Crowdloan Front End Template"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/hack-ink/slothunter/",children:"Slothunter"})," \u26aa"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Identicon"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://polkadot.cloud/polkicon",children:"Polkicon"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/RidOne-technologies/polkadot-web-identicon",children:"PolkadotWebIdenticon"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/RidOne-technologies/polkadot-angular-identicon",children:"Polkadot Angular IdentIcon"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/Noc2/Bird-Identicon",children:"Bird Identicon"})," \u26aa"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Coretime"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/LasticXYZ/LasticUI",children:"Lastic"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/RegionX-Labs/RegionX-Node",children:"RegionX"})," \ud83d\udfe2"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Other"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://polkadot.cloud",children:"Polkadot Cloud"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/tien/dot-console",children:"\u0110\xd3TConsole"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/KappaSigmaMu/ksm-app",children:"KappaSigmaMu Fratority"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/OAK-Foundation/quadratic-funding-webapp",children:"Quadratic Funding Webapp"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://gitlab.com/polkawatch/polkawatch",children:"Polkawatch"}),", ",(0,h.jsx)(e.a,{href:"https://github.com/bytepayment/bytepay",children:"Bytepay"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/Delmonicos/charging-management-platform",children:"charging-management-platform"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/TDSoftware/subidentity-webapp",children:"subidentity-webapp"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/opensquare-network/paid-qa/",children:"OpenSquare Paid QA"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/CrossChainLabs-DOT/dotpulse-api",children:"DotPulse"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/bsn-si/rubeus-smartcontract",children:"Rubeus Keeper"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/justmert/eco-flow-frontend",children:"Polkaflow"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/helikon-labs/chainviz",children:"ChainViz"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/fidi-tech/dotsight",children:"Dotsight"})," \u26aa"]}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://docs.sui.io/build/zk_login",children:"zkLogin"}),", Portfolio Viewer like Zapper or Zerion"]})]})]})]}),"\n",(0,h.jsx)(e.h3,{id:"tools-apis-and-languages",children:"Tools, APIs, and Languages"}),"\n",(0,h.jsxs)(e.table,{children:[(0,h.jsx)(e.thead,{children:(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.th,{children:"Components"}),(0,h.jsx)(e.th,{children:"Existing projects"}),(0,h.jsx)(e.th,{children:"Potentially interesting projects"})]})}),(0,h.jsxs)(e.tbody,{children:[(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Runtime/Parachain frameworks"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/paritytech/polkadot-sdk",children:"Polkadot Blockchain SDK"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/LimeChain/gosemble",children:"Gosemble"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/LimeChain/subsembly",children:"Subsembly"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/AcalaNetwork/parachain-utilities",children:"Parachain utilities"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/gantree-io/gantree-core",children:"Gantree"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/ideal-lab5",children:"Cryptex"})," \ud83d\udfe2"]}),(0,h.jsxs)(e.td,{children:["Tools to create parachains with other frameworks, like the ",(0,h.jsx)(e.a,{href:"https://github.com/cosmos/cosmos-sdk",children:"Cosmos SDK"})," or ",(0,h.jsx)(e.a,{href:"https://github.com/0xPolygon/cdk-validium-node",children:"Polygon CDK"})]})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Client Libraries"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/polkadot-api/polkadot-api",children:"Polkadot-API - Typescript"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/tien/reactive-dot",children:"Reactive DOT - Typescript"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/paritytech/capi",children:"Capi - Typescript"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/kodadot/packages/tree/main/sub-api",children:"sub-api"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/centrifuge/go-substrate-rpc-client",children:"Go"})," \ud83d\udfe1, ",(0,h.jsx)(e.a,{href:"https://github.com/usetech-llc/polkadot_api_dotnet",children:".Net"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/SubstrateGaming/Substrate.NET.API",children:".NET Standard 2.0"})," \ud83d\udfe1, ",(0,h.jsx)(e.a,{href:"https://github.com/SubstrateGaming/Substrate.NET.Toolchain",children:"Substrate .NET Toolchain"})," \ud83d\udfe1, ",(0,h.jsx)(e.a,{href:"https://github.com/usetech-llc/polkadot_api_cpp",children:"C++"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/finoabanking/substrate-c-tool",children:"C"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/airalab/hs-web3",children:"Haskell"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/polkadot-js/api",children:"Javascript"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/paritytech/substrate-api-sidecar",children:"Substrate API Sidecar - TypeScript"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/polkascan/py-substrate-interface",children:"Python"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/emeraldpay/polkaj",children:"Java (+ Android)"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/strategyobject/substrate-client-java",children:"Substrate Client Java"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/scs/substrate-api-client",children:"Rust SCS"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/paritytech/subxt",children:"Rust Parity (subxt)"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/philoniare/subxtpy",children:"subxtpy"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/trevor-crypto",children:"Rust pdotc"})," ",(0,h.jsx)(e.a,{href:"https://github.com/gmajor-encrypt/php-substrate-api",children:"PHP (gmajor-encrypt)"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/neha0921/substrate-interface-package",children:"PHP (neha0921)"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/paritytech/frontier",children:"RPC-Ethereum"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/tesseract-one/Substrate.swift",children:"Swift"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/NodleCode/substrate-client-kotlin",children:"Kotlin"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/sublabdev/substrate-client-kotlin",children:"substrate-client-kotlin"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/sublabdev/substrate-client-swift",children:"substrate-client-swift"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/rankanizer/polkadart",children:"Dart"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/polywrap/integrations",children:"Substrate Core Polywrapper"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/novasamatech/substrate-sdk-ios",children:"Substrate SDK iOS"})," \ud83d\udfe1, ",(0,h.jsx)(e.a,{href:"https://github.com/novasamatech/substrate-sdk-android",children:"Substrate SDK Android"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/dedotdev/dedot",children:"Dedot - Typescript"})," \ud83d\udfe2"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"RPC Gateway"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/AcalaNetwork/subway",children:"Subway"})," \u26aa"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Substrate Contract clients"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/patractlabs/go-patract",children:"PatractGo"})," \u26aa"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Easy Runtime Development"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/hack-ink/subalfred",children:"Subalfred"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/kaichaosun/substrate-stencil",children:"substrate-stencil"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/kaichaosun/play-substrate",children:"Play Substrate"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/substrate-developer-hub/substrate-node-template",children:"substrate-node-template"})," ","\u2754",", ",(0,h.jsx)(e.a,{href:"https://github.com/paritytech/substrate-playground",children:"Substrate Playground"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/LimeChain/as-substrate-runtime",children:"AssemblyScript Runtime Generation"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/clearloop/sup",children:"Substrate Package Manager"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/LimeChain/subsembly",children:"Subsembly: Framework for developing AssemblyScript Substrate Runtimes"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/bkchr/diener",children:"dependency diener"})," \u26aa"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"IDE Plugins"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/paritytech/vscode-substrate",children:"Substrate Marketplace VS Code Plugin"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/everstake/vscode-plugin-substrate",children:"VS Code Plugin"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/everstake/atom-plugin-substrate",children:"Atom Code Plugin"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/paritytech/zombienet-vscode-extension",children:"zombienet extension"})," \u26aa"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Runtime/Pallet Security"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/srlabs/substrate-runtime-fuzzer",children:"Substrate Runtime Fuzzer"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/shawntabrizi/substrate-toml-lint",children:"Substrate Toml Lint"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/kframework/wasm-semantics",children:"K specifications"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/ChainSecurity/polpatrol",children:"PolPatrol - Polkadot Runtime Checker"})," \u26aa"]}),(0,h.jsxs)(e.td,{children:["Automated Runtime checking tools, economic audit simulator such as ",(0,h.jsx)(e.a,{href:"https://gauntlet.network/",children:"gauntlet.network"})]})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Smart Contract Languages"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"#ink-smart-contracts",children:"ink!"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/ask-lang/ask",children:"Ask!"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/slickup/subscript",children:"Subscript"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/hyperledger-labs/solang",children:"Solang"})," \ud83d\udfe1, ",(0,h.jsx)(e.a,{href:"https://github.com/eigerco/pallet-move",children:"pallet-move"})," \ud83d\udfe1, ",(0,h.jsx)(e.a,{href:"https://github.com/pontem-network/sp-move",children:"Move VM Substrate"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/neatcoin/neatcoin",children:"Move smart contract by Neatcoin"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/pepyakin/substrate-seal-ebpf",children:"eBPF Contracts Hackathon"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/koute/polkavm",children:"PolkaVM"})," \ud83d\udfe2"]}),(0,h.jsx)(e.td,{children:"Functional Programming Languages, other languages with developed toolchains"})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Testing"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/paritytech/polkadot-introspector",children:"Polkadot introspector"})," \ud83d\udfe1, ",(0,h.jsx)(e.a,{href:"https://github.com/subdirectory/subshell",children:"Subshell"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/polytope-labs/sc-simnode",children:"substrate-simnode"})," \ud83d\udfe1, ",(0,h.jsx)(e.a,{href:"https://github.com/halva-suite/halva",children:"Halva"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/patractlabs/redspot",children:"Redspot"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/mixbytes/tank",children:"MixBytes Tank"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/NikVolf/sub-flood",children:"sub-flood"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/paritytech/substrate-debug-kit",children:"Substrate debug-kit"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/JesseAbram/asset_cli_tool",children:"Asset CLI tool"})," \ud83d\udfe1, ",(0,h.jsx)(e.a,{href:"https://github.com/JesseAbram/unfinished_testing_tool",children:"sub_crash"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/chevdor/subwasm",children:"subwasm"})," \ud83d\udfe1, ",(0,h.jsx)(e.a,{href:"https://github.com/ascjones/subsee",children:"subsee"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/w3f/polkadot-lab",children:"polkadot-lab"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/dwellir-public/rpc-perf/",children:"RPC-perf"})," \u26aa"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Static Analysis"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/KaiserKarel/substrace",children:"Substrace"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/simon-perriard/saft",children:"Static analyzer for Substrate FRAME's pallets"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/CoinFabrik/scout",children:"CoinFabrik Scout"})," \u26aa"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Testnet"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/paritytech/zombienet",children:"Zombienet"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/AcalaNetwork/chopsticks",children:"Chopsticks"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/paritytech/polkadot-launch",children:"Polkadot Launch"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/koute/polkadot-starship",children:"polkadot-starship"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/maxsam4/fork-off-substrate",children:"Fork off Substrate"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/paritytech/try-runtime-cli",children:"try-runtime-cli"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/open-web3-stack/parachain-launch",children:"Parachain Launch"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/Zeeve-App/larch",children:"Larch Zombienet GUI"})," \u26aa"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Benchmarking"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/substrate/utils/frame/benchmarking-cli",children:"Benchmarking CLI"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/paritytech/polkadot-stps",children:"Polkadot sTPS"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/0xekez/clockchain",children:"Clockchain"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/shawntabrizi/substrate-graph-benchmarks",children:"Substrate Graph Benchmarks"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/Nikhil-Desai-Talentica/substrate-node-template-benchmarking",children:"ink! & pallet benchmarking template"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/paritytech/smart-bench",children:"smart-bench"})," \u26aa"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Blockchain Indexing Engine"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/subsquid/squid-sdk",children:"Squid SDK"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/hybrid-explorer/hybrid-indexer",children:"Hybrid Indexer"})," \ud83d\udfe1, ",(0,h.jsx)(e.a,{href:"https://github.com/paritytech/substrate-archive",children:"Substrate Archive"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/usetech-llc/polkadot_psql_indexer",children:"PSQL Indexer"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/playzero/substrate-graph",children:"Substrate Graph"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/OnFinality-io/subql",children:"Subquery"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/p2p-org/polkadot-profit-transformer",children:"MBELT3"})," \ud83d\udfe1, ",(0,h.jsx)(e.a,{href:"https://github.com/kodadot/stick",children:"stick"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/Infra3-Network/hyperdot",children:"Hyperdot"})," \u26aa"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Blockchain/Event Monitoring"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/open-web3-stack/guardian",children:"Web3 Guardian"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/HugoByte/aurras-event-manager",children:"Aurras Event Manager"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/hicommonwealth/chain-events",children:"@commonwealth/chain-events"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/w3f-grants-archive/massbitchain",children:"Massbit"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/kianenigma/polkadot-basic-notification",children:"Polkadot Basic Notifications"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/sodazone/ocelloids",children:"Ocelloids"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/TrackingChains/TrackingChain",children:"Tracking Chain"})," \u26aa,"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Gaming"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/PolkadotPlay/Polkadot.Unity.SDK",children:"Polkadot SDK for Unity"})," \ud83d\udfe1, ",(0,h.jsx)(e.a,{href:"https://github.com/dodorare/crossbow",children:"Crossbow"})," \u26aa"]}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://assetstore.unity.com/packages/decentralization/infrastructure/polkadot-sdk-for-unity-273535",children:"Unity Asset Store"}),", ",(0,h.jsx)(e.a,{href:"https://amethyst.rs/",children:"Amethyst"})," + ",(0,h.jsx)(e.a,{href:"https://substrate.dev/",children:"Substrate"})]})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"No-code Platforms"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/NovaBloq/Bubble-Plugin-Polkadot.js",children:"EzCode's Polkadot.js plugin on Bubble.io"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/Blackprint/nodes-polkadot.js",children:"Blackprint Visual Programming Polkadot.js module"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/subrelay/interface",children:"SubRelay"})," \u26aa"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Wallets"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/tien/dot-connect",children:"DOT Connect"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/TalismanSociety/talisman-connect",children:"Talisman Connect"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/Koniverse/SubConnect",children:"SubWallet-SubConnect"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/nova-wallet/metadata-portal",children:"Metadata Portal"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/tesseract-one/Tesseract.rs",children:"Tesseract"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/w3f-grants-archive/walletconnect-v2-monorepo",children:"WalletConnect"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/BitGo/BitGoJS/tree/master",children:"BitGoJS"})," \ud83d\udfe2"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"XCM"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/paritytech/trappist",children:"Trappist"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/Moonsong-Labs/xcm-tools",children:"XCM-tools"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/itering/substrate-api-rpc",children:"XCM-tools Golang"})," \ud83d\udfe1,",(0,h.jsx)(e.a,{href:"https://github.com/paraspell/ui-v2",children:"ParaSpell"})," ","\u2754",", ",(0,h.jsx)(e.a,{href:"https://github.com/t3rn/xbi",children:"XBI"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/blockcoders/xcm-sdk",children:"XCM TS/JS SDK"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/XcmSend/app",children:"XCMSend"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/sodazone/xcm-monitoring/",children:"XCM Monitoring Server"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/moonbeam-foundation/xcm-sdk",children:"Moonbeam Foundation XCM-SDK"})," \ud83d\udfe2"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Other"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/paritytech/asset-transfer-api",children:"asset-transfer-api"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/paritytech/txwrapper-core",children:"txwrapper-core"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/open-web3-stack/open-web3.js",children:"open-web3 JS library"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/CycanTech/GVM-Bridge",children:"VM-Bridge"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/paritytech/srtool",children:"srtool"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/chevdor/srtool-cli",children:"srtool-cli"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/paritytech/substrate-tip-bot",children:"Substrate Tip Bot"})," \ud83d\udfe1, ",(0,h.jsx)(e.a,{href:"https://github.com/syntifi/ori",children:"ORI (Onchain Risk Intelligence)"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/albertov19/PolkaTools",children:"PolkaTools"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/paritytech/polkadot-scripts",children:"polkadot-scripts"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/virto-network/sube",children:"Sube"})," \ud83d\udfe1, ",(0,h.jsx)(e.a,{href:"https://github.com/CESSProject/data-store-sidecar",children:"data-store-sidecar"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/SugarFunge/sugarfunge-node",children:"SugarFunge"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/second-state/substrate-wasmedge",children:"substrate-wasmedge"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/eightfish-org/eightfish",children:"EightFish"})," \ud83d\udfe1, ",(0,h.jsx)(e.a,{href:"https://github.com/sandoxio/sandox",children:"Sandox"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/darwinia-network/apk-verifier/",children:"APK verifier"})," \u26aa"]}),(0,h.jsx)(e.td,{})]})]})]}),"\n",(0,h.jsx)(e.h3,{id:"ink-smart-contracts",children:"ink! Smart Contracts"}),"\n",(0,h.jsxs)(e.table,{children:[(0,h.jsx)(e.thead,{children:(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.th,{children:"Components"}),(0,h.jsx)(e.th,{children:"Existing projects"}),(0,h.jsx)(e.th,{children:"Potentially interesting projects"})]})}),(0,h.jsxs)(e.tbody,{children:[(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Core Libraries"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/paritytech/ink",children:"ink!"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/paritytech/cargo-contract",children:"cargo-contract"})," \ud83d\udfe1, ",(0,h.jsx)(e.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/substrate/frame/contracts",children:"pallet-contracts"})," \ud83d\udfe2"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Local Nodes"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/paritytech/substrate-contracts-node",children:"substrate-contracts-node"})," \ud83d\udfe1, ",(0,h.jsx)(e.a,{href:"https://github.com/swankyhub/swanky-cli",children:"Swanky"})," \u26aa"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Smart Contract Development"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/Cardinal-Cryptography/drink",children:"DRink!"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/paritytech/contracts-ui",children:"contracts-ui"})," \ud83d\udfe1, ",(0,h.jsx)(e.a,{href:"https://github.com/Smart-Beaver",children:"SmartBeaver"}),", ",(0,h.jsx)(e.a,{href:"https://github.com/h4nsu/openbrush-contracts",children:"OpenBrush"})," ","\u2754",", ",(0,h.jsx)(e.a,{href:"https://github.com/727-Ventures/sol2ink",children:"Sol2Ink"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/protofire/polkadot-contract-wizard",children:"Polkadot Contract Wizard"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/Cardinal-Cryptography/ink-wrapper",children:"ink-wrapper"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/paritytech/ink-playground",children:"ink-playground"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/blockchain-it-hr/ink-remix-plugin",children:"ink! Remix Plugin"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/standardweb3/signac/",children:"Signac"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/avirajkhare00/ink-boxes/",children:"ink!-boxes"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/avirajkhare00/ink-wizard",children:"ink!-smart-contract-wizard"})," \u26aa"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Security & Testing"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/paritytech/ink-waterfall",children:"ink! Waterfall"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/web3labs/ink-verifier-image",children:"Verifier Image for ink!"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/Brushfam/patron-backend/",children:"Patron"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/inkscopexyz/inkscope-fuzzer",children:"Inkscope Fuzzer"})," \ud83d\udfe1"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Frontend Development"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/scio-labs/inkathon",children:"ink!athon Boilerplate"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/paritytech/useink",children:"useink"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/scio-labs/use-inkathon",children:"useInkathon"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/subsquid/squid-sdk/tree/master/substrate/ink-typegen",children:"ink-typegen"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/Brushfam/typechain-polkadot",children:"Typechain Polkadot"})," \u26aa"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"IDE Plugins"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/ink-analyzer/ink-analyzer",children:"ink! Analyzer"})," \u26aa"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Bridges"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/dantenetwork/protocol-stack-for-ink",children:"Dante Protocol"})," \u26aa"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"DeFi"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/pendulum-chain/pendulum-ink-wrapper",children:"Pendulum-Ink-Wrapper"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/RottenKiwi/Panorama-Swap-INK-SC",children:"Panorama Swap"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/Juminstock/ink_bank",children:"ink_bank"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/realnimish/polkadot-amm",children:"Polkadot AMM"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/veradefi/defi",children:"Vera"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/nsure-tech/dot-contract",children:"Nsure Insurance"})," ","\u2754",", ",(0,h.jsx)(e.a,{href:"https://github.com/CycanTech/ELC",children:"Everlasting Cash"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/Coinversation/coinpro",children:"Coinversation"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/zenlinkpro/zenlink-dex-contract",children:"zenlink-dex-contract"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/ReserveLabs/AlgoCash",children:"AlgoCash"})," \ud83d\udfe2"]}),(0,h.jsx)(e.td,{children:"New seigniorage-style stable coins"})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Gaming"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/OpenEmojiBattler/open-emoji-battler",children:"Open Emoji Battler"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/WiktorStarczewski/newomega.polkadot/blob/master/newomega_delegator/newomega/newomega.rs",children:"NewOmega"})," \u26aa"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"DAO"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/SyncraDAO/modular-dao",children:"SyncraDAO"})," ","\u2754",", ",(0,h.jsx)(e.a,{href:"https://github.com/w3f-grants-archive/subDAO-contracts",children:"subDAO"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/RainbowcityFoundation/RainbowDAO-Protocol-Ink-milestone_1",children:"RainbowDAO"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/Mangoboxlabs/Mangoboxink",children:"MangoBox"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/Mangoboxlabs/MangoSaleV2",children:"MangoSale"})," \u26aa"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Identity/DID"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/TheDotflow",children:"Dotflow"})," \ud83d\udfe2"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Oracles"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/diadata-org/dia-wasm-oracle",children:"DIA WASM Oracle"})," \u26aa"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Spam Protection"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/prosopo/captcha",children:"Prosopo"})," \ud83d\udfe2"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Governance"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/AbaxFinance/Governance",children:"Abax Governance"})," \u26aa"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"NFT"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/ArtZero-io/Contracts",children:"ArtZero"})," \u26aa"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Other"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/pnsproject/ink-aa",children:"Polkadot Smart Account"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/swankyhub/magink-dapp",children:"magink"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/AstarNetwork/ink-test-contracts",children:"ink-test-contracts"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/agryaznov/candle-auction-ink",children:"Candle Auctions"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/SubDAO-Network/polkasign-contract",children:"polkasign-contract"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/bsn-si/ocex-cli",children:"OCEX"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/RoloiMoney/roloi-polkadot-w3f-grant",children:"Roloi"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/polkadrys/openPayroll",children:"OpenPayroll"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/InkSmartContract/BlockchainFoodOrder",children:"BlockchainFoodOrder"})," \u26aa"]}),(0,h.jsx)(e.td,{})]})]})]}),"\n",(0,h.jsx)(e.h3,{id:"chains-and-pallets",children:"Chains and Pallets"}),"\n",(0,h.jsxs)(e.table,{children:[(0,h.jsx)(e.thead,{children:(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.th,{children:"Components"}),(0,h.jsx)(e.th,{children:"Existing projects"}),(0,h.jsx)(e.th,{children:"Potentially interesting projects"})]})}),(0,h.jsxs)(e.tbody,{children:[(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Scalable Transactions"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/perun-network/perun-polkadot-pallet",children:"Perun channels"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/perun-network/perun-polkadot-demo",children:"CLI demo of Perun"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/AstarNetwork/Astar",children:"Astar"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/celer-network/cChannel-substrate",children:"Celer"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/GunClear/Gunero",children:"Gunclear"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/BCS-Labs/tpscore-etl-system",children:"TPScore"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/auguth/pocs",children:"proof-of-contract-stake"})," \u26aa"]}),(0,h.jsx)(e.td,{children:"roll-ups, DAG-based consensus mechanisms, side chains"})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Bridges"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/interlay/interbtc",children:"interBTC"})," \ud83d\udfe1, ",(0,h.jsx)(e.a,{href:"https://github.com/webb-tools/dkg-substrate",children:"DKG Substrate"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/sygmaprotocol/sygma-substrate-pallets",children:"Sygma"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/bifrost-finance/bifrost-eos-relay",children:"EOS by Bifrost"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/paritytech/parity-bridge",children:"POA - Substrate"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/akropolisio/POC-polkadai-bridge",children:"Substrate - Ethereum DAI Bridge"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/paritytech/substrate-bridge-relay",children:"Substrate - Substrate Bridge"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/chainx-org/ChainX",children:"BTC by ChainX"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/ChorusOne/wormhole-bridge",children:"Cosmos-Substrate bridge"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/octopus-network/substrate-ibc",children:"Substrate IBC Pallet"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/Snowfork/polkadot-ethereum",children:"Polkadot Ethereum Bridge"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/darwinia-network/darwinia",children:"Darwinia"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/pendulum-chain/spacewalk",children:"Spacewalk: a Stellar bridge"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/ChainSafe/filecoindot",children:"Filecoindot"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/centrifuge/axelar-cgp-substrate/tree/main",children:"Axelar-Substrate"})," \u26aa"]}),(0,h.jsx)(e.td,{children:"ZCash"})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Privacy"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/LayerXcom/zero-chain",children:"ZeroChain"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/xx-labs/xxchain",children:"xx network"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/Phala-Network/phala-blockchain",children:"pLibra (Phala Network)"})," \ud83d\udfe1, ",(0,h.jsx)(e.a,{href:"https://github.com/automata-network/automata",children:"Automata Network"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/zero-network/zero",children:"Zero Network"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/appliedblockchain/silentdata-polkadot",children:"Silent Data"})," \u26aa"]}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/anoma/masp",children:"Multi-Asset Shielded Pool (MASP)"})," , ",(0,h.jsx)(e.a,{href:"https://arxiv.org/pdf/2009.01020.pdf",children:"Zkay"}),", ",(0,h.jsx)(e.a,{href:"https://eprint.iacr.org/2018/962.pdf",children:"Zexe"})]})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"ZKP"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/zeropoolnetwork/zeropool-substrate-groth16-example",children:"ZeroPool"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/patractlabs/megaclite",children:"Megaclite"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/patractlabs/zkmega",children:"zkMega"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/AstarNetwork/plonk",children:"PLONK for Substrate"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/webb-tools/protocol-substrate",children:"Webb Anchor Protocol"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/bright/zk-snarks-with-substrate/",children:"zk-SNARKs tutorial"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/Zkvers/substrate-zk",children:"substrate-zk"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/w3f-grants-archive/hyperfridge-r0",children:"hyperfridge-r0"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/Cyborg-Network/cyborg-parachain/tree/master",children:"Cyborg Network"})," \ud83d\udfe2"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"TEE"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/Acurast/acurast-core",children:"Acurast"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/integritee-network/worker",children:"Integritee"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/scs/substraTEE",children:"substraTEE"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/wetee-dao/chain",children:"WeTEE"})," \u26aa"]}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/keysafe-protocol/keysafe-app",children:"Keysafe Protocol"})," \u26aa"]})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"DeFi"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/kapilsinha/privadex",children:"PrivaDEX"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/uinb/fusotao",children:"Fusotao"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/reef-defi/reef-chain",children:"Reef"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/Diora-Network/Diora",children:"Diora"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/pendulum-chain/pendulum",children:"Pendulum Chain"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/compound-finance/gateway",children:"Compound Gateway"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/parallel-finance/parallel",children:"Parallel Finance"})," \ud83d\udfe1, ",(0,h.jsx)(e.a,{href:"https://github.com/ChainSafe/PINT",children:"PINT"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/laminar-protocol/laminar-chain",children:"Laminar Chain"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/AcalaNetwork/Acala",children:"Acala"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/centrifuge/centrifuge-chain",children:"Centrifuge"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/stafiprotocol/stafi-node",children:"Stafi"})," \ud83d\udfe1, ",(0,h.jsx)(e.a,{href:"https://github.com/y2labs-0sh/definex",children:"Definex"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/OAXFoundation/parrot",children:"OAX Foundation"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/alexxuyang/substrate-dex",children:"Cybex"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/zenlinkpro/pallet-zenlink",children:"Zenlink"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/lsaether/pallet-swaps",children:"Swaps Pallet"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/Polkadex-Substrate/Polkadex/tree/master",children:"Polkadex"})," \ud83d\udfe1, ",(0,h.jsx)(e.a,{href:"https://github.com/subdarkdex/subdex-parachain",children:"SubDEX"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/galacticcouncil/hack.HydraDX-node",children:"HydraDX"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/apopiak/stablecoin",children:"Substrate Stablecoin"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/digitalnativeinc/standard-substrate",children:"Standard protocol"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/sora-xor/sora2-network",children:"Polkaswap"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/equilibrium-eosdt/equilibrium-curve-amm",children:"Curve AMM"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/konomi-network/cumulus/",children:"Konomi Network"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/nutsfinance/stable-asset",children:"Stable Asset"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/atscaletech/libra",children:"Libra Payment"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/mangata-finance/mangata-node",children:"Mangata"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/tidelabs/tidechain",children:"Tidechain"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/galacticcouncil/Basilisk-node",children:"Basilisk"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/PolymeshAssociation/Polymesh",children:"Polymesh"})," \ud83d\udfe2"]}),(0,h.jsxs)(e.td,{children:["DEX with privacy and confidentiality features such as those found in a ",(0,h.jsx)(e.a,{href:"https://en.wikipedia.org/wiki/Dark_pool",children:"dark pool"})]})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Smart contract chains"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/PureStake/moonbeam",children:"moonbeam"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/Magport/Magnet",children:"Magnet"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/Cardinal-Cryptography/aleph-node",children:"Aleph-node"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/hicommonwealth/edgeware-node",children:"Edgeware"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/ParaState/substrate-ssvm-node",children:"ParaState"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/gear-tech/gear",children:"gear"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/cennznet/cennznet",children:"CENNZnet"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/skyekiwi/skyekiwi-network",children:"SkyeKiwi"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/OAK-Foundation/OAK-blockchain",children:"OAK-blockchain"})," \ud83d\udfe1, ",(0,h.jsx)(e.a,{href:"https://github.com/web3labs/ice-substrate",children:"ICE Blockchain"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/OmniBTC/PSC",children:"Polkadot Smart Chain"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/keep-starknet-strange/madara",children:"Madara - Cairo/Starknet"})," \u26aa"]}),(0,h.jsx)(e.td,{children:"smart contract chains with novel security approaches, smart contract chains based on existing toolchains"})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Oracle"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/tellor-io/tellor-pallet",children:"Tellor"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/laminar-protocol/open-runtime-module-library/tree/master/oracle",children:"Laminar"})," \ud83d\udfe1, ",(0,h.jsx)(e.a,{href:"https://github.com/smartcontractkit/chainlink-polkadot",children:"Chainlink-polkadot"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/aresprotocols/ares",children:"Ares Protocol"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/Kylin-Network/kylin-node",children:"Kylin Network"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/interlay/interbtc-clients/tree/master/oracle",children:"interbtc-clients oracle"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/webb-tools/anonima",children:"Anonima"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/SaaS3-Foundation/dRuntime-fat",children:"SaaS3"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/tellor-io/tellor-parachain-contracts",children:"Tellor"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/diadata-org/bridgestate-ocw",children:"Bridgestate Oracle"})," \u26aa"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Identity/DID"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/parami-foundation/parami-blockchain",children:"Parami"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/litentry/litentry-parachain",children:"Litentry"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/substrate-developer-hub/pallet-did",children:"pallet-did"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/prasad-kumkar/dot-id",children:"dot-id"})," \u26aa"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"IoT"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/NodleCode/chain",children:"Nodle"})," \ud83d\udfe1, ",(0,h.jsx)(e.a,{href:"https://github.com/DataHighway-DHX/node",children:"MXC/DataHighway"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/peaqnetwork/peaq-network-node",children:"peaq-network-node"})," \ud83d\udfe2"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Verifiable Claims"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/KILTprotocol/kilt-node",children:"KILT"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/docknetwork/dock-substrate",children:"Dock"})," \ud83d\udfe2"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Supply chain"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/digicatapult/dscp-node",children:"DSCP Node"})," \ud83d\udfe2"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Health care"}),(0,h.jsx)(e.td,{}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Music Industry"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/Allfeat/Allfeat",children:"Allfeat Network"})," \ud83d\udfe2"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Data Availability"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/availproject/avail",children:"Avail"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/ZeroDAO/melodot",children:"Melodot"})," \u26aa"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Social Networking"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/frequency-chain/frequency",children:"Frequency"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/social-network/blockchain",children:"Social Network"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/dappforce/subsocial-parachain",children:"SubSocial"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/ZeroDAO/ZeroDAO-node",children:"ZeroDAO"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/myriadsocial/myriad-node",children:"Myriad Node"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/randombishop/wika_etl",children:"Wika Network"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/listenofficial/listen-parachain",children:"Listen"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/tribal-protocol/tribal_contract",children:"Tribal Protocol"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/rust-0x0/hex-space-protocol-substrate",children:"Five Degrees on Substrate"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/acuity-social/acuity-substrate",children:"Acuity Social"})," \ud83d\udfe2"]}),(0,h.jsx)(e.td,{children:"Private instant messenger that uses on-chain identity"})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Governance/DAO"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/aisland-dao/aisland-node/tree/main",children:"Aisland Node"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/hashed-io/hashed-substrate",children:"Hashed Network"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/sunshine-protocol/sunshine-bounty",children:"Sunshine DAO"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/NucleiStudio/governance-os",children:"Governance OS"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/idavollnetwork/idavoll",children:"Idavoll Network"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/DoraFactory/Substrate-Moloch-V2",children:"Substrate Moloch"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/Qrucial/QRUCIAL-DAO",children:"QRUCIAL-DAO"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/sctllabs/societal-node",children:"Societal"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/daos-org/daos",children:"DAOs"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/amiyatulu/shivarthu/",children:"Shivarthu"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/faterium",children:"Faterium"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/decentration/apps",children:"Supersig"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/deep-ink-ventures/genesis-dao-node",children:"GenesisDAO"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/dao-entrance/dao-entrance-node",children:"DAO Entrance"})," ","\u2754",", ",(0,h.jsx)(e.a,{href:"https://github.com/liberland/liberland_substrate",children:"Liberland"})," \ud83d\udfe1"]}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/consul/consul",children:"Consul"})," - Open Government and E-Participation Web Software"]})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Prediction Markets and Futarchy"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/zeitgeistpm/zeitgeist",children:"Zeitgeist"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/XPredictMarket/NodePredict",children:"X Predict Market"})," \u26aa"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Messaging"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/validitylabs/HOPR-PL-Substrate",children:"HOPR"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/chainify/nolik",children:"Nolik"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/Uke-Messaging/uke-pallet",children:"Uke"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/Belsoft-rs/diffychat-pallet",children:"Diffy Chat"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/fennelLabs/Fennel-Protocol",children:"Fennel Protocol"})," \u26aa"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"File Storage, Cloud"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/dappforce/subsocial-offchain",children:"Subsocial-Offchain"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/playproject-io/datdot",children:"DatDot"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/crustio/crust",children:"Crust Network"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/rs-ipfs/offchain-ipfs-manual",children:"offchain::ipfs"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/canyon-network/canyon",children:"Canyon Network"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/Cumulus2021/cess",children:"CESS"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/CESSProject/cess-proving-system",children:"CESS Proving Subsystem"})," ","\u2754",", ",(0,h.jsx)(e.a,{href:"https://github.com/ideal-lab5/iris",children:"Iris"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/CESSProject/fmd-cess",children:"fmd-cess"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/DanHenton/pocket-substrate/tree/ipfs-ocw",children:"IPFS Frame V3"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/threefoldtech/tfchain",children:"Threefold Chain"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/Apron-Network/apron-node",children:"Apron"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/TDSoftware/substrate-ipfs",children:"IPFS Utilities"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://gitlab.com/dinfra/dinfra",children:"DINFRA"})," \ud83d\udfe2"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Name Service"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/xaya/substrate-names",children:"Substrate Names"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/hskang9/substrate-name-service",children:"ENS on Substrate"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/pnsproject/pns-pallets",children:"PNS-Pallets"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/HeisenbergLin22/Faceless_milestone2_delivery",children:"Faceless"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/ff13dfly/Anchor",children:"Anchor"})," \u26aa"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Gaming"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/bit-country/Bit-Country-Blockchain",children:"Bit.country"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/SubGame-Network/subgame-network",children:"SubGame"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/playzero/subzero",children:"subzero"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/web3gamesofficial/web3games-blockchain",children:"Web3Games"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/ajuna-network/ajuna-pallets",children:"Ajuna Pallets"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/cryptoviet/gafi",children:"Gafi Network"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://gitlab.com/asylum-space/asylum-item-nft",children:"Asylum"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/3Dpass/3DP",children:"3DPass"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/polketio/toearnfun_flutter_app",children:"Polket"})," \u26aa"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Computation/AI"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/Deitos-Network/deitos-ip",children:"Deitos Network"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/DeepBrainChain/DeepBrainChain-MainChain",children:"DeepBrain Chain"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/anudit/cerebrum",children:"AI Infrastructure on Blockchain"})," \u26aa"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Enable specific use-cases"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/deep-ink-ventures/pallet_hookpoints",children:"pallet-hookpoints"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/airalab/substrate-node-robonomics",children:"Robonomics"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/UniversalDot/pallets",children:"UniversalDOT"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/EvercityEcosystem/evercity-chain",children:"Evercity Sustainable Finance Protocol"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/logion-network/logion-node",children:"logion"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/Me-Protocol/rusty-protocol-v0.1/",children:"Me Protocol"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/QSTN-US/Polkadot-QSTN-v1/",children:"QSTN"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/subcoin-project/subcoin",children:"Subcoin"})," \ud83d\udfe2"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"NFT"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/capsule-corp-ternoa/chain",children:"ternoa"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/danforbes/pallet-nft",children:"FRAME Pallet: NFTs for Substrate"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/UniqueNetwork/unique-chain",children:"Unique NFT Parachain"})," \ud83d\udfe1, ",(0,h.jsx)(e.a,{href:"https://github.com/DNFT-Team/dnft-substrate-node/tree/master/pallets",children:"DNFT"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/rmrk-team/rmrk-substrate",children:"RMRK-Substrate"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/Popular-Coding/nt-nft",children:"NT-NFTs"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/GreenLemonProtocol/dksap-polkadot",children:"Green Lemon"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/galacticcouncil/Basilisk-node",children:"Basilisk"})," \ud83d\udfe2"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Randomness"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/Cardinal-Cryptography/substrate/tree/randomness-beacon",children:"DKG and Randomness Beacon"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/random-meat/drand-substrate-client",children:"drand-substrate-client"})," \u26aa"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Licensing"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/anagolay/anagolay-chain",children:"Anagolay Network"})," ","\u2754"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Banking Integration"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/element36-io/ebics-java-service",children:"FIAT on-off-ramp"})," \u26aa"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Crowdfunding"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/ImbueNetwork/imbue",children:"Imbue Network"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/zhangjiannan/QFgrant",children:"Quadratic Funding pallet by Dora"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/OAK-Foundation/quadratic-funding-pallet/tree/master",children:"Quadratic Funding pallet by OAK"})," \u26aa"]}),(0,h.jsx)(e.td,{children:(0,h.jsx)(e.a,{href:"https://ethresear.ch/t/minimal-anti-collusion-infrastructure/5413",children:"Minimum Anti-Collusion Infrastructure (MACI)"})})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Collection of Pallets"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/open-web3-stack/open-runtime-module-library",children:"Substrate Open Runtime Module Library"})," \ud83d\udfe1, ",(0,h.jsx)(e.a,{href:"https://github.com/galacticcouncil/warehouse",children:"warehouse"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/InvArch/InvArch-Frames",children:"InvArch FRAME Pallet Library"})," \ud83d\udfe1"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Marketplaces"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/WowLabz/dot-marketplace-v2/tree/Phase3_Milestone3",children:"Dot Marketplace"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/hashed-io/hashed-substrate/tree/main/pallets/gated-marketplace",children:"Gated Marketplace"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/Popular-Coding/ventur",children:"Ventur"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/RELAI-Network/futur-protocol",children:"Futur Protocol"})," ","\u2754"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Carbon Credits"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/bitgreen/bitg-node",children:"BitGreen"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/EvercityEcosystem/carbon-assets",children:"Carbon Assets Pallet"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/SequesterChain/pallets",children:"Sequester Pallets"})," \u26aa"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"UTXO"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/Off-Narrative-Labs/Tuxedo",children:"Tuxedo"})," \u26aa"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Other"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/Moonsong-Labs/moonkit",children:"Moonkit"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/gautamdhameja/substrate-account-filter",children:"Substrate Account Filter"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/opentensor/subtensor",children:"Subtensor"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/AdMetaNetwork/admeta",children:"AdMeta"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/chocolatenetwork/chocolate-node",children:"Chocolate Node"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/virto-network/virto-node",children:"Virto Network"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/gautamdhameja/substrate-validator-set",children:"Substrate Validator Set"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/DEIPworld/deip-node",children:"DEIP"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/debionetwork/debio-node",children:"DeBio"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/mathwallet/MathChain",children:"MathChain"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/encointer/encointer-node",children:"encointer"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/grasslandnetwork/substrate_node",children:"Grassland"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/rusty-crewmates/substrate-tutorials",children:"Substrate-Tutorials"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/Fair-Squares/fair-squares",children:"Fair Squares"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/totem-tech/totem",children:"Totem Live Accounting"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/herou/EscrowPallet",children:"Escrow Pallet"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/NexTokenTech/TREX",children:"TREX"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/relationlabs/Relation-Graph",children:"Relation Graph"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/gertt/Invoice",children:"Decentralized Invoice"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/redstone-network/redstone-node",children:"Redstone Network"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/WunderbarNetwork/access-control",children:"Access Control Pallet"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/Omniverse-Web3-Labs/omniverse-swap/tree/web3-grant",children:"Omniverse DLT"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/polytope-labs/substrate-ismp",children:"ISMP"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/w3f/xcmp_prototype_playground",children:"XCMP"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/dhiway/cord",children:"CORD Chain"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/w3f/educhain",children:"Educhain"})," \ud83d\udfe2"]}),(0,h.jsx)(e.td,{children:"Decentralized review/reputation system"})]})]})]}),"\n",(0,h.jsx)(e.h3,{id:"host",children:"Host"}),"\n",(0,h.jsxs)(e.table,{children:[(0,h.jsx)(e.thead,{children:(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.th,{children:"Components"}),(0,h.jsx)(e.th,{children:"Existing projects"}),(0,h.jsx)(e.th,{children:"Potentially interesting projects"})]})}),(0,h.jsxs)(e.tbody,{children:[(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Rust"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/substrate",children:"Substrate"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/cumulus",children:"Cumulus"})," \ud83d\udfe2"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"C++"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/soramitsu/kagome",children:"Kagome"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/Zondax/mayon",children:"Mayon"})," \u26aa"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Go"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/ChainSafe/gossamer",children:"Gossamer"})," \ud83d\udfe2"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Java"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/LimeChain/Fruzhin",children:"Fruzhin"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/LimeChain/java-host-research",children:"Java Host Research"})," \u26aa"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"AssemblyScript"}),(0,h.jsx)(e.td,{}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Light Client"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/smol-dot/smoldot",children:"smoldot"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/paritytech/substrate-connect",children:"Substrate Connect"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/eqlabs/polkadot-light-client",children:"C++ Polkadot Light Client"})," \u26aa"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Testing"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/LimeChain/polkadot-conformance",children:"Polkadot Conformance"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/sigp/polkafuzz",children:"Polkafuzz"})," \u26aa"]}),(0,h.jsx)(e.td,{})]})]})]}),"\n",(0,h.jsx)(e.h3,{id:"network-maintenance-tools",children:"Network Maintenance Tools"}),"\n",(0,h.jsxs)(e.table,{children:[(0,h.jsx)(e.thead,{children:(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.th,{children:"Components"}),(0,h.jsx)(e.th,{children:"Existing projects"}),(0,h.jsx)(e.th,{children:"Potentially interesting projects"})]})}),(0,h.jsxs)(e.tbody,{children:[(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Secure validator setup"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/polkachu/polkadot-validator",children:"Polkadot Validation Node Ansible Setup"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/w3f/polkadot-validator-setup",children:"W3F Polkadot Validator Setup"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/Nexus2k/polkadot-ansible",children:"polkadot-ansible"})," \u26aa"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"High availability setup"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/luguslabs/archipel",children:"Archipel"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/protofire/polkadot-failover-mechanism",children:"Polkadot Failover Mechanism"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/Datagen-Project/Datagen-Substrate-Grant",children:"Datagen"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/bright/substrate-raft",children:"High Availability Validator Setup"})," \u26aa"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Load Balanced Endpoints"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/insight-w3f/terragrunt-polkadot",children:"terragrunt-polkadot"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/sudoblockio/substrate-meta",children:"Geometry Labs' Substrate Meta repo"})," \u26aa"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Deployment Tools"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/Blockdaemon/bpm-sdk",children:"Polkadot Package Manager"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/akropolisio/polkahub-monorepo",children:"PolkaHub"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/AvadoDServer/AVADO-DNP-Polkadot-custom",children:"Avado"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/w3f/polkadot-deployer",children:"Polkadot Deployer"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/for-parity-with-love/unified-collator-node-deployment",children:"Unified Collator Deployment"})," \u26aa"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Validator monitoring"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/turboflakes/one-t",children:"ONE-T"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/helikon-labs/subvt-backend",children:"SubVT"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/SimplyVC/panic",children:"P.A.N.I.C."})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/galacticcouncil/polkalert",children:"Polkalert"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/nodebreaker0-0/substrate/tree/prometheus_v0.3",children:"B-Harvest"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/stakezone/nmonpolkadot",children:"nmonpolkadot"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/ironoa/polkadot-k8s-monitor",children:"Polkadot-K8s-Monitor"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/w3f/polkadot-watcher",children:"Polkadot-Watcher"})," \ud83d\udfe1, ",(0,h.jsx)(e.a,{href:"https://github.com/helikon-labs/polkadot-kusama-1kv-telegram-bot",children:"1KV Telegram Bot"})," \u26aa"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Validator payout management"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/Colm3na/substrate-auto-payout",children:"Substrate validator auto payout"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/w3f/polkadot-payouts",children:"Polkadot Payouts"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/emostov/staking-payouts",children:"staking-payouts CLI"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/stakelink/substrate-payctl",children:"Payctl"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/turboflakes/crunch",children:"crunch"})," \ud83d\udfe1"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Staking Miner"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/paritytech/staking-miner-v2",children:"Staking Miner v2"})," \ud83d\udfe2"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Nominator Tools"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/miepsik/validators_selection",children:"Validator Selection"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/filippoweb3/polkanalyzer",children:"Polkanalyzer"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/filippoweb3/polkanalyzer-app",children:"Polkanalyzer-app"})," \u26aa"]}),(0,h.jsx)(e.td,{})]})]})]}),"\n",(0,h.jsx)(e.h3,{id:"signatures",children:"Signatures"}),"\n",(0,h.jsxs)(e.table,{children:[(0,h.jsx)(e.thead,{children:(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.th,{children:"Components"}),(0,h.jsx)(e.th,{children:"Existing projects"}),(0,h.jsx)(e.th,{children:"Potentially interesting projects"})]})}),(0,h.jsxs)(e.tbody,{children:[(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"SR25519"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/w3f/schnorrkel",children:"rust"})," \u26aa(contains partial bindings for C, JavaScript, and Python), ",(0,h.jsx)(e.a,{href:"https://github.com/gautamdhameja/sr25519-dotnet",children:".Net bindings"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/usetech-llc/sr25519",children:"C"})," \u26aa",(0,h.jsx)(e.em,{children:"(old)"}),", ",(0,h.jsx)(e.a,{href:"https://github.com/TerenceGe/sr25519-donna",children:"C"})," \u26aa",(0,h.jsx)(e.em,{children:"(new)"}),", ",(0,h.jsx)(e.a,{href:"https://github.com/soramitsu/soramitsu-sr25519-crust",children:"C/C++"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/usetech-llc/sr25519_dotnet",children:"C#"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/ChainSafe/go-schnorrkel",children:"Go"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/debuggor/schnorrkel-java",children:"java"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/gmajor-encrypt/sr25519-bindings",children:"PHP"})," \u26aa"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Signature Aggregation"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/w3f/apk-proofs",children:"apk-proofs"})," \u26aa"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Distributed key generation (DKG) or management"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/isislovecruft/frost-dalek",children:"keygen.rs"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/w3f-grants-archive/sword",children:"Secure Wallet Origin Distribution (SWORD)"})," \u26aa"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Validator HSMs"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/Zondax/buildroot-zondax",children:"Zondax Remote Signer"})," \u26aa"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"MPC"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/orochi-network/orochi-network.github.io",children:"Orochi Network"})," \ud83d\udfe2"]}),(0,h.jsx)(e.td,{})]})]})]}),"\n",(0,h.jsx)(e.h3,{id:"consensus",children:"Consensus"}),"\n",(0,h.jsxs)(e.table,{children:[(0,h.jsx)(e.thead,{children:(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.th,{children:"Components"}),(0,h.jsx)(e.th,{children:"Existing projects"}),(0,h.jsx)(e.th,{children:"Potentially interesting projects"})]})}),(0,h.jsxs)(e.tbody,{children:[(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"PoC"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/subspace/substrate",children:"Spartan"})," \u26aa"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"PoW"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/substrate/client/consensus/pow",children:"PoW consensus for Substrate"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/kulupu/kulupu/tree/master/pow",children:"RandomX"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/substrate-developer-hub/recipes/tree/master/consensus/sha3pow",children:"Sha3 PoW"})," \u26aa"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Block production"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/substrate/client/consensus/babe",children:"BABE"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/substrate/client/consensus/aura",children:"Aura"})," \ud83d\udfe2"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Finality"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/substrate/frame/grandpa",children:"GRANDPA"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/Cardinal-Cryptography/AlephBFT",children:"AlephBFT"})," \ud83d\udfe1"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Other"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/PureStake/nimbus",children:"Nimbus: Upgradeable consensus framework"})," \u26aa"]}),(0,h.jsx)(e.td,{})]})]})]}),"\n",(0,h.jsx)(e.h3,{id:"networking",children:"Networking"}),"\n",(0,h.jsxs)(e.table,{children:[(0,h.jsx)(e.thead,{children:(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.th,{children:"Components"}),(0,h.jsx)(e.th,{children:"Existing projects"}),(0,h.jsx)(e.th,{children:"Potentially interesting projects"})]})}),(0,h.jsxs)(e.tbody,{children:[(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"SCALE Codec"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/paritytech/parity-scale-codec",children:"Rust"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/paritytech/parity-scale-codec-ts",children:"TypeScript"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/polkascan/py-scale-codec",children:"Python"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/ChainSafe/gossamer/tree/development/pkg/scale/",children:"Golang Chainsafe"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/itering/scale.go",children:"Golang Itering"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/MatthewDarnell/cScale",children:"C"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/soramitsu/scale-codec-cpp",children:"C++"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/polkadot-js/api",children:"JavaScript"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/LimeChain/as-scale-codec",children:"AssemblyScript"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/airalab/hs-web3/tree/master/packages/scale/src/Codec",children:"Haskell"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/emeraldpay/polkaj",children:"Java"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/itering/scale.rb",children:"Ruby"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/nbltrust/dart-scale-codec",children:"Dart"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/tesseract-one/swift-scale-codec",children:"Swift"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/sublabdev/scale-codec-swift",children:"scale-codec-swift"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/sublabdev/scale-codec-kotlin",children:"scale-codec-kotlin"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/gmajor-encrypt/php-scale-codec",children:"PHP"})," \ud83d\udfe1, ",(0,h.jsx)(e.a,{href:"https://github.com/soramitsu/scale-codec-js-library",children:"JavaScript by Soramitsu"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/gmajor-encrypt/scale-codec-comparator",children:"Scale Codec Comparator"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/darwinia-network/darwinia-messages-sol/blob/master/contracts/utils/contracts/ScaleCodec.sol",children:"ScaleCodec.sol by Darwinia"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/Snowfork/snowbridge/blob/main/core/packages/contracts/contracts/ScaleCodec.sol",children:"ScaleCodec.sol by Snowfork"})," \ud83d\udfe2, ",(0,h.jsx)(e.a,{href:"https://github.com/arijitAD/dotscale",children:"Dotscale"})," \u26aa"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Networking Framework"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/libp2p/libp2p",children:"libp2p"})," \ud83d\udfe1",(0,h.jsx)(e.a,{href:"https://github.com/algorealmInc/SwarmNL",children:"SwarmNL"})," \u26aa"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"DHT Crawler"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/atredispartners/dht-crawler-polkadot",children:"Go"})," \u26aa, ",(0,h.jsx)(e.a,{href:"https://github.com/emeraldpay/polkabot",children:"Kotlin"})," \u26aa"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"RPC Tor-like access"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/Evanesco-Labs/WhiteNoise.rs",children:"WhiteNoise"})," \u26aa"]}),(0,h.jsx)(e.td,{})]})]})]}),"\n",(0,h.jsx)(e.h3,{id:"primitives",children:"Primitives"}),"\n",(0,h.jsxs)(e.table,{children:[(0,h.jsx)(e.thead,{children:(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.th,{children:"Components"}),(0,h.jsx)(e.th,{children:"Existing projects"}),(0,h.jsx)(e.th,{children:"Potentially interesting projects"})]})}),(0,h.jsxs)(e.tbody,{children:[(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Storage"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/frisitano/merkle-tree-db",children:"Merkle Tree DB"})," \u26aa"]}),(0,h.jsx)(e.td,{})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Merkle Proofs"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.a,{href:"https://github.com/polytope-labs/solidity-merkle-trees",children:"Solidity Trie Verifier"})," \ud83d\udfe1"]}),(0,h.jsx)(e.td,{})]})]})]}),"\n",(0,h.jsx)(e.h2,{id:"contributing",children:"Contributing"}),"\n",(0,h.jsx)(e.p,{children:"Pull requests, issues, or other contributions from the community are encouraged! You can not only\nadd specific projects, but also potentially interesting fields/areas which are currently missing in\nthe tech stack."}),"\n",(0,h.jsx)(e.p,{children:":heavy_exclamation_mark: All technologies listed above need to be open-source. Ideally, the links\nlead directly to the code."}),"\n",(0,h.jsx)(e.p,{children:(0,h.jsxs)(e.em,{children:["Note: You will need a GitHub account to suggest changes or open issues. If you do not have one, you\nmay ",(0,h.jsx)(e.a,{href:"https://github.com/join",children:"sign up for free"}),"."]})})]})}function d(t={}){const{wrapper:e}={...(0,i.R)(),...t.components};return e?(0,h.jsx)(e,{...t,children:(0,h.jsx)(l,{...t})}):l(t)}},28453:(t,e,s)=>{s.d(e,{R:()=>a,x:()=>n});var r=s(96540);const h={},i=r.createContext(h);function a(t){const e=r.useContext(i);return r.useMemo((function(){return"function"==typeof t?t(e):{...e,...t}}),[e,t])}function n(t){let e;return e=t.disableParentContext?"function"==typeof t.components?t.components(h):t.components||h:a(t.components),r.createElement(i.Provider,{value:e},t.children)}}}]); \ No newline at end of file diff --git a/assets/js/cda87995.208431cf.js b/assets/js/cda87995.208431cf.js new file mode 100644 index 000000000000..1d0cd24fb644 --- /dev/null +++ b/assets/js/cda87995.208431cf.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1711],{61925:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>l,contentTitle:()=>r,default:()=>d,frontMatter:()=>a,metadata:()=>i,toc:()=>h});const i=JSON.parse('{"id":"build/build-tools-index","title":"Tool Index","description":"Reference point for a list of tools to support your development.","source":"@site/../docs/build/build-tools-index.md","sourceDirName":"build","slug":"/build-tools-index","permalink":"/docs/build-tools-index","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/build/build-tools-index.md","tags":[],"version":"current","lastUpdatedBy":"github-actions[bot]","lastUpdatedAt":1726484242000,"frontMatter":{"id":"build-tools-index","title":"Tool Index","sidebar_label":"Tool Index","description":"Reference point for a list of tools to support your development.","keywords":["tools","clients","libraries","explorers","monitor","data","SCALE"],"slug":"../build-tools-index"},"sidebar":"docs","previous":{"title":"Opening HRMP Channels","permalink":"/docs/build-hrmp-channels"},"next":{"title":"Explorer, Data, & Indexing Tools","permalink":"/docs/build-data"}}');var n=s(74848),o=s(28453);const a={id:"build-tools-index",title:"Tool Index",sidebar_label:"Tool Index",description:"Reference point for a list of tools to support your development.",keywords:["tools","clients","libraries","explorers","monitor","data","SCALE"],slug:"../build-tools-index"},r=void 0,l={},h=[{value:"Wallets",id:"wallets",level:2},{value:"Block Explorers",id:"block-explorers",level:2},{value:"Blockchain Analytics",id:"blockchain-analytics",level:2},{value:"Network Monitoring & Reporting",id:"network-monitoring--reporting",level:2},{value:"Clients",id:"clients",level:2},{value:"Tools",id:"tools",level:2},{value:"IDEs",id:"ides",level:2},{value:"UI",id:"ui",level:2},{value:"Libraries",id:"libraries",level:2},{value:"Polkadot-JS API",id:"polkadot-js-api",level:3},{value:"Alternative Libraries",id:"alternative-libraries",level:3},{value:"CLI Tools",id:"cli-tools",level:3},{value:"WASM",id:"wasm",level:3},{value:"RPC and API Tools",id:"rpc-and-api-tools",level:3},{value:"GAME ENGINE SDK",id:"game-engine-sdk",level:3},{value:"SCALE Codec",id:"scale-codec",level:3},{value:"Data Crawling and Conversion",id:"data-crawling-and-conversion",level:2}];function c(e){const t={a:"a",code:"code",h2:"h2",h3:"h3",li:"li",p:"p",ul:"ul",...(0,o.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(t.p,{children:["Here, we provide a list of tools available for your development needs. They are sorted by context.\nIf you're actively maintaining a tool that might be useful to other Polkadot, Kusama or Substrate\ndevelopers, feel free to ",(0,n.jsx)(t.a,{href:"/docs/contributing",children:"add it in"}),"."]}),"\n",(0,n.jsx)(t.h2,{id:"wallets",children:"Wallets"}),"\n",(0,n.jsxs)(t.p,{children:["Please see the ",(0,n.jsx)(t.a,{href:"https://polkadot.network/ecosystem/wallets/",children:"Wallets"})," page on the official website\nor the ",(0,n.jsx)(t.a,{href:"/docs/wallets-and-extensions",children:"Wallets"})," page on the Wiki for detailed information."]}),"\n",(0,n.jsx)(t.h2,{id:"block-explorers",children:"Block Explorers"}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/explorer",children:"Polkadot-JS Apps Explorer"})," - Polkadot dashboard block\nexplorer. Supports dozens of other networks, including Kusama, Westend, and other remote or local\nendpoints. ",(0,n.jsx)(t.a,{href:"https://cloudflare-ipfs.com/ipns/dotapps.io",children:"Access via IPFS"})]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://subscan.io",children:"Subscan"})," - Blockchain explorer for Substrate chains.\n",(0,n.jsx)(t.a,{href:"https://github.com/itering/subscan-essentials",children:"Repo"}),"."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://3xpl.com/polkadot",children:"3xpl.com"})," - Fastest ad-free universal block explorer and JSON API with\nPolkadot support."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://blockchair.com/polkadot",children:"Blockchair.com"})," - Universal blockchain explorer and search\nengine with Polkadot support."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://www.statescan.io/",children:"Statescan.io"})," - Polkadot & Kusama Blockchain explorer."]}),"\n"]}),"\n",(0,n.jsx)(t.h2,{id:"blockchain-analytics",children:"Blockchain Analytics"}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://dune.com/substrate",children:"Dune Analytics"})," - Community dashboards and analytics"]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://dashboards.data.paritytech.io/",children:"DotLake"})," - data visualizations for the Polkadot Ecosystem\nmaintained by Parity"]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://app.web3go.xyz/#/",children:"Web3go"})," - An open platform for everyone to play with, curate and\nvisualize multi-blockchain data"]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://polkawatch.app/",children:"Polkawatch"})," - Polkadot Decentralization Analytics"]}),"\n"]}),"\n",(0,n.jsx)(t.h2,{id:"network-monitoring--reporting",children:"Network Monitoring & Reporting"}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://telemetry.polkadot.io/",children:"Polkadot Telemetry Service"})," - Network information including what\nnodes are running the chain, what software versions they are running, sync status, and location."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://gitlab.com/Polkabot",children:"Polkabot"})," - Polkadot network monitoring and reporting using Matrix\n(Riot / Element) chat. Users may create custom bot plugins.\n",(0,n.jsx)(t.a,{href:"https://medium.com/polkadot-network/polkabot-a3dba18c20c8",children:"Blogpost"}),"."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://github.com/Ryabina-io/substratebot",children:"Ryabina's Telegram Bot"})," - A Telegram bot for\nmonitoring on-chain events of Substrate chains.\n",(0,n.jsx)(t.a,{href:"https://gitlab.com/Polkabot/polkabot",children:"GitHub Repository"}),"\n",(0,n.jsx)(t.a,{href:"https://github.com/Colm3na/polkastats-v2/",children:"GitHub Repository"}),"."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://github.com/SimplyVC/panic",children:"Panic"})," - A node monitoring and alert server for validators."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://github.com/open-web3-stack/guardian",children:"OpenWeb3/Guardian"})," - A CLI tool and JS library to\nmonitor on chain states and events."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://github.com/sodazone/ocelloids",children:"Ocelloids SDK"})," - Typescript SDK for multi-chain monitoring\nthat supports domain-specific logic for different pallets."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://github.com/ArthurHoeke/cyclops/",children:"Cyclops Dashboard"})," - a validator dashboard application\nthat helps Polkadot network validators keep track of all their validators, their staking rewards,\nand performance."]}),"\n"]}),"\n",(0,n.jsx)(t.h2,{id:"clients",children:"Clients"}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/polkadot",children:"Polkadot"})," - The original Rust\nimplementation of the Polkadot Host."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://github.com/soramitsu/kagome",children:"Kagome"})," - A C++ Polkadot implementation of the Polkadot Host\ndeveloped by ",(0,n.jsx)(t.a,{href:"https://github.com/soramitsu",children:"Soramitsu"}),"."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://github.com/ChainSafe/gossamer",children:"Gossamer"})," - A Go implementation of the Polkadot Host\ndeveloped by ",(0,n.jsx)(t.a,{href:"https://chainsafe.io/",children:"ChainSafe Systems"}),"."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://paritytech.github.io/txwrapper-core/",children:"TxWrapper-core"})," - Helper functions for offline\ntransaction generation."]}),"\n"]}),"\n",(0,n.jsx)(t.h2,{id:"tools",children:"Tools"}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/substrate",children:"Substrate"})," - Blockchain\ndevelopment platform written in Rust. The Rust version of the Polkadot Host is being built with\nSubstrate."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://docs.substrate.io/",children:"Substrate Docs"})," - Comprehensive documentation and tutorials for\nbuilding a blockchain using Substrate."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://github.com/paritytech/vscode-substrate",children:"Substrate VSCode plugin (deprecated)"}),"."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://github.com/paritytech/substrate-debug-kit",children:"Substrate Debug Kit (deprecated)"})," - A\ncollection of debug tools and libraries around substrate chains. Includes tools to calculate NPoS\nelections offline, disk usage monitoring, test templates against chain state and other\npallet-specific helper."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://github.com/r0gue-io/pop-cli",children:"POP CLI"})," - An all-in-one tool for Polkadot development."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://github.com/paritytech/zombienet",children:"Zombienet"})," - Testing framework for Substrate based\nblockchains"]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://crates.io/crates/diener",children:"Diener"})," - A tool for easy changing of Polkadot or Substrate\ndependency versions."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://github.com/shawntabrizi/polkadot-launch",children:"Polkadot Launch (deprecated)"})," - A tool to easily\nlaunch custom local parachain-enabled Polkadot versions."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://github.com/maxsam4/fork-off-substrate",children:"Fork-off Substrate"})," - Copies the state of an\nexisting chain into your local version and lets you further experiment on it."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://www.chevdor.com/tags/srtool/",children:"srtool"})," - A tool for verifying runtime versions against\non-chain proposal hashes."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://github.com/nikvolf/sub-bench",children:"sub-bench"})," - A tool to spam your node with transactions for\nthe sake of benchmarking."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://github.com/danforbes/substrate-devhub-utils",children:"substrate-devhub-utils"})," - A set of\nJavaScript utilities making life with Substrate a little easier."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://github.com/NikVolf/sub-flood",children:"sub-flood (archived)"})," - A tool to benchmark Substrate by\nflooding it with requests."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://github.com/Apillon",children:"Apillon"})," - A Web3 development platform with a complete toolbox and\naccess to Polkadot\u2019s technology stack."]}),"\n"]}),"\n",(0,n.jsx)(t.h2,{id:"ides",children:"IDEs"}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://chainide.gitbook.io/chainide-english-1/ethereum-ide-1/13.-astar-ide",children:"Astar IDE"})," by\n",(0,n.jsx)(t.a,{href:"https://chainide.com/",children:"Chain IDE"})," is a tool for lightning-speed smart contracts and dApp\ndevelopment for ",(0,n.jsx)(t.a,{href:"https://chainide.com/s/createTempProject/astar-wasm?language=en",children:"Wasm"})," and\n",(0,n.jsx)(t.a,{href:"https://chainide.com/s/createTempProject/astar-evm?language=en",children:"EVM"}),"."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://github.com/sandoxio/sandox",children:"Sandox IDE"})," is an integrated development environment (IDE)\nwith tools for building in the Polkadot environment. Currently helpful for creating applications\nin JS."]}),"\n"]}),"\n",(0,n.jsx)(t.h2,{id:"ui",children:"UI"}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://github.com/Swader/polkadash",children:"Polkadash"})," - VueJS-based starter kit for custom user\ninterfaces for Substrate chains."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://github.com/polkadot-js/apps",children:"Polkadot JS Apps UI"})," - Repository of the\n",(0,n.jsx)(t.a,{href:"https://polkadot.js.org/apps",children:"polkadot.js.org/apps"})," UI."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://github.com/substrate-developer-hub/substrate-front-end-template",children:"Substrate Front-end Template"})," -\nReactJS-based starter UI for custom user interfaces for Substrate chains."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://github.com/polkadot-js/extension",children:"Polkadot JS Browser Extension"})," - Key management in a\nChrome extension."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://polkadot-ui.info/",children:"Polkadot UI"})," - A library and platform for developing and publishing\nassets for Polkadot dapps."]}),"\n"]}),"\n",(0,n.jsx)(t.h2,{id:"libraries",children:"Libraries"}),"\n",(0,n.jsx)(t.h3,{id:"polkadot-js-api",children:"Polkadot-JS API"}),"\n",(0,n.jsxs)(t.p,{children:["The Polkadot-JS API provides various utility functions that are used across all projects in the\n",(0,n.jsx)(t.code,{children:"@polkadot"})," namespace and is split into a number of internal utility packages. The documentation and\nusage instructions are provided at ",(0,n.jsx)(t.a,{href:"https://polkadot.js.org/docs/",children:"Polkadot-JS API Documentation"}),"."]}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://polkadot.js.org/docs/keyring",children:"@polkadot/keyring"})," This allows you to create and load\naccounts in JavaScript. It is helpful for creating wallets or any application that will require\nthe user to write to chain. ",(0,n.jsx)(t.a,{href:"https://polkadot.js.org/docs/keyring/start/create",children:"Examples"}),"."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://polkadot.js.org/docs/keyring/start/install#other-dependencies",children:"@polkadot/util"})," Utility\nfunctions like checking if a string is hex-encoded."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://polkadot.js.org/docs/util-crypto/",children:"@polkadot/util-crypto"})," Useful cryptographic utilities\nfor developing with Polkadot."]}),"\n"]}),"\n",(0,n.jsx)(t.h3,{id:"alternative-libraries",children:"Alternative Libraries"}),"\n",(0,n.jsx)(t.p,{children:"The following libraries/SDKs allow for interfacing with a Substrate node in other languages:"}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsx)(t.li,{children:(0,n.jsx)(t.a,{href:"https://github.com/polkascan/py-substrate-interface",children:"Python Library by Polkascan"})}),"\n",(0,n.jsx)(t.li,{children:(0,n.jsx)(t.a,{href:"https://github.com/centrifuge/go-substrate-rpc-client",children:"Go Library by Centrifuge"})}),"\n",(0,n.jsx)(t.li,{children:(0,n.jsx)(t.a,{href:"https://github.com/strategyobject/substrate-client-java",children:"Java Library by StrategyObject"})}),"\n",(0,n.jsx)(t.li,{children:(0,n.jsx)(t.a,{href:"https://github.com/soramitsu/fearless-utils-iOS",children:"Fearless Utils iOS Swift SDK"})}),"\n",(0,n.jsx)(t.li,{children:(0,n.jsx)(t.a,{href:"https://github.com/nova-wallet/substrate-sdk-ios",children:"Nova Wallet iOS/Swift Substrate SDK"})}),"\n",(0,n.jsx)(t.li,{children:(0,n.jsx)(t.a,{href:"https://github.com/soramitsu/fearless-utils-Android",children:"Kotlin SDK"})}),"\n",(0,n.jsx)(t.li,{children:(0,n.jsx)(t.a,{href:"https://github.com/leonardocustodio/polkadart",children:"Dart/Flutter Library"})}),"\n"]}),"\n",(0,n.jsx)(t.h3,{id:"cli-tools",children:"CLI Tools"}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://github.com/polkadot-js/tools/tree/master/packages/api-cli",children:"@polkadot/api-cli"})," Command\nline interface for the polkadot API. ",(0,n.jsx)(t.a,{href:"https://polkadot.js.org/docs/api/start",children:"Documentation"}),"."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://github.com/polkadot-js/tools/tree/master/packages/monitor-rpc",children:"@polkadot/monitor-rpc"})," An\nRPC monitor for Polkadot. See the RPC tools below for additional information."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://github.com/polkadot-js/tools/tree/master/packages/signer-cli",children:"@polkadot/signer-cli"})," A\nTool to construct, sign, and broadcast transactions. Signing can be done offline."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://github.com/usetech-llc/polkadot_api_cpp",children:"Polkadot API Cpp"})," - A \u0421++ API for Polkadot, can\nbuild ",(0,n.jsx)(t.code,{children:"clip"}),", a command line tool."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://docs.substrate.io/reference/command-line-tools/subkey/",children:"Subkey"})," - Command line utility\nfor generating and inspecting key pairs."]}),"\n"]}),"\n",(0,n.jsx)(t.h3,{id:"wasm",children:"WASM"}),"\n",(0,n.jsx)(t.p,{children:"WebAssembly related tools and projects."}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://github.com/paritytech/ink/",children:"ink!"})," - An eDSL to write WebAssembly based smart contracts\nusing the Rust programming language."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://github.com/paritytech/parity-wasm",children:"parity-wasm"})," - Low-level WebAssembly format library."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://github.com/paritytech/wasm-utils",children:"wasm-utils"})," - Collection of WebAssembly utilities used\nin pwasm-ethereum and substrate contract development."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://github.com/paritytech/wasmi",children:"wasmi"})," - A WebAssembly interpreter conceived as a component\nof parity-ethereum (Ethereum-like contracts in Wasm) and Substrate."]}),"\n"]}),"\n",(0,n.jsx)(t.h3,{id:"rpc-and-api-tools",children:"RPC and API Tools"}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://github.com/polkadot-js/api/tree/master/packages/rpc-provider",children:"@polkadot/api/rpc-provider"}),"\nDemonstrates how the JS tools interact with the node over RPC."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://polkadot.js.org/docs/substrate/rpc",children:"RPC documentation"})," - Documentation of Substrate RPC\nmethods."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://github.com/SimplyVC/polkadot_api_server",children:"Polkadot API Server by SimplyVC"})," - A wrapper\naround the Polkadot API which makes it easier to make Polkadot API calls from any programming\nlanguage."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://github.com/itering/substrate-api-rpc",children:"Go: Subscan API"})," - Go API for Polkadot."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://github.com/usetech-llc/polkadot_api_cpp",children:"C++ Polkadot API"})," - \u0421++ API for Polkadot."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://github.com/SubstrateGaming/Substrate.NET.API",children:".NET Polkadot/Substrate API"})," - Core\nFramework for Substrate in .NET and connect to nodes."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://github.com/SubstrateGaming/Substrate.NET.Toolchain",children:".NET Toolchain Polkadot/Substrate API"})," -\nToolchain to generate Polkadot/Substrate API & Service Layer for .NET."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://github.com/usetech-llc/polkadot_api_dotnet",children:".NET Polkadot API"})," - Polkadot Substrate API\nfor .NET."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://github.com/polkascan/py-substrate-interface",children:"Python Polkadot API"})," - Polkadot library for\nPython."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://github.com/centrifuge/go-substrate-rpc-client/",children:"GSRPC"})," - Substrate RPC client in Go,\na.k.a. GSRPC."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://github.com/paritytech/substrate-api-sidecar",children:"Substrate API Sidecar"})," - An HTTP wrapper for\nSubstrate, abstracting some complex RPC calls into simple REST calls."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://github.com/paritytech/substrate-subxt",children:"Subxt"})," - A Rust library to submit extrinsics to a\nSubstrate node via RPC."]}),"\n"]}),"\n",(0,n.jsx)(t.h3,{id:"game-engine-sdk",children:"GAME ENGINE SDK"}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://github.com/PolkadotPlay/Polkadot.Unity.SDK",children:"Polkadot SDK for Unity"})," - A powerful toolkit\nthat integrates substrate seamless into Unity projects.\n(",(0,n.jsx)(t.a,{href:"https://assetstore.unity.com/packages/decentralization/infrastructure/polkadot-sdk-for-unity-273535",children:"AssetStore"}),",\n",(0,n.jsx)(t.a,{href:"https://github.com/PolkadotPlay/Polkadot.Unity.SDK/wiki",children:"wiki"}),")."]}),"\n"]}),"\n",(0,n.jsx)(t.h3,{id:"scale-codec",children:"SCALE Codec"}),"\n",(0,n.jsx)(t.p,{children:"The SCALE (Simple Concatenated Aggregate Little-Endian) Codec is a lightweight, efficient, binary\nserialization and deserialization codec."}),"\n",(0,n.jsx)(t.p,{children:"It is designed for high-performance, copy-free encoding and decoding of data in resource-constrained\nexecution contexts, such as the Substrate runtime. It is not self-describing in any way and assumes\nthe decoding context has all type knowledge about the encoded data."}),"\n",(0,n.jsx)(t.p,{children:"It is used in almost all communication to/from Substrate nodes, so implementations in different\nlanguages exist:"}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://github.com/substrate-developer-hub/awesome-substrate#scale-codec",children:"Substrate Awesome"}),"\nmaintains a list of SCALE codex implementations."]}),"\n"]}),"\n",(0,n.jsx)(t.h2,{id:"data-crawling-and-conversion",children:"Data Crawling and Conversion"}),"\n",(0,n.jsx)(t.p,{children:"The following tools help you extract and structure data from a Substrate node."}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://github.com/paritytech/substrate-archive",children:"Parity's Substrate Archive"})," - Can be run\nalongside a Substrate node to archive all blocks, state, and extrinsic data into PostgreSQL\ndatabase."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://github.com/subsquid/squid-archive-setup",children:"Subsquid Archives"})," - Generate a GraphQL database\nfrom a Substrate chain's data with rich filtering and querying capabilities. The data (events,\nextrinsics, blocks) for most parachains is readily available though public archive GraphQL\nendpoints, kept in\n",(0,n.jsx)(t.a,{href:"https://github.com/subsquid/archive-registry/blob/main/archives.json",children:"Squid Archive Registry"})]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://github.com/TheGoldenEye/polka-store",children:"Polka-store"})," - A tool which scans a Substrate chain\nand stores balance-relevant transactions in an SQLite database."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://github.com/playzero/substrate-graph",children:"Substrate-graph"})," - A compact indexer for Substrate\nbased nodes providing a GraphQL interface."]}),"\n"]})]})}function d(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(c,{...e})}):c(e)}},28453:(e,t,s)=>{s.d(t,{R:()=>a,x:()=>r});var i=s(96540);const n={},o=i.createContext(n);function a(e){const t=i.useContext(o);return i.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:a(e.components),i.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/cda87995.5a2e3b6d.js b/assets/js/cda87995.5a2e3b6d.js deleted file mode 100644 index 31ca16602a17..000000000000 --- a/assets/js/cda87995.5a2e3b6d.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1711],{24233:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>l,contentTitle:()=>a,default:()=>d,frontMatter:()=>o,metadata:()=>r,toc:()=>h});var i=s(74848),n=s(28453);const o={id:"build-tools-index",title:"Tool Index",sidebar_label:"Tool Index",description:"Reference point for a list of tools to support your development.",keywords:["tools","clients","libraries","explorers","monitor","data","SCALE"],slug:"../build-tools-index"},a=void 0,r={id:"build/build-tools-index",title:"Tool Index",description:"Reference point for a list of tools to support your development.",source:"@site/../docs/build/build-tools-index.md",sourceDirName:"build",slug:"/build-tools-index",permalink:"/docs/build-tools-index",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/build/build-tools-index.md",tags:[],version:"current",lastUpdatedBy:"github-actions[bot]",lastUpdatedAt:1726484242e3,frontMatter:{id:"build-tools-index",title:"Tool Index",sidebar_label:"Tool Index",description:"Reference point for a list of tools to support your development.",keywords:["tools","clients","libraries","explorers","monitor","data","SCALE"],slug:"../build-tools-index"},sidebar:"docs",previous:{title:"Opening HRMP Channels",permalink:"/docs/build-hrmp-channels"},next:{title:"Explorer, Data, & Indexing Tools",permalink:"/docs/build-data"}},l={},h=[{value:"Wallets",id:"wallets",level:2},{value:"Block Explorers",id:"block-explorers",level:2},{value:"Blockchain Analytics",id:"blockchain-analytics",level:2},{value:"Network Monitoring & Reporting",id:"network-monitoring--reporting",level:2},{value:"Clients",id:"clients",level:2},{value:"Tools",id:"tools",level:2},{value:"IDEs",id:"ides",level:2},{value:"UI",id:"ui",level:2},{value:"Libraries",id:"libraries",level:2},{value:"Polkadot-JS API",id:"polkadot-js-api",level:3},{value:"Alternative Libraries",id:"alternative-libraries",level:3},{value:"CLI Tools",id:"cli-tools",level:3},{value:"WASM",id:"wasm",level:3},{value:"RPC and API Tools",id:"rpc-and-api-tools",level:3},{value:"GAME ENGINE SDK",id:"game-engine-sdk",level:3},{value:"SCALE Codec",id:"scale-codec",level:3},{value:"Data Crawling and Conversion",id:"data-crawling-and-conversion",level:2}];function c(e){const t={a:"a",code:"code",h2:"h2",h3:"h3",li:"li",p:"p",ul:"ul",...(0,n.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(t.p,{children:["Here, we provide a list of tools available for your development needs. They are sorted by context.\nIf you're actively maintaining a tool that might be useful to other Polkadot, Kusama or Substrate\ndevelopers, feel free to ",(0,i.jsx)(t.a,{href:"/docs/contributing",children:"add it in"}),"."]}),"\n",(0,i.jsx)(t.h2,{id:"wallets",children:"Wallets"}),"\n",(0,i.jsxs)(t.p,{children:["Please see the ",(0,i.jsx)(t.a,{href:"https://polkadot.network/ecosystem/wallets/",children:"Wallets"})," page on the official website\nor the ",(0,i.jsx)(t.a,{href:"/docs/wallets-and-extensions",children:"Wallets"})," page on the Wiki for detailed information."]}),"\n",(0,i.jsx)(t.h2,{id:"block-explorers",children:"Block Explorers"}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/explorer",children:"Polkadot-JS Apps Explorer"})," - Polkadot dashboard block\nexplorer. Supports dozens of other networks, including Kusama, Westend, and other remote or local\nendpoints. ",(0,i.jsx)(t.a,{href:"https://cloudflare-ipfs.com/ipns/dotapps.io",children:"Access via IPFS"})]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://subscan.io",children:"Subscan"})," - Blockchain explorer for Substrate chains.\n",(0,i.jsx)(t.a,{href:"https://github.com/itering/subscan-essentials",children:"Repo"}),"."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://3xpl.com/polkadot",children:"3xpl.com"})," - Fastest ad-free universal block explorer and JSON API with\nPolkadot support."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://blockchair.com/polkadot",children:"Blockchair.com"})," - Universal blockchain explorer and search\nengine with Polkadot support."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://www.statescan.io/",children:"Statescan.io"})," - Polkadot & Kusama Blockchain explorer."]}),"\n"]}),"\n",(0,i.jsx)(t.h2,{id:"blockchain-analytics",children:"Blockchain Analytics"}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://dune.com/substrate",children:"Dune Analytics"})," - Community dashboards and analytics"]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://dashboards.data.paritytech.io/",children:"DotLake"})," - data visualizations for the Polkadot Ecosystem\nmaintained by Parity"]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://app.web3go.xyz/#/",children:"Web3go"})," - An open platform for everyone to play with, curate and\nvisualize multi-blockchain data"]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://polkawatch.app/",children:"Polkawatch"})," - Polkadot Decentralization Analytics"]}),"\n"]}),"\n",(0,i.jsx)(t.h2,{id:"network-monitoring--reporting",children:"Network Monitoring & Reporting"}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://telemetry.polkadot.io/",children:"Polkadot Telemetry Service"})," - Network information including what\nnodes are running the chain, what software versions they are running, sync status, and location."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://gitlab.com/Polkabot",children:"Polkabot"})," - Polkadot network monitoring and reporting using Matrix\n(Riot / Element) chat. Users may create custom bot plugins.\n",(0,i.jsx)(t.a,{href:"https://medium.com/polkadot-network/polkabot-a3dba18c20c8",children:"Blogpost"}),"."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://github.com/Ryabina-io/substratebot",children:"Ryabina's Telegram Bot"})," - A Telegram bot for\nmonitoring on-chain events of Substrate chains.\n",(0,i.jsx)(t.a,{href:"https://gitlab.com/Polkabot/polkabot",children:"GitHub Repository"}),"\n",(0,i.jsx)(t.a,{href:"https://github.com/Colm3na/polkastats-v2/",children:"GitHub Repository"}),"."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://github.com/SimplyVC/panic",children:"Panic"})," - A node monitoring and alert server for validators."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://github.com/open-web3-stack/guardian",children:"OpenWeb3/Guardian"})," - A CLI tool and JS library to\nmonitor on chain states and events."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://github.com/sodazone/ocelloids",children:"Ocelloids SDK"})," - Typescript SDK for multi-chain monitoring\nthat supports domain-specific logic for different pallets."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://github.com/ArthurHoeke/cyclops/",children:"Cyclops Dashboard"})," - a validator dashboard application\nthat helps Polkadot network validators keep track of all their validators, their staking rewards,\nand performance."]}),"\n"]}),"\n",(0,i.jsx)(t.h2,{id:"clients",children:"Clients"}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/polkadot",children:"Polkadot"})," - The original Rust\nimplementation of the Polkadot Host."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://github.com/soramitsu/kagome",children:"Kagome"})," - A C++ Polkadot implementation of the Polkadot Host\ndeveloped by ",(0,i.jsx)(t.a,{href:"https://github.com/soramitsu",children:"Soramitsu"}),"."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://github.com/ChainSafe/gossamer",children:"Gossamer"})," - A Go implementation of the Polkadot Host\ndeveloped by ",(0,i.jsx)(t.a,{href:"https://chainsafe.io/",children:"ChainSafe Systems"}),"."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://paritytech.github.io/txwrapper-core/",children:"TxWrapper-core"})," - Helper functions for offline\ntransaction generation."]}),"\n"]}),"\n",(0,i.jsx)(t.h2,{id:"tools",children:"Tools"}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/substrate",children:"Substrate"})," - Blockchain\ndevelopment platform written in Rust. The Rust version of the Polkadot Host is being built with\nSubstrate."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://docs.substrate.io/",children:"Substrate Docs"})," - Comprehensive documentation and tutorials for\nbuilding a blockchain using Substrate."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://github.com/paritytech/vscode-substrate",children:"Substrate VSCode plugin (deprecated)"}),"."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://github.com/paritytech/substrate-debug-kit",children:"Substrate Debug Kit (deprecated)"})," - A\ncollection of debug tools and libraries around substrate chains. Includes tools to calculate NPoS\nelections offline, disk usage monitoring, test templates against chain state and other\npallet-specific helper."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://github.com/r0gue-io/pop-cli",children:"POP CLI"})," - An all-in-one tool for Polkadot development."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://github.com/paritytech/zombienet",children:"Zombienet"})," - Testing framework for Substrate based\nblockchains"]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://crates.io/crates/diener",children:"Diener"})," - A tool for easy changing of Polkadot or Substrate\ndependency versions."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://github.com/shawntabrizi/polkadot-launch",children:"Polkadot Launch (deprecated)"})," - A tool to easily\nlaunch custom local parachain-enabled Polkadot versions."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://github.com/maxsam4/fork-off-substrate",children:"Fork-off Substrate"})," - Copies the state of an\nexisting chain into your local version and lets you further experiment on it."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://www.chevdor.com/tags/srtool/",children:"srtool"})," - A tool for verifying runtime versions against\non-chain proposal hashes."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://github.com/nikvolf/sub-bench",children:"sub-bench"})," - A tool to spam your node with transactions for\nthe sake of benchmarking."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://github.com/danforbes/substrate-devhub-utils",children:"substrate-devhub-utils"})," - A set of\nJavaScript utilities making life with Substrate a little easier."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://github.com/NikVolf/sub-flood",children:"sub-flood (archived)"})," - A tool to benchmark Substrate by\nflooding it with requests."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://github.com/Apillon",children:"Apillon"})," - A Web3 development platform with a complete toolbox and\naccess to Polkadot\u2019s technology stack."]}),"\n"]}),"\n",(0,i.jsx)(t.h2,{id:"ides",children:"IDEs"}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://chainide.gitbook.io/chainide-english-1/ethereum-ide-1/13.-astar-ide",children:"Astar IDE"})," by\n",(0,i.jsx)(t.a,{href:"https://chainide.com/",children:"Chain IDE"})," is a tool for lightning-speed smart contracts and dApp\ndevelopment for ",(0,i.jsx)(t.a,{href:"https://chainide.com/s/createTempProject/astar-wasm?language=en",children:"Wasm"})," and\n",(0,i.jsx)(t.a,{href:"https://chainide.com/s/createTempProject/astar-evm?language=en",children:"EVM"}),"."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://github.com/sandoxio/sandox",children:"Sandox IDE"})," is an integrated development environment (IDE)\nwith tools for building in the Polkadot environment. Currently helpful for creating applications\nin JS."]}),"\n"]}),"\n",(0,i.jsx)(t.h2,{id:"ui",children:"UI"}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://github.com/Swader/polkadash",children:"Polkadash"})," - VueJS-based starter kit for custom user\ninterfaces for Substrate chains."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://github.com/polkadot-js/apps",children:"Polkadot JS Apps UI"})," - Repository of the\n",(0,i.jsx)(t.a,{href:"https://polkadot.js.org/apps",children:"polkadot.js.org/apps"})," UI."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://github.com/substrate-developer-hub/substrate-front-end-template",children:"Substrate Front-end Template"})," -\nReactJS-based starter UI for custom user interfaces for Substrate chains."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://github.com/polkadot-js/extension",children:"Polkadot JS Browser Extension"})," - Key management in a\nChrome extension."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://polkadot-ui.info/",children:"Polkadot UI"})," - A library and platform for developing and publishing\nassets for Polkadot dapps."]}),"\n"]}),"\n",(0,i.jsx)(t.h2,{id:"libraries",children:"Libraries"}),"\n",(0,i.jsx)(t.h3,{id:"polkadot-js-api",children:"Polkadot-JS API"}),"\n",(0,i.jsxs)(t.p,{children:["The Polkadot-JS API provides various utility functions that are used across all projects in the\n",(0,i.jsx)(t.code,{children:"@polkadot"})," namespace and is split into a number of internal utility packages. The documentation and\nusage instructions are provided at ",(0,i.jsx)(t.a,{href:"https://polkadot.js.org/docs/",children:"Polkadot-JS API Documentation"}),"."]}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://polkadot.js.org/docs/keyring",children:"@polkadot/keyring"})," This allows you to create and load\naccounts in JavaScript. It is helpful for creating wallets or any application that will require\nthe user to write to chain. ",(0,i.jsx)(t.a,{href:"https://polkadot.js.org/docs/keyring/start/create",children:"Examples"}),"."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://polkadot.js.org/docs/keyring/start/install#other-dependencies",children:"@polkadot/util"})," Utility\nfunctions like checking if a string is hex-encoded."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://polkadot.js.org/docs/util-crypto/",children:"@polkadot/util-crypto"})," Useful cryptographic utilities\nfor developing with Polkadot."]}),"\n"]}),"\n",(0,i.jsx)(t.h3,{id:"alternative-libraries",children:"Alternative Libraries"}),"\n",(0,i.jsx)(t.p,{children:"The following libraries/SDKs allow for interfacing with a Substrate node in other languages:"}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsx)(t.li,{children:(0,i.jsx)(t.a,{href:"https://github.com/polkascan/py-substrate-interface",children:"Python Library by Polkascan"})}),"\n",(0,i.jsx)(t.li,{children:(0,i.jsx)(t.a,{href:"https://github.com/centrifuge/go-substrate-rpc-client",children:"Go Library by Centrifuge"})}),"\n",(0,i.jsx)(t.li,{children:(0,i.jsx)(t.a,{href:"https://github.com/strategyobject/substrate-client-java",children:"Java Library by StrategyObject"})}),"\n",(0,i.jsx)(t.li,{children:(0,i.jsx)(t.a,{href:"https://github.com/soramitsu/fearless-utils-iOS",children:"Fearless Utils iOS Swift SDK"})}),"\n",(0,i.jsx)(t.li,{children:(0,i.jsx)(t.a,{href:"https://github.com/nova-wallet/substrate-sdk-ios",children:"Nova Wallet iOS/Swift Substrate SDK"})}),"\n",(0,i.jsx)(t.li,{children:(0,i.jsx)(t.a,{href:"https://github.com/soramitsu/fearless-utils-Android",children:"Kotlin SDK"})}),"\n",(0,i.jsx)(t.li,{children:(0,i.jsx)(t.a,{href:"https://github.com/leonardocustodio/polkadart",children:"Dart/Flutter Library"})}),"\n"]}),"\n",(0,i.jsx)(t.h3,{id:"cli-tools",children:"CLI Tools"}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://github.com/polkadot-js/tools/tree/master/packages/api-cli",children:"@polkadot/api-cli"})," Command\nline interface for the polkadot API. ",(0,i.jsx)(t.a,{href:"https://polkadot.js.org/docs/api/start",children:"Documentation"}),"."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://github.com/polkadot-js/tools/tree/master/packages/monitor-rpc",children:"@polkadot/monitor-rpc"})," An\nRPC monitor for Polkadot. See the RPC tools below for additional information."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://github.com/polkadot-js/tools/tree/master/packages/signer-cli",children:"@polkadot/signer-cli"})," A\nTool to construct, sign, and broadcast transactions. Signing can be done offline."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://github.com/usetech-llc/polkadot_api_cpp",children:"Polkadot API Cpp"})," - A \u0421++ API for Polkadot, can\nbuild ",(0,i.jsx)(t.code,{children:"clip"}),", a command line tool."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://docs.substrate.io/reference/command-line-tools/subkey/",children:"Subkey"})," - Command line utility\nfor generating and inspecting key pairs."]}),"\n"]}),"\n",(0,i.jsx)(t.h3,{id:"wasm",children:"WASM"}),"\n",(0,i.jsx)(t.p,{children:"WebAssembly related tools and projects."}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://github.com/paritytech/ink/",children:"ink!"})," - An eDSL to write WebAssembly based smart contracts\nusing the Rust programming language."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://github.com/paritytech/parity-wasm",children:"parity-wasm"})," - Low-level WebAssembly format library."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://github.com/paritytech/wasm-utils",children:"wasm-utils"})," - Collection of WebAssembly utilities used\nin pwasm-ethereum and substrate contract development."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://github.com/paritytech/wasmi",children:"wasmi"})," - A WebAssembly interpreter conceived as a component\nof parity-ethereum (Ethereum-like contracts in Wasm) and Substrate."]}),"\n"]}),"\n",(0,i.jsx)(t.h3,{id:"rpc-and-api-tools",children:"RPC and API Tools"}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://github.com/polkadot-js/api/tree/master/packages/rpc-provider",children:"@polkadot/api/rpc-provider"}),"\nDemonstrates how the JS tools interact with the node over RPC."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://polkadot.js.org/docs/substrate/rpc",children:"RPC documentation"})," - Documentation of Substrate RPC\nmethods."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://github.com/SimplyVC/polkadot_api_server",children:"Polkadot API Server by SimplyVC"})," - A wrapper\naround the Polkadot API which makes it easier to make Polkadot API calls from any programming\nlanguage."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://github.com/itering/substrate-api-rpc",children:"Go: Subscan API"})," - Go API for Polkadot."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://github.com/usetech-llc/polkadot_api_cpp",children:"C++ Polkadot API"})," - \u0421++ API for Polkadot."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://github.com/SubstrateGaming/Substrate.NET.API",children:".NET Polkadot/Substrate API"})," - Core\nFramework for Substrate in .NET and connect to nodes."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://github.com/SubstrateGaming/Substrate.NET.Toolchain",children:".NET Toolchain Polkadot/Substrate API"})," -\nToolchain to generate Polkadot/Substrate API & Service Layer for .NET."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://github.com/usetech-llc/polkadot_api_dotnet",children:".NET Polkadot API"})," - Polkadot Substrate API\nfor .NET."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://github.com/polkascan/py-substrate-interface",children:"Python Polkadot API"})," - Polkadot library for\nPython."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://github.com/centrifuge/go-substrate-rpc-client/",children:"GSRPC"})," - Substrate RPC client in Go,\na.k.a. GSRPC."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://github.com/paritytech/substrate-api-sidecar",children:"Substrate API Sidecar"})," - An HTTP wrapper for\nSubstrate, abstracting some complex RPC calls into simple REST calls."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://github.com/paritytech/substrate-subxt",children:"Subxt"})," - A Rust library to submit extrinsics to a\nSubstrate node via RPC."]}),"\n"]}),"\n",(0,i.jsx)(t.h3,{id:"game-engine-sdk",children:"GAME ENGINE SDK"}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://github.com/PolkadotPlay/Polkadot.Unity.SDK",children:"Polkadot SDK for Unity"})," - A powerful toolkit\nthat integrates substrate seamless into Unity projects.\n(",(0,i.jsx)(t.a,{href:"https://assetstore.unity.com/packages/decentralization/infrastructure/polkadot-sdk-for-unity-273535",children:"AssetStore"}),",\n",(0,i.jsx)(t.a,{href:"https://github.com/PolkadotPlay/Polkadot.Unity.SDK/wiki",children:"wiki"}),")."]}),"\n"]}),"\n",(0,i.jsx)(t.h3,{id:"scale-codec",children:"SCALE Codec"}),"\n",(0,i.jsx)(t.p,{children:"The SCALE (Simple Concatenated Aggregate Little-Endian) Codec is a lightweight, efficient, binary\nserialization and deserialization codec."}),"\n",(0,i.jsx)(t.p,{children:"It is designed for high-performance, copy-free encoding and decoding of data in resource-constrained\nexecution contexts, such as the Substrate runtime. It is not self-describing in any way and assumes\nthe decoding context has all type knowledge about the encoded data."}),"\n",(0,i.jsx)(t.p,{children:"It is used in almost all communication to/from Substrate nodes, so implementations in different\nlanguages exist:"}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://github.com/substrate-developer-hub/awesome-substrate#scale-codec",children:"Substrate Awesome"}),"\nmaintains a list of SCALE codex implementations."]}),"\n"]}),"\n",(0,i.jsx)(t.h2,{id:"data-crawling-and-conversion",children:"Data Crawling and Conversion"}),"\n",(0,i.jsx)(t.p,{children:"The following tools help you extract and structure data from a Substrate node."}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://github.com/paritytech/substrate-archive",children:"Parity's Substrate Archive"})," - Can be run\nalongside a Substrate node to archive all blocks, state, and extrinsic data into PostgreSQL\ndatabase."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://github.com/subsquid/squid-archive-setup",children:"Subsquid Archives"})," - Generate a GraphQL database\nfrom a Substrate chain's data with rich filtering and querying capabilities. The data (events,\nextrinsics, blocks) for most parachains is readily available though public archive GraphQL\nendpoints, kept in\n",(0,i.jsx)(t.a,{href:"https://github.com/subsquid/archive-registry/blob/main/archives.json",children:"Squid Archive Registry"})]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://github.com/TheGoldenEye/polka-store",children:"Polka-store"})," - A tool which scans a Substrate chain\nand stores balance-relevant transactions in an SQLite database."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://github.com/playzero/substrate-graph",children:"Substrate-graph"})," - A compact indexer for Substrate\nbased nodes providing a GraphQL interface."]}),"\n"]})]})}function d(e={}){const{wrapper:t}={...(0,n.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(c,{...e})}):c(e)}},28453:(e,t,s)=>{s.d(t,{R:()=>a,x:()=>r});var i=s(96540);const n={},o=i.createContext(n);function a(e){const t=i.useContext(o);return i.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:a(e.components),i.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/ceaa29cb.c701c13c.js b/assets/js/ceaa29cb.c701c13c.js new file mode 100644 index 000000000000..df2d40609b1c --- /dev/null +++ b/assets/js/ceaa29cb.c701c13c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4841],{50965:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>r,contentTitle:()=>l,default:()=>d,frontMatter:()=>o,metadata:()=>t,toc:()=>i});const t=JSON.parse('{"id":"learn/xcm/journey/locks/learn-xcm-docs-journey-locks","title":"Locks","description":"Restrict Transfer or Withdrawal of Assets.","source":"@site/../docs/learn/xcm/journey/locks/locks.md","sourceDirName":"learn/xcm/journey/locks","slug":"/learn/xcm/journey-locks","permalink":"/docs/learn/xcm/journey-locks","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/xcm/journey/locks/locks.md","tags":[],"version":"current","lastUpdatedBy":"bader y","lastUpdatedAt":1694099593000,"frontMatter":{"id":"learn-xcm-docs-journey-locks","title":"Locks","sidebar_label":"Locks","description":"Restrict Transfer or Withdrawal of Assets.","keywords":["xcm","cross-consensus messaging","locks"],"slug":"../../journey-locks"},"sidebar":"docs","previous":{"title":"Version Subscription","permalink":"/docs/learn/xcm/journey-version"},"next":{"title":"Channels and Bridges","permalink":"/docs/learn/xcm/journey-channels"}}');var c=s(74848),a=s(28453);const o={id:"learn-xcm-docs-journey-locks",title:"Locks",sidebar_label:"Locks",description:"Restrict Transfer or Withdrawal of Assets.",keywords:["xcm","cross-consensus messaging","locks"],slug:"../../journey-locks"},l="Locking",r={},i=[{value:"LockAsset",id:"lockasset",level:2},{value:"UnlockAsset",id:"unlockasset",level:2},{value:"NoteUnlockable",id:"noteunlockable",level:2},{value:"RequestUnlock",id:"requestunlock",level:2},{value:"Example",id:"example",level:2},{value:"Example 1",id:"example-1",level:3},{value:"Example 2",id:"example-2",level:3}];function h(e){const n={a:"a",br:"br",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",img:"img",li:"li",ol:"ol",p:"p",pre:"pre",ul:"ul",...(0,a.R)(),...e.components};return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(n.header,{children:(0,c.jsx)(n.h1,{id:"locking",children:"Locking"})}),"\n",(0,c.jsxs)(n.p,{children:["Assets can be locked via XCM, meaning, the transfer or withdrawal of assets can be restricted via\nmessages. The XCM locking mechanism consists of four instructions: ",(0,c.jsx)(n.code,{children:"LockAsset"}),", ",(0,c.jsx)(n.code,{children:"UnlockAsset"}),",\n",(0,c.jsx)(n.code,{children:"NoteUnlockable"}),", and ",(0,c.jsx)(n.code,{children:"RequestUnlock"}),". Let's explore each instruction in detail:"]}),"\n",(0,c.jsx)(n.h2,{id:"lockasset",children:"LockAsset"}),"\n",(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-rust",children:"LockAsset { asset: MultiAsset, unlocker: MultiLocation }\n"})}),"\n",(0,c.jsx)(n.p,{children:"The LockAsset instruction is used to lock locally held assets and prevent further transfers or\nwithdrawals. This instruction requires two parameters:"}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:[(0,c.jsx)(n.code,{children:"asset"}),": The asset(s) to be locked."]}),"\n",(0,c.jsxs)(n.li,{children:[(0,c.jsx)(n.code,{children:"unlocker"}),": The MultiLocation that can unlock the asset(s). This value must match the origin of a\ncorresponding ",(0,c.jsx)(n.code,{children:"UnlockAsset"})," instruction to unlock the asset."]}),"\n"]}),"\n",(0,c.jsxs)(n.p,{children:["When the locking operation succeeds, a ",(0,c.jsx)(n.code,{children:"NoteUnlockable"})," instruction is sent to the unlocker. This\ninstruction serves as a notification that the asset is now unlockable."]}),"\n",(0,c.jsx)(n.h2,{id:"unlockasset",children:"UnlockAsset"}),"\n",(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-rust",children:"UnlockAsset { asset: MultiAsset, target: MultiLocation }\n"})}),"\n",(0,c.jsxs)(n.p,{children:["The ",(0,c.jsx)(n.code,{children:"UnlockAsset"})," instruction removes the lock on a specific asset on the local chain, allowing it\nto be transferred if there are no other restrictions. The following parameters are required:"]}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:[(0,c.jsx)(n.code,{children:"asset"}),": The asset to be unlocked."]}),"\n",(0,c.jsxs)(n.li,{children:[(0,c.jsx)(n.code,{children:"target"}),": The owner of the asset on the local chain."]}),"\n"]}),"\n",(0,c.jsx)(n.h2,{id:"noteunlockable",children:"NoteUnlockable"}),"\n",(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-rust",children:"NoteUnlockable { asset: MultiAsset, owner: MultiLocation }\n"})}),"\n",(0,c.jsxs)(n.p,{children:["The ",(0,c.jsx)(n.code,{children:"NoteUnlockable"})," instruction indicates that an asset has been locked on the system which the\nmessage originated from.",(0,c.jsx)(n.br,{}),"\n","The locked assets can only be unlocked by receiving an ",(0,c.jsx)(n.code,{children:"UnlockAsset"})," instruction from this chain.\nThis instruction requires the following parameters:"]}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:[(0,c.jsx)(n.code,{children:"asset"}),": The asset(s) which are now unlockable from this origin."]}),"\n",(0,c.jsxs)(n.li,{children:[(0,c.jsx)(n.code,{children:"owner"}),": The owner of the asset on the chain in which it was locked. This may be a location\nspecific to the origin network. The owner can request this origin to unlock the assets using a\n",(0,c.jsx)(n.code,{children:"RequestUnlock"})," instruction. However, the owner is not able to unlock the assets themselves."]}),"\n"]}),"\n",(0,c.jsx)(n.p,{children:"It is essential to trust the origin to have locked the corresponding asset before sending this\nmessage."}),"\n",(0,c.jsx)(n.h2,{id:"requestunlock",children:"RequestUnlock"}),"\n",(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-rust,",metastring:"noplayground",children:"RequestUnlock { asset: MultiAsset, locker: MultiLocation }\n"})}),"\n",(0,c.jsxs)(n.p,{children:["The ",(0,c.jsx)(n.code,{children:"RequestUnlock"})," instruction is used to send an ",(0,c.jsx)(n.code,{children:"UnlockAsset"})," instruction to the ",(0,c.jsx)(n.code,{children:"locker"})," for a\ngiven asset. The following parameters are required:"]}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:[(0,c.jsx)(n.code,{children:"asset"}),": The asset(s) to be unlocked."]}),"\n",(0,c.jsxs)(n.li,{children:[(0,c.jsx)(n.code,{children:"locker"}),": The location from which a previous ",(0,c.jsx)(n.code,{children:"NoteUnlockable"})," was sent, and where the\n",(0,c.jsx)(n.code,{children:"UnlockAsset"})," instruction should be sent."]}),"\n"]}),"\n",(0,c.jsx)(n.h2,{id:"example",children:"Example"}),"\n",(0,c.jsxs)(n.p,{children:["To get a better grasp on how these instructions work together, we give two examples in this section.\nThe examples use the xcm-executor with the pallet-xcm as the implementation for the ",(0,c.jsx)(n.code,{children:"AssetLocker"}),"\nconfig item. An important note of this implementation is that only one lock with ID ",(0,c.jsx)(n.code,{children:"py/xcmlk"})," is\nset per account. The pallet-xcm implementation keeps track of all the xcm-related locks that are\nplaced on an account and sets the most restricting one with the ",(0,c.jsx)(n.code,{children:"py/xcmlk"})," lock ID. This principle\nbecomes more clear in the second example."]}),"\n",(0,c.jsx)(n.h3,{id:"example-1",children:"Example 1"}),"\n",(0,c.jsxs)(n.p,{children:["Check out the full ",(0,c.jsx)(n.a,{href:"https://github.com/paritytech/xcm-docs/tree/main/examples",children:"example code"}),". The\nscenario of this example is as follows:"]}),"\n",(0,c.jsx)(n.p,{children:"Parachain A locks 5 Cents of relay chain native assets of its Sovereign account on the relay chain\nand assigns Parachain B as unlocker. Parachain A then asks Parachain B to unlock the funds partly.\nParachain B responds by sending an UnlockAssets instruction to the relay chain."}),"\n",(0,c.jsx)(n.p,{children:(0,c.jsx)(n.img,{alt:"Example",src:s(92218).A+"",width:"641",height:"371"})}),"\n",(0,c.jsxs)(n.ol,{children:["\n",(0,c.jsxs)(n.li,{children:["send ",(0,c.jsx)(n.code,{children:"LockAsset"})," instruction from ParaA to relay."]}),"\n"]}),"\n",(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-rust",children:"ParaA::execute_with(|| {\n let message = Xcm(vec![LockAsset {\n asset: (Here, CENTS * 5).into(),\n unlocker: (Parachain(2)).into(),\n }]);\n assert_ok!(ParachainPalletXcm::send_xcm(Here, Parent, message.clone()));\n});\n"})}),"\n",(0,c.jsxs)(n.ol,{start:"2",children:["\n",(0,c.jsxs)(n.li,{children:["Parachain B receives this ",(0,c.jsx)(n.code,{children:"NoteUnlockable"})," instruction from the relay chain."]}),"\n"]}),"\n",(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-rust",children:"NoteUnlockable {\n owner: (Parent, Parachain(1)).into(),\n asset: (Parent, CENTS * 5).into()\n}\n"})}),"\n",(0,c.jsxs)(n.ol,{start:"3",children:["\n",(0,c.jsxs)(n.li,{children:["Parachain A sends ",(0,c.jsx)(n.code,{children:"RequestUnlock"})," instruction to Parachain B"]}),"\n"]}),"\n",(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-rust",children:"ParaA::execute_with(|| {\n let message = Xcm(vec![RequestUnlock {\n asset: (Parent, 3 * CENTS).into(),\n locker: Parent.into(),\n }]);\n assert_ok!(ParachainPalletXcm::send_xcm(Here, (Parent, Parachain(2)), message.clone()));\n});\n"})}),"\n",(0,c.jsxs)(n.ol,{start:"4",children:["\n",(0,c.jsxs)(n.li,{children:["Parachain B sends an ",(0,c.jsx)(n.code,{children:"UnlockAsset"})," instruction to the relay chain. We check if the lock is\nupdated accordingly:"]}),"\n"]}),"\n",(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-rust",children:'assert_eq!(\n relay_chain::Balances::locks(¶chain_sovereign_account_id(1)),\n vec![BalanceLock { id: *b"py/xcmlk", amount: 2 * CENTS, reasons: Reasons::All }]\n);\n'})}),"\n",(0,c.jsx)(n.h3,{id:"example-2",children:"Example 2"}),"\n",(0,c.jsxs)(n.p,{children:["Check out the full ",(0,c.jsx)(n.a,{href:"https://github.com/paritytech/xcm-docs/tree/main/examples",children:"example code"}),". The\nscenario of this example is as follows:"]}),"\n",(0,c.jsx)(n.p,{children:"Parachain A sets two locks on the relay chain with as unlockers Parachain B and Parachain C.\nParachain A then requests Parachain B to partly unlock."}),"\n",(0,c.jsx)(n.p,{children:"Note: The locks overlap. When there are two or more locks, the total assets that are locked is equal\nto the most restrictive lock (the lock that locks the most assets). When the most restrictive lock\nis unlocked, the total locked assets is than equal to the next most restrictive lock."}),"\n",(0,c.jsx)(n.p,{children:(0,c.jsx)(n.img,{alt:"Example",src:s(22385).A+"",width:"821",height:"371"})}),"\n",(0,c.jsxs)(n.ol,{children:["\n",(0,c.jsx)(n.li,{children:"Set locks on the relay chain. Unlockers: B, C; Locks registered in pallet-xcm: 10, 5. Lock set in\npallet-balances: 10."}),"\n"]}),"\n",(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-rust,",metastring:"noplayground",children:'ParaA::execute_with(|| {\n let message = Xcm(vec![\n LockAsset { asset: (Here, 10 * CENTS).into(), unlocker: (Parachain(2)).into() },\n LockAsset { asset: (Here, 5 * CENTS).into(), unlocker: (Parachain(3)).into() },\n ]);\n assert_ok!(ParachainPalletXcm::send_xcm(Here, Parent, message.clone()));\n});\n\nRelay::execute_with(|| {\n assert_eq!(\n relay_chain::Balances::locks(¶chain_sovereign_account_id(1)),\n vec![BalanceLock { id: *b"py/xcmlk", amount: 10 * CENTS, reasons: Reasons::All }]\n );\n});\n'})}),"\n",(0,c.jsxs)(n.ol,{start:"2",children:["\n",(0,c.jsxs)(n.li,{children:["Parachain B and C receive the ",(0,c.jsx)(n.code,{children:"NoteUnlockable"})," instruction."]}),"\n"]}),"\n",(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-rust,",metastring:"noplayground",children:"ParaB::execute_with(|| {\n assert_eq!(\n parachain::MsgQueue::received_dmp(),\n vec![Xcm(vec![NoteUnlockable {\n owner: (Parent, Parachain(1)).into(),\n asset: (Parent, 10 * CENTS).into()\n }])]\n );\n});\n\nParaC::execute_with(|| {\n assert_eq!(\n parachain::MsgQueue::received_dmp(),\n vec![Xcm(vec![NoteUnlockable {\n owner: (Parent, Parachain(1)).into(),\n asset: (Parent, 5 * CENTS).into()\n }])]\n );\n});\n"})}),"\n",(0,c.jsxs)(n.ol,{start:"3",children:["\n",(0,c.jsxs)(n.li,{children:["Parachain A sends a ",(0,c.jsx)(n.code,{children:"RequestUnlock"})," instruction to Parachain B for 8 CENTS."]}),"\n"]}),"\n",(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-rust,",metastring:"noplayground",children:"ParaA::execute_with(|| {\n let message = Xcm(vec![RequestUnlock {\n asset: (Parent, 8 * CENTS).into(),\n locker: Parent.into(),\n }]);\n\n assert_ok!(ParachainPalletXcm::send_xcm(Here, (Parent, Parachain(2)), message.clone()));\n});\n"})}),"\n",(0,c.jsxs)(n.ol,{start:"4",children:["\n",(0,c.jsxs)(n.li,{children:["Parachain B Unlocks a part of the funds by sending an ",(0,c.jsx)(n.code,{children:"UnlockAsset"})," to the relay chain. we check\nthe lock in the balances-pallet. Unlockers: B, C; Funds registered in pallet-xcm: 2, 5. Lock set\nin pallet-balances: 5."]}),"\n"]}),"\n",(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-rust",children:'Relay::execute_with(|| {\n assert_eq!(\n relay_chain::Balances::locks(¶chain_sovereign_account_id(1)),\n vec![BalanceLock { id: *b"py/xcmlk", amount: 5 * CENTS, reasons: Reasons::All }]\n );\n});\n'})})]})}function d(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,c.jsx)(n,{...e,children:(0,c.jsx)(h,{...e})}):h(e)}},92218:(e,n,s)=>{s.d(n,{A:()=>t});const t=s.p+"assets/images/Example1-61d1f7cdd7d0e964d4cde7e1b412b1b9.png"},22385:(e,n,s)=>{s.d(n,{A:()=>t});const t=s.p+"assets/images/Example2-6a5a1beb78bc98d9546a7f2771d6f091.png"},28453:(e,n,s)=>{s.d(n,{R:()=>o,x:()=>l});var t=s(96540);const c={},a=t.createContext(c);function o(e){const n=t.useContext(a);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(c):e.components||c:o(e.components),t.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/ceaa29cb.fe5a9dc5.js b/assets/js/ceaa29cb.fe5a9dc5.js deleted file mode 100644 index 10c75a1cdd57..000000000000 --- a/assets/js/ceaa29cb.fe5a9dc5.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4841],{99027:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>r,contentTitle:()=>o,default:()=>d,frontMatter:()=>a,metadata:()=>l,toc:()=>i});var t=s(74848),c=s(28453);const a={id:"learn-xcm-docs-journey-locks",title:"Locks",sidebar_label:"Locks",description:"Restrict Transfer or Withdrawal of Assets.",keywords:["xcm","cross-consensus messaging","locks"],slug:"../../journey-locks"},o="Locking",l={id:"learn/xcm/journey/locks/learn-xcm-docs-journey-locks",title:"Locks",description:"Restrict Transfer or Withdrawal of Assets.",source:"@site/../docs/learn/xcm/journey/locks/locks.md",sourceDirName:"learn/xcm/journey/locks",slug:"/learn/xcm/journey-locks",permalink:"/docs/learn/xcm/journey-locks",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/xcm/journey/locks/locks.md",tags:[],version:"current",lastUpdatedBy:"bader y",lastUpdatedAt:1694099593e3,frontMatter:{id:"learn-xcm-docs-journey-locks",title:"Locks",sidebar_label:"Locks",description:"Restrict Transfer or Withdrawal of Assets.",keywords:["xcm","cross-consensus messaging","locks"],slug:"../../journey-locks"},sidebar:"docs",previous:{title:"Version Subscription",permalink:"/docs/learn/xcm/journey-version"},next:{title:"Channels and Bridges",permalink:"/docs/learn/xcm/journey-channels"}},r={},i=[{value:"LockAsset",id:"lockasset",level:2},{value:"UnlockAsset",id:"unlockasset",level:2},{value:"NoteUnlockable",id:"noteunlockable",level:2},{value:"RequestUnlock",id:"requestunlock",level:2},{value:"Example",id:"example",level:2},{value:"Example 1",id:"example-1",level:3},{value:"Example 2",id:"example-2",level:3}];function h(e){const n={a:"a",br:"br",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",img:"img",li:"li",ol:"ol",p:"p",pre:"pre",ul:"ul",...(0,c.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.header,{children:(0,t.jsx)(n.h1,{id:"locking",children:"Locking"})}),"\n",(0,t.jsxs)(n.p,{children:["Assets can be locked via XCM, meaning, the transfer or withdrawal of assets can be restricted via\nmessages. The XCM locking mechanism consists of four instructions: ",(0,t.jsx)(n.code,{children:"LockAsset"}),", ",(0,t.jsx)(n.code,{children:"UnlockAsset"}),",\n",(0,t.jsx)(n.code,{children:"NoteUnlockable"}),", and ",(0,t.jsx)(n.code,{children:"RequestUnlock"}),". Let's explore each instruction in detail:"]}),"\n",(0,t.jsx)(n.h2,{id:"lockasset",children:"LockAsset"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-rust",children:"LockAsset { asset: MultiAsset, unlocker: MultiLocation }\n"})}),"\n",(0,t.jsx)(n.p,{children:"The LockAsset instruction is used to lock locally held assets and prevent further transfers or\nwithdrawals. This instruction requires two parameters:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"asset"}),": The asset(s) to be locked."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"unlocker"}),": The MultiLocation that can unlock the asset(s). This value must match the origin of a\ncorresponding ",(0,t.jsx)(n.code,{children:"UnlockAsset"})," instruction to unlock the asset."]}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["When the locking operation succeeds, a ",(0,t.jsx)(n.code,{children:"NoteUnlockable"})," instruction is sent to the unlocker. This\ninstruction serves as a notification that the asset is now unlockable."]}),"\n",(0,t.jsx)(n.h2,{id:"unlockasset",children:"UnlockAsset"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-rust",children:"UnlockAsset { asset: MultiAsset, target: MultiLocation }\n"})}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"UnlockAsset"})," instruction removes the lock on a specific asset on the local chain, allowing it\nto be transferred if there are no other restrictions. The following parameters are required:"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"asset"}),": The asset to be unlocked."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"target"}),": The owner of the asset on the local chain."]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"noteunlockable",children:"NoteUnlockable"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-rust",children:"NoteUnlockable { asset: MultiAsset, owner: MultiLocation }\n"})}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"NoteUnlockable"})," instruction indicates that an asset has been locked on the system which the\nmessage originated from.",(0,t.jsx)(n.br,{}),"\n","The locked assets can only be unlocked by receiving an ",(0,t.jsx)(n.code,{children:"UnlockAsset"})," instruction from this chain.\nThis instruction requires the following parameters:"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"asset"}),": The asset(s) which are now unlockable from this origin."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"owner"}),": The owner of the asset on the chain in which it was locked. This may be a location\nspecific to the origin network. The owner can request this origin to unlock the assets using a\n",(0,t.jsx)(n.code,{children:"RequestUnlock"})," instruction. However, the owner is not able to unlock the assets themselves."]}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"It is essential to trust the origin to have locked the corresponding asset before sending this\nmessage."}),"\n",(0,t.jsx)(n.h2,{id:"requestunlock",children:"RequestUnlock"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-rust,",metastring:"noplayground",children:"RequestUnlock { asset: MultiAsset, locker: MultiLocation }\n"})}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"RequestUnlock"})," instruction is used to send an ",(0,t.jsx)(n.code,{children:"UnlockAsset"})," instruction to the ",(0,t.jsx)(n.code,{children:"locker"})," for a\ngiven asset. The following parameters are required:"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"asset"}),": The asset(s) to be unlocked."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"locker"}),": The location from which a previous ",(0,t.jsx)(n.code,{children:"NoteUnlockable"})," was sent, and where the\n",(0,t.jsx)(n.code,{children:"UnlockAsset"})," instruction should be sent."]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"example",children:"Example"}),"\n",(0,t.jsxs)(n.p,{children:["To get a better grasp on how these instructions work together, we give two examples in this section.\nThe examples use the xcm-executor with the pallet-xcm as the implementation for the ",(0,t.jsx)(n.code,{children:"AssetLocker"}),"\nconfig item. An important note of this implementation is that only one lock with ID ",(0,t.jsx)(n.code,{children:"py/xcmlk"})," is\nset per account. The pallet-xcm implementation keeps track of all the xcm-related locks that are\nplaced on an account and sets the most restricting one with the ",(0,t.jsx)(n.code,{children:"py/xcmlk"})," lock ID. This principle\nbecomes more clear in the second example."]}),"\n",(0,t.jsx)(n.h3,{id:"example-1",children:"Example 1"}),"\n",(0,t.jsxs)(n.p,{children:["Check out the full ",(0,t.jsx)(n.a,{href:"https://github.com/paritytech/xcm-docs/tree/main/examples",children:"example code"}),". The\nscenario of this example is as follows:"]}),"\n",(0,t.jsx)(n.p,{children:"Parachain A locks 5 Cents of relay chain native assets of its Sovereign account on the relay chain\nand assigns Parachain B as unlocker. Parachain A then asks Parachain B to unlock the funds partly.\nParachain B responds by sending an UnlockAssets instruction to the relay chain."}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"Example",src:s(92218).A+"",width:"641",height:"371"})}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["send ",(0,t.jsx)(n.code,{children:"LockAsset"})," instruction from ParaA to relay."]}),"\n"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-rust",children:"ParaA::execute_with(|| {\n let message = Xcm(vec![LockAsset {\n asset: (Here, CENTS * 5).into(),\n unlocker: (Parachain(2)).into(),\n }]);\n assert_ok!(ParachainPalletXcm::send_xcm(Here, Parent, message.clone()));\n});\n"})}),"\n",(0,t.jsxs)(n.ol,{start:"2",children:["\n",(0,t.jsxs)(n.li,{children:["Parachain B receives this ",(0,t.jsx)(n.code,{children:"NoteUnlockable"})," instruction from the relay chain."]}),"\n"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-rust",children:"NoteUnlockable {\n owner: (Parent, Parachain(1)).into(),\n asset: (Parent, CENTS * 5).into()\n}\n"})}),"\n",(0,t.jsxs)(n.ol,{start:"3",children:["\n",(0,t.jsxs)(n.li,{children:["Parachain A sends ",(0,t.jsx)(n.code,{children:"RequestUnlock"})," instruction to Parachain B"]}),"\n"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-rust",children:"ParaA::execute_with(|| {\n let message = Xcm(vec![RequestUnlock {\n asset: (Parent, 3 * CENTS).into(),\n locker: Parent.into(),\n }]);\n assert_ok!(ParachainPalletXcm::send_xcm(Here, (Parent, Parachain(2)), message.clone()));\n});\n"})}),"\n",(0,t.jsxs)(n.ol,{start:"4",children:["\n",(0,t.jsxs)(n.li,{children:["Parachain B sends an ",(0,t.jsx)(n.code,{children:"UnlockAsset"})," instruction to the relay chain. We check if the lock is\nupdated accordingly:"]}),"\n"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-rust",children:'assert_eq!(\n relay_chain::Balances::locks(¶chain_sovereign_account_id(1)),\n vec![BalanceLock { id: *b"py/xcmlk", amount: 2 * CENTS, reasons: Reasons::All }]\n);\n'})}),"\n",(0,t.jsx)(n.h3,{id:"example-2",children:"Example 2"}),"\n",(0,t.jsxs)(n.p,{children:["Check out the full ",(0,t.jsx)(n.a,{href:"https://github.com/paritytech/xcm-docs/tree/main/examples",children:"example code"}),". The\nscenario of this example is as follows:"]}),"\n",(0,t.jsx)(n.p,{children:"Parachain A sets two locks on the relay chain with as unlockers Parachain B and Parachain C.\nParachain A then requests Parachain B to partly unlock."}),"\n",(0,t.jsx)(n.p,{children:"Note: The locks overlap. When there are two or more locks, the total assets that are locked is equal\nto the most restrictive lock (the lock that locks the most assets). When the most restrictive lock\nis unlocked, the total locked assets is than equal to the next most restrictive lock."}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"Example",src:s(22385).A+"",width:"821",height:"371"})}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsx)(n.li,{children:"Set locks on the relay chain. Unlockers: B, C; Locks registered in pallet-xcm: 10, 5. Lock set in\npallet-balances: 10."}),"\n"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-rust,",metastring:"noplayground",children:'ParaA::execute_with(|| {\n let message = Xcm(vec![\n LockAsset { asset: (Here, 10 * CENTS).into(), unlocker: (Parachain(2)).into() },\n LockAsset { asset: (Here, 5 * CENTS).into(), unlocker: (Parachain(3)).into() },\n ]);\n assert_ok!(ParachainPalletXcm::send_xcm(Here, Parent, message.clone()));\n});\n\nRelay::execute_with(|| {\n assert_eq!(\n relay_chain::Balances::locks(¶chain_sovereign_account_id(1)),\n vec![BalanceLock { id: *b"py/xcmlk", amount: 10 * CENTS, reasons: Reasons::All }]\n );\n});\n'})}),"\n",(0,t.jsxs)(n.ol,{start:"2",children:["\n",(0,t.jsxs)(n.li,{children:["Parachain B and C receive the ",(0,t.jsx)(n.code,{children:"NoteUnlockable"})," instruction."]}),"\n"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-rust,",metastring:"noplayground",children:"ParaB::execute_with(|| {\n assert_eq!(\n parachain::MsgQueue::received_dmp(),\n vec![Xcm(vec![NoteUnlockable {\n owner: (Parent, Parachain(1)).into(),\n asset: (Parent, 10 * CENTS).into()\n }])]\n );\n});\n\nParaC::execute_with(|| {\n assert_eq!(\n parachain::MsgQueue::received_dmp(),\n vec![Xcm(vec![NoteUnlockable {\n owner: (Parent, Parachain(1)).into(),\n asset: (Parent, 5 * CENTS).into()\n }])]\n );\n});\n"})}),"\n",(0,t.jsxs)(n.ol,{start:"3",children:["\n",(0,t.jsxs)(n.li,{children:["Parachain A sends a ",(0,t.jsx)(n.code,{children:"RequestUnlock"})," instruction to Parachain B for 8 CENTS."]}),"\n"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-rust,",metastring:"noplayground",children:"ParaA::execute_with(|| {\n let message = Xcm(vec![RequestUnlock {\n asset: (Parent, 8 * CENTS).into(),\n locker: Parent.into(),\n }]);\n\n assert_ok!(ParachainPalletXcm::send_xcm(Here, (Parent, Parachain(2)), message.clone()));\n});\n"})}),"\n",(0,t.jsxs)(n.ol,{start:"4",children:["\n",(0,t.jsxs)(n.li,{children:["Parachain B Unlocks a part of the funds by sending an ",(0,t.jsx)(n.code,{children:"UnlockAsset"})," to the relay chain. we check\nthe lock in the balances-pallet. Unlockers: B, C; Funds registered in pallet-xcm: 2, 5. Lock set\nin pallet-balances: 5."]}),"\n"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-rust",children:'Relay::execute_with(|| {\n assert_eq!(\n relay_chain::Balances::locks(¶chain_sovereign_account_id(1)),\n vec![BalanceLock { id: *b"py/xcmlk", amount: 5 * CENTS, reasons: Reasons::All }]\n );\n});\n'})})]})}function d(e={}){const{wrapper:n}={...(0,c.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(h,{...e})}):h(e)}},92218:(e,n,s)=>{s.d(n,{A:()=>t});const t=s.p+"assets/images/Example1-61d1f7cdd7d0e964d4cde7e1b412b1b9.png"},22385:(e,n,s)=>{s.d(n,{A:()=>t});const t=s.p+"assets/images/Example2-6a5a1beb78bc98d9546a7f2771d6f091.png"},28453:(e,n,s)=>{s.d(n,{R:()=>o,x:()=>l});var t=s(96540);const c={},a=t.createContext(c);function o(e){const n=t.useContext(a);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(c):e.components||c:o(e.components),t.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/cfd53ea4.04be693b.js b/assets/js/cfd53ea4.04be693b.js new file mode 100644 index 000000000000..2c817fe87944 --- /dev/null +++ b/assets/js/cfd53ea4.04be693b.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7482],{69091:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>l,contentTitle:()=>r,default:()=>d,frontMatter:()=>s,metadata:()=>n,toc:()=>h});const n=JSON.parse('{"id":"general/kusama/kusama-timeline","title":"Kusama Timeline","description":"Stay up-to-date with the latest action on Kusama.","source":"@site/../docs/general/kusama/kusama-timeline.md","sourceDirName":"general/kusama","slug":"/kusama-timeline","permalink":"/docs/kusama-timeline","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/kusama/kusama-timeline.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1727943421000,"frontMatter":{"id":"kusama-timeline","title":"Kusama Timeline","sidebar_label":"Timeline","description":"Stay up-to-date with the latest action on Kusama.","keywords":["timeline","roadmap","kusama"],"slug":"../../kusama-timeline"},"sidebar":"docs","previous":{"title":"Home","permalink":"/docs/kusama-getting-started"},"next":{"title":"Code of Conduct","permalink":"/docs/kusama-coc"}}');var o=a(74848),i=a(28453);const s={id:"kusama-timeline",title:"Kusama Timeline",sidebar_label:"Timeline",description:"Stay up-to-date with the latest action on Kusama.",keywords:["timeline","roadmap","kusama"],slug:"../../kusama-timeline"},r=void 0,l={},h=[{value:"Rollout plan",id:"rollout-plan",level:2},{value:"Kusama's First Adventure",id:"kusamas-first-adventure",level:2},{value:"Auctions",id:"auctions",level:2}];function u(e){const t={a:"a",h2:"h2",p:"p",...(0,i.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.p,{children:"Kusama network started as a Proof-of-Authority network and was transitioned to Proof-of-Stake on\nOctober 28, 2019 at approximately 16:43 UTC. The first successful validator set rotation took place\nat 20:45 UTC."}),"\n",(0,o.jsx)(t.p,{children:"Currently, Kusama is a healthy Proof-of-Stake network with over 900 validators and over eight\nmillion blocks produced. If you are curious about the history of the Kusama network, you will find\nmore information in the sections below."}),"\n",(0,o.jsx)(t.h2,{id:"rollout-plan",children:"Rollout plan"}),"\n",(0,o.jsx)(t.p,{children:"The rollout of full functionality of Kusama was staggered to allow for a safe transition. The first\nPoS phase began with 20 validators. Of the 20, Web3 Foundation ran nine and Parity Technologies ran\nsix. Five were ran by highly staked community members as voted in by the Phragm\xe9n election."}),"\n",(0,o.jsx)(t.p,{children:"When the initial transition was successful, additional validator spots were opened 10 at a time in\norder to allow for more validators to enter the active set."}),"\n",(0,o.jsx)(t.p,{children:"When the first transition to PoS took place, the full functionality of Kusama was not fully\navailable. Notably, the Sudo key still existed and was used to initiate further upgrades. Balance\ntransfers were still disabled for a short while."}),"\n",(0,o.jsx)(t.p,{children:"Kusama now has its full functionality enabled."}),"\n",(0,o.jsx)(t.h2,{id:"kusamas-first-adventure",children:"Kusama's First Adventure"}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.a,{href:"https://polkadot.network/kusamas-first-adventure/",children:"Source"})}),"\n",(0,o.jsx)(t.p,{children:"On January 4, 2020, the Polkadot mainnet runtime, which at that time still wasn't live, was uploaded\nto the Kusama chain during a runtime upgrade. The mishap was due to a recent split of the Kusama\nlogic from the Polkadot logic and that runtime was not correctly named. This led to a halt of block\nproduction on the Kusama chain and bricked the chain entirely."}),"\n",(0,o.jsx)(t.p,{children:"The solution to the issue involved a rollback of the chain history before the problematic runtime\nupgrade. However, due to intricacies of the block production mechanism, it was also necessary to\nencapsulate the validators of the chain into a time bubble to trick them into believing that they\nwere producing blocks in the past. Furthermore, in order for the chain to catch up to the present\nmoment it was necessary to make time flow in the bubble at a speed of six times greater than the\nspeed of time in the real world. Therefore, the session of Kusama which would normally last one hour\nwould last only 10 minutes until the validators caught up to the present moment."}),"\n",(0,o.jsxs)(t.p,{children:["The above plan was executed successfully on January 7, 2020. Due to the time warp, the number of\nmissed blocks in the sessions directly following\n",(0,o.jsx)(t.a,{href:"https://kusama.subscan.io/block/516558",children:"block #516558"})," was significantly higher. This is partly\nwhat contributes to the much higher ratio of missed blocks on Kusama versus Polkadot today."]}),"\n",(0,o.jsx)(t.h2,{id:"auctions",children:"Auctions"}),"\n",(0,o.jsxs)(t.p,{children:["Kusama promised chaos, and it delivered on that promise. On June 15th, 2021, the roll out of the\nfirst public parachain slot ",(0,o.jsx)(t.a,{href:"/docs/learn/learn-auction",children:"auction"})," commenced, marking the\nbeginning of the end to deliver on the last piece of core functionality outlined in the Polkadot\nwhitepaper: purpose-built, interoperable parachains."]}),"\n",(0,o.jsxs)(t.p,{children:["Teams and projects looking to become an official parachain on the Kusama network have been working\nhard to bring their technologies to life, many of whom started a\n",(0,o.jsx)(t.a,{href:"/docs/learn/learn-crowdloans#starting-a-crowdloan-campaign",children:"crowdloan campaign"})," in order\nto participate in the auctions."]}),"\n",(0,o.jsx)(t.p,{children:"Kusama has made history with the permissionless launch of several independent parachains, and\ncontinues to do so with ongoing auction. As parachains become operational, the community will\ndetermine which additional features and network upgrades should be added over time."}),"\n",(0,o.jsx)(t.p,{children:"While Kusama\u2019s current parachains are taking advantage of the built-in features of the network and\nforkless upgradability provided by Substrate, chaos continues, and in the spirit of chaos, more\nteams are eager to deploy on Kusama. The path of Kusama deployment has paved the way to Polkadot's\nparachains as the technology became proven."})]})}function d(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(u,{...e})}):u(e)}},28453:(e,t,a)=>{a.d(t,{R:()=>s,x:()=>r});var n=a(96540);const o={},i=n.createContext(o);function s(e){const t=n.useContext(i);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:s(e.components),n.createElement(i.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/cfd53ea4.8db89c47.js b/assets/js/cfd53ea4.8db89c47.js deleted file mode 100644 index ca7ca0831648..000000000000 --- a/assets/js/cfd53ea4.8db89c47.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7482],{36531:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>l,contentTitle:()=>s,default:()=>d,frontMatter:()=>i,metadata:()=>r,toc:()=>h});var n=a(74848),o=a(28453);const i={id:"kusama-timeline",title:"Kusama Timeline",sidebar_label:"Timeline",description:"Stay up-to-date with the latest action on Kusama.",keywords:["timeline","roadmap","kusama"],slug:"../../kusama-timeline"},s=void 0,r={id:"general/kusama/kusama-timeline",title:"Kusama Timeline",description:"Stay up-to-date with the latest action on Kusama.",source:"@site/../docs/general/kusama/kusama-timeline.md",sourceDirName:"general/kusama",slug:"/kusama-timeline",permalink:"/docs/kusama-timeline",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/kusama/kusama-timeline.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1727943421e3,frontMatter:{id:"kusama-timeline",title:"Kusama Timeline",sidebar_label:"Timeline",description:"Stay up-to-date with the latest action on Kusama.",keywords:["timeline","roadmap","kusama"],slug:"../../kusama-timeline"},sidebar:"docs",previous:{title:"Home",permalink:"/docs/kusama-getting-started"},next:{title:"Code of Conduct",permalink:"/docs/kusama-coc"}},l={},h=[{value:"Rollout plan",id:"rollout-plan",level:2},{value:"Kusama's First Adventure",id:"kusamas-first-adventure",level:2},{value:"Auctions",id:"auctions",level:2}];function u(e){const t={a:"a",h2:"h2",p:"p",...(0,o.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.p,{children:"Kusama network started as a Proof-of-Authority network and was transitioned to Proof-of-Stake on\nOctober 28, 2019 at approximately 16:43 UTC. The first successful validator set rotation took place\nat 20:45 UTC."}),"\n",(0,n.jsx)(t.p,{children:"Currently, Kusama is a healthy Proof-of-Stake network with over 900 validators and over eight\nmillion blocks produced. If you are curious about the history of the Kusama network, you will find\nmore information in the sections below."}),"\n",(0,n.jsx)(t.h2,{id:"rollout-plan",children:"Rollout plan"}),"\n",(0,n.jsx)(t.p,{children:"The rollout of full functionality of Kusama was staggered to allow for a safe transition. The first\nPoS phase began with 20 validators. Of the 20, Web3 Foundation ran nine and Parity Technologies ran\nsix. Five were ran by highly staked community members as voted in by the Phragm\xe9n election."}),"\n",(0,n.jsx)(t.p,{children:"When the initial transition was successful, additional validator spots were opened 10 at a time in\norder to allow for more validators to enter the active set."}),"\n",(0,n.jsx)(t.p,{children:"When the first transition to PoS took place, the full functionality of Kusama was not fully\navailable. Notably, the Sudo key still existed and was used to initiate further upgrades. Balance\ntransfers were still disabled for a short while."}),"\n",(0,n.jsx)(t.p,{children:"Kusama now has its full functionality enabled."}),"\n",(0,n.jsx)(t.h2,{id:"kusamas-first-adventure",children:"Kusama's First Adventure"}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.a,{href:"https://polkadot.network/kusamas-first-adventure/",children:"Source"})}),"\n",(0,n.jsx)(t.p,{children:"On January 4, 2020, the Polkadot mainnet runtime, which at that time still wasn't live, was uploaded\nto the Kusama chain during a runtime upgrade. The mishap was due to a recent split of the Kusama\nlogic from the Polkadot logic and that runtime was not correctly named. This led to a halt of block\nproduction on the Kusama chain and bricked the chain entirely."}),"\n",(0,n.jsx)(t.p,{children:"The solution to the issue involved a rollback of the chain history before the problematic runtime\nupgrade. However, due to intricacies of the block production mechanism, it was also necessary to\nencapsulate the validators of the chain into a time bubble to trick them into believing that they\nwere producing blocks in the past. Furthermore, in order for the chain to catch up to the present\nmoment it was necessary to make time flow in the bubble at a speed of six times greater than the\nspeed of time in the real world. Therefore, the session of Kusama which would normally last one hour\nwould last only 10 minutes until the validators caught up to the present moment."}),"\n",(0,n.jsxs)(t.p,{children:["The above plan was executed successfully on January 7, 2020. Due to the time warp, the number of\nmissed blocks in the sessions directly following\n",(0,n.jsx)(t.a,{href:"https://kusama.subscan.io/block/516558",children:"block #516558"})," was significantly higher. This is partly\nwhat contributes to the much higher ratio of missed blocks on Kusama versus Polkadot today."]}),"\n",(0,n.jsx)(t.h2,{id:"auctions",children:"Auctions"}),"\n",(0,n.jsxs)(t.p,{children:["Kusama promised chaos, and it delivered on that promise. On June 15th, 2021, the roll out of the\nfirst public parachain slot ",(0,n.jsx)(t.a,{href:"/docs/learn/learn-auction",children:"auction"})," commenced, marking the\nbeginning of the end to deliver on the last piece of core functionality outlined in the Polkadot\nwhitepaper: purpose-built, interoperable parachains."]}),"\n",(0,n.jsxs)(t.p,{children:["Teams and projects looking to become an official parachain on the Kusama network have been working\nhard to bring their technologies to life, many of whom started a\n",(0,n.jsx)(t.a,{href:"/docs/learn/learn-crowdloans#starting-a-crowdloan-campaign",children:"crowdloan campaign"})," in order\nto participate in the auctions."]}),"\n",(0,n.jsx)(t.p,{children:"Kusama has made history with the permissionless launch of several independent parachains, and\ncontinues to do so with ongoing auction. As parachains become operational, the community will\ndetermine which additional features and network upgrades should be added over time."}),"\n",(0,n.jsx)(t.p,{children:"While Kusama\u2019s current parachains are taking advantage of the built-in features of the network and\nforkless upgradability provided by Substrate, chaos continues, and in the spirit of chaos, more\nteams are eager to deploy on Kusama. The path of Kusama deployment has paved the way to Polkadot's\nparachains as the technology became proven."})]})}function d(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(u,{...e})}):u(e)}},28453:(e,t,a)=>{a.d(t,{R:()=>s,x:()=>r});var n=a(96540);const o={},i=n.createContext(o);function s(e){const t=n.useContext(i);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:s(e.components),n.createElement(i.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/d000eb73.13c45bd8.js b/assets/js/d000eb73.13c45bd8.js new file mode 100644 index 000000000000..18bdfb29b38e --- /dev/null +++ b/assets/js/d000eb73.13c45bd8.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4228],{6124:(e,a,s)=>{s.r(a),s.d(a,{assets:()=>i,contentTitle:()=>l,default:()=>c,frontMatter:()=>d,metadata:()=>t,toc:()=>o});const t=JSON.parse('{"id":"general/dune-analytics/parachain-dashboards/stellaswap-dashboards","title":"Stellaswap Dashboards","description":"Stellaswap is the leading DEX on Moonbeam.","source":"@site/../docs/general/dune-analytics/parachain-dashboards/stellaswap-dashboards.md","sourceDirName":"general/dune-analytics/parachain-dashboards","slug":"/general/dune-analytics/stellaswap-dashboards","permalink":"/docs/general/dune-analytics/stellaswap-dashboards","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/parachain-dashboards/stellaswap-dashboards.md","tags":[],"version":"current","lastUpdatedBy":"MK","lastUpdatedAt":1719215716000,"frontMatter":{"id":"stellaswap-dashboards","title":"Stellaswap Dashboards","sidebar_label":"Stellaswap (Moonbeam)","description":"Stellaswap is the leading DEX on Moonbeam.","keywords":["polkadot","dashboard","dune","stellaswap","DeFi","moonbeam"],"slug":"../stellaswap-dashboards"},"sidebar":"docs","previous":{"title":"Snowbridge","permalink":"/docs/general/dune-analytics/snowbridge-dashboards"},"next":{"title":"Unique","permalink":"/docs/general/dune-analytics/unique-dashboards"}}');var n=s(74848),r=s(28453);const d={id:"stellaswap-dashboards",title:"Stellaswap Dashboards",sidebar_label:"Stellaswap (Moonbeam)",description:"Stellaswap is the leading DEX on Moonbeam.",keywords:["polkadot","dashboard","dune","stellaswap","DeFi","moonbeam"],slug:"../stellaswap-dashboards"},l="Stellaswap Dashboards",i={},o=[{value:"Overview",id:"overview",level:2},{value:"Featured Dashboards on Dune",id:"featured-dashboards-on-dune",level:2},{value:"Key Tables",id:"key-tables",level:2},{value:"Useful Queries",id:"useful-queries",level:2},{value:"Getting Started with Queries",id:"getting-started-with-queries",level:2}];function h(e){const a={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,r.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(a.header,{children:(0,n.jsx)(a.h1,{id:"stellaswap-dashboards",children:"Stellaswap Dashboards"})}),"\n",(0,n.jsx)(a.h2,{id:"overview",children:"Overview"}),"\n",(0,n.jsx)(a.p,{children:"Stellaswap is the leading DEX on Moonbeam, no matter whether you measure by volume, number of pools,\nor accounts using it. It also offers liquid staking for DOT."}),"\n",(0,n.jsx)(a.p,{children:"Users can swap from any asset to any other asset using an automated router that will calculate the\nmost efficient path."}),"\n",(0,n.jsx)(a.p,{children:"Liquidity providers can earn fees from the trades in the pools they provide liquidity to."}),"\n",(0,n.jsx)(a.h2,{id:"featured-dashboards-on-dune",children:"Featured Dashboards on Dune"}),"\n",(0,n.jsx)(a.p,{children:"Here you will find a variety of dashboards that help visualize data from StellaSwap:"}),"\n",(0,n.jsxs)(a.ul,{children:["\n",(0,n.jsxs)(a.li,{children:[(0,n.jsx)(a.a,{href:"https://dune.com/substrate/stellaswap",children:"stellaswap on Polkadot"}),": This dashboard provides a\ncomprehensive view of DEX volumes and liquidity on StellaSwap."]}),"\n"]}),"\n",(0,n.jsx)(a.h2,{id:"key-tables",children:"Key Tables"}),"\n",(0,n.jsxs)(a.p,{children:["Data from the stellaswap DEX is sourced directly from substrate moonbeam tables: ",(0,n.jsx)(a.code,{children:"moonbeam.events"})]}),"\n",(0,n.jsx)(a.h2,{id:"useful-queries",children:"Useful Queries"}),"\n",(0,n.jsx)(a.p,{children:"Some useful queries for Hydration are made available as materialized views."}),"\n",(0,n.jsxs)(a.table,{children:[(0,n.jsx)(a.thead,{children:(0,n.jsxs)(a.tr,{children:[(0,n.jsx)(a.th,{children:"Subject Area"}),(0,n.jsx)(a.th,{children:"Query"}),(0,n.jsx)(a.th,{children:"Materialized View"}),(0,n.jsx)(a.th,{children:"Description"})]})}),(0,n.jsxs)(a.tbody,{children:[(0,n.jsxs)(a.tr,{children:[(0,n.jsx)(a.td,{children:"Stellaswap V3 Trades"}),(0,n.jsx)(a.td,{children:(0,n.jsx)(a.a,{href:"https://dune.com/queries/3661633",children:"query_3661633"})}),(0,n.jsx)(a.td,{children:(0,n.jsx)(a.code,{children:"dune.substrate.result_stellaswap_v_3_trades"})}),(0,n.jsx)(a.td,{children:"Trades in V3 pools, similar to dex.trades format."})]}),(0,n.jsxs)(a.tr,{children:[(0,n.jsx)(a.td,{children:"Stellaswap V3 Trades (alt)"}),(0,n.jsx)(a.td,{children:(0,n.jsx)(a.a,{href:"https://dune.com/queries/3646057",children:"query_3646057"})}),(0,n.jsx)(a.td,{children:(0,n.jsx)(a.code,{children:"dune.substrate.result_stellaswap_v3_trades"})}),(0,n.jsx)(a.td,{children:"Trades in V3 pools, suitable for volume and price analysis"})]}),(0,n.jsxs)(a.tr,{children:[(0,n.jsx)(a.td,{children:"V3 Trades Enriched"}),(0,n.jsx)(a.td,{children:(0,n.jsx)(a.a,{href:"https://dune.com/queries/3656957",children:"query_3656957"})}),(0,n.jsx)(a.td,{children:(0,n.jsx)(a.code,{children:"dune.substrate.result_stellaswap_trades_enriched"})}),(0,n.jsx)(a.td,{children:"Trades in V3 pools, with USD equivalent prices."})]}),(0,n.jsxs)(a.tr,{children:[(0,n.jsx)(a.td,{children:"Stellaswap V3 Pools"}),(0,n.jsx)(a.td,{children:(0,n.jsx)(a.a,{href:"https://dune.com/queries/3639606",children:"query_3639606"})}),(0,n.jsxs)(a.td,{children:[(0,n.jsx)(a.code,{children:"dune.substrate.dataset_stella_pools"})," (dataset)"]}),(0,n.jsx)(a.td,{children:"Master data for the pools"})]})]})]}),"\n",(0,n.jsx)(a.p,{children:"The three queries presented are all very similar, but they are optimized for different use cases."}),"\n",(0,n.jsx)(a.p,{children:'Each trade will provide a token0 and token1, which are the two tokens traded. The order depends on\nthe order in the pool definition (see V3 pools query). Example: for the pool WGLMR-xcDOT, WGLMR is\ntoken0 and xcDOT is token1. Whether someone was buying or selling GLMR can be seen by the sign of\namount0. Positive means "selling", negative means "buying". Only one of the first of the three\nqueries above sorts the tokens into the right order.'}),"\n",(0,n.jsx)(a.p,{children:"The other queries keep token0 and token1 in the order in which they appear in the raw data, which\nalso makes it easier to aggregate for the price and volume."}),"\n",(0,n.jsx)(a.p,{children:"Pool master data is currently provided as a dataset directly, rather than parsed from events or from\na snapshot. This means the latest pools added may not be included in the dataset. (Remains a work in\nprogress.)"}),"\n",(0,n.jsx)(a.p,{children:"Dune users are encouraged to study the source code of the queries, including parts of a query that\nmay have been commented out for future use."}),"\n",(0,n.jsx)(a.p,{children:"Uncommenting these parts may accelerate your effort of adopting a query to a slightly different use\ncase."}),"\n",(0,n.jsx)(a.h2,{id:"getting-started-with-queries",children:"Getting Started with Queries"}),"\n",(0,n.jsx)(a.p,{children:"To get started with querying data from Stellaswap, you are welcome to use the mentioned materialized\nqueries. You can also use the following DuneSQL queries as examples:"}),"\n",(0,n.jsx)(a.pre,{children:(0,n.jsx)(a.code,{className:"language-sql",metastring:'title="Stellaswap Volume Last Day" showLineNumbers',children:"WITH maxts AS (\n SELECT\n MAX(DATE_TRUNC('day', block_time)) AS maxts\n FROM\n dune.substrate.result_stellaswap_trades_enriched T\n)\nSELECT\n DATE_TRUNC('day', block_time) AS date,\n T.token_pair,\n project_contract_address,\n current_timestamp - MAX(block_time) AS last_seen_ago,\n ROUND(SUM(ABS(amount_usd))) AS volume_usd,\n T.subquery\nFROM\n dune.substrate.result_stellaswap_trades_enriched T\nWHERE\n DATE_TRUNC('day', block_time) = (SELECT maxts FROM maxts)\nGROUP BY\n 1, 2, 3, 6\nORDER BY\n 1 DESC, 5 DESC;\n\n\n"})}),"\n",(0,n.jsx)(a.p,{children:"The query calculates the last available day's volume for each token pair. It also shows which pair\nwas used to calculate the USD value of the tokens involved. For example, if you trade a pair which\ncontains USDC or USDT, the dollar value of the trade is just the amount of USDC or USDT traded. For\nother pairs, the USD value is calculated using another currency as an intermediate, i.e. DOT or\nGLMR. Any pair which does not at least have one of these currencies will not have a USD value\ncalculated."}),"\n",(0,n.jsx)(a.p,{children:"Query result:"}),"\n",(0,n.jsx)("iframe",{src:"https://dune.com/embeds/3676341/6183229/",height:"350",width:"100%"}),"\n",(0,n.jsx)(a.admonition,{title:"DuneSQL Reference",type:"info",children:(0,n.jsxs)(a.p,{children:["For more information on DuneSQL, please refer to the ",(0,n.jsx)(a.a,{href:"/docs/general/dunesql-cheatsheet",children:"DuneSQL Cheatsheet"}),"\nand\n",(0,n.jsx)(a.a,{href:"https://docs.dune.com/query-engine/Functions-and-operators/index",children:"DuneSQL Official Documentation"}),"."]})})]})}function c(e={}){const{wrapper:a}={...(0,r.R)(),...e.components};return a?(0,n.jsx)(a,{...e,children:(0,n.jsx)(h,{...e})}):h(e)}},28453:(e,a,s)=>{s.d(a,{R:()=>d,x:()=>l});var t=s(96540);const n={},r=t.createContext(n);function d(e){const a=t.useContext(r);return t.useMemo((function(){return"function"==typeof e?e(a):{...a,...e}}),[a,e])}function l(e){let a;return a=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:d(e.components),t.createElement(r.Provider,{value:a},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/d000eb73.b7adf092.js b/assets/js/d000eb73.b7adf092.js deleted file mode 100644 index 692ba900d706..000000000000 --- a/assets/js/d000eb73.b7adf092.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4228],{88218:(e,a,s)=>{s.r(a),s.d(a,{assets:()=>i,contentTitle:()=>d,default:()=>c,frontMatter:()=>r,metadata:()=>l,toc:()=>o});var t=s(74848),n=s(28453);const r={id:"stellaswap-dashboards",title:"Stellaswap Dashboards",sidebar_label:"Stellaswap (Moonbeam)",description:"Stellaswap is the leading DEX on Moonbeam.",keywords:["polkadot","dashboard","dune","stellaswap","DeFi","moonbeam"],slug:"../stellaswap-dashboards"},d="Stellaswap Dashboards",l={id:"general/dune-analytics/parachain-dashboards/stellaswap-dashboards",title:"Stellaswap Dashboards",description:"Stellaswap is the leading DEX on Moonbeam.",source:"@site/../docs/general/dune-analytics/parachain-dashboards/stellaswap-dashboards.md",sourceDirName:"general/dune-analytics/parachain-dashboards",slug:"/general/dune-analytics/stellaswap-dashboards",permalink:"/docs/general/dune-analytics/stellaswap-dashboards",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/parachain-dashboards/stellaswap-dashboards.md",tags:[],version:"current",lastUpdatedBy:"MK",lastUpdatedAt:1719215716e3,frontMatter:{id:"stellaswap-dashboards",title:"Stellaswap Dashboards",sidebar_label:"Stellaswap (Moonbeam)",description:"Stellaswap is the leading DEX on Moonbeam.",keywords:["polkadot","dashboard","dune","stellaswap","DeFi","moonbeam"],slug:"../stellaswap-dashboards"},sidebar:"docs",previous:{title:"Snowbridge",permalink:"/docs/general/dune-analytics/snowbridge-dashboards"},next:{title:"Unique",permalink:"/docs/general/dune-analytics/unique-dashboards"}},i={},o=[{value:"Overview",id:"overview",level:2},{value:"Featured Dashboards on Dune",id:"featured-dashboards-on-dune",level:2},{value:"Key Tables",id:"key-tables",level:2},{value:"Useful Queries",id:"useful-queries",level:2},{value:"Getting Started with Queries",id:"getting-started-with-queries",level:2}];function h(e){const a={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,n.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(a.header,{children:(0,t.jsx)(a.h1,{id:"stellaswap-dashboards",children:"Stellaswap Dashboards"})}),"\n",(0,t.jsx)(a.h2,{id:"overview",children:"Overview"}),"\n",(0,t.jsx)(a.p,{children:"Stellaswap is the leading DEX on Moonbeam, no matter whether you measure by volume, number of pools,\nor accounts using it. It also offers liquid staking for DOT."}),"\n",(0,t.jsx)(a.p,{children:"Users can swap from any asset to any other asset using an automated router that will calculate the\nmost efficient path."}),"\n",(0,t.jsx)(a.p,{children:"Liquidity providers can earn fees from the trades in the pools they provide liquidity to."}),"\n",(0,t.jsx)(a.h2,{id:"featured-dashboards-on-dune",children:"Featured Dashboards on Dune"}),"\n",(0,t.jsx)(a.p,{children:"Here you will find a variety of dashboards that help visualize data from StellaSwap:"}),"\n",(0,t.jsxs)(a.ul,{children:["\n",(0,t.jsxs)(a.li,{children:[(0,t.jsx)(a.a,{href:"https://dune.com/substrate/stellaswap",children:"stellaswap on Polkadot"}),": This dashboard provides a\ncomprehensive view of DEX volumes and liquidity on StellaSwap."]}),"\n"]}),"\n",(0,t.jsx)(a.h2,{id:"key-tables",children:"Key Tables"}),"\n",(0,t.jsxs)(a.p,{children:["Data from the stellaswap DEX is sourced directly from substrate moonbeam tables: ",(0,t.jsx)(a.code,{children:"moonbeam.events"})]}),"\n",(0,t.jsx)(a.h2,{id:"useful-queries",children:"Useful Queries"}),"\n",(0,t.jsx)(a.p,{children:"Some useful queries for Hydration are made available as materialized views."}),"\n",(0,t.jsxs)(a.table,{children:[(0,t.jsx)(a.thead,{children:(0,t.jsxs)(a.tr,{children:[(0,t.jsx)(a.th,{children:"Subject Area"}),(0,t.jsx)(a.th,{children:"Query"}),(0,t.jsx)(a.th,{children:"Materialized View"}),(0,t.jsx)(a.th,{children:"Description"})]})}),(0,t.jsxs)(a.tbody,{children:[(0,t.jsxs)(a.tr,{children:[(0,t.jsx)(a.td,{children:"Stellaswap V3 Trades"}),(0,t.jsx)(a.td,{children:(0,t.jsx)(a.a,{href:"https://dune.com/queries/3661633",children:"query_3661633"})}),(0,t.jsx)(a.td,{children:(0,t.jsx)(a.code,{children:"dune.substrate.result_stellaswap_v_3_trades"})}),(0,t.jsx)(a.td,{children:"Trades in V3 pools, similar to dex.trades format."})]}),(0,t.jsxs)(a.tr,{children:[(0,t.jsx)(a.td,{children:"Stellaswap V3 Trades (alt)"}),(0,t.jsx)(a.td,{children:(0,t.jsx)(a.a,{href:"https://dune.com/queries/3646057",children:"query_3646057"})}),(0,t.jsx)(a.td,{children:(0,t.jsx)(a.code,{children:"dune.substrate.result_stellaswap_v3_trades"})}),(0,t.jsx)(a.td,{children:"Trades in V3 pools, suitable for volume and price analysis"})]}),(0,t.jsxs)(a.tr,{children:[(0,t.jsx)(a.td,{children:"V3 Trades Enriched"}),(0,t.jsx)(a.td,{children:(0,t.jsx)(a.a,{href:"https://dune.com/queries/3656957",children:"query_3656957"})}),(0,t.jsx)(a.td,{children:(0,t.jsx)(a.code,{children:"dune.substrate.result_stellaswap_trades_enriched"})}),(0,t.jsx)(a.td,{children:"Trades in V3 pools, with USD equivalent prices."})]}),(0,t.jsxs)(a.tr,{children:[(0,t.jsx)(a.td,{children:"Stellaswap V3 Pools"}),(0,t.jsx)(a.td,{children:(0,t.jsx)(a.a,{href:"https://dune.com/queries/3639606",children:"query_3639606"})}),(0,t.jsxs)(a.td,{children:[(0,t.jsx)(a.code,{children:"dune.substrate.dataset_stella_pools"})," (dataset)"]}),(0,t.jsx)(a.td,{children:"Master data for the pools"})]})]})]}),"\n",(0,t.jsx)(a.p,{children:"The three queries presented are all very similar, but they are optimized for different use cases."}),"\n",(0,t.jsx)(a.p,{children:'Each trade will provide a token0 and token1, which are the two tokens traded. The order depends on\nthe order in the pool definition (see V3 pools query). Example: for the pool WGLMR-xcDOT, WGLMR is\ntoken0 and xcDOT is token1. Whether someone was buying or selling GLMR can be seen by the sign of\namount0. Positive means "selling", negative means "buying". Only one of the first of the three\nqueries above sorts the tokens into the right order.'}),"\n",(0,t.jsx)(a.p,{children:"The other queries keep token0 and token1 in the order in which they appear in the raw data, which\nalso makes it easier to aggregate for the price and volume."}),"\n",(0,t.jsx)(a.p,{children:"Pool master data is currently provided as a dataset directly, rather than parsed from events or from\na snapshot. This means the latest pools added may not be included in the dataset. (Remains a work in\nprogress.)"}),"\n",(0,t.jsx)(a.p,{children:"Dune users are encouraged to study the source code of the queries, including parts of a query that\nmay have been commented out for future use."}),"\n",(0,t.jsx)(a.p,{children:"Uncommenting these parts may accelerate your effort of adopting a query to a slightly different use\ncase."}),"\n",(0,t.jsx)(a.h2,{id:"getting-started-with-queries",children:"Getting Started with Queries"}),"\n",(0,t.jsx)(a.p,{children:"To get started with querying data from Stellaswap, you are welcome to use the mentioned materialized\nqueries. You can also use the following DuneSQL queries as examples:"}),"\n",(0,t.jsx)(a.pre,{children:(0,t.jsx)(a.code,{className:"language-sql",metastring:'title="Stellaswap Volume Last Day" showLineNumbers',children:"WITH maxts AS (\n SELECT\n MAX(DATE_TRUNC('day', block_time)) AS maxts\n FROM\n dune.substrate.result_stellaswap_trades_enriched T\n)\nSELECT\n DATE_TRUNC('day', block_time) AS date,\n T.token_pair,\n project_contract_address,\n current_timestamp - MAX(block_time) AS last_seen_ago,\n ROUND(SUM(ABS(amount_usd))) AS volume_usd,\n T.subquery\nFROM\n dune.substrate.result_stellaswap_trades_enriched T\nWHERE\n DATE_TRUNC('day', block_time) = (SELECT maxts FROM maxts)\nGROUP BY\n 1, 2, 3, 6\nORDER BY\n 1 DESC, 5 DESC;\n\n\n"})}),"\n",(0,t.jsx)(a.p,{children:"The query calculates the last available day's volume for each token pair. It also shows which pair\nwas used to calculate the USD value of the tokens involved. For example, if you trade a pair which\ncontains USDC or USDT, the dollar value of the trade is just the amount of USDC or USDT traded. For\nother pairs, the USD value is calculated using another currency as an intermediate, i.e. DOT or\nGLMR. Any pair which does not at least have one of these currencies will not have a USD value\ncalculated."}),"\n",(0,t.jsx)(a.p,{children:"Query result:"}),"\n",(0,t.jsx)("iframe",{src:"https://dune.com/embeds/3676341/6183229/",height:"350",width:"100%"}),"\n",(0,t.jsx)(a.admonition,{title:"DuneSQL Reference",type:"info",children:(0,t.jsxs)(a.p,{children:["For more information on DuneSQL, please refer to the ",(0,t.jsx)(a.a,{href:"/docs/general/dunesql-cheatsheet",children:"DuneSQL Cheatsheet"}),"\nand\n",(0,t.jsx)(a.a,{href:"https://docs.dune.com/query-engine/Functions-and-operators/index",children:"DuneSQL Official Documentation"}),"."]})})]})}function c(e={}){const{wrapper:a}={...(0,n.R)(),...e.components};return a?(0,t.jsx)(a,{...e,children:(0,t.jsx)(h,{...e})}):h(e)}},28453:(e,a,s)=>{s.d(a,{R:()=>d,x:()=>l});var t=s(96540);const n={},r=t.createContext(n);function d(e){const a=t.useContext(r);return t.useMemo((function(){return"function"==typeof e?e(a):{...a,...e}}),[a,e])}function l(e){let a;return a=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:d(e.components),t.createElement(r.Provider,{value:a},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/d27ae88d.2848c59c.js b/assets/js/d27ae88d.2848c59c.js new file mode 100644 index 000000000000..507ee02ec104 --- /dev/null +++ b/assets/js/d27ae88d.2848c59c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3170],{93346:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>d,contentTitle:()=>a,default:()=>p,frontMatter:()=>o,metadata:()=>i,toc:()=>n});const i=JSON.parse('{"id":"learn/learn-video-tutorials","title":"Videos about Polkadot","description":"Videos about Polkadot and Related Topics.","source":"@site/../docs/learn/learn-video-tutorials.md","sourceDirName":"learn","slug":"/learn-video-tutorials","permalink":"/docs/learn-video-tutorials","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-video-tutorials.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1712240548000,"frontMatter":{"id":"learn-video-tutorials","title":"Videos about Polkadot","sidebar_label":"Videos","description":"Videos about Polkadot and Related Topics.","keywords":["learn","video","tutorials","explainers"],"slug":"../learn-video-tutorials"},"sidebar":"docs","previous":{"title":"Layer Two and Rollups","permalink":"/docs/learn-comparisons-rollups"},"next":{"title":"Future Implementations","permalink":"/docs/learn-future-implementations-index"}}');var l=t(74848),r=t(28453);const o={id:"learn-video-tutorials",title:"Videos about Polkadot",sidebar_label:"Videos",description:"Videos about Polkadot and Related Topics.",keywords:["learn","video","tutorials","explainers"],slug:"../learn-video-tutorials"},a=void 0,d={},n=[{value:"Ongoing Series",id:"ongoing-series",level:2},{value:"Past Events",id:"past-events",level:2}];function c(e){const s={a:"a",admonition:"admonition",h2:"h2",p:"p",...(0,r.R)(),...e.components};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(s.admonition,{title:"Visit the Polkadot YouTube Channel",type:"info",children:(0,l.jsxs)(s.p,{children:["For more videos see all playlists on the\n",(0,l.jsx)(s.a,{href:"https://www.youtube.com/@PolkadotNetwork/playlists",children:"Polkadot YouTube channel"}),"."]})}),"\n",(0,l.jsx)(s.h2,{id:"ongoing-series",children:"Ongoing Series"}),"\n",(0,l.jsx)(s.p,{children:"Learn about Polkadot and Substrate at a deeper level with these ongoing deep dives, technical\nseminars, and initiatives within the ecosystem."}),"\n",(0,l.jsxs)("div",{className:"row",children:[(0,l.jsxs)("div",{className:"col text--center",children:[(0,l.jsx)("a",{href:"https://youtube.com/playlist?list=PLOyWqupZ-WGuAuS00rK-pebTMAOxW41W8",children:(0,l.jsx)("img",{src:"https://i.ytimg.com/vi/mOZe_OprONQ/hqdefault.jpg?sqp=-oaymwEXCNACELwBSFryq4qpAwkIARUAAIhCGAE=&rs=AOn4CLBzCSiH7ORM0BfUqJKpoy70_Hv3ZQ",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,l.jsx)("p",{children:(0,l.jsx)("a",{href:"https://youtube.com/playlist?list=PLOyWqupZ-WGuAuS00rK-pebTMAOxW41W8",children:"Technical Explainers"})})]}),(0,l.jsxs)("div",{className:"col text--center",children:[(0,l.jsx)("a",{href:"https://youtube.com/playlist?list=PLOyWqupZ-WGvJuOchUyo6eFB_RA76mv3h",children:(0,l.jsx)("img",{src:"https://i.ytimg.com/vi/tbewfQM_19c/hqdefault.jpg?sqp=-oaymwEXCNACELwBSFryq4qpAwkIARUAAIhCGAE=&rs=AOn4CLDzJbgSFKb3wupT8g1L5dhIr2nIYA",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,l.jsx)("p",{children:(0,l.jsx)("a",{href:"https://youtube.com/playlist?list=PLOyWqupZ-WGvJuOchUyo6eFB_RA76mv3h",children:"Polkadot Community Calls"})})]})]}),"\n",(0,l.jsx)(s.h2,{id:"past-events",children:"Past Events"}),"\n",(0,l.jsxs)("div",{className:"row",children:[(0,l.jsxs)("div",{className:"col text--center",children:[(0,l.jsx)("a",{href:"https://www.youtube.com/playlist?list=PLOyWqupZ-WGuRyaTrepJ3SYxO1xQ0NyCn",children:(0,l.jsx)("img",{src:"https://i.ytimg.com/vi/alg8KZKyUKI/hqdefault.jpg?sqp=-oaymwEXCNACELwBSFryq4qpAwkIARUAAIhCGAE=&rs=AOn4CLAnGMQRbYdpEk44RYRTb1il_Vg4lA",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,l.jsx)("p",{children:(0,l.jsx)("a",{href:"https://www.youtube.com/playlist?list=PLOyWqupZ-WGuRyaTrepJ3SYxO1xQ0NyCn",children:"ETH Denver 2024"})})]}),(0,l.jsxs)("div",{className:"col text--center",children:[(0,l.jsx)("a",{href:"https://youtube.com/playlist?list=PLOyWqupZ-WGsfgxkwTdMOwnbRW4nx_T-i",children:(0,l.jsx)("img",{src:"https://i.ytimg.com/vi/aEWbZxNCH0A/hqdefault.jpg?sqp=-oaymwExCNACELwBSFryq4qpAyMIARUAAIhCGAHwAQH4Af4JgALQBYoCDAgAEAEYfyATKE4wDw==&rs=AOn4CLDIzXNOiP1uDZ0b-UTGcdnMuR1ZKg",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,l.jsx)("p",{children:(0,l.jsx)("a",{href:"https://youtube.com/playlist?list=PLOyWqupZ-WGsfgxkwTdMOwnbRW4nx_T-i",children:"Substrate Seminars"})})]}),(0,l.jsxs)("div",{className:"col text--center",children:[(0,l.jsx)("a",{href:"https://www.youtube.com/playlist?list=PLOyWqupZ-WGsJjsxWZ4rZGD7mZOvrWfWK",children:(0,l.jsx)("img",{src:"https://i.ytimg.com/vi/PRnuU0Y2GS4/hqdefault.jpg?sqp=-oaymwExCNACELwBSFryq4qpAyMIARUAAIhCGAHwAQH4Af4JgALQBYoCDAgAEAEYZSBlKGUwDw==&rs=AOn4CLDAKIXyawftGdyzP8TZQ2aMlEyXTA",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,l.jsx)("p",{children:(0,l.jsx)("a",{href:"https://www.youtube.com/playlist?list=PLOyWqupZ-WGsJjsxWZ4rZGD7mZOvrWfWK",children:"Polkadot Developer Heroes"})})]})]}),"\n",(0,l.jsxs)("div",{className:"row",children:[(0,l.jsxs)("div",{className:"col text--center",children:[(0,l.jsx)("a",{href:"https://youtube.com/playlist?list=PLOyWqupZ-WGsfnlpkk0KWX3uS4yg6ZztG",children:(0,l.jsx)("img",{src:"https://i.ytimg.com/vi/xLNBUhuOG-8/hqdefault.jpg?sqp=-oaymwEXCNACELwBSFryq4qpAwkIARUAAIhCGAE=&rs=AOn4CLBLM6PlTJeoL-8S4tl-8x13ySw4Bg",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,l.jsx)("p",{children:(0,l.jsx)("a",{href:"https://youtube.com/playlist?list=PLOyWqupZ-WGsfnlpkk0KWX3uS4yg6ZztG",children:"Polkadot Deep Dives"})})]}),(0,l.jsxs)("div",{className:"col text--center",children:[(0,l.jsx)("a",{href:"https://youtube.com/playlist?list=PLOyWqupZ-WGtxijJor37g5GmUqVgUvGDt",children:(0,l.jsx)("img",{src:"https://i.ytimg.com/vi/L6DI6cLsIKg/hqdefault.jpg?sqp=-oaymwEXCNACELwBSFryq4qpAwkIARUAAIhCGAE=&rs=AOn4CLCFTkvrUAEtvh2d3bXAtU0_83_JeQ",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,l.jsx)("p",{children:(0,l.jsx)("a",{href:"https://youtube.com/playlist?list=PLOyWqupZ-WGtxijJor37g5GmUqVgUvGDt",children:"Polkadot Decoded 2023"})})]}),(0,l.jsxs)("div",{className:"col text--center",children:[(0,l.jsx)("a",{href:"https://youtube.com/playlist?list=PLOyWqupZ-WGthz-1qCz9RozF9N2ywyb4V",children:(0,l.jsx)("img",{src:"https://i.ytimg.com/vi/uw3uO94tCLM/hqdefault.jpg?sqp=-oaymwEXCNACELwBSFryq4qpAwkIARUAAIhCGAE=&rs=AOn4CLC7_wrDvI3zuxK0gluk4z8fojS8UA",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,l.jsx)("p",{children:(0,l.jsx)("a",{href:"https://youtube.com/playlist?list=PLOyWqupZ-WGthz-1qCz9RozF9N2ywyb4V",children:"Polkadot Blockchain Academy 2023"})})]})]}),"\n",(0,l.jsxs)("div",{className:"row",children:[(0,l.jsxs)("div",{className:"col text--center",children:[(0,l.jsx)("a",{href:"https://youtube.com/playlist?list=PLOyWqupZ-WGsnACsCmWH7PO-0paz9zlQ8",children:(0,l.jsx)("img",{src:"https://i.ytimg.com/vi/29Ty-VTDnh4/hqdefault.jpg?sqp=-oaymwEXCNACELwBSFryq4qpAwkIARUAAIhCGAE=&rs=AOn4CLCtiKLbmKTPzConIl8l7UHdjuNOFQ",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,l.jsx)("p",{children:(0,l.jsx)("a",{href:"https://youtube.com/playlist?list=PLOyWqupZ-WGsnACsCmWH7PO-0paz9zlQ8",children:"Polkadot for Beginners"})})]}),(0,l.jsxs)("div",{className:"col text--center",children:[(0,l.jsx)("a",{href:"https://youtube.com/playlist?list=PLOyWqupZ-WGsbca2vOnkS3l6j53G6ZS_E",children:(0,l.jsx)("img",{src:"https://i.ytimg.com/vi/yJfZuIo8Otc/hqdefault.jpg?sqp=-oaymwEXCNACELwBSFryq4qpAwkIARUAAIhCGAE=&rs=AOn4CLD959UNR1MfEq91SiCeEPz49cvWKQ",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,l.jsx)("p",{children:(0,l.jsx)("a",{href:"https://youtube.com/playlist?list=PLOyWqupZ-WGsbca2vOnkS3l6j53G6ZS_E",children:"ETH Denver 2023"})})]}),(0,l.jsxs)("div",{className:"col text--center",children:[(0,l.jsx)("a",{href:"https://youtube.com/playlist?list=PLOyWqupZ-WGvgdDcF-dW4RVEoeFZiZmQc",children:(0,l.jsx)("img",{src:"https://i.ytimg.com/vi/gS0T32-34uU/hqdefault.jpg?sqp=-oaymwEXCNACELwBSFryq4qpAwkIARUAAIhCGAE=&rs=AOn4CLBnXZ6DTc6FTodksS9r8BtEq9jQiw",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,l.jsx)("p",{children:(0,l.jsx)("a",{href:"https://youtube.com/playlist?list=PLOyWqupZ-WGvgdDcF-dW4RVEoeFZiZmQc",children:"Encode Polkadot Club"})})]})]}),"\n",(0,l.jsxs)("div",{className:"row",children:[(0,l.jsxs)("div",{className:"col text--center",children:[(0,l.jsx)("a",{href:"https://youtube.com/playlist?list=PLOyWqupZ-WGvywLqJDsMIYdCn8QEa2ShQ",children:(0,l.jsx)("img",{src:"https://i.ytimg.com/vi/2MnrABFLxik/hqdefault.jpg?sqp=-oaymwExCNACELwBSFryq4qpAyMIARUAAIhCGAHwAQH4Af4JgALQBYoCDAgAEAEYEyBJKH8wDw==&rs=AOn4CLANOBoKneWomu-zn7q-n3h0VtH1rA",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,l.jsx)("p",{children:(0,l.jsx)("a",{href:"https://youtube.com/playlist?list=PLOyWqupZ-WGvywLqJDsMIYdCn8QEa2ShQ",children:"Sub0 2022"})})]}),(0,l.jsxs)("div",{className:"col text--center",children:[(0,l.jsx)("a",{href:"https://youtube.com/playlist?list=PLOyWqupZ-WGvcE0HKKnORiFqWNv5onxCf",children:(0,l.jsx)("img",{src:"https://i.ytimg.com/vi/TtC_LQmqg_g/hqdefault.jpg?sqp=-oaymwExCNACELwBSFryq4qpAyMIARUAAIhCGAHwAQH4Af4JgALQBYoCDAgAEAEYfyATKE8wDw==&rs=AOn4CLCFLec74_QWVA5pAHYA6BAnXeX5Tg",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,l.jsx)("p",{children:(0,l.jsx)("a",{href:"https://youtube.com/playlist?list=PLOyWqupZ-WGvcE0HKKnORiFqWNv5onxCf",children:"Polkadot Decoded 2022"})})]}),(0,l.jsxs)("div",{className:"col text--center",children:[(0,l.jsx)("a",{href:"https://youtube.com/playlist?list=PLOyWqupZ-WGuA9BWEP4_zRiLwHzXb1zE9",children:(0,l.jsx)("img",{src:"https://i.ytimg.com/vi/xgPZnOulBCE/hqdefault.jpg?sqp=-oaymwEXCNACELwBSFryq4qpAwkIARUAAIhCGAE=&rs=AOn4CLC4tBsi9wRCBFywlKBtRjgkO2IZeA",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,l.jsx)("p",{children:(0,l.jsx)("a",{href:"https://youtube.com/playlist?list=PLOyWqupZ-WGuA9BWEP4_zRiLwHzXb1zE9",children:"Polkadot in Davos 2022"})})]})]}),"\n",(0,l.jsxs)("div",{className:"row",children:[(0,l.jsxs)("div",{className:"col text--center",children:[(0,l.jsx)("a",{href:"https://youtube.com/playlist?list=PLOyWqupZ-WGsLEJq0sRyvUD-pWuVwA5yg",children:(0,l.jsx)("img",{src:"https://i.ytimg.com/vi/9B10wX9Mphc/hqdefault.jpg?sqp=-oaymwEXCNACELwBSFryq4qpAwkIARUAAIhCGAE=&rs=AOn4CLDLTOmqKe80ui-_Y2hoD4PU5-1kKQ",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,l.jsx)("p",{children:(0,l.jsx)("a",{href:"https://youtube.com/playlist?list=PLOyWqupZ-WGsLEJq0sRyvUD-pWuVwA5yg",children:"Polkadot Webminars"})})]}),(0,l.jsxs)("div",{className:"col text--center",children:[(0,l.jsx)("a",{href:"https://youtube.com/playlist?list=PLOyWqupZ-WGsFyiLL4AOn24obxfZzXTFO",children:(0,l.jsx)("img",{src:"https://i.ytimg.com/vi/PeIeCaVAlRc/hqdefault.jpg?sqp=-oaymwEXCNACELwBSFryq4qpAwkIARUAAIhCGAE=&rs=AOn4CLBmsAbnUhuGsGWxb3eO3z51TwphIQ",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,l.jsx)("p",{children:(0,l.jsx)("a",{href:"https://youtube.com/playlist?list=PLOyWqupZ-WGsFyiLL4AOn24obxfZzXTFO",children:"Hackathon North America"})})]}),(0,l.jsxs)("div",{className:"col text--center",children:[(0,l.jsx)("a",{href:"https://youtube.com/playlist?list=PLOyWqupZ-WGve3__mfw7wX4tY1pWj8ExG",children:(0,l.jsx)("img",{src:"https://i.ytimg.com/vi/fMokQz5gRgE/hqdefault.jpg?sqp=-oaymwExCNACELwBSFryq4qpAyMIARUAAIhCGAHwAQH4AdQGgALgA4oCDAgAEAEYWiBaKFowDw==&rs=AOn4CLB7_c3mQKypuhL1b2buU-Rb9f5nOw",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,l.jsx)("p",{children:(0,l.jsx)("a",{href:"https://youtube.com/playlist?list=PLOyWqupZ-WGve3__mfw7wX4tY1pWj8ExG",children:"Hackathon Global Series"})})]})]}),"\n",(0,l.jsxs)("div",{className:"row",children:[(0,l.jsxs)("div",{className:"col text--center",children:[(0,l.jsx)("a",{href:"https://youtu.be/xBfC6uTjvbM?feature=shared",children:(0,l.jsx)("img",{src:"https://i.ytimg.com/vi/xBfC6uTjvbM/hqdefault.jpg?sqp=-oaymwEbCKgBEF5IVfKriqkDDggBFQAAiEIYAXABwAEG&rs=AOn4CLCA6vdCF0Xsv1iSbLh5icf61Meauw",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,l.jsx)("p",{children:(0,l.jsx)("a",{href:"https://youtu.be/xBfC6uTjvbM?feature=shared",children:"Polkadot Whiteboard Series"})})]}),(0,l.jsx)("div",{className:"col text--center"}),(0,l.jsx)("div",{className:"col text--center"})]})]})}function p(e={}){const{wrapper:s}={...(0,r.R)(),...e.components};return s?(0,l.jsx)(s,{...e,children:(0,l.jsx)(c,{...e})}):c(e)}},28453:(e,s,t)=>{t.d(s,{R:()=>o,x:()=>a});var i=t(96540);const l={},r=i.createContext(l);function o(e){const s=i.useContext(r);return i.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function a(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(l):e.components||l:o(e.components),i.createElement(r.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/d27ae88d.d2509d94.js b/assets/js/d27ae88d.d2509d94.js deleted file mode 100644 index 5bd834235f2a..000000000000 --- a/assets/js/d27ae88d.d2509d94.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3170],{63366:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>d,contentTitle:()=>o,default:()=>p,frontMatter:()=>r,metadata:()=>a,toc:()=>n});var i=t(74848),l=t(28453);const r={id:"learn-video-tutorials",title:"Videos about Polkadot",sidebar_label:"Videos",description:"Videos about Polkadot and Related Topics.",keywords:["learn","video","tutorials","explainers"],slug:"../learn-video-tutorials"},o=void 0,a={id:"learn/learn-video-tutorials",title:"Videos about Polkadot",description:"Videos about Polkadot and Related Topics.",source:"@site/../docs/learn/learn-video-tutorials.md",sourceDirName:"learn",slug:"/learn-video-tutorials",permalink:"/docs/learn-video-tutorials",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-video-tutorials.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1712240548e3,frontMatter:{id:"learn-video-tutorials",title:"Videos about Polkadot",sidebar_label:"Videos",description:"Videos about Polkadot and Related Topics.",keywords:["learn","video","tutorials","explainers"],slug:"../learn-video-tutorials"},sidebar:"docs",previous:{title:"Layer Two and Rollups",permalink:"/docs/learn-comparisons-rollups"},next:{title:"Future Implementations",permalink:"/docs/learn-future-implementations-index"}},d={},n=[{value:"Ongoing Series",id:"ongoing-series",level:2},{value:"Past Events",id:"past-events",level:2}];function c(e){const s={a:"a",admonition:"admonition",h2:"h2",p:"p",...(0,l.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(s.admonition,{title:"Visit the Polkadot YouTube Channel",type:"info",children:(0,i.jsxs)(s.p,{children:["For more videos see all playlists on the\n",(0,i.jsx)(s.a,{href:"https://www.youtube.com/@PolkadotNetwork/playlists",children:"Polkadot YouTube channel"}),"."]})}),"\n",(0,i.jsx)(s.h2,{id:"ongoing-series",children:"Ongoing Series"}),"\n",(0,i.jsx)(s.p,{children:"Learn about Polkadot and Substrate at a deeper level with these ongoing deep dives, technical\nseminars, and initiatives within the ecosystem."}),"\n",(0,i.jsxs)("div",{className:"row",children:[(0,i.jsxs)("div",{className:"col text--center",children:[(0,i.jsx)("a",{href:"https://youtube.com/playlist?list=PLOyWqupZ-WGuAuS00rK-pebTMAOxW41W8",children:(0,i.jsx)("img",{src:"https://i.ytimg.com/vi/mOZe_OprONQ/hqdefault.jpg?sqp=-oaymwEXCNACELwBSFryq4qpAwkIARUAAIhCGAE=&rs=AOn4CLBzCSiH7ORM0BfUqJKpoy70_Hv3ZQ",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,i.jsx)("p",{children:(0,i.jsx)("a",{href:"https://youtube.com/playlist?list=PLOyWqupZ-WGuAuS00rK-pebTMAOxW41W8",children:"Technical Explainers"})})]}),(0,i.jsxs)("div",{className:"col text--center",children:[(0,i.jsx)("a",{href:"https://youtube.com/playlist?list=PLOyWqupZ-WGvJuOchUyo6eFB_RA76mv3h",children:(0,i.jsx)("img",{src:"https://i.ytimg.com/vi/tbewfQM_19c/hqdefault.jpg?sqp=-oaymwEXCNACELwBSFryq4qpAwkIARUAAIhCGAE=&rs=AOn4CLDzJbgSFKb3wupT8g1L5dhIr2nIYA",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,i.jsx)("p",{children:(0,i.jsx)("a",{href:"https://youtube.com/playlist?list=PLOyWqupZ-WGvJuOchUyo6eFB_RA76mv3h",children:"Polkadot Community Calls"})})]})]}),"\n",(0,i.jsx)(s.h2,{id:"past-events",children:"Past Events"}),"\n",(0,i.jsxs)("div",{className:"row",children:[(0,i.jsxs)("div",{className:"col text--center",children:[(0,i.jsx)("a",{href:"https://www.youtube.com/playlist?list=PLOyWqupZ-WGuRyaTrepJ3SYxO1xQ0NyCn",children:(0,i.jsx)("img",{src:"https://i.ytimg.com/vi/alg8KZKyUKI/hqdefault.jpg?sqp=-oaymwEXCNACELwBSFryq4qpAwkIARUAAIhCGAE=&rs=AOn4CLAnGMQRbYdpEk44RYRTb1il_Vg4lA",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,i.jsx)("p",{children:(0,i.jsx)("a",{href:"https://www.youtube.com/playlist?list=PLOyWqupZ-WGuRyaTrepJ3SYxO1xQ0NyCn",children:"ETH Denver 2024"})})]}),(0,i.jsxs)("div",{className:"col text--center",children:[(0,i.jsx)("a",{href:"https://youtube.com/playlist?list=PLOyWqupZ-WGsfgxkwTdMOwnbRW4nx_T-i",children:(0,i.jsx)("img",{src:"https://i.ytimg.com/vi/aEWbZxNCH0A/hqdefault.jpg?sqp=-oaymwExCNACELwBSFryq4qpAyMIARUAAIhCGAHwAQH4Af4JgALQBYoCDAgAEAEYfyATKE4wDw==&rs=AOn4CLDIzXNOiP1uDZ0b-UTGcdnMuR1ZKg",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,i.jsx)("p",{children:(0,i.jsx)("a",{href:"https://youtube.com/playlist?list=PLOyWqupZ-WGsfgxkwTdMOwnbRW4nx_T-i",children:"Substrate Seminars"})})]}),(0,i.jsxs)("div",{className:"col text--center",children:[(0,i.jsx)("a",{href:"https://www.youtube.com/playlist?list=PLOyWqupZ-WGsJjsxWZ4rZGD7mZOvrWfWK",children:(0,i.jsx)("img",{src:"https://i.ytimg.com/vi/PRnuU0Y2GS4/hqdefault.jpg?sqp=-oaymwExCNACELwBSFryq4qpAyMIARUAAIhCGAHwAQH4Af4JgALQBYoCDAgAEAEYZSBlKGUwDw==&rs=AOn4CLDAKIXyawftGdyzP8TZQ2aMlEyXTA",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,i.jsx)("p",{children:(0,i.jsx)("a",{href:"https://www.youtube.com/playlist?list=PLOyWqupZ-WGsJjsxWZ4rZGD7mZOvrWfWK",children:"Polkadot Developer Heroes"})})]})]}),"\n",(0,i.jsxs)("div",{className:"row",children:[(0,i.jsxs)("div",{className:"col text--center",children:[(0,i.jsx)("a",{href:"https://youtube.com/playlist?list=PLOyWqupZ-WGsfnlpkk0KWX3uS4yg6ZztG",children:(0,i.jsx)("img",{src:"https://i.ytimg.com/vi/xLNBUhuOG-8/hqdefault.jpg?sqp=-oaymwEXCNACELwBSFryq4qpAwkIARUAAIhCGAE=&rs=AOn4CLBLM6PlTJeoL-8S4tl-8x13ySw4Bg",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,i.jsx)("p",{children:(0,i.jsx)("a",{href:"https://youtube.com/playlist?list=PLOyWqupZ-WGsfnlpkk0KWX3uS4yg6ZztG",children:"Polkadot Deep Dives"})})]}),(0,i.jsxs)("div",{className:"col text--center",children:[(0,i.jsx)("a",{href:"https://youtube.com/playlist?list=PLOyWqupZ-WGtxijJor37g5GmUqVgUvGDt",children:(0,i.jsx)("img",{src:"https://i.ytimg.com/vi/L6DI6cLsIKg/hqdefault.jpg?sqp=-oaymwEXCNACELwBSFryq4qpAwkIARUAAIhCGAE=&rs=AOn4CLCFTkvrUAEtvh2d3bXAtU0_83_JeQ",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,i.jsx)("p",{children:(0,i.jsx)("a",{href:"https://youtube.com/playlist?list=PLOyWqupZ-WGtxijJor37g5GmUqVgUvGDt",children:"Polkadot Decoded 2023"})})]}),(0,i.jsxs)("div",{className:"col text--center",children:[(0,i.jsx)("a",{href:"https://youtube.com/playlist?list=PLOyWqupZ-WGthz-1qCz9RozF9N2ywyb4V",children:(0,i.jsx)("img",{src:"https://i.ytimg.com/vi/uw3uO94tCLM/hqdefault.jpg?sqp=-oaymwEXCNACELwBSFryq4qpAwkIARUAAIhCGAE=&rs=AOn4CLC7_wrDvI3zuxK0gluk4z8fojS8UA",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,i.jsx)("p",{children:(0,i.jsx)("a",{href:"https://youtube.com/playlist?list=PLOyWqupZ-WGthz-1qCz9RozF9N2ywyb4V",children:"Polkadot Blockchain Academy 2023"})})]})]}),"\n",(0,i.jsxs)("div",{className:"row",children:[(0,i.jsxs)("div",{className:"col text--center",children:[(0,i.jsx)("a",{href:"https://youtube.com/playlist?list=PLOyWqupZ-WGsnACsCmWH7PO-0paz9zlQ8",children:(0,i.jsx)("img",{src:"https://i.ytimg.com/vi/29Ty-VTDnh4/hqdefault.jpg?sqp=-oaymwEXCNACELwBSFryq4qpAwkIARUAAIhCGAE=&rs=AOn4CLCtiKLbmKTPzConIl8l7UHdjuNOFQ",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,i.jsx)("p",{children:(0,i.jsx)("a",{href:"https://youtube.com/playlist?list=PLOyWqupZ-WGsnACsCmWH7PO-0paz9zlQ8",children:"Polkadot for Beginners"})})]}),(0,i.jsxs)("div",{className:"col text--center",children:[(0,i.jsx)("a",{href:"https://youtube.com/playlist?list=PLOyWqupZ-WGsbca2vOnkS3l6j53G6ZS_E",children:(0,i.jsx)("img",{src:"https://i.ytimg.com/vi/yJfZuIo8Otc/hqdefault.jpg?sqp=-oaymwEXCNACELwBSFryq4qpAwkIARUAAIhCGAE=&rs=AOn4CLD959UNR1MfEq91SiCeEPz49cvWKQ",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,i.jsx)("p",{children:(0,i.jsx)("a",{href:"https://youtube.com/playlist?list=PLOyWqupZ-WGsbca2vOnkS3l6j53G6ZS_E",children:"ETH Denver 2023"})})]}),(0,i.jsxs)("div",{className:"col text--center",children:[(0,i.jsx)("a",{href:"https://youtube.com/playlist?list=PLOyWqupZ-WGvgdDcF-dW4RVEoeFZiZmQc",children:(0,i.jsx)("img",{src:"https://i.ytimg.com/vi/gS0T32-34uU/hqdefault.jpg?sqp=-oaymwEXCNACELwBSFryq4qpAwkIARUAAIhCGAE=&rs=AOn4CLBnXZ6DTc6FTodksS9r8BtEq9jQiw",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,i.jsx)("p",{children:(0,i.jsx)("a",{href:"https://youtube.com/playlist?list=PLOyWqupZ-WGvgdDcF-dW4RVEoeFZiZmQc",children:"Encode Polkadot Club"})})]})]}),"\n",(0,i.jsxs)("div",{className:"row",children:[(0,i.jsxs)("div",{className:"col text--center",children:[(0,i.jsx)("a",{href:"https://youtube.com/playlist?list=PLOyWqupZ-WGvywLqJDsMIYdCn8QEa2ShQ",children:(0,i.jsx)("img",{src:"https://i.ytimg.com/vi/2MnrABFLxik/hqdefault.jpg?sqp=-oaymwExCNACELwBSFryq4qpAyMIARUAAIhCGAHwAQH4Af4JgALQBYoCDAgAEAEYEyBJKH8wDw==&rs=AOn4CLANOBoKneWomu-zn7q-n3h0VtH1rA",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,i.jsx)("p",{children:(0,i.jsx)("a",{href:"https://youtube.com/playlist?list=PLOyWqupZ-WGvywLqJDsMIYdCn8QEa2ShQ",children:"Sub0 2022"})})]}),(0,i.jsxs)("div",{className:"col text--center",children:[(0,i.jsx)("a",{href:"https://youtube.com/playlist?list=PLOyWqupZ-WGvcE0HKKnORiFqWNv5onxCf",children:(0,i.jsx)("img",{src:"https://i.ytimg.com/vi/TtC_LQmqg_g/hqdefault.jpg?sqp=-oaymwExCNACELwBSFryq4qpAyMIARUAAIhCGAHwAQH4Af4JgALQBYoCDAgAEAEYfyATKE8wDw==&rs=AOn4CLCFLec74_QWVA5pAHYA6BAnXeX5Tg",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,i.jsx)("p",{children:(0,i.jsx)("a",{href:"https://youtube.com/playlist?list=PLOyWqupZ-WGvcE0HKKnORiFqWNv5onxCf",children:"Polkadot Decoded 2022"})})]}),(0,i.jsxs)("div",{className:"col text--center",children:[(0,i.jsx)("a",{href:"https://youtube.com/playlist?list=PLOyWqupZ-WGuA9BWEP4_zRiLwHzXb1zE9",children:(0,i.jsx)("img",{src:"https://i.ytimg.com/vi/xgPZnOulBCE/hqdefault.jpg?sqp=-oaymwEXCNACELwBSFryq4qpAwkIARUAAIhCGAE=&rs=AOn4CLC4tBsi9wRCBFywlKBtRjgkO2IZeA",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,i.jsx)("p",{children:(0,i.jsx)("a",{href:"https://youtube.com/playlist?list=PLOyWqupZ-WGuA9BWEP4_zRiLwHzXb1zE9",children:"Polkadot in Davos 2022"})})]})]}),"\n",(0,i.jsxs)("div",{className:"row",children:[(0,i.jsxs)("div",{className:"col text--center",children:[(0,i.jsx)("a",{href:"https://youtube.com/playlist?list=PLOyWqupZ-WGsLEJq0sRyvUD-pWuVwA5yg",children:(0,i.jsx)("img",{src:"https://i.ytimg.com/vi/9B10wX9Mphc/hqdefault.jpg?sqp=-oaymwEXCNACELwBSFryq4qpAwkIARUAAIhCGAE=&rs=AOn4CLDLTOmqKe80ui-_Y2hoD4PU5-1kKQ",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,i.jsx)("p",{children:(0,i.jsx)("a",{href:"https://youtube.com/playlist?list=PLOyWqupZ-WGsLEJq0sRyvUD-pWuVwA5yg",children:"Polkadot Webminars"})})]}),(0,i.jsxs)("div",{className:"col text--center",children:[(0,i.jsx)("a",{href:"https://youtube.com/playlist?list=PLOyWqupZ-WGsFyiLL4AOn24obxfZzXTFO",children:(0,i.jsx)("img",{src:"https://i.ytimg.com/vi/PeIeCaVAlRc/hqdefault.jpg?sqp=-oaymwEXCNACELwBSFryq4qpAwkIARUAAIhCGAE=&rs=AOn4CLBmsAbnUhuGsGWxb3eO3z51TwphIQ",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,i.jsx)("p",{children:(0,i.jsx)("a",{href:"https://youtube.com/playlist?list=PLOyWqupZ-WGsFyiLL4AOn24obxfZzXTFO",children:"Hackathon North America"})})]}),(0,i.jsxs)("div",{className:"col text--center",children:[(0,i.jsx)("a",{href:"https://youtube.com/playlist?list=PLOyWqupZ-WGve3__mfw7wX4tY1pWj8ExG",children:(0,i.jsx)("img",{src:"https://i.ytimg.com/vi/fMokQz5gRgE/hqdefault.jpg?sqp=-oaymwExCNACELwBSFryq4qpAyMIARUAAIhCGAHwAQH4AdQGgALgA4oCDAgAEAEYWiBaKFowDw==&rs=AOn4CLB7_c3mQKypuhL1b2buU-Rb9f5nOw",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,i.jsx)("p",{children:(0,i.jsx)("a",{href:"https://youtube.com/playlist?list=PLOyWqupZ-WGve3__mfw7wX4tY1pWj8ExG",children:"Hackathon Global Series"})})]})]}),"\n",(0,i.jsxs)("div",{className:"row",children:[(0,i.jsxs)("div",{className:"col text--center",children:[(0,i.jsx)("a",{href:"https://youtu.be/xBfC6uTjvbM?feature=shared",children:(0,i.jsx)("img",{src:"https://i.ytimg.com/vi/xBfC6uTjvbM/hqdefault.jpg?sqp=-oaymwEbCKgBEF5IVfKriqkDDggBFQAAiEIYAXABwAEG&rs=AOn4CLCA6vdCF0Xsv1iSbLh5icf61Meauw",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,i.jsx)("p",{children:(0,i.jsx)("a",{href:"https://youtu.be/xBfC6uTjvbM?feature=shared",children:"Polkadot Whiteboard Series"})})]}),(0,i.jsx)("div",{className:"col text--center"}),(0,i.jsx)("div",{className:"col text--center"})]})]})}function p(e={}){const{wrapper:s}={...(0,l.R)(),...e.components};return s?(0,i.jsx)(s,{...e,children:(0,i.jsx)(c,{...e})}):c(e)}},28453:(e,s,t)=>{t.d(s,{R:()=>o,x:()=>a});var i=t(96540);const l={},r=i.createContext(l);function o(e){const s=i.useContext(r);return i.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function a(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(l):e.components||l:o(e.components),i.createElement(r.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/d3a753cf.144ea5ac.js b/assets/js/d3a753cf.144ea5ac.js new file mode 100644 index 000000000000..3ef8d37514af --- /dev/null +++ b/assets/js/d3a753cf.144ea5ac.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4191],{96737:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>s,contentTitle:()=>c,default:()=>u,frontMatter:()=>i,metadata:()=>a,toc:()=>r});const a=JSON.parse('{"id":"learn/xcm/fundamentals/multilocation/learn-xcm-docs-multilocation-example","title":"Example","description":"A MultiLocation Example.","source":"@site/../docs/learn/xcm/fundamentals/multilocation/example.md","sourceDirName":"learn/xcm/fundamentals/multilocation","slug":"/learn/xcm/fundamentals/multilocation-example","permalink":"/docs/learn/xcm/fundamentals/multilocation-example","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/xcm/fundamentals/multilocation/example.md","tags":[],"version":"current","lastUpdatedBy":"Roger J. Bos, CFA","lastUpdatedAt":1708049218000,"frontMatter":{"id":"learn-xcm-docs-multilocation-example","title":"Example","sidebar_label":"Example","description":"A MultiLocation Example.","keywords":["xcm","cross-consensus messaging","multilocation"],"slug":"../multilocation-example"},"sidebar":"docs","previous":{"title":"Junction(s)","permalink":"/docs/learn/xcm/fundamentals/multilocation-junctions"},"next":{"title":"MultiAsset","permalink":"/docs/learn/xcm/fundamentals-multiasset"}}');var o=t(74848),l=t(28453);const i={id:"learn-xcm-docs-multilocation-example",title:"Example",sidebar_label:"Example",description:"A MultiLocation Example.",keywords:["xcm","cross-consensus messaging","multilocation"],slug:"../multilocation-example"},c="Example",s={},r=[];function m(e){const n={code:"code",h1:"h1",header:"header",img:"img",p:"p",pre:"pre",...(0,l.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.header,{children:(0,o.jsx)(n.h1,{id:"example",children:"Example"})}),"\n",(0,o.jsxs)(n.p,{children:["In this example we show different ",(0,o.jsx)(n.code,{children:"MultiLocation"}),"s for the system hierarchy in the image below.\n",(0,o.jsx)(n.img,{alt:"Example",src:t(47517).A+"",width:"871",height:"526"})]}),"\n",(0,o.jsx)(n.p,{children:"From the perspective of RelayA"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-rust",children:"// ParaA\nlet _: MultiLocation = Parachain(1000).into();\n// AccountId32 in Parachain A\nlet _: MultiLocation = (Parachain(1000), AccountId32 { network: RELAY_A_NETWORK, id: [0u8; 32]}).into();\n// Asset in Parachain A\nlet _: MultiLocation = (Parachain(1000), PalletInstance(1), GeneralIndex(1)).into();\n// Ethereum based account on Parachain B\nlet _: MultiLocation = (Parachain(2000), AccountKey20 { network: RELAY_A_NETWORK, key: [0u8; 20] }).into();\n// Smart Contract\nlet _: MultiLocation = (Parachain(2000), PalletInstance(1), AccountKey20 { network: RELAY_A_NETWORK, key: [0u8; 20] }).into();\n// RelayB\nlet _: MultiLocation = (Parent, GlobalConsensus(RELAY_B_NETWORK)).into();\n// NFT on Parachain C\nlet _: MultiLocation = (Parent, GlobalConsensus(RELAY_B_NETWORK), Parachain(1000), GeneralIndex(1)).into();\n"})}),"\n",(0,o.jsx)(n.p,{children:"From the perspective of Parachain C"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-rust",children:"// Relay B\nlet _: MultiLocation = Parent.into();\n// Plurality Example. Many more BodyId/BodyPart combos imaginable\nlet _: MultiLocation = (Parent, Plurality { id: BodyId::Index(0), part: BodyPart::Members { count: 10 } }).into();\n// Account in Relay\nlet _: MultiLocation = (Parent, AccountId32 { network: None, id: [0u8; 32] }).into();\n"})}),"\n",(0,o.jsx)(n.p,{children:"From the perspective of the Smart Contract"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-rust",children:"// Asset in Parachain A\nlet _: MultiLocation = (Parent, Parent, Parachain(1000), PalletInstance(1), GeneralIndex(1)).into();\n\n"})})]})}function u(e={}){const{wrapper:n}={...(0,l.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(m,{...e})}):m(e)}},47517:(e,n,t)=>{t.d(n,{A:()=>a});const a=t.p+"assets/images/MultiLocation_Example-f123c564a25cab510cf5486df6402c4a.png"},28453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>c});var a=t(96540);const o={},l=a.createContext(o);function i(e){const n=a.useContext(l);return a.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:i(e.components),a.createElement(l.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/d3a753cf.44146bb9.js b/assets/js/d3a753cf.44146bb9.js deleted file mode 100644 index 7615754025ef..000000000000 --- a/assets/js/d3a753cf.44146bb9.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4191],{52819:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>s,contentTitle:()=>i,default:()=>u,frontMatter:()=>l,metadata:()=>c,toc:()=>r});var a=t(74848),o=t(28453);const l={id:"learn-xcm-docs-multilocation-example",title:"Example",sidebar_label:"Example",description:"A MultiLocation Example.",keywords:["xcm","cross-consensus messaging","multilocation"],slug:"../multilocation-example"},i="Example",c={id:"learn/xcm/fundamentals/multilocation/learn-xcm-docs-multilocation-example",title:"Example",description:"A MultiLocation Example.",source:"@site/../docs/learn/xcm/fundamentals/multilocation/example.md",sourceDirName:"learn/xcm/fundamentals/multilocation",slug:"/learn/xcm/fundamentals/multilocation-example",permalink:"/docs/learn/xcm/fundamentals/multilocation-example",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/xcm/fundamentals/multilocation/example.md",tags:[],version:"current",lastUpdatedBy:"Roger J. Bos, CFA",lastUpdatedAt:1708049218e3,frontMatter:{id:"learn-xcm-docs-multilocation-example",title:"Example",sidebar_label:"Example",description:"A MultiLocation Example.",keywords:["xcm","cross-consensus messaging","multilocation"],slug:"../multilocation-example"},sidebar:"docs",previous:{title:"Junction(s)",permalink:"/docs/learn/xcm/fundamentals/multilocation-junctions"},next:{title:"MultiAsset",permalink:"/docs/learn/xcm/fundamentals-multiasset"}},s={},r=[];function m(e){const n={code:"code",h1:"h1",header:"header",img:"img",p:"p",pre:"pre",...(0,o.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.header,{children:(0,a.jsx)(n.h1,{id:"example",children:"Example"})}),"\n",(0,a.jsxs)(n.p,{children:["In this example we show different ",(0,a.jsx)(n.code,{children:"MultiLocation"}),"s for the system hierarchy in the image below.\n",(0,a.jsx)(n.img,{alt:"Example",src:t(47517).A+"",width:"871",height:"526"})]}),"\n",(0,a.jsx)(n.p,{children:"From the perspective of RelayA"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-rust",children:"// ParaA\nlet _: MultiLocation = Parachain(1000).into();\n// AccountId32 in Parachain A\nlet _: MultiLocation = (Parachain(1000), AccountId32 { network: RELAY_A_NETWORK, id: [0u8; 32]}).into();\n// Asset in Parachain A\nlet _: MultiLocation = (Parachain(1000), PalletInstance(1), GeneralIndex(1)).into();\n// Ethereum based account on Parachain B\nlet _: MultiLocation = (Parachain(2000), AccountKey20 { network: RELAY_A_NETWORK, key: [0u8; 20] }).into();\n// Smart Contract\nlet _: MultiLocation = (Parachain(2000), PalletInstance(1), AccountKey20 { network: RELAY_A_NETWORK, key: [0u8; 20] }).into();\n// RelayB\nlet _: MultiLocation = (Parent, GlobalConsensus(RELAY_B_NETWORK)).into();\n// NFT on Parachain C\nlet _: MultiLocation = (Parent, GlobalConsensus(RELAY_B_NETWORK), Parachain(1000), GeneralIndex(1)).into();\n"})}),"\n",(0,a.jsx)(n.p,{children:"From the perspective of Parachain C"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-rust",children:"// Relay B\nlet _: MultiLocation = Parent.into();\n// Plurality Example. Many more BodyId/BodyPart combos imaginable\nlet _: MultiLocation = (Parent, Plurality { id: BodyId::Index(0), part: BodyPart::Members { count: 10 } }).into();\n// Account in Relay\nlet _: MultiLocation = (Parent, AccountId32 { network: None, id: [0u8; 32] }).into();\n"})}),"\n",(0,a.jsx)(n.p,{children:"From the perspective of the Smart Contract"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-rust",children:"// Asset in Parachain A\nlet _: MultiLocation = (Parent, Parent, Parachain(1000), PalletInstance(1), GeneralIndex(1)).into();\n\n"})})]})}function u(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(m,{...e})}):m(e)}},47517:(e,n,t)=>{t.d(n,{A:()=>a});const a=t.p+"assets/images/MultiLocation_Example-f123c564a25cab510cf5486df6402c4a.png"},28453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>c});var a=t(96540);const o={},l=a.createContext(o);function i(e){const n=a.useContext(l);return a.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:i(e.components),a.createElement(l.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/d42819bc.1f55aa80.js b/assets/js/d42819bc.1f55aa80.js new file mode 100644 index 000000000000..e9bcbf73b4f0 --- /dev/null +++ b/assets/js/d42819bc.1f55aa80.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3306],{19238:(e,n,a)=>{a.r(n),a.d(n,{assets:()=>i,contentTitle:()=>d,default:()=>h,frontMatter:()=>r,metadata:()=>s,toc:()=>l});const s=JSON.parse('{"id":"general/dune-analytics/parachain-dashboards/bridgehub-dashboards","title":"BridgeHub Dashboards","description":"BridgeHub is a system parachain within the Polkadot ecosystem, designed to enable trustless bridging between Polkadot and other blockchains such as Kusama and Ethereum.","source":"@site/../docs/general/dune-analytics/parachain-dashboards/bridgehub-dashboards.md","sourceDirName":"general/dune-analytics/parachain-dashboards","slug":"/general/dune-analytics/bridgehub-dashboards","permalink":"/docs/general/dune-analytics/bridgehub-dashboards","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/parachain-dashboards/bridgehub-dashboards.md","tags":[],"version":"current","lastUpdatedBy":"MK","lastUpdatedAt":1719215716000,"frontMatter":{"id":"bridgehub-dashboards","title":"BridgeHub Dashboards","sidebar_label":"BridgeHub","description":"BridgeHub is a system parachain within the Polkadot ecosystem, designed to enable trustless bridging between Polkadot and other blockchains such as Kusama and Ethereum.","keywords":["polkadot","kusama","dashboard","dune","bridgehub","system-parachain"],"slug":"../bridgehub-dashboards"},"sidebar":"docs","previous":{"title":"Bifrost","permalink":"/docs/general/dune-analytics/bifrost-dashboards"},"next":{"title":"Centrifuge","permalink":"/docs/general/dune-analytics/centrifuge-dashboards"}}');var t=a(74848),o=a(28453);const r={id:"bridgehub-dashboards",title:"BridgeHub Dashboards",sidebar_label:"BridgeHub",description:"BridgeHub is a system parachain within the Polkadot ecosystem, designed to enable trustless bridging between Polkadot and other blockchains such as Kusama and Ethereum.",keywords:["polkadot","kusama","dashboard","dune","bridgehub","system-parachain"],slug:"../bridgehub-dashboards"},d="BridgeHub Dashboards",i={},l=[{value:"Overview",id:"overview",level:2},{value:"Featured Dashboards on Dune",id:"featured-dashboards-on-dune",level:2},{value:"Key Tables",id:"key-tables",level:2},{value:"Useful Queries",id:"useful-queries",level:2},{value:"Getting Started with Queries",id:"getting-started-with-queries",level:2}];function u(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,o.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.header,{children:(0,t.jsx)(n.h1,{id:"bridgehub-dashboards",children:"BridgeHub Dashboards"})}),"\n",(0,t.jsx)(n.h2,{id:"overview",children:"Overview"}),"\n",(0,t.jsx)(n.p,{children:"Polkadot BridgeHub is a system parachain within the Polkadot ecosystem, designed to enable trustless\nbridging between Polkadot and other blockchains such as Kusama and Ethereum. It ensures secure\ncross-chain communication through a combination of on-chain and off-chain components. This dashboard\nprimarily analyzes the bridging information between Polkadot and Kusama."}),"\n",(0,t.jsxs)(n.p,{children:["The Ethereum to Polkadot BridgeHub primarily utilizes Snowbridge. For more details, visit our\n",(0,t.jsx)(n.a,{href:"https://dune.com/substrate/snowbridge",children:"Snowbridge Dashboard"}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"featured-dashboards-on-dune",children:"Featured Dashboards on Dune"}),"\n",(0,t.jsx)(n.p,{children:"Here you will find a variety of dashboards that help visualize data from the BridgeHub parachain:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"https://dune.com/substrate/bridgehub",children:"BridgeHub"}),": A comprehensive analysis of BridgeHub,\nincluding: Kusama Related On Chain Data Analysis, Analysis of Messages with Kusama."]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"key-tables",children:"Key Tables"}),"\n",(0,t.jsx)(n.p,{children:"Data from the BridgeHub parachain is organized into several key tables:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"bridgehub.balances"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"bridgehub.blocks"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"bridgehub.calls"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"bridgehub.events"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"bridgehub.extrinsics"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"bridgehub.transfers"})}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["Start building your own queries using granular data on Dune\n",(0,t.jsx)(n.a,{href:"https://dune.com/queries?category=canonical&namespace=bridgehub",children:"here"}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"useful-queries",children:"Useful Queries"}),"\n",(0,t.jsx)(n.p,{children:"Some useful queries for Bridgehub are provided:"}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Title"}),(0,t.jsx)(n.th,{children:"Query"}),(0,t.jsx)(n.th,{children:"Description"})]})}),(0,t.jsx)(n.tbody,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:"Bridgehub Messages with Kusama"}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.a,{href:"https://dune.com/queries/3816910",children:"queries_3816910"})}),(0,t.jsx)(n.td,{children:"Find all message records between Polkadot and Kusama"})]})})]}),"\n",(0,t.jsx)(n.h2,{id:"getting-started-with-queries",children:"Getting Started with Queries"}),"\n",(0,t.jsx)(n.p,{children:"To get started with querying data from Unique, you are welcome to use the mentioned materialized\nqueries. You can use the following DuneSQL queries as examples:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-sql",metastring:'title="Bridgehub and Kusama Message Trends" showLineNumbers',children:'WITH\n transactions AS (\n SELECT\n CASE\n WHEN ROW_NUMBER() OVER (\n PARTITION BY\n "from",\n "to",\n "send_time"\n ORDER BY\n "send_time"\n ) % 2 = 1 THEN "from"\n ELSE "to"\n END AS direction,\n date_trunc(\'month\', "send_time") as month\n FROM\n query_3816910\n ),\n polkadot_to_kusama AS (\n SELECT\n month,\n COUNT(*) as count_polkadot_to_kusama\n FROM\n transactions\n WHERE\n direction = \'polkadot\'\n GROUP BY\n month\n ),\n kusama_to_polkadot AS (\n SELECT\n month,\n COUNT(*) as count_kusama_to_polkadot\n FROM\n transactions\n WHERE\n direction = \'kusama\'\n GROUP BY\n month\n ),\n all_polkadot_to_kusama AS (\n SELECT\n \'for_join\' as "for_join",\n COUNT(*) as total_count_polkadot_to_kusama\n FROM\n transactions\n WHERE\n direction = \'polkadot\'\n ),\n all_kusama_to_polkadot AS (\n SELECT\n \'for_join\' as "for_join",\n COUNT(*) as total_count_kusama_to_polkadot\n FROM\n transactions\n WHERE\n direction = \'kusama\'\n ),\n monthly_result as (\n SELECT\n coalesce(\n polkadot_to_kusama.month,\n kusama_to_polkadot.month\n ) as month,\n coalesce(count_polkadot_to_kusama, 0) as count_polkadot_to_kusama,\n coalesce(count_kusama_to_polkadot, 0) as count_kusama_to_polkadot,\n \'for_join\' as "for_join"\n FROM\n polkadot_to_kusama\n FULL OUTER JOIN kusama_to_polkadot ON polkadot_to_kusama.month = kusama_to_polkadot.month\n ORDER BY\n month\n )\nSELECT\n monthly_result.month,\n monthly_result.count_polkadot_to_kusama,\n monthly_result.count_kusama_to_polkadot,\n all_polkadot_to_kusama.total_count_polkadot_to_kusama,\n all_kusama_to_polkadot.total_count_kusama_to_polkadot\nFROM\n monthly_result\n LEFT JOIN all_polkadot_to_kusama on monthly_result.for_join = all_polkadot_to_kusama.for_join\n LEFT JOIN all_kusama_to_polkadot on monthly_result.for_join = all_kusama_to_polkadot.for_join\n'})}),"\n",(0,t.jsx)(n.p,{children:"Query result:"}),"\n",(0,t.jsx)("iframe",{src:"https://dune.com/embeds/3821198/6426898",height:"350",width:"100%"}),"\n",(0,t.jsx)(n.admonition,{title:"DuneSQL Reference",type:"info",children:(0,t.jsxs)(n.p,{children:["For more information on DuneSQL, please refer to the ",(0,t.jsx)(n.a,{href:"/docs/general/dunesql-cheatsheet",children:"DuneSQL Cheatsheet"}),"\nand\n",(0,t.jsx)(n.a,{href:"https://docs.dune.com/query-engine/Functions-and-operators/index",children:"DuneSQL Official Documentation"}),"."]})})]})}function h(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(u,{...e})}):u(e)}},28453:(e,n,a)=>{a.d(n,{R:()=>r,x:()=>d});var s=a(96540);const t={},o=s.createContext(t);function r(e){const n=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:r(e.components),s.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/d42819bc.d3126f57.js b/assets/js/d42819bc.d3126f57.js deleted file mode 100644 index 186c94e5ca9c..000000000000 --- a/assets/js/d42819bc.d3126f57.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3306],{59666:(e,n,a)=>{a.r(n),a.d(n,{assets:()=>i,contentTitle:()=>d,default:()=>h,frontMatter:()=>o,metadata:()=>r,toc:()=>l});var s=a(74848),t=a(28453);const o={id:"bridgehub-dashboards",title:"BridgeHub Dashboards",sidebar_label:"BridgeHub",description:"BridgeHub is a system parachain within the Polkadot ecosystem, designed to enable trustless bridging between Polkadot and other blockchains such as Kusama and Ethereum.",keywords:["polkadot","kusama","dashboard","dune","bridgehub","system-parachain"],slug:"../bridgehub-dashboards"},d="BridgeHub Dashboards",r={id:"general/dune-analytics/parachain-dashboards/bridgehub-dashboards",title:"BridgeHub Dashboards",description:"BridgeHub is a system parachain within the Polkadot ecosystem, designed to enable trustless bridging between Polkadot and other blockchains such as Kusama and Ethereum.",source:"@site/../docs/general/dune-analytics/parachain-dashboards/bridgehub-dashboards.md",sourceDirName:"general/dune-analytics/parachain-dashboards",slug:"/general/dune-analytics/bridgehub-dashboards",permalink:"/docs/general/dune-analytics/bridgehub-dashboards",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/parachain-dashboards/bridgehub-dashboards.md",tags:[],version:"current",lastUpdatedBy:"MK",lastUpdatedAt:1719215716e3,frontMatter:{id:"bridgehub-dashboards",title:"BridgeHub Dashboards",sidebar_label:"BridgeHub",description:"BridgeHub is a system parachain within the Polkadot ecosystem, designed to enable trustless bridging between Polkadot and other blockchains such as Kusama and Ethereum.",keywords:["polkadot","kusama","dashboard","dune","bridgehub","system-parachain"],slug:"../bridgehub-dashboards"},sidebar:"docs",previous:{title:"Bifrost",permalink:"/docs/general/dune-analytics/bifrost-dashboards"},next:{title:"Centrifuge",permalink:"/docs/general/dune-analytics/centrifuge-dashboards"}},i={},l=[{value:"Overview",id:"overview",level:2},{value:"Featured Dashboards on Dune",id:"featured-dashboards-on-dune",level:2},{value:"Key Tables",id:"key-tables",level:2},{value:"Useful Queries",id:"useful-queries",level:2},{value:"Getting Started with Queries",id:"getting-started-with-queries",level:2}];function u(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,t.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"bridgehub-dashboards",children:"BridgeHub Dashboards"})}),"\n",(0,s.jsx)(n.h2,{id:"overview",children:"Overview"}),"\n",(0,s.jsx)(n.p,{children:"Polkadot BridgeHub is a system parachain within the Polkadot ecosystem, designed to enable trustless\nbridging between Polkadot and other blockchains such as Kusama and Ethereum. It ensures secure\ncross-chain communication through a combination of on-chain and off-chain components. This dashboard\nprimarily analyzes the bridging information between Polkadot and Kusama."}),"\n",(0,s.jsxs)(n.p,{children:["The Ethereum to Polkadot BridgeHub primarily utilizes Snowbridge. For more details, visit our\n",(0,s.jsx)(n.a,{href:"https://dune.com/substrate/snowbridge",children:"Snowbridge Dashboard"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"featured-dashboards-on-dune",children:"Featured Dashboards on Dune"}),"\n",(0,s.jsx)(n.p,{children:"Here you will find a variety of dashboards that help visualize data from the BridgeHub parachain:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"https://dune.com/substrate/bridgehub",children:"BridgeHub"}),": A comprehensive analysis of BridgeHub,\nincluding: Kusama Related On Chain Data Analysis, Analysis of Messages with Kusama."]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"key-tables",children:"Key Tables"}),"\n",(0,s.jsx)(n.p,{children:"Data from the BridgeHub parachain is organized into several key tables:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"bridgehub.balances"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"bridgehub.blocks"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"bridgehub.calls"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"bridgehub.events"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"bridgehub.extrinsics"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"bridgehub.transfers"})}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["Start building your own queries using granular data on Dune\n",(0,s.jsx)(n.a,{href:"https://dune.com/queries?category=canonical&namespace=bridgehub",children:"here"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"useful-queries",children:"Useful Queries"}),"\n",(0,s.jsx)(n.p,{children:"Some useful queries for Bridgehub are provided:"}),"\n",(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Title"}),(0,s.jsx)(n.th,{children:"Query"}),(0,s.jsx)(n.th,{children:"Description"})]})}),(0,s.jsx)(n.tbody,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Bridgehub Messages with Kusama"}),(0,s.jsx)(n.td,{children:(0,s.jsx)(n.a,{href:"https://dune.com/queries/3816910",children:"queries_3816910"})}),(0,s.jsx)(n.td,{children:"Find all message records between Polkadot and Kusama"})]})})]}),"\n",(0,s.jsx)(n.h2,{id:"getting-started-with-queries",children:"Getting Started with Queries"}),"\n",(0,s.jsx)(n.p,{children:"To get started with querying data from Unique, you are welcome to use the mentioned materialized\nqueries. You can use the following DuneSQL queries as examples:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-sql",metastring:'title="Bridgehub and Kusama Message Trends" showLineNumbers',children:'WITH\n transactions AS (\n SELECT\n CASE\n WHEN ROW_NUMBER() OVER (\n PARTITION BY\n "from",\n "to",\n "send_time"\n ORDER BY\n "send_time"\n ) % 2 = 1 THEN "from"\n ELSE "to"\n END AS direction,\n date_trunc(\'month\', "send_time") as month\n FROM\n query_3816910\n ),\n polkadot_to_kusama AS (\n SELECT\n month,\n COUNT(*) as count_polkadot_to_kusama\n FROM\n transactions\n WHERE\n direction = \'polkadot\'\n GROUP BY\n month\n ),\n kusama_to_polkadot AS (\n SELECT\n month,\n COUNT(*) as count_kusama_to_polkadot\n FROM\n transactions\n WHERE\n direction = \'kusama\'\n GROUP BY\n month\n ),\n all_polkadot_to_kusama AS (\n SELECT\n \'for_join\' as "for_join",\n COUNT(*) as total_count_polkadot_to_kusama\n FROM\n transactions\n WHERE\n direction = \'polkadot\'\n ),\n all_kusama_to_polkadot AS (\n SELECT\n \'for_join\' as "for_join",\n COUNT(*) as total_count_kusama_to_polkadot\n FROM\n transactions\n WHERE\n direction = \'kusama\'\n ),\n monthly_result as (\n SELECT\n coalesce(\n polkadot_to_kusama.month,\n kusama_to_polkadot.month\n ) as month,\n coalesce(count_polkadot_to_kusama, 0) as count_polkadot_to_kusama,\n coalesce(count_kusama_to_polkadot, 0) as count_kusama_to_polkadot,\n \'for_join\' as "for_join"\n FROM\n polkadot_to_kusama\n FULL OUTER JOIN kusama_to_polkadot ON polkadot_to_kusama.month = kusama_to_polkadot.month\n ORDER BY\n month\n )\nSELECT\n monthly_result.month,\n monthly_result.count_polkadot_to_kusama,\n monthly_result.count_kusama_to_polkadot,\n all_polkadot_to_kusama.total_count_polkadot_to_kusama,\n all_kusama_to_polkadot.total_count_kusama_to_polkadot\nFROM\n monthly_result\n LEFT JOIN all_polkadot_to_kusama on monthly_result.for_join = all_polkadot_to_kusama.for_join\n LEFT JOIN all_kusama_to_polkadot on monthly_result.for_join = all_kusama_to_polkadot.for_join\n'})}),"\n",(0,s.jsx)(n.p,{children:"Query result:"}),"\n",(0,s.jsx)("iframe",{src:"https://dune.com/embeds/3821198/6426898",height:"350",width:"100%"}),"\n",(0,s.jsx)(n.admonition,{title:"DuneSQL Reference",type:"info",children:(0,s.jsxs)(n.p,{children:["For more information on DuneSQL, please refer to the ",(0,s.jsx)(n.a,{href:"/docs/general/dunesql-cheatsheet",children:"DuneSQL Cheatsheet"}),"\nand\n",(0,s.jsx)(n.a,{href:"https://docs.dune.com/query-engine/Functions-and-operators/index",children:"DuneSQL Official Documentation"}),"."]})})]})}function h(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(u,{...e})}):u(e)}},28453:(e,n,a)=>{a.d(n,{R:()=>d,x:()=>r});var s=a(96540);const t={},o=s.createContext(t);function d(e){const n=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:d(e.components),s.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/d569989b.1607e8b7.js b/assets/js/d569989b.1607e8b7.js new file mode 100644 index 000000000000..d35e3febdb09 --- /dev/null +++ b/assets/js/d569989b.1607e8b7.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8255],{69864:(e,t,o)=>{o.r(t),o.d(t,{assets:()=>l,contentTitle:()=>a,default:()=>c,frontMatter:()=>s,metadata:()=>n,toc:()=>u});const n=JSON.parse('{"id":"general/bug-bounty","title":"Bug Bounty Program","description":"An Overview of How you can Help Catch Bugs.","source":"@site/../docs/general/bug-bounty.md","sourceDirName":"general","slug":"/bug-bounty","permalink":"/docs/bug-bounty","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/bug-bounty.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1710432171000,"frontMatter":{"id":"bug-bounty","title":"Bug Bounty Program","sidebar_label":"Bug Bounty","description":"An Overview of How you can Help Catch Bugs.","keywords":["bug","bug bounty","report"],"slug":"../bug-bounty"},"sidebar":"docs","previous":{"title":"Decentralized Voices","permalink":"/docs/decentralized-voices"},"next":{"title":"Polkadot Ambassadors","permalink":"/docs/ambassadors"}}');var i=o(74848),r=o(28453);const s={id:"bug-bounty",title:"Bug Bounty Program",sidebar_label:"Bug Bounty",description:"An Overview of How you can Help Catch Bugs.",keywords:["bug","bug bounty","report"],slug:"../bug-bounty"},a=void 0,l={},u=[{value:"Eligibility",id:"eligibility",level:2},{value:"How to report a bug",id:"how-to-report-a-bug",level:2}];function d(e){const t={a:"a",admonition:"admonition",em:"em",h2:"h2",li:"li",p:"p",ul:"ul",...(0,r.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(t.p,{children:["If you discover a bug, we appreciate your cooperation in responsibly investigating and reporting it\nas per ",(0,i.jsx)(t.a,{href:"https://web3.foundation/security-report/",children:"instructions on Web3 Foundation website"}),".\nDisclosure to any third parties disqualifies bug bounty eligibility."]}),"\n",(0,i.jsxs)(t.admonition,{title:"Bug bounty program scope",type:"info",children:[(0,i.jsxs)(t.p,{children:["The bug bounty program does ",(0,i.jsx)(t.em,{children:"not"})," cover bugs on code bases that are external to or, written on top\nof Polkadot, or that use Polkadot. To be eligible for the bug bounty program the bug has to be a\npart of the Polkadot codebase, this includes protocols that Polkadot uses such as AnV, XCM, GRANDPA,\netc."]}),(0,i.jsx)(t.p,{children:"We call on our community and all bug bounty hunters to help identify bugs in Polkadot."})]}),"\n",(0,i.jsx)(t.h2,{id:"eligibility",children:"Eligibility"}),"\n",(0,i.jsx)(t.p,{children:"Generally speaking, any bug that poses a significant vulnerability, either to the soundness of\nprotocols and protocol/implementation compliance to network security, to classical client security,\nas well as security of cryptographic primitives, could be eligible for a reward. Please note that\nit's entirely our discretion to decide whether a bug is significant enough to qualify for a reward."}),"\n",(0,i.jsxs)(t.admonition,{type:"note",children:[(0,i.jsx)(t.p,{children:"The submission quality will be a significant factor in the level of considered compensation. A\nhigh-quality submission includes explaining how the bug can be reproduced, how it was discovered,\nand otherwise critical details. Please disclose responsibly; disclosure to any third parties\ndisqualifies bug bounty eligibility."}),(0,i.jsx)(t.p,{children:"Examples:"}),(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsx)(t.li,{children:"An attack that could disrupt the entire network and harm the validity to the network would be\nconsidered a critical threat."}),"\n",(0,i.jsx)(t.li,{children:"An attack that would disrupt service to others would be regarded as a high threat."}),"\n"]})]}),"\n",(0,i.jsxs)(t.admonition,{title:"Responsible investigation and reporting",type:"tip",children:[(0,i.jsx)(t.p,{children:"Responsible investigation and reporting include, but isn't limited to, the following:"}),(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsx)(t.li,{children:"Don't violate the privacy of other users, destroy data, etc."}),"\n",(0,i.jsx)(t.li,{children:"Don't defraud or harm Polkadot network or its users during your research; you should make a good\nfaith effort not to interrupt or degrade our services."}),"\n",(0,i.jsx)(t.li,{children:"Don't target the validators' physical security measures, or attempt to use social engineering,\nspam, distributed denial of service (DDoS) attacks, etc."}),"\n",(0,i.jsx)(t.li,{children:"Initially, report the bug only to us and not to anyone else."}),"\n",(0,i.jsx)(t.li,{children:"Give us a reasonable amount of time to fix the bug before disclosing it to anyone else, and give\nus adequate written warning before disclosing it to anyone else."}),"\n",(0,i.jsx)(t.li,{children:"In general, please investigate and report bugs in a way that makes a reasonable, good-faith effort\nnot to be disruptive or harmful to our users or us. Otherwise, your actions might be interpreted\nas an attack rather than an effort to be helpful."}),"\n"]})]}),"\n",(0,i.jsx)(t.h2,{id:"how-to-report-a-bug",children:"How to report a bug"}),"\n",(0,i.jsxs)(t.p,{children:["Please follow the instructions at\n",(0,i.jsx)(t.a,{href:"https://web3.foundation/security-report/",children:"web3.foundation/security-report/"}),"."]})]})}function c(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}},28453:(e,t,o)=>{o.d(t,{R:()=>s,x:()=>a});var n=o(96540);const i={},r=n.createContext(i);function s(e){const t=n.useContext(r);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:s(e.components),n.createElement(r.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/d569989b.a7564f31.js b/assets/js/d569989b.a7564f31.js deleted file mode 100644 index 009f8e4b2d0e..000000000000 --- a/assets/js/d569989b.a7564f31.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8255],{76030:(e,t,o)=>{o.r(t),o.d(t,{assets:()=>l,contentTitle:()=>s,default:()=>c,frontMatter:()=>r,metadata:()=>a,toc:()=>u});var n=o(74848),i=o(28453);const r={id:"bug-bounty",title:"Bug Bounty Program",sidebar_label:"Bug Bounty",description:"An Overview of How you can Help Catch Bugs.",keywords:["bug","bug bounty","report"],slug:"../bug-bounty"},s=void 0,a={id:"general/bug-bounty",title:"Bug Bounty Program",description:"An Overview of How you can Help Catch Bugs.",source:"@site/../docs/general/bug-bounty.md",sourceDirName:"general",slug:"/bug-bounty",permalink:"/docs/bug-bounty",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/bug-bounty.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1710432171e3,frontMatter:{id:"bug-bounty",title:"Bug Bounty Program",sidebar_label:"Bug Bounty",description:"An Overview of How you can Help Catch Bugs.",keywords:["bug","bug bounty","report"],slug:"../bug-bounty"},sidebar:"docs",previous:{title:"Decentralized Voices",permalink:"/docs/decentralized-voices"},next:{title:"Polkadot Ambassadors",permalink:"/docs/ambassadors"}},l={},u=[{value:"Eligibility",id:"eligibility",level:2},{value:"How to report a bug",id:"how-to-report-a-bug",level:2}];function d(e){const t={a:"a",admonition:"admonition",em:"em",h2:"h2",li:"li",p:"p",ul:"ul",...(0,i.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(t.p,{children:["If you discover a bug, we appreciate your cooperation in responsibly investigating and reporting it\nas per ",(0,n.jsx)(t.a,{href:"https://web3.foundation/security-report/",children:"instructions on Web3 Foundation website"}),".\nDisclosure to any third parties disqualifies bug bounty eligibility."]}),"\n",(0,n.jsxs)(t.admonition,{title:"Bug bounty program scope",type:"info",children:[(0,n.jsxs)(t.p,{children:["The bug bounty program does ",(0,n.jsx)(t.em,{children:"not"})," cover bugs on code bases that are external to or, written on top\nof Polkadot, or that use Polkadot. To be eligible for the bug bounty program the bug has to be a\npart of the Polkadot codebase, this includes protocols that Polkadot uses such as AnV, XCM, GRANDPA,\netc."]}),(0,n.jsx)(t.p,{children:"We call on our community and all bug bounty hunters to help identify bugs in Polkadot."})]}),"\n",(0,n.jsx)(t.h2,{id:"eligibility",children:"Eligibility"}),"\n",(0,n.jsx)(t.p,{children:"Generally speaking, any bug that poses a significant vulnerability, either to the soundness of\nprotocols and protocol/implementation compliance to network security, to classical client security,\nas well as security of cryptographic primitives, could be eligible for a reward. Please note that\nit's entirely our discretion to decide whether a bug is significant enough to qualify for a reward."}),"\n",(0,n.jsxs)(t.admonition,{type:"note",children:[(0,n.jsx)(t.p,{children:"The submission quality will be a significant factor in the level of considered compensation. A\nhigh-quality submission includes explaining how the bug can be reproduced, how it was discovered,\nand otherwise critical details. Please disclose responsibly; disclosure to any third parties\ndisqualifies bug bounty eligibility."}),(0,n.jsx)(t.p,{children:"Examples:"}),(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsx)(t.li,{children:"An attack that could disrupt the entire network and harm the validity to the network would be\nconsidered a critical threat."}),"\n",(0,n.jsx)(t.li,{children:"An attack that would disrupt service to others would be regarded as a high threat."}),"\n"]})]}),"\n",(0,n.jsxs)(t.admonition,{title:"Responsible investigation and reporting",type:"tip",children:[(0,n.jsx)(t.p,{children:"Responsible investigation and reporting include, but isn't limited to, the following:"}),(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsx)(t.li,{children:"Don't violate the privacy of other users, destroy data, etc."}),"\n",(0,n.jsx)(t.li,{children:"Don't defraud or harm Polkadot network or its users during your research; you should make a good\nfaith effort not to interrupt or degrade our services."}),"\n",(0,n.jsx)(t.li,{children:"Don't target the validators' physical security measures, or attempt to use social engineering,\nspam, distributed denial of service (DDoS) attacks, etc."}),"\n",(0,n.jsx)(t.li,{children:"Initially, report the bug only to us and not to anyone else."}),"\n",(0,n.jsx)(t.li,{children:"Give us a reasonable amount of time to fix the bug before disclosing it to anyone else, and give\nus adequate written warning before disclosing it to anyone else."}),"\n",(0,n.jsx)(t.li,{children:"In general, please investigate and report bugs in a way that makes a reasonable, good-faith effort\nnot to be disruptive or harmful to our users or us. Otherwise, your actions might be interpreted\nas an attack rather than an effort to be helpful."}),"\n"]})]}),"\n",(0,n.jsx)(t.h2,{id:"how-to-report-a-bug",children:"How to report a bug"}),"\n",(0,n.jsxs)(t.p,{children:["Please follow the instructions at\n",(0,n.jsx)(t.a,{href:"https://web3.foundation/security-report/",children:"web3.foundation/security-report/"}),"."]})]})}function c(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(d,{...e})}):d(e)}},28453:(e,t,o)=>{o.d(t,{R:()=>s,x:()=>a});var n=o(96540);const i={},r=n.createContext(i);function s(e){const t=n.useContext(r);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:s(e.components),n.createElement(r.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/d5909206.30e49c3f.js b/assets/js/d5909206.30e49c3f.js new file mode 100644 index 000000000000..d835a565329d --- /dev/null +++ b/assets/js/d5909206.30e49c3f.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5434],{17287:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>r,contentTitle:()=>s,default:()=>d,frontMatter:()=>o,metadata:()=>i,toc:()=>l});const i=JSON.parse('{"id":"learn/xcm/fundamentals/multilocation/learn-xcm-docs-multilocation-junctions","title":"Junction(s)","description":"The Junction Type in a MultiLocation Struct.","source":"@site/../docs/learn/xcm/fundamentals/multilocation/junction.md","sourceDirName":"learn/xcm/fundamentals/multilocation","slug":"/learn/xcm/fundamentals/multilocation-junctions","permalink":"/docs/learn/xcm/fundamentals/multilocation-junctions","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/xcm/fundamentals/multilocation/junction.md","tags":[],"version":"current","lastUpdatedBy":"bader y","lastUpdatedAt":1694099593000,"frontMatter":{"id":"learn-xcm-docs-multilocation-junctions","title":"Junction(s)","sidebar_label":"Junction(s)","description":"The Junction Type in a MultiLocation Struct.","keywords":["xcm","cross-consensus messaging","multilocation","junctions"],"slug":"../multilocation-junctions"},"sidebar":"docs","previous":{"title":"Summary","permalink":"/docs/learn/xcm/fundamentals/multilocation-summary"},"next":{"title":"Example","permalink":"/docs/learn/xcm/fundamentals/multilocation-example"}}');var a=t(74848),c=t(28453);const o={id:"learn-xcm-docs-multilocation-junctions",title:"Junction(s)",sidebar_label:"Junction(s)",description:"The Junction Type in a MultiLocation Struct.",keywords:["xcm","cross-consensus messaging","multilocation","junctions"],slug:"../multilocation-junctions"},s="Junction(s)",r={},l=[{value:"Junctions Type",id:"junctions-type",level:2},{value:"Junction Type",id:"junction-type",level:2},{value:"Parachain",id:"parachain",level:4},{value:"PalletInstance",id:"palletinstance",level:4},{value:"AccountId32 and AccountKey20",id:"accountid32-and-accountkey20",level:4},{value:"GeneralIndex and GeneralKey",id:"generalindex-and-generalkey",level:4},{value:"AccountIndex64",id:"accountindex64",level:4},{value:"OnlyChild",id:"onlychild",level:4},{value:"Plurality",id:"plurality",level:4},{value:"GlobalConsensus",id:"globalconsensus",level:4},{value:"Multiple ways to create a MultiLocation",id:"multiple-ways-to-create-a-multilocation",level:2}];function u(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h4:"h4",header:"header",p:"p",pre:"pre",...(0,c.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.header,{children:(0,a.jsx)(n.h1,{id:"junctions",children:"Junction(s)"})}),"\n",(0,a.jsxs)(n.p,{children:["In the section on ",(0,a.jsx)(n.a,{href:"index.html",children:"MultiLocations"}),", we looked at the MultiLocation struct. We talked\nabout the Multilocation being a way to describe moving from one place in the system hierarchy to\nanother. The ",(0,a.jsx)(n.code,{children:"parents"})," parameter expresses the number of steps up in the hierarchy. In this section,\nwe dive further into the MultiLocation struct and explain how we can use the Junctions type to\ndescribe steps in the system hierarchy. Take a look at the MultiLocation struct again:"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-rust",children:"pub struct MultiLocation {\n pub parents: u8,\n pub interior: Junctions,\n}\n"})}),"\n",(0,a.jsxs)(n.p,{children:["The system hierarchy consists of 1-to-n relations. Each place in the system hierarchy can only ever\nhave one parent, so there is only one way up the hierarchy. That is why we can use a ",(0,a.jsx)(n.code,{children:"u8"})," to\ndescribe the number of ",(0,a.jsx)(n.code,{children:"parents"})," we want to move up. But moving down is a bit more difficult, as one\nconsensus system can encapsulate multiple other consensus systems(e.g. a relay chain can have\nmultiple parachains). So to describe the correct steps down the hierarchy, we use the ",(0,a.jsx)(n.code,{children:"Junctions"}),"\n",(0,a.jsx)(n.a,{href:"https://paritytech.github.io/polkadot/doc/xcm/v3/enum.Junctions.html",children:"type"}),"."]}),"\n",(0,a.jsx)(n.h2,{id:"junctions-type",children:"Junctions Type"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-rust",children:"pub enum Junctions {\n /// The interpreting consensus system.\n Here,\n /// A relative path comprising 1 junction.\n X1(Junction),\n ...\n /// A relative path comprising 8 junctions.\n X8(Junction, Junction, Junction, Junction, Junction, Junction, Junction, Junction),\n}\n"})}),"\n",(0,a.jsxs)(n.p,{children:["The ",(0,a.jsx)(n.code,{children:"Junctions"})," enum can represent zero to eight steps down the hierarchy. When the ",(0,a.jsx)(n.code,{children:"Here"})," variant\nis used, it means that we do not have to take steps down the hierarchy. We can for example describe\nthe current location with ",(0,a.jsx)(n.code,{children:"{parents: 0, interior: Here}"})," or the Parent location with\n",(0,a.jsx)(n.code,{children:"{parents: 1, interior: Here}"}),". If we want to take steps down the hierarchy, we express each step as\na Junction."]}),"\n",(0,a.jsx)(n.h2,{id:"junction-type",children:"Junction Type"}),"\n",(0,a.jsxs)(n.p,{children:["A ",(0,a.jsx)(n.a,{href:"https://paritytech.github.io/polkadot/doc/xcm/v3/enum.Junction.html",children:"Junction"})," describes a step\ndown in the Hierarchy. The ",(0,a.jsx)(n.code,{children:"Junction"}),"s are defined as follows:"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-rust",children:"pub enum Junction {\n Parachain(u32),\n AccountId32 {\n network: Option,\n id: [u8; 32],\n },\n AccountIndex64 {\n network: Option,\n index: u64,\n },\n AccountKey20 {\n network: Option,\n key: [u8; 20],\n },\n PalletInstance(u8),\n GeneralIndex(u128),\n GeneralKey {\n length: u8,\n data: [u8; 32],\n },\n OnlyChild,\n Plurality {\n id: BodyId,\n part: BodyPart,\n },\n GlobalConsensus(NetworkId),\n}\n"})}),"\n",(0,a.jsx)(n.h4,{id:"parachain",children:"Parachain"}),"\n",(0,a.jsxs)(n.p,{children:["The ",(0,a.jsx)(n.code,{children:"Parachain"})," junction is used to describe a parachain from the point of a relay chain. Each\nparachain has an Id, e.g. Statemine in the Kusama network has Id 1000."]}),"\n",(0,a.jsx)(n.h4,{id:"palletinstance",children:"PalletInstance"}),"\n",(0,a.jsxs)(n.p,{children:["The ",(0,a.jsx)(n.code,{children:"PalletInstance"})," junction is used to describe a pallet in one of the parachains or relay chain.\nEach pallet has an Id that can be used for the ",(0,a.jsx)(n.code,{children:"PalletInstance"}),". This junction is mainly used for\nFRAME based systems."]}),"\n",(0,a.jsx)(n.h4,{id:"accountid32-and-accountkey20",children:"AccountId32 and AccountKey20"}),"\n",(0,a.jsxs)(n.p,{children:["Each of these junctions can be used to describe an account located in the current consensus system.\nThe ",(0,a.jsx)(n.code,{children:"AccountId32"})," is used to describe substrate-based accounts, while the ",(0,a.jsx)(n.code,{children:"AccountKey20"})," is mainly\nused to describe Ethereum or Bitcoin-based accounts or smart contracts. Both junctions express an\naccount based on the context they are used in. If the current location is the relay chain, then the\njunctions describe an account in the relay chain. The same is true for each parachain location."]}),"\n",(0,a.jsx)(n.h4,{id:"generalindex-and-generalkey",children:"GeneralIndex and GeneralKey"}),"\n",(0,a.jsxs)(n.p,{children:["Non-descript indices and keys within the current context location. The usage will vary widely owing\nto its generality. An example use case for the ",(0,a.jsx)(n.code,{children:"GeneralIndex"})," is to describe an Asset within an\nAssets Parachain."]}),"\n",(0,a.jsx)(n.p,{children:"NOTE: If possible, try to avoid using this and instead use a more specific junction."}),"\n",(0,a.jsx)(n.h4,{id:"accountindex64",children:"AccountIndex64"}),"\n",(0,a.jsxs)(n.p,{children:["The ",(0,a.jsx)(n.code,{children:"AccountIndex64"})," can be used to describe an account index. This may be used when the context is\na Frame-based chain and includes e.g. an indices pallet."]}),"\n",(0,a.jsx)(n.h4,{id:"onlychild",children:"OnlyChild"}),"\n",(0,a.jsxs)(n.p,{children:["The ",(0,a.jsx)(n.code,{children:"OnlyChild"})," junction can be used to describe the child of a location if there exists a 1-to-1\nrelation between the parent and child in the system hierarchy. The ",(0,a.jsx)(n.code,{children:"OnlyChild"})," junction is currently\nnot used except as a fallback when deriving context."]}),"\n",(0,a.jsx)(n.h4,{id:"plurality",children:"Plurality"}),"\n",(0,a.jsxs)(n.p,{children:["The ",(0,a.jsx)(n.code,{children:"Plurality"})," junction is used to describe a pluralistic body existing within the current\nconsensus location. Typical to be used to represent a governance origin of a chain, but could in\nprinciple be used to represent things such as multisigs also. See the\n",(0,a.jsx)(n.a,{href:"https://paritytech.github.io/polkadot/doc/xcm/v3/enum.BodyId.html",children:"BodyId documentation"})," for a\nbetter understanding of the bodies that the ",(0,a.jsx)(n.code,{children:"Plurality"})," junction can represent."]}),"\n",(0,a.jsx)(n.h4,{id:"globalconsensus",children:"GlobalConsensus"}),"\n",(0,a.jsxs)(n.p,{children:["A global network (e.g. Polkadot or Kusama) is capable of externalizing its own consensus. This is\nnot generally meaningful outside of the universal level. An example would be describing the Kusama\nrelay chain from the perspective of the Polkadot relay chain as\n",(0,a.jsx)(n.code,{children:"{parents: 1, interior: GlobalConsensus(Kusama)}"}),". An example use case could be routing XCMs between\nglobal consensus networks using bridges."]}),"\n",(0,a.jsx)(n.h2,{id:"multiple-ways-to-create-a-multilocation",children:"Multiple ways to create a MultiLocation"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-rust",children:"// Current Location\nMultiLocation {parents: 0, interior: Here};\nMultiLocation::new(0, Here);\nMultiLocation::here();\nMultiLocation::default();\nlet _: MultiLocation = Here.into();\n\n// Parent Location\nMultiLocation {parents: 1, interior: Here};\nMultiLocation::parent();\nlet _: MultiLocation = Parent.into();\n\n// Conversion\nMultiLocation { parents: 2, interior: X2(Parachain(1), GeneralIndex(1))};\nlet _: MultiLocation = (Parent, Parent, Parachain(1), GeneralIndex(1)).into();\n"})})]})}function d(e={}){const{wrapper:n}={...(0,c.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(u,{...e})}):u(e)}},28453:(e,n,t)=>{t.d(n,{R:()=>o,x:()=>s});var i=t(96540);const a={},c=i.createContext(a);function o(e){const n=i.useContext(c);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function s(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:o(e.components),i.createElement(c.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/d5909206.abf56504.js b/assets/js/d5909206.abf56504.js deleted file mode 100644 index 708bea830873..000000000000 --- a/assets/js/d5909206.abf56504.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5434],{79245:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>r,contentTitle:()=>o,default:()=>d,frontMatter:()=>c,metadata:()=>s,toc:()=>l});var i=t(74848),a=t(28453);const c={id:"learn-xcm-docs-multilocation-junctions",title:"Junction(s)",sidebar_label:"Junction(s)",description:"The Junction Type in a MultiLocation Struct.",keywords:["xcm","cross-consensus messaging","multilocation","junctions"],slug:"../multilocation-junctions"},o="Junction(s)",s={id:"learn/xcm/fundamentals/multilocation/learn-xcm-docs-multilocation-junctions",title:"Junction(s)",description:"The Junction Type in a MultiLocation Struct.",source:"@site/../docs/learn/xcm/fundamentals/multilocation/junction.md",sourceDirName:"learn/xcm/fundamentals/multilocation",slug:"/learn/xcm/fundamentals/multilocation-junctions",permalink:"/docs/learn/xcm/fundamentals/multilocation-junctions",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/xcm/fundamentals/multilocation/junction.md",tags:[],version:"current",lastUpdatedBy:"bader y",lastUpdatedAt:1694099593e3,frontMatter:{id:"learn-xcm-docs-multilocation-junctions",title:"Junction(s)",sidebar_label:"Junction(s)",description:"The Junction Type in a MultiLocation Struct.",keywords:["xcm","cross-consensus messaging","multilocation","junctions"],slug:"../multilocation-junctions"},sidebar:"docs",previous:{title:"Summary",permalink:"/docs/learn/xcm/fundamentals/multilocation-summary"},next:{title:"Example",permalink:"/docs/learn/xcm/fundamentals/multilocation-example"}},r={},l=[{value:"Junctions Type",id:"junctions-type",level:2},{value:"Junction Type",id:"junction-type",level:2},{value:"Parachain",id:"parachain",level:4},{value:"PalletInstance",id:"palletinstance",level:4},{value:"AccountId32 and AccountKey20",id:"accountid32-and-accountkey20",level:4},{value:"GeneralIndex and GeneralKey",id:"generalindex-and-generalkey",level:4},{value:"AccountIndex64",id:"accountindex64",level:4},{value:"OnlyChild",id:"onlychild",level:4},{value:"Plurality",id:"plurality",level:4},{value:"GlobalConsensus",id:"globalconsensus",level:4},{value:"Multiple ways to create a MultiLocation",id:"multiple-ways-to-create-a-multilocation",level:2}];function u(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h4:"h4",header:"header",p:"p",pre:"pre",...(0,a.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.header,{children:(0,i.jsx)(n.h1,{id:"junctions",children:"Junction(s)"})}),"\n",(0,i.jsxs)(n.p,{children:["In the section on ",(0,i.jsx)(n.a,{href:"index.html",children:"MultiLocations"}),", we looked at the MultiLocation struct. We talked\nabout the Multilocation being a way to describe moving from one place in the system hierarchy to\nanother. The ",(0,i.jsx)(n.code,{children:"parents"})," parameter expresses the number of steps up in the hierarchy. In this section,\nwe dive further into the MultiLocation struct and explain how we can use the Junctions type to\ndescribe steps in the system hierarchy. Take a look at the MultiLocation struct again:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-rust",children:"pub struct MultiLocation {\n pub parents: u8,\n pub interior: Junctions,\n}\n"})}),"\n",(0,i.jsxs)(n.p,{children:["The system hierarchy consists of 1-to-n relations. Each place in the system hierarchy can only ever\nhave one parent, so there is only one way up the hierarchy. That is why we can use a ",(0,i.jsx)(n.code,{children:"u8"})," to\ndescribe the number of ",(0,i.jsx)(n.code,{children:"parents"})," we want to move up. But moving down is a bit more difficult, as one\nconsensus system can encapsulate multiple other consensus systems(e.g. a relay chain can have\nmultiple parachains). So to describe the correct steps down the hierarchy, we use the ",(0,i.jsx)(n.code,{children:"Junctions"}),"\n",(0,i.jsx)(n.a,{href:"https://paritytech.github.io/polkadot/doc/xcm/v3/enum.Junctions.html",children:"type"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"junctions-type",children:"Junctions Type"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-rust",children:"pub enum Junctions {\n /// The interpreting consensus system.\n Here,\n /// A relative path comprising 1 junction.\n X1(Junction),\n ...\n /// A relative path comprising 8 junctions.\n X8(Junction, Junction, Junction, Junction, Junction, Junction, Junction, Junction),\n}\n"})}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.code,{children:"Junctions"})," enum can represent zero to eight steps down the hierarchy. When the ",(0,i.jsx)(n.code,{children:"Here"})," variant\nis used, it means that we do not have to take steps down the hierarchy. We can for example describe\nthe current location with ",(0,i.jsx)(n.code,{children:"{parents: 0, interior: Here}"})," or the Parent location with\n",(0,i.jsx)(n.code,{children:"{parents: 1, interior: Here}"}),". If we want to take steps down the hierarchy, we express each step as\na Junction."]}),"\n",(0,i.jsx)(n.h2,{id:"junction-type",children:"Junction Type"}),"\n",(0,i.jsxs)(n.p,{children:["A ",(0,i.jsx)(n.a,{href:"https://paritytech.github.io/polkadot/doc/xcm/v3/enum.Junction.html",children:"Junction"})," describes a step\ndown in the Hierarchy. The ",(0,i.jsx)(n.code,{children:"Junction"}),"s are defined as follows:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-rust",children:"pub enum Junction {\n Parachain(u32),\n AccountId32 {\n network: Option,\n id: [u8; 32],\n },\n AccountIndex64 {\n network: Option,\n index: u64,\n },\n AccountKey20 {\n network: Option,\n key: [u8; 20],\n },\n PalletInstance(u8),\n GeneralIndex(u128),\n GeneralKey {\n length: u8,\n data: [u8; 32],\n },\n OnlyChild,\n Plurality {\n id: BodyId,\n part: BodyPart,\n },\n GlobalConsensus(NetworkId),\n}\n"})}),"\n",(0,i.jsx)(n.h4,{id:"parachain",children:"Parachain"}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.code,{children:"Parachain"})," junction is used to describe a parachain from the point of a relay chain. Each\nparachain has an Id, e.g. Statemine in the Kusama network has Id 1000."]}),"\n",(0,i.jsx)(n.h4,{id:"palletinstance",children:"PalletInstance"}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.code,{children:"PalletInstance"})," junction is used to describe a pallet in one of the parachains or relay chain.\nEach pallet has an Id that can be used for the ",(0,i.jsx)(n.code,{children:"PalletInstance"}),". This junction is mainly used for\nFRAME based systems."]}),"\n",(0,i.jsx)(n.h4,{id:"accountid32-and-accountkey20",children:"AccountId32 and AccountKey20"}),"\n",(0,i.jsxs)(n.p,{children:["Each of these junctions can be used to describe an account located in the current consensus system.\nThe ",(0,i.jsx)(n.code,{children:"AccountId32"})," is used to describe substrate-based accounts, while the ",(0,i.jsx)(n.code,{children:"AccountKey20"})," is mainly\nused to describe Ethereum or Bitcoin-based accounts or smart contracts. Both junctions express an\naccount based on the context they are used in. If the current location is the relay chain, then the\njunctions describe an account in the relay chain. The same is true for each parachain location."]}),"\n",(0,i.jsx)(n.h4,{id:"generalindex-and-generalkey",children:"GeneralIndex and GeneralKey"}),"\n",(0,i.jsxs)(n.p,{children:["Non-descript indices and keys within the current context location. The usage will vary widely owing\nto its generality. An example use case for the ",(0,i.jsx)(n.code,{children:"GeneralIndex"})," is to describe an Asset within an\nAssets Parachain."]}),"\n",(0,i.jsx)(n.p,{children:"NOTE: If possible, try to avoid using this and instead use a more specific junction."}),"\n",(0,i.jsx)(n.h4,{id:"accountindex64",children:"AccountIndex64"}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.code,{children:"AccountIndex64"})," can be used to describe an account index. This may be used when the context is\na Frame-based chain and includes e.g. an indices pallet."]}),"\n",(0,i.jsx)(n.h4,{id:"onlychild",children:"OnlyChild"}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.code,{children:"OnlyChild"})," junction can be used to describe the child of a location if there exists a 1-to-1\nrelation between the parent and child in the system hierarchy. The ",(0,i.jsx)(n.code,{children:"OnlyChild"})," junction is currently\nnot used except as a fallback when deriving context."]}),"\n",(0,i.jsx)(n.h4,{id:"plurality",children:"Plurality"}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.code,{children:"Plurality"})," junction is used to describe a pluralistic body existing within the current\nconsensus location. Typical to be used to represent a governance origin of a chain, but could in\nprinciple be used to represent things such as multisigs also. See the\n",(0,i.jsx)(n.a,{href:"https://paritytech.github.io/polkadot/doc/xcm/v3/enum.BodyId.html",children:"BodyId documentation"})," for a\nbetter understanding of the bodies that the ",(0,i.jsx)(n.code,{children:"Plurality"})," junction can represent."]}),"\n",(0,i.jsx)(n.h4,{id:"globalconsensus",children:"GlobalConsensus"}),"\n",(0,i.jsxs)(n.p,{children:["A global network (e.g. Polkadot or Kusama) is capable of externalizing its own consensus. This is\nnot generally meaningful outside of the universal level. An example would be describing the Kusama\nrelay chain from the perspective of the Polkadot relay chain as\n",(0,i.jsx)(n.code,{children:"{parents: 1, interior: GlobalConsensus(Kusama)}"}),". An example use case could be routing XCMs between\nglobal consensus networks using bridges."]}),"\n",(0,i.jsx)(n.h2,{id:"multiple-ways-to-create-a-multilocation",children:"Multiple ways to create a MultiLocation"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-rust",children:"// Current Location\nMultiLocation {parents: 0, interior: Here};\nMultiLocation::new(0, Here);\nMultiLocation::here();\nMultiLocation::default();\nlet _: MultiLocation = Here.into();\n\n// Parent Location\nMultiLocation {parents: 1, interior: Here};\nMultiLocation::parent();\nlet _: MultiLocation = Parent.into();\n\n// Conversion\nMultiLocation { parents: 2, interior: X2(Parachain(1), GeneralIndex(1))};\nlet _: MultiLocation = (Parent, Parent, Parachain(1), GeneralIndex(1)).into();\n"})})]})}function d(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(u,{...e})}):u(e)}},28453:(e,n,t)=>{t.d(n,{R:()=>o,x:()=>s});var i=t(96540);const a={},c=i.createContext(a);function o(e){const n=i.useContext(c);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function s(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:o(e.components),i.createElement(c.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/d6a97e7e.50d967a3.js b/assets/js/d6a97e7e.50d967a3.js deleted file mode 100644 index af3a94fcc675..000000000000 --- a/assets/js/d6a97e7e.50d967a3.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1107],{58398:(t,e,s)=>{s.r(e),s.d(e,{assets:()=>c,contentTitle:()=>i,default:()=>m,frontMatter:()=>a,metadata:()=>o,toc:()=>l});var n=s(74848),r=s(28453);const a={id:"learn-xcm-docs-quickstart-simulator",title:"XCM Simulator",sidebar_label:"XCM Simulator",description:"Test XCM using a Simulated Environment.",keywords:["xcm","cross-consensus messaging","simulator"],slug:"../quickstart-simulator"},i="XCM Simulator",o={id:"learn/xcm/quickstart/learn-xcm-docs-quickstart-simulator",title:"XCM Simulator",description:"Test XCM using a Simulated Environment.",source:"@site/../docs/learn/xcm/quickstart/xcm-simulator.md",sourceDirName:"learn/xcm/quickstart",slug:"/learn/xcm/quickstart-simulator",permalink:"/docs/learn/xcm/quickstart-simulator",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/xcm/quickstart/xcm-simulator.md",tags:[],version:"current",lastUpdatedBy:"Radha",lastUpdatedAt:1694074887e3,frontMatter:{id:"learn-xcm-docs-quickstart-simulator",title:"XCM Simulator",sidebar_label:"XCM Simulator",description:"Test XCM using a Simulated Environment.",keywords:["xcm","cross-consensus messaging","simulator"],slug:"../quickstart-simulator"},sidebar:"docs",previous:{title:"Summary",permalink:"/docs/learn/xcm/quickstart-summary"},next:{title:"First Look at an XCM",permalink:"/docs/learn/xcm/quickstart-first-look"}},c={},l=[];function u(t){const e={a:"a",code:"code",h1:"h1",header:"header",p:"p",...(0,r.R)(),...t.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(e.header,{children:(0,n.jsx)(e.h1,{id:"xcm-simulator",children:"XCM Simulator"})}),"\n",(0,n.jsxs)(e.p,{children:["Setting up a live network with multiple connected parachains for testing XCM is not straight\nforward. The ",(0,n.jsx)(e.code,{children:"xcm-simulator"})," was created as a solution to this problem. It's a network simulator\nspecifically designed for testing and tinkering with XCM. It uses mock runtimes for a relay chain\nand parachains."]}),"\n",(0,n.jsxs)(e.p,{children:["Although it's a great tool to learn and test XCMs, it shouldn't be the only thing you use to\nactually test your XCM-powered solution. We'll get into tools and best practices for testing in the\n",(0,n.jsx)(e.a,{href:"/docs/learn/xcm/testing",children:"testing"})," chapter."]}),"\n",(0,n.jsx)(e.p,{children:"We'll use the simulator throughout the documentation to show different XCMs in action. In the next\nsection we will take a first look at an XCM."})]})}function m(t={}){const{wrapper:e}={...(0,r.R)(),...t.components};return e?(0,n.jsx)(e,{...t,children:(0,n.jsx)(u,{...t})}):u(t)}},28453:(t,e,s)=>{s.d(e,{R:()=>i,x:()=>o});var n=s(96540);const r={},a=n.createContext(r);function i(t){const e=n.useContext(a);return n.useMemo((function(){return"function"==typeof t?t(e):{...e,...t}}),[e,t])}function o(t){let e;return e=t.disableParentContext?"function"==typeof t.components?t.components(r):t.components||r:i(t.components),n.createElement(a.Provider,{value:e},t.children)}}}]); \ No newline at end of file diff --git a/assets/js/d6a97e7e.ee99cdff.js b/assets/js/d6a97e7e.ee99cdff.js new file mode 100644 index 000000000000..4bae1089edb7 --- /dev/null +++ b/assets/js/d6a97e7e.ee99cdff.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1107],{41316:(t,e,s)=>{s.r(e),s.d(e,{assets:()=>c,contentTitle:()=>o,default:()=>m,frontMatter:()=>i,metadata:()=>n,toc:()=>l});const n=JSON.parse('{"id":"learn/xcm/quickstart/learn-xcm-docs-quickstart-simulator","title":"XCM Simulator","description":"Test XCM using a Simulated Environment.","source":"@site/../docs/learn/xcm/quickstart/xcm-simulator.md","sourceDirName":"learn/xcm/quickstart","slug":"/learn/xcm/quickstart-simulator","permalink":"/docs/learn/xcm/quickstart-simulator","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/xcm/quickstart/xcm-simulator.md","tags":[],"version":"current","lastUpdatedBy":"Radha","lastUpdatedAt":1694074887000,"frontMatter":{"id":"learn-xcm-docs-quickstart-simulator","title":"XCM Simulator","sidebar_label":"XCM Simulator","description":"Test XCM using a Simulated Environment.","keywords":["xcm","cross-consensus messaging","simulator"],"slug":"../quickstart-simulator"},"sidebar":"docs","previous":{"title":"Summary","permalink":"/docs/learn/xcm/quickstart-summary"},"next":{"title":"First Look at an XCM","permalink":"/docs/learn/xcm/quickstart-first-look"}}');var r=s(74848),a=s(28453);const i={id:"learn-xcm-docs-quickstart-simulator",title:"XCM Simulator",sidebar_label:"XCM Simulator",description:"Test XCM using a Simulated Environment.",keywords:["xcm","cross-consensus messaging","simulator"],slug:"../quickstart-simulator"},o="XCM Simulator",c={},l=[];function u(t){const e={a:"a",code:"code",h1:"h1",header:"header",p:"p",...(0,a.R)(),...t.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(e.header,{children:(0,r.jsx)(e.h1,{id:"xcm-simulator",children:"XCM Simulator"})}),"\n",(0,r.jsxs)(e.p,{children:["Setting up a live network with multiple connected parachains for testing XCM is not straight\nforward. The ",(0,r.jsx)(e.code,{children:"xcm-simulator"})," was created as a solution to this problem. It's a network simulator\nspecifically designed for testing and tinkering with XCM. It uses mock runtimes for a relay chain\nand parachains."]}),"\n",(0,r.jsxs)(e.p,{children:["Although it's a great tool to learn and test XCMs, it shouldn't be the only thing you use to\nactually test your XCM-powered solution. We'll get into tools and best practices for testing in the\n",(0,r.jsx)(e.a,{href:"/docs/learn/xcm/testing",children:"testing"})," chapter."]}),"\n",(0,r.jsx)(e.p,{children:"We'll use the simulator throughout the documentation to show different XCMs in action. In the next\nsection we will take a first look at an XCM."})]})}function m(t={}){const{wrapper:e}={...(0,a.R)(),...t.components};return e?(0,r.jsx)(e,{...t,children:(0,r.jsx)(u,{...t})}):u(t)}},28453:(t,e,s)=>{s.d(e,{R:()=>i,x:()=>o});var n=s(96540);const r={},a=n.createContext(r);function i(t){const e=n.useContext(a);return n.useMemo((function(){return"function"==typeof t?t(e):{...e,...t}}),[e,t])}function o(t){let e;return e=t.disableParentContext?"function"==typeof t.components?t.components(r):t.components||r:i(t.components),n.createElement(a.Provider,{value:e},t.children)}}}]); \ No newline at end of file diff --git a/assets/js/d6b0148d.b4389721.js b/assets/js/d6b0148d.b4389721.js deleted file mode 100644 index 305410ebfd0b..000000000000 --- a/assets/js/d6b0148d.b4389721.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2980],{56591:(n,e,i)=>{i.r(e),i.d(e,{assets:()=>a,contentTitle:()=>s,default:()=>d,frontMatter:()=>o,metadata:()=>c,toc:()=>l});var t=i(74848),r=i(28453);const o={id:"learn-xcm-docs-journey-origin",title:"Origin Manipulation",sidebar_label:"Origin Manipulation",description:"Manipulating the Origin of XCM.",keywords:["xcm","cross-consensus messaging","origin"],slug:"../journey-origin"},s="Origin manipulation",c={id:"learn/xcm/journey/learn-xcm-docs-journey-origin",title:"Origin Manipulation",description:"Manipulating the Origin of XCM.",source:"@site/../docs/learn/xcm/journey/origins.md",sourceDirName:"learn/xcm/journey",slug:"/learn/xcm/journey-origin",permalink:"/docs/learn/xcm/journey-origin",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/xcm/journey/origins.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1727991122e3,frontMatter:{id:"learn-xcm-docs-journey-origin",title:"Origin Manipulation",sidebar_label:"Origin Manipulation",description:"Manipulating the Origin of XCM.",keywords:["xcm","cross-consensus messaging","origin"],slug:"../journey-origin"},sidebar:"docs",previous:{title:"Transact: A General Solution",permalink:"/docs/learn/xcm/journey-transact"},next:{title:"More Register Modifiers",permalink:"/docs/learn/xcm/journey-register"}},a={},l=[{value:"ClearOrigin",id:"clearorigin",level:2},{value:"DescendOrigin",id:"descendorigin",level:2},{value:"UniversalOrigin",id:"universalorigin",level:2},{value:"AliasOrigin",id:"aliasorigin",level:2}];function h(n){const e={code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,r.R)(),...n.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(e.header,{children:(0,t.jsx)(e.h1,{id:"origin-manipulation",children:"Origin manipulation"})}),"\n",(0,t.jsxs)(e.p,{children:["An XCVM contains contextual information while executing XCM instructions. It uses the ",(0,t.jsx)(e.code,{children:"XcmContext"}),"\nstruct to provide them. ",(0,t.jsx)(e.code,{children:"XcmContext"})," contains information such as the origin of the corresponding\nXCM, the hash of the message, and the topic of the XCM."]}),"\n",(0,t.jsx)(e.pre,{children:(0,t.jsx)(e.code,{className:"language-rust",children:"pub struct XcmContext {\n\t/// The `MultiLocation` origin of the corresponding XCM.\n\tpub origin: Option,\n\t/// The hash of the XCM.\n\tpub message_hash: XcmHash,\n\t/// The topic of the XCM.\n\tpub topic: Option<[u8; 32]>,\n}\n"})}),"\n",(0,t.jsxs)(e.p,{children:["In the XCVM, the origin field of the XcmContext indicates which ",(0,t.jsx)(e.code,{children:"MultiLocation"}),"'s privilege level\nthat the current program is using to execute. The origin is important for enforcing restrictions and\nensuring appropriate execution of the instructions."]}),"\n",(0,t.jsx)(e.p,{children:"There are multiple instructions in XCM that can alter the XcmContext origin field:"}),"\n",(0,t.jsxs)(e.ul,{children:["\n",(0,t.jsx)(e.li,{children:(0,t.jsx)(e.code,{children:"ClearOrigin"})}),"\n",(0,t.jsx)(e.li,{children:(0,t.jsx)(e.code,{children:"DescendOrigin"})}),"\n",(0,t.jsx)(e.li,{children:(0,t.jsx)(e.code,{children:"UniversalOrigin"})}),"\n",(0,t.jsx)(e.li,{children:(0,t.jsx)(e.code,{children:"AliasOrigin"})}),"\n"]}),"\n",(0,t.jsx)(e.h2,{id:"clearorigin",children:"ClearOrigin"}),"\n",(0,t.jsx)(e.pre,{children:(0,t.jsx)(e.code,{className:"language-rust",children:"ClearOrigin\n"})}),"\n",(0,t.jsxs)(e.p,{children:["The ",(0,t.jsx)(e.code,{children:"ClearOrigin"})," instruction clears the origin register in the XCVM. Specifically, it sets the\norigin field of the XCM context to None. This ensures that subsequent instructions in the XCM cannot\nuse the privilege level of the cleared origin to execute operations."]}),"\n",(0,t.jsx)(e.h2,{id:"descendorigin",children:"DescendOrigin"}),"\n",(0,t.jsx)(e.pre,{children:(0,t.jsx)(e.code,{className:"language-rust",children:"DescendOrigin(InteriorMultiLocation),\n"})}),"\n",(0,t.jsxs)(e.p,{children:["The ",(0,t.jsx)(e.code,{children:"DescendOrigin"})," instruction is used to change the XcmContext origin to an interior location of\nthe current origin."]}),"\n",(0,t.jsx)(e.p,{children:"This can be useful when executing instructions that require a specific location within the current\norigin."}),"\n",(0,t.jsxs)(e.p,{children:["Note that the XcmContext origin is a ",(0,t.jsx)(e.code,{children:"MultiLocation"})," containing an ",(0,t.jsx)(e.code,{children:"InteriorMultiLocation"})," enum; it\ncan only hold up to a maximum of 8 ",(0,t.jsx)(e.code,{children:"Junction"}),"s, so when we try to execute multiple ",(0,t.jsx)(e.code,{children:"DescendOrigin"}),"\ninstructions which would result in an ",(0,t.jsx)(e.code,{children:"InteriorMultiLocation"})," containing more than 8 ",(0,t.jsx)(e.code,{children:"Junction"}),"s, a\n",(0,t.jsx)(e.code,{children:"LocationFull"})," error is thrown."]}),"\n",(0,t.jsx)(e.h2,{id:"universalorigin",children:"UniversalOrigin"}),"\n",(0,t.jsx)(e.pre,{children:(0,t.jsx)(e.code,{className:"language-rust",children:"UniversalOrigin(Junction)\n"})}),"\n",(0,t.jsxs)(e.p,{children:["The UniversalOrigin XCM instruction sets the Origin Register to be a child of the Universal\nLocation. The Junction parameter should generally be a ",(0,t.jsx)(e.code,{children:"GlobalConsensus"})," variant since only these\nare children of the Universal Location."]}),"\n",(0,t.jsxs)(e.p,{children:["Safety Note: Should only be usable if the Origin is trusted to represent a child of the Universal\nlocation. In general, no Origin should be able to represent the Universal Location's child which is\nthe root of the local consensus system since it would by extension allow it to act as any location\nwithin the local consensus, but it is necessary when bridging XCMs between ",(0,t.jsx)(e.code,{children:"GlobalConsensus"}),"\nsystems."]}),"\n",(0,t.jsx)(e.h2,{id:"aliasorigin",children:"AliasOrigin"}),"\n",(0,t.jsx)(e.pre,{children:(0,t.jsx)(e.code,{className:"language-rust",children:"AliasOrigin(MultiLocation)\n"})}),"\n",(0,t.jsx)(e.p,{children:"The AliasOrigin instruction is similar to the UniversalOrigin instruction, but it is primarily used\nfor account IDs. When executed, it switches out the current origin for the given MultiLocation. THe\nAliasOrigin instruction would allow to remove certain prefix patterns such as Parent/Parachain(X)/\nfor certain values of X (thereby allowing sibling chains to use the same account IDs) or\nParachain(X)/ (allowing a relay chain to use the account IDs native to its child parachains) or just\nParent/ (allowing parachains to use AccountIds of the relay chain)."})]})}function d(n={}){const{wrapper:e}={...(0,r.R)(),...n.components};return e?(0,t.jsx)(e,{...n,children:(0,t.jsx)(h,{...n})}):h(n)}},28453:(n,e,i)=>{i.d(e,{R:()=>s,x:()=>c});var t=i(96540);const r={},o=t.createContext(r);function s(n){const e=t.useContext(o);return t.useMemo((function(){return"function"==typeof n?n(e):{...e,...n}}),[e,n])}function c(n){let e;return e=n.disableParentContext?"function"==typeof n.components?n.components(r):n.components||r:s(n.components),t.createElement(o.Provider,{value:e},n.children)}}}]); \ No newline at end of file diff --git a/assets/js/d6b0148d.e0641a6c.js b/assets/js/d6b0148d.e0641a6c.js new file mode 100644 index 000000000000..8321152fd678 --- /dev/null +++ b/assets/js/d6b0148d.e0641a6c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2980],{29811:(n,e,i)=>{i.r(e),i.d(e,{assets:()=>a,contentTitle:()=>c,default:()=>d,frontMatter:()=>s,metadata:()=>t,toc:()=>l});const t=JSON.parse('{"id":"learn/xcm/journey/learn-xcm-docs-journey-origin","title":"Origin Manipulation","description":"Manipulating the Origin of XCM.","source":"@site/../docs/learn/xcm/journey/origins.md","sourceDirName":"learn/xcm/journey","slug":"/learn/xcm/journey-origin","permalink":"/docs/learn/xcm/journey-origin","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/xcm/journey/origins.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1727991122000,"frontMatter":{"id":"learn-xcm-docs-journey-origin","title":"Origin Manipulation","sidebar_label":"Origin Manipulation","description":"Manipulating the Origin of XCM.","keywords":["xcm","cross-consensus messaging","origin"],"slug":"../journey-origin"},"sidebar":"docs","previous":{"title":"Transact: A General Solution","permalink":"/docs/learn/xcm/journey-transact"},"next":{"title":"More Register Modifiers","permalink":"/docs/learn/xcm/journey-register"}}');var r=i(74848),o=i(28453);const s={id:"learn-xcm-docs-journey-origin",title:"Origin Manipulation",sidebar_label:"Origin Manipulation",description:"Manipulating the Origin of XCM.",keywords:["xcm","cross-consensus messaging","origin"],slug:"../journey-origin"},c="Origin manipulation",a={},l=[{value:"ClearOrigin",id:"clearorigin",level:2},{value:"DescendOrigin",id:"descendorigin",level:2},{value:"UniversalOrigin",id:"universalorigin",level:2},{value:"AliasOrigin",id:"aliasorigin",level:2}];function h(n){const e={code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,o.R)(),...n.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(e.header,{children:(0,r.jsx)(e.h1,{id:"origin-manipulation",children:"Origin manipulation"})}),"\n",(0,r.jsxs)(e.p,{children:["An XCVM contains contextual information while executing XCM instructions. It uses the ",(0,r.jsx)(e.code,{children:"XcmContext"}),"\nstruct to provide them. ",(0,r.jsx)(e.code,{children:"XcmContext"})," contains information such as the origin of the corresponding\nXCM, the hash of the message, and the topic of the XCM."]}),"\n",(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{className:"language-rust",children:"pub struct XcmContext {\n\t/// The `MultiLocation` origin of the corresponding XCM.\n\tpub origin: Option,\n\t/// The hash of the XCM.\n\tpub message_hash: XcmHash,\n\t/// The topic of the XCM.\n\tpub topic: Option<[u8; 32]>,\n}\n"})}),"\n",(0,r.jsxs)(e.p,{children:["In the XCVM, the origin field of the XcmContext indicates which ",(0,r.jsx)(e.code,{children:"MultiLocation"}),"'s privilege level\nthat the current program is using to execute. The origin is important for enforcing restrictions and\nensuring appropriate execution of the instructions."]}),"\n",(0,r.jsx)(e.p,{children:"There are multiple instructions in XCM that can alter the XcmContext origin field:"}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsx)(e.li,{children:(0,r.jsx)(e.code,{children:"ClearOrigin"})}),"\n",(0,r.jsx)(e.li,{children:(0,r.jsx)(e.code,{children:"DescendOrigin"})}),"\n",(0,r.jsx)(e.li,{children:(0,r.jsx)(e.code,{children:"UniversalOrigin"})}),"\n",(0,r.jsx)(e.li,{children:(0,r.jsx)(e.code,{children:"AliasOrigin"})}),"\n"]}),"\n",(0,r.jsx)(e.h2,{id:"clearorigin",children:"ClearOrigin"}),"\n",(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{className:"language-rust",children:"ClearOrigin\n"})}),"\n",(0,r.jsxs)(e.p,{children:["The ",(0,r.jsx)(e.code,{children:"ClearOrigin"})," instruction clears the origin register in the XCVM. Specifically, it sets the\norigin field of the XCM context to None. This ensures that subsequent instructions in the XCM cannot\nuse the privilege level of the cleared origin to execute operations."]}),"\n",(0,r.jsx)(e.h2,{id:"descendorigin",children:"DescendOrigin"}),"\n",(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{className:"language-rust",children:"DescendOrigin(InteriorMultiLocation),\n"})}),"\n",(0,r.jsxs)(e.p,{children:["The ",(0,r.jsx)(e.code,{children:"DescendOrigin"})," instruction is used to change the XcmContext origin to an interior location of\nthe current origin."]}),"\n",(0,r.jsx)(e.p,{children:"This can be useful when executing instructions that require a specific location within the current\norigin."}),"\n",(0,r.jsxs)(e.p,{children:["Note that the XcmContext origin is a ",(0,r.jsx)(e.code,{children:"MultiLocation"})," containing an ",(0,r.jsx)(e.code,{children:"InteriorMultiLocation"})," enum; it\ncan only hold up to a maximum of 8 ",(0,r.jsx)(e.code,{children:"Junction"}),"s, so when we try to execute multiple ",(0,r.jsx)(e.code,{children:"DescendOrigin"}),"\ninstructions which would result in an ",(0,r.jsx)(e.code,{children:"InteriorMultiLocation"})," containing more than 8 ",(0,r.jsx)(e.code,{children:"Junction"}),"s, a\n",(0,r.jsx)(e.code,{children:"LocationFull"})," error is thrown."]}),"\n",(0,r.jsx)(e.h2,{id:"universalorigin",children:"UniversalOrigin"}),"\n",(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{className:"language-rust",children:"UniversalOrigin(Junction)\n"})}),"\n",(0,r.jsxs)(e.p,{children:["The UniversalOrigin XCM instruction sets the Origin Register to be a child of the Universal\nLocation. The Junction parameter should generally be a ",(0,r.jsx)(e.code,{children:"GlobalConsensus"})," variant since only these\nare children of the Universal Location."]}),"\n",(0,r.jsxs)(e.p,{children:["Safety Note: Should only be usable if the Origin is trusted to represent a child of the Universal\nlocation. In general, no Origin should be able to represent the Universal Location's child which is\nthe root of the local consensus system since it would by extension allow it to act as any location\nwithin the local consensus, but it is necessary when bridging XCMs between ",(0,r.jsx)(e.code,{children:"GlobalConsensus"}),"\nsystems."]}),"\n",(0,r.jsx)(e.h2,{id:"aliasorigin",children:"AliasOrigin"}),"\n",(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{className:"language-rust",children:"AliasOrigin(MultiLocation)\n"})}),"\n",(0,r.jsx)(e.p,{children:"The AliasOrigin instruction is similar to the UniversalOrigin instruction, but it is primarily used\nfor account IDs. When executed, it switches out the current origin for the given MultiLocation. THe\nAliasOrigin instruction would allow to remove certain prefix patterns such as Parent/Parachain(X)/\nfor certain values of X (thereby allowing sibling chains to use the same account IDs) or\nParachain(X)/ (allowing a relay chain to use the account IDs native to its child parachains) or just\nParent/ (allowing parachains to use AccountIds of the relay chain)."})]})}function d(n={}){const{wrapper:e}={...(0,o.R)(),...n.components};return e?(0,r.jsx)(e,{...n,children:(0,r.jsx)(h,{...n})}):h(n)}},28453:(n,e,i)=>{i.d(e,{R:()=>s,x:()=>c});var t=i(96540);const r={},o=t.createContext(r);function s(n){const e=t.useContext(o);return t.useMemo((function(){return"function"==typeof n?n(e):{...e,...n}}),[e,n])}function c(n){let e;return e=n.disableParentContext?"function"==typeof n.components?n.components(r):n.components||r:s(n.components),t.createElement(o.Provider,{value:e},n.children)}}}]); \ No newline at end of file diff --git a/assets/js/d9a69e3a.9cebf18c.js b/assets/js/d9a69e3a.9cebf18c.js new file mode 100644 index 000000000000..9cd714146f4c --- /dev/null +++ b/assets/js/d9a69e3a.9cebf18c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5829],{19923:(e,n,a)=>{a.r(n),a.d(n,{assets:()=>o,contentTitle:()=>d,default:()=>h,frontMatter:()=>r,metadata:()=>s,toc:()=>l});const s=JSON.parse('{"id":"general/dune-analytics/parachain-dashboards/people-dashboards","title":"People Dashboards","description":"People is a parachain on Polkadot focused on decentralized identity and social interactions.","source":"@site/../docs/general/dune-analytics/parachain-dashboards/people-dashboards.md","sourceDirName":"general/dune-analytics/parachain-dashboards","slug":"/general/dune-analytics/people-dashboards","permalink":"/docs/general/dune-analytics/people-dashboards","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/parachain-dashboards/people-dashboards.md","tags":[],"version":"current","lastUpdatedBy":"MK","lastUpdatedAt":1719215716000,"frontMatter":{"id":"people-dashboards","title":"People Dashboards","sidebar_label":"People","description":"People is a parachain on Polkadot focused on decentralized identity and social interactions.","keywords":["polkadot","dashboard","dune","people","identity"],"slug":"../people-dashboards"},"sidebar":"docs","previous":{"title":"Nodle","permalink":"/docs/general/dune-analytics/nodle-dashboards"},"next":{"title":"Pendulum","permalink":"/docs/general/dune-analytics/pendulum-dashboards"}}');var i=a(74848),t=a(28453);const r={id:"people-dashboards",title:"People Dashboards",sidebar_label:"People",description:"People is a parachain on Polkadot focused on decentralized identity and social interactions.",keywords:["polkadot","dashboard","dune","people","identity"],slug:"../people-dashboards"},d="People Dashboards",o={},l=[{value:"Overview",id:"overview",level:2},{value:"Featured Dashboards on Dune",id:"featured-dashboards-on-dune",level:2},{value:"Key Tables",id:"key-tables",level:2},{value:"Useful Queries",id:"useful-queries",level:2},{value:"Getting Started with Queries",id:"getting-started-with-queries",level:2}];function c(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,t.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.header,{children:(0,i.jsx)(n.h1,{id:"people-dashboards",children:"People Dashboards"})}),"\n",(0,i.jsx)(n.h2,{id:"overview",children:"Overview"}),"\n",(0,i.jsx)(n.p,{children:"People's Chain focuses on decentralized identity and social interactions, enabling users to manage\ntheir digital identity and engage in community governance."}),"\n",(0,i.jsx)(n.h2,{id:"featured-dashboards-on-dune",children:"Featured Dashboards on Dune"}),"\n",(0,i.jsx)(n.p,{children:"Here you will find a variety of dashboards that help visualize data from the People parachain:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.a,{href:"https://dune.com/substrate/people",children:"People Dashboard"}),": A comprehensive view of identity management\nand social interaction activities within the People ecosystem."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["Please also visit our dashboards for People on\n",(0,i.jsx)(n.a,{href:"https://dune.com/discover/content/relevant?q=title:People%20author:substrate",children:"Dune Analytics"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"key-tables",children:"Key Tables"}),"\n",(0,i.jsx)(n.p,{children:"Data from the People parachain is organized into several key tables:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"people.balances"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"people.blocks"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"people.calls"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"people.events"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"people.extrinsics"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"people.transfers"})}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["Start building your own queries using granular data on Dune\n",(0,i.jsx)(n.a,{href:"https://dune.com/queries?category=canonical&namespace=people",children:"here"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"useful-queries",children:"Useful Queries"}),"\n",(0,i.jsx)(n.p,{children:"Some useful queries for People are provided:"}),"\n",(0,i.jsxs)(n.table,{children:[(0,i.jsx)(n.thead,{children:(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.th,{children:"Title"}),(0,i.jsx)(n.th,{children:"Query"}),(0,i.jsx)(n.th,{children:"Description"})]})}),(0,i.jsx)(n.tbody,{children:(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"Kusama People Chain - Identity History"}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.a,{href:"https://dune.com/queries/3836167",children:"query_3836167"})}),(0,i.jsx)(n.td,{children:"Find all identity history records on the Kusama People Chain"})]})})]}),"\n",(0,i.jsx)(n.h2,{id:"getting-started-with-queries",children:"Getting Started with Queries"}),"\n",(0,i.jsx)(n.p,{children:"To get started with querying data from Unique, you are welcome to use the mentioned materialized\nqueries. You can use the following DuneSQL queries as examples:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-sql",metastring:'title="Kusama People Chain - Identity History Sample" showLineNumbers',children:"SELECT\n block_time,\n extrinsic_id,\n signer_ss58,\n signer_pub_key,\n CAST(\n from_utf8(\n from_hex(JSON_EXTRACT_SCALAR(call_args, '$.info.display.raw'))\n ) AS VARCHAR\n ) AS name,\n CAST(\n from_utf8(\n from_hex(JSON_EXTRACT_SCALAR(call_args, '$.info.email.raw'))\n ) AS VARCHAR\n ) AS email\nFROM\n people_kusama.calls\nWHERE\n call_section = 'identity'\n AND call_method = 'setIdentity';\n"})}),"\n",(0,i.jsx)(n.p,{children:"Query result:"}),"\n",(0,i.jsx)("iframe",{src:"https://dune.com/embeds/3836167/6451940/",height:"350",width:"100%"}),"\n",(0,i.jsx)(n.admonition,{title:"DuneSQL Referece",type:"info",children:(0,i.jsxs)(n.p,{children:["For more information on DuneSQL, please refer to the ",(0,i.jsx)(n.a,{href:"/docs/general/dunesql-cheatsheet",children:"DuneSQL Cheatsheet"}),"\nand\n",(0,i.jsx)(n.a,{href:"https://docs.dune.com/query-engine/Functions-and-operators/index",children:"DuneSQL Official Documentation"}),"."]})})]})}function h(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(c,{...e})}):c(e)}},28453:(e,n,a)=>{a.d(n,{R:()=>r,x:()=>d});var s=a(96540);const i={},t=s.createContext(i);function r(e){const n=s.useContext(t);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),s.createElement(t.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/d9a69e3a.e29424ce.js b/assets/js/d9a69e3a.e29424ce.js deleted file mode 100644 index d94c8f356182..000000000000 --- a/assets/js/d9a69e3a.e29424ce.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5829],{41809:(e,n,a)=>{a.r(n),a.d(n,{assets:()=>o,contentTitle:()=>d,default:()=>h,frontMatter:()=>t,metadata:()=>r,toc:()=>l});var s=a(74848),i=a(28453);const t={id:"people-dashboards",title:"People Dashboards",sidebar_label:"People",description:"People is a parachain on Polkadot focused on decentralized identity and social interactions.",keywords:["polkadot","dashboard","dune","people","identity"],slug:"../people-dashboards"},d="People Dashboards",r={id:"general/dune-analytics/parachain-dashboards/people-dashboards",title:"People Dashboards",description:"People is a parachain on Polkadot focused on decentralized identity and social interactions.",source:"@site/../docs/general/dune-analytics/parachain-dashboards/people-dashboards.md",sourceDirName:"general/dune-analytics/parachain-dashboards",slug:"/general/dune-analytics/people-dashboards",permalink:"/docs/general/dune-analytics/people-dashboards",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/parachain-dashboards/people-dashboards.md",tags:[],version:"current",lastUpdatedBy:"MK",lastUpdatedAt:1719215716e3,frontMatter:{id:"people-dashboards",title:"People Dashboards",sidebar_label:"People",description:"People is a parachain on Polkadot focused on decentralized identity and social interactions.",keywords:["polkadot","dashboard","dune","people","identity"],slug:"../people-dashboards"},sidebar:"docs",previous:{title:"Nodle",permalink:"/docs/general/dune-analytics/nodle-dashboards"},next:{title:"Pendulum",permalink:"/docs/general/dune-analytics/pendulum-dashboards"}},o={},l=[{value:"Overview",id:"overview",level:2},{value:"Featured Dashboards on Dune",id:"featured-dashboards-on-dune",level:2},{value:"Key Tables",id:"key-tables",level:2},{value:"Useful Queries",id:"useful-queries",level:2},{value:"Getting Started with Queries",id:"getting-started-with-queries",level:2}];function c(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"people-dashboards",children:"People Dashboards"})}),"\n",(0,s.jsx)(n.h2,{id:"overview",children:"Overview"}),"\n",(0,s.jsx)(n.p,{children:"People's Chain focuses on decentralized identity and social interactions, enabling users to manage\ntheir digital identity and engage in community governance."}),"\n",(0,s.jsx)(n.h2,{id:"featured-dashboards-on-dune",children:"Featured Dashboards on Dune"}),"\n",(0,s.jsx)(n.p,{children:"Here you will find a variety of dashboards that help visualize data from the People parachain:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"https://dune.com/substrate/people",children:"People Dashboard"}),": A comprehensive view of identity management\nand social interaction activities within the People ecosystem."]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["Please also visit our dashboards for People on\n",(0,s.jsx)(n.a,{href:"https://dune.com/discover/content/relevant?q=title:People%20author:substrate",children:"Dune Analytics"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"key-tables",children:"Key Tables"}),"\n",(0,s.jsx)(n.p,{children:"Data from the People parachain is organized into several key tables:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"people.balances"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"people.blocks"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"people.calls"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"people.events"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"people.extrinsics"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"people.transfers"})}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["Start building your own queries using granular data on Dune\n",(0,s.jsx)(n.a,{href:"https://dune.com/queries?category=canonical&namespace=people",children:"here"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"useful-queries",children:"Useful Queries"}),"\n",(0,s.jsx)(n.p,{children:"Some useful queries for People are provided:"}),"\n",(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Title"}),(0,s.jsx)(n.th,{children:"Query"}),(0,s.jsx)(n.th,{children:"Description"})]})}),(0,s.jsx)(n.tbody,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Kusama People Chain - Identity History"}),(0,s.jsx)(n.td,{children:(0,s.jsx)(n.a,{href:"https://dune.com/queries/3836167",children:"query_3836167"})}),(0,s.jsx)(n.td,{children:"Find all identity history records on the Kusama People Chain"})]})})]}),"\n",(0,s.jsx)(n.h2,{id:"getting-started-with-queries",children:"Getting Started with Queries"}),"\n",(0,s.jsx)(n.p,{children:"To get started with querying data from Unique, you are welcome to use the mentioned materialized\nqueries. You can use the following DuneSQL queries as examples:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-sql",metastring:'title="Kusama People Chain - Identity History Sample" showLineNumbers',children:"SELECT\n block_time,\n extrinsic_id,\n signer_ss58,\n signer_pub_key,\n CAST(\n from_utf8(\n from_hex(JSON_EXTRACT_SCALAR(call_args, '$.info.display.raw'))\n ) AS VARCHAR\n ) AS name,\n CAST(\n from_utf8(\n from_hex(JSON_EXTRACT_SCALAR(call_args, '$.info.email.raw'))\n ) AS VARCHAR\n ) AS email\nFROM\n people_kusama.calls\nWHERE\n call_section = 'identity'\n AND call_method = 'setIdentity';\n"})}),"\n",(0,s.jsx)(n.p,{children:"Query result:"}),"\n",(0,s.jsx)("iframe",{src:"https://dune.com/embeds/3836167/6451940/",height:"350",width:"100%"}),"\n",(0,s.jsx)(n.admonition,{title:"DuneSQL Referece",type:"info",children:(0,s.jsxs)(n.p,{children:["For more information on DuneSQL, please refer to the ",(0,s.jsx)(n.a,{href:"/docs/general/dunesql-cheatsheet",children:"DuneSQL Cheatsheet"}),"\nand\n",(0,s.jsx)(n.a,{href:"https://docs.dune.com/query-engine/Functions-and-operators/index",children:"DuneSQL Official Documentation"}),"."]})})]})}function h(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(c,{...e})}):c(e)}},28453:(e,n,a)=>{a.d(n,{R:()=>d,x:()=>r});var s=a(96540);const i={},t=s.createContext(i);function d(e){const n=s.useContext(t);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:d(e.components),s.createElement(t.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/d9ef69a7.87459ecd.js b/assets/js/d9ef69a7.87459ecd.js deleted file mode 100644 index 1c3693d9cc5d..000000000000 --- a/assets/js/d9ef69a7.87459ecd.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2164],{53894:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>o,default:()=>h,frontMatter:()=>r,metadata:()=>s,toc:()=>c});var i=t(74848),a=t(28453);const r={id:"contributors",title:"Contributors",sidebar_label:"Contributors",description:"Get to know your Wiki-slayers.",slug:"../contributors"},o=void 0,s={id:"general/contributors",title:"Contributors",description:"Get to know your Wiki-slayers.",source:"@site/../docs/general/contributors.md",sourceDirName:"general",slug:"/contributors",permalink:"/docs/contributors",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/contributors.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1726730833e3,frontMatter:{id:"contributors",title:"Contributors",sidebar_label:"Contributors",description:"Get to know your Wiki-slayers.",slug:"../contributors"},sidebar:"docs",previous:{title:"Contributing to the Wiki",permalink:"/docs/contributing"},next:{title:"Funding",permalink:"/docs/funding"}},l={},c=[{value:"Current Contributors",id:"current-contributors",level:2},{value:"Technical Education",id:"technical-education",level:2},{value:"Bill Laboon",id:"bill-laboon",level:3},{value:"Radhakrishna Dasari",id:"radhakrishna-dasari",level:3},{value:"Filippo Franchini",id:"filippo-franchini",level:3},{value:"Bader Youssef",id:"bader-youssef",level:3},{value:"Technical Integrations",id:"technical-integrations",level:2},{value:"Joe Petrowski",id:"joe-petrowski",level:3},{value:"Past Contributors",id:"past-contributors",level:2},{value:"Keith Alfaro",id:"keith-alfaro",level:3},{value:"Emre Surmeli",id:"emre-surmeli",level:3},{value:"Danny Salman",id:"danny-salman",level:3},{value:"Alex Chau",id:"alex-chau",level:3},{value:"Jake Hemmerle",id:"jake-hemmerle",level:3},{value:"Bruno Skvorc",id:"bruno-skvorc",level:3},{value:"Anson Lau",id:"anson-lau",level:3},{value:"Kirsten Richard",id:"kirsten-richard",level:3},{value:"Logan Saether",id:"logan-saether",level:3}];function d(e){const n={a:"a",admonition:"admonition",h2:"h2",h3:"h3",li:"li",p:"p",ul:"ul",...(0,a.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h2,{id:"current-contributors",children:"Current Contributors"}),"\n",(0,i.jsx)(n.p,{children:"The following is a list of regular contributors to the Wiki. Each contributor's contact information\nis listed as a precaution - if one of these people ever contacts you directly, first check the\ncontact information to see that it matches the origin of the message, and then feel free to get in\ntouch with someone else on this list to verify the legitimacy of the original inquiry."}),"\n",(0,i.jsx)(n.admonition,{title:"Employee impersonation is a common type of scam",type:"warning",children:(0,i.jsxs)(n.p,{children:["For other ways of protecting yourself, please see the ",(0,i.jsx)(n.a,{href:"/docs/learn-scams",children:"How to Protect Yourself from Scams"}),"\nguide."]})}),"\n",(0,i.jsx)(n.h2,{id:"technical-education",children:"Technical Education"}),"\n",(0,i.jsx)(n.h3,{id:"bill-laboon",children:"Bill Laboon"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["email: ",(0,i.jsx)(n.a,{href:"mailto:bill@web3.foundation",children:"bill@web3.foundation"})]}),"\n",(0,i.jsxs)(n.li,{children:["matrix: ",(0,i.jsxs)(n.a,{href:"https://matrix.to/#/@bill:web3.foundation",children:["@bill",":web3",".foundation"]})]}),"\n",(0,i.jsxs)(n.li,{children:["twitter: ",(0,i.jsx)(n.a,{href:"https://twitter.com/BillLaboon",children:"@BillLaboon"})]}),"\n",(0,i.jsxs)(n.li,{children:["telegram: ",(0,i.jsx)(n.a,{href:"https://t.me/BillLaboon",children:"@BillLaboon"})]}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"Bill Laboon is the Head of Education and Grants at Web3 Foundation. Prior to Web3 Foundation, he\nspent five years teaching Computer Science at the University of Pittsburgh. Bill also has several\nyears of experience in software engineering and management."}),"\n",(0,i.jsxs)(n.p,{children:["He is the author of two books:\n",(0,i.jsx)(n.a,{href:"https://www.amazon.com/Friendly-Introduction-Software-Testing/dp/1523477377",children:"A Friendly Introduction to Software Testing"}),",\nan undergraduate textbook; and\n",(0,i.jsx)(n.a,{href:"https://www.amazon.com/Strength-Numbers-Cryptocurrency-Bill-Laboon/dp/1981526730/",children:"Strength in Numbers"}),",\na near-future novel set in a world in which cryptocurrency has eliminated traditional money."]}),"\n",(0,i.jsx)(n.h3,{id:"radhakrishna-dasari",children:"Radhakrishna Dasari"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["email: ",(0,i.jsx)(n.a,{href:"mailto:radha@web3.foundation",children:"radha@web3.foundation"})]}),"\n",(0,i.jsxs)(n.li,{children:["matrix: ",(0,i.jsxs)(n.a,{href:"https://matrix.to/#/@radha:web3.foundation",children:["@radha",":web3",".foundation"]})]}),"\n",(0,i.jsxs)(n.li,{children:["twitter: ",(0,i.jsx)(n.a,{href:"https://twitter.com/DrW3RK",children:"@DrW3RK"})]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["Radha leads Technical Education at Web3 Foundation. Radha has a PhD in Computer Science and has\nthree years of experience teaching Computer Science courses. He also taught a Massively Open Online\nCourse (MOOC) on ",(0,i.jsx)(n.a,{href:"https://www.coursera.org/learn/computer-vision-basics",children:"Coursera"}),". Radha is excited\nto contribute to Web3 Foundation's vision by educating professionals and the general public about\nthe Web3 Technology Stack."]}),"\n",(0,i.jsx)(n.h3,{id:"filippo-franchini",children:"Filippo Franchini"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["email: ",(0,i.jsx)(n.a,{href:"mailto:filippo@web3.foundation",children:"filippo@web3.foundation"})]}),"\n",(0,i.jsxs)(n.li,{children:["matrix: ",(0,i.jsxs)(n.a,{href:"https://matrix.to/#/@filippo:web3.foundation",children:["@filippo",":web3",".foundation"]})]}),"\n",(0,i.jsxs)(n.li,{children:["twitter: ",(0,i.jsx)(n.a,{href:"https://twitter.com/filippoweb3",children:"@filippoweb3"})]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["Filippo is a Technical Educator at the Web3 Foundation. Filippo has a PhD in Statistics and has 6\nyears of experience in teaching statistical computing and data analysis. Filippo strongly believes\nin the Web3 vision of having a privacy-focused, secure, decentralized internet where power is given\nback to users. The complexity of Web3 technology can be intimidating and is still a major blocking\nelement behind mainstream adoption. Filippo is excited to contribute to Web3 Foundation's vision by\neducating professionals and the general public about Web3 and blockchain technology. Filippo enjoys\nlearning about Polkadot and regularly contributes to Wiki articles. He got\n",(0,i.jsx)(n.a,{href:"https://www.credential.net/bad85935-7e6e-4b4a-9ed2-e96128bdb5e5",children:"certified as a blockchain analyst"}),"\nand is currently learning about ",(0,i.jsx)(n.a,{href:"https://www.rust-lang.org/",children:"Rust"})," and\n",(0,i.jsx)(n.a,{href:"https://substrate.io/",children:"Substrate"}),"."]}),"\n",(0,i.jsx)(n.h3,{id:"bader-youssef",children:"Bader Youssef"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["email: ",(0,i.jsx)(n.a,{href:"mailto:bader@web3.foundation",children:"bader@web3.foundation"})]}),"\n",(0,i.jsxs)(n.li,{children:["matrix: ",(0,i.jsxs)(n.a,{href:"https://matrix.to/#/@bader:web3.foundation",children:["@bader",":web3",".foundation"]})]}),"\n",(0,i.jsxs)(n.li,{children:["twitter: ",(0,i.jsx)(n.a,{href:"https://twitter.com/baderyo_o",children:"@baderyo_o"})]}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"Bader is a Technical Educator at the Web3 Foundation. He has been an avid blockchain and web3\nadvocate, full-stack software engineer, and technical writer for the past 4 years. He has used a\nmultitude of technologies to create disruptive and unique applications, mostly centering around\neliminating intermediary servers in applications and creating trust-free digital interactions for\nthe betterment of humanity. Real technology needs to solve real problems, and Bader is very strong\non creating practical solutions to those problems using Web3."}),"\n",(0,i.jsx)(n.p,{children:"Bader has a strong passion for ensuring that this technology can be understood and utilized to its\nfullest potential and focuses on making it as simple and useful to digest as possible."}),"\n",(0,i.jsx)(n.h2,{id:"technical-integrations",children:"Technical Integrations"}),"\n",(0,i.jsx)(n.h3,{id:"joe-petrowski",children:"Joe Petrowski"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["email: ",(0,i.jsx)(n.a,{href:"mailto:joe@web3.foundation",children:"joe@web3.foundation"})]}),"\n",(0,i.jsxs)(n.li,{children:["matrix: ",(0,i.jsxs)(n.a,{href:"https://matrix.to/#/@joe:web3.foundation",children:["@joe",":web3",".foundation"]})]}),"\n",(0,i.jsxs)(n.li,{children:["telegram: ",(0,i.jsx)(n.a,{href:"https://t.me/joepetrowski",children:"@joepetrowski"})]}),"\n",(0,i.jsxs)(n.li,{children:["twitter: ",(0,i.jsx)(n.a,{href:"https://twitter.com/joepetrowski",children:"@joepetrowski"})]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["Joe leads Technical Integrations at Web3 Foundation and was previously a Research Analyst at Parity\nTechnologies. He focuses on making Substrate chain integration as smooth as possible, from educating\nusers on Substrate and Polkadot fundamentals to building tools to create great user experiences and\noccasionally writing a bit of code. He also hosts the ",(0,i.jsx)(n.a,{href:"https://relaychain.fm",children:"relay chain"})," podcast."]}),"\n",(0,i.jsx)(n.p,{children:"Prior to working at Parity, Joe worked in shock and vibration simulation for satellite launch,\nalgorithmic trading, and professional cycling. He has a Bachelor of Science in Aeronautical and\nMechanical Engineering."}),"\n",(0,i.jsx)(n.h2,{id:"past-contributors",children:"Past Contributors"}),"\n",(0,i.jsx)(n.p,{children:"The following contributors are no longer participating in an official capacity."}),"\n",(0,i.jsx)(n.h3,{id:"keith-alfaro",children:"Keith Alfaro"}),"\n",(0,i.jsx)(n.p,{children:"Keith was a member of the TechEd team at the Web3 Foundation. He has worked professionally as a\nsoftware engineer since completing his graduate studies. Keith holds bachelor's and master's degrees\nin Architecture (buildings not computers). It was during this time that he discovered his passion\nfor computational design. He was previously employed in the CAD/3D graphics software development\ndomains. Keith is passionate about learning, developing and sharing decentralized and peer-to-peer\ntechnologies."}),"\n",(0,i.jsx)(n.h3,{id:"emre-surmeli",children:"Emre Surmeli"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["twitter: ",(0,i.jsx)(n.a,{href:"https://twitter.com/semres8",children:"@semres8"})]}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"Emre was a Technical Educator at Web3 Foundation. His background is in full-stack software\ndevelopment, education, and blockchain technology consulting. He is passionate about learning and\nteaching and has always kept a foot in education by designing and delivering software development\nand blockchain classes at General Assembly, Code Fellows, and Columbia University."}),"\n",(0,i.jsx)(n.h3,{id:"danny-salman",children:"Danny Salman"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["email: ",(0,i.jsx)(n.a,{href:"mailto:danny.f.salman@gmail.com",children:"danny.f.salman@gmail.com"})]}),"\n",(0,i.jsxs)(n.li,{children:["matrix: ",(0,i.jsxs)(n.a,{href:"https://matrix.to/#/@dannysalman:matrix.org",children:["@dannysalman",":matrix",".org"]})]}),"\n",(0,i.jsxs)(n.li,{children:["telegram: ",(0,i.jsx)(n.a,{href:"https://t.me/dannysalman",children:"@dannysalman"})]}),"\n",(0,i.jsxs)(n.li,{children:["twitter: ",(0,i.jsx)(n.a,{href:"https://twitter.com/dannysalman_",children:"@dannysalman_"})]}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"Danny was a Technical Educator at Web3 Foundation who has a keen interest in blockchain and\ntrust-free technologies. As a Technical Educator, Danny taught and documented Polkadot. He has a\nBachelor of Engineering in Computer Engineering and a background in philosophy & politics."}),"\n",(0,i.jsx)(n.h3,{id:"alex-chau",children:"Alex Chau"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["matrix: ",(0,i.jsx)(n.a,{href:"https://matrix.to/#/@a-jwc:%E2%80%8Bmatrix.org",children:"@a-jwc:\u200bmatrix.org"})]}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"Alex was a Technical Education Intern at Web3 Foundation. He has developed a deep passion for\neducating others on decentralized systems and pushing forward the WEB3 vision. Alex has educational\nexperience in cryptography, data privacy, and enterprise security. He has a Bachelor of Science in\nComputer Science from San Francisco State University."}),"\n",(0,i.jsx)(n.h3,{id:"jake-hemmerle",children:"Jake Hemmerle"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["matrix: ",(0,i.jsxs)(n.a,{href:"https://matrix.to/#/@jake:hemmerle.dev",children:["@jake",":hemmerle",".dev"]})]}),"\n",(0,i.jsxs)(n.li,{children:["twitter: ",(0,i.jsx)(n.a,{href:"https://twitter.com/jakehemmerle",children:"@jakehemmerle"})]}),"\n",(0,i.jsxs)(n.li,{children:["telegram: ",(0,i.jsx)(n.a,{href:"https://t.me/jakehemmerle",children:"@jakehemmerle"})]}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"Jake was a Technical Education Intern at Web3 Foundation and studied Computer Science at the\nUniversity of Cincinnati. He has been learning about blockchain technology since 2018 and has\npersonal interests in peer-to-peer systems, network protocols, applied cryptography and\nprivacy-enhancing technologies."}),"\n",(0,i.jsxs)(n.p,{children:["You can now find Jake cracking the code at the multi-chain Polkadot dApp hub,\n",(0,i.jsx)(n.a,{href:"https://astar.network/",children:"Astar Network"}),"."]}),"\n",(0,i.jsx)(n.h3,{id:"bruno-skvorc",children:"Bruno Skvorc"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["telegram: ",(0,i.jsx)(n.a,{href:"https://t.me/swader",children:"@swader"})]}),"\n",(0,i.jsxs)(n.li,{children:["matrix: ",(0,i.jsxs)(n.a,{href:"https://matrix.to/#/@bitfalls:matrix.org",children:["@bitfalls",":matrix",".org"]})]}),"\n",(0,i.jsxs)(n.li,{children:["twitter: ",(0,i.jsx)(n.a,{href:"https://twitter.com/bitfalls",children:"@bitfalls"})]}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"Bruno joined the crypto ecosystem full time in 2015 with the advent of Ethereum and created\neducational resources, tutorials, and newsletters for budding developers of the industry."}),"\n",(0,i.jsx)(n.p,{children:"From 2019, he was a Technical Educator at Web3 Foundation. He is passionate about decentralization,\ncensorship resistance, and transparency coupled with accountability, so he has found his passion in\nimmutable ledgers of the present and future."}),"\n",(0,i.jsxs)(n.p,{children:["In a previous life, he was a web developer and senior PHP editor at SitePoint, which culminated in a\n",(0,i.jsx)(n.a,{href:"https://www.amazon.com/Jump-Start-PHP-Environment-Language/dp/0994182643",children:"book about web-dev-friendly virtual environments"}),".\nIn his ",(0,i.jsx)(n.a,{href:"https://bruno.id/an-endomorphs-journey-to-health-part-2/",children:"quest for developer health"}),", he\nlikes to combine fitness and gaming and can be found in VR on Oculus and Steam as TheSwader. He also\nruns a weekly newsletter covering all things Web3 at ",(0,i.jsx)(n.a,{href:"https://dotleap.substack.com",children:"DotLeap"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["You can now find Bruno hacking the metaverse by leading the way at ",(0,i.jsx)(n.a,{href:"https://rmrk.app/",children:"RMRK"})," to\ncreate the next-generation NFT standard."]}),"\n",(0,i.jsx)(n.h3,{id:"anson-lau",children:"Anson Lau"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["matrix: ",(0,i.jsxs)(n.a,{href:"https://matrix.to/#/@anson-lau:matrix.org",children:["@anson-lau",":matrix",".org"]})]}),"\n",(0,i.jsxs)(n.li,{children:["twitter: ",(0,i.jsx)(n.a,{href:"https://twitter.com/anson_lauhk",children:"@Anson_LauHK"})]}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"Anson was a Technical Educator at Web3 Foundation. Before that, he worked as a Hyperledger\nBlockchain Developer to deliver B2B applications at IBM. He is passionate about staking, governance,\ncryptoeconomics, and privacy areas. Anson has been actively participating in the blockchain space\nsince 2017 and creating video content to help different people understand how decentralization could\ndeliver us a better future."}),"\n",(0,i.jsx)(n.h3,{id:"kirsten-richard",children:"Kirsten Richard"}),"\n",(0,i.jsx)(n.p,{children:"Kirsten was a Technical Educator Intern at Web3 Foundation from Canada. She focused on curating\neducational content around blockchain and Polkadot network concepts. Kirsten has a Bachelor's degree\nin Computer Science and is passionate about teaching and technology."}),"\n",(0,i.jsx)(n.h3,{id:"logan-saether",children:"Logan Saether"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["matrix: ",(0,i.jsxs)(n.a,{href:"https://matrix.to/#/@logansaether:matrix.org",children:["@logansaether",":matrix",".org"]})]}),"\n",(0,i.jsxs)(n.li,{children:["twitter: ",(0,i.jsx)(n.a,{href:"https://twitter.com/logansaether",children:"@logansaether"})]}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"Logan was a Technical Educator at Web3 Foundation, where he worked on creating material for\nsupporting the development of the next generation of distributed technologies. At Web3 Technical\nEducation, Logan focused on creating the Polkadot Wiki as the central source of truth and knowledge\nfor the Polkadot protocol. He contributed in creating written content and example applications that\ndemonstrate how to use these new technologies."}),"\n",(0,i.jsxs)(n.p,{children:["You can now find Logan leading efforts to define the prediction market space at\n",(0,i.jsx)(n.a,{href:"https://zeitgeist.pm/",children:"Zeitgeist"}),"."]})]})}function h(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}},28453:(e,n,t)=>{t.d(n,{R:()=>o,x:()=>s});var i=t(96540);const a={},r=i.createContext(a);function o(e){const n=i.useContext(r);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function s(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:o(e.components),i.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/d9ef69a7.a46eee30.js b/assets/js/d9ef69a7.a46eee30.js new file mode 100644 index 000000000000..682aefe53c4b --- /dev/null +++ b/assets/js/d9ef69a7.a46eee30.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2164],{47734:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>s,default:()=>h,frontMatter:()=>o,metadata:()=>i,toc:()=>c});const i=JSON.parse('{"id":"general/contributors","title":"Contributors","description":"Get to know your Wiki-slayers.","source":"@site/../docs/general/contributors.md","sourceDirName":"general","slug":"/contributors","permalink":"/docs/contributors","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/contributors.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1726730833000,"frontMatter":{"id":"contributors","title":"Contributors","sidebar_label":"Contributors","description":"Get to know your Wiki-slayers.","slug":"../contributors"},"sidebar":"docs","previous":{"title":"Contributing to the Wiki","permalink":"/docs/contributing"},"next":{"title":"Funding","permalink":"/docs/funding"}}');var a=t(74848),r=t(28453);const o={id:"contributors",title:"Contributors",sidebar_label:"Contributors",description:"Get to know your Wiki-slayers.",slug:"../contributors"},s=void 0,l={},c=[{value:"Current Contributors",id:"current-contributors",level:2},{value:"Technical Education",id:"technical-education",level:2},{value:"Bill Laboon",id:"bill-laboon",level:3},{value:"Radhakrishna Dasari",id:"radhakrishna-dasari",level:3},{value:"Filippo Franchini",id:"filippo-franchini",level:3},{value:"Bader Youssef",id:"bader-youssef",level:3},{value:"Technical Integrations",id:"technical-integrations",level:2},{value:"Joe Petrowski",id:"joe-petrowski",level:3},{value:"Past Contributors",id:"past-contributors",level:2},{value:"Keith Alfaro",id:"keith-alfaro",level:3},{value:"Emre Surmeli",id:"emre-surmeli",level:3},{value:"Danny Salman",id:"danny-salman",level:3},{value:"Alex Chau",id:"alex-chau",level:3},{value:"Jake Hemmerle",id:"jake-hemmerle",level:3},{value:"Bruno Skvorc",id:"bruno-skvorc",level:3},{value:"Anson Lau",id:"anson-lau",level:3},{value:"Kirsten Richard",id:"kirsten-richard",level:3},{value:"Logan Saether",id:"logan-saether",level:3}];function d(e){const n={a:"a",admonition:"admonition",h2:"h2",h3:"h3",li:"li",p:"p",ul:"ul",...(0,r.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.h2,{id:"current-contributors",children:"Current Contributors"}),"\n",(0,a.jsx)(n.p,{children:"The following is a list of regular contributors to the Wiki. Each contributor's contact information\nis listed as a precaution - if one of these people ever contacts you directly, first check the\ncontact information to see that it matches the origin of the message, and then feel free to get in\ntouch with someone else on this list to verify the legitimacy of the original inquiry."}),"\n",(0,a.jsx)(n.admonition,{title:"Employee impersonation is a common type of scam",type:"warning",children:(0,a.jsxs)(n.p,{children:["For other ways of protecting yourself, please see the ",(0,a.jsx)(n.a,{href:"/docs/learn-scams",children:"How to Protect Yourself from Scams"}),"\nguide."]})}),"\n",(0,a.jsx)(n.h2,{id:"technical-education",children:"Technical Education"}),"\n",(0,a.jsx)(n.h3,{id:"bill-laboon",children:"Bill Laboon"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["email: ",(0,a.jsx)(n.a,{href:"mailto:bill@web3.foundation",children:"bill@web3.foundation"})]}),"\n",(0,a.jsxs)(n.li,{children:["matrix: ",(0,a.jsxs)(n.a,{href:"https://matrix.to/#/@bill:web3.foundation",children:["@bill",":web3",".foundation"]})]}),"\n",(0,a.jsxs)(n.li,{children:["twitter: ",(0,a.jsx)(n.a,{href:"https://twitter.com/BillLaboon",children:"@BillLaboon"})]}),"\n",(0,a.jsxs)(n.li,{children:["telegram: ",(0,a.jsx)(n.a,{href:"https://t.me/BillLaboon",children:"@BillLaboon"})]}),"\n"]}),"\n",(0,a.jsx)(n.p,{children:"Bill Laboon is the Head of Education and Grants at Web3 Foundation. Prior to Web3 Foundation, he\nspent five years teaching Computer Science at the University of Pittsburgh. Bill also has several\nyears of experience in software engineering and management."}),"\n",(0,a.jsxs)(n.p,{children:["He is the author of two books:\n",(0,a.jsx)(n.a,{href:"https://www.amazon.com/Friendly-Introduction-Software-Testing/dp/1523477377",children:"A Friendly Introduction to Software Testing"}),",\nan undergraduate textbook; and\n",(0,a.jsx)(n.a,{href:"https://www.amazon.com/Strength-Numbers-Cryptocurrency-Bill-Laboon/dp/1981526730/",children:"Strength in Numbers"}),",\na near-future novel set in a world in which cryptocurrency has eliminated traditional money."]}),"\n",(0,a.jsx)(n.h3,{id:"radhakrishna-dasari",children:"Radhakrishna Dasari"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["email: ",(0,a.jsx)(n.a,{href:"mailto:radha@web3.foundation",children:"radha@web3.foundation"})]}),"\n",(0,a.jsxs)(n.li,{children:["matrix: ",(0,a.jsxs)(n.a,{href:"https://matrix.to/#/@radha:web3.foundation",children:["@radha",":web3",".foundation"]})]}),"\n",(0,a.jsxs)(n.li,{children:["twitter: ",(0,a.jsx)(n.a,{href:"https://twitter.com/DrW3RK",children:"@DrW3RK"})]}),"\n"]}),"\n",(0,a.jsxs)(n.p,{children:["Radha leads Technical Education at Web3 Foundation. Radha has a PhD in Computer Science and has\nthree years of experience teaching Computer Science courses. He also taught a Massively Open Online\nCourse (MOOC) on ",(0,a.jsx)(n.a,{href:"https://www.coursera.org/learn/computer-vision-basics",children:"Coursera"}),". Radha is excited\nto contribute to Web3 Foundation's vision by educating professionals and the general public about\nthe Web3 Technology Stack."]}),"\n",(0,a.jsx)(n.h3,{id:"filippo-franchini",children:"Filippo Franchini"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["email: ",(0,a.jsx)(n.a,{href:"mailto:filippo@web3.foundation",children:"filippo@web3.foundation"})]}),"\n",(0,a.jsxs)(n.li,{children:["matrix: ",(0,a.jsxs)(n.a,{href:"https://matrix.to/#/@filippo:web3.foundation",children:["@filippo",":web3",".foundation"]})]}),"\n",(0,a.jsxs)(n.li,{children:["twitter: ",(0,a.jsx)(n.a,{href:"https://twitter.com/filippoweb3",children:"@filippoweb3"})]}),"\n"]}),"\n",(0,a.jsxs)(n.p,{children:["Filippo is a Technical Educator at the Web3 Foundation. Filippo has a PhD in Statistics and has 6\nyears of experience in teaching statistical computing and data analysis. Filippo strongly believes\nin the Web3 vision of having a privacy-focused, secure, decentralized internet where power is given\nback to users. The complexity of Web3 technology can be intimidating and is still a major blocking\nelement behind mainstream adoption. Filippo is excited to contribute to Web3 Foundation's vision by\neducating professionals and the general public about Web3 and blockchain technology. Filippo enjoys\nlearning about Polkadot and regularly contributes to Wiki articles. He got\n",(0,a.jsx)(n.a,{href:"https://www.credential.net/bad85935-7e6e-4b4a-9ed2-e96128bdb5e5",children:"certified as a blockchain analyst"}),"\nand is currently learning about ",(0,a.jsx)(n.a,{href:"https://www.rust-lang.org/",children:"Rust"})," and\n",(0,a.jsx)(n.a,{href:"https://substrate.io/",children:"Substrate"}),"."]}),"\n",(0,a.jsx)(n.h3,{id:"bader-youssef",children:"Bader Youssef"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["email: ",(0,a.jsx)(n.a,{href:"mailto:bader@web3.foundation",children:"bader@web3.foundation"})]}),"\n",(0,a.jsxs)(n.li,{children:["matrix: ",(0,a.jsxs)(n.a,{href:"https://matrix.to/#/@bader:web3.foundation",children:["@bader",":web3",".foundation"]})]}),"\n",(0,a.jsxs)(n.li,{children:["twitter: ",(0,a.jsx)(n.a,{href:"https://twitter.com/baderyo_o",children:"@baderyo_o"})]}),"\n"]}),"\n",(0,a.jsx)(n.p,{children:"Bader is a Technical Educator at the Web3 Foundation. He has been an avid blockchain and web3\nadvocate, full-stack software engineer, and technical writer for the past 4 years. He has used a\nmultitude of technologies to create disruptive and unique applications, mostly centering around\neliminating intermediary servers in applications and creating trust-free digital interactions for\nthe betterment of humanity. Real technology needs to solve real problems, and Bader is very strong\non creating practical solutions to those problems using Web3."}),"\n",(0,a.jsx)(n.p,{children:"Bader has a strong passion for ensuring that this technology can be understood and utilized to its\nfullest potential and focuses on making it as simple and useful to digest as possible."}),"\n",(0,a.jsx)(n.h2,{id:"technical-integrations",children:"Technical Integrations"}),"\n",(0,a.jsx)(n.h3,{id:"joe-petrowski",children:"Joe Petrowski"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["email: ",(0,a.jsx)(n.a,{href:"mailto:joe@web3.foundation",children:"joe@web3.foundation"})]}),"\n",(0,a.jsxs)(n.li,{children:["matrix: ",(0,a.jsxs)(n.a,{href:"https://matrix.to/#/@joe:web3.foundation",children:["@joe",":web3",".foundation"]})]}),"\n",(0,a.jsxs)(n.li,{children:["telegram: ",(0,a.jsx)(n.a,{href:"https://t.me/joepetrowski",children:"@joepetrowski"})]}),"\n",(0,a.jsxs)(n.li,{children:["twitter: ",(0,a.jsx)(n.a,{href:"https://twitter.com/joepetrowski",children:"@joepetrowski"})]}),"\n"]}),"\n",(0,a.jsxs)(n.p,{children:["Joe leads Technical Integrations at Web3 Foundation and was previously a Research Analyst at Parity\nTechnologies. He focuses on making Substrate chain integration as smooth as possible, from educating\nusers on Substrate and Polkadot fundamentals to building tools to create great user experiences and\noccasionally writing a bit of code. He also hosts the ",(0,a.jsx)(n.a,{href:"https://relaychain.fm",children:"relay chain"})," podcast."]}),"\n",(0,a.jsx)(n.p,{children:"Prior to working at Parity, Joe worked in shock and vibration simulation for satellite launch,\nalgorithmic trading, and professional cycling. He has a Bachelor of Science in Aeronautical and\nMechanical Engineering."}),"\n",(0,a.jsx)(n.h2,{id:"past-contributors",children:"Past Contributors"}),"\n",(0,a.jsx)(n.p,{children:"The following contributors are no longer participating in an official capacity."}),"\n",(0,a.jsx)(n.h3,{id:"keith-alfaro",children:"Keith Alfaro"}),"\n",(0,a.jsx)(n.p,{children:"Keith was a member of the TechEd team at the Web3 Foundation. He has worked professionally as a\nsoftware engineer since completing his graduate studies. Keith holds bachelor's and master's degrees\nin Architecture (buildings not computers). It was during this time that he discovered his passion\nfor computational design. He was previously employed in the CAD/3D graphics software development\ndomains. Keith is passionate about learning, developing and sharing decentralized and peer-to-peer\ntechnologies."}),"\n",(0,a.jsx)(n.h3,{id:"emre-surmeli",children:"Emre Surmeli"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["twitter: ",(0,a.jsx)(n.a,{href:"https://twitter.com/semres8",children:"@semres8"})]}),"\n"]}),"\n",(0,a.jsx)(n.p,{children:"Emre was a Technical Educator at Web3 Foundation. His background is in full-stack software\ndevelopment, education, and blockchain technology consulting. He is passionate about learning and\nteaching and has always kept a foot in education by designing and delivering software development\nand blockchain classes at General Assembly, Code Fellows, and Columbia University."}),"\n",(0,a.jsx)(n.h3,{id:"danny-salman",children:"Danny Salman"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["email: ",(0,a.jsx)(n.a,{href:"mailto:danny.f.salman@gmail.com",children:"danny.f.salman@gmail.com"})]}),"\n",(0,a.jsxs)(n.li,{children:["matrix: ",(0,a.jsxs)(n.a,{href:"https://matrix.to/#/@dannysalman:matrix.org",children:["@dannysalman",":matrix",".org"]})]}),"\n",(0,a.jsxs)(n.li,{children:["telegram: ",(0,a.jsx)(n.a,{href:"https://t.me/dannysalman",children:"@dannysalman"})]}),"\n",(0,a.jsxs)(n.li,{children:["twitter: ",(0,a.jsx)(n.a,{href:"https://twitter.com/dannysalman_",children:"@dannysalman_"})]}),"\n"]}),"\n",(0,a.jsx)(n.p,{children:"Danny was a Technical Educator at Web3 Foundation who has a keen interest in blockchain and\ntrust-free technologies. As a Technical Educator, Danny taught and documented Polkadot. He has a\nBachelor of Engineering in Computer Engineering and a background in philosophy & politics."}),"\n",(0,a.jsx)(n.h3,{id:"alex-chau",children:"Alex Chau"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["matrix: ",(0,a.jsx)(n.a,{href:"https://matrix.to/#/@a-jwc:%E2%80%8Bmatrix.org",children:"@a-jwc:\u200bmatrix.org"})]}),"\n"]}),"\n",(0,a.jsx)(n.p,{children:"Alex was a Technical Education Intern at Web3 Foundation. He has developed a deep passion for\neducating others on decentralized systems and pushing forward the WEB3 vision. Alex has educational\nexperience in cryptography, data privacy, and enterprise security. He has a Bachelor of Science in\nComputer Science from San Francisco State University."}),"\n",(0,a.jsx)(n.h3,{id:"jake-hemmerle",children:"Jake Hemmerle"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["matrix: ",(0,a.jsxs)(n.a,{href:"https://matrix.to/#/@jake:hemmerle.dev",children:["@jake",":hemmerle",".dev"]})]}),"\n",(0,a.jsxs)(n.li,{children:["twitter: ",(0,a.jsx)(n.a,{href:"https://twitter.com/jakehemmerle",children:"@jakehemmerle"})]}),"\n",(0,a.jsxs)(n.li,{children:["telegram: ",(0,a.jsx)(n.a,{href:"https://t.me/jakehemmerle",children:"@jakehemmerle"})]}),"\n"]}),"\n",(0,a.jsx)(n.p,{children:"Jake was a Technical Education Intern at Web3 Foundation and studied Computer Science at the\nUniversity of Cincinnati. He has been learning about blockchain technology since 2018 and has\npersonal interests in peer-to-peer systems, network protocols, applied cryptography and\nprivacy-enhancing technologies."}),"\n",(0,a.jsxs)(n.p,{children:["You can now find Jake cracking the code at the multi-chain Polkadot dApp hub,\n",(0,a.jsx)(n.a,{href:"https://astar.network/",children:"Astar Network"}),"."]}),"\n",(0,a.jsx)(n.h3,{id:"bruno-skvorc",children:"Bruno Skvorc"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["telegram: ",(0,a.jsx)(n.a,{href:"https://t.me/swader",children:"@swader"})]}),"\n",(0,a.jsxs)(n.li,{children:["matrix: ",(0,a.jsxs)(n.a,{href:"https://matrix.to/#/@bitfalls:matrix.org",children:["@bitfalls",":matrix",".org"]})]}),"\n",(0,a.jsxs)(n.li,{children:["twitter: ",(0,a.jsx)(n.a,{href:"https://twitter.com/bitfalls",children:"@bitfalls"})]}),"\n"]}),"\n",(0,a.jsx)(n.p,{children:"Bruno joined the crypto ecosystem full time in 2015 with the advent of Ethereum and created\neducational resources, tutorials, and newsletters for budding developers of the industry."}),"\n",(0,a.jsx)(n.p,{children:"From 2019, he was a Technical Educator at Web3 Foundation. He is passionate about decentralization,\ncensorship resistance, and transparency coupled with accountability, so he has found his passion in\nimmutable ledgers of the present and future."}),"\n",(0,a.jsxs)(n.p,{children:["In a previous life, he was a web developer and senior PHP editor at SitePoint, which culminated in a\n",(0,a.jsx)(n.a,{href:"https://www.amazon.com/Jump-Start-PHP-Environment-Language/dp/0994182643",children:"book about web-dev-friendly virtual environments"}),".\nIn his ",(0,a.jsx)(n.a,{href:"https://bruno.id/an-endomorphs-journey-to-health-part-2/",children:"quest for developer health"}),", he\nlikes to combine fitness and gaming and can be found in VR on Oculus and Steam as TheSwader. He also\nruns a weekly newsletter covering all things Web3 at ",(0,a.jsx)(n.a,{href:"https://dotleap.substack.com",children:"DotLeap"}),"."]}),"\n",(0,a.jsxs)(n.p,{children:["You can now find Bruno hacking the metaverse by leading the way at ",(0,a.jsx)(n.a,{href:"https://rmrk.app/",children:"RMRK"})," to\ncreate the next-generation NFT standard."]}),"\n",(0,a.jsx)(n.h3,{id:"anson-lau",children:"Anson Lau"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["matrix: ",(0,a.jsxs)(n.a,{href:"https://matrix.to/#/@anson-lau:matrix.org",children:["@anson-lau",":matrix",".org"]})]}),"\n",(0,a.jsxs)(n.li,{children:["twitter: ",(0,a.jsx)(n.a,{href:"https://twitter.com/anson_lauhk",children:"@Anson_LauHK"})]}),"\n"]}),"\n",(0,a.jsx)(n.p,{children:"Anson was a Technical Educator at Web3 Foundation. Before that, he worked as a Hyperledger\nBlockchain Developer to deliver B2B applications at IBM. He is passionate about staking, governance,\ncryptoeconomics, and privacy areas. Anson has been actively participating in the blockchain space\nsince 2017 and creating video content to help different people understand how decentralization could\ndeliver us a better future."}),"\n",(0,a.jsx)(n.h3,{id:"kirsten-richard",children:"Kirsten Richard"}),"\n",(0,a.jsx)(n.p,{children:"Kirsten was a Technical Educator Intern at Web3 Foundation from Canada. She focused on curating\neducational content around blockchain and Polkadot network concepts. Kirsten has a Bachelor's degree\nin Computer Science and is passionate about teaching and technology."}),"\n",(0,a.jsx)(n.h3,{id:"logan-saether",children:"Logan Saether"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["matrix: ",(0,a.jsxs)(n.a,{href:"https://matrix.to/#/@logansaether:matrix.org",children:["@logansaether",":matrix",".org"]})]}),"\n",(0,a.jsxs)(n.li,{children:["twitter: ",(0,a.jsx)(n.a,{href:"https://twitter.com/logansaether",children:"@logansaether"})]}),"\n"]}),"\n",(0,a.jsx)(n.p,{children:"Logan was a Technical Educator at Web3 Foundation, where he worked on creating material for\nsupporting the development of the next generation of distributed technologies. At Web3 Technical\nEducation, Logan focused on creating the Polkadot Wiki as the central source of truth and knowledge\nfor the Polkadot protocol. He contributed in creating written content and example applications that\ndemonstrate how to use these new technologies."}),"\n",(0,a.jsxs)(n.p,{children:["You can now find Logan leading efforts to define the prediction market space at\n",(0,a.jsx)(n.a,{href:"https://zeitgeist.pm/",children:"Zeitgeist"}),"."]})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(d,{...e})}):d(e)}},28453:(e,n,t)=>{t.d(n,{R:()=>o,x:()=>s});var i=t(96540);const a={},r=i.createContext(a);function o(e){const n=i.useContext(r);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function s(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:o(e.components),i.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/da9f79cb.641f1e79.js b/assets/js/da9f79cb.641f1e79.js deleted file mode 100644 index bf1f1fd2b749..000000000000 --- a/assets/js/da9f79cb.641f1e79.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3044],{44903:(e,n,o)=>{o.r(n),o.d(n,{assets:()=>d,contentTitle:()=>r,default:()=>m,frontMatter:()=>s,metadata:()=>l,toc:()=>c});var t=o(74848),i=o(28453),a=o(67141);const s={id:"learn-nomination-pools",title:"Nomination Pools",sidebar_label:"Nomination Pools",description:"Staking through Polkadot's Nomination Pools.",keyword:["nominate","nominator","stake","staking","pools"],slug:"../learn-nomination-pools"},r=void 0,l={id:"learn/learn-nomination-pools",title:"Nomination Pools",description:"Staking through Polkadot's Nomination Pools.",source:"@site/../docs/learn/learn-nomination-pools.md",sourceDirName:"learn",slug:"/learn-nomination-pools",permalink:"/docs/learn-nomination-pools",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-nomination-pools.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1726760224e3,frontMatter:{id:"learn-nomination-pools",title:"Nomination Pools",sidebar_label:"Nomination Pools",description:"Staking through Polkadot's Nomination Pools.",keyword:["nominate","nominator","stake","staking","pools"],slug:"../learn-nomination-pools"},sidebar:"docs",previous:{title:"Introduction to Staking",permalink:"/docs/learn-staking"},next:{title:"Polkadot OpenGov",permalink:"/docs/learn-polkadot-opengov-index"}},d={},c=[{value:"Key Components",id:"key-components",level:2},{value:"Pool Member Lifecycle",id:"pool-member-lifecycle",level:2},{value:"Join a pool",id:"join-a-pool",level:3},{value:"Claim rewards",id:"claim-rewards",level:3},{value:"Claim Permissions",id:"claim-permissions",level:3},{value:"Unbond and withdraw funds",id:"unbond-and-withdraw-funds",level:3},{value:"Limitations of Nomination Pools",id:"limitations-of-nomination-pools",level:3},{value:"Pool Administration",id:"pool-administration",level:2},{value:"States",id:"states",level:3},{value:"Roles",id:"roles",level:3},{value:"Pool Commissions",id:"pool-commissions",level:3},{value:"Pool Lifecycle",id:"pool-lifecycle",level:2},{value:"Nomination Pools - Slashing",id:"nomination-pools---slashing",level:2},{value:"Nominating vs Joining a Pool",id:"nominating-vs-joining-a-pool",level:2}];function h(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,i.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(a.A,{message:"Nomination Pools are evolving!\nSoon you'll be able to participate in a pool and in OpenGov with your pooled funds!\nYou do not need to do anything, unless you are participating in a pool and also staking solo from the same account. In this case, please check [this article](https://support.polkadot.network/support/solutions/articles/65000188140-changes-for-nomination-pool-members-and-opengov-participation) on the actions you need to take as soon as possible."}),"\n",(0,t.jsx)(n.admonition,{title:"Nomination Pools are live on Polkadot!",type:"info",children:(0,t.jsxs)(n.p,{children:["Nomination pools are a new feature for Polkadot\u2019s staking system that allows users to pool their\ntokens together on-chain to nominate validators and receive rewards, significantly improving the\nsystem\u2019s scalability. Now, anyone with as little as\n",(0,t.jsx)(n.a,{href:"https://polkadot.network/blog/nomination-pools-are-live-stake-natively-with-just-1-dot/",children:"1 DOT can receive rewards for staking natively on Polkadot"}),".\nNote that rewards are not guaranteed for those pools that do not have enough bonded funds to be\nincluded within the ",(0,t.jsx)(n.a,{href:"/docs/learn-staking-advanced#bags-list",children:"bags list"}),". ",(0,t.jsx)(n.strong,{children:"Only members of active\npools will receive rewards."})]})}),"\n",(0,t.jsxs)(n.admonition,{type:"note",children:[(0,t.jsxs)(n.p,{children:["Learn the key differences between\n",(0,t.jsx)(n.a,{href:"#nominating-vs-joining-a-pool",children:(0,t.jsx)(n.strong,{children:"Staking directly vs Joining a Nomination Pool"})}),"."]}),(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"For Ledger users:"})," Joining a nomination pool is possible only with the XL version of the Polkadot\nLedger App. This should be installed by default on Ledger Nano X and S Plus, but not on the Nano S."]}),(0,t.jsx)(n.p,{children:(0,t.jsxs)(n.strong,{children:["If you become a nomination pool member or a pool admin, you cannot participate in Governance with\nthe bonded tokens in the pool, as they are held in a\n",(0,t.jsx)(n.a,{href:"/docs/learn-account-advanced#system-accounts",children:"system account"}),"."]})})]}),"\n",(0,t.jsx)(n.admonition,{title:"Have questions on Nomination Pools?",type:"tip",children:(0,t.jsxs)(n.p,{children:["Please join the ",(0,t.jsx)(n.a,{href:"https://dot.li/discord",children:"Polkadot Discord"})," for asking general questions about\nNomination Pools. If you are a developer, please join our\n",(0,t.jsx)(n.a,{href:"https://matrix.to/#/#nompools-support:matrix.parity.io",children:"nomination pools support channel"}),"."]})}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"Nomination Pools",src:o(16088).A+"",width:"1720",height:"963"})}),"\n",(0,t.jsx)(n.p,{children:"Nomination pools are one of the key features from the roadmap of staking improvements. They are\ndesigned to permissionlessly allow members to pool their funds together and act as a single\nnominator account."}),"\n",(0,t.jsxs)(n.p,{children:["Due to the current runtime constraints, the relay chain can only handle a limited number of\nnominators (22500 on Polkadot and 12500 on Kusama) comfortably in the\n",(0,t.jsx)(n.a,{href:"/docs/learn-nominator#staking-election-stages",children:"electing set"}),". As one of the objectives of the\n",(0,t.jsx)(n.a,{href:"/docs/learn-phragmen",children:"NPoS algorithm"})," is to maximize the overall stake on the network, it can be\ninferred that the staking system favors nominators with a larger stake. Only the nominator accounts\nwhich back the validators in the active set are eligible for receiving staking rewards. This leaves\nout nomination intents from the accounts with lower token balance than the min-active nomination and\nplaces them in a waiting queue to enter electing set. Nomination pools will be handy for members who\nwant to participate in the staking system with a stake much lower than the dynamic min-active\nnomination threshold on the network. All operations are constant space and time complexity relative\nto the number of members, eliminating any theoretical upper bound on the number of members the\nsystem can handle and thus scaling the number of accounts that can participate and earn rewards in\nthe staking system. In summary, each nomination pool is viewed as a single nominator from the NPoS\nsystem point of view."]}),"\n",(0,t.jsx)(n.admonition,{title:"Why aren't the members in the nomination pools called delegators?",type:"info",children:(0,t.jsxs)(n.p,{children:["The term ",(0,t.jsx)(n.code,{children:"delegator"})," is associated too much with Delegated Proof of Staking (DPoS), and since the\nnetwork implements Nominated Proof of Staking (NPoS), naming them delegators would be misleading.\nThe term ",(0,t.jsx)(n.code,{children:"member"})," is our generic replacement for ",(0,t.jsx)(n.code,{children:"delegator"}),". In action, members are quite similar\nto delegators and delegate their nomination power to the pool."]})}),"\n",(0,t.jsx)(n.p,{children:"The pool\u2019s earnings are split pro rata to a member's stake in the bonded pool (and thus, the staking\nrewards for members will be the same as if they were a nominator). Importantly, slashes are also\napplied proportionally to members who may have been actively bonded."}),"\n",(0,t.jsx)(n.h2,{id:"key-components",children:"Key Components"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Bonded Pool: Tracks the distribution of actively staked funds."}),"\n",(0,t.jsx)(n.li,{children:"Reward Pool: Tracks rewards earned by actively staked funds."}),"\n",(0,t.jsx)(n.li,{children:"Unbonding Sub Pools: Collection of pools at different phases (i.e. eras) of the unbonding\nlifecycle."}),"\n",(0,t.jsx)(n.li,{children:"Members: Accounts that nominate to the pools."}),"\n",(0,t.jsx)(n.li,{children:"Point: Unit of measure for a member\u2019s portion of a pool's funds. All pools start with a point to\nPlanck ratio of 1. Over time, if the pool receives rewards, they increase in value, and if the\npool is slashed, it decreases in value."}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"pool-member-lifecycle",children:"Pool Member Lifecycle"}),"\n",(0,t.jsx)(n.h3,{id:"join-a-pool",children:"Join a pool"}),"\n",(0,t.jsxs)(n.p,{children:["A member delegates funds to a pool by transferring some amount to the pool\u2019s bonded account with the\n",(0,t.jsx)(n.code,{children:"join"})," extrinsic. The pool then increases its bond with the new funds. A member is afforded the\nability to bond additional funds or re-stake rewards as long as they are already actively bonded.\nNote that a member may only belong to one pool at a time."]}),"\n",(0,t.jsxs)(n.p,{children:["The current minimum bond to join a pool can be seen\n",(0,t.jsx)(n.a,{href:"/docs/chain-state-values#minimum-bond-to-join-a-nomination-pool",children:"here"}),"."]}),"\n",(0,t.jsx)(n.admonition,{type:"info",children:(0,t.jsxs)(n.p,{children:["The funds nominated to a pool will not be visible in the member's account balance on Polkadot JS\nApps UI. This is because the member funds are transferred from their account to the pool's\n",(0,t.jsx)(n.a,{href:"/docs/learn-account-advanced#system-accounts",children:"system account"}),". This pool account is not accessible\nby anyone (including the pool root or depositor) and only the pool's internal logic can access the\naccount."]})}),"\n",(0,t.jsx)(n.admonition,{title:"Use Proxy Accounts to join Nomination Pools",type:"tip",children:(0,t.jsxs)(n.p,{children:["Depending on how much control you want to give your proxy, you might choose between any >\nnon-transfer > staking > nomination pool proxy, with the latter being only able to sign transactions\nrelated to the ",(0,t.jsx)(n.code,{children:"NominationPool"})," pallet."]})}),"\n",(0,t.jsxs)(n.p,{children:['Check the "How to join a pool" section in\n',(0,t.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181401-how-to-join-nomination-pools",children:"this support article"}),"\nfor guidelines."]}),"\n",(0,t.jsx)(n.h3,{id:"claim-rewards",children:"Claim rewards"}),"\n",(0,t.jsxs)(n.p,{children:['The member can claim their portion of any rewards that have accumulated since the previous time they\nclaimed (or in the case that they have never claimed, any rewards that have accumulated since the\nera after they joined). Rewards are split pro rata among the actively bonded members. Check the "How\nto claim rewards" section in\n',(0,t.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181401-how-to-join-nomination-pools",children:"this support article"}),"\nfor guidelines."]}),"\n",(0,t.jsx)(n.h3,{id:"claim-permissions",children:"Claim Permissions"}),"\n",(0,t.jsx)(n.p,{children:"As a pool member, you can grant permission to any other account to claim and compound rewards on\nyour behalf. There are four permission options:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"Permissioned"})," (default): you need to claim and compound your rewards."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"PermissionlessCompound"}),": you grant permission to any other account to compound (claim and bond)\nyour rewards on your behalf."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"PermissionlessWithdraw"}),": you grant permission to any other account to withdraw (claim and keep as\na free balance) your rewards on your behalf."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"PermissionlessAll"}),": you grant permission to any other account to compound or withdraw your\nrewards on your behalf."]}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["See the ",(0,t.jsx)(n.a,{href:"/docs/staking-dashboard#pools",children:"Staking Dashboard page"})," for more information about\nhow to set your claim permissions."]}),"\n",(0,t.jsxs)(n.p,{children:["See the ",(0,t.jsx)(n.a,{href:"/docs/learn-guides-staking-pools#claim-rewards-for-other-pool-members",children:"advanced guides"})," to\nlearn how to claim rewards for another pool member."]}),"\n",(0,t.jsx)(n.h3,{id:"unbond-and-withdraw-funds",children:"Unbond and withdraw funds"}),"\n",(0,t.jsxs)(n.p,{children:["At any point in time after joining the pool, a member can start the process of exiting by unbonding.\n",(0,t.jsx)(n.code,{children:"unbond"})," will unbond part or all of the member's funds. After unbond has been called and the\n",(0,t.jsx)(n.a,{href:"/docs/chain-state-values#unbonding-duration",children:"unbonding duration"})," has passed a member may\nwithdraw their funds with ",(0,t.jsx)(n.code,{children:"withdrawUnbonded"}),'. Withdrawing effectively ends a member\'s relationship\nwith their pool, allowing them to join a different pool if desired. Check the "Withdraw unbonded\nfunds" section in\n',(0,t.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181401-how-to-join-nomination-pools",children:"this support article"}),"\nfor guidelines."]}),"\n",(0,t.jsx)(n.admonition,{title:"Unbonding transaction automatically triggers withdrawal of rewards",type:"info",children:(0,t.jsx)(n.p,{children:"When there is a change in the bonded balance, the accumulated rewards in the pool thus far are\nautomatically withdrawn to the account. The rewards are then accrued based on the updated bonded\nbalance."})}),"\n",(0,t.jsx)(n.h3,{id:"limitations-of-nomination-pools",children:"Limitations of Nomination Pools"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"A member cannot vote (e.g. in Referenda or for Council members) with their nominated funds. This\nmay be changed in the future once accounts are afforded the ability to split votes."}),"\n",(0,t.jsx)(n.li,{children:"For a member to switch pools, all funds from the account must be unbonded. This process takes 28\neras."}),"\n",(0,t.jsx)(n.li,{children:"A member can partially unbond the staked funds in the pool (at most 16 partial unbonds)."}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"pool-administration",children:"Pool Administration"}),"\n",(0,t.jsx)(n.h3,{id:"states",children:"States"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Open: The pool is open to be joined by anyone."}),"\n",(0,t.jsx)(n.li,{children:"Blocked: The pool is blocked; no joiners are permitted."}),"\n",(0,t.jsx)(n.li,{children:"Destroying: The pool is in the process of being destroyed. Once in this state, the pool may never\nrevert to any other state; it can only proceed to be destroyed. All members can be\npermissionlessly unbonded; this allows the pool to be dismantled regardless of any member\u2019s\nproactivity."}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"roles",children:"Roles"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Depositor: Creates the pool and is the initial member. The depositor can only leave the pool once\nall other members have left. Once they leave by withdrawing, the pool is fully removed from the\nsystem."}),"\n",(0,t.jsx)(n.li,{children:"Nominator: Can select the validators the pool nominates."}),"\n",(0,t.jsx)(n.li,{children:"Bouncer: Can change the pool\u2019s state and kick (permissionlessly unbond/withdraw) members if the\npool is blocked."}),"\n",(0,t.jsx)(n.li,{children:"Root: Can change the nominator, bouncer, or itself. Further, it can perform any of the actions the\nnominator or bouncer can."}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"pool-commissions",children:"Pool Commissions"}),"\n",(0,t.jsxs)(n.p,{children:["As the pool root role, you can set pool commissions that will be applied to the staking rewards paid\nout to the pool's system account before rewards are allocated for the pool members. You can set pool\ncommissions through the ",(0,t.jsx)(n.a,{href:"/docs/staking-dashboard#pools",children:"Polkadot Staking Dashboard"}),"."]}),"\n",(0,t.jsx)(n.p,{children:"Three methods can be used when setting the pool commission:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Commission Rate"})," (",(0,t.jsx)(n.code,{children:"nominationPools.setCommission"})," extrinsic): the start or new commission rate\n(",(0,t.jsx)(n.code,{children:"newCommission"})," parameter) that can be set between 0% and the\n",(0,t.jsx)(n.a,{href:"/docs/chain-state-values#nomination-pool-max-commission",children:"max commission parameter"}),"\n(decided through ",(0,t.jsx)(n.a,{href:"/docs/learn-polkadot-opengov",children:"governance referendum"}),") via the\n",(0,t.jsx)(n.a,{href:"https://paritytech.github.io/substrate/master/pallet_nomination_pools/pallet/type.GlobalMaxCommission.html",children:(0,t.jsx)(n.code,{children:"globalMaxCommission"})}),"\nparameter. You will need to specify an Input Payee Account, i.e. the account that will receive the\ncommission."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Max Commission"})," (",(0,t.jsx)(n.code,{children:"nominationPools.setCommissionMax"})," extrinsic): the maximum commission\n(",(0,t.jsx)(n.code,{children:"maxCommission"})," parameter) the pool will apply to its members (between 0% and Max Commission).\nNote that once set, ",(0,t.jsx)(n.strong,{children:"the pool admin can only lower it"}),"."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Change Rate"})," (",(0,t.jsx)(n.code,{children:"nominationPools.setCommissionChangeRate"})," extrinsic): the maximum rate increase\n(",(0,t.jsx)(n.code,{children:"maxIncrease"})," parameter) allowed for a single commission update. Note that once set, ",(0,t.jsx)(n.strong,{children:"the pool\nadmin can only lower it"}),". When setting the Change Rate, it will also be possible to set a\n",(0,t.jsx)(n.code,{children:"minDelay"})," quantified as the number of blocks (since last commission update) after which it is\npossible to change the commission (i.e. the minimum delay between commission updates). Note that\nonce set, ",(0,t.jsx)(n.strong,{children:"the pool admin can only increase it"}),"."]}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"Max Commission and Change Rate must not be necessarily set. It is the choice of the pool admin to\nset those parameters and provide transparency to the pool members about the pool's commission\npolicy."}),"\n",(0,t.jsx)(n.admonition,{title:"Max Commission and Change Rate are currently permanent",type:"warning",children:(0,t.jsxs)(n.p,{children:["Once the Max Commission and the Change Rate are set, the pool admin currently can only decrease\nthose values. The minimum delay between commission updates can only be increased. The situation can\nchange in the future and a ",(0,t.jsx)(n.code,{children:"forceSetCommissionMax"})," method can be proposed through governance\nreferendum."]})}),"\n",(0,t.jsx)(n.p,{children:"Let's take, for example, Pool A, which sets the Commission Rate to 10%, the Max Commission to 100%,\nand the Change Rate to 1% every 300 blocks (which equates to approximately 30 minutes). The\nfollowing statements are true:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"The pool commission can be increased by 1% every 30 minutes. Bigger increases are not allowed.\nIncreases of less than or equal to 1% are not allowed sooner than 30 minutes since the last\ncommission update."}),"\n",(0,t.jsx)(n.li,{children:"The Max Commission can only be decreased from 100%. Once decreased, it can be decreased again but\nit cannot be increased."}),"\n",(0,t.jsx)(n.li,{children:"The Change Rate's maximum increase can only be decreased from 1%. Once decreased, it can be\ndecreased again but it cannot be increased."}),"\n",(0,t.jsx)(n.li,{children:"The Change Rate's minimum delay between updates of 30 min can only be increased. Once increased,\nit can be increased again but it cannot be decreased."}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"pool-lifecycle",children:"Pool Lifecycle"}),"\n",(0,t.jsx)(n.admonition,{title:"Advanced How-to Guides",type:"info",children:(0,t.jsxs)(n.p,{children:["See ",(0,t.jsx)(n.a,{href:"./learn-guides-staking-pools#pool-creation",children:"this page"})," for more information about the lifecycle\nof nomination pools. The cycle includes creation, upkeep and destruction."]})}),"\n",(0,t.jsx)(n.h2,{id:"nomination-pools---slashing",children:"Nomination Pools - Slashing"}),"\n",(0,t.jsxs)(n.p,{children:["Suppose the staking system ",(0,t.jsx)(n.a,{href:"/docs/learn-offenses",children:"slashes"})," a pool\u2019s underlying nomination account. In\nthat case, the slash is distributed evenly across the bonded pool, and the unbonding pools from\nslash era+1 through the slash apply era. Thus, any member who either a) was unbonding or b) was\nactively bonded in the aforementioned range of eras will be affected by the slash. In other words, a\nmember who may have been actively bonded during the offence is slashed pro rata based on its stake\nrelative to the total slash amount."]}),"\n",(0,t.jsx)(n.p,{children:"Unbonding pools need to be slashed to ensure all nominators who were in the bonded pool while it was\nbacking a validator that committed an offense are punished. Without these measures a nominator could\nunbond right after a validator equivocated with no consequences."}),"\n",(0,t.jsx)(n.p,{children:"This strategy is unfair to members who joined after the slash because they get slashed as well, but\nit spares members who unbond. The latter is much more important for security: if a pool's validators\nattack the network, their members need to unbond fast! Avoiding additional slashes gives them an\nincentive to do that if validators get repeatedly slashed."}),"\n",(0,t.jsx)(n.h2,{id:"nominating-vs-joining-a-pool",children:"Nominating vs Joining a Pool"}),"\n",(0,t.jsxs)(n.p,{children:["Nominating is the action of choosing validators. It does not simply involve bonding tokens.\nNominating is an active task, which implies that you regularly monitor that your stake is backing an\nactive validator in all the eras and check if you are receiving your staking rewards. More\nimportantly, ensure that the validators you chose always act in the best interests of the network\nprotocol and have less chance of getting ",(0,t.jsx)(n.a,{href:"/docs/learn-offenses",children:"slashed"}),". To nominate you need a\n",(0,t.jsx)(n.a,{href:"/docs/chain-state-values#minimum-bond-to-participate-in-staking",children:"minimum bond"}),", while to\nreceive rewards, you need at least a balance greater than the\n",(0,t.jsx)(n.a,{href:"/docs/chain-state-values#minimum-active-bond",children:"minimum active bond"}),". If the validator\nmisbehaves, It is worth noting that your stake is subject to slashing, irrespective of whether you\nare at the top nominators or not."]}),"\n",(0,t.jsx)(n.p,{children:"As the minimum active bond is a dynamic value, it can make your nomination inactive when the\nthreshold goes above your bonded balance. Hence, to be eligible to earn rewards while nominating,\nyou would need to stake a much higher balance than the minimum active bond."}),"\n",(0,t.jsx)(n.p,{children:"Nomination pools are a way to participate in staking with as little as 1 DOT and earn staking\nrewards. Nomination pools differ from custodial solutions (like staking through central exchanges)\nbecause they are non-custodial, native to Polkadot's protocol, permissionless, transparent, and run\nin a decentralized way by the community. Before joining a nomination pool, you must ensure that the\npool is earning rewards and nominating the validators that match your preferences. Participating in\npools is more of a set-and-forget action than nominating by yourself. The pool operator maintains\nthe list of validators nominated by the pool, and so, in a way, you are trusting the pool operator\nto act in your best interests. However, it is advised to check the validators nominated by the pool\nfrom time to time and change the pool if necessary."}),"\n",(0,t.jsx)(n.admonition,{title:"Minimum Active Nomination Value is Dynamic",type:"info",children:(0,t.jsxs)(n.p,{children:["The minimum amount required to become an active nominator and earn rewards can be seen\n",(0,t.jsx)(n.a,{href:"/docs/chain-state-values#minimum-active-bond",children:"here"}),". If you have less tokens than the\nminimum active nomination and still want to participate in staking, you can join the nomination\npools with a\n",(0,t.jsx)(n.a,{href:"/docs/chain-state-values#minimum-bond-to-participate-in-staking",children:"smaller bond"}),". For\nadditional information, see\n",(0,t.jsx)(n.a,{href:"https://polkadot.network/blog/nomination-pools-are-live-stake-natively-with-just-1-dot/",children:"this blog post"}),".\nCheck the wiki doc on ",(0,t.jsx)(n.a,{href:"/docs/learn-nomination-pools",children:"nomination pools"})," for more information."]})}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{style:{textAlign:"center"},children:"Nominating"}),(0,t.jsx)(n.th,{style:{textAlign:"center"},children:"Joining a Pool"})]})}),(0,t.jsxs)(n.tbody,{children:[(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{style:{textAlign:"center"},children:"Minimum 250 DOT to nominate."}),(0,t.jsx)(n.td,{style:{textAlign:"center"},children:"Minimum 1 DOT to be a member."})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{style:{textAlign:"center"},children:"Rewards can be compounded automatically or sent to any account."}),(0,t.jsx)(n.td,{style:{textAlign:"center"},children:"Rewards can be manually claimed to the pool member's account and be bonded in the pool again to compound them."})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{style:{textAlign:"center"},children:"If the active validator gets slashed, all active nominators are subjected to slashing."}),(0,t.jsx)(n.td,{style:{textAlign:"center"},children:"If the active validator gets slashed, all pool members are subjected to slashing."})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{style:{textAlign:"center"},children:"Can bond and stake DOT indefinitely."}),(0,t.jsx)(n.td,{style:{textAlign:"center"},children:"Can bond and stake DOT until the pool exists."})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{style:{textAlign:"center"},children:"Unbonding period of 28 days. Can switch validators without unbonding."}),(0,t.jsx)(n.td,{style:{textAlign:"center"},children:"Unbonding period of 28 days. Need to unbond before switching to a different pool."})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{style:{textAlign:"center"},children:"Maximum uncapped."}),(0,t.jsx)(n.td,{style:{textAlign:"center"},children:"Maximum uncapped."})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsxs)(n.td,{style:{textAlign:"center"},children:["Should bond more than the ",(0,t.jsx)(n.a,{href:"/docs/learn-nominator#minimum-active-nomination-to-receive-staking-rewards",children:"minimum active nomination"})," in an era to be eligible to earn staking rewards, although it can depend on multiple other factors outlined in the linked document."]}),(0,t.jsxs)(n.td,{style:{textAlign:"center"},children:["A nomination pool earns rewards in an era if it satisfies all the conditions mentioned for the nominator (as the nomination pool is just a nominator from ",(0,t.jsx)(n.a,{href:"/docs/learn-phragmen",children:"the NPoS system"})," perspective)."]})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{style:{textAlign:"center"},children:"Staked tokens can be used for participation in Governance."}),(0,t.jsx)(n.td,{style:{textAlign:"center"},children:"Staked tokens cannot be used for participation in Governance."})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsxs)(n.td,{style:{textAlign:"center"},children:[(0,t.jsx)(n.a,{href:"/docs/learn-staking-advanced#claiming-rewards",children:"Rewards payout"})," can be triggered permissionlessly by anyone (typically done by the validator)."]}),(0,t.jsxs)(n.td,{style:{textAlign:"center"},children:["A pool member can self claim the rewards or can grant permission to any other account to claim and compound rewards on your behalf. See ",(0,t.jsx)(n.a,{href:"https://wiki.polkadot.network/docs/learn-nomination-pools#claim-permissions",children:"Claim Permissions"}),"."]})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{style:{textAlign:"center"},children:"Bonded funds remain in your account."}),(0,t.jsxs)(n.td,{style:{textAlign:"center"},children:["Bonded funds are transferred to a pool account which is administered by the network protocol and is not accessible to anyone else. See ",(0,t.jsx)(n.a,{href:"/docs/learn-account-advanced#system-accounts",children:"System Accounts"})," for more information."]})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{style:{textAlign:"center"},children:"Nominator manages the list of staked validators (up to 16)."}),(0,t.jsx)(n.td,{style:{textAlign:"center"},children:"Nominations managed by the pool operator."})]})]})]})]})}function m(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(h,{...e})}):h(e)}},67141:(e,n,o)=>{o.d(n,{A:()=>a});var t=o(96540),i=o(74848);const a=function(e){var n,o=e.message,a=(0,t.useState)(!0),s=a[0],r=a[1];return(0,i.jsx)(i.Fragment,{children:s&&(0,i.jsxs)("div",{className:"message-box",children:[(0,i.jsx)("button",{className:"close-button",onClick:function(){r(!1)},children:"\u2716 "}),(0,i.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(n=o,n.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},16088:(e,n,o)=>{o.d(n,{A:()=>t});const t=o.p+"assets/images/NPoS-Pools-b758caea750e9e772fe7fcdbd6babeca.png"},28453:(e,n,o)=>{o.d(n,{R:()=>s,x:()=>r});var t=o(96540);const i={},a=t.createContext(i);function s(e){const n=t.useContext(a);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:s(e.components),t.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/da9f79cb.8d04c841.js b/assets/js/da9f79cb.8d04c841.js new file mode 100644 index 000000000000..429f5108e2d4 --- /dev/null +++ b/assets/js/da9f79cb.8d04c841.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3044],{86708:(e,n,o)=>{o.r(n),o.d(n,{assets:()=>d,contentTitle:()=>l,default:()=>m,frontMatter:()=>r,metadata:()=>t,toc:()=>c});const t=JSON.parse('{"id":"learn/learn-nomination-pools","title":"Nomination Pools","description":"Staking through Polkadot\'s Nomination Pools.","source":"@site/../docs/learn/learn-nomination-pools.md","sourceDirName":"learn","slug":"/learn-nomination-pools","permalink":"/docs/learn-nomination-pools","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-nomination-pools.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1726760224000,"frontMatter":{"id":"learn-nomination-pools","title":"Nomination Pools","sidebar_label":"Nomination Pools","description":"Staking through Polkadot\'s Nomination Pools.","keyword":["nominate","nominator","stake","staking","pools"],"slug":"../learn-nomination-pools"},"sidebar":"docs","previous":{"title":"Introduction to Staking","permalink":"/docs/learn-staking"},"next":{"title":"Polkadot OpenGov","permalink":"/docs/learn-polkadot-opengov-index"}}');var i=o(74848),a=o(28453),s=o(67141);const r={id:"learn-nomination-pools",title:"Nomination Pools",sidebar_label:"Nomination Pools",description:"Staking through Polkadot's Nomination Pools.",keyword:["nominate","nominator","stake","staking","pools"],slug:"../learn-nomination-pools"},l=void 0,d={},c=[{value:"Key Components",id:"key-components",level:2},{value:"Pool Member Lifecycle",id:"pool-member-lifecycle",level:2},{value:"Join a pool",id:"join-a-pool",level:3},{value:"Claim rewards",id:"claim-rewards",level:3},{value:"Claim Permissions",id:"claim-permissions",level:3},{value:"Unbond and withdraw funds",id:"unbond-and-withdraw-funds",level:3},{value:"Limitations of Nomination Pools",id:"limitations-of-nomination-pools",level:3},{value:"Pool Administration",id:"pool-administration",level:2},{value:"States",id:"states",level:3},{value:"Roles",id:"roles",level:3},{value:"Pool Commissions",id:"pool-commissions",level:3},{value:"Pool Lifecycle",id:"pool-lifecycle",level:2},{value:"Nomination Pools - Slashing",id:"nomination-pools---slashing",level:2},{value:"Nominating vs Joining a Pool",id:"nominating-vs-joining-a-pool",level:2}];function h(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,a.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(s.A,{message:"Nomination Pools are evolving!\nSoon you'll be able to participate in a pool and in OpenGov with your pooled funds!\nYou do not need to do anything, unless you are participating in a pool and also staking solo from the same account. In this case, please check [this article](https://support.polkadot.network/support/solutions/articles/65000188140-changes-for-nomination-pool-members-and-opengov-participation) on the actions you need to take as soon as possible."}),"\n",(0,i.jsx)(n.admonition,{title:"Nomination Pools are live on Polkadot!",type:"info",children:(0,i.jsxs)(n.p,{children:["Nomination pools are a new feature for Polkadot\u2019s staking system that allows users to pool their\ntokens together on-chain to nominate validators and receive rewards, significantly improving the\nsystem\u2019s scalability. Now, anyone with as little as\n",(0,i.jsx)(n.a,{href:"https://polkadot.network/blog/nomination-pools-are-live-stake-natively-with-just-1-dot/",children:"1 DOT can receive rewards for staking natively on Polkadot"}),".\nNote that rewards are not guaranteed for those pools that do not have enough bonded funds to be\nincluded within the ",(0,i.jsx)(n.a,{href:"/docs/learn-staking-advanced#bags-list",children:"bags list"}),". ",(0,i.jsx)(n.strong,{children:"Only members of active\npools will receive rewards."})]})}),"\n",(0,i.jsxs)(n.admonition,{type:"note",children:[(0,i.jsxs)(n.p,{children:["Learn the key differences between\n",(0,i.jsx)(n.a,{href:"#nominating-vs-joining-a-pool",children:(0,i.jsx)(n.strong,{children:"Staking directly vs Joining a Nomination Pool"})}),"."]}),(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"For Ledger users:"})," Joining a nomination pool is possible only with the XL version of the Polkadot\nLedger App. This should be installed by default on Ledger Nano X and S Plus, but not on the Nano S."]}),(0,i.jsx)(n.p,{children:(0,i.jsxs)(n.strong,{children:["If you become a nomination pool member or a pool admin, you cannot participate in Governance with\nthe bonded tokens in the pool, as they are held in a\n",(0,i.jsx)(n.a,{href:"/docs/learn-account-advanced#system-accounts",children:"system account"}),"."]})})]}),"\n",(0,i.jsx)(n.admonition,{title:"Have questions on Nomination Pools?",type:"tip",children:(0,i.jsxs)(n.p,{children:["Please join the ",(0,i.jsx)(n.a,{href:"https://dot.li/discord",children:"Polkadot Discord"})," for asking general questions about\nNomination Pools. If you are a developer, please join our\n",(0,i.jsx)(n.a,{href:"https://matrix.to/#/#nompools-support:matrix.parity.io",children:"nomination pools support channel"}),"."]})}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"Nomination Pools",src:o(16088).A+"",width:"1720",height:"963"})}),"\n",(0,i.jsx)(n.p,{children:"Nomination pools are one of the key features from the roadmap of staking improvements. They are\ndesigned to permissionlessly allow members to pool their funds together and act as a single\nnominator account."}),"\n",(0,i.jsxs)(n.p,{children:["Due to the current runtime constraints, the relay chain can only handle a limited number of\nnominators (22500 on Polkadot and 12500 on Kusama) comfortably in the\n",(0,i.jsx)(n.a,{href:"/docs/learn-nominator#staking-election-stages",children:"electing set"}),". As one of the objectives of the\n",(0,i.jsx)(n.a,{href:"/docs/learn-phragmen",children:"NPoS algorithm"})," is to maximize the overall stake on the network, it can be\ninferred that the staking system favors nominators with a larger stake. Only the nominator accounts\nwhich back the validators in the active set are eligible for receiving staking rewards. This leaves\nout nomination intents from the accounts with lower token balance than the min-active nomination and\nplaces them in a waiting queue to enter electing set. Nomination pools will be handy for members who\nwant to participate in the staking system with a stake much lower than the dynamic min-active\nnomination threshold on the network. All operations are constant space and time complexity relative\nto the number of members, eliminating any theoretical upper bound on the number of members the\nsystem can handle and thus scaling the number of accounts that can participate and earn rewards in\nthe staking system. In summary, each nomination pool is viewed as a single nominator from the NPoS\nsystem point of view."]}),"\n",(0,i.jsx)(n.admonition,{title:"Why aren't the members in the nomination pools called delegators?",type:"info",children:(0,i.jsxs)(n.p,{children:["The term ",(0,i.jsx)(n.code,{children:"delegator"})," is associated too much with Delegated Proof of Staking (DPoS), and since the\nnetwork implements Nominated Proof of Staking (NPoS), naming them delegators would be misleading.\nThe term ",(0,i.jsx)(n.code,{children:"member"})," is our generic replacement for ",(0,i.jsx)(n.code,{children:"delegator"}),". In action, members are quite similar\nto delegators and delegate their nomination power to the pool."]})}),"\n",(0,i.jsx)(n.p,{children:"The pool\u2019s earnings are split pro rata to a member's stake in the bonded pool (and thus, the staking\nrewards for members will be the same as if they were a nominator). Importantly, slashes are also\napplied proportionally to members who may have been actively bonded."}),"\n",(0,i.jsx)(n.h2,{id:"key-components",children:"Key Components"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Bonded Pool: Tracks the distribution of actively staked funds."}),"\n",(0,i.jsx)(n.li,{children:"Reward Pool: Tracks rewards earned by actively staked funds."}),"\n",(0,i.jsx)(n.li,{children:"Unbonding Sub Pools: Collection of pools at different phases (i.e. eras) of the unbonding\nlifecycle."}),"\n",(0,i.jsx)(n.li,{children:"Members: Accounts that nominate to the pools."}),"\n",(0,i.jsx)(n.li,{children:"Point: Unit of measure for a member\u2019s portion of a pool's funds. All pools start with a point to\nPlanck ratio of 1. Over time, if the pool receives rewards, they increase in value, and if the\npool is slashed, it decreases in value."}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"pool-member-lifecycle",children:"Pool Member Lifecycle"}),"\n",(0,i.jsx)(n.h3,{id:"join-a-pool",children:"Join a pool"}),"\n",(0,i.jsxs)(n.p,{children:["A member delegates funds to a pool by transferring some amount to the pool\u2019s bonded account with the\n",(0,i.jsx)(n.code,{children:"join"})," extrinsic. The pool then increases its bond with the new funds. A member is afforded the\nability to bond additional funds or re-stake rewards as long as they are already actively bonded.\nNote that a member may only belong to one pool at a time."]}),"\n",(0,i.jsxs)(n.p,{children:["The current minimum bond to join a pool can be seen\n",(0,i.jsx)(n.a,{href:"/docs/chain-state-values#minimum-bond-to-join-a-nomination-pool",children:"here"}),"."]}),"\n",(0,i.jsx)(n.admonition,{type:"info",children:(0,i.jsxs)(n.p,{children:["The funds nominated to a pool will not be visible in the member's account balance on Polkadot JS\nApps UI. This is because the member funds are transferred from their account to the pool's\n",(0,i.jsx)(n.a,{href:"/docs/learn-account-advanced#system-accounts",children:"system account"}),". This pool account is not accessible\nby anyone (including the pool root or depositor) and only the pool's internal logic can access the\naccount."]})}),"\n",(0,i.jsx)(n.admonition,{title:"Use Proxy Accounts to join Nomination Pools",type:"tip",children:(0,i.jsxs)(n.p,{children:["Depending on how much control you want to give your proxy, you might choose between any >\nnon-transfer > staking > nomination pool proxy, with the latter being only able to sign transactions\nrelated to the ",(0,i.jsx)(n.code,{children:"NominationPool"})," pallet."]})}),"\n",(0,i.jsxs)(n.p,{children:['Check the "How to join a pool" section in\n',(0,i.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181401-how-to-join-nomination-pools",children:"this support article"}),"\nfor guidelines."]}),"\n",(0,i.jsx)(n.h3,{id:"claim-rewards",children:"Claim rewards"}),"\n",(0,i.jsxs)(n.p,{children:['The member can claim their portion of any rewards that have accumulated since the previous time they\nclaimed (or in the case that they have never claimed, any rewards that have accumulated since the\nera after they joined). Rewards are split pro rata among the actively bonded members. Check the "How\nto claim rewards" section in\n',(0,i.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181401-how-to-join-nomination-pools",children:"this support article"}),"\nfor guidelines."]}),"\n",(0,i.jsx)(n.h3,{id:"claim-permissions",children:"Claim Permissions"}),"\n",(0,i.jsx)(n.p,{children:"As a pool member, you can grant permission to any other account to claim and compound rewards on\nyour behalf. There are four permission options:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"Permissioned"})," (default): you need to claim and compound your rewards."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"PermissionlessCompound"}),": you grant permission to any other account to compound (claim and bond)\nyour rewards on your behalf."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"PermissionlessWithdraw"}),": you grant permission to any other account to withdraw (claim and keep as\na free balance) your rewards on your behalf."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"PermissionlessAll"}),": you grant permission to any other account to compound or withdraw your\nrewards on your behalf."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["See the ",(0,i.jsx)(n.a,{href:"/docs/staking-dashboard#pools",children:"Staking Dashboard page"})," for more information about\nhow to set your claim permissions."]}),"\n",(0,i.jsxs)(n.p,{children:["See the ",(0,i.jsx)(n.a,{href:"/docs/learn-guides-staking-pools#claim-rewards-for-other-pool-members",children:"advanced guides"})," to\nlearn how to claim rewards for another pool member."]}),"\n",(0,i.jsx)(n.h3,{id:"unbond-and-withdraw-funds",children:"Unbond and withdraw funds"}),"\n",(0,i.jsxs)(n.p,{children:["At any point in time after joining the pool, a member can start the process of exiting by unbonding.\n",(0,i.jsx)(n.code,{children:"unbond"})," will unbond part or all of the member's funds. After unbond has been called and the\n",(0,i.jsx)(n.a,{href:"/docs/chain-state-values#unbonding-duration",children:"unbonding duration"})," has passed a member may\nwithdraw their funds with ",(0,i.jsx)(n.code,{children:"withdrawUnbonded"}),'. Withdrawing effectively ends a member\'s relationship\nwith their pool, allowing them to join a different pool if desired. Check the "Withdraw unbonded\nfunds" section in\n',(0,i.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181401-how-to-join-nomination-pools",children:"this support article"}),"\nfor guidelines."]}),"\n",(0,i.jsx)(n.admonition,{title:"Unbonding transaction automatically triggers withdrawal of rewards",type:"info",children:(0,i.jsx)(n.p,{children:"When there is a change in the bonded balance, the accumulated rewards in the pool thus far are\nautomatically withdrawn to the account. The rewards are then accrued based on the updated bonded\nbalance."})}),"\n",(0,i.jsx)(n.h3,{id:"limitations-of-nomination-pools",children:"Limitations of Nomination Pools"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"A member cannot vote (e.g. in Referenda or for Council members) with their nominated funds. This\nmay be changed in the future once accounts are afforded the ability to split votes."}),"\n",(0,i.jsx)(n.li,{children:"For a member to switch pools, all funds from the account must be unbonded. This process takes 28\neras."}),"\n",(0,i.jsx)(n.li,{children:"A member can partially unbond the staked funds in the pool (at most 16 partial unbonds)."}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"pool-administration",children:"Pool Administration"}),"\n",(0,i.jsx)(n.h3,{id:"states",children:"States"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Open: The pool is open to be joined by anyone."}),"\n",(0,i.jsx)(n.li,{children:"Blocked: The pool is blocked; no joiners are permitted."}),"\n",(0,i.jsx)(n.li,{children:"Destroying: The pool is in the process of being destroyed. Once in this state, the pool may never\nrevert to any other state; it can only proceed to be destroyed. All members can be\npermissionlessly unbonded; this allows the pool to be dismantled regardless of any member\u2019s\nproactivity."}),"\n"]}),"\n",(0,i.jsx)(n.h3,{id:"roles",children:"Roles"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Depositor: Creates the pool and is the initial member. The depositor can only leave the pool once\nall other members have left. Once they leave by withdrawing, the pool is fully removed from the\nsystem."}),"\n",(0,i.jsx)(n.li,{children:"Nominator: Can select the validators the pool nominates."}),"\n",(0,i.jsx)(n.li,{children:"Bouncer: Can change the pool\u2019s state and kick (permissionlessly unbond/withdraw) members if the\npool is blocked."}),"\n",(0,i.jsx)(n.li,{children:"Root: Can change the nominator, bouncer, or itself. Further, it can perform any of the actions the\nnominator or bouncer can."}),"\n"]}),"\n",(0,i.jsx)(n.h3,{id:"pool-commissions",children:"Pool Commissions"}),"\n",(0,i.jsxs)(n.p,{children:["As the pool root role, you can set pool commissions that will be applied to the staking rewards paid\nout to the pool's system account before rewards are allocated for the pool members. You can set pool\ncommissions through the ",(0,i.jsx)(n.a,{href:"/docs/staking-dashboard#pools",children:"Polkadot Staking Dashboard"}),"."]}),"\n",(0,i.jsx)(n.p,{children:"Three methods can be used when setting the pool commission:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Commission Rate"})," (",(0,i.jsx)(n.code,{children:"nominationPools.setCommission"})," extrinsic): the start or new commission rate\n(",(0,i.jsx)(n.code,{children:"newCommission"})," parameter) that can be set between 0% and the\n",(0,i.jsx)(n.a,{href:"/docs/chain-state-values#nomination-pool-max-commission",children:"max commission parameter"}),"\n(decided through ",(0,i.jsx)(n.a,{href:"/docs/learn-polkadot-opengov",children:"governance referendum"}),") via the\n",(0,i.jsx)(n.a,{href:"https://paritytech.github.io/substrate/master/pallet_nomination_pools/pallet/type.GlobalMaxCommission.html",children:(0,i.jsx)(n.code,{children:"globalMaxCommission"})}),"\nparameter. You will need to specify an Input Payee Account, i.e. the account that will receive the\ncommission."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Max Commission"})," (",(0,i.jsx)(n.code,{children:"nominationPools.setCommissionMax"})," extrinsic): the maximum commission\n(",(0,i.jsx)(n.code,{children:"maxCommission"})," parameter) the pool will apply to its members (between 0% and Max Commission).\nNote that once set, ",(0,i.jsx)(n.strong,{children:"the pool admin can only lower it"}),"."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Change Rate"})," (",(0,i.jsx)(n.code,{children:"nominationPools.setCommissionChangeRate"})," extrinsic): the maximum rate increase\n(",(0,i.jsx)(n.code,{children:"maxIncrease"})," parameter) allowed for a single commission update. Note that once set, ",(0,i.jsx)(n.strong,{children:"the pool\nadmin can only lower it"}),". When setting the Change Rate, it will also be possible to set a\n",(0,i.jsx)(n.code,{children:"minDelay"})," quantified as the number of blocks (since last commission update) after which it is\npossible to change the commission (i.e. the minimum delay between commission updates). Note that\nonce set, ",(0,i.jsx)(n.strong,{children:"the pool admin can only increase it"}),"."]}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"Max Commission and Change Rate must not be necessarily set. It is the choice of the pool admin to\nset those parameters and provide transparency to the pool members about the pool's commission\npolicy."}),"\n",(0,i.jsx)(n.admonition,{title:"Max Commission and Change Rate are currently permanent",type:"warning",children:(0,i.jsxs)(n.p,{children:["Once the Max Commission and the Change Rate are set, the pool admin currently can only decrease\nthose values. The minimum delay between commission updates can only be increased. The situation can\nchange in the future and a ",(0,i.jsx)(n.code,{children:"forceSetCommissionMax"})," method can be proposed through governance\nreferendum."]})}),"\n",(0,i.jsx)(n.p,{children:"Let's take, for example, Pool A, which sets the Commission Rate to 10%, the Max Commission to 100%,\nand the Change Rate to 1% every 300 blocks (which equates to approximately 30 minutes). The\nfollowing statements are true:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"The pool commission can be increased by 1% every 30 minutes. Bigger increases are not allowed.\nIncreases of less than or equal to 1% are not allowed sooner than 30 minutes since the last\ncommission update."}),"\n",(0,i.jsx)(n.li,{children:"The Max Commission can only be decreased from 100%. Once decreased, it can be decreased again but\nit cannot be increased."}),"\n",(0,i.jsx)(n.li,{children:"The Change Rate's maximum increase can only be decreased from 1%. Once decreased, it can be\ndecreased again but it cannot be increased."}),"\n",(0,i.jsx)(n.li,{children:"The Change Rate's minimum delay between updates of 30 min can only be increased. Once increased,\nit can be increased again but it cannot be decreased."}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"pool-lifecycle",children:"Pool Lifecycle"}),"\n",(0,i.jsx)(n.admonition,{title:"Advanced How-to Guides",type:"info",children:(0,i.jsxs)(n.p,{children:["See ",(0,i.jsx)(n.a,{href:"./learn-guides-staking-pools#pool-creation",children:"this page"})," for more information about the lifecycle\nof nomination pools. The cycle includes creation, upkeep and destruction."]})}),"\n",(0,i.jsx)(n.h2,{id:"nomination-pools---slashing",children:"Nomination Pools - Slashing"}),"\n",(0,i.jsxs)(n.p,{children:["Suppose the staking system ",(0,i.jsx)(n.a,{href:"/docs/learn-offenses",children:"slashes"})," a pool\u2019s underlying nomination account. In\nthat case, the slash is distributed evenly across the bonded pool, and the unbonding pools from\nslash era+1 through the slash apply era. Thus, any member who either a) was unbonding or b) was\nactively bonded in the aforementioned range of eras will be affected by the slash. In other words, a\nmember who may have been actively bonded during the offence is slashed pro rata based on its stake\nrelative to the total slash amount."]}),"\n",(0,i.jsx)(n.p,{children:"Unbonding pools need to be slashed to ensure all nominators who were in the bonded pool while it was\nbacking a validator that committed an offense are punished. Without these measures a nominator could\nunbond right after a validator equivocated with no consequences."}),"\n",(0,i.jsx)(n.p,{children:"This strategy is unfair to members who joined after the slash because they get slashed as well, but\nit spares members who unbond. The latter is much more important for security: if a pool's validators\nattack the network, their members need to unbond fast! Avoiding additional slashes gives them an\nincentive to do that if validators get repeatedly slashed."}),"\n",(0,i.jsx)(n.h2,{id:"nominating-vs-joining-a-pool",children:"Nominating vs Joining a Pool"}),"\n",(0,i.jsxs)(n.p,{children:["Nominating is the action of choosing validators. It does not simply involve bonding tokens.\nNominating is an active task, which implies that you regularly monitor that your stake is backing an\nactive validator in all the eras and check if you are receiving your staking rewards. More\nimportantly, ensure that the validators you chose always act in the best interests of the network\nprotocol and have less chance of getting ",(0,i.jsx)(n.a,{href:"/docs/learn-offenses",children:"slashed"}),". To nominate you need a\n",(0,i.jsx)(n.a,{href:"/docs/chain-state-values#minimum-bond-to-participate-in-staking",children:"minimum bond"}),", while to\nreceive rewards, you need at least a balance greater than the\n",(0,i.jsx)(n.a,{href:"/docs/chain-state-values#minimum-active-bond",children:"minimum active bond"}),". If the validator\nmisbehaves, It is worth noting that your stake is subject to slashing, irrespective of whether you\nare at the top nominators or not."]}),"\n",(0,i.jsx)(n.p,{children:"As the minimum active bond is a dynamic value, it can make your nomination inactive when the\nthreshold goes above your bonded balance. Hence, to be eligible to earn rewards while nominating,\nyou would need to stake a much higher balance than the minimum active bond."}),"\n",(0,i.jsx)(n.p,{children:"Nomination pools are a way to participate in staking with as little as 1 DOT and earn staking\nrewards. Nomination pools differ from custodial solutions (like staking through central exchanges)\nbecause they are non-custodial, native to Polkadot's protocol, permissionless, transparent, and run\nin a decentralized way by the community. Before joining a nomination pool, you must ensure that the\npool is earning rewards and nominating the validators that match your preferences. Participating in\npools is more of a set-and-forget action than nominating by yourself. The pool operator maintains\nthe list of validators nominated by the pool, and so, in a way, you are trusting the pool operator\nto act in your best interests. However, it is advised to check the validators nominated by the pool\nfrom time to time and change the pool if necessary."}),"\n",(0,i.jsx)(n.admonition,{title:"Minimum Active Nomination Value is Dynamic",type:"info",children:(0,i.jsxs)(n.p,{children:["The minimum amount required to become an active nominator and earn rewards can be seen\n",(0,i.jsx)(n.a,{href:"/docs/chain-state-values#minimum-active-bond",children:"here"}),". If you have less tokens than the\nminimum active nomination and still want to participate in staking, you can join the nomination\npools with a\n",(0,i.jsx)(n.a,{href:"/docs/chain-state-values#minimum-bond-to-participate-in-staking",children:"smaller bond"}),". For\nadditional information, see\n",(0,i.jsx)(n.a,{href:"https://polkadot.network/blog/nomination-pools-are-live-stake-natively-with-just-1-dot/",children:"this blog post"}),".\nCheck the wiki doc on ",(0,i.jsx)(n.a,{href:"/docs/learn-nomination-pools",children:"nomination pools"})," for more information."]})}),"\n",(0,i.jsxs)(n.table,{children:[(0,i.jsx)(n.thead,{children:(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.th,{style:{textAlign:"center"},children:"Nominating"}),(0,i.jsx)(n.th,{style:{textAlign:"center"},children:"Joining a Pool"})]})}),(0,i.jsxs)(n.tbody,{children:[(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{style:{textAlign:"center"},children:"Minimum 250 DOT to nominate."}),(0,i.jsx)(n.td,{style:{textAlign:"center"},children:"Minimum 1 DOT to be a member."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{style:{textAlign:"center"},children:"Rewards can be compounded automatically or sent to any account."}),(0,i.jsx)(n.td,{style:{textAlign:"center"},children:"Rewards can be manually claimed to the pool member's account and be bonded in the pool again to compound them."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{style:{textAlign:"center"},children:"If the active validator gets slashed, all active nominators are subjected to slashing."}),(0,i.jsx)(n.td,{style:{textAlign:"center"},children:"If the active validator gets slashed, all pool members are subjected to slashing."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{style:{textAlign:"center"},children:"Can bond and stake DOT indefinitely."}),(0,i.jsx)(n.td,{style:{textAlign:"center"},children:"Can bond and stake DOT until the pool exists."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{style:{textAlign:"center"},children:"Unbonding period of 28 days. Can switch validators without unbonding."}),(0,i.jsx)(n.td,{style:{textAlign:"center"},children:"Unbonding period of 28 days. Need to unbond before switching to a different pool."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{style:{textAlign:"center"},children:"Maximum uncapped."}),(0,i.jsx)(n.td,{style:{textAlign:"center"},children:"Maximum uncapped."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsxs)(n.td,{style:{textAlign:"center"},children:["Should bond more than the ",(0,i.jsx)(n.a,{href:"/docs/learn-nominator#minimum-active-nomination-to-receive-staking-rewards",children:"minimum active nomination"})," in an era to be eligible to earn staking rewards, although it can depend on multiple other factors outlined in the linked document."]}),(0,i.jsxs)(n.td,{style:{textAlign:"center"},children:["A nomination pool earns rewards in an era if it satisfies all the conditions mentioned for the nominator (as the nomination pool is just a nominator from ",(0,i.jsx)(n.a,{href:"/docs/learn-phragmen",children:"the NPoS system"})," perspective)."]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{style:{textAlign:"center"},children:"Staked tokens can be used for participation in Governance."}),(0,i.jsx)(n.td,{style:{textAlign:"center"},children:"Staked tokens cannot be used for participation in Governance."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsxs)(n.td,{style:{textAlign:"center"},children:[(0,i.jsx)(n.a,{href:"/docs/learn-staking-advanced#claiming-rewards",children:"Rewards payout"})," can be triggered permissionlessly by anyone (typically done by the validator)."]}),(0,i.jsxs)(n.td,{style:{textAlign:"center"},children:["A pool member can self claim the rewards or can grant permission to any other account to claim and compound rewards on your behalf. See ",(0,i.jsx)(n.a,{href:"https://wiki.polkadot.network/docs/learn-nomination-pools#claim-permissions",children:"Claim Permissions"}),"."]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{style:{textAlign:"center"},children:"Bonded funds remain in your account."}),(0,i.jsxs)(n.td,{style:{textAlign:"center"},children:["Bonded funds are transferred to a pool account which is administered by the network protocol and is not accessible to anyone else. See ",(0,i.jsx)(n.a,{href:"/docs/learn-account-advanced#system-accounts",children:"System Accounts"})," for more information."]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{style:{textAlign:"center"},children:"Nominator manages the list of staked validators (up to 16)."}),(0,i.jsx)(n.td,{style:{textAlign:"center"},children:"Nominations managed by the pool operator."})]})]})]})]})}function m(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(h,{...e})}):h(e)}},67141:(e,n,o)=>{o.d(n,{A:()=>a});var t=o(96540),i=o(74848);const a=function(e){var n,o=e.message,a=(0,t.useState)(!0),s=a[0],r=a[1];return(0,i.jsx)(i.Fragment,{children:s&&(0,i.jsxs)("div",{className:"message-box",children:[(0,i.jsx)("button",{className:"close-button",onClick:function(){r(!1)},children:"\u2716 "}),(0,i.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(n=o,n.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},16088:(e,n,o)=>{o.d(n,{A:()=>t});const t=o.p+"assets/images/NPoS-Pools-b758caea750e9e772fe7fcdbd6babeca.png"},28453:(e,n,o)=>{o.d(n,{R:()=>s,x:()=>r});var t=o(96540);const i={},a=t.createContext(i);function s(e){const n=t.useContext(a);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:s(e.components),t.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/daaf1ab4.49927c52.js b/assets/js/daaf1ab4.49927c52.js new file mode 100644 index 000000000000..247865213812 --- /dev/null +++ b/assets/js/daaf1ab4.49927c52.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8215],{25939:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>c,default:()=>h,frontMatter:()=>l,metadata:()=>r,toc:()=>u});const r=JSON.parse('{"id":"general/funding","title":"Funding Opportunities","description":"An Overview of Funding Opportunities within the Polkadot Ecosystem.","source":"@site/../docs/general/funding.md","sourceDirName":"general","slug":"/funding","permalink":"/docs/funding","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/funding.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1728896963000,"frontMatter":{"id":"funding","title":"Funding Opportunities","sidebar_label":"Funding","description":"An Overview of Funding Opportunities within the Polkadot Ecosystem.","keywords":["funding","grants","decentralized futures","treasury","bounties"],"slug":"../funding"},"sidebar":"docs","previous":{"title":"Contributors","permalink":"/docs/contributors"},"next":{"title":"Grants","permalink":"/docs/grants"}}');var i=n(74848),o=n(28453),s=n(3514),a=n(67141);const l={id:"funding",title:"Funding Opportunities",sidebar_label:"Funding",description:"An Overview of Funding Opportunities within the Polkadot Ecosystem.",keywords:["funding","grants","decentralized futures","treasury","bounties"],slug:"../funding"},c=void 0,d={},u=[{value:"Funding Opportunities Overview",id:"funding-opportunities-overview",level:2},{value:"Funding FAQ",id:"funding-faq",level:2}];function p(e){const t={a:"a",admonition:"admonition",em:"em",h2:"h2",li:"li",mermaid:"mermaid",ol:"ol",p:"p",...(0,o.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(a.A,{message:"For fundraising in a decentralized, transparent, and regulatory compliant manner within the ecosystem, check out the [Polimec parachain](https://www.polimec.org/)."}),"\n",(0,i.jsx)(t.admonition,{type:"tip",children:(0,i.jsxs)(t.p,{children:["Check out the ",(0,i.jsx)(t.a,{href:"programs-index",children:"programs"})," for numerous ecosystem support opportunities."]})}),"\n",(0,i.jsx)(s.A,{}),"\n",(0,i.jsxs)(t.p,{children:["If you are certain you want to apply for a W3F grant, head straight to the\n",(0,i.jsx)(t.a,{href:"https://grants.web3.foundation/docs/Process/how-to-apply",children:"application process documentation"}),".\nAlternatively, the flowchart below outlines where we think the grants program fits in relation to\nother popular funding opportunities. For a longer list and a description of the programs listed\nbelow, check out\n",(0,i.jsx)(t.a,{href:"/docs/grants#alternative-funding-sources",children:"the page on alternative funding opportunities"}),"."]}),"\n",(0,i.jsx)(t.h2,{id:"funding-opportunities-overview",children:"Funding Opportunities Overview"}),"\n",(0,i.jsx)(t.mermaid,{value:'flowchart LR\n A(Project Focus)\n A --\x3e|Development| B[Stage of Development]\n A --\x3e|Research| C[Grants Program]\n A --\x3e|Other| D[Business model exists]\n B --\x3e|Existing POC| E[Treasury]\n B --\x3e|No POC| F[Grants Program]\n D --\x3e|No|H[Treasury]\n D --\x3e|Yes|J[Venture Capital]\n style C stroke:#e83e8c,stroke-width:2px,stroke-dasharray: 5 5\n style E stroke:#e83e8c,stroke-width:2px,stroke-dasharray: 5 5\n style F stroke:#e83e8c,stroke-width:2px,stroke-dasharray: 5 5\n style H stroke:#e83e8c,stroke-width:2px,stroke-dasharray: 5 5\n style J stroke:#e83e8c,stroke-width:2px,stroke-dasharray: 5 5\n\n click C "https://grants.web3.foundation/docs/Process/how-to-apply" "Apply now"\n click E "https://wiki.polkadot.network/docs/en/learn-polkadot-opengov-treasury" "Submit your Referendum"\n click F "https://grants.web3.foundation/docs/Process/how-to-apply" "Apply now"\n click H "https://wiki.polkadot.network/docs/en/learn-polkadot-opengov-treasury" "https://wiki.polkadot.network/docs/en/learn-polkadot-opengov-treasury" _blank\n click J "https://wiki.polkadot.network/docs/en/ecosystem-funds"'}),"\n",(0,i.jsx)(t.h2,{id:"funding-faq",children:"Funding FAQ"}),"\n",(0,i.jsxs)(t.ol,{children:["\n",(0,i.jsx)(t.li,{children:(0,i.jsx)(t.em,{children:"Will the grant be awarded to those delivering a complete product that everyone in the ecosystem\ncan use?"})}),"\n"]}),"\n",(0,i.jsx)(t.p,{children:"The grant does not necessarily require a finished product. It can be awarded at various stages of a\nproject\u2019s development. The goal is to support ongoing progress, so even partial advancements are\neligible."}),"\n",(0,i.jsxs)(t.ol,{start:"2",children:["\n",(0,i.jsx)(t.li,{children:(0,i.jsxs)(t.em,{children:["After receiving a grant, can a team request funds from the treasury to continue development, or\nwill they be advised to opt for other existing funding options, like\n",(0,i.jsx)(t.a,{href:"https://www.polimec.org/",children:"Polimec"}),"? Is that possible?"]})}),"\n"]}),"\n",(0,i.jsx)(t.p,{children:"Teams can indeed request additional funds from the treasury after the initial grant. The grant is a\ngreat way to demonstrate capability and commitment to the community. Continued support would depend\non community approval, but proving the project\u2019s value through initial funding can help."}),"\n",(0,i.jsxs)(t.ol,{start:"3",children:["\n",(0,i.jsx)(t.li,{children:(0,i.jsx)(t.em,{children:"Since the grant will be awarded in stablecoin, why isn\u2019t the bounty requested in stablecoin?"})}),"\n"]}),"\n",(0,i.jsx)(t.p,{children:"Grants are not awarded in stablecoin. Grant applications are denominated in USD but will be\nconverted to DOT at the time of payment. Currently, it\u2019s not feasible to fund bounties directly with\nstablecoins. However, as this is programmable, we might explore potentially managing multiple assets\nthrough an AH address controlled by curators in the future, similar to the classic setup on the\nrelay chain."}),"\n",(0,i.jsxs)(t.ol,{start:"4",children:["\n",(0,i.jsx)(t.li,{children:(0,i.jsx)(t.em,{children:"Will there be publicity for the bounty? That is, will social media be created where potential\ncandidates can learn about the requirements, steps to participate, and so on?"})}),"\n"]}),"\n",(0,i.jsx)(t.p,{children:"All grant-related information will be available on GitHub for easy access. However, we do not plan a\ndedicated social media presence. Instead, we\u2019ll advertise the bounty individually and rely on word\nof mouth."})]})}function h(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(p,{...e})}):p(e)}},67141:(e,t,n)=>{n.d(t,{A:()=>o});var r=n(96540),i=n(74848);const o=function(e){var t,n=e.message,o=(0,r.useState)(!0),s=o[0],a=o[1];return(0,i.jsx)(i.Fragment,{children:s&&(0,i.jsxs)("div",{className:"message-box",children:[(0,i.jsx)("button",{className:"close-button",onClick:function(){a(!1)},children:"\u2716 "}),(0,i.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(t=n,t.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},3514:(e,t,n)=>{n.d(t,{A:()=>x});n(96540);var r=n(34164),i=n(26972),o=n(28774),s=n(53465),a=n(16654),l=n(21312),c=n(51107);const d={cardContainer:"cardContainer_fWXF",cardTitle:"cardTitle_rnsV",cardDescription:"cardDescription_PWke"};var u=n(74848);function p(e){var t=e.href,n=e.children;return(0,u.jsx)(o.A,{href:t,className:(0,r.A)("card padding--lg",d.cardContainer),children:n})}function h(e){var t=e.href,n=e.icon,i=e.title,o=e.description;return(0,u.jsxs)(p,{href:t,children:[(0,u.jsxs)(c.A,{as:"h2",className:(0,r.A)("text--truncate",d.cardTitle),title:i,children:[n," ",i]}),o&&(0,u.jsx)("p",{className:(0,r.A)("text--truncate",d.cardDescription),title:o,children:o})]})}function m(e){var t,n,r=e.item,o=(0,i.Nr)(r),a=(n=(0,s.W)().selectMessage,function(e){return n(e,(0,l.T)({message:"1 item|{count} items",id:"theme.docs.DocCard.categoryDescription.plurals",description:"The default description for a category card in the generated index about how many items this category includes"},{count:e}))});return o?(0,u.jsx)(h,{href:o,icon:"\ud83d\uddc3\ufe0f",title:r.label,description:null!=(t=r.description)?t:a(r.items.length)}):null}function g(e){var t,n,r=e.item,o=(0,a.A)(r.href)?"\ud83d\udcc4\ufe0f":"\ud83d\udd17",s=(0,i.cC)(null!=(t=r.docId)?t:void 0);return(0,u.jsx)(h,{href:r.href,icon:o,title:r.label,description:null!=(n=r.description)?n:null==s?void 0:s.description})}function f(e){var t=e.item;switch(t.type){case"link":return(0,u.jsx)(g,{item:t});case"category":return(0,u.jsx)(m,{item:t});default:throw new Error("unknown item type "+JSON.stringify(t))}}function w(e){var t=e.className,n=(0,i.$S)();return(0,u.jsx)(x,{items:n.items,className:t})}function x(e){var t=e.items,n=e.className;if(!t)return(0,u.jsx)(w,Object.assign({},e));var o=(0,i.d1)(t);return(0,u.jsx)("section",{className:(0,r.A)("row",n),children:o.map((function(e,t){return(0,u.jsx)("article",{className:"col col--6 margin-bottom--lg",children:(0,u.jsx)(f,{item:e})},t)}))})}},53465:(e,t,n)=>{n.d(t,{W:()=>c});var r=n(96540),i=n(44586),o=["zero","one","two","few","many","other"];function s(e){return o.filter((function(t){return e.includes(t)}))}var a={locale:"en",pluralForms:s(["one","other"]),select:function(e){return 1===e?"one":"other"}};function l(){var e=(0,i.A)().i18n.currentLocale;return(0,r.useMemo)((function(){try{return t=e,n=new Intl.PluralRules(t),{locale:t,pluralForms:s(n.resolvedOptions().pluralCategories),select:function(e){return n.select(e)}}}catch(r){return console.error('Failed to use Intl.PluralRules for locale "'+e+'".\nDocusaurus will fallback to the default (English) implementation.\nError: '+r.message+"\n"),a}var t,n}),[e])}function c(){var e=l();return{selectMessage:function(t,n){return function(e,t,n){var r=e.split("|");if(1===r.length)return r[0];r.length>n.pluralForms.length&&console.error("For locale="+n.locale+", a maximum of "+n.pluralForms.length+" plural forms are expected ("+n.pluralForms.join(",")+"), but the message contains "+r.length+": "+e);var i=n.select(t),o=n.pluralForms.indexOf(i);return r[Math.min(o,r.length-1)]}(n,t,e)}}}},28453:(e,t,n)=>{n.d(t,{R:()=>s,x:()=>a});var r=n(96540);const i={},o=r.createContext(i);function s(e){const t=r.useContext(o);return r.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:s(e.components),r.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/daaf1ab4.aba70d99.js b/assets/js/daaf1ab4.aba70d99.js deleted file mode 100644 index 0be8de71a826..000000000000 --- a/assets/js/daaf1ab4.aba70d99.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8215],{63523:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>l,default:()=>h,frontMatter:()=>a,metadata:()=>c,toc:()=>u});var r=n(74848),i=n(28453),o=n(3514),s=n(67141);const a={id:"funding",title:"Funding Opportunities",sidebar_label:"Funding",description:"An Overview of Funding Opportunities within the Polkadot Ecosystem.",keywords:["funding","grants","decentralized futures","treasury","bounties"],slug:"../funding"},l=void 0,c={id:"general/funding",title:"Funding Opportunities",description:"An Overview of Funding Opportunities within the Polkadot Ecosystem.",source:"@site/../docs/general/funding.md",sourceDirName:"general",slug:"/funding",permalink:"/docs/funding",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/funding.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1728896963e3,frontMatter:{id:"funding",title:"Funding Opportunities",sidebar_label:"Funding",description:"An Overview of Funding Opportunities within the Polkadot Ecosystem.",keywords:["funding","grants","decentralized futures","treasury","bounties"],slug:"../funding"},sidebar:"docs",previous:{title:"Contributors",permalink:"/docs/contributors"},next:{title:"Grants",permalink:"/docs/grants"}},d={},u=[{value:"Funding Opportunities Overview",id:"funding-opportunities-overview",level:2},{value:"Funding FAQ",id:"funding-faq",level:2}];function p(e){const t={a:"a",admonition:"admonition",em:"em",h2:"h2",li:"li",mermaid:"mermaid",ol:"ol",p:"p",...(0,i.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.A,{message:"For fundraising in a decentralized, transparent, and regulatory compliant manner within the ecosystem, check out the [Polimec parachain](https://www.polimec.org/)."}),"\n",(0,r.jsx)(t.admonition,{type:"tip",children:(0,r.jsxs)(t.p,{children:["Check out the ",(0,r.jsx)(t.a,{href:"programs-index",children:"programs"})," for numerous ecosystem support opportunities."]})}),"\n",(0,r.jsx)(o.A,{}),"\n",(0,r.jsxs)(t.p,{children:["If you are certain you want to apply for a W3F grant, head straight to the\n",(0,r.jsx)(t.a,{href:"https://grants.web3.foundation/docs/Process/how-to-apply",children:"application process documentation"}),".\nAlternatively, the flowchart below outlines where we think the grants program fits in relation to\nother popular funding opportunities. For a longer list and a description of the programs listed\nbelow, check out\n",(0,r.jsx)(t.a,{href:"/docs/grants#alternative-funding-sources",children:"the page on alternative funding opportunities"}),"."]}),"\n",(0,r.jsx)(t.h2,{id:"funding-opportunities-overview",children:"Funding Opportunities Overview"}),"\n",(0,r.jsx)(t.mermaid,{value:'flowchart LR\n A(Project Focus)\n A --\x3e|Development| B[Stage of Development]\n A --\x3e|Research| C[Grants Program]\n A --\x3e|Other| D[Business model exists]\n B --\x3e|Existing POC| E[Treasury]\n B --\x3e|No POC| F[Grants Program]\n D --\x3e|No|H[Treasury]\n D --\x3e|Yes|J[Venture Capital]\n style C stroke:#e83e8c,stroke-width:2px,stroke-dasharray: 5 5\n style E stroke:#e83e8c,stroke-width:2px,stroke-dasharray: 5 5\n style F stroke:#e83e8c,stroke-width:2px,stroke-dasharray: 5 5\n style H stroke:#e83e8c,stroke-width:2px,stroke-dasharray: 5 5\n style J stroke:#e83e8c,stroke-width:2px,stroke-dasharray: 5 5\n\n click C "https://grants.web3.foundation/docs/Process/how-to-apply" "Apply now"\n click E "https://wiki.polkadot.network/docs/en/learn-polkadot-opengov-treasury" "Submit your Referendum"\n click F "https://grants.web3.foundation/docs/Process/how-to-apply" "Apply now"\n click H "https://wiki.polkadot.network/docs/en/learn-polkadot-opengov-treasury" "https://wiki.polkadot.network/docs/en/learn-polkadot-opengov-treasury" _blank\n click J "https://wiki.polkadot.network/docs/en/ecosystem-funds"'}),"\n",(0,r.jsx)(t.h2,{id:"funding-faq",children:"Funding FAQ"}),"\n",(0,r.jsxs)(t.ol,{children:["\n",(0,r.jsx)(t.li,{children:(0,r.jsx)(t.em,{children:"Will the grant be awarded to those delivering a complete product that everyone in the ecosystem\ncan use?"})}),"\n"]}),"\n",(0,r.jsx)(t.p,{children:"The grant does not necessarily require a finished product. It can be awarded at various stages of a\nproject\u2019s development. The goal is to support ongoing progress, so even partial advancements are\neligible."}),"\n",(0,r.jsxs)(t.ol,{start:"2",children:["\n",(0,r.jsx)(t.li,{children:(0,r.jsxs)(t.em,{children:["After receiving a grant, can a team request funds from the treasury to continue development, or\nwill they be advised to opt for other existing funding options, like\n",(0,r.jsx)(t.a,{href:"https://www.polimec.org/",children:"Polimec"}),"? Is that possible?"]})}),"\n"]}),"\n",(0,r.jsx)(t.p,{children:"Teams can indeed request additional funds from the treasury after the initial grant. The grant is a\ngreat way to demonstrate capability and commitment to the community. Continued support would depend\non community approval, but proving the project\u2019s value through initial funding can help."}),"\n",(0,r.jsxs)(t.ol,{start:"3",children:["\n",(0,r.jsx)(t.li,{children:(0,r.jsx)(t.em,{children:"Since the grant will be awarded in stablecoin, why isn\u2019t the bounty requested in stablecoin?"})}),"\n"]}),"\n",(0,r.jsx)(t.p,{children:"Grants are not awarded in stablecoin. Grant applications are denominated in USD but will be\nconverted to DOT at the time of payment. Currently, it\u2019s not feasible to fund bounties directly with\nstablecoins. However, as this is programmable, we might explore potentially managing multiple assets\nthrough an AH address controlled by curators in the future, similar to the classic setup on the\nrelay chain."}),"\n",(0,r.jsxs)(t.ol,{start:"4",children:["\n",(0,r.jsx)(t.li,{children:(0,r.jsx)(t.em,{children:"Will there be publicity for the bounty? That is, will social media be created where potential\ncandidates can learn about the requirements, steps to participate, and so on?"})}),"\n"]}),"\n",(0,r.jsx)(t.p,{children:"All grant-related information will be available on GitHub for easy access. However, we do not plan a\ndedicated social media presence. Instead, we\u2019ll advertise the bounty individually and rely on word\nof mouth."})]})}function h(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(p,{...e})}):p(e)}},67141:(e,t,n)=>{n.d(t,{A:()=>o});var r=n(96540),i=n(74848);const o=function(e){var t,n=e.message,o=(0,r.useState)(!0),s=o[0],a=o[1];return(0,i.jsx)(i.Fragment,{children:s&&(0,i.jsxs)("div",{className:"message-box",children:[(0,i.jsx)("button",{className:"close-button",onClick:function(){a(!1)},children:"\u2716 "}),(0,i.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(t=n,t.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},3514:(e,t,n)=>{n.d(t,{A:()=>x});n(96540);var r=n(34164),i=n(26972),o=n(28774),s=n(53465),a=n(16654),l=n(21312),c=n(51107);const d={cardContainer:"cardContainer_fWXF",cardTitle:"cardTitle_rnsV",cardDescription:"cardDescription_PWke"};var u=n(74848);function p(e){var t=e.href,n=e.children;return(0,u.jsx)(o.A,{href:t,className:(0,r.A)("card padding--lg",d.cardContainer),children:n})}function h(e){var t=e.href,n=e.icon,i=e.title,o=e.description;return(0,u.jsxs)(p,{href:t,children:[(0,u.jsxs)(c.A,{as:"h2",className:(0,r.A)("text--truncate",d.cardTitle),title:i,children:[n," ",i]}),o&&(0,u.jsx)("p",{className:(0,r.A)("text--truncate",d.cardDescription),title:o,children:o})]})}function m(e){var t,n,r=e.item,o=(0,i.Nr)(r),a=(n=(0,s.W)().selectMessage,function(e){return n(e,(0,l.T)({message:"1 item|{count} items",id:"theme.docs.DocCard.categoryDescription.plurals",description:"The default description for a category card in the generated index about how many items this category includes"},{count:e}))});return o?(0,u.jsx)(h,{href:o,icon:"\ud83d\uddc3\ufe0f",title:r.label,description:null!=(t=r.description)?t:a(r.items.length)}):null}function g(e){var t,n,r=e.item,o=(0,a.A)(r.href)?"\ud83d\udcc4\ufe0f":"\ud83d\udd17",s=(0,i.cC)(null!=(t=r.docId)?t:void 0);return(0,u.jsx)(h,{href:r.href,icon:o,title:r.label,description:null!=(n=r.description)?n:null==s?void 0:s.description})}function f(e){var t=e.item;switch(t.type){case"link":return(0,u.jsx)(g,{item:t});case"category":return(0,u.jsx)(m,{item:t});default:throw new Error("unknown item type "+JSON.stringify(t))}}function w(e){var t=e.className,n=(0,i.$S)();return(0,u.jsx)(x,{items:n.items,className:t})}function x(e){var t=e.items,n=e.className;if(!t)return(0,u.jsx)(w,Object.assign({},e));var o=(0,i.d1)(t);return(0,u.jsx)("section",{className:(0,r.A)("row",n),children:o.map((function(e,t){return(0,u.jsx)("article",{className:"col col--6 margin-bottom--lg",children:(0,u.jsx)(f,{item:e})},t)}))})}},53465:(e,t,n)=>{n.d(t,{W:()=>c});var r=n(96540),i=n(44586),o=["zero","one","two","few","many","other"];function s(e){return o.filter((function(t){return e.includes(t)}))}var a={locale:"en",pluralForms:s(["one","other"]),select:function(e){return 1===e?"one":"other"}};function l(){var e=(0,i.A)().i18n.currentLocale;return(0,r.useMemo)((function(){try{return t=e,n=new Intl.PluralRules(t),{locale:t,pluralForms:s(n.resolvedOptions().pluralCategories),select:function(e){return n.select(e)}}}catch(r){return console.error('Failed to use Intl.PluralRules for locale "'+e+'".\nDocusaurus will fallback to the default (English) implementation.\nError: '+r.message+"\n"),a}var t,n}),[e])}function c(){var e=l();return{selectMessage:function(t,n){return function(e,t,n){var r=e.split("|");if(1===r.length)return r[0];r.length>n.pluralForms.length&&console.error("For locale="+n.locale+", a maximum of "+n.pluralForms.length+" plural forms are expected ("+n.pluralForms.join(",")+"), but the message contains "+r.length+": "+e);var i=n.select(t),o=n.pluralForms.indexOf(i);return r[Math.min(o,r.length-1)]}(n,t,e)}}}},28453:(e,t,n)=>{n.d(t,{R:()=>s,x:()=>a});var r=n(96540);const i={},o=r.createContext(i);function s(e){const t=r.useContext(o);return r.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:s(e.components),r.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/db039c7f.55429f53.js b/assets/js/db039c7f.55429f53.js deleted file mode 100644 index b1457c2f7c37..000000000000 --- a/assets/js/db039c7f.55429f53.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2481],{40176:(e,t,o)=>{o.r(t),o.d(t,{assets:()=>c,contentTitle:()=>a,default:()=>m,frontMatter:()=>r,metadata:()=>i,toc:()=>l});var s=o(74848),n=o(28453);const r={id:"learn-xcm-docs-overview-format",title:"XCM is a Format, not a Protocol",sidebar_label:"A Format, not a Protocol",description:"XCM is a Format, not a Protocol.",keywords:["xcm","cross-consensus messaging","format"],slug:"../overview-format"},a="A Format, Not a Protocol",i={id:"learn/xcm/overview/learn-xcm-docs-overview-format",title:"XCM is a Format, not a Protocol",description:"XCM is a Format, not a Protocol.",source:"@site/../docs/learn/xcm/overview/format.md",sourceDirName:"learn/xcm/overview",slug:"/learn/xcm/overview-format",permalink:"/docs/learn/xcm/overview-format",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/xcm/overview/format.md",tags:[],version:"current",lastUpdatedBy:"Radha",lastUpdatedAt:1694074887e3,frontMatter:{id:"learn-xcm-docs-overview-format",title:"XCM is a Format, not a Protocol",sidebar_label:"A Format, not a Protocol",description:"XCM is a Format, not a Protocol.",keywords:["xcm","cross-consensus messaging","format"],slug:"../overview-format"},sidebar:"docs",previous:{title:"Introduction",permalink:"/docs/learn/xcm/overview-intro"},next:{title:"The XCVM",permalink:"/docs/learn/xcm/overview-xcvm"}},c={},l=[];function d(e){const t={a:"a",h1:"h1",header:"header",p:"p",...(0,n.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.header,{children:(0,s.jsx)(t.h1,{id:"a-format-not-a-protocol",children:"A Format, Not a Protocol"})}),"\n",(0,s.jsxs)(t.p,{children:["It's essential to understand that XCM is a format, not a protocol. It describes how messages should\nbe structured and contains instructions that convey on-chain actions that the message intends to\nperform. However, XCM does not dictate how messages are delivered. That responsibility falls on\n",(0,s.jsx)(t.a,{href:"https://wiki.polkadot.network/docs/learn-xcm-transport",children:"transport layer protocols"})," such as XCMP\n(Cross Chain Message Passing) and VMP (Vertical Message Passing) in the Polkadot ecosystem, or\nbridging protocols."]}),"\n",(0,s.jsx)(t.p,{children:"This separation of concerns is useful, since it allows us to think of the interactions we want to\nbuild between systems without having to think about how the messages involved are actually routed."}),"\n",(0,s.jsx)(t.p,{children:"Not every system is expected to be able to interpret any possible XCM. Some messages will not have\nreasonable interpretations under some systems or will be intentionally unsupported. For example,\nsome consensus systems won't deal with NFTs, and that's okay. Instructions that relate to NFTs will\nhave valid interpretations on some systems but not on others."}),"\n",(0,s.jsx)(t.p,{children:"Furthermore, XCMs by themselves are not considered on-chain transactions: XCM describes how to\nchange the state of the target consensus system, but the message by itself does not perform state\nchanges. XCM communicates intentions; the actual interpretation and behaviour of each instruction in\nan XCM is defined by target's XCVM implementation."}),"\n",(0,s.jsx)(t.p,{children:"Both simple and more complex scenarios can be expressed, and developers are encouraged to design and\nimplement diverse cross-consensus communication solutions."})]})}function m(e={}){const{wrapper:t}={...(0,n.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},28453:(e,t,o)=>{o.d(t,{R:()=>a,x:()=>i});var s=o(96540);const n={},r=s.createContext(n);function a(e){const t=s.useContext(r);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:a(e.components),s.createElement(r.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/db039c7f.dab2de43.js b/assets/js/db039c7f.dab2de43.js new file mode 100644 index 000000000000..5be1e908b34a --- /dev/null +++ b/assets/js/db039c7f.dab2de43.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2481],{685:(e,t,o)=>{o.r(t),o.d(t,{assets:()=>c,contentTitle:()=>i,default:()=>m,frontMatter:()=>a,metadata:()=>s,toc:()=>l});const s=JSON.parse('{"id":"learn/xcm/overview/learn-xcm-docs-overview-format","title":"XCM is a Format, not a Protocol","description":"XCM is a Format, not a Protocol.","source":"@site/../docs/learn/xcm/overview/format.md","sourceDirName":"learn/xcm/overview","slug":"/learn/xcm/overview-format","permalink":"/docs/learn/xcm/overview-format","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/xcm/overview/format.md","tags":[],"version":"current","lastUpdatedBy":"Radha","lastUpdatedAt":1694074887000,"frontMatter":{"id":"learn-xcm-docs-overview-format","title":"XCM is a Format, not a Protocol","sidebar_label":"A Format, not a Protocol","description":"XCM is a Format, not a Protocol.","keywords":["xcm","cross-consensus messaging","format"],"slug":"../overview-format"},"sidebar":"docs","previous":{"title":"Introduction","permalink":"/docs/learn/xcm/overview-intro"},"next":{"title":"The XCVM","permalink":"/docs/learn/xcm/overview-xcvm"}}');var n=o(74848),r=o(28453);const a={id:"learn-xcm-docs-overview-format",title:"XCM is a Format, not a Protocol",sidebar_label:"A Format, not a Protocol",description:"XCM is a Format, not a Protocol.",keywords:["xcm","cross-consensus messaging","format"],slug:"../overview-format"},i="A Format, Not a Protocol",c={},l=[];function d(e){const t={a:"a",h1:"h1",header:"header",p:"p",...(0,r.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.header,{children:(0,n.jsx)(t.h1,{id:"a-format-not-a-protocol",children:"A Format, Not a Protocol"})}),"\n",(0,n.jsxs)(t.p,{children:["It's essential to understand that XCM is a format, not a protocol. It describes how messages should\nbe structured and contains instructions that convey on-chain actions that the message intends to\nperform. However, XCM does not dictate how messages are delivered. That responsibility falls on\n",(0,n.jsx)(t.a,{href:"https://wiki.polkadot.network/docs/learn-xcm-transport",children:"transport layer protocols"})," such as XCMP\n(Cross Chain Message Passing) and VMP (Vertical Message Passing) in the Polkadot ecosystem, or\nbridging protocols."]}),"\n",(0,n.jsx)(t.p,{children:"This separation of concerns is useful, since it allows us to think of the interactions we want to\nbuild between systems without having to think about how the messages involved are actually routed."}),"\n",(0,n.jsx)(t.p,{children:"Not every system is expected to be able to interpret any possible XCM. Some messages will not have\nreasonable interpretations under some systems or will be intentionally unsupported. For example,\nsome consensus systems won't deal with NFTs, and that's okay. Instructions that relate to NFTs will\nhave valid interpretations on some systems but not on others."}),"\n",(0,n.jsx)(t.p,{children:"Furthermore, XCMs by themselves are not considered on-chain transactions: XCM describes how to\nchange the state of the target consensus system, but the message by itself does not perform state\nchanges. XCM communicates intentions; the actual interpretation and behaviour of each instruction in\nan XCM is defined by target's XCVM implementation."}),"\n",(0,n.jsx)(t.p,{children:"Both simple and more complex scenarios can be expressed, and developers are encouraged to design and\nimplement diverse cross-consensus communication solutions."})]})}function m(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(d,{...e})}):d(e)}},28453:(e,t,o)=>{o.d(t,{R:()=>a,x:()=>i});var s=o(96540);const n={},r=s.createContext(n);function a(e){const t=s.useContext(r);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:a(e.components),s.createElement(r.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/db3d6c4d.1e0280c3.js b/assets/js/db3d6c4d.1e0280c3.js deleted file mode 100644 index edc5b532fbd8..000000000000 --- a/assets/js/db3d6c4d.1e0280c3.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7845],{19113:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>r,contentTitle:()=>s,default:()=>h,frontMatter:()=>o,metadata:()=>c,toc:()=>l});var a=n(74848),i=n(28453);const o={id:"learn-account-abstraction",title:"Polkadot's Account Abstraction",sidebar_label:"Account Abstraction",description:"Polkadot's Native Account Abstraction.",keywords:["account","polkadot account","account abstraction","proxy","multisig","batch"],slug:"../learn-account-abstraction"},s=void 0,c={id:"learn/learn-account-abstraction",title:"Polkadot's Account Abstraction",description:"Polkadot's Native Account Abstraction.",source:"@site/../docs/learn/learn-account-abstraction.md",sourceDirName:"learn",slug:"/learn-account-abstraction",permalink:"/docs/learn-account-abstraction",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-account-abstraction.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1726731604e3,frontMatter:{id:"learn-account-abstraction",title:"Polkadot's Account Abstraction",sidebar_label:"Account Abstraction",description:"Polkadot's Native Account Abstraction.",keywords:["account","polkadot account","account abstraction","proxy","multisig","batch"],slug:"../learn-account-abstraction"},sidebar:"docs",previous:{title:"Account Balances",permalink:"/docs/learn-account-balances"},next:{title:"Account Identity",permalink:"/docs/learn-identity"}},r={},l=[{value:"Your Keys, Your Responsibility",id:"your-keys-your-responsibility",level:2},{value:"Definition of Account Abstraction",id:"definition-of-account-abstraction",level:2},{value:"Origin Abstraction in Polkadot",id:"origin-abstraction-in-polkadot",level:2},{value:"Protocol-level Account Abstraction",id:"protocol-level-account-abstraction",level:3},{value:"Smart-contract Level Account Abstraction",id:"smart-contract-level-account-abstraction",level:3},{value:"Further Readings",id:"further-readings",level:2}];function d(e){const t={a:"a",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",ul:"ul",...(0,i.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(t.h2,{id:"your-keys-your-responsibility",children:"Your Keys, Your Responsibility"}),"\n",(0,a.jsxs)(t.p,{children:["Account abstraction addresses the challenges of managing cryptographic keys representing accounts on\nblockchains. Accounts on blockchains represent entities, from an individual's identity to an\ninstitution. In ",(0,a.jsx)(t.a,{href:"/docs/web3-and-polkadot",children:"Web3"}),", you digitally sign any transaction or, more\ngenerally, any message using your private key. Data is recorded on a public ledger (usually\nblockchain-based) whose multiple copies of it are stored in computers participating in a P2P\nnetwork."]}),"\n",(0,a.jsx)(t.p,{children:"While the account\u2019s private keys grant users control and ownership, losing them results in losing\naccess to digital assets and fragmentation of your digital identity since you will need to create a\nnew account with a new set of keys. This poses a hurdle for both users and developers regarding\nsecurity and adoption."}),"\n",(0,a.jsx)(t.h2,{id:"definition-of-account-abstraction",children:"Definition of Account Abstraction"}),"\n",(0,a.jsxs)(t.p,{children:["The concept of account ",(0,a.jsx)(t.em,{children:"abstraction"})," was first mentioned via Ethereum's\n",(0,a.jsx)(t.a,{href:"https://eips.ethereum.org/EIPS/eip-4337",children:"EIP-4337"})," focused on allowing users to flexibly program\nmore security and better user experiences into their accounts. The idea also aims to separate the\nuser experience from the private key, enabling a piece of code to dictate account behavior. This\nallows for increased flexibility of accounts that originally were not engineered to be flexible and\ndecreased chances of key mismanagement."]}),"\n",(0,a.jsx)(t.p,{children:"Users are still responsible for their keys, but through account abstraction, they can take\nprecautions to ensure they do not end up losing their accounts."}),"\n",(0,a.jsx)(t.p,{children:"Account abstraction introduces a layer of on-chain logic that controls an account, typically in the\nform of a smart contract, that completely avoids the need for consensus-layer protocol changes.\nWithout a smart contract, abstracting accounts would require changes in the core architecture of the\nprotocol."}),"\n",(0,a.jsx)(t.p,{children:"Polkadot's generic codebase makes the concept of an account natively flexible and abstract without\nthe direct need for smart contracts."}),"\n",(0,a.jsx)(t.h2,{id:"origin-abstraction-in-polkadot",children:"Origin Abstraction in Polkadot"}),"\n",(0,a.jsxs)(t.p,{children:["Adopting a generic design is crucial in scaling ",(0,a.jsx)(t.a,{href:"/docs/web3-and-polkadot",children:"Web3"}),"\ntechnologies. Abstraction and generalization of protocols are essential to improving user experience\nand security in blockchain adoption."]}),"\n",(0,a.jsxs)(t.p,{children:["When users interact with a blockchain they call ",(0,a.jsx)(t.em,{children:"dispatchable"})," functions to do something. Because\nthose functions are called from the outside of the blockchain interface, in Polkadot's terms any\naction that involves a dispatchable function is an ",(0,a.jsx)(t.a,{href:"/docs/learn-transactions",children:"extrinsic"}),". Extrinsics\nare calls coming from the ",(0,a.jsx)(t.em,{children:"outside"})," of the blockchain interface that (if successfully executed)\ninvoke some changes in the ",(0,a.jsx)(t.em,{children:"inside"})," of the blockchain's state. An extrinsic is always directed to a\nspecific function within a particular ",(0,a.jsx)(t.a,{href:"/docs/glossary#pallet",children:"pallet"}),"."]}),"\n",(0,a.jsxs)(t.p,{children:["For example, the ",(0,a.jsx)(t.code,{children:"balances.transferKeepAlive"})," extrinsic is directed to the ",(0,a.jsx)(t.code,{children:"transferKeepAlive"}),"\nfunction within the ",(0,a.jsx)(t.code,{children:"balances"})," pallet. If successful, the execution of that function will transfer\nfunds between two accounts, changing the balances of those accounts and thus the chain state (as\naccounts hold some state within the blockchain)."]}),"\n",(0,a.jsxs)(t.p,{children:["In ",(0,a.jsx)(t.a,{href:"/docs/glossary#substrate",children:"Substrate"}),"'s FRAME, functions are not necessarily called by\naccounts. Functions can be called by any origin, where origins are caller-personas associated with\nprivilege levels. For example, the Polkadot ",(0,a.jsx)(t.a,{href:"/docs/learn-polkadot-opengov",children:"OpenGov"})," has different\norigins with different privileges, such as allocating treasury funds, cancelling a referendum, etc.\nNeither of those origins is subservient to the concept of an account or assume anything about state\nor associated data. Custom origins can be created while designing your chain using the Substrate\n(which is part of the ",(0,a.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk",children:"Polkadot SDK"}),")."]}),"\n",(0,a.jsxs)(t.p,{children:["The figure below shows Polkadot's origin abstraction. Accounts happen to be just one variant (or\ncorner case) of Substrate's FRAME possible origins, the ",(0,a.jsx)(t.code,{children:"frame_system::RawOrigin::Signed"}),". OpenGov\norigins function in a way that, if conditions (approval and support) are met and a proposal passes,\nthe appropriate\n",(0,a.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/1835c091c42456e8df3ecbf0a94b7b88c395f623/substrate/frame/referenda/src/lib.rs#L884",children:"origin is then associated with the scheduled call"}),".\nThose origins are caller-personas that do not have any entity behind them, and do not hold any state\non chain."]}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"origin-abstraction",src:n(68685).A+"",width:"1920",height:"800"})}),"\n",(0,a.jsx)(t.p,{children:"In Substrate, the concept of account is completely deprioritized. Substrate itself remains\nindifferent to an account's balance and nonce. While FRAME can support their presence, it\nfundamentally does not need to rely on them."}),"\n",(0,a.jsxs)(t.p,{children:["The ",(0,a.jsx)(t.a,{href:"./learn-xcm-index",children:"Cross-Consensus Messaging (XCM)"})," format can take advantage of origin\nabstraction for cross-consensus communications by specifying the context for a particular message.\nOrigins in this case imply the authority under which a message is being sent (and thereby,\nexecuted)."]}),"\n",(0,a.jsx)(t.p,{children:"On a lower level, the XCM format also provides a much powerful origin abstraction that allows\ncalling personas that are so abstract to not necessarily have direct representation on the local\nchain within its FRAME system origin."}),"\n",(0,a.jsx)(t.h3,{id:"protocol-level-account-abstraction",children:"Protocol-level Account Abstraction"}),"\n",(0,a.jsxs)(t.p,{children:["While the ",(0,a.jsx)(t.a,{href:"https://docs.substrate.io/reference/frame-pallets/",children:"Substrate FRAME system"})," does not have\na single pallet (module) for complete account abstraction, it incorporates various pallets that\ncollectively achieve similar functionalities. Polkadot's native account abstraction functionalities\ninclude:"]}),"\n",(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.a,{href:"/docs/learn-account-multisig",children:"Multi-signature accounts"})," to control an account using different ones"]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.a,{href:"/docs/learn-proxies",children:"Proxy accounts"})," for role-based representation, and ownership representation\nthrough ",(0,a.jsx)(t.a,{href:"/docs/learn-proxies#anonymous-proxy-pure-proxy",children:"pure proxies"})]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.a,{href:"/docs/learn-account-advanced#derivation-paths",children:"Derivative accounts"})," for using the same ",(0,a.jsx)(t.em,{children:"parent"}),"\nprivate key on multiple ",(0,a.jsx)(t.em,{children:"children"})," accounts"]}),"\n",(0,a.jsx)(t.li,{children:"Account recovery mechanisms such as social recovery to help regain access to your key using\ntrusted third-party accounts"}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.a,{href:"/docs/learn-guides-transfers#batch-transfers-with-the-polkadot-js-ui",children:"Batching functionality"})," to\nsubmit multiple calls in one single transaction"]}),"\n",(0,a.jsx)(t.li,{children:"Payments with non-native tokens"}),"\n"]}),"\n",(0,a.jsxs)(t.p,{children:["All the above can be used together, meaning that, for example, you can create a multi-signature\naccount of pure proxies to keep the same multi-signature account when signatories change. A more\ncomplex combination to build a hot wallet can be found in this\n",(0,a.jsx)(t.a,{href:"https://www.parity.io/blog/building-a-hot-wallet-with-substrate-primitives/",children:"blog post"}),"."]}),"\n",(0,a.jsx)(t.p,{children:"Additionally, developers have the flexibility to design their own rules for abstraction."}),"\n",(0,a.jsx)(t.p,{children:"In the Substrate FRAME system, accounts are represented by Accounts IDs. Such unique identifiers can\nbe any 32-byte number and are not limited to just a public key (with a corresponding private key).\nFor example, multi-signature accounts do not have a private key, and their Account ID is built with\nhashed information from signatories\u2019 public keys and the multisig threshold."}),"\n",(0,a.jsx)(t.h3,{id:"smart-contract-level-account-abstraction",children:"Smart-contract Level Account Abstraction"}),"\n",(0,a.jsxs)(t.p,{children:["Account abstraction can be implemented in parachains also with traditional smart-contracts for\nexample using the ",(0,a.jsx)(t.a,{href:"/docs/build-smart-contracts#ink",children:"ink!"})," smart contract language."]}),"\n",(0,a.jsx)(t.h2,{id:"further-readings",children:"Further Readings"}),"\n",(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.a,{href:"https://hackernoon.com/abstracting-away-account-abstraction-on-polkadot",children:"Hackernoon Article"})," by\n",(0,a.jsx)(t.a,{href:"/docs/contributors#bader-youssef",children:"Bader Youssef"}),' - "Abstracting Away Account Abstraction\non Polkadot"']}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.a,{href:"https://www.parity.io/blog/building-a-hot-wallet-with-substrate-primitives/",children:"Parity Blog Post"}),' by\nJoe Petrowski - "Building a Hot Wallet with Substrate Primitives"']}),"\n",(0,a.jsx)(t.li,{children:(0,a.jsx)(t.a,{href:"https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/reference_docs/frame_origin/index.html",children:"FRAME Origin - Polkadot-SDK Docs"})}),"\n"]})]})}function h(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,a.jsx)(t,{...e,children:(0,a.jsx)(d,{...e})}):d(e)}},68685:(e,t,n)=>{n.d(t,{A:()=>a});const a=n.p+"assets/images/origin-abstraction-31b6a7245c3537d4be00fc83b037eec8.png"},28453:(e,t,n)=>{n.d(t,{R:()=>s,x:()=>c});var a=n(96540);const i={},o=a.createContext(i);function s(e){const t=a.useContext(o);return a.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function c(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:s(e.components),a.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/db3d6c4d.4871989e.js b/assets/js/db3d6c4d.4871989e.js new file mode 100644 index 000000000000..63679e264b89 --- /dev/null +++ b/assets/js/db3d6c4d.4871989e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7845],{5065:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>r,contentTitle:()=>c,default:()=>h,frontMatter:()=>s,metadata:()=>a,toc:()=>l});const a=JSON.parse('{"id":"learn/learn-account-abstraction","title":"Polkadot\'s Account Abstraction","description":"Polkadot\'s Native Account Abstraction.","source":"@site/../docs/learn/learn-account-abstraction.md","sourceDirName":"learn","slug":"/learn-account-abstraction","permalink":"/docs/learn-account-abstraction","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-account-abstraction.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1726731604000,"frontMatter":{"id":"learn-account-abstraction","title":"Polkadot\'s Account Abstraction","sidebar_label":"Account Abstraction","description":"Polkadot\'s Native Account Abstraction.","keywords":["account","polkadot account","account abstraction","proxy","multisig","batch"],"slug":"../learn-account-abstraction"},"sidebar":"docs","previous":{"title":"Account Balances","permalink":"/docs/learn-account-balances"},"next":{"title":"Account Identity","permalink":"/docs/learn-identity"}}');var i=n(74848),o=n(28453);const s={id:"learn-account-abstraction",title:"Polkadot's Account Abstraction",sidebar_label:"Account Abstraction",description:"Polkadot's Native Account Abstraction.",keywords:["account","polkadot account","account abstraction","proxy","multisig","batch"],slug:"../learn-account-abstraction"},c=void 0,r={},l=[{value:"Your Keys, Your Responsibility",id:"your-keys-your-responsibility",level:2},{value:"Definition of Account Abstraction",id:"definition-of-account-abstraction",level:2},{value:"Origin Abstraction in Polkadot",id:"origin-abstraction-in-polkadot",level:2},{value:"Protocol-level Account Abstraction",id:"protocol-level-account-abstraction",level:3},{value:"Smart-contract Level Account Abstraction",id:"smart-contract-level-account-abstraction",level:3},{value:"Further Readings",id:"further-readings",level:2}];function d(e){const t={a:"a",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",ul:"ul",...(0,o.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.h2,{id:"your-keys-your-responsibility",children:"Your Keys, Your Responsibility"}),"\n",(0,i.jsxs)(t.p,{children:["Account abstraction addresses the challenges of managing cryptographic keys representing accounts on\nblockchains. Accounts on blockchains represent entities, from an individual's identity to an\ninstitution. In ",(0,i.jsx)(t.a,{href:"/docs/web3-and-polkadot",children:"Web3"}),", you digitally sign any transaction or, more\ngenerally, any message using your private key. Data is recorded on a public ledger (usually\nblockchain-based) whose multiple copies of it are stored in computers participating in a P2P\nnetwork."]}),"\n",(0,i.jsx)(t.p,{children:"While the account\u2019s private keys grant users control and ownership, losing them results in losing\naccess to digital assets and fragmentation of your digital identity since you will need to create a\nnew account with a new set of keys. This poses a hurdle for both users and developers regarding\nsecurity and adoption."}),"\n",(0,i.jsx)(t.h2,{id:"definition-of-account-abstraction",children:"Definition of Account Abstraction"}),"\n",(0,i.jsxs)(t.p,{children:["The concept of account ",(0,i.jsx)(t.em,{children:"abstraction"})," was first mentioned via Ethereum's\n",(0,i.jsx)(t.a,{href:"https://eips.ethereum.org/EIPS/eip-4337",children:"EIP-4337"})," focused on allowing users to flexibly program\nmore security and better user experiences into their accounts. The idea also aims to separate the\nuser experience from the private key, enabling a piece of code to dictate account behavior. This\nallows for increased flexibility of accounts that originally were not engineered to be flexible and\ndecreased chances of key mismanagement."]}),"\n",(0,i.jsx)(t.p,{children:"Users are still responsible for their keys, but through account abstraction, they can take\nprecautions to ensure they do not end up losing their accounts."}),"\n",(0,i.jsx)(t.p,{children:"Account abstraction introduces a layer of on-chain logic that controls an account, typically in the\nform of a smart contract, that completely avoids the need for consensus-layer protocol changes.\nWithout a smart contract, abstracting accounts would require changes in the core architecture of the\nprotocol."}),"\n",(0,i.jsx)(t.p,{children:"Polkadot's generic codebase makes the concept of an account natively flexible and abstract without\nthe direct need for smart contracts."}),"\n",(0,i.jsx)(t.h2,{id:"origin-abstraction-in-polkadot",children:"Origin Abstraction in Polkadot"}),"\n",(0,i.jsxs)(t.p,{children:["Adopting a generic design is crucial in scaling ",(0,i.jsx)(t.a,{href:"/docs/web3-and-polkadot",children:"Web3"}),"\ntechnologies. Abstraction and generalization of protocols are essential to improving user experience\nand security in blockchain adoption."]}),"\n",(0,i.jsxs)(t.p,{children:["When users interact with a blockchain they call ",(0,i.jsx)(t.em,{children:"dispatchable"})," functions to do something. Because\nthose functions are called from the outside of the blockchain interface, in Polkadot's terms any\naction that involves a dispatchable function is an ",(0,i.jsx)(t.a,{href:"/docs/learn-transactions",children:"extrinsic"}),". Extrinsics\nare calls coming from the ",(0,i.jsx)(t.em,{children:"outside"})," of the blockchain interface that (if successfully executed)\ninvoke some changes in the ",(0,i.jsx)(t.em,{children:"inside"})," of the blockchain's state. An extrinsic is always directed to a\nspecific function within a particular ",(0,i.jsx)(t.a,{href:"/docs/glossary#pallet",children:"pallet"}),"."]}),"\n",(0,i.jsxs)(t.p,{children:["For example, the ",(0,i.jsx)(t.code,{children:"balances.transferKeepAlive"})," extrinsic is directed to the ",(0,i.jsx)(t.code,{children:"transferKeepAlive"}),"\nfunction within the ",(0,i.jsx)(t.code,{children:"balances"})," pallet. If successful, the execution of that function will transfer\nfunds between two accounts, changing the balances of those accounts and thus the chain state (as\naccounts hold some state within the blockchain)."]}),"\n",(0,i.jsxs)(t.p,{children:["In ",(0,i.jsx)(t.a,{href:"/docs/glossary#substrate",children:"Substrate"}),"'s FRAME, functions are not necessarily called by\naccounts. Functions can be called by any origin, where origins are caller-personas associated with\nprivilege levels. For example, the Polkadot ",(0,i.jsx)(t.a,{href:"/docs/learn-polkadot-opengov",children:"OpenGov"})," has different\norigins with different privileges, such as allocating treasury funds, cancelling a referendum, etc.\nNeither of those origins is subservient to the concept of an account or assume anything about state\nor associated data. Custom origins can be created while designing your chain using the Substrate\n(which is part of the ",(0,i.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk",children:"Polkadot SDK"}),")."]}),"\n",(0,i.jsxs)(t.p,{children:["The figure below shows Polkadot's origin abstraction. Accounts happen to be just one variant (or\ncorner case) of Substrate's FRAME possible origins, the ",(0,i.jsx)(t.code,{children:"frame_system::RawOrigin::Signed"}),". OpenGov\norigins function in a way that, if conditions (approval and support) are met and a proposal passes,\nthe appropriate\n",(0,i.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/1835c091c42456e8df3ecbf0a94b7b88c395f623/substrate/frame/referenda/src/lib.rs#L884",children:"origin is then associated with the scheduled call"}),".\nThose origins are caller-personas that do not have any entity behind them, and do not hold any state\non chain."]}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"origin-abstraction",src:n(68685).A+"",width:"1920",height:"800"})}),"\n",(0,i.jsx)(t.p,{children:"In Substrate, the concept of account is completely deprioritized. Substrate itself remains\nindifferent to an account's balance and nonce. While FRAME can support their presence, it\nfundamentally does not need to rely on them."}),"\n",(0,i.jsxs)(t.p,{children:["The ",(0,i.jsx)(t.a,{href:"./learn-xcm-index",children:"Cross-Consensus Messaging (XCM)"})," format can take advantage of origin\nabstraction for cross-consensus communications by specifying the context for a particular message.\nOrigins in this case imply the authority under which a message is being sent (and thereby,\nexecuted)."]}),"\n",(0,i.jsx)(t.p,{children:"On a lower level, the XCM format also provides a much powerful origin abstraction that allows\ncalling personas that are so abstract to not necessarily have direct representation on the local\nchain within its FRAME system origin."}),"\n",(0,i.jsx)(t.h3,{id:"protocol-level-account-abstraction",children:"Protocol-level Account Abstraction"}),"\n",(0,i.jsxs)(t.p,{children:["While the ",(0,i.jsx)(t.a,{href:"https://docs.substrate.io/reference/frame-pallets/",children:"Substrate FRAME system"})," does not have\na single pallet (module) for complete account abstraction, it incorporates various pallets that\ncollectively achieve similar functionalities. Polkadot's native account abstraction functionalities\ninclude:"]}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"/docs/learn-account-multisig",children:"Multi-signature accounts"})," to control an account using different ones"]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"/docs/learn-proxies",children:"Proxy accounts"})," for role-based representation, and ownership representation\nthrough ",(0,i.jsx)(t.a,{href:"/docs/learn-proxies#anonymous-proxy-pure-proxy",children:"pure proxies"})]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"/docs/learn-account-advanced#derivation-paths",children:"Derivative accounts"})," for using the same ",(0,i.jsx)(t.em,{children:"parent"}),"\nprivate key on multiple ",(0,i.jsx)(t.em,{children:"children"})," accounts"]}),"\n",(0,i.jsx)(t.li,{children:"Account recovery mechanisms such as social recovery to help regain access to your key using\ntrusted third-party accounts"}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"/docs/learn-guides-transfers#batch-transfers-with-the-polkadot-js-ui",children:"Batching functionality"})," to\nsubmit multiple calls in one single transaction"]}),"\n",(0,i.jsx)(t.li,{children:"Payments with non-native tokens"}),"\n"]}),"\n",(0,i.jsxs)(t.p,{children:["All the above can be used together, meaning that, for example, you can create a multi-signature\naccount of pure proxies to keep the same multi-signature account when signatories change. A more\ncomplex combination to build a hot wallet can be found in this\n",(0,i.jsx)(t.a,{href:"https://www.parity.io/blog/building-a-hot-wallet-with-substrate-primitives/",children:"blog post"}),"."]}),"\n",(0,i.jsx)(t.p,{children:"Additionally, developers have the flexibility to design their own rules for abstraction."}),"\n",(0,i.jsx)(t.p,{children:"In the Substrate FRAME system, accounts are represented by Accounts IDs. Such unique identifiers can\nbe any 32-byte number and are not limited to just a public key (with a corresponding private key).\nFor example, multi-signature accounts do not have a private key, and their Account ID is built with\nhashed information from signatories\u2019 public keys and the multisig threshold."}),"\n",(0,i.jsx)(t.h3,{id:"smart-contract-level-account-abstraction",children:"Smart-contract Level Account Abstraction"}),"\n",(0,i.jsxs)(t.p,{children:["Account abstraction can be implemented in parachains also with traditional smart-contracts for\nexample using the ",(0,i.jsx)(t.a,{href:"/docs/build-smart-contracts#ink",children:"ink!"})," smart contract language."]}),"\n",(0,i.jsx)(t.h2,{id:"further-readings",children:"Further Readings"}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://hackernoon.com/abstracting-away-account-abstraction-on-polkadot",children:"Hackernoon Article"})," by\n",(0,i.jsx)(t.a,{href:"/docs/contributors#bader-youssef",children:"Bader Youssef"}),' - "Abstracting Away Account Abstraction\non Polkadot"']}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://www.parity.io/blog/building-a-hot-wallet-with-substrate-primitives/",children:"Parity Blog Post"}),' by\nJoe Petrowski - "Building a Hot Wallet with Substrate Primitives"']}),"\n",(0,i.jsx)(t.li,{children:(0,i.jsx)(t.a,{href:"https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/reference_docs/frame_origin/index.html",children:"FRAME Origin - Polkadot-SDK Docs"})}),"\n"]})]})}function h(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}},68685:(e,t,n)=>{n.d(t,{A:()=>a});const a=n.p+"assets/images/origin-abstraction-31b6a7245c3537d4be00fc83b037eec8.png"},28453:(e,t,n)=>{n.d(t,{R:()=>s,x:()=>c});var a=n(96540);const i={},o=a.createContext(i);function s(e){const t=a.useContext(o);return a.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function c(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:s(e.components),a.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/db9d4dae.05352fd5.js b/assets/js/db9d4dae.05352fd5.js new file mode 100644 index 000000000000..a416161ef410 --- /dev/null +++ b/assets/js/db9d4dae.05352fd5.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8472],{17907:(e,a,t)=>{t.r(a),t.d(a,{assets:()=>o,contentTitle:()=>d,default:()=>h,frontMatter:()=>r,metadata:()=>s,toc:()=>c});const s=JSON.parse('{"id":"general/dune-analytics/parachain-dashboards/coretime-dashboards","title":"Coretime Dashboards","description":"Coretime is a parachain on Polkadot that focuses on time-stamping and data certification.","source":"@site/../docs/general/dune-analytics/parachain-dashboards/coretime-dashboards.md","sourceDirName":"general/dune-analytics/parachain-dashboards","slug":"/general/dune-analytics/coretime-dashboards","permalink":"/docs/general/dune-analytics/coretime-dashboards","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/parachain-dashboards/coretime-dashboards.md","tags":[],"version":"current","lastUpdatedBy":"MK","lastUpdatedAt":1719215716000,"frontMatter":{"id":"coretime-dashboards","title":"Coretime Dashboards","sidebar_label":"Coretime","description":"Coretime is a parachain on Polkadot that focuses on time-stamping and data certification.","keywords":["polkadot","dashboard","dune","coretime","data certification"],"slug":"../coretime-dashboards"},"sidebar":"docs","previous":{"title":"Collectives","permalink":"/docs/general/dune-analytics/collectives-dashboards"},"next":{"title":"EnergyWebX","permalink":"/docs/general/dune-analytics/energywebx-dashboards"}}');var n=t(74848),i=t(28453);const r={id:"coretime-dashboards",title:"Coretime Dashboards",sidebar_label:"Coretime",description:"Coretime is a parachain on Polkadot that focuses on time-stamping and data certification.",keywords:["polkadot","dashboard","dune","coretime","data certification"],slug:"../coretime-dashboards"},d="Coretime Dashboards",o={},c=[{value:"Overview",id:"overview",level:2},{value:"Featured Dashboards on Dune",id:"featured-dashboards-on-dune",level:2},{value:"Key Tables",id:"key-tables",level:2},{value:"Useful Queries",id:"useful-queries",level:2},{value:"Getting Started with Queries",id:"getting-started-with-queries",level:2}];function l(e){const a={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,i.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(a.header,{children:(0,n.jsx)(a.h1,{id:"coretime-dashboards",children:"Coretime Dashboards"})}),"\n",(0,n.jsx)(a.h2,{id:"overview",children:"Overview"}),"\n",(0,n.jsx)(a.p,{children:"Coretime is a parachain on Polkadot that focuses on time-stamping and data certification, providing\na decentralized and secure mechanism for verifying data integrity."}),"\n",(0,n.jsx)(a.h2,{id:"featured-dashboards-on-dune",children:"Featured Dashboards on Dune"}),"\n",(0,n.jsx)(a.p,{children:"Here you will find a variety of dashboards that help visualize data from the Coretime parachain:"}),"\n",(0,n.jsxs)(a.ul,{children:["\n",(0,n.jsxs)(a.li,{children:[(0,n.jsx)(a.a,{href:"https://dune.com/substrate/coretime",children:"Coretime Dashboard"}),": Explore comprehensive data\nvisualizations related to time-stamping services on Coretime."]}),"\n",(0,n.jsxs)(a.li,{children:[(0,n.jsx)(a.a,{href:"https://dune.com/substrate/kusama-coretime-sales-history",children:"Kusama Coretime Sales History"}),":\nDetailed historical data and trends of sales activities on the Kusama network."]}),"\n"]}),"\n",(0,n.jsxs)(a.p,{children:["Please also visit our dashboards for Coretime on\n",(0,n.jsx)(a.a,{href:"https://dune.com/discover/content/relevant?q=title:Coretime%20author:substrate",children:"Dune Analytics"}),"."]}),"\n",(0,n.jsx)(a.h2,{id:"key-tables",children:"Key Tables"}),"\n",(0,n.jsx)(a.p,{children:"Data from the Coretime parachain is organized into several key tables:"}),"\n",(0,n.jsxs)(a.ul,{children:["\n",(0,n.jsx)(a.li,{children:(0,n.jsx)(a.code,{children:"coretime.balances"})}),"\n",(0,n.jsx)(a.li,{children:(0,n.jsx)(a.code,{children:"coretime.blocks"})}),"\n",(0,n.jsx)(a.li,{children:(0,n.jsx)(a.code,{children:"coretime.calls"})}),"\n",(0,n.jsx)(a.li,{children:(0,n.jsx)(a.code,{children:"coretime.events"})}),"\n",(0,n.jsx)(a.li,{children:(0,n.jsx)(a.code,{children:"coretime.extrinsics"})}),"\n",(0,n.jsx)(a.li,{children:(0,n.jsx)(a.code,{children:"coretime.transfers"})}),"\n"]}),"\n",(0,n.jsxs)(a.p,{children:["Start building your own queries using granular data on Dune\n",(0,n.jsx)(a.a,{href:"https://dune.com/queries?category=canonical&namespace=coretime",children:"here"}),"."]}),"\n",(0,n.jsx)(a.h2,{id:"useful-queries",children:"Useful Queries"}),"\n",(0,n.jsx)(a.p,{children:"Some useful queries for Coretime are provided:"}),"\n",(0,n.jsxs)(a.table,{children:[(0,n.jsx)(a.thead,{children:(0,n.jsxs)(a.tr,{children:[(0,n.jsx)(a.th,{children:"Title"}),(0,n.jsx)(a.th,{children:"Query"}),(0,n.jsx)(a.th,{children:"Description"})]})}),(0,n.jsx)(a.tbody,{children:(0,n.jsxs)(a.tr,{children:[(0,n.jsx)(a.td,{children:"Kusama Coretime Core Statistics"}),(0,n.jsx)(a.td,{children:(0,n.jsx)(a.a,{href:"https://dune.com/queries/3765036",children:"query_3765036"})}),(0,n.jsx)(a.td,{children:"This query provides detailed statistics on Coretime sales activities on the Kusama network, including sale start time, lead-in length, start and regular prices, region details, cores sold, and more."})]})})]}),"\n",(0,n.jsx)(a.h2,{id:"getting-started-with-queries",children:"Getting Started with Queries"}),"\n",(0,n.jsx)(a.p,{children:"To get started with querying data from Unique, you are welcome to use the mentioned materialized\nqueries. You can use the following DuneSQL queries as examples:"}),"\n",(0,n.jsx)(a.pre,{children:(0,n.jsx)(a.code,{className:"language-sql",metastring:'title="Kusama Coretime Core Statistics" showLineNumbers',children:"WITH\n core_sta as (\n SELECT\n block_time,\n get_href (\n 'https://nodle.subscan.io/extrinsic/' || cast(extrinsic_id as VARCHAR),\n extrinsic_id\n ) as extrinsics_url,\n extrinsic_id,\n CAST(JSON_EXTRACT_SCALAR(data, '$[0]') AS BIGINT) as sale_start,\n CAST(JSON_EXTRACT_SCALAR(data, '$[1]') AS BIGINT) as leadin_length,\n CAST(JSON_EXTRACT_SCALAR(data, '$[2]') AS BIGINT) / pow(10, 12) as start_price,\n CAST(JSON_EXTRACT_SCALAR(data, '$[3]') AS BIGINT) / pow(10, 12) as regular_price,\n CAST(JSON_EXTRACT_SCALAR(data, '$[4]') AS BIGINT) as region_begin,\n CAST(JSON_EXTRACT_SCALAR(data, '$[5]') AS BIGINT) as region_end,\n CAST(JSON_EXTRACT_SCALAR(data, '$[6]') AS BIGINT) as ideal_cores_sold,\n CAST(JSON_EXTRACT_SCALAR(data, '$[7]') AS BIGINT) as cores_offered,\n CAST(\n ROW_NUMBER() OVER (\n ORDER BY\n block_time ASC\n ) AS BIGINT\n ) AS sale_round\n FROM\n coretime_kusama.events\n WHERE\n section = 'broker'\n AND method = 'SaleInitialized'\n )\nSELECT\n *,\n get_href (\n 'https://dune.com/substrate/kusama-coretime-sales-history?sale_round=' || cast(sale_round as VARCHAR),\n cast(sale_round as VARCHAR)\n ) as sale_round_url\nFROM\n core_sta\nORDER BY\n block_time DESC\n"})}),"\n",(0,n.jsx)(a.p,{children:"Query result:"}),"\n",(0,n.jsx)("iframe",{src:"https://dune.com/embeds/3765036/6332449/",width:"100%",height:"500px",frameBorder:"0"}),"\n",(0,n.jsx)(a.admonition,{title:"DuneSQL Referece",type:"info",children:(0,n.jsxs)(a.p,{children:["For more information on DuneSQL, please refer to the ",(0,n.jsx)(a.a,{href:"/docs/general/dunesql-cheatsheet",children:"DuneSQL Cheatsheet"}),"\nand\n",(0,n.jsx)(a.a,{href:"https://docs.dune.com/query-engine/Functions-and-operators/index",children:"DuneSQL Official Documentation"}),"."]})})]})}function h(e={}){const{wrapper:a}={...(0,i.R)(),...e.components};return a?(0,n.jsx)(a,{...e,children:(0,n.jsx)(l,{...e})}):l(e)}},28453:(e,a,t)=>{t.d(a,{R:()=>r,x:()=>d});var s=t(96540);const n={},i=s.createContext(n);function r(e){const a=s.useContext(i);return s.useMemo((function(){return"function"==typeof e?e(a):{...a,...e}}),[a,e])}function d(e){let a;return a=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:r(e.components),s.createElement(i.Provider,{value:a},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/db9d4dae.1d30e53d.js b/assets/js/db9d4dae.1d30e53d.js deleted file mode 100644 index f293cdf6f101..000000000000 --- a/assets/js/db9d4dae.1d30e53d.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8472],{47818:(e,a,t)=>{t.r(a),t.d(a,{assets:()=>o,contentTitle:()=>r,default:()=>h,frontMatter:()=>i,metadata:()=>d,toc:()=>c});var n=t(74848),s=t(28453);const i={id:"coretime-dashboards",title:"Coretime Dashboards",sidebar_label:"Coretime",description:"Coretime is a parachain on Polkadot that focuses on time-stamping and data certification.",keywords:["polkadot","dashboard","dune","coretime","data certification"],slug:"../coretime-dashboards"},r="Coretime Dashboards",d={id:"general/dune-analytics/parachain-dashboards/coretime-dashboards",title:"Coretime Dashboards",description:"Coretime is a parachain on Polkadot that focuses on time-stamping and data certification.",source:"@site/../docs/general/dune-analytics/parachain-dashboards/coretime-dashboards.md",sourceDirName:"general/dune-analytics/parachain-dashboards",slug:"/general/dune-analytics/coretime-dashboards",permalink:"/docs/general/dune-analytics/coretime-dashboards",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/parachain-dashboards/coretime-dashboards.md",tags:[],version:"current",lastUpdatedBy:"MK",lastUpdatedAt:1719215716e3,frontMatter:{id:"coretime-dashboards",title:"Coretime Dashboards",sidebar_label:"Coretime",description:"Coretime is a parachain on Polkadot that focuses on time-stamping and data certification.",keywords:["polkadot","dashboard","dune","coretime","data certification"],slug:"../coretime-dashboards"},sidebar:"docs",previous:{title:"Collectives",permalink:"/docs/general/dune-analytics/collectives-dashboards"},next:{title:"EnergyWebX",permalink:"/docs/general/dune-analytics/energywebx-dashboards"}},o={},c=[{value:"Overview",id:"overview",level:2},{value:"Featured Dashboards on Dune",id:"featured-dashboards-on-dune",level:2},{value:"Key Tables",id:"key-tables",level:2},{value:"Useful Queries",id:"useful-queries",level:2},{value:"Getting Started with Queries",id:"getting-started-with-queries",level:2}];function l(e){const a={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,s.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(a.header,{children:(0,n.jsx)(a.h1,{id:"coretime-dashboards",children:"Coretime Dashboards"})}),"\n",(0,n.jsx)(a.h2,{id:"overview",children:"Overview"}),"\n",(0,n.jsx)(a.p,{children:"Coretime is a parachain on Polkadot that focuses on time-stamping and data certification, providing\na decentralized and secure mechanism for verifying data integrity."}),"\n",(0,n.jsx)(a.h2,{id:"featured-dashboards-on-dune",children:"Featured Dashboards on Dune"}),"\n",(0,n.jsx)(a.p,{children:"Here you will find a variety of dashboards that help visualize data from the Coretime parachain:"}),"\n",(0,n.jsxs)(a.ul,{children:["\n",(0,n.jsxs)(a.li,{children:[(0,n.jsx)(a.a,{href:"https://dune.com/substrate/coretime",children:"Coretime Dashboard"}),": Explore comprehensive data\nvisualizations related to time-stamping services on Coretime."]}),"\n",(0,n.jsxs)(a.li,{children:[(0,n.jsx)(a.a,{href:"https://dune.com/substrate/kusama-coretime-sales-history",children:"Kusama Coretime Sales History"}),":\nDetailed historical data and trends of sales activities on the Kusama network."]}),"\n"]}),"\n",(0,n.jsxs)(a.p,{children:["Please also visit our dashboards for Coretime on\n",(0,n.jsx)(a.a,{href:"https://dune.com/discover/content/relevant?q=title:Coretime%20author:substrate",children:"Dune Analytics"}),"."]}),"\n",(0,n.jsx)(a.h2,{id:"key-tables",children:"Key Tables"}),"\n",(0,n.jsx)(a.p,{children:"Data from the Coretime parachain is organized into several key tables:"}),"\n",(0,n.jsxs)(a.ul,{children:["\n",(0,n.jsx)(a.li,{children:(0,n.jsx)(a.code,{children:"coretime.balances"})}),"\n",(0,n.jsx)(a.li,{children:(0,n.jsx)(a.code,{children:"coretime.blocks"})}),"\n",(0,n.jsx)(a.li,{children:(0,n.jsx)(a.code,{children:"coretime.calls"})}),"\n",(0,n.jsx)(a.li,{children:(0,n.jsx)(a.code,{children:"coretime.events"})}),"\n",(0,n.jsx)(a.li,{children:(0,n.jsx)(a.code,{children:"coretime.extrinsics"})}),"\n",(0,n.jsx)(a.li,{children:(0,n.jsx)(a.code,{children:"coretime.transfers"})}),"\n"]}),"\n",(0,n.jsxs)(a.p,{children:["Start building your own queries using granular data on Dune\n",(0,n.jsx)(a.a,{href:"https://dune.com/queries?category=canonical&namespace=coretime",children:"here"}),"."]}),"\n",(0,n.jsx)(a.h2,{id:"useful-queries",children:"Useful Queries"}),"\n",(0,n.jsx)(a.p,{children:"Some useful queries for Coretime are provided:"}),"\n",(0,n.jsxs)(a.table,{children:[(0,n.jsx)(a.thead,{children:(0,n.jsxs)(a.tr,{children:[(0,n.jsx)(a.th,{children:"Title"}),(0,n.jsx)(a.th,{children:"Query"}),(0,n.jsx)(a.th,{children:"Description"})]})}),(0,n.jsx)(a.tbody,{children:(0,n.jsxs)(a.tr,{children:[(0,n.jsx)(a.td,{children:"Kusama Coretime Core Statistics"}),(0,n.jsx)(a.td,{children:(0,n.jsx)(a.a,{href:"https://dune.com/queries/3765036",children:"query_3765036"})}),(0,n.jsx)(a.td,{children:"This query provides detailed statistics on Coretime sales activities on the Kusama network, including sale start time, lead-in length, start and regular prices, region details, cores sold, and more."})]})})]}),"\n",(0,n.jsx)(a.h2,{id:"getting-started-with-queries",children:"Getting Started with Queries"}),"\n",(0,n.jsx)(a.p,{children:"To get started with querying data from Unique, you are welcome to use the mentioned materialized\nqueries. You can use the following DuneSQL queries as examples:"}),"\n",(0,n.jsx)(a.pre,{children:(0,n.jsx)(a.code,{className:"language-sql",metastring:'title="Kusama Coretime Core Statistics" showLineNumbers',children:"WITH\n core_sta as (\n SELECT\n block_time,\n get_href (\n 'https://nodle.subscan.io/extrinsic/' || cast(extrinsic_id as VARCHAR),\n extrinsic_id\n ) as extrinsics_url,\n extrinsic_id,\n CAST(JSON_EXTRACT_SCALAR(data, '$[0]') AS BIGINT) as sale_start,\n CAST(JSON_EXTRACT_SCALAR(data, '$[1]') AS BIGINT) as leadin_length,\n CAST(JSON_EXTRACT_SCALAR(data, '$[2]') AS BIGINT) / pow(10, 12) as start_price,\n CAST(JSON_EXTRACT_SCALAR(data, '$[3]') AS BIGINT) / pow(10, 12) as regular_price,\n CAST(JSON_EXTRACT_SCALAR(data, '$[4]') AS BIGINT) as region_begin,\n CAST(JSON_EXTRACT_SCALAR(data, '$[5]') AS BIGINT) as region_end,\n CAST(JSON_EXTRACT_SCALAR(data, '$[6]') AS BIGINT) as ideal_cores_sold,\n CAST(JSON_EXTRACT_SCALAR(data, '$[7]') AS BIGINT) as cores_offered,\n CAST(\n ROW_NUMBER() OVER (\n ORDER BY\n block_time ASC\n ) AS BIGINT\n ) AS sale_round\n FROM\n coretime_kusama.events\n WHERE\n section = 'broker'\n AND method = 'SaleInitialized'\n )\nSELECT\n *,\n get_href (\n 'https://dune.com/substrate/kusama-coretime-sales-history?sale_round=' || cast(sale_round as VARCHAR),\n cast(sale_round as VARCHAR)\n ) as sale_round_url\nFROM\n core_sta\nORDER BY\n block_time DESC\n"})}),"\n",(0,n.jsx)(a.p,{children:"Query result:"}),"\n",(0,n.jsx)("iframe",{src:"https://dune.com/embeds/3765036/6332449/",width:"100%",height:"500px",frameBorder:"0"}),"\n",(0,n.jsx)(a.admonition,{title:"DuneSQL Referece",type:"info",children:(0,n.jsxs)(a.p,{children:["For more information on DuneSQL, please refer to the ",(0,n.jsx)(a.a,{href:"/docs/general/dunesql-cheatsheet",children:"DuneSQL Cheatsheet"}),"\nand\n",(0,n.jsx)(a.a,{href:"https://docs.dune.com/query-engine/Functions-and-operators/index",children:"DuneSQL Official Documentation"}),"."]})})]})}function h(e={}){const{wrapper:a}={...(0,s.R)(),...e.components};return a?(0,n.jsx)(a,{...e,children:(0,n.jsx)(l,{...e})}):l(e)}},28453:(e,a,t)=>{t.d(a,{R:()=>r,x:()=>d});var n=t(96540);const s={},i=n.createContext(s);function r(e){const a=n.useContext(i);return n.useMemo((function(){return"function"==typeof e?e(a):{...a,...e}}),[a,e])}function d(e){let a;return a=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:r(e.components),n.createElement(i.Provider,{value:a},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/dbbd9e76.55430736.js b/assets/js/dbbd9e76.55430736.js new file mode 100644 index 000000000000..741565b09789 --- /dev/null +++ b/assets/js/dbbd9e76.55430736.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2922],{97626:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>l,contentTitle:()=>r,default:()=>p,frontMatter:()=>d,metadata:()=>n,toc:()=>c});const n=JSON.parse('{"id":"learn/learn-guides-vault","title":"Polkadot-JS Guides about the Vault App","description":"Polkadot-JS Guides about Polkadot Vault.","source":"@site/../docs/learn/learn-guides-vault.md","sourceDirName":"learn","slug":"/learn-guides-vault","permalink":"/docs/learn-guides-vault","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-vault.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1729847256000,"frontMatter":{"id":"learn-guides-vault","title":"Polkadot-JS Guides about the Vault App","sidebar_label":"Polkadot Vault Guides","description":"Polkadot-JS Guides about Polkadot Vault.","keywords":["parity signer","signer","polkadot vault","polkadot-js"],"slug":"../learn-guides-vault"},"sidebar":"docs","previous":{"title":"Ledger Guides","permalink":"/docs/learn-guides-ledger"},"next":{"title":"Asset Hub Guides","permalink":"/docs/learn-guides-assets"}}');var i=a(74848),s=a(28453),o=a(67141);const d={id:"learn-guides-vault",title:"Polkadot-JS Guides about the Vault App",sidebar_label:"Polkadot Vault Guides",description:"Polkadot-JS Guides about Polkadot Vault.",keywords:["parity signer","signer","polkadot vault","polkadot-js"],slug:"../learn-guides-vault"},r=void 0,l={},c=[{value:"Sending a Transfer with the Vault App",id:"sending-a-transfer-with-the-vault-app",level:2},{value:"Import Vault Accounts into Polkadot-JS",id:"import-vault-accounts-into-polkadot-js",level:2},{value:"Do Your Own Chain Spec and Metadata Update",id:"do-your-own-chain-spec-and-metadata-update",level:2},{value:"Chain Specification",id:"chain-specification",level:3},{value:"Chain Spec QR",id:"chain-spec-qr",level:4},{value:"Generating Signature",id:"generating-signature",level:4},{value:"Signing Chain Spec",id:"signing-chain-spec",level:4},{value:"Metadata Updates",id:"metadata-updates",level:3},{value:"Metadata QR Fountain",id:"metadata-qr-fountain",level:4},{value:"Generating Signature",id:"generating-signature-1",level:4},{value:"Signing Metadata",id:"signing-metadata",level:4},{value:"Add Chain & Update Metadata",id:"add-chain--update-metadata",level:3},{value:"Metadata Portal",id:"metadata-portal",level:3},{value:"Modify config File",id:"modify-config-file",level:4},{value:"Rename Chain's Files",id:"rename-chains-files",level:4},{value:"Run Portal",id:"run-portal",level:4}];function h(e){const t={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(o.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the Polkadot-JS UI, you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,i.jsx)(t.admonition,{type:"info",children:(0,i.jsx)(t.p,{children:"These guides apply to both Parity Signer and Polkadot Vault apps."})}),"\n",(0,i.jsx)(t.h2,{id:"sending-a-transfer-with-the-vault-app",children:"Sending a Transfer with the Vault App"}),"\n",(0,i.jsx)(t.admonition,{title:"Verifying Extrinsics",type:"danger",children:(0,i.jsxs)(t.p,{children:["Visit the\n",(0,i.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000179161-how-can-i-verify-what-extrinsic-i-m-signing-#Verify-an-extrinsic-using-Ledger",children:(0,i.jsx)(t.strong,{children:"dedicated support page"})}),"\nand see ",(0,i.jsx)(t.a,{href:"https://youtu.be/bxMs-9fBtFk?t=360",children:(0,i.jsx)(t.strong,{children:"this video tutorial"})})," tutorial to learn about how to\nverify extrinsics before signing them. The video will also mention potential attacks that can happen\nto you while signing for transactions."]})}),"\n",(0,i.jsxs)(t.p,{children:["General instructions to send a transfer can be found on\n",(0,i.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000170304-how-to-send-transfer-funds-out-of-your-dot-account-on-the-polkadot-js-ui",children:"this support page"}),".\nTo sign transactions with the Polkadot Vault app check\n",(0,i.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000182000-how-to-sign-a-transaction-in-parity-signer",children:"this support article"}),"\nor see ",(0,i.jsx)(t.a,{href:"https://youtu.be/gbvrHzr4EDY?t=281",children:"this video tutorial"}),"."]}),"\n",(0,i.jsx)(t.h2,{id:"import-vault-accounts-into-polkadot-js",children:"Import Vault Accounts into Polkadot-JS"}),"\n",(0,i.jsxs)(t.p,{children:["See\n",(0,i.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000184118-polkadot-vault-how-to-add-your-account-on-polkadot-js-ui",children:"this support article"}),"\nto import a Polkadot Vault account into the\n",(0,i.jsx)(t.a,{href:"/docs/polkadotjs#polkadot-js-extension",children:"Polkadot-JS Browser Extension"})," or\n",(0,i.jsx)(t.a,{href:"https://chrome.google.com/webstore/detail/parity-signer-companion/damllfnhhcbmclmjilomenbhkappdjgb",children:"Parity Signer Companion"}),".\nAccounts added to those extensions will be injected into the Polkadot-JS UI."]}),"\n",(0,i.jsx)(t.h2,{id:"do-your-own-chain-spec-and-metadata-update",children:"Do Your Own Chain Spec and Metadata Update"}),"\n",(0,i.jsx)(t.admonition,{title:"This section is for developers and power users only",type:"danger",children:(0,i.jsx)(t.p,{children:"By requesting the chain specification and metadata you trust the specific endpoint you are using\n(unless you are using you own node)."})}),"\n",(0,i.jsxs)(t.p,{children:["The following guide bases on the ",(0,i.jsx)(t.a,{href:"https://github.com/paritytech/parity-signer",children:"Parity Signer"})," Github\npage (to create the Chain Spec QR code and the metadata QR code fountain) and\n",(0,i.jsx)(t.a,{href:"https://github.com/paritytech/metadata-portal",children:"Metadata Portal"})," Github page (to embed the Chain\nSpec and Metadata into a portal)."]}),"\n",(0,i.jsx)(t.h3,{id:"chain-specification",children:"Chain Specification"}),"\n",(0,i.jsx)(t.h4,{id:"chain-spec-qr",children:"Chain Spec QR"}),"\n",(0,i.jsxs)(t.p,{children:["To add more chains on the Vault app you can follow the instructions\n",(0,i.jsx)(t.a,{href:"https://paritytech.github.io/parity-signer/tutorials/Add-New-Network.html#add-network-specs",children:"here"}),".\nIn this example we will add the ",(0,i.jsx)(t.a,{href:"/docs/learn-assets",children:"Asset Hub"})," system parachain. Briefly,\nfork the ",(0,i.jsx)(t.a,{href:"https://github.com/paritytech/parity-signer",children:"Parity Signer GitHub repository"}),", start the\nterminal within the ",(0,i.jsx)(t.code,{children:"/generate_message"})," folder and type the following:"]}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.code,{children:"cargo run add-specs -d -u wss://kusama-asset-hub-rpc.polkadot.io --encryption sr25519"})}),"\n",(0,i.jsxs)(t.p,{children:["where ",(0,i.jsx)(t.code,{children:"wss://kusama-asset.hub-rpc.polkadot.io"})," is the Parity RPC endpoint for the Asset Hub on\nKusama. This will create the file ",(0,i.jsx)(t.code,{children:"sign_me_add_specs_statemine_sr25510"})," under the\n",(0,i.jsx)(t.code,{children:"files/in_progress"})," folder. See all endpoints listed for\n",(0,i.jsx)(t.a,{href:"https://github.com/polkadot-js/apps/blob/089fd77b14169749e35e073a93f7e7276963009c/packages/apps-config/src/endpoints/productionRelayPolkadot.ts",children:"Polkadot"}),"\nand\n",(0,i.jsx)(t.a,{href:"https://github.com/polkadot-js/apps/blob/089fd77b14169749e35e073a93f7e7276963009c/packages/apps-config/src/endpoints/productionRelayKusama.ts",children:"Kusama"}),"\non the Polkadot-JS UI."]}),"\n",(0,i.jsx)(t.h4,{id:"generating-signature",children:"Generating Signature"}),"\n",(0,i.jsx)(t.admonition,{title:"Use a hot account",type:"danger",children:(0,i.jsx)(t.p,{children:"Make sure that the account used to sign the chain specification is a hot account. Never use a cold\naccount from the Vault app or Ledger, as after typing the seed phrase into the terminal that account\nwill be considered hot."})}),"\n",(0,i.jsxs)(t.p,{children:["Start the terminal within the ",(0,i.jsx)(t.code,{children:"files/in_progress"})," folder and type the following:"]}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.code,{children:'cat sign_me_add_specs_statemine_sr25519 | subkey sign --suri "YOUR SEED PHRASE"'})}),"\n",(0,i.jsxs)(t.p,{children:["where ",(0,i.jsx)(t.code,{children:'"YOUR SEED PHRASE"'})," is the seed phrase of the account that will be used to sign and\nauthenticate both the chain spec and later on the metadata. Running the code above will return a\nsignature similar to that below:"]}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.code,{children:"0xc4ce72db959000b6166af96d3bda55a927fd837747bf1bf1ae8a69e57c9ef37c25a88707c47b105a9eb1fbcf9345680eff57eb978cf73919506f6c738834e78a"})}),"\n",(0,i.jsx)(t.h4,{id:"signing-chain-spec",children:"Signing Chain Spec"}),"\n",(0,i.jsxs)(t.p,{children:["Now, go back to the ",(0,i.jsx)(t.code,{children:"/generate_message"})," folder and type the following:"]}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.code,{children:"cargo run --release make --goal qr --crypto sr25519 --msg add-specs --payload sign_me_add_specs_statemine_sr25519 --verifier-hex PUBLIC KEY --signature-hex SIGNATURE"})}),"\n",(0,i.jsxs)(t.p,{children:["where ",(0,i.jsx)(t.code,{children:"PUBLIC KEY"})," is the public key of the account with seed ",(0,i.jsx)(t.code,{children:'"YOUR SEED PHRASE"'}),", and ",(0,i.jsx)(t.code,{children:"SIGNATURE"}),"\nis the signature generated in the previous step. Running the code above will create the file\n",(0,i.jsx)(t.code,{children:"add_specs_statemine-sr25519"})," under the ",(0,i.jsx)(t.code,{children:"files/completed"})," folder."]}),"\n",(0,i.jsx)(t.h3,{id:"metadata-updates",children:"Metadata Updates"}),"\n",(0,i.jsx)(t.p,{children:"Similarly to what we did for the chain specification, we now generate and sign the Asset Hub\nmetadata."}),"\n",(0,i.jsx)(t.h4,{id:"metadata-qr-fountain",children:"Metadata QR Fountain"}),"\n",(0,i.jsxs)(t.p,{children:["To update the chain metadata for the Asset Hub specs on the Vault app you can follow the\ninstructions\n",(0,i.jsx)(t.a,{href:"https://paritytech.github.io/parity-signer/tutorials/Add-New-Network.html#add-network-metadata",children:"here"}),".\nBriefly, in the Parity Signer repository, start the terminal within the ",(0,i.jsx)(t.code,{children:"/generate_message"})," folder\nand type the following:"]}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.code,{children:"cargo run load-metadata -d -u wss://kusama-asset-hub-rpc.polkadot.io"})}),"\n",(0,i.jsxs)(t.p,{children:["where ",(0,i.jsx)(t.code,{children:"wss://kusama-asset-hub-rpc.polkadot.io"})," is the Parity RPC endpoint for the Asset Hub on\nKusama. This will create the file ",(0,i.jsx)(t.code,{children:"sign_me_load_metadata_statemineV9370"})," under the\n",(0,i.jsx)(t.code,{children:"files/in_progress"})," folder. Note that for future metadata updates the file name will change as the\nversion at the time of writing was ",(0,i.jsx)(t.code,{children:"V9370"}),"."]}),"\n",(0,i.jsx)(t.admonition,{type:"info",children:(0,i.jsxs)(t.p,{children:["Note that the name of the file changes according to the network version. That is, ",(0,i.jsx)(t.code,{children:"????"})," in\n",(0,i.jsx)(t.code,{children:"sign_me_load_metadata_statemineV????"})," will be the latest version at fetch time."]})}),"\n",(0,i.jsx)(t.h4,{id:"generating-signature-1",children:"Generating Signature"}),"\n",(0,i.jsx)(t.admonition,{title:"Use a hot account",type:"danger",children:(0,i.jsx)(t.p,{children:"Make sure that the account used to sign the metadata is a hot account. Never use a cold account from\nthe Vault app or Ledger, as after typing the seed phrase into the terminal that account will be\nconsidered hot."})}),"\n",(0,i.jsxs)(t.p,{children:["Start the terminal within the ",(0,i.jsx)(t.code,{children:"files/in_progress"})," folder and type the following:"]}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.code,{children:'cat sign_me_load_metadata_statemineV9370 | subkey sign --suri "YOUR SEED PHRASE"'})}),"\n",(0,i.jsxs)(t.p,{children:["where ",(0,i.jsx)(t.code,{children:'"YOUR SEED PHRASE"'})," is the seed phrase of the account you used to sign the chain\nspecification. Running the code above will return a signature similar to that below:"]}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.code,{children:"0xde1ad7aeb252acb3cf42a522dcc8dc3f317a49be2ed636836dd6df8f7e47135f2c712480055822eba87e9ea5ac7d3bba96045992ae795856fdf4eea09a411f85"})}),"\n",(0,i.jsx)(t.admonition,{title:"Do not copy the code lines above",type:"info",children:(0,i.jsxs)(t.p,{children:["Note that the name of the file changes according to the network version. That is, ",(0,i.jsx)(t.code,{children:"????"})," in\n",(0,i.jsx)(t.code,{children:"sign_me_load_metadata_statemineV????"})," will be the latest version at fetch time. So, do not copy the\ncode line above, but change the version with the appropriate one saved under the ",(0,i.jsx)(t.code,{children:"files/in_progress"}),"\nfolder. The signature changes as well."]})}),"\n",(0,i.jsx)(t.h4,{id:"signing-metadata",children:"Signing Metadata"}),"\n",(0,i.jsxs)(t.p,{children:["Now, go back to the ",(0,i.jsx)(t.code,{children:"/generate_message"})," folder and type the following:"]}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.code,{children:"cargo run --release make --goal qr --crypto sr25519 --msg load-metadata --payload sign_me_load_metadata_statemineV9370 --verifier-hex PUBLIC KEY --signature-hex SIGNATURE"})}),"\n",(0,i.jsxs)(t.p,{children:["where ",(0,i.jsx)(t.code,{children:"PUBLIC KEY"})," is the public key of the account with seed ",(0,i.jsx)(t.code,{children:'"YOUR SEED PHRASE"'}),", and ",(0,i.jsx)(t.code,{children:"SIGNATURE"}),"\nis the signature generated in the previous step. Running the code above will create the file\n",(0,i.jsx)(t.code,{children:"load_metadata_statemineV9370"})," under the ",(0,i.jsx)(t.code,{children:"files/completed"})," folder."]}),"\n",(0,i.jsx)(t.h3,{id:"add-chain--update-metadata",children:"Add Chain & Update Metadata"}),"\n",(0,i.jsxs)(t.p,{children:["You can open ",(0,i.jsx)(t.code,{children:"add_specs_statemine-sr25519"})," on your browser (just drag the file on an open tab). This\nis a .png file containing the QR code to add the Asset Hub chain specification into the Vault App.\nYou can do the same with the ",(0,i.jsx)(t.code,{children:"load_metadata_statemineV9370"}),". This is a .apng file containing the QR\ncode fountain to do the metadata update for the Asset Hub on Kusama."]}),"\n",(0,i.jsx)(t.h3,{id:"metadata-portal",children:"Metadata Portal"}),"\n",(0,i.jsxs)(t.h4,{id:"modify-config-file",children:["Modify ",(0,i.jsx)(t.code,{children:"config"})," File"]}),"\n",(0,i.jsxs)(t.p,{children:["Alternatively, you can add the chain specification QR code and the metadata QR code fountain in a\nmetadata portal. Briefly, fork the\n",(0,i.jsx)(t.a,{href:"https://github.com/paritytech/metadata-portal",children:"Parity's Metadata Portal GitHub repository"}),". You can\nmodify the following fields of the ",(0,i.jsx)(t.code,{children:"config.toml"})," file:"]}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.code,{children:"name"}),": your name / institution"]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.code,{children:"public_key"}),": the public key of the account you use to sign the chain spec and the metadata."]}),"\n",(0,i.jsx)(t.li,{children:"At the bottom of the file add the following information:"}),"\n"]}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{children:'[[chains]]\nname = "Statemine"\ntitle = "Kusama Asset Hub"\nrpc_endpoint = "wss://kusama-asset-hub-rpc.polkadot.io"\ncolor = "#f27230"\n\n[chains.github_release]\nowner = "paritytech"\nrepo = "statemint"\ngenesis_hash = "0x48239ef607d7928874027a43a67689209727dfb3d3dc5e5b03a39bdc2eda771a"\n'})}),"\n",(0,i.jsx)(t.p,{children:"For each additional chain, you need to add the respective information. Information about the genesis\nhash can be found on the Polkadot-JS UI > connect to the relevant chain > Developer > Chain State."}),"\n",(0,i.jsx)(t.h4,{id:"rename-chains-files",children:"Rename Chain's Files"}),"\n",(0,i.jsx)(t.p,{children:"Rename the signed chain specification and metadata files as follow:"}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsxs)(t.li,{children:["\n",(0,i.jsxs)(t.p,{children:["Chain specification: ",(0,i.jsx)(t.code,{children:"add_specs_statemine-sr25519"})," --\x3e ",(0,i.jsx)(t.code,{children:"statemine_specs.png"})]}),"\n"]}),"\n",(0,i.jsxs)(t.li,{children:["\n",(0,i.jsxs)(t.p,{children:["Metadata updates: ",(0,i.jsx)(t.code,{children:"load_metadata_statemineV9370"}),"--\x3e ",(0,i.jsx)(t.code,{children:"statemine_metadata_9370.apng"})]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(t.p,{children:["Thus, for chain specification the file must be renamed to ",(0,i.jsx)(t.code,{children:"chainName_specs.png"})," while for metadata\nthe file must be renamed to ",(0,i.jsx)(t.code,{children:"chainName_metadata_version.apng"})," where ",(0,i.jsx)(t.code,{children:"chainName"})," is the name of the\nchain and ",(0,i.jsx)(t.code,{children:"version"})," is the version of the metadata."]}),"\n",(0,i.jsxs)(t.p,{children:["Add the renamed files to the ",(0,i.jsx)(t.code,{children:"/public/qr folder"})," within the Metadata Portal repository."]}),"\n",(0,i.jsx)(t.h4,{id:"run-portal",children:"Run Portal"}),"\n",(0,i.jsxs)(t.p,{children:["Open the terminal within the Metadata Portal repository and run ",(0,i.jsx)(t.code,{children:"make updater"}),". Then run\n",(0,i.jsx)(t.code,{children:"make collector"}),"; this will create the ",(0,i.jsx)(t.code,{children:"_latest.apng"})," files for each of the chains (removed by the\ncommand ",(0,i.jsx)(t.code,{children:"make cleaner"}),"). Finally, run ",(0,i.jsx)(t.code,{children:"yarn start"})," to load the metadata portal on your localhost."]})]})}function p(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(h,{...e})}):h(e)}},67141:(e,t,a)=>{a.d(t,{A:()=>s});var n=a(96540),i=a(74848);const s=function(e){var t,a=e.message,s=(0,n.useState)(!0),o=s[0],d=s[1];return(0,i.jsx)(i.Fragment,{children:o&&(0,i.jsxs)("div",{className:"message-box",children:[(0,i.jsx)("button",{className:"close-button",onClick:function(){d(!1)},children:"\u2716 "}),(0,i.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(t=a,t.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},28453:(e,t,a)=>{a.d(t,{R:()=>o,x:()=>d});var n=a(96540);const i={},s=n.createContext(i);function o(e){const t=n.useContext(s);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function d(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:o(e.components),n.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/dbbd9e76.ab0bcc20.js b/assets/js/dbbd9e76.ab0bcc20.js deleted file mode 100644 index 12cc84a51abf..000000000000 --- a/assets/js/dbbd9e76.ab0bcc20.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2922],{22123:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>l,contentTitle:()=>d,default:()=>p,frontMatter:()=>o,metadata:()=>r,toc:()=>c});var n=a(74848),i=a(28453),s=a(67141);const o={id:"learn-guides-vault",title:"Polkadot-JS Guides about the Vault App",sidebar_label:"Polkadot Vault Guides",description:"Polkadot-JS Guides about Polkadot Vault.",keywords:["parity signer","signer","polkadot vault","polkadot-js"],slug:"../learn-guides-vault"},d=void 0,r={id:"learn/learn-guides-vault",title:"Polkadot-JS Guides about the Vault App",description:"Polkadot-JS Guides about Polkadot Vault.",source:"@site/../docs/learn/learn-guides-vault.md",sourceDirName:"learn",slug:"/learn-guides-vault",permalink:"/docs/learn-guides-vault",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-vault.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1729847256e3,frontMatter:{id:"learn-guides-vault",title:"Polkadot-JS Guides about the Vault App",sidebar_label:"Polkadot Vault Guides",description:"Polkadot-JS Guides about Polkadot Vault.",keywords:["parity signer","signer","polkadot vault","polkadot-js"],slug:"../learn-guides-vault"},sidebar:"docs",previous:{title:"Ledger Guides",permalink:"/docs/learn-guides-ledger"},next:{title:"Asset Hub Guides",permalink:"/docs/learn-guides-assets"}},l={},c=[{value:"Sending a Transfer with the Vault App",id:"sending-a-transfer-with-the-vault-app",level:2},{value:"Import Vault Accounts into Polkadot-JS",id:"import-vault-accounts-into-polkadot-js",level:2},{value:"Do Your Own Chain Spec and Metadata Update",id:"do-your-own-chain-spec-and-metadata-update",level:2},{value:"Chain Specification",id:"chain-specification",level:3},{value:"Chain Spec QR",id:"chain-spec-qr",level:4},{value:"Generating Signature",id:"generating-signature",level:4},{value:"Signing Chain Spec",id:"signing-chain-spec",level:4},{value:"Metadata Updates",id:"metadata-updates",level:3},{value:"Metadata QR Fountain",id:"metadata-qr-fountain",level:4},{value:"Generating Signature",id:"generating-signature-1",level:4},{value:"Signing Metadata",id:"signing-metadata",level:4},{value:"Add Chain & Update Metadata",id:"add-chain--update-metadata",level:3},{value:"Metadata Portal",id:"metadata-portal",level:3},{value:"Modify config File",id:"modify-config-file",level:4},{value:"Rename Chain's Files",id:"rename-chains-files",level:4},{value:"Run Portal",id:"run-portal",level:4}];function h(e){const t={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the Polkadot-JS UI, you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,n.jsx)(t.admonition,{type:"info",children:(0,n.jsx)(t.p,{children:"These guides apply to both Parity Signer and Polkadot Vault apps."})}),"\n",(0,n.jsx)(t.h2,{id:"sending-a-transfer-with-the-vault-app",children:"Sending a Transfer with the Vault App"}),"\n",(0,n.jsx)(t.admonition,{title:"Verifying Extrinsics",type:"danger",children:(0,n.jsxs)(t.p,{children:["Visit the\n",(0,n.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000179161-how-can-i-verify-what-extrinsic-i-m-signing-#Verify-an-extrinsic-using-Ledger",children:(0,n.jsx)(t.strong,{children:"dedicated support page"})}),"\nand see ",(0,n.jsx)(t.a,{href:"https://youtu.be/bxMs-9fBtFk?t=360",children:(0,n.jsx)(t.strong,{children:"this video tutorial"})})," tutorial to learn about how to\nverify extrinsics before signing them. The video will also mention potential attacks that can happen\nto you while signing for transactions."]})}),"\n",(0,n.jsxs)(t.p,{children:["General instructions to send a transfer can be found on\n",(0,n.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000170304-how-to-send-transfer-funds-out-of-your-dot-account-on-the-polkadot-js-ui",children:"this support page"}),".\nTo sign transactions with the Polkadot Vault app check\n",(0,n.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000182000-how-to-sign-a-transaction-in-parity-signer",children:"this support article"}),"\nor see ",(0,n.jsx)(t.a,{href:"https://youtu.be/gbvrHzr4EDY?t=281",children:"this video tutorial"}),"."]}),"\n",(0,n.jsx)(t.h2,{id:"import-vault-accounts-into-polkadot-js",children:"Import Vault Accounts into Polkadot-JS"}),"\n",(0,n.jsxs)(t.p,{children:["See\n",(0,n.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000184118-polkadot-vault-how-to-add-your-account-on-polkadot-js-ui",children:"this support article"}),"\nto import a Polkadot Vault account into the\n",(0,n.jsx)(t.a,{href:"/docs/polkadotjs#polkadot-js-extension",children:"Polkadot-JS Browser Extension"})," or\n",(0,n.jsx)(t.a,{href:"https://chrome.google.com/webstore/detail/parity-signer-companion/damllfnhhcbmclmjilomenbhkappdjgb",children:"Parity Signer Companion"}),".\nAccounts added to those extensions will be injected into the Polkadot-JS UI."]}),"\n",(0,n.jsx)(t.h2,{id:"do-your-own-chain-spec-and-metadata-update",children:"Do Your Own Chain Spec and Metadata Update"}),"\n",(0,n.jsx)(t.admonition,{title:"This section is for developers and power users only",type:"danger",children:(0,n.jsx)(t.p,{children:"By requesting the chain specification and metadata you trust the specific endpoint you are using\n(unless you are using you own node)."})}),"\n",(0,n.jsxs)(t.p,{children:["The following guide bases on the ",(0,n.jsx)(t.a,{href:"https://github.com/paritytech/parity-signer",children:"Parity Signer"})," Github\npage (to create the Chain Spec QR code and the metadata QR code fountain) and\n",(0,n.jsx)(t.a,{href:"https://github.com/paritytech/metadata-portal",children:"Metadata Portal"})," Github page (to embed the Chain\nSpec and Metadata into a portal)."]}),"\n",(0,n.jsx)(t.h3,{id:"chain-specification",children:"Chain Specification"}),"\n",(0,n.jsx)(t.h4,{id:"chain-spec-qr",children:"Chain Spec QR"}),"\n",(0,n.jsxs)(t.p,{children:["To add more chains on the Vault app you can follow the instructions\n",(0,n.jsx)(t.a,{href:"https://paritytech.github.io/parity-signer/tutorials/Add-New-Network.html#add-network-specs",children:"here"}),".\nIn this example we will add the ",(0,n.jsx)(t.a,{href:"/docs/learn-assets",children:"Asset Hub"})," system parachain. Briefly,\nfork the ",(0,n.jsx)(t.a,{href:"https://github.com/paritytech/parity-signer",children:"Parity Signer GitHub repository"}),", start the\nterminal within the ",(0,n.jsx)(t.code,{children:"/generate_message"})," folder and type the following:"]}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.code,{children:"cargo run add-specs -d -u wss://kusama-asset-hub-rpc.polkadot.io --encryption sr25519"})}),"\n",(0,n.jsxs)(t.p,{children:["where ",(0,n.jsx)(t.code,{children:"wss://kusama-asset.hub-rpc.polkadot.io"})," is the Parity RPC endpoint for the Asset Hub on\nKusama. This will create the file ",(0,n.jsx)(t.code,{children:"sign_me_add_specs_statemine_sr25510"})," under the\n",(0,n.jsx)(t.code,{children:"files/in_progress"})," folder. See all endpoints listed for\n",(0,n.jsx)(t.a,{href:"https://github.com/polkadot-js/apps/blob/089fd77b14169749e35e073a93f7e7276963009c/packages/apps-config/src/endpoints/productionRelayPolkadot.ts",children:"Polkadot"}),"\nand\n",(0,n.jsx)(t.a,{href:"https://github.com/polkadot-js/apps/blob/089fd77b14169749e35e073a93f7e7276963009c/packages/apps-config/src/endpoints/productionRelayKusama.ts",children:"Kusama"}),"\non the Polkadot-JS UI."]}),"\n",(0,n.jsx)(t.h4,{id:"generating-signature",children:"Generating Signature"}),"\n",(0,n.jsx)(t.admonition,{title:"Use a hot account",type:"danger",children:(0,n.jsx)(t.p,{children:"Make sure that the account used to sign the chain specification is a hot account. Never use a cold\naccount from the Vault app or Ledger, as after typing the seed phrase into the terminal that account\nwill be considered hot."})}),"\n",(0,n.jsxs)(t.p,{children:["Start the terminal within the ",(0,n.jsx)(t.code,{children:"files/in_progress"})," folder and type the following:"]}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.code,{children:'cat sign_me_add_specs_statemine_sr25519 | subkey sign --suri "YOUR SEED PHRASE"'})}),"\n",(0,n.jsxs)(t.p,{children:["where ",(0,n.jsx)(t.code,{children:'"YOUR SEED PHRASE"'})," is the seed phrase of the account that will be used to sign and\nauthenticate both the chain spec and later on the metadata. Running the code above will return a\nsignature similar to that below:"]}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.code,{children:"0xc4ce72db959000b6166af96d3bda55a927fd837747bf1bf1ae8a69e57c9ef37c25a88707c47b105a9eb1fbcf9345680eff57eb978cf73919506f6c738834e78a"})}),"\n",(0,n.jsx)(t.h4,{id:"signing-chain-spec",children:"Signing Chain Spec"}),"\n",(0,n.jsxs)(t.p,{children:["Now, go back to the ",(0,n.jsx)(t.code,{children:"/generate_message"})," folder and type the following:"]}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.code,{children:"cargo run --release make --goal qr --crypto sr25519 --msg add-specs --payload sign_me_add_specs_statemine_sr25519 --verifier-hex PUBLIC KEY --signature-hex SIGNATURE"})}),"\n",(0,n.jsxs)(t.p,{children:["where ",(0,n.jsx)(t.code,{children:"PUBLIC KEY"})," is the public key of the account with seed ",(0,n.jsx)(t.code,{children:'"YOUR SEED PHRASE"'}),", and ",(0,n.jsx)(t.code,{children:"SIGNATURE"}),"\nis the signature generated in the previous step. Running the code above will create the file\n",(0,n.jsx)(t.code,{children:"add_specs_statemine-sr25519"})," under the ",(0,n.jsx)(t.code,{children:"files/completed"})," folder."]}),"\n",(0,n.jsx)(t.h3,{id:"metadata-updates",children:"Metadata Updates"}),"\n",(0,n.jsx)(t.p,{children:"Similarly to what we did for the chain specification, we now generate and sign the Asset Hub\nmetadata."}),"\n",(0,n.jsx)(t.h4,{id:"metadata-qr-fountain",children:"Metadata QR Fountain"}),"\n",(0,n.jsxs)(t.p,{children:["To update the chain metadata for the Asset Hub specs on the Vault app you can follow the\ninstructions\n",(0,n.jsx)(t.a,{href:"https://paritytech.github.io/parity-signer/tutorials/Add-New-Network.html#add-network-metadata",children:"here"}),".\nBriefly, in the Parity Signer repository, start the terminal within the ",(0,n.jsx)(t.code,{children:"/generate_message"})," folder\nand type the following:"]}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.code,{children:"cargo run load-metadata -d -u wss://kusama-asset-hub-rpc.polkadot.io"})}),"\n",(0,n.jsxs)(t.p,{children:["where ",(0,n.jsx)(t.code,{children:"wss://kusama-asset-hub-rpc.polkadot.io"})," is the Parity RPC endpoint for the Asset Hub on\nKusama. This will create the file ",(0,n.jsx)(t.code,{children:"sign_me_load_metadata_statemineV9370"})," under the\n",(0,n.jsx)(t.code,{children:"files/in_progress"})," folder. Note that for future metadata updates the file name will change as the\nversion at the time of writing was ",(0,n.jsx)(t.code,{children:"V9370"}),"."]}),"\n",(0,n.jsx)(t.admonition,{type:"info",children:(0,n.jsxs)(t.p,{children:["Note that the name of the file changes according to the network version. That is, ",(0,n.jsx)(t.code,{children:"????"})," in\n",(0,n.jsx)(t.code,{children:"sign_me_load_metadata_statemineV????"})," will be the latest version at fetch time."]})}),"\n",(0,n.jsx)(t.h4,{id:"generating-signature-1",children:"Generating Signature"}),"\n",(0,n.jsx)(t.admonition,{title:"Use a hot account",type:"danger",children:(0,n.jsx)(t.p,{children:"Make sure that the account used to sign the metadata is a hot account. Never use a cold account from\nthe Vault app or Ledger, as after typing the seed phrase into the terminal that account will be\nconsidered hot."})}),"\n",(0,n.jsxs)(t.p,{children:["Start the terminal within the ",(0,n.jsx)(t.code,{children:"files/in_progress"})," folder and type the following:"]}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.code,{children:'cat sign_me_load_metadata_statemineV9370 | subkey sign --suri "YOUR SEED PHRASE"'})}),"\n",(0,n.jsxs)(t.p,{children:["where ",(0,n.jsx)(t.code,{children:'"YOUR SEED PHRASE"'})," is the seed phrase of the account you used to sign the chain\nspecification. Running the code above will return a signature similar to that below:"]}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.code,{children:"0xde1ad7aeb252acb3cf42a522dcc8dc3f317a49be2ed636836dd6df8f7e47135f2c712480055822eba87e9ea5ac7d3bba96045992ae795856fdf4eea09a411f85"})}),"\n",(0,n.jsx)(t.admonition,{title:"Do not copy the code lines above",type:"info",children:(0,n.jsxs)(t.p,{children:["Note that the name of the file changes according to the network version. That is, ",(0,n.jsx)(t.code,{children:"????"})," in\n",(0,n.jsx)(t.code,{children:"sign_me_load_metadata_statemineV????"})," will be the latest version at fetch time. So, do not copy the\ncode line above, but change the version with the appropriate one saved under the ",(0,n.jsx)(t.code,{children:"files/in_progress"}),"\nfolder. The signature changes as well."]})}),"\n",(0,n.jsx)(t.h4,{id:"signing-metadata",children:"Signing Metadata"}),"\n",(0,n.jsxs)(t.p,{children:["Now, go back to the ",(0,n.jsx)(t.code,{children:"/generate_message"})," folder and type the following:"]}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.code,{children:"cargo run --release make --goal qr --crypto sr25519 --msg load-metadata --payload sign_me_load_metadata_statemineV9370 --verifier-hex PUBLIC KEY --signature-hex SIGNATURE"})}),"\n",(0,n.jsxs)(t.p,{children:["where ",(0,n.jsx)(t.code,{children:"PUBLIC KEY"})," is the public key of the account with seed ",(0,n.jsx)(t.code,{children:'"YOUR SEED PHRASE"'}),", and ",(0,n.jsx)(t.code,{children:"SIGNATURE"}),"\nis the signature generated in the previous step. Running the code above will create the file\n",(0,n.jsx)(t.code,{children:"load_metadata_statemineV9370"})," under the ",(0,n.jsx)(t.code,{children:"files/completed"})," folder."]}),"\n",(0,n.jsx)(t.h3,{id:"add-chain--update-metadata",children:"Add Chain & Update Metadata"}),"\n",(0,n.jsxs)(t.p,{children:["You can open ",(0,n.jsx)(t.code,{children:"add_specs_statemine-sr25519"})," on your browser (just drag the file on an open tab). This\nis a .png file containing the QR code to add the Asset Hub chain specification into the Vault App.\nYou can do the same with the ",(0,n.jsx)(t.code,{children:"load_metadata_statemineV9370"}),". This is a .apng file containing the QR\ncode fountain to do the metadata update for the Asset Hub on Kusama."]}),"\n",(0,n.jsx)(t.h3,{id:"metadata-portal",children:"Metadata Portal"}),"\n",(0,n.jsxs)(t.h4,{id:"modify-config-file",children:["Modify ",(0,n.jsx)(t.code,{children:"config"})," File"]}),"\n",(0,n.jsxs)(t.p,{children:["Alternatively, you can add the chain specification QR code and the metadata QR code fountain in a\nmetadata portal. Briefly, fork the\n",(0,n.jsx)(t.a,{href:"https://github.com/paritytech/metadata-portal",children:"Parity's Metadata Portal GitHub repository"}),". You can\nmodify the following fields of the ",(0,n.jsx)(t.code,{children:"config.toml"})," file:"]}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.code,{children:"name"}),": your name / institution"]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.code,{children:"public_key"}),": the public key of the account you use to sign the chain spec and the metadata."]}),"\n",(0,n.jsx)(t.li,{children:"At the bottom of the file add the following information:"}),"\n"]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{children:'[[chains]]\nname = "Statemine"\ntitle = "Kusama Asset Hub"\nrpc_endpoint = "wss://kusama-asset-hub-rpc.polkadot.io"\ncolor = "#f27230"\n\n[chains.github_release]\nowner = "paritytech"\nrepo = "statemint"\ngenesis_hash = "0x48239ef607d7928874027a43a67689209727dfb3d3dc5e5b03a39bdc2eda771a"\n'})}),"\n",(0,n.jsx)(t.p,{children:"For each additional chain, you need to add the respective information. Information about the genesis\nhash can be found on the Polkadot-JS UI > connect to the relevant chain > Developer > Chain State."}),"\n",(0,n.jsx)(t.h4,{id:"rename-chains-files",children:"Rename Chain's Files"}),"\n",(0,n.jsx)(t.p,{children:"Rename the signed chain specification and metadata files as follow:"}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:["\n",(0,n.jsxs)(t.p,{children:["Chain specification: ",(0,n.jsx)(t.code,{children:"add_specs_statemine-sr25519"})," --\x3e ",(0,n.jsx)(t.code,{children:"statemine_specs.png"})]}),"\n"]}),"\n",(0,n.jsxs)(t.li,{children:["\n",(0,n.jsxs)(t.p,{children:["Metadata updates: ",(0,n.jsx)(t.code,{children:"load_metadata_statemineV9370"}),"--\x3e ",(0,n.jsx)(t.code,{children:"statemine_metadata_9370.apng"})]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(t.p,{children:["Thus, for chain specification the file must be renamed to ",(0,n.jsx)(t.code,{children:"chainName_specs.png"})," while for metadata\nthe file must be renamed to ",(0,n.jsx)(t.code,{children:"chainName_metadata_version.apng"})," where ",(0,n.jsx)(t.code,{children:"chainName"})," is the name of the\nchain and ",(0,n.jsx)(t.code,{children:"version"})," is the version of the metadata."]}),"\n",(0,n.jsxs)(t.p,{children:["Add the renamed files to the ",(0,n.jsx)(t.code,{children:"/public/qr folder"})," within the Metadata Portal repository."]}),"\n",(0,n.jsx)(t.h4,{id:"run-portal",children:"Run Portal"}),"\n",(0,n.jsxs)(t.p,{children:["Open the terminal within the Metadata Portal repository and run ",(0,n.jsx)(t.code,{children:"make updater"}),". Then run\n",(0,n.jsx)(t.code,{children:"make collector"}),"; this will create the ",(0,n.jsx)(t.code,{children:"_latest.apng"})," files for each of the chains (removed by the\ncommand ",(0,n.jsx)(t.code,{children:"make cleaner"}),"). Finally, run ",(0,n.jsx)(t.code,{children:"yarn start"})," to load the metadata portal on your localhost."]})]})}function p(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(h,{...e})}):h(e)}},67141:(e,t,a)=>{a.d(t,{A:()=>s});var n=a(96540),i=a(74848);const s=function(e){var t,a=e.message,s=(0,n.useState)(!0),o=s[0],d=s[1];return(0,i.jsx)(i.Fragment,{children:o&&(0,i.jsxs)("div",{className:"message-box",children:[(0,i.jsx)("button",{className:"close-button",onClick:function(){d(!1)},children:"\u2716 "}),(0,i.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(t=a,t.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},28453:(e,t,a)=>{a.d(t,{R:()=>o,x:()=>d});var n=a(96540);const i={},s=n.createContext(i);function o(e){const t=n.useContext(s);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function d(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:o(e.components),n.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/dc0f9344.6402d373.js b/assets/js/dc0f9344.6402d373.js new file mode 100644 index 000000000000..90c0ff696ebe --- /dev/null +++ b/assets/js/dc0f9344.6402d373.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1058],{34578:(e,n,a)=>{a.r(n),a.d(n,{assets:()=>l,contentTitle:()=>r,default:()=>c,frontMatter:()=>i,metadata:()=>d,toc:()=>u});const d=JSON.parse('{"id":"general/dune-analytics/parachain-dashboards/pendulum-dashboards","title":"Pendulum Dashboards","description":"Pendulum focuses on bridging fiat currencies and decentralized finance (DeFi).","source":"@site/../docs/general/dune-analytics/parachain-dashboards/pendulum-dashboards.md","sourceDirName":"general/dune-analytics/parachain-dashboards","slug":"/general/dune-analytics/pendulum-dashboards","permalink":"/docs/general/dune-analytics/pendulum-dashboards","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/parachain-dashboards/pendulum-dashboards.md","tags":[],"version":"current","lastUpdatedBy":"MK","lastUpdatedAt":1719215716000,"frontMatter":{"id":"pendulum-dashboards","title":"Pendulum Dashboards","sidebar_label":"Pendulum","description":"Pendulum focuses on bridging fiat currencies and decentralized finance (DeFi).","keywords":["polkadot","dashboard","dune","pendulum","DeFi"],"slug":"../pendulum-dashboards"},"sidebar":"docs","previous":{"title":"People","permalink":"/docs/general/dune-analytics/people-dashboards"},"next":{"title":"Phala","permalink":"/docs/general/dune-analytics/phala-dashboards"}}');var s=a(74848),t=a(28453);const i={id:"pendulum-dashboards",title:"Pendulum Dashboards",sidebar_label:"Pendulum",description:"Pendulum focuses on bridging fiat currencies and decentralized finance (DeFi).",keywords:["polkadot","dashboard","dune","pendulum","DeFi"],slug:"../pendulum-dashboards"},r="Pendulum Dashboards",l={},u=[{value:"Overview",id:"overview",level:2},{value:"Featured Dashboards on Dune",id:"featured-dashboards-on-dune",level:2},{value:"Key Tables",id:"key-tables",level:2},{value:"Useful Queries",id:"useful-queries",level:2},{value:"Getting Started with Queries",id:"getting-started-with-queries",level:2}];function o(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,t.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"pendulum-dashboards",children:"Pendulum Dashboards"})}),"\n",(0,s.jsx)(n.h2,{id:"overview",children:"Overview"}),"\n",(0,s.jsx)(n.p,{children:"Pendulum is a parachain on Polkadot that focuses on bridging fiat currencies and decentralized\nfinance (DeFi). It aims to create a fully functional fiat-optimized blockchain that facilitates open\nfinancial applications and connects them with the traditional financial sector."}),"\n",(0,s.jsx)(n.h2,{id:"featured-dashboards-on-dune",children:"Featured Dashboards on Dune"}),"\n",(0,s.jsx)(n.p,{children:"Here you will find a variety of dashboards that help visualize data from the Pendulum parachain:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"https://dune.com/substrate/pendulum",children:"Pendulum on Polkadot"}),": Explore comprehensive data\nvisualizations tracking the integration of fiat and DeFi on the Pendulum parachain."]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["Please also visit our dashboards for Pendulum on\n",(0,s.jsx)(n.a,{href:"https://dune.com/discover/content/relevant?q=title:Pendulum%20author:substrate",children:"Dune Analytics"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"key-tables",children:"Key Tables"}),"\n",(0,s.jsx)(n.p,{children:"Data from the Pendulum parachain is organized into several key tables:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"pendulum.balances"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"pendulum.blocks"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"pendulum.calls"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"pendulum.events"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"pendulum.extrinsics"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"pendulum.transfers"})}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["Start building your own queries using granular data on Dune\n",(0,s.jsx)(n.a,{href:"https://dune.com/queries?category=canonical&namespace=pendulum",children:"here"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"useful-queries",children:"Useful Queries"}),"\n",(0,s.jsx)(n.p,{children:"Some useful queries for Pendulum are provided:"}),"\n",(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Title"}),(0,s.jsx)(n.th,{children:"Query"}),(0,s.jsx)(n.th,{children:"Description"})]})}),(0,s.jsx)(n.tbody,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Pendulum Spacewalk Transactions"}),(0,s.jsx)(n.td,{children:(0,s.jsx)(n.a,{href:"https://dune.com/queries/3821151",children:"query_3821151"})}),(0,s.jsx)(n.td,{children:"Find all Spacewalk transactions on the Pendulum parachain"})]})})]}),"\n",(0,s.jsx)(n.h2,{id:"getting-started-with-queries",children:"Getting Started with Queries"}),"\n",(0,s.jsx)(n.p,{children:"To get started with querying data from Unique, you are welcome to use the mentioned materialized\nqueries. You can use the following DuneSQL queries as examples:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-sql",metastring:'title="Pendulum Spacewalk Transactions by Month" showLineNumbers',children:"SELECT\n DATE_TRUNC('month', block_time) AS month,\n SUM(amount) AS amount,\n COUNT(*) AS count,\n token_name\nFROM\n query_3821151 -- Pendulum Spacewalk Transactions\nGROUP BY\n DATE_TRUNC('month', block_time),\n token_name;\n"})}),"\n",(0,s.jsx)(n.p,{children:"Query result:"}),"\n",(0,s.jsx)("iframe",{src:"https://dune.com/embeds/3825144/6433755/1ae87539-28c8-4007-a429-5077df8b9adb",height:"350",width:"100%"}),"\n",(0,s.jsx)(n.admonition,{title:"DuneSQL Referece",type:"info",children:(0,s.jsxs)(n.p,{children:["For more information on DuneSQL, please refer to the ",(0,s.jsx)(n.a,{href:"/docs/general/dunesql-cheatsheet",children:"DuneSQL Cheatsheet"}),"\nand\n",(0,s.jsx)(n.a,{href:"https://docs.dune.com/query-engine/Functions-and-operators/index",children:"DuneSQL Official Documentation"}),"."]})})]})}function c(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(o,{...e})}):o(e)}},28453:(e,n,a)=>{a.d(n,{R:()=>i,x:()=>r});var d=a(96540);const s={},t=d.createContext(s);function i(e){const n=d.useContext(t);return d.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),d.createElement(t.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/dc0f9344.725a7052.js b/assets/js/dc0f9344.725a7052.js deleted file mode 100644 index f41c525c1d3a..000000000000 --- a/assets/js/dc0f9344.725a7052.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1058],{6794:(e,n,a)=>{a.r(n),a.d(n,{assets:()=>l,contentTitle:()=>t,default:()=>c,frontMatter:()=>i,metadata:()=>r,toc:()=>u});var d=a(74848),s=a(28453);const i={id:"pendulum-dashboards",title:"Pendulum Dashboards",sidebar_label:"Pendulum",description:"Pendulum focuses on bridging fiat currencies and decentralized finance (DeFi).",keywords:["polkadot","dashboard","dune","pendulum","DeFi"],slug:"../pendulum-dashboards"},t="Pendulum Dashboards",r={id:"general/dune-analytics/parachain-dashboards/pendulum-dashboards",title:"Pendulum Dashboards",description:"Pendulum focuses on bridging fiat currencies and decentralized finance (DeFi).",source:"@site/../docs/general/dune-analytics/parachain-dashboards/pendulum-dashboards.md",sourceDirName:"general/dune-analytics/parachain-dashboards",slug:"/general/dune-analytics/pendulum-dashboards",permalink:"/docs/general/dune-analytics/pendulum-dashboards",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/parachain-dashboards/pendulum-dashboards.md",tags:[],version:"current",lastUpdatedBy:"MK",lastUpdatedAt:1719215716e3,frontMatter:{id:"pendulum-dashboards",title:"Pendulum Dashboards",sidebar_label:"Pendulum",description:"Pendulum focuses on bridging fiat currencies and decentralized finance (DeFi).",keywords:["polkadot","dashboard","dune","pendulum","DeFi"],slug:"../pendulum-dashboards"},sidebar:"docs",previous:{title:"People",permalink:"/docs/general/dune-analytics/people-dashboards"},next:{title:"Phala",permalink:"/docs/general/dune-analytics/phala-dashboards"}},l={},u=[{value:"Overview",id:"overview",level:2},{value:"Featured Dashboards on Dune",id:"featured-dashboards-on-dune",level:2},{value:"Key Tables",id:"key-tables",level:2},{value:"Useful Queries",id:"useful-queries",level:2},{value:"Getting Started with Queries",id:"getting-started-with-queries",level:2}];function o(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,s.R)(),...e.components};return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(n.header,{children:(0,d.jsx)(n.h1,{id:"pendulum-dashboards",children:"Pendulum Dashboards"})}),"\n",(0,d.jsx)(n.h2,{id:"overview",children:"Overview"}),"\n",(0,d.jsx)(n.p,{children:"Pendulum is a parachain on Polkadot that focuses on bridging fiat currencies and decentralized\nfinance (DeFi). It aims to create a fully functional fiat-optimized blockchain that facilitates open\nfinancial applications and connects them with the traditional financial sector."}),"\n",(0,d.jsx)(n.h2,{id:"featured-dashboards-on-dune",children:"Featured Dashboards on Dune"}),"\n",(0,d.jsx)(n.p,{children:"Here you will find a variety of dashboards that help visualize data from the Pendulum parachain:"}),"\n",(0,d.jsxs)(n.ul,{children:["\n",(0,d.jsxs)(n.li,{children:[(0,d.jsx)(n.a,{href:"https://dune.com/substrate/pendulum",children:"Pendulum on Polkadot"}),": Explore comprehensive data\nvisualizations tracking the integration of fiat and DeFi on the Pendulum parachain."]}),"\n"]}),"\n",(0,d.jsxs)(n.p,{children:["Please also visit our dashboards for Pendulum on\n",(0,d.jsx)(n.a,{href:"https://dune.com/discover/content/relevant?q=title:Pendulum%20author:substrate",children:"Dune Analytics"}),"."]}),"\n",(0,d.jsx)(n.h2,{id:"key-tables",children:"Key Tables"}),"\n",(0,d.jsx)(n.p,{children:"Data from the Pendulum parachain is organized into several key tables:"}),"\n",(0,d.jsxs)(n.ul,{children:["\n",(0,d.jsx)(n.li,{children:(0,d.jsx)(n.code,{children:"pendulum.balances"})}),"\n",(0,d.jsx)(n.li,{children:(0,d.jsx)(n.code,{children:"pendulum.blocks"})}),"\n",(0,d.jsx)(n.li,{children:(0,d.jsx)(n.code,{children:"pendulum.calls"})}),"\n",(0,d.jsx)(n.li,{children:(0,d.jsx)(n.code,{children:"pendulum.events"})}),"\n",(0,d.jsx)(n.li,{children:(0,d.jsx)(n.code,{children:"pendulum.extrinsics"})}),"\n",(0,d.jsx)(n.li,{children:(0,d.jsx)(n.code,{children:"pendulum.transfers"})}),"\n"]}),"\n",(0,d.jsxs)(n.p,{children:["Start building your own queries using granular data on Dune\n",(0,d.jsx)(n.a,{href:"https://dune.com/queries?category=canonical&namespace=pendulum",children:"here"}),"."]}),"\n",(0,d.jsx)(n.h2,{id:"useful-queries",children:"Useful Queries"}),"\n",(0,d.jsx)(n.p,{children:"Some useful queries for Pendulum are provided:"}),"\n",(0,d.jsxs)(n.table,{children:[(0,d.jsx)(n.thead,{children:(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.th,{children:"Title"}),(0,d.jsx)(n.th,{children:"Query"}),(0,d.jsx)(n.th,{children:"Description"})]})}),(0,d.jsx)(n.tbody,{children:(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:"Pendulum Spacewalk Transactions"}),(0,d.jsx)(n.td,{children:(0,d.jsx)(n.a,{href:"https://dune.com/queries/3821151",children:"query_3821151"})}),(0,d.jsx)(n.td,{children:"Find all Spacewalk transactions on the Pendulum parachain"})]})})]}),"\n",(0,d.jsx)(n.h2,{id:"getting-started-with-queries",children:"Getting Started with Queries"}),"\n",(0,d.jsx)(n.p,{children:"To get started with querying data from Unique, you are welcome to use the mentioned materialized\nqueries. You can use the following DuneSQL queries as examples:"}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-sql",metastring:'title="Pendulum Spacewalk Transactions by Month" showLineNumbers',children:"SELECT\n DATE_TRUNC('month', block_time) AS month,\n SUM(amount) AS amount,\n COUNT(*) AS count,\n token_name\nFROM\n query_3821151 -- Pendulum Spacewalk Transactions\nGROUP BY\n DATE_TRUNC('month', block_time),\n token_name;\n"})}),"\n",(0,d.jsx)(n.p,{children:"Query result:"}),"\n",(0,d.jsx)("iframe",{src:"https://dune.com/embeds/3825144/6433755/1ae87539-28c8-4007-a429-5077df8b9adb",height:"350",width:"100%"}),"\n",(0,d.jsx)(n.admonition,{title:"DuneSQL Referece",type:"info",children:(0,d.jsxs)(n.p,{children:["For more information on DuneSQL, please refer to the ",(0,d.jsx)(n.a,{href:"/docs/general/dunesql-cheatsheet",children:"DuneSQL Cheatsheet"}),"\nand\n",(0,d.jsx)(n.a,{href:"https://docs.dune.com/query-engine/Functions-and-operators/index",children:"DuneSQL Official Documentation"}),"."]})})]})}function c(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,d.jsx)(n,{...e,children:(0,d.jsx)(o,{...e})}):o(e)}},28453:(e,n,a)=>{a.d(n,{R:()=>t,x:()=>r});var d=a(96540);const s={},i=d.createContext(s);function t(e){const n=d.useContext(i);return d.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:t(e.components),d.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/dc36d550.4b85266c.js b/assets/js/dc36d550.4b85266c.js new file mode 100644 index 000000000000..95c38b82db61 --- /dev/null +++ b/assets/js/dc36d550.4b85266c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2357],{5782:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>u,contentTitle:()=>l,default:()=>h,frontMatter:()=>s,metadata:()=>r,toc:()=>d});const r=JSON.parse('{"id":"maintain/maintain-archive","title":"Archived Maintain Resources","description":"Archive for the Maintain Section.","source":"@site/../docs/maintain/maintain-archive.md","sourceDirName":"maintain","slug":"/maintain-archive","permalink":"/docs/maintain-archive","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/maintain/maintain-archive.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1727943421000,"frontMatter":{"id":"maintain-archive","title":"Archived Maintain Resources","sidebar_label":"Archive","description":"Archive for the Maintain Section.","keywords":["Democracy","Council","Gov1","Councillor"],"slug":"../maintain-archive"},"sidebar":"docs","previous":{"title":"Validator Community Overview","permalink":"/docs/maintain-guides-validator-community"},"next":{"title":"Participate in Democracy","permalink":"/docs/maintain/maintain-guides-democracy"}}');var i=n(74848),a=n(28453),c=n(67141),o=n(3514);const s={id:"maintain-archive",title:"Archived Maintain Resources",sidebar_label:"Archive",description:"Archive for the Maintain Section.",keywords:["Democracy","Council","Gov1","Councillor"],slug:"../maintain-archive"},l=void 0,u={},d=[];function m(e){return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(c.A,{message:"This section contains archived pages. The content in them no longer applies to Polkadot but can\nstill be relevant for parachains and related projects."}),"\n",(0,i.jsx)(o.A,{})]})}function h(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(m,{...e})}):m()}},67141:(e,t,n)=>{n.d(t,{A:()=>a});var r=n(96540),i=n(74848);const a=function(e){var t,n=e.message,a=(0,r.useState)(!0),c=a[0],o=a[1];return(0,i.jsx)(i.Fragment,{children:c&&(0,i.jsxs)("div",{className:"message-box",children:[(0,i.jsx)("button",{className:"close-button",onClick:function(){o(!1)},children:"\u2716 "}),(0,i.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(t=n,t.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},3514:(e,t,n)=>{n.d(t,{A:()=>x});n(96540);var r=n(34164),i=n(26972),a=n(28774),c=n(53465),o=n(16654),s=n(21312),l=n(51107);const u={cardContainer:"cardContainer_fWXF",cardTitle:"cardTitle_rnsV",cardDescription:"cardDescription_PWke"};var d=n(74848);function m(e){var t=e.href,n=e.children;return(0,d.jsx)(a.A,{href:t,className:(0,r.A)("card padding--lg",u.cardContainer),children:n})}function h(e){var t=e.href,n=e.icon,i=e.title,a=e.description;return(0,d.jsxs)(m,{href:t,children:[(0,d.jsxs)(l.A,{as:"h2",className:(0,r.A)("text--truncate",u.cardTitle),title:i,children:[n," ",i]}),a&&(0,d.jsx)("p",{className:(0,r.A)("text--truncate",u.cardDescription),title:a,children:a})]})}function f(e){var t,n,r=e.item,a=(0,i.Nr)(r),o=(n=(0,c.W)().selectMessage,function(e){return n(e,(0,s.T)({message:"1 item|{count} items",id:"theme.docs.DocCard.categoryDescription.plurals",description:"The default description for a category card in the generated index about how many items this category includes"},{count:e}))});return a?(0,d.jsx)(h,{href:a,icon:"\ud83d\uddc3\ufe0f",title:r.label,description:null!=(t=r.description)?t:o(r.items.length)}):null}function p(e){var t,n,r=e.item,a=(0,o.A)(r.href)?"\ud83d\udcc4\ufe0f":"\ud83d\udd17",c=(0,i.cC)(null!=(t=r.docId)?t:void 0);return(0,d.jsx)(h,{href:r.href,icon:a,title:r.label,description:null!=(n=r.description)?n:null==c?void 0:c.description})}function v(e){var t=e.item;switch(t.type){case"link":return(0,d.jsx)(p,{item:t});case"category":return(0,d.jsx)(f,{item:t});default:throw new Error("unknown item type "+JSON.stringify(t))}}function g(e){var t=e.className,n=(0,i.$S)();return(0,d.jsx)(x,{items:n.items,className:t})}function x(e){var t=e.items,n=e.className;if(!t)return(0,d.jsx)(g,Object.assign({},e));var a=(0,i.d1)(t);return(0,d.jsx)("section",{className:(0,r.A)("row",n),children:a.map((function(e,t){return(0,d.jsx)("article",{className:"col col--6 margin-bottom--lg",children:(0,d.jsx)(v,{item:e})},t)}))})}},53465:(e,t,n)=>{n.d(t,{W:()=>l});var r=n(96540),i=n(44586),a=["zero","one","two","few","many","other"];function c(e){return a.filter((function(t){return e.includes(t)}))}var o={locale:"en",pluralForms:c(["one","other"]),select:function(e){return 1===e?"one":"other"}};function s(){var e=(0,i.A)().i18n.currentLocale;return(0,r.useMemo)((function(){try{return t=e,n=new Intl.PluralRules(t),{locale:t,pluralForms:c(n.resolvedOptions().pluralCategories),select:function(e){return n.select(e)}}}catch(r){return console.error('Failed to use Intl.PluralRules for locale "'+e+'".\nDocusaurus will fallback to the default (English) implementation.\nError: '+r.message+"\n"),o}var t,n}),[e])}function l(){var e=s();return{selectMessage:function(t,n){return function(e,t,n){var r=e.split("|");if(1===r.length)return r[0];r.length>n.pluralForms.length&&console.error("For locale="+n.locale+", a maximum of "+n.pluralForms.length+" plural forms are expected ("+n.pluralForms.join(",")+"), but the message contains "+r.length+": "+e);var i=n.select(t),a=n.pluralForms.indexOf(i);return r[Math.min(a,r.length-1)]}(n,t,e)}}}},28453:(e,t,n)=>{n.d(t,{R:()=>c,x:()=>o});var r=n(96540);const i={},a=r.createContext(i);function c(e){const t=r.useContext(a);return r.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:c(e.components),r.createElement(a.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/dc36d550.7af69c12.js b/assets/js/dc36d550.7af69c12.js deleted file mode 100644 index de30c7544731..000000000000 --- a/assets/js/dc36d550.7af69c12.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2357],{32037:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>u,contentTitle:()=>s,default:()=>h,frontMatter:()=>o,metadata:()=>l,toc:()=>d});var r=n(74848),i=n(28453),a=n(67141),c=n(3514);const o={id:"maintain-archive",title:"Archived Maintain Resources",sidebar_label:"Archive",description:"Archive for the Maintain Section.",keywords:["Democracy","Council","Gov1","Councillor"],slug:"../maintain-archive"},s=void 0,l={id:"maintain/maintain-archive",title:"Archived Maintain Resources",description:"Archive for the Maintain Section.",source:"@site/../docs/maintain/maintain-archive.md",sourceDirName:"maintain",slug:"/maintain-archive",permalink:"/docs/maintain-archive",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/maintain/maintain-archive.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1727943421e3,frontMatter:{id:"maintain-archive",title:"Archived Maintain Resources",sidebar_label:"Archive",description:"Archive for the Maintain Section.",keywords:["Democracy","Council","Gov1","Councillor"],slug:"../maintain-archive"},sidebar:"docs",previous:{title:"Validator Community Overview",permalink:"/docs/maintain-guides-validator-community"},next:{title:"Participate in Democracy",permalink:"/docs/maintain/maintain-guides-democracy"}},u={},d=[];function m(e){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(a.A,{message:"This section contains archived pages. The content in them no longer applies to Polkadot but can\nstill be relevant for parachains and related projects."}),"\n",(0,r.jsx)(c.A,{})]})}function h(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(m,{...e})}):m()}},67141:(e,t,n)=>{n.d(t,{A:()=>a});var r=n(96540),i=n(74848);const a=function(e){var t,n=e.message,a=(0,r.useState)(!0),c=a[0],o=a[1];return(0,i.jsx)(i.Fragment,{children:c&&(0,i.jsxs)("div",{className:"message-box",children:[(0,i.jsx)("button",{className:"close-button",onClick:function(){o(!1)},children:"\u2716 "}),(0,i.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(t=n,t.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},3514:(e,t,n)=>{n.d(t,{A:()=>x});n(96540);var r=n(34164),i=n(26972),a=n(28774),c=n(53465),o=n(16654),s=n(21312),l=n(51107);const u={cardContainer:"cardContainer_fWXF",cardTitle:"cardTitle_rnsV",cardDescription:"cardDescription_PWke"};var d=n(74848);function m(e){var t=e.href,n=e.children;return(0,d.jsx)(a.A,{href:t,className:(0,r.A)("card padding--lg",u.cardContainer),children:n})}function h(e){var t=e.href,n=e.icon,i=e.title,a=e.description;return(0,d.jsxs)(m,{href:t,children:[(0,d.jsxs)(l.A,{as:"h2",className:(0,r.A)("text--truncate",u.cardTitle),title:i,children:[n," ",i]}),a&&(0,d.jsx)("p",{className:(0,r.A)("text--truncate",u.cardDescription),title:a,children:a})]})}function f(e){var t,n,r=e.item,a=(0,i.Nr)(r),o=(n=(0,c.W)().selectMessage,function(e){return n(e,(0,s.T)({message:"1 item|{count} items",id:"theme.docs.DocCard.categoryDescription.plurals",description:"The default description for a category card in the generated index about how many items this category includes"},{count:e}))});return a?(0,d.jsx)(h,{href:a,icon:"\ud83d\uddc3\ufe0f",title:r.label,description:null!=(t=r.description)?t:o(r.items.length)}):null}function p(e){var t,n,r=e.item,a=(0,o.A)(r.href)?"\ud83d\udcc4\ufe0f":"\ud83d\udd17",c=(0,i.cC)(null!=(t=r.docId)?t:void 0);return(0,d.jsx)(h,{href:r.href,icon:a,title:r.label,description:null!=(n=r.description)?n:null==c?void 0:c.description})}function v(e){var t=e.item;switch(t.type){case"link":return(0,d.jsx)(p,{item:t});case"category":return(0,d.jsx)(f,{item:t});default:throw new Error("unknown item type "+JSON.stringify(t))}}function g(e){var t=e.className,n=(0,i.$S)();return(0,d.jsx)(x,{items:n.items,className:t})}function x(e){var t=e.items,n=e.className;if(!t)return(0,d.jsx)(g,Object.assign({},e));var a=(0,i.d1)(t);return(0,d.jsx)("section",{className:(0,r.A)("row",n),children:a.map((function(e,t){return(0,d.jsx)("article",{className:"col col--6 margin-bottom--lg",children:(0,d.jsx)(v,{item:e})},t)}))})}},53465:(e,t,n)=>{n.d(t,{W:()=>l});var r=n(96540),i=n(44586),a=["zero","one","two","few","many","other"];function c(e){return a.filter((function(t){return e.includes(t)}))}var o={locale:"en",pluralForms:c(["one","other"]),select:function(e){return 1===e?"one":"other"}};function s(){var e=(0,i.A)().i18n.currentLocale;return(0,r.useMemo)((function(){try{return t=e,n=new Intl.PluralRules(t),{locale:t,pluralForms:c(n.resolvedOptions().pluralCategories),select:function(e){return n.select(e)}}}catch(r){return console.error('Failed to use Intl.PluralRules for locale "'+e+'".\nDocusaurus will fallback to the default (English) implementation.\nError: '+r.message+"\n"),o}var t,n}),[e])}function l(){var e=s();return{selectMessage:function(t,n){return function(e,t,n){var r=e.split("|");if(1===r.length)return r[0];r.length>n.pluralForms.length&&console.error("For locale="+n.locale+", a maximum of "+n.pluralForms.length+" plural forms are expected ("+n.pluralForms.join(",")+"), but the message contains "+r.length+": "+e);var i=n.select(t),a=n.pluralForms.indexOf(i);return r[Math.min(a,r.length-1)]}(n,t,e)}}}},28453:(e,t,n)=>{n.d(t,{R:()=>c,x:()=>o});var r=n(96540);const i={},a=r.createContext(i);function c(e){const t=r.useContext(a);return r.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:c(e.components),r.createElement(a.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/dc776cbc.ae94ffb1.js b/assets/js/dc776cbc.ae94ffb1.js deleted file mode 100644 index 71f018882e85..000000000000 --- a/assets/js/dc776cbc.ae94ffb1.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4498],{55957:(t,o,e)=>{e.r(o),e.d(o,{assets:()=>c,contentTitle:()=>s,default:()=>l,frontMatter:()=>i,metadata:()=>a,toc:()=>u});var n=e(74848),r=e(28453);const i={id:"doc-thousand-contributors",title:"Thousand Contributors Program",sidebar_label:"Thousand Contributors",description:"The Thousand Contributors Program and How it can Support your Contributions.",slug:"../thousand-contributors"},s=void 0,a={id:"general/doc-thousand-contributors",title:"Thousand Contributors Program",description:"The Thousand Contributors Program and How it can Support your Contributions.",source:"@site/../docs/general/thousand-contributors.md",sourceDirName:"general",slug:"/thousand-contributors",permalink:"/docs/thousand-contributors",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/thousand-contributors.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1710432171e3,frontMatter:{id:"doc-thousand-contributors",title:"Thousand Contributors Program",sidebar_label:"Thousand Contributors",description:"The Thousand Contributors Program and How it can Support your Contributions.",slug:"../thousand-contributors"},sidebar:"docs",previous:{title:"Thousand Validators",permalink:"/docs/thousand-validators"},next:{title:"Developer Heroes",permalink:"/docs/dev-heroes"}},c={},u=[{value:"How to Participate",id:"how-to-participate",level:2},{value:"Process",id:"process",level:3},{value:"Submission reviews",id:"submission-reviews",level:3}];function d(t){const o={a:"a",admonition:"admonition",h2:"h2",h3:"h3",li:"li",ol:"ol",p:"p",...(0,r.R)(),...t.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(o.p,{children:["The ",(0,n.jsx)(o.a,{href:"https://github.com/w3f/1KC",children:"Thousand Contributors Program"})," is an initiative maintained by Web3\nFoundation's Technical Education and Support team to offer an off-chain contributor program to\nsupport and reward community contributions. The program focuses on rewarding contributors in the\nareas of technical education, community, and support that relate to the Polkadot and Kusama\necosystems."]}),"\n",(0,n.jsx)(o.admonition,{title:"The pilot phase of Thousand Contributors Program has ended",type:"note",children:(0,n.jsx)(o.p,{children:"You can still submit your intent to participate. The submissions will be reviewed and accepted on a\ncase-by-case basis."})}),"\n",(0,n.jsx)(o.h2,{id:"how-to-participate",children:"How to Participate"}),"\n",(0,n.jsx)(o.p,{children:"You can signal your intent to participate by:"}),"\n",(0,n.jsxs)(o.ol,{children:["\n",(0,n.jsxs)(o.li,{children:["Choosing a task from this ",(0,n.jsx)(o.a,{href:"https://github.com/orgs/w3f/projects/13",children:"list"})," of open tasks"]}),"\n",(0,n.jsxs)(o.li,{children:["Then fill out this ",(0,n.jsx)(o.a,{href:"https://form.typeform.com/to/I9vjnCcI",children:"typeform"})]}),"\n"]}),"\n",(0,n.jsx)(o.h3,{id:"process",children:"Process"}),"\n",(0,n.jsx)(o.p,{children:"Once you have submitted your contribution proposal, the team will:"}),"\n",(0,n.jsxs)(o.ol,{children:["\n",(0,n.jsxs)(o.li,{children:["Evaluate. Your ",(0,n.jsx)(o.a,{href:"#1kc-evaluators",children:"evaluators"})," will differ depending on which area you want to\ncontribute."]}),"\n",(0,n.jsx)(o.li,{children:"Accept or deny. Once we review your proposal, we will get in touch with you about the status."}),"\n",(0,n.jsx)(o.li,{children:"Define your delivery. All tasks will have different delivery requirements; we will communicate\nwhat your contribution needs to fulfill."}),"\n",(0,n.jsx)(o.li,{children:"Fund. Once both parties finalize the delivery of the task, the team will deposit your rewards to\nthe account shared with us."}),"\n"]}),"\n",(0,n.jsx)(o.h3,{id:"submission-reviews",children:"Submission reviews"}),"\n",(0,n.jsxs)(o.p,{children:["The review process follows the present pipeline in the\n",(0,n.jsx)(o.a,{href:"https://github.com/orgs/w3f/projects/13",children:"1KC public GitHub project"}),"."]}),"\n",(0,n.jsxs)(o.p,{children:["Learn more about the program and its components on the official\n",(0,n.jsx)(o.a,{href:"https://github.com/w3f/1KC",children:"1KC repository"})]})]})}function l(t={}){const{wrapper:o}={...(0,r.R)(),...t.components};return o?(0,n.jsx)(o,{...t,children:(0,n.jsx)(d,{...t})}):d(t)}},28453:(t,o,e)=>{e.d(o,{R:()=>s,x:()=>a});var n=e(96540);const r={},i=n.createContext(r);function s(t){const o=n.useContext(i);return n.useMemo((function(){return"function"==typeof t?t(o):{...o,...t}}),[o,t])}function a(t){let o;return o=t.disableParentContext?"function"==typeof t.components?t.components(r):t.components||r:s(t.components),n.createElement(i.Provider,{value:o},t.children)}}}]); \ No newline at end of file diff --git a/assets/js/dc776cbc.ffa377ed.js b/assets/js/dc776cbc.ffa377ed.js new file mode 100644 index 000000000000..07a8a555dfef --- /dev/null +++ b/assets/js/dc776cbc.ffa377ed.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4498],{2405:(t,o,e)=>{e.r(o),e.d(o,{assets:()=>c,contentTitle:()=>a,default:()=>d,frontMatter:()=>s,metadata:()=>n,toc:()=>u});const n=JSON.parse('{"id":"general/doc-thousand-contributors","title":"Thousand Contributors Program","description":"The Thousand Contributors Program and How it can Support your Contributions.","source":"@site/../docs/general/thousand-contributors.md","sourceDirName":"general","slug":"/thousand-contributors","permalink":"/docs/thousand-contributors","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/thousand-contributors.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1710432171000,"frontMatter":{"id":"doc-thousand-contributors","title":"Thousand Contributors Program","sidebar_label":"Thousand Contributors","description":"The Thousand Contributors Program and How it can Support your Contributions.","slug":"../thousand-contributors"},"sidebar":"docs","previous":{"title":"Thousand Validators","permalink":"/docs/thousand-validators"},"next":{"title":"Developer Heroes","permalink":"/docs/dev-heroes"}}');var r=e(74848),i=e(28453);const s={id:"doc-thousand-contributors",title:"Thousand Contributors Program",sidebar_label:"Thousand Contributors",description:"The Thousand Contributors Program and How it can Support your Contributions.",slug:"../thousand-contributors"},a=void 0,c={},u=[{value:"How to Participate",id:"how-to-participate",level:2},{value:"Process",id:"process",level:3},{value:"Submission reviews",id:"submission-reviews",level:3}];function l(t){const o={a:"a",admonition:"admonition",h2:"h2",h3:"h3",li:"li",ol:"ol",p:"p",...(0,i.R)(),...t.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(o.p,{children:["The ",(0,r.jsx)(o.a,{href:"https://github.com/w3f/1KC",children:"Thousand Contributors Program"})," is an initiative maintained by Web3\nFoundation's Technical Education and Support team to offer an off-chain contributor program to\nsupport and reward community contributions. The program focuses on rewarding contributors in the\nareas of technical education, community, and support that relate to the Polkadot and Kusama\necosystems."]}),"\n",(0,r.jsx)(o.admonition,{title:"The pilot phase of Thousand Contributors Program has ended",type:"note",children:(0,r.jsx)(o.p,{children:"You can still submit your intent to participate. The submissions will be reviewed and accepted on a\ncase-by-case basis."})}),"\n",(0,r.jsx)(o.h2,{id:"how-to-participate",children:"How to Participate"}),"\n",(0,r.jsx)(o.p,{children:"You can signal your intent to participate by:"}),"\n",(0,r.jsxs)(o.ol,{children:["\n",(0,r.jsxs)(o.li,{children:["Choosing a task from this ",(0,r.jsx)(o.a,{href:"https://github.com/orgs/w3f/projects/13",children:"list"})," of open tasks"]}),"\n",(0,r.jsxs)(o.li,{children:["Then fill out this ",(0,r.jsx)(o.a,{href:"https://form.typeform.com/to/I9vjnCcI",children:"typeform"})]}),"\n"]}),"\n",(0,r.jsx)(o.h3,{id:"process",children:"Process"}),"\n",(0,r.jsx)(o.p,{children:"Once you have submitted your contribution proposal, the team will:"}),"\n",(0,r.jsxs)(o.ol,{children:["\n",(0,r.jsxs)(o.li,{children:["Evaluate. Your ",(0,r.jsx)(o.a,{href:"#1kc-evaluators",children:"evaluators"})," will differ depending on which area you want to\ncontribute."]}),"\n",(0,r.jsx)(o.li,{children:"Accept or deny. Once we review your proposal, we will get in touch with you about the status."}),"\n",(0,r.jsx)(o.li,{children:"Define your delivery. All tasks will have different delivery requirements; we will communicate\nwhat your contribution needs to fulfill."}),"\n",(0,r.jsx)(o.li,{children:"Fund. Once both parties finalize the delivery of the task, the team will deposit your rewards to\nthe account shared with us."}),"\n"]}),"\n",(0,r.jsx)(o.h3,{id:"submission-reviews",children:"Submission reviews"}),"\n",(0,r.jsxs)(o.p,{children:["The review process follows the present pipeline in the\n",(0,r.jsx)(o.a,{href:"https://github.com/orgs/w3f/projects/13",children:"1KC public GitHub project"}),"."]}),"\n",(0,r.jsxs)(o.p,{children:["Learn more about the program and its components on the official\n",(0,r.jsx)(o.a,{href:"https://github.com/w3f/1KC",children:"1KC repository"})]})]})}function d(t={}){const{wrapper:o}={...(0,i.R)(),...t.components};return o?(0,r.jsx)(o,{...t,children:(0,r.jsx)(l,{...t})}):l(t)}},28453:(t,o,e)=>{e.d(o,{R:()=>s,x:()=>a});var n=e(96540);const r={},i=n.createContext(r);function s(t){const o=n.useContext(i);return n.useMemo((function(){return"function"==typeof t?t(o):{...o,...t}}),[o,t])}function a(t){let o;return o=t.disableParentContext?"function"==typeof t.components?t.components(r):t.components||r:s(t.components),n.createElement(i.Provider,{value:o},t.children)}}}]); \ No newline at end of file diff --git a/assets/js/dd2fa029.c134075a.js b/assets/js/dd2fa029.c134075a.js new file mode 100644 index 000000000000..55b3fa1b74bb --- /dev/null +++ b/assets/js/dd2fa029.c134075a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2047],{44992:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>d,contentTitle:()=>c,default:()=>m,frontMatter:()=>i,metadata:()=>n,toc:()=>u});const n=JSON.parse('{"id":"learn/learn-polkadotjs","title":"Polkadot-JS","description":"Overview of Polkadot-JS.","source":"@site/../docs/learn/learn-polkadotjs.md","sourceDirName":"learn","slug":"/learn-polkadotjs","permalink":"/docs/learn-polkadotjs","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-polkadotjs.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1729847256000,"frontMatter":{"id":"learn-polkadotjs","title":"Polkadot-JS","sidebar_label":"Polkadot-JS","description":"Overview of Polkadot-JS.","keywords":["polkadot-js","polkadot js"],"slug":"../learn-polkadotjs"},"sidebar":"docs","previous":{"title":"Advanced","permalink":"/docs/learn-advanced-index"},"next":{"title":"Polkadot-JS Tooling","permalink":"/docs/polkadotjs"}}');var o=r(74848),a=r(28453),s=r(67141),l=r(3514);const i={id:"learn-polkadotjs",title:"Polkadot-JS",sidebar_label:"Polkadot-JS",description:"Overview of Polkadot-JS.",keywords:["polkadot-js","polkadot js"],slug:"../learn-polkadotjs"},c=void 0,d={},u=[];function p(e){return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(s.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the Polkadot-JS UI, you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,o.jsx)(l.A,{})]})}function m(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(p,{...e})}):p()}},67141:(e,t,r)=>{r.d(t,{A:()=>a});var n=r(96540),o=r(74848);const a=function(e){var t,r=e.message,a=(0,n.useState)(!0),s=a[0],l=a[1];return(0,o.jsx)(o.Fragment,{children:s&&(0,o.jsxs)("div",{className:"message-box",children:[(0,o.jsx)("button",{className:"close-button",onClick:function(){l(!1)},children:"\u2716 "}),(0,o.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(t=r,t.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},3514:(e,t,r)=>{r.d(t,{A:()=>v});r(96540);var n=r(34164),o=r(26972),a=r(28774),s=r(53465),l=r(16654),i=r(21312),c=r(51107);const d={cardContainer:"cardContainer_fWXF",cardTitle:"cardTitle_rnsV",cardDescription:"cardDescription_PWke"};var u=r(74848);function p(e){var t=e.href,r=e.children;return(0,u.jsx)(a.A,{href:t,className:(0,n.A)("card padding--lg",d.cardContainer),children:r})}function m(e){var t=e.href,r=e.icon,o=e.title,a=e.description;return(0,u.jsxs)(p,{href:t,children:[(0,u.jsxs)(c.A,{as:"h2",className:(0,n.A)("text--truncate",d.cardTitle),title:o,children:[r," ",o]}),a&&(0,u.jsx)("p",{className:(0,n.A)("text--truncate",d.cardDescription),title:a,children:a})]})}function f(e){var t,r,n=e.item,a=(0,o.Nr)(n),l=(r=(0,s.W)().selectMessage,function(e){return r(e,(0,i.T)({message:"1 item|{count} items",id:"theme.docs.DocCard.categoryDescription.plurals",description:"The default description for a category card in the generated index about how many items this category includes"},{count:e}))});return a?(0,u.jsx)(m,{href:a,icon:"\ud83d\uddc3\ufe0f",title:n.label,description:null!=(t=n.description)?t:l(n.items.length)}):null}function h(e){var t,r,n=e.item,a=(0,l.A)(n.href)?"\ud83d\udcc4\ufe0f":"\ud83d\udd17",s=(0,o.cC)(null!=(t=n.docId)?t:void 0);return(0,u.jsx)(m,{href:n.href,icon:a,title:n.label,description:null!=(r=n.description)?r:null==s?void 0:s.description})}function k(e){var t=e.item;switch(t.type){case"link":return(0,u.jsx)(h,{item:t});case"category":return(0,u.jsx)(f,{item:t});default:throw new Error("unknown item type "+JSON.stringify(t))}}function g(e){var t=e.className,r=(0,o.$S)();return(0,u.jsx)(v,{items:r.items,className:t})}function v(e){var t=e.items,r=e.className;if(!t)return(0,u.jsx)(g,Object.assign({},e));var a=(0,o.d1)(t);return(0,u.jsx)("section",{className:(0,n.A)("row",r),children:a.map((function(e,t){return(0,u.jsx)("article",{className:"col col--6 margin-bottom--lg",children:(0,u.jsx)(k,{item:e})},t)}))})}},53465:(e,t,r)=>{r.d(t,{W:()=>c});var n=r(96540),o=r(44586),a=["zero","one","two","few","many","other"];function s(e){return a.filter((function(t){return e.includes(t)}))}var l={locale:"en",pluralForms:s(["one","other"]),select:function(e){return 1===e?"one":"other"}};function i(){var e=(0,o.A)().i18n.currentLocale;return(0,n.useMemo)((function(){try{return t=e,r=new Intl.PluralRules(t),{locale:t,pluralForms:s(r.resolvedOptions().pluralCategories),select:function(e){return r.select(e)}}}catch(n){return console.error('Failed to use Intl.PluralRules for locale "'+e+'".\nDocusaurus will fallback to the default (English) implementation.\nError: '+n.message+"\n"),l}var t,r}),[e])}function c(){var e=i();return{selectMessage:function(t,r){return function(e,t,r){var n=e.split("|");if(1===n.length)return n[0];n.length>r.pluralForms.length&&console.error("For locale="+r.locale+", a maximum of "+r.pluralForms.length+" plural forms are expected ("+r.pluralForms.join(",")+"), but the message contains "+n.length+": "+e);var o=r.select(t),a=r.pluralForms.indexOf(o);return n[Math.min(a,n.length-1)]}(r,t,e)}}}},28453:(e,t,r)=>{r.d(t,{R:()=>s,x:()=>l});var n=r(96540);const o={},a=n.createContext(o);function s(e){const t=n.useContext(a);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function l(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:s(e.components),n.createElement(a.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/dd2fa029.e34bb4f5.js b/assets/js/dd2fa029.e34bb4f5.js deleted file mode 100644 index 65c7ea0451e1..000000000000 --- a/assets/js/dd2fa029.e34bb4f5.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2047],{98546:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>d,contentTitle:()=>i,default:()=>m,frontMatter:()=>l,metadata:()=>c,toc:()=>u});var n=r(74848),o=r(28453),a=r(67141),s=r(3514);const l={id:"learn-polkadotjs",title:"Polkadot-JS",sidebar_label:"Polkadot-JS",description:"Overview of Polkadot-JS.",keywords:["polkadot-js","polkadot js"],slug:"../learn-polkadotjs"},i=void 0,c={id:"learn/learn-polkadotjs",title:"Polkadot-JS",description:"Overview of Polkadot-JS.",source:"@site/../docs/learn/learn-polkadotjs.md",sourceDirName:"learn",slug:"/learn-polkadotjs",permalink:"/docs/learn-polkadotjs",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-polkadotjs.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1729847256e3,frontMatter:{id:"learn-polkadotjs",title:"Polkadot-JS",sidebar_label:"Polkadot-JS",description:"Overview of Polkadot-JS.",keywords:["polkadot-js","polkadot js"],slug:"../learn-polkadotjs"},sidebar:"docs",previous:{title:"Advanced",permalink:"/docs/learn-advanced-index"},next:{title:"Polkadot-JS Tooling",permalink:"/docs/polkadotjs"}},d={},u=[];function p(e){return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(a.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the Polkadot-JS UI, you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,n.jsx)(s.A,{})]})}function m(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(p,{...e})}):p()}},67141:(e,t,r)=>{r.d(t,{A:()=>a});var n=r(96540),o=r(74848);const a=function(e){var t,r=e.message,a=(0,n.useState)(!0),s=a[0],l=a[1];return(0,o.jsx)(o.Fragment,{children:s&&(0,o.jsxs)("div",{className:"message-box",children:[(0,o.jsx)("button",{className:"close-button",onClick:function(){l(!1)},children:"\u2716 "}),(0,o.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(t=r,t.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},3514:(e,t,r)=>{r.d(t,{A:()=>v});r(96540);var n=r(34164),o=r(26972),a=r(28774),s=r(53465),l=r(16654),i=r(21312),c=r(51107);const d={cardContainer:"cardContainer_fWXF",cardTitle:"cardTitle_rnsV",cardDescription:"cardDescription_PWke"};var u=r(74848);function p(e){var t=e.href,r=e.children;return(0,u.jsx)(a.A,{href:t,className:(0,n.A)("card padding--lg",d.cardContainer),children:r})}function m(e){var t=e.href,r=e.icon,o=e.title,a=e.description;return(0,u.jsxs)(p,{href:t,children:[(0,u.jsxs)(c.A,{as:"h2",className:(0,n.A)("text--truncate",d.cardTitle),title:o,children:[r," ",o]}),a&&(0,u.jsx)("p",{className:(0,n.A)("text--truncate",d.cardDescription),title:a,children:a})]})}function f(e){var t,r,n=e.item,a=(0,o.Nr)(n),l=(r=(0,s.W)().selectMessage,function(e){return r(e,(0,i.T)({message:"1 item|{count} items",id:"theme.docs.DocCard.categoryDescription.plurals",description:"The default description for a category card in the generated index about how many items this category includes"},{count:e}))});return a?(0,u.jsx)(m,{href:a,icon:"\ud83d\uddc3\ufe0f",title:n.label,description:null!=(t=n.description)?t:l(n.items.length)}):null}function h(e){var t,r,n=e.item,a=(0,l.A)(n.href)?"\ud83d\udcc4\ufe0f":"\ud83d\udd17",s=(0,o.cC)(null!=(t=n.docId)?t:void 0);return(0,u.jsx)(m,{href:n.href,icon:a,title:n.label,description:null!=(r=n.description)?r:null==s?void 0:s.description})}function k(e){var t=e.item;switch(t.type){case"link":return(0,u.jsx)(h,{item:t});case"category":return(0,u.jsx)(f,{item:t});default:throw new Error("unknown item type "+JSON.stringify(t))}}function g(e){var t=e.className,r=(0,o.$S)();return(0,u.jsx)(v,{items:r.items,className:t})}function v(e){var t=e.items,r=e.className;if(!t)return(0,u.jsx)(g,Object.assign({},e));var a=(0,o.d1)(t);return(0,u.jsx)("section",{className:(0,n.A)("row",r),children:a.map((function(e,t){return(0,u.jsx)("article",{className:"col col--6 margin-bottom--lg",children:(0,u.jsx)(k,{item:e})},t)}))})}},53465:(e,t,r)=>{r.d(t,{W:()=>c});var n=r(96540),o=r(44586),a=["zero","one","two","few","many","other"];function s(e){return a.filter((function(t){return e.includes(t)}))}var l={locale:"en",pluralForms:s(["one","other"]),select:function(e){return 1===e?"one":"other"}};function i(){var e=(0,o.A)().i18n.currentLocale;return(0,n.useMemo)((function(){try{return t=e,r=new Intl.PluralRules(t),{locale:t,pluralForms:s(r.resolvedOptions().pluralCategories),select:function(e){return r.select(e)}}}catch(n){return console.error('Failed to use Intl.PluralRules for locale "'+e+'".\nDocusaurus will fallback to the default (English) implementation.\nError: '+n.message+"\n"),l}var t,r}),[e])}function c(){var e=i();return{selectMessage:function(t,r){return function(e,t,r){var n=e.split("|");if(1===n.length)return n[0];n.length>r.pluralForms.length&&console.error("For locale="+r.locale+", a maximum of "+r.pluralForms.length+" plural forms are expected ("+r.pluralForms.join(",")+"), but the message contains "+n.length+": "+e);var o=r.select(t),a=r.pluralForms.indexOf(o);return n[Math.min(a,n.length-1)]}(r,t,e)}}}},28453:(e,t,r)=>{r.d(t,{R:()=>s,x:()=>l});var n=r(96540);const o={},a=n.createContext(o);function s(e){const t=n.useContext(a);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function l(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:s(e.components),n.createElement(a.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/dd32e389.173afce7.js b/assets/js/dd32e389.173afce7.js new file mode 100644 index 000000000000..20f0ca9aaa9b --- /dev/null +++ b/assets/js/dd32e389.173afce7.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7781],{69175:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>r,default:()=>h,frontMatter:()=>s,metadata:()=>a,toc:()=>d});const a=JSON.parse('{"id":"general/polkadot-vault","title":"Polkadot Vault (formerly Parity Signer)","description":"Your old Smartphone as an Air-gapped Wallet.","source":"@site/../docs/general/polkadot-vault.md","sourceDirName":"general","slug":"/polkadot-vault","permalink":"/docs/polkadot-vault","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/polkadot-vault.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1721121748000,"frontMatter":{"id":"polkadot-vault","title":"Polkadot Vault (formerly Parity Signer)","sidebar_label":"Polkadot Vault","description":"Your old Smartphone as an Air-gapped Wallet.","keywords":["parity signer","signer","polkadot vault"],"slug":"../polkadot-vault"},"sidebar":"docs","previous":{"title":"Ledger","permalink":"/docs/ledger"},"next":{"title":"Apps","permalink":"/docs/apps-index"}}');var o=n(74848),i=n(28453);const s={id:"polkadot-vault",title:"Polkadot Vault (formerly Parity Signer)",sidebar_label:"Polkadot Vault",description:"Your old Smartphone as an Air-gapped Wallet.",keywords:["parity signer","signer","polkadot vault"],slug:"../polkadot-vault"},r=void 0,l={},d=[{value:"Vault vs. Ledger",id:"vault-vs-ledger",level:2},{value:"Create and Import Accounts",id:"create-and-import-accounts",level:2},{value:"Restore Account on Polkadot Vault",id:"restore-account-on-polkadot-vault",level:2},{value:"Signing Extrinsics",id:"signing-extrinsics",level:2},{value:"Update the Vault App",id:"update-the-vault-app",level:2},{value:"Security Notes",id:"security-notes",level:2},{value:"Add Chains",id:"add-chains",level:2}];function c(e){const t={a:"a",admonition:"admonition",em:"em",h2:"h2",hr:"hr",li:"li",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,i.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(t.admonition,{title:"Rebranding of Parity Signer to Polkadot Vault",type:"info",children:[(0,o.jsxs)(t.p,{children:["The Polkadot Vault app rebranding is live on\n",(0,o.jsx)(t.a,{href:"https://apps.apple.com/us/app/parity-signer/id1218174838",children:"iOS"})," and\n",(0,o.jsx)(t.a,{href:"https://play.google.com/store/apps/details?id=io.parity.signer",children:"Android"})," devices. The source code\nof all versions can be downloaded on\n",(0,o.jsx)(t.a,{href:"https://github.com/novasamatech/parity-signer/releases",children:"the GitHub repo"}),"."]}),(0,o.jsxs)(t.p,{children:["The Polkadot Vault app is an air-gapped cold storage solution for all users, including developers\nand power users. See ",(0,o.jsx)(t.a,{href:"/docs/ledger",children:"Ledger"})," devices for other cold storage solutions."]})]}),"\n",(0,o.jsx)(t.admonition,{title:"Smartphone compatibility with Polkadot Vault",type:"warning",children:(0,o.jsx)(t.p,{children:"Note that although the Vault app is available for old smartphones, different versions will be\ninstalled according to the phone's hardware. For example, smartphones like iPhone 6 will install\nParity Signer (the old brand name of the Vault app) with limited capabilities. There will be no log\nor warning if the phone was connected to the internet while not using the app. Also, no metadata\nupdates are possible, and no option to add new networks. This would not be as secure as the latest\nversion of the app. We would recommend that you use smartphones compatible with the latest Polkadot\nVault app."})}),"\n",(0,o.jsx)("div",{className:"row",children:(0,o.jsxs)("div",{className:"col text--center",children:[(0,o.jsx)("a",{href:"https://www.youtube.com/watch?v=IG_RGLsb2g0",children:(0,o.jsx)("img",{src:"https://img.youtube.com/vi/IG_RGLsb2g0/0.jpg",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,o.jsx)("p",{children:(0,o.jsx)("a",{href:"https://www.youtube.com/watch?v=IG_RGLsb2g0",children:"How to Use Polkadot Vault"})})]})}),"\n",(0,o.jsxs)(t.p,{children:[(0,o.jsx)(t.a,{href:"https://vault.novasama.io/",children:"Polkadot Vault"})," (formerly Parity Signer) is a cold storage solution\nthat allows you to use a phone in airplane mode as an air-gapped wallet. The Vault app is not\ntechnically a wallet, as it does not allow to transfer funds. It is more of a key-chain tool that\nwill enable you the create, manage, and restore accounts."]}),"\n",(0,o.jsxs)(t.p,{children:["By default, the Vault app contains chain specifications for Polkadot, Kusama, and Westend. Metadata\nupdates are possible via a ",(0,o.jsx)(t.a,{href:"https://metadata.parity.io/#/polkadot",children:"QR code fountain"}),". It is also\npossible to ",(0,o.jsx)(t.a,{href:"#add-chains",children:"add other Substrate-based chains and do metadata updates"})," for those. The\napp allows you to securely sign ",(0,o.jsx)(t.a,{href:"/docs/learn-transactions",children:"extrinsics"})," via QR codes without\nexposing your private keys to the internet."]}),"\n",(0,o.jsx)(t.h2,{id:"vault-vs-ledger",children:"Vault vs. Ledger"}),"\n",(0,o.jsxs)(t.p,{children:["The Polkadot Vault and ",(0,o.jsx)(t.a,{href:"/docs/ledger",children:"Ledger"})," are cold storage solutions because private keys of\naccounts created on the Vault app or Ledger device are not stored on your computer or, more in\ngeneral, on a device that has an internet connection. However, the two solutions differ, and you\nshould consider one or the other depending on your user type."]}),"\n",(0,o.jsxs)(t.table,{children:[(0,o.jsx)(t.thead,{children:(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.th,{style:{textAlign:"center"},children:"Ledger"}),(0,o.jsx)(t.th,{style:{textAlign:"center"},children:"Polkadot Vault"})]})}),(0,o.jsxs)(t.tbody,{children:[(0,o.jsxs)(t.tr,{children:[(0,o.jsxs)(t.td,{style:{textAlign:"center"},children:["Hardware designed to stay offline and be secure. Certified by French cybersecurity agency ",(0,o.jsx)(t.a,{href:"https://www.ssi.gouv.fr/en/cybersecurity-in-france/the-national-cybersecurity-agency-of-france/",children:"ANSSI"}),"."]}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"Hardware not designed to stay offline. The user must switch off all inbound and outbound connections (network, wifi, Bluetooth, NFC)."})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsxs)(t.td,{style:{textAlign:"center"},children:["Hardware is resistant to side-channel attacks via ",(0,o.jsx)(t.a,{href:"https://www.ledger.com/academy/security/the-secure-element-whistanding-security-attacks/",children:"Secure Element"}),". The secure element will destroy itself if opened."]}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"Although there is no wired connection, side-channel attacks are possible. Without a secure element, the phone can be opened, and the keys will be accessible in its storage unit."})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"Accounts derived from one mnemonic seed phrase."}),(0,o.jsxs)(t.td,{style:{textAlign:"center"},children:["One mnemonic for each account or one mnemonic for multiple accounts via ",(0,o.jsx)(t.a,{href:"/docs/learn-account-advanced#derivation-paths",children:"account derivation"})," or default ",(0,o.jsx)(t.a,{href:"/docs/learn-account-advanced#address-format",children:"Substrate address format"}),". See ",(0,o.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000103707-can-i-use-the-same-account-on-polkadot-kusama-and-parachains-#Should-I-use-the-same-account-across-different-chains?",children:"this support article"})," for information on whether to use the same account or different accounts on different chains based on your needs."]})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"Easy firmware and application upgrades through the Ledger Live application."}),(0,o.jsxs)(t.td,{style:{textAlign:"center"},children:["The app should never be connected to the internet after installation, so the version installed on the phone should not be updated directly. For ",(0,o.jsx)(t.a,{href:"#update-the-vault-app",children:"app upgrades"}),", users must factory reset the phone and recover all accounts through seed phrases. Metadata updates for each chain must be done via the QR code fountain."]})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"Currently, not all parachains are supported."}),(0,o.jsxs)(t.td,{style:{textAlign:"center"},children:["Users can add all parachains either through a third-party provider or if they have the wss endpoint and know ",(0,o.jsx)(t.a,{href:"#add-chains",children:"how to extract the chain specifications and metadata"}),"."]})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsxs)(t.td,{style:{textAlign:"center"},children:["Ledger app updates on Ledger Live sometimes lag behind chain updates resulting in users only being able to transact if they ",(0,o.jsx)(t.a,{href:"/docs/ledger#install-the-developer-release",children:"install developer versions"})," (only for advanced users)."]}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"Metadata updates are always available to install once released, either through the third-party provider or manually. In this case, the installation process requires familiarity with working on the command prompt."})]})]})]}),"\n",(0,o.jsx)(t.h2,{id:"create-and-import-accounts",children:"Create and Import Accounts"}),"\n",(0,o.jsx)(t.p,{children:"You can create a new account directly within the Vault app (Add Key Set > Add new Key Set). This\nwill generate a new mnemonic seed phrase on the app. Alternatively, you can import a new account in\nthe app using a seed phrase generated elsewhere with a compatible account generation scheme. For\nexample, you can have an air-gapped laptop with the Subkey tool installed and generate a new account\nthere. The seed phrase of that account can be imported into the Vault App (Add Key Set > Recover Key\nSet)."}),"\n",(0,o.jsxs)(t.p,{children:["For guidelines about how to create an account using Polkadot Vault, see\n",(0,o.jsx)(t.a,{href:"https://youtu.be/hgv1R9mPEXw?t=120",children:(0,o.jsx)(t.strong,{children:"this video tutorial"})})," and visit\n",(0,o.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000180512-how-to-create-an-account-in-parity-signer",children:(0,o.jsx)(t.strong,{children:"this support article"})}),"."]}),"\n",(0,o.jsx)(t.admonition,{type:"info",children:(0,o.jsx)(t.p,{children:"Importing an account into an extension will not import its private key. Only the public key will be\nimported and you must sign using your air-gapped phone which holds the private key."})}),"\n",(0,o.jsx)(t.h2,{id:"restore-account-on-polkadot-vault",children:"Restore Account on Polkadot Vault"}),"\n",(0,o.jsxs)(t.p,{children:["See ",(0,o.jsx)(t.a,{href:"https://youtu.be/hgv1R9mPEXw?t=407",children:(0,o.jsx)(t.strong,{children:"this video tutorial"})})," and\n",(0,o.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000167901-how-to-restore-an-account-in-parity-signer",children:(0,o.jsx)(t.strong,{children:"this support page"})}),"\nto learn how to restore your account on the Polkadot Vault app."]}),"\n",(0,o.jsx)(t.h2,{id:"signing-extrinsics",children:"Signing Extrinsics"}),"\n",(0,o.jsx)(t.admonition,{title:"Always check for Metadata Updates",type:"warning",children:(0,o.jsxs)(t.p,{children:["Before signing extrinsics with the Polkadot Vault app, always check for metadata updates.\n",(0,o.jsx)(t.a,{href:"https://youtu.be/gbvrHzr4EDY?t=328",children:(0,o.jsx)(t.strong,{children:"This video tutorial"})})," will explain how to do it."]})}),"\n",(0,o.jsxs)(t.p,{children:["Remember to always check for metadata updates before signing transactions. See\n",(0,o.jsx)(t.a,{href:"https://github.com/w3f/polkadot-wiki/pull/4600/files#diff-5d4d0a286cdc7b1d016ee155f9694dbcddc13f5264490fc1a960c38000baca4d",children:"this article"}),"\nto learn how to sign transactions and\n",(0,o.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000184128-polkadot-vault-how-to-add-a-new-chain-and-update-the-metadata",children:"this article"}),"\non how to easily add new chains and do metadata updates using the Vault app."]}),"\n",(0,o.jsx)(t.p,{children:"The procedure to sign transactions with the Vault app is as follows:"}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsx)(t.li,{children:"The wallet or browser extension will show a QR code encoding the information about what you are\ngoing to sign."}),"\n",(0,o.jsxs)(t.li,{children:["After scanning the QR code with the Vault app, you will be presented with decoded information\nabout what you will sign. Make sure the information matches what you intended to sign in the first\nplace. If something does not feel right, do not sign. Check\n",(0,o.jsx)(t.a,{href:"/docs/transaction-attacks#corrupted-qr-code-parity-signer",children:"this page"})," for more information and\ncontact ",(0,o.jsx)(t.a,{href:"https://support.polkadot.network/support/home",children:"the Polkadot Support Team"}),"."]}),"\n",(0,o.jsx)(t.li,{children:"If the information shown by the Vault app is correct, you can present the QR code (signature) to\nthe camera on your laptop to sign for the transaction."}),"\n"]}),"\n",(0,o.jsx)(t.admonition,{title:"QR codes are signature-specific",type:"info",children:(0,o.jsx)(t.p,{children:"Note that QR codes are signature-specific. If someone by chance has access to the QR code signature\nfor one of your transactions, future transactions cannot be signed with that same QR code, and it is\nimpossible to find out the private key of your account only with that QR code."})}),"\n",(0,o.jsx)(t.h2,{id:"update-the-vault-app",children:"Update the Vault App"}),"\n",(0,o.jsx)(t.admonition,{type:"danger",children:(0,o.jsx)(t.p,{children:"Ensure you always have your mnemonic seed phrase secure and available."})}),"\n",(0,o.jsxs)(t.p,{children:["To securely update the Polkadot Vault app follow the instructions\n",(0,o.jsx)(t.a,{href:"https://github.com/novasamatech/parity-signer/blob/master/docs/src/tutorials/Upgrading.md",children:"here"}),".\nBriefly,"]}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsx)(t.li,{children:"backup your accounts (Backup key Set > write down the mnemonic seed phrase),"}),"\n",(0,o.jsx)(t.li,{children:"factory reset your Vault app (Settings > Wipe all Data),"}),"\n",(0,o.jsx)(t.li,{children:"factory reset your phone,"}),"\n",(0,o.jsx)(t.li,{children:"re-install the Vault app,"}),"\n",(0,o.jsx)(t.li,{children:"go offline (airplane mode, no wifi),"}),"\n",(0,o.jsx)(t.li,{children:"recover your accounts (Add Key Set > Recover Key Set)."}),"\n"]}),"\n",(0,o.jsx)(t.h2,{id:"security-notes",children:"Security Notes"}),"\n",(0,o.jsx)(t.admonition,{title:"Remove SIM cards and Forget Networks",type:"info",children:(0,o.jsx)(t.p,{children:"To avoid unintended connection of your phone to the Internet, remove SIM cards, reset eSIM settings,\nand forget any added WiFi networks. In this way, the only possibility of having an unintended\ninternet connection is either through the cellular network or through WiFi connection."})}),"\n",(0,o.jsx)(t.p,{children:"The Vault app has a Log that will tell you all activities performed with it. It is important to mark\ndown the last action, you did so that you can do a security check the next time you use the app.\nAlso, the Vault app will always tell you if the phone has been (even briefly) connected to the\nInternet. In case of an unrecognized connection, it is recommended to:"}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsx)(t.li,{children:"Backup your accounts (i.e. make sure you have the mnemonic seed phrases)"}),"\n",(0,o.jsxs)(t.li,{children:["Follow the steps in ",(0,o.jsx)(t.a,{href:"#update-the-vault-app",children:"Update the Vault app"})]}),"\n",(0,o.jsx)(t.li,{children:"Once offline, create a new account on the Vault app"}),"\n",(0,o.jsx)(t.li,{children:"Import the compromised accounts and transfer the funds to the new non-compromised account."}),"\n"]}),"\n",(0,o.jsx)(t.admonition,{title:"The Vault App has the option to export private keys",type:"danger",children:(0,o.jsxs)(t.p,{children:['If an account\'s private key has been exported from the Vault app, the public key will be marked as\n"hot" and the following message will be displayed ',(0,o.jsx)(t.em,{children:"This key is marked hot because its root private\nkey has been exported"}),"."]})}),"\n",(0,o.jsx)(t.p,{children:"You might consider exporting the private key if you are switching air-gapped phone. If you choose to\nexport your private key, avoid the following:"}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsx)(t.li,{children:'Do not export your private key to a device that is connected to the internet, as your key will not\nbe "cold" anymore.'}),"\n",(0,o.jsx)(t.li,{children:"Do not print private keys QR codes over an internet connection."}),"\n"]}),"\n",(0,o.jsx)(t.h2,{id:"add-chains",children:"Add Chains"}),"\n",(0,o.jsxs)(t.p,{children:["The Vault app contains default chain specs for Polkadot, Kusama, and Westend. It is possible to add\nmore chains via QR-code, and update their metadata by generating your own QR-code fountain in a\nmetadata portal similar to that ",(0,o.jsx)(t.a,{href:"https://metadata.parity.io/#/polkadot",children:"signed by Parity"}),".\nAlternatively, you can use a third-party provider to add chains and their metadata. Check\n",(0,o.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000184128-polkadot-vault-how-to-add-a-new-chain-and-update-the-metadata",children:"this article"}),"\nfor detailed instructions. If you choose this approach, you should trust the provider you choose."]}),"\n",(0,o.jsx)(t.hr,{}),"\n",(0,o.jsx)(t.admonition,{title:"Polkadot-JS Guides",type:"info",children:(0,o.jsxs)(t.p,{children:["If you are an advanced user, see the\n",(0,o.jsx)(t.a,{href:"/docs/learn-guides-vault",children:"Polkadot-JS guides about Polkadot Vault"}),"."]})})]})}function h(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(c,{...e})}):c(e)}},28453:(e,t,n)=>{n.d(t,{R:()=>s,x:()=>r});var a=n(96540);const o={},i=a.createContext(o);function s(e){const t=a.useContext(i);return a.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:s(e.components),a.createElement(i.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/dd32e389.3aa977f8.js b/assets/js/dd32e389.3aa977f8.js deleted file mode 100644 index 0bd48969c615..000000000000 --- a/assets/js/dd32e389.3aa977f8.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7781],{21279:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>s,default:()=>h,frontMatter:()=>i,metadata:()=>r,toc:()=>d});var a=n(74848),o=n(28453);const i={id:"polkadot-vault",title:"Polkadot Vault (formerly Parity Signer)",sidebar_label:"Polkadot Vault",description:"Your old Smartphone as an Air-gapped Wallet.",keywords:["parity signer","signer","polkadot vault"],slug:"../polkadot-vault"},s=void 0,r={id:"general/polkadot-vault",title:"Polkadot Vault (formerly Parity Signer)",description:"Your old Smartphone as an Air-gapped Wallet.",source:"@site/../docs/general/polkadot-vault.md",sourceDirName:"general",slug:"/polkadot-vault",permalink:"/docs/polkadot-vault",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/polkadot-vault.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1721121748e3,frontMatter:{id:"polkadot-vault",title:"Polkadot Vault (formerly Parity Signer)",sidebar_label:"Polkadot Vault",description:"Your old Smartphone as an Air-gapped Wallet.",keywords:["parity signer","signer","polkadot vault"],slug:"../polkadot-vault"},sidebar:"docs",previous:{title:"Ledger",permalink:"/docs/ledger"},next:{title:"Apps",permalink:"/docs/apps-index"}},l={},d=[{value:"Vault vs. Ledger",id:"vault-vs-ledger",level:2},{value:"Create and Import Accounts",id:"create-and-import-accounts",level:2},{value:"Restore Account on Polkadot Vault",id:"restore-account-on-polkadot-vault",level:2},{value:"Signing Extrinsics",id:"signing-extrinsics",level:2},{value:"Update the Vault App",id:"update-the-vault-app",level:2},{value:"Security Notes",id:"security-notes",level:2},{value:"Add Chains",id:"add-chains",level:2}];function c(e){const t={a:"a",admonition:"admonition",em:"em",h2:"h2",hr:"hr",li:"li",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,o.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(t.admonition,{title:"Rebranding of Parity Signer to Polkadot Vault",type:"info",children:[(0,a.jsxs)(t.p,{children:["The Polkadot Vault app rebranding is live on\n",(0,a.jsx)(t.a,{href:"https://apps.apple.com/us/app/parity-signer/id1218174838",children:"iOS"})," and\n",(0,a.jsx)(t.a,{href:"https://play.google.com/store/apps/details?id=io.parity.signer",children:"Android"})," devices. The source code\nof all versions can be downloaded on\n",(0,a.jsx)(t.a,{href:"https://github.com/novasamatech/parity-signer/releases",children:"the GitHub repo"}),"."]}),(0,a.jsxs)(t.p,{children:["The Polkadot Vault app is an air-gapped cold storage solution for all users, including developers\nand power users. See ",(0,a.jsx)(t.a,{href:"/docs/ledger",children:"Ledger"})," devices for other cold storage solutions."]})]}),"\n",(0,a.jsx)(t.admonition,{title:"Smartphone compatibility with Polkadot Vault",type:"warning",children:(0,a.jsx)(t.p,{children:"Note that although the Vault app is available for old smartphones, different versions will be\ninstalled according to the phone's hardware. For example, smartphones like iPhone 6 will install\nParity Signer (the old brand name of the Vault app) with limited capabilities. There will be no log\nor warning if the phone was connected to the internet while not using the app. Also, no metadata\nupdates are possible, and no option to add new networks. This would not be as secure as the latest\nversion of the app. We would recommend that you use smartphones compatible with the latest Polkadot\nVault app."})}),"\n",(0,a.jsx)("div",{className:"row",children:(0,a.jsxs)("div",{className:"col text--center",children:[(0,a.jsx)("a",{href:"https://www.youtube.com/watch?v=IG_RGLsb2g0",children:(0,a.jsx)("img",{src:"https://img.youtube.com/vi/IG_RGLsb2g0/0.jpg",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,a.jsx)("p",{children:(0,a.jsx)("a",{href:"https://www.youtube.com/watch?v=IG_RGLsb2g0",children:"How to Use Polkadot Vault"})})]})}),"\n",(0,a.jsxs)(t.p,{children:[(0,a.jsx)(t.a,{href:"https://vault.novasama.io/",children:"Polkadot Vault"})," (formerly Parity Signer) is a cold storage solution\nthat allows you to use a phone in airplane mode as an air-gapped wallet. The Vault app is not\ntechnically a wallet, as it does not allow to transfer funds. It is more of a key-chain tool that\nwill enable you the create, manage, and restore accounts."]}),"\n",(0,a.jsxs)(t.p,{children:["By default, the Vault app contains chain specifications for Polkadot, Kusama, and Westend. Metadata\nupdates are possible via a ",(0,a.jsx)(t.a,{href:"https://metadata.parity.io/#/polkadot",children:"QR code fountain"}),". It is also\npossible to ",(0,a.jsx)(t.a,{href:"#add-chains",children:"add other Substrate-based chains and do metadata updates"})," for those. The\napp allows you to securely sign ",(0,a.jsx)(t.a,{href:"/docs/learn-transactions",children:"extrinsics"})," via QR codes without\nexposing your private keys to the internet."]}),"\n",(0,a.jsx)(t.h2,{id:"vault-vs-ledger",children:"Vault vs. Ledger"}),"\n",(0,a.jsxs)(t.p,{children:["The Polkadot Vault and ",(0,a.jsx)(t.a,{href:"/docs/ledger",children:"Ledger"})," are cold storage solutions because private keys of\naccounts created on the Vault app or Ledger device are not stored on your computer or, more in\ngeneral, on a device that has an internet connection. However, the two solutions differ, and you\nshould consider one or the other depending on your user type."]}),"\n",(0,a.jsxs)(t.table,{children:[(0,a.jsx)(t.thead,{children:(0,a.jsxs)(t.tr,{children:[(0,a.jsx)(t.th,{style:{textAlign:"center"},children:"Ledger"}),(0,a.jsx)(t.th,{style:{textAlign:"center"},children:"Polkadot Vault"})]})}),(0,a.jsxs)(t.tbody,{children:[(0,a.jsxs)(t.tr,{children:[(0,a.jsxs)(t.td,{style:{textAlign:"center"},children:["Hardware designed to stay offline and be secure. Certified by French cybersecurity agency ",(0,a.jsx)(t.a,{href:"https://www.ssi.gouv.fr/en/cybersecurity-in-france/the-national-cybersecurity-agency-of-france/",children:"ANSSI"}),"."]}),(0,a.jsx)(t.td,{style:{textAlign:"center"},children:"Hardware not designed to stay offline. The user must switch off all inbound and outbound connections (network, wifi, Bluetooth, NFC)."})]}),(0,a.jsxs)(t.tr,{children:[(0,a.jsxs)(t.td,{style:{textAlign:"center"},children:["Hardware is resistant to side-channel attacks via ",(0,a.jsx)(t.a,{href:"https://www.ledger.com/academy/security/the-secure-element-whistanding-security-attacks/",children:"Secure Element"}),". The secure element will destroy itself if opened."]}),(0,a.jsx)(t.td,{style:{textAlign:"center"},children:"Although there is no wired connection, side-channel attacks are possible. Without a secure element, the phone can be opened, and the keys will be accessible in its storage unit."})]}),(0,a.jsxs)(t.tr,{children:[(0,a.jsx)(t.td,{style:{textAlign:"center"},children:"Accounts derived from one mnemonic seed phrase."}),(0,a.jsxs)(t.td,{style:{textAlign:"center"},children:["One mnemonic for each account or one mnemonic for multiple accounts via ",(0,a.jsx)(t.a,{href:"/docs/learn-account-advanced#derivation-paths",children:"account derivation"})," or default ",(0,a.jsx)(t.a,{href:"/docs/learn-account-advanced#address-format",children:"Substrate address format"}),". See ",(0,a.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000103707-can-i-use-the-same-account-on-polkadot-kusama-and-parachains-#Should-I-use-the-same-account-across-different-chains?",children:"this support article"})," for information on whether to use the same account or different accounts on different chains based on your needs."]})]}),(0,a.jsxs)(t.tr,{children:[(0,a.jsx)(t.td,{style:{textAlign:"center"},children:"Easy firmware and application upgrades through the Ledger Live application."}),(0,a.jsxs)(t.td,{style:{textAlign:"center"},children:["The app should never be connected to the internet after installation, so the version installed on the phone should not be updated directly. For ",(0,a.jsx)(t.a,{href:"#update-the-vault-app",children:"app upgrades"}),", users must factory reset the phone and recover all accounts through seed phrases. Metadata updates for each chain must be done via the QR code fountain."]})]}),(0,a.jsxs)(t.tr,{children:[(0,a.jsx)(t.td,{style:{textAlign:"center"},children:"Currently, not all parachains are supported."}),(0,a.jsxs)(t.td,{style:{textAlign:"center"},children:["Users can add all parachains either through a third-party provider or if they have the wss endpoint and know ",(0,a.jsx)(t.a,{href:"#add-chains",children:"how to extract the chain specifications and metadata"}),"."]})]}),(0,a.jsxs)(t.tr,{children:[(0,a.jsxs)(t.td,{style:{textAlign:"center"},children:["Ledger app updates on Ledger Live sometimes lag behind chain updates resulting in users only being able to transact if they ",(0,a.jsx)(t.a,{href:"/docs/ledger#install-the-developer-release",children:"install developer versions"})," (only for advanced users)."]}),(0,a.jsx)(t.td,{style:{textAlign:"center"},children:"Metadata updates are always available to install once released, either through the third-party provider or manually. In this case, the installation process requires familiarity with working on the command prompt."})]})]})]}),"\n",(0,a.jsx)(t.h2,{id:"create-and-import-accounts",children:"Create and Import Accounts"}),"\n",(0,a.jsx)(t.p,{children:"You can create a new account directly within the Vault app (Add Key Set > Add new Key Set). This\nwill generate a new mnemonic seed phrase on the app. Alternatively, you can import a new account in\nthe app using a seed phrase generated elsewhere with a compatible account generation scheme. For\nexample, you can have an air-gapped laptop with the Subkey tool installed and generate a new account\nthere. The seed phrase of that account can be imported into the Vault App (Add Key Set > Recover Key\nSet)."}),"\n",(0,a.jsxs)(t.p,{children:["For guidelines about how to create an account using Polkadot Vault, see\n",(0,a.jsx)(t.a,{href:"https://youtu.be/hgv1R9mPEXw?t=120",children:(0,a.jsx)(t.strong,{children:"this video tutorial"})})," and visit\n",(0,a.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000180512-how-to-create-an-account-in-parity-signer",children:(0,a.jsx)(t.strong,{children:"this support article"})}),"."]}),"\n",(0,a.jsx)(t.admonition,{type:"info",children:(0,a.jsx)(t.p,{children:"Importing an account into an extension will not import its private key. Only the public key will be\nimported and you must sign using your air-gapped phone which holds the private key."})}),"\n",(0,a.jsx)(t.h2,{id:"restore-account-on-polkadot-vault",children:"Restore Account on Polkadot Vault"}),"\n",(0,a.jsxs)(t.p,{children:["See ",(0,a.jsx)(t.a,{href:"https://youtu.be/hgv1R9mPEXw?t=407",children:(0,a.jsx)(t.strong,{children:"this video tutorial"})})," and\n",(0,a.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000167901-how-to-restore-an-account-in-parity-signer",children:(0,a.jsx)(t.strong,{children:"this support page"})}),"\nto learn how to restore your account on the Polkadot Vault app."]}),"\n",(0,a.jsx)(t.h2,{id:"signing-extrinsics",children:"Signing Extrinsics"}),"\n",(0,a.jsx)(t.admonition,{title:"Always check for Metadata Updates",type:"warning",children:(0,a.jsxs)(t.p,{children:["Before signing extrinsics with the Polkadot Vault app, always check for metadata updates.\n",(0,a.jsx)(t.a,{href:"https://youtu.be/gbvrHzr4EDY?t=328",children:(0,a.jsx)(t.strong,{children:"This video tutorial"})})," will explain how to do it."]})}),"\n",(0,a.jsxs)(t.p,{children:["Remember to always check for metadata updates before signing transactions. See\n",(0,a.jsx)(t.a,{href:"https://github.com/w3f/polkadot-wiki/pull/4600/files#diff-5d4d0a286cdc7b1d016ee155f9694dbcddc13f5264490fc1a960c38000baca4d",children:"this article"}),"\nto learn how to sign transactions and\n",(0,a.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000184128-polkadot-vault-how-to-add-a-new-chain-and-update-the-metadata",children:"this article"}),"\non how to easily add new chains and do metadata updates using the Vault app."]}),"\n",(0,a.jsx)(t.p,{children:"The procedure to sign transactions with the Vault app is as follows:"}),"\n",(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsx)(t.li,{children:"The wallet or browser extension will show a QR code encoding the information about what you are\ngoing to sign."}),"\n",(0,a.jsxs)(t.li,{children:["After scanning the QR code with the Vault app, you will be presented with decoded information\nabout what you will sign. Make sure the information matches what you intended to sign in the first\nplace. If something does not feel right, do not sign. Check\n",(0,a.jsx)(t.a,{href:"/docs/transaction-attacks#corrupted-qr-code-parity-signer",children:"this page"})," for more information and\ncontact ",(0,a.jsx)(t.a,{href:"https://support.polkadot.network/support/home",children:"the Polkadot Support Team"}),"."]}),"\n",(0,a.jsx)(t.li,{children:"If the information shown by the Vault app is correct, you can present the QR code (signature) to\nthe camera on your laptop to sign for the transaction."}),"\n"]}),"\n",(0,a.jsx)(t.admonition,{title:"QR codes are signature-specific",type:"info",children:(0,a.jsx)(t.p,{children:"Note that QR codes are signature-specific. If someone by chance has access to the QR code signature\nfor one of your transactions, future transactions cannot be signed with that same QR code, and it is\nimpossible to find out the private key of your account only with that QR code."})}),"\n",(0,a.jsx)(t.h2,{id:"update-the-vault-app",children:"Update the Vault App"}),"\n",(0,a.jsx)(t.admonition,{type:"danger",children:(0,a.jsx)(t.p,{children:"Ensure you always have your mnemonic seed phrase secure and available."})}),"\n",(0,a.jsxs)(t.p,{children:["To securely update the Polkadot Vault app follow the instructions\n",(0,a.jsx)(t.a,{href:"https://github.com/novasamatech/parity-signer/blob/master/docs/src/tutorials/Upgrading.md",children:"here"}),".\nBriefly,"]}),"\n",(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsx)(t.li,{children:"backup your accounts (Backup key Set > write down the mnemonic seed phrase),"}),"\n",(0,a.jsx)(t.li,{children:"factory reset your Vault app (Settings > Wipe all Data),"}),"\n",(0,a.jsx)(t.li,{children:"factory reset your phone,"}),"\n",(0,a.jsx)(t.li,{children:"re-install the Vault app,"}),"\n",(0,a.jsx)(t.li,{children:"go offline (airplane mode, no wifi),"}),"\n",(0,a.jsx)(t.li,{children:"recover your accounts (Add Key Set > Recover Key Set)."}),"\n"]}),"\n",(0,a.jsx)(t.h2,{id:"security-notes",children:"Security Notes"}),"\n",(0,a.jsx)(t.admonition,{title:"Remove SIM cards and Forget Networks",type:"info",children:(0,a.jsx)(t.p,{children:"To avoid unintended connection of your phone to the Internet, remove SIM cards, reset eSIM settings,\nand forget any added WiFi networks. In this way, the only possibility of having an unintended\ninternet connection is either through the cellular network or through WiFi connection."})}),"\n",(0,a.jsx)(t.p,{children:"The Vault app has a Log that will tell you all activities performed with it. It is important to mark\ndown the last action, you did so that you can do a security check the next time you use the app.\nAlso, the Vault app will always tell you if the phone has been (even briefly) connected to the\nInternet. In case of an unrecognized connection, it is recommended to:"}),"\n",(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsx)(t.li,{children:"Backup your accounts (i.e. make sure you have the mnemonic seed phrases)"}),"\n",(0,a.jsxs)(t.li,{children:["Follow the steps in ",(0,a.jsx)(t.a,{href:"#update-the-vault-app",children:"Update the Vault app"})]}),"\n",(0,a.jsx)(t.li,{children:"Once offline, create a new account on the Vault app"}),"\n",(0,a.jsx)(t.li,{children:"Import the compromised accounts and transfer the funds to the new non-compromised account."}),"\n"]}),"\n",(0,a.jsx)(t.admonition,{title:"The Vault App has the option to export private keys",type:"danger",children:(0,a.jsxs)(t.p,{children:['If an account\'s private key has been exported from the Vault app, the public key will be marked as\n"hot" and the following message will be displayed ',(0,a.jsx)(t.em,{children:"This key is marked hot because its root private\nkey has been exported"}),"."]})}),"\n",(0,a.jsx)(t.p,{children:"You might consider exporting the private key if you are switching air-gapped phone. If you choose to\nexport your private key, avoid the following:"}),"\n",(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsx)(t.li,{children:'Do not export your private key to a device that is connected to the internet, as your key will not\nbe "cold" anymore.'}),"\n",(0,a.jsx)(t.li,{children:"Do not print private keys QR codes over an internet connection."}),"\n"]}),"\n",(0,a.jsx)(t.h2,{id:"add-chains",children:"Add Chains"}),"\n",(0,a.jsxs)(t.p,{children:["The Vault app contains default chain specs for Polkadot, Kusama, and Westend. It is possible to add\nmore chains via QR-code, and update their metadata by generating your own QR-code fountain in a\nmetadata portal similar to that ",(0,a.jsx)(t.a,{href:"https://metadata.parity.io/#/polkadot",children:"signed by Parity"}),".\nAlternatively, you can use a third-party provider to add chains and their metadata. Check\n",(0,a.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000184128-polkadot-vault-how-to-add-a-new-chain-and-update-the-metadata",children:"this article"}),"\nfor detailed instructions. If you choose this approach, you should trust the provider you choose."]}),"\n",(0,a.jsx)(t.hr,{}),"\n",(0,a.jsx)(t.admonition,{title:"Polkadot-JS Guides",type:"info",children:(0,a.jsxs)(t.p,{children:["If you are an advanced user, see the\n",(0,a.jsx)(t.a,{href:"/docs/learn-guides-vault",children:"Polkadot-JS guides about Polkadot Vault"}),"."]})})]})}function h(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,a.jsx)(t,{...e,children:(0,a.jsx)(c,{...e})}):c(e)}},28453:(e,t,n)=>{n.d(t,{R:()=>s,x:()=>r});var a=n(96540);const o={},i=a.createContext(o);function s(e){const t=a.useContext(i);return a.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:s(e.components),a.createElement(i.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/df154d69.26e47ce3.js b/assets/js/df154d69.26e47ce3.js new file mode 100644 index 000000000000..0e7b5e4419cf --- /dev/null +++ b/assets/js/df154d69.26e47ce3.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3880],{79822:(e,s,n)=>{n.r(s),n.d(s,{assets:()=>c,contentTitle:()=>r,default:()=>d,frontMatter:()=>i,metadata:()=>t,toc:()=>l});const t=JSON.parse('{"id":"learn/learn-xcm","title":"Introduction to Cross-Consensus Message Format (XCM)","description":"XCM, The Messaging Format at the Forefront of Interoperability.","source":"@site/../docs/learn/learn-xcm.md","sourceDirName":"learn","slug":"/learn-xcm","permalink":"/docs/learn-xcm","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-xcm.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1727943421000,"frontMatter":{"id":"learn-xcm","title":"Introduction to Cross-Consensus Message Format (XCM)","sidebar_label":"Cross-Consensus Message Format (XCM)","description":"XCM, The Messaging Format at the Forefront of Interoperability.","keywords":["cross-consensus","XCM","XCMP","interoperability","communication"],"slug":"../learn-xcm"},"sidebar":"docs","previous":{"title":"Cross Consensus Messaging (XCM)","permalink":"/docs/learn-xcm-index"},"next":{"title":"XCM Pallet","permalink":"/docs/learn-xcm-pallet"}}');var o=n(74848),a=n(28453);const i={id:"learn-xcm",title:"Introduction to Cross-Consensus Message Format (XCM)",sidebar_label:"Cross-Consensus Message Format (XCM)",description:"XCM, The Messaging Format at the Forefront of Interoperability.",keywords:["cross-consensus","XCM","XCMP","interoperability","communication"],slug:"../learn-xcm"},r=void 0,c={},l=[{value:"A Format, Not a Protocol",id:"a-format-not-a-protocol",level:2},{value:"XCM Tech Stack",id:"xcm-tech-stack",level:3},{value:"Core Functionality of XCM",id:"core-functionality-of-xcm",level:2},{value:"Cross-Consensus Message Format (XCM Format)",id:"cross-consensus-message-format-xcm-format",level:4},{value:"Resources",id:"resources",level:2}];function h(e){const s={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",h4:"h4",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,a.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(s.admonition,{title:"XCM Documentation",type:"info",children:(0,o.jsxs)(s.p,{children:["For a more practical approach to utilizing XCM, refer to the ",(0,o.jsx)(s.a,{href:"./learn/xcm",children:"XCM Docs"}),". Please keep in\nmind that XCM is under active development."]})}),"\n",(0,o.jsxs)(s.p,{children:["The Cross-Consensus Message Format, or ",(0,o.jsx)(s.strong,{children:"XCM"}),", is a ",(0,o.jsx)(s.strong,{children:"messaging format"})," and language used to\ncommunicate between consensus systems."]}),"\n",(0,o.jsx)(s.p,{children:'One of Polkadot\'s main functionalities is interoperability amongst parachains and any other\nparticipating consensus-driven systems. XCM is the language through which complex, cross-consensus\ninteractions can occur. Two blockchains can "speak" XCM to seamlessly interact with each other using\na standard messaging format.'}),"\n",(0,o.jsx)(s.admonition,{type:"info",children:(0,o.jsx)(s.p,{children:"We typically discuss XCM in the context of parachains, but please bear this in mind that it expands\nto the domain of all consensus systems! Remember, a consensus system here means any system or\nprotocol that achieves finality to agree on the latest and correct state, whether it's a Polkadot\nparachain, an EVM smart contract, or other bridged consensus systems."})}),"\n",(0,o.jsxs)(s.p,{children:["XCM is not meant to be only specific to Polkadot, but rather its primary intention is to define a\n",(0,o.jsx)(s.strong,{children:"generic"})," and ",(0,o.jsx)(s.strong,{children:"common"})," format amongst different consensus systems to communicate."]}),"\n",(0,o.jsx)(s.p,{children:"It's important to note that XCM does not define how messages are delivered but rather define how\nthey should look, act, and contain relative instructions to the on-chain actions the message intends\nto perform."}),"\n",(0,o.jsxs)(s.p,{children:[(0,o.jsx)(s.a,{href:"/docs/learn-xcm-transport#xcmp-design",children:(0,o.jsx)(s.strong,{children:"XCMP"})}),", or Cross Chain Message Passing, is the actual\nnetwork-layer protocol to deliver XCM-formatted messages to other participating parachains. There\nare other ways to define transport layer protocols for delivering XCM messages(see:\n",(0,o.jsx)(s.a,{href:"/docs/learn-xcm-transport#hrmp-xcmp-lite",children:"HRMP"})," and\n",(0,o.jsx)(s.a,{href:"/docs/learn-xcm-transport#vmp-vertical-message-passing",children:"VMP"}),")."]}),"\n",(0,o.jsx)(s.p,{children:"XCM has four high-level core design principles which it stands to follow:"}),"\n",(0,o.jsxs)(s.ol,{children:["\n",(0,o.jsxs)(s.li,{children:[(0,o.jsx)(s.strong,{children:"Asynchronous"}),": XCM messages in no way assume that the sender will be blocking on its\ncompletion."]}),"\n",(0,o.jsxs)(s.li,{children:[(0,o.jsx)(s.strong,{children:"Absolute"}),": XCM messages are guaranteed to be delivered and interpreted accurately, in order\nand in a timely fashion. Once a message is sent, one can be sure it will be processed as it was\nintended to be."]}),"\n",(0,o.jsxs)(s.li,{children:[(0,o.jsx)(s.strong,{children:"Asymmetric"}),": XCM messages, by default, do not have results that let the sender know that the\nmessage was received - they follow the 'fire and forget' paradigm. Any results must be separately\ncommunicated to the sender with an additional message back to the origin."]}),"\n",(0,o.jsxs)(s.li,{children:[(0,o.jsx)(s.strong,{children:"Agnostic"}),": XCM makes no assumptions about the nature of the consensus systems between which\nthe messages are being passed. XCM as a message format should be usable in any system that\nderives finality through consensus."]}),"\n"]}),"\n",(0,o.jsx)(s.p,{children:"These four crucial design decisions allow for XCM messages to be a reliable yet convenient way to\nproperly convey the intentions from one consensus system to another without any compatibility\nissues."}),"\n",(0,o.jsx)(s.admonition,{type:"note",children:(0,o.jsxs)(s.p,{children:["XCM is constantly in development - meaning the format is expected to change over time. XCM v3 is the\nlatest version, and is deployed on Polkadot. To view updates on the XCM format, visit the\n",(0,o.jsx)(s.a,{href:"https://github.com/paritytech/xcm-format",children:"xcm-format repository"})," to view any RFCs that have been\nsubmitted that would contribute to the next release."]})}),"\n",(0,o.jsx)(s.h2,{id:"a-format-not-a-protocol",children:"A Format, Not a Protocol"}),"\n",(0,o.jsxs)(s.p,{children:["What started as an approach to ",(0,o.jsx)(s.em,{children:"cross-chain communication"}),", has evolved into a format for\n",(0,o.jsx)(s.a,{href:"https://polkadot.network/cross-chain-communication",children:(0,o.jsx)(s.strong,{children:"Cross-Consensus Communication"})})," that is not\nonly conducted between chains, but also between smart contracts, pallets, bridges, and even sharded\nenclaves like ",(0,o.jsx)(s.a,{href:"/docs/learn-spree",children:"SPREE"}),"."]}),"\n",(0,o.jsx)(s.p,{children:"XCM cannot actually send messages between systems. It is a format for how message transfer should be\nperformed, similar to how RESTful services use REST as an architectural style of development, where\nHTTP requests contain specific parameters to perform some action."}),"\n",(0,o.jsx)(s.p,{children:'Similar to UDP, out of the box XCM is a "fire and forget" model, unless there is a separate XCM\nmessage designed to be a response message which can be sent from the recipient to the sender. All\nerror handling should also be done on the recipient side.'}),"\n",(0,o.jsx)(s.admonition,{type:"info",children:(0,o.jsx)(s.p,{children:"XCM is not designed in a way where every system supporting the format is expected to be able to\ninterpret any possible XCM message. Practically speaking, one can imagine that some messages will\nnot have reasonable interpretations under some systems or will be intentionally unsupported."})}),"\n",(0,o.jsxs)(s.p,{children:["Furthermore, it's essential to realize that XCM messages by themselves are ",(0,o.jsx)(s.em,{children:"not"})," considered\ntransactions. XCM describes how to change the state of the target network, but the message by itself\ndoesn't perform the state change."]}),"\n",(0,o.jsxs)(s.p,{children:["This partly ties to what is called ",(0,o.jsx)(s.strong,{children:"asynchronous composability"}),", which allows XCM messages to\nbypass the concept of time-constrained mechanisms, like on-chain scheduling and execution over time\nin the correct order in which it was intended."]}),"\n",(0,o.jsx)(s.h3,{id:"xcm-tech-stack",children:"XCM Tech Stack"}),"\n",(0,o.jsx)(s.p,{children:(0,o.jsx)(s.img,{alt:"xcm tech stack",src:n(60288).A+"",width:"1204",height:"1316"})}),"\n",(0,o.jsx)(s.p,{children:"XCM can be used to express the meaning of the messages over each of these three communication\nchannels."}),"\n",(0,o.jsx)(s.h2,{id:"core-functionality-of-xcm",children:"Core Functionality of XCM"}),"\n",(0,o.jsx)(s.p,{children:"XCM opens the doors to a multi-hop, multi-network communications."}),"\n",(0,o.jsx)(s.p,{children:"XCM introduces some key features and additions to cross-consensus messaging, including:"}),"\n",(0,o.jsxs)(s.ol,{children:["\n",(0,o.jsxs)(s.li,{children:["\n",(0,o.jsxs)(s.p,{children:[(0,o.jsx)(s.strong,{children:"Programmability"})," - the ability to have ",(0,o.jsx)(s.strong,{children:"expectations"})," for messages, which allow for more\ncomprehensive use cases, safe dispatches for version checking, branching, and NFT/Asset support."]}),"\n"]}),"\n",(0,o.jsxs)(s.li,{children:["\n",(0,o.jsxs)(s.p,{children:[(0,o.jsx)(s.strong,{children:"Functional Multichain Decomposition"})," - the ability to define mechanisms to cross-reference and\nperform actions on other chains on behalf of the origin chain (remote locking), context/id for\nthese messages, and asset namespacing."]}),"\n"]}),"\n",(0,o.jsxs)(s.li,{children:["\n",(0,o.jsxs)(s.p,{children:[(0,o.jsx)(s.strong,{children:"Bridging"})," - introduces the concept of a universal location, which allows for a base reference\nfor global consensus systems for multi-hop setups. This location is above the parent relay chain\nor other consensus systems like Ethereum or Bitcoin."]}),"\n"]}),"\n"]}),"\n",(0,o.jsxs)(s.p,{children:["A core part of the vision that XCM provides is improving communication between the chains to make\n",(0,o.jsx)(s.strong,{children:"system parachains"})," a reality. For example, the Polkadot relay chain handles more than just\nparachain management and shared security - it handles user balances/assets, governance, and staking.\nIdeally, the relay chain should be for what it's intended to be - a place for shared security.\nSystem parachains can alleviate these core responsibilities from the relay chain but only by using a\nstandard format like XCM."]}),"\n",(0,o.jsx)(s.p,{children:"This is where system parachains come in, where each of these core responsibilities can be delegated\nto a system parachain respectively."}),"\n",(0,o.jsx)(s.admonition,{type:"info",children:(0,o.jsx)(s.p,{children:"XCM bridging, functional multichain decomposition, and programmability upgrades are crucial to\nbringing ecosystems together using a common communication abstraction."})}),"\n",(0,o.jsxs)(s.p,{children:["For more information on the specific instructions used for these key features, head over to the\n",(0,o.jsx)(s.a,{href:"/docs/learn-xcm-instructions",children:"instructions and registers page"}),"."]}),"\n",(0,o.jsx)(s.h4,{id:"cross-consensus-message-format-xcm-format",children:"Cross-Consensus Message Format (XCM Format)"}),"\n",(0,o.jsxs)(s.p,{children:["For an updated and complete description of the cross-consensus message format please see the\n",(0,o.jsx)(s.a,{href:"https://github.com/paritytech/xcm-format",children:"xcm-format repository on GitHub"}),"."]}),"\n",(0,o.jsx)(s.h2,{id:"resources",children:"Resources"}),"\n",(0,o.jsxs)(s.ul,{children:["\n",(0,o.jsxs)(s.li,{children:["\n",(0,o.jsxs)(s.p,{children:[(0,o.jsx)(s.a,{href:"https://www.youtube.com/watch?v=cS8GvPGMLS0",children:"Shawn Tabrizi: XCM - The Backbone Of A Multichain Future | Polkadot Decoded 2022"})," -\nHigh level overview which should answer \u201cWhat is XCM?"]}),"\n"]}),"\n",(0,o.jsxs)(s.li,{children:["\n",(0,o.jsxs)(s.p,{children:[(0,o.jsx)(s.a,{href:"https://medium.com/polkadot-network/xcm-the-cross-consensus-message-format-3b77b1373392",children:"XCM: The Cross-Consensus Message Format"})," -\nDetailed blog post by Dr. Gavin Wood about the XCM Format."]}),"\n"]}),"\n",(0,o.jsxs)(s.li,{children:["\n",(0,o.jsxs)(s.p,{children:[(0,o.jsx)(s.a,{href:"https://github.com/paritytech/xcm-format",children:"XCM Format specification"})," - The best starting point for\nunderstanding the XCM API at a technical level."]}),"\n"]}),"\n",(0,o.jsxs)(s.li,{children:["\n",(0,o.jsxs)(s.p,{children:[(0,o.jsx)(s.a,{href:"https://www.youtube.com/watch?v=K2c6xrCoQOU&t=1196s",children:"Gavin Wood, Polkadot founder: XCM v3 | Polkadot Decoded 2022"})," -\nHigh level overview of XCM and specifically the new features available in XCM v3."]}),"\n"]}),"\n",(0,o.jsxs)(s.li,{children:["\n",(0,o.jsxs)(s.p,{children:[(0,o.jsx)(s.a,{href:"https://medium.com/web3foundation/polkadots-messaging-scheme-b1ec560908b7",children:"XCMP Scheme"})," - An\noverall overview of XCMP describing a number of design decisions."]}),"\n"]}),"\n",(0,o.jsxs)(s.li,{children:["\n",(0,o.jsxs)(s.p,{children:[(0,o.jsx)(s.a,{href:"https://paritytech.github.io/polkadot/book/types/messages.html",children:"Messaging Overview"})," - An overview\nof the messaging schemes from the Polkadot Parachain Host Implementor's guide."]}),"\n"]}),"\n",(0,o.jsxs)(s.li,{children:["\n",(0,o.jsxs)(s.p,{children:[(0,o.jsx)(s.a,{href:"https://www.youtube.com/watch?v=5cgq5jOZx9g",children:"Sub0 Online: Getting Started with XCM - Your First Cross Chain Messages"})," -\nCode focused workshop on how XCM v1 works, and the core concepts of XCM."]}),"\n"]}),"\n",(0,o.jsxs)(s.li,{children:["\n",(0,o.jsxs)(s.p,{children:[(0,o.jsx)(s.a,{href:"https://blog.quarkslab.com/resources/2022-02-27-xcmv2-audit/21-12-908-REP.pdf",children:"XCM: Cross-Consensus Messaging Audit"})," -\nTechnical audit report by Quarkslab prepared for Parity."]}),"\n"]}),"\n",(0,o.jsxs)(s.li,{children:["\n",(0,o.jsxs)(s.p,{children:[(0,o.jsx)(s.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/master/polkadot/xcm/pallet-xcm/src/lib.rs",children:"XCM pallet code"})," -\nThe pallet that contains XCM logic from the Polkadot code repository"]}),"\n"]}),"\n",(0,o.jsxs)(s.li,{children:["\n",(0,o.jsxs)(s.p,{children:[(0,o.jsx)(s.a,{href:"https://www.youtube.com/watch?v=bFMvWmU1pYI",children:"XCM Config & Pallet-XCM | Polkadot Deep Dives"})," - A\ntechnical deep dive into ",(0,o.jsx)(s.code,{children:"pallet-xcm"})," and the XCM configuration."]}),"\n"]}),"\n"]})]})}function d(e={}){const{wrapper:s}={...(0,a.R)(),...e.components};return s?(0,o.jsx)(s,{...e,children:(0,o.jsx)(h,{...e})}):h(e)}},60288:(e,s,n)=>{n.d(s,{A:()=>t});const t=n.p+"assets/images/cross-consensus-tech-stack-e9c1b2ab8b6f6f3f9a78b3a412af0698.png"},28453:(e,s,n)=>{n.d(s,{R:()=>i,x:()=>r});var t=n(96540);const o={},a=t.createContext(o);function i(e){const s=t.useContext(a);return t.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function r(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:i(e.components),t.createElement(a.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/df154d69.f986432f.js b/assets/js/df154d69.f986432f.js deleted file mode 100644 index 40ce2ca0ba80..000000000000 --- a/assets/js/df154d69.f986432f.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3880],{80179:(e,s,n)=>{n.r(s),n.d(s,{assets:()=>c,contentTitle:()=>i,default:()=>d,frontMatter:()=>a,metadata:()=>r,toc:()=>l});var t=n(74848),o=n(28453);const a={id:"learn-xcm",title:"Introduction to Cross-Consensus Message Format (XCM)",sidebar_label:"Cross-Consensus Message Format (XCM)",description:"XCM, The Messaging Format at the Forefront of Interoperability.",keywords:["cross-consensus","XCM","XCMP","interoperability","communication"],slug:"../learn-xcm"},i=void 0,r={id:"learn/learn-xcm",title:"Introduction to Cross-Consensus Message Format (XCM)",description:"XCM, The Messaging Format at the Forefront of Interoperability.",source:"@site/../docs/learn/learn-xcm.md",sourceDirName:"learn",slug:"/learn-xcm",permalink:"/docs/learn-xcm",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-xcm.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1727943421e3,frontMatter:{id:"learn-xcm",title:"Introduction to Cross-Consensus Message Format (XCM)",sidebar_label:"Cross-Consensus Message Format (XCM)",description:"XCM, The Messaging Format at the Forefront of Interoperability.",keywords:["cross-consensus","XCM","XCMP","interoperability","communication"],slug:"../learn-xcm"},sidebar:"docs",previous:{title:"Cross Consensus Messaging (XCM)",permalink:"/docs/learn-xcm-index"},next:{title:"XCM Pallet",permalink:"/docs/learn-xcm-pallet"}},c={},l=[{value:"A Format, Not a Protocol",id:"a-format-not-a-protocol",level:2},{value:"XCM Tech Stack",id:"xcm-tech-stack",level:3},{value:"Core Functionality of XCM",id:"core-functionality-of-xcm",level:2},{value:"Cross-Consensus Message Format (XCM Format)",id:"cross-consensus-message-format-xcm-format",level:4},{value:"Resources",id:"resources",level:2}];function h(e){const s={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",h4:"h4",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,o.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.admonition,{title:"XCM Documentation",type:"info",children:(0,t.jsxs)(s.p,{children:["For a more practical approach to utilizing XCM, refer to the ",(0,t.jsx)(s.a,{href:"./learn/xcm",children:"XCM Docs"}),". Please keep in\nmind that XCM is under active development."]})}),"\n",(0,t.jsxs)(s.p,{children:["The Cross-Consensus Message Format, or ",(0,t.jsx)(s.strong,{children:"XCM"}),", is a ",(0,t.jsx)(s.strong,{children:"messaging format"})," and language used to\ncommunicate between consensus systems."]}),"\n",(0,t.jsx)(s.p,{children:'One of Polkadot\'s main functionalities is interoperability amongst parachains and any other\nparticipating consensus-driven systems. XCM is the language through which complex, cross-consensus\ninteractions can occur. Two blockchains can "speak" XCM to seamlessly interact with each other using\na standard messaging format.'}),"\n",(0,t.jsx)(s.admonition,{type:"info",children:(0,t.jsx)(s.p,{children:"We typically discuss XCM in the context of parachains, but please bear this in mind that it expands\nto the domain of all consensus systems! Remember, a consensus system here means any system or\nprotocol that achieves finality to agree on the latest and correct state, whether it's a Polkadot\nparachain, an EVM smart contract, or other bridged consensus systems."})}),"\n",(0,t.jsxs)(s.p,{children:["XCM is not meant to be only specific to Polkadot, but rather its primary intention is to define a\n",(0,t.jsx)(s.strong,{children:"generic"})," and ",(0,t.jsx)(s.strong,{children:"common"})," format amongst different consensus systems to communicate."]}),"\n",(0,t.jsx)(s.p,{children:"It's important to note that XCM does not define how messages are delivered but rather define how\nthey should look, act, and contain relative instructions to the on-chain actions the message intends\nto perform."}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.a,{href:"/docs/learn-xcm-transport#xcmp-design",children:(0,t.jsx)(s.strong,{children:"XCMP"})}),", or Cross Chain Message Passing, is the actual\nnetwork-layer protocol to deliver XCM-formatted messages to other participating parachains. There\nare other ways to define transport layer protocols for delivering XCM messages(see:\n",(0,t.jsx)(s.a,{href:"/docs/learn-xcm-transport#hrmp-xcmp-lite",children:"HRMP"})," and\n",(0,t.jsx)(s.a,{href:"/docs/learn-xcm-transport#vmp-vertical-message-passing",children:"VMP"}),")."]}),"\n",(0,t.jsx)(s.p,{children:"XCM has four high-level core design principles which it stands to follow:"}),"\n",(0,t.jsxs)(s.ol,{children:["\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.strong,{children:"Asynchronous"}),": XCM messages in no way assume that the sender will be blocking on its\ncompletion."]}),"\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.strong,{children:"Absolute"}),": XCM messages are guaranteed to be delivered and interpreted accurately, in order\nand in a timely fashion. Once a message is sent, one can be sure it will be processed as it was\nintended to be."]}),"\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.strong,{children:"Asymmetric"}),": XCM messages, by default, do not have results that let the sender know that the\nmessage was received - they follow the 'fire and forget' paradigm. Any results must be separately\ncommunicated to the sender with an additional message back to the origin."]}),"\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.strong,{children:"Agnostic"}),": XCM makes no assumptions about the nature of the consensus systems between which\nthe messages are being passed. XCM as a message format should be usable in any system that\nderives finality through consensus."]}),"\n"]}),"\n",(0,t.jsx)(s.p,{children:"These four crucial design decisions allow for XCM messages to be a reliable yet convenient way to\nproperly convey the intentions from one consensus system to another without any compatibility\nissues."}),"\n",(0,t.jsx)(s.admonition,{type:"note",children:(0,t.jsxs)(s.p,{children:["XCM is constantly in development - meaning the format is expected to change over time. XCM v3 is the\nlatest version, and is deployed on Polkadot. To view updates on the XCM format, visit the\n",(0,t.jsx)(s.a,{href:"https://github.com/paritytech/xcm-format",children:"xcm-format repository"})," to view any RFCs that have been\nsubmitted that would contribute to the next release."]})}),"\n",(0,t.jsx)(s.h2,{id:"a-format-not-a-protocol",children:"A Format, Not a Protocol"}),"\n",(0,t.jsxs)(s.p,{children:["What started as an approach to ",(0,t.jsx)(s.em,{children:"cross-chain communication"}),", has evolved into a format for\n",(0,t.jsx)(s.a,{href:"https://polkadot.network/cross-chain-communication",children:(0,t.jsx)(s.strong,{children:"Cross-Consensus Communication"})})," that is not\nonly conducted between chains, but also between smart contracts, pallets, bridges, and even sharded\nenclaves like ",(0,t.jsx)(s.a,{href:"/docs/learn-spree",children:"SPREE"}),"."]}),"\n",(0,t.jsx)(s.p,{children:"XCM cannot actually send messages between systems. It is a format for how message transfer should be\nperformed, similar to how RESTful services use REST as an architectural style of development, where\nHTTP requests contain specific parameters to perform some action."}),"\n",(0,t.jsx)(s.p,{children:'Similar to UDP, out of the box XCM is a "fire and forget" model, unless there is a separate XCM\nmessage designed to be a response message which can be sent from the recipient to the sender. All\nerror handling should also be done on the recipient side.'}),"\n",(0,t.jsx)(s.admonition,{type:"info",children:(0,t.jsx)(s.p,{children:"XCM is not designed in a way where every system supporting the format is expected to be able to\ninterpret any possible XCM message. Practically speaking, one can imagine that some messages will\nnot have reasonable interpretations under some systems or will be intentionally unsupported."})}),"\n",(0,t.jsxs)(s.p,{children:["Furthermore, it's essential to realize that XCM messages by themselves are ",(0,t.jsx)(s.em,{children:"not"})," considered\ntransactions. XCM describes how to change the state of the target network, but the message by itself\ndoesn't perform the state change."]}),"\n",(0,t.jsxs)(s.p,{children:["This partly ties to what is called ",(0,t.jsx)(s.strong,{children:"asynchronous composability"}),", which allows XCM messages to\nbypass the concept of time-constrained mechanisms, like on-chain scheduling and execution over time\nin the correct order in which it was intended."]}),"\n",(0,t.jsx)(s.h3,{id:"xcm-tech-stack",children:"XCM Tech Stack"}),"\n",(0,t.jsx)(s.p,{children:(0,t.jsx)(s.img,{alt:"xcm tech stack",src:n(60288).A+"",width:"1204",height:"1316"})}),"\n",(0,t.jsx)(s.p,{children:"XCM can be used to express the meaning of the messages over each of these three communication\nchannels."}),"\n",(0,t.jsx)(s.h2,{id:"core-functionality-of-xcm",children:"Core Functionality of XCM"}),"\n",(0,t.jsx)(s.p,{children:"XCM opens the doors to a multi-hop, multi-network communications."}),"\n",(0,t.jsx)(s.p,{children:"XCM introduces some key features and additions to cross-consensus messaging, including:"}),"\n",(0,t.jsxs)(s.ol,{children:["\n",(0,t.jsxs)(s.li,{children:["\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.strong,{children:"Programmability"})," - the ability to have ",(0,t.jsx)(s.strong,{children:"expectations"})," for messages, which allow for more\ncomprehensive use cases, safe dispatches for version checking, branching, and NFT/Asset support."]}),"\n"]}),"\n",(0,t.jsxs)(s.li,{children:["\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.strong,{children:"Functional Multichain Decomposition"})," - the ability to define mechanisms to cross-reference and\nperform actions on other chains on behalf of the origin chain (remote locking), context/id for\nthese messages, and asset namespacing."]}),"\n"]}),"\n",(0,t.jsxs)(s.li,{children:["\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.strong,{children:"Bridging"})," - introduces the concept of a universal location, which allows for a base reference\nfor global consensus systems for multi-hop setups. This location is above the parent relay chain\nor other consensus systems like Ethereum or Bitcoin."]}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(s.p,{children:["A core part of the vision that XCM provides is improving communication between the chains to make\n",(0,t.jsx)(s.strong,{children:"system parachains"})," a reality. For example, the Polkadot relay chain handles more than just\nparachain management and shared security - it handles user balances/assets, governance, and staking.\nIdeally, the relay chain should be for what it's intended to be - a place for shared security.\nSystem parachains can alleviate these core responsibilities from the relay chain but only by using a\nstandard format like XCM."]}),"\n",(0,t.jsx)(s.p,{children:"This is where system parachains come in, where each of these core responsibilities can be delegated\nto a system parachain respectively."}),"\n",(0,t.jsx)(s.admonition,{type:"info",children:(0,t.jsx)(s.p,{children:"XCM bridging, functional multichain decomposition, and programmability upgrades are crucial to\nbringing ecosystems together using a common communication abstraction."})}),"\n",(0,t.jsxs)(s.p,{children:["For more information on the specific instructions used for these key features, head over to the\n",(0,t.jsx)(s.a,{href:"/docs/learn-xcm-instructions",children:"instructions and registers page"}),"."]}),"\n",(0,t.jsx)(s.h4,{id:"cross-consensus-message-format-xcm-format",children:"Cross-Consensus Message Format (XCM Format)"}),"\n",(0,t.jsxs)(s.p,{children:["For an updated and complete description of the cross-consensus message format please see the\n",(0,t.jsx)(s.a,{href:"https://github.com/paritytech/xcm-format",children:"xcm-format repository on GitHub"}),"."]}),"\n",(0,t.jsx)(s.h2,{id:"resources",children:"Resources"}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:["\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.a,{href:"https://www.youtube.com/watch?v=cS8GvPGMLS0",children:"Shawn Tabrizi: XCM - The Backbone Of A Multichain Future | Polkadot Decoded 2022"})," -\nHigh level overview which should answer \u201cWhat is XCM?"]}),"\n"]}),"\n",(0,t.jsxs)(s.li,{children:["\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.a,{href:"https://medium.com/polkadot-network/xcm-the-cross-consensus-message-format-3b77b1373392",children:"XCM: The Cross-Consensus Message Format"})," -\nDetailed blog post by Dr. Gavin Wood about the XCM Format."]}),"\n"]}),"\n",(0,t.jsxs)(s.li,{children:["\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.a,{href:"https://github.com/paritytech/xcm-format",children:"XCM Format specification"})," - The best starting point for\nunderstanding the XCM API at a technical level."]}),"\n"]}),"\n",(0,t.jsxs)(s.li,{children:["\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.a,{href:"https://www.youtube.com/watch?v=K2c6xrCoQOU&t=1196s",children:"Gavin Wood, Polkadot founder: XCM v3 | Polkadot Decoded 2022"})," -\nHigh level overview of XCM and specifically the new features available in XCM v3."]}),"\n"]}),"\n",(0,t.jsxs)(s.li,{children:["\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.a,{href:"https://medium.com/web3foundation/polkadots-messaging-scheme-b1ec560908b7",children:"XCMP Scheme"})," - An\noverall overview of XCMP describing a number of design decisions."]}),"\n"]}),"\n",(0,t.jsxs)(s.li,{children:["\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.a,{href:"https://paritytech.github.io/polkadot/book/types/messages.html",children:"Messaging Overview"})," - An overview\nof the messaging schemes from the Polkadot Parachain Host Implementor's guide."]}),"\n"]}),"\n",(0,t.jsxs)(s.li,{children:["\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.a,{href:"https://www.youtube.com/watch?v=5cgq5jOZx9g",children:"Sub0 Online: Getting Started with XCM - Your First Cross Chain Messages"})," -\nCode focused workshop on how XCM v1 works, and the core concepts of XCM."]}),"\n"]}),"\n",(0,t.jsxs)(s.li,{children:["\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.a,{href:"https://blog.quarkslab.com/resources/2022-02-27-xcmv2-audit/21-12-908-REP.pdf",children:"XCM: Cross-Consensus Messaging Audit"})," -\nTechnical audit report by Quarkslab prepared for Parity."]}),"\n"]}),"\n",(0,t.jsxs)(s.li,{children:["\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/master/polkadot/xcm/pallet-xcm/src/lib.rs",children:"XCM pallet code"})," -\nThe pallet that contains XCM logic from the Polkadot code repository"]}),"\n"]}),"\n",(0,t.jsxs)(s.li,{children:["\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.a,{href:"https://www.youtube.com/watch?v=bFMvWmU1pYI",children:"XCM Config & Pallet-XCM | Polkadot Deep Dives"})," - A\ntechnical deep dive into ",(0,t.jsx)(s.code,{children:"pallet-xcm"})," and the XCM configuration."]}),"\n"]}),"\n"]})]})}function d(e={}){const{wrapper:s}={...(0,o.R)(),...e.components};return s?(0,t.jsx)(s,{...e,children:(0,t.jsx)(h,{...e})}):h(e)}},60288:(e,s,n)=>{n.d(s,{A:()=>t});const t=n.p+"assets/images/cross-consensus-tech-stack-e9c1b2ab8b6f6f3f9a78b3a412af0698.png"},28453:(e,s,n)=>{n.d(s,{R:()=>i,x:()=>r});var t=n(96540);const o={},a=t.createContext(o);function i(e){const s=t.useContext(a);return t.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function r(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:i(e.components),t.createElement(a.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/e00ac272.83602c46.js b/assets/js/e00ac272.83602c46.js deleted file mode 100644 index 80f99ad54539..000000000000 --- a/assets/js/e00ac272.83602c46.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1881],{89510:(e,i,a)=>{a.r(i),a.d(i,{assets:()=>c,contentTitle:()=>r,default:()=>h,frontMatter:()=>s,metadata:()=>o,toc:()=>l});var t=a(74848),n=a(28453);const s={id:"learn-guides-coretime-marketplaces",title:"Coretime Marketplaces",sidebar_label:"Coretime Marketplaces",description:"Usage guides for coretime marketplaces",keywords:["coretime","blockspace","on-demand","parachain","parathread","cores"],slug:"../learn-guides-coretime-marketplaces"},r=void 0,o={id:"learn/learn-guides-coretime-marketplaces",title:"Coretime Marketplaces",description:"Usage guides for coretime marketplaces",source:"@site/../docs/learn/learn-guides-coretime-marketplaces.md",sourceDirName:"learn",slug:"/learn-guides-coretime-marketplaces",permalink:"/docs/learn-guides-coretime-marketplaces",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-coretime-marketplaces.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1715081757e3,frontMatter:{id:"learn-guides-coretime-marketplaces",title:"Coretime Marketplaces",sidebar_label:"Coretime Marketplaces",description:"Usage guides for coretime marketplaces",keywords:["coretime","blockspace","on-demand","parachain","parathread","cores"],slug:"../learn-guides-coretime-marketplaces"},sidebar:"docs",previous:{title:"Agile Coretime Intro",permalink:"/docs/learn-agile-coretime"},next:{title:"Coretime for Parachains",permalink:"/docs/learn-guides-coretime-parachains"}},c={},l=[{value:"RegionX",id:"regionx",level:2},{value:"Purchasing Cores with RegionX",id:"purchasing-cores-with-regionx",level:3},{value:"Managing Cores with RegionX",id:"managing-cores-with-regionx",level:3},{value:"Lastic",id:"lastic",level:2},{value:"Purchasing Cores with Lastic",id:"purchasing-cores-with-lastic",level:3},{value:"Managing Cores with Lastic",id:"managing-cores-with-lastic",level:3}];function d(e){const i={a:"a",admonition:"admonition",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",ul:"ul",...(0,n.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i.admonition,{type:"info",children:(0,t.jsxs)(i.p,{children:["If you aren't sure what Agile Coretime is, be sure to read the\n",(0,t.jsx)(i.a,{href:"/docs/learn-agile-coretime",children:"introduction"}),",\n",(0,t.jsx)(i.a,{href:"/docs/learn-agile-coretime#agile-coretime-terminology",children:"terminology"}),", and\n",(0,t.jsx)(i.a,{href:"/docs/learn-agile-coretime#agile-coretime-faq",children:"FAQ"}),"."]})}),"\n",(0,t.jsx)(i.p,{children:"The tutorials in this document utilize:"}),"\n",(0,t.jsxs)(i.ul,{children:["\n",(0,t.jsxs)(i.li,{children:["\n",(0,t.jsxs)(i.p,{children:[(0,t.jsx)(i.a,{href:"https://app.regionx.tech/",children:"CoreHub on RegionX"}),", a user interface for purchasing and managing\nCoretime regions."]}),"\n"]}),"\n",(0,t.jsxs)(i.li,{children:["\n",(0,t.jsxs)(i.p,{children:[(0,t.jsx)(i.a,{href:"https://www.lastic.xyz/",children:"Lastic"}),", a Coretime marketplace user interface."]}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(i.admonition,{type:"caution",children:(0,t.jsx)(i.p,{children:"Both RegionX and Lastic are under active development and are released only for testing purposes."})}),"\n",(0,t.jsx)(i.h2,{id:"regionx",children:"RegionX"}),"\n",(0,t.jsx)(i.p,{children:"The RegionX CoreHub offers options to purchase and manage cores."}),"\n",(0,t.jsx)(i.p,{children:(0,t.jsx)(i.img,{alt:"RegionX-UI",src:a(91840).A+"",width:"2326",height:"1002"})}),"\n",(0,t.jsx)(i.h3,{id:"purchasing-cores-with-regionx",children:"Purchasing Cores with RegionX"}),"\n",(0,t.jsx)(i.p,{children:"RegionX allows for purchasing core with accounts hosted on wallets like Subwallet, Talisman, Nova\nWallet and Polkadot-JS Extension. Select the account to be used for the coretime purchase (displayed\non top right) and ensure that both the relay chain and coretime chain are connected (displayed on\nbottom left). Then, click on the purchase button to sign and broadcast the transaction."}),"\n",(0,t.jsx)(i.p,{children:(0,t.jsx)(i.img,{alt:"RegionX-purchase-bulk-coretime",src:a(24459).A+"",width:"2800",height:"1414"})}),"\n",(0,t.jsx)(i.h3,{id:"managing-cores-with-regionx",children:"Managing Cores with RegionX"}),"\n",(0,t.jsx)(i.p,{children:"The Regions dashboard lists all the cores purchased through the connected wallet account along with\nthe basic information of the respective core. It allows for partitioning, interlacing, transfers,\nand assigning tasks."}),"\n",(0,t.jsx)(i.p,{children:(0,t.jsx)(i.img,{alt:"RegionX-regions-dashboard",src:a(33480).A+"",width:"1957",height:"1029"})}),"\n",(0,t.jsx)(i.h2,{id:"lastic",children:"Lastic"}),"\n",(0,t.jsxs)(i.p,{children:["Lastic is a marketplace for buying and selling blockspace. For more information, check\n",(0,t.jsx)(i.a,{href:"https://docs.lastic.xyz/",children:"Lastic's official documentation"}),"."]}),"\n",(0,t.jsx)(i.h3,{id:"purchasing-cores-with-lastic",children:"Purchasing Cores with Lastic"}),"\n",(0,t.jsx)(i.p,{children:'Lastic allows for purchasing core with accounts hosted on wallets like Subwallet, Talisman, Nova\nWallet and Polkadot-JS Extension. Select the account to be used for the coretime purchase and then,\nclick on "buy core" button to sign and broadcast the transaction.'}),"\n",(0,t.jsx)(i.p,{children:(0,t.jsx)(i.img,{alt:"Lastic-purchase-bulk-coretime",src:a(20740).A+"",width:"2491",height:"1436"})}),"\n",(0,t.jsx)(i.h3,{id:"managing-cores-with-lastic",children:"Managing Cores with Lastic"}),"\n",(0,t.jsx)(i.p,{children:"Lastic enables you to transfer your core to another account, utilize it for a parachain, split it\nup, change block production frequency, or assign it to a task."}),"\n",(0,t.jsx)(i.p,{children:(0,t.jsx)(i.img,{alt:"Lastic-manage-core",src:a(91879).A+"",width:"1376",height:"1269"})})]})}function h(e={}){const{wrapper:i}={...(0,n.R)(),...e.components};return i?(0,t.jsx)(i,{...e,children:(0,t.jsx)(d,{...e})}):d(e)}},20740:(e,i,a)=>{a.d(i,{A:()=>t});const t=a.p+"assets/images/Lastic-UI-ef37d39e20534be70345616e698b1242.png"},91879:(e,i,a)=>{a.d(i,{A:()=>t});const t=a.p+"assets/images/Lastic-manage-core-dde9e3c38cf6b305be276df2b362db5e.png"},91840:(e,i,a)=>{a.d(i,{A:()=>t});const t=a.p+"assets/images/RegionX-UI-84558478a84cfabb57fb4a75c34bb72a.png"},33480:(e,i,a)=>{a.d(i,{A:()=>t});const t=a.p+"assets/images/regionx-manage-cores-e45aa9f4dae76d0091935f083e21df47.png"},24459:(e,i,a)=>{a.d(i,{A:()=>t});const t=a.p+"assets/images/regionx-purchase-core-c19d4e7686d728e10b3a31f641e9286a.png"},28453:(e,i,a)=>{a.d(i,{R:()=>r,x:()=>o});var t=a(96540);const n={},s=t.createContext(n);function r(e){const i=t.useContext(s);return t.useMemo((function(){return"function"==typeof e?e(i):{...i,...e}}),[i,e])}function o(e){let i;return i=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:r(e.components),t.createElement(s.Provider,{value:i},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/e00ac272.e755f634.js b/assets/js/e00ac272.e755f634.js new file mode 100644 index 000000000000..2b08f9a4f285 --- /dev/null +++ b/assets/js/e00ac272.e755f634.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1881],{95369:(e,i,a)=>{a.r(i),a.d(i,{assets:()=>c,contentTitle:()=>o,default:()=>h,frontMatter:()=>r,metadata:()=>t,toc:()=>l});const t=JSON.parse('{"id":"learn/learn-guides-coretime-marketplaces","title":"Coretime Marketplaces","description":"Usage guides for coretime marketplaces","source":"@site/../docs/learn/learn-guides-coretime-marketplaces.md","sourceDirName":"learn","slug":"/learn-guides-coretime-marketplaces","permalink":"/docs/learn-guides-coretime-marketplaces","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-coretime-marketplaces.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1715081757000,"frontMatter":{"id":"learn-guides-coretime-marketplaces","title":"Coretime Marketplaces","sidebar_label":"Coretime Marketplaces","description":"Usage guides for coretime marketplaces","keywords":["coretime","blockspace","on-demand","parachain","parathread","cores"],"slug":"../learn-guides-coretime-marketplaces"},"sidebar":"docs","previous":{"title":"Agile Coretime Intro","permalink":"/docs/learn-agile-coretime"},"next":{"title":"Coretime for Parachains","permalink":"/docs/learn-guides-coretime-parachains"}}');var n=a(74848),s=a(28453);const r={id:"learn-guides-coretime-marketplaces",title:"Coretime Marketplaces",sidebar_label:"Coretime Marketplaces",description:"Usage guides for coretime marketplaces",keywords:["coretime","blockspace","on-demand","parachain","parathread","cores"],slug:"../learn-guides-coretime-marketplaces"},o=void 0,c={},l=[{value:"RegionX",id:"regionx",level:2},{value:"Purchasing Cores with RegionX",id:"purchasing-cores-with-regionx",level:3},{value:"Managing Cores with RegionX",id:"managing-cores-with-regionx",level:3},{value:"Lastic",id:"lastic",level:2},{value:"Purchasing Cores with Lastic",id:"purchasing-cores-with-lastic",level:3},{value:"Managing Cores with Lastic",id:"managing-cores-with-lastic",level:3}];function d(e){const i={a:"a",admonition:"admonition",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",ul:"ul",...(0,s.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(i.admonition,{type:"info",children:(0,n.jsxs)(i.p,{children:["If you aren't sure what Agile Coretime is, be sure to read the\n",(0,n.jsx)(i.a,{href:"/docs/learn-agile-coretime",children:"introduction"}),",\n",(0,n.jsx)(i.a,{href:"/docs/learn-agile-coretime#agile-coretime-terminology",children:"terminology"}),", and\n",(0,n.jsx)(i.a,{href:"/docs/learn-agile-coretime#agile-coretime-faq",children:"FAQ"}),"."]})}),"\n",(0,n.jsx)(i.p,{children:"The tutorials in this document utilize:"}),"\n",(0,n.jsxs)(i.ul,{children:["\n",(0,n.jsxs)(i.li,{children:["\n",(0,n.jsxs)(i.p,{children:[(0,n.jsx)(i.a,{href:"https://app.regionx.tech/",children:"CoreHub on RegionX"}),", a user interface for purchasing and managing\nCoretime regions."]}),"\n"]}),"\n",(0,n.jsxs)(i.li,{children:["\n",(0,n.jsxs)(i.p,{children:[(0,n.jsx)(i.a,{href:"https://www.lastic.xyz/",children:"Lastic"}),", a Coretime marketplace user interface."]}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(i.admonition,{type:"caution",children:(0,n.jsx)(i.p,{children:"Both RegionX and Lastic are under active development and are released only for testing purposes."})}),"\n",(0,n.jsx)(i.h2,{id:"regionx",children:"RegionX"}),"\n",(0,n.jsx)(i.p,{children:"The RegionX CoreHub offers options to purchase and manage cores."}),"\n",(0,n.jsx)(i.p,{children:(0,n.jsx)(i.img,{alt:"RegionX-UI",src:a(91840).A+"",width:"2326",height:"1002"})}),"\n",(0,n.jsx)(i.h3,{id:"purchasing-cores-with-regionx",children:"Purchasing Cores with RegionX"}),"\n",(0,n.jsx)(i.p,{children:"RegionX allows for purchasing core with accounts hosted on wallets like Subwallet, Talisman, Nova\nWallet and Polkadot-JS Extension. Select the account to be used for the coretime purchase (displayed\non top right) and ensure that both the relay chain and coretime chain are connected (displayed on\nbottom left). Then, click on the purchase button to sign and broadcast the transaction."}),"\n",(0,n.jsx)(i.p,{children:(0,n.jsx)(i.img,{alt:"RegionX-purchase-bulk-coretime",src:a(24459).A+"",width:"2800",height:"1414"})}),"\n",(0,n.jsx)(i.h3,{id:"managing-cores-with-regionx",children:"Managing Cores with RegionX"}),"\n",(0,n.jsx)(i.p,{children:"The Regions dashboard lists all the cores purchased through the connected wallet account along with\nthe basic information of the respective core. It allows for partitioning, interlacing, transfers,\nand assigning tasks."}),"\n",(0,n.jsx)(i.p,{children:(0,n.jsx)(i.img,{alt:"RegionX-regions-dashboard",src:a(33480).A+"",width:"1957",height:"1029"})}),"\n",(0,n.jsx)(i.h2,{id:"lastic",children:"Lastic"}),"\n",(0,n.jsxs)(i.p,{children:["Lastic is a marketplace for buying and selling blockspace. For more information, check\n",(0,n.jsx)(i.a,{href:"https://docs.lastic.xyz/",children:"Lastic's official documentation"}),"."]}),"\n",(0,n.jsx)(i.h3,{id:"purchasing-cores-with-lastic",children:"Purchasing Cores with Lastic"}),"\n",(0,n.jsx)(i.p,{children:'Lastic allows for purchasing core with accounts hosted on wallets like Subwallet, Talisman, Nova\nWallet and Polkadot-JS Extension. Select the account to be used for the coretime purchase and then,\nclick on "buy core" button to sign and broadcast the transaction.'}),"\n",(0,n.jsx)(i.p,{children:(0,n.jsx)(i.img,{alt:"Lastic-purchase-bulk-coretime",src:a(20740).A+"",width:"2491",height:"1436"})}),"\n",(0,n.jsx)(i.h3,{id:"managing-cores-with-lastic",children:"Managing Cores with Lastic"}),"\n",(0,n.jsx)(i.p,{children:"Lastic enables you to transfer your core to another account, utilize it for a parachain, split it\nup, change block production frequency, or assign it to a task."}),"\n",(0,n.jsx)(i.p,{children:(0,n.jsx)(i.img,{alt:"Lastic-manage-core",src:a(91879).A+"",width:"1376",height:"1269"})})]})}function h(e={}){const{wrapper:i}={...(0,s.R)(),...e.components};return i?(0,n.jsx)(i,{...e,children:(0,n.jsx)(d,{...e})}):d(e)}},20740:(e,i,a)=>{a.d(i,{A:()=>t});const t=a.p+"assets/images/Lastic-UI-ef37d39e20534be70345616e698b1242.png"},91879:(e,i,a)=>{a.d(i,{A:()=>t});const t=a.p+"assets/images/Lastic-manage-core-dde9e3c38cf6b305be276df2b362db5e.png"},91840:(e,i,a)=>{a.d(i,{A:()=>t});const t=a.p+"assets/images/RegionX-UI-84558478a84cfabb57fb4a75c34bb72a.png"},33480:(e,i,a)=>{a.d(i,{A:()=>t});const t=a.p+"assets/images/regionx-manage-cores-e45aa9f4dae76d0091935f083e21df47.png"},24459:(e,i,a)=>{a.d(i,{A:()=>t});const t=a.p+"assets/images/regionx-purchase-core-c19d4e7686d728e10b3a31f641e9286a.png"},28453:(e,i,a)=>{a.d(i,{R:()=>r,x:()=>o});var t=a(96540);const n={},s=t.createContext(n);function r(e){const i=t.useContext(s);return t.useMemo((function(){return"function"==typeof e?e(i):{...i,...e}}),[i,e])}function o(e){let i;return i=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:r(e.components),t.createElement(s.Provider,{value:i},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/e2e89062.c5156322.js b/assets/js/e2e89062.c5156322.js deleted file mode 100644 index e97226853e05..000000000000 --- a/assets/js/e2e89062.c5156322.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9894],{33910:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>c,contentTitle:()=>i,default:()=>p,frontMatter:()=>s,metadata:()=>a,toc:()=>l});var t=r(74848),o=r(28453);const s={id:"learn-proxies-pure",title:"Pure Proxy Accounts",sidebar_label:"Pure Proxy Accounts",description:"Pure Proxy Accounts on Polkadot.",keywords:["proxy","proxies","proxy accounts","pure proxy","anonymous proxy"],slug:"../learn-proxies-pure"},i=void 0,a={id:"learn/learn-proxies-pure",title:"Pure Proxy Accounts",description:"Pure Proxy Accounts on Polkadot.",source:"@site/../docs/learn/learn-proxies-pure.md",sourceDirName:"learn",slug:"/learn-proxies-pure",permalink:"/docs/learn-proxies-pure",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-proxies-pure.md",tags:[],version:"current",lastUpdatedBy:"github-actions[bot]",lastUpdatedAt:1708944234e3,frontMatter:{id:"learn-proxies-pure",title:"Pure Proxy Accounts",sidebar_label:"Pure Proxy Accounts",description:"Pure Proxy Accounts on Polkadot.",keywords:["proxy","proxies","proxy accounts","pure proxy","anonymous proxy"],slug:"../learn-proxies-pure"},sidebar:"docs",previous:{title:"Proxy Accounts",permalink:"/docs/learn-proxies"},next:{title:"Transactions",permalink:"/docs/learn-transactions"}},c={},l=[{value:"Use of Pure Proxy",id:"use-of-pure-proxy",level:2},{value:"Why Pure Proxy?",id:"why-pure-proxy",level:2}];function h(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",hr:"hr",img:"img",li:"li",p:"p",strong:"strong",ul:"ul",...(0,o.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(n.p,{children:["Pure proxies are very different from other proxy types. The proxies we described so far are\n",(0,t.jsx)(n.em,{children:"existing accounts"})," assigned as proxies by a primary account. These proxies act on behalf of the\nprimary account, reducing the exposure of the primary account's private key. Remember, the more\noften we use an account's private key to sign transactions, the more we expose that key to the\ninternet, increasing the visibility of that account. The purpose of a proxy is thus to draw the\nattention of potential attackers away from the primary account, as proxies' private keys will be\nused most of the time to perform actions on behalf of the primary account."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"anonymous proxies",src:r(52981).A+"",width:"1920",height:"800"})}),"\n",(0,t.jsxs)(n.p,{children:["Pure proxies are new accounts that are ",(0,t.jsx)(n.em,{children:"created"})," (not assigned) by a primary account. That primary\naccount then acts as ",(0,t.jsx)(n.em,{children:"any"})," proxy on behalf of the pure proxy. Pure proxies are ",(0,t.jsx)(n.strong,{children:"keyless\nnon-deterministic accounts"})," as they do not have a private key but they have an address that is\nrandomly generated. Also, in some sense, nobody owns a pure proxy as nobody has a private key to\ncontrol them."]}),"\n",(0,t.jsx)(n.admonition,{title:"Pure proxies were called anonymous proxies",type:"info",children:(0,t.jsxs)(n.p,{children:["Pure proxies are not anonymous because they have an address that is spawned by a primary account\nacting as ",(0,t.jsx)(n.em,{children:"any"})," proxy. Even if ",(0,t.jsx)(n.em,{children:"any"})," proxy changes, it is still possible to find who generated the\n",(0,t.jsx)(n.em,{children:"anonymous"})," proxy by going backward using a block explorer. There was thus the need to change the\nname of ",(0,t.jsx)(n.em,{children:"anonymous"})," proxy. People suggested ",(0,t.jsx)(n.em,{children:"keyless accounts"})," since they do not have a private key\nand are proxied accounts. However, multisig accounts are also keyless (but deterministic). Moreover,\neven if ",(0,t.jsx)(n.em,{children:"anonymous"})," proxies are proxied accounts, they can still act as proxies and control other\naccounts via proxy calls (see multisig example below). Thus, the name that has been chosen is ",(0,t.jsx)(n.strong,{children:"pure\nproxy"}),". If you want to know more about the reasoning behind renaming of pure proxies, see the\ndiscussion in ",(0,t.jsx)(n.a,{href:"https://github.com/paritytech/substrate/pull/12283",children:"this PR"})," or the discussion on\n",(0,t.jsx)(n.a,{href:"https://forum.polkadot.network/t/parachain-technical-summit-next-steps/51/14",children:"Polkadot forum"}),"."]})}),"\n",(0,t.jsx)(n.h2,{id:"use-of-pure-proxy",children:"Use of Pure Proxy"}),"\n",(0,t.jsxs)(n.p,{children:["The use of the ",(0,t.jsx)(n.em,{children:"pure proxy"})," is strictly bound to the relationship between the ",(0,t.jsx)(n.em,{children:"pure proxy"})," and the\n",(0,t.jsx)(n.em,{children:"any"})," proxy. Note that the ",(0,t.jsx)(n.em,{children:"any"})," proxy does not necessarily be the one who created the ",(0,t.jsx)(n.em,{children:"pure proxy"}),"\nin the first place. Hence, ",(0,t.jsx)(n.em,{children:"pure proxies"})," are not really owned by somebody, but they can be\ncontrolled. Once that relationship between the ",(0,t.jsx)(n.em,{children:"pure proxy"})," and its ",(0,t.jsx)(n.em,{children:"any"})," proxy is broken, the ",(0,t.jsx)(n.em,{children:"pure\nproxy"})," will be inaccessible (even if visible on the Polkadot-JS UI). Also, ",(0,t.jsx)(n.em,{children:"pure proxies"})," are\nnon-deterministic, meaning that if we lose one ",(0,t.jsx)(n.em,{children:"pure proxy"}),", the next one we create from the same\nprimary account will have a different address."]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.em,{children:"Pure proxies"})," cannot sign anything because they do not have private keys. However, although they do\nnot have private keys and cannot sign any transaction directly, they can act as proxies (or better,\nproxy channels) within ",(0,t.jsx)(n.code,{children:"proxy.proxy"})," calls (proxy calls). For example, it is possible to have ",(0,t.jsx)(n.em,{children:"pure\nproxies"})," within a multisig. Using proxy calls, it is possible to use the ",(0,t.jsx)(n.em,{children:"any"})," proxy to call the\n",(0,t.jsx)(n.em,{children:"pure"})," proxy, which in turn will do a multisig call. More about this later on."]}),"\n",(0,t.jsx)(n.admonition,{type:"danger",children:(0,t.jsxs)(n.p,{children:["Once you remove the relationship with ",(0,t.jsx)(n.em,{children:"any"})," proxy, the ",(0,t.jsx)(n.em,{children:"pure"})," proxy will be inaccessible. Also,\n",(0,t.jsx)(n.em,{children:"pure"})," proxies cannot sign for anything."]})}),"\n",(0,t.jsx)(n.h2,{id:"why-pure-proxy",children:"Why Pure Proxy?"}),"\n",(0,t.jsx)(n.p,{children:"Pure proxies have important benefits that we discuss below:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Enhanced Security"}),": Pure proxies cannot be stolen because they do not have private keys. The\nonly accounts that have full access to the ",(0,t.jsx)(n.em,{children:"pure"})," proxies are ",(0,t.jsx)(n.em,{children:"any"})," proxies. Security can be\nfurther increased if the ",(0,t.jsx)(n.em,{children:"any"})," proxy is a multi-signature account."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Simplified and Secure Account Management"}),": Pure proxies can simplify the management of complex\naccount relationships at a corporate level."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Multi-signature Account Management"}),": Pure proxies are useful to efficiently manage\nmulti-signature (multisig) accounts. In fact, multi-signature accounts are deterministic, which\nmeans that once a multisig is created the signatories cannot be changed. If one of the signatories\nwants to leave the multisig, a new multisig must be created. This is inconvenient, especially at\ncorporate-level management where the chance of replacing someone within a multisig can be high.\n",(0,t.jsx)(n.em,{children:"Pure"})," proxies allow keeping the same multisig when the signatories change."]}),"\n"]}),"\n",(0,t.jsx)(n.hr,{}),"\n",(0,t.jsx)(n.admonition,{title:"Polkadot-JS Guides",type:"info",children:(0,t.jsxs)(n.p,{children:["If you are an advanced user, see the\n",(0,t.jsx)(n.a,{href:"/docs/learn-guides-accounts-proxy-pure",children:"Polkadot-JS guides about pure proxy accounts"}),"."]})})]})}function p(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(h,{...e})}):h(e)}},52981:(e,n,r)=>{r.d(n,{A:()=>t});const t=r.p+"assets/images/proxy-vs-anon-1e413e40583ef728f619824e6f714c6b.png"},28453:(e,n,r)=>{r.d(n,{R:()=>i,x:()=>a});var t=r(96540);const o={},s=t.createContext(o);function i(e){const n=t.useContext(s);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:i(e.components),t.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/e2e89062.eb016362.js b/assets/js/e2e89062.eb016362.js new file mode 100644 index 000000000000..8bfde5c12d87 --- /dev/null +++ b/assets/js/e2e89062.eb016362.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9894],{20696:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>c,contentTitle:()=>a,default:()=>p,frontMatter:()=>i,metadata:()=>t,toc:()=>l});const t=JSON.parse('{"id":"learn/learn-proxies-pure","title":"Pure Proxy Accounts","description":"Pure Proxy Accounts on Polkadot.","source":"@site/../docs/learn/learn-proxies-pure.md","sourceDirName":"learn","slug":"/learn-proxies-pure","permalink":"/docs/learn-proxies-pure","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-proxies-pure.md","tags":[],"version":"current","lastUpdatedBy":"github-actions[bot]","lastUpdatedAt":1708944234000,"frontMatter":{"id":"learn-proxies-pure","title":"Pure Proxy Accounts","sidebar_label":"Pure Proxy Accounts","description":"Pure Proxy Accounts on Polkadot.","keywords":["proxy","proxies","proxy accounts","pure proxy","anonymous proxy"],"slug":"../learn-proxies-pure"},"sidebar":"docs","previous":{"title":"Proxy Accounts","permalink":"/docs/learn-proxies"},"next":{"title":"Transactions","permalink":"/docs/learn-transactions"}}');var o=r(74848),s=r(28453);const i={id:"learn-proxies-pure",title:"Pure Proxy Accounts",sidebar_label:"Pure Proxy Accounts",description:"Pure Proxy Accounts on Polkadot.",keywords:["proxy","proxies","proxy accounts","pure proxy","anonymous proxy"],slug:"../learn-proxies-pure"},a=void 0,c={},l=[{value:"Use of Pure Proxy",id:"use-of-pure-proxy",level:2},{value:"Why Pure Proxy?",id:"why-pure-proxy",level:2}];function h(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",hr:"hr",img:"img",li:"li",p:"p",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(n.p,{children:["Pure proxies are very different from other proxy types. The proxies we described so far are\n",(0,o.jsx)(n.em,{children:"existing accounts"})," assigned as proxies by a primary account. These proxies act on behalf of the\nprimary account, reducing the exposure of the primary account's private key. Remember, the more\noften we use an account's private key to sign transactions, the more we expose that key to the\ninternet, increasing the visibility of that account. The purpose of a proxy is thus to draw the\nattention of potential attackers away from the primary account, as proxies' private keys will be\nused most of the time to perform actions on behalf of the primary account."]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"anonymous proxies",src:r(52981).A+"",width:"1920",height:"800"})}),"\n",(0,o.jsxs)(n.p,{children:["Pure proxies are new accounts that are ",(0,o.jsx)(n.em,{children:"created"})," (not assigned) by a primary account. That primary\naccount then acts as ",(0,o.jsx)(n.em,{children:"any"})," proxy on behalf of the pure proxy. Pure proxies are ",(0,o.jsx)(n.strong,{children:"keyless\nnon-deterministic accounts"})," as they do not have a private key but they have an address that is\nrandomly generated. Also, in some sense, nobody owns a pure proxy as nobody has a private key to\ncontrol them."]}),"\n",(0,o.jsx)(n.admonition,{title:"Pure proxies were called anonymous proxies",type:"info",children:(0,o.jsxs)(n.p,{children:["Pure proxies are not anonymous because they have an address that is spawned by a primary account\nacting as ",(0,o.jsx)(n.em,{children:"any"})," proxy. Even if ",(0,o.jsx)(n.em,{children:"any"})," proxy changes, it is still possible to find who generated the\n",(0,o.jsx)(n.em,{children:"anonymous"})," proxy by going backward using a block explorer. There was thus the need to change the\nname of ",(0,o.jsx)(n.em,{children:"anonymous"})," proxy. People suggested ",(0,o.jsx)(n.em,{children:"keyless accounts"})," since they do not have a private key\nand are proxied accounts. However, multisig accounts are also keyless (but deterministic). Moreover,\neven if ",(0,o.jsx)(n.em,{children:"anonymous"})," proxies are proxied accounts, they can still act as proxies and control other\naccounts via proxy calls (see multisig example below). Thus, the name that has been chosen is ",(0,o.jsx)(n.strong,{children:"pure\nproxy"}),". If you want to know more about the reasoning behind renaming of pure proxies, see the\ndiscussion in ",(0,o.jsx)(n.a,{href:"https://github.com/paritytech/substrate/pull/12283",children:"this PR"})," or the discussion on\n",(0,o.jsx)(n.a,{href:"https://forum.polkadot.network/t/parachain-technical-summit-next-steps/51/14",children:"Polkadot forum"}),"."]})}),"\n",(0,o.jsx)(n.h2,{id:"use-of-pure-proxy",children:"Use of Pure Proxy"}),"\n",(0,o.jsxs)(n.p,{children:["The use of the ",(0,o.jsx)(n.em,{children:"pure proxy"})," is strictly bound to the relationship between the ",(0,o.jsx)(n.em,{children:"pure proxy"})," and the\n",(0,o.jsx)(n.em,{children:"any"})," proxy. Note that the ",(0,o.jsx)(n.em,{children:"any"})," proxy does not necessarily be the one who created the ",(0,o.jsx)(n.em,{children:"pure proxy"}),"\nin the first place. Hence, ",(0,o.jsx)(n.em,{children:"pure proxies"})," are not really owned by somebody, but they can be\ncontrolled. Once that relationship between the ",(0,o.jsx)(n.em,{children:"pure proxy"})," and its ",(0,o.jsx)(n.em,{children:"any"})," proxy is broken, the ",(0,o.jsx)(n.em,{children:"pure\nproxy"})," will be inaccessible (even if visible on the Polkadot-JS UI). Also, ",(0,o.jsx)(n.em,{children:"pure proxies"})," are\nnon-deterministic, meaning that if we lose one ",(0,o.jsx)(n.em,{children:"pure proxy"}),", the next one we create from the same\nprimary account will have a different address."]}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.em,{children:"Pure proxies"})," cannot sign anything because they do not have private keys. However, although they do\nnot have private keys and cannot sign any transaction directly, they can act as proxies (or better,\nproxy channels) within ",(0,o.jsx)(n.code,{children:"proxy.proxy"})," calls (proxy calls). For example, it is possible to have ",(0,o.jsx)(n.em,{children:"pure\nproxies"})," within a multisig. Using proxy calls, it is possible to use the ",(0,o.jsx)(n.em,{children:"any"})," proxy to call the\n",(0,o.jsx)(n.em,{children:"pure"})," proxy, which in turn will do a multisig call. More about this later on."]}),"\n",(0,o.jsx)(n.admonition,{type:"danger",children:(0,o.jsxs)(n.p,{children:["Once you remove the relationship with ",(0,o.jsx)(n.em,{children:"any"})," proxy, the ",(0,o.jsx)(n.em,{children:"pure"})," proxy will be inaccessible. Also,\n",(0,o.jsx)(n.em,{children:"pure"})," proxies cannot sign for anything."]})}),"\n",(0,o.jsx)(n.h2,{id:"why-pure-proxy",children:"Why Pure Proxy?"}),"\n",(0,o.jsx)(n.p,{children:"Pure proxies have important benefits that we discuss below:"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Enhanced Security"}),": Pure proxies cannot be stolen because they do not have private keys. The\nonly accounts that have full access to the ",(0,o.jsx)(n.em,{children:"pure"})," proxies are ",(0,o.jsx)(n.em,{children:"any"})," proxies. Security can be\nfurther increased if the ",(0,o.jsx)(n.em,{children:"any"})," proxy is a multi-signature account."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Simplified and Secure Account Management"}),": Pure proxies can simplify the management of complex\naccount relationships at a corporate level."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Multi-signature Account Management"}),": Pure proxies are useful to efficiently manage\nmulti-signature (multisig) accounts. In fact, multi-signature accounts are deterministic, which\nmeans that once a multisig is created the signatories cannot be changed. If one of the signatories\nwants to leave the multisig, a new multisig must be created. This is inconvenient, especially at\ncorporate-level management where the chance of replacing someone within a multisig can be high.\n",(0,o.jsx)(n.em,{children:"Pure"})," proxies allow keeping the same multisig when the signatories change."]}),"\n"]}),"\n",(0,o.jsx)(n.hr,{}),"\n",(0,o.jsx)(n.admonition,{title:"Polkadot-JS Guides",type:"info",children:(0,o.jsxs)(n.p,{children:["If you are an advanced user, see the\n",(0,o.jsx)(n.a,{href:"/docs/learn-guides-accounts-proxy-pure",children:"Polkadot-JS guides about pure proxy accounts"}),"."]})})]})}function p(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(h,{...e})}):h(e)}},52981:(e,n,r)=>{r.d(n,{A:()=>t});const t=r.p+"assets/images/proxy-vs-anon-1e413e40583ef728f619824e6f714c6b.png"},28453:(e,n,r)=>{r.d(n,{R:()=>i,x:()=>a});var t=r(96540);const o={},s=t.createContext(o);function i(e){const n=t.useContext(s);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:i(e.components),t.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/e31fc461.ab8edf6c.js b/assets/js/e31fc461.ab8edf6c.js new file mode 100644 index 000000000000..9e9debcedad8 --- /dev/null +++ b/assets/js/e31fc461.ab8edf6c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[352],{21253:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>a,contentTitle:()=>c,default:()=>u,frontMatter:()=>i,metadata:()=>s,toc:()=>d});const s=JSON.parse('{"id":"learn/xcm/learn-xcm-docs-intro","title":"XCM: Cross-Consensus Messaging","description":"Introduction to the XCM Documentation.","source":"@site/../docs/learn/xcm/learn-xcm-docs-intro.md","sourceDirName":"learn/xcm","slug":"/learn/xcm/introduction","permalink":"/docs/learn/xcm/introduction","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/xcm/learn-xcm-docs-intro.md","tags":[],"version":"current","lastUpdatedBy":"Radha","lastUpdatedAt":1694074887000,"frontMatter":{"id":"learn-xcm-docs-intro","title":"XCM: Cross-Consensus Messaging","sidebar_label":"XCM: Cross-Consensus Messaging","description":"Introduction to the XCM Documentation.","keywords":["xcm","cross-consensus messaging"],"slug":"../xcm/introduction"},"sidebar":"docs","previous":{"title":"XCM Docs","permalink":"/docs/learn/xcm"},"next":{"title":"Overview","permalink":"/docs/learn/xcm/overview"}}');var o=t(74848),r=t(28453);const i={id:"learn-xcm-docs-intro",title:"XCM: Cross-Consensus Messaging",sidebar_label:"XCM: Cross-Consensus Messaging",description:"Introduction to the XCM Documentation.",keywords:["xcm","cross-consensus messaging"],slug:"../xcm/introduction"},c="XCM: Cross-Consensus Messaging",a={},d=[{value:"Getting started",id:"getting-started",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Glossary",id:"glossary",level:2},{value:"Contribute",id:"contribute",level:2}];function l(e){const n={a:"a",h1:"h1",h2:"h2",header:"header",p:"p",strong:"strong",...(0,r.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.header,{children:(0,o.jsx)(n.h1,{id:"xcm-cross-consensus-messaging",children:"XCM: Cross-Consensus Messaging"})}),"\n",(0,o.jsxs)(n.p,{children:["Welcome to the Cross-Consensus Messaging (XCM) documentation! XCM is a ",(0,o.jsx)(n.strong,{children:"language"})," for\ncommunicating ",(0,o.jsx)(n.strong,{children:"intentions"})," between ",(0,o.jsx)(n.strong,{children:"consensus systems"}),". Whether you're a developer, a blockchain\nenthusiast, or just interested in Polkadot, this guide aims to provide you with an\neasy-to-understand and comprehensive introduction to XCM."]}),"\n",(0,o.jsx)(n.h2,{id:"getting-started",children:"Getting started"}),"\n",(0,o.jsxs)(n.p,{children:["Head over to the ",(0,o.jsx)(n.a,{href:"/docs/learn/xcm/overview-summary",children:"overview"})," to begin your journey with XCM."]}),"\n",(0,o.jsx)(n.h2,{id:"configuration",children:"Configuration"}),"\n",(0,o.jsxs)(n.p,{children:["Head over to the ",(0,o.jsx)(n.a,{href:"/docs/learn/xcm/config-deep-dive",children:"configuration section"})," if you want to learn how to\nconfigure your project to use XCM."]}),"\n",(0,o.jsx)(n.h2,{id:"glossary",children:"Glossary"}),"\n",(0,o.jsxs)(n.p,{children:["Go to the ",(0,o.jsx)(n.a,{href:"/docs/learn/xcm/reference-glossary",children:"glossary"})," section for a quick explanation of all the terms used\nwhen dealing with XCM."]}),"\n",(0,o.jsx)(n.h2,{id:"contribute",children:"Contribute"}),"\n",(0,o.jsxs)(n.p,{children:["Both the ",(0,o.jsx)(n.a,{href:"https://github.com/paritytech/xcm-format",children:"format"})," and this\n",(0,o.jsx)(n.a,{href:"https://github.com/paritytech/xcm-docs",children:"documentation"})," are open for anyone to contribute. If\nthere's anything you'd like to see in the documentation, feel free to\n",(0,o.jsx)(n.a,{href:"https://github.com/paritytech/xcm-docs/issues",children:"open an issue"}),". If you want to contribute to the\nformat, check out the\n",(0,o.jsx)(n.a,{href:"https://github.com/paritytech/xcm-format/blob/master/proposals/0001-process.md",children:"RFC process"}),"."]})]})}function u(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(l,{...e})}):l(e)}},28453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>c});var s=t(96540);const o={},r=s.createContext(o);function i(e){const n=s.useContext(r);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:i(e.components),s.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/e31fc461.e90962e4.js b/assets/js/e31fc461.e90962e4.js deleted file mode 100644 index 2215a3c8cb6e..000000000000 --- a/assets/js/e31fc461.e90962e4.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[352],{47881:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>a,contentTitle:()=>i,default:()=>u,frontMatter:()=>r,metadata:()=>c,toc:()=>d});var s=t(74848),o=t(28453);const r={id:"learn-xcm-docs-intro",title:"XCM: Cross-Consensus Messaging",sidebar_label:"XCM: Cross-Consensus Messaging",description:"Introduction to the XCM Documentation.",keywords:["xcm","cross-consensus messaging"],slug:"../xcm/introduction"},i="XCM: Cross-Consensus Messaging",c={id:"learn/xcm/learn-xcm-docs-intro",title:"XCM: Cross-Consensus Messaging",description:"Introduction to the XCM Documentation.",source:"@site/../docs/learn/xcm/learn-xcm-docs-intro.md",sourceDirName:"learn/xcm",slug:"/learn/xcm/introduction",permalink:"/docs/learn/xcm/introduction",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/xcm/learn-xcm-docs-intro.md",tags:[],version:"current",lastUpdatedBy:"Radha",lastUpdatedAt:1694074887e3,frontMatter:{id:"learn-xcm-docs-intro",title:"XCM: Cross-Consensus Messaging",sidebar_label:"XCM: Cross-Consensus Messaging",description:"Introduction to the XCM Documentation.",keywords:["xcm","cross-consensus messaging"],slug:"../xcm/introduction"},sidebar:"docs",previous:{title:"XCM Docs",permalink:"/docs/learn/xcm"},next:{title:"Overview",permalink:"/docs/learn/xcm/overview"}},a={},d=[{value:"Getting started",id:"getting-started",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Glossary",id:"glossary",level:2},{value:"Contribute",id:"contribute",level:2}];function l(e){const n={a:"a",h1:"h1",h2:"h2",header:"header",p:"p",strong:"strong",...(0,o.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"xcm-cross-consensus-messaging",children:"XCM: Cross-Consensus Messaging"})}),"\n",(0,s.jsxs)(n.p,{children:["Welcome to the Cross-Consensus Messaging (XCM) documentation! XCM is a ",(0,s.jsx)(n.strong,{children:"language"})," for\ncommunicating ",(0,s.jsx)(n.strong,{children:"intentions"})," between ",(0,s.jsx)(n.strong,{children:"consensus systems"}),". Whether you're a developer, a blockchain\nenthusiast, or just interested in Polkadot, this guide aims to provide you with an\neasy-to-understand and comprehensive introduction to XCM."]}),"\n",(0,s.jsx)(n.h2,{id:"getting-started",children:"Getting started"}),"\n",(0,s.jsxs)(n.p,{children:["Head over to the ",(0,s.jsx)(n.a,{href:"/docs/learn/xcm/overview-summary",children:"overview"})," to begin your journey with XCM."]}),"\n",(0,s.jsx)(n.h2,{id:"configuration",children:"Configuration"}),"\n",(0,s.jsxs)(n.p,{children:["Head over to the ",(0,s.jsx)(n.a,{href:"/docs/learn/xcm/config-deep-dive",children:"configuration section"})," if you want to learn how to\nconfigure your project to use XCM."]}),"\n",(0,s.jsx)(n.h2,{id:"glossary",children:"Glossary"}),"\n",(0,s.jsxs)(n.p,{children:["Go to the ",(0,s.jsx)(n.a,{href:"/docs/learn/xcm/reference-glossary",children:"glossary"})," section for a quick explanation of all the terms used\nwhen dealing with XCM."]}),"\n",(0,s.jsx)(n.h2,{id:"contribute",children:"Contribute"}),"\n",(0,s.jsxs)(n.p,{children:["Both the ",(0,s.jsx)(n.a,{href:"https://github.com/paritytech/xcm-format",children:"format"})," and this\n",(0,s.jsx)(n.a,{href:"https://github.com/paritytech/xcm-docs",children:"documentation"})," are open for anyone to contribute. If\nthere's anything you'd like to see in the documentation, feel free to\n",(0,s.jsx)(n.a,{href:"https://github.com/paritytech/xcm-docs/issues",children:"open an issue"}),". If you want to contribute to the\nformat, check out the\n",(0,s.jsx)(n.a,{href:"https://github.com/paritytech/xcm-format/blob/master/proposals/0001-process.md",children:"RFC process"}),"."]})]})}function u(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},28453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>c});var s=t(96540);const o={},r=s.createContext(o);function i(e){const n=s.useContext(r);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:i(e.components),s.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/e495ca4d.2839c84e.js b/assets/js/e495ca4d.2839c84e.js deleted file mode 100644 index 9a4e6e34eb4d..000000000000 --- a/assets/js/e495ca4d.2839c84e.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[662],{6099:(e,t,o)=>{o.r(t),o.d(t,{assets:()=>l,contentTitle:()=>r,default:()=>p,frontMatter:()=>s,metadata:()=>c,toc:()=>d});var n=o(74848),a=o(28453),i=o(67141);const s={id:"maintain-guides-democracy",title:"Participate in Democracy",sidebar_label:"Participate in Democracy",description:"Steps on how to participate in democracy.",keywords:["democracy","council","action","proposal"],slug:"../maintain-guides-democracy"},r=void 0,c={id:"maintain/archive/maintain-guides-democracy",title:"Participate in Democracy",description:"Steps on how to participate in democracy.",source:"@site/../docs/maintain/archive/maintain-guides-democracy.md",sourceDirName:"maintain/archive",slug:"/maintain/maintain-guides-democracy",permalink:"/docs/maintain/maintain-guides-democracy",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/maintain/archive/maintain-guides-democracy.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1729847256e3,frontMatter:{id:"maintain-guides-democracy",title:"Participate in Democracy",sidebar_label:"Participate in Democracy",description:"Steps on how to participate in democracy.",keywords:["democracy","council","action","proposal"],slug:"../maintain-guides-democracy"},sidebar:"docs",previous:{title:"Archive",permalink:"/docs/maintain-archive"},next:{title:"Join the Council",permalink:"/docs/maintain/maintain-guides-how-to-join-council"}},l={},d=[{value:"Important Parameters",id:"important-parameters",level:2},{value:"Proposing an Action",id:"proposing-an-action",level:2},{value:"Submitting a Preimage",id:"submitting-a-preimage",level:2},{value:"Endorsing a Proposal",id:"endorsing-a-proposal",level:2},{value:"Voting on a Proposal",id:"voting-on-a-proposal",level:2},{value:"Unlocking Locked Tokens",id:"unlocking-locked-tokens",level:2},{value:"With a Ledger hardware wallet or Unlocking Very Old Locks",id:"with-a-ledger-hardware-wallet-or-unlocking-very-old-locks",level:4},{value:"Delegate a Vote",id:"delegate-a-vote",level:2},{value:"Undelegate a Vote",id:"undelegate-a-vote",level:2},{value:"Voting with a Governance Proxy",id:"voting-with-a-governance-proxy",level:2}];function h(e){const t={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h4:"h4",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,a.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(i.A,{message:"The content on this page is archived. For up-to-date information about governance, see the\n[Polkadot OpenGov page](../learn-polkadot-opengov)."}),"\n",(0,n.jsxs)(t.p,{children:["The public referenda chamber is one of the three bodies of on-chain governance as it's instantiated\nin Polkadot and Kusama. The other two bodies are the\n",(0,n.jsx)(t.a,{href:"/docs/maintain/maintain-guides-how-to-join-council",children:"council"})," and the\n",(0,n.jsx)(t.a,{href:"/docs/learn/learn-governance#technical-committee",children:"technical committee"}),"."]}),"\n",(0,n.jsxs)(t.p,{children:["Public referenda can be proposed and voted on by any token holder in the system as long as they\nprovide a bond. After a proposal is made, others can agree with it by ",(0,n.jsx)(t.em,{children:"endorsing"})," it and putting up\ntokens equal to the original bond. During every launch period, the most endorsed proposal will be\nmoved to the public referenda table where it can be voted upon. Voters who are willing to lock up\ntheir tokens for a greater duration of time can do so and get their votes amplified. For more\ndetails on the governance system please see ",(0,n.jsx)(t.a,{href:"/docs/learn/learn-governance",children:"here"}),"."]}),"\n",(0,n.jsx)(t.p,{children:"This guide will instruct token holders how to propose and vote on public referenda using the\nDemocracy module. Below are a few links to stay informed and directly engage with the community."}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://matrix.to/#/#Polkadot-Direction:parity.io",children:"Polkadot Direction"})," - a place to discuss\ngovernance and the future of Polkadot."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://matrix.to/#/#Kusama-Direction:parity.io",children:"Kusama Direction"})," - a place to discuss\ngovernance and the future of Kusama."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://polkadot.polkassembly.io",children:"Polkadot"})," and ",(0,n.jsx)(t.a,{href:"https://kusama.polkassembly.io",children:"Kusama"}),"\nPolkassembly - for current referenda, latest proposals, motions, treasury proposals, tips,\nbounties, and more."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://matrix.to/#/#dailydigest:web3.foundation",children:"Polkadot Daily Digest"})," - News about what is\nhappening in the Polkadot ecosystem, published every weekday except holidays."]}),"\n"]}),"\n",(0,n.jsx)(t.h2,{id:"important-parameters",children:"Important Parameters"}),"\n",(0,n.jsx)(t.p,{children:"The important parameters to be aware of when voting using the Democracy module are as follows:"}),"\n",(0,n.jsxs)(t.p,{children:[(0,n.jsx)(t.strong,{children:"Launch Period"})," - How often new public referenda are launched."]}),"\n",(0,n.jsxs)(t.p,{children:[(0,n.jsx)(t.strong,{children:"Voting Period"})," - How often votes for referenda are tallied."]}),"\n",(0,n.jsxs)(t.p,{children:[(0,n.jsx)(t.strong,{children:"Emergency Voting Period"})," - The minimum voting period for a fast-tracked emergency referendum."]}),"\n",(0,n.jsxs)(t.p,{children:[(0,n.jsx)(t.strong,{children:"Minimum Deposit"})," - The minimum amount to be used as a deposit for a public referendum proposal."]}),"\n",(0,n.jsxs)(t.p,{children:[(0,n.jsx)(t.strong,{children:"Enactment Period"})," - The minimum period for locking funds ",(0,n.jsx)(t.em,{children:"and"})," the period between a proposal\nbeing approved and enacted."]}),"\n",(0,n.jsxs)(t.p,{children:[(0,n.jsx)(t.strong,{children:"Cooloff Period"})," - The period in blocks where a proposal may not be re-submitted after being\nvetoed."]}),"\n",(0,n.jsx)(t.h2,{id:"proposing-an-action",children:"Proposing an Action"}),"\n",(0,n.jsx)(t.p,{children:'Proposing an action to be taken requires you to bond some tokens. In order to ensure you have enough\ntokens to make the minimum deposit, you can check the parameter in the chain state. Navigate to\nDeveloper > Chain State > Constants > selected constant query: democracy > minimumDeposit: u128 and\nthen click on the plus button. The bonded tokens will only be released once the proposal is tabled\n(that is, brought to a vote); there is no way for the user to "revoke" their proposal and get the\nbond back before it has become a referendum. Since it is essentially impossible to predict\ndefinitely when a proposal may become a referendum (if ever), this means that any tokens bonded will\nbe locked for an indeterminate amount of time.'}),"\n",(0,n.jsxs)(t.admonition,{title:"Proposals cannot be revoked by the proposer, even if they never turn into a referendum",type:"info",children:[(0,n.jsx)(t.p,{children:"It is important to realize that there is no guarantee that DOT you use for proposing or endorsing a\nproposal will be returned to that account in any given timeframe."}),(0,n.jsx)(t.p,{children:'::: On Polkadot Apps, you can navigate to the Governance -> Democracy tab to make a new proposal. In\norder to submit a proposal, you will need to submit what\'s called the preimage hash. The preimage\nhash is simply the hash of the proposal to be enacted. The easiest way to get the preimage hash is\nby clicking on the "Submit preimage" button and configuring the action that you are proposing.'}),(0,n.jsxs)(t.p,{children:["The example below demonstrates the creation of a proposal on Kusama (",(0,n.jsx)(t.strong,{children:"the same procedure applies to\nPolkadot"}),'). If you wanted to propose that a remark "Expect Chaos!" is added, the preimage hash\nwould be ',(0,n.jsx)(t.code,{children:"0x8ac3f722caf7677254e25ca4ad77d533ca893c7d2ad4009e258d749f2004ef94"}),". You can copy this\npreimage hash and save it for the next step. There is no need to click Submit Preimage at this\npoint, though you could. We'll go over that in the next section."]}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"submit preimage",src:o(90005).A+"",width:"1182",height:"526"})}),(0,n.jsxs)(t.p,{children:['Now you will click on the "Submit proposal" button and enter the preimage hash in the input titled\n"preimage hash" and ',(0,n.jsx)(t.em,{children:"at least"}),' the minimum deposit into the "locked balance" field. Click on the\n"Submit proposal" button and confirm the transaction. You should now see your proposal appear in the\n"proposals" column on the page.']}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"submit proposal",src:o(33677).A+"",width:"1184",height:"456"})}),(0,n.jsx)(t.p,{children:"Now your proposal is visible to anyone who accesses the chain and others can endorse it or submit a\npreimage. However, it's hard to tell what exactly this proposal does since it shows the hash of the\naction. Other holders will not be able to make a judgement on whether they endorse it or not until\nsomeone submits the actual preimage for this proposal. In the next step, you will submit the\npreimage."}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"proposal hash",src:o(98955).A+"",width:"1424",height:"276"})}),(0,n.jsx)(t.h2,{id:"submitting-a-preimage",children:"Submitting a Preimage"}),(0,n.jsx)(t.p,{children:"The act of making a proposal is split from submitting the preimage for the proposal since the\nstorage cost of submitting a large preimage could be pretty expensive. Allowing for the preimage\nsubmission to come as a separate transaction means that another account could submit the preimage\nfor you if you don't have the funds to do so. It also means that you don't have to pay so many funds\nright away as you can prove the preimage hash out-of-band."}),(0,n.jsx)(t.p,{children:"However, at some point before the proposal passes you will need to submit the preimage or else the\nproposal cannot be enacted. The guide will now show you how to do this."}),(0,n.jsx)(t.p,{children:'Click on the blue "Submit preimage" button and configure it to be the same as what you did before to\nacquire the preimage hash. This time, instead of copying the hash to another tab, you will follow\nthrough and click "Submit preimage" and confirm the transaction.'}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"submit preimage",src:o(90005).A+"",width:"1182",height:"526"})}),(0,n.jsx)(t.p,{children:"Once the transaction is included you should see the UI update with the information for your already\nsubmitted proposal."}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"proposals",src:o(65589).A+"",width:"1424",height:"276"})}),(0,n.jsx)(t.h2,{id:"endorsing-a-proposal",children:"Endorsing a Proposal"}),(0,n.jsx)(t.p,{children:"Endorsing a proposal means that you are agreeing with the proposal and backing it with an equal\namount of deposit as was originally locked. The bonded tokens will be released once the proposal is\ntabled (that is, brought to a vote), just like the original proposer's bond. By endorsing a proposal\nyou will move it higher up the rank of proposals. The most endorsed proposal \u2014 in value, not\nthe number of supporters \u2014 will be brought to a referendum every launch period."}),(0,n.jsx)(t.p,{children:"It is important to note that there is no way to stop or cancel endorsing a proposal once it has been\ndone. Therefore, the DOT that was endorsed will be reserved until the proposal is tabled as a\nreferendum. This is an indeterminate amount of time, since there is no guarantee that a proposal\nwill become a referendum for a given period, as other proposals may be proposed and tabled before\nit."}),(0,n.jsxs)(t.p,{children:["Note that it is possible for a single account to endorse a proposal multiple times. This is by\ndesign; it is the value, not the number of endorsements ",(0,n.jsx)(t.em,{children:"per se"}),", that counts in terms of weighting.\nIf there were a limit of one endorsement per account, it would be trivial for a user with, for\nexample, 1000 DOT to create ten accounts with 100 DOT instead of a single account with 1000 DOT.\nThus, no restrictions are made on the number of times a single account can endorse a proposal."]}),(0,n.jsx)(t.p,{children:'To endorse a proposal, navigate to the proposal you want to endorse and click on the "Endorse"\nbutton.'}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"endorsement button",src:o(67919).A+"",width:"1440",height:"128"})}),(0,n.jsx)(t.p,{children:'You will be prompted with the full details of the proposal (if the preimage has been submitted!) and\ncan then broadcast the transaction by clicking the blue "Endorse" button.'}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"endorsement confirmed",src:o(31452).A+"",width:"1184",height:"356"})}),(0,n.jsx)(t.p,{children:"Once successful, you will see your endorsement appear in the dropdown in the proposal details."}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"endorsement result",src:o(24633).A+"",width:"1440",height:"336"})}),(0,n.jsx)(t.h2,{id:"voting-on-a-proposal",children:"Voting on a Proposal"}),(0,n.jsxs)(t.p,{children:["At the end of each launch period, the most endorsed proposal will move to a referendum. During this\ntime you can cast a vote for or against the proposal. You may also lock up your tokens for a greater\nlength of time to weigh your vote more strongly. During the time your tokens are\n",(0,n.jsx)(t.a,{href:"/docs/learn-account-balances#locks",children:"locked"}),", you are unable to transfer them, however they\ncan still be used for further votes. Locks are layered on top of each other, so an eight-week lock\ndoes not become a 15-week lock if you vote again a week later, rather another eight-week lock is\nplaced to extend the lock just one extra week."]}),(0,n.jsxs)(t.p,{children:["To vote on a referendum, navigate to the\n",(0,n.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/democracy/",children:'"Democracy" tab of Polkadot Apps'}),'. Any active referendum\nwill show in the "referenda" column. Click the blue button "Vote" to cast a vote for the referendum.']}),(0,n.jsx)(t.p,{children:'If you would like to cast your vote for the proposal select the "Aye, I approve" option. If you\nwould like to cast your vote against the proposal in the referendum you will select "Nay, I do not\napprove" option.'}),(0,n.jsx)(t.p,{children:"The endorsement option is to select your conviction for this vote. The longer you are willing to\nlock your tokens, the stronger your vote will be weighted. The timeline for the conviction starts\nafter the voting period ends; tokens used for voting will always be locked until the end of the\nvoting period, no matter what conviction you vote with. Unwillingness to lock your tokens means that\nyour vote only counts for 10% of the tokens that you hold, while the maximum lock-up of 896 days\nmeans you can make your vote count for 600% of the tokens that you hold. It is possible to vote with\ntokens already locked by staking."}),(0,n.jsx)(t.p,{children:'When you are comfortable with the decision you have made, click the blue "Vote" button to submit\nyour transaction and wait for it to be included in a block.'}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"voting",src:o(97943).A+"",width:"940",height:"712"})}),(0,n.jsx)(t.h2,{id:"unlocking-locked-tokens",children:"Unlocking Locked Tokens"}),(0,n.jsxs)(t.p,{children:["Like ",(0,n.jsx)(t.a,{href:"/docs/learn-DOT#lazy-vesting",children:"vesting"}),", the tokens that are locked in democracy are\nunlocked lazily. This means that you, the user, must explicitly call an unlock extrinsic to make\nyour funds available again after the lock expires. Unbonding is another term you hear a lot in\nPolkadot, it means withdrawing your DOT that was used in staking. To know more about it, please see\n",(0,n.jsx)(t.a,{href:"/docs/learn-nominator",children:"here"}),"."]}),(0,n.jsxs)(t.p,{children:['You can do this from the "Accounts" page in\n',(0,n.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/accounts",children:"Polkadot-JS Apps"}),', unless you use Ledger (see below).\nFirst, check that your account has a "democracy" lock by opening the details on your balance. In the\nexample below the account has 150 KSM locked in democracy.']}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"democracy balance details",src:o(77651).A+"",width:"342",height:"214"})}),(0,n.jsx)(t.p,{children:'Now you can click the menu button (the three dots) and find the option that says "Clear expired\ndemocracy locks". After selecting this option you may confirm the transaction and your locks will be\ncleared when successful.'}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"democracy clear locks",src:o(8710).A+"",width:"366",height:"933"})}),(0,n.jsx)(t.h4,{id:"with-a-ledger-hardware-wallet-or-unlocking-very-old-locks",children:"With a Ledger hardware wallet or Unlocking Very Old Locks"}),(0,n.jsx)(t.p,{children:"If you do not see an option to clear expired democracy votes, it may be that the lock is very old.\nOr, if you are using the Ledger hardware wallet, you will not be able to issue the batch Unlock\naction from the UI."}),(0,n.jsx)(t.p,{children:"Instead, you must clear the lock by directly issuing the correct extrinsics."}),(0,n.jsxs)(t.p,{children:["Navigate to the ",(0,n.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/extrinsics",children:"Extrinsics page"})," and submit the\nfollowing extrinsic: ",(0,n.jsx)(t.code,{children:"democracy.removeVote(index)"}),' using the account that you voted with. For the\nindex number (ReferendumIndex), enter the number of the referendum for which you voted ("12" in the\nimage below).']}),(0,n.jsx)(t.p,{children:"The number of the referendum for which you voted is visible in an explorer such as Subscan."}),(0,n.jsx)(t.p,{children:'You need to press the "Submit Transaction" button to submit the extrinsic.'}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"democracy clear_lock_extrinsic_1",src:o(62127).A+"",width:"871",height:"234"})}),(0,n.jsx)(t.p,{children:"Now submit the following extrinsic: `democracy.unlock(target), where the target is your account\naddress."}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"democracy clear_lock_extrinsic_2",src:o(43220).A+"",width:"869",height:"237"})}),(0,n.jsxs)(t.p,{children:["If you return to the ",(0,n.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/accounts",children:"Accounts page"}),", you should see that\nthe democracy lock has been released."]}),(0,n.jsxs)(t.p,{children:["Note that this applies only to locked DOT that were used for voting on referenda. In order to unlock\nDOT locked by voting for members of the Polkadot Council, you need to go to the\n",(0,n.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/council",children:"Council"}),' page, click "Vote", and then click on "Unvote\nAll".']}),(0,n.jsx)(t.h2,{id:"delegate-a-vote",children:"Delegate a Vote"}),(0,n.jsx)(t.p,{children:"If you are too busy to keep up and vote on upcoming referenda, there is an option to delegate your\nvote to another account whose opinion you trust. When you delegate to another account, that account\ngets the added voting power of your tokens along with the conviction that you set. The conviction\nfor delegation works just like the conviction for regular voting, except your tokens may be locked\nlonger than they would normally since locking resets when you undelegate your vote."}),(0,n.jsx)(t.p,{children:"The account that is being delegated to does not make any special action once the delegation is in\nplace. They can continue to vote on referenda how they see fit. The difference is now when the\nDemocracy system tallies votes, the delegated tokens now are added to whatever vote the delegatee\nhas made."}),(0,n.jsxs)(t.p,{children:['You can delegate your vote to another account and even attach a "Conviction" to the delegation.\nNavigate to the ',(0,n.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/accounts",children:'"Accounts" tab on Polkadot-JS UI'}),' and\nclick on the three vertical dots and select "Delegate democracy votes" option for the account of\nyour choice. Then you would be presented with a pop-up window which lets you enter the account\ndetails of the delegated account, delegated amount and conviction. You can enter the relevant\ndetails and click on the delegate button and then sign and submit the transaction.']}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"delegate",src:o(34930).A+"",width:"1880",height:"724"})}),(0,n.jsx)(t.p,{children:"Your delegation will count toward whatever account you delegated for votes on until you explicitly\nundelegate your vote."}),(0,n.jsxs)(t.admonition,{title:"Query the chain state for an account's delegation preferences",type:"tip",children:[(0,n.jsxs)(t.p,{children:["It is possible to query the delegation preferences of any actively delegating account on the network\nthrough ",(0,n.jsx)(t.code,{children:"democracy.votingOf"})," extrinsic."]}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"query delegation",src:o(33685).A+"",width:"2002",height:"992"})})]})]}),"\n",(0,n.jsx)(t.h2,{id:"undelegate-a-vote",children:"Undelegate a Vote"}),"\n",(0,n.jsxs)(t.admonition,{type:"caution",children:[(0,n.jsx)(t.p,{children:"If there is an existing lock due to a previous delegation change or undelegation, any new change or\nundelegation will restart the lock period for the larger DOT amount and the longest conviction\nperiod between the existing and the new lock."}),(0,n.jsx)(t.p,{children:"This will only matter to accounts with conviction, as the accounts with no conviction don't have any\nlock period."}),(0,n.jsx)(t.p,{children:"Examples:"}),(0,n.jsxs)(t.ol,{children:["\n",(0,n.jsxs)(t.li,{children:["\n",(0,n.jsx)(t.p,{children:"Delegate 500 DOT with 1x conviction, then change delegation to 1000 DOT with 1x conviction, the\nlock period will reset for 1000 DOT with 1x conviction."}),"\n"]}),"\n",(0,n.jsxs)(t.li,{children:["\n",(0,n.jsx)(t.p,{children:"Delegate 500 DOT with 3x conviction, then change the delegation to 1000 DOT with 1x conviction,\nthe lock period will reset for 1000 DOT with 3x conviction."}),"\n"]}),"\n",(0,n.jsxs)(t.li,{children:["\n",(0,n.jsx)(t.p,{children:"Delegate 500 DOT with 1x conviction, then change the delegation to 200 DOT with 1x conviction,\nthe lock period will reset for 500 DOT with 1x conviction."}),"\n"]}),"\n"]}),(0,n.jsxs)(t.p,{children:["To understand this in further detail checkout\n",(0,n.jsx)(t.a,{href:"https://substrate.stackexchange.com/questions/5067/delegating-and-undelegating-during-the-lock-period-extends-it-for-the-initial-am",children:"this stackexchange post."})]})]}),"\n",(0,n.jsxs)(t.p,{children:['You may decide at some point in the future to remove your delegation to a target account. In this\ncase, your tokens will be locked for the maximum amount of time in accordance with the conviction\nyou set at the beginning of the delegation. For example, if you chose "2x" delegation for four weeks\nof lock-up time, your tokens will be locked for 4 weeks after sending the ',(0,n.jsx)(t.code,{children:"undelegate"})," transaction.\nOnce your vote has been undelegated, you are in control of making votes with it once again. You can\nstart to vote directly, or choose a different account to act as your delegate."]}),"\n",(0,n.jsxs)(t.p,{children:["The ",(0,n.jsx)(t.code,{children:"undelegate"})," transaction must be sent from the account that you wish to clear of its delegation.\nFor example, if Alice has delegated her tokens to Bob, Alice would need to be the one to call the\n",(0,n.jsx)(t.code,{children:"undelegate"})," transaction to clear her delegation."]}),"\n",(0,n.jsxs)(t.p,{children:["The easiest way to do this is from the\n",(0,n.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/accounts",children:'"Accounts" tab on Polkadot-JS UI'})," where you can manage the\ndelegation of your account."]}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"manage delegation",src:o(95136).A+"",width:"1990",height:"224"})}),"\n",(0,n.jsx)(t.p,{children:"When you click on \"manage delegation\", you would be presented with a pre-populated pop-up window\nwith that account's delegation preferences. Here, you have an option to undelegate or save the\nmodifications made to the account's delegation preferences."}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"undelegate",src:o(89910).A+"",width:"1884",height:"732"})}),"\n",(0,n.jsx)(t.h2,{id:"voting-with-a-governance-proxy",children:"Voting with a Governance Proxy"}),"\n",(0,n.jsx)(t.p,{children:'Making a vote on behalf of a stash requires a "proxy" transaction from the Proxy pallet. When you\nchoose this transaction from the "Extrinsics" tab, it will let you select "vote" from the Democracy\npallet, and you will specify the index of the referendum that is being voted, the judgement (i.e.\n"Aye" for approval or "Nay" for rejection), and the conviction, just like a normal vote.'}),"\n",(0,n.jsxs)(t.p,{children:["For more material on adding and removing Governance proxies, as well as other types, please see the\n",(0,n.jsx)(t.a,{href:"/docs/learn-proxies",children:"Proxy page"}),"."]})]})}function p(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(h,{...e})}):h(e)}},67141:(e,t,o)=>{o.d(t,{A:()=>i});var n=o(96540),a=o(74848);const i=function(e){var t,o=e.message,i=(0,n.useState)(!0),s=i[0],r=i[1];return(0,a.jsx)(a.Fragment,{children:s&&(0,a.jsxs)("div",{className:"message-box",children:[(0,a.jsx)("button",{className:"close-button",onClick:function(){r(!1)},children:"\u2716 "}),(0,a.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(t=o,t.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},34930:(e,t,o)=>{o.d(t,{A:()=>n});const n=o.p+"assets/images/delegate-vote-a8b4d534e0e004f8d0d4a32a45f3a77a.png"},31452:(e,t,o)=>{o.d(t,{A:()=>n});const n=o.p+"assets/images/endorse-7e22987ceebef0c1ce17f475510eacc9.png"},67919:(e,t,o)=>{o.d(t,{A:()=>n});const n=o.p+"assets/images/endorse1-6f9ed6c3eb99cad52bd07e250307b397.png"},24633:(e,t,o)=>{o.d(t,{A:()=>n});const n=o.p+"assets/images/endorsed-list-460b771aedaf6e91f9caaaf728d76dfd.png"},95136:(e,t,o)=>{o.d(t,{A:()=>n});const n=o.p+"assets/images/manage-delegation-19501197d96e688a08f257a1443f18cd.png"},98955:(e,t,o)=>{o.d(t,{A:()=>n});const n=o.p+"assets/images/proposal-hash-1ae67063393c7e77001e538b9d4a67af.png"},65589:(e,t,o)=>{o.d(t,{A:()=>n});const n=o.p+"assets/images/proposals-9b3cc3a8bd2ff1c01c0dbc7c90950d3f.png"},33685:(e,t,o)=>{o.d(t,{A:()=>n});const n=o.p+"assets/images/query-delegation-fece7720f6282de8928688d61ee38477.png"},90005:(e,t,o)=>{o.d(t,{A:()=>n});const n=o.p+"assets/images/submit_preimage-b0165c4aa5615a416bc1698ff21cba2e.png"},33677:(e,t,o)=>{o.d(t,{A:()=>n});const n=o.p+"assets/images/submit_proposal-24cc24bb4fdb502da80a28082f779da8.png"},89910:(e,t,o)=>{o.d(t,{A:()=>n});const n=o.p+"assets/images/undelegate-save-002a17067954a098e2942aa1a7583698.png"},97943:(e,t,o)=>{o.d(t,{A:()=>n});const n=o.p+"assets/images/voting-4abb1178436833648da30b63d860aa10.png"},77651:(e,t,o)=>{o.d(t,{A:()=>n});const n=o.p+"assets/images/democracy_balance_details-56b5c71fe66fc4a0d66ba4820a3cc6a9.png"},62127:(e,t,o)=>{o.d(t,{A:()=>n});const n=o.p+"assets/images/democracy_clear_lock_extrinsic_1-c42556da5e59023abb388eac1a12aee2.png"},43220:(e,t,o)=>{o.d(t,{A:()=>n});const n=o.p+"assets/images/democracy_clear_lock_extrinsic_2-f6a313a6755d15eb6ab26d33edb80a72.png"},8710:(e,t,o)=>{o.d(t,{A:()=>n});const n=o.p+"assets/images/democracy_clear_locks-028d6202e19ad4410e07a5da8bb69277.png"},28453:(e,t,o)=>{o.d(t,{R:()=>s,x:()=>r});var n=o(96540);const a={},i=n.createContext(a);function s(e){const t=n.useContext(i);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:s(e.components),n.createElement(i.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/e495ca4d.d7f18de8.js b/assets/js/e495ca4d.d7f18de8.js new file mode 100644 index 000000000000..c8d79314506b --- /dev/null +++ b/assets/js/e495ca4d.d7f18de8.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[662],{74360:(e,t,o)=>{o.r(t),o.d(t,{assets:()=>l,contentTitle:()=>c,default:()=>p,frontMatter:()=>r,metadata:()=>n,toc:()=>d});const n=JSON.parse('{"id":"maintain/archive/maintain-guides-democracy","title":"Participate in Democracy","description":"Steps on how to participate in democracy.","source":"@site/../docs/maintain/archive/maintain-guides-democracy.md","sourceDirName":"maintain/archive","slug":"/maintain/maintain-guides-democracy","permalink":"/docs/maintain/maintain-guides-democracy","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/maintain/archive/maintain-guides-democracy.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1729847256000,"frontMatter":{"id":"maintain-guides-democracy","title":"Participate in Democracy","sidebar_label":"Participate in Democracy","description":"Steps on how to participate in democracy.","keywords":["democracy","council","action","proposal"],"slug":"../maintain-guides-democracy"},"sidebar":"docs","previous":{"title":"Archive","permalink":"/docs/maintain-archive"},"next":{"title":"Join the Council","permalink":"/docs/maintain/maintain-guides-how-to-join-council"}}');var a=o(74848),i=o(28453),s=o(67141);const r={id:"maintain-guides-democracy",title:"Participate in Democracy",sidebar_label:"Participate in Democracy",description:"Steps on how to participate in democracy.",keywords:["democracy","council","action","proposal"],slug:"../maintain-guides-democracy"},c=void 0,l={},d=[{value:"Important Parameters",id:"important-parameters",level:2},{value:"Proposing an Action",id:"proposing-an-action",level:2},{value:"Submitting a Preimage",id:"submitting-a-preimage",level:2},{value:"Endorsing a Proposal",id:"endorsing-a-proposal",level:2},{value:"Voting on a Proposal",id:"voting-on-a-proposal",level:2},{value:"Unlocking Locked Tokens",id:"unlocking-locked-tokens",level:2},{value:"With a Ledger hardware wallet or Unlocking Very Old Locks",id:"with-a-ledger-hardware-wallet-or-unlocking-very-old-locks",level:4},{value:"Delegate a Vote",id:"delegate-a-vote",level:2},{value:"Undelegate a Vote",id:"undelegate-a-vote",level:2},{value:"Voting with a Governance Proxy",id:"voting-with-a-governance-proxy",level:2}];function h(e){const t={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h4:"h4",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(s.A,{message:"The content on this page is archived. For up-to-date information about governance, see the\n[Polkadot OpenGov page](../learn-polkadot-opengov)."}),"\n",(0,a.jsxs)(t.p,{children:["The public referenda chamber is one of the three bodies of on-chain governance as it's instantiated\nin Polkadot and Kusama. The other two bodies are the\n",(0,a.jsx)(t.a,{href:"/docs/maintain/maintain-guides-how-to-join-council",children:"council"})," and the\n",(0,a.jsx)(t.a,{href:"/docs/learn/learn-governance#technical-committee",children:"technical committee"}),"."]}),"\n",(0,a.jsxs)(t.p,{children:["Public referenda can be proposed and voted on by any token holder in the system as long as they\nprovide a bond. After a proposal is made, others can agree with it by ",(0,a.jsx)(t.em,{children:"endorsing"})," it and putting up\ntokens equal to the original bond. During every launch period, the most endorsed proposal will be\nmoved to the public referenda table where it can be voted upon. Voters who are willing to lock up\ntheir tokens for a greater duration of time can do so and get their votes amplified. For more\ndetails on the governance system please see ",(0,a.jsx)(t.a,{href:"/docs/learn/learn-governance",children:"here"}),"."]}),"\n",(0,a.jsx)(t.p,{children:"This guide will instruct token holders how to propose and vote on public referenda using the\nDemocracy module. Below are a few links to stay informed and directly engage with the community."}),"\n",(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.a,{href:"https://matrix.to/#/#Polkadot-Direction:parity.io",children:"Polkadot Direction"})," - a place to discuss\ngovernance and the future of Polkadot."]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.a,{href:"https://matrix.to/#/#Kusama-Direction:parity.io",children:"Kusama Direction"})," - a place to discuss\ngovernance and the future of Kusama."]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.a,{href:"https://polkadot.polkassembly.io",children:"Polkadot"})," and ",(0,a.jsx)(t.a,{href:"https://kusama.polkassembly.io",children:"Kusama"}),"\nPolkassembly - for current referenda, latest proposals, motions, treasury proposals, tips,\nbounties, and more."]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.a,{href:"https://matrix.to/#/#dailydigest:web3.foundation",children:"Polkadot Daily Digest"})," - News about what is\nhappening in the Polkadot ecosystem, published every weekday except holidays."]}),"\n"]}),"\n",(0,a.jsx)(t.h2,{id:"important-parameters",children:"Important Parameters"}),"\n",(0,a.jsx)(t.p,{children:"The important parameters to be aware of when voting using the Democracy module are as follows:"}),"\n",(0,a.jsxs)(t.p,{children:[(0,a.jsx)(t.strong,{children:"Launch Period"})," - How often new public referenda are launched."]}),"\n",(0,a.jsxs)(t.p,{children:[(0,a.jsx)(t.strong,{children:"Voting Period"})," - How often votes for referenda are tallied."]}),"\n",(0,a.jsxs)(t.p,{children:[(0,a.jsx)(t.strong,{children:"Emergency Voting Period"})," - The minimum voting period for a fast-tracked emergency referendum."]}),"\n",(0,a.jsxs)(t.p,{children:[(0,a.jsx)(t.strong,{children:"Minimum Deposit"})," - The minimum amount to be used as a deposit for a public referendum proposal."]}),"\n",(0,a.jsxs)(t.p,{children:[(0,a.jsx)(t.strong,{children:"Enactment Period"})," - The minimum period for locking funds ",(0,a.jsx)(t.em,{children:"and"})," the period between a proposal\nbeing approved and enacted."]}),"\n",(0,a.jsxs)(t.p,{children:[(0,a.jsx)(t.strong,{children:"Cooloff Period"})," - The period in blocks where a proposal may not be re-submitted after being\nvetoed."]}),"\n",(0,a.jsx)(t.h2,{id:"proposing-an-action",children:"Proposing an Action"}),"\n",(0,a.jsx)(t.p,{children:'Proposing an action to be taken requires you to bond some tokens. In order to ensure you have enough\ntokens to make the minimum deposit, you can check the parameter in the chain state. Navigate to\nDeveloper > Chain State > Constants > selected constant query: democracy > minimumDeposit: u128 and\nthen click on the plus button. The bonded tokens will only be released once the proposal is tabled\n(that is, brought to a vote); there is no way for the user to "revoke" their proposal and get the\nbond back before it has become a referendum. Since it is essentially impossible to predict\ndefinitely when a proposal may become a referendum (if ever), this means that any tokens bonded will\nbe locked for an indeterminate amount of time.'}),"\n",(0,a.jsxs)(t.admonition,{title:"Proposals cannot be revoked by the proposer, even if they never turn into a referendum",type:"info",children:[(0,a.jsx)(t.p,{children:"It is important to realize that there is no guarantee that DOT you use for proposing or endorsing a\nproposal will be returned to that account in any given timeframe."}),(0,a.jsx)(t.p,{children:'::: On Polkadot Apps, you can navigate to the Governance -> Democracy tab to make a new proposal. In\norder to submit a proposal, you will need to submit what\'s called the preimage hash. The preimage\nhash is simply the hash of the proposal to be enacted. The easiest way to get the preimage hash is\nby clicking on the "Submit preimage" button and configuring the action that you are proposing.'}),(0,a.jsxs)(t.p,{children:["The example below demonstrates the creation of a proposal on Kusama (",(0,a.jsx)(t.strong,{children:"the same procedure applies to\nPolkadot"}),'). If you wanted to propose that a remark "Expect Chaos!" is added, the preimage hash\nwould be ',(0,a.jsx)(t.code,{children:"0x8ac3f722caf7677254e25ca4ad77d533ca893c7d2ad4009e258d749f2004ef94"}),". You can copy this\npreimage hash and save it for the next step. There is no need to click Submit Preimage at this\npoint, though you could. We'll go over that in the next section."]}),(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"submit preimage",src:o(90005).A+"",width:"1182",height:"526"})}),(0,a.jsxs)(t.p,{children:['Now you will click on the "Submit proposal" button and enter the preimage hash in the input titled\n"preimage hash" and ',(0,a.jsx)(t.em,{children:"at least"}),' the minimum deposit into the "locked balance" field. Click on the\n"Submit proposal" button and confirm the transaction. You should now see your proposal appear in the\n"proposals" column on the page.']}),(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"submit proposal",src:o(33677).A+"",width:"1184",height:"456"})}),(0,a.jsx)(t.p,{children:"Now your proposal is visible to anyone who accesses the chain and others can endorse it or submit a\npreimage. However, it's hard to tell what exactly this proposal does since it shows the hash of the\naction. Other holders will not be able to make a judgement on whether they endorse it or not until\nsomeone submits the actual preimage for this proposal. In the next step, you will submit the\npreimage."}),(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"proposal hash",src:o(98955).A+"",width:"1424",height:"276"})}),(0,a.jsx)(t.h2,{id:"submitting-a-preimage",children:"Submitting a Preimage"}),(0,a.jsx)(t.p,{children:"The act of making a proposal is split from submitting the preimage for the proposal since the\nstorage cost of submitting a large preimage could be pretty expensive. Allowing for the preimage\nsubmission to come as a separate transaction means that another account could submit the preimage\nfor you if you don't have the funds to do so. It also means that you don't have to pay so many funds\nright away as you can prove the preimage hash out-of-band."}),(0,a.jsx)(t.p,{children:"However, at some point before the proposal passes you will need to submit the preimage or else the\nproposal cannot be enacted. The guide will now show you how to do this."}),(0,a.jsx)(t.p,{children:'Click on the blue "Submit preimage" button and configure it to be the same as what you did before to\nacquire the preimage hash. This time, instead of copying the hash to another tab, you will follow\nthrough and click "Submit preimage" and confirm the transaction.'}),(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"submit preimage",src:o(90005).A+"",width:"1182",height:"526"})}),(0,a.jsx)(t.p,{children:"Once the transaction is included you should see the UI update with the information for your already\nsubmitted proposal."}),(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"proposals",src:o(65589).A+"",width:"1424",height:"276"})}),(0,a.jsx)(t.h2,{id:"endorsing-a-proposal",children:"Endorsing a Proposal"}),(0,a.jsx)(t.p,{children:"Endorsing a proposal means that you are agreeing with the proposal and backing it with an equal\namount of deposit as was originally locked. The bonded tokens will be released once the proposal is\ntabled (that is, brought to a vote), just like the original proposer's bond. By endorsing a proposal\nyou will move it higher up the rank of proposals. The most endorsed proposal \u2014 in value, not\nthe number of supporters \u2014 will be brought to a referendum every launch period."}),(0,a.jsx)(t.p,{children:"It is important to note that there is no way to stop or cancel endorsing a proposal once it has been\ndone. Therefore, the DOT that was endorsed will be reserved until the proposal is tabled as a\nreferendum. This is an indeterminate amount of time, since there is no guarantee that a proposal\nwill become a referendum for a given period, as other proposals may be proposed and tabled before\nit."}),(0,a.jsxs)(t.p,{children:["Note that it is possible for a single account to endorse a proposal multiple times. This is by\ndesign; it is the value, not the number of endorsements ",(0,a.jsx)(t.em,{children:"per se"}),", that counts in terms of weighting.\nIf there were a limit of one endorsement per account, it would be trivial for a user with, for\nexample, 1000 DOT to create ten accounts with 100 DOT instead of a single account with 1000 DOT.\nThus, no restrictions are made on the number of times a single account can endorse a proposal."]}),(0,a.jsx)(t.p,{children:'To endorse a proposal, navigate to the proposal you want to endorse and click on the "Endorse"\nbutton.'}),(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"endorsement button",src:o(67919).A+"",width:"1440",height:"128"})}),(0,a.jsx)(t.p,{children:'You will be prompted with the full details of the proposal (if the preimage has been submitted!) and\ncan then broadcast the transaction by clicking the blue "Endorse" button.'}),(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"endorsement confirmed",src:o(31452).A+"",width:"1184",height:"356"})}),(0,a.jsx)(t.p,{children:"Once successful, you will see your endorsement appear in the dropdown in the proposal details."}),(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"endorsement result",src:o(24633).A+"",width:"1440",height:"336"})}),(0,a.jsx)(t.h2,{id:"voting-on-a-proposal",children:"Voting on a Proposal"}),(0,a.jsxs)(t.p,{children:["At the end of each launch period, the most endorsed proposal will move to a referendum. During this\ntime you can cast a vote for or against the proposal. You may also lock up your tokens for a greater\nlength of time to weigh your vote more strongly. During the time your tokens are\n",(0,a.jsx)(t.a,{href:"/docs/learn-account-balances#locks",children:"locked"}),", you are unable to transfer them, however they\ncan still be used for further votes. Locks are layered on top of each other, so an eight-week lock\ndoes not become a 15-week lock if you vote again a week later, rather another eight-week lock is\nplaced to extend the lock just one extra week."]}),(0,a.jsxs)(t.p,{children:["To vote on a referendum, navigate to the\n",(0,a.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/democracy/",children:'"Democracy" tab of Polkadot Apps'}),'. Any active referendum\nwill show in the "referenda" column. Click the blue button "Vote" to cast a vote for the referendum.']}),(0,a.jsx)(t.p,{children:'If you would like to cast your vote for the proposal select the "Aye, I approve" option. If you\nwould like to cast your vote against the proposal in the referendum you will select "Nay, I do not\napprove" option.'}),(0,a.jsx)(t.p,{children:"The endorsement option is to select your conviction for this vote. The longer you are willing to\nlock your tokens, the stronger your vote will be weighted. The timeline for the conviction starts\nafter the voting period ends; tokens used for voting will always be locked until the end of the\nvoting period, no matter what conviction you vote with. Unwillingness to lock your tokens means that\nyour vote only counts for 10% of the tokens that you hold, while the maximum lock-up of 896 days\nmeans you can make your vote count for 600% of the tokens that you hold. It is possible to vote with\ntokens already locked by staking."}),(0,a.jsx)(t.p,{children:'When you are comfortable with the decision you have made, click the blue "Vote" button to submit\nyour transaction and wait for it to be included in a block.'}),(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"voting",src:o(97943).A+"",width:"940",height:"712"})}),(0,a.jsx)(t.h2,{id:"unlocking-locked-tokens",children:"Unlocking Locked Tokens"}),(0,a.jsxs)(t.p,{children:["Like ",(0,a.jsx)(t.a,{href:"/docs/learn-DOT#lazy-vesting",children:"vesting"}),", the tokens that are locked in democracy are\nunlocked lazily. This means that you, the user, must explicitly call an unlock extrinsic to make\nyour funds available again after the lock expires. Unbonding is another term you hear a lot in\nPolkadot, it means withdrawing your DOT that was used in staking. To know more about it, please see\n",(0,a.jsx)(t.a,{href:"/docs/learn-nominator",children:"here"}),"."]}),(0,a.jsxs)(t.p,{children:['You can do this from the "Accounts" page in\n',(0,a.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/accounts",children:"Polkadot-JS Apps"}),', unless you use Ledger (see below).\nFirst, check that your account has a "democracy" lock by opening the details on your balance. In the\nexample below the account has 150 KSM locked in democracy.']}),(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"democracy balance details",src:o(77651).A+"",width:"342",height:"214"})}),(0,a.jsx)(t.p,{children:'Now you can click the menu button (the three dots) and find the option that says "Clear expired\ndemocracy locks". After selecting this option you may confirm the transaction and your locks will be\ncleared when successful.'}),(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"democracy clear locks",src:o(8710).A+"",width:"366",height:"933"})}),(0,a.jsx)(t.h4,{id:"with-a-ledger-hardware-wallet-or-unlocking-very-old-locks",children:"With a Ledger hardware wallet or Unlocking Very Old Locks"}),(0,a.jsx)(t.p,{children:"If you do not see an option to clear expired democracy votes, it may be that the lock is very old.\nOr, if you are using the Ledger hardware wallet, you will not be able to issue the batch Unlock\naction from the UI."}),(0,a.jsx)(t.p,{children:"Instead, you must clear the lock by directly issuing the correct extrinsics."}),(0,a.jsxs)(t.p,{children:["Navigate to the ",(0,a.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/extrinsics",children:"Extrinsics page"})," and submit the\nfollowing extrinsic: ",(0,a.jsx)(t.code,{children:"democracy.removeVote(index)"}),' using the account that you voted with. For the\nindex number (ReferendumIndex), enter the number of the referendum for which you voted ("12" in the\nimage below).']}),(0,a.jsx)(t.p,{children:"The number of the referendum for which you voted is visible in an explorer such as Subscan."}),(0,a.jsx)(t.p,{children:'You need to press the "Submit Transaction" button to submit the extrinsic.'}),(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"democracy clear_lock_extrinsic_1",src:o(62127).A+"",width:"871",height:"234"})}),(0,a.jsx)(t.p,{children:"Now submit the following extrinsic: `democracy.unlock(target), where the target is your account\naddress."}),(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"democracy clear_lock_extrinsic_2",src:o(43220).A+"",width:"869",height:"237"})}),(0,a.jsxs)(t.p,{children:["If you return to the ",(0,a.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/accounts",children:"Accounts page"}),", you should see that\nthe democracy lock has been released."]}),(0,a.jsxs)(t.p,{children:["Note that this applies only to locked DOT that were used for voting on referenda. In order to unlock\nDOT locked by voting for members of the Polkadot Council, you need to go to the\n",(0,a.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/council",children:"Council"}),' page, click "Vote", and then click on "Unvote\nAll".']}),(0,a.jsx)(t.h2,{id:"delegate-a-vote",children:"Delegate a Vote"}),(0,a.jsx)(t.p,{children:"If you are too busy to keep up and vote on upcoming referenda, there is an option to delegate your\nvote to another account whose opinion you trust. When you delegate to another account, that account\ngets the added voting power of your tokens along with the conviction that you set. The conviction\nfor delegation works just like the conviction for regular voting, except your tokens may be locked\nlonger than they would normally since locking resets when you undelegate your vote."}),(0,a.jsx)(t.p,{children:"The account that is being delegated to does not make any special action once the delegation is in\nplace. They can continue to vote on referenda how they see fit. The difference is now when the\nDemocracy system tallies votes, the delegated tokens now are added to whatever vote the delegatee\nhas made."}),(0,a.jsxs)(t.p,{children:['You can delegate your vote to another account and even attach a "Conviction" to the delegation.\nNavigate to the ',(0,a.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/accounts",children:'"Accounts" tab on Polkadot-JS UI'}),' and\nclick on the three vertical dots and select "Delegate democracy votes" option for the account of\nyour choice. Then you would be presented with a pop-up window which lets you enter the account\ndetails of the delegated account, delegated amount and conviction. You can enter the relevant\ndetails and click on the delegate button and then sign and submit the transaction.']}),(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"delegate",src:o(34930).A+"",width:"1880",height:"724"})}),(0,a.jsx)(t.p,{children:"Your delegation will count toward whatever account you delegated for votes on until you explicitly\nundelegate your vote."}),(0,a.jsxs)(t.admonition,{title:"Query the chain state for an account's delegation preferences",type:"tip",children:[(0,a.jsxs)(t.p,{children:["It is possible to query the delegation preferences of any actively delegating account on the network\nthrough ",(0,a.jsx)(t.code,{children:"democracy.votingOf"})," extrinsic."]}),(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"query delegation",src:o(33685).A+"",width:"2002",height:"992"})})]})]}),"\n",(0,a.jsx)(t.h2,{id:"undelegate-a-vote",children:"Undelegate a Vote"}),"\n",(0,a.jsxs)(t.admonition,{type:"caution",children:[(0,a.jsx)(t.p,{children:"If there is an existing lock due to a previous delegation change or undelegation, any new change or\nundelegation will restart the lock period for the larger DOT amount and the longest conviction\nperiod between the existing and the new lock."}),(0,a.jsx)(t.p,{children:"This will only matter to accounts with conviction, as the accounts with no conviction don't have any\nlock period."}),(0,a.jsx)(t.p,{children:"Examples:"}),(0,a.jsxs)(t.ol,{children:["\n",(0,a.jsxs)(t.li,{children:["\n",(0,a.jsx)(t.p,{children:"Delegate 500 DOT with 1x conviction, then change delegation to 1000 DOT with 1x conviction, the\nlock period will reset for 1000 DOT with 1x conviction."}),"\n"]}),"\n",(0,a.jsxs)(t.li,{children:["\n",(0,a.jsx)(t.p,{children:"Delegate 500 DOT with 3x conviction, then change the delegation to 1000 DOT with 1x conviction,\nthe lock period will reset for 1000 DOT with 3x conviction."}),"\n"]}),"\n",(0,a.jsxs)(t.li,{children:["\n",(0,a.jsx)(t.p,{children:"Delegate 500 DOT with 1x conviction, then change the delegation to 200 DOT with 1x conviction,\nthe lock period will reset for 500 DOT with 1x conviction."}),"\n"]}),"\n"]}),(0,a.jsxs)(t.p,{children:["To understand this in further detail checkout\n",(0,a.jsx)(t.a,{href:"https://substrate.stackexchange.com/questions/5067/delegating-and-undelegating-during-the-lock-period-extends-it-for-the-initial-am",children:"this stackexchange post."})]})]}),"\n",(0,a.jsxs)(t.p,{children:['You may decide at some point in the future to remove your delegation to a target account. In this\ncase, your tokens will be locked for the maximum amount of time in accordance with the conviction\nyou set at the beginning of the delegation. For example, if you chose "2x" delegation for four weeks\nof lock-up time, your tokens will be locked for 4 weeks after sending the ',(0,a.jsx)(t.code,{children:"undelegate"})," transaction.\nOnce your vote has been undelegated, you are in control of making votes with it once again. You can\nstart to vote directly, or choose a different account to act as your delegate."]}),"\n",(0,a.jsxs)(t.p,{children:["The ",(0,a.jsx)(t.code,{children:"undelegate"})," transaction must be sent from the account that you wish to clear of its delegation.\nFor example, if Alice has delegated her tokens to Bob, Alice would need to be the one to call the\n",(0,a.jsx)(t.code,{children:"undelegate"})," transaction to clear her delegation."]}),"\n",(0,a.jsxs)(t.p,{children:["The easiest way to do this is from the\n",(0,a.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/accounts",children:'"Accounts" tab on Polkadot-JS UI'})," where you can manage the\ndelegation of your account."]}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"manage delegation",src:o(95136).A+"",width:"1990",height:"224"})}),"\n",(0,a.jsx)(t.p,{children:"When you click on \"manage delegation\", you would be presented with a pre-populated pop-up window\nwith that account's delegation preferences. Here, you have an option to undelegate or save the\nmodifications made to the account's delegation preferences."}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"undelegate",src:o(89910).A+"",width:"1884",height:"732"})}),"\n",(0,a.jsx)(t.h2,{id:"voting-with-a-governance-proxy",children:"Voting with a Governance Proxy"}),"\n",(0,a.jsx)(t.p,{children:'Making a vote on behalf of a stash requires a "proxy" transaction from the Proxy pallet. When you\nchoose this transaction from the "Extrinsics" tab, it will let you select "vote" from the Democracy\npallet, and you will specify the index of the referendum that is being voted, the judgement (i.e.\n"Aye" for approval or "Nay" for rejection), and the conviction, just like a normal vote.'}),"\n",(0,a.jsxs)(t.p,{children:["For more material on adding and removing Governance proxies, as well as other types, please see the\n",(0,a.jsx)(t.a,{href:"/docs/learn-proxies",children:"Proxy page"}),"."]})]})}function p(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,a.jsx)(t,{...e,children:(0,a.jsx)(h,{...e})}):h(e)}},67141:(e,t,o)=>{o.d(t,{A:()=>i});var n=o(96540),a=o(74848);const i=function(e){var t,o=e.message,i=(0,n.useState)(!0),s=i[0],r=i[1];return(0,a.jsx)(a.Fragment,{children:s&&(0,a.jsxs)("div",{className:"message-box",children:[(0,a.jsx)("button",{className:"close-button",onClick:function(){r(!1)},children:"\u2716 "}),(0,a.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(t=o,t.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},34930:(e,t,o)=>{o.d(t,{A:()=>n});const n=o.p+"assets/images/delegate-vote-a8b4d534e0e004f8d0d4a32a45f3a77a.png"},31452:(e,t,o)=>{o.d(t,{A:()=>n});const n=o.p+"assets/images/endorse-7e22987ceebef0c1ce17f475510eacc9.png"},67919:(e,t,o)=>{o.d(t,{A:()=>n});const n=o.p+"assets/images/endorse1-6f9ed6c3eb99cad52bd07e250307b397.png"},24633:(e,t,o)=>{o.d(t,{A:()=>n});const n=o.p+"assets/images/endorsed-list-460b771aedaf6e91f9caaaf728d76dfd.png"},95136:(e,t,o)=>{o.d(t,{A:()=>n});const n=o.p+"assets/images/manage-delegation-19501197d96e688a08f257a1443f18cd.png"},98955:(e,t,o)=>{o.d(t,{A:()=>n});const n=o.p+"assets/images/proposal-hash-1ae67063393c7e77001e538b9d4a67af.png"},65589:(e,t,o)=>{o.d(t,{A:()=>n});const n=o.p+"assets/images/proposals-9b3cc3a8bd2ff1c01c0dbc7c90950d3f.png"},33685:(e,t,o)=>{o.d(t,{A:()=>n});const n=o.p+"assets/images/query-delegation-fece7720f6282de8928688d61ee38477.png"},90005:(e,t,o)=>{o.d(t,{A:()=>n});const n=o.p+"assets/images/submit_preimage-b0165c4aa5615a416bc1698ff21cba2e.png"},33677:(e,t,o)=>{o.d(t,{A:()=>n});const n=o.p+"assets/images/submit_proposal-24cc24bb4fdb502da80a28082f779da8.png"},89910:(e,t,o)=>{o.d(t,{A:()=>n});const n=o.p+"assets/images/undelegate-save-002a17067954a098e2942aa1a7583698.png"},97943:(e,t,o)=>{o.d(t,{A:()=>n});const n=o.p+"assets/images/voting-4abb1178436833648da30b63d860aa10.png"},77651:(e,t,o)=>{o.d(t,{A:()=>n});const n=o.p+"assets/images/democracy_balance_details-56b5c71fe66fc4a0d66ba4820a3cc6a9.png"},62127:(e,t,o)=>{o.d(t,{A:()=>n});const n=o.p+"assets/images/democracy_clear_lock_extrinsic_1-c42556da5e59023abb388eac1a12aee2.png"},43220:(e,t,o)=>{o.d(t,{A:()=>n});const n=o.p+"assets/images/democracy_clear_lock_extrinsic_2-f6a313a6755d15eb6ab26d33edb80a72.png"},8710:(e,t,o)=>{o.d(t,{A:()=>n});const n=o.p+"assets/images/democracy_clear_locks-028d6202e19ad4410e07a5da8bb69277.png"},28453:(e,t,o)=>{o.d(t,{R:()=>s,x:()=>r});var n=o(96540);const a={},i=n.createContext(a);function s(e){const t=n.useContext(i);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:s(e.components),n.createElement(i.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/e4ef088f.8b1a0238.js b/assets/js/e4ef088f.8b1a0238.js deleted file mode 100644 index 403bde346cca..000000000000 --- a/assets/js/e4ef088f.8b1a0238.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3315],{62515:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>c,contentTitle:()=>o,default:()=>p,frontMatter:()=>r,metadata:()=>d,toc:()=>u});var l=s(74848),i=s(28453),a=s(11470),t=s(19365);const r={id:"build-guides-install-deps",title:"Install Polkadot SDK Dependencies",sidebar_label:"Install Dependencies",description:"Install dependencies for developing for using the Polkadot SDK",keywords:["coretime","blockspace","parathread","parachain","cores"],slug:"../build-guides-install-deps"},o=void 0,d={id:"build/build-guides-install-deps",title:"Install Polkadot SDK Dependencies",description:"Install dependencies for developing for using the Polkadot SDK",source:"@site/../docs/build/build-guides-install-deps.md",sourceDirName:"build",slug:"/build-guides-install-deps",permalink:"/docs/build-guides-install-deps",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/build/build-guides-install-deps.md",tags:[],version:"current",lastUpdatedBy:"bader y",lastUpdatedAt:1726234601e3,frontMatter:{id:"build-guides-install-deps",title:"Install Polkadot SDK Dependencies",sidebar_label:"Install Dependencies",description:"Install dependencies for developing for using the Polkadot SDK",keywords:["coretime","blockspace","parathread","parachain","cores"],slug:"../build-guides-install-deps"},sidebar:"docs",previous:{title:"Intro to the Polkadot SDK",permalink:"/docs/build-guides-coretime-start"},next:{title:"Parachain Template Guide",permalink:"/docs/build-guides-template-basic"}},c={},u=[{value:"macOS",id:"macos",level:2},{value:"Before you begin",id:"before-you-begin",level:3},{value:"Support for Apple Silicon",id:"support-for-apple-silicon",level:4},{value:"Install Homebrew",id:"install-homebrew",level:4},{value:"Installation",id:"installation",level:3},{value:"Linux",id:"linux",level:2},{value:"Before you begin",id:"before-you-begin-1",level:3},{value:"Install required packages and Rust",id:"install-required-packages-and-rust",level:3},{value:"Windows (WSL)",id:"windows-wsl",level:2},{value:"Before you begin",id:"before-you-begin-2",level:3},{value:"Set up Windows Subsystem for Linux",id:"set-up-windows-subsystem-for-linux",level:3},{value:"Install required packages and Rust",id:"install-required-packages-and-rust-1",level:3},{value:"Verifying Installation",id:"verifying-installation",level:2},{value:"Install polkadot-parachain and chain-spec-builder",id:"install-polkadot-parachain-and-chain-spec-builder",level:2}];function h(e){const n={a:"a",blockquote:"blockquote",code:"code",h2:"h2",h3:"h3",h4:"h4",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(n.h2,{id:"macos",children:"macOS"}),"\n",(0,l.jsx)(n.p,{children:"You can install Rust and set up a Substrate development environment on Apple macOS computers with\neither Intel or an Apple M1 processors."}),"\n",(0,l.jsx)(n.h3,{id:"before-you-begin",children:"Before you begin"}),"\n",(0,l.jsx)(n.p,{children:"Before you install Rust and set up your development environment on macOS, verify that your computer\nmeets the following basic requirements:"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"Operating system version is 10.7 Lion, or later."}),"\n",(0,l.jsx)(n.li,{children:"Processor speed of at least 2Ghz, 3Ghz recommended."}),"\n",(0,l.jsx)(n.li,{children:"Memory of at least 8 GB RAM, 16 GB recommended."}),"\n",(0,l.jsx)(n.li,{children:"Storage of at 10 GB available space."}),"\n",(0,l.jsx)(n.li,{children:"Broadband Internet connection."}),"\n"]}),"\n",(0,l.jsx)(n.h4,{id:"support-for-apple-silicon",children:"Support for Apple Silicon"}),"\n",(0,l.jsx)(n.p,{children:"Protobuf must be installed before the build process can begin. To install it, run the following\ncommand:"}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.code,{children:"brew install protobuf"})}),"\n",(0,l.jsx)(n.h4,{id:"install-homebrew",children:"Install Homebrew"}),"\n",(0,l.jsx)(n.p,{children:"In most cases, you should use Homebrew to install and manage packages on macOS computers. If you\ndon't already have Homebrew installed on your local computer, you should download and install it\nbefore continuing."}),"\n",(0,l.jsx)(n.p,{children:"To install Homebrew:"}),"\n",(0,l.jsxs)(n.ol,{children:["\n",(0,l.jsxs)(n.li,{children:["\n",(0,l.jsx)(n.p,{children:"Open the Terminal application."}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["\n",(0,l.jsx)(n.p,{children:"Download and install Homebrew by running the following command:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:'/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"\n'})}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["\n",(0,l.jsx)(n.p,{children:"Verify Homebrew has been successfully installed by running the following command:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"brew --version\n"})}),"\n",(0,l.jsx)(n.p,{children:"The command displays output similar to the following:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"Homebrew 3.3.1\nHomebrew/homebrew-core (git revision c6c488fbc0f; last commit 2021-10-30)\nHomebrew/homebrew-cask (git revision 66bab33b26; last commit 2021-10-30)\n"})}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(n.h3,{id:"installation",children:"Installation"}),"\n",(0,l.jsxs)(n.p,{children:["Because the blockchain requires standard cryptography to support the generation of public/private\nkey pairs and the validation of transaction signatures, you must also have a package that provides\ncryptography, such as ",(0,l.jsx)(n.code,{children:"openssl"}),"."]}),"\n",(0,l.jsxs)(n.p,{children:["To install ",(0,l.jsx)(n.code,{children:"openssl"})," and the Rust toolchain on macOS:"]}),"\n",(0,l.jsxs)(n.ol,{children:["\n",(0,l.jsxs)(n.li,{children:["\n",(0,l.jsx)(n.p,{children:"Open the Terminal application."}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["\n",(0,l.jsx)(n.p,{children:"Ensure you have an updated version of Homebrew by running the following command:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"brew update\n"})}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["\n",(0,l.jsxs)(n.p,{children:["Install the ",(0,l.jsx)(n.code,{children:"openssl"})," package by running the following command:"]}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"brew install openssl\n"})}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["\n",(0,l.jsxs)(n.p,{children:["Download the ",(0,l.jsx)(n.code,{children:"rustup"})," installation program and use it to install Rust by running the following\ncommand:"]}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh\n"})}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["\n",(0,l.jsx)(n.p,{children:"Follow the prompts displayed to proceed with a default installation."}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["\n",(0,l.jsx)(n.p,{children:"Update your current shell to include Cargo by running the following command:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"source ~/.cargo/env\n"})}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["\n",(0,l.jsx)(n.p,{children:"Configure the Rust toolchain to default to the latest stable version by running the following\ncommands:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"rustup default stable\nrustup update\nrustup target add wasm32-unknown-unknown\n"})}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["\n",(0,l.jsxs)(n.p,{children:["Add the ",(0,l.jsx)(n.code,{children:"nightly"})," release and the ",(0,l.jsx)(n.code,{children:"nightly"})," WebAssembly (wasm) targets to your development\nenvironment by running the following commands:"]}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"rustup update nightly\nrustup target add wasm32-unknown-unknown --toolchain nightly\n"})}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.a,{href:"#verifying-installation",children:"Verify your installation here."})}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["\n",(0,l.jsxs)(n.p,{children:["Install ",(0,l.jsx)(n.code,{children:"cmake"})," using the following command:"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{children:"brew install cmake\n"})}),"\n",(0,l.jsx)(n.h2,{id:"linux",children:"Linux"}),"\n",(0,l.jsxs)(n.p,{children:["Rust supports most Linux distributions. Depending on the specific distribution and version of the\noperating system you use, you might need to add some software dependencies to your environment. In\ngeneral, your development environment should include a linker or C-compatible compiler such as\n",(0,l.jsx)(n.code,{children:"clang"})," and an appropriate integrated development environment (IDE)."]}),"\n",(0,l.jsx)(n.h3,{id:"before-you-begin-1",children:"Before you begin"}),"\n",(0,l.jsxs)(n.p,{children:["Check the documentation for your operating system for information about the packages that are\ninstalled and how to download and install any additional packages you might need. For example, if\nyou use Ubuntu, you can use the Ubuntu Advanced Packaging Tool (",(0,l.jsx)(n.code,{children:"apt"}),") to install the\n",(0,l.jsx)(n.code,{children:"build-essential"})," package:"]}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"sudo apt install build-essential\n"})}),"\n",(0,l.jsx)(n.p,{children:"At a minimum, you need the following packages before you install Rust:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-text",children:"clang curl git make\n"})}),"\n",(0,l.jsxs)(n.p,{children:["Because the blockchain requires standard cryptography to support the generation of public/private\nkey pairs and the validation of transaction signatures, you must also have a package that provides\ncryptography, such as ",(0,l.jsx)(n.code,{children:"libssl-dev"})," or ",(0,l.jsx)(n.code,{children:"openssl-devel"}),"."]}),"\n",(0,l.jsx)(n.h3,{id:"install-required-packages-and-rust",children:"Install required packages and Rust"}),"\n",(0,l.jsx)(n.p,{children:"To install the Rust toolchain on Linux:"}),"\n",(0,l.jsxs)(n.ol,{children:["\n",(0,l.jsxs)(n.li,{children:["\n",(0,l.jsx)(n.p,{children:"Log on to your computer and open a terminal shell."}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["\n",(0,l.jsx)(n.p,{children:"Check the packages you have installed on the local computer by running an appropriate package\nmanagement command for your Linux distribution."}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["\n",(0,l.jsx)(n.p,{children:"Add any package dependencies you are missing to your local development environment by running an\nappropriate package management command for your Linux distribution."}),"\n",(0,l.jsx)(n.p,{children:"For example, on Ubuntu Desktop or Ubuntu Server, you might run a command similar to the\nfollowing:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"sudo apt install --assume-yes git clang curl libssl-dev protobuf-compiler\n"})}),"\n",(0,l.jsx)(n.p,{children:"Click the tab titles to see examples for other Linux operating systems:"}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(a.A,{groupId:"clients",values:[{label:"Debian",value:"deb"},{label:"Arch",value:"arch"},{label:"Fedora",value:"fed"},{label:"openSUSE",value:"opensuse"}],children:[(0,l.jsx)(t.A,{value:"deb",children:(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-sh",children:"sudo apt install --assume-yes git clang curl libssl-dev llvm libudev-dev make protobuf-compiler\n"})})}),(0,l.jsx)(t.A,{value:"arch",children:(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-sh",children:"pacman -Syu --needed --noconfirm curl git clang make protobuf\n"})})}),(0,l.jsx)(t.A,{value:"fed",children:(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-sh",children:"sudo dnf update\nsudo dnf install clang curl git openssl-devel make protobuf-compiler\n"})})}),(0,l.jsx)(t.A,{value:"opensuse",children:(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-sh",children:"sudo zypper install clang curl git openssl-devel llvm-devel libudev-devel make protobuf\n"})})})]}),"\n",(0,l.jsx)(n.p,{children:"Remember that different distributions might use different package managers and bundle packages in\ndifferent ways. For example, depending on your installation selections, Ubuntu Desktop and Ubuntu\nServer might have different packages and different requirements. However, the packages listed in the\ncommand-line examples are applicable for many common Linux distributions, including Debian, Linux\nMint, MX Linux, and Elementary OS."}),"\n",(0,l.jsxs)(n.ol,{children:["\n",(0,l.jsxs)(n.li,{children:["\n",(0,l.jsxs)(n.p,{children:["Download the ",(0,l.jsx)(n.code,{children:"rustup"})," installation program and use it to install Rust by running the following\ncommand:"]}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh\n"})}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["\n",(0,l.jsx)(n.p,{children:"Follow the prompts displayed to proceed with a default installation."}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["\n",(0,l.jsx)(n.p,{children:"Update your current shell to include Cargo by running the following command:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"source $HOME/.cargo/env\n"})}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["\n",(0,l.jsx)(n.p,{children:"Verify your installation by running the following command:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"rustc --version\n"})}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["\n",(0,l.jsx)(n.p,{children:"Configure the Rust toolchain to default to the latest stable version by running the following\ncommands:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"rustup default stable\nrustup update\n"})}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["\n",(0,l.jsxs)(n.p,{children:["Add the ",(0,l.jsx)(n.code,{children:"nightly"})," release and the ",(0,l.jsx)(n.code,{children:"nightly"})," WebAssembly (wasm) targets to your development\nenvironment by running the following commands:"]}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"rustup update nightly\nrustup target add wasm32-unknown-unknown --toolchain nightly\n"})}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.a,{href:"#verifying-installation",children:"Verify your installation here."})}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"windows-wsl",children:"Windows (WSL)"}),"\n",(0,l.jsx)(n.p,{children:"In general, UNIX-based operating systems\u2014like macOS or Linux\u2014provide a better development\nenvironment for building Substrate-based blockchains."}),"\n",(0,l.jsx)(n.p,{children:"However, if your local computer uses Microsoft Windows instead of a UNIX-based operating system, you\ncan configure it with additional software to make it a suitable development environment for building\nSubstrate-based blockchains. To prepare a development environment on a computer running Microsoft\nWindows, you can use Windows Subsystem for Linux (WSL) to emulate a UNIX operating environment."}),"\n",(0,l.jsx)(n.h3,{id:"before-you-begin-2",children:"Before you begin"}),"\n",(0,l.jsx)(n.p,{children:"Before installing on Microsoft Windows, verify the following basic requirements:"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"You have a computer running a supported version of the Microsoft Windows operating system."}),"\n",(0,l.jsx)(n.li,{children:"You must be running Microsoft Windows 10, version 2004 or later, or Microsoft Windows 11 to\ninstall Windows Subsystem for Linux on a computer with the Windows desktop operating system."}),"\n",(0,l.jsx)(n.li,{children:"You must be running Microsoft Windows Server 2019, or later, to install Windows Subsystem for\nLinux on a computer with the Windows server operating system."}),"\n",(0,l.jsx)(n.li,{children:"You have good internet connection and access to a shell terminal on your local computer."}),"\n"]}),"\n",(0,l.jsx)(n.h3,{id:"set-up-windows-subsystem-for-linux",children:"Set up Windows Subsystem for Linux"}),"\n",(0,l.jsxs)(n.p,{children:["Windows Subsystem for Linux (WSL) enables you to emulate a Linux environment on a computer that uses\nthe Windows operating system. The primary advantage of this approach for Substrate development is\nthat you can use all of the code and command-line examples as described in the Substrate\ndocumentation. For example, you can run common commands\u2014such as ",(0,l.jsx)(n.code,{children:"ls"})," and ",(0,l.jsx)(n.code,{children:"ps"}),"\u2014unmodified. By using\nWindows Subsystem for Linux, you can avoid configuring a virtual machine image or a dual-boot\noperating system."]}),"\n",(0,l.jsx)(n.p,{children:"To prepare a development environment using Windows Subsystem for Linux:"}),"\n",(0,l.jsxs)(n.ol,{children:["\n",(0,l.jsxs)(n.li,{children:["\n",(0,l.jsx)(n.p,{children:"Check your Windows version and build number to see if Windows Subsystem for Linux is enabled by\ndefault."}),"\n",(0,l.jsx)(n.p,{children:"If you have Microsoft Windows 10, version 2004 (Build 19041 and higher), or Microsoft Windows 11,\nWindows Subsystem for Linux is available by default and you can continue to the next step."}),"\n",(0,l.jsxs)(n.p,{children:["If you have an older version of Microsoft Windows installed, see\n",(0,l.jsx)(n.a,{href:"https://docs.microsoft.com/en-us/windows/wsl/install-manual",children:"WSL manual installation steps for older versions"}),".\nIf you are installing on an older version of Microsoft Windows, you can download and install WLS\n2 if your computer has Windows 10, version 1903 or higher."]}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["\n",(0,l.jsxs)(n.p,{children:["Select Windows PowerShell or Command Prompt from the Start menu, right-click, then ",(0,l.jsx)(n.strong,{children:"Run as\nadministrator"}),"."]}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["\n",(0,l.jsx)(n.p,{children:"In the PowerShell or Command Prompt terminal, run the following command:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"wsl --install\n"})}),"\n",(0,l.jsx)(n.p,{children:"This command enables the required WSL 2 components that are part of the Windows operating system,\ndownloads the latest Linux kernel, and installs the Ubuntu Linux distribution by default."}),"\n",(0,l.jsx)(n.p,{children:"If you want to review the other Linux distributions available, run the following command:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"wsl --list --online\n"})}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["\n",(0,l.jsx)(n.p,{children:"After the distribution is downloaded, close the terminal."}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["\n",(0,l.jsxs)(n.p,{children:["Click the Start menu, select ",(0,l.jsx)(n.strong,{children:"Shut down or sign out"}),", then click ",(0,l.jsx)(n.strong,{children:"Restart"})," to restart the\ncomputer."]}),"\n",(0,l.jsx)(n.p,{children:"Restarting the computer is required to start the installation of the Linux distribution. It can\ntake a few minutes for the installation to complete after you restart."}),"\n",(0,l.jsxs)(n.p,{children:["For more information about setting up WSL as a development environment, see\n",(0,l.jsx)(n.a,{href:"https://docs.microsoft.com/en-us/windows/wsl/setup/environment",children:"Set up a WSL development environment"}),"."]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(n.h3,{id:"install-required-packages-and-rust-1",children:"Install required packages and Rust"}),"\n",(0,l.jsx)(n.p,{children:"To install the Rust toolchain on WSL:"}),"\n",(0,l.jsxs)(n.ol,{children:["\n",(0,l.jsxs)(n.li,{children:["\n",(0,l.jsxs)(n.p,{children:["Click the Start menu, then select ",(0,l.jsx)(n.strong,{children:"Ubuntu"}),"."]}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["\n",(0,l.jsx)(n.p,{children:"Type a UNIX user name to create user account."}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["\n",(0,l.jsx)(n.p,{children:"Type a password for your UNIX user, then retype the password to confirm it."}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["\n",(0,l.jsxs)(n.p,{children:["Download the latest updates for the Ubuntu distribution using the Ubuntu Advanced Packaging Tool\n(",(0,l.jsx)(n.code,{children:"apt"}),") by running the following command:"]}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"sudo apt update\n"})}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["\n",(0,l.jsx)(n.p,{children:"Add the required packages for the Ubuntu distribution by running the following command:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"sudo apt install --assume-yes git clang curl libssl-dev llvm libudev-dev make protobuf-compiler\n"})}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["\n",(0,l.jsxs)(n.p,{children:["Download the ",(0,l.jsx)(n.code,{children:"rustup"})," installation program and use it to install Rust for the Ubuntu distribution\nby running the following command:"]}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh\n"})}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["\n",(0,l.jsx)(n.p,{children:"Follow the prompts displayed to proceed with a default installation."}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["\n",(0,l.jsx)(n.p,{children:"Update your current shell to include Cargo by running the following command:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"source ~/.cargo/env\n"})}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["\n",(0,l.jsx)(n.p,{children:"Verify your installation by running the following command:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"rustc --version\n"})}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["\n",(0,l.jsx)(n.p,{children:"Configure the Rust toolchain to use the latest stable version as the default toolchain by\nrunning the following commands:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"rustup default stable\nrustup update\n"})}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["\n",(0,l.jsxs)(n.p,{children:["Add the ",(0,l.jsx)(n.code,{children:"nightly"})," version of the toolchain and the ",(0,l.jsx)(n.code,{children:"nightly"})," WebAssembly (",(0,l.jsx)(n.code,{children:"wasm"}),") target to your\ndevelopment environment by running the following commands:"]}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"rustup update nightly\nrustup target add wasm32-unknown-unknown --toolchain nightly\n"})}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.a,{href:"#verifying-installation",children:"Verify your installation here."})}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"verifying-installation",children:"Verifying Installation"}),"\n",(0,l.jsx)(n.p,{children:"Verify the configuration of your development environment by running the following command:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"rustup show\nrustup +nightly show\n"})}),"\n",(0,l.jsx)(n.p,{children:"The command displays output similar to the following:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"# rustup show\n\nactive toolchain\n----------------\n\nstable-x86_64-unknown-linux-gnu (default)\nrustc 1.61.0 (fe5b13d68 2022-05-18)\n\n# rustup +nightly show\n\nactive toolchain\n----------------\n\nnightly-x86_64-unknown-linux-gnu (overridden by +toolchain on the command line)\nrustc 1.63.0-nightly (e7144\n"})}),"\n",(0,l.jsxs)(n.h2,{id:"install-polkadot-parachain-and-chain-spec-builder",children:["Install ",(0,l.jsx)(n.code,{children:"polkadot-parachain"})," and ",(0,l.jsx)(n.code,{children:"chain-spec-builder"})]}),"\n",(0,l.jsxs)(n.p,{children:["The ",(0,l.jsx)(n.code,{children:"polkadot-parachain"})," can be used a universal collator instance for running most of the\nparachains (an\n",(0,l.jsx)(n.a,{href:"https://forum.polkadot.network/t/polkadot-parachain-omni-node-gathering-ideas-and-feedback/7823",children:'"omninode beta"'}),").\nIt can be installed as follows:"]}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-sh",children:"cargo install --git https://github.com/paritytech/polkadot-sdk --tag polkadot-v1.15.1 --force polkadot-parachain-bin\n"})}),"\n",(0,l.jsxs)(n.p,{children:[(0,l.jsx)(n.code,{children:"chain-spec-builder"})," is how you will generate chain specifications for your network. It requires a\n",(0,l.jsx)(n.code,{children:"wasm"})," runtime bundle to generate the chain specification from."]}),"\n",(0,l.jsx)(n.p,{children:"It can be installed as follows:"}),"\n",(0,l.jsxs)(n.blockquote,{children:["\n",(0,l.jsxs)(n.p,{children:["Note that chain-spec-builder only works with select Polkadot SDK versions (",(0,l.jsx)(n.code,{children:"{s.d(n,{A:()=>t});s(96540);var l=s(34164);const i={tabItem:"tabItem_Ymn6"};var a=s(74848);function t(e){var n=e.children,s=e.hidden,t=e.className;return(0,a.jsx)("div",{role:"tabpanel",className:(0,l.A)(i.tabItem,t),hidden:s,children:n})}},11470:(e,n,s)=>{s.d(n,{A:()=>w});var l=s(96540),i=s(34164),a=s(23104),t=s(56347),r=s(205),o=s(57485),d=s(31682),c=s(75376);function u(e){var n,s;return null!=(n=null==(s=l.Children.toArray(e).filter((function(e){return"\n"!==e})).map((function(e){if(!e||(0,l.isValidElement)(e)&&((n=e.props)&&"object"==typeof n&&"value"in n))return e;var n;throw new Error("Docusaurus error: Bad child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:s.filter(Boolean))?n:[]}function h(e){var n=e.values,s=e.children;return(0,l.useMemo)((function(){var e=null!=n?n:function(e){return u(e).map((function(e){var n=e.props;return{value:n.value,label:n.label,attributes:n.attributes,default:n.default}}))}(s);return function(e){var n=(0,d.XI)(e,(function(e,n){return e.value===n.value}));if(n.length>0)throw new Error('Docusaurus error: Duplicate values "'+n.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[n,s])}function p(e){var n=e.value;return e.tabValues.some((function(e){return e.value===n}))}function m(e){var n=e.queryString,s=void 0!==n&&n,i=e.groupId,a=(0,t.W6)(),r=function(e){var n=e.queryString,s=void 0!==n&&n,l=e.groupId;if("string"==typeof s)return s;if(!1===s)return null;if(!0===s&&!l)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=l?l:null}({queryString:s,groupId:i});return[(0,o.aZ)(r),(0,l.useCallback)((function(e){if(r){var n=new URLSearchParams(a.location.search);n.set(r,e),a.replace(Object.assign({},a.location,{search:n.toString()}))}}),[r,a])]}function g(e){var n,s,i,a,t=e.defaultValue,o=e.queryString,d=void 0!==o&&o,u=e.groupId,g=h(e),b=(0,l.useState)((function(){return function(e){var n,s=e.defaultValue,l=e.tabValues;if(0===l.length)throw new Error("Docusaurus error: the component requires at least one children component");if(s){if(!p({value:s,tabValues:l}))throw new Error('Docusaurus error: The has a defaultValue "'+s+'" but none of its children has the corresponding value. Available values are: '+l.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return s}var i=null!=(n=l.find((function(e){return e.default})))?n:l[0];if(!i)throw new Error("Unexpected error: 0 tabValues");return i.value}({defaultValue:t,tabValues:g})})),x=b[0],f=b[1],j=m({queryString:d,groupId:u}),v=j[0],y=j[1],w=(n=function(e){return e?"docusaurus.tab."+e:null}({groupId:u}.groupId),s=(0,c.Dv)(n),i=s[0],a=s[1],[i,(0,l.useCallback)((function(e){n&&a.set(e)}),[n,a])]),k=w[0],S=w[1],I=function(){var e=null!=v?v:k;return p({value:e,tabValues:g})?e:null}();return(0,r.A)((function(){I&&f(I)}),[I]),{selectedValue:x,selectValue:(0,l.useCallback)((function(e){if(!p({value:e,tabValues:g}))throw new Error("Can't select invalid tab value="+e);f(e),y(e),S(e)}),[y,S,g]),tabValues:g}}var b=s(92303);const x={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var f=s(74848);function j(e){var n=e.className,s=e.block,l=e.selectedValue,t=e.selectValue,r=e.tabValues,o=[],d=(0,a.a_)().blockElementScrollPositionUntilNextRender,c=function(e){var n=e.currentTarget,s=o.indexOf(n),i=r[s].value;i!==l&&(d(n),t(i))},u=function(e){var n,s=null;switch(e.key){case"Enter":c(e);break;case"ArrowRight":var l,i=o.indexOf(e.currentTarget)+1;s=null!=(l=o[i])?l:o[0];break;case"ArrowLeft":var a,t=o.indexOf(e.currentTarget)-1;s=null!=(a=o[t])?a:o[o.length-1]}null==(n=s)||n.focus()};return(0,f.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,i.A)("tabs",{"tabs--block":s},n),children:r.map((function(e){var n=e.value,s=e.label,a=e.attributes;return(0,f.jsx)("li",Object.assign({role:"tab",tabIndex:l===n?0:-1,"aria-selected":l===n,ref:function(e){return o.push(e)},onKeyDown:u,onClick:c},a,{className:(0,i.A)("tabs__item",x.tabItem,null==a?void 0:a.className,{"tabs__item--active":l===n}),children:null!=s?s:n}),n)}))})}function v(e){var n=e.lazy,s=e.children,a=e.selectedValue,t=(Array.isArray(s)?s:[s]).filter(Boolean);if(n){var r=t.find((function(e){return e.props.value===a}));return r?(0,l.cloneElement)(r,{className:(0,i.A)("margin-top--md",r.props.className)}):null}return(0,f.jsx)("div",{className:"margin-top--md",children:t.map((function(e,n){return(0,l.cloneElement)(e,{key:n,hidden:e.props.value!==a})}))})}function y(e){var n=g(e);return(0,f.jsxs)("div",{className:(0,i.A)("tabs-container",x.tabList),children:[(0,f.jsx)(j,Object.assign({},n,e)),(0,f.jsx)(v,Object.assign({},n,e))]})}function w(e){var n=(0,b.A)();return(0,f.jsx)(y,Object.assign({},e,{children:u(e.children)}),String(n))}},28453:(e,n,s)=>{s.d(n,{R:()=>t,x:()=>r});var l=s(96540);const i={},a=l.createContext(i);function t(e){const n=l.useContext(a);return l.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:t(e.components),l.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/e4ef088f.e970c859.js b/assets/js/e4ef088f.e970c859.js new file mode 100644 index 000000000000..d8d2354c2bd0 --- /dev/null +++ b/assets/js/e4ef088f.e970c859.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3315],{20888:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>c,contentTitle:()=>d,default:()=>p,frontMatter:()=>o,metadata:()=>l,toc:()=>u});const l=JSON.parse('{"id":"build/build-guides-install-deps","title":"Install Polkadot SDK Dependencies","description":"Install dependencies for developing for using the Polkadot SDK","source":"@site/../docs/build/build-guides-install-deps.md","sourceDirName":"build","slug":"/build-guides-install-deps","permalink":"/docs/build-guides-install-deps","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/build/build-guides-install-deps.md","tags":[],"version":"current","lastUpdatedBy":"bader y","lastUpdatedAt":1726234601000,"frontMatter":{"id":"build-guides-install-deps","title":"Install Polkadot SDK Dependencies","sidebar_label":"Install Dependencies","description":"Install dependencies for developing for using the Polkadot SDK","keywords":["coretime","blockspace","parathread","parachain","cores"],"slug":"../build-guides-install-deps"},"sidebar":"docs","previous":{"title":"Intro to the Polkadot SDK","permalink":"/docs/build-guides-coretime-start"},"next":{"title":"Parachain Template Guide","permalink":"/docs/build-guides-template-basic"}}');var i=s(74848),a=s(28453),t=s(11470),r=s(19365);const o={id:"build-guides-install-deps",title:"Install Polkadot SDK Dependencies",sidebar_label:"Install Dependencies",description:"Install dependencies for developing for using the Polkadot SDK",keywords:["coretime","blockspace","parathread","parachain","cores"],slug:"../build-guides-install-deps"},d=void 0,c={},u=[{value:"macOS",id:"macos",level:2},{value:"Before you begin",id:"before-you-begin",level:3},{value:"Support for Apple Silicon",id:"support-for-apple-silicon",level:4},{value:"Install Homebrew",id:"install-homebrew",level:4},{value:"Installation",id:"installation",level:3},{value:"Linux",id:"linux",level:2},{value:"Before you begin",id:"before-you-begin-1",level:3},{value:"Install required packages and Rust",id:"install-required-packages-and-rust",level:3},{value:"Windows (WSL)",id:"windows-wsl",level:2},{value:"Before you begin",id:"before-you-begin-2",level:3},{value:"Set up Windows Subsystem for Linux",id:"set-up-windows-subsystem-for-linux",level:3},{value:"Install required packages and Rust",id:"install-required-packages-and-rust-1",level:3},{value:"Verifying Installation",id:"verifying-installation",level:2},{value:"Install polkadot-parachain and chain-spec-builder",id:"install-polkadot-parachain-and-chain-spec-builder",level:2}];function h(e){const n={a:"a",blockquote:"blockquote",code:"code",h2:"h2",h3:"h3",h4:"h4",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,a.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h2,{id:"macos",children:"macOS"}),"\n",(0,i.jsx)(n.p,{children:"You can install Rust and set up a Substrate development environment on Apple macOS computers with\neither Intel or an Apple M1 processors."}),"\n",(0,i.jsx)(n.h3,{id:"before-you-begin",children:"Before you begin"}),"\n",(0,i.jsx)(n.p,{children:"Before you install Rust and set up your development environment on macOS, verify that your computer\nmeets the following basic requirements:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Operating system version is 10.7 Lion, or later."}),"\n",(0,i.jsx)(n.li,{children:"Processor speed of at least 2Ghz, 3Ghz recommended."}),"\n",(0,i.jsx)(n.li,{children:"Memory of at least 8 GB RAM, 16 GB recommended."}),"\n",(0,i.jsx)(n.li,{children:"Storage of at 10 GB available space."}),"\n",(0,i.jsx)(n.li,{children:"Broadband Internet connection."}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"support-for-apple-silicon",children:"Support for Apple Silicon"}),"\n",(0,i.jsx)(n.p,{children:"Protobuf must be installed before the build process can begin. To install it, run the following\ncommand:"}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.code,{children:"brew install protobuf"})}),"\n",(0,i.jsx)(n.h4,{id:"install-homebrew",children:"Install Homebrew"}),"\n",(0,i.jsx)(n.p,{children:"In most cases, you should use Homebrew to install and manage packages on macOS computers. If you\ndon't already have Homebrew installed on your local computer, you should download and install it\nbefore continuing."}),"\n",(0,i.jsx)(n.p,{children:"To install Homebrew:"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:"Open the Terminal application."}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:"Download and install Homebrew by running the following command:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:'/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"\n'})}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:"Verify Homebrew has been successfully installed by running the following command:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"brew --version\n"})}),"\n",(0,i.jsx)(n.p,{children:"The command displays output similar to the following:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"Homebrew 3.3.1\nHomebrew/homebrew-core (git revision c6c488fbc0f; last commit 2021-10-30)\nHomebrew/homebrew-cask (git revision 66bab33b26; last commit 2021-10-30)\n"})}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.h3,{id:"installation",children:"Installation"}),"\n",(0,i.jsxs)(n.p,{children:["Because the blockchain requires standard cryptography to support the generation of public/private\nkey pairs and the validation of transaction signatures, you must also have a package that provides\ncryptography, such as ",(0,i.jsx)(n.code,{children:"openssl"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["To install ",(0,i.jsx)(n.code,{children:"openssl"})," and the Rust toolchain on macOS:"]}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:"Open the Terminal application."}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:"Ensure you have an updated version of Homebrew by running the following command:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"brew update\n"})}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:["Install the ",(0,i.jsx)(n.code,{children:"openssl"})," package by running the following command:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"brew install openssl\n"})}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:["Download the ",(0,i.jsx)(n.code,{children:"rustup"})," installation program and use it to install Rust by running the following\ncommand:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh\n"})}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:"Follow the prompts displayed to proceed with a default installation."}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:"Update your current shell to include Cargo by running the following command:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"source ~/.cargo/env\n"})}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:"Configure the Rust toolchain to default to the latest stable version by running the following\ncommands:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"rustup default stable\nrustup update\nrustup target add wasm32-unknown-unknown\n"})}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:["Add the ",(0,i.jsx)(n.code,{children:"nightly"})," release and the ",(0,i.jsx)(n.code,{children:"nightly"})," WebAssembly (wasm) targets to your development\nenvironment by running the following commands:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"rustup update nightly\nrustup target add wasm32-unknown-unknown --toolchain nightly\n"})}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.a,{href:"#verifying-installation",children:"Verify your installation here."})}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:["Install ",(0,i.jsx)(n.code,{children:"cmake"})," using the following command:"]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"brew install cmake\n"})}),"\n",(0,i.jsx)(n.h2,{id:"linux",children:"Linux"}),"\n",(0,i.jsxs)(n.p,{children:["Rust supports most Linux distributions. Depending on the specific distribution and version of the\noperating system you use, you might need to add some software dependencies to your environment. In\ngeneral, your development environment should include a linker or C-compatible compiler such as\n",(0,i.jsx)(n.code,{children:"clang"})," and an appropriate integrated development environment (IDE)."]}),"\n",(0,i.jsx)(n.h3,{id:"before-you-begin-1",children:"Before you begin"}),"\n",(0,i.jsxs)(n.p,{children:["Check the documentation for your operating system for information about the packages that are\ninstalled and how to download and install any additional packages you might need. For example, if\nyou use Ubuntu, you can use the Ubuntu Advanced Packaging Tool (",(0,i.jsx)(n.code,{children:"apt"}),") to install the\n",(0,i.jsx)(n.code,{children:"build-essential"})," package:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"sudo apt install build-essential\n"})}),"\n",(0,i.jsx)(n.p,{children:"At a minimum, you need the following packages before you install Rust:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-text",children:"clang curl git make\n"})}),"\n",(0,i.jsxs)(n.p,{children:["Because the blockchain requires standard cryptography to support the generation of public/private\nkey pairs and the validation of transaction signatures, you must also have a package that provides\ncryptography, such as ",(0,i.jsx)(n.code,{children:"libssl-dev"})," or ",(0,i.jsx)(n.code,{children:"openssl-devel"}),"."]}),"\n",(0,i.jsx)(n.h3,{id:"install-required-packages-and-rust",children:"Install required packages and Rust"}),"\n",(0,i.jsx)(n.p,{children:"To install the Rust toolchain on Linux:"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:"Log on to your computer and open a terminal shell."}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:"Check the packages you have installed on the local computer by running an appropriate package\nmanagement command for your Linux distribution."}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:"Add any package dependencies you are missing to your local development environment by running an\nappropriate package management command for your Linux distribution."}),"\n",(0,i.jsx)(n.p,{children:"For example, on Ubuntu Desktop or Ubuntu Server, you might run a command similar to the\nfollowing:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"sudo apt install --assume-yes git clang curl libssl-dev protobuf-compiler\n"})}),"\n",(0,i.jsx)(n.p,{children:"Click the tab titles to see examples for other Linux operating systems:"}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(t.A,{groupId:"clients",values:[{label:"Debian",value:"deb"},{label:"Arch",value:"arch"},{label:"Fedora",value:"fed"},{label:"openSUSE",value:"opensuse"}],children:[(0,i.jsx)(r.A,{value:"deb",children:(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-sh",children:"sudo apt install --assume-yes git clang curl libssl-dev llvm libudev-dev make protobuf-compiler\n"})})}),(0,i.jsx)(r.A,{value:"arch",children:(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-sh",children:"pacman -Syu --needed --noconfirm curl git clang make protobuf\n"})})}),(0,i.jsx)(r.A,{value:"fed",children:(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-sh",children:"sudo dnf update\nsudo dnf install clang curl git openssl-devel make protobuf-compiler\n"})})}),(0,i.jsx)(r.A,{value:"opensuse",children:(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-sh",children:"sudo zypper install clang curl git openssl-devel llvm-devel libudev-devel make protobuf\n"})})})]}),"\n",(0,i.jsx)(n.p,{children:"Remember that different distributions might use different package managers and bundle packages in\ndifferent ways. For example, depending on your installation selections, Ubuntu Desktop and Ubuntu\nServer might have different packages and different requirements. However, the packages listed in the\ncommand-line examples are applicable for many common Linux distributions, including Debian, Linux\nMint, MX Linux, and Elementary OS."}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:["Download the ",(0,i.jsx)(n.code,{children:"rustup"})," installation program and use it to install Rust by running the following\ncommand:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh\n"})}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:"Follow the prompts displayed to proceed with a default installation."}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:"Update your current shell to include Cargo by running the following command:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"source $HOME/.cargo/env\n"})}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:"Verify your installation by running the following command:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"rustc --version\n"})}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:"Configure the Rust toolchain to default to the latest stable version by running the following\ncommands:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"rustup default stable\nrustup update\n"})}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:["Add the ",(0,i.jsx)(n.code,{children:"nightly"})," release and the ",(0,i.jsx)(n.code,{children:"nightly"})," WebAssembly (wasm) targets to your development\nenvironment by running the following commands:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"rustup update nightly\nrustup target add wasm32-unknown-unknown --toolchain nightly\n"})}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.a,{href:"#verifying-installation",children:"Verify your installation here."})}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"windows-wsl",children:"Windows (WSL)"}),"\n",(0,i.jsx)(n.p,{children:"In general, UNIX-based operating systems\u2014like macOS or Linux\u2014provide a better development\nenvironment for building Substrate-based blockchains."}),"\n",(0,i.jsx)(n.p,{children:"However, if your local computer uses Microsoft Windows instead of a UNIX-based operating system, you\ncan configure it with additional software to make it a suitable development environment for building\nSubstrate-based blockchains. To prepare a development environment on a computer running Microsoft\nWindows, you can use Windows Subsystem for Linux (WSL) to emulate a UNIX operating environment."}),"\n",(0,i.jsx)(n.h3,{id:"before-you-begin-2",children:"Before you begin"}),"\n",(0,i.jsx)(n.p,{children:"Before installing on Microsoft Windows, verify the following basic requirements:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"You have a computer running a supported version of the Microsoft Windows operating system."}),"\n",(0,i.jsx)(n.li,{children:"You must be running Microsoft Windows 10, version 2004 or later, or Microsoft Windows 11 to\ninstall Windows Subsystem for Linux on a computer with the Windows desktop operating system."}),"\n",(0,i.jsx)(n.li,{children:"You must be running Microsoft Windows Server 2019, or later, to install Windows Subsystem for\nLinux on a computer with the Windows server operating system."}),"\n",(0,i.jsx)(n.li,{children:"You have good internet connection and access to a shell terminal on your local computer."}),"\n"]}),"\n",(0,i.jsx)(n.h3,{id:"set-up-windows-subsystem-for-linux",children:"Set up Windows Subsystem for Linux"}),"\n",(0,i.jsxs)(n.p,{children:["Windows Subsystem for Linux (WSL) enables you to emulate a Linux environment on a computer that uses\nthe Windows operating system. The primary advantage of this approach for Substrate development is\nthat you can use all of the code and command-line examples as described in the Substrate\ndocumentation. For example, you can run common commands\u2014such as ",(0,i.jsx)(n.code,{children:"ls"})," and ",(0,i.jsx)(n.code,{children:"ps"}),"\u2014unmodified. By using\nWindows Subsystem for Linux, you can avoid configuring a virtual machine image or a dual-boot\noperating system."]}),"\n",(0,i.jsx)(n.p,{children:"To prepare a development environment using Windows Subsystem for Linux:"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:"Check your Windows version and build number to see if Windows Subsystem for Linux is enabled by\ndefault."}),"\n",(0,i.jsx)(n.p,{children:"If you have Microsoft Windows 10, version 2004 (Build 19041 and higher), or Microsoft Windows 11,\nWindows Subsystem for Linux is available by default and you can continue to the next step."}),"\n",(0,i.jsxs)(n.p,{children:["If you have an older version of Microsoft Windows installed, see\n",(0,i.jsx)(n.a,{href:"https://docs.microsoft.com/en-us/windows/wsl/install-manual",children:"WSL manual installation steps for older versions"}),".\nIf you are installing on an older version of Microsoft Windows, you can download and install WLS\n2 if your computer has Windows 10, version 1903 or higher."]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:["Select Windows PowerShell or Command Prompt from the Start menu, right-click, then ",(0,i.jsx)(n.strong,{children:"Run as\nadministrator"}),"."]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:"In the PowerShell or Command Prompt terminal, run the following command:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"wsl --install\n"})}),"\n",(0,i.jsx)(n.p,{children:"This command enables the required WSL 2 components that are part of the Windows operating system,\ndownloads the latest Linux kernel, and installs the Ubuntu Linux distribution by default."}),"\n",(0,i.jsx)(n.p,{children:"If you want to review the other Linux distributions available, run the following command:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"wsl --list --online\n"})}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:"After the distribution is downloaded, close the terminal."}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:["Click the Start menu, select ",(0,i.jsx)(n.strong,{children:"Shut down or sign out"}),", then click ",(0,i.jsx)(n.strong,{children:"Restart"})," to restart the\ncomputer."]}),"\n",(0,i.jsx)(n.p,{children:"Restarting the computer is required to start the installation of the Linux distribution. It can\ntake a few minutes for the installation to complete after you restart."}),"\n",(0,i.jsxs)(n.p,{children:["For more information about setting up WSL as a development environment, see\n",(0,i.jsx)(n.a,{href:"https://docs.microsoft.com/en-us/windows/wsl/setup/environment",children:"Set up a WSL development environment"}),"."]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.h3,{id:"install-required-packages-and-rust-1",children:"Install required packages and Rust"}),"\n",(0,i.jsx)(n.p,{children:"To install the Rust toolchain on WSL:"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:["Click the Start menu, then select ",(0,i.jsx)(n.strong,{children:"Ubuntu"}),"."]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:"Type a UNIX user name to create user account."}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:"Type a password for your UNIX user, then retype the password to confirm it."}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:["Download the latest updates for the Ubuntu distribution using the Ubuntu Advanced Packaging Tool\n(",(0,i.jsx)(n.code,{children:"apt"}),") by running the following command:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"sudo apt update\n"})}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:"Add the required packages for the Ubuntu distribution by running the following command:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"sudo apt install --assume-yes git clang curl libssl-dev llvm libudev-dev make protobuf-compiler\n"})}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:["Download the ",(0,i.jsx)(n.code,{children:"rustup"})," installation program and use it to install Rust for the Ubuntu distribution\nby running the following command:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh\n"})}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:"Follow the prompts displayed to proceed with a default installation."}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:"Update your current shell to include Cargo by running the following command:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"source ~/.cargo/env\n"})}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:"Verify your installation by running the following command:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"rustc --version\n"})}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:"Configure the Rust toolchain to use the latest stable version as the default toolchain by\nrunning the following commands:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"rustup default stable\nrustup update\n"})}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:["Add the ",(0,i.jsx)(n.code,{children:"nightly"})," version of the toolchain and the ",(0,i.jsx)(n.code,{children:"nightly"})," WebAssembly (",(0,i.jsx)(n.code,{children:"wasm"}),") target to your\ndevelopment environment by running the following commands:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"rustup update nightly\nrustup target add wasm32-unknown-unknown --toolchain nightly\n"})}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.a,{href:"#verifying-installation",children:"Verify your installation here."})}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"verifying-installation",children:"Verifying Installation"}),"\n",(0,i.jsx)(n.p,{children:"Verify the configuration of your development environment by running the following command:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"rustup show\nrustup +nightly show\n"})}),"\n",(0,i.jsx)(n.p,{children:"The command displays output similar to the following:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"# rustup show\n\nactive toolchain\n----------------\n\nstable-x86_64-unknown-linux-gnu (default)\nrustc 1.61.0 (fe5b13d68 2022-05-18)\n\n# rustup +nightly show\n\nactive toolchain\n----------------\n\nnightly-x86_64-unknown-linux-gnu (overridden by +toolchain on the command line)\nrustc 1.63.0-nightly (e7144\n"})}),"\n",(0,i.jsxs)(n.h2,{id:"install-polkadot-parachain-and-chain-spec-builder",children:["Install ",(0,i.jsx)(n.code,{children:"polkadot-parachain"})," and ",(0,i.jsx)(n.code,{children:"chain-spec-builder"})]}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.code,{children:"polkadot-parachain"})," can be used a universal collator instance for running most of the\nparachains (an\n",(0,i.jsx)(n.a,{href:"https://forum.polkadot.network/t/polkadot-parachain-omni-node-gathering-ideas-and-feedback/7823",children:'"omninode beta"'}),").\nIt can be installed as follows:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-sh",children:"cargo install --git https://github.com/paritytech/polkadot-sdk --tag polkadot-v1.15.1 --force polkadot-parachain-bin\n"})}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"chain-spec-builder"})," is how you will generate chain specifications for your network. It requires a\n",(0,i.jsx)(n.code,{children:"wasm"})," runtime bundle to generate the chain specification from."]}),"\n",(0,i.jsx)(n.p,{children:"It can be installed as follows:"}),"\n",(0,i.jsxs)(n.blockquote,{children:["\n",(0,i.jsxs)(n.p,{children:["Note that chain-spec-builder only works with select Polkadot SDK versions (",(0,i.jsx)(n.code,{children:"{s.d(n,{A:()=>t});s(96540);var l=s(34164);const i={tabItem:"tabItem_Ymn6"};var a=s(74848);function t(e){var n=e.children,s=e.hidden,t=e.className;return(0,a.jsx)("div",{role:"tabpanel",className:(0,l.A)(i.tabItem,t),hidden:s,children:n})}},11470:(e,n,s)=>{s.d(n,{A:()=>w});var l=s(96540),i=s(34164),a=s(23104),t=s(56347),r=s(205),o=s(57485),d=s(31682),c=s(75376);function u(e){var n,s;return null!=(n=null==(s=l.Children.toArray(e).filter((function(e){return"\n"!==e})).map((function(e){if(!e||(0,l.isValidElement)(e)&&((n=e.props)&&"object"==typeof n&&"value"in n))return e;var n;throw new Error("Docusaurus error: Bad child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:s.filter(Boolean))?n:[]}function h(e){var n=e.values,s=e.children;return(0,l.useMemo)((function(){var e=null!=n?n:function(e){return u(e).map((function(e){var n=e.props;return{value:n.value,label:n.label,attributes:n.attributes,default:n.default}}))}(s);return function(e){var n=(0,d.XI)(e,(function(e,n){return e.value===n.value}));if(n.length>0)throw new Error('Docusaurus error: Duplicate values "'+n.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[n,s])}function p(e){var n=e.value;return e.tabValues.some((function(e){return e.value===n}))}function m(e){var n=e.queryString,s=void 0!==n&&n,i=e.groupId,a=(0,t.W6)(),r=function(e){var n=e.queryString,s=void 0!==n&&n,l=e.groupId;if("string"==typeof s)return s;if(!1===s)return null;if(!0===s&&!l)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=l?l:null}({queryString:s,groupId:i});return[(0,o.aZ)(r),(0,l.useCallback)((function(e){if(r){var n=new URLSearchParams(a.location.search);n.set(r,e),a.replace(Object.assign({},a.location,{search:n.toString()}))}}),[r,a])]}function g(e){var n,s,i,a,t=e.defaultValue,o=e.queryString,d=void 0!==o&&o,u=e.groupId,g=h(e),b=(0,l.useState)((function(){return function(e){var n,s=e.defaultValue,l=e.tabValues;if(0===l.length)throw new Error("Docusaurus error: the component requires at least one children component");if(s){if(!p({value:s,tabValues:l}))throw new Error('Docusaurus error: The has a defaultValue "'+s+'" but none of its children has the corresponding value. Available values are: '+l.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return s}var i=null!=(n=l.find((function(e){return e.default})))?n:l[0];if(!i)throw new Error("Unexpected error: 0 tabValues");return i.value}({defaultValue:t,tabValues:g})})),x=b[0],f=b[1],j=m({queryString:d,groupId:u}),v=j[0],y=j[1],w=(n=function(e){return e?"docusaurus.tab."+e:null}({groupId:u}.groupId),s=(0,c.Dv)(n),i=s[0],a=s[1],[i,(0,l.useCallback)((function(e){n&&a.set(e)}),[n,a])]),k=w[0],S=w[1],I=function(){var e=null!=v?v:k;return p({value:e,tabValues:g})?e:null}();return(0,r.A)((function(){I&&f(I)}),[I]),{selectedValue:x,selectValue:(0,l.useCallback)((function(e){if(!p({value:e,tabValues:g}))throw new Error("Can't select invalid tab value="+e);f(e),y(e),S(e)}),[y,S,g]),tabValues:g}}var b=s(92303);const x={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var f=s(74848);function j(e){var n=e.className,s=e.block,l=e.selectedValue,t=e.selectValue,r=e.tabValues,o=[],d=(0,a.a_)().blockElementScrollPositionUntilNextRender,c=function(e){var n=e.currentTarget,s=o.indexOf(n),i=r[s].value;i!==l&&(d(n),t(i))},u=function(e){var n,s=null;switch(e.key){case"Enter":c(e);break;case"ArrowRight":var l,i=o.indexOf(e.currentTarget)+1;s=null!=(l=o[i])?l:o[0];break;case"ArrowLeft":var a,t=o.indexOf(e.currentTarget)-1;s=null!=(a=o[t])?a:o[o.length-1]}null==(n=s)||n.focus()};return(0,f.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,i.A)("tabs",{"tabs--block":s},n),children:r.map((function(e){var n=e.value,s=e.label,a=e.attributes;return(0,f.jsx)("li",Object.assign({role:"tab",tabIndex:l===n?0:-1,"aria-selected":l===n,ref:function(e){return o.push(e)},onKeyDown:u,onClick:c},a,{className:(0,i.A)("tabs__item",x.tabItem,null==a?void 0:a.className,{"tabs__item--active":l===n}),children:null!=s?s:n}),n)}))})}function v(e){var n=e.lazy,s=e.children,a=e.selectedValue,t=(Array.isArray(s)?s:[s]).filter(Boolean);if(n){var r=t.find((function(e){return e.props.value===a}));return r?(0,l.cloneElement)(r,{className:(0,i.A)("margin-top--md",r.props.className)}):null}return(0,f.jsx)("div",{className:"margin-top--md",children:t.map((function(e,n){return(0,l.cloneElement)(e,{key:n,hidden:e.props.value!==a})}))})}function y(e){var n=g(e);return(0,f.jsxs)("div",{className:(0,i.A)("tabs-container",x.tabList),children:[(0,f.jsx)(j,Object.assign({},n,e)),(0,f.jsx)(v,Object.assign({},n,e))]})}function w(e){var n=(0,b.A)();return(0,f.jsx)(y,Object.assign({},e,{children:u(e.children)}),String(n))}},28453:(e,n,s)=>{s.d(n,{R:()=>t,x:()=>r});var l=s(96540);const i={},a=l.createContext(i);function t(e){const n=l.useContext(a);return l.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:t(e.components),l.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/e77078a1.21874abc.js b/assets/js/e77078a1.21874abc.js deleted file mode 100644 index 8d4ea668c7c8..000000000000 --- a/assets/js/e77078a1.21874abc.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3557],{29138:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>s,contentTitle:()=>r,default:()=>d,frontMatter:()=>o,metadata:()=>l,toc:()=>h});var a=t(74848),i=t(28453);const o={id:"learn-jam-faq",title:"FAQ for Polkadot's JAM Chain",sidebar_label:"JAM FAQ",description:"FAQ about Polkadot's Join-Accumulate Machine.",keywords:["Polkadot","JAM","join-accumulate","faq"],slug:"../learn-jam-faq"},r=void 0,l={id:"learn/learn-jam-faq",title:"FAQ for Polkadot's JAM Chain",description:"FAQ about Polkadot's Join-Accumulate Machine.",source:"@site/../docs/learn/learn-jam-faq.md",sourceDirName:"learn",slug:"/learn-jam-faq",permalink:"/docs/learn-jam-faq",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-jam-faq.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1727346198e3,frontMatter:{id:"learn-jam-faq",title:"FAQ for Polkadot's JAM Chain",sidebar_label:"JAM FAQ",description:"FAQ about Polkadot's Join-Accumulate Machine.",keywords:["Polkadot","JAM","join-accumulate","faq"],slug:"../learn-jam-faq"},sidebar:"docs",previous:{title:"JAM Chain",permalink:"/docs/learn-jam-chain"},next:{title:"Archive",permalink:"/docs/learn-archive"}},s={},h=[{value:"What is JAM?",id:"what-is-jam",level:2},{value:"What does "JAM" stand for?",id:"what-does-jam-stand-for",level:2},{value:"Why is JAM groundbreaking?",id:"why-is-jam-groundbreaking",level:2},{value:"What are services?",id:"what-are-services",level:2},{value:"How does JAM differ from traditional blockchain networks?",id:"how-does-jam-differ-from-traditional-blockchain-networks",level:2},{value:"Will Agile Coretime remain part of the Polkadot vision?",id:"will-agile-coretime-remain-part-of-the-polkadot-vision",level:2},{value:"How do services interact with JAM?",id:"how-do-services-interact-with-jam",level:2},{value:"What are the main components of JAM?",id:"what-are-the-main-components-of-jam",level:2},{value:"What is the goal of JAM?",id:"what-is-the-goal-of-jam",level:2},{value:"Is JAM related to Polkadot?",id:"is-jam-related-to-polkadot",level:2},{value:"How would the Relay Chain change with JAM?",id:"how-would-the-relay-chain-change-with-jam",level:2},{value:"In the new architecture, what does the tech stack look like?",id:"in-the-new-architecture-what-does-the-tech-stack-look-like",level:2},{value:"How can developers get involved with JAM?",id:"how-can-developers-get-involved-with-jam",level:2},{value:"What are some potential applications of JAM?",id:"what-are-some-potential-applications-of-jam",level:2},{value:"Is there a roadmap for JAM's development?",id:"is-there-a-roadmap-for-jams-development",level:2},{value:"What about Polkadot? Will there be a hard fork?",id:"what-about-polkadot-will-there-be-a-hard-fork",level:2},{value:"Do parachains need to rewrite their code? How much work is it to build?",id:"do-parachains-need-to-rewrite-their-code-how-much-work-is-it-to-build",level:2},{value:"Does it even make sense now to build a parachain on Polkadot?",id:"does-it-even-make-sense-now-to-build-a-parachain-on-polkadot",level:2},{value:"What about DOT?",id:"what-about-dot",level:2},{value:"Where can I learn more about JAM?",id:"where-can-i-learn-more-about-jam",level:2}];function c(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",li:"li",p:"p",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.admonition,{title:"Technical information about JAM",type:"info",children:(0,a.jsxs)(n.p,{children:["For an in-depth overview of JAM, see the ",(0,a.jsx)(n.a,{href:"/docs/learn-jam-chain",children:"Wiki page about the JAM Chain"}),"."]})}),"\n",(0,a.jsx)(n.h2,{id:"what-is-jam",children:"What is JAM?"}),"\n",(0,a.jsxs)(n.p,{children:["JAM is a research and development project initiated by\n",(0,a.jsx)(n.a,{href:"https://www.parity.io/",children:"Parity Technologies"}),". It's a computational model that focuses on the\nprocess of collecting, refining, joining, and accumulating data within a blockchain network."]}),"\n",(0,a.jsx)(n.h2,{id:"what-does-jam-stand-for",children:'What does "JAM" stand for?'}),"\n",(0,a.jsx)(n.p,{children:'"JAM" stands for "Join Accumulate Machine." It represents the core principles of the computational\nmodel to be implemented on the JAM chain.'}),"\n",(0,a.jsx)(n.h2,{id:"why-is-jam-groundbreaking",children:"Why is JAM groundbreaking?"}),"\n",(0,a.jsx)(n.p,{children:"The dilemma of achieving ultimate performance and scalability while still being flexible to build\nany use case is as old as blockchains. Current Web3 developers have to choose whether or not to\nbuild a smart contract or an appchain. Smart contracts on L1s are faster to write but come with\ndownsides. They are limited to the underlying protocol, are not as efficient, do not offer the\nflexibility teams need and compete with the rest of the ecosystem for resources. Appchains provide a\nmore efficient and flexible development environment, as the chains are custom-made for a specific\npurpose. With JAM, groundbreaking scalability currently only seen through rollups is brought to the\nconsensus layer. Developers no longer need to decide if they build appchains or smart contracts;\nwith JAM, they have a flexible and rich environment for both. So, in short, there will be L2\nscalability without the need for rollup solutions while being fully flexible to build any\napplication."}),"\n",(0,a.jsx)(n.h2,{id:"what-are-services",children:"What are services?"}),"\n",(0,a.jsxs)(n.p,{children:["Services are modules that run on top of JAM. One of these services would be, for example, the\nChainService. This service would implement the parachain logic that is currently enshrined in the\nPolkadot protocol. JAM\u2019s ",(0,a.jsx)(n.code,{children:"refine"})," and ",(0,a.jsx)(n.code,{children:"accumulate"})," phases are generic entry points that will be used\nto implement specific permissionless services."]}),"\n",(0,a.jsx)(n.h2,{id:"how-does-jam-differ-from-traditional-blockchain-networks",children:"How does JAM differ from traditional blockchain networks?"}),"\n",(0,a.jsxs)(n.p,{children:["JAM is built as a distributed computer. This means that it can run almost any task that can be\nexpressed as a service. The JAM chain will have almost no functionality, meaning there will be no\nuser transactions. All the logic, like governance, staking, etc., would live on system ",(0,a.jsx)(n.strong,{children:"services"}),".\nJAM will provide synchronous composability across heterogeneous services, enabling new kinds of\ninteroperability."]}),"\n",(0,a.jsx)(n.h2,{id:"will-agile-coretime-remain-part-of-the-polkadot-vision",children:"Will Agile Coretime remain part of the Polkadot vision?"}),"\n",(0,a.jsxs)(n.p,{children:["Yes. ",(0,a.jsx)(n.a,{href:"/docs/learn-agile-coretime",children:"Agile Coretime"}),", an innovation that transforms Polkadot into a\ncomputational resource, will be rolled out onto the Polkadot network in the near future. JAM is\nfurther down the line, but Coretime will similarly be available to purchase on JAM."]}),"\n",(0,a.jsx)(n.h2,{id:"how-do-services-interact-with-jam",children:"How do services interact with JAM?"}),"\n",(0,a.jsxs)(n.p,{children:["Services interact with JAM through predefined entry points: Refine, Accumulate, and onTransfer (see\nmore information on the ",(0,a.jsx)(n.a,{href:"/docs/learn-jam-chain#service-entry-points",children:"JAM Chain page"}),"). Each service\ndefines its specific functions and workflows, executed within the JAM framework according to the\nnetwork's requirements."]}),"\n",(0,a.jsx)(n.h2,{id:"what-are-the-main-components-of-jam",children:"What are the main components of JAM?"}),"\n",(0,a.jsxs)(n.p,{children:["JAM consists of four main components: Refine, Accumulate, and onTransfer (see more information on\nthe ",(0,a.jsx)(n.a,{href:"/docs/learn-jam-chain#service-entry-points",children:"JAM Chain page"}),"). These components define the\nworkflow for processing and integrating data within the network."]}),"\n",(0,a.jsx)(n.h2,{id:"what-is-the-goal-of-jam",children:"What is the goal of JAM?"}),"\n",(0,a.jsx)(n.p,{children:"JAM's primary goal is to provide a flexible and efficient framework for managing data and\ncomputations within a network. It aims to streamline data integration and maintenance while ensuring\nthe network's integrity and security."}),"\n",(0,a.jsx)(n.h2,{id:"is-jam-related-to-polkadot",children:"Is JAM related to Polkadot?"}),"\n",(0,a.jsx)(n.p,{children:"Yes, JAM is a potential candidate for evolving the Polkadot relay chain. The key change is that\nparachains are no longer enshrined on the relay chain and will be running on top of a service that\nis compatible with parachain protocol. One service will be, for example, the current parachains\nservice. Anyone can permissionlessly add a service to the JAM Chain by specifying the entry points\nRefine, Accumulate and onTransfer."}),"\n",(0,a.jsx)(n.h2,{id:"how-would-the-relay-chain-change-with-jam",children:"How would the Relay Chain change with JAM?"}),"\n",(0,a.jsx)(n.p,{children:"JAM would be a successor to the relay chain, with a more straightforward and flexible architecture.\nOnly the consensus functionality would be kept, while the rest, such as security, governance, etc.,\nwould run on system-level services. The current relay chain will run on multiple cores in the new\nJAM architecture, guaranteeing full compatibility."}),"\n",(0,a.jsx)(n.h2,{id:"in-the-new-architecture-what-does-the-tech-stack-look-like",children:"In the new architecture, what does the tech stack look like?"}),"\n",(0,a.jsx)(n.p,{children:"From the point of view of parachains, the tech stack doesn\u2019t look that much different. They will\ncontinue to get validated by the validators, etc. JAM will offer the possibility of running smart\ncontracts on the same level as parachains. This means a potential service can be written that\nenables people to run Solidity-based smart contracts directly on top of JAM without running on any\nparachain. The other more future-oriented development will be CorePlay. CorePlay will be an\nactor-based framework. The idea is to support long-running tasks/actors on top of JAM. Long-running\nhere means that programs will continue running intermittently (can pause and resume). This provides\nquite a lot of simplifications for the developer when writing contracts. Ultimately, it should be\nmuch simpler to write a program that can run on top of a (decentralized) blockchain than it is now."}),"\n",(0,a.jsx)(n.h2,{id:"how-can-developers-get-involved-with-jam",children:"How can developers get involved with JAM?"}),"\n",(0,a.jsxs)(n.p,{children:["Developers interested in JAM can explore and participate once the\n",(0,a.jsx)(n.a,{href:"/docs/start-building#requests-for-comment-rfcs",children:"RFC"})," is out. Additionally, they can stay\nupdated on announcements and events related to JAM and its integration with other technologies via\nParity\u2019s communication channels."]}),"\n",(0,a.jsx)(n.h2,{id:"what-are-some-potential-applications-of-jam",children:"What are some potential applications of JAM?"}),"\n",(0,a.jsx)(n.p,{children:"JAM's flexible and efficient computational model opens up possibilities for various applications,\nbut it is too early to jump into specific use cases just yet."}),"\n",(0,a.jsx)(n.h2,{id:"is-there-a-roadmap-for-jams-development",children:"Is there a roadmap for JAM's development?"}),"\n",(0,a.jsx)(n.p,{children:"While specific timelines may vary, the development of JAM typically involves ongoing research,\ntesting, and iteration. The RFC will be published as a first step, where the community gives\nfeedback and iterates on it."}),"\n",(0,a.jsx)(n.h2,{id:"what-about-polkadot-will-there-be-a-hard-fork",children:"What about Polkadot? Will there be a hard fork?"}),"\n",(0,a.jsx)(n.p,{children:"JAM isn\u2019t a successor to Polkadot but a potential evolution of the Polkadot relay chain. It can only\nproceed if it passes through Polkadot\u2019s decentralized governance system, winning approval from token\nholders. The current parachain-centered logic would continue as a service on top of the new JAM\narchitecture. Part of the proposal will include tooling and hard-coded compatibility guarantees. The\nrelay chain will upgrade, and parachains can then enjoy a much richer environment, synchronous\ncompatibility, and excellent scaling capabilities better than current L2s but built inside the L0/L1\nlayer."}),"\n",(0,a.jsx)(n.h2,{id:"do-parachains-need-to-rewrite-their-code-how-much-work-is-it-to-build",children:"Do parachains need to rewrite their code? How much work is it to build?"}),"\n",(0,a.jsx)(n.p,{children:"Parachains will be one of the \u201cproducts\u201d that can run on JAM. JAM will only remove the enshrined\nparachain consensus and replace it with a model that supports different services. For some time, it\nwill likely be easier to develop parachains, as the necessary tooling for developing services needs\nto be developed and adopted. For migration support, full compatibility guarantees will be written\ninto the code."}),"\n",(0,a.jsx)(n.h2,{id:"does-it-even-make-sense-now-to-build-a-parachain-on-polkadot",children:"Does it even make sense now to build a parachain on Polkadot?"}),"\n",(0,a.jsx)(n.p,{children:"Of course! Parachains will be one of the \u201cproducts\u201d that can run on JAM, and they will stay\nfirst-class citizens. There will be different use cases, some suitable for parachains and some\nsuitable for services."}),"\n",(0,a.jsx)(n.h2,{id:"what-about-dot",children:"What about DOT?"}),"\n",(0,a.jsx)(n.p,{children:"DOT will continue to be JAM\u2019s native token. No other native token will be issued."}),"\n",(0,a.jsx)(n.h2,{id:"where-can-i-learn-more-about-jam",children:"Where can I learn more about JAM?"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["Read the ",(0,a.jsx)(n.a,{href:"/docs/learn-jam-chain",children:"JAM Chain page"}),"."]}),"\n",(0,a.jsxs)(n.li,{children:["Explore official communication on ",(0,a.jsx)(n.a,{href:"https://graypaper.com",children:"https://graypaper.com"})," and from W3F, Parity, and Polkadot to\nlearn more about JAM. You can also join discussions on the forum and the fellowship calls."]}),"\n",(0,a.jsxs)(n.li,{children:["Read\n",(0,a.jsx)(n.a,{href:"https://grillapp.net/@filippoweb3/gavin-s-talk-about-jam-at-token2049-dubai-136004?ref=10124",children:"this blog post"}),"\nabout the original talk by Gavin Wood at Token2049 in Dubai."]}),"\n",(0,a.jsxs)(n.li,{children:["Read ",(0,a.jsx)(n.a,{href:"https://blog.kianenigma.com/posts/tech/demystifying-jam/",children:'the "Demystifying JAM" blog post'}),"\nby Kian Paimani."]}),"\n"]})]})}function d(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(c,{...e})}):c(e)}},28453:(e,n,t)=>{t.d(n,{R:()=>r,x:()=>l});var a=t(96540);const i={},o=a.createContext(i);function r(e){const n=a.useContext(o);return a.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),a.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/e77078a1.b5f0c562.js b/assets/js/e77078a1.b5f0c562.js new file mode 100644 index 000000000000..1d4117c53daa --- /dev/null +++ b/assets/js/e77078a1.b5f0c562.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3557],{21775:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>s,default:()=>d,frontMatter:()=>r,metadata:()=>a,toc:()=>h});const a=JSON.parse('{"id":"learn/learn-jam-faq","title":"FAQ for Polkadot\'s JAM Chain","description":"FAQ about Polkadot\'s Join-Accumulate Machine.","source":"@site/../docs/learn/learn-jam-faq.md","sourceDirName":"learn","slug":"/learn-jam-faq","permalink":"/docs/learn-jam-faq","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-jam-faq.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1727346198000,"frontMatter":{"id":"learn-jam-faq","title":"FAQ for Polkadot\'s JAM Chain","sidebar_label":"JAM FAQ","description":"FAQ about Polkadot\'s Join-Accumulate Machine.","keywords":["Polkadot","JAM","join-accumulate","faq"],"slug":"../learn-jam-faq"},"sidebar":"docs","previous":{"title":"JAM Chain","permalink":"/docs/learn-jam-chain"},"next":{"title":"Archive","permalink":"/docs/learn-archive"}}');var i=t(74848),o=t(28453);const r={id:"learn-jam-faq",title:"FAQ for Polkadot's JAM Chain",sidebar_label:"JAM FAQ",description:"FAQ about Polkadot's Join-Accumulate Machine.",keywords:["Polkadot","JAM","join-accumulate","faq"],slug:"../learn-jam-faq"},s=void 0,l={},h=[{value:"What is JAM?",id:"what-is-jam",level:2},{value:"What does "JAM" stand for?",id:"what-does-jam-stand-for",level:2},{value:"Why is JAM groundbreaking?",id:"why-is-jam-groundbreaking",level:2},{value:"What are services?",id:"what-are-services",level:2},{value:"How does JAM differ from traditional blockchain networks?",id:"how-does-jam-differ-from-traditional-blockchain-networks",level:2},{value:"Will Agile Coretime remain part of the Polkadot vision?",id:"will-agile-coretime-remain-part-of-the-polkadot-vision",level:2},{value:"How do services interact with JAM?",id:"how-do-services-interact-with-jam",level:2},{value:"What are the main components of JAM?",id:"what-are-the-main-components-of-jam",level:2},{value:"What is the goal of JAM?",id:"what-is-the-goal-of-jam",level:2},{value:"Is JAM related to Polkadot?",id:"is-jam-related-to-polkadot",level:2},{value:"How would the Relay Chain change with JAM?",id:"how-would-the-relay-chain-change-with-jam",level:2},{value:"In the new architecture, what does the tech stack look like?",id:"in-the-new-architecture-what-does-the-tech-stack-look-like",level:2},{value:"How can developers get involved with JAM?",id:"how-can-developers-get-involved-with-jam",level:2},{value:"What are some potential applications of JAM?",id:"what-are-some-potential-applications-of-jam",level:2},{value:"Is there a roadmap for JAM's development?",id:"is-there-a-roadmap-for-jams-development",level:2},{value:"What about Polkadot? Will there be a hard fork?",id:"what-about-polkadot-will-there-be-a-hard-fork",level:2},{value:"Do parachains need to rewrite their code? How much work is it to build?",id:"do-parachains-need-to-rewrite-their-code-how-much-work-is-it-to-build",level:2},{value:"Does it even make sense now to build a parachain on Polkadot?",id:"does-it-even-make-sense-now-to-build-a-parachain-on-polkadot",level:2},{value:"What about DOT?",id:"what-about-dot",level:2},{value:"Where can I learn more about JAM?",id:"where-can-i-learn-more-about-jam",level:2}];function c(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",li:"li",p:"p",strong:"strong",ul:"ul",...(0,o.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.admonition,{title:"Technical information about JAM",type:"info",children:(0,i.jsxs)(n.p,{children:["For an in-depth overview of JAM, see the ",(0,i.jsx)(n.a,{href:"/docs/learn-jam-chain",children:"Wiki page about the JAM Chain"}),"."]})}),"\n",(0,i.jsx)(n.h2,{id:"what-is-jam",children:"What is JAM?"}),"\n",(0,i.jsxs)(n.p,{children:["JAM is a research and development project initiated by\n",(0,i.jsx)(n.a,{href:"https://www.parity.io/",children:"Parity Technologies"}),". It's a computational model that focuses on the\nprocess of collecting, refining, joining, and accumulating data within a blockchain network."]}),"\n",(0,i.jsx)(n.h2,{id:"what-does-jam-stand-for",children:'What does "JAM" stand for?'}),"\n",(0,i.jsx)(n.p,{children:'"JAM" stands for "Join Accumulate Machine." It represents the core principles of the computational\nmodel to be implemented on the JAM chain.'}),"\n",(0,i.jsx)(n.h2,{id:"why-is-jam-groundbreaking",children:"Why is JAM groundbreaking?"}),"\n",(0,i.jsx)(n.p,{children:"The dilemma of achieving ultimate performance and scalability while still being flexible to build\nany use case is as old as blockchains. Current Web3 developers have to choose whether or not to\nbuild a smart contract or an appchain. Smart contracts on L1s are faster to write but come with\ndownsides. They are limited to the underlying protocol, are not as efficient, do not offer the\nflexibility teams need and compete with the rest of the ecosystem for resources. Appchains provide a\nmore efficient and flexible development environment, as the chains are custom-made for a specific\npurpose. With JAM, groundbreaking scalability currently only seen through rollups is brought to the\nconsensus layer. Developers no longer need to decide if they build appchains or smart contracts;\nwith JAM, they have a flexible and rich environment for both. So, in short, there will be L2\nscalability without the need for rollup solutions while being fully flexible to build any\napplication."}),"\n",(0,i.jsx)(n.h2,{id:"what-are-services",children:"What are services?"}),"\n",(0,i.jsxs)(n.p,{children:["Services are modules that run on top of JAM. One of these services would be, for example, the\nChainService. This service would implement the parachain logic that is currently enshrined in the\nPolkadot protocol. JAM\u2019s ",(0,i.jsx)(n.code,{children:"refine"})," and ",(0,i.jsx)(n.code,{children:"accumulate"})," phases are generic entry points that will be used\nto implement specific permissionless services."]}),"\n",(0,i.jsx)(n.h2,{id:"how-does-jam-differ-from-traditional-blockchain-networks",children:"How does JAM differ from traditional blockchain networks?"}),"\n",(0,i.jsxs)(n.p,{children:["JAM is built as a distributed computer. This means that it can run almost any task that can be\nexpressed as a service. The JAM chain will have almost no functionality, meaning there will be no\nuser transactions. All the logic, like governance, staking, etc., would live on system ",(0,i.jsx)(n.strong,{children:"services"}),".\nJAM will provide synchronous composability across heterogeneous services, enabling new kinds of\ninteroperability."]}),"\n",(0,i.jsx)(n.h2,{id:"will-agile-coretime-remain-part-of-the-polkadot-vision",children:"Will Agile Coretime remain part of the Polkadot vision?"}),"\n",(0,i.jsxs)(n.p,{children:["Yes. ",(0,i.jsx)(n.a,{href:"/docs/learn-agile-coretime",children:"Agile Coretime"}),", an innovation that transforms Polkadot into a\ncomputational resource, will be rolled out onto the Polkadot network in the near future. JAM is\nfurther down the line, but Coretime will similarly be available to purchase on JAM."]}),"\n",(0,i.jsx)(n.h2,{id:"how-do-services-interact-with-jam",children:"How do services interact with JAM?"}),"\n",(0,i.jsxs)(n.p,{children:["Services interact with JAM through predefined entry points: Refine, Accumulate, and onTransfer (see\nmore information on the ",(0,i.jsx)(n.a,{href:"/docs/learn-jam-chain#service-entry-points",children:"JAM Chain page"}),"). Each service\ndefines its specific functions and workflows, executed within the JAM framework according to the\nnetwork's requirements."]}),"\n",(0,i.jsx)(n.h2,{id:"what-are-the-main-components-of-jam",children:"What are the main components of JAM?"}),"\n",(0,i.jsxs)(n.p,{children:["JAM consists of four main components: Refine, Accumulate, and onTransfer (see more information on\nthe ",(0,i.jsx)(n.a,{href:"/docs/learn-jam-chain#service-entry-points",children:"JAM Chain page"}),"). These components define the\nworkflow for processing and integrating data within the network."]}),"\n",(0,i.jsx)(n.h2,{id:"what-is-the-goal-of-jam",children:"What is the goal of JAM?"}),"\n",(0,i.jsx)(n.p,{children:"JAM's primary goal is to provide a flexible and efficient framework for managing data and\ncomputations within a network. It aims to streamline data integration and maintenance while ensuring\nthe network's integrity and security."}),"\n",(0,i.jsx)(n.h2,{id:"is-jam-related-to-polkadot",children:"Is JAM related to Polkadot?"}),"\n",(0,i.jsx)(n.p,{children:"Yes, JAM is a potential candidate for evolving the Polkadot relay chain. The key change is that\nparachains are no longer enshrined on the relay chain and will be running on top of a service that\nis compatible with parachain protocol. One service will be, for example, the current parachains\nservice. Anyone can permissionlessly add a service to the JAM Chain by specifying the entry points\nRefine, Accumulate and onTransfer."}),"\n",(0,i.jsx)(n.h2,{id:"how-would-the-relay-chain-change-with-jam",children:"How would the Relay Chain change with JAM?"}),"\n",(0,i.jsx)(n.p,{children:"JAM would be a successor to the relay chain, with a more straightforward and flexible architecture.\nOnly the consensus functionality would be kept, while the rest, such as security, governance, etc.,\nwould run on system-level services. The current relay chain will run on multiple cores in the new\nJAM architecture, guaranteeing full compatibility."}),"\n",(0,i.jsx)(n.h2,{id:"in-the-new-architecture-what-does-the-tech-stack-look-like",children:"In the new architecture, what does the tech stack look like?"}),"\n",(0,i.jsx)(n.p,{children:"From the point of view of parachains, the tech stack doesn\u2019t look that much different. They will\ncontinue to get validated by the validators, etc. JAM will offer the possibility of running smart\ncontracts on the same level as parachains. This means a potential service can be written that\nenables people to run Solidity-based smart contracts directly on top of JAM without running on any\nparachain. The other more future-oriented development will be CorePlay. CorePlay will be an\nactor-based framework. The idea is to support long-running tasks/actors on top of JAM. Long-running\nhere means that programs will continue running intermittently (can pause and resume). This provides\nquite a lot of simplifications for the developer when writing contracts. Ultimately, it should be\nmuch simpler to write a program that can run on top of a (decentralized) blockchain than it is now."}),"\n",(0,i.jsx)(n.h2,{id:"how-can-developers-get-involved-with-jam",children:"How can developers get involved with JAM?"}),"\n",(0,i.jsxs)(n.p,{children:["Developers interested in JAM can explore and participate once the\n",(0,i.jsx)(n.a,{href:"/docs/start-building#requests-for-comment-rfcs",children:"RFC"})," is out. Additionally, they can stay\nupdated on announcements and events related to JAM and its integration with other technologies via\nParity\u2019s communication channels."]}),"\n",(0,i.jsx)(n.h2,{id:"what-are-some-potential-applications-of-jam",children:"What are some potential applications of JAM?"}),"\n",(0,i.jsx)(n.p,{children:"JAM's flexible and efficient computational model opens up possibilities for various applications,\nbut it is too early to jump into specific use cases just yet."}),"\n",(0,i.jsx)(n.h2,{id:"is-there-a-roadmap-for-jams-development",children:"Is there a roadmap for JAM's development?"}),"\n",(0,i.jsx)(n.p,{children:"While specific timelines may vary, the development of JAM typically involves ongoing research,\ntesting, and iteration. The RFC will be published as a first step, where the community gives\nfeedback and iterates on it."}),"\n",(0,i.jsx)(n.h2,{id:"what-about-polkadot-will-there-be-a-hard-fork",children:"What about Polkadot? Will there be a hard fork?"}),"\n",(0,i.jsx)(n.p,{children:"JAM isn\u2019t a successor to Polkadot but a potential evolution of the Polkadot relay chain. It can only\nproceed if it passes through Polkadot\u2019s decentralized governance system, winning approval from token\nholders. The current parachain-centered logic would continue as a service on top of the new JAM\narchitecture. Part of the proposal will include tooling and hard-coded compatibility guarantees. The\nrelay chain will upgrade, and parachains can then enjoy a much richer environment, synchronous\ncompatibility, and excellent scaling capabilities better than current L2s but built inside the L0/L1\nlayer."}),"\n",(0,i.jsx)(n.h2,{id:"do-parachains-need-to-rewrite-their-code-how-much-work-is-it-to-build",children:"Do parachains need to rewrite their code? How much work is it to build?"}),"\n",(0,i.jsx)(n.p,{children:"Parachains will be one of the \u201cproducts\u201d that can run on JAM. JAM will only remove the enshrined\nparachain consensus and replace it with a model that supports different services. For some time, it\nwill likely be easier to develop parachains, as the necessary tooling for developing services needs\nto be developed and adopted. For migration support, full compatibility guarantees will be written\ninto the code."}),"\n",(0,i.jsx)(n.h2,{id:"does-it-even-make-sense-now-to-build-a-parachain-on-polkadot",children:"Does it even make sense now to build a parachain on Polkadot?"}),"\n",(0,i.jsx)(n.p,{children:"Of course! Parachains will be one of the \u201cproducts\u201d that can run on JAM, and they will stay\nfirst-class citizens. There will be different use cases, some suitable for parachains and some\nsuitable for services."}),"\n",(0,i.jsx)(n.h2,{id:"what-about-dot",children:"What about DOT?"}),"\n",(0,i.jsx)(n.p,{children:"DOT will continue to be JAM\u2019s native token. No other native token will be issued."}),"\n",(0,i.jsx)(n.h2,{id:"where-can-i-learn-more-about-jam",children:"Where can I learn more about JAM?"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["Read the ",(0,i.jsx)(n.a,{href:"/docs/learn-jam-chain",children:"JAM Chain page"}),"."]}),"\n",(0,i.jsxs)(n.li,{children:["Explore official communication on ",(0,i.jsx)(n.a,{href:"https://graypaper.com",children:"https://graypaper.com"})," and from W3F, Parity, and Polkadot to\nlearn more about JAM. You can also join discussions on the forum and the fellowship calls."]}),"\n",(0,i.jsxs)(n.li,{children:["Read\n",(0,i.jsx)(n.a,{href:"https://grillapp.net/@filippoweb3/gavin-s-talk-about-jam-at-token2049-dubai-136004?ref=10124",children:"this blog post"}),"\nabout the original talk by Gavin Wood at Token2049 in Dubai."]}),"\n",(0,i.jsxs)(n.li,{children:["Read ",(0,i.jsx)(n.a,{href:"https://blog.kianenigma.com/posts/tech/demystifying-jam/",children:'the "Demystifying JAM" blog post'}),"\nby Kian Paimani."]}),"\n"]})]})}function d(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(c,{...e})}):c(e)}},28453:(e,n,t)=>{t.d(n,{R:()=>r,x:()=>s});var a=t(96540);const i={},o=a.createContext(i);function r(e){const n=a.useContext(o);return a.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function s(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),a.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/e8522a07.d509a7a2.js b/assets/js/e8522a07.d509a7a2.js deleted file mode 100644 index 9b1b5c44a118..000000000000 --- a/assets/js/e8522a07.d509a7a2.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5513],{38558:(o,a,t)=>{t.r(a),t.d(a,{assets:()=>r,contentTitle:()=>d,default:()=>c,frontMatter:()=>s,metadata:()=>i,toc:()=>l});var n=t(74848),e=t(28453);const s={id:"polkadot-staking-dashboard-nomination-pool",title:"Polkadot Staking Dashboard (Nomination Pool)",sidebar_label:"Staking Dashboard (Nomination Pool)",description:"Polkadot Staking Dashboard (Nomination Pool) descriptions",keywords:["polkadot","governance","dashboard","dune"],slug:"../polkadot-staking-dashboard-nomination-pool"},d="Polkadot Staking Dashboard (Nomination Pool)",i={id:"general/dune-analytics/polkadot-dashboards/legacy/polkadot-staking-dashboard-nomination-pool",title:"Polkadot Staking Dashboard (Nomination Pool)",description:"Polkadot Staking Dashboard (Nomination Pool) descriptions",source:"@site/../docs/general/dune-analytics/polkadot-dashboards/legacy/polkadot-staking-dashboard-nomination-pool.md",sourceDirName:"general/dune-analytics/polkadot-dashboards/legacy",slug:"/general/dune-analytics/polkadot-dashboards/polkadot-staking-dashboard-nomination-pool",permalink:"/docs/general/dune-analytics/polkadot-dashboards/polkadot-staking-dashboard-nomination-pool",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/polkadot-dashboards/legacy/polkadot-staking-dashboard-nomination-pool.md",tags:[],version:"current",lastUpdatedBy:"MK",lastUpdatedAt:1717658873e3,frontMatter:{id:"polkadot-staking-dashboard-nomination-pool",title:"Polkadot Staking Dashboard (Nomination Pool)",sidebar_label:"Staking Dashboard (Nomination Pool)",description:"Polkadot Staking Dashboard (Nomination Pool) descriptions",keywords:["polkadot","governance","dashboard","dune"],slug:"../polkadot-staking-dashboard-nomination-pool"}},r={},l=[{value:"View On Dune: Polkadot Staking Dashboard",id:"view-on-dune-polkadot-staking-dashboard",level:2}];function h(o){const a={a:"a",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",strong:"strong",ul:"ul",...(0,e.R)(),...o.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(a.header,{children:(0,n.jsx)(a.h1,{id:"polkadot-staking-dashboard-nomination-pool",children:"Polkadot Staking Dashboard (Nomination Pool)"})}),"\n",(0,n.jsxs)(a.h2,{id:"view-on-dune-polkadot-staking-dashboard",children:["View On Dune: ",(0,n.jsx)(a.a,{href:"https://dune.com/substrate/polkadot-staking-nomination-pool",children:"Polkadot Staking Dashboard"})]}),"\n",(0,n.jsxs)(a.p,{children:["We're using ",(0,n.jsx)(a.strong,{children:"default parameters"})," for all of the following parameterized charts. Visit our\ndashboard on Dune to use the ",(0,n.jsx)(a.strong,{children:"pool_id"})," parameter and analyze a specific referendum."]}),"\n",(0,n.jsx)(a.p,{children:"For a _specific nomination pool id, this dashbaord shows:"}),"\n",(0,n.jsxs)(a.ul,{children:["\n",(0,n.jsx)(a.li,{children:"Pool Members"}),"\n",(0,n.jsx)(a.li,{children:"Historical APY, Daily Pool Rewards & Fees"}),"\n"]}),"\n",(0,n.jsx)(a.p,{children:"Raw data is presented at the bottom."}),"\n",(0,n.jsxs)(a.p,{children:["Source Table: ",(0,n.jsx)(a.strong,{children:"polkadot.stakings"})," , MaterializedView:\n",(0,n.jsx)(a.a,{href:"https://dune.com/queries/3327350",children:(0,n.jsx)(a.strong,{children:"dune.substrate.result_polkadot_nominationpools"})})]}),"\n",(0,n.jsxs)(a.p,{children:["Go back to ",(0,n.jsx)(a.a,{href:"https://dune.com/substrate/polkadot-staking",children:(0,n.jsx)(a.strong,{children:"Polkadot Staking Home"})})]}),"\n",(0,n.jsx)("iframe",{src:"https://dune.com/embeds/3343291/5817752/",height:"350",width:"100%"}),"\n",(0,n.jsx)("iframe",{src:"https://dune.com/embeds/3341534/5599076/",height:"350",width:"100%"}),"\n",(0,n.jsx)("iframe",{src:"https://dune.com/embeds/3343291/5817681/",height:"350",width:"100%"}),"\n",(0,n.jsx)("iframe",{src:"https://dune.com/embeds/3343291/5817723/",height:"350",width:"100%"}),"\n",(0,n.jsx)("iframe",{src:"https://dune.com/embeds/3343291/5602160/",height:"350",width:"100%"}),"\n",(0,n.jsx)("iframe",{src:"https://dune.com/embeds/3343291/5817736/",height:"350",width:"100%"}),"\n",(0,n.jsx)("iframe",{src:"https://dune.com/embeds/3343291/5817692/",height:"350",width:"100%"}),"\n",(0,n.jsx)("iframe",{src:"https://dune.com/embeds/3343291/5817706/",height:"350",width:"100%"}),"\n",(0,n.jsx)("iframe",{src:"https://dune.com/embeds/3341597/5599169/",height:"350",width:"100%"})]})}function c(o={}){const{wrapper:a}={...(0,e.R)(),...o.components};return a?(0,n.jsx)(a,{...o,children:(0,n.jsx)(h,{...o})}):h(o)}},28453:(o,a,t)=>{t.d(a,{R:()=>d,x:()=>i});var n=t(96540);const e={},s=n.createContext(e);function d(o){const a=n.useContext(s);return n.useMemo((function(){return"function"==typeof o?o(a):{...a,...o}}),[a,o])}function i(o){let a;return a=o.disableParentContext?"function"==typeof o.components?o.components(e):o.components||e:d(o.components),n.createElement(s.Provider,{value:a},o.children)}}}]); \ No newline at end of file diff --git a/assets/js/e8522a07.df77ac05.js b/assets/js/e8522a07.df77ac05.js new file mode 100644 index 000000000000..f9fd6667a185 --- /dev/null +++ b/assets/js/e8522a07.df77ac05.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5513],{53144:(o,a,t)=>{t.r(a),t.d(a,{assets:()=>r,contentTitle:()=>i,default:()=>c,frontMatter:()=>d,metadata:()=>n,toc:()=>l});const n=JSON.parse('{"id":"general/dune-analytics/polkadot-dashboards/legacy/polkadot-staking-dashboard-nomination-pool","title":"Polkadot Staking Dashboard (Nomination Pool)","description":"Polkadot Staking Dashboard (Nomination Pool) descriptions","source":"@site/../docs/general/dune-analytics/polkadot-dashboards/legacy/polkadot-staking-dashboard-nomination-pool.md","sourceDirName":"general/dune-analytics/polkadot-dashboards/legacy","slug":"/general/dune-analytics/polkadot-dashboards/polkadot-staking-dashboard-nomination-pool","permalink":"/docs/general/dune-analytics/polkadot-dashboards/polkadot-staking-dashboard-nomination-pool","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/polkadot-dashboards/legacy/polkadot-staking-dashboard-nomination-pool.md","tags":[],"version":"current","lastUpdatedBy":"MK","lastUpdatedAt":1717658873000,"frontMatter":{"id":"polkadot-staking-dashboard-nomination-pool","title":"Polkadot Staking Dashboard (Nomination Pool)","sidebar_label":"Staking Dashboard (Nomination Pool)","description":"Polkadot Staking Dashboard (Nomination Pool) descriptions","keywords":["polkadot","governance","dashboard","dune"],"slug":"../polkadot-staking-dashboard-nomination-pool"}}');var e=t(74848),s=t(28453);const d={id:"polkadot-staking-dashboard-nomination-pool",title:"Polkadot Staking Dashboard (Nomination Pool)",sidebar_label:"Staking Dashboard (Nomination Pool)",description:"Polkadot Staking Dashboard (Nomination Pool) descriptions",keywords:["polkadot","governance","dashboard","dune"],slug:"../polkadot-staking-dashboard-nomination-pool"},i="Polkadot Staking Dashboard (Nomination Pool)",r={},l=[{value:"View On Dune: Polkadot Staking Dashboard",id:"view-on-dune-polkadot-staking-dashboard",level:2}];function h(o){const a={a:"a",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",strong:"strong",ul:"ul",...(0,s.R)(),...o.components};return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(a.header,{children:(0,e.jsx)(a.h1,{id:"polkadot-staking-dashboard-nomination-pool",children:"Polkadot Staking Dashboard (Nomination Pool)"})}),"\n",(0,e.jsxs)(a.h2,{id:"view-on-dune-polkadot-staking-dashboard",children:["View On Dune: ",(0,e.jsx)(a.a,{href:"https://dune.com/substrate/polkadot-staking-nomination-pool",children:"Polkadot Staking Dashboard"})]}),"\n",(0,e.jsxs)(a.p,{children:["We're using ",(0,e.jsx)(a.strong,{children:"default parameters"})," for all of the following parameterized charts. Visit our\ndashboard on Dune to use the ",(0,e.jsx)(a.strong,{children:"pool_id"})," parameter and analyze a specific referendum."]}),"\n",(0,e.jsx)(a.p,{children:"For a _specific nomination pool id, this dashbaord shows:"}),"\n",(0,e.jsxs)(a.ul,{children:["\n",(0,e.jsx)(a.li,{children:"Pool Members"}),"\n",(0,e.jsx)(a.li,{children:"Historical APY, Daily Pool Rewards & Fees"}),"\n"]}),"\n",(0,e.jsx)(a.p,{children:"Raw data is presented at the bottom."}),"\n",(0,e.jsxs)(a.p,{children:["Source Table: ",(0,e.jsx)(a.strong,{children:"polkadot.stakings"})," , MaterializedView:\n",(0,e.jsx)(a.a,{href:"https://dune.com/queries/3327350",children:(0,e.jsx)(a.strong,{children:"dune.substrate.result_polkadot_nominationpools"})})]}),"\n",(0,e.jsxs)(a.p,{children:["Go back to ",(0,e.jsx)(a.a,{href:"https://dune.com/substrate/polkadot-staking",children:(0,e.jsx)(a.strong,{children:"Polkadot Staking Home"})})]}),"\n",(0,e.jsx)("iframe",{src:"https://dune.com/embeds/3343291/5817752/",height:"350",width:"100%"}),"\n",(0,e.jsx)("iframe",{src:"https://dune.com/embeds/3341534/5599076/",height:"350",width:"100%"}),"\n",(0,e.jsx)("iframe",{src:"https://dune.com/embeds/3343291/5817681/",height:"350",width:"100%"}),"\n",(0,e.jsx)("iframe",{src:"https://dune.com/embeds/3343291/5817723/",height:"350",width:"100%"}),"\n",(0,e.jsx)("iframe",{src:"https://dune.com/embeds/3343291/5602160/",height:"350",width:"100%"}),"\n",(0,e.jsx)("iframe",{src:"https://dune.com/embeds/3343291/5817736/",height:"350",width:"100%"}),"\n",(0,e.jsx)("iframe",{src:"https://dune.com/embeds/3343291/5817692/",height:"350",width:"100%"}),"\n",(0,e.jsx)("iframe",{src:"https://dune.com/embeds/3343291/5817706/",height:"350",width:"100%"}),"\n",(0,e.jsx)("iframe",{src:"https://dune.com/embeds/3341597/5599169/",height:"350",width:"100%"})]})}function c(o={}){const{wrapper:a}={...(0,s.R)(),...o.components};return a?(0,e.jsx)(a,{...o,children:(0,e.jsx)(h,{...o})}):h(o)}},28453:(o,a,t)=>{t.d(a,{R:()=>d,x:()=>i});var n=t(96540);const e={},s=n.createContext(e);function d(o){const a=n.useContext(s);return n.useMemo((function(){return"function"==typeof o?o(a):{...a,...o}}),[a,o])}function i(o){let a;return a=o.disableParentContext?"function"==typeof o.components?o.components(e):o.components||e:d(o.components),n.createElement(s.Provider,{value:a},o.children)}}}]); \ No newline at end of file diff --git a/assets/js/ec3b6a32.8368a024.js b/assets/js/ec3b6a32.8368a024.js new file mode 100644 index 000000000000..fb2ade7ad62c --- /dev/null +++ b/assets/js/ec3b6a32.8368a024.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8832],{96287:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>r,default:()=>h,frontMatter:()=>o,metadata:()=>i,toc:()=>d});const i=JSON.parse('{"id":"learn/learn-nft","title":"NFTs","description":"The NFT Landscape of the Polkadot Ecosystem.","source":"@site/../docs/learn/learn-nft.md","sourceDirName":"learn","slug":"/learn-nft","permalink":"/docs/learn-nft","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-nft.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1727178265000,"frontMatter":{"id":"learn-nft","title":"NFTs","sidebar_label":"Introduction to NFTs","description":"The NFT Landscape of the Polkadot Ecosystem.","keywords":["NFT","non-fungible token","NFT 2.0"],"slug":"../learn-nft"},"sidebar":"docs","previous":{"title":"Teleporting Assets","permalink":"/docs/learn-teleport"},"next":{"title":"Network Participants","permalink":"/docs/learn-participants-index"}}');var a=t(74848),s=t(28453);const o={id:"learn-nft",title:"NFTs",sidebar_label:"Introduction to NFTs",description:"The NFT Landscape of the Polkadot Ecosystem.",keywords:["NFT","non-fungible token","NFT 2.0"],slug:"../learn-nft"},r=void 0,l={},d=[{value:"Fungibility",id:"fungibility",level:2},{value:"NFT Standards",id:"nft-standards",level:2},{value:"A typical NFT on Ethereum",id:"a-typical-nft-on-ethereum",level:3},{value:"NFTs in Polkadot & Kusama",id:"nfts-in-polkadot--kusama",level:2},{value:"Bridging",id:"bridging",level:2},{value:"References",id:"references",level:2}];function c(e){const n={a:"a",admonition:"admonition",em:"em",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.p,{children:"This page is a high-level overview of NFTs in the blockchain space and the various approaches to\nNFTs within the Polkadot ecosystem."}),"\n",(0,a.jsx)(n.h2,{id:"fungibility",children:"Fungibility"}),"\n",(0,a.jsxs)(n.p,{children:["NFT stands for ",(0,a.jsx)(n.em,{children:"non-fungible token"}),". Fungibility means interchangeability inside of a group. In\ntheory, a $20 bill is always worth $20 in a store and identical in value to any other $20 bill. It\nis not, however, fungible with a $1 or $100 dollar bill (outside its group)."]}),"\n",(0,a.jsx)(n.p,{children:"A Pokemon\u2122 trading card of a Charizard is non-fungible with a card of Squirtle, whereas editions of\nCharizard are fungible with each other."}),"\n",(0,a.jsxs)(n.p,{children:["Fungibility is a spectrum - what is fungible to some might not be fungible to others. In reality,\nPokemon\u2122 cards, the canonical example of non-fungible assets are more fungible than US dollar\nbills, each of which has a unique serial number that may be important to a government agency. The\ncards have no serial numbers ",(0,a.jsx)(n.a,{href:"%5BInvestopedia%5D(https://www.investopedia.com/terms/l/liars-poker.asp)",children:"1"}),"."]}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.img,{src:"https://www.investopedia.com/thmb/Nr-RLORu5CX_lIWZfLmV5X0eIrc=/613x345/smart/filters:no_upscale()/Clipboard01-d20f6eb9351e4f36a46e11fd87b53b2d.jpg",alt:"one dollar"})}),"\n",(0,a.jsx)(n.p,{children:'Additionally, a digital item like a "purple magic sword" in a game may be fungible with another\nvisually identical sword if all the player cares about is the looks of their character. But if the\nother sword has a different function, and that function influences the outcome of an adventure the\nplayer is about to embark on, then visually identical swords are absolutely non-fungible.'}),"\n",(0,a.jsxs)(n.p,{children:["Bearing that in mind, the simplest explanation of NFTs is that ",(0,a.jsx)(n.strong,{children:'NFTs are rows of arbitrary,\nproject-specific, and non-interchangeable data that can be cryptographically proven to "belong" to\nsomeone'}),". This data can be anything - concert tickets, attendance badges, simple words, avatars,\nplots of land in a metaverse, audio clips, house deeds, mortgages, and more."]}),"\n",(0,a.jsx)(n.h2,{id:"nft-standards",children:"NFT Standards"}),"\n",(0,a.jsx)(n.p,{children:'A general-purpose blockchain is not built to natively understand the concept of NFTs. It is only\nnatively aware and optimized for its own native tokens, but implementations built on such a chain\nare essentially "hacks".'}),"\n",(0,a.jsxs)(n.p,{children:['For example, Ethereum is a general-purpose blockchain that does not have the concept of "tokens"\n(fungible or not) built-in. Tokens in Ethereum are essentially spreadsheets of information to be\ninterpreted and read in a certain way by various user interfaces. This ',(0,a.jsx)(n.em,{children:"way"})," in which they should\nread them is called a ",(0,a.jsx)(n.em,{children:"standard"}),"."]}),"\n",(0,a.jsx)(n.p,{children:"The most widespread fungible token standard you may have heard of is ERC20, while the most\nwidespread NFT standard is ERC721, followed closely by ERC1155. The downside of having to define\nthese standards is that they are always instructions for how to read a spreadsheet pretending to\nserve information in a certain way, which by definition cannot be optimized. For this reason, even\non a good day of extremely low network congestion, interactions with NFTs on any EVM chain will cost\na few dollars but were on average around $100 per interaction (transfer, mint, sale) in 2021 on\nEthereum."}),"\n",(0,a.jsxs)(n.p,{children:["This prevents use cases that go beyond the current craze of ",(0,a.jsx)(n.em,{children:"digital dust gathering NFTs"}),' on\nEthereum - profile pictures, generative "look once and then put away" art, ',(0,a.jsx)(n.a,{href:"ens",children:"ENS"})," addresses, and\n",(0,a.jsx)(n.a,{href:"https://poap.xyz/",children:"proof of attendance badges"})," (which have since moved to the xDAI chain to save on\ngas fees)."]}),"\n",(0,a.jsxs)(n.h3,{id:"a-typical-nft-on-ethereum",children:["A typical ",(0,a.jsx)(n.a,{href:"https://opensea.io/assets/ethereum/0x2127fe7ffce4380459cced92f2d4793f3af094a4/12598",children:"NFT on Ethereum"})]}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.img,{alt:"samurai nft",src:t(1769).A+"",width:"506",height:"507"})}),"\n",(0,a.jsx)(n.p,{children:"For the sake of comparison, we can refer to these as NFTs 1.0: static NFTs that are almost\nexclusively image-based collectibles of varying rarity."}),"\n",(0,a.jsx)(n.h2,{id:"nfts-in-polkadot--kusama",children:"NFTs in Polkadot & Kusama"}),"\n",(0,a.jsxs)(n.p,{children:["This is where Polkadot's technology shines and where NFTs 2.0 come into play. By allowing\n",(0,a.jsx)(n.a,{href:"/docs/learn-parachains",children:"heterogeneous application-specific shards"})," to exist, builders can natively\noptimize for complex NFT use cases without tradeoffs that would make interacting with the system\nprohibitively inefficient and expensive in other environments."]}),"\n",(0,a.jsx)(n.admonition,{type:"info",children:(0,a.jsxs)(n.p,{children:["See ",(0,a.jsx)(n.a,{href:"/docs/learn-nft-projects",children:"this page"})," for more information about specific NFT project on Polkadot\nand Kusama."]})}),"\n",(0,a.jsx)(n.h2,{id:"bridging",children:"Bridging"}),"\n",(0,a.jsx)(n.p,{children:"Bridging to and from Substrate chains and EVM chains takes much effort but is a highly desired\nfeature in the NFT industry. Merging the collector and customer base has significant implications,\nso multiple projects focus on making this possible."}),"\n",(0,a.jsxs)(n.p,{children:["Apart from RMRK (Substrate-to-Substrate seamless teleportation natively with ",(0,a.jsx)(n.a,{href:"/docs/learn-xcm",children:"XCMP"}),")\nand Efinity (Paratoken), the following efforts are underway:"]}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.a,{href:"https://mynft.com/",children:(0,a.jsx)(n.strong,{children:"MyNFT"})}),": an EVM to EVM bridging effort."]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.strong,{children:"RMRK <-> EVM"})," Simplification bridge: a bridge developed during the\n",(0,a.jsx)(n.a,{href:"https://rmrk.devpost.com",children:"RMRK hackathon"})," for porting RMRK NFTs into simplified IOUs on EVM\nchains"]}),"\n"]}),"\n",(0,a.jsx)(n.h2,{id:"references",children:"References"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{}),"\n",(0,a.jsxs)(n.li,{children:["[2]:\n",(0,a.jsx)(n.a,{href:"https://unique.network/blog/chelobricks-making-waves-with-10-000-substrate-based-nfts/",children:"Unique Network's Chelobrick"})]}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(c,{...e})}):c(e)}},1769:(e,n,t)=>{t.d(n,{A:()=>i});const i=t.p+"assets/images/samurai-830479330323f7feeae0b981479ad9cc.png"},28453:(e,n,t)=>{t.d(n,{R:()=>o,x:()=>r});var i=t(96540);const a={},s=i.createContext(a);function o(e){const n=i.useContext(s);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:o(e.components),i.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/ec3b6a32.af6bd978.js b/assets/js/ec3b6a32.af6bd978.js deleted file mode 100644 index c6f4544be8ef..000000000000 --- a/assets/js/ec3b6a32.af6bd978.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8832],{45003:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>o,default:()=>h,frontMatter:()=>s,metadata:()=>r,toc:()=>d});var i=t(74848),a=t(28453);const s={id:"learn-nft",title:"NFTs",sidebar_label:"Introduction to NFTs",description:"The NFT Landscape of the Polkadot Ecosystem.",keywords:["NFT","non-fungible token","NFT 2.0"],slug:"../learn-nft"},o=void 0,r={id:"learn/learn-nft",title:"NFTs",description:"The NFT Landscape of the Polkadot Ecosystem.",source:"@site/../docs/learn/learn-nft.md",sourceDirName:"learn",slug:"/learn-nft",permalink:"/docs/learn-nft",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-nft.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1727178265e3,frontMatter:{id:"learn-nft",title:"NFTs",sidebar_label:"Introduction to NFTs",description:"The NFT Landscape of the Polkadot Ecosystem.",keywords:["NFT","non-fungible token","NFT 2.0"],slug:"../learn-nft"},sidebar:"docs",previous:{title:"Teleporting Assets",permalink:"/docs/learn-teleport"},next:{title:"Network Participants",permalink:"/docs/learn-participants-index"}},l={},d=[{value:"Fungibility",id:"fungibility",level:2},{value:"NFT Standards",id:"nft-standards",level:2},{value:"A typical NFT on Ethereum",id:"a-typical-nft-on-ethereum",level:3},{value:"NFTs in Polkadot & Kusama",id:"nfts-in-polkadot--kusama",level:2},{value:"Bridging",id:"bridging",level:2},{value:"References",id:"references",level:2}];function c(e){const n={a:"a",admonition:"admonition",em:"em",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",strong:"strong",ul:"ul",...(0,a.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.p,{children:"This page is a high-level overview of NFTs in the blockchain space and the various approaches to\nNFTs within the Polkadot ecosystem."}),"\n",(0,i.jsx)(n.h2,{id:"fungibility",children:"Fungibility"}),"\n",(0,i.jsxs)(n.p,{children:["NFT stands for ",(0,i.jsx)(n.em,{children:"non-fungible token"}),". Fungibility means interchangeability inside of a group. In\ntheory, a $20 bill is always worth $20 in a store and identical in value to any other $20 bill. It\nis not, however, fungible with a $1 or $100 dollar bill (outside its group)."]}),"\n",(0,i.jsx)(n.p,{children:"A Pokemon\u2122 trading card of a Charizard is non-fungible with a card of Squirtle, whereas editions of\nCharizard are fungible with each other."}),"\n",(0,i.jsxs)(n.p,{children:["Fungibility is a spectrum - what is fungible to some might not be fungible to others. In reality,\nPokemon\u2122 cards, the canonical example of non-fungible assets are more fungible than US dollar\nbills, each of which has a unique serial number that may be important to a government agency. The\ncards have no serial numbers ",(0,i.jsx)(n.a,{href:"%5BInvestopedia%5D(https://www.investopedia.com/terms/l/liars-poker.asp)",children:"1"}),"."]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{src:"https://www.investopedia.com/thmb/Nr-RLORu5CX_lIWZfLmV5X0eIrc=/613x345/smart/filters:no_upscale()/Clipboard01-d20f6eb9351e4f36a46e11fd87b53b2d.jpg",alt:"one dollar"})}),"\n",(0,i.jsx)(n.p,{children:'Additionally, a digital item like a "purple magic sword" in a game may be fungible with another\nvisually identical sword if all the player cares about is the looks of their character. But if the\nother sword has a different function, and that function influences the outcome of an adventure the\nplayer is about to embark on, then visually identical swords are absolutely non-fungible.'}),"\n",(0,i.jsxs)(n.p,{children:["Bearing that in mind, the simplest explanation of NFTs is that ",(0,i.jsx)(n.strong,{children:'NFTs are rows of arbitrary,\nproject-specific, and non-interchangeable data that can be cryptographically proven to "belong" to\nsomeone'}),". This data can be anything - concert tickets, attendance badges, simple words, avatars,\nplots of land in a metaverse, audio clips, house deeds, mortgages, and more."]}),"\n",(0,i.jsx)(n.h2,{id:"nft-standards",children:"NFT Standards"}),"\n",(0,i.jsx)(n.p,{children:'A general-purpose blockchain is not built to natively understand the concept of NFTs. It is only\nnatively aware and optimized for its own native tokens, but implementations built on such a chain\nare essentially "hacks".'}),"\n",(0,i.jsxs)(n.p,{children:['For example, Ethereum is a general-purpose blockchain that does not have the concept of "tokens"\n(fungible or not) built-in. Tokens in Ethereum are essentially spreadsheets of information to be\ninterpreted and read in a certain way by various user interfaces. This ',(0,i.jsx)(n.em,{children:"way"})," in which they should\nread them is called a ",(0,i.jsx)(n.em,{children:"standard"}),"."]}),"\n",(0,i.jsx)(n.p,{children:"The most widespread fungible token standard you may have heard of is ERC20, while the most\nwidespread NFT standard is ERC721, followed closely by ERC1155. The downside of having to define\nthese standards is that they are always instructions for how to read a spreadsheet pretending to\nserve information in a certain way, which by definition cannot be optimized. For this reason, even\non a good day of extremely low network congestion, interactions with NFTs on any EVM chain will cost\na few dollars but were on average around $100 per interaction (transfer, mint, sale) in 2021 on\nEthereum."}),"\n",(0,i.jsxs)(n.p,{children:["This prevents use cases that go beyond the current craze of ",(0,i.jsx)(n.em,{children:"digital dust gathering NFTs"}),' on\nEthereum - profile pictures, generative "look once and then put away" art, ',(0,i.jsx)(n.a,{href:"ens",children:"ENS"})," addresses, and\n",(0,i.jsx)(n.a,{href:"https://poap.xyz/",children:"proof of attendance badges"})," (which have since moved to the xDAI chain to save on\ngas fees)."]}),"\n",(0,i.jsxs)(n.h3,{id:"a-typical-nft-on-ethereum",children:["A typical ",(0,i.jsx)(n.a,{href:"https://opensea.io/assets/ethereum/0x2127fe7ffce4380459cced92f2d4793f3af094a4/12598",children:"NFT on Ethereum"})]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"samurai nft",src:t(1769).A+"",width:"506",height:"507"})}),"\n",(0,i.jsx)(n.p,{children:"For the sake of comparison, we can refer to these as NFTs 1.0: static NFTs that are almost\nexclusively image-based collectibles of varying rarity."}),"\n",(0,i.jsx)(n.h2,{id:"nfts-in-polkadot--kusama",children:"NFTs in Polkadot & Kusama"}),"\n",(0,i.jsxs)(n.p,{children:["This is where Polkadot's technology shines and where NFTs 2.0 come into play. By allowing\n",(0,i.jsx)(n.a,{href:"/docs/learn-parachains",children:"heterogeneous application-specific shards"})," to exist, builders can natively\noptimize for complex NFT use cases without tradeoffs that would make interacting with the system\nprohibitively inefficient and expensive in other environments."]}),"\n",(0,i.jsx)(n.admonition,{type:"info",children:(0,i.jsxs)(n.p,{children:["See ",(0,i.jsx)(n.a,{href:"/docs/learn-nft-projects",children:"this page"})," for more information about specific NFT project on Polkadot\nand Kusama."]})}),"\n",(0,i.jsx)(n.h2,{id:"bridging",children:"Bridging"}),"\n",(0,i.jsx)(n.p,{children:"Bridging to and from Substrate chains and EVM chains takes much effort but is a highly desired\nfeature in the NFT industry. Merging the collector and customer base has significant implications,\nso multiple projects focus on making this possible."}),"\n",(0,i.jsxs)(n.p,{children:["Apart from RMRK (Substrate-to-Substrate seamless teleportation natively with ",(0,i.jsx)(n.a,{href:"/docs/learn-xcm",children:"XCMP"}),")\nand Efinity (Paratoken), the following efforts are underway:"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.a,{href:"https://mynft.com/",children:(0,i.jsx)(n.strong,{children:"MyNFT"})}),": an EVM to EVM bridging effort."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"RMRK <-> EVM"})," Simplification bridge: a bridge developed during the\n",(0,i.jsx)(n.a,{href:"https://rmrk.devpost.com",children:"RMRK hackathon"})," for porting RMRK NFTs into simplified IOUs on EVM\nchains"]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"references",children:"References"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{}),"\n",(0,i.jsxs)(n.li,{children:["[2]:\n",(0,i.jsx)(n.a,{href:"https://unique.network/blog/chelobricks-making-waves-with-10-000-substrate-based-nfts/",children:"Unique Network's Chelobrick"})]}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(c,{...e})}):c(e)}},1769:(e,n,t)=>{t.d(n,{A:()=>i});const i=t.p+"assets/images/samurai-830479330323f7feeae0b981479ad9cc.png"},28453:(e,n,t)=>{t.d(n,{R:()=>o,x:()=>r});var i=t(96540);const a={},s=i.createContext(a);function o(e){const n=i.useContext(s);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:o(e.components),i.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/ecb495b7.9493aa89.js b/assets/js/ecb495b7.9493aa89.js deleted file mode 100644 index 2dc4cc39b7b5..000000000000 --- a/assets/js/ecb495b7.9493aa89.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6786],{21017:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>d,contentTitle:()=>o,default:()=>h,frontMatter:()=>i,metadata:()=>r,toc:()=>l});var n=a(74848),s=a(28453);const i={id:"maintain-guides-how-to-systemd",title:"Using systemd for a Validator Node",sidebar_label:"Using systemd for a Validator Node",description:"Using a service manager for your validator node.",keywords:["systemd","validate","node"],slug:"../maintain-guides-how-to-systemd"},o=void 0,r={id:"maintain/maintain-guides-how-to-systemd",title:"Using systemd for a Validator Node",description:"Using a service manager for your validator node.",source:"@site/../docs/maintain/maintain-guides-how-to-systemd.md",sourceDirName:"maintain",slug:"/maintain-guides-how-to-systemd",permalink:"/docs/maintain-guides-how-to-systemd",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/maintain/maintain-guides-how-to-systemd.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1718028821e3,frontMatter:{id:"maintain-guides-how-to-systemd",title:"Using systemd for a Validator Node",sidebar_label:"Using systemd for a Validator Node",description:"Using a service manager for your validator node.",keywords:["systemd","validate","node"],slug:"../maintain-guides-how-to-systemd"},sidebar:"docs",previous:{title:"Validator Payout Overview",permalink:"/docs/maintain-guides-validator-payout"},next:{title:"Secure Validator",permalink:"/docs/maintain-guides-secure-validator"}},d={},l=[];function c(e){const t={a:"a",admonition:"admonition",code:"code",p:"p",pre:"pre",...(0,s.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(t.p,{children:["You can run your validator as a ",(0,n.jsx)(t.a,{href:"https://en.wikipedia.org/wiki/Systemd",children:"systemd"})," process so that it\nwill automatically restart on server reboots or crashes (and helps to avoid getting\n",(0,n.jsx)(t.a,{href:"/docs/learn-offenses",children:"slashed"}),")."]}),"\n",(0,n.jsxs)(t.p,{children:["Before following this guide you should have already set up your validator by following the\n",(0,n.jsx)(t.a,{href:"/docs/learn-validator",children:"How to validate"})," article."]}),"\n",(0,n.jsxs)(t.p,{children:["First create a new unit file called ",(0,n.jsx)(t.code,{children:"polkadot-validator.service"})," in ",(0,n.jsx)(t.code,{children:"/etc/systemd/system/"}),"."]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-bash",children:"touch /etc/systemd/system/polkadot-validator.service\n"})}),"\n",(0,n.jsx)(t.p,{children:"In this unit file you will write the commands that you want to run on server boot / restart."}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{children:"[Unit]\nDescription=Polkadot Validator\n\n[Service]\nExecStart=PATH_TO_POLKADOT_BIN --validator --name SHOW_ON_TELEMETRY\nRestart=always\nRestartSec=120\n\n[Install]\nWantedBy=multi-user.target\n"})}),"\n",(0,n.jsx)(t.admonition,{type:"warning",children:(0,n.jsxs)(t.p,{children:["It is recommended to delay the restart of a node with ",(0,n.jsx)(t.code,{children:"RestartSec"})," in the case of node crashes. It's\npossible that when a node crashes, consensus votes in GRANDPA aren't persisted to disk. In this\ncase, there is potential to equivocate when immediately restarting. What can happen is the node will\nnot recognize votes that didn't make it to disk, and will then cast conflicting votes. Delaying the\nrestart will allow the network to progress past potentially conflicting votes, at which point other\nnodes will not accept them."]})}),"\n",(0,n.jsx)(t.p,{children:"To enable this to autostart on bootup run:"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-bash",children:"systemctl enable polkadot-validator.service\n"})}),"\n",(0,n.jsx)(t.p,{children:"Start it manually with:"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-bash",children:"systemctl start polkadot-validator.service\n"})}),"\n",(0,n.jsx)(t.p,{children:"You can check that it's working with:"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-bash",children:"systemctl status polkadot-validator.service\n"})}),"\n",(0,n.jsxs)(t.p,{children:["You can tail the logs with ",(0,n.jsx)(t.code,{children:"journalctl"})," like so:"]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-bash",children:"journalctl -f -u polkadot-validator\n"})})]})}function h(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(c,{...e})}):c(e)}},28453:(e,t,a)=>{a.d(t,{R:()=>o,x:()=>r});var n=a(96540);const s={},i=n.createContext(s);function o(e){const t=n.useContext(i);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:o(e.components),n.createElement(i.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/ecb495b7.d9a04a85.js b/assets/js/ecb495b7.d9a04a85.js new file mode 100644 index 000000000000..a13074131f2d --- /dev/null +++ b/assets/js/ecb495b7.d9a04a85.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6786],{96724:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>d,contentTitle:()=>r,default:()=>h,frontMatter:()=>o,metadata:()=>s,toc:()=>l});const s=JSON.parse('{"id":"maintain/maintain-guides-how-to-systemd","title":"Using systemd for a Validator Node","description":"Using a service manager for your validator node.","source":"@site/../docs/maintain/maintain-guides-how-to-systemd.md","sourceDirName":"maintain","slug":"/maintain-guides-how-to-systemd","permalink":"/docs/maintain-guides-how-to-systemd","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/maintain/maintain-guides-how-to-systemd.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1718028821000,"frontMatter":{"id":"maintain-guides-how-to-systemd","title":"Using systemd for a Validator Node","sidebar_label":"Using systemd for a Validator Node","description":"Using a service manager for your validator node.","keywords":["systemd","validate","node"],"slug":"../maintain-guides-how-to-systemd"},"sidebar":"docs","previous":{"title":"Validator Payout Overview","permalink":"/docs/maintain-guides-validator-payout"},"next":{"title":"Secure Validator","permalink":"/docs/maintain-guides-secure-validator"}}');var n=a(74848),i=a(28453);const o={id:"maintain-guides-how-to-systemd",title:"Using systemd for a Validator Node",sidebar_label:"Using systemd for a Validator Node",description:"Using a service manager for your validator node.",keywords:["systemd","validate","node"],slug:"../maintain-guides-how-to-systemd"},r=void 0,d={},l=[];function c(e){const t={a:"a",admonition:"admonition",code:"code",p:"p",pre:"pre",...(0,i.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(t.p,{children:["You can run your validator as a ",(0,n.jsx)(t.a,{href:"https://en.wikipedia.org/wiki/Systemd",children:"systemd"})," process so that it\nwill automatically restart on server reboots or crashes (and helps to avoid getting\n",(0,n.jsx)(t.a,{href:"/docs/learn-offenses",children:"slashed"}),")."]}),"\n",(0,n.jsxs)(t.p,{children:["Before following this guide you should have already set up your validator by following the\n",(0,n.jsx)(t.a,{href:"/docs/learn-validator",children:"How to validate"})," article."]}),"\n",(0,n.jsxs)(t.p,{children:["First create a new unit file called ",(0,n.jsx)(t.code,{children:"polkadot-validator.service"})," in ",(0,n.jsx)(t.code,{children:"/etc/systemd/system/"}),"."]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-bash",children:"touch /etc/systemd/system/polkadot-validator.service\n"})}),"\n",(0,n.jsx)(t.p,{children:"In this unit file you will write the commands that you want to run on server boot / restart."}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{children:"[Unit]\nDescription=Polkadot Validator\n\n[Service]\nExecStart=PATH_TO_POLKADOT_BIN --validator --name SHOW_ON_TELEMETRY\nRestart=always\nRestartSec=120\n\n[Install]\nWantedBy=multi-user.target\n"})}),"\n",(0,n.jsx)(t.admonition,{type:"warning",children:(0,n.jsxs)(t.p,{children:["It is recommended to delay the restart of a node with ",(0,n.jsx)(t.code,{children:"RestartSec"})," in the case of node crashes. It's\npossible that when a node crashes, consensus votes in GRANDPA aren't persisted to disk. In this\ncase, there is potential to equivocate when immediately restarting. What can happen is the node will\nnot recognize votes that didn't make it to disk, and will then cast conflicting votes. Delaying the\nrestart will allow the network to progress past potentially conflicting votes, at which point other\nnodes will not accept them."]})}),"\n",(0,n.jsx)(t.p,{children:"To enable this to autostart on bootup run:"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-bash",children:"systemctl enable polkadot-validator.service\n"})}),"\n",(0,n.jsx)(t.p,{children:"Start it manually with:"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-bash",children:"systemctl start polkadot-validator.service\n"})}),"\n",(0,n.jsx)(t.p,{children:"You can check that it's working with:"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-bash",children:"systemctl status polkadot-validator.service\n"})}),"\n",(0,n.jsxs)(t.p,{children:["You can tail the logs with ",(0,n.jsx)(t.code,{children:"journalctl"})," like so:"]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-bash",children:"journalctl -f -u polkadot-validator\n"})})]})}function h(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(c,{...e})}):c(e)}},28453:(e,t,a)=>{a.d(t,{R:()=>o,x:()=>r});var s=a(96540);const n={},i=s.createContext(n);function o(e){const t=s.useContext(i);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:o(e.components),s.createElement(i.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/ece9fdae.46d61c7f.js b/assets/js/ece9fdae.46d61c7f.js deleted file mode 100644 index 01f297864ec0..000000000000 --- a/assets/js/ece9fdae.46d61c7f.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6641],{49524:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>l,default:()=>m,frontMatter:()=>i,metadata:()=>d,toc:()=>u});var a=n(74848),o=n(28453),r=n(11470),s=n(19365);const i={id:"community",title:"Community",sidebar_label:"Community",description:"Connect and stay updated with the Polkadot Community.",keywords:["community","events","socials","chat","blogs","ecosystem"],slug:"../community"},l=void 0,d={id:"general/community",title:"Community",description:"Connect and stay updated with the Polkadot Community.",source:"@site/../docs/general/community.md",sourceDirName:"general",slug:"/community",permalink:"/docs/community",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/community.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1727178265e3,frontMatter:{id:"community",title:"Community",sidebar_label:"Community",description:"Connect and stay updated with the Polkadot Community.",keywords:["community","events","socials","chat","blogs","ecosystem"],slug:"../community"},sidebar:"docs",previous:{title:"Community & Contributors",permalink:"/docs/community-index"},next:{title:"Contributing to the Wiki",permalink:"/docs/contributing"}},c={},u=[{value:"General",id:"general",level:2},{value:"Events",id:"events",level:3},{value:"Matrix Chats",id:"matrix-chats",level:2},{value:"Socials",id:"socials",level:2},{value:"Chat",id:"chat",level:3},{value:"Social media",id:"social-media",level:3},{value:"Blogs and tutorials",id:"blogs-and-tutorials",level:3},{value:"Newsletters",id:"newsletters",level:3},{value:"Ecosystem",id:"ecosystem",level:2}];function h(e){const t={a:"a",admonition:"admonition",h2:"h2",h3:"h3",li:"li",p:"p",ul:"ul",...(0,o.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(t.p,{children:"Below are the most essential links to the community channels for Polkadot and Kusama."}),"\n",(0,a.jsx)(t.admonition,{type:"caution",children:(0,a.jsx)(t.p,{children:"Keep in mind that no admin or moderator will ever DM you for any reason whatsoever without prior\ncontact and anyone doing so is likely trying to scam you."})}),"\n",(0,a.jsx)(t.h2,{id:"general",children:"General"}),"\n",(0,a.jsxs)(r.A,{groupId:"clients",values:[{label:"Polkadot",value:"polkadot"},{label:"Kusama",value:"kusama"}],children:[(0,a.jsx)(s.A,{value:"polkadot",children:(0,a.jsxs)("ul",{children:[(0,a.jsx)("li",{children:(0,a.jsxs)(t.p,{children:[(0,a.jsx)("a",{href:"https://forum.polkadot.network/",children:"Polkadot Forum"})," - a place for thoughtful comments and discussions on the future of Polkadot, and the steps we can take to get there together."]})}),(0,a.jsx)("li",{children:(0,a.jsxs)(t.p,{children:[(0,a.jsx)("a",{href:"https://github.com/paritytech/polkadot-sdk/tree/master/polkadot",children:"Polkadot GitHub"})," - Parity maintained repository that houses the Rust implementation of the Polkadot Host."]})}),(0,a.jsx)("li",{children:(0,a.jsxs)(t.p,{children:[(0,a.jsx)("a",{href:"https://support.polkadot.network/support/home",children:"Polkadot Support Knowledgebase"})," and ",(0,a.jsx)("a",{href:"https://support.polkadot.network",children:"Polkadot Support Contact"})]})}),(0,a.jsx)("li",{children:(0,a.jsx)("a",{href:"https://research.web3.foundation/news",children:"Polkadot's Latest Research (news)"})}),(0,a.jsx)("li",{children:(0,a.jsxs)(t.p,{children:[(0,a.jsx)("a",{href:"https://www.notion.so/web3foundation/Polkadot-Meetup-Hub-4511c156770e4ba9936386d8be5fe5be",children:"Polkadot Meetup Hub"})," - Information on hosting meetups, applying for funding, and materials for running it."]})}),(0,a.jsx)("li",{children:(0,a.jsx)("a",{href:"https://polkadot.polkassembly.io/",children:"Polkadot Discussion and Governance on Polkassembly."})}),(0,a.jsx)("li",{children:(0,a.jsx)("a",{href:"https://polkadot.subsquare.io/discussions",children:"Polkadot Discussion and Governance on Subsquare."})})]})}),(0,a.jsx)(s.A,{value:"kusama",children:(0,a.jsxs)("ul",{children:[(0,a.jsx)("li",{children:(0,a.jsx)("a",{href:"https://kusama.polkassembly.io/",children:"Kusama Discussion and Governance on Polkassembly"})}),(0,a.jsx)("li",{children:(0,a.jsx)("a",{href:"https://kusama.subsquare.io/discussions",children:"Kusama Discussion and Governance on Subsquare"})})]})})]}),"\n",(0,a.jsx)(t.h3,{id:"events",children:"Events"}),"\n",(0,a.jsxs)(t.p,{children:[(0,a.jsx)(t.a,{href:"https://www.meetup.com/pro/polkadot",children:"Polkadot Meetup Platform"})," - Information on hosting meetups,\napplying for funding, and materials for running it."]}),"\n",(0,a.jsxs)(t.p,{children:[(0,a.jsx)(t.a,{href:"https://web3foundation.notion.site/Community-Events-Introduction-05199fe6556b41f48a3390b1868c9ae7",children:"Community Events"})," -\nInformation on events funded by the ",(0,a.jsx)(t.a,{href:"https://polkadot.polkassembly.io/bounty/17",children:"Treasury"})," and\norganized by the Polkadot community (candidates or ambassadors) focused on promoting Polkadot,\nKusama, and related technologies. The events are educational and informative, and their goal is to\ncreate an impact in the community."]}),"\n",(0,a.jsx)(t.h2,{id:"matrix-chats",children:"Matrix Chats"}),"\n",(0,a.jsxs)(t.p,{children:["We primarily use ",(0,a.jsx)(t.a,{href:"https://matrix.org",children:"Matrix"})," across the organization and to communicate with\ncommunity members. The application we use most often to interact with the Matrix protocol is the\n",(0,a.jsx)(t.a,{href:"https://app.element.io",children:"Element"})," messenger client."]}),"\n",(0,a.jsxs)(r.A,{groupId:"clients",values:[{label:"Polkadot",value:"polkadot"},{label:"Kusama",value:"kusama"},{label:"Technical",value:"technical"}],children:[(0,a.jsxs)(s.A,{value:"polkadot",children:[(0,a.jsx)("p",{children:(0,a.jsxs)(t.p,{children:[(0,a.jsx)("a",{href:"https://matrix.to/#/#polkadot:web3.foundation",children:(0,a.jsx)("strong",{children:"Polkadot Space"})})," - Space containing all official\nrooms below. Note that this is a newer feature and may not be supported by your Matrix client. If\nyou face any issues, join the rooms individually."]})}),(0,a.jsxs)("ul",{children:[(0,a.jsx)("li",{children:(0,a.jsxs)(t.p,{children:[(0,a.jsx)("a",{href:"https://matrix.to/#/#polkadot-watercooler:parity.io",children:"Polkadot Watercooler"})," - General room for talk about Polkadot."]})}),(0,a.jsx)("li",{children:(0,a.jsxs)(t.p,{children:[(0,a.jsx)("a",{href:"https://matrix.to/#/#polkadotvalidatorlounge:web3.foundation",children:"Polkadot Validator Lounge"})," - Room for validators learning about setting up a node."]})}),(0,a.jsx)("li",{children:(0,a.jsxs)(t.p,{children:[(0,a.jsx)("a",{href:"https://matrix.to/#/#Polkadot-Direction:parity.io",children:"Polkadot Direction"})," - Governance, and a place to discuss the future of Polkadot."]})}),(0,a.jsx)("li",{children:(0,a.jsxs)(t.p,{children:[(0,a.jsx)("a",{href:"https://matrix.to/#/#dailydigest:web3.foundation",children:"Polkadot Digest"})," - News about what is happening in the Polkadot ecosystem, published every weekday except holidays."]})}),(0,a.jsx)("li",{children:(0,a.jsxs)(t.p,{children:[(0,a.jsx)("a",{href:"https://matrix.to/#/#polkadotwikipublic:web3.foundation",children:"Polkadot Wiki"})," - The official matrix room about the Polkadot Wiki."]})})]})]}),(0,a.jsxs)(s.A,{value:"kusama",children:[(0,a.jsx)("p",{children:(0,a.jsxs)(t.p,{children:[(0,a.jsx)("a",{href:"https://matrix.to/#/#kusama:web3.foundation",children:(0,a.jsx)("strong",{children:"Kusama Space"})})," - Space containing all official\nrooms below. Note that this is a newer feature and may not be supported by your Matrix client. If\nyou face any issues, join the rooms individually."]})}),(0,a.jsxs)("ul",{children:[(0,a.jsx)("li",{children:(0,a.jsxs)(t.p,{children:[(0,a.jsx)("a",{href:"https://matrix.to/#/#kusamawatercooler:web3.foundation",children:"Kusama Watercooler"})," - General room for talk about Kusama."]})}),(0,a.jsx)("li",{children:(0,a.jsxs)(t.p,{children:[(0,a.jsx)("a",{href:"https://matrix.to/#/#KusamaValidatorLounge:parity.io",children:"Kusama Validator Lounge"})," - Room for validators learning about setting up a node."]})}),(0,a.jsx)("li",{children:(0,a.jsxs)(t.p,{children:[(0,a.jsx)("a",{href:"https://matrix.to/#/#Kusama-Direction:parity.io",children:"Kusama Direction"})," - Governance, and a place to discuss the future of Kusama."]})})]})]}),(0,a.jsx)(s.A,{value:"technical",children:(0,a.jsxs)("ul",{children:[(0,a.jsx)("li",{children:(0,a.jsxs)(t.p,{children:[(0,a.jsx)("a",{href:"https://matrix.to/#/#substratedevs:matrix.org",children:"Substrate Developers Chat"})," - A Matrix chat room for Substrate development."]})}),(0,a.jsx)("li",{children:(0,a.jsxs)(t.p,{children:[(0,a.jsx)("a",{href:"https://t.me/substratedevs",children:"Substrate Developers Telegram Chat"})," - A Telegram chat room for Substrate development, bridged to Matrix Substrate Developers Chat linked above."]})}),(0,a.jsx)("li",{children:(0,a.jsxs)(t.p,{children:[(0,a.jsx)("a",{href:"https://substrate.stackexchange.com/",children:"Substrate and Polkadot StackExchange"})," - More advanced room for technical questions on building with Substrate."]})}),(0,a.jsx)("li",{children:(0,a.jsxs)(t.p,{children:[(0,a.jsx)("a",{href:"https://matrix.to/#/#ink:parity.io",children:"Smart Contracts & Parity Ink!"})," - A room to discuss developing Substrate smart contracts using Parity Ink!"]})})]})})]}),"\n",(0,a.jsx)(t.h2,{id:"socials",children:"Socials"}),"\n",(0,a.jsx)(t.h3,{id:"chat",children:"Chat"}),"\n",(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.a,{href:"https://dot.li/discord",children:"Polkadot Discord"})," (RECOMMENDED)"]}),"\n",(0,a.jsx)(t.li,{children:(0,a.jsx)(t.a,{href:"https://kusa.ma/discord",children:"Kusama Discord"})}),"\n"]}),"\n",(0,a.jsx)(t.h3,{id:"social-media",children:"Social media"}),"\n",(0,a.jsxs)(r.A,{groupId:"socials",values:[{label:"Web3 Foundation",value:"w3f"},{label:"Polkadot",value:"polkadot"},{label:"Kusama",value:"kusama"}],children:[(0,a.jsx)(s.A,{value:"w3f",children:(0,a.jsxs)("ul",{children:[(0,a.jsx)("li",{children:(0,a.jsx)("a",{href:"https://twitter.com/web3foundation",children:"Web3 Foundation Twitter"})}),(0,a.jsx)("li",{children:(0,a.jsx)("a",{href:"https://www.youtube.com/channel/UClnw_bcNg4CAzF772qEtq4g",children:"Web3 Foundation YouTube"})})]})}),(0,a.jsx)(s.A,{value:"polkadot",children:(0,a.jsxs)("ul",{children:[(0,a.jsx)("li",{children:(0,a.jsx)("a",{href:"https://twitter.com/Polkadot",children:"Polkadot Twitter"})}),(0,a.jsx)("li",{children:(0,a.jsx)("a",{href:"https://www.reddit.com/r/polkadot",children:"Polkadot Reddit"})}),(0,a.jsx)("li",{children:(0,a.jsx)("a",{href:"https://www.youtube.com/channel/UCB7PbjuZLEba_znc7mEGNgw",children:"Polkadot YouTube"})})]})}),(0,a.jsx)(s.A,{value:"kusama",children:(0,a.jsxs)("ul",{children:[(0,a.jsx)("li",{children:(0,a.jsx)("a",{href:"https://twitter.com/kusamanetwork",children:"Kusama Twitter"})}),(0,a.jsx)("li",{children:(0,a.jsx)("a",{href:"https://www.reddit.com/r/Kusama",children:"Kusama Reddit"})}),(0,a.jsx)("li",{children:(0,a.jsx)("a",{href:"http://youtube.com/c/kusamanetwork",children:"Kusama YouTube Channel"})})]})})]}),"\n",(0,a.jsx)(t.h3,{id:"blogs-and-tutorials",children:"Blogs and tutorials"}),"\n",(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsx)(t.li,{children:(0,a.jsx)(t.a,{href:"https://medium.com/@web3",children:"Web3 Medium Blog"})}),"\n",(0,a.jsx)(t.li,{children:(0,a.jsx)(t.a,{href:"https://polkadot.network/blog/",children:"Polkadot Blog"})}),"\n",(0,a.jsx)(t.li,{children:(0,a.jsx)(t.a,{href:"https://medium.com/@gavofyork",children:"Gavin Wood's Medium Blog"})}),"\n",(0,a.jsx)(t.li,{children:(0,a.jsx)(t.a,{href:"https://newsletter.dotleap.com/",children:"Dotleap.com Newsletter"})}),"\n"]}),"\n",(0,a.jsx)(t.h3,{id:"newsletters",children:"Newsletters"}),"\n",(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.a,{href:"https://share.hsforms.com/1LL1CBwiASxC5pJUYZAiDVw4752a",children:"Subscribe to the Polkadot newsletter"})," -\nofficial, infrequent"]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.a,{href:"https://dotleap.substack.com/",children:"Dot Leap Newsletter"})," - less official, weekly"]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.a,{href:"https://news.nft.review",children:"NFT Review"})," - Covering the evolution of the NFT ecosystem on Kusama"]}),"\n"]}),"\n",(0,a.jsx)(t.h2,{id:"ecosystem",children:"Ecosystem"}),"\n",(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.a,{href:"https://dotinsights.subwallet.app/",children:"Polkadot & Kusama Ecosystem Map"})," - Comprehensive list of\nprojects building in the ecosystem made by SubWallet with support from Parity Technologies."]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.a,{href:"https://dotinsights.subwallet.app/polkadot-report-q4-2022-en/",children:"Polkadot Deep Dive Quarterly Report"})," -\nA quarterly report series that dives deep into the growth of the whole ecosystem. Made by\nSubWallet with sections focused on Ecosystem Overview, DeFi, ",(0,a.jsx)(t.a,{href:"/docs/learn-nft",children:"NFT"})," &\n",(0,a.jsx)(t.a,{href:"/docs/web3-and-polkadot",children:"Web3"}),"."]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.a,{href:"/docs/build-open-source",children:"Polkadot Stack"})," - if you're interested in seeing what's under\ndevelopment and where there's room for your contributions."]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.a,{href:"https://polkaproject.com/",children:"Teams Building on Polkadot"})," - Community maintained list of teams\nbuilding on Polkadot and/or Substrate. (Note that this may contain inaccuracies, as it's\nunofficial)."]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.a,{href:"https://polkadot.getro.com/jobs",children:"Jobs in Polkadot Ecosystem"})," - Join the Polkadot Talent Network."]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.a,{href:"https://polkadot.network/development/blockchain-academy/",children:"Polkadot Blockchain Academy"})," - a\nclassroom-based educational program covering the conceptual underpinnings and the hands-on\napplication of blockchain technology, using Polkadot and Substrate as its foundations."]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.a,{href:"https://airlyft.one/communities?ecosystem=POLKADOT",children:"Polkadot Communities and Campaigns by AirLyft One"})," -\nDiscover thriving communities and participate in engaging campaigns."]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.a,{href:"https://dotappstore.com/",children:"DotAppStore"})," - Discover featured projects and apps upvoted by the\nPolkadot community."]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.a,{href:"https://github.com/haquefardeen/awesome-dot",children:"Awesome Dot"})," - community curated resources,\nprojects, and learning material about the Polkadot and Kusama ecosystems."]}),"\n"]})]})}function m(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,a.jsx)(t,{...e,children:(0,a.jsx)(h,{...e})}):h(e)}},19365:(e,t,n)=>{n.d(t,{A:()=>s});n(96540);var a=n(34164);const o={tabItem:"tabItem_Ymn6"};var r=n(74848);function s(e){var t=e.children,n=e.hidden,s=e.className;return(0,r.jsx)("div",{role:"tabpanel",className:(0,a.A)(o.tabItem,s),hidden:n,children:t})}},11470:(e,t,n)=>{n.d(t,{A:()=>g});var a=n(96540),o=n(34164),r=n(23104),s=n(56347),i=n(205),l=n(57485),d=n(31682),c=n(75376);function u(e){var t,n;return null!=(t=null==(n=a.Children.toArray(e).filter((function(e){return"\n"!==e})).map((function(e){if(!e||(0,a.isValidElement)(e)&&((t=e.props)&&"object"==typeof t&&"value"in t))return e;var t;throw new Error("Docusaurus error: Bad child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:n.filter(Boolean))?t:[]}function h(e){var t=e.values,n=e.children;return(0,a.useMemo)((function(){var e=null!=t?t:function(e){return u(e).map((function(e){var t=e.props;return{value:t.value,label:t.label,attributes:t.attributes,default:t.default}}))}(n);return function(e){var t=(0,d.XI)(e,(function(e,t){return e.value===t.value}));if(t.length>0)throw new Error('Docusaurus error: Duplicate values "'+t.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[t,n])}function m(e){var t=e.value;return e.tabValues.some((function(e){return e.value===t}))}function p(e){var t=e.queryString,n=void 0!==t&&t,o=e.groupId,r=(0,s.W6)(),i=function(e){var t=e.queryString,n=void 0!==t&&t,a=e.groupId;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=a?a:null}({queryString:n,groupId:o});return[(0,l.aZ)(i),(0,a.useCallback)((function(e){if(i){var t=new URLSearchParams(r.location.search);t.set(i,e),r.replace(Object.assign({},r.location,{search:t.toString()}))}}),[i,r])]}function f(e){var t,n,o,r,s=e.defaultValue,l=e.queryString,d=void 0!==l&&l,u=e.groupId,f=h(e),x=(0,a.useState)((function(){return function(e){var t,n=e.defaultValue,a=e.tabValues;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!m({value:n,tabValues:a}))throw new Error('Docusaurus error: The has a defaultValue "'+n+'" but none of its children has the corresponding value. Available values are: '+a.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return n}var o=null!=(t=a.find((function(e){return e.default})))?t:a[0];if(!o)throw new Error("Unexpected error: 0 tabValues");return o.value}({defaultValue:s,tabValues:f})})),b=x[0],j=x[1],v=p({queryString:d,groupId:u}),k=v[0],y=v[1],g=(t=function(e){return e?"docusaurus.tab."+e:null}({groupId:u}.groupId),n=(0,c.Dv)(t),o=n[0],r=n[1],[o,(0,a.useCallback)((function(e){t&&r.set(e)}),[t,r])]),w=g[0],P=g[1],C=function(){var e=null!=k?k:w;return m({value:e,tabValues:f})?e:null}();return(0,i.A)((function(){C&&j(C)}),[C]),{selectedValue:b,selectValue:(0,a.useCallback)((function(e){if(!m({value:e,tabValues:f}))throw new Error("Can't select invalid tab value="+e);j(e),y(e),P(e)}),[y,P,f]),tabValues:f}}var x=n(92303);const b={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var j=n(74848);function v(e){var t=e.className,n=e.block,a=e.selectedValue,s=e.selectValue,i=e.tabValues,l=[],d=(0,r.a_)().blockElementScrollPositionUntilNextRender,c=function(e){var t=e.currentTarget,n=l.indexOf(t),o=i[n].value;o!==a&&(d(t),s(o))},u=function(e){var t,n=null;switch(e.key){case"Enter":c(e);break;case"ArrowRight":var a,o=l.indexOf(e.currentTarget)+1;n=null!=(a=l[o])?a:l[0];break;case"ArrowLeft":var r,s=l.indexOf(e.currentTarget)-1;n=null!=(r=l[s])?r:l[l.length-1]}null==(t=n)||t.focus()};return(0,j.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,o.A)("tabs",{"tabs--block":n},t),children:i.map((function(e){var t=e.value,n=e.label,r=e.attributes;return(0,j.jsx)("li",Object.assign({role:"tab",tabIndex:a===t?0:-1,"aria-selected":a===t,ref:function(e){return l.push(e)},onKeyDown:u,onClick:c},r,{className:(0,o.A)("tabs__item",b.tabItem,null==r?void 0:r.className,{"tabs__item--active":a===t}),children:null!=n?n:t}),t)}))})}function k(e){var t=e.lazy,n=e.children,r=e.selectedValue,s=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){var i=s.find((function(e){return e.props.value===r}));return i?(0,a.cloneElement)(i,{className:(0,o.A)("margin-top--md",i.props.className)}):null}return(0,j.jsx)("div",{className:"margin-top--md",children:s.map((function(e,t){return(0,a.cloneElement)(e,{key:t,hidden:e.props.value!==r})}))})}function y(e){var t=f(e);return(0,j.jsxs)("div",{className:(0,o.A)("tabs-container",b.tabList),children:[(0,j.jsx)(v,Object.assign({},t,e)),(0,j.jsx)(k,Object.assign({},t,e))]})}function g(e){var t=(0,x.A)();return(0,j.jsx)(y,Object.assign({},e,{children:u(e.children)}),String(t))}},28453:(e,t,n)=>{n.d(t,{R:()=>s,x:()=>i});var a=n(96540);const o={},r=a.createContext(o);function s(e){const t=a.useContext(r);return a.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:s(e.components),a.createElement(r.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/ece9fdae.f92d3933.js b/assets/js/ece9fdae.f92d3933.js new file mode 100644 index 000000000000..66cd8d450a3a --- /dev/null +++ b/assets/js/ece9fdae.f92d3933.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6641],{2619:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>d,default:()=>m,frontMatter:()=>l,metadata:()=>a,toc:()=>u});const a=JSON.parse('{"id":"general/community","title":"Community","description":"Connect and stay updated with the Polkadot Community.","source":"@site/../docs/general/community.md","sourceDirName":"general","slug":"/community","permalink":"/docs/community","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/community.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1727178265000,"frontMatter":{"id":"community","title":"Community","sidebar_label":"Community","description":"Connect and stay updated with the Polkadot Community.","keywords":["community","events","socials","chat","blogs","ecosystem"],"slug":"../community"},"sidebar":"docs","previous":{"title":"Community & Contributors","permalink":"/docs/community-index"},"next":{"title":"Contributing to the Wiki","permalink":"/docs/contributing"}}');var o=n(74848),s=n(28453),r=n(11470),i=n(19365);const l={id:"community",title:"Community",sidebar_label:"Community",description:"Connect and stay updated with the Polkadot Community.",keywords:["community","events","socials","chat","blogs","ecosystem"],slug:"../community"},d=void 0,c={},u=[{value:"General",id:"general",level:2},{value:"Events",id:"events",level:3},{value:"Matrix Chats",id:"matrix-chats",level:2},{value:"Socials",id:"socials",level:2},{value:"Chat",id:"chat",level:3},{value:"Social media",id:"social-media",level:3},{value:"Blogs and tutorials",id:"blogs-and-tutorials",level:3},{value:"Newsletters",id:"newsletters",level:3},{value:"Ecosystem",id:"ecosystem",level:2}];function h(e){const t={a:"a",admonition:"admonition",h2:"h2",h3:"h3",li:"li",p:"p",ul:"ul",...(0,s.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.p,{children:"Below are the most essential links to the community channels for Polkadot and Kusama."}),"\n",(0,o.jsx)(t.admonition,{type:"caution",children:(0,o.jsx)(t.p,{children:"Keep in mind that no admin or moderator will ever DM you for any reason whatsoever without prior\ncontact and anyone doing so is likely trying to scam you."})}),"\n",(0,o.jsx)(t.h2,{id:"general",children:"General"}),"\n",(0,o.jsxs)(r.A,{groupId:"clients",values:[{label:"Polkadot",value:"polkadot"},{label:"Kusama",value:"kusama"}],children:[(0,o.jsx)(i.A,{value:"polkadot",children:(0,o.jsxs)("ul",{children:[(0,o.jsx)("li",{children:(0,o.jsxs)(t.p,{children:[(0,o.jsx)("a",{href:"https://forum.polkadot.network/",children:"Polkadot Forum"})," - a place for thoughtful comments and discussions on the future of Polkadot, and the steps we can take to get there together."]})}),(0,o.jsx)("li",{children:(0,o.jsxs)(t.p,{children:[(0,o.jsx)("a",{href:"https://github.com/paritytech/polkadot-sdk/tree/master/polkadot",children:"Polkadot GitHub"})," - Parity maintained repository that houses the Rust implementation of the Polkadot Host."]})}),(0,o.jsx)("li",{children:(0,o.jsxs)(t.p,{children:[(0,o.jsx)("a",{href:"https://support.polkadot.network/support/home",children:"Polkadot Support Knowledgebase"})," and ",(0,o.jsx)("a",{href:"https://support.polkadot.network",children:"Polkadot Support Contact"})]})}),(0,o.jsx)("li",{children:(0,o.jsx)("a",{href:"https://research.web3.foundation/news",children:"Polkadot's Latest Research (news)"})}),(0,o.jsx)("li",{children:(0,o.jsxs)(t.p,{children:[(0,o.jsx)("a",{href:"https://www.notion.so/web3foundation/Polkadot-Meetup-Hub-4511c156770e4ba9936386d8be5fe5be",children:"Polkadot Meetup Hub"})," - Information on hosting meetups, applying for funding, and materials for running it."]})}),(0,o.jsx)("li",{children:(0,o.jsx)("a",{href:"https://polkadot.polkassembly.io/",children:"Polkadot Discussion and Governance on Polkassembly."})}),(0,o.jsx)("li",{children:(0,o.jsx)("a",{href:"https://polkadot.subsquare.io/discussions",children:"Polkadot Discussion and Governance on Subsquare."})})]})}),(0,o.jsx)(i.A,{value:"kusama",children:(0,o.jsxs)("ul",{children:[(0,o.jsx)("li",{children:(0,o.jsx)("a",{href:"https://kusama.polkassembly.io/",children:"Kusama Discussion and Governance on Polkassembly"})}),(0,o.jsx)("li",{children:(0,o.jsx)("a",{href:"https://kusama.subsquare.io/discussions",children:"Kusama Discussion and Governance on Subsquare"})})]})})]}),"\n",(0,o.jsx)(t.h3,{id:"events",children:"Events"}),"\n",(0,o.jsxs)(t.p,{children:[(0,o.jsx)(t.a,{href:"https://www.meetup.com/pro/polkadot",children:"Polkadot Meetup Platform"})," - Information on hosting meetups,\napplying for funding, and materials for running it."]}),"\n",(0,o.jsxs)(t.p,{children:[(0,o.jsx)(t.a,{href:"https://web3foundation.notion.site/Community-Events-Introduction-05199fe6556b41f48a3390b1868c9ae7",children:"Community Events"})," -\nInformation on events funded by the ",(0,o.jsx)(t.a,{href:"https://polkadot.polkassembly.io/bounty/17",children:"Treasury"})," and\norganized by the Polkadot community (candidates or ambassadors) focused on promoting Polkadot,\nKusama, and related technologies. The events are educational and informative, and their goal is to\ncreate an impact in the community."]}),"\n",(0,o.jsx)(t.h2,{id:"matrix-chats",children:"Matrix Chats"}),"\n",(0,o.jsxs)(t.p,{children:["We primarily use ",(0,o.jsx)(t.a,{href:"https://matrix.org",children:"Matrix"})," across the organization and to communicate with\ncommunity members. The application we use most often to interact with the Matrix protocol is the\n",(0,o.jsx)(t.a,{href:"https://app.element.io",children:"Element"})," messenger client."]}),"\n",(0,o.jsxs)(r.A,{groupId:"clients",values:[{label:"Polkadot",value:"polkadot"},{label:"Kusama",value:"kusama"},{label:"Technical",value:"technical"}],children:[(0,o.jsxs)(i.A,{value:"polkadot",children:[(0,o.jsx)("p",{children:(0,o.jsxs)(t.p,{children:[(0,o.jsx)("a",{href:"https://matrix.to/#/#polkadot:web3.foundation",children:(0,o.jsx)("strong",{children:"Polkadot Space"})})," - Space containing all official\nrooms below. Note that this is a newer feature and may not be supported by your Matrix client. If\nyou face any issues, join the rooms individually."]})}),(0,o.jsxs)("ul",{children:[(0,o.jsx)("li",{children:(0,o.jsxs)(t.p,{children:[(0,o.jsx)("a",{href:"https://matrix.to/#/#polkadot-watercooler:parity.io",children:"Polkadot Watercooler"})," - General room for talk about Polkadot."]})}),(0,o.jsx)("li",{children:(0,o.jsxs)(t.p,{children:[(0,o.jsx)("a",{href:"https://matrix.to/#/#polkadotvalidatorlounge:web3.foundation",children:"Polkadot Validator Lounge"})," - Room for validators learning about setting up a node."]})}),(0,o.jsx)("li",{children:(0,o.jsxs)(t.p,{children:[(0,o.jsx)("a",{href:"https://matrix.to/#/#Polkadot-Direction:parity.io",children:"Polkadot Direction"})," - Governance, and a place to discuss the future of Polkadot."]})}),(0,o.jsx)("li",{children:(0,o.jsxs)(t.p,{children:[(0,o.jsx)("a",{href:"https://matrix.to/#/#dailydigest:web3.foundation",children:"Polkadot Digest"})," - News about what is happening in the Polkadot ecosystem, published every weekday except holidays."]})}),(0,o.jsx)("li",{children:(0,o.jsxs)(t.p,{children:[(0,o.jsx)("a",{href:"https://matrix.to/#/#polkadotwikipublic:web3.foundation",children:"Polkadot Wiki"})," - The official matrix room about the Polkadot Wiki."]})})]})]}),(0,o.jsxs)(i.A,{value:"kusama",children:[(0,o.jsx)("p",{children:(0,o.jsxs)(t.p,{children:[(0,o.jsx)("a",{href:"https://matrix.to/#/#kusama:web3.foundation",children:(0,o.jsx)("strong",{children:"Kusama Space"})})," - Space containing all official\nrooms below. Note that this is a newer feature and may not be supported by your Matrix client. If\nyou face any issues, join the rooms individually."]})}),(0,o.jsxs)("ul",{children:[(0,o.jsx)("li",{children:(0,o.jsxs)(t.p,{children:[(0,o.jsx)("a",{href:"https://matrix.to/#/#kusamawatercooler:web3.foundation",children:"Kusama Watercooler"})," - General room for talk about Kusama."]})}),(0,o.jsx)("li",{children:(0,o.jsxs)(t.p,{children:[(0,o.jsx)("a",{href:"https://matrix.to/#/#KusamaValidatorLounge:parity.io",children:"Kusama Validator Lounge"})," - Room for validators learning about setting up a node."]})}),(0,o.jsx)("li",{children:(0,o.jsxs)(t.p,{children:[(0,o.jsx)("a",{href:"https://matrix.to/#/#Kusama-Direction:parity.io",children:"Kusama Direction"})," - Governance, and a place to discuss the future of Kusama."]})})]})]}),(0,o.jsx)(i.A,{value:"technical",children:(0,o.jsxs)("ul",{children:[(0,o.jsx)("li",{children:(0,o.jsxs)(t.p,{children:[(0,o.jsx)("a",{href:"https://matrix.to/#/#substratedevs:matrix.org",children:"Substrate Developers Chat"})," - A Matrix chat room for Substrate development."]})}),(0,o.jsx)("li",{children:(0,o.jsxs)(t.p,{children:[(0,o.jsx)("a",{href:"https://t.me/substratedevs",children:"Substrate Developers Telegram Chat"})," - A Telegram chat room for Substrate development, bridged to Matrix Substrate Developers Chat linked above."]})}),(0,o.jsx)("li",{children:(0,o.jsxs)(t.p,{children:[(0,o.jsx)("a",{href:"https://substrate.stackexchange.com/",children:"Substrate and Polkadot StackExchange"})," - More advanced room for technical questions on building with Substrate."]})}),(0,o.jsx)("li",{children:(0,o.jsxs)(t.p,{children:[(0,o.jsx)("a",{href:"https://matrix.to/#/#ink:parity.io",children:"Smart Contracts & Parity Ink!"})," - A room to discuss developing Substrate smart contracts using Parity Ink!"]})})]})})]}),"\n",(0,o.jsx)(t.h2,{id:"socials",children:"Socials"}),"\n",(0,o.jsx)(t.h3,{id:"chat",children:"Chat"}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.a,{href:"https://dot.li/discord",children:"Polkadot Discord"})," (RECOMMENDED)"]}),"\n",(0,o.jsx)(t.li,{children:(0,o.jsx)(t.a,{href:"https://kusa.ma/discord",children:"Kusama Discord"})}),"\n"]}),"\n",(0,o.jsx)(t.h3,{id:"social-media",children:"Social media"}),"\n",(0,o.jsxs)(r.A,{groupId:"socials",values:[{label:"Web3 Foundation",value:"w3f"},{label:"Polkadot",value:"polkadot"},{label:"Kusama",value:"kusama"}],children:[(0,o.jsx)(i.A,{value:"w3f",children:(0,o.jsxs)("ul",{children:[(0,o.jsx)("li",{children:(0,o.jsx)("a",{href:"https://twitter.com/web3foundation",children:"Web3 Foundation Twitter"})}),(0,o.jsx)("li",{children:(0,o.jsx)("a",{href:"https://www.youtube.com/channel/UClnw_bcNg4CAzF772qEtq4g",children:"Web3 Foundation YouTube"})})]})}),(0,o.jsx)(i.A,{value:"polkadot",children:(0,o.jsxs)("ul",{children:[(0,o.jsx)("li",{children:(0,o.jsx)("a",{href:"https://twitter.com/Polkadot",children:"Polkadot Twitter"})}),(0,o.jsx)("li",{children:(0,o.jsx)("a",{href:"https://www.reddit.com/r/polkadot",children:"Polkadot Reddit"})}),(0,o.jsx)("li",{children:(0,o.jsx)("a",{href:"https://www.youtube.com/channel/UCB7PbjuZLEba_znc7mEGNgw",children:"Polkadot YouTube"})})]})}),(0,o.jsx)(i.A,{value:"kusama",children:(0,o.jsxs)("ul",{children:[(0,o.jsx)("li",{children:(0,o.jsx)("a",{href:"https://twitter.com/kusamanetwork",children:"Kusama Twitter"})}),(0,o.jsx)("li",{children:(0,o.jsx)("a",{href:"https://www.reddit.com/r/Kusama",children:"Kusama Reddit"})}),(0,o.jsx)("li",{children:(0,o.jsx)("a",{href:"http://youtube.com/c/kusamanetwork",children:"Kusama YouTube Channel"})})]})})]}),"\n",(0,o.jsx)(t.h3,{id:"blogs-and-tutorials",children:"Blogs and tutorials"}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsx)(t.li,{children:(0,o.jsx)(t.a,{href:"https://medium.com/@web3",children:"Web3 Medium Blog"})}),"\n",(0,o.jsx)(t.li,{children:(0,o.jsx)(t.a,{href:"https://polkadot.network/blog/",children:"Polkadot Blog"})}),"\n",(0,o.jsx)(t.li,{children:(0,o.jsx)(t.a,{href:"https://medium.com/@gavofyork",children:"Gavin Wood's Medium Blog"})}),"\n",(0,o.jsx)(t.li,{children:(0,o.jsx)(t.a,{href:"https://newsletter.dotleap.com/",children:"Dotleap.com Newsletter"})}),"\n"]}),"\n",(0,o.jsx)(t.h3,{id:"newsletters",children:"Newsletters"}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.a,{href:"https://share.hsforms.com/1LL1CBwiASxC5pJUYZAiDVw4752a",children:"Subscribe to the Polkadot newsletter"})," -\nofficial, infrequent"]}),"\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.a,{href:"https://dotleap.substack.com/",children:"Dot Leap Newsletter"})," - less official, weekly"]}),"\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.a,{href:"https://news.nft.review",children:"NFT Review"})," - Covering the evolution of the NFT ecosystem on Kusama"]}),"\n"]}),"\n",(0,o.jsx)(t.h2,{id:"ecosystem",children:"Ecosystem"}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.a,{href:"https://dotinsights.subwallet.app/",children:"Polkadot & Kusama Ecosystem Map"})," - Comprehensive list of\nprojects building in the ecosystem made by SubWallet with support from Parity Technologies."]}),"\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.a,{href:"https://dotinsights.subwallet.app/polkadot-report-q4-2022-en/",children:"Polkadot Deep Dive Quarterly Report"})," -\nA quarterly report series that dives deep into the growth of the whole ecosystem. Made by\nSubWallet with sections focused on Ecosystem Overview, DeFi, ",(0,o.jsx)(t.a,{href:"/docs/learn-nft",children:"NFT"})," &\n",(0,o.jsx)(t.a,{href:"/docs/web3-and-polkadot",children:"Web3"}),"."]}),"\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.a,{href:"/docs/build-open-source",children:"Polkadot Stack"})," - if you're interested in seeing what's under\ndevelopment and where there's room for your contributions."]}),"\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.a,{href:"https://polkaproject.com/",children:"Teams Building on Polkadot"})," - Community maintained list of teams\nbuilding on Polkadot and/or Substrate. (Note that this may contain inaccuracies, as it's\nunofficial)."]}),"\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.a,{href:"https://polkadot.getro.com/jobs",children:"Jobs in Polkadot Ecosystem"})," - Join the Polkadot Talent Network."]}),"\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.a,{href:"https://polkadot.network/development/blockchain-academy/",children:"Polkadot Blockchain Academy"})," - a\nclassroom-based educational program covering the conceptual underpinnings and the hands-on\napplication of blockchain technology, using Polkadot and Substrate as its foundations."]}),"\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.a,{href:"https://airlyft.one/communities?ecosystem=POLKADOT",children:"Polkadot Communities and Campaigns by AirLyft One"})," -\nDiscover thriving communities and participate in engaging campaigns."]}),"\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.a,{href:"https://dotappstore.com/",children:"DotAppStore"})," - Discover featured projects and apps upvoted by the\nPolkadot community."]}),"\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.a,{href:"https://github.com/haquefardeen/awesome-dot",children:"Awesome Dot"})," - community curated resources,\nprojects, and learning material about the Polkadot and Kusama ecosystems."]}),"\n"]})]})}function m(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(h,{...e})}):h(e)}},19365:(e,t,n)=>{n.d(t,{A:()=>r});n(96540);var a=n(34164);const o={tabItem:"tabItem_Ymn6"};var s=n(74848);function r(e){var t=e.children,n=e.hidden,r=e.className;return(0,s.jsx)("div",{role:"tabpanel",className:(0,a.A)(o.tabItem,r),hidden:n,children:t})}},11470:(e,t,n)=>{n.d(t,{A:()=>g});var a=n(96540),o=n(34164),s=n(23104),r=n(56347),i=n(205),l=n(57485),d=n(31682),c=n(75376);function u(e){var t,n;return null!=(t=null==(n=a.Children.toArray(e).filter((function(e){return"\n"!==e})).map((function(e){if(!e||(0,a.isValidElement)(e)&&((t=e.props)&&"object"==typeof t&&"value"in t))return e;var t;throw new Error("Docusaurus error: Bad child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:n.filter(Boolean))?t:[]}function h(e){var t=e.values,n=e.children;return(0,a.useMemo)((function(){var e=null!=t?t:function(e){return u(e).map((function(e){var t=e.props;return{value:t.value,label:t.label,attributes:t.attributes,default:t.default}}))}(n);return function(e){var t=(0,d.XI)(e,(function(e,t){return e.value===t.value}));if(t.length>0)throw new Error('Docusaurus error: Duplicate values "'+t.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[t,n])}function m(e){var t=e.value;return e.tabValues.some((function(e){return e.value===t}))}function p(e){var t=e.queryString,n=void 0!==t&&t,o=e.groupId,s=(0,r.W6)(),i=function(e){var t=e.queryString,n=void 0!==t&&t,a=e.groupId;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=a?a:null}({queryString:n,groupId:o});return[(0,l.aZ)(i),(0,a.useCallback)((function(e){if(i){var t=new URLSearchParams(s.location.search);t.set(i,e),s.replace(Object.assign({},s.location,{search:t.toString()}))}}),[i,s])]}function f(e){var t,n,o,s,r=e.defaultValue,l=e.queryString,d=void 0!==l&&l,u=e.groupId,f=h(e),x=(0,a.useState)((function(){return function(e){var t,n=e.defaultValue,a=e.tabValues;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!m({value:n,tabValues:a}))throw new Error('Docusaurus error: The has a defaultValue "'+n+'" but none of its children has the corresponding value. Available values are: '+a.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return n}var o=null!=(t=a.find((function(e){return e.default})))?t:a[0];if(!o)throw new Error("Unexpected error: 0 tabValues");return o.value}({defaultValue:r,tabValues:f})})),b=x[0],j=x[1],v=p({queryString:d,groupId:u}),k=v[0],y=v[1],g=(t=function(e){return e?"docusaurus.tab."+e:null}({groupId:u}.groupId),n=(0,c.Dv)(t),o=n[0],s=n[1],[o,(0,a.useCallback)((function(e){t&&s.set(e)}),[t,s])]),w=g[0],P=g[1],C=function(){var e=null!=k?k:w;return m({value:e,tabValues:f})?e:null}();return(0,i.A)((function(){C&&j(C)}),[C]),{selectedValue:b,selectValue:(0,a.useCallback)((function(e){if(!m({value:e,tabValues:f}))throw new Error("Can't select invalid tab value="+e);j(e),y(e),P(e)}),[y,P,f]),tabValues:f}}var x=n(92303);const b={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var j=n(74848);function v(e){var t=e.className,n=e.block,a=e.selectedValue,r=e.selectValue,i=e.tabValues,l=[],d=(0,s.a_)().blockElementScrollPositionUntilNextRender,c=function(e){var t=e.currentTarget,n=l.indexOf(t),o=i[n].value;o!==a&&(d(t),r(o))},u=function(e){var t,n=null;switch(e.key){case"Enter":c(e);break;case"ArrowRight":var a,o=l.indexOf(e.currentTarget)+1;n=null!=(a=l[o])?a:l[0];break;case"ArrowLeft":var s,r=l.indexOf(e.currentTarget)-1;n=null!=(s=l[r])?s:l[l.length-1]}null==(t=n)||t.focus()};return(0,j.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,o.A)("tabs",{"tabs--block":n},t),children:i.map((function(e){var t=e.value,n=e.label,s=e.attributes;return(0,j.jsx)("li",Object.assign({role:"tab",tabIndex:a===t?0:-1,"aria-selected":a===t,ref:function(e){return l.push(e)},onKeyDown:u,onClick:c},s,{className:(0,o.A)("tabs__item",b.tabItem,null==s?void 0:s.className,{"tabs__item--active":a===t}),children:null!=n?n:t}),t)}))})}function k(e){var t=e.lazy,n=e.children,s=e.selectedValue,r=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){var i=r.find((function(e){return e.props.value===s}));return i?(0,a.cloneElement)(i,{className:(0,o.A)("margin-top--md",i.props.className)}):null}return(0,j.jsx)("div",{className:"margin-top--md",children:r.map((function(e,t){return(0,a.cloneElement)(e,{key:t,hidden:e.props.value!==s})}))})}function y(e){var t=f(e);return(0,j.jsxs)("div",{className:(0,o.A)("tabs-container",b.tabList),children:[(0,j.jsx)(v,Object.assign({},t,e)),(0,j.jsx)(k,Object.assign({},t,e))]})}function g(e){var t=(0,x.A)();return(0,j.jsx)(y,Object.assign({},e,{children:u(e.children)}),String(t))}},28453:(e,t,n)=>{n.d(t,{R:()=>r,x:()=>i});var a=n(96540);const o={},s=a.createContext(o);function r(e){const t=a.useContext(s);return a.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:r(e.components),a.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/ed3409b3.610e23bb.js b/assets/js/ed3409b3.610e23bb.js new file mode 100644 index 000000000000..62ad94e9706a --- /dev/null +++ b/assets/js/ed3409b3.610e23bb.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4117],{8575:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>d,default:()=>h,frontMatter:()=>r,metadata:()=>o,toc:()=>u});const o=JSON.parse('{"id":"learn/learn-guides-bounties","title":"Polkadot-JS Guides about Bounties","description":"Polkadot-JS Guides for Bounties","source":"@site/../docs/learn/learn-guides-bounties.md","sourceDirName":"learn","slug":"/learn-guides-bounties","permalink":"/docs/learn-guides-bounties","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-bounties.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1729847256000,"frontMatter":{"id":"learn-guides-bounties","title":"Polkadot-JS Guides about Bounties","sidebar_label":"Bounty Guides","description":"Polkadot-JS Guides for Bounties","keyword":["treasury","bounties","guides","child bounty","polkadot-js"],"slug":"../learn-guides-bounties"},"sidebar":"docs","previous":{"title":"Treasury Guides","permalink":"/docs/learn-guides-treasury"},"next":{"title":"Identity Guides","permalink":"/docs/learn-guides-identity"}}');var s=n(74848),a=n(28453),i=n(67141);const r={id:"learn-guides-bounties",title:"Polkadot-JS Guides about Bounties",sidebar_label:"Bounty Guides",description:"Polkadot-JS Guides for Bounties",keyword:["treasury","bounties","guides","child bounty","polkadot-js"],slug:"../learn-guides-bounties"},d=void 0,l={},u=[{value:"Submit a Bounty Proposal",id:"submit-a-bounty-proposal",level:2},{value:"Assign a Curator to a Bounty",id:"assign-a-curator-to-a-bounty",level:2},{value:"Create and Award Child Bounties",id:"create-and-award-child-bounties",level:2},{value:"Claim a Child Bounty Reward",id:"claim-a-child-bounty-reward",level:2},{value:"Close Child Bounties",id:"close-child-bounties",level:2},{value:"Refill Parent Bounties",id:"refill-parent-bounties",level:2}];function c(e){const t={a:"a",admonition:"admonition",code:"code",h2:"h2",img:"img",p:"p",...(0,a.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(i.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the Polkadot-JS UI, you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,s.jsxs)(t.p,{children:["See ",(0,s.jsx)(t.a,{href:"/docs/learn-polkadot-opengov-treasury#bounties",children:"this page"})," to learn about Bounties."]}),"\n",(0,s.jsx)(t.admonition,{title:"Notify the Polkadot Direction Channel",type:"info",children:(0,s.jsxs)(t.p,{children:["Remember always to notify the\n",(0,s.jsx)(t.a,{href:"https://matrix.to/#/#Polkadot-Direction:parity.io",children:"Polkadot Direction Element Channel"})," about\n",(0,s.jsx)(t.a,{href:"/docs/learn-polkadot-opengov#referenda",children:"OpenGov referenda"})," so that the community can start reviewing\nthem and voting on them."]})}),"\n",(0,s.jsx)(t.h2,{id:"submit-a-bounty-proposal",children:"Submit a Bounty Proposal"}),"\n",(0,s.jsx)(t.admonition,{title:"Step-by-step written tutorial",type:"info",children:(0,s.jsxs)(t.p,{children:["See\n",(0,s.jsx)(t.a,{href:"https://scribehow.com/shared/How_to_Submit_a_Bounty_Proposal_on_Polkadotjs_Apps__Ps_zfmNXRbm6PuZaj28JBQ",children:"this written tutorial"}),"\nto learn more about how to submit a bounty proposal."]})}),"\n",(0,s.jsx)(t.p,{children:"See the video tutorial below to learn how you can create a bounty and submit it for approval through\nan OpenGov referendum."}),"\n",(0,s.jsxs)("div",{className:"row",children:[(0,s.jsxs)("div",{className:"col text--center",children:[(0,s.jsx)("a",{href:"https://youtu.be/Qv_nJVcvQr8?t=52",children:(0,s.jsx)("img",{src:"https://img.youtube.com/vi/Qv_nJVcvQr8/0.jpg",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,s.jsx)("p",{children:(0,s.jsx)("a",{href:"https://youtu.be/Qv_nJVcvQr8?t=52",children:"Introduction to Bounties"})})]}),(0,s.jsxs)("div",{className:"col text--center",children:[(0,s.jsx)("a",{href:"https://www.youtube.com/watch?v=8Cft1-8RWmk",children:(0,s.jsx)("img",{src:"https://img.youtube.com/vi/8Cft1-8RWmk/0.jpg",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,s.jsx)("p",{children:(0,s.jsx)("a",{href:"https://www.youtube.com/watch?v=8Cft1-8RWmk",children:"Submit a Bounty"})})]})]}),"\n",(0,s.jsxs)(t.p,{children:['When you add a bounty, this will show as "proposed" in the main\n',(0,s.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/bounties",children:"Bounties page"}),'. Once the community approves your bounty\nproposal as an OpenGov referendum, the bounty will show as "funded" at the end of the\n',(0,s.jsx)(t.a,{href:"/docs/glossary#spend-period",children:"spending period"})," on the main\n",(0,s.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/bounties",children:"Bounties page"}),". You can then proceed with assigning\ncurators to the bounty."]}),"\n",(0,s.jsxs)(t.p,{children:["To minimize storage on chain in the same way as any proposal, bounties don't contain contextual\ninformation. When a user submits a bounty spending proposal, they will need to find an off-chain\nmedium to explain the proposal, for example a bounty proposal document on\n",(0,s.jsx)(t.a,{href:"https://polkadot.polkassembly.io/opengov",children:"Polkassembly"})," or\n",(0,s.jsx)(t.a,{href:"https://polkadot.subsquare.io/",children:"Subsquare"}),".\n",(0,s.jsx)(t.a,{href:"https://docs.google.com/document/d/1-IBz_owspV5OcvezWXpksWDQReWowschD0TFuaVKKcU/edit?usp=sharing",children:"This template"}),"\ncan be used to submit all the information needed by OpenGov voters to make an informed decision."]}),"\n",(0,s.jsxs)(t.p,{children:["Submitting a bounty proposal will require a\n",(0,s.jsx)(t.a,{href:"/docs/chain-state-values#bounty-deposit",children:"deposit"}),"."]}),"\n",(0,s.jsx)(t.h2,{id:"assign-a-curator-to-a-bounty",children:"Assign a Curator to a Bounty"}),"\n",(0,s.jsx)(t.admonition,{title:"Step-by-step written tutorial",type:"info",children:(0,s.jsxs)(t.p,{children:["See\n",(0,s.jsx)(t.a,{href:"https://scribehow.com/shared/How_to_Assign_a_Curator_to_a_Bounty_on_Polkadotjs_Apps__JgK3eSfXQdm_PSvtz8TelQ",children:"this written tutorial"}),"\nto learn more about how to assign a curator to a bounty."]})}),"\n",(0,s.jsxs)(t.p,{children:['Once your bounty is shown as "funded" on the main\n',(0,s.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/bounties",children:"Bounties page"}),", you can propose a bounty curator. The\nreferendum must be submitted on the same track used for proposing the bounty or a track with a\nhigher spending limit\n(",(0,s.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/22e90b1c11509f1f13083f1ac6c5f028f54432e7/substrate/frame/bounties/src/lib.rs#L412",children:"see the code snippet"}),").\nFor example, if the bounty was submitted to the Medium Spender Track, the curator must be proposed\nusing the same track or the Big Spender or Treasurer tracks. See the video tutorial below to learn\nhow you can add a curator to a bounty and submit it for approval through an OpenGov referendum."]}),"\n",(0,s.jsx)("div",{className:"row",children:(0,s.jsxs)("div",{className:"col text--center",children:[(0,s.jsx)("a",{href:"https://www.youtube.com/watch?v=TM7vk3oP9IA",children:(0,s.jsx)("img",{src:"https://img.youtube.com/vi/TM7vk3oP9IA/0.jpg",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,s.jsx)("p",{children:(0,s.jsx)("a",{href:"https://www.youtube.com/watch?v=TM7vk3oP9IA",children:"Assign Curator to a Bounty"})})]})}),"\n",(0,s.jsxs)(t.p,{children:["Once your OpenGov referendum has been approved by the community and served the required\n",(0,s.jsx)(t.a,{href:"/docs/glossary#spend-period",children:"spending period"}),', the bounty will still show as "funded" on\nthe main ',(0,s.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/bounties",children:"Bounties page"})," and await the curator's\nacceptance. The curator must formally accept the curator role by signing a ",(0,s.jsx)(t.code,{children:"bounties.acceptCurator"}),"\nextrinsic. More information about when to do this can be found on the main\n",(0,s.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/bounties",children:"Bounties page"}),'. Only after the curators claim their\ncandidacy the bounty will show as "active" on the main Bounty page.']}),"\n",(0,s.jsxs)(t.admonition,{title:"Curator assignment call must be executed after bounty is funded",type:"info",children:[(0,s.jsx)(t.p,{children:"Curator assignment must take place after the bounty has been funded, and approved bounties are\nfunded after a spend period has been completed. A curator assignment referendum cannot be executed\nduring the same spend period when the bounty is funded."}),(0,s.jsxs)(t.p,{children:["If your bounty has been awarded but is not funded yet, you need to make sure that the curator\nassignment referendum gets enacted in the subsequent spending period (you can set a delay in\n",(0,s.jsx)(t.a,{href:"/docs/learn-guides-polkadot-opengov#submitting-a-proposal",children:"Polkadot-JS"})," when you submit the proposal\nduring the current spend period)."]})]}),"\n",(0,s.jsx)(t.h2,{id:"create-and-award-child-bounties",children:"Create and Award Child Bounties"}),"\n",(0,s.jsx)(t.admonition,{title:"Step-by-step written tutorial",type:"info",children:(0,s.jsxs)(t.p,{children:["See\n",(0,s.jsx)(t.a,{href:"https://scribehow.com/shared/How_to_Create_and_Award_a_Child_Bounty__Q-YFGkYAR3WxMnvYGHiU3Q",children:"this written tutorial"}),"\nto learn more about how to create and award child bounties."]})}),"\n",(0,s.jsx)(t.admonition,{title:"Remember to add contextual information about child bounties",type:"info",children:(0,s.jsxs)(t.p,{children:["When you add child bounties, please add contextual information on the governance forums\n",(0,s.jsx)(t.a,{href:"https://polkassembly.io/",children:"Polkassembly"})," or ",(0,s.jsx)(t.a,{href:"https://polkadot.subsquare.io/",children:"Subsquare"}),"."]})}),"\n",(0,s.jsx)(t.p,{children:"See the video tutorial below to learn how to create a child bounty, assign a curator, and award a\nchild bounty."}),"\n",(0,s.jsx)(t.p,{children:"The video will show how to create and award a child bounty using a batch call. We will also include\nproposing and approving curator candidacy for the child bounty. The calls can be executed\nseparately, depending on the process curators consider appropriate for their bounty."}),"\n",(0,s.jsx)("div",{className:"row",children:(0,s.jsxs)("div",{className:"col text--center",children:[(0,s.jsx)("a",{href:"https://www.youtube.com/watch?v=mLpvx0OQoyM",children:(0,s.jsx)("img",{src:"https://img.youtube.com/vi/mLpvx0OQoyM/0.jpg",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,s.jsx)("p",{children:(0,s.jsx)("a",{href:"https://www.youtube.com/watch?v=mLpvx0OQoyM",children:"Create and Award Child Bounties"})})]})}),"\n",(0,s.jsx)(t.p,{children:"Once a child bounty is awarded, awardees can claim the child bounty."}),"\n",(0,s.jsx)(t.h2,{id:"claim-a-child-bounty-reward",children:"Claim a Child Bounty Reward"}),"\n",(0,s.jsx)(t.admonition,{title:"Step-by-step written tutorial",type:"info",children:(0,s.jsxs)(t.p,{children:["See\n",(0,s.jsx)(t.a,{href:"https://scribehow.com/shared/How_to_claim_a_Child_Bounty_reward_on_Polkadotjs__t3V7NDUjQlus40EUjc-5Kw",children:"this written tutorial"}),"\nto learn more about how to claim a child bounty reward."]})}),"\n",(0,s.jsxs)(t.p,{children:["The status of child bounties can be viewed on the\n",(0,s.jsx)(t.a,{href:"https://polkadot.polkassembly.io/bounties",children:"Polkassembly Bounty page"}),' under the specific parent\nbounty. A child bounty status can be "Added", "Awarded", or "Claimed". For example, the parent\nbounty 17 refers to the Community Events Bounty, which has 183 child bounties.']}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{alt:"polkassembly-child-bounties",src:n(98445).A+"",width:"2408",height:"1053"})}),"\n",(0,s.jsx)(t.p,{children:"After the child bounty has been rewarded, follow the guidelines in the video tutorial below to learn\nhow to claim a child bounty reward. Note that the extrinsic to claim the child bounty reward is\npermissionless, and anyone can initiate the claim on behalf of the beneficiary."}),"\n",(0,s.jsx)("div",{className:"row",children:(0,s.jsxs)("div",{className:"col text--center",children:[(0,s.jsx)("a",{href:"https://www.youtube.com/watch?v=db82aHgy23c",children:(0,s.jsx)("img",{src:"https://img.youtube.com/vi/db82aHgy23c/0.jpg",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,s.jsx)("p",{children:(0,s.jsx)("a",{href:"https://www.youtube.com/watch?v=db82aHgy23c",children:"Claim Child Bounty Reward"})})]})}),"\n",(0,s.jsx)(t.h2,{id:"close-child-bounties",children:"Close Child Bounties"}),"\n",(0,s.jsxs)(t.p,{children:["Child bounties can be closed without awarding them. To close a child bounty, you must submit a\n",(0,s.jsx)(t.code,{children:"childBounties.closeChild.Bounty"})," extrinsic, specifying the parent bounty and child bounty IDs. Only\nthe parent bounty curator can sign this transaction, resulting in the child bounty\u2019s curator deposit\nbeing returned."]}),"\n",(0,s.jsx)(t.p,{children:"See the video tutorial below to learn how to close a child bounty."}),"\n",(0,s.jsx)("div",{className:"row",children:(0,s.jsxs)("div",{className:"col text--center",children:[(0,s.jsx)("a",{href:"https://www.youtube.com/watch?v=Qv_nJVcvQr8&t=2109s",children:(0,s.jsx)("img",{src:"https://img.youtube.com/vi/Qv_nJVcvQr8/0.jpg",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,s.jsx)("p",{children:(0,s.jsx)("a",{href:"https://www.youtube.com/watch?v=Qv_nJVcvQr8&t=2109s",children:"Close a Child Bounty"})})]})}),"\n",(0,s.jsxs)(t.p,{children:["If the child bounty curator acts maliciously, the parent bounty curator can submit a\n",(0,s.jsx)(t.code,{children:"childBounties.unassignCurator"})," that slashes the curator's deposit."]}),"\n",(0,s.jsx)(t.h2,{id:"refill-parent-bounties",children:"Refill Parent Bounties"}),"\n",(0,s.jsxs)(t.p,{children:["To refill a parent bounty,\n",(0,s.jsx)(t.a,{href:"/docs/learn-guides-polkadot-opengov#submitting-a-preimage",children:"an OpenGov referendum must be submitted"}),"."]}),"\n",(0,s.jsxs)(t.p,{children:["The preimage must contain a ",(0,s.jsx)(t.code,{children:"treasury.spendLocal"})," extrinsic specifying the amount of tokens to be\nsent from the treasury to the receiver's address, in this case the\n",(0,s.jsx)(t.a,{href:"/docs/learn-account-advanced#system-accounts",children:"system account"})," of the\n",(0,s.jsx)(t.a,{href:"/docs/learn-polkadot-opengov-treasury#bounties",children:"parent bounty"}),"."]}),"\n",(0,s.jsxs)(t.p,{children:["To get the bounty system account of a parent bounty, go to\n",(0,s.jsx)(t.a,{href:"https://polkadot.subsquare.io/treasury/bounties",children:"Subsquare"}),", search for the bounty name, and the\naddress will be shown under Metadata."]})]})}function h(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(c,{...e})}):c(e)}},67141:(e,t,n)=>{n.d(t,{A:()=>a});var o=n(96540),s=n(74848);const a=function(e){var t,n=e.message,a=(0,o.useState)(!0),i=a[0],r=a[1];return(0,s.jsx)(s.Fragment,{children:i&&(0,s.jsxs)("div",{className:"message-box",children:[(0,s.jsx)("button",{className:"close-button",onClick:function(){r(!1)},children:"\u2716 "}),(0,s.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(t=n,t.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},98445:(e,t,n)=>{n.d(t,{A:()=>o});const o=n.p+"assets/images/polkassembly-child-bounties-fde994e770f3e109a07752068aa417b1.png"},28453:(e,t,n)=>{n.d(t,{R:()=>i,x:()=>r});var o=n(96540);const s={},a=o.createContext(s);function i(e){const t=o.useContext(a);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),o.createElement(a.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/ed3409b3.aa23e07b.js b/assets/js/ed3409b3.aa23e07b.js deleted file mode 100644 index 056ed10fe003..000000000000 --- a/assets/js/ed3409b3.aa23e07b.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4117],{1448:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>r,default:()=>h,frontMatter:()=>i,metadata:()=>d,toc:()=>u});var o=n(74848),s=n(28453),a=n(67141);const i={id:"learn-guides-bounties",title:"Polkadot-JS Guides about Bounties",sidebar_label:"Bounty Guides",description:"Polkadot-JS Guides for Bounties",keyword:["treasury","bounties","guides","child bounty","polkadot-js"],slug:"../learn-guides-bounties"},r=void 0,d={id:"learn/learn-guides-bounties",title:"Polkadot-JS Guides about Bounties",description:"Polkadot-JS Guides for Bounties",source:"@site/../docs/learn/learn-guides-bounties.md",sourceDirName:"learn",slug:"/learn-guides-bounties",permalink:"/docs/learn-guides-bounties",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-bounties.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1729847256e3,frontMatter:{id:"learn-guides-bounties",title:"Polkadot-JS Guides about Bounties",sidebar_label:"Bounty Guides",description:"Polkadot-JS Guides for Bounties",keyword:["treasury","bounties","guides","child bounty","polkadot-js"],slug:"../learn-guides-bounties"},sidebar:"docs",previous:{title:"Treasury Guides",permalink:"/docs/learn-guides-treasury"},next:{title:"Identity Guides",permalink:"/docs/learn-guides-identity"}},l={},u=[{value:"Submit a Bounty Proposal",id:"submit-a-bounty-proposal",level:2},{value:"Assign a Curator to a Bounty",id:"assign-a-curator-to-a-bounty",level:2},{value:"Create and Award Child Bounties",id:"create-and-award-child-bounties",level:2},{value:"Claim a Child Bounty Reward",id:"claim-a-child-bounty-reward",level:2},{value:"Close Child Bounties",id:"close-child-bounties",level:2},{value:"Refill Parent Bounties",id:"refill-parent-bounties",level:2}];function c(e){const t={a:"a",admonition:"admonition",code:"code",h2:"h2",img:"img",p:"p",...(0,s.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(a.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the Polkadot-JS UI, you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,o.jsxs)(t.p,{children:["See ",(0,o.jsx)(t.a,{href:"/docs/learn-polkadot-opengov-treasury#bounties",children:"this page"})," to learn about Bounties."]}),"\n",(0,o.jsx)(t.admonition,{title:"Notify the Polkadot Direction Channel",type:"info",children:(0,o.jsxs)(t.p,{children:["Remember always to notify the\n",(0,o.jsx)(t.a,{href:"https://matrix.to/#/#Polkadot-Direction:parity.io",children:"Polkadot Direction Element Channel"})," about\n",(0,o.jsx)(t.a,{href:"/docs/learn-polkadot-opengov#referenda",children:"OpenGov referenda"})," so that the community can start reviewing\nthem and voting on them."]})}),"\n",(0,o.jsx)(t.h2,{id:"submit-a-bounty-proposal",children:"Submit a Bounty Proposal"}),"\n",(0,o.jsx)(t.admonition,{title:"Step-by-step written tutorial",type:"info",children:(0,o.jsxs)(t.p,{children:["See\n",(0,o.jsx)(t.a,{href:"https://scribehow.com/shared/How_to_Submit_a_Bounty_Proposal_on_Polkadotjs_Apps__Ps_zfmNXRbm6PuZaj28JBQ",children:"this written tutorial"}),"\nto learn more about how to submit a bounty proposal."]})}),"\n",(0,o.jsx)(t.p,{children:"See the video tutorial below to learn how you can create a bounty and submit it for approval through\nan OpenGov referendum."}),"\n",(0,o.jsxs)("div",{className:"row",children:[(0,o.jsxs)("div",{className:"col text--center",children:[(0,o.jsx)("a",{href:"https://youtu.be/Qv_nJVcvQr8?t=52",children:(0,o.jsx)("img",{src:"https://img.youtube.com/vi/Qv_nJVcvQr8/0.jpg",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,o.jsx)("p",{children:(0,o.jsx)("a",{href:"https://youtu.be/Qv_nJVcvQr8?t=52",children:"Introduction to Bounties"})})]}),(0,o.jsxs)("div",{className:"col text--center",children:[(0,o.jsx)("a",{href:"https://www.youtube.com/watch?v=8Cft1-8RWmk",children:(0,o.jsx)("img",{src:"https://img.youtube.com/vi/8Cft1-8RWmk/0.jpg",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,o.jsx)("p",{children:(0,o.jsx)("a",{href:"https://www.youtube.com/watch?v=8Cft1-8RWmk",children:"Submit a Bounty"})})]})]}),"\n",(0,o.jsxs)(t.p,{children:['When you add a bounty, this will show as "proposed" in the main\n',(0,o.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/bounties",children:"Bounties page"}),'. Once the community approves your bounty\nproposal as an OpenGov referendum, the bounty will show as "funded" at the end of the\n',(0,o.jsx)(t.a,{href:"/docs/glossary#spend-period",children:"spending period"})," on the main\n",(0,o.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/bounties",children:"Bounties page"}),". You can then proceed with assigning\ncurators to the bounty."]}),"\n",(0,o.jsxs)(t.p,{children:["To minimize storage on chain in the same way as any proposal, bounties don't contain contextual\ninformation. When a user submits a bounty spending proposal, they will need to find an off-chain\nmedium to explain the proposal, for example a bounty proposal document on\n",(0,o.jsx)(t.a,{href:"https://polkadot.polkassembly.io/opengov",children:"Polkassembly"})," or\n",(0,o.jsx)(t.a,{href:"https://polkadot.subsquare.io/",children:"Subsquare"}),".\n",(0,o.jsx)(t.a,{href:"https://docs.google.com/document/d/1-IBz_owspV5OcvezWXpksWDQReWowschD0TFuaVKKcU/edit?usp=sharing",children:"This template"}),"\ncan be used to submit all the information needed by OpenGov voters to make an informed decision."]}),"\n",(0,o.jsxs)(t.p,{children:["Submitting a bounty proposal will require a\n",(0,o.jsx)(t.a,{href:"/docs/chain-state-values#bounty-deposit",children:"deposit"}),"."]}),"\n",(0,o.jsx)(t.h2,{id:"assign-a-curator-to-a-bounty",children:"Assign a Curator to a Bounty"}),"\n",(0,o.jsx)(t.admonition,{title:"Step-by-step written tutorial",type:"info",children:(0,o.jsxs)(t.p,{children:["See\n",(0,o.jsx)(t.a,{href:"https://scribehow.com/shared/How_to_Assign_a_Curator_to_a_Bounty_on_Polkadotjs_Apps__JgK3eSfXQdm_PSvtz8TelQ",children:"this written tutorial"}),"\nto learn more about how to assign a curator to a bounty."]})}),"\n",(0,o.jsxs)(t.p,{children:['Once your bounty is shown as "funded" on the main\n',(0,o.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/bounties",children:"Bounties page"}),", you can propose a bounty curator. The\nreferendum must be submitted on the same track used for proposing the bounty or a track with a\nhigher spending limit\n(",(0,o.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/22e90b1c11509f1f13083f1ac6c5f028f54432e7/substrate/frame/bounties/src/lib.rs#L412",children:"see the code snippet"}),").\nFor example, if the bounty was submitted to the Medium Spender Track, the curator must be proposed\nusing the same track or the Big Spender or Treasurer tracks. See the video tutorial below to learn\nhow you can add a curator to a bounty and submit it for approval through an OpenGov referendum."]}),"\n",(0,o.jsx)("div",{className:"row",children:(0,o.jsxs)("div",{className:"col text--center",children:[(0,o.jsx)("a",{href:"https://www.youtube.com/watch?v=TM7vk3oP9IA",children:(0,o.jsx)("img",{src:"https://img.youtube.com/vi/TM7vk3oP9IA/0.jpg",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,o.jsx)("p",{children:(0,o.jsx)("a",{href:"https://www.youtube.com/watch?v=TM7vk3oP9IA",children:"Assign Curator to a Bounty"})})]})}),"\n",(0,o.jsxs)(t.p,{children:["Once your OpenGov referendum has been approved by the community and served the required\n",(0,o.jsx)(t.a,{href:"/docs/glossary#spend-period",children:"spending period"}),', the bounty will still show as "funded" on\nthe main ',(0,o.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/bounties",children:"Bounties page"})," and await the curator's\nacceptance. The curator must formally accept the curator role by signing a ",(0,o.jsx)(t.code,{children:"bounties.acceptCurator"}),"\nextrinsic. More information about when to do this can be found on the main\n",(0,o.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/bounties",children:"Bounties page"}),'. Only after the curators claim their\ncandidacy the bounty will show as "active" on the main Bounty page.']}),"\n",(0,o.jsxs)(t.admonition,{title:"Curator assignment call must be executed after bounty is funded",type:"info",children:[(0,o.jsx)(t.p,{children:"Curator assignment must take place after the bounty has been funded, and approved bounties are\nfunded after a spend period has been completed. A curator assignment referendum cannot be executed\nduring the same spend period when the bounty is funded."}),(0,o.jsxs)(t.p,{children:["If your bounty has been awarded but is not funded yet, you need to make sure that the curator\nassignment referendum gets enacted in the subsequent spending period (you can set a delay in\n",(0,o.jsx)(t.a,{href:"/docs/learn-guides-polkadot-opengov#submitting-a-proposal",children:"Polkadot-JS"})," when you submit the proposal\nduring the current spend period)."]})]}),"\n",(0,o.jsx)(t.h2,{id:"create-and-award-child-bounties",children:"Create and Award Child Bounties"}),"\n",(0,o.jsx)(t.admonition,{title:"Step-by-step written tutorial",type:"info",children:(0,o.jsxs)(t.p,{children:["See\n",(0,o.jsx)(t.a,{href:"https://scribehow.com/shared/How_to_Create_and_Award_a_Child_Bounty__Q-YFGkYAR3WxMnvYGHiU3Q",children:"this written tutorial"}),"\nto learn more about how to create and award child bounties."]})}),"\n",(0,o.jsx)(t.admonition,{title:"Remember to add contextual information about child bounties",type:"info",children:(0,o.jsxs)(t.p,{children:["When you add child bounties, please add contextual information on the governance forums\n",(0,o.jsx)(t.a,{href:"https://polkassembly.io/",children:"Polkassembly"})," or ",(0,o.jsx)(t.a,{href:"https://polkadot.subsquare.io/",children:"Subsquare"}),"."]})}),"\n",(0,o.jsx)(t.p,{children:"See the video tutorial below to learn how to create a child bounty, assign a curator, and award a\nchild bounty."}),"\n",(0,o.jsx)(t.p,{children:"The video will show how to create and award a child bounty using a batch call. We will also include\nproposing and approving curator candidacy for the child bounty. The calls can be executed\nseparately, depending on the process curators consider appropriate for their bounty."}),"\n",(0,o.jsx)("div",{className:"row",children:(0,o.jsxs)("div",{className:"col text--center",children:[(0,o.jsx)("a",{href:"https://www.youtube.com/watch?v=mLpvx0OQoyM",children:(0,o.jsx)("img",{src:"https://img.youtube.com/vi/mLpvx0OQoyM/0.jpg",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,o.jsx)("p",{children:(0,o.jsx)("a",{href:"https://www.youtube.com/watch?v=mLpvx0OQoyM",children:"Create and Award Child Bounties"})})]})}),"\n",(0,o.jsx)(t.p,{children:"Once a child bounty is awarded, awardees can claim the child bounty."}),"\n",(0,o.jsx)(t.h2,{id:"claim-a-child-bounty-reward",children:"Claim a Child Bounty Reward"}),"\n",(0,o.jsx)(t.admonition,{title:"Step-by-step written tutorial",type:"info",children:(0,o.jsxs)(t.p,{children:["See\n",(0,o.jsx)(t.a,{href:"https://scribehow.com/shared/How_to_claim_a_Child_Bounty_reward_on_Polkadotjs__t3V7NDUjQlus40EUjc-5Kw",children:"this written tutorial"}),"\nto learn more about how to claim a child bounty reward."]})}),"\n",(0,o.jsxs)(t.p,{children:["The status of child bounties can be viewed on the\n",(0,o.jsx)(t.a,{href:"https://polkadot.polkassembly.io/bounties",children:"Polkassembly Bounty page"}),' under the specific parent\nbounty. A child bounty status can be "Added", "Awarded", or "Claimed". For example, the parent\nbounty 17 refers to the Community Events Bounty, which has 183 child bounties.']}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{alt:"polkassembly-child-bounties",src:n(98445).A+"",width:"2408",height:"1053"})}),"\n",(0,o.jsx)(t.p,{children:"After the child bounty has been rewarded, follow the guidelines in the video tutorial below to learn\nhow to claim a child bounty reward. Note that the extrinsic to claim the child bounty reward is\npermissionless, and anyone can initiate the claim on behalf of the beneficiary."}),"\n",(0,o.jsx)("div",{className:"row",children:(0,o.jsxs)("div",{className:"col text--center",children:[(0,o.jsx)("a",{href:"https://www.youtube.com/watch?v=db82aHgy23c",children:(0,o.jsx)("img",{src:"https://img.youtube.com/vi/db82aHgy23c/0.jpg",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,o.jsx)("p",{children:(0,o.jsx)("a",{href:"https://www.youtube.com/watch?v=db82aHgy23c",children:"Claim Child Bounty Reward"})})]})}),"\n",(0,o.jsx)(t.h2,{id:"close-child-bounties",children:"Close Child Bounties"}),"\n",(0,o.jsxs)(t.p,{children:["Child bounties can be closed without awarding them. To close a child bounty, you must submit a\n",(0,o.jsx)(t.code,{children:"childBounties.closeChild.Bounty"})," extrinsic, specifying the parent bounty and child bounty IDs. Only\nthe parent bounty curator can sign this transaction, resulting in the child bounty\u2019s curator deposit\nbeing returned."]}),"\n",(0,o.jsx)(t.p,{children:"See the video tutorial below to learn how to close a child bounty."}),"\n",(0,o.jsx)("div",{className:"row",children:(0,o.jsxs)("div",{className:"col text--center",children:[(0,o.jsx)("a",{href:"https://www.youtube.com/watch?v=Qv_nJVcvQr8&t=2109s",children:(0,o.jsx)("img",{src:"https://img.youtube.com/vi/Qv_nJVcvQr8/0.jpg",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,o.jsx)("p",{children:(0,o.jsx)("a",{href:"https://www.youtube.com/watch?v=Qv_nJVcvQr8&t=2109s",children:"Close a Child Bounty"})})]})}),"\n",(0,o.jsxs)(t.p,{children:["If the child bounty curator acts maliciously, the parent bounty curator can submit a\n",(0,o.jsx)(t.code,{children:"childBounties.unassignCurator"})," that slashes the curator's deposit."]}),"\n",(0,o.jsx)(t.h2,{id:"refill-parent-bounties",children:"Refill Parent Bounties"}),"\n",(0,o.jsxs)(t.p,{children:["To refill a parent bounty,\n",(0,o.jsx)(t.a,{href:"/docs/learn-guides-polkadot-opengov#submitting-a-preimage",children:"an OpenGov referendum must be submitted"}),"."]}),"\n",(0,o.jsxs)(t.p,{children:["The preimage must contain a ",(0,o.jsx)(t.code,{children:"treasury.spendLocal"})," extrinsic specifying the amount of tokens to be\nsent from the treasury to the receiver's address, in this case the\n",(0,o.jsx)(t.a,{href:"/docs/learn-account-advanced#system-accounts",children:"system account"})," of the\n",(0,o.jsx)(t.a,{href:"/docs/learn-polkadot-opengov-treasury#bounties",children:"parent bounty"}),"."]}),"\n",(0,o.jsxs)(t.p,{children:["To get the bounty system account of a parent bounty, go to\n",(0,o.jsx)(t.a,{href:"https://polkadot.subsquare.io/treasury/bounties",children:"Subsquare"}),", search for the bounty name, and the\naddress will be shown under Metadata."]})]})}function h(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(c,{...e})}):c(e)}},67141:(e,t,n)=>{n.d(t,{A:()=>a});var o=n(96540),s=n(74848);const a=function(e){var t,n=e.message,a=(0,o.useState)(!0),i=a[0],r=a[1];return(0,s.jsx)(s.Fragment,{children:i&&(0,s.jsxs)("div",{className:"message-box",children:[(0,s.jsx)("button",{className:"close-button",onClick:function(){r(!1)},children:"\u2716 "}),(0,s.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(t=n,t.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},98445:(e,t,n)=>{n.d(t,{A:()=>o});const o=n.p+"assets/images/polkassembly-child-bounties-fde994e770f3e109a07752068aa417b1.png"},28453:(e,t,n)=>{n.d(t,{R:()=>i,x:()=>r});var o=n(96540);const s={},a=o.createContext(s);function i(e){const t=o.useContext(a);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),o.createElement(a.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/eef3f1dd.6bf92f8b.js b/assets/js/eef3f1dd.6bf92f8b.js deleted file mode 100644 index e18008d3dbd7..000000000000 --- a/assets/js/eef3f1dd.6bf92f8b.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7827],{3674:(e,s,n)=>{n.r(s),n.d(s,{assets:()=>d,contentTitle:()=>o,default:()=>p,frontMatter:()=>r,metadata:()=>l,toc:()=>c});var i=n(74848),a=n(28453),t=n(67141);const r={id:"learn-guides-treasury",title:"Polkadot-JS Guides about the Treasury",sidebar_label:"Treasury Guides",description:"Polkadot-JS Guides about the Polkadot Treasury.",keywords:["opengov","polkadot opengov","referenda","treasury","tipps","polkadot-js"],slug:"../learn-guides-treasury"},o=void 0,l={id:"learn/learn-guides-treasury",title:"Polkadot-JS Guides about the Treasury",description:"Polkadot-JS Guides about the Polkadot Treasury.",source:"@site/../docs/learn/learn-guides-treasury.md",sourceDirName:"learn",slug:"/learn-guides-treasury",permalink:"/docs/learn-guides-treasury",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-treasury.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1729847256e3,frontMatter:{id:"learn-guides-treasury",title:"Polkadot-JS Guides about the Treasury",sidebar_label:"Treasury Guides",description:"Polkadot-JS Guides about the Polkadot Treasury.",keywords:["opengov","polkadot opengov","referenda","treasury","tipps","polkadot-js"],slug:"../learn-guides-treasury"},sidebar:"docs",previous:{title:"OpenGov Guides",permalink:"/docs/learn-guides-polkadot-opengov"},next:{title:"Bounty Guides",permalink:"/docs/learn-guides-bounties"}},d={},c=[{value:"Creating a Treasury Proposal",id:"creating-a-treasury-proposal",level:2},{value:"Announcing the Proposal",id:"announcing-the-proposal",level:3},{value:"Creating a Treasury Proposal - Spend Local",id:"creating-a-treasury-proposal---spend-local",level:2},{value:"Submit Treasury Proposal Preimage",id:"submit-treasury-proposal-preimage",level:3},{value:"Submit a Treasury Track Referendum",id:"submit-a-treasury-track-referendum",level:3},{value:"Place a Decision Deposit for the Treasury Track Referendum",id:"place-a-decision-deposit-for-the-treasury-track-referendum",level:3},{value:"Creating a Multistage Payout Proposal with validFrom",id:"creating-a-multistage-payout-proposal-with-validfrom",level:2},{value:"Using batch for Multi-Spend Proposals",id:"using-batch-for-multi-spend-proposals",level:3},{value:"Using validFrom for a Milestone-Based Proposal",id:"using-validfrom-for-a-milestone-based-proposal",level:3},{value:"Creating a USDT Treasury Proposal - Spend (with AssetHub)",id:"creating-a-usdt-treasury-proposal---spend-with-assethub",level:2},{value:"Creating a Preimage",id:"creating-a-preimage",level:3},{value:"Specifying Asset Kind",id:"specifying-asset-kind",level:3},{value:"Specifying the Amount",id:"specifying-the-amount",level:3},{value:"Specifying the Beneficiary",id:"specifying-the-beneficiary",level:3},{value:"Specifying validFrom (optional)",id:"specifying-validfrom-optional",level:3},{value:"Manually Claiming Payouts",id:"manually-claiming-payouts",level:3},{value:"Proposing a "Void" for a Staged Proposal",id:"proposing-a-void-for-a-staged-proposal",level:3},{value:"Submit Treasury Proposal via Polkassembly",id:"submit-treasury-proposal-via-polkassembly",level:2},{value:"Requesting Tips from the Treasury",id:"requesting-tips-from-the-treasury",level:2}];function h(e){const s={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",strong:"strong",ul:"ul",...(0,a.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the Polkadot-JS UI, you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,i.jsxs)(s.p,{children:["See ",(0,i.jsx)(s.a,{href:"/docs/learn-polkadot-opengov-treasury",children:"this page"})," to learn about the Polkadot Treasury."]}),"\n",(0,i.jsx)(s.h2,{id:"creating-a-treasury-proposal",children:"Creating a Treasury Proposal"}),"\n",(0,i.jsx)(s.p,{children:"Your proposal should address a problem, outline a goal, give a detailed account of how you will\nreach that goal, and include any ongoing maintenance needs. As much as possible, you should itemize\nthe tasks to be completed so fees can be evaluated and milestones can be followed. You can check the\nguidelines below:"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["Guidelines for a successful proposal on\n",(0,i.jsx)(s.a,{href:"https://docs.google.com/document/d/1IZykdp2cyQavcRyZd_dgNj5DcgxgZR6kAqGdcNARu1w",children:"Polkadot"})," and\n",(0,i.jsx)(s.a,{href:"https://docs.google.com/document/d/1CzEnurqwqLBOGrJI9CQORiGW9m6QyPOSshhzJdR57Pk",children:"Kusama"})]}),"\n",(0,i.jsx)(s.li,{children:(0,i.jsx)(s.a,{href:"https://docs.google.com/document/d/1O_84mXYFERCavmnJyxbIPKFkG0bVBySRjCVy-d-VKcc",children:"Treasury proposal template for Polkadot"})}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"announcing-the-proposal",children:"Announcing the Proposal"}),"\n",(0,i.jsxs)(s.p,{children:["To minimize storage on-chain, proposals don't contain contextual information. When a user submits a\nproposal, they will need to find an off-chain way to explain the proposal via\n",(0,i.jsx)(s.a,{href:"/docs/community",children:"community channels"}),"."]}),"\n",(0,i.jsx)(s.p,{children:"Spreading the word about the proposal's explanation to the community is ultimately up to the\nproposer."}),"\n",(0,i.jsx)(s.admonition,{title:"Use Accounts with Verified On-Chain Identity for Treasury Proposals",type:"tip",children:(0,i.jsxs)(s.p,{children:["To ensure legitimacy, it is required that the account linked to the Treasury proposal has an\n",(0,i.jsx)(s.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181981-how-to-set-and-clear-an-identity",children:"identity set"}),"\nand is\n",(0,i.jsx)(s.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181990-how-to-request-and-cancel-identity-judgement",children:"verified by an on-chain registrar"}),"."]})}),"\n",(0,i.jsx)(s.h2,{id:"creating-a-treasury-proposal---spend-local",children:"Creating a Treasury Proposal - Spend Local"}),"\n",(0,i.jsxs)(s.admonition,{title:'"Spend" vs. "Spend Local"',type:"info",children:[(0,i.jsxs)(s.p,{children:["You may notice that the Treasury pallet contains two extrinsics - ",(0,i.jsx)(s.code,{children:"treasury.spend"})," and\n",(0,i.jsx)(s.code,{children:"treasury.spendLocal"}),". ",(0,i.jsx)(s.code,{children:"treasury.spendLocal"})," (formally called ",(0,i.jsx)(s.code,{children:"treasury.spend"}),") refers to a spend of\nDOT that is locally available, i.e., DOT from the relay chain's treasury account. ",(0,i.jsx)(s.code,{children:"spend"})," actually\nallows the caller to specify an asset other than DOT, or even assets in other locations, e.g.\n",(0,i.jsx)(s.a,{href:"/docs/glossary#asset-hub",children:"Asset Hub"}),"."]}),(0,i.jsxs)(s.p,{children:["Unlike ",(0,i.jsx)(s.code,{children:"treasury.spendLocal"}),", ",(0,i.jsx)(s.code,{children:"treasury.spend"})," is ",(0,i.jsx)(s.strong,{children:"not"})," bound by a spend period, and must be\nclaimed manually via the ",(0,i.jsx)(s.code,{children:"treasury.payout"})," extrinsic. ",(0,i.jsx)(s.code,{children:"treasuy.spendLocal"})," behavior remains\nunchanged."]})]}),"\n",(0,i.jsx)(s.h3,{id:"submit-treasury-proposal-preimage",children:"Submit Treasury Proposal Preimage"}),"\n",(0,i.jsxs)(s.p,{children:["The example below shows how to create a ",(0,i.jsx)(s.a,{href:"/docs/glossary#preimage",children:"preimage"})," for a\ntransaction that requests 100 DOT from Treasury."]}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["Navigate to ",(0,i.jsx)(s.a,{href:"https://polkadot.js.org/apps/#/preimages",children:"Polkadot-JS UI > Governance > Preimages"}),"\nand then click on Add Preimage."]}),"\n",(0,i.jsx)(s.li,{children:"Select the account which will be used to submit the preimage."}),"\n",(0,i.jsxs)(s.li,{children:["Choose ",(0,i.jsx)(s.code,{children:"treasury"}),' pallet in the "propose" dropdown and the ',(0,i.jsx)(s.code,{children:"spendLocal(amount, beneficiary)"}),"call"]}),"\n",(0,i.jsx)(s.li,{children:"Enter the DOT amount."}),"\n",(0,i.jsx)(s.li,{children:"Enter the AccountID of the beneficiary (which has a verified on-chain identity)."}),"\n",(0,i.jsx)(s.li,{children:"Submit preimage"}),"\n",(0,i.jsx)(s.li,{children:"Sign and submit the transaction by paying the specified transaction fees."}),"\n"]}),"\n",(0,i.jsx)(s.admonition,{title:"Preimage Submission Deposit",type:"info",children:(0,i.jsx)(s.p,{children:"A deposit is required for the preimage to be stored on chain. The preimage deposit is proportional\nto the amount of information stored within the preimage. The deposit amount required for a preimage\nwith a treasury spend transaction is around 41 DOT (1.4 KSM on Kusama). Ensure you have enough\naccount balance to pay for the submission deposit and the transaction fees."})}),"\n",(0,i.jsx)(s.p,{children:"Here is the preimage requesting for 100 DOT."}),"\n",(0,i.jsx)(s.p,{children:(0,i.jsx)(s.img,{alt:"Treasury Preimage",src:n(79087).A+"",width:"2148",height:"1191"})}),"\n",(0,i.jsx)(s.admonition,{title:"Balance entered is in Plancks",type:"info",children:(0,i.jsxs)(s.p,{children:["Polkadot JS UI is for developers and the UI takes input of the balance in\n",(0,i.jsx)(s.a,{href:"/docs/learn-DOT#the-planck-unit",children:"plancks"}),". DOT has 10 decimals, which is 10000000000 plancks per DOT."]})}),"\n",(0,i.jsx)(s.p,{children:"After successful submission of the preimage, it is displayed on Polkadot-JS UI > Governance >\nPreimages page. Every preimage is associated with a unique preimage hash (highlighted in a box in\nthe image below). Take a note of this preimage hash, which is required to submit a referendum."}),"\n",(0,i.jsx)(s.p,{children:(0,i.jsx)(s.img,{alt:"Treasury Preimage Hash",src:n(39555).A+"",width:"2879",height:"453"})}),"\n",(0,i.jsx)(s.h3,{id:"submit-a-treasury-track-referendum",children:"Submit a Treasury Track Referendum"}),"\n",(0,i.jsx)(s.p,{children:"The example below shows how to submit a Treasury track referendum."}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["Navigate to ",(0,i.jsx)(s.a,{href:"https://polkadot.js.org/apps/#/referenda",children:"Polkadot-JS UI > Governance > Referenda"}),"\nand then click on Submit proposal."]}),"\n",(0,i.jsx)(s.li,{children:"Select the account which will be used to submit the proposal."}),"\n",(0,i.jsx)(s.li,{children:"Choose the appropriate submission track (The example below selected Small Spender track)."}),"\n",(0,i.jsx)(s.li,{children:"Enter the preimage hash of the treasury spend transaction.(If the preimage exists on-chain, the\npreimage length box is automatically populated)"}),"\n",(0,i.jsx)(s.li,{children:"Click on Submit proposal."}),"\n",(0,i.jsx)(s.li,{children:"Sign and submit the transaction."}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:(0,i.jsx)(s.img,{alt:"Submit Treasury Proposal",src:n(44751).A+"",width:"2141",height:"1238"})}),"\n",(0,i.jsxs)(s.p,{children:["Once your submission is executed, your referendum will appear under your chosen track on the\nPolkadot-JS UI ",(0,i.jsx)(s.a,{href:"https://polkadot.js.org/apps/#/referenda",children:"referenda page"}),"."]}),"\n",(0,i.jsx)(s.h3,{id:"place-a-decision-deposit-for-the-treasury-track-referendum",children:"Place a Decision Deposit for the Treasury Track Referendum"}),"\n",(0,i.jsxs)(s.p,{children:["For the referendum to move from preparing phase to the deciding phase, a decision deposit needs to\nbe placed. The decision deposit values for each individual\n",(0,i.jsx)(s.a,{href:"./learn-polkadot-opengov-treasury#treasury-tracks",children:"Treasury Tracks"})," are listed in a section above\nin this document."]}),"\n",(0,i.jsx)(s.p,{children:(0,i.jsx)(s.img,{alt:"Submit Treasury Proposal Decision Deposit",src:n(52540).A+"",width:"2133",height:"168"})}),"\n",(0,i.jsxs)(s.p,{children:["The preimage and decision deposits\n",(0,i.jsx)(s.a,{href:"/docs/learn-guides-polkadot-opengov#claiming-the-preimage-and-decision-deposits",children:"can be claimed once the referendum ends"}),"."]}),"\n",(0,i.jsxs)(s.h2,{id:"creating-a-multistage-payout-proposal-with-validfrom",children:["Creating a Multistage Payout Proposal with ",(0,i.jsx)(s.code,{children:"validFrom"})]}),"\n",(0,i.jsx)(s.p,{children:"Staged proposals are similar to a tranche or milestone-based funding model; instead of all spends\nbeing paid simultaneously, each portion is redeemable at a certain block height. This is done by\nspecifying each milestone, set at its respective amount and block height at which it becomes\nredeemable."}),"\n",(0,i.jsx)(s.p,{children:'For example, take the following "staged" proposal, which has three milestones, each at 100 DOT, and\nis redeemable at the following block heights. Usually, block heights correspond to a date in the\nfuture:'}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"100 DOT paid out at block height 1000"}),"\n",(0,i.jsx)(s.li,{children:"200 DOT paid out at block height 2000"}),"\n",(0,i.jsx)(s.li,{children:"500 DOT paid out at block height 4000"}),"\n"]}),"\n",(0,i.jsxs)(s.p,{children:["Governance can also propose to ",(0,i.jsx)(s.strong,{children:"void"})," a staged proposal before it has completed all of its\npayouts."]}),"\n",(0,i.jsx)(s.admonition,{title:"Calculating dates from block heights",type:"info",children:(0,i.jsx)(s.p,{children:"Although not the most accurate form of measurement, block heights can be used to correspond to\ncertain dates in the future."})}),"\n",(0,i.jsxs)(s.h3,{id:"using-batch-for-multi-spend-proposals",children:["Using ",(0,i.jsx)(s.code,{children:"batch"})," for Multi-Spend Proposals"]}),"\n",(0,i.jsxs)(s.p,{children:["Using the Utility pallet, one can batch multiple ",(0,i.jsx)(s.code,{children:"treasury.spend"})," calls together. Each of these\ncalls can have its own ",(0,i.jsx)(s.code,{children:"validFrom"})," block height, which allows for scenarios such as the above to be\npossible."]}),"\n",(0,i.jsx)(s.admonition,{title:"Multistage payout proposal example",type:"tip",children:(0,i.jsxs)(s.p,{children:["For reference on how to create a multistage payout proposal, please check\n",(0,i.jsx)(s.a,{href:"https://kusama.subsquare.io/referenda/382?tab=call",children:"Referendum 382"})," on Kusama."]})}),"\n",(0,i.jsxs)(s.h3,{id:"using-validfrom-for-a-milestone-based-proposal",children:["Using ",(0,i.jsx)(s.code,{children:"validFrom"})," for a Milestone-Based Proposal"]}),"\n",(0,i.jsxs)(s.p,{children:["Once each spend is defined within the batched call, the ",(0,i.jsx)(s.code,{children:"validFrom"}),' field can be utilized to specify\nthe "date", or block height, at which each spend will be executed.']}),"\n",(0,i.jsx)(s.admonition,{title:"Treasury Spends have to be claimed manually. Spends can expire!",type:"info",children:(0,i.jsxs)(s.p,{children:["Keep in mind that once the ",(0,i.jsx)(s.code,{children:"validFrom"})," block height has been reached, you will have to claim the\nspend within 30 days. Check the claiming process for treasury spends\n",(0,i.jsx)(s.a,{href:"#manually-claiming-payouts",children:"here"})]})}),"\n",(0,i.jsx)(s.h2,{id:"creating-a-usdt-treasury-proposal---spend-with-assethub",children:"Creating a USDT Treasury Proposal - Spend (with AssetHub)"}),"\n",(0,i.jsxs)(s.p,{children:["The following tutorial mostly goes over how to utilize the ",(0,i.jsx)(s.code,{children:"spend"})," extrinsic, which, unlike\n",(0,i.jsx)(s.code,{children:"spendLocal"}),", is able to specify assets besides the native asset in other locations, such as\n",(0,i.jsx)(s.a,{href:"/docs/glossary#asset-hub",children:"Asset Hub"}),"."]}),"\n",(0,i.jsx)(s.h3,{id:"creating-a-preimage",children:"Creating a Preimage"}),"\n",(0,i.jsxs)(s.p,{children:["The example below shows how to create a ",(0,i.jsx)(s.a,{href:"../general/glossary#preimage",children:"preimage"})," for a transaction\nthat requests 100 USDT from AssetHub."]}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["Navigate to ",(0,i.jsx)(s.a,{href:"https://polkadot.js.org/apps/#/preimages",children:"Polkadot-JS UI > Governance > Referenda"}),"\nand then click on Add Preimage."]}),"\n",(0,i.jsx)(s.li,{children:"Select the account to submit the preimage."}),"\n",(0,i.jsxs)(s.li,{children:["Choose the ",(0,i.jsx)(s.code,{children:"treasury"}),' pallet in the "propose" dropdown and the\n',(0,i.jsx)(s.code,{children:"spend(assetKind, amount, beneficiary, validFrom)"})," call."]}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:"Now, let's go through each field one-by-one and fill them in accordingly:"}),"\n",(0,i.jsx)(s.h3,{id:"specifying-asset-kind",children:"Specifying Asset Kind"}),"\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.code,{children:"assetKind"})," refers to the asset to be used, specified via XCM. In short, we need to be able to find:"]}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"The relative location of the asset, and"}),"\n",(0,i.jsx)(s.li,{children:"How it is identified within this location."}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:"For this example, we are using USDT, which from the perspective of the relay chain would be:"}),"\n",(0,i.jsx)(s.p,{children:(0,i.jsx)(s.code,{children:"Parachain 1000 (AssetHub) > AssetId (Concrete) > PalletInstance 50 > General Index 1984"})}),"\n",(0,i.jsxs)(s.p,{children:["First, we specify the location - in this case, Asset Hub (parachain 1,000). ",(0,i.jsx)(s.code,{children:"PalletInstance 50"}),"\nrefers to the Assets pallet instance on Asset Hub. The general index is ",(0,i.jsx)(s.code,{children:"1984"}),", which is the ID of\nUSDT in this instance of the Assets pallet."]}),"\n",(0,i.jsxs)(s.admonition,{title:"Bug on Polkadot-JS UI",type:"caution",children:[(0,i.jsxs)(s.p,{children:["As the Polkadot-JS UI is interpreting the general index in DOT, it multiplies the entered values\nwith ",(0,i.jsx)(s.code,{children:"10000000000"})," (As DOT token has 10 decimals) and places it in the ",(0,i.jsx)(s.code,{children:"u128"})," argument. As we would\nlike to have ",(0,i.jsx)(s.code,{children:"1984"})," as the input argument, we can offset this UI induced error by entering\n",(0,i.jsx)(s.code,{children:"0.0000001984"}),"."]}),(0,i.jsxs)(s.p,{children:["The issue on Polkadot-JS repo can be tracked\n",(0,i.jsx)(s.a,{href:"https://github.com/polkadot-js/apps/issues/10430",children:"here"}),"."]})]}),"\n",(0,i.jsxs)(s.p,{children:["Here is how the final ",(0,i.jsx)(s.code,{children:"assetKind"})," field should look:"]}),"\n",(0,i.jsx)(s.p,{children:(0,i.jsx)(s.img,{alt:"Asset Kind",src:n(44855).A+"",width:"1564",height:"1316"})}),"\n",(0,i.jsx)(s.h3,{id:"specifying-the-amount",children:"Specifying the Amount"}),"\n",(0,i.jsxs)(s.p,{children:["The amount should be simply the amount of USDT, where each ",(0,i.jsx)(s.code,{children:"1"})," USDT is ",(0,i.jsx)(s.code,{children:"1000000"}),". Because we are\nasking for 100 USDT, we put ",(0,i.jsx)(s.code,{children:"100000000"})," as the input for the amount."]}),"\n",(0,i.jsxs)(s.admonition,{title:"Bug on Polkadot-JS UI",type:"caution",children:[(0,i.jsxs)(s.p,{children:["As the Polkadot-JS UI is interpreting the asset balance in DOT, it multiplies the entered values\nwith ",(0,i.jsx)(s.code,{children:"10000000000"})," (As DOT token has 10 decimals) and places it in the ",(0,i.jsx)(s.code,{children:"u128"})," argument. As we would\nlike to have ",(0,i.jsx)(s.code,{children:"100000000"})," as the input argument, we can offset this UI induced error by entering\n",(0,i.jsx)(s.code,{children:"0.01"})," for this particular example where we like to input 100 USDT."]}),(0,i.jsxs)(s.p,{children:["The issue on Polkadot-JS repo can be tracked\n",(0,i.jsx)(s.a,{href:"https://github.com/polkadot-js/apps/issues/10430",children:"here"}),"."]})]}),"\n",(0,i.jsx)(s.p,{children:(0,i.jsx)(s.img,{alt:"Asset Value, Beneficiary and ValidFrom",src:n(22192).A+"",width:"1591",height:"1279"})}),"\n",(0,i.jsx)(s.h3,{id:"specifying-the-beneficiary",children:"Specifying the Beneficiary"}),"\n",(0,i.jsxs)(s.p,{children:["The beneficiary account will be one on Asset Hub. For this reason, the XCM junction must be\nspecified as follows, with one junction (",(0,i.jsx)(s.code,{children:"X1"}),") and the beneficiary account (",(0,i.jsx)(s.code,{children:"AccountId32"}),"), which is\nan account address on the chain."]}),"\n",(0,i.jsxs)(s.h3,{id:"specifying-validfrom-optional",children:["Specifying ",(0,i.jsx)(s.code,{children:"validFrom"})," (optional)"]}),"\n",(0,i.jsxs)(s.p,{children:["The ",(0,i.jsx)(s.code,{children:"validFrom"})," field is optional, and refers to the block height of the relay chain upon which the\npayout can be issued. If the ",(0,i.jsx)(s.code,{children:"validFrom"})," parameter is not set, the spend can be paid out immediately\nafter approval. For more information on this field, refer to the\n",(0,i.jsx)(s.a,{href:"#creating-a-staged-proposal-with-validfrom",children:"guide below"}),"."]}),"\n",(0,i.jsx)(s.p,{children:"The final call should look like the following, where we:"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["Specify our asset as ",(0,i.jsx)(s.strong,{children:"USDT"})," on ",(0,i.jsx)(s.strong,{children:"Asset Hub"}),"."]}),"\n",(0,i.jsxs)(s.li,{children:["Specify the ",(0,i.jsx)(s.strong,{children:"amount"})," of ",(0,i.jsx)(s.strong,{children:"USDT"})," (100)."]}),"\n",(0,i.jsx)(s.li,{children:"Specify the beneficiary address."}),"\n",(0,i.jsxs)(s.li,{children:["If applicable, use the ",(0,i.jsx)(s.code,{children:"validFrom"})," field to specify a block number upon which the payout becomes\nvalid."]}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:"The next steps are to:"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Copy the preimage (and its length)"}),"\n",(0,i.jsx)(s.li,{children:"Sign and submit the preimage"}),"\n"]}),"\n",(0,i.jsxs)(s.p,{children:["Once this is finished, one may submit a proposal\n",(0,i.jsx)(s.a,{href:"#submit-a-treasury-track-referendum",children:"as stated above"}),". Keep in mind one will also need to\n",(0,i.jsx)(s.a,{href:"#place-a-decision-deposit-for-the-treasury-track-referendum",children:"provide the decision deposit as well"}),"."]}),"\n",(0,i.jsx)(s.h3,{id:"manually-claiming-payouts",children:"Manually Claiming Payouts"}),"\n",(0,i.jsxs)(s.p,{children:["In order to claim the spend, you must manually call the ",(0,i.jsx)(s.code,{children:"treasury.payout"})," extrinsic via a ",(0,i.jsx)(s.code,{children:"Signed"}),"\norigin. The ",(0,i.jsx)(s.code,{children:"spendID"})," for the pending payout can be queried on-chain through Polkadot-JS UI >\nDeveloper > Chain State > Storage > treasury > spends and unselect the include option and then click\non the plus button to the right."]}),"\n",(0,i.jsx)(s.p,{children:(0,i.jsx)(s.img,{alt:"payout",src:n(88195).A+"",width:"2768",height:"1370"})}),"\n",(0,i.jsxs)(s.p,{children:["From the list of spends, find the ",(0,i.jsx)(s.code,{children:"spendID"})," of your respetive payout and issue the payout extrinsic."]}),"\n",(0,i.jsx)(s.admonition,{title:"payout example",type:"tip",children:(0,i.jsxs)(s.p,{children:["To claim the first payout of ",(0,i.jsx)(s.a,{href:"https://kusama.subsquare.io/referenda/382?tab=call",children:"Referendum 382"})," on\nKusama, ",(0,i.jsx)(s.a,{href:"https://kusama.subscan.io/extrinsic/23061444-2",children:"this payout extrinsic"})," was issued. After\nissuing the payout extrinsic, the status of the payout changes from ",(0,i.jsx)(s.code,{children:"pending"})," to ",(0,i.jsx)(s.code,{children:"Attempted"})," with a\nreference to a payment ID. If the payout is successful, the balance on Asset Hub should be updated.\n",(0,i.jsx)(s.a,{href:"https://assethub-kusama.subscan.io/extrinsic/6923602-0",children:"Here"})," is the transfer extrinsic on Asset\nHub for the first payout of ",(0,i.jsx)(s.a,{href:"https://kusama.subscan.io/referenda_v2/382",children:"Referendum 382"}),"."]})}),"\n",(0,i.jsxs)(s.p,{children:["To clear the on-chain storage of a successful or expired spend, Treasury pallet's ",(0,i.jsx)(s.code,{children:"checkStatus"}),"\nextrinsic can be used. The transaction fees paid for issuing this extrinsic will be refunded."]}),"\n",(0,i.jsx)(s.h3,{id:"proposing-a-void-for-a-staged-proposal",children:'Proposing a "Void" for a Staged Proposal'}),"\n",(0,i.jsxs)(s.p,{children:["If a proposal that hasn't completed all of its spends needs to be voided, the ",(0,i.jsx)(s.code,{children:"treasury.voidSpend"}),"\nextrinsic can be utilized via a governance proposal."]}),"\n",(0,i.jsx)(s.admonition,{title:"Example proposal - Voiding a Treasury Spend",type:"tip",children:(0,i.jsxs)(s.p,{children:["For reference, check the referenda on Kusama that\n",(0,i.jsx)(s.a,{href:"https://kusama.subsquare.io/referenda/391",children:"tests VoidSpend functionality for Treasury Payouts"}),".\nThrough this referenda, a treasury spend was\n",(0,i.jsx)(s.a,{href:"https://kusama.subscan.io/event?page=1&time_dimension=date&module=treasury&event_id=assetspendvoided",children:"successfully voided"}),"."]})}),"\n",(0,i.jsx)(s.h2,{id:"submit-treasury-proposal-via-polkassembly",children:"Submit Treasury Proposal via Polkassembly"}),"\n",(0,i.jsxs)(s.p,{children:["To submit a treasury track referendum via ",(0,i.jsx)(s.a,{href:"https://polkadot.polkassembly.io/opengov",children:"Polkassembly"}),"\nclick on the FAB button in the bottom right corner. Then,"]}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsx)(s.p,{children:'Click on "Create Treasury Proposal" and choose an address for the proposer.'}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsx)(s.p,{children:"After choosing an address, you will enter a three-stage guideline:"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Write a proposal: you can add a detailed description for the proposal, which will be stored on\nPolkassembly. Alternatively, you can link an existing discussion post."}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:(0,i.jsx)(s.img,{alt:"polkassembly-write-proposal",src:n(14879).A+"",width:"2130",height:"1596"})}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Create a preimage: an existing preimage can be linked, or a new one can be created. To create a\npreimage, add the beneficiary address and the token amount. The track will be auto-selected and\nthe user can proceed with the creation of a preimage."}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:(0,i.jsx)(s.img,{alt:"polkassembly-create-preimage",src:n(94664).A+"",width:"2154",height:"1598"})}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Create a proposal: final confirmation about the proposal creation. The description of the\nproposal and the preimage are automatically linked to the proposal."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(s.h2,{id:"requesting-tips-from-the-treasury",children:"Requesting Tips from the Treasury"}),"\n",(0,i.jsxs)(s.p,{children:["To request a tip funded by the treasury, you can follow the above steps for\n",(0,i.jsx)(s.a,{href:"#creating-a-treasury-proposal",children:"creating a treasury proposal"})," but instead of submitting the proposal\nto the ",(0,i.jsx)(s.code,{children:"32 / Small Spender"})," track, you will need to submit it to the ",(0,i.jsx)(s.code,{children:"30 / Small Tipper"})," or\n",(0,i.jsx)(s.code,{children:"31 / Big Tipper"})," tracks depending on the number of tokens to be requested."]}),"\n",(0,i.jsx)(s.p,{children:"Briefly, you will need to:"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["Create a preimage using the ",(0,i.jsx)(s.code,{children:"treasury.spendLocal"})," extrinsic and specifying the number of tokens\nand the beneficiary of the tip"]}),"\n",(0,i.jsxs)(s.li,{children:["Submit a proposal to the right track (i.e. ",(0,i.jsx)(s.code,{children:"30"})," or ",(0,i.jsx)(s.code,{children:"31"}),") using the preimage hash"]}),"\n",(0,i.jsxs)(s.li,{children:["Once you started the referendum go to ",(0,i.jsx)(s.a,{href:"https://polkassembly.io/",children:"Polkassembly"}),", log in with the\nproposer account and edit the referendum details"]}),"\n",(0,i.jsxs)(s.li,{children:["Notify ",(0,i.jsx)(s.a,{href:"https://matrix.to/#/#Polkadot-Direction:parity.io",children:"the Polkadot Direction Element Channel"}),"\nor ",(0,i.jsx)(s.a,{href:"https://matrix.to/#/#Polkadot-Direction:parity.io",children:"the Kusama Direction Element Channel"})," about\nyour referendum"]}),"\n",(0,i.jsxs)(s.li,{children:["Place the decision deposit\n",(0,i.jsx)(s.a,{href:"/docs/chain-state-values#opengov-referendum-timeout",children:"before the timeout"})]}),"\n",(0,i.jsxs)(s.li,{children:["Once the referendum ends you can\n",(0,i.jsx)(s.a,{href:"/docs/learn-guides-polkadot-opengov#claiming-the-preimage-and-decision-deposits",children:"claim the preimage and decision deposits back"})]}),"\n"]})]})}function p(e={}){const{wrapper:s}={...(0,a.R)(),...e.components};return s?(0,i.jsx)(s,{...e,children:(0,i.jsx)(h,{...e})}):h(e)}},67141:(e,s,n)=>{n.d(s,{A:()=>t});var i=n(96540),a=n(74848);const t=function(e){var s,n=e.message,t=(0,i.useState)(!0),r=t[0],o=t[1];return(0,a.jsx)(a.Fragment,{children:r&&(0,a.jsxs)("div",{className:"message-box",children:[(0,a.jsx)("button",{className:"close-button",onClick:function(){o(!1)},children:"\u2716 "}),(0,a.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(s=n,s.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},22192:(e,s,n)=>{n.d(s,{A:()=>i});const i=n.p+"assets/images/spend-amount-account-validfrom-temp-51145f395b6786e783600e3665bc7fab.png"},44855:(e,s,n)=>{n.d(s,{A:()=>i});const i=n.p+"assets/images/spend-usdt-assethub-temp-4182c6d400d00e1c4d8e94efc96dadcf.png"},94664:(e,s,n)=>{n.d(s,{A:()=>i});const i=n.p+"assets/images/polkassembly-create-preimage-7396a8ce796d0f0dcad30d3edced8618.png"},14879:(e,s,n)=>{n.d(s,{A:()=>i});const i=n.p+"assets/images/polkassembly-write-proposal-a3ce8ab9303111f6003ac8103ba29507.png"},79087:(e,s,n)=>{n.d(s,{A:()=>i});const i=n.p+"assets/images/OpenGov-Treasury-Preimage-SpendLocal-693c955b1e3e27bb6c98a6aad4d1b697.png"},44751:(e,s,n)=>{n.d(s,{A:()=>i});const i=n.p+"assets/images/submit-proposal-treasury-3948a231c4f3162a8680ad052af9e903.png"},88195:(e,s,n)=>{n.d(s,{A:()=>i});const i=n.p+"assets/images/treasury-multistage-payout-spend-id-54e73a1e8829cb911284ad15654d5661.png"},39555:(e,s,n)=>{n.d(s,{A:()=>i});const i=n.p+"assets/images/treasury-preimage-hash-05bb427d21d3ecf7d5e38418a0a0f4ed.png"},52540:(e,s,n)=>{n.d(s,{A:()=>i});const i=n.p+"assets/images/treasury-proposal-decision-deposit-849d27481ba0134acf743f7474d8f6a4.png"},28453:(e,s,n)=>{n.d(s,{R:()=>r,x:()=>o});var i=n(96540);const a={},t=i.createContext(a);function r(e){const s=i.useContext(t);return i.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function o(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:r(e.components),i.createElement(t.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/eef3f1dd.fe88d100.js b/assets/js/eef3f1dd.fe88d100.js new file mode 100644 index 000000000000..fc8427efcadb --- /dev/null +++ b/assets/js/eef3f1dd.fe88d100.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7827],{62313:(e,s,n)=>{n.r(s),n.d(s,{assets:()=>d,contentTitle:()=>l,default:()=>p,frontMatter:()=>o,metadata:()=>i,toc:()=>c});const i=JSON.parse('{"id":"learn/learn-guides-treasury","title":"Polkadot-JS Guides about the Treasury","description":"Polkadot-JS Guides about the Polkadot Treasury.","source":"@site/../docs/learn/learn-guides-treasury.md","sourceDirName":"learn","slug":"/learn-guides-treasury","permalink":"/docs/learn-guides-treasury","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-treasury.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1729847256000,"frontMatter":{"id":"learn-guides-treasury","title":"Polkadot-JS Guides about the Treasury","sidebar_label":"Treasury Guides","description":"Polkadot-JS Guides about the Polkadot Treasury.","keywords":["opengov","polkadot opengov","referenda","treasury","tipps","polkadot-js"],"slug":"../learn-guides-treasury"},"sidebar":"docs","previous":{"title":"OpenGov Guides","permalink":"/docs/learn-guides-polkadot-opengov"},"next":{"title":"Bounty Guides","permalink":"/docs/learn-guides-bounties"}}');var a=n(74848),t=n(28453),r=n(67141);const o={id:"learn-guides-treasury",title:"Polkadot-JS Guides about the Treasury",sidebar_label:"Treasury Guides",description:"Polkadot-JS Guides about the Polkadot Treasury.",keywords:["opengov","polkadot opengov","referenda","treasury","tipps","polkadot-js"],slug:"../learn-guides-treasury"},l=void 0,d={},c=[{value:"Creating a Treasury Proposal",id:"creating-a-treasury-proposal",level:2},{value:"Announcing the Proposal",id:"announcing-the-proposal",level:3},{value:"Creating a Treasury Proposal - Spend Local",id:"creating-a-treasury-proposal---spend-local",level:2},{value:"Submit Treasury Proposal Preimage",id:"submit-treasury-proposal-preimage",level:3},{value:"Submit a Treasury Track Referendum",id:"submit-a-treasury-track-referendum",level:3},{value:"Place a Decision Deposit for the Treasury Track Referendum",id:"place-a-decision-deposit-for-the-treasury-track-referendum",level:3},{value:"Creating a Multistage Payout Proposal with validFrom",id:"creating-a-multistage-payout-proposal-with-validfrom",level:2},{value:"Using batch for Multi-Spend Proposals",id:"using-batch-for-multi-spend-proposals",level:3},{value:"Using validFrom for a Milestone-Based Proposal",id:"using-validfrom-for-a-milestone-based-proposal",level:3},{value:"Creating a USDT Treasury Proposal - Spend (with AssetHub)",id:"creating-a-usdt-treasury-proposal---spend-with-assethub",level:2},{value:"Creating a Preimage",id:"creating-a-preimage",level:3},{value:"Specifying Asset Kind",id:"specifying-asset-kind",level:3},{value:"Specifying the Amount",id:"specifying-the-amount",level:3},{value:"Specifying the Beneficiary",id:"specifying-the-beneficiary",level:3},{value:"Specifying validFrom (optional)",id:"specifying-validfrom-optional",level:3},{value:"Manually Claiming Payouts",id:"manually-claiming-payouts",level:3},{value:"Proposing a "Void" for a Staged Proposal",id:"proposing-a-void-for-a-staged-proposal",level:3},{value:"Submit Treasury Proposal via Polkassembly",id:"submit-treasury-proposal-via-polkassembly",level:2},{value:"Requesting Tips from the Treasury",id:"requesting-tips-from-the-treasury",level:2}];function h(e){const s={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",strong:"strong",ul:"ul",...(0,t.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(r.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the Polkadot-JS UI, you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,a.jsxs)(s.p,{children:["See ",(0,a.jsx)(s.a,{href:"/docs/learn-polkadot-opengov-treasury",children:"this page"})," to learn about the Polkadot Treasury."]}),"\n",(0,a.jsx)(s.h2,{id:"creating-a-treasury-proposal",children:"Creating a Treasury Proposal"}),"\n",(0,a.jsx)(s.p,{children:"Your proposal should address a problem, outline a goal, give a detailed account of how you will\nreach that goal, and include any ongoing maintenance needs. As much as possible, you should itemize\nthe tasks to be completed so fees can be evaluated and milestones can be followed. You can check the\nguidelines below:"}),"\n",(0,a.jsxs)(s.ul,{children:["\n",(0,a.jsxs)(s.li,{children:["Guidelines for a successful proposal on\n",(0,a.jsx)(s.a,{href:"https://docs.google.com/document/d/1IZykdp2cyQavcRyZd_dgNj5DcgxgZR6kAqGdcNARu1w",children:"Polkadot"})," and\n",(0,a.jsx)(s.a,{href:"https://docs.google.com/document/d/1CzEnurqwqLBOGrJI9CQORiGW9m6QyPOSshhzJdR57Pk",children:"Kusama"})]}),"\n",(0,a.jsx)(s.li,{children:(0,a.jsx)(s.a,{href:"https://docs.google.com/document/d/1O_84mXYFERCavmnJyxbIPKFkG0bVBySRjCVy-d-VKcc",children:"Treasury proposal template for Polkadot"})}),"\n"]}),"\n",(0,a.jsx)(s.h3,{id:"announcing-the-proposal",children:"Announcing the Proposal"}),"\n",(0,a.jsxs)(s.p,{children:["To minimize storage on-chain, proposals don't contain contextual information. When a user submits a\nproposal, they will need to find an off-chain way to explain the proposal via\n",(0,a.jsx)(s.a,{href:"/docs/community",children:"community channels"}),"."]}),"\n",(0,a.jsx)(s.p,{children:"Spreading the word about the proposal's explanation to the community is ultimately up to the\nproposer."}),"\n",(0,a.jsx)(s.admonition,{title:"Use Accounts with Verified On-Chain Identity for Treasury Proposals",type:"tip",children:(0,a.jsxs)(s.p,{children:["To ensure legitimacy, it is required that the account linked to the Treasury proposal has an\n",(0,a.jsx)(s.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181981-how-to-set-and-clear-an-identity",children:"identity set"}),"\nand is\n",(0,a.jsx)(s.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181990-how-to-request-and-cancel-identity-judgement",children:"verified by an on-chain registrar"}),"."]})}),"\n",(0,a.jsx)(s.h2,{id:"creating-a-treasury-proposal---spend-local",children:"Creating a Treasury Proposal - Spend Local"}),"\n",(0,a.jsxs)(s.admonition,{title:'"Spend" vs. "Spend Local"',type:"info",children:[(0,a.jsxs)(s.p,{children:["You may notice that the Treasury pallet contains two extrinsics - ",(0,a.jsx)(s.code,{children:"treasury.spend"})," and\n",(0,a.jsx)(s.code,{children:"treasury.spendLocal"}),". ",(0,a.jsx)(s.code,{children:"treasury.spendLocal"})," (formally called ",(0,a.jsx)(s.code,{children:"treasury.spend"}),") refers to a spend of\nDOT that is locally available, i.e., DOT from the relay chain's treasury account. ",(0,a.jsx)(s.code,{children:"spend"})," actually\nallows the caller to specify an asset other than DOT, or even assets in other locations, e.g.\n",(0,a.jsx)(s.a,{href:"/docs/glossary#asset-hub",children:"Asset Hub"}),"."]}),(0,a.jsxs)(s.p,{children:["Unlike ",(0,a.jsx)(s.code,{children:"treasury.spendLocal"}),", ",(0,a.jsx)(s.code,{children:"treasury.spend"})," is ",(0,a.jsx)(s.strong,{children:"not"})," bound by a spend period, and must be\nclaimed manually via the ",(0,a.jsx)(s.code,{children:"treasury.payout"})," extrinsic. ",(0,a.jsx)(s.code,{children:"treasuy.spendLocal"})," behavior remains\nunchanged."]})]}),"\n",(0,a.jsx)(s.h3,{id:"submit-treasury-proposal-preimage",children:"Submit Treasury Proposal Preimage"}),"\n",(0,a.jsxs)(s.p,{children:["The example below shows how to create a ",(0,a.jsx)(s.a,{href:"/docs/glossary#preimage",children:"preimage"})," for a\ntransaction that requests 100 DOT from Treasury."]}),"\n",(0,a.jsxs)(s.ul,{children:["\n",(0,a.jsxs)(s.li,{children:["Navigate to ",(0,a.jsx)(s.a,{href:"https://polkadot.js.org/apps/#/preimages",children:"Polkadot-JS UI > Governance > Preimages"}),"\nand then click on Add Preimage."]}),"\n",(0,a.jsx)(s.li,{children:"Select the account which will be used to submit the preimage."}),"\n",(0,a.jsxs)(s.li,{children:["Choose ",(0,a.jsx)(s.code,{children:"treasury"}),' pallet in the "propose" dropdown and the ',(0,a.jsx)(s.code,{children:"spendLocal(amount, beneficiary)"}),"call"]}),"\n",(0,a.jsx)(s.li,{children:"Enter the DOT amount."}),"\n",(0,a.jsx)(s.li,{children:"Enter the AccountID of the beneficiary (which has a verified on-chain identity)."}),"\n",(0,a.jsx)(s.li,{children:"Submit preimage"}),"\n",(0,a.jsx)(s.li,{children:"Sign and submit the transaction by paying the specified transaction fees."}),"\n"]}),"\n",(0,a.jsx)(s.admonition,{title:"Preimage Submission Deposit",type:"info",children:(0,a.jsx)(s.p,{children:"A deposit is required for the preimage to be stored on chain. The preimage deposit is proportional\nto the amount of information stored within the preimage. The deposit amount required for a preimage\nwith a treasury spend transaction is around 41 DOT (1.4 KSM on Kusama). Ensure you have enough\naccount balance to pay for the submission deposit and the transaction fees."})}),"\n",(0,a.jsx)(s.p,{children:"Here is the preimage requesting for 100 DOT."}),"\n",(0,a.jsx)(s.p,{children:(0,a.jsx)(s.img,{alt:"Treasury Preimage",src:n(79087).A+"",width:"2148",height:"1191"})}),"\n",(0,a.jsx)(s.admonition,{title:"Balance entered is in Plancks",type:"info",children:(0,a.jsxs)(s.p,{children:["Polkadot JS UI is for developers and the UI takes input of the balance in\n",(0,a.jsx)(s.a,{href:"/docs/learn-DOT#the-planck-unit",children:"plancks"}),". DOT has 10 decimals, which is 10000000000 plancks per DOT."]})}),"\n",(0,a.jsx)(s.p,{children:"After successful submission of the preimage, it is displayed on Polkadot-JS UI > Governance >\nPreimages page. Every preimage is associated with a unique preimage hash (highlighted in a box in\nthe image below). Take a note of this preimage hash, which is required to submit a referendum."}),"\n",(0,a.jsx)(s.p,{children:(0,a.jsx)(s.img,{alt:"Treasury Preimage Hash",src:n(39555).A+"",width:"2879",height:"453"})}),"\n",(0,a.jsx)(s.h3,{id:"submit-a-treasury-track-referendum",children:"Submit a Treasury Track Referendum"}),"\n",(0,a.jsx)(s.p,{children:"The example below shows how to submit a Treasury track referendum."}),"\n",(0,a.jsxs)(s.ul,{children:["\n",(0,a.jsxs)(s.li,{children:["Navigate to ",(0,a.jsx)(s.a,{href:"https://polkadot.js.org/apps/#/referenda",children:"Polkadot-JS UI > Governance > Referenda"}),"\nand then click on Submit proposal."]}),"\n",(0,a.jsx)(s.li,{children:"Select the account which will be used to submit the proposal."}),"\n",(0,a.jsx)(s.li,{children:"Choose the appropriate submission track (The example below selected Small Spender track)."}),"\n",(0,a.jsx)(s.li,{children:"Enter the preimage hash of the treasury spend transaction.(If the preimage exists on-chain, the\npreimage length box is automatically populated)"}),"\n",(0,a.jsx)(s.li,{children:"Click on Submit proposal."}),"\n",(0,a.jsx)(s.li,{children:"Sign and submit the transaction."}),"\n"]}),"\n",(0,a.jsx)(s.p,{children:(0,a.jsx)(s.img,{alt:"Submit Treasury Proposal",src:n(44751).A+"",width:"2141",height:"1238"})}),"\n",(0,a.jsxs)(s.p,{children:["Once your submission is executed, your referendum will appear under your chosen track on the\nPolkadot-JS UI ",(0,a.jsx)(s.a,{href:"https://polkadot.js.org/apps/#/referenda",children:"referenda page"}),"."]}),"\n",(0,a.jsx)(s.h3,{id:"place-a-decision-deposit-for-the-treasury-track-referendum",children:"Place a Decision Deposit for the Treasury Track Referendum"}),"\n",(0,a.jsxs)(s.p,{children:["For the referendum to move from preparing phase to the deciding phase, a decision deposit needs to\nbe placed. The decision deposit values for each individual\n",(0,a.jsx)(s.a,{href:"./learn-polkadot-opengov-treasury#treasury-tracks",children:"Treasury Tracks"})," are listed in a section above\nin this document."]}),"\n",(0,a.jsx)(s.p,{children:(0,a.jsx)(s.img,{alt:"Submit Treasury Proposal Decision Deposit",src:n(52540).A+"",width:"2133",height:"168"})}),"\n",(0,a.jsxs)(s.p,{children:["The preimage and decision deposits\n",(0,a.jsx)(s.a,{href:"/docs/learn-guides-polkadot-opengov#claiming-the-preimage-and-decision-deposits",children:"can be claimed once the referendum ends"}),"."]}),"\n",(0,a.jsxs)(s.h2,{id:"creating-a-multistage-payout-proposal-with-validfrom",children:["Creating a Multistage Payout Proposal with ",(0,a.jsx)(s.code,{children:"validFrom"})]}),"\n",(0,a.jsx)(s.p,{children:"Staged proposals are similar to a tranche or milestone-based funding model; instead of all spends\nbeing paid simultaneously, each portion is redeemable at a certain block height. This is done by\nspecifying each milestone, set at its respective amount and block height at which it becomes\nredeemable."}),"\n",(0,a.jsx)(s.p,{children:'For example, take the following "staged" proposal, which has three milestones, each at 100 DOT, and\nis redeemable at the following block heights. Usually, block heights correspond to a date in the\nfuture:'}),"\n",(0,a.jsxs)(s.ul,{children:["\n",(0,a.jsx)(s.li,{children:"100 DOT paid out at block height 1000"}),"\n",(0,a.jsx)(s.li,{children:"200 DOT paid out at block height 2000"}),"\n",(0,a.jsx)(s.li,{children:"500 DOT paid out at block height 4000"}),"\n"]}),"\n",(0,a.jsxs)(s.p,{children:["Governance can also propose to ",(0,a.jsx)(s.strong,{children:"void"})," a staged proposal before it has completed all of its\npayouts."]}),"\n",(0,a.jsx)(s.admonition,{title:"Calculating dates from block heights",type:"info",children:(0,a.jsx)(s.p,{children:"Although not the most accurate form of measurement, block heights can be used to correspond to\ncertain dates in the future."})}),"\n",(0,a.jsxs)(s.h3,{id:"using-batch-for-multi-spend-proposals",children:["Using ",(0,a.jsx)(s.code,{children:"batch"})," for Multi-Spend Proposals"]}),"\n",(0,a.jsxs)(s.p,{children:["Using the Utility pallet, one can batch multiple ",(0,a.jsx)(s.code,{children:"treasury.spend"})," calls together. Each of these\ncalls can have its own ",(0,a.jsx)(s.code,{children:"validFrom"})," block height, which allows for scenarios such as the above to be\npossible."]}),"\n",(0,a.jsx)(s.admonition,{title:"Multistage payout proposal example",type:"tip",children:(0,a.jsxs)(s.p,{children:["For reference on how to create a multistage payout proposal, please check\n",(0,a.jsx)(s.a,{href:"https://kusama.subsquare.io/referenda/382?tab=call",children:"Referendum 382"})," on Kusama."]})}),"\n",(0,a.jsxs)(s.h3,{id:"using-validfrom-for-a-milestone-based-proposal",children:["Using ",(0,a.jsx)(s.code,{children:"validFrom"})," for a Milestone-Based Proposal"]}),"\n",(0,a.jsxs)(s.p,{children:["Once each spend is defined within the batched call, the ",(0,a.jsx)(s.code,{children:"validFrom"}),' field can be utilized to specify\nthe "date", or block height, at which each spend will be executed.']}),"\n",(0,a.jsx)(s.admonition,{title:"Treasury Spends have to be claimed manually. Spends can expire!",type:"info",children:(0,a.jsxs)(s.p,{children:["Keep in mind that once the ",(0,a.jsx)(s.code,{children:"validFrom"})," block height has been reached, you will have to claim the\nspend within 30 days. Check the claiming process for treasury spends\n",(0,a.jsx)(s.a,{href:"#manually-claiming-payouts",children:"here"})]})}),"\n",(0,a.jsx)(s.h2,{id:"creating-a-usdt-treasury-proposal---spend-with-assethub",children:"Creating a USDT Treasury Proposal - Spend (with AssetHub)"}),"\n",(0,a.jsxs)(s.p,{children:["The following tutorial mostly goes over how to utilize the ",(0,a.jsx)(s.code,{children:"spend"})," extrinsic, which, unlike\n",(0,a.jsx)(s.code,{children:"spendLocal"}),", is able to specify assets besides the native asset in other locations, such as\n",(0,a.jsx)(s.a,{href:"/docs/glossary#asset-hub",children:"Asset Hub"}),"."]}),"\n",(0,a.jsx)(s.h3,{id:"creating-a-preimage",children:"Creating a Preimage"}),"\n",(0,a.jsxs)(s.p,{children:["The example below shows how to create a ",(0,a.jsx)(s.a,{href:"../general/glossary#preimage",children:"preimage"})," for a transaction\nthat requests 100 USDT from AssetHub."]}),"\n",(0,a.jsxs)(s.ul,{children:["\n",(0,a.jsxs)(s.li,{children:["Navigate to ",(0,a.jsx)(s.a,{href:"https://polkadot.js.org/apps/#/preimages",children:"Polkadot-JS UI > Governance > Referenda"}),"\nand then click on Add Preimage."]}),"\n",(0,a.jsx)(s.li,{children:"Select the account to submit the preimage."}),"\n",(0,a.jsxs)(s.li,{children:["Choose the ",(0,a.jsx)(s.code,{children:"treasury"}),' pallet in the "propose" dropdown and the\n',(0,a.jsx)(s.code,{children:"spend(assetKind, amount, beneficiary, validFrom)"})," call."]}),"\n"]}),"\n",(0,a.jsx)(s.p,{children:"Now, let's go through each field one-by-one and fill them in accordingly:"}),"\n",(0,a.jsx)(s.h3,{id:"specifying-asset-kind",children:"Specifying Asset Kind"}),"\n",(0,a.jsxs)(s.p,{children:[(0,a.jsx)(s.code,{children:"assetKind"})," refers to the asset to be used, specified via XCM. In short, we need to be able to find:"]}),"\n",(0,a.jsxs)(s.ul,{children:["\n",(0,a.jsx)(s.li,{children:"The relative location of the asset, and"}),"\n",(0,a.jsx)(s.li,{children:"How it is identified within this location."}),"\n"]}),"\n",(0,a.jsx)(s.p,{children:"For this example, we are using USDT, which from the perspective of the relay chain would be:"}),"\n",(0,a.jsx)(s.p,{children:(0,a.jsx)(s.code,{children:"Parachain 1000 (AssetHub) > AssetId (Concrete) > PalletInstance 50 > General Index 1984"})}),"\n",(0,a.jsxs)(s.p,{children:["First, we specify the location - in this case, Asset Hub (parachain 1,000). ",(0,a.jsx)(s.code,{children:"PalletInstance 50"}),"\nrefers to the Assets pallet instance on Asset Hub. The general index is ",(0,a.jsx)(s.code,{children:"1984"}),", which is the ID of\nUSDT in this instance of the Assets pallet."]}),"\n",(0,a.jsxs)(s.admonition,{title:"Bug on Polkadot-JS UI",type:"caution",children:[(0,a.jsxs)(s.p,{children:["As the Polkadot-JS UI is interpreting the general index in DOT, it multiplies the entered values\nwith ",(0,a.jsx)(s.code,{children:"10000000000"})," (As DOT token has 10 decimals) and places it in the ",(0,a.jsx)(s.code,{children:"u128"})," argument. As we would\nlike to have ",(0,a.jsx)(s.code,{children:"1984"})," as the input argument, we can offset this UI induced error by entering\n",(0,a.jsx)(s.code,{children:"0.0000001984"}),"."]}),(0,a.jsxs)(s.p,{children:["The issue on Polkadot-JS repo can be tracked\n",(0,a.jsx)(s.a,{href:"https://github.com/polkadot-js/apps/issues/10430",children:"here"}),"."]})]}),"\n",(0,a.jsxs)(s.p,{children:["Here is how the final ",(0,a.jsx)(s.code,{children:"assetKind"})," field should look:"]}),"\n",(0,a.jsx)(s.p,{children:(0,a.jsx)(s.img,{alt:"Asset Kind",src:n(44855).A+"",width:"1564",height:"1316"})}),"\n",(0,a.jsx)(s.h3,{id:"specifying-the-amount",children:"Specifying the Amount"}),"\n",(0,a.jsxs)(s.p,{children:["The amount should be simply the amount of USDT, where each ",(0,a.jsx)(s.code,{children:"1"})," USDT is ",(0,a.jsx)(s.code,{children:"1000000"}),". Because we are\nasking for 100 USDT, we put ",(0,a.jsx)(s.code,{children:"100000000"})," as the input for the amount."]}),"\n",(0,a.jsxs)(s.admonition,{title:"Bug on Polkadot-JS UI",type:"caution",children:[(0,a.jsxs)(s.p,{children:["As the Polkadot-JS UI is interpreting the asset balance in DOT, it multiplies the entered values\nwith ",(0,a.jsx)(s.code,{children:"10000000000"})," (As DOT token has 10 decimals) and places it in the ",(0,a.jsx)(s.code,{children:"u128"})," argument. As we would\nlike to have ",(0,a.jsx)(s.code,{children:"100000000"})," as the input argument, we can offset this UI induced error by entering\n",(0,a.jsx)(s.code,{children:"0.01"})," for this particular example where we like to input 100 USDT."]}),(0,a.jsxs)(s.p,{children:["The issue on Polkadot-JS repo can be tracked\n",(0,a.jsx)(s.a,{href:"https://github.com/polkadot-js/apps/issues/10430",children:"here"}),"."]})]}),"\n",(0,a.jsx)(s.p,{children:(0,a.jsx)(s.img,{alt:"Asset Value, Beneficiary and ValidFrom",src:n(22192).A+"",width:"1591",height:"1279"})}),"\n",(0,a.jsx)(s.h3,{id:"specifying-the-beneficiary",children:"Specifying the Beneficiary"}),"\n",(0,a.jsxs)(s.p,{children:["The beneficiary account will be one on Asset Hub. For this reason, the XCM junction must be\nspecified as follows, with one junction (",(0,a.jsx)(s.code,{children:"X1"}),") and the beneficiary account (",(0,a.jsx)(s.code,{children:"AccountId32"}),"), which is\nan account address on the chain."]}),"\n",(0,a.jsxs)(s.h3,{id:"specifying-validfrom-optional",children:["Specifying ",(0,a.jsx)(s.code,{children:"validFrom"})," (optional)"]}),"\n",(0,a.jsxs)(s.p,{children:["The ",(0,a.jsx)(s.code,{children:"validFrom"})," field is optional, and refers to the block height of the relay chain upon which the\npayout can be issued. If the ",(0,a.jsx)(s.code,{children:"validFrom"})," parameter is not set, the spend can be paid out immediately\nafter approval. For more information on this field, refer to the\n",(0,a.jsx)(s.a,{href:"#creating-a-staged-proposal-with-validfrom",children:"guide below"}),"."]}),"\n",(0,a.jsx)(s.p,{children:"The final call should look like the following, where we:"}),"\n",(0,a.jsxs)(s.ul,{children:["\n",(0,a.jsxs)(s.li,{children:["Specify our asset as ",(0,a.jsx)(s.strong,{children:"USDT"})," on ",(0,a.jsx)(s.strong,{children:"Asset Hub"}),"."]}),"\n",(0,a.jsxs)(s.li,{children:["Specify the ",(0,a.jsx)(s.strong,{children:"amount"})," of ",(0,a.jsx)(s.strong,{children:"USDT"})," (100)."]}),"\n",(0,a.jsx)(s.li,{children:"Specify the beneficiary address."}),"\n",(0,a.jsxs)(s.li,{children:["If applicable, use the ",(0,a.jsx)(s.code,{children:"validFrom"})," field to specify a block number upon which the payout becomes\nvalid."]}),"\n"]}),"\n",(0,a.jsx)(s.p,{children:"The next steps are to:"}),"\n",(0,a.jsxs)(s.ul,{children:["\n",(0,a.jsx)(s.li,{children:"Copy the preimage (and its length)"}),"\n",(0,a.jsx)(s.li,{children:"Sign and submit the preimage"}),"\n"]}),"\n",(0,a.jsxs)(s.p,{children:["Once this is finished, one may submit a proposal\n",(0,a.jsx)(s.a,{href:"#submit-a-treasury-track-referendum",children:"as stated above"}),". Keep in mind one will also need to\n",(0,a.jsx)(s.a,{href:"#place-a-decision-deposit-for-the-treasury-track-referendum",children:"provide the decision deposit as well"}),"."]}),"\n",(0,a.jsx)(s.h3,{id:"manually-claiming-payouts",children:"Manually Claiming Payouts"}),"\n",(0,a.jsxs)(s.p,{children:["In order to claim the spend, you must manually call the ",(0,a.jsx)(s.code,{children:"treasury.payout"})," extrinsic via a ",(0,a.jsx)(s.code,{children:"Signed"}),"\norigin. The ",(0,a.jsx)(s.code,{children:"spendID"})," for the pending payout can be queried on-chain through Polkadot-JS UI >\nDeveloper > Chain State > Storage > treasury > spends and unselect the include option and then click\non the plus button to the right."]}),"\n",(0,a.jsx)(s.p,{children:(0,a.jsx)(s.img,{alt:"payout",src:n(88195).A+"",width:"2768",height:"1370"})}),"\n",(0,a.jsxs)(s.p,{children:["From the list of spends, find the ",(0,a.jsx)(s.code,{children:"spendID"})," of your respetive payout and issue the payout extrinsic."]}),"\n",(0,a.jsx)(s.admonition,{title:"payout example",type:"tip",children:(0,a.jsxs)(s.p,{children:["To claim the first payout of ",(0,a.jsx)(s.a,{href:"https://kusama.subsquare.io/referenda/382?tab=call",children:"Referendum 382"})," on\nKusama, ",(0,a.jsx)(s.a,{href:"https://kusama.subscan.io/extrinsic/23061444-2",children:"this payout extrinsic"})," was issued. After\nissuing the payout extrinsic, the status of the payout changes from ",(0,a.jsx)(s.code,{children:"pending"})," to ",(0,a.jsx)(s.code,{children:"Attempted"})," with a\nreference to a payment ID. If the payout is successful, the balance on Asset Hub should be updated.\n",(0,a.jsx)(s.a,{href:"https://assethub-kusama.subscan.io/extrinsic/6923602-0",children:"Here"})," is the transfer extrinsic on Asset\nHub for the first payout of ",(0,a.jsx)(s.a,{href:"https://kusama.subscan.io/referenda_v2/382",children:"Referendum 382"}),"."]})}),"\n",(0,a.jsxs)(s.p,{children:["To clear the on-chain storage of a successful or expired spend, Treasury pallet's ",(0,a.jsx)(s.code,{children:"checkStatus"}),"\nextrinsic can be used. The transaction fees paid for issuing this extrinsic will be refunded."]}),"\n",(0,a.jsx)(s.h3,{id:"proposing-a-void-for-a-staged-proposal",children:'Proposing a "Void" for a Staged Proposal'}),"\n",(0,a.jsxs)(s.p,{children:["If a proposal that hasn't completed all of its spends needs to be voided, the ",(0,a.jsx)(s.code,{children:"treasury.voidSpend"}),"\nextrinsic can be utilized via a governance proposal."]}),"\n",(0,a.jsx)(s.admonition,{title:"Example proposal - Voiding a Treasury Spend",type:"tip",children:(0,a.jsxs)(s.p,{children:["For reference, check the referenda on Kusama that\n",(0,a.jsx)(s.a,{href:"https://kusama.subsquare.io/referenda/391",children:"tests VoidSpend functionality for Treasury Payouts"}),".\nThrough this referenda, a treasury spend was\n",(0,a.jsx)(s.a,{href:"https://kusama.subscan.io/event?page=1&time_dimension=date&module=treasury&event_id=assetspendvoided",children:"successfully voided"}),"."]})}),"\n",(0,a.jsx)(s.h2,{id:"submit-treasury-proposal-via-polkassembly",children:"Submit Treasury Proposal via Polkassembly"}),"\n",(0,a.jsxs)(s.p,{children:["To submit a treasury track referendum via ",(0,a.jsx)(s.a,{href:"https://polkadot.polkassembly.io/opengov",children:"Polkassembly"}),"\nclick on the FAB button in the bottom right corner. Then,"]}),"\n",(0,a.jsxs)(s.ul,{children:["\n",(0,a.jsxs)(s.li,{children:["\n",(0,a.jsx)(s.p,{children:'Click on "Create Treasury Proposal" and choose an address for the proposer.'}),"\n"]}),"\n",(0,a.jsxs)(s.li,{children:["\n",(0,a.jsx)(s.p,{children:"After choosing an address, you will enter a three-stage guideline:"}),"\n",(0,a.jsxs)(s.ul,{children:["\n",(0,a.jsx)(s.li,{children:"Write a proposal: you can add a detailed description for the proposal, which will be stored on\nPolkassembly. Alternatively, you can link an existing discussion post."}),"\n"]}),"\n",(0,a.jsx)(s.p,{children:(0,a.jsx)(s.img,{alt:"polkassembly-write-proposal",src:n(14879).A+"",width:"2130",height:"1596"})}),"\n",(0,a.jsxs)(s.ul,{children:["\n",(0,a.jsx)(s.li,{children:"Create a preimage: an existing preimage can be linked, or a new one can be created. To create a\npreimage, add the beneficiary address and the token amount. The track will be auto-selected and\nthe user can proceed with the creation of a preimage."}),"\n"]}),"\n",(0,a.jsx)(s.p,{children:(0,a.jsx)(s.img,{alt:"polkassembly-create-preimage",src:n(94664).A+"",width:"2154",height:"1598"})}),"\n",(0,a.jsxs)(s.ul,{children:["\n",(0,a.jsx)(s.li,{children:"Create a proposal: final confirmation about the proposal creation. The description of the\nproposal and the preimage are automatically linked to the proposal."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,a.jsx)(s.h2,{id:"requesting-tips-from-the-treasury",children:"Requesting Tips from the Treasury"}),"\n",(0,a.jsxs)(s.p,{children:["To request a tip funded by the treasury, you can follow the above steps for\n",(0,a.jsx)(s.a,{href:"#creating-a-treasury-proposal",children:"creating a treasury proposal"})," but instead of submitting the proposal\nto the ",(0,a.jsx)(s.code,{children:"32 / Small Spender"})," track, you will need to submit it to the ",(0,a.jsx)(s.code,{children:"30 / Small Tipper"})," or\n",(0,a.jsx)(s.code,{children:"31 / Big Tipper"})," tracks depending on the number of tokens to be requested."]}),"\n",(0,a.jsx)(s.p,{children:"Briefly, you will need to:"}),"\n",(0,a.jsxs)(s.ul,{children:["\n",(0,a.jsxs)(s.li,{children:["Create a preimage using the ",(0,a.jsx)(s.code,{children:"treasury.spendLocal"})," extrinsic and specifying the number of tokens\nand the beneficiary of the tip"]}),"\n",(0,a.jsxs)(s.li,{children:["Submit a proposal to the right track (i.e. ",(0,a.jsx)(s.code,{children:"30"})," or ",(0,a.jsx)(s.code,{children:"31"}),") using the preimage hash"]}),"\n",(0,a.jsxs)(s.li,{children:["Once you started the referendum go to ",(0,a.jsx)(s.a,{href:"https://polkassembly.io/",children:"Polkassembly"}),", log in with the\nproposer account and edit the referendum details"]}),"\n",(0,a.jsxs)(s.li,{children:["Notify ",(0,a.jsx)(s.a,{href:"https://matrix.to/#/#Polkadot-Direction:parity.io",children:"the Polkadot Direction Element Channel"}),"\nor ",(0,a.jsx)(s.a,{href:"https://matrix.to/#/#Polkadot-Direction:parity.io",children:"the Kusama Direction Element Channel"})," about\nyour referendum"]}),"\n",(0,a.jsxs)(s.li,{children:["Place the decision deposit\n",(0,a.jsx)(s.a,{href:"/docs/chain-state-values#opengov-referendum-timeout",children:"before the timeout"})]}),"\n",(0,a.jsxs)(s.li,{children:["Once the referendum ends you can\n",(0,a.jsx)(s.a,{href:"/docs/learn-guides-polkadot-opengov#claiming-the-preimage-and-decision-deposits",children:"claim the preimage and decision deposits back"})]}),"\n"]})]})}function p(e={}){const{wrapper:s}={...(0,t.R)(),...e.components};return s?(0,a.jsx)(s,{...e,children:(0,a.jsx)(h,{...e})}):h(e)}},67141:(e,s,n)=>{n.d(s,{A:()=>t});var i=n(96540),a=n(74848);const t=function(e){var s,n=e.message,t=(0,i.useState)(!0),r=t[0],o=t[1];return(0,a.jsx)(a.Fragment,{children:r&&(0,a.jsxs)("div",{className:"message-box",children:[(0,a.jsx)("button",{className:"close-button",onClick:function(){o(!1)},children:"\u2716 "}),(0,a.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(s=n,s.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},22192:(e,s,n)=>{n.d(s,{A:()=>i});const i=n.p+"assets/images/spend-amount-account-validfrom-temp-51145f395b6786e783600e3665bc7fab.png"},44855:(e,s,n)=>{n.d(s,{A:()=>i});const i=n.p+"assets/images/spend-usdt-assethub-temp-4182c6d400d00e1c4d8e94efc96dadcf.png"},94664:(e,s,n)=>{n.d(s,{A:()=>i});const i=n.p+"assets/images/polkassembly-create-preimage-7396a8ce796d0f0dcad30d3edced8618.png"},14879:(e,s,n)=>{n.d(s,{A:()=>i});const i=n.p+"assets/images/polkassembly-write-proposal-a3ce8ab9303111f6003ac8103ba29507.png"},79087:(e,s,n)=>{n.d(s,{A:()=>i});const i=n.p+"assets/images/OpenGov-Treasury-Preimage-SpendLocal-693c955b1e3e27bb6c98a6aad4d1b697.png"},44751:(e,s,n)=>{n.d(s,{A:()=>i});const i=n.p+"assets/images/submit-proposal-treasury-3948a231c4f3162a8680ad052af9e903.png"},88195:(e,s,n)=>{n.d(s,{A:()=>i});const i=n.p+"assets/images/treasury-multistage-payout-spend-id-54e73a1e8829cb911284ad15654d5661.png"},39555:(e,s,n)=>{n.d(s,{A:()=>i});const i=n.p+"assets/images/treasury-preimage-hash-05bb427d21d3ecf7d5e38418a0a0f4ed.png"},52540:(e,s,n)=>{n.d(s,{A:()=>i});const i=n.p+"assets/images/treasury-proposal-decision-deposit-849d27481ba0134acf743f7474d8f6a4.png"},28453:(e,s,n)=>{n.d(s,{R:()=>r,x:()=>o});var i=n(96540);const a={},t=i.createContext(a);function r(e){const s=i.useContext(t);return i.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function o(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:r(e.components),i.createElement(t.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/efba78c5.6527cff1.js b/assets/js/efba78c5.6527cff1.js deleted file mode 100644 index 257bc06ac91c..000000000000 --- a/assets/js/efba78c5.6527cff1.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3368],{75273:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>d,contentTitle:()=>n,default:()=>l,frontMatter:()=>a,metadata:()=>r,toc:()=>c});var o=t(74848),i=t(28453);const a={id:"polkadot-ecosystem-overview",title:"Polkadot Ecosystem Overview",sidebar_label:"Polkadot Ecosystem Overview",description:"High-level metrics for Polkadot Ecosystem.",keywords:["polkadot","governance","dashboard","dune"],slug:"../polkadot-ecosystem-overview"},n="Polkadot Ecosystem Overview",r={id:"general/dune-analytics/polkadot-ecosystem-overview",title:"Polkadot Ecosystem Overview",description:"High-level metrics for Polkadot Ecosystem.",source:"@site/../docs/general/dune-analytics/polkadot-ecosystem-overview.md",sourceDirName:"general/dune-analytics",slug:"/general/polkadot-ecosystem-overview",permalink:"/docs/general/polkadot-ecosystem-overview",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/polkadot-ecosystem-overview.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1727991122e3,frontMatter:{id:"polkadot-ecosystem-overview",title:"Polkadot Ecosystem Overview",sidebar_label:"Polkadot Ecosystem Overview",description:"High-level metrics for Polkadot Ecosystem.",keywords:["polkadot","governance","dashboard","dune"],slug:"../polkadot-ecosystem-overview"},sidebar:"docs",previous:{title:"Dune Analytics",permalink:"/docs/general/dune-analytics"},next:{title:"Onbording Status & Key Dashboards",permalink:"/docs/general/onboarding-status-and-key-dashboards"}},d={},c=[{value:"Activities Metrics",id:"activities-metrics",level:3},{value:"Polkadot Treasury Flow",id:"polkadot-treasury-flow",level:3},{value:"Polkadot Network & Security",id:"polkadot-network--security",level:3},{value:"XCM Metrics",id:"xcm-metrics",level:3}];function h(e){const s={a:"a",admonition:"admonition",h1:"h1",h3:"h3",header:"header",li:"li",p:"p",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(s.header,{children:(0,o.jsx)(s.h1,{id:"polkadot-ecosystem-overview",children:"Polkadot Ecosystem Overview"})}),"\n",(0,o.jsx)(s.p,{children:"The Polkadot ecosystem is a dynamic and evolving network that aims to enable different parachains to\ntransfer messages and value in a trust-free fashion; sharing their unique features while pooling\ntheir security."}),"\n",(0,o.jsx)(s.p,{children:"In this overview, we provide insights to the vibrancy and growth of the Polkadot ecosystem.\nSpecifically, we highlight data on active accounts, extrinsics, events, and XCMs."}),"\n",(0,o.jsxs)(s.p,{children:[(0,o.jsx)(s.strong,{children:"View On Dune"}),": ",(0,o.jsx)(s.a,{href:"https://dune.com/substrate/polkadot",children:"Polkadot & Parachains Ecosystem Metrics"})]}),"\n",(0,o.jsxs)(s.admonition,{type:"info",children:[(0,o.jsxs)(s.p,{children:["This page only shows a high-level overview of the ecosystem metics. For an in-depth analysis, please\nvisit ",(0,o.jsx)(s.a,{href:"dune-analytics/polkadot-dashboards",children:"Polkadot Dashboards"})," and\n",(0,o.jsx)(s.a,{href:"dune-analytics/parachain-dashboards",children:"Parachain Dashboards"})," categories."]}),(0,o.jsx)(s.p,{children:"For example, following are some of topics you might be interested in:"}),(0,o.jsxs)(s.ul,{children:["\n",(0,o.jsxs)(s.li,{children:["For ",(0,o.jsx)(s.strong,{children:"stablecoins"}),", visit\n",(0,o.jsx)(s.a,{href:"dune-analytics/parachain-dashboards/assethub-dashboards",children:"Asset Hub Dashboards"})]}),"\n",(0,o.jsxs)(s.li,{children:["For Polkadot relay chain ",(0,o.jsx)(s.strong,{children:"treasury"}),", visit\n",(0,o.jsx)(s.a,{href:"dune-analytics/polkadot-dashboards/polkadot-dashboards-governance",children:"Polkadot Dashboards Governance"})]}),"\n",(0,o.jsxs)(s.li,{children:["For Polkadot ",(0,o.jsx)(s.strong,{children:"staking"}),", visit\n",(0,o.jsx)(s.a,{href:"dune-analytics/polkadot-dashboards/polkadot-dashboards-staking",children:"Polkadot Dashboards Staking"})]}),"\n",(0,o.jsxs)(s.li,{children:["For ",(0,o.jsx)(s.strong,{children:"NFTs"}),", visit ",(0,o.jsx)(s.a,{href:"dune-analytics/parachain-dashboards/unique-dashboards",children:"Unique Dashboards"})]}),"\n"]})]}),"\n",(0,o.jsx)(s.h3,{id:"activities-metrics",children:"Activities Metrics"}),"\n",(0,o.jsx)("iframe",{src:"https://dune.com/embeds/3547412/5969453/",height:"850",width:"100%"}),"\n",(0,o.jsx)("iframe",{src:"https://dune.com/embeds/3547412/6413909/",height:"850",width:"100%"}),"\n",(0,o.jsx)("iframe",{src:"https://dune.com/embeds/3547412/5969455/",height:"850",width:"100%"}),"\n",(0,o.jsx)("iframe",{src:"https://dune.com/embeds/3547412/5969231/",height:"850",width:"100%"}),"\n",(0,o.jsx)(s.h3,{id:"polkadot-treasury-flow",children:"Polkadot Treasury Flow"}),"\n",(0,o.jsx)("iframe",{src:"https://dune.com/embeds/3386769/5684359/",height:"350",width:"100%"}),"\n",(0,o.jsx)(s.h3,{id:"polkadot-network--security",children:"Polkadot Network & Security"}),"\n",(0,o.jsx)("iframe",{src:"https://dune.com/embeds/3334817/5587364/",height:"350",width:"100%"}),"\n",(0,o.jsx)("iframe",{src:"https://dune.com/embeds/3334817/5603258/",height:"350",width:"100%"}),"\n",(0,o.jsx)(s.h3,{id:"xcm-metrics",children:"XCM Metrics"}),"\n",(0,o.jsx)("iframe",{src:"https://dune.com/embeds/3505658/5895044/",height:"450",width:"100%"}),"\n",(0,o.jsx)("iframe",{src:"https://dune.com/embeds/3505637/5895025/",height:"450",width:"100%"}),"\n",(0,o.jsx)("iframe",{src:"https://dune.com/embeds/3839467/6457352/",height:"450",width:"100%"}),"\n",(0,o.jsx)("iframe",{src:"https://dune.com/embeds/3505658/6437879/",height:"450",width:"100%"}),"\n",(0,o.jsx)("iframe",{src:"https://dune.com/embeds/3505637/6437895/",height:"450",width:"100%"}),"\n",(0,o.jsx)("iframe",{src:"https://dune.com/embeds/3839467/6459749/",height:"450",width:"100%"}),"\n",(0,o.jsx)("iframe",{src:"https://dune.com/embeds/3507786/5898797/",height:"450",width:"100%"}),"\n",(0,o.jsx)("iframe",{src:"https://dune.com/embeds/3507755/5898758/",height:"450",width:"100%"}),"\n",(0,o.jsx)("iframe",{src:"https://dune.com/embeds/3507786/6437902/",height:"450",width:"100%"}),"\n",(0,o.jsx)("iframe",{src:"https://dune.com/embeds/3507755/6437907/",height:"450",width:"100%"})]})}function l(e={}){const{wrapper:s}={...(0,i.R)(),...e.components};return s?(0,o.jsx)(s,{...e,children:(0,o.jsx)(h,{...e})}):h(e)}},28453:(e,s,t)=>{t.d(s,{R:()=>n,x:()=>r});var o=t(96540);const i={},a=o.createContext(i);function n(e){const s=o.useContext(a);return o.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function r(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:n(e.components),o.createElement(a.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/efba78c5.a749d573.js b/assets/js/efba78c5.a749d573.js new file mode 100644 index 000000000000..2219be6e9d1e --- /dev/null +++ b/assets/js/efba78c5.a749d573.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3368],{40162:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>d,contentTitle:()=>r,default:()=>l,frontMatter:()=>n,metadata:()=>o,toc:()=>c});const o=JSON.parse('{"id":"general/dune-analytics/polkadot-ecosystem-overview","title":"Polkadot Ecosystem Overview","description":"High-level metrics for Polkadot Ecosystem.","source":"@site/../docs/general/dune-analytics/polkadot-ecosystem-overview.md","sourceDirName":"general/dune-analytics","slug":"/general/polkadot-ecosystem-overview","permalink":"/docs/general/polkadot-ecosystem-overview","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/polkadot-ecosystem-overview.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1727991122000,"frontMatter":{"id":"polkadot-ecosystem-overview","title":"Polkadot Ecosystem Overview","sidebar_label":"Polkadot Ecosystem Overview","description":"High-level metrics for Polkadot Ecosystem.","keywords":["polkadot","governance","dashboard","dune"],"slug":"../polkadot-ecosystem-overview"},"sidebar":"docs","previous":{"title":"Dune Analytics","permalink":"/docs/general/dune-analytics"},"next":{"title":"Onbording Status & Key Dashboards","permalink":"/docs/general/onboarding-status-and-key-dashboards"}}');var i=t(74848),a=t(28453);const n={id:"polkadot-ecosystem-overview",title:"Polkadot Ecosystem Overview",sidebar_label:"Polkadot Ecosystem Overview",description:"High-level metrics for Polkadot Ecosystem.",keywords:["polkadot","governance","dashboard","dune"],slug:"../polkadot-ecosystem-overview"},r="Polkadot Ecosystem Overview",d={},c=[{value:"Activities Metrics",id:"activities-metrics",level:3},{value:"Polkadot Treasury Flow",id:"polkadot-treasury-flow",level:3},{value:"Polkadot Network & Security",id:"polkadot-network--security",level:3},{value:"XCM Metrics",id:"xcm-metrics",level:3}];function h(e){const s={a:"a",admonition:"admonition",h1:"h1",h3:"h3",header:"header",li:"li",p:"p",strong:"strong",ul:"ul",...(0,a.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(s.header,{children:(0,i.jsx)(s.h1,{id:"polkadot-ecosystem-overview",children:"Polkadot Ecosystem Overview"})}),"\n",(0,i.jsx)(s.p,{children:"The Polkadot ecosystem is a dynamic and evolving network that aims to enable different parachains to\ntransfer messages and value in a trust-free fashion; sharing their unique features while pooling\ntheir security."}),"\n",(0,i.jsx)(s.p,{children:"In this overview, we provide insights to the vibrancy and growth of the Polkadot ecosystem.\nSpecifically, we highlight data on active accounts, extrinsics, events, and XCMs."}),"\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.strong,{children:"View On Dune"}),": ",(0,i.jsx)(s.a,{href:"https://dune.com/substrate/polkadot",children:"Polkadot & Parachains Ecosystem Metrics"})]}),"\n",(0,i.jsxs)(s.admonition,{type:"info",children:[(0,i.jsxs)(s.p,{children:["This page only shows a high-level overview of the ecosystem metics. For an in-depth analysis, please\nvisit ",(0,i.jsx)(s.a,{href:"dune-analytics/polkadot-dashboards",children:"Polkadot Dashboards"})," and\n",(0,i.jsx)(s.a,{href:"dune-analytics/parachain-dashboards",children:"Parachain Dashboards"})," categories."]}),(0,i.jsx)(s.p,{children:"For example, following are some of topics you might be interested in:"}),(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["For ",(0,i.jsx)(s.strong,{children:"stablecoins"}),", visit\n",(0,i.jsx)(s.a,{href:"dune-analytics/parachain-dashboards/assethub-dashboards",children:"Asset Hub Dashboards"})]}),"\n",(0,i.jsxs)(s.li,{children:["For Polkadot relay chain ",(0,i.jsx)(s.strong,{children:"treasury"}),", visit\n",(0,i.jsx)(s.a,{href:"dune-analytics/polkadot-dashboards/polkadot-dashboards-governance",children:"Polkadot Dashboards Governance"})]}),"\n",(0,i.jsxs)(s.li,{children:["For Polkadot ",(0,i.jsx)(s.strong,{children:"staking"}),", visit\n",(0,i.jsx)(s.a,{href:"dune-analytics/polkadot-dashboards/polkadot-dashboards-staking",children:"Polkadot Dashboards Staking"})]}),"\n",(0,i.jsxs)(s.li,{children:["For ",(0,i.jsx)(s.strong,{children:"NFTs"}),", visit ",(0,i.jsx)(s.a,{href:"dune-analytics/parachain-dashboards/unique-dashboards",children:"Unique Dashboards"})]}),"\n"]})]}),"\n",(0,i.jsx)(s.h3,{id:"activities-metrics",children:"Activities Metrics"}),"\n",(0,i.jsx)("iframe",{src:"https://dune.com/embeds/3547412/5969453/",height:"850",width:"100%"}),"\n",(0,i.jsx)("iframe",{src:"https://dune.com/embeds/3547412/6413909/",height:"850",width:"100%"}),"\n",(0,i.jsx)("iframe",{src:"https://dune.com/embeds/3547412/5969455/",height:"850",width:"100%"}),"\n",(0,i.jsx)("iframe",{src:"https://dune.com/embeds/3547412/5969231/",height:"850",width:"100%"}),"\n",(0,i.jsx)(s.h3,{id:"polkadot-treasury-flow",children:"Polkadot Treasury Flow"}),"\n",(0,i.jsx)("iframe",{src:"https://dune.com/embeds/3386769/5684359/",height:"350",width:"100%"}),"\n",(0,i.jsx)(s.h3,{id:"polkadot-network--security",children:"Polkadot Network & Security"}),"\n",(0,i.jsx)("iframe",{src:"https://dune.com/embeds/3334817/5587364/",height:"350",width:"100%"}),"\n",(0,i.jsx)("iframe",{src:"https://dune.com/embeds/3334817/5603258/",height:"350",width:"100%"}),"\n",(0,i.jsx)(s.h3,{id:"xcm-metrics",children:"XCM Metrics"}),"\n",(0,i.jsx)("iframe",{src:"https://dune.com/embeds/3505658/5895044/",height:"450",width:"100%"}),"\n",(0,i.jsx)("iframe",{src:"https://dune.com/embeds/3505637/5895025/",height:"450",width:"100%"}),"\n",(0,i.jsx)("iframe",{src:"https://dune.com/embeds/3839467/6457352/",height:"450",width:"100%"}),"\n",(0,i.jsx)("iframe",{src:"https://dune.com/embeds/3505658/6437879/",height:"450",width:"100%"}),"\n",(0,i.jsx)("iframe",{src:"https://dune.com/embeds/3505637/6437895/",height:"450",width:"100%"}),"\n",(0,i.jsx)("iframe",{src:"https://dune.com/embeds/3839467/6459749/",height:"450",width:"100%"}),"\n",(0,i.jsx)("iframe",{src:"https://dune.com/embeds/3507786/5898797/",height:"450",width:"100%"}),"\n",(0,i.jsx)("iframe",{src:"https://dune.com/embeds/3507755/5898758/",height:"450",width:"100%"}),"\n",(0,i.jsx)("iframe",{src:"https://dune.com/embeds/3507786/6437902/",height:"450",width:"100%"}),"\n",(0,i.jsx)("iframe",{src:"https://dune.com/embeds/3507755/6437907/",height:"450",width:"100%"})]})}function l(e={}){const{wrapper:s}={...(0,a.R)(),...e.components};return s?(0,i.jsx)(s,{...e,children:(0,i.jsx)(h,{...e})}):h(e)}},28453:(e,s,t)=>{t.d(s,{R:()=>n,x:()=>r});var o=t(96540);const i={},a=o.createContext(i);function n(e){const s=o.useContext(a);return o.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function r(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:n(e.components),o.createElement(a.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f0ff685a.143e21e7.js b/assets/js/f0ff685a.143e21e7.js new file mode 100644 index 000000000000..8ff2b1a93e7c --- /dev/null +++ b/assets/js/f0ff685a.143e21e7.js @@ -0,0 +1 @@ +(self.webpackChunk=self.webpackChunk||[]).push([[2393],{11854:(e,t,o)=>{"use strict";o.r(t),o.d(t,{assets:()=>l,contentTitle:()=>c,default:()=>u,frontMatter:()=>i,metadata:()=>n,toc:()=>d});const n=JSON.parse('{"id":"learn/learn-guides-accounts-proxy","title":"Polkadot-JS Guides about Proxy Accounts","description":"Polkadot-JS Guides about Proxy Accounts","source":"@site/../docs/learn/learn-guides-accounts-proxy.md","sourceDirName":"learn","slug":"/learn-guides-accounts-proxy","permalink":"/docs/learn-guides-accounts-proxy","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-accounts-proxy.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1729847256000,"frontMatter":{"id":"learn-guides-accounts-proxy","title":"Polkadot-JS Guides about Proxy Accounts","sidebar_label":"Proxy Guides","description":"Polkadot-JS Guides about Proxy Accounts","keyword":["guides","polkadot-js","accounts","proxy"],"slug":"../learn-guides-accounts-proxy"},"sidebar":"docs","previous":{"title":"Multisig Guides","permalink":"/docs/learn-guides-accounts-multisig"},"next":{"title":"Pure Proxy Guides","permalink":"/docs/learn-guides-accounts-proxy-pure"}}');var a=o(74848),s=o(28453),r=(o(47379),o(67141));const i={id:"learn-guides-accounts-proxy",title:"Polkadot-JS Guides about Proxy Accounts",sidebar_label:"Proxy Guides",description:"Polkadot-JS Guides about Proxy Accounts",keyword:["guides","polkadot-js","accounts","proxy"],slug:"../learn-guides-accounts-proxy"},c=void 0,l={},d=[{value:"Creating Proxy with Polkadot-JS",id:"creating-proxy-with-polkadot-js",level:2},{value:"Removing Proxy with Polkadot-JS",id:"removing-proxy-with-polkadot-js",level:2},{value:"View your Proxy on Polkadot-JS",id:"view-your-proxy-on-polkadot-js",level:2},{value:"Set-up and Use of Time-delayed Proxies with Polkadot-JS",id:"set-up-and-use-of-time-delayed-proxies-with-polkadot-js",level:2},{value:"Proxy calls",id:"proxy-calls",level:2},{value:"Nested Proxy Calls",id:"nested-proxy-calls",level:3}];function p(e){const t={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",p:"p",...(0,s.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(r.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the Polkadot-JS UI, you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,a.jsxs)(t.p,{children:["Proxies allow users to use an account (it can be in cold storage or a hot wallet) less frequently\nbut actively participate in the network with the weight of the tokens in that account. Proxies are\nallowed to perform a limited amount of actions related to specific\n",(0,a.jsx)(t.a,{href:"https://docs.substrate.io/reference/frame-pallets/",children:"substrate pallets"})," on behalf of another\naccount. The videos below contain more information about using proxies."]}),"\n",(0,a.jsxs)("div",{className:"row",children:[(0,a.jsxs)("div",{className:"col text--center",children:[(0,a.jsx)("a",{href:"https://www.youtube.com/watch?v=1tcygkq52tU",children:(0,a.jsx)("img",{src:"https://img.youtube.com/vi/1tcygkq52tU/0.jpg",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,a.jsx)("p",{children:(0,a.jsx)("a",{href:"https://www.youtube.com/watch?v=1tcygkq52tU",children:"Proxy Accounts Tutorial"})})]}),(0,a.jsxs)("div",{className:"col text--center",children:[(0,a.jsx)("a",{href:"https://www.youtube.com/watch?v=Qv_nJVcvQr8&t=4437s",children:(0,a.jsx)("img",{src:"https://img.youtube.com/vi/Qv_nJVcvQr8/0.jpg",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,a.jsx)("p",{children:(0,a.jsx)("a",{href:"https://www.youtube.com/watch?v=Qv_nJVcvQr8&t=4437s",children:"Proxy Accounts Advanced Tutorial"})})]})]}),"\n",(0,a.jsx)(t.admonition,{title:"Know how to check the calls and pallets accessible by proxies",type:"tip",children:(0,a.jsxs)(t.p,{children:["For the latest information on the calls and pallets that can be fully accessed by proxies, check the\n",(0,a.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/153543b0c8c582e73f520e5c08cbe33bddfb5f69/runtime/polkadot/src/lib.rs#L1158",children:"source code in the runtime folder"}),"\non the ",(0,a.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk",children:"Polkadot repository"})]})}),"\n",(0,a.jsx)(t.h2,{id:"creating-proxy-with-polkadot-js",children:"Creating Proxy with Polkadot-JS"}),"\n",(0,a.jsxs)(t.p,{children:["To create a proxy account with Polkadot-JS read\n",(0,a.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000182179-how-to-create-a-proxy-account",children:"this support article"}),"."]}),"\n",(0,a.jsx)(t.h2,{id:"removing-proxy-with-polkadot-js",children:"Removing Proxy with Polkadot-JS"}),"\n",(0,a.jsxs)(t.p,{children:['Read the section "Removing Proxies" on\n',(0,a.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000182179-how-to-create-a-proxy-account",children:"this support page"}),"\nto learn how to remove proxies."]}),"\n",(0,a.jsx)(t.h2,{id:"view-your-proxy-on-polkadot-js",children:"View your Proxy on Polkadot-JS"}),"\n",(0,a.jsxs)(t.p,{children:["To view your proxy, just go on the ",(0,a.jsx)(t.em,{children:"Accounts"})," menu in the Polkadot-JS UI, next to the proxied\naccount you will notice a blue icon. Hover on it, and you will see ",(0,a.jsx)(t.em,{children:"Proxy overview"}),". Click on it and\nyou will be presented with a list of all proxies for that account."]}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"polkadot_view_proxies",src:o(2997).A+"",width:"1842",height:"120"})}),"\n",(0,a.jsxs)(t.p,{children:["Additionally, you can head over to the ",(0,a.jsx)(t.em,{children:"Chain State"})," tab (underneath the ",(0,a.jsx)(t.em,{children:"Developer"})," menu) on\n",(0,a.jsx)(t.a,{href:"https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc.polkadot.io#/chainstate",children:"Polkadot-JS Apps"}),". If\nyou've created your proxy on a Polkadot account, it is required to change your network accordingly\nusing the top left navigation button. On this page, the proxy pallet should be selected, returning\nthe announcements and proxies functions. The proxies function will allow you to see your created\nproxies for either one account or for all accounts (using the toggle will enable this). Proxy\nannouncements are what time lock proxies do to announce they are going to conduct an action."]}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"polkadot_view_proxies_dev",src:o(16809).A+"",width:"1871",height:"820"})}),"\n",(0,a.jsx)(t.h2,{id:"set-up-and-use-of-time-delayed-proxies-with-polkadot-js",children:"Set-up and Use of Time-delayed Proxies with Polkadot-JS"}),"\n",(0,a.jsx)(t.admonition,{type:"info",children:(0,a.jsxs)(t.p,{children:["See ",(0,a.jsx)(t.a,{href:"https://youtu.be/3L7Vu2SX0PE",children:"this video tutorial"})," to learn how you can setup and use\ntime-delayed proxies. The video goes through the example below."]})}),"\n",(0,a.jsxs)(t.p,{children:["Initially the time time-delayed proxy announces its intended action using the ",(0,a.jsx)(t.code,{children:"proxy.announce"}),"\nextrinsic and will wait for the number of blocks defined in the delay time before executing it. The\nproxy will include the hash of the intended function call in the announcement. Within this time\nwindow, the intended action may be canceled by accounts that control the proxy. This can be done by\nthe proxy itself using the ",(0,a.jsx)(t.code,{children:"proxy.removeAnnouncement"})," extrinsic or by the proxied account using the\nthe ",(0,a.jsx)(t.code,{children:"proxy.rejectAnnouncement"})," extrinsic. Now we can use proxies knowing that any malicious actions\ncan be noticed and reverted within a delay period. After the time-delay, the proxy can use the\n",(0,a.jsx)(t.code,{children:"proxy.proxyAnnounced"})," extrinsic to execute the announced call."]}),"\n",(0,a.jsx)(t.p,{children:"Let's take for example the stash account Eleanor setting Bob as a time-delayed staking proxy. In\nthis way, if Bob submits an extrinsic to change the reward destination, such extrinsic can be\nrejected by Eleanor. This implies that Eleanor monitors Bob, and that within the time-delay she can\nspot the announced extrinsic. Eleanor can check all the proxy call announcements made by her\naccount's proxies on-chain. On Polkadot-JS UI, go to Developer > Storage > Proxy > Announcements to\ncheck the hashes for the calls made by the proxy accounts and the block height at which they are\nenabled for execution."}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"time-delayed proxies",src:o(25225).A+"",width:"1920",height:"800"})}),"\n",(0,a.jsx)(t.admonition,{type:"info",children:(0,a.jsxs)(t.p,{children:["If you try to use ",(0,a.jsx)(t.code,{children:"proxy.proxyAnnounced"}),' to execute the call within the time-delay window you will\nget an error "Proxy unannounced" since the announcement will be done after the time delay. Also note\nthat regular ',(0,a.jsx)(t.code,{children:"proxy.proxy"})," calls do not work with time-delayed proxies, you need to announce the\ncall first and then execute the announced call on a separate transaction."]})}),"\n",(0,a.jsx)(t.h2,{id:"proxy-calls",children:"Proxy calls"}),"\n",(0,a.jsxs)(t.p,{children:["Proxy calls are used by proxies to call proxied accounts. These calls are important for example in\nthe case of ",(0,a.jsx)(t.em,{children:"pure"})," proxies, as any attempt to sign transactions with a ",(0,a.jsx)(t.em,{children:"pure"})," proxy will fail. For\nmore details see the ",(0,a.jsx)(t.a,{href:"/docs/learn-proxies-pure",children:"dedicated section about pure proxies"}),"."]}),"\n",(0,a.jsx)(t.h3,{id:"nested-proxy-calls",children:"Nested Proxy Calls"}),"\n",(0,a.jsxs)(t.p,{children:["As the term suggests, nested proxy calls are proxy calls within proxy calls. Such calls are needed\nif there are proxied accounts that are proxies themselves. In the example diagram below, Alice has a\nstash account that has a ",(0,a.jsx)(t.em,{children:"staking"})," proxy account, P-C. P-C is a ",(0,a.jsx)(t.em,{children:"pure"})," proxy, a proxied account\noriginally spawned by Charly that is now an ",(0,a.jsx)(t.em,{children:"any"})," proxy of P-C and signs everything on its behalf."]}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"nested proxy calls",src:o(42030).A+"",width:"1920",height:"800"})}),"\n",(0,a.jsxs)(t.p,{children:["For example, to bond more funds, Charly needs to submit a ",(0,a.jsx)(t.code,{children:"prox.proxy"})," extrinsic to P-C, which in\nturn submits a ",(0,a.jsx)(t.code,{children:"proxy.proxy"})," extrinsic to Alice including for example a ",(0,a.jsx)(t.code,{children:"staking.bondExtra"}),"\nextrinsic, specifying the number of extra tokens that need to be bounded. If Charly wants to leave,\na new account can take his place as any proxy (before Charly leaves!). There is no need to change\nthe staking proxy account. Also, Alice is the only one who can remove P-C as a staking proxy, and\nP-C can only perform staking-related tasks. For example, P-C cannot send funds out from Alice's\naccount."]}),"\n",(0,a.jsxs)(t.p,{children:["Proxy calls can be done using the Extrinsic Tab in the Polkadot-JS UI. Nested proxy calls can be\ndone by calling each ",(0,a.jsx)(t.code,{children:"proxy.proxy"})," extrinsic separately, or in some cases by just calling the last\n",(0,a.jsx)(t.code,{children:"proxy.proxy"})," extrinsic. In the diagram above, submitting the proxy call from P-C to Alice will\nautomatically ask for Charly's signature. Thus one proxy call will trigger the second one because\nCharly's is the only ",(0,a.jsx)(t.em,{children:"any"})," proxy of P-C, and P-C cannot sign anything. While if we want to use Bob's\naccount we will need to submit all three proxy calls."]})]})}function u(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,a.jsx)(t,{...e,children:(0,a.jsx)(p,{...e})}):p(e)}},67141:(e,t,o)=>{"use strict";o.d(t,{A:()=>s});var n=o(96540),a=o(74848);const s=function(e){var t,o=e.message,s=(0,n.useState)(!0),r=s[0],i=s[1];return(0,a.jsx)(a.Fragment,{children:r&&(0,a.jsxs)("div",{className:"message-box",children:[(0,a.jsx)("button",{className:"close-button",onClick:function(){i(!1)},children:"\u2716 "}),(0,a.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(t=o,t.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},47379:(e,t,o)=>{"use strict";o.d(t,{A:()=>u});var n=o(90675),a=o(10467),s=o(96540),r=o(19588),i=o(2026),c=o(11135);function l(e,t,o){return d.apply(this,arguments)}function d(){return(d=(0,a.A)((0,n.A)().mark((function e(t,o,a){var s,c,l,d,p;return(0,n.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s=void 0,c=void 0,e.t0=t,e.next="polkadot"===e.t0?5:"kusama"===e.t0?7:"statemine"===e.t0?9:"statemint"===e.t0?11:"polkadotpeople"===e.t0?13:"kusamapeople"===e.t0?15:17;break;case 5:return s="wss://rpc.polkadot.io",e.abrupt("break",18);case 7:return s="wss://kusama-rpc.polkadot.io/",e.abrupt("break",18);case 9:return s="wss://statemine-rpc.polkadot.io/",e.abrupt("break",18);case 11:return s="wss://statemint-rpc.polkadot.io/",e.abrupt("break",18);case 13:return s="wss://polkadot-people-rpc.polkadot.io/",e.abrupt("break",18);case 15:return s="wss://kusama-people-rpc.polkadot.io/",e.abrupt("break",18);case 17:console.log("Unknown socket url provided, no connection made.");case 18:if(void 0!==s){e.next=22;break}return e.abrupt("return");case 22:return l=new r.E(s),e.next=25,i.G.create({provider:l});case 25:d=e.sent,(p=o.split(".")).forEach((function(e){e in d&&(d=d[e])})),e.t1=p[0],e.next="consts"===e.t1?31:"query"===e.t1?33:38;break;case 31:return c=d.toString(),e.abrupt("break",39);case 33:return e.next=35,d();case 35:return c=(c=e.sent).toString(),e.abrupt("break",39);case 38:console.log("Unknown path prefix ("+p[0]+") in "+o);case 39:return e.abrupt("return",c);case 40:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function p(e,t,o,n){switch(t){case"humanReadable":(0,c.HumanReadable)(e,o,n);break;case"precise":(0,c.Precise)(e,o,n);break;case"blocksToDays":(0,c.BlocksToDays)(e,n);break;case"erasToDays":(0,c.ErasToDays)(e,n,o);break;case"percentage":(0,c.Percentage)(e,n);break;case"permillToPercent":(0,c.PermillToPercent)(e,n);break;case"arrayLength":(0,c.ArrayLength)(e,n);break;default:return void console.log("Ignoring unknown filter type")}}const u=function(e){var t=e.network,o=e.path,r=e.defaultValue,i=e.filter,c=void 0===i?void 0:i,d=(0,s.useState)(""),u=d[0],h=d[1];return t=t.toLowerCase(),(0,s.useEffect)((function(){void 0!==c?p(r.toString(),c,t,h):h(r.toString());var e=void 0;switch(t){case"polkadot":e="wss://rpc.polkadot.io";break;case"kusama":e="wss://kusama-rpc.polkadot.io/";break;case"statemine":e="wss://kusama-asset-hub-rpc.polkadot.io/";break;case"statemint":e="wss://polkadot-asset-hub-rpc.polkadot.io/";break;case"kusamapeople":e="wss://kusama-people-rpc.polkadot.io";break;case"polkadotpeople":e="wss://polkadot-people-rpc.polkadot.io";break;default:console.log("Unknown network provided, "+t)}if(void 0===e)console.log("Failed to connect to a valid websocket, applying default");else{var s=function(){var e=(0,a.A)((0,n.A)().mark((function e(){var a;return(0,n.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l(t,o,h);case 2:if(void 0!==(a=e.sent)){e.next=7;break}return e.abrupt("return");case 7:void 0!==c?p(a,c,t,h):h(a);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();try{s()}catch(i){console.log(i)}}}),[]),u}},11135:e=>{var t="polkadot",o="kusama",n="statemine",a="statemint",s="polkadotpeople",r="kusamapeople",i={polkadot:{precision:1e10,symbol:"DOT"},kusama:{precision:1e12,symbol:"KSM"},statemint:{precision:1e10,symbol:"DOT"},statemine:{precision:1e12,symbol:"KSM"},polkadotpeople:{precision:1e10,symbol:"DOT"},kusamapeople:{precision:1e12,symbol:"KSM"}};e.exports={HumanReadable:function(e,c,l){var d=void 0;if(c===t||c===a)d=3;else if(c===o||c===n||c===s)d=6;else{if(c!=r)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");d=8}e=parseFloat(e),l((e=Number.isInteger(e/i[c].precision)?e/i[c].precision+" "+i[c].symbol:(e/i[c].precision).toFixed(d)+" "+i[c].symbol).toString())},Precise:function(e,t,o){o(e=(e=parseFloat(e))/i[t].precision+" "+i[t].symbol)},BlocksToDays:function(e,t){t((e=6*e/86400).toString())},ErasToDays:function(e,i,c){var l=void 0;if(c===t||c===a||c==s)l=1;else{if(c!==o&&c!==n&&c!=r)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");l=4}i((e/=l).toString())},Percentage:function(e,t){t((e/=1e7).toString())},PermillToPercent:function(e,t){t((e/=1e4).toString())},ArrayLength:function(e,t){t((e=e.split(",").length).toString())}}},42030:(e,t,o)=>{"use strict";o.d(t,{A:()=>n});const n=o.p+"assets/images/nested-proxy-calls-65bdc70624a0b21a087da639743c710d.png"},2997:(e,t,o)=>{"use strict";o.d(t,{A:()=>n});const n=o.p+"assets/images/polkadot_view_proxies-5c65a3f24dc6902f1734de8887dd5696.png"},16809:(e,t,o)=>{"use strict";o.d(t,{A:()=>n});const n=o.p+"assets/images/polkadot_view_proxies_dev-c7f33e592f2c37cade0cc3d37e356aef.png"},25225:(e,t,o)=>{"use strict";o.d(t,{A:()=>n});const n=o.p+"assets/images/time-delayed-proxies-8b85523c3caac25b32d1d884af71c048.png"},47790:()=>{}}]); \ No newline at end of file diff --git a/assets/js/f0ff685a.17bf4a10.js b/assets/js/f0ff685a.17bf4a10.js deleted file mode 100644 index 3ccb67f53fd7..000000000000 --- a/assets/js/f0ff685a.17bf4a10.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk=self.webpackChunk||[]).push([[2393],{63362:(e,t,o)=>{"use strict";o.r(t),o.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>u,frontMatter:()=>r,metadata:()=>c,toc:()=>d});var n=o(74848),a=o(28453),s=(o(47379),o(67141));const r={id:"learn-guides-accounts-proxy",title:"Polkadot-JS Guides about Proxy Accounts",sidebar_label:"Proxy Guides",description:"Polkadot-JS Guides about Proxy Accounts",keyword:["guides","polkadot-js","accounts","proxy"],slug:"../learn-guides-accounts-proxy"},i=void 0,c={id:"learn/learn-guides-accounts-proxy",title:"Polkadot-JS Guides about Proxy Accounts",description:"Polkadot-JS Guides about Proxy Accounts",source:"@site/../docs/learn/learn-guides-accounts-proxy.md",sourceDirName:"learn",slug:"/learn-guides-accounts-proxy",permalink:"/docs/learn-guides-accounts-proxy",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-accounts-proxy.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1729847256e3,frontMatter:{id:"learn-guides-accounts-proxy",title:"Polkadot-JS Guides about Proxy Accounts",sidebar_label:"Proxy Guides",description:"Polkadot-JS Guides about Proxy Accounts",keyword:["guides","polkadot-js","accounts","proxy"],slug:"../learn-guides-accounts-proxy"},sidebar:"docs",previous:{title:"Multisig Guides",permalink:"/docs/learn-guides-accounts-multisig"},next:{title:"Pure Proxy Guides",permalink:"/docs/learn-guides-accounts-proxy-pure"}},l={},d=[{value:"Creating Proxy with Polkadot-JS",id:"creating-proxy-with-polkadot-js",level:2},{value:"Removing Proxy with Polkadot-JS",id:"removing-proxy-with-polkadot-js",level:2},{value:"View your Proxy on Polkadot-JS",id:"view-your-proxy-on-polkadot-js",level:2},{value:"Set-up and Use of Time-delayed Proxies with Polkadot-JS",id:"set-up-and-use-of-time-delayed-proxies-with-polkadot-js",level:2},{value:"Proxy calls",id:"proxy-calls",level:2},{value:"Nested Proxy Calls",id:"nested-proxy-calls",level:3}];function p(e){const t={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",p:"p",...(0,a.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the Polkadot-JS UI, you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,n.jsxs)(t.p,{children:["Proxies allow users to use an account (it can be in cold storage or a hot wallet) less frequently\nbut actively participate in the network with the weight of the tokens in that account. Proxies are\nallowed to perform a limited amount of actions related to specific\n",(0,n.jsx)(t.a,{href:"https://docs.substrate.io/reference/frame-pallets/",children:"substrate pallets"})," on behalf of another\naccount. The videos below contain more information about using proxies."]}),"\n",(0,n.jsxs)("div",{className:"row",children:[(0,n.jsxs)("div",{className:"col text--center",children:[(0,n.jsx)("a",{href:"https://www.youtube.com/watch?v=1tcygkq52tU",children:(0,n.jsx)("img",{src:"https://img.youtube.com/vi/1tcygkq52tU/0.jpg",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,n.jsx)("p",{children:(0,n.jsx)("a",{href:"https://www.youtube.com/watch?v=1tcygkq52tU",children:"Proxy Accounts Tutorial"})})]}),(0,n.jsxs)("div",{className:"col text--center",children:[(0,n.jsx)("a",{href:"https://www.youtube.com/watch?v=Qv_nJVcvQr8&t=4437s",children:(0,n.jsx)("img",{src:"https://img.youtube.com/vi/Qv_nJVcvQr8/0.jpg",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,n.jsx)("p",{children:(0,n.jsx)("a",{href:"https://www.youtube.com/watch?v=Qv_nJVcvQr8&t=4437s",children:"Proxy Accounts Advanced Tutorial"})})]})]}),"\n",(0,n.jsx)(t.admonition,{title:"Know how to check the calls and pallets accessible by proxies",type:"tip",children:(0,n.jsxs)(t.p,{children:["For the latest information on the calls and pallets that can be fully accessed by proxies, check the\n",(0,n.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/153543b0c8c582e73f520e5c08cbe33bddfb5f69/runtime/polkadot/src/lib.rs#L1158",children:"source code in the runtime folder"}),"\non the ",(0,n.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk",children:"Polkadot repository"})]})}),"\n",(0,n.jsx)(t.h2,{id:"creating-proxy-with-polkadot-js",children:"Creating Proxy with Polkadot-JS"}),"\n",(0,n.jsxs)(t.p,{children:["To create a proxy account with Polkadot-JS read\n",(0,n.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000182179-how-to-create-a-proxy-account",children:"this support article"}),"."]}),"\n",(0,n.jsx)(t.h2,{id:"removing-proxy-with-polkadot-js",children:"Removing Proxy with Polkadot-JS"}),"\n",(0,n.jsxs)(t.p,{children:['Read the section "Removing Proxies" on\n',(0,n.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000182179-how-to-create-a-proxy-account",children:"this support page"}),"\nto learn how to remove proxies."]}),"\n",(0,n.jsx)(t.h2,{id:"view-your-proxy-on-polkadot-js",children:"View your Proxy on Polkadot-JS"}),"\n",(0,n.jsxs)(t.p,{children:["To view your proxy, just go on the ",(0,n.jsx)(t.em,{children:"Accounts"})," menu in the Polkadot-JS UI, next to the proxied\naccount you will notice a blue icon. Hover on it, and you will see ",(0,n.jsx)(t.em,{children:"Proxy overview"}),". Click on it and\nyou will be presented with a list of all proxies for that account."]}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"polkadot_view_proxies",src:o(2997).A+"",width:"1842",height:"120"})}),"\n",(0,n.jsxs)(t.p,{children:["Additionally, you can head over to the ",(0,n.jsx)(t.em,{children:"Chain State"})," tab (underneath the ",(0,n.jsx)(t.em,{children:"Developer"})," menu) on\n",(0,n.jsx)(t.a,{href:"https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc.polkadot.io#/chainstate",children:"Polkadot-JS Apps"}),". If\nyou've created your proxy on a Polkadot account, it is required to change your network accordingly\nusing the top left navigation button. On this page, the proxy pallet should be selected, returning\nthe announcements and proxies functions. The proxies function will allow you to see your created\nproxies for either one account or for all accounts (using the toggle will enable this). Proxy\nannouncements are what time lock proxies do to announce they are going to conduct an action."]}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"polkadot_view_proxies_dev",src:o(16809).A+"",width:"1871",height:"820"})}),"\n",(0,n.jsx)(t.h2,{id:"set-up-and-use-of-time-delayed-proxies-with-polkadot-js",children:"Set-up and Use of Time-delayed Proxies with Polkadot-JS"}),"\n",(0,n.jsx)(t.admonition,{type:"info",children:(0,n.jsxs)(t.p,{children:["See ",(0,n.jsx)(t.a,{href:"https://youtu.be/3L7Vu2SX0PE",children:"this video tutorial"})," to learn how you can setup and use\ntime-delayed proxies. The video goes through the example below."]})}),"\n",(0,n.jsxs)(t.p,{children:["Initially the time time-delayed proxy announces its intended action using the ",(0,n.jsx)(t.code,{children:"proxy.announce"}),"\nextrinsic and will wait for the number of blocks defined in the delay time before executing it. The\nproxy will include the hash of the intended function call in the announcement. Within this time\nwindow, the intended action may be canceled by accounts that control the proxy. This can be done by\nthe proxy itself using the ",(0,n.jsx)(t.code,{children:"proxy.removeAnnouncement"})," extrinsic or by the proxied account using the\nthe ",(0,n.jsx)(t.code,{children:"proxy.rejectAnnouncement"})," extrinsic. Now we can use proxies knowing that any malicious actions\ncan be noticed and reverted within a delay period. After the time-delay, the proxy can use the\n",(0,n.jsx)(t.code,{children:"proxy.proxyAnnounced"})," extrinsic to execute the announced call."]}),"\n",(0,n.jsx)(t.p,{children:"Let's take for example the stash account Eleanor setting Bob as a time-delayed staking proxy. In\nthis way, if Bob submits an extrinsic to change the reward destination, such extrinsic can be\nrejected by Eleanor. This implies that Eleanor monitors Bob, and that within the time-delay she can\nspot the announced extrinsic. Eleanor can check all the proxy call announcements made by her\naccount's proxies on-chain. On Polkadot-JS UI, go to Developer > Storage > Proxy > Announcements to\ncheck the hashes for the calls made by the proxy accounts and the block height at which they are\nenabled for execution."}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"time-delayed proxies",src:o(25225).A+"",width:"1920",height:"800"})}),"\n",(0,n.jsx)(t.admonition,{type:"info",children:(0,n.jsxs)(t.p,{children:["If you try to use ",(0,n.jsx)(t.code,{children:"proxy.proxyAnnounced"}),' to execute the call within the time-delay window you will\nget an error "Proxy unannounced" since the announcement will be done after the time delay. Also note\nthat regular ',(0,n.jsx)(t.code,{children:"proxy.proxy"})," calls do not work with time-delayed proxies, you need to announce the\ncall first and then execute the announced call on a separate transaction."]})}),"\n",(0,n.jsx)(t.h2,{id:"proxy-calls",children:"Proxy calls"}),"\n",(0,n.jsxs)(t.p,{children:["Proxy calls are used by proxies to call proxied accounts. These calls are important for example in\nthe case of ",(0,n.jsx)(t.em,{children:"pure"})," proxies, as any attempt to sign transactions with a ",(0,n.jsx)(t.em,{children:"pure"})," proxy will fail. For\nmore details see the ",(0,n.jsx)(t.a,{href:"/docs/learn-proxies-pure",children:"dedicated section about pure proxies"}),"."]}),"\n",(0,n.jsx)(t.h3,{id:"nested-proxy-calls",children:"Nested Proxy Calls"}),"\n",(0,n.jsxs)(t.p,{children:["As the term suggests, nested proxy calls are proxy calls within proxy calls. Such calls are needed\nif there are proxied accounts that are proxies themselves. In the example diagram below, Alice has a\nstash account that has a ",(0,n.jsx)(t.em,{children:"staking"})," proxy account, P-C. P-C is a ",(0,n.jsx)(t.em,{children:"pure"})," proxy, a proxied account\noriginally spawned by Charly that is now an ",(0,n.jsx)(t.em,{children:"any"})," proxy of P-C and signs everything on its behalf."]}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"nested proxy calls",src:o(42030).A+"",width:"1920",height:"800"})}),"\n",(0,n.jsxs)(t.p,{children:["For example, to bond more funds, Charly needs to submit a ",(0,n.jsx)(t.code,{children:"prox.proxy"})," extrinsic to P-C, which in\nturn submits a ",(0,n.jsx)(t.code,{children:"proxy.proxy"})," extrinsic to Alice including for example a ",(0,n.jsx)(t.code,{children:"staking.bondExtra"}),"\nextrinsic, specifying the number of extra tokens that need to be bounded. If Charly wants to leave,\na new account can take his place as any proxy (before Charly leaves!). There is no need to change\nthe staking proxy account. Also, Alice is the only one who can remove P-C as a staking proxy, and\nP-C can only perform staking-related tasks. For example, P-C cannot send funds out from Alice's\naccount."]}),"\n",(0,n.jsxs)(t.p,{children:["Proxy calls can be done using the Extrinsic Tab in the Polkadot-JS UI. Nested proxy calls can be\ndone by calling each ",(0,n.jsx)(t.code,{children:"proxy.proxy"})," extrinsic separately, or in some cases by just calling the last\n",(0,n.jsx)(t.code,{children:"proxy.proxy"})," extrinsic. In the diagram above, submitting the proxy call from P-C to Alice will\nautomatically ask for Charly's signature. Thus one proxy call will trigger the second one because\nCharly's is the only ",(0,n.jsx)(t.em,{children:"any"})," proxy of P-C, and P-C cannot sign anything. While if we want to use Bob's\naccount we will need to submit all three proxy calls."]})]})}function u(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(p,{...e})}):p(e)}},67141:(e,t,o)=>{"use strict";o.d(t,{A:()=>s});var n=o(96540),a=o(74848);const s=function(e){var t,o=e.message,s=(0,n.useState)(!0),r=s[0],i=s[1];return(0,a.jsx)(a.Fragment,{children:r&&(0,a.jsxs)("div",{className:"message-box",children:[(0,a.jsx)("button",{className:"close-button",onClick:function(){i(!1)},children:"\u2716 "}),(0,a.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(t=o,t.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},47379:(e,t,o)=>{"use strict";o.d(t,{A:()=>u});var n=o(90675),a=o(10467),s=o(96540),r=o(19588),i=o(2026),c=o(11135);function l(e,t,o){return d.apply(this,arguments)}function d(){return(d=(0,a.A)((0,n.A)().mark((function e(t,o,a){var s,c,l,d,p;return(0,n.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s=void 0,c=void 0,e.t0=t,e.next="polkadot"===e.t0?5:"kusama"===e.t0?7:"statemine"===e.t0?9:"statemint"===e.t0?11:"polkadotpeople"===e.t0?13:"kusamapeople"===e.t0?15:17;break;case 5:return s="wss://rpc.polkadot.io",e.abrupt("break",18);case 7:return s="wss://kusama-rpc.polkadot.io/",e.abrupt("break",18);case 9:return s="wss://statemine-rpc.polkadot.io/",e.abrupt("break",18);case 11:return s="wss://statemint-rpc.polkadot.io/",e.abrupt("break",18);case 13:return s="wss://polkadot-people-rpc.polkadot.io/",e.abrupt("break",18);case 15:return s="wss://kusama-people-rpc.polkadot.io/",e.abrupt("break",18);case 17:console.log("Unknown socket url provided, no connection made.");case 18:if(void 0!==s){e.next=22;break}return e.abrupt("return");case 22:return l=new r.E(s),e.next=25,i.G.create({provider:l});case 25:d=e.sent,(p=o.split(".")).forEach((function(e){e in d&&(d=d[e])})),e.t1=p[0],e.next="consts"===e.t1?31:"query"===e.t1?33:38;break;case 31:return c=d.toString(),e.abrupt("break",39);case 33:return e.next=35,d();case 35:return c=(c=e.sent).toString(),e.abrupt("break",39);case 38:console.log("Unknown path prefix ("+p[0]+") in "+o);case 39:return e.abrupt("return",c);case 40:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function p(e,t,o,n){switch(t){case"humanReadable":(0,c.HumanReadable)(e,o,n);break;case"precise":(0,c.Precise)(e,o,n);break;case"blocksToDays":(0,c.BlocksToDays)(e,n);break;case"erasToDays":(0,c.ErasToDays)(e,n,o);break;case"percentage":(0,c.Percentage)(e,n);break;case"permillToPercent":(0,c.PermillToPercent)(e,n);break;case"arrayLength":(0,c.ArrayLength)(e,n);break;default:return void console.log("Ignoring unknown filter type")}}const u=function(e){var t=e.network,o=e.path,r=e.defaultValue,i=e.filter,c=void 0===i?void 0:i,d=(0,s.useState)(""),u=d[0],h=d[1];return t=t.toLowerCase(),(0,s.useEffect)((function(){void 0!==c?p(r.toString(),c,t,h):h(r.toString());var e=void 0;switch(t){case"polkadot":e="wss://rpc.polkadot.io";break;case"kusama":e="wss://kusama-rpc.polkadot.io/";break;case"statemine":e="wss://kusama-asset-hub-rpc.polkadot.io/";break;case"statemint":e="wss://polkadot-asset-hub-rpc.polkadot.io/";break;case"kusamapeople":e="wss://kusama-people-rpc.polkadot.io";break;case"polkadotpeople":e="wss://polkadot-people-rpc.polkadot.io";break;default:console.log("Unknown network provided, "+t)}if(void 0===e)console.log("Failed to connect to a valid websocket, applying default");else{var s=function(){var e=(0,a.A)((0,n.A)().mark((function e(){var a;return(0,n.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l(t,o,h);case 2:if(void 0!==(a=e.sent)){e.next=7;break}return e.abrupt("return");case 7:void 0!==c?p(a,c,t,h):h(a);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();try{s()}catch(i){console.log(i)}}}),[]),u}},11135:e=>{var t="polkadot",o="kusama",n="statemine",a="statemint",s="polkadotpeople",r="kusamapeople",i={polkadot:{precision:1e10,symbol:"DOT"},kusama:{precision:1e12,symbol:"KSM"},statemint:{precision:1e10,symbol:"DOT"},statemine:{precision:1e12,symbol:"KSM"},polkadotpeople:{precision:1e10,symbol:"DOT"},kusamapeople:{precision:1e12,symbol:"KSM"}};e.exports={HumanReadable:function(e,c,l){var d=void 0;if(c===t||c===a)d=3;else if(c===o||c===n||c===s)d=6;else{if(c!=r)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");d=8}e=parseFloat(e),l((e=Number.isInteger(e/i[c].precision)?e/i[c].precision+" "+i[c].symbol:(e/i[c].precision).toFixed(d)+" "+i[c].symbol).toString())},Precise:function(e,t,o){o(e=(e=parseFloat(e))/i[t].precision+" "+i[t].symbol)},BlocksToDays:function(e,t){t((e=6*e/86400).toString())},ErasToDays:function(e,i,c){var l=void 0;if(c===t||c===a||c==s)l=1;else{if(c!==o&&c!==n&&c!=r)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");l=4}i((e/=l).toString())},Percentage:function(e,t){t((e/=1e7).toString())},PermillToPercent:function(e,t){t((e/=1e4).toString())},ArrayLength:function(e,t){t((e=e.split(",").length).toString())}}},42030:(e,t,o)=>{"use strict";o.d(t,{A:()=>n});const n=o.p+"assets/images/nested-proxy-calls-65bdc70624a0b21a087da639743c710d.png"},2997:(e,t,o)=>{"use strict";o.d(t,{A:()=>n});const n=o.p+"assets/images/polkadot_view_proxies-5c65a3f24dc6902f1734de8887dd5696.png"},16809:(e,t,o)=>{"use strict";o.d(t,{A:()=>n});const n=o.p+"assets/images/polkadot_view_proxies_dev-c7f33e592f2c37cade0cc3d37e356aef.png"},25225:(e,t,o)=>{"use strict";o.d(t,{A:()=>n});const n=o.p+"assets/images/time-delayed-proxies-8b85523c3caac25b32d1d884af71c048.png"},47790:()=>{}}]); \ No newline at end of file diff --git a/assets/js/f10f9928.4948e482.js b/assets/js/f10f9928.4948e482.js deleted file mode 100644 index 2d78cbd2be4f..000000000000 --- a/assets/js/f10f9928.4948e482.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5534],{42205:(e,s,a)=>{a.r(s),a.d(s,{assets:()=>o,contentTitle:()=>d,default:()=>c,frontMatter:()=>i,metadata:()=>r,toc:()=>l});var n=a(74848),t=a(28453);const i={id:"assethub-dashboards",title:"Asset Hub Dashboards",sidebar_label:"Asset Hub",description:"Asset Hub is a specialized system chain on Polkadot designed to facilitate the handling and management of digital assets across various applications.",keywords:["polkadot","dashboard","dune","assethub","digital assets"],slug:"../assethub-dashboards"},d="Asset Hub Dashboards",r={id:"general/dune-analytics/parachain-dashboards/assethub-dashboards",title:"Asset Hub Dashboards",description:"Asset Hub is a specialized system chain on Polkadot designed to facilitate the handling and management of digital assets across various applications.",source:"@site/../docs/general/dune-analytics/parachain-dashboards/assethub-dashboards.md",sourceDirName:"general/dune-analytics/parachain-dashboards",slug:"/general/dune-analytics/assethub-dashboards",permalink:"/docs/general/dune-analytics/assethub-dashboards",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/parachain-dashboards/assethub-dashboards.md",tags:[],version:"current",lastUpdatedBy:"MK",lastUpdatedAt:1719215716e3,frontMatter:{id:"assethub-dashboards",title:"Asset Hub Dashboards",sidebar_label:"Asset Hub",description:"Asset Hub is a specialized system chain on Polkadot designed to facilitate the handling and management of digital assets across various applications.",keywords:["polkadot","dashboard","dune","assethub","digital assets"],slug:"../assethub-dashboards"},sidebar:"docs",previous:{title:"Acala",permalink:"/docs/general/dune-analytics/acala-dashboards"},next:{title:"Astar",permalink:"/docs/general/dune-analytics/astar-dashboards"}},o={},l=[{value:"Overview",id:"overview",level:2},{value:"Featured Dashboards on Dune",id:"featured-dashboards-on-dune",level:2},{value:"Key Tables",id:"key-tables",level:2},{value:"Useful Queries",id:"useful-queries",level:2},{value:"Getting Started with Queries",id:"getting-started-with-queries",level:2}];function h(e){const s={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,t.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.header,{children:(0,n.jsx)(s.h1,{id:"asset-hub-dashboards",children:"Asset Hub Dashboards"})}),"\n",(0,n.jsx)(s.h2,{id:"overview",children:"Overview"}),"\n",(0,n.jsx)(s.p,{children:"Asset Hub is a specialized parachain on Polkadot designed to facilitate the handling and management\nof digital assets across various applications. It supports asset tokenization, trading, and bridging\nservices within the Polkadot ecosystem."}),"\n",(0,n.jsx)(s.h2,{id:"featured-dashboards-on-dune",children:"Featured Dashboards on Dune"}),"\n",(0,n.jsx)(s.p,{children:"Here you will find a variety of dashboards that help visualize data from the Asset Hub parachain:"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"https://dune.com/substrate/assethub",children:"Asset Hub"}),": Explore comprehensive analytics on digital asset\nmanagement and operations within the AssetHub parachain."]}),"\n"]}),"\n",(0,n.jsx)(s.h2,{id:"key-tables",children:"Key Tables"}),"\n",(0,n.jsx)(s.p,{children:"Data from the Asset Hub parachain is organized into several key tables:"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsx)(s.li,{children:(0,n.jsx)(s.code,{children:"assethub.balances"})}),"\n",(0,n.jsx)(s.li,{children:(0,n.jsx)(s.code,{children:"assethub.blocks"})}),"\n",(0,n.jsx)(s.li,{children:(0,n.jsx)(s.code,{children:"assethub.calls"})}),"\n",(0,n.jsx)(s.li,{children:(0,n.jsx)(s.code,{children:"assethub.events"})}),"\n",(0,n.jsx)(s.li,{children:(0,n.jsx)(s.code,{children:"assethub.extrinsics"})}),"\n",(0,n.jsx)(s.li,{children:(0,n.jsx)(s.code,{children:"assethub.transfers"})}),"\n"]}),"\n",(0,n.jsxs)(s.p,{children:["Start building your own queries using granular data on Dune\n",(0,n.jsx)(s.a,{href:"https://dune.com/queries?category=canonical&namespace=assethub",children:"here"}),"."]}),"\n",(0,n.jsx)(s.h2,{id:"useful-queries",children:"Useful Queries"}),"\n",(0,n.jsx)(s.p,{children:"Some useful queries for Asset Hub are provided:"}),"\n",(0,n.jsxs)(s.table,{children:[(0,n.jsx)(s.thead,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.th,{children:"Title"}),(0,n.jsx)(s.th,{children:"Query"}),(0,n.jsx)(s.th,{children:"Description"})]})}),(0,n.jsx)(s.tbody,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:"Asset Hub Sum of Stablecoin on Each Chain by Time"}),(0,n.jsxs)(s.td,{children:[(0,n.jsx)(s.a,{href:"https://dune.com/queries/3526956",children:"query_3526956"}),"(asset_id='[ASSET_ID]')"]}),(0,n.jsx)(s.td,{children:"Find the sum of stablecoin on each chain by time"})]})})]}),"\n",(0,n.jsx)(s.h2,{id:"getting-started-with-queries",children:"Getting Started with Queries"}),"\n",(0,n.jsx)(s.p,{children:"To get started with querying data from Unique, you are welcome to use the mentioned materialized\nqueries. You can use the following DuneSQL queries as examples:"}),"\n",(0,n.jsx)(s.pre,{children:(0,n.jsx)(s.code,{className:"language-sql",metastring:'title="Sum of USDC in Polkadot Parachains" showLineNumbers',children:"SELECT\n *\nFROM\n \"query_3526956(asset_id='1984')\" -- AssetHub Sum of Stablecoin on Each Chain by Time\nWHERE\n not chain_name = ''\n"})}),"\n",(0,n.jsx)(s.p,{children:"Query result:"}),"\n",(0,n.jsx)("iframe",{src:"https://dune.com/embeds/3527846/5933854",height:"350",width:"100%"}),"\n",(0,n.jsx)(s.p,{children:"Visualized result:"}),"\n",(0,n.jsx)("iframe",{src:"https://dune.com/embeds/3527846/6451568",height:"350",width:"100%"}),"\n",(0,n.jsx)(s.admonition,{title:"DuneSQL Referece",type:"info",children:(0,n.jsxs)(s.p,{children:["For more information on DuneSQL, please refer to the ",(0,n.jsx)(s.a,{href:"/docs/general/dunesql-cheatsheet",children:"DuneSQL Cheatsheet"}),"\nand\n",(0,n.jsx)(s.a,{href:"https://docs.dune.com/query-engine/Functions-and-operators/index",children:"DuneSQL Official Documentation"}),"."]})})]})}function c(e={}){const{wrapper:s}={...(0,t.R)(),...e.components};return s?(0,n.jsx)(s,{...e,children:(0,n.jsx)(h,{...e})}):h(e)}},28453:(e,s,a)=>{a.d(s,{R:()=>d,x:()=>r});var n=a(96540);const t={},i=n.createContext(t);function d(e){const s=n.useContext(i);return n.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function r(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:d(e.components),n.createElement(i.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f10f9928.7c3d4296.js b/assets/js/f10f9928.7c3d4296.js new file mode 100644 index 000000000000..c880a6edc838 --- /dev/null +++ b/assets/js/f10f9928.7c3d4296.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5534],{2475:(e,s,a)=>{a.r(s),a.d(s,{assets:()=>o,contentTitle:()=>r,default:()=>c,frontMatter:()=>d,metadata:()=>n,toc:()=>l});const n=JSON.parse('{"id":"general/dune-analytics/parachain-dashboards/assethub-dashboards","title":"Asset Hub Dashboards","description":"Asset Hub is a specialized system chain on Polkadot designed to facilitate the handling and management of digital assets across various applications.","source":"@site/../docs/general/dune-analytics/parachain-dashboards/assethub-dashboards.md","sourceDirName":"general/dune-analytics/parachain-dashboards","slug":"/general/dune-analytics/assethub-dashboards","permalink":"/docs/general/dune-analytics/assethub-dashboards","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/parachain-dashboards/assethub-dashboards.md","tags":[],"version":"current","lastUpdatedBy":"MK","lastUpdatedAt":1719215716000,"frontMatter":{"id":"assethub-dashboards","title":"Asset Hub Dashboards","sidebar_label":"Asset Hub","description":"Asset Hub is a specialized system chain on Polkadot designed to facilitate the handling and management of digital assets across various applications.","keywords":["polkadot","dashboard","dune","assethub","digital assets"],"slug":"../assethub-dashboards"},"sidebar":"docs","previous":{"title":"Acala","permalink":"/docs/general/dune-analytics/acala-dashboards"},"next":{"title":"Astar","permalink":"/docs/general/dune-analytics/astar-dashboards"}}');var t=a(74848),i=a(28453);const d={id:"assethub-dashboards",title:"Asset Hub Dashboards",sidebar_label:"Asset Hub",description:"Asset Hub is a specialized system chain on Polkadot designed to facilitate the handling and management of digital assets across various applications.",keywords:["polkadot","dashboard","dune","assethub","digital assets"],slug:"../assethub-dashboards"},r="Asset Hub Dashboards",o={},l=[{value:"Overview",id:"overview",level:2},{value:"Featured Dashboards on Dune",id:"featured-dashboards-on-dune",level:2},{value:"Key Tables",id:"key-tables",level:2},{value:"Useful Queries",id:"useful-queries",level:2},{value:"Getting Started with Queries",id:"getting-started-with-queries",level:2}];function h(e){const s={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,i.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.header,{children:(0,t.jsx)(s.h1,{id:"asset-hub-dashboards",children:"Asset Hub Dashboards"})}),"\n",(0,t.jsx)(s.h2,{id:"overview",children:"Overview"}),"\n",(0,t.jsx)(s.p,{children:"Asset Hub is a specialized parachain on Polkadot designed to facilitate the handling and management\nof digital assets across various applications. It supports asset tokenization, trading, and bridging\nservices within the Polkadot ecosystem."}),"\n",(0,t.jsx)(s.h2,{id:"featured-dashboards-on-dune",children:"Featured Dashboards on Dune"}),"\n",(0,t.jsx)(s.p,{children:"Here you will find a variety of dashboards that help visualize data from the Asset Hub parachain:"}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.a,{href:"https://dune.com/substrate/assethub",children:"Asset Hub"}),": Explore comprehensive analytics on digital asset\nmanagement and operations within the AssetHub parachain."]}),"\n"]}),"\n",(0,t.jsx)(s.h2,{id:"key-tables",children:"Key Tables"}),"\n",(0,t.jsx)(s.p,{children:"Data from the Asset Hub parachain is organized into several key tables:"}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsx)(s.li,{children:(0,t.jsx)(s.code,{children:"assethub.balances"})}),"\n",(0,t.jsx)(s.li,{children:(0,t.jsx)(s.code,{children:"assethub.blocks"})}),"\n",(0,t.jsx)(s.li,{children:(0,t.jsx)(s.code,{children:"assethub.calls"})}),"\n",(0,t.jsx)(s.li,{children:(0,t.jsx)(s.code,{children:"assethub.events"})}),"\n",(0,t.jsx)(s.li,{children:(0,t.jsx)(s.code,{children:"assethub.extrinsics"})}),"\n",(0,t.jsx)(s.li,{children:(0,t.jsx)(s.code,{children:"assethub.transfers"})}),"\n"]}),"\n",(0,t.jsxs)(s.p,{children:["Start building your own queries using granular data on Dune\n",(0,t.jsx)(s.a,{href:"https://dune.com/queries?category=canonical&namespace=assethub",children:"here"}),"."]}),"\n",(0,t.jsx)(s.h2,{id:"useful-queries",children:"Useful Queries"}),"\n",(0,t.jsx)(s.p,{children:"Some useful queries for Asset Hub are provided:"}),"\n",(0,t.jsxs)(s.table,{children:[(0,t.jsx)(s.thead,{children:(0,t.jsxs)(s.tr,{children:[(0,t.jsx)(s.th,{children:"Title"}),(0,t.jsx)(s.th,{children:"Query"}),(0,t.jsx)(s.th,{children:"Description"})]})}),(0,t.jsx)(s.tbody,{children:(0,t.jsxs)(s.tr,{children:[(0,t.jsx)(s.td,{children:"Asset Hub Sum of Stablecoin on Each Chain by Time"}),(0,t.jsxs)(s.td,{children:[(0,t.jsx)(s.a,{href:"https://dune.com/queries/3526956",children:"query_3526956"}),"(asset_id='[ASSET_ID]')"]}),(0,t.jsx)(s.td,{children:"Find the sum of stablecoin on each chain by time"})]})})]}),"\n",(0,t.jsx)(s.h2,{id:"getting-started-with-queries",children:"Getting Started with Queries"}),"\n",(0,t.jsx)(s.p,{children:"To get started with querying data from Unique, you are welcome to use the mentioned materialized\nqueries. You can use the following DuneSQL queries as examples:"}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-sql",metastring:'title="Sum of USDC in Polkadot Parachains" showLineNumbers',children:"SELECT\n *\nFROM\n \"query_3526956(asset_id='1984')\" -- AssetHub Sum of Stablecoin on Each Chain by Time\nWHERE\n not chain_name = ''\n"})}),"\n",(0,t.jsx)(s.p,{children:"Query result:"}),"\n",(0,t.jsx)("iframe",{src:"https://dune.com/embeds/3527846/5933854",height:"350",width:"100%"}),"\n",(0,t.jsx)(s.p,{children:"Visualized result:"}),"\n",(0,t.jsx)("iframe",{src:"https://dune.com/embeds/3527846/6451568",height:"350",width:"100%"}),"\n",(0,t.jsx)(s.admonition,{title:"DuneSQL Referece",type:"info",children:(0,t.jsxs)(s.p,{children:["For more information on DuneSQL, please refer to the ",(0,t.jsx)(s.a,{href:"/docs/general/dunesql-cheatsheet",children:"DuneSQL Cheatsheet"}),"\nand\n",(0,t.jsx)(s.a,{href:"https://docs.dune.com/query-engine/Functions-and-operators/index",children:"DuneSQL Official Documentation"}),"."]})})]})}function c(e={}){const{wrapper:s}={...(0,i.R)(),...e.components};return s?(0,t.jsx)(s,{...e,children:(0,t.jsx)(h,{...e})}):h(e)}},28453:(e,s,a)=>{a.d(s,{R:()=>d,x:()=>r});var n=a(96540);const t={},i=n.createContext(t);function d(e){const s=n.useContext(i);return n.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function r(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:d(e.components),n.createElement(i.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f137ce68.0de73641.js b/assets/js/f137ce68.0de73641.js deleted file mode 100644 index f365deb9caf8..000000000000 --- a/assets/js/f137ce68.0de73641.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9188],{33369:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>d,contentTitle:()=>a,default:()=>x,frontMatter:()=>c,metadata:()=>o,toc:()=>u});var i=r(74848),t=r(28453),s=r(11470),l=r(19365);const c={id:"learn-xcm-instructions",title:"XCM Instructions & Register Specification",sidebar_label:"XCM Instructions",description:"Specification for Instructions and Registers for the XCM Format.",keywords:["cross-consensus","XCM","XCMP","interoperability","communication"],slug:"../learn-xcm-instructions"},a=void 0,o={id:"learn/learn-xcm-instructions",title:"XCM Instructions & Register Specification",description:"Specification for Instructions and Registers for the XCM Format.",source:"@site/../docs/learn/learn-xcm-instructions.md",sourceDirName:"learn",slug:"/learn-xcm-instructions",permalink:"/docs/learn-xcm-instructions",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-xcm-instructions.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1727681879e3,frontMatter:{id:"learn-xcm-instructions",title:"XCM Instructions & Register Specification",sidebar_label:"XCM Instructions",description:"Specification for Instructions and Registers for the XCM Format.",keywords:["cross-consensus","XCM","XCMP","interoperability","communication"],slug:"../learn-xcm-instructions"},sidebar:"docs",previous:{title:"XCM Virtual Machine (XCVM)",permalink:"/docs/learn-xcvm"},next:{title:"Accounts",permalink:"/docs/learn-account-advanced"}},d={},u=[{value:"XCVM Registers",id:"xcvm-registers",level:2},{value:"XCVM Instruction Set",id:"xcvm-instruction-set",level:2},{value:"Instructions Application Example",id:"instructions-application-example",level:2}];function h(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",li:"li",p:"p",ul:"ul",...(0,t.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.admonition,{title:"XCM Documentation",type:"info",children:(0,i.jsxs)(n.p,{children:["For a more practical approach to utilizing XCM, refer to the ",(0,i.jsx)(n.a,{href:"./learn/xcm",children:"XCM Docs"}),". Please keep in\nmind that XCM is under active development."]})}),"\n",(0,i.jsxs)(n.p,{children:["This page can also be viewed at the ",(0,i.jsx)(n.a,{href:"https://github.com/paritytech/xcm-format",children:(0,i.jsx)(n.code,{children:"xcm-format"})}),"\nrepository, where each instruction and register is explained in-depth."]}),"\n",(0,i.jsx)(n.h2,{id:"xcvm-registers",children:"XCVM Registers"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.em,{children:"Programme"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.em,{children:"Programme Counter"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.em,{children:"Error"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.em,{children:"Error Handler"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.em,{children:"Appendix"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.em,{children:"Origin"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.em,{children:"Holding"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.em,{children:"Surplus Weight"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.em,{children:"Refunded Weight"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.em,{children:"Transact Status"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.em,{children:"Topic"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.em,{children:"Transact Status Register"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.em,{children:"Topic Register"})}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"xcvm-instruction-set",children:"XCVM Instruction Set"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"WithdrawAsset"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"ReserveAssetDeposited"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"ReceiveTeleportedAsset"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"QueryResponse"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"TransferAsset"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"TransferReserveAsset"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"Transact"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"HrmpNewChannelOpenRequest"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"HrmpChannelAccepted"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"HrmpChannelClosing"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"ClearOrigin"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"DescendOrigin"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"ReportError"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"DepositAsset"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"DepositReserveAsset"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"ExchangeAsset"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"InitiateReserveWithdraw"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"InitiateTeleport"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"QueryHolding"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"BuyExecution"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"RefundSurplus"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"SetErrorHandler"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"SetAppendix"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"ClearError"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"ClaimAsset"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"Trap"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"SubscribeVersion"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"UnsubscribeVersion"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"BurnAsset"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"ExpectAsset"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"ExpectError"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"ExpectOrigin"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"QueryPallet"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"ExpectPallet"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"ReportTransactStatus"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"ClearTransactStatus"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"LockAsset"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"UnlockAsset"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"NoteUnlockable"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"RequestUnlock"})}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"instructions-application-example",children:"Instructions Application Example"}),"\n",(0,i.jsxs)(n.p,{children:["The following presents the practical mapping of instructions to some\n",(0,i.jsx)(n.a,{href:"/docs/learn-xcm#core-functionality-of-xcm",children:"core functionality in XCM"}),"."]}),"\n",(0,i.jsxs)(s.A,{groupId:"operating-systems",values:[{label:"Programmability",value:"program"},{label:"Functional Multichain Decomposition",value:"fmd"}],children:[(0,i.jsxs)(l.A,{value:"program",children:[(0,i.jsx)(n.p,{children:"These are the primary instructions that enable programmability and branching to be possible.\nBranching in this context is the ability for errors and logic to be handled as needed when dealing\nwith a message."}),(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.a,{href:"https://github.com/paritytech/xcm-format/tree/master#expectassetmultiassets",children:(0,i.jsx)(n.code,{children:"ExpectAsset(MultiAssets)"})})," -\nChecks if the Holding register has a specific amount of assets, throws an error if it doesn't."]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.a,{href:"https://github.com/paritytech/xcm-format/tree/master#expecterroroptionu32-error",children:(0,i.jsx)(n.code,{children:"ExpectError(Option<(u32, Error)>)"})})," -\nEnsures the Error register contains the given error, and throws an error if it doesn't."]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.a,{href:"https://github.com/paritytech/xcm-format/tree/master#expectoriginmultilocation",children:(0,i.jsx)(n.code,{children:"ExpectOrigin(MultiLocation)"})})," -\nEnsures the Origin register contains the expected origin, and throws an error if it doesn't."]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"QueryPallet"})," - Queries the existence of a particular pallet type."]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"ExpectPallet"})," - Ensure that a particular pallet with a particular version exists."]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"ReportTransactStatus(QueryResponseInfo)"})," - Send a ",(0,i.jsx)(n.code,{children:"QueryResponse"})," message containing the value of\nthe Transact Status Register to some destination."]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"ClearTransactStatus"})," - Set the Transact Status Register to its default, cleared, value."]}),"\n"]}),"\n"]})]}),(0,i.jsxs)(l.A,{value:"fmd",children:[(0,i.jsx)(n.p,{children:"These instructions highlight the key instructions focused on Functional Multichain Decomposition."}),(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"LockAsset(MultiAsset, MultiLocation)"})," - Lock the locally held asset and prevent further transfer\nor withdrawal."]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"UnlockAsset(MultiAsset, MultiLocation)"})," - Remove the lock over ",(0,i.jsx)(n.code,{children:"asset"})," on this chain and (if\nnothing else is preventing it) allow the asset to be transferred."]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"NoteUnlockable(MultiAsset, MultiLocation)"})," - Asset (",(0,i.jsx)(n.code,{children:"asset"}),") has been locked on the ",(0,i.jsx)(n.code,{children:"origin"}),"\nsystem and may not be transferred. It may only be unlocked with the receipt of the ",(0,i.jsx)(n.code,{children:"UnlockAsset"}),"\ninstruction from this chain."]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"RequestUnlock(MultiAsset, MultiLocation)"})," - Send an ",(0,i.jsx)(n.code,{children:"UnlockAsset"})," instruction to the ",(0,i.jsx)(n.code,{children:"locker"})," for\nthe given ",(0,i.jsx)(n.code,{children:"asset"}),"."]}),"\n"]}),"\n"]})]})]})]})}function x(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(h,{...e})}):h(e)}},19365:(e,n,r)=>{r.d(n,{A:()=>l});r(96540);var i=r(34164);const t={tabItem:"tabItem_Ymn6"};var s=r(74848);function l(e){var n=e.children,r=e.hidden,l=e.className;return(0,s.jsx)("div",{role:"tabpanel",className:(0,i.A)(t.tabItem,l),hidden:r,children:n})}},11470:(e,n,r)=>{r.d(n,{A:()=>A});var i=r(96540),t=r(34164),s=r(23104),l=r(56347),c=r(205),a=r(57485),o=r(31682),d=r(75376);function u(e){var n,r;return null!=(n=null==(r=i.Children.toArray(e).filter((function(e){return"\n"!==e})).map((function(e){if(!e||(0,i.isValidElement)(e)&&((n=e.props)&&"object"==typeof n&&"value"in n))return e;var n;throw new Error("Docusaurus error: Bad child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:r.filter(Boolean))?n:[]}function h(e){var n=e.values,r=e.children;return(0,i.useMemo)((function(){var e=null!=n?n:function(e){return u(e).map((function(e){var n=e.props;return{value:n.value,label:n.label,attributes:n.attributes,default:n.default}}))}(r);return function(e){var n=(0,o.XI)(e,(function(e,n){return e.value===n.value}));if(n.length>0)throw new Error('Docusaurus error: Duplicate values "'+n.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[n,r])}function x(e){var n=e.value;return e.tabValues.some((function(e){return e.value===n}))}function p(e){var n=e.queryString,r=void 0!==n&&n,t=e.groupId,s=(0,l.W6)(),c=function(e){var n=e.queryString,r=void 0!==n&&n,i=e.groupId;if("string"==typeof r)return r;if(!1===r)return null;if(!0===r&&!i)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=i?i:null}({queryString:r,groupId:t});return[(0,a.aZ)(c),(0,i.useCallback)((function(e){if(c){var n=new URLSearchParams(s.location.search);n.set(c,e),s.replace(Object.assign({},s.location,{search:n.toString()}))}}),[c,s])]}function j(e){var n,r,t,s,l=e.defaultValue,a=e.queryString,o=void 0!==a&&a,u=e.groupId,j=h(e),m=(0,i.useState)((function(){return function(e){var n,r=e.defaultValue,i=e.tabValues;if(0===i.length)throw new Error("Docusaurus error: the component requires at least one children component");if(r){if(!x({value:r,tabValues:i}))throw new Error('Docusaurus error: The has a defaultValue "'+r+'" but none of its children has the corresponding value. Available values are: '+i.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return r}var t=null!=(n=i.find((function(e){return e.default})))?n:i[0];if(!t)throw new Error("Unexpected error: 0 tabValues");return t.value}({defaultValue:l,tabValues:j})})),f=m[0],v=m[1],g=p({queryString:o,groupId:u}),b=g[0],y=g[1],A=(n=function(e){return e?"docusaurus.tab."+e:null}({groupId:u}.groupId),r=(0,d.Dv)(n),t=r[0],s=r[1],[t,(0,i.useCallback)((function(e){n&&s.set(e)}),[n,s])]),C=A[0],w=A[1],k=function(){var e=null!=b?b:C;return x({value:e,tabValues:j})?e:null}();return(0,c.A)((function(){k&&v(k)}),[k]),{selectedValue:f,selectValue:(0,i.useCallback)((function(e){if(!x({value:e,tabValues:j}))throw new Error("Can't select invalid tab value="+e);v(e),y(e),w(e)}),[y,w,j]),tabValues:j}}var m=r(92303);const f={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var v=r(74848);function g(e){var n=e.className,r=e.block,i=e.selectedValue,l=e.selectValue,c=e.tabValues,a=[],o=(0,s.a_)().blockElementScrollPositionUntilNextRender,d=function(e){var n=e.currentTarget,r=a.indexOf(n),t=c[r].value;t!==i&&(o(n),l(t))},u=function(e){var n,r=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":var i,t=a.indexOf(e.currentTarget)+1;r=null!=(i=a[t])?i:a[0];break;case"ArrowLeft":var s,l=a.indexOf(e.currentTarget)-1;r=null!=(s=a[l])?s:a[a.length-1]}null==(n=r)||n.focus()};return(0,v.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,t.A)("tabs",{"tabs--block":r},n),children:c.map((function(e){var n=e.value,r=e.label,s=e.attributes;return(0,v.jsx)("li",Object.assign({role:"tab",tabIndex:i===n?0:-1,"aria-selected":i===n,ref:function(e){return a.push(e)},onKeyDown:u,onClick:d},s,{className:(0,t.A)("tabs__item",f.tabItem,null==s?void 0:s.className,{"tabs__item--active":i===n}),children:null!=r?r:n}),n)}))})}function b(e){var n=e.lazy,r=e.children,s=e.selectedValue,l=(Array.isArray(r)?r:[r]).filter(Boolean);if(n){var c=l.find((function(e){return e.props.value===s}));return c?(0,i.cloneElement)(c,{className:(0,t.A)("margin-top--md",c.props.className)}):null}return(0,v.jsx)("div",{className:"margin-top--md",children:l.map((function(e,n){return(0,i.cloneElement)(e,{key:n,hidden:e.props.value!==s})}))})}function y(e){var n=j(e);return(0,v.jsxs)("div",{className:(0,t.A)("tabs-container",f.tabList),children:[(0,v.jsx)(g,Object.assign({},n,e)),(0,v.jsx)(b,Object.assign({},n,e))]})}function A(e){var n=(0,m.A)();return(0,v.jsx)(y,Object.assign({},e,{children:u(e.children)}),String(n))}},28453:(e,n,r)=>{r.d(n,{R:()=>l,x:()=>c});var i=r(96540);const t={},s=i.createContext(t);function l(e){const n=i.useContext(s);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:l(e.components),i.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f137ce68.a0e09f5e.js b/assets/js/f137ce68.a0e09f5e.js new file mode 100644 index 000000000000..74e5e1857a8d --- /dev/null +++ b/assets/js/f137ce68.a0e09f5e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9188],{93716:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>d,contentTitle:()=>o,default:()=>x,frontMatter:()=>a,metadata:()=>i,toc:()=>u});const i=JSON.parse('{"id":"learn/learn-xcm-instructions","title":"XCM Instructions & Register Specification","description":"Specification for Instructions and Registers for the XCM Format.","source":"@site/../docs/learn/learn-xcm-instructions.md","sourceDirName":"learn","slug":"/learn-xcm-instructions","permalink":"/docs/learn-xcm-instructions","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-xcm-instructions.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1727681879000,"frontMatter":{"id":"learn-xcm-instructions","title":"XCM Instructions & Register Specification","sidebar_label":"XCM Instructions","description":"Specification for Instructions and Registers for the XCM Format.","keywords":["cross-consensus","XCM","XCMP","interoperability","communication"],"slug":"../learn-xcm-instructions"},"sidebar":"docs","previous":{"title":"XCM Virtual Machine (XCVM)","permalink":"/docs/learn-xcvm"},"next":{"title":"Accounts","permalink":"/docs/learn-account-advanced"}}');var t=r(74848),s=r(28453),l=r(11470),c=r(19365);const a={id:"learn-xcm-instructions",title:"XCM Instructions & Register Specification",sidebar_label:"XCM Instructions",description:"Specification for Instructions and Registers for the XCM Format.",keywords:["cross-consensus","XCM","XCMP","interoperability","communication"],slug:"../learn-xcm-instructions"},o=void 0,d={},u=[{value:"XCVM Registers",id:"xcvm-registers",level:2},{value:"XCVM Instruction Set",id:"xcvm-instruction-set",level:2},{value:"Instructions Application Example",id:"instructions-application-example",level:2}];function h(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",li:"li",p:"p",ul:"ul",...(0,s.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.admonition,{title:"XCM Documentation",type:"info",children:(0,t.jsxs)(n.p,{children:["For a more practical approach to utilizing XCM, refer to the ",(0,t.jsx)(n.a,{href:"./learn/xcm",children:"XCM Docs"}),". Please keep in\nmind that XCM is under active development."]})}),"\n",(0,t.jsxs)(n.p,{children:["This page can also be viewed at the ",(0,t.jsx)(n.a,{href:"https://github.com/paritytech/xcm-format",children:(0,t.jsx)(n.code,{children:"xcm-format"})}),"\nrepository, where each instruction and register is explained in-depth."]}),"\n",(0,t.jsx)(n.h2,{id:"xcvm-registers",children:"XCVM Registers"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.em,{children:"Programme"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.em,{children:"Programme Counter"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.em,{children:"Error"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.em,{children:"Error Handler"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.em,{children:"Appendix"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.em,{children:"Origin"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.em,{children:"Holding"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.em,{children:"Surplus Weight"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.em,{children:"Refunded Weight"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.em,{children:"Transact Status"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.em,{children:"Topic"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.em,{children:"Transact Status Register"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.em,{children:"Topic Register"})}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"xcvm-instruction-set",children:"XCVM Instruction Set"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"WithdrawAsset"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"ReserveAssetDeposited"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"ReceiveTeleportedAsset"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"QueryResponse"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"TransferAsset"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"TransferReserveAsset"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"Transact"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"HrmpNewChannelOpenRequest"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"HrmpChannelAccepted"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"HrmpChannelClosing"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"ClearOrigin"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"DescendOrigin"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"ReportError"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"DepositAsset"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"DepositReserveAsset"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"ExchangeAsset"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"InitiateReserveWithdraw"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"InitiateTeleport"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"QueryHolding"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"BuyExecution"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"RefundSurplus"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"SetErrorHandler"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"SetAppendix"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"ClearError"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"ClaimAsset"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"Trap"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"SubscribeVersion"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"UnsubscribeVersion"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"BurnAsset"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"ExpectAsset"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"ExpectError"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"ExpectOrigin"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"QueryPallet"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"ExpectPallet"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"ReportTransactStatus"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"ClearTransactStatus"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"LockAsset"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"UnlockAsset"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"NoteUnlockable"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"RequestUnlock"})}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"instructions-application-example",children:"Instructions Application Example"}),"\n",(0,t.jsxs)(n.p,{children:["The following presents the practical mapping of instructions to some\n",(0,t.jsx)(n.a,{href:"/docs/learn-xcm#core-functionality-of-xcm",children:"core functionality in XCM"}),"."]}),"\n",(0,t.jsxs)(l.A,{groupId:"operating-systems",values:[{label:"Programmability",value:"program"},{label:"Functional Multichain Decomposition",value:"fmd"}],children:[(0,t.jsxs)(c.A,{value:"program",children:[(0,t.jsx)(n.p,{children:"These are the primary instructions that enable programmability and branching to be possible.\nBranching in this context is the ability for errors and logic to be handled as needed when dealing\nwith a message."}),(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.a,{href:"https://github.com/paritytech/xcm-format/tree/master#expectassetmultiassets",children:(0,t.jsx)(n.code,{children:"ExpectAsset(MultiAssets)"})})," -\nChecks if the Holding register has a specific amount of assets, throws an error if it doesn't."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.a,{href:"https://github.com/paritytech/xcm-format/tree/master#expecterroroptionu32-error",children:(0,t.jsx)(n.code,{children:"ExpectError(Option<(u32, Error)>)"})})," -\nEnsures the Error register contains the given error, and throws an error if it doesn't."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.a,{href:"https://github.com/paritytech/xcm-format/tree/master#expectoriginmultilocation",children:(0,t.jsx)(n.code,{children:"ExpectOrigin(MultiLocation)"})})," -\nEnsures the Origin register contains the expected origin, and throws an error if it doesn't."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.code,{children:"QueryPallet"})," - Queries the existence of a particular pallet type."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.code,{children:"ExpectPallet"})," - Ensure that a particular pallet with a particular version exists."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.code,{children:"ReportTransactStatus(QueryResponseInfo)"})," - Send a ",(0,t.jsx)(n.code,{children:"QueryResponse"})," message containing the value of\nthe Transact Status Register to some destination."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.code,{children:"ClearTransactStatus"})," - Set the Transact Status Register to its default, cleared, value."]}),"\n"]}),"\n"]})]}),(0,t.jsxs)(c.A,{value:"fmd",children:[(0,t.jsx)(n.p,{children:"These instructions highlight the key instructions focused on Functional Multichain Decomposition."}),(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.code,{children:"LockAsset(MultiAsset, MultiLocation)"})," - Lock the locally held asset and prevent further transfer\nor withdrawal."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.code,{children:"UnlockAsset(MultiAsset, MultiLocation)"})," - Remove the lock over ",(0,t.jsx)(n.code,{children:"asset"})," on this chain and (if\nnothing else is preventing it) allow the asset to be transferred."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.code,{children:"NoteUnlockable(MultiAsset, MultiLocation)"})," - Asset (",(0,t.jsx)(n.code,{children:"asset"}),") has been locked on the ",(0,t.jsx)(n.code,{children:"origin"}),"\nsystem and may not be transferred. It may only be unlocked with the receipt of the ",(0,t.jsx)(n.code,{children:"UnlockAsset"}),"\ninstruction from this chain."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.code,{children:"RequestUnlock(MultiAsset, MultiLocation)"})," - Send an ",(0,t.jsx)(n.code,{children:"UnlockAsset"})," instruction to the ",(0,t.jsx)(n.code,{children:"locker"})," for\nthe given ",(0,t.jsx)(n.code,{children:"asset"}),"."]}),"\n"]}),"\n"]})]})]})]})}function x(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(h,{...e})}):h(e)}},19365:(e,n,r)=>{r.d(n,{A:()=>l});r(96540);var i=r(34164);const t={tabItem:"tabItem_Ymn6"};var s=r(74848);function l(e){var n=e.children,r=e.hidden,l=e.className;return(0,s.jsx)("div",{role:"tabpanel",className:(0,i.A)(t.tabItem,l),hidden:r,children:n})}},11470:(e,n,r)=>{r.d(n,{A:()=>A});var i=r(96540),t=r(34164),s=r(23104),l=r(56347),c=r(205),a=r(57485),o=r(31682),d=r(75376);function u(e){var n,r;return null!=(n=null==(r=i.Children.toArray(e).filter((function(e){return"\n"!==e})).map((function(e){if(!e||(0,i.isValidElement)(e)&&((n=e.props)&&"object"==typeof n&&"value"in n))return e;var n;throw new Error("Docusaurus error: Bad child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:r.filter(Boolean))?n:[]}function h(e){var n=e.values,r=e.children;return(0,i.useMemo)((function(){var e=null!=n?n:function(e){return u(e).map((function(e){var n=e.props;return{value:n.value,label:n.label,attributes:n.attributes,default:n.default}}))}(r);return function(e){var n=(0,o.XI)(e,(function(e,n){return e.value===n.value}));if(n.length>0)throw new Error('Docusaurus error: Duplicate values "'+n.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[n,r])}function x(e){var n=e.value;return e.tabValues.some((function(e){return e.value===n}))}function p(e){var n=e.queryString,r=void 0!==n&&n,t=e.groupId,s=(0,l.W6)(),c=function(e){var n=e.queryString,r=void 0!==n&&n,i=e.groupId;if("string"==typeof r)return r;if(!1===r)return null;if(!0===r&&!i)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=i?i:null}({queryString:r,groupId:t});return[(0,a.aZ)(c),(0,i.useCallback)((function(e){if(c){var n=new URLSearchParams(s.location.search);n.set(c,e),s.replace(Object.assign({},s.location,{search:n.toString()}))}}),[c,s])]}function j(e){var n,r,t,s,l=e.defaultValue,a=e.queryString,o=void 0!==a&&a,u=e.groupId,j=h(e),m=(0,i.useState)((function(){return function(e){var n,r=e.defaultValue,i=e.tabValues;if(0===i.length)throw new Error("Docusaurus error: the component requires at least one children component");if(r){if(!x({value:r,tabValues:i}))throw new Error('Docusaurus error: The has a defaultValue "'+r+'" but none of its children has the corresponding value. Available values are: '+i.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return r}var t=null!=(n=i.find((function(e){return e.default})))?n:i[0];if(!t)throw new Error("Unexpected error: 0 tabValues");return t.value}({defaultValue:l,tabValues:j})})),f=m[0],v=m[1],g=p({queryString:o,groupId:u}),b=g[0],y=g[1],A=(n=function(e){return e?"docusaurus.tab."+e:null}({groupId:u}.groupId),r=(0,d.Dv)(n),t=r[0],s=r[1],[t,(0,i.useCallback)((function(e){n&&s.set(e)}),[n,s])]),C=A[0],w=A[1],k=function(){var e=null!=b?b:C;return x({value:e,tabValues:j})?e:null}();return(0,c.A)((function(){k&&v(k)}),[k]),{selectedValue:f,selectValue:(0,i.useCallback)((function(e){if(!x({value:e,tabValues:j}))throw new Error("Can't select invalid tab value="+e);v(e),y(e),w(e)}),[y,w,j]),tabValues:j}}var m=r(92303);const f={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var v=r(74848);function g(e){var n=e.className,r=e.block,i=e.selectedValue,l=e.selectValue,c=e.tabValues,a=[],o=(0,s.a_)().blockElementScrollPositionUntilNextRender,d=function(e){var n=e.currentTarget,r=a.indexOf(n),t=c[r].value;t!==i&&(o(n),l(t))},u=function(e){var n,r=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":var i,t=a.indexOf(e.currentTarget)+1;r=null!=(i=a[t])?i:a[0];break;case"ArrowLeft":var s,l=a.indexOf(e.currentTarget)-1;r=null!=(s=a[l])?s:a[a.length-1]}null==(n=r)||n.focus()};return(0,v.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,t.A)("tabs",{"tabs--block":r},n),children:c.map((function(e){var n=e.value,r=e.label,s=e.attributes;return(0,v.jsx)("li",Object.assign({role:"tab",tabIndex:i===n?0:-1,"aria-selected":i===n,ref:function(e){return a.push(e)},onKeyDown:u,onClick:d},s,{className:(0,t.A)("tabs__item",f.tabItem,null==s?void 0:s.className,{"tabs__item--active":i===n}),children:null!=r?r:n}),n)}))})}function b(e){var n=e.lazy,r=e.children,s=e.selectedValue,l=(Array.isArray(r)?r:[r]).filter(Boolean);if(n){var c=l.find((function(e){return e.props.value===s}));return c?(0,i.cloneElement)(c,{className:(0,t.A)("margin-top--md",c.props.className)}):null}return(0,v.jsx)("div",{className:"margin-top--md",children:l.map((function(e,n){return(0,i.cloneElement)(e,{key:n,hidden:e.props.value!==s})}))})}function y(e){var n=j(e);return(0,v.jsxs)("div",{className:(0,t.A)("tabs-container",f.tabList),children:[(0,v.jsx)(g,Object.assign({},n,e)),(0,v.jsx)(b,Object.assign({},n,e))]})}function A(e){var n=(0,m.A)();return(0,v.jsx)(y,Object.assign({},e,{children:u(e.children)}),String(n))}},28453:(e,n,r)=>{r.d(n,{R:()=>l,x:()=>c});var i=r(96540);const t={},s=i.createContext(t);function l(e){const n=i.useContext(s);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:l(e.components),i.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f1585bfb.1105192b.js b/assets/js/f1585bfb.1105192b.js new file mode 100644 index 000000000000..cf7866c123a0 --- /dev/null +++ b/assets/js/f1585bfb.1105192b.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3642],{53608:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>o,contentTitle:()=>c,default:()=>d,frontMatter:()=>i,metadata:()=>r,toc:()=>l});const r=JSON.parse('{"id":"learn/xcm/quickstart/learn-xcm-docs-quickstart-summary","title":"Quickstart","description":"Summary of the Chapter.","source":"@site/../docs/learn/xcm/quickstart/summary.md","sourceDirName":"learn/xcm/quickstart","slug":"/learn/xcm/quickstart-summary","permalink":"/docs/learn/xcm/quickstart-summary","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/xcm/quickstart/summary.md","tags":[],"version":"current","lastUpdatedBy":"gui","lastUpdatedAt":1712067554000,"frontMatter":{"id":"learn-xcm-docs-quickstart-summary","title":"Quickstart","sidebar_label":"Summary","description":"Summary of the Chapter.","keywords":["xcm","cross-consensus messaging"],"slug":"../quickstart-summary"},"sidebar":"docs","previous":{"title":"Quickstart","permalink":"/docs/learn/xcm/quickstart"},"next":{"title":"XCM Simulator","permalink":"/docs/learn/xcm/quickstart-simulator"}}');var n=s(74848),a=s(28453);const i={id:"learn-xcm-docs-quickstart-summary",title:"Quickstart",sidebar_label:"Summary",description:"Summary of the Chapter.",keywords:["xcm","cross-consensus messaging"],slug:"../quickstart-summary"},c="Quickstart",o={},l=[{value:"Rust & Cargo",id:"rust--cargo",level:2},{value:"Running the Examples",id:"running-the-examples",level:2}];function u(e){const t={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",p:"p",pre:"pre",...(0,a.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.header,{children:(0,n.jsx)(t.h1,{id:"quickstart",children:"Quickstart"})}),"\n",(0,n.jsxs)(t.p,{children:["The XCM code can be found in\n",(0,n.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/polkadot/xcm",children:"polkadot repository"}),"."]}),"\n",(0,n.jsx)(t.h2,{id:"rust--cargo",children:"Rust & Cargo"}),"\n",(0,n.jsxs)(t.p,{children:["A pre-requisite for using XCM is to have a stable Rust version and Cargo installed. Here's an\n",(0,n.jsx)(t.a,{href:"https://docs.substrate.io/install/",children:"installation guide"}),"."]}),"\n",(0,n.jsx)(t.h2,{id:"running-the-examples",children:"Running the Examples"}),"\n",(0,n.jsxs)(t.p,{children:["All examples in the documentation are located in the\n",(0,n.jsx)(t.a,{href:"https://github.com/paritytech/xcm-docs/tree/main/examples",children:"repository"}),". Follow these steps to run\nthe ",(0,n.jsx)(t.code,{children:"first-look"})," example. First clone the repository:"]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-shell",children:"git clone git@github.com:paritytech/xcm-docs.git\ncd xcm-docs/examples\n"})}),"\n",(0,n.jsx)(t.p,{children:"To run the first-look example, run the following line:"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-shell",children:"cargo test -p xcm-examples para_a_simple_transfer -- --nocapture\n"})}),"\n",(0,n.jsx)(t.p,{children:"It should show you the following output:"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-shell",children:"running 1 test\ntest first_look::tests::para_a_simple_transfer ... ok\n\ntest result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 1 filtered out; finished in 0.01s\n"})})]})}function d(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(u,{...e})}):u(e)}},28453:(e,t,s)=>{s.d(t,{R:()=>i,x:()=>c});var r=s(96540);const n={},a=r.createContext(n);function i(e){const t=r.useContext(a);return r.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function c(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:i(e.components),r.createElement(a.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f1585bfb.5520b810.js b/assets/js/f1585bfb.5520b810.js deleted file mode 100644 index 134f3ac47742..000000000000 --- a/assets/js/f1585bfb.5520b810.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3642],{60957:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>o,contentTitle:()=>i,default:()=>d,frontMatter:()=>a,metadata:()=>c,toc:()=>l});var r=s(74848),n=s(28453);const a={id:"learn-xcm-docs-quickstart-summary",title:"Quickstart",sidebar_label:"Summary",description:"Summary of the Chapter.",keywords:["xcm","cross-consensus messaging"],slug:"../quickstart-summary"},i="Quickstart",c={id:"learn/xcm/quickstart/learn-xcm-docs-quickstart-summary",title:"Quickstart",description:"Summary of the Chapter.",source:"@site/../docs/learn/xcm/quickstart/summary.md",sourceDirName:"learn/xcm/quickstart",slug:"/learn/xcm/quickstart-summary",permalink:"/docs/learn/xcm/quickstart-summary",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/xcm/quickstart/summary.md",tags:[],version:"current",lastUpdatedBy:"gui",lastUpdatedAt:1712067554e3,frontMatter:{id:"learn-xcm-docs-quickstart-summary",title:"Quickstart",sidebar_label:"Summary",description:"Summary of the Chapter.",keywords:["xcm","cross-consensus messaging"],slug:"../quickstart-summary"},sidebar:"docs",previous:{title:"Quickstart",permalink:"/docs/learn/xcm/quickstart"},next:{title:"XCM Simulator",permalink:"/docs/learn/xcm/quickstart-simulator"}},o={},l=[{value:"Rust & Cargo",id:"rust--cargo",level:2},{value:"Running the Examples",id:"running-the-examples",level:2}];function u(e){const t={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",p:"p",pre:"pre",...(0,n.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.header,{children:(0,r.jsx)(t.h1,{id:"quickstart",children:"Quickstart"})}),"\n",(0,r.jsxs)(t.p,{children:["The XCM code can be found in\n",(0,r.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/polkadot/xcm",children:"polkadot repository"}),"."]}),"\n",(0,r.jsx)(t.h2,{id:"rust--cargo",children:"Rust & Cargo"}),"\n",(0,r.jsxs)(t.p,{children:["A pre-requisite for using XCM is to have a stable Rust version and Cargo installed. Here's an\n",(0,r.jsx)(t.a,{href:"https://docs.substrate.io/install/",children:"installation guide"}),"."]}),"\n",(0,r.jsx)(t.h2,{id:"running-the-examples",children:"Running the Examples"}),"\n",(0,r.jsxs)(t.p,{children:["All examples in the documentation are located in the\n",(0,r.jsx)(t.a,{href:"https://github.com/paritytech/xcm-docs/tree/main/examples",children:"repository"}),". Follow these steps to run\nthe ",(0,r.jsx)(t.code,{children:"first-look"})," example. First clone the repository:"]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-shell",children:"git clone git@github.com:paritytech/xcm-docs.git\ncd xcm-docs/examples\n"})}),"\n",(0,r.jsx)(t.p,{children:"To run the first-look example, run the following line:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-shell",children:"cargo test -p xcm-examples para_a_simple_transfer -- --nocapture\n"})}),"\n",(0,r.jsx)(t.p,{children:"It should show you the following output:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-shell",children:"running 1 test\ntest first_look::tests::para_a_simple_transfer ... ok\n\ntest result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 1 filtered out; finished in 0.01s\n"})})]})}function d(e={}){const{wrapper:t}={...(0,n.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(u,{...e})}):u(e)}},28453:(e,t,s)=>{s.d(t,{R:()=>i,x:()=>c});var r=s(96540);const n={},a=r.createContext(n);function i(e){const t=r.useContext(a);return r.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function c(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:i(e.components),r.createElement(a.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f189ca9f.1b21ca48.js b/assets/js/f189ca9f.1b21ca48.js deleted file mode 100644 index 5eca3a49ea8c..000000000000 --- a/assets/js/f189ca9f.1b21ca48.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5312],{6026:(e,a,t)=>{t.r(a),t.d(a,{assets:()=>l,contentTitle:()=>i,default:()=>d,frontMatter:()=>o,metadata:()=>r,toc:()=>c});var n=t(74848),s=t(28453);const o={id:"learn-spree",title:"SPREE",sidebar_label:"SPREE",description:"Fundamentals of SPREE.",keywords:["execution","SPREE","wasm","runtime"],slug:"../learn-spree"},i=void 0,r={id:"learn/learn-spree",title:"SPREE",description:"Fundamentals of SPREE.",source:"@site/../docs/learn/learn-spree.md",sourceDirName:"learn",slug:"/learn-spree",permalink:"/docs/learn-spree",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-spree.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1726760224e3,frontMatter:{id:"learn-spree",title:"SPREE",sidebar_label:"SPREE",description:"Fundamentals of SPREE.",keywords:["execution","SPREE","wasm","runtime"],slug:"../learn-spree"},sidebar:"docs",previous:{title:"Future Implementations",permalink:"/docs/learn-future-implementations-index"},next:{title:"Elastic Scaling",permalink:"/docs/learn-elastic-scaling"}},l={},c=[{value:"Origin",id:"origin",level:2},{value:"What is a SPREE module?",id:"what-is-a-spree-module",level:2},{value:"Why?",id:"why",level:2},{value:"Example",id:"example",level:2}];function h(e){const a={a:"a",code:"code",h2:"h2",img:"img",li:"li",p:"p",ul:"ul",...(0,s.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(a.p,{children:'Shared Protected Runtime Execution Enclaves (SPREE) sometimes referred to as "trust wormholes," are\nfragments of logic comparable to runtime modules in Substrate, but live on the relay chain and maybe\nopted into by parachains.'}),"\n",(0,n.jsx)(a.p,{children:"SPREE in brief was described with the following properties and functions:"}),"\n",(0,n.jsxs)(a.ul,{children:["\n",(0,n.jsx)(a.li,{children:"Parachains can opt-in to special runtime logic fragments (like smart contracts)."}),"\n",(0,n.jsxs)(a.li,{children:["These fragments have their own storage and own ",(0,n.jsx)(a.a,{href:"/docs/learn-xcm",children:"XCM"})," endpoint."]}),"\n",(0,n.jsx)(a.li,{children:"All instances across parachains have identical logic."}),"\n",(0,n.jsx)(a.li,{children:"It executes alongside parachain logic."}),"\n",(0,n.jsx)(a.li,{children:"Protected: storage can not be altered by parachain logic; messages can not be faked from them by\nparachains."}),"\n"]}),"\n",(0,n.jsx)(a.h2,{id:"origin",children:"Origin"}),"\n",(0,n.jsxs)(a.p,{children:["On 28 March, 2019 u/Tawaren, a member of the Polkadot community, made a post on\n",(0,n.jsx)(a.a,{href:"https://www.reddit.com/r/dot/",children:"r/dot"}),' called "SmartProtocols Idea" and laid out a proposal for\n',(0,n.jsx)(a.a,{href:"https://www.reddit.com/r/dot/comments/b6kljn/smartprotocols_idea/",children:"Smart Protocols"}),". The core\ninsight of the post was that XCMP had a complication in that it was difficult to verify and prove\ncode was executed on a parachain without trust. A solution was to install the SmartProtocols in the\nrelay chain that would be isolated blobs of code with their own storage per instance that could only\nbe changed through an interface with each parachain. SmartProtocols are the precursor to SPREE."]}),"\n",(0,n.jsx)(a.h2,{id:"what-is-a-spree-module",children:"What is a SPREE module?"}),"\n",(0,n.jsxs)(a.p,{children:["SPREE modules are fragments of logic (in concrete terms they are blobs of\n",(0,n.jsx)(a.a,{href:"/docs/learn-wasm",children:"WebAssembly"})," code) that are uploaded onto Polkadot through a governance mechanism or\nby parachains. Once the blob is uploaded to the relay chain, all other parachains can decide to\nopt-in to the logic. The SPREE module would retain its own storage independent of the parachain, but\nwould be callable through an interface with the parachain. Parachains will send messages to the\nSPREE module synchronously."]}),"\n",(0,n.jsx)(a.p,{children:"SPREE modules are important to the overall XCMP architecture because they give a guarantee to the\ncode that will be executed on destination parachains. While XCMP guarantees the delivery of a\nmessage, it does not guarantee what code will be executed, i.e. how the receiving parachain will\ninterpret the message. While XCMP accomplishes trustless message passing, SPREE is the trustless\ninterpretation of the message and a key part of the usefulness of XCMP."}),"\n",(0,n.jsx)(a.p,{children:"SPREE modules are like recipes in cookbooks. For example, if we give an order to a cook to make a\nsouffl\xe9, and we\u2019re decently confident in the ability of the cook, we have a vague idea of what will\nbe made but no actual surety of how it will be made. However, let\u2019s say that a cook has the \u201cSouffl\xe9\nMaker\u2019s Manual\u201d on their bookshelf and has committed themselves to only make souffles from this\nbook. Now we can also consult the same book that the cook has, and we have a precise understanding\nof what will happen when we tell the cook to make a souffl\xe9. In this example, \u201cmake a souffl\xe9\u201d was\nthe message in XCMP and the cookbook was the SPREE module."}),"\n",(0,n.jsx)(a.p,{children:"In concrete terms, SPREE modules could be useful for various functionality on Polkadot. One\nsuggested use case of SPREE modules is for a trustless decentralized exchange that is offered as\nfunctionality to any parachain without any extra effort from parachain developers. One can imagine\nthis working by having a SPREE module that exposes the interface for the incrementing and\ndecrementing of balances of various assets based on a unique identifier."}),"\n",(0,n.jsx)(a.h2,{id:"why",children:"Why?"}),"\n",(0,n.jsx)(a.p,{children:"Sending messages across parachains in XCMP only ensures that the message will be delivered but does\nnot specify the code that will be executed, or how the message will be interpreted by the receiving\nparachain. There would be ways around this such as requesting a verifiable receipt of the execution\nfrom the receiving parachain, but in the naked case, the other parachain would have to be trusted.\nHaving shared code that exists in appendices that the parachain can opt-in to resolves the need for\ntrust and makes the execution of the appendices completely trustless."}),"\n",(0,n.jsx)(a.p,{children:"SPREE would be helpful to ensure that the same logic is shared between parachains in the SPREE\nmodules. An especially relevant use case would revolve around the use of token transfers across\nparachains in which it is important that the sending and receiving parachains agree about how to\nchange the total supply of tokens and a basic interface."}),"\n",(0,n.jsx)(a.h2,{id:"example",children:"Example"}),"\n",(0,n.jsx)(a.p,{children:(0,n.jsx)(a.img,{alt:"spree example",src:t(26644).A+"",width:"345",height:"354"})}),"\n",(0,n.jsx)(a.p,{children:"The diagram above is a simplification of the Polkadot system."}),"\n",(0,n.jsx)(a.p,{children:'In this diagram, we see that the Wasm code for SPREE module "X" has been uploaded to the relay\nchain. The two cylinders "A" and "B" represent two distinct parachains that have both opted-in to\nthis SPREE module creating two distinct instances of it with their own XCMP endpoints "A.X" and\n"B.X".'}),"\n",(0,n.jsx)(a.p,{children:'In the example, we assume that this SPREE module "X" contains the functionality for incrementing or\ndecrementing the balance of a particular asset that is unique to this module.'}),"\n",(0,n.jsx)(a.p,{children:"By initiating a transaction at A.X to decrease a particular balance by 1, a message over XCMP can be\ntrustlessly sent to B.X to increase a balance by 1."}),"\n",(0,n.jsx)(a.p,{children:"Collators, represented as the green triangle are responsible for relaying this message from\nparachain A to parachain B, as well as maintaining the storage for each particular instance of A.X\nand B.X for their respective parachains. They provide proofs of valid state transitions to the Relay\nChain validators represented as blue diamonds."}),"\n",(0,n.jsxs)(a.p,{children:["Validators can validate the correct state transitions of SPREE modules A.X and B.X by being provided\nwith the previous state root of the SPREE module instances, the data of the XCMP message between the\ninstances, and the next state root of the instance. They do this validation by checking it against\nthe ",(0,n.jsx)(a.code,{children:"validate"})," function as provided by the SPREE module API. Collators are expected to be able to\nprovide this information to progress their parachains."]})]})}function d(e={}){const{wrapper:a}={...(0,s.R)(),...e.components};return a?(0,n.jsx)(a,{...e,children:(0,n.jsx)(h,{...e})}):h(e)}},26644:(e,a,t)=>{t.d(a,{A:()=>n});const n=t.p+"assets/images/spree_module-a8eefaaf0abf97f465af31069d8856ff.png"},28453:(e,a,t)=>{t.d(a,{R:()=>i,x:()=>r});var n=t(96540);const s={},o=n.createContext(s);function i(e){const a=n.useContext(o);return n.useMemo((function(){return"function"==typeof e?e(a):{...a,...e}}),[a,e])}function r(e){let a;return a=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),n.createElement(o.Provider,{value:a},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f189ca9f.62569644.js b/assets/js/f189ca9f.62569644.js new file mode 100644 index 000000000000..3c5a99977b2d --- /dev/null +++ b/assets/js/f189ca9f.62569644.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5312],{18451:(e,a,t)=>{t.r(a),t.d(a,{assets:()=>l,contentTitle:()=>r,default:()=>d,frontMatter:()=>i,metadata:()=>n,toc:()=>c});const n=JSON.parse('{"id":"learn/learn-spree","title":"SPREE","description":"Fundamentals of SPREE.","source":"@site/../docs/learn/learn-spree.md","sourceDirName":"learn","slug":"/learn-spree","permalink":"/docs/learn-spree","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-spree.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1726760224000,"frontMatter":{"id":"learn-spree","title":"SPREE","sidebar_label":"SPREE","description":"Fundamentals of SPREE.","keywords":["execution","SPREE","wasm","runtime"],"slug":"../learn-spree"},"sidebar":"docs","previous":{"title":"Future Implementations","permalink":"/docs/learn-future-implementations-index"},"next":{"title":"Elastic Scaling","permalink":"/docs/learn-elastic-scaling"}}');var s=t(74848),o=t(28453);const i={id:"learn-spree",title:"SPREE",sidebar_label:"SPREE",description:"Fundamentals of SPREE.",keywords:["execution","SPREE","wasm","runtime"],slug:"../learn-spree"},r=void 0,l={},c=[{value:"Origin",id:"origin",level:2},{value:"What is a SPREE module?",id:"what-is-a-spree-module",level:2},{value:"Why?",id:"why",level:2},{value:"Example",id:"example",level:2}];function h(e){const a={a:"a",code:"code",h2:"h2",img:"img",li:"li",p:"p",ul:"ul",...(0,o.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a.p,{children:'Shared Protected Runtime Execution Enclaves (SPREE) sometimes referred to as "trust wormholes," are\nfragments of logic comparable to runtime modules in Substrate, but live on the relay chain and maybe\nopted into by parachains.'}),"\n",(0,s.jsx)(a.p,{children:"SPREE in brief was described with the following properties and functions:"}),"\n",(0,s.jsxs)(a.ul,{children:["\n",(0,s.jsx)(a.li,{children:"Parachains can opt-in to special runtime logic fragments (like smart contracts)."}),"\n",(0,s.jsxs)(a.li,{children:["These fragments have their own storage and own ",(0,s.jsx)(a.a,{href:"/docs/learn-xcm",children:"XCM"})," endpoint."]}),"\n",(0,s.jsx)(a.li,{children:"All instances across parachains have identical logic."}),"\n",(0,s.jsx)(a.li,{children:"It executes alongside parachain logic."}),"\n",(0,s.jsx)(a.li,{children:"Protected: storage can not be altered by parachain logic; messages can not be faked from them by\nparachains."}),"\n"]}),"\n",(0,s.jsx)(a.h2,{id:"origin",children:"Origin"}),"\n",(0,s.jsxs)(a.p,{children:["On 28 March, 2019 u/Tawaren, a member of the Polkadot community, made a post on\n",(0,s.jsx)(a.a,{href:"https://www.reddit.com/r/dot/",children:"r/dot"}),' called "SmartProtocols Idea" and laid out a proposal for\n',(0,s.jsx)(a.a,{href:"https://www.reddit.com/r/dot/comments/b6kljn/smartprotocols_idea/",children:"Smart Protocols"}),". The core\ninsight of the post was that XCMP had a complication in that it was difficult to verify and prove\ncode was executed on a parachain without trust. A solution was to install the SmartProtocols in the\nrelay chain that would be isolated blobs of code with their own storage per instance that could only\nbe changed through an interface with each parachain. SmartProtocols are the precursor to SPREE."]}),"\n",(0,s.jsx)(a.h2,{id:"what-is-a-spree-module",children:"What is a SPREE module?"}),"\n",(0,s.jsxs)(a.p,{children:["SPREE modules are fragments of logic (in concrete terms they are blobs of\n",(0,s.jsx)(a.a,{href:"/docs/learn-wasm",children:"WebAssembly"})," code) that are uploaded onto Polkadot through a governance mechanism or\nby parachains. Once the blob is uploaded to the relay chain, all other parachains can decide to\nopt-in to the logic. The SPREE module would retain its own storage independent of the parachain, but\nwould be callable through an interface with the parachain. Parachains will send messages to the\nSPREE module synchronously."]}),"\n",(0,s.jsx)(a.p,{children:"SPREE modules are important to the overall XCMP architecture because they give a guarantee to the\ncode that will be executed on destination parachains. While XCMP guarantees the delivery of a\nmessage, it does not guarantee what code will be executed, i.e. how the receiving parachain will\ninterpret the message. While XCMP accomplishes trustless message passing, SPREE is the trustless\ninterpretation of the message and a key part of the usefulness of XCMP."}),"\n",(0,s.jsx)(a.p,{children:"SPREE modules are like recipes in cookbooks. For example, if we give an order to a cook to make a\nsouffl\xe9, and we\u2019re decently confident in the ability of the cook, we have a vague idea of what will\nbe made but no actual surety of how it will be made. However, let\u2019s say that a cook has the \u201cSouffl\xe9\nMaker\u2019s Manual\u201d on their bookshelf and has committed themselves to only make souffles from this\nbook. Now we can also consult the same book that the cook has, and we have a precise understanding\nof what will happen when we tell the cook to make a souffl\xe9. In this example, \u201cmake a souffl\xe9\u201d was\nthe message in XCMP and the cookbook was the SPREE module."}),"\n",(0,s.jsx)(a.p,{children:"In concrete terms, SPREE modules could be useful for various functionality on Polkadot. One\nsuggested use case of SPREE modules is for a trustless decentralized exchange that is offered as\nfunctionality to any parachain without any extra effort from parachain developers. One can imagine\nthis working by having a SPREE module that exposes the interface for the incrementing and\ndecrementing of balances of various assets based on a unique identifier."}),"\n",(0,s.jsx)(a.h2,{id:"why",children:"Why?"}),"\n",(0,s.jsx)(a.p,{children:"Sending messages across parachains in XCMP only ensures that the message will be delivered but does\nnot specify the code that will be executed, or how the message will be interpreted by the receiving\nparachain. There would be ways around this such as requesting a verifiable receipt of the execution\nfrom the receiving parachain, but in the naked case, the other parachain would have to be trusted.\nHaving shared code that exists in appendices that the parachain can opt-in to resolves the need for\ntrust and makes the execution of the appendices completely trustless."}),"\n",(0,s.jsx)(a.p,{children:"SPREE would be helpful to ensure that the same logic is shared between parachains in the SPREE\nmodules. An especially relevant use case would revolve around the use of token transfers across\nparachains in which it is important that the sending and receiving parachains agree about how to\nchange the total supply of tokens and a basic interface."}),"\n",(0,s.jsx)(a.h2,{id:"example",children:"Example"}),"\n",(0,s.jsx)(a.p,{children:(0,s.jsx)(a.img,{alt:"spree example",src:t(26644).A+"",width:"345",height:"354"})}),"\n",(0,s.jsx)(a.p,{children:"The diagram above is a simplification of the Polkadot system."}),"\n",(0,s.jsx)(a.p,{children:'In this diagram, we see that the Wasm code for SPREE module "X" has been uploaded to the relay\nchain. The two cylinders "A" and "B" represent two distinct parachains that have both opted-in to\nthis SPREE module creating two distinct instances of it with their own XCMP endpoints "A.X" and\n"B.X".'}),"\n",(0,s.jsx)(a.p,{children:'In the example, we assume that this SPREE module "X" contains the functionality for incrementing or\ndecrementing the balance of a particular asset that is unique to this module.'}),"\n",(0,s.jsx)(a.p,{children:"By initiating a transaction at A.X to decrease a particular balance by 1, a message over XCMP can be\ntrustlessly sent to B.X to increase a balance by 1."}),"\n",(0,s.jsx)(a.p,{children:"Collators, represented as the green triangle are responsible for relaying this message from\nparachain A to parachain B, as well as maintaining the storage for each particular instance of A.X\nand B.X for their respective parachains. They provide proofs of valid state transitions to the Relay\nChain validators represented as blue diamonds."}),"\n",(0,s.jsxs)(a.p,{children:["Validators can validate the correct state transitions of SPREE modules A.X and B.X by being provided\nwith the previous state root of the SPREE module instances, the data of the XCMP message between the\ninstances, and the next state root of the instance. They do this validation by checking it against\nthe ",(0,s.jsx)(a.code,{children:"validate"})," function as provided by the SPREE module API. Collators are expected to be able to\nprovide this information to progress their parachains."]})]})}function d(e={}){const{wrapper:a}={...(0,o.R)(),...e.components};return a?(0,s.jsx)(a,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}},26644:(e,a,t)=>{t.d(a,{A:()=>n});const n=t.p+"assets/images/spree_module-a8eefaaf0abf97f465af31069d8856ff.png"},28453:(e,a,t)=>{t.d(a,{R:()=>i,x:()=>r});var n=t(96540);const s={},o=n.createContext(s);function i(e){const a=n.useContext(o);return n.useMemo((function(){return"function"==typeof e?e(a):{...a,...e}}),[a,e])}function r(e){let a;return a=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),n.createElement(o.Provider,{value:a},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f2521980.3eef11c9.js b/assets/js/f2521980.3eef11c9.js deleted file mode 100644 index 81bfdffc8e21..000000000000 --- a/assets/js/f2521980.3eef11c9.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk=self.webpackChunk||[]).push([[3584],{28258:(e,t,o)=>{"use strict";o.r(t),o.d(t,{assets:()=>d,contentTitle:()=>r,default:()=>h,frontMatter:()=>s,metadata:()=>i,toc:()=>l});var a=o(74848),n=o(28453);o(47379);const s={id:"getting-started",title:"Getting Started",sidebar_label:"Getting Started",description:"Get started with Polkadot and Web3.",keywords:["introduction","getting started","what is polkadot","why polkadot"],slug:"../getting-started"},r=void 0,i={id:"general/getting-started",title:"Getting Started",description:"Get started with Polkadot and Web3.",source:"@site/../docs/general/getting-started.md",sourceDirName:"general",slug:"/getting-started",permalink:"/docs/getting-started",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/getting-started.md",tags:[],version:"current",lastUpdatedBy:"github-actions[bot]",lastUpdatedAt:1728284821e3,frontMatter:{id:"getting-started",title:"Getting Started",sidebar_label:"Getting Started",description:"Get started with Polkadot and Web3.",keywords:["introduction","getting started","what is polkadot","why polkadot"],slug:"../getting-started"},sidebar:"docs",previous:{title:"Explore",permalink:"/docs/explore-index"},next:{title:"Wallets",permalink:"/docs/wallets-index"}},d={},l=[{value:"Interact with Polkadot",id:"interact-with-polkadot",level:2},{value:"What is Polkadot?",id:"what-is-polkadot",level:2},{value:"What can I do with my DOT?",id:"what-can-i-do-with-my-dot",level:2},{value:"Polkadot Gifts",id:"polkadot-gifts",level:2},{value:"Why should you use Polkadot?",id:"why-should-you-use-polkadot",level:2},{value:"Where to start learning?",id:"where-to-start-learning",level:2},{value:"Brand-New Polkadot learners",id:"brand-new-polkadot-learners",level:3},{value:"Resources",id:"resources",level:2}];function c(e){const t={a:"a",admonition:"admonition",h2:"h2",h3:"h3",li:"li",p:"p",strong:"strong",ul:"ul",...(0,n.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(t.admonition,{title:"Welcome to the Polkadot Wiki",type:"info",children:[(0,a.jsx)(t.p,{children:"The Polkadot Wiki serves as the central source of truth for Polkadot. It is a community-focused\ninitiative led by Web3 Foundation to keep an up-to-date resource on the best information for\nlearning, building, and maintaining on Polkadot."}),(0,a.jsx)(t.p,{children:"The Wiki has three main sections:"}),(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.a,{href:"./learn-index",children:(0,a.jsx)(t.strong,{children:"Learn"})})," (for people who want to learn about Polkadot)"]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.a,{href:"/docs/build-index",children:(0,a.jsx)(t.strong,{children:"Build"})})," (for people who want to build on Polkadot)"]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.a,{href:"/docs/maintain-index",children:(0,a.jsx)(t.strong,{children:"Maintain"})})," (for people who want to maintain the Polkadot\nnetwork)."]}),"\n"]})]}),"\n",(0,a.jsx)(t.h2,{id:"interact-with-polkadot",children:"Interact with Polkadot"}),"\n",(0,a.jsxs)("div",{className:"row",children:[(0,a.jsxs)("div",{className:"col text--center","data-aos":"fade-up","data-aos-delay":"100",children:[(0,a.jsx)("a",{href:"../docs/learn-accounts",children:(0,a.jsx)("img",{src:"/img/polkadot-guide/Creating an account.png",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,a.jsx)("p",{children:(0,a.jsx)("a",{href:"../docs/learn-accounts",children:"Accounts"})})]}),(0,a.jsxs)("div",{className:"col text--center","data-aos":"fade-up","data-aos-delay":"200",children:[(0,a.jsx)("a",{href:"../docs/learn-transactions",children:(0,a.jsx)("img",{src:"/img/polkadot-guide/Balance Transfers.png",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,a.jsx)("p",{children:(0,a.jsx)("a",{href:"../docs/learn-transactions",children:"Transactions"})})]}),(0,a.jsxs)("div",{className:"col text--center","data-aos":"fade-up","data-aos-delay":"300",children:[(0,a.jsx)("a",{href:"../docs/learn-staking",children:(0,a.jsx)("img",{src:"/img/polkadot-guide/Staking.png",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,a.jsx)("p",{children:(0,a.jsx)("a",{href:"../docs/learn-staking",children:"Staking"})})]})]}),"\n",(0,a.jsxs)("div",{className:"row",children:[(0,a.jsxs)("div",{className:"col text--center","data-aos":"fade-up","data-aos-delay":"400",children:[(0,a.jsx)("a",{href:"../docs/learn-polkadot-opengov",children:(0,a.jsx)("img",{src:"/img/polkadot-guide/Polkadot OpenGov.png",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,a.jsx)("p",{children:(0,a.jsx)("a",{href:"../docs/learn-polkadot-opengov",children:"Polkadot OpenGov"})})]}),(0,a.jsxs)("div",{className:"col text--center","data-aos":"fade-up","data-aos-delay":"500",children:[(0,a.jsx)("a",{href:"../docs/learn-proxies",children:(0,a.jsx)("img",{src:"/img/polkadot-guide/Proxy Accounts.png",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,a.jsx)("p",{children:(0,a.jsx)("a",{href:"../docs/learn-proxies",children:"Proxy Accounts"})})]}),(0,a.jsxs)("div",{className:"col text--center","data-aos":"fade-up","data-aos-delay":"600",children:[(0,a.jsx)("a",{href:"../docs/learn-identity",children:(0,a.jsx)("img",{src:"/img/polkadot-guide/Set an Identity.png",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,a.jsx)("p",{children:(0,a.jsx)("a",{href:"../docs/learn-identity",children:"Account Identity"})})]})]}),"\n",(0,a.jsxs)("div",{className:"row",children:[(0,a.jsxs)("div",{className:"col text--center","data-aos":"fade-up","data-aos-delay":"700",children:[(0,a.jsx)("a",{href:"../docs/learn-parachains",children:(0,a.jsx)("img",{src:"/img/polkadot-guide/Parachains.png",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,a.jsx)("p",{children:(0,a.jsx)("a",{href:"../docs/learn-parachains",children:"Parachains"})})]}),(0,a.jsxs)("div",{className:"col text--center","data-aos":"fade-up","data-aos-delay":"900",children:[(0,a.jsx)("a",{href:"../docs/learn-bridges",children:(0,a.jsx)("img",{src:"/img/polkadot-guide/Bridges.png",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,a.jsx)("p",{children:(0,a.jsx)("a",{href:"../docs/learn-bridges",children:"Bridges"})})]}),(0,a.jsxs)("div",{className:"col text--center","data-aos":"fade-up","data-aos-delay":"900",children:[(0,a.jsx)("a",{href:"../docs/ambassadors",children:(0,a.jsx)("img",{src:"/img/polkadot-guide/Become an Ambassador.png",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,a.jsx)("p",{children:(0,a.jsx)("a",{href:"../docs/ambassadors",children:"Become an Ambassador"})})]})]}),"\n",(0,a.jsx)(t.h2,{id:"what-is-polkadot",children:"What is Polkadot?"}),"\n",(0,a.jsxs)(t.p,{children:["Polkadot is the first layer-0 (L0) blockchain that provides shared security and secure\ninteroperability to layer-1 (L1) blockchains. Those L1 blockchain attached to Polkadot are also\ncalled ",(0,a.jsx)(t.a,{href:"/docs/learn-parachains",children:"parachains"})," as their transactions are processed in parallel by\nPolkadot. For more information about Polkadot see the dedicated page about the state of\n",(0,a.jsx)(t.a,{href:"/docs/polkadot-v1",children:"Polkadot 1.0"})," released in mid 2023."]}),"\n",(0,a.jsxs)(t.p,{children:["Polkadot has an on-chain ",(0,a.jsx)(t.a,{href:"/docs/learn-polkadot-opengov",children:"open governance"})," (also called Polkadot\nOpenGov) to orchestrate decisions, including accessing funds from the\n",(0,a.jsx)(t.a,{href:"/docs/learn-polkadot-opengov-treasury",children:"treasury"}),"."]}),"\n",(0,a.jsxs)(t.p,{children:["The ",(0,a.jsx)(t.a,{href:"/docs/learn-DOT",children:"DOT token"})," gives you the power to participate in Polkadot OpenGov, and\n",(0,a.jsx)(t.a,{href:"/docs/learn-staking",children:"staking"}),"."]}),"\n",(0,a.jsxs)(t.p,{children:["The level of abstraction and generalization of Polkadot allows to build applications that are\nspecific to their use cases, and for those applications to communicate securely leveraging each\nother value proposition. The trustless cooperation between applications is what makes Polkadot an\nideal ecosystem to build a ",(0,a.jsx)(t.a,{href:"/docs/web3-and-polkadot",children:"web3 future"}),"."]}),"\n",(0,a.jsxs)("div",{className:"row",children:[(0,a.jsxs)("div",{className:"col text--center",children:[(0,a.jsx)("a",{href:"https://www.youtube.com/watch?v=_-k0xkooSlA",children:(0,a.jsx)("img",{src:"https://img.youtube.com/vi/_-k0xkooSlA/0.jpg",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,a.jsx)("p",{children:(0,a.jsx)("a",{href:"https://www.youtube.com/watch?v=_-k0xkooSlA",children:"Polkadot: Are You Ready to Start Building?"})})]}),(0,a.jsxs)("div",{className:"col text--center",children:[(0,a.jsx)("a",{href:"https://www.youtube.com/watch?v=BQ60bTU1bPg",children:(0,a.jsx)("img",{src:"https://img.youtube.com/vi/BQ60bTU1bPg/0.jpg",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,a.jsx)("p",{children:(0,a.jsx)("a",{href:"https://www.youtube.com/watch?v=BQ60bTU1bPg",children:"What is Polkadot?"})})]})]}),"\n",(0,a.jsx)(t.h2,{id:"what-can-i-do-with-my-dot",children:"What can I do with my DOT?"}),"\n",(0,a.jsxs)(t.p,{children:[(0,a.jsx)(t.a,{href:"/docs/learn-DOT",children:"DOT"})," is the native token of the Polkadot Network. DOT can be used for\ntransaction fees, staking, governance, acquisition of coretime and for enabling several key\nfunctionalities on Polkadot. See more information on\n",(0,a.jsx)(t.a,{href:"/docs/chain-state-values",children:"the Chain State Values page"}),"."]}),"\n",(0,a.jsx)(t.admonition,{type:"info",children:(0,a.jsxs)(t.p,{children:["Explore Polkadot with a secure and user-friendly wallets listed on the\n",(0,a.jsx)(t.a,{href:"https://www.polkadot.network/ecosystem/wallets/",children:"Polkadot website"}),"."]})}),"\n",(0,a.jsxs)(t.p,{children:["DOT has utility in Polkadot's OpenGov where you can\n",(0,a.jsx)(t.a,{href:"/docs/learn-polkadot-opengov#voting-on-a-referendum",children:"vote"}),",\n",(0,a.jsx)(t.a,{href:"/docs/learn-polkadot-opengov#multirole-delegation",children:"delegate your voting power"}),", and place\ndeposits for your referenda or referenda proposed by others. DOT can also enable you to participate\nin programs like the ",(0,a.jsx)(t.a,{href:"/docs/thousand-validators#polkadot",children:"Thousand Validators Programme"}),"."]}),"\n",(0,a.jsx)(t.h2,{id:"polkadot-gifts",children:"Polkadot Gifts"}),"\n",(0,a.jsx)("img",{align:"right",src:"/img/polkadot-guide/Gift.png",width:"210",height:"200"}),"\n",(0,a.jsx)(t.p,{children:"Polkadot Gifts provide an easy way to:"}),"\n",(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsx)(t.li,{children:"Onboard friends or family who are curious about blockchain but haven\u2019t made the leap yet."}),"\n",(0,a.jsx)(t.li,{children:"Share your love of Polkadot and send any amount of DOT."}),"\n",(0,a.jsx)(t.li,{children:"Say \u2018thank you\u2019 or send someone tokens when you don\u2019t know their address."}),"\n",(0,a.jsx)(t.li,{children:"Get friends and family set up to participate in crowdloans."}),"\n"]}),"\n",(0,a.jsxs)(t.p,{children:["Learn more about how you can create and send Polkadot Gifts\n",(0,a.jsx)(t.a,{href:"https://polkadot.network/blog/introducing-polkadot-kusama-gifts/",children:"here"}),"."]}),"\n",(0,a.jsx)(t.h2,{id:"why-should-you-use-polkadot",children:"Why should you use Polkadot?"}),"\n",(0,a.jsxs)(t.p,{children:["Whether you're a blockchain developer or if you're interested in taking part of\n",(0,a.jsx)(t.a,{href:"https://polkadot.network/polkadot-ambassador-program/",children:"Polkadot's community"}),", Polkadot offers a\nplatform for everyone. This wiki offers a place for builders and maintainers to utilize\n",(0,a.jsx)(t.a,{href:"/docs/build-tools-index",children:"tools"})," and for brand-new learners to dive into educational material."]}),"\n",(0,a.jsx)(t.h2,{id:"where-to-start-learning",children:"Where to start learning?"}),"\n",(0,a.jsxs)(t.p,{children:["The\n",(0,a.jsx)(t.a,{href:"https://mooc.web3.foundation/course/blockchain-fundamentals/",children:"Blockchain Fundamentals MOOC course"}),"\nis a great introduction to start familiarizing yourself with blockchain concepts such as\ncryptography and networks, and how these play into things like decentralization and cryptocurrency."]}),"\n",(0,a.jsx)(t.p,{children:"This is recommended for users with backgrounds of all levels, and the course is free!"}),"\n",(0,a.jsx)(t.h3,{id:"brand-new-polkadot-learners",children:"Brand-New Polkadot learners"}),"\n",(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.a,{href:"https://polkadot.network/PolkaDotPaper.pdf",children:"Polkadot's original white paper"})," is a technical\nsummary around one possible direction of implementing the Polkadot network. This paper uses\nrationale and technical details to support why this direction is beneficial. This original white\npaper also explains how Polkadot's core components work together to build this decentralized\nnetwork."]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.a,{href:"https://polkadot.network/Polkadot-lightpaper.pdf",children:"Polkadot's light paper"})," is a visual, easy to\nread, and less technical introduction into its blockchain technology. This paper dives into the\ncomponents of Polkadot but is understandable for both a non-technical and technical reader."]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.a,{href:"https://arxiv.org/abs/2005.13456",children:"Polkadot's overview paper"})," is an updated version of the white\npaper that describes the protocol in more technical terms. We would recommend reading this\noverview paper if you are interested in digging more into the protocol itself."]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.a,{href:"https://research.web3.foundation/",children:"The Web3 Foundation's research site"})," contains details and\nup-to-date technical research on Polkadot in general, including scalability, cryptographic,\neconomic, and security aspects of the protocol."]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.a,{href:"https://linktr.ee/polkadotbook",children:"Polkadot for Beginners: A non-technical guide to decentralization, blockchains & Polkadot"})," -\na book funded by the Polkadot Treasury"]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.a,{href:"https://github.com/w3f/polkadot-spec",children:"Polkadot's specification"})," is a GitHub repository that holds\nthe latest Polkadot Host protocol specification, Polkadot's specification tests of the many\ncomponents of the network, and the Polkadot Runtime specification. This repo holds algorithms and\nexplores how various processes function in the Polkadot network. The Polkadot specification takes\nPolkadot's ideas and concepts from the light and the white paper but focuses on the technical\nspecs of the technology."]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.a,{href:"https://www.youtube.com/watch?v=mNStMPZjiHM&list=PLOyWqupZ-WGuAuS00rK-pebTMAOxW41W8",children:"Watching the Technical Explainer Videos"}),":\nThese are great introductory videos that explain and demonstrate how to use Polkadot and its\n",(0,a.jsx)(t.a,{href:"https://polkadot.js.org/apps/",children:"User Interface"}),"."]}),"\n",(0,a.jsxs)(t.li,{children:["Reading\n",(0,a.jsx)(t.a,{href:"https://medium.com/polkadot-network/what-is-polkadot-a-brief-introduction-ca3eac9ddca5",children:"What is Polkadot? A Brief Introduction"}),"\non Medium. There are also other great articles to read on\n",(0,a.jsx)(t.a,{href:"https://medium.com/polkadot-network",children:"Polkadot's Medium"})," or\n",(0,a.jsx)(t.a,{href:"https://medium.com/web3foundation",children:"Web3 Foundation's Medium"}),"."]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.a,{href:"https://polkadot.study/",children:"Polkadot Study"})," is a platform where developers can write tutorials for\nthe Polkadot ecosystem. Part of the development of the platform was funded by the\n",(0,a.jsx)(t.a,{href:"https://kusama.subsquare.io/referenda/102",children:"Kusama treasury"}),". The platform also hosts\n",(0,a.jsx)(t.a,{href:"https://polkadot.study/tutorials/substrate-in-bits/",children:"Substrate in Bits"}),", a technical content\nseries aimed at solving the pain points of developers building with\n",(0,a.jsx)(t.a,{href:"https://substrate.io/",children:"Substrate"})," and ",(0,a.jsx)(t.a,{href:"https://www.rust-lang.org/",children:"Rust"}),"."]}),"\n"]}),"\n",(0,a.jsxs)(t.p,{children:["For brand-new learners of Kusama, Polkadot's canary cousin network: To learn more about how to build\nand maintain on the Kusama network, please head over to our\n",(0,a.jsx)(t.a,{href:"https://guide.kusama.network/",children:"Kusama Guide"}),"."]}),"\n",(0,a.jsx)(t.h2,{id:"resources",children:"Resources"}),"\n",(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.a,{href:"https://www.crowdcast.io/polkadot",children:"Polkadot Crowdcast"})," - List of all Crowdcast webinars that the\nWeb3 Foundation has done."]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/explorer",children:"Polkadot Explorer"})," - Browser for the Polkadot network;\ncan be used for Polkadot, Kusama, or any Substrate-based chain."]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.a,{href:"https://subscan.io",children:"Subscan.io"})," - Explorer for Substrate based chains."]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.a,{href:"https://youtu.be/lIghiCmHz0U",children:"Polkadot Overview"})," - Dr. Gavin Wood presents an overview of\nPolkadot. (Video)"]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.a,{href:"https://techcrunch.com/video/fireside-chat-with-jutta-steiner-parity-technologies/",children:"Polkadot Overview"})," -\nDr. Jutta Steiner presents Polkadot. (Video)"]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.a,{href:"https://www.youtube.com/watch?v=0IoUZdDi5Is&feature=youtu.be",children:"Polkadot & Substrate Overview"})," -\nDr. Gavin Wood presents Substrate (blockchain in-a-box + VM) and Polkadot, and builds a blockchain\non-stage in 30 minutes using Substrate. (Video)"]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.a,{href:"/docs/community",children:"Community / Ecosystem"})," - List of community rooms and channels to talk to others\nabout Polkadot."]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.a,{href:"#",children:"Sample Applications"})," - Sample applications that are built on or currently being built for\nPolkadot."]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.a,{href:"/docs/contributing",children:"Contributing Guide"})," - Rules for contributing to the wiki."]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.a,{href:"https://support.polkadot.network/",children:"Polkadot Knowledge Base"})," - Troubleshooting resources for\nspecific errors and problems."]}),"\n"]})]})}function h(e={}){const{wrapper:t}={...(0,n.R)(),...e.components};return t?(0,a.jsx)(t,{...e,children:(0,a.jsx)(c,{...e})}):c(e)}},47379:(e,t,o)=>{"use strict";o.d(t,{A:()=>p});var a=o(90675),n=o(10467),s=o(96540),r=o(19588),i=o(2026),d=o(11135);function l(e,t,o){return c.apply(this,arguments)}function c(){return(c=(0,n.A)((0,a.A)().mark((function e(t,o,n){var s,d,l,c,h;return(0,a.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s=void 0,d=void 0,e.t0=t,e.next="polkadot"===e.t0?5:"kusama"===e.t0?7:"statemine"===e.t0?9:"statemint"===e.t0?11:"polkadotpeople"===e.t0?13:"kusamapeople"===e.t0?15:17;break;case 5:return s="wss://rpc.polkadot.io",e.abrupt("break",18);case 7:return s="wss://kusama-rpc.polkadot.io/",e.abrupt("break",18);case 9:return s="wss://statemine-rpc.polkadot.io/",e.abrupt("break",18);case 11:return s="wss://statemint-rpc.polkadot.io/",e.abrupt("break",18);case 13:return s="wss://polkadot-people-rpc.polkadot.io/",e.abrupt("break",18);case 15:return s="wss://kusama-people-rpc.polkadot.io/",e.abrupt("break",18);case 17:console.log("Unknown socket url provided, no connection made.");case 18:if(void 0!==s){e.next=22;break}return e.abrupt("return");case 22:return l=new r.E(s),e.next=25,i.G.create({provider:l});case 25:c=e.sent,(h=o.split(".")).forEach((function(e){e in c&&(c=c[e])})),e.t1=h[0],e.next="consts"===e.t1?31:"query"===e.t1?33:38;break;case 31:return d=c.toString(),e.abrupt("break",39);case 33:return e.next=35,c();case 35:return d=(d=e.sent).toString(),e.abrupt("break",39);case 38:console.log("Unknown path prefix ("+h[0]+") in "+o);case 39:return e.abrupt("return",d);case 40:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function h(e,t,o,a){switch(t){case"humanReadable":(0,d.HumanReadable)(e,o,a);break;case"precise":(0,d.Precise)(e,o,a);break;case"blocksToDays":(0,d.BlocksToDays)(e,a);break;case"erasToDays":(0,d.ErasToDays)(e,a,o);break;case"percentage":(0,d.Percentage)(e,a);break;case"permillToPercent":(0,d.PermillToPercent)(e,a);break;case"arrayLength":(0,d.ArrayLength)(e,a);break;default:return void console.log("Ignoring unknown filter type")}}const p=function(e){var t=e.network,o=e.path,r=e.defaultValue,i=e.filter,d=void 0===i?void 0:i,c=(0,s.useState)(""),p=c[0],u=c[1];return t=t.toLowerCase(),(0,s.useEffect)((function(){void 0!==d?h(r.toString(),d,t,u):u(r.toString());var e=void 0;switch(t){case"polkadot":e="wss://rpc.polkadot.io";break;case"kusama":e="wss://kusama-rpc.polkadot.io/";break;case"statemine":e="wss://kusama-asset-hub-rpc.polkadot.io/";break;case"statemint":e="wss://polkadot-asset-hub-rpc.polkadot.io/";break;case"kusamapeople":e="wss://kusama-people-rpc.polkadot.io";break;case"polkadotpeople":e="wss://polkadot-people-rpc.polkadot.io";break;default:console.log("Unknown network provided, "+t)}if(void 0===e)console.log("Failed to connect to a valid websocket, applying default");else{var s=function(){var e=(0,n.A)((0,a.A)().mark((function e(){var n;return(0,a.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l(t,o,u);case 2:if(void 0!==(n=e.sent)){e.next=7;break}return e.abrupt("return");case 7:void 0!==d?h(n,d,t,u):u(n);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();try{s()}catch(i){console.log(i)}}}),[]),p}},11135:e=>{var t="polkadot",o="kusama",a="statemine",n="statemint",s="polkadotpeople",r="kusamapeople",i={polkadot:{precision:1e10,symbol:"DOT"},kusama:{precision:1e12,symbol:"KSM"},statemint:{precision:1e10,symbol:"DOT"},statemine:{precision:1e12,symbol:"KSM"},polkadotpeople:{precision:1e10,symbol:"DOT"},kusamapeople:{precision:1e12,symbol:"KSM"}};e.exports={HumanReadable:function(e,d,l){var c=void 0;if(d===t||d===n)c=3;else if(d===o||d===a||d===s)c=6;else{if(d!=r)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");c=8}e=parseFloat(e),l((e=Number.isInteger(e/i[d].precision)?e/i[d].precision+" "+i[d].symbol:(e/i[d].precision).toFixed(c)+" "+i[d].symbol).toString())},Precise:function(e,t,o){o(e=(e=parseFloat(e))/i[t].precision+" "+i[t].symbol)},BlocksToDays:function(e,t){t((e=6*e/86400).toString())},ErasToDays:function(e,i,d){var l=void 0;if(d===t||d===n||d==s)l=1;else{if(d!==o&&d!==a&&d!=r)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");l=4}i((e/=l).toString())},Percentage:function(e,t){t((e/=1e7).toString())},PermillToPercent:function(e,t){t((e/=1e4).toString())},ArrayLength:function(e,t){t((e=e.split(",").length).toString())}}},47790:()=>{}}]); \ No newline at end of file diff --git a/assets/js/f2521980.792ec247.js b/assets/js/f2521980.792ec247.js new file mode 100644 index 000000000000..d3165e780ac6 --- /dev/null +++ b/assets/js/f2521980.792ec247.js @@ -0,0 +1 @@ +(self.webpackChunk=self.webpackChunk||[]).push([[3584],{55969:(e,t,o)=>{"use strict";o.r(t),o.d(t,{assets:()=>d,contentTitle:()=>i,default:()=>h,frontMatter:()=>r,metadata:()=>a,toc:()=>l});const a=JSON.parse('{"id":"general/getting-started","title":"Getting Started","description":"Get started with Polkadot and Web3.","source":"@site/../docs/general/getting-started.md","sourceDirName":"general","slug":"/getting-started","permalink":"/docs/getting-started","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/getting-started.md","tags":[],"version":"current","lastUpdatedBy":"github-actions[bot]","lastUpdatedAt":1728284821000,"frontMatter":{"id":"getting-started","title":"Getting Started","sidebar_label":"Getting Started","description":"Get started with Polkadot and Web3.","keywords":["introduction","getting started","what is polkadot","why polkadot"],"slug":"../getting-started"},"sidebar":"docs","previous":{"title":"Explore","permalink":"/docs/explore-index"},"next":{"title":"Wallets","permalink":"/docs/wallets-index"}}');var n=o(74848),s=o(28453);o(47379);const r={id:"getting-started",title:"Getting Started",sidebar_label:"Getting Started",description:"Get started with Polkadot and Web3.",keywords:["introduction","getting started","what is polkadot","why polkadot"],slug:"../getting-started"},i=void 0,d={},l=[{value:"Interact with Polkadot",id:"interact-with-polkadot",level:2},{value:"What is Polkadot?",id:"what-is-polkadot",level:2},{value:"What can I do with my DOT?",id:"what-can-i-do-with-my-dot",level:2},{value:"Polkadot Gifts",id:"polkadot-gifts",level:2},{value:"Why should you use Polkadot?",id:"why-should-you-use-polkadot",level:2},{value:"Where to start learning?",id:"where-to-start-learning",level:2},{value:"Brand-New Polkadot learners",id:"brand-new-polkadot-learners",level:3},{value:"Resources",id:"resources",level:2}];function c(e){const t={a:"a",admonition:"admonition",h2:"h2",h3:"h3",li:"li",p:"p",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(t.admonition,{title:"Welcome to the Polkadot Wiki",type:"info",children:[(0,n.jsx)(t.p,{children:"The Polkadot Wiki serves as the central source of truth for Polkadot. It is a community-focused\ninitiative led by Web3 Foundation to keep an up-to-date resource on the best information for\nlearning, building, and maintaining on Polkadot."}),(0,n.jsx)(t.p,{children:"The Wiki has three main sections:"}),(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"./learn-index",children:(0,n.jsx)(t.strong,{children:"Learn"})})," (for people who want to learn about Polkadot)"]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"/docs/build-index",children:(0,n.jsx)(t.strong,{children:"Build"})})," (for people who want to build on Polkadot)"]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"/docs/maintain-index",children:(0,n.jsx)(t.strong,{children:"Maintain"})})," (for people who want to maintain the Polkadot\nnetwork)."]}),"\n"]})]}),"\n",(0,n.jsx)(t.h2,{id:"interact-with-polkadot",children:"Interact with Polkadot"}),"\n",(0,n.jsxs)("div",{className:"row",children:[(0,n.jsxs)("div",{className:"col text--center","data-aos":"fade-up","data-aos-delay":"100",children:[(0,n.jsx)("a",{href:"../docs/learn-accounts",children:(0,n.jsx)("img",{src:"/img/polkadot-guide/Creating an account.png",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,n.jsx)("p",{children:(0,n.jsx)("a",{href:"../docs/learn-accounts",children:"Accounts"})})]}),(0,n.jsxs)("div",{className:"col text--center","data-aos":"fade-up","data-aos-delay":"200",children:[(0,n.jsx)("a",{href:"../docs/learn-transactions",children:(0,n.jsx)("img",{src:"/img/polkadot-guide/Balance Transfers.png",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,n.jsx)("p",{children:(0,n.jsx)("a",{href:"../docs/learn-transactions",children:"Transactions"})})]}),(0,n.jsxs)("div",{className:"col text--center","data-aos":"fade-up","data-aos-delay":"300",children:[(0,n.jsx)("a",{href:"../docs/learn-staking",children:(0,n.jsx)("img",{src:"/img/polkadot-guide/Staking.png",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,n.jsx)("p",{children:(0,n.jsx)("a",{href:"../docs/learn-staking",children:"Staking"})})]})]}),"\n",(0,n.jsxs)("div",{className:"row",children:[(0,n.jsxs)("div",{className:"col text--center","data-aos":"fade-up","data-aos-delay":"400",children:[(0,n.jsx)("a",{href:"../docs/learn-polkadot-opengov",children:(0,n.jsx)("img",{src:"/img/polkadot-guide/Polkadot OpenGov.png",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,n.jsx)("p",{children:(0,n.jsx)("a",{href:"../docs/learn-polkadot-opengov",children:"Polkadot OpenGov"})})]}),(0,n.jsxs)("div",{className:"col text--center","data-aos":"fade-up","data-aos-delay":"500",children:[(0,n.jsx)("a",{href:"../docs/learn-proxies",children:(0,n.jsx)("img",{src:"/img/polkadot-guide/Proxy Accounts.png",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,n.jsx)("p",{children:(0,n.jsx)("a",{href:"../docs/learn-proxies",children:"Proxy Accounts"})})]}),(0,n.jsxs)("div",{className:"col text--center","data-aos":"fade-up","data-aos-delay":"600",children:[(0,n.jsx)("a",{href:"../docs/learn-identity",children:(0,n.jsx)("img",{src:"/img/polkadot-guide/Set an Identity.png",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,n.jsx)("p",{children:(0,n.jsx)("a",{href:"../docs/learn-identity",children:"Account Identity"})})]})]}),"\n",(0,n.jsxs)("div",{className:"row",children:[(0,n.jsxs)("div",{className:"col text--center","data-aos":"fade-up","data-aos-delay":"700",children:[(0,n.jsx)("a",{href:"../docs/learn-parachains",children:(0,n.jsx)("img",{src:"/img/polkadot-guide/Parachains.png",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,n.jsx)("p",{children:(0,n.jsx)("a",{href:"../docs/learn-parachains",children:"Parachains"})})]}),(0,n.jsxs)("div",{className:"col text--center","data-aos":"fade-up","data-aos-delay":"900",children:[(0,n.jsx)("a",{href:"../docs/learn-bridges",children:(0,n.jsx)("img",{src:"/img/polkadot-guide/Bridges.png",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,n.jsx)("p",{children:(0,n.jsx)("a",{href:"../docs/learn-bridges",children:"Bridges"})})]}),(0,n.jsxs)("div",{className:"col text--center","data-aos":"fade-up","data-aos-delay":"900",children:[(0,n.jsx)("a",{href:"../docs/ambassadors",children:(0,n.jsx)("img",{src:"/img/polkadot-guide/Become an Ambassador.png",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,n.jsx)("p",{children:(0,n.jsx)("a",{href:"../docs/ambassadors",children:"Become an Ambassador"})})]})]}),"\n",(0,n.jsx)(t.h2,{id:"what-is-polkadot",children:"What is Polkadot?"}),"\n",(0,n.jsxs)(t.p,{children:["Polkadot is the first layer-0 (L0) blockchain that provides shared security and secure\ninteroperability to layer-1 (L1) blockchains. Those L1 blockchain attached to Polkadot are also\ncalled ",(0,n.jsx)(t.a,{href:"/docs/learn-parachains",children:"parachains"})," as their transactions are processed in parallel by\nPolkadot. For more information about Polkadot see the dedicated page about the state of\n",(0,n.jsx)(t.a,{href:"/docs/polkadot-v1",children:"Polkadot 1.0"})," released in mid 2023."]}),"\n",(0,n.jsxs)(t.p,{children:["Polkadot has an on-chain ",(0,n.jsx)(t.a,{href:"/docs/learn-polkadot-opengov",children:"open governance"})," (also called Polkadot\nOpenGov) to orchestrate decisions, including accessing funds from the\n",(0,n.jsx)(t.a,{href:"/docs/learn-polkadot-opengov-treasury",children:"treasury"}),"."]}),"\n",(0,n.jsxs)(t.p,{children:["The ",(0,n.jsx)(t.a,{href:"/docs/learn-DOT",children:"DOT token"})," gives you the power to participate in Polkadot OpenGov, and\n",(0,n.jsx)(t.a,{href:"/docs/learn-staking",children:"staking"}),"."]}),"\n",(0,n.jsxs)(t.p,{children:["The level of abstraction and generalization of Polkadot allows to build applications that are\nspecific to their use cases, and for those applications to communicate securely leveraging each\nother value proposition. The trustless cooperation between applications is what makes Polkadot an\nideal ecosystem to build a ",(0,n.jsx)(t.a,{href:"/docs/web3-and-polkadot",children:"web3 future"}),"."]}),"\n",(0,n.jsxs)("div",{className:"row",children:[(0,n.jsxs)("div",{className:"col text--center",children:[(0,n.jsx)("a",{href:"https://www.youtube.com/watch?v=_-k0xkooSlA",children:(0,n.jsx)("img",{src:"https://img.youtube.com/vi/_-k0xkooSlA/0.jpg",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,n.jsx)("p",{children:(0,n.jsx)("a",{href:"https://www.youtube.com/watch?v=_-k0xkooSlA",children:"Polkadot: Are You Ready to Start Building?"})})]}),(0,n.jsxs)("div",{className:"col text--center",children:[(0,n.jsx)("a",{href:"https://www.youtube.com/watch?v=BQ60bTU1bPg",children:(0,n.jsx)("img",{src:"https://img.youtube.com/vi/BQ60bTU1bPg/0.jpg",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,n.jsx)("p",{children:(0,n.jsx)("a",{href:"https://www.youtube.com/watch?v=BQ60bTU1bPg",children:"What is Polkadot?"})})]})]}),"\n",(0,n.jsx)(t.h2,{id:"what-can-i-do-with-my-dot",children:"What can I do with my DOT?"}),"\n",(0,n.jsxs)(t.p,{children:[(0,n.jsx)(t.a,{href:"/docs/learn-DOT",children:"DOT"})," is the native token of the Polkadot Network. DOT can be used for\ntransaction fees, staking, governance, acquisition of coretime and for enabling several key\nfunctionalities on Polkadot. See more information on\n",(0,n.jsx)(t.a,{href:"/docs/chain-state-values",children:"the Chain State Values page"}),"."]}),"\n",(0,n.jsx)(t.admonition,{type:"info",children:(0,n.jsxs)(t.p,{children:["Explore Polkadot with a secure and user-friendly wallets listed on the\n",(0,n.jsx)(t.a,{href:"https://www.polkadot.network/ecosystem/wallets/",children:"Polkadot website"}),"."]})}),"\n",(0,n.jsxs)(t.p,{children:["DOT has utility in Polkadot's OpenGov where you can\n",(0,n.jsx)(t.a,{href:"/docs/learn-polkadot-opengov#voting-on-a-referendum",children:"vote"}),",\n",(0,n.jsx)(t.a,{href:"/docs/learn-polkadot-opengov#multirole-delegation",children:"delegate your voting power"}),", and place\ndeposits for your referenda or referenda proposed by others. DOT can also enable you to participate\nin programs like the ",(0,n.jsx)(t.a,{href:"/docs/thousand-validators#polkadot",children:"Thousand Validators Programme"}),"."]}),"\n",(0,n.jsx)(t.h2,{id:"polkadot-gifts",children:"Polkadot Gifts"}),"\n",(0,n.jsx)("img",{align:"right",src:"/img/polkadot-guide/Gift.png",width:"210",height:"200"}),"\n",(0,n.jsx)(t.p,{children:"Polkadot Gifts provide an easy way to:"}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsx)(t.li,{children:"Onboard friends or family who are curious about blockchain but haven\u2019t made the leap yet."}),"\n",(0,n.jsx)(t.li,{children:"Share your love of Polkadot and send any amount of DOT."}),"\n",(0,n.jsx)(t.li,{children:"Say \u2018thank you\u2019 or send someone tokens when you don\u2019t know their address."}),"\n",(0,n.jsx)(t.li,{children:"Get friends and family set up to participate in crowdloans."}),"\n"]}),"\n",(0,n.jsxs)(t.p,{children:["Learn more about how you can create and send Polkadot Gifts\n",(0,n.jsx)(t.a,{href:"https://polkadot.network/blog/introducing-polkadot-kusama-gifts/",children:"here"}),"."]}),"\n",(0,n.jsx)(t.h2,{id:"why-should-you-use-polkadot",children:"Why should you use Polkadot?"}),"\n",(0,n.jsxs)(t.p,{children:["Whether you're a blockchain developer or if you're interested in taking part of\n",(0,n.jsx)(t.a,{href:"https://polkadot.network/polkadot-ambassador-program/",children:"Polkadot's community"}),", Polkadot offers a\nplatform for everyone. This wiki offers a place for builders and maintainers to utilize\n",(0,n.jsx)(t.a,{href:"/docs/build-tools-index",children:"tools"})," and for brand-new learners to dive into educational material."]}),"\n",(0,n.jsx)(t.h2,{id:"where-to-start-learning",children:"Where to start learning?"}),"\n",(0,n.jsxs)(t.p,{children:["The\n",(0,n.jsx)(t.a,{href:"https://mooc.web3.foundation/course/blockchain-fundamentals/",children:"Blockchain Fundamentals MOOC course"}),"\nis a great introduction to start familiarizing yourself with blockchain concepts such as\ncryptography and networks, and how these play into things like decentralization and cryptocurrency."]}),"\n",(0,n.jsx)(t.p,{children:"This is recommended for users with backgrounds of all levels, and the course is free!"}),"\n",(0,n.jsx)(t.h3,{id:"brand-new-polkadot-learners",children:"Brand-New Polkadot learners"}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://polkadot.network/PolkaDotPaper.pdf",children:"Polkadot's original white paper"})," is a technical\nsummary around one possible direction of implementing the Polkadot network. This paper uses\nrationale and technical details to support why this direction is beneficial. This original white\npaper also explains how Polkadot's core components work together to build this decentralized\nnetwork."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://polkadot.network/Polkadot-lightpaper.pdf",children:"Polkadot's light paper"})," is a visual, easy to\nread, and less technical introduction into its blockchain technology. This paper dives into the\ncomponents of Polkadot but is understandable for both a non-technical and technical reader."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://arxiv.org/abs/2005.13456",children:"Polkadot's overview paper"})," is an updated version of the white\npaper that describes the protocol in more technical terms. We would recommend reading this\noverview paper if you are interested in digging more into the protocol itself."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://research.web3.foundation/",children:"The Web3 Foundation's research site"})," contains details and\nup-to-date technical research on Polkadot in general, including scalability, cryptographic,\neconomic, and security aspects of the protocol."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://linktr.ee/polkadotbook",children:"Polkadot for Beginners: A non-technical guide to decentralization, blockchains & Polkadot"})," -\na book funded by the Polkadot Treasury"]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://github.com/w3f/polkadot-spec",children:"Polkadot's specification"})," is a GitHub repository that holds\nthe latest Polkadot Host protocol specification, Polkadot's specification tests of the many\ncomponents of the network, and the Polkadot Runtime specification. This repo holds algorithms and\nexplores how various processes function in the Polkadot network. The Polkadot specification takes\nPolkadot's ideas and concepts from the light and the white paper but focuses on the technical\nspecs of the technology."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://www.youtube.com/watch?v=mNStMPZjiHM&list=PLOyWqupZ-WGuAuS00rK-pebTMAOxW41W8",children:"Watching the Technical Explainer Videos"}),":\nThese are great introductory videos that explain and demonstrate how to use Polkadot and its\n",(0,n.jsx)(t.a,{href:"https://polkadot.js.org/apps/",children:"User Interface"}),"."]}),"\n",(0,n.jsxs)(t.li,{children:["Reading\n",(0,n.jsx)(t.a,{href:"https://medium.com/polkadot-network/what-is-polkadot-a-brief-introduction-ca3eac9ddca5",children:"What is Polkadot? A Brief Introduction"}),"\non Medium. There are also other great articles to read on\n",(0,n.jsx)(t.a,{href:"https://medium.com/polkadot-network",children:"Polkadot's Medium"})," or\n",(0,n.jsx)(t.a,{href:"https://medium.com/web3foundation",children:"Web3 Foundation's Medium"}),"."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://polkadot.study/",children:"Polkadot Study"})," is a platform where developers can write tutorials for\nthe Polkadot ecosystem. Part of the development of the platform was funded by the\n",(0,n.jsx)(t.a,{href:"https://kusama.subsquare.io/referenda/102",children:"Kusama treasury"}),". The platform also hosts\n",(0,n.jsx)(t.a,{href:"https://polkadot.study/tutorials/substrate-in-bits/",children:"Substrate in Bits"}),", a technical content\nseries aimed at solving the pain points of developers building with\n",(0,n.jsx)(t.a,{href:"https://substrate.io/",children:"Substrate"})," and ",(0,n.jsx)(t.a,{href:"https://www.rust-lang.org/",children:"Rust"}),"."]}),"\n"]}),"\n",(0,n.jsxs)(t.p,{children:["For brand-new learners of Kusama, Polkadot's canary cousin network: To learn more about how to build\nand maintain on the Kusama network, please head over to our\n",(0,n.jsx)(t.a,{href:"https://guide.kusama.network/",children:"Kusama Guide"}),"."]}),"\n",(0,n.jsx)(t.h2,{id:"resources",children:"Resources"}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://www.crowdcast.io/polkadot",children:"Polkadot Crowdcast"})," - List of all Crowdcast webinars that the\nWeb3 Foundation has done."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/explorer",children:"Polkadot Explorer"})," - Browser for the Polkadot network;\ncan be used for Polkadot, Kusama, or any Substrate-based chain."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://subscan.io",children:"Subscan.io"})," - Explorer for Substrate based chains."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://youtu.be/lIghiCmHz0U",children:"Polkadot Overview"})," - Dr. Gavin Wood presents an overview of\nPolkadot. (Video)"]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://techcrunch.com/video/fireside-chat-with-jutta-steiner-parity-technologies/",children:"Polkadot Overview"})," -\nDr. Jutta Steiner presents Polkadot. (Video)"]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://www.youtube.com/watch?v=0IoUZdDi5Is&feature=youtu.be",children:"Polkadot & Substrate Overview"})," -\nDr. Gavin Wood presents Substrate (blockchain in-a-box + VM) and Polkadot, and builds a blockchain\non-stage in 30 minutes using Substrate. (Video)"]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"/docs/community",children:"Community / Ecosystem"})," - List of community rooms and channels to talk to others\nabout Polkadot."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"#",children:"Sample Applications"})," - Sample applications that are built on or currently being built for\nPolkadot."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"/docs/contributing",children:"Contributing Guide"})," - Rules for contributing to the wiki."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://support.polkadot.network/",children:"Polkadot Knowledge Base"})," - Troubleshooting resources for\nspecific errors and problems."]}),"\n"]})]})}function h(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(c,{...e})}):c(e)}},47379:(e,t,o)=>{"use strict";o.d(t,{A:()=>p});var a=o(90675),n=o(10467),s=o(96540),r=o(19588),i=o(2026),d=o(11135);function l(e,t,o){return c.apply(this,arguments)}function c(){return(c=(0,n.A)((0,a.A)().mark((function e(t,o,n){var s,d,l,c,h;return(0,a.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s=void 0,d=void 0,e.t0=t,e.next="polkadot"===e.t0?5:"kusama"===e.t0?7:"statemine"===e.t0?9:"statemint"===e.t0?11:"polkadotpeople"===e.t0?13:"kusamapeople"===e.t0?15:17;break;case 5:return s="wss://rpc.polkadot.io",e.abrupt("break",18);case 7:return s="wss://kusama-rpc.polkadot.io/",e.abrupt("break",18);case 9:return s="wss://statemine-rpc.polkadot.io/",e.abrupt("break",18);case 11:return s="wss://statemint-rpc.polkadot.io/",e.abrupt("break",18);case 13:return s="wss://polkadot-people-rpc.polkadot.io/",e.abrupt("break",18);case 15:return s="wss://kusama-people-rpc.polkadot.io/",e.abrupt("break",18);case 17:console.log("Unknown socket url provided, no connection made.");case 18:if(void 0!==s){e.next=22;break}return e.abrupt("return");case 22:return l=new r.E(s),e.next=25,i.G.create({provider:l});case 25:c=e.sent,(h=o.split(".")).forEach((function(e){e in c&&(c=c[e])})),e.t1=h[0],e.next="consts"===e.t1?31:"query"===e.t1?33:38;break;case 31:return d=c.toString(),e.abrupt("break",39);case 33:return e.next=35,c();case 35:return d=(d=e.sent).toString(),e.abrupt("break",39);case 38:console.log("Unknown path prefix ("+h[0]+") in "+o);case 39:return e.abrupt("return",d);case 40:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function h(e,t,o,a){switch(t){case"humanReadable":(0,d.HumanReadable)(e,o,a);break;case"precise":(0,d.Precise)(e,o,a);break;case"blocksToDays":(0,d.BlocksToDays)(e,a);break;case"erasToDays":(0,d.ErasToDays)(e,a,o);break;case"percentage":(0,d.Percentage)(e,a);break;case"permillToPercent":(0,d.PermillToPercent)(e,a);break;case"arrayLength":(0,d.ArrayLength)(e,a);break;default:return void console.log("Ignoring unknown filter type")}}const p=function(e){var t=e.network,o=e.path,r=e.defaultValue,i=e.filter,d=void 0===i?void 0:i,c=(0,s.useState)(""),p=c[0],u=c[1];return t=t.toLowerCase(),(0,s.useEffect)((function(){void 0!==d?h(r.toString(),d,t,u):u(r.toString());var e=void 0;switch(t){case"polkadot":e="wss://rpc.polkadot.io";break;case"kusama":e="wss://kusama-rpc.polkadot.io/";break;case"statemine":e="wss://kusama-asset-hub-rpc.polkadot.io/";break;case"statemint":e="wss://polkadot-asset-hub-rpc.polkadot.io/";break;case"kusamapeople":e="wss://kusama-people-rpc.polkadot.io";break;case"polkadotpeople":e="wss://polkadot-people-rpc.polkadot.io";break;default:console.log("Unknown network provided, "+t)}if(void 0===e)console.log("Failed to connect to a valid websocket, applying default");else{var s=function(){var e=(0,n.A)((0,a.A)().mark((function e(){var n;return(0,a.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l(t,o,u);case 2:if(void 0!==(n=e.sent)){e.next=7;break}return e.abrupt("return");case 7:void 0!==d?h(n,d,t,u):u(n);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();try{s()}catch(i){console.log(i)}}}),[]),p}},11135:e=>{var t="polkadot",o="kusama",a="statemine",n="statemint",s="polkadotpeople",r="kusamapeople",i={polkadot:{precision:1e10,symbol:"DOT"},kusama:{precision:1e12,symbol:"KSM"},statemint:{precision:1e10,symbol:"DOT"},statemine:{precision:1e12,symbol:"KSM"},polkadotpeople:{precision:1e10,symbol:"DOT"},kusamapeople:{precision:1e12,symbol:"KSM"}};e.exports={HumanReadable:function(e,d,l){var c=void 0;if(d===t||d===n)c=3;else if(d===o||d===a||d===s)c=6;else{if(d!=r)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");c=8}e=parseFloat(e),l((e=Number.isInteger(e/i[d].precision)?e/i[d].precision+" "+i[d].symbol:(e/i[d].precision).toFixed(c)+" "+i[d].symbol).toString())},Precise:function(e,t,o){o(e=(e=parseFloat(e))/i[t].precision+" "+i[t].symbol)},BlocksToDays:function(e,t){t((e=6*e/86400).toString())},ErasToDays:function(e,i,d){var l=void 0;if(d===t||d===n||d==s)l=1;else{if(d!==o&&d!==a&&d!=r)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");l=4}i((e/=l).toString())},Percentage:function(e,t){t((e/=1e7).toString())},PermillToPercent:function(e,t){t((e/=1e4).toString())},ArrayLength:function(e,t){t((e=e.split(",").length).toString())}}},47790:()=>{}}]); \ No newline at end of file diff --git a/assets/js/f2b5c614.38540a70.js b/assets/js/f2b5c614.38540a70.js new file mode 100644 index 000000000000..d685dbbbfeef --- /dev/null +++ b/assets/js/f2b5c614.38540a70.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4076],{15837:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>o,contentTitle:()=>d,default:()=>u,frontMatter:()=>a,metadata:()=>r,toc:()=>l});const r=JSON.parse('{"id":"general/dune-analytics/parachain-dashboards/centrifuge-dashboards","title":"Centrifuge Dashboards","description":"Centrifuge is a decentralized finance hub and liquid staking platform.","source":"@site/../docs/general/dune-analytics/parachain-dashboards/centrifuge-dashboards.md","sourceDirName":"general/dune-analytics/parachain-dashboards","slug":"/general/dune-analytics/centrifuge-dashboards","permalink":"/docs/general/dune-analytics/centrifuge-dashboards","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/parachain-dashboards/centrifuge-dashboards.md","tags":[],"version":"current","lastUpdatedBy":"MK","lastUpdatedAt":1719215716000,"frontMatter":{"id":"centrifuge-dashboards","title":"Centrifuge Dashboards","sidebar_label":"Centrifuge","description":"Centrifuge is a decentralized finance hub and liquid staking platform.","keywords":["polkadot","dashboard","dune","centrifuge","DeFi"],"slug":"../centrifuge-dashboards"},"sidebar":"docs","previous":{"title":"BridgeHub","permalink":"/docs/general/dune-analytics/bridgehub-dashboards"},"next":{"title":"Collectives","permalink":"/docs/general/dune-analytics/collectives-dashboards"}}');var i=t(74848),s=t(28453);const a={id:"centrifuge-dashboards",title:"Centrifuge Dashboards",sidebar_label:"Centrifuge",description:"Centrifuge is a decentralized finance hub and liquid staking platform.",keywords:["polkadot","dashboard","dune","centrifuge","DeFi"],slug:"../centrifuge-dashboards"},d="Centrifuge Dashboards",o={},l=[{value:"Overview",id:"overview",level:2},{value:"Featured Dashboards on Dune",id:"featured-dashboards-on-dune",level:2},{value:"Key Tables",id:"key-tables",level:2},{value:"Useful Queries",id:"useful-queries",level:2},{value:"Getting Started with Queries",id:"getting-started-with-queries",level:2}];function c(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,s.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.header,{children:(0,i.jsx)(n.h1,{id:"centrifuge-dashboards",children:"Centrifuge Dashboards"})}),"\n",(0,i.jsx)(n.h2,{id:"overview",children:"Overview"}),"\n",(0,i.jsx)(n.p,{children:"Centrifuge is a platform for real-world asset tokenization. Through Centrifuge, investors gain\naccess to a diverse range of assets, improving transparency and achieving better insight into their\nportfolio. Asset managers tokenize their funds and streamline access to necessary service providers\nand investors, saving cost for fund operations and unlocking new sources of capital."}),"\n",(0,i.jsx)(n.p,{children:"Centrifuge provides both the infrastructure and ecosystem to tokenize, manage, and invest into a\ncomplete, diversified portfolio of real-world assets."}),"\n",(0,i.jsx)(n.p,{children:"Asset pools are fully collateralized, investors have legal recourse, and the protocol is asset-class\nagnostic with pools for assets spanning structured credit, real estate, US treasuries, carbon\ncredits, consumer finance, and more."}),"\n",(0,i.jsx)(n.p,{children:"Centrifuge's ecosystem extends beyond its onchain financial infrastructure, incorporating a DAO\n(decentralized autonomous organization) supported by a diverse community of finance professionals\nand developers."}),"\n",(0,i.jsx)(n.p,{children:"By bringing the entire structured credit market onchain across securitization, tokenization,\nprivacy, governance, and liquidity integrations, Centrifuge is building a more transparent,\naffordable, and limitless financial system."}),"\n",(0,i.jsx)(n.p,{children:"Some assets are managed on Ethereum, others are managed on Centrifuge."}),"\n",(0,i.jsx)(n.h2,{id:"featured-dashboards-on-dune",children:"Featured Dashboards on Dune"}),"\n",(0,i.jsx)(n.p,{children:"Here you'll find a variety of dashboards that help visualize data from the Centrifuge parachain on\nPolkadot:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.a,{href:"https://dune.com/substrate/centrifuge",children:"centrifuge on Polkadot"}),": This dashboard provides details\nfor"]}),"\n",(0,i.jsx)(n.li,{children:"assets pools on Centrifuge parachain. (As of June 2024: only one)"}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"key-tables",children:"Key Tables"}),"\n",(0,i.jsxs)(n.p,{children:["Data from the centrifuge parachain is organized into several key tables: ",(0,i.jsx)(n.code,{children:"centrifuge.balances"}),","]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"centrifuge.balances"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"centrifuge.blocks"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"centrifuge.calls"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"centrifuge.events"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"centrifuge.extrinsics"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"centrifuge.transfers"})}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.code,{children:"centrifuge.traces"})," table is created by a snapshot script utilizing Centrifuge API calls to\nfetch accurate values which would be difficult to calculate from the blockchain events alone."]}),"\n",(0,i.jsxs)(n.p,{children:["Start building your own queries using granular data on Dune\n",(0,i.jsx)(n.a,{href:"https://dune.com/queries?category=canonical&namespace=centrifuge",children:"here"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"useful-queries",children:"Useful Queries"}),"\n",(0,i.jsx)(n.p,{children:"Some useful queries for Centrifuge are provided:"}),"\n",(0,i.jsxs)(n.table,{children:[(0,i.jsx)(n.thead,{children:(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.th,{children:"Subject Area"}),(0,i.jsx)(n.th,{children:"Query"}),(0,i.jsx)(n.th,{children:"Description"})]})}),(0,i.jsxs)(n.tbody,{children:[(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"Portfolio"}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.a,{href:"https://dune.com/queries/3708897",children:"query_3708897"})}),(0,i.jsx)(n.td,{children:"Provides details about the assets in the pools"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"Centrifuge Pool Data Anemoy"}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.a,{href:"https://dune.com/queries/3708939",children:"query_3708939"})}),(0,i.jsx)(n.td,{children:"Provides details for the Anemoy pool (first pool on Centrifuge)"})]})]})]}),"\n",(0,i.jsx)(n.p,{children:"Dune users are encouraged to study the source code of the queries, including parts of a query that\nmay have been commented out for future use."}),"\n",(0,i.jsx)(n.p,{children:"Uncommenting these parts may accelerate your effort of adopting a query to a slightly different use\ncase."}),"\n",(0,i.jsx)(n.h2,{id:"getting-started-with-queries",children:"Getting Started with Queries"}),"\n",(0,i.jsx)(n.p,{children:"To get started with querying data from Centrifuge, you are welcome to use the mentioned queries. You\ncan also use the following DuneSQL queries as examples:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-sql",metastring:'title="Centrifuge Loan Market Data" showLineNumbers',children:"WITH portfolio AS (\n SELECT\n ts,\n CAST(JSON_VALUE(c.kv, 'strict $.asset_id.id') AS INT) AS asset_id,\n CAST(JSON_VALUE(c.kv, 'strict $.asset_id.pool') AS BIGINT) AS pool_id,\n FROM_UNIXTIME(CAST(JSON_VALUE(c.pv, 'strict $.maturity_date') AS BIGINT)) AS maturity_date,\n CAST(JSON_VALUE(c.pv, 'strict $.outstanding_interest') AS UINT256) AS outstanding_interest,\n CAST(JSON_VALUE(c.pv, 'strict $.outstanding_principal') AS UINT256) AS outstanding_principal,\n CAST(JSON_VALUE(c.pv, 'strict $.present_value') AS UINT256) AS present_value,\n CAST(JSON_VALUE(c.pv, 'strict $.total_borrowed') AS UINT256) AS total_borrowed,\n CAST(JSON_VALUE(c.pv, 'strict $.total_repaid_interest') AS UINT256) AS total_repaid_interest,\n CAST(JSON_VALUE(c.pv, 'strict $.total_repaid_principal') AS UINT256) AS total_repaid_principal,\n CAST(JSON_VALUE(c.pv, 'strict $.total_repaid_unscheduled') AS UINT256) AS total_repaid_unscheduled,\n CAST(JSON_VALUE(c.pv, 'strict $.pool_currency.symbol') AS VARCHAR) AS currency_symbol,\n CAST(JSON_VALUE(c.pv, 'strict $.pool_currency.decimals') AS INT) AS decimals,\n CAST(JSON_VALUE(c.pv, 'strict $.type') AS VARCHAR) AS type\n FROM\n centrifuge.traces c\n WHERE\n track = 'portfolio'\n)\nSELECT\n ts,\n asset_id,\n pool_id,\n maturity_date,\n outstanding_interest / POW(10, decimals) AS outstanding_interest,\n outstanding_principal / POW(10, decimals) AS outstanding_principal,\n present_value / POW(10, decimals) AS present_value,\n total_borrowed / POW(10, decimals) AS total_borrowed,\n total_repaid_interest / POW(10, decimals) AS total_repaid_interest,\n total_repaid_principal / POW(10, decimals) AS total_repaid_principal,\n total_repaid_unscheduled / POW(10, decimals) AS total_repaid_unscheduled,\n currency_symbol\nFROM\n portfolio\nWHERE\n type = 'Other'\nORDER BY\n maturity_date DESC;\n\n"})}),"\n",(0,i.jsxs)(n.p,{children:["The query is fairly typical for a parachain query on Dune. It parses details from the\n",(0,i.jsx)(n.code,{children:"centrifuge.traces"})," table, and displays relevant values with suitable labels."]}),"\n",(0,i.jsx)(n.p,{children:"The query uses Dune's native UINT256 type, which allows to deal with very large numbers and still\nmaintain precision."}),"\n",(0,i.jsx)(n.p,{children:"Query result:"}),"\n",(0,i.jsx)("iframe",{src:"https://dune.com/embeds/3734046/6280352/",height:"350",width:"100%"}),"\n",(0,i.jsx)(n.admonition,{title:"DuneSQL Reference",type:"info",children:(0,i.jsxs)(n.p,{children:["For more information on DuneSQL, please refer to the ",(0,i.jsx)(n.a,{href:"/docs/general/dunesql-cheatsheet",children:"DuneSQL Cheatsheet"}),"\nand\n",(0,i.jsx)(n.a,{href:"https://docs.dune.com/query-engine/Functions-and-operators/index",children:"DuneSQL Official Documentation"}),"."]})})]})}function u(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(c,{...e})}):c(e)}},28453:(e,n,t)=>{t.d(n,{R:()=>a,x:()=>d});var r=t(96540);const i={},s=r.createContext(i);function a(e){const n=r.useContext(s);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:a(e.components),r.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f2b5c614.d907d19e.js b/assets/js/f2b5c614.d907d19e.js deleted file mode 100644 index 5c9e22b4692d..000000000000 --- a/assets/js/f2b5c614.d907d19e.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4076],{91422:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>o,contentTitle:()=>a,default:()=>u,frontMatter:()=>s,metadata:()=>d,toc:()=>l});var r=t(74848),i=t(28453);const s={id:"centrifuge-dashboards",title:"Centrifuge Dashboards",sidebar_label:"Centrifuge",description:"Centrifuge is a decentralized finance hub and liquid staking platform.",keywords:["polkadot","dashboard","dune","centrifuge","DeFi"],slug:"../centrifuge-dashboards"},a="Centrifuge Dashboards",d={id:"general/dune-analytics/parachain-dashboards/centrifuge-dashboards",title:"Centrifuge Dashboards",description:"Centrifuge is a decentralized finance hub and liquid staking platform.",source:"@site/../docs/general/dune-analytics/parachain-dashboards/centrifuge-dashboards.md",sourceDirName:"general/dune-analytics/parachain-dashboards",slug:"/general/dune-analytics/centrifuge-dashboards",permalink:"/docs/general/dune-analytics/centrifuge-dashboards",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/parachain-dashboards/centrifuge-dashboards.md",tags:[],version:"current",lastUpdatedBy:"MK",lastUpdatedAt:1719215716e3,frontMatter:{id:"centrifuge-dashboards",title:"Centrifuge Dashboards",sidebar_label:"Centrifuge",description:"Centrifuge is a decentralized finance hub and liquid staking platform.",keywords:["polkadot","dashboard","dune","centrifuge","DeFi"],slug:"../centrifuge-dashboards"},sidebar:"docs",previous:{title:"BridgeHub",permalink:"/docs/general/dune-analytics/bridgehub-dashboards"},next:{title:"Collectives",permalink:"/docs/general/dune-analytics/collectives-dashboards"}},o={},l=[{value:"Overview",id:"overview",level:2},{value:"Featured Dashboards on Dune",id:"featured-dashboards-on-dune",level:2},{value:"Key Tables",id:"key-tables",level:2},{value:"Useful Queries",id:"useful-queries",level:2},{value:"Getting Started with Queries",id:"getting-started-with-queries",level:2}];function c(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,i.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.header,{children:(0,r.jsx)(n.h1,{id:"centrifuge-dashboards",children:"Centrifuge Dashboards"})}),"\n",(0,r.jsx)(n.h2,{id:"overview",children:"Overview"}),"\n",(0,r.jsx)(n.p,{children:"Centrifuge is a platform for real-world asset tokenization. Through Centrifuge, investors gain\naccess to a diverse range of assets, improving transparency and achieving better insight into their\nportfolio. Asset managers tokenize their funds and streamline access to necessary service providers\nand investors, saving cost for fund operations and unlocking new sources of capital."}),"\n",(0,r.jsx)(n.p,{children:"Centrifuge provides both the infrastructure and ecosystem to tokenize, manage, and invest into a\ncomplete, diversified portfolio of real-world assets."}),"\n",(0,r.jsx)(n.p,{children:"Asset pools are fully collateralized, investors have legal recourse, and the protocol is asset-class\nagnostic with pools for assets spanning structured credit, real estate, US treasuries, carbon\ncredits, consumer finance, and more."}),"\n",(0,r.jsx)(n.p,{children:"Centrifuge's ecosystem extends beyond its onchain financial infrastructure, incorporating a DAO\n(decentralized autonomous organization) supported by a diverse community of finance professionals\nand developers."}),"\n",(0,r.jsx)(n.p,{children:"By bringing the entire structured credit market onchain across securitization, tokenization,\nprivacy, governance, and liquidity integrations, Centrifuge is building a more transparent,\naffordable, and limitless financial system."}),"\n",(0,r.jsx)(n.p,{children:"Some assets are managed on Ethereum, others are managed on Centrifuge."}),"\n",(0,r.jsx)(n.h2,{id:"featured-dashboards-on-dune",children:"Featured Dashboards on Dune"}),"\n",(0,r.jsx)(n.p,{children:"Here you'll find a variety of dashboards that help visualize data from the Centrifuge parachain on\nPolkadot:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"https://dune.com/substrate/centrifuge",children:"centrifuge on Polkadot"}),": This dashboard provides details\nfor"]}),"\n",(0,r.jsx)(n.li,{children:"assets pools on Centrifuge parachain. (As of June 2024: only one)"}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"key-tables",children:"Key Tables"}),"\n",(0,r.jsxs)(n.p,{children:["Data from the centrifuge parachain is organized into several key tables: ",(0,r.jsx)(n.code,{children:"centrifuge.balances"}),","]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"centrifuge.balances"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"centrifuge.blocks"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"centrifuge.calls"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"centrifuge.events"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"centrifuge.extrinsics"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"centrifuge.transfers"})}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.code,{children:"centrifuge.traces"})," table is created by a snapshot script utilizing Centrifuge API calls to\nfetch accurate values which would be difficult to calculate from the blockchain events alone."]}),"\n",(0,r.jsxs)(n.p,{children:["Start building your own queries using granular data on Dune\n",(0,r.jsx)(n.a,{href:"https://dune.com/queries?category=canonical&namespace=centrifuge",children:"here"}),"."]}),"\n",(0,r.jsx)(n.h2,{id:"useful-queries",children:"Useful Queries"}),"\n",(0,r.jsx)(n.p,{children:"Some useful queries for Centrifuge are provided:"}),"\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Subject Area"}),(0,r.jsx)(n.th,{children:"Query"}),(0,r.jsx)(n.th,{children:"Description"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Portfolio"}),(0,r.jsx)(n.td,{children:(0,r.jsx)(n.a,{href:"https://dune.com/queries/3708897",children:"query_3708897"})}),(0,r.jsx)(n.td,{children:"Provides details about the assets in the pools"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Centrifuge Pool Data Anemoy"}),(0,r.jsx)(n.td,{children:(0,r.jsx)(n.a,{href:"https://dune.com/queries/3708939",children:"query_3708939"})}),(0,r.jsx)(n.td,{children:"Provides details for the Anemoy pool (first pool on Centrifuge)"})]})]})]}),"\n",(0,r.jsx)(n.p,{children:"Dune users are encouraged to study the source code of the queries, including parts of a query that\nmay have been commented out for future use."}),"\n",(0,r.jsx)(n.p,{children:"Uncommenting these parts may accelerate your effort of adopting a query to a slightly different use\ncase."}),"\n",(0,r.jsx)(n.h2,{id:"getting-started-with-queries",children:"Getting Started with Queries"}),"\n",(0,r.jsx)(n.p,{children:"To get started with querying data from Centrifuge, you are welcome to use the mentioned queries. You\ncan also use the following DuneSQL queries as examples:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-sql",metastring:'title="Centrifuge Loan Market Data" showLineNumbers',children:"WITH portfolio AS (\n SELECT\n ts,\n CAST(JSON_VALUE(c.kv, 'strict $.asset_id.id') AS INT) AS asset_id,\n CAST(JSON_VALUE(c.kv, 'strict $.asset_id.pool') AS BIGINT) AS pool_id,\n FROM_UNIXTIME(CAST(JSON_VALUE(c.pv, 'strict $.maturity_date') AS BIGINT)) AS maturity_date,\n CAST(JSON_VALUE(c.pv, 'strict $.outstanding_interest') AS UINT256) AS outstanding_interest,\n CAST(JSON_VALUE(c.pv, 'strict $.outstanding_principal') AS UINT256) AS outstanding_principal,\n CAST(JSON_VALUE(c.pv, 'strict $.present_value') AS UINT256) AS present_value,\n CAST(JSON_VALUE(c.pv, 'strict $.total_borrowed') AS UINT256) AS total_borrowed,\n CAST(JSON_VALUE(c.pv, 'strict $.total_repaid_interest') AS UINT256) AS total_repaid_interest,\n CAST(JSON_VALUE(c.pv, 'strict $.total_repaid_principal') AS UINT256) AS total_repaid_principal,\n CAST(JSON_VALUE(c.pv, 'strict $.total_repaid_unscheduled') AS UINT256) AS total_repaid_unscheduled,\n CAST(JSON_VALUE(c.pv, 'strict $.pool_currency.symbol') AS VARCHAR) AS currency_symbol,\n CAST(JSON_VALUE(c.pv, 'strict $.pool_currency.decimals') AS INT) AS decimals,\n CAST(JSON_VALUE(c.pv, 'strict $.type') AS VARCHAR) AS type\n FROM\n centrifuge.traces c\n WHERE\n track = 'portfolio'\n)\nSELECT\n ts,\n asset_id,\n pool_id,\n maturity_date,\n outstanding_interest / POW(10, decimals) AS outstanding_interest,\n outstanding_principal / POW(10, decimals) AS outstanding_principal,\n present_value / POW(10, decimals) AS present_value,\n total_borrowed / POW(10, decimals) AS total_borrowed,\n total_repaid_interest / POW(10, decimals) AS total_repaid_interest,\n total_repaid_principal / POW(10, decimals) AS total_repaid_principal,\n total_repaid_unscheduled / POW(10, decimals) AS total_repaid_unscheduled,\n currency_symbol\nFROM\n portfolio\nWHERE\n type = 'Other'\nORDER BY\n maturity_date DESC;\n\n"})}),"\n",(0,r.jsxs)(n.p,{children:["The query is fairly typical for a parachain query on Dune. It parses details from the\n",(0,r.jsx)(n.code,{children:"centrifuge.traces"})," table, and displays relevant values with suitable labels."]}),"\n",(0,r.jsx)(n.p,{children:"The query uses Dune's native UINT256 type, which allows to deal with very large numbers and still\nmaintain precision."}),"\n",(0,r.jsx)(n.p,{children:"Query result:"}),"\n",(0,r.jsx)("iframe",{src:"https://dune.com/embeds/3734046/6280352/",height:"350",width:"100%"}),"\n",(0,r.jsx)(n.admonition,{title:"DuneSQL Reference",type:"info",children:(0,r.jsxs)(n.p,{children:["For more information on DuneSQL, please refer to the ",(0,r.jsx)(n.a,{href:"/docs/general/dunesql-cheatsheet",children:"DuneSQL Cheatsheet"}),"\nand\n",(0,r.jsx)(n.a,{href:"https://docs.dune.com/query-engine/Functions-and-operators/index",children:"DuneSQL Official Documentation"}),"."]})})]})}function u(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(c,{...e})}):c(e)}},28453:(e,n,t)=>{t.d(n,{R:()=>a,x:()=>d});var r=t(96540);const i={},s=r.createContext(i);function a(e){const n=r.useContext(s);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:a(e.components),r.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f2c21b54.892e029c.js b/assets/js/f2c21b54.892e029c.js new file mode 100644 index 000000000000..a646973141ac --- /dev/null +++ b/assets/js/f2c21b54.892e029c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4410],{54185:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>h,frontMatter:()=>r,metadata:()=>i,toc:()=>d});const i=JSON.parse('{"id":"build/build-storage","title":"Decentralized Storage","description":"Information about building with decentralized storage.","source":"@site/../docs/build/build-storage.md","sourceDirName":"build","slug":"/build-storage","permalink":"/docs/build-storage","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/build/build-storage.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1726729589000,"frontMatter":{"id":"build-storage","title":"Decentralized Storage","sidebar_label":"Decentralized Storage","description":"Information about building with decentralized storage.","keywords":["build","cloud","storage"],"slug":"../build-storage"}}');var a=s(74848),n=s(28453);const r={id:"build-storage",title:"Decentralized Storage",sidebar_label:"Decentralized Storage",description:"Information about building with decentralized storage.",keywords:["build","cloud","storage"],slug:"../build-storage"},o=void 0,l={},d=[{value:"DCS (Decentralized Cloud Storage)",id:"dcs-decentralized-cloud-storage",level:2},{value:"IPFS (Interplanetary File System)",id:"ipfs-interplanetary-file-system",level:3},{value:"Brief comparison of IPFS & HTTP:",id:"brief-comparison-of-ipfs--http",level:4},{value:"Crust Storage",id:"crust-storage",level:3},{value:"Filebase",id:"filebase",level:3},{value:"Using Polkadot-JS Files (IPFS) module",id:"using-polkadot-js-files-ipfs-module",level:4}];function c(e){const t={a:"a",admonition:"admonition",em:"em",h2:"h2",h3:"h3",h4:"h4",img:"img",p:"p",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,n.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(t.p,{children:"Storage is an integral part of modern computer systems, and the same is true for distributed and\ndecentralized systems like a blockchain. When interacting with the Polkadot ecosystem, it will be\nhelpful if you familiarize yourself with the current Web3 approach towards decentralized storage."}),"\n",(0,a.jsx)(t.h2,{id:"dcs-decentralized-cloud-storage",children:"DCS (Decentralized Cloud Storage)"}),"\n",(0,a.jsx)(t.p,{children:"The key attribute that characterizes centralized cloud storage is the location of data."}),"\n",(0,a.jsx)(t.p,{children:"In decentralized cloud storage, the key attribute becomes the data itself instead of the data's\nlocation."}),"\n",(0,a.jsxs)(t.p,{children:["This can be viewed as the shift from the centralized ",(0,a.jsx)(t.em,{children:"location-centric"})," storage approach to the\ndecentralized ",(0,a.jsx)(t.em,{children:"content-centric"})," approach."]}),"\n",(0,a.jsx)(t.h3,{id:"ipfs-interplanetary-file-system",children:"IPFS (Interplanetary File System)"}),"\n",(0,a.jsxs)(t.p,{children:[(0,a.jsx)(t.a,{href:"https://ipfs.tech/",children:"IPFS"})," is a peer-to-peer distributed file system that seeks to connect all\ncomputing devices with the same system of files, by utilizing features such as content-addressing,\ncontent-signing, and enhanced security methods through encryption. IPFS aims to address the current\nhurdles of the HTTP-based Internet."]}),"\n",(0,a.jsx)(t.h4,{id:"brief-comparison-of-ipfs--http",children:"Brief comparison of IPFS & HTTP:"}),"\n",(0,a.jsxs)(t.table,{children:[(0,a.jsx)(t.thead,{children:(0,a.jsxs)(t.tr,{children:[(0,a.jsx)(t.th,{children:"IPFS"}),(0,a.jsx)(t.th,{children:"HTTP"})]})}),(0,a.jsxs)(t.tbody,{children:[(0,a.jsxs)(t.tr,{children:[(0,a.jsx)(t.td,{children:"network: peer-to-peer model (decentralized)"}),(0,a.jsx)(t.td,{children:"network: client-server model (centralized)"})]}),(0,a.jsxs)(t.tr,{children:[(0,a.jsx)(t.td,{children:"requests: use a cryptographic hash of that data"}),(0,a.jsx)(t.td,{children:"requests: use the address on which data is hosted"})]}),(0,a.jsxs)(t.tr,{children:[(0,a.jsx)(t.td,{children:"accessibility: data is distributed to multiple nodes and can be accessed at any time. Bandwidth is high: nearest peer can serve the data"}),(0,a.jsx)(t.td,{children:"accessibility: data can only be accessed if the server is live and there are no interruptions in transmission. Bandwidth is limited: clients send requests to the same server"})]})]})]}),"\n",(0,a.jsx)(t.h3,{id:"crust-storage",children:"Crust Storage"}),"\n",(0,a.jsxs)(t.p,{children:[(0,a.jsx)(t.a,{href:"https://crust.network",children:"Crust Network"})," provides a Web3.0 decentralized storage network for the\nMetaverse. It is designed to realize core values of decentralization, privacy, and assurance. Crust\nsupports multiple storage-layer protocols such as ",(0,a.jsx)(t.a,{href:"#ipfs-interplanetary-file-system",children:"IPFS"}),", and\nexposes instant accessible on-chain storage functions to users. Crust\u02bcs technical stack is also\ncapable of supporting data manipulating and computing."]}),"\n",(0,a.jsxs)(t.p,{children:["Crust provides a native cross-chain communication pallet based on\n",(0,a.jsx)(t.a,{href:"https://wiki.polkadot.network/docs/learn-xcm",children:"XCMP"}),", called\n",(0,a.jsx)(t.a,{href:"https://github.com/crustio/crust/tree/parachain/shadow/crust-collator/pallets/xstorage",children:"xStorage"}),"."]}),"\n",(0,a.jsxs)(t.p,{children:["The protocol also supports most smart contract platforms, including Ethereum, with its\n",(0,a.jsx)(t.a,{href:"https://wiki.crust.network/docs/en/buildCrossChainSolution",children:"cross-chain dStorage solution"}),"."]}),"\n",(0,a.jsx)(t.admonition,{title:"Learn more about Crust",type:"note",children:(0,a.jsxs)(t.p,{children:["To learn more about Crust, check out the ",(0,a.jsx)(t.a,{href:"https://wiki.crust.network/en",children:"Crust Network Wiki"}),". Try\nintegrating with Crust by following their\n",(0,a.jsx)(t.a,{href:"https://wiki.crust.network/docs/en/build101",children:"Crust Storage 101"})," guide."]})}),"\n",(0,a.jsx)(t.h3,{id:"filebase",children:"Filebase"}),"\n",(0,a.jsxs)(t.p,{children:[(0,a.jsx)(t.a,{href:"https://filebase.com",children:"Filebase"})," is the first S3-compatible object storage platform that allows you\nto store data in a secure, redundant, and performant manner across multiple decentralized storage\nnetworks."]}),"\n",(0,a.jsx)(t.p,{children:"Filebase offers a geo-redundant IPFS pinning service that allows you to pin files to IPFS across\nmultiple diverse geographic locations. All files uploaded to IPFS through Filebase are automatically\npinned to the Filebase infrastructure with 3x replication across the globe. This ensures that your\ndata is globally available and redundant at all times."}),"\n",(0,a.jsx)(t.p,{children:"Filebase acts as an easy on-ramp to IPFS and decentralized storage by offering a user-friendly web\nconsole dashboard, making drag-and-dropping files onto Web3 simple and easy. Filebase also provides\nan S3-compatible API for widespread integrations and configurations in current workflows."}),"\n",(0,a.jsx)(t.admonition,{title:"Learn more about Filebase",type:"note",children:(0,a.jsxs)(t.p,{children:["To learn more about Filebase, check out the ",(0,a.jsx)(t.a,{href:"https://docs.filebase.com",children:"Filebase Documentation"}),", and\nspecifically the documentation on\n",(0,a.jsx)(t.a,{href:"https://docs.filebase.com/web3-education/web3-tutorials/polkadot/polkadot-deploy-a-polkadot-dapp-on-decentralized-storage",children:"deploying Polkadot dApp on decentralized storage."}),"\nYou can get started with Filebase by signing up ",(0,a.jsx)(t.a,{href:"https://filebase.com/signup",children:"here."})]})}),"\n",(0,a.jsx)(t.h4,{id:"using-polkadot-js-files-ipfs-module",children:"Using Polkadot-JS Files (IPFS) module"}),"\n",(0,a.jsxs)(t.p,{children:["Polkadot-JS UI includes a decentralized storage module that allows Substrate-based chain users to\nupload their files to an\n",(0,a.jsx)(t.a,{href:"https://wiki.crust.network/docs/en/buildIPFSWeb3AuthGW",children:"IPFS W3Auth Gateway"})," and use the\n",(0,a.jsx)(t.a,{href:"https://wiki.crust.network/docs/en/buildIPFSW3AuthPin",children:"IPFS W3Auth Pinning Service"})," to pin their\nfiles on Crust Network."]}),"\n",(0,a.jsx)(t.p,{children:"Start by uploading a single file or folder:"}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"upload",src:s(51947).A+"",width:"1917",height:"968"})}),"\n",(0,a.jsx)(t.p,{children:"Choose a Gateway:"}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"gateway",src:s(70192).A+"",width:"1916",height:"966"})}),"\n",(0,a.jsx)(t.p,{children:"Sign the message:"}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"sign",src:s(2297).A+"",width:"1918",height:"968"})}),"\n",(0,a.jsx)(t.p,{children:"You should be able to view the file info, as follows:"}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"file info",src:s(97318).A+"",width:"1917",height:"966"})}),"\n",(0,a.jsx)(t.p,{children:"As well as the file status:"}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"file statue",src:s(82415).A+"",width:"1916",height:"966"})}),"\n",(0,a.jsx)(t.admonition,{type:"note",children:(0,a.jsx)(t.p,{children:"The whole files module is decentralized, so your file directory is only cached in browser. The file\ndirectory info will not be visible if you switch to a new browser or clear the browser cache. The\nstorage module allows you to export file directory info from the current browser and import it to\nthe new browser."})}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"manage file dir",src:s(59956).A+"",width:"1917",height:"965"})}),"\n",(0,a.jsx)(t.admonition,{type:"note",children:(0,a.jsxs)(t.p,{children:["These above images are taken from this ",(0,a.jsx)(t.a,{href:"https://github.com/polkadot-js/apps/pull/6106",children:"pull request"})]})})]})}function h(e={}){const{wrapper:t}={...(0,n.R)(),...e.components};return t?(0,a.jsx)(t,{...e,children:(0,a.jsx)(c,{...e})}):c(e)}},51947:(e,t,s)=>{s.d(t,{A:()=>i});const i=s.p+"assets/images/substrate-files-1-b911815ce2aa992118b70e76adff406a.png"},70192:(e,t,s)=>{s.d(t,{A:()=>i});const i=s.p+"assets/images/substrate-files-2-b16e86055a05152fd766c6c8fb2478b3.png"},2297:(e,t,s)=>{s.d(t,{A:()=>i});const i=s.p+"assets/images/substrate-files-3-6b5badf567f42956c47ce5dcd7edd78c.png"},97318:(e,t,s)=>{s.d(t,{A:()=>i});const i=s.p+"assets/images/substrate-files-4-80c0cc191b4a9d3dbcd336f2413e1922.png"},82415:(e,t,s)=>{s.d(t,{A:()=>i});const i=s.p+"assets/images/substrate-files-5-9906fb4cea40075a2e3eb225a9d14dd7.png"},59956:(e,t,s)=>{s.d(t,{A:()=>i});const i=s.p+"assets/images/substrate-files-6-e1d84abd6cf39f3b3651ae30a33b38b5.png"},28453:(e,t,s)=>{s.d(t,{R:()=>r,x:()=>o});var i=s(96540);const a={},n=i.createContext(a);function r(e){const t=i.useContext(n);return i.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:r(e.components),i.createElement(n.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f2c21b54.91800669.js b/assets/js/f2c21b54.91800669.js deleted file mode 100644 index dd9fe8733825..000000000000 --- a/assets/js/f2c21b54.91800669.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4410],{99698:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>l,contentTitle:()=>r,default:()=>h,frontMatter:()=>a,metadata:()=>o,toc:()=>d});var i=s(74848),n=s(28453);const a={id:"build-storage",title:"Decentralized Storage",sidebar_label:"Decentralized Storage",description:"Information about building with decentralized storage.",keywords:["build","cloud","storage"],slug:"../build-storage"},r=void 0,o={id:"build/build-storage",title:"Decentralized Storage",description:"Information about building with decentralized storage.",source:"@site/../docs/build/build-storage.md",sourceDirName:"build",slug:"/build-storage",permalink:"/docs/build-storage",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/build/build-storage.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1726729589e3,frontMatter:{id:"build-storage",title:"Decentralized Storage",sidebar_label:"Decentralized Storage",description:"Information about building with decentralized storage.",keywords:["build","cloud","storage"],slug:"../build-storage"}},l={},d=[{value:"DCS (Decentralized Cloud Storage)",id:"dcs-decentralized-cloud-storage",level:2},{value:"IPFS (Interplanetary File System)",id:"ipfs-interplanetary-file-system",level:3},{value:"Brief comparison of IPFS & HTTP:",id:"brief-comparison-of-ipfs--http",level:4},{value:"Crust Storage",id:"crust-storage",level:3},{value:"Filebase",id:"filebase",level:3},{value:"Using Polkadot-JS Files (IPFS) module",id:"using-polkadot-js-files-ipfs-module",level:4}];function c(e){const t={a:"a",admonition:"admonition",em:"em",h2:"h2",h3:"h3",h4:"h4",img:"img",p:"p",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,n.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.p,{children:"Storage is an integral part of modern computer systems, and the same is true for distributed and\ndecentralized systems like a blockchain. When interacting with the Polkadot ecosystem, it will be\nhelpful if you familiarize yourself with the current Web3 approach towards decentralized storage."}),"\n",(0,i.jsx)(t.h2,{id:"dcs-decentralized-cloud-storage",children:"DCS (Decentralized Cloud Storage)"}),"\n",(0,i.jsx)(t.p,{children:"The key attribute that characterizes centralized cloud storage is the location of data."}),"\n",(0,i.jsx)(t.p,{children:"In decentralized cloud storage, the key attribute becomes the data itself instead of the data's\nlocation."}),"\n",(0,i.jsxs)(t.p,{children:["This can be viewed as the shift from the centralized ",(0,i.jsx)(t.em,{children:"location-centric"})," storage approach to the\ndecentralized ",(0,i.jsx)(t.em,{children:"content-centric"})," approach."]}),"\n",(0,i.jsx)(t.h3,{id:"ipfs-interplanetary-file-system",children:"IPFS (Interplanetary File System)"}),"\n",(0,i.jsxs)(t.p,{children:[(0,i.jsx)(t.a,{href:"https://ipfs.tech/",children:"IPFS"})," is a peer-to-peer distributed file system that seeks to connect all\ncomputing devices with the same system of files, by utilizing features such as content-addressing,\ncontent-signing, and enhanced security methods through encryption. IPFS aims to address the current\nhurdles of the HTTP-based Internet."]}),"\n",(0,i.jsx)(t.h4,{id:"brief-comparison-of-ipfs--http",children:"Brief comparison of IPFS & HTTP:"}),"\n",(0,i.jsxs)(t.table,{children:[(0,i.jsx)(t.thead,{children:(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.th,{children:"IPFS"}),(0,i.jsx)(t.th,{children:"HTTP"})]})}),(0,i.jsxs)(t.tbody,{children:[(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"network: peer-to-peer model (decentralized)"}),(0,i.jsx)(t.td,{children:"network: client-server model (centralized)"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"requests: use a cryptographic hash of that data"}),(0,i.jsx)(t.td,{children:"requests: use the address on which data is hosted"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"accessibility: data is distributed to multiple nodes and can be accessed at any time. Bandwidth is high: nearest peer can serve the data"}),(0,i.jsx)(t.td,{children:"accessibility: data can only be accessed if the server is live and there are no interruptions in transmission. Bandwidth is limited: clients send requests to the same server"})]})]})]}),"\n",(0,i.jsx)(t.h3,{id:"crust-storage",children:"Crust Storage"}),"\n",(0,i.jsxs)(t.p,{children:[(0,i.jsx)(t.a,{href:"https://crust.network",children:"Crust Network"})," provides a Web3.0 decentralized storage network for the\nMetaverse. It is designed to realize core values of decentralization, privacy, and assurance. Crust\nsupports multiple storage-layer protocols such as ",(0,i.jsx)(t.a,{href:"#ipfs-interplanetary-file-system",children:"IPFS"}),", and\nexposes instant accessible on-chain storage functions to users. Crust\u02bcs technical stack is also\ncapable of supporting data manipulating and computing."]}),"\n",(0,i.jsxs)(t.p,{children:["Crust provides a native cross-chain communication pallet based on\n",(0,i.jsx)(t.a,{href:"https://wiki.polkadot.network/docs/learn-xcm",children:"XCMP"}),", called\n",(0,i.jsx)(t.a,{href:"https://github.com/crustio/crust/tree/parachain/shadow/crust-collator/pallets/xstorage",children:"xStorage"}),"."]}),"\n",(0,i.jsxs)(t.p,{children:["The protocol also supports most smart contract platforms, including Ethereum, with its\n",(0,i.jsx)(t.a,{href:"https://wiki.crust.network/docs/en/buildCrossChainSolution",children:"cross-chain dStorage solution"}),"."]}),"\n",(0,i.jsx)(t.admonition,{title:"Learn more about Crust",type:"note",children:(0,i.jsxs)(t.p,{children:["To learn more about Crust, check out the ",(0,i.jsx)(t.a,{href:"https://wiki.crust.network/en",children:"Crust Network Wiki"}),". Try\nintegrating with Crust by following their\n",(0,i.jsx)(t.a,{href:"https://wiki.crust.network/docs/en/build101",children:"Crust Storage 101"})," guide."]})}),"\n",(0,i.jsx)(t.h3,{id:"filebase",children:"Filebase"}),"\n",(0,i.jsxs)(t.p,{children:[(0,i.jsx)(t.a,{href:"https://filebase.com",children:"Filebase"})," is the first S3-compatible object storage platform that allows you\nto store data in a secure, redundant, and performant manner across multiple decentralized storage\nnetworks."]}),"\n",(0,i.jsx)(t.p,{children:"Filebase offers a geo-redundant IPFS pinning service that allows you to pin files to IPFS across\nmultiple diverse geographic locations. All files uploaded to IPFS through Filebase are automatically\npinned to the Filebase infrastructure with 3x replication across the globe. This ensures that your\ndata is globally available and redundant at all times."}),"\n",(0,i.jsx)(t.p,{children:"Filebase acts as an easy on-ramp to IPFS and decentralized storage by offering a user-friendly web\nconsole dashboard, making drag-and-dropping files onto Web3 simple and easy. Filebase also provides\nan S3-compatible API for widespread integrations and configurations in current workflows."}),"\n",(0,i.jsx)(t.admonition,{title:"Learn more about Filebase",type:"note",children:(0,i.jsxs)(t.p,{children:["To learn more about Filebase, check out the ",(0,i.jsx)(t.a,{href:"https://docs.filebase.com",children:"Filebase Documentation"}),", and\nspecifically the documentation on\n",(0,i.jsx)(t.a,{href:"https://docs.filebase.com/web3-education/web3-tutorials/polkadot/polkadot-deploy-a-polkadot-dapp-on-decentralized-storage",children:"deploying Polkadot dApp on decentralized storage."}),"\nYou can get started with Filebase by signing up ",(0,i.jsx)(t.a,{href:"https://filebase.com/signup",children:"here."})]})}),"\n",(0,i.jsx)(t.h4,{id:"using-polkadot-js-files-ipfs-module",children:"Using Polkadot-JS Files (IPFS) module"}),"\n",(0,i.jsxs)(t.p,{children:["Polkadot-JS UI includes a decentralized storage module that allows Substrate-based chain users to\nupload their files to an\n",(0,i.jsx)(t.a,{href:"https://wiki.crust.network/docs/en/buildIPFSWeb3AuthGW",children:"IPFS W3Auth Gateway"})," and use the\n",(0,i.jsx)(t.a,{href:"https://wiki.crust.network/docs/en/buildIPFSW3AuthPin",children:"IPFS W3Auth Pinning Service"})," to pin their\nfiles on Crust Network."]}),"\n",(0,i.jsx)(t.p,{children:"Start by uploading a single file or folder:"}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"upload",src:s(51947).A+"",width:"1917",height:"968"})}),"\n",(0,i.jsx)(t.p,{children:"Choose a Gateway:"}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"gateway",src:s(70192).A+"",width:"1916",height:"966"})}),"\n",(0,i.jsx)(t.p,{children:"Sign the message:"}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"sign",src:s(2297).A+"",width:"1918",height:"968"})}),"\n",(0,i.jsx)(t.p,{children:"You should be able to view the file info, as follows:"}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"file info",src:s(97318).A+"",width:"1917",height:"966"})}),"\n",(0,i.jsx)(t.p,{children:"As well as the file status:"}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"file statue",src:s(82415).A+"",width:"1916",height:"966"})}),"\n",(0,i.jsx)(t.admonition,{type:"note",children:(0,i.jsx)(t.p,{children:"The whole files module is decentralized, so your file directory is only cached in browser. The file\ndirectory info will not be visible if you switch to a new browser or clear the browser cache. The\nstorage module allows you to export file directory info from the current browser and import it to\nthe new browser."})}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"manage file dir",src:s(59956).A+"",width:"1917",height:"965"})}),"\n",(0,i.jsx)(t.admonition,{type:"note",children:(0,i.jsxs)(t.p,{children:["These above images are taken from this ",(0,i.jsx)(t.a,{href:"https://github.com/polkadot-js/apps/pull/6106",children:"pull request"})]})})]})}function h(e={}){const{wrapper:t}={...(0,n.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(c,{...e})}):c(e)}},51947:(e,t,s)=>{s.d(t,{A:()=>i});const i=s.p+"assets/images/substrate-files-1-b911815ce2aa992118b70e76adff406a.png"},70192:(e,t,s)=>{s.d(t,{A:()=>i});const i=s.p+"assets/images/substrate-files-2-b16e86055a05152fd766c6c8fb2478b3.png"},2297:(e,t,s)=>{s.d(t,{A:()=>i});const i=s.p+"assets/images/substrate-files-3-6b5badf567f42956c47ce5dcd7edd78c.png"},97318:(e,t,s)=>{s.d(t,{A:()=>i});const i=s.p+"assets/images/substrate-files-4-80c0cc191b4a9d3dbcd336f2413e1922.png"},82415:(e,t,s)=>{s.d(t,{A:()=>i});const i=s.p+"assets/images/substrate-files-5-9906fb4cea40075a2e3eb225a9d14dd7.png"},59956:(e,t,s)=>{s.d(t,{A:()=>i});const i=s.p+"assets/images/substrate-files-6-e1d84abd6cf39f3b3651ae30a33b38b5.png"},28453:(e,t,s)=>{s.d(t,{R:()=>r,x:()=>o});var i=s(96540);const n={},a=i.createContext(n);function r(e){const t=i.useContext(a);return i.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:r(e.components),i.createElement(a.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f3027c84.40db5984.js b/assets/js/f3027c84.40db5984.js deleted file mode 100644 index 462e12ee709e..000000000000 --- a/assets/js/f3027c84.40db5984.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1906],{2588:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>c,contentTitle:()=>r,default:()=>u,frontMatter:()=>i,metadata:()=>l,toc:()=>d});var o=s(74848),t=s(28453),a=s(67141);const i={id:"polkadotjs-ui",title:"Polkadot-JS UI (Wallet)",sidebar_label:"Polkadot-JS UI",description:"A Wallet for Power-users and Developers.",keywords:["polkadotjs","polkadotjs apps","apps UI","extension"],slug:"../polkadotjs-ui"},r=void 0,l={id:"general/polkadotjs-ui",title:"Polkadot-JS UI (Wallet)",description:"A Wallet for Power-users and Developers.",source:"@site/../docs/general/polkadotjs-ui.md",sourceDirName:"general",slug:"/polkadotjs-ui",permalink:"/docs/polkadotjs-ui",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/polkadotjs-ui.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1729847256e3,frontMatter:{id:"polkadotjs-ui",title:"Polkadot-JS UI (Wallet)",sidebar_label:"Polkadot-JS UI",description:"A Wallet for Power-users and Developers.",keywords:["polkadotjs","polkadotjs apps","apps UI","extension"],slug:"../polkadotjs-ui"},sidebar:"docs",previous:{title:"Polkadot-JS Tooling",permalink:"/docs/polkadotjs"},next:{title:"Polkadot-JS Guides",permalink:"/docs/learn-polkadot-js-guides"}},c={},d=[{value:"Main Functionalities",id:"main-functionalities",level:2},{value:"Accounts",id:"accounts",level:3},{value:"Network (Staking)",id:"network-staking",level:3},{value:"Settings",id:"settings",level:3},{value:"Other Functionalities",id:"other-functionalities",level:2},{value:"Network",id:"network",level:3},{value:"Governance",id:"governance",level:3},{value:"Developer",id:"developer",level:3},{value:"Beginner's Guide to Polkadot-JS",id:"beginners-guide-to-polkadot-js",level:2}];function h(e){const n={a:"a",blockquote:"blockquote",h2:"h2",h3:"h3",li:"li",p:"p",strong:"strong",ul:"ul",...(0,t.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(a.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the Polkadot-JS UI, you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,o.jsxs)(n.p,{children:["The ",(0,o.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/explorer",children:(0,o.jsx)(n.strong,{children:"Polkadot-JS UI"})})," is the native application for\naccessing all features available on Substrate chains as Polkadot and Kusama. The UI is one of the\nmoving parts of ",(0,o.jsx)(n.a,{href:"/docs/polkadotjs",children:(0,o.jsx)(n.strong,{children:"Polkadot-JS tool collection"})}),", and its functionalities go\nbeyond normal wallet functionalities such as transfers."]}),"\n",(0,o.jsxs)(n.blockquote,{children:["\n",(0,o.jsxs)(n.p,{children:["Note that the UI may not precisely align with the functionality of individual parachains. For more\ninformation see the ",(0,o.jsx)(n.a,{href:"/docs/polkadotjs#polkadot-js-api",children:(0,o.jsx)(n.strong,{children:"Polkadot-JS Page"})}),"."]}),"\n"]}),"\n",(0,o.jsx)(n.h2,{id:"main-functionalities",children:"Main Functionalities"}),"\n",(0,o.jsx)(n.p,{children:"Here we describe those functionalities that will likely be useful to most users. Those\nfunctionalities include account generation, balance transfers, and staking."}),"\n",(0,o.jsx)(n.h3,{id:"accounts",children:"Accounts"}),"\n",(0,o.jsxs)(n.p,{children:["In this section of the UI, you can see accounts injected from a browser extension, such as the\n",(0,o.jsx)(n.a,{href:"/docs/polkadotjs#polkadot-js-extension",children:(0,o.jsx)(n.strong,{children:"Polkadot-JS Extension"})})," or\n",(0,o.jsx)(n.a,{href:"/docs/wallets-and-extensions#browser-extensions",children:(0,o.jsx)(n.strong,{children:"other in-browser wallets"})}),". It is also possible\nto expand balance details and see different\n",(0,o.jsx)(n.a,{href:"/docs/learn-account-balances#balance-types-on-polkadot-js",children:(0,o.jsx)(n.strong,{children:"account balance types"})}),". You\ncan also:"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:["Add an account (this option must be enabled under ",(0,o.jsx)(n.a,{href:"#settings",children:"Settings"}),"). Note that if you clear\nthe cache of your browser, you will lose it, and you will need to recover it through seed phrase\nor JSON file."]}),"\n",(0,o.jsx)(n.li,{children:"Recover and account from JSON file."}),"\n",(0,o.jsx)(n.li,{children:"Add an account from QR code."}),"\n",(0,o.jsxs)(n.li,{children:["Add an account from a ",(0,o.jsx)(n.a,{href:"/docs/ledger",children:(0,o.jsx)(n.strong,{children:"Ledger"})})," device (this option must be enabled under\n",(0,o.jsx)(n.a,{href:"#settings",children:"Settings"}),")."]}),"\n",(0,o.jsxs)(n.li,{children:["Create a ",(0,o.jsx)(n.a,{href:"/docs/learn-account-multisig",children:(0,o.jsx)(n.strong,{children:"multi-signature account"})}),"."]}),"\n",(0,o.jsxs)(n.li,{children:["Add a proxied account (see\n",(0,o.jsx)(n.a,{href:"/docs/learn-proxies-pure#anonymous-proxy-pure-proxy",children:(0,o.jsx)(n.strong,{children:"Pure Proxies"})})," for more\ninformation)."]}),"\n"]}),"\n",(0,o.jsxs)(n.p,{children:["For each account visible in the UI, you can perform different actions, including\n",(0,o.jsx)(n.a,{href:"/docs/learn-proxies",children:(0,o.jsx)(n.strong,{children:"adding a proxy"})}),",\n",(0,o.jsx)(n.a,{href:"/docs/learn-identity",children:(0,o.jsx)(n.strong,{children:"setting an identity"})}),", and\n",(0,o.jsx)(n.a,{href:"/docs/learn-transactions#balance-transfers",children:(0,o.jsx)(n.strong,{children:"sending tokens"})}),"."]}),"\n",(0,o.jsxs)(n.p,{children:["For more information about adding and recovering accounts, see the\n",(0,o.jsx)(n.a,{href:"/docs/learn-accounts#account-generation",children:(0,o.jsx)(n.strong,{children:"Account Generation"})})," page."]}),"\n",(0,o.jsx)(n.h3,{id:"network-staking",children:"Network (Staking)"}),"\n",(0,o.jsxs)(n.p,{children:["In this section of the UI, you can participate in ",(0,o.jsx)(n.a,{href:"/docs/learn-staking",children:(0,o.jsx)(n.strong,{children:"staking"})}),". In the\nStaking menu you can access:"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:["The ",(0,o.jsx)(n.strong,{children:"Overview"})," tab showing active or waiting validators."]}),"\n",(0,o.jsxs)(n.li,{children:["The ",(0,o.jsx)(n.strong,{children:"Accounts"})," tab (visible only if you added an account) showing accounts that are currently\nused for staking\n(",(0,o.jsx)(n.a,{href:"/docs/learn-staking#stash-account-and-staking-proxy",children:(0,o.jsx)(n.strong,{children:"stash and staking proxy"})}),"), bonded\namount, and nominations. In this tab, you can do staking-related transactions such as bonding more\nfunds or changing nominations. If you have\n",(0,o.jsx)(n.a,{href:"/docs/learn-staking-advanced#staking-proxies",children:(0,o.jsx)(n.strong,{children:"staking proxies"})})," here, you can use them\nwhile signing for staking-related transactions."]}),"\n",(0,o.jsxs)(n.li,{children:["The ",(0,o.jsx)(n.strong,{children:"Payouts"})," tab (visible only if you added an account) showing any pending rewards that still\nneed to be paid out to you."]}),"\n",(0,o.jsxs)(n.li,{children:["The ",(0,o.jsx)(n.strong,{children:"Pool"})," tab showing all registered ",(0,o.jsx)(n.a,{href:"/docs/learn-nomination-pools",children:(0,o.jsx)(n.strong,{children:"nomination pool"})}),"\nwith the respective state (open, blocked, or destroying). This tab can also be used to create and\njoin a pool."]}),"\n",(0,o.jsxs)(n.li,{children:["The ",(0,o.jsx)(n.strong,{children:"Targets"})," tab showing detailed information about validators such as commission and return.\nMore information can be found in the ",(0,o.jsx)(n.a,{href:"/docs/learn-nominator",children:(0,o.jsx)(n.strong,{children:"Nominator Page"})}),"."]}),"\n",(0,o.jsxs)(n.li,{children:["The ",(0,o.jsx)(n.strong,{children:"Bags"}),' tab (visible only if you added an account) showing the bag you are in ("My bags") and\nall bags within the ',(0,o.jsx)(n.a,{href:"/docs/learn-staking-advanced#bags-list",children:(0,o.jsx)(n.strong,{children:"bags list"})}),". Here (if\napplicable), you can rebag accounts that do not belong to the bag you are in, and you can move\nyour account in front of the account having less stake than you."]}),"\n",(0,o.jsxs)(n.li,{children:["The ",(0,o.jsx)(n.strong,{children:"Slashes"})," tab showing if there are any global ",(0,o.jsx)(n.a,{href:"/docs/learn-offenses",children:"slashes"}),"."]}),"\n",(0,o.jsxs)(n.li,{children:["The ",(0,o.jsx)(n.strong,{children:"Validator stats"})," tab showing statistics for a chosen validator."]}),"\n"]}),"\n",(0,o.jsx)(n.h3,{id:"settings",children:"Settings"}),"\n",(0,o.jsx)(n.p,{children:"In this UI section, you can change general settings such as appearance and language. You can also:"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"Allow local in-browser account storage. This is used to add accounts directly in the UI (which\ndiffers from having an account injected from a browser extension)."}),"\n",(0,o.jsx)(n.li,{children:"Choose to attach Ledger devices. This adds an account directly in the UI from a Ledger device."}),"\n"]}),"\n",(0,o.jsxs)(n.p,{children:["Under Settings you can also do the metadata update. Usually, if there is an update, this will be\nshown as a notification. For more information about metadata updates, see the\n",(0,o.jsx)(n.a,{href:"/docs/learn-guides-accounts#metadata-updates-with-the-polkadot-js-browser-extension",children:(0,o.jsx)(n.strong,{children:"dedicated section"})}),"."]}),"\n",(0,o.jsx)(n.h2,{id:"other-functionalities",children:"Other Functionalities"}),"\n",(0,o.jsx)(n.p,{children:"In this section, we describe those functionalities that will less likely interest the average user."}),"\n",(0,o.jsx)(n.h3,{id:"network",children:"Network"}),"\n",(0,o.jsx)(n.p,{children:"In addition to staking, in the Network section, you can also:"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"See the Explorer with the most recent blocks and events."}),"\n",(0,o.jsxs)(n.li,{children:["Inspect ",(0,o.jsx)(n.a,{href:"/docs/learn-parachains",children:(0,o.jsx)(n.strong,{children:"parachains"})}),"."]}),"\n"]}),"\n",(0,o.jsx)(n.h3,{id:"governance",children:"Governance"}),"\n",(0,o.jsxs)(n.p,{children:["In this section of the UI, you can participate in\n",(0,o.jsx)(n.a,{href:"/docs/learn-polkadot-opengov",children:(0,o.jsx)(n.strong,{children:"governance"})}),"."]}),"\n",(0,o.jsx)(n.h3,{id:"developer",children:"Developer"}),"\n",(0,o.jsx)(n.p,{children:"In this section of the UI, you can access advanced features such as:"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/chainstate",children:"Query on-chain data"})}),"\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/rpc",children:"Query the node using RPC calls"})}),"\n",(0,o.jsxs)(n.li,{children:["Call ",(0,o.jsx)(n.a,{href:"/docs/learn-transactions",children:(0,o.jsx)(n.strong,{children:"extrinsics"})})," using your account (you are able to see this\noption only if you have an account in the UI)"]}),"\n"]}),"\n",(0,o.jsxs)(n.p,{children:["The ",(0,o.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/extrinsics",children:"Extrinsic tab"})," provides the use to access more\ngranular functions such as\n",(0,o.jsx)(n.a,{href:"/docs/learn-proxies-pure#anonymous-proxy-pure-proxy",children:(0,o.jsx)(n.strong,{children:"pure proxies"})})," and\n",(0,o.jsx)(n.a,{href:"/docs/learn-proxies#time-delayed-proxy",children:(0,o.jsx)(n.strong,{children:"time-delayed proxies"})}),", change\n",(0,o.jsx)(n.a,{href:"/docs/learn-nomination-pools",children:(0,o.jsx)(n.strong,{children:"nomination pool"})})," settings (nomination and roles) and use\n",(0,o.jsx)(n.a,{href:"/docs/learn-proxies#non-transfer-proxy",children:(0,o.jsx)(n.strong,{children:"non-transfer proxies"})}),",\n",(0,o.jsx)(n.a,{href:"/docs/learn-assets#destroying-an-asset",children:(0,o.jsx)(n.strong,{children:"destroy assets"})}),", and much more."]}),"\n",(0,o.jsx)(n.h2,{id:"beginners-guide-to-polkadot-js",children:"Beginner's Guide to Polkadot-JS"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"https://www.youtube.com/watch?v=4EQqwGFV1D8",children:"Introduction to Polkadot-JS"})}),"\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"https://www.youtube.com/watch?v=sy7lvAqyzkY",children:"Create an account using Polkadot-JS"})}),"\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"https://www.youtube.com/watch?v=g4b4IWR6OrE",children:"Network Explorer on Polkadot-JS UI"})}),"\n"]})]})}function u(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(h,{...e})}):h(e)}},67141:(e,n,s)=>{s.d(n,{A:()=>a});var o=s(96540),t=s(74848);const a=function(e){var n,s=e.message,a=(0,o.useState)(!0),i=a[0],r=a[1];return(0,t.jsx)(t.Fragment,{children:i&&(0,t.jsxs)("div",{className:"message-box",children:[(0,t.jsx)("button",{className:"close-button",onClick:function(){r(!1)},children:"\u2716 "}),(0,t.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(n=s,n.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},28453:(e,n,s)=>{s.d(n,{R:()=>i,x:()=>r});var o=s(96540);const t={},a=o.createContext(t);function i(e){const n=o.useContext(a);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:i(e.components),o.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f3027c84.47555107.js b/assets/js/f3027c84.47555107.js new file mode 100644 index 000000000000..d491c6237464 --- /dev/null +++ b/assets/js/f3027c84.47555107.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1906],{98958:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>c,contentTitle:()=>l,default:()=>u,frontMatter:()=>r,metadata:()=>o,toc:()=>d});const o=JSON.parse('{"id":"general/polkadotjs-ui","title":"Polkadot-JS UI (Wallet)","description":"A Wallet for Power-users and Developers.","source":"@site/../docs/general/polkadotjs-ui.md","sourceDirName":"general","slug":"/polkadotjs-ui","permalink":"/docs/polkadotjs-ui","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/polkadotjs-ui.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1729847256000,"frontMatter":{"id":"polkadotjs-ui","title":"Polkadot-JS UI (Wallet)","sidebar_label":"Polkadot-JS UI","description":"A Wallet for Power-users and Developers.","keywords":["polkadotjs","polkadotjs apps","apps UI","extension"],"slug":"../polkadotjs-ui"},"sidebar":"docs","previous":{"title":"Polkadot-JS Tooling","permalink":"/docs/polkadotjs"},"next":{"title":"Polkadot-JS Guides","permalink":"/docs/learn-polkadot-js-guides"}}');var t=s(74848),a=s(28453),i=s(67141);const r={id:"polkadotjs-ui",title:"Polkadot-JS UI (Wallet)",sidebar_label:"Polkadot-JS UI",description:"A Wallet for Power-users and Developers.",keywords:["polkadotjs","polkadotjs apps","apps UI","extension"],slug:"../polkadotjs-ui"},l=void 0,c={},d=[{value:"Main Functionalities",id:"main-functionalities",level:2},{value:"Accounts",id:"accounts",level:3},{value:"Network (Staking)",id:"network-staking",level:3},{value:"Settings",id:"settings",level:3},{value:"Other Functionalities",id:"other-functionalities",level:2},{value:"Network",id:"network",level:3},{value:"Governance",id:"governance",level:3},{value:"Developer",id:"developer",level:3},{value:"Beginner's Guide to Polkadot-JS",id:"beginners-guide-to-polkadot-js",level:2}];function h(e){const n={a:"a",blockquote:"blockquote",h2:"h2",h3:"h3",li:"li",p:"p",strong:"strong",ul:"ul",...(0,a.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the Polkadot-JS UI, you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/explorer",children:(0,t.jsx)(n.strong,{children:"Polkadot-JS UI"})})," is the native application for\naccessing all features available on Substrate chains as Polkadot and Kusama. The UI is one of the\nmoving parts of ",(0,t.jsx)(n.a,{href:"/docs/polkadotjs",children:(0,t.jsx)(n.strong,{children:"Polkadot-JS tool collection"})}),", and its functionalities go\nbeyond normal wallet functionalities such as transfers."]}),"\n",(0,t.jsxs)(n.blockquote,{children:["\n",(0,t.jsxs)(n.p,{children:["Note that the UI may not precisely align with the functionality of individual parachains. For more\ninformation see the ",(0,t.jsx)(n.a,{href:"/docs/polkadotjs#polkadot-js-api",children:(0,t.jsx)(n.strong,{children:"Polkadot-JS Page"})}),"."]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"main-functionalities",children:"Main Functionalities"}),"\n",(0,t.jsx)(n.p,{children:"Here we describe those functionalities that will likely be useful to most users. Those\nfunctionalities include account generation, balance transfers, and staking."}),"\n",(0,t.jsx)(n.h3,{id:"accounts",children:"Accounts"}),"\n",(0,t.jsxs)(n.p,{children:["In this section of the UI, you can see accounts injected from a browser extension, such as the\n",(0,t.jsx)(n.a,{href:"/docs/polkadotjs#polkadot-js-extension",children:(0,t.jsx)(n.strong,{children:"Polkadot-JS Extension"})})," or\n",(0,t.jsx)(n.a,{href:"/docs/wallets-and-extensions#browser-extensions",children:(0,t.jsx)(n.strong,{children:"other in-browser wallets"})}),". It is also possible\nto expand balance details and see different\n",(0,t.jsx)(n.a,{href:"/docs/learn-account-balances#balance-types-on-polkadot-js",children:(0,t.jsx)(n.strong,{children:"account balance types"})}),". You\ncan also:"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["Add an account (this option must be enabled under ",(0,t.jsx)(n.a,{href:"#settings",children:"Settings"}),"). Note that if you clear\nthe cache of your browser, you will lose it, and you will need to recover it through seed phrase\nor JSON file."]}),"\n",(0,t.jsx)(n.li,{children:"Recover and account from JSON file."}),"\n",(0,t.jsx)(n.li,{children:"Add an account from QR code."}),"\n",(0,t.jsxs)(n.li,{children:["Add an account from a ",(0,t.jsx)(n.a,{href:"/docs/ledger",children:(0,t.jsx)(n.strong,{children:"Ledger"})})," device (this option must be enabled under\n",(0,t.jsx)(n.a,{href:"#settings",children:"Settings"}),")."]}),"\n",(0,t.jsxs)(n.li,{children:["Create a ",(0,t.jsx)(n.a,{href:"/docs/learn-account-multisig",children:(0,t.jsx)(n.strong,{children:"multi-signature account"})}),"."]}),"\n",(0,t.jsxs)(n.li,{children:["Add a proxied account (see\n",(0,t.jsx)(n.a,{href:"/docs/learn-proxies-pure#anonymous-proxy-pure-proxy",children:(0,t.jsx)(n.strong,{children:"Pure Proxies"})})," for more\ninformation)."]}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["For each account visible in the UI, you can perform different actions, including\n",(0,t.jsx)(n.a,{href:"/docs/learn-proxies",children:(0,t.jsx)(n.strong,{children:"adding a proxy"})}),",\n",(0,t.jsx)(n.a,{href:"/docs/learn-identity",children:(0,t.jsx)(n.strong,{children:"setting an identity"})}),", and\n",(0,t.jsx)(n.a,{href:"/docs/learn-transactions#balance-transfers",children:(0,t.jsx)(n.strong,{children:"sending tokens"})}),"."]}),"\n",(0,t.jsxs)(n.p,{children:["For more information about adding and recovering accounts, see the\n",(0,t.jsx)(n.a,{href:"/docs/learn-accounts#account-generation",children:(0,t.jsx)(n.strong,{children:"Account Generation"})})," page."]}),"\n",(0,t.jsx)(n.h3,{id:"network-staking",children:"Network (Staking)"}),"\n",(0,t.jsxs)(n.p,{children:["In this section of the UI, you can participate in ",(0,t.jsx)(n.a,{href:"/docs/learn-staking",children:(0,t.jsx)(n.strong,{children:"staking"})}),". In the\nStaking menu you can access:"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["The ",(0,t.jsx)(n.strong,{children:"Overview"})," tab showing active or waiting validators."]}),"\n",(0,t.jsxs)(n.li,{children:["The ",(0,t.jsx)(n.strong,{children:"Accounts"})," tab (visible only if you added an account) showing accounts that are currently\nused for staking\n(",(0,t.jsx)(n.a,{href:"/docs/learn-staking#stash-account-and-staking-proxy",children:(0,t.jsx)(n.strong,{children:"stash and staking proxy"})}),"), bonded\namount, and nominations. In this tab, you can do staking-related transactions such as bonding more\nfunds or changing nominations. If you have\n",(0,t.jsx)(n.a,{href:"/docs/learn-staking-advanced#staking-proxies",children:(0,t.jsx)(n.strong,{children:"staking proxies"})})," here, you can use them\nwhile signing for staking-related transactions."]}),"\n",(0,t.jsxs)(n.li,{children:["The ",(0,t.jsx)(n.strong,{children:"Payouts"})," tab (visible only if you added an account) showing any pending rewards that still\nneed to be paid out to you."]}),"\n",(0,t.jsxs)(n.li,{children:["The ",(0,t.jsx)(n.strong,{children:"Pool"})," tab showing all registered ",(0,t.jsx)(n.a,{href:"/docs/learn-nomination-pools",children:(0,t.jsx)(n.strong,{children:"nomination pool"})}),"\nwith the respective state (open, blocked, or destroying). This tab can also be used to create and\njoin a pool."]}),"\n",(0,t.jsxs)(n.li,{children:["The ",(0,t.jsx)(n.strong,{children:"Targets"})," tab showing detailed information about validators such as commission and return.\nMore information can be found in the ",(0,t.jsx)(n.a,{href:"/docs/learn-nominator",children:(0,t.jsx)(n.strong,{children:"Nominator Page"})}),"."]}),"\n",(0,t.jsxs)(n.li,{children:["The ",(0,t.jsx)(n.strong,{children:"Bags"}),' tab (visible only if you added an account) showing the bag you are in ("My bags") and\nall bags within the ',(0,t.jsx)(n.a,{href:"/docs/learn-staking-advanced#bags-list",children:(0,t.jsx)(n.strong,{children:"bags list"})}),". Here (if\napplicable), you can rebag accounts that do not belong to the bag you are in, and you can move\nyour account in front of the account having less stake than you."]}),"\n",(0,t.jsxs)(n.li,{children:["The ",(0,t.jsx)(n.strong,{children:"Slashes"})," tab showing if there are any global ",(0,t.jsx)(n.a,{href:"/docs/learn-offenses",children:"slashes"}),"."]}),"\n",(0,t.jsxs)(n.li,{children:["The ",(0,t.jsx)(n.strong,{children:"Validator stats"})," tab showing statistics for a chosen validator."]}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"settings",children:"Settings"}),"\n",(0,t.jsx)(n.p,{children:"In this UI section, you can change general settings such as appearance and language. You can also:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Allow local in-browser account storage. This is used to add accounts directly in the UI (which\ndiffers from having an account injected from a browser extension)."}),"\n",(0,t.jsx)(n.li,{children:"Choose to attach Ledger devices. This adds an account directly in the UI from a Ledger device."}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["Under Settings you can also do the metadata update. Usually, if there is an update, this will be\nshown as a notification. For more information about metadata updates, see the\n",(0,t.jsx)(n.a,{href:"/docs/learn-guides-accounts#metadata-updates-with-the-polkadot-js-browser-extension",children:(0,t.jsx)(n.strong,{children:"dedicated section"})}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"other-functionalities",children:"Other Functionalities"}),"\n",(0,t.jsx)(n.p,{children:"In this section, we describe those functionalities that will less likely interest the average user."}),"\n",(0,t.jsx)(n.h3,{id:"network",children:"Network"}),"\n",(0,t.jsx)(n.p,{children:"In addition to staking, in the Network section, you can also:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"See the Explorer with the most recent blocks and events."}),"\n",(0,t.jsxs)(n.li,{children:["Inspect ",(0,t.jsx)(n.a,{href:"/docs/learn-parachains",children:(0,t.jsx)(n.strong,{children:"parachains"})}),"."]}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"governance",children:"Governance"}),"\n",(0,t.jsxs)(n.p,{children:["In this section of the UI, you can participate in\n",(0,t.jsx)(n.a,{href:"/docs/learn-polkadot-opengov",children:(0,t.jsx)(n.strong,{children:"governance"})}),"."]}),"\n",(0,t.jsx)(n.h3,{id:"developer",children:"Developer"}),"\n",(0,t.jsx)(n.p,{children:"In this section of the UI, you can access advanced features such as:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/chainstate",children:"Query on-chain data"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/rpc",children:"Query the node using RPC calls"})}),"\n",(0,t.jsxs)(n.li,{children:["Call ",(0,t.jsx)(n.a,{href:"/docs/learn-transactions",children:(0,t.jsx)(n.strong,{children:"extrinsics"})})," using your account (you are able to see this\noption only if you have an account in the UI)"]}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/extrinsics",children:"Extrinsic tab"})," provides the use to access more\ngranular functions such as\n",(0,t.jsx)(n.a,{href:"/docs/learn-proxies-pure#anonymous-proxy-pure-proxy",children:(0,t.jsx)(n.strong,{children:"pure proxies"})})," and\n",(0,t.jsx)(n.a,{href:"/docs/learn-proxies#time-delayed-proxy",children:(0,t.jsx)(n.strong,{children:"time-delayed proxies"})}),", change\n",(0,t.jsx)(n.a,{href:"/docs/learn-nomination-pools",children:(0,t.jsx)(n.strong,{children:"nomination pool"})})," settings (nomination and roles) and use\n",(0,t.jsx)(n.a,{href:"/docs/learn-proxies#non-transfer-proxy",children:(0,t.jsx)(n.strong,{children:"non-transfer proxies"})}),",\n",(0,t.jsx)(n.a,{href:"/docs/learn-assets#destroying-an-asset",children:(0,t.jsx)(n.strong,{children:"destroy assets"})}),", and much more."]}),"\n",(0,t.jsx)(n.h2,{id:"beginners-guide-to-polkadot-js",children:"Beginner's Guide to Polkadot-JS"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://www.youtube.com/watch?v=4EQqwGFV1D8",children:"Introduction to Polkadot-JS"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://www.youtube.com/watch?v=sy7lvAqyzkY",children:"Create an account using Polkadot-JS"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://www.youtube.com/watch?v=g4b4IWR6OrE",children:"Network Explorer on Polkadot-JS UI"})}),"\n"]})]})}function u(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(h,{...e})}):h(e)}},67141:(e,n,s)=>{s.d(n,{A:()=>a});var o=s(96540),t=s(74848);const a=function(e){var n,s=e.message,a=(0,o.useState)(!0),i=a[0],r=a[1];return(0,t.jsx)(t.Fragment,{children:i&&(0,t.jsxs)("div",{className:"message-box",children:[(0,t.jsx)("button",{className:"close-button",onClick:function(){r(!1)},children:"\u2716 "}),(0,t.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(n=s,n.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},28453:(e,n,s)=>{s.d(n,{R:()=>i,x:()=>r});var o=s(96540);const t={},a=o.createContext(t);function i(e){const n=o.useContext(a);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:i(e.components),o.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f359a251.11cd3390.js b/assets/js/f359a251.11cd3390.js new file mode 100644 index 000000000000..bd7ae7fb6c1f --- /dev/null +++ b/assets/js/f359a251.11cd3390.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4051],{49362:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>d,default:()=>p,frontMatter:()=>l,metadata:()=>r,toc:()=>u});const r=JSON.parse('{"id":"maintain/maintain-endpoints","title":"Node Endpoints","description":"List of node endpoints and examples of use.","source":"@site/../docs/maintain/maintain-endpoints.md","sourceDirName":"maintain","slug":"/maintain-endpoints","permalink":"/docs/maintain-endpoints","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/maintain/maintain-endpoints.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1729152709000,"frontMatter":{"id":"maintain-endpoints","title":"Node Endpoints","sidebar_label":"Node Endpoints","description":"List of node endpoints and examples of use.","keywords":["endpoints","network","connect"],"slug":"../maintain-endpoints"},"sidebar":"docs","previous":{"title":"Nodes and Dapps","permalink":"/docs/maintain-node-index"},"next":{"title":"Set up a Full Node","permalink":"/docs/maintain-sync"}}');var a=t(74848),i=t(28453),s=t(11470),o=t(19365);const l={id:"maintain-endpoints",title:"Node Endpoints",sidebar_label:"Node Endpoints",description:"List of node endpoints and examples of use.",keywords:["endpoints","network","connect"],slug:"../maintain-endpoints"},d=void 0,c={},u=[{value:"Network Endpoints",id:"network-endpoints",level:3},{value:"Example usage with Polkadot-JS API",id:"example-usage-with-polkadot-js-api",level:4},{value:"Third Party Providers",id:"third-party-providers",level:3}];function h(e){const n={a:"a",admonition:"admonition",code:"code",h3:"h3",h4:"h4",li:"li",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,i.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(n.p,{children:["Ideally, one may run their own node when interacting with the\n",(0,a.jsx)(n.a,{href:"https://polkadot.network/",children:"Polkadot network"})," via ",(0,a.jsx)(n.a,{href:"https://polkadot.js.org/apps/",children:"Polkadot-JS Apps"}),"\nor other UIs and programmatic methods. Another option would be to connect to one of the several\npublic endpoints provided by infrastructure and API service providers. For development convenience,\n",(0,a.jsx)(n.a,{href:"https://www.parity.io/",children:"Parity Tech"})," maintains archive nodes for Polkadot, Kusama, and their test\nnetworks with public endpoints. These endpoints can be used with\n",(0,a.jsx)(n.a,{href:"https://polkadot.js.org/docs/api",children:"Polkadot-JS API"})," to interact with their respective chains. The\ntables below list these endpoints."]}),"\n",(0,a.jsx)(n.h3,{id:"network-endpoints",children:"Network Endpoints"}),"\n",(0,a.jsxs)(n.p,{children:["Endpoints for all production and test networks are listed on the\n",(0,a.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/accounts",children:"Polkadot-JS UI"})," which are accessed from\n",(0,a.jsx)(n.a,{href:"https://github.com/polkadot-js/apps/tree/master/packages/apps-config/src/endpoints",children:"here"}),".\nEndpoints for Polkadot relay chain and Kusama relay chain, parachains, and Paseo test network are\nmaintained by the community. System Chains as well as Westend test network endpoints maintained by\nParity Technologies are listed below:"]}),"\n",(0,a.jsxs)(s.A,{groupId:"endpoints",values:[{label:"Polkadot System Chains",value:"psc"},{label:"Kusama System Chains",value:"ksc"},{label:"Test Networks",value:"tn"}],children:[(0,a.jsx)(o.A,{value:"psc",children:(0,a.jsxs)(n.table,{children:[(0,a.jsx)(n.thead,{children:(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.th,{children:"Network"}),(0,a.jsx)(n.th,{children:"WSS Endpoint"})]})}),(0,a.jsxs)(n.tbody,{children:[(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:"Asset Hub"}),(0,a.jsx)(n.td,{children:"wss://polkadot-asset-hub-rpc.polkadot.io"})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:"Bridge Hub"}),(0,a.jsx)(n.td,{children:"wss://polkadot-bridge-hub-rpc.polkadot.io"})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:"Collectives"}),(0,a.jsx)(n.td,{children:"wss://polkadot-collectives-rpc.polkadot.io"})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:"People Chain"}),(0,a.jsx)(n.td,{children:"wss://polkadot-people-rpc.polkadot.io"})]})]})]})}),(0,a.jsx)(o.A,{value:"ksc",children:(0,a.jsxs)(n.table,{children:[(0,a.jsx)(n.thead,{children:(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.th,{children:"Network"}),(0,a.jsx)(n.th,{children:"WSS Endpoint"})]})}),(0,a.jsxs)(n.tbody,{children:[(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:"Asset Hub"}),(0,a.jsx)(n.td,{children:"wss://kusama-asset-hub-rpc.polkadot.io"})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:"Bridge Hub"}),(0,a.jsx)(n.td,{children:"wss://kusama-bridge-hub-rpc.polkadot.io"})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:"Collectives"}),(0,a.jsx)(n.td,{children:"wss://kusama-collectives-rpc.polkadot.io"})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:"People Chain"}),(0,a.jsx)(n.td,{children:"wss://kusama-people-rpc.polkadot.io"})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:"Coretime Chain"}),(0,a.jsx)(n.td,{children:"wss://kusama-coretime-rpc.polkadot.io"})]})]})]})}),(0,a.jsx)(o.A,{value:"tn",children:(0,a.jsxs)(n.table,{children:[(0,a.jsx)(n.thead,{children:(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.th,{children:"Network"}),(0,a.jsx)(n.th,{children:"WSS Endpoint"})]})}),(0,a.jsx)(n.tbody,{children:(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:"Westend"}),(0,a.jsx)(n.td,{children:"wss://westend-rpc.polkadot.io"})]})})]})})]}),"\n",(0,a.jsx)(n.h4,{id:"example-usage-with-polkadot-js-api",children:"Example usage with Polkadot-JS API"}),"\n",(0,a.jsx)(n.p,{children:"To connect to the Parity node for the Polkadot Asset Hub, use the endpoint in your JavaScript apps\nlike so:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-javascript",metastring:"{5}",children:"// Using the Polkadot Mainnet Endpoint\nconst { ApiPromise, WsProvider } = require('@polkadot/api');\nasync () => {\n // Construct a provider with the endpoint URL\n const provider = new WsProvider('wss://polkadot-asset-hub-rpc.polkadot.io');\n // Create an API instance for Polkadot\n const api = await ApiPromise.create({ provider });\n // ...\n"})}),"\n",(0,a.jsx)(n.h3,{id:"third-party-providers",children:"Third Party Providers"}),"\n",(0,a.jsx)(n.p,{children:"There are a number of third-party providers of RPC infrastructure to the Polkadot and Kusama\ncommunities, commonly providing access to multiple networks and parachains in a single service. They\nprovide additional services such as higher rate limits, potentially more reliable and scalable\nservice, and additional metrics."}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"https://onfinality.io",children:"OnFinality"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"https://dwellir.com",children:"Dwellir"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"https://radiumblock.com/",children:"Radium Block"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"https://getblock.io/",children:"GetBlock"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"https://1rpc.io/",children:"1RPC"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"https://nownodes.io/",children:"NOWNodes"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"https://www.allthatnode.com/",children:"All That Node"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"https://www.rpc.subquery.network/",children:"SubQuery"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"https://drpc.org/",children:"dRPC"})}),"\n"]}),"\n",(0,a.jsx)(n.admonition,{type:"note",children:(0,a.jsxs)(n.p,{children:["The list of third party RPC endpoints above for Polkadot and Kusama is directly fetched from\n",(0,a.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/explorer",children:"Polkadot-JS UI"})]})})]})}function p(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(h,{...e})}):h(e)}},19365:(e,n,t)=>{t.d(n,{A:()=>s});t(96540);var r=t(34164);const a={tabItem:"tabItem_Ymn6"};var i=t(74848);function s(e){var n=e.children,t=e.hidden,s=e.className;return(0,i.jsx)("div",{role:"tabpanel",className:(0,r.A)(a.tabItem,s),hidden:t,children:n})}},11470:(e,n,t)=>{t.d(n,{A:()=>g});var r=t(96540),a=t(34164),i=t(23104),s=t(56347),o=t(205),l=t(57485),d=t(31682),c=t(75376);function u(e){var n,t;return null!=(n=null==(t=r.Children.toArray(e).filter((function(e){return"\n"!==e})).map((function(e){if(!e||(0,r.isValidElement)(e)&&((n=e.props)&&"object"==typeof n&&"value"in n))return e;var n;throw new Error("Docusaurus error: Bad child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:t.filter(Boolean))?n:[]}function h(e){var n=e.values,t=e.children;return(0,r.useMemo)((function(){var e=null!=n?n:function(e){return u(e).map((function(e){var n=e.props;return{value:n.value,label:n.label,attributes:n.attributes,default:n.default}}))}(t);return function(e){var n=(0,d.XI)(e,(function(e,n){return e.value===n.value}));if(n.length>0)throw new Error('Docusaurus error: Duplicate values "'+n.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[n,t])}function p(e){var n=e.value;return e.tabValues.some((function(e){return e.value===n}))}function m(e){var n=e.queryString,t=void 0!==n&&n,a=e.groupId,i=(0,s.W6)(),o=function(e){var n=e.queryString,t=void 0!==n&&n,r=e.groupId;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!r)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=r?r:null}({queryString:t,groupId:a});return[(0,l.aZ)(o),(0,r.useCallback)((function(e){if(o){var n=new URLSearchParams(i.location.search);n.set(o,e),i.replace(Object.assign({},i.location,{search:n.toString()}))}}),[o,i])]}function f(e){var n,t,a,i,s=e.defaultValue,l=e.queryString,d=void 0!==l&&l,u=e.groupId,f=h(e),v=(0,r.useState)((function(){return function(e){var n,t=e.defaultValue,r=e.tabValues;if(0===r.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!p({value:t,tabValues:r}))throw new Error('Docusaurus error: The has a defaultValue "'+t+'" but none of its children has the corresponding value. Available values are: '+r.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return t}var a=null!=(n=r.find((function(e){return e.default})))?n:r[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:s,tabValues:f})})),x=v[0],b=v[1],j=m({queryString:d,groupId:u}),k=j[0],w=j[1],g=(n=function(e){return e?"docusaurus.tab."+e:null}({groupId:u}.groupId),t=(0,c.Dv)(n),a=t[0],i=t[1],[a,(0,r.useCallback)((function(e){n&&i.set(e)}),[n,i])]),y=g[0],P=g[1],A=function(){var e=null!=k?k:y;return p({value:e,tabValues:f})?e:null}();return(0,o.A)((function(){A&&b(A)}),[A]),{selectedValue:x,selectValue:(0,r.useCallback)((function(e){if(!p({value:e,tabValues:f}))throw new Error("Can't select invalid tab value="+e);b(e),w(e),P(e)}),[w,P,f]),tabValues:f}}var v=t(92303);const x={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var b=t(74848);function j(e){var n=e.className,t=e.block,r=e.selectedValue,s=e.selectValue,o=e.tabValues,l=[],d=(0,i.a_)().blockElementScrollPositionUntilNextRender,c=function(e){var n=e.currentTarget,t=l.indexOf(n),a=o[t].value;a!==r&&(d(n),s(a))},u=function(e){var n,t=null;switch(e.key){case"Enter":c(e);break;case"ArrowRight":var r,a=l.indexOf(e.currentTarget)+1;t=null!=(r=l[a])?r:l[0];break;case"ArrowLeft":var i,s=l.indexOf(e.currentTarget)-1;t=null!=(i=l[s])?i:l[l.length-1]}null==(n=t)||n.focus()};return(0,b.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,a.A)("tabs",{"tabs--block":t},n),children:o.map((function(e){var n=e.value,t=e.label,i=e.attributes;return(0,b.jsx)("li",Object.assign({role:"tab",tabIndex:r===n?0:-1,"aria-selected":r===n,ref:function(e){return l.push(e)},onKeyDown:u,onClick:c},i,{className:(0,a.A)("tabs__item",x.tabItem,null==i?void 0:i.className,{"tabs__item--active":r===n}),children:null!=t?t:n}),n)}))})}function k(e){var n=e.lazy,t=e.children,i=e.selectedValue,s=(Array.isArray(t)?t:[t]).filter(Boolean);if(n){var o=s.find((function(e){return e.props.value===i}));return o?(0,r.cloneElement)(o,{className:(0,a.A)("margin-top--md",o.props.className)}):null}return(0,b.jsx)("div",{className:"margin-top--md",children:s.map((function(e,n){return(0,r.cloneElement)(e,{key:n,hidden:e.props.value!==i})}))})}function w(e){var n=f(e);return(0,b.jsxs)("div",{className:(0,a.A)("tabs-container",x.tabList),children:[(0,b.jsx)(j,Object.assign({},n,e)),(0,b.jsx)(k,Object.assign({},n,e))]})}function g(e){var n=(0,v.A)();return(0,b.jsx)(w,Object.assign({},e,{children:u(e.children)}),String(n))}},28453:(e,n,t)=>{t.d(n,{R:()=>s,x:()=>o});var r=t(96540);const a={},i=r.createContext(a);function s(e){const n=r.useContext(i);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:s(e.components),r.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f359a251.9429e5f4.js b/assets/js/f359a251.9429e5f4.js deleted file mode 100644 index 259404da4e11..000000000000 --- a/assets/js/f359a251.9429e5f4.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4051],{90801:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>l,default:()=>p,frontMatter:()=>o,metadata:()=>d,toc:()=>u});var r=t(74848),a=t(28453),i=t(11470),s=t(19365);const o={id:"maintain-endpoints",title:"Node Endpoints",sidebar_label:"Node Endpoints",description:"List of node endpoints and examples of use.",keywords:["endpoints","network","connect"],slug:"../maintain-endpoints"},l=void 0,d={id:"maintain/maintain-endpoints",title:"Node Endpoints",description:"List of node endpoints and examples of use.",source:"@site/../docs/maintain/maintain-endpoints.md",sourceDirName:"maintain",slug:"/maintain-endpoints",permalink:"/docs/maintain-endpoints",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/maintain/maintain-endpoints.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1729152709e3,frontMatter:{id:"maintain-endpoints",title:"Node Endpoints",sidebar_label:"Node Endpoints",description:"List of node endpoints and examples of use.",keywords:["endpoints","network","connect"],slug:"../maintain-endpoints"},sidebar:"docs",previous:{title:"Nodes and Dapps",permalink:"/docs/maintain-node-index"},next:{title:"Set up a Full Node",permalink:"/docs/maintain-sync"}},c={},u=[{value:"Network Endpoints",id:"network-endpoints",level:3},{value:"Example usage with Polkadot-JS API",id:"example-usage-with-polkadot-js-api",level:4},{value:"Third Party Providers",id:"third-party-providers",level:3}];function h(e){const n={a:"a",admonition:"admonition",code:"code",h3:"h3",h4:"h4",li:"li",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,a.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(n.p,{children:["Ideally, one may run their own node when interacting with the\n",(0,r.jsx)(n.a,{href:"https://polkadot.network/",children:"Polkadot network"})," via ",(0,r.jsx)(n.a,{href:"https://polkadot.js.org/apps/",children:"Polkadot-JS Apps"}),"\nor other UIs and programmatic methods. Another option would be to connect to one of the several\npublic endpoints provided by infrastructure and API service providers. For development convenience,\n",(0,r.jsx)(n.a,{href:"https://www.parity.io/",children:"Parity Tech"})," maintains archive nodes for Polkadot, Kusama, and their test\nnetworks with public endpoints. These endpoints can be used with\n",(0,r.jsx)(n.a,{href:"https://polkadot.js.org/docs/api",children:"Polkadot-JS API"})," to interact with their respective chains. The\ntables below list these endpoints."]}),"\n",(0,r.jsx)(n.h3,{id:"network-endpoints",children:"Network Endpoints"}),"\n",(0,r.jsxs)(n.p,{children:["Endpoints for all production and test networks are listed on the\n",(0,r.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/accounts",children:"Polkadot-JS UI"})," which are accessed from\n",(0,r.jsx)(n.a,{href:"https://github.com/polkadot-js/apps/tree/master/packages/apps-config/src/endpoints",children:"here"}),".\nEndpoints for Polkadot relay chain and Kusama relay chain, parachains, and Paseo test network are\nmaintained by the community. System Chains as well as Westend test network endpoints maintained by\nParity Technologies are listed below:"]}),"\n",(0,r.jsxs)(i.A,{groupId:"endpoints",values:[{label:"Polkadot System Chains",value:"psc"},{label:"Kusama System Chains",value:"ksc"},{label:"Test Networks",value:"tn"}],children:[(0,r.jsx)(s.A,{value:"psc",children:(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Network"}),(0,r.jsx)(n.th,{children:"WSS Endpoint"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Asset Hub"}),(0,r.jsx)(n.td,{children:"wss://polkadot-asset-hub-rpc.polkadot.io"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Bridge Hub"}),(0,r.jsx)(n.td,{children:"wss://polkadot-bridge-hub-rpc.polkadot.io"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Collectives"}),(0,r.jsx)(n.td,{children:"wss://polkadot-collectives-rpc.polkadot.io"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"People Chain"}),(0,r.jsx)(n.td,{children:"wss://polkadot-people-rpc.polkadot.io"})]})]})]})}),(0,r.jsx)(s.A,{value:"ksc",children:(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Network"}),(0,r.jsx)(n.th,{children:"WSS Endpoint"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Asset Hub"}),(0,r.jsx)(n.td,{children:"wss://kusama-asset-hub-rpc.polkadot.io"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Bridge Hub"}),(0,r.jsx)(n.td,{children:"wss://kusama-bridge-hub-rpc.polkadot.io"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Collectives"}),(0,r.jsx)(n.td,{children:"wss://kusama-collectives-rpc.polkadot.io"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"People Chain"}),(0,r.jsx)(n.td,{children:"wss://kusama-people-rpc.polkadot.io"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Coretime Chain"}),(0,r.jsx)(n.td,{children:"wss://kusama-coretime-rpc.polkadot.io"})]})]})]})}),(0,r.jsx)(s.A,{value:"tn",children:(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Network"}),(0,r.jsx)(n.th,{children:"WSS Endpoint"})]})}),(0,r.jsx)(n.tbody,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Westend"}),(0,r.jsx)(n.td,{children:"wss://westend-rpc.polkadot.io"})]})})]})})]}),"\n",(0,r.jsx)(n.h4,{id:"example-usage-with-polkadot-js-api",children:"Example usage with Polkadot-JS API"}),"\n",(0,r.jsx)(n.p,{children:"To connect to the Parity node for the Polkadot Asset Hub, use the endpoint in your JavaScript apps\nlike so:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-javascript",metastring:"{5}",children:"// Using the Polkadot Mainnet Endpoint\nconst { ApiPromise, WsProvider } = require('@polkadot/api');\nasync () => {\n // Construct a provider with the endpoint URL\n const provider = new WsProvider('wss://polkadot-asset-hub-rpc.polkadot.io');\n // Create an API instance for Polkadot\n const api = await ApiPromise.create({ provider });\n // ...\n"})}),"\n",(0,r.jsx)(n.h3,{id:"third-party-providers",children:"Third Party Providers"}),"\n",(0,r.jsx)(n.p,{children:"There are a number of third-party providers of RPC infrastructure to the Polkadot and Kusama\ncommunities, commonly providing access to multiple networks and parachains in a single service. They\nprovide additional services such as higher rate limits, potentially more reliable and scalable\nservice, and additional metrics."}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"https://onfinality.io",children:"OnFinality"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"https://dwellir.com",children:"Dwellir"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"https://radiumblock.com/",children:"Radium Block"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"https://getblock.io/",children:"GetBlock"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"https://1rpc.io/",children:"1RPC"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"https://nownodes.io/",children:"NOWNodes"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"https://www.allthatnode.com/",children:"All That Node"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"https://www.rpc.subquery.network/",children:"SubQuery"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"https://drpc.org/",children:"dRPC"})}),"\n"]}),"\n",(0,r.jsx)(n.admonition,{type:"note",children:(0,r.jsxs)(n.p,{children:["The list of third party RPC endpoints above for Polkadot and Kusama is directly fetched from\n",(0,r.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/explorer",children:"Polkadot-JS UI"})]})})]})}function p(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(h,{...e})}):h(e)}},19365:(e,n,t)=>{t.d(n,{A:()=>s});t(96540);var r=t(34164);const a={tabItem:"tabItem_Ymn6"};var i=t(74848);function s(e){var n=e.children,t=e.hidden,s=e.className;return(0,i.jsx)("div",{role:"tabpanel",className:(0,r.A)(a.tabItem,s),hidden:t,children:n})}},11470:(e,n,t)=>{t.d(n,{A:()=>g});var r=t(96540),a=t(34164),i=t(23104),s=t(56347),o=t(205),l=t(57485),d=t(31682),c=t(75376);function u(e){var n,t;return null!=(n=null==(t=r.Children.toArray(e).filter((function(e){return"\n"!==e})).map((function(e){if(!e||(0,r.isValidElement)(e)&&((n=e.props)&&"object"==typeof n&&"value"in n))return e;var n;throw new Error("Docusaurus error: Bad child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:t.filter(Boolean))?n:[]}function h(e){var n=e.values,t=e.children;return(0,r.useMemo)((function(){var e=null!=n?n:function(e){return u(e).map((function(e){var n=e.props;return{value:n.value,label:n.label,attributes:n.attributes,default:n.default}}))}(t);return function(e){var n=(0,d.XI)(e,(function(e,n){return e.value===n.value}));if(n.length>0)throw new Error('Docusaurus error: Duplicate values "'+n.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[n,t])}function p(e){var n=e.value;return e.tabValues.some((function(e){return e.value===n}))}function m(e){var n=e.queryString,t=void 0!==n&&n,a=e.groupId,i=(0,s.W6)(),o=function(e){var n=e.queryString,t=void 0!==n&&n,r=e.groupId;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!r)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=r?r:null}({queryString:t,groupId:a});return[(0,l.aZ)(o),(0,r.useCallback)((function(e){if(o){var n=new URLSearchParams(i.location.search);n.set(o,e),i.replace(Object.assign({},i.location,{search:n.toString()}))}}),[o,i])]}function f(e){var n,t,a,i,s=e.defaultValue,l=e.queryString,d=void 0!==l&&l,u=e.groupId,f=h(e),v=(0,r.useState)((function(){return function(e){var n,t=e.defaultValue,r=e.tabValues;if(0===r.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!p({value:t,tabValues:r}))throw new Error('Docusaurus error: The has a defaultValue "'+t+'" but none of its children has the corresponding value. Available values are: '+r.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return t}var a=null!=(n=r.find((function(e){return e.default})))?n:r[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:s,tabValues:f})})),x=v[0],b=v[1],j=m({queryString:d,groupId:u}),k=j[0],w=j[1],g=(n=function(e){return e?"docusaurus.tab."+e:null}({groupId:u}.groupId),t=(0,c.Dv)(n),a=t[0],i=t[1],[a,(0,r.useCallback)((function(e){n&&i.set(e)}),[n,i])]),y=g[0],P=g[1],A=function(){var e=null!=k?k:y;return p({value:e,tabValues:f})?e:null}();return(0,o.A)((function(){A&&b(A)}),[A]),{selectedValue:x,selectValue:(0,r.useCallback)((function(e){if(!p({value:e,tabValues:f}))throw new Error("Can't select invalid tab value="+e);b(e),w(e),P(e)}),[w,P,f]),tabValues:f}}var v=t(92303);const x={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var b=t(74848);function j(e){var n=e.className,t=e.block,r=e.selectedValue,s=e.selectValue,o=e.tabValues,l=[],d=(0,i.a_)().blockElementScrollPositionUntilNextRender,c=function(e){var n=e.currentTarget,t=l.indexOf(n),a=o[t].value;a!==r&&(d(n),s(a))},u=function(e){var n,t=null;switch(e.key){case"Enter":c(e);break;case"ArrowRight":var r,a=l.indexOf(e.currentTarget)+1;t=null!=(r=l[a])?r:l[0];break;case"ArrowLeft":var i,s=l.indexOf(e.currentTarget)-1;t=null!=(i=l[s])?i:l[l.length-1]}null==(n=t)||n.focus()};return(0,b.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,a.A)("tabs",{"tabs--block":t},n),children:o.map((function(e){var n=e.value,t=e.label,i=e.attributes;return(0,b.jsx)("li",Object.assign({role:"tab",tabIndex:r===n?0:-1,"aria-selected":r===n,ref:function(e){return l.push(e)},onKeyDown:u,onClick:c},i,{className:(0,a.A)("tabs__item",x.tabItem,null==i?void 0:i.className,{"tabs__item--active":r===n}),children:null!=t?t:n}),n)}))})}function k(e){var n=e.lazy,t=e.children,i=e.selectedValue,s=(Array.isArray(t)?t:[t]).filter(Boolean);if(n){var o=s.find((function(e){return e.props.value===i}));return o?(0,r.cloneElement)(o,{className:(0,a.A)("margin-top--md",o.props.className)}):null}return(0,b.jsx)("div",{className:"margin-top--md",children:s.map((function(e,n){return(0,r.cloneElement)(e,{key:n,hidden:e.props.value!==i})}))})}function w(e){var n=f(e);return(0,b.jsxs)("div",{className:(0,a.A)("tabs-container",x.tabList),children:[(0,b.jsx)(j,Object.assign({},n,e)),(0,b.jsx)(k,Object.assign({},n,e))]})}function g(e){var n=(0,v.A)();return(0,b.jsx)(w,Object.assign({},e,{children:u(e.children)}),String(n))}},28453:(e,n,t)=>{t.d(n,{R:()=>s,x:()=>o});var r=t(96540);const a={},i=r.createContext(a);function s(e){const n=r.useContext(i);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:s(e.components),r.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f3bde756.351efb63.js b/assets/js/f3bde756.351efb63.js new file mode 100644 index 000000000000..dd8298190b02 --- /dev/null +++ b/assets/js/f3bde756.351efb63.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9625],{15197:(e,n,o)=>{o.r(n),o.d(n,{assets:()=>r,contentTitle:()=>a,default:()=>l,frontMatter:()=>d,metadata:()=>t,toc:()=>c});const t=JSON.parse('{"id":"maintain/maintain-bootnode","title":"Set up a Boot Node","description":"Steps on setting up a boot node.","source":"@site/../docs/maintain/maintain-bootnode.md","sourceDirName":"maintain","slug":"/maintain-bootnode","permalink":"/docs/maintain-bootnode","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/maintain/maintain-bootnode.md","tags":[],"version":"current","lastUpdatedBy":"Stakeworld","lastUpdatedAt":1683623723000,"frontMatter":{"id":"maintain-bootnode","title":"Set up a Boot Node","sidebar_label":"Set up a Boot Node","description":"Steps on setting up a boot node.","keywords":["bootnode","web socket","remote","connection","secure websocket"],"slug":"../maintain-bootnode"},"sidebar":"docs","previous":{"title":"Set up a Full Node","permalink":"/docs/maintain-sync"},"next":{"title":"Set up a RPC node","permalink":"/docs/maintain-rpc"}}');var s=o(74848),i=o(28453);const d={id:"maintain-bootnode",title:"Set up a Boot Node",sidebar_label:"Set up a Boot Node",description:"Steps on setting up a boot node.",keywords:["bootnode","web socket","remote","connection","secure websocket"],slug:"../maintain-bootnode"},a=void 0,r={},c=[{value:"Accessing the Bootnode",id:"accessing-the-bootnode",level:2},{value:"Network Key",id:"network-key",level:2},{value:"Running the Bootnode",id:"running-the-bootnode",level:2},{value:"Testing Bootnode Connection",id:"testing-bootnode-connection",level:2}];function p(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.admonition,{type:"note",children:(0,s.jsx)(n.p,{children:'When you first start a node, it has to find a way to find other nodes in the network. For that\npurpose, you need "bootnodes". After the first bootnode is found, it can use that node\u2019s connections\nto continue expanding and play its role in the network, like participating as a validator.'})}),"\n",(0,s.jsx)(n.h2,{id:"accessing-the-bootnode",children:"Accessing the Bootnode"}),"\n",(0,s.jsx)(n.p,{children:"The consensus is that bootnodes have to be accessible in three ways:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"p2p"}),": the p2p port, which can be set by ",(0,s.jsx)(n.code,{children:"--listen-addr /ip4/0.0.0.0/tcp/"}),". This port is\nnot automatically set on a non-validator node (for example, an archive RPC node)."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"p2p/ws"}),": the WebSocket version, which can be set by ",(0,s.jsx)(n.code,{children:"--listen-addr /ip4/0.0.0.0/tcp//ws"}),"."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"p2p/wss"}),": the ",(0,s.jsx)(n.em,{children:"secure"})," websocket version. An SSL-secured connection to the p2p/ws port must be\nachieved by a proxy since the node cannot include certificates. It is needed for light clients.\nSee ",(0,s.jsx)(n.a,{href:"/docs/maintain-wss",children:"here"})," for info about setting this up."]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"network-key",children:"Network Key"}),"\n",(0,s.jsxs)(n.p,{children:["Starting a node creates its node key in the ",(0,s.jsx)(n.code,{children:"chains//network/secret_ed25519"})," file. You can\nalso create a node-key by ",(0,s.jsx)(n.code,{children:"polkadot key generate-node-key"})," and use that node-key in the startup\ncommand line."]}),"\n",(0,s.jsx)(n.p,{children:"It is essential you backup the node key, especially if it gets included in the polkadot binary\nbecause it gets hardcoded in the binary and needs to be recompiled to change."}),"\n",(0,s.jsx)(n.h2,{id:"running-the-bootnode",children:"Running the Bootnode"}),"\n",(0,s.jsxs)(n.p,{children:["Say we are running a polkadot node with\n",(0,s.jsx)(n.code,{children:"polkadot --chain polkadot --name dot-bootnode --listen-addr /ip4/0.0.0.0/tcp/30310 --listen-addr /ip4/0.0.0.0/tcp/30311/ws"}),"\nthen we would have the p2p on port 30310 and p2p/ws on port 30311. For the p2p/wss port, we need to\nset up a proxy, a DNS name, and a corresponding certificate. These concepts and example setups are\ndescribed ",(0,s.jsx)(n.a,{href:"https://wiki.polkadot.network/docs/maintain-wss#secure-the-ws-port",children:"here"}),". The following\nexample is for the popular nginx server and enables p2p/wss on port 30312 by proxying the p2p/ws\nport 30311:"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.em,{children:"/etc/nginx/sites-enabled/dot-bootnode"})}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:'server {\n listen 30312 ssl http2 default_server;\n server_name dot-bootnode.stakeworld.io;\n root /var/www/html;\n\n ssl_certificate "";\n\n location / {\n proxy_buffers 16 4k;\n proxy_buffer_size 2k;\n proxy_pass http://localhost:30311;\n proxy_http_version 1.1;\n proxy_set_header Upgrade $http_upgrade;\n proxy_set_header Connection "Upgrade";\n proxy_set_header Host $host;\n }\n\n}\n'})}),"\n",(0,s.jsx)(n.h2,{id:"testing-bootnode-connection",children:"Testing Bootnode Connection"}),"\n",(0,s.jsxs)(n.p,{children:["If we have the above node running with DNS name ",(0,s.jsx)(n.code,{children:"dot-bootnode.stakeworld.io"}),", proxied with a valid\ncertificate and node-id ",(0,s.jsx)(n.code,{children:"12D3KooWAb5MyC1UJiEQJk4Hg4B2Vi3AJdqSUhTGYUqSnEqCFMFg"}),' then the following\ncommands should give you a: "syncing 1 peers".']}),"\n",(0,s.jsx)(n.admonition,{type:"tip",children:(0,s.jsxs)(n.p,{children:["You can add ",(0,s.jsx)(n.code,{children:"-lsub-libp2p=trace"})," on the end to get libp2p trace logging for debugging purposes."]})}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"p2p"}),":"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:'polkadot --chain polkadot --base-path /tmp/node --name "Bootnode testnode" --reserved-only --reserved-nodes "/dns/dot-bootnode.stakeworld.io/tcp/30310/p2p/12D3KooWAb5MyC1UJiEQJk4Hg4B2Vi3AJdqSUhTGYUqSnEqCFMFg" --no-hardware-benchmarks\n'})}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"p2p/ws"}),":"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:'polkadot --chain polkadot --base-path /tmp/node --name "Bootnode testnode" --reserved-only --reserved-nodes "/dns/dot-bootnode.stakeworld.io/tcp/30311/ws/p2p/12D3KooWAb5MyC1UJiEQJk4Hg4B2Vi3AJdqSUhTGYUqSnEqCFMFg" --no-hardware-benchmarks\n'})}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"p2p/wss"}),":"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:'polkadot --chain polkadot --base-path /tmp/node --name "Bootnode testnode" --reserved-only --reserved-nodes "/dns/dot-bootnode.stakeworld.io/tcp/30312/wss/p2p/12D3KooWAb5MyC1UJiEQJk4Hg4B2Vi3AJdqSUhTGYUqSnEqCFMFg" --no-hardware-benchmarks\n'})})]})}function l(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(p,{...e})}):p(e)}},28453:(e,n,o)=>{o.d(n,{R:()=>d,x:()=>a});var t=o(96540);const s={},i=t.createContext(s);function d(e){const n=t.useContext(i);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:d(e.components),t.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f3bde756.71407b20.js b/assets/js/f3bde756.71407b20.js deleted file mode 100644 index 4f0df287eb52..000000000000 --- a/assets/js/f3bde756.71407b20.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9625],{63675:(e,n,o)=>{o.r(n),o.d(n,{assets:()=>r,contentTitle:()=>d,default:()=>l,frontMatter:()=>i,metadata:()=>a,toc:()=>c});var t=o(74848),s=o(28453);const i={id:"maintain-bootnode",title:"Set up a Boot Node",sidebar_label:"Set up a Boot Node",description:"Steps on setting up a boot node.",keywords:["bootnode","web socket","remote","connection","secure websocket"],slug:"../maintain-bootnode"},d=void 0,a={id:"maintain/maintain-bootnode",title:"Set up a Boot Node",description:"Steps on setting up a boot node.",source:"@site/../docs/maintain/maintain-bootnode.md",sourceDirName:"maintain",slug:"/maintain-bootnode",permalink:"/docs/maintain-bootnode",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/maintain/maintain-bootnode.md",tags:[],version:"current",lastUpdatedBy:"Stakeworld",lastUpdatedAt:1683623723e3,frontMatter:{id:"maintain-bootnode",title:"Set up a Boot Node",sidebar_label:"Set up a Boot Node",description:"Steps on setting up a boot node.",keywords:["bootnode","web socket","remote","connection","secure websocket"],slug:"../maintain-bootnode"},sidebar:"docs",previous:{title:"Set up a Full Node",permalink:"/docs/maintain-sync"},next:{title:"Set up a RPC node",permalink:"/docs/maintain-rpc"}},r={},c=[{value:"Accessing the Bootnode",id:"accessing-the-bootnode",level:2},{value:"Network Key",id:"network-key",level:2},{value:"Running the Bootnode",id:"running-the-bootnode",level:2},{value:"Testing Bootnode Connection",id:"testing-bootnode-connection",level:2}];function p(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.admonition,{type:"note",children:(0,t.jsx)(n.p,{children:'When you first start a node, it has to find a way to find other nodes in the network. For that\npurpose, you need "bootnodes". After the first bootnode is found, it can use that node\u2019s connections\nto continue expanding and play its role in the network, like participating as a validator.'})}),"\n",(0,t.jsx)(n.h2,{id:"accessing-the-bootnode",children:"Accessing the Bootnode"}),"\n",(0,t.jsx)(n.p,{children:"The consensus is that bootnodes have to be accessible in three ways:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"p2p"}),": the p2p port, which can be set by ",(0,t.jsx)(n.code,{children:"--listen-addr /ip4/0.0.0.0/tcp/"}),". This port is\nnot automatically set on a non-validator node (for example, an archive RPC node)."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"p2p/ws"}),": the WebSocket version, which can be set by ",(0,t.jsx)(n.code,{children:"--listen-addr /ip4/0.0.0.0/tcp//ws"}),"."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"p2p/wss"}),": the ",(0,t.jsx)(n.em,{children:"secure"})," websocket version. An SSL-secured connection to the p2p/ws port must be\nachieved by a proxy since the node cannot include certificates. It is needed for light clients.\nSee ",(0,t.jsx)(n.a,{href:"/docs/maintain-wss",children:"here"})," for info about setting this up."]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"network-key",children:"Network Key"}),"\n",(0,t.jsxs)(n.p,{children:["Starting a node creates its node key in the ",(0,t.jsx)(n.code,{children:"chains//network/secret_ed25519"})," file. You can\nalso create a node-key by ",(0,t.jsx)(n.code,{children:"polkadot key generate-node-key"})," and use that node-key in the startup\ncommand line."]}),"\n",(0,t.jsx)(n.p,{children:"It is essential you backup the node key, especially if it gets included in the polkadot binary\nbecause it gets hardcoded in the binary and needs to be recompiled to change."}),"\n",(0,t.jsx)(n.h2,{id:"running-the-bootnode",children:"Running the Bootnode"}),"\n",(0,t.jsxs)(n.p,{children:["Say we are running a polkadot node with\n",(0,t.jsx)(n.code,{children:"polkadot --chain polkadot --name dot-bootnode --listen-addr /ip4/0.0.0.0/tcp/30310 --listen-addr /ip4/0.0.0.0/tcp/30311/ws"}),"\nthen we would have the p2p on port 30310 and p2p/ws on port 30311. For the p2p/wss port, we need to\nset up a proxy, a DNS name, and a corresponding certificate. These concepts and example setups are\ndescribed ",(0,t.jsx)(n.a,{href:"https://wiki.polkadot.network/docs/maintain-wss#secure-the-ws-port",children:"here"}),". The following\nexample is for the popular nginx server and enables p2p/wss on port 30312 by proxying the p2p/ws\nport 30311:"]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.em,{children:"/etc/nginx/sites-enabled/dot-bootnode"})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:'server {\n listen 30312 ssl http2 default_server;\n server_name dot-bootnode.stakeworld.io;\n root /var/www/html;\n\n ssl_certificate "";\n\n location / {\n proxy_buffers 16 4k;\n proxy_buffer_size 2k;\n proxy_pass http://localhost:30311;\n proxy_http_version 1.1;\n proxy_set_header Upgrade $http_upgrade;\n proxy_set_header Connection "Upgrade";\n proxy_set_header Host $host;\n }\n\n}\n'})}),"\n",(0,t.jsx)(n.h2,{id:"testing-bootnode-connection",children:"Testing Bootnode Connection"}),"\n",(0,t.jsxs)(n.p,{children:["If we have the above node running with DNS name ",(0,t.jsx)(n.code,{children:"dot-bootnode.stakeworld.io"}),", proxied with a valid\ncertificate and node-id ",(0,t.jsx)(n.code,{children:"12D3KooWAb5MyC1UJiEQJk4Hg4B2Vi3AJdqSUhTGYUqSnEqCFMFg"}),' then the following\ncommands should give you a: "syncing 1 peers".']}),"\n",(0,t.jsx)(n.admonition,{type:"tip",children:(0,t.jsxs)(n.p,{children:["You can add ",(0,t.jsx)(n.code,{children:"-lsub-libp2p=trace"})," on the end to get libp2p trace logging for debugging purposes."]})}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"p2p"}),":"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'polkadot --chain polkadot --base-path /tmp/node --name "Bootnode testnode" --reserved-only --reserved-nodes "/dns/dot-bootnode.stakeworld.io/tcp/30310/p2p/12D3KooWAb5MyC1UJiEQJk4Hg4B2Vi3AJdqSUhTGYUqSnEqCFMFg" --no-hardware-benchmarks\n'})}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"p2p/ws"}),":"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'polkadot --chain polkadot --base-path /tmp/node --name "Bootnode testnode" --reserved-only --reserved-nodes "/dns/dot-bootnode.stakeworld.io/tcp/30311/ws/p2p/12D3KooWAb5MyC1UJiEQJk4Hg4B2Vi3AJdqSUhTGYUqSnEqCFMFg" --no-hardware-benchmarks\n'})}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"p2p/wss"}),":"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'polkadot --chain polkadot --base-path /tmp/node --name "Bootnode testnode" --reserved-only --reserved-nodes "/dns/dot-bootnode.stakeworld.io/tcp/30312/wss/p2p/12D3KooWAb5MyC1UJiEQJk4Hg4B2Vi3AJdqSUhTGYUqSnEqCFMFg" --no-hardware-benchmarks\n'})})]})}function l(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(p,{...e})}):p(e)}},28453:(e,n,o)=>{o.d(n,{R:()=>d,x:()=>a});var t=o(96540);const s={},i=t.createContext(s);function d(e){const n=t.useContext(i);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:d(e.components),t.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f4130007.35cae251.js b/assets/js/f4130007.35cae251.js deleted file mode 100644 index edc82404899f..000000000000 --- a/assets/js/f4130007.35cae251.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8582],{25151:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>i,contentTitle:()=>r,default:()=>c,frontMatter:()=>a,metadata:()=>o,toc:()=>d});var n=s(74848),l=s(28453);const a={id:"wallets-and-extensions",title:"Wallets and Extensions",sidebar_label:"Wallets and Extensions",description:"An Overview of Wallets and Browser Extensions in the Polkadot Ecosystem.",keywords:["wallets","account","signer","supported wallets","balance","token"],slug:"../wallets-and-extensions"},r=void 0,o={id:"general/wallets-and-extensions",title:"Wallets and Extensions",description:"An Overview of Wallets and Browser Extensions in the Polkadot Ecosystem.",source:"@site/../docs/general/wallets-and-extensions.md",sourceDirName:"general",slug:"/wallets-and-extensions",permalink:"/docs/wallets-and-extensions",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/wallets-and-extensions.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1727178265e3,frontMatter:{id:"wallets-and-extensions",title:"Wallets and Extensions",sidebar_label:"Wallets and Extensions",description:"An Overview of Wallets and Browser Extensions in the Polkadot Ecosystem.",keywords:["wallets","account","signer","supported wallets","balance","token"],slug:"../wallets-and-extensions"},sidebar:"docs",previous:{title:"Wallets",permalink:"/docs/wallets-index"},next:{title:"Ledger",permalink:"/docs/ledger"}},i={},d=[{value:"Overview",id:"overview",level:2},{value:"Browser Extensions",id:"browser-extensions",level:3},{value:"Mobile Wallets",id:"mobile-wallets",level:3},{value:"Web Wallets",id:"web-wallets",level:3},{value:"Telegram Wallets",id:"telegram-wallets",level:3},{value:"Enkrypt",id:"enkrypt",level:2},{value:"Fearless Wallet",id:"fearless-wallet",level:2},{value:"Nova Wallet",id:"nova-wallet",level:2},{value:"PolkaGate",id:"polkagate",level:2},{value:"Polkawallet",id:"polkawallet",level:2},{value:"SubWallet",id:"subwallet",level:2},{value:"Talisman",id:"talisman",level:2},{value:"Telenova",id:"telenova",level:2}];function h(e){const t={a:"a",admonition:"admonition",h2:"h2",h3:"h3",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,l.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.admonition,{type:"caution",children:(0,n.jsx)(t.p,{children:"Using your due diligence in researching and using the wallets listed below would be best. For any\nissues related to these wallet, reach out to their support teams directly."})}),"\n",(0,n.jsx)(t.admonition,{type:"info",children:(0,n.jsxs)(t.p,{children:["Explore Polkadot with a secure and user-friendly wallets listed on the\n",(0,n.jsx)(t.a,{href:"https://www.polkadot.network/ecosystem/wallets/",children:"Polkadot website"}),"."]})}),"\n",(0,n.jsx)(t.p,{children:"If you are new to blockchain technology, generally a typical blockchain network account is a\npublic-private key pair. Access to a private key gives full access to all the allowed transactions\non that blockchain account. It is essential to keep the private key secure."}),"\n",(0,n.jsx)(t.p,{children:"Typically, the account keys are either stored and accessed through a browser extension or a\nsmartphone app (which are considered as a hot wallets as they are online), or an air-gapped device\nor a hardware wallet (which are considered as cold wallets as they are offline)."}),"\n",(0,n.jsx)(t.admonition,{title:"Not your keys, not your tokens!",type:"tip",children:(0,n.jsxs)(t.p,{children:["With ",(0,n.jsx)(t.strong,{children:"custodial wallets"})," (like accounts in centralized exchanges), another party controls your\nprivate keys. Private keys are used to access funds in your account, so you trust the exchange that\nyour key will always be given to you whenever you need it. With ",(0,n.jsx)(t.strong,{children:"non-custodial wallets"}),", only you\ncan access your account's private key."]})}),"\n",(0,n.jsx)(t.p,{children:"To realize Polkadot's multichain vision, it is important to have non-custodial wallets that make it\nconvenient to interact with multiple blockchains within the Polkadot ecosystem. Below there is a\nlist of all non-custodial treasury-funded wallets developed by the community."}),"\n",(0,n.jsx)(t.h2,{id:"overview",children:"Overview"}),"\n",(0,n.jsx)(t.h3,{id:"browser-extensions",children:"Browser Extensions"}),"\n",(0,n.jsx)(t.p,{children:"At a bare minimum, browser extension wallets act as key storage and management solution, allowing\nyou to use your accounts with apps in the Web3 space. The wallets listed below offer functionality\nbeyond that, allowing the featured actions to be performed directly through the extension. Some of\nthem also allow interaction with air-gapped wallets and hardware devices."}),"\n",(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Wallet"}),(0,n.jsx)(t.th,{children:"Browsers"}),(0,n.jsx)(t.th,{children:"Staking and Nomination Pools"}),(0,n.jsx)(t.th,{children:"NFTs"}),(0,n.jsx)(t.th,{children:"Crowdloans"}),(0,n.jsx)(t.th,{children:"Ledger support"}),(0,n.jsx)(t.th,{children:"Governance"}),(0,n.jsx)(t.th,{children:"Other features"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.a,{href:"https://www.enkrypt.com/?mtm_campaign=Polkadot%20Wiki%20-%20Supported%20Wallets",children:"Enkrypt"})}),(0,n.jsx)(t.td,{children:"Brave, Chrome, Edge, Firefox, Opera, Safari"}),(0,n.jsx)(t.td,{children:"No, No"}),(0,n.jsx)(t.td,{children:(0,n.jsx)(t.strong,{children:"Yes"})}),(0,n.jsx)(t.td,{children:"No"}),(0,n.jsx)(t.td,{children:(0,n.jsx)(t.strong,{children:"Yes"})}),(0,n.jsx)(t.td,{children:"No"}),(0,n.jsx)(t.td,{children:(0,n.jsx)(t.a,{href:"#enkrypt",children:"Enkrypt Features"})})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.a,{href:"https://polkagate.xyz/",children:"PolkaGate"})}),(0,n.jsxs)(t.td,{children:[(0,n.jsx)(t.a,{href:"https://chrome.google.com/webstore/detail/polkagate-the-gateway-to/ginchbkmljhldofnbjabmeophlhdldgp",children:"Brave"}),", ",(0,n.jsx)(t.a,{href:"https://chrome.google.com/webstore/detail/polkagate-the-gateway-to/ginchbkmljhldofnbjabmeophlhdldgp",children:"Chrome"}),", ",(0,n.jsx)(t.a,{href:"https://addons.mozilla.org/en-US/firefox/addon/polkagate",children:"Firefox"}),", ",(0,n.jsx)(t.a,{href:"https://chrome.google.com/webstore/detail/polkagate-the-gateway-to/ginchbkmljhldofnbjabmeophlhdldgp",children:"Edge"})]}),(0,n.jsxs)(t.td,{children:[(0,n.jsx)(t.strong,{children:"Yes"}),", ",(0,n.jsx)(t.strong,{children:"Yes"})]}),(0,n.jsx)(t.td,{children:"No"}),(0,n.jsx)(t.td,{children:(0,n.jsx)(t.strong,{children:"Yes"})}),(0,n.jsx)(t.td,{children:(0,n.jsx)(t.strong,{children:"Yes"})}),(0,n.jsx)(t.td,{children:(0,n.jsx)(t.strong,{children:"Yes"})}),(0,n.jsx)(t.td,{children:(0,n.jsx)(t.a,{href:"#polkagate",children:"PolkaGate features"})})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.a,{href:"https://subwallet.app/",children:"SubWallet"})}),(0,n.jsxs)(t.td,{children:[(0,n.jsx)(t.a,{href:"https://chrome.google.com/webstore/detail/subwallet-polkadot-extens/onhogfjeacnfoofkfgppdlbmlmnplgbn",children:"Brave"}),", ",(0,n.jsx)(t.a,{href:"https://chrome.google.com/webstore/detail/subwallet-polkadot-extens/onhogfjeacnfoofkfgppdlbmlmnplgbn",children:"Chrome"}),", ",(0,n.jsx)(t.a,{href:"https://chrome.google.com/webstore/detail/subwallet-polkadot-extens/onhogfjeacnfoofkfgppdlbmlmnplgbn",children:"Edge"}),", ",(0,n.jsx)(t.a,{href:"https://addons.mozilla.org/en-US/firefox/addon/subwallet/",children:"Firefox"})]}),(0,n.jsxs)(t.td,{children:[(0,n.jsx)(t.strong,{children:"Yes"}),", ",(0,n.jsx)(t.strong,{children:"Yes"})]}),(0,n.jsx)(t.td,{children:(0,n.jsx)(t.strong,{children:"Yes"})}),(0,n.jsx)(t.td,{children:(0,n.jsx)(t.strong,{children:"Yes"})}),(0,n.jsx)(t.td,{children:(0,n.jsx)(t.strong,{children:"Yes"})}),(0,n.jsx)(t.td,{children:"No"}),(0,n.jsx)(t.td,{children:(0,n.jsx)(t.a,{href:"#subwallet",children:"SubWallet features"})})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.a,{href:"https://www.talisman.xyz/",children:"Talisman"})}),(0,n.jsx)(t.td,{children:"Brave, Chrome, Edge, Firefox"}),(0,n.jsxs)(t.td,{children:[(0,n.jsx)(t.strong,{children:"Yes"}),", ",(0,n.jsx)(t.strong,{children:"Yes"})]}),(0,n.jsx)(t.td,{children:(0,n.jsx)(t.strong,{children:"Yes"})}),(0,n.jsx)(t.td,{children:(0,n.jsx)(t.strong,{children:"Yes"})}),(0,n.jsx)(t.td,{children:(0,n.jsx)(t.strong,{children:"Yes"})}),(0,n.jsx)(t.td,{children:"No"}),(0,n.jsx)(t.td,{children:(0,n.jsx)(t.a,{href:"#talisman",children:"Talisman features"})})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.a,{href:"https://fearlesswallet.io/",children:"Fearless Wallet"})}),(0,n.jsxs)(t.td,{children:[(0,n.jsx)(t.a,{href:"https://chrome.google.com/webstore/detail/fearless-wallet/nhlnehondigmgckngjomcpcefcdplmgc",children:"Brave"}),", ",(0,n.jsx)(t.a,{href:"https://chrome.google.com/webstore/detail/fearless-wallet/nhlnehondigmgckngjomcpcefcdplmgc",children:"Chrome"})]}),(0,n.jsx)(t.td,{children:"No, No"}),(0,n.jsx)(t.td,{children:(0,n.jsx)(t.strong,{children:"Yes"})}),(0,n.jsx)(t.td,{children:"No"}),(0,n.jsx)(t.td,{children:"No"}),(0,n.jsx)(t.td,{children:"No"}),(0,n.jsx)(t.td,{children:(0,n.jsx)(t.a,{href:"#fearless-wallet",children:"Fearless Wallet Features"})})]})]})]}),"\n",(0,n.jsx)(t.admonition,{title:"Ledger support only for chromium-based browsers",type:"info",children:(0,n.jsx)(t.p,{children:"Currently, all browser extensions support Ledger devices only on chromium-based browsers (i.e.\nChrome, Brave, Edge, Opera)."})}),"\n",(0,n.jsx)(t.h3,{id:"mobile-wallets",children:"Mobile Wallets"}),"\n",(0,n.jsx)(t.p,{children:"Mobile wallets are fully packaged apps that allow all the featured actions, as well as the storage\nand management of your accounts, through the mobile app. Unlike browser extensions, mobile wallets\nusually can\u2019t connect to third-party web apps. Some mobile wallets provide support for hardware\nwallets through Bluetooth connectivity."}),"\n",(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Wallet"}),(0,n.jsx)(t.th,{children:"Platforms"}),(0,n.jsx)(t.th,{children:"Staking and Nomination Pools"}),(0,n.jsx)(t.th,{children:"NFTs"}),(0,n.jsx)(t.th,{children:"Crowdloans"}),(0,n.jsx)(t.th,{children:"Ledger support"}),(0,n.jsx)(t.th,{children:"Governance"}),(0,n.jsx)(t.th,{children:"Proxy Accounts"}),(0,n.jsx)(t.th,{children:"Other features"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.a,{href:"https://fearlesswallet.io/",children:"Fearless Wallet"})}),(0,n.jsx)(t.td,{children:"iOS, Android"}),(0,n.jsxs)(t.td,{children:[(0,n.jsx)(t.strong,{children:"Yes"}),", ",(0,n.jsx)(t.strong,{children:"Yes"})]}),(0,n.jsx)(t.td,{children:"No"}),(0,n.jsx)(t.td,{children:(0,n.jsx)(t.strong,{children:"Yes"})}),(0,n.jsx)(t.td,{children:"No"}),(0,n.jsx)(t.td,{children:"No"}),(0,n.jsx)(t.td,{children:"No"}),(0,n.jsx)(t.td,{children:(0,n.jsx)(t.a,{href:"#fearless-wallet",children:"Fearless Wallet Features"})})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsxs)(t.td,{children:[(0,n.jsx)(t.a,{href:"https://novawallet.io/",children:"Nova Wallet"}),"*"]}),(0,n.jsx)(t.td,{children:"iOS, Android"}),(0,n.jsxs)(t.td,{children:[(0,n.jsx)(t.strong,{children:"Yes"}),", ",(0,n.jsx)(t.strong,{children:"Yes"})]}),(0,n.jsx)(t.td,{children:(0,n.jsx)(t.strong,{children:"Yes"})}),(0,n.jsx)(t.td,{children:(0,n.jsx)(t.strong,{children:"Yes"})}),(0,n.jsx)(t.td,{children:(0,n.jsx)(t.strong,{children:"Yes"})}),(0,n.jsx)(t.td,{children:(0,n.jsx)(t.strong,{children:"Yes"})}),(0,n.jsx)(t.td,{children:(0,n.jsx)(t.strong,{children:"Yes"})}),(0,n.jsx)(t.td,{children:(0,n.jsx)(t.a,{href:"#nova-wallet",children:"Nova Wallet features"})})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.a,{href:"https://polkawallet.io/",children:"Polkawallet"})}),(0,n.jsx)(t.td,{children:"iOS, Android"}),(0,n.jsxs)(t.td,{children:[(0,n.jsx)(t.strong,{children:"Yes"}),", ",(0,n.jsx)(t.strong,{children:"Yes"})]}),(0,n.jsx)(t.td,{children:"No"}),(0,n.jsx)(t.td,{children:(0,n.jsx)(t.strong,{children:"Yes"})}),(0,n.jsx)(t.td,{children:"No"}),(0,n.jsx)(t.td,{children:(0,n.jsx)(t.strong,{children:"Yes"})}),(0,n.jsx)(t.td,{children:"No"}),(0,n.jsx)(t.td,{children:(0,n.jsx)(t.a,{href:"#polkawallet",children:"Polkawallet features"})})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.a,{href:"https://subwallet.app/",children:"SubWallet"})}),(0,n.jsxs)(t.td,{children:[(0,n.jsx)(t.a,{href:"https://apps.apple.com/us/app/subwallet-polkadot-wallet/id1633050285",children:"iOS"}),", ",(0,n.jsx)(t.a,{href:"bit.ly/3DE2Dlg",children:"Android"})]}),(0,n.jsxs)(t.td,{children:[(0,n.jsx)(t.strong,{children:"Yes"}),", ",(0,n.jsx)(t.strong,{children:"Yes"})]}),(0,n.jsx)(t.td,{children:(0,n.jsx)(t.strong,{children:"Yes"})}),(0,n.jsx)(t.td,{children:(0,n.jsx)(t.strong,{children:"Yes"})}),(0,n.jsx)(t.td,{children:"No"}),(0,n.jsx)(t.td,{children:"No"}),(0,n.jsx)(t.td,{children:"No"}),(0,n.jsx)(t.td,{children:(0,n.jsx)(t.a,{href:"#subwallet",children:"SubWallet features"})})]})]})]}),"\n",(0,n.jsx)(t.admonition,{title:"*Note about Nova wallet",type:"caution",children:(0,n.jsxs)(t.p,{children:["There's ",(0,n.jsx)(t.strong,{children:"another"})," Nova wallet that is ",(0,n.jsx)(t.strong,{children:"unrelated"})," to the Polkadot ecosystem. Users are advised\nto ensure that they use the correct Nova wallet by downloading the app from their official website:\n",(0,n.jsx)(t.a,{href:"https://novawallet.io/",children:"https://novawallet.io/"}),". Before creating or restoring accounts, it is wise\nto double-check the wallet website URLs through official channels (most projects have it listed on\ntheir official social media handles)."]})}),"\n",(0,n.jsx)(t.h3,{id:"web-wallets",children:"Web Wallets"}),"\n",(0,n.jsx)(t.p,{children:"Web Wallets are the all-in-one solution to accessing the Web3 space, allowing you to sign\ntransactions on the web without having to download and install any browser extension and mobile app.\nWith all of the features of mobile wallets, you can also connect to and interact with decentralized\nweb apps."}),"\n",(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Wallet"}),(0,n.jsx)(t.th,{children:"Platforms"}),(0,n.jsx)(t.th,{children:"Staking and Nomination Pools"}),(0,n.jsx)(t.th,{children:"Liquid Staking"}),(0,n.jsx)(t.th,{children:"NFTs"}),(0,n.jsx)(t.th,{children:"Crowdloans"}),(0,n.jsx)(t.th,{children:"Ledger support"}),(0,n.jsx)(t.th,{children:"Governance"}),(0,n.jsx)(t.th,{children:"Other features"})]})}),(0,n.jsx)(t.tbody,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.a,{href:"https://web.subwallet.app/",children:"SubWallet"})}),(0,n.jsx)(t.td,{children:"Any web browsers"}),(0,n.jsx)(t.td,{children:(0,n.jsx)(t.strong,{children:"Yes, Yes"})}),(0,n.jsx)(t.td,{children:(0,n.jsx)(t.strong,{children:"Yes"})}),(0,n.jsx)(t.td,{children:(0,n.jsx)(t.strong,{children:"Yes"})}),(0,n.jsx)(t.td,{children:(0,n.jsx)(t.strong,{children:"Yes"})}),(0,n.jsx)(t.td,{children:(0,n.jsx)(t.strong,{children:"Yes"})}),(0,n.jsx)(t.td,{children:"No"}),(0,n.jsx)(t.td,{children:(0,n.jsx)(t.a,{href:"#subwallet",children:"SubWallet features"})})]})})]}),"\n",(0,n.jsx)(t.h3,{id:"telegram-wallets",children:"Telegram Wallets"}),"\n",(0,n.jsx)(t.p,{children:"Telegram Wallets are applications running ontop of the Telegram Messenger platform. These wallets\ntypically provide a streamlined user experience and provide an easy way for new users to get started\nin the Polkadot ecosystem without having to download any new applications."}),"\n",(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Wallet"}),(0,n.jsx)(t.th,{children:"Platforms"}),(0,n.jsx)(t.th,{children:"Self-Custodial"}),(0,n.jsx)(t.th,{children:"Send Tokens to Telegram Username"}),(0,n.jsx)(t.th,{children:"Send Tokens to any Address"}),(0,n.jsx)(t.th,{children:"Notifications"}),(0,n.jsx)(t.th,{children:"Other features"})]})}),(0,n.jsx)(t.tbody,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.a,{href:"https://t.me/telenova_app_bot",children:"Telenova"})}),(0,n.jsx)(t.td,{children:"Mobile, Desktop, Web"}),(0,n.jsx)(t.td,{children:(0,n.jsx)(t.strong,{children:"Yes"})}),(0,n.jsx)(t.td,{children:(0,n.jsx)(t.strong,{children:"Yes"})}),(0,n.jsx)(t.td,{children:(0,n.jsx)(t.strong,{children:"Yes"})}),(0,n.jsx)(t.td,{children:(0,n.jsx)(t.strong,{children:"Yes"})}),(0,n.jsx)(t.td,{children:(0,n.jsx)(t.a,{href:"https://medium.com/novasama-technologies/meet-telenova-your-newbie-friendly-polkadot-wallet-built-into-telegram-5d9e9570d334",children:"Telenova Features"})})]})})]}),"\n",(0,n.jsx)(t.h2,{id:"enkrypt",children:"Enkrypt"}),"\n",(0,n.jsx)(t.p,{children:"A multichain crypto wallet - Bitcoin, Ethereum, Polkadot, Kusama and a few parachains.\nNon-custodial, private, hardware wallet support (Ledger and Trezor). Private and open source. Hold,\nsend, and receive tokens and NFTs. Swap tokens and bridge assets between chains. Manage multiple\naccounts on multiple networks. Connect to web3 apps. Recipient of a development grant from Web3\nFoundation."}),"\n",(0,n.jsx)(t.h2,{id:"fearless-wallet",children:"Fearless Wallet"}),"\n",(0,n.jsxs)(t.p,{children:["The Fearless DeFi Wallet for the Future. Simply, intuitively, and fearlessly interact with\n",(0,n.jsx)(t.a,{href:"/docs/web3-and-polkadot",children:"Web3"}),". Currently supports Staking, Crowdloans, Parachain Accounts,\nNomination Pools Native Staking, dApp Signer on desktop through your mobile phone (experimental),\nChromium-based browser extension. Safety features such as Scam Address Warning and Network Failure\nWarnings help fearlessly navigate ",(0,n.jsx)(t.a,{href:"/docs/web3-and-polkadot",children:"web3"}),". Formerly funded and supported by\nKusama Treasury [",(0,n.jsx)(t.a,{href:"https://kusama.polkassembly.io/treasury/23",children:"1"}),",\n",(0,n.jsx)(t.a,{href:"https://kusama.polkassembly.io/treasury/34",children:"2"}),", ",(0,n.jsx)(t.a,{href:"https://kusama.polkassembly.io/treasury/74",children:"3"}),",\n",(0,n.jsx)(t.a,{href:"https://kusama.polkassembly.io/treasury/102",children:"4"}),", ",(0,n.jsx)(t.a,{href:"https://kusama.polkassembly.io/treasury/178",children:"5"}),"],\nand the SORA community [",(0,n.jsx)(t.a,{href:"https://sora.subscan.io/referenda/193?tab=votes",children:"1"}),"], developed by\nSORAMITSU. Stay Fearless!"]}),"\n",(0,n.jsx)(t.h2,{id:"nova-wallet",children:"Nova Wallet"}),"\n",(0,n.jsxs)(t.p,{children:["A user-friendly wallet for the Polkadot & Kusama ecosystems, providing a smooth web3 experience on\nboth iOS and Android. Nova Wallet supports ",(0,n.jsx)(t.a,{href:"/docs/learn-polkadot-opengov",children:"Polkadot OpenGov"}),"\n(including agile delegations), Governance v1 (including support for parachain governance), Staking,\nNFT management, XCM Transfers, Parity Signer & Ledger Support, DApp Support with Polkadot JS and\nMetamask/EVM Integration and crowdloans. Nova Wallet received funding from Kusama Treasury\n[",(0,n.jsx)(t.a,{href:"https://kusama.polkassembly.io/treasury/122",children:"1"}),",\n",(0,n.jsx)(t.a,{href:"https://kusama.polkassembly.io/treasury/158",children:"2"}),"], as well as funding from the Polkadot Treasury\n[",(0,n.jsx)(t.a,{href:"https://polkadot.polkassembly.io/motion/314",children:"1"}),"]."]}),"\n",(0,n.jsx)(t.h2,{id:"polkagate",children:"PolkaGate"}),"\n",(0,n.jsxs)(t.p,{children:["PolkaGate extension is a user-friendly and feature-rich wallet/extension, supported by the Kusama\nTreasury [",(0,n.jsx)(t.a,{href:"https://kusama.polkassembly.io/treasury/205",children:"1"}),",\n",(0,n.jsx)(t.a,{href:"https://kusama.polkassembly.io/referenda/124",children:"2"}),"]. It provides a diverse range of functionalities\nto enhance your experience, such as proxy management, open governance, pool staking management, spam\naddress warning, support for address-only accounts, crowdloans, account export/import/derivation,\nledger support, parachain accounts, phishing website detection, QR account import, solo staking,\nremote node selection, fund transfers, balance viewing in both cryptocurrency and USD, transaction\nhistory viewing, and the ability to generate QR codes for addresses."]}),"\n",(0,n.jsx)(t.h2,{id:"polkawallet",children:"Polkawallet"}),"\n",(0,n.jsxs)(t.p,{children:["Polkawallet provides cross-chain asset one-stop management, convenient staking, governance, and\nmultiple DeFi services; the private key is self-owned. Polkawallet received funding from Kusama\nTreasury [",(0,n.jsx)(t.a,{href:"https://kusama.polkassembly.io/treasury/32",children:"1"}),",\n",(0,n.jsx)(t.a,{href:"https://kusama.polkassembly.io/treasury/41",children:"2"}),"]."]}),"\n",(0,n.jsx)(t.h2,{id:"subwallet",children:"SubWallet"}),"\n",(0,n.jsxs)(t.p,{children:["A non-custodial Polkadot, Substrate & Ethereum wallet. Track, send, receive, and monitor multi-chain\nassets on 150+ networks. Import account with seed phrase, private key, QR code, and JSON file.\nImport token & NFT, attach read-only account. XCM Transfer, NFT Management, Parity Signer & Ledger\nsupport, light clients support, EVM DApp support, MetaMask compatibility, custom endpoints, fiat\non-ramp, phishing detection, transaction history. SubWallet received funding from Polkadot Treasury\n[",(0,n.jsx)(t.a,{href:"https://polkadot.polkassembly.io/treasury/138",children:"1"}),",\n",(0,n.jsx)(t.a,{href:"https://polkadot.polkassembly.io/treasury/162",children:"2"}),",\n",(0,n.jsx)(t.a,{href:"https://polkadot.polkassembly.io/treasury/218",children:"3"}),",\n",(0,n.jsx)(t.a,{href:"https://polkadot.polkassembly.io/treasury/272",children:"4"}),"]."]}),"\n",(0,n.jsx)(t.h2,{id:"talisman",children:"Talisman"}),"\n",(0,n.jsxs)(t.p,{children:["A better way to explore Web3. Keep your assets safe, manage your portfolio and explore Polkadot and\nEthereum apps with Talisman. Interact with Web3 apps, store your favourite crypto assets and manage\nyour accounts on over 150+ Substrate and EVM networks. NFT Management, ledger Support, fiat On-ramp,\nportfolio tracking. Talisman received funding from Polkadot Treasury\n[",(0,n.jsx)(t.a,{href:"https://polkadot.polkassembly.io/treasury/148",children:"1"}),"]."]}),"\n",(0,n.jsx)(t.h2,{id:"telenova",children:"Telenova"}),"\n",(0,n.jsxs)(t.p,{children:[(0,n.jsx)(t.a,{href:"https://t.me/telenova_app_bot",children:"Telenova"})," is a brand new self-custodial Polkadot wallet that runs\ndirectly in Telegram providing you with a simple and clean user interface to manage your DOT & KSM\ntokens. Send crypto to anyone in Telegram, Buy/Sell DOT and KSM tokens, get notified about your\nbalance changes, view your total balance in multiple fiat currencies, secured by your personal\nTelegram cloud and manual backups."]}),"\n",(0,n.jsxs)(t.p,{children:["Use ",(0,n.jsx)(t.a,{href:"https://t.me/telenova_app_bot",children:"Telenova"})," on any of your devices \u2014 be it mobile or desktop \u2014\nwithin the same Telegram account, and start exploring the Polkadot ecosystem today!"]})]})}function c(e={}){const{wrapper:t}={...(0,l.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(h,{...e})}):h(e)}},28453:(e,t,s)=>{s.d(t,{R:()=>r,x:()=>o});var n=s(96540);const l={},a=n.createContext(l);function r(e){const t=n.useContext(a);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(l):e.components||l:r(e.components),n.createElement(a.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f4130007.e7607686.js b/assets/js/f4130007.e7607686.js new file mode 100644 index 000000000000..3dee61ed0781 --- /dev/null +++ b/assets/js/f4130007.e7607686.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8582],{99149:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>i,contentTitle:()=>o,default:()=>c,frontMatter:()=>r,metadata:()=>n,toc:()=>d});const n=JSON.parse('{"id":"general/wallets-and-extensions","title":"Wallets and Extensions","description":"An Overview of Wallets and Browser Extensions in the Polkadot Ecosystem.","source":"@site/../docs/general/wallets-and-extensions.md","sourceDirName":"general","slug":"/wallets-and-extensions","permalink":"/docs/wallets-and-extensions","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/wallets-and-extensions.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1727178265000,"frontMatter":{"id":"wallets-and-extensions","title":"Wallets and Extensions","sidebar_label":"Wallets and Extensions","description":"An Overview of Wallets and Browser Extensions in the Polkadot Ecosystem.","keywords":["wallets","account","signer","supported wallets","balance","token"],"slug":"../wallets-and-extensions"},"sidebar":"docs","previous":{"title":"Wallets","permalink":"/docs/wallets-index"},"next":{"title":"Ledger","permalink":"/docs/ledger"}}');var l=s(74848),a=s(28453);const r={id:"wallets-and-extensions",title:"Wallets and Extensions",sidebar_label:"Wallets and Extensions",description:"An Overview of Wallets and Browser Extensions in the Polkadot Ecosystem.",keywords:["wallets","account","signer","supported wallets","balance","token"],slug:"../wallets-and-extensions"},o=void 0,i={},d=[{value:"Overview",id:"overview",level:2},{value:"Browser Extensions",id:"browser-extensions",level:3},{value:"Mobile Wallets",id:"mobile-wallets",level:3},{value:"Web Wallets",id:"web-wallets",level:3},{value:"Telegram Wallets",id:"telegram-wallets",level:3},{value:"Enkrypt",id:"enkrypt",level:2},{value:"Fearless Wallet",id:"fearless-wallet",level:2},{value:"Nova Wallet",id:"nova-wallet",level:2},{value:"PolkaGate",id:"polkagate",level:2},{value:"Polkawallet",id:"polkawallet",level:2},{value:"SubWallet",id:"subwallet",level:2},{value:"Talisman",id:"talisman",level:2},{value:"Telenova",id:"telenova",level:2}];function h(e){const t={a:"a",admonition:"admonition",h2:"h2",h3:"h3",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,a.R)(),...e.components};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(t.admonition,{type:"caution",children:(0,l.jsx)(t.p,{children:"Using your due diligence in researching and using the wallets listed below would be best. For any\nissues related to these wallet, reach out to their support teams directly."})}),"\n",(0,l.jsx)(t.admonition,{type:"info",children:(0,l.jsxs)(t.p,{children:["Explore Polkadot with a secure and user-friendly wallets listed on the\n",(0,l.jsx)(t.a,{href:"https://www.polkadot.network/ecosystem/wallets/",children:"Polkadot website"}),"."]})}),"\n",(0,l.jsx)(t.p,{children:"If you are new to blockchain technology, generally a typical blockchain network account is a\npublic-private key pair. Access to a private key gives full access to all the allowed transactions\non that blockchain account. It is essential to keep the private key secure."}),"\n",(0,l.jsx)(t.p,{children:"Typically, the account keys are either stored and accessed through a browser extension or a\nsmartphone app (which are considered as a hot wallets as they are online), or an air-gapped device\nor a hardware wallet (which are considered as cold wallets as they are offline)."}),"\n",(0,l.jsx)(t.admonition,{title:"Not your keys, not your tokens!",type:"tip",children:(0,l.jsxs)(t.p,{children:["With ",(0,l.jsx)(t.strong,{children:"custodial wallets"})," (like accounts in centralized exchanges), another party controls your\nprivate keys. Private keys are used to access funds in your account, so you trust the exchange that\nyour key will always be given to you whenever you need it. With ",(0,l.jsx)(t.strong,{children:"non-custodial wallets"}),", only you\ncan access your account's private key."]})}),"\n",(0,l.jsx)(t.p,{children:"To realize Polkadot's multichain vision, it is important to have non-custodial wallets that make it\nconvenient to interact with multiple blockchains within the Polkadot ecosystem. Below there is a\nlist of all non-custodial treasury-funded wallets developed by the community."}),"\n",(0,l.jsx)(t.h2,{id:"overview",children:"Overview"}),"\n",(0,l.jsx)(t.h3,{id:"browser-extensions",children:"Browser Extensions"}),"\n",(0,l.jsx)(t.p,{children:"At a bare minimum, browser extension wallets act as key storage and management solution, allowing\nyou to use your accounts with apps in the Web3 space. The wallets listed below offer functionality\nbeyond that, allowing the featured actions to be performed directly through the extension. Some of\nthem also allow interaction with air-gapped wallets and hardware devices."}),"\n",(0,l.jsxs)(t.table,{children:[(0,l.jsx)(t.thead,{children:(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.th,{children:"Wallet"}),(0,l.jsx)(t.th,{children:"Browsers"}),(0,l.jsx)(t.th,{children:"Staking and Nomination Pools"}),(0,l.jsx)(t.th,{children:"NFTs"}),(0,l.jsx)(t.th,{children:"Crowdloans"}),(0,l.jsx)(t.th,{children:"Ledger support"}),(0,l.jsx)(t.th,{children:"Governance"}),(0,l.jsx)(t.th,{children:"Other features"})]})}),(0,l.jsxs)(t.tbody,{children:[(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{children:(0,l.jsx)(t.a,{href:"https://www.enkrypt.com/?mtm_campaign=Polkadot%20Wiki%20-%20Supported%20Wallets",children:"Enkrypt"})}),(0,l.jsx)(t.td,{children:"Brave, Chrome, Edge, Firefox, Opera, Safari"}),(0,l.jsx)(t.td,{children:"No, No"}),(0,l.jsx)(t.td,{children:(0,l.jsx)(t.strong,{children:"Yes"})}),(0,l.jsx)(t.td,{children:"No"}),(0,l.jsx)(t.td,{children:(0,l.jsx)(t.strong,{children:"Yes"})}),(0,l.jsx)(t.td,{children:"No"}),(0,l.jsx)(t.td,{children:(0,l.jsx)(t.a,{href:"#enkrypt",children:"Enkrypt Features"})})]}),(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{children:(0,l.jsx)(t.a,{href:"https://polkagate.xyz/",children:"PolkaGate"})}),(0,l.jsxs)(t.td,{children:[(0,l.jsx)(t.a,{href:"https://chrome.google.com/webstore/detail/polkagate-the-gateway-to/ginchbkmljhldofnbjabmeophlhdldgp",children:"Brave"}),", ",(0,l.jsx)(t.a,{href:"https://chrome.google.com/webstore/detail/polkagate-the-gateway-to/ginchbkmljhldofnbjabmeophlhdldgp",children:"Chrome"}),", ",(0,l.jsx)(t.a,{href:"https://addons.mozilla.org/en-US/firefox/addon/polkagate",children:"Firefox"}),", ",(0,l.jsx)(t.a,{href:"https://chrome.google.com/webstore/detail/polkagate-the-gateway-to/ginchbkmljhldofnbjabmeophlhdldgp",children:"Edge"})]}),(0,l.jsxs)(t.td,{children:[(0,l.jsx)(t.strong,{children:"Yes"}),", ",(0,l.jsx)(t.strong,{children:"Yes"})]}),(0,l.jsx)(t.td,{children:"No"}),(0,l.jsx)(t.td,{children:(0,l.jsx)(t.strong,{children:"Yes"})}),(0,l.jsx)(t.td,{children:(0,l.jsx)(t.strong,{children:"Yes"})}),(0,l.jsx)(t.td,{children:(0,l.jsx)(t.strong,{children:"Yes"})}),(0,l.jsx)(t.td,{children:(0,l.jsx)(t.a,{href:"#polkagate",children:"PolkaGate features"})})]}),(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{children:(0,l.jsx)(t.a,{href:"https://subwallet.app/",children:"SubWallet"})}),(0,l.jsxs)(t.td,{children:[(0,l.jsx)(t.a,{href:"https://chrome.google.com/webstore/detail/subwallet-polkadot-extens/onhogfjeacnfoofkfgppdlbmlmnplgbn",children:"Brave"}),", ",(0,l.jsx)(t.a,{href:"https://chrome.google.com/webstore/detail/subwallet-polkadot-extens/onhogfjeacnfoofkfgppdlbmlmnplgbn",children:"Chrome"}),", ",(0,l.jsx)(t.a,{href:"https://chrome.google.com/webstore/detail/subwallet-polkadot-extens/onhogfjeacnfoofkfgppdlbmlmnplgbn",children:"Edge"}),", ",(0,l.jsx)(t.a,{href:"https://addons.mozilla.org/en-US/firefox/addon/subwallet/",children:"Firefox"})]}),(0,l.jsxs)(t.td,{children:[(0,l.jsx)(t.strong,{children:"Yes"}),", ",(0,l.jsx)(t.strong,{children:"Yes"})]}),(0,l.jsx)(t.td,{children:(0,l.jsx)(t.strong,{children:"Yes"})}),(0,l.jsx)(t.td,{children:(0,l.jsx)(t.strong,{children:"Yes"})}),(0,l.jsx)(t.td,{children:(0,l.jsx)(t.strong,{children:"Yes"})}),(0,l.jsx)(t.td,{children:"No"}),(0,l.jsx)(t.td,{children:(0,l.jsx)(t.a,{href:"#subwallet",children:"SubWallet features"})})]}),(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{children:(0,l.jsx)(t.a,{href:"https://www.talisman.xyz/",children:"Talisman"})}),(0,l.jsx)(t.td,{children:"Brave, Chrome, Edge, Firefox"}),(0,l.jsxs)(t.td,{children:[(0,l.jsx)(t.strong,{children:"Yes"}),", ",(0,l.jsx)(t.strong,{children:"Yes"})]}),(0,l.jsx)(t.td,{children:(0,l.jsx)(t.strong,{children:"Yes"})}),(0,l.jsx)(t.td,{children:(0,l.jsx)(t.strong,{children:"Yes"})}),(0,l.jsx)(t.td,{children:(0,l.jsx)(t.strong,{children:"Yes"})}),(0,l.jsx)(t.td,{children:"No"}),(0,l.jsx)(t.td,{children:(0,l.jsx)(t.a,{href:"#talisman",children:"Talisman features"})})]}),(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{children:(0,l.jsx)(t.a,{href:"https://fearlesswallet.io/",children:"Fearless Wallet"})}),(0,l.jsxs)(t.td,{children:[(0,l.jsx)(t.a,{href:"https://chrome.google.com/webstore/detail/fearless-wallet/nhlnehondigmgckngjomcpcefcdplmgc",children:"Brave"}),", ",(0,l.jsx)(t.a,{href:"https://chrome.google.com/webstore/detail/fearless-wallet/nhlnehondigmgckngjomcpcefcdplmgc",children:"Chrome"})]}),(0,l.jsx)(t.td,{children:"No, No"}),(0,l.jsx)(t.td,{children:(0,l.jsx)(t.strong,{children:"Yes"})}),(0,l.jsx)(t.td,{children:"No"}),(0,l.jsx)(t.td,{children:"No"}),(0,l.jsx)(t.td,{children:"No"}),(0,l.jsx)(t.td,{children:(0,l.jsx)(t.a,{href:"#fearless-wallet",children:"Fearless Wallet Features"})})]})]})]}),"\n",(0,l.jsx)(t.admonition,{title:"Ledger support only for chromium-based browsers",type:"info",children:(0,l.jsx)(t.p,{children:"Currently, all browser extensions support Ledger devices only on chromium-based browsers (i.e.\nChrome, Brave, Edge, Opera)."})}),"\n",(0,l.jsx)(t.h3,{id:"mobile-wallets",children:"Mobile Wallets"}),"\n",(0,l.jsx)(t.p,{children:"Mobile wallets are fully packaged apps that allow all the featured actions, as well as the storage\nand management of your accounts, through the mobile app. Unlike browser extensions, mobile wallets\nusually can\u2019t connect to third-party web apps. Some mobile wallets provide support for hardware\nwallets through Bluetooth connectivity."}),"\n",(0,l.jsxs)(t.table,{children:[(0,l.jsx)(t.thead,{children:(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.th,{children:"Wallet"}),(0,l.jsx)(t.th,{children:"Platforms"}),(0,l.jsx)(t.th,{children:"Staking and Nomination Pools"}),(0,l.jsx)(t.th,{children:"NFTs"}),(0,l.jsx)(t.th,{children:"Crowdloans"}),(0,l.jsx)(t.th,{children:"Ledger support"}),(0,l.jsx)(t.th,{children:"Governance"}),(0,l.jsx)(t.th,{children:"Proxy Accounts"}),(0,l.jsx)(t.th,{children:"Other features"})]})}),(0,l.jsxs)(t.tbody,{children:[(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{children:(0,l.jsx)(t.a,{href:"https://fearlesswallet.io/",children:"Fearless Wallet"})}),(0,l.jsx)(t.td,{children:"iOS, Android"}),(0,l.jsxs)(t.td,{children:[(0,l.jsx)(t.strong,{children:"Yes"}),", ",(0,l.jsx)(t.strong,{children:"Yes"})]}),(0,l.jsx)(t.td,{children:"No"}),(0,l.jsx)(t.td,{children:(0,l.jsx)(t.strong,{children:"Yes"})}),(0,l.jsx)(t.td,{children:"No"}),(0,l.jsx)(t.td,{children:"No"}),(0,l.jsx)(t.td,{children:"No"}),(0,l.jsx)(t.td,{children:(0,l.jsx)(t.a,{href:"#fearless-wallet",children:"Fearless Wallet Features"})})]}),(0,l.jsxs)(t.tr,{children:[(0,l.jsxs)(t.td,{children:[(0,l.jsx)(t.a,{href:"https://novawallet.io/",children:"Nova Wallet"}),"*"]}),(0,l.jsx)(t.td,{children:"iOS, Android"}),(0,l.jsxs)(t.td,{children:[(0,l.jsx)(t.strong,{children:"Yes"}),", ",(0,l.jsx)(t.strong,{children:"Yes"})]}),(0,l.jsx)(t.td,{children:(0,l.jsx)(t.strong,{children:"Yes"})}),(0,l.jsx)(t.td,{children:(0,l.jsx)(t.strong,{children:"Yes"})}),(0,l.jsx)(t.td,{children:(0,l.jsx)(t.strong,{children:"Yes"})}),(0,l.jsx)(t.td,{children:(0,l.jsx)(t.strong,{children:"Yes"})}),(0,l.jsx)(t.td,{children:(0,l.jsx)(t.strong,{children:"Yes"})}),(0,l.jsx)(t.td,{children:(0,l.jsx)(t.a,{href:"#nova-wallet",children:"Nova Wallet features"})})]}),(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{children:(0,l.jsx)(t.a,{href:"https://polkawallet.io/",children:"Polkawallet"})}),(0,l.jsx)(t.td,{children:"iOS, Android"}),(0,l.jsxs)(t.td,{children:[(0,l.jsx)(t.strong,{children:"Yes"}),", ",(0,l.jsx)(t.strong,{children:"Yes"})]}),(0,l.jsx)(t.td,{children:"No"}),(0,l.jsx)(t.td,{children:(0,l.jsx)(t.strong,{children:"Yes"})}),(0,l.jsx)(t.td,{children:"No"}),(0,l.jsx)(t.td,{children:(0,l.jsx)(t.strong,{children:"Yes"})}),(0,l.jsx)(t.td,{children:"No"}),(0,l.jsx)(t.td,{children:(0,l.jsx)(t.a,{href:"#polkawallet",children:"Polkawallet features"})})]}),(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{children:(0,l.jsx)(t.a,{href:"https://subwallet.app/",children:"SubWallet"})}),(0,l.jsxs)(t.td,{children:[(0,l.jsx)(t.a,{href:"https://apps.apple.com/us/app/subwallet-polkadot-wallet/id1633050285",children:"iOS"}),", ",(0,l.jsx)(t.a,{href:"bit.ly/3DE2Dlg",children:"Android"})]}),(0,l.jsxs)(t.td,{children:[(0,l.jsx)(t.strong,{children:"Yes"}),", ",(0,l.jsx)(t.strong,{children:"Yes"})]}),(0,l.jsx)(t.td,{children:(0,l.jsx)(t.strong,{children:"Yes"})}),(0,l.jsx)(t.td,{children:(0,l.jsx)(t.strong,{children:"Yes"})}),(0,l.jsx)(t.td,{children:"No"}),(0,l.jsx)(t.td,{children:"No"}),(0,l.jsx)(t.td,{children:"No"}),(0,l.jsx)(t.td,{children:(0,l.jsx)(t.a,{href:"#subwallet",children:"SubWallet features"})})]})]})]}),"\n",(0,l.jsx)(t.admonition,{title:"*Note about Nova wallet",type:"caution",children:(0,l.jsxs)(t.p,{children:["There's ",(0,l.jsx)(t.strong,{children:"another"})," Nova wallet that is ",(0,l.jsx)(t.strong,{children:"unrelated"})," to the Polkadot ecosystem. Users are advised\nto ensure that they use the correct Nova wallet by downloading the app from their official website:\n",(0,l.jsx)(t.a,{href:"https://novawallet.io/",children:"https://novawallet.io/"}),". Before creating or restoring accounts, it is wise\nto double-check the wallet website URLs through official channels (most projects have it listed on\ntheir official social media handles)."]})}),"\n",(0,l.jsx)(t.h3,{id:"web-wallets",children:"Web Wallets"}),"\n",(0,l.jsx)(t.p,{children:"Web Wallets are the all-in-one solution to accessing the Web3 space, allowing you to sign\ntransactions on the web without having to download and install any browser extension and mobile app.\nWith all of the features of mobile wallets, you can also connect to and interact with decentralized\nweb apps."}),"\n",(0,l.jsxs)(t.table,{children:[(0,l.jsx)(t.thead,{children:(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.th,{children:"Wallet"}),(0,l.jsx)(t.th,{children:"Platforms"}),(0,l.jsx)(t.th,{children:"Staking and Nomination Pools"}),(0,l.jsx)(t.th,{children:"Liquid Staking"}),(0,l.jsx)(t.th,{children:"NFTs"}),(0,l.jsx)(t.th,{children:"Crowdloans"}),(0,l.jsx)(t.th,{children:"Ledger support"}),(0,l.jsx)(t.th,{children:"Governance"}),(0,l.jsx)(t.th,{children:"Other features"})]})}),(0,l.jsx)(t.tbody,{children:(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{children:(0,l.jsx)(t.a,{href:"https://web.subwallet.app/",children:"SubWallet"})}),(0,l.jsx)(t.td,{children:"Any web browsers"}),(0,l.jsx)(t.td,{children:(0,l.jsx)(t.strong,{children:"Yes, Yes"})}),(0,l.jsx)(t.td,{children:(0,l.jsx)(t.strong,{children:"Yes"})}),(0,l.jsx)(t.td,{children:(0,l.jsx)(t.strong,{children:"Yes"})}),(0,l.jsx)(t.td,{children:(0,l.jsx)(t.strong,{children:"Yes"})}),(0,l.jsx)(t.td,{children:(0,l.jsx)(t.strong,{children:"Yes"})}),(0,l.jsx)(t.td,{children:"No"}),(0,l.jsx)(t.td,{children:(0,l.jsx)(t.a,{href:"#subwallet",children:"SubWallet features"})})]})})]}),"\n",(0,l.jsx)(t.h3,{id:"telegram-wallets",children:"Telegram Wallets"}),"\n",(0,l.jsx)(t.p,{children:"Telegram Wallets are applications running ontop of the Telegram Messenger platform. These wallets\ntypically provide a streamlined user experience and provide an easy way for new users to get started\nin the Polkadot ecosystem without having to download any new applications."}),"\n",(0,l.jsxs)(t.table,{children:[(0,l.jsx)(t.thead,{children:(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.th,{children:"Wallet"}),(0,l.jsx)(t.th,{children:"Platforms"}),(0,l.jsx)(t.th,{children:"Self-Custodial"}),(0,l.jsx)(t.th,{children:"Send Tokens to Telegram Username"}),(0,l.jsx)(t.th,{children:"Send Tokens to any Address"}),(0,l.jsx)(t.th,{children:"Notifications"}),(0,l.jsx)(t.th,{children:"Other features"})]})}),(0,l.jsx)(t.tbody,{children:(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{children:(0,l.jsx)(t.a,{href:"https://t.me/telenova_app_bot",children:"Telenova"})}),(0,l.jsx)(t.td,{children:"Mobile, Desktop, Web"}),(0,l.jsx)(t.td,{children:(0,l.jsx)(t.strong,{children:"Yes"})}),(0,l.jsx)(t.td,{children:(0,l.jsx)(t.strong,{children:"Yes"})}),(0,l.jsx)(t.td,{children:(0,l.jsx)(t.strong,{children:"Yes"})}),(0,l.jsx)(t.td,{children:(0,l.jsx)(t.strong,{children:"Yes"})}),(0,l.jsx)(t.td,{children:(0,l.jsx)(t.a,{href:"https://medium.com/novasama-technologies/meet-telenova-your-newbie-friendly-polkadot-wallet-built-into-telegram-5d9e9570d334",children:"Telenova Features"})})]})})]}),"\n",(0,l.jsx)(t.h2,{id:"enkrypt",children:"Enkrypt"}),"\n",(0,l.jsx)(t.p,{children:"A multichain crypto wallet - Bitcoin, Ethereum, Polkadot, Kusama and a few parachains.\nNon-custodial, private, hardware wallet support (Ledger and Trezor). Private and open source. Hold,\nsend, and receive tokens and NFTs. Swap tokens and bridge assets between chains. Manage multiple\naccounts on multiple networks. Connect to web3 apps. Recipient of a development grant from Web3\nFoundation."}),"\n",(0,l.jsx)(t.h2,{id:"fearless-wallet",children:"Fearless Wallet"}),"\n",(0,l.jsxs)(t.p,{children:["The Fearless DeFi Wallet for the Future. Simply, intuitively, and fearlessly interact with\n",(0,l.jsx)(t.a,{href:"/docs/web3-and-polkadot",children:"Web3"}),". Currently supports Staking, Crowdloans, Parachain Accounts,\nNomination Pools Native Staking, dApp Signer on desktop through your mobile phone (experimental),\nChromium-based browser extension. Safety features such as Scam Address Warning and Network Failure\nWarnings help fearlessly navigate ",(0,l.jsx)(t.a,{href:"/docs/web3-and-polkadot",children:"web3"}),". Formerly funded and supported by\nKusama Treasury [",(0,l.jsx)(t.a,{href:"https://kusama.polkassembly.io/treasury/23",children:"1"}),",\n",(0,l.jsx)(t.a,{href:"https://kusama.polkassembly.io/treasury/34",children:"2"}),", ",(0,l.jsx)(t.a,{href:"https://kusama.polkassembly.io/treasury/74",children:"3"}),",\n",(0,l.jsx)(t.a,{href:"https://kusama.polkassembly.io/treasury/102",children:"4"}),", ",(0,l.jsx)(t.a,{href:"https://kusama.polkassembly.io/treasury/178",children:"5"}),"],\nand the SORA community [",(0,l.jsx)(t.a,{href:"https://sora.subscan.io/referenda/193?tab=votes",children:"1"}),"], developed by\nSORAMITSU. Stay Fearless!"]}),"\n",(0,l.jsx)(t.h2,{id:"nova-wallet",children:"Nova Wallet"}),"\n",(0,l.jsxs)(t.p,{children:["A user-friendly wallet for the Polkadot & Kusama ecosystems, providing a smooth web3 experience on\nboth iOS and Android. Nova Wallet supports ",(0,l.jsx)(t.a,{href:"/docs/learn-polkadot-opengov",children:"Polkadot OpenGov"}),"\n(including agile delegations), Governance v1 (including support for parachain governance), Staking,\nNFT management, XCM Transfers, Parity Signer & Ledger Support, DApp Support with Polkadot JS and\nMetamask/EVM Integration and crowdloans. Nova Wallet received funding from Kusama Treasury\n[",(0,l.jsx)(t.a,{href:"https://kusama.polkassembly.io/treasury/122",children:"1"}),",\n",(0,l.jsx)(t.a,{href:"https://kusama.polkassembly.io/treasury/158",children:"2"}),"], as well as funding from the Polkadot Treasury\n[",(0,l.jsx)(t.a,{href:"https://polkadot.polkassembly.io/motion/314",children:"1"}),"]."]}),"\n",(0,l.jsx)(t.h2,{id:"polkagate",children:"PolkaGate"}),"\n",(0,l.jsxs)(t.p,{children:["PolkaGate extension is a user-friendly and feature-rich wallet/extension, supported by the Kusama\nTreasury [",(0,l.jsx)(t.a,{href:"https://kusama.polkassembly.io/treasury/205",children:"1"}),",\n",(0,l.jsx)(t.a,{href:"https://kusama.polkassembly.io/referenda/124",children:"2"}),"]. It provides a diverse range of functionalities\nto enhance your experience, such as proxy management, open governance, pool staking management, spam\naddress warning, support for address-only accounts, crowdloans, account export/import/derivation,\nledger support, parachain accounts, phishing website detection, QR account import, solo staking,\nremote node selection, fund transfers, balance viewing in both cryptocurrency and USD, transaction\nhistory viewing, and the ability to generate QR codes for addresses."]}),"\n",(0,l.jsx)(t.h2,{id:"polkawallet",children:"Polkawallet"}),"\n",(0,l.jsxs)(t.p,{children:["Polkawallet provides cross-chain asset one-stop management, convenient staking, governance, and\nmultiple DeFi services; the private key is self-owned. Polkawallet received funding from Kusama\nTreasury [",(0,l.jsx)(t.a,{href:"https://kusama.polkassembly.io/treasury/32",children:"1"}),",\n",(0,l.jsx)(t.a,{href:"https://kusama.polkassembly.io/treasury/41",children:"2"}),"]."]}),"\n",(0,l.jsx)(t.h2,{id:"subwallet",children:"SubWallet"}),"\n",(0,l.jsxs)(t.p,{children:["A non-custodial Polkadot, Substrate & Ethereum wallet. Track, send, receive, and monitor multi-chain\nassets on 150+ networks. Import account with seed phrase, private key, QR code, and JSON file.\nImport token & NFT, attach read-only account. XCM Transfer, NFT Management, Parity Signer & Ledger\nsupport, light clients support, EVM DApp support, MetaMask compatibility, custom endpoints, fiat\non-ramp, phishing detection, transaction history. SubWallet received funding from Polkadot Treasury\n[",(0,l.jsx)(t.a,{href:"https://polkadot.polkassembly.io/treasury/138",children:"1"}),",\n",(0,l.jsx)(t.a,{href:"https://polkadot.polkassembly.io/treasury/162",children:"2"}),",\n",(0,l.jsx)(t.a,{href:"https://polkadot.polkassembly.io/treasury/218",children:"3"}),",\n",(0,l.jsx)(t.a,{href:"https://polkadot.polkassembly.io/treasury/272",children:"4"}),"]."]}),"\n",(0,l.jsx)(t.h2,{id:"talisman",children:"Talisman"}),"\n",(0,l.jsxs)(t.p,{children:["A better way to explore Web3. Keep your assets safe, manage your portfolio and explore Polkadot and\nEthereum apps with Talisman. Interact with Web3 apps, store your favourite crypto assets and manage\nyour accounts on over 150+ Substrate and EVM networks. NFT Management, ledger Support, fiat On-ramp,\nportfolio tracking. Talisman received funding from Polkadot Treasury\n[",(0,l.jsx)(t.a,{href:"https://polkadot.polkassembly.io/treasury/148",children:"1"}),"]."]}),"\n",(0,l.jsx)(t.h2,{id:"telenova",children:"Telenova"}),"\n",(0,l.jsxs)(t.p,{children:[(0,l.jsx)(t.a,{href:"https://t.me/telenova_app_bot",children:"Telenova"})," is a brand new self-custodial Polkadot wallet that runs\ndirectly in Telegram providing you with a simple and clean user interface to manage your DOT & KSM\ntokens. Send crypto to anyone in Telegram, Buy/Sell DOT and KSM tokens, get notified about your\nbalance changes, view your total balance in multiple fiat currencies, secured by your personal\nTelegram cloud and manual backups."]}),"\n",(0,l.jsxs)(t.p,{children:["Use ",(0,l.jsx)(t.a,{href:"https://t.me/telenova_app_bot",children:"Telenova"})," on any of your devices \u2014 be it mobile or desktop \u2014\nwithin the same Telegram account, and start exploring the Polkadot ecosystem today!"]})]})}function c(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,l.jsx)(t,{...e,children:(0,l.jsx)(h,{...e})}):h(e)}},28453:(e,t,s)=>{s.d(t,{R:()=>r,x:()=>o});var n=s(96540);const l={},a=n.createContext(l);function r(e){const t=n.useContext(a);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(l):e.components||l:r(e.components),n.createElement(a.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f41c4e9d.9f63db6c.js b/assets/js/f41c4e9d.9f63db6c.js deleted file mode 100644 index 90be7b308331..000000000000 --- a/assets/js/f41c4e9d.9f63db6c.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8679],{29446:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>a,default:()=>d,frontMatter:()=>r,metadata:()=>o,toc:()=>l});var s=n(74848),i=n(28453);const r={id:"learn-xcm-pallet",title:"XCM FRAME Pallet Overview",sidebar_label:"XCM Pallet",description:"Mechanics of the XCM Pallet and its role in Polkadot's Ecosystem.",keywords:["cross-consensus","XCM","XCMP","interoperability","communication"],slug:"../learn-xcm-pallet"},a=void 0,o={id:"learn/learn-xcm-pallet",title:"XCM FRAME Pallet Overview",description:"Mechanics of the XCM Pallet and its role in Polkadot's Ecosystem.",source:"@site/../docs/learn/learn-xcm-pallet.md",sourceDirName:"learn",slug:"/learn-xcm-pallet",permalink:"/docs/learn-xcm-pallet",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-xcm-pallet.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:169692814e4,frontMatter:{id:"learn-xcm-pallet",title:"XCM FRAME Pallet Overview",sidebar_label:"XCM Pallet",description:"Mechanics of the XCM Pallet and its role in Polkadot's Ecosystem.",keywords:["cross-consensus","XCM","XCMP","interoperability","communication"],slug:"../learn-xcm-pallet"},sidebar:"docs",previous:{title:"Cross-Consensus Message Format (XCM)",permalink:"/docs/learn-xcm"},next:{title:"XCM Use-cases",permalink:"/docs/learn-xcm-usecases"}},c={},l=[{value:"Primitive Extrinsics",id:"primitive-extrinsics",level:2},{value:"Asset Transfer Extrinsics",id:"asset-transfer-extrinsics",level:2},{value:"Transfer Reserve vs. Teleport",id:"transfer-reserve-vs-teleport",level:3},{value:"Version Negotiation Extrinsics",id:"version-negotiation-extrinsics",level:2},{value:"Fees in the XCM Pallet",id:"fees-in-the-xcm-pallet",level:2}];function h(e){const t={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.admonition,{title:"XCM Documentation",type:"info",children:(0,s.jsxs)(t.p,{children:["For a more practical approach to utilizing XCM, refer to the ",(0,s.jsx)(t.a,{href:"./learn/xcm",children:"XCM Docs"}),". Please keep in\nmind that XCM is under active development."]})}),"\n",(0,s.jsxs)(t.p,{children:["The XCM pallet\n(",(0,s.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/master/polkadot/xcm/pallet-xcm/src/lib.rs",children:(0,s.jsx)(t.code,{children:"pallet-xcm"})}),")\nprovides a set of pre-defined, commonly used XCVM programs in the form of a set of extrinsics using\n",(0,s.jsx)(t.a,{href:"https://docs.substrate.io/reference/frame-pallets/",children:"FRAME"}),"."]}),"\n",(0,s.jsxs)(t.p,{children:["This pallet provides some default implementations for traits required by ",(0,s.jsx)(t.code,{children:"XcmConfig"}),". The XCM\nexecutor is also included as an associated type within the pallet's configuration."]}),"\n",(0,s.jsxs)(t.p,{children:["Where the XCM format defines a set of instructions used to construct XCVM programs, ",(0,s.jsx)(t.code,{children:"pallet-xcm"}),"\ndefines a set of extrinsics that can be utilized to build XCVM programs, either to target the local\nor external chains. ",(0,s.jsx)(t.code,{children:"pallet-xcm"}),"'s functionality is separated into three categories:"]}),"\n",(0,s.jsx)(t.admonition,{type:"note",children:(0,s.jsxs)(t.p,{children:["Remember, all XCMs are XCVM programs that follow\n",(0,s.jsx)(t.a,{href:"https://github.com/paritytech/xcm-format",children:"the XCM format"}),". It is the job of the XCM executor is to\nhandle and execute these programs."]})}),"\n",(0,s.jsxs)(t.ol,{children:["\n",(0,s.jsx)(t.li,{children:"Primitive, dispatchable functions to locally execute an XCM."}),"\n",(0,s.jsx)(t.li,{children:"High-level, dispatchable functions for asset transfers."}),"\n",(0,s.jsx)(t.li,{children:"Version negotiation-specific dispatchable functions."}),"\n"]}),"\n",(0,s.jsx)(t.h2,{id:"primitive-extrinsics",children:"Primitive Extrinsics"}),"\n",(0,s.jsx)(t.p,{children:"There are two primary primitive extrinsics. These extrinsics handle sending and executing XCVM\nprograms as dispatchable functions within the pallet."}),"\n",(0,s.jsxs)(t.ol,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/a808a3a0918ffbce314dbe00e03761e7a8f8ce79/polkadot/xcm/pallet-xcm/src/lib.rs#L902",children:(0,s.jsx)(t.code,{children:"execute"})})," -\nThis call contains direct access to the XCM executor. It is the job of the executor to check the\nmessage and ensure that no barrier/filter will block the execution of the XCM. Once it is deemed\nvalid, the message will then be ",(0,s.jsx)(t.em,{children:"locally"})," executed, therein returning the outcome as an event.\nThis operation is executed on behalf of whichever account has signed the extrinsic. It's possible\nfor only a partial execution to occur."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/a808a3a0918ffbce314dbe00e03761e7a8f8ce79/polkadot/xcm/pallet-xcm/src/lib.rs#L769",children:(0,s.jsx)(t.code,{children:"send"})})," -\nThis call specifies where a message should be sent\n(",(0,s.jsx)(t.a,{href:"/docs/learn-xcm-transport",children:"via a transport method"}),") externally to a particular destination, i.e.\na parachain, smart contract, or any system which is governed by consensus. In contrast to\n",(0,s.jsx)(t.code,{children:"execute"}),", the executor is not called locally, as the execution will occur on the destination\nchain."]}),"\n"]}),"\n",(0,s.jsxs)(t.admonition,{type:"info",children:[(0,s.jsxs)(t.p,{children:["The XCM pallet needs the ",(0,s.jsx)(t.code,{children:"XcmRouter"})," to send XCMs. It is used to dictate where XCMs are allowed to\nbe sent, and which XCM transport protocol to use. For example, Kusama, the canary network, uses the\n",(0,s.jsx)(t.code,{children:"ChildParachainRouter"})," which only allows for Downward Message Passing from the relay to parachains\nto occur."]}),(0,s.jsxs)(t.p,{children:["You can read more about ",(0,s.jsx)(t.a,{href:"/docs/learn-xcm-transport",children:"XCM transport protocols here"}),"."]})]}),"\n",(0,s.jsx)(t.h2,{id:"asset-transfer-extrinsics",children:"Asset Transfer Extrinsics"}),"\n",(0,s.jsxs)(t.p,{children:["Several extrinsics within the pallet handle asset transfer logic. They define a predetermined set of\ninstructions for sending and executing XCMs. Two variants of these functions are prefixed with\n",(0,s.jsx)(t.code,{children:"limited_"}),". They have the same functionality but can specify a weight to pay for the XCM fee."]}),"\n",(0,s.jsx)(t.p,{children:"Otherwise, the fee is taken as needed from the asset being transferred."}),"\n",(0,s.jsxs)(t.ol,{children:["\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/a808a3a0918ffbce314dbe00e03761e7a8f8ce79/polkadot/xcm/pallet-xcm/src/lib.rs#L872",children:(0,s.jsx)(t.code,{children:"reserve_transfer_assets"})})," -\nTransfer some assets from the local chain to the sovereign account of a destination chain and\nforward an XCM containing a\n",(0,s.jsx)(t.a,{href:"https://github.com/paritytech/xcm-format#reserveassetdeposited",children:(0,s.jsx)(t.code,{children:"ReserveAssetDeposited"})}),"\ninstruction, which serves as a notification."]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/a808a3a0918ffbce314dbe00e03761e7a8f8ce79/polkadot/xcm/pallet-xcm/src/lib.rs#L827",children:(0,s.jsx)(t.code,{children:"teleport_assets"})})," -\nTeleport some assets from the local chain to some destination chain."]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(t.h3,{id:"transfer-reserve-vs-teleport",children:"Transfer Reserve vs. Teleport"}),"\n",(0,s.jsx)(t.p,{children:"While both extrinsics deal with transferring assets, they exhibit fundamentally different behavior."}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.strong,{children:"Teleporting"})," an asset implies a two-step process: the assets are taken out of circulating\nsupply (typically by burning/destroying) in the origin chain and re-minted to whatever account is\nspecified at the destination. Teleporting should only occur if there is an inherent and bilateral\ntrust between the two chains, as the tokens destroyed at the origin ",(0,s.jsx)(t.em,{children:"could not"})," necessarily be\nguaranteed to have the same properties when minted at the destination. There has to be ",(0,s.jsx)(t.strong,{children:"trust"}),"\nthat the a particular chain burned, or re-minted the assets."]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.strong,{children:"Transferring"})," or ",(0,s.jsx)(t.strong,{children:"reserving"})," an asset implies that ",(0,s.jsx)(t.strong,{children:"equivalent"})," assets (i.e, native\ncurrency, like ",(0,s.jsx)(t.code,{children:"DOT"})," or ",(0,s.jsx)(t.code,{children:"KSM"}),") are withdrawn from ",(0,s.jsx)(t.em,{children:"sovereign account"})," of the origin chain and\ndeposited into the sovereign account on the destination chain. Unlike teleporting an asset, it is\nnot destroyed and re-minted, rather a trusted, third entity is used (i.e., Asset Hub) to\n",(0,s.jsx)(t.strong,{children:"reserve"})," the assets, wherein the sovereign account of the destination chain on the reserve\nchain obtains ownership of these assets."]}),"\n",(0,s.jsx)(t.p,{children:"It's worth noting that this means that some other mechanism is needed to ensure that the balance\non the destination does not exceed the amount being held in reserve chain."}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(t.admonition,{type:"info",children:(0,s.jsx)(t.p,{children:"A sovereign account refers to an account within a particular consensus system. Even though accounts\nmay be different in terms of factors such as an address format, XCM agnostic nature enables\ncommunication between these sovereign accounts that are in other consensus systems."})}),"\n",(0,s.jsx)(t.h2,{id:"version-negotiation-extrinsics",children:"Version Negotiation Extrinsics"}),"\n",(0,s.jsx)(t.p,{children:"The following extrinsics require root, as they are only used when bypassing XCM version negotiation.\nThey change any relevant storage aspects that enforce anything to do with XCM version negotiations."}),"\n",(0,s.jsxs)(t.ol,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/a808a3a0918ffbce314dbe00e03761e7a8f8ce79/polkadot/xcm/pallet-xcm/src/lib.rs#L934",children:(0,s.jsx)(t.code,{children:"force_xcm_version"})})," -\nModifies the ",(0,s.jsx)(t.code,{children:"SupportedVersion"})," storage to change a particular destination's stated XCM version."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/a808a3a0918ffbce314dbe00e03761e7a8f8ce79/polkadot/xcm/pallet-xcm/src/lib.rs#L957",children:(0,s.jsx)(t.code,{children:"force_default_xcm_version"})})," -\nModifies the ",(0,s.jsx)(t.code,{children:"SafeXcmVersion"})," storage, which stores the default XCM version to use when the\ndestination's version is unknown."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/a808a3a0918ffbce314dbe00e03761e7a8f8ce79/polkadot/xcm/pallet-xcm/src/lib.rs#L972",children:(0,s.jsx)(t.code,{children:"force_subscribe_version_notify"})})," -\nSends an XCM with a\n",(0,s.jsx)(t.a,{href:"https://github.com/paritytech/xcm-format#subscribeversion",children:(0,s.jsx)(t.code,{children:"SubscribeVersion"})})," instruction to a\ndestination."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/a808a3a0918ffbce314dbe00e03761e7a8f8ce79/polkadot/xcm/pallet-xcm/src/lib.rs#L996",children:(0,s.jsx)(t.code,{children:"force_unsubscribe_version_notify"})})," -\nSends an XCM with a\n",(0,s.jsx)(t.a,{href:"https://github.com/paritytech/xcm-format#unsubscribeversion",children:(0,s.jsx)(t.code,{children:"UnsubscribeVersion"})})," instruction\nto a destination."]}),"\n"]}),"\n",(0,s.jsx)(t.h2,{id:"fees-in-the-xcm-pallet",children:"Fees in the XCM Pallet"}),"\n",(0,s.jsxs)(t.p,{children:["Message fees are only paid if the interior location does not equal the interpreting consensus system\n(known as Here in the context of an XCM ",(0,s.jsx)(t.code,{children:"Multilocation"}),"). Otherwise, the chain bears the fees. If\napplicable, fees are withdrawn from the assets from the specified ",(0,s.jsx)(t.code,{children:"MultiLocation"})," and used as\npayment to execute any subsequent instructions within the XCM."]}),"\n",(0,s.jsxs)(t.p,{children:["Fees are generally dependent on several factors within the ",(0,s.jsx)(t.code,{children:"XcmConfig"}),". For example, the barrier may\nnegate any fees to be paid at all."]}),"\n",(0,s.jsxs)(t.p,{children:["Before any XCM is sent, and if the destination chain\u2019s barrier requires it, a\n",(0,s.jsx)(t.a,{href:"https://github.com/paritytech/xcm-format#buyexecution",children:(0,s.jsx)(t.code,{children:"BuyExecution"})})," instruction is used to buy\nthe necessary weight for the XCM. XCM fee calculation is handled by the Trader, which iteratively\ncalculates the total fee based on the number of instructions."]}),"\n",(0,s.jsx)(t.p,{children:"The Trader used to calculate the weight (time for computation in consensus) to include in the\nmessage. Fee calculation in XCM is highly configurable and, for this reason, subjective to whichever\nconfiguration is in place."})]})}function d(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}},28453:(e,t,n)=>{n.d(t,{R:()=>a,x:()=>o});var s=n(96540);const i={},r=s.createContext(i);function a(e){const t=s.useContext(r);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:a(e.components),s.createElement(r.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f41c4e9d.d8e650ff.js b/assets/js/f41c4e9d.d8e650ff.js new file mode 100644 index 000000000000..03d7c668162e --- /dev/null +++ b/assets/js/f41c4e9d.d8e650ff.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8679],{29939:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>o,default:()=>d,frontMatter:()=>a,metadata:()=>s,toc:()=>l});const s=JSON.parse('{"id":"learn/learn-xcm-pallet","title":"XCM FRAME Pallet Overview","description":"Mechanics of the XCM Pallet and its role in Polkadot\'s Ecosystem.","source":"@site/../docs/learn/learn-xcm-pallet.md","sourceDirName":"learn","slug":"/learn-xcm-pallet","permalink":"/docs/learn-xcm-pallet","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-xcm-pallet.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1696928140000,"frontMatter":{"id":"learn-xcm-pallet","title":"XCM FRAME Pallet Overview","sidebar_label":"XCM Pallet","description":"Mechanics of the XCM Pallet and its role in Polkadot\'s Ecosystem.","keywords":["cross-consensus","XCM","XCMP","interoperability","communication"],"slug":"../learn-xcm-pallet"},"sidebar":"docs","previous":{"title":"Cross-Consensus Message Format (XCM)","permalink":"/docs/learn-xcm"},"next":{"title":"XCM Use-cases","permalink":"/docs/learn-xcm-usecases"}}');var i=n(74848),r=n(28453);const a={id:"learn-xcm-pallet",title:"XCM FRAME Pallet Overview",sidebar_label:"XCM Pallet",description:"Mechanics of the XCM Pallet and its role in Polkadot's Ecosystem.",keywords:["cross-consensus","XCM","XCMP","interoperability","communication"],slug:"../learn-xcm-pallet"},o=void 0,c={},l=[{value:"Primitive Extrinsics",id:"primitive-extrinsics",level:2},{value:"Asset Transfer Extrinsics",id:"asset-transfer-extrinsics",level:2},{value:"Transfer Reserve vs. Teleport",id:"transfer-reserve-vs-teleport",level:3},{value:"Version Negotiation Extrinsics",id:"version-negotiation-extrinsics",level:2},{value:"Fees in the XCM Pallet",id:"fees-in-the-xcm-pallet",level:2}];function h(e){const t={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.admonition,{title:"XCM Documentation",type:"info",children:(0,i.jsxs)(t.p,{children:["For a more practical approach to utilizing XCM, refer to the ",(0,i.jsx)(t.a,{href:"./learn/xcm",children:"XCM Docs"}),". Please keep in\nmind that XCM is under active development."]})}),"\n",(0,i.jsxs)(t.p,{children:["The XCM pallet\n(",(0,i.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/master/polkadot/xcm/pallet-xcm/src/lib.rs",children:(0,i.jsx)(t.code,{children:"pallet-xcm"})}),")\nprovides a set of pre-defined, commonly used XCVM programs in the form of a set of extrinsics using\n",(0,i.jsx)(t.a,{href:"https://docs.substrate.io/reference/frame-pallets/",children:"FRAME"}),"."]}),"\n",(0,i.jsxs)(t.p,{children:["This pallet provides some default implementations for traits required by ",(0,i.jsx)(t.code,{children:"XcmConfig"}),". The XCM\nexecutor is also included as an associated type within the pallet's configuration."]}),"\n",(0,i.jsxs)(t.p,{children:["Where the XCM format defines a set of instructions used to construct XCVM programs, ",(0,i.jsx)(t.code,{children:"pallet-xcm"}),"\ndefines a set of extrinsics that can be utilized to build XCVM programs, either to target the local\nor external chains. ",(0,i.jsx)(t.code,{children:"pallet-xcm"}),"'s functionality is separated into three categories:"]}),"\n",(0,i.jsx)(t.admonition,{type:"note",children:(0,i.jsxs)(t.p,{children:["Remember, all XCMs are XCVM programs that follow\n",(0,i.jsx)(t.a,{href:"https://github.com/paritytech/xcm-format",children:"the XCM format"}),". It is the job of the XCM executor is to\nhandle and execute these programs."]})}),"\n",(0,i.jsxs)(t.ol,{children:["\n",(0,i.jsx)(t.li,{children:"Primitive, dispatchable functions to locally execute an XCM."}),"\n",(0,i.jsx)(t.li,{children:"High-level, dispatchable functions for asset transfers."}),"\n",(0,i.jsx)(t.li,{children:"Version negotiation-specific dispatchable functions."}),"\n"]}),"\n",(0,i.jsx)(t.h2,{id:"primitive-extrinsics",children:"Primitive Extrinsics"}),"\n",(0,i.jsx)(t.p,{children:"There are two primary primitive extrinsics. These extrinsics handle sending and executing XCVM\nprograms as dispatchable functions within the pallet."}),"\n",(0,i.jsxs)(t.ol,{children:["\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/a808a3a0918ffbce314dbe00e03761e7a8f8ce79/polkadot/xcm/pallet-xcm/src/lib.rs#L902",children:(0,i.jsx)(t.code,{children:"execute"})})," -\nThis call contains direct access to the XCM executor. It is the job of the executor to check the\nmessage and ensure that no barrier/filter will block the execution of the XCM. Once it is deemed\nvalid, the message will then be ",(0,i.jsx)(t.em,{children:"locally"})," executed, therein returning the outcome as an event.\nThis operation is executed on behalf of whichever account has signed the extrinsic. It's possible\nfor only a partial execution to occur."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/a808a3a0918ffbce314dbe00e03761e7a8f8ce79/polkadot/xcm/pallet-xcm/src/lib.rs#L769",children:(0,i.jsx)(t.code,{children:"send"})})," -\nThis call specifies where a message should be sent\n(",(0,i.jsx)(t.a,{href:"/docs/learn-xcm-transport",children:"via a transport method"}),") externally to a particular destination, i.e.\na parachain, smart contract, or any system which is governed by consensus. In contrast to\n",(0,i.jsx)(t.code,{children:"execute"}),", the executor is not called locally, as the execution will occur on the destination\nchain."]}),"\n"]}),"\n",(0,i.jsxs)(t.admonition,{type:"info",children:[(0,i.jsxs)(t.p,{children:["The XCM pallet needs the ",(0,i.jsx)(t.code,{children:"XcmRouter"})," to send XCMs. It is used to dictate where XCMs are allowed to\nbe sent, and which XCM transport protocol to use. For example, Kusama, the canary network, uses the\n",(0,i.jsx)(t.code,{children:"ChildParachainRouter"})," which only allows for Downward Message Passing from the relay to parachains\nto occur."]}),(0,i.jsxs)(t.p,{children:["You can read more about ",(0,i.jsx)(t.a,{href:"/docs/learn-xcm-transport",children:"XCM transport protocols here"}),"."]})]}),"\n",(0,i.jsx)(t.h2,{id:"asset-transfer-extrinsics",children:"Asset Transfer Extrinsics"}),"\n",(0,i.jsxs)(t.p,{children:["Several extrinsics within the pallet handle asset transfer logic. They define a predetermined set of\ninstructions for sending and executing XCMs. Two variants of these functions are prefixed with\n",(0,i.jsx)(t.code,{children:"limited_"}),". They have the same functionality but can specify a weight to pay for the XCM fee."]}),"\n",(0,i.jsx)(t.p,{children:"Otherwise, the fee is taken as needed from the asset being transferred."}),"\n",(0,i.jsxs)(t.ol,{children:["\n",(0,i.jsxs)(t.li,{children:["\n",(0,i.jsxs)(t.p,{children:[(0,i.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/a808a3a0918ffbce314dbe00e03761e7a8f8ce79/polkadot/xcm/pallet-xcm/src/lib.rs#L872",children:(0,i.jsx)(t.code,{children:"reserve_transfer_assets"})})," -\nTransfer some assets from the local chain to the sovereign account of a destination chain and\nforward an XCM containing a\n",(0,i.jsx)(t.a,{href:"https://github.com/paritytech/xcm-format#reserveassetdeposited",children:(0,i.jsx)(t.code,{children:"ReserveAssetDeposited"})}),"\ninstruction, which serves as a notification."]}),"\n"]}),"\n",(0,i.jsxs)(t.li,{children:["\n",(0,i.jsxs)(t.p,{children:[(0,i.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/a808a3a0918ffbce314dbe00e03761e7a8f8ce79/polkadot/xcm/pallet-xcm/src/lib.rs#L827",children:(0,i.jsx)(t.code,{children:"teleport_assets"})})," -\nTeleport some assets from the local chain to some destination chain."]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(t.h3,{id:"transfer-reserve-vs-teleport",children:"Transfer Reserve vs. Teleport"}),"\n",(0,i.jsx)(t.p,{children:"While both extrinsics deal with transferring assets, they exhibit fundamentally different behavior."}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsxs)(t.li,{children:["\n",(0,i.jsxs)(t.p,{children:[(0,i.jsx)(t.strong,{children:"Teleporting"})," an asset implies a two-step process: the assets are taken out of circulating\nsupply (typically by burning/destroying) in the origin chain and re-minted to whatever account is\nspecified at the destination. Teleporting should only occur if there is an inherent and bilateral\ntrust between the two chains, as the tokens destroyed at the origin ",(0,i.jsx)(t.em,{children:"could not"})," necessarily be\nguaranteed to have the same properties when minted at the destination. There has to be ",(0,i.jsx)(t.strong,{children:"trust"}),"\nthat the a particular chain burned, or re-minted the assets."]}),"\n"]}),"\n",(0,i.jsxs)(t.li,{children:["\n",(0,i.jsxs)(t.p,{children:[(0,i.jsx)(t.strong,{children:"Transferring"})," or ",(0,i.jsx)(t.strong,{children:"reserving"})," an asset implies that ",(0,i.jsx)(t.strong,{children:"equivalent"})," assets (i.e, native\ncurrency, like ",(0,i.jsx)(t.code,{children:"DOT"})," or ",(0,i.jsx)(t.code,{children:"KSM"}),") are withdrawn from ",(0,i.jsx)(t.em,{children:"sovereign account"})," of the origin chain and\ndeposited into the sovereign account on the destination chain. Unlike teleporting an asset, it is\nnot destroyed and re-minted, rather a trusted, third entity is used (i.e., Asset Hub) to\n",(0,i.jsx)(t.strong,{children:"reserve"})," the assets, wherein the sovereign account of the destination chain on the reserve\nchain obtains ownership of these assets."]}),"\n",(0,i.jsx)(t.p,{children:"It's worth noting that this means that some other mechanism is needed to ensure that the balance\non the destination does not exceed the amount being held in reserve chain."}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(t.admonition,{type:"info",children:(0,i.jsx)(t.p,{children:"A sovereign account refers to an account within a particular consensus system. Even though accounts\nmay be different in terms of factors such as an address format, XCM agnostic nature enables\ncommunication between these sovereign accounts that are in other consensus systems."})}),"\n",(0,i.jsx)(t.h2,{id:"version-negotiation-extrinsics",children:"Version Negotiation Extrinsics"}),"\n",(0,i.jsx)(t.p,{children:"The following extrinsics require root, as they are only used when bypassing XCM version negotiation.\nThey change any relevant storage aspects that enforce anything to do with XCM version negotiations."}),"\n",(0,i.jsxs)(t.ol,{children:["\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/a808a3a0918ffbce314dbe00e03761e7a8f8ce79/polkadot/xcm/pallet-xcm/src/lib.rs#L934",children:(0,i.jsx)(t.code,{children:"force_xcm_version"})})," -\nModifies the ",(0,i.jsx)(t.code,{children:"SupportedVersion"})," storage to change a particular destination's stated XCM version."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/a808a3a0918ffbce314dbe00e03761e7a8f8ce79/polkadot/xcm/pallet-xcm/src/lib.rs#L957",children:(0,i.jsx)(t.code,{children:"force_default_xcm_version"})})," -\nModifies the ",(0,i.jsx)(t.code,{children:"SafeXcmVersion"})," storage, which stores the default XCM version to use when the\ndestination's version is unknown."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/a808a3a0918ffbce314dbe00e03761e7a8f8ce79/polkadot/xcm/pallet-xcm/src/lib.rs#L972",children:(0,i.jsx)(t.code,{children:"force_subscribe_version_notify"})})," -\nSends an XCM with a\n",(0,i.jsx)(t.a,{href:"https://github.com/paritytech/xcm-format#subscribeversion",children:(0,i.jsx)(t.code,{children:"SubscribeVersion"})})," instruction to a\ndestination."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/a808a3a0918ffbce314dbe00e03761e7a8f8ce79/polkadot/xcm/pallet-xcm/src/lib.rs#L996",children:(0,i.jsx)(t.code,{children:"force_unsubscribe_version_notify"})})," -\nSends an XCM with a\n",(0,i.jsx)(t.a,{href:"https://github.com/paritytech/xcm-format#unsubscribeversion",children:(0,i.jsx)(t.code,{children:"UnsubscribeVersion"})})," instruction\nto a destination."]}),"\n"]}),"\n",(0,i.jsx)(t.h2,{id:"fees-in-the-xcm-pallet",children:"Fees in the XCM Pallet"}),"\n",(0,i.jsxs)(t.p,{children:["Message fees are only paid if the interior location does not equal the interpreting consensus system\n(known as Here in the context of an XCM ",(0,i.jsx)(t.code,{children:"Multilocation"}),"). Otherwise, the chain bears the fees. If\napplicable, fees are withdrawn from the assets from the specified ",(0,i.jsx)(t.code,{children:"MultiLocation"})," and used as\npayment to execute any subsequent instructions within the XCM."]}),"\n",(0,i.jsxs)(t.p,{children:["Fees are generally dependent on several factors within the ",(0,i.jsx)(t.code,{children:"XcmConfig"}),". For example, the barrier may\nnegate any fees to be paid at all."]}),"\n",(0,i.jsxs)(t.p,{children:["Before any XCM is sent, and if the destination chain\u2019s barrier requires it, a\n",(0,i.jsx)(t.a,{href:"https://github.com/paritytech/xcm-format#buyexecution",children:(0,i.jsx)(t.code,{children:"BuyExecution"})})," instruction is used to buy\nthe necessary weight for the XCM. XCM fee calculation is handled by the Trader, which iteratively\ncalculates the total fee based on the number of instructions."]}),"\n",(0,i.jsx)(t.p,{children:"The Trader used to calculate the weight (time for computation in consensus) to include in the\nmessage. Fee calculation in XCM is highly configurable and, for this reason, subjective to whichever\nconfiguration is in place."})]})}function d(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(h,{...e})}):h(e)}},28453:(e,t,n)=>{n.d(t,{R:()=>a,x:()=>o});var s=n(96540);const i={},r=s.createContext(i);function a(e){const t=s.useContext(r);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:a(e.components),s.createElement(r.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f4200fe5.4d653c61.js b/assets/js/f4200fe5.4d653c61.js deleted file mode 100644 index cc9e48cf20bf..000000000000 --- a/assets/js/f4200fe5.4d653c61.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3135],{41360:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>l,default:()=>p,frontMatter:()=>i,metadata:()=>d,toc:()=>h});var s=t(74848),a=t(28453),o=t(11470),r=t(19365);const i={id:"maintain-sync",title:"Set up a Full Node",sidebar_label:"Set up a Full Node",description:"Steps on how to set up a full node.",keywords:["node","full node","sync","setup node"],slug:"../maintain-sync"},l=void 0,d={id:"maintain/maintain-sync",title:"Set up a Full Node",description:"Steps on how to set up a full node.",source:"@site/../docs/maintain/maintain-sync.md",sourceDirName:"maintain",slug:"/maintain-sync",permalink:"/docs/maintain-sync",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/maintain/maintain-sync.md",tags:[],version:"current",lastUpdatedBy:"Diego",lastUpdatedAt:1726152378e3,frontMatter:{id:"maintain-sync",title:"Set up a Full Node",sidebar_label:"Set up a Full Node",description:"Steps on how to set up a full node.",keywords:["node","full node","sync","setup node"],slug:"../maintain-sync"},sidebar:"docs",previous:{title:"Node Endpoints",permalink:"/docs/maintain-endpoints"},next:{title:"Set up a Boot Node",permalink:"/docs/maintain-bootnode"}},c={},h=[{value:"Types of Nodes",id:"types-of-nodes",level:3},{value:"Setup Instructions",id:"setup-instructions",level:2},{value:"Debian-based (Debian, Ubuntu)",id:"debian-based-debian-ubuntu",level:3},{value:"RPM-based (Fedora, CentOS)",id:"rpm-based-fedora-centos",level:3},{value:"Get Substrate",id:"get-substrate",level:2},{value:"Clone and Build",id:"clone-and-build",level:2},{value:"Run",id:"run",level:2},{value:"Running an Archive Node",id:"running-an-archive-node",level:2},{value:"Using Docker",id:"using-docker",level:2}];function u(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",hr:"hr",li:"li",mdxAdmonitionTitle:"mdxAdmonitionTitle",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,a.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.p,{children:"If you're building dApps or products on a Substrate-based chain like Polkadot, Kusama, or a custom\nSubstrate implementation, you want the ability to run a node-as-a-back-end. After all, relying on\nyour infrastructure is always better than a third-party-hosted one in this brave new decentralized\nworld."}),"\n",(0,s.jsxs)(n.p,{children:["This guide will show you how to connect to ",(0,s.jsx)(n.a,{href:"https://polkadot.network/",children:"Polkadot network"}),", but the\nsame process applies to any other ",(0,s.jsx)(n.a,{href:"https://substrate.io",children:"Substrate"}),"-based chain. First, let's\nclarify the term ",(0,s.jsx)(n.em,{children:"full node"}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"types-of-nodes",children:"Types of Nodes"}),"\n",(0,s.jsxs)(n.p,{children:["A blockchain's growth comes from a ",(0,s.jsx)(n.em,{children:"genesis block"}),", ",(0,s.jsx)(n.em,{children:"extrinsics"}),", and ",(0,s.jsx)(n.em,{children:"events"}),"."]}),"\n",(0,s.jsx)(n.p,{children:"When a validator seals block 1, it takes the blockchain's state at block 0. It then applies all\npending changes on top of it and emits the events resulting from these changes. Later, the chain\u2019s\nstate at block one is used the same way to build the chain\u2019s state at block 2, and so on. Once\ntwo-thirds of the validators agree on a specific block being valid, it is finalized."}),"\n",(0,s.jsxs)(n.p,{children:["An ",(0,s.jsx)(n.strong,{children:"archive node"})," keeps all the past blocks and their states. An archive node makes it convenient\nto query the past state of the chain at any point in time. Finding out what an account's balance at\na particular block was or which extrinsics resulted in a specific state change are fast operations\nwhen using an archive node. However, an archive node takes up a lot of disk space - around Kusama's\n12 millionth block, this was around 660 GB."]}),"\n",(0,s.jsx)(n.admonition,{type:"tip",children:(0,s.jsxs)(n.p,{children:["On the ",(0,s.jsx)(n.a,{href:"https://paranodes.io/DBSize",children:"Paranodes"})," or ",(0,s.jsx)(n.a,{href:"https://stakeworld.io/docs/dbsize",children:"Stakeworld"}),"\nwebsites, you can find lists of the database sizes of Polkadot and Kusama nodes."]})}),"\n",(0,s.jsxs)(n.p,{children:["Archive nodes are used by utilities that need past information - like block explorers, council\nscanners, discussion platforms like ",(0,s.jsx)(n.a,{href:"https://polkassembly.io",children:"Polkassembly"}),", and others. They need\nto be able to look at past on-chain data."]}),"\n",(0,s.jsxs)(n.p,{children:["A ",(0,s.jsx)(n.strong,{children:"full node"})," prunes historical states: all finalized blocks' states older than a configurable\nnumber except the genesis block's state. This is 256 blocks from the last finalized one by default.\nA pruned node this way requires much less space than an archive node."]}),"\n",(0,s.jsx)(n.p,{children:"A full node could eventually rebuild every block's state without additional information and become\nan archive node. This still needs to be implemented at the time of writing. If you need to query\nhistorical blocks' states past what you pruned, you must purge your database and resync your node,\nstarting in archive mode. Alternatively, you can use a backup or snapshot of a trusted source to\navoid needing to sync from genesis with the network and only need the states of blocks past that\nsnapshot."}),"\n",(0,s.jsx)(n.p,{children:"Full nodes allow you to read the current state of the chain and to submit and validate extrinsics\ndirectly on the network without relying on a centralized infrastructure provider."}),"\n",(0,s.jsxs)(n.p,{children:["Another type of node is a ",(0,s.jsx)(n.strong,{children:"light node"}),". A light node has only the runtime and the current state\nbut does not store past blocks and so cannot read historical data without requesting it from a node\nthat has it. Light nodes are useful for resource-restricted devices. An interesting use-case of\nlight nodes is a browser extension, which is a node in its own right, running the runtime in WASM\nformat, as well as a full or light node that is completely encapsulated in WASM and can be\nintegrated into web apps: ",(0,s.jsx)(n.a,{href:"https://github.com/smol-dot/smoldot",children:"https://github.com/smol-dot/smoldot"}),"."]}),"\n",(0,s.jsx)(n.admonition,{title:"Substrate Connect",type:"note",children:(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.a,{href:"https://github.com/paritytech/substrate-connect",children:"Substrate Connect"})," provides a way to interact with\nsubstrate-based blockchains in the browser without using an RPC server. It is a light node that runs\nentirely in Javascript. Substrate Connect uses a\n",(0,s.jsx)(n.a,{href:"https://github.com/paritytech/smoldot",children:"smoldot WASM light client"})," to securely connect to the\nblockchain network without relying on specific 3rd parties. Substrate Connect is available on Chrome\nand Firefox as a ",(0,s.jsx)(n.a,{href:"https://substrate.io/developers/substrate-connect/",children:"browser extension"}),"."]})}),"\n",(0,s.jsx)(n.hr,{}),"\n",(0,s.jsx)(n.h2,{id:"setup-instructions",children:"Setup Instructions"}),"\n",(0,s.jsxs)(n.p,{children:["This is not recommended if you're a validator. Please see the\n",(0,s.jsx)(n.a,{href:"/docs/maintain-guides-secure-validator",children:"secure validator setup"})," if you are running validator."]}),"\n",(0,s.jsxs)(n.admonition,{type:"note",children:[(0,s.jsxs)(n.mdxAdmonitionTitle,{children:["The bash commands that are provided to run against ",(0,s.jsx)(n.strong,{children:"your node"})," use ",(0,s.jsx)(n.code,{children:"Polkadot"})," as the"]}),(0,s.jsx)(n.p,{children:"default chain"}),(0,s.jsxs)(n.p,{children:["Use the ",(0,s.jsx)(n.code,{children:"--chain"})," flag if you follow the setup instructions to setup a ",(0,s.jsx)(n.code,{children:"Kusama"})," node. For example:"]}),(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:'./target/release/polkadot --name "Your Node\'s Name" --chain kusama\n'})})]}),"\n",(0,s.jsxs)(o.A,{groupId:"operating-systems",values:[{label:"macOS",value:"mac"},{label:"Windows",value:"win"},{label:"Linux (standalone)",value:"linux-standalone"},{label:"Linux (package)",value:"linux-package"}],children:[(0,s.jsx)(r.A,{value:"mac",children:(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Install Homebrew within the terminal by running:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:'/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"\n'})}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Then, run:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"brew install openssl cmake llvm protobuf\n"})}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Install Rust by running:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh\n"})}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"After Rust is installed, update and add the nightly version:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"# Ensure the current shell has cargo\nsource ~/.cargo/env\n\n# Update the Rust toolchain\nrustup default stable\nrustup update\n\n# Add the nightly and WebAssembly targets:\nrustup update nightly\nrustup target add wasm32-unknown-unknown --toolchain nightly\n"})}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Verify your installation by running the following:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"rustup show\n\n# You should see output similar to:\n\nactive toolchain\n----------------\n\nstable-aarch64-apple-darwin (default)\nrustc 1.68.1 (8460ca823 2023-03-20)\n"})}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"rustup +nightly show\n\n# You should see output similar to:\n\ninstalled targets for active toolchain\n--------------------------------------\n\naarch64-apple-darwin\nwasm32-unknown-unknown\n\nactive toolchain\n----------------\n\nnightly-aarch64-apple-darwin (overridden by +toolchain on the command line)\nrustc 1.71.0-nightly (9ecda8de8 2023-04-30)\n"})}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Once Rust is configured, run the following command to clone and build the Polkadot code:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"git clone https://github.com/paritytech/polkadot-sdk polkadot-sdk\ncd polkadot-sdk\n./scripts/init.sh\ncargo build --release\n"})}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Start your node:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:'./target/release/polkadot --name "Your Node\'s Name"\n'})}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Find your node on ",(0,s.jsx)(n.a,{href:"https://telemetry.polkadot.io/#list/Polkadot",children:"Telemetry"})]}),"\n"]}),"\n"]})}),(0,s.jsx)(r.A,{value:"win",children:(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Install ",(0,s.jsx)(n.a,{href:"https://docs.microsoft.com/en-us/windows/wsl/install-win10",children:"WSL"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Install ",(0,s.jsx)(n.a,{href:"https://docs.microsoft.com/en-us/windows/wsl/install-win10",children:"Ubuntu"})," (same webpage)."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Determine the latest version of the\n",(0,s.jsx)(n.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/polkadot/releases",children:"Polkadot binary"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Download the correct Polkadot binary within Ubuntu by running the following command. Replace\n",(0,s.jsx)(n.code,{children:"*VERSION*"})," with the tag of the latest version from the last step (e.g. ",(0,s.jsx)(n.code,{children:"v0.8.22"}),"):"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"curl -sL https://github.com/paritytech/polkadot-sdk/releases/download/*VERSION*/polkadot -o polkadot\n"})}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Then, run the following:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"sudo chmod +x polkadot\n"})}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Start your node:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:'./polkadot --name "Your Node\'s Name"\n'})}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Find your node on ",(0,s.jsx)(n.a,{href:"https://telemetry.polkadot.io/#list/Polkadot",children:"Telemetry"})]}),"\n"]}),"\n"]})}),(0,s.jsx)(r.A,{value:"linux-standalone",children:(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Determine the latest version of the\n",(0,s.jsx)(n.a,{href:"https://github.com/paritytech/polkadot-sdk/releases",children:"Polkadot binary"}),"."]}),"\n",(0,s.jsx)(n.admonition,{type:"info",children:(0,s.jsxs)(n.p,{children:["The nature of pre-built binaries means that they may not work on your particular architecture or\nLinux distribution. If you see an error like ",(0,s.jsx)(n.code,{children:"cannot execute binary file: Exec format error"})," it\nlikely means the binary is not compatible with your system. You will either need to compile the\n",(0,s.jsx)(n.a,{href:"#clone-and-build",children:(0,s.jsx)(n.strong,{children:"source code"})})," or use ",(0,s.jsx)(n.a,{href:"#using-docker",children:(0,s.jsx)(n.strong,{children:"Docker"})}),"."]})}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Download the correct Polkadot binary within Ubuntu by running the following command. Replace\n",(0,s.jsx)(n.code,{children:"*VERSION*"})," with the tag of the latest version from the last step (e.g. ",(0,s.jsx)(n.code,{children:"v0.8.22"}),"):"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"curl -sL https://github.com/paritytech/polkadot-sdk/releases/download/*VERSION*/polkadot -o polkadot\n"})}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Run the following: ",(0,s.jsx)(n.code,{children:"sudo chmod +x polkadot"})]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Run the following:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:'./target/release/polkadot --name "Your Node\'s Name"\n'})}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Find your node on ",(0,s.jsx)(n.a,{href:"https://telemetry.polkadot.io/#list/Polkadot",children:"Telemetry"})]}),"\n"]}),"\n"]})}),(0,s.jsxs)(r.A,{value:"linux-package",children:[(0,s.jsx)(n.p,{children:"You can also install Polkadot from one of our package repositories."}),(0,s.jsxs)(n.p,{children:["Installation from the Debian or rpm repositories will create a ",(0,s.jsx)(n.code,{children:"systemd"})," service that can be used to\nrun a Polkadot node. The service is disabled by default, and can be started by running\n",(0,s.jsx)(n.code,{children:"systemctl start polkadot"})," on demand (use ",(0,s.jsx)(n.code,{children:"systemctl enable polkadot"})," to make it auto-start after\nreboot). By default, it will run as the ",(0,s.jsx)(n.code,{children:"polkadot"})," user. Command-line flags passed to the binary can\nbe customized by editing ",(0,s.jsx)(n.code,{children:"/etc/default/polkadot"}),". This file will not be overwritten on updating\npolkadot."]}),(0,s.jsx)(n.h3,{id:"debian-based-debian-ubuntu",children:"Debian-based (Debian, Ubuntu)"}),(0,s.jsxs)(n.p,{children:["Currently supports Debian 10 (Buster) and Ubuntu 20.04 (Focal), and derivatives. Run the following\ncommands as the ",(0,s.jsx)(n.code,{children:"root"})," user."]}),(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"# Import the security@parity.io GPG key\ngpg --recv-keys --keyserver hkps://keys.mailvelope.com 9D4B2B6EB8F97156D19669A9FF0812D491B96798\ngpg --export 9D4B2B6EB8F97156D19669A9FF0812D491B96798 > /usr/share/keyrings/parity.gpg\n# Add the Parity repository and update the package index\necho 'deb [signed-by=/usr/share/keyrings/parity.gpg] https://releases.parity.io/deb release main' > /etc/apt/sources.list.d/parity.list\napt update\n# Install the `parity-keyring` package - This will ensure the GPG key\n# used by APT remains up-to-date\napt install parity-keyring\n# Install polkadot\napt install polkadot\n\n"})}),(0,s.jsx)(n.p,{children:"If you don't want polkadot package to be automatically updated when you update packages on your\nserver, you can issue the following command:"}),(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"sudo apt-mark hold polkadot\n"})}),(0,s.jsx)(n.h3,{id:"rpm-based-fedora-centos",children:"RPM-based (Fedora, CentOS)"}),(0,s.jsx)(n.p,{children:"Currently supports Fedora 32 and CentOS 8, and derivatives."}),(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"# Install dnf-plugins-core (This might already be installed)\ndnf install dnf-plugins-core\n# Add the repository and enable it\ndnf config-manager --add-repo https://releases.parity.io/rpm/polkadot.repo\ndnf config-manager --set-enabled polkadot\n# Install polkadot (You may have to confirm the import of the GPG key, which\n# should have the following fingerprint: 9D4B2B6EB8F97156D19669A9FF0812D491B96798)\ndnf install polkadot\n"})}),(0,s.jsxs)(n.admonition,{type:"info",children:[(0,s.jsxs)(n.p,{children:["If you choose to use a custom folder for the polkadot home by passing ",(0,s.jsx)(n.code,{children:"--base-path '/custom-path'"}),",\nyou will need to issue following command:"]}),(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"sudo mkdir /etc/systemd/system/polkadot.service.d\n"})}),(0,s.jsx)(n.p,{children:"And create a new file inside this folder:"}),(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"sudo -e /etc/systemd/system/polkadot.service.d/custom.conf\n"})}),(0,s.jsx)(n.p,{children:"With the following content:"}),(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"[Service]\nReadWritePaths=/custom-path\n"})}),(0,s.jsx)(n.p,{children:"And finally issue a reload to have your modifications applied by systemd:"}),(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"systemctl daemon-reload\n"})})]})]})]}),"\n",(0,s.jsx)(n.h2,{id:"get-substrate",children:"Get Substrate"}),"\n",(0,s.jsxs)(n.p,{children:["Follow instructions as outlined ",(0,s.jsx)(n.a,{href:"https://docs.substrate.io/quick-start/",children:"here"})," - note that Windows\nusers will have their work cut out for them. It's better to use a virtual machine instead."]}),"\n",(0,s.jsxs)(n.p,{children:["Test if the installation was successful by running ",(0,s.jsx)(n.code,{children:"cargo --version"}),"."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"\u03bb cargo --version\ncargo 1.41.0 (626f0f40e 2019-12-03)\n"})}),"\n",(0,s.jsx)(n.h2,{id:"clone-and-build",children:"Clone and Build"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/polkadot",children:"paritytech/polkadot"})," repo's\nmaster branch contains the latest Polkadot code."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"git clone https://github.com/paritytech/polkadot-sdk polkadot-sdk\ncd polkadot-sdk\n./scripts/init.sh\ncargo build --release\n"})}),"\n",(0,s.jsxs)(n.p,{children:["Alternatively, if you wish to use a specific release, you can check out a specific tag (",(0,s.jsx)(n.code,{children:"v0.8.3"})," in\nthe example below):"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"git clone https://github.com/paritytech/polkadot-sdk polkadot-sdk\ncd polkadot-sdk\ngit checkout tags/polkadot-v1.9.0\n./scripts/init.sh\ncargo build --release\n"})}),"\n",(0,s.jsx)(n.h2,{id:"run",children:"Run"}),"\n",(0,s.jsxs)(n.p,{children:["The built binary will be in the ",(0,s.jsx)(n.code,{children:"target/release"})," folder, called ",(0,s.jsx)(n.code,{children:"polkadot"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Polkadot"}),":"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:'./target/release/polkadot --name "Your Node\'s Name"\n'})}),"\n",(0,s.jsxs)(n.p,{children:["Use the ",(0,s.jsx)(n.code,{children:"--help"})," flag to determine which flags you can use when running the node. For example, if\n",(0,s.jsx)(n.a,{href:"/docs/maintain-wss",children:"connecting to your node remotely"}),", you'll probably want to use ",(0,s.jsx)(n.code,{children:"--rpc-external"}),"\nand ",(0,s.jsx)(n.code,{children:"--rpc-cors all"}),"."]}),"\n",(0,s.jsx)(n.p,{children:"The syncing process will take a while, depending on your capacity, processing power, disk speed and\nRAM. On a $10 DigitalOcean droplet, the process can complete in some 36 hours."}),"\n",(0,s.jsx)(n.p,{children:"Congratulations, you're now syncing with Polkadot. Keep in mind that the process is identical when\nusing any other Substrate chain."}),"\n",(0,s.jsx)(n.h2,{id:"running-an-archive-node",children:"Running an Archive Node"}),"\n",(0,s.jsxs)(n.p,{children:["When running as a simple sync node (above), only the state of the past 256 blocks will be kept. It\ndefaults to ",(0,s.jsx)(n.a,{href:"#types-of-nodes",children:"archive mode"})," when validating. To support the full state, use the\n",(0,s.jsx)(n.code,{children:"--pruning"})," flag:"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Polkadot"}),":"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:'./target/release/polkadot --name "My node\'s name" --pruning archive\n'})}),"\n",(0,s.jsxs)(n.p,{children:["It is possible to almost quadruple synchronization speed by using an additional flag:\n",(0,s.jsx)(n.code,{children:"--wasm-execution Compiled"}),". Note that this uses much more CPU and RAM, so it should be turned off\nafter the node syncs."]}),"\n",(0,s.jsx)(n.h2,{id:"using-docker",children:"Using Docker"}),"\n",(0,s.jsxs)(n.p,{children:["Finally, you can use Docker to run your node in a container. Doing this is more advanced, so it's\nbest left up to those already familiar with docker or who have completed the other set-up\ninstructions in this guide. Be aware that when you run polkadot in docker, the process only listens\non localhost by default. If you would like to connect to your node's services (rpc, and prometheus)\nyou need to ensure that you run you node with the ",(0,s.jsx)(n.code,{children:"--rpc-external"}),", and ",(0,s.jsx)(n.code,{children:"--prometheus-external"}),"\ncommands."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-zsh",children:'docker run -p 9944:9944 -p 9615:9615 parity/polkadot:v0.9.13 --name "calling_home_from_a_docker_container" --rpc-external --prometheus-external\n'})})]})}function p(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(u,{...e})}):u(e)}},19365:(e,n,t)=>{t.d(n,{A:()=>r});t(96540);var s=t(34164);const a={tabItem:"tabItem_Ymn6"};var o=t(74848);function r(e){var n=e.children,t=e.hidden,r=e.className;return(0,o.jsx)("div",{role:"tabpanel",className:(0,s.A)(a.tabItem,r),hidden:t,children:n})}},11470:(e,n,t)=>{t.d(n,{A:()=>v});var s=t(96540),a=t(34164),o=t(23104),r=t(56347),i=t(205),l=t(57485),d=t(31682),c=t(75376);function h(e){var n,t;return null!=(n=null==(t=s.Children.toArray(e).filter((function(e){return"\n"!==e})).map((function(e){if(!e||(0,s.isValidElement)(e)&&((n=e.props)&&"object"==typeof n&&"value"in n))return e;var n;throw new Error("Docusaurus error: Bad child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:t.filter(Boolean))?n:[]}function u(e){var n=e.values,t=e.children;return(0,s.useMemo)((function(){var e=null!=n?n:function(e){return h(e).map((function(e){var n=e.props;return{value:n.value,label:n.label,attributes:n.attributes,default:n.default}}))}(t);return function(e){var n=(0,d.XI)(e,(function(e,n){return e.value===n.value}));if(n.length>0)throw new Error('Docusaurus error: Duplicate values "'+n.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[n,t])}function p(e){var n=e.value;return e.tabValues.some((function(e){return e.value===n}))}function m(e){var n=e.queryString,t=void 0!==n&&n,a=e.groupId,o=(0,r.W6)(),i=function(e){var n=e.queryString,t=void 0!==n&&n,s=e.groupId;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!s)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=s?s:null}({queryString:t,groupId:a});return[(0,l.aZ)(i),(0,s.useCallback)((function(e){if(i){var n=new URLSearchParams(o.location.search);n.set(i,e),o.replace(Object.assign({},o.location,{search:n.toString()}))}}),[i,o])]}function b(e){var n,t,a,o,r=e.defaultValue,l=e.queryString,d=void 0!==l&&l,h=e.groupId,b=u(e),g=(0,s.useState)((function(){return function(e){var n,t=e.defaultValue,s=e.tabValues;if(0===s.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!p({value:t,tabValues:s}))throw new Error('Docusaurus error: The has a defaultValue "'+t+'" but none of its children has the corresponding value. Available values are: '+s.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return t}var a=null!=(n=s.find((function(e){return e.default})))?n:s[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:r,tabValues:b})})),x=g[0],f=g[1],j=m({queryString:d,groupId:h}),y=j[0],k=j[1],v=(n=function(e){return e?"docusaurus.tab."+e:null}({groupId:h}.groupId),t=(0,c.Dv)(n),a=t[0],o=t[1],[a,(0,s.useCallback)((function(e){n&&o.set(e)}),[n,o])]),w=v[0],N=v[1],A=function(){var e=null!=y?y:w;return p({value:e,tabValues:b})?e:null}();return(0,i.A)((function(){A&&f(A)}),[A]),{selectedValue:x,selectValue:(0,s.useCallback)((function(e){if(!p({value:e,tabValues:b}))throw new Error("Can't select invalid tab value="+e);f(e),k(e),N(e)}),[k,N,b]),tabValues:b}}var g=t(92303);const x={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var f=t(74848);function j(e){var n=e.className,t=e.block,s=e.selectedValue,r=e.selectValue,i=e.tabValues,l=[],d=(0,o.a_)().blockElementScrollPositionUntilNextRender,c=function(e){var n=e.currentTarget,t=l.indexOf(n),a=i[t].value;a!==s&&(d(n),r(a))},h=function(e){var n,t=null;switch(e.key){case"Enter":c(e);break;case"ArrowRight":var s,a=l.indexOf(e.currentTarget)+1;t=null!=(s=l[a])?s:l[0];break;case"ArrowLeft":var o,r=l.indexOf(e.currentTarget)-1;t=null!=(o=l[r])?o:l[l.length-1]}null==(n=t)||n.focus()};return(0,f.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,a.A)("tabs",{"tabs--block":t},n),children:i.map((function(e){var n=e.value,t=e.label,o=e.attributes;return(0,f.jsx)("li",Object.assign({role:"tab",tabIndex:s===n?0:-1,"aria-selected":s===n,ref:function(e){return l.push(e)},onKeyDown:h,onClick:c},o,{className:(0,a.A)("tabs__item",x.tabItem,null==o?void 0:o.className,{"tabs__item--active":s===n}),children:null!=t?t:n}),n)}))})}function y(e){var n=e.lazy,t=e.children,o=e.selectedValue,r=(Array.isArray(t)?t:[t]).filter(Boolean);if(n){var i=r.find((function(e){return e.props.value===o}));return i?(0,s.cloneElement)(i,{className:(0,a.A)("margin-top--md",i.props.className)}):null}return(0,f.jsx)("div",{className:"margin-top--md",children:r.map((function(e,n){return(0,s.cloneElement)(e,{key:n,hidden:e.props.value!==o})}))})}function k(e){var n=b(e);return(0,f.jsxs)("div",{className:(0,a.A)("tabs-container",x.tabList),children:[(0,f.jsx)(j,Object.assign({},n,e)),(0,f.jsx)(y,Object.assign({},n,e))]})}function v(e){var n=(0,g.A)();return(0,f.jsx)(k,Object.assign({},e,{children:h(e.children)}),String(n))}},28453:(e,n,t)=>{t.d(n,{R:()=>r,x:()=>i});var s=t(96540);const a={},o=s.createContext(a);function r(e){const n=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:r(e.components),s.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f4200fe5.7d6285e3.js b/assets/js/f4200fe5.7d6285e3.js new file mode 100644 index 000000000000..bdfbf3de6204 --- /dev/null +++ b/assets/js/f4200fe5.7d6285e3.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3135],{94445:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>d,default:()=>p,frontMatter:()=>l,metadata:()=>s,toc:()=>h});const s=JSON.parse('{"id":"maintain/maintain-sync","title":"Set up a Full Node","description":"Steps on how to set up a full node.","source":"@site/../docs/maintain/maintain-sync.md","sourceDirName":"maintain","slug":"/maintain-sync","permalink":"/docs/maintain-sync","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/maintain/maintain-sync.md","tags":[],"version":"current","lastUpdatedBy":"Diego","lastUpdatedAt":1726152378000,"frontMatter":{"id":"maintain-sync","title":"Set up a Full Node","sidebar_label":"Set up a Full Node","description":"Steps on how to set up a full node.","keywords":["node","full node","sync","setup node"],"slug":"../maintain-sync"},"sidebar":"docs","previous":{"title":"Node Endpoints","permalink":"/docs/maintain-endpoints"},"next":{"title":"Set up a Boot Node","permalink":"/docs/maintain-bootnode"}}');var a=t(74848),o=t(28453),r=t(11470),i=t(19365);const l={id:"maintain-sync",title:"Set up a Full Node",sidebar_label:"Set up a Full Node",description:"Steps on how to set up a full node.",keywords:["node","full node","sync","setup node"],slug:"../maintain-sync"},d=void 0,c={},h=[{value:"Types of Nodes",id:"types-of-nodes",level:3},{value:"Setup Instructions",id:"setup-instructions",level:2},{value:"Debian-based (Debian, Ubuntu)",id:"debian-based-debian-ubuntu",level:3},{value:"RPM-based (Fedora, CentOS)",id:"rpm-based-fedora-centos",level:3},{value:"Get Substrate",id:"get-substrate",level:2},{value:"Clone and Build",id:"clone-and-build",level:2},{value:"Run",id:"run",level:2},{value:"Running an Archive Node",id:"running-an-archive-node",level:2},{value:"Using Docker",id:"using-docker",level:2}];function u(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",hr:"hr",li:"li",mdxAdmonitionTitle:"mdxAdmonitionTitle",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,o.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.p,{children:"If you're building dApps or products on a Substrate-based chain like Polkadot, Kusama, or a custom\nSubstrate implementation, you want the ability to run a node-as-a-back-end. After all, relying on\nyour infrastructure is always better than a third-party-hosted one in this brave new decentralized\nworld."}),"\n",(0,a.jsxs)(n.p,{children:["This guide will show you how to connect to ",(0,a.jsx)(n.a,{href:"https://polkadot.network/",children:"Polkadot network"}),", but the\nsame process applies to any other ",(0,a.jsx)(n.a,{href:"https://substrate.io",children:"Substrate"}),"-based chain. First, let's\nclarify the term ",(0,a.jsx)(n.em,{children:"full node"}),"."]}),"\n",(0,a.jsx)(n.h3,{id:"types-of-nodes",children:"Types of Nodes"}),"\n",(0,a.jsxs)(n.p,{children:["A blockchain's growth comes from a ",(0,a.jsx)(n.em,{children:"genesis block"}),", ",(0,a.jsx)(n.em,{children:"extrinsics"}),", and ",(0,a.jsx)(n.em,{children:"events"}),"."]}),"\n",(0,a.jsx)(n.p,{children:"When a validator seals block 1, it takes the blockchain's state at block 0. It then applies all\npending changes on top of it and emits the events resulting from these changes. Later, the chain\u2019s\nstate at block one is used the same way to build the chain\u2019s state at block 2, and so on. Once\ntwo-thirds of the validators agree on a specific block being valid, it is finalized."}),"\n",(0,a.jsxs)(n.p,{children:["An ",(0,a.jsx)(n.strong,{children:"archive node"})," keeps all the past blocks and their states. An archive node makes it convenient\nto query the past state of the chain at any point in time. Finding out what an account's balance at\na particular block was or which extrinsics resulted in a specific state change are fast operations\nwhen using an archive node. However, an archive node takes up a lot of disk space - around Kusama's\n12 millionth block, this was around 660 GB."]}),"\n",(0,a.jsx)(n.admonition,{type:"tip",children:(0,a.jsxs)(n.p,{children:["On the ",(0,a.jsx)(n.a,{href:"https://paranodes.io/DBSize",children:"Paranodes"})," or ",(0,a.jsx)(n.a,{href:"https://stakeworld.io/docs/dbsize",children:"Stakeworld"}),"\nwebsites, you can find lists of the database sizes of Polkadot and Kusama nodes."]})}),"\n",(0,a.jsxs)(n.p,{children:["Archive nodes are used by utilities that need past information - like block explorers, council\nscanners, discussion platforms like ",(0,a.jsx)(n.a,{href:"https://polkassembly.io",children:"Polkassembly"}),", and others. They need\nto be able to look at past on-chain data."]}),"\n",(0,a.jsxs)(n.p,{children:["A ",(0,a.jsx)(n.strong,{children:"full node"})," prunes historical states: all finalized blocks' states older than a configurable\nnumber except the genesis block's state. This is 256 blocks from the last finalized one by default.\nA pruned node this way requires much less space than an archive node."]}),"\n",(0,a.jsx)(n.p,{children:"A full node could eventually rebuild every block's state without additional information and become\nan archive node. This still needs to be implemented at the time of writing. If you need to query\nhistorical blocks' states past what you pruned, you must purge your database and resync your node,\nstarting in archive mode. Alternatively, you can use a backup or snapshot of a trusted source to\navoid needing to sync from genesis with the network and only need the states of blocks past that\nsnapshot."}),"\n",(0,a.jsx)(n.p,{children:"Full nodes allow you to read the current state of the chain and to submit and validate extrinsics\ndirectly on the network without relying on a centralized infrastructure provider."}),"\n",(0,a.jsxs)(n.p,{children:["Another type of node is a ",(0,a.jsx)(n.strong,{children:"light node"}),". A light node has only the runtime and the current state\nbut does not store past blocks and so cannot read historical data without requesting it from a node\nthat has it. Light nodes are useful for resource-restricted devices. An interesting use-case of\nlight nodes is a browser extension, which is a node in its own right, running the runtime in WASM\nformat, as well as a full or light node that is completely encapsulated in WASM and can be\nintegrated into web apps: ",(0,a.jsx)(n.a,{href:"https://github.com/smol-dot/smoldot",children:"https://github.com/smol-dot/smoldot"}),"."]}),"\n",(0,a.jsx)(n.admonition,{title:"Substrate Connect",type:"note",children:(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.a,{href:"https://github.com/paritytech/substrate-connect",children:"Substrate Connect"})," provides a way to interact with\nsubstrate-based blockchains in the browser without using an RPC server. It is a light node that runs\nentirely in Javascript. Substrate Connect uses a\n",(0,a.jsx)(n.a,{href:"https://github.com/paritytech/smoldot",children:"smoldot WASM light client"})," to securely connect to the\nblockchain network without relying on specific 3rd parties. Substrate Connect is available on Chrome\nand Firefox as a ",(0,a.jsx)(n.a,{href:"https://substrate.io/developers/substrate-connect/",children:"browser extension"}),"."]})}),"\n",(0,a.jsx)(n.hr,{}),"\n",(0,a.jsx)(n.h2,{id:"setup-instructions",children:"Setup Instructions"}),"\n",(0,a.jsxs)(n.p,{children:["This is not recommended if you're a validator. Please see the\n",(0,a.jsx)(n.a,{href:"/docs/maintain-guides-secure-validator",children:"secure validator setup"})," if you are running validator."]}),"\n",(0,a.jsxs)(n.admonition,{type:"note",children:[(0,a.jsxs)(n.mdxAdmonitionTitle,{children:["The bash commands that are provided to run against ",(0,a.jsx)(n.strong,{children:"your node"})," use ",(0,a.jsx)(n.code,{children:"Polkadot"})," as the"]}),(0,a.jsx)(n.p,{children:"default chain"}),(0,a.jsxs)(n.p,{children:["Use the ",(0,a.jsx)(n.code,{children:"--chain"})," flag if you follow the setup instructions to setup a ",(0,a.jsx)(n.code,{children:"Kusama"})," node. For example:"]}),(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'./target/release/polkadot --name "Your Node\'s Name" --chain kusama\n'})})]}),"\n",(0,a.jsxs)(r.A,{groupId:"operating-systems",values:[{label:"macOS",value:"mac"},{label:"Windows",value:"win"},{label:"Linux (standalone)",value:"linux-standalone"},{label:"Linux (package)",value:"linux-package"}],children:[(0,a.jsx)(i.A,{value:"mac",children:(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"Install Homebrew within the terminal by running:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"\n'})}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"Then, run:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"brew install openssl cmake llvm protobuf\n"})}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"Install Rust by running:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh\n"})}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"After Rust is installed, update and add the nightly version:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"# Ensure the current shell has cargo\nsource ~/.cargo/env\n\n# Update the Rust toolchain\nrustup default stable\nrustup update\n\n# Add the nightly and WebAssembly targets:\nrustup update nightly\nrustup target add wasm32-unknown-unknown --toolchain nightly\n"})}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"Verify your installation by running the following:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"rustup show\n\n# You should see output similar to:\n\nactive toolchain\n----------------\n\nstable-aarch64-apple-darwin (default)\nrustc 1.68.1 (8460ca823 2023-03-20)\n"})}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"rustup +nightly show\n\n# You should see output similar to:\n\ninstalled targets for active toolchain\n--------------------------------------\n\naarch64-apple-darwin\nwasm32-unknown-unknown\n\nactive toolchain\n----------------\n\nnightly-aarch64-apple-darwin (overridden by +toolchain on the command line)\nrustc 1.71.0-nightly (9ecda8de8 2023-04-30)\n"})}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"Once Rust is configured, run the following command to clone and build the Polkadot code:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"git clone https://github.com/paritytech/polkadot-sdk polkadot-sdk\ncd polkadot-sdk\n./scripts/init.sh\ncargo build --release\n"})}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"Start your node:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'./target/release/polkadot --name "Your Node\'s Name"\n'})}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:["Find your node on ",(0,a.jsx)(n.a,{href:"https://telemetry.polkadot.io/#list/Polkadot",children:"Telemetry"})]}),"\n"]}),"\n"]})}),(0,a.jsx)(i.A,{value:"win",children:(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:["Install ",(0,a.jsx)(n.a,{href:"https://docs.microsoft.com/en-us/windows/wsl/install-win10",children:"WSL"}),"."]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:["Install ",(0,a.jsx)(n.a,{href:"https://docs.microsoft.com/en-us/windows/wsl/install-win10",children:"Ubuntu"})," (same webpage)."]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:["Determine the latest version of the\n",(0,a.jsx)(n.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/polkadot/releases",children:"Polkadot binary"}),"."]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:["Download the correct Polkadot binary within Ubuntu by running the following command. Replace\n",(0,a.jsx)(n.code,{children:"*VERSION*"})," with the tag of the latest version from the last step (e.g. ",(0,a.jsx)(n.code,{children:"v0.8.22"}),"):"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"curl -sL https://github.com/paritytech/polkadot-sdk/releases/download/*VERSION*/polkadot -o polkadot\n"})}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"Then, run the following:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"sudo chmod +x polkadot\n"})}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"Start your node:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'./polkadot --name "Your Node\'s Name"\n'})}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:["Find your node on ",(0,a.jsx)(n.a,{href:"https://telemetry.polkadot.io/#list/Polkadot",children:"Telemetry"})]}),"\n"]}),"\n"]})}),(0,a.jsx)(i.A,{value:"linux-standalone",children:(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:["Determine the latest version of the\n",(0,a.jsx)(n.a,{href:"https://github.com/paritytech/polkadot-sdk/releases",children:"Polkadot binary"}),"."]}),"\n",(0,a.jsx)(n.admonition,{type:"info",children:(0,a.jsxs)(n.p,{children:["The nature of pre-built binaries means that they may not work on your particular architecture or\nLinux distribution. If you see an error like ",(0,a.jsx)(n.code,{children:"cannot execute binary file: Exec format error"})," it\nlikely means the binary is not compatible with your system. You will either need to compile the\n",(0,a.jsx)(n.a,{href:"#clone-and-build",children:(0,a.jsx)(n.strong,{children:"source code"})})," or use ",(0,a.jsx)(n.a,{href:"#using-docker",children:(0,a.jsx)(n.strong,{children:"Docker"})}),"."]})}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:["Download the correct Polkadot binary within Ubuntu by running the following command. Replace\n",(0,a.jsx)(n.code,{children:"*VERSION*"})," with the tag of the latest version from the last step (e.g. ",(0,a.jsx)(n.code,{children:"v0.8.22"}),"):"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"curl -sL https://github.com/paritytech/polkadot-sdk/releases/download/*VERSION*/polkadot -o polkadot\n"})}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:["Run the following: ",(0,a.jsx)(n.code,{children:"sudo chmod +x polkadot"})]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"Run the following:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'./target/release/polkadot --name "Your Node\'s Name"\n'})}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:["Find your node on ",(0,a.jsx)(n.a,{href:"https://telemetry.polkadot.io/#list/Polkadot",children:"Telemetry"})]}),"\n"]}),"\n"]})}),(0,a.jsxs)(i.A,{value:"linux-package",children:[(0,a.jsx)(n.p,{children:"You can also install Polkadot from one of our package repositories."}),(0,a.jsxs)(n.p,{children:["Installation from the Debian or rpm repositories will create a ",(0,a.jsx)(n.code,{children:"systemd"})," service that can be used to\nrun a Polkadot node. The service is disabled by default, and can be started by running\n",(0,a.jsx)(n.code,{children:"systemctl start polkadot"})," on demand (use ",(0,a.jsx)(n.code,{children:"systemctl enable polkadot"})," to make it auto-start after\nreboot). By default, it will run as the ",(0,a.jsx)(n.code,{children:"polkadot"})," user. Command-line flags passed to the binary can\nbe customized by editing ",(0,a.jsx)(n.code,{children:"/etc/default/polkadot"}),". This file will not be overwritten on updating\npolkadot."]}),(0,a.jsx)(n.h3,{id:"debian-based-debian-ubuntu",children:"Debian-based (Debian, Ubuntu)"}),(0,a.jsxs)(n.p,{children:["Currently supports Debian 10 (Buster) and Ubuntu 20.04 (Focal), and derivatives. Run the following\ncommands as the ",(0,a.jsx)(n.code,{children:"root"})," user."]}),(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"# Import the security@parity.io GPG key\ngpg --recv-keys --keyserver hkps://keys.mailvelope.com 9D4B2B6EB8F97156D19669A9FF0812D491B96798\ngpg --export 9D4B2B6EB8F97156D19669A9FF0812D491B96798 > /usr/share/keyrings/parity.gpg\n# Add the Parity repository and update the package index\necho 'deb [signed-by=/usr/share/keyrings/parity.gpg] https://releases.parity.io/deb release main' > /etc/apt/sources.list.d/parity.list\napt update\n# Install the `parity-keyring` package - This will ensure the GPG key\n# used by APT remains up-to-date\napt install parity-keyring\n# Install polkadot\napt install polkadot\n\n"})}),(0,a.jsx)(n.p,{children:"If you don't want polkadot package to be automatically updated when you update packages on your\nserver, you can issue the following command:"}),(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"sudo apt-mark hold polkadot\n"})}),(0,a.jsx)(n.h3,{id:"rpm-based-fedora-centos",children:"RPM-based (Fedora, CentOS)"}),(0,a.jsx)(n.p,{children:"Currently supports Fedora 32 and CentOS 8, and derivatives."}),(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"# Install dnf-plugins-core (This might already be installed)\ndnf install dnf-plugins-core\n# Add the repository and enable it\ndnf config-manager --add-repo https://releases.parity.io/rpm/polkadot.repo\ndnf config-manager --set-enabled polkadot\n# Install polkadot (You may have to confirm the import of the GPG key, which\n# should have the following fingerprint: 9D4B2B6EB8F97156D19669A9FF0812D491B96798)\ndnf install polkadot\n"})}),(0,a.jsxs)(n.admonition,{type:"info",children:[(0,a.jsxs)(n.p,{children:["If you choose to use a custom folder for the polkadot home by passing ",(0,a.jsx)(n.code,{children:"--base-path '/custom-path'"}),",\nyou will need to issue following command:"]}),(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"sudo mkdir /etc/systemd/system/polkadot.service.d\n"})}),(0,a.jsx)(n.p,{children:"And create a new file inside this folder:"}),(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"sudo -e /etc/systemd/system/polkadot.service.d/custom.conf\n"})}),(0,a.jsx)(n.p,{children:"With the following content:"}),(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"[Service]\nReadWritePaths=/custom-path\n"})}),(0,a.jsx)(n.p,{children:"And finally issue a reload to have your modifications applied by systemd:"}),(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"systemctl daemon-reload\n"})})]})]})]}),"\n",(0,a.jsx)(n.h2,{id:"get-substrate",children:"Get Substrate"}),"\n",(0,a.jsxs)(n.p,{children:["Follow instructions as outlined ",(0,a.jsx)(n.a,{href:"https://docs.substrate.io/quick-start/",children:"here"})," - note that Windows\nusers will have their work cut out for them. It's better to use a virtual machine instead."]}),"\n",(0,a.jsxs)(n.p,{children:["Test if the installation was successful by running ",(0,a.jsx)(n.code,{children:"cargo --version"}),"."]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"\u03bb cargo --version\ncargo 1.41.0 (626f0f40e 2019-12-03)\n"})}),"\n",(0,a.jsx)(n.h2,{id:"clone-and-build",children:"Clone and Build"}),"\n",(0,a.jsxs)(n.p,{children:["The ",(0,a.jsx)(n.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/polkadot",children:"paritytech/polkadot"})," repo's\nmaster branch contains the latest Polkadot code."]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"git clone https://github.com/paritytech/polkadot-sdk polkadot-sdk\ncd polkadot-sdk\n./scripts/init.sh\ncargo build --release\n"})}),"\n",(0,a.jsxs)(n.p,{children:["Alternatively, if you wish to use a specific release, you can check out a specific tag (",(0,a.jsx)(n.code,{children:"v0.8.3"})," in\nthe example below):"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"git clone https://github.com/paritytech/polkadot-sdk polkadot-sdk\ncd polkadot-sdk\ngit checkout tags/polkadot-v1.9.0\n./scripts/init.sh\ncargo build --release\n"})}),"\n",(0,a.jsx)(n.h2,{id:"run",children:"Run"}),"\n",(0,a.jsxs)(n.p,{children:["The built binary will be in the ",(0,a.jsx)(n.code,{children:"target/release"})," folder, called ",(0,a.jsx)(n.code,{children:"polkadot"}),"."]}),"\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.strong,{children:"Polkadot"}),":"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'./target/release/polkadot --name "Your Node\'s Name"\n'})}),"\n",(0,a.jsxs)(n.p,{children:["Use the ",(0,a.jsx)(n.code,{children:"--help"})," flag to determine which flags you can use when running the node. For example, if\n",(0,a.jsx)(n.a,{href:"/docs/maintain-wss",children:"connecting to your node remotely"}),", you'll probably want to use ",(0,a.jsx)(n.code,{children:"--rpc-external"}),"\nand ",(0,a.jsx)(n.code,{children:"--rpc-cors all"}),"."]}),"\n",(0,a.jsx)(n.p,{children:"The syncing process will take a while, depending on your capacity, processing power, disk speed and\nRAM. On a $10 DigitalOcean droplet, the process can complete in some 36 hours."}),"\n",(0,a.jsx)(n.p,{children:"Congratulations, you're now syncing with Polkadot. Keep in mind that the process is identical when\nusing any other Substrate chain."}),"\n",(0,a.jsx)(n.h2,{id:"running-an-archive-node",children:"Running an Archive Node"}),"\n",(0,a.jsxs)(n.p,{children:["When running as a simple sync node (above), only the state of the past 256 blocks will be kept. It\ndefaults to ",(0,a.jsx)(n.a,{href:"#types-of-nodes",children:"archive mode"})," when validating. To support the full state, use the\n",(0,a.jsx)(n.code,{children:"--pruning"})," flag:"]}),"\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.strong,{children:"Polkadot"}),":"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'./target/release/polkadot --name "My node\'s name" --pruning archive\n'})}),"\n",(0,a.jsxs)(n.p,{children:["It is possible to almost quadruple synchronization speed by using an additional flag:\n",(0,a.jsx)(n.code,{children:"--wasm-execution Compiled"}),". Note that this uses much more CPU and RAM, so it should be turned off\nafter the node syncs."]}),"\n",(0,a.jsx)(n.h2,{id:"using-docker",children:"Using Docker"}),"\n",(0,a.jsxs)(n.p,{children:["Finally, you can use Docker to run your node in a container. Doing this is more advanced, so it's\nbest left up to those already familiar with docker or who have completed the other set-up\ninstructions in this guide. Be aware that when you run polkadot in docker, the process only listens\non localhost by default. If you would like to connect to your node's services (rpc, and prometheus)\nyou need to ensure that you run you node with the ",(0,a.jsx)(n.code,{children:"--rpc-external"}),", and ",(0,a.jsx)(n.code,{children:"--prometheus-external"}),"\ncommands."]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-zsh",children:'docker run -p 9944:9944 -p 9615:9615 parity/polkadot:v0.9.13 --name "calling_home_from_a_docker_container" --rpc-external --prometheus-external\n'})})]})}function p(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(u,{...e})}):u(e)}},19365:(e,n,t)=>{t.d(n,{A:()=>r});t(96540);var s=t(34164);const a={tabItem:"tabItem_Ymn6"};var o=t(74848);function r(e){var n=e.children,t=e.hidden,r=e.className;return(0,o.jsx)("div",{role:"tabpanel",className:(0,s.A)(a.tabItem,r),hidden:t,children:n})}},11470:(e,n,t)=>{t.d(n,{A:()=>v});var s=t(96540),a=t(34164),o=t(23104),r=t(56347),i=t(205),l=t(57485),d=t(31682),c=t(75376);function h(e){var n,t;return null!=(n=null==(t=s.Children.toArray(e).filter((function(e){return"\n"!==e})).map((function(e){if(!e||(0,s.isValidElement)(e)&&((n=e.props)&&"object"==typeof n&&"value"in n))return e;var n;throw new Error("Docusaurus error: Bad child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:t.filter(Boolean))?n:[]}function u(e){var n=e.values,t=e.children;return(0,s.useMemo)((function(){var e=null!=n?n:function(e){return h(e).map((function(e){var n=e.props;return{value:n.value,label:n.label,attributes:n.attributes,default:n.default}}))}(t);return function(e){var n=(0,d.XI)(e,(function(e,n){return e.value===n.value}));if(n.length>0)throw new Error('Docusaurus error: Duplicate values "'+n.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[n,t])}function p(e){var n=e.value;return e.tabValues.some((function(e){return e.value===n}))}function m(e){var n=e.queryString,t=void 0!==n&&n,a=e.groupId,o=(0,r.W6)(),i=function(e){var n=e.queryString,t=void 0!==n&&n,s=e.groupId;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!s)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=s?s:null}({queryString:t,groupId:a});return[(0,l.aZ)(i),(0,s.useCallback)((function(e){if(i){var n=new URLSearchParams(o.location.search);n.set(i,e),o.replace(Object.assign({},o.location,{search:n.toString()}))}}),[i,o])]}function b(e){var n,t,a,o,r=e.defaultValue,l=e.queryString,d=void 0!==l&&l,h=e.groupId,b=u(e),g=(0,s.useState)((function(){return function(e){var n,t=e.defaultValue,s=e.tabValues;if(0===s.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!p({value:t,tabValues:s}))throw new Error('Docusaurus error: The has a defaultValue "'+t+'" but none of its children has the corresponding value. Available values are: '+s.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return t}var a=null!=(n=s.find((function(e){return e.default})))?n:s[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:r,tabValues:b})})),x=g[0],f=g[1],j=m({queryString:d,groupId:h}),y=j[0],k=j[1],v=(n=function(e){return e?"docusaurus.tab."+e:null}({groupId:h}.groupId),t=(0,c.Dv)(n),a=t[0],o=t[1],[a,(0,s.useCallback)((function(e){n&&o.set(e)}),[n,o])]),w=v[0],N=v[1],A=function(){var e=null!=y?y:w;return p({value:e,tabValues:b})?e:null}();return(0,i.A)((function(){A&&f(A)}),[A]),{selectedValue:x,selectValue:(0,s.useCallback)((function(e){if(!p({value:e,tabValues:b}))throw new Error("Can't select invalid tab value="+e);f(e),k(e),N(e)}),[k,N,b]),tabValues:b}}var g=t(92303);const x={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var f=t(74848);function j(e){var n=e.className,t=e.block,s=e.selectedValue,r=e.selectValue,i=e.tabValues,l=[],d=(0,o.a_)().blockElementScrollPositionUntilNextRender,c=function(e){var n=e.currentTarget,t=l.indexOf(n),a=i[t].value;a!==s&&(d(n),r(a))},h=function(e){var n,t=null;switch(e.key){case"Enter":c(e);break;case"ArrowRight":var s,a=l.indexOf(e.currentTarget)+1;t=null!=(s=l[a])?s:l[0];break;case"ArrowLeft":var o,r=l.indexOf(e.currentTarget)-1;t=null!=(o=l[r])?o:l[l.length-1]}null==(n=t)||n.focus()};return(0,f.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,a.A)("tabs",{"tabs--block":t},n),children:i.map((function(e){var n=e.value,t=e.label,o=e.attributes;return(0,f.jsx)("li",Object.assign({role:"tab",tabIndex:s===n?0:-1,"aria-selected":s===n,ref:function(e){return l.push(e)},onKeyDown:h,onClick:c},o,{className:(0,a.A)("tabs__item",x.tabItem,null==o?void 0:o.className,{"tabs__item--active":s===n}),children:null!=t?t:n}),n)}))})}function y(e){var n=e.lazy,t=e.children,o=e.selectedValue,r=(Array.isArray(t)?t:[t]).filter(Boolean);if(n){var i=r.find((function(e){return e.props.value===o}));return i?(0,s.cloneElement)(i,{className:(0,a.A)("margin-top--md",i.props.className)}):null}return(0,f.jsx)("div",{className:"margin-top--md",children:r.map((function(e,n){return(0,s.cloneElement)(e,{key:n,hidden:e.props.value!==o})}))})}function k(e){var n=b(e);return(0,f.jsxs)("div",{className:(0,a.A)("tabs-container",x.tabList),children:[(0,f.jsx)(j,Object.assign({},n,e)),(0,f.jsx)(y,Object.assign({},n,e))]})}function v(e){var n=(0,g.A)();return(0,f.jsx)(k,Object.assign({},e,{children:h(e.children)}),String(n))}},28453:(e,n,t)=>{t.d(n,{R:()=>r,x:()=>i});var s=t(96540);const a={},o=s.createContext(a);function r(e){const n=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:r(e.components),s.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f44679e7.8fc2decc.js b/assets/js/f44679e7.8fc2decc.js deleted file mode 100644 index f002f8cf3aab..000000000000 --- a/assets/js/f44679e7.8fc2decc.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9535],{24577:(e,n,o)=>{o.r(n),o.d(n,{assets:()=>r,contentTitle:()=>i,default:()=>p,frontMatter:()=>a,metadata:()=>l,toc:()=>d});var s=o(74848),t=o(28453);const a={id:"governance-apps",title:"Polkadot Governance Apps",sidebar_label:"Governance Apps",description:"Governance Apps in the Polkadot Ecosystem.",keywords:["voting","vote","delegate","conviction","OpenGov","delegation dashboard"],slug:"../governance-apps"},i=void 0,l={id:"general/governance-apps",title:"Polkadot Governance Apps",description:"Governance Apps in the Polkadot Ecosystem.",source:"@site/../docs/general/governance-apps.md",sourceDirName:"general",slug:"/governance-apps",permalink:"/docs/governance-apps",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/governance-apps.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1711375448e3,frontMatter:{id:"governance-apps",title:"Polkadot Governance Apps",sidebar_label:"Governance Apps",description:"Governance Apps in the Polkadot Ecosystem.",keywords:["voting","vote","delegate","conviction","OpenGov","delegation dashboard"],slug:"../governance-apps"},sidebar:"docs",previous:{title:"Staking Apps",permalink:"/docs/staking-apps"},next:{title:"Multisig Apps",permalink:"/docs/multisig-apps"}},r={},d=[{value:"Polkassembly",id:"polkassembly",level:2},{value:"SubSquare",id:"subsquare",level:2},{value:"Delegation Dashboard",id:"delegation-dashboard",level:2}];function c(e){const n={a:"a",admonition:"admonition",h2:"h2",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,t.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.admonition,{title:"Community Page",type:"info",children:(0,s.jsxs)(n.p,{children:["This page is open to contributions from the community. Please follow the\n",(0,s.jsx)(n.a,{href:"https://github.com/w3f/polkadot-wiki#contributing-to-documentation",children:"Wiki contribution guidelines"}),"\nand add your Governance app to this page."]})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"#polkassembly",children:"Polkassembly"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"#subsquare",children:"SubSquare"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"#delegation-dashboard",children:"Delegation Dashboard"})}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"polkassembly",children:"Polkassembly"}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{src:"https://github.com/w3f/polkadot-wiki/assets/874046/f2fc1032-ba81-465a-896c-51bd35efd435",alt:"Polkassembly"})}),"\n",(0,s.jsx)(n.p,{children:"Polkassembly is a platform specifically designed to foster open, transparent discussions around\nPolkadot and Kusama governance proposals. By bridging on-chain decisions with off-chain discussions,\nPolkassembly ensures that the community remains at the heart of the decision-making process."}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"1. Getting Started with Polkassembly"})," (",(0,s.jsx)(n.a,{href:"https://polkadot.polkassembly.io/",children:"https://polkadot.polkassembly.io/"}),")"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Registration: Begin by registering on Polkassembly. Choose between email/password sign-up or use\nweb3 enabled wallets."}),"\n",(0,s.jsx)(n.li,{children:"Authentication: To provide maximum security, Polkassembly enables a two-factor authentication\nprocess."}),"\n",(0,s.jsxs)(n.li,{children:["Linking Your Polkadot or Kusama Account:","\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsx)(n.li,{children:"Connect your Polkadot or Kusama account from Subwallet, Talisman, Nova, Polkadot.JS for\nseamless proposal tracking and voting."}),"\n",(0,s.jsxs)(n.li,{children:["Polkasafe (for multisigs) - vote and create proposals with Multisigs by logging in with\n",(0,s.jsx)(n.a,{href:"https://polkasafe.xyz/",children:"Polkasafe"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"2. Navigating the Polkassembly Interface"})," (",(0,s.jsx)(n.a,{href:"https://polkadot.polkassembly.io/opengov",children:"https://polkadot.polkassembly.io/opengov"}),")"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Dashboard: Provides a snapshot of active proposals, treasury motions, referenda, and public\ndiscussions."}),"\n",(0,s.jsx)(n.li,{children:"User Profile: Customize your profile settings, manage notifications, and view your activity."}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"3. Proposals, Motions, and Referenda"})," (",(0,s.jsx)(n.a,{href:"https://polkadot.polkassembly.io/big-spender",children:"https://polkadot.polkassembly.io/big-spender"}),")"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Viewing Details: Access comprehensive details of each proposal, including current status, voting\ntally, and associated discussions."}),"\n",(0,s.jsx)(n.li,{children:"Participating in Discussions: Engage with the community, share insights, ask questions, and\ncontribute to a transparent decision-making process."}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"4. Delegating on Polkassembly"})," (",(0,s.jsx)(n.a,{href:"https://polkadot.polkassembly.io/delegation",children:"https://polkadot.polkassembly.io/delegation"}),")"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Understanding Delegation: Delegate your voting power to community members you trust, enhancing the\ndemocratic process."}),"\n",(0,s.jsx)(n.li,{children:"How to Delegate: Navigate to the Delegation section, choose a delegate, specify the amount, and\nconfirm the delegation."}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"5. Notifications and Alerts"})," (",(0,s.jsx)(n.a,{href:"https://polkadot.polkassembly.io/settings",children:"https://polkadot.polkassembly.io/settings"}),")"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Custom Notifications: Receive real-time updates on topics of interest, proposal status changes,\nand more."}),"\n",(0,s.jsx)(n.li,{children:"Setting Alerts: Customize alert preferences to receive notifications tailored to your interests."}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"6. Frequently Asked Questions (FAQs)"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Integration with Polkadot: Polkassembly fetches on-chain data directly from the Polkadot/Substrate\nnode, ensuring real-time accuracy."}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["Dive into the world of Polkadot governance with Polkassembly and be an active part of the future!\nFor deeper insights or specific tutorials, please refer to the official documentation at\n",(0,s.jsx)(n.a,{href:"https://docs.polkassembly.io",children:"https://docs.polkassembly.io"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"subsquare",children:"SubSquare"}),"\n",(0,s.jsxs)(n.p,{children:["SubSquare is a governance platform well-designed for substrate based chains. It monitors on-chain\ngovernance events and provides user interfaces to facilitate various governance workflow. It has\nsupported tens of chains including polkadot, kusama, acala, centrifuge, hydradx, interlay, phala,\netc. Please check all deployments ",(0,s.jsx)(n.a,{href:"https://subsquare.io/",children:"here"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"delegation-dashboard",children:"Delegation Dashboard"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.a,{href:"https://delegation.polkadot.network/",children:"Polkadot Delegation Dashboard"})," is a web3 application that\nallows you to delegate your voting power on ",(0,s.jsx)(n.a,{href:"/docs/learn-polkadot-opengov",children:"Polkadot OpenGov"}),"."]}),"\n",(0,s.jsx)(n.admonition,{title:"How to get added as a Delegate on the Dashboard?",type:"info",children:(0,s.jsxs)(n.p,{children:["Anyone interested in being listed as a delegate can add their details on the\n",(0,s.jsx)(n.a,{href:"https://github.com/paritytech/governance-ui/blob/main/assets/data/polkadot/delegates.json",children:"Governance-UI repository"}),"."]})}),"\n",(0,s.jsxs)(n.p,{children:["To make OpenGov multi-role delegation easy and intuitive,\n",(0,s.jsx)(n.a,{href:"https://delegation.polkadot.network/",children:"Delegation Dashboard"})," provides an interactive interface that\ndisplays the list of delegates and their details. The video tutorial below walks through the\nfeatures of the Delegation Dashboard and shows how to perform multi-role delegation."]}),"\n",(0,s.jsx)("div",{className:"row",children:(0,s.jsxs)("div",{className:"col text--center",children:[(0,s.jsx)("a",{href:"https://www.youtube.com/watch?v=RapBYZc5ZPo",children:(0,s.jsx)("img",{src:"https://img.youtube.com/vi/RapBYZc5ZPo/0.jpg",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,s.jsx)("p",{children:(0,s.jsx)("a",{href:"https://www.youtube.com/watch?v=RapBYZc5ZPo",children:"Delegation Dashboard Tutorial"})})]})}),"\n",(0,s.jsxs)(n.p,{children:["For detailed instructions on how to delegate your voting power using dashboard, check\n",(0,s.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000184123-polkadot-opengov-how-to-delegate-your-voting-power",children:"this support guide."}),"."]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsxs)(n.strong,{children:["If you become a nomination pool member or a pool admin, you cannot participate in Governance with\nthe bonded tokens in the pool, as they are held in a\n",(0,s.jsx)(n.a,{href:"/docs/learn-account-advanced#system-accounts",children:"system account"}),"."]})})]})}function p(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(c,{...e})}):c(e)}},28453:(e,n,o)=>{o.d(n,{R:()=>i,x:()=>l});var s=o(96540);const t={},a=s.createContext(t);function i(e){const n=s.useContext(a);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:i(e.components),s.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f44679e7.956a0550.js b/assets/js/f44679e7.956a0550.js new file mode 100644 index 000000000000..940dc7d859f5 --- /dev/null +++ b/assets/js/f44679e7.956a0550.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9535],{5677:(e,n,o)=>{o.r(n),o.d(n,{assets:()=>r,contentTitle:()=>l,default:()=>p,frontMatter:()=>i,metadata:()=>s,toc:()=>d});const s=JSON.parse('{"id":"general/governance-apps","title":"Polkadot Governance Apps","description":"Governance Apps in the Polkadot Ecosystem.","source":"@site/../docs/general/governance-apps.md","sourceDirName":"general","slug":"/governance-apps","permalink":"/docs/governance-apps","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/governance-apps.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1711375448000,"frontMatter":{"id":"governance-apps","title":"Polkadot Governance Apps","sidebar_label":"Governance Apps","description":"Governance Apps in the Polkadot Ecosystem.","keywords":["voting","vote","delegate","conviction","OpenGov","delegation dashboard"],"slug":"../governance-apps"},"sidebar":"docs","previous":{"title":"Staking Apps","permalink":"/docs/staking-apps"},"next":{"title":"Multisig Apps","permalink":"/docs/multisig-apps"}}');var t=o(74848),a=o(28453);const i={id:"governance-apps",title:"Polkadot Governance Apps",sidebar_label:"Governance Apps",description:"Governance Apps in the Polkadot Ecosystem.",keywords:["voting","vote","delegate","conviction","OpenGov","delegation dashboard"],slug:"../governance-apps"},l=void 0,r={},d=[{value:"Polkassembly",id:"polkassembly",level:2},{value:"SubSquare",id:"subsquare",level:2},{value:"Delegation Dashboard",id:"delegation-dashboard",level:2}];function c(e){const n={a:"a",admonition:"admonition",h2:"h2",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,a.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.admonition,{title:"Community Page",type:"info",children:(0,t.jsxs)(n.p,{children:["This page is open to contributions from the community. Please follow the\n",(0,t.jsx)(n.a,{href:"https://github.com/w3f/polkadot-wiki#contributing-to-documentation",children:"Wiki contribution guidelines"}),"\nand add your Governance app to this page."]})}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"#polkassembly",children:"Polkassembly"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"#subsquare",children:"SubSquare"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"#delegation-dashboard",children:"Delegation Dashboard"})}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"polkassembly",children:"Polkassembly"}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{src:"https://github.com/w3f/polkadot-wiki/assets/874046/f2fc1032-ba81-465a-896c-51bd35efd435",alt:"Polkassembly"})}),"\n",(0,t.jsx)(n.p,{children:"Polkassembly is a platform specifically designed to foster open, transparent discussions around\nPolkadot and Kusama governance proposals. By bridging on-chain decisions with off-chain discussions,\nPolkassembly ensures that the community remains at the heart of the decision-making process."}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"1. Getting Started with Polkassembly"})," (",(0,t.jsx)(n.a,{href:"https://polkadot.polkassembly.io/",children:"https://polkadot.polkassembly.io/"}),")"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Registration: Begin by registering on Polkassembly. Choose between email/password sign-up or use\nweb3 enabled wallets."}),"\n",(0,t.jsx)(n.li,{children:"Authentication: To provide maximum security, Polkassembly enables a two-factor authentication\nprocess."}),"\n",(0,t.jsxs)(n.li,{children:["Linking Your Polkadot or Kusama Account:","\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsx)(n.li,{children:"Connect your Polkadot or Kusama account from Subwallet, Talisman, Nova, Polkadot.JS for\nseamless proposal tracking and voting."}),"\n",(0,t.jsxs)(n.li,{children:["Polkasafe (for multisigs) - vote and create proposals with Multisigs by logging in with\n",(0,t.jsx)(n.a,{href:"https://polkasafe.xyz/",children:"Polkasafe"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"2. Navigating the Polkassembly Interface"})," (",(0,t.jsx)(n.a,{href:"https://polkadot.polkassembly.io/opengov",children:"https://polkadot.polkassembly.io/opengov"}),")"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Dashboard: Provides a snapshot of active proposals, treasury motions, referenda, and public\ndiscussions."}),"\n",(0,t.jsx)(n.li,{children:"User Profile: Customize your profile settings, manage notifications, and view your activity."}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"3. Proposals, Motions, and Referenda"})," (",(0,t.jsx)(n.a,{href:"https://polkadot.polkassembly.io/big-spender",children:"https://polkadot.polkassembly.io/big-spender"}),")"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Viewing Details: Access comprehensive details of each proposal, including current status, voting\ntally, and associated discussions."}),"\n",(0,t.jsx)(n.li,{children:"Participating in Discussions: Engage with the community, share insights, ask questions, and\ncontribute to a transparent decision-making process."}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"4. Delegating on Polkassembly"})," (",(0,t.jsx)(n.a,{href:"https://polkadot.polkassembly.io/delegation",children:"https://polkadot.polkassembly.io/delegation"}),")"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Understanding Delegation: Delegate your voting power to community members you trust, enhancing the\ndemocratic process."}),"\n",(0,t.jsx)(n.li,{children:"How to Delegate: Navigate to the Delegation section, choose a delegate, specify the amount, and\nconfirm the delegation."}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"5. Notifications and Alerts"})," (",(0,t.jsx)(n.a,{href:"https://polkadot.polkassembly.io/settings",children:"https://polkadot.polkassembly.io/settings"}),")"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Custom Notifications: Receive real-time updates on topics of interest, proposal status changes,\nand more."}),"\n",(0,t.jsx)(n.li,{children:"Setting Alerts: Customize alert preferences to receive notifications tailored to your interests."}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"6. Frequently Asked Questions (FAQs)"})}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Integration with Polkadot: Polkassembly fetches on-chain data directly from the Polkadot/Substrate\nnode, ensuring real-time accuracy."}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["Dive into the world of Polkadot governance with Polkassembly and be an active part of the future!\nFor deeper insights or specific tutorials, please refer to the official documentation at\n",(0,t.jsx)(n.a,{href:"https://docs.polkassembly.io",children:"https://docs.polkassembly.io"}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"subsquare",children:"SubSquare"}),"\n",(0,t.jsxs)(n.p,{children:["SubSquare is a governance platform well-designed for substrate based chains. It monitors on-chain\ngovernance events and provides user interfaces to facilitate various governance workflow. It has\nsupported tens of chains including polkadot, kusama, acala, centrifuge, hydradx, interlay, phala,\netc. Please check all deployments ",(0,t.jsx)(n.a,{href:"https://subsquare.io/",children:"here"}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"delegation-dashboard",children:"Delegation Dashboard"}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.a,{href:"https://delegation.polkadot.network/",children:"Polkadot Delegation Dashboard"})," is a web3 application that\nallows you to delegate your voting power on ",(0,t.jsx)(n.a,{href:"/docs/learn-polkadot-opengov",children:"Polkadot OpenGov"}),"."]}),"\n",(0,t.jsx)(n.admonition,{title:"How to get added as a Delegate on the Dashboard?",type:"info",children:(0,t.jsxs)(n.p,{children:["Anyone interested in being listed as a delegate can add their details on the\n",(0,t.jsx)(n.a,{href:"https://github.com/paritytech/governance-ui/blob/main/assets/data/polkadot/delegates.json",children:"Governance-UI repository"}),"."]})}),"\n",(0,t.jsxs)(n.p,{children:["To make OpenGov multi-role delegation easy and intuitive,\n",(0,t.jsx)(n.a,{href:"https://delegation.polkadot.network/",children:"Delegation Dashboard"})," provides an interactive interface that\ndisplays the list of delegates and their details. The video tutorial below walks through the\nfeatures of the Delegation Dashboard and shows how to perform multi-role delegation."]}),"\n",(0,t.jsx)("div",{className:"row",children:(0,t.jsxs)("div",{className:"col text--center",children:[(0,t.jsx)("a",{href:"https://www.youtube.com/watch?v=RapBYZc5ZPo",children:(0,t.jsx)("img",{src:"https://img.youtube.com/vi/RapBYZc5ZPo/0.jpg",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,t.jsx)("p",{children:(0,t.jsx)("a",{href:"https://www.youtube.com/watch?v=RapBYZc5ZPo",children:"Delegation Dashboard Tutorial"})})]})}),"\n",(0,t.jsxs)(n.p,{children:["For detailed instructions on how to delegate your voting power using dashboard, check\n",(0,t.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000184123-polkadot-opengov-how-to-delegate-your-voting-power",children:"this support guide."}),"."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsxs)(n.strong,{children:["If you become a nomination pool member or a pool admin, you cannot participate in Governance with\nthe bonded tokens in the pool, as they are held in a\n",(0,t.jsx)(n.a,{href:"/docs/learn-account-advanced#system-accounts",children:"system account"}),"."]})})]})}function p(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(c,{...e})}):c(e)}},28453:(e,n,o)=>{o.d(n,{R:()=>i,x:()=>l});var s=o(96540);const t={},a=s.createContext(t);function i(e){const n=s.useContext(a);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:i(e.components),s.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f44ed8f8.aff55cd2.js b/assets/js/f44ed8f8.aff55cd2.js deleted file mode 100644 index 33a55509e0f3..000000000000 --- a/assets/js/f44ed8f8.aff55cd2.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2930],{49430:(e,n,a)=>{a.r(n),a.d(n,{assets:()=>r,contentTitle:()=>h,default:()=>d,frontMatter:()=>t,metadata:()=>c,toc:()=>o});var s=a(74848),i=a(28453);const t={id:"build-hrmp-channels",title:"Opening HRMP Channels",sidebar_label:"Opening HRMP Channels",description:"Steps on how to open HRMP channels between parachains.",keywords:["HRMP","parachain","statemint","proposal","asset hub","statemine"],slug:"../build-hrmp-channels"},h=void 0,c={id:"build/build-hrmp-channels",title:"Opening HRMP Channels",description:"Steps on how to open HRMP channels between parachains.",source:"@site/../docs/build/build-hrmp-channels.md",sourceDirName:"build",slug:"/build-hrmp-channels",permalink:"/docs/build-hrmp-channels",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/build/build-hrmp-channels.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1729152709e3,frontMatter:{id:"build-hrmp-channels",title:"Opening HRMP Channels",sidebar_label:"Opening HRMP Channels",description:"Steps on how to open HRMP channels between parachains.",keywords:["HRMP","parachain","statemint","proposal","asset hub","statemine"],slug:"../build-hrmp-channels"},sidebar:"docs",previous:{title:"Using AssetHub",permalink:"/docs/build-integrate-assets"},next:{title:"Tool Index",permalink:"/docs/build-tools-index"}},r={},o=[{value:"Opening HRMP Channels",id:"opening-hrmp-channels",level:2},{value:"Examples of HRMP Channel Management",id:"examples-of-hrmp-channel-management",level:3},{value:"Opening HRMP Channels with System Parachains",id:"opening-hrmp-channels-with-system-parachains",level:2},{value:"Opening HRMP Channels Between Two System Parachains",id:"opening-hrmp-channels-between-two-system-parachains",level:2}];function l(e){const n={a:"a",code:"code",h2:"h2",h3:"h3",img:"img",li:"li",ol:"ol",p:"p",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(n.p,{children:["In order to communicate over ",(0,s.jsx)(n.a,{href:"/docs/learn-xcm-transport#hrmp-xcmp-lite",children:"HRMP"}),", parachains must\nestablish channels by registering them on the relay chain. Like\n",(0,s.jsx)(n.a,{href:"/docs/learn-xcm-transport#xcmp-cross-chain-message-passing",children:"XCMP"}),", HRMP is a message\ntransport protocol, but passes all messages via the relay chain. When XCMP is implemented on\nPolkadot, HRMP is planned to be deprecated and phased out."]}),"\n",(0,s.jsx)(n.p,{children:"HRMP channels are uni-directional. Bi-directional communication between two parachains will require\ntwo channels, one in each direction."}),"\n",(0,s.jsx)(n.h2,{id:"opening-hrmp-channels",children:"Opening HRMP Channels"}),"\n",(0,s.jsxs)(n.p,{children:["Opening a channel between two parachains is a two-phase process, with one chain first initiating a\nchannel request and then the second chain accepting it. When neither chain is a\n",(0,s.jsx)(n.a,{href:"/docs/learn-system-chains",children:"system chain"}),", they will use the ",(0,s.jsx)(n.code,{children:"hrmpInitOpenChannel"})," and\n",(0,s.jsx)(n.code,{children:"hrmpAcceptOpenChannel"})," calls, respectively."]}),"\n",(0,s.jsx)(n.p,{children:"Each chain must dispatch the following calls on the relay chain from its parachain origin."}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"hrmp > hrmpInitOpenChannel(recipient, proposedMaxCapacity, proposedMaxMessageSize)"}),": Initiates\nchannel establishment by creating a channel request with a given configuration. Note that the max\ncapacity and max message size must be within the ",(0,s.jsx)(n.code,{children:"configuration"}),"'s limits."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"hrmp > hrmpAcceptOpenChannel(sender)"}),": Accept the channel open request from the given sender."]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["In order to dispatch a call from its sovereign origin, a parachain may use governance to send the\nencoded call in a ",(0,s.jsx)(n.code,{children:"Transact"})," instruction to the relay chain, but it may also execute this logic\nautonomously (e.g. on the notification that a channel was requested)."]}),"\n",(0,s.jsx)(n.h3,{id:"examples-of-hrmp-channel-management",children:"Examples of HRMP Channel Management"}),"\n",(0,s.jsxs)(n.p,{children:["There are several ways to trigger a specific message from a parachain's origin. The naive way is to\nwrite the program off-chain and submit it using the XCM pallet's ",(0,s.jsx)(n.code,{children:"send"})," extrinsic. Sending arbitrary\nprograms is gated by a privileged origin, so who can initiate that depends on each chain's\nconfiguration. The chain may need to go through governance to dispatch the extrinsic."]}),"\n",(0,s.jsx)(n.p,{children:"Another option is to write the programs that a chain will send ahead of time and incorporate them\ninto the runtime. These programs could be behind extrinsics with their own privileged origins, or\neven unprivileged origins. As the extrinsic can perform any checks prior to sending the message, the\nruntime developer can program things like allowing any signed origin to dispatch a call accepting an\nopen HRMP channel request with another parachain."}),"\n",(0,s.jsx)(n.p,{children:"Note that this is actually how other extrinsics (e.g. to teleport assets) in the XCM pallet work;\nthey construct XCM programs locally from a user's inputs and, assuming all checks pass, send the\nprogram to the destination."}),"\n",(0,s.jsxs)(n.p,{children:["In addition, the logic could be autonomous and react to other instructions that the chain receives.\nFor example, see Polimec's\n",(0,s.jsx)(n.a,{href:"https://github.com/Polimec/polimec-node/blob/da9d1ee0062ead7a62f815647813ada48e4c2250/pallets/xcm-executor/src/lib.rs#L890",children:"implementation"}),"\nof the ",(0,s.jsx)(n.code,{children:"XcmExecutor"}),", which handles notifications of channel requests and acceptance."]}),"\n",(0,s.jsx)(n.h2,{id:"opening-hrmp-channels-with-system-parachains",children:"Opening HRMP Channels with System Parachains"}),"\n",(0,s.jsxs)(n.p,{children:["The\n",(0,s.jsx)(n.a,{href:"https://paritytech.github.io/polkadot-sdk/master/polkadot_runtime_parachains/hrmp/pallet/dispatchables/fn.establish_channel_with_system.html",children:(0,s.jsx)(n.code,{children:"establish_channel_with_system"})}),"\ncall can be used to establish a bi-directional channel between any parachain and a system chain.\nThis call needs to be dispatched from the parachain via an XCM program to execute on the Relay\nChain."]}),"\n",(0,s.jsxs)(n.p,{children:["For instance, the call to be executed on the relay chain to establish a bi-directional channel\nbetween a parachain and the Asset Hub with ",(0,s.jsx)(n.code,{children:"ParaID"})," 1000 is ",(0,s.jsx)(n.code,{children:"0x3c0ae8030000"})]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"asset-hub-hrmp-channel",src:a(31415).A+"",width:"2769",height:"695"})}),"\n",(0,s.jsxs)(n.p,{children:["Here is an example call with an XCM program sent from the parachain to Paseo relay chain to\nestablish channel a bi-directional channel with Paseo Asset Hub -\n",(0,s.jsx)(n.code,{children:"0x0f001f000301000314000400000000070010a5d4e81300000000070010a5d4e80006000300c16678419c183c0ae8030000140d01000001003145"})]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"asset-hub-hrmp-channel-xcm",src:a(33580).A+"",width:"2836",height:"5618"})}),"\n",(0,s.jsx)(n.h2,{id:"opening-hrmp-channels-between-two-system-parachains",children:"Opening HRMP Channels Between Two System Parachains"}),"\n",(0,s.jsxs)(n.p,{children:["As of Polkadot and Kusama runtimes 1,001,000, anyone can call an ",(0,s.jsx)(n.code,{children:"establishSystemChannel"})," extrinsic\nwith two system parachains as arguments in order to establish a channel from the given sender to\nreceiver."]})]})}function d(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},33580:(e,n,a)=>{a.d(n,{A:()=>s});const s=a.p+"assets/images/asset-hub-establish-channel-xcm-7bf33f4a7c1d8575795bc9ed9567551a.png"},31415:(e,n,a)=>{a.d(n,{A:()=>s});const s=a.p+"assets/images/establish-channel-asset-hub-b2e50c86391cd9e45cbb685d3010169f.png"},28453:(e,n,a)=>{a.d(n,{R:()=>h,x:()=>c});var s=a(96540);const i={},t=s.createContext(i);function h(e){const n=s.useContext(t);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:h(e.components),s.createElement(t.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f44ed8f8.d1ac16ea.js b/assets/js/f44ed8f8.d1ac16ea.js new file mode 100644 index 000000000000..3c04077b39e7 --- /dev/null +++ b/assets/js/f44ed8f8.d1ac16ea.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2930],{64937:(e,n,a)=>{a.r(n),a.d(n,{assets:()=>r,contentTitle:()=>c,default:()=>d,frontMatter:()=>h,metadata:()=>s,toc:()=>o});const s=JSON.parse('{"id":"build/build-hrmp-channels","title":"Opening HRMP Channels","description":"Steps on how to open HRMP channels between parachains.","source":"@site/../docs/build/build-hrmp-channels.md","sourceDirName":"build","slug":"/build-hrmp-channels","permalink":"/docs/build-hrmp-channels","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/build/build-hrmp-channels.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1729152709000,"frontMatter":{"id":"build-hrmp-channels","title":"Opening HRMP Channels","sidebar_label":"Opening HRMP Channels","description":"Steps on how to open HRMP channels between parachains.","keywords":["HRMP","parachain","statemint","proposal","asset hub","statemine"],"slug":"../build-hrmp-channels"},"sidebar":"docs","previous":{"title":"Using AssetHub","permalink":"/docs/build-integrate-assets"},"next":{"title":"Tool Index","permalink":"/docs/build-tools-index"}}');var i=a(74848),t=a(28453);const h={id:"build-hrmp-channels",title:"Opening HRMP Channels",sidebar_label:"Opening HRMP Channels",description:"Steps on how to open HRMP channels between parachains.",keywords:["HRMP","parachain","statemint","proposal","asset hub","statemine"],slug:"../build-hrmp-channels"},c=void 0,r={},o=[{value:"Opening HRMP Channels",id:"opening-hrmp-channels",level:2},{value:"Examples of HRMP Channel Management",id:"examples-of-hrmp-channel-management",level:3},{value:"Opening HRMP Channels with System Parachains",id:"opening-hrmp-channels-with-system-parachains",level:2},{value:"Opening HRMP Channels Between Two System Parachains",id:"opening-hrmp-channels-between-two-system-parachains",level:2}];function l(e){const n={a:"a",code:"code",h2:"h2",h3:"h3",img:"img",li:"li",ol:"ol",p:"p",...(0,t.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(n.p,{children:["In order to communicate over ",(0,i.jsx)(n.a,{href:"/docs/learn-xcm-transport#hrmp-xcmp-lite",children:"HRMP"}),", parachains must\nestablish channels by registering them on the relay chain. Like\n",(0,i.jsx)(n.a,{href:"/docs/learn-xcm-transport#xcmp-cross-chain-message-passing",children:"XCMP"}),", HRMP is a message\ntransport protocol, but passes all messages via the relay chain. When XCMP is implemented on\nPolkadot, HRMP is planned to be deprecated and phased out."]}),"\n",(0,i.jsx)(n.p,{children:"HRMP channels are uni-directional. Bi-directional communication between two parachains will require\ntwo channels, one in each direction."}),"\n",(0,i.jsx)(n.h2,{id:"opening-hrmp-channels",children:"Opening HRMP Channels"}),"\n",(0,i.jsxs)(n.p,{children:["Opening a channel between two parachains is a two-phase process, with one chain first initiating a\nchannel request and then the second chain accepting it. When neither chain is a\n",(0,i.jsx)(n.a,{href:"/docs/learn-system-chains",children:"system chain"}),", they will use the ",(0,i.jsx)(n.code,{children:"hrmpInitOpenChannel"})," and\n",(0,i.jsx)(n.code,{children:"hrmpAcceptOpenChannel"})," calls, respectively."]}),"\n",(0,i.jsx)(n.p,{children:"Each chain must dispatch the following calls on the relay chain from its parachain origin."}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"hrmp > hrmpInitOpenChannel(recipient, proposedMaxCapacity, proposedMaxMessageSize)"}),": Initiates\nchannel establishment by creating a channel request with a given configuration. Note that the max\ncapacity and max message size must be within the ",(0,i.jsx)(n.code,{children:"configuration"}),"'s limits."]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"hrmp > hrmpAcceptOpenChannel(sender)"}),": Accept the channel open request from the given sender."]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["In order to dispatch a call from its sovereign origin, a parachain may use governance to send the\nencoded call in a ",(0,i.jsx)(n.code,{children:"Transact"})," instruction to the relay chain, but it may also execute this logic\nautonomously (e.g. on the notification that a channel was requested)."]}),"\n",(0,i.jsx)(n.h3,{id:"examples-of-hrmp-channel-management",children:"Examples of HRMP Channel Management"}),"\n",(0,i.jsxs)(n.p,{children:["There are several ways to trigger a specific message from a parachain's origin. The naive way is to\nwrite the program off-chain and submit it using the XCM pallet's ",(0,i.jsx)(n.code,{children:"send"})," extrinsic. Sending arbitrary\nprograms is gated by a privileged origin, so who can initiate that depends on each chain's\nconfiguration. The chain may need to go through governance to dispatch the extrinsic."]}),"\n",(0,i.jsx)(n.p,{children:"Another option is to write the programs that a chain will send ahead of time and incorporate them\ninto the runtime. These programs could be behind extrinsics with their own privileged origins, or\neven unprivileged origins. As the extrinsic can perform any checks prior to sending the message, the\nruntime developer can program things like allowing any signed origin to dispatch a call accepting an\nopen HRMP channel request with another parachain."}),"\n",(0,i.jsx)(n.p,{children:"Note that this is actually how other extrinsics (e.g. to teleport assets) in the XCM pallet work;\nthey construct XCM programs locally from a user's inputs and, assuming all checks pass, send the\nprogram to the destination."}),"\n",(0,i.jsxs)(n.p,{children:["In addition, the logic could be autonomous and react to other instructions that the chain receives.\nFor example, see Polimec's\n",(0,i.jsx)(n.a,{href:"https://github.com/Polimec/polimec-node/blob/da9d1ee0062ead7a62f815647813ada48e4c2250/pallets/xcm-executor/src/lib.rs#L890",children:"implementation"}),"\nof the ",(0,i.jsx)(n.code,{children:"XcmExecutor"}),", which handles notifications of channel requests and acceptance."]}),"\n",(0,i.jsx)(n.h2,{id:"opening-hrmp-channels-with-system-parachains",children:"Opening HRMP Channels with System Parachains"}),"\n",(0,i.jsxs)(n.p,{children:["The\n",(0,i.jsx)(n.a,{href:"https://paritytech.github.io/polkadot-sdk/master/polkadot_runtime_parachains/hrmp/pallet/dispatchables/fn.establish_channel_with_system.html",children:(0,i.jsx)(n.code,{children:"establish_channel_with_system"})}),"\ncall can be used to establish a bi-directional channel between any parachain and a system chain.\nThis call needs to be dispatched from the parachain via an XCM program to execute on the Relay\nChain."]}),"\n",(0,i.jsxs)(n.p,{children:["For instance, the call to be executed on the relay chain to establish a bi-directional channel\nbetween a parachain and the Asset Hub with ",(0,i.jsx)(n.code,{children:"ParaID"})," 1000 is ",(0,i.jsx)(n.code,{children:"0x3c0ae8030000"})]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"asset-hub-hrmp-channel",src:a(31415).A+"",width:"2769",height:"695"})}),"\n",(0,i.jsxs)(n.p,{children:["Here is an example call with an XCM program sent from the parachain to Paseo relay chain to\nestablish channel a bi-directional channel with Paseo Asset Hub -\n",(0,i.jsx)(n.code,{children:"0x0f001f000301000314000400000000070010a5d4e81300000000070010a5d4e80006000300c16678419c183c0ae8030000140d01000001003145"})]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"asset-hub-hrmp-channel-xcm",src:a(33580).A+"",width:"2836",height:"5618"})}),"\n",(0,i.jsx)(n.h2,{id:"opening-hrmp-channels-between-two-system-parachains",children:"Opening HRMP Channels Between Two System Parachains"}),"\n",(0,i.jsxs)(n.p,{children:["As of Polkadot and Kusama runtimes 1,001,000, anyone can call an ",(0,i.jsx)(n.code,{children:"establishSystemChannel"})," extrinsic\nwith two system parachains as arguments in order to establish a channel from the given sender to\nreceiver."]})]})}function d(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(l,{...e})}):l(e)}},33580:(e,n,a)=>{a.d(n,{A:()=>s});const s=a.p+"assets/images/asset-hub-establish-channel-xcm-7bf33f4a7c1d8575795bc9ed9567551a.png"},31415:(e,n,a)=>{a.d(n,{A:()=>s});const s=a.p+"assets/images/establish-channel-asset-hub-b2e50c86391cd9e45cbb685d3010169f.png"},28453:(e,n,a)=>{a.d(n,{R:()=>h,x:()=>c});var s=a(96540);const i={},t=s.createContext(i);function h(e){const n=s.useContext(t);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:h(e.components),s.createElement(t.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f47489cd.47b8c7f1.js b/assets/js/f47489cd.47b8c7f1.js deleted file mode 100644 index d4cff4ed6552..000000000000 --- a/assets/js/f47489cd.47b8c7f1.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4544],{31237:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>a,default:()=>c,frontMatter:()=>s,metadata:()=>o,toc:()=>d});var r=t(74848),i=t(28453);const s={id:"learn-runtime-upgrades",title:"Runtime Upgrades",sidebar_label:"Runtime Upgrades",description:"Forkless Runtime Upgrades on Polkadot.",keywords:["runtime","upgrades","releases","forkless"],slug:"../learn-runtime-upgrades"},a=void 0,o={id:"learn/learn-runtime-upgrades",title:"Runtime Upgrades",description:"Forkless Runtime Upgrades on Polkadot.",source:"@site/../docs/learn/learn-runtime-upgrades.md",sourceDirName:"learn",slug:"/learn-runtime-upgrades",permalink:"/docs/learn-runtime-upgrades",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-runtime-upgrades.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1726760224e3,frontMatter:{id:"learn-runtime-upgrades",title:"Runtime Upgrades",sidebar_label:"Runtime Upgrades",description:"Forkless Runtime Upgrades on Polkadot.",keywords:["runtime","upgrades","releases","forkless"],slug:"../learn-runtime-upgrades"},sidebar:"docs",previous:{title:"WebAssembly (Wasm)",permalink:"/docs/learn-wasm"},next:{title:"Advanced",permalink:"/docs/learn-advanced-index"}},l={},d=[{value:"Forkless Upgrades",id:"forkless-upgrades",level:2},{value:"Forkless Upgrades - Parachains & Solo Chains",id:"forkless-upgrades---parachains--solo-chains",level:3},{value:"Client Releases",id:"client-releases",level:2},{value:"Runtime vs Client versions",id:"runtime-vs-client-versions",level:3},{value:"Runtime Upgrades for Various Users",id:"runtime-upgrades-for-various-users",level:2},{value:"For Infrastructure Providers",id:"for-infrastructure-providers",level:3},{value:"For Nominators",id:"for-nominators",level:3},{value:"Monitoring Runtime Changes",id:"monitoring-runtime-changes",level:2}];function h(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(n.p,{children:["Runtime upgrades allow the relay chain, parachains, and solo blockchains built with the Polkadot SDK\nto change their core business logic (referred to as the ",(0,r.jsx)(n.strong,{children:"runtime"}),") without the need for a hard\nfork."]}),"\n",(0,r.jsx)(n.h2,{id:"forkless-upgrades",children:"Forkless Upgrades"}),"\n",(0,r.jsxs)(n.p,{children:['You may have encountered the term "hard fork" before in the blockchain space. A ',(0,r.jsx)(n.strong,{children:"hard fork"})," occurs\nwhen a blockchain's logic changes such that nodes that do not include the new changes cannot remain\nin consensus with nodes that do. Such changes are backward incompatible. Hard forks can be political\ndue to the nature of the upgrades and logistically demanding due to the number (potentially\nthousands) of nodes in the network that need to upgrade their software. Thus, hard forking is slow,\ninefficient, and error-prone due to the levels of offline coordination required and, therefore, the\npropensity to bundle many upgrades into one large-scale event."]}),"\n",(0,r.jsxs)(n.p,{children:["The usage of ",(0,r.jsx)(n.a,{href:"/docs/learn-wasm",children:"WebAssembly"}),' in the Polkadot SDK (the framework powering Polkadot,\nKusama and their respective parachains), give the relay chain, its parachains, as well as any other\nstandalone solo chains built with the Polkadot SDK the ability to upgrade their runtime (the chain\'s\n"business logic") without a hard fork of the respective network.']}),"\n",(0,r.jsxs)(n.p,{children:["Rather than encoding the runtime in the nodes, Polkadot nodes contain a WebAssembly\n",(0,r.jsx)(n.a,{href:"learn-polkadot-host",children:"execution host"}),". They maintain consensus on a very low-level and\nwell-established instruction set. Upgrades can be small, isolated, and very specific by deploying\nWebAssembly on-chain and having nodes auto-enact the new logic at a particular block height."]}),"\n",(0,r.jsxs)(n.p,{children:["The runtime is stored on the blockchain itself. Polkadot can upgrade its runtime by upgrading the\nlogic stored on-chain and removes the coordination challenge of requiring thousands of node\noperators to upgrade in advance of a given block number. Polkadot stakeholders propose and approve\nupgrades through the ",(0,r.jsx)(n.a,{href:"/docs/learn-polkadot-opengov",children:"on-chain governance"})," system, which also enacts\nthem autonomously once the runtime upgrade referendum is approved through on-chain voting."]}),"\n",(0,r.jsx)(n.p,{children:"As a result of storing the runtime as part of the state, the runtime code itself becomes state\nsensitive, and calls to runtime can change the runtime code itself. Therefore, the Polkadot Host\nmust always ensure it provides the runtime corresponding to the state in which the entry point has\nbeen called."}),"\n",(0,r.jsx)(n.h3,{id:"forkless-upgrades---parachains--solo-chains",children:"Forkless Upgrades - Parachains & Solo Chains"}),"\n",(0,r.jsxs)(n.p,{children:["The node architectural design for parachains and solo chains is similar to that of the relay chain,\nwith the runtime code being a Wasm blob that is stored in chain state. Solo chains built with\nPolkadot SDK, which are blockchains that have a native consensus mechanism that is independent of\nthe relay chain's consensus, can be updated through an on-chain governance system like\n",(0,r.jsx)(n.a,{href:"/docs/learn-polkadot-opengov",children:"OpenGov"})," or a simple sudo/multisig setup."]}),"\n",(0,r.jsx)(n.p,{children:"Parachains must notify the relay chain whenever a new upgrade is to be enacted. This is done using\ntwo key extrinsics:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"https://paritytech.github.io/polkadot-sdk/master/frame_system/pallet/struct.Pallet.html#method.authorize_upgrade",children:(0,r.jsx)(n.code,{children:"system.authorizeUpgrade"})})," -\nnotifies the relay chain that an upgrade is to take place, and thus a new state transition\nfunction is going to be introduced for that parachain to be validated with."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"https://paritytech.github.io/polkadot-sdk/master/frame_system/pallet/struct.Pallet.html#method.apply_authorized_upgrade",children:(0,r.jsx)(n.code,{children:"system.applyAuthorizedUpgrade"})})," -\nenacts the upgrade, assuming it has been approved."]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"client-releases",children:"Client Releases"}),"\n",(0,r.jsxs)(n.p,{children:["The existing runtime logic is followed to update the ",(0,r.jsx)(n.a,{href:"/docs/learn-wasm",children:"Wasm"})," runtime stored on the\nblockchain to a new version. The upgrade is then included in the blockchain itself, meaning that all\nthe nodes on the network execute it. Generally, there is no need to upgrade your nodes manually\nbefore the runtime upgrade, as they will automatically start to follow the new logic of the chain.\nNodes only need to be updated when the runtime requires new host functions, or there is a change in\nnetworking or consensus."]}),"\n",(0,r.jsx)(n.p,{children:"Transactions constructed for a given runtime version will not work on later versions. Therefore, a\ntransaction constructed based on a runtime version will not be valid in later runtime versions. If\nyou can\u2019t submit a transaction before the upgrade, it is better to wait and construct it afterward."}),"\n",(0,r.jsx)(n.p,{children:"Although upgrading your nodes is generally not necessary to follow an upgrade, we recommend\nfollowing the Polkadot releases and upgrading promptly, especially for high-priority or critical\nreleases."}),"\n",(0,r.jsx)(n.admonition,{title:"New Client Releases",type:"info",children:(0,r.jsxs)(n.p,{children:["The details about the latest client releases can be found in the\n",(0,r.jsx)(n.a,{href:"https://github.com/paritytech/polkadot-sdk/releases",children:"releases section on the Polkadot repository"}),".\nA detailed analysis for client releases can be viewed on the\n",(0,r.jsx)(n.a,{href:"https://forum.polkadot.network/tag/release-analysis",children:"Polkadot Forum"}),"."]})}),"\n",(0,r.jsx)(n.h3,{id:"runtime-vs-client-versions",children:"Runtime vs Client versions"}),"\n",(0,r.jsxs)(n.p,{children:["The runtime and client versions are distinct from each other. The runtime versioning typically looks\nlike ",(0,r.jsx)(n.code,{children:"network-xxxx"}),", whereas the client versioning looks like ",(0,r.jsx)(n.code,{children:"vx.x.xx"}),". For instance, the runtime\nversion shown on the top left section of Polkadot-JS UI below is ",(0,r.jsx)(n.code,{children:"kusama-9370"}),", and the client\n(node) version shown on the top right section is ",(0,r.jsx)(n.code,{children:"v0.9.36"}),"."]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.img,{alt:"Runtime vs Client versioning",src:t(10650).A+"",width:"1917",height:"280"})}),"\n",(0,r.jsxs)(n.admonition,{title:"Querying runtime and client versions",type:"info",children:[(0,r.jsxs)(n.p,{children:["The runtime version can be queried on-chain through Polkadot-JS UI by navigating to the Developer\ntab > Chain State > Storage > system and query ",(0,r.jsx)(n.code,{children:"lastRuntimeUpgrade()"}),"."]}),(0,r.jsxs)(n.p,{children:["The node version can be queried by navigating to the Developer tab > RPC calls > system and query\n",(0,r.jsx)(n.code,{children:"version()"}),"."]})]}),"\n",(0,r.jsx)(n.h2,{id:"runtime-upgrades-for-various-users",children:"Runtime Upgrades for Various Users"}),"\n",(0,r.jsx)(n.h3,{id:"for-infrastructure-providers",children:"For Infrastructure Providers"}),"\n",(0,r.jsx)(n.p,{children:"Infrastructure services include but are not limited to the following:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/docs/maintain-guides-how-to-upgrade",children:"Validators"})}),"\n",(0,r.jsx)(n.li,{children:"API services"}),"\n",(0,r.jsx)(n.li,{children:"Node-as-a-Service (NaaS)"}),"\n",(0,r.jsx)(n.li,{children:"General infrastructure management (e.g. block explorers, custodians)"}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"./wallets",children:"Wallets"})}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"For validators, keeping in sync with the network is key. At times, upgrades will require validators\nto upgrade their clients within a specific time frame, for example, if a release includes breaking\nchanges to networking. It is essential to check the release notes, starting with the upgrade\npriority and acting accordingly."}),"\n",(0,r.jsxs)(n.p,{children:["General infrastructure providers, aside from following the runtime releases and upgrading in a\ntimely manner, should monitor changes to runtime events and auxiliary tooling, such as the\n",(0,r.jsx)(n.a,{href:"https://github.com/paritytech/substrate-api-sidecar",children:"Substrate API Sidecar"}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["Transactions constructed for runtime ",(0,r.jsx)(n.code,{children:"n"})," will not work for any other runtime ",(0,r.jsx)(n.code,{children:">n"}),". If a runtime\nupgrade occurs before broadcasting a previously constructed transaction, you will need to\nreconstruct it with the appropriate runtime version and corresponding metadata."]}),"\n",(0,r.jsxs)(n.h3,{id:"for-nominators",children:["For ",(0,r.jsx)(n.a,{href:"/docs/learn-nominator",children:"Nominators"})]}),"\n",(0,r.jsx)(n.p,{children:"Runtime upgrades don't require any actions by a nominator, though it is always encouraged to keep\nup-to-date and participate with the latest runtime upgrade motions and releases while keeping an eye\non how the nodes on the network are reacting to a new upgrade."}),"\n",(0,r.jsx)(n.h2,{id:"monitoring-runtime-changes",children:"Monitoring Runtime Changes"}),"\n",(0,r.jsxs)(n.p,{children:["You can monitor the chain for upcoming upgrades. The client release notes include the hashes of any\nproposals related to any on-chain upgrades for easy matching. We recommend keeping track of the\nPolkadot Fellowship's\n",(0,r.jsx)(n.a,{href:"https://github.com/polkadot-fellows/runtimes/releases/latest",children:"runtime upgrades"})," to be aware of\nchanges in the runtime logic."]}),"\n",(0,r.jsxs)(n.p,{children:["Runtime upgrades are voted on and executed via ",(0,r.jsx)(n.a,{href:"/docs/learn-polkadot-opengov",children:"Polkadot OpenGov"}),". You\nshould monitor the relay chain as follows to know when the next runtime upgrade will be enacted:"]}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["Check each block for ",(0,r.jsx)(n.code,{children:"referenda (Submitted)"})," events and check if the ",(0,r.jsx)(n.code,{children:"track"})," is ",(0,r.jsx)(n.code,{children:"0"})," or ",(0,r.jsx)(n.code,{children:"1"}),", which\ncorrespond to the ",(0,r.jsx)(n.code,{children:"Root"})," and ",(0,r.jsx)(n.code,{children:"whitelistedCaller"})," tracks, respectively. These are the only tracks\nthat can enact runtime upgrdes. Log the referendum's ",(0,r.jsx)(n.code,{children:"index"}),"; this will help you keep track of\nthe its progress. With the index you can look up the details of the proposal in\n",(0,r.jsx)(n.a,{href:"https://polkadot.polkassembly.io/whitelisted-caller?trackStatus=all&page=1",children:"Polkassembly.io"})," to\nsee if it corresponds with a runtime upgrade."]}),"\n",(0,r.jsxs)(n.li,{children:["Ongoing referenda will have an ",(0,r.jsx)(n.code,{children:"enactment"})," field under ",(0,r.jsx)(n.code,{children:"referenda.ReferendumInfoFor"})," storage.\nThis is the block number that, if passed, the system will attempt to schedule the inner\nproposal's execution for. Note that there are some constraints like a minimum enactment period\nthat could result in the proposal's execution occurring later. It is not possible for the\nproposal to enact ",(0,r.jsx)(n.em,{children:"before"})," this block number."]}),"\n",(0,r.jsxs)(n.li,{children:["Check also for ",(0,r.jsx)(n.code,{children:"referenda (DecisionDepositPlaced)"})," events where ",(0,r.jsx)(n.code,{children:"index"})," matches the one\npreviously found. This means that the required deposit has been placed."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"referenda (DecisionStarted)"})," indicates that the decision period has started for the referendum\nof that ",(0,r.jsx)(n.code,{children:"index"}),"."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"referenda (ConfirmStarted)"})," indicates that ",(0,r.jsx)(n.code,{children:"index"}),"'s referendum has entered the confirmation\nperiod.","\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"referenda (Confirmed)"})," indicates that ",(0,r.jsx)(n.code,{children:"index"}),"'s referendum has been confirmed and will enter\nthe enactment period. With this and ",(0,r.jsx)(n.code,{children:"enactment_moment"}),", you can calculate when the proposal\nwill be enacted."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"referenda (Rejected)"})," indicates that ",(0,r.jsx)(n.code,{children:"index"}),"'s referendum has been rejected and will not be\nenacted."]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["When the runtime upgrades, there will be a ",(0,r.jsx)(n.code,{children:"system(CodeUpdated)"})," event confirming the execution\nof the runtime upgrade."]}),"\n"]})]})}function c(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(h,{...e})}):h(e)}},10650:(e,n,t)=>{t.d(n,{A:()=>r});const r=t.p+"assets/images/runtime-node-version-2903ab51ac01ad44e6424cafc0f63fdf.png"},28453:(e,n,t)=>{t.d(n,{R:()=>a,x:()=>o});var r=t(96540);const i={},s=r.createContext(i);function a(e){const n=r.useContext(s);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:a(e.components),r.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f47489cd.c4eb4050.js b/assets/js/f47489cd.c4eb4050.js new file mode 100644 index 000000000000..c9df389fa4ad --- /dev/null +++ b/assets/js/f47489cd.c4eb4050.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4544],{39892:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>o,default:()=>c,frontMatter:()=>a,metadata:()=>r,toc:()=>d});const r=JSON.parse('{"id":"learn/learn-runtime-upgrades","title":"Runtime Upgrades","description":"Forkless Runtime Upgrades on Polkadot.","source":"@site/../docs/learn/learn-runtime-upgrades.md","sourceDirName":"learn","slug":"/learn-runtime-upgrades","permalink":"/docs/learn-runtime-upgrades","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-runtime-upgrades.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1726760224000,"frontMatter":{"id":"learn-runtime-upgrades","title":"Runtime Upgrades","sidebar_label":"Runtime Upgrades","description":"Forkless Runtime Upgrades on Polkadot.","keywords":["runtime","upgrades","releases","forkless"],"slug":"../learn-runtime-upgrades"},"sidebar":"docs","previous":{"title":"WebAssembly (Wasm)","permalink":"/docs/learn-wasm"},"next":{"title":"Advanced","permalink":"/docs/learn-advanced-index"}}');var s=t(74848),i=t(28453);const a={id:"learn-runtime-upgrades",title:"Runtime Upgrades",sidebar_label:"Runtime Upgrades",description:"Forkless Runtime Upgrades on Polkadot.",keywords:["runtime","upgrades","releases","forkless"],slug:"../learn-runtime-upgrades"},o=void 0,l={},d=[{value:"Forkless Upgrades",id:"forkless-upgrades",level:2},{value:"Forkless Upgrades - Parachains & Solo Chains",id:"forkless-upgrades---parachains--solo-chains",level:3},{value:"Client Releases",id:"client-releases",level:2},{value:"Runtime vs Client versions",id:"runtime-vs-client-versions",level:3},{value:"Runtime Upgrades for Various Users",id:"runtime-upgrades-for-various-users",level:2},{value:"For Infrastructure Providers",id:"for-infrastructure-providers",level:3},{value:"For Nominators",id:"for-nominators",level:3},{value:"Monitoring Runtime Changes",id:"monitoring-runtime-changes",level:2}];function h(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(n.p,{children:["Runtime upgrades allow the relay chain, parachains, and solo blockchains built with the Polkadot SDK\nto change their core business logic (referred to as the ",(0,s.jsx)(n.strong,{children:"runtime"}),") without the need for a hard\nfork."]}),"\n",(0,s.jsx)(n.h2,{id:"forkless-upgrades",children:"Forkless Upgrades"}),"\n",(0,s.jsxs)(n.p,{children:['You may have encountered the term "hard fork" before in the blockchain space. A ',(0,s.jsx)(n.strong,{children:"hard fork"})," occurs\nwhen a blockchain's logic changes such that nodes that do not include the new changes cannot remain\nin consensus with nodes that do. Such changes are backward incompatible. Hard forks can be political\ndue to the nature of the upgrades and logistically demanding due to the number (potentially\nthousands) of nodes in the network that need to upgrade their software. Thus, hard forking is slow,\ninefficient, and error-prone due to the levels of offline coordination required and, therefore, the\npropensity to bundle many upgrades into one large-scale event."]}),"\n",(0,s.jsxs)(n.p,{children:["The usage of ",(0,s.jsx)(n.a,{href:"/docs/learn-wasm",children:"WebAssembly"}),' in the Polkadot SDK (the framework powering Polkadot,\nKusama and their respective parachains), give the relay chain, its parachains, as well as any other\nstandalone solo chains built with the Polkadot SDK the ability to upgrade their runtime (the chain\'s\n"business logic") without a hard fork of the respective network.']}),"\n",(0,s.jsxs)(n.p,{children:["Rather than encoding the runtime in the nodes, Polkadot nodes contain a WebAssembly\n",(0,s.jsx)(n.a,{href:"learn-polkadot-host",children:"execution host"}),". They maintain consensus on a very low-level and\nwell-established instruction set. Upgrades can be small, isolated, and very specific by deploying\nWebAssembly on-chain and having nodes auto-enact the new logic at a particular block height."]}),"\n",(0,s.jsxs)(n.p,{children:["The runtime is stored on the blockchain itself. Polkadot can upgrade its runtime by upgrading the\nlogic stored on-chain and removes the coordination challenge of requiring thousands of node\noperators to upgrade in advance of a given block number. Polkadot stakeholders propose and approve\nupgrades through the ",(0,s.jsx)(n.a,{href:"/docs/learn-polkadot-opengov",children:"on-chain governance"})," system, which also enacts\nthem autonomously once the runtime upgrade referendum is approved through on-chain voting."]}),"\n",(0,s.jsx)(n.p,{children:"As a result of storing the runtime as part of the state, the runtime code itself becomes state\nsensitive, and calls to runtime can change the runtime code itself. Therefore, the Polkadot Host\nmust always ensure it provides the runtime corresponding to the state in which the entry point has\nbeen called."}),"\n",(0,s.jsx)(n.h3,{id:"forkless-upgrades---parachains--solo-chains",children:"Forkless Upgrades - Parachains & Solo Chains"}),"\n",(0,s.jsxs)(n.p,{children:["The node architectural design for parachains and solo chains is similar to that of the relay chain,\nwith the runtime code being a Wasm blob that is stored in chain state. Solo chains built with\nPolkadot SDK, which are blockchains that have a native consensus mechanism that is independent of\nthe relay chain's consensus, can be updated through an on-chain governance system like\n",(0,s.jsx)(n.a,{href:"/docs/learn-polkadot-opengov",children:"OpenGov"})," or a simple sudo/multisig setup."]}),"\n",(0,s.jsx)(n.p,{children:"Parachains must notify the relay chain whenever a new upgrade is to be enacted. This is done using\ntwo key extrinsics:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"https://paritytech.github.io/polkadot-sdk/master/frame_system/pallet/struct.Pallet.html#method.authorize_upgrade",children:(0,s.jsx)(n.code,{children:"system.authorizeUpgrade"})})," -\nnotifies the relay chain that an upgrade is to take place, and thus a new state transition\nfunction is going to be introduced for that parachain to be validated with."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"https://paritytech.github.io/polkadot-sdk/master/frame_system/pallet/struct.Pallet.html#method.apply_authorized_upgrade",children:(0,s.jsx)(n.code,{children:"system.applyAuthorizedUpgrade"})})," -\nenacts the upgrade, assuming it has been approved."]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"client-releases",children:"Client Releases"}),"\n",(0,s.jsxs)(n.p,{children:["The existing runtime logic is followed to update the ",(0,s.jsx)(n.a,{href:"/docs/learn-wasm",children:"Wasm"})," runtime stored on the\nblockchain to a new version. The upgrade is then included in the blockchain itself, meaning that all\nthe nodes on the network execute it. Generally, there is no need to upgrade your nodes manually\nbefore the runtime upgrade, as they will automatically start to follow the new logic of the chain.\nNodes only need to be updated when the runtime requires new host functions, or there is a change in\nnetworking or consensus."]}),"\n",(0,s.jsx)(n.p,{children:"Transactions constructed for a given runtime version will not work on later versions. Therefore, a\ntransaction constructed based on a runtime version will not be valid in later runtime versions. If\nyou can\u2019t submit a transaction before the upgrade, it is better to wait and construct it afterward."}),"\n",(0,s.jsx)(n.p,{children:"Although upgrading your nodes is generally not necessary to follow an upgrade, we recommend\nfollowing the Polkadot releases and upgrading promptly, especially for high-priority or critical\nreleases."}),"\n",(0,s.jsx)(n.admonition,{title:"New Client Releases",type:"info",children:(0,s.jsxs)(n.p,{children:["The details about the latest client releases can be found in the\n",(0,s.jsx)(n.a,{href:"https://github.com/paritytech/polkadot-sdk/releases",children:"releases section on the Polkadot repository"}),".\nA detailed analysis for client releases can be viewed on the\n",(0,s.jsx)(n.a,{href:"https://forum.polkadot.network/tag/release-analysis",children:"Polkadot Forum"}),"."]})}),"\n",(0,s.jsx)(n.h3,{id:"runtime-vs-client-versions",children:"Runtime vs Client versions"}),"\n",(0,s.jsxs)(n.p,{children:["The runtime and client versions are distinct from each other. The runtime versioning typically looks\nlike ",(0,s.jsx)(n.code,{children:"network-xxxx"}),", whereas the client versioning looks like ",(0,s.jsx)(n.code,{children:"vx.x.xx"}),". For instance, the runtime\nversion shown on the top left section of Polkadot-JS UI below is ",(0,s.jsx)(n.code,{children:"kusama-9370"}),", and the client\n(node) version shown on the top right section is ",(0,s.jsx)(n.code,{children:"v0.9.36"}),"."]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"Runtime vs Client versioning",src:t(10650).A+"",width:"1917",height:"280"})}),"\n",(0,s.jsxs)(n.admonition,{title:"Querying runtime and client versions",type:"info",children:[(0,s.jsxs)(n.p,{children:["The runtime version can be queried on-chain through Polkadot-JS UI by navigating to the Developer\ntab > Chain State > Storage > system and query ",(0,s.jsx)(n.code,{children:"lastRuntimeUpgrade()"}),"."]}),(0,s.jsxs)(n.p,{children:["The node version can be queried by navigating to the Developer tab > RPC calls > system and query\n",(0,s.jsx)(n.code,{children:"version()"}),"."]})]}),"\n",(0,s.jsx)(n.h2,{id:"runtime-upgrades-for-various-users",children:"Runtime Upgrades for Various Users"}),"\n",(0,s.jsx)(n.h3,{id:"for-infrastructure-providers",children:"For Infrastructure Providers"}),"\n",(0,s.jsx)(n.p,{children:"Infrastructure services include but are not limited to the following:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"/docs/maintain-guides-how-to-upgrade",children:"Validators"})}),"\n",(0,s.jsx)(n.li,{children:"API services"}),"\n",(0,s.jsx)(n.li,{children:"Node-as-a-Service (NaaS)"}),"\n",(0,s.jsx)(n.li,{children:"General infrastructure management (e.g. block explorers, custodians)"}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"./wallets",children:"Wallets"})}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"For validators, keeping in sync with the network is key. At times, upgrades will require validators\nto upgrade their clients within a specific time frame, for example, if a release includes breaking\nchanges to networking. It is essential to check the release notes, starting with the upgrade\npriority and acting accordingly."}),"\n",(0,s.jsxs)(n.p,{children:["General infrastructure providers, aside from following the runtime releases and upgrading in a\ntimely manner, should monitor changes to runtime events and auxiliary tooling, such as the\n",(0,s.jsx)(n.a,{href:"https://github.com/paritytech/substrate-api-sidecar",children:"Substrate API Sidecar"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["Transactions constructed for runtime ",(0,s.jsx)(n.code,{children:"n"})," will not work for any other runtime ",(0,s.jsx)(n.code,{children:">n"}),". If a runtime\nupgrade occurs before broadcasting a previously constructed transaction, you will need to\nreconstruct it with the appropriate runtime version and corresponding metadata."]}),"\n",(0,s.jsxs)(n.h3,{id:"for-nominators",children:["For ",(0,s.jsx)(n.a,{href:"/docs/learn-nominator",children:"Nominators"})]}),"\n",(0,s.jsx)(n.p,{children:"Runtime upgrades don't require any actions by a nominator, though it is always encouraged to keep\nup-to-date and participate with the latest runtime upgrade motions and releases while keeping an eye\non how the nodes on the network are reacting to a new upgrade."}),"\n",(0,s.jsx)(n.h2,{id:"monitoring-runtime-changes",children:"Monitoring Runtime Changes"}),"\n",(0,s.jsxs)(n.p,{children:["You can monitor the chain for upcoming upgrades. The client release notes include the hashes of any\nproposals related to any on-chain upgrades for easy matching. We recommend keeping track of the\nPolkadot Fellowship's\n",(0,s.jsx)(n.a,{href:"https://github.com/polkadot-fellows/runtimes/releases/latest",children:"runtime upgrades"})," to be aware of\nchanges in the runtime logic."]}),"\n",(0,s.jsxs)(n.p,{children:["Runtime upgrades are voted on and executed via ",(0,s.jsx)(n.a,{href:"/docs/learn-polkadot-opengov",children:"Polkadot OpenGov"}),". You\nshould monitor the relay chain as follows to know when the next runtime upgrade will be enacted:"]}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["Check each block for ",(0,s.jsx)(n.code,{children:"referenda (Submitted)"})," events and check if the ",(0,s.jsx)(n.code,{children:"track"})," is ",(0,s.jsx)(n.code,{children:"0"})," or ",(0,s.jsx)(n.code,{children:"1"}),", which\ncorrespond to the ",(0,s.jsx)(n.code,{children:"Root"})," and ",(0,s.jsx)(n.code,{children:"whitelistedCaller"})," tracks, respectively. These are the only tracks\nthat can enact runtime upgrdes. Log the referendum's ",(0,s.jsx)(n.code,{children:"index"}),"; this will help you keep track of\nthe its progress. With the index you can look up the details of the proposal in\n",(0,s.jsx)(n.a,{href:"https://polkadot.polkassembly.io/whitelisted-caller?trackStatus=all&page=1",children:"Polkassembly.io"})," to\nsee if it corresponds with a runtime upgrade."]}),"\n",(0,s.jsxs)(n.li,{children:["Ongoing referenda will have an ",(0,s.jsx)(n.code,{children:"enactment"})," field under ",(0,s.jsx)(n.code,{children:"referenda.ReferendumInfoFor"})," storage.\nThis is the block number that, if passed, the system will attempt to schedule the inner\nproposal's execution for. Note that there are some constraints like a minimum enactment period\nthat could result in the proposal's execution occurring later. It is not possible for the\nproposal to enact ",(0,s.jsx)(n.em,{children:"before"})," this block number."]}),"\n",(0,s.jsxs)(n.li,{children:["Check also for ",(0,s.jsx)(n.code,{children:"referenda (DecisionDepositPlaced)"})," events where ",(0,s.jsx)(n.code,{children:"index"})," matches the one\npreviously found. This means that the required deposit has been placed."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"referenda (DecisionStarted)"})," indicates that the decision period has started for the referendum\nof that ",(0,s.jsx)(n.code,{children:"index"}),"."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"referenda (ConfirmStarted)"})," indicates that ",(0,s.jsx)(n.code,{children:"index"}),"'s referendum has entered the confirmation\nperiod.","\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"referenda (Confirmed)"})," indicates that ",(0,s.jsx)(n.code,{children:"index"}),"'s referendum has been confirmed and will enter\nthe enactment period. With this and ",(0,s.jsx)(n.code,{children:"enactment_moment"}),", you can calculate when the proposal\nwill be enacted."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"referenda (Rejected)"})," indicates that ",(0,s.jsx)(n.code,{children:"index"}),"'s referendum has been rejected and will not be\nenacted."]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["When the runtime upgrades, there will be a ",(0,s.jsx)(n.code,{children:"system(CodeUpdated)"})," event confirming the execution\nof the runtime upgrade."]}),"\n"]})]})}function c(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}},10650:(e,n,t)=>{t.d(n,{A:()=>r});const r=t.p+"assets/images/runtime-node-version-2903ab51ac01ad44e6424cafc0f63fdf.png"},28453:(e,n,t)=>{t.d(n,{R:()=>a,x:()=>o});var r=t(96540);const s={},i=r.createContext(s);function a(e){const n=r.useContext(i);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:a(e.components),r.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f52abf29.0900be6a.js b/assets/js/f52abf29.0900be6a.js deleted file mode 100644 index c75abcaf3390..000000000000 --- a/assets/js/f52abf29.0900be6a.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9116],{47817:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>a,default:()=>u,frontMatter:()=>o,metadata:()=>s,toc:()=>c});var i=n(74848),r=n(28453);const o={id:"decentralized-futures",title:"Decentralized Futures Program",sidebar_label:"Decentralized Futures",description:"Learn about the Decentralized Futures Program.",keywords:["community","ecosystem","funding"],slug:"../decentralized-futures"},a=void 0,s={id:"general/decentralized-futures",title:"Decentralized Futures Program",description:"Learn about the Decentralized Futures Program.",source:"@site/../docs/general/decentralized-futures.md",sourceDirName:"general",slug:"/decentralized-futures",permalink:"/docs/decentralized-futures",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/decentralized-futures.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1710432171e3,frontMatter:{id:"decentralized-futures",title:"Decentralized Futures Program",sidebar_label:"Decentralized Futures",description:"Learn about the Decentralized Futures Program.",keywords:["community","ecosystem","funding"],slug:"../decentralized-futures"},sidebar:"docs",previous:{title:"Grants",permalink:"/docs/grants"},next:{title:"Treasury",permalink:"/docs/learn-polkadot-opengov-treasury"}},l={},c=[{value:"Overview",id:"overview",level:2},{value:"Program Goal",id:"program-goal",level:2},{value:"Applications",id:"applications",level:2},{value:"Selection Criteria",id:"selection-criteria",level:2}];function d(e){const t={a:"a",h2:"h2",li:"li",p:"p",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(t.p,{children:["The new ",(0,i.jsx)(t.a,{href:"https://futures.web3.foundation/",children:"Decentralized Futures Program"})," supplements the Grants\nProgram, and (as the name suggests) it strengthens the decentralization of the Polkadot ecosystem."]}),"\n",(0,i.jsx)(t.h2,{id:"overview",children:"Overview"}),"\n",(0,i.jsxs)(t.p,{children:["This program is set to distribute ",(0,i.jsx)(t.strong,{children:"20 million USD and 5 million DOT tokens"})," to support individuals\nand teams as they launch new initiatives to grow the Polkadot ecosystem. The main objective is to\nexpand the network by adding self-sustaining participants. Funding is available for Polkadot-focused\norganizations aim to generate profit and for non-profit ventures that have a strategy to secure\nongoing financing through Polkadot's on-chain treasury system beyond 2024."]}),"\n",(0,i.jsx)(t.p,{children:"The Program is run by the Web3 Foundation, which is a not-for-profit organization that supports Web3\nteams and open-source projects through funding, advocacy, research, and collaboration."}),"\n",(0,i.jsx)(t.h2,{id:"program-goal",children:"Program Goal"}),"\n",(0,i.jsx)(t.p,{children:"The goal of the Decentralized Futures Program is to kickstart economically independent, active\nparticipants in the Polkadot ecosystem."}),"\n",(0,i.jsx)(t.h2,{id:"applications",children:"Applications"}),"\n",(0,i.jsxs)(t.p,{children:["To apply for funding to the Decentralized Futures fill\n",(0,i.jsx)(t.a,{href:"https://docs.google.com/forms/d/e/1FAIpQLSdlPyHj56tY6t-5zhdn55VvznR5OACvXe8K1M6vRGmhdslZkw/viewform",children:(0,i.jsx)(t.strong,{children:"this form"})}),".\nThe form will guide you through each step of the application. You are also encouraged to post the\nidea in the ",(0,i.jsx)(t.a,{href:"https://forum.polkadot.network/",children:(0,i.jsx)(t.strong,{children:"Polkadot forum"})})," upfront. If you have any\nquestions, you can reach out to the\n",(0,i.jsx)(t.a,{href:"https://matrix.to/#/#df:web3.foundation",children:(0,i.jsx)(t.strong,{children:"W3F Decentralized Futures Community on Element"})}),"."]}),"\n",(0,i.jsxs)(t.p,{children:["Proposals have to be ",(0,i.jsx)(t.strong,{children:"submitted before July 1st, 2024"}),". Applications will be ",(0,i.jsx)(t.strong,{children:"reviewed from Dec\n1st, 2023 - Jul 31st, 2024"})," on a rolling basis."]}),"\n",(0,i.jsx)(t.h2,{id:"selection-criteria",children:"Selection Criteria"}),"\n",(0,i.jsx)(t.p,{children:"In the current phase, we intentionally maintain openness in our approach. This deliberate choice\nstems from recognizing that specific initiatives demand substantial and bold efforts, often\nincurring significant costs, particularly in areas where traditional go-to-market functions are no\nlonger in play. Conversely, there are instances where individuals require relatively modest funding\nin the tens of thousands to initiate their projects. This broad approach avoids constraining\npeople's creativity and allows for many possibilities. However, it does come with the drawback of\nprolonged application processing times."}),"\n",(0,i.jsx)(t.p,{children:"Several factors significantly enhance the likelihood of application success:"}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsx)(t.li,{children:"A well-thought-out and compelling plan outlining the project\u2019s sustainability beyond 2024 is\ncrucial. While injecting funds into the ecosystem is straightforward, convincing customers or the\ncommunity of the value behind that financial investment poses a more substantial challenge."}),"\n",(0,i.jsx)(t.li,{children:"Applicants are encouraged to provide a detailed breakdown of how the requested funds will be\nutilized, with granularity increasing proportionally with the amount sought. This meticulous\napproach ensures transparency and accountability in the allocation of resources."}),"\n",(0,i.jsx)(t.li,{children:"A demonstrated willingness to receive a more significant portion of the value in long-term DOT\nrather than immediate FIAT, aligning with the broader ecosystem's goals."}),"\n"]})]})}function u(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}},28453:(e,t,n)=>{n.d(t,{R:()=>a,x:()=>s});var i=n(96540);const r={},o=i.createContext(r);function a(e){const t=i.useContext(o);return i.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function s(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:a(e.components),i.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f52abf29.fcc73a63.js b/assets/js/f52abf29.fcc73a63.js new file mode 100644 index 000000000000..3e91ead3b9cd --- /dev/null +++ b/assets/js/f52abf29.fcc73a63.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9116],{57401:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>s,default:()=>u,frontMatter:()=>a,metadata:()=>i,toc:()=>c});const i=JSON.parse('{"id":"general/decentralized-futures","title":"Decentralized Futures Program","description":"Learn about the Decentralized Futures Program.","source":"@site/../docs/general/decentralized-futures.md","sourceDirName":"general","slug":"/decentralized-futures","permalink":"/docs/decentralized-futures","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/decentralized-futures.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1710432171000,"frontMatter":{"id":"decentralized-futures","title":"Decentralized Futures Program","sidebar_label":"Decentralized Futures","description":"Learn about the Decentralized Futures Program.","keywords":["community","ecosystem","funding"],"slug":"../decentralized-futures"},"sidebar":"docs","previous":{"title":"Grants","permalink":"/docs/grants"},"next":{"title":"Treasury","permalink":"/docs/learn-polkadot-opengov-treasury"}}');var r=n(74848),o=n(28453);const a={id:"decentralized-futures",title:"Decentralized Futures Program",sidebar_label:"Decentralized Futures",description:"Learn about the Decentralized Futures Program.",keywords:["community","ecosystem","funding"],slug:"../decentralized-futures"},s=void 0,l={},c=[{value:"Overview",id:"overview",level:2},{value:"Program Goal",id:"program-goal",level:2},{value:"Applications",id:"applications",level:2},{value:"Selection Criteria",id:"selection-criteria",level:2}];function d(e){const t={a:"a",h2:"h2",li:"li",p:"p",strong:"strong",ul:"ul",...(0,o.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(t.p,{children:["The new ",(0,r.jsx)(t.a,{href:"https://futures.web3.foundation/",children:"Decentralized Futures Program"})," supplements the Grants\nProgram, and (as the name suggests) it strengthens the decentralization of the Polkadot ecosystem."]}),"\n",(0,r.jsx)(t.h2,{id:"overview",children:"Overview"}),"\n",(0,r.jsxs)(t.p,{children:["This program is set to distribute ",(0,r.jsx)(t.strong,{children:"20 million USD and 5 million DOT tokens"})," to support individuals\nand teams as they launch new initiatives to grow the Polkadot ecosystem. The main objective is to\nexpand the network by adding self-sustaining participants. Funding is available for Polkadot-focused\norganizations aim to generate profit and for non-profit ventures that have a strategy to secure\nongoing financing through Polkadot's on-chain treasury system beyond 2024."]}),"\n",(0,r.jsx)(t.p,{children:"The Program is run by the Web3 Foundation, which is a not-for-profit organization that supports Web3\nteams and open-source projects through funding, advocacy, research, and collaboration."}),"\n",(0,r.jsx)(t.h2,{id:"program-goal",children:"Program Goal"}),"\n",(0,r.jsx)(t.p,{children:"The goal of the Decentralized Futures Program is to kickstart economically independent, active\nparticipants in the Polkadot ecosystem."}),"\n",(0,r.jsx)(t.h2,{id:"applications",children:"Applications"}),"\n",(0,r.jsxs)(t.p,{children:["To apply for funding to the Decentralized Futures fill\n",(0,r.jsx)(t.a,{href:"https://docs.google.com/forms/d/e/1FAIpQLSdlPyHj56tY6t-5zhdn55VvznR5OACvXe8K1M6vRGmhdslZkw/viewform",children:(0,r.jsx)(t.strong,{children:"this form"})}),".\nThe form will guide you through each step of the application. You are also encouraged to post the\nidea in the ",(0,r.jsx)(t.a,{href:"https://forum.polkadot.network/",children:(0,r.jsx)(t.strong,{children:"Polkadot forum"})})," upfront. If you have any\nquestions, you can reach out to the\n",(0,r.jsx)(t.a,{href:"https://matrix.to/#/#df:web3.foundation",children:(0,r.jsx)(t.strong,{children:"W3F Decentralized Futures Community on Element"})}),"."]}),"\n",(0,r.jsxs)(t.p,{children:["Proposals have to be ",(0,r.jsx)(t.strong,{children:"submitted before July 1st, 2024"}),". Applications will be ",(0,r.jsx)(t.strong,{children:"reviewed from Dec\n1st, 2023 - Jul 31st, 2024"})," on a rolling basis."]}),"\n",(0,r.jsx)(t.h2,{id:"selection-criteria",children:"Selection Criteria"}),"\n",(0,r.jsx)(t.p,{children:"In the current phase, we intentionally maintain openness in our approach. This deliberate choice\nstems from recognizing that specific initiatives demand substantial and bold efforts, often\nincurring significant costs, particularly in areas where traditional go-to-market functions are no\nlonger in play. Conversely, there are instances where individuals require relatively modest funding\nin the tens of thousands to initiate their projects. This broad approach avoids constraining\npeople's creativity and allows for many possibilities. However, it does come with the drawback of\nprolonged application processing times."}),"\n",(0,r.jsx)(t.p,{children:"Several factors significantly enhance the likelihood of application success:"}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsx)(t.li,{children:"A well-thought-out and compelling plan outlining the project\u2019s sustainability beyond 2024 is\ncrucial. While injecting funds into the ecosystem is straightforward, convincing customers or the\ncommunity of the value behind that financial investment poses a more substantial challenge."}),"\n",(0,r.jsx)(t.li,{children:"Applicants are encouraged to provide a detailed breakdown of how the requested funds will be\nutilized, with granularity increasing proportionally with the amount sought. This meticulous\napproach ensures transparency and accountability in the allocation of resources."}),"\n",(0,r.jsx)(t.li,{children:"A demonstrated willingness to receive a more significant portion of the value in long-term DOT\nrather than immediate FIAT, aligning with the broader ecosystem's goals."}),"\n"]})]})}function u(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(d,{...e})}):d(e)}},28453:(e,t,n)=>{n.d(t,{R:()=>a,x:()=>s});var i=n(96540);const r={},o=i.createContext(r);function a(e){const t=i.useContext(o);return i.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function s(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:a(e.components),i.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f750c690.10b36183.js b/assets/js/f750c690.10b36183.js new file mode 100644 index 000000000000..8ea6adf0eaf9 --- /dev/null +++ b/assets/js/f750c690.10b36183.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3261],{76825:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>r,contentTitle:()=>o,default:()=>h,frontMatter:()=>a,metadata:()=>i,toc:()=>c});const i=JSON.parse('{"id":"learn/learn-nft-pallets","title":"NFT Pallets","description":"Functionalities of the NFT Pallets in the Polkadot Ecosystem.","source":"@site/../docs/learn/learn-nft-pallets.md","sourceDirName":"learn","slug":"/learn-nft-pallets","permalink":"/docs/learn-nft-pallets","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-nft-pallets.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1723473960000,"frontMatter":{"id":"learn-nft-pallets","title":"NFT Pallets","sidebar_label":"NFT Pallets","description":"Functionalities of the NFT Pallets in the Polkadot Ecosystem.","keywords":["NFT","non-fungible token","NFT 2.0","nfts","NFT pallets"],"slug":"../learn-nft-pallets"},"sidebar":"docs","previous":{"title":"Advanced Staking Concepts","permalink":"/docs/learn-staking-advanced"},"next":{"title":"Cryptography","permalink":"/docs/learn-cryptography"}}');var s=t(74848),l=t(28453);const a={id:"learn-nft-pallets",title:"NFT Pallets",sidebar_label:"NFT Pallets",description:"Functionalities of the NFT Pallets in the Polkadot Ecosystem.",keywords:["NFT","non-fungible token","NFT 2.0","nfts","NFT pallets"],slug:"../learn-nft-pallets"},o=void 0,r={},c=[{value:"NFTs Pallet",id:"nfts-pallet",level:2},{value:"Roles",id:"roles",level:3},{value:"Attributes",id:"attributes",level:3},{value:"Creating a Collection",id:"creating-a-collection",level:3},{value:"Minting an NFT",id:"minting-an-nft",level:3},{value:"Uploading Files and Metadata",id:"uploading-files-and-metadata",level:3},{value:"Using Apillon",id:"using-apillon",level:4},{value:"Alternative - Using Pinata",id:"alternative---using-pinata",level:4},{value:"Other Actions",id:"other-actions",level:3},{value:"Work in Progress",id:"work-in-progress",level:3},{value:"Uniques Pallet",id:"uniques-pallet",level:2}];function d(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",h4:"h4",img:"img",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,l.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(n.p,{children:["NFT ",(0,s.jsx)(n.a,{href:"/docs/learn-transactions#pallets-and-extrinsics",children:"pallets"})," allow developers to easily implement\nNFT-related actions within their dApp."]}),"\n",(0,s.jsx)(n.h2,{id:"nfts-pallet",children:"NFTs Pallet"}),"\n",(0,s.jsx)(n.admonition,{title:"For Developers Only",type:"info",children:(0,s.jsx)(n.p,{children:"The information presented here below is for developers. A user-friendly portal for NFTs, DEX and\nAssets is under construction."})}),"\n",(0,s.jsxs)(n.p,{children:["NFTs is a\n",(0,s.jsx)(n.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/substrate/frame/nfts#readme",children:"FRAME pallet"}),"\nthat provides a multitude of functions to interact with NFTs."]}),"\n",(0,s.jsxs)(n.p,{children:["The pallet comes with a new way to configure NFTs, as well as configure collections and items.\nPallet-level ",(0,s.jsx)(n.a,{href:"https://github.com/paritytech/substrate/pull/12367",children:"feature flags"})," allow disabling\nfunctionalities not needed in the runtime."]}),"\n",(0,s.jsxs)(n.p,{children:["Polkadot JS API for NFTs FRAME pallet can be found\n",(0,s.jsx)(n.a,{href:"https://polkadot.js.org/docs/substrate/extrinsics#nfts",children:"here"}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"roles",children:"Roles"}),"\n",(0,s.jsx)(n.p,{children:"Setting up a collection implies different roles with different permissions:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Owner:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"destroy collection (to destroy the collection, there should be 0 items left)."}),"\n",(0,s.jsx)(n.li,{children:"redeposit: re-evaluate the deposit on some items."}),"\n",(0,s.jsx)(n.li,{children:"set team: change the collection\u2019s Issuer, Admin, Freezer."}),"\n",(0,s.jsx)(n.li,{children:"set collection max supply: set the maximum number of items for a collection."}),"\n",(0,s.jsx)(n.li,{children:"lock collection: this can include making a collection\u2019s items non-transferable, fixing its max\nsupply, and locking collection metadata and attributes."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Admin:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"set attributes and metadata of a collection."}),"\n",(0,s.jsx)(n.li,{children:"set attributes pre-signed: set attributes for an item by providing the Admin pre-signed\napproval."}),"\n",(0,s.jsxs)(n.li,{children:["lock item properties: lock item metadata and ",(0,s.jsx)(n.a,{href:"#attributes",children:"attributes"}),"."]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Freezer:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"lock item transfer: disallow further item transfers."}),"\n",(0,s.jsx)(n.li,{children:"unlock item transfer: lift a previous lock to transfer an item."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Issuer"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"mint"}),"\n",(0,s.jsx)(n.li,{children:"force mint (with custom item configuration)."}),"\n",(0,s.jsx)(n.li,{children:"mint pre-signed: mint an item by providing the Issuer pre-signed approval."}),"\n",(0,s.jsx)(n.li,{children:"update mint settings."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["Those roles can also be set to ",(0,s.jsx)(n.code,{children:"none"})," without the ability to change them back. This is useful when a\ncollection is created and all the items are minted. Now, by setting roles to ",(0,s.jsx)(n.code,{children:"none"})," we remove the\npossibility of minting any more items, changing the metadata, or disallowing some item's transfer."]}),"\n",(0,s.jsx)(n.h3,{id:"attributes",children:"Attributes"}),"\n",(0,s.jsx)(n.p,{children:"An item can hold the following types of attributes:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"System attributes."})," These attributes can only be set or unset by the pallet. Examples include\nlocking an item for runtimes that use the fractionalization pallet. This is also how users can\nmint from a collection if they hold a valid item from another collection (the system attribute\n",(0,s.jsx)(n.code,{children:"UsedToClaim"})," is set)."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Collection owner\u2019s attributes."})," These are attributes that can only be set or unset by the\ncollection's admin."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"User attributes."})," These are attributes used to store various user-defined settings/values that\ncan only be changed by the NFT's owner. No other account can restrict modifying those attributes."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"External attributes."})," These are attributes that an NFT owner can use to allow external services\n(e.g. oracles, smart contracts on another chain, etc..) to set or modify."]}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"creating-a-collection",children:"Creating a Collection"}),"\n",(0,s.jsxs)(n.p,{children:["You can use the NFTs pallet to create NFT collections. In the Polkadot-JS UI, go to Developer >\nExtrinsic and select the ",(0,s.jsx)(n.code,{children:"nfts.create"})," extrinsic. When you create a collection, you must specify who\nthe admin is. Then, under ",(0,s.jsx)(n.code,{children:"config: PalletNftsCollectionConfig"}),", you can configure your collection by\nspecifying different settings:"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"settings"})," you can specify (in a bitflag-format) settings for your collection:"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"Transferrable items"}),": When disabled, the items will be non-transferrable (good for soul-bound\nNFTs),"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"Unlocked metadata"}),": When disabled, the metadata will be locked,"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"Unlocked attributes"}),": When disabled, the attributes in the ",(0,s.jsx)(n.code,{children:"CollectionOwner"})," namespace will be\nlocked,"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"Unlocked max supply"}),": allows to change the max supply until it gets locked (i.e. the\npossibility to change the supply for a limited amount of time),"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"Deposit required"}),": when disabled, no mint deposit will be taken for items. This option can be\nset by a super-user only."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.admonition,{type:"info",children:(0,s.jsxs)(n.p,{children:["Note that currently, Polkadot-JS UI does not support bitflags. Leave the settings field as it is.\nEverything is unlocked by default (bitflag value ",(0,s.jsx)(n.code,{children:"0"}),")."]})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"maxSupply"})," (toggle option) allows you to specify the maximum number of items that can be minted."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"mintSettings: PalletNftsMintSettings"})," allows you to specify different settings for your\ncollection.","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"mintType"})," gives you the possibility to specify who can mint in your collection:","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"\xccssuer"}),": only you can mint in your collection."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"Public"}),": everyone can mint in your collection."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"HoderOf"}),": only holders of items in another collection can mint in your collection. This\nrequires knowledge about the ID of the other collection. This avoids looping through all\nexisting collections and spamming RPC nodes with requests to find available IDs."]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"price"})," (toggle option) allows you to specify the price of the items."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"startBlock"}),"and ",(0,s.jsx)(n.code,{children:"endBlock"})," give you the possibility to specify a time frame during which the\ncollection's configuration is valid (i.e. all options within\n",(0,s.jsx)(n.code,{children:"config: PalletNftsCollectionConfig"}),")."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"https://github.com/paritytech/substrate/pull/12483",children:"other mint settings"})," include:","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"wave minting, for example mint X number of items that go to collection owners and Y number of\nitems for the public"}),"\n",(0,s.jsx)(n.li,{children:"force mint: minting bypassing mint settings"}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.admonition,{type:"info",children:(0,s.jsx)(n.p,{children:"The user can decide to lock an item or collection\u2019s metadata, attributes, and settings. Also, a\nlocking mechanism can prevent unauthorized and unprivileged transfers (unprivileged actions can be\nre-allowed anytime)."})}),"\n",(0,s.jsxs)(n.p,{children:["With all these options, one can decide to modify the price of the collection's items and who can\nmint, receive or buy items in that collection. Time constraints are available with ",(0,s.jsx)(n.code,{children:"startBlock"})," and\n",(0,s.jsx)(n.code,{children:"endBlock"})," parameters. It is thus possible, for example, to create a schedule in which holders of\nitems in collection A (",(0,s.jsx)(n.code,{children:"HolderOf"})," parameter) will be able to claim a limited number of NFTs from\nCollection X (",(0,s.jsx)(n.code,{children:"maxSupply"})," parameter) only within a specific time frame."]}),"\n",(0,s.jsxs)(n.p,{children:["In Collection X, people can mint the number of NFTs they have in Collection A. It's a one-to-one\nratio. So if they have 3 nfts in collection A, they can mint 3 nfts in collection X. Each time they\nuse one nft in Collection A, the said NFT will have an attribute that will block its further use to\nmint in Collection X. But it will be possible to mint in another collection Y if it also uses\ncollection A as a ",(0,s.jsx)(n.code,{children:"HolderOf"}),"."]}),"\n",(0,s.jsx)(n.p,{children:"You can modify the parameters, so anyone can buy more NFTs from Collection X. To buy an NFT you must\npay the item price + transaction fee. Even if the item is free, the transaction fee always apply."}),"\n",(0,s.jsx)(n.p,{children:"This can be useful for events such as Hackathons where participants who bought a ticket receive the\nNFT ticket from Collection A. Then, all holders of at least one item in Collection A (i.e. all\nticket holders) will be given free avatar NFT from Collection X within the event schedule. After the\nevent, any additional remaining items in Collection X can be made available to the public through a\nmarketplace."}),"\n",(0,s.jsx)(n.p,{children:"The requirement to get the free avatar is to hold at least one NFT in Collection A. One can only\nclaim the avatar specifying which NFT (i.e. the ID) they own in Collection A. The same NFT cannot be\nused twice. Holders of multiple NFTs in Collection A (for example, participants in multiple\nHackathons) can claim multiple avatars specific to each event."}),"\n",(0,s.jsx)(n.admonition,{title:"Time frame must be updated",type:"warning",children:(0,s.jsxs)(n.p,{children:["Someone trying to mint an NFT outside the specified time frame will trigger a ",(0,s.jsx)(n.code,{children:"NoConfig"})," error, as\nthe collection\u2019s admin has specified no configuration after the time frame ends. The collection's\nadmin must call the ",(0,s.jsx)(n.code,{children:"updateMintSettings"})," extrinsic and add a new schedule or disable the block\nnumber option."]})}),"\n",(0,s.jsxs)(n.p,{children:["After you minted an NFT, check which NFT IDs you own under which collection. In the Polkadot-JS UI\ngo to Developer > Chain State > Storage, select the ",(0,s.jsx)(n.code,{children:"nfts.account"})," extrinsic, and specify the\naccount owning the NFT and the collection ID. You can also see all your collections by selecting the\n",(0,s.jsx)(n.code,{children:"collectionAccount"})," extrinsic."]}),"\n",(0,s.jsx)(n.p,{children:"When a new collection is created, a new ID will be generated and assigned to it. When a collection\nis destroyed, no one can pick up the collection ID again (including the owner)."}),"\n",(0,s.jsx)(n.h3,{id:"minting-an-nft",children:"Minting an NFT"}),"\n",(0,s.jsxs)(n.p,{children:["You can mint an NFT using the ",(0,s.jsx)(n.code,{children:"nfts.mint"})," extrinsic. You must then specify the following:"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"collection"}),", the collection ID where you want to mint"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"item"}),", the item ID"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"mintTo"}),", the account"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"witnessData"})," (toggle option), you can specify if you own an NFT in another collection"]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"Creating an item usually involves setting some attributes specific to that item."}),"\n",(0,s.jsx)(n.h3,{id:"uploading-files-and-metadata",children:"Uploading Files and Metadata"}),"\n",(0,s.jsx)(n.h4,{id:"using-apillon",children:"Using Apillon"}),"\n",(0,s.jsx)(n.p,{children:"When you have a collection ID and an item ID you need to:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Open an account on ",(0,s.jsx)(n.a,{href:"https://app.apillon.io/",children:"Apillon"})," and create a new project."]}),"\n",(0,s.jsxs)(n.li,{children:["Navigate to ",(0,s.jsx)(n.a,{href:"https://app.apillon.io/dashboard/service/storage",children:"the Apillon Storage service"})," and\ncreate a new storage bucket. Upload the file you want to mint to the bucket."]}),"\n",(0,s.jsxs)(n.li,{children:["After the file has been uploaded and pinned to IPFS, click on the file to open its details and\ncopy the\n",(0,s.jsx)(n.a,{href:"https://docs.ipfs.tech/concepts/content-addressing/#what-is-a-cid",children:"Content Identifier (CID)"}),".\nThis unique string of letters and numbers will act as a marker to link the data uploaded onto\n",(0,s.jsx)(n.a,{href:"https://ipfs.tech/#how",children:"IPFS"})," to the collection or item ID you own."]}),"\n",(0,s.jsx)(n.li,{children:"Prepare the JSON metadata file and add your CID (see below):"}),"\n"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:'{\n "name":"Your Collection Name",\n "description":"Collection\'s Description",\n "image":"Your Collection CID"\n}\n'})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Upload the metadata file to Apillon Storage and get the updated CID."}),"\n"]}),"\n",(0,s.jsx)(n.h4,{id:"alternative---using-pinata",children:"Alternative - Using Pinata"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Open an account on ",(0,s.jsx)(n.a,{href:"https://www.pinata.cloud/",children:"Pinata"}),"."]}),"\n",(0,s.jsxs)(n.li,{children:["Follow\n",(0,s.jsx)(n.a,{href:"https://docs.pinata.cloud/what-can-i-learn-here/pinning-your-first-file-with-pinata",children:"these steps"}),"\nto upload the file you want to mint."]}),"\n",(0,s.jsxs)(n.li,{children:["After uploading your file, get the\n",(0,s.jsx)(n.a,{href:"https://docs.ipfs.tech/concepts/content-addressing/#what-is-a-cid",children:"Content Identifier (CID)"}),".\nThis unique string of letters and numbers will act as a marker to link the data uploaded onto\n",(0,s.jsx)(n.a,{href:"https://ipfs.tech/#how",children:"IPFS"})," to the collection or item ID you own."]}),"\n",(0,s.jsx)(n.li,{children:"Prepare the metadata file and add your CID (see below):"}),"\n"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:'{\n "name":"Your Collection Name",\n "description":"Collection\'s Description",\n "image":"Your Collection CID"\n}\n'})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Upload the metadata file to Pinata and get the updated CID."}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["After minting your NFT on the Polkadot-JS UI, you can add the CID. Go to Developer > Extrinsics and\nselect the ",(0,s.jsx)(n.code,{children:"nfts.setCollectionMetadata"})," (for collections) or ",(0,s.jsx)(n.code,{children:"nfts.setMetadata"})," (for single NFTs)\nextrinsic. Under the ",(0,s.jsx)(n.code,{children:"data: Bytes"})," field you can enter the CID or upload the metadata file."]}),"\n",(0,s.jsx)(n.p,{children:"The collection can be created and its item minted before uploading the NFT file and related\nmetadata. The minting process on-chain will assign a collection and item ID to your account. Those\nIDs will later be populated with NFT files, metadata, and attributes. Once you upload the NFT files\nand related data, the above-mentioned extrinsics can be used to update a collection or item."}),"\n",(0,s.jsx)(n.admonition,{title:"NFT/DEX/Asset Portal",type:"info",children:(0,s.jsx)(n.p,{children:'With the new NFT/DEX/Asset portal, all the above steps will be executed "under the hood" and the\nuser will not have to worry about all technicalities.'})}),"\n",(0,s.jsx)(n.h3,{id:"other-actions",children:"Other Actions"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Buying an item up for sale."}),"\n",(0,s.jsx)(n.li,{children:"Burning (i.e., destroy) items or a single item (burning must be signed either by the admin of the\ncollection or the owner)."}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"https://github.com/paritytech/substrate/pull/12702",children:"Smart attributes"})," allow an NFT owner to grant\npermission to other entities (another account, an application, an oracle, etc.) to update\nattributes of an NFT. An example could be that all Polkadot fellowship members have an NFT badge\nthat gets updated over time (sort of a rank) with a consequent upgrade in membership permissions."]}),"\n",(0,s.jsxs)(n.li,{children:["A collection is managed by the\n",(0,s.jsx)(n.a,{href:"/docs/learn-assets#creation-and-management",children:"Issuer, the Admin, and the Freezer"}),". Those roles can\nbe changed anytime."]}),"\n",(0,s.jsx)(n.li,{children:"Setting metadata for an item or collection (metadata includes all essential information about the\nitem or the collection). Metadata could consist of any arbitrary data like the IPFS hash."}),"\n",(0,s.jsx)(n.li,{children:"Setting or re-setting the price of an item."}),"\n",(0,s.jsx)(n.li,{children:"Clearing attributes and metadata of a collection or an item."}),"\n",(0,s.jsx)(n.li,{children:"Changing the owner of an item or a collection."}),"\n",(0,s.jsxs)(n.li,{children:["Transferring an item, as well as creating and canceling transfer approvals of a specific item, or\nan ",(0,s.jsx)(n.a,{href:"https://github.com/paritytech/substrate/pull/12285",children:"atomic swap"}),"."]}),"\n",(0,s.jsx)(n.li,{children:"Transferring ownership of an item."}),"\n",(0,s.jsx)(n.li,{children:"Delegating accounts: Delegated accounts can approve changes to an item's attributes and transfer\nan item. The item owner always has control and can decide to cancel approvals from a delegated\naccount."}),"\n",(0,s.jsx)(n.li,{children:"One can also execute pending atomic swaps created by a counterpart."}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"work-in-progress",children:"Work in Progress"}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.a,{href:"https://github.com/paritytech/substrate/pull/12565",children:"NFTs fractionalization"})," will allow the user to:"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Take ownership of an NFT from the ",(0,s.jsx)(n.a,{href:"#nfts-pallet",children:"pallet-nfts"})]}),"\n",(0,s.jsxs)(n.li,{children:["Create a new asset in ",(0,s.jsx)(n.a,{href:"https://polkadot.js.org/docs/substrate/extrinsics#assets",children:"pallet-assets"})]}),"\n",(0,s.jsx)(n.li,{children:"Mint the input amount to the previous owner of the NFT as the beneficiary"}),"\n",(0,s.jsx)(n.li,{children:"Mass minting: Minting multiple items in one single transaction. This will require the user to\nprovide a .csv file with two columns: NFT ID and CID of metadata."}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"uniques-pallet",children:"Uniques Pallet"}),"\n",(0,s.jsx)(n.admonition,{type:"info",children:(0,s.jsxs)(n.p,{children:["The Uniques Pallet is deprecated. Everything related to NFTs will be covered by the\n",(0,s.jsx)(n.a,{href:"#nfts-pallet",children:"NFTs Pallet"}),"."]})}),"\n",(0,s.jsxs)(n.p,{children:["Uniques is a\n",(0,s.jsx)(n.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/substrate/frame/uniques",children:"FRAME pallet"}),"\ndeployed on the Asset Hub system parachain. It implements the most basic kind of NFT -- a data\nrecord referencing some metadata. This metadata reference is mutable until frozen, so NFTs and their\nclasses (entities derived from) are mutable unless specifically made immutable by the issuer."]}),"\n",(0,s.jsx)(n.p,{children:"Uniques takes a very bare-bones approach on purpose to keep the Asset Hub chain a simple\nbalance-keeping chain for both fungible and non-fungibles."}),"\n",(0,s.jsxs)(n.p,{children:["These NFTs can be viewed and interacted with on ",(0,s.jsx)(n.a,{href:"https://singular.app",children:"RMRK's Singular platform"}),", by\nswitching the top right menu from Kusama to the Asset Hub."]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"nft-hub",src:t(52991).A+"",width:"2110",height:"617"})}),"\n",(0,s.jsxs)(n.p,{children:["They can also be interacted with directly through the\n",(0,s.jsx)(n.a,{href:"https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fkusama-asset-hub-rpc.polkadot.io#/extrinsics",children:"extrinsics tab of the Asset Hub"}),":"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"uniques.png",src:t(17147).A+"",width:"997",height:"608"})})]})}function h(e={}){const{wrapper:n}={...(0,l.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},52991:(e,n,t)=>{t.d(n,{A:()=>i});const i=t.p+"assets/images/hub-nft-48ec78c3fcc8199d7d9164959424d5e3.png"},17147:(e,n,t)=>{t.d(n,{A:()=>i});const i=t.p+"assets/images/uniques-cd3bd4a76bd57ef0e79de4a0b36aa237.png"},28453:(e,n,t)=>{t.d(n,{R:()=>a,x:()=>o});var i=t(96540);const s={},l=i.createContext(s);function a(e){const n=i.useContext(l);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:a(e.components),i.createElement(l.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f750c690.9a8d37b1.js b/assets/js/f750c690.9a8d37b1.js deleted file mode 100644 index 0aa24432e683..000000000000 --- a/assets/js/f750c690.9a8d37b1.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3261],{16117:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>r,contentTitle:()=>a,default:()=>h,frontMatter:()=>s,metadata:()=>o,toc:()=>c});var i=t(74848),l=t(28453);const s={id:"learn-nft-pallets",title:"NFT Pallets",sidebar_label:"NFT Pallets",description:"Functionalities of the NFT Pallets in the Polkadot Ecosystem.",keywords:["NFT","non-fungible token","NFT 2.0","nfts","NFT pallets"],slug:"../learn-nft-pallets"},a=void 0,o={id:"learn/learn-nft-pallets",title:"NFT Pallets",description:"Functionalities of the NFT Pallets in the Polkadot Ecosystem.",source:"@site/../docs/learn/learn-nft-pallets.md",sourceDirName:"learn",slug:"/learn-nft-pallets",permalink:"/docs/learn-nft-pallets",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-nft-pallets.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:172347396e4,frontMatter:{id:"learn-nft-pallets",title:"NFT Pallets",sidebar_label:"NFT Pallets",description:"Functionalities of the NFT Pallets in the Polkadot Ecosystem.",keywords:["NFT","non-fungible token","NFT 2.0","nfts","NFT pallets"],slug:"../learn-nft-pallets"},sidebar:"docs",previous:{title:"Advanced Staking Concepts",permalink:"/docs/learn-staking-advanced"},next:{title:"Cryptography",permalink:"/docs/learn-cryptography"}},r={},c=[{value:"NFTs Pallet",id:"nfts-pallet",level:2},{value:"Roles",id:"roles",level:3},{value:"Attributes",id:"attributes",level:3},{value:"Creating a Collection",id:"creating-a-collection",level:3},{value:"Minting an NFT",id:"minting-an-nft",level:3},{value:"Uploading Files and Metadata",id:"uploading-files-and-metadata",level:3},{value:"Using Apillon",id:"using-apillon",level:4},{value:"Alternative - Using Pinata",id:"alternative---using-pinata",level:4},{value:"Other Actions",id:"other-actions",level:3},{value:"Work in Progress",id:"work-in-progress",level:3},{value:"Uniques Pallet",id:"uniques-pallet",level:2}];function d(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",h4:"h4",img:"img",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,l.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(n.p,{children:["NFT ",(0,i.jsx)(n.a,{href:"/docs/learn-transactions#pallets-and-extrinsics",children:"pallets"})," allow developers to easily implement\nNFT-related actions within their dApp."]}),"\n",(0,i.jsx)(n.h2,{id:"nfts-pallet",children:"NFTs Pallet"}),"\n",(0,i.jsx)(n.admonition,{title:"For Developers Only",type:"info",children:(0,i.jsx)(n.p,{children:"The information presented here below is for developers. A user-friendly portal for NFTs, DEX and\nAssets is under construction."})}),"\n",(0,i.jsxs)(n.p,{children:["NFTs is a\n",(0,i.jsx)(n.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/substrate/frame/nfts#readme",children:"FRAME pallet"}),"\nthat provides a multitude of functions to interact with NFTs."]}),"\n",(0,i.jsxs)(n.p,{children:["The pallet comes with a new way to configure NFTs, as well as configure collections and items.\nPallet-level ",(0,i.jsx)(n.a,{href:"https://github.com/paritytech/substrate/pull/12367",children:"feature flags"})," allow disabling\nfunctionalities not needed in the runtime."]}),"\n",(0,i.jsxs)(n.p,{children:["Polkadot JS API for NFTs FRAME pallet can be found\n",(0,i.jsx)(n.a,{href:"https://polkadot.js.org/docs/substrate/extrinsics#nfts",children:"here"}),"."]}),"\n",(0,i.jsx)(n.h3,{id:"roles",children:"Roles"}),"\n",(0,i.jsx)(n.p,{children:"Setting up a collection implies different roles with different permissions:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:"Owner:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"destroy collection (to destroy the collection, there should be 0 items left)."}),"\n",(0,i.jsx)(n.li,{children:"redeposit: re-evaluate the deposit on some items."}),"\n",(0,i.jsx)(n.li,{children:"set team: change the collection\u2019s Issuer, Admin, Freezer."}),"\n",(0,i.jsx)(n.li,{children:"set collection max supply: set the maximum number of items for a collection."}),"\n",(0,i.jsx)(n.li,{children:"lock collection: this can include making a collection\u2019s items non-transferable, fixing its max\nsupply, and locking collection metadata and attributes."}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:"Admin:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"set attributes and metadata of a collection."}),"\n",(0,i.jsx)(n.li,{children:"set attributes pre-signed: set attributes for an item by providing the Admin pre-signed\napproval."}),"\n",(0,i.jsxs)(n.li,{children:["lock item properties: lock item metadata and ",(0,i.jsx)(n.a,{href:"#attributes",children:"attributes"}),"."]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:"Freezer:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"lock item transfer: disallow further item transfers."}),"\n",(0,i.jsx)(n.li,{children:"unlock item transfer: lift a previous lock to transfer an item."}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:"Issuer"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"mint"}),"\n",(0,i.jsx)(n.li,{children:"force mint (with custom item configuration)."}),"\n",(0,i.jsx)(n.li,{children:"mint pre-signed: mint an item by providing the Issuer pre-signed approval."}),"\n",(0,i.jsx)(n.li,{children:"update mint settings."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["Those roles can also be set to ",(0,i.jsx)(n.code,{children:"none"})," without the ability to change them back. This is useful when a\ncollection is created and all the items are minted. Now, by setting roles to ",(0,i.jsx)(n.code,{children:"none"})," we remove the\npossibility of minting any more items, changing the metadata, or disallowing some item's transfer."]}),"\n",(0,i.jsx)(n.h3,{id:"attributes",children:"Attributes"}),"\n",(0,i.jsx)(n.p,{children:"An item can hold the following types of attributes:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"System attributes."})," These attributes can only be set or unset by the pallet. Examples include\nlocking an item for runtimes that use the fractionalization pallet. This is also how users can\nmint from a collection if they hold a valid item from another collection (the system attribute\n",(0,i.jsx)(n.code,{children:"UsedToClaim"})," is set)."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Collection owner\u2019s attributes."})," These are attributes that can only be set or unset by the\ncollection's admin."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"User attributes."})," These are attributes used to store various user-defined settings/values that\ncan only be changed by the NFT's owner. No other account can restrict modifying those attributes."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"External attributes."})," These are attributes that an NFT owner can use to allow external services\n(e.g. oracles, smart contracts on another chain, etc..) to set or modify."]}),"\n"]}),"\n",(0,i.jsx)(n.h3,{id:"creating-a-collection",children:"Creating a Collection"}),"\n",(0,i.jsxs)(n.p,{children:["You can use the NFTs pallet to create NFT collections. In the Polkadot-JS UI, go to Developer >\nExtrinsic and select the ",(0,i.jsx)(n.code,{children:"nfts.create"})," extrinsic. When you create a collection, you must specify who\nthe admin is. Then, under ",(0,i.jsx)(n.code,{children:"config: PalletNftsCollectionConfig"}),", you can configure your collection by\nspecifying different settings:"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"settings"})," you can specify (in a bitflag-format) settings for your collection:"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"Transferrable items"}),": When disabled, the items will be non-transferrable (good for soul-bound\nNFTs),"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"Unlocked metadata"}),": When disabled, the metadata will be locked,"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"Unlocked attributes"}),": When disabled, the attributes in the ",(0,i.jsx)(n.code,{children:"CollectionOwner"})," namespace will be\nlocked,"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"Unlocked max supply"}),": allows to change the max supply until it gets locked (i.e. the\npossibility to change the supply for a limited amount of time),"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"Deposit required"}),": when disabled, no mint deposit will be taken for items. This option can be\nset by a super-user only."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.admonition,{type:"info",children:(0,i.jsxs)(n.p,{children:["Note that currently, Polkadot-JS UI does not support bitflags. Leave the settings field as it is.\nEverything is unlocked by default (bitflag value ",(0,i.jsx)(n.code,{children:"0"}),")."]})}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"maxSupply"})," (toggle option) allows you to specify the maximum number of items that can be minted."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"mintSettings: PalletNftsMintSettings"})," allows you to specify different settings for your\ncollection.","\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"mintType"})," gives you the possibility to specify who can mint in your collection:","\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"\xccssuer"}),": only you can mint in your collection."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"Public"}),": everyone can mint in your collection."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"HoderOf"}),": only holders of items in another collection can mint in your collection. This\nrequires knowledge about the ID of the other collection. This avoids looping through all\nexisting collections and spamming RPC nodes with requests to find available IDs."]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"price"})," (toggle option) allows you to specify the price of the items."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"startBlock"}),"and ",(0,i.jsx)(n.code,{children:"endBlock"})," give you the possibility to specify a time frame during which the\ncollection's configuration is valid (i.e. all options within\n",(0,i.jsx)(n.code,{children:"config: PalletNftsCollectionConfig"}),")."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.a,{href:"https://github.com/paritytech/substrate/pull/12483",children:"other mint settings"})," include:","\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"wave minting, for example mint X number of items that go to collection owners and Y number of\nitems for the public"}),"\n",(0,i.jsx)(n.li,{children:"force mint: minting bypassing mint settings"}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.admonition,{type:"info",children:(0,i.jsx)(n.p,{children:"The user can decide to lock an item or collection\u2019s metadata, attributes, and settings. Also, a\nlocking mechanism can prevent unauthorized and unprivileged transfers (unprivileged actions can be\nre-allowed anytime)."})}),"\n",(0,i.jsxs)(n.p,{children:["With all these options, one can decide to modify the price of the collection's items and who can\nmint, receive or buy items in that collection. Time constraints are available with ",(0,i.jsx)(n.code,{children:"startBlock"})," and\n",(0,i.jsx)(n.code,{children:"endBlock"})," parameters. It is thus possible, for example, to create a schedule in which holders of\nitems in collection A (",(0,i.jsx)(n.code,{children:"HolderOf"})," parameter) will be able to claim a limited number of NFTs from\nCollection X (",(0,i.jsx)(n.code,{children:"maxSupply"})," parameter) only within a specific time frame."]}),"\n",(0,i.jsxs)(n.p,{children:["In Collection X, people can mint the number of NFTs they have in Collection A. It's a one-to-one\nratio. So if they have 3 nfts in collection A, they can mint 3 nfts in collection X. Each time they\nuse one nft in Collection A, the said NFT will have an attribute that will block its further use to\nmint in Collection X. But it will be possible to mint in another collection Y if it also uses\ncollection A as a ",(0,i.jsx)(n.code,{children:"HolderOf"}),"."]}),"\n",(0,i.jsx)(n.p,{children:"You can modify the parameters, so anyone can buy more NFTs from Collection X. To buy an NFT you must\npay the item price + transaction fee. Even if the item is free, the transaction fee always apply."}),"\n",(0,i.jsx)(n.p,{children:"This can be useful for events such as Hackathons where participants who bought a ticket receive the\nNFT ticket from Collection A. Then, all holders of at least one item in Collection A (i.e. all\nticket holders) will be given free avatar NFT from Collection X within the event schedule. After the\nevent, any additional remaining items in Collection X can be made available to the public through a\nmarketplace."}),"\n",(0,i.jsx)(n.p,{children:"The requirement to get the free avatar is to hold at least one NFT in Collection A. One can only\nclaim the avatar specifying which NFT (i.e. the ID) they own in Collection A. The same NFT cannot be\nused twice. Holders of multiple NFTs in Collection A (for example, participants in multiple\nHackathons) can claim multiple avatars specific to each event."}),"\n",(0,i.jsx)(n.admonition,{title:"Time frame must be updated",type:"warning",children:(0,i.jsxs)(n.p,{children:["Someone trying to mint an NFT outside the specified time frame will trigger a ",(0,i.jsx)(n.code,{children:"NoConfig"})," error, as\nthe collection\u2019s admin has specified no configuration after the time frame ends. The collection's\nadmin must call the ",(0,i.jsx)(n.code,{children:"updateMintSettings"})," extrinsic and add a new schedule or disable the block\nnumber option."]})}),"\n",(0,i.jsxs)(n.p,{children:["After you minted an NFT, check which NFT IDs you own under which collection. In the Polkadot-JS UI\ngo to Developer > Chain State > Storage, select the ",(0,i.jsx)(n.code,{children:"nfts.account"})," extrinsic, and specify the\naccount owning the NFT and the collection ID. You can also see all your collections by selecting the\n",(0,i.jsx)(n.code,{children:"collectionAccount"})," extrinsic."]}),"\n",(0,i.jsx)(n.p,{children:"When a new collection is created, a new ID will be generated and assigned to it. When a collection\nis destroyed, no one can pick up the collection ID again (including the owner)."}),"\n",(0,i.jsx)(n.h3,{id:"minting-an-nft",children:"Minting an NFT"}),"\n",(0,i.jsxs)(n.p,{children:["You can mint an NFT using the ",(0,i.jsx)(n.code,{children:"nfts.mint"})," extrinsic. You must then specify the following:"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"collection"}),", the collection ID where you want to mint"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"item"}),", the item ID"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"mintTo"}),", the account"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"witnessData"})," (toggle option), you can specify if you own an NFT in another collection"]}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"Creating an item usually involves setting some attributes specific to that item."}),"\n",(0,i.jsx)(n.h3,{id:"uploading-files-and-metadata",children:"Uploading Files and Metadata"}),"\n",(0,i.jsx)(n.h4,{id:"using-apillon",children:"Using Apillon"}),"\n",(0,i.jsx)(n.p,{children:"When you have a collection ID and an item ID you need to:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["Open an account on ",(0,i.jsx)(n.a,{href:"https://app.apillon.io/",children:"Apillon"})," and create a new project."]}),"\n",(0,i.jsxs)(n.li,{children:["Navigate to ",(0,i.jsx)(n.a,{href:"https://app.apillon.io/dashboard/service/storage",children:"the Apillon Storage service"})," and\ncreate a new storage bucket. Upload the file you want to mint to the bucket."]}),"\n",(0,i.jsxs)(n.li,{children:["After the file has been uploaded and pinned to IPFS, click on the file to open its details and\ncopy the\n",(0,i.jsx)(n.a,{href:"https://docs.ipfs.tech/concepts/content-addressing/#what-is-a-cid",children:"Content Identifier (CID)"}),".\nThis unique string of letters and numbers will act as a marker to link the data uploaded onto\n",(0,i.jsx)(n.a,{href:"https://ipfs.tech/#how",children:"IPFS"})," to the collection or item ID you own."]}),"\n",(0,i.jsx)(n.li,{children:"Prepare the JSON metadata file and add your CID (see below):"}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:'{\n "name":"Your Collection Name",\n "description":"Collection\'s Description",\n "image":"Your Collection CID"\n}\n'})}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Upload the metadata file to Apillon Storage and get the updated CID."}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"alternative---using-pinata",children:"Alternative - Using Pinata"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["Open an account on ",(0,i.jsx)(n.a,{href:"https://www.pinata.cloud/",children:"Pinata"}),"."]}),"\n",(0,i.jsxs)(n.li,{children:["Follow\n",(0,i.jsx)(n.a,{href:"https://docs.pinata.cloud/what-can-i-learn-here/pinning-your-first-file-with-pinata",children:"these steps"}),"\nto upload the file you want to mint."]}),"\n",(0,i.jsxs)(n.li,{children:["After uploading your file, get the\n",(0,i.jsx)(n.a,{href:"https://docs.ipfs.tech/concepts/content-addressing/#what-is-a-cid",children:"Content Identifier (CID)"}),".\nThis unique string of letters and numbers will act as a marker to link the data uploaded onto\n",(0,i.jsx)(n.a,{href:"https://ipfs.tech/#how",children:"IPFS"})," to the collection or item ID you own."]}),"\n",(0,i.jsx)(n.li,{children:"Prepare the metadata file and add your CID (see below):"}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:'{\n "name":"Your Collection Name",\n "description":"Collection\'s Description",\n "image":"Your Collection CID"\n}\n'})}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Upload the metadata file to Pinata and get the updated CID."}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["After minting your NFT on the Polkadot-JS UI, you can add the CID. Go to Developer > Extrinsics and\nselect the ",(0,i.jsx)(n.code,{children:"nfts.setCollectionMetadata"})," (for collections) or ",(0,i.jsx)(n.code,{children:"nfts.setMetadata"})," (for single NFTs)\nextrinsic. Under the ",(0,i.jsx)(n.code,{children:"data: Bytes"})," field you can enter the CID or upload the metadata file."]}),"\n",(0,i.jsx)(n.p,{children:"The collection can be created and its item minted before uploading the NFT file and related\nmetadata. The minting process on-chain will assign a collection and item ID to your account. Those\nIDs will later be populated with NFT files, metadata, and attributes. Once you upload the NFT files\nand related data, the above-mentioned extrinsics can be used to update a collection or item."}),"\n",(0,i.jsx)(n.admonition,{title:"NFT/DEX/Asset Portal",type:"info",children:(0,i.jsx)(n.p,{children:'With the new NFT/DEX/Asset portal, all the above steps will be executed "under the hood" and the\nuser will not have to worry about all technicalities.'})}),"\n",(0,i.jsx)(n.h3,{id:"other-actions",children:"Other Actions"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Buying an item up for sale."}),"\n",(0,i.jsx)(n.li,{children:"Burning (i.e., destroy) items or a single item (burning must be signed either by the admin of the\ncollection or the owner)."}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.a,{href:"https://github.com/paritytech/substrate/pull/12702",children:"Smart attributes"})," allow an NFT owner to grant\npermission to other entities (another account, an application, an oracle, etc.) to update\nattributes of an NFT. An example could be that all Polkadot fellowship members have an NFT badge\nthat gets updated over time (sort of a rank) with a consequent upgrade in membership permissions."]}),"\n",(0,i.jsxs)(n.li,{children:["A collection is managed by the\n",(0,i.jsx)(n.a,{href:"/docs/learn-assets#creation-and-management",children:"Issuer, the Admin, and the Freezer"}),". Those roles can\nbe changed anytime."]}),"\n",(0,i.jsx)(n.li,{children:"Setting metadata for an item or collection (metadata includes all essential information about the\nitem or the collection). Metadata could consist of any arbitrary data like the IPFS hash."}),"\n",(0,i.jsx)(n.li,{children:"Setting or re-setting the price of an item."}),"\n",(0,i.jsx)(n.li,{children:"Clearing attributes and metadata of a collection or an item."}),"\n",(0,i.jsx)(n.li,{children:"Changing the owner of an item or a collection."}),"\n",(0,i.jsxs)(n.li,{children:["Transferring an item, as well as creating and canceling transfer approvals of a specific item, or\nan ",(0,i.jsx)(n.a,{href:"https://github.com/paritytech/substrate/pull/12285",children:"atomic swap"}),"."]}),"\n",(0,i.jsx)(n.li,{children:"Transferring ownership of an item."}),"\n",(0,i.jsx)(n.li,{children:"Delegating accounts: Delegated accounts can approve changes to an item's attributes and transfer\nan item. The item owner always has control and can decide to cancel approvals from a delegated\naccount."}),"\n",(0,i.jsx)(n.li,{children:"One can also execute pending atomic swaps created by a counterpart."}),"\n"]}),"\n",(0,i.jsx)(n.h3,{id:"work-in-progress",children:"Work in Progress"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.a,{href:"https://github.com/paritytech/substrate/pull/12565",children:"NFTs fractionalization"})," will allow the user to:"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["Take ownership of an NFT from the ",(0,i.jsx)(n.a,{href:"#nfts-pallet",children:"pallet-nfts"})]}),"\n",(0,i.jsxs)(n.li,{children:["Create a new asset in ",(0,i.jsx)(n.a,{href:"https://polkadot.js.org/docs/substrate/extrinsics#assets",children:"pallet-assets"})]}),"\n",(0,i.jsx)(n.li,{children:"Mint the input amount to the previous owner of the NFT as the beneficiary"}),"\n",(0,i.jsx)(n.li,{children:"Mass minting: Minting multiple items in one single transaction. This will require the user to\nprovide a .csv file with two columns: NFT ID and CID of metadata."}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"uniques-pallet",children:"Uniques Pallet"}),"\n",(0,i.jsx)(n.admonition,{type:"info",children:(0,i.jsxs)(n.p,{children:["The Uniques Pallet is deprecated. Everything related to NFTs will be covered by the\n",(0,i.jsx)(n.a,{href:"#nfts-pallet",children:"NFTs Pallet"}),"."]})}),"\n",(0,i.jsxs)(n.p,{children:["Uniques is a\n",(0,i.jsx)(n.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/substrate/frame/uniques",children:"FRAME pallet"}),"\ndeployed on the Asset Hub system parachain. It implements the most basic kind of NFT -- a data\nrecord referencing some metadata. This metadata reference is mutable until frozen, so NFTs and their\nclasses (entities derived from) are mutable unless specifically made immutable by the issuer."]}),"\n",(0,i.jsx)(n.p,{children:"Uniques takes a very bare-bones approach on purpose to keep the Asset Hub chain a simple\nbalance-keeping chain for both fungible and non-fungibles."}),"\n",(0,i.jsxs)(n.p,{children:["These NFTs can be viewed and interacted with on ",(0,i.jsx)(n.a,{href:"https://singular.app",children:"RMRK's Singular platform"}),", by\nswitching the top right menu from Kusama to the Asset Hub."]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"nft-hub",src:t(52991).A+"",width:"2110",height:"617"})}),"\n",(0,i.jsxs)(n.p,{children:["They can also be interacted with directly through the\n",(0,i.jsx)(n.a,{href:"https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fkusama-asset-hub-rpc.polkadot.io#/extrinsics",children:"extrinsics tab of the Asset Hub"}),":"]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"uniques.png",src:t(17147).A+"",width:"997",height:"608"})})]})}function h(e={}){const{wrapper:n}={...(0,l.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}},52991:(e,n,t)=>{t.d(n,{A:()=>i});const i=t.p+"assets/images/hub-nft-48ec78c3fcc8199d7d9164959424d5e3.png"},17147:(e,n,t)=>{t.d(n,{A:()=>i});const i=t.p+"assets/images/uniques-cd3bd4a76bd57ef0e79de4a0b36aa237.png"},28453:(e,n,t)=>{t.d(n,{R:()=>a,x:()=>o});var i=t(96540);const l={},s=i.createContext(l);function a(e){const n=i.useContext(s);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(l):e.components||l:a(e.components),i.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f7acb151.18190b7d.js b/assets/js/f7acb151.18190b7d.js new file mode 100644 index 000000000000..c1978ee62579 --- /dev/null +++ b/assets/js/f7acb151.18190b7d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2783],{91689:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>l,contentTitle:()=>d,default:()=>u,frontMatter:()=>r,metadata:()=>n,toc:()=>c});const n=JSON.parse('{"id":"learn/learn-guides-assets-create","title":"Polkadot-JS Guides about Creating Assets","description":"Polkadot-JS Guides about Creating Assets.","source":"@site/../docs/learn/learn-guides-assets-create.md","sourceDirName":"learn","slug":"/learn-guides-assets-create","permalink":"/docs/learn-guides-assets-create","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-assets-create.md","tags":[],"version":"current","lastUpdatedBy":"Radha","lastUpdatedAt":1730750958000,"frontMatter":{"id":"learn-guides-assets-create","title":"Polkadot-JS Guides about Creating Assets","sidebar_label":"Create Asset Guides","description":"Polkadot-JS Guides about Creating Assets.","keywords":["asset hub","assets","statemine","statemint","polkadot-js"],"slug":"../learn-guides-assets-create"},"sidebar":"docs","previous":{"title":"Asset Hub Guides","permalink":"/docs/learn-guides-assets"},"next":{"title":"Asset Conversion Tutorials","permalink":"/docs/learn-guides-asset-conversion"}}');var a=t(74848),o=t(28453),i=t(67141);const r={id:"learn-guides-assets-create",title:"Polkadot-JS Guides about Creating Assets",sidebar_label:"Create Asset Guides",description:"Polkadot-JS Guides about Creating Assets.",keywords:["asset hub","assets","statemine","statemint","polkadot-js"],slug:"../learn-guides-assets-create"},d=void 0,l={},c=[{value:"Creating Assets on the Asset Hub with Polkadot-JS",id:"creating-assets-on-the-asset-hub-with-polkadot-js",level:2}];function h(e){const s={a:"a",admonition:"admonition",code:"code",h2:"h2",img:"img",li:"li",p:"p",strong:"strong",ul:"ul",...(0,o.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the Polkadot-JS UI, you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,a.jsxs)(s.p,{children:["The Asset Hub is a generic assets system parachain which provides functionality for deploying and\ntransferring assets \u2014 both Fungible and Non-Fungible Tokens (NFTs). The native token of the Asset\nhub is the same as the relay chain's native asset (DOT or KSM). The Existential Deposit (ED),\ntransaction fees, and the deposits for proxy/multisig operations are about\n",(0,a.jsx)(s.a,{href:"/docs/chain-state-values#existential-deposit-2",children:"1/10th of the values on the relay chains"}),".\nApart from the native token, the assets held on the Asset Hub can be broadly categorized as"]}),"\n",(0,a.jsxs)(s.ul,{children:["\n",(0,a.jsx)(s.li,{children:"Assets backed by an on-chain protocol\u2019s utility"}),"\n",(0,a.jsx)(s.li,{children:"Assets with off-chain backing"}),"\n",(0,a.jsx)(s.li,{children:"Assets without any backing"}),"\n"]}),"\n",(0,a.jsxs)(s.p,{children:["For additional background on the Asset Hub check out\n",(0,a.jsx)(s.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181800-what-is-statemint-and-statemine-and-how-do-i-use-them-",children:"this support article"}),"."]}),"\n",(0,a.jsx)(s.h2,{id:"creating-assets-on-the-asset-hub-with-polkadot-js",children:"Creating Assets on the Asset Hub with Polkadot-JS"}),"\n",(0,a.jsxs)(s.admonition,{type:"info",children:[(0,a.jsxs)(s.p,{children:["Before minting assets on the Asset Hub, we recommend that you try out this tutorial on Westend Asset\nHub, which is a system parachain on Westend test network. The WND tokens (Westies) can be teleported\nfrom Westend to Westend Asset Hub, are available for free through a\n",(0,a.jsx)(s.a,{href:"https://faucet.polkadot.io/",children:"faucet"}),"."]}),(0,a.jsx)(s.p,{children:(0,a.jsx)(s.strong,{children:"The images in the guides below are for Polkadot, but they also apply to Kusama."})})]}),"\n",(0,a.jsxs)(s.p,{children:["To create an asset on the Asset Hub, you would need to\n",(0,a.jsx)(s.a,{href:"/docs/chain-state-values#asset-deposit",children:"deposit some funds"}),". Before you create an asset on\nthe Asset Hub, ensure that your Asset Hub account balance is a bit more than the sum of those two\ndeposits, which should seamlessly account for the required deposits and transaction fees. You can\nsend the native token from a relay chain account to a the Asset Hub account using the teleport\nfunctionality. For instructions on teleporting tokens, check this\n",(0,a.jsx)(s.a,{href:"/docs/learn-teleport",children:"page on Teleports"}),"."]}),"\n",(0,a.jsx)(s.p,{children:"Assuming you have the required balance on your Asset Hub account, the following instructions should\nlet you successfully create an asset on the Asset Hub"}),"\n",(0,a.jsxs)(s.ul,{children:["\n",(0,a.jsxs)(s.li,{children:["Access the Asset Hub through ",(0,a.jsx)(s.a,{href:"https://polkadot.js.org/apps/#/explorer",children:"Polkadot-JS UI"}),"."]}),"\n",(0,a.jsxs)(s.li,{children:["Check the next available Asset ID. This can be queried on-chain by navigating to Developer > Chain\nState > Storage and then ",(0,a.jsx)(s.code,{children:"assets.nextAssetId()"}),"."]}),"\n"]}),"\n",(0,a.jsx)(s.p,{children:(0,a.jsx)(s.img,{alt:"Query AssetId",src:t(26180).A+"",width:"2880",height:"946"})}),"\n",(0,a.jsxs)(s.ul,{children:["\n",(0,a.jsx)(s.li,{children:"Navigate to Network > Assets."}),"\n"]}),"\n",(0,a.jsx)(s.p,{children:(0,a.jsx)(s.img,{alt:"Navigate to Assets page",src:t(99776).A+"",width:"1710",height:"554"})}),"\n",(0,a.jsxs)(s.ul,{children:["\n",(0,a.jsxs)(s.li,{children:["Click on the create button and you will be presented with a pop-up window. Choose the creator\naccount, name of the asset to be displayed on the Asset Hub, the asset's symbol, number of\ndecimals for the asset, the minimum balance required to hold this asset on an Asset Hub account\nand the most important field of your asset - the unique asset ID. This has to be the value\nreturned by the ",(0,a.jsx)(s.code,{children:"assets.nextAssetId()"})," query shown earlier. After all the details are entered,\nclick on the next button."]}),"\n"]}),"\n",(0,a.jsx)(s.p,{children:(0,a.jsx)(s.img,{alt:"Add Asset Metadata",src:t(23977).A+"",width:"2154",height:"1137"})}),"\n",(0,a.jsxs)(s.ul,{children:["\n",(0,a.jsx)(s.li,{children:"Choose the admin, issuer and the freezer accounts for your asset and click on the create button."}),"\n"]}),"\n",(0,a.jsx)(s.p,{children:(0,a.jsx)(s.img,{alt:"Asset managing accounts",src:t(59442).A+"",width:"1518",height:"510"})}),"\n",(0,a.jsxs)(s.ul,{children:["\n",(0,a.jsx)(s.li,{children:"Sign and submit the transaction (If you like to verify the transaction details before signing, you\ncan click on the dropdown button pointed by the arrow in the snapshot below)."}),"\n"]}),"\n",(0,a.jsx)(s.p,{children:(0,a.jsx)(s.img,{alt:"Sign asset creating transaction",src:t(80987).A+"",width:"1520",height:"610"})}),"\n",(0,a.jsx)(s.p,{children:"If the transaction is successful, you should see the asset and its details displayed in the\nNetwork > Assets page on the Asset Hub."})]})}function u(e={}){const{wrapper:s}={...(0,o.R)(),...e.components};return s?(0,a.jsx)(s,{...e,children:(0,a.jsx)(h,{...e})}):h(e)}},67141:(e,s,t)=>{t.d(s,{A:()=>o});var n=t(96540),a=t(74848);const o=function(e){var s,t=e.message,o=(0,n.useState)(!0),i=o[0],r=o[1];return(0,a.jsx)(a.Fragment,{children:i&&(0,a.jsxs)("div",{className:"message-box",children:[(0,a.jsx)("button",{className:"close-button",onClick:function(){r(!1)},children:"\u2716 "}),(0,a.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(s=t,s.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},99776:(e,s,t)=>{t.d(s,{A:()=>n});const n=t.p+"assets/images/hub-asset-0-71cbceb69c712729d7920b4575ab8f46.png"},23977:(e,s,t)=>{t.d(s,{A:()=>n});const n=t.p+"assets/images/hub-asset-1-6dac2fc07bfbe323a6795f85adfe6b19.png"},59442:(e,s,t)=>{t.d(s,{A:()=>n});const n=t.p+"assets/images/hub-asset-2-2fd6118841d0c4e037d5f51c6b1010e1.png"},80987:(e,s,t)=>{t.d(s,{A:()=>n});const n=t.p+"assets/images/hub-asset-3-3952e84a1b7c80239e8fb1f907af2583.png"},26180:(e,s,t)=>{t.d(s,{A:()=>n});const n=t.p+"assets/images/hub-asset-4-02cab90d3a97c942b1a545dc46674eb3.png"},28453:(e,s,t)=>{t.d(s,{R:()=>i,x:()=>r});var n=t(96540);const a={},o=n.createContext(a);function i(e){const s=n.useContext(o);return n.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function r(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:i(e.components),n.createElement(o.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f7acb151.ca2168e5.js b/assets/js/f7acb151.ca2168e5.js deleted file mode 100644 index b1bfd7b6d9e4..000000000000 --- a/assets/js/f7acb151.ca2168e5.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2783],{43143:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>l,contentTitle:()=>r,default:()=>u,frontMatter:()=>i,metadata:()=>d,toc:()=>c});var n=t(74848),a=t(28453),o=t(67141);const i={id:"learn-guides-assets-create",title:"Polkadot-JS Guides about Creating Assets",sidebar_label:"Create Asset Guides",description:"Polkadot-JS Guides about Creating Assets.",keywords:["asset hub","assets","statemine","statemint","polkadot-js"],slug:"../learn-guides-assets-create"},r=void 0,d={id:"learn/learn-guides-assets-create",title:"Polkadot-JS Guides about Creating Assets",description:"Polkadot-JS Guides about Creating Assets.",source:"@site/../docs/learn/learn-guides-assets-create.md",sourceDirName:"learn",slug:"/learn-guides-assets-create",permalink:"/docs/learn-guides-assets-create",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-assets-create.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1729847256e3,frontMatter:{id:"learn-guides-assets-create",title:"Polkadot-JS Guides about Creating Assets",sidebar_label:"Create Asset Guides",description:"Polkadot-JS Guides about Creating Assets.",keywords:["asset hub","assets","statemine","statemint","polkadot-js"],slug:"../learn-guides-assets-create"},sidebar:"docs",previous:{title:"Asset Hub Guides",permalink:"/docs/learn-guides-assets"},next:{title:"Asset Conversion Tutorials",permalink:"/docs/learn-guides-asset-conversion"}},l={},c=[{value:"Creating Assets on the Asset Hub with Polkadot-JS",id:"creating-assets-on-the-asset-hub-with-polkadot-js",level:2}];function h(e){const s={a:"a",admonition:"admonition",h2:"h2",img:"img",li:"li",p:"p",strong:"strong",ul:"ul",...(0,a.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(o.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the Polkadot-JS UI, you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,n.jsxs)(s.p,{children:["The Asset Hub is a generic assets system parachain which provides functionality for deploying and\ntransferring assets \u2014 both Fungible and Non-Fungible Tokens (NFTs). The native token of the Asset\nhub is the same as the relay chain's native asset (DOT or KSM). The Existential Deposit (ED),\ntransaction fees, and the deposits for proxy/multisig operations are about\n",(0,n.jsx)(s.a,{href:"/docs/chain-state-values#existential-deposit-2",children:"1/10th of the values on the relay chains"}),".\nApart from the native token, the assets held on the Asset Hub can be broadly categorized as"]}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsx)(s.li,{children:"Assets backed by an on-chain protocol\u2019s utility"}),"\n",(0,n.jsx)(s.li,{children:"Assets with off-chain backing"}),"\n",(0,n.jsx)(s.li,{children:"Assets without any backing"}),"\n"]}),"\n",(0,n.jsxs)(s.p,{children:["For additional background on the Asset Hub check out\n",(0,n.jsx)(s.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181800-what-is-statemint-and-statemine-and-how-do-i-use-them-",children:"this support article"}),"."]}),"\n",(0,n.jsx)(s.h2,{id:"creating-assets-on-the-asset-hub-with-polkadot-js",children:"Creating Assets on the Asset Hub with Polkadot-JS"}),"\n",(0,n.jsxs)(s.admonition,{type:"info",children:[(0,n.jsxs)(s.p,{children:["Before minting assets on the Asset Hub, we recommend that you try out this tutorial on Westend Asset\nHub, which is a system parachain on Westend test network. The WND tokens (Westies) can be teleported\nfrom Westend to Westend Asset Hub, are available for free through a\n",(0,n.jsx)(s.a,{href:"/docs/learn-DOT#getting-tokens-on-the-westend-testnet",children:"faucet"}),"."]}),(0,n.jsx)(s.p,{children:(0,n.jsx)(s.strong,{children:"The images in the guides below are for Polkadot, but they also apply to Kusama."})})]}),"\n",(0,n.jsxs)(s.p,{children:["To create an asset on the Asset Hub, you would need to\n",(0,n.jsx)(s.a,{href:"/docs/chain-state-values#asset-deposit",children:"deposit some funds"}),". Before you create an asset on\nthe Asset Hub, ensure that your Asset Hub account balance is a bit more than the sum of those two\ndeposits, which should seamlessly account for the required deposits and transaction fees. You can\nsend the native token from a relay chain account to a the Asset Hub account using the teleport\nfunctionality. For instructions on teleporting tokens, check this\n",(0,n.jsx)(s.a,{href:"/docs/learn-teleport",children:"page on Teleports"}),"."]}),"\n",(0,n.jsx)(s.p,{children:"Assuming you have the required balance on your Asset Hub account, the following instructions should\nlet you successfully create an asset on the Asset Hub"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:["Access the Asset Hub through ",(0,n.jsx)(s.a,{href:"https://polkadot.js.org/apps/#/explorer",children:"Polkadot-JS UI"}),"."]}),"\n",(0,n.jsx)(s.li,{children:"Navigate to Network > Assets."}),"\n"]}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.img,{alt:"Navigate to Assets page",src:t(99776).A+"",width:"1710",height:"554"})}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsx)(s.li,{children:"Click on the create button and you will be presented with a pop-up window. Choose the creator\naccount, name of the asset to be displayed on the Asset Hub, the asset's symbol, number of\ndecimals for the asset, the minimum balance required to hold this asset on an Asset Hub account\nand the most important field of your asset - the unique asset ID. The UI would not let you enter\nan ID that has already been taken. After all the details are entered, click on the next button."}),"\n"]}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.img,{alt:"Add Asset Metadata",src:t(23977).A+"",width:"1510",height:"798"})}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsx)(s.li,{children:"Choose the admin, issuer and the freezer accounts for your asset and click on the create button."}),"\n"]}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.img,{alt:"Asset managing accounts",src:t(59442).A+"",width:"1518",height:"510"})}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsx)(s.li,{children:"Sign and submit the transaction (If you like to verify the transaction details before signing, you\ncan click on the dropdown button pointed by the arrow in the snapshot below)."}),"\n"]}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.img,{alt:"Sign asset creating transaction",src:t(80987).A+"",width:"1520",height:"610"})}),"\n",(0,n.jsx)(s.p,{children:"If the transaction is successful, you should see the asset and its details displayed in the\nNetwork > Assets page on the Asset Hub."})]})}function u(e={}){const{wrapper:s}={...(0,a.R)(),...e.components};return s?(0,n.jsx)(s,{...e,children:(0,n.jsx)(h,{...e})}):h(e)}},67141:(e,s,t)=>{t.d(s,{A:()=>o});var n=t(96540),a=t(74848);const o=function(e){var s,t=e.message,o=(0,n.useState)(!0),i=o[0],r=o[1];return(0,a.jsx)(a.Fragment,{children:i&&(0,a.jsxs)("div",{className:"message-box",children:[(0,a.jsx)("button",{className:"close-button",onClick:function(){r(!1)},children:"\u2716 "}),(0,a.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(s=t,s.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},99776:(e,s,t)=>{t.d(s,{A:()=>n});const n=t.p+"assets/images/hub-asset-0-71cbceb69c712729d7920b4575ab8f46.png"},23977:(e,s,t)=>{t.d(s,{A:()=>n});const n=t.p+"assets/images/hub-asset-1-6f406281abdca9f5c2941ebd4d9479fd.png"},59442:(e,s,t)=>{t.d(s,{A:()=>n});const n=t.p+"assets/images/hub-asset-2-2fd6118841d0c4e037d5f51c6b1010e1.png"},80987:(e,s,t)=>{t.d(s,{A:()=>n});const n=t.p+"assets/images/hub-asset-3-3952e84a1b7c80239e8fb1f907af2583.png"},28453:(e,s,t)=>{t.d(s,{R:()=>i,x:()=>r});var n=t(96540);const a={},o=n.createContext(a);function i(e){const s=n.useContext(o);return n.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function r(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:i(e.components),n.createElement(o.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f8518919.1e804f33.js b/assets/js/f8518919.1e804f33.js deleted file mode 100644 index 3c042325d6b4..000000000000 --- a/assets/js/f8518919.1e804f33.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4484],{74390:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>s,default:()=>h,frontMatter:()=>o,metadata:()=>r,toc:()=>l});var i=t(74848),a=t(28453);const o={id:"web3-and-polkadot",title:"Web3 and Polkadot",sidebar_label:"Web3 and Polkadot",description:"Introduction to Web3 and Polkadot's Role in shaping the Web3 Vision.",keywords:["web3","polkadot","light clients","decentralization"],slug:"../web3-and-polkadot"},s=void 0,r={id:"general/web3-and-polkadot",title:"Web3 and Polkadot",description:"Introduction to Web3 and Polkadot's Role in shaping the Web3 Vision.",source:"@site/../docs/general/web3-and-polkadot.md",sourceDirName:"general",slug:"/web3-and-polkadot",permalink:"/docs/web3-and-polkadot",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/web3-and-polkadot.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1726729579e3,frontMatter:{id:"web3-and-polkadot",title:"Web3 and Polkadot",sidebar_label:"Web3 and Polkadot",description:"Introduction to Web3 and Polkadot's Role in shaping the Web3 Vision.",keywords:["web3","polkadot","light clients","decentralization"],slug:"../web3-and-polkadot"},sidebar:"docs",previous:{title:"General",permalink:"/docs/general-index"},next:{title:"Polkadot Vision",permalink:"/docs/polkadot-vision-index"}},c={},l=[{value:"Data Ownership",id:"data-ownership",level:2},{value:"Trustless Environment",id:"trustless-environment",level:2},{value:"Data Immutability",id:"data-immutability",level:2},{value:"Data Retrievability",id:"data-retrievability",level:2},{value:"Decentralization",id:"decentralization",level:3},{value:"Decentralized Storage",id:"decentralized-storage",level:3},{value:"Stake Allocation",id:"stake-allocation",level:3},{value:"Economic Incentives",id:"economic-incentives",level:3},{value:"Governance and Treasury",id:"governance-and-treasury",level:3},{value:"Decentralized Access Points",id:"decentralized-access-points",level:2},{value:"Interoperability",id:"interoperability",level:2}];function d(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",p:"p",strong:"strong",...(0,a.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.p,{children:"Back in the early 2000's the internet featured read-only, static, basic web pages. The online\nconnected world at the time was only the beginning of virtual data, identities, and more. The\ninternet during this time can be viewed as its first version (Web1)."}),"\n",(0,i.jsx)(n.p,{children:"As social media platforms and online businesses began to emerge, the internet transformed into its\nnext iteration - the Web2. This upgraded internet, which we use today, features dynamic, interactive\nweb pages, where users can read and write information and publish their own for others to see.\nHowever, this version of the web comes with downsides, dealing with data control, privacy issues,\nand the consequences of trusting centralized entities to store our data on their servers. This is\nwhere Web3 comes into the picture."}),"\n",(0,i.jsxs)(n.p,{children:["Web3 is transforming applications hosted on centralized infrastructure into decentralized\napplications (dApps) powered by trust-free blockchain protocols. The goal is to transform the\ninternet into a decentralized web, where users control their data and identity in a trust-free\nenvironment. The Web3 movement aims to remove intermediaries and build trustless infrastructure.\nWeb3 is an interactive and collaborative web where users can read, write, and ",(0,i.jsx)(n.strong,{children:"own"})," data."]}),"\n",(0,i.jsx)(n.admonition,{title:"The Web3 Movement",type:"note",children:(0,i.jsxs)(n.p,{children:["To learn more about the Web3 movement, check out this video from the\n",(0,i.jsx)(n.a,{href:"https://youtu.be/l44z35vabvA",children:"Web3 Summit"})]})}),"\n",(0,i.jsx)(n.h2,{id:"data-ownership",children:"Data Ownership"}),"\n",(0,i.jsxs)(n.p,{children:["In web3, ownership is achieved and validated through cryptography. Each user has a digital identity\nbound to a set of cryptographic keys usually based on the public key cryptographic scheme, i.e., the\nfamous ",(0,i.jsx)(n.strong,{children:"public and private key pair"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["Unlike Web2 which is driven by email IDs, phone numbers, and passwords, users onboarding to Web3\njust need to generate a key pair. The public key can be the identity that can be shared with anybody\nto send you messages or assets, while the private key is used to access your account, sign messages,\ntransfer funds, edit identity details, etc. ",(0,i.jsx)(n.a,{href:"/docs/learn-scams",children:"Keeping your private key secure"})," is\nessential to avoid identity theft or consequent loss of funds. Currently, scams are one of the main\nfactors hindering web3 adoption. No legitimate person or entity will ever ask you to share your\nprivate key, and those who attempt to do so are likely trying to steal your digital identity and\nanything you own related to it."]}),"\n",(0,i.jsxs)(n.p,{children:["To mitigate risks of key mismanagement (for ",(0,i.jsx)(n.strong,{children:"non-custodial"})," accounts, i.e. when you have custody\nof your keys) there are ",(0,i.jsx)(n.a,{href:"/docs/learn-account-abstraction",children:"account abstraction"})," solutions that\nseparate the key management from the user experience. To mitigate key hacks, there are cold wallet\nsolutions where the private key is generated and stored on dedicated devices with secure elements\nthat are not exposed to the internet (see ",(0,i.jsx)(n.a,{href:"/docs/ledger",children:"Ledger"}),"), or dedicated applications that can\nbe installed on air-gapped devices such as phones (see ",(0,i.jsx)(n.a,{href:"/docs/polkadot-vault",children:"Polkadot Vault"}),"). For\n",(0,i.jsx)(n.strong,{children:"custodial"})," accounts, you trust third parties to manage your keys and give you access whenever\nneeded."]}),"\n",(0,i.jsxs)(n.p,{children:["To summarize, data ownership comes from the fact that any message you sign with your private key\ncomes from your digital identity, and the signature proof can be cryptographically verified. Unless\nsomeone else stole your keys, you and only you are held accountable for signing the messages and are\nresponsible for the information on your account. Transferring an ",(0,i.jsx)(n.a,{href:"./learn-nft-index",children:"NFT"})," between\ntwo accounts is essentially a transfer of ownership."]}),"\n",(0,i.jsx)(n.h2,{id:"trustless-environment",children:"Trustless Environment"}),"\n",(0,i.jsx)(n.p,{children:"Cryptography also brings the possibility of building a trustless environment where we do not have to\ntrust third parties, or have any relationship between the sender and receiver of a message. We do\nnot need to trust centralized entities since we can verify who wrote the message and who owns what\njust by using cryptography. Trust is embedded in the code. Well-audited and reviewed code ultimately\nprovides a solid, trustless environment."}),"\n",(0,i.jsx)(n.h2,{id:"data-immutability",children:"Data Immutability"}),"\n",(0,i.jsx)(n.p,{children:"But what if the data we own can be easily modified or tampered with after they have been signed and\nstored?"}),"\n",(0,i.jsxs)(n.p,{children:["Here is where ",(0,i.jsx)(n.strong,{children:"blockchain"})," technology plays an important role. Blockchain networks comprise of\ndistributed state machines where increments of data are stored within blocks that build on each\nother using hash functions. For example, the hash of block ",(0,i.jsx)(n.code,{children:"N + 1"})," contains data of that block\ntogether with the hash of the previous block ",(0,i.jsx)(n.code,{children:"N"}),". This creates the situation where if you modify the\ncontent of block ",(0,i.jsx)(n.code,{children:"N"})," you will change the hash of block ",(0,i.jsx)(n.code,{children:"N + 1"}),", ",(0,i.jsx)(n.code,{children:"N + 2"}),", etc. essentially breaking\nthe chain. Although it can be possible to add an invalid block (a block with invalid transactions)\nor censor certain transactions, if the blockchain network is not sufficiently decentralized. In\ndecentralized proof-of-stake blockchains like Polkadot such attacks are financially expensive, and\nattempting to do it can get you ",(0,i.jsx)(n.a,{href:"/docs/learn-offenses",children:"slashed"}),"."]}),"\n",(0,i.jsx)(n.p,{children:"So, with blockchain as a means of storing data and transactions permanently without an option to\nmodify them, we can ensure what we cryptographically sign with our digital identity is set in stone\ndigitally."}),"\n",(0,i.jsx)(n.h2,{id:"data-retrievability",children:"Data Retrievability"}),"\n",(0,i.jsx)(n.p,{children:"But what if our data are stored in a blockchain, but that blockchain is run on a centralized server\nor by different computers belonging to the same operator?"}),"\n",(0,i.jsx)(n.p,{children:"That server or those computers can be easily shut down, the blockchain can be stopped from running\nand its data wiped out. This can be achieved from the inside by the malicious network participants\nor from the outside by regulatory rules and other forces. Though blockchain offers immutability,\nthere would be little sense in using a centralized blockchain to prove ownership as it can possibly\ncease to exist in the future."}),"\n",(0,i.jsx)(n.p,{children:"Data retrievability is dependent on how resilient the blockchain is. Resiliency is achieved through\nelements such as decentralization, economic incentives, and on-chain governance to ensure the\nnetwork can sustain on its own."}),"\n",(0,i.jsxs)(n.admonition,{title:"Data Retrievability vs. Data Availability",type:"info",children:[(0,i.jsxs)(n.p,{children:["Data ",(0,i.jsx)(n.strong,{children:"retrievability"})," is the ability of nodes to retrieve\xa0historical information\xa0from the\nblockchain. Historical data is not needed to verify new blocks; it is only required for synching\nfull nodes from the Genesis block or serving specific historical requests."]}),(0,i.jsxs)(n.p,{children:["Data ",(0,i.jsx)(n.strong,{children:"availability"})," assures full nodes can access and verify the full transactions associated with\na specific block. It does not necessarily imply that the data is accessible forever. For more\ninformation about data availability on Polkadot, see the\n",(0,i.jsx)(n.a,{href:"/docs/learn-parachains-protocol#availability-and-validity-anv-protocol",children:"dedicated section on the parachain protocol page"}),"."]})]}),"\n",(0,i.jsx)(n.h3,{id:"decentralization",children:"Decentralization"}),"\n",(0,i.jsx)(n.p,{children:"Having multiple nodes belonging to numerous independent identities increases network resiliency and\nthus data retrievability."}),"\n",(0,i.jsx)(n.p,{children:"Blockchain is a state machine, and consensus must be achieved on every single state transition by\nevery node on the blockchain network. In Proof of Work (PoW) based blockchains, which let any node\nin the network produce a block, consensus is achieved probabilistically by building on the longest\nchain (at the cost of energy-intensive computations). Proof of Stake (PoS) based blockchains like\nPolkadot enable deterministic consensus by allowing only a limited number of privileged nodes to\nproduce blocks. A PoW blockchain can be considered centralized if a single entity can capture 51% of\nnetwork nodes. Similarly, a PoS blockchain can be considered centralized if a single entity controls\nmore than one-third of nodes, as a two-thirds majority is required to arrive at a deterministic\nconsensus. Different blockchains have different levels of decentralization."}),"\n",(0,i.jsxs)(n.p,{children:["Nowadays, most of the nodes cannot be run on consumer-grade hardware. Node running equipment is\ntypically rented through service providers. Resiliency is also achieved by ensuring nodes run on as\nmany different providers as possible and avoiding a significant share of the nodes being run under\nthe same provider in the same geographic region. A legislation change or a natural disaster could\nimpact a considerable fraction of the nodes and potentially stop the network. Polkadot's level of\ndecentralization can be explored through the ",(0,i.jsx)(n.a,{href:"https://polkawatch.app/",children:"Polkawatch app"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.a,{href:"/docs/thousand-validators",children:"One Thousand Validator Programme"})," aims to incentivize the creation of\nnew validator nodes to increase the level of node decentralization."]}),"\n",(0,i.jsx)(n.h3,{id:"decentralized-storage",children:"Decentralized Storage"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.a,{href:"./glossary/#blockspace",children:"Blockspace"})," is limited and valuable. Not all data we have can be stored on\nthe blockchain. Large files like pictures, music, movies, etc., typically will never be held on the\nblockchain. But where can we stored those files? To stick to the web3 vision, we need a resilient\nand decentralized storage solution."]}),"\n",(0,i.jsxs)(n.p,{children:["The most important thing is that the proof of ownership is stored on the blockchain through the\nhashes of data and metadata. The files are uploaded on decentralized storage networks hosting\nprotocols like ",(0,i.jsx)(n.a,{href:"https://ipfs.tech/",children:"IPFS"}),"."]}),"\n",(0,i.jsx)(n.h3,{id:"stake-allocation",children:"Stake Allocation"}),"\n",(0,i.jsxs)(n.p,{children:["In Proof-of-Stake blockchains, security is dictated by how much stake is locked on-chain (financial\nsecurity). In a decentralized network, you want to ensure that the difficulty level for a financial\nattack to happen is equally difficult across all nodes. Polkadot's\n",(0,i.jsx)(n.a,{href:"/docs/learn-phragmen",children:"election algorithm"})," makes sure that the stake is maximized across all\nactive validators, and the variance in stake across validators is minimized as much as possible."]}),"\n",(0,i.jsx)(n.h3,{id:"economic-incentives",children:"Economic Incentives"}),"\n",(0,i.jsx)(n.p,{children:"Strong incentives are essential to incentivize network participants to run nodes and secure the\nnetwork. Strong incentives are possible because blockchain is a trustless system where there are no\nintermediaries between who sends a message and who receives it. Such incentives, coupled with\npunishment for bad behavior, ensure that most of the participants make the interest of the network\nand work together to improve it."}),"\n",(0,i.jsxs)(n.p,{children:["But from where are those incentives coming from? Polkadot's native token\n",(0,i.jsx)(n.a,{href:"/docs/learn-inflation",children:"DOT is inflationary"}),". Inflation is used to pay validators for running\nnodes and reward nominators for providing the necessary stake to secure the network. Depending on\nthe staking rate, part of the inflation is diverted to the treasury."]}),"\n",(0,i.jsx)(n.h3,{id:"governance-and-treasury",children:"Governance and Treasury"}),"\n",(0,i.jsxs)(n.p,{children:["In Polkadot, an on-chain ",(0,i.jsx)(n.a,{href:"/docs/learn-polkadot-opengov-treasury",children:"treasury"})," together with an\n",(0,i.jsx)(n.a,{href:"/docs/learn-polkadot-opengov",children:"open governance"})," model allow to access funds in a fully\ndecentralized manner without any bank transaction whatsoever. This opens up the possibility to come\nto a decision through on-chain voting mechanism, promoting a sense of community and creating an\nindependent socio-economical environment."]}),"\n",(0,i.jsx)(n.h2,{id:"decentralized-access-points",children:"Decentralized Access Points"}),"\n",(0,i.jsx)(n.p,{children:"But what if we have data we own stored on a resilient blockchain, but the only way to access the\nblockchain is through an RPC server? Whoever is behind the server or an attacker could present us\ndata that is not the truth. How can we trustlessly verify that the data is true?"}),"\n",(0,i.jsx)(n.p,{children:"Here is where light clients play a key role. Light clients are clients that can sit on a web browser\nand can fetch data directly from blockchain. The figure below shows the architectural difference\nbetween web2 and web3 applications."}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"light-clients",src:t(13885).A+"",width:"1589",height:"888"})}),"\n",(0,i.jsxs)(n.p,{children:["In web2 applications, data are stored on a centralized server, while in web3 applications, data (or\nbetter data proofs) are stored on the blockchain. With light clients, it is possible to access\nblockchain data through a full node and verify the validity of such data. They efficiently\nsynchronize (",(0,i.jsx)(n.em,{children:"warp sync"})," in case of Polkadot) with a full node to obtain (Merkle Root) commitment of\nthe latest chain state, and hence can trustlessly verify any response by full node against the\ncommitment. In this way, we can always verify that the data we see is the truth, which is done\nautomatically by the light client. Polkadot has a browser-embedded light client\n",(0,i.jsx)(n.a,{href:"/docs/build-light-clients",children:"Substrate connect"})," that uses the\n",(0,i.jsx)(n.a,{href:"https://github.com/smol-dot/smoldot",children:"smoldot"})," codebase. Most web3 applications today access\nblockchain data through a centralized RPC server."]}),"\n",(0,i.jsxs)(n.p,{children:["For more details about the inner workings of Smoldot, see\n",(0,i.jsx)(n.a,{href:"https://hackmd.io/@s_iGZLIITG6WjSgnFX0pcg/rkmmcvBno",children:"this blog post"})," and\n",(0,i.jsx)(n.a,{href:"https://youtu.be/YjsLpfM6a7E",children:"this video"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"interoperability",children:"Interoperability"}),"\n",(0,i.jsx)(n.p,{children:"The Web3 landscape's expansion into a multi-layered ecosystem highlights the need for\ninteroperability. Blockchains compete and differentiate themselves based on decentralization,\nthroughput, and specific use case focus. Some aim for a single high-performance base-layer\nblockchain, while others focus on decentralization through layer-2 networks. With such diverse\napproaches, it's crucial for distinct on-chain environments to interoperate, especially for\ndevelopers building cross-chain applications and traditional systems interacting with multiple\nblockchains."}),"\n",(0,i.jsx)(n.p,{children:"Various cross-chain interactions are employed to achieve interoperability, including token swaps,\ntoken bridges, native payments, contract calls, and programmable token bridges. Each mechanism\nserves specific functions, such as facilitating the exchange of tokens between different blockchains\nor enabling smart contract interactions across chains. Other interoperability solutions validate the\nstate of a source blockchain and relay transactions to the destination blockchain, which is\nessential for completing cross-chain interactions."}),"\n",(0,i.jsxs)(n.p,{children:["Interoperability between chains having different consensus has been a challenging task. Most of\nhacks have exploited vulnerabilities in interoperability protocols. Polkadot provides secure\ninteroperability through ",(0,i.jsx)(n.a,{href:"/docs/learn-xcm",children:"XCM"})," and ",(0,i.jsx)(n.a,{href:"/docs/learn-xcm-transport",children:"XCMP"})," to\nall blockchains attached to it. For more information, see the ",(0,i.jsx)(n.a,{href:"/docs/polkadot-v1",children:"Polkadot 1.0 page"}),"\nand\n",(0,i.jsx)(n.a,{href:"/docs/polkadot-direction#xcm-and-accords",children:"the section about XCM and Accords in Polkadot Direction page"}),"."]})]})}function h(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}},13885:(e,n,t)=>{t.d(n,{A:()=>i});const i=t.p+"assets/images/light-clients-a57adf45f86aa82f7db3547c5d55b92f.png"},28453:(e,n,t)=>{t.d(n,{R:()=>s,x:()=>r});var i=t(96540);const a={},o=i.createContext(a);function s(e){const n=i.useContext(o);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:s(e.components),i.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f8518919.5aa7909a.js b/assets/js/f8518919.5aa7909a.js new file mode 100644 index 000000000000..6474a95f94cf --- /dev/null +++ b/assets/js/f8518919.5aa7909a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4484],{11366:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>r,default:()=>h,frontMatter:()=>s,metadata:()=>i,toc:()=>l});const i=JSON.parse('{"id":"general/web3-and-polkadot","title":"Web3 and Polkadot","description":"Introduction to Web3 and Polkadot\'s Role in shaping the Web3 Vision.","source":"@site/../docs/general/web3-and-polkadot.md","sourceDirName":"general","slug":"/web3-and-polkadot","permalink":"/docs/web3-and-polkadot","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/web3-and-polkadot.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1726729579000,"frontMatter":{"id":"web3-and-polkadot","title":"Web3 and Polkadot","sidebar_label":"Web3 and Polkadot","description":"Introduction to Web3 and Polkadot\'s Role in shaping the Web3 Vision.","keywords":["web3","polkadot","light clients","decentralization"],"slug":"../web3-and-polkadot"},"sidebar":"docs","previous":{"title":"General","permalink":"/docs/general-index"},"next":{"title":"Polkadot Vision","permalink":"/docs/polkadot-vision-index"}}');var a=t(74848),o=t(28453);const s={id:"web3-and-polkadot",title:"Web3 and Polkadot",sidebar_label:"Web3 and Polkadot",description:"Introduction to Web3 and Polkadot's Role in shaping the Web3 Vision.",keywords:["web3","polkadot","light clients","decentralization"],slug:"../web3-and-polkadot"},r=void 0,c={},l=[{value:"Data Ownership",id:"data-ownership",level:2},{value:"Trustless Environment",id:"trustless-environment",level:2},{value:"Data Immutability",id:"data-immutability",level:2},{value:"Data Retrievability",id:"data-retrievability",level:2},{value:"Decentralization",id:"decentralization",level:3},{value:"Decentralized Storage",id:"decentralized-storage",level:3},{value:"Stake Allocation",id:"stake-allocation",level:3},{value:"Economic Incentives",id:"economic-incentives",level:3},{value:"Governance and Treasury",id:"governance-and-treasury",level:3},{value:"Decentralized Access Points",id:"decentralized-access-points",level:2},{value:"Interoperability",id:"interoperability",level:2}];function d(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",p:"p",strong:"strong",...(0,o.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.p,{children:"Back in the early 2000's the internet featured read-only, static, basic web pages. The online\nconnected world at the time was only the beginning of virtual data, identities, and more. The\ninternet during this time can be viewed as its first version (Web1)."}),"\n",(0,a.jsx)(n.p,{children:"As social media platforms and online businesses began to emerge, the internet transformed into its\nnext iteration - the Web2. This upgraded internet, which we use today, features dynamic, interactive\nweb pages, where users can read and write information and publish their own for others to see.\nHowever, this version of the web comes with downsides, dealing with data control, privacy issues,\nand the consequences of trusting centralized entities to store our data on their servers. This is\nwhere Web3 comes into the picture."}),"\n",(0,a.jsxs)(n.p,{children:["Web3 is transforming applications hosted on centralized infrastructure into decentralized\napplications (dApps) powered by trust-free blockchain protocols. The goal is to transform the\ninternet into a decentralized web, where users control their data and identity in a trust-free\nenvironment. The Web3 movement aims to remove intermediaries and build trustless infrastructure.\nWeb3 is an interactive and collaborative web where users can read, write, and ",(0,a.jsx)(n.strong,{children:"own"})," data."]}),"\n",(0,a.jsx)(n.admonition,{title:"The Web3 Movement",type:"note",children:(0,a.jsxs)(n.p,{children:["To learn more about the Web3 movement, check out this video from the\n",(0,a.jsx)(n.a,{href:"https://youtu.be/l44z35vabvA",children:"Web3 Summit"})]})}),"\n",(0,a.jsx)(n.h2,{id:"data-ownership",children:"Data Ownership"}),"\n",(0,a.jsxs)(n.p,{children:["In web3, ownership is achieved and validated through cryptography. Each user has a digital identity\nbound to a set of cryptographic keys usually based on the public key cryptographic scheme, i.e., the\nfamous ",(0,a.jsx)(n.strong,{children:"public and private key pair"}),"."]}),"\n",(0,a.jsxs)(n.p,{children:["Unlike Web2 which is driven by email IDs, phone numbers, and passwords, users onboarding to Web3\njust need to generate a key pair. The public key can be the identity that can be shared with anybody\nto send you messages or assets, while the private key is used to access your account, sign messages,\ntransfer funds, edit identity details, etc. ",(0,a.jsx)(n.a,{href:"/docs/learn-scams",children:"Keeping your private key secure"})," is\nessential to avoid identity theft or consequent loss of funds. Currently, scams are one of the main\nfactors hindering web3 adoption. No legitimate person or entity will ever ask you to share your\nprivate key, and those who attempt to do so are likely trying to steal your digital identity and\nanything you own related to it."]}),"\n",(0,a.jsxs)(n.p,{children:["To mitigate risks of key mismanagement (for ",(0,a.jsx)(n.strong,{children:"non-custodial"})," accounts, i.e. when you have custody\nof your keys) there are ",(0,a.jsx)(n.a,{href:"/docs/learn-account-abstraction",children:"account abstraction"})," solutions that\nseparate the key management from the user experience. To mitigate key hacks, there are cold wallet\nsolutions where the private key is generated and stored on dedicated devices with secure elements\nthat are not exposed to the internet (see ",(0,a.jsx)(n.a,{href:"/docs/ledger",children:"Ledger"}),"), or dedicated applications that can\nbe installed on air-gapped devices such as phones (see ",(0,a.jsx)(n.a,{href:"/docs/polkadot-vault",children:"Polkadot Vault"}),"). For\n",(0,a.jsx)(n.strong,{children:"custodial"})," accounts, you trust third parties to manage your keys and give you access whenever\nneeded."]}),"\n",(0,a.jsxs)(n.p,{children:["To summarize, data ownership comes from the fact that any message you sign with your private key\ncomes from your digital identity, and the signature proof can be cryptographically verified. Unless\nsomeone else stole your keys, you and only you are held accountable for signing the messages and are\nresponsible for the information on your account. Transferring an ",(0,a.jsx)(n.a,{href:"./learn-nft-index",children:"NFT"})," between\ntwo accounts is essentially a transfer of ownership."]}),"\n",(0,a.jsx)(n.h2,{id:"trustless-environment",children:"Trustless Environment"}),"\n",(0,a.jsx)(n.p,{children:"Cryptography also brings the possibility of building a trustless environment where we do not have to\ntrust third parties, or have any relationship between the sender and receiver of a message. We do\nnot need to trust centralized entities since we can verify who wrote the message and who owns what\njust by using cryptography. Trust is embedded in the code. Well-audited and reviewed code ultimately\nprovides a solid, trustless environment."}),"\n",(0,a.jsx)(n.h2,{id:"data-immutability",children:"Data Immutability"}),"\n",(0,a.jsx)(n.p,{children:"But what if the data we own can be easily modified or tampered with after they have been signed and\nstored?"}),"\n",(0,a.jsxs)(n.p,{children:["Here is where ",(0,a.jsx)(n.strong,{children:"blockchain"})," technology plays an important role. Blockchain networks comprise of\ndistributed state machines where increments of data are stored within blocks that build on each\nother using hash functions. For example, the hash of block ",(0,a.jsx)(n.code,{children:"N + 1"})," contains data of that block\ntogether with the hash of the previous block ",(0,a.jsx)(n.code,{children:"N"}),". This creates the situation where if you modify the\ncontent of block ",(0,a.jsx)(n.code,{children:"N"})," you will change the hash of block ",(0,a.jsx)(n.code,{children:"N + 1"}),", ",(0,a.jsx)(n.code,{children:"N + 2"}),", etc. essentially breaking\nthe chain. Although it can be possible to add an invalid block (a block with invalid transactions)\nor censor certain transactions, if the blockchain network is not sufficiently decentralized. In\ndecentralized proof-of-stake blockchains like Polkadot such attacks are financially expensive, and\nattempting to do it can get you ",(0,a.jsx)(n.a,{href:"/docs/learn-offenses",children:"slashed"}),"."]}),"\n",(0,a.jsx)(n.p,{children:"So, with blockchain as a means of storing data and transactions permanently without an option to\nmodify them, we can ensure what we cryptographically sign with our digital identity is set in stone\ndigitally."}),"\n",(0,a.jsx)(n.h2,{id:"data-retrievability",children:"Data Retrievability"}),"\n",(0,a.jsx)(n.p,{children:"But what if our data are stored in a blockchain, but that blockchain is run on a centralized server\nor by different computers belonging to the same operator?"}),"\n",(0,a.jsx)(n.p,{children:"That server or those computers can be easily shut down, the blockchain can be stopped from running\nand its data wiped out. This can be achieved from the inside by the malicious network participants\nor from the outside by regulatory rules and other forces. Though blockchain offers immutability,\nthere would be little sense in using a centralized blockchain to prove ownership as it can possibly\ncease to exist in the future."}),"\n",(0,a.jsx)(n.p,{children:"Data retrievability is dependent on how resilient the blockchain is. Resiliency is achieved through\nelements such as decentralization, economic incentives, and on-chain governance to ensure the\nnetwork can sustain on its own."}),"\n",(0,a.jsxs)(n.admonition,{title:"Data Retrievability vs. Data Availability",type:"info",children:[(0,a.jsxs)(n.p,{children:["Data ",(0,a.jsx)(n.strong,{children:"retrievability"})," is the ability of nodes to retrieve\xa0historical information\xa0from the\nblockchain. Historical data is not needed to verify new blocks; it is only required for synching\nfull nodes from the Genesis block or serving specific historical requests."]}),(0,a.jsxs)(n.p,{children:["Data ",(0,a.jsx)(n.strong,{children:"availability"})," assures full nodes can access and verify the full transactions associated with\na specific block. It does not necessarily imply that the data is accessible forever. For more\ninformation about data availability on Polkadot, see the\n",(0,a.jsx)(n.a,{href:"/docs/learn-parachains-protocol#availability-and-validity-anv-protocol",children:"dedicated section on the parachain protocol page"}),"."]})]}),"\n",(0,a.jsx)(n.h3,{id:"decentralization",children:"Decentralization"}),"\n",(0,a.jsx)(n.p,{children:"Having multiple nodes belonging to numerous independent identities increases network resiliency and\nthus data retrievability."}),"\n",(0,a.jsx)(n.p,{children:"Blockchain is a state machine, and consensus must be achieved on every single state transition by\nevery node on the blockchain network. In Proof of Work (PoW) based blockchains, which let any node\nin the network produce a block, consensus is achieved probabilistically by building on the longest\nchain (at the cost of energy-intensive computations). Proof of Stake (PoS) based blockchains like\nPolkadot enable deterministic consensus by allowing only a limited number of privileged nodes to\nproduce blocks. A PoW blockchain can be considered centralized if a single entity can capture 51% of\nnetwork nodes. Similarly, a PoS blockchain can be considered centralized if a single entity controls\nmore than one-third of nodes, as a two-thirds majority is required to arrive at a deterministic\nconsensus. Different blockchains have different levels of decentralization."}),"\n",(0,a.jsxs)(n.p,{children:["Nowadays, most of the nodes cannot be run on consumer-grade hardware. Node running equipment is\ntypically rented through service providers. Resiliency is also achieved by ensuring nodes run on as\nmany different providers as possible and avoiding a significant share of the nodes being run under\nthe same provider in the same geographic region. A legislation change or a natural disaster could\nimpact a considerable fraction of the nodes and potentially stop the network. Polkadot's level of\ndecentralization can be explored through the ",(0,a.jsx)(n.a,{href:"https://polkawatch.app/",children:"Polkawatch app"}),"."]}),"\n",(0,a.jsxs)(n.p,{children:["The ",(0,a.jsx)(n.a,{href:"/docs/thousand-validators",children:"One Thousand Validator Programme"})," aims to incentivize the creation of\nnew validator nodes to increase the level of node decentralization."]}),"\n",(0,a.jsx)(n.h3,{id:"decentralized-storage",children:"Decentralized Storage"}),"\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.a,{href:"./glossary/#blockspace",children:"Blockspace"})," is limited and valuable. Not all data we have can be stored on\nthe blockchain. Large files like pictures, music, movies, etc., typically will never be held on the\nblockchain. But where can we stored those files? To stick to the web3 vision, we need a resilient\nand decentralized storage solution."]}),"\n",(0,a.jsxs)(n.p,{children:["The most important thing is that the proof of ownership is stored on the blockchain through the\nhashes of data and metadata. The files are uploaded on decentralized storage networks hosting\nprotocols like ",(0,a.jsx)(n.a,{href:"https://ipfs.tech/",children:"IPFS"}),"."]}),"\n",(0,a.jsx)(n.h3,{id:"stake-allocation",children:"Stake Allocation"}),"\n",(0,a.jsxs)(n.p,{children:["In Proof-of-Stake blockchains, security is dictated by how much stake is locked on-chain (financial\nsecurity). In a decentralized network, you want to ensure that the difficulty level for a financial\nattack to happen is equally difficult across all nodes. Polkadot's\n",(0,a.jsx)(n.a,{href:"/docs/learn-phragmen",children:"election algorithm"})," makes sure that the stake is maximized across all\nactive validators, and the variance in stake across validators is minimized as much as possible."]}),"\n",(0,a.jsx)(n.h3,{id:"economic-incentives",children:"Economic Incentives"}),"\n",(0,a.jsx)(n.p,{children:"Strong incentives are essential to incentivize network participants to run nodes and secure the\nnetwork. Strong incentives are possible because blockchain is a trustless system where there are no\nintermediaries between who sends a message and who receives it. Such incentives, coupled with\npunishment for bad behavior, ensure that most of the participants make the interest of the network\nand work together to improve it."}),"\n",(0,a.jsxs)(n.p,{children:["But from where are those incentives coming from? Polkadot's native token\n",(0,a.jsx)(n.a,{href:"/docs/learn-inflation",children:"DOT is inflationary"}),". Inflation is used to pay validators for running\nnodes and reward nominators for providing the necessary stake to secure the network. Depending on\nthe staking rate, part of the inflation is diverted to the treasury."]}),"\n",(0,a.jsx)(n.h3,{id:"governance-and-treasury",children:"Governance and Treasury"}),"\n",(0,a.jsxs)(n.p,{children:["In Polkadot, an on-chain ",(0,a.jsx)(n.a,{href:"/docs/learn-polkadot-opengov-treasury",children:"treasury"})," together with an\n",(0,a.jsx)(n.a,{href:"/docs/learn-polkadot-opengov",children:"open governance"})," model allow to access funds in a fully\ndecentralized manner without any bank transaction whatsoever. This opens up the possibility to come\nto a decision through on-chain voting mechanism, promoting a sense of community and creating an\nindependent socio-economical environment."]}),"\n",(0,a.jsx)(n.h2,{id:"decentralized-access-points",children:"Decentralized Access Points"}),"\n",(0,a.jsx)(n.p,{children:"But what if we have data we own stored on a resilient blockchain, but the only way to access the\nblockchain is through an RPC server? Whoever is behind the server or an attacker could present us\ndata that is not the truth. How can we trustlessly verify that the data is true?"}),"\n",(0,a.jsx)(n.p,{children:"Here is where light clients play a key role. Light clients are clients that can sit on a web browser\nand can fetch data directly from blockchain. The figure below shows the architectural difference\nbetween web2 and web3 applications."}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.img,{alt:"light-clients",src:t(13885).A+"",width:"1589",height:"888"})}),"\n",(0,a.jsxs)(n.p,{children:["In web2 applications, data are stored on a centralized server, while in web3 applications, data (or\nbetter data proofs) are stored on the blockchain. With light clients, it is possible to access\nblockchain data through a full node and verify the validity of such data. They efficiently\nsynchronize (",(0,a.jsx)(n.em,{children:"warp sync"})," in case of Polkadot) with a full node to obtain (Merkle Root) commitment of\nthe latest chain state, and hence can trustlessly verify any response by full node against the\ncommitment. In this way, we can always verify that the data we see is the truth, which is done\nautomatically by the light client. Polkadot has a browser-embedded light client\n",(0,a.jsx)(n.a,{href:"/docs/build-light-clients",children:"Substrate connect"})," that uses the\n",(0,a.jsx)(n.a,{href:"https://github.com/smol-dot/smoldot",children:"smoldot"})," codebase. Most web3 applications today access\nblockchain data through a centralized RPC server."]}),"\n",(0,a.jsxs)(n.p,{children:["For more details about the inner workings of Smoldot, see\n",(0,a.jsx)(n.a,{href:"https://hackmd.io/@s_iGZLIITG6WjSgnFX0pcg/rkmmcvBno",children:"this blog post"})," and\n",(0,a.jsx)(n.a,{href:"https://youtu.be/YjsLpfM6a7E",children:"this video"}),"."]}),"\n",(0,a.jsx)(n.h2,{id:"interoperability",children:"Interoperability"}),"\n",(0,a.jsx)(n.p,{children:"The Web3 landscape's expansion into a multi-layered ecosystem highlights the need for\ninteroperability. Blockchains compete and differentiate themselves based on decentralization,\nthroughput, and specific use case focus. Some aim for a single high-performance base-layer\nblockchain, while others focus on decentralization through layer-2 networks. With such diverse\napproaches, it's crucial for distinct on-chain environments to interoperate, especially for\ndevelopers building cross-chain applications and traditional systems interacting with multiple\nblockchains."}),"\n",(0,a.jsx)(n.p,{children:"Various cross-chain interactions are employed to achieve interoperability, including token swaps,\ntoken bridges, native payments, contract calls, and programmable token bridges. Each mechanism\nserves specific functions, such as facilitating the exchange of tokens between different blockchains\nor enabling smart contract interactions across chains. Other interoperability solutions validate the\nstate of a source blockchain and relay transactions to the destination blockchain, which is\nessential for completing cross-chain interactions."}),"\n",(0,a.jsxs)(n.p,{children:["Interoperability between chains having different consensus has been a challenging task. Most of\nhacks have exploited vulnerabilities in interoperability protocols. Polkadot provides secure\ninteroperability through ",(0,a.jsx)(n.a,{href:"/docs/learn-xcm",children:"XCM"})," and ",(0,a.jsx)(n.a,{href:"/docs/learn-xcm-transport",children:"XCMP"})," to\nall blockchains attached to it. For more information, see the ",(0,a.jsx)(n.a,{href:"/docs/polkadot-v1",children:"Polkadot 1.0 page"}),"\nand\n",(0,a.jsx)(n.a,{href:"/docs/polkadot-direction#xcm-and-accords",children:"the section about XCM and Accords in Polkadot Direction page"}),"."]})]})}function h(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(d,{...e})}):d(e)}},13885:(e,n,t)=>{t.d(n,{A:()=>i});const i=t.p+"assets/images/light-clients-a57adf45f86aa82f7db3547c5d55b92f.png"},28453:(e,n,t)=>{t.d(n,{R:()=>s,x:()=>r});var i=t(96540);const a={},o=i.createContext(a);function s(e){const n=i.useContext(o);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:s(e.components),i.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f861e7c0.3cebeb82.js b/assets/js/f861e7c0.3cebeb82.js new file mode 100644 index 000000000000..66b2e4c71e89 --- /dev/null +++ b/assets/js/f861e7c0.3cebeb82.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5967],{84277:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>d,default:()=>h,frontMatter:()=>a,metadata:()=>i,toc:()=>o});const i=JSON.parse('{"id":"general/dune-analytics/parachain-dashboards/litentry-dashboards","title":"Litentry Dashboards","description":"Litentry is a decentralized identity aggregator that links user identities while ensuring privacy protection.","source":"@site/../docs/general/dune-analytics/parachain-dashboards/litentry-dashboards.md","sourceDirName":"general/dune-analytics/parachain-dashboards","slug":"/general/dune-analytics/litentry-dashboards","permalink":"/docs/general/dune-analytics/litentry-dashboards","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/parachain-dashboards/litentry-dashboards.md","tags":[],"version":"current","lastUpdatedBy":"MK","lastUpdatedAt":1719215716000,"frontMatter":{"id":"litentry-dashboards","title":"Litentry Dashboards","sidebar_label":"Litentry","description":"Litentry is a decentralized identity aggregator that links user identities while ensuring privacy protection.","keywords":["polkadot","dashboard","dune","litentry","identity","LIT"],"slug":"../litentry-dashboards"},"sidebar":"docs","previous":{"title":"InvArch","permalink":"/docs/general/dune-analytics/invarch-dashboards"},"next":{"title":"Manta","permalink":"/docs/general/dune-analytics/manta-dashboards"}}');var r=n(74848),s=n(28453);const a={id:"litentry-dashboards",title:"Litentry Dashboards",sidebar_label:"Litentry",description:"Litentry is a decentralized identity aggregator that links user identities while ensuring privacy protection.",keywords:["polkadot","dashboard","dune","litentry","identity","LIT"],slug:"../litentry-dashboards"},d="Litentry Dashboards",l={},o=[{value:"Overview",id:"overview",level:2},{value:"Featured Dashboards on Dune",id:"featured-dashboards-on-dune",level:2},{value:"Key Tables",id:"key-tables",level:2},{value:"Useful Queries",id:"useful-queries",level:2},{value:"Getting Started with Queries",id:"getting-started-with-queries",level:2}];function c(e){const t={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,s.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.header,{children:(0,r.jsx)(t.h1,{id:"litentry-dashboards",children:"Litentry Dashboards"})}),"\n",(0,r.jsx)(t.h2,{id:"overview",children:"Overview"}),"\n",(0,r.jsx)(t.p,{children:"Litentry is a decentralized identity aggregator that links user identities while ensuring privacy\nprotection, thus enabling various social and economic innovations. It features a three-layer\nstructure, comprising source data, address analysis, and identity aggregation layers, all secured\nwith Trusted Execution Environment (TEE) technology to enhance security and privacy. Litentry's\napplications include airdrop whitelisting, credit scoring, and cross-platform reputation building."}),"\n",(0,r.jsx)(t.h2,{id:"featured-dashboards-on-dune",children:"Featured Dashboards on Dune"}),"\n",(0,r.jsx)(t.p,{children:"Here you will find a variety of dashboards that help visualize data from the Litentry parachain:"}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.a,{href:"https://dune.com/substrate/litentry",children:"Litentry"}),": A comprehensive analysis of Litentry, including:\nToken Sent To Ethereum, Staking, Asset Analysis."]}),"\n"]}),"\n",(0,r.jsx)(t.h2,{id:"key-tables",children:"Key Tables"}),"\n",(0,r.jsx)(t.p,{children:"Data from the Litentry parachain is organized into several key tables:"}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsx)(t.li,{children:(0,r.jsx)(t.code,{children:"litentry.balances"})}),"\n",(0,r.jsx)(t.li,{children:(0,r.jsx)(t.code,{children:"litentry.blocks"})}),"\n",(0,r.jsx)(t.li,{children:(0,r.jsx)(t.code,{children:"litentry.calls"})}),"\n",(0,r.jsx)(t.li,{children:(0,r.jsx)(t.code,{children:"litentry.events"})}),"\n",(0,r.jsx)(t.li,{children:(0,r.jsx)(t.code,{children:"litentry.extrinsics"})}),"\n",(0,r.jsx)(t.li,{children:(0,r.jsx)(t.code,{children:"litentry.transfers"})}),"\n"]}),"\n",(0,r.jsxs)(t.p,{children:["Start building your own queries using granular data on Dune\n",(0,r.jsx)(t.a,{href:"https://dune.com/queries?category=canonical&namespace=litentry",children:"here"}),"."]}),"\n",(0,r.jsx)(t.h2,{id:"useful-queries",children:"Useful Queries"}),"\n",(0,r.jsx)(t.p,{children:"Some useful queries for Litentry are provided:"}),"\n",(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Title"}),(0,r.jsx)(t.th,{children:"Query"}),(0,r.jsx)(t.th,{children:"Description"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Litentry Latest Collator Info"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.a,{href:"https://dune.com/queries/3827164",children:"query_3827164"})}),(0,r.jsx)(t.td,{children:"Find the latest collator information on Litentry"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Litentry LIT Token Sent To Ethereum"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.a,{href:"https://dune.com/queries/3825036",children:"query_3825036"})}),(0,r.jsx)(t.td,{children:"Find all records of LIT tokens sent to Ethereum"})]})]})]}),"\n",(0,r.jsx)(t.h2,{id:"getting-started-with-queries",children:"Getting Started with Queries"}),"\n",(0,r.jsx)(t.p,{children:"To get started with querying data from Unique, you are welcome to use the mentioned materialized\nqueries. You can use the following DuneSQL queries as examples:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-sql",metastring:'title="Litentry LIT Token Sent To Ethereum" showLineNumbers',children:"SELECT DISTINCT\n block_time,\n extrinsic_id,\n get_href(\n 'https://litentry.statescan.io/#/extrinsics/' || extrinsic_id,\n extrinsic_id\n ) AS extrinsic_id_url,\n JSON_VALUE(data, 'strict $[0]') AS dest_id,\n JSON_VALUE(data, 'strict $[1]') AS nonce,\n JSON_VALUE(data, 'strict $[2]') AS source_id,\n IF(\n JSON_VALUE(data, 'strict $[3]') LIKE '0x%',\n bytearray_to_int256(JSON_VALUE(data, 'strict $[3]')) / POW(10, 12),\n CAST(JSON_VALUE(data, 'strict $[3]') AS int256) / POW(10, 12)\n ) AS amount,\n JSON_VALUE(data, 'strict $[4]') AS recipient,\n get_href(\n 'https://etherscan.io/address/' || JSON_VALUE(data, 'strict $[4]'),\n CONCAT(\n SUBSTR(JSON_VALUE(data, 'strict $[4]'), 1, 4),\n '...',\n SUBSTR(\n JSON_VALUE(data, 'strict $[4]'),\n LENGTH(JSON_VALUE(data, 'strict $[4]')) - 3\n )\n )\n ) AS recipient_url\nFROM\n litentry.events\nWHERE\n section = 'chainBridge'\n AND method = 'FungibleTransfer'\nORDER BY\n block_time DESC;\n"})}),"\n",(0,r.jsx)(t.p,{children:"Query result:"}),"\n",(0,r.jsx)("iframe",{src:"https://dune.com/embeds/3825036/6433535",height:"350",width:"100%"}),"\n",(0,r.jsx)(t.admonition,{title:"DuneSQL Reference",type:"info",children:(0,r.jsxs)(t.p,{children:["For more information on DuneSQL, please refer to the ",(0,r.jsx)(t.a,{href:"/docs/general/dunesql-cheatsheet",children:"DuneSQL Cheatsheet"}),"\nand\n",(0,r.jsx)(t.a,{href:"https://docs.dune.com/query-engine/Functions-and-operators/index",children:"DuneSQL Official Documentation"}),"."]})})]})}function h(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(c,{...e})}):c(e)}},28453:(e,t,n)=>{n.d(t,{R:()=>a,x:()=>d});var i=n(96540);const r={},s=i.createContext(r);function a(e){const t=i.useContext(s);return i.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function d(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:a(e.components),i.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f861e7c0.aa7ac260.js b/assets/js/f861e7c0.aa7ac260.js deleted file mode 100644 index cdce91453ac8..000000000000 --- a/assets/js/f861e7c0.aa7ac260.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5967],{63609:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>a,default:()=>h,frontMatter:()=>s,metadata:()=>d,toc:()=>o});var i=n(74848),r=n(28453);const s={id:"litentry-dashboards",title:"Litentry Dashboards",sidebar_label:"Litentry",description:"Litentry is a decentralized identity aggregator that links user identities while ensuring privacy protection.",keywords:["polkadot","dashboard","dune","litentry","identity","LIT"],slug:"../litentry-dashboards"},a="Litentry Dashboards",d={id:"general/dune-analytics/parachain-dashboards/litentry-dashboards",title:"Litentry Dashboards",description:"Litentry is a decentralized identity aggregator that links user identities while ensuring privacy protection.",source:"@site/../docs/general/dune-analytics/parachain-dashboards/litentry-dashboards.md",sourceDirName:"general/dune-analytics/parachain-dashboards",slug:"/general/dune-analytics/litentry-dashboards",permalink:"/docs/general/dune-analytics/litentry-dashboards",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dune-analytics/parachain-dashboards/litentry-dashboards.md",tags:[],version:"current",lastUpdatedBy:"MK",lastUpdatedAt:1719215716e3,frontMatter:{id:"litentry-dashboards",title:"Litentry Dashboards",sidebar_label:"Litentry",description:"Litentry is a decentralized identity aggregator that links user identities while ensuring privacy protection.",keywords:["polkadot","dashboard","dune","litentry","identity","LIT"],slug:"../litentry-dashboards"},sidebar:"docs",previous:{title:"InvArch",permalink:"/docs/general/dune-analytics/invarch-dashboards"},next:{title:"Manta",permalink:"/docs/general/dune-analytics/manta-dashboards"}},l={},o=[{value:"Overview",id:"overview",level:2},{value:"Featured Dashboards on Dune",id:"featured-dashboards-on-dune",level:2},{value:"Key Tables",id:"key-tables",level:2},{value:"Useful Queries",id:"useful-queries",level:2},{value:"Getting Started with Queries",id:"getting-started-with-queries",level:2}];function c(e){const t={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,r.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.header,{children:(0,i.jsx)(t.h1,{id:"litentry-dashboards",children:"Litentry Dashboards"})}),"\n",(0,i.jsx)(t.h2,{id:"overview",children:"Overview"}),"\n",(0,i.jsx)(t.p,{children:"Litentry is a decentralized identity aggregator that links user identities while ensuring privacy\nprotection, thus enabling various social and economic innovations. It features a three-layer\nstructure, comprising source data, address analysis, and identity aggregation layers, all secured\nwith Trusted Execution Environment (TEE) technology to enhance security and privacy. Litentry's\napplications include airdrop whitelisting, credit scoring, and cross-platform reputation building."}),"\n",(0,i.jsx)(t.h2,{id:"featured-dashboards-on-dune",children:"Featured Dashboards on Dune"}),"\n",(0,i.jsx)(t.p,{children:"Here you will find a variety of dashboards that help visualize data from the Litentry parachain:"}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://dune.com/substrate/litentry",children:"Litentry"}),": A comprehensive analysis of Litentry, including:\nToken Sent To Ethereum, Staking, Asset Analysis."]}),"\n"]}),"\n",(0,i.jsx)(t.h2,{id:"key-tables",children:"Key Tables"}),"\n",(0,i.jsx)(t.p,{children:"Data from the Litentry parachain is organized into several key tables:"}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsx)(t.li,{children:(0,i.jsx)(t.code,{children:"litentry.balances"})}),"\n",(0,i.jsx)(t.li,{children:(0,i.jsx)(t.code,{children:"litentry.blocks"})}),"\n",(0,i.jsx)(t.li,{children:(0,i.jsx)(t.code,{children:"litentry.calls"})}),"\n",(0,i.jsx)(t.li,{children:(0,i.jsx)(t.code,{children:"litentry.events"})}),"\n",(0,i.jsx)(t.li,{children:(0,i.jsx)(t.code,{children:"litentry.extrinsics"})}),"\n",(0,i.jsx)(t.li,{children:(0,i.jsx)(t.code,{children:"litentry.transfers"})}),"\n"]}),"\n",(0,i.jsxs)(t.p,{children:["Start building your own queries using granular data on Dune\n",(0,i.jsx)(t.a,{href:"https://dune.com/queries?category=canonical&namespace=litentry",children:"here"}),"."]}),"\n",(0,i.jsx)(t.h2,{id:"useful-queries",children:"Useful Queries"}),"\n",(0,i.jsx)(t.p,{children:"Some useful queries for Litentry are provided:"}),"\n",(0,i.jsxs)(t.table,{children:[(0,i.jsx)(t.thead,{children:(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.th,{children:"Title"}),(0,i.jsx)(t.th,{children:"Query"}),(0,i.jsx)(t.th,{children:"Description"})]})}),(0,i.jsxs)(t.tbody,{children:[(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Litentry Latest Collator Info"}),(0,i.jsx)(t.td,{children:(0,i.jsx)(t.a,{href:"https://dune.com/queries/3827164",children:"query_3827164"})}),(0,i.jsx)(t.td,{children:"Find the latest collator information on Litentry"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Litentry LIT Token Sent To Ethereum"}),(0,i.jsx)(t.td,{children:(0,i.jsx)(t.a,{href:"https://dune.com/queries/3825036",children:"query_3825036"})}),(0,i.jsx)(t.td,{children:"Find all records of LIT tokens sent to Ethereum"})]})]})]}),"\n",(0,i.jsx)(t.h2,{id:"getting-started-with-queries",children:"Getting Started with Queries"}),"\n",(0,i.jsx)(t.p,{children:"To get started with querying data from Unique, you are welcome to use the mentioned materialized\nqueries. You can use the following DuneSQL queries as examples:"}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-sql",metastring:'title="Litentry LIT Token Sent To Ethereum" showLineNumbers',children:"SELECT DISTINCT\n block_time,\n extrinsic_id,\n get_href(\n 'https://litentry.statescan.io/#/extrinsics/' || extrinsic_id,\n extrinsic_id\n ) AS extrinsic_id_url,\n JSON_VALUE(data, 'strict $[0]') AS dest_id,\n JSON_VALUE(data, 'strict $[1]') AS nonce,\n JSON_VALUE(data, 'strict $[2]') AS source_id,\n IF(\n JSON_VALUE(data, 'strict $[3]') LIKE '0x%',\n bytearray_to_int256(JSON_VALUE(data, 'strict $[3]')) / POW(10, 12),\n CAST(JSON_VALUE(data, 'strict $[3]') AS int256) / POW(10, 12)\n ) AS amount,\n JSON_VALUE(data, 'strict $[4]') AS recipient,\n get_href(\n 'https://etherscan.io/address/' || JSON_VALUE(data, 'strict $[4]'),\n CONCAT(\n SUBSTR(JSON_VALUE(data, 'strict $[4]'), 1, 4),\n '...',\n SUBSTR(\n JSON_VALUE(data, 'strict $[4]'),\n LENGTH(JSON_VALUE(data, 'strict $[4]')) - 3\n )\n )\n ) AS recipient_url\nFROM\n litentry.events\nWHERE\n section = 'chainBridge'\n AND method = 'FungibleTransfer'\nORDER BY\n block_time DESC;\n"})}),"\n",(0,i.jsx)(t.p,{children:"Query result:"}),"\n",(0,i.jsx)("iframe",{src:"https://dune.com/embeds/3825036/6433535",height:"350",width:"100%"}),"\n",(0,i.jsx)(t.admonition,{title:"DuneSQL Reference",type:"info",children:(0,i.jsxs)(t.p,{children:["For more information on DuneSQL, please refer to the ",(0,i.jsx)(t.a,{href:"/docs/general/dunesql-cheatsheet",children:"DuneSQL Cheatsheet"}),"\nand\n",(0,i.jsx)(t.a,{href:"https://docs.dune.com/query-engine/Functions-and-operators/index",children:"DuneSQL Official Documentation"}),"."]})})]})}function h(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(c,{...e})}):c(e)}},28453:(e,t,n)=>{n.d(t,{R:()=>a,x:()=>d});var i=n(96540);const r={},s=i.createContext(r);function a(e){const t=i.useContext(s);return i.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function d(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:a(e.components),i.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f90fa732.beeba90d.js b/assets/js/f90fa732.beeba90d.js new file mode 100644 index 000000000000..b09122be07c5 --- /dev/null +++ b/assets/js/f90fa732.beeba90d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8225],{47791:(e,a,n)=>{n.r(a),n.d(a,{assets:()=>s,contentTitle:()=>l,default:()=>u,frontMatter:()=>r,metadata:()=>t,toc:()=>d});const t=JSON.parse('{"id":"build/build-data","title":"Explorer, Data, & Indexing Tools","description":"An overview about building with data analytics","source":"@site/../docs/build/build-data.md","sourceDirName":"build","slug":"/build-data","permalink":"/docs/build-data","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/build/build-data.md","tags":[],"version":"current","lastUpdatedBy":"Ti\u1ebfn Nguy\u1ec5n Kh\u1eafc","lastUpdatedAt":1722855366000,"frontMatter":{"id":"build-data","title":"Explorer, Data, & Indexing Tools","sidebar_label":"Explorer, Data, & Indexing Tools","description":"An overview about building with data analytics","keywords":["data","index","query","explorer","dashboard"],"slug":"../build-data"},"sidebar":"docs","previous":{"title":"Tool Index","permalink":"/docs/build-tools-index"},"next":{"title":"Open Source Stack","permalink":"/docs/build-open-source"}}');var i=n(74848),o=n(28453);const r={id:"build-data",title:"Explorer, Data, & Indexing Tools",sidebar_label:"Explorer, Data, & Indexing Tools",description:"An overview about building with data analytics",keywords:["data","index","query","explorer","dashboard"],slug:"../build-data"},l=void 0,s={},d=[{value:"Custom Indexer",id:"custom-indexer",level:2},{value:"Subsquid",id:"subsquid",level:3},{value:"SubQuery",id:"subquery",level:3},{value:"The Graph",id:"the-graph",level:3},{value:"Analytics platform",id:"analytics-platform",level:2},{value:"DIN",id:"din",level:3},{value:"Covalent",id:"covalent",level:3},{value:"Data warehouse",id:"data-warehouse",level:2},{value:"BigQuery by Google Cloud",id:"bigquery-by-google-cloud",level:3},{value:"Block Explorers",id:"block-explorers",level:2}];function c(e){const a={a:"a",h2:"h2",h3:"h3",li:"li",p:"p",ul:"ul",...(0,o.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(a.p,{children:"The tools that accentuate and aggregate the data within blockchains are integral for a multi-chain\nfuture. Parachains will need robust and secure ways to index and aggregate data, such as a data\naggregation layer."}),"\n",(0,i.jsx)(a.h2,{id:"custom-indexer",children:"Custom Indexer"}),"\n",(0,i.jsx)(a.h3,{id:"subsquid",children:"Subsquid"}),"\n",(0,i.jsxs)(a.p,{children:[(0,i.jsx)(a.a,{href:"https://subsquid.io/",children:"Subsquid"})," is an open-source framework for building tailored GraphQL APIs to\nquery Substrate chain state and history."]}),"\n",(0,i.jsx)(a.p,{children:"Subsquid replaces direct gRPC node access with performant Squid archive gateways, allowing quick\nsynchronization of the API with the historical on-chain data."}),"\n",(0,i.jsx)(a.p,{children:"Subsquid-powered APIs support filtering, pagination, union types, interfaces, and full-text search\nout-of-the-box, and can be further extended with custom GraphQL resolvers."}),"\n",(0,i.jsx)(a.h3,{id:"subquery",children:"SubQuery"}),"\n",(0,i.jsxs)(a.p,{children:[(0,i.jsx)(a.a,{href:"https://subquery.network/",children:"SubQuery"})," is a fast, flexible, and reliable open-source data indexer\nthat provides you with custom APIs for your Substrate/Polkadot project. We build the best,\nfully-featured indexer, so you don\u2019t have to, with:"]}),"\n",(0,i.jsxs)(a.ul,{children:["\n",(0,i.jsx)(a.li,{children:"automatic support for any Substrate network"}),"\n",(0,i.jsx)(a.li,{children:"support for all Polkadot smart contract frameworks (FrontierEVM, Acala EVM+, and Wasm)"}),"\n",(0,i.jsx)(a.li,{children:"automated historical state tracking to enable faster partial re-indexing"}),"\n",(0,i.jsx)(a.li,{children:"a lightweight and portable design that doesn't require centralized archives"}),"\n",(0,i.jsx)(a.li,{children:"full support for GraphQL filtering, pagination, interfaces, subscriptions, and aggregations"}),"\n",(0,i.jsx)(a.li,{children:"a future decentralized network acts as chain-agnostic data aggregation, indexing, and querying\nlayer between blockchains and applications that will not require centralized services."}),"\n"]}),"\n",(0,i.jsxs)(a.p,{children:["To start building, head to the ",(0,i.jsx)(a.a,{href:"https://academy.subquery.network/",children:"SubQuery documentation"})," where\nyou'll find quick start guides and walkthrough developer tutorials."]}),"\n",(0,i.jsx)(a.h3,{id:"the-graph",children:"The Graph"}),"\n",(0,i.jsxs)(a.p,{children:[(0,i.jsx)(a.a,{href:"https://thegraph.com/en/",children:"The Graph"})," is a layer-1 indexing tool and querying layer for the\ndecentralized web, who announced an integration plan to bring\n",(0,i.jsx)(a.a,{href:"https://medium.com/polkadot-network/the-graph-bringing-indexing-and-querying-to-polkadot-6b433e381fe8",children:"indexing and querying to Polkadot"}),"."]}),"\n",(0,i.jsxs)(a.p,{children:["The Graph allows developers to build and publish open APIs, called subgraphs. Applications can query\nsubgraphs using ",(0,i.jsx)(a.a,{href:"https://graphql.org/",children:"GraphQL"}),"."]}),"\n",(0,i.jsx)(a.h2,{id:"analytics-platform",children:"Analytics platform"}),"\n",(0,i.jsx)(a.h3,{id:"din",children:"DIN"}),"\n",(0,i.jsxs)(a.p,{children:[(0,i.jsx)(a.a,{href:"https://din.lol/",children:"DIN"}),"(formally named Web3Go) is a Polkadot-based open data analytics platform that\nprovides infrastructure and tooling to help users visualize, curate, share, and analyze on-chain\ndata."]}),"\n",(0,i.jsx)(a.h3,{id:"covalent",children:"Covalent"}),"\n",(0,i.jsxs)(a.p,{children:[(0,i.jsx)(a.a,{href:"https://www.covalenthq.com/",children:"Covalent"})," offers a unified API to understand the data on a blockchain,\nand is currently live on the ",(0,i.jsx)(a.a,{href:"https://moonbeam.network/",children:"Moonbeam"})," network, bringing visibility to\nbillions of blockchain data points to Polkadot via their unified API. The approach to deploying on\nMoonbeam simplifies the development of Polkadot-based blockchain applications as compared to\nimplementing a full parachain or an on-demand parachain."]}),"\n",(0,i.jsx)(a.p,{children:"Covalent captures the entire history of blockchains and offers a way to zoom into data points\nrecorded in smart contracts that are often not accessible."}),"\n",(0,i.jsx)(a.h2,{id:"data-warehouse",children:"Data warehouse"}),"\n",(0,i.jsx)(a.h3,{id:"bigquery-by-google-cloud",children:"BigQuery by Google Cloud"}),"\n",(0,i.jsxs)(a.p,{children:[(0,i.jsx)(a.a,{href:"https://cloud.google.com/bigquery",children:"BigQuery"})," makes Polkadot blockchain data available for Google\nCloud users. Check this\n",(0,i.jsx)(a.a,{href:"https://cloud.google.com/blog/products/data-analytics/data-for-11-more-blockchains-in-bigquery-public-datasets",children:"announcement"}),"\nfor details on how to access the data."]}),"\n",(0,i.jsx)(a.h2,{id:"block-explorers",children:"Block Explorers"}),"\n",(0,i.jsx)(a.p,{children:"As you can imagine, blockchain explorers also offer data analytics through an interface where users\ncan examine common data points."}),"\n",(0,i.jsxs)(a.p,{children:["Some block explorers in the Polkadot ecosystem are listed on the\n",(0,i.jsx)(a.a,{href:"/docs/build-tools-index##block-explorers",children:"tools page"}),"."]})]})}function u(e={}){const{wrapper:a}={...(0,o.R)(),...e.components};return a?(0,i.jsx)(a,{...e,children:(0,i.jsx)(c,{...e})}):c(e)}},28453:(e,a,n)=>{n.d(a,{R:()=>r,x:()=>l});var t=n(96540);const i={},o=t.createContext(i);function r(e){const a=t.useContext(o);return t.useMemo((function(){return"function"==typeof e?e(a):{...a,...e}}),[a,e])}function l(e){let a;return a=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),t.createElement(o.Provider,{value:a},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f90fa732.e7ce1fa1.js b/assets/js/f90fa732.e7ce1fa1.js deleted file mode 100644 index efc3154fd75f..000000000000 --- a/assets/js/f90fa732.e7ce1fa1.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8225],{22027:(e,a,n)=>{n.r(a),n.d(a,{assets:()=>s,contentTitle:()=>r,default:()=>u,frontMatter:()=>o,metadata:()=>l,toc:()=>d});var t=n(74848),i=n(28453);const o={id:"build-data",title:"Explorer, Data, & Indexing Tools",sidebar_label:"Explorer, Data, & Indexing Tools",description:"An overview about building with data analytics",keywords:["data","index","query","explorer","dashboard"],slug:"../build-data"},r=void 0,l={id:"build/build-data",title:"Explorer, Data, & Indexing Tools",description:"An overview about building with data analytics",source:"@site/../docs/build/build-data.md",sourceDirName:"build",slug:"/build-data",permalink:"/docs/build-data",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/build/build-data.md",tags:[],version:"current",lastUpdatedBy:"Ti\u1ebfn Nguy\u1ec5n Kh\u1eafc",lastUpdatedAt:1722855366e3,frontMatter:{id:"build-data",title:"Explorer, Data, & Indexing Tools",sidebar_label:"Explorer, Data, & Indexing Tools",description:"An overview about building with data analytics",keywords:["data","index","query","explorer","dashboard"],slug:"../build-data"},sidebar:"docs",previous:{title:"Tool Index",permalink:"/docs/build-tools-index"},next:{title:"Open Source Stack",permalink:"/docs/build-open-source"}},s={},d=[{value:"Custom Indexer",id:"custom-indexer",level:2},{value:"Subsquid",id:"subsquid",level:3},{value:"SubQuery",id:"subquery",level:3},{value:"The Graph",id:"the-graph",level:3},{value:"Analytics platform",id:"analytics-platform",level:2},{value:"DIN",id:"din",level:3},{value:"Covalent",id:"covalent",level:3},{value:"Data warehouse",id:"data-warehouse",level:2},{value:"BigQuery by Google Cloud",id:"bigquery-by-google-cloud",level:3},{value:"Block Explorers",id:"block-explorers",level:2}];function c(e){const a={a:"a",h2:"h2",h3:"h3",li:"li",p:"p",ul:"ul",...(0,i.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(a.p,{children:"The tools that accentuate and aggregate the data within blockchains are integral for a multi-chain\nfuture. Parachains will need robust and secure ways to index and aggregate data, such as a data\naggregation layer."}),"\n",(0,t.jsx)(a.h2,{id:"custom-indexer",children:"Custom Indexer"}),"\n",(0,t.jsx)(a.h3,{id:"subsquid",children:"Subsquid"}),"\n",(0,t.jsxs)(a.p,{children:[(0,t.jsx)(a.a,{href:"https://subsquid.io/",children:"Subsquid"})," is an open-source framework for building tailored GraphQL APIs to\nquery Substrate chain state and history."]}),"\n",(0,t.jsx)(a.p,{children:"Subsquid replaces direct gRPC node access with performant Squid archive gateways, allowing quick\nsynchronization of the API with the historical on-chain data."}),"\n",(0,t.jsx)(a.p,{children:"Subsquid-powered APIs support filtering, pagination, union types, interfaces, and full-text search\nout-of-the-box, and can be further extended with custom GraphQL resolvers."}),"\n",(0,t.jsx)(a.h3,{id:"subquery",children:"SubQuery"}),"\n",(0,t.jsxs)(a.p,{children:[(0,t.jsx)(a.a,{href:"https://subquery.network/",children:"SubQuery"})," is a fast, flexible, and reliable open-source data indexer\nthat provides you with custom APIs for your Substrate/Polkadot project. We build the best,\nfully-featured indexer, so you don\u2019t have to, with:"]}),"\n",(0,t.jsxs)(a.ul,{children:["\n",(0,t.jsx)(a.li,{children:"automatic support for any Substrate network"}),"\n",(0,t.jsx)(a.li,{children:"support for all Polkadot smart contract frameworks (FrontierEVM, Acala EVM+, and Wasm)"}),"\n",(0,t.jsx)(a.li,{children:"automated historical state tracking to enable faster partial re-indexing"}),"\n",(0,t.jsx)(a.li,{children:"a lightweight and portable design that doesn't require centralized archives"}),"\n",(0,t.jsx)(a.li,{children:"full support for GraphQL filtering, pagination, interfaces, subscriptions, and aggregations"}),"\n",(0,t.jsx)(a.li,{children:"a future decentralized network acts as chain-agnostic data aggregation, indexing, and querying\nlayer between blockchains and applications that will not require centralized services."}),"\n"]}),"\n",(0,t.jsxs)(a.p,{children:["To start building, head to the ",(0,t.jsx)(a.a,{href:"https://academy.subquery.network/",children:"SubQuery documentation"})," where\nyou'll find quick start guides and walkthrough developer tutorials."]}),"\n",(0,t.jsx)(a.h3,{id:"the-graph",children:"The Graph"}),"\n",(0,t.jsxs)(a.p,{children:[(0,t.jsx)(a.a,{href:"https://thegraph.com/en/",children:"The Graph"})," is a layer-1 indexing tool and querying layer for the\ndecentralized web, who announced an integration plan to bring\n",(0,t.jsx)(a.a,{href:"https://medium.com/polkadot-network/the-graph-bringing-indexing-and-querying-to-polkadot-6b433e381fe8",children:"indexing and querying to Polkadot"}),"."]}),"\n",(0,t.jsxs)(a.p,{children:["The Graph allows developers to build and publish open APIs, called subgraphs. Applications can query\nsubgraphs using ",(0,t.jsx)(a.a,{href:"https://graphql.org/",children:"GraphQL"}),"."]}),"\n",(0,t.jsx)(a.h2,{id:"analytics-platform",children:"Analytics platform"}),"\n",(0,t.jsx)(a.h3,{id:"din",children:"DIN"}),"\n",(0,t.jsxs)(a.p,{children:[(0,t.jsx)(a.a,{href:"https://din.lol/",children:"DIN"}),"(formally named Web3Go) is a Polkadot-based open data analytics platform that\nprovides infrastructure and tooling to help users visualize, curate, share, and analyze on-chain\ndata."]}),"\n",(0,t.jsx)(a.h3,{id:"covalent",children:"Covalent"}),"\n",(0,t.jsxs)(a.p,{children:[(0,t.jsx)(a.a,{href:"https://www.covalenthq.com/",children:"Covalent"})," offers a unified API to understand the data on a blockchain,\nand is currently live on the ",(0,t.jsx)(a.a,{href:"https://moonbeam.network/",children:"Moonbeam"})," network, bringing visibility to\nbillions of blockchain data points to Polkadot via their unified API. The approach to deploying on\nMoonbeam simplifies the development of Polkadot-based blockchain applications as compared to\nimplementing a full parachain or an on-demand parachain."]}),"\n",(0,t.jsx)(a.p,{children:"Covalent captures the entire history of blockchains and offers a way to zoom into data points\nrecorded in smart contracts that are often not accessible."}),"\n",(0,t.jsx)(a.h2,{id:"data-warehouse",children:"Data warehouse"}),"\n",(0,t.jsx)(a.h3,{id:"bigquery-by-google-cloud",children:"BigQuery by Google Cloud"}),"\n",(0,t.jsxs)(a.p,{children:[(0,t.jsx)(a.a,{href:"https://cloud.google.com/bigquery",children:"BigQuery"})," makes Polkadot blockchain data available for Google\nCloud users. Check this\n",(0,t.jsx)(a.a,{href:"https://cloud.google.com/blog/products/data-analytics/data-for-11-more-blockchains-in-bigquery-public-datasets",children:"announcement"}),"\nfor details on how to access the data."]}),"\n",(0,t.jsx)(a.h2,{id:"block-explorers",children:"Block Explorers"}),"\n",(0,t.jsx)(a.p,{children:"As you can imagine, blockchain explorers also offer data analytics through an interface where users\ncan examine common data points."}),"\n",(0,t.jsxs)(a.p,{children:["Some block explorers in the Polkadot ecosystem are listed on the\n",(0,t.jsx)(a.a,{href:"/docs/build-tools-index##block-explorers",children:"tools page"}),"."]})]})}function u(e={}){const{wrapper:a}={...(0,i.R)(),...e.components};return a?(0,t.jsx)(a,{...e,children:(0,t.jsx)(c,{...e})}):c(e)}},28453:(e,a,n)=>{n.d(a,{R:()=>r,x:()=>l});var t=n(96540);const i={},o=t.createContext(i);function r(e){const a=t.useContext(o);return t.useMemo((function(){return"function"==typeof e?e(a):{...a,...e}}),[a,e])}function l(e){let a;return a=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),t.createElement(o.Provider,{value:a},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/fa343ad1.3ab04e51.js b/assets/js/fa343ad1.3ab04e51.js new file mode 100644 index 000000000000..a70638f86764 --- /dev/null +++ b/assets/js/fa343ad1.3ab04e51.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2368],{90355:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>r,default:()=>l,frontMatter:()=>o,metadata:()=>s,toc:()=>h});const s=JSON.parse('{"id":"learn/xcm/fundamentals/learn-xcm-docs-fundamentals-fees","title":"Weight and Fees","description":"Weight and Fees in XCM.","source":"@site/../docs/learn/xcm/fundamentals/weight_and_fees.md","sourceDirName":"learn/xcm/fundamentals","slug":"/learn/xcm/fundamentals-fees","permalink":"/docs/learn/xcm/fundamentals-fees","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/xcm/fundamentals/weight_and_fees.md","tags":[],"version":"current","lastUpdatedBy":"spazcoin","lastUpdatedAt":1715375475000,"frontMatter":{"id":"learn-xcm-docs-fundamentals-fees","title":"Weight and Fees","sidebar_label":"Weight and Fees","description":"Weight and Fees in XCM.","keywords":["xcm","cross-consensus messaging","weight","fees"],"slug":"../fundamentals-fees"},"sidebar":"docs","previous":{"title":"XCVM","permalink":"/docs/learn/xcm/fundamentals-xcvm"},"next":{"title":"A Journey through XCM","permalink":"/docs/learn/xcm/journey"}}');var i=t(74848),a=t(28453);const o={id:"learn-xcm-docs-fundamentals-fees",title:"Weight and Fees",sidebar_label:"Weight and Fees",description:"Weight and Fees in XCM.",keywords:["xcm","cross-consensus messaging","weight","fees"],slug:"../fundamentals-fees"},r="Weight and fees",c={},h=[{value:"Executor config",id:"executor-config",level:2},{value:"XCM pallet",id:"xcm-pallet",level:2}];function d(e){const n={a:"a",code:"code",em:"em",h1:"h1",h2:"h2",header:"header",p:"p",...(0,a.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.header,{children:(0,i.jsx)(n.h1,{id:"weight-and-fees",children:"Weight and fees"})}),"\n",(0,i.jsxs)(n.p,{children:["The resources available to a blockchain are limited, so it's important to manage how operations\non-chain use them. Not managing how resources are used can open an attack vector, known as DoS\n(Denial of Service), where an attacker floods the chain with operations in order to get it to stop\nproducing blocks. In order to manage how resources are used and to protect against DoS attacks, XCM\nuses a concept of ",(0,i.jsx)(n.em,{children:"weight"}),". This concept, which has the purpose of quantifying usage of blockchain\nresources, comes from the ",(0,i.jsx)(n.a,{href:"https://docs.substrate.io/build/tx-weights-fees/",children:"Substrate"})," world."]}),"\n",(0,i.jsx)(n.p,{children:"Weight is two-dimensional, it tracks both time (execution time) and space (state accesses). Weight\ndetermines how much fees need to be paid in order to perform some operation. The logic for turning\nit into fees is configurable."}),"\n",(0,i.jsxs)(n.p,{children:["Some systems have the concept of ",(0,i.jsx)(n.em,{children:"gas metering"}),", which is calculated during execution and only\nmeasures execution time. Weight, however, is static, defined beforehand, which makes XCM execution\nlighter by not including gas metering."]}),"\n",(0,i.jsxs)(n.p,{children:["The principle behind weight payment is to pay for what you use, so the two stages of XCM where fees\nare paid are ",(0,i.jsx)(n.em,{children:"sending"})," the message and actually ",(0,i.jsx)(n.em,{children:"executing"})," it. The fees for sending are paid on the\nlocal system, usually by the origin of the message, because we are using the message delivery\nmechanism maintained by the origin. Similarly, the execution fees are paid on the destination\nsystem, via the ",(0,i.jsx)(n.code,{children:"BuyExecution"})," instruction. In other words, XCMs are paid for via their own\ninstructions. We'll talk more about ",(0,i.jsx)(n.code,{children:"BuyExecution"})," in the\n",(0,i.jsx)(n.a,{href:"../journey-fees/index.html",children:"fee handling chapter"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["XCM is agnostic, which means it doesn't assume fees need to be paid. It's entirely possible to not\npay for the effects of an XCM on the destination system. Even in systems where fees have to be paid,\nspecial cases of free execution can be made. There are security measures systems can put in place\n(see ",(0,i.jsx)(n.a,{href:"/docs/learn/xcm/config-deep-dive#barrier",children:"barrier"}),") to not execute XCMs that do not pay for their\nfees."]}),"\n",(0,i.jsx)(n.h2,{id:"executor-config",children:"Executor config"}),"\n",(0,i.jsxs)(n.p,{children:["The executor has a ",(0,i.jsx)(n.code,{children:"Weigher"})," ",(0,i.jsx)(n.a,{href:"/docs/learn/xcm/config-deep-dive#weigher",children:"configuration item"})," that\nspecifies the weight of each instruction. It weighs the whole message by adding the weight of each\ninstruction. A simple way of weighing instructions is to assign them a base weight value to all of\nthem. This works, but it is not very accurate, as different instructions use more resources when\nbeing executed. A better approach is to benchmark each instruction to find out the actual weight\nused by each."]}),"\n",(0,i.jsxs)(n.p,{children:["Another configuration item, ",(0,i.jsx)(n.code,{children:"Trader"}),", converts the required weight units into fees, which are\nrepresented as ",(0,i.jsx)(n.code,{children:"MultiAsset"}),"s. There are two basic approaches: one is to just assign a value\n(measured in assets) to each unit of weight; the other is to reuse some existing transaction payment\nmethod for XCM weight. Custom configurations allow for things like NFT coupons that give you a\ncertain amount of weight for executing the XCM."]}),"\n",(0,i.jsx)(n.p,{children:"Naturally, this configuration items allow for any approach you can think of for weighing messages\nand charging execution fees."}),"\n",(0,i.jsx)(n.h2,{id:"xcm-pallet",children:"XCM pallet"}),"\n",(0,i.jsx)(n.p,{children:"FRAME pallets, like the XCM pallet, specify weights for each extrinsic they expose. That means that\nwhen interacting with pallets that deal with XCM, there will be an additional fee at the beginning\nfor calling the extrinsic locally."})]})}function l(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}},28453:(e,n,t)=>{t.d(n,{R:()=>o,x:()=>r});var s=t(96540);const i={},a=s.createContext(i);function o(e){const n=s.useContext(a);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:o(e.components),s.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/fa343ad1.502036ca.js b/assets/js/fa343ad1.502036ca.js deleted file mode 100644 index 8c1df5d120b5..000000000000 --- a/assets/js/fa343ad1.502036ca.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2368],{37374:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>o,default:()=>l,frontMatter:()=>a,metadata:()=>r,toc:()=>h});var s=t(74848),i=t(28453);const a={id:"learn-xcm-docs-fundamentals-fees",title:"Weight and Fees",sidebar_label:"Weight and Fees",description:"Weight and Fees in XCM.",keywords:["xcm","cross-consensus messaging","weight","fees"],slug:"../fundamentals-fees"},o="Weight and fees",r={id:"learn/xcm/fundamentals/learn-xcm-docs-fundamentals-fees",title:"Weight and Fees",description:"Weight and Fees in XCM.",source:"@site/../docs/learn/xcm/fundamentals/weight_and_fees.md",sourceDirName:"learn/xcm/fundamentals",slug:"/learn/xcm/fundamentals-fees",permalink:"/docs/learn/xcm/fundamentals-fees",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/xcm/fundamentals/weight_and_fees.md",tags:[],version:"current",lastUpdatedBy:"spazcoin",lastUpdatedAt:1715375475e3,frontMatter:{id:"learn-xcm-docs-fundamentals-fees",title:"Weight and Fees",sidebar_label:"Weight and Fees",description:"Weight and Fees in XCM.",keywords:["xcm","cross-consensus messaging","weight","fees"],slug:"../fundamentals-fees"},sidebar:"docs",previous:{title:"XCVM",permalink:"/docs/learn/xcm/fundamentals-xcvm"},next:{title:"A Journey through XCM",permalink:"/docs/learn/xcm/journey"}},c={},h=[{value:"Executor config",id:"executor-config",level:2},{value:"XCM pallet",id:"xcm-pallet",level:2}];function d(e){const n={a:"a",code:"code",em:"em",h1:"h1",h2:"h2",header:"header",p:"p",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"weight-and-fees",children:"Weight and fees"})}),"\n",(0,s.jsxs)(n.p,{children:["The resources available to a blockchain are limited, so it's important to manage how operations\non-chain use them. Not managing how resources are used can open an attack vector, known as DoS\n(Denial of Service), where an attacker floods the chain with operations in order to get it to stop\nproducing blocks. In order to manage how resources are used and to protect against DoS attacks, XCM\nuses a concept of ",(0,s.jsx)(n.em,{children:"weight"}),". This concept, which has the purpose of quantifying usage of blockchain\nresources, comes from the ",(0,s.jsx)(n.a,{href:"https://docs.substrate.io/build/tx-weights-fees/",children:"Substrate"})," world."]}),"\n",(0,s.jsx)(n.p,{children:"Weight is two-dimensional, it tracks both time (execution time) and space (state accesses). Weight\ndetermines how much fees need to be paid in order to perform some operation. The logic for turning\nit into fees is configurable."}),"\n",(0,s.jsxs)(n.p,{children:["Some systems have the concept of ",(0,s.jsx)(n.em,{children:"gas metering"}),", which is calculated during execution and only\nmeasures execution time. Weight, however, is static, defined beforehand, which makes XCM execution\nlighter by not including gas metering."]}),"\n",(0,s.jsxs)(n.p,{children:["The principle behind weight payment is to pay for what you use, so the two stages of XCM where fees\nare paid are ",(0,s.jsx)(n.em,{children:"sending"})," the message and actually ",(0,s.jsx)(n.em,{children:"executing"})," it. The fees for sending are paid on the\nlocal system, usually by the origin of the message, because we are using the message delivery\nmechanism maintained by the origin. Similarly, the execution fees are paid on the destination\nsystem, via the ",(0,s.jsx)(n.code,{children:"BuyExecution"})," instruction. In other words, XCMs are paid for via their own\ninstructions. We'll talk more about ",(0,s.jsx)(n.code,{children:"BuyExecution"})," in the\n",(0,s.jsx)(n.a,{href:"../journey-fees/index.html",children:"fee handling chapter"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["XCM is agnostic, which means it doesn't assume fees need to be paid. It's entirely possible to not\npay for the effects of an XCM on the destination system. Even in systems where fees have to be paid,\nspecial cases of free execution can be made. There are security measures systems can put in place\n(see ",(0,s.jsx)(n.a,{href:"/docs/learn/xcm/config-deep-dive#barrier",children:"barrier"}),") to not execute XCMs that do not pay for their\nfees."]}),"\n",(0,s.jsx)(n.h2,{id:"executor-config",children:"Executor config"}),"\n",(0,s.jsxs)(n.p,{children:["The executor has a ",(0,s.jsx)(n.code,{children:"Weigher"})," ",(0,s.jsx)(n.a,{href:"/docs/learn/xcm/config-deep-dive#weigher",children:"configuration item"})," that\nspecifies the weight of each instruction. It weighs the whole message by adding the weight of each\ninstruction. A simple way of weighing instructions is to assign them a base weight value to all of\nthem. This works, but it is not very accurate, as different instructions use more resources when\nbeing executed. A better approach is to benchmark each instruction to find out the actual weight\nused by each."]}),"\n",(0,s.jsxs)(n.p,{children:["Another configuration item, ",(0,s.jsx)(n.code,{children:"Trader"}),", converts the required weight units into fees, which are\nrepresented as ",(0,s.jsx)(n.code,{children:"MultiAsset"}),"s. There are two basic approaches: one is to just assign a value\n(measured in assets) to each unit of weight; the other is to reuse some existing transaction payment\nmethod for XCM weight. Custom configurations allow for things like NFT coupons that give you a\ncertain amount of weight for executing the XCM."]}),"\n",(0,s.jsx)(n.p,{children:"Naturally, this configuration items allow for any approach you can think of for weighing messages\nand charging execution fees."}),"\n",(0,s.jsx)(n.h2,{id:"xcm-pallet",children:"XCM pallet"}),"\n",(0,s.jsx)(n.p,{children:"FRAME pallets, like the XCM pallet, specify weights for each extrinsic they expose. That means that\nwhen interacting with pallets that deal with XCM, there will be an additional fee at the beginning\nfor calling the extrinsic locally."})]})}function l(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},28453:(e,n,t)=>{t.d(n,{R:()=>o,x:()=>r});var s=t(96540);const i={},a=s.createContext(i);function o(e){const n=s.useContext(a);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:o(e.components),s.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/fabebe44.5fe41cac.js b/assets/js/fabebe44.5fe41cac.js deleted file mode 100644 index 33eb047c2198..000000000000 --- a/assets/js/fabebe44.5fe41cac.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9783],{68818:(e,o,t)=>{t.r(o),t.d(o,{assets:()=>l,contentTitle:()=>a,default:()=>h,frontMatter:()=>s,metadata:()=>i,toc:()=>d});var n=t(74848),r=t(28453);const s={id:"dev-heroes",title:"Developer Heroes Program",sidebar_label:"Developer Heroes",description:"More Power to Polkadot's Developers.",slug:"../dev-heroes"},a=void 0,i={id:"general/dev-heroes",title:"Developer Heroes Program",description:"More Power to Polkadot's Developers.",source:"@site/../docs/general/dev-heroes.md",sourceDirName:"general",slug:"/dev-heroes",permalink:"/docs/dev-heroes",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dev-heroes.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1710432171e3,frontMatter:{id:"dev-heroes",title:"Developer Heroes Program",sidebar_label:"Developer Heroes",description:"More Power to Polkadot's Developers.",slug:"../dev-heroes"},sidebar:"docs",previous:{title:"Thousand Contributors",permalink:"/docs/thousand-contributors"},next:{title:"Metadata Explorer",permalink:"/docs/metadata"}},l={},d=[{value:"Goal",id:"goal",level:2},{value:"Rookies and Heroes",id:"rookies-and-heroes",level:2}];function c(e){const o={a:"a",admonition:"admonition",h2:"h2",li:"li",p:"p",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(o.p,{children:["For more information about the Developer Heroes Program, see the\n",(0,n.jsx)(o.a,{href:"https://polkadot.network/blog/introducing-the-polkadot-developer-heroes-program?utm_source=twitter&utm_medium=social&utm_campaign=dhp&utm_content=tweet&utm_term=announcement",children:"Polkadot blog post"}),"."]}),"\n",(0,n.jsx)(o.admonition,{title:"Sign up",type:"info",children:(0,n.jsxs)(o.p,{children:["Use ",(0,n.jsx)(o.a,{href:"https://info.polkadot.network/polkadot-developer-heroes?ref=cms.polkadot.network",children:"this form"})," to\nsign up and become a candidate for the Polkadot Developer Heroes Program."]})}),"\n",(0,n.jsx)(o.h2,{id:"goal",children:"Goal"}),"\n",(0,n.jsx)(o.p,{children:"Build a strong community of Polkadot developers of different levels of expertise to drive the growth\nand evolution of the Polkadot ecosystem. Developers need to have some degree of experience with the\nPolkadot technology stack."}),"\n",(0,n.jsx)(o.p,{children:"The program provides:"}),"\n",(0,n.jsxs)(o.ul,{children:["\n",(0,n.jsx)(o.li,{children:"Opportunities for personal and professional growth."}),"\n",(0,n.jsx)(o.li,{children:"Resources and support to boost the growth and evolution of developers."}),"\n",(0,n.jsx)(o.li,{children:"Chance to showcase and enhance skills."}),"\n",(0,n.jsx)(o.li,{children:"Establish yourself as a valued contributor to the Polkadot ecosystem and pull someone else up on\nstage at the same time. Each one, teach one!"}),"\n"]}),"\n",(0,n.jsx)(o.h2,{id:"rookies-and-heroes",children:"Rookies and Heroes"}),"\n",(0,n.jsx)(o.p,{children:"A rookie is a beginner or first-timer developer. Someone who has previous experience in programming\nbut needs to gain in-depth knowledge about the Polkadot technology."}),"\n",(0,n.jsxs)(o.p,{children:["The technology includes but is not limited to independent ",(0,n.jsx)(o.a,{href:"/docs/glossary#substrate",children:"Substrate"}),"\nchains and ",(0,n.jsx)(o.a,{href:"/docs/build-smart-contracts#ink",children:"ink! development"}),", and Polkadot-related tooling.\nRookies will need to learn these concepts and tools so that they can deliver the tasks required to\nbe a Hero."]}),"\n",(0,n.jsx)(o.p,{children:"A rookie becomes a hero by continuously advocating for the technology used in the Polkadot ecosystem\nas well as spreading awareness and educating a broader audience about the technology."}),"\n",(0,n.jsx)(o.p,{children:"Depending on what you enjoy doing, you can become a hero by doing some of the following things:"}),"\n",(0,n.jsxs)(o.ul,{children:["\n",(0,n.jsxs)(o.li,{children:["\n",(0,n.jsxs)(o.p,{children:[(0,n.jsx)(o.strong,{children:"Offer mentoring"}),": Offer 1:1 or group mentoring to fellow community members."]}),"\n"]}),"\n",(0,n.jsxs)(o.li,{children:["\n",(0,n.jsxs)(o.p,{children:[(0,n.jsx)(o.strong,{children:"Help out in the community forums"}),": Answer questions from the community on the\n",(0,n.jsx)(o.a,{href:"https://substrate.stackexchange.com/?ref=cms.polkadot.network",children:"Substrate and Polkadot StackExchange"}),"\nor on the ",(0,n.jsx)(o.a,{href:"https://forum.polkadot.network/?ref=cms.polkadot.network",children:"Polkadot Forum"}),"."]}),"\n"]}),"\n",(0,n.jsxs)(o.li,{children:["\n",(0,n.jsxs)(o.p,{children:[(0,n.jsx)(o.strong,{children:"Contribute to the Polkadot stack"}),": Have a look at the\n",(0,n.jsx)(o.a,{href:"/docs/build-open-source",children:"open source technology stack list"})," and contribute with a pull\nrequest, an issue, or find and fix bugs."]}),"\n"]}),"\n",(0,n.jsxs)(o.li,{children:["\n",(0,n.jsxs)(o.p,{children:[(0,n.jsx)(o.strong,{children:"Create content"}),": Write a blog post, record a video tutorial, and write a Twitter thread. Share\nabout your latest coding success, something you learned and are excited about."]}),"\n"]}),"\n",(0,n.jsxs)(o.li,{children:["\n",(0,n.jsxs)(o.p,{children:[(0,n.jsx)(o.strong,{children:"Speak at events"}),": Do a workshop or talk at meetups and conferences."]}),"\n"]}),"\n"]})]})}function h(e={}){const{wrapper:o}={...(0,r.R)(),...e.components};return o?(0,n.jsx)(o,{...e,children:(0,n.jsx)(c,{...e})}):c(e)}},28453:(e,o,t)=>{t.d(o,{R:()=>a,x:()=>i});var n=t(96540);const r={},s=n.createContext(r);function a(e){const o=n.useContext(s);return n.useMemo((function(){return"function"==typeof e?e(o):{...o,...e}}),[o,e])}function i(e){let o;return o=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:a(e.components),n.createElement(s.Provider,{value:o},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/fabebe44.940a3293.js b/assets/js/fabebe44.940a3293.js new file mode 100644 index 000000000000..a664a055c145 --- /dev/null +++ b/assets/js/fabebe44.940a3293.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9783],{58846:(e,o,t)=>{t.r(o),t.d(o,{assets:()=>l,contentTitle:()=>i,default:()=>h,frontMatter:()=>a,metadata:()=>n,toc:()=>d});const n=JSON.parse('{"id":"general/dev-heroes","title":"Developer Heroes Program","description":"More Power to Polkadot\'s Developers.","source":"@site/../docs/general/dev-heroes.md","sourceDirName":"general","slug":"/dev-heroes","permalink":"/docs/dev-heroes","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/dev-heroes.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1710432171000,"frontMatter":{"id":"dev-heroes","title":"Developer Heroes Program","sidebar_label":"Developer Heroes","description":"More Power to Polkadot\'s Developers.","slug":"../dev-heroes"},"sidebar":"docs","previous":{"title":"Thousand Contributors","permalink":"/docs/thousand-contributors"},"next":{"title":"Metadata Explorer","permalink":"/docs/metadata"}}');var r=t(74848),s=t(28453);const a={id:"dev-heroes",title:"Developer Heroes Program",sidebar_label:"Developer Heroes",description:"More Power to Polkadot's Developers.",slug:"../dev-heroes"},i=void 0,l={},d=[{value:"Goal",id:"goal",level:2},{value:"Rookies and Heroes",id:"rookies-and-heroes",level:2}];function c(e){const o={a:"a",admonition:"admonition",h2:"h2",li:"li",p:"p",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(o.p,{children:["For more information about the Developer Heroes Program, see the\n",(0,r.jsx)(o.a,{href:"https://polkadot.network/blog/introducing-the-polkadot-developer-heroes-program?utm_source=twitter&utm_medium=social&utm_campaign=dhp&utm_content=tweet&utm_term=announcement",children:"Polkadot blog post"}),"."]}),"\n",(0,r.jsx)(o.admonition,{title:"Sign up",type:"info",children:(0,r.jsxs)(o.p,{children:["Use ",(0,r.jsx)(o.a,{href:"https://info.polkadot.network/polkadot-developer-heroes?ref=cms.polkadot.network",children:"this form"})," to\nsign up and become a candidate for the Polkadot Developer Heroes Program."]})}),"\n",(0,r.jsx)(o.h2,{id:"goal",children:"Goal"}),"\n",(0,r.jsx)(o.p,{children:"Build a strong community of Polkadot developers of different levels of expertise to drive the growth\nand evolution of the Polkadot ecosystem. Developers need to have some degree of experience with the\nPolkadot technology stack."}),"\n",(0,r.jsx)(o.p,{children:"The program provides:"}),"\n",(0,r.jsxs)(o.ul,{children:["\n",(0,r.jsx)(o.li,{children:"Opportunities for personal and professional growth."}),"\n",(0,r.jsx)(o.li,{children:"Resources and support to boost the growth and evolution of developers."}),"\n",(0,r.jsx)(o.li,{children:"Chance to showcase and enhance skills."}),"\n",(0,r.jsx)(o.li,{children:"Establish yourself as a valued contributor to the Polkadot ecosystem and pull someone else up on\nstage at the same time. Each one, teach one!"}),"\n"]}),"\n",(0,r.jsx)(o.h2,{id:"rookies-and-heroes",children:"Rookies and Heroes"}),"\n",(0,r.jsx)(o.p,{children:"A rookie is a beginner or first-timer developer. Someone who has previous experience in programming\nbut needs to gain in-depth knowledge about the Polkadot technology."}),"\n",(0,r.jsxs)(o.p,{children:["The technology includes but is not limited to independent ",(0,r.jsx)(o.a,{href:"/docs/glossary#substrate",children:"Substrate"}),"\nchains and ",(0,r.jsx)(o.a,{href:"/docs/build-smart-contracts#ink",children:"ink! development"}),", and Polkadot-related tooling.\nRookies will need to learn these concepts and tools so that they can deliver the tasks required to\nbe a Hero."]}),"\n",(0,r.jsx)(o.p,{children:"A rookie becomes a hero by continuously advocating for the technology used in the Polkadot ecosystem\nas well as spreading awareness and educating a broader audience about the technology."}),"\n",(0,r.jsx)(o.p,{children:"Depending on what you enjoy doing, you can become a hero by doing some of the following things:"}),"\n",(0,r.jsxs)(o.ul,{children:["\n",(0,r.jsxs)(o.li,{children:["\n",(0,r.jsxs)(o.p,{children:[(0,r.jsx)(o.strong,{children:"Offer mentoring"}),": Offer 1:1 or group mentoring to fellow community members."]}),"\n"]}),"\n",(0,r.jsxs)(o.li,{children:["\n",(0,r.jsxs)(o.p,{children:[(0,r.jsx)(o.strong,{children:"Help out in the community forums"}),": Answer questions from the community on the\n",(0,r.jsx)(o.a,{href:"https://substrate.stackexchange.com/?ref=cms.polkadot.network",children:"Substrate and Polkadot StackExchange"}),"\nor on the ",(0,r.jsx)(o.a,{href:"https://forum.polkadot.network/?ref=cms.polkadot.network",children:"Polkadot Forum"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(o.li,{children:["\n",(0,r.jsxs)(o.p,{children:[(0,r.jsx)(o.strong,{children:"Contribute to the Polkadot stack"}),": Have a look at the\n",(0,r.jsx)(o.a,{href:"/docs/build-open-source",children:"open source technology stack list"})," and contribute with a pull\nrequest, an issue, or find and fix bugs."]}),"\n"]}),"\n",(0,r.jsxs)(o.li,{children:["\n",(0,r.jsxs)(o.p,{children:[(0,r.jsx)(o.strong,{children:"Create content"}),": Write a blog post, record a video tutorial, and write a Twitter thread. Share\nabout your latest coding success, something you learned and are excited about."]}),"\n"]}),"\n",(0,r.jsxs)(o.li,{children:["\n",(0,r.jsxs)(o.p,{children:[(0,r.jsx)(o.strong,{children:"Speak at events"}),": Do a workshop or talk at meetups and conferences."]}),"\n"]}),"\n"]})]})}function h(e={}){const{wrapper:o}={...(0,s.R)(),...e.components};return o?(0,r.jsx)(o,{...e,children:(0,r.jsx)(c,{...e})}):c(e)}},28453:(e,o,t)=>{t.d(o,{R:()=>a,x:()=>i});var n=t(96540);const r={},s=n.createContext(r);function a(e){const o=n.useContext(s);return n.useMemo((function(){return"function"==typeof e?e(o):{...o,...e}}),[o,e])}function i(e){let o;return o=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:a(e.components),n.createElement(s.Provider,{value:o},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/fda65b2b.7252ddeb.js b/assets/js/fda65b2b.7252ddeb.js new file mode 100644 index 000000000000..edbacc365fac --- /dev/null +++ b/assets/js/fda65b2b.7252ddeb.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6225],{95619:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>c,contentTitle:()=>d,default:()=>u,frontMatter:()=>r,metadata:()=>n,toc:()=>l});const n=JSON.parse('{"id":"learn/learn-guides-asset-conversion","title":"Asset Conversion Tutorials","description":"Asset Conversion implementation details on AssetHub.","source":"@site/../docs/learn/learn-guides-asset-conversion.md","sourceDirName":"learn","slug":"/learn-guides-asset-conversion","permalink":"/docs/learn-guides-asset-conversion","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-asset-conversion.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1729847256000,"frontMatter":{"id":"learn-guides-asset-conversion","title":"Asset Conversion Tutorials","sidebar_label":"Asset Conversion Tutorials","description":"Asset Conversion implementation details on AssetHub.","keywords":["Assets","DEX","Exchange","Pools","Tokens"],"slug":"../learn-guides-asset-conversion"},"sidebar":"docs","previous":{"title":"Create Asset Guides","permalink":"/docs/learn-guides-assets-create"},"next":{"title":"Bridge Hub Guides","permalink":"/docs/learn-guides-bridges"}}');var o=t(74848),i=t(28453),a=t(67141);const r={id:"learn-guides-asset-conversion",title:"Asset Conversion Tutorials",sidebar_label:"Asset Conversion Tutorials",description:"Asset Conversion implementation details on AssetHub.",keywords:["Assets","DEX","Exchange","Pools","Tokens"],slug:"../learn-guides-asset-conversion"},d=void 0,c={},l=[{value:"Create a Liquidity Pool",id:"create-a-liquidity-pool",level:2},{value:"Liquidity Provision",id:"liquidity-provision",level:2},{value:"Swap Assets",id:"swap-assets",level:2},{value:"Swap from an exact amount of Tokens",id:"swap-from-an-exact-amount-of-tokens",level:3},{value:"Swap to an exact amount of Tokens",id:"swap-to-an-exact-amount-of-tokens",level:3},{value:"Withdraw Provided Liquidity",id:"withdraw-provided-liquidity",level:2}];function h(e){const s={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",img:"img",p:"p",pre:"pre",...(0,i.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(a.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the Polkadot-JS UI, you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,o.jsx)(s.admonition,{title:"Wallet and UI Developers",type:"info",children:(0,o.jsxs)(s.p,{children:["The ",(0,o.jsx)(s.a,{href:"https://github.com/MVPWorkshop/dot-acp-ui",children:"DOT ACP UI"})," project is part of Polkadot initiative\nfor building front-end and UI for Asset Conversion Pallet on Polkadot's Asset Hub. Currently, the\napp is deployed on Westend and Kusama ",(0,o.jsx)(s.a,{href:"https://app.dotacp.mvpworkshop.co/swap",children:"here"}),"."]})}),"\n",(0,o.jsx)(s.p,{children:"The tutorial below demonstrates the complete journey from creating a liquidity pool on Paseo test\nnet and exploring all of the key functionalities of Asset Conversion pallet."}),"\n",(0,o.jsx)(s.h2,{id:"create-a-liquidity-pool",children:"Create a Liquidity Pool"}),"\n",(0,o.jsxs)(s.p,{children:["If there is no existing liquidity pool for an asset on Asset Hub, the first step is to create a\nliquidity pool. If you are looking for a guide on how to create an asset on Asset Hub, it is\navailable ",(0,o.jsx)(s.a,{href:"/docs/learn-guides-assets-create",children:"here."})]}),"\n",(0,o.jsxs)(s.p,{children:["The ",(0,o.jsx)(s.code,{children:"create_pool"})," function is used to create an empty liquidity pool along with a new ",(0,o.jsx)(s.code,{children:"lp_token"}),"\nasset. This asset's ID is announced in the ",(0,o.jsx)(s.code,{children:"Event::PoolCreated"})," event. After creating a pool,\nliquidity can be added to it via the ",(0,o.jsx)(s.code,{children:"Pallet::add_liquidity"})," function."]}),"\n",(0,o.jsxs)(s.p,{children:["For example, the snapshot below shows how to create liquidity pool with ",(0,o.jsx)(s.code,{children:"PAS"})," tokens and ",(0,o.jsx)(s.code,{children:"EDU"}),"\ntokens with the asset ID ",(0,o.jsx)(s.code,{children:"149"})," on Paseo Asset Hub. Creating this extrinsic requires knowledge of\n",(0,o.jsx)(s.a,{href:"/docs/learn/xcm/fundamentals/multilocation-summary",children:"XCM Multilocations"}),". From the perspective of AssetHub,\nan Asset Hub, the asset with an ",(0,o.jsx)(s.code,{children:"AssetId"})," of ",(0,o.jsx)(s.code,{children:"149"})," has a MultiLocation of"]}),"\n",(0,o.jsx)(s.pre,{children:(0,o.jsx)(s.code,{children:"{\n parents: 0,\n interior: {\n X2: [{PalletInstance: 50}, {GeneralIndex: 149}]\n }\n}\n"})}),"\n",(0,o.jsxs)(s.p,{children:["The PalletInstance of ",(0,o.jsx)(s.code,{children:"50"})," represents the Assets pallet on Asset Hub and the ",(0,o.jsx)(s.code,{children:"GeneralIndex"})," is the\n",(0,o.jsx)(s.code,{children:"AssetId"})," of the asset."]}),"\n",(0,o.jsx)(s.p,{children:(0,o.jsx)(s.img,{alt:"Create Liquidity Pool",src:t(67780).A+"",width:"2870",height:"2186"})}),"\n",(0,o.jsxs)(s.p,{children:["The ",(0,o.jsx)(s.code,{children:"lp_token"})," ID created for this pool is ",(0,o.jsx)(s.code,{children:"24"}),", and\n",(0,o.jsx)(s.a,{href:"https://assethub-rococo.subscan.io/extrinsic/4604922-2?event=4604922-8",children:"here"})," is the event for\nreference."]}),"\n",(0,o.jsx)(s.h2,{id:"liquidity-provision",children:"Liquidity Provision"}),"\n",(0,o.jsxs)(s.p,{children:["The ",(0,o.jsx)(s.code,{children:"add_liquidity"})," function allows users to provide liquidity to a pool composed of two assets. It\nrequires specifying the desired amounts for both assets and minimum acceptable amounts. The function\ncalculates an optimal contribution of assets, which may differ from the desired amounts but will not\nbe less than the specified minimums. Liquidity providers receive liquidity tokens representing their\nshare of the pool."]}),"\n",(0,o.jsxs)(s.p,{children:["For example, the snapshot below shows how to provide liquidity to the pool with ",(0,o.jsx)(s.code,{children:"PAS"})," tokens and\n",(0,o.jsx)(s.code,{children:"EDU"})," tokens with the asset ID ",(0,o.jsx)(s.code,{children:"149"})," on Paseo Asset Hub. The intention is to provide liquidity of 1\n",(0,o.jsx)(s.code,{children:"PAS"})," token (",(0,o.jsx)(s.code,{children:"u128"})," value of ",(0,o.jsx)(s.code,{children:"1000000000000"})," as it has 12 decimals) and 100 ",(0,o.jsx)(s.code,{children:"EDU"})," tokens (",(0,o.jsx)(s.code,{children:"u128"}),"\nvalue of ",(0,o.jsx)(s.code,{children:"1000000000000"})," as it has 10 decimals)."]}),"\n",(0,o.jsx)(s.p,{children:(0,o.jsx)(s.img,{alt:"Provide Liquidity",src:t(17097).A+"",width:"2860",height:"2992"})}),"\n",(0,o.jsxs)(s.p,{children:["After successful submission of the extrinsic above, LP tokens are minted to the specified account.\nBelow is the snapshot of the liquidity pool on the\n",(0,o.jsx)(s.a,{href:"https://github.com/MVPWorkshop/dot-acp-ui",children:"DOT ACP UI."})]}),"\n",(0,o.jsx)(s.p,{children:(0,o.jsx)(s.img,{alt:"Liquidity Pool Example",src:t(76705).A+"",width:"2595",height:"1296"})}),"\n",(0,o.jsx)(s.h2,{id:"swap-assets",children:"Swap Assets"}),"\n",(0,o.jsx)(s.h3,{id:"swap-from-an-exact-amount-of-tokens",children:"Swap from an exact amount of Tokens"}),"\n",(0,o.jsxs)(s.p,{children:["The ",(0,o.jsx)(s.code,{children:"swap_exact_tokens_for_tokens"})," function allows users to swap a precise amount of one asset for\nanother within a specified liquidity pool, ensuring the user receives at least a minimum expected\namount of the second asset in return. This function aims to provide predictability in trading\noutcomes, allowing users to manage their asset exchanges with confidence regarding the minimum\nreturn."]}),"\n",(0,o.jsxs)(s.p,{children:["For example, the snapshot below shows how to swap ",(0,o.jsx)(s.code,{children:"PAS"})," tokens to ",(0,o.jsx)(s.code,{children:"EDU"})," tokens with the asset ID\n",(0,o.jsx)(s.code,{children:"149"})," on Paseo Asset Hub. The intention is to swap 0.1 ",(0,o.jsx)(s.code,{children:"PAS"})," tokens (",(0,o.jsx)(s.code,{children:"u128"})," value of ",(0,o.jsx)(s.code,{children:"100000000000"}),"\nas it has 12 decimals) to at least 9 ",(0,o.jsx)(s.code,{children:"EDU"})," tokens (",(0,o.jsx)(s.code,{children:"u128"})," value of ",(0,o.jsx)(s.code,{children:"90000000000"})," as it has 10\ndecimals)."]}),"\n",(0,o.jsx)(s.p,{children:(0,o.jsx)(s.img,{alt:"Swap Exact Amount",src:t(38224).A+"",width:"2844",height:"3016"})}),"\n",(0,o.jsxs)(s.p,{children:["Below is the snapshot of the liquidity pool on the\n",(0,o.jsx)(s.a,{href:"https://github.com/MVPWorkshop/dot-acp-ui",children:"DOT ACP UI."})," after successful submission of the\nextrinsic above. It can be observed that the pool now has 1.1 ",(0,o.jsx)(s.code,{children:"ROC"})," tokens and around 9.06 ",(0,o.jsx)(s.code,{children:"EDU"}),"\ntokens are transferred out of it."]}),"\n",(0,o.jsx)(s.p,{children:(0,o.jsx)(s.img,{alt:"Swap Exact Amount Example",src:t(3412).A+"",width:"2746",height:"1140"})}),"\n",(0,o.jsx)(s.h3,{id:"swap-to-an-exact-amount-of-tokens",children:"Swap to an exact amount of Tokens"}),"\n",(0,o.jsxs)(s.p,{children:["On the other hand, the ",(0,o.jsx)(s.code,{children:"swap_tokens_for_exact_tokens"})," function allows users to trade a flexible\namount of one asset to precisely obtain a specified amount of another asset. It ensures that users\ndo not spend more than a predetermined maximum amount of the initial asset to acquire the exact\ntarget amount of the second asset, providing a way to control the cost of the transaction while\nachieving the desired outcome."]}),"\n",(0,o.jsxs)(s.p,{children:["For example, the snapshot below shows how to swap ",(0,o.jsx)(s.code,{children:"EDU"})," tokens with the asset ID ",(0,o.jsx)(s.code,{children:"149"})," on Paseo\nAsset Hub to ",(0,o.jsx)(s.code,{children:"PAS"})," Tokens. The intention is to swap for obtaining 0.1 ",(0,o.jsx)(s.code,{children:"PAS"})," tokens (",(0,o.jsx)(s.code,{children:"u128"})," value of\n",(0,o.jsx)(s.code,{children:"100000000000"})," as it has 12 decimals) for a maximum of 10 ",(0,o.jsx)(s.code,{children:"EDU"})," tokens (",(0,o.jsx)(s.code,{children:"u128"})," value of\n",(0,o.jsx)(s.code,{children:"100000000000"})," as it has 10 decimals)."]}),"\n",(0,o.jsx)(s.p,{children:(0,o.jsx)(s.img,{alt:"Swap Exact Amount",src:t(48109).A+"",width:"2860",height:"3006"})}),"\n",(0,o.jsxs)(s.p,{children:["Below is the snapshot of the liquidity pool on the\n",(0,o.jsx)(s.a,{href:"https://github.com/MVPWorkshop/dot-acp-ui",children:"DOT ACP UI."})," after successful submission of the\nextrinsic above."]}),"\n",(0,o.jsx)(s.p,{children:(0,o.jsx)(s.img,{alt:"Swap to Exact Amount Example",src:t(82545).A+"",width:"2627",height:"1294"})}),"\n",(0,o.jsx)(s.h2,{id:"withdraw-provided-liquidity",children:"Withdraw Provided Liquidity"}),"\n",(0,o.jsxs)(s.p,{children:["The ",(0,o.jsx)(s.code,{children:"remove_liquidity"})," function allows users to withdraw their provided liquidity from a pool,\nreceiving back the original assets. When calling this function, users specify the amount of\nliquidity tokens (representing their share in the pool) they wish to burn. They also set minimum\nacceptable amounts for the assets they expect to receive back. This mechanism ensures users can\ncontrol the minimum value they receive, protecting against unfavourable price movements during the\nwithdrawal process\u200b."]}),"\n",(0,o.jsxs)(s.p,{children:["For example, the snapshot below shows how to remove liquidity by specifying the number of LP tokens.\nIn exchange of removing around half of the liquidity of the pool, the expecation is that we receive\nat least 0.4 ",(0,o.jsx)(s.code,{children:"ROC"})," tokens (",(0,o.jsx)(s.code,{children:"u128"})," value of",(0,o.jsx)(s.code,{children:"400000000000"})," as it has 12 decimals) and 40 ",(0,o.jsx)(s.code,{children:"EDU"})," tokens\n(",(0,o.jsx)(s.code,{children:"u128"})," value of ",(0,o.jsx)(s.code,{children:"400000000000"})," as it has 10 decimals)."]}),"\n",(0,o.jsx)(s.p,{children:(0,o.jsx)(s.img,{alt:"Remove Liquidity",src:t(37340).A+"",width:"2832",height:"2870"})}),"\n",(0,o.jsxs)(s.p,{children:["Below is the snapshot of the liquidity pool on the\n",(0,o.jsx)(s.a,{href:"https://github.com/MVPWorkshop/dot-acp-ui",children:"DOT ACP UI."})," after successful submission of the\nextrinsic above."]}),"\n",(0,o.jsx)(s.p,{children:(0,o.jsx)(s.img,{alt:"Remove Liquidity Example",src:t(43745).A+"",width:"2585",height:"1309"})})]})}function u(e={}){const{wrapper:s}={...(0,i.R)(),...e.components};return s?(0,o.jsx)(s,{...e,children:(0,o.jsx)(h,{...e})}):h(e)}},67141:(e,s,t)=>{t.d(s,{A:()=>i});var n=t(96540),o=t(74848);const i=function(e){var s,t=e.message,i=(0,n.useState)(!0),a=i[0],r=i[1];return(0,o.jsx)(o.Fragment,{children:a&&(0,o.jsxs)("div",{className:"message-box",children:[(0,o.jsx)("button",{className:"close-button",onClick:function(){r(!1)},children:"\u2716 "}),(0,o.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(s=t,s.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},17097:(e,s,t)=>{t.d(s,{A:()=>n});const n=t.p+"assets/images/Asset-Conversion-Add-Liquidity-e880d907645db19dc0ee4b8b9fdb9ad3.png"},67780:(e,s,t)=>{t.d(s,{A:()=>n});const n=t.p+"assets/images/Asset-Conversion-Create-Pool-8945e1790f183ac14a4f1185763ea5a0.png"},76705:(e,s,t)=>{t.d(s,{A:()=>n});const n=t.p+"assets/images/Asset-Conversion-Liquidity-Pool-Example-ae441ec1a55827fd488ecef3b8510681.png"},43745:(e,s,t)=>{t.d(s,{A:()=>n});const n=t.p+"assets/images/Asset-Conversion-Remove-Liquidity-Example-bfdc3a0b327bd592c2abcf4cfb9b1755.png"},37340:(e,s,t)=>{t.d(s,{A:()=>n});const n=t.p+"assets/images/Asset-Conversion-Remove-Liquidity-7fc348a12802b40bf643683bd14c5a3b.png"},38224:(e,s,t)=>{t.d(s,{A:()=>n});const n=t.p+"assets/images/Asset-Conversion-Swap-Exact-Token-a56d6a02ba2bf1a2620bc7f3955aa658.png"},3412:(e,s,t)=>{t.d(s,{A:()=>n});const n=t.p+"assets/images/Asset-Conversion-Swap-Exact-Tokens-Example-60790c60e4a0315e59834c0c5421b0f9.png"},82545:(e,s,t)=>{t.d(s,{A:()=>n});const n=t.p+"assets/images/Asset-Conversion-Swap-To-Exact-Example-9be51ed786d418f553b1eeb0ae866cb0.png"},48109:(e,s,t)=>{t.d(s,{A:()=>n});const n=t.p+"assets/images/Asset-Conversion-Swap-To-Exact-Tokens-ae5e1b66b2a80208b329a48af5ab8472.png"},28453:(e,s,t)=>{t.d(s,{R:()=>a,x:()=>r});var n=t(96540);const o={},i=n.createContext(o);function a(e){const s=n.useContext(i);return n.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function r(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:a(e.components),n.createElement(i.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/fda65b2b.da8be3da.js b/assets/js/fda65b2b.da8be3da.js deleted file mode 100644 index 00a112198e13..000000000000 --- a/assets/js/fda65b2b.da8be3da.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6225],{54276:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>c,contentTitle:()=>r,default:()=>u,frontMatter:()=>a,metadata:()=>d,toc:()=>l});var n=t(74848),o=t(28453),i=t(67141);const a={id:"learn-guides-asset-conversion",title:"Asset Conversion Tutorials",sidebar_label:"Asset Conversion Tutorials",description:"Asset Conversion implementation details on AssetHub.",keywords:["Assets","DEX","Exchange","Pools","Tokens"],slug:"../learn-guides-asset-conversion"},r=void 0,d={id:"learn/learn-guides-asset-conversion",title:"Asset Conversion Tutorials",description:"Asset Conversion implementation details on AssetHub.",source:"@site/../docs/learn/learn-guides-asset-conversion.md",sourceDirName:"learn",slug:"/learn-guides-asset-conversion",permalink:"/docs/learn-guides-asset-conversion",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-asset-conversion.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1729847256e3,frontMatter:{id:"learn-guides-asset-conversion",title:"Asset Conversion Tutorials",sidebar_label:"Asset Conversion Tutorials",description:"Asset Conversion implementation details on AssetHub.",keywords:["Assets","DEX","Exchange","Pools","Tokens"],slug:"../learn-guides-asset-conversion"},sidebar:"docs",previous:{title:"Create Asset Guides",permalink:"/docs/learn-guides-assets-create"},next:{title:"Bridge Hub Guides",permalink:"/docs/learn-guides-bridges"}},c={},l=[{value:"Create a Liquidity Pool",id:"create-a-liquidity-pool",level:2},{value:"Liquidity Provision",id:"liquidity-provision",level:2},{value:"Swap Assets",id:"swap-assets",level:2},{value:"Swap from an exact amount of Tokens",id:"swap-from-an-exact-amount-of-tokens",level:3},{value:"Swap to an exact amount of Tokens",id:"swap-to-an-exact-amount-of-tokens",level:3},{value:"Withdraw Provided Liquidity",id:"withdraw-provided-liquidity",level:2}];function h(e){const s={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",img:"img",p:"p",pre:"pre",...(0,o.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(i.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the Polkadot-JS UI, you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,n.jsx)(s.admonition,{title:"Wallet and UI Developers",type:"info",children:(0,n.jsxs)(s.p,{children:["The ",(0,n.jsx)(s.a,{href:"https://github.com/MVPWorkshop/dot-acp-ui",children:"DOT ACP UI"})," project is part of Polkadot initiative\nfor building front-end and UI for Asset Conversion Pallet on Polkadot's Asset Hub. Currently, the\napp is deployed on Westend and Kusama ",(0,n.jsx)(s.a,{href:"https://app.dotacp.mvpworkshop.co/swap",children:"here"}),"."]})}),"\n",(0,n.jsx)(s.p,{children:"The tutorial below demonstrates the complete journey from creating a liquidity pool on Paseo test\nnet and exploring all of the key functionalities of Asset Conversion pallet."}),"\n",(0,n.jsx)(s.h2,{id:"create-a-liquidity-pool",children:"Create a Liquidity Pool"}),"\n",(0,n.jsxs)(s.p,{children:["If there is no existing liquidity pool for an asset on Asset Hub, the first step is to create a\nliquidity pool. If you are looking for a guide on how to create an asset on Asset Hub, it is\navailable ",(0,n.jsx)(s.a,{href:"/docs/learn-guides-assets-create",children:"here."})]}),"\n",(0,n.jsxs)(s.p,{children:["The ",(0,n.jsx)(s.code,{children:"create_pool"})," function is used to create an empty liquidity pool along with a new ",(0,n.jsx)(s.code,{children:"lp_token"}),"\nasset. This asset's ID is announced in the ",(0,n.jsx)(s.code,{children:"Event::PoolCreated"})," event. After creating a pool,\nliquidity can be added to it via the ",(0,n.jsx)(s.code,{children:"Pallet::add_liquidity"})," function."]}),"\n",(0,n.jsxs)(s.p,{children:["For example, the snapshot below shows how to create liquidity pool with ",(0,n.jsx)(s.code,{children:"PAS"})," tokens and ",(0,n.jsx)(s.code,{children:"EDU"}),"\ntokens with the asset ID ",(0,n.jsx)(s.code,{children:"149"})," on Paseo Asset Hub. Creating this extrinsic requires knowledge of\n",(0,n.jsx)(s.a,{href:"/docs/learn/xcm/fundamentals/multilocation-summary",children:"XCM Multilocations"}),". From the perspective of AssetHub,\nan Asset Hub, the asset with an ",(0,n.jsx)(s.code,{children:"AssetId"})," of ",(0,n.jsx)(s.code,{children:"149"})," has a MultiLocation of"]}),"\n",(0,n.jsx)(s.pre,{children:(0,n.jsx)(s.code,{children:"{\n parents: 0,\n interior: {\n X2: [{PalletInstance: 50}, {GeneralIndex: 149}]\n }\n}\n"})}),"\n",(0,n.jsxs)(s.p,{children:["The PalletInstance of ",(0,n.jsx)(s.code,{children:"50"})," represents the Assets pallet on Asset Hub and the ",(0,n.jsx)(s.code,{children:"GeneralIndex"})," is the\n",(0,n.jsx)(s.code,{children:"AssetId"})," of the asset."]}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.img,{alt:"Create Liquidity Pool",src:t(67780).A+"",width:"2870",height:"2186"})}),"\n",(0,n.jsxs)(s.p,{children:["The ",(0,n.jsx)(s.code,{children:"lp_token"})," ID created for this pool is ",(0,n.jsx)(s.code,{children:"24"}),", and\n",(0,n.jsx)(s.a,{href:"https://assethub-rococo.subscan.io/extrinsic/4604922-2?event=4604922-8",children:"here"})," is the event for\nreference."]}),"\n",(0,n.jsx)(s.h2,{id:"liquidity-provision",children:"Liquidity Provision"}),"\n",(0,n.jsxs)(s.p,{children:["The ",(0,n.jsx)(s.code,{children:"add_liquidity"})," function allows users to provide liquidity to a pool composed of two assets. It\nrequires specifying the desired amounts for both assets and minimum acceptable amounts. The function\ncalculates an optimal contribution of assets, which may differ from the desired amounts but will not\nbe less than the specified minimums. Liquidity providers receive liquidity tokens representing their\nshare of the pool."]}),"\n",(0,n.jsxs)(s.p,{children:["For example, the snapshot below shows how to provide liquidity to the pool with ",(0,n.jsx)(s.code,{children:"PAS"})," tokens and\n",(0,n.jsx)(s.code,{children:"EDU"})," tokens with the asset ID ",(0,n.jsx)(s.code,{children:"149"})," on Paseo Asset Hub. The intention is to provide liquidity of 1\n",(0,n.jsx)(s.code,{children:"PAS"})," token (",(0,n.jsx)(s.code,{children:"u128"})," value of ",(0,n.jsx)(s.code,{children:"1000000000000"})," as it has 12 decimals) and 100 ",(0,n.jsx)(s.code,{children:"EDU"})," tokens (",(0,n.jsx)(s.code,{children:"u128"}),"\nvalue of ",(0,n.jsx)(s.code,{children:"1000000000000"})," as it has 10 decimals)."]}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.img,{alt:"Provide Liquidity",src:t(17097).A+"",width:"2860",height:"2992"})}),"\n",(0,n.jsxs)(s.p,{children:["After successful submission of the extrinsic above, LP tokens are minted to the specified account.\nBelow is the snapshot of the liquidity pool on the\n",(0,n.jsx)(s.a,{href:"https://github.com/MVPWorkshop/dot-acp-ui",children:"DOT ACP UI."})]}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.img,{alt:"Liquidity Pool Example",src:t(76705).A+"",width:"2595",height:"1296"})}),"\n",(0,n.jsx)(s.h2,{id:"swap-assets",children:"Swap Assets"}),"\n",(0,n.jsx)(s.h3,{id:"swap-from-an-exact-amount-of-tokens",children:"Swap from an exact amount of Tokens"}),"\n",(0,n.jsxs)(s.p,{children:["The ",(0,n.jsx)(s.code,{children:"swap_exact_tokens_for_tokens"})," function allows users to swap a precise amount of one asset for\nanother within a specified liquidity pool, ensuring the user receives at least a minimum expected\namount of the second asset in return. This function aims to provide predictability in trading\noutcomes, allowing users to manage their asset exchanges with confidence regarding the minimum\nreturn."]}),"\n",(0,n.jsxs)(s.p,{children:["For example, the snapshot below shows how to swap ",(0,n.jsx)(s.code,{children:"PAS"})," tokens to ",(0,n.jsx)(s.code,{children:"EDU"})," tokens with the asset ID\n",(0,n.jsx)(s.code,{children:"149"})," on Paseo Asset Hub. The intention is to swap 0.1 ",(0,n.jsx)(s.code,{children:"PAS"})," tokens (",(0,n.jsx)(s.code,{children:"u128"})," value of ",(0,n.jsx)(s.code,{children:"100000000000"}),"\nas it has 12 decimals) to at least 9 ",(0,n.jsx)(s.code,{children:"EDU"})," tokens (",(0,n.jsx)(s.code,{children:"u128"})," value of ",(0,n.jsx)(s.code,{children:"90000000000"})," as it has 10\ndecimals)."]}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.img,{alt:"Swap Exact Amount",src:t(38224).A+"",width:"2844",height:"3016"})}),"\n",(0,n.jsxs)(s.p,{children:["Below is the snapshot of the liquidity pool on the\n",(0,n.jsx)(s.a,{href:"https://github.com/MVPWorkshop/dot-acp-ui",children:"DOT ACP UI."})," after successful submission of the\nextrinsic above. It can be observed that the pool now has 1.1 ",(0,n.jsx)(s.code,{children:"ROC"})," tokens and around 9.06 ",(0,n.jsx)(s.code,{children:"EDU"}),"\ntokens are transferred out of it."]}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.img,{alt:"Swap Exact Amount Example",src:t(3412).A+"",width:"2746",height:"1140"})}),"\n",(0,n.jsx)(s.h3,{id:"swap-to-an-exact-amount-of-tokens",children:"Swap to an exact amount of Tokens"}),"\n",(0,n.jsxs)(s.p,{children:["On the other hand, the ",(0,n.jsx)(s.code,{children:"swap_tokens_for_exact_tokens"})," function allows users to trade a flexible\namount of one asset to precisely obtain a specified amount of another asset. It ensures that users\ndo not spend more than a predetermined maximum amount of the initial asset to acquire the exact\ntarget amount of the second asset, providing a way to control the cost of the transaction while\nachieving the desired outcome."]}),"\n",(0,n.jsxs)(s.p,{children:["For example, the snapshot below shows how to swap ",(0,n.jsx)(s.code,{children:"EDU"})," tokens with the asset ID ",(0,n.jsx)(s.code,{children:"149"})," on Paseo\nAsset Hub to ",(0,n.jsx)(s.code,{children:"PAS"})," Tokens. The intention is to swap for obtaining 0.1 ",(0,n.jsx)(s.code,{children:"PAS"})," tokens (",(0,n.jsx)(s.code,{children:"u128"})," value of\n",(0,n.jsx)(s.code,{children:"100000000000"})," as it has 12 decimals) for a maximum of 10 ",(0,n.jsx)(s.code,{children:"EDU"})," tokens (",(0,n.jsx)(s.code,{children:"u128"})," value of\n",(0,n.jsx)(s.code,{children:"100000000000"})," as it has 10 decimals)."]}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.img,{alt:"Swap Exact Amount",src:t(48109).A+"",width:"2860",height:"3006"})}),"\n",(0,n.jsxs)(s.p,{children:["Below is the snapshot of the liquidity pool on the\n",(0,n.jsx)(s.a,{href:"https://github.com/MVPWorkshop/dot-acp-ui",children:"DOT ACP UI."})," after successful submission of the\nextrinsic above."]}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.img,{alt:"Swap to Exact Amount Example",src:t(82545).A+"",width:"2627",height:"1294"})}),"\n",(0,n.jsx)(s.h2,{id:"withdraw-provided-liquidity",children:"Withdraw Provided Liquidity"}),"\n",(0,n.jsxs)(s.p,{children:["The ",(0,n.jsx)(s.code,{children:"remove_liquidity"})," function allows users to withdraw their provided liquidity from a pool,\nreceiving back the original assets. When calling this function, users specify the amount of\nliquidity tokens (representing their share in the pool) they wish to burn. They also set minimum\nacceptable amounts for the assets they expect to receive back. This mechanism ensures users can\ncontrol the minimum value they receive, protecting against unfavourable price movements during the\nwithdrawal process\u200b."]}),"\n",(0,n.jsxs)(s.p,{children:["For example, the snapshot below shows how to remove liquidity by specifying the number of LP tokens.\nIn exchange of removing around half of the liquidity of the pool, the expecation is that we receive\nat least 0.4 ",(0,n.jsx)(s.code,{children:"ROC"})," tokens (",(0,n.jsx)(s.code,{children:"u128"})," value of",(0,n.jsx)(s.code,{children:"400000000000"})," as it has 12 decimals) and 40 ",(0,n.jsx)(s.code,{children:"EDU"})," tokens\n(",(0,n.jsx)(s.code,{children:"u128"})," value of ",(0,n.jsx)(s.code,{children:"400000000000"})," as it has 10 decimals)."]}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.img,{alt:"Remove Liquidity",src:t(37340).A+"",width:"2832",height:"2870"})}),"\n",(0,n.jsxs)(s.p,{children:["Below is the snapshot of the liquidity pool on the\n",(0,n.jsx)(s.a,{href:"https://github.com/MVPWorkshop/dot-acp-ui",children:"DOT ACP UI."})," after successful submission of the\nextrinsic above."]}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.img,{alt:"Remove Liquidity Example",src:t(43745).A+"",width:"2585",height:"1309"})})]})}function u(e={}){const{wrapper:s}={...(0,o.R)(),...e.components};return s?(0,n.jsx)(s,{...e,children:(0,n.jsx)(h,{...e})}):h(e)}},67141:(e,s,t)=>{t.d(s,{A:()=>i});var n=t(96540),o=t(74848);const i=function(e){var s,t=e.message,i=(0,n.useState)(!0),a=i[0],r=i[1];return(0,o.jsx)(o.Fragment,{children:a&&(0,o.jsxs)("div",{className:"message-box",children:[(0,o.jsx)("button",{className:"close-button",onClick:function(){r(!1)},children:"\u2716 "}),(0,o.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(s=t,s.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},17097:(e,s,t)=>{t.d(s,{A:()=>n});const n=t.p+"assets/images/Asset-Conversion-Add-Liquidity-e880d907645db19dc0ee4b8b9fdb9ad3.png"},67780:(e,s,t)=>{t.d(s,{A:()=>n});const n=t.p+"assets/images/Asset-Conversion-Create-Pool-8945e1790f183ac14a4f1185763ea5a0.png"},76705:(e,s,t)=>{t.d(s,{A:()=>n});const n=t.p+"assets/images/Asset-Conversion-Liquidity-Pool-Example-ae441ec1a55827fd488ecef3b8510681.png"},43745:(e,s,t)=>{t.d(s,{A:()=>n});const n=t.p+"assets/images/Asset-Conversion-Remove-Liquidity-Example-bfdc3a0b327bd592c2abcf4cfb9b1755.png"},37340:(e,s,t)=>{t.d(s,{A:()=>n});const n=t.p+"assets/images/Asset-Conversion-Remove-Liquidity-7fc348a12802b40bf643683bd14c5a3b.png"},38224:(e,s,t)=>{t.d(s,{A:()=>n});const n=t.p+"assets/images/Asset-Conversion-Swap-Exact-Token-a56d6a02ba2bf1a2620bc7f3955aa658.png"},3412:(e,s,t)=>{t.d(s,{A:()=>n});const n=t.p+"assets/images/Asset-Conversion-Swap-Exact-Tokens-Example-60790c60e4a0315e59834c0c5421b0f9.png"},82545:(e,s,t)=>{t.d(s,{A:()=>n});const n=t.p+"assets/images/Asset-Conversion-Swap-To-Exact-Example-9be51ed786d418f553b1eeb0ae866cb0.png"},48109:(e,s,t)=>{t.d(s,{A:()=>n});const n=t.p+"assets/images/Asset-Conversion-Swap-To-Exact-Tokens-ae5e1b66b2a80208b329a48af5ab8472.png"},28453:(e,s,t)=>{t.d(s,{R:()=>a,x:()=>r});var n=t(96540);const o={},i=n.createContext(o);function a(e){const s=n.useContext(i);return n.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function r(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:a(e.components),n.createElement(i.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/fea93377.1ab0444c.js b/assets/js/fea93377.1ab0444c.js new file mode 100644 index 000000000000..57e4cd977c4d --- /dev/null +++ b/assets/js/fea93377.1ab0444c.js @@ -0,0 +1 @@ +(self.webpackChunk=self.webpackChunk||[]).push([[4898],{48568:(e,a,t)=>{"use strict";t.r(a),t.d(a,{assets:()=>l,contentTitle:()=>s,default:()=>h,frontMatter:()=>i,metadata:()=>n,toc:()=>d});const n=JSON.parse('{"id":"maintain/maintain-guides-validator-payout","title":"Validator Payout Overview","description":"How validator payout works on the network and what you should expect.","source":"@site/../docs/maintain/maintain-guides-validator-payout.md","sourceDirName":"maintain","slug":"/maintain-guides-validator-payout","permalink":"/docs/maintain-guides-validator-payout","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/maintain/maintain-guides-validator-payout.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1726730833000,"frontMatter":{"id":"maintain-guides-validator-payout","title":"Validator Payout Overview","sidebar_label":"Validator Payout Overview","description":"How validator payout works on the network and what you should expect.","keywords":["validator payout","payments","rewards","era points"],"slug":"../maintain-guides-validator-payout"},"sidebar":"docs","previous":{"title":"How to run a Validator on Polkadot","permalink":"/docs/maintain-guides-how-to-validate-polkadot"},"next":{"title":"Using systemd for a Validator Node","permalink":"/docs/maintain-guides-how-to-systemd"}}');var o=t(74848),r=t(28453);t(47379);const i={id:"maintain-guides-validator-payout",title:"Validator Payout Overview",sidebar_label:"Validator Payout Overview",description:"How validator payout works on the network and what you should expect.",keywords:["validator payout","payments","rewards","era points"],slug:"../maintain-guides-validator-payout"},s=void 0,l={},d=[{value:"Era Points",id:"era-points",level:2},{value:"Payout Scheme",id:"payout-scheme",level:2},{value:"Running Multiple Validators",id:"running-multiple-validators",level:2},{value:"Nominators and Validator Payments",id:"nominators-and-validator-payments",level:2}];function c(e){const a={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",li:"li",p:"p",pre:"pre",ul:"ul",...(0,r.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(a.h2,{id:"era-points",children:"Era Points"}),"\n",(0,o.jsxs)(a.p,{children:["For every era (a period of time approximately 6 hours in length in Kusama, and 24 hours in\nPolkadot), validators are paid proportionally to the amount of ",(0,o.jsx)(a.em,{children:"era points"})," they have collected. Era\npoints are reward points earned for payable actions like:"]}),"\n",(0,o.jsxs)(a.ul,{children:["\n",(0,o.jsxs)(a.li,{children:["issuing validity statements for ",(0,o.jsx)(a.a,{href:"/docs/learn-parachains",children:"parachain"})," blocks."]}),"\n",(0,o.jsx)(a.li,{children:"producing a non-uncle block in the relay chain."}),"\n",(0,o.jsx)(a.li,{children:"producing a reference to a previously unreferenced uncle block."}),"\n",(0,o.jsx)(a.li,{children:"producing a referenced uncle block."}),"\n"]}),"\n",(0,o.jsx)(a.admonition,{type:"note",children:(0,o.jsx)(a.p,{children:"An uncle block is a relay chain block that is valid in every regard, but which failed to become\ncanonical. This can happen when two or more validators are block producers in a single slot, and the\nblock produced by one validator reaches the next block producer before the others. We call the\nlagging blocks uncle blocks."})}),"\n",(0,o.jsx)(a.p,{children:"Payments occur at the end of every era."}),"\n",(0,o.jsx)(a.p,{children:"Era points create a probabilistic component for staking rewards."}),"\n",(0,o.jsxs)(a.p,{children:["If the ",(0,o.jsx)(a.em,{children:"mean"})," of staking rewards is the average rewards per era, then the ",(0,o.jsx)(a.em,{children:"variance"})," is the\nvariability from the average staking rewards. The exact DOT value of each era point is not known in\nadvance since it depends on the total number of points earned by all validators in a given era. This\nis designed this way so that the total payout per era depends on Polkadot's\n",(0,o.jsx)(a.a,{href:"/docs/learn-staking-advanced#inflation",children:"inflation model"}),", and not on the number of payable\nactions (f.e., authoring a new block) executed. For more information, check\n",(0,o.jsx)(a.a,{href:"https://substrate.stackexchange.com/questions/5353/how-are-rewards-in-dot-calculated-from-the-era-points-earned-by-validators-in-po",children:"this stackexchange post"}),"."]}),"\n",(0,o.jsx)(a.p,{children:"With parachains now on Polkadot, a large percentage of era points will come from parachain\nvalidation, as a subset of validators are selected to para-validate for all parachains each epoch,\nand those para-validators can generate more era points as a result. Para-validators are rewarded 20\nera points each for each parachain block that they validate."}),"\n",(0,o.jsxs)(a.p,{children:["In this case, analyzing the ",(0,o.jsx)(a.em,{children:"expected value"})," of staking rewards will paint a better picture as the\nweight of era points of validators and para-validators in the reward average are taken into\nconsideration."]}),"\n",(0,o.jsxs)(a.admonition,{title:"High-level breakdown of reward variance",type:"note",children:[(0,o.jsx)(a.p,{children:"This should only serve as a high-level overview of the probabilistic nature for staking rewards."}),(0,o.jsx)(a.p,{children:"Let:"}),(0,o.jsxs)(a.ul,{children:["\n",(0,o.jsxs)(a.li,{children:[(0,o.jsx)(a.code,{children:"pe"})," = para-validator era points,"]}),"\n",(0,o.jsxs)(a.li,{children:[(0,o.jsx)(a.code,{children:"ne"})," = non-para-validator era points,"]}),"\n",(0,o.jsxs)(a.li,{children:[(0,o.jsx)(a.code,{children:"EV"})," = expected value of staking rewards,"]}),"\n"]}),(0,o.jsxs)(a.p,{children:["Then, ",(0,o.jsx)(a.code,{children:"EV(pe)"})," has more influence on the ",(0,o.jsx)(a.code,{children:"EV"})," than ",(0,o.jsx)(a.code,{children:"EV(ne)"}),"."]}),(0,o.jsxs)(a.p,{children:["Since ",(0,o.jsx)(a.code,{children:"EV(pe)"})," has a more weighted probability on the ",(0,o.jsx)(a.code,{children:"EV"}),", the increase in variance against the\n",(0,o.jsx)(a.code,{children:"EV"})," becomes apparent between the different validator pools (aka. validators in the active set and\nthe ones chosen to para-validate)."]}),(0,o.jsx)(a.p,{children:"Also, let:"}),(0,o.jsxs)(a.ul,{children:["\n",(0,o.jsxs)(a.li,{children:[(0,o.jsx)(a.code,{children:"v"})," = the variance of staking rewards,"]}),"\n",(0,o.jsxs)(a.li,{children:[(0,o.jsx)(a.code,{children:"p"})," = number of para-validators,"]}),"\n",(0,o.jsxs)(a.li,{children:[(0,o.jsx)(a.code,{children:"w"})," = number validators in the active set,"]}),"\n",(0,o.jsxs)(a.li,{children:[(0,o.jsx)(a.code,{children:"e"})," = era,"]}),"\n"]}),(0,o.jsxs)(a.p,{children:["Then, ",(0,o.jsx)(a.code,{children:"v"})," \u2191 if ",(0,o.jsx)(a.code,{children:"w"})," \u2191, as this reduces ",(0,o.jsx)(a.code,{children:"p"})," : ",(0,o.jsx)(a.code,{children:"w"}),", with respect to ",(0,o.jsx)(a.code,{children:"e"}),"."]}),(0,o.jsxs)(a.p,{children:["Increased ",(0,o.jsx)(a.code,{children:"v"})," is expected, and initially keeping ",(0,o.jsx)(a.code,{children:"p"})," \u2193 using the same para-validator set for\nall parachains ensures\n",(0,o.jsx)(a.a,{href:"/docs/learn-parachains-protocol#availability-and-unavailability-phase",children:"availability"})," and\n",(0,o.jsx)(a.a,{href:"/docs/learn-polkadot-opengov",children:"voting"}),". In addition, despite ",(0,o.jsx)(a.code,{children:"v"})," \u2191 on an ",(0,o.jsx)(a.code,{children:"e"})," to ",(0,o.jsx)(a.code,{children:"e"}),"\nbasis, over time, the amount of rewards each validator receives will equal out based on the\ncontinuous selection of para-validators."]}),(0,o.jsx)(a.p,{children:"There are plans to scale the active para-validation set in the future"})]}),"\n",(0,o.jsx)(a.h2,{id:"payout-scheme",children:"Payout Scheme"}),"\n",(0,o.jsxs)(a.p,{children:["No matter how much total stake is behind a validator, all validators split the block authoring\npayout essentially equally. The payout of a specific validator, however, may differ based on\n",(0,o.jsx)(a.a,{href:"#era-points",children:"era points"}),", as described above. Although there is a probabilistic component to\nreceiving era points, and they may be impacted slightly depending on factors such as network\nconnectivity, well-behaving validators should generally average out to having similar era point\ntotals over a large number of eras."]}),"\n",(0,o.jsx)(a.p,{children:'Validators may also receive "tips" from senders as an incentive to include transactions in their\nproduced blocks. Validators will receive 100% of these tips directly.'}),"\n",(0,o.jsx)(a.p,{children:"Validators will receive staking rewards in the form of the native token of that chain (KSM for\nKusama and DOT for Polkadot)."}),"\n",(0,o.jsx)(a.p,{children:"For simplicity, the examples below will assume all validators have the same amount of era points,\nand received no tips."}),"\n",(0,o.jsx)(a.pre,{children:(0,o.jsx)(a.code,{children:"Validator Set Size (v): 4\nValidator 1 Stake (v1): 18 tokens\nValidator 2 Stake (v2): 9 tokens\nValidator 3 Stake (v3): 8 tokens\nValidator 4 Stake (v4): 7 tokens\nPayout (p): 8 DOT\n\nPayout for each validator (v1 - v4):\np / v = 8 / 4 = 2 tokens\n"})}),"\n",(0,o.jsxs)(a.p,{children:["Note that this is different than most other Proof-of-Stake systems such as Cosmos. As long as a\nvalidator is in the validator set, it will receive the same block reward as every other validator.\nValidator ",(0,o.jsx)(a.code,{children:"v1"}),", who had 18 tokens staked, received the same reward (2 tokens) in this era as ",(0,o.jsx)(a.code,{children:"v4"}),"\nwho had only 7 tokens staked."]}),"\n",(0,o.jsx)(a.h2,{id:"running-multiple-validators",children:"Running Multiple Validators"}),"\n",(0,o.jsx)(a.p,{children:"It is possible for a single entity to run multiple validators. Running multiple validators may\nprovide a better risk/reward ratio. Assuming you have enough DOT, or enough stake nominates your\nvalidator, to ensure that your validators remain in the validator set, running multiple validators\nwill result in a higher return than running a single validator."}),"\n",(0,o.jsx)(a.p,{children:"For the following example, assume you have 18 DOT to stake. For simplicity's sake, we will ignore\nnominators. Running a single validator, as in the example above, would net you 2 DOT in this era."}),"\n",(0,o.jsx)(a.p,{children:"Note that while DOT is used as an example, this same formula would apply to KSM when running a\nvalidator on Kusama."}),"\n",(0,o.jsx)(a.pre,{children:(0,o.jsx)(a.code,{children:"Validator Set Size (v): 4\nValidator 1 Stake (v1): 18 DOT <- Your validator\nValidator 2 Stake (v2): 9 DOT\nValidator 3 Stake (v3): 8 DOT\nValidator 4 Stake (v4): 7 DOT\nPayout (p): 8 DOT\n\nYour payout = (p / v) * 1 = (8 / 4) * 1 = 2\n"})}),"\n",(0,o.jsxs)(a.p,{children:["Running two validators, and splitting the stake equally, would result in the original validator ",(0,o.jsx)(a.code,{children:"v4"}),"\nto be kicked out of the validator set, as only the top ",(0,o.jsx)(a.code,{children:"v"})," validators (as measured by stake) are\nselected to be in the validator set. More important, it would also double the reward that you get\nfrom each era."]}),"\n",(0,o.jsx)(a.pre,{children:(0,o.jsx)(a.code,{children:"Validator Set Size (v): 4\nValidator 1 Stake (v1): 9 DOT <- Your first validator\nValidator 2 Stake (v2): 9 DOT <- Your second validator\nValidator 3 Stake (v3): 9 DOT\nValidator 4 Stake (v4): 8 DOT\nPayout (p): 8 DOT\n\nYour payout = (p / v) * 2 = (8 / 4) * 2 = 4\n"})}),"\n",(0,o.jsx)(a.p,{children:"With enough stake, you could run more than two validators. However, each validator must have enough\nstake behind it to be in the validator set."}),"\n",(0,o.jsx)(a.p,{children:"The incentives of the system favor equally-staked validators. This works out to be a dynamic, rather\nthan static, equilibrium. Potential validators will run different numbers of validators and apply\ndifferent amounts of stake to them as time goes on, and in response to the actions of other\nvalidators on the network."}),"\n",(0,o.jsx)(a.h2,{id:"nominators-and-validator-payments",children:"Nominators and Validator Payments"}),"\n",(0,o.jsxs)(a.p,{children:['A nominated stake allows you to "vote" for validators and share the rewards (but also\n',(0,o.jsx)(a.a,{href:"/docs/learn-offenses",children:"slashing"}),") without running a validator node yourself."]}),"\n",(0,o.jsxs)(a.p,{children:["Although staking rewards are based on the activities of the validator node during a specific era,\nthe validator never has access to or ownership of staking rewards. In fact, ",(0,o.jsx)(a.code,{children:"staking.payoutStakers"}),"\nor ",(0,o.jsx)(a.code,{children:"staking.payoutStakerByPage"}),' calls are necessary to payout staking rewards, can be called by\nanyone, and the staking rewards are "generated" because of it and automatically sent to nominators\n(i.e., rewards are produced or minted and sent to nominators, not sent from validators to\nnominators).']}),"\n",(0,o.jsx)(a.p,{children:"This includes the stake of the validator itself plus any stake bonded by nominators."}),"\n",(0,o.jsx)(a.admonition,{type:"info",children:(0,o.jsxs)(a.p,{children:["Validators set their preference as a percentage of the block reward, ",(0,o.jsx)(a.em,{children:"not"})," an absolute number of\nDOT. Polkadot's block reward is\n",(0,o.jsxs)(a.a,{href:"/docs/learn-inflation#ideal-staking-rate",children:["based on the ",(0,o.jsx)(a.em,{children:"total"})," amount at stake"]}),". The\ncommission is set as the amount taken by the validator; that is, 0% commission means that the\nvalidator does not receive any proportion of the rewards besides that owed to it from self-stake,\nand 100% commission means that the validator operator gets all rewards and gives none to its\nnominators."]})}),"\n",(0,o.jsx)(a.p,{children:"In the following examples, we can see the results of several different validator payment schemes and\nsplit between nominator and validator stake. We will assume a single nominator for each validator.\nHowever, there can be numerous nominators for each validator. Rewards are still distributed\nproportionally - for example, if the total rewards to be given to nominators is 2 DOT, and there are\nfour nominators with equal stake bonded, each will receive 0.5 DOT. Note also that a single\nnominator may stake different validators."}),"\n",(0,o.jsxs)(a.p,{children:["Each validator in the example has selected a different validator payment (that is, a percentage of\nthe reward set aside directly for the validator before sharing with all bonded stake). The\nvalidator's payment percentage (in DOT, although the same calculations work for KSM) is listed in\nbrackets (",(0,o.jsx)(a.code,{children:"[]"}),") next to each validator. Note that since the validator payment is public knowledge,\nhaving a low or non-existent validator payment may attract more stake from nominators, since they\nknow they will receive a larger reward."]}),"\n",(0,o.jsx)(a.pre,{children:(0,o.jsx)(a.code,{children:"Validator Set Size (v): 4\nValidator 1 Stake (v1) [20% commission]: 18 DOT (9 validator, 9 nominator)\nValidator 2 Stake (v2) [40% commission]: 9 DOT (3 validator, 6 nominator)\nValidator 3 Stake (v3) [10% commission]: 8 DOT (4 validator, 4 nominator)\nValidator 4 Stake (v4) [ 0% commission]: 6 DOT (1 validator, 5 nominator)\nPayout (p): 8 DOT\n\nPayout for each validator (v1 - v4):\np / v = 8 / 4 = 2 DOT\n\nv1:\n(0.2 * 2) = 0.4 DOT -> validator payment\n(2 - 0.4) = 1.6 -> shared between all stake\n(9 / 18) * 1.6 = 0.8 -> validator stake share\n(9 / 18) * 1.6 = 0.8 -> nominator stake share\nv1 validator total reward: 0.4 + 0.8 = 1.2 DOT\nv1 nominator reward: 0.8 DOT\n\nv2:\n(0.4 * 2) = 0.8 DOT -> validator payment\n(2 - 0.8) = 1.2 -> shared between all stake\n(3 / 9) * 1.2 = 0.4 -> validator stake share\n(6 / 9) * 1.2 = 0.8 -> nominator stake share\nv2 validator total reward: 0.8 + 0.4 = 1.2 DOT\nv2 nominator reward: 0.8 DOT\n\nv3:\n(0.1 * 2) = 0.2 DOT -> validator payment\n(2 - 0.2) = 1.8 -> shared between all stake\n(4 / 8) * 1.8 = 0.9 -> validator stake share\n(4 / 8) * 1.8 = 0.9 -> nominator stake share\nv3 validator total reward: 0.2 + 0.9 DOT = 1.1 DOT\nv3 nominator reward: 0.9 DOT\n\nv4:\n(0 * 2) = 0 DOT -> validator payment\n(2 - 0) = 2.0 -> shared between all stake\n(1 / 6) * 2 = 0.33 -> validator stake share\n(5 / 6) * 2 = 1.67 -> nominator stake share\nv4 validator total reward: 0 + 0.33 DOT = 0.33 DOT\nv4 nominator reward: 1.67 DOT\n"})})]})}function h(e={}){const{wrapper:a}={...(0,r.R)(),...e.components};return a?(0,o.jsx)(a,{...e,children:(0,o.jsx)(c,{...e})}):c(e)}},47379:(e,a,t)=>{"use strict";t.d(a,{A:()=>p});var n=t(90675),o=t(10467),r=t(96540),i=t(19588),s=t(2026),l=t(11135);function d(e,a,t){return c.apply(this,arguments)}function c(){return(c=(0,o.A)((0,n.A)().mark((function e(a,t,o){var r,l,d,c,h;return(0,n.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=void 0,l=void 0,e.t0=a,e.next="polkadot"===e.t0?5:"kusama"===e.t0?7:"statemine"===e.t0?9:"statemint"===e.t0?11:"polkadotpeople"===e.t0?13:"kusamapeople"===e.t0?15:17;break;case 5:return r="wss://rpc.polkadot.io",e.abrupt("break",18);case 7:return r="wss://kusama-rpc.polkadot.io/",e.abrupt("break",18);case 9:return r="wss://statemine-rpc.polkadot.io/",e.abrupt("break",18);case 11:return r="wss://statemint-rpc.polkadot.io/",e.abrupt("break",18);case 13:return r="wss://polkadot-people-rpc.polkadot.io/",e.abrupt("break",18);case 15:return r="wss://kusama-people-rpc.polkadot.io/",e.abrupt("break",18);case 17:console.log("Unknown socket url provided, no connection made.");case 18:if(void 0!==r){e.next=22;break}return e.abrupt("return");case 22:return d=new i.E(r),e.next=25,s.G.create({provider:d});case 25:c=e.sent,(h=t.split(".")).forEach((function(e){e in c&&(c=c[e])})),e.t1=h[0],e.next="consts"===e.t1?31:"query"===e.t1?33:38;break;case 31:return l=c.toString(),e.abrupt("break",39);case 33:return e.next=35,c();case 35:return l=(l=e.sent).toString(),e.abrupt("break",39);case 38:console.log("Unknown path prefix ("+h[0]+") in "+t);case 39:return e.abrupt("return",l);case 40:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function h(e,a,t,n){switch(a){case"humanReadable":(0,l.HumanReadable)(e,t,n);break;case"precise":(0,l.Precise)(e,t,n);break;case"blocksToDays":(0,l.BlocksToDays)(e,n);break;case"erasToDays":(0,l.ErasToDays)(e,n,t);break;case"percentage":(0,l.Percentage)(e,n);break;case"permillToPercent":(0,l.PermillToPercent)(e,n);break;case"arrayLength":(0,l.ArrayLength)(e,n);break;default:return void console.log("Ignoring unknown filter type")}}const p=function(e){var a=e.network,t=e.path,i=e.defaultValue,s=e.filter,l=void 0===s?void 0:s,c=(0,r.useState)(""),p=c[0],u=c[1];return a=a.toLowerCase(),(0,r.useEffect)((function(){void 0!==l?h(i.toString(),l,a,u):u(i.toString());var e=void 0;switch(a){case"polkadot":e="wss://rpc.polkadot.io";break;case"kusama":e="wss://kusama-rpc.polkadot.io/";break;case"statemine":e="wss://kusama-asset-hub-rpc.polkadot.io/";break;case"statemint":e="wss://polkadot-asset-hub-rpc.polkadot.io/";break;case"kusamapeople":e="wss://kusama-people-rpc.polkadot.io";break;case"polkadotpeople":e="wss://polkadot-people-rpc.polkadot.io";break;default:console.log("Unknown network provided, "+a)}if(void 0===e)console.log("Failed to connect to a valid websocket, applying default");else{var r=function(){var e=(0,o.A)((0,n.A)().mark((function e(){var o;return(0,n.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,d(a,t,u);case 2:if(void 0!==(o=e.sent)){e.next=7;break}return e.abrupt("return");case 7:void 0!==l?h(o,l,a,u):u(o);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();try{r()}catch(s){console.log(s)}}}),[]),p}},11135:e=>{var a="polkadot",t="kusama",n="statemine",o="statemint",r="polkadotpeople",i="kusamapeople",s={polkadot:{precision:1e10,symbol:"DOT"},kusama:{precision:1e12,symbol:"KSM"},statemint:{precision:1e10,symbol:"DOT"},statemine:{precision:1e12,symbol:"KSM"},polkadotpeople:{precision:1e10,symbol:"DOT"},kusamapeople:{precision:1e12,symbol:"KSM"}};e.exports={HumanReadable:function(e,l,d){var c=void 0;if(l===a||l===o)c=3;else if(l===t||l===n||l===r)c=6;else{if(l!=i)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");c=8}e=parseFloat(e),d((e=Number.isInteger(e/s[l].precision)?e/s[l].precision+" "+s[l].symbol:(e/s[l].precision).toFixed(c)+" "+s[l].symbol).toString())},Precise:function(e,a,t){t(e=(e=parseFloat(e))/s[a].precision+" "+s[a].symbol)},BlocksToDays:function(e,a){a((e=6*e/86400).toString())},ErasToDays:function(e,s,l){var d=void 0;if(l===a||l===o||l==r)d=1;else{if(l!==t&&l!==n&&l!=i)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");d=4}s((e/=d).toString())},Percentage:function(e,a){a((e/=1e7).toString())},PermillToPercent:function(e,a){a((e/=1e4).toString())},ArrayLength:function(e,a){a((e=e.split(",").length).toString())}}},47790:()=>{}}]); \ No newline at end of file diff --git a/assets/js/fea93377.b86bdea9.js b/assets/js/fea93377.b86bdea9.js deleted file mode 100644 index cd08bd0c217f..000000000000 --- a/assets/js/fea93377.b86bdea9.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk=self.webpackChunk||[]).push([[4898],{45800:(e,a,t)=>{"use strict";t.r(a),t.d(a,{assets:()=>l,contentTitle:()=>i,default:()=>h,frontMatter:()=>r,metadata:()=>s,toc:()=>d});var n=t(74848),o=t(28453);t(47379);const r={id:"maintain-guides-validator-payout",title:"Validator Payout Overview",sidebar_label:"Validator Payout Overview",description:"How validator payout works on the network and what you should expect.",keywords:["validator payout","payments","rewards","era points"],slug:"../maintain-guides-validator-payout"},i=void 0,s={id:"maintain/maintain-guides-validator-payout",title:"Validator Payout Overview",description:"How validator payout works on the network and what you should expect.",source:"@site/../docs/maintain/maintain-guides-validator-payout.md",sourceDirName:"maintain",slug:"/maintain-guides-validator-payout",permalink:"/docs/maintain-guides-validator-payout",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/maintain/maintain-guides-validator-payout.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1726730833e3,frontMatter:{id:"maintain-guides-validator-payout",title:"Validator Payout Overview",sidebar_label:"Validator Payout Overview",description:"How validator payout works on the network and what you should expect.",keywords:["validator payout","payments","rewards","era points"],slug:"../maintain-guides-validator-payout"},sidebar:"docs",previous:{title:"How to run a Validator on Polkadot",permalink:"/docs/maintain-guides-how-to-validate-polkadot"},next:{title:"Using systemd for a Validator Node",permalink:"/docs/maintain-guides-how-to-systemd"}},l={},d=[{value:"Era Points",id:"era-points",level:2},{value:"Payout Scheme",id:"payout-scheme",level:2},{value:"Running Multiple Validators",id:"running-multiple-validators",level:2},{value:"Nominators and Validator Payments",id:"nominators-and-validator-payments",level:2}];function c(e){const a={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",li:"li",p:"p",pre:"pre",ul:"ul",...(0,o.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(a.h2,{id:"era-points",children:"Era Points"}),"\n",(0,n.jsxs)(a.p,{children:["For every era (a period of time approximately 6 hours in length in Kusama, and 24 hours in\nPolkadot), validators are paid proportionally to the amount of ",(0,n.jsx)(a.em,{children:"era points"})," they have collected. Era\npoints are reward points earned for payable actions like:"]}),"\n",(0,n.jsxs)(a.ul,{children:["\n",(0,n.jsxs)(a.li,{children:["issuing validity statements for ",(0,n.jsx)(a.a,{href:"/docs/learn-parachains",children:"parachain"})," blocks."]}),"\n",(0,n.jsx)(a.li,{children:"producing a non-uncle block in the relay chain."}),"\n",(0,n.jsx)(a.li,{children:"producing a reference to a previously unreferenced uncle block."}),"\n",(0,n.jsx)(a.li,{children:"producing a referenced uncle block."}),"\n"]}),"\n",(0,n.jsx)(a.admonition,{type:"note",children:(0,n.jsx)(a.p,{children:"An uncle block is a relay chain block that is valid in every regard, but which failed to become\ncanonical. This can happen when two or more validators are block producers in a single slot, and the\nblock produced by one validator reaches the next block producer before the others. We call the\nlagging blocks uncle blocks."})}),"\n",(0,n.jsx)(a.p,{children:"Payments occur at the end of every era."}),"\n",(0,n.jsx)(a.p,{children:"Era points create a probabilistic component for staking rewards."}),"\n",(0,n.jsxs)(a.p,{children:["If the ",(0,n.jsx)(a.em,{children:"mean"})," of staking rewards is the average rewards per era, then the ",(0,n.jsx)(a.em,{children:"variance"})," is the\nvariability from the average staking rewards. The exact DOT value of each era point is not known in\nadvance since it depends on the total number of points earned by all validators in a given era. This\nis designed this way so that the total payout per era depends on Polkadot's\n",(0,n.jsx)(a.a,{href:"/docs/learn-staking-advanced#inflation",children:"inflation model"}),", and not on the number of payable\nactions (f.e., authoring a new block) executed. For more information, check\n",(0,n.jsx)(a.a,{href:"https://substrate.stackexchange.com/questions/5353/how-are-rewards-in-dot-calculated-from-the-era-points-earned-by-validators-in-po",children:"this stackexchange post"}),"."]}),"\n",(0,n.jsx)(a.p,{children:"With parachains now on Polkadot, a large percentage of era points will come from parachain\nvalidation, as a subset of validators are selected to para-validate for all parachains each epoch,\nand those para-validators can generate more era points as a result. Para-validators are rewarded 20\nera points each for each parachain block that they validate."}),"\n",(0,n.jsxs)(a.p,{children:["In this case, analyzing the ",(0,n.jsx)(a.em,{children:"expected value"})," of staking rewards will paint a better picture as the\nweight of era points of validators and para-validators in the reward average are taken into\nconsideration."]}),"\n",(0,n.jsxs)(a.admonition,{title:"High-level breakdown of reward variance",type:"note",children:[(0,n.jsx)(a.p,{children:"This should only serve as a high-level overview of the probabilistic nature for staking rewards."}),(0,n.jsx)(a.p,{children:"Let:"}),(0,n.jsxs)(a.ul,{children:["\n",(0,n.jsxs)(a.li,{children:[(0,n.jsx)(a.code,{children:"pe"})," = para-validator era points,"]}),"\n",(0,n.jsxs)(a.li,{children:[(0,n.jsx)(a.code,{children:"ne"})," = non-para-validator era points,"]}),"\n",(0,n.jsxs)(a.li,{children:[(0,n.jsx)(a.code,{children:"EV"})," = expected value of staking rewards,"]}),"\n"]}),(0,n.jsxs)(a.p,{children:["Then, ",(0,n.jsx)(a.code,{children:"EV(pe)"})," has more influence on the ",(0,n.jsx)(a.code,{children:"EV"})," than ",(0,n.jsx)(a.code,{children:"EV(ne)"}),"."]}),(0,n.jsxs)(a.p,{children:["Since ",(0,n.jsx)(a.code,{children:"EV(pe)"})," has a more weighted probability on the ",(0,n.jsx)(a.code,{children:"EV"}),", the increase in variance against the\n",(0,n.jsx)(a.code,{children:"EV"})," becomes apparent between the different validator pools (aka. validators in the active set and\nthe ones chosen to para-validate)."]}),(0,n.jsx)(a.p,{children:"Also, let:"}),(0,n.jsxs)(a.ul,{children:["\n",(0,n.jsxs)(a.li,{children:[(0,n.jsx)(a.code,{children:"v"})," = the variance of staking rewards,"]}),"\n",(0,n.jsxs)(a.li,{children:[(0,n.jsx)(a.code,{children:"p"})," = number of para-validators,"]}),"\n",(0,n.jsxs)(a.li,{children:[(0,n.jsx)(a.code,{children:"w"})," = number validators in the active set,"]}),"\n",(0,n.jsxs)(a.li,{children:[(0,n.jsx)(a.code,{children:"e"})," = era,"]}),"\n"]}),(0,n.jsxs)(a.p,{children:["Then, ",(0,n.jsx)(a.code,{children:"v"})," \u2191 if ",(0,n.jsx)(a.code,{children:"w"})," \u2191, as this reduces ",(0,n.jsx)(a.code,{children:"p"})," : ",(0,n.jsx)(a.code,{children:"w"}),", with respect to ",(0,n.jsx)(a.code,{children:"e"}),"."]}),(0,n.jsxs)(a.p,{children:["Increased ",(0,n.jsx)(a.code,{children:"v"})," is expected, and initially keeping ",(0,n.jsx)(a.code,{children:"p"})," \u2193 using the same para-validator set for\nall parachains ensures\n",(0,n.jsx)(a.a,{href:"/docs/learn-parachains-protocol#availability-and-unavailability-phase",children:"availability"})," and\n",(0,n.jsx)(a.a,{href:"/docs/learn-polkadot-opengov",children:"voting"}),". In addition, despite ",(0,n.jsx)(a.code,{children:"v"})," \u2191 on an ",(0,n.jsx)(a.code,{children:"e"})," to ",(0,n.jsx)(a.code,{children:"e"}),"\nbasis, over time, the amount of rewards each validator receives will equal out based on the\ncontinuous selection of para-validators."]}),(0,n.jsx)(a.p,{children:"There are plans to scale the active para-validation set in the future"})]}),"\n",(0,n.jsx)(a.h2,{id:"payout-scheme",children:"Payout Scheme"}),"\n",(0,n.jsxs)(a.p,{children:["No matter how much total stake is behind a validator, all validators split the block authoring\npayout essentially equally. The payout of a specific validator, however, may differ based on\n",(0,n.jsx)(a.a,{href:"#era-points",children:"era points"}),", as described above. Although there is a probabilistic component to\nreceiving era points, and they may be impacted slightly depending on factors such as network\nconnectivity, well-behaving validators should generally average out to having similar era point\ntotals over a large number of eras."]}),"\n",(0,n.jsx)(a.p,{children:'Validators may also receive "tips" from senders as an incentive to include transactions in their\nproduced blocks. Validators will receive 100% of these tips directly.'}),"\n",(0,n.jsx)(a.p,{children:"Validators will receive staking rewards in the form of the native token of that chain (KSM for\nKusama and DOT for Polkadot)."}),"\n",(0,n.jsx)(a.p,{children:"For simplicity, the examples below will assume all validators have the same amount of era points,\nand received no tips."}),"\n",(0,n.jsx)(a.pre,{children:(0,n.jsx)(a.code,{children:"Validator Set Size (v): 4\nValidator 1 Stake (v1): 18 tokens\nValidator 2 Stake (v2): 9 tokens\nValidator 3 Stake (v3): 8 tokens\nValidator 4 Stake (v4): 7 tokens\nPayout (p): 8 DOT\n\nPayout for each validator (v1 - v4):\np / v = 8 / 4 = 2 tokens\n"})}),"\n",(0,n.jsxs)(a.p,{children:["Note that this is different than most other Proof-of-Stake systems such as Cosmos. As long as a\nvalidator is in the validator set, it will receive the same block reward as every other validator.\nValidator ",(0,n.jsx)(a.code,{children:"v1"}),", who had 18 tokens staked, received the same reward (2 tokens) in this era as ",(0,n.jsx)(a.code,{children:"v4"}),"\nwho had only 7 tokens staked."]}),"\n",(0,n.jsx)(a.h2,{id:"running-multiple-validators",children:"Running Multiple Validators"}),"\n",(0,n.jsx)(a.p,{children:"It is possible for a single entity to run multiple validators. Running multiple validators may\nprovide a better risk/reward ratio. Assuming you have enough DOT, or enough stake nominates your\nvalidator, to ensure that your validators remain in the validator set, running multiple validators\nwill result in a higher return than running a single validator."}),"\n",(0,n.jsx)(a.p,{children:"For the following example, assume you have 18 DOT to stake. For simplicity's sake, we will ignore\nnominators. Running a single validator, as in the example above, would net you 2 DOT in this era."}),"\n",(0,n.jsx)(a.p,{children:"Note that while DOT is used as an example, this same formula would apply to KSM when running a\nvalidator on Kusama."}),"\n",(0,n.jsx)(a.pre,{children:(0,n.jsx)(a.code,{children:"Validator Set Size (v): 4\nValidator 1 Stake (v1): 18 DOT <- Your validator\nValidator 2 Stake (v2): 9 DOT\nValidator 3 Stake (v3): 8 DOT\nValidator 4 Stake (v4): 7 DOT\nPayout (p): 8 DOT\n\nYour payout = (p / v) * 1 = (8 / 4) * 1 = 2\n"})}),"\n",(0,n.jsxs)(a.p,{children:["Running two validators, and splitting the stake equally, would result in the original validator ",(0,n.jsx)(a.code,{children:"v4"}),"\nto be kicked out of the validator set, as only the top ",(0,n.jsx)(a.code,{children:"v"})," validators (as measured by stake) are\nselected to be in the validator set. More important, it would also double the reward that you get\nfrom each era."]}),"\n",(0,n.jsx)(a.pre,{children:(0,n.jsx)(a.code,{children:"Validator Set Size (v): 4\nValidator 1 Stake (v1): 9 DOT <- Your first validator\nValidator 2 Stake (v2): 9 DOT <- Your second validator\nValidator 3 Stake (v3): 9 DOT\nValidator 4 Stake (v4): 8 DOT\nPayout (p): 8 DOT\n\nYour payout = (p / v) * 2 = (8 / 4) * 2 = 4\n"})}),"\n",(0,n.jsx)(a.p,{children:"With enough stake, you could run more than two validators. However, each validator must have enough\nstake behind it to be in the validator set."}),"\n",(0,n.jsx)(a.p,{children:"The incentives of the system favor equally-staked validators. This works out to be a dynamic, rather\nthan static, equilibrium. Potential validators will run different numbers of validators and apply\ndifferent amounts of stake to them as time goes on, and in response to the actions of other\nvalidators on the network."}),"\n",(0,n.jsx)(a.h2,{id:"nominators-and-validator-payments",children:"Nominators and Validator Payments"}),"\n",(0,n.jsxs)(a.p,{children:['A nominated stake allows you to "vote" for validators and share the rewards (but also\n',(0,n.jsx)(a.a,{href:"/docs/learn-offenses",children:"slashing"}),") without running a validator node yourself."]}),"\n",(0,n.jsxs)(a.p,{children:["Although staking rewards are based on the activities of the validator node during a specific era,\nthe validator never has access to or ownership of staking rewards. In fact, ",(0,n.jsx)(a.code,{children:"staking.payoutStakers"}),"\nor ",(0,n.jsx)(a.code,{children:"staking.payoutStakerByPage"}),' calls are necessary to payout staking rewards, can be called by\nanyone, and the staking rewards are "generated" because of it and automatically sent to nominators\n(i.e., rewards are produced or minted and sent to nominators, not sent from validators to\nnominators).']}),"\n",(0,n.jsx)(a.p,{children:"This includes the stake of the validator itself plus any stake bonded by nominators."}),"\n",(0,n.jsx)(a.admonition,{type:"info",children:(0,n.jsxs)(a.p,{children:["Validators set their preference as a percentage of the block reward, ",(0,n.jsx)(a.em,{children:"not"})," an absolute number of\nDOT. Polkadot's block reward is\n",(0,n.jsxs)(a.a,{href:"/docs/learn-inflation#ideal-staking-rate",children:["based on the ",(0,n.jsx)(a.em,{children:"total"})," amount at stake"]}),". The\ncommission is set as the amount taken by the validator; that is, 0% commission means that the\nvalidator does not receive any proportion of the rewards besides that owed to it from self-stake,\nand 100% commission means that the validator operator gets all rewards and gives none to its\nnominators."]})}),"\n",(0,n.jsx)(a.p,{children:"In the following examples, we can see the results of several different validator payment schemes and\nsplit between nominator and validator stake. We will assume a single nominator for each validator.\nHowever, there can be numerous nominators for each validator. Rewards are still distributed\nproportionally - for example, if the total rewards to be given to nominators is 2 DOT, and there are\nfour nominators with equal stake bonded, each will receive 0.5 DOT. Note also that a single\nnominator may stake different validators."}),"\n",(0,n.jsxs)(a.p,{children:["Each validator in the example has selected a different validator payment (that is, a percentage of\nthe reward set aside directly for the validator before sharing with all bonded stake). The\nvalidator's payment percentage (in DOT, although the same calculations work for KSM) is listed in\nbrackets (",(0,n.jsx)(a.code,{children:"[]"}),") next to each validator. Note that since the validator payment is public knowledge,\nhaving a low or non-existent validator payment may attract more stake from nominators, since they\nknow they will receive a larger reward."]}),"\n",(0,n.jsx)(a.pre,{children:(0,n.jsx)(a.code,{children:"Validator Set Size (v): 4\nValidator 1 Stake (v1) [20% commission]: 18 DOT (9 validator, 9 nominator)\nValidator 2 Stake (v2) [40% commission]: 9 DOT (3 validator, 6 nominator)\nValidator 3 Stake (v3) [10% commission]: 8 DOT (4 validator, 4 nominator)\nValidator 4 Stake (v4) [ 0% commission]: 6 DOT (1 validator, 5 nominator)\nPayout (p): 8 DOT\n\nPayout for each validator (v1 - v4):\np / v = 8 / 4 = 2 DOT\n\nv1:\n(0.2 * 2) = 0.4 DOT -> validator payment\n(2 - 0.4) = 1.6 -> shared between all stake\n(9 / 18) * 1.6 = 0.8 -> validator stake share\n(9 / 18) * 1.6 = 0.8 -> nominator stake share\nv1 validator total reward: 0.4 + 0.8 = 1.2 DOT\nv1 nominator reward: 0.8 DOT\n\nv2:\n(0.4 * 2) = 0.8 DOT -> validator payment\n(2 - 0.8) = 1.2 -> shared between all stake\n(3 / 9) * 1.2 = 0.4 -> validator stake share\n(6 / 9) * 1.2 = 0.8 -> nominator stake share\nv2 validator total reward: 0.8 + 0.4 = 1.2 DOT\nv2 nominator reward: 0.8 DOT\n\nv3:\n(0.1 * 2) = 0.2 DOT -> validator payment\n(2 - 0.2) = 1.8 -> shared between all stake\n(4 / 8) * 1.8 = 0.9 -> validator stake share\n(4 / 8) * 1.8 = 0.9 -> nominator stake share\nv3 validator total reward: 0.2 + 0.9 DOT = 1.1 DOT\nv3 nominator reward: 0.9 DOT\n\nv4:\n(0 * 2) = 0 DOT -> validator payment\n(2 - 0) = 2.0 -> shared between all stake\n(1 / 6) * 2 = 0.33 -> validator stake share\n(5 / 6) * 2 = 1.67 -> nominator stake share\nv4 validator total reward: 0 + 0.33 DOT = 0.33 DOT\nv4 nominator reward: 1.67 DOT\n"})})]})}function h(e={}){const{wrapper:a}={...(0,o.R)(),...e.components};return a?(0,n.jsx)(a,{...e,children:(0,n.jsx)(c,{...e})}):c(e)}},47379:(e,a,t)=>{"use strict";t.d(a,{A:()=>p});var n=t(90675),o=t(10467),r=t(96540),i=t(19588),s=t(2026),l=t(11135);function d(e,a,t){return c.apply(this,arguments)}function c(){return(c=(0,o.A)((0,n.A)().mark((function e(a,t,o){var r,l,d,c,h;return(0,n.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=void 0,l=void 0,e.t0=a,e.next="polkadot"===e.t0?5:"kusama"===e.t0?7:"statemine"===e.t0?9:"statemint"===e.t0?11:"polkadotpeople"===e.t0?13:"kusamapeople"===e.t0?15:17;break;case 5:return r="wss://rpc.polkadot.io",e.abrupt("break",18);case 7:return r="wss://kusama-rpc.polkadot.io/",e.abrupt("break",18);case 9:return r="wss://statemine-rpc.polkadot.io/",e.abrupt("break",18);case 11:return r="wss://statemint-rpc.polkadot.io/",e.abrupt("break",18);case 13:return r="wss://polkadot-people-rpc.polkadot.io/",e.abrupt("break",18);case 15:return r="wss://kusama-people-rpc.polkadot.io/",e.abrupt("break",18);case 17:console.log("Unknown socket url provided, no connection made.");case 18:if(void 0!==r){e.next=22;break}return e.abrupt("return");case 22:return d=new i.E(r),e.next=25,s.G.create({provider:d});case 25:c=e.sent,(h=t.split(".")).forEach((function(e){e in c&&(c=c[e])})),e.t1=h[0],e.next="consts"===e.t1?31:"query"===e.t1?33:38;break;case 31:return l=c.toString(),e.abrupt("break",39);case 33:return e.next=35,c();case 35:return l=(l=e.sent).toString(),e.abrupt("break",39);case 38:console.log("Unknown path prefix ("+h[0]+") in "+t);case 39:return e.abrupt("return",l);case 40:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function h(e,a,t,n){switch(a){case"humanReadable":(0,l.HumanReadable)(e,t,n);break;case"precise":(0,l.Precise)(e,t,n);break;case"blocksToDays":(0,l.BlocksToDays)(e,n);break;case"erasToDays":(0,l.ErasToDays)(e,n,t);break;case"percentage":(0,l.Percentage)(e,n);break;case"permillToPercent":(0,l.PermillToPercent)(e,n);break;case"arrayLength":(0,l.ArrayLength)(e,n);break;default:return void console.log("Ignoring unknown filter type")}}const p=function(e){var a=e.network,t=e.path,i=e.defaultValue,s=e.filter,l=void 0===s?void 0:s,c=(0,r.useState)(""),p=c[0],u=c[1];return a=a.toLowerCase(),(0,r.useEffect)((function(){void 0!==l?h(i.toString(),l,a,u):u(i.toString());var e=void 0;switch(a){case"polkadot":e="wss://rpc.polkadot.io";break;case"kusama":e="wss://kusama-rpc.polkadot.io/";break;case"statemine":e="wss://kusama-asset-hub-rpc.polkadot.io/";break;case"statemint":e="wss://polkadot-asset-hub-rpc.polkadot.io/";break;case"kusamapeople":e="wss://kusama-people-rpc.polkadot.io";break;case"polkadotpeople":e="wss://polkadot-people-rpc.polkadot.io";break;default:console.log("Unknown network provided, "+a)}if(void 0===e)console.log("Failed to connect to a valid websocket, applying default");else{var r=function(){var e=(0,o.A)((0,n.A)().mark((function e(){var o;return(0,n.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,d(a,t,u);case 2:if(void 0!==(o=e.sent)){e.next=7;break}return e.abrupt("return");case 7:void 0!==l?h(o,l,a,u):u(o);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();try{r()}catch(s){console.log(s)}}}),[]),p}},11135:e=>{var a="polkadot",t="kusama",n="statemine",o="statemint",r="polkadotpeople",i="kusamapeople",s={polkadot:{precision:1e10,symbol:"DOT"},kusama:{precision:1e12,symbol:"KSM"},statemint:{precision:1e10,symbol:"DOT"},statemine:{precision:1e12,symbol:"KSM"},polkadotpeople:{precision:1e10,symbol:"DOT"},kusamapeople:{precision:1e12,symbol:"KSM"}};e.exports={HumanReadable:function(e,l,d){var c=void 0;if(l===a||l===o)c=3;else if(l===t||l===n||l===r)c=6;else{if(l!=i)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");c=8}e=parseFloat(e),d((e=Number.isInteger(e/s[l].precision)?e/s[l].precision+" "+s[l].symbol:(e/s[l].precision).toFixed(c)+" "+s[l].symbol).toString())},Precise:function(e,a,t){t(e=(e=parseFloat(e))/s[a].precision+" "+s[a].symbol)},BlocksToDays:function(e,a){a((e=6*e/86400).toString())},ErasToDays:function(e,s,l){var d=void 0;if(l===a||l===o||l==r)d=1;else{if(l!==t&&l!==n&&l!=i)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");d=4}s((e/=d).toString())},Percentage:function(e,a){a((e/=1e7).toString())},PermillToPercent:function(e,a){a((e/=1e4).toString())},ArrayLength:function(e,a){a((e=e.split(",").length).toString())}}},47790:()=>{}}]); \ No newline at end of file diff --git a/assets/js/feadf832.1c48cbb7.js b/assets/js/feadf832.1c48cbb7.js deleted file mode 100644 index a41b459fefdb..000000000000 --- a/assets/js/feadf832.1c48cbb7.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1710],{84680:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>l,default:()=>h,frontMatter:()=>o,metadata:()=>s,toc:()=>d});var r=n(74848),a=n(28453),i=(n(11470),n(3514));const o={id:"build-guides-coretime-start",title:"Getting Started - Intro to the Polkadot SDK",sidebar_label:"Intro to the Polkadot SDK",description:"Introduction to the Polkadot SDK",keywords:["coretime","blockspace","parathread","parachain","cores"],slug:"../build-guides-coretime-start"},l=void 0,s={id:"build/build-guides-coretime-start",title:"Getting Started - Intro to the Polkadot SDK",description:"Introduction to the Polkadot SDK",source:"@site/../docs/build/build-guides-coretime-start.md",sourceDirName:"build",slug:"/build-guides-coretime-start",permalink:"/docs/build-guides-coretime-start",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/build/build-guides-coretime-start.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1728370989e3,frontMatter:{id:"build-guides-coretime-start",title:"Getting Started - Intro to the Polkadot SDK",sidebar_label:"Intro to the Polkadot SDK",description:"Introduction to the Polkadot SDK",keywords:["coretime","blockspace","parathread","parachain","cores"],slug:"../build-guides-coretime-start"},sidebar:"docs",previous:{title:"Protocol Development Resources",permalink:"/docs/build-protocol-index"},next:{title:"Install Dependencies",permalink:"/docs/build-guides-install-deps"}},c={},d=[{value:"Using the Polkadot SDK",id:"using-the-polkadot-sdk",level:2},{value:"Deploying on a Core",id:"deploying-on-a-core",level:2},{value:"Install dependencies",id:"install-dependencies",level:3},{value:"Deployment Example - Adder Collator",id:"deployment-example---adder-collator",level:3},{value:"OpenZeppelin Templates & Guides",id:"openzeppelin-templates--guides",level:2},{value:"Polkadot SDK Parachain Template",id:"polkadot-sdk-parachain-template",level:2}];function u(e){const t={a:"a",admonition:"admonition",blockquote:"blockquote",code:"code",h2:"h2",h3:"h3",li:"li",mermaid:"mermaid",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,a.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.admonition,{title:"This section is under construction.",type:"warning"}),"\n",(0,r.jsx)(i.A,{}),"\n",(0,r.jsx)(t.h2,{id:"using-the-polkadot-sdk",children:"Using the Polkadot SDK"}),"\n",(0,r.jsxs)(t.p,{children:["The Polkadot SDK is comprised of ",(0,r.jsx)(t.strong,{children:"three"})," important repositories:"]}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.a,{href:"https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/polkadot_sdk/index.html#polkadot",children:(0,r.jsx)(t.strong,{children:"Polkadot"})})," -\nThis included both client implementation and runtime until the runtime was moved to the Polkadot\nFellows organization."]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.a,{href:"https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/polkadot_sdk/index.html#substrate",children:(0,r.jsx)(t.strong,{children:"Substrate"})})," -\nThe underlying core primitives and libraries for building blockchains (any blockchain, not just\none for Polkadot). Much of Polkadot is built with Substrate."]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.a,{href:"https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/polkadot_sdk/index.html#cumulus",children:(0,r.jsx)(t.strong,{children:"Cumulus"})})," -\nA set of libraries and tools pertaining specifically to connecting blockchains to Polkadot, known\nas parachains."]}),"\n"]}),"\n",(0,r.jsxs)(t.blockquote,{children:["\n",(0,r.jsxs)(t.p,{children:["For an in-depth dive into the monorepo, it is highly recommended that you look into the\n",(0,r.jsx)(t.a,{href:"https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/polkadot_sdk/index.html",children:"Polkadot SDK Docs, which explains everything."})]}),"\n"]}),"\n",(0,r.jsxs)(t.admonition,{title:"What is a task?",type:"info",children:[(0,r.jsx)(t.p,{children:'You might see the term "task" referenced often in place of "parachain". In most cases, it refers to\na process utilizing the relay chain\'s compute. This could be a parachain or any other computational\nprocess, provided that it adheres to the Polkadot protocol interface.'}),(0,r.jsxs)(t.p,{children:["The full definition can be found ",(0,r.jsx)(t.a,{href:"/docs/learn-agile-coretime#task",children:"here"}),"."]})]}),"\n",(0,r.jsxs)(t.ol,{children:["\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"Reserving"})," a ",(0,r.jsx)(t.a,{href:"/docs/glossary#paraid",children:(0,r.jsx)(t.code,{children:"ParaId"})}),", where you will upload your runtime and\ngenesis state."]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"Compiling"})," the runtime (written in Rust) to a ",(0,r.jsx)(t.a,{href:"/docs/learn-wasm",children:"WebAssembly"})," blob,\nthereby defining how your state transitions from one state to the next. This runtime is created\nusing the Polkadot SDK."]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"Ensure"})," your chain spec is viable and ready to be deployed as a live, working parachain."]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"Generating"})," your genesis state and wasm."]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"Obtaining"})," a core, most likely through a\n",(0,r.jsx)(t.a,{href:"/docs/learn-guides-coretime-marketplaces",children:"Coretime marketplace"}),"."]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"Assigning"})," that core to your",(0,r.jsxs)(t.a,{href:"/docs/glossary#paraid",children:[" ",(0,r.jsx)(t.code,{children:"ParaId"})]}),"."]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"Ensuring"})," you have at least one honest, synced collator for your task"]}),"\n"]}),"\n",(0,r.jsx)(t.h2,{id:"deploying-on-a-core",children:"Deploying on a Core"}),"\n",(0,r.jsxs)(t.p,{children:["Once you have your runtime and pallets developed, you will be able to deploy it on a\n",(0,r.jsx)(t.a,{href:"/docs/learn-agile-coretime#core",children:"core"}),", which is how one utilizes the shared security of the\nPolkadot network. One does so by:"]}),"\n",(0,r.jsx)(t.mermaid,{value:"%%{\n init: {\n 'theme': 'base',\n 'themeVariables': {\n 'fontFamily': 'Unbounded',\n 'primaryColor': '#E6007A',\n 'fontSize': '16px',\n 'primaryTextColor': '#fff',\n 'primaryBorderColor': '#7C0000',\n 'lineColor': '#140523',\n 'secondaryColor': '#552BBF',\n 'tertiaryColor': '#fff'\n }\n }\n}%%\nflowchart TD\n subgraph GA[\"Generate Artifacts\"]\n direction LR\n A[\"Creating a runtime\"]--\x3eB[\"Compiling to Wasm\"]--\x3eC[\"Generate Genesis State\"]\n end\n\n subgraph PC[\"Procure ParaId & Core\"]\n direction LR\n PARAID[\"Reserve ParaId\"]\n PARAID--\x3eD[\"Buy Bulk Coretime\"]\n PARAID--\x3eE[\"Issue On-Demand Coretime Extrinsic\"]\n end\n\n\n subgraph DEP[\"Deploying\"]\n direction LR\n F[\"Register artifacts to ParaId\"]--\x3eassign[\"Assign Core\"]--\x3eG[\"Sync collator\"]--\x3eH[\"Begin generating blocks!\"]\n end\n\nGA--\x3ePC\nPC--\x3eDEP"}),"\n",(0,r.jsx)(t.h3,{id:"install-dependencies",children:"Install dependencies"}),"\n",(0,r.jsxs)(t.p,{children:["Make sure you have everything you need for your target system\n",(0,r.jsx)(t.a,{href:"/docs/build-guides-install-deps",children:"here"}),"."]}),"\n",(0,r.jsxs)(t.p,{children:["Be sure you also install the ",(0,r.jsx)(t.code,{children:"polkadot-parachain"})," and ",(0,r.jsx)(t.code,{children:"chain-spec-builder"})," binaries, as they needed\nto start and run your chain!"]}),"\n",(0,r.jsx)(t.h3,{id:"deployment-example---adder-collator",children:"Deployment Example - Adder Collator"}),"\n",(0,r.jsxs)(t.p,{children:["Try out the above by deploying the\n",(0,r.jsx)(t.a,{href:"/docs/learn-guides-coretime-parachains",children:'adder collator, a straightforward "counter" parachain implementation'}),"."]}),"\n",(0,r.jsx)(t.h2,{id:"openzeppelin-templates--guides",children:"OpenZeppelin Templates & Guides"}),"\n",(0,r.jsxs)(t.p,{children:["OpenZeppelin offers a\n",(0,r.jsx)(t.a,{href:"https://github.com/OpenZeppelin/polkadot-generic-runtime-template",children:"generic parachain template"}),",\nwhich has support for:"]}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsx)(t.li,{children:"Proxy Pallet"}),"\n",(0,r.jsx)(t.li,{children:"Multisig Pallet"}),"\n",(0,r.jsx)(t.li,{children:"Governance support - a treasury, referenda (OpenGov!), and assets configuration"}),"\n",(0,r.jsx)(t.li,{children:"Collation/Parachain Support"}),"\n",(0,r.jsx)(t.li,{children:"XCM (Cross Consensus Messaging) Configuration and Support"}),"\n"]}),"\n",(0,r.jsxs)(t.p,{children:["For more information, check their\n",(0,r.jsx)(t.a,{href:"https://docs.openzeppelin.com/substrate-runtimes/1.0.0/",children:"Substrate parachain runtime guide."})]}),"\n",(0,r.jsx)(t.h2,{id:"polkadot-sdk-parachain-template",children:"Polkadot SDK Parachain Template"}),"\n",(0,r.jsxs)(t.p,{children:["If you wish to the\n",(0,r.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/templates/parachain",children:"Polkadot SDK's Parachain template"}),",\nplease follow the ",(0,r.jsx)(t.a,{href:"/docs/build-guides-template-basic",children:"Template to Core guide."})]})]})}function h(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(u,{...e})}):u(e)}},3514:(e,t,n)=>{n.d(t,{A:()=>x});n(96540);var r=n(34164),a=n(26972),i=n(28774),o=n(53465),l=n(16654),s=n(21312),c=n(51107);const d={cardContainer:"cardContainer_fWXF",cardTitle:"cardTitle_rnsV",cardDescription:"cardDescription_PWke"};var u=n(74848);function h(e){var t=e.href,n=e.children;return(0,u.jsx)(i.A,{href:t,className:(0,r.A)("card padding--lg",d.cardContainer),children:n})}function p(e){var t=e.href,n=e.icon,a=e.title,i=e.description;return(0,u.jsxs)(h,{href:t,children:[(0,u.jsxs)(c.A,{as:"h2",className:(0,r.A)("text--truncate",d.cardTitle),title:a,children:[n," ",a]}),i&&(0,u.jsx)("p",{className:(0,r.A)("text--truncate",d.cardDescription),title:i,children:i})]})}function m(e){var t,n,r=e.item,i=(0,a.Nr)(r),l=(n=(0,o.W)().selectMessage,function(e){return n(e,(0,s.T)({message:"1 item|{count} items",id:"theme.docs.DocCard.categoryDescription.plurals",description:"The default description for a category card in the generated index about how many items this category includes"},{count:e}))});return i?(0,u.jsx)(p,{href:i,icon:"\ud83d\uddc3\ufe0f",title:r.label,description:null!=(t=r.description)?t:l(r.items.length)}):null}function f(e){var t,n,r=e.item,i=(0,l.A)(r.href)?"\ud83d\udcc4\ufe0f":"\ud83d\udd17",o=(0,a.cC)(null!=(t=r.docId)?t:void 0);return(0,u.jsx)(p,{href:r.href,icon:i,title:r.label,description:null!=(n=r.description)?n:null==o?void 0:o.description})}function g(e){var t=e.item;switch(t.type){case"link":return(0,u.jsx)(f,{item:t});case"category":return(0,u.jsx)(m,{item:t});default:throw new Error("unknown item type "+JSON.stringify(t))}}function b(e){var t=e.className,n=(0,a.$S)();return(0,u.jsx)(x,{items:n.items,className:t})}function x(e){var t=e.items,n=e.className;if(!t)return(0,u.jsx)(b,Object.assign({},e));var i=(0,a.d1)(t);return(0,u.jsx)("section",{className:(0,r.A)("row",n),children:i.map((function(e,t){return(0,u.jsx)("article",{className:"col col--6 margin-bottom--lg",children:(0,u.jsx)(g,{item:e})},t)}))})}},11470:(e,t,n)=>{n.d(t,{A:()=>j});var r=n(96540),a=n(34164),i=n(23104),o=n(56347),l=n(205),s=n(57485),c=n(31682),d=n(75376);function u(e){var t,n;return null!=(t=null==(n=r.Children.toArray(e).filter((function(e){return"\n"!==e})).map((function(e){if(!e||(0,r.isValidElement)(e)&&((t=e.props)&&"object"==typeof t&&"value"in t))return e;var t;throw new Error("Docusaurus error: Bad child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:n.filter(Boolean))?t:[]}function h(e){var t=e.values,n=e.children;return(0,r.useMemo)((function(){var e=null!=t?t:function(e){return u(e).map((function(e){var t=e.props;return{value:t.value,label:t.label,attributes:t.attributes,default:t.default}}))}(n);return function(e){var t=(0,c.XI)(e,(function(e,t){return e.value===t.value}));if(t.length>0)throw new Error('Docusaurus error: Duplicate values "'+t.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[t,n])}function p(e){var t=e.value;return e.tabValues.some((function(e){return e.value===t}))}function m(e){var t=e.queryString,n=void 0!==t&&t,a=e.groupId,i=(0,o.W6)(),l=function(e){var t=e.queryString,n=void 0!==t&&t,r=e.groupId;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!r)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=r?r:null}({queryString:n,groupId:a});return[(0,s.aZ)(l),(0,r.useCallback)((function(e){if(l){var t=new URLSearchParams(i.location.search);t.set(l,e),i.replace(Object.assign({},i.location,{search:t.toString()}))}}),[l,i])]}function f(e){var t,n,a,i,o=e.defaultValue,s=e.queryString,c=void 0!==s&&s,u=e.groupId,f=h(e),g=(0,r.useState)((function(){return function(e){var t,n=e.defaultValue,r=e.tabValues;if(0===r.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!p({value:n,tabValues:r}))throw new Error('Docusaurus error: The has a defaultValue "'+n+'" but none of its children has the corresponding value. Available values are: '+r.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return n}var a=null!=(t=r.find((function(e){return e.default})))?t:r[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:o,tabValues:f})})),b=g[0],x=g[1],v=m({queryString:c,groupId:u}),k=v[0],y=v[1],j=(t=function(e){return e?"docusaurus.tab."+e:null}({groupId:u}.groupId),n=(0,d.Dv)(t),a=n[0],i=n[1],[a,(0,r.useCallback)((function(e){t&&i.set(e)}),[t,i])]),w=j[0],P=j[1],C=function(){var e=null!=k?k:w;return p({value:e,tabValues:f})?e:null}();return(0,l.A)((function(){C&&x(C)}),[C]),{selectedValue:b,selectValue:(0,r.useCallback)((function(e){if(!p({value:e,tabValues:f}))throw new Error("Can't select invalid tab value="+e);x(e),y(e),P(e)}),[y,P,f]),tabValues:f}}var g=n(92303);const b={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var x=n(74848);function v(e){var t=e.className,n=e.block,r=e.selectedValue,o=e.selectValue,l=e.tabValues,s=[],c=(0,i.a_)().blockElementScrollPositionUntilNextRender,d=function(e){var t=e.currentTarget,n=s.indexOf(t),a=l[n].value;a!==r&&(c(t),o(a))},u=function(e){var t,n=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":var r,a=s.indexOf(e.currentTarget)+1;n=null!=(r=s[a])?r:s[0];break;case"ArrowLeft":var i,o=s.indexOf(e.currentTarget)-1;n=null!=(i=s[o])?i:s[s.length-1]}null==(t=n)||t.focus()};return(0,x.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,a.A)("tabs",{"tabs--block":n},t),children:l.map((function(e){var t=e.value,n=e.label,i=e.attributes;return(0,x.jsx)("li",Object.assign({role:"tab",tabIndex:r===t?0:-1,"aria-selected":r===t,ref:function(e){return s.push(e)},onKeyDown:u,onClick:d},i,{className:(0,a.A)("tabs__item",b.tabItem,null==i?void 0:i.className,{"tabs__item--active":r===t}),children:null!=n?n:t}),t)}))})}function k(e){var t=e.lazy,n=e.children,i=e.selectedValue,o=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){var l=o.find((function(e){return e.props.value===i}));return l?(0,r.cloneElement)(l,{className:(0,a.A)("margin-top--md",l.props.className)}):null}return(0,x.jsx)("div",{className:"margin-top--md",children:o.map((function(e,t){return(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==i})}))})}function y(e){var t=f(e);return(0,x.jsxs)("div",{className:(0,a.A)("tabs-container",b.tabList),children:[(0,x.jsx)(v,Object.assign({},t,e)),(0,x.jsx)(k,Object.assign({},t,e))]})}function j(e){var t=(0,g.A)();return(0,x.jsx)(y,Object.assign({},e,{children:u(e.children)}),String(t))}},53465:(e,t,n)=>{n.d(t,{W:()=>c});var r=n(96540),a=n(44586),i=["zero","one","two","few","many","other"];function o(e){return i.filter((function(t){return e.includes(t)}))}var l={locale:"en",pluralForms:o(["one","other"]),select:function(e){return 1===e?"one":"other"}};function s(){var e=(0,a.A)().i18n.currentLocale;return(0,r.useMemo)((function(){try{return t=e,n=new Intl.PluralRules(t),{locale:t,pluralForms:o(n.resolvedOptions().pluralCategories),select:function(e){return n.select(e)}}}catch(r){return console.error('Failed to use Intl.PluralRules for locale "'+e+'".\nDocusaurus will fallback to the default (English) implementation.\nError: '+r.message+"\n"),l}var t,n}),[e])}function c(){var e=s();return{selectMessage:function(t,n){return function(e,t,n){var r=e.split("|");if(1===r.length)return r[0];r.length>n.pluralForms.length&&console.error("For locale="+n.locale+", a maximum of "+n.pluralForms.length+" plural forms are expected ("+n.pluralForms.join(",")+"), but the message contains "+r.length+": "+e);var a=n.select(t),i=n.pluralForms.indexOf(a);return r[Math.min(i,r.length-1)]}(n,t,e)}}}},28453:(e,t,n)=>{n.d(t,{R:()=>o,x:()=>l});var r=n(96540);const a={},i=r.createContext(a);function o(e){const t=r.useContext(i);return r.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function l(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:o(e.components),r.createElement(i.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/feadf832.fa61a509.js b/assets/js/feadf832.fa61a509.js new file mode 100644 index 000000000000..cfebc2b72301 --- /dev/null +++ b/assets/js/feadf832.fa61a509.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1710],{33317:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>s,default:()=>h,frontMatter:()=>l,metadata:()=>r,toc:()=>d});const r=JSON.parse('{"id":"build/build-guides-coretime-start","title":"Getting Started - Intro to the Polkadot SDK","description":"Introduction to the Polkadot SDK","source":"@site/../docs/build/build-guides-coretime-start.md","sourceDirName":"build","slug":"/build-guides-coretime-start","permalink":"/docs/build-guides-coretime-start","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/build/build-guides-coretime-start.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1728370989000,"frontMatter":{"id":"build-guides-coretime-start","title":"Getting Started - Intro to the Polkadot SDK","sidebar_label":"Intro to the Polkadot SDK","description":"Introduction to the Polkadot SDK","keywords":["coretime","blockspace","parathread","parachain","cores"],"slug":"../build-guides-coretime-start"},"sidebar":"docs","previous":{"title":"Protocol Development Resources","permalink":"/docs/build-protocol-index"},"next":{"title":"Install Dependencies","permalink":"/docs/build-guides-install-deps"}}');var a=n(74848),o=n(28453),i=(n(11470),n(3514));const l={id:"build-guides-coretime-start",title:"Getting Started - Intro to the Polkadot SDK",sidebar_label:"Intro to the Polkadot SDK",description:"Introduction to the Polkadot SDK",keywords:["coretime","blockspace","parathread","parachain","cores"],slug:"../build-guides-coretime-start"},s=void 0,c={},d=[{value:"Using the Polkadot SDK",id:"using-the-polkadot-sdk",level:2},{value:"Deploying on a Core",id:"deploying-on-a-core",level:2},{value:"Install dependencies",id:"install-dependencies",level:3},{value:"Deployment Example - Adder Collator",id:"deployment-example---adder-collator",level:3},{value:"OpenZeppelin Templates & Guides",id:"openzeppelin-templates--guides",level:2},{value:"Polkadot SDK Parachain Template",id:"polkadot-sdk-parachain-template",level:2}];function u(e){const t={a:"a",admonition:"admonition",blockquote:"blockquote",code:"code",h2:"h2",h3:"h3",li:"li",mermaid:"mermaid",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,o.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(t.admonition,{title:"This section is under construction.",type:"warning"}),"\n",(0,a.jsx)(i.A,{}),"\n",(0,a.jsx)(t.h2,{id:"using-the-polkadot-sdk",children:"Using the Polkadot SDK"}),"\n",(0,a.jsxs)(t.p,{children:["The Polkadot SDK is comprised of ",(0,a.jsx)(t.strong,{children:"three"})," important repositories:"]}),"\n",(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.a,{href:"https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/polkadot_sdk/index.html#polkadot",children:(0,a.jsx)(t.strong,{children:"Polkadot"})})," -\nThis included both client implementation and runtime until the runtime was moved to the Polkadot\nFellows organization."]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.a,{href:"https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/polkadot_sdk/index.html#substrate",children:(0,a.jsx)(t.strong,{children:"Substrate"})})," -\nThe underlying core primitives and libraries for building blockchains (any blockchain, not just\none for Polkadot). Much of Polkadot is built with Substrate."]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.a,{href:"https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/polkadot_sdk/index.html#cumulus",children:(0,a.jsx)(t.strong,{children:"Cumulus"})})," -\nA set of libraries and tools pertaining specifically to connecting blockchains to Polkadot, known\nas parachains."]}),"\n"]}),"\n",(0,a.jsxs)(t.blockquote,{children:["\n",(0,a.jsxs)(t.p,{children:["For an in-depth dive into the monorepo, it is highly recommended that you look into the\n",(0,a.jsx)(t.a,{href:"https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/polkadot_sdk/index.html",children:"Polkadot SDK Docs, which explains everything."})]}),"\n"]}),"\n",(0,a.jsxs)(t.admonition,{title:"What is a task?",type:"info",children:[(0,a.jsx)(t.p,{children:'You might see the term "task" referenced often in place of "parachain". In most cases, it refers to\na process utilizing the relay chain\'s compute. This could be a parachain or any other computational\nprocess, provided that it adheres to the Polkadot protocol interface.'}),(0,a.jsxs)(t.p,{children:["The full definition can be found ",(0,a.jsx)(t.a,{href:"/docs/learn-agile-coretime#task",children:"here"}),"."]})]}),"\n",(0,a.jsxs)(t.ol,{children:["\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.strong,{children:"Reserving"})," a ",(0,a.jsx)(t.a,{href:"/docs/glossary#paraid",children:(0,a.jsx)(t.code,{children:"ParaId"})}),", where you will upload your runtime and\ngenesis state."]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.strong,{children:"Compiling"})," the runtime (written in Rust) to a ",(0,a.jsx)(t.a,{href:"/docs/learn-wasm",children:"WebAssembly"})," blob,\nthereby defining how your state transitions from one state to the next. This runtime is created\nusing the Polkadot SDK."]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.strong,{children:"Ensure"})," your chain spec is viable and ready to be deployed as a live, working parachain."]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.strong,{children:"Generating"})," your genesis state and wasm."]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.strong,{children:"Obtaining"})," a core, most likely through a\n",(0,a.jsx)(t.a,{href:"/docs/learn-guides-coretime-marketplaces",children:"Coretime marketplace"}),"."]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.strong,{children:"Assigning"})," that core to your",(0,a.jsxs)(t.a,{href:"/docs/glossary#paraid",children:[" ",(0,a.jsx)(t.code,{children:"ParaId"})]}),"."]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.strong,{children:"Ensuring"})," you have at least one honest, synced collator for your task"]}),"\n"]}),"\n",(0,a.jsx)(t.h2,{id:"deploying-on-a-core",children:"Deploying on a Core"}),"\n",(0,a.jsxs)(t.p,{children:["Once you have your runtime and pallets developed, you will be able to deploy it on a\n",(0,a.jsx)(t.a,{href:"/docs/learn-agile-coretime#core",children:"core"}),", which is how one utilizes the shared security of the\nPolkadot network. One does so by:"]}),"\n",(0,a.jsx)(t.mermaid,{value:"%%{\n init: {\n 'theme': 'base',\n 'themeVariables': {\n 'fontFamily': 'Unbounded',\n 'primaryColor': '#E6007A',\n 'fontSize': '16px',\n 'primaryTextColor': '#fff',\n 'primaryBorderColor': '#7C0000',\n 'lineColor': '#140523',\n 'secondaryColor': '#552BBF',\n 'tertiaryColor': '#fff'\n }\n }\n}%%\nflowchart TD\n subgraph GA[\"Generate Artifacts\"]\n direction LR\n A[\"Creating a runtime\"]--\x3eB[\"Compiling to Wasm\"]--\x3eC[\"Generate Genesis State\"]\n end\n\n subgraph PC[\"Procure ParaId & Core\"]\n direction LR\n PARAID[\"Reserve ParaId\"]\n PARAID--\x3eD[\"Buy Bulk Coretime\"]\n PARAID--\x3eE[\"Issue On-Demand Coretime Extrinsic\"]\n end\n\n\n subgraph DEP[\"Deploying\"]\n direction LR\n F[\"Register artifacts to ParaId\"]--\x3eassign[\"Assign Core\"]--\x3eG[\"Sync collator\"]--\x3eH[\"Begin generating blocks!\"]\n end\n\nGA--\x3ePC\nPC--\x3eDEP"}),"\n",(0,a.jsx)(t.h3,{id:"install-dependencies",children:"Install dependencies"}),"\n",(0,a.jsxs)(t.p,{children:["Make sure you have everything you need for your target system\n",(0,a.jsx)(t.a,{href:"/docs/build-guides-install-deps",children:"here"}),"."]}),"\n",(0,a.jsxs)(t.p,{children:["Be sure you also install the ",(0,a.jsx)(t.code,{children:"polkadot-parachain"})," and ",(0,a.jsx)(t.code,{children:"chain-spec-builder"})," binaries, as they needed\nto start and run your chain!"]}),"\n",(0,a.jsx)(t.h3,{id:"deployment-example---adder-collator",children:"Deployment Example - Adder Collator"}),"\n",(0,a.jsxs)(t.p,{children:["Try out the above by deploying the\n",(0,a.jsx)(t.a,{href:"/docs/learn-guides-coretime-parachains",children:'adder collator, a straightforward "counter" parachain implementation'}),"."]}),"\n",(0,a.jsx)(t.h2,{id:"openzeppelin-templates--guides",children:"OpenZeppelin Templates & Guides"}),"\n",(0,a.jsxs)(t.p,{children:["OpenZeppelin offers a\n",(0,a.jsx)(t.a,{href:"https://github.com/OpenZeppelin/polkadot-generic-runtime-template",children:"generic parachain template"}),",\nwhich has support for:"]}),"\n",(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsx)(t.li,{children:"Proxy Pallet"}),"\n",(0,a.jsx)(t.li,{children:"Multisig Pallet"}),"\n",(0,a.jsx)(t.li,{children:"Governance support - a treasury, referenda (OpenGov!), and assets configuration"}),"\n",(0,a.jsx)(t.li,{children:"Collation/Parachain Support"}),"\n",(0,a.jsx)(t.li,{children:"XCM (Cross Consensus Messaging) Configuration and Support"}),"\n"]}),"\n",(0,a.jsxs)(t.p,{children:["For more information, check their\n",(0,a.jsx)(t.a,{href:"https://docs.openzeppelin.com/substrate-runtimes/1.0.0/",children:"Substrate parachain runtime guide."})]}),"\n",(0,a.jsx)(t.h2,{id:"polkadot-sdk-parachain-template",children:"Polkadot SDK Parachain Template"}),"\n",(0,a.jsxs)(t.p,{children:["If you wish to the\n",(0,a.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/templates/parachain",children:"Polkadot SDK's Parachain template"}),",\nplease follow the ",(0,a.jsx)(t.a,{href:"/docs/build-guides-template-basic",children:"Template to Core guide."})]})]})}function h(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,a.jsx)(t,{...e,children:(0,a.jsx)(u,{...e})}):u(e)}},3514:(e,t,n)=>{n.d(t,{A:()=>x});n(96540);var r=n(34164),a=n(26972),o=n(28774),i=n(53465),l=n(16654),s=n(21312),c=n(51107);const d={cardContainer:"cardContainer_fWXF",cardTitle:"cardTitle_rnsV",cardDescription:"cardDescription_PWke"};var u=n(74848);function h(e){var t=e.href,n=e.children;return(0,u.jsx)(o.A,{href:t,className:(0,r.A)("card padding--lg",d.cardContainer),children:n})}function p(e){var t=e.href,n=e.icon,a=e.title,o=e.description;return(0,u.jsxs)(h,{href:t,children:[(0,u.jsxs)(c.A,{as:"h2",className:(0,r.A)("text--truncate",d.cardTitle),title:a,children:[n," ",a]}),o&&(0,u.jsx)("p",{className:(0,r.A)("text--truncate",d.cardDescription),title:o,children:o})]})}function m(e){var t,n,r=e.item,o=(0,a.Nr)(r),l=(n=(0,i.W)().selectMessage,function(e){return n(e,(0,s.T)({message:"1 item|{count} items",id:"theme.docs.DocCard.categoryDescription.plurals",description:"The default description for a category card in the generated index about how many items this category includes"},{count:e}))});return o?(0,u.jsx)(p,{href:o,icon:"\ud83d\uddc3\ufe0f",title:r.label,description:null!=(t=r.description)?t:l(r.items.length)}):null}function f(e){var t,n,r=e.item,o=(0,l.A)(r.href)?"\ud83d\udcc4\ufe0f":"\ud83d\udd17",i=(0,a.cC)(null!=(t=r.docId)?t:void 0);return(0,u.jsx)(p,{href:r.href,icon:o,title:r.label,description:null!=(n=r.description)?n:null==i?void 0:i.description})}function g(e){var t=e.item;switch(t.type){case"link":return(0,u.jsx)(f,{item:t});case"category":return(0,u.jsx)(m,{item:t});default:throw new Error("unknown item type "+JSON.stringify(t))}}function b(e){var t=e.className,n=(0,a.$S)();return(0,u.jsx)(x,{items:n.items,className:t})}function x(e){var t=e.items,n=e.className;if(!t)return(0,u.jsx)(b,Object.assign({},e));var o=(0,a.d1)(t);return(0,u.jsx)("section",{className:(0,r.A)("row",n),children:o.map((function(e,t){return(0,u.jsx)("article",{className:"col col--6 margin-bottom--lg",children:(0,u.jsx)(g,{item:e})},t)}))})}},11470:(e,t,n)=>{n.d(t,{A:()=>j});var r=n(96540),a=n(34164),o=n(23104),i=n(56347),l=n(205),s=n(57485),c=n(31682),d=n(75376);function u(e){var t,n;return null!=(t=null==(n=r.Children.toArray(e).filter((function(e){return"\n"!==e})).map((function(e){if(!e||(0,r.isValidElement)(e)&&((t=e.props)&&"object"==typeof t&&"value"in t))return e;var t;throw new Error("Docusaurus error: Bad child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:n.filter(Boolean))?t:[]}function h(e){var t=e.values,n=e.children;return(0,r.useMemo)((function(){var e=null!=t?t:function(e){return u(e).map((function(e){var t=e.props;return{value:t.value,label:t.label,attributes:t.attributes,default:t.default}}))}(n);return function(e){var t=(0,c.XI)(e,(function(e,t){return e.value===t.value}));if(t.length>0)throw new Error('Docusaurus error: Duplicate values "'+t.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[t,n])}function p(e){var t=e.value;return e.tabValues.some((function(e){return e.value===t}))}function m(e){var t=e.queryString,n=void 0!==t&&t,a=e.groupId,o=(0,i.W6)(),l=function(e){var t=e.queryString,n=void 0!==t&&t,r=e.groupId;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!r)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=r?r:null}({queryString:n,groupId:a});return[(0,s.aZ)(l),(0,r.useCallback)((function(e){if(l){var t=new URLSearchParams(o.location.search);t.set(l,e),o.replace(Object.assign({},o.location,{search:t.toString()}))}}),[l,o])]}function f(e){var t,n,a,o,i=e.defaultValue,s=e.queryString,c=void 0!==s&&s,u=e.groupId,f=h(e),g=(0,r.useState)((function(){return function(e){var t,n=e.defaultValue,r=e.tabValues;if(0===r.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!p({value:n,tabValues:r}))throw new Error('Docusaurus error: The has a defaultValue "'+n+'" but none of its children has the corresponding value. Available values are: '+r.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return n}var a=null!=(t=r.find((function(e){return e.default})))?t:r[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:i,tabValues:f})})),b=g[0],x=g[1],v=m({queryString:c,groupId:u}),k=v[0],y=v[1],j=(t=function(e){return e?"docusaurus.tab."+e:null}({groupId:u}.groupId),n=(0,d.Dv)(t),a=n[0],o=n[1],[a,(0,r.useCallback)((function(e){t&&o.set(e)}),[t,o])]),w=j[0],P=j[1],C=function(){var e=null!=k?k:w;return p({value:e,tabValues:f})?e:null}();return(0,l.A)((function(){C&&x(C)}),[C]),{selectedValue:b,selectValue:(0,r.useCallback)((function(e){if(!p({value:e,tabValues:f}))throw new Error("Can't select invalid tab value="+e);x(e),y(e),P(e)}),[y,P,f]),tabValues:f}}var g=n(92303);const b={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var x=n(74848);function v(e){var t=e.className,n=e.block,r=e.selectedValue,i=e.selectValue,l=e.tabValues,s=[],c=(0,o.a_)().blockElementScrollPositionUntilNextRender,d=function(e){var t=e.currentTarget,n=s.indexOf(t),a=l[n].value;a!==r&&(c(t),i(a))},u=function(e){var t,n=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":var r,a=s.indexOf(e.currentTarget)+1;n=null!=(r=s[a])?r:s[0];break;case"ArrowLeft":var o,i=s.indexOf(e.currentTarget)-1;n=null!=(o=s[i])?o:s[s.length-1]}null==(t=n)||t.focus()};return(0,x.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,a.A)("tabs",{"tabs--block":n},t),children:l.map((function(e){var t=e.value,n=e.label,o=e.attributes;return(0,x.jsx)("li",Object.assign({role:"tab",tabIndex:r===t?0:-1,"aria-selected":r===t,ref:function(e){return s.push(e)},onKeyDown:u,onClick:d},o,{className:(0,a.A)("tabs__item",b.tabItem,null==o?void 0:o.className,{"tabs__item--active":r===t}),children:null!=n?n:t}),t)}))})}function k(e){var t=e.lazy,n=e.children,o=e.selectedValue,i=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){var l=i.find((function(e){return e.props.value===o}));return l?(0,r.cloneElement)(l,{className:(0,a.A)("margin-top--md",l.props.className)}):null}return(0,x.jsx)("div",{className:"margin-top--md",children:i.map((function(e,t){return(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==o})}))})}function y(e){var t=f(e);return(0,x.jsxs)("div",{className:(0,a.A)("tabs-container",b.tabList),children:[(0,x.jsx)(v,Object.assign({},t,e)),(0,x.jsx)(k,Object.assign({},t,e))]})}function j(e){var t=(0,g.A)();return(0,x.jsx)(y,Object.assign({},e,{children:u(e.children)}),String(t))}},53465:(e,t,n)=>{n.d(t,{W:()=>c});var r=n(96540),a=n(44586),o=["zero","one","two","few","many","other"];function i(e){return o.filter((function(t){return e.includes(t)}))}var l={locale:"en",pluralForms:i(["one","other"]),select:function(e){return 1===e?"one":"other"}};function s(){var e=(0,a.A)().i18n.currentLocale;return(0,r.useMemo)((function(){try{return t=e,n=new Intl.PluralRules(t),{locale:t,pluralForms:i(n.resolvedOptions().pluralCategories),select:function(e){return n.select(e)}}}catch(r){return console.error('Failed to use Intl.PluralRules for locale "'+e+'".\nDocusaurus will fallback to the default (English) implementation.\nError: '+r.message+"\n"),l}var t,n}),[e])}function c(){var e=s();return{selectMessage:function(t,n){return function(e,t,n){var r=e.split("|");if(1===r.length)return r[0];r.length>n.pluralForms.length&&console.error("For locale="+n.locale+", a maximum of "+n.pluralForms.length+" plural forms are expected ("+n.pluralForms.join(",")+"), but the message contains "+r.length+": "+e);var a=n.select(t),o=n.pluralForms.indexOf(a);return r[Math.min(o,r.length-1)]}(n,t,e)}}}},28453:(e,t,n)=>{n.d(t,{R:()=>i,x:()=>l});var r=n(96540);const a={},o=r.createContext(a);function i(e){const t=r.useContext(o);return r.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function l(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:i(e.components),r.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/fecdcc34.69a4280d.js b/assets/js/fecdcc34.69a4280d.js deleted file mode 100644 index 1925cc519a46..000000000000 --- a/assets/js/fecdcc34.69a4280d.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2410],{69144:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>a,contentTitle:()=>t,default:()=>l,frontMatter:()=>o,metadata:()=>c,toc:()=>d});var i=s(74848),r=s(28453);const o={id:"learn-xcm-docs-journey-version",title:"Version Subscription",sidebar_label:"Version Subscription",description:"Get Notified about XCM Version Updates.",keywords:["xcm","cross-consensus messaging","version"],slug:"../journey-version"},t="Version Subscription",c={id:"learn/xcm/journey/learn-xcm-docs-journey-version",title:"Version Subscription",description:"Get Notified about XCM Version Updates.",source:"@site/../docs/learn/xcm/journey/version.md",sourceDirName:"learn/xcm/journey",slug:"/learn/xcm/journey-version",permalink:"/docs/learn/xcm/journey-version",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/xcm/journey/version.md",tags:[],version:"current",lastUpdatedBy:"bader y",lastUpdatedAt:1694099593e3,frontMatter:{id:"learn-xcm-docs-journey-version",title:"Version Subscription",sidebar_label:"Version Subscription",description:"Get Notified about XCM Version Updates.",keywords:["xcm","cross-consensus messaging","version"],slug:"../journey-version"},sidebar:"docs",previous:{title:"Queries",permalink:"/docs/learn/xcm/journey-queries"},next:{title:"Locks",permalink:"/docs/learn/xcm/journey-locks"}},a={},d=[];function u(e){const n={a:"a",code:"code",h1:"h1",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,r.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.header,{children:(0,i.jsx)(n.h1,{id:"version-subscription",children:"Version Subscription"})}),"\n",(0,i.jsx)(n.p,{children:"XCM is a versioned messaging format. One version may contain more or different instructions than\nanother, so for parties to communicate via XCM, it is important to know which version the other\nparty is using. XCM enables a version subscription model, where parties can subscribe to each other\nto get notified of version updates. XCM has two instructions to enable this:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"SubscribeVersion"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"UnsubscribeVersion"})}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["The version subscription model can differ per XCVM implementation. The ",(0,i.jsx)(n.code,{children:"xcm-executor"})," has a\n",(0,i.jsx)(n.code,{children:"SubscriptionService"})," ",(0,i.jsx)(n.a,{href:"/docs/learn/xcm/config-deep-dive#subscriptionservice",children:"config item"}),". Any type\nspecified as the ",(0,i.jsx)(n.code,{children:"SubscriptionService"})," must implement the ",(0,i.jsx)(n.code,{children:"VersionChangeNotifier"})," trait. The XCM\npallet is one such implementor. When the ",(0,i.jsx)(n.code,{children:"SubscribeVersion"})," instruction is sent to a consensus\nsystem that uses the XCM pallet as the ",(0,i.jsx)(n.code,{children:"SubscriptionService"})," in the XCM executor, the system will\nsend back its currently ",(0,i.jsx)(n.code,{children:"AdvertisedVersion"})," and will keep the subscribed location up to date when\nthe version changes. The subscribed location can unsubscribe to version changes by sending the\n",(0,i.jsx)(n.code,{children:"UnsubscribeVersion"})," instruction."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-rust",children:"SubscribeVersion {\n #[codec(compact)]\n query_id: QueryId,\n max_response_weight: Weight,\n}\n\nUnsubscribeVersion\n"})}),"\n",(0,i.jsxs)(n.p,{children:["Check out the ",(0,i.jsx)(n.a,{href:"https://github.com/paritytech/xcm-docs/tree/main/examples",children:"example"}),"."]})]})}function l(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(u,{...e})}):u(e)}},28453:(e,n,s)=>{s.d(n,{R:()=>t,x:()=>c});var i=s(96540);const r={},o=i.createContext(r);function t(e){const n=i.useContext(o);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:t(e.components),i.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/fecdcc34.7f29c184.js b/assets/js/fecdcc34.7f29c184.js new file mode 100644 index 000000000000..7aae64cc0d28 --- /dev/null +++ b/assets/js/fecdcc34.7f29c184.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2410],{17293:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>a,contentTitle:()=>c,default:()=>l,frontMatter:()=>t,metadata:()=>i,toc:()=>d});const i=JSON.parse('{"id":"learn/xcm/journey/learn-xcm-docs-journey-version","title":"Version Subscription","description":"Get Notified about XCM Version Updates.","source":"@site/../docs/learn/xcm/journey/version.md","sourceDirName":"learn/xcm/journey","slug":"/learn/xcm/journey-version","permalink":"/docs/learn/xcm/journey-version","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/xcm/journey/version.md","tags":[],"version":"current","lastUpdatedBy":"bader y","lastUpdatedAt":1694099593000,"frontMatter":{"id":"learn-xcm-docs-journey-version","title":"Version Subscription","sidebar_label":"Version Subscription","description":"Get Notified about XCM Version Updates.","keywords":["xcm","cross-consensus messaging","version"],"slug":"../journey-version"},"sidebar":"docs","previous":{"title":"Queries","permalink":"/docs/learn/xcm/journey-queries"},"next":{"title":"Locks","permalink":"/docs/learn/xcm/journey-locks"}}');var r=s(74848),o=s(28453);const t={id:"learn-xcm-docs-journey-version",title:"Version Subscription",sidebar_label:"Version Subscription",description:"Get Notified about XCM Version Updates.",keywords:["xcm","cross-consensus messaging","version"],slug:"../journey-version"},c="Version Subscription",a={},d=[];function u(e){const n={a:"a",code:"code",h1:"h1",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,o.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.header,{children:(0,r.jsx)(n.h1,{id:"version-subscription",children:"Version Subscription"})}),"\n",(0,r.jsx)(n.p,{children:"XCM is a versioned messaging format. One version may contain more or different instructions than\nanother, so for parties to communicate via XCM, it is important to know which version the other\nparty is using. XCM enables a version subscription model, where parties can subscribe to each other\nto get notified of version updates. XCM has two instructions to enable this:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"SubscribeVersion"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"UnsubscribeVersion"})}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:["The version subscription model can differ per XCVM implementation. The ",(0,r.jsx)(n.code,{children:"xcm-executor"})," has a\n",(0,r.jsx)(n.code,{children:"SubscriptionService"})," ",(0,r.jsx)(n.a,{href:"/docs/learn/xcm/config-deep-dive#subscriptionservice",children:"config item"}),". Any type\nspecified as the ",(0,r.jsx)(n.code,{children:"SubscriptionService"})," must implement the ",(0,r.jsx)(n.code,{children:"VersionChangeNotifier"})," trait. The XCM\npallet is one such implementor. When the ",(0,r.jsx)(n.code,{children:"SubscribeVersion"})," instruction is sent to a consensus\nsystem that uses the XCM pallet as the ",(0,r.jsx)(n.code,{children:"SubscriptionService"})," in the XCM executor, the system will\nsend back its currently ",(0,r.jsx)(n.code,{children:"AdvertisedVersion"})," and will keep the subscribed location up to date when\nthe version changes. The subscribed location can unsubscribe to version changes by sending the\n",(0,r.jsx)(n.code,{children:"UnsubscribeVersion"})," instruction."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-rust",children:"SubscribeVersion {\n #[codec(compact)]\n query_id: QueryId,\n max_response_weight: Weight,\n}\n\nUnsubscribeVersion\n"})}),"\n",(0,r.jsxs)(n.p,{children:["Check out the ",(0,r.jsx)(n.a,{href:"https://github.com/paritytech/xcm-docs/tree/main/examples",children:"example"}),"."]})]})}function l(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(u,{...e})}):u(e)}},28453:(e,n,s)=>{s.d(n,{R:()=>t,x:()=>c});var i=s(96540);const r={},o=i.createContext(r);function t(e){const n=i.useContext(o);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:t(e.components),i.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/feea648c.6269c38a.js b/assets/js/feea648c.6269c38a.js new file mode 100644 index 000000000000..1509838ee4fc --- /dev/null +++ b/assets/js/feea648c.6269c38a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9175],{44529:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>r,default:()=>d,frontMatter:()=>a,metadata:()=>s,toc:()=>l});const s=JSON.parse('{"id":"learn/learn-xcvm","title":"XCM Virtual Machine (XCVM) & XCM Executor","description":"Design of the XCM Executor and Mechanics of the XCM Virtual Machine.","source":"@site/../docs/learn/learn-xcvm.md","sourceDirName":"learn","slug":"/learn-xcvm","permalink":"/docs/learn-xcvm","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-xcvm.md","tags":[],"version":"current","lastUpdatedBy":"github-actions[bot]","lastUpdatedAt":1712558849000,"frontMatter":{"id":"learn-xcvm","title":"XCM Virtual Machine (XCVM) & XCM Executor","sidebar_label":"XCM Virtual Machine (XCVM)","description":"Design of the XCM Executor and Mechanics of the XCM Virtual Machine.","keywords":["cross-consensus","XCM","XCMP","interoperability","communication"],"slug":"../learn-xcvm"},"sidebar":"docs","previous":{"title":"XCM Transport","permalink":"/docs/learn-xcm-transport"},"next":{"title":"XCM Instructions","permalink":"/docs/learn-xcm-instructions"}}');var i=t(74848),o=t(28453);const a={id:"learn-xcvm",title:"XCM Virtual Machine (XCVM) & XCM Executor",sidebar_label:"XCM Virtual Machine (XCVM)",description:"Design of the XCM Executor and Mechanics of the XCM Virtual Machine.",keywords:["cross-consensus","XCM","XCMP","interoperability","communication"],slug:"../learn-xcvm"},r=void 0,c={},l=[{value:"XCMs are XCVM Programs",id:"xcms-are-xcvm-programs",level:2},{value:"XCM Executor & Configuration",id:"xcm-executor--configuration",level:2},{value:"Cross Consensus Message (XCM) Anatomy & Flow",id:"cross-consensus-message-xcm-anatomy--flow",level:2},{value:"Example Register: The Holding Register",id:"example-register-the-holding-register",level:3},{value:"Example: TransferAsset",id:"example-transferasset",level:3},{value:"Locations in XCM",id:"locations-in-xcm",level:2},{value:"MultiLocation Scenario Example",id:"multilocation-scenario-example",level:3},{value:"UniversalLocation in XCM",id:"universallocation-in-xcm",level:3},{value:"Simulating XCVM using the xcm-simulator",id:"simulating-xcvm-using-the-xcm-simulator",level:2}];function h(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,o.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.admonition,{title:"XCM Documentation",type:"info",children:(0,i.jsxs)(n.p,{children:["For a more practical approach to utilizing XCM, refer to the ",(0,i.jsx)(n.a,{href:"./learn/xcm",children:"XCM Docs"}),". Please keep in\nmind that XCM is under active development."]})}),"\n",(0,i.jsxs)(n.p,{children:["At the core of XCM lies the Cross-Consensus Virtual Machine (XCVM). A \u201cmessage\u201d in XCM is an XCVM\nprogram, referred to as an ",(0,i.jsx)(n.strong,{children:'"XCM"'})," or ",(0,i.jsx)(n.strong,{children:'"XCMs"'})," for multiple messages. The XCVM is a\nregister-based state machine. The state is tracked in domain-specific registers that hold\ninformation that is used and mutated along the execution of a particular message. Most of the XCM\nformat comprises these registers and the instructions used to compose XCVM programs."]}),"\n",(0,i.jsx)(n.p,{children:"The XCVM is an ultra-high-level non-Turing-complete computer whose instructions are designed to be\nroughly at the same level as transactions in terms of definition. Messages are one or more XCM\ninstructions executed in order by the XCVM. An XCM is executed until it either runs to the end or\nhits an error, at which point it finishes up and halts."}),"\n",(0,i.jsxs)(n.p,{children:["The first implementation of the XCVM is the\n",(0,i.jsx)(n.a,{href:"https://github.com/paritytech/polkadot/tree/26b0c4f6273190f4538b24939a56b6a0b51a344c/xcm/xcm-executor",children:(0,i.jsx)(n.code,{children:"xcm-executor"})}),".\nIt follows the XCVM specification provided by Parity. It's engineered to be extendable, providing\nmaximum customizability when configuring XCM. Because the ",(0,i.jsx)(n.code,{children:"xcm-executor"})," is just an implementation\nof XCVM, it's entirely possible to create another implementation if desired."]}),"\n",(0,i.jsx)(n.h2,{id:"xcms-are-xcvm-programs",children:"XCMs are XCVM Programs"}),"\n",(0,i.jsxs)(n.p,{children:["A cross consensus message (XCM) is just a program that runs on the ",(0,i.jsx)(n.code,{children:"XCVM"}),": in other words, one or\nmore XCM instructions that are executed by an XCVM implementation, such as the ",(0,i.jsx)(n.code,{children:"xcm-executor"}),". To\nlearn more about the XCVM and the XCM format, see the latest\n",(0,i.jsx)(n.a,{href:"https://medium.com/polkadot-network/xcm-part-iii-execution-and-error-management-ceb8155dd166",children:"blog post on XCM"}),"\nby Dr. Gavin Wood."]}),"\n",(0,i.jsx)(n.p,{children:"XCM instructions might change a register, the state of the consensus system, or both. Depending on\nthe program's goal, whether it is to teleport assets from one chain to another or call a smart\ncontract on another chain, XCMs usually require changes to the registers before any changes to the\nconsensus system can be made."}),"\n",(0,i.jsx)(n.h2,{id:"xcm-executor--configuration",children:"XCM Executor & Configuration"}),"\n",(0,i.jsxs)(n.p,{children:["The XCM Executor's implementation centers around a core piece: the XCM configuration. Each instance\nof the Executor must have a valid configuration, which specifies a multitude of options on how a\nchain may treat incoming messages via\n",(0,i.jsx)(n.a,{href:"https://github.com/paritytech/polkadot/blob/26b0c4f6273190f4538b24939a56b6a0b51a344c/xcm/xcm-executor/src/config.rs#L52",children:"Barriers"}),",\ncalculate weight for a message via the\n",(0,i.jsx)(n.a,{href:"https://github.com/paritytech/polkadot/blob/26b0c4f6273190f4538b24939a56b6a0b51a344c/xcm/xcm-executor/src/config.rs#L55",children:"Weigher"}),",\nhow much weight to purchase via the\n",(0,i.jsx)(n.a,{href:"https://github.com/paritytech/polkadot/blob/26b0c4f6273190f4538b24939a56b6a0b51a344c/xcm/xcm-executor/src/config.rs#L58",children:"Trader"}),",\n",(0,i.jsx)(n.a,{href:"https://github.com/paritytech/polkadot/blob/26b0c4f6273190f4538b24939a56b6a0b51a344c/xcm/xcm-executor/src/config.rs#L89",children:"configure fees"}),",\nhow to\n",(0,i.jsx)(n.a,{href:"https://github.com/paritytech/polkadot/blob/26b0c4f6273190f4538b24939a56b6a0b51a344c/xcm/xcm-executor/src/config.rs#L40",children:"convert origins"}),",\nand more."]}),"\n",(0,i.jsx)(n.h2,{id:"cross-consensus-message-xcm-anatomy--flow",children:"Cross Consensus Message (XCM) Anatomy & Flow"}),"\n",(0,i.jsx)(n.p,{children:"An XCM is made up of a list of instructions that are executed in order. There are four different\nkinds of XCM instructions:"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Instruction"})," - Results in a state change in the local consensus system or some state change."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Trusted Indication"})," - Tells the XCVM, or the Executor, that some action has been done before\nalready - meaning, this action is now trusted and can be acted on, i.e., in a teleport scenario."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Information"})," - Provides additional information about a particular origin, usually the result\nof a query, i.e., a ",(0,i.jsx)(n.code,{children:"QueryResponse"})," instruction."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"System Notification"})," - Typically used in the context of when an HRMP channel is being opened,\nclosed, or accepted."]}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"Typically, an XCM takes the following path through the XCVM:"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsx)(n.li,{children:"Instructions within an XCM are read one-by-one by the XCVM. An XCM may contain one or more\ninstructions."}),"\n",(0,i.jsxs)(n.li,{children:["The instruction is executed. This means that the current values of the ",(0,i.jsx)(n.em,{children:"XCVM registers"}),", the\n",(0,i.jsx)(n.em,{children:"instruction type"}),", and the ",(0,i.jsx)(n.em,{children:"instruction operands"})," are all used to execute some operation, which\nmight result in some registers changing their value, or in an error being thrown, which would\nhalt execution."]}),"\n",(0,i.jsx)(n.li,{children:"Each subsequent instruction within the XCM is read until the end of the message has been\nreached."}),"\n"]}),"\n",(0,i.jsx)(n.h3,{id:"example-register-the-holding-register",children:"Example Register: The Holding Register"}),"\n",(0,i.jsxs)(n.p,{children:["There are many instructions that depend on the ",(0,i.jsx)(n.em,{children:"Holding register"}),". The ",(0,i.jsx)(n.em,{children:"Holding register"})," is an XCVM\nregister that provides a place for any assets that are in an intermediary state to be held until\nthey are taken out of the Holding register. It requires an instruction to place assets within it and\nanother to withdraw them. The simplest example of this occurring is the ",(0,i.jsx)(n.code,{children:"DepositAsset"})," instruction,\nwhich in its Rust form looks like this:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-rust",children:"enum Instruction {\n DepositAsset {\n assets: MultiAssetFilter,\n beneficiary: MultiLocation,\n },\n /* snip */\n}\n"})}),"\n",(0,i.jsx)(n.p,{children:"This instruction specifies which assets (asset type and amount), already present in the Holding\nregister, are going to be taken from it and deposited to the specified beneficiary (recipient). It\nis very common for instructions to remove and place assets into the Holding register when\ntransacting between chains."}),"\n",(0,i.jsx)(n.h3,{id:"example-transferasset",children:"Example: TransferAsset"}),"\n",(0,i.jsxs)(n.p,{children:["An example below illustrates how a chain may transfer assets locally, or locally on a remote chain\n(as part of another instruction) using an XCM. In this message, the ",(0,i.jsx)(n.code,{children:"TransferAsset"})," instruction is\ndefined with two parameters: ",(0,i.jsx)(n.code,{children:"assets"}),", which are the assets to be transferred, and the\n",(0,i.jsx)(n.code,{children:"beneficiary"}),", whoever will be the sole beneficiary of these assets. More complex instructions,\nespecially those which perform actions that target a location other than the interpreting consensus\nsystem may make use of XCVM registers."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-rust",children:"enum Instruction {\n TransferAsset {\n assets: MultiAssets,\n beneficiary: MultiLocation,\n }\n /* snip */\n}\n"})}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:["A ",(0,i.jsx)(n.code,{children:"MultiAsset"})," is a general identifier for an asset. It may represent both fungible and\nnon-fungible assets, and in the case of a fungible asset, it represents some defined amount of the\nasset."]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:["A ",(0,i.jsx)(n.code,{children:"MultiLocation"})," is a relative identifier, meaning that it can only be used to define the\nrelative path between two locations, and cannot generally be used to refer to a location\nuniversally."]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"TransferAsset"})," is one of the many instructions that can be contained within an XCM. For more\ninformation, please read ",(0,i.jsx)(n.a,{href:"/docs/learn-xcm-instructions",children:"XCM Instructions in the wiki"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"locations-in-xcm",children:"Locations in XCM"}),"\n",(0,i.jsxs)(n.p,{children:['XCM\'s generic nature involves specifying a wide array of "locations", or any body that is governed\nby consensus (parachains, solochains, smart contracts, accounts, etc). These are relatively abstract\nnotions that point to ',(0,i.jsx)(n.em,{children:"where"})," but also ",(0,i.jsx)(n.em,{children:"to who"})," a particular action may affect. The ",(0,i.jsx)(n.code,{children:"MulitLocation"}),"\ntype is what XCM uses to define these locations."]}),"\n",(0,i.jsxs)(n.p,{children:["A ",(0,i.jsx)(n.code,{children:"MultiLocation"})," is a relative identifier that defines a ",(0,i.jsx)(n.strong,{children:"relative"})," path into some state-bearing\nconsensus system."]}),"\n",(0,i.jsxs)(n.p,{children:["It is used to define the relative path between two locations, and cannot generally be used to refer\nto a location universally. It is very much akin to how a ",(0,i.jsx)(n.strong,{children:"relative"})," filesystem path works and is\ndependent on which consensus system the location expression is being evaluated."]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"XCM MultiLocation",src:t(84627).A+"",width:"3612",height:"772"})}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"MultiLocation"})," has two primary fields:"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["A series of paths, called ",(0,i.jsx)(n.code,{children:"Junctions"}),', which define an interior portion of state to descend into\nit (sometimes called a "sub-consensus" system, such as a smart contract or pallet). An interior\nlocation may also be used to refer to a Junction, used in the context of "a parachain is an\n',(0,i.jsx)(n.strong,{children:"interior location"})," of the relay chain\", or how a UTXO is interior to Bitcoin's consensus."]}),"\n",(0,i.jsxs)(n.li,{children:["The number of parent junctions at the beginning of a ",(0,i.jsx)(n.code,{children:"MultiLocation"}),"'s formation - in other words,\nthe number of parent consensus systems above it."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["There are a number of various ",(0,i.jsx)(n.code,{children:"Junction"})," variants that may be used to describe a particular\nlocation - whether it's a 32 byte account, a Substrate pallet, or a pluralistic body."]}),"\n",(0,i.jsx)(n.h3,{id:"multilocation-scenario-example",children:"MultiLocation Scenario Example"}),"\n",(0,i.jsxs)(n.p,{children:["In this scenario, assume an XCM is to be sent from our parachain to the Asset Hub\n(",(0,i.jsx)(n.code,{children:"Parachain 1000"}),"). This XCM references an account on the Asset Hub. As a general path, the\n",(0,i.jsx)(n.code,{children:"MultiLocation"})," would look like this:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"../Parachain(1000)/AccountId32()\n"})}),"\n",(0,i.jsx)(n.p,{children:"Or, as a Rust enum:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-rust",children:"MultiLocation {\n parents: 1,\n interior: X2(Parachain(1000), .into())\n}\n"})}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:["In the first field, ",(0,i.jsx)(n.code,{children:"parents"}),", there is a parent of ",(0,i.jsx)(n.code,{children:"1"}),". This is because our parachain has the\nrelay chain as a parent - in other words, it will go ",(0,i.jsx)(n.strong,{children:"up"})," by one consensus system to the relay\nchain. This is also illustrated by the ",(0,i.jsx)(n.code,{children:"../"}),' of the "file path" representation.']}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:["The second field, ",(0,i.jsx)(n.code,{children:"interior"}),", defines where to go after the relay chain. In this case, from the\nrelay chain this message will go to the Asset Hub (",(0,i.jsx)(n.code,{children:"Parachain 1000"}),"), then reference the account\n(",(0,i.jsx)(n.code,{children:"some_account_id"}),") located within."]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"Keep in mind that this location is specific to this interaction. The identities may need to change\nif this location was defined on another consensus system, such as Kusama. On other consensus\nsystems, such as Ethereum, it won't be able to interpret it."}),"\n",(0,i.jsx)(n.h3,{id:"universallocation-in-xcm",children:"UniversalLocation in XCM"}),"\n",(0,i.jsxs)(n.p,{children:["A ",(0,i.jsx)(n.code,{children:"UniversalLocation"})," refers to any global consensus system. A global consensus system is an entity\nthat provides its top-level consensus through some non-derivative consensus algorithm that can exist\nwithout reference to any other singleton data system. Such global consensus systems include Polkadot\n(or other relay chains), Bitcoin, or Ethereum. It provides a point of reference for overarching\nconsensus systems."]}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.code,{children:"GlobalConsensus"})," junction refers to a global consensus system and takes a ",(0,i.jsx)(n.code,{children:"NetworkId"})," that\nspecifies a particular remote network. A ",(0,i.jsx)(n.code,{children:"UniversalLocation"})," allows overarching consensus systems to\ncommunicate using this junction. Sub-consensus systems (i.e., a parachain on Polkadot) may refer to\nother ",(0,i.jsx)(n.em,{children:"remote"})," sub-consensus systems (i.e., a parachain on Kusama) using a relative path defined via\na ",(0,i.jsx)(n.code,{children:"MultiLocation"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"simulating-xcvm-using-the-xcm-simulator",children:"Simulating XCVM using the xcm-simulator"}),"\n",(0,i.jsxs)(n.p,{children:["Within the Polkadot repository exists the\n",(0,i.jsx)(n.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/polkadot/xcm/xcm-simulator",children:(0,i.jsx)(n.code,{children:"xcm-simulator"})}),",\nwhich allows developers to experiment with building, executing, and simulating various XCM use\nscenarios."]})]})}function d(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(h,{...e})}):h(e)}},84627:(e,n,t)=>{t.d(n,{A:()=>s});const s=t.p+"assets/images/multilocation-faf4a11faddbbf2111e7fa25e08f7758.png"},28453:(e,n,t)=>{t.d(n,{R:()=>a,x:()=>r});var s=t(96540);const i={},o=s.createContext(i);function a(e){const n=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:a(e.components),s.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/feea648c.cbaa6d74.js b/assets/js/feea648c.cbaa6d74.js deleted file mode 100644 index cf75651ae2f5..000000000000 --- a/assets/js/feea648c.cbaa6d74.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9175],{35543:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>a,default:()=>d,frontMatter:()=>o,metadata:()=>r,toc:()=>l});var s=t(74848),i=t(28453);const o={id:"learn-xcvm",title:"XCM Virtual Machine (XCVM) & XCM Executor",sidebar_label:"XCM Virtual Machine (XCVM)",description:"Design of the XCM Executor and Mechanics of the XCM Virtual Machine.",keywords:["cross-consensus","XCM","XCMP","interoperability","communication"],slug:"../learn-xcvm"},a=void 0,r={id:"learn/learn-xcvm",title:"XCM Virtual Machine (XCVM) & XCM Executor",description:"Design of the XCM Executor and Mechanics of the XCM Virtual Machine.",source:"@site/../docs/learn/learn-xcvm.md",sourceDirName:"learn",slug:"/learn-xcvm",permalink:"/docs/learn-xcvm",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-xcvm.md",tags:[],version:"current",lastUpdatedBy:"github-actions[bot]",lastUpdatedAt:1712558849e3,frontMatter:{id:"learn-xcvm",title:"XCM Virtual Machine (XCVM) & XCM Executor",sidebar_label:"XCM Virtual Machine (XCVM)",description:"Design of the XCM Executor and Mechanics of the XCM Virtual Machine.",keywords:["cross-consensus","XCM","XCMP","interoperability","communication"],slug:"../learn-xcvm"},sidebar:"docs",previous:{title:"XCM Transport",permalink:"/docs/learn-xcm-transport"},next:{title:"XCM Instructions",permalink:"/docs/learn-xcm-instructions"}},c={},l=[{value:"XCMs are XCVM Programs",id:"xcms-are-xcvm-programs",level:2},{value:"XCM Executor & Configuration",id:"xcm-executor--configuration",level:2},{value:"Cross Consensus Message (XCM) Anatomy & Flow",id:"cross-consensus-message-xcm-anatomy--flow",level:2},{value:"Example Register: The Holding Register",id:"example-register-the-holding-register",level:3},{value:"Example: TransferAsset",id:"example-transferasset",level:3},{value:"Locations in XCM",id:"locations-in-xcm",level:2},{value:"MultiLocation Scenario Example",id:"multilocation-scenario-example",level:3},{value:"UniversalLocation in XCM",id:"universallocation-in-xcm",level:3},{value:"Simulating XCVM using the xcm-simulator",id:"simulating-xcvm-using-the-xcm-simulator",level:2}];function h(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.admonition,{title:"XCM Documentation",type:"info",children:(0,s.jsxs)(n.p,{children:["For a more practical approach to utilizing XCM, refer to the ",(0,s.jsx)(n.a,{href:"./learn/xcm",children:"XCM Docs"}),". Please keep in\nmind that XCM is under active development."]})}),"\n",(0,s.jsxs)(n.p,{children:["At the core of XCM lies the Cross-Consensus Virtual Machine (XCVM). A \u201cmessage\u201d in XCM is an XCVM\nprogram, referred to as an ",(0,s.jsx)(n.strong,{children:'"XCM"'})," or ",(0,s.jsx)(n.strong,{children:'"XCMs"'})," for multiple messages. The XCVM is a\nregister-based state machine. The state is tracked in domain-specific registers that hold\ninformation that is used and mutated along the execution of a particular message. Most of the XCM\nformat comprises these registers and the instructions used to compose XCVM programs."]}),"\n",(0,s.jsx)(n.p,{children:"The XCVM is an ultra-high-level non-Turing-complete computer whose instructions are designed to be\nroughly at the same level as transactions in terms of definition. Messages are one or more XCM\ninstructions executed in order by the XCVM. An XCM is executed until it either runs to the end or\nhits an error, at which point it finishes up and halts."}),"\n",(0,s.jsxs)(n.p,{children:["The first implementation of the XCVM is the\n",(0,s.jsx)(n.a,{href:"https://github.com/paritytech/polkadot/tree/26b0c4f6273190f4538b24939a56b6a0b51a344c/xcm/xcm-executor",children:(0,s.jsx)(n.code,{children:"xcm-executor"})}),".\nIt follows the XCVM specification provided by Parity. It's engineered to be extendable, providing\nmaximum customizability when configuring XCM. Because the ",(0,s.jsx)(n.code,{children:"xcm-executor"})," is just an implementation\nof XCVM, it's entirely possible to create another implementation if desired."]}),"\n",(0,s.jsx)(n.h2,{id:"xcms-are-xcvm-programs",children:"XCMs are XCVM Programs"}),"\n",(0,s.jsxs)(n.p,{children:["A cross consensus message (XCM) is just a program that runs on the ",(0,s.jsx)(n.code,{children:"XCVM"}),": in other words, one or\nmore XCM instructions that are executed by an XCVM implementation, such as the ",(0,s.jsx)(n.code,{children:"xcm-executor"}),". To\nlearn more about the XCVM and the XCM format, see the latest\n",(0,s.jsx)(n.a,{href:"https://medium.com/polkadot-network/xcm-part-iii-execution-and-error-management-ceb8155dd166",children:"blog post on XCM"}),"\nby Dr. Gavin Wood."]}),"\n",(0,s.jsx)(n.p,{children:"XCM instructions might change a register, the state of the consensus system, or both. Depending on\nthe program's goal, whether it is to teleport assets from one chain to another or call a smart\ncontract on another chain, XCMs usually require changes to the registers before any changes to the\nconsensus system can be made."}),"\n",(0,s.jsx)(n.h2,{id:"xcm-executor--configuration",children:"XCM Executor & Configuration"}),"\n",(0,s.jsxs)(n.p,{children:["The XCM Executor's implementation centers around a core piece: the XCM configuration. Each instance\nof the Executor must have a valid configuration, which specifies a multitude of options on how a\nchain may treat incoming messages via\n",(0,s.jsx)(n.a,{href:"https://github.com/paritytech/polkadot/blob/26b0c4f6273190f4538b24939a56b6a0b51a344c/xcm/xcm-executor/src/config.rs#L52",children:"Barriers"}),",\ncalculate weight for a message via the\n",(0,s.jsx)(n.a,{href:"https://github.com/paritytech/polkadot/blob/26b0c4f6273190f4538b24939a56b6a0b51a344c/xcm/xcm-executor/src/config.rs#L55",children:"Weigher"}),",\nhow much weight to purchase via the\n",(0,s.jsx)(n.a,{href:"https://github.com/paritytech/polkadot/blob/26b0c4f6273190f4538b24939a56b6a0b51a344c/xcm/xcm-executor/src/config.rs#L58",children:"Trader"}),",\n",(0,s.jsx)(n.a,{href:"https://github.com/paritytech/polkadot/blob/26b0c4f6273190f4538b24939a56b6a0b51a344c/xcm/xcm-executor/src/config.rs#L89",children:"configure fees"}),",\nhow to\n",(0,s.jsx)(n.a,{href:"https://github.com/paritytech/polkadot/blob/26b0c4f6273190f4538b24939a56b6a0b51a344c/xcm/xcm-executor/src/config.rs#L40",children:"convert origins"}),",\nand more."]}),"\n",(0,s.jsx)(n.h2,{id:"cross-consensus-message-xcm-anatomy--flow",children:"Cross Consensus Message (XCM) Anatomy & Flow"}),"\n",(0,s.jsx)(n.p,{children:"An XCM is made up of a list of instructions that are executed in order. There are four different\nkinds of XCM instructions:"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Instruction"})," - Results in a state change in the local consensus system or some state change."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Trusted Indication"})," - Tells the XCVM, or the Executor, that some action has been done before\nalready - meaning, this action is now trusted and can be acted on, i.e., in a teleport scenario."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Information"})," - Provides additional information about a particular origin, usually the result\nof a query, i.e., a ",(0,s.jsx)(n.code,{children:"QueryResponse"})," instruction."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"System Notification"})," - Typically used in the context of when an HRMP channel is being opened,\nclosed, or accepted."]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"Typically, an XCM takes the following path through the XCVM:"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsx)(n.li,{children:"Instructions within an XCM are read one-by-one by the XCVM. An XCM may contain one or more\ninstructions."}),"\n",(0,s.jsxs)(n.li,{children:["The instruction is executed. This means that the current values of the ",(0,s.jsx)(n.em,{children:"XCVM registers"}),", the\n",(0,s.jsx)(n.em,{children:"instruction type"}),", and the ",(0,s.jsx)(n.em,{children:"instruction operands"})," are all used to execute some operation, which\nmight result in some registers changing their value, or in an error being thrown, which would\nhalt execution."]}),"\n",(0,s.jsx)(n.li,{children:"Each subsequent instruction within the XCM is read until the end of the message has been\nreached."}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"example-register-the-holding-register",children:"Example Register: The Holding Register"}),"\n",(0,s.jsxs)(n.p,{children:["There are many instructions that depend on the ",(0,s.jsx)(n.em,{children:"Holding register"}),". The ",(0,s.jsx)(n.em,{children:"Holding register"})," is an XCVM\nregister that provides a place for any assets that are in an intermediary state to be held until\nthey are taken out of the Holding register. It requires an instruction to place assets within it and\nanother to withdraw them. The simplest example of this occurring is the ",(0,s.jsx)(n.code,{children:"DepositAsset"})," instruction,\nwhich in its Rust form looks like this:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-rust",children:"enum Instruction {\n DepositAsset {\n assets: MultiAssetFilter,\n beneficiary: MultiLocation,\n },\n /* snip */\n}\n"})}),"\n",(0,s.jsx)(n.p,{children:"This instruction specifies which assets (asset type and amount), already present in the Holding\nregister, are going to be taken from it and deposited to the specified beneficiary (recipient). It\nis very common for instructions to remove and place assets into the Holding register when\ntransacting between chains."}),"\n",(0,s.jsx)(n.h3,{id:"example-transferasset",children:"Example: TransferAsset"}),"\n",(0,s.jsxs)(n.p,{children:["An example below illustrates how a chain may transfer assets locally, or locally on a remote chain\n(as part of another instruction) using an XCM. In this message, the ",(0,s.jsx)(n.code,{children:"TransferAsset"})," instruction is\ndefined with two parameters: ",(0,s.jsx)(n.code,{children:"assets"}),", which are the assets to be transferred, and the\n",(0,s.jsx)(n.code,{children:"beneficiary"}),", whoever will be the sole beneficiary of these assets. More complex instructions,\nespecially those which perform actions that target a location other than the interpreting consensus\nsystem may make use of XCVM registers."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-rust",children:"enum Instruction {\n TransferAsset {\n assets: MultiAssets,\n beneficiary: MultiLocation,\n }\n /* snip */\n}\n"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["A ",(0,s.jsx)(n.code,{children:"MultiAsset"})," is a general identifier for an asset. It may represent both fungible and\nnon-fungible assets, and in the case of a fungible asset, it represents some defined amount of the\nasset."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["A ",(0,s.jsx)(n.code,{children:"MultiLocation"})," is a relative identifier, meaning that it can only be used to define the\nrelative path between two locations, and cannot generally be used to refer to a location\nuniversally."]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"TransferAsset"})," is one of the many instructions that can be contained within an XCM. For more\ninformation, please read ",(0,s.jsx)(n.a,{href:"/docs/learn-xcm-instructions",children:"XCM Instructions in the wiki"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"locations-in-xcm",children:"Locations in XCM"}),"\n",(0,s.jsxs)(n.p,{children:['XCM\'s generic nature involves specifying a wide array of "locations", or any body that is governed\nby consensus (parachains, solochains, smart contracts, accounts, etc). These are relatively abstract\nnotions that point to ',(0,s.jsx)(n.em,{children:"where"})," but also ",(0,s.jsx)(n.em,{children:"to who"})," a particular action may affect. The ",(0,s.jsx)(n.code,{children:"MulitLocation"}),"\ntype is what XCM uses to define these locations."]}),"\n",(0,s.jsxs)(n.p,{children:["A ",(0,s.jsx)(n.code,{children:"MultiLocation"})," is a relative identifier that defines a ",(0,s.jsx)(n.strong,{children:"relative"})," path into some state-bearing\nconsensus system."]}),"\n",(0,s.jsxs)(n.p,{children:["It is used to define the relative path between two locations, and cannot generally be used to refer\nto a location universally. It is very much akin to how a ",(0,s.jsx)(n.strong,{children:"relative"})," filesystem path works and is\ndependent on which consensus system the location expression is being evaluated."]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"XCM MultiLocation",src:t(84627).A+"",width:"3612",height:"772"})}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"MultiLocation"})," has two primary fields:"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["A series of paths, called ",(0,s.jsx)(n.code,{children:"Junctions"}),', which define an interior portion of state to descend into\nit (sometimes called a "sub-consensus" system, such as a smart contract or pallet). An interior\nlocation may also be used to refer to a Junction, used in the context of "a parachain is an\n',(0,s.jsx)(n.strong,{children:"interior location"})," of the relay chain\", or how a UTXO is interior to Bitcoin's consensus."]}),"\n",(0,s.jsxs)(n.li,{children:["The number of parent junctions at the beginning of a ",(0,s.jsx)(n.code,{children:"MultiLocation"}),"'s formation - in other words,\nthe number of parent consensus systems above it."]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["There are a number of various ",(0,s.jsx)(n.code,{children:"Junction"})," variants that may be used to describe a particular\nlocation - whether it's a 32 byte account, a Substrate pallet, or a pluralistic body."]}),"\n",(0,s.jsx)(n.h3,{id:"multilocation-scenario-example",children:"MultiLocation Scenario Example"}),"\n",(0,s.jsxs)(n.p,{children:["In this scenario, assume an XCM is to be sent from our parachain to the Asset Hub\n(",(0,s.jsx)(n.code,{children:"Parachain 1000"}),"). This XCM references an account on the Asset Hub. As a general path, the\n",(0,s.jsx)(n.code,{children:"MultiLocation"})," would look like this:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"../Parachain(1000)/AccountId32()\n"})}),"\n",(0,s.jsx)(n.p,{children:"Or, as a Rust enum:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-rust",children:"MultiLocation {\n parents: 1,\n interior: X2(Parachain(1000), .into())\n}\n"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["In the first field, ",(0,s.jsx)(n.code,{children:"parents"}),", there is a parent of ",(0,s.jsx)(n.code,{children:"1"}),". This is because our parachain has the\nrelay chain as a parent - in other words, it will go ",(0,s.jsx)(n.strong,{children:"up"})," by one consensus system to the relay\nchain. This is also illustrated by the ",(0,s.jsx)(n.code,{children:"../"}),' of the "file path" representation.']}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["The second field, ",(0,s.jsx)(n.code,{children:"interior"}),", defines where to go after the relay chain. In this case, from the\nrelay chain this message will go to the Asset Hub (",(0,s.jsx)(n.code,{children:"Parachain 1000"}),"), then reference the account\n(",(0,s.jsx)(n.code,{children:"some_account_id"}),") located within."]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"Keep in mind that this location is specific to this interaction. The identities may need to change\nif this location was defined on another consensus system, such as Kusama. On other consensus\nsystems, such as Ethereum, it won't be able to interpret it."}),"\n",(0,s.jsx)(n.h3,{id:"universallocation-in-xcm",children:"UniversalLocation in XCM"}),"\n",(0,s.jsxs)(n.p,{children:["A ",(0,s.jsx)(n.code,{children:"UniversalLocation"})," refers to any global consensus system. A global consensus system is an entity\nthat provides its top-level consensus through some non-derivative consensus algorithm that can exist\nwithout reference to any other singleton data system. Such global consensus systems include Polkadot\n(or other relay chains), Bitcoin, or Ethereum. It provides a point of reference for overarching\nconsensus systems."]}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"GlobalConsensus"})," junction refers to a global consensus system and takes a ",(0,s.jsx)(n.code,{children:"NetworkId"})," that\nspecifies a particular remote network. A ",(0,s.jsx)(n.code,{children:"UniversalLocation"})," allows overarching consensus systems to\ncommunicate using this junction. Sub-consensus systems (i.e., a parachain on Polkadot) may refer to\nother ",(0,s.jsx)(n.em,{children:"remote"})," sub-consensus systems (i.e., a parachain on Kusama) using a relative path defined via\na ",(0,s.jsx)(n.code,{children:"MultiLocation"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"simulating-xcvm-using-the-xcm-simulator",children:"Simulating XCVM using the xcm-simulator"}),"\n",(0,s.jsxs)(n.p,{children:["Within the Polkadot repository exists the\n",(0,s.jsx)(n.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/polkadot/xcm/xcm-simulator",children:(0,s.jsx)(n.code,{children:"xcm-simulator"})}),",\nwhich allows developers to experiment with building, executing, and simulating various XCM use\nscenarios."]})]})}function d(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}},84627:(e,n,t)=>{t.d(n,{A:()=>s});const s=t.p+"assets/images/multilocation-faf4a11faddbbf2111e7fa25e08f7758.png"},28453:(e,n,t)=>{t.d(n,{R:()=>a,x:()=>r});var s=t(96540);const i={},o=s.createContext(i);function a(e){const n=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:a(e.components),s.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/ff6596ea.08656832.js b/assets/js/ff6596ea.08656832.js new file mode 100644 index 000000000000..3c1a80d2018a --- /dev/null +++ b/assets/js/ff6596ea.08656832.js @@ -0,0 +1 @@ +(self.webpackChunk=self.webpackChunk||[]).push([[3507],{45909:(e,n,t)=>{"use strict";t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>r,default:()=>c,frontMatter:()=>s,metadata:()=>a,toc:()=>d});const a=JSON.parse('{"id":"learn/learn-nominator","title":"Nominator","description":"Role of Nominators in the Polkadot Ecosystem.","source":"@site/../docs/learn/learn-nominator.md","sourceDirName":"learn","slug":"/learn-nominator","permalink":"/docs/learn-nominator","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-nominator.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1726760224000,"frontMatter":{"id":"learn-nominator","title":"Nominator","sidebar_label":"Nominator","description":"Role of Nominators in the Polkadot Ecosystem.","keyword":["nominate","nominator","stake","staking"],"slug":"../learn-nominator"},"sidebar":"docs","previous":{"title":"Collator","permalink":"/docs/learn-collator"},"next":{"title":"Validator","permalink":"/docs/learn-validator"}}');var o=t(74848),i=t(28453);t(47379);const s={id:"learn-nominator",title:"Nominator",sidebar_label:"Nominator",description:"Role of Nominators in the Polkadot Ecosystem.",keyword:["nominate","nominator","stake","staking"],slug:"../learn-nominator"},r=void 0,l={},d=[{value:"Who are Nominators?",id:"who-are-nominators",level:2},{value:"Why Nominate?",id:"why-nominate",level:2},{value:"Setting-up Accounts",id:"setting-up-accounts",level:2},{value:"Stash & Staking Proxy",id:"stash--staking-proxy",level:3},{value:"Rewards Payout Account",id:"rewards-payout-account",level:3},{value:"Nominating with the Polkadot-JS UI",id:"nominating-with-the-polkadot-js-ui",level:2},{value:"Targets Page",id:"targets-page",level:3},{value:"Bags-list",id:"bags-list",level:3},{value:"Validator Stats",id:"validator-stats",level:3},{value:"Nominating with the Staking Dashboard",id:"nominating-with-the-staking-dashboard",level:2},{value:"Staking Election Stages",id:"staking-election-stages",level:2},{value:"The Election Solution Set",id:"the-election-solution-set",level:3},{value:"Receiving Rewards",id:"receiving-rewards",level:2},{value:"Good Nominator Practices",id:"good-nominator-practices",level:2},{value:"Required Minimum Stake",id:"required-minimum-stake",level:3},{value:"Active vs. Inactive Nomination",id:"active-vs-inactive-nomination",level:3},{value:"Minimum Active Nomination to Receive Staking Rewards",id:"minimum-active-nomination-to-receive-staking-rewards",level:3},{value:"Guides",id:"guides",level:2}];function h(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,i.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(n.admonition,{title:"New to Staking?",type:"tip",children:[(0,o.jsxs)(n.p,{children:["Start your staking journey or explore more information about staking on\n",(0,o.jsx)(n.a,{href:"https://polkadot.network/staking/",children:"Polkadot's Home Page"}),". You can learn how staking works by\nreading ",(0,o.jsx)(n.a,{href:"/docs/learn-staking",children:"this dedicated page"}),"."]}),(0,o.jsxs)(n.p,{children:["Discover the new ",(0,o.jsx)(n.a,{href:"https://staking.polkadot.cloud/#/overview",children:(0,o.jsx)(n.strong,{children:"Staking Dashboard"})})," that makes\nstaking much easier and check this\n",(0,o.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000182104",children:"extensive article list"})," to\nhelp you get started."]}),(0,o.jsxs)(n.p,{children:["You can now\n",(0,o.jsx)(n.a,{href:"https://polkadot.network/blog/nomination-pools-are-live-stake-natively-with-just-1-dot/",children:"stake natively with just 1 DOT and earn staking rewards"}),"."]})]}),"\n",(0,o.jsx)(n.admonition,{title:"Stake through Nomination Pools",type:"info",children:(0,o.jsxs)(n.p,{children:["The minimum amount required to become an active nominator (i.e. the\n",(0,o.jsx)(n.a,{href:"/docs/chain-state-values#minimum-active-bond",children:"minimum active bond"}),") and earn rewards may\nchange from era to era. If you have less tokens than the minimum active nomination and still want to\nparticipate in staking, you can join the nomination pools with a\n",(0,o.jsx)(n.a,{href:"/docs/chain-state-values#minimum-bond-to-participate-in-staking",children:"smaller amount of tokens"}),".\nFor additional information, see\n",(0,o.jsx)(n.a,{href:"https://polkadot.network/blog/nomination-pools-are-live-stake-natively-with-just-1-dot/",children:"this blog post"}),".\nCheck the wiki doc on ",(0,o.jsx)(n.a,{href:"/docs/learn-nomination-pools",children:"nomination pools"})," for more information."]})}),"\n",(0,o.jsxs)(n.p,{children:["If you landed on this page, you decided to understand how you can be a good nominator. Note, this\npage is not for ",(0,o.jsx)(n.a,{href:"/docs/learn-nomination-pools",children:"nomination pool"})," members, although pool members might\ngain essential knowledge about how to choose nomination pools."]}),"\n",(0,o.jsxs)(n.p,{children:["The information provided on this page is complementary to that on the\n",(0,o.jsx)(n.a,{href:"/docs/learn-staking",children:(0,o.jsx)(n.strong,{children:"Staking Page"})})," and ",(0,o.jsx)(n.a,{href:"/docs/learn-staking-advanced",children:(0,o.jsx)(n.strong,{children:"Advanced Staking Page"})}),".\nMake sure you read those pages as well before nominating."]}),"\n",(0,o.jsx)(n.h2,{id:"who-are-nominators",children:"Who are Nominators?"}),"\n",(0,o.jsx)(n.p,{children:"Nominators are one type of staking participant. They appoint their stake to the validators, the\nsecond type of participant. By appointing their stake, they can elect the active set of validators\nand share in the rewards that are paid out."}),"\n",(0,o.jsxs)(n.p,{children:["While the ",(0,o.jsx)(n.a,{href:"/docs/maintain-guides-how-to-validate-polkadot",children:"validators"})," are active\nparticipants in the network that engage in the block production and finality mechanisms, nominators\ntake a slightly more passive role. Being a nominator does not require running a node of your own or\nworrying about online uptime. However, a good nominator performs due diligence on the validators\nthat they elect. When looking for validators to nominate, a nominator should pay attention to their\nown reward percentage for nominating a specific validator - as well as the risk that they bear of\nbeing ",(0,o.jsx)(n.a,{href:"/docs/learn-offenses",children:"slashed"})," if the validator gets slashed."]}),"\n",(0,o.jsx)(n.h2,{id:"why-nominate",children:"Why Nominate?"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"You become a network participant, a group of diverse professionals and enthusiasts around the\nworld aspiring to build and foster the next-gen Internet, Web3: a decentralized, privacy-focused,\nand trustless internet."}),"\n",(0,o.jsxs)(n.li,{children:["You are an essential piece of the puzzle, keeping the network secure. The bonded balance can be\nused to vote in ",(0,o.jsx)(n.a,{href:"/docs/learn-polkadot-opengov",children:"Polkadot OpenGov"})," and shape the network's future\ndirection."]}),"\n",(0,o.jsxs)(n.li,{children:["You will start to understand how Polkadot works at a technical-level. When you feel comfortable\nwith your nomination skills and knowledge, you can open your\n",(0,o.jsx)(n.a,{href:"/docs/learn-nomination-pools",children:"nomination pool"}),", help others secure the network and earn rewards,\nand build your reputation as a trusted nomination pool operator. If you like to be more involved,\nthe next step is to become a ",(0,o.jsx)(n.a,{href:"/docs/learn-validator",children:"validator"}),"."]}),"\n",(0,o.jsxs)(n.li,{children:["By getting ",(0,o.jsx)(n.a,{href:"/docs/learn-staking",children:"staking"})," rewards you keep up with or (likely) stay ahead of\nnetwork inflation."]}),"\n"]}),"\n",(0,o.jsx)(n.p,{children:"Nominators secure the relay chain by staking native tokens (DOT on Polkadot or KSM on Kusama) and\nnominating validators. You may have an account with DOT and want to earn fresh DOT. You could do so\nas a validator, which requires experience setting up a node and running and maintaining it 24/7."}),"\n",(0,o.jsxs)(n.p,{children:["On Polkadot, you can also earn DOT by nominating one or more validators. Doing so makes you a\nnominator for the validator(s) you chose. Pick your validators carefully -\n",(0,o.jsx)(n.a,{href:"/docs/learn-offenses",children:"if they do not behave properly, they will get slashed, and you will lose some DOT"}),".\nHowever, if they follow the network rules, you can share the staking rewards they generate."]}),"\n",(0,o.jsxs)(n.p,{children:["While your tokens are staked for nominations, they are 'locked' (bonded). You can\n",(0,o.jsx)(n.a,{href:"/docs/learn-guides-nominator#stop-nominating",children:"stop nominating at any time"}),", but remember that the\naction is effective in the next era and does not automatically unbond your funds. Unbonding is a\nseparate action, and it takes effect after the\n",(0,o.jsx)(n.a,{href:"/docs/chain-state-values#unbonding-duration",children:"unbonding period"}),". A staking lock will be\nvisible on the Polkadot-JS UI during the unbonding period, and after it, the staking lock can be\nunlocked, and the bonded funds become free balance you can transfer."]}),"\n",(0,o.jsx)(n.admonition,{title:"Fast Unstaking",type:"info",children:(0,o.jsx)(n.p,{children:"If you accidentally bonded your tokens or your bonded tokens never backed any active validator, you\ncan now unbond them immediately."})}),"\n",(0,o.jsxs)(n.p,{children:["If your bonded balance did not back any validators in the last 28 days on Polkadot (7 days on\nKusama), you are eligible to perform fast unstaking. The\n",(0,o.jsx)(n.a,{href:"https://staking.polkadot.cloud/#/overview",children:"staking dashboard"})," will automatically check if you\nqualify. For more information, visit the\n",(0,o.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000169433-can-i-transfer-dot-without-unbonding-and-waiting-28-days-",children:'"Fast Unstake" section in this support article'}),"."]}),"\n",(0,o.jsx)(n.h2,{id:"setting-up-accounts",children:"Setting-up Accounts"}),"\n",(0,o.jsx)(n.h3,{id:"stash--staking-proxy",children:"Stash & Staking Proxy"}),"\n",(0,o.jsxs)(n.p,{children:["Nominators are recommended to set up separate stash and staking proxy accounts. Explanation and the\nreasoning for generating distinct accounts for this purpose is elaborated in the\n",(0,o.jsx)(n.a,{href:"/docs/learn-cryptography#keys",children:"keys section"}),"."]}),"\n",(0,o.jsxs)(n.p,{children:["You can generate your stash and staking proxy account via any of the recommended methods, which are\ndetailed on the ",(0,o.jsx)(n.a,{href:"/docs/learn-accounts#account-generation",children:"account generation"})," page. The first\nthing you need to do before becoming a nominator is to make sure you have a\n",(0,o.jsx)(n.a,{href:"./learn-staking.md/#stash-account-and-staking-proxy",children:(0,o.jsx)(n.strong,{children:"stash account"})}),' where you can transfer\nfunds you want to use for staking. For these accounts, it is recommended to use a "cold wallet"\nsolution such as ',(0,o.jsx)(n.a,{href:"/docs/ledger",children:"Ledger"})," or ",(0,o.jsx)(n.a,{href:"/docs/polkadot-vault",children:"Polkadot Vault"}),"."]}),"\n",(0,o.jsxs)(n.p,{children:["After setting up the stash account, it is recommended to have a\n",(0,o.jsx)(n.a,{href:"./learn-staking-advanced.md/#staking-proxies",children:(0,o.jsx)(n.strong,{children:"staking proxy"})}),". Although you can be a nominator\nwith just a stash account, having a staking proxy is good practice for security reasons."]}),"\n",(0,o.jsx)(n.p,{children:"A staking proxy of the stash will be able to sign for all staking-related transactions as well. The\nstash will be fully isolated (except if the user decides to change the staking proxy of the stash or\nto attach different proxies to the stash)."}),"\n",(0,o.jsx)(n.h3,{id:"rewards-payout-account",children:"Rewards Payout Account"}),"\n",(0,o.jsx)(n.p,{children:"As a nominator, you will be asked to choose an account where rewards will be paid. You can select\none of the following options:"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"back to staking: rewards are compounded to the bonded amount."}),"\n",(0,o.jsx)(n.li,{children:"to stash: rewards are sent to the stash account as a free balance."}),"\n",(0,o.jsx)(n.li,{children:"to another account: rewards are sent to a user-defined account (not stash)."}),"\n"]}),"\n",(0,o.jsxs)(n.p,{children:["Starting with runtime version v23 natively included in the client version\n",(0,o.jsx)(n.a,{href:"https://github.com/paritytech/polkadot/releases/tag/v0.8.23",children:"0.8.23"}),", payouts can go to any custom\naddress. If you'd like to redirect payments to an account that is neither the staking proxy nor the\nstash account, set one up. Note that setting an exchange address as the recipient of the staking\nrewards is extremely unsafe."]}),"\n",(0,o.jsx)(n.admonition,{type:"info",children:(0,o.jsxs)(n.p,{children:["Being a nominator is made simpler by using the\n",(0,o.jsx)(n.a,{href:"https://staking.polkadot.cloud/#/overview",children:(0,o.jsx)(n.strong,{children:"Staking Dashboard"})})," that will guide you step by step\nthrough specifying rewards destination and bonded amount, and nominating validators (more on this\nbelow). Note that staking proxies are not currently supported on the dashboard."]})}),"\n",(0,o.jsx)(n.h2,{id:"nominating-with-the-polkadot-js-ui",children:"Nominating with the Polkadot-JS UI"}),"\n",(0,o.jsx)(n.h3,{id:"targets-page",children:"Targets Page"}),"\n",(0,o.jsxs)(n.p,{children:["There are many factors to consider when deciding which of your nominations. One helpful tool to\nchoose validators is the Staking ",(0,o.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/staking/targets",children:"Targets"})," table in\nthe Polkadot-JS UI. This allows sorting validators using various metrics. Below are the relevant\nmetrics shown as an example, followed by a brief description of each."]}),"\n",(0,o.jsxs)(n.table,{children:[(0,o.jsx)(n.thead,{children:(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.th,{children:"validator"}),(0,o.jsx)(n.th,{children:"payout"}),(0,o.jsx)(n.th,{children:"nominators"}),(0,o.jsx)(n.th,{children:"comm."}),(0,o.jsx)(n.th,{children:"total stake"}),(0,o.jsx)(n.th,{children:"own stake"}),(0,o.jsx)(n.th,{children:"return"})]})}),(0,o.jsx)(n.tbody,{children:(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:"A"}),(0,o.jsx)(n.td,{children:"recently"}),(0,o.jsxs)(n.td,{children:["1 (",(0,o.jsx)(n.code,{children:"active"}),") 4 (",(0,o.jsx)(n.code,{children:"all"}),")"]}),(0,o.jsx)(n.td,{children:"3%"}),(0,o.jsx)(n.td,{children:"1.6 MDOT"}),(0,o.jsx)(n.td,{children:"8500 DOT"}),(0,o.jsx)(n.td,{children:"17.8%"})]})})]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"payout"}),": How recently the validator made its last reward payout to nominators."]}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"nominators"}),": This column consists of two number values. The ",(0,o.jsx)(n.strong,{children:"active"})," count (left number) is\nthe number of nominators whose stake is baking the validator in the current era. In this case\nValidator A has one active nominator. The total or ",(0,o.jsx)(n.strong,{children:"all"})," count (right number) is the number of\nall nominators who nominated Validator A. This includes the active count and all the other\nnominators whose stake in the current era is baking other validators."]}),"\n",(0,o.jsxs)(n.p,{children:["Every nominator can select up to\n",(0,o.jsx)(n.a,{href:"/docs/chain-state-values#maximum-votes-per-nominator",children:"a maximum number of validators"}),",\nwhich contributes towards maximizing the probability of having the nominator\u2019s stake applied to\nthe validators active set. Nominating too few validators could result in the nominators not\nreceiving their rewards when none of them make it to the active set or when those validators stop\nvalidating. The election algorithm attempts to maximize the overall network stake while minimizing\nthe variance of the active stake across the validators. For additional information on the election\nprocess, check out the research behind\n",(0,o.jsx)(n.a,{href:"https://research.web3.foundation/Polkadot/protocols/NPoS",children:"nominated proof-of-stake"}),"."]}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"comm."}),": Total commission kept by the validator (100% means the validator will keep all rewards\n, and thus nominators will not receive them). A validator's commission is the percentage of the\nvalidator reward taken by the validator before the rewards are split among the nominators. As a\nnominator, you may think that choosing validators with the lowest commission is best. However,\nvalidators must be able to run at break-even to continue operations sustainably. Independent\nvalidators that rely on the commission to cover their server costs help to keep the network\ndecentralized. Some validators, operated by central exchanges, etc., keep 100% of the commission\nto payout their staking service clients and therefore do not provide any rewards to external\nnominators. The commission is just one piece of the puzzle you should consider when picking\nnominating validators."]}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"total stake"}),": The total amount of tokens staked by nominators and the validator (i.e. own\nstake, see below)."]}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"own stake"}),': The amount of tokens the validator has put up as a stake. A higher own stake can be\nconsidered as having more "skin in the game". This can imply increased trustworthiness. However, a\nvalidator not having a large amount of "own stake" is not automatically untrustworthy, as the\nvalidator could nominate from a different address.']}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"return"}),": Average annual yield paid out to nominators (i.e. number of rewards divided by the\nnumber of bonded tokens). Note that nominating those with a higher yield may not guarantee similar\nfuture performance."]}),"\n"]}),"\n"]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"Staking Returns",src:t(75020).A+"",width:"2169",height:"509"})}),"\n",(0,o.jsx)(n.p,{children:"On the Targets page, you can use different filters to select validators with specific traits (where\na trait is a combination of the metrics above). Available filters are:"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"one validator per operator"}),": Do not show groups of validators run by a single operator. It\nshows small operators only who will likely have a higher commission and higher self-stake.\nNominating only small operators might not always guarantee staking rewards, but it helps to keep\nthe network more resilient to attacks."]}),"\n"]}),"\n",(0,o.jsx)(n.admonition,{title:"Validator vs Operator",type:"info",children:(0,o.jsxs)(n.p,{children:["A validator is the node, the physical equipment with installed software that allows to produce new\nblocks and earn rewards. An operator is the entity responsible for setting up, running and\nmaintaining the node. An operator can have multiple validators under different sub-identities. For\nexample, ",(0,o.jsx)(n.code,{children:"ZUG CAPITAL/07"})," is one of the numerous validators belonging to the operator Zug Capital."]})}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"comm. < 20%"}),": Do not show any validators with a commission of 20% or higher."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"recent payouts"}),": Only show validators that have recently caused a\n",(0,o.jsx)(n.a,{href:"/docs/learn-staking-advanced",children:"payout to be issued"}),". Note that anyone can cause a payout to occur; it\ndoes not have to be the operator of a validator."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"currently elected"}),": Only show validators in the active set (i.e., they have been elected to\nproduce blocks in the current era)."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"with an identity"}),": Only show validators that have set an ",(0,o.jsx)(n.a,{href:"/docs/learn-identity",children:"identity"}),". Note\nthat this identity does not have to be verified by a registrar for the validator to appear in the\nlist."]}),"\n"]}),"\n",(0,o.jsx)(n.admonition,{title:"Single Operators with Multiple Validators",type:"warning",children:(0,o.jsxs)(n.p,{children:["Recall that ",(0,o.jsx)(n.a,{href:"/docs/learn-offenses",children:"slashing"}),' is an additive function; the more validators\nequivocating in a given session, the harsher the penalties. Since validators that are controlled by\na single operator are more at risk of a "synchronized" failure, nominating them implies a greater\nrisk of having a large slash of your nominated funds. Generally, it is safer to nominate validators\nwhose behavior is independent of others in many ways (different hardware, geographic location,\nowner, etc.).']})}),"\n",(0,o.jsx)(n.h3,{id:"bags-list",children:"Bags-list"}),"\n",(0,o.jsx)(n.admonition,{type:"info",children:(0,o.jsxs)(n.p,{children:["On Polkadot and Kusama, the instance of the pallet\n",(0,o.jsx)(n.a,{href:"https://paritytech.github.io/substrate/master/pallet_bags_list/",children:"Bags-List"})," is named as\n",(0,o.jsx)(n.code,{children:"voterList"}),"."]})}),"\n",(0,o.jsxs)(n.p,{children:["Nominating accounts are placed in a semi-sorted list called bags-list. This sorting functionality is\nextremely important for the long-term improvements of the staking/election system. Bags-list allows\nan unlimited number nominators to set their intention to nominate, of which only a portion of it\n(currently 22500) is considered for ",(0,o.jsx)(n.a,{href:"#staking-election-stages",children:"electing set"})," that eventually\ndetermines the active validators."]}),"\n",(0,o.jsxs)(n.p,{children:["The nominator accounts in a bag are sorted based on their insertion order, not by their nomination\nstake. The ",(0,o.jsx)(n.code,{children:"voterList.putInFrontOf"})," extrinsic can be issued to move up in the bag, which might be\nvery useful for the accounts in the last bag eligible for receiving staking rewards. Balance changes\ndue to staking rewards or slashing do not automatically rebag the account. Whenever applicable,\nPolkadot JS Apps UI prompts the nominator account to rebag or move up by calling the\n",(0,o.jsx)(n.code,{children:"voterList.rebag"})," extrinsic."]}),"\n",(0,o.jsx)(n.p,{children:"For guidelines about how to rebag or move your account within a bag, see the followings:"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:['The "Bags List" Section on\n',(0,o.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181018-i-have-more-than-the-minimum-bonded-but-i-m-not-getting-rewards",children:"this Support Page"}),"."]}),"\n",(0,o.jsxs)(n.li,{children:["The ",(0,o.jsx)(n.a,{href:"/docs/learn-staking-advanced#bags-list",children:"Bags List Section"})," in Advanced Staking Concepts."]}),"\n",(0,o.jsxs)(n.li,{children:["The ",(0,o.jsx)(n.a,{href:"https://youtu.be/hIIZRJLrBZA",children:"dedicated technical explainer video"}),"."]}),"\n"]}),"\n",(0,o.jsx)(n.h3,{id:"validator-stats",children:"Validator Stats"}),"\n",(0,o.jsxs)(n.p,{children:["Nominators can query ",(0,o.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/staking/query/",children:"validator histories"})," to see\nstatistics such as era points, elected stake, rewards and slashes, and commission. It is good\npractice to do comprehensive research on validator candidates. This could include (but should not be\nlimited to) checking the validators' ",(0,o.jsx)(n.a,{href:"/docs/learn-identity",children:"identity"})," (if they have set one) and going\nover the validators' websites to see who they are, what kind of infrastructure setup they are using,\nreputation, the vision behind the validator, and more."]}),"\n",(0,o.jsx)(n.p,{children:"Any problematic behavior must be taken seriously. An example of problematic behavior will be if a\nvalidator is regularly offline. In this case, nominators will get fewer rewards."}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"Validator Stats",src:t(55768).A+"",width:"1900",height:"1204"})}),"\n",(0,o.jsx)(n.h2,{id:"nominating-with-the-staking-dashboard",children:"Nominating with the Staking Dashboard"}),"\n",(0,o.jsx)(n.p,{children:"If you are a beginner, please watch the video below for detailed instructions."}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.a,{href:"https://www.youtube.com/watch?v=F59N3YKYCRs",children:(0,o.jsx)(n.img,{src:"https://img.youtube.com/vi/F59N3YKYCRs/0.jpg",alt:"Staking Tutorial"})})}),"\n",(0,o.jsxs)(n.p,{children:["The ",(0,o.jsx)(n.a,{href:"/docs/staking-dashboard",children:"Polkadot Staking Dashboard"})," allows to choose pre-selected\nlists of validators based on user preference, or to manually select validators similarly as in the\nPolkadot-JS UI."]}),"\n",(0,o.jsx)(n.p,{children:"Pre-selected choices are:"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"Optimal Selection: Selects a mix of majority active and inactive validators."}),"\n",(0,o.jsx)(n.li,{children:"Active Low Commission: Gets a set of active validators with low commission."}),"\n",(0,o.jsx)(n.li,{children:"From Favorites: Gets a set of your favorite validators."}),"\n"]}),"\n",(0,o.jsx)(n.h2,{id:"staking-election-stages",children:"Staking Election Stages"}),"\n",(0,o.jsx)(n.p,{children:'The staking election system has three stages for both validators and nominators, namely "intention",\n"electable/electing", and "active".'}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"intention to nominate:"}),' an account that has stated the intention to nominate; also called\nsimply a "nominator".']}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"electing nominator:"})," a nominator who is selected to be a part of the input to the\n",(0,o.jsx)(n.a,{href:"/docs/learn-phragmen",children:"NPoS election algorithm"}),". This selection is based on stake and is made using\nthe ",(0,o.jsx)(n.a,{href:"/docs/learn-staking-advanced#bags-list",children:"bags-list"}),"."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"active nominator:"})," a nominator who came out of the NPoS election algorithm backing an active\nvalidator. When slashing occurs, all the active nominators backing the validator get slashed."]}),"\n"]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"Nominator Election",src:t(82071).A+"",width:"612",height:"430"})}),"\n",(0,o.jsx)(n.h3,{id:"the-election-solution-set",children:"The Election Solution Set"}),"\n",(0,o.jsx)(n.p,{children:'Determining which validators are in the active set and which nominators are nominating them creates\na very large graph mapping nominators to their respective validators. This "solution set" is\ncomputed off-chain and submitted to the chain, which means it must fit in a single block. If there\nare a large number of nominators, this means that some nominators must be eliminated. Currently,\nnominators are sorted by the amount of DOT staked, and those with more DOT are prioritized. This\nmeans that you may not receive rewards if you are staking with a small amount of DOT. This minimal\namount is dynamic based on the number of validators, nominators, amount nominated, and other\nfactors.'}),"\n",(0,o.jsx)(n.h2,{id:"receiving-rewards",children:"Receiving Rewards"}),"\n",(0,o.jsxs)(n.p,{children:["As long as you have nominated more than one validator candidate, at least one of them got elected,\nand you are nominating with enough stake to get into the solution set, your bonded stake will be\nfully distributed to one or more validators. That being said, you may not receive rewards if you\nnominated very few validator candidates and no one got elected, or your stake is small, and you are\nnot part of the ",(0,o.jsx)(n.a,{href:"/docs/learn-staking-advanced#bags-list",children:"top 22,500 nominators"}),", or the validator you\nare nominating has 100% commission. It is generally wise to choose as many trustworthy validators as\nyou can to reduce the risk of none of your nominated validators being elected."]}),"\n",(0,o.jsxs)(n.admonition,{title:"Not receiving Staking Rewards?",type:"info",children:[(0,o.jsx)(n.p,{children:"To explore the possible reasons for not receiving staking rewards, check out the followings:"}),(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:["The\n",(0,o.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181959-staking-faq-s",children:"Staking FAQ"}),"\non the Support Pages."]}),"\n",(0,o.jsxs)(n.li,{children:["The\n",(0,o.jsx)(n.a,{href:"https://www.reddit.com/r/Polkadot/comments/10kurje/why_am_i_not_receiving_staking_rewards/",children:'"Why am I not receiving staking rewards?"'}),"\nReddit article."]}),"\n",(0,o.jsxs)(n.li,{children:["The ",(0,o.jsx)(n.a,{href:"/docs/learn-staking#why-am-i-not-receiving-rewards",children:'"Why am I not receiving staking rewards?"'}),"\nsection on the Staking Page."]}),"\n"]})]}),"\n",(0,o.jsxs)(n.p,{children:["Rewards are ",(0,o.jsx)(n.em,{children:"lazy"})," - somebody must trigger a payout for a validator for rewards to go to all of the\nvalidator's nominators. Any account can do this, although validator operators often do this as a\nservice to their nominators. See the page on ",(0,o.jsx)(n.a,{href:"/docs/learn-staking-advanced",children:"Simple Payouts"})," for more\ninformation and instructions for claiming rewards."]}),"\n",(0,o.jsxs)(n.admonition,{title:"Explainer videos on Nominating",type:"note",children:[(0,o.jsx)(n.p,{children:"These concepts have been further explained in the following videos:"}),(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"https://www.youtube.com/watch?v=weG_uzdSs1E&list=PLOyWqupZ-WGuAuS00rK-pebTMAOxW41W8&index=4",children:"Why Nominate on Polkadot & Kusama"})}),"\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"https://www.youtube.com/watch?v=K-a4CgVchvU&list=PLOyWqupZ-WGuAuS00rK-pebTMAOxW41W8&index=9",children:"What to Consider when Nominating Validators on Polkadot and Kusama"})}),"\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"https://youtu.be/FCXC0CDhyS4",children:"Nominating/Staking on Polkadot and Kusama"})}),"\n"]})]}),"\n",(0,o.jsx)(n.h2,{id:"good-nominator-practices",children:"Good Nominator Practices"}),"\n",(0,o.jsx)(n.h3,{id:"required-minimum-stake",children:"Required Minimum Stake"}),"\n",(0,o.jsxs)(n.p,{children:["Due to the way the ",(0,o.jsx)(n.a,{href:"/docs/learn-phragmen",children:"Phragmen algorithm"})," generates the solution set and due to the\nfact that the solution set must fit in a single block, a minimum number of DOT will be required to\nnominate with to receive staking rewards can change between the eras."]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"min-intention-threshold:"})," minimum stake to declare the intention to nominate. This parameter\ncan be updated via on-chain governance, and the most recent and up-to-date version can be found on\n",(0,o.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/chainstate",children:"chain state"})," (select ",(0,o.jsx)(n.strong,{children:"state query > staking >\nminimumNominatorBond"}),")"]}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"min-electing:"})," minimum stake among the electing nominators. Since this is almost always the\nsame as \u201cmin-active\u201d, it might not be reported."]}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"min-active:"})," minimum stake among the active nominators. If your stake falls below this dynamic\nthreshold in a given era, you will not receive staking rewards for that era."]}),"\n"]}),"\n"]}),"\n",(0,o.jsxs)(n.p,{children:["Thus, for ",(0,o.jsx)(n.strong,{children:"nominator counters"}),", we have:"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:["count of nominator intentions and\n",(0,o.jsx)(n.a,{href:"/docs/chain-state-values#maximum-number-of-nominators",children:"max possible nominator intentions"})]}),"\n",(0,o.jsx)(n.li,{children:"count of electing nominators, and maximum possible electing nominators (22500 on Polkadot and\n12500 on Kusama)"}),"\n",(0,o.jsx)(n.li,{children:"count of active nominators and maximum possible active nominators (22500 on Polkadot and 12500 on\nKusama)"}),"\n"]}),"\n",(0,o.jsx)(n.h3,{id:"active-vs-inactive-nomination",children:"Active vs. Inactive Nomination"}),"\n",(0,o.jsxs)(n.p,{children:["When you go to the ",(0,o.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/staking/actions",children:"Account actions"})," under staking\npage, you should see your bonded accounts and nomination status. If not, you can follow\n",(0,o.jsx)(n.a,{href:"/docs/learn-guides-nominator#nominate-using-polkadot-js",children:"this"})," guide to configure it first. Your\nnominations will be effective in the next era; eras are roughly 24 hours on Polkadot (6 hours on\nKusama)."]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"Nominations",src:t(67895).A+"",width:"2878",height:"766"})}),"\n",(0,o.jsx)(n.p,{children:'Suppose you have nominated five validator candidates, and three out of five were elected to the\nactive validator set; then you should see two of your nominations as "waiting", and most likely one\nas "active" and the rest as "inactive". Active or inactive nomination means your nominated\nvalidators have been elected to be in the validator set, whereas waiting means they did not get\nelected. Generally, you will only have a single validator have an active nomination, which means\nthat you are directly supporting it with your stake this era and thus potentially receiving staking\nrewards. Inactive nominators were validators elected for this era but which you are not actively\nsupporting. Every era, a new election will take place, and you may be assigned a different active\nnomination from the validators you selected.'}),"\n",(0,o.jsxs)(n.p,{children:["If you are committing a very large stake, you may have more than one active nomination. However, the\nelection algorithm attempts to minimize this situation, and it should not occur often, so you should\nalmost always see only a single active nomination per era. See the\n",(0,o.jsx)(n.a,{href:"/docs/learn-phragmen#optimizations",children:"section on Phragm\xe9n optimization"})," for more details."]}),"\n",(0,o.jsx)(n.h3,{id:"minimum-active-nomination-to-receive-staking-rewards",children:"Minimum Active Nomination to Receive Staking Rewards"}),"\n",(0,o.jsx)(n.admonition,{title:"Minimum DOT required to earn staking rewards",type:"info",children:(0,o.jsxs)(n.p,{children:["The\n",(0,o.jsx)(n.a,{href:"/docs/chain-state-values#minimum-bond-to-participate-in-staking",children:"minimum number of tokens required to submit intent to nominate"}),"\ndiffers from the ",(0,o.jsx)(n.a,{href:"/docs/chain-state-values#minimum-active-bond",children:"minimum active nomination"}),"\nrequired to earn staking rewards."]})}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"Minimum Active Nomination",src:t(2834).A+"",width:"1436",height:"166"})}),"\n",(0,o.jsx)(n.h2,{id:"guides",children:"Guides"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.a,{href:"/docs/learn-guides-nominator#nominate-a-validator",children:"Be a Nominator (Polkadot)"})," - Guide on\nnominating on the Kusama canary network."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.a,{href:"/docs/learn-guides-nominator#stop-nominating",children:"Stop Being a Nominator (all networks)"})," - Guide on\nstopping nominations and withdrawing tokens."]}),"\n"]})]})}function c(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(h,{...e})}):h(e)}},47379:(e,n,t)=>{"use strict";t.d(n,{A:()=>u});var a=t(90675),o=t(10467),i=t(96540),s=t(19588),r=t(2026),l=t(11135);function d(e,n,t){return h.apply(this,arguments)}function h(){return(h=(0,o.A)((0,a.A)().mark((function e(n,t,o){var i,l,d,h,c;return(0,a.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=void 0,l=void 0,e.t0=n,e.next="polkadot"===e.t0?5:"kusama"===e.t0?7:"statemine"===e.t0?9:"statemint"===e.t0?11:"polkadotpeople"===e.t0?13:"kusamapeople"===e.t0?15:17;break;case 5:return i="wss://rpc.polkadot.io",e.abrupt("break",18);case 7:return i="wss://kusama-rpc.polkadot.io/",e.abrupt("break",18);case 9:return i="wss://statemine-rpc.polkadot.io/",e.abrupt("break",18);case 11:return i="wss://statemint-rpc.polkadot.io/",e.abrupt("break",18);case 13:return i="wss://polkadot-people-rpc.polkadot.io/",e.abrupt("break",18);case 15:return i="wss://kusama-people-rpc.polkadot.io/",e.abrupt("break",18);case 17:console.log("Unknown socket url provided, no connection made.");case 18:if(void 0!==i){e.next=22;break}return e.abrupt("return");case 22:return d=new s.E(i),e.next=25,r.G.create({provider:d});case 25:h=e.sent,(c=t.split(".")).forEach((function(e){e in h&&(h=h[e])})),e.t1=c[0],e.next="consts"===e.t1?31:"query"===e.t1?33:38;break;case 31:return l=h.toString(),e.abrupt("break",39);case 33:return e.next=35,h();case 35:return l=(l=e.sent).toString(),e.abrupt("break",39);case 38:console.log("Unknown path prefix ("+c[0]+") in "+t);case 39:return e.abrupt("return",l);case 40:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function c(e,n,t,a){switch(n){case"humanReadable":(0,l.HumanReadable)(e,t,a);break;case"precise":(0,l.Precise)(e,t,a);break;case"blocksToDays":(0,l.BlocksToDays)(e,a);break;case"erasToDays":(0,l.ErasToDays)(e,a,t);break;case"percentage":(0,l.Percentage)(e,a);break;case"permillToPercent":(0,l.PermillToPercent)(e,a);break;case"arrayLength":(0,l.ArrayLength)(e,a);break;default:return void console.log("Ignoring unknown filter type")}}const u=function(e){var n=e.network,t=e.path,s=e.defaultValue,r=e.filter,l=void 0===r?void 0:r,h=(0,i.useState)(""),u=h[0],m=h[1];return n=n.toLowerCase(),(0,i.useEffect)((function(){void 0!==l?c(s.toString(),l,n,m):m(s.toString());var e=void 0;switch(n){case"polkadot":e="wss://rpc.polkadot.io";break;case"kusama":e="wss://kusama-rpc.polkadot.io/";break;case"statemine":e="wss://kusama-asset-hub-rpc.polkadot.io/";break;case"statemint":e="wss://polkadot-asset-hub-rpc.polkadot.io/";break;case"kusamapeople":e="wss://kusama-people-rpc.polkadot.io";break;case"polkadotpeople":e="wss://polkadot-people-rpc.polkadot.io";break;default:console.log("Unknown network provided, "+n)}if(void 0===e)console.log("Failed to connect to a valid websocket, applying default");else{var i=function(){var e=(0,o.A)((0,a.A)().mark((function e(){var o;return(0,a.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,d(n,t,m);case 2:if(void 0!==(o=e.sent)){e.next=7;break}return e.abrupt("return");case 7:void 0!==l?c(o,l,n,m):m(o);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();try{i()}catch(r){console.log(r)}}}),[]),u}},11135:e=>{var n="polkadot",t="kusama",a="statemine",o="statemint",i="polkadotpeople",s="kusamapeople",r={polkadot:{precision:1e10,symbol:"DOT"},kusama:{precision:1e12,symbol:"KSM"},statemint:{precision:1e10,symbol:"DOT"},statemine:{precision:1e12,symbol:"KSM"},polkadotpeople:{precision:1e10,symbol:"DOT"},kusamapeople:{precision:1e12,symbol:"KSM"}};e.exports={HumanReadable:function(e,l,d){var h=void 0;if(l===n||l===o)h=3;else if(l===t||l===a||l===i)h=6;else{if(l!=s)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");h=8}e=parseFloat(e),d((e=Number.isInteger(e/r[l].precision)?e/r[l].precision+" "+r[l].symbol:(e/r[l].precision).toFixed(h)+" "+r[l].symbol).toString())},Precise:function(e,n,t){t(e=(e=parseFloat(e))/r[n].precision+" "+r[n].symbol)},BlocksToDays:function(e,n){n((e=6*e/86400).toString())},ErasToDays:function(e,r,l){var d=void 0;if(l===n||l===o||l==i)d=1;else{if(l!==t&&l!==a&&l!=s)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");d=4}r((e/=d).toString())},Percentage:function(e,n){n((e/=1e7).toString())},PermillToPercent:function(e,n){n((e/=1e4).toString())},ArrayLength:function(e,n){n((e=e.split(",").length).toString())}}},75020:(e,n,t)=>{"use strict";t.d(n,{A:()=>a});const a=t.p+"assets/images/nominators_target-d8652ac89f3cbb16528cd68808a32cf0.png"},2834:(e,n,t)=>{"use strict";t.d(n,{A:()=>a});const a=t.p+"assets/images/min-active-nomination-bfbe67c2714eb5027c6a4f45608c9bc2.png"},82071:(e,n,t)=>{"use strict";t.d(n,{A:()=>a});const a=t.p+"assets/images/nominator-election-ae25b5db36fa18b56fa58c5370127dd4.png"},67895:(e,n,t)=>{"use strict";t.d(n,{A:()=>a});const a=t.p+"assets/images/polkadotjs_nominator_account-e0f5d58cd9cce279d6f462cde9f706f4.png"},55768:(e,n,t)=>{"use strict";t.d(n,{A:()=>a});const a=t.p+"assets/images/validator_stats-57ec40656d6829e2ef791550116824d4.png"},47790:()=>{}}]); \ No newline at end of file diff --git a/assets/js/ff6596ea.5cf72161.js b/assets/js/ff6596ea.5cf72161.js deleted file mode 100644 index 0cedf340472e..000000000000 --- a/assets/js/ff6596ea.5cf72161.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk=self.webpackChunk||[]).push([[3507],{65410:(e,n,t)=>{"use strict";t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>s,default:()=>c,frontMatter:()=>i,metadata:()=>r,toc:()=>d});var a=t(74848),o=t(28453);t(47379);const i={id:"learn-nominator",title:"Nominator",sidebar_label:"Nominator",description:"Role of Nominators in the Polkadot Ecosystem.",keyword:["nominate","nominator","stake","staking"],slug:"../learn-nominator"},s=void 0,r={id:"learn/learn-nominator",title:"Nominator",description:"Role of Nominators in the Polkadot Ecosystem.",source:"@site/../docs/learn/learn-nominator.md",sourceDirName:"learn",slug:"/learn-nominator",permalink:"/docs/learn-nominator",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-nominator.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1726760224e3,frontMatter:{id:"learn-nominator",title:"Nominator",sidebar_label:"Nominator",description:"Role of Nominators in the Polkadot Ecosystem.",keyword:["nominate","nominator","stake","staking"],slug:"../learn-nominator"},sidebar:"docs",previous:{title:"Collator",permalink:"/docs/learn-collator"},next:{title:"Validator",permalink:"/docs/learn-validator"}},l={},d=[{value:"Who are Nominators?",id:"who-are-nominators",level:2},{value:"Why Nominate?",id:"why-nominate",level:2},{value:"Setting-up Accounts",id:"setting-up-accounts",level:2},{value:"Stash & Staking Proxy",id:"stash--staking-proxy",level:3},{value:"Rewards Payout Account",id:"rewards-payout-account",level:3},{value:"Nominating with the Polkadot-JS UI",id:"nominating-with-the-polkadot-js-ui",level:2},{value:"Targets Page",id:"targets-page",level:3},{value:"Bags-list",id:"bags-list",level:3},{value:"Validator Stats",id:"validator-stats",level:3},{value:"Nominating with the Staking Dashboard",id:"nominating-with-the-staking-dashboard",level:2},{value:"Staking Election Stages",id:"staking-election-stages",level:2},{value:"The Election Solution Set",id:"the-election-solution-set",level:3},{value:"Receiving Rewards",id:"receiving-rewards",level:2},{value:"Good Nominator Practices",id:"good-nominator-practices",level:2},{value:"Required Minimum Stake",id:"required-minimum-stake",level:3},{value:"Active vs. Inactive Nomination",id:"active-vs-inactive-nomination",level:3},{value:"Minimum Active Nomination to Receive Staking Rewards",id:"minimum-active-nomination-to-receive-staking-rewards",level:3},{value:"Guides",id:"guides",level:2}];function h(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,o.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(n.admonition,{title:"New to Staking?",type:"tip",children:[(0,a.jsxs)(n.p,{children:["Start your staking journey or explore more information about staking on\n",(0,a.jsx)(n.a,{href:"https://polkadot.network/staking/",children:"Polkadot's Home Page"}),". You can learn how staking works by\nreading ",(0,a.jsx)(n.a,{href:"/docs/learn-staking",children:"this dedicated page"}),"."]}),(0,a.jsxs)(n.p,{children:["Discover the new ",(0,a.jsx)(n.a,{href:"https://staking.polkadot.cloud/#/overview",children:(0,a.jsx)(n.strong,{children:"Staking Dashboard"})})," that makes\nstaking much easier and check this\n",(0,a.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000182104",children:"extensive article list"})," to\nhelp you get started."]}),(0,a.jsxs)(n.p,{children:["You can now\n",(0,a.jsx)(n.a,{href:"https://polkadot.network/blog/nomination-pools-are-live-stake-natively-with-just-1-dot/",children:"stake natively with just 1 DOT and earn staking rewards"}),"."]})]}),"\n",(0,a.jsx)(n.admonition,{title:"Stake through Nomination Pools",type:"info",children:(0,a.jsxs)(n.p,{children:["The minimum amount required to become an active nominator (i.e. the\n",(0,a.jsx)(n.a,{href:"/docs/chain-state-values#minimum-active-bond",children:"minimum active bond"}),") and earn rewards may\nchange from era to era. If you have less tokens than the minimum active nomination and still want to\nparticipate in staking, you can join the nomination pools with a\n",(0,a.jsx)(n.a,{href:"/docs/chain-state-values#minimum-bond-to-participate-in-staking",children:"smaller amount of tokens"}),".\nFor additional information, see\n",(0,a.jsx)(n.a,{href:"https://polkadot.network/blog/nomination-pools-are-live-stake-natively-with-just-1-dot/",children:"this blog post"}),".\nCheck the wiki doc on ",(0,a.jsx)(n.a,{href:"/docs/learn-nomination-pools",children:"nomination pools"})," for more information."]})}),"\n",(0,a.jsxs)(n.p,{children:["If you landed on this page, you decided to understand how you can be a good nominator. Note, this\npage is not for ",(0,a.jsx)(n.a,{href:"/docs/learn-nomination-pools",children:"nomination pool"})," members, although pool members might\ngain essential knowledge about how to choose nomination pools."]}),"\n",(0,a.jsxs)(n.p,{children:["The information provided on this page is complementary to that on the\n",(0,a.jsx)(n.a,{href:"/docs/learn-staking",children:(0,a.jsx)(n.strong,{children:"Staking Page"})})," and ",(0,a.jsx)(n.a,{href:"/docs/learn-staking-advanced",children:(0,a.jsx)(n.strong,{children:"Advanced Staking Page"})}),".\nMake sure you read those pages as well before nominating."]}),"\n",(0,a.jsx)(n.h2,{id:"who-are-nominators",children:"Who are Nominators?"}),"\n",(0,a.jsx)(n.p,{children:"Nominators are one type of staking participant. They appoint their stake to the validators, the\nsecond type of participant. By appointing their stake, they can elect the active set of validators\nand share in the rewards that are paid out."}),"\n",(0,a.jsxs)(n.p,{children:["While the ",(0,a.jsx)(n.a,{href:"/docs/maintain-guides-how-to-validate-polkadot",children:"validators"})," are active\nparticipants in the network that engage in the block production and finality mechanisms, nominators\ntake a slightly more passive role. Being a nominator does not require running a node of your own or\nworrying about online uptime. However, a good nominator performs due diligence on the validators\nthat they elect. When looking for validators to nominate, a nominator should pay attention to their\nown reward percentage for nominating a specific validator - as well as the risk that they bear of\nbeing ",(0,a.jsx)(n.a,{href:"/docs/learn-offenses",children:"slashed"})," if the validator gets slashed."]}),"\n",(0,a.jsx)(n.h2,{id:"why-nominate",children:"Why Nominate?"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:"You become a network participant, a group of diverse professionals and enthusiasts around the\nworld aspiring to build and foster the next-gen Internet, Web3: a decentralized, privacy-focused,\nand trustless internet."}),"\n",(0,a.jsxs)(n.li,{children:["You are an essential piece of the puzzle, keeping the network secure. The bonded balance can be\nused to vote in ",(0,a.jsx)(n.a,{href:"/docs/learn-polkadot-opengov",children:"Polkadot OpenGov"})," and shape the network's future\ndirection."]}),"\n",(0,a.jsxs)(n.li,{children:["You will start to understand how Polkadot works at a technical-level. When you feel comfortable\nwith your nomination skills and knowledge, you can open your\n",(0,a.jsx)(n.a,{href:"/docs/learn-nomination-pools",children:"nomination pool"}),", help others secure the network and earn rewards,\nand build your reputation as a trusted nomination pool operator. If you like to be more involved,\nthe next step is to become a ",(0,a.jsx)(n.a,{href:"/docs/learn-validator",children:"validator"}),"."]}),"\n",(0,a.jsxs)(n.li,{children:["By getting ",(0,a.jsx)(n.a,{href:"/docs/learn-staking",children:"staking"})," rewards you keep up with or (likely) stay ahead of\nnetwork inflation."]}),"\n"]}),"\n",(0,a.jsx)(n.p,{children:"Nominators secure the relay chain by staking native tokens (DOT on Polkadot or KSM on Kusama) and\nnominating validators. You may have an account with DOT and want to earn fresh DOT. You could do so\nas a validator, which requires experience setting up a node and running and maintaining it 24/7."}),"\n",(0,a.jsxs)(n.p,{children:["On Polkadot, you can also earn DOT by nominating one or more validators. Doing so makes you a\nnominator for the validator(s) you chose. Pick your validators carefully -\n",(0,a.jsx)(n.a,{href:"/docs/learn-offenses",children:"if they do not behave properly, they will get slashed, and you will lose some DOT"}),".\nHowever, if they follow the network rules, you can share the staking rewards they generate."]}),"\n",(0,a.jsxs)(n.p,{children:["While your tokens are staked for nominations, they are 'locked' (bonded). You can\n",(0,a.jsx)(n.a,{href:"/docs/learn-guides-nominator#stop-nominating",children:"stop nominating at any time"}),", but remember that the\naction is effective in the next era and does not automatically unbond your funds. Unbonding is a\nseparate action, and it takes effect after the\n",(0,a.jsx)(n.a,{href:"/docs/chain-state-values#unbonding-duration",children:"unbonding period"}),". A staking lock will be\nvisible on the Polkadot-JS UI during the unbonding period, and after it, the staking lock can be\nunlocked, and the bonded funds become free balance you can transfer."]}),"\n",(0,a.jsx)(n.admonition,{title:"Fast Unstaking",type:"info",children:(0,a.jsx)(n.p,{children:"If you accidentally bonded your tokens or your bonded tokens never backed any active validator, you\ncan now unbond them immediately."})}),"\n",(0,a.jsxs)(n.p,{children:["If your bonded balance did not back any validators in the last 28 days on Polkadot (7 days on\nKusama), you are eligible to perform fast unstaking. The\n",(0,a.jsx)(n.a,{href:"https://staking.polkadot.cloud/#/overview",children:"staking dashboard"})," will automatically check if you\nqualify. For more information, visit the\n",(0,a.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000169433-can-i-transfer-dot-without-unbonding-and-waiting-28-days-",children:'"Fast Unstake" section in this support article'}),"."]}),"\n",(0,a.jsx)(n.h2,{id:"setting-up-accounts",children:"Setting-up Accounts"}),"\n",(0,a.jsx)(n.h3,{id:"stash--staking-proxy",children:"Stash & Staking Proxy"}),"\n",(0,a.jsxs)(n.p,{children:["Nominators are recommended to set up separate stash and staking proxy accounts. Explanation and the\nreasoning for generating distinct accounts for this purpose is elaborated in the\n",(0,a.jsx)(n.a,{href:"/docs/learn-cryptography#keys",children:"keys section"}),"."]}),"\n",(0,a.jsxs)(n.p,{children:["You can generate your stash and staking proxy account via any of the recommended methods, which are\ndetailed on the ",(0,a.jsx)(n.a,{href:"/docs/learn-accounts#account-generation",children:"account generation"})," page. The first\nthing you need to do before becoming a nominator is to make sure you have a\n",(0,a.jsx)(n.a,{href:"./learn-staking.md/#stash-account-and-staking-proxy",children:(0,a.jsx)(n.strong,{children:"stash account"})}),' where you can transfer\nfunds you want to use for staking. For these accounts, it is recommended to use a "cold wallet"\nsolution such as ',(0,a.jsx)(n.a,{href:"/docs/ledger",children:"Ledger"})," or ",(0,a.jsx)(n.a,{href:"/docs/polkadot-vault",children:"Polkadot Vault"}),"."]}),"\n",(0,a.jsxs)(n.p,{children:["After setting up the stash account, it is recommended to have a\n",(0,a.jsx)(n.a,{href:"./learn-staking-advanced.md/#staking-proxies",children:(0,a.jsx)(n.strong,{children:"staking proxy"})}),". Although you can be a nominator\nwith just a stash account, having a staking proxy is good practice for security reasons."]}),"\n",(0,a.jsx)(n.p,{children:"A staking proxy of the stash will be able to sign for all staking-related transactions as well. The\nstash will be fully isolated (except if the user decides to change the staking proxy of the stash or\nto attach different proxies to the stash)."}),"\n",(0,a.jsx)(n.h3,{id:"rewards-payout-account",children:"Rewards Payout Account"}),"\n",(0,a.jsx)(n.p,{children:"As a nominator, you will be asked to choose an account where rewards will be paid. You can select\none of the following options:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:"back to staking: rewards are compounded to the bonded amount."}),"\n",(0,a.jsx)(n.li,{children:"to stash: rewards are sent to the stash account as a free balance."}),"\n",(0,a.jsx)(n.li,{children:"to another account: rewards are sent to a user-defined account (not stash)."}),"\n"]}),"\n",(0,a.jsxs)(n.p,{children:["Starting with runtime version v23 natively included in the client version\n",(0,a.jsx)(n.a,{href:"https://github.com/paritytech/polkadot/releases/tag/v0.8.23",children:"0.8.23"}),", payouts can go to any custom\naddress. If you'd like to redirect payments to an account that is neither the staking proxy nor the\nstash account, set one up. Note that setting an exchange address as the recipient of the staking\nrewards is extremely unsafe."]}),"\n",(0,a.jsx)(n.admonition,{type:"info",children:(0,a.jsxs)(n.p,{children:["Being a nominator is made simpler by using the\n",(0,a.jsx)(n.a,{href:"https://staking.polkadot.cloud/#/overview",children:(0,a.jsx)(n.strong,{children:"Staking Dashboard"})})," that will guide you step by step\nthrough specifying rewards destination and bonded amount, and nominating validators (more on this\nbelow). Note that staking proxies are not currently supported on the dashboard."]})}),"\n",(0,a.jsx)(n.h2,{id:"nominating-with-the-polkadot-js-ui",children:"Nominating with the Polkadot-JS UI"}),"\n",(0,a.jsx)(n.h3,{id:"targets-page",children:"Targets Page"}),"\n",(0,a.jsxs)(n.p,{children:["There are many factors to consider when deciding which of your nominations. One helpful tool to\nchoose validators is the Staking ",(0,a.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/staking/targets",children:"Targets"})," table in\nthe Polkadot-JS UI. This allows sorting validators using various metrics. Below are the relevant\nmetrics shown as an example, followed by a brief description of each."]}),"\n",(0,a.jsxs)(n.table,{children:[(0,a.jsx)(n.thead,{children:(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.th,{children:"validator"}),(0,a.jsx)(n.th,{children:"payout"}),(0,a.jsx)(n.th,{children:"nominators"}),(0,a.jsx)(n.th,{children:"comm."}),(0,a.jsx)(n.th,{children:"total stake"}),(0,a.jsx)(n.th,{children:"own stake"}),(0,a.jsx)(n.th,{children:"return"})]})}),(0,a.jsx)(n.tbody,{children:(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:"A"}),(0,a.jsx)(n.td,{children:"recently"}),(0,a.jsxs)(n.td,{children:["1 (",(0,a.jsx)(n.code,{children:"active"}),") 4 (",(0,a.jsx)(n.code,{children:"all"}),")"]}),(0,a.jsx)(n.td,{children:"3%"}),(0,a.jsx)(n.td,{children:"1.6 MDOT"}),(0,a.jsx)(n.td,{children:"8500 DOT"}),(0,a.jsx)(n.td,{children:"17.8%"})]})})]}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.strong,{children:"payout"}),": How recently the validator made its last reward payout to nominators."]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.strong,{children:"nominators"}),": This column consists of two number values. The ",(0,a.jsx)(n.strong,{children:"active"})," count (left number) is\nthe number of nominators whose stake is baking the validator in the current era. In this case\nValidator A has one active nominator. The total or ",(0,a.jsx)(n.strong,{children:"all"})," count (right number) is the number of\nall nominators who nominated Validator A. This includes the active count and all the other\nnominators whose stake in the current era is baking other validators."]}),"\n",(0,a.jsxs)(n.p,{children:["Every nominator can select up to\n",(0,a.jsx)(n.a,{href:"/docs/chain-state-values#maximum-votes-per-nominator",children:"a maximum number of validators"}),",\nwhich contributes towards maximizing the probability of having the nominator\u2019s stake applied to\nthe validators active set. Nominating too few validators could result in the nominators not\nreceiving their rewards when none of them make it to the active set or when those validators stop\nvalidating. The election algorithm attempts to maximize the overall network stake while minimizing\nthe variance of the active stake across the validators. For additional information on the election\nprocess, check out the research behind\n",(0,a.jsx)(n.a,{href:"https://research.web3.foundation/Polkadot/protocols/NPoS",children:"nominated proof-of-stake"}),"."]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.strong,{children:"comm."}),": Total commission kept by the validator (100% means the validator will keep all rewards\n, and thus nominators will not receive them). A validator's commission is the percentage of the\nvalidator reward taken by the validator before the rewards are split among the nominators. As a\nnominator, you may think that choosing validators with the lowest commission is best. However,\nvalidators must be able to run at break-even to continue operations sustainably. Independent\nvalidators that rely on the commission to cover their server costs help to keep the network\ndecentralized. Some validators, operated by central exchanges, etc., keep 100% of the commission\nto payout their staking service clients and therefore do not provide any rewards to external\nnominators. The commission is just one piece of the puzzle you should consider when picking\nnominating validators."]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.strong,{children:"total stake"}),": The total amount of tokens staked by nominators and the validator (i.e. own\nstake, see below)."]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.strong,{children:"own stake"}),': The amount of tokens the validator has put up as a stake. A higher own stake can be\nconsidered as having more "skin in the game". This can imply increased trustworthiness. However, a\nvalidator not having a large amount of "own stake" is not automatically untrustworthy, as the\nvalidator could nominate from a different address.']}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.strong,{children:"return"}),": Average annual yield paid out to nominators (i.e. number of rewards divided by the\nnumber of bonded tokens). Note that nominating those with a higher yield may not guarantee similar\nfuture performance."]}),"\n"]}),"\n"]}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.img,{alt:"Staking Returns",src:t(75020).A+"",width:"2169",height:"509"})}),"\n",(0,a.jsx)(n.p,{children:"On the Targets page, you can use different filters to select validators with specific traits (where\na trait is a combination of the metrics above). Available filters are:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.strong,{children:"one validator per operator"}),": Do not show groups of validators run by a single operator. It\nshows small operators only who will likely have a higher commission and higher self-stake.\nNominating only small operators might not always guarantee staking rewards, but it helps to keep\nthe network more resilient to attacks."]}),"\n"]}),"\n",(0,a.jsx)(n.admonition,{title:"Validator vs Operator",type:"info",children:(0,a.jsxs)(n.p,{children:["A validator is the node, the physical equipment with installed software that allows to produce new\nblocks and earn rewards. An operator is the entity responsible for setting up, running and\nmaintaining the node. An operator can have multiple validators under different sub-identities. For\nexample, ",(0,a.jsx)(n.code,{children:"ZUG CAPITAL/07"})," is one of the numerous validators belonging to the operator Zug Capital."]})}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.strong,{children:"comm. < 20%"}),": Do not show any validators with a commission of 20% or higher."]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.strong,{children:"recent payouts"}),": Only show validators that have recently caused a\n",(0,a.jsx)(n.a,{href:"/docs/learn-staking-advanced",children:"payout to be issued"}),". Note that anyone can cause a payout to occur; it\ndoes not have to be the operator of a validator."]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.strong,{children:"currently elected"}),": Only show validators in the active set (i.e., they have been elected to\nproduce blocks in the current era)."]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.strong,{children:"with an identity"}),": Only show validators that have set an ",(0,a.jsx)(n.a,{href:"/docs/learn-identity",children:"identity"}),". Note\nthat this identity does not have to be verified by a registrar for the validator to appear in the\nlist."]}),"\n"]}),"\n",(0,a.jsx)(n.admonition,{title:"Single Operators with Multiple Validators",type:"warning",children:(0,a.jsxs)(n.p,{children:["Recall that ",(0,a.jsx)(n.a,{href:"/docs/learn-offenses",children:"slashing"}),' is an additive function; the more validators\nequivocating in a given session, the harsher the penalties. Since validators that are controlled by\na single operator are more at risk of a "synchronized" failure, nominating them implies a greater\nrisk of having a large slash of your nominated funds. Generally, it is safer to nominate validators\nwhose behavior is independent of others in many ways (different hardware, geographic location,\nowner, etc.).']})}),"\n",(0,a.jsx)(n.h3,{id:"bags-list",children:"Bags-list"}),"\n",(0,a.jsx)(n.admonition,{type:"info",children:(0,a.jsxs)(n.p,{children:["On Polkadot and Kusama, the instance of the pallet\n",(0,a.jsx)(n.a,{href:"https://paritytech.github.io/substrate/master/pallet_bags_list/",children:"Bags-List"})," is named as\n",(0,a.jsx)(n.code,{children:"voterList"}),"."]})}),"\n",(0,a.jsxs)(n.p,{children:["Nominating accounts are placed in a semi-sorted list called bags-list. This sorting functionality is\nextremely important for the long-term improvements of the staking/election system. Bags-list allows\nan unlimited number nominators to set their intention to nominate, of which only a portion of it\n(currently 22500) is considered for ",(0,a.jsx)(n.a,{href:"#staking-election-stages",children:"electing set"})," that eventually\ndetermines the active validators."]}),"\n",(0,a.jsxs)(n.p,{children:["The nominator accounts in a bag are sorted based on their insertion order, not by their nomination\nstake. The ",(0,a.jsx)(n.code,{children:"voterList.putInFrontOf"})," extrinsic can be issued to move up in the bag, which might be\nvery useful for the accounts in the last bag eligible for receiving staking rewards. Balance changes\ndue to staking rewards or slashing do not automatically rebag the account. Whenever applicable,\nPolkadot JS Apps UI prompts the nominator account to rebag or move up by calling the\n",(0,a.jsx)(n.code,{children:"voterList.rebag"})," extrinsic."]}),"\n",(0,a.jsx)(n.p,{children:"For guidelines about how to rebag or move your account within a bag, see the followings:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:['The "Bags List" Section on\n',(0,a.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181018-i-have-more-than-the-minimum-bonded-but-i-m-not-getting-rewards",children:"this Support Page"}),"."]}),"\n",(0,a.jsxs)(n.li,{children:["The ",(0,a.jsx)(n.a,{href:"/docs/learn-staking-advanced#bags-list",children:"Bags List Section"})," in Advanced Staking Concepts."]}),"\n",(0,a.jsxs)(n.li,{children:["The ",(0,a.jsx)(n.a,{href:"https://youtu.be/hIIZRJLrBZA",children:"dedicated technical explainer video"}),"."]}),"\n"]}),"\n",(0,a.jsx)(n.h3,{id:"validator-stats",children:"Validator Stats"}),"\n",(0,a.jsxs)(n.p,{children:["Nominators can query ",(0,a.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/staking/query/",children:"validator histories"})," to see\nstatistics such as era points, elected stake, rewards and slashes, and commission. It is good\npractice to do comprehensive research on validator candidates. This could include (but should not be\nlimited to) checking the validators' ",(0,a.jsx)(n.a,{href:"/docs/learn-identity",children:"identity"})," (if they have set one) and going\nover the validators' websites to see who they are, what kind of infrastructure setup they are using,\nreputation, the vision behind the validator, and more."]}),"\n",(0,a.jsx)(n.p,{children:"Any problematic behavior must be taken seriously. An example of problematic behavior will be if a\nvalidator is regularly offline. In this case, nominators will get fewer rewards."}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.img,{alt:"Validator Stats",src:t(55768).A+"",width:"1900",height:"1204"})}),"\n",(0,a.jsx)(n.h2,{id:"nominating-with-the-staking-dashboard",children:"Nominating with the Staking Dashboard"}),"\n",(0,a.jsx)(n.p,{children:"If you are a beginner, please watch the video below for detailed instructions."}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.a,{href:"https://www.youtube.com/watch?v=F59N3YKYCRs",children:(0,a.jsx)(n.img,{src:"https://img.youtube.com/vi/F59N3YKYCRs/0.jpg",alt:"Staking Tutorial"})})}),"\n",(0,a.jsxs)(n.p,{children:["The ",(0,a.jsx)(n.a,{href:"/docs/staking-dashboard",children:"Polkadot Staking Dashboard"})," allows to choose pre-selected\nlists of validators based on user preference, or to manually select validators similarly as in the\nPolkadot-JS UI."]}),"\n",(0,a.jsx)(n.p,{children:"Pre-selected choices are:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:"Optimal Selection: Selects a mix of majority active and inactive validators."}),"\n",(0,a.jsx)(n.li,{children:"Active Low Commission: Gets a set of active validators with low commission."}),"\n",(0,a.jsx)(n.li,{children:"From Favorites: Gets a set of your favorite validators."}),"\n"]}),"\n",(0,a.jsx)(n.h2,{id:"staking-election-stages",children:"Staking Election Stages"}),"\n",(0,a.jsx)(n.p,{children:'The staking election system has three stages for both validators and nominators, namely "intention",\n"electable/electing", and "active".'}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.strong,{children:"intention to nominate:"}),' an account that has stated the intention to nominate; also called\nsimply a "nominator".']}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.strong,{children:"electing nominator:"})," a nominator who is selected to be a part of the input to the\n",(0,a.jsx)(n.a,{href:"/docs/learn-phragmen",children:"NPoS election algorithm"}),". This selection is based on stake and is made using\nthe ",(0,a.jsx)(n.a,{href:"/docs/learn-staking-advanced#bags-list",children:"bags-list"}),"."]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.strong,{children:"active nominator:"})," a nominator who came out of the NPoS election algorithm backing an active\nvalidator. When slashing occurs, all the active nominators backing the validator get slashed."]}),"\n"]}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.img,{alt:"Nominator Election",src:t(82071).A+"",width:"612",height:"430"})}),"\n",(0,a.jsx)(n.h3,{id:"the-election-solution-set",children:"The Election Solution Set"}),"\n",(0,a.jsx)(n.p,{children:'Determining which validators are in the active set and which nominators are nominating them creates\na very large graph mapping nominators to their respective validators. This "solution set" is\ncomputed off-chain and submitted to the chain, which means it must fit in a single block. If there\nare a large number of nominators, this means that some nominators must be eliminated. Currently,\nnominators are sorted by the amount of DOT staked, and those with more DOT are prioritized. This\nmeans that you may not receive rewards if you are staking with a small amount of DOT. This minimal\namount is dynamic based on the number of validators, nominators, amount nominated, and other\nfactors.'}),"\n",(0,a.jsx)(n.h2,{id:"receiving-rewards",children:"Receiving Rewards"}),"\n",(0,a.jsxs)(n.p,{children:["As long as you have nominated more than one validator candidate, at least one of them got elected,\nand you are nominating with enough stake to get into the solution set, your bonded stake will be\nfully distributed to one or more validators. That being said, you may not receive rewards if you\nnominated very few validator candidates and no one got elected, or your stake is small, and you are\nnot part of the ",(0,a.jsx)(n.a,{href:"/docs/learn-staking-advanced#bags-list",children:"top 22,500 nominators"}),", or the validator you\nare nominating has 100% commission. It is generally wise to choose as many trustworthy validators as\nyou can to reduce the risk of none of your nominated validators being elected."]}),"\n",(0,a.jsxs)(n.admonition,{title:"Not receiving Staking Rewards?",type:"info",children:[(0,a.jsx)(n.p,{children:"To explore the possible reasons for not receiving staking rewards, check out the followings:"}),(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["The\n",(0,a.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181959-staking-faq-s",children:"Staking FAQ"}),"\non the Support Pages."]}),"\n",(0,a.jsxs)(n.li,{children:["The\n",(0,a.jsx)(n.a,{href:"https://www.reddit.com/r/Polkadot/comments/10kurje/why_am_i_not_receiving_staking_rewards/",children:'"Why am I not receiving staking rewards?"'}),"\nReddit article."]}),"\n",(0,a.jsxs)(n.li,{children:["The ",(0,a.jsx)(n.a,{href:"/docs/learn-staking#why-am-i-not-receiving-rewards",children:'"Why am I not receiving staking rewards?"'}),"\nsection on the Staking Page."]}),"\n"]})]}),"\n",(0,a.jsxs)(n.p,{children:["Rewards are ",(0,a.jsx)(n.em,{children:"lazy"})," - somebody must trigger a payout for a validator for rewards to go to all of the\nvalidator's nominators. Any account can do this, although validator operators often do this as a\nservice to their nominators. See the page on ",(0,a.jsx)(n.a,{href:"/docs/learn-staking-advanced",children:"Simple Payouts"})," for more\ninformation and instructions for claiming rewards."]}),"\n",(0,a.jsxs)(n.admonition,{title:"Explainer videos on Nominating",type:"note",children:[(0,a.jsx)(n.p,{children:"These concepts have been further explained in the following videos:"}),(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"https://www.youtube.com/watch?v=weG_uzdSs1E&list=PLOyWqupZ-WGuAuS00rK-pebTMAOxW41W8&index=4",children:"Why Nominate on Polkadot & Kusama"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"https://www.youtube.com/watch?v=K-a4CgVchvU&list=PLOyWqupZ-WGuAuS00rK-pebTMAOxW41W8&index=9",children:"What to Consider when Nominating Validators on Polkadot and Kusama"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"https://youtu.be/FCXC0CDhyS4",children:"Nominating/Staking on Polkadot and Kusama"})}),"\n"]})]}),"\n",(0,a.jsx)(n.h2,{id:"good-nominator-practices",children:"Good Nominator Practices"}),"\n",(0,a.jsx)(n.h3,{id:"required-minimum-stake",children:"Required Minimum Stake"}),"\n",(0,a.jsxs)(n.p,{children:["Due to the way the ",(0,a.jsx)(n.a,{href:"/docs/learn-phragmen",children:"Phragmen algorithm"})," generates the solution set and due to the\nfact that the solution set must fit in a single block, a minimum number of DOT will be required to\nnominate with to receive staking rewards can change between the eras."]}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.strong,{children:"min-intention-threshold:"})," minimum stake to declare the intention to nominate. This parameter\ncan be updated via on-chain governance, and the most recent and up-to-date version can be found on\n",(0,a.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/chainstate",children:"chain state"})," (select ",(0,a.jsx)(n.strong,{children:"state query > staking >\nminimumNominatorBond"}),")"]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.strong,{children:"min-electing:"})," minimum stake among the electing nominators. Since this is almost always the\nsame as \u201cmin-active\u201d, it might not be reported."]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.strong,{children:"min-active:"})," minimum stake among the active nominators. If your stake falls below this dynamic\nthreshold in a given era, you will not receive staking rewards for that era."]}),"\n"]}),"\n"]}),"\n",(0,a.jsxs)(n.p,{children:["Thus, for ",(0,a.jsx)(n.strong,{children:"nominator counters"}),", we have:"]}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["count of nominator intentions and\n",(0,a.jsx)(n.a,{href:"/docs/chain-state-values#maximum-number-of-nominators",children:"max possible nominator intentions"})]}),"\n",(0,a.jsx)(n.li,{children:"count of electing nominators, and maximum possible electing nominators (22500 on Polkadot and\n12500 on Kusama)"}),"\n",(0,a.jsx)(n.li,{children:"count of active nominators and maximum possible active nominators (22500 on Polkadot and 12500 on\nKusama)"}),"\n"]}),"\n",(0,a.jsx)(n.h3,{id:"active-vs-inactive-nomination",children:"Active vs. Inactive Nomination"}),"\n",(0,a.jsxs)(n.p,{children:["When you go to the ",(0,a.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/staking/actions",children:"Account actions"})," under staking\npage, you should see your bonded accounts and nomination status. If not, you can follow\n",(0,a.jsx)(n.a,{href:"/docs/learn-guides-nominator#nominate-using-polkadot-js",children:"this"})," guide to configure it first. Your\nnominations will be effective in the next era; eras are roughly 24 hours on Polkadot (6 hours on\nKusama)."]}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.img,{alt:"Nominations",src:t(67895).A+"",width:"2878",height:"766"})}),"\n",(0,a.jsx)(n.p,{children:'Suppose you have nominated five validator candidates, and three out of five were elected to the\nactive validator set; then you should see two of your nominations as "waiting", and most likely one\nas "active" and the rest as "inactive". Active or inactive nomination means your nominated\nvalidators have been elected to be in the validator set, whereas waiting means they did not get\nelected. Generally, you will only have a single validator have an active nomination, which means\nthat you are directly supporting it with your stake this era and thus potentially receiving staking\nrewards. Inactive nominators were validators elected for this era but which you are not actively\nsupporting. Every era, a new election will take place, and you may be assigned a different active\nnomination from the validators you selected.'}),"\n",(0,a.jsxs)(n.p,{children:["If you are committing a very large stake, you may have more than one active nomination. However, the\nelection algorithm attempts to minimize this situation, and it should not occur often, so you should\nalmost always see only a single active nomination per era. See the\n",(0,a.jsx)(n.a,{href:"/docs/learn-phragmen#optimizations",children:"section on Phragm\xe9n optimization"})," for more details."]}),"\n",(0,a.jsx)(n.h3,{id:"minimum-active-nomination-to-receive-staking-rewards",children:"Minimum Active Nomination to Receive Staking Rewards"}),"\n",(0,a.jsx)(n.admonition,{title:"Minimum DOT required to earn staking rewards",type:"info",children:(0,a.jsxs)(n.p,{children:["The\n",(0,a.jsx)(n.a,{href:"/docs/chain-state-values#minimum-bond-to-participate-in-staking",children:"minimum number of tokens required to submit intent to nominate"}),"\ndiffers from the ",(0,a.jsx)(n.a,{href:"/docs/chain-state-values#minimum-active-bond",children:"minimum active nomination"}),"\nrequired to earn staking rewards."]})}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.img,{alt:"Minimum Active Nomination",src:t(2834).A+"",width:"1436",height:"166"})}),"\n",(0,a.jsx)(n.h2,{id:"guides",children:"Guides"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.a,{href:"/docs/learn-guides-nominator#nominate-a-validator",children:"Be a Nominator (Polkadot)"})," - Guide on\nnominating on the Kusama canary network."]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.a,{href:"/docs/learn-guides-nominator#stop-nominating",children:"Stop Being a Nominator (all networks)"})," - Guide on\nstopping nominations and withdrawing tokens."]}),"\n"]})]})}function c(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(h,{...e})}):h(e)}},47379:(e,n,t)=>{"use strict";t.d(n,{A:()=>u});var a=t(90675),o=t(10467),i=t(96540),s=t(19588),r=t(2026),l=t(11135);function d(e,n,t){return h.apply(this,arguments)}function h(){return(h=(0,o.A)((0,a.A)().mark((function e(n,t,o){var i,l,d,h,c;return(0,a.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=void 0,l=void 0,e.t0=n,e.next="polkadot"===e.t0?5:"kusama"===e.t0?7:"statemine"===e.t0?9:"statemint"===e.t0?11:"polkadotpeople"===e.t0?13:"kusamapeople"===e.t0?15:17;break;case 5:return i="wss://rpc.polkadot.io",e.abrupt("break",18);case 7:return i="wss://kusama-rpc.polkadot.io/",e.abrupt("break",18);case 9:return i="wss://statemine-rpc.polkadot.io/",e.abrupt("break",18);case 11:return i="wss://statemint-rpc.polkadot.io/",e.abrupt("break",18);case 13:return i="wss://polkadot-people-rpc.polkadot.io/",e.abrupt("break",18);case 15:return i="wss://kusama-people-rpc.polkadot.io/",e.abrupt("break",18);case 17:console.log("Unknown socket url provided, no connection made.");case 18:if(void 0!==i){e.next=22;break}return e.abrupt("return");case 22:return d=new s.E(i),e.next=25,r.G.create({provider:d});case 25:h=e.sent,(c=t.split(".")).forEach((function(e){e in h&&(h=h[e])})),e.t1=c[0],e.next="consts"===e.t1?31:"query"===e.t1?33:38;break;case 31:return l=h.toString(),e.abrupt("break",39);case 33:return e.next=35,h();case 35:return l=(l=e.sent).toString(),e.abrupt("break",39);case 38:console.log("Unknown path prefix ("+c[0]+") in "+t);case 39:return e.abrupt("return",l);case 40:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function c(e,n,t,a){switch(n){case"humanReadable":(0,l.HumanReadable)(e,t,a);break;case"precise":(0,l.Precise)(e,t,a);break;case"blocksToDays":(0,l.BlocksToDays)(e,a);break;case"erasToDays":(0,l.ErasToDays)(e,a,t);break;case"percentage":(0,l.Percentage)(e,a);break;case"permillToPercent":(0,l.PermillToPercent)(e,a);break;case"arrayLength":(0,l.ArrayLength)(e,a);break;default:return void console.log("Ignoring unknown filter type")}}const u=function(e){var n=e.network,t=e.path,s=e.defaultValue,r=e.filter,l=void 0===r?void 0:r,h=(0,i.useState)(""),u=h[0],m=h[1];return n=n.toLowerCase(),(0,i.useEffect)((function(){void 0!==l?c(s.toString(),l,n,m):m(s.toString());var e=void 0;switch(n){case"polkadot":e="wss://rpc.polkadot.io";break;case"kusama":e="wss://kusama-rpc.polkadot.io/";break;case"statemine":e="wss://kusama-asset-hub-rpc.polkadot.io/";break;case"statemint":e="wss://polkadot-asset-hub-rpc.polkadot.io/";break;case"kusamapeople":e="wss://kusama-people-rpc.polkadot.io";break;case"polkadotpeople":e="wss://polkadot-people-rpc.polkadot.io";break;default:console.log("Unknown network provided, "+n)}if(void 0===e)console.log("Failed to connect to a valid websocket, applying default");else{var i=function(){var e=(0,o.A)((0,a.A)().mark((function e(){var o;return(0,a.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,d(n,t,m);case 2:if(void 0!==(o=e.sent)){e.next=7;break}return e.abrupt("return");case 7:void 0!==l?c(o,l,n,m):m(o);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();try{i()}catch(r){console.log(r)}}}),[]),u}},11135:e=>{var n="polkadot",t="kusama",a="statemine",o="statemint",i="polkadotpeople",s="kusamapeople",r={polkadot:{precision:1e10,symbol:"DOT"},kusama:{precision:1e12,symbol:"KSM"},statemint:{precision:1e10,symbol:"DOT"},statemine:{precision:1e12,symbol:"KSM"},polkadotpeople:{precision:1e10,symbol:"DOT"},kusamapeople:{precision:1e12,symbol:"KSM"}};e.exports={HumanReadable:function(e,l,d){var h=void 0;if(l===n||l===o)h=3;else if(l===t||l===a||l===i)h=6;else{if(l!=s)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");h=8}e=parseFloat(e),d((e=Number.isInteger(e/r[l].precision)?e/r[l].precision+" "+r[l].symbol:(e/r[l].precision).toFixed(h)+" "+r[l].symbol).toString())},Precise:function(e,n,t){t(e=(e=parseFloat(e))/r[n].precision+" "+r[n].symbol)},BlocksToDays:function(e,n){n((e=6*e/86400).toString())},ErasToDays:function(e,r,l){var d=void 0;if(l===n||l===o||l==i)d=1;else{if(l!==t&&l!==a&&l!=s)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");d=4}r((e/=d).toString())},Percentage:function(e,n){n((e/=1e7).toString())},PermillToPercent:function(e,n){n((e/=1e4).toString())},ArrayLength:function(e,n){n((e=e.split(",").length).toString())}}},75020:(e,n,t)=>{"use strict";t.d(n,{A:()=>a});const a=t.p+"assets/images/nominators_target-d8652ac89f3cbb16528cd68808a32cf0.png"},2834:(e,n,t)=>{"use strict";t.d(n,{A:()=>a});const a=t.p+"assets/images/min-active-nomination-bfbe67c2714eb5027c6a4f45608c9bc2.png"},82071:(e,n,t)=>{"use strict";t.d(n,{A:()=>a});const a=t.p+"assets/images/nominator-election-ae25b5db36fa18b56fa58c5370127dd4.png"},67895:(e,n,t)=>{"use strict";t.d(n,{A:()=>a});const a=t.p+"assets/images/polkadotjs_nominator_account-e0f5d58cd9cce279d6f462cde9f706f4.png"},55768:(e,n,t)=>{"use strict";t.d(n,{A:()=>a});const a=t.p+"assets/images/validator_stats-57ec40656d6829e2ef791550116824d4.png"},47790:()=>{}}]); \ No newline at end of file diff --git a/assets/js/ffd76171.473d5708.js b/assets/js/ffd76171.473d5708.js deleted file mode 100644 index 37fdbe0ce683..000000000000 --- a/assets/js/ffd76171.473d5708.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[639],{98319:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>s,default:()=>m,frontMatter:()=>o,metadata:()=>l,toc:()=>d});var i=t(74848),r=t(28453),a=t(3514);const o={id:"maintain-index",title:"Network Maintainers",sidebar_label:"Network Maintainers",description:"Reference point for network maintenance guides.",keywords:["maintain","validator","collator"],slug:"../maintain-index"},s=void 0,l={id:"maintain/maintain-index",title:"Network Maintainers",description:"Reference point for network maintenance guides.",source:"@site/../docs/maintain/maintain-index.md",sourceDirName:"maintain",slug:"/maintain-index",permalink:"/docs/maintain-index",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/maintain/maintain-index.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1727167801e3,frontMatter:{id:"maintain-index",title:"Network Maintainers",sidebar_label:"Network Maintainers",description:"Reference point for network maintenance guides.",keywords:["maintain","validator","collator"],slug:"../maintain-index"},sidebar:"docs",previous:{title:"Parachain Development",permalink:"/docs/build-pdk"},next:{title:"Parameters",permalink:"/docs/maintain-polkadot-parameters"}},c={},d=[];function u(e){const n={a:"a",admonition:"admonition",li:"li",p:"p",ul:"ul",...(0,r.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.p,{children:"Welcome to the network maintainers section of the Polkadot Wiki. Here you will find information and\nguides to set up a node and run the network."}),"\n",(0,i.jsx)(a.A,{}),"\n",(0,i.jsxs)(n.admonition,{title:"Polkadot's Canary Network Kusama",type:"info",children:[(0,i.jsx)(n.p,{children:"For more information about being a Kusama maintainer, see the pages below:"}),(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.a,{href:"/docs/learn-nominator",children:"Nomination Guide"})," - Walkthrough on how to nominate on the Kusama\ncanary network."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.a,{href:"/docs/maintain-guides-how-to-validate-kusama",children:"Validation Guide (Kusama)"})," - Walkthrough on how\nto validate on the Kusama canary network."]}),"\n"]})]})]})}function m(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(u,{...e})}):u(e)}},3514:(e,n,t)=>{t.d(n,{A:()=>k});t(96540);var i=t(34164),r=t(26972),a=t(28774),o=t(53465),s=t(16654),l=t(21312),c=t(51107);const d={cardContainer:"cardContainer_fWXF",cardTitle:"cardTitle_rnsV",cardDescription:"cardDescription_PWke"};var u=t(74848);function m(e){var n=e.href,t=e.children;return(0,u.jsx)(a.A,{href:n,className:(0,i.A)("card padding--lg",d.cardContainer),children:t})}function f(e){var n=e.href,t=e.icon,r=e.title,a=e.description;return(0,u.jsxs)(m,{href:n,children:[(0,u.jsxs)(c.A,{as:"h2",className:(0,i.A)("text--truncate",d.cardTitle),title:r,children:[t," ",r]}),a&&(0,u.jsx)("p",{className:(0,i.A)("text--truncate",d.cardDescription),title:a,children:a})]})}function h(e){var n,t,i=e.item,a=(0,r.Nr)(i),s=(t=(0,o.W)().selectMessage,function(e){return t(e,(0,l.T)({message:"1 item|{count} items",id:"theme.docs.DocCard.categoryDescription.plurals",description:"The default description for a category card in the generated index about how many items this category includes"},{count:e}))});return a?(0,u.jsx)(f,{href:a,icon:"\ud83d\uddc3\ufe0f",title:i.label,description:null!=(n=i.description)?n:s(i.items.length)}):null}function p(e){var n,t,i=e.item,a=(0,s.A)(i.href)?"\ud83d\udcc4\ufe0f":"\ud83d\udd17",o=(0,r.cC)(null!=(n=i.docId)?n:void 0);return(0,u.jsx)(f,{href:i.href,icon:a,title:i.label,description:null!=(t=i.description)?t:null==o?void 0:o.description})}function x(e){var n=e.item;switch(n.type){case"link":return(0,u.jsx)(p,{item:n});case"category":return(0,u.jsx)(h,{item:n});default:throw new Error("unknown item type "+JSON.stringify(n))}}function g(e){var n=e.className,t=(0,r.$S)();return(0,u.jsx)(k,{items:t.items,className:n})}function k(e){var n=e.items,t=e.className;if(!n)return(0,u.jsx)(g,Object.assign({},e));var a=(0,r.d1)(n);return(0,u.jsx)("section",{className:(0,i.A)("row",t),children:a.map((function(e,n){return(0,u.jsx)("article",{className:"col col--6 margin-bottom--lg",children:(0,u.jsx)(x,{item:e})},n)}))})}},53465:(e,n,t)=>{t.d(n,{W:()=>c});var i=t(96540),r=t(44586),a=["zero","one","two","few","many","other"];function o(e){return a.filter((function(n){return e.includes(n)}))}var s={locale:"en",pluralForms:o(["one","other"]),select:function(e){return 1===e?"one":"other"}};function l(){var e=(0,r.A)().i18n.currentLocale;return(0,i.useMemo)((function(){try{return n=e,t=new Intl.PluralRules(n),{locale:n,pluralForms:o(t.resolvedOptions().pluralCategories),select:function(e){return t.select(e)}}}catch(i){return console.error('Failed to use Intl.PluralRules for locale "'+e+'".\nDocusaurus will fallback to the default (English) implementation.\nError: '+i.message+"\n"),s}var n,t}),[e])}function c(){var e=l();return{selectMessage:function(n,t){return function(e,n,t){var i=e.split("|");if(1===i.length)return i[0];i.length>t.pluralForms.length&&console.error("For locale="+t.locale+", a maximum of "+t.pluralForms.length+" plural forms are expected ("+t.pluralForms.join(",")+"), but the message contains "+i.length+": "+e);var r=t.select(n),a=t.pluralForms.indexOf(r);return i[Math.min(a,i.length-1)]}(t,n,e)}}}},28453:(e,n,t)=>{t.d(n,{R:()=>o,x:()=>s});var i=t(96540);const r={},a=i.createContext(r);function o(e){const n=i.useContext(a);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function s(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:o(e.components),i.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/ffd76171.dedf6a46.js b/assets/js/ffd76171.dedf6a46.js new file mode 100644 index 000000000000..831f2439eb33 --- /dev/null +++ b/assets/js/ffd76171.dedf6a46.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[639],{15038:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>l,default:()=>m,frontMatter:()=>s,metadata:()=>r,toc:()=>d});const r=JSON.parse('{"id":"maintain/maintain-index","title":"Network Maintainers","description":"Reference point for network maintenance guides.","source":"@site/../docs/maintain/maintain-index.md","sourceDirName":"maintain","slug":"/maintain-index","permalink":"/docs/maintain-index","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/maintain/maintain-index.md","tags":[],"version":"current","lastUpdatedBy":"Filippo","lastUpdatedAt":1727167801000,"frontMatter":{"id":"maintain-index","title":"Network Maintainers","sidebar_label":"Network Maintainers","description":"Reference point for network maintenance guides.","keywords":["maintain","validator","collator"],"slug":"../maintain-index"},"sidebar":"docs","previous":{"title":"Parachain Development","permalink":"/docs/build-pdk"},"next":{"title":"Parameters","permalink":"/docs/maintain-polkadot-parameters"}}');var i=t(74848),a=t(28453),o=t(3514);const s={id:"maintain-index",title:"Network Maintainers",sidebar_label:"Network Maintainers",description:"Reference point for network maintenance guides.",keywords:["maintain","validator","collator"],slug:"../maintain-index"},l=void 0,c={},d=[];function u(e){const n={a:"a",admonition:"admonition",li:"li",p:"p",ul:"ul",...(0,a.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.p,{children:"Welcome to the network maintainers section of the Polkadot Wiki. Here you will find information and\nguides to set up a node and run the network."}),"\n",(0,i.jsx)(o.A,{}),"\n",(0,i.jsxs)(n.admonition,{title:"Polkadot's Canary Network Kusama",type:"info",children:[(0,i.jsx)(n.p,{children:"For more information about being a Kusama maintainer, see the pages below:"}),(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.a,{href:"/docs/learn-nominator",children:"Nomination Guide"})," - Walkthrough on how to nominate on the Kusama\ncanary network."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.a,{href:"/docs/maintain-guides-how-to-validate-kusama",children:"Validation Guide (Kusama)"})," - Walkthrough on how\nto validate on the Kusama canary network."]}),"\n"]})]})]})}function m(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(u,{...e})}):u(e)}},3514:(e,n,t)=>{t.d(n,{A:()=>k});t(96540);var r=t(34164),i=t(26972),a=t(28774),o=t(53465),s=t(16654),l=t(21312),c=t(51107);const d={cardContainer:"cardContainer_fWXF",cardTitle:"cardTitle_rnsV",cardDescription:"cardDescription_PWke"};var u=t(74848);function m(e){var n=e.href,t=e.children;return(0,u.jsx)(a.A,{href:n,className:(0,r.A)("card padding--lg",d.cardContainer),children:t})}function f(e){var n=e.href,t=e.icon,i=e.title,a=e.description;return(0,u.jsxs)(m,{href:n,children:[(0,u.jsxs)(c.A,{as:"h2",className:(0,r.A)("text--truncate",d.cardTitle),title:i,children:[t," ",i]}),a&&(0,u.jsx)("p",{className:(0,r.A)("text--truncate",d.cardDescription),title:a,children:a})]})}function p(e){var n,t,r=e.item,a=(0,i.Nr)(r),s=(t=(0,o.W)().selectMessage,function(e){return t(e,(0,l.T)({message:"1 item|{count} items",id:"theme.docs.DocCard.categoryDescription.plurals",description:"The default description for a category card in the generated index about how many items this category includes"},{count:e}))});return a?(0,u.jsx)(f,{href:a,icon:"\ud83d\uddc3\ufe0f",title:r.label,description:null!=(n=r.description)?n:s(r.items.length)}):null}function h(e){var n,t,r=e.item,a=(0,s.A)(r.href)?"\ud83d\udcc4\ufe0f":"\ud83d\udd17",o=(0,i.cC)(null!=(n=r.docId)?n:void 0);return(0,u.jsx)(f,{href:r.href,icon:a,title:r.label,description:null!=(t=r.description)?t:null==o?void 0:o.description})}function x(e){var n=e.item;switch(n.type){case"link":return(0,u.jsx)(h,{item:n});case"category":return(0,u.jsx)(p,{item:n});default:throw new Error("unknown item type "+JSON.stringify(n))}}function g(e){var n=e.className,t=(0,i.$S)();return(0,u.jsx)(k,{items:t.items,className:n})}function k(e){var n=e.items,t=e.className;if(!n)return(0,u.jsx)(g,Object.assign({},e));var a=(0,i.d1)(n);return(0,u.jsx)("section",{className:(0,r.A)("row",t),children:a.map((function(e,n){return(0,u.jsx)("article",{className:"col col--6 margin-bottom--lg",children:(0,u.jsx)(x,{item:e})},n)}))})}},53465:(e,n,t)=>{t.d(n,{W:()=>c});var r=t(96540),i=t(44586),a=["zero","one","two","few","many","other"];function o(e){return a.filter((function(n){return e.includes(n)}))}var s={locale:"en",pluralForms:o(["one","other"]),select:function(e){return 1===e?"one":"other"}};function l(){var e=(0,i.A)().i18n.currentLocale;return(0,r.useMemo)((function(){try{return n=e,t=new Intl.PluralRules(n),{locale:n,pluralForms:o(t.resolvedOptions().pluralCategories),select:function(e){return t.select(e)}}}catch(r){return console.error('Failed to use Intl.PluralRules for locale "'+e+'".\nDocusaurus will fallback to the default (English) implementation.\nError: '+r.message+"\n"),s}var n,t}),[e])}function c(){var e=l();return{selectMessage:function(n,t){return function(e,n,t){var r=e.split("|");if(1===r.length)return r[0];r.length>t.pluralForms.length&&console.error("For locale="+t.locale+", a maximum of "+t.pluralForms.length+" plural forms are expected ("+t.pluralForms.join(",")+"), but the message contains "+r.length+": "+e);var i=t.select(n),a=t.pluralForms.indexOf(i);return r[Math.min(a,r.length-1)]}(t,n,e)}}}},28453:(e,n,t)=>{t.d(n,{R:()=>o,x:()=>s});var r=t(96540);const i={},a=r.createContext(i);function o(e){const n=r.useContext(a);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function s(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:o(e.components),r.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/ffe9c3c9.42760734.js b/assets/js/ffe9c3c9.42760734.js new file mode 100644 index 000000000000..2b83434e5427 --- /dev/null +++ b/assets/js/ffe9c3c9.42760734.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1967],{47995:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>o,default:()=>h,frontMatter:()=>r,metadata:()=>s,toc:()=>d});const s=JSON.parse('{"id":"learn/learn-DOT","title":"DOT","description":"Tokenomics of Polkadot\'s Native Token DOT.","source":"@site/../docs/learn/learn-DOT.md","sourceDirName":"learn","slug":"/learn-DOT","permalink":"/docs/learn-DOT","draft":false,"unlisted":false,"editUrl":"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-DOT.md","tags":[],"version":"current","lastUpdatedBy":"github-actions[bot]","lastUpdatedAt":1729496727000,"frontMatter":{"id":"learn-DOT","title":"DOT","sidebar_label":"DOT","description":"Tokenomics of Polkadot\'s Native Token DOT.","keywords":["token","DOT","what are the uses of DOT","KSM","faucet"],"slug":"../learn-DOT"},"sidebar":"docs","previous":{"title":"Tokens and Assets","permalink":"/docs/learn-assets-index"},"next":{"title":"Token Inflation","permalink":"/docs/learn-inflation"}}');var i=t(74848),a=t(28453);const r={id:"learn-DOT",title:"DOT",sidebar_label:"DOT",description:"Tokenomics of Polkadot's Native Token DOT.",keywords:["token","DOT","what are the uses of DOT","KSM","faucet"],slug:"../learn-DOT"},o=void 0,l={},d=[{value:"What is DOT?",id:"what-is-dot",level:2},{value:"The Planck Unit",id:"the-planck-unit",level:3},{value:"Polkadot",id:"polkadot",level:3},{value:"Kusama",id:"kusama",level:3},{value:"What are the uses of DOT?",id:"what-are-the-uses-of-dot",level:2},{value:"DOT for Governance",id:"dot-for-governance",level:3},{value:"DOT for Consensus",id:"dot-for-consensus",level:3},{value:"DOT to Access Cores on the Relay Chain",id:"dot-to-access-cores-on-the-relay-chain",level:3},{value:"Token Issuance",id:"token-issuance",level:3},{value:"Total Issuance",id:"total-issuance",level:4},{value:"Inactive Issuance",id:"inactive-issuance",level:4},{value:"Active Issuance",id:"active-issuance",level:4},{value:"Obtaining Testnet Tokens",id:"obtaining-testnet-tokens",level:2},{value:"Getting Tokens on the Paseo Testnet",id:"getting-tokens-on-the-paseo-testnet",level:3},{value:"Getting Tokens on the Westend Testnet",id:"getting-tokens-on-the-westend-testnet",level:3},{value:"Faucets support",id:"faucets-support",level:3},{value:"Kusama Tokens",id:"kusama-tokens",level:2},{value:"Polkadot Mainnet DOT",id:"polkadot-mainnet-dot",level:2}];function c(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",h4:"h4",li:"li",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,a.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h2,{id:"what-is-dot",children:"What is DOT?"}),"\n",(0,i.jsx)(n.p,{children:"DOT is the native token of the Polkadot network in a similar way that BTC is the native token of\nBitcoin or Ether is the native token of the Ethereum blockchain."}),"\n",(0,i.jsx)(n.h3,{id:"the-planck-unit",children:"The Planck Unit"}),"\n",(0,i.jsxs)(n.p,{children:["The smallest unit for the account balance on Substrate based blockchains (Polkadot, Kusama, etc.) is\nPlanck (a reference to ",(0,i.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/Planck_length",children:"Planck Length"}),", the smallest\npossible distance in the physical Universe). You can compare DOT's Planck to BTC's Satoshi or ETH's\nWei. Polkadot's native token DOT equals to 10",(0,i.jsx)("sup",{children:"10"})," Planck and Kusama's native token KSM\nequals to 10",(0,i.jsx)("sup",{children:"12"})," Planck."]}),"\n",(0,i.jsx)(n.h3,{id:"polkadot",children:"Polkadot"}),"\n",(0,i.jsxs)(n.table,{children:[(0,i.jsx)(n.thead,{children:(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.th,{children:"Unit"}),(0,i.jsx)(n.th,{children:"Decimal Places"}),(0,i.jsx)(n.th,{children:"Conversion to Planck"}),(0,i.jsx)(n.th,{children:"Conversion to DOT"})]})}),(0,i.jsxs)(n.tbody,{children:[(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"Planck"}),(0,i.jsx)(n.td,{children:"0"}),(0,i.jsx)(n.td,{children:"1 Planck"}),(0,i.jsx)(n.td,{children:"0.0000000001 DOT"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"Microdot (uDOT)"}),(0,i.jsx)(n.td,{children:"4"}),(0,i.jsxs)(n.td,{children:["10",(0,i.jsx)("sup",{children:"4"})," Planck"]}),(0,i.jsx)(n.td,{children:"0.0000010000 DOT"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"Millidot (mDOT)"}),(0,i.jsx)(n.td,{children:"7"}),(0,i.jsxs)(n.td,{children:["10",(0,i.jsx)("sup",{children:"7"})," Planck"]}),(0,i.jsx)(n.td,{children:"0.0010000000 DOT"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"Dot (DOT)"}),(0,i.jsx)(n.td,{children:"10"}),(0,i.jsxs)(n.td,{children:["10",(0,i.jsx)("sup",{children:"10"})," Planck"]}),(0,i.jsx)(n.td,{children:"1.0000000000 DOT"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"Million (MDOT)"}),(0,i.jsx)(n.td,{children:"16"}),(0,i.jsxs)(n.td,{children:["10",(0,i.jsx)("sup",{children:"16"})," Planck"]}),(0,i.jsx)(n.td,{children:"1,000,000.00 DOT"})]})]})]}),"\n",(0,i.jsx)(n.admonition,{title:"DOT was redenominated at block #1_248_328",type:"note",children:(0,i.jsxs)(n.p,{children:["DOT was originally equal to 10",(0,i.jsx)("sup",{children:"12"}),' Planck just like Kusama (which is referred to as "DOT\n(old)"), but went through a process of ',(0,i.jsx)(n.a,{href:"/docs/learn/learn-redenomination",children:"redenomination"})," which\nincreased DOT's supply by 100x. As a consequence, 1 DOT now equals to 10",(0,i.jsx)("sup",{children:"10"})," Planck."]})}),"\n",(0,i.jsx)(n.h3,{id:"kusama",children:"Kusama"}),"\n",(0,i.jsxs)(n.table,{children:[(0,i.jsx)(n.thead,{children:(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.th,{children:"Unit"}),(0,i.jsx)(n.th,{children:"Decimal Places"}),(0,i.jsx)(n.th,{children:"Conversion to Planck"}),(0,i.jsx)(n.th,{children:"Conversion to KSM"})]})}),(0,i.jsxs)(n.tbody,{children:[(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"Planck"}),(0,i.jsx)(n.td,{children:"0"}),(0,i.jsx)(n.td,{children:"1 Planck"}),(0,i.jsx)(n.td,{children:"0.000000000001 KSM"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"Point"}),(0,i.jsx)(n.td,{children:"3"}),(0,i.jsxs)(n.td,{children:["10",(0,i.jsx)("sup",{children:"3"})," Planck"]}),(0,i.jsx)(n.td,{children:"0.000000001000 KSM"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"MicroKSM (uKSM)"}),(0,i.jsx)(n.td,{children:"6"}),(0,i.jsxs)(n.td,{children:["10",(0,i.jsx)("sup",{children:"6"})," Planck"]}),(0,i.jsx)(n.td,{children:"0.000001000000 KSM"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"MilliKSM (mKSM)"}),(0,i.jsx)(n.td,{children:"9"}),(0,i.jsxs)(n.td,{children:["10",(0,i.jsx)("sup",{children:"9"})," Planck"]}),(0,i.jsx)(n.td,{children:"0.001000000000 KSM"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"KSM"}),(0,i.jsx)(n.td,{children:"12"}),(0,i.jsxs)(n.td,{children:["10",(0,i.jsx)("sup",{children:"12"})," Planck"]}),(0,i.jsx)(n.td,{children:"1.000000000000 KSM"})]})]})]}),"\n",(0,i.jsx)(n.h2,{id:"what-are-the-uses-of-dot",children:"What are the uses of DOT?"}),"\n",(0,i.jsx)(n.p,{children:"DOT serves three key functions in Polkadot:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"to be used for governance of the network,"}),"\n",(0,i.jsx)(n.li,{children:"to be staked for the operation of the network,"}),"\n",(0,i.jsx)(n.li,{children:"to be bonded to connect a chain to Polkadot as a parachain."}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"DOT can also serve ancillary functions by being a transferrable token. For example, DOT stored in\nthe Treasury can be sent to teams working on relevant projects for the Polkadot network."}),"\n",(0,i.jsx)(n.admonition,{title:"Explainer video on token utility",type:"note",children:(0,i.jsxs)(n.p,{children:["These concepts have been further explained in the video\n",(0,i.jsx)(n.a,{href:"https://www.youtube.com/watch?v=POfFgrMfkTo&list=PLOyWqupZ-WGuAuS00rK-pebTMAOxW41W8&index=7",children:"Usage of DOT and KSM on Polkadot and Kusama"}),"."]})}),"\n",(0,i.jsx)(n.h3,{id:"dot-for-governance",children:"DOT for Governance"}),"\n",(0,i.jsx)(n.p,{children:"The first function of DOT is to entitle holders to control the governance of the platform. Some\nfunctions that are included under the governance mechanism include determining the fees of the\nnetwork, the addition or removal of parachains, and exceptional events such as upgrades and fixes to\nthe Polkadot platform."}),"\n",(0,i.jsxs)(n.p,{children:["Polkadot will enable any holder of DOT to participate in governance. For details on how holders can\nparticipate in governance, as well as their rights and responsibilities, see the\n",(0,i.jsx)(n.a,{href:"/docs/learn-polkadot-opengov",children:"governance page"}),"."]}),"\n",(0,i.jsx)(n.h3,{id:"dot-for-consensus",children:"DOT for Consensus"}),"\n",(0,i.jsxs)(n.p,{children:["DOT will be used to facilitate the consensus mechanism that underpins Polkadot. For the platform to\nfunction and allow for valid transactions to be carried out across parachains, Polkadot will rely on\nholders of DOT to play active roles. Participants will put their DOT at risk (via staking) to\nperform these functions. The staking of DOT acts as a disincentive for malicious participants who\nwill be punished by the network by getting their DOT ",(0,i.jsx)(n.a,{href:"/docs/learn-offenses",children:"slashed"}),". The DOT\nrequired to participate in the network will vary depending on the activity that is being performed,\nthe duration the DOT will be staked for, and the total number of DOT staked. For more information\nabout staking on Polkadot visit ",(0,i.jsx)(n.a,{href:"/docs/learn-staking",children:"the dedicated staking page"}),"."]}),"\n",(0,i.jsx)(n.h3,{id:"dot-to-access-cores-on-the-relay-chain",children:"DOT to Access Cores on the Relay Chain"}),"\n",(0,i.jsxs)(n.p,{children:["DOT can be used to ",(0,i.jsx)(n.a,{href:"/docs/learn-agile-coretime",children:"purchase coretime in-bulk or on-demand"})," and access\nthe relay chain to benefit from Polkadot's security and interoperability."]}),"\n",(0,i.jsx)(n.h3,{id:"token-issuance",children:"Token Issuance"}),"\n",(0,i.jsx)(n.h4,{id:"total-issuance",children:"Total Issuance"}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.a,{href:"/docs/chain-state-values#total-issuance",children:"total issuance"})," is the total number of token\nunits in existence on the network."]}),"\n",(0,i.jsx)(n.h4,{id:"inactive-issuance",children:"Inactive Issuance"}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.a,{href:"/docs/chain-state-values#inactive-issuance",children:"inactive issuance"})," is the total units of\noutstanding deactivated balance on the network that cannot be used for participation in governance.\nThis comprises tokens locked away in crowdloans and nomination pools."]}),"\n",(0,i.jsx)(n.h4,{id:"active-issuance",children:"Active Issuance"}),"\n",(0,i.jsx)(n.p,{children:"Active issuance = Total issuance - Inactive issuance"}),"\n",(0,i.jsx)(n.p,{children:"All the tokens under active issuance are can be used to participate in the governance on-chain."}),"\n",(0,i.jsx)(n.h2,{id:"obtaining-testnet-tokens",children:"Obtaining Testnet Tokens"}),"\n",(0,i.jsx)(n.p,{children:"DOT are required to make transactions on the Polkadot network. Tokens on Polkadot's Testnets do not\nhave any value besides allowing you to experiment with the features on the network."}),"\n",(0,i.jsxs)(n.p,{children:["Tokens for each testnet described below can be obtained ",(0,i.jsx)(n.a,{href:"https://faucet.polkadot.io/",children:(0,i.jsx)(n.strong,{children:"here"})}),"."]}),"\n",(0,i.jsx)(n.h3,{id:"getting-tokens-on-the-paseo-testnet",children:"Getting Tokens on the Paseo Testnet"}),"\n",(0,i.jsxs)(n.p,{children:["The Paseo testnet mirrors the Polkadot runtime and it is maintained by the community. The PAS tokens\ncan be obtained ",(0,i.jsx)(n.a,{href:"https://faucet.polkadot.io/",children:"here"})," and have the same Planck conversion as\nPolkadot's native token DOT."]}),"\n",(0,i.jsxs)(n.table,{children:[(0,i.jsx)(n.thead,{children:(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.th,{children:"Unit"}),(0,i.jsx)(n.th,{children:"Decimal Places"}),(0,i.jsx)(n.th,{children:"Conversion to Planck"}),(0,i.jsx)(n.th,{children:"Conversion to PAS"})]})}),(0,i.jsxs)(n.tbody,{children:[(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"Planck"}),(0,i.jsx)(n.td,{children:"0"}),(0,i.jsx)(n.td,{children:"1 Planck"}),(0,i.jsx)(n.td,{children:"0.0000000001 PAS"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"Microdot (uPAS)"}),(0,i.jsx)(n.td,{children:"4"}),(0,i.jsxs)(n.td,{children:["10",(0,i.jsx)("sup",{children:"4"})," Planck"]}),(0,i.jsx)(n.td,{children:"0.0000010000 PAS"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"Millidot (mPAS)"}),(0,i.jsx)(n.td,{children:"7"}),(0,i.jsxs)(n.td,{children:["10",(0,i.jsx)("sup",{children:"7"})," Planck"]}),(0,i.jsx)(n.td,{children:"0.0010000000 PAS"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"Dot (PAS)"}),(0,i.jsx)(n.td,{children:"10"}),(0,i.jsxs)(n.td,{children:["10",(0,i.jsx)("sup",{children:"10"})," Planck"]}),(0,i.jsx)(n.td,{children:"1.0000000000 PAS"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"Million (MPAS)"}),(0,i.jsx)(n.td,{children:"16"}),(0,i.jsxs)(n.td,{children:["10",(0,i.jsx)("sup",{children:"16"})," Planck"]}),(0,i.jsx)(n.td,{children:"1,000,000.00 PAS"})]})]})]}),"\n",(0,i.jsxs)(n.p,{children:["Users can also obtain PAS by posting ",(0,i.jsx)(n.code,{children:"!drip "})," in the Matrix chatroom\n",(0,i.jsxs)(n.a,{href:"https://matrix.to/#/#paseo_faucet:matrix.org",children:["#paseo_faucet",":matrix",".org"]}),"."]}),"\n",(0,i.jsx)(n.h3,{id:"getting-tokens-on-the-westend-testnet",children:"Getting Tokens on the Westend Testnet"}),"\n",(0,i.jsxs)(n.p,{children:["Polkadot's testnet is called ",(0,i.jsx)(n.a,{href:"/docs/maintain-networks#westend-test-network",children:"Westend"}),".\nBesides the ",(0,i.jsx)(n.a,{href:"https://faucet.polkadot.io/westend",children:"official faucet"}),", you can obtain its native WND\ntokens by posting ",(0,i.jsx)(n.code,{children:"!drip "})," in the Matrix chatroom\n",(0,i.jsxs)(n.a,{href:"https://matrix.to/#/#westend_faucet:matrix.org",children:["#westend_faucet",":matrix",".org"]}),". Your account will be\ncredited with 1 WND by default. You can also specify to get more tokens by\n",(0,i.jsx)(n.code,{children:"!drip X"}),", where X is the number of tokens."]}),"\n",(0,i.jsxs)(n.p,{children:["On the Westend network, you can also earn WNDs as rewards by\n",(0,i.jsx)(n.a,{href:"/docs/learn-validator",children:"becoming a validator"}),". Watch the video below on how to get started on Westend."]}),"\n",(0,i.jsx)("div",{className:"row",children:(0,i.jsxs)("div",{className:"col text--center",children:[(0,i.jsx)("a",{href:"https://www.youtube.com/watch?v=0ji0ccZyb3k",children:(0,i.jsx)("img",{src:"https://img.youtube.com/vi/0ji0ccZyb3k/0.jpg",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,i.jsx)("p",{children:(0,i.jsx)("a",{href:"https://www.youtube.com/watch?v=0ji0ccZyb3k",children:"Testing Polkadot features on Westend"})})]})}),"\n",(0,i.jsxs)(n.table,{children:[(0,i.jsx)(n.thead,{children:(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.th,{children:"Unit"}),(0,i.jsx)(n.th,{children:"Decimal Places"}),(0,i.jsx)(n.th,{children:"Conversion to Planck"}),(0,i.jsx)(n.th,{children:"Conversion to WND"})]})}),(0,i.jsxs)(n.tbody,{children:[(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"Planck"}),(0,i.jsx)(n.td,{children:"0"}),(0,i.jsx)(n.td,{children:"1 Planck"}),(0,i.jsx)(n.td,{children:"0.000000000001 WND"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"Point"}),(0,i.jsx)(n.td,{children:"3"}),(0,i.jsxs)(n.td,{children:["10",(0,i.jsx)("sup",{children:"3"})," Planck"]}),(0,i.jsx)(n.td,{children:"0.000000001000 WND"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"MicroWND (uWND)"}),(0,i.jsx)(n.td,{children:"6"}),(0,i.jsxs)(n.td,{children:["10",(0,i.jsx)("sup",{children:"6"})," Planck"]}),(0,i.jsx)(n.td,{children:"0.000001000000 WND"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"MilliWND (mWND)"}),(0,i.jsx)(n.td,{children:"9"}),(0,i.jsxs)(n.td,{children:["10",(0,i.jsx)("sup",{children:"9"})," Planck"]}),(0,i.jsx)(n.td,{children:"0.001000000000 WND"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"WND"}),(0,i.jsx)(n.td,{children:"12"}),(0,i.jsxs)(n.td,{children:["10",(0,i.jsx)("sup",{children:"12"})," Planck"]}),(0,i.jsx)(n.td,{children:"1.000000000000 WND"})]})]})]}),"\n",(0,i.jsx)(n.h3,{id:"faucets-support",children:"Faucets support"}),"\n",(0,i.jsxs)(n.p,{children:["If you require help with using faucets, or wish to report an issue, there is a support chat\n",(0,i.jsxs)(n.a,{href:"https://matrix.to/#/#faucets-support:matrix.org",children:["#faucets-support",":matrix",".org"]}),", or you can\n",(0,i.jsx)(n.a,{href:"https://github.com/paritytech/polkadot-testnet-faucet/issues/new/choose",children:"create an issue"})," directly\nin the faucets repo"]}),"\n",(0,i.jsx)(n.h2,{id:"kusama-tokens",children:"Kusama Tokens"}),"\n",(0,i.jsxs)(n.p,{children:["Unlike testnet DOT, Kusama tokens are not freely given away. Kusama tokens are available via the\n",(0,i.jsx)(n.a,{href:"https://claim.kusama.network/",children:"claims process"})," (if you had DOT at the time of Kusama genesis) or\nthrough the ",(0,i.jsx)(n.a,{href:"/docs/learn/learn-treasury",children:"Treasury"}),". Alternatively, they can be obtained on the open\nmarket."]}),"\n",(0,i.jsx)(n.h2,{id:"polkadot-mainnet-dot",children:"Polkadot Mainnet DOT"}),"\n",(0,i.jsxs)(n.p,{children:["Polkadot Mainnet DOT are not freely given away. If you purchased DOT in the original 2017 offering,\nyou may claim them via the ",(0,i.jsx)(n.a,{href:"https://claims.polkadot.network/",children:"Polkadot claims process"}),".\nAlternatively, they are available on the open market."]})]})}function h(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(c,{...e})}):c(e)}},28453:(e,n,t)=>{t.d(n,{R:()=>r,x:()=>o});var s=t(96540);const i={},a=s.createContext(i);function r(e){const n=s.useContext(a);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),s.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/ffe9c3c9.bed74a13.js b/assets/js/ffe9c3c9.bed74a13.js deleted file mode 100644 index 71fd236699e7..000000000000 --- a/assets/js/ffe9c3c9.bed74a13.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1967],{99220:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>r,default:()=>h,frontMatter:()=>a,metadata:()=>o,toc:()=>d});var s=t(74848),i=t(28453);const a={id:"learn-DOT",title:"DOT",sidebar_label:"DOT",description:"Tokenomics of Polkadot's Native Token DOT.",keywords:["token","DOT","what are the uses of DOT","KSM","faucet"],slug:"../learn-DOT"},r=void 0,o={id:"learn/learn-DOT",title:"DOT",description:"Tokenomics of Polkadot's Native Token DOT.",source:"@site/../docs/learn/learn-DOT.md",sourceDirName:"learn",slug:"/learn-DOT",permalink:"/docs/learn-DOT",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-DOT.md",tags:[],version:"current",lastUpdatedBy:"github-actions[bot]",lastUpdatedAt:1729496727e3,frontMatter:{id:"learn-DOT",title:"DOT",sidebar_label:"DOT",description:"Tokenomics of Polkadot's Native Token DOT.",keywords:["token","DOT","what are the uses of DOT","KSM","faucet"],slug:"../learn-DOT"},sidebar:"docs",previous:{title:"Tokens and Assets",permalink:"/docs/learn-assets-index"},next:{title:"Token Inflation",permalink:"/docs/learn-inflation"}},l={},d=[{value:"What is DOT?",id:"what-is-dot",level:2},{value:"The Planck Unit",id:"the-planck-unit",level:3},{value:"Polkadot",id:"polkadot",level:3},{value:"Kusama",id:"kusama",level:3},{value:"What are the uses of DOT?",id:"what-are-the-uses-of-dot",level:2},{value:"DOT for Governance",id:"dot-for-governance",level:3},{value:"DOT for Consensus",id:"dot-for-consensus",level:3},{value:"DOT to Access Cores on the Relay Chain",id:"dot-to-access-cores-on-the-relay-chain",level:3},{value:"Token Issuance",id:"token-issuance",level:3},{value:"Total Issuance",id:"total-issuance",level:4},{value:"Inactive Issuance",id:"inactive-issuance",level:4},{value:"Active Issuance",id:"active-issuance",level:4},{value:"Obtaining Testnet Tokens",id:"obtaining-testnet-tokens",level:2},{value:"Getting Tokens on the Paseo Testnet",id:"getting-tokens-on-the-paseo-testnet",level:3},{value:"Getting Tokens on the Westend Testnet",id:"getting-tokens-on-the-westend-testnet",level:3},{value:"Faucets support",id:"faucets-support",level:3},{value:"Kusama Tokens",id:"kusama-tokens",level:2},{value:"Polkadot Mainnet DOT",id:"polkadot-mainnet-dot",level:2}];function c(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",h4:"h4",li:"li",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h2,{id:"what-is-dot",children:"What is DOT?"}),"\n",(0,s.jsx)(n.p,{children:"DOT is the native token of the Polkadot network in a similar way that BTC is the native token of\nBitcoin or Ether is the native token of the Ethereum blockchain."}),"\n",(0,s.jsx)(n.h3,{id:"the-planck-unit",children:"The Planck Unit"}),"\n",(0,s.jsxs)(n.p,{children:["The smallest unit for the account balance on Substrate based blockchains (Polkadot, Kusama, etc.) is\nPlanck (a reference to ",(0,s.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/Planck_length",children:"Planck Length"}),", the smallest\npossible distance in the physical Universe). You can compare DOT's Planck to BTC's Satoshi or ETH's\nWei. Polkadot's native token DOT equals to 10",(0,s.jsx)("sup",{children:"10"})," Planck and Kusama's native token KSM\nequals to 10",(0,s.jsx)("sup",{children:"12"})," Planck."]}),"\n",(0,s.jsx)(n.h3,{id:"polkadot",children:"Polkadot"}),"\n",(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Unit"}),(0,s.jsx)(n.th,{children:"Decimal Places"}),(0,s.jsx)(n.th,{children:"Conversion to Planck"}),(0,s.jsx)(n.th,{children:"Conversion to DOT"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Planck"}),(0,s.jsx)(n.td,{children:"0"}),(0,s.jsx)(n.td,{children:"1 Planck"}),(0,s.jsx)(n.td,{children:"0.0000000001 DOT"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Microdot (uDOT)"}),(0,s.jsx)(n.td,{children:"4"}),(0,s.jsxs)(n.td,{children:["10",(0,s.jsx)("sup",{children:"4"})," Planck"]}),(0,s.jsx)(n.td,{children:"0.0000010000 DOT"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Millidot (mDOT)"}),(0,s.jsx)(n.td,{children:"7"}),(0,s.jsxs)(n.td,{children:["10",(0,s.jsx)("sup",{children:"7"})," Planck"]}),(0,s.jsx)(n.td,{children:"0.0010000000 DOT"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Dot (DOT)"}),(0,s.jsx)(n.td,{children:"10"}),(0,s.jsxs)(n.td,{children:["10",(0,s.jsx)("sup",{children:"10"})," Planck"]}),(0,s.jsx)(n.td,{children:"1.0000000000 DOT"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Million (MDOT)"}),(0,s.jsx)(n.td,{children:"16"}),(0,s.jsxs)(n.td,{children:["10",(0,s.jsx)("sup",{children:"16"})," Planck"]}),(0,s.jsx)(n.td,{children:"1,000,000.00 DOT"})]})]})]}),"\n",(0,s.jsx)(n.admonition,{title:"DOT was redenominated at block #1_248_328",type:"note",children:(0,s.jsxs)(n.p,{children:["DOT was originally equal to 10",(0,s.jsx)("sup",{children:"12"}),' Planck just like Kusama (which is referred to as "DOT\n(old)"), but went through a process of ',(0,s.jsx)(n.a,{href:"/docs/learn/learn-redenomination",children:"redenomination"})," which\nincreased DOT's supply by 100x. As a consequence, 1 DOT now equals to 10",(0,s.jsx)("sup",{children:"10"})," Planck."]})}),"\n",(0,s.jsx)(n.h3,{id:"kusama",children:"Kusama"}),"\n",(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Unit"}),(0,s.jsx)(n.th,{children:"Decimal Places"}),(0,s.jsx)(n.th,{children:"Conversion to Planck"}),(0,s.jsx)(n.th,{children:"Conversion to KSM"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Planck"}),(0,s.jsx)(n.td,{children:"0"}),(0,s.jsx)(n.td,{children:"1 Planck"}),(0,s.jsx)(n.td,{children:"0.000000000001 KSM"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Point"}),(0,s.jsx)(n.td,{children:"3"}),(0,s.jsxs)(n.td,{children:["10",(0,s.jsx)("sup",{children:"3"})," Planck"]}),(0,s.jsx)(n.td,{children:"0.000000001000 KSM"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"MicroKSM (uKSM)"}),(0,s.jsx)(n.td,{children:"6"}),(0,s.jsxs)(n.td,{children:["10",(0,s.jsx)("sup",{children:"6"})," Planck"]}),(0,s.jsx)(n.td,{children:"0.000001000000 KSM"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"MilliKSM (mKSM)"}),(0,s.jsx)(n.td,{children:"9"}),(0,s.jsxs)(n.td,{children:["10",(0,s.jsx)("sup",{children:"9"})," Planck"]}),(0,s.jsx)(n.td,{children:"0.001000000000 KSM"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"KSM"}),(0,s.jsx)(n.td,{children:"12"}),(0,s.jsxs)(n.td,{children:["10",(0,s.jsx)("sup",{children:"12"})," Planck"]}),(0,s.jsx)(n.td,{children:"1.000000000000 KSM"})]})]})]}),"\n",(0,s.jsx)(n.h2,{id:"what-are-the-uses-of-dot",children:"What are the uses of DOT?"}),"\n",(0,s.jsx)(n.p,{children:"DOT serves three key functions in Polkadot:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"to be used for governance of the network,"}),"\n",(0,s.jsx)(n.li,{children:"to be staked for the operation of the network,"}),"\n",(0,s.jsx)(n.li,{children:"to be bonded to connect a chain to Polkadot as a parachain."}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"DOT can also serve ancillary functions by being a transferrable token. For example, DOT stored in\nthe Treasury can be sent to teams working on relevant projects for the Polkadot network."}),"\n",(0,s.jsx)(n.admonition,{title:"Explainer video on token utility",type:"note",children:(0,s.jsxs)(n.p,{children:["These concepts have been further explained in the video\n",(0,s.jsx)(n.a,{href:"https://www.youtube.com/watch?v=POfFgrMfkTo&list=PLOyWqupZ-WGuAuS00rK-pebTMAOxW41W8&index=7",children:"Usage of DOT and KSM on Polkadot and Kusama"}),"."]})}),"\n",(0,s.jsx)(n.h3,{id:"dot-for-governance",children:"DOT for Governance"}),"\n",(0,s.jsx)(n.p,{children:"The first function of DOT is to entitle holders to control the governance of the platform. Some\nfunctions that are included under the governance mechanism include determining the fees of the\nnetwork, the addition or removal of parachains, and exceptional events such as upgrades and fixes to\nthe Polkadot platform."}),"\n",(0,s.jsxs)(n.p,{children:["Polkadot will enable any holder of DOT to participate in governance. For details on how holders can\nparticipate in governance, as well as their rights and responsibilities, see the\n",(0,s.jsx)(n.a,{href:"/docs/learn-polkadot-opengov",children:"governance page"}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"dot-for-consensus",children:"DOT for Consensus"}),"\n",(0,s.jsxs)(n.p,{children:["DOT will be used to facilitate the consensus mechanism that underpins Polkadot. For the platform to\nfunction and allow for valid transactions to be carried out across parachains, Polkadot will rely on\nholders of DOT to play active roles. Participants will put their DOT at risk (via staking) to\nperform these functions. The staking of DOT acts as a disincentive for malicious participants who\nwill be punished by the network by getting their DOT ",(0,s.jsx)(n.a,{href:"/docs/learn-offenses",children:"slashed"}),". The DOT\nrequired to participate in the network will vary depending on the activity that is being performed,\nthe duration the DOT will be staked for, and the total number of DOT staked. For more information\nabout staking on Polkadot visit ",(0,s.jsx)(n.a,{href:"/docs/learn-staking",children:"the dedicated staking page"}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"dot-to-access-cores-on-the-relay-chain",children:"DOT to Access Cores on the Relay Chain"}),"\n",(0,s.jsxs)(n.p,{children:["DOT can be used to ",(0,s.jsx)(n.a,{href:"/docs/learn-agile-coretime",children:"purchase coretime in-bulk or on-demand"})," and access\nthe relay chain to benefit from Polkadot's security and interoperability."]}),"\n",(0,s.jsx)(n.h3,{id:"token-issuance",children:"Token Issuance"}),"\n",(0,s.jsx)(n.h4,{id:"total-issuance",children:"Total Issuance"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.a,{href:"/docs/chain-state-values#total-issuance",children:"total issuance"})," is the total number of token\nunits in existence on the network."]}),"\n",(0,s.jsx)(n.h4,{id:"inactive-issuance",children:"Inactive Issuance"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.a,{href:"/docs/chain-state-values#inactive-issuance",children:"inactive issuance"})," is the total units of\noutstanding deactivated balance on the network that cannot be used for participation in governance.\nThis comprises tokens locked away in crowdloans and nomination pools."]}),"\n",(0,s.jsx)(n.h4,{id:"active-issuance",children:"Active Issuance"}),"\n",(0,s.jsx)(n.p,{children:"Active issuance = Total issuance - Inactive issuance"}),"\n",(0,s.jsx)(n.p,{children:"All the tokens under active issuance are can be used to participate in the governance on-chain."}),"\n",(0,s.jsx)(n.h2,{id:"obtaining-testnet-tokens",children:"Obtaining Testnet Tokens"}),"\n",(0,s.jsx)(n.p,{children:"DOT are required to make transactions on the Polkadot network. Tokens on Polkadot's Testnets do not\nhave any value besides allowing you to experiment with the features on the network."}),"\n",(0,s.jsxs)(n.p,{children:["Tokens for each testnet described below can be obtained ",(0,s.jsx)(n.a,{href:"https://faucet.polkadot.io/",children:(0,s.jsx)(n.strong,{children:"here"})}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"getting-tokens-on-the-paseo-testnet",children:"Getting Tokens on the Paseo Testnet"}),"\n",(0,s.jsxs)(n.p,{children:["The Paseo testnet mirrors the Polkadot runtime and it is maintained by the community. The PAS tokens\ncan be obtained ",(0,s.jsx)(n.a,{href:"https://faucet.polkadot.io/",children:"here"})," and have the same Planck conversion as\nPolkadot's native token DOT."]}),"\n",(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Unit"}),(0,s.jsx)(n.th,{children:"Decimal Places"}),(0,s.jsx)(n.th,{children:"Conversion to Planck"}),(0,s.jsx)(n.th,{children:"Conversion to PAS"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Planck"}),(0,s.jsx)(n.td,{children:"0"}),(0,s.jsx)(n.td,{children:"1 Planck"}),(0,s.jsx)(n.td,{children:"0.0000000001 PAS"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Microdot (uPAS)"}),(0,s.jsx)(n.td,{children:"4"}),(0,s.jsxs)(n.td,{children:["10",(0,s.jsx)("sup",{children:"4"})," Planck"]}),(0,s.jsx)(n.td,{children:"0.0000010000 PAS"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Millidot (mPAS)"}),(0,s.jsx)(n.td,{children:"7"}),(0,s.jsxs)(n.td,{children:["10",(0,s.jsx)("sup",{children:"7"})," Planck"]}),(0,s.jsx)(n.td,{children:"0.0010000000 PAS"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Dot (PAS)"}),(0,s.jsx)(n.td,{children:"10"}),(0,s.jsxs)(n.td,{children:["10",(0,s.jsx)("sup",{children:"10"})," Planck"]}),(0,s.jsx)(n.td,{children:"1.0000000000 PAS"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Million (MPAS)"}),(0,s.jsx)(n.td,{children:"16"}),(0,s.jsxs)(n.td,{children:["10",(0,s.jsx)("sup",{children:"16"})," Planck"]}),(0,s.jsx)(n.td,{children:"1,000,000.00 PAS"})]})]})]}),"\n",(0,s.jsxs)(n.p,{children:["Users can also obtain PAS by posting ",(0,s.jsx)(n.code,{children:"!drip "})," in the Matrix chatroom\n",(0,s.jsxs)(n.a,{href:"https://matrix.to/#/#paseo_faucet:matrix.org",children:["#paseo_faucet",":matrix",".org"]}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"getting-tokens-on-the-westend-testnet",children:"Getting Tokens on the Westend Testnet"}),"\n",(0,s.jsxs)(n.p,{children:["Polkadot's testnet is called ",(0,s.jsx)(n.a,{href:"/docs/maintain-networks#westend-test-network",children:"Westend"}),".\nBesides the ",(0,s.jsx)(n.a,{href:"https://faucet.polkadot.io/westend",children:"official faucet"}),", you can obtain its native WND\ntokens by posting ",(0,s.jsx)(n.code,{children:"!drip "})," in the Matrix chatroom\n",(0,s.jsxs)(n.a,{href:"https://matrix.to/#/#westend_faucet:matrix.org",children:["#westend_faucet",":matrix",".org"]}),". Your account will be\ncredited with 1 WND by default. You can also specify to get more tokens by\n",(0,s.jsx)(n.code,{children:"!drip X"}),", where X is the number of tokens."]}),"\n",(0,s.jsxs)(n.p,{children:["On the Westend network, you can also earn WNDs as rewards by\n",(0,s.jsx)(n.a,{href:"/docs/learn-validator",children:"becoming a validator"}),". Watch the video below on how to get started on Westend."]}),"\n",(0,s.jsx)("div",{className:"row",children:(0,s.jsxs)("div",{className:"col text--center",children:[(0,s.jsx)("a",{href:"https://www.youtube.com/watch?v=0ji0ccZyb3k",children:(0,s.jsx)("img",{src:"https://img.youtube.com/vi/0ji0ccZyb3k/0.jpg",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,s.jsx)("p",{children:(0,s.jsx)("a",{href:"https://www.youtube.com/watch?v=0ji0ccZyb3k",children:"Testing Polkadot features on Westend"})})]})}),"\n",(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Unit"}),(0,s.jsx)(n.th,{children:"Decimal Places"}),(0,s.jsx)(n.th,{children:"Conversion to Planck"}),(0,s.jsx)(n.th,{children:"Conversion to WND"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Planck"}),(0,s.jsx)(n.td,{children:"0"}),(0,s.jsx)(n.td,{children:"1 Planck"}),(0,s.jsx)(n.td,{children:"0.000000000001 WND"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Point"}),(0,s.jsx)(n.td,{children:"3"}),(0,s.jsxs)(n.td,{children:["10",(0,s.jsx)("sup",{children:"3"})," Planck"]}),(0,s.jsx)(n.td,{children:"0.000000001000 WND"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"MicroWND (uWND)"}),(0,s.jsx)(n.td,{children:"6"}),(0,s.jsxs)(n.td,{children:["10",(0,s.jsx)("sup",{children:"6"})," Planck"]}),(0,s.jsx)(n.td,{children:"0.000001000000 WND"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"MilliWND (mWND)"}),(0,s.jsx)(n.td,{children:"9"}),(0,s.jsxs)(n.td,{children:["10",(0,s.jsx)("sup",{children:"9"})," Planck"]}),(0,s.jsx)(n.td,{children:"0.001000000000 WND"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"WND"}),(0,s.jsx)(n.td,{children:"12"}),(0,s.jsxs)(n.td,{children:["10",(0,s.jsx)("sup",{children:"12"})," Planck"]}),(0,s.jsx)(n.td,{children:"1.000000000000 WND"})]})]})]}),"\n",(0,s.jsx)(n.h3,{id:"faucets-support",children:"Faucets support"}),"\n",(0,s.jsxs)(n.p,{children:["If you require help with using faucets, or wish to report an issue, there is a support chat\n",(0,s.jsxs)(n.a,{href:"https://matrix.to/#/#faucets-support:matrix.org",children:["#faucets-support",":matrix",".org"]}),", or you can\n",(0,s.jsx)(n.a,{href:"https://github.com/paritytech/polkadot-testnet-faucet/issues/new/choose",children:"create an issue"})," directly\nin the faucets repo"]}),"\n",(0,s.jsx)(n.h2,{id:"kusama-tokens",children:"Kusama Tokens"}),"\n",(0,s.jsxs)(n.p,{children:["Unlike testnet DOT, Kusama tokens are not freely given away. Kusama tokens are available via the\n",(0,s.jsx)(n.a,{href:"https://claim.kusama.network/",children:"claims process"})," (if you had DOT at the time of Kusama genesis) or\nthrough the ",(0,s.jsx)(n.a,{href:"/docs/learn/learn-treasury",children:"Treasury"}),". Alternatively, they can be obtained on the open\nmarket."]}),"\n",(0,s.jsx)(n.h2,{id:"polkadot-mainnet-dot",children:"Polkadot Mainnet DOT"}),"\n",(0,s.jsxs)(n.p,{children:["Polkadot Mainnet DOT are not freely given away. If you purchased DOT in the original 2017 offering,\nyou may claim them via the ",(0,s.jsx)(n.a,{href:"https://claims.polkadot.network/",children:"Polkadot claims process"}),".\nAlternatively, they are available on the open market."]})]})}function h(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(c,{...e})}):c(e)}},28453:(e,n,t)=>{t.d(n,{R:()=>r,x:()=>o});var s=t(96540);const i={},a=s.createContext(i);function r(e){const n=s.useContext(a);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),s.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/main.99c097f0.js b/assets/js/main.99c097f0.js deleted file mode 100644 index 7210367f25c9..000000000000 --- a/assets/js/main.99c097f0.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! For license information please see main.99c097f0.js.LICENSE.txt */ -(self.webpackChunk=self.webpackChunk||[]).push([[8792],{55600:(e,t,n)=>{"use strict";n.d(t,{Bc:()=>b,E8:()=>Un,a1:()=>zn});var r=n(96540);n(40961);function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o=[],i=!0,s=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);i=!0);}catch(e){s=!0,a=e}finally{try{i||null==n.return||n.return()}finally{if(s)throw a}}return o}}(e,t)||d(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e){return function(e){if(Array.isArray(e))return p(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||d(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,t){if(e){if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?p(e,t):void 0}}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function R(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function L(e){for(var t=1;t=3||2===n&&r>=4||1===n&&r>=10);function o(t,n,r){if(a&&void 0!==r){var o=r[0].__autocomplete_algoliaCredentials,i={"X-Algolia-Application-Id":o.appId,"X-Algolia-API-Key":o.apiKey};e.apply(void 0,[t].concat(T(n),[{headers:i}]))}else e.apply(void 0,[t].concat(T(n)))}return{init:function(t,n){e("init",{appId:t,apiKey:n})},setUserToken:function(t){e("setUserToken",t)},clickedObjectIDsAfterSearch:function(){for(var e=arguments.length,t=new Array(e),n=0;n0&&o("clickedObjectIDsAfterSearch",M(t),t[0].items)},clickedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),n=0;n0&&o("clickedObjectIDs",M(t),t[0].items)},clickedFilters:function(){for(var t=arguments.length,n=new Array(t),r=0;r0&&e.apply(void 0,["clickedFilters"].concat(n))},convertedObjectIDsAfterSearch:function(){for(var e=arguments.length,t=new Array(e),n=0;n0&&o("convertedObjectIDsAfterSearch",M(t),t[0].items)},convertedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),n=0;n0&&o("convertedObjectIDs",M(t),t[0].items)},convertedFilters:function(){for(var t=arguments.length,n=new Array(t),r=0;r0&&e.apply(void 0,["convertedFilters"].concat(n))},viewedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),n=0;n0&&t.reduce((function(e,t){var n=t.items,r=N(t,C);return[].concat(T(e),T(function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:20,n=[],r=0;r0&&e.apply(void 0,["viewedFilters"].concat(n))}}}function B(e){var t=e.items.reduce((function(e,t){var n;return e[t.__autocomplete_indexName]=(null!==(n=e[t.__autocomplete_indexName])&&void 0!==n?n:[]).concat(t),e}),{});return Object.keys(t).map((function(e){return{index:e,items:t[e],algoliaSource:["autocomplete"]}}))}function z(e){return e.objectID&&e.__autocomplete_indexName&&e.__autocomplete_queryID}function U(e){return U="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},U(e)}function $(e){return function(e){if(Array.isArray(e))return q(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return q(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?q(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function q(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&G({onItemsChange:r,items:n,insights:s,state:t}))}}),0);return{name:"aa.algoliaInsightsPlugin",subscribe:function(e){var t=e.setContext,n=e.onSelect,r=e.onActive;i("addAlgoliaAgent","insights-plugin"),t({algoliaInsightsPlugin:{__algoliaSearchParameters:{clickAnalytics:!0},insights:s}}),n((function(e){var t=e.item,n=e.state,r=e.event;z(t)&&a({state:n,event:r,insights:s,item:t,insightsEvents:[V({eventName:"Item Selected"},j({item:t,items:c.current}))]})})),r((function(e){var t=e.item,n=e.state,r=e.event;z(t)&&o({state:n,event:r,insights:s,item:t,insightsEvents:[V({eventName:"Item Active"},j({item:t,items:c.current}))]})}))},onStateChange:function(e){var t=e.state;l({state:t})},__autocomplete_pluginOptions:e}}function Y(e,t){var n=t;return{then:function(t,r){return Y(e.then(X(t,n,e),X(r,n,e)),n)},catch:function(t){return Y(e.catch(X(t,n,e)),n)},finally:function(t){return t&&n.onCancelList.push(t),Y(e.finally(X(t&&function(){return n.onCancelList=[],t()},n,e)),n)},cancel:function(){n.isCanceled=!0;var e=n.onCancelList;n.onCancelList=[],e.forEach((function(e){e()}))},isCanceled:function(){return!0===n.isCanceled}}}function Z(e){return Y(e,{isCanceled:!1,onCancelList:[]})}function X(e,t,n){return e?function(n){return t.isCanceled?n:e(n)}:n}function J(e,t,n,r){if(!n)return null;if(e<0&&(null===t||null!==r&&0===t))return n+e;var a=(null===t?-1:t)+e;return a<=-1||a>=n?null===r?null:0:a}function ee(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function te(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0},reshape:function(e){return e.sources}},e),{},{id:null!==(n=e.id)&&void 0!==n?n:"autocomplete-".concat(x++),plugins:a,initialState:be({activeItemId:null,query:"",completion:null,collections:[],isOpen:!1,status:"idle",context:{}},e.initialState),onStateChange:function(t){var n;null===(n=e.onStateChange)||void 0===n||n.call(e,t),a.forEach((function(e){var n;return null===(n=e.onStateChange)||void 0===n?void 0:n.call(e,t)}))},onSubmit:function(t){var n;null===(n=e.onSubmit)||void 0===n||n.call(e,t),a.forEach((function(e){var n;return null===(n=e.onSubmit)||void 0===n?void 0:n.call(e,t)}))},onReset:function(t){var n;null===(n=e.onReset)||void 0===n||n.call(e,t),a.forEach((function(e){var n;return null===(n=e.onReset)||void 0===n?void 0:n.call(e,t)}))},getSources:function(n){return Promise.all([].concat(function(e){return function(e){if(Array.isArray(e))return me(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return me(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?me(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(a.map((function(e){return e.getSources}))),[e.getSources]).filter(Boolean).map((function(e){return function(e,t){var n=[];return Promise.resolve(e(t)).then((function(e){return Promise.all(e.filter((function(e){return Boolean(e)})).map((function(e){if(e.sourceId,n.includes(e.sourceId))throw new Error("[Autocomplete] The `sourceId` ".concat(JSON.stringify(e.sourceId)," is not unique."));n.push(e.sourceId);var t={getItemInputValue:function(e){return e.state.query},getItemUrl:function(){},onSelect:function(e){(0,e.setIsOpen)(!1)},onActive:S,onResolve:S};Object.keys(t).forEach((function(e){t[e].__default=!0}));var r=te(te({},t),e);return Promise.resolve(r)})))}))}(e,n)}))).then((function(e){return v(e)})).then((function(e){return e.map((function(e){return be(be({},e),{},{onSelect:function(n){e.onSelect(n),t.forEach((function(e){var t;return null===(t=e.onSelect)||void 0===t?void 0:t.call(e,n)}))},onActive:function(n){e.onActive(n),t.forEach((function(e){var t;return null===(t=e.onActive)||void 0===t?void 0:t.call(e,n)}))},onResolve:function(n){e.onResolve(n),t.forEach((function(e){var t;return null===(t=e.onResolve)||void 0===t?void 0:t.call(e,n)}))}})}))}))},navigator:be({navigate:function(e){var t=e.itemUrl;r.location.assign(t)},navigateNewTab:function(e){var t=e.itemUrl,n=r.open(t,"_blank","noopener");null==n||n.focus()},navigateNewWindow:function(e){var t=e.itemUrl;r.open(t,"_blank","noopener")}},e.navigator)})}function ve(e){return ve="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ve(e)}function xe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function we(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,Ie);Be&&a.environment.clearTimeout(Be);var l=c.setCollections,u=c.setIsOpen,d=c.setQuery,p=c.setActiveItemId,f=c.setStatus;if(d(o),p(a.defaultActiveItemId),!o&&!1===a.openOnFocus){var m,h=s.getState().collections.map((function(e){return Re(Re({},e),{},{items:[]})}));f("idle"),l(h),u(null!==(m=r.isOpen)&&void 0!==m?m:a.shouldPanelOpen({state:s.getState()}));var b=Z(ze(h).then((function(){return Promise.resolve()})));return s.pendingRequests.add(b)}f("loading"),Be=a.environment.setTimeout((function(){f("stalled")}),a.stallThreshold);var g=Z(ze(a.getSources(Re({query:o,refresh:i,state:s.getState()},c)).then((function(e){return Promise.all(e.map((function(e){return Promise.resolve(e.getItems(Re({query:o,refresh:i,state:s.getState()},c))).then((function(t){return function(e,t,n){if(a=e,Boolean(null==a?void 0:a.execute)){var r="algolia"===e.requesterId?Object.assign.apply(Object,[{}].concat(Oe(Object.keys(n.context).map((function(e){var t;return null===(t=n.context[e])||void 0===t?void 0:t.__algoliaSearchParameters}))))):{};return Ee(Ee({},e),{},{requests:e.queries.map((function(n){return{query:"algolia"===e.requesterId?Ee(Ee({},n),{},{params:Ee(Ee({},r),n.params)}):n,sourceId:t,transformResponse:e.transformResponse}}))})}var a;return{items:e,sourceId:t}}(t,e.sourceId,s.getState())}))}))).then(Pe).then((function(t){return function(e,t,n){return t.map((function(t){var r,a=e.filter((function(e){return e.sourceId===t.sourceId})),o=a.map((function(e){return e.items})),i=a[0].transformResponse,s=i?i({results:r=o,hits:r.map((function(e){return e.hits})).filter(Boolean),facetHits:r.map((function(e){var t;return null===(t=e.facetHits)||void 0===t?void 0:t.map((function(e){return{label:e.value,count:e.count,_highlightResult:{label:{value:e.highlighted}}}}))})).filter(Boolean)}):o;return t.onResolve({source:t,results:o,items:s,state:n.getState()}),s.every(Boolean),'The `getItems` function from source "'.concat(t.sourceId,'" must return an array of items but returned ').concat(JSON.stringify(void 0),".\n\nDid you forget to return items?\n\nSee: https://www.algolia.com/doc/ui-libraries/autocomplete/core-concepts/sources/#param-getitems"),{source:t,items:s}}))}(t,e,s)})).then((function(e){return function(e){var t=e.props,n=e.state,r=e.collections.reduce((function(e,t){return we(we({},e),{},ke({},t.source.sourceId,we(we({},t.source),{},{getItems:function(){return v(t.items)}})))}),{}),a=t.plugins.reduce((function(e,t){return t.reshape?t.reshape(e):e}),{sourcesBySourceId:r,state:n}).sourcesBySourceId;return v(t.reshape({sourcesBySourceId:a,sources:Object.values(a),state:n})).filter(Boolean).map((function(e){return{source:e,items:e.getItems()}}))}({collections:e,props:a,state:s.getState()})}))})))).then((function(e){var n;f("idle"),l(e);var d=a.shouldPanelOpen({state:s.getState()});u(null!==(n=r.isOpen)&&void 0!==n?n:a.openOnFocus&&!o&&d||d);var p=ae(s.getState());if(null!==s.getState().activeItemId&&p){var m=p.item,h=p.itemInputValue,b=p.itemUrl,g=p.source;g.onActive(Re({event:t,item:m,itemInputValue:h,itemUrl:b,refresh:i,source:g,state:s.getState()},c))}})).finally((function(){f("idle"),Be&&a.environment.clearTimeout(Be)}));return s.pendingRequests.add(g)}function $e(e){return $e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$e(e)}var qe=["event","props","refresh","store"];function He(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ve(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function ot(e){var t=e.props,n=e.refresh,r=e.store,a=at(e,Ge),o=function(e,t){return void 0!==t?"".concat(e,"-").concat(t):e};return{getEnvironmentProps:function(e){var n=e.inputElement,a=e.formElement,o=e.panelElement;function i(e){!r.getState().isOpen&&r.pendingRequests.isEmpty()||e.target===n||!1===[a,o].some((function(t){return(n=t)===(r=e.target)||n.contains(r);var n,r}))&&(r.dispatch("blur",null),t.debug||r.pendingRequests.cancelAll())}return nt({onTouchStart:i,onMouseDown:i,onTouchMove:function(e){!1!==r.getState().isOpen&&n===t.environment.document.activeElement&&e.target!==n&&n.blur()}},at(e,Qe))},getRootProps:function(e){return nt({role:"combobox","aria-expanded":r.getState().isOpen,"aria-haspopup":"listbox","aria-owns":r.getState().isOpen?"".concat(t.id,"-list"):void 0,"aria-labelledby":"".concat(t.id,"-label")},e)},getFormProps:function(e){return e.inputElement,nt({action:"",noValidate:!0,role:"search",onSubmit:function(o){var i;o.preventDefault(),t.onSubmit(nt({event:o,refresh:n,state:r.getState()},a)),r.dispatch("submit",null),null===(i=e.inputElement)||void 0===i||i.blur()},onReset:function(o){var i;o.preventDefault(),t.onReset(nt({event:o,refresh:n,state:r.getState()},a)),r.dispatch("reset",null),null===(i=e.inputElement)||void 0===i||i.focus()}},at(e,Ye))},getLabelProps:function(e){var n=e||{},r=n.sourceIndex,a=at(n,Xe);return nt({htmlFor:"".concat(o(t.id,r),"-input"),id:"".concat(o(t.id,r),"-label")},a)},getInputProps:function(e){var o;function i(e){(t.openOnFocus||Boolean(r.getState().query))&&Ue(nt({event:e,props:t,query:r.getState().completion||r.getState().query,refresh:n,store:r},a)),r.dispatch("focus",null)}var s=e||{},c=(s.inputElement,s.maxLength),l=void 0===c?512:c,u=at(s,Ze),d=ae(r.getState()),p=function(e){return Boolean(e&&e.match(oe))}((null===(o=t.environment.navigator)||void 0===o?void 0:o.userAgent)||""),f=null!=d&&d.itemUrl&&!p?"go":"search";return nt({"aria-autocomplete":"both","aria-activedescendant":r.getState().isOpen&&null!==r.getState().activeItemId?"".concat(t.id,"-item-").concat(r.getState().activeItemId):void 0,"aria-controls":r.getState().isOpen?"".concat(t.id,"-list"):void 0,"aria-labelledby":"".concat(t.id,"-label"),value:r.getState().completion||r.getState().query,id:"".concat(t.id,"-input"),autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",enterKeyHint:f,spellCheck:"false",autoFocus:t.autoFocus,placeholder:t.placeholder,maxLength:l,type:"search",onChange:function(e){Ue(nt({event:e,props:t,query:e.currentTarget.value.slice(0,l),refresh:n,store:r},a))},onKeyDown:function(e){!function(e){var t=e.event,n=e.props,r=e.refresh,a=e.store,o=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,qe);if("ArrowUp"===t.key||"ArrowDown"===t.key){var i=function(){var e=n.environment.document.getElementById("".concat(n.id,"-item-").concat(a.getState().activeItemId));e&&(e.scrollIntoViewIfNeeded?e.scrollIntoViewIfNeeded(!1):e.scrollIntoView(!1))},s=function(){var e=ae(a.getState());if(null!==a.getState().activeItemId&&e){var n=e.item,i=e.itemInputValue,s=e.itemUrl,c=e.source;c.onActive(Ve({event:t,item:n,itemInputValue:i,itemUrl:s,refresh:r,source:c,state:a.getState()},o))}};t.preventDefault(),!1===a.getState().isOpen&&(n.openOnFocus||Boolean(a.getState().query))?Ue(Ve({event:t,props:n,query:a.getState().query,refresh:r,store:a},o)).then((function(){a.dispatch(t.key,{nextActiveItemId:n.defaultActiveItemId}),s(),setTimeout(i,0)})):(a.dispatch(t.key,{}),s(),i())}else if("Escape"===t.key)t.preventDefault(),a.dispatch(t.key,null),a.pendingRequests.cancelAll();else if("Tab"===t.key)a.dispatch("blur",null),a.pendingRequests.cancelAll();else if("Enter"===t.key){if(null===a.getState().activeItemId||a.getState().collections.every((function(e){return 0===e.items.length})))return void(n.debug||a.pendingRequests.cancelAll());t.preventDefault();var c=ae(a.getState()),l=c.item,u=c.itemInputValue,d=c.itemUrl,p=c.source;if(t.metaKey||t.ctrlKey)void 0!==d&&(p.onSelect(Ve({event:t,item:l,itemInputValue:u,itemUrl:d,refresh:r,source:p,state:a.getState()},o)),n.navigator.navigateNewTab({itemUrl:d,item:l,state:a.getState()}));else if(t.shiftKey)void 0!==d&&(p.onSelect(Ve({event:t,item:l,itemInputValue:u,itemUrl:d,refresh:r,source:p,state:a.getState()},o)),n.navigator.navigateNewWindow({itemUrl:d,item:l,state:a.getState()}));else if(t.altKey);else{if(void 0!==d)return p.onSelect(Ve({event:t,item:l,itemInputValue:u,itemUrl:d,refresh:r,source:p,state:a.getState()},o)),void n.navigator.navigate({itemUrl:d,item:l,state:a.getState()});Ue(Ve({event:t,nextState:{isOpen:!1},props:n,query:u,refresh:r,store:a},o)).then((function(){p.onSelect(Ve({event:t,item:l,itemInputValue:u,itemUrl:d,refresh:r,source:p,state:a.getState()},o))}))}}}(nt({event:e,props:t,refresh:n,store:r},a))},onFocus:i,onBlur:S,onClick:function(n){e.inputElement!==t.environment.document.activeElement||r.getState().isOpen||i(n)}},u)},getPanelProps:function(e){return nt({onMouseDown:function(e){e.preventDefault()},onMouseLeave:function(){r.dispatch("mouseleave",null)}},e)},getListProps:function(e){var n=e||{},r=n.sourceIndex,a=at(n,Je);return nt({role:"listbox","aria-labelledby":"".concat(o(t.id,r),"-label"),id:"".concat(o(t.id,r),"-list")},a)},getItemProps:function(e){var i=e.item,s=e.source,c=e.sourceIndex,l=at(e,et);return nt({id:"".concat(o(t.id,c),"-item-").concat(i.__autocomplete_id),role:"option","aria-selected":r.getState().activeItemId===i.__autocomplete_id,onMouseMove:function(e){if(i.__autocomplete_id!==r.getState().activeItemId){r.dispatch("mousemove",i.__autocomplete_id);var t=ae(r.getState());if(null!==r.getState().activeItemId&&t){var o=t.item,s=t.itemInputValue,c=t.itemUrl,l=t.source;l.onActive(nt({event:e,item:o,itemInputValue:s,itemUrl:c,refresh:n,source:l,state:r.getState()},a))}}},onMouseDown:function(e){e.preventDefault()},onClick:function(e){var o=s.getItemInputValue({item:i,state:r.getState()}),c=s.getItemUrl({item:i,state:r.getState()});(c?Promise.resolve():Ue(nt({event:e,nextState:{isOpen:!1},props:t,query:o,refresh:n,store:r},a))).then((function(){s.onSelect(nt({event:e,item:i,itemInputValue:o,itemUrl:c,refresh:n,source:s,state:r.getState()},a))}))}},l)}}}function it(e){return it="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},it(e)}function st(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ct(e){for(var t=1;t0&&r.createElement("div",{className:"DocSearch-NoResults-Prefill-List"},r.createElement("p",{className:"DocSearch-Help"},l,":"),r.createElement("ul",null,h.slice(0,3).reduce((function(e,t){return[].concat(u(e),[r.createElement("li",{key:t},r.createElement("button",{className:"DocSearch-Prefill",key:t,type:"button",onClick:function(){a.setQuery(t.toLowerCase()+" "),a.refresh(),a.inputRef.current.focus()}},t))])}),[]))),a.getMissingResultsUrl&&r.createElement("p",{className:"DocSearch-Help"},"".concat(p," "),r.createElement("a",{href:a.getMissingResultsUrl({query:a.state.query}),target:"_blank",rel:"noopener noreferrer"},m)))}var zt=["hit","attribute","tagName"];function Ut(e,t){return t.split(".").reduce((function(e,t){return null!=e&&e[t]?e[t]:null}),e)}function $t(e){var t=e.hit,n=e.attribute,a=e.tagName,i=void 0===a?"span":a,s=c(e,zt);return(0,r.createElement)(i,o(o({},s),{},{dangerouslySetInnerHTML:{__html:Ut(t,"_snippetResult.".concat(n,".value"))||Ut(t,n)}}))}function qt(e){return e.collection&&0!==e.collection.items.length?r.createElement("section",{className:"DocSearch-Hits"},r.createElement("div",{className:"DocSearch-Hit-source"},e.title),r.createElement("ul",e.getListProps(),e.collection.items.map((function(t,n){return r.createElement(Ht,s({key:[e.title,t.objectID].join(":"),item:t,index:n},e))})))):null}function Ht(e){var t=e.item,n=e.index,a=e.renderIcon,o=e.renderAction,i=e.getItemProps,c=e.onItemClick,u=e.collection,d=e.hitComponent,p=l(r.useState(!1),2),f=p[0],m=p[1],h=l(r.useState(!1),2),b=h[0],g=h[1],y=r.useRef(null),v=d;return r.createElement("li",s({className:["DocSearch-Hit",t.__docsearch_parent&&"DocSearch-Hit--Child",f&&"DocSearch-Hit--deleting",b&&"DocSearch-Hit--favoriting"].filter(Boolean).join(" "),onTransitionEnd:function(){y.current&&y.current()}},i({item:t,source:u.source,onClick:function(e){c(t,e)}})),r.createElement(v,{hit:t},r.createElement("div",{className:"DocSearch-Hit-Container"},a({item:t,index:n}),t.hierarchy[t.type]&&"lvl1"===t.type&&r.createElement("div",{className:"DocSearch-Hit-content-wrapper"},r.createElement($t,{className:"DocSearch-Hit-title",hit:t,attribute:"hierarchy.lvl1"}),t.content&&r.createElement($t,{className:"DocSearch-Hit-path",hit:t,attribute:"content"})),t.hierarchy[t.type]&&("lvl2"===t.type||"lvl3"===t.type||"lvl4"===t.type||"lvl5"===t.type||"lvl6"===t.type)&&r.createElement("div",{className:"DocSearch-Hit-content-wrapper"},r.createElement($t,{className:"DocSearch-Hit-title",hit:t,attribute:"hierarchy.".concat(t.type)}),r.createElement($t,{className:"DocSearch-Hit-path",hit:t,attribute:"hierarchy.lvl1"})),"content"===t.type&&r.createElement("div",{className:"DocSearch-Hit-content-wrapper"},r.createElement($t,{className:"DocSearch-Hit-title",hit:t,attribute:"content"}),r.createElement($t,{className:"DocSearch-Hit-path",hit:t,attribute:"hierarchy.lvl1"})),o({item:t,runDeleteTransition:function(e){m(!0),y.current=e},runFavoriteTransition:function(e){g(!0),y.current=e}}))))}function Vt(e,t,n){return e.reduce((function(e,r){var a=t(r);return e.hasOwnProperty(a)||(e[a]=[]),e[a].length<(n||5)&&e[a].push(r),e}),{})}function Wt(e){return e}function Kt(e){return 1===e.button||e.altKey||e.ctrlKey||e.metaKey||e.shiftKey}function Gt(){}var Qt=/(|<\/mark>)/g,Yt=RegExp(Qt.source);function Zt(e){var t,n,r=e;if(!r.__docsearch_parent&&!e._highlightResult)return e.hierarchy.lvl0;var a=((r.__docsearch_parent?null===(t=r.__docsearch_parent)||void 0===t||null===(t=t._highlightResult)||void 0===t||null===(t=t.hierarchy)||void 0===t?void 0:t.lvl0:null===(n=e._highlightResult)||void 0===n||null===(n=n.hierarchy)||void 0===n?void 0:n.lvl0)||{}).value;return a&&Yt.test(a)?a.replace(Qt,""):a}function Xt(e){return r.createElement("div",{className:"DocSearch-Dropdown-Container"},e.state.collections.map((function(t){if(0===t.items.length)return null;var n=Zt(t.items[0]);return r.createElement(qt,s({},e,{key:t.source.sourceId,title:n,collection:t,renderIcon:function(e){var n,a=e.item,o=e.index;return r.createElement(r.Fragment,null,a.__docsearch_parent&&r.createElement("svg",{className:"DocSearch-Hit-Tree",viewBox:"0 0 24 54"},r.createElement("g",{stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},a.__docsearch_parent!==(null===(n=t.items[o+1])||void 0===n?void 0:n.__docsearch_parent)?r.createElement("path",{d:"M8 6v21M20 27H8.3"}):r.createElement("path",{d:"M8 6v42M20 27H8.3"}))),r.createElement("div",{className:"DocSearch-Hit-icon"},r.createElement(Tt,{type:a.type})))},renderAction:function(){return r.createElement("div",{className:"DocSearch-Hit-action"},r.createElement(Ct,null))}}))})),e.resultsFooterComponent&&r.createElement("section",{className:"DocSearch-HitsFooter"},r.createElement(e.resultsFooterComponent,{state:e.state})))}var Jt=["translations"];function en(e){var t=e.translations,n=void 0===t?{}:t,a=c(e,Jt),o=n.recentSearchesTitle,i=void 0===o?"Recent":o,l=n.noRecentSearchesText,u=void 0===l?"No recent searches":l,d=n.saveRecentSearchButtonTitle,p=void 0===d?"Save this search":d,f=n.removeRecentSearchButtonTitle,m=void 0===f?"Remove this search from history":f,h=n.favoriteSearchesTitle,b=void 0===h?"Favorite":h,g=n.removeFavoriteSearchButtonTitle,y=void 0===g?"Remove this search from favorites":g;return"idle"===a.state.status&&!1===a.hasCollections?a.disableUserPersonalization?null:r.createElement("div",{className:"DocSearch-StartScreen"},r.createElement("p",{className:"DocSearch-Help"},u)):!1===a.hasCollections?null:r.createElement("div",{className:"DocSearch-Dropdown-Container"},r.createElement(qt,s({},a,{title:i,collection:a.state.collections[0],renderIcon:function(){return r.createElement("div",{className:"DocSearch-Hit-icon"},r.createElement(Ot,null))},renderAction:function(e){var t=e.item,n=e.runFavoriteTransition,o=e.runDeleteTransition;return r.createElement(r.Fragment,null,r.createElement("div",{className:"DocSearch-Hit-action"},r.createElement("button",{className:"DocSearch-Hit-action-button",title:p,type:"submit",onClick:function(e){e.preventDefault(),e.stopPropagation(),n((function(){a.favoriteSearches.add(t),a.recentSearches.remove(t),a.refresh()}))}},r.createElement(Rt,null))),r.createElement("div",{className:"DocSearch-Hit-action"},r.createElement("button",{className:"DocSearch-Hit-action-button",title:m,type:"submit",onClick:function(e){e.preventDefault(),e.stopPropagation(),o((function(){a.recentSearches.remove(t),a.refresh()}))}},r.createElement(At,null))))}})),r.createElement(qt,s({},a,{title:b,collection:a.state.collections[1],renderIcon:function(){return r.createElement("div",{className:"DocSearch-Hit-icon"},r.createElement(Rt,null))},renderAction:function(e){var t=e.item,n=e.runDeleteTransition;return r.createElement("div",{className:"DocSearch-Hit-action"},r.createElement("button",{className:"DocSearch-Hit-action-button",title:y,type:"submit",onClick:function(e){e.preventDefault(),e.stopPropagation(),n((function(){a.favoriteSearches.remove(t),a.refresh()}))}},r.createElement(At,null)))}})))}var tn=["translations"],nn=r.memo((function(e){var t=e.translations,n=void 0===t?{}:t,a=c(e,tn);if("error"===a.state.status)return r.createElement(Mt,{translations:null==n?void 0:n.errorScreen});var o=a.state.collections.some((function(e){return e.items.length>0}));return a.state.query?!1===o?r.createElement(Bt,s({},a,{translations:null==n?void 0:n.noResultsScreen})):r.createElement(Xt,a):r.createElement(en,s({},a,{hasCollections:o,translations:null==n?void 0:n.startScreen}))}),(function(e,t){return"loading"===t.state.status||"stalled"===t.state.status})),rn=["translations"];function an(e){var t=e.translations,n=void 0===t?{}:t,a=c(e,rn),o=n.resetButtonTitle,i=void 0===o?"Clear the query":o,l=n.resetButtonAriaLabel,u=void 0===l?"Clear the query":l,d=n.cancelButtonText,p=void 0===d?"Cancel":d,f=n.cancelButtonAriaLabel,h=void 0===f?"Cancel":f,b=n.searchInputLabel,g=void 0===b?"Search":b,y=a.getFormProps({inputElement:a.inputRef.current}).onReset;return r.useEffect((function(){a.autoFocus&&a.inputRef.current&&a.inputRef.current.focus()}),[a.autoFocus,a.inputRef]),r.useEffect((function(){a.isFromSelection&&a.inputRef.current&&a.inputRef.current.select()}),[a.isFromSelection,a.inputRef]),r.createElement(r.Fragment,null,r.createElement("form",{className:"DocSearch-Form",onSubmit:function(e){e.preventDefault()},onReset:y},r.createElement("label",s({className:"DocSearch-MagnifierLabel"},a.getLabelProps()),r.createElement(m,null),r.createElement("span",{className:"DocSearch-VisuallyHiddenForAccessibility"},g)),r.createElement("div",{className:"DocSearch-LoadingIndicator"},r.createElement(jt,null)),r.createElement("input",s({className:"DocSearch-Input",ref:a.inputRef},a.getInputProps({inputElement:a.inputRef.current,autoFocus:a.autoFocus,maxLength:64}))),r.createElement("button",{type:"reset",title:i,className:"DocSearch-Reset","aria-label":u,hidden:!a.state.query},r.createElement(At,null))),r.createElement("button",{className:"DocSearch-Cancel",type:"reset","aria-label":h,onClick:a.onClose},p))}var on=["_highlightResult","_snippetResult"];function sn(e){var t=e.key,n=e.limit,r=void 0===n?5:n,a=function(e){return!1===function(){var e="__TEST_KEY__";try{return localStorage.setItem(e,""),localStorage.removeItem(e),!0}catch(e){return!1}}()?{setItem:function(){},getItem:function(){return[]}}:{setItem:function(t){return window.localStorage.setItem(e,JSON.stringify(t))},getItem:function(){var t=window.localStorage.getItem(e);return t?JSON.parse(t):[]}}}(t),o=a.getItem().slice(0,r);return{add:function(e){var t=e,n=(t._highlightResult,t._snippetResult,c(t,on)),i=o.findIndex((function(e){return e.objectID===n.objectID}));i>-1&&o.splice(i,1),o.unshift(n),o=o.slice(0,r),a.setItem(o)},remove:function(e){o=o.filter((function(t){return t.objectID!==e.objectID})),a.setItem(o)},getAll:function(){return o}}}function cn(e){const t=`algoliasearch-client-js-${e.key}`;let n;const r=()=>(void 0===n&&(n=e.localStorage||window.localStorage),n),a=()=>JSON.parse(r().getItem(t)||"{}"),o=e=>{r().setItem(t,JSON.stringify(e))};return{get:(t,n,r={miss:()=>Promise.resolve()})=>Promise.resolve().then((()=>{(()=>{const t=e.timeToLive?1e3*e.timeToLive:null,n=a(),r=Object.fromEntries(Object.entries(n).filter((([,e])=>void 0!==e.timestamp)));if(o(r),!t)return;const i=Object.fromEntries(Object.entries(r).filter((([,e])=>{const n=(new Date).getTime();return!(e.timestamp+tPromise.all([e?e.value:n(),void 0!==e]))).then((([e,t])=>Promise.all([e,t||r.miss(e)]))).then((([e])=>e)),set:(e,n)=>Promise.resolve().then((()=>{const o=a();return o[JSON.stringify(e)]={timestamp:(new Date).getTime(),value:n},r().setItem(t,JSON.stringify(o)),n})),delete:e=>Promise.resolve().then((()=>{const n=a();delete n[JSON.stringify(e)],r().setItem(t,JSON.stringify(n))})),clear:()=>Promise.resolve().then((()=>{r().removeItem(t)}))}}function ln(e){const t=[...e.caches],n=t.shift();return void 0===n?{get:(e,t,n={miss:()=>Promise.resolve()})=>t().then((e=>Promise.all([e,n.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve(t),delete:e=>Promise.resolve(),clear:()=>Promise.resolve()}:{get:(e,r,a={miss:()=>Promise.resolve()})=>n.get(e,r,a).catch((()=>ln({caches:t}).get(e,r,a))),set:(e,r)=>n.set(e,r).catch((()=>ln({caches:t}).set(e,r))),delete:e=>n.delete(e).catch((()=>ln({caches:t}).delete(e))),clear:()=>n.clear().catch((()=>ln({caches:t}).clear()))}}function un(e={serializable:!0}){let t={};return{get(n,r,a={miss:()=>Promise.resolve()}){const o=JSON.stringify(n);if(o in t)return Promise.resolve(e.serializable?JSON.parse(t[o]):t[o]);const i=r(),s=a&&a.miss||(()=>Promise.resolve());return i.then((e=>s(e))).then((()=>i))},set:(n,r)=>(t[JSON.stringify(n)]=e.serializable?JSON.stringify(r):r,Promise.resolve(r)),delete:e=>(delete t[JSON.stringify(e)],Promise.resolve()),clear:()=>(t={},Promise.resolve())}}function dn(e){let t=e.length-1;for(;t>0;t--){const n=Math.floor(Math.random()*(t+1)),r=e[t];e[t]=e[n],e[n]=r}return e}function pn(e,t){return t?(Object.keys(t).forEach((n=>{e[n]=t[n](e)})),e):e}function fn(e,...t){let n=0;return e.replace(/%s/g,(()=>encodeURIComponent(t[n++])))}const mn={WithinQueryParameters:0,WithinHeaders:1};function hn(e,t){const n=e||{},r=n.data||{};return Object.keys(n).forEach((e=>{-1===["timeout","headers","queryParameters","data","cacheable"].indexOf(e)&&(r[e]=n[e])})),{data:Object.entries(r).length>0?r:void 0,timeout:n.timeout||t,headers:n.headers||{},queryParameters:n.queryParameters||{},cacheable:n.cacheable}}const bn={Read:1,Write:2,Any:3};function gn(e,t=1){return{...e,status:t,lastUpdate:Date.now()}}function yn(e){return"string"==typeof e?{protocol:"https",url:e,accept:bn.Any}:{protocol:e.protocol||"https",url:e.url,accept:e.accept||bn.Any}}const vn="GET",xn="POST";function wn(e,t,n,r){const a=[],o=function(e,t){if(e.method===vn||void 0===e.data&&void 0===t.data)return;const n=Array.isArray(e.data)?e.data:{...e.data,...t.data};return JSON.stringify(n)}(n,r),i=function(e,t){const n={...e.headers,...t.headers},r={};return Object.keys(n).forEach((e=>{const t=n[e];r[e.toLowerCase()]=t})),r}(e,r),s=n.method,c=n.method!==vn?{}:{...n.data,...r.data},l={"x-algolia-agent":e.userAgent.value,...e.queryParameters,...c,...r.queryParameters};let u=0;const d=(t,c)=>{const p=t.pop();if(void 0===p)throw{name:"RetryError",message:"Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",transporterStackTrace:En(a)};const f={data:o,headers:i,method:s,url:_n(p,n.path,l),connectTimeout:c(u,e.timeouts.connect),responseTimeout:c(u,r.timeout)},m=e=>{const n={request:f,response:e,host:p,triesLeft:t.length};return a.push(n),n},h={onSuccess:e=>function(e){try{return JSON.parse(e.content)}catch(t){throw function(e,t){return{name:"DeserializationError",message:e,response:t}}(t.message,e)}}(e),onRetry(n){const r=m(n);return n.isTimedOut&&u++,Promise.all([e.logger.info("Retryable failure",jn(r)),e.hostsCache.set(p,gn(p,n.isTimedOut?3:2))]).then((()=>d(t,c)))},onFail(e){throw m(e),function({content:e,status:t},n){let r=e;try{r=JSON.parse(e).message}catch(e){}return function(e,t,n){return{name:"ApiError",message:e,status:t,transporterStackTrace:n}}(r,t,n)}(e,En(a))}};return e.requester.send(f).then((e=>((e,t)=>(e=>{const t=e.status;return e.isTimedOut||(({isTimedOut:e,status:t})=>!e&&!~~t)(e)||2!=~~(t/100)&&4!=~~(t/100)})(e)?t.onRetry(e):(({status:e})=>2==~~(e/100))(e)?t.onSuccess(e):t.onFail(e))(e,h)))};return function(e,t){return Promise.all(t.map((t=>e.get(t,(()=>Promise.resolve(gn(t))))))).then((e=>{const n=e.filter((e=>function(e){return 1===e.status||Date.now()-e.lastUpdate>12e4}(e))),r=e.filter((e=>function(e){return 3===e.status&&Date.now()-e.lastUpdate<=12e4}(e))),a=[...n,...r];return{getTimeout:(e,t)=>(0===r.length&&0===e?1:r.length+3+e)*t,statelessHosts:a.length>0?a.map((e=>yn(e))):t}}))}(e.hostsCache,t).then((e=>d([...e.statelessHosts].reverse(),e.getTimeout)))}function kn(e){const t={value:`Algolia for JavaScript (${e})`,add(e){const n=`; ${e.segment}${void 0!==e.version?` (${e.version})`:""}`;return-1===t.value.indexOf(n)&&(t.value=`${t.value}${n}`),t}};return t}function _n(e,t,n){const r=Sn(n);let a=`${e.protocol}://${e.url}/${"/"===t.charAt(0)?t.substr(1):t}`;return r.length&&(a+=`?${r}`),a}function Sn(e){return Object.keys(e).map((t=>{return fn("%s=%s",t,(n=e[t],"[object Object]"===Object.prototype.toString.call(n)||"[object Array]"===Object.prototype.toString.call(n)?JSON.stringify(e[t]):e[t]));var n})).join("&")}function En(e){return e.map((e=>jn(e)))}function jn(e){const t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...e,request:{...e.request,headers:{...e.request.headers,...t}}}}const On=e=>{const t=e.appId,n=function(e,t,n){const r={"x-algolia-api-key":n,"x-algolia-application-id":t};return{headers:()=>e===mn.WithinHeaders?r:{},queryParameters:()=>e===mn.WithinQueryParameters?r:{}}}(void 0!==e.authMode?e.authMode:mn.WithinHeaders,t,e.apiKey),r=function(e){const{hostsCache:t,logger:n,requester:r,requestsCache:a,responsesCache:o,timeouts:i,userAgent:s,hosts:c,queryParameters:l,headers:u}=e,d={hostsCache:t,logger:n,requester:r,requestsCache:a,responsesCache:o,timeouts:i,userAgent:s,headers:u,queryParameters:l,hosts:c.map((e=>yn(e))),read(e,t){const n=hn(t,d.timeouts.read),r=()=>wn(d,d.hosts.filter((e=>!!(e.accept&bn.Read))),e,n);if(!0!==(void 0!==n.cacheable?n.cacheable:e.cacheable))return r();const a={request:e,mappedRequestOptions:n,transporter:{queryParameters:d.queryParameters,headers:d.headers}};return d.responsesCache.get(a,(()=>d.requestsCache.get(a,(()=>d.requestsCache.set(a,r()).then((e=>Promise.all([d.requestsCache.delete(a),e])),(e=>Promise.all([d.requestsCache.delete(a),Promise.reject(e)]))).then((([e,t])=>t))))),{miss:e=>d.responsesCache.set(a,e)})},write:(e,t)=>wn(d,d.hosts.filter((e=>!!(e.accept&bn.Write))),e,hn(t,d.timeouts.write))};return d}({hosts:[{url:`${t}-dsn.algolia.net`,accept:bn.Read},{url:`${t}.algolia.net`,accept:bn.Write}].concat(dn([{url:`${t}-1.algolianet.com`},{url:`${t}-2.algolianet.com`},{url:`${t}-3.algolianet.com`}])),...e,headers:{...n.headers(),"content-type":"application/x-www-form-urlencoded",...e.headers},queryParameters:{...n.queryParameters(),...e.queryParameters}}),a={transporter:r,appId:t,addAlgoliaAgent(e,t){r.userAgent.add({segment:e,version:t})},clearCache:()=>Promise.all([r.requestsCache.clear(),r.responsesCache.clear()]).then((()=>{}))};return pn(a,e.methods)},An=e=>(t,n)=>t.method===vn?e.transporter.read(t,n):e.transporter.write(t,n),Cn=e=>(t,n={})=>pn({transporter:e.transporter,appId:e.appId,indexName:t},n.methods),Pn=e=>(t,n)=>{const r=t.map((e=>({...e,params:Sn(e.params||{})})));return e.transporter.read({method:xn,path:"1/indexes/*/queries",data:{requests:r},cacheable:!0},n)},Tn=e=>(t,n)=>Promise.all(t.map((t=>{const{facetName:r,facetQuery:a,...o}=t.params;return Cn(e)(t.indexName,{methods:{searchForFacetValues:Rn}}).searchForFacetValues(r,a,{...n,...o})}))),In=e=>(t,n,r)=>e.transporter.read({method:xn,path:fn("1/answers/%s/prediction",e.indexName),data:{query:t,queryLanguages:n},cacheable:!0},r),Nn=e=>(t,n)=>e.transporter.read({method:xn,path:fn("1/indexes/%s/query",e.indexName),data:{query:t},cacheable:!0},n),Rn=e=>(t,n,r)=>e.transporter.read({method:xn,path:fn("1/indexes/%s/facets/%s/query",e.indexName,t),data:{facetQuery:n},cacheable:!0},r),Ln=1,Dn=2,Mn=3;function Fn(e,t,n){const r={appId:e,apiKey:t,timeouts:{connect:1,read:2,write:30},requester:{send:e=>new Promise((t=>{const n=new XMLHttpRequest;n.open(e.method,e.url,!0),Object.keys(e.headers).forEach((t=>n.setRequestHeader(t,e.headers[t])));const r=(e,r)=>setTimeout((()=>{n.abort(),t({status:0,content:r,isTimedOut:!0})}),1e3*e),a=r(e.connectTimeout,"Connection timeout");let o;n.onreadystatechange=()=>{n.readyState>n.OPENED&&void 0===o&&(clearTimeout(a),o=r(e.responseTimeout,"Socket timeout"))},n.onerror=()=>{0===n.status&&(clearTimeout(a),clearTimeout(o),t({content:n.responseText||"Network request failed",status:n.status,isTimedOut:!1}))},n.onload=()=>{clearTimeout(a),clearTimeout(o),t({content:n.responseText,status:n.status,isTimedOut:!1})},n.send(e.data)}))},logger:(a=Mn,{debug:(e,t)=>(Ln>=a&&console.debug(e,t),Promise.resolve()),info:(e,t)=>(Dn>=a&&console.info(e,t),Promise.resolve()),error:(e,t)=>(console.error(e,t),Promise.resolve())}),responsesCache:un(),requestsCache:un({serializable:!1}),hostsCache:ln({caches:[cn({key:`4.19.1-${e}`}),un()]}),userAgent:kn("4.19.1").add({segment:"Browser",version:"lite"}),authMode:mn.WithinQueryParameters};var a;return On({...r,...n,methods:{search:Pn,searchForFacetValues:Tn,multipleQueries:Pn,multipleSearchForFacetValues:Tn,customRequest:An,initIndex:e=>t=>Cn(e)(t,{methods:{search:Nn,searchForFacetValues:Rn,findAnswers:In}})}})}Fn.version="4.19.1";var Bn=["footer","searchBox"];function zn(e){var t=e.appId,n=e.apiKey,a=e.indexName,i=e.placeholder,u=void 0===i?"Search docs":i,d=e.searchParameters,p=e.maxResultsPerGroup,f=e.onClose,m=void 0===f?Gt:f,h=e.transformItems,b=void 0===h?Wt:h,g=e.hitComponent,y=void 0===g?Et:g,v=e.resultsFooterComponent,x=void 0===v?function(){return null}:v,w=e.navigator,k=e.initialScrollY,_=void 0===k?0:k,S=e.transformSearchClient,E=void 0===S?Wt:S,j=e.disableUserPersonalization,O=void 0!==j&&j,A=e.initialQuery,C=void 0===A?"":A,P=e.translations,T=void 0===P?{}:P,I=e.getMissingResultsUrl,N=e.insights,R=void 0!==N&&N,L=T.footer,D=T.searchBox,M=c(T,Bn),F=l(r.useState({query:"",collections:[],completion:null,context:{},isOpen:!1,activeItemId:null,status:"idle"}),2),B=F[0],z=F[1],U=r.useRef(null),$=r.useRef(null),q=r.useRef(null),H=r.useRef(null),V=r.useRef(null),W=r.useRef(10),K=r.useRef("undefined"!=typeof window?window.getSelection().toString().slice(0,64):"").current,G=r.useRef(C||K).current,Q=function(e,t,n){return r.useMemo((function(){var r=Fn(e,t);return r.addAlgoliaAgent("docsearch","3.6.1"),!1===/docsearch.js \(.*\)/.test(r.transporter.userAgent.value)&&r.addAlgoliaAgent("docsearch-react","3.6.1"),n(r)}),[e,t,n])}(t,n,E),Y=r.useRef(sn({key:"__DOCSEARCH_FAVORITE_SEARCHES__".concat(a),limit:10})).current,Z=r.useRef(sn({key:"__DOCSEARCH_RECENT_SEARCHES__".concat(a),limit:0===Y.getAll().length?7:4})).current,X=r.useCallback((function(e){if(!O){var t="content"===e.type?e.__docsearch_parent:e;t&&-1===Y.getAll().findIndex((function(e){return e.objectID===t.objectID}))&&Z.add(t)}}),[Y,Z,O]),J=r.useCallback((function(e){if(B.context.algoliaInsightsPlugin&&e.__autocomplete_id){var t=e,n={eventName:"Item Selected",index:t.__autocomplete_indexName,items:[t],positions:[e.__autocomplete_id],queryID:t.__autocomplete_queryID};B.context.algoliaInsightsPlugin.insights.clickedObjectIDsAfterSearch(n)}}),[B.context.algoliaInsightsPlugin]),ee=r.useMemo((function(){return wt({id:"docsearch",defaultActiveItemId:0,placeholder:u,openOnFocus:!0,initialState:{query:G,context:{searchSuggestions:[]}},insights:R,navigator:w,onStateChange:function(e){z(e.state)},getSources:function(e){var r=e.query,i=e.state,s=e.setContext,c=e.setStatus;if(!r)return O?[]:[{sourceId:"recentSearches",onSelect:function(e){var t=e.item,n=e.event;X(t),Kt(n)||m()},getItemUrl:function(e){return e.item.url},getItems:function(){return Z.getAll()}},{sourceId:"favoriteSearches",onSelect:function(e){var t=e.item,n=e.event;X(t),Kt(n)||m()},getItemUrl:function(e){return e.item.url},getItems:function(){return Y.getAll()}}];var l=Boolean(R);return Q.search([{query:r,indexName:a,params:o({attributesToRetrieve:["hierarchy.lvl0","hierarchy.lvl1","hierarchy.lvl2","hierarchy.lvl3","hierarchy.lvl4","hierarchy.lvl5","hierarchy.lvl6","content","type","url"],attributesToSnippet:["hierarchy.lvl1:".concat(W.current),"hierarchy.lvl2:".concat(W.current),"hierarchy.lvl3:".concat(W.current),"hierarchy.lvl4:".concat(W.current),"hierarchy.lvl5:".concat(W.current),"hierarchy.lvl6:".concat(W.current),"content:".concat(W.current)],snippetEllipsisText:"\u2026",highlightPreTag:"",highlightPostTag:"",hitsPerPage:20,clickAnalytics:l},d)}]).catch((function(e){throw"RetryError"===e.name&&c("error"),e})).then((function(e){var r=e.results[0],c=r.hits,u=r.nbHits,d=Vt(c,(function(e){return Zt(e)}),p);i.context.searchSuggestions.length0&&(re(),V.current&&V.current.focus())}),[G,re]),r.useEffect((function(){function e(){if($.current){var e=.01*window.innerHeight;$.current.style.setProperty("--docsearch-vh","".concat(e,"px"))}}return e(),window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[]),r.createElement("div",s({ref:U},ne({"aria-expanded":!0}),{className:["DocSearch","DocSearch-Container","stalled"===B.status&&"DocSearch-Container--Stalled","error"===B.status&&"DocSearch-Container--Errored"].filter(Boolean).join(" "),role:"button",tabIndex:0,onMouseDown:function(e){e.target===e.currentTarget&&m()}}),r.createElement("div",{className:"DocSearch-Modal",ref:$},r.createElement("header",{className:"DocSearch-SearchBar",ref:q},r.createElement(an,s({},ee,{state:B,autoFocus:0===G.length,inputRef:V,isFromSelection:Boolean(G)&&G===K,translations:D,onClose:m}))),r.createElement("div",{className:"DocSearch-Dropdown",ref:H},r.createElement(nn,s({},ee,{indexName:a,state:B,hitComponent:y,resultsFooterComponent:x,disableUserPersonalization:O,recentSearches:Z,favoriteSearches:Y,inputRef:V,translations:M,getMissingResultsUrl:I,onItemClick:function(e,t){J(e),X(e),Kt(t)||m()}}))),r.createElement("footer",{className:"DocSearch-Footer"},r.createElement(St,{translations:L}))))}function Un(e){var t=e.isOpen,n=e.onOpen,a=e.onClose,o=e.onInput,i=e.searchButtonRef;r.useEffect((function(){function e(e){var r;(27===e.keyCode&&t||"k"===(null===(r=e.key)||void 0===r?void 0:r.toLowerCase())&&(e.metaKey||e.ctrlKey)||!function(e){var t=e.target,n=t.tagName;return t.isContentEditable||"INPUT"===n||"SELECT"===n||"TEXTAREA"===n}(e)&&"/"===e.key&&!t)&&(e.preventDefault(),t?a():document.body.classList.contains("DocSearch--active")||document.body.classList.contains("DocSearch--active")||n()),i&&i.current===document.activeElement&&o&&/[a-zA-Z0-9]/.test(String.fromCharCode(e.keyCode))&&o(e)}return window.addEventListener("keydown",e),function(){window.removeEventListener("keydown",e)}}),[t,n,a,o,i])}},6125:(e,t,n)=>{"use strict";n.d(t,{o:()=>o,x:()=>i});var r=n(96540),a=n(74848),o=r.createContext(!1);function i(e){var t=e.children,n=(0,r.useState)(!1),i=n[0],s=n[1];return(0,r.useEffect)((function(){s(!0)}),[]),(0,a.jsx)(o.Provider,{value:i,children:t})}},81316:(e,t,n)=>{"use strict";var r=n(96540),a=n(5338),o=n(80545),i=n(54625),s=n(85290),c=n(38193);const l=[n(10119),n(26134),n(76294),n(35697),n(74100),n(95728)];var u=n(97671),d=n(56347),p=n(22831),f=n(74848);function m(e){var t=e.children;return(0,f.jsx)(f.Fragment,{children:t})}var h=n(5260),b=n(44586),g=n(86025),y=n(6342),v=n(69024),x=n(32131),w=n(14090),k=n(2967),_=n(70440),S=n(41463);function E(){var e=(0,b.A)().i18n,t=e.currentLocale,n=e.defaultLocale,r=e.localeConfigs,a=(0,x.o)(),o=r[t].htmlLang,i=function(e){return e.replace("-","_")};return(0,f.jsxs)(h.A,{children:[Object.entries(r).map((function(e){var t=e[0],n=e[1].htmlLang;return(0,f.jsx)("link",{rel:"alternate",href:a.createUrl({locale:t,fullyQualified:!0}),hrefLang:n},t)})),(0,f.jsx)("link",{rel:"alternate",href:a.createUrl({locale:n,fullyQualified:!0}),hrefLang:"x-default"}),(0,f.jsx)("meta",{property:"og:locale",content:i(o)}),Object.values(r).filter((function(e){return o!==e.htmlLang})).map((function(e){return(0,f.jsx)("meta",{property:"og:locale:alternate",content:i(e.htmlLang)},"meta-og-"+e.htmlLang)}))]})}function j(e){var t=e.permalink,n=(0,b.A)().siteConfig.url,r=function(){var e=(0,b.A)().siteConfig,t=e.url,n=e.baseUrl,r=e.trailingSlash,a=(0,d.zy)().pathname;return t+(0,_.Ks)((0,g.Ay)(a),{trailingSlash:r,baseUrl:n})}(),a=t?""+n+t:r;return(0,f.jsxs)(h.A,{children:[(0,f.jsx)("meta",{property:"og:url",content:a}),(0,f.jsx)("link",{rel:"canonical",href:a})]})}function O(){var e=(0,b.A)().i18n.currentLocale,t=(0,y.p)(),n=t.metadata,r=t.image;return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(h.A,{children:[(0,f.jsx)("meta",{name:"twitter:card",content:"summary_large_image"}),(0,f.jsx)("body",{className:w.w})]}),r&&(0,f.jsx)(v.be,{image:r}),(0,f.jsx)(j,{}),(0,f.jsx)(E,{}),(0,f.jsx)(S.A,{tag:k.C,locale:e}),(0,f.jsx)(h.A,{children:n.map((function(e,t){return(0,f.jsx)("meta",Object.assign({},e),t)}))})]})}var A=new Map;var C=n(6125),P=n(73348),T=n(77387),I=n(205);function N(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r\n

    Your Docusaurus site did not load properly.

    \n

    A very common reason is a wrong site baseUrl configuration.

    \n

    Current configured baseUrl = '+e+" "+("/"===e?" (default value)":"")+'

    \n

    We suggest trying baseUrl =

    \n
    \n'}(e)).replace(/{"use strict";n.d(t,{o:()=>d,l:()=>p});var r=n(96540),a=n(85290);const o=JSON.parse('{"docusaurus-plugin-content-docs":{"default":{"path":"/docs","versions":[{"name":"current","label":"Next","isLast":true,"path":"/docs","mainDocId":"general/getting-started","docs":[{"id":"build/build-client-side","path":"/docs/build-client-side","sidebar":"docs"},{"id":"build/build-dapp","path":"/docs/build-dapp"},{"id":"build/build-data","path":"/docs/build-data","sidebar":"docs"},{"id":"build/build-guide","path":"/docs/build-guide","sidebar":"docs"},{"id":"build/build-guides-coretime-start","path":"/docs/build-guides-coretime-start","sidebar":"docs"},{"id":"build/build-guides-coretime-troubleshoot","path":"/docs/build-guides-coretime-troubleshoot","sidebar":"docs"},{"id":"build/build-guides-install-deps","path":"/docs/build-guides-install-deps","sidebar":"docs"},{"id":"build/build-guides-template-basic","path":"/docs/build-guides-template-basic","sidebar":"docs"},{"id":"build/build-hackathon","path":"/docs/build-hackathon","sidebar":"docs"},{"id":"build/build-hrmp-channels","path":"/docs/build-hrmp-channels","sidebar":"docs"},{"id":"build/build-index","path":"/docs/build-index"},{"id":"build/build-integrate-assets","path":"/docs/build-integrate-assets","sidebar":"docs"},{"id":"build/build-integration","path":"/docs/build-integration","sidebar":"docs"},{"id":"build/build-light-clients","path":"/docs/build-light-clients","sidebar":"docs"},{"id":"build/build-network-overview","path":"/docs/build-network-overview","sidebar":"docs"},{"id":"build/build-node-interaction","path":"/docs/build-node-interaction","sidebar":"docs"},{"id":"build/build-node-management","path":"/docs/build-node-management","sidebar":"docs"},{"id":"build/build-open-source","path":"/docs/build-open-source","sidebar":"docs"},{"id":"build/build-oracle","path":"/docs/build-oracle"},{"id":"build/build-parachains","path":"/docs/build-pdk","sidebar":"docs"},{"id":"build/build-protocol-info","path":"/docs/build-protocol-info","sidebar":"docs"},{"id":"build/build-smart-contracts","path":"/docs/build-smart-contracts","sidebar":"docs"},{"id":"build/build-storage","path":"/docs/build-storage"},{"id":"build/build-tools-index","path":"/docs/build-tools-index","sidebar":"docs"},{"id":"build/build-transaction-construction","path":"/docs/build-transaction-construction","sidebar":"docs"},{"id":"general/alpha-program","path":"/docs/alpha-program","sidebar":"docs"},{"id":"general/ambassadors","path":"/docs/ambassadors","sidebar":"docs"},{"id":"general/bug-bounty","path":"/docs/bug-bounty","sidebar":"docs"},{"id":"general/chain-state-values","path":"/docs/chain-state-values","sidebar":"docs"},{"id":"general/community","path":"/docs/community","sidebar":"docs"},{"id":"general/contributing","path":"/docs/contributing","sidebar":"docs"},{"id":"general/contributors","path":"/docs/contributors","sidebar":"docs"},{"id":"general/decentralized-futures","path":"/docs/decentralized-futures","sidebar":"docs"},{"id":"general/decentralized-voices","path":"/docs/decentralized-voices","sidebar":"docs"},{"id":"general/dev-heroes","path":"/docs/dev-heroes","sidebar":"docs"},{"id":"general/doc-thousand-contributors","path":"/docs/thousand-contributors","sidebar":"docs"},{"id":"general/doc-thousand-validators","path":"/docs/thousand-validators","sidebar":"docs"},{"id":"general/dune-analytics/dunesql-cheatsheet","path":"/docs/general/dunesql-cheatsheet","sidebar":"docs"},{"id":"general/dune-analytics/onboarding-status-and-key-dashboards","path":"/docs/general/onboarding-status-and-key-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/parachain-dashboards/acala-dashboards","path":"/docs/general/dune-analytics/acala-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/parachain-dashboards/assethub-dashboards","path":"/docs/general/dune-analytics/assethub-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/parachain-dashboards/astar-dashboards","path":"/docs/general/dune-analytics/astar-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/parachain-dashboards/bifrost-dashboards","path":"/docs/general/dune-analytics/bifrost-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/parachain-dashboards/bridgehub-dashboards","path":"/docs/general/dune-analytics/bridgehub-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/parachain-dashboards/centrifuge-dashboards","path":"/docs/general/dune-analytics/centrifuge-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/parachain-dashboards/collectives-dashboards","path":"/docs/general/dune-analytics/collectives-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/parachain-dashboards/coretime-dashboards","path":"/docs/general/dune-analytics/coretime-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/parachain-dashboards/energywebx-dashboards","path":"/docs/general/dune-analytics/energywebx-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/parachain-dashboards/frequency-dashboards","path":"/docs/general/dune-analytics/frequency-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/parachain-dashboards/hydration-dashboards","path":"/docs/general/dune-analytics/hydration-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/parachain-dashboards/interlay-dashboards","path":"/docs/general/dune-analytics/interlay-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/parachain-dashboards/invarch-dashboards","path":"/docs/general/dune-analytics/invarch-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/parachain-dashboards/litentry-dashboards","path":"/docs/general/dune-analytics/litentry-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/parachain-dashboards/manta-dashboards","path":"/docs/general/dune-analytics/manta-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/parachain-dashboards/moonbeam-dashboards","path":"/docs/general/dune-analytics/moonbeam-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/parachain-dashboards/neuroweb-dashboards","path":"/docs/general/dune-analytics/neuroweb-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/parachain-dashboards/nodle-dashboards","path":"/docs/general/dune-analytics/nodle-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/parachain-dashboards/pendulum-dashboards","path":"/docs/general/dune-analytics/pendulum-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/parachain-dashboards/people-dashboards","path":"/docs/general/dune-analytics/people-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/parachain-dashboards/phala-dashboards","path":"/docs/general/dune-analytics/phala-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/parachain-dashboards/polimec-dashboards","path":"/docs/general/dune-analytics/polimec-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/parachain-dashboards/polkadex-dashboards","path":"/docs/general/dune-analytics/polkadex-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/parachain-dashboards/snowbridge-dashboards","path":"/docs/general/dune-analytics/snowbridge-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/parachain-dashboards/stellaswap-dashboards","path":"/docs/general/dune-analytics/stellaswap-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/parachain-dashboards/unique-dashboards","path":"/docs/general/dune-analytics/unique-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/polkadot-dashboards/legacy/polkadot-dot-ordinals","path":"/docs/general/dune-analytics/polkadot-dashboards/polkadot-dot-ordinals"},{"id":"general/dune-analytics/polkadot-dashboards/legacy/polkadot-governance-dashboard","path":"/docs/general/dune-analytics/polkadot-dashboards/polkadot-governance-dashboard"},{"id":"general/dune-analytics/polkadot-dashboards/legacy/polkadot-opengov-referenda-home","path":"/docs/general/dune-analytics/polkadot-dashboards/polkadot-opengov-referenda-home"},{"id":"general/dune-analytics/polkadot-dashboards/legacy/polkadot-opengov-referendum-voting-analysis","path":"/docs/general/dune-analytics/polkadot-dashboards/polkadot-opengov-referendum-voting-analysis"},{"id":"general/dune-analytics/polkadot-dashboards/legacy/polkadot-staking-dashboard","path":"/docs/general/dune-analytics/polkadot-dashboards/polkadot-staking-dashboard"},{"id":"general/dune-analytics/polkadot-dashboards/legacy/polkadot-staking-dashboard-nomination-pool","path":"/docs/general/dune-analytics/polkadot-dashboards/polkadot-staking-dashboard-nomination-pool"},{"id":"general/dune-analytics/polkadot-dashboards/legacy/polkadot-staking-dashboard-nominators","path":"/docs/general/dune-analytics/polkadot-dashboards/polkadot-staking-dashboard-nominators"},{"id":"general/dune-analytics/polkadot-dashboards/legacy/polkadot-staking-dashboard-pool-member","path":"/docs/general/dune-analytics/polkadot-dashboards/polkadot-staking-dashboard-pool-member"},{"id":"general/dune-analytics/polkadot-dashboards/legacy/polkadot-staking-dashboard-validators","path":"/docs/general/dune-analytics/polkadot-dashboards/polkadot-staking-dashboard-validators"},{"id":"general/dune-analytics/polkadot-dashboards/polkadot-dashboards-governance","path":"/docs/general/dune-analytics/polkadot-dashboards-governance","sidebar":"docs"},{"id":"general/dune-analytics/polkadot-dashboards/polkadot-dashboards-network","path":"/docs/general/dune-analytics/polkadot-dashboards-network","sidebar":"docs"},{"id":"general/dune-analytics/polkadot-dashboards/polkadot-dashboards-overview","path":"/docs/general/dune-analytics/polkadot-dashboards-overview","sidebar":"docs"},{"id":"general/dune-analytics/polkadot-dashboards/polkadot-dashboards-staking","path":"/docs/general/dune-analytics/polkadot-dashboards-staking","sidebar":"docs"},{"id":"general/dune-analytics/polkadot-ecosystem-overview","path":"/docs/general/polkadot-ecosystem-overview","sidebar":"docs"},{"id":"general/dune-analytics/project-dashboards","path":"/docs/general/project-dashboards","sidebar":"docs"},{"id":"general/ecosystem-funds","path":"/docs/ecosystem-funds","sidebar":"docs"},{"id":"general/faq","path":"/docs/faq","sidebar":"docs"},{"id":"general/funding","path":"/docs/funding","sidebar":"docs"},{"id":"general/getting-started","path":"/docs/getting-started","sidebar":"docs"},{"id":"general/glossary","path":"/docs/glossary","sidebar":"docs"},{"id":"general/governance-apps","path":"/docs/governance-apps","sidebar":"docs"},{"id":"general/grants","path":"/docs/grants","sidebar":"docs"},{"id":"general/how-to-dyor","path":"/docs/how-to-dyor","sidebar":"docs"},{"id":"general/kusama/kusama-adversarial-cheatsheet","path":"/docs/kusama-adversarial-cheatsheet","sidebar":"docs"},{"id":"general/kusama/kusama-bug-bounty","path":"/docs/kusama-bug-bounty","sidebar":"docs"},{"id":"general/kusama/kusama-coc","path":"/docs/kusama-coc","sidebar":"docs"},{"id":"general/kusama/kusama-getting-started","path":"/docs/kusama-getting-started","sidebar":"docs"},{"id":"general/kusama/kusama-social-recovery","path":"/docs/kusama-social-recovery","sidebar":"docs"},{"id":"general/kusama/kusama-timeline","path":"/docs/kusama-timeline","sidebar":"docs"},{"id":"general/ledger","path":"/docs/ledger","sidebar":"docs"},{"id":"general/metadata","path":"/docs/metadata","sidebar":"docs"},{"id":"general/multisig-apps","path":"/docs/multisig-apps","sidebar":"docs"},{"id":"general/parachains-apps","path":"/docs/parachains-apps","sidebar":"docs"},{"id":"general/parity-data-dashboards","path":"/docs/parity-data-dashboards","sidebar":"docs"},{"id":"general/polkadot-community-foundation","path":"/docs/polkadot-community-foundation","sidebar":"docs"},{"id":"general/polkadot-direction","path":"/docs/polkadot-direction","sidebar":"docs"},{"id":"general/polkadot-v1","path":"/docs/polkadot-v1","sidebar":"docs"},{"id":"general/polkadot-vault","path":"/docs/polkadot-vault","sidebar":"docs"},{"id":"general/polkadotjs","path":"/docs/polkadotjs","sidebar":"docs"},{"id":"general/polkadotjs-ui","path":"/docs/polkadotjs-ui","sidebar":"docs"},{"id":"general/scams","path":"/docs/learn-scams","sidebar":"docs"},{"id":"general/staking-apps","path":"/docs/staking-apps","sidebar":"docs"},{"id":"general/staking-dashboard","path":"/docs/staking-dashboard","sidebar":"docs"},{"id":"general/start-building","path":"/docs/start-building","sidebar":"docs"},{"id":"general/transaction-attacks","path":"/docs/transaction-attacks","sidebar":"docs"},{"id":"general/wallets-and-extensions","path":"/docs/wallets-and-extensions","sidebar":"docs"},{"id":"general/web3-and-polkadot","path":"/docs/web3-and-polkadot","sidebar":"docs"},{"id":"learn/archive/learn-auction","path":"/docs/learn/learn-auction","sidebar":"docs"},{"id":"learn/archive/learn-controller","path":"/docs/learn/learn-controller","sidebar":"docs"},{"id":"learn/archive/learn-crowdloans","path":"/docs/learn/learn-crowdloans","sidebar":"docs"},{"id":"learn/archive/learn-governance","path":"/docs/learn/learn-governance","sidebar":"docs"},{"id":"learn/archive/learn-launch","path":"/docs/learn/learn-launch","sidebar":"docs"},{"id":"learn/archive/learn-redenomination","path":"/docs/learn/learn-redenomination","sidebar":"docs"},{"id":"learn/archive/learn-treasury","path":"/docs/learn/learn-treasury","sidebar":"docs"},{"id":"learn/learn-account-abstraction","path":"/docs/learn-account-abstraction","sidebar":"docs"},{"id":"learn/learn-account-advanced","path":"/docs/learn-account-advanced","sidebar":"docs"},{"id":"learn/learn-account-balances","path":"/docs/learn-account-balances","sidebar":"docs"},{"id":"learn/learn-account-multisig","path":"/docs/learn-account-multisig","sidebar":"docs"},{"id":"learn/learn-accounts","path":"/docs/learn-accounts","sidebar":"docs"},{"id":"learn/learn-agile-coretime","path":"/docs/learn-agile-coretime","sidebar":"docs"},{"id":"learn/learn-architecture","path":"/docs/learn-architecture","sidebar":"docs"},{"id":"learn/learn-archive","path":"/docs/learn-archive","sidebar":"docs"},{"id":"learn/learn-asset-conversion-assethub","path":"/docs/learn-asset-conversion-assethub","sidebar":"docs"},{"id":"learn/learn-assets","path":"/docs/learn-assets","sidebar":"docs"},{"id":"learn/learn-async-backing","path":"/docs/learn-async-backing","sidebar":"docs"},{"id":"learn/learn-bridges","path":"/docs/learn-bridges","sidebar":"docs"},{"id":"learn/learn-collator","path":"/docs/learn-collator","sidebar":"docs"},{"id":"learn/learn-comparisons","path":"/docs/learn-comparisons","sidebar":"docs"},{"id":"learn/learn-comparisons-avalanche","path":"/docs/learn-comparisons-avalanche","sidebar":"docs"},{"id":"learn/learn-comparisons-cosmos","path":"/docs/learn-comparisons-cosmos","sidebar":"docs"},{"id":"learn/learn-comparisons-ethereum-2","path":"/docs/learn-comparisons-ethereum-2","sidebar":"docs"},{"id":"learn/learn-comparisons-kusama","path":"/docs/learn-comparisons-kusama","sidebar":"docs"},{"id":"learn/learn-comparisons-rollups","path":"/docs/learn-comparisons-rollups","sidebar":"docs"},{"id":"learn/learn-consensus","path":"/docs/learn-consensus","sidebar":"docs"},{"id":"learn/learn-cryptography","path":"/docs/learn-cryptography","sidebar":"docs"},{"id":"learn/learn-DOT","path":"/docs/learn-DOT","sidebar":"docs"},{"id":"learn/learn-dot-ksm-bridge","path":"/docs/learn-dot-ksm-bridge","sidebar":"docs"},{"id":"learn/learn-elastic-scaling","path":"/docs/learn-elastic-scaling","sidebar":"docs"},{"id":"learn/learn-guides-accounts","path":"/docs/learn-guides-accounts","sidebar":"docs"},{"id":"learn/learn-guides-accounts-multisig","path":"/docs/learn-guides-accounts-multisig","sidebar":"docs"},{"id":"learn/learn-guides-accounts-proxy","path":"/docs/learn-guides-accounts-proxy","sidebar":"docs"},{"id":"learn/learn-guides-accounts-proxy-pure","path":"/docs/learn-guides-accounts-proxy-pure","sidebar":"docs"},{"id":"learn/learn-guides-asset-conversion","path":"/docs/learn-guides-asset-conversion","sidebar":"docs"},{"id":"learn/learn-guides-assets","path":"/docs/learn-guides-assets","sidebar":"docs"},{"id":"learn/learn-guides-assets-create","path":"/docs/learn-guides-assets-create","sidebar":"docs"},{"id":"learn/learn-guides-bounties","path":"/docs/learn-guides-bounties","sidebar":"docs"},{"id":"learn/learn-guides-bridges","path":"/docs/learn-guides-bridges","sidebar":"docs"},{"id":"learn/learn-guides-claims","path":"/docs/learn-guides-claims","sidebar":"docs"},{"id":"learn/learn-guides-coretime-marketplaces","path":"/docs/learn-guides-coretime-marketplaces","sidebar":"docs"},{"id":"learn/learn-guides-coretime-parachains","path":"/docs/learn-guides-coretime-parachains","sidebar":"docs"},{"id":"learn/learn-guides-coretime-swap","path":"/docs/learn-guides-coretime-swap","sidebar":"docs"},{"id":"learn/learn-guides-dot-ksm-bridge","path":"/docs/learn-guides-dot-ksm-bridge","sidebar":"docs"},{"id":"learn/learn-guides-identity","path":"/docs/learn-guides-identity","sidebar":"docs"},{"id":"learn/learn-guides-ledger","path":"/docs/learn-guides-ledger","sidebar":"docs"},{"id":"learn/learn-guides-nominator","path":"/docs/learn-guides-nominator","sidebar":"docs"},{"id":"learn/learn-guides-polkadot-opengov","path":"/docs/learn-guides-polkadot-opengov","sidebar":"docs"},{"id":"learn/learn-guides-staking","path":"/docs/learn-guides-staking","sidebar":"docs"},{"id":"learn/learn-guides-staking-pools","path":"/docs/learn-guides-staking-pools","sidebar":"docs"},{"id":"learn/learn-guides-transfers","path":"/docs/learn-guides-transfers","sidebar":"docs"},{"id":"learn/learn-guides-treasury","path":"/docs/learn-guides-treasury","sidebar":"docs"},{"id":"learn/learn-guides-vault","path":"/docs/learn-guides-vault","sidebar":"docs"},{"id":"learn/learn-hyperbridge","path":"/docs/learn-hyperbridge","sidebar":"docs"},{"id":"learn/learn-identity","path":"/docs/learn-identity","sidebar":"docs"},{"id":"learn/learn-implementations","path":"/docs/learn-implementations"},{"id":"learn/learn-inflation","path":"/docs/learn-inflation","sidebar":"docs"},{"id":"learn/learn-jam-chain","path":"/docs/learn-jam-chain","sidebar":"docs"},{"id":"learn/learn-jam-faq","path":"/docs/learn-jam-faq","sidebar":"docs"},{"id":"learn/learn-nft","path":"/docs/learn-nft","sidebar":"docs"},{"id":"learn/learn-nft-pallets","path":"/docs/learn-nft-pallets","sidebar":"docs"},{"id":"learn/learn-nft-projects","path":"/docs/learn-nft-projects","sidebar":"docs"},{"id":"learn/learn-nomination-pools","path":"/docs/learn-nomination-pools","sidebar":"docs"},{"id":"learn/learn-nominator","path":"/docs/learn-nominator","sidebar":"docs"},{"id":"learn/learn-offenses","path":"/docs/learn-offenses","sidebar":"docs"},{"id":"learn/learn-parachains","path":"/docs/learn-parachains","sidebar":"docs"},{"id":"learn/learn-parachains-faq","path":"/docs/learn-parachains-faq","sidebar":"docs"},{"id":"learn/learn-parachains-protocol","path":"/docs/learn-parachains-protocol","sidebar":"docs"},{"id":"learn/learn-phragmen","path":"/docs/learn-phragmen","sidebar":"docs"},{"id":"learn/learn-polkadot-host","path":"/docs/learn-polkadot-host","sidebar":"docs"},{"id":"learn/learn-polkadot-js-guides","path":"/docs/learn-polkadot-js-guides","sidebar":"docs"},{"id":"learn/learn-polkadot-opengov","path":"/docs/learn-polkadot-opengov","sidebar":"docs"},{"id":"learn/learn-polkadot-opengov-origins","path":"/docs/learn-polkadot-opengov-origins","sidebar":"docs"},{"id":"learn/learn-polkadot-opengov-treasury","path":"/docs/learn-polkadot-opengov-treasury","sidebar":"docs"},{"id":"learn/learn-polkadot-technical-fellowship","path":"/docs/learn-polkadot-technical-fellowship","sidebar":"docs"},{"id":"learn/learn-polkadotjs","path":"/docs/learn-polkadotjs","sidebar":"docs"},{"id":"learn/learn-proxies","path":"/docs/learn-proxies","sidebar":"docs"},{"id":"learn/learn-proxies-pure","path":"/docs/learn-proxies-pure","sidebar":"docs"},{"id":"learn/learn-runtime-upgrades","path":"/docs/learn-runtime-upgrades","sidebar":"docs"},{"id":"learn/learn-safrole","path":"/docs/learn-safrole","sidebar":"docs"},{"id":"learn/learn-snowbridge","path":"/docs/learn-snowbridge","sidebar":"docs"},{"id":"learn/learn-spree","path":"/docs/learn-spree","sidebar":"docs"},{"id":"learn/learn-staking","path":"/docs/learn-staking","sidebar":"docs"},{"id":"learn/learn-staking-advanced","path":"/docs/learn-staking-advanced","sidebar":"docs"},{"id":"learn/learn-system-chains","path":"/docs/learn-system-chains","sidebar":"docs"},{"id":"learn/learn-teleport","path":"/docs/learn-teleport","sidebar":"docs"},{"id":"learn/learn-transactions","path":"/docs/learn-transactions","sidebar":"docs"},{"id":"learn/learn-validator","path":"/docs/learn-validator","sidebar":"docs"},{"id":"learn/learn-video-tutorials","path":"/docs/learn-video-tutorials","sidebar":"docs"},{"id":"learn/learn-wasm","path":"/docs/learn-wasm","sidebar":"docs"},{"id":"learn/learn-xcm","path":"/docs/learn-xcm","sidebar":"docs"},{"id":"learn/learn-xcm-instructions","path":"/docs/learn-xcm-instructions","sidebar":"docs"},{"id":"learn/learn-xcm-pallet","path":"/docs/learn-xcm-pallet","sidebar":"docs"},{"id":"learn/learn-xcm-transport","path":"/docs/learn-xcm-transport","sidebar":"docs"},{"id":"learn/learn-xcm-usecases","path":"/docs/learn-xcm-usecases","sidebar":"docs"},{"id":"learn/learn-xcvm","path":"/docs/learn-xcvm","sidebar":"docs"},{"id":"learn/xcm/executor_config/learn-xcm-docs-config-deep-dive","path":"/docs/learn/xcm/config-deep-dive","sidebar":"docs"},{"id":"learn/xcm/fundamentals/learn-xcm-docs-fundamentals-fees","path":"/docs/learn/xcm/fundamentals-fees","sidebar":"docs"},{"id":"learn/xcm/fundamentals/learn-xcm-docs-fundamentals-multiasset","path":"/docs/learn/xcm/fundamentals-multiasset","sidebar":"docs"},{"id":"learn/xcm/fundamentals/learn-xcm-docs-fundamentals-summary","path":"/docs/learn/xcm/fundamentals-summary","sidebar":"docs"},{"id":"learn/xcm/fundamentals/learn-xcm-docs-fundamentals-xcvm","path":"/docs/learn/xcm/fundamentals-xcvm","sidebar":"docs"},{"id":"learn/xcm/fundamentals/multilocation/learn-xcm-docs-multilocation-example","path":"/docs/learn/xcm/fundamentals/multilocation-example","sidebar":"docs"},{"id":"learn/xcm/fundamentals/multilocation/learn-xcm-docs-multilocation-junctions","path":"/docs/learn/xcm/fundamentals/multilocation-junctions","sidebar":"docs"},{"id":"learn/xcm/fundamentals/multilocation/learn-xcm-docs-multilocation-summary","path":"/docs/learn/xcm/fundamentals/multilocation-summary","sidebar":"docs"},{"id":"learn/xcm/journey/learn-xcm-docs-journey-assets","path":"/docs/learn/xcm/journey-assets","sidebar":"docs"},{"id":"learn/xcm/journey/learn-xcm-docs-journey-channels","path":"/docs/learn/xcm/journey-channels","sidebar":"docs"},{"id":"learn/xcm/journey/learn-xcm-docs-journey-expectations","path":"/docs/learn/xcm/journey-expectations","sidebar":"docs"},{"id":"learn/xcm/journey/learn-xcm-docs-journey-fees","path":"/docs/learn/xcm/journey-fees","sidebar":"docs"},{"id":"learn/xcm/journey/learn-xcm-docs-journey-holding","path":"/docs/learn/xcm/journey-holding","sidebar":"docs"},{"id":"learn/xcm/journey/learn-xcm-docs-journey-origin","path":"/docs/learn/xcm/journey-origin","sidebar":"docs"},{"id":"learn/xcm/journey/learn-xcm-docs-journey-queries","path":"/docs/learn/xcm/journey-queries","sidebar":"docs"},{"id":"learn/xcm/journey/learn-xcm-docs-journey-register","path":"/docs/learn/xcm/journey-register","sidebar":"docs"},{"id":"learn/xcm/journey/learn-xcm-docs-journey-summary","path":"/docs/learn/xcm/journey-summary","sidebar":"docs"},{"id":"learn/xcm/journey/learn-xcm-docs-journey-transact","path":"/docs/learn/xcm/journey-transact","sidebar":"docs"},{"id":"learn/xcm/journey/learn-xcm-docs-journey-version","path":"/docs/learn/xcm/journey-version","sidebar":"docs"},{"id":"learn/xcm/journey/locks/learn-xcm-docs-journey-locks","path":"/docs/learn/xcm/journey-locks","sidebar":"docs"},{"id":"learn/xcm/journey/transfers/learn-xcm-docs-transfers-reserve","path":"/docs/learn/xcm/journey/transfers-reserve","sidebar":"docs"},{"id":"learn/xcm/journey/transfers/learn-xcm-docs-transfers-summary","path":"/docs/learn/xcm/journey/transfers-summary","sidebar":"docs"},{"id":"learn/xcm/journey/transfers/learn-xcm-docs-transfers-teleport","path":"/docs/learn/xcm/journey/transfers-teleport","sidebar":"docs"},{"id":"learn/xcm/learn-xcm-docs-intro","path":"/docs/learn/xcm/introduction","sidebar":"docs"},{"id":"learn/xcm/learn-xcm-docs-testing","path":"/docs/learn/xcm/testing","sidebar":"docs"},{"id":"learn/xcm/overview/learn-xcm-docs-overview-architecture","path":"/docs/learn/xcm/overview-architecture","sidebar":"docs"},{"id":"learn/xcm/overview/learn-xcm-docs-overview-format","path":"/docs/learn/xcm/overview-format","sidebar":"docs"},{"id":"learn/xcm/overview/learn-xcm-docs-overview-intro","path":"/docs/learn/xcm/overview-intro","sidebar":"docs"},{"id":"learn/xcm/overview/learn-xcm-docs-overview-summary","path":"/docs/learn/xcm/overview-summary","sidebar":"docs"},{"id":"learn/xcm/overview/learn-xcm-docs-overview-xcvm","path":"/docs/learn/xcm/overview-xcvm","sidebar":"docs"},{"id":"learn/xcm/quickstart/learn-xcm-docs-quickstart-first-look","path":"/docs/learn/xcm/quickstart-first-look","sidebar":"docs"},{"id":"learn/xcm/quickstart/learn-xcm-docs-quickstart-simulator","path":"/docs/learn/xcm/quickstart-simulator","sidebar":"docs"},{"id":"learn/xcm/quickstart/learn-xcm-docs-quickstart-summary","path":"/docs/learn/xcm/quickstart-summary","sidebar":"docs"},{"id":"learn/xcm/reference/learn-xcm-docs-reference-glossary","path":"/docs/learn/xcm/reference-glossary","sidebar":"docs"},{"id":"learn/xcm/reference/learn-xcm-docs-reference-xcvm-registers","path":"/docs/learn/xcm/reference-xcvm-registers","sidebar":"docs"},{"id":"maintain/archive/maintain-guides-democracy","path":"/docs/maintain/maintain-guides-democracy","sidebar":"docs"},{"id":"maintain/archive/maintain-guides-how-to-join-council","path":"/docs/maintain/maintain-guides-how-to-join-council","sidebar":"docs"},{"id":"maintain/archive/maintain-guides-how-to-vote-councillor","path":"/docs/maintain/maintain-guides-how-to-vote-councillor","sidebar":"docs"},{"id":"maintain/doc-maintain-guides-validator-community","path":"/docs/maintain-guides-validator-community","sidebar":"docs"},{"id":"maintain/kusama/maintain-guides-how-to-validate-kusama","path":"/docs/maintain-guides-how-to-validate-kusama","sidebar":"docs"},{"id":"maintain/kusama/maintain-guides-society-kusama","path":"/docs/maintain-guides-society-kusama","sidebar":"docs"},{"id":"maintain/maintain-archive","path":"/docs/maintain-archive","sidebar":"docs"},{"id":"maintain/maintain-bootnode","path":"/docs/maintain-bootnode","sidebar":"docs"},{"id":"maintain/maintain-endpoints","path":"/docs/maintain-endpoints","sidebar":"docs"},{"id":"maintain/maintain-errors","path":"/docs/maintain-errors","sidebar":"docs"},{"id":"maintain/maintain-guides-async-backing","path":"/docs/maintain-guides-async-backing","sidebar":"docs"},{"id":"maintain/maintain-guides-how-to-chill","path":"/docs/maintain-guides-how-to-chill","sidebar":"docs"},{"id":"maintain/maintain-guides-how-to-monitor-your-node","path":"/docs/maintain-guides-how-to-monitor-your-node","sidebar":"docs"},{"id":"maintain/maintain-guides-how-to-stop-validating","path":"/docs/maintain-guides-how-to-stop-validating","sidebar":"docs"},{"id":"maintain/maintain-guides-how-to-systemd","path":"/docs/maintain-guides-how-to-systemd","sidebar":"docs"},{"id":"maintain/maintain-guides-how-to-upgrade","path":"/docs/maintain-guides-how-to-upgrade","sidebar":"docs"},{"id":"maintain/maintain-guides-how-to-validate-polkadot","path":"/docs/maintain-guides-how-to-validate-polkadot","sidebar":"docs"},{"id":"maintain/maintain-guides-secure-validator","path":"/docs/maintain-guides-secure-validator","sidebar":"docs"},{"id":"maintain/maintain-guides-validator-payout","path":"/docs/maintain-guides-validator-payout","sidebar":"docs"},{"id":"maintain/maintain-index","path":"/docs/maintain-index","sidebar":"docs"},{"id":"maintain/maintain-networks","path":"/docs/maintain-networks","sidebar":"docs"},{"id":"maintain/maintain-polkadot-parameters","path":"/docs/maintain-polkadot-parameters","sidebar":"docs"},{"id":"maintain/maintain-rpc","path":"/docs/maintain-rpc","sidebar":"docs"},{"id":"maintain/maintain-sync","path":"/docs/maintain-sync","sidebar":"docs"},{"id":"maintain/maintain-wss","path":"/docs/maintain-wss","sidebar":"docs"},{"id":"/explore-index","path":"/docs/explore-index","sidebar":"docs"},{"id":"/wallets-index","path":"/docs/wallets-index","sidebar":"docs"},{"id":"/apps-index","path":"/docs/apps-index","sidebar":"docs"},{"id":"/dashboards-index","path":"/docs/dashboards-index","sidebar":"docs"},{"id":"general/dune-analytics","path":"/docs/general/dune-analytics","sidebar":"docs"},{"id":"general/dune-analytics/polkadot-dashboards","path":"/docs/general/dune-analytics/polkadot-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/parachain-dashboards","path":"/docs/general/dune-analytics/parachain-dashboards","sidebar":"docs"},{"id":"/community-index","path":"/docs/community-index","sidebar":"docs"},{"id":"/programs-index","path":"/docs/programs-index","sidebar":"docs"},{"id":"/learn-index","path":"/docs/learn-index","sidebar":"docs"},{"id":"/general-index","path":"/docs/general-index","sidebar":"docs"},{"id":"/polkadot-vision-index","path":"/docs/polkadot-vision-index","sidebar":"docs"},{"id":"/stay-safe-index","path":"/docs/stay-safe-index","sidebar":"docs"},{"id":"/learn-basics-index","path":"/docs/learn-basics-index","sidebar":"docs"},{"id":"/learn-staking-index","path":"/docs/learn-staking-index","sidebar":"docs"},{"id":"/learn-polkadot-opengov-index","path":"/docs/learn-polkadot-opengov-index","sidebar":"docs"},{"id":"/learn-assets-index","path":"/docs/learn-assets-index","sidebar":"docs"},{"id":"/learn-participants-index","path":"/docs/learn-participants-index","sidebar":"docs"},{"id":"/learn-components-index","path":"/docs/learn-components-index","sidebar":"docs"},{"id":"/learn-advanced-index","path":"/docs/learn-advanced-index","sidebar":"docs"},{"id":"/learn-parachains-index","path":"/docs/learn-parachains-index","sidebar":"docs"},{"id":"/learn-agile-coretime-index","path":"/docs/learn-agile-coretime-index","sidebar":"docs"},{"id":"/learn-xcm-index","path":"/docs/learn-xcm-index","sidebar":"docs"},{"id":"learn/xcm","path":"/docs/learn/xcm","sidebar":"docs"},{"id":"/learn/xcm/overview","path":"/docs/learn/xcm/overview","sidebar":"docs"},{"id":"/learn/xcm/quickstart","path":"/docs/learn/xcm/quickstart","sidebar":"docs"},{"id":"/learn/xcm/fundamentals","path":"/docs/learn/xcm/fundamentals","sidebar":"docs"},{"id":"/learn/xcm/fundamentals/multilocation","path":"/docs/learn/xcm/fundamentals/multilocation","sidebar":"docs"},{"id":"/learn/xcm/journey","path":"/docs/learn/xcm/journey","sidebar":"docs"},{"id":"/learn/xcm/journey/transfers","path":"/docs/learn/xcm/journey/transfers","sidebar":"docs"},{"id":"/learn/xcm/references","path":"/docs/learn/xcm/references","sidebar":"docs"},{"id":"/learn-comparisons-index","path":"/docs/learn-comparisons-index","sidebar":"docs"},{"id":"/learn-future-implementations-index","path":"/docs/learn-future-implementations-index","sidebar":"docs"},{"id":"/learn-jam","path":"/docs/learn-jam","sidebar":"docs"},{"id":"/build-client-index","path":"/docs/build-client-index","sidebar":"docs"},{"id":"/build-protocol-index","path":"/docs/build-protocol-index","sidebar":"docs"},{"id":"/build-archive-index","path":"/docs/build-archive-index","sidebar":"docs"},{"id":"/maintain-node-index","path":"/docs/maintain-node-index","sidebar":"docs"},{"id":"/maintain-collator-index","path":"/docs/maintain-collator-index","sidebar":"docs"},{"id":"/maintain-validator-index","path":"/docs/maintain-validator-index","sidebar":"docs"}],"draftIds":[],"sidebars":{"docs":{"link":{"path":"/docs/explore-index","label":"Explore"}}}}],"breadcrumbs":true}}}'),i=JSON.parse('{"defaultLocale":"en","locales":["en"],"path":"i18n","currentLocale":"en","localeConfigs":{"en":{"label":"English","direction":"ltr","htmlLang":"en","calendar":"gregory","path":"en"}}}');var s=n(59940);const c=JSON.parse('{"docusaurusVersion":"3.5.2","pluginVersions":{"docusaurus-plugin-content-docs":{"type":"package","name":"@docusaurus/plugin-content-docs","version":"3.5.2"},"docusaurus-plugin-content-blog":{"type":"package","name":"@docusaurus/plugin-content-blog","version":"3.5.2"},"docusaurus-plugin-content-pages":{"type":"package","name":"@docusaurus/plugin-content-pages","version":"3.5.2"},"docusaurus-plugin-sitemap":{"type":"package","name":"@docusaurus/plugin-sitemap","version":"3.5.2"},"docusaurus-theme-classic":{"type":"package","name":"@docusaurus/theme-classic","version":"3.5.2"},"docusaurus-theme-search-algolia":{"type":"package","name":"@docusaurus/theme-search-algolia","version":"3.5.2"},"docusaurus-plugin-client-redirects":{"type":"package","name":"@docusaurus/plugin-client-redirects","version":"3.5.2"},"docusaurus-theme-mermaid":{"type":"package","name":"@docusaurus/theme-mermaid","version":"3.5.2"}}}');var l=n(74848),u={siteConfig:a.default,siteMetadata:c,globalData:o,i18n:i,codeTranslations:s},d=r.createContext(u);function p(e){var t=e.children;return(0,l.jsx)(d.Provider,{value:u,children:t})}},67489:(e,t,n)=>{"use strict";n.d(t,{A:()=>b});var r=n(77387),a=n(96540),o=n(38193),i=n(5260),s=n(70440),c=n(96300),l=n(53102),u=n(74848);function d(e){var t=e.error,n=e.tryAgain;return(0,u.jsxs)("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"flex-start",minHeight:"100vh",width:"100%",maxWidth:"80ch",fontSize:"20px",margin:"0 auto",padding:"1rem"},children:[(0,u.jsx)("h1",{style:{fontSize:"3rem"},children:"This page crashed"}),(0,u.jsx)("button",{type:"button",onClick:n,style:{margin:"1rem 0",fontSize:"2rem",cursor:"pointer",borderRadius:20,padding:"1rem"},children:"Try again"}),(0,u.jsx)(p,{error:t})]})}function p(e){var t=e.error,n=(0,s.rA)(t).map((function(e){return e.message})).join("\n\nCause:\n");return(0,u.jsx)("p",{style:{whiteSpace:"pre-wrap"},children:n})}function f(e){var t=e.children;return(0,u.jsx)(l.W,{value:{plugin:{name:"docusaurus-core-error-boundary",id:"default"}},children:t})}function m(e){var t=e.error,n=e.tryAgain;return(0,u.jsx)(f,{children:(0,u.jsxs)(b,{fallback:function(){return(0,u.jsx)(d,{error:t,tryAgain:n})},children:[(0,u.jsx)(i.A,{children:(0,u.jsx)("title",{children:"Page Error"})}),(0,u.jsx)(c.A,{children:(0,u.jsx)(d,{error:t,tryAgain:n})})]})})}var h=function(e){return(0,u.jsx)(m,Object.assign({},e))},b=function(e){function t(t){var n;return(n=e.call(this,t)||this).state={error:null},n}(0,r.A)(t,e);var n=t.prototype;return n.componentDidCatch=function(e){o.A.canUseDOM&&this.setState({error:e})},n.render=function(){var e=this,t=this.props.children,n=this.state.error;if(n){var r,a={error:n,tryAgain:function(){return e.setState({error:null})}};return(null!=(r=this.props.fallback)?r:h)(a)}return null!=t?t:null},t}(a.Component)},38193:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r="undefined"!=typeof window&&"document"in window&&"createElement"in window.document;const a={canUseDOM:r,canUseEventListeners:r&&("addEventListener"in window||"attachEvent"in window),canUseIntersectionObserver:r&&"IntersectionObserver"in window,canUseViewport:r&&"screen"in window}},5260:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});n(96540);var r=n(80545),a=n(74848);function o(e){return(0,a.jsx)(r.mg,Object.assign({},e))}},28774:(e,t,n)=>{"use strict";n.d(t,{A:()=>h});var r=n(98587),a=n(96540),o=n(54625),i=n(70440),s=n(44586),c=n(16654),l=n(38193),u=n(63427),d=n(86025),p=n(74848),f=["isNavLink","to","href","activeClassName","isActive","data-noBrokenLinkCheck","autoAddBaseUrl"];function m(e,t){var n,m,h,b=e.isNavLink,g=e.to,y=e.href,v=e.activeClassName,x=e.isActive,w=e["data-noBrokenLinkCheck"],k=e.autoAddBaseUrl,_=void 0===k||k,S=(0,r.A)(e,f),E=(0,s.A)().siteConfig,j=E.trailingSlash,O=E.baseUrl,A=E.future.experimental_router,C=(0,d.hH)().withBaseUrl,P=(0,u.A)(),T=(0,a.useRef)(null);(0,a.useImperativeHandle)(t,(function(){return T.current}));var I=g||y;var N,R,L=(0,c.A)(I),D=null==I?void 0:I.replace("pathname://",""),M=void 0!==D?(N=D,_&&function(e){return e.startsWith("/")}(N)?C(N):N):void 0;"hash"===A&&null!=(n=M)&&n.startsWith("./")&&(M=null==(R=M)?void 0:R.slice(1));M&&L&&(M=(0,i.Ks)(M,{trailingSlash:j,baseUrl:O}));var F=(0,a.useRef)(!1),B=b?o.k2:o.N_,z=l.A.canUseIntersectionObserver,U=(0,a.useRef)(),$=function(){F.current||null==M||(window.docusaurus.preload(M),F.current=!0)};(0,a.useEffect)((function(){return!z&&L&&l.A.canUseDOM&&null!=M&&window.docusaurus.prefetch(M),function(){z&&U.current&&U.current.disconnect()}}),[U,M,z,L]);var q=null!=(m=null==(h=M)?void 0:h.startsWith("#"))&&m,H=!S.target||"_self"===S.target,V=!M||!L||!H||q&&"hash"!==A;w||!q&&V||P.collectLink(M),S.id&&P.collectAnchor(S.id);var W={};return V?(0,p.jsx)("a",Object.assign({ref:T,href:M},I&&!L&&{target:"_blank",rel:"noopener noreferrer"},S,W)):(0,p.jsx)(B,Object.assign({},S,{onMouseEnter:$,onTouchStart:$,innerRef:function(e){T.current=e,z&&e&&L&&(U.current=new window.IntersectionObserver((function(t){t.forEach((function(t){e===t.target&&(t.isIntersecting||t.intersectionRatio>0)&&(U.current.unobserve(e),U.current.disconnect(),null!=M&&window.docusaurus.prefetch(M))}))})),U.current.observe(e))},to:M},b&&{isActive:x,activeClassName:v},W))}const h=a.forwardRef(m)},21312:(e,t,n)=>{"use strict";n.d(t,{A:()=>l,T:()=>c});var r=n(96540),a=n(74848);function o(e,t){var n=e.split(/(\{\w+\})/).map((function(e,n){if(n%2==1){var r=null==t?void 0:t[e.slice(1,-1)];if(void 0!==r)return r}return e}));return n.some((function(e){return(0,r.isValidElement)(e)}))?n.map((function(e,t){return(0,r.isValidElement)(e)?r.cloneElement(e,{key:t}):e})).filter((function(e){return""!==e})):n.join("")}var i=n(59940);function s(e){var t,n,r=e.id,a=e.message;if(void 0===r&&void 0===a)throw new Error("Docusaurus translation declarations must have at least a translation id or a default translation message");return null!=(t=null!=(n=i[null!=r?r:a])?n:a)?t:r}function c(e,t){return o(s({message:e.message,id:e.id}),t)}function l(e){var t=e.children,n=e.id,r=e.values;if(t&&"string"!=typeof t)throw console.warn("Illegal children",t),new Error("The Docusaurus component only accept simple string values");var i=s({message:t,id:n});return(0,a.jsx)(a.Fragment,{children:o(i,r)})}},17065:(e,t,n)=>{"use strict";n.d(t,{W:()=>r});var r="default"},16654:(e,t,n)=>{"use strict";function r(e){return/^(?:\w*:|\/\/)/.test(e)}function a(e){return void 0!==e&&!r(e)}n.d(t,{A:()=>a,z:()=>r})},86025:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>s,hH:()=>i});var r=n(96540),a=n(44586),o=n(16654);function i(){var e=(0,a.A)().siteConfig,t=e.baseUrl,n=e.url,i=e.future.experimental_router,s=(0,r.useCallback)((function(e,r){return function(e){var t=e.siteUrl,n=e.baseUrl,r=e.url,a=e.options,i=void 0===a?{}:a,s=i.forcePrependBaseUrl,c=void 0!==s&&s,l=i.absolute,u=void 0!==l&&l,d=e.router;if(!r||r.startsWith("#")||(0,o.z)(r))return r;if("hash"===d)return r.startsWith("/")?"."+r:"./"+r;if(c)return n+r.replace(/^\//,"");if(r===n.replace(/\/$/,""))return n;var p=r.startsWith(n)?r:n+r.replace(/^\//,"");return u?t+p:p}({siteUrl:n,baseUrl:t,url:e,options:r,router:i})}),[n,t,i]);return{withBaseUrl:s}}function s(e,t){return void 0===t&&(t={}),(0,i().withBaseUrl)(e,t)}},63427:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(96540),a=(n(74848),r.createContext({collectAnchor:function(){},collectLink:function(){}})),o=function(){return(0,r.useContext)(a)};function i(){return o()}},44586:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(96540),a=n(73348);function o(){return(0,r.useContext)(a.o)}},92303:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(96540),a=n(6125);function o(){return(0,r.useContext)(a.o)}},205:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(96540);const a=n(38193).A.canUseDOM?r.useLayoutEffect:r.useEffect},86921:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=function(e){return"object"==typeof e&&!!e&&Object.keys(e).length>0};function a(e){var t={};return function e(n,a){Object.entries(n).forEach((function(n){var o=n[0],i=n[1],s=a?a+"."+o:o;r(i)?e(i,s):t[s]=i}))}(e),t}},53102:(e,t,n)=>{"use strict";n.d(t,{W:()=>i,o:()=>o});var r=n(96540),a=n(74848),o=r.createContext(null);function i(e){var t=e.children,n=e.value,i=r.useContext(o),s=(0,r.useMemo)((function(){return function(e){var t=e.parent,n=e.value;if(!t){if(!n)throw new Error("Unexpected: no Docusaurus route context found");if(!("plugin"in n))throw new Error("Unexpected: Docusaurus topmost route context has no `plugin` attribute");return n}var r=Object.assign({},t.data,null==n?void 0:n.data);return{plugin:t.plugin,data:r}}({parent:i,value:n})}),[i,n]);return(0,a.jsx)(o.Provider,{value:s,children:t})}},53886:(e,t,n)=>{"use strict";n.d(t,{VQ:()=>b,XK:()=>v,g1:()=>y});var r=n(96540),a=n(44070),o=n(17065),i=n(6342),s=n(75376),c=n(43807),l=n(74848),u=function(e){return"docs-preferred-version-"+e},d={save:function(e,t,n){(0,s.Wf)(u(e),{persistence:t}).set(n)},read:function(e,t){return(0,s.Wf)(u(e),{persistence:t}).get()},clear:function(e,t){(0,s.Wf)(u(e),{persistence:t}).del()}},p=function(e){return Object.fromEntries(e.map((function(e){return[e,{preferredVersionName:null}]})))};var f=r.createContext(null);function m(){var e=(0,a.Gy)(),t=(0,i.p)().docs.versionPersistence,n=(0,r.useMemo)((function(){return Object.keys(e)}),[e]),o=(0,r.useState)((function(){return p(n)})),s=o[0],c=o[1];return(0,r.useEffect)((function(){c(function(e){var t=e.pluginIds,n=e.versionPersistence,r=e.allDocsData;return Object.fromEntries(t.map((function(e){return[e,(t=e,a=d.read(t,n),r[t].versions.some((function(e){return e.name===a}))?{preferredVersionName:a}:(d.clear(t,n),{preferredVersionName:null}))];var t,a})))}({allDocsData:e,versionPersistence:t,pluginIds:n}))}),[e,t,n]),[s,(0,r.useMemo)((function(){return{savePreferredVersion:function(e,n){d.save(e,t,n),c((function(t){var r;return Object.assign({},t,((r={})[e]={preferredVersionName:n},r))}))}}}),[t])]}function h(e){var t=e.children,n=m();return(0,l.jsx)(f.Provider,{value:n,children:t})}function b(e){var t=e.children;return(0,l.jsx)(h,{children:t})}function g(){var e=(0,r.useContext)(f);if(!e)throw new c.dV("DocsPreferredVersionContextProvider");return e}function y(e){var t;void 0===e&&(e=o.W);var n=(0,a.ht)(e),i=g(),s=i[0],c=i[1],l=s[e].preferredVersionName;return{preferredVersion:null!=(t=n.versions.find((function(e){return e.name===l})))?t:null,savePreferredVersionName:(0,r.useCallback)((function(t){c.savePreferredVersion(e,t)}),[c,e])}}function v(){var e=(0,a.Gy)(),t=g()[0];var n=Object.keys(e);return Object.fromEntries(n.map((function(n){return[n,(r=n,o=e[r],i=t[r].preferredVersionName,null!=(a=o.versions.find((function(e){return e.name===i})))?a:null)];var r,a,o,i})))}},82565:(e,t,n)=>{"use strict";n.d(t,{k:()=>o,v:()=>i});var r=n(44070),a=n(53886);function o(e,t){return"docs-"+e+"-"+t}function i(){var e=(0,r.Gy)(),t=(0,r.gk)(),n=(0,a.XK)();return[].concat(Object.keys(e).map((function(r){var a,i=(null==t?void 0:t.activePlugin.pluginId)===r?t.activeVersion:void 0,s=n[r],c=e[r].versions.find((function(e){return e.isLast}));return o(r,(null!=(a=null!=i?i:s)?a:c).name)})))}},60609:(e,t,n)=>{"use strict";n.d(t,{V:()=>c,t:()=>l});var r=n(96540),a=n(43807),o=n(74848),i=Symbol("EmptyContext"),s=r.createContext(i);function c(e){var t=e.children,n=e.name,a=e.items,i=(0,r.useMemo)((function(){return n&&a?{name:n,items:a}:null}),[n,a]);return(0,o.jsx)(s.Provider,{value:i,children:t})}function l(){var e=(0,r.useContext)(s);if(e===i)throw new a.dV("DocsSidebarProvider");return e}},26972:(e,t,n)=>{"use strict";n.d(t,{$S:()=>h,B5:()=>j,Nr:()=>m,OF:()=>k,QB:()=>E,Vd:()=>_,Y:()=>x,cC:()=>f,d1:()=>O,fW:()=>S,w8:()=>y});var r=n(43845),a=n(96540),o=n(56347),i=n(22831),s=n(44070),c=n(99169),l=n(31682),u=n(53886),d=n(23025),p=n(60609);function f(e){var t=(0,d.r)();if(e){var n=t.docs[e];if(!n)throw new Error("no version doc found by id="+e);return n}}function m(e){return"link"!==e.type||e.unlisted?"category"===e.type?function(e){if(e.href&&!e.linkUnlisted)return e.href;for(var t,n=(0,r.A)(e.items);!(t=n()).done;){var a=m(t.value);if(a)return a}}(e):void 0:e.href}function h(){var e=(0,o.zy)().pathname,t=(0,p.t)();if(!t)throw new Error("Unexpected: cant find current sidebar in context");var n=w({sidebarItems:t.items,pathname:e,onlyCategories:!0}).slice(-1)[0];if(!n)throw new Error(e+" is not associated with a category. useCurrentSidebarCategory() should only be used on category index pages.");return n}var b=function(e,t){return void 0!==e&&(0,c.ys)(e,t)},g=function(e,t){return e.some((function(e){return y(e,t)}))};function y(e,t){return"link"===e.type?b(e.href,t):"category"===e.type&&(b(e.href,t)||g(e.items,t))}function v(e,t){switch(e.type){case"category":return y(e,t)||e.items.some((function(e){return v(e,t)}));case"link":return!e.unlisted||y(e,t);default:return!0}}function x(e,t){return(0,a.useMemo)((function(){return e.filter((function(e){return v(e,t)}))}),[e,t])}function w(e){var t=e.sidebarItems,n=e.pathname,a=e.onlyCategories,o=void 0!==a&&a,i=[];return function e(t){for(var a,s=(0,r.A)(t);!(a=s()).done;){var l=a.value;if("category"===l.type&&((0,c.ys)(l.href,n)||e(l.items))||"link"===l.type&&(0,c.ys)(l.href,n))return o&&"category"!==l.type||i.unshift(l),!0}return!1}(t),i}function k(){var e,t=(0,p.t)(),n=(0,o.zy)().pathname;return!1!==(null==(e=(0,s.vT)())?void 0:e.pluginData.breadcrumbs)&&t?w({sidebarItems:t.items,pathname:n}):null}function _(e){var t=(0,s.zK)(e).activeVersion,n=(0,u.g1)(e).preferredVersion,r=(0,s.r7)(e);return(0,a.useMemo)((function(){return(0,l.sb)([t,n,r].filter(Boolean))}),[t,n,r])}function S(e,t){var n=_(t);return(0,a.useMemo)((function(){var t=n.flatMap((function(e){return e.sidebars?Object.entries(e.sidebars):[]})),r=t.find((function(t){return t[0]===e}));if(!r)throw new Error("Can't find any sidebar with id \""+e+'" in version'+(n.length>1?"s":"")+" "+n.map((function(e){return e.name})).join(", ")+'".\nAvailable sidebar ids are:\n- '+t.map((function(e){return e[0]})).join("\n- "));return r[1]}),[e,n])}function E(e,t){var n=_(t);return(0,a.useMemo)((function(){var t=n.flatMap((function(e){return e.docs})),r=t.find((function(t){return t.id===e}));if(!r){if(n.flatMap((function(e){return e.draftIds})).includes(e))return null;throw new Error("Couldn't find any doc with id \""+e+'" in version'+(n.length>1?"s":"")+' "'+n.map((function(e){return e.name})).join(", ")+'".\nAvailable doc ids are:\n- '+(0,l.sb)(t.map((function(e){return e.id}))).join("\n- "))}return r}),[e,n])}function j(e){var t=e.route,n=(0,o.zy)(),r=(0,d.r)(),a=t.routes,s=a.find((function(e){return(0,o.B6)(n.pathname,e)}));if(!s)return null;var c=s.sidebar,l=c?r.docsSidebars[c]:void 0;return{docElement:(0,i.v)(a),sidebarName:c,sidebarItems:l}}function O(e){return e.filter((function(e){return!("category"===e.type||"link"===e.type)||!!m(e)}))}},23025:(e,t,n)=>{"use strict";n.d(t,{n:()=>s,r:()=>c});var r=n(96540),a=n(43807),o=n(74848),i=r.createContext(null);function s(e){var t=e.children,n=e.version;return(0,o.jsx)(i.Provider,{value:n,children:t})}function c(){var e=(0,r.useContext)(i);if(null===e)throw new a.dV("DocsVersionProvider");return e}},44070:(e,t,n)=>{"use strict";n.d(t,{zK:()=>g,vT:()=>f,gk:()=>m,Gy:()=>d,HW:()=>y,ht:()=>p,r7:()=>b,jh:()=>h});var r=n(56347),a=n(44586),o=n(17065);function i(e,t){void 0===t&&(t={});var n=(0,a.A)().globalData[e];if(!n&&t.failfast)throw new Error('Docusaurus plugin global data not found for "'+e+'" plugin.');return n}var s=function(e){return e.versions.find((function(e){return e.isLast}))};function c(e,t){return[].concat(e.versions).sort((function(e,t){return e.path===t.path?0:e.path.includes(t.path)?-1:t.path.includes(e.path)?1:0})).find((function(e){return!!(0,r.B6)(t,{path:e.path,exact:!1,strict:!1})}))}function l(e,t){var n,a,o=c(e,t),i=null==o?void 0:o.docs.find((function(e){return!!(0,r.B6)(t,{path:e.path,exact:!0,strict:!1})}));return{activeVersion:o,activeDoc:i,alternateDocVersions:i?(n=i.id,a={},e.versions.forEach((function(e){e.docs.forEach((function(t){t.id===n&&(a[e.name]=t)}))})),a):{}}}var u={},d=function(){var e;return null!=(e=i("docusaurus-plugin-content-docs"))?e:u},p=function(e){try{return function(e,t,n){void 0===t&&(t=o.W),void 0===n&&(n={});var r=i(e),a=null==r?void 0:r[t];if(!a&&n.failfast)throw new Error('Docusaurus plugin global data not found for "'+e+'" plugin with id "'+t+'".');return a}("docusaurus-plugin-content-docs",e,{failfast:!0})}catch(t){throw new Error("You are using a feature of the Docusaurus docs plugin, but this plugin does not seem to be enabled"+("Default"===e?"":" (pluginId="+e),{cause:t})}};function f(e){return void 0===e&&(e={}),function(e,t,n){void 0===n&&(n={});var a=Object.entries(e).sort((function(e,t){return t[1].path.localeCompare(e[1].path)})).find((function(e){var n=e[1];return!!(0,r.B6)(t,{path:n.path,exact:!1,strict:!1})})),o=a?{pluginId:a[0],pluginData:a[1]}:void 0;if(!o&&n.failfast)throw new Error("Can't find active docs plugin for \""+t+'" pathname, while it was expected to be found. Maybe you tried to use a docs feature that can only be used on a docs-related page? Existing docs plugin paths are: '+Object.values(e).map((function(e){return e.path})).join(", "));return o}(d(),(0,r.zy)().pathname,e)}function m(e){void 0===e&&(e={});var t=f(e),n=(0,r.zy)().pathname;if(t)return{activePlugin:t,activeVersion:c(t.pluginData,n)}}function h(e){return p(e).versions}function b(e){var t=p(e);return s(t)}function g(e){return l(p(e),(0,r.zy)().pathname)}function y(e){return function(e,t){var n=s(e);return{latestDocSuggestion:l(e,t).alternateDocVersions[n.name],latestVersionSuggestion:n}}(p(e),(0,r.zy)().pathname)}},76294:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(5947),a=n.n(r);a().configure({showSpinner:!1});const o={onRouteUpdate:function(e){var t=e.location,n=e.previousLocation;if(n&&t.pathname!==n.pathname){var r=window.setTimeout((function(){a().start()}),200);return function(){return window.clearTimeout(r)}}},onRouteDidUpdate:function(){a().done()}}},26134:(e,t,n)=>{"use strict";var r,a,o=n(71765),i=n(85290);r=o.My,a=i.default.themeConfig.prism.additionalLanguages,globalThis.Prism=r,a.forEach((function(e){"php"===e&&n(19700),n(91830)("./prism-"+e)})),delete globalThis.Prism},51107:(e,t,n)=>{"use strict";n.d(t,{A:()=>p});var r=n(98587),a=(n(96540),n(34164)),o=n(21312),i=n(6342),s=n(28774),c=n(63427);const l={anchorWithStickyNavbar:"anchorWithStickyNavbar_LWe7",anchorWithHideOnScrollNavbar:"anchorWithHideOnScrollNavbar_WYt5"};var u=n(74848),d=["as","id"];function p(e){var t=e.as,n=e.id,p=(0,r.A)(e,d),f=(0,c.A)(),m=(0,i.p)().navbar.hideOnScroll;if("h1"===t||!n)return(0,u.jsx)(t,Object.assign({},p,{id:void 0}));f.collectAnchor(n);var h=(0,o.T)({id:"theme.common.headingLinkTitle",message:"Direct link to {heading}",description:"Title for link to heading"},{heading:"string"==typeof p.children?p.children:n});return(0,u.jsxs)(t,Object.assign({},p,{className:(0,a.A)("anchor",m?l.anchorWithHideOnScrollNavbar:l.anchorWithStickyNavbar,p.className),id:n,children:[p.children,(0,u.jsx)(s.A,{className:"hash-link",to:"#"+n,"aria-label":h,title:h,children:"\u200b"})]}))}},43186:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});n(96540);const r={iconExternalLink:"iconExternalLink_nPIU"};var a=n(74848);function o(e){var t=e.width,n=void 0===t?13.5:t,o=e.height,i=void 0===o?13.5:o;return(0,a.jsx)("svg",{width:n,height:i,"aria-hidden":"true",viewBox:"0 0 24 24",className:r.iconExternalLink,children:(0,a.jsx)("path",{fill:"currentColor",d:"M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"})})}},96300:(e,t,n)=>{"use strict";n.d(t,{A:()=>Bt});var r=n(96540),a=n(34164),o=n(67489),i=n(69024),s=n(56347),c=n(21312),l=n(75062),u=n(74848),d="__docusaurus_skipToContent_fallback";function p(e){e.setAttribute("tabindex","-1"),e.focus(),e.removeAttribute("tabindex")}function f(){var e=(0,r.useRef)(null),t=(0,s.W6)().action,n=(0,r.useCallback)((function(e){e.preventDefault();var t,n=null!=(t=document.querySelector("main:first-of-type"))?t:document.getElementById(d);n&&p(n)}),[]);return(0,l.$)((function(n){var r=n.location;e.current&&!r.hash&&"PUSH"===t&&p(e.current)})),{containerRef:e,onClick:n}}var m=(0,c.T)({id:"theme.common.skipToMainContent",description:"The skip to content label used for accessibility, allowing to rapidly navigate to main content with keyboard tab/enter navigation",message:"Skip to main content"});function h(e){var t,n=null!=(t=e.children)?t:m,r=f(),a=r.containerRef,o=r.onClick;return(0,u.jsx)("div",{ref:a,role:"region","aria-label":m,children:(0,u.jsx)("a",Object.assign({},e,{href:"#"+d,onClick:o,children:n}))})}var b=n(17559),g=n(14090);const y={skipToContent:"skipToContent_fXgn"};function v(){return(0,u.jsx)(h,{className:y.skipToContent})}var x=n(6342),w=n(65041),k=n(98587),_=["width","height","color","strokeWidth","className"];function S(e){var t=e.width,n=void 0===t?21:t,r=e.height,a=void 0===r?21:r,o=e.color,i=void 0===o?"currentColor":o,s=e.strokeWidth,c=void 0===s?1.2:s,l=(e.className,(0,k.A)(e,_));return(0,u.jsx)("svg",Object.assign({viewBox:"0 0 15 15",width:n,height:a},l,{children:(0,u.jsx)("g",{stroke:i,strokeWidth:c,children:(0,u.jsx)("path",{d:"M.75.75l13.5 13.5M14.25.75L.75 14.25"})})}))}const E={closeButton:"closeButton_CVFx"};function j(e){return(0,u.jsx)("button",Object.assign({type:"button","aria-label":(0,c.T)({id:"theme.AnnouncementBar.closeButtonAriaLabel",message:"Close",description:"The ARIA label for close button of announcement bar"})},e,{className:(0,a.A)("clean-btn close",E.closeButton,e.className),children:(0,u.jsx)(S,{width:14,height:14,strokeWidth:3.1})}))}const O={content:"content_knG7"};function A(e){var t=(0,x.p)().announcementBar.content;return(0,u.jsx)("div",Object.assign({},e,{className:(0,a.A)(O.content,e.className),dangerouslySetInnerHTML:{__html:t}}))}const C={announcementBar:"announcementBar_mb4j",announcementBarPlaceholder:"announcementBarPlaceholder_vyr4",announcementBarClose:"announcementBarClose_gvF7",announcementBarContent:"announcementBarContent_xLdY"};function P(){var e=(0,x.p)().announcementBar,t=(0,w.M)(),n=t.isActive,r=t.close;if(!n)return null;var a=e.backgroundColor,o=e.textColor,i=e.isCloseable;return(0,u.jsxs)("div",{className:C.announcementBar,style:{backgroundColor:a,color:o},role:"banner",children:[i&&(0,u.jsx)("div",{className:C.announcementBarPlaceholder}),(0,u.jsx)(A,{className:C.announcementBarContent}),i&&(0,u.jsx)(j,{onClick:r,className:C.announcementBarClose})]})}var T=n(22069),I=n(23104);var N=n(43807),R=n(75600),L=r.createContext(null);function D(e){var t,n,a,o,i,s,c,l=e.children,d=(t=(0,T.M)(),n=(0,R.YL)(),a=(0,r.useState)(!1),o=a[0],i=a[1],s=null!==n.component,c=(0,N.ZC)(s),(0,r.useEffect)((function(){s&&!c&&i(!0)}),[s,c]),(0,r.useEffect)((function(){s?t.shown||i(!0):i(!1)}),[t.shown,s]),(0,r.useMemo)((function(){return[o,i]}),[o]));return(0,u.jsx)(L.Provider,{value:d,children:l})}function M(e){if(e.component){var t=e.component;return(0,u.jsx)(t,Object.assign({},e.props))}}function F(){var e=(0,r.useContext)(L);if(!e)throw new N.dV("NavbarSecondaryMenuDisplayProvider");var t=e[0],n=e[1],a=(0,r.useCallback)((function(){return n(!1)}),[n]),o=(0,R.YL)();return(0,r.useMemo)((function(){return{shown:t,hide:a,content:M(o)}}),[a,o,t])}function B(e){var t=e.header,n=e.primaryMenu,r=e.secondaryMenu,o=F().shown;return(0,u.jsxs)("div",{className:"navbar-sidebar",children:[t,(0,u.jsxs)("div",{className:(0,a.A)("navbar-sidebar__items",{"navbar-sidebar__items--show-secondary":o}),children:[(0,u.jsx)("div",{className:"navbar-sidebar__item menu",children:n}),(0,u.jsx)("div",{className:"navbar-sidebar__item menu",children:r})]})]})}var z=n(95293),U=n(92303);function $(e){return(0,u.jsx)("svg",Object.assign({viewBox:"0 0 24 24",width:24,height:24},e,{children:(0,u.jsx)("path",{fill:"currentColor",d:"M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"})}))}function q(e){return(0,u.jsx)("svg",Object.assign({viewBox:"0 0 24 24",width:24,height:24},e,{children:(0,u.jsx)("path",{fill:"currentColor",d:"M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"})}))}const H={toggle:"toggle_vylO",toggleButton:"toggleButton_gllP",darkToggleIcon:"darkToggleIcon_wfgR",lightToggleIcon:"lightToggleIcon_pyhR",toggleButtonDisabled:"toggleButtonDisabled_aARS"};function V(e){var t=e.className,n=e.buttonClassName,r=e.value,o=e.onChange,i=(0,U.A)(),s=(0,c.T)({message:"Switch between dark and light mode (currently {mode})",id:"theme.colorToggle.ariaLabel",description:"The ARIA label for the navbar color mode toggle"},{mode:"dark"===r?(0,c.T)({message:"dark mode",id:"theme.colorToggle.ariaLabel.mode.dark",description:"The name for the dark color mode"}):(0,c.T)({message:"light mode",id:"theme.colorToggle.ariaLabel.mode.light",description:"The name for the light color mode"})});return(0,u.jsx)("div",{className:(0,a.A)(H.toggle,t),children:(0,u.jsxs)("button",{className:(0,a.A)("clean-btn",H.toggleButton,!i&&H.toggleButtonDisabled,n),type:"button",onClick:function(){return o("dark"===r?"light":"dark")},disabled:!i,title:s,"aria-label":s,"aria-live":"polite",children:[(0,u.jsx)($,{className:(0,a.A)(H.toggleIcon,H.lightToggleIcon)}),(0,u.jsx)(q,{className:(0,a.A)(H.toggleIcon,H.darkToggleIcon)})]})})}const W=r.memo(V),K={darkNavbarColorModeToggle:"darkNavbarColorModeToggle_X3D1"};function G(e){var t=e.className,n=(0,x.p)().navbar.style,r=(0,x.p)().colorMode.disableSwitch,a=(0,z.G)(),o=a.colorMode,i=a.setColorMode;return r?null:(0,u.jsx)(W,{className:t,buttonClassName:"dark"===n?K.darkNavbarColorModeToggle:void 0,value:o,onChange:i})}var Q=n(39529);function Y(){return(0,u.jsx)(Q.A,{className:"navbar__brand",imageClassName:"navbar__logo",titleClassName:"navbar__title text--truncate"})}function Z(){var e=(0,T.M)();return(0,u.jsx)("button",{type:"button","aria-label":(0,c.T)({id:"theme.docs.sidebar.closeSidebarButtonAriaLabel",message:"Close navigation bar",description:"The ARIA label for close button of mobile sidebar"}),className:"clean-btn navbar-sidebar__close",onClick:function(){return e.toggle()},children:(0,u.jsx)(S,{color:"var(--ifm-color-emphasis-600)"})})}function X(){return(0,u.jsxs)("div",{className:"navbar-sidebar__brand",children:[(0,u.jsx)(Y,{}),(0,u.jsx)(G,{className:"margin-right--md"}),(0,u.jsx)(Z,{})]})}var J=n(28774),ee=n(86025),te=n(16654),ne=n(91252),re=n(43186),ae=["activeBasePath","activeBaseRegex","to","href","label","html","isDropdownLink","prependBaseUrlToHref"];function oe(e){var t=e.activeBasePath,n=e.activeBaseRegex,r=e.to,a=e.href,o=e.label,i=e.html,s=e.isDropdownLink,c=e.prependBaseUrlToHref,l=(0,k.A)(e,ae),d=(0,ee.Ay)(r),p=(0,ee.Ay)(t),f=(0,ee.Ay)(a,{forcePrependBaseUrl:!0}),m=o&&a&&!(0,te.A)(a),h=i?{dangerouslySetInnerHTML:{__html:i}}:{children:(0,u.jsxs)(u.Fragment,{children:[o,m&&(0,u.jsx)(re.A,Object.assign({},s&&{width:12,height:12}))]})};return a?(0,u.jsx)(J.A,Object.assign({href:c?f:a},l,h)):(0,u.jsx)(J.A,Object.assign({to:d,isNavLink:!0},(t||n)&&{isActive:function(e,t){return n?(0,ne.G)(n,t.pathname):t.pathname.startsWith(p)}},l,h))}var ie=["className","isDropdownItem"],se=["className","isDropdownItem"],ce=["mobile","position"];function le(e){var t=e.className,n=e.isDropdownItem,r=void 0!==n&&n,o=(0,k.A)(e,ie),i=(0,u.jsx)(oe,Object.assign({className:(0,a.A)(r?"dropdown__link":"navbar__item navbar__link",t),isDropdownLink:r},o));return r?(0,u.jsx)("li",{children:i}):i}function ue(e){var t=e.className,n=(e.isDropdownItem,(0,k.A)(e,se));return(0,u.jsx)("li",{className:"menu__list-item",children:(0,u.jsx)(oe,Object.assign({className:(0,a.A)("menu__link",t)},n))})}function de(e){var t,n=e.mobile,r=void 0!==n&&n,a=(e.position,(0,k.A)(e,ce)),o=r?ue:le;return(0,u.jsx)(o,Object.assign({},a,{activeClassName:null!=(t=a.activeClassName)?t:r?"menu__link--active":"navbar__link--active"}))}var pe=n(41422),fe=n(99169),me=n(44586);const he="dropdownNavbarItemMobile_S0Fm";var be=["items","position","className","onClick"],ge=["items","className","position","onClick"],ye=["mobile"];function ve(e,t){return e.some((function(e){return function(e,t){return!!(0,fe.ys)(e.to,t)||!!(0,ne.G)(e.activeBaseRegex,t)||!(!e.activeBasePath||!t.startsWith(e.activeBasePath))}(e,t)}))}function xe(e){var t,n=e.items,o=e.position,i=e.className,s=(e.onClick,(0,k.A)(e,be)),c=(0,r.useRef)(null),l=(0,r.useState)(!1),d=l[0],p=l[1];return(0,r.useEffect)((function(){var e=function(e){c.current&&!c.current.contains(e.target)&&p(!1)};return document.addEventListener("mousedown",e),document.addEventListener("touchstart",e),document.addEventListener("focusin",e),function(){document.removeEventListener("mousedown",e),document.removeEventListener("touchstart",e),document.removeEventListener("focusin",e)}}),[c]),(0,u.jsxs)("div",{ref:c,className:(0,a.A)("navbar__item","dropdown","dropdown--hoverable",{"dropdown--right":"right"===o,"dropdown--show":d}),children:[(0,u.jsx)(oe,Object.assign({"aria-haspopup":"true","aria-expanded":d,role:"button",href:s.to?void 0:"#",className:(0,a.A)("navbar__link",i)},s,{onClick:s.to?void 0:function(e){return e.preventDefault()},onKeyDown:function(e){"Enter"===e.key&&(e.preventDefault(),p(!d))},children:null!=(t=s.children)?t:s.label})),(0,u.jsx)("ul",{className:"dropdown__menu",children:n.map((function(e,t){return(0,r.createElement)(tt,Object.assign({isDropdownItem:!0,activeClassName:"dropdown__link--active"},e,{key:t}))}))})]})}function we(e){var t,n,o=e.items,i=e.className,c=(e.position,e.onClick),l=(0,k.A)(e,ge),d=(n=(0,me.A)().siteConfig.baseUrl,(0,s.zy)().pathname.replace(n,"/")),p=ve(o,d),f=(0,pe.u)({initialState:function(){return!p}}),m=f.collapsed,h=f.toggleCollapsed,b=f.setCollapsed;return(0,r.useEffect)((function(){p&&b(!p)}),[d,p,b]),(0,u.jsxs)("li",{className:(0,a.A)("menu__list-item",{"menu__list-item--collapsed":m}),children:[(0,u.jsx)(oe,Object.assign({role:"button",className:(0,a.A)(he,"menu__link menu__link--sublist menu__link--sublist-caret",i)},l,{onClick:function(e){e.preventDefault(),h()},children:null!=(t=l.children)?t:l.label})),(0,u.jsx)(pe.N,{lazy:!0,as:"ul",className:"menu__list",collapsed:m,children:o.map((function(e,t){return(0,r.createElement)(tt,Object.assign({mobile:!0,isDropdownItem:!0,onClick:c,activeClassName:"menu__link--active"},e,{key:t}))}))})]})}function ke(e){var t=e.mobile,n=void 0!==t&&t,r=(0,k.A)(e,ye),a=n?we:xe;return(0,u.jsx)(a,Object.assign({},r))}var _e=n(32131),Se=["width","height"];function Ee(e){var t=e.width,n=void 0===t?20:t,r=e.height,a=void 0===r?20:r,o=(0,k.A)(e,Se);return(0,u.jsx)("svg",Object.assign({viewBox:"0 0 24 24",width:n,height:a,"aria-hidden":!0},o,{children:(0,u.jsx)("path",{fill:"currentColor",d:"M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z"})}))}const je="iconLanguage_nlXk";var Oe=["mobile","dropdownItemsBefore","dropdownItemsAfter","queryString"];var Ae=n(40961),Ce=n(55600),Pe=n(5260),Te=n(24255),Ie=n(51062),Ne=n(2967),Re=n(82565);function Le(){var e;return["language:"+(0,me.A)().i18n.currentLocale,(e=(0,Re.v)(),[Ne.C].concat(e)).map((function(e){return"docusaurus_tag:"+e}))]}const De={button:{buttonText:(0,c.T)({id:"theme.SearchBar.label",message:"Search",description:"The ARIA label and placeholder for search button"}),buttonAriaLabel:(0,c.T)({id:"theme.SearchBar.label",message:"Search",description:"The ARIA label and placeholder for search button"})},modal:{searchBox:{resetButtonTitle:(0,c.T)({id:"theme.SearchModal.searchBox.resetButtonTitle",message:"Clear the query",description:"The label and ARIA label for search box reset button"}),resetButtonAriaLabel:(0,c.T)({id:"theme.SearchModal.searchBox.resetButtonTitle",message:"Clear the query",description:"The label and ARIA label for search box reset button"}),cancelButtonText:(0,c.T)({id:"theme.SearchModal.searchBox.cancelButtonText",message:"Cancel",description:"The label and ARIA label for search box cancel button"}),cancelButtonAriaLabel:(0,c.T)({id:"theme.SearchModal.searchBox.cancelButtonText",message:"Cancel",description:"The label and ARIA label for search box cancel button"})},startScreen:{recentSearchesTitle:(0,c.T)({id:"theme.SearchModal.startScreen.recentSearchesTitle",message:"Recent",description:"The title for recent searches"}),noRecentSearchesText:(0,c.T)({id:"theme.SearchModal.startScreen.noRecentSearchesText",message:"No recent searches",description:"The text when no recent searches"}),saveRecentSearchButtonTitle:(0,c.T)({id:"theme.SearchModal.startScreen.saveRecentSearchButtonTitle",message:"Save this search",description:"The label for save recent search button"}),removeRecentSearchButtonTitle:(0,c.T)({id:"theme.SearchModal.startScreen.removeRecentSearchButtonTitle",message:"Remove this search from history",description:"The label for remove recent search button"}),favoriteSearchesTitle:(0,c.T)({id:"theme.SearchModal.startScreen.favoriteSearchesTitle",message:"Favorite",description:"The title for favorite searches"}),removeFavoriteSearchButtonTitle:(0,c.T)({id:"theme.SearchModal.startScreen.removeFavoriteSearchButtonTitle",message:"Remove this search from favorites",description:"The label for remove favorite search button"})},errorScreen:{titleText:(0,c.T)({id:"theme.SearchModal.errorScreen.titleText",message:"Unable to fetch results",description:"The title for error screen of search modal"}),helpText:(0,c.T)({id:"theme.SearchModal.errorScreen.helpText",message:"You might want to check your network connection.",description:"The help text for error screen of search modal"})},footer:{selectText:(0,c.T)({id:"theme.SearchModal.footer.selectText",message:"to select",description:"The explanatory text of the action for the enter key"}),selectKeyAriaLabel:(0,c.T)({id:"theme.SearchModal.footer.selectKeyAriaLabel",message:"Enter key",description:"The ARIA label for the Enter key button that makes the selection"}),navigateText:(0,c.T)({id:"theme.SearchModal.footer.navigateText",message:"to navigate",description:"The explanatory text of the action for the Arrow up and Arrow down key"}),navigateUpKeyAriaLabel:(0,c.T)({id:"theme.SearchModal.footer.navigateUpKeyAriaLabel",message:"Arrow up",description:"The ARIA label for the Arrow up key button that makes the navigation"}),navigateDownKeyAriaLabel:(0,c.T)({id:"theme.SearchModal.footer.navigateDownKeyAriaLabel",message:"Arrow down",description:"The ARIA label for the Arrow down key button that makes the navigation"}),closeText:(0,c.T)({id:"theme.SearchModal.footer.closeText",message:"to close",description:"The explanatory text of the action for Escape key"}),closeKeyAriaLabel:(0,c.T)({id:"theme.SearchModal.footer.closeKeyAriaLabel",message:"Escape key",description:"The ARIA label for the Escape key button that close the modal"}),searchByText:(0,c.T)({id:"theme.SearchModal.footer.searchByText",message:"Search by",description:"The text explain that the search is making by Algolia"})},noResultsScreen:{noResultsText:(0,c.T)({id:"theme.SearchModal.noResultsScreen.noResultsText",message:"No results for",description:"The text explains that there are no results for the following search"}),suggestedQueryText:(0,c.T)({id:"theme.SearchModal.noResultsScreen.suggestedQueryText",message:"Try searching for",description:"The text for the suggested query when no results are found for the following search"}),reportMissingResultsText:(0,c.T)({id:"theme.SearchModal.noResultsScreen.reportMissingResultsText",message:"Believe this query should return results?",description:"The text for the question where the user thinks there are missing results"}),reportMissingResultsLinkText:(0,c.T)({id:"theme.SearchModal.noResultsScreen.reportMissingResultsLinkText",message:"Let us know.",description:"The text for the link to report missing results"})}},placeholder:(0,c.T)({id:"theme.SearchModal.placeholder",message:"Search docs",description:"The placeholder of the input of the DocSearch pop-up modal"})};var Me=["contextualSearch","externalUrlRegex"],Fe=null;function Be(e){var t=e.hit,n=e.children;return(0,u.jsx)(J.A,{to:t.url,children:n})}function ze(e){var t=e.state,n=e.onClose,r=(0,Te.w)();return(0,u.jsx)(J.A,{to:r(t.query),onClick:n,children:(0,u.jsx)(c.A,{id:"theme.SearchBar.seeAll",values:{count:t.context.nbHits},children:"See all {count} results"})})}function Ue(e){var t,a,o,i,c=e.contextualSearch,l=e.externalUrlRegex,d=(0,k.A)(e,Me),p=(0,me.A)().siteMetadata,f=(0,Ie.C)(),m=Le(),h=null!=(t=null==(a=d.searchParameters)?void 0:a.facetFilters)?t:[],b=c?(o=h,[].concat((i=function(e){return"string"==typeof e?[e]:e})(m),i(o))):h,g=Object.assign({},d.searchParameters,{facetFilters:b}),y=(0,s.W6)(),v=(0,r.useRef)(null),x=(0,r.useRef)(null),w=(0,r.useState)(!1),_=w[0],S=w[1],E=(0,r.useState)(void 0),j=E[0],O=E[1],A=(0,r.useCallback)((function(){return Fe?Promise.resolve():Promise.all([n.e(8158).then(n.bind(n,48158)),Promise.all([n.e(1869),n.e(8913)]).then(n.bind(n,58913)),Promise.all([n.e(1869),n.e(416)]).then(n.bind(n,90416))]).then((function(e){var t=e[0].DocSearchModal;Fe=t}))}),[]),C=(0,r.useCallback)((function(){if(!v.current){var e=document.createElement("div");v.current=e,document.body.insertBefore(e,document.body.firstChild)}}),[]),P=(0,r.useCallback)((function(){C(),A().then((function(){return S(!0)}))}),[A,C]),T=(0,r.useCallback)((function(){var e;S(!1),null==(e=x.current)||e.focus()}),[]),I=(0,r.useCallback)((function(e){"f"===e.key&&(e.metaKey||e.ctrlKey)||(e.preventDefault(),O(e.key),P())}),[P]),N=(0,r.useRef)({navigate:function(e){var t=e.itemUrl;(0,ne.G)(l,t)?window.location.href=t:y.push(t)}}).current,R=(0,r.useRef)((function(e){return d.transformItems?d.transformItems(e):e.map((function(e){return Object.assign({},e,{url:f(e.url)})}))})).current,L=(0,r.useMemo)((function(){return function(e){return(0,u.jsx)(ze,Object.assign({},e,{onClose:T}))}}),[T]),D=(0,r.useCallback)((function(e){return e.addAlgoliaAgent("docusaurus",p.docusaurusVersion),e}),[p.docusaurusVersion]);return(0,Ce.E8)({isOpen:_,onOpen:P,onClose:T,onInput:I,searchButtonRef:x}),(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(Pe.A,{children:(0,u.jsx)("link",{rel:"preconnect",href:"https://"+d.appId+"-dsn.algolia.net",crossOrigin:"anonymous"})}),(0,u.jsx)(Ce.Bc,{onTouchStart:A,onFocus:A,onMouseOver:A,onClick:P,ref:x,translations:De.button}),_&&Fe&&v.current&&(0,Ae.createPortal)((0,u.jsx)(Fe,Object.assign({onClose:T,initialScrollY:window.scrollY,initialQuery:j,navigator:N,transformItems:R,hitComponent:Be,transformSearchClient:D},d.searchPagePath&&{resultsFooterComponent:L},d,{searchParameters:g,placeholder:De.placeholder,translations:De.modal})),v.current)]})}function $e(){var e=(0,me.A)().siteConfig;return(0,u.jsx)(Ue,Object.assign({},e.themeConfig.algolia))}const qe={navbarSearchContainer:"navbarSearchContainer_Bca1"};function He(e){var t=e.children,n=e.className;return(0,u.jsx)("div",{className:(0,a.A)(n,qe.navbarSearchContainer),children:t})}var Ve=n(44070),We=n(26972),Ke=["docId","label","docsPluginId"];var Ge=["sidebarId","label","docsPluginId"];var Qe=["label","to","docsPluginId"];var Ye=n(53886),Ze=["mobile","docsPluginId","dropdownActiveClassDisabled","dropdownItemsBefore","dropdownItemsAfter"];function Xe(e,t){var n;return null!=(n=t.alternateDocVersions[e.name])?n:function(e){return e.docs.find((function(t){return t.id===e.mainDocId}))}(e)}const Je={default:de,localeDropdown:function(e){var t=e.mobile,n=e.dropdownItemsBefore,r=e.dropdownItemsAfter,a=e.queryString,o=void 0===a?"":a,i=(0,k.A)(e,Oe),l=(0,me.A)().i18n,d=l.currentLocale,p=l.locales,f=l.localeConfigs,m=(0,_e.o)(),h=(0,s.zy)(),b=h.search,g=h.hash,y=p.map((function(e){var n=""+("pathname://"+m.createUrl({locale:e,fullyQualified:!1}))+b+g+o;return{label:f[e].label,lang:f[e].htmlLang,to:n,target:"_self",autoAddBaseUrl:!1,className:e===d?t?"menu__link--active":"dropdown__link--active":""}})),v=[].concat(n,y,r),x=t?(0,c.T)({message:"Languages",id:"theme.navbar.mobileLanguageDropdown.label",description:"The label for the mobile language switcher dropdown"}):f[d].label;return(0,u.jsx)(ke,Object.assign({},i,{mobile:t,label:(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(Ee,{className:je}),x]}),items:v}))},search:function(e){var t=e.mobile,n=e.className;return t?null:(0,u.jsx)(He,{className:n,children:(0,u.jsx)($e,{})})},dropdown:ke,html:function(e){var t=e.value,n=e.className,r=e.mobile,o=void 0!==r&&r,i=e.isDropdownItem,s=void 0!==i&&i,c=s?"li":"div";return(0,u.jsx)(c,{className:(0,a.A)({navbar__item:!o&&!s,"menu__list-item":o},n),dangerouslySetInnerHTML:{__html:t}})},doc:function(e){var t=e.docId,n=e.label,r=e.docsPluginId,a=(0,k.A)(e,Ke),o=(0,Ve.zK)(r).activeDoc,i=(0,We.QB)(t,r),s=(null==o?void 0:o.path)===(null==i?void 0:i.path);return null===i||i.unlisted&&!s?null:(0,u.jsx)(de,Object.assign({exact:!0},a,{isActive:function(){return s||!(null==o||!o.sidebar)&&o.sidebar===i.sidebar},label:null!=n?n:i.id,to:i.path}))},docSidebar:function(e){var t=e.sidebarId,n=e.label,r=e.docsPluginId,a=(0,k.A)(e,Ge),o=(0,Ve.zK)(r).activeDoc,i=(0,We.fW)(t,r).link;if(!i)throw new Error('DocSidebarNavbarItem: Sidebar with ID "'+t+"\" doesn't have anything to be linked to.");return(0,u.jsx)(de,Object.assign({exact:!0},a,{isActive:function(){return(null==o?void 0:o.sidebar)===t},label:null!=n?n:i.label,to:i.path}))},docsVersion:function(e){var t=e.label,n=e.to,r=e.docsPluginId,a=(0,k.A)(e,Qe),o=(0,We.Vd)(r)[0],i=null!=t?t:o.label,s=null!=n?n:function(e){return e.docs.find((function(t){return t.id===e.mainDocId}))}(o).path;return(0,u.jsx)(de,Object.assign({},a,{label:i,to:s}))},docsVersionDropdown:function(e){var t=e.mobile,n=e.docsPluginId,r=e.dropdownActiveClassDisabled,a=e.dropdownItemsBefore,o=e.dropdownItemsAfter,i=(0,k.A)(e,Ze),l=(0,s.zy)(),d=l.search,p=l.hash,f=(0,Ve.zK)(n),m=(0,Ve.jh)(n),h=(0,Ye.g1)(n).savePreferredVersionName,b=[].concat(a,m.map((function(e){var t=Xe(e,f);return{label:e.label,to:""+t.path+d+p,isActive:function(){return e===f.activeVersion},onClick:function(){return h(e.name)}}})),o),g=(0,We.Vd)(n)[0],y=t&&b.length>1?(0,c.T)({id:"theme.navbar.mobileVersionsDropdown.label",message:"Versions",description:"The label for the navbar versions dropdown on mobile view"}):g.label,v=t&&b.length>1?void 0:Xe(g,f).path;return b.length<=1?(0,u.jsx)(de,Object.assign({},i,{mobile:t,label:y,to:v,isActive:r?function(){return!1}:void 0})):(0,u.jsx)(ke,Object.assign({},i,{mobile:t,label:y,to:v,items:b,isActive:r?function(){return!1}:void 0}))}};var et=["type"];function tt(e){var t=e.type,n=(0,k.A)(e,et),r=function(e,t){return e&&"default"!==e?e:"items"in t?"dropdown":"default"}(t,n),a=Je[r];if(!a)throw new Error('No NavbarItem component found for type "'+t+'".');return(0,u.jsx)(a,Object.assign({},n))}function nt(){var e=(0,T.M)(),t=(0,x.p)().navbar.items;return(0,u.jsx)("ul",{className:"menu__list",children:t.map((function(t,n){return(0,r.createElement)(tt,Object.assign({mobile:!0},t,{onClick:function(){return e.toggle()},key:n}))}))})}function rt(e){return(0,u.jsx)("button",Object.assign({},e,{type:"button",className:"clean-btn navbar-sidebar__back",children:(0,u.jsx)(c.A,{id:"theme.navbar.mobileSidebarSecondaryMenu.backButtonLabel",description:"The label of the back button to return to main menu, inside the mobile navbar sidebar secondary menu (notably used to display the docs sidebar)",children:"\u2190 Back to main menu"})}))}function at(){var e=0===(0,x.p)().navbar.items.length,t=F();return(0,u.jsxs)(u.Fragment,{children:[!e&&(0,u.jsx)(rt,{onClick:function(){return t.hide()}}),t.content]})}function ot(){var e,t=(0,T.M)();return void 0===(e=t.shown)&&(e=!0),(0,r.useEffect)((function(){return document.body.style.overflow=e?"hidden":"visible",function(){document.body.style.overflow="visible"}}),[e]),t.shouldRender?(0,u.jsx)(B,{header:(0,u.jsx)(X,{}),primaryMenu:(0,u.jsx)(nt,{}),secondaryMenu:(0,u.jsx)(at,{})}):null}const it={navbarHideable:"navbarHideable_m1mJ",navbarHidden:"navbarHidden_jGov"};function st(e){return(0,u.jsx)("div",Object.assign({role:"presentation"},e,{className:(0,a.A)("navbar-sidebar__backdrop",e.className)}))}function ct(e){var t=e.children,n=(0,x.p)().navbar,o=n.hideOnScroll,i=n.style,s=(0,T.M)(),d=function(e){var t=(0,r.useState)(e),n=t[0],a=t[1],o=(0,r.useRef)(!1),i=(0,r.useRef)(0),s=(0,r.useCallback)((function(e){null!==e&&(i.current=e.getBoundingClientRect().height)}),[]);return(0,I.Mq)((function(t,n){var r=t.scrollY;if(e)if(r=s?a(!1):r+l{"use strict";n.d(t,{A:()=>v});var r=n(98587),a=n(96540),o=n(28774),i=n(86025),s=n(44586),c=n(6342),l=n(34164),u=n(92303),d=n(95293);const p={themedComponent:"themedComponent_mlkZ","themedComponent--light":"themedComponent--light_NVdE","themedComponent--dark":"themedComponent--dark_xIcU"};var f=n(74848);function m(e){var t=e.className,n=e.children,r=(0,u.A)(),o=(0,d.G)().colorMode;return(0,f.jsx)(f.Fragment,{children:(r?"dark"===o?["dark"]:["light"]:["light","dark"]).map((function(e){var r=n({theme:e,className:(0,l.A)(t,p.themedComponent,p["themedComponent--"+e])});return(0,f.jsx)(a.Fragment,{children:r},e)}))})}var h=["sources","className","alt"];function b(e){var t=e.sources,n=e.className,a=e.alt,o=(0,r.A)(e,h);return(0,f.jsx)(m,{className:n,children:function(e){var n=e.theme,r=e.className;return(0,f.jsx)("img",Object.assign({src:t[n],alt:a,className:r},o))}})}var g=["imageClassName","titleClassName"];function y(e){var t=e.logo,n=e.alt,r=e.imageClassName,a={light:(0,i.Ay)(t.src),dark:(0,i.Ay)(t.srcDark||t.src)},o=(0,f.jsx)(b,{className:t.className,sources:a,height:t.height,width:t.width,alt:n,style:t.style});return r?(0,f.jsx)("div",{className:r,children:o}):o}function v(e){var t,n=(0,s.A)().siteConfig.title,a=(0,c.p)().navbar,l=a.title,u=a.logo,d=e.imageClassName,p=e.titleClassName,m=(0,r.A)(e,g),h=(0,i.Ay)((null==u?void 0:u.href)||"/"),b=l?"":n,v=null!=(t=null==u?void 0:u.alt)?t:b;return(0,f.jsxs)(o.A,Object.assign({to:h},m,(null==u?void 0:u.target)&&{target:u.target},{children:[u&&(0,f.jsx)(y,{logo:u,alt:v,imageClassName:d}),null!=l&&(0,f.jsx)("b",{className:p,children:l})]}))}},41463:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});n(96540);var r=n(5260),a=n(74848);function o(e){var t=e.locale,n=e.version,o=e.tag,i=t;return(0,a.jsxs)(r.A,{children:[t&&(0,a.jsx)("meta",{name:"docusaurus_locale",content:t}),n&&(0,a.jsx)("meta",{name:"docusaurus_version",content:n}),o&&(0,a.jsx)("meta",{name:"docusaurus_tag",content:o}),i&&(0,a.jsx)("meta",{name:"docsearch:language",content:i}),n&&(0,a.jsx)("meta",{name:"docsearch:version",content:n}),o&&(0,a.jsx)("meta",{name:"docsearch:docusaurus_tag",content:o})]})}},41422:(e,t,n)=>{"use strict";n.d(t,{N:()=>x,u:()=>p});var r=n(98587),a=n(96540),o=n(38193),i=n(205),s=n(53109),c=n(74848),l=["collapsed"],u=["lazy"],d="ease-in-out";function p(e){var t=e.initialState,n=(0,a.useState)(null!=t&&t),r=n[0],o=n[1],i=(0,a.useCallback)((function(){o((function(e){return!e}))}),[]);return{collapsed:r,setCollapsed:o,toggleCollapsed:i}}var f={display:"none",overflow:"hidden",height:"0px"},m={display:"block",overflow:"visible",height:"auto"};function h(e,t){var n=t?f:m;e.style.display=n.display,e.style.overflow=n.overflow,e.style.height=n.height}function b(e){var t=e.collapsibleRef,n=e.collapsed,r=e.animation,o=(0,a.useRef)(!1);(0,a.useEffect)((function(){var e,a=t.current;function i(){var e,t,n=a.scrollHeight,o=null!=(e=null==r?void 0:r.duration)?e:function(e){if((0,s.O)())return 1;var t=e/36;return Math.round(10*(4+15*Math.pow(t,.25)+t/5))}(n);return{transition:"height "+o+"ms "+(null!=(t=null==r?void 0:r.easing)?t:d),height:n+"px"}}function c(){var e=i();a.style.transition=e.transition,a.style.height=e.height}if(!o.current)return h(a,n),void(o.current=!0);return a.style.willChange="height",e=requestAnimationFrame((function(){n?(c(),requestAnimationFrame((function(){a.style.height=f.height,a.style.overflow=f.overflow}))):(a.style.display="block",requestAnimationFrame((function(){c()})))})),function(){return cancelAnimationFrame(e)}}),[t,n,r])}function g(e){if(!o.A.canUseDOM)return e?f:m}function y(e){var t=e.as,n=void 0===t?"div":t,r=e.collapsed,o=e.children,i=e.animation,s=e.onCollapseTransitionEnd,l=e.className,u=e.disableSSRStyle,d=(0,a.useRef)(null);return b({collapsibleRef:d,collapsed:r,animation:i}),(0,c.jsx)(n,{ref:d,style:u?void 0:g(r),onTransitionEnd:function(e){"height"===e.propertyName&&(h(d.current,r),null==s||s(r))},className:l,children:o})}function v(e){var t=e.collapsed,n=(0,r.A)(e,l),o=(0,a.useState)(!t),s=o[0],u=o[1],d=(0,a.useState)(t),p=d[0],f=d[1];return(0,i.A)((function(){t||u(!0)}),[t]),(0,i.A)((function(){s&&f(t)}),[s,t]),s?(0,c.jsx)(y,Object.assign({},n,{collapsed:p})):null}function x(e){var t=e.lazy,n=(0,r.A)(e,u),a=t?v:y;return(0,c.jsx)(a,Object.assign({},n))}},65041:(e,t,n)=>{"use strict";n.d(t,{M:()=>h,o:()=>m});var r=n(96540),a=n(92303),o=n(75376),i=n(43807),s=n(6342),c=n(74848),l=(0,o.Wf)("docusaurus.announcement.dismiss"),u=(0,o.Wf)("docusaurus.announcement.id"),d=function(){return"true"===l.get()},p=function(e){return l.set(String(e))},f=r.createContext(null);function m(e){var t=e.children,n=function(){var e=(0,s.p)().announcementBar,t=(0,a.A)(),n=(0,r.useState)((function(){return!!t&&d()})),o=n[0],i=n[1];(0,r.useEffect)((function(){i(d())}),[]);var c=(0,r.useCallback)((function(){p(!0),i(!0)}),[]);return(0,r.useEffect)((function(){if(e){var t=e.id,n=u.get();"annoucement-bar"===n&&(n="announcement-bar");var r=t!==n;u.set(t),r&&p(!1),!r&&d()||i(!1)}}),[e]),(0,r.useMemo)((function(){return{isActive:!!e&&!o,close:c}}),[e,o,c])}();return(0,c.jsx)(f.Provider,{value:n,children:t})}function h(){var e=(0,r.useContext)(f);if(!e)throw new i.dV("AnnouncementBarProvider");return e}},95293:(e,t,n)=>{"use strict";n.d(t,{G:()=>g,a:()=>b});var r=n(96540),a=n(38193),o=n(43807),i=n(75376),s=n(6342),c=n(74848),l=r.createContext(void 0),u="theme",d=(0,i.Wf)(u),p={light:"light",dark:"dark"},f=function(e){return e===p.dark?p.dark:p.light},m=function(e){return a.A.canUseDOM?f(document.documentElement.getAttribute("data-theme")):f(e)},h=function(e){d.set(f(e))};function b(e){var t=e.children,n=function(){var e=(0,s.p)().colorMode,t=e.defaultMode,n=e.disableSwitch,a=e.respectPrefersColorScheme,o=(0,r.useState)(m(t)),i=o[0],c=o[1];(0,r.useEffect)((function(){n&&d.del()}),[n]);var l=(0,r.useCallback)((function(e,n){void 0===n&&(n={});var r=n.persist,o=void 0===r||r;e?(c(e),o&&h(e)):(c(a?window.matchMedia("(prefers-color-scheme: dark)").matches?p.dark:p.light:t),d.del())}),[a,t]);(0,r.useEffect)((function(){document.documentElement.setAttribute("data-theme",f(i))}),[i]),(0,r.useEffect)((function(){if(!n){var e=function(e){if(e.key===u){var t=d.get();null!==t&&l(f(t))}};return window.addEventListener("storage",e),function(){return window.removeEventListener("storage",e)}}}),[n,l]);var b=(0,r.useRef)(!1);return(0,r.useEffect)((function(){if(!n||a){var e=window.matchMedia("(prefers-color-scheme: dark)"),t=function(){window.matchMedia("print").matches||b.current?b.current=window.matchMedia("print").matches:l(null)};return e.addListener(t),function(){return e.removeListener(t)}}}),[l,n,a]),(0,r.useMemo)((function(){return{colorMode:i,setColorMode:l,get isDarkTheme(){return i===p.dark},setLightTheme:function(){l(p.light)},setDarkTheme:function(){l(p.dark)}}}),[i,l])}();return(0,c.jsx)(l.Provider,{value:n,children:t})}function g(){var e=(0,r.useContext)(l);if(null==e)throw new o.dV("ColorModeProvider","Please see https://docusaurus.io/docs/api/themes/configuration#use-color-mode.");return e}},22069:(e,t,n)=>{"use strict";n.d(t,{M:()=>f,e:()=>p});var r=n(96540),a=n(75600),o=n(24581),i=n(57485),s=n(6342),c=n(43807),l=n(74848),u=r.createContext(void 0);function d(){var e,t=(e=(0,a.YL)(),0===(0,s.p)().navbar.items.length&&!e.component),n=(0,o.l)(),c=!t&&"mobile"===n,l=(0,r.useState)(!1),u=l[0],d=l[1];(0,i.$Z)((function(){if(u)return d(!1),!1}));var p=(0,r.useCallback)((function(){d((function(e){return!e}))}),[]);return(0,r.useEffect)((function(){"desktop"===n&&d(!1)}),[n]),(0,r.useMemo)((function(){return{disabled:t,shouldRender:c,toggle:p,shown:u}}),[t,c,p,u])}function p(e){var t=e.children,n=d();return(0,l.jsx)(u.Provider,{value:n,children:t})}function f(){var e=r.useContext(u);if(void 0===e)throw new c.dV("NavbarMobileSidebarProvider");return e}},75600:(e,t,n)=>{"use strict";n.d(t,{GX:()=>l,YL:()=>c,y_:()=>s});var r=n(96540),a=n(43807),o=n(74848),i=r.createContext(null);function s(e){var t=e.children,n=(0,r.useState)({component:null,props:null});return(0,o.jsx)(i.Provider,{value:n,children:t})}function c(){var e=(0,r.useContext)(i);if(!e)throw new a.dV("NavbarSecondaryMenuContentProvider");return e[0]}function l(e){var t=e.component,n=e.props,o=(0,r.useContext)(i);if(!o)throw new a.dV("NavbarSecondaryMenuContentProvider");var s=o[1],c=(0,a.Be)(n);return(0,r.useEffect)((function(){s({component:t,props:c})}),[s,t,c]),(0,r.useEffect)((function(){return function(){return s({component:null,props:null})}}),[s]),null}},14090:(e,t,n)=>{"use strict";n.d(t,{w:()=>a,J:()=>o});var r=n(96540),a="navigation-with-keyboard";function o(){(0,r.useEffect)((function(){function e(e){"keydown"===e.type&&"Tab"===e.key&&document.body.classList.add(a),"mousedown"===e.type&&document.body.classList.remove(a)}return document.addEventListener("keydown",e),document.addEventListener("mousedown",e),function(){document.body.classList.remove(a),document.removeEventListener("keydown",e),document.removeEventListener("mousedown",e)}}),[])}},24255:(e,t,n)=>{"use strict";n.d(t,{b:()=>s,w:()=>c});var r=n(96540),a=n(44586),o=n(57485),i="q";function s(){return(0,o.l)(i)}function c(){var e=(0,a.A)().siteConfig,t=e.baseUrl,n=e.themeConfig.algolia.searchPagePath;return(0,r.useCallback)((function(e){return""+t+n+"?"+i+"="+encodeURIComponent(e)}),[t,n])}},24581:(e,t,n)=>{"use strict";n.d(t,{l:()=>s});var r=n(96540),a=n(38193),o={desktop:"desktop",mobile:"mobile",ssr:"ssr"},i=996;function s(e){var t=(void 0===e?{}:e).desktopBreakpoint,n=void 0===t?i:t,s=(0,r.useState)((function(){return"ssr"})),c=s[0],l=s[1];return(0,r.useEffect)((function(){function e(){l(function(e){if(!a.A.canUseDOM)throw new Error("getWindowSize() should only be called after React hydration");return window.innerWidth>e?o.desktop:o.mobile}(n))}return e(),window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[n]),c}},17559:(e,t,n)=>{"use strict";n.d(t,{G:()=>r});var r={page:{blogListPage:"blog-list-page",blogPostPage:"blog-post-page",blogTagsListPage:"blog-tags-list-page",blogTagPostListPage:"blog-tags-post-list-page",blogAuthorsListPage:"blog-authors-list-page",blogAuthorsPostsPage:"blog-authors-posts-page",docsDocPage:"docs-doc-page",docsTagsListPage:"docs-tags-list-page",docsTagDocListPage:"docs-tags-doc-list-page",mdxPage:"mdx-page"},wrapper:{main:"main-wrapper",blogPages:"blog-wrapper",docsPages:"docs-wrapper",mdxPages:"mdx-wrapper"},common:{editThisPage:"theme-edit-this-page",lastUpdated:"theme-last-updated",backToTopButton:"theme-back-to-top-button",codeBlock:"theme-code-block",admonition:"theme-admonition",unlistedBanner:"theme-unlisted-banner",draftBanner:"theme-draft-banner",admonitionType:function(e){return"theme-admonition-"+e}},layout:{},docs:{docVersionBanner:"theme-doc-version-banner",docVersionBadge:"theme-doc-version-badge",docBreadcrumbs:"theme-doc-breadcrumbs",docMarkdown:"theme-doc-markdown",docTocMobile:"theme-doc-toc-mobile",docTocDesktop:"theme-doc-toc-desktop",docFooter:"theme-doc-footer",docFooterTagsRow:"theme-doc-footer-tags-row",docFooterEditMetaRow:"theme-doc-footer-edit-meta-row",docSidebarContainer:"theme-doc-sidebar-container",docSidebarMenu:"theme-doc-sidebar-menu",docSidebarItemCategory:"theme-doc-sidebar-item-category",docSidebarItemLink:"theme-doc-sidebar-item-link",docSidebarItemCategoryLevel:function(e){return"theme-doc-sidebar-item-category-level-"+e},docSidebarItemLinkLevel:function(e){return"theme-doc-sidebar-item-link-level-"+e}},blog:{blogFooterTagsRow:"theme-blog-footer-tags-row",blogFooterEditMetaRow:"theme-blog-footer-edit-meta-row"},pages:{pageFooterEditMetaRow:"theme-pages-footer-edit-meta-row"}}},53109:(e,t,n)=>{"use strict";function r(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}n.d(t,{O:()=>r})},12181:(e,t,n)=>{"use strict";n.d(t,{bq:()=>d,MN:()=>u,a2:()=>l,k2:()=>p});var r=n(77387),a=n(96540),o=n(21312),i=n(70440);const s={errorBoundaryError:"errorBoundaryError_a6uf",errorBoundaryFallback:"errorBoundaryFallback_VBag"};var c=n(74848);function l(e){return(0,c.jsx)("button",Object.assign({type:"button"},e,{children:(0,c.jsx)(o.A,{id:"theme.ErrorPageContent.tryAgain",description:"The label of the button to try again rendering when the React error boundary captures an error",children:"Try again"})}))}function u(e){var t=e.error,n=e.tryAgain;return(0,c.jsxs)("div",{className:s.errorBoundaryFallback,children:[(0,c.jsx)("p",{children:t.message}),(0,c.jsx)(l,{onClick:n})]})}function d(e){var t=e.error,n=(0,i.rA)(t).map((function(e){return e.message})).join("\n\nCause:\n");return(0,c.jsx)("p",{className:s.errorBoundaryError,children:n})}var p=function(e){function t(){return e.apply(this,arguments)||this}(0,r.A)(t,e);var n=t.prototype;return n.componentDidCatch=function(e,t){throw this.props.onError(e,t)},n.render=function(){return this.props.children},t}(a.Component)},20481:(e,t,n)=>{"use strict";n.d(t,{s:()=>a});var r=n(44586);function a(e){var t=(0,r.A)().siteConfig,n=t.title,a=t.titleDelimiter;return null!=e&&e.trim().length?e.trim()+" "+a+" "+n:n}},57485:(e,t,n)=>{"use strict";n.d(t,{$Z:()=>i,aZ:()=>c,l:()=>l});var r=n(96540),a=n(56347),o=n(43807);function i(e){!function(e){var t=(0,a.W6)(),n=(0,o._q)(e);(0,r.useEffect)((function(){return t.block((function(e,t){return n(e,t)}))}),[t,n])}((function(t,n){if("POP"===n)return e(t,n)}))}function s(e){var t=(0,a.W6)();return(0,r.useSyncExternalStore)(t.listen,(function(){return e(t)}),(function(){return e(t)}))}function c(e){return s((function(t){return null===e?null:new URLSearchParams(t.location.search).get(e)}))}function l(e){var t,n=null!=(t=c(e))?t:"",o=function(e){var t=(0,a.W6)();return(0,r.useCallback)((function(n,r){var a=new URLSearchParams(t.location.search);n?a.set(e,n):a.delete(e),(null!=r&&r.push?t.push:t.replace)({search:a.toString()})}),[e,t])}(e);return[n,o]}},31682:(e,t,n)=>{"use strict";function r(e,t){return void 0===t&&(t=function(e,t){return e===t}),e.filter((function(n,r){return e.findIndex((function(e){return t(e,n)}))!==r}))}function a(e){return Array.from(new Set(e))}n.d(t,{XI:()=>r,sb:()=>a})},69024:(e,t,n)=>{"use strict";n.d(t,{e3:()=>f,be:()=>d,Jx:()=>m});var r=n(96540),a=n(34164),o=n(5260),i=n(53102);function s(){var e=r.useContext(i.o);if(!e)throw new Error("Unexpected: no Docusaurus route context found");return e}var c=n(86025),l=n(20481),u=n(74848);function d(e){var t=e.title,n=e.description,r=e.keywords,a=e.image,i=e.children,s=(0,l.s)(t),d=(0,c.hH)().withBaseUrl,p=a?d(a,{absolute:!0}):void 0;return(0,u.jsxs)(o.A,{children:[t&&(0,u.jsx)("title",{children:s}),t&&(0,u.jsx)("meta",{property:"og:title",content:s}),n&&(0,u.jsx)("meta",{name:"description",content:n}),n&&(0,u.jsx)("meta",{property:"og:description",content:n}),r&&(0,u.jsx)("meta",{name:"keywords",content:Array.isArray(r)?r.join(","):r}),p&&(0,u.jsx)("meta",{property:"og:image",content:p}),p&&(0,u.jsx)("meta",{name:"twitter:image",content:p}),i]})}var p=r.createContext(void 0);function f(e){var t=e.className,n=e.children,i=r.useContext(p),s=(0,a.A)(i,t);return(0,u.jsxs)(p.Provider,{value:s,children:[(0,u.jsx)(o.A,{children:(0,u.jsx)("html",{className:s})}),n]})}function m(e){var t=e.children,n=s(),r="plugin-"+n.plugin.name.replace(/docusaurus-(?:plugin|theme)-(?:content-)?/gi,""),o="plugin-id-"+n.plugin.id;return(0,u.jsx)(f,{className:(0,a.A)(r,o),children:t})}},43807:(e,t,n)=>{"use strict";n.d(t,{dV:()=>m,fM:()=>b,_q:()=>p,ZC:()=>f,Be:()=>h});var r=n(3909),a=n(77387);function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}var i=n(63662);function s(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(s=function(){return!!e})()}function c(e){var t="function"==typeof Map?new Map:void 0;return c=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(s())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var a=new(e.bind.apply(e,r));return n&&(0,i.A)(a,n.prototype),a}(e,arguments,o(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),(0,i.A)(n,e)},c(e)}var l=n(96540),u=n(205),d=n(74848);function p(e){var t=(0,l.useRef)(e);return(0,u.A)((function(){t.current=e}),[e]),(0,l.useCallback)((function(){return t.current.apply(t,arguments)}),[])}function f(e){var t=(0,l.useRef)();return(0,u.A)((function(){t.current=e})),t.current}var m=function(e){function t(t,n){var a,o,i;return(i=e.call(this)||this).name="ReactContextError",i.message="Hook "+(null!=(a=null==(o=i.stack)||null==(o=o.split("\n")[1])||null==(o=o.match((0,r.A)(/at (?:\w+\.)?(\w+)/,{name:1})))?void 0:o.groups.name)?a:"")+" is called outside the <"+t+">. "+(null!=n?n:""),i}return(0,a.A)(t,e),t}(c(Error));function h(e){var t=Object.entries(e);return t.sort((function(e,t){return e[0].localeCompare(t[0])})),(0,l.useMemo)((function(){return e}),t.flat())}function b(e){return function(t){var n=t.children;return(0,d.jsx)(d.Fragment,{children:e.reduceRight((function(e,t){return(0,d.jsx)(t,{children:e})}),n)})}}},91252:(e,t,n)=>{"use strict";function r(e,t){return void 0!==e&&void 0!==t&&new RegExp(e,"gi").test(t)}n.d(t,{G:()=>r})},99169:(e,t,n)=>{"use strict";n.d(t,{Dt:()=>s,ys:()=>i});var r=n(96540),a=n(97671),o=n(44586);function i(e,t){var n=function(e){var t;return null==(t=!e||e.endsWith("/")?e:e+"/")?void 0:t.toLowerCase()};return n(e)===n(t)}function s(){var e=(0,o.A)().siteConfig.baseUrl;return(0,r.useMemo)((function(){return function(e){var t=e.baseUrl;function n(e){return e.path===t&&!0===e.exact}function r(e){return e.path===t&&!e.exact}return function e(t){if(0!==t.length)return t.find(n)||e(t.filter(r).flatMap((function(e){var t;return null!=(t=e.routes)?t:[]})))}(e.routes)}({routes:a.A,baseUrl:e})}),[e])}},23104:(e,t,n)=>{"use strict";n.d(t,{Mq:()=>f,Tv:()=>u,a_:()=>m,gk:()=>h});var r=n(96540),a=n(38193),o=n(92303),i=n(205),s=n(43807),c=n(74848);var l=r.createContext(void 0);function u(e){var t,n=e.children,a=(t=(0,r.useRef)(!0),(0,r.useMemo)((function(){return{scrollEventsEnabledRef:t,enableScrollEvents:function(){t.current=!0},disableScrollEvents:function(){t.current=!1}}}),[]));return(0,c.jsx)(l.Provider,{value:a,children:n})}function d(){var e=(0,r.useContext)(l);if(null==e)throw new s.dV("ScrollControllerProvider");return e}var p=function(){return a.A.canUseDOM?{scrollX:window.pageXOffset,scrollY:window.pageYOffset}:null};function f(e,t){void 0===t&&(t=[]);var n=d().scrollEventsEnabledRef,a=(0,r.useRef)(p()),o=(0,s._q)(e);(0,r.useEffect)((function(){var e=function(){if(n.current){var e=p();o(e,a.current),a.current=e}},t={passive:!0};return e(),window.addEventListener("scroll",e,t),function(){return window.removeEventListener("scroll",e,t)}}),[o,n].concat(t))}function m(){var e,t,n,a=d(),o=(e=(0,r.useRef)({elem:null,top:0}),t=(0,r.useCallback)((function(t){e.current={elem:t,top:t.getBoundingClientRect().top}}),[]),n=(0,r.useCallback)((function(){var t=e.current,n=t.elem,r=t.top;if(!n)return{restored:!1};var a=n.getBoundingClientRect().top-r;return a&&window.scrollBy({left:0,top:a}),e.current={elem:null,top:0},{restored:0!==a}}),[]),(0,r.useMemo)((function(){return{save:t,restore:n}}),[n,t])),s=(0,r.useRef)(void 0),c=(0,r.useCallback)((function(e){o.save(e),a.disableScrollEvents(),s.current=function(){var e=o.restore().restored;if(s.current=void 0,e){var t=function(){a.enableScrollEvents(),window.removeEventListener("scroll",t)};window.addEventListener("scroll",t)}else a.enableScrollEvents()}}),[a,o]);return(0,i.A)((function(){queueMicrotask((function(){return null==s.current?void 0:s.current()}))})),{blockElementScrollPositionUntilNextRender:c}}function h(){var e=(0,r.useRef)(null),t=(0,o.A)()&&"smooth"===getComputedStyle(document.documentElement).scrollBehavior;return{startScroll:function(n){e.current=t?function(e){return window.scrollTo({top:e,behavior:"smooth"}),function(){}}(n):function(e){var t=null,n=document.documentElement.scrollTop>e;return function r(){var a=document.documentElement.scrollTop;(n&&a>e||!n&&a{"use strict";n.d(t,{C:()=>r});var r="default"},75376:(e,t,n)=>{"use strict";n.d(t,{Wf:()=>u,Dv:()=>d});var r=n(96540);const a=JSON.parse('{"N":"localStorage","M":""}');var o=a.N;function i(e){var t=e.key,n=e.oldValue,r=e.newValue,a=e.storage;if(n!==r){var o=document.createEvent("StorageEvent");o.initStorageEvent("storage",!1,!1,t,n,r,window.location.href,a),window.dispatchEvent(o)}}function s(e){if(void 0===e&&(e=o),"undefined"==typeof window)throw new Error("Browser storage is not available on Node.js/Docusaurus SSR process.");if("none"===e)return null;try{return window[e]}catch(n){return t=n,c||(console.warn("Docusaurus browser storage is not available.\nPossible reasons: running Docusaurus in an iframe, in an incognito browser session, or using too strict browser privacy settings.",t),c=!0),null}var t}var c=!1;var l={get:function(){return null},set:function(){},del:function(){},listen:function(){return function(){}}};function u(e,t){var n=""+e+a.M;if("undefined"==typeof window)return function(e){function t(){throw new Error('Illegal storage API usage for storage key "'+e+'".\nDocusaurus storage APIs are not supposed to be called on the server-rendering process.\nPlease only call storage APIs in effects and event handlers.')}return{get:t,set:t,del:t,listen:t}}(n);var r=s(null==t?void 0:t.persistence);return null===r?l:{get:function(){try{return r.getItem(n)}catch(e){return console.error("Docusaurus storage error, can't get key="+n,e),null}},set:function(e){try{var t=r.getItem(n);r.setItem(n,e),i({key:n,oldValue:t,newValue:e,storage:r})}catch(a){console.error("Docusaurus storage error, can't set "+n+"="+e,a)}},del:function(){try{var e=r.getItem(n);r.removeItem(n),i({key:n,oldValue:e,newValue:null,storage:r})}catch(t){console.error("Docusaurus storage error, can't delete key="+n,t)}},listen:function(e){try{var t=function(t){t.storageArea===r&&t.key===n&&e(t)};return window.addEventListener("storage",t),function(){return window.removeEventListener("storage",t)}}catch(a){return console.error("Docusaurus storage error, can't listen for changes of key="+n,a),function(){}}}}}function d(e,t){var n=(0,r.useRef)((function(){return null===e?l:u(e,t)})).current(),a=(0,r.useCallback)((function(e){return"undefined"==typeof window?function(){}:n.listen(e)}),[n]);return[(0,r.useSyncExternalStore)(a,(function(){return"undefined"==typeof window?null:n.get()}),(function(){return null})),n]}},32131:(e,t,n)=>{"use strict";n.d(t,{o:()=>i});var r=n(44586),a=n(56347),o=n(70440);function i(){var e=(0,r.A)(),t=e.siteConfig,n=t.baseUrl,i=t.url,s=t.trailingSlash,c=e.i18n,l=c.defaultLocale,u=c.currentLocale,d=(0,a.zy)().pathname,p=(0,o.Ks)(d,{trailingSlash:s,baseUrl:n}),f=u===l?n:n.replace("/"+u+"/","/"),m=p.replace(n,"");return{createUrl:function(e){var t=e.locale;return""+(e.fullyQualified?i:"")+function(e){return e===l?""+f:""+f+e+"/"}(t)+m}}}},75062:(e,t,n)=>{"use strict";n.d(t,{$:()=>i});var r=n(96540),a=n(56347),o=n(43807);function i(e){var t=(0,a.zy)(),n=(0,o.ZC)(t),i=(0,o._q)(e);(0,r.useEffect)((function(){n&&t!==n&&i({location:t,previousLocation:n})}),[i,t,n])}},6342:(e,t,n)=>{"use strict";n.d(t,{p:()=>a});var r=n(44586);function a(){return(0,r.A)().siteConfig.themeConfig}},38126:(e,t,n)=>{"use strict";n.d(t,{c:()=>a});var r=n(44586);function a(){return(0,r.A)().siteConfig.themeConfig}},51062:(e,t,n)=>{"use strict";n.d(t,{C:()=>s});var r=n(96540),a=n(91252),o=n(86025),i=n(38126);function s(){var e=(0,o.hH)().withBaseUrl,t=(0,i.c)().algolia,n=t.externalUrlRegex,s=t.replaceSearchResultPathname;return(0,r.useCallback)((function(t){var r=new URL(t);if((0,a.G)(n,r.href))return t;var o=""+(r.pathname+r.hash);return e(function(e,t){return t?e.replaceAll(new RegExp(t.from,"g"),t.to):e}(o,s))}),[e,n,s])}},12983:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addTrailingSlash=a,t.default=function(e,t){var n=t.trailingSlash,r=t.baseUrl;if(e.startsWith("#"))return e;if(void 0===n)return e;var i=e.split(/[#?]/)[0],s="/"===i||i===r?i:(c=i,l=n,l?a(c):o(c));var c,l;return e.replace(i,s)},t.addLeadingSlash=function(e){return(0,r.addPrefix)(e,"/")},t.removeTrailingSlash=o;var r=n(42566);function a(e){return e.endsWith("/")?e:e+"/"}function o(e){return(0,r.removeSuffix)(e,"/")}},80253:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getErrorCausalChain=function e(t){if(t.cause)return[t].concat(e(t.cause));return[t]}},70440:(e,t,n)=>{"use strict";t.rA=t.Ks=void 0;var r=n(31635);var a=n(12983);Object.defineProperty(t,"Ks",{enumerable:!0,get:function(){return r.__importDefault(a).default}});var o=n(42566);var i=n(80253);Object.defineProperty(t,"rA",{enumerable:!0,get:function(){return i.getErrorCausalChain}})},42566:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addPrefix=function(e,t){return e.startsWith(t)?e:""+t+e},t.removeSuffix=function(e,t){if(""===t)return e;return e.endsWith(t)?e.slice(0,-t.length):e},t.addSuffix=function(e,t){return e.endsWith(t)?e:""+e+t},t.removePrefix=function(e,t){return e.startsWith(t)?e.slice(t.length):e}},97671:(e,t,n)=>{"use strict";n.d(t,{A:()=>p});n(96540);var r=n(53259),a=n.n(r),o=n(91964);const i={"0058b4c6":[function(){return n.e(849).then(n.t.bind(n,9302,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-175.json",9302],"06597bc8":[function(){return Promise.all([n.e(1869),n.e(6417)]).then(n.bind(n,52877))},"@site/../docs/learn/archive/learn-treasury.md",52877],"078895e8":[function(){return Promise.all([n.e(1869),n.e(9909)]).then(n.bind(n,66232))},"@site/../docs/learn/archive/learn-controller.md",66232],"08c12c3a":[function(){return n.e(5630).then(n.bind(n,81329))},"@site/../docs/general/dune-analytics/parachain-dashboards/polimec-dashboards.md",81329],"09dda9ae":[function(){return n.e(2598).then(n.bind(n,42500))},"@site/../docs/general/dune-analytics/parachain-dashboards/polkadex-dashboards.md",42500],"0a3f0c9b":[function(){return Promise.all([n.e(1869),n.e(6555)]).then(n.bind(n,35209))},"@site/../docs/general/ledger.md",35209],"0b1a788a":[function(){return n.e(3395).then(n.t.bind(n,62508,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-learn-jam-fed.json",62508],"0b632434":[function(){return n.e(4739).then(n.bind(n,56705))},"@site/../docs/general/parachains-apps.md",56705],"0df78d26":[function(){return n.e(782).then(n.bind(n,87145))},"@site/../docs/maintain/maintain-guides-secure-validator.md",87145],"0eeb7a68":[function(){return Promise.all([n.e(1869),n.e(6869)]).then(n.bind(n,5824))},"@site/../docs/learn/learn-guides-DOT-KSM-bridge.md",5824],"113faa87":[function(){return Promise.all([n.e(1869),n.e(6011)]).then(n.bind(n,30862))},"@site/../docs/learn/learn-guides-assets.md",30862],"12331e8b":[function(){return Promise.all([n.e(1869),n.e(2244)]).then(n.bind(n,48725))},"@site/../docs/general/polkadotjs.md",48725],"1283e352":[function(){return n.e(1396).then(n.t.bind(n,72140,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-learn-xcm-01f.json",72140],"131c7f55":[function(){return Promise.all([n.e(1869),n.e(2298)]).then(n.bind(n,2512))},"@site/../docs/learn/learn-architecture.md",2512],"145746f5":[function(){return Promise.all([n.e(1869),n.e(6789)]).then(n.bind(n,3734))},"@site/../docs/maintain/maintain-polkadot-parameters.md",3734],"14eb3368":[function(){return Promise.all([n.e(1869),n.e(6969)]).then(n.bind(n,65847))},"@theme/DocCategoryGeneratedIndexPage",65847],15985664:[function(){return n.e(5881).then(n.bind(n,76248))},"@site/../docs/learn/xcm/journey/summary.md",76248],"1646726c":[function(){return Promise.all([n.e(1869),n.e(3266)]).then(n.bind(n,47002))},"@site/../docs/learn/learn-staking.md",47002],17896441:[function(){return Promise.all([n.e(1869),n.e(8401)]).then(n.bind(n,93069))},"@theme/DocItem",93069],"196e07e8":[function(){return n.e(3602).then(n.bind(n,97176))},"@site/../docs/general/dune-analytics/parachain-dashboards/interlay-dashboards.md",97176],"19ed4d4c":[function(){return n.e(4661).then(n.bind(n,74354))},"@site/../docs/learn/learn-comparisons-cosmos.md",74354],"1a4e3797":[function(){return Promise.all([n.e(1869),n.e(2138)]).then(n.bind(n,74604))},"@theme/SearchPage",74604],"1ae2b102":[function(){return Promise.all([n.e(3482),n.e(8121)]).then(n.bind(n,92508))},"@site/../docs/build/build-protocol-info.md",92508],"1d6d4797":[function(){return n.e(3477).then(n.bind(n,51976))},"@site/../docs/learn/xcm/journey/transact.md",51976],"1de1f488":[function(){return n.e(1240).then(n.t.bind(n,72680,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-learn-parachains-index-132.json",72680],"1e051548":[function(){return n.e(3598).then(n.t.bind(n,45621,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-learn-index-c1b.json",45621],"1e15616a":[function(){return n.e(3751).then(n.bind(n,59247))},"@site/../docs/learn/learn-wasm.md",59247],"1ed3671a":[function(){return n.e(3377).then(n.bind(n,29320))},"@site/../docs/learn/xcm/journey/trap-and-claim.md",29320],"1f8e8ebd":[function(){return n.e(5592).then(n.t.bind(n,77299,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-general-dune-analytics-dfe.json",77299],"21877fa5":[function(){return Promise.all([n.e(1869),n.e(3482),n.e(6466)]).then(n.bind(n,98285))},"@site/../docs/learn/learn-system-chains.md",98285],"21899dd2":[function(){return Promise.all([n.e(1869),n.e(5168)]).then(n.bind(n,34495))},"@site/../docs/learn/learn-parachains.md",34495],"23210cde":[function(){return Promise.all([n.e(1869),n.e(3482),n.e(499)]).then(n.bind(n,43406))},"@site/../docs/general/chain-state-values.md",43406],"23498fd5":[function(){return n.e(7276).then(n.bind(n,34632))},"@site/../docs/build/build-integrate-assets.md",34632],"240a6b01":[function(){return n.e(9633).then(n.bind(n,92532))},"@site/../docs/general/dune-analytics/parachain-dashboards/nodle-dashboards.md",92532],"2462cc91":[function(){return n.e(9141).then(n.bind(n,49631))},"@site/../docs/general/multisig-apps.md",49631],"25f2bd2a":[function(){return n.e(885).then(n.bind(n,72148))},"@site/../docs/maintain/maintain-guides-how-to-stop-validating.md",72148],"269b78ec":[function(){return n.e(1191).then(n.t.bind(n,76722,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-build-protocol-index-9e0.json",76722],"269bc3bb":[function(){return n.e(1968).then(n.bind(n,27143))},"@site/../docs/general/dune-analytics/polkadot-dashboards/legacy/polkadot-staking-dashboard-nominators.md",27143],"26dc7bd1":[function(){return n.e(166).then(n.bind(n,21975))},"@site/../docs/general/dune-analytics/parachain-dashboards/invarch-dashboards.md",21975],"279fb1d6":[function(){return Promise.all([n.e(1869),n.e(4994)]).then(n.bind(n,83022))},"@site/../docs/general/kusama/kusama-getting-started.md",83022],"28b84bbb":[function(){return n.e(9385).then(n.bind(n,85085))},"@site/../docs/build/build-network-overview.md",85085],"2be0d940":[function(){return Promise.all([n.e(1869),n.e(4537)]).then(n.bind(n,59681))},"@site/../docs/learn/learn-guides-identity.md",59681],"2d34559d":[function(){return n.e(7893).then(n.bind(n,24275))},"@site/../docs/learn/learn-jam-chain.md",24275],"2d429218":[function(){return n.e(6361).then(n.bind(n,82832))},"@site/../docs/learn/learn-consensus.md",82832],"2e0c35d5":[function(){return n.e(2698).then(n.bind(n,73123))},"@site/../docs/general/dune-analytics/polkadot-dashboards/legacy/polkadot-governance-dashboard.md",73123],"2e944e01":[function(){return n.e(4231).then(n.bind(n,71471))},"@site/../docs/general/dune-analytics/parachain-dashboards/manta-dashboards.md",71471],"2ea50c63":[function(){return n.e(1560).then(n.bind(n,26160))},"@site/../docs/learn/learn-xcm-usecases.md",26160],"2f3b630e":[function(){return Promise.all([n.e(1869),n.e(3482),n.e(2584)]).then(n.bind(n,95132))},"@site/../docs/learn/learn-polkadot-opengov.md",95132],"3002ebf4":[function(){return Promise.all([n.e(1869),n.e(3423)]).then(n.bind(n,57120))},"@site/../docs/build/build-dapp.md",57120],"3184af97":[function(){return Promise.all([n.e(1869),n.e(5362)]).then(n.bind(n,76526))},"@site/../docs/maintain/archive/maintain-guides-how-to-vote-councillor.md",76526],"31bd35e0":[function(){return n.e(1042).then(n.bind(n,18135))},"@site/../docs/learn/xcm/overview/summary.md",18135],"320c8a05":[function(){return n.e(4479).then(n.bind(n,98368))},"@site/../docs/maintain/maintain-networks.md",98368],"32c9742a":[function(){return n.e(9682).then(n.bind(n,70612))},"@site/../docs/learn/xcm/fundamentals/summary.md",70612],"33b0bcab":[function(){return n.e(1519).then(n.bind(n,9382))},"@site/../docs/learn/xcm/reference/xcvm-registers.md",9382],"33bbe353":[function(){return n.e(5033).then(n.bind(n,72083))},"@site/../docs/maintain/kusama/maintain-guides-society-kusama.md",72083],"34b0fecb":[function(){return n.e(1024).then(n.t.bind(n,22e3,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-learn-xcm-references-e58.json",22e3],"3521cab9":[function(){return n.e(3827).then(n.t.bind(n,69073,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-learn-staking-index-244.json",69073],"36051dfe":[function(){return n.e(3949).then(n.bind(n,98233))},"@site/../docs/general/dune-analytics/parachain-dashboards/unique-dashboards.md",98233],"3611be04":[function(){return Promise.all([n.e(1869),n.e(5761)]).then(n.bind(n,98712))},"@site/../docs/learn/learn-offenses.md",98712],"36b7ae49":[function(){return n.e(1914).then(n.bind(n,70137))},"@site/../docs/learn/learn-snowbridge.md",70137],"3829cf1d":[function(){return n.e(5249).then(n.bind(n,4909))},"@site/../docs/maintain/maintain-guides-validator-community.md",4909],"386099fc":[function(){return n.e(3091).then(n.bind(n,97980))},"@site/../docs/learn/learn-polkadot-opengov-treasury.md",97980],"386bfe51":[function(){return n.e(6319).then(n.bind(n,71220))},"@site/../docs/general/contributing.md",71220],"387813b8":[function(){return n.e(2409).then(n.bind(n,68766))},"@site/../docs/learn/learn-guides-coretime-parachains.md",68766],"390ca211":[function(){return Promise.all([n.e(1869),n.e(2623)]).then(n.bind(n,31287))},"@site/../docs/learn/archive/learn-launch.md",31287],"3ab7d35a":[function(){return n.e(5291).then(n.t.bind(n,35586,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-learn-agile-coretime-index-f45.json",35586],"3bd77df4":[function(){return Promise.all([n.e(1869),n.e(3976)]).then(n.bind(n,40641))},"@site/../docs/learn/learn-bridges.md",40641],"3bd87233":[function(){return n.e(8309).then(n.t.bind(n,36278,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-maintain-validator-index-997.json",36278],"3d1bf5db":[function(){return n.e(4190).then(n.bind(n,47347))},"@site/../docs/maintain/maintain-guides-async-backing.md",47347],"3e56470e":[function(){return n.e(1608).then(n.bind(n,17740))},"@site/../docs/maintain/maintain-wss.md",17740],"41b7b3e8":[function(){return n.e(577).then(n.bind(n,15993))},"@site/../docs/learn/learn-staking-advanced.md",15993],"41f7224c":[function(){return Promise.all([n.e(1869),n.e(7376)]).then(n.bind(n,27049))},"@site/../docs/learn/learn-archive.md",27049],"437b4e16":[function(){return n.e(8647).then(n.bind(n,20718))},"@site/../docs/general/dune-analytics/parachain-dashboards/snowbridge-dashboards.md",20718],"43ee4f22":[function(){return Promise.all([n.e(1869),n.e(876)]).then(n.bind(n,36403))},"@site/../docs/build/build-guide.md",36403],"4403bb94":[function(){return n.e(3735).then(n.bind(n,39306))},"@site/../docs/general/dune-analytics/polkadot-dashboards/legacy/polkadot-dot-ordinals.md",39306],"452ad91d":[function(){return n.e(6195).then(n.bind(n,24025))},"@site/../docs/learn/xcm/overview/intro.md",24025],"4642ab5c":[function(){return n.e(4434).then(n.bind(n,91797))},"@site/../docs/learn/learn-cryptography.md",91797],"46c5b6d8":[function(){return n.e(1905).then(n.t.bind(n,42578,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-learn-comparisons-index-3c0.json",42578],"48d75399":[function(){return Promise.all([n.e(3482),n.e(230)]).then(n.bind(n,16870))},"@site/../docs/general/faq.md",16870],"493c7fdf":[function(){return Promise.all([n.e(3482),n.e(5053)]).then(n.bind(n,98828))},"@site/../docs/general/glossary.md",98828],"497334c4":[function(){return n.e(6736).then(n.bind(n,86739))},"@site/../docs/general/dune-analytics/project-dashboards.md",86739],"49ea81bb":[function(){return n.e(9233).then(n.bind(n,50803))},"@site/../docs/general/dune-analytics/polkadot-dashboards/polkadot-dashboards-staking.md",50803],"4a8eb552":[function(){return Promise.all([n.e(3482),n.e(1949)]).then(n.bind(n,4668))},"@site/../docs/learn/learn-comparisons-kusama.md",4668],"4d76887f":[function(){return n.e(6235).then(n.bind(n,60494))},"@site/../docs/build/build-hackathon.md",60494],"4d9b9869":[function(){return n.e(9550).then(n.bind(n,75024))},"@site/../docs/learn/learn-parachains-protocol.md",75024],"4f031749":[function(){return Promise.all([n.e(1869),n.e(1699)]).then(n.bind(n,35292))},"@site/../docs/learn/learn-guides-staking-pools.md",35292],"4f6f3f96":[function(){return n.e(1531).then(n.t.bind(n,56253,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-learn-xcm-overview-d82.json",56253],"5136ee31":[function(){return n.e(4632).then(n.bind(n,23554))},"@site/../docs/learn/xcm/journey/expects.md",23554],"5193d8a9":[function(){return n.e(1511).then(n.bind(n,33199))},"@site/../docs/general/dune-analytics/polkadot-dashboards/legacy/polkadot-opengov-referenda-home.md",33199],"51fbc2c9":[function(){return n.e(2706).then(n.bind(n,43953))},"@site/../docs/learn/learn-comparisons.md",43953],"5355b952":[function(){return Promise.all([n.e(1869),n.e(3482),n.e(2580),n.e(1003)]).then(n.bind(n,48427))},"@site/../docs/learn/learn-polkadot-opengov-origins.md",48427],"54338ffb":[function(){return n.e(8112).then(n.bind(n,60799))},"@site/../docs/learn/learn-account-multisig.md",60799],"543c9f0a":[function(){return n.e(566).then(n.bind(n,30644))},"@site/../docs/build/build-guides-coretime-troubleshoot.md",30644],"556d3f96":[function(){return n.e(1241).then(n.bind(n,62659))},"@site/../docs/general/dune-analytics/parachain-dashboards/astar-dashboards.md",62659],"571c8793":[function(){return n.e(3984).then(n.bind(n,28506))},"@site/../docs/general/dune-analytics/parachain-dashboards/moonbeam-dashboards.md",28506],"57d69936":[function(){return n.e(8736).then(n.t.bind(n,34309,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-programs-index-225.json",34309],"591eca19":[function(){return n.e(2493).then(n.bind(n,53458))},"@site/../docs/general/polkadot-direction.md",53458],"5c6a20c2":[function(){return n.e(9349).then(n.bind(n,77377))},"@site/../docs/learn/learn-safrole.md",77377],"5c90fc9b":[function(){return n.e(3708).then(n.bind(n,52012))},"@site/../docs/learn/xcm/executor_config/config.md",52012],"5d5db6f5":[function(){return n.e(3200).then(n.t.bind(n,56965,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-learn-advanced-index-8e8.json",56965],"5d69d9d4":[function(){return n.e(1658).then(n.bind(n,87390))},"@site/../docs/maintain/maintain-guides-how-to-upgrade.md",87390],"5db34cd0":[function(){return n.e(8058).then(n.bind(n,74078))},"@site/../docs/general/decentralized-voices.md",74078],"5dfc1fb1":[function(){return n.e(1187).then(n.bind(n,2423))},"@site/../docs/general/pcf.md",2423],"5e1f281f":[function(){return n.e(6835).then(n.t.bind(n,33254,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-stay-safe-index-fb6.json",33254],"5e95c892":[function(){return n.e(9647).then(n.bind(n,7121))},"@theme/DocsRoot",7121],"5e9f5e1a":[function(){return Promise.resolve().then(n.bind(n,85290))},"@generated/docusaurus.config",85290],"5f2beba5":[function(){return n.e(7405).then(n.t.bind(n,39196,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-learn-participants-index-530.json",39196],"60738e36":[function(){return Promise.all([n.e(3482),n.e(7777)]).then(n.bind(n,268))},"@site/../docs/general/metadata.md",268],"6116139f":[function(){return n.e(4840).then(n.bind(n,53932))},"@site/../docs/learn/learn-elastic-scaling.md",53932],"643a7bcf":[function(){return n.e(3345).then(n.t.bind(n,51948,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-wallets-index-9b6.json",51948],"64947d47":[function(){return n.e(8688).then(n.t.bind(n,27375,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-polkadot-vision-index-148.json",27375],"64c7e1cc":[function(){return n.e(8727).then(n.bind(n,23001))},"@site/../docs/build/build-integration.md",23001],"6544ec02":[function(){return n.e(9786).then(n.bind(n,49019))},"@site/../docs/general/alpha-program.md",49019],"6822f432":[function(){return n.e(2356).then(n.t.bind(n,50306,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-community-index-a87.json",50306],"694672cd":[function(){return Promise.all([n.e(1869),n.e(1004)]).then(n.bind(n,59458))},"@site/../docs/learn/learn-guides-staking.md",59458],"69b97ecd":[function(){return n.e(866).then(n.bind(n,21324))},"@site/../docs/learn/learn-implementations.md",21324],"6bfbfa77":[function(){return Promise.all([n.e(1869),n.e(2858)]).then(n.bind(n,7723))},"@site/../docs/learn/archive/learn-auction.md",7723],"6d2ffbf3":[function(){return n.e(4168).then(n.bind(n,31395))},"@site/../docs/learn/xcm/quickstart/first-look.md",31395],"6d423296":[function(){return n.e(9521).then(n.t.bind(n,12483,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-learn-assets-index-7cb.json",12483],"6d5c9a28":[function(){return n.e(417).then(n.bind(n,55868))},"@site/../docs/general/staking-apps.md",55868],"6f1a81b8":[function(){return Promise.all([n.e(3482),n.e(2802)]).then(n.bind(n,19576))},"@site/../docs/maintain/maintain-guides-how-to-chill.md",19576],"700d39cd":[function(){return n.e(5647).then(n.t.bind(n,39389,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-learn-polkadot-opengov-index-246.json",39389],"706277b1":[function(){return n.e(3487).then(n.bind(n,25834))},"@site/../docs/general/dune-analytics/polkadot-dashboards/legacy/polkadot-staking-dashboard-validators.md",25834],"71ed82b9":[function(){return n.e(1369).then(n.bind(n,77371))},"@site/../docs/general/start-building.md",77371],"72b78d4a":[function(){return n.e(1772).then(n.bind(n,13109))},"@site/../docs/general/dune-analytics/polkadot-dashboards/legacy/polkadot-opengov-referendum-voting-analysis.md",13109],73617284:[function(){return n.e(981).then(n.bind(n,26620))},"@site/../docs/learn/learn-hyperbridge.md",26620],"73a7060c":[function(){return Promise.all([n.e(3482),n.e(5208)]).then(n.bind(n,78741))},"@site/../docs/learn/learn-polkadot-technical-fellowship.md",78741],"73d1b372":[function(){return n.e(1498).then(n.bind(n,1874))},"@site/../docs/learn/learn-agile-coretime.md",1874],"74df6a22":[function(){return n.e(7227).then(n.bind(n,74064))},"@site/../docs/maintain/maintain-rpc.md",74064],"766a10e1":[function(){return n.e(6118).then(n.bind(n,15869))},"@site/../docs/learn/learn-comparisons-avalanche.md",15869],"77c23c97":[function(){return Promise.all([n.e(1869),n.e(3482),n.e(3536)]).then(n.bind(n,90830))},"@site/../docs/learn/learn-transactions.md",90830],"78868b16":[function(){return n.e(1539).then(n.bind(n,97131))},"@site/../docs/general/kusama/kusama-social-recovery.md",97131],"78e1e977":[function(){return n.e(5884).then(n.bind(n,90616))},"@site/../docs/learn/xcm/journey/holding-modifiers.md",90616],"7c138549":[function(){return n.e(7473).then(n.bind(n,76173))},"@site/../docs/general/dune-analytics/parachain-dashboards/neuroweb-dashboards.md",76173],"7c43c534":[function(){return n.e(9787).then(n.t.bind(n,71769,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-learn-xcm-fundamentals-multilocation-cfc.json",71769],"7dcec981":[function(){return Promise.all([n.e(1869),n.e(4271)]).then(n.bind(n,11714))},"@site/../docs/build/build-client-side.md",11714],"7fbac68a":[function(){return n.e(2757).then(n.bind(n,89032))},"@site/../docs/general/ambassadors.md",89032],"7ffd66a6":[function(){return n.e(6547).then(n.bind(n,38246))},"@site/../docs/general/dune-analytics/parachain-dashboards/acala-dashboards.md",38246],"804b1e9f":[function(){return Promise.all([n.e(1869),n.e(3482),n.e(1062)]).then(n.bind(n,98362))},"@site/../docs/learn/learn-guides-nominator.md",98362],"8081c0c6":[function(){return n.e(8568).then(n.bind(n,77206))},"@site/../docs/general/parity-data-dashboards.md",77206],"824749c6":[function(){return n.e(8800).then(n.bind(n,68498))},"@site/../docs/build/build-node-interaction.md",68498],"8247eba8":[function(){return n.e(7044).then(n.bind(n,53935))},"@site/../docs/learn/xcm/journey/transfers/teleports.md",53935],"83d4859f":[function(){return n.e(2808).then(n.bind(n,3299))},"@site/../docs/learn/xcm/journey/transfers/summary.md",3299],"84ede15a":[function(){return Promise.all([n.e(1869),n.e(6124)]).then(n.bind(n,88779))},"@site/../docs/learn/learn-guides-transfers.md",88779],"85afe03a":[function(){return n.e(1628).then(n.bind(n,80396))},"@site/../docs/maintain/maintain-errors.md",80396],"863c4753":[function(){return n.e(6076).then(n.bind(n,51376))},"@site/../docs/learn/xcm/journey/register-modifiers.md",51376],"879e564b":[function(){return n.e(8789).then(n.bind(n,70272))},"@site/../docs/general/dune-analytics/onboarding-status-and-key-dashboards.md",70272],"899aadcc":[function(){return n.e(6993).then(n.bind(n,5596))},"@site/../docs/learn/xcm/overview/architecture.md",5596],"89a76fd2":[function(){return Promise.all([n.e(1869),n.e(2204)]).then(n.bind(n,4552))},"@site/../docs/learn/archive/learn-redenomination.md",4552],"8a8a7d05":[function(){return n.e(4791).then(n.bind(n,95827))},"@site/../docs/build/build-parachains.md",95827],"8b670b2b":[function(){return n.e(954).then(n.bind(n,62871))},"@site/../docs/build/build-index.md",62871],"8d3a1bf8":[function(){return Promise.all([n.e(1869),n.e(3482),n.e(5588)]).then(n.bind(n,50373))},"@site/../docs/learn/learn-inflation.md",50373],"8d48ec84":[function(){return n.e(2615).then(n.bind(n,90640))},"@site/../docs/general/dune-analytics/parachain-dashboards/frequency-dashboards.md",90640],"8dd7cee0":[function(){return Promise.all([n.e(1869),n.e(7147)]).then(n.bind(n,52872))},"@site/../docs/general/thousand-validators.md",52872],"8fadc1f3":[function(){return n.e(2191).then(n.t.bind(n,98303,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-learn-xcm-index-b78.json",98303],"90a09ad1":[function(){return n.e(8768).then(n.bind(n,98729))},"@site/../docs/general/dune-analytics/dunesql-cheatsheet.md",98729],"918b38b6":[function(){return Promise.all([n.e(3482),n.e(6930)]).then(n.bind(n,30479))},"@site/../docs/learn/learn-async-backing.md",30479],"93953b85":[function(){return n.e(6247).then(n.t.bind(n,48324,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-learn-xcm-journey-f1c.json",48324],"943aba4c":[function(){return Promise.all([n.e(1869),n.e(1112)]).then(n.bind(n,83686))},"@site/../docs/learn/learn-guides-claims.md",83686],"9528ac88":[function(){return n.e(1379).then(n.bind(n,48707))},"@site/../docs/learn/learn-xcm-transport.md",48707],"95aedc42":[function(){return n.e(6842).then(n.t.bind(n,49664,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-learn-xcm-journey-transfers-540.json",49664],"9662c81e":[function(){return Promise.all([n.e(1869),n.e(7809)]).then(n.bind(n,5771))},"@site/../docs/maintain/archive/maintain-guides-how-to-join-council.md",5771],"967fa6d4":[function(){return Promise.all([n.e(1869),n.e(7876)]).then(n.bind(n,62482))},"@site/../docs/learn/learn-guides-accounts-multisig.md",62482],"979a04e7":[function(){return n.e(3705).then(n.bind(n,82561))},"@site/../docs/general/dune-analytics/parachain-dashboards/bifrost-dashboards.md",82561],"987d08ef":[function(){return n.e(6496).then(n.bind(n,73036))},"@site/../docs/build/build-smart-contracts.md",73036],"98a30fd8":[function(){return n.e(2950).then(n.bind(n,11193))},"@site/../docs/learn/xcm/fundamentals/multiasset.md",11193],"98a431f4":[function(){return n.e(8005).then(n.bind(n,40058))},"@site/../docs/general/transaction-attacks.md",40058],"9913464d":[function(){return Promise.all([n.e(1869),n.e(5883)]).then(n.bind(n,9296))},"@site/../docs/learn/archive/learn-governance.md",9296],"9e2042f5":[function(){return n.e(3086).then(n.bind(n,70225))},"@site/../docs/learn/learn-collator.md",70225],"9e3f6a8a":[function(){return n.e(8108).then(n.bind(n,23773))},"@site/../docs/learn/learn-comparison-ethereum-2.md",23773],"9e6341e5":[function(){return n.e(8431).then(n.bind(n,62147))},"@site/../docs/learn/xcm/journey/transfers/reserve.md",62147],"9e76b49d":[function(){return n.e(6775).then(n.bind(n,29967))},"@site/../docs/learn/xcm/testing.md",29967],"9f319605":[function(){return n.e(834).then(n.bind(n,43635))},"@site/../docs/learn/xcm/journey/fees.md",43635],"9f804621":[function(){return Promise.all([n.e(1869),n.e(3482),n.e(1431)]).then(n.bind(n,92415))},"@site/../docs/learn/learn-guides-accounts.md",92415],a2800a5b:[function(){return n.e(3234).then(n.bind(n,29389))},"@site/../docs/build/build-transaction-construction.md",29389],a29dc56e:[function(){return n.e(7554).then(n.bind(n,81815))},"@site/../docs/maintain/maintain-guides-how-to-monitor-your-node.md",81815],a2d5a6d8:[function(){return n.e(6622).then(n.bind(n,51421))},"@site/../docs/general/dune-analytics/parachain-dashboards/collectives-dashboards.md",51421],a44b8423:[function(){return n.e(319).then(n.bind(n,55722))},"@site/../docs/general/dune-analytics/polkadot-dashboards/legacy/polkadot-staking-dashboard-pool-member.md",55722],a5002e4a:[function(){return n.e(1067).then(n.bind(n,53029))},"@site/../docs/build/build-oracle.md",53029],a5b3561d:[function(){return n.e(2226).then(n.bind(n,54237))},"@site/../docs/general/kusama/kusama-coc.md",54237],a6e65e5f:[function(){return n.e(7208).then(n.t.bind(n,3840,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-learn-xcm-quickstart-1cc.json",3840],a7456010:[function(){return n.e(1235).then(n.t.bind(n,50950,19))},"@generated/docusaurus-plugin-content-pages/default/__plugin.json",50950],a74a59a0:[function(){return Promise.all([n.e(3482),n.e(4975)]).then(n.bind(n,34917))},"@site/../docs/maintain/maintain-guides-how-to-validate-polkadot.md",34917],a7b37b86:[function(){return n.e(1447).then(n.bind(n,48999))},"@site/../docs/general/scams.md",48999],a7bd4aaa:[function(){return n.e(7098).then(n.bind(n,74532))},"@theme/DocVersionRoot",74532],a8f54fb1:[function(){return n.e(1706).then(n.bind(n,52280))},"@site/../docs/learn/learn-DOT-KSM-bridge.md",52280],a94703ab:[function(){return Promise.all([n.e(1869),n.e(9048)]).then(n.bind(n,11377))},"@theme/DocRoot",11377],a9f58d5b:[function(){return n.e(5331).then(n.bind(n,40936))},"@site/../docs/learn/learn-account-balances.md",40936],ab138bf8:[function(){return n.e(8914).then(n.bind(n,99771))},"@site/../docs/learn/learn-proxies.md",99771],aba21aa0:[function(){return n.e(5742).then(n.t.bind(n,98211,19))},"@generated/docusaurus-plugin-content-docs/default/__plugin.json",98211],ad1dd1a4:[function(){return n.e(7217).then(n.t.bind(n,86749,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-dashboards-index-254.json",86749],ad5a1373:[function(){return n.e(3656).then(n.bind(n,67166))},"@site/../docs/general/dune-analytics/parachain-dashboards/phala-dashboards.md",67166],ad762f86:[function(){return Promise.all([n.e(1869),n.e(3041)]).then(n.bind(n,12735))},"@site/../docs/learn/learn-account-advanced.md",12735],af2ff1b5:[function(){return n.e(6646).then(n.bind(n,18428))},"@site/../docs/general/dune-analytics/parachain-dashboards/hydration-dashboards.md",18428],afddde9d:[function(){return n.e(1724).then(n.bind(n,10666))},"@site/../docs/learn/learn-asset-conversion-assethub.md",10666],b0a48d97:[function(){return Promise.all([n.e(1869),n.e(1018)]).then(n.bind(n,31962))},"@site/../docs/learn/learn-guides-ledger.md",31962],b0cb055f:[function(){return n.e(9074).then(n.bind(n,93490))},"@site/../docs/learn/xcm/fundamentals/xcvm.md",93490],b0cbc1d4:[function(){return Promise.all([n.e(3482),n.e(7826)]).then(n.bind(n,2662))},"@site/../docs/general/staking-dashboard.md",2662],b0d34550:[function(){return n.e(8660).then(n.bind(n,42868))},"@site/../docs/general/dune-analytics/polkadot-dashboards/polkadot-dashboards-network.md",42868],b1b82dcd:[function(){return Promise.all([n.e(1869),n.e(557)]).then(n.bind(n,59384))},"@site/../docs/learn/archive/learn-crowdloans.md",59384],b21dd8a7:[function(){return n.e(6024).then(n.bind(n,28964))},"@site/../docs/learn/learn-comparison-rollups.md",28964],b225a2ce:[function(){return n.e(1101).then(n.bind(n,53241))},"@site/../docs/learn/xcm/fundamentals/multilocation/summary.md",53241],b3558274:[function(){return n.e(3975).then(n.bind(n,57844))},"@site/../docs/general/dune-analytics/polkadot-dashboards/legacy/polkadot-staking-dashboard.md",57844],b3719d54:[function(){return n.e(8290).then(n.bind(n,106))},"@site/../docs/general/polkadot-v1.md",106],b38833d4:[function(){return n.e(6104).then(n.bind(n,54357))},"@site/../docs/learn/learn-phragmen.md",54357],b418feb9:[function(){return n.e(7242).then(n.bind(n,42344))},"@site/../docs/general/dune-analytics/polkadot-dashboards/polkadot-dashboards-governance.md",42344],b48c599b:[function(){return n.e(9057).then(n.bind(n,66242))},"@site/../docs/general/kusama/kusama-bug-bounty.md",66242],b7bd3ab3:[function(){return n.e(6445).then(n.bind(n,46806))},"@site/../docs/general/dune-analytics/parachain-dashboards/energywebx-dashboards.md",46806],b835d927:[function(){return n.e(1397).then(n.bind(n,53119))},"@site/../docs/general/ecosystem-funds.md",53119],b8cd9d81:[function(){return n.e(3910).then(n.t.bind(n,33716,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-general-dune-analytics-polkadot-dashboards-be4.json",33716],b906f375:[function(){return n.e(159).then(n.bind(n,15102))},"@site/../docs/build/build-light-clients.md",15102],b940de31:[function(){return n.e(4817).then(n.bind(n,6598))},"@site/../docs/learn/learn-assets.md",6598],b9b4ec9e:[function(){return n.e(3316).then(n.bind(n,2197))},"@site/../docs/learn/xcm/reference/glossary.md",2197],bb8b1738:[function(){return Promise.all([n.e(3482),n.e(2916)]).then(n.bind(n,2937))},"@site/../docs/learn/learn-validator.md",2937],bbba852d:[function(){return n.e(9799).then(n.bind(n,20995))},"@site/../docs/general/kusama/kusama-adverserial-cheatsheet.md",20995],bd701914:[function(){return Promise.all([n.e(1869),n.e(1077)]).then(n.bind(n,63298))},"@site/../docs/learn/learn-parachains-faq.md",63298],bea375d6:[function(){return n.e(4938).then(n.bind(n,4907))},"@site/../docs/general/grants.md",4907],bf3ab9de:[function(){return Promise.all([n.e(1869),n.e(2389)]).then(n.bind(n,75753))},"@site/../docs/learn/learn-guides-bridges.md",75753],c07c2447:[function(){return Promise.all([n.e(1869),n.e(7561)]).then(n.bind(n,572))},"@site/../docs/learn/learn-guides-polkadot-opengov.md",572],c07ecb8b:[function(){return n.e(7371).then(n.t.bind(n,56310,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-general-dune-analytics-parachain-dashboards-671.json",56310],c110e322:[function(){return n.e(1592).then(n.bind(n,37917))},"@site/../docs/learn/learn-guides-coretime-swap.md",37917],c141421f:[function(){return n.e(957).then(n.t.bind(n,90786,19))},"@generated/docusaurus-theme-search-algolia/default/__plugin.json",90786],c1bbdb2a:[function(){return n.e(5558).then(n.bind(n,47008))},"@site/../docs/learn/learn-polkadot-host.md",47008],c2912163:[function(){return n.e(7352).then(n.t.bind(n,61910,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-learn-components-index-c9a.json",61910],c2c6a3a6:[function(){return n.e(8506).then(n.bind(n,2506))},"@site/../docs/learn/learn-nft-projects.md",2506],c41801b5:[function(){return Promise.all([n.e(3482),n.e(9507)]).then(n.bind(n,95462))},"@site/../docs/maintain/kusama/maintain-guides-how-to-validate-kusama.md",95462],c4f5d8e4:[function(){return Promise.all([n.e(1869),n.e(2634)]).then(n.bind(n,497))},"@site/src/pages/index.js",497],c52e674c:[function(){return n.e(4466).then(n.t.bind(n,81627,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-build-archive-index-a99.json",81627],c57cca4f:[function(){return n.e(895).then(n.t.bind(n,33202,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-learn-future-implementations-index-472.json",33202],c630d0cd:[function(){return n.e(5420).then(n.bind(n,23862))},"@site/../docs/build/build-guides-template-basic.md",23862],c662f00a:[function(){return n.e(7887).then(n.bind(n,21352))},"@site/../docs/learn/xcm/journey/queries.md",21352],c6b91cbc:[function(){return n.e(1050).then(n.t.bind(n,28239,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-learn-basics-index-5be.json",28239],c78e4f7d:[function(){return n.e(1335).then(n.bind(n,39363))},"@site/../docs/general/dune-analytics/polkadot-dashboards/polkadot-dashboards-overview.md",39363],c7a044bb:[function(){return n.e(9110).then(n.bind(n,24225))},"@site/../docs/learn/xcm/journey/channels-and-bridges.md",24225],c7a2145e:[function(){return n.e(6277).then(n.bind(n,31059))},"@site/../docs/general/how-to-dyor.md",31059],c7c5ba1a:[function(){return Promise.all([n.e(1869),n.e(9476)]).then(n.bind(n,89207))},"@site/../docs/learn/learn-accounts.md",89207],c8dd560b:[function(){return Promise.all([n.e(1869),n.e(3482),n.e(4293)]).then(n.bind(n,77405))},"@site/../docs/learn/learn-guides-accounts-proxy-pure.md",77405],c91a9c06:[function(){return Promise.all([n.e(1869),n.e(1019)]).then(n.bind(n,84345))},"@site/../docs/learn/learn-identity.md",84345],c977dfe8:[function(){return Promise.all([n.e(3482),n.e(4024)]).then(n.bind(n,95304))},"@site/../docs/learn/learn-teleport.md",95304],ca45e589:[function(){return n.e(4821).then(n.t.bind(n,22754,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-explore-index-06f.json",22754],ca9fe671:[function(){return n.e(5827).then(n.bind(n,55995))},"@site/../docs/learn/xcm/overview/xcvm.md",55995],cb9afd28:[function(){return Promise.all([n.e(1869),n.e(1738)]).then(n.bind(n,27735))},"@site/../docs/learn/learn-polkadot-js-guides.md",27735],cc44e8fd:[function(){return n.e(5052).then(n.bind(n,2851))},"@site/../docs/build/build-node-management.md",2851],ccc1222e:[function(){return n.e(5702).then(n.bind(n,47765))},"@site/../docs/build/build-open-source.md",47765],cda87995:[function(){return n.e(1711).then(n.bind(n,24233))},"@site/../docs/build/build-tools-index.md",24233],cdedf67f:[function(){return n.e(8050).then(n.t.bind(n,8137,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-maintain-node-index-307.json",8137],ceaa29cb:[function(){return n.e(4841).then(n.bind(n,99027))},"@site/../docs/learn/xcm/journey/locks/locks.md",99027],cfd53ea4:[function(){return n.e(7482).then(n.bind(n,36531))},"@site/../docs/general/kusama/kusama-timeline.md",36531],cfe984ba:[function(){return n.e(8289).then(n.t.bind(n,57081,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-apps-index-b66.json",57081],d000eb73:[function(){return n.e(4228).then(n.bind(n,88218))},"@site/../docs/general/dune-analytics/parachain-dashboards/stellaswap-dashboards.md",88218],d27ae88d:[function(){return n.e(3170).then(n.bind(n,63366))},"@site/../docs/learn/learn-video-tutorials.md",63366],d3a753cf:[function(){return n.e(4191).then(n.bind(n,52819))},"@site/../docs/learn/xcm/fundamentals/multilocation/example.md",52819],d42819bc:[function(){return n.e(3306).then(n.bind(n,59666))},"@site/../docs/general/dune-analytics/parachain-dashboards/bridgehub-dashboards.md",59666],d569989b:[function(){return n.e(8255).then(n.bind(n,76030))},"@site/../docs/general/bug-bounty.md",76030],d5909206:[function(){return n.e(5434).then(n.bind(n,79245))},"@site/../docs/learn/xcm/fundamentals/multilocation/junction.md",79245],d6a97e7e:[function(){return n.e(1107).then(n.bind(n,58398))},"@site/../docs/learn/xcm/quickstart/xcm-simulator.md",58398],d6b0148d:[function(){return n.e(2980).then(n.bind(n,56591))},"@site/../docs/learn/xcm/journey/origins.md",56591],d9a69e3a:[function(){return n.e(5829).then(n.bind(n,41809))},"@site/../docs/general/dune-analytics/parachain-dashboards/people-dashboards.md",41809],d9ef69a7:[function(){return n.e(2164).then(n.bind(n,53894))},"@site/../docs/general/contributors.md",53894],da9f79cb:[function(){return Promise.all([n.e(1869),n.e(3044)]).then(n.bind(n,44903))},"@site/../docs/learn/learn-nomination-pools.md",44903],daaf1ab4:[function(){return Promise.all([n.e(1869),n.e(8215)]).then(n.bind(n,63523))},"@site/../docs/general/funding.md",63523],db039c7f:[function(){return n.e(2481).then(n.bind(n,40176))},"@site/../docs/learn/xcm/overview/format.md",40176],db3d6c4d:[function(){return n.e(7845).then(n.bind(n,19113))},"@site/../docs/learn/learn-account-abstraction.md",19113],db9d4dae:[function(){return n.e(8472).then(n.bind(n,47818))},"@site/../docs/general/dune-analytics/parachain-dashboards/coretime-dashboards.md",47818],dbbd9e76:[function(){return Promise.all([n.e(1869),n.e(2922)]).then(n.bind(n,22123))},"@site/../docs/learn/learn-guides-vault.md",22123],dc0f9344:[function(){return n.e(1058).then(n.bind(n,6794))},"@site/../docs/general/dune-analytics/parachain-dashboards/pendulum-dashboards.md",6794],dc36d550:[function(){return Promise.all([n.e(1869),n.e(2357)]).then(n.bind(n,32037))},"@site/../docs/maintain/maintain-archive.md",32037],dc776cbc:[function(){return n.e(4498).then(n.bind(n,55957))},"@site/../docs/general/thousand-contributors.md",55957],dd2fa029:[function(){return Promise.all([n.e(1869),n.e(2047)]).then(n.bind(n,98546))},"@site/../docs/learn/learn-polkadotjs.md",98546],dd32e389:[function(){return n.e(7781).then(n.bind(n,21279))},"@site/../docs/general/polkadot-vault.md",21279],df154d69:[function(){return n.e(3880).then(n.bind(n,80179))},"@site/../docs/learn/learn-xcm.md",80179],e00ac272:[function(){return n.e(1881).then(n.bind(n,89510))},"@site/../docs/learn/learn-guides-coretime-marketplaces.md",89510],e2e89062:[function(){return n.e(9894).then(n.bind(n,33910))},"@site/../docs/learn/learn-proxies-pure.md",33910],e31fc461:[function(){return n.e(352).then(n.bind(n,47881))},"@site/../docs/learn/xcm/learn-xcm-docs-intro.md",47881],e43aed4a:[function(){return n.e(1122).then(n.t.bind(n,95773,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-general-index-bbd.json",95773],e495ca4d:[function(){return Promise.all([n.e(1869),n.e(662)]).then(n.bind(n,6099))},"@site/../docs/maintain/archive/maintain-guides-democracy.md",6099],e4ef088f:[function(){return Promise.all([n.e(1869),n.e(3315)]).then(n.bind(n,62515))},"@site/../docs/build/build-guides-install-deps.md",62515],e77078a1:[function(){return n.e(3557).then(n.bind(n,29138))},"@site/../docs/learn/learn-jam-faq.md",29138],e8522a07:[function(){return n.e(5513).then(n.bind(n,38558))},"@site/../docs/general/dune-analytics/polkadot-dashboards/legacy/polkadot-staking-dashboard-nomination-pool.md",38558],ec3b6a32:[function(){return n.e(8832).then(n.bind(n,45003))},"@site/../docs/learn/learn-nft.md",45003],ecb495b7:[function(){return n.e(6786).then(n.bind(n,21017))},"@site/../docs/maintain/maintain-guides-how-to-systemd.md",21017],ece9fdae:[function(){return Promise.all([n.e(1869),n.e(6641)]).then(n.bind(n,49524))},"@site/../docs/general/community.md",49524],ed3409b3:[function(){return Promise.all([n.e(1869),n.e(4117)]).then(n.bind(n,1448))},"@site/../docs/learn/learn-guides-bounties.md",1448],eef3f1dd:[function(){return Promise.all([n.e(1869),n.e(7827)]).then(n.bind(n,3674))},"@site/../docs/learn/learn-guides-treasury.md",3674],efba78c5:[function(){return n.e(3368).then(n.bind(n,75273))},"@site/../docs/general/dune-analytics/polkadot-ecosystem-overview.md",75273],f0ff685a:[function(){return Promise.all([n.e(1869),n.e(3482),n.e(2393)]).then(n.bind(n,63362))},"@site/../docs/learn/learn-guides-accounts-proxy.md",63362],f10f9928:[function(){return n.e(5534).then(n.bind(n,42205))},"@site/../docs/general/dune-analytics/parachain-dashboards/assethub-dashboards.md",42205],f137ce68:[function(){return Promise.all([n.e(1869),n.e(9188)]).then(n.bind(n,33369))},"@site/../docs/learn/learn-xcm-instructions.md",33369],f1585bfb:[function(){return n.e(3642).then(n.bind(n,60957))},"@site/../docs/learn/xcm/quickstart/summary.md",60957],f189ca9f:[function(){return n.e(5312).then(n.bind(n,6026))},"@site/../docs/learn/learn-spree.md",6026],f2521980:[function(){return Promise.all([n.e(3482),n.e(3584)]).then(n.bind(n,28258))},"@site/../docs/general/getting-started.md",28258],f2b5c614:[function(){return n.e(4076).then(n.bind(n,91422))},"@site/../docs/general/dune-analytics/parachain-dashboards/centrifuge-dashboards.md",91422],f2c21b54:[function(){return n.e(4410).then(n.bind(n,99698))},"@site/../docs/build/build-storage.md",99698],f3027c84:[function(){return Promise.all([n.e(1869),n.e(1906)]).then(n.bind(n,2588))},"@site/../docs/general/polkadotjs-ui.md",2588],f359a251:[function(){return Promise.all([n.e(1869),n.e(4051)]).then(n.bind(n,90801))},"@site/../docs/maintain/maintain-endpoints.md",90801],f3bde756:[function(){return n.e(9625).then(n.bind(n,63675))},"@site/../docs/maintain/maintain-bootnode.md",63675],f4130007:[function(){return n.e(8582).then(n.bind(n,25151))},"@site/../docs/general/wallets-and-extensions.md",25151],f41c4e9d:[function(){return n.e(8679).then(n.bind(n,29446))},"@site/../docs/learn/learn-xcm-pallet.md",29446],f4200fe5:[function(){return Promise.all([n.e(1869),n.e(3135)]).then(n.bind(n,41360))},"@site/../docs/maintain/maintain-sync.md",41360],f44679e7:[function(){return n.e(9535).then(n.bind(n,24577))},"@site/../docs/general/governance-apps.md",24577],f44ed8f8:[function(){return n.e(2930).then(n.bind(n,49430))},"@site/../docs/build/build-hrmp-channels.md",49430],f47489cd:[function(){return n.e(4544).then(n.bind(n,31237))},"@site/../docs/learn/learn-runtime-upgrades.md",31237],f52abf29:[function(){return n.e(9116).then(n.bind(n,47817))},"@site/../docs/general/decentralized-futures.md",47817],f62dca67:[function(){return n.e(6416).then(n.t.bind(n,78697,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-learn-xcm-fundamentals-e19.json",78697],f750c690:[function(){return n.e(3261).then(n.bind(n,16117))},"@site/../docs/learn/learn-nft-pallets.md",16117],f7acb151:[function(){return Promise.all([n.e(1869),n.e(2783)]).then(n.bind(n,43143))},"@site/../docs/learn/learn-guides-assets-create.md",43143],f8518919:[function(){return n.e(4484).then(n.bind(n,74390))},"@site/../docs/general/web3-and-polkadot.md",74390],f861e7c0:[function(){return n.e(5967).then(n.bind(n,63609))},"@site/../docs/general/dune-analytics/parachain-dashboards/litentry-dashboards.md",63609],f90fa732:[function(){return n.e(8225).then(n.bind(n,22027))},"@site/../docs/build/build-data.md",22027],fa343ad1:[function(){return n.e(2368).then(n.bind(n,37374))},"@site/../docs/learn/xcm/fundamentals/weight_and_fees.md",37374],fabebe44:[function(){return n.e(9783).then(n.bind(n,68818))},"@site/../docs/general/dev-heroes.md",68818],fc0e5740:[function(){return n.e(8067).then(n.t.bind(n,32591,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-build-client-index-10e.json",32591],fda65b2b:[function(){return Promise.all([n.e(1869),n.e(6225)]).then(n.bind(n,54276))},"@site/../docs/learn/learn-guides-asset-conversion.md",54276],fea93377:[function(){return Promise.all([n.e(3482),n.e(4898)]).then(n.bind(n,45800))},"@site/../docs/maintain/maintain-guides-validator-payout.md",45800],feadf832:[function(){return Promise.all([n.e(1869),n.e(1710)]).then(n.bind(n,84680))},"@site/../docs/build/build-guides-coretime-start.md",84680],fecdcc34:[function(){return n.e(2410).then(n.bind(n,69144))},"@site/../docs/learn/xcm/journey/version.md",69144],feea648c:[function(){return n.e(9175).then(n.bind(n,35543))},"@site/../docs/learn/learn-xcvm.md",35543],ff154173:[function(){return n.e(34).then(n.t.bind(n,88796,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-maintain-collator-index-c0b.json",88796],ff6596ea:[function(){return Promise.all([n.e(3482),n.e(3507)]).then(n.bind(n,65410))},"@site/../docs/learn/learn-nominator.md",65410],ffd76171:[function(){return Promise.all([n.e(1869),n.e(639)]).then(n.bind(n,98319))},"@site/../docs/maintain/maintain-index.md",98319],ffe9c3c9:[function(){return n.e(1967).then(n.bind(n,99220))},"@site/../docs/learn/learn-DOT.md",99220]};var s=n(74848);function c(e){var t=e.error,n=e.retry,r=e.pastDelay;return t?(0,s.jsxs)("div",{style:{textAlign:"center",color:"#fff",backgroundColor:"#fa383e",borderColor:"#fa383e",borderStyle:"solid",borderRadius:"0.25rem",borderWidth:"1px",boxSizing:"border-box",display:"block",padding:"1rem",flex:"0 0 50%",marginLeft:"25%",marginRight:"25%",marginTop:"5rem",maxWidth:"50%",width:"100%"},children:[(0,s.jsx)("p",{children:String(t)}),(0,s.jsx)("div",{children:(0,s.jsx)("button",{type:"button",onClick:n,children:"Retry"})})]}):r?(0,s.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh"},children:(0,s.jsx)("svg",{id:"loader",style:{width:128,height:110,position:"absolute",top:"calc(100vh - 64%)"},viewBox:"0 0 45 45",xmlns:"http://www.w3.org/2000/svg",stroke:"#61dafb",children:(0,s.jsxs)("g",{fill:"none",fillRule:"evenodd",transform:"translate(1 1)",strokeWidth:"2",children:[(0,s.jsxs)("circle",{cx:"22",cy:"22",r:"6",strokeOpacity:"0",children:[(0,s.jsx)("animate",{attributeName:"r",begin:"1.5s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),(0,s.jsx)("animate",{attributeName:"stroke-opacity",begin:"1.5s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),(0,s.jsx)("animate",{attributeName:"stroke-width",begin:"1.5s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})]}),(0,s.jsxs)("circle",{cx:"22",cy:"22",r:"6",strokeOpacity:"0",children:[(0,s.jsx)("animate",{attributeName:"r",begin:"3s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),(0,s.jsx)("animate",{attributeName:"stroke-opacity",begin:"3s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),(0,s.jsx)("animate",{attributeName:"stroke-width",begin:"3s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})]}),(0,s.jsx)("circle",{cx:"22",cy:"22",r:"8",children:(0,s.jsx)("animate",{attributeName:"r",begin:"0s",dur:"1.5s",values:"6;1;2;3;4;5;6",calcMode:"linear",repeatCount:"indefinite"})})]})})}):null}var l=n(86921),u=n(53102);function d(e,t){if("*"===e)return a()({loading:c,loader:function(){return n.e(2237).then(n.bind(n,82237))},modules:["@theme/NotFound"],webpack:function(){return[82237]},render:function(e,t){var n=e.default;return(0,s.jsx)(u.W,{value:{plugin:{name:"native",id:"default"}},children:(0,s.jsx)(n,Object.assign({},t))})}});var r=o[e+"-"+t],d={},p=[],f=[],m=(0,l.A)(r);return Object.entries(m).forEach((function(e){var t=e[0],n=e[1],r=i[n];r&&(d[t]=r[0],p.push(r[1]),f.push(r[2]))})),a().Map({loading:c,loader:d,modules:p,webpack:function(){return f},render:function(t,n){var a=JSON.parse(JSON.stringify(r));Object.entries(t).forEach((function(t){var n=t[0],r=t[1],o=r.default;if(!o)throw new Error("The page component at "+e+" doesn't have a default export. This makes it impossible to render anything. Consider default-exporting a React component.");"object"!=typeof o&&"function"!=typeof o||Object.keys(r).filter((function(e){return"default"!==e})).forEach((function(e){o[e]=r[e]}));var i=a,s=n.split(".");s.slice(0,-1).forEach((function(e){i=i[e]})),i[s[s.length-1]]=o}));var o=a.__comp;delete a.__comp;var i=a.__context;delete a.__context;var c=a.__props;return delete a.__props,(0,s.jsx)(u.W,{value:i,children:(0,s.jsx)(o,Object.assign({},a,c,n))})}})}const p=[{path:"/search",component:d("/search","5de"),exact:!0},{path:"/docs",component:d("/docs","def"),routes:[{path:"/docs",component:d("/docs","766"),routes:[{path:"/docs",component:d("/docs","e49"),routes:[{path:"/docs/alpha-program",component:d("/docs/alpha-program","9f0"),exact:!0,sidebar:"docs"},{path:"/docs/ambassadors",component:d("/docs/ambassadors","718"),exact:!0,sidebar:"docs"},{path:"/docs/apps-index",component:d("/docs/apps-index","b46"),exact:!0,sidebar:"docs"},{path:"/docs/bug-bounty",component:d("/docs/bug-bounty","1ba"),exact:!0,sidebar:"docs"},{path:"/docs/build-archive-index",component:d("/docs/build-archive-index","3b3"),exact:!0,sidebar:"docs"},{path:"/docs/build-client-index",component:d("/docs/build-client-index","e7c"),exact:!0,sidebar:"docs"},{path:"/docs/build-client-side",component:d("/docs/build-client-side","65f"),exact:!0,sidebar:"docs"},{path:"/docs/build-dapp",component:d("/docs/build-dapp","dd7"),exact:!0},{path:"/docs/build-data",component:d("/docs/build-data","95f"),exact:!0,sidebar:"docs"},{path:"/docs/build-guide",component:d("/docs/build-guide","479"),exact:!0,sidebar:"docs"},{path:"/docs/build-guides-coretime-start",component:d("/docs/build-guides-coretime-start","7be"),exact:!0,sidebar:"docs"},{path:"/docs/build-guides-coretime-troubleshoot",component:d("/docs/build-guides-coretime-troubleshoot","0fb"),exact:!0,sidebar:"docs"},{path:"/docs/build-guides-install-deps",component:d("/docs/build-guides-install-deps","5f9"),exact:!0,sidebar:"docs"},{path:"/docs/build-guides-template-basic",component:d("/docs/build-guides-template-basic","e2a"),exact:!0,sidebar:"docs"},{path:"/docs/build-hackathon",component:d("/docs/build-hackathon","c97"),exact:!0,sidebar:"docs"},{path:"/docs/build-hrmp-channels",component:d("/docs/build-hrmp-channels","05c"),exact:!0,sidebar:"docs"},{path:"/docs/build-index",component:d("/docs/build-index","26d"),exact:!0},{path:"/docs/build-integrate-assets",component:d("/docs/build-integrate-assets","47a"),exact:!0,sidebar:"docs"},{path:"/docs/build-integration",component:d("/docs/build-integration","75b"),exact:!0,sidebar:"docs"},{path:"/docs/build-light-clients",component:d("/docs/build-light-clients","f31"),exact:!0,sidebar:"docs"},{path:"/docs/build-network-overview",component:d("/docs/build-network-overview","fb1"),exact:!0,sidebar:"docs"},{path:"/docs/build-node-interaction",component:d("/docs/build-node-interaction","f39"),exact:!0,sidebar:"docs"},{path:"/docs/build-node-management",component:d("/docs/build-node-management","cef"),exact:!0,sidebar:"docs"},{path:"/docs/build-open-source",component:d("/docs/build-open-source","135"),exact:!0,sidebar:"docs"},{path:"/docs/build-oracle",component:d("/docs/build-oracle","392"),exact:!0},{path:"/docs/build-pdk",component:d("/docs/build-pdk","d70"),exact:!0,sidebar:"docs"},{path:"/docs/build-protocol-index",component:d("/docs/build-protocol-index","aac"),exact:!0,sidebar:"docs"},{path:"/docs/build-protocol-info",component:d("/docs/build-protocol-info","a80"),exact:!0,sidebar:"docs"},{path:"/docs/build-smart-contracts",component:d("/docs/build-smart-contracts","bd5"),exact:!0,sidebar:"docs"},{path:"/docs/build-storage",component:d("/docs/build-storage","451"),exact:!0},{path:"/docs/build-tools-index",component:d("/docs/build-tools-index","889"),exact:!0,sidebar:"docs"},{path:"/docs/build-transaction-construction",component:d("/docs/build-transaction-construction","5ab"),exact:!0,sidebar:"docs"},{path:"/docs/chain-state-values",component:d("/docs/chain-state-values","35a"),exact:!0,sidebar:"docs"},{path:"/docs/community",component:d("/docs/community","d96"),exact:!0,sidebar:"docs"},{path:"/docs/community-index",component:d("/docs/community-index","d5a"),exact:!0,sidebar:"docs"},{path:"/docs/contributing",component:d("/docs/contributing","89f"),exact:!0,sidebar:"docs"},{path:"/docs/contributors",component:d("/docs/contributors","420"),exact:!0,sidebar:"docs"},{path:"/docs/dashboards-index",component:d("/docs/dashboards-index","421"),exact:!0,sidebar:"docs"},{path:"/docs/decentralized-futures",component:d("/docs/decentralized-futures","ff3"),exact:!0,sidebar:"docs"},{path:"/docs/decentralized-voices",component:d("/docs/decentralized-voices","a4e"),exact:!0,sidebar:"docs"},{path:"/docs/dev-heroes",component:d("/docs/dev-heroes","3a5"),exact:!0,sidebar:"docs"},{path:"/docs/ecosystem-funds",component:d("/docs/ecosystem-funds","479"),exact:!0,sidebar:"docs"},{path:"/docs/explore-index",component:d("/docs/explore-index","1f3"),exact:!0,sidebar:"docs"},{path:"/docs/faq",component:d("/docs/faq","286"),exact:!0,sidebar:"docs"},{path:"/docs/funding",component:d("/docs/funding","331"),exact:!0,sidebar:"docs"},{path:"/docs/general-index",component:d("/docs/general-index","409"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics",component:d("/docs/general/dune-analytics","b98"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/acala-dashboards",component:d("/docs/general/dune-analytics/acala-dashboards","792"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/assethub-dashboards",component:d("/docs/general/dune-analytics/assethub-dashboards","400"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/astar-dashboards",component:d("/docs/general/dune-analytics/astar-dashboards","790"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/bifrost-dashboards",component:d("/docs/general/dune-analytics/bifrost-dashboards","a46"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/bridgehub-dashboards",component:d("/docs/general/dune-analytics/bridgehub-dashboards","c1b"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/centrifuge-dashboards",component:d("/docs/general/dune-analytics/centrifuge-dashboards","ec8"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/collectives-dashboards",component:d("/docs/general/dune-analytics/collectives-dashboards","e12"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/coretime-dashboards",component:d("/docs/general/dune-analytics/coretime-dashboards","d8b"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/energywebx-dashboards",component:d("/docs/general/dune-analytics/energywebx-dashboards","936"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/frequency-dashboards",component:d("/docs/general/dune-analytics/frequency-dashboards","549"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/hydration-dashboards",component:d("/docs/general/dune-analytics/hydration-dashboards","366"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/interlay-dashboards",component:d("/docs/general/dune-analytics/interlay-dashboards","0c8"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/invarch-dashboards",component:d("/docs/general/dune-analytics/invarch-dashboards","8e2"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/litentry-dashboards",component:d("/docs/general/dune-analytics/litentry-dashboards","120"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/manta-dashboards",component:d("/docs/general/dune-analytics/manta-dashboards","02e"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/moonbeam-dashboards",component:d("/docs/general/dune-analytics/moonbeam-dashboards","319"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/neuroweb-dashboards",component:d("/docs/general/dune-analytics/neuroweb-dashboards","91b"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/nodle-dashboards",component:d("/docs/general/dune-analytics/nodle-dashboards","02e"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/parachain-dashboards",component:d("/docs/general/dune-analytics/parachain-dashboards","8fc"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/pendulum-dashboards",component:d("/docs/general/dune-analytics/pendulum-dashboards","dee"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/people-dashboards",component:d("/docs/general/dune-analytics/people-dashboards","7cf"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/phala-dashboards",component:d("/docs/general/dune-analytics/phala-dashboards","1a0"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/polimec-dashboards",component:d("/docs/general/dune-analytics/polimec-dashboards","1ba"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/polkadex-dashboards",component:d("/docs/general/dune-analytics/polkadex-dashboards","a53"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/polkadot-dashboards",component:d("/docs/general/dune-analytics/polkadot-dashboards","689"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/polkadot-dashboards-governance",component:d("/docs/general/dune-analytics/polkadot-dashboards-governance","a36"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/polkadot-dashboards-network",component:d("/docs/general/dune-analytics/polkadot-dashboards-network","73d"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/polkadot-dashboards-overview",component:d("/docs/general/dune-analytics/polkadot-dashboards-overview","d8e"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/polkadot-dashboards-staking",component:d("/docs/general/dune-analytics/polkadot-dashboards-staking","f70"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/polkadot-dashboards/polkadot-dot-ordinals",component:d("/docs/general/dune-analytics/polkadot-dashboards/polkadot-dot-ordinals","2ad"),exact:!0},{path:"/docs/general/dune-analytics/polkadot-dashboards/polkadot-governance-dashboard",component:d("/docs/general/dune-analytics/polkadot-dashboards/polkadot-governance-dashboard","bf1"),exact:!0},{path:"/docs/general/dune-analytics/polkadot-dashboards/polkadot-opengov-referenda-home",component:d("/docs/general/dune-analytics/polkadot-dashboards/polkadot-opengov-referenda-home","b4b"),exact:!0},{path:"/docs/general/dune-analytics/polkadot-dashboards/polkadot-opengov-referendum-voting-analysis",component:d("/docs/general/dune-analytics/polkadot-dashboards/polkadot-opengov-referendum-voting-analysis","cfb"),exact:!0},{path:"/docs/general/dune-analytics/polkadot-dashboards/polkadot-staking-dashboard",component:d("/docs/general/dune-analytics/polkadot-dashboards/polkadot-staking-dashboard","856"),exact:!0},{path:"/docs/general/dune-analytics/polkadot-dashboards/polkadot-staking-dashboard-nomination-pool",component:d("/docs/general/dune-analytics/polkadot-dashboards/polkadot-staking-dashboard-nomination-pool","613"),exact:!0},{path:"/docs/general/dune-analytics/polkadot-dashboards/polkadot-staking-dashboard-nominators",component:d("/docs/general/dune-analytics/polkadot-dashboards/polkadot-staking-dashboard-nominators","a03"),exact:!0},{path:"/docs/general/dune-analytics/polkadot-dashboards/polkadot-staking-dashboard-pool-member",component:d("/docs/general/dune-analytics/polkadot-dashboards/polkadot-staking-dashboard-pool-member","ddb"),exact:!0},{path:"/docs/general/dune-analytics/polkadot-dashboards/polkadot-staking-dashboard-validators",component:d("/docs/general/dune-analytics/polkadot-dashboards/polkadot-staking-dashboard-validators","d6d"),exact:!0},{path:"/docs/general/dune-analytics/snowbridge-dashboards",component:d("/docs/general/dune-analytics/snowbridge-dashboards","915"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/stellaswap-dashboards",component:d("/docs/general/dune-analytics/stellaswap-dashboards","0bf"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/unique-dashboards",component:d("/docs/general/dune-analytics/unique-dashboards","f74"),exact:!0,sidebar:"docs"},{path:"/docs/general/dunesql-cheatsheet",component:d("/docs/general/dunesql-cheatsheet","fe2"),exact:!0,sidebar:"docs"},{path:"/docs/general/onboarding-status-and-key-dashboards",component:d("/docs/general/onboarding-status-and-key-dashboards","b88"),exact:!0,sidebar:"docs"},{path:"/docs/general/polkadot-ecosystem-overview",component:d("/docs/general/polkadot-ecosystem-overview","bcd"),exact:!0,sidebar:"docs"},{path:"/docs/general/project-dashboards",component:d("/docs/general/project-dashboards","c57"),exact:!0,sidebar:"docs"},{path:"/docs/getting-started",component:d("/docs/getting-started","46c"),exact:!0,sidebar:"docs"},{path:"/docs/glossary",component:d("/docs/glossary","021"),exact:!0,sidebar:"docs"},{path:"/docs/governance-apps",component:d("/docs/governance-apps","055"),exact:!0,sidebar:"docs"},{path:"/docs/grants",component:d("/docs/grants","586"),exact:!0,sidebar:"docs"},{path:"/docs/how-to-dyor",component:d("/docs/how-to-dyor","9ea"),exact:!0,sidebar:"docs"},{path:"/docs/kusama-adversarial-cheatsheet",component:d("/docs/kusama-adversarial-cheatsheet","7ad"),exact:!0,sidebar:"docs"},{path:"/docs/kusama-bug-bounty",component:d("/docs/kusama-bug-bounty","5ce"),exact:!0,sidebar:"docs"},{path:"/docs/kusama-coc",component:d("/docs/kusama-coc","fee"),exact:!0,sidebar:"docs"},{path:"/docs/kusama-getting-started",component:d("/docs/kusama-getting-started","c42"),exact:!0,sidebar:"docs"},{path:"/docs/kusama-social-recovery",component:d("/docs/kusama-social-recovery","f3d"),exact:!0,sidebar:"docs"},{path:"/docs/kusama-timeline",component:d("/docs/kusama-timeline","d67"),exact:!0,sidebar:"docs"},{path:"/docs/learn-account-abstraction",component:d("/docs/learn-account-abstraction","670"),exact:!0,sidebar:"docs"},{path:"/docs/learn-account-advanced",component:d("/docs/learn-account-advanced","652"),exact:!0,sidebar:"docs"},{path:"/docs/learn-account-balances",component:d("/docs/learn-account-balances","8e6"),exact:!0,sidebar:"docs"},{path:"/docs/learn-account-multisig",component:d("/docs/learn-account-multisig","f13"),exact:!0,sidebar:"docs"},{path:"/docs/learn-accounts",component:d("/docs/learn-accounts","42e"),exact:!0,sidebar:"docs"},{path:"/docs/learn-advanced-index",component:d("/docs/learn-advanced-index","63e"),exact:!0,sidebar:"docs"},{path:"/docs/learn-agile-coretime",component:d("/docs/learn-agile-coretime","777"),exact:!0,sidebar:"docs"},{path:"/docs/learn-agile-coretime-index",component:d("/docs/learn-agile-coretime-index","fa7"),exact:!0,sidebar:"docs"},{path:"/docs/learn-architecture",component:d("/docs/learn-architecture","908"),exact:!0,sidebar:"docs"},{path:"/docs/learn-archive",component:d("/docs/learn-archive","ca8"),exact:!0,sidebar:"docs"},{path:"/docs/learn-asset-conversion-assethub",component:d("/docs/learn-asset-conversion-assethub","426"),exact:!0,sidebar:"docs"},{path:"/docs/learn-assets",component:d("/docs/learn-assets","624"),exact:!0,sidebar:"docs"},{path:"/docs/learn-assets-index",component:d("/docs/learn-assets-index","506"),exact:!0,sidebar:"docs"},{path:"/docs/learn-async-backing",component:d("/docs/learn-async-backing","691"),exact:!0,sidebar:"docs"},{path:"/docs/learn-basics-index",component:d("/docs/learn-basics-index","2ab"),exact:!0,sidebar:"docs"},{path:"/docs/learn-bridges",component:d("/docs/learn-bridges","c95"),exact:!0,sidebar:"docs"},{path:"/docs/learn-collator",component:d("/docs/learn-collator","58b"),exact:!0,sidebar:"docs"},{path:"/docs/learn-comparisons",component:d("/docs/learn-comparisons","26e"),exact:!0,sidebar:"docs"},{path:"/docs/learn-comparisons-avalanche",component:d("/docs/learn-comparisons-avalanche","9e6"),exact:!0,sidebar:"docs"},{path:"/docs/learn-comparisons-cosmos",component:d("/docs/learn-comparisons-cosmos","9e6"),exact:!0,sidebar:"docs"},{path:"/docs/learn-comparisons-ethereum-2",component:d("/docs/learn-comparisons-ethereum-2","e28"),exact:!0,sidebar:"docs"},{path:"/docs/learn-comparisons-index",component:d("/docs/learn-comparisons-index","d6b"),exact:!0,sidebar:"docs"},{path:"/docs/learn-comparisons-kusama",component:d("/docs/learn-comparisons-kusama","bba"),exact:!0,sidebar:"docs"},{path:"/docs/learn-comparisons-rollups",component:d("/docs/learn-comparisons-rollups","f66"),exact:!0,sidebar:"docs"},{path:"/docs/learn-components-index",component:d("/docs/learn-components-index","ba1"),exact:!0,sidebar:"docs"},{path:"/docs/learn-consensus",component:d("/docs/learn-consensus","83d"),exact:!0,sidebar:"docs"},{path:"/docs/learn-cryptography",component:d("/docs/learn-cryptography","ed0"),exact:!0,sidebar:"docs"},{path:"/docs/learn-DOT",component:d("/docs/learn-DOT","829"),exact:!0,sidebar:"docs"},{path:"/docs/learn-dot-ksm-bridge",component:d("/docs/learn-dot-ksm-bridge","cac"),exact:!0,sidebar:"docs"},{path:"/docs/learn-elastic-scaling",component:d("/docs/learn-elastic-scaling","867"),exact:!0,sidebar:"docs"},{path:"/docs/learn-future-implementations-index",component:d("/docs/learn-future-implementations-index","e25"),exact:!0,sidebar:"docs"},{path:"/docs/learn-guides-accounts",component:d("/docs/learn-guides-accounts","298"),exact:!0,sidebar:"docs"},{path:"/docs/learn-guides-accounts-multisig",component:d("/docs/learn-guides-accounts-multisig","53f"),exact:!0,sidebar:"docs"},{path:"/docs/learn-guides-accounts-proxy",component:d("/docs/learn-guides-accounts-proxy","976"),exact:!0,sidebar:"docs"},{path:"/docs/learn-guides-accounts-proxy-pure",component:d("/docs/learn-guides-accounts-proxy-pure","b2d"),exact:!0,sidebar:"docs"},{path:"/docs/learn-guides-asset-conversion",component:d("/docs/learn-guides-asset-conversion","ef4"),exact:!0,sidebar:"docs"},{path:"/docs/learn-guides-assets",component:d("/docs/learn-guides-assets","8f4"),exact:!0,sidebar:"docs"},{path:"/docs/learn-guides-assets-create",component:d("/docs/learn-guides-assets-create","1e0"),exact:!0,sidebar:"docs"},{path:"/docs/learn-guides-bounties",component:d("/docs/learn-guides-bounties","43b"),exact:!0,sidebar:"docs"},{path:"/docs/learn-guides-bridges",component:d("/docs/learn-guides-bridges","7e1"),exact:!0,sidebar:"docs"},{path:"/docs/learn-guides-claims",component:d("/docs/learn-guides-claims","aa7"),exact:!0,sidebar:"docs"},{path:"/docs/learn-guides-coretime-marketplaces",component:d("/docs/learn-guides-coretime-marketplaces","515"),exact:!0,sidebar:"docs"},{path:"/docs/learn-guides-coretime-parachains",component:d("/docs/learn-guides-coretime-parachains","8e6"),exact:!0,sidebar:"docs"},{path:"/docs/learn-guides-coretime-swap",component:d("/docs/learn-guides-coretime-swap","eeb"),exact:!0,sidebar:"docs"},{path:"/docs/learn-guides-dot-ksm-bridge",component:d("/docs/learn-guides-dot-ksm-bridge","acc"),exact:!0,sidebar:"docs"},{path:"/docs/learn-guides-identity",component:d("/docs/learn-guides-identity","3bb"),exact:!0,sidebar:"docs"},{path:"/docs/learn-guides-ledger",component:d("/docs/learn-guides-ledger","4d2"),exact:!0,sidebar:"docs"},{path:"/docs/learn-guides-nominator",component:d("/docs/learn-guides-nominator","5be"),exact:!0,sidebar:"docs"},{path:"/docs/learn-guides-polkadot-opengov",component:d("/docs/learn-guides-polkadot-opengov","e43"),exact:!0,sidebar:"docs"},{path:"/docs/learn-guides-staking",component:d("/docs/learn-guides-staking","c84"),exact:!0,sidebar:"docs"},{path:"/docs/learn-guides-staking-pools",component:d("/docs/learn-guides-staking-pools","599"),exact:!0,sidebar:"docs"},{path:"/docs/learn-guides-transfers",component:d("/docs/learn-guides-transfers","d9a"),exact:!0,sidebar:"docs"},{path:"/docs/learn-guides-treasury",component:d("/docs/learn-guides-treasury","378"),exact:!0,sidebar:"docs"},{path:"/docs/learn-guides-vault",component:d("/docs/learn-guides-vault","c39"),exact:!0,sidebar:"docs"},{path:"/docs/learn-hyperbridge",component:d("/docs/learn-hyperbridge","646"),exact:!0,sidebar:"docs"},{path:"/docs/learn-identity",component:d("/docs/learn-identity","06f"),exact:!0,sidebar:"docs"},{path:"/docs/learn-implementations",component:d("/docs/learn-implementations","9b0"),exact:!0},{path:"/docs/learn-index",component:d("/docs/learn-index","0b7"),exact:!0,sidebar:"docs"},{path:"/docs/learn-inflation",component:d("/docs/learn-inflation","a49"),exact:!0,sidebar:"docs"},{path:"/docs/learn-jam",component:d("/docs/learn-jam","e19"),exact:!0,sidebar:"docs"},{path:"/docs/learn-jam-chain",component:d("/docs/learn-jam-chain","35f"),exact:!0,sidebar:"docs"},{path:"/docs/learn-jam-faq",component:d("/docs/learn-jam-faq","617"),exact:!0,sidebar:"docs"},{path:"/docs/learn-nft",component:d("/docs/learn-nft","078"),exact:!0,sidebar:"docs"},{path:"/docs/learn-nft-pallets",component:d("/docs/learn-nft-pallets","665"),exact:!0,sidebar:"docs"},{path:"/docs/learn-nft-projects",component:d("/docs/learn-nft-projects","226"),exact:!0,sidebar:"docs"},{path:"/docs/learn-nomination-pools",component:d("/docs/learn-nomination-pools","328"),exact:!0,sidebar:"docs"},{path:"/docs/learn-nominator",component:d("/docs/learn-nominator","443"),exact:!0,sidebar:"docs"},{path:"/docs/learn-offenses",component:d("/docs/learn-offenses","ed9"),exact:!0,sidebar:"docs"},{path:"/docs/learn-parachains",component:d("/docs/learn-parachains","b9e"),exact:!0,sidebar:"docs"},{path:"/docs/learn-parachains-faq",component:d("/docs/learn-parachains-faq","357"),exact:!0,sidebar:"docs"},{path:"/docs/learn-parachains-index",component:d("/docs/learn-parachains-index","e80"),exact:!0,sidebar:"docs"},{path:"/docs/learn-parachains-protocol",component:d("/docs/learn-parachains-protocol","604"),exact:!0,sidebar:"docs"},{path:"/docs/learn-participants-index",component:d("/docs/learn-participants-index","426"),exact:!0,sidebar:"docs"},{path:"/docs/learn-phragmen",component:d("/docs/learn-phragmen","894"),exact:!0,sidebar:"docs"},{path:"/docs/learn-polkadot-host",component:d("/docs/learn-polkadot-host","92a"),exact:!0,sidebar:"docs"},{path:"/docs/learn-polkadot-js-guides",component:d("/docs/learn-polkadot-js-guides","347"),exact:!0,sidebar:"docs"},{path:"/docs/learn-polkadot-opengov",component:d("/docs/learn-polkadot-opengov","8c9"),exact:!0,sidebar:"docs"},{path:"/docs/learn-polkadot-opengov-index",component:d("/docs/learn-polkadot-opengov-index","922"),exact:!0,sidebar:"docs"},{path:"/docs/learn-polkadot-opengov-origins",component:d("/docs/learn-polkadot-opengov-origins","9d6"),exact:!0,sidebar:"docs"},{path:"/docs/learn-polkadot-opengov-treasury",component:d("/docs/learn-polkadot-opengov-treasury","fbd"),exact:!0,sidebar:"docs"},{path:"/docs/learn-polkadot-technical-fellowship",component:d("/docs/learn-polkadot-technical-fellowship","ee8"),exact:!0,sidebar:"docs"},{path:"/docs/learn-polkadotjs",component:d("/docs/learn-polkadotjs","089"),exact:!0,sidebar:"docs"},{path:"/docs/learn-proxies",component:d("/docs/learn-proxies","a18"),exact:!0,sidebar:"docs"},{path:"/docs/learn-proxies-pure",component:d("/docs/learn-proxies-pure","8be"),exact:!0,sidebar:"docs"},{path:"/docs/learn-runtime-upgrades",component:d("/docs/learn-runtime-upgrades","582"),exact:!0,sidebar:"docs"},{path:"/docs/learn-safrole",component:d("/docs/learn-safrole","213"),exact:!0,sidebar:"docs"},{path:"/docs/learn-scams",component:d("/docs/learn-scams","a7e"),exact:!0,sidebar:"docs"},{path:"/docs/learn-snowbridge",component:d("/docs/learn-snowbridge","f68"),exact:!0,sidebar:"docs"},{path:"/docs/learn-spree",component:d("/docs/learn-spree","c79"),exact:!0,sidebar:"docs"},{path:"/docs/learn-staking",component:d("/docs/learn-staking","9b8"),exact:!0,sidebar:"docs"},{path:"/docs/learn-staking-advanced",component:d("/docs/learn-staking-advanced","33a"),exact:!0,sidebar:"docs"},{path:"/docs/learn-staking-index",component:d("/docs/learn-staking-index","cf9"),exact:!0,sidebar:"docs"},{path:"/docs/learn-system-chains",component:d("/docs/learn-system-chains","1b0"),exact:!0,sidebar:"docs"},{path:"/docs/learn-teleport",component:d("/docs/learn-teleport","e18"),exact:!0,sidebar:"docs"},{path:"/docs/learn-transactions",component:d("/docs/learn-transactions","81c"),exact:!0,sidebar:"docs"},{path:"/docs/learn-validator",component:d("/docs/learn-validator","45a"),exact:!0,sidebar:"docs"},{path:"/docs/learn-video-tutorials",component:d("/docs/learn-video-tutorials","64f"),exact:!0,sidebar:"docs"},{path:"/docs/learn-wasm",component:d("/docs/learn-wasm","0b7"),exact:!0,sidebar:"docs"},{path:"/docs/learn-xcm",component:d("/docs/learn-xcm","20d"),exact:!0,sidebar:"docs"},{path:"/docs/learn-xcm-index",component:d("/docs/learn-xcm-index","49c"),exact:!0,sidebar:"docs"},{path:"/docs/learn-xcm-instructions",component:d("/docs/learn-xcm-instructions","3c1"),exact:!0,sidebar:"docs"},{path:"/docs/learn-xcm-pallet",component:d("/docs/learn-xcm-pallet","3da"),exact:!0,sidebar:"docs"},{path:"/docs/learn-xcm-transport",component:d("/docs/learn-xcm-transport","5ef"),exact:!0,sidebar:"docs"},{path:"/docs/learn-xcm-usecases",component:d("/docs/learn-xcm-usecases","2ae"),exact:!0,sidebar:"docs"},{path:"/docs/learn-xcvm",component:d("/docs/learn-xcvm","d56"),exact:!0,sidebar:"docs"},{path:"/docs/learn/learn-auction",component:d("/docs/learn/learn-auction","9ae"),exact:!0,sidebar:"docs"},{path:"/docs/learn/learn-controller",component:d("/docs/learn/learn-controller","d30"),exact:!0,sidebar:"docs"},{path:"/docs/learn/learn-crowdloans",component:d("/docs/learn/learn-crowdloans","b27"),exact:!0,sidebar:"docs"},{path:"/docs/learn/learn-governance",component:d("/docs/learn/learn-governance","fde"),exact:!0,sidebar:"docs"},{path:"/docs/learn/learn-launch",component:d("/docs/learn/learn-launch","853"),exact:!0,sidebar:"docs"},{path:"/docs/learn/learn-redenomination",component:d("/docs/learn/learn-redenomination","6a6"),exact:!0,sidebar:"docs"},{path:"/docs/learn/learn-treasury",component:d("/docs/learn/learn-treasury","75c"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm",component:d("/docs/learn/xcm","995"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/config-deep-dive",component:d("/docs/learn/xcm/config-deep-dive","b64"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/fundamentals",component:d("/docs/learn/xcm/fundamentals","13d"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/fundamentals-fees",component:d("/docs/learn/xcm/fundamentals-fees","6b3"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/fundamentals-multiasset",component:d("/docs/learn/xcm/fundamentals-multiasset","001"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/fundamentals-summary",component:d("/docs/learn/xcm/fundamentals-summary","a4b"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/fundamentals-xcvm",component:d("/docs/learn/xcm/fundamentals-xcvm","086"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/fundamentals/multilocation",component:d("/docs/learn/xcm/fundamentals/multilocation","e19"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/fundamentals/multilocation-example",component:d("/docs/learn/xcm/fundamentals/multilocation-example","358"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/fundamentals/multilocation-junctions",component:d("/docs/learn/xcm/fundamentals/multilocation-junctions","e64"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/fundamentals/multilocation-summary",component:d("/docs/learn/xcm/fundamentals/multilocation-summary","958"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/introduction",component:d("/docs/learn/xcm/introduction","813"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/journey",component:d("/docs/learn/xcm/journey","0b1"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/journey-assets",component:d("/docs/learn/xcm/journey-assets","bf0"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/journey-channels",component:d("/docs/learn/xcm/journey-channels","22c"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/journey-expectations",component:d("/docs/learn/xcm/journey-expectations","c0f"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/journey-fees",component:d("/docs/learn/xcm/journey-fees","193"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/journey-holding",component:d("/docs/learn/xcm/journey-holding","b29"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/journey-locks",component:d("/docs/learn/xcm/journey-locks","f3a"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/journey-origin",component:d("/docs/learn/xcm/journey-origin","a4d"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/journey-queries",component:d("/docs/learn/xcm/journey-queries","670"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/journey-register",component:d("/docs/learn/xcm/journey-register","0fe"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/journey-summary",component:d("/docs/learn/xcm/journey-summary","6a3"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/journey-transact",component:d("/docs/learn/xcm/journey-transact","eae"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/journey-version",component:d("/docs/learn/xcm/journey-version","d38"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/journey/transfers",component:d("/docs/learn/xcm/journey/transfers","d74"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/journey/transfers-reserve",component:d("/docs/learn/xcm/journey/transfers-reserve","4a6"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/journey/transfers-summary",component:d("/docs/learn/xcm/journey/transfers-summary","2e8"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/journey/transfers-teleport",component:d("/docs/learn/xcm/journey/transfers-teleport","2a8"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/overview",component:d("/docs/learn/xcm/overview","376"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/overview-architecture",component:d("/docs/learn/xcm/overview-architecture","7ac"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/overview-format",component:d("/docs/learn/xcm/overview-format","bef"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/overview-intro",component:d("/docs/learn/xcm/overview-intro","32c"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/overview-summary",component:d("/docs/learn/xcm/overview-summary","daf"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/overview-xcvm",component:d("/docs/learn/xcm/overview-xcvm","238"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/quickstart",component:d("/docs/learn/xcm/quickstart","9db"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/quickstart-first-look",component:d("/docs/learn/xcm/quickstart-first-look","b8c"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/quickstart-simulator",component:d("/docs/learn/xcm/quickstart-simulator","de9"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/quickstart-summary",component:d("/docs/learn/xcm/quickstart-summary","30b"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/reference-glossary",component:d("/docs/learn/xcm/reference-glossary","aa6"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/reference-xcvm-registers",component:d("/docs/learn/xcm/reference-xcvm-registers","043"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/references",component:d("/docs/learn/xcm/references","61c"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/testing",component:d("/docs/learn/xcm/testing","81b"),exact:!0,sidebar:"docs"},{path:"/docs/ledger",component:d("/docs/ledger","593"),exact:!0,sidebar:"docs"},{path:"/docs/maintain-archive",component:d("/docs/maintain-archive","17f"),exact:!0,sidebar:"docs"},{path:"/docs/maintain-bootnode",component:d("/docs/maintain-bootnode","9a2"),exact:!0,sidebar:"docs"},{path:"/docs/maintain-collator-index",component:d("/docs/maintain-collator-index","058"),exact:!0,sidebar:"docs"},{path:"/docs/maintain-endpoints",component:d("/docs/maintain-endpoints","3c9"),exact:!0,sidebar:"docs"},{path:"/docs/maintain-errors",component:d("/docs/maintain-errors","57a"),exact:!0,sidebar:"docs"},{path:"/docs/maintain-guides-async-backing",component:d("/docs/maintain-guides-async-backing","e3a"),exact:!0,sidebar:"docs"},{path:"/docs/maintain-guides-how-to-chill",component:d("/docs/maintain-guides-how-to-chill","9be"),exact:!0,sidebar:"docs"},{path:"/docs/maintain-guides-how-to-monitor-your-node",component:d("/docs/maintain-guides-how-to-monitor-your-node","c4b"),exact:!0,sidebar:"docs"},{path:"/docs/maintain-guides-how-to-stop-validating",component:d("/docs/maintain-guides-how-to-stop-validating","67e"),exact:!0,sidebar:"docs"},{path:"/docs/maintain-guides-how-to-systemd",component:d("/docs/maintain-guides-how-to-systemd","1ad"),exact:!0,sidebar:"docs"},{path:"/docs/maintain-guides-how-to-upgrade",component:d("/docs/maintain-guides-how-to-upgrade","8d9"),exact:!0,sidebar:"docs"},{path:"/docs/maintain-guides-how-to-validate-kusama",component:d("/docs/maintain-guides-how-to-validate-kusama","ea3"),exact:!0,sidebar:"docs"},{path:"/docs/maintain-guides-how-to-validate-polkadot",component:d("/docs/maintain-guides-how-to-validate-polkadot","56f"),exact:!0,sidebar:"docs"},{path:"/docs/maintain-guides-secure-validator",component:d("/docs/maintain-guides-secure-validator","5d5"),exact:!0,sidebar:"docs"},{path:"/docs/maintain-guides-society-kusama",component:d("/docs/maintain-guides-society-kusama","059"),exact:!0,sidebar:"docs"},{path:"/docs/maintain-guides-validator-community",component:d("/docs/maintain-guides-validator-community","699"),exact:!0,sidebar:"docs"},{path:"/docs/maintain-guides-validator-payout",component:d("/docs/maintain-guides-validator-payout","7df"),exact:!0,sidebar:"docs"},{path:"/docs/maintain-index",component:d("/docs/maintain-index","c57"),exact:!0,sidebar:"docs"},{path:"/docs/maintain-networks",component:d("/docs/maintain-networks","5dc"),exact:!0,sidebar:"docs"},{path:"/docs/maintain-node-index",component:d("/docs/maintain-node-index","e80"),exact:!0,sidebar:"docs"},{path:"/docs/maintain-polkadot-parameters",component:d("/docs/maintain-polkadot-parameters","38b"),exact:!0,sidebar:"docs"},{path:"/docs/maintain-rpc",component:d("/docs/maintain-rpc","887"),exact:!0,sidebar:"docs"},{path:"/docs/maintain-sync",component:d("/docs/maintain-sync","c37"),exact:!0,sidebar:"docs"},{path:"/docs/maintain-validator-index",component:d("/docs/maintain-validator-index","069"),exact:!0,sidebar:"docs"},{path:"/docs/maintain-wss",component:d("/docs/maintain-wss","207"),exact:!0,sidebar:"docs"},{path:"/docs/maintain/maintain-guides-democracy",component:d("/docs/maintain/maintain-guides-democracy","0ce"),exact:!0,sidebar:"docs"},{path:"/docs/maintain/maintain-guides-how-to-join-council",component:d("/docs/maintain/maintain-guides-how-to-join-council","992"),exact:!0,sidebar:"docs"},{path:"/docs/maintain/maintain-guides-how-to-vote-councillor",component:d("/docs/maintain/maintain-guides-how-to-vote-councillor","817"),exact:!0,sidebar:"docs"},{path:"/docs/metadata",component:d("/docs/metadata","a8f"),exact:!0,sidebar:"docs"},{path:"/docs/multisig-apps",component:d("/docs/multisig-apps","593"),exact:!0,sidebar:"docs"},{path:"/docs/parachains-apps",component:d("/docs/parachains-apps","cda"),exact:!0,sidebar:"docs"},{path:"/docs/parity-data-dashboards",component:d("/docs/parity-data-dashboards","11c"),exact:!0,sidebar:"docs"},{path:"/docs/polkadot-community-foundation",component:d("/docs/polkadot-community-foundation","0d6"),exact:!0,sidebar:"docs"},{path:"/docs/polkadot-direction",component:d("/docs/polkadot-direction","40a"),exact:!0,sidebar:"docs"},{path:"/docs/polkadot-v1",component:d("/docs/polkadot-v1","a68"),exact:!0,sidebar:"docs"},{path:"/docs/polkadot-vault",component:d("/docs/polkadot-vault","e33"),exact:!0,sidebar:"docs"},{path:"/docs/polkadot-vision-index",component:d("/docs/polkadot-vision-index","641"),exact:!0,sidebar:"docs"},{path:"/docs/polkadotjs",component:d("/docs/polkadotjs","8d7"),exact:!0,sidebar:"docs"},{path:"/docs/polkadotjs-ui",component:d("/docs/polkadotjs-ui","4c2"),exact:!0,sidebar:"docs"},{path:"/docs/programs-index",component:d("/docs/programs-index","292"),exact:!0,sidebar:"docs"},{path:"/docs/staking-apps",component:d("/docs/staking-apps","481"),exact:!0,sidebar:"docs"},{path:"/docs/staking-dashboard",component:d("/docs/staking-dashboard","d6b"),exact:!0,sidebar:"docs"},{path:"/docs/start-building",component:d("/docs/start-building","501"),exact:!0,sidebar:"docs"},{path:"/docs/stay-safe-index",component:d("/docs/stay-safe-index","e19"),exact:!0,sidebar:"docs"},{path:"/docs/thousand-contributors",component:d("/docs/thousand-contributors","b6c"),exact:!0,sidebar:"docs"},{path:"/docs/thousand-validators",component:d("/docs/thousand-validators","500"),exact:!0,sidebar:"docs"},{path:"/docs/transaction-attacks",component:d("/docs/transaction-attacks","5b0"),exact:!0,sidebar:"docs"},{path:"/docs/wallets-and-extensions",component:d("/docs/wallets-and-extensions","8ad"),exact:!0,sidebar:"docs"},{path:"/docs/wallets-index",component:d("/docs/wallets-index","d70"),exact:!0,sidebar:"docs"},{path:"/docs/web3-and-polkadot",component:d("/docs/web3-and-polkadot","c3a"),exact:!0,sidebar:"docs"}]}]}]},{path:"/",component:d("/","2e1"),exact:!0},{path:"*",component:d("*")}]},31513:(e,t,n)=>{"use strict";n.d(t,{zR:()=>x,TM:()=>j,yJ:()=>f,sC:()=>A,AO:()=>p});var r=n(58168);function a(e){return"/"===e.charAt(0)}function o(e,t){for(var n=t,r=n+1,a=e.length;r=0;p--){var f=i[p];"."===f?o(i,p):".."===f?(o(i,p),d++):d&&(o(i,p),d--)}if(!l)for(;d--;d)i.unshift("..");!l||""===i[0]||i[0]&&a(i[0])||i.unshift("");var m=i.join("/");return n&&"/"!==m.substr(-1)&&(m+="/"),m};var s=n(11561);function c(e){return"/"===e.charAt(0)?e:"/"+e}function l(e){return"/"===e.charAt(0)?e.substr(1):e}function u(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function d(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function p(e){var t=e.pathname,n=e.search,r=e.hash,a=t||"/";return n&&"?"!==n&&(a+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(a+="#"===r.charAt(0)?r:"#"+r),a}function f(e,t,n,a){var o;"string"==typeof e?(o=function(e){var t=e||"/",n="",r="",a=t.indexOf("#");-1!==a&&(r=t.substr(a),t=t.substr(0,a));var o=t.indexOf("?");return-1!==o&&(n=t.substr(o),t=t.substr(0,o)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e),o.state=t):(void 0===(o=(0,r.A)({},e)).pathname&&(o.pathname=""),o.search?"?"!==o.search.charAt(0)&&(o.search="?"+o.search):o.search="",o.hash?"#"!==o.hash.charAt(0)&&(o.hash="#"+o.hash):o.hash="",void 0!==t&&void 0===o.state&&(o.state=t));try{o.pathname=decodeURI(o.pathname)}catch(s){throw s instanceof URIError?new URIError('Pathname "'+o.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):s}return n&&(o.key=n),a?o.pathname?"/"!==o.pathname.charAt(0)&&(o.pathname=i(o.pathname,a.pathname)):o.pathname=a.pathname:o.pathname||(o.pathname="/"),o}function m(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,a){if(null!=e){var o="function"==typeof e?e(t,n):e;"string"==typeof o?"function"==typeof r?r(o,a):a(!0):a(!1!==o)}else a(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;rt?n.splice(t,n.length-t,a):n.push(a),d({action:r,location:a,index:t,entries:n})}}))},replace:function(e,t){var r="REPLACE",a=f(e,t,h(),x.location);u.confirmTransitionTo(a,r,n,(function(e){e&&(x.entries[x.index]=a,d({action:r,location:a}))}))},go:v,goBack:function(){v(-1)},goForward:function(){v(1)},canGo:function(e){var t=x.index+e;return t>=0&&t{"use strict";var r=n(44363),a={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function c(e){return r.isMemo(e)?i:s[e.$$typeof]||a}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=i;var l=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,m=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(m){var a=f(n);a&&a!==m&&e(t,a,r)}var i=u(n);d&&(i=i.concat(d(n)));for(var s=c(t),h=c(n),b=0;b{"use strict";e.exports=function(e,t,n,r,a,o,i,s){if(!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,a,o,i,s],u=0;(c=new Error(t.replace(/%s/g,(function(){return l[u++]})))).name="Invariant Violation"}throw c.framesToPop=1,c}}},10119:(e,t,n)=>{"use strict";n.r(t)},74100:(e,t,n)=>{"use strict";n.r(t)},35697:(e,t,n)=>{"use strict";n.r(t)},95728:(e,t,n)=>{"use strict";n.r(t)},5947:function(e,t,n){var r,a;r=function(){var e,t,n={version:"0.2.0"},r=n.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'
    '};function a(e,t,n){return en?n:e}function o(e){return 100*(-1+e)}function i(e,t,n){var a;return(a="translate3d"===r.positionUsing?{transform:"translate3d("+o(e)+"%,0,0)"}:"translate"===r.positionUsing?{transform:"translate("+o(e)+"%,0)"}:{"margin-left":o(e)+"%"}).transition="all "+t+"ms "+n,a}n.configure=function(e){var t,n;for(t in e)void 0!==(n=e[t])&&e.hasOwnProperty(t)&&(r[t]=n);return this},n.status=null,n.set=function(e){var t=n.isStarted();e=a(e,r.minimum,1),n.status=1===e?null:e;var o=n.render(!t),l=o.querySelector(r.barSelector),u=r.speed,d=r.easing;return o.offsetWidth,s((function(t){""===r.positionUsing&&(r.positionUsing=n.getPositioningCSS()),c(l,i(e,u,d)),1===e?(c(o,{transition:"none",opacity:1}),o.offsetWidth,setTimeout((function(){c(o,{transition:"all "+u+"ms linear",opacity:0}),setTimeout((function(){n.remove(),t()}),u)}),u)):setTimeout(t,u)})),this},n.isStarted=function(){return"number"==typeof n.status},n.start=function(){n.status||n.set(0);var e=function(){setTimeout((function(){n.status&&(n.trickle(),e())}),r.trickleSpeed)};return r.trickle&&e(),this},n.done=function(e){return e||n.status?n.inc(.3+.5*Math.random()).set(1):this},n.inc=function(e){var t=n.status;return t?("number"!=typeof e&&(e=(1-t)*a(Math.random()*t,.1,.95)),t=a(t+e,0,.994),n.set(t)):n.start()},n.trickle=function(){return n.inc(Math.random()*r.trickleRate)},e=0,t=0,n.promise=function(r){return r&&"resolved"!==r.state()?(0===t&&n.start(),e++,t++,r.always((function(){0==--t?(e=0,n.done()):n.set((e-t)/e)})),this):this},n.render=function(e){if(n.isRendered())return document.getElementById("nprogress");u(document.documentElement,"nprogress-busy");var t=document.createElement("div");t.id="nprogress",t.innerHTML=r.template;var a,i=t.querySelector(r.barSelector),s=e?"-100":o(n.status||0),l=document.querySelector(r.parent);return c(i,{transition:"all 0 linear",transform:"translate3d("+s+"%,0,0)"}),r.showSpinner||(a=t.querySelector(r.spinnerSelector))&&f(a),l!=document.body&&u(l,"nprogress-custom-parent"),l.appendChild(t),t},n.remove=function(){d(document.documentElement,"nprogress-busy"),d(document.querySelector(r.parent),"nprogress-custom-parent");var e=document.getElementById("nprogress");e&&f(e)},n.isRendered=function(){return!!document.getElementById("nprogress")},n.getPositioningCSS=function(){var e=document.body.style,t="WebkitTransform"in e?"Webkit":"MozTransform"in e?"Moz":"msTransform"in e?"ms":"OTransform"in e?"O":"";return t+"Perspective"in e?"translate3d":t+"Transform"in e?"translate":"margin"};var s=function(){var e=[];function t(){var n=e.shift();n&&n(t)}return function(n){e.push(n),1==e.length&&t()}}(),c=function(){var e=["Webkit","O","Moz","ms"],t={};function n(e){return e.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,(function(e,t){return t.toUpperCase()}))}function r(t){var n=document.body.style;if(t in n)return t;for(var r,a=e.length,o=t.charAt(0).toUpperCase()+t.slice(1);a--;)if((r=e[a]+o)in n)return r;return t}function a(e){return e=n(e),t[e]||(t[e]=r(e))}function o(e,t,n){t=a(t),e.style[t]=n}return function(e,t){var n,r,a=arguments;if(2==a.length)for(n in t)void 0!==(r=t[n])&&t.hasOwnProperty(n)&&o(e,n,r);else o(e,a[1],a[2])}}();function l(e,t){return("string"==typeof e?e:p(e)).indexOf(" "+t+" ")>=0}function u(e,t){var n=p(e),r=n+t;l(n,t)||(e.className=r.substring(1))}function d(e,t){var n,r=p(e);l(e,t)&&(n=r.replace(" "+t+" "," "),e.className=n.substring(1,n.length-1))}function p(e){return(" "+(e.className||"")+" ").replace(/\s+/gi," ")}function f(e){e&&e.parentNode&&e.parentNode.removeChild(e)}return n},void 0===(a="function"==typeof r?r.call(t,n,t,e):r)||(e.exports=a)},19700:()=>{!function(e){function t(e,t){return"___"+e.toUpperCase()+t+"___"}Object.defineProperties(e.languages["markup-templating"]={},{buildPlaceholders:{value:function(n,r,a,o){if(n.language===r){var i=n.tokenStack=[];n.code=n.code.replace(a,(function(e){if("function"==typeof o&&!o(e))return e;for(var a,s=i.length;-1!==n.code.indexOf(a=t(r,s));)++s;return i[s]=e,a})),n.grammar=e.languages.markup}}},tokenizePlaceholders:{value:function(n,r){if(n.language===r&&n.tokenStack){n.grammar=e.languages[r];var a=0,o=Object.keys(n.tokenStack);!function i(s){for(var c=0;c=o.length);c++){var l=s[c];if("string"==typeof l||l.content&&"string"==typeof l.content){var u=o[a],d=n.tokenStack[u],p="string"==typeof l?l:l.content,f=t(r,u),m=p.indexOf(f);if(m>-1){++a;var h=p.substring(0,m),b=new e.Token(r,e.tokenize(d,n.grammar),"language-"+r,d),g=p.substring(m+f.length),y=[];h&&y.push.apply(y,i([h])),y.push(b),g&&y.push.apply(y,i([g])),"string"==typeof l?s.splice.apply(s,[c,1].concat(y)):l.content=y}}else l.content&&i(l.content)}return s}(n.tokens)}}}})}(Prism)},75342:()=>{!function(e){for(var t=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|)*\*\//.source,n=0;n<2;n++)t=t.replace(//g,(function(){return t}));t=t.replace(//g,(function(){return/[^\s\S]/.source})),e.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string}(Prism)},91830:(e,t,n)=>{var r={"./prism-rust":75342};function a(e){var t=o(e);return n(t)}function o(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}a.keys=function(){return Object.keys(r)},a.resolve=o,e.exports=a,a.id=91830},2694:(e,t,n)=>{"use strict";var r=n(6925);function a(){}function o(){}o.resetWarningCache=a,e.exports=function(){function e(e,t,n,a,o,i){if(i!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:a};return n.PropTypes=n,n}},5556:(e,t,n)=>{e.exports=n(2694)()},6925:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},61105:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var r=n(46942),a=n.n(r),o=n(96540),i=n(36519),s=n(74848);const c=o.forwardRef(((e,t)=>{const[{className:n,...r},{as:o="div",bsPrefix:c,spans:l}]=function({as:e,bsPrefix:t,className:n,...r}){t=(0,i.oU)(t,"col");const o=(0,i.gy)(),s=(0,i.Jm)(),c=[],l=[];return o.forEach((e=>{const n=r[e];let a,o,i;delete r[e],"object"==typeof n&&null!=n?({span:a,offset:o,order:i}=n):a=n;const u=e!==s?`-${e}`:"";a&&c.push(!0===a?`${t}${u}`:`${t}${u}-${a}`),null!=i&&l.push(`order${u}-${i}`),null!=o&&l.push(`offset${u}-${o}`)})),[{...r,className:a()(n,...c,...l)},{as:e,bsPrefix:t,spans:c}]}(e);return(0,s.jsx)(o,{...r,ref:t,className:a()(n,!l.length&&c)})}));c.displayName="Col";const l=c},43048:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var r=n(46942),a=n.n(r),o=n(96540),i=n(36519),s=n(74848);const c=o.forwardRef((({bsPrefix:e,fluid:t=!1,as:n="div",className:r,...o},c)=>{const l=(0,i.oU)(e,"container"),u="string"==typeof t?`-${t}`:"-fluid";return(0,s.jsx)(n,{ref:c,...o,className:a()(r,t?`${l}${u}`:l)})}));c.displayName="Container";const l=c},44479:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var r=n(46942),a=n.n(r),o=n(96540),i=n(36519),s=n(74848);const c=o.forwardRef((({bsPrefix:e,className:t,as:n="div",...r},o)=>{const c=(0,i.oU)(e,"row"),l=(0,i.gy)(),u=(0,i.Jm)(),d=`${c}-cols`,p=[];return l.forEach((e=>{const t=r[e];let n;delete r[e],null!=t&&"object"==typeof t?({cols:n}=t):n=t;const a=e!==u?`-${e}`:"";null!=n&&p.push(`${d}${a}-${n}`)})),(0,s.jsx)(n,{ref:o,...r,className:a()(t,c,...p)})}));c.displayName="Row";const l=c},36519:(e,t,n)=>{"use strict";n.d(t,{Jm:()=>u,gy:()=>l,oU:()=>c});var r=n(96540);n(74848);const a=["xxl","xl","lg","md","sm","xs"],o=r.createContext({prefixes:{},breakpoints:a,minBreakpoint:"xs"}),{Consumer:i,Provider:s}=o;function c(e,t){const{prefixes:n}=(0,r.useContext)(o);return e||n[t]||t}function l(){const{breakpoints:e}=(0,r.useContext)(o);return e}function u(){const{minBreakpoint:e}=(0,r.useContext)(o);return e}},22551:(e,t,n)=>{"use strict";var r=n(96540),a=n(69982);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n
    \n'}(e)).replace(/{"use strict";n.d(t,{o:()=>d,l:()=>p});var r=n(96540),a=n(85290);const o=JSON.parse('{"docusaurus-plugin-content-docs":{"default":{"path":"/docs","versions":[{"name":"current","label":"Next","isLast":true,"path":"/docs","mainDocId":"general/getting-started","docs":[{"id":"build/build-client-side","path":"/docs/build-client-side","sidebar":"docs"},{"id":"build/build-dapp","path":"/docs/build-dapp"},{"id":"build/build-data","path":"/docs/build-data","sidebar":"docs"},{"id":"build/build-guide","path":"/docs/build-guide","sidebar":"docs"},{"id":"build/build-guides-coretime-start","path":"/docs/build-guides-coretime-start","sidebar":"docs"},{"id":"build/build-guides-coretime-troubleshoot","path":"/docs/build-guides-coretime-troubleshoot","sidebar":"docs"},{"id":"build/build-guides-install-deps","path":"/docs/build-guides-install-deps","sidebar":"docs"},{"id":"build/build-guides-template-basic","path":"/docs/build-guides-template-basic","sidebar":"docs"},{"id":"build/build-hackathon","path":"/docs/build-hackathon","sidebar":"docs"},{"id":"build/build-hrmp-channels","path":"/docs/build-hrmp-channels","sidebar":"docs"},{"id":"build/build-index","path":"/docs/build-index"},{"id":"build/build-integrate-assets","path":"/docs/build-integrate-assets","sidebar":"docs"},{"id":"build/build-integration","path":"/docs/build-integration","sidebar":"docs"},{"id":"build/build-light-clients","path":"/docs/build-light-clients","sidebar":"docs"},{"id":"build/build-network-overview","path":"/docs/build-network-overview","sidebar":"docs"},{"id":"build/build-node-interaction","path":"/docs/build-node-interaction","sidebar":"docs"},{"id":"build/build-node-management","path":"/docs/build-node-management","sidebar":"docs"},{"id":"build/build-open-source","path":"/docs/build-open-source","sidebar":"docs"},{"id":"build/build-oracle","path":"/docs/build-oracle"},{"id":"build/build-parachains","path":"/docs/build-pdk","sidebar":"docs"},{"id":"build/build-protocol-info","path":"/docs/build-protocol-info","sidebar":"docs"},{"id":"build/build-smart-contracts","path":"/docs/build-smart-contracts","sidebar":"docs"},{"id":"build/build-storage","path":"/docs/build-storage"},{"id":"build/build-tools-index","path":"/docs/build-tools-index","sidebar":"docs"},{"id":"build/build-transaction-construction","path":"/docs/build-transaction-construction","sidebar":"docs"},{"id":"general/alpha-program","path":"/docs/alpha-program","sidebar":"docs"},{"id":"general/ambassadors","path":"/docs/ambassadors","sidebar":"docs"},{"id":"general/bug-bounty","path":"/docs/bug-bounty","sidebar":"docs"},{"id":"general/chain-state-values","path":"/docs/chain-state-values","sidebar":"docs"},{"id":"general/community","path":"/docs/community","sidebar":"docs"},{"id":"general/contributing","path":"/docs/contributing","sidebar":"docs"},{"id":"general/contributors","path":"/docs/contributors","sidebar":"docs"},{"id":"general/decentralized-futures","path":"/docs/decentralized-futures","sidebar":"docs"},{"id":"general/decentralized-voices","path":"/docs/decentralized-voices","sidebar":"docs"},{"id":"general/dev-heroes","path":"/docs/dev-heroes","sidebar":"docs"},{"id":"general/doc-thousand-contributors","path":"/docs/thousand-contributors","sidebar":"docs"},{"id":"general/doc-thousand-validators","path":"/docs/thousand-validators","sidebar":"docs"},{"id":"general/dune-analytics/dunesql-cheatsheet","path":"/docs/general/dunesql-cheatsheet","sidebar":"docs"},{"id":"general/dune-analytics/onboarding-status-and-key-dashboards","path":"/docs/general/onboarding-status-and-key-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/parachain-dashboards/acala-dashboards","path":"/docs/general/dune-analytics/acala-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/parachain-dashboards/assethub-dashboards","path":"/docs/general/dune-analytics/assethub-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/parachain-dashboards/astar-dashboards","path":"/docs/general/dune-analytics/astar-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/parachain-dashboards/bifrost-dashboards","path":"/docs/general/dune-analytics/bifrost-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/parachain-dashboards/bridgehub-dashboards","path":"/docs/general/dune-analytics/bridgehub-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/parachain-dashboards/centrifuge-dashboards","path":"/docs/general/dune-analytics/centrifuge-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/parachain-dashboards/collectives-dashboards","path":"/docs/general/dune-analytics/collectives-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/parachain-dashboards/coretime-dashboards","path":"/docs/general/dune-analytics/coretime-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/parachain-dashboards/energywebx-dashboards","path":"/docs/general/dune-analytics/energywebx-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/parachain-dashboards/frequency-dashboards","path":"/docs/general/dune-analytics/frequency-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/parachain-dashboards/hydration-dashboards","path":"/docs/general/dune-analytics/hydration-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/parachain-dashboards/interlay-dashboards","path":"/docs/general/dune-analytics/interlay-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/parachain-dashboards/invarch-dashboards","path":"/docs/general/dune-analytics/invarch-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/parachain-dashboards/litentry-dashboards","path":"/docs/general/dune-analytics/litentry-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/parachain-dashboards/manta-dashboards","path":"/docs/general/dune-analytics/manta-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/parachain-dashboards/moonbeam-dashboards","path":"/docs/general/dune-analytics/moonbeam-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/parachain-dashboards/neuroweb-dashboards","path":"/docs/general/dune-analytics/neuroweb-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/parachain-dashboards/nodle-dashboards","path":"/docs/general/dune-analytics/nodle-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/parachain-dashboards/pendulum-dashboards","path":"/docs/general/dune-analytics/pendulum-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/parachain-dashboards/people-dashboards","path":"/docs/general/dune-analytics/people-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/parachain-dashboards/phala-dashboards","path":"/docs/general/dune-analytics/phala-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/parachain-dashboards/polimec-dashboards","path":"/docs/general/dune-analytics/polimec-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/parachain-dashboards/polkadex-dashboards","path":"/docs/general/dune-analytics/polkadex-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/parachain-dashboards/snowbridge-dashboards","path":"/docs/general/dune-analytics/snowbridge-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/parachain-dashboards/stellaswap-dashboards","path":"/docs/general/dune-analytics/stellaswap-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/parachain-dashboards/unique-dashboards","path":"/docs/general/dune-analytics/unique-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/polkadot-dashboards/legacy/polkadot-dot-ordinals","path":"/docs/general/dune-analytics/polkadot-dashboards/polkadot-dot-ordinals"},{"id":"general/dune-analytics/polkadot-dashboards/legacy/polkadot-governance-dashboard","path":"/docs/general/dune-analytics/polkadot-dashboards/polkadot-governance-dashboard"},{"id":"general/dune-analytics/polkadot-dashboards/legacy/polkadot-opengov-referenda-home","path":"/docs/general/dune-analytics/polkadot-dashboards/polkadot-opengov-referenda-home"},{"id":"general/dune-analytics/polkadot-dashboards/legacy/polkadot-opengov-referendum-voting-analysis","path":"/docs/general/dune-analytics/polkadot-dashboards/polkadot-opengov-referendum-voting-analysis"},{"id":"general/dune-analytics/polkadot-dashboards/legacy/polkadot-staking-dashboard","path":"/docs/general/dune-analytics/polkadot-dashboards/polkadot-staking-dashboard"},{"id":"general/dune-analytics/polkadot-dashboards/legacy/polkadot-staking-dashboard-nomination-pool","path":"/docs/general/dune-analytics/polkadot-dashboards/polkadot-staking-dashboard-nomination-pool"},{"id":"general/dune-analytics/polkadot-dashboards/legacy/polkadot-staking-dashboard-nominators","path":"/docs/general/dune-analytics/polkadot-dashboards/polkadot-staking-dashboard-nominators"},{"id":"general/dune-analytics/polkadot-dashboards/legacy/polkadot-staking-dashboard-pool-member","path":"/docs/general/dune-analytics/polkadot-dashboards/polkadot-staking-dashboard-pool-member"},{"id":"general/dune-analytics/polkadot-dashboards/legacy/polkadot-staking-dashboard-validators","path":"/docs/general/dune-analytics/polkadot-dashboards/polkadot-staking-dashboard-validators"},{"id":"general/dune-analytics/polkadot-dashboards/polkadot-dashboards-governance","path":"/docs/general/dune-analytics/polkadot-dashboards-governance","sidebar":"docs"},{"id":"general/dune-analytics/polkadot-dashboards/polkadot-dashboards-network","path":"/docs/general/dune-analytics/polkadot-dashboards-network","sidebar":"docs"},{"id":"general/dune-analytics/polkadot-dashboards/polkadot-dashboards-overview","path":"/docs/general/dune-analytics/polkadot-dashboards-overview","sidebar":"docs"},{"id":"general/dune-analytics/polkadot-dashboards/polkadot-dashboards-staking","path":"/docs/general/dune-analytics/polkadot-dashboards-staking","sidebar":"docs"},{"id":"general/dune-analytics/polkadot-ecosystem-overview","path":"/docs/general/polkadot-ecosystem-overview","sidebar":"docs"},{"id":"general/dune-analytics/project-dashboards","path":"/docs/general/project-dashboards","sidebar":"docs"},{"id":"general/ecosystem-funds","path":"/docs/ecosystem-funds","sidebar":"docs"},{"id":"general/faq","path":"/docs/faq","sidebar":"docs"},{"id":"general/funding","path":"/docs/funding","sidebar":"docs"},{"id":"general/getting-started","path":"/docs/getting-started","sidebar":"docs"},{"id":"general/glossary","path":"/docs/glossary","sidebar":"docs"},{"id":"general/governance-apps","path":"/docs/governance-apps","sidebar":"docs"},{"id":"general/grants","path":"/docs/grants","sidebar":"docs"},{"id":"general/how-to-dyor","path":"/docs/how-to-dyor","sidebar":"docs"},{"id":"general/kusama/kusama-adversarial-cheatsheet","path":"/docs/kusama-adversarial-cheatsheet","sidebar":"docs"},{"id":"general/kusama/kusama-bug-bounty","path":"/docs/kusama-bug-bounty","sidebar":"docs"},{"id":"general/kusama/kusama-coc","path":"/docs/kusama-coc","sidebar":"docs"},{"id":"general/kusama/kusama-getting-started","path":"/docs/kusama-getting-started","sidebar":"docs"},{"id":"general/kusama/kusama-social-recovery","path":"/docs/kusama-social-recovery","sidebar":"docs"},{"id":"general/kusama/kusama-timeline","path":"/docs/kusama-timeline","sidebar":"docs"},{"id":"general/ledger","path":"/docs/ledger","sidebar":"docs"},{"id":"general/metadata","path":"/docs/metadata","sidebar":"docs"},{"id":"general/multisig-apps","path":"/docs/multisig-apps","sidebar":"docs"},{"id":"general/parachains-apps","path":"/docs/parachains-apps","sidebar":"docs"},{"id":"general/parity-data-dashboards","path":"/docs/parity-data-dashboards","sidebar":"docs"},{"id":"general/polkadot-community-foundation","path":"/docs/polkadot-community-foundation","sidebar":"docs"},{"id":"general/polkadot-direction","path":"/docs/polkadot-direction","sidebar":"docs"},{"id":"general/polkadot-v1","path":"/docs/polkadot-v1","sidebar":"docs"},{"id":"general/polkadot-vault","path":"/docs/polkadot-vault","sidebar":"docs"},{"id":"general/polkadotjs","path":"/docs/polkadotjs","sidebar":"docs"},{"id":"general/polkadotjs-ui","path":"/docs/polkadotjs-ui","sidebar":"docs"},{"id":"general/scams","path":"/docs/learn-scams","sidebar":"docs"},{"id":"general/staking-apps","path":"/docs/staking-apps","sidebar":"docs"},{"id":"general/staking-dashboard","path":"/docs/staking-dashboard","sidebar":"docs"},{"id":"general/start-building","path":"/docs/start-building","sidebar":"docs"},{"id":"general/transaction-attacks","path":"/docs/transaction-attacks","sidebar":"docs"},{"id":"general/wallets-and-extensions","path":"/docs/wallets-and-extensions","sidebar":"docs"},{"id":"general/web3-and-polkadot","path":"/docs/web3-and-polkadot","sidebar":"docs"},{"id":"learn/archive/learn-auction","path":"/docs/learn/learn-auction","sidebar":"docs"},{"id":"learn/archive/learn-controller","path":"/docs/learn/learn-controller","sidebar":"docs"},{"id":"learn/archive/learn-crowdloans","path":"/docs/learn/learn-crowdloans","sidebar":"docs"},{"id":"learn/archive/learn-governance","path":"/docs/learn/learn-governance","sidebar":"docs"},{"id":"learn/archive/learn-launch","path":"/docs/learn/learn-launch","sidebar":"docs"},{"id":"learn/archive/learn-redenomination","path":"/docs/learn/learn-redenomination","sidebar":"docs"},{"id":"learn/archive/learn-treasury","path":"/docs/learn/learn-treasury","sidebar":"docs"},{"id":"learn/learn-account-abstraction","path":"/docs/learn-account-abstraction","sidebar":"docs"},{"id":"learn/learn-account-advanced","path":"/docs/learn-account-advanced","sidebar":"docs"},{"id":"learn/learn-account-balances","path":"/docs/learn-account-balances","sidebar":"docs"},{"id":"learn/learn-account-multisig","path":"/docs/learn-account-multisig","sidebar":"docs"},{"id":"learn/learn-accounts","path":"/docs/learn-accounts","sidebar":"docs"},{"id":"learn/learn-agile-coretime","path":"/docs/learn-agile-coretime","sidebar":"docs"},{"id":"learn/learn-architecture","path":"/docs/learn-architecture","sidebar":"docs"},{"id":"learn/learn-archive","path":"/docs/learn-archive","sidebar":"docs"},{"id":"learn/learn-asset-conversion-assethub","path":"/docs/learn-asset-conversion-assethub","sidebar":"docs"},{"id":"learn/learn-assets","path":"/docs/learn-assets","sidebar":"docs"},{"id":"learn/learn-async-backing","path":"/docs/learn-async-backing","sidebar":"docs"},{"id":"learn/learn-bridges","path":"/docs/learn-bridges","sidebar":"docs"},{"id":"learn/learn-collator","path":"/docs/learn-collator","sidebar":"docs"},{"id":"learn/learn-comparisons","path":"/docs/learn-comparisons","sidebar":"docs"},{"id":"learn/learn-comparisons-avalanche","path":"/docs/learn-comparisons-avalanche","sidebar":"docs"},{"id":"learn/learn-comparisons-cosmos","path":"/docs/learn-comparisons-cosmos","sidebar":"docs"},{"id":"learn/learn-comparisons-ethereum-2","path":"/docs/learn-comparisons-ethereum-2","sidebar":"docs"},{"id":"learn/learn-comparisons-kusama","path":"/docs/learn-comparisons-kusama","sidebar":"docs"},{"id":"learn/learn-comparisons-rollups","path":"/docs/learn-comparisons-rollups","sidebar":"docs"},{"id":"learn/learn-consensus","path":"/docs/learn-consensus","sidebar":"docs"},{"id":"learn/learn-cryptography","path":"/docs/learn-cryptography","sidebar":"docs"},{"id":"learn/learn-DOT","path":"/docs/learn-DOT","sidebar":"docs"},{"id":"learn/learn-dot-ksm-bridge","path":"/docs/learn-dot-ksm-bridge","sidebar":"docs"},{"id":"learn/learn-elastic-scaling","path":"/docs/learn-elastic-scaling","sidebar":"docs"},{"id":"learn/learn-guides-accounts","path":"/docs/learn-guides-accounts","sidebar":"docs"},{"id":"learn/learn-guides-accounts-multisig","path":"/docs/learn-guides-accounts-multisig","sidebar":"docs"},{"id":"learn/learn-guides-accounts-proxy","path":"/docs/learn-guides-accounts-proxy","sidebar":"docs"},{"id":"learn/learn-guides-accounts-proxy-pure","path":"/docs/learn-guides-accounts-proxy-pure","sidebar":"docs"},{"id":"learn/learn-guides-asset-conversion","path":"/docs/learn-guides-asset-conversion","sidebar":"docs"},{"id":"learn/learn-guides-assets","path":"/docs/learn-guides-assets","sidebar":"docs"},{"id":"learn/learn-guides-assets-create","path":"/docs/learn-guides-assets-create","sidebar":"docs"},{"id":"learn/learn-guides-bounties","path":"/docs/learn-guides-bounties","sidebar":"docs"},{"id":"learn/learn-guides-bridges","path":"/docs/learn-guides-bridges","sidebar":"docs"},{"id":"learn/learn-guides-claims","path":"/docs/learn-guides-claims","sidebar":"docs"},{"id":"learn/learn-guides-coretime-marketplaces","path":"/docs/learn-guides-coretime-marketplaces","sidebar":"docs"},{"id":"learn/learn-guides-coretime-parachains","path":"/docs/learn-guides-coretime-parachains","sidebar":"docs"},{"id":"learn/learn-guides-coretime-swap","path":"/docs/learn-guides-coretime-swap","sidebar":"docs"},{"id":"learn/learn-guides-dot-ksm-bridge","path":"/docs/learn-guides-dot-ksm-bridge","sidebar":"docs"},{"id":"learn/learn-guides-identity","path":"/docs/learn-guides-identity","sidebar":"docs"},{"id":"learn/learn-guides-ledger","path":"/docs/learn-guides-ledger","sidebar":"docs"},{"id":"learn/learn-guides-nominator","path":"/docs/learn-guides-nominator","sidebar":"docs"},{"id":"learn/learn-guides-polkadot-opengov","path":"/docs/learn-guides-polkadot-opengov","sidebar":"docs"},{"id":"learn/learn-guides-staking","path":"/docs/learn-guides-staking","sidebar":"docs"},{"id":"learn/learn-guides-staking-pools","path":"/docs/learn-guides-staking-pools","sidebar":"docs"},{"id":"learn/learn-guides-transfers","path":"/docs/learn-guides-transfers","sidebar":"docs"},{"id":"learn/learn-guides-treasury","path":"/docs/learn-guides-treasury","sidebar":"docs"},{"id":"learn/learn-guides-vault","path":"/docs/learn-guides-vault","sidebar":"docs"},{"id":"learn/learn-hyperbridge","path":"/docs/learn-hyperbridge","sidebar":"docs"},{"id":"learn/learn-identity","path":"/docs/learn-identity","sidebar":"docs"},{"id":"learn/learn-implementations","path":"/docs/learn-implementations"},{"id":"learn/learn-inflation","path":"/docs/learn-inflation","sidebar":"docs"},{"id":"learn/learn-jam-chain","path":"/docs/learn-jam-chain","sidebar":"docs"},{"id":"learn/learn-jam-faq","path":"/docs/learn-jam-faq","sidebar":"docs"},{"id":"learn/learn-nft","path":"/docs/learn-nft","sidebar":"docs"},{"id":"learn/learn-nft-pallets","path":"/docs/learn-nft-pallets","sidebar":"docs"},{"id":"learn/learn-nft-projects","path":"/docs/learn-nft-projects","sidebar":"docs"},{"id":"learn/learn-nomination-pools","path":"/docs/learn-nomination-pools","sidebar":"docs"},{"id":"learn/learn-nominator","path":"/docs/learn-nominator","sidebar":"docs"},{"id":"learn/learn-offenses","path":"/docs/learn-offenses","sidebar":"docs"},{"id":"learn/learn-parachains","path":"/docs/learn-parachains","sidebar":"docs"},{"id":"learn/learn-parachains-faq","path":"/docs/learn-parachains-faq","sidebar":"docs"},{"id":"learn/learn-parachains-protocol","path":"/docs/learn-parachains-protocol","sidebar":"docs"},{"id":"learn/learn-phragmen","path":"/docs/learn-phragmen","sidebar":"docs"},{"id":"learn/learn-polkadot-host","path":"/docs/learn-polkadot-host","sidebar":"docs"},{"id":"learn/learn-polkadot-js-guides","path":"/docs/learn-polkadot-js-guides","sidebar":"docs"},{"id":"learn/learn-polkadot-opengov","path":"/docs/learn-polkadot-opengov","sidebar":"docs"},{"id":"learn/learn-polkadot-opengov-origins","path":"/docs/learn-polkadot-opengov-origins","sidebar":"docs"},{"id":"learn/learn-polkadot-opengov-treasury","path":"/docs/learn-polkadot-opengov-treasury","sidebar":"docs"},{"id":"learn/learn-polkadot-technical-fellowship","path":"/docs/learn-polkadot-technical-fellowship","sidebar":"docs"},{"id":"learn/learn-polkadotjs","path":"/docs/learn-polkadotjs","sidebar":"docs"},{"id":"learn/learn-proxies","path":"/docs/learn-proxies","sidebar":"docs"},{"id":"learn/learn-proxies-pure","path":"/docs/learn-proxies-pure","sidebar":"docs"},{"id":"learn/learn-runtime-upgrades","path":"/docs/learn-runtime-upgrades","sidebar":"docs"},{"id":"learn/learn-safrole","path":"/docs/learn-safrole","sidebar":"docs"},{"id":"learn/learn-snowbridge","path":"/docs/learn-snowbridge","sidebar":"docs"},{"id":"learn/learn-spree","path":"/docs/learn-spree","sidebar":"docs"},{"id":"learn/learn-staking","path":"/docs/learn-staking","sidebar":"docs"},{"id":"learn/learn-staking-advanced","path":"/docs/learn-staking-advanced","sidebar":"docs"},{"id":"learn/learn-system-chains","path":"/docs/learn-system-chains","sidebar":"docs"},{"id":"learn/learn-teleport","path":"/docs/learn-teleport","sidebar":"docs"},{"id":"learn/learn-transactions","path":"/docs/learn-transactions","sidebar":"docs"},{"id":"learn/learn-validator","path":"/docs/learn-validator","sidebar":"docs"},{"id":"learn/learn-video-tutorials","path":"/docs/learn-video-tutorials","sidebar":"docs"},{"id":"learn/learn-wasm","path":"/docs/learn-wasm","sidebar":"docs"},{"id":"learn/learn-xcm","path":"/docs/learn-xcm","sidebar":"docs"},{"id":"learn/learn-xcm-instructions","path":"/docs/learn-xcm-instructions","sidebar":"docs"},{"id":"learn/learn-xcm-pallet","path":"/docs/learn-xcm-pallet","sidebar":"docs"},{"id":"learn/learn-xcm-transport","path":"/docs/learn-xcm-transport","sidebar":"docs"},{"id":"learn/learn-xcm-usecases","path":"/docs/learn-xcm-usecases","sidebar":"docs"},{"id":"learn/learn-xcvm","path":"/docs/learn-xcvm","sidebar":"docs"},{"id":"learn/xcm/executor_config/learn-xcm-docs-config-deep-dive","path":"/docs/learn/xcm/config-deep-dive","sidebar":"docs"},{"id":"learn/xcm/fundamentals/learn-xcm-docs-fundamentals-fees","path":"/docs/learn/xcm/fundamentals-fees","sidebar":"docs"},{"id":"learn/xcm/fundamentals/learn-xcm-docs-fundamentals-multiasset","path":"/docs/learn/xcm/fundamentals-multiasset","sidebar":"docs"},{"id":"learn/xcm/fundamentals/learn-xcm-docs-fundamentals-summary","path":"/docs/learn/xcm/fundamentals-summary","sidebar":"docs"},{"id":"learn/xcm/fundamentals/learn-xcm-docs-fundamentals-xcvm","path":"/docs/learn/xcm/fundamentals-xcvm","sidebar":"docs"},{"id":"learn/xcm/fundamentals/multilocation/learn-xcm-docs-multilocation-example","path":"/docs/learn/xcm/fundamentals/multilocation-example","sidebar":"docs"},{"id":"learn/xcm/fundamentals/multilocation/learn-xcm-docs-multilocation-junctions","path":"/docs/learn/xcm/fundamentals/multilocation-junctions","sidebar":"docs"},{"id":"learn/xcm/fundamentals/multilocation/learn-xcm-docs-multilocation-summary","path":"/docs/learn/xcm/fundamentals/multilocation-summary","sidebar":"docs"},{"id":"learn/xcm/journey/learn-xcm-docs-journey-assets","path":"/docs/learn/xcm/journey-assets","sidebar":"docs"},{"id":"learn/xcm/journey/learn-xcm-docs-journey-channels","path":"/docs/learn/xcm/journey-channels","sidebar":"docs"},{"id":"learn/xcm/journey/learn-xcm-docs-journey-expectations","path":"/docs/learn/xcm/journey-expectations","sidebar":"docs"},{"id":"learn/xcm/journey/learn-xcm-docs-journey-fees","path":"/docs/learn/xcm/journey-fees","sidebar":"docs"},{"id":"learn/xcm/journey/learn-xcm-docs-journey-holding","path":"/docs/learn/xcm/journey-holding","sidebar":"docs"},{"id":"learn/xcm/journey/learn-xcm-docs-journey-origin","path":"/docs/learn/xcm/journey-origin","sidebar":"docs"},{"id":"learn/xcm/journey/learn-xcm-docs-journey-queries","path":"/docs/learn/xcm/journey-queries","sidebar":"docs"},{"id":"learn/xcm/journey/learn-xcm-docs-journey-register","path":"/docs/learn/xcm/journey-register","sidebar":"docs"},{"id":"learn/xcm/journey/learn-xcm-docs-journey-summary","path":"/docs/learn/xcm/journey-summary","sidebar":"docs"},{"id":"learn/xcm/journey/learn-xcm-docs-journey-transact","path":"/docs/learn/xcm/journey-transact","sidebar":"docs"},{"id":"learn/xcm/journey/learn-xcm-docs-journey-version","path":"/docs/learn/xcm/journey-version","sidebar":"docs"},{"id":"learn/xcm/journey/locks/learn-xcm-docs-journey-locks","path":"/docs/learn/xcm/journey-locks","sidebar":"docs"},{"id":"learn/xcm/journey/transfers/learn-xcm-docs-transfers-reserve","path":"/docs/learn/xcm/journey/transfers-reserve","sidebar":"docs"},{"id":"learn/xcm/journey/transfers/learn-xcm-docs-transfers-summary","path":"/docs/learn/xcm/journey/transfers-summary","sidebar":"docs"},{"id":"learn/xcm/journey/transfers/learn-xcm-docs-transfers-teleport","path":"/docs/learn/xcm/journey/transfers-teleport","sidebar":"docs"},{"id":"learn/xcm/learn-xcm-docs-intro","path":"/docs/learn/xcm/introduction","sidebar":"docs"},{"id":"learn/xcm/learn-xcm-docs-testing","path":"/docs/learn/xcm/testing","sidebar":"docs"},{"id":"learn/xcm/overview/learn-xcm-docs-overview-architecture","path":"/docs/learn/xcm/overview-architecture","sidebar":"docs"},{"id":"learn/xcm/overview/learn-xcm-docs-overview-format","path":"/docs/learn/xcm/overview-format","sidebar":"docs"},{"id":"learn/xcm/overview/learn-xcm-docs-overview-intro","path":"/docs/learn/xcm/overview-intro","sidebar":"docs"},{"id":"learn/xcm/overview/learn-xcm-docs-overview-summary","path":"/docs/learn/xcm/overview-summary","sidebar":"docs"},{"id":"learn/xcm/overview/learn-xcm-docs-overview-xcvm","path":"/docs/learn/xcm/overview-xcvm","sidebar":"docs"},{"id":"learn/xcm/quickstart/learn-xcm-docs-quickstart-first-look","path":"/docs/learn/xcm/quickstart-first-look","sidebar":"docs"},{"id":"learn/xcm/quickstart/learn-xcm-docs-quickstart-simulator","path":"/docs/learn/xcm/quickstart-simulator","sidebar":"docs"},{"id":"learn/xcm/quickstart/learn-xcm-docs-quickstart-summary","path":"/docs/learn/xcm/quickstart-summary","sidebar":"docs"},{"id":"learn/xcm/reference/learn-xcm-docs-reference-glossary","path":"/docs/learn/xcm/reference-glossary","sidebar":"docs"},{"id":"learn/xcm/reference/learn-xcm-docs-reference-xcvm-registers","path":"/docs/learn/xcm/reference-xcvm-registers","sidebar":"docs"},{"id":"maintain/archive/maintain-guides-democracy","path":"/docs/maintain/maintain-guides-democracy","sidebar":"docs"},{"id":"maintain/archive/maintain-guides-how-to-join-council","path":"/docs/maintain/maintain-guides-how-to-join-council","sidebar":"docs"},{"id":"maintain/archive/maintain-guides-how-to-vote-councillor","path":"/docs/maintain/maintain-guides-how-to-vote-councillor","sidebar":"docs"},{"id":"maintain/doc-maintain-guides-validator-community","path":"/docs/maintain-guides-validator-community","sidebar":"docs"},{"id":"maintain/kusama/maintain-guides-how-to-validate-kusama","path":"/docs/maintain-guides-how-to-validate-kusama","sidebar":"docs"},{"id":"maintain/kusama/maintain-guides-society-kusama","path":"/docs/maintain-guides-society-kusama","sidebar":"docs"},{"id":"maintain/maintain-archive","path":"/docs/maintain-archive","sidebar":"docs"},{"id":"maintain/maintain-bootnode","path":"/docs/maintain-bootnode","sidebar":"docs"},{"id":"maintain/maintain-endpoints","path":"/docs/maintain-endpoints","sidebar":"docs"},{"id":"maintain/maintain-errors","path":"/docs/maintain-errors","sidebar":"docs"},{"id":"maintain/maintain-guides-async-backing","path":"/docs/maintain-guides-async-backing","sidebar":"docs"},{"id":"maintain/maintain-guides-how-to-chill","path":"/docs/maintain-guides-how-to-chill","sidebar":"docs"},{"id":"maintain/maintain-guides-how-to-monitor-your-node","path":"/docs/maintain-guides-how-to-monitor-your-node","sidebar":"docs"},{"id":"maintain/maintain-guides-how-to-stop-validating","path":"/docs/maintain-guides-how-to-stop-validating","sidebar":"docs"},{"id":"maintain/maintain-guides-how-to-systemd","path":"/docs/maintain-guides-how-to-systemd","sidebar":"docs"},{"id":"maintain/maintain-guides-how-to-upgrade","path":"/docs/maintain-guides-how-to-upgrade","sidebar":"docs"},{"id":"maintain/maintain-guides-how-to-validate-polkadot","path":"/docs/maintain-guides-how-to-validate-polkadot","sidebar":"docs"},{"id":"maintain/maintain-guides-secure-validator","path":"/docs/maintain-guides-secure-validator","sidebar":"docs"},{"id":"maintain/maintain-guides-validator-payout","path":"/docs/maintain-guides-validator-payout","sidebar":"docs"},{"id":"maintain/maintain-index","path":"/docs/maintain-index","sidebar":"docs"},{"id":"maintain/maintain-networks","path":"/docs/maintain-networks","sidebar":"docs"},{"id":"maintain/maintain-polkadot-parameters","path":"/docs/maintain-polkadot-parameters","sidebar":"docs"},{"id":"maintain/maintain-rpc","path":"/docs/maintain-rpc","sidebar":"docs"},{"id":"maintain/maintain-sync","path":"/docs/maintain-sync","sidebar":"docs"},{"id":"maintain/maintain-wss","path":"/docs/maintain-wss","sidebar":"docs"},{"id":"/explore-index","path":"/docs/explore-index","sidebar":"docs"},{"id":"/wallets-index","path":"/docs/wallets-index","sidebar":"docs"},{"id":"/apps-index","path":"/docs/apps-index","sidebar":"docs"},{"id":"/dashboards-index","path":"/docs/dashboards-index","sidebar":"docs"},{"id":"general/dune-analytics","path":"/docs/general/dune-analytics","sidebar":"docs"},{"id":"general/dune-analytics/polkadot-dashboards","path":"/docs/general/dune-analytics/polkadot-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/parachain-dashboards","path":"/docs/general/dune-analytics/parachain-dashboards","sidebar":"docs"},{"id":"/community-index","path":"/docs/community-index","sidebar":"docs"},{"id":"/programs-index","path":"/docs/programs-index","sidebar":"docs"},{"id":"/learn-index","path":"/docs/learn-index","sidebar":"docs"},{"id":"/general-index","path":"/docs/general-index","sidebar":"docs"},{"id":"/polkadot-vision-index","path":"/docs/polkadot-vision-index","sidebar":"docs"},{"id":"/stay-safe-index","path":"/docs/stay-safe-index","sidebar":"docs"},{"id":"/learn-basics-index","path":"/docs/learn-basics-index","sidebar":"docs"},{"id":"/learn-staking-index","path":"/docs/learn-staking-index","sidebar":"docs"},{"id":"/learn-polkadot-opengov-index","path":"/docs/learn-polkadot-opengov-index","sidebar":"docs"},{"id":"/learn-assets-index","path":"/docs/learn-assets-index","sidebar":"docs"},{"id":"/learn-participants-index","path":"/docs/learn-participants-index","sidebar":"docs"},{"id":"/learn-components-index","path":"/docs/learn-components-index","sidebar":"docs"},{"id":"/learn-advanced-index","path":"/docs/learn-advanced-index","sidebar":"docs"},{"id":"/learn-parachains-index","path":"/docs/learn-parachains-index","sidebar":"docs"},{"id":"/learn-agile-coretime-index","path":"/docs/learn-agile-coretime-index","sidebar":"docs"},{"id":"/learn-xcm-index","path":"/docs/learn-xcm-index","sidebar":"docs"},{"id":"learn/xcm","path":"/docs/learn/xcm","sidebar":"docs"},{"id":"/learn/xcm/overview","path":"/docs/learn/xcm/overview","sidebar":"docs"},{"id":"/learn/xcm/quickstart","path":"/docs/learn/xcm/quickstart","sidebar":"docs"},{"id":"/learn/xcm/fundamentals","path":"/docs/learn/xcm/fundamentals","sidebar":"docs"},{"id":"/learn/xcm/fundamentals/multilocation","path":"/docs/learn/xcm/fundamentals/multilocation","sidebar":"docs"},{"id":"/learn/xcm/journey","path":"/docs/learn/xcm/journey","sidebar":"docs"},{"id":"/learn/xcm/journey/transfers","path":"/docs/learn/xcm/journey/transfers","sidebar":"docs"},{"id":"/learn/xcm/references","path":"/docs/learn/xcm/references","sidebar":"docs"},{"id":"/learn-comparisons-index","path":"/docs/learn-comparisons-index","sidebar":"docs"},{"id":"/learn-future-implementations-index","path":"/docs/learn-future-implementations-index","sidebar":"docs"},{"id":"/learn-jam","path":"/docs/learn-jam","sidebar":"docs"},{"id":"/build-client-index","path":"/docs/build-client-index","sidebar":"docs"},{"id":"/build-protocol-index","path":"/docs/build-protocol-index","sidebar":"docs"},{"id":"/build-archive-index","path":"/docs/build-archive-index","sidebar":"docs"},{"id":"/maintain-node-index","path":"/docs/maintain-node-index","sidebar":"docs"},{"id":"/maintain-collator-index","path":"/docs/maintain-collator-index","sidebar":"docs"},{"id":"/maintain-validator-index","path":"/docs/maintain-validator-index","sidebar":"docs"}],"draftIds":[],"sidebars":{"docs":{"link":{"path":"/docs/explore-index","label":"Explore"}}}}],"breadcrumbs":true}}}'),i=JSON.parse('{"defaultLocale":"en","locales":["en"],"path":"i18n","currentLocale":"en","localeConfigs":{"en":{"label":"English","direction":"ltr","htmlLang":"en","calendar":"gregory","path":"en"}}}');var s=n(59940);const c=JSON.parse('{"docusaurusVersion":"3.6.0","pluginVersions":{"docusaurus-plugin-content-docs":{"type":"package","name":"@docusaurus/plugin-content-docs","version":"3.6.0"},"docusaurus-plugin-content-blog":{"type":"package","name":"@docusaurus/plugin-content-blog","version":"3.6.0"},"docusaurus-plugin-content-pages":{"type":"package","name":"@docusaurus/plugin-content-pages","version":"3.6.0"},"docusaurus-plugin-sitemap":{"type":"package","name":"@docusaurus/plugin-sitemap","version":"3.6.0"},"docusaurus-theme-classic":{"type":"package","name":"@docusaurus/theme-classic","version":"3.6.0"},"docusaurus-theme-search-algolia":{"type":"package","name":"@docusaurus/theme-search-algolia","version":"3.6.0"},"docusaurus-plugin-client-redirects":{"type":"package","name":"@docusaurus/plugin-client-redirects","version":"3.6.0"},"docusaurus-theme-mermaid":{"type":"package","name":"@docusaurus/theme-mermaid","version":"3.6.0"}}}');var l=n(74848),u={siteConfig:a.default,siteMetadata:c,globalData:o,i18n:i,codeTranslations:s},d=r.createContext(u);function p(e){var t=e.children;return(0,l.jsx)(d.Provider,{value:u,children:t})}},67489:(e,t,n)=>{"use strict";n.d(t,{A:()=>b});var r=n(77387),a=n(96540),o=n(38193),i=n(5260),s=n(70440),c=n(96300),l=n(53102),u=n(74848);function d(e){var t=e.error,n=e.tryAgain;return(0,u.jsxs)("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"flex-start",minHeight:"100vh",width:"100%",maxWidth:"80ch",fontSize:"20px",margin:"0 auto",padding:"1rem"},children:[(0,u.jsx)("h1",{style:{fontSize:"3rem"},children:"This page crashed"}),(0,u.jsx)("button",{type:"button",onClick:n,style:{margin:"1rem 0",fontSize:"2rem",cursor:"pointer",borderRadius:20,padding:"1rem"},children:"Try again"}),(0,u.jsx)(p,{error:t})]})}function p(e){var t=e.error,n=(0,s.rA)(t).map((function(e){return e.message})).join("\n\nCause:\n");return(0,u.jsx)("p",{style:{whiteSpace:"pre-wrap"},children:n})}function f(e){var t=e.children;return(0,u.jsx)(l.W,{value:{plugin:{name:"docusaurus-core-error-boundary",id:"default"}},children:t})}function m(e){var t=e.error,n=e.tryAgain;return(0,u.jsx)(f,{children:(0,u.jsxs)(b,{fallback:function(){return(0,u.jsx)(d,{error:t,tryAgain:n})},children:[(0,u.jsx)(i.A,{children:(0,u.jsx)("title",{children:"Page Error"})}),(0,u.jsx)(c.A,{children:(0,u.jsx)(d,{error:t,tryAgain:n})})]})})}var h=function(e){return(0,u.jsx)(m,Object.assign({},e))},b=function(e){function t(t){var n;return(n=e.call(this,t)||this).state={error:null},n}(0,r.A)(t,e);var n=t.prototype;return n.componentDidCatch=function(e){o.A.canUseDOM&&this.setState({error:e})},n.render=function(){var e=this,t=this.props.children,n=this.state.error;if(n){var r,a={error:n,tryAgain:function(){return e.setState({error:null})}};return(null!=(r=this.props.fallback)?r:h)(a)}return null!=t?t:null},t}(a.Component)},38193:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r="undefined"!=typeof window&&"document"in window&&"createElement"in window.document;const a={canUseDOM:r,canUseEventListeners:r&&("addEventListener"in window||"attachEvent"in window),canUseIntersectionObserver:r&&"IntersectionObserver"in window,canUseViewport:r&&"screen"in window}},5260:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});n(96540);var r=n(80545),a=n(74848);function o(e){return(0,a.jsx)(r.mg,Object.assign({},e))}},28774:(e,t,n)=>{"use strict";n.d(t,{A:()=>h});var r=n(98587),a=n(96540),o=n(54625),i=n(70440),s=n(44586),c=n(16654),l=n(38193),u=n(63427),d=n(86025),p=n(74848),f=["isNavLink","to","href","activeClassName","isActive","data-noBrokenLinkCheck","autoAddBaseUrl"];function m(e,t){var n,m,h,b=e.isNavLink,g=e.to,y=e.href,v=e.activeClassName,x=e.isActive,w=e["data-noBrokenLinkCheck"],k=e.autoAddBaseUrl,_=void 0===k||k,S=(0,r.A)(e,f),E=(0,s.A)().siteConfig,j=E.trailingSlash,O=E.baseUrl,A=E.future.experimental_router,P=(0,d.hH)().withBaseUrl,C=(0,u.A)(),T=(0,a.useRef)(null);(0,a.useImperativeHandle)(t,(function(){return T.current}));var I=g||y;var N,L,R=(0,c.A)(I),D=null==I?void 0:I.replace("pathname://",""),M=void 0!==D?(N=D,_&&function(e){return e.startsWith("/")}(N)?P(N):N):void 0;"hash"===A&&null!=(n=M)&&n.startsWith("./")&&(M=null==(L=M)?void 0:L.slice(1));M&&R&&(M=(0,i.Ks)(M,{trailingSlash:j,baseUrl:O}));var F=(0,a.useRef)(!1),B=b?o.k2:o.N_,z=l.A.canUseIntersectionObserver,U=(0,a.useRef)(),$=function(){F.current||null==M||(window.docusaurus.preload(M),F.current=!0)};(0,a.useEffect)((function(){return!z&&R&&l.A.canUseDOM&&null!=M&&window.docusaurus.prefetch(M),function(){z&&U.current&&U.current.disconnect()}}),[U,M,z,R]);var q=null!=(m=null==(h=M)?void 0:h.startsWith("#"))&&m,H=!S.target||"_self"===S.target,V=!M||!R||!H||q&&"hash"!==A;w||!q&&V||C.collectLink(M),S.id&&C.collectAnchor(S.id);var W={};return V?(0,p.jsx)("a",Object.assign({ref:T,href:M},I&&!R&&{target:"_blank",rel:"noopener noreferrer"},S,W)):(0,p.jsx)(B,Object.assign({},S,{onMouseEnter:$,onTouchStart:$,innerRef:function(e){T.current=e,z&&e&&R&&(U.current=new window.IntersectionObserver((function(t){t.forEach((function(t){e===t.target&&(t.isIntersecting||t.intersectionRatio>0)&&(U.current.unobserve(e),U.current.disconnect(),null!=M&&window.docusaurus.prefetch(M))}))})),U.current.observe(e))},to:M},b&&{isActive:x,activeClassName:v},W))}const h=a.forwardRef(m)},21312:(e,t,n)=>{"use strict";n.d(t,{A:()=>l,T:()=>c});var r=n(96540),a=n(74848);function o(e,t){var n=e.split(/(\{\w+\})/).map((function(e,n){if(n%2==1){var r=null==t?void 0:t[e.slice(1,-1)];if(void 0!==r)return r}return e}));return n.some((function(e){return(0,r.isValidElement)(e)}))?n.map((function(e,t){return(0,r.isValidElement)(e)?r.cloneElement(e,{key:t}):e})).filter((function(e){return""!==e})):n.join("")}var i=n(59940);function s(e){var t,n,r=e.id,a=e.message;if(void 0===r&&void 0===a)throw new Error("Docusaurus translation declarations must have at least a translation id or a default translation message");return null!=(t=null!=(n=i[null!=r?r:a])?n:a)?t:r}function c(e,t){return o(s({message:e.message,id:e.id}),t)}function l(e){var t=e.children,n=e.id,r=e.values;if(t&&"string"!=typeof t)throw console.warn("Illegal children",t),new Error("The Docusaurus component only accept simple string values");var i=s({message:t,id:n});return(0,a.jsx)(a.Fragment,{children:o(i,r)})}},17065:(e,t,n)=>{"use strict";n.d(t,{W:()=>r});var r="default"},16654:(e,t,n)=>{"use strict";function r(e){return/^(?:\w*:|\/\/)/.test(e)}function a(e){return void 0!==e&&!r(e)}n.d(t,{A:()=>a,z:()=>r})},86025:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>s,hH:()=>i});var r=n(96540),a=n(44586),o=n(16654);function i(){var e=(0,a.A)().siteConfig,t=e.baseUrl,n=e.url,i=e.future.experimental_router,s=(0,r.useCallback)((function(e,r){return function(e){var t=e.siteUrl,n=e.baseUrl,r=e.url,a=e.options,i=void 0===a?{}:a,s=i.forcePrependBaseUrl,c=void 0!==s&&s,l=i.absolute,u=void 0!==l&&l,d=e.router;if(!r||r.startsWith("#")||(0,o.z)(r))return r;if("hash"===d)return r.startsWith("/")?"."+r:"./"+r;if(c)return n+r.replace(/^\//,"");if(r===n.replace(/\/$/,""))return n;var p=r.startsWith(n)?r:n+r.replace(/^\//,"");return u?t+p:p}({siteUrl:n,baseUrl:t,url:e,options:r,router:i})}),[n,t,i]);return{withBaseUrl:s}}function s(e,t){return void 0===t&&(t={}),(0,i().withBaseUrl)(e,t)}},63427:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(96540),a=(n(74848),r.createContext({collectAnchor:function(){},collectLink:function(){}})),o=function(){return(0,r.useContext)(a)};function i(){return o()}},44586:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(96540),a=n(73348);function o(){return(0,r.useContext)(a.o)}},92303:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(96540),a=n(6125);function o(){return(0,r.useContext)(a.o)}},205:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(96540);const a=n(38193).A.canUseDOM?r.useLayoutEffect:r.useEffect},86921:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=function(e){return"object"==typeof e&&!!e&&Object.keys(e).length>0};function a(e){var t={};return function e(n,a){Object.entries(n).forEach((function(n){var o=n[0],i=n[1],s=a?a+"."+o:o;r(i)?e(i,s):t[s]=i}))}(e),t}},53102:(e,t,n)=>{"use strict";n.d(t,{W:()=>i,o:()=>o});var r=n(96540),a=n(74848),o=r.createContext(null);function i(e){var t=e.children,n=e.value,i=r.useContext(o),s=(0,r.useMemo)((function(){return function(e){var t=e.parent,n=e.value;if(!t){if(!n)throw new Error("Unexpected: no Docusaurus route context found");if(!("plugin"in n))throw new Error("Unexpected: Docusaurus topmost route context has no `plugin` attribute");return n}var r=Object.assign({},t.data,null==n?void 0:n.data);return{plugin:t.plugin,data:r}}({parent:i,value:n})}),[i,n]);return(0,a.jsx)(o.Provider,{value:s,children:t})}},53886:(e,t,n)=>{"use strict";n.d(t,{VQ:()=>b,XK:()=>v,g1:()=>y});var r=n(96540),a=n(44070),o=n(17065),i=n(6342),s=n(75376),c=n(43807),l=n(74848),u=function(e){return"docs-preferred-version-"+e},d={save:function(e,t,n){(0,s.Wf)(u(e),{persistence:t}).set(n)},read:function(e,t){return(0,s.Wf)(u(e),{persistence:t}).get()},clear:function(e,t){(0,s.Wf)(u(e),{persistence:t}).del()}},p=function(e){return Object.fromEntries(e.map((function(e){return[e,{preferredVersionName:null}]})))};var f=r.createContext(null);function m(){var e=(0,a.Gy)(),t=(0,i.p)().docs.versionPersistence,n=(0,r.useMemo)((function(){return Object.keys(e)}),[e]),o=(0,r.useState)((function(){return p(n)})),s=o[0],c=o[1];return(0,r.useEffect)((function(){c(function(e){var t=e.pluginIds,n=e.versionPersistence,r=e.allDocsData;return Object.fromEntries(t.map((function(e){return[e,(t=e,a=d.read(t,n),r[t].versions.some((function(e){return e.name===a}))?{preferredVersionName:a}:(d.clear(t,n),{preferredVersionName:null}))];var t,a})))}({allDocsData:e,versionPersistence:t,pluginIds:n}))}),[e,t,n]),[s,(0,r.useMemo)((function(){return{savePreferredVersion:function(e,n){d.save(e,t,n),c((function(t){var r;return Object.assign({},t,((r={})[e]={preferredVersionName:n},r))}))}}}),[t])]}function h(e){var t=e.children,n=m();return(0,l.jsx)(f.Provider,{value:n,children:t})}function b(e){var t=e.children;return(0,l.jsx)(h,{children:t})}function g(){var e=(0,r.useContext)(f);if(!e)throw new c.dV("DocsPreferredVersionContextProvider");return e}function y(e){var t;void 0===e&&(e=o.W);var n=(0,a.ht)(e),i=g(),s=i[0],c=i[1],l=s[e].preferredVersionName;return{preferredVersion:null!=(t=n.versions.find((function(e){return e.name===l})))?t:null,savePreferredVersionName:(0,r.useCallback)((function(t){c.savePreferredVersion(e,t)}),[c,e])}}function v(){var e=(0,a.Gy)(),t=g()[0];var n=Object.keys(e);return Object.fromEntries(n.map((function(n){return[n,(r=n,o=e[r],i=t[r].preferredVersionName,null!=(a=o.versions.find((function(e){return e.name===i})))?a:null)];var r,a,o,i})))}},82565:(e,t,n)=>{"use strict";n.d(t,{k:()=>o,v:()=>i});var r=n(44070),a=n(53886);function o(e,t){return"docs-"+e+"-"+t}function i(){var e=(0,r.Gy)(),t=(0,r.gk)(),n=(0,a.XK)();return[].concat(Object.keys(e).map((function(r){var a,i=(null==t?void 0:t.activePlugin.pluginId)===r?t.activeVersion:void 0,s=n[r],c=e[r].versions.find((function(e){return e.isLast}));return o(r,(null!=(a=null!=i?i:s)?a:c).name)})))}},60609:(e,t,n)=>{"use strict";n.d(t,{V:()=>c,t:()=>l});var r=n(96540),a=n(43807),o=n(74848),i=Symbol("EmptyContext"),s=r.createContext(i);function c(e){var t=e.children,n=e.name,a=e.items,i=(0,r.useMemo)((function(){return n&&a?{name:n,items:a}:null}),[n,a]);return(0,o.jsx)(s.Provider,{value:i,children:t})}function l(){var e=(0,r.useContext)(s);if(e===i)throw new a.dV("DocsSidebarProvider");return e}},26972:(e,t,n)=>{"use strict";n.d(t,{$S:()=>h,B5:()=>j,Nr:()=>m,OF:()=>k,QB:()=>E,Vd:()=>_,Y:()=>x,cC:()=>f,d1:()=>O,fW:()=>S,w8:()=>y});var r=n(43845),a=n(96540),o=n(56347),i=n(22831),s=n(44070),c=n(99169),l=n(31682),u=n(53886),d=n(23025),p=n(60609);function f(e){var t=(0,d.r)();if(e){var n=t.docs[e];if(!n)throw new Error("no version doc found by id="+e);return n}}function m(e){return"link"!==e.type||e.unlisted?"category"===e.type?function(e){if(e.href&&!e.linkUnlisted)return e.href;for(var t,n=(0,r.A)(e.items);!(t=n()).done;){var a=m(t.value);if(a)return a}}(e):void 0:e.href}function h(){var e=(0,o.zy)().pathname,t=(0,p.t)();if(!t)throw new Error("Unexpected: cant find current sidebar in context");var n=w({sidebarItems:t.items,pathname:e,onlyCategories:!0}).slice(-1)[0];if(!n)throw new Error(e+" is not associated with a category. useCurrentSidebarCategory() should only be used on category index pages.");return n}var b=function(e,t){return void 0!==e&&(0,c.ys)(e,t)},g=function(e,t){return e.some((function(e){return y(e,t)}))};function y(e,t){return"link"===e.type?b(e.href,t):"category"===e.type&&(b(e.href,t)||g(e.items,t))}function v(e,t){switch(e.type){case"category":return y(e,t)||e.items.some((function(e){return v(e,t)}));case"link":return!e.unlisted||y(e,t);default:return!0}}function x(e,t){return(0,a.useMemo)((function(){return e.filter((function(e){return v(e,t)}))}),[e,t])}function w(e){var t=e.sidebarItems,n=e.pathname,a=e.onlyCategories,o=void 0!==a&&a,i=[];return function e(t){for(var a,s=(0,r.A)(t);!(a=s()).done;){var l=a.value;if("category"===l.type&&((0,c.ys)(l.href,n)||e(l.items))||"link"===l.type&&(0,c.ys)(l.href,n))return o&&"category"!==l.type||i.unshift(l),!0}return!1}(t),i}function k(){var e,t=(0,p.t)(),n=(0,o.zy)().pathname;return!1!==(null==(e=(0,s.vT)())?void 0:e.pluginData.breadcrumbs)&&t?w({sidebarItems:t.items,pathname:n}):null}function _(e){var t=(0,s.zK)(e).activeVersion,n=(0,u.g1)(e).preferredVersion,r=(0,s.r7)(e);return(0,a.useMemo)((function(){return(0,l.sb)([t,n,r].filter(Boolean))}),[t,n,r])}function S(e,t){var n=_(t);return(0,a.useMemo)((function(){var t=n.flatMap((function(e){return e.sidebars?Object.entries(e.sidebars):[]})),r=t.find((function(t){return t[0]===e}));if(!r)throw new Error("Can't find any sidebar with id \""+e+'" in version'+(n.length>1?"s":"")+" "+n.map((function(e){return e.name})).join(", ")+'".\nAvailable sidebar ids are:\n- '+t.map((function(e){return e[0]})).join("\n- "));return r[1]}),[e,n])}function E(e,t){var n=_(t);return(0,a.useMemo)((function(){var t=n.flatMap((function(e){return e.docs})),r=t.find((function(t){return t.id===e}));if(!r){if(n.flatMap((function(e){return e.draftIds})).includes(e))return null;throw new Error("Couldn't find any doc with id \""+e+'" in version'+(n.length>1?"s":"")+' "'+n.map((function(e){return e.name})).join(", ")+'".\nAvailable doc ids are:\n- '+(0,l.sb)(t.map((function(e){return e.id}))).join("\n- "))}return r}),[e,n])}function j(e){var t=e.route,n=(0,o.zy)(),r=(0,d.r)(),a=t.routes,s=a.find((function(e){return(0,o.B6)(n.pathname,e)}));if(!s)return null;var c=s.sidebar,l=c?r.docsSidebars[c]:void 0;return{docElement:(0,i.v)(a),sidebarName:c,sidebarItems:l}}function O(e){return e.filter((function(e){return!("category"===e.type||"link"===e.type)||!!m(e)}))}},23025:(e,t,n)=>{"use strict";n.d(t,{n:()=>s,r:()=>c});var r=n(96540),a=n(43807),o=n(74848),i=r.createContext(null);function s(e){var t=e.children,n=e.version;return(0,o.jsx)(i.Provider,{value:n,children:t})}function c(){var e=(0,r.useContext)(i);if(null===e)throw new a.dV("DocsVersionProvider");return e}},44070:(e,t,n)=>{"use strict";n.d(t,{zK:()=>g,vT:()=>f,gk:()=>m,Gy:()=>d,HW:()=>y,ht:()=>p,r7:()=>b,jh:()=>h});var r=n(56347),a=n(44586),o=n(17065);function i(e,t){void 0===t&&(t={});var n=(0,a.A)().globalData[e];if(!n&&t.failfast)throw new Error('Docusaurus plugin global data not found for "'+e+'" plugin.');return n}var s=function(e){return e.versions.find((function(e){return e.isLast}))};function c(e,t){return[].concat(e.versions).sort((function(e,t){return e.path===t.path?0:e.path.includes(t.path)?-1:t.path.includes(e.path)?1:0})).find((function(e){return!!(0,r.B6)(t,{path:e.path,exact:!1,strict:!1})}))}function l(e,t){var n,a,o=c(e,t),i=null==o?void 0:o.docs.find((function(e){return!!(0,r.B6)(t,{path:e.path,exact:!0,strict:!1})}));return{activeVersion:o,activeDoc:i,alternateDocVersions:i?(n=i.id,a={},e.versions.forEach((function(e){e.docs.forEach((function(t){t.id===n&&(a[e.name]=t)}))})),a):{}}}var u={},d=function(){var e;return null!=(e=i("docusaurus-plugin-content-docs"))?e:u},p=function(e){try{return function(e,t,n){void 0===t&&(t=o.W),void 0===n&&(n={});var r=i(e),a=null==r?void 0:r[t];if(!a&&n.failfast)throw new Error('Docusaurus plugin global data not found for "'+e+'" plugin with id "'+t+'".');return a}("docusaurus-plugin-content-docs",e,{failfast:!0})}catch(t){throw new Error("You are using a feature of the Docusaurus docs plugin, but this plugin does not seem to be enabled"+("Default"===e?"":" (pluginId="+e),{cause:t})}};function f(e){return void 0===e&&(e={}),function(e,t,n){void 0===n&&(n={});var a=Object.entries(e).sort((function(e,t){return t[1].path.localeCompare(e[1].path)})).find((function(e){var n=e[1];return!!(0,r.B6)(t,{path:n.path,exact:!1,strict:!1})})),o=a?{pluginId:a[0],pluginData:a[1]}:void 0;if(!o&&n.failfast)throw new Error("Can't find active docs plugin for \""+t+'" pathname, while it was expected to be found. Maybe you tried to use a docs feature that can only be used on a docs-related page? Existing docs plugin paths are: '+Object.values(e).map((function(e){return e.path})).join(", "));return o}(d(),(0,r.zy)().pathname,e)}function m(e){void 0===e&&(e={});var t=f(e),n=(0,r.zy)().pathname;if(t)return{activePlugin:t,activeVersion:c(t.pluginData,n)}}function h(e){return p(e).versions}function b(e){var t=p(e);return s(t)}function g(e){return l(p(e),(0,r.zy)().pathname)}function y(e){return function(e,t){var n=s(e);return{latestDocSuggestion:l(e,t).alternateDocVersions[n.name],latestVersionSuggestion:n}}(p(e),(0,r.zy)().pathname)}},76294:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(5947),a=n.n(r);a().configure({showSpinner:!1});const o={onRouteUpdate:function(e){var t=e.location,n=e.previousLocation;if(n&&t.pathname!==n.pathname){var r=window.setTimeout((function(){a().start()}),200);return function(){return window.clearTimeout(r)}}},onRouteDidUpdate:function(){a().done()}}},26134:(e,t,n)=>{"use strict";var r,a,o,i=n(71765),s=n(85290);r=i.My,a=s.default.themeConfig.prism.additionalLanguages,o=globalThis.Prism,globalThis.Prism=r,a.forEach((function(e){"php"===e&&n(19700),n(91830)("./prism-"+e)})),delete globalThis.Prism,void 0!==o&&(globalThis.Prism=r)},51107:(e,t,n)=>{"use strict";n.d(t,{A:()=>p});var r=n(98587),a=(n(96540),n(34164)),o=n(21312),i=n(6342),s=n(28774),c=n(63427);const l={anchorWithStickyNavbar:"anchorWithStickyNavbar_LWe7",anchorWithHideOnScrollNavbar:"anchorWithHideOnScrollNavbar_WYt5"};var u=n(74848),d=["as","id"];function p(e){var t=e.as,n=e.id,p=(0,r.A)(e,d),f=(0,c.A)(),m=(0,i.p)().navbar.hideOnScroll;if("h1"===t||!n)return(0,u.jsx)(t,Object.assign({},p,{id:void 0}));f.collectAnchor(n);var h=(0,o.T)({id:"theme.common.headingLinkTitle",message:"Direct link to {heading}",description:"Title for link to heading"},{heading:"string"==typeof p.children?p.children:n});return(0,u.jsxs)(t,Object.assign({},p,{className:(0,a.A)("anchor",m?l.anchorWithHideOnScrollNavbar:l.anchorWithStickyNavbar,p.className),id:n,children:[p.children,(0,u.jsx)(s.A,{className:"hash-link",to:"#"+n,"aria-label":h,title:h,children:"\u200b"})]}))}},43186:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});n(96540);const r={iconExternalLink:"iconExternalLink_nPIU"};var a=n(74848);function o(e){var t=e.width,n=void 0===t?13.5:t,o=e.height,i=void 0===o?13.5:o;return(0,a.jsx)("svg",{width:n,height:i,"aria-hidden":"true",viewBox:"0 0 24 24",className:r.iconExternalLink,children:(0,a.jsx)("path",{fill:"currentColor",d:"M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"})})}},96300:(e,t,n)=>{"use strict";n.d(t,{A:()=>Bt});var r=n(96540),a=n(34164),o=n(67489),i=n(69024),s=n(56347),c=n(21312),l=n(75062),u=n(74848),d="__docusaurus_skipToContent_fallback";function p(e){e.setAttribute("tabindex","-1"),e.focus(),e.removeAttribute("tabindex")}function f(){var e=(0,r.useRef)(null),t=(0,s.W6)().action,n=(0,r.useCallback)((function(e){e.preventDefault();var t,n=null!=(t=document.querySelector("main:first-of-type"))?t:document.getElementById(d);n&&p(n)}),[]);return(0,l.$)((function(n){var r=n.location;e.current&&!r.hash&&"PUSH"===t&&p(e.current)})),{containerRef:e,onClick:n}}var m=(0,c.T)({id:"theme.common.skipToMainContent",description:"The skip to content label used for accessibility, allowing to rapidly navigate to main content with keyboard tab/enter navigation",message:"Skip to main content"});function h(e){var t,n=null!=(t=e.children)?t:m,r=f(),a=r.containerRef,o=r.onClick;return(0,u.jsx)("div",{ref:a,role:"region","aria-label":m,children:(0,u.jsx)("a",Object.assign({},e,{href:"#"+d,onClick:o,children:n}))})}var b=n(17559),g=n(14090);const y={skipToContent:"skipToContent_fXgn"};function v(){return(0,u.jsx)(h,{className:y.skipToContent})}var x=n(6342),w=n(65041),k=n(98587),_=["width","height","color","strokeWidth","className"];function S(e){var t=e.width,n=void 0===t?21:t,r=e.height,a=void 0===r?21:r,o=e.color,i=void 0===o?"currentColor":o,s=e.strokeWidth,c=void 0===s?1.2:s,l=(e.className,(0,k.A)(e,_));return(0,u.jsx)("svg",Object.assign({viewBox:"0 0 15 15",width:n,height:a},l,{children:(0,u.jsx)("g",{stroke:i,strokeWidth:c,children:(0,u.jsx)("path",{d:"M.75.75l13.5 13.5M14.25.75L.75 14.25"})})}))}const E={closeButton:"closeButton_CVFx"};function j(e){return(0,u.jsx)("button",Object.assign({type:"button","aria-label":(0,c.T)({id:"theme.AnnouncementBar.closeButtonAriaLabel",message:"Close",description:"The ARIA label for close button of announcement bar"})},e,{className:(0,a.A)("clean-btn close",E.closeButton,e.className),children:(0,u.jsx)(S,{width:14,height:14,strokeWidth:3.1})}))}const O={content:"content_knG7"};function A(e){var t=(0,x.p)().announcementBar.content;return(0,u.jsx)("div",Object.assign({},e,{className:(0,a.A)(O.content,e.className),dangerouslySetInnerHTML:{__html:t}}))}const P={announcementBar:"announcementBar_mb4j",announcementBarPlaceholder:"announcementBarPlaceholder_vyr4",announcementBarClose:"announcementBarClose_gvF7",announcementBarContent:"announcementBarContent_xLdY"};function C(){var e=(0,x.p)().announcementBar,t=(0,w.M)(),n=t.isActive,r=t.close;if(!n)return null;var a=e.backgroundColor,o=e.textColor,i=e.isCloseable;return(0,u.jsxs)("div",{className:P.announcementBar,style:{backgroundColor:a,color:o},role:"banner",children:[i&&(0,u.jsx)("div",{className:P.announcementBarPlaceholder}),(0,u.jsx)(A,{className:P.announcementBarContent}),i&&(0,u.jsx)(j,{onClick:r,className:P.announcementBarClose})]})}var T=n(22069),I=n(23104);var N=n(43807),L=n(75600),R=r.createContext(null);function D(e){var t,n,a,o,i,s,c,l=e.children,d=(t=(0,T.M)(),n=(0,L.YL)(),a=(0,r.useState)(!1),o=a[0],i=a[1],s=null!==n.component,c=(0,N.ZC)(s),(0,r.useEffect)((function(){s&&!c&&i(!0)}),[s,c]),(0,r.useEffect)((function(){s?t.shown||i(!0):i(!1)}),[t.shown,s]),(0,r.useMemo)((function(){return[o,i]}),[o]));return(0,u.jsx)(R.Provider,{value:d,children:l})}function M(e){if(e.component){var t=e.component;return(0,u.jsx)(t,Object.assign({},e.props))}}function F(){var e=(0,r.useContext)(R);if(!e)throw new N.dV("NavbarSecondaryMenuDisplayProvider");var t=e[0],n=e[1],a=(0,r.useCallback)((function(){return n(!1)}),[n]),o=(0,L.YL)();return(0,r.useMemo)((function(){return{shown:t,hide:a,content:M(o)}}),[a,o,t])}function B(e){var t=e.header,n=e.primaryMenu,r=e.secondaryMenu,o=F().shown;return(0,u.jsxs)("div",{className:"navbar-sidebar",children:[t,(0,u.jsxs)("div",{className:(0,a.A)("navbar-sidebar__items",{"navbar-sidebar__items--show-secondary":o}),children:[(0,u.jsx)("div",{className:"navbar-sidebar__item menu",children:n}),(0,u.jsx)("div",{className:"navbar-sidebar__item menu",children:r})]})]})}var z=n(95293),U=n(92303);function $(e){return(0,u.jsx)("svg",Object.assign({viewBox:"0 0 24 24",width:24,height:24},e,{children:(0,u.jsx)("path",{fill:"currentColor",d:"M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"})}))}function q(e){return(0,u.jsx)("svg",Object.assign({viewBox:"0 0 24 24",width:24,height:24},e,{children:(0,u.jsx)("path",{fill:"currentColor",d:"M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"})}))}const H={toggle:"toggle_vylO",toggleButton:"toggleButton_gllP",darkToggleIcon:"darkToggleIcon_wfgR",lightToggleIcon:"lightToggleIcon_pyhR",toggleButtonDisabled:"toggleButtonDisabled_aARS"};function V(e){var t=e.className,n=e.buttonClassName,r=e.value,o=e.onChange,i=(0,U.A)(),s=(0,c.T)({message:"Switch between dark and light mode (currently {mode})",id:"theme.colorToggle.ariaLabel",description:"The ARIA label for the navbar color mode toggle"},{mode:"dark"===r?(0,c.T)({message:"dark mode",id:"theme.colorToggle.ariaLabel.mode.dark",description:"The name for the dark color mode"}):(0,c.T)({message:"light mode",id:"theme.colorToggle.ariaLabel.mode.light",description:"The name for the light color mode"})});return(0,u.jsx)("div",{className:(0,a.A)(H.toggle,t),children:(0,u.jsxs)("button",{className:(0,a.A)("clean-btn",H.toggleButton,!i&&H.toggleButtonDisabled,n),type:"button",onClick:function(){return o("dark"===r?"light":"dark")},disabled:!i,title:s,"aria-label":s,"aria-live":"polite","aria-pressed":"dark"===r?"true":"false",children:[(0,u.jsx)($,{className:(0,a.A)(H.toggleIcon,H.lightToggleIcon)}),(0,u.jsx)(q,{className:(0,a.A)(H.toggleIcon,H.darkToggleIcon)})]})})}const W=r.memo(V),K={darkNavbarColorModeToggle:"darkNavbarColorModeToggle_X3D1"};function G(e){var t=e.className,n=(0,x.p)().navbar.style,r=(0,x.p)().colorMode.disableSwitch,a=(0,z.G)(),o=a.colorMode,i=a.setColorMode;return r?null:(0,u.jsx)(W,{className:t,buttonClassName:"dark"===n?K.darkNavbarColorModeToggle:void 0,value:o,onChange:i})}var Q=n(39529);function Y(){return(0,u.jsx)(Q.A,{className:"navbar__brand",imageClassName:"navbar__logo",titleClassName:"navbar__title text--truncate"})}function Z(){var e=(0,T.M)();return(0,u.jsx)("button",{type:"button","aria-label":(0,c.T)({id:"theme.docs.sidebar.closeSidebarButtonAriaLabel",message:"Close navigation bar",description:"The ARIA label for close button of mobile sidebar"}),className:"clean-btn navbar-sidebar__close",onClick:function(){return e.toggle()},children:(0,u.jsx)(S,{color:"var(--ifm-color-emphasis-600)"})})}function X(){return(0,u.jsxs)("div",{className:"navbar-sidebar__brand",children:[(0,u.jsx)(Y,{}),(0,u.jsx)(G,{className:"margin-right--md"}),(0,u.jsx)(Z,{})]})}var J=n(28774),ee=n(86025),te=n(16654),ne=n(91252),re=n(43186),ae=["activeBasePath","activeBaseRegex","to","href","label","html","isDropdownLink","prependBaseUrlToHref"];function oe(e){var t=e.activeBasePath,n=e.activeBaseRegex,r=e.to,a=e.href,o=e.label,i=e.html,s=e.isDropdownLink,c=e.prependBaseUrlToHref,l=(0,k.A)(e,ae),d=(0,ee.Ay)(r),p=(0,ee.Ay)(t),f=(0,ee.Ay)(a,{forcePrependBaseUrl:!0}),m=o&&a&&!(0,te.A)(a),h=i?{dangerouslySetInnerHTML:{__html:i}}:{children:(0,u.jsxs)(u.Fragment,{children:[o,m&&(0,u.jsx)(re.A,Object.assign({},s&&{width:12,height:12}))]})};return a?(0,u.jsx)(J.A,Object.assign({href:c?f:a},l,h)):(0,u.jsx)(J.A,Object.assign({to:d,isNavLink:!0},(t||n)&&{isActive:function(e,t){return n?(0,ne.G)(n,t.pathname):t.pathname.startsWith(p)}},l,h))}var ie=["className","isDropdownItem"],se=["className","isDropdownItem"],ce=["mobile","position"];function le(e){var t=e.className,n=e.isDropdownItem,r=void 0!==n&&n,o=(0,k.A)(e,ie),i=(0,u.jsx)(oe,Object.assign({className:(0,a.A)(r?"dropdown__link":"navbar__item navbar__link",t),isDropdownLink:r},o));return r?(0,u.jsx)("li",{children:i}):i}function ue(e){var t=e.className,n=(e.isDropdownItem,(0,k.A)(e,se));return(0,u.jsx)("li",{className:"menu__list-item",children:(0,u.jsx)(oe,Object.assign({className:(0,a.A)("menu__link",t)},n))})}function de(e){var t,n=e.mobile,r=void 0!==n&&n,a=(e.position,(0,k.A)(e,ce)),o=r?ue:le;return(0,u.jsx)(o,Object.assign({},a,{activeClassName:null!=(t=a.activeClassName)?t:r?"menu__link--active":"navbar__link--active"}))}var pe=n(41422),fe=n(99169),me=n(44586);const he="dropdownNavbarItemMobile_S0Fm";var be=["items","position","className","onClick"],ge=["items","className","position","onClick"],ye=["mobile"];function ve(e,t){return e.some((function(e){return function(e,t){return!!(0,fe.ys)(e.to,t)||!!(0,ne.G)(e.activeBaseRegex,t)||!(!e.activeBasePath||!t.startsWith(e.activeBasePath))}(e,t)}))}function xe(e){var t,n=e.items,o=e.position,i=e.className,s=(e.onClick,(0,k.A)(e,be)),c=(0,r.useRef)(null),l=(0,r.useState)(!1),d=l[0],p=l[1];return(0,r.useEffect)((function(){var e=function(e){c.current&&!c.current.contains(e.target)&&p(!1)};return document.addEventListener("mousedown",e),document.addEventListener("touchstart",e),document.addEventListener("focusin",e),function(){document.removeEventListener("mousedown",e),document.removeEventListener("touchstart",e),document.removeEventListener("focusin",e)}}),[c]),(0,u.jsxs)("div",{ref:c,className:(0,a.A)("navbar__item","dropdown","dropdown--hoverable",{"dropdown--right":"right"===o,"dropdown--show":d}),children:[(0,u.jsx)(oe,Object.assign({"aria-haspopup":"true","aria-expanded":d,role:"button",href:s.to?void 0:"#",className:(0,a.A)("navbar__link",i)},s,{onClick:s.to?void 0:function(e){return e.preventDefault()},onKeyDown:function(e){"Enter"===e.key&&(e.preventDefault(),p(!d))},children:null!=(t=s.children)?t:s.label})),(0,u.jsx)("ul",{className:"dropdown__menu",children:n.map((function(e,t){return(0,r.createElement)(tt,Object.assign({isDropdownItem:!0,activeClassName:"dropdown__link--active"},e,{key:t}))}))})]})}function we(e){var t,n,o=e.items,i=e.className,c=(e.position,e.onClick),l=(0,k.A)(e,ge),d=(n=(0,me.A)().siteConfig.baseUrl,(0,s.zy)().pathname.replace(n,"/")),p=ve(o,d),f=(0,pe.u)({initialState:function(){return!p}}),m=f.collapsed,h=f.toggleCollapsed,b=f.setCollapsed;return(0,r.useEffect)((function(){p&&b(!p)}),[d,p,b]),(0,u.jsxs)("li",{className:(0,a.A)("menu__list-item",{"menu__list-item--collapsed":m}),children:[(0,u.jsx)(oe,Object.assign({role:"button",className:(0,a.A)(he,"menu__link menu__link--sublist menu__link--sublist-caret",i)},l,{onClick:function(e){e.preventDefault(),h()},children:null!=(t=l.children)?t:l.label})),(0,u.jsx)(pe.N,{lazy:!0,as:"ul",className:"menu__list",collapsed:m,children:o.map((function(e,t){return(0,r.createElement)(tt,Object.assign({mobile:!0,isDropdownItem:!0,onClick:c,activeClassName:"menu__link--active"},e,{key:t}))}))})]})}function ke(e){var t=e.mobile,n=void 0!==t&&t,r=(0,k.A)(e,ye),a=n?we:xe;return(0,u.jsx)(a,Object.assign({},r))}var _e=n(32131),Se=["width","height"];function Ee(e){var t=e.width,n=void 0===t?20:t,r=e.height,a=void 0===r?20:r,o=(0,k.A)(e,Se);return(0,u.jsx)("svg",Object.assign({viewBox:"0 0 24 24",width:n,height:a,"aria-hidden":!0},o,{children:(0,u.jsx)("path",{fill:"currentColor",d:"M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z"})}))}const je="iconLanguage_nlXk";var Oe=["mobile","dropdownItemsBefore","dropdownItemsAfter","queryString"];var Ae=n(40961),Pe=n(55600),Ce=n(5260),Te=n(24255),Ie=n(51062),Ne=n(2967),Le=n(82565);function Re(){var e;return["language:"+(0,me.A)().i18n.currentLocale,(e=(0,Le.v)(),[Ne.C].concat(e)).map((function(e){return"docusaurus_tag:"+e}))]}const De={button:{buttonText:(0,c.T)({id:"theme.SearchBar.label",message:"Search",description:"The ARIA label and placeholder for search button"}),buttonAriaLabel:(0,c.T)({id:"theme.SearchBar.label",message:"Search",description:"The ARIA label and placeholder for search button"})},modal:{searchBox:{resetButtonTitle:(0,c.T)({id:"theme.SearchModal.searchBox.resetButtonTitle",message:"Clear the query",description:"The label and ARIA label for search box reset button"}),resetButtonAriaLabel:(0,c.T)({id:"theme.SearchModal.searchBox.resetButtonTitle",message:"Clear the query",description:"The label and ARIA label for search box reset button"}),cancelButtonText:(0,c.T)({id:"theme.SearchModal.searchBox.cancelButtonText",message:"Cancel",description:"The label and ARIA label for search box cancel button"}),cancelButtonAriaLabel:(0,c.T)({id:"theme.SearchModal.searchBox.cancelButtonText",message:"Cancel",description:"The label and ARIA label for search box cancel button"})},startScreen:{recentSearchesTitle:(0,c.T)({id:"theme.SearchModal.startScreen.recentSearchesTitle",message:"Recent",description:"The title for recent searches"}),noRecentSearchesText:(0,c.T)({id:"theme.SearchModal.startScreen.noRecentSearchesText",message:"No recent searches",description:"The text when no recent searches"}),saveRecentSearchButtonTitle:(0,c.T)({id:"theme.SearchModal.startScreen.saveRecentSearchButtonTitle",message:"Save this search",description:"The label for save recent search button"}),removeRecentSearchButtonTitle:(0,c.T)({id:"theme.SearchModal.startScreen.removeRecentSearchButtonTitle",message:"Remove this search from history",description:"The label for remove recent search button"}),favoriteSearchesTitle:(0,c.T)({id:"theme.SearchModal.startScreen.favoriteSearchesTitle",message:"Favorite",description:"The title for favorite searches"}),removeFavoriteSearchButtonTitle:(0,c.T)({id:"theme.SearchModal.startScreen.removeFavoriteSearchButtonTitle",message:"Remove this search from favorites",description:"The label for remove favorite search button"})},errorScreen:{titleText:(0,c.T)({id:"theme.SearchModal.errorScreen.titleText",message:"Unable to fetch results",description:"The title for error screen of search modal"}),helpText:(0,c.T)({id:"theme.SearchModal.errorScreen.helpText",message:"You might want to check your network connection.",description:"The help text for error screen of search modal"})},footer:{selectText:(0,c.T)({id:"theme.SearchModal.footer.selectText",message:"to select",description:"The explanatory text of the action for the enter key"}),selectKeyAriaLabel:(0,c.T)({id:"theme.SearchModal.footer.selectKeyAriaLabel",message:"Enter key",description:"The ARIA label for the Enter key button that makes the selection"}),navigateText:(0,c.T)({id:"theme.SearchModal.footer.navigateText",message:"to navigate",description:"The explanatory text of the action for the Arrow up and Arrow down key"}),navigateUpKeyAriaLabel:(0,c.T)({id:"theme.SearchModal.footer.navigateUpKeyAriaLabel",message:"Arrow up",description:"The ARIA label for the Arrow up key button that makes the navigation"}),navigateDownKeyAriaLabel:(0,c.T)({id:"theme.SearchModal.footer.navigateDownKeyAriaLabel",message:"Arrow down",description:"The ARIA label for the Arrow down key button that makes the navigation"}),closeText:(0,c.T)({id:"theme.SearchModal.footer.closeText",message:"to close",description:"The explanatory text of the action for Escape key"}),closeKeyAriaLabel:(0,c.T)({id:"theme.SearchModal.footer.closeKeyAriaLabel",message:"Escape key",description:"The ARIA label for the Escape key button that close the modal"}),searchByText:(0,c.T)({id:"theme.SearchModal.footer.searchByText",message:"Search by",description:"The text explain that the search is making by Algolia"})},noResultsScreen:{noResultsText:(0,c.T)({id:"theme.SearchModal.noResultsScreen.noResultsText",message:"No results for",description:"The text explains that there are no results for the following search"}),suggestedQueryText:(0,c.T)({id:"theme.SearchModal.noResultsScreen.suggestedQueryText",message:"Try searching for",description:"The text for the suggested query when no results are found for the following search"}),reportMissingResultsText:(0,c.T)({id:"theme.SearchModal.noResultsScreen.reportMissingResultsText",message:"Believe this query should return results?",description:"The text for the question where the user thinks there are missing results"}),reportMissingResultsLinkText:(0,c.T)({id:"theme.SearchModal.noResultsScreen.reportMissingResultsLinkText",message:"Let us know.",description:"The text for the link to report missing results"})}},placeholder:(0,c.T)({id:"theme.SearchModal.placeholder",message:"Search docs",description:"The placeholder of the input of the DocSearch pop-up modal"})};var Me=["contextualSearch","externalUrlRegex"],Fe=null;function Be(e){var t=e.hit,n=e.children;return(0,u.jsx)(J.A,{to:t.url,children:n})}function ze(e){var t=e.state,n=e.onClose,r=(0,Te.w)();return(0,u.jsx)(J.A,{to:r(t.query),onClick:n,children:(0,u.jsx)(c.A,{id:"theme.SearchBar.seeAll",values:{count:t.context.nbHits},children:"See all {count} results"})})}function Ue(e){var t,a,o,i,c=e.contextualSearch,l=e.externalUrlRegex,d=(0,k.A)(e,Me),p=(0,me.A)().siteMetadata,f=(0,Ie.C)(),m=Re(),h=null!=(t=null==(a=d.searchParameters)?void 0:a.facetFilters)?t:[],b=c?(o=h,[].concat((i=function(e){return"string"==typeof e?[e]:e})(m),i(o))):h,g=Object.assign({},d.searchParameters,{facetFilters:b}),y=(0,s.W6)(),v=(0,r.useRef)(null),x=(0,r.useRef)(null),w=(0,r.useState)(!1),_=w[0],S=w[1],E=(0,r.useState)(void 0),j=E[0],O=E[1],A=(0,r.useCallback)((function(){return Fe?Promise.resolve():Promise.all([n.e(8158).then(n.bind(n,48158)),Promise.all([n.e(1869),n.e(8913)]).then(n.bind(n,58913)),Promise.all([n.e(1869),n.e(416)]).then(n.bind(n,90416))]).then((function(e){var t=e[0].DocSearchModal;Fe=t}))}),[]),P=(0,r.useCallback)((function(){if(!v.current){var e=document.createElement("div");v.current=e,document.body.insertBefore(e,document.body.firstChild)}}),[]),C=(0,r.useCallback)((function(){P(),A().then((function(){return S(!0)}))}),[A,P]),T=(0,r.useCallback)((function(){var e;S(!1),null==(e=x.current)||e.focus()}),[]),I=(0,r.useCallback)((function(e){"f"===e.key&&(e.metaKey||e.ctrlKey)||(e.preventDefault(),O(e.key),C())}),[C]),N=(0,r.useRef)({navigate:function(e){var t=e.itemUrl;(0,ne.G)(l,t)?window.location.href=t:y.push(t)}}).current,L=(0,r.useRef)((function(e){return d.transformItems?d.transformItems(e):e.map((function(e){return Object.assign({},e,{url:f(e.url)})}))})).current,R=(0,r.useMemo)((function(){return function(e){return(0,u.jsx)(ze,Object.assign({},e,{onClose:T}))}}),[T]),D=(0,r.useCallback)((function(e){return e.addAlgoliaAgent("docusaurus",p.docusaurusVersion),e}),[p.docusaurusVersion]);return(0,Pe.E8)({isOpen:_,onOpen:C,onClose:T,onInput:I,searchButtonRef:x}),(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(Ce.A,{children:(0,u.jsx)("link",{rel:"preconnect",href:"https://"+d.appId+"-dsn.algolia.net",crossOrigin:"anonymous"})}),(0,u.jsx)(Pe.Bc,{onTouchStart:A,onFocus:A,onMouseOver:A,onClick:C,ref:x,translations:De.button}),_&&Fe&&v.current&&(0,Ae.createPortal)((0,u.jsx)(Fe,Object.assign({onClose:T,initialScrollY:window.scrollY,initialQuery:j,navigator:N,transformItems:L,hitComponent:Be,transformSearchClient:D},d.searchPagePath&&{resultsFooterComponent:R},d,{searchParameters:g,placeholder:De.placeholder,translations:De.modal})),v.current)]})}function $e(){var e=(0,me.A)().siteConfig;return(0,u.jsx)(Ue,Object.assign({},e.themeConfig.algolia))}const qe={navbarSearchContainer:"navbarSearchContainer_Bca1"};function He(e){var t=e.children,n=e.className;return(0,u.jsx)("div",{className:(0,a.A)(n,qe.navbarSearchContainer),children:t})}var Ve=n(44070),We=n(26972),Ke=["docId","label","docsPluginId"];var Ge=["sidebarId","label","docsPluginId"];var Qe=["label","to","docsPluginId"];var Ye=n(53886),Ze=["mobile","docsPluginId","dropdownActiveClassDisabled","dropdownItemsBefore","dropdownItemsAfter"];function Xe(e,t){var n;return null!=(n=t.alternateDocVersions[e.name])?n:function(e){return e.docs.find((function(t){return t.id===e.mainDocId}))}(e)}const Je={default:de,localeDropdown:function(e){var t=e.mobile,n=e.dropdownItemsBefore,r=e.dropdownItemsAfter,a=e.queryString,o=void 0===a?"":a,i=(0,k.A)(e,Oe),l=(0,me.A)().i18n,d=l.currentLocale,p=l.locales,f=l.localeConfigs,m=(0,_e.o)(),h=(0,s.zy)(),b=h.search,g=h.hash,y=p.map((function(e){var n=""+("pathname://"+m.createUrl({locale:e,fullyQualified:!1}))+b+g+o;return{label:f[e].label,lang:f[e].htmlLang,to:n,target:"_self",autoAddBaseUrl:!1,className:e===d?t?"menu__link--active":"dropdown__link--active":""}})),v=[].concat(n,y,r),x=t?(0,c.T)({message:"Languages",id:"theme.navbar.mobileLanguageDropdown.label",description:"The label for the mobile language switcher dropdown"}):f[d].label;return(0,u.jsx)(ke,Object.assign({},i,{mobile:t,label:(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(Ee,{className:je}),x]}),items:v}))},search:function(e){var t=e.mobile,n=e.className;return t?null:(0,u.jsx)(He,{className:n,children:(0,u.jsx)($e,{})})},dropdown:ke,html:function(e){var t=e.value,n=e.className,r=e.mobile,o=void 0!==r&&r,i=e.isDropdownItem,s=void 0!==i&&i,c=s?"li":"div";return(0,u.jsx)(c,{className:(0,a.A)({navbar__item:!o&&!s,"menu__list-item":o},n),dangerouslySetInnerHTML:{__html:t}})},doc:function(e){var t=e.docId,n=e.label,r=e.docsPluginId,a=(0,k.A)(e,Ke),o=(0,Ve.zK)(r).activeDoc,i=(0,We.QB)(t,r),s=(null==o?void 0:o.path)===(null==i?void 0:i.path);return null===i||i.unlisted&&!s?null:(0,u.jsx)(de,Object.assign({exact:!0},a,{isActive:function(){return s||!(null==o||!o.sidebar)&&o.sidebar===i.sidebar},label:null!=n?n:i.id,to:i.path}))},docSidebar:function(e){var t=e.sidebarId,n=e.label,r=e.docsPluginId,a=(0,k.A)(e,Ge),o=(0,Ve.zK)(r).activeDoc,i=(0,We.fW)(t,r).link;if(!i)throw new Error('DocSidebarNavbarItem: Sidebar with ID "'+t+"\" doesn't have anything to be linked to.");return(0,u.jsx)(de,Object.assign({exact:!0},a,{isActive:function(){return(null==o?void 0:o.sidebar)===t},label:null!=n?n:i.label,to:i.path}))},docsVersion:function(e){var t=e.label,n=e.to,r=e.docsPluginId,a=(0,k.A)(e,Qe),o=(0,We.Vd)(r)[0],i=null!=t?t:o.label,s=null!=n?n:function(e){return e.docs.find((function(t){return t.id===e.mainDocId}))}(o).path;return(0,u.jsx)(de,Object.assign({},a,{label:i,to:s}))},docsVersionDropdown:function(e){var t=e.mobile,n=e.docsPluginId,r=e.dropdownActiveClassDisabled,a=e.dropdownItemsBefore,o=e.dropdownItemsAfter,i=(0,k.A)(e,Ze),l=(0,s.zy)(),d=l.search,p=l.hash,f=(0,Ve.zK)(n),m=(0,Ve.jh)(n),h=(0,Ye.g1)(n).savePreferredVersionName,b=[].concat(a,m.map((function(e){var t=Xe(e,f);return{label:e.label,to:""+t.path+d+p,isActive:function(){return e===f.activeVersion},onClick:function(){return h(e.name)}}})),o),g=(0,We.Vd)(n)[0],y=t&&b.length>1?(0,c.T)({id:"theme.navbar.mobileVersionsDropdown.label",message:"Versions",description:"The label for the navbar versions dropdown on mobile view"}):g.label,v=t&&b.length>1?void 0:Xe(g,f).path;return b.length<=1?(0,u.jsx)(de,Object.assign({},i,{mobile:t,label:y,to:v,isActive:r?function(){return!1}:void 0})):(0,u.jsx)(ke,Object.assign({},i,{mobile:t,label:y,to:v,items:b,isActive:r?function(){return!1}:void 0}))}};var et=["type"];function tt(e){var t=e.type,n=(0,k.A)(e,et),r=function(e,t){return e&&"default"!==e?e:"items"in t?"dropdown":"default"}(t,n),a=Je[r];if(!a)throw new Error('No NavbarItem component found for type "'+t+'".');return(0,u.jsx)(a,Object.assign({},n))}function nt(){var e=(0,T.M)(),t=(0,x.p)().navbar.items;return(0,u.jsx)("ul",{className:"menu__list",children:t.map((function(t,n){return(0,r.createElement)(tt,Object.assign({mobile:!0},t,{onClick:function(){return e.toggle()},key:n}))}))})}function rt(e){return(0,u.jsx)("button",Object.assign({},e,{type:"button",className:"clean-btn navbar-sidebar__back",children:(0,u.jsx)(c.A,{id:"theme.navbar.mobileSidebarSecondaryMenu.backButtonLabel",description:"The label of the back button to return to main menu, inside the mobile navbar sidebar secondary menu (notably used to display the docs sidebar)",children:"\u2190 Back to main menu"})}))}function at(){var e=0===(0,x.p)().navbar.items.length,t=F();return(0,u.jsxs)(u.Fragment,{children:[!e&&(0,u.jsx)(rt,{onClick:function(){return t.hide()}}),t.content]})}function ot(){var e,t=(0,T.M)();return void 0===(e=t.shown)&&(e=!0),(0,r.useEffect)((function(){return document.body.style.overflow=e?"hidden":"visible",function(){document.body.style.overflow="visible"}}),[e]),t.shouldRender?(0,u.jsx)(B,{header:(0,u.jsx)(X,{}),primaryMenu:(0,u.jsx)(nt,{}),secondaryMenu:(0,u.jsx)(at,{})}):null}const it={navbarHideable:"navbarHideable_m1mJ",navbarHidden:"navbarHidden_jGov"};function st(e){return(0,u.jsx)("div",Object.assign({role:"presentation"},e,{className:(0,a.A)("navbar-sidebar__backdrop",e.className)}))}function ct(e){var t=e.children,n=(0,x.p)().navbar,o=n.hideOnScroll,i=n.style,s=(0,T.M)(),d=function(e){var t=(0,r.useState)(e),n=t[0],a=t[1],o=(0,r.useRef)(!1),i=(0,r.useRef)(0),s=(0,r.useCallback)((function(e){null!==e&&(i.current=e.getBoundingClientRect().height)}),[]);return(0,I.Mq)((function(t,n){var r=t.scrollY;if(e)if(r=s?a(!1):r+l{"use strict";n.d(t,{A:()=>v});var r=n(98587),a=n(96540),o=n(28774),i=n(86025),s=n(44586),c=n(6342),l=n(34164),u=n(92303),d=n(95293);const p={themedComponent:"themedComponent_mlkZ","themedComponent--light":"themedComponent--light_NVdE","themedComponent--dark":"themedComponent--dark_xIcU"};var f=n(74848);function m(e){var t=e.className,n=e.children,r=(0,u.A)(),o=(0,d.G)().colorMode;return(0,f.jsx)(f.Fragment,{children:(r?"dark"===o?["dark"]:["light"]:["light","dark"]).map((function(e){var r=n({theme:e,className:(0,l.A)(t,p.themedComponent,p["themedComponent--"+e])});return(0,f.jsx)(a.Fragment,{children:r},e)}))})}var h=["sources","className","alt"];function b(e){var t=e.sources,n=e.className,a=e.alt,o=(0,r.A)(e,h);return(0,f.jsx)(m,{className:n,children:function(e){var n=e.theme,r=e.className;return(0,f.jsx)("img",Object.assign({src:t[n],alt:a,className:r},o))}})}var g=["imageClassName","titleClassName"];function y(e){var t=e.logo,n=e.alt,r=e.imageClassName,a={light:(0,i.Ay)(t.src),dark:(0,i.Ay)(t.srcDark||t.src)},o=(0,f.jsx)(b,{className:t.className,sources:a,height:t.height,width:t.width,alt:n,style:t.style});return r?(0,f.jsx)("div",{className:r,children:o}):o}function v(e){var t,n=(0,s.A)().siteConfig.title,a=(0,c.p)().navbar,l=a.title,u=a.logo,d=e.imageClassName,p=e.titleClassName,m=(0,r.A)(e,g),h=(0,i.Ay)((null==u?void 0:u.href)||"/"),b=l?"":n,v=null!=(t=null==u?void 0:u.alt)?t:b;return(0,f.jsxs)(o.A,Object.assign({to:h},m,(null==u?void 0:u.target)&&{target:u.target},{children:[u&&(0,f.jsx)(y,{logo:u,alt:v,imageClassName:d}),null!=l&&(0,f.jsx)("b",{className:p,children:l})]}))}},41463:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});n(96540);var r=n(5260),a=n(74848);function o(e){var t=e.locale,n=e.version,o=e.tag,i=t;return(0,a.jsxs)(r.A,{children:[t&&(0,a.jsx)("meta",{name:"docusaurus_locale",content:t}),n&&(0,a.jsx)("meta",{name:"docusaurus_version",content:n}),o&&(0,a.jsx)("meta",{name:"docusaurus_tag",content:o}),i&&(0,a.jsx)("meta",{name:"docsearch:language",content:i}),n&&(0,a.jsx)("meta",{name:"docsearch:version",content:n}),o&&(0,a.jsx)("meta",{name:"docsearch:docusaurus_tag",content:o})]})}},41422:(e,t,n)=>{"use strict";n.d(t,{N:()=>x,u:()=>p});var r=n(98587),a=n(96540),o=n(38193),i=n(205),s=n(53109),c=n(74848),l=["collapsed"],u=["lazy"],d="ease-in-out";function p(e){var t=e.initialState,n=(0,a.useState)(null!=t&&t),r=n[0],o=n[1],i=(0,a.useCallback)((function(){o((function(e){return!e}))}),[]);return{collapsed:r,setCollapsed:o,toggleCollapsed:i}}var f={display:"none",overflow:"hidden",height:"0px"},m={display:"block",overflow:"visible",height:"auto"};function h(e,t){var n=t?f:m;e.style.display=n.display,e.style.overflow=n.overflow,e.style.height=n.height}function b(e){var t=e.collapsibleRef,n=e.collapsed,r=e.animation,o=(0,a.useRef)(!1);(0,a.useEffect)((function(){var e,a=t.current;function i(){var e,t,n=a.scrollHeight,o=null!=(e=null==r?void 0:r.duration)?e:function(e){if((0,s.O)())return 1;var t=e/36;return Math.round(10*(4+15*Math.pow(t,.25)+t/5))}(n);return{transition:"height "+o+"ms "+(null!=(t=null==r?void 0:r.easing)?t:d),height:n+"px"}}function c(){var e=i();a.style.transition=e.transition,a.style.height=e.height}if(!o.current)return h(a,n),void(o.current=!0);return a.style.willChange="height",e=requestAnimationFrame((function(){n?(c(),requestAnimationFrame((function(){a.style.height=f.height,a.style.overflow=f.overflow}))):(a.style.display="block",requestAnimationFrame((function(){c()})))})),function(){return cancelAnimationFrame(e)}}),[t,n,r])}function g(e){if(!o.A.canUseDOM)return e?f:m}function y(e){var t=e.as,n=void 0===t?"div":t,r=e.collapsed,o=e.children,i=e.animation,s=e.onCollapseTransitionEnd,l=e.className,u=e.disableSSRStyle,d=(0,a.useRef)(null);return b({collapsibleRef:d,collapsed:r,animation:i}),(0,c.jsx)(n,{ref:d,style:u?void 0:g(r),onTransitionEnd:function(e){"height"===e.propertyName&&(h(d.current,r),null==s||s(r))},className:l,children:o})}function v(e){var t=e.collapsed,n=(0,r.A)(e,l),o=(0,a.useState)(!t),s=o[0],u=o[1],d=(0,a.useState)(t),p=d[0],f=d[1];return(0,i.A)((function(){t||u(!0)}),[t]),(0,i.A)((function(){s&&f(t)}),[s,t]),s?(0,c.jsx)(y,Object.assign({},n,{collapsed:p})):null}function x(e){var t=e.lazy,n=(0,r.A)(e,u),a=t?v:y;return(0,c.jsx)(a,Object.assign({},n))}},65041:(e,t,n)=>{"use strict";n.d(t,{M:()=>h,o:()=>m});var r=n(96540),a=n(92303),o=n(75376),i=n(43807),s=n(6342),c=n(74848),l=(0,o.Wf)("docusaurus.announcement.dismiss"),u=(0,o.Wf)("docusaurus.announcement.id"),d=function(){return"true"===l.get()},p=function(e){return l.set(String(e))},f=r.createContext(null);function m(e){var t=e.children,n=function(){var e=(0,s.p)().announcementBar,t=(0,a.A)(),n=(0,r.useState)((function(){return!!t&&d()})),o=n[0],i=n[1];(0,r.useEffect)((function(){i(d())}),[]);var c=(0,r.useCallback)((function(){p(!0),i(!0)}),[]);return(0,r.useEffect)((function(){if(e){var t=e.id,n=u.get();"annoucement-bar"===n&&(n="announcement-bar");var r=t!==n;u.set(t),r&&p(!1),!r&&d()||i(!1)}}),[e]),(0,r.useMemo)((function(){return{isActive:!!e&&!o,close:c}}),[e,o,c])}();return(0,c.jsx)(f.Provider,{value:n,children:t})}function h(){var e=(0,r.useContext)(f);if(!e)throw new i.dV("AnnouncementBarProvider");return e}},95293:(e,t,n)=>{"use strict";n.d(t,{G:()=>g,a:()=>b});var r=n(96540),a=n(38193),o=n(43807),i=n(75376),s=n(6342),c=n(74848),l=r.createContext(void 0),u="theme",d=(0,i.Wf)(u),p={light:"light",dark:"dark"},f=function(e){return e===p.dark?p.dark:p.light},m=function(e){return a.A.canUseDOM?f(document.documentElement.getAttribute("data-theme")):f(e)},h=function(e){d.set(f(e))};function b(e){var t=e.children,n=function(){var e=(0,s.p)().colorMode,t=e.defaultMode,n=e.disableSwitch,a=e.respectPrefersColorScheme,o=(0,r.useState)(m(t)),i=o[0],c=o[1];(0,r.useEffect)((function(){n&&d.del()}),[n]);var l=(0,r.useCallback)((function(e,n){void 0===n&&(n={});var r=n.persist,o=void 0===r||r;e?(c(e),o&&h(e)):(c(a?window.matchMedia("(prefers-color-scheme: dark)").matches?p.dark:p.light:t),d.del())}),[a,t]);(0,r.useEffect)((function(){document.documentElement.setAttribute("data-theme",f(i))}),[i]),(0,r.useEffect)((function(){if(!n){var e=function(e){if(e.key===u){var t=d.get();null!==t&&l(f(t))}};return window.addEventListener("storage",e),function(){return window.removeEventListener("storage",e)}}}),[n,l]);var b=(0,r.useRef)(!1);return(0,r.useEffect)((function(){if(!n||a){var e=window.matchMedia("(prefers-color-scheme: dark)"),t=function(){window.matchMedia("print").matches||b.current?b.current=window.matchMedia("print").matches:l(null)};return e.addListener(t),function(){return e.removeListener(t)}}}),[l,n,a]),(0,r.useMemo)((function(){return{colorMode:i,setColorMode:l,get isDarkTheme(){return i===p.dark},setLightTheme:function(){l(p.light)},setDarkTheme:function(){l(p.dark)}}}),[i,l])}();return(0,c.jsx)(l.Provider,{value:n,children:t})}function g(){var e=(0,r.useContext)(l);if(null==e)throw new o.dV("ColorModeProvider","Please see https://docusaurus.io/docs/api/themes/configuration#use-color-mode.");return e}},22069:(e,t,n)=>{"use strict";n.d(t,{M:()=>f,e:()=>p});var r=n(96540),a=n(75600),o=n(24581),i=n(57485),s=n(6342),c=n(43807),l=n(74848),u=r.createContext(void 0);function d(){var e,t=(e=(0,a.YL)(),0===(0,s.p)().navbar.items.length&&!e.component),n=(0,o.l)(),c=!t&&"mobile"===n,l=(0,r.useState)(!1),u=l[0],d=l[1];(0,i.$Z)((function(){if(u)return d(!1),!1}));var p=(0,r.useCallback)((function(){d((function(e){return!e}))}),[]);return(0,r.useEffect)((function(){"desktop"===n&&d(!1)}),[n]),(0,r.useMemo)((function(){return{disabled:t,shouldRender:c,toggle:p,shown:u}}),[t,c,p,u])}function p(e){var t=e.children,n=d();return(0,l.jsx)(u.Provider,{value:n,children:t})}function f(){var e=r.useContext(u);if(void 0===e)throw new c.dV("NavbarMobileSidebarProvider");return e}},75600:(e,t,n)=>{"use strict";n.d(t,{GX:()=>l,YL:()=>c,y_:()=>s});var r=n(96540),a=n(43807),o=n(74848),i=r.createContext(null);function s(e){var t=e.children,n=(0,r.useState)({component:null,props:null});return(0,o.jsx)(i.Provider,{value:n,children:t})}function c(){var e=(0,r.useContext)(i);if(!e)throw new a.dV("NavbarSecondaryMenuContentProvider");return e[0]}function l(e){var t=e.component,n=e.props,o=(0,r.useContext)(i);if(!o)throw new a.dV("NavbarSecondaryMenuContentProvider");var s=o[1],c=(0,a.Be)(n);return(0,r.useEffect)((function(){s({component:t,props:c})}),[s,t,c]),(0,r.useEffect)((function(){return function(){return s({component:null,props:null})}}),[s]),null}},14090:(e,t,n)=>{"use strict";n.d(t,{w:()=>a,J:()=>o});var r=n(96540),a="navigation-with-keyboard";function o(){(0,r.useEffect)((function(){function e(e){"keydown"===e.type&&"Tab"===e.key&&document.body.classList.add(a),"mousedown"===e.type&&document.body.classList.remove(a)}return document.addEventListener("keydown",e),document.addEventListener("mousedown",e),function(){document.body.classList.remove(a),document.removeEventListener("keydown",e),document.removeEventListener("mousedown",e)}}),[])}},24255:(e,t,n)=>{"use strict";n.d(t,{b:()=>s,w:()=>c});var r=n(96540),a=n(44586),o=n(57485),i="q";function s(){return(0,o.l)(i)}function c(){var e=(0,a.A)().siteConfig,t=e.baseUrl,n=e.themeConfig.algolia.searchPagePath;return(0,r.useCallback)((function(e){return""+t+n+"?"+i+"="+encodeURIComponent(e)}),[t,n])}},24581:(e,t,n)=>{"use strict";n.d(t,{l:()=>s});var r=n(96540),a=n(38193),o={desktop:"desktop",mobile:"mobile",ssr:"ssr"},i=996;function s(e){var t=(void 0===e?{}:e).desktopBreakpoint,n=void 0===t?i:t,s=(0,r.useState)((function(){return"ssr"})),c=s[0],l=s[1];return(0,r.useEffect)((function(){function e(){l(function(e){if(!a.A.canUseDOM)throw new Error("getWindowSize() should only be called after React hydration");return window.innerWidth>e?o.desktop:o.mobile}(n))}return e(),window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[n]),c}},17559:(e,t,n)=>{"use strict";n.d(t,{G:()=>r});var r={page:{blogListPage:"blog-list-page",blogPostPage:"blog-post-page",blogTagsListPage:"blog-tags-list-page",blogTagPostListPage:"blog-tags-post-list-page",blogAuthorsListPage:"blog-authors-list-page",blogAuthorsPostsPage:"blog-authors-posts-page",docsDocPage:"docs-doc-page",docsTagsListPage:"docs-tags-list-page",docsTagDocListPage:"docs-tags-doc-list-page",mdxPage:"mdx-page"},wrapper:{main:"main-wrapper",blogPages:"blog-wrapper",docsPages:"docs-wrapper",mdxPages:"mdx-wrapper"},common:{editThisPage:"theme-edit-this-page",lastUpdated:"theme-last-updated",backToTopButton:"theme-back-to-top-button",codeBlock:"theme-code-block",admonition:"theme-admonition",unlistedBanner:"theme-unlisted-banner",draftBanner:"theme-draft-banner",admonitionType:function(e){return"theme-admonition-"+e}},layout:{},docs:{docVersionBanner:"theme-doc-version-banner",docVersionBadge:"theme-doc-version-badge",docBreadcrumbs:"theme-doc-breadcrumbs",docMarkdown:"theme-doc-markdown",docTocMobile:"theme-doc-toc-mobile",docTocDesktop:"theme-doc-toc-desktop",docFooter:"theme-doc-footer",docFooterTagsRow:"theme-doc-footer-tags-row",docFooterEditMetaRow:"theme-doc-footer-edit-meta-row",docSidebarContainer:"theme-doc-sidebar-container",docSidebarMenu:"theme-doc-sidebar-menu",docSidebarItemCategory:"theme-doc-sidebar-item-category",docSidebarItemLink:"theme-doc-sidebar-item-link",docSidebarItemCategoryLevel:function(e){return"theme-doc-sidebar-item-category-level-"+e},docSidebarItemLinkLevel:function(e){return"theme-doc-sidebar-item-link-level-"+e}},blog:{blogFooterTagsRow:"theme-blog-footer-tags-row",blogFooterEditMetaRow:"theme-blog-footer-edit-meta-row"},pages:{pageFooterEditMetaRow:"theme-pages-footer-edit-meta-row"}}},53109:(e,t,n)=>{"use strict";function r(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}n.d(t,{O:()=>r})},12181:(e,t,n)=>{"use strict";n.d(t,{bq:()=>d,MN:()=>u,a2:()=>l,k2:()=>p});var r=n(77387),a=n(96540),o=n(21312),i=n(70440);const s={errorBoundaryError:"errorBoundaryError_a6uf",errorBoundaryFallback:"errorBoundaryFallback_VBag"};var c=n(74848);function l(e){return(0,c.jsx)("button",Object.assign({type:"button"},e,{children:(0,c.jsx)(o.A,{id:"theme.ErrorPageContent.tryAgain",description:"The label of the button to try again rendering when the React error boundary captures an error",children:"Try again"})}))}function u(e){var t=e.error,n=e.tryAgain;return(0,c.jsxs)("div",{className:s.errorBoundaryFallback,children:[(0,c.jsx)("p",{children:t.message}),(0,c.jsx)(l,{onClick:n})]})}function d(e){var t=e.error,n=(0,i.rA)(t).map((function(e){return e.message})).join("\n\nCause:\n");return(0,c.jsx)("p",{className:s.errorBoundaryError,children:n})}var p=function(e){function t(){return e.apply(this,arguments)||this}(0,r.A)(t,e);var n=t.prototype;return n.componentDidCatch=function(e,t){throw this.props.onError(e,t)},n.render=function(){return this.props.children},t}(a.Component)},20481:(e,t,n)=>{"use strict";n.d(t,{s:()=>a});var r=n(44586);function a(e){var t=(0,r.A)().siteConfig,n=t.title,a=t.titleDelimiter;return null!=e&&e.trim().length?e.trim()+" "+a+" "+n:n}},57485:(e,t,n)=>{"use strict";n.d(t,{$Z:()=>i,aZ:()=>c,l:()=>l});var r=n(96540),a=n(56347),o=n(43807);function i(e){!function(e){var t=(0,a.W6)(),n=(0,o._q)(e);(0,r.useEffect)((function(){return t.block((function(e,t){return n(e,t)}))}),[t,n])}((function(t,n){if("POP"===n)return e(t,n)}))}function s(e){var t=(0,a.W6)();return(0,r.useSyncExternalStore)(t.listen,(function(){return e(t)}),(function(){return e(t)}))}function c(e){return s((function(t){return null===e?null:new URLSearchParams(t.location.search).get(e)}))}function l(e){var t,n=null!=(t=c(e))?t:"",o=function(e){var t=(0,a.W6)();return(0,r.useCallback)((function(n,r){var a=new URLSearchParams(t.location.search);n?a.set(e,n):a.delete(e),(null!=r&&r.push?t.push:t.replace)({search:a.toString()})}),[e,t])}(e);return[n,o]}},31682:(e,t,n)=>{"use strict";function r(e,t){return void 0===t&&(t=function(e,t){return e===t}),e.filter((function(n,r){return e.findIndex((function(e){return t(e,n)}))!==r}))}function a(e){return Array.from(new Set(e))}n.d(t,{XI:()=>r,sb:()=>a})},69024:(e,t,n)=>{"use strict";n.d(t,{e3:()=>f,be:()=>d,Jx:()=>m});var r=n(96540),a=n(34164),o=n(5260),i=n(53102);function s(){var e=r.useContext(i.o);if(!e)throw new Error("Unexpected: no Docusaurus route context found");return e}var c=n(86025),l=n(20481),u=n(74848);function d(e){var t=e.title,n=e.description,r=e.keywords,a=e.image,i=e.children,s=(0,l.s)(t),d=(0,c.hH)().withBaseUrl,p=a?d(a,{absolute:!0}):void 0;return(0,u.jsxs)(o.A,{children:[t&&(0,u.jsx)("title",{children:s}),t&&(0,u.jsx)("meta",{property:"og:title",content:s}),n&&(0,u.jsx)("meta",{name:"description",content:n}),n&&(0,u.jsx)("meta",{property:"og:description",content:n}),r&&(0,u.jsx)("meta",{name:"keywords",content:Array.isArray(r)?r.join(","):r}),p&&(0,u.jsx)("meta",{property:"og:image",content:p}),p&&(0,u.jsx)("meta",{name:"twitter:image",content:p}),i]})}var p=r.createContext(void 0);function f(e){var t=e.className,n=e.children,i=r.useContext(p),s=(0,a.A)(i,t);return(0,u.jsxs)(p.Provider,{value:s,children:[(0,u.jsx)(o.A,{children:(0,u.jsx)("html",{className:s})}),n]})}function m(e){var t=e.children,n=s(),r="plugin-"+n.plugin.name.replace(/docusaurus-(?:plugin|theme)-(?:content-)?/gi,""),o="plugin-id-"+n.plugin.id;return(0,u.jsx)(f,{className:(0,a.A)(r,o),children:t})}},43807:(e,t,n)=>{"use strict";n.d(t,{dV:()=>m,fM:()=>b,_q:()=>p,ZC:()=>f,Be:()=>h});var r=n(3909),a=n(77387);function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}var i=n(63662);function s(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(s=function(){return!!e})()}function c(e){var t="function"==typeof Map?new Map:void 0;return c=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(s())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var a=new(e.bind.apply(e,r));return n&&(0,i.A)(a,n.prototype),a}(e,arguments,o(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),(0,i.A)(n,e)},c(e)}var l=n(96540),u=n(205),d=n(74848);function p(e){var t=(0,l.useRef)(e);return(0,u.A)((function(){t.current=e}),[e]),(0,l.useCallback)((function(){return t.current.apply(t,arguments)}),[])}function f(e){var t=(0,l.useRef)();return(0,u.A)((function(){t.current=e})),t.current}var m=function(e){function t(t,n){var a,o,i;return(i=e.call(this)||this).name="ReactContextError",i.message="Hook "+(null!=(a=null==(o=i.stack)||null==(o=o.split("\n")[1])||null==(o=o.match((0,r.A)(/at (?:\w+\.)?(\w+)/,{name:1})))?void 0:o.groups.name)?a:"")+" is called outside the <"+t+">. "+(null!=n?n:""),i}return(0,a.A)(t,e),t}(c(Error));function h(e){var t=Object.entries(e);return t.sort((function(e,t){return e[0].localeCompare(t[0])})),(0,l.useMemo)((function(){return e}),t.flat())}function b(e){return function(t){var n=t.children;return(0,d.jsx)(d.Fragment,{children:e.reduceRight((function(e,t){return(0,d.jsx)(t,{children:e})}),n)})}}},91252:(e,t,n)=>{"use strict";function r(e,t){return void 0!==e&&void 0!==t&&new RegExp(e,"gi").test(t)}n.d(t,{G:()=>r})},99169:(e,t,n)=>{"use strict";n.d(t,{Dt:()=>s,ys:()=>i});var r=n(96540),a=n(97671),o=n(44586);function i(e,t){var n=function(e){var t;return null==(t=!e||e.endsWith("/")?e:e+"/")?void 0:t.toLowerCase()};return n(e)===n(t)}function s(){var e=(0,o.A)().siteConfig.baseUrl;return(0,r.useMemo)((function(){return function(e){var t=e.baseUrl;function n(e){return e.path===t&&!0===e.exact}function r(e){return e.path===t&&!e.exact}return function e(t){if(0!==t.length)return t.find(n)||e(t.filter(r).flatMap((function(e){var t;return null!=(t=e.routes)?t:[]})))}(e.routes)}({routes:a.A,baseUrl:e})}),[e])}},23104:(e,t,n)=>{"use strict";n.d(t,{Mq:()=>f,Tv:()=>u,a_:()=>m,gk:()=>h});var r=n(96540),a=n(38193),o=n(92303),i=n(205),s=n(43807),c=n(74848);var l=r.createContext(void 0);function u(e){var t,n=e.children,a=(t=(0,r.useRef)(!0),(0,r.useMemo)((function(){return{scrollEventsEnabledRef:t,enableScrollEvents:function(){t.current=!0},disableScrollEvents:function(){t.current=!1}}}),[]));return(0,c.jsx)(l.Provider,{value:a,children:n})}function d(){var e=(0,r.useContext)(l);if(null==e)throw new s.dV("ScrollControllerProvider");return e}var p=function(){return a.A.canUseDOM?{scrollX:window.pageXOffset,scrollY:window.pageYOffset}:null};function f(e,t){void 0===t&&(t=[]);var n=d().scrollEventsEnabledRef,a=(0,r.useRef)(p()),o=(0,s._q)(e);(0,r.useEffect)((function(){var e=function(){if(n.current){var e=p();o(e,a.current),a.current=e}},t={passive:!0};return e(),window.addEventListener("scroll",e,t),function(){return window.removeEventListener("scroll",e,t)}}),[o,n].concat(t))}function m(){var e,t,n,a=d(),o=(e=(0,r.useRef)({elem:null,top:0}),t=(0,r.useCallback)((function(t){e.current={elem:t,top:t.getBoundingClientRect().top}}),[]),n=(0,r.useCallback)((function(){var t=e.current,n=t.elem,r=t.top;if(!n)return{restored:!1};var a=n.getBoundingClientRect().top-r;return a&&window.scrollBy({left:0,top:a}),e.current={elem:null,top:0},{restored:0!==a}}),[]),(0,r.useMemo)((function(){return{save:t,restore:n}}),[n,t])),s=(0,r.useRef)(void 0),c=(0,r.useCallback)((function(e){o.save(e),a.disableScrollEvents(),s.current=function(){var e=o.restore().restored;if(s.current=void 0,e){var t=function(){a.enableScrollEvents(),window.removeEventListener("scroll",t)};window.addEventListener("scroll",t)}else a.enableScrollEvents()}}),[a,o]);return(0,i.A)((function(){queueMicrotask((function(){return null==s.current?void 0:s.current()}))})),{blockElementScrollPositionUntilNextRender:c}}function h(){var e=(0,r.useRef)(null),t=(0,o.A)()&&"smooth"===getComputedStyle(document.documentElement).scrollBehavior;return{startScroll:function(n){e.current=t?function(e){return window.scrollTo({top:e,behavior:"smooth"}),function(){}}(n):function(e){var t=null,n=document.documentElement.scrollTop>e;return function r(){var a=document.documentElement.scrollTop;(n&&a>e||!n&&a{"use strict";n.d(t,{C:()=>r});var r="default"},75376:(e,t,n)=>{"use strict";n.d(t,{Wf:()=>u,Dv:()=>d});var r=n(96540);const a=JSON.parse('{"N":"localStorage","M":""}');var o=a.N;function i(e){var t=e.key,n=e.oldValue,r=e.newValue,a=e.storage;if(n!==r){var o=document.createEvent("StorageEvent");o.initStorageEvent("storage",!1,!1,t,n,r,window.location.href,a),window.dispatchEvent(o)}}function s(e){if(void 0===e&&(e=o),"undefined"==typeof window)throw new Error("Browser storage is not available on Node.js/Docusaurus SSR process.");if("none"===e)return null;try{return window[e]}catch(n){return t=n,c||(console.warn("Docusaurus browser storage is not available.\nPossible reasons: running Docusaurus in an iframe, in an incognito browser session, or using too strict browser privacy settings.",t),c=!0),null}var t}var c=!1;var l={get:function(){return null},set:function(){},del:function(){},listen:function(){return function(){}}};function u(e,t){var n=""+e+a.M;if("undefined"==typeof window)return function(e){function t(){throw new Error('Illegal storage API usage for storage key "'+e+'".\nDocusaurus storage APIs are not supposed to be called on the server-rendering process.\nPlease only call storage APIs in effects and event handlers.')}return{get:t,set:t,del:t,listen:t}}(n);var r=s(null==t?void 0:t.persistence);return null===r?l:{get:function(){try{return r.getItem(n)}catch(e){return console.error("Docusaurus storage error, can't get key="+n,e),null}},set:function(e){try{var t=r.getItem(n);r.setItem(n,e),i({key:n,oldValue:t,newValue:e,storage:r})}catch(a){console.error("Docusaurus storage error, can't set "+n+"="+e,a)}},del:function(){try{var e=r.getItem(n);r.removeItem(n),i({key:n,oldValue:e,newValue:null,storage:r})}catch(t){console.error("Docusaurus storage error, can't delete key="+n,t)}},listen:function(e){try{var t=function(t){t.storageArea===r&&t.key===n&&e(t)};return window.addEventListener("storage",t),function(){return window.removeEventListener("storage",t)}}catch(a){return console.error("Docusaurus storage error, can't listen for changes of key="+n,a),function(){}}}}}function d(e,t){var n=(0,r.useRef)((function(){return null===e?l:u(e,t)})).current(),a=(0,r.useCallback)((function(e){return"undefined"==typeof window?function(){}:n.listen(e)}),[n]);return[(0,r.useSyncExternalStore)(a,(function(){return"undefined"==typeof window?null:n.get()}),(function(){return null})),n]}},32131:(e,t,n)=>{"use strict";n.d(t,{o:()=>i});var r=n(44586),a=n(56347),o=n(70440);function i(){var e=(0,r.A)(),t=e.siteConfig,n=t.baseUrl,i=t.url,s=t.trailingSlash,c=e.i18n,l=c.defaultLocale,u=c.currentLocale,d=(0,a.zy)().pathname,p=(0,o.Ks)(d,{trailingSlash:s,baseUrl:n}),f=u===l?n:n.replace("/"+u+"/","/"),m=p.replace(n,"");return{createUrl:function(e){var t=e.locale;return""+(e.fullyQualified?i:"")+function(e){return e===l?""+f:""+f+e+"/"}(t)+m}}}},75062:(e,t,n)=>{"use strict";n.d(t,{$:()=>i});var r=n(96540),a=n(56347),o=n(43807);function i(e){var t=(0,a.zy)(),n=(0,o.ZC)(t),i=(0,o._q)(e);(0,r.useEffect)((function(){n&&t!==n&&i({location:t,previousLocation:n})}),[i,t,n])}},6342:(e,t,n)=>{"use strict";n.d(t,{p:()=>a});var r=n(44586);function a(){return(0,r.A)().siteConfig.themeConfig}},38126:(e,t,n)=>{"use strict";n.d(t,{c:()=>a});var r=n(44586);function a(){return(0,r.A)().siteConfig.themeConfig}},51062:(e,t,n)=>{"use strict";n.d(t,{C:()=>s});var r=n(96540),a=n(91252),o=n(86025),i=n(38126);function s(){var e=(0,o.hH)().withBaseUrl,t=(0,i.c)().algolia,n=t.externalUrlRegex,s=t.replaceSearchResultPathname;return(0,r.useCallback)((function(t){var r=new URL(t);if((0,a.G)(n,r.href))return t;var o=""+(r.pathname+r.hash);return e(function(e,t){return t?e.replaceAll(new RegExp(t.from,"g"),t.to):e}(o,s))}),[e,n,s])}},12983:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addTrailingSlash=a,t.default=function(e,t){var n=t.trailingSlash,r=t.baseUrl;if(e.startsWith("#"))return e;if(void 0===n)return e;var i=e.split(/[#?]/)[0],s="/"===i||i===r?i:(c=i,l=n,l?a(c):o(c));var c,l;return e.replace(i,s)},t.addLeadingSlash=function(e){return(0,r.addPrefix)(e,"/")},t.removeTrailingSlash=o;var r=n(42566);function a(e){return e.endsWith("/")?e:e+"/"}function o(e){return(0,r.removeSuffix)(e,"/")}},80253:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getErrorCausalChain=function e(t){if(t.cause)return[t].concat(e(t.cause));return[t]}},70440:(e,t,n)=>{"use strict";t.rA=t.Ks=void 0;var r=n(31635);var a=n(12983);Object.defineProperty(t,"Ks",{enumerable:!0,get:function(){return r.__importDefault(a).default}});var o=n(42566);var i=n(80253);Object.defineProperty(t,"rA",{enumerable:!0,get:function(){return i.getErrorCausalChain}})},42566:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addPrefix=function(e,t){return e.startsWith(t)?e:""+t+e},t.removeSuffix=function(e,t){if(""===t)return e;return e.endsWith(t)?e.slice(0,-t.length):e},t.addSuffix=function(e,t){return e.endsWith(t)?e:""+e+t},t.removePrefix=function(e,t){return e.startsWith(t)?e.slice(t.length):e}},97671:(e,t,n)=>{"use strict";n.d(t,{A:()=>p});n(96540);var r=n(53259),a=n.n(r),o=n(91964);const i={"0058b4c6":[function(){return n.e(849).then(n.t.bind(n,9302,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-175.json",9302],"06597bc8":[function(){return Promise.all([n.e(1869),n.e(6417)]).then(n.bind(n,67526))},"@site/../docs/learn/archive/learn-treasury.md",67526],"078895e8":[function(){return Promise.all([n.e(1869),n.e(9909)]).then(n.bind(n,13995))},"@site/../docs/learn/archive/learn-controller.md",13995],"08c12c3a":[function(){return n.e(5630).then(n.bind(n,84110))},"@site/../docs/general/dune-analytics/parachain-dashboards/polimec-dashboards.md",84110],"09dda9ae":[function(){return n.e(2598).then(n.bind(n,26438))},"@site/../docs/general/dune-analytics/parachain-dashboards/polkadex-dashboards.md",26438],"0a3f0c9b":[function(){return Promise.all([n.e(1869),n.e(6555)]).then(n.bind(n,96475))},"@site/../docs/general/ledger.md",96475],"0b1a788a":[function(){return n.e(3395).then(n.t.bind(n,62508,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-learn-jam-fed.json",62508],"0b632434":[function(){return n.e(4739).then(n.bind(n,69188))},"@site/../docs/general/parachains-apps.md",69188],"0df78d26":[function(){return n.e(782).then(n.bind(n,79411))},"@site/../docs/maintain/maintain-guides-secure-validator.md",79411],"0eeb7a68":[function(){return Promise.all([n.e(1869),n.e(6869)]).then(n.bind(n,503))},"@site/../docs/learn/learn-guides-DOT-KSM-bridge.md",503],"113faa87":[function(){return Promise.all([n.e(1869),n.e(6011)]).then(n.bind(n,74860))},"@site/../docs/learn/learn-guides-assets.md",74860],"12331e8b":[function(){return Promise.all([n.e(1869),n.e(2244)]).then(n.bind(n,38517))},"@site/../docs/general/polkadotjs.md",38517],"1283e352":[function(){return n.e(1396).then(n.t.bind(n,72140,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-learn-xcm-01f.json",72140],"131c7f55":[function(){return Promise.all([n.e(1869),n.e(2298)]).then(n.bind(n,97029))},"@site/../docs/learn/learn-architecture.md",97029],"145746f5":[function(){return Promise.all([n.e(1869),n.e(6789)]).then(n.bind(n,61050))},"@site/../docs/maintain/maintain-polkadot-parameters.md",61050],"14eb3368":[function(){return Promise.all([n.e(1869),n.e(6969)]).then(n.bind(n,65847))},"@theme/DocCategoryGeneratedIndexPage",65847],15985664:[function(){return n.e(5881).then(n.bind(n,40393))},"@site/../docs/learn/xcm/journey/summary.md",40393],"1646726c":[function(){return Promise.all([n.e(1869),n.e(3266)]).then(n.bind(n,7244))},"@site/../docs/learn/learn-staking.md",7244],17896441:[function(){return Promise.all([n.e(1869),n.e(8401)]).then(n.bind(n,48220))},"@theme/DocItem",48220],"196e07e8":[function(){return n.e(3602).then(n.bind(n,77858))},"@site/../docs/general/dune-analytics/parachain-dashboards/interlay-dashboards.md",77858],"19ed4d4c":[function(){return n.e(4661).then(n.bind(n,69037))},"@site/../docs/learn/learn-comparisons-cosmos.md",69037],"1a4e3797":[function(){return Promise.all([n.e(1869),n.e(2138)]).then(n.bind(n,74604))},"@theme/SearchPage",74604],"1ae2b102":[function(){return Promise.all([n.e(3482),n.e(8121)]).then(n.bind(n,56195))},"@site/../docs/build/build-protocol-info.md",56195],"1d6d4797":[function(){return n.e(3477).then(n.bind(n,49012))},"@site/../docs/learn/xcm/journey/transact.md",49012],"1de1f488":[function(){return n.e(1240).then(n.t.bind(n,72680,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-learn-parachains-index-132.json",72680],"1e051548":[function(){return n.e(3598).then(n.t.bind(n,45621,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-learn-index-c1b.json",45621],"1e15616a":[function(){return n.e(3751).then(n.bind(n,20526))},"@site/../docs/learn/learn-wasm.md",20526],"1ed3671a":[function(){return n.e(3377).then(n.bind(n,4730))},"@site/../docs/learn/xcm/journey/trap-and-claim.md",4730],"1f8e8ebd":[function(){return n.e(5592).then(n.t.bind(n,77299,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-general-dune-analytics-dfe.json",77299],"21877fa5":[function(){return Promise.all([n.e(1869),n.e(3482),n.e(6466)]).then(n.bind(n,84746))},"@site/../docs/learn/learn-system-chains.md",84746],"21899dd2":[function(){return Promise.all([n.e(1869),n.e(5168)]).then(n.bind(n,55009))},"@site/../docs/learn/learn-parachains.md",55009],"23210cde":[function(){return Promise.all([n.e(1869),n.e(3482),n.e(499)]).then(n.bind(n,98236))},"@site/../docs/general/chain-state-values.md",98236],"23498fd5":[function(){return n.e(7276).then(n.bind(n,23474))},"@site/../docs/build/build-integrate-assets.md",23474],"240a6b01":[function(){return n.e(9633).then(n.bind(n,11140))},"@site/../docs/general/dune-analytics/parachain-dashboards/nodle-dashboards.md",11140],"2462cc91":[function(){return n.e(9141).then(n.bind(n,10196))},"@site/../docs/general/multisig-apps.md",10196],"25f2bd2a":[function(){return n.e(885).then(n.bind(n,62965))},"@site/../docs/maintain/maintain-guides-how-to-stop-validating.md",62965],"269b78ec":[function(){return n.e(1191).then(n.t.bind(n,76722,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-build-protocol-index-9e0.json",76722],"269bc3bb":[function(){return n.e(1968).then(n.bind(n,48374))},"@site/../docs/general/dune-analytics/polkadot-dashboards/legacy/polkadot-staking-dashboard-nominators.md",48374],"26dc7bd1":[function(){return n.e(166).then(n.bind(n,56624))},"@site/../docs/general/dune-analytics/parachain-dashboards/invarch-dashboards.md",56624],"279fb1d6":[function(){return Promise.all([n.e(1869),n.e(4994)]).then(n.bind(n,70134))},"@site/../docs/general/kusama/kusama-getting-started.md",70134],"28b84bbb":[function(){return n.e(9385).then(n.bind(n,11662))},"@site/../docs/build/build-network-overview.md",11662],"2be0d940":[function(){return Promise.all([n.e(1869),n.e(4537)]).then(n.bind(n,23169))},"@site/../docs/learn/learn-guides-identity.md",23169],"2d34559d":[function(){return n.e(7893).then(n.bind(n,95754))},"@site/../docs/learn/learn-jam-chain.md",95754],"2d429218":[function(){return n.e(6361).then(n.bind(n,58267))},"@site/../docs/learn/learn-consensus.md",58267],"2e0c35d5":[function(){return n.e(2698).then(n.bind(n,4057))},"@site/../docs/general/dune-analytics/polkadot-dashboards/legacy/polkadot-governance-dashboard.md",4057],"2e944e01":[function(){return n.e(4231).then(n.bind(n,13186))},"@site/../docs/general/dune-analytics/parachain-dashboards/manta-dashboards.md",13186],"2ea50c63":[function(){return n.e(1560).then(n.bind(n,6859))},"@site/../docs/learn/learn-xcm-usecases.md",6859],"2f3b630e":[function(){return Promise.all([n.e(1869),n.e(3482),n.e(2584)]).then(n.bind(n,59327))},"@site/../docs/learn/learn-polkadot-opengov.md",59327],"3002ebf4":[function(){return Promise.all([n.e(1869),n.e(3423)]).then(n.bind(n,19639))},"@site/../docs/build/build-dapp.md",19639],"3184af97":[function(){return Promise.all([n.e(1869),n.e(5362)]).then(n.bind(n,93313))},"@site/../docs/maintain/archive/maintain-guides-how-to-vote-councillor.md",93313],"31bd35e0":[function(){return n.e(1042).then(n.bind(n,75535))},"@site/../docs/learn/xcm/overview/summary.md",75535],"320c8a05":[function(){return n.e(4479).then(n.bind(n,35689))},"@site/../docs/maintain/maintain-networks.md",35689],"32c9742a":[function(){return n.e(9682).then(n.bind(n,37608))},"@site/../docs/learn/xcm/fundamentals/summary.md",37608],"33b0bcab":[function(){return n.e(1519).then(n.bind(n,15958))},"@site/../docs/learn/xcm/reference/xcvm-registers.md",15958],"33bbe353":[function(){return n.e(5033).then(n.bind(n,35831))},"@site/../docs/maintain/kusama/maintain-guides-society-kusama.md",35831],"34b0fecb":[function(){return n.e(1024).then(n.t.bind(n,22e3,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-learn-xcm-references-e58.json",22e3],"3521cab9":[function(){return n.e(3827).then(n.t.bind(n,69073,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-learn-staking-index-244.json",69073],"36051dfe":[function(){return n.e(3949).then(n.bind(n,78579))},"@site/../docs/general/dune-analytics/parachain-dashboards/unique-dashboards.md",78579],"3611be04":[function(){return Promise.all([n.e(1869),n.e(5761)]).then(n.bind(n,46182))},"@site/../docs/learn/learn-offenses.md",46182],"36b7ae49":[function(){return n.e(1914).then(n.bind(n,31184))},"@site/../docs/learn/learn-snowbridge.md",31184],"3829cf1d":[function(){return n.e(5249).then(n.bind(n,56435))},"@site/../docs/maintain/maintain-guides-validator-community.md",56435],"386099fc":[function(){return n.e(3091).then(n.bind(n,18137))},"@site/../docs/learn/learn-polkadot-opengov-treasury.md",18137],"386bfe51":[function(){return n.e(6319).then(n.bind(n,48480))},"@site/../docs/general/contributing.md",48480],"387813b8":[function(){return n.e(2409).then(n.bind(n,91313))},"@site/../docs/learn/learn-guides-coretime-parachains.md",91313],"390ca211":[function(){return Promise.all([n.e(1869),n.e(2623)]).then(n.bind(n,86374))},"@site/../docs/learn/archive/learn-launch.md",86374],"3ab7d35a":[function(){return n.e(5291).then(n.t.bind(n,35586,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-learn-agile-coretime-index-f45.json",35586],"3bd77df4":[function(){return Promise.all([n.e(1869),n.e(3976)]).then(n.bind(n,50628))},"@site/../docs/learn/learn-bridges.md",50628],"3bd87233":[function(){return n.e(8309).then(n.t.bind(n,36278,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-maintain-validator-index-997.json",36278],"3d1bf5db":[function(){return n.e(4190).then(n.bind(n,3413))},"@site/../docs/maintain/maintain-guides-async-backing.md",3413],"3e56470e":[function(){return n.e(1608).then(n.bind(n,97325))},"@site/../docs/maintain/maintain-wss.md",97325],"41b7b3e8":[function(){return n.e(577).then(n.bind(n,16044))},"@site/../docs/learn/learn-staking-advanced.md",16044],"41f7224c":[function(){return Promise.all([n.e(1869),n.e(7376)]).then(n.bind(n,90853))},"@site/../docs/learn/learn-archive.md",90853],"437b4e16":[function(){return n.e(8647).then(n.bind(n,37328))},"@site/../docs/general/dune-analytics/parachain-dashboards/snowbridge-dashboards.md",37328],"43ee4f22":[function(){return Promise.all([n.e(1869),n.e(876)]).then(n.bind(n,95536))},"@site/../docs/build/build-guide.md",95536],"4403bb94":[function(){return n.e(3735).then(n.bind(n,73338))},"@site/../docs/general/dune-analytics/polkadot-dashboards/legacy/polkadot-dot-ordinals.md",73338],"452ad91d":[function(){return n.e(6195).then(n.bind(n,85671))},"@site/../docs/learn/xcm/overview/intro.md",85671],"4642ab5c":[function(){return n.e(4434).then(n.bind(n,23213))},"@site/../docs/learn/learn-cryptography.md",23213],"46c5b6d8":[function(){return n.e(1905).then(n.t.bind(n,42578,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-learn-comparisons-index-3c0.json",42578],"48d75399":[function(){return Promise.all([n.e(3482),n.e(230)]).then(n.bind(n,76984))},"@site/../docs/general/faq.md",76984],"493c7fdf":[function(){return Promise.all([n.e(3482),n.e(5053)]).then(n.bind(n,22798))},"@site/../docs/general/glossary.md",22798],"497334c4":[function(){return n.e(6736).then(n.bind(n,39084))},"@site/../docs/general/dune-analytics/project-dashboards.md",39084],"49ea81bb":[function(){return n.e(9233).then(n.bind(n,91758))},"@site/../docs/general/dune-analytics/polkadot-dashboards/polkadot-dashboards-staking.md",91758],"4a8eb552":[function(){return Promise.all([n.e(3482),n.e(1949)]).then(n.bind(n,67589))},"@site/../docs/learn/learn-comparisons-kusama.md",67589],"4d76887f":[function(){return n.e(6235).then(n.bind(n,97441))},"@site/../docs/build/build-hackathon.md",97441],"4d9b9869":[function(){return n.e(9550).then(n.bind(n,90986))},"@site/../docs/learn/learn-parachains-protocol.md",90986],"4f031749":[function(){return Promise.all([n.e(1869),n.e(1699)]).then(n.bind(n,50762))},"@site/../docs/learn/learn-guides-staking-pools.md",50762],"4f6f3f96":[function(){return n.e(1531).then(n.t.bind(n,56253,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-learn-xcm-overview-d82.json",56253],"5136ee31":[function(){return n.e(4632).then(n.bind(n,56710))},"@site/../docs/learn/xcm/journey/expects.md",56710],"5193d8a9":[function(){return n.e(1511).then(n.bind(n,6513))},"@site/../docs/general/dune-analytics/polkadot-dashboards/legacy/polkadot-opengov-referenda-home.md",6513],"51fbc2c9":[function(){return n.e(2706).then(n.bind(n,15727))},"@site/../docs/learn/learn-comparisons.md",15727],"5355b952":[function(){return Promise.all([n.e(1869),n.e(3482),n.e(2580),n.e(1003)]).then(n.bind(n,30866))},"@site/../docs/learn/learn-polkadot-opengov-origins.md",30866],"54338ffb":[function(){return n.e(8112).then(n.bind(n,69870))},"@site/../docs/learn/learn-account-multisig.md",69870],"543c9f0a":[function(){return n.e(566).then(n.bind(n,19668))},"@site/../docs/build/build-guides-coretime-troubleshoot.md",19668],"556d3f96":[function(){return n.e(1241).then(n.bind(n,90731))},"@site/../docs/general/dune-analytics/parachain-dashboards/astar-dashboards.md",90731],"571c8793":[function(){return n.e(3984).then(n.bind(n,71701))},"@site/../docs/general/dune-analytics/parachain-dashboards/moonbeam-dashboards.md",71701],"57d69936":[function(){return n.e(8736).then(n.t.bind(n,34309,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-programs-index-225.json",34309],"591eca19":[function(){return n.e(2493).then(n.bind(n,54758))},"@site/../docs/general/polkadot-direction.md",54758],"5c6a20c2":[function(){return n.e(9349).then(n.bind(n,97771))},"@site/../docs/learn/learn-safrole.md",97771],"5c90fc9b":[function(){return n.e(3708).then(n.bind(n,91519))},"@site/../docs/learn/xcm/executor_config/config.md",91519],"5d5db6f5":[function(){return n.e(3200).then(n.t.bind(n,56965,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-learn-advanced-index-8e8.json",56965],"5d69d9d4":[function(){return n.e(1658).then(n.bind(n,23071))},"@site/../docs/maintain/maintain-guides-how-to-upgrade.md",23071],"5db34cd0":[function(){return n.e(8058).then(n.bind(n,21507))},"@site/../docs/general/decentralized-voices.md",21507],"5dfc1fb1":[function(){return n.e(1187).then(n.bind(n,27150))},"@site/../docs/general/pcf.md",27150],"5e1f281f":[function(){return n.e(6835).then(n.t.bind(n,33254,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-stay-safe-index-fb6.json",33254],"5e95c892":[function(){return n.e(9647).then(n.bind(n,7121))},"@theme/DocsRoot",7121],"5e9f5e1a":[function(){return Promise.resolve().then(n.bind(n,85290))},"@generated/docusaurus.config",85290],"5f2beba5":[function(){return n.e(7405).then(n.t.bind(n,39196,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-learn-participants-index-530.json",39196],"60738e36":[function(){return Promise.all([n.e(3482),n.e(7777)]).then(n.bind(n,513))},"@site/../docs/general/metadata.md",513],"6116139f":[function(){return n.e(4840).then(n.bind(n,4908))},"@site/../docs/learn/learn-elastic-scaling.md",4908],"643a7bcf":[function(){return n.e(3345).then(n.t.bind(n,51948,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-wallets-index-9b6.json",51948],"64947d47":[function(){return n.e(8688).then(n.t.bind(n,27375,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-polkadot-vision-index-148.json",27375],"64c7e1cc":[function(){return n.e(8727).then(n.bind(n,13907))},"@site/../docs/build/build-integration.md",13907],"6544ec02":[function(){return n.e(9786).then(n.bind(n,88232))},"@site/../docs/general/alpha-program.md",88232],"6822f432":[function(){return n.e(2356).then(n.t.bind(n,50306,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-community-index-a87.json",50306],"694672cd":[function(){return Promise.all([n.e(1869),n.e(1004)]).then(n.bind(n,29488))},"@site/../docs/learn/learn-guides-staking.md",29488],"69b97ecd":[function(){return n.e(866).then(n.bind(n,75429))},"@site/../docs/learn/learn-implementations.md",75429],"6bfbfa77":[function(){return Promise.all([n.e(1869),n.e(2858)]).then(n.bind(n,94133))},"@site/../docs/learn/archive/learn-auction.md",94133],"6d2ffbf3":[function(){return n.e(4168).then(n.bind(n,53158))},"@site/../docs/learn/xcm/quickstart/first-look.md",53158],"6d423296":[function(){return n.e(9521).then(n.t.bind(n,12483,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-learn-assets-index-7cb.json",12483],"6d5c9a28":[function(){return n.e(417).then(n.bind(n,82315))},"@site/../docs/general/staking-apps.md",82315],"6f1a81b8":[function(){return Promise.all([n.e(3482),n.e(2802)]).then(n.bind(n,73534))},"@site/../docs/maintain/maintain-guides-how-to-chill.md",73534],"700d39cd":[function(){return n.e(5647).then(n.t.bind(n,39389,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-learn-polkadot-opengov-index-246.json",39389],"706277b1":[function(){return n.e(3487).then(n.bind(n,1731))},"@site/../docs/general/dune-analytics/polkadot-dashboards/legacy/polkadot-staking-dashboard-validators.md",1731],"71ed82b9":[function(){return n.e(1369).then(n.bind(n,61987))},"@site/../docs/general/start-building.md",61987],"72b78d4a":[function(){return n.e(1772).then(n.bind(n,9627))},"@site/../docs/general/dune-analytics/polkadot-dashboards/legacy/polkadot-opengov-referendum-voting-analysis.md",9627],73617284:[function(){return n.e(981).then(n.bind(n,76231))},"@site/../docs/learn/learn-hyperbridge.md",76231],"73a7060c":[function(){return Promise.all([n.e(3482),n.e(5208)]).then(n.bind(n,46406))},"@site/../docs/learn/learn-polkadot-technical-fellowship.md",46406],"73d1b372":[function(){return n.e(1498).then(n.bind(n,15735))},"@site/../docs/learn/learn-agile-coretime.md",15735],"74df6a22":[function(){return n.e(7227).then(n.bind(n,77408))},"@site/../docs/maintain/maintain-rpc.md",77408],"766a10e1":[function(){return n.e(6118).then(n.bind(n,16078))},"@site/../docs/learn/learn-comparisons-avalanche.md",16078],"77c23c97":[function(){return Promise.all([n.e(1869),n.e(3482),n.e(3536)]).then(n.bind(n,73554))},"@site/../docs/learn/learn-transactions.md",73554],"78868b16":[function(){return n.e(1539).then(n.bind(n,48626))},"@site/../docs/general/kusama/kusama-social-recovery.md",48626],"78e1e977":[function(){return n.e(5884).then(n.bind(n,97501))},"@site/../docs/learn/xcm/journey/holding-modifiers.md",97501],"7c138549":[function(){return n.e(7473).then(n.bind(n,24358))},"@site/../docs/general/dune-analytics/parachain-dashboards/neuroweb-dashboards.md",24358],"7c43c534":[function(){return n.e(9787).then(n.t.bind(n,71769,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-learn-xcm-fundamentals-multilocation-cfc.json",71769],"7dcec981":[function(){return Promise.all([n.e(1869),n.e(4271)]).then(n.bind(n,37304))},"@site/../docs/build/build-client-side.md",37304],"7fbac68a":[function(){return n.e(2757).then(n.bind(n,98939))},"@site/../docs/general/ambassadors.md",98939],"7ffd66a6":[function(){return n.e(6547).then(n.bind(n,49263))},"@site/../docs/general/dune-analytics/parachain-dashboards/acala-dashboards.md",49263],"804b1e9f":[function(){return Promise.all([n.e(1869),n.e(3482),n.e(1062)]).then(n.bind(n,7210))},"@site/../docs/learn/learn-guides-nominator.md",7210],"8081c0c6":[function(){return n.e(8568).then(n.bind(n,90339))},"@site/../docs/general/parity-data-dashboards.md",90339],"824749c6":[function(){return n.e(8800).then(n.bind(n,84316))},"@site/../docs/build/build-node-interaction.md",84316],"8247eba8":[function(){return n.e(7044).then(n.bind(n,8380))},"@site/../docs/learn/xcm/journey/transfers/teleports.md",8380],"83d4859f":[function(){return n.e(2808).then(n.bind(n,84890))},"@site/../docs/learn/xcm/journey/transfers/summary.md",84890],"84ede15a":[function(){return Promise.all([n.e(1869),n.e(6124)]).then(n.bind(n,41209))},"@site/../docs/learn/learn-guides-transfers.md",41209],"85afe03a":[function(){return n.e(1628).then(n.bind(n,42692))},"@site/../docs/maintain/maintain-errors.md",42692],"863c4753":[function(){return n.e(6076).then(n.bind(n,95697))},"@site/../docs/learn/xcm/journey/register-modifiers.md",95697],"879e564b":[function(){return n.e(8789).then(n.bind(n,73538))},"@site/../docs/general/dune-analytics/onboarding-status-and-key-dashboards.md",73538],"899aadcc":[function(){return n.e(6993).then(n.bind(n,53044))},"@site/../docs/learn/xcm/overview/architecture.md",53044],"89a76fd2":[function(){return Promise.all([n.e(1869),n.e(2204)]).then(n.bind(n,78076))},"@site/../docs/learn/archive/learn-redenomination.md",78076],"8a8a7d05":[function(){return n.e(4791).then(n.bind(n,11659))},"@site/../docs/build/build-parachains.md",11659],"8b670b2b":[function(){return n.e(954).then(n.bind(n,6705))},"@site/../docs/build/build-index.md",6705],"8d3a1bf8":[function(){return Promise.all([n.e(1869),n.e(3482),n.e(5588)]).then(n.bind(n,2203))},"@site/../docs/learn/learn-inflation.md",2203],"8d48ec84":[function(){return n.e(2615).then(n.bind(n,43996))},"@site/../docs/general/dune-analytics/parachain-dashboards/frequency-dashboards.md",43996],"8dd7cee0":[function(){return Promise.all([n.e(1869),n.e(7147)]).then(n.bind(n,57105))},"@site/../docs/general/thousand-validators.md",57105],"8fadc1f3":[function(){return n.e(2191).then(n.t.bind(n,98303,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-learn-xcm-index-b78.json",98303],"90a09ad1":[function(){return n.e(8768).then(n.bind(n,10775))},"@site/../docs/general/dune-analytics/dunesql-cheatsheet.md",10775],"918b38b6":[function(){return Promise.all([n.e(3482),n.e(6930)]).then(n.bind(n,61900))},"@site/../docs/learn/learn-async-backing.md",61900],"93953b85":[function(){return n.e(6247).then(n.t.bind(n,48324,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-learn-xcm-journey-f1c.json",48324],"943aba4c":[function(){return Promise.all([n.e(1869),n.e(1112)]).then(n.bind(n,94436))},"@site/../docs/learn/learn-guides-claims.md",94436],"9528ac88":[function(){return n.e(1379).then(n.bind(n,88693))},"@site/../docs/learn/learn-xcm-transport.md",88693],"95aedc42":[function(){return n.e(6842).then(n.t.bind(n,49664,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-learn-xcm-journey-transfers-540.json",49664],"9662c81e":[function(){return Promise.all([n.e(1869),n.e(7809)]).then(n.bind(n,69959))},"@site/../docs/maintain/archive/maintain-guides-how-to-join-council.md",69959],"967fa6d4":[function(){return Promise.all([n.e(1869),n.e(7876)]).then(n.bind(n,48660))},"@site/../docs/learn/learn-guides-accounts-multisig.md",48660],"979a04e7":[function(){return n.e(3705).then(n.bind(n,15554))},"@site/../docs/general/dune-analytics/parachain-dashboards/bifrost-dashboards.md",15554],"987d08ef":[function(){return n.e(6496).then(n.bind(n,14954))},"@site/../docs/build/build-smart-contracts.md",14954],"98a30fd8":[function(){return n.e(2950).then(n.bind(n,81151))},"@site/../docs/learn/xcm/fundamentals/multiasset.md",81151],"98a431f4":[function(){return n.e(8005).then(n.bind(n,34760))},"@site/../docs/general/transaction-attacks.md",34760],"9913464d":[function(){return Promise.all([n.e(1869),n.e(5883)]).then(n.bind(n,93563))},"@site/../docs/learn/archive/learn-governance.md",93563],"9e2042f5":[function(){return n.e(3086).then(n.bind(n,79554))},"@site/../docs/learn/learn-collator.md",79554],"9e3f6a8a":[function(){return n.e(8108).then(n.bind(n,44533))},"@site/../docs/learn/learn-comparison-ethereum-2.md",44533],"9e6341e5":[function(){return n.e(8431).then(n.bind(n,82057))},"@site/../docs/learn/xcm/journey/transfers/reserve.md",82057],"9e76b49d":[function(){return n.e(6775).then(n.bind(n,1399))},"@site/../docs/learn/xcm/testing.md",1399],"9f319605":[function(){return n.e(834).then(n.bind(n,1567))},"@site/../docs/learn/xcm/journey/fees.md",1567],"9f804621":[function(){return Promise.all([n.e(1869),n.e(3482),n.e(1431)]).then(n.bind(n,68448))},"@site/../docs/learn/learn-guides-accounts.md",68448],a2800a5b:[function(){return n.e(3234).then(n.bind(n,52350))},"@site/../docs/build/build-transaction-construction.md",52350],a29dc56e:[function(){return n.e(7554).then(n.bind(n,55221))},"@site/../docs/maintain/maintain-guides-how-to-monitor-your-node.md",55221],a2d5a6d8:[function(){return n.e(6622).then(n.bind(n,68962))},"@site/../docs/general/dune-analytics/parachain-dashboards/collectives-dashboards.md",68962],a44b8423:[function(){return n.e(319).then(n.bind(n,71484))},"@site/../docs/general/dune-analytics/polkadot-dashboards/legacy/polkadot-staking-dashboard-pool-member.md",71484],a5002e4a:[function(){return n.e(1067).then(n.bind(n,13094))},"@site/../docs/build/build-oracle.md",13094],a5b3561d:[function(){return n.e(2226).then(n.bind(n,49538))},"@site/../docs/general/kusama/kusama-coc.md",49538],a6e65e5f:[function(){return n.e(7208).then(n.t.bind(n,3840,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-learn-xcm-quickstart-1cc.json",3840],a7456010:[function(){return n.e(1235).then(n.t.bind(n,50950,19))},"@generated/docusaurus-plugin-content-pages/default/__plugin.json",50950],a74a59a0:[function(){return Promise.all([n.e(3482),n.e(4975)]).then(n.bind(n,61861))},"@site/../docs/maintain/maintain-guides-how-to-validate-polkadot.md",61861],a7b37b86:[function(){return n.e(1447).then(n.bind(n,10958))},"@site/../docs/general/scams.md",10958],a7bd4aaa:[function(){return n.e(7098).then(n.bind(n,74532))},"@theme/DocVersionRoot",74532],a8f54fb1:[function(){return n.e(1706).then(n.bind(n,37672))},"@site/../docs/learn/learn-DOT-KSM-bridge.md",37672],a94703ab:[function(){return Promise.all([n.e(1869),n.e(9048)]).then(n.bind(n,11377))},"@theme/DocRoot",11377],a9f58d5b:[function(){return n.e(5331).then(n.bind(n,57946))},"@site/../docs/learn/learn-account-balances.md",57946],ab138bf8:[function(){return n.e(8914).then(n.bind(n,18538))},"@site/../docs/learn/learn-proxies.md",18538],aba21aa0:[function(){return n.e(5742).then(n.t.bind(n,98211,19))},"@generated/docusaurus-plugin-content-docs/default/__plugin.json",98211],ad1dd1a4:[function(){return n.e(7217).then(n.t.bind(n,86749,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-dashboards-index-254.json",86749],ad5a1373:[function(){return n.e(3656).then(n.bind(n,30091))},"@site/../docs/general/dune-analytics/parachain-dashboards/phala-dashboards.md",30091],ad762f86:[function(){return Promise.all([n.e(1869),n.e(3041)]).then(n.bind(n,6331))},"@site/../docs/learn/learn-account-advanced.md",6331],af2ff1b5:[function(){return n.e(6646).then(n.bind(n,88350))},"@site/../docs/general/dune-analytics/parachain-dashboards/hydration-dashboards.md",88350],afddde9d:[function(){return n.e(1724).then(n.bind(n,29644))},"@site/../docs/learn/learn-asset-conversion-assethub.md",29644],b0a48d97:[function(){return Promise.all([n.e(1869),n.e(1018)]).then(n.bind(n,83313))},"@site/../docs/learn/learn-guides-ledger.md",83313],b0cb055f:[function(){return n.e(9074).then(n.bind(n,35568))},"@site/../docs/learn/xcm/fundamentals/xcvm.md",35568],b0cbc1d4:[function(){return Promise.all([n.e(3482),n.e(7826)]).then(n.bind(n,86106))},"@site/../docs/general/staking-dashboard.md",86106],b0d34550:[function(){return n.e(8660).then(n.bind(n,80338))},"@site/../docs/general/dune-analytics/polkadot-dashboards/polkadot-dashboards-network.md",80338],b1b82dcd:[function(){return Promise.all([n.e(1869),n.e(557)]).then(n.bind(n,85916))},"@site/../docs/learn/archive/learn-crowdloans.md",85916],b21dd8a7:[function(){return n.e(6024).then(n.bind(n,88617))},"@site/../docs/learn/learn-comparison-rollups.md",88617],b225a2ce:[function(){return n.e(1101).then(n.bind(n,28179))},"@site/../docs/learn/xcm/fundamentals/multilocation/summary.md",28179],b3558274:[function(){return n.e(3975).then(n.bind(n,24716))},"@site/../docs/general/dune-analytics/polkadot-dashboards/legacy/polkadot-staking-dashboard.md",24716],b3719d54:[function(){return n.e(8290).then(n.bind(n,61004))},"@site/../docs/general/polkadot-v1.md",61004],b38833d4:[function(){return n.e(6104).then(n.bind(n,15199))},"@site/../docs/learn/learn-phragmen.md",15199],b418feb9:[function(){return n.e(7242).then(n.bind(n,94910))},"@site/../docs/general/dune-analytics/polkadot-dashboards/polkadot-dashboards-governance.md",94910],b48c599b:[function(){return n.e(9057).then(n.bind(n,90313))},"@site/../docs/general/kusama/kusama-bug-bounty.md",90313],b7bd3ab3:[function(){return n.e(6445).then(n.bind(n,26705))},"@site/../docs/general/dune-analytics/parachain-dashboards/energywebx-dashboards.md",26705],b835d927:[function(){return n.e(1397).then(n.bind(n,66600))},"@site/../docs/general/ecosystem-funds.md",66600],b8cd9d81:[function(){return n.e(3910).then(n.t.bind(n,33716,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-general-dune-analytics-polkadot-dashboards-be4.json",33716],b906f375:[function(){return n.e(159).then(n.bind(n,91160))},"@site/../docs/build/build-light-clients.md",91160],b940de31:[function(){return n.e(4817).then(n.bind(n,21644))},"@site/../docs/learn/learn-assets.md",21644],b9b4ec9e:[function(){return n.e(3316).then(n.bind(n,8255))},"@site/../docs/learn/xcm/reference/glossary.md",8255],bb8b1738:[function(){return Promise.all([n.e(3482),n.e(2916)]).then(n.bind(n,77348))},"@site/../docs/learn/learn-validator.md",77348],bbba852d:[function(){return n.e(9799).then(n.bind(n,17681))},"@site/../docs/general/kusama/kusama-adverserial-cheatsheet.md",17681],bd701914:[function(){return Promise.all([n.e(1869),n.e(1077)]).then(n.bind(n,4366))},"@site/../docs/learn/learn-parachains-faq.md",4366],bea375d6:[function(){return n.e(4938).then(n.bind(n,85374))},"@site/../docs/general/grants.md",85374],bf3ab9de:[function(){return Promise.all([n.e(1869),n.e(2389)]).then(n.bind(n,4543))},"@site/../docs/learn/learn-guides-bridges.md",4543],c07c2447:[function(){return Promise.all([n.e(1869),n.e(7561)]).then(n.bind(n,28794))},"@site/../docs/learn/learn-guides-polkadot-opengov.md",28794],c07ecb8b:[function(){return n.e(7371).then(n.t.bind(n,56310,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-general-dune-analytics-parachain-dashboards-671.json",56310],c110e322:[function(){return n.e(1592).then(n.bind(n,34687))},"@site/../docs/learn/learn-guides-coretime-swap.md",34687],c141421f:[function(){return n.e(957).then(n.t.bind(n,90786,19))},"@generated/docusaurus-theme-search-algolia/default/__plugin.json",90786],c1bbdb2a:[function(){return n.e(5558).then(n.bind(n,99435))},"@site/../docs/learn/learn-polkadot-host.md",99435],c2912163:[function(){return n.e(7352).then(n.t.bind(n,61910,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-learn-components-index-c9a.json",61910],c2c6a3a6:[function(){return n.e(8506).then(n.bind(n,39323))},"@site/../docs/learn/learn-nft-projects.md",39323],c41801b5:[function(){return Promise.all([n.e(3482),n.e(9507)]).then(n.bind(n,62499))},"@site/../docs/maintain/kusama/maintain-guides-how-to-validate-kusama.md",62499],c4f5d8e4:[function(){return Promise.all([n.e(1869),n.e(2634)]).then(n.bind(n,497))},"@site/src/pages/index.js",497],c52e674c:[function(){return n.e(4466).then(n.t.bind(n,81627,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-build-archive-index-a99.json",81627],c57cca4f:[function(){return n.e(895).then(n.t.bind(n,33202,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-learn-future-implementations-index-472.json",33202],c630d0cd:[function(){return n.e(5420).then(n.bind(n,3284))},"@site/../docs/build/build-guides-template-basic.md",3284],c662f00a:[function(){return n.e(7887).then(n.bind(n,84768))},"@site/../docs/learn/xcm/journey/queries.md",84768],c6b91cbc:[function(){return n.e(1050).then(n.t.bind(n,28239,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-learn-basics-index-5be.json",28239],c78e4f7d:[function(){return n.e(1335).then(n.bind(n,97685))},"@site/../docs/general/dune-analytics/polkadot-dashboards/polkadot-dashboards-overview.md",97685],c7a044bb:[function(){return n.e(9110).then(n.bind(n,31189))},"@site/../docs/learn/xcm/journey/channels-and-bridges.md",31189],c7a2145e:[function(){return n.e(6277).then(n.bind(n,40319))},"@site/../docs/general/how-to-dyor.md",40319],c7c5ba1a:[function(){return Promise.all([n.e(1869),n.e(9476)]).then(n.bind(n,55927))},"@site/../docs/learn/learn-accounts.md",55927],c8dd560b:[function(){return Promise.all([n.e(1869),n.e(3482),n.e(4293)]).then(n.bind(n,13699))},"@site/../docs/learn/learn-guides-accounts-proxy-pure.md",13699],c91a9c06:[function(){return Promise.all([n.e(1869),n.e(1019)]).then(n.bind(n,27186))},"@site/../docs/learn/learn-identity.md",27186],c977dfe8:[function(){return Promise.all([n.e(3482),n.e(4024)]).then(n.bind(n,32690))},"@site/../docs/learn/learn-teleport.md",32690],ca45e589:[function(){return n.e(4821).then(n.t.bind(n,22754,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-explore-index-06f.json",22754],ca9fe671:[function(){return n.e(5827).then(n.bind(n,47733))},"@site/../docs/learn/xcm/overview/xcvm.md",47733],cb9afd28:[function(){return Promise.all([n.e(1869),n.e(1738)]).then(n.bind(n,58772))},"@site/../docs/learn/learn-polkadot-js-guides.md",58772],cc44e8fd:[function(){return n.e(5052).then(n.bind(n,93123))},"@site/../docs/build/build-node-management.md",93123],ccc1222e:[function(){return n.e(5702).then(n.bind(n,6295))},"@site/../docs/build/build-open-source.md",6295],cda87995:[function(){return n.e(1711).then(n.bind(n,61925))},"@site/../docs/build/build-tools-index.md",61925],cdedf67f:[function(){return n.e(8050).then(n.t.bind(n,8137,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-maintain-node-index-307.json",8137],ceaa29cb:[function(){return n.e(4841).then(n.bind(n,50965))},"@site/../docs/learn/xcm/journey/locks/locks.md",50965],cfd53ea4:[function(){return n.e(7482).then(n.bind(n,69091))},"@site/../docs/general/kusama/kusama-timeline.md",69091],cfe984ba:[function(){return n.e(8289).then(n.t.bind(n,57081,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-apps-index-b66.json",57081],d000eb73:[function(){return n.e(4228).then(n.bind(n,6124))},"@site/../docs/general/dune-analytics/parachain-dashboards/stellaswap-dashboards.md",6124],d27ae88d:[function(){return n.e(3170).then(n.bind(n,93346))},"@site/../docs/learn/learn-video-tutorials.md",93346],d3a753cf:[function(){return n.e(4191).then(n.bind(n,96737))},"@site/../docs/learn/xcm/fundamentals/multilocation/example.md",96737],d42819bc:[function(){return n.e(3306).then(n.bind(n,19238))},"@site/../docs/general/dune-analytics/parachain-dashboards/bridgehub-dashboards.md",19238],d569989b:[function(){return n.e(8255).then(n.bind(n,69864))},"@site/../docs/general/bug-bounty.md",69864],d5909206:[function(){return n.e(5434).then(n.bind(n,17287))},"@site/../docs/learn/xcm/fundamentals/multilocation/junction.md",17287],d6a97e7e:[function(){return n.e(1107).then(n.bind(n,41316))},"@site/../docs/learn/xcm/quickstart/xcm-simulator.md",41316],d6b0148d:[function(){return n.e(2980).then(n.bind(n,29811))},"@site/../docs/learn/xcm/journey/origins.md",29811],d9a69e3a:[function(){return n.e(5829).then(n.bind(n,19923))},"@site/../docs/general/dune-analytics/parachain-dashboards/people-dashboards.md",19923],d9ef69a7:[function(){return n.e(2164).then(n.bind(n,47734))},"@site/../docs/general/contributors.md",47734],da9f79cb:[function(){return Promise.all([n.e(1869),n.e(3044)]).then(n.bind(n,86708))},"@site/../docs/learn/learn-nomination-pools.md",86708],daaf1ab4:[function(){return Promise.all([n.e(1869),n.e(8215)]).then(n.bind(n,25939))},"@site/../docs/general/funding.md",25939],db039c7f:[function(){return n.e(2481).then(n.bind(n,685))},"@site/../docs/learn/xcm/overview/format.md",685],db3d6c4d:[function(){return n.e(7845).then(n.bind(n,5065))},"@site/../docs/learn/learn-account-abstraction.md",5065],db9d4dae:[function(){return n.e(8472).then(n.bind(n,17907))},"@site/../docs/general/dune-analytics/parachain-dashboards/coretime-dashboards.md",17907],dbbd9e76:[function(){return Promise.all([n.e(1869),n.e(2922)]).then(n.bind(n,97626))},"@site/../docs/learn/learn-guides-vault.md",97626],dc0f9344:[function(){return n.e(1058).then(n.bind(n,34578))},"@site/../docs/general/dune-analytics/parachain-dashboards/pendulum-dashboards.md",34578],dc36d550:[function(){return Promise.all([n.e(1869),n.e(2357)]).then(n.bind(n,5782))},"@site/../docs/maintain/maintain-archive.md",5782],dc776cbc:[function(){return n.e(4498).then(n.bind(n,2405))},"@site/../docs/general/thousand-contributors.md",2405],dd2fa029:[function(){return Promise.all([n.e(1869),n.e(2047)]).then(n.bind(n,44992))},"@site/../docs/learn/learn-polkadotjs.md",44992],dd32e389:[function(){return n.e(7781).then(n.bind(n,69175))},"@site/../docs/general/polkadot-vault.md",69175],df154d69:[function(){return n.e(3880).then(n.bind(n,79822))},"@site/../docs/learn/learn-xcm.md",79822],e00ac272:[function(){return n.e(1881).then(n.bind(n,95369))},"@site/../docs/learn/learn-guides-coretime-marketplaces.md",95369],e2e89062:[function(){return n.e(9894).then(n.bind(n,20696))},"@site/../docs/learn/learn-proxies-pure.md",20696],e31fc461:[function(){return n.e(352).then(n.bind(n,21253))},"@site/../docs/learn/xcm/learn-xcm-docs-intro.md",21253],e43aed4a:[function(){return n.e(1122).then(n.t.bind(n,95773,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-general-index-bbd.json",95773],e495ca4d:[function(){return Promise.all([n.e(1869),n.e(662)]).then(n.bind(n,74360))},"@site/../docs/maintain/archive/maintain-guides-democracy.md",74360],e4ef088f:[function(){return Promise.all([n.e(1869),n.e(3315)]).then(n.bind(n,20888))},"@site/../docs/build/build-guides-install-deps.md",20888],e77078a1:[function(){return n.e(3557).then(n.bind(n,21775))},"@site/../docs/learn/learn-jam-faq.md",21775],e8522a07:[function(){return n.e(5513).then(n.bind(n,53144))},"@site/../docs/general/dune-analytics/polkadot-dashboards/legacy/polkadot-staking-dashboard-nomination-pool.md",53144],ec3b6a32:[function(){return n.e(8832).then(n.bind(n,96287))},"@site/../docs/learn/learn-nft.md",96287],ecb495b7:[function(){return n.e(6786).then(n.bind(n,96724))},"@site/../docs/maintain/maintain-guides-how-to-systemd.md",96724],ece9fdae:[function(){return Promise.all([n.e(1869),n.e(6641)]).then(n.bind(n,2619))},"@site/../docs/general/community.md",2619],ed3409b3:[function(){return Promise.all([n.e(1869),n.e(4117)]).then(n.bind(n,8575))},"@site/../docs/learn/learn-guides-bounties.md",8575],eef3f1dd:[function(){return Promise.all([n.e(1869),n.e(7827)]).then(n.bind(n,62313))},"@site/../docs/learn/learn-guides-treasury.md",62313],efba78c5:[function(){return n.e(3368).then(n.bind(n,40162))},"@site/../docs/general/dune-analytics/polkadot-ecosystem-overview.md",40162],f0ff685a:[function(){return Promise.all([n.e(1869),n.e(3482),n.e(2393)]).then(n.bind(n,11854))},"@site/../docs/learn/learn-guides-accounts-proxy.md",11854],f10f9928:[function(){return n.e(5534).then(n.bind(n,2475))},"@site/../docs/general/dune-analytics/parachain-dashboards/assethub-dashboards.md",2475],f137ce68:[function(){return Promise.all([n.e(1869),n.e(9188)]).then(n.bind(n,93716))},"@site/../docs/learn/learn-xcm-instructions.md",93716],f1585bfb:[function(){return n.e(3642).then(n.bind(n,53608))},"@site/../docs/learn/xcm/quickstart/summary.md",53608],f189ca9f:[function(){return n.e(5312).then(n.bind(n,18451))},"@site/../docs/learn/learn-spree.md",18451],f2521980:[function(){return Promise.all([n.e(3482),n.e(3584)]).then(n.bind(n,55969))},"@site/../docs/general/getting-started.md",55969],f2b5c614:[function(){return n.e(4076).then(n.bind(n,15837))},"@site/../docs/general/dune-analytics/parachain-dashboards/centrifuge-dashboards.md",15837],f2c21b54:[function(){return n.e(4410).then(n.bind(n,54185))},"@site/../docs/build/build-storage.md",54185],f3027c84:[function(){return Promise.all([n.e(1869),n.e(1906)]).then(n.bind(n,98958))},"@site/../docs/general/polkadotjs-ui.md",98958],f359a251:[function(){return Promise.all([n.e(1869),n.e(4051)]).then(n.bind(n,49362))},"@site/../docs/maintain/maintain-endpoints.md",49362],f3bde756:[function(){return n.e(9625).then(n.bind(n,15197))},"@site/../docs/maintain/maintain-bootnode.md",15197],f4130007:[function(){return n.e(8582).then(n.bind(n,99149))},"@site/../docs/general/wallets-and-extensions.md",99149],f41c4e9d:[function(){return n.e(8679).then(n.bind(n,29939))},"@site/../docs/learn/learn-xcm-pallet.md",29939],f4200fe5:[function(){return Promise.all([n.e(1869),n.e(3135)]).then(n.bind(n,94445))},"@site/../docs/maintain/maintain-sync.md",94445],f44679e7:[function(){return n.e(9535).then(n.bind(n,5677))},"@site/../docs/general/governance-apps.md",5677],f44ed8f8:[function(){return n.e(2930).then(n.bind(n,64937))},"@site/../docs/build/build-hrmp-channels.md",64937],f47489cd:[function(){return n.e(4544).then(n.bind(n,39892))},"@site/../docs/learn/learn-runtime-upgrades.md",39892],f52abf29:[function(){return n.e(9116).then(n.bind(n,57401))},"@site/../docs/general/decentralized-futures.md",57401],f62dca67:[function(){return n.e(6416).then(n.t.bind(n,78697,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-learn-xcm-fundamentals-e19.json",78697],f750c690:[function(){return n.e(3261).then(n.bind(n,76825))},"@site/../docs/learn/learn-nft-pallets.md",76825],f7acb151:[function(){return Promise.all([n.e(1869),n.e(2783)]).then(n.bind(n,91689))},"@site/../docs/learn/learn-guides-assets-create.md",91689],f8518919:[function(){return n.e(4484).then(n.bind(n,11366))},"@site/../docs/general/web3-and-polkadot.md",11366],f861e7c0:[function(){return n.e(5967).then(n.bind(n,84277))},"@site/../docs/general/dune-analytics/parachain-dashboards/litentry-dashboards.md",84277],f90fa732:[function(){return n.e(8225).then(n.bind(n,47791))},"@site/../docs/build/build-data.md",47791],fa343ad1:[function(){return n.e(2368).then(n.bind(n,90355))},"@site/../docs/learn/xcm/fundamentals/weight_and_fees.md",90355],fabebe44:[function(){return n.e(9783).then(n.bind(n,58846))},"@site/../docs/general/dev-heroes.md",58846],fc0e5740:[function(){return n.e(8067).then(n.t.bind(n,32591,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-build-client-index-10e.json",32591],fda65b2b:[function(){return Promise.all([n.e(1869),n.e(6225)]).then(n.bind(n,95619))},"@site/../docs/learn/learn-guides-asset-conversion.md",95619],fea93377:[function(){return Promise.all([n.e(3482),n.e(4898)]).then(n.bind(n,48568))},"@site/../docs/maintain/maintain-guides-validator-payout.md",48568],feadf832:[function(){return Promise.all([n.e(1869),n.e(1710)]).then(n.bind(n,33317))},"@site/../docs/build/build-guides-coretime-start.md",33317],fecdcc34:[function(){return n.e(2410).then(n.bind(n,17293))},"@site/../docs/learn/xcm/journey/version.md",17293],feea648c:[function(){return n.e(9175).then(n.bind(n,44529))},"@site/../docs/learn/learn-xcvm.md",44529],ff154173:[function(){return n.e(34).then(n.t.bind(n,88796,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-maintain-collator-index-c0b.json",88796],ff6596ea:[function(){return Promise.all([n.e(3482),n.e(3507)]).then(n.bind(n,45909))},"@site/../docs/learn/learn-nominator.md",45909],ffd76171:[function(){return Promise.all([n.e(1869),n.e(639)]).then(n.bind(n,15038))},"@site/../docs/maintain/maintain-index.md",15038],ffe9c3c9:[function(){return n.e(1967).then(n.bind(n,47995))},"@site/../docs/learn/learn-DOT.md",47995]};var s=n(74848);function c(e){var t=e.error,n=e.retry,r=e.pastDelay;return t?(0,s.jsxs)("div",{style:{textAlign:"center",color:"#fff",backgroundColor:"#fa383e",borderColor:"#fa383e",borderStyle:"solid",borderRadius:"0.25rem",borderWidth:"1px",boxSizing:"border-box",display:"block",padding:"1rem",flex:"0 0 50%",marginLeft:"25%",marginRight:"25%",marginTop:"5rem",maxWidth:"50%",width:"100%"},children:[(0,s.jsx)("p",{children:String(t)}),(0,s.jsx)("div",{children:(0,s.jsx)("button",{type:"button",onClick:n,children:"Retry"})})]}):r?(0,s.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh"},children:(0,s.jsx)("svg",{id:"loader",style:{width:128,height:110,position:"absolute",top:"calc(100vh - 64%)"},viewBox:"0 0 45 45",xmlns:"http://www.w3.org/2000/svg",stroke:"#61dafb",children:(0,s.jsxs)("g",{fill:"none",fillRule:"evenodd",transform:"translate(1 1)",strokeWidth:"2",children:[(0,s.jsxs)("circle",{cx:"22",cy:"22",r:"6",strokeOpacity:"0",children:[(0,s.jsx)("animate",{attributeName:"r",begin:"1.5s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),(0,s.jsx)("animate",{attributeName:"stroke-opacity",begin:"1.5s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),(0,s.jsx)("animate",{attributeName:"stroke-width",begin:"1.5s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})]}),(0,s.jsxs)("circle",{cx:"22",cy:"22",r:"6",strokeOpacity:"0",children:[(0,s.jsx)("animate",{attributeName:"r",begin:"3s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),(0,s.jsx)("animate",{attributeName:"stroke-opacity",begin:"3s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),(0,s.jsx)("animate",{attributeName:"stroke-width",begin:"3s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})]}),(0,s.jsx)("circle",{cx:"22",cy:"22",r:"8",children:(0,s.jsx)("animate",{attributeName:"r",begin:"0s",dur:"1.5s",values:"6;1;2;3;4;5;6",calcMode:"linear",repeatCount:"indefinite"})})]})})}):null}var l=n(86921),u=n(53102);function d(e,t){if("*"===e)return a()({loading:c,loader:function(){return n.e(2237).then(n.bind(n,82237))},modules:["@theme/NotFound"],webpack:function(){return[82237]},render:function(e,t){var n=e.default;return(0,s.jsx)(u.W,{value:{plugin:{name:"native",id:"default"}},children:(0,s.jsx)(n,Object.assign({},t))})}});var r=o[e+"-"+t],d={},p=[],f=[],m=(0,l.A)(r);return Object.entries(m).forEach((function(e){var t=e[0],n=e[1],r=i[n];r&&(d[t]=r[0],p.push(r[1]),f.push(r[2]))})),a().Map({loading:c,loader:d,modules:p,webpack:function(){return f},render:function(t,n){var a=JSON.parse(JSON.stringify(r));Object.entries(t).forEach((function(t){var n=t[0],r=t[1],o=r.default;if(!o)throw new Error("The page component at "+e+" doesn't have a default export. This makes it impossible to render anything. Consider default-exporting a React component.");"object"!=typeof o&&"function"!=typeof o||Object.keys(r).filter((function(e){return"default"!==e})).forEach((function(e){o[e]=r[e]}));var i=a,s=n.split(".");s.slice(0,-1).forEach((function(e){i=i[e]})),i[s[s.length-1]]=o}));var o=a.__comp;delete a.__comp;var i=a.__context;delete a.__context;var c=a.__props;return delete a.__props,(0,s.jsx)(u.W,{value:i,children:(0,s.jsx)(o,Object.assign({},a,c,n))})}})}const p=[{path:"/search",component:d("/search","5de"),exact:!0},{path:"/docs",component:d("/docs","2ac"),routes:[{path:"/docs",component:d("/docs","aa7"),routes:[{path:"/docs",component:d("/docs","fde"),routes:[{path:"/docs/alpha-program",component:d("/docs/alpha-program","9f0"),exact:!0,sidebar:"docs"},{path:"/docs/ambassadors",component:d("/docs/ambassadors","718"),exact:!0,sidebar:"docs"},{path:"/docs/apps-index",component:d("/docs/apps-index","b46"),exact:!0,sidebar:"docs"},{path:"/docs/bug-bounty",component:d("/docs/bug-bounty","1ba"),exact:!0,sidebar:"docs"},{path:"/docs/build-archive-index",component:d("/docs/build-archive-index","3b3"),exact:!0,sidebar:"docs"},{path:"/docs/build-client-index",component:d("/docs/build-client-index","e7c"),exact:!0,sidebar:"docs"},{path:"/docs/build-client-side",component:d("/docs/build-client-side","65f"),exact:!0,sidebar:"docs"},{path:"/docs/build-dapp",component:d("/docs/build-dapp","dd7"),exact:!0},{path:"/docs/build-data",component:d("/docs/build-data","95f"),exact:!0,sidebar:"docs"},{path:"/docs/build-guide",component:d("/docs/build-guide","479"),exact:!0,sidebar:"docs"},{path:"/docs/build-guides-coretime-start",component:d("/docs/build-guides-coretime-start","7be"),exact:!0,sidebar:"docs"},{path:"/docs/build-guides-coretime-troubleshoot",component:d("/docs/build-guides-coretime-troubleshoot","0fb"),exact:!0,sidebar:"docs"},{path:"/docs/build-guides-install-deps",component:d("/docs/build-guides-install-deps","5f9"),exact:!0,sidebar:"docs"},{path:"/docs/build-guides-template-basic",component:d("/docs/build-guides-template-basic","e2a"),exact:!0,sidebar:"docs"},{path:"/docs/build-hackathon",component:d("/docs/build-hackathon","c97"),exact:!0,sidebar:"docs"},{path:"/docs/build-hrmp-channels",component:d("/docs/build-hrmp-channels","05c"),exact:!0,sidebar:"docs"},{path:"/docs/build-index",component:d("/docs/build-index","26d"),exact:!0},{path:"/docs/build-integrate-assets",component:d("/docs/build-integrate-assets","47a"),exact:!0,sidebar:"docs"},{path:"/docs/build-integration",component:d("/docs/build-integration","75b"),exact:!0,sidebar:"docs"},{path:"/docs/build-light-clients",component:d("/docs/build-light-clients","f31"),exact:!0,sidebar:"docs"},{path:"/docs/build-network-overview",component:d("/docs/build-network-overview","fb1"),exact:!0,sidebar:"docs"},{path:"/docs/build-node-interaction",component:d("/docs/build-node-interaction","f39"),exact:!0,sidebar:"docs"},{path:"/docs/build-node-management",component:d("/docs/build-node-management","cef"),exact:!0,sidebar:"docs"},{path:"/docs/build-open-source",component:d("/docs/build-open-source","066"),exact:!0,sidebar:"docs"},{path:"/docs/build-oracle",component:d("/docs/build-oracle","392"),exact:!0},{path:"/docs/build-pdk",component:d("/docs/build-pdk","d70"),exact:!0,sidebar:"docs"},{path:"/docs/build-protocol-index",component:d("/docs/build-protocol-index","aac"),exact:!0,sidebar:"docs"},{path:"/docs/build-protocol-info",component:d("/docs/build-protocol-info","a80"),exact:!0,sidebar:"docs"},{path:"/docs/build-smart-contracts",component:d("/docs/build-smart-contracts","bd5"),exact:!0,sidebar:"docs"},{path:"/docs/build-storage",component:d("/docs/build-storage","451"),exact:!0},{path:"/docs/build-tools-index",component:d("/docs/build-tools-index","889"),exact:!0,sidebar:"docs"},{path:"/docs/build-transaction-construction",component:d("/docs/build-transaction-construction","5ab"),exact:!0,sidebar:"docs"},{path:"/docs/chain-state-values",component:d("/docs/chain-state-values","35a"),exact:!0,sidebar:"docs"},{path:"/docs/community",component:d("/docs/community","d96"),exact:!0,sidebar:"docs"},{path:"/docs/community-index",component:d("/docs/community-index","d5a"),exact:!0,sidebar:"docs"},{path:"/docs/contributing",component:d("/docs/contributing","89f"),exact:!0,sidebar:"docs"},{path:"/docs/contributors",component:d("/docs/contributors","420"),exact:!0,sidebar:"docs"},{path:"/docs/dashboards-index",component:d("/docs/dashboards-index","421"),exact:!0,sidebar:"docs"},{path:"/docs/decentralized-futures",component:d("/docs/decentralized-futures","ff3"),exact:!0,sidebar:"docs"},{path:"/docs/decentralized-voices",component:d("/docs/decentralized-voices","a4e"),exact:!0,sidebar:"docs"},{path:"/docs/dev-heroes",component:d("/docs/dev-heroes","3a5"),exact:!0,sidebar:"docs"},{path:"/docs/ecosystem-funds",component:d("/docs/ecosystem-funds","479"),exact:!0,sidebar:"docs"},{path:"/docs/explore-index",component:d("/docs/explore-index","1f3"),exact:!0,sidebar:"docs"},{path:"/docs/faq",component:d("/docs/faq","286"),exact:!0,sidebar:"docs"},{path:"/docs/funding",component:d("/docs/funding","331"),exact:!0,sidebar:"docs"},{path:"/docs/general-index",component:d("/docs/general-index","409"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics",component:d("/docs/general/dune-analytics","b98"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/acala-dashboards",component:d("/docs/general/dune-analytics/acala-dashboards","792"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/assethub-dashboards",component:d("/docs/general/dune-analytics/assethub-dashboards","400"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/astar-dashboards",component:d("/docs/general/dune-analytics/astar-dashboards","790"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/bifrost-dashboards",component:d("/docs/general/dune-analytics/bifrost-dashboards","a46"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/bridgehub-dashboards",component:d("/docs/general/dune-analytics/bridgehub-dashboards","c1b"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/centrifuge-dashboards",component:d("/docs/general/dune-analytics/centrifuge-dashboards","ec8"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/collectives-dashboards",component:d("/docs/general/dune-analytics/collectives-dashboards","e12"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/coretime-dashboards",component:d("/docs/general/dune-analytics/coretime-dashboards","d8b"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/energywebx-dashboards",component:d("/docs/general/dune-analytics/energywebx-dashboards","936"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/frequency-dashboards",component:d("/docs/general/dune-analytics/frequency-dashboards","549"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/hydration-dashboards",component:d("/docs/general/dune-analytics/hydration-dashboards","366"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/interlay-dashboards",component:d("/docs/general/dune-analytics/interlay-dashboards","0c8"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/invarch-dashboards",component:d("/docs/general/dune-analytics/invarch-dashboards","8e2"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/litentry-dashboards",component:d("/docs/general/dune-analytics/litentry-dashboards","120"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/manta-dashboards",component:d("/docs/general/dune-analytics/manta-dashboards","02e"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/moonbeam-dashboards",component:d("/docs/general/dune-analytics/moonbeam-dashboards","319"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/neuroweb-dashboards",component:d("/docs/general/dune-analytics/neuroweb-dashboards","91b"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/nodle-dashboards",component:d("/docs/general/dune-analytics/nodle-dashboards","02e"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/parachain-dashboards",component:d("/docs/general/dune-analytics/parachain-dashboards","8fc"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/pendulum-dashboards",component:d("/docs/general/dune-analytics/pendulum-dashboards","dee"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/people-dashboards",component:d("/docs/general/dune-analytics/people-dashboards","7cf"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/phala-dashboards",component:d("/docs/general/dune-analytics/phala-dashboards","1a0"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/polimec-dashboards",component:d("/docs/general/dune-analytics/polimec-dashboards","1ba"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/polkadex-dashboards",component:d("/docs/general/dune-analytics/polkadex-dashboards","a53"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/polkadot-dashboards",component:d("/docs/general/dune-analytics/polkadot-dashboards","689"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/polkadot-dashboards-governance",component:d("/docs/general/dune-analytics/polkadot-dashboards-governance","a36"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/polkadot-dashboards-network",component:d("/docs/general/dune-analytics/polkadot-dashboards-network","73d"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/polkadot-dashboards-overview",component:d("/docs/general/dune-analytics/polkadot-dashboards-overview","d8e"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/polkadot-dashboards-staking",component:d("/docs/general/dune-analytics/polkadot-dashboards-staking","f70"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/polkadot-dashboards/polkadot-dot-ordinals",component:d("/docs/general/dune-analytics/polkadot-dashboards/polkadot-dot-ordinals","2ad"),exact:!0},{path:"/docs/general/dune-analytics/polkadot-dashboards/polkadot-governance-dashboard",component:d("/docs/general/dune-analytics/polkadot-dashboards/polkadot-governance-dashboard","bf1"),exact:!0},{path:"/docs/general/dune-analytics/polkadot-dashboards/polkadot-opengov-referenda-home",component:d("/docs/general/dune-analytics/polkadot-dashboards/polkadot-opengov-referenda-home","b4b"),exact:!0},{path:"/docs/general/dune-analytics/polkadot-dashboards/polkadot-opengov-referendum-voting-analysis",component:d("/docs/general/dune-analytics/polkadot-dashboards/polkadot-opengov-referendum-voting-analysis","cfb"),exact:!0},{path:"/docs/general/dune-analytics/polkadot-dashboards/polkadot-staking-dashboard",component:d("/docs/general/dune-analytics/polkadot-dashboards/polkadot-staking-dashboard","856"),exact:!0},{path:"/docs/general/dune-analytics/polkadot-dashboards/polkadot-staking-dashboard-nomination-pool",component:d("/docs/general/dune-analytics/polkadot-dashboards/polkadot-staking-dashboard-nomination-pool","613"),exact:!0},{path:"/docs/general/dune-analytics/polkadot-dashboards/polkadot-staking-dashboard-nominators",component:d("/docs/general/dune-analytics/polkadot-dashboards/polkadot-staking-dashboard-nominators","a03"),exact:!0},{path:"/docs/general/dune-analytics/polkadot-dashboards/polkadot-staking-dashboard-pool-member",component:d("/docs/general/dune-analytics/polkadot-dashboards/polkadot-staking-dashboard-pool-member","ddb"),exact:!0},{path:"/docs/general/dune-analytics/polkadot-dashboards/polkadot-staking-dashboard-validators",component:d("/docs/general/dune-analytics/polkadot-dashboards/polkadot-staking-dashboard-validators","d6d"),exact:!0},{path:"/docs/general/dune-analytics/snowbridge-dashboards",component:d("/docs/general/dune-analytics/snowbridge-dashboards","915"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/stellaswap-dashboards",component:d("/docs/general/dune-analytics/stellaswap-dashboards","0bf"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/unique-dashboards",component:d("/docs/general/dune-analytics/unique-dashboards","f74"),exact:!0,sidebar:"docs"},{path:"/docs/general/dunesql-cheatsheet",component:d("/docs/general/dunesql-cheatsheet","fe2"),exact:!0,sidebar:"docs"},{path:"/docs/general/onboarding-status-and-key-dashboards",component:d("/docs/general/onboarding-status-and-key-dashboards","b88"),exact:!0,sidebar:"docs"},{path:"/docs/general/polkadot-ecosystem-overview",component:d("/docs/general/polkadot-ecosystem-overview","bcd"),exact:!0,sidebar:"docs"},{path:"/docs/general/project-dashboards",component:d("/docs/general/project-dashboards","c57"),exact:!0,sidebar:"docs"},{path:"/docs/getting-started",component:d("/docs/getting-started","46c"),exact:!0,sidebar:"docs"},{path:"/docs/glossary",component:d("/docs/glossary","021"),exact:!0,sidebar:"docs"},{path:"/docs/governance-apps",component:d("/docs/governance-apps","055"),exact:!0,sidebar:"docs"},{path:"/docs/grants",component:d("/docs/grants","586"),exact:!0,sidebar:"docs"},{path:"/docs/how-to-dyor",component:d("/docs/how-to-dyor","9ea"),exact:!0,sidebar:"docs"},{path:"/docs/kusama-adversarial-cheatsheet",component:d("/docs/kusama-adversarial-cheatsheet","7ad"),exact:!0,sidebar:"docs"},{path:"/docs/kusama-bug-bounty",component:d("/docs/kusama-bug-bounty","5ce"),exact:!0,sidebar:"docs"},{path:"/docs/kusama-coc",component:d("/docs/kusama-coc","fee"),exact:!0,sidebar:"docs"},{path:"/docs/kusama-getting-started",component:d("/docs/kusama-getting-started","c42"),exact:!0,sidebar:"docs"},{path:"/docs/kusama-social-recovery",component:d("/docs/kusama-social-recovery","f3d"),exact:!0,sidebar:"docs"},{path:"/docs/kusama-timeline",component:d("/docs/kusama-timeline","d67"),exact:!0,sidebar:"docs"},{path:"/docs/learn-account-abstraction",component:d("/docs/learn-account-abstraction","670"),exact:!0,sidebar:"docs"},{path:"/docs/learn-account-advanced",component:d("/docs/learn-account-advanced","652"),exact:!0,sidebar:"docs"},{path:"/docs/learn-account-balances",component:d("/docs/learn-account-balances","8e6"),exact:!0,sidebar:"docs"},{path:"/docs/learn-account-multisig",component:d("/docs/learn-account-multisig","f13"),exact:!0,sidebar:"docs"},{path:"/docs/learn-accounts",component:d("/docs/learn-accounts","42e"),exact:!0,sidebar:"docs"},{path:"/docs/learn-advanced-index",component:d("/docs/learn-advanced-index","63e"),exact:!0,sidebar:"docs"},{path:"/docs/learn-agile-coretime",component:d("/docs/learn-agile-coretime","777"),exact:!0,sidebar:"docs"},{path:"/docs/learn-agile-coretime-index",component:d("/docs/learn-agile-coretime-index","fa7"),exact:!0,sidebar:"docs"},{path:"/docs/learn-architecture",component:d("/docs/learn-architecture","908"),exact:!0,sidebar:"docs"},{path:"/docs/learn-archive",component:d("/docs/learn-archive","ca8"),exact:!0,sidebar:"docs"},{path:"/docs/learn-asset-conversion-assethub",component:d("/docs/learn-asset-conversion-assethub","426"),exact:!0,sidebar:"docs"},{path:"/docs/learn-assets",component:d("/docs/learn-assets","479"),exact:!0,sidebar:"docs"},{path:"/docs/learn-assets-index",component:d("/docs/learn-assets-index","506"),exact:!0,sidebar:"docs"},{path:"/docs/learn-async-backing",component:d("/docs/learn-async-backing","691"),exact:!0,sidebar:"docs"},{path:"/docs/learn-basics-index",component:d("/docs/learn-basics-index","2ab"),exact:!0,sidebar:"docs"},{path:"/docs/learn-bridges",component:d("/docs/learn-bridges","c95"),exact:!0,sidebar:"docs"},{path:"/docs/learn-collator",component:d("/docs/learn-collator","58b"),exact:!0,sidebar:"docs"},{path:"/docs/learn-comparisons",component:d("/docs/learn-comparisons","26e"),exact:!0,sidebar:"docs"},{path:"/docs/learn-comparisons-avalanche",component:d("/docs/learn-comparisons-avalanche","9e6"),exact:!0,sidebar:"docs"},{path:"/docs/learn-comparisons-cosmos",component:d("/docs/learn-comparisons-cosmos","9e6"),exact:!0,sidebar:"docs"},{path:"/docs/learn-comparisons-ethereum-2",component:d("/docs/learn-comparisons-ethereum-2","e28"),exact:!0,sidebar:"docs"},{path:"/docs/learn-comparisons-index",component:d("/docs/learn-comparisons-index","d6b"),exact:!0,sidebar:"docs"},{path:"/docs/learn-comparisons-kusama",component:d("/docs/learn-comparisons-kusama","bba"),exact:!0,sidebar:"docs"},{path:"/docs/learn-comparisons-rollups",component:d("/docs/learn-comparisons-rollups","f66"),exact:!0,sidebar:"docs"},{path:"/docs/learn-components-index",component:d("/docs/learn-components-index","ba1"),exact:!0,sidebar:"docs"},{path:"/docs/learn-consensus",component:d("/docs/learn-consensus","83d"),exact:!0,sidebar:"docs"},{path:"/docs/learn-cryptography",component:d("/docs/learn-cryptography","ed0"),exact:!0,sidebar:"docs"},{path:"/docs/learn-DOT",component:d("/docs/learn-DOT","829"),exact:!0,sidebar:"docs"},{path:"/docs/learn-dot-ksm-bridge",component:d("/docs/learn-dot-ksm-bridge","cac"),exact:!0,sidebar:"docs"},{path:"/docs/learn-elastic-scaling",component:d("/docs/learn-elastic-scaling","867"),exact:!0,sidebar:"docs"},{path:"/docs/learn-future-implementations-index",component:d("/docs/learn-future-implementations-index","e25"),exact:!0,sidebar:"docs"},{path:"/docs/learn-guides-accounts",component:d("/docs/learn-guides-accounts","298"),exact:!0,sidebar:"docs"},{path:"/docs/learn-guides-accounts-multisig",component:d("/docs/learn-guides-accounts-multisig","53f"),exact:!0,sidebar:"docs"},{path:"/docs/learn-guides-accounts-proxy",component:d("/docs/learn-guides-accounts-proxy","976"),exact:!0,sidebar:"docs"},{path:"/docs/learn-guides-accounts-proxy-pure",component:d("/docs/learn-guides-accounts-proxy-pure","b2d"),exact:!0,sidebar:"docs"},{path:"/docs/learn-guides-asset-conversion",component:d("/docs/learn-guides-asset-conversion","ef4"),exact:!0,sidebar:"docs"},{path:"/docs/learn-guides-assets",component:d("/docs/learn-guides-assets","8f4"),exact:!0,sidebar:"docs"},{path:"/docs/learn-guides-assets-create",component:d("/docs/learn-guides-assets-create","5a5"),exact:!0,sidebar:"docs"},{path:"/docs/learn-guides-bounties",component:d("/docs/learn-guides-bounties","43b"),exact:!0,sidebar:"docs"},{path:"/docs/learn-guides-bridges",component:d("/docs/learn-guides-bridges","7e1"),exact:!0,sidebar:"docs"},{path:"/docs/learn-guides-claims",component:d("/docs/learn-guides-claims","aa7"),exact:!0,sidebar:"docs"},{path:"/docs/learn-guides-coretime-marketplaces",component:d("/docs/learn-guides-coretime-marketplaces","515"),exact:!0,sidebar:"docs"},{path:"/docs/learn-guides-coretime-parachains",component:d("/docs/learn-guides-coretime-parachains","8e6"),exact:!0,sidebar:"docs"},{path:"/docs/learn-guides-coretime-swap",component:d("/docs/learn-guides-coretime-swap","eeb"),exact:!0,sidebar:"docs"},{path:"/docs/learn-guides-dot-ksm-bridge",component:d("/docs/learn-guides-dot-ksm-bridge","acc"),exact:!0,sidebar:"docs"},{path:"/docs/learn-guides-identity",component:d("/docs/learn-guides-identity","3bb"),exact:!0,sidebar:"docs"},{path:"/docs/learn-guides-ledger",component:d("/docs/learn-guides-ledger","4d2"),exact:!0,sidebar:"docs"},{path:"/docs/learn-guides-nominator",component:d("/docs/learn-guides-nominator","5be"),exact:!0,sidebar:"docs"},{path:"/docs/learn-guides-polkadot-opengov",component:d("/docs/learn-guides-polkadot-opengov","e43"),exact:!0,sidebar:"docs"},{path:"/docs/learn-guides-staking",component:d("/docs/learn-guides-staking","c84"),exact:!0,sidebar:"docs"},{path:"/docs/learn-guides-staking-pools",component:d("/docs/learn-guides-staking-pools","599"),exact:!0,sidebar:"docs"},{path:"/docs/learn-guides-transfers",component:d("/docs/learn-guides-transfers","d9a"),exact:!0,sidebar:"docs"},{path:"/docs/learn-guides-treasury",component:d("/docs/learn-guides-treasury","378"),exact:!0,sidebar:"docs"},{path:"/docs/learn-guides-vault",component:d("/docs/learn-guides-vault","c39"),exact:!0,sidebar:"docs"},{path:"/docs/learn-hyperbridge",component:d("/docs/learn-hyperbridge","646"),exact:!0,sidebar:"docs"},{path:"/docs/learn-identity",component:d("/docs/learn-identity","06f"),exact:!0,sidebar:"docs"},{path:"/docs/learn-implementations",component:d("/docs/learn-implementations","9b0"),exact:!0},{path:"/docs/learn-index",component:d("/docs/learn-index","0b7"),exact:!0,sidebar:"docs"},{path:"/docs/learn-inflation",component:d("/docs/learn-inflation","a49"),exact:!0,sidebar:"docs"},{path:"/docs/learn-jam",component:d("/docs/learn-jam","e19"),exact:!0,sidebar:"docs"},{path:"/docs/learn-jam-chain",component:d("/docs/learn-jam-chain","35f"),exact:!0,sidebar:"docs"},{path:"/docs/learn-jam-faq",component:d("/docs/learn-jam-faq","617"),exact:!0,sidebar:"docs"},{path:"/docs/learn-nft",component:d("/docs/learn-nft","078"),exact:!0,sidebar:"docs"},{path:"/docs/learn-nft-pallets",component:d("/docs/learn-nft-pallets","665"),exact:!0,sidebar:"docs"},{path:"/docs/learn-nft-projects",component:d("/docs/learn-nft-projects","226"),exact:!0,sidebar:"docs"},{path:"/docs/learn-nomination-pools",component:d("/docs/learn-nomination-pools","328"),exact:!0,sidebar:"docs"},{path:"/docs/learn-nominator",component:d("/docs/learn-nominator","443"),exact:!0,sidebar:"docs"},{path:"/docs/learn-offenses",component:d("/docs/learn-offenses","ed9"),exact:!0,sidebar:"docs"},{path:"/docs/learn-parachains",component:d("/docs/learn-parachains","b9e"),exact:!0,sidebar:"docs"},{path:"/docs/learn-parachains-faq",component:d("/docs/learn-parachains-faq","357"),exact:!0,sidebar:"docs"},{path:"/docs/learn-parachains-index",component:d("/docs/learn-parachains-index","e80"),exact:!0,sidebar:"docs"},{path:"/docs/learn-parachains-protocol",component:d("/docs/learn-parachains-protocol","604"),exact:!0,sidebar:"docs"},{path:"/docs/learn-participants-index",component:d("/docs/learn-participants-index","426"),exact:!0,sidebar:"docs"},{path:"/docs/learn-phragmen",component:d("/docs/learn-phragmen","894"),exact:!0,sidebar:"docs"},{path:"/docs/learn-polkadot-host",component:d("/docs/learn-polkadot-host","92a"),exact:!0,sidebar:"docs"},{path:"/docs/learn-polkadot-js-guides",component:d("/docs/learn-polkadot-js-guides","347"),exact:!0,sidebar:"docs"},{path:"/docs/learn-polkadot-opengov",component:d("/docs/learn-polkadot-opengov","8c9"),exact:!0,sidebar:"docs"},{path:"/docs/learn-polkadot-opengov-index",component:d("/docs/learn-polkadot-opengov-index","922"),exact:!0,sidebar:"docs"},{path:"/docs/learn-polkadot-opengov-origins",component:d("/docs/learn-polkadot-opengov-origins","9d6"),exact:!0,sidebar:"docs"},{path:"/docs/learn-polkadot-opengov-treasury",component:d("/docs/learn-polkadot-opengov-treasury","fbd"),exact:!0,sidebar:"docs"},{path:"/docs/learn-polkadot-technical-fellowship",component:d("/docs/learn-polkadot-technical-fellowship","ee8"),exact:!0,sidebar:"docs"},{path:"/docs/learn-polkadotjs",component:d("/docs/learn-polkadotjs","089"),exact:!0,sidebar:"docs"},{path:"/docs/learn-proxies",component:d("/docs/learn-proxies","a18"),exact:!0,sidebar:"docs"},{path:"/docs/learn-proxies-pure",component:d("/docs/learn-proxies-pure","8be"),exact:!0,sidebar:"docs"},{path:"/docs/learn-runtime-upgrades",component:d("/docs/learn-runtime-upgrades","582"),exact:!0,sidebar:"docs"},{path:"/docs/learn-safrole",component:d("/docs/learn-safrole","213"),exact:!0,sidebar:"docs"},{path:"/docs/learn-scams",component:d("/docs/learn-scams","a7e"),exact:!0,sidebar:"docs"},{path:"/docs/learn-snowbridge",component:d("/docs/learn-snowbridge","f68"),exact:!0,sidebar:"docs"},{path:"/docs/learn-spree",component:d("/docs/learn-spree","c79"),exact:!0,sidebar:"docs"},{path:"/docs/learn-staking",component:d("/docs/learn-staking","9b8"),exact:!0,sidebar:"docs"},{path:"/docs/learn-staking-advanced",component:d("/docs/learn-staking-advanced","33a"),exact:!0,sidebar:"docs"},{path:"/docs/learn-staking-index",component:d("/docs/learn-staking-index","cf9"),exact:!0,sidebar:"docs"},{path:"/docs/learn-system-chains",component:d("/docs/learn-system-chains","1b0"),exact:!0,sidebar:"docs"},{path:"/docs/learn-teleport",component:d("/docs/learn-teleport","e18"),exact:!0,sidebar:"docs"},{path:"/docs/learn-transactions",component:d("/docs/learn-transactions","81c"),exact:!0,sidebar:"docs"},{path:"/docs/learn-validator",component:d("/docs/learn-validator","45a"),exact:!0,sidebar:"docs"},{path:"/docs/learn-video-tutorials",component:d("/docs/learn-video-tutorials","64f"),exact:!0,sidebar:"docs"},{path:"/docs/learn-wasm",component:d("/docs/learn-wasm","0b7"),exact:!0,sidebar:"docs"},{path:"/docs/learn-xcm",component:d("/docs/learn-xcm","20d"),exact:!0,sidebar:"docs"},{path:"/docs/learn-xcm-index",component:d("/docs/learn-xcm-index","49c"),exact:!0,sidebar:"docs"},{path:"/docs/learn-xcm-instructions",component:d("/docs/learn-xcm-instructions","3c1"),exact:!0,sidebar:"docs"},{path:"/docs/learn-xcm-pallet",component:d("/docs/learn-xcm-pallet","3da"),exact:!0,sidebar:"docs"},{path:"/docs/learn-xcm-transport",component:d("/docs/learn-xcm-transport","5ef"),exact:!0,sidebar:"docs"},{path:"/docs/learn-xcm-usecases",component:d("/docs/learn-xcm-usecases","2ae"),exact:!0,sidebar:"docs"},{path:"/docs/learn-xcvm",component:d("/docs/learn-xcvm","d56"),exact:!0,sidebar:"docs"},{path:"/docs/learn/learn-auction",component:d("/docs/learn/learn-auction","9ae"),exact:!0,sidebar:"docs"},{path:"/docs/learn/learn-controller",component:d("/docs/learn/learn-controller","d30"),exact:!0,sidebar:"docs"},{path:"/docs/learn/learn-crowdloans",component:d("/docs/learn/learn-crowdloans","b27"),exact:!0,sidebar:"docs"},{path:"/docs/learn/learn-governance",component:d("/docs/learn/learn-governance","fde"),exact:!0,sidebar:"docs"},{path:"/docs/learn/learn-launch",component:d("/docs/learn/learn-launch","853"),exact:!0,sidebar:"docs"},{path:"/docs/learn/learn-redenomination",component:d("/docs/learn/learn-redenomination","6a6"),exact:!0,sidebar:"docs"},{path:"/docs/learn/learn-treasury",component:d("/docs/learn/learn-treasury","75c"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm",component:d("/docs/learn/xcm","995"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/config-deep-dive",component:d("/docs/learn/xcm/config-deep-dive","b64"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/fundamentals",component:d("/docs/learn/xcm/fundamentals","13d"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/fundamentals-fees",component:d("/docs/learn/xcm/fundamentals-fees","6b3"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/fundamentals-multiasset",component:d("/docs/learn/xcm/fundamentals-multiasset","001"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/fundamentals-summary",component:d("/docs/learn/xcm/fundamentals-summary","a4b"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/fundamentals-xcvm",component:d("/docs/learn/xcm/fundamentals-xcvm","086"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/fundamentals/multilocation",component:d("/docs/learn/xcm/fundamentals/multilocation","e19"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/fundamentals/multilocation-example",component:d("/docs/learn/xcm/fundamentals/multilocation-example","358"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/fundamentals/multilocation-junctions",component:d("/docs/learn/xcm/fundamentals/multilocation-junctions","e64"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/fundamentals/multilocation-summary",component:d("/docs/learn/xcm/fundamentals/multilocation-summary","958"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/introduction",component:d("/docs/learn/xcm/introduction","813"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/journey",component:d("/docs/learn/xcm/journey","0b1"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/journey-assets",component:d("/docs/learn/xcm/journey-assets","bf0"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/journey-channels",component:d("/docs/learn/xcm/journey-channels","22c"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/journey-expectations",component:d("/docs/learn/xcm/journey-expectations","c0f"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/journey-fees",component:d("/docs/learn/xcm/journey-fees","193"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/journey-holding",component:d("/docs/learn/xcm/journey-holding","b29"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/journey-locks",component:d("/docs/learn/xcm/journey-locks","f3a"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/journey-origin",component:d("/docs/learn/xcm/journey-origin","a4d"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/journey-queries",component:d("/docs/learn/xcm/journey-queries","670"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/journey-register",component:d("/docs/learn/xcm/journey-register","0fe"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/journey-summary",component:d("/docs/learn/xcm/journey-summary","6a3"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/journey-transact",component:d("/docs/learn/xcm/journey-transact","eae"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/journey-version",component:d("/docs/learn/xcm/journey-version","d38"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/journey/transfers",component:d("/docs/learn/xcm/journey/transfers","d74"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/journey/transfers-reserve",component:d("/docs/learn/xcm/journey/transfers-reserve","4a6"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/journey/transfers-summary",component:d("/docs/learn/xcm/journey/transfers-summary","2e8"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/journey/transfers-teleport",component:d("/docs/learn/xcm/journey/transfers-teleport","2a8"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/overview",component:d("/docs/learn/xcm/overview","376"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/overview-architecture",component:d("/docs/learn/xcm/overview-architecture","7ac"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/overview-format",component:d("/docs/learn/xcm/overview-format","bef"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/overview-intro",component:d("/docs/learn/xcm/overview-intro","32c"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/overview-summary",component:d("/docs/learn/xcm/overview-summary","daf"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/overview-xcvm",component:d("/docs/learn/xcm/overview-xcvm","238"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/quickstart",component:d("/docs/learn/xcm/quickstart","9db"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/quickstart-first-look",component:d("/docs/learn/xcm/quickstart-first-look","b8c"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/quickstart-simulator",component:d("/docs/learn/xcm/quickstart-simulator","de9"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/quickstart-summary",component:d("/docs/learn/xcm/quickstart-summary","30b"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/reference-glossary",component:d("/docs/learn/xcm/reference-glossary","aa6"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/reference-xcvm-registers",component:d("/docs/learn/xcm/reference-xcvm-registers","043"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/references",component:d("/docs/learn/xcm/references","61c"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/testing",component:d("/docs/learn/xcm/testing","81b"),exact:!0,sidebar:"docs"},{path:"/docs/ledger",component:d("/docs/ledger","593"),exact:!0,sidebar:"docs"},{path:"/docs/maintain-archive",component:d("/docs/maintain-archive","17f"),exact:!0,sidebar:"docs"},{path:"/docs/maintain-bootnode",component:d("/docs/maintain-bootnode","9a2"),exact:!0,sidebar:"docs"},{path:"/docs/maintain-collator-index",component:d("/docs/maintain-collator-index","058"),exact:!0,sidebar:"docs"},{path:"/docs/maintain-endpoints",component:d("/docs/maintain-endpoints","3c9"),exact:!0,sidebar:"docs"},{path:"/docs/maintain-errors",component:d("/docs/maintain-errors","57a"),exact:!0,sidebar:"docs"},{path:"/docs/maintain-guides-async-backing",component:d("/docs/maintain-guides-async-backing","e3a"),exact:!0,sidebar:"docs"},{path:"/docs/maintain-guides-how-to-chill",component:d("/docs/maintain-guides-how-to-chill","9be"),exact:!0,sidebar:"docs"},{path:"/docs/maintain-guides-how-to-monitor-your-node",component:d("/docs/maintain-guides-how-to-monitor-your-node","c4b"),exact:!0,sidebar:"docs"},{path:"/docs/maintain-guides-how-to-stop-validating",component:d("/docs/maintain-guides-how-to-stop-validating","67e"),exact:!0,sidebar:"docs"},{path:"/docs/maintain-guides-how-to-systemd",component:d("/docs/maintain-guides-how-to-systemd","1ad"),exact:!0,sidebar:"docs"},{path:"/docs/maintain-guides-how-to-upgrade",component:d("/docs/maintain-guides-how-to-upgrade","8d9"),exact:!0,sidebar:"docs"},{path:"/docs/maintain-guides-how-to-validate-kusama",component:d("/docs/maintain-guides-how-to-validate-kusama","ea3"),exact:!0,sidebar:"docs"},{path:"/docs/maintain-guides-how-to-validate-polkadot",component:d("/docs/maintain-guides-how-to-validate-polkadot","56f"),exact:!0,sidebar:"docs"},{path:"/docs/maintain-guides-secure-validator",component:d("/docs/maintain-guides-secure-validator","5d5"),exact:!0,sidebar:"docs"},{path:"/docs/maintain-guides-society-kusama",component:d("/docs/maintain-guides-society-kusama","059"),exact:!0,sidebar:"docs"},{path:"/docs/maintain-guides-validator-community",component:d("/docs/maintain-guides-validator-community","699"),exact:!0,sidebar:"docs"},{path:"/docs/maintain-guides-validator-payout",component:d("/docs/maintain-guides-validator-payout","7df"),exact:!0,sidebar:"docs"},{path:"/docs/maintain-index",component:d("/docs/maintain-index","c57"),exact:!0,sidebar:"docs"},{path:"/docs/maintain-networks",component:d("/docs/maintain-networks","5dc"),exact:!0,sidebar:"docs"},{path:"/docs/maintain-node-index",component:d("/docs/maintain-node-index","e80"),exact:!0,sidebar:"docs"},{path:"/docs/maintain-polkadot-parameters",component:d("/docs/maintain-polkadot-parameters","38b"),exact:!0,sidebar:"docs"},{path:"/docs/maintain-rpc",component:d("/docs/maintain-rpc","887"),exact:!0,sidebar:"docs"},{path:"/docs/maintain-sync",component:d("/docs/maintain-sync","c37"),exact:!0,sidebar:"docs"},{path:"/docs/maintain-validator-index",component:d("/docs/maintain-validator-index","069"),exact:!0,sidebar:"docs"},{path:"/docs/maintain-wss",component:d("/docs/maintain-wss","207"),exact:!0,sidebar:"docs"},{path:"/docs/maintain/maintain-guides-democracy",component:d("/docs/maintain/maintain-guides-democracy","0ce"),exact:!0,sidebar:"docs"},{path:"/docs/maintain/maintain-guides-how-to-join-council",component:d("/docs/maintain/maintain-guides-how-to-join-council","992"),exact:!0,sidebar:"docs"},{path:"/docs/maintain/maintain-guides-how-to-vote-councillor",component:d("/docs/maintain/maintain-guides-how-to-vote-councillor","817"),exact:!0,sidebar:"docs"},{path:"/docs/metadata",component:d("/docs/metadata","e9a"),exact:!0,sidebar:"docs"},{path:"/docs/multisig-apps",component:d("/docs/multisig-apps","593"),exact:!0,sidebar:"docs"},{path:"/docs/parachains-apps",component:d("/docs/parachains-apps","cda"),exact:!0,sidebar:"docs"},{path:"/docs/parity-data-dashboards",component:d("/docs/parity-data-dashboards","11c"),exact:!0,sidebar:"docs"},{path:"/docs/polkadot-community-foundation",component:d("/docs/polkadot-community-foundation","0d6"),exact:!0,sidebar:"docs"},{path:"/docs/polkadot-direction",component:d("/docs/polkadot-direction","40a"),exact:!0,sidebar:"docs"},{path:"/docs/polkadot-v1",component:d("/docs/polkadot-v1","a68"),exact:!0,sidebar:"docs"},{path:"/docs/polkadot-vault",component:d("/docs/polkadot-vault","e33"),exact:!0,sidebar:"docs"},{path:"/docs/polkadot-vision-index",component:d("/docs/polkadot-vision-index","641"),exact:!0,sidebar:"docs"},{path:"/docs/polkadotjs",component:d("/docs/polkadotjs","8d7"),exact:!0,sidebar:"docs"},{path:"/docs/polkadotjs-ui",component:d("/docs/polkadotjs-ui","4c2"),exact:!0,sidebar:"docs"},{path:"/docs/programs-index",component:d("/docs/programs-index","292"),exact:!0,sidebar:"docs"},{path:"/docs/staking-apps",component:d("/docs/staking-apps","481"),exact:!0,sidebar:"docs"},{path:"/docs/staking-dashboard",component:d("/docs/staking-dashboard","d6b"),exact:!0,sidebar:"docs"},{path:"/docs/start-building",component:d("/docs/start-building","501"),exact:!0,sidebar:"docs"},{path:"/docs/stay-safe-index",component:d("/docs/stay-safe-index","e19"),exact:!0,sidebar:"docs"},{path:"/docs/thousand-contributors",component:d("/docs/thousand-contributors","b6c"),exact:!0,sidebar:"docs"},{path:"/docs/thousand-validators",component:d("/docs/thousand-validators","500"),exact:!0,sidebar:"docs"},{path:"/docs/transaction-attacks",component:d("/docs/transaction-attacks","5b0"),exact:!0,sidebar:"docs"},{path:"/docs/wallets-and-extensions",component:d("/docs/wallets-and-extensions","8ad"),exact:!0,sidebar:"docs"},{path:"/docs/wallets-index",component:d("/docs/wallets-index","d70"),exact:!0,sidebar:"docs"},{path:"/docs/web3-and-polkadot",component:d("/docs/web3-and-polkadot","c3a"),exact:!0,sidebar:"docs"}]}]}]},{path:"/",component:d("/","2e1"),exact:!0},{path:"*",component:d("*")}]},31513:(e,t,n)=>{"use strict";n.d(t,{zR:()=>x,TM:()=>j,yJ:()=>f,sC:()=>A,AO:()=>p});var r=n(58168);function a(e){return"/"===e.charAt(0)}function o(e,t){for(var n=t,r=n+1,a=e.length;r=0;p--){var f=i[p];"."===f?o(i,p):".."===f?(o(i,p),d++):d&&(o(i,p),d--)}if(!l)for(;d--;d)i.unshift("..");!l||""===i[0]||i[0]&&a(i[0])||i.unshift("");var m=i.join("/");return n&&"/"!==m.substr(-1)&&(m+="/"),m};var s=n(11561);function c(e){return"/"===e.charAt(0)?e:"/"+e}function l(e){return"/"===e.charAt(0)?e.substr(1):e}function u(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function d(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function p(e){var t=e.pathname,n=e.search,r=e.hash,a=t||"/";return n&&"?"!==n&&(a+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(a+="#"===r.charAt(0)?r:"#"+r),a}function f(e,t,n,a){var o;"string"==typeof e?(o=function(e){var t=e||"/",n="",r="",a=t.indexOf("#");-1!==a&&(r=t.substr(a),t=t.substr(0,a));var o=t.indexOf("?");return-1!==o&&(n=t.substr(o),t=t.substr(0,o)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e),o.state=t):(void 0===(o=(0,r.A)({},e)).pathname&&(o.pathname=""),o.search?"?"!==o.search.charAt(0)&&(o.search="?"+o.search):o.search="",o.hash?"#"!==o.hash.charAt(0)&&(o.hash="#"+o.hash):o.hash="",void 0!==t&&void 0===o.state&&(o.state=t));try{o.pathname=decodeURI(o.pathname)}catch(s){throw s instanceof URIError?new URIError('Pathname "'+o.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):s}return n&&(o.key=n),a?o.pathname?"/"!==o.pathname.charAt(0)&&(o.pathname=i(o.pathname,a.pathname)):o.pathname=a.pathname:o.pathname||(o.pathname="/"),o}function m(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,a){if(null!=e){var o="function"==typeof e?e(t,n):e;"string"==typeof o?"function"==typeof r?r(o,a):a(!0):a(!1!==o)}else a(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;rt?n.splice(t,n.length-t,a):n.push(a),d({action:r,location:a,index:t,entries:n})}}))},replace:function(e,t){var r="REPLACE",a=f(e,t,h(),x.location);u.confirmTransitionTo(a,r,n,(function(e){e&&(x.entries[x.index]=a,d({action:r,location:a}))}))},go:v,goBack:function(){v(-1)},goForward:function(){v(1)},canGo:function(e){var t=x.index+e;return t>=0&&t{"use strict";var r=n(44363),a={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function c(e){return r.isMemo(e)?i:s[e.$$typeof]||a}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=i;var l=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,m=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(m){var a=f(n);a&&a!==m&&e(t,a,r)}var i=u(n);d&&(i=i.concat(d(n)));for(var s=c(t),h=c(n),b=0;b{"use strict";e.exports=function(e,t,n,r,a,o,i,s){if(!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,a,o,i,s],u=0;(c=new Error(t.replace(/%s/g,(function(){return l[u++]})))).name="Invariant Violation"}throw c.framesToPop=1,c}}},10119:(e,t,n)=>{"use strict";n.r(t)},74100:(e,t,n)=>{"use strict";n.r(t)},35697:(e,t,n)=>{"use strict";n.r(t)},95728:(e,t,n)=>{"use strict";n.r(t)},5947:function(e,t,n){var r,a;r=function(){var e,t,n={version:"0.2.0"},r=n.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'
    '};function a(e,t,n){return en?n:e}function o(e){return 100*(-1+e)}function i(e,t,n){var a;return(a="translate3d"===r.positionUsing?{transform:"translate3d("+o(e)+"%,0,0)"}:"translate"===r.positionUsing?{transform:"translate("+o(e)+"%,0)"}:{"margin-left":o(e)+"%"}).transition="all "+t+"ms "+n,a}n.configure=function(e){var t,n;for(t in e)void 0!==(n=e[t])&&e.hasOwnProperty(t)&&(r[t]=n);return this},n.status=null,n.set=function(e){var t=n.isStarted();e=a(e,r.minimum,1),n.status=1===e?null:e;var o=n.render(!t),l=o.querySelector(r.barSelector),u=r.speed,d=r.easing;return o.offsetWidth,s((function(t){""===r.positionUsing&&(r.positionUsing=n.getPositioningCSS()),c(l,i(e,u,d)),1===e?(c(o,{transition:"none",opacity:1}),o.offsetWidth,setTimeout((function(){c(o,{transition:"all "+u+"ms linear",opacity:0}),setTimeout((function(){n.remove(),t()}),u)}),u)):setTimeout(t,u)})),this},n.isStarted=function(){return"number"==typeof n.status},n.start=function(){n.status||n.set(0);var e=function(){setTimeout((function(){n.status&&(n.trickle(),e())}),r.trickleSpeed)};return r.trickle&&e(),this},n.done=function(e){return e||n.status?n.inc(.3+.5*Math.random()).set(1):this},n.inc=function(e){var t=n.status;return t?("number"!=typeof e&&(e=(1-t)*a(Math.random()*t,.1,.95)),t=a(t+e,0,.994),n.set(t)):n.start()},n.trickle=function(){return n.inc(Math.random()*r.trickleRate)},e=0,t=0,n.promise=function(r){return r&&"resolved"!==r.state()?(0===t&&n.start(),e++,t++,r.always((function(){0==--t?(e=0,n.done()):n.set((e-t)/e)})),this):this},n.render=function(e){if(n.isRendered())return document.getElementById("nprogress");u(document.documentElement,"nprogress-busy");var t=document.createElement("div");t.id="nprogress",t.innerHTML=r.template;var a,i=t.querySelector(r.barSelector),s=e?"-100":o(n.status||0),l=document.querySelector(r.parent);return c(i,{transition:"all 0 linear",transform:"translate3d("+s+"%,0,0)"}),r.showSpinner||(a=t.querySelector(r.spinnerSelector))&&f(a),l!=document.body&&u(l,"nprogress-custom-parent"),l.appendChild(t),t},n.remove=function(){d(document.documentElement,"nprogress-busy"),d(document.querySelector(r.parent),"nprogress-custom-parent");var e=document.getElementById("nprogress");e&&f(e)},n.isRendered=function(){return!!document.getElementById("nprogress")},n.getPositioningCSS=function(){var e=document.body.style,t="WebkitTransform"in e?"Webkit":"MozTransform"in e?"Moz":"msTransform"in e?"ms":"OTransform"in e?"O":"";return t+"Perspective"in e?"translate3d":t+"Transform"in e?"translate":"margin"};var s=function(){var e=[];function t(){var n=e.shift();n&&n(t)}return function(n){e.push(n),1==e.length&&t()}}(),c=function(){var e=["Webkit","O","Moz","ms"],t={};function n(e){return e.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,(function(e,t){return t.toUpperCase()}))}function r(t){var n=document.body.style;if(t in n)return t;for(var r,a=e.length,o=t.charAt(0).toUpperCase()+t.slice(1);a--;)if((r=e[a]+o)in n)return r;return t}function a(e){return e=n(e),t[e]||(t[e]=r(e))}function o(e,t,n){t=a(t),e.style[t]=n}return function(e,t){var n,r,a=arguments;if(2==a.length)for(n in t)void 0!==(r=t[n])&&t.hasOwnProperty(n)&&o(e,n,r);else o(e,a[1],a[2])}}();function l(e,t){return("string"==typeof e?e:p(e)).indexOf(" "+t+" ")>=0}function u(e,t){var n=p(e),r=n+t;l(n,t)||(e.className=r.substring(1))}function d(e,t){var n,r=p(e);l(e,t)&&(n=r.replace(" "+t+" "," "),e.className=n.substring(1,n.length-1))}function p(e){return(" "+(e.className||"")+" ").replace(/\s+/gi," ")}function f(e){e&&e.parentNode&&e.parentNode.removeChild(e)}return n},void 0===(a="function"==typeof r?r.call(t,n,t,e):r)||(e.exports=a)},19700:()=>{!function(e){function t(e,t){return"___"+e.toUpperCase()+t+"___"}Object.defineProperties(e.languages["markup-templating"]={},{buildPlaceholders:{value:function(n,r,a,o){if(n.language===r){var i=n.tokenStack=[];n.code=n.code.replace(a,(function(e){if("function"==typeof o&&!o(e))return e;for(var a,s=i.length;-1!==n.code.indexOf(a=t(r,s));)++s;return i[s]=e,a})),n.grammar=e.languages.markup}}},tokenizePlaceholders:{value:function(n,r){if(n.language===r&&n.tokenStack){n.grammar=e.languages[r];var a=0,o=Object.keys(n.tokenStack);!function i(s){for(var c=0;c=o.length);c++){var l=s[c];if("string"==typeof l||l.content&&"string"==typeof l.content){var u=o[a],d=n.tokenStack[u],p="string"==typeof l?l:l.content,f=t(r,u),m=p.indexOf(f);if(m>-1){++a;var h=p.substring(0,m),b=new e.Token(r,e.tokenize(d,n.grammar),"language-"+r,d),g=p.substring(m+f.length),y=[];h&&y.push.apply(y,i([h])),y.push(b),g&&y.push.apply(y,i([g])),"string"==typeof l?s.splice.apply(s,[c,1].concat(y)):l.content=y}}else l.content&&i(l.content)}return s}(n.tokens)}}}})}(Prism)},75342:()=>{!function(e){for(var t=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|)*\*\//.source,n=0;n<2;n++)t=t.replace(//g,(function(){return t}));t=t.replace(//g,(function(){return/[^\s\S]/.source})),e.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string}(Prism)},91830:(e,t,n)=>{var r={"./prism-rust":75342};function a(e){var t=o(e);return n(t)}function o(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}a.keys=function(){return Object.keys(r)},a.resolve=o,e.exports=a,a.id=91830},2694:(e,t,n)=>{"use strict";var r=n(6925);function a(){}function o(){}o.resetWarningCache=a,e.exports=function(){function e(e,t,n,a,o,i){if(i!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:a};return n.PropTypes=n,n}},5556:(e,t,n)=>{e.exports=n(2694)()},6925:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},61105:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var r=n(46942),a=n.n(r),o=n(96540),i=n(36519),s=n(74848);const c=o.forwardRef(((e,t)=>{const[{className:n,...r},{as:o="div",bsPrefix:c,spans:l}]=function({as:e,bsPrefix:t,className:n,...r}){t=(0,i.oU)(t,"col");const o=(0,i.gy)(),s=(0,i.Jm)(),c=[],l=[];return o.forEach((e=>{const n=r[e];let a,o,i;delete r[e],"object"==typeof n&&null!=n?({span:a,offset:o,order:i}=n):a=n;const u=e!==s?`-${e}`:"";a&&c.push(!0===a?`${t}${u}`:`${t}${u}-${a}`),null!=i&&l.push(`order${u}-${i}`),null!=o&&l.push(`offset${u}-${o}`)})),[{...r,className:a()(n,...c,...l)},{as:e,bsPrefix:t,spans:c}]}(e);return(0,s.jsx)(o,{...r,ref:t,className:a()(n,!l.length&&c)})}));c.displayName="Col";const l=c},43048:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var r=n(46942),a=n.n(r),o=n(96540),i=n(36519),s=n(74848);const c=o.forwardRef((({bsPrefix:e,fluid:t=!1,as:n="div",className:r,...o},c)=>{const l=(0,i.oU)(e,"container"),u="string"==typeof t?`-${t}`:"-fluid";return(0,s.jsx)(n,{ref:c,...o,className:a()(r,t?`${l}${u}`:l)})}));c.displayName="Container";const l=c},44479:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var r=n(46942),a=n.n(r),o=n(96540),i=n(36519),s=n(74848);const c=o.forwardRef((({bsPrefix:e,className:t,as:n="div",...r},o)=>{const c=(0,i.oU)(e,"row"),l=(0,i.gy)(),u=(0,i.Jm)(),d=`${c}-cols`,p=[];return l.forEach((e=>{const t=r[e];let n;delete r[e],null!=t&&"object"==typeof t?({cols:n}=t):n=t;const a=e!==u?`-${e}`:"";null!=n&&p.push(`${d}${a}-${n}`)})),(0,s.jsx)(n,{ref:o,...r,className:a()(t,c,...p)})}));c.displayName="Row";const l=c},36519:(e,t,n)=>{"use strict";n.d(t,{Jm:()=>u,gy:()=>l,oU:()=>c});var r=n(96540);n(74848);const a=["xxl","xl","lg","md","sm","xs"],o=r.createContext({prefixes:{},breakpoints:a,minBreakpoint:"xs"}),{Consumer:i,Provider:s}=o;function c(e,t){const{prefixes:n}=(0,r.useContext)(o);return e||n[t]||t}function l(){const{breakpoints:e}=(0,r.useContext)(o);return e}function u(){const{minBreakpoint:e}=(0,r.useContext)(o);return e}},22551:(e,t,n)=>{"use strict";var r=n(96540),a=n(69982);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n